summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--LICENSE24
-rw-r--r--LICENSE.GPL-2.0-only288
-rw-r--r--LICENSE.MIT25
-rw-r--r--README.OE-Core (renamed from README)0
-rw-r--r--README.qemu15
-rw-r--r--contrib/artwork/oe.svg80
-rw-r--r--meta-selftest/COPYING.MIT17
-rw-r--r--meta-selftest/conf/layer.conf2
-rw-r--r--meta-selftest/files/signing/key.passphrase1
-rw-r--r--meta-selftest/files/static-group14
-rw-r--r--meta-selftest/files/static-passwd11
-rw-r--r--meta-selftest/lib/devtool/bbpath.py44
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py50
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/selftest.json (renamed from meta-selftest/lib/oeqa/runtime/selftest.json)0
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/selftest.py31
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/virgl.py18
-rw-r--r--meta-selftest/lib/oeqa/runtime/selftest.py55
-rw-r--r--meta-selftest/lib/oeqa/selftest/cases/external-layer.py16
-rw-r--r--meta-selftest/lib/recipetool/bbpath.py41
-rw-r--r--meta-selftest/recipes-devtools/python/python-async-test.inc16
-rw-r--r--meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb2
-rw-r--r--meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb9
-rw-r--r--meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend (renamed from meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend)0
-rw-r--r--meta-selftest/recipes-test/container-image/container-image-testpkg.bb8
-rw-r--r--meta-selftest/recipes-test/container-image/container-test-image.bb8
-rw-r--r--meta-selftest/recipes-test/delay/delay.bb12
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-local/file11
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-local/file21
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb15
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly.bb7
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly/file11
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly/file21
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb18
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-patch-gz/readme.patch.gzbin0 -> 449 bytes
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-subdir.bb9
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-subdir/devtool-test-subdir.tar.gzbin0 -> 181 bytes
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-subdir/testfile1
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch37
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb8
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded8
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb4
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded4
-rw-r--r--meta-selftest/recipes-test/error/error.bb3
-rw-r--r--meta-selftest/recipes-test/fortran/files/hello.f955
-rw-r--r--meta-selftest/recipes-test/fortran/fortran-helloworld.bb24
-rw-r--r--meta-selftest/recipes-test/images/oe-selftest-image.bb2
-rw-r--r--meta-selftest/recipes-test/images/wic-image-minimal.bb9
-rw-r--r--meta-selftest/recipes-test/images/wic-image-minimal.wks8
-rw-r--r--meta-selftest/recipes-test/license/incompatible-license-alias.bb3
-rw-r--r--meta-selftest/recipes-test/license/incompatible-license.bb3
-rw-r--r--meta-selftest/recipes-test/license/incompatible-licenses.bb3
-rw-r--r--meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb3
-rw-r--r--meta-selftest/recipes-test/m4/m4_%.bbappend (renamed from meta-selftest/recipes-test/m4/m4_1.4.17.bbappend)0
-rw-r--r--meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch22
-rw-r--r--meta-selftest/recipes-test/man-db/man-db_%.bbappend (renamed from meta-selftest/recipes-test/man/man_1.6g.bbappend)0
-rw-r--r--meta-selftest/recipes-test/man/man/man-1.5h1-make.patch16
-rw-r--r--meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb28
-rw-r--r--meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb11
-rw-r--r--meta-selftest/recipes-test/postinst/postinst_1.0.bb72
-rw-r--r--meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb2
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test.inc5
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test/anotherfile (renamed from meta/lib/oe/tests/__init__.py)0
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test/somefile (renamed from meta/recipes-core/base-files/base-files/usbd)0
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb13
-rw-r--r--meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb22
-rw-r--r--meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb36
-rw-r--r--meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb30
-rwxr-xr-xmeta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/gdb.sh8
-rw-r--r--meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c5
-rw-r--r--meta-selftest/wic/test_biosplusefi_plugin.wks6
-rw-r--r--meta-selftest/wic/test_rawcopy_plugin.wks.in6
-rw-r--r--meta-selftest/wic/wictestdisk.wks7
-rw-r--r--meta-skeleton/COPYING.MIT17
-rw-r--r--meta-skeleton/conf/layer.conf2
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb2
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example.bb5
-rw-r--r--meta/COPYING.GPLv2339
-rw-r--r--meta/classes/allarch.bbclass30
-rw-r--r--meta/classes/archiver.bbclass267
-rw-r--r--meta/classes/autotools.bbclass162
-rw-r--r--meta/classes/base.bbclass377
-rw-r--r--meta/classes/bin_package.bbclass5
-rw-r--r--meta/classes/binconfig-disabled.bbclass1
-rw-r--r--meta/classes/binconfig.bbclass21
-rw-r--r--meta/classes/blacklist.bbclass29
-rw-r--r--meta/classes/bluetooth.bbclass14
-rw-r--r--meta/classes/bugzilla.bbclass187
-rw-r--r--meta/classes/buildhistory.bbclass327
-rw-r--r--meta/classes/buildstats-summary.bbclass2
-rw-r--r--meta/classes/buildstats.bbclass56
-rw-r--r--meta/classes/ccache.bbclass70
-rw-r--r--meta/classes/ccmake.bbclass97
-rw-r--r--meta/classes/chrpath.bbclass37
-rw-r--r--meta/classes/clutter.bbclass14
-rw-r--r--meta/classes/cmake.bbclass110
-rw-r--r--meta/classes/cml1.bbclass11
-rw-r--r--meta/classes/compress_doc.bbclass51
-rw-r--r--meta/classes/copyleft_compliance.bbclass10
-rw-r--r--meta/classes/copyleft_filter.bbclass40
-rw-r--r--meta/classes/core-image.bbclass5
-rw-r--r--meta/classes/cpan-base.bbclass30
-rw-r--r--meta/classes/cpan.bbclass24
-rw-r--r--meta/classes/cpan_build.bbclass9
-rw-r--r--meta/classes/cross-canadian.bbclass49
-rw-r--r--meta/classes/cross.bbclass27
-rw-r--r--meta/classes/crosssdk.bbclass16
-rw-r--r--meta/classes/cve-check.bbclass271
-rw-r--r--meta/classes/debian.bbclass63
-rw-r--r--meta/classes/deploy.bbclass2
-rw-r--r--meta/classes/devicetree.bbclass148
-rw-r--r--meta/classes/devshell.bbclass18
-rw-r--r--meta/classes/devtool-source.bbclass233
-rw-r--r--meta/classes/devupstream.bbclass48
-rw-r--r--meta/classes/distro_features_check.bbclass40
-rw-r--r--meta/classes/distrodata.bbclass479
-rw-r--r--meta/classes/distrooverrides.bbclass32
-rw-r--r--meta/classes/distutils-base.bbclass2
-rw-r--r--meta/classes/distutils-common-base.bbclass12
-rw-r--r--meta/classes/distutils-tools.bbclass73
-rw-r--r--meta/classes/distutils.bbclass61
-rw-r--r--meta/classes/distutils3-base.bbclass2
-rw-r--r--meta/classes/distutils3.bbclass53
-rw-r--r--meta/classes/dos2unix.bbclass14
-rw-r--r--meta/classes/externalsrc.bbclass131
-rw-r--r--meta/classes/extrausers.bbclass23
-rw-r--r--meta/classes/features_check.bbclass85
-rw-r--r--meta/classes/fontcache.bbclass19
-rw-r--r--meta/classes/fs-uuid.bbclass4
-rw-r--r--meta/classes/gconf.bbclass17
-rw-r--r--meta/classes/gettext.bbclass19
-rw-r--r--meta/classes/gio-module-cache.bbclass13
-rw-r--r--meta/classes/glide.bbclass9
-rw-r--r--meta/classes/gnome.bbclass1
-rw-r--r--meta/classes/gnomebase.bbclass8
-rw-r--r--meta/classes/go-ptest.bbclass54
-rw-r--r--meta/classes/go.bbclass154
-rw-r--r--meta/classes/goarch.bbclass118
-rw-r--r--meta/classes/gobject-introspection.bbclass20
-rw-r--r--meta/classes/godep.bbclass8
-rw-r--r--meta/classes/grub-efi-cfg.bbclass116
-rw-r--r--meta/classes/grub-efi.bbclass156
-rw-r--r--meta/classes/gsettings.bbclass47
-rw-r--r--meta/classes/gtk-doc.bbclass43
-rw-r--r--meta/classes/gtk-icon-cache.bbclass22
-rw-r--r--meta/classes/gtk-immodules-cache.bbclass84
-rw-r--r--meta/classes/gummiboot.bbclass121
-rw-r--r--meta/classes/gzipnative.bbclass5
-rw-r--r--meta/classes/icecc.bbclass296
-rw-r--r--meta/classes/image-buildinfo.bbclass31
-rw-r--r--meta/classes/image-combined-dbg.bbclass9
-rw-r--r--meta/classes/image-container.bbclass21
-rw-r--r--meta/classes/image-live.bbclass64
-rw-r--r--meta/classes/image-mklibs.bbclass2
-rw-r--r--meta/classes/image-postinst-intercepts.bbclass23
-rw-r--r--meta/classes/image-prelink.bbclass16
-rw-r--r--meta/classes/image-vm.bbclass179
-rw-r--r--meta/classes/image.bbclass353
-rw-r--r--meta/classes/image_types.bbclass263
-rw-r--r--meta/classes/image_types_uboot.bbclass26
-rw-r--r--meta/classes/image_types_wic.bbclass142
-rw-r--r--meta/classes/insane.bbclass862
-rw-r--r--meta/classes/kernel-arch.bbclass20
-rw-r--r--meta/classes/kernel-artifact-names.bbclass18
-rw-r--r--meta/classes/kernel-devicetree.bbclass95
-rw-r--r--meta/classes/kernel-fitimage.bbclass242
-rw-r--r--meta/classes/kernel-grub.bbclass2
-rw-r--r--meta/classes/kernel-module-split.bbclass79
-rw-r--r--meta/classes/kernel-uboot.bbclass10
-rw-r--r--meta/classes/kernel-uimage.bbclass36
-rw-r--r--meta/classes/kernel-yocto.bbclass144
-rw-r--r--meta/classes/kernel.bbclass421
-rw-r--r--meta/classes/kernelsrc.bbclass6
-rw-r--r--meta/classes/libc-common.bbclass14
-rw-r--r--meta/classes/libc-package.bbclass194
-rw-r--r--meta/classes/license.bbclass506
-rw-r--r--meta/classes/license_image.bbclass256
-rw-r--r--meta/classes/linux-kernel-base.bbclass4
-rw-r--r--meta/classes/linuxloader.bbclass87
-rw-r--r--meta/classes/live-vm-common.bbclass50
-rw-r--r--meta/classes/logging.bbclass2
-rw-r--r--meta/classes/manpages.bbclass37
-rw-r--r--meta/classes/mcextend.bbclass16
-rw-r--r--meta/classes/meson.bbclass161
-rw-r--r--meta/classes/metadata_scm.bbclass46
-rw-r--r--meta/classes/migrate_localcount.bbclass12
-rw-r--r--meta/classes/mime.bbclass17
-rw-r--r--meta/classes/mirrors.bbclass68
-rw-r--r--meta/classes/module-base.bbclass14
-rw-r--r--meta/classes/module.bbclass47
-rw-r--r--meta/classes/multilib.bbclass144
-rw-r--r--meta/classes/multilib_global.bbclass76
-rw-r--r--meta/classes/multilib_header.bbclass12
-rw-r--r--meta/classes/multilib_script.bbclass34
-rw-r--r--meta/classes/native.bbclass52
-rw-r--r--meta/classes/nativesdk.bbclass34
-rw-r--r--meta/classes/npm.bbclass51
-rw-r--r--meta/classes/oelint.bbclass4
-rw-r--r--meta/classes/own-mirrors.bbclass26
-rw-r--r--meta/classes/package.bbclass1026
-rw-r--r--meta/classes/package_deb.bbclass210
-rw-r--r--meta/classes/package_ipk.bbclass177
-rw-r--r--meta/classes/package_pkgdata.bbclass167
-rw-r--r--meta/classes/package_rpm.bbclass303
-rw-r--r--meta/classes/package_tar.bbclass22
-rw-r--r--meta/classes/packagedata.bbclass10
-rw-r--r--meta/classes/packagefeed-stability.bbclass24
-rw-r--r--meta/classes/packagegroup.bbclass29
-rw-r--r--meta/classes/patch.bbclass174
-rw-r--r--meta/classes/perl-version.bbclass66
-rw-r--r--meta/classes/pixbufcache.bbclass38
-rw-r--r--meta/classes/podfix.bbclass35
-rw-r--r--meta/classes/populate_sdk_base.bbclass147
-rw-r--r--meta/classes/populate_sdk_ext.bbclass376
-rw-r--r--meta/classes/prexport.bbclass4
-rw-r--r--meta/classes/ptest-perl.bbclass30
-rw-r--r--meta/classes/ptest.bbclass56
-rw-r--r--meta/classes/pypi.bbclass26
-rw-r--r--meta/classes/python3-dir.bbclass2
-rw-r--r--meta/classes/python3native.bbclass21
-rw-r--r--meta/classes/pythonnative.bbclass17
-rw-r--r--meta/classes/qemu.bbclass10
-rw-r--r--meta/classes/qemuboot.bbclass93
-rw-r--r--meta/classes/recipe_sanity.bbclass37
-rw-r--r--meta/classes/relative_symlinks.bbclass5
-rw-r--r--meta/classes/relocatable.bbclass13
-rw-r--r--meta/classes/report-error.bbclass52
-rw-r--r--meta/classes/reproducible_build.bbclass179
-rw-r--r--meta/classes/reproducible_build_simple.bbclass11
-rw-r--r--meta/classes/rm_work.bbclass170
-rw-r--r--meta/classes/rm_work_and_downloads.bbclass33
-rw-r--r--meta/classes/rootfs-postcommands.bbclass182
-rw-r--r--meta/classes/rootfs_deb.bbclass11
-rw-r--r--meta/classes/rootfs_ipk.bbclass10
-rw-r--r--meta/classes/rootfs_rpm.bbclass30
-rw-r--r--meta/classes/rootfsdebugfiles.bbclass7
-rw-r--r--meta/classes/sanity.bbclass397
-rw-r--r--meta/classes/scons.bbclass26
-rw-r--r--meta/classes/setuptools.bbclass7
-rw-r--r--meta/classes/setuptools3.bbclass4
-rw-r--r--meta/classes/sign_ipk.bbclass12
-rw-r--r--meta/classes/sign_package_feed.bbclass9
-rw-r--r--meta/classes/sign_rpm.bbclass44
-rw-r--r--meta/classes/siteconfig.bbclass18
-rw-r--r--meta/classes/siteinfo.bbclass73
-rw-r--r--meta/classes/spdx.bbclass53
-rw-r--r--meta/classes/sstate.bbclass691
-rw-r--r--meta/classes/staging.bbclass637
-rw-r--r--meta/classes/syslinux.bbclass51
-rw-r--r--meta/classes/systemd-boot-cfg.bbclass71
-rw-r--r--meta/classes/systemd-boot.bbclass103
-rw-r--r--meta/classes/systemd.bbclass115
-rw-r--r--meta/classes/terminal.bbclass26
-rw-r--r--meta/classes/testexport.bbclass238
-rw-r--r--meta/classes/testimage-auto.bbclass23
-rw-r--r--meta/classes/testimage.bbclass405
-rw-r--r--meta/classes/testsdk.bbclass158
-rw-r--r--meta/classes/texinfo.bbclass11
-rw-r--r--meta/classes/tinderclient.bbclass368
-rw-r--r--meta/classes/toaster.bbclass76
-rw-r--r--meta/classes/toolchain-scripts.bbclass66
-rw-r--r--meta/classes/typecheck.bbclass2
-rw-r--r--meta/classes/uboot-config.bbclass29
-rw-r--r--meta/classes/uboot-extlinux-config.bbclass157
-rw-r--r--meta/classes/uboot-sign.bbclass126
-rw-r--r--meta/classes/uninative.bbclass92
-rw-r--r--meta/classes/update-alternatives.bbclass186
-rw-r--r--meta/classes/update-rc.d.bbclass74
-rw-r--r--meta/classes/upstream-version-is-even.bbclass2
-rw-r--r--meta/classes/useradd-staticids.bbclass236
-rw-r--r--meta/classes/useradd.bbclass123
-rw-r--r--meta/classes/useradd_base.bbclass22
-rw-r--r--meta/classes/utility-tasks.bbclass27
-rw-r--r--meta/classes/utils.bbclass144
-rw-r--r--meta/classes/waf.bbclass75
-rw-r--r--meta/classes/xmlcatalog.bbclass26
-rw-r--r--meta/conf/abi_version.conf2
-rw-r--r--meta/conf/bitbake.conf295
-rw-r--r--meta/conf/ccache.conf2
-rw-r--r--meta/conf/conf-notes.txt12
-rw-r--r--meta/conf/distro/defaultsetup.conf10
-rw-r--r--meta/conf/distro/include/as-needed.inc14
-rw-r--r--meta/conf/distro/include/default-distrovars.inc27
-rw-r--r--meta/conf/distro/include/default-providers.inc14
-rw-r--r--meta/conf/distro/include/default-versions.inc6
-rw-r--r--meta/conf/distro/include/distro_alias.inc68
-rw-r--r--meta/conf/distro/include/init-manager-mdev-busybox.inc7
-rw-r--r--meta/conf/distro/include/init-manager-none.inc3
-rw-r--r--meta/conf/distro/include/init-manager-systemd.inc6
-rw-r--r--meta/conf/distro/include/init-manager-sysvinit.inc6
-rw-r--r--meta/conf/distro/include/maintainers.inc774
-rw-r--r--meta/conf/distro/include/no-static-libs.inc14
-rw-r--r--meta/conf/distro/include/ptest-packagelists.inc81
-rw-r--r--meta/conf/distro/include/security_flags.inc124
-rw-r--r--meta/conf/distro/include/tclibc-baremetal.inc13
-rw-r--r--meta/conf/distro/include/tclibc-glibc.inc23
-rw-r--r--meta/conf/distro/include/tclibc-musl.inc12
-rw-r--r--meta/conf/distro/include/tclibc-newlib.inc48
-rw-r--r--meta/conf/distro/include/tcmode-default.inc50
-rw-r--r--meta/conf/distro/include/uninative-flags.inc7
-rw-r--r--meta/conf/distro/include/upstream_tracking.inc24
-rw-r--r--meta/conf/distro/include/world-broken.inc56
-rw-r--r--meta/conf/distro/include/yocto-uninative.inc9
-rw-r--r--meta/conf/documentation.conf22
-rw-r--r--meta/conf/image-uefi.conf16
-rw-r--r--meta/conf/layer.conf47
-rw-r--r--meta/conf/licenses.conf52
-rw-r--r--meta/conf/local.conf.sample41
-rw-r--r--meta/conf/local.conf.sample.extended62
-rw-r--r--meta/conf/machine-sdk/aarch64.conf2
-rw-r--r--meta/conf/machine-sdk/i586.conf1
-rw-r--r--meta/conf/machine-sdk/i686.conf1
-rw-r--r--meta/conf/machine-sdk/x86_64.conf1
-rw-r--r--meta/conf/machine/include/arm/arch-arm.inc2
-rw-r--r--meta/conf/machine/include/arm/arch-arm64.inc6
-rw-r--r--meta/conf/machine/include/arm/arch-armv4.inc2
-rw-r--r--meta/conf/machine/include/arm/arch-armv5-dsp.inc32
-rw-r--r--meta/conf/machine/include/arm/arch-armv5.inc24
-rw-r--r--meta/conf/machine/include/arm/arch-armv6.inc32
-rw-r--r--meta/conf/machine/include/arm/arch-armv7a.inc137
-rw-r--r--meta/conf/machine/include/arm/arch-armv7ve.inc136
-rw-r--r--meta/conf/machine/include/arm/arch-armv8.inc1
-rw-r--r--meta/conf/machine/include/arm/arch-armv8a.inc30
-rw-r--r--meta/conf/machine/include/arm/feature-arm-neon.inc3
-rw-r--r--meta/conf/machine/include/arm/feature-arm-thumb.inc28
-rw-r--r--meta/conf/machine/include/arm/feature-arm-vfp.inc11
-rw-r--r--meta/conf/machine/include/m68k/arch-m68k.inc8
-rw-r--r--meta/conf/machine/include/microblaze/arch-microblaze.inc53
-rw-r--r--meta/conf/machine/include/microblaze/feature-microblaze-math.inc33
-rw-r--r--meta/conf/machine/include/microblaze/feature-microblaze-versions.inc67
-rw-r--r--meta/conf/machine/include/mips/README22
-rw-r--r--meta/conf/machine/include/mips/arch-mips.inc26
-rw-r--r--meta/conf/machine/include/mips/feature-mips-mips16e.inc6
-rw-r--r--meta/conf/machine/include/mips/tune-mips-74k.inc37
-rw-r--r--meta/conf/machine/include/powerpc/arch-powerpc.inc22
-rw-r--r--meta/conf/machine/include/powerpc/arch-powerpc64.inc13
-rw-r--r--meta/conf/machine/include/qemu.inc11
-rw-r--r--meta/conf/machine/include/qemuboot-mips.inc5
-rw-r--r--meta/conf/machine/include/qemuboot-x86.inc15
-rw-r--r--meta/conf/machine/include/riscv/arch-riscv.inc15
-rw-r--r--meta/conf/machine/include/riscv/qemuriscv.inc38
-rw-r--r--meta/conf/machine/include/riscv/tune-riscv.inc19
-rw-r--r--meta/conf/machine/include/tune-arm1136jf-s.inc11
-rw-r--r--meta/conf/machine/include/tune-arm1176jz-s.inc17
-rw-r--r--meta/conf/machine/include/tune-arm920t.inc4
-rw-r--r--meta/conf/machine/include/tune-arm926ejs.inc4
-rw-r--r--meta/conf/machine/include/tune-arm9tdmi.inc4
-rw-r--r--meta/conf/machine/include/tune-core2.inc10
-rw-r--r--meta/conf/machine/include/tune-corei7.inc11
-rw-r--r--meta/conf/machine/include/tune-cortexa15.inc41
-rw-r--r--meta/conf/machine/include/tune-cortexa17.inc41
-rw-r--r--meta/conf/machine/include/tune-cortexa32.inc18
-rw-r--r--meta/conf/machine/include/tune-cortexa35.inc17
-rw-r--r--meta/conf/machine/include/tune-cortexa5.inc45
-rw-r--r--meta/conf/machine/include/tune-cortexa53.inc17
-rw-r--r--meta/conf/machine/include/tune-cortexa57-cortexa53.inc18
-rw-r--r--meta/conf/machine/include/tune-cortexa7.inc41
-rw-r--r--meta/conf/machine/include/tune-cortexa72.inc13
-rw-r--r--meta/conf/machine/include/tune-cortexa8.inc29
-rw-r--r--meta/conf/machine/include/tune-cortexa9.inc42
-rw-r--r--meta/conf/machine/include/tune-ep9312.inc3
-rw-r--r--meta/conf/machine/include/tune-i686.inc27
-rw-r--r--meta/conf/machine/include/tune-iwmmxt.inc3
-rw-r--r--meta/conf/machine/include/tune-mcf5441x.inc13
-rw-r--r--meta/conf/machine/include/tune-microblaze.inc8
-rw-r--r--meta/conf/machine/include/tune-mips32.inc6
-rw-r--r--meta/conf/machine/include/tune-mips32r2.inc4
-rw-r--r--meta/conf/machine/include/tune-mips32r6.inc29
-rw-r--r--meta/conf/machine/include/tune-mips64r6.inc58
-rw-r--r--meta/conf/machine/include/tune-power5.inc9
-rw-r--r--meta/conf/machine/include/tune-power6.inc9
-rw-r--r--meta/conf/machine/include/tune-power7.inc9
-rw-r--r--meta/conf/machine/include/tune-ppc476.inc2
-rw-r--r--meta/conf/machine/include/tune-ppc603e.inc2
-rw-r--r--meta/conf/machine/include/tune-ppc7400.inc2
-rw-r--r--meta/conf/machine/include/tune-ppce300c2.inc2
-rw-r--r--meta/conf/machine/include/tune-ppce500.inc4
-rw-r--r--meta/conf/machine/include/tune-ppce500mc.inc2
-rw-r--r--meta/conf/machine/include/tune-ppce500v2.inc4
-rw-r--r--meta/conf/machine/include/tune-ppce5500.inc4
-rw-r--r--meta/conf/machine/include/tune-ppce6500.inc4
-rw-r--r--meta/conf/machine/include/tune-strongarm1100.inc3
-rw-r--r--meta/conf/machine/include/tune-thunderx.inc8
-rw-r--r--meta/conf/machine/include/tune-xscale.inc7
-rw-r--r--meta/conf/machine/include/x86-base.inc12
-rw-r--r--meta/conf/machine/include/x86/arch-x86.inc1
-rw-r--r--meta/conf/machine/qemuarm.conf34
-rw-r--r--meta/conf/machine/qemuarm64.conf27
-rw-r--r--meta/conf/machine/qemuarmv5.conf23
-rw-r--r--meta/conf/machine/qemumips.conf8
-rw-r--r--meta/conf/machine/qemumips64.conf12
-rw-r--r--meta/conf/machine/qemuppc.conf11
-rw-r--r--meta/conf/machine/qemuriscv64.conf9
-rw-r--r--meta/conf/machine/qemux86-64.conf31
-rw-r--r--meta/conf/machine/qemux86.conf29
-rw-r--r--meta/conf/multiconfig/default.conf (renamed from scripts/lib/wic/imager/__init__.py)0
-rw-r--r--meta/conf/multilib.conf17
-rw-r--r--meta/conf/sanity.conf2
-rw-r--r--meta/conf/site.conf.sample4
-rw-r--r--meta/conf/toasterconf.json77
-rw-r--r--meta/files/common-licenses/Apache-2.0-with-LLVM-exception219
-rw-r--r--meta/files/common-licenses/BSD-1-Clause9
-rw-r--r--meta/files/common-licenses/BSD-2-Clause11
-rw-r--r--meta/files/common-licenses/CC-BY-SA-4.0428
-rw-r--r--meta/files/common-licenses/EPL-2.0277
-rw-r--r--meta/files/common-licenses/Elfutils-Exception12
-rw-r--r--meta/files/common-licenses/FreeType4
-rw-r--r--meta/files/common-licenses/Intel105
-rw-r--r--meta/files/common-licenses/Libpng200
-rw-r--r--meta/files/common-licenses/pkgconf10
-rw-r--r--meta/files/common-licenses/vim81
-rw-r--r--meta/files/deploydir_readme.txt8
-rw-r--r--meta/files/ext-sdk-prepare.py4
-rw-r--r--meta/files/fs-perms-persistent-log.txt66
-rw-r--r--meta/files/fs-perms.txt5
-rw-r--r--meta/files/ptest-perl/run-ptest16
-rw-r--r--meta/files/toolchain-shar-extract.sh59
-rw-r--r--meta/lib/bblayers/create.py77
-rw-r--r--meta/lib/bblayers/templates/README41
-rw-r--r--meta/lib/bblayers/templates/example.bb11
-rw-r--r--meta/lib/bblayers/templates/layer.conf13
-rw-r--r--meta/lib/buildstats.py161
-rw-r--r--meta/lib/oe/__init__.py4
-rw-r--r--meta/lib/oe/buildhistory_analysis.py312
-rw-r--r--meta/lib/oe/cachedpath.py2
-rw-r--r--meta/lib/oe/classextend.py20
-rw-r--r--meta/lib/oe/classutils.py5
-rw-r--r--meta/lib/oe/copy_buildsystem.py83
-rw-r--r--meta/lib/oe/data.py38
-rw-r--r--meta/lib/oe/distro_check.py313
-rw-r--r--meta/lib/oe/elf.py133
-rw-r--r--meta/lib/oe/gpg_sign.py89
-rw-r--r--meta/lib/oe/license.py30
-rw-r--r--meta/lib/oe/lsb.py91
-rw-r--r--meta/lib/oe/maketype.py12
-rw-r--r--meta/lib/oe/manifest.py36
-rw-r--r--meta/lib/oe/package.py230
-rw-r--r--meta/lib/oe/package_manager.py2077
-rw-r--r--meta/lib/oe/packagedata.py11
-rw-r--r--meta/lib/oe/packagegroup.py14
-rw-r--r--meta/lib/oe/patch.py163
-rw-r--r--meta/lib/oe/path.py120
-rw-r--r--meta/lib/oe/prservice.py29
-rw-r--r--meta/lib/oe/qa.py111
-rw-r--r--meta/lib/oe/recipeutils.py453
-rw-r--r--meta/lib/oe/rootfs.py330
-rw-r--r--meta/lib/oe/sdk.py193
-rw-r--r--meta/lib/oe/sstatesig.py373
-rw-r--r--meta/lib/oe/terminal.py104
-rw-r--r--meta/lib/oe/tests/test_license.py68
-rw-r--r--meta/lib/oe/tests/test_path.py89
-rw-r--r--meta/lib/oe/tests/test_types.py62
-rw-r--r--meta/lib/oe/tests/test_utils.py51
-rw-r--r--meta/lib/oe/types.py37
-rw-r--r--meta/lib/oe/useradd.py71
-rw-r--r--meta/lib/oe/utils.py315
-rw-r--r--meta/lib/oeqa/buildperf/__init__.py8
-rw-r--r--meta/lib/oeqa/buildperf/base.py422
-rw-r--r--meta/lib/oeqa/buildperf/test_basic.py63
-rw-r--r--meta/lib/oeqa/controllers/__init__.py3
-rw-r--r--meta/lib/oeqa/controllers/masterimage.py64
-rw-r--r--meta/lib/oeqa/controllers/testtargetloader.py6
-rw-r--r--meta/lib/oeqa/core/README76
-rw-r--r--meta/lib/oeqa/core/__init__.py (renamed from scripts/lib/wic/utils/__init__.py)0
-rw-r--r--meta/lib/oeqa/core/case.py100
-rw-r--r--meta/lib/oeqa/core/cases/__init__.py0
-rw-r--r--meta/lib/oeqa/core/cases/example/data.json1
-rw-r--r--meta/lib/oeqa/core/cases/example/test_basic.py22
-rw-r--r--meta/lib/oeqa/core/context.py212
-rw-r--r--meta/lib/oeqa/core/decorator/__init__.py79
-rw-r--r--meta/lib/oeqa/core/decorator/data.py222
-rw-r--r--meta/lib/oeqa/core/decorator/depends.py98
-rw-r--r--meta/lib/oeqa/core/decorator/oetimeout.py28
-rw-r--r--meta/lib/oeqa/core/exception.py26
-rw-r--r--meta/lib/oeqa/core/loader.py342
-rw-r--r--meta/lib/oeqa/core/runner.py328
-rw-r--r--meta/lib/oeqa/core/target/__init__.py36
-rw-r--r--meta/lib/oeqa/core/target/qemu.py64
-rw-r--r--meta/lib/oeqa/core/target/ssh.py271
-rw-r--r--meta/lib/oeqa/core/tests/__init__.py0
-rw-r--r--meta/lib/oeqa/core/tests/cases/data.py23
-rw-r--r--meta/lib/oeqa/core/tests/cases/depends.py41
-rw-r--r--meta/lib/oeqa/core/tests/cases/loader/valid/another.py12
-rw-r--r--meta/lib/oeqa/core/tests/cases/oetag.py38
-rw-r--r--meta/lib/oeqa/core/tests/cases/timeout.py21
-rw-r--r--meta/lib/oeqa/core/tests/common.py38
-rwxr-xr-xmeta/lib/oeqa/core/tests/test_data.py55
-rwxr-xr-xmeta/lib/oeqa/core/tests/test_decorators.py137
-rwxr-xr-xmeta/lib/oeqa/core/tests/test_loader.py63
-rwxr-xr-xmeta/lib/oeqa/core/tests/test_runner.py40
-rw-r--r--meta/lib/oeqa/core/utils/__init__.py0
-rw-r--r--meta/lib/oeqa/core/utils/concurrencytest.py354
-rw-r--r--meta/lib/oeqa/core/utils/misc.py47
-rw-r--r--meta/lib/oeqa/core/utils/path.py22
-rw-r--r--meta/lib/oeqa/core/utils/test.py89
-rw-r--r--meta/lib/oeqa/files/test.c (renamed from meta/lib/oeqa/runtime/files/test.c)0
-rw-r--r--meta/lib/oeqa/files/test.cpp (renamed from meta/lib/oeqa/runtime/files/test.cpp)0
-rw-r--r--meta/lib/oeqa/files/testresults/testresults.json40
-rw-r--r--meta/lib/oeqa/manual/abat.patch64
-rw-r--r--meta/lib/oeqa/manual/bsp-hw.json1000
-rw-r--r--meta/lib/oeqa/manual/build-appliance.json96
-rw-r--r--meta/lib/oeqa/manual/crops.json294
-rw-r--r--meta/lib/oeqa/manual/eclipse-plugin.json322
-rw-r--r--meta/lib/oeqa/manual/kernel-dev.json200
-rw-r--r--meta/lib/oeqa/manual/oe-core.json158
-rw-r--r--meta/lib/oeqa/manual/sdk.json32
-rw-r--r--meta/lib/oeqa/manual/toaster-managed-mode.json2572
-rw-r--r--meta/lib/oeqa/manual/toaster-unmanaged-mode.json1170
-rw-r--r--meta/lib/oeqa/oetest.py170
-rwxr-xr-xmeta/lib/oeqa/runexported.py14
-rw-r--r--meta/lib/oeqa/runtime/_ptest.py125
-rw-r--r--meta/lib/oeqa/runtime/_qemutiny.py9
-rw-r--r--meta/lib/oeqa/runtime/buildcvs.py31
-rw-r--r--meta/lib/oeqa/runtime/buildgalculator.py23
-rw-r--r--meta/lib/oeqa/runtime/buildiptables.py31
-rw-r--r--meta/lib/oeqa/runtime/case.py20
-rw-r--r--meta/lib/oeqa/runtime/cases/_qemutiny.py12
-rw-r--r--meta/lib/oeqa/runtime/cases/apt.py53
-rw-r--r--meta/lib/oeqa/runtime/cases/boot.py33
-rw-r--r--meta/lib/oeqa/runtime/cases/buildcpio.py32
-rw-r--r--meta/lib/oeqa/runtime/cases/buildgalculator.py32
-rw-r--r--meta/lib/oeqa/runtime/cases/buildlzip.py34
-rw-r--r--meta/lib/oeqa/runtime/cases/connman.py31
-rw-r--r--meta/lib/oeqa/runtime/cases/date.py42
-rw-r--r--meta/lib/oeqa/runtime/cases/df.py17
-rw-r--r--meta/lib/oeqa/runtime/cases/dnf.py191
-rw-r--r--meta/lib/oeqa/runtime/cases/gcc.py69
-rw-r--r--meta/lib/oeqa/runtime/cases/gi.py19
-rw-r--r--meta/lib/oeqa/runtime/cases/gstreamer.py18
-rw-r--r--meta/lib/oeqa/runtime/cases/kernelmodule.py46
-rw-r--r--meta/lib/oeqa/runtime/cases/ksample.py231
-rw-r--r--meta/lib/oeqa/runtime/cases/ldd.py26
-rw-r--r--meta/lib/oeqa/runtime/cases/logrotate.py49
-rw-r--r--meta/lib/oeqa/runtime/cases/ltp.py118
-rw-r--r--meta/lib/oeqa/runtime/cases/ltp_compliance.py97
-rw-r--r--meta/lib/oeqa/runtime/cases/ltp_stress.py98
-rw-r--r--meta/lib/oeqa/runtime/cases/multilib.py44
-rw-r--r--meta/lib/oeqa/runtime/cases/oe_syslog.py131
-rw-r--r--meta/lib/oeqa/runtime/cases/opkg.py58
-rw-r--r--meta/lib/oeqa/runtime/cases/pam.py35
-rw-r--r--meta/lib/oeqa/runtime/cases/parselogs.py379
-rw-r--r--meta/lib/oeqa/runtime/cases/perl.py17
-rw-r--r--meta/lib/oeqa/runtime/cases/ping.py26
-rw-r--r--meta/lib/oeqa/runtime/cases/ptest.py84
-rw-r--r--meta/lib/oeqa/runtime/cases/python.py19
-rw-r--r--meta/lib/oeqa/runtime/cases/rpm.py153
-rw-r--r--meta/lib/oeqa/runtime/cases/scons.py37
-rw-r--r--meta/lib/oeqa/runtime/cases/scp.py37
-rw-r--r--meta/lib/oeqa/runtime/cases/skeletoninit.py35
-rw-r--r--meta/lib/oeqa/runtime/cases/ssh.py19
-rw-r--r--meta/lib/oeqa/runtime/cases/stap.py37
-rw-r--r--meta/lib/oeqa/runtime/cases/storage.py149
-rw-r--r--meta/lib/oeqa/runtime/cases/systemd.py194
-rw-r--r--meta/lib/oeqa/runtime/cases/x32lib.py21
-rw-r--r--meta/lib/oeqa/runtime/cases/xorg.py21
-rw-r--r--meta/lib/oeqa/runtime/connman.py31
-rw-r--r--meta/lib/oeqa/runtime/context.py226
-rw-r--r--meta/lib/oeqa/runtime/date.py31
-rw-r--r--meta/lib/oeqa/runtime/decorator/package.py56
-rw-r--r--meta/lib/oeqa/runtime/df.py12
-rw-r--r--meta/lib/oeqa/runtime/files/SConstruct1
-rw-r--r--meta/lib/oeqa/runtime/files/hello.c5
-rw-r--r--meta/lib/oeqa/runtime/files/hello.stp1
-rw-r--r--meta/lib/oeqa/runtime/files/test.pl2
-rw-r--r--meta/lib/oeqa/runtime/files/test.py6
-rw-r--r--meta/lib/oeqa/runtime/gcc.py47
-rw-r--r--meta/lib/oeqa/runtime/kernelmodule.py34
-rw-r--r--meta/lib/oeqa/runtime/ldd.py21
-rw-r--r--meta/lib/oeqa/runtime/loader.py19
-rw-r--r--meta/lib/oeqa/runtime/logrotate.py28
-rw-r--r--meta/lib/oeqa/runtime/multilib.py42
-rw-r--r--meta/lib/oeqa/runtime/pam.py25
-rw-r--r--meta/lib/oeqa/runtime/parselogs.py313
-rw-r--r--meta/lib/oeqa/runtime/perl.py30
-rw-r--r--meta/lib/oeqa/runtime/ping.py22
-rw-r--r--meta/lib/oeqa/runtime/python.py35
-rw-r--r--meta/lib/oeqa/runtime/rpm.py120
-rw-r--r--meta/lib/oeqa/runtime/scanelf.py28
-rw-r--r--meta/lib/oeqa/runtime/scp.py22
-rw-r--r--meta/lib/oeqa/runtime/skeletoninit.py29
-rw-r--r--meta/lib/oeqa/runtime/smart.py218
-rw-r--r--meta/lib/oeqa/runtime/ssh.py19
-rw-r--r--meta/lib/oeqa/runtime/syslog.py52
-rw-r--r--meta/lib/oeqa/runtime/systemd.py178
-rw-r--r--meta/lib/oeqa/runtime/utils/__init__.py0
-rw-r--r--meta/lib/oeqa/runtime/utils/targetbuildproject.py44
-rw-r--r--meta/lib/oeqa/runtime/x32lib.py18
-rw-r--r--meta/lib/oeqa/runtime/xorg.py16
-rw-r--r--meta/lib/oeqa/sdk/__init__.py3
-rw-r--r--meta/lib/oeqa/sdk/buildcvs.py25
-rw-r--r--meta/lib/oeqa/sdk/buildgalculator.py27
-rw-r--r--meta/lib/oeqa/sdk/buildiptables.py26
-rw-r--r--meta/lib/oeqa/sdk/case.py54
-rw-r--r--meta/lib/oeqa/sdk/cases/assimp.py40
-rw-r--r--meta/lib/oeqa/sdk/cases/buildcpio.py35
-rw-r--r--meta/lib/oeqa/sdk/cases/buildepoxy.py41
-rw-r--r--meta/lib/oeqa/sdk/cases/buildgalculator.py43
-rw-r--r--meta/lib/oeqa/sdk/cases/buildlzip.py37
-rw-r--r--meta/lib/oeqa/sdk/cases/gcc.py50
-rw-r--r--meta/lib/oeqa/sdk/cases/perl.py20
-rw-r--r--meta/lib/oeqa/sdk/cases/python.py31
-rw-r--r--meta/lib/oeqa/sdk/context.py153
-rw-r--r--meta/lib/oeqa/sdk/files/testsdkmakefile (renamed from meta/lib/oeqa/runtime/files/testsdkmakefile)0
-rw-r--r--meta/lib/oeqa/sdk/gcc.py36
-rw-r--r--meta/lib/oeqa/sdk/perl.py28
-rw-r--r--meta/lib/oeqa/sdk/python.py32
-rw-r--r--meta/lib/oeqa/sdk/testsdk.py145
-rw-r--r--meta/lib/oeqa/sdk/utils/__init__.py0
-rw-r--r--meta/lib/oeqa/sdk/utils/sdkbuildproject.py53
-rw-r--r--meta/lib/oeqa/sdkext/__init__.py3
-rw-r--r--meta/lib/oeqa/sdkext/case.py24
-rw-r--r--meta/lib/oeqa/sdkext/cases/devtool.py120
-rw-r--r--meta/lib/oeqa/sdkext/context.py32
-rw-r--r--meta/lib/oeqa/sdkext/devtool.py108
-rw-r--r--meta/lib/oeqa/sdkext/sdk_update.py36
-rw-r--r--meta/lib/oeqa/sdkext/testsdk.py107
-rw-r--r--meta/lib/oeqa/selftest/__init__.py2
-rw-r--r--meta/lib/oeqa/selftest/_toaster.py320
-rw-r--r--meta/lib/oeqa/selftest/archiver.py50
-rw-r--r--meta/lib/oeqa/selftest/base.py235
-rw-r--r--meta/lib/oeqa/selftest/bblayers.py104
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py277
-rw-r--r--meta/lib/oeqa/selftest/buildhistory.py46
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py216
-rw-r--r--meta/lib/oeqa/selftest/case.py290
-rw-r--r--meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py (renamed from meta/lib/oeqa/selftest/_sstatetests_noauto.py)11
-rw-r--r--meta/lib/oeqa/selftest/cases/archiver.py197
-rw-r--r--meta/lib/oeqa/selftest/cases/bblayers.py118
-rw-r--r--meta/lib/oeqa/selftest/cases/bbtests.py299
-rw-r--r--meta/lib/oeqa/selftest/cases/binutils.py50
-rw-r--r--meta/lib/oeqa/selftest/cases/buildhistory.py50
-rw-r--r--meta/lib/oeqa/selftest/cases/buildoptions.py198
-rw-r--r--meta/lib/oeqa/selftest/cases/containerimage.py88
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py1779
-rw-r--r--meta/lib/oeqa/selftest/cases/distrodata.py89
-rw-r--r--meta/lib/oeqa/selftest/cases/eSDK.py120
-rw-r--r--meta/lib/oeqa/selftest/cases/efibootpartition.py46
-rw-r--r--meta/lib/oeqa/selftest/cases/fetch.py51
-rw-r--r--meta/lib/oeqa/selftest/cases/gcc.py152
-rw-r--r--meta/lib/oeqa/selftest/cases/glibc.py89
-rw-r--r--meta/lib/oeqa/selftest/cases/gotoolchain.py71
-rw-r--r--meta/lib/oeqa/selftest/cases/image_typedep.py58
-rw-r--r--meta/lib/oeqa/selftest/cases/imagefeatures.py264
-rw-r--r--meta/lib/oeqa/selftest/cases/incompatible_lic.py135
-rw-r--r--meta/lib/oeqa/selftest/cases/kerneldevelopment.py67
-rw-r--r--meta/lib/oeqa/selftest/cases/layerappend.py (renamed from meta/lib/oeqa/selftest/layerappend.py)22
-rw-r--r--meta/lib/oeqa/selftest/cases/liboe.py (renamed from meta/lib/oeqa/selftest/liboe.py)33
-rw-r--r--meta/lib/oeqa/selftest/cases/lic_checksum.py38
-rw-r--r--meta/lib/oeqa/selftest/cases/manifest.py (renamed from meta/lib/oeqa/selftest/manifest.py)61
-rw-r--r--meta/lib/oeqa/selftest/cases/meta_ide.py51
-rw-r--r--meta/lib/oeqa/selftest/cases/multiconfig.py72
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/__init__.py0
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/buildhistory.py99
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/elf.py26
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/license.py103
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/path.py89
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/types.py54
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/utils.py103
-rw-r--r--meta/lib/oeqa/selftest/cases/oescripts.py188
-rw-r--r--meta/lib/oeqa/selftest/cases/package.py150
-rw-r--r--meta/lib/oeqa/selftest/cases/pkgdata.py (renamed from meta/lib/oeqa/selftest/pkgdata.py)76
-rw-r--r--meta/lib/oeqa/selftest/cases/prservice.py (renamed from meta/lib/oeqa/selftest/prservice.py)39
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py (renamed from meta/lib/oeqa/selftest/recipetool.py)210
-rw-r--r--meta/lib/oeqa/selftest/cases/recipeutils.py140
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py202
-rw-r--r--meta/lib/oeqa/selftest/cases/resulttooltests.py98
-rw-r--r--meta/lib/oeqa/selftest/cases/runcmd.py121
-rw-r--r--meta/lib/oeqa/selftest/cases/runqemu.py211
-rw-r--r--meta/lib/oeqa/selftest/cases/runtime_test.py439
-rw-r--r--meta/lib/oeqa/selftest/cases/selftest.py53
-rw-r--r--meta/lib/oeqa/selftest/cases/signing.py224
-rw-r--r--meta/lib/oeqa/selftest/cases/sstate.py67
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py532
-rw-r--r--meta/lib/oeqa/selftest/cases/tinfoil.py224
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py1051
-rw-r--r--meta/lib/oeqa/selftest/context.py341
-rw-r--r--meta/lib/oeqa/selftest/devtool.py1348
-rw-r--r--meta/lib/oeqa/selftest/eSDK.py103
-rw-r--r--meta/lib/oeqa/selftest/imagefeatures.py127
-rw-r--r--meta/lib/oeqa/selftest/lic-checksum.py35
-rw-r--r--meta/lib/oeqa/selftest/oescripts.py54
-rw-r--r--meta/lib/oeqa/selftest/runtime-test.py105
-rw-r--r--meta/lib/oeqa/selftest/signing.py178
-rw-r--r--meta/lib/oeqa/selftest/sstate.py53
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py469
-rw-r--r--meta/lib/oeqa/selftest/wic.py286
-rw-r--r--meta/lib/oeqa/targetcontrol.py133
-rw-r--r--meta/lib/oeqa/utils/__init__.py70
-rw-r--r--meta/lib/oeqa/utils/buildproject.py63
-rw-r--r--meta/lib/oeqa/utils/commands.py201
-rw-r--r--meta/lib/oeqa/utils/decorators.py11
-rw-r--r--meta/lib/oeqa/utils/dump.py22
-rw-r--r--meta/lib/oeqa/utils/ftools.py4
-rw-r--r--meta/lib/oeqa/utils/git.py24
-rw-r--r--meta/lib/oeqa/utils/gitarchive.py237
-rw-r--r--meta/lib/oeqa/utils/httpserver.py43
-rw-r--r--meta/lib/oeqa/utils/logparser.py249
-rw-r--r--meta/lib/oeqa/utils/metadata.py124
-rw-r--r--meta/lib/oeqa/utils/network.py8
-rw-r--r--meta/lib/oeqa/utils/nfs.py39
-rw-r--r--meta/lib/oeqa/utils/package_manager.py200
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py461
-rw-r--r--meta/lib/oeqa/utils/qemutinyrunner.py20
-rw-r--r--meta/lib/oeqa/utils/sshcontrol.py38
-rw-r--r--meta/lib/oeqa/utils/subprocesstweak.py22
-rw-r--r--meta/lib/oeqa/utils/targetbuild.py33
-rw-r--r--meta/lib/oeqa/utils/testexport.py18
-rw-r--r--meta/lib/rootfspostcommands.py60
-rw-r--r--meta/recipes-bsp/acpid/acpid.inc8
-rw-r--r--meta/recipes-bsp/acpid/acpid_2.0.27.bb7
-rw-r--r--meta/recipes-bsp/acpid/acpid_2.0.32.bb7
-rw-r--r--meta/recipes-bsp/alsa-state/alsa-state.bb1
-rw-r--r--meta/recipes-bsp/apmd/apmd/legacy.patch2
-rw-r--r--meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb39
-rw-r--r--meta/recipes-bsp/eee-acpi-scripts/files/policy-funcs8
-rw-r--r--meta/recipes-bsp/eee-acpi-scripts/files/powerbtn.patch22
-rw-r--r--meta/recipes-bsp/eee-acpi-scripts/files/remove-doc-check.patch60
-rw-r--r--meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch31
-rw-r--r--meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch83
-rw-r--r--meta/recipes-bsp/efibootmgr/efibootmgr_17.bb35
-rw-r--r--meta/recipes-bsp/efivar/efivar/no-werror.patch18
-rw-r--r--meta/recipes-bsp/efivar/efivar_37.bb40
-rw-r--r--meta/recipes-bsp/formfactor/formfactor_0.0.bb6
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi/aarch64-initplat.c-fix-const-qualifier.patch35
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch21
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch24
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch14
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch48
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi_3.0.11.bb71
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb54
-rw-r--r--meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch (renamed from meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch)13
-rw-r--r--meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch53
-rw-r--r--meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch81
-rw-r--r--meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch39
-rw-r--r--meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch (renamed from meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch)16
-rw-r--r--meta/recipes-bsp/grub/files/0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch33
-rw-r--r--meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch (renamed from meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch)15
-rw-r--r--meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch33
-rw-r--r--meta/recipes-bsp/grub/files/fix-endianness-problem.patch44
-rw-r--r--meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch21
-rw-r--r--meta/recipes-bsp/grub/files/fix-texinfo.patch32
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch53
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch27
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch24
-rw-r--r--meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch131
-rw-r--r--meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch32
-rw-r--r--meta/recipes-bsp/grub/files/grub-install.in.patch20
-rw-r--r--meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch20
-rw-r--r--meta/recipes-bsp/grub/files/grub-no-unused-result.patch19
-rw-r--r--meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch48
-rw-r--r--meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch44
-rw-r--r--meta/recipes-bsp/grub/files/remove-gets.patch20
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/autohell.patch21
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch101
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch74
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch31
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch40
-rw-r--r--meta/recipes-bsp/grub/grub-bootconf_1.00.bb32
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.00.bb69
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.04.bb109
-rw-r--r--meta/recipes-bsp/grub/grub2.inc80
-rw-r--r--meta/recipes-bsp/grub/grub_0.97.bb35
-rw-r--r--meta/recipes-bsp/grub/grub_2.00.bb20
-rw-r--r--meta/recipes-bsp/grub/grub_2.04.bb33
-rw-r--r--meta/recipes-bsp/grub/grub_git.bb46
-rw-r--r--meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch74
-rw-r--r--meta/recipes-bsp/gummiboot/gummiboot/fix-objcopy.patch45
-rw-r--r--meta/recipes-bsp/gummiboot/gummiboot_git.bb37
-rw-r--r--meta/recipes-bsp/hostap/files/COPYING.patch346
-rw-r--r--meta/recipes-bsp/hostap/files/hostap-fw-load.patch22
-rw-r--r--meta/recipes-bsp/hostap/files/hostap_cs.conf193
-rw-r--r--meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream191
-rw-r--r--meta/recipes-bsp/hostap/files/hostap_cs.modalias28
-rw-r--r--meta/recipes-bsp/hostap/hostap-conf_1.0.bb23
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch36
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch27
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils.inc28
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb5
-rw-r--r--meta/recipes-bsp/keymaps/keymaps_1.0.bb2
-rw-r--r--meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch30
-rw-r--r--meta/recipes-bsp/libacpi/libacpi_0.2.bb2
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/acdefine.patch19
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch5749
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/cve-2018-10195.patch28
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/gettext.patch21884
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/include.patch25
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch49
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb6
-rw-r--r--meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch38
-rw-r--r--meta/recipes-bsp/opensbi/opensbi-payloads.inc39
-rw-r--r--meta/recipes-bsp/opensbi/opensbi_0.5.bb53
-rw-r--r--meta/recipes-bsp/pciutils/pciutils/configure.patch81
-rw-r--r--meta/recipes-bsp/pciutils/pciutils/guess-fix.patch37
-rw-r--r--meta/recipes-bsp/pciutils/pciutils/makefile.patch26
-rw-r--r--meta/recipes-bsp/pciutils/pciutils_3.5.1.bb60
-rw-r--r--meta/recipes-bsp/pciutils/pciutils_3.6.2.bb60
-rw-r--r--meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch21
-rw-r--r--meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_fix.patch101
-rw-r--r--meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch43
-rw-r--r--meta/recipes-bsp/pcmciautils/pcmciautils.inc32
-rw-r--r--meta/recipes-bsp/pcmciautils/pcmciautils_018.bb11
-rw-r--r--meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb4
-rw-r--r--meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch61
-rw-r--r--meta/recipes-bsp/systemd-boot/systemd-boot.bb38
-rw-r--r--meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch31
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-common.inc23
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb46
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb36
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb32
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb67
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc117
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2016.03.bb10
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2020.01.bb4
-rw-r--r--meta/recipes-bsp/usbinit/usbinit.bb4
-rw-r--r--meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch28
-rw-r--r--meta/recipes-bsp/usbutils/usbutils/iconv.patch41
-rw-r--r--meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch30
-rw-r--r--meta/recipes-bsp/usbutils/usbutils_008.bb25
-rw-r--r--meta/recipes-bsp/usbutils/usbutils_012.bb31
-rw-r--r--meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch34
-rw-r--r--meta/recipes-bsp/v86d/v86d/aarch64-host.patch18
-rwxr-xr-xmeta/recipes-bsp/v86d/v86d/fbsetup3
-rw-r--r--meta/recipes-bsp/v86d/v86d/uvesafb.conf2
-rw-r--r--meta/recipes-bsp/v86d/v86d_0.1.10.bb46
-rw-r--r--meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb64
-rw-r--r--meta/recipes-connectivity/avahi/avahi-ui_0.7.bb54
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc119
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.6.32.bb22
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.7.bb81
-rw-r--r--meta/recipes-connectivity/avahi/files/0001-Fix-opening-etc-resolv.conf-error.patch45
-rw-r--r--meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch28
-rw-r--r--meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch30
-rw-r--r--meta/recipes-connectivity/avahi/files/fix-CVE-2017-6519.patch48
-rw-r--r--meta/recipes-connectivity/avahi/files/initscript.patch26
-rw-r--r--meta/recipes-connectivity/bind/bind/0001-avoid-start-failure-with-bind-user.patch27
-rw-r--r--meta/recipes-connectivity/bind/bind/0001-build-use-pkg-config-to-find-libxml2.patch50
-rw-r--r--meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch30
-rw-r--r--meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch25
-rw-r--r--meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch34
-rw-r--r--meta/recipes-connectivity/bind/bind/0001-named-lwresd-V-and-start-log-hide-build-options.patch34
-rw-r--r--meta/recipes-connectivity/bind/bind/CVE-2016-1285.patch154
-rw-r--r--meta/recipes-connectivity/bind/bind/CVE-2016-1286_1.patch79
-rw-r--r--meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch317
-rw-r--r--meta/recipes-connectivity/bind/bind/CVE-2016-2088.patch247
-rw-r--r--meta/recipes-connectivity/bind/bind/bind-confgen-build-unix.o-once.patch44
-rw-r--r--meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch18
-rw-r--r--meta/recipes-connectivity/bind/bind/dont-test-on-host.patch17
-rw-r--r--meta/recipes-connectivity/bind/bind/generate-rndc-key.sh1
-rw-r--r--meta/recipes-connectivity/bind/bind/mips1-not-support-opcode.diff104
-rw-r--r--meta/recipes-connectivity/bind/bind_9.10.3-P3.bb109
-rw-r--r--meta/recipes-connectivity/bind/bind_9.11.13.bb139
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5.inc129
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch49
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch43
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/init27
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch26
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/run-ptest2
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5_5.41.bb55
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5_5.52.bb68
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch136
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome_0.7.bb2
-rw-r--r--meta/recipes-connectivity/connman/connman.inc36
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch29
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-gweb-fix-segfault-with-musl-v1.1.21.patch34
-rw-r--r--meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch8
-rw-r--r--meta/recipes-connectivity/connman/connman/includes.patch423
-rw-r--r--meta/recipes-connectivity/connman/connman_1.33.bb14
-rw-r--r--meta/recipes-connectivity/connman/connman_1.37.bb17
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp.inc52
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0001-Fix-a-NSUPDATE-compiling-issue.patch68
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch27
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch79
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch25
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch65
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch117
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch35
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch93
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch36
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch62
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0009-remove-dhclient-script-bash-dependency.patch28
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch34
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch64
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch26
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch70
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch86
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch97
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/libxml2-configure-argument.patch38
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch34
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch55
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch188
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch23
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/tweak-to-support-external-bind.patch117
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb18
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb23
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhclient-systemd-wrapper39
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhclient.service13
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhcpd6.service2
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch31
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch25
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch83
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch29
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch14
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch26
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch40
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils20
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils23
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils21
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils13
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils19
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/version.patch17
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb210
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2.inc33
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch64
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch41
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch32
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch85
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2_4.7.0.bb13
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb12
-rwxr-xr-xmeta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init78
-rw-r--r--meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch75
-rw-r--r--meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch29
-rw-r--r--meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb51
-rw-r--r--meta/recipes-connectivity/iw/iw/separate-objdir.patch27
-rw-r--r--meta/recipes-connectivity/iw/iw_4.7.bb33
-rw-r--r--meta/recipes-connectivity/iw/iw_5.3.bb32
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch56
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb20
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap.inc43
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap/aclocal.patch167
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch71
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap_1.7.4.bb26
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap_1.9.1.bb44
-rw-r--r--meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb9
-rw-r--r--meta/recipes-connectivity/neard/neard/0001-Add-header-dependency-to-nciattach.o.patch35
-rw-r--r--meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch15
-rw-r--r--meta/recipes-connectivity/neard/neard_0.16.bb7
-rw-r--r--meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch34
-rw-r--r--meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch41
-rw-r--r--meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch27
-rw-r--r--meta/recipes-connectivity/nfs-utils/libnfsidmap/Set_nobody_user_group.patch18
-rw-r--r--meta/recipes-connectivity/nfs-utils/libnfsidmap/fix-ac-prereq.patch13
-rw-r--r--meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb27
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Don-t-build-tools-with-CC_FOR_BUILD.patch40
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch156
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch295
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-cacheio-use-intmax_t-for-formatted-IO.patch38
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch43
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch40
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch113
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/bugfix-adjust-statd-service-name.patch39
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch183
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service10
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service12
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service10
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch36
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch42
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-debianize-start-statd.patch42
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch46
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver4
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb150
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb152
-rw-r--r--meta/recipes-connectivity/ofono/ofono.inc42
-rw-r--r--meta/recipes-connectivity/ofono/ofono/0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch36
-rw-r--r--meta/recipes-connectivity/ofono/ofono_1.18.bb10
-rw-r--r--meta/recipes-connectivity/ofono/ofono_1.31.bb50
-rw-r--r--meta/recipes-connectivity/ofono/ofono_git.bb14
-rw-r--r--meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch64
-rw-r--r--meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch28
-rw-r--r--meta/recipes-connectivity/openssh/openssh/init43
-rw-r--r--meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch118
-rw-r--r--meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch70
-rwxr-xr-xmeta/recipes-connectivity/openssh/openssh/run-ptest2
-rw-r--r--meta/recipes-connectivity/openssh/openssh/ssh_config12
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshd_check_keys78
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshd_config31
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service16
-rw-r--r--meta/recipes-connectivity/openssh/openssh_7.3p1.bb164
-rw-r--r--meta/recipes-connectivity/openssh/openssh_8.1p1.bb170
-rw-r--r--meta/recipes-connectivity/openssl/files/environment.d-openssl.sh1
-rw-r--r--meta/recipes-connectivity/openssl/openssl.inc242
-rw-r--r--meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch76
-rw-r--r--meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch46
-rw-r--r--meta/recipes-connectivity/openssl/openssl/CVE-2019-1551.patch758
-rw-r--r--meta/recipes-connectivity/openssl/openssl/Makefiles-ptest.patch77
-rw-r--r--meta/recipes-connectivity/openssl/openssl/afalg.patch31
-rw-r--r--meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch27
-rw-r--r--meta/recipes-connectivity/openssl/openssl/configure-targets.patch37
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch71
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/ca.patch22
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/debian-targets.patch73
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/man-dir.patch15
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/man-section.patch34
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/no-rpath.patch15
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch15
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/pic.patch177
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian/version-script.patch4663
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_digicert_malaysia.patch29
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch68
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch4656
-rw-r--r--meta/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch64
-rw-r--r--meta/recipes-connectivity/openssl/openssl/find.pl54
-rw-r--r--meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch21
-rw-r--r--meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch24
-rw-r--r--meta/recipes-connectivity/openssl/openssl/openssl-1.0.2a-x32-asm.patch46
-rw-r--r--meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch23
-rw-r--r--meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh210
-rw-r--r--meta/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch19
-rw-r--r--meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch34
-rw-r--r--meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch39
-rw-r--r--meta/recipes-connectivity/openssl/openssl/parallel.patch337
-rw-r--r--meta/recipes-connectivity/openssl/openssl/ptest-deps.patch34
-rw-r--r--meta/recipes-connectivity/openssl/openssl/ptest_makefile_deps.patch248
-rw-r--r--[-rwxr-xr-x]meta/recipes-connectivity/openssl/openssl/run-ptest12
-rw-r--r--meta/recipes-connectivity/openssl/openssl/shared-libs.patch41
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.0.2j.bb58
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.1.1d.bb209
-rw-r--r--meta/recipes-connectivity/portmap/portmap.inc17
-rw-r--r--meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch46
-rwxr-xr-xmeta/recipes-connectivity/portmap/portmap/portmap.init67
-rw-r--r--meta/recipes-connectivity/portmap/portmap/portmap.service10
-rw-r--r--meta/recipes-connectivity/portmap/portmap/tcpd-config.patch30
-rw-r--r--meta/recipes-connectivity/portmap/portmap_6.0.bb35
-rw-r--r--meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb3
-rw-r--r--meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch51
-rw-r--r--meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch43
-rw-r--r--meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch54
-rw-r--r--meta/recipes-connectivity/ppp/ppp/cifdefroute.patch71
-rw-r--r--meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch15
-rw-r--r--meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch84
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.7.bb13
-rw-r--r--meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch52
-rw-r--r--meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch32
-rw-r--r--meta/recipes-connectivity/socat/socat/Makefile.in-fix-for-parallel-build.patch35
-rw-r--r--meta/recipes-connectivity/socat/socat_1.7.3.1.bb38
-rw-r--r--meta/recipes-connectivity/socat/socat_1.7.3.3.bb52
-rw-r--r--meta/recipes-connectivity/wireless-tools/wireless-tools/avoid_strip.patch21
-rw-r--r--meta/recipes-connectivity/wireless-tools/wireless-tools/ldflags.patch22
-rw-r--r--meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch15
-rw-r--r--meta/recipes-connectivity/wireless-tools/wireless-tools/remove.ldconfig.call.patch19
-rw-r--r--meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb50
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch82
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch55
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch86
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-replace-systemd-install-Alias-with-WantedBy.patch52
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch66
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch86
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-Reject-SET-commands-with-newline-characters-in-the-s.patch54
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh1
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb113
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb110
-rw-r--r--meta/recipes-core/base-files/base-files/filesystems8
-rw-r--r--meta/recipes-core/base-files/base-files/fstab2
-rw-r--r--meta/recipes-core/base-files/base-files/hosts (renamed from meta/recipes-core/netbase/netbase/hosts)0
-rw-r--r--meta/recipes-core/base-files/base-files/profile41
-rw-r--r--meta/recipes-core/base-files/base-files/share/dot.profile3
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb47
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/kvm.patch23
-rw-r--r--meta/recipes-core/base-passwd/base-passwd_3.5.29.bb46
-rw-r--r--meta/recipes-core/busybox/busybox-inittab_1.31.0.bb35
-rw-r--r--meta/recipes-core/busybox/busybox.inc324
-rw-r--r--meta/recipes-core/busybox/busybox/0001-du-l-works-fix-to-use-145-instead-of-144.patch32
-rw-r--r--meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch73
-rw-r--r--meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch72
-rw-r--r--meta/recipes-core/busybox/busybox/0001-testsuite-check-uudecode-before-using-it.patch45
-rw-r--r--meta/recipes-core/busybox/busybox/0001-testsuite-use-www.example.org-for-wget-test-cases.patch62
-rw-r--r--meta/recipes-core/busybox/busybox/CVE-2016-2147.patch57
-rw-r--r--meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch32
-rw-r--r--meta/recipes-core/busybox/busybox/CVE-2016-2148.patch74
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch81
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch143
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch118
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch18
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch53
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch104
-rw-r--r--meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch61
-rw-r--r--meta/recipes-core/busybox/busybox/defconfig760
-rw-r--r--meta/recipes-core/busybox/busybox/init.cfg7
-rw-r--r--meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch90
-rw-r--r--meta/recipes-core/busybox/busybox/makefile-fix-backport.patch40
-rw-r--r--meta/recipes-core/busybox/busybox/musl.cfg1
-rw-r--r--meta/recipes-core/busybox/busybox/syslog.cfg11
-rw-r--r--meta/recipes-core/busybox/busybox/unicode.cfg10
-rw-r--r--meta/recipes-core/busybox/busybox_1.24.1.bb60
-rw-r--r--meta/recipes-core/busybox/busybox_1.31.1.bb49
-rw-r--r--meta/recipes-core/busybox/busybox_git.bb52
-rw-r--r--meta/recipes-core/busybox/files/mdev-mount.sh4
-rw-r--r--meta/recipes-core/busybox/files/mdev.conf2
-rwxr-xr-xmeta/recipes-core/busybox/files/mount.busybox3
-rw-r--r--meta/recipes-core/busybox/files/run-ptest6
-rw-r--r--meta/recipes-core/busybox/files/runlevel11
-rw-r--r--meta/recipes-core/busybox/files/syslog22
-rwxr-xr-xmeta/recipes-core/busybox/files/umount.busybox3
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch51
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch44
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/Makevars41
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/codepage.patch17
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/compile.patch12
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/configure.patch29
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/fix-libconsole-linking.patch56
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/kbdrate.patch75
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/lcmessage.m424
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/no-dep-on-libfl.patch19
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/nodocs.patch22
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch49
-rw-r--r--meta/recipes-core/console-tools/console-tools_0.3.2.bb44
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch120
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch101
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-texinfo.patch375
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch4051
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch117
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch19
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch32
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/fix_for_manpage_building.patch85
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/futimens.patch63
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch21
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/loadavg.patch18
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch24
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.25/0001-Unset-need_charset_alias-when-building-for-musl.patch33
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.25/man-decouple-manpages-from-build.patch27
-rw-r--r--meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch26
-rw-r--r--meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch (renamed from meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch)0
-rw-r--r--meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch (renamed from meta/recipes-core/coreutils/coreutils-8.25/disable-ls-output-quoting.patch)0
-rw-r--r--meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch (renamed from meta/recipes-core/coreutils/coreutils-8.25/fix-selinux-flask.patch)0
-rw-r--r--meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch (renamed from meta/recipes-core/coreutils/coreutils-8.25/remove-usr-local-lib-from-m4.patch)0
-rw-r--r--meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch56
-rw-r--r--meta/recipes-core/coreutils/coreutils_6.9.bb107
-rw-r--r--meta/recipes-core/coreutils/coreutils_8.25.bb142
-rw-r--r--meta/recipes-core/coreutils/coreutils_8.31.bb145
-rw-r--r--meta/recipes-core/dbus-wait/dbus-wait_git.bb1
-rw-r--r--meta/recipes-core/dbus/dbus-glib.inc39
-rw-r--r--meta/recipes-core/dbus/dbus-glib/no-examples.patch10
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.106.bb4
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.110.bb39
-rw-r--r--meta/recipes-core/dbus/dbus-test_1.10.10.bb58
-rw-r--r--meta/recipes-core/dbus/dbus-test_1.12.16.bb90
-rw-r--r--meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch38
-rw-r--r--meta/recipes-core/dbus/dbus/dbus-1.init4
-rw-r--r--meta/recipes-core/dbus/dbus/os-test.patch35
-rwxr-xr-xmeta/recipes-core/dbus/dbus/run-ptest29
-rw-r--r--meta/recipes-core/dbus/dbus_1.10.10.bb181
-rw-r--r--meta/recipes-core/dbus/dbus_1.12.16.bb176
-rw-r--r--meta/recipes-core/dropbear/dropbear.inc39
-rw-r--r--meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch16
-rw-r--r--meta/recipes-core/dropbear/dropbear/0003-configure.patch42
-rw-r--r--meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch22
-rw-r--r--meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch40
-rw-r--r--meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch23
-rw-r--r--meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch140
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch44
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear.default2
-rw-r--r--meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch48
-rwxr-xr-xmeta/recipes-core/dropbear/dropbear/init60
-rw-r--r--meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch43
-rw-r--r--meta/recipes-core/dropbear/dropbear_2016.74.bb7
-rw-r--r--meta/recipes-core/dropbear/dropbear_2019.78.bb4
-rw-r--r--meta/recipes-core/ell/ell_0.26.bb22
-rw-r--r--meta/recipes-core/expat/expat.inc21
-rw-r--r--meta/recipes-core/expat/expat/autotools.patch24
-rw-r--r--meta/recipes-core/expat/expat/libtool-tag.patch30
-rw-r--r--meta/recipes-core/expat/expat_2.2.0.bb5
-rw-r--r--meta/recipes-core/expat/expat_2.2.9.bb22
-rw-r--r--meta/recipes-core/fts/fts.bb45
-rw-r--r--meta/recipes-core/fts/fts/fts-header-correctness.patch25
-rw-r--r--meta/recipes-core/fts/fts/fts-uclibc.patch50
-rw-r--r--meta/recipes-core/fts/fts/gcc5.patch1368
-rw-r--r--meta/recipes-core/fts/fts/remove_cdefs.patch69
-rw-r--r--meta/recipes-core/fts/fts/stdint.patch15
-rw-r--r--meta/recipes-core/fts/fts_1.2.7.bb21
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/disable_java.patch39
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch110
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch348
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/gettext-autoconf-lib-link-no-L.patch19
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/gettext-vpath.patch20
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/hardcode_macro_version.patch51
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/linklib_from_0.17.patch720
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch87
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch141
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest6
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch58
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch321
-rw-r--r--meta/recipes-core/gettext/gettext_0.16.1.bb124
-rw-r--r--meta/recipes-core/gettext/gettext_0.19.8.1.bb104
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch17
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch61
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch34
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch34
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch25
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch95
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch31
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch42
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch46
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch168
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch39
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch66
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch35
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch59
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch24
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/glib-meson.cross9
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch30
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch15
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/run-ptest3
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch22
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb26
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.62.3.bb24
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc132
-rw-r--r--meta/recipes-core/glib-networking/glib-networking_2.48.2.bb29
-rw-r--r--meta/recipes-core/glib-networking/glib-networking_2.62.1.bb34
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native_2.24.bb52
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native_2.30.bb49
-rw-r--r--meta/recipes-core/glibc/glibc-collateral.inc24
-rw-r--r--meta/recipes-core/glibc/glibc-common.inc22
-rw-r--r--meta/recipes-core/glibc/glibc-initial.inc78
-rw-r--r--meta/recipes-core/glibc/glibc-initial_2.24.bb9
-rw-r--r--meta/recipes-core/glibc/glibc-ld.inc57
-rw-r--r--meta/recipes-core/glibc/glibc-locale.inc64
-rw-r--r--meta/recipes-core/glibc/glibc-locale_2.30.bb (renamed from meta/recipes-core/glibc/glibc-locale_2.24.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace.inc7
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace_2.30.bb (renamed from meta/recipes-core/glibc/glibc-mtrace_2.24.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-package.inc206
-rw-r--r--meta/recipes-core/glibc/glibc-scripts.inc7
-rw-r--r--meta/recipes-core/glibc/glibc-scripts_2.30.bb (renamed from meta/recipes-core/glibc/glibc-scripts_2.24.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-testing.inc95
-rw-r--r--meta/recipes-core/glibc/glibc-testsuite_2.30.bb60
-rw-r--r--meta/recipes-core/glibc/glibc-version.inc8
-rw-r--r--meta/recipes-core/glibc/glibc.inc56
-rw-r--r--meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch39
-rw-r--r--meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch12
-rw-r--r--meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch10
-rw-r--r--meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch146
-rw-r--r--meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch42
-rw-r--r--meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch1584
-rw-r--r--meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch70
-rw-r--r--meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch1584
-rw-r--r--meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch33
-rw-r--r--meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch208
-rw-r--r--meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch33
-rw-r--r--meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch387
-rw-r--r--meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch208
-rw-r--r--meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch62
-rw-r--r--meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch387
-rw-r--r--meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch62
-rw-r--r--meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch36
-rw-r--r--meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch61
-rw-r--r--meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch36
-rw-r--r--meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch44
-rw-r--r--meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch61
-rw-r--r--meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch10
-rw-r--r--meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch8
-rw-r--r--meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch30
-rw-r--r--meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch14
-rw-r--r--meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch12
-rw-r--r--meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch14
-rw-r--r--meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch16
-rw-r--r--meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch83
-rw-r--r--meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch64
-rw-r--r--meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch83
-rw-r--r--meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch56
-rw-r--r--meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch566
-rw-r--r--meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch56
-rw-r--r--meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch32
-rw-r--r--meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch123
-rw-r--r--meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch566
-rw-r--r--meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch84
-rw-r--r--meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch32
-rw-r--r--meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch56
-rw-r--r--meta/recipes-core/glibc/glibc/0026-build_local_scope.patch56
-rw-r--r--meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch34
-rw-r--r--meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch304
-rw-r--r--meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch56
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2019-19126.patch32
-rw-r--r--meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch1115
-rw-r--r--meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch226
-rw-r--r--meta/recipes-core/glibc/glibc/check-test-wrapper71
-rw-r--r--meta/recipes-core/glibc/glibc/etc/ld.so.conf1
-rwxr-xr-xmeta/recipes-core/glibc/glibc/makedbs.sh177
-rw-r--r--meta/recipes-core/glibc/glibc_2.24.bb140
-rw-r--r--meta/recipes-core/glibc/glibc_2.30.bb113
-rw-r--r--meta/recipes-core/glibc/site_config/funcs474
-rw-r--r--meta/recipes-core/glibc/site_config/headers156
-rw-r--r--meta/recipes-core/glibc/site_config/types21
-rw-r--r--meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch47
-rw-r--r--meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch9
-rw-r--r--meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch398
-rw-r--r--meta/recipes-core/ifupdown/ifupdown_0.8.2.bb49
-rw-r--r--meta/recipes-core/ifupdown/ifupdown_0.8.22.bb47
-rw-r--r--meta/recipes-core/images/build-appliance-image/README_VirtualBox_Toaster.txt78
-rw-r--r--meta/recipes-core/images/build-appliance-image_15.0.0.bb59
-rw-r--r--meta/recipes-core/images/core-image-minimal-initramfs.bb14
-rw-r--r--meta/recipes-core/images/core-image-minimal.bb2
-rw-r--r--meta/recipes-core/images/core-image-tiny-initramfs.bb43
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh14
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh62
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh74
-rwxr-xr-x[-rw-r--r--]meta/recipes-core/initrdscripts/files/init-live.sh17
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb7
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/exec29
-rwxr-xr-xmeta/recipes-core/initrdscripts/initramfs-framework/init7
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/lvm13
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/mdev4
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs48
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/rootfs19
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/setup-live64
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/udev1
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb34
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb21
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb5
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb5
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb18
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb23
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb20
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/alignment.sh (renamed from meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh)0
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh7
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh9
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh69
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh9
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh6
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh8
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/volatiles9
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb25
-rw-r--r--meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch24
-rw-r--r--meta/recipes-core/kbd/kbd/run-ptest4
-rw-r--r--meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch69
-rw-r--r--meta/recipes-core/kbd/kbd_2.0.3.bb34
-rw-r--r--meta/recipes-core/kbd/kbd_2.2.0.bb68
-rw-r--r--meta/recipes-core/libcgroup/libcgroup/CVE-2018-14348.patch37
-rw-r--r--meta/recipes-core/libcgroup/libcgroup_0.41.bb15
-rw-r--r--meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.10.bb18
-rw-r--r--meta/recipes-core/libxcrypt/libxcrypt.inc33
-rw-r--r--meta/recipes-core/libxcrypt/libxcrypt_4.4.10.bb2
-rw-r--r--meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch98
-rw-r--r--meta/recipes-core/libxml/libxml2/ansidecl.patch25
-rw-r--r--meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch33
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml-64bit.patch24
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch18
-rw-r--r--meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch13
-rw-r--r--meta/recipes-core/libxml/libxml2/run-ptest1
-rw-r--r--meta/recipes-core/libxml/libxml2/runtest.patch290
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.10.bb110
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.4.bb70
-rw-r--r--meta/recipes-core/meta/build-sysroots.bb38
-rw-r--r--meta/recipes-core/meta/buildtools-tarball.bb10
-rw-r--r--meta/recipes-core/meta/cve-update-db-native.bb185
-rw-r--r--meta/recipes-core/meta/dummy-sdk-package.inc30
-rw-r--r--meta/recipes-core/meta/meta-environment-extsdk.bb4
-rw-r--r--meta/recipes-core/meta/meta-environment.bb25
-rw-r--r--meta/recipes-core/meta/meta-extsdk-toolchain.bb10
-rw-r--r--meta/recipes-core/meta/meta-go-toolchain.bb12
-rw-r--r--meta/recipes-core/meta/meta-ide-support.bb5
-rw-r--r--meta/recipes-core/meta/meta-toolchain.bb3
-rw-r--r--meta/recipes-core/meta/meta-world-pkgdata.bb18
-rw-r--r--meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb51
-rw-r--r--meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb17
-rw-r--r--meta/recipes-core/meta/package-index.bb21
-rw-r--r--meta/recipes-core/meta/signing-keys.bb44
-rw-r--r--meta/recipes-core/meta/target-sdk-provides-dummy.bb61
-rw-r--r--meta/recipes-core/meta/testexport-tarball.bb20
-rw-r--r--meta/recipes-core/meta/uninative-tarball.bb16
-rw-r--r--meta/recipes-core/meta/wic-tools.bb26
-rw-r--r--meta/recipes-core/musl/bsd-headers.bb (renamed from meta/recipes-core/bsd-headers/bsd-headers.bb)0
-rw-r--r--meta/recipes-core/musl/bsd-headers/sys-cdefs.h (renamed from meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h)0
-rw-r--r--meta/recipes-core/musl/bsd-headers/sys-queue.h (renamed from meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h)0
-rw-r--r--meta/recipes-core/musl/bsd-headers/sys-tree.h (renamed from meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h)0
-rw-r--r--meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch34
-rw-r--r--meta/recipes-core/musl/libssp-nonshared.bb34
-rw-r--r--meta/recipes-core/musl/libssp-nonshared/ssp-local.c45
-rw-r--r--meta/recipes-core/musl/musl-obstack.bb22
-rw-r--r--meta/recipes-core/musl/musl-utils.bb27
-rw-r--r--meta/recipes-core/musl/musl.inc14
-rw-r--r--meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch76
-rw-r--r--meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch48
-rw-r--r--meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch61
-rw-r--r--meta/recipes-core/musl/musl_git.bb44
-rw-r--r--meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch169
-rw-r--r--meta/recipes-core/ncurses/files/0001-tic-hang.patch43
-rw-r--r--meta/recipes-core/ncurses/files/0002-configure-reproducible.patch35
-rw-r--r--meta/recipes-core/ncurses/files/tic-hang.patch27
-rw-r--r--meta/recipes-core/ncurses/ncurses.inc25
-rw-r--r--meta/recipes-core/ncurses/ncurses_6.0+20160625.bb10
-rw-r--r--meta/recipes-core/ncurses/ncurses_6.1+20190803.bb12
-rw-r--r--meta/recipes-core/netbase/netbase/netbase-add-rpcbind-as-an-alias-to-sunrpc.patch44
-rw-r--r--meta/recipes-core/netbase/netbase_5.3.bb25
-rw-r--r--meta/recipes-core/netbase/netbase_5.7.bb20
-rw-r--r--meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch41
-rw-r--r--meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch30
-rw-r--r--meta/recipes-core/newlib/libgloss_3.1.0.bb33
-rw-r--r--meta/recipes-core/newlib/newlib.inc54
-rw-r--r--meta/recipes-core/newlib/newlib_3.1.0.bb20
-rw-r--r--meta/recipes-core/os-release/os-release.bb15
-rw-r--r--meta/recipes-core/ovmf/ovmf-shell-image.bb20
-rw-r--r--meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch33
-rw-r--r--meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch50
-rw-r--r--meta/recipes-core/ovmf/ovmf/0004-ovmf-enable-long-path-file.patch18
-rw-r--r--meta/recipes-core/ovmf/ovmf/VfrCompile-increase-path-length-limit.patch33
-rw-r--r--meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch34
-rw-r--r--meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks4
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb245
-rw-r--r--meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb8
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-base.bb36
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-boot.bb13
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-sdk.bb16
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb7
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb2
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb36
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb12
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb6
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-go-cross-canadian.bb12
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb11
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-self-hosted.bb35
-rwxr-xr-xmeta/recipes-core/psplash/files/psplash-init11
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb35
-rw-r--r--meta/recipes-core/readline/files/config-dirent-symbols.patch34
-rw-r--r--meta/recipes-core/readline/readline-5.2/configure-fix.patch26
-rw-r--r--meta/recipes-core/readline/readline-5.2/fix-redundant-rpath.patch21
-rw-r--r--meta/recipes-core/readline/readline-8.0/configure-fix.patch (renamed from meta/recipes-core/readline/readline-6.3/configure-fix.patch)0
-rw-r--r--meta/recipes-core/readline/readline-8.0/norpath.patch (renamed from meta/recipes-core/readline/readline-6.3/norpath.patch)0
-rw-r--r--meta/recipes-core/readline/readline-8.0/rl-native.map12
-rw-r--r--meta/recipes-core/readline/readline.inc6
-rw-r--r--meta/recipes-core/readline/readline_5.2.bb84
-rw-r--r--meta/recipes-core/readline/readline_6.3.bb34
-rw-r--r--meta/recipes-core/readline/readline_8.0.bb7
-rw-r--r--meta/recipes-core/systemd/systemd-boot_243.bb70
-rw-r--r--meta/recipes-core/systemd/systemd-bootconf_1.00.bb32
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units.bb7
-rw-r--r--meta/recipes-core/systemd/systemd-conf/journald.conf3
-rw-r--r--meta/recipes-core/systemd/systemd-conf/logind.conf2
-rw-r--r--meta/recipes-core/systemd/systemd-conf/system.conf2
-rw-r--r--meta/recipes-core/systemd/systemd-conf/system.conf-qemuall3
-rw-r--r--meta/recipes-core/systemd/systemd-conf/wired.network10
-rw-r--r--meta/recipes-core/systemd/systemd-conf_243.bb38
-rw-r--r--meta/recipes-core/systemd/systemd-machine-units_1.0.bb13
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty.bb15
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service3
-rw-r--r--meta/recipes-core/systemd/systemd-systemctl-native.bb2
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl516
-rw-r--r--meta/recipes-core/systemd/systemd.inc10
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch62
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch33
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch77
-rw-r--r--meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch80
-rw-r--r--meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch33
-rw-r--r--meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch413
-rw-r--r--meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch48
-rw-r--r--meta/recipes-core/systemd/systemd/0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch42
-rw-r--r--meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch163
-rw-r--r--meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch25
-rw-r--r--meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch44
-rw-r--r--meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch63
-rw-r--r--meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch32
-rw-r--r--meta/recipes-core/systemd/systemd/0003-implment-systemd-sysv-install-for-OE.patch43
-rw-r--r--meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch63
-rw-r--r--meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch27
-rw-r--r--meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch35
-rw-r--r--meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch432
-rw-r--r--meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch34
-rw-r--r--meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch54
-rw-r--r--meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch74
-rw-r--r--meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch45
-rw-r--r--meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch442
-rw-r--r--meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch227
-rw-r--r--meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch48
-rw-r--r--meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch153
-rw-r--r--meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch61
-rw-r--r--meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch47
-rw-r--r--meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch41
-rw-r--r--meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch46
-rw-r--r--meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch45
-rw-r--r--meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch43
-rw-r--r--meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch97
-rw-r--r--meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch38
-rw-r--r--meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch32
-rw-r--r--meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch133
-rw-r--r--meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch182
-rw-r--r--meta/recipes-core/systemd/systemd/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch42
-rw-r--r--meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch99
-rw-r--r--meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch35
-rw-r--r--meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch34
-rw-r--r--meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch28
-rw-r--r--meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch38
-rw-r--r--meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch351
-rw-r--r--meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch62
-rw-r--r--meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch62
-rw-r--r--meta/recipes-core/systemd/systemd/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch35
-rw-r--r--meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch42
-rw-r--r--meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch44
-rw-r--r--meta/recipes-core/systemd/systemd/0020-missing_type.h-add-__compar_d_fn_t-definition.patch30
-rw-r--r--meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch32
-rw-r--r--meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch27
-rw-r--r--meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch36
-rw-r--r--meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch33
-rw-r--r--meta/recipes-core/systemd/systemd/99-default.preset1
-rw-r--r--meta/recipes-core/systemd/systemd/run-ptest6
-rw-r--r--meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch31
-rw-r--r--meta/recipes-core/systemd/systemd_230.bb598
-rw-r--r--meta/recipes-core/systemd/systemd_243.bb682
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-2.88dsf/crypt-lib.patch25
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-2.88dsf/install.patch83
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-2.88dsf/pidof-add-m-option.patch189
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab/start_getty58
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb23
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch52
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch50
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch36
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/install.patch96
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch191
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/realpath.patch85
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb112
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.96.bb112
-rw-r--r--meta/recipes-core/udev/eudev/0014-Revert-rules-remove-firmware-loading-rules.patch28
-rw-r--r--meta/recipes-core/udev/eudev/Revert-udev-remove-userspace-firmware-loading-suppor.patch364
-rw-r--r--meta/recipes-core/udev/eudev/init49
-rw-r--r--meta/recipes-core/udev/eudev/udev-cache75
-rw-r--r--meta/recipes-core/udev/eudev/udev-cache.default5
-rw-r--r--meta/recipes-core/udev/eudev_3.2.8.bb96
-rw-r--r--meta/recipes-core/udev/eudev_3.2.bb101
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh121
-rw-r--r--meta/recipes-core/udev/udev-extraconf_1.1.bb7
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch49
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch59
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch28
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d_0.7.bb31
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d_0.8.bb26
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc418
-rw-r--r--meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch36
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch15
-rw-r--r--meta/recipes-core/util-linux/util-linux/configure-sbindir.patch10
-rw-r--r--meta/recipes-core/util-linux/util-linux/run-ptest20
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch33
-rw-r--r--meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch99
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.28.1.bb31
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.34.bb13
-rwxr-xr-xmeta/recipes-core/volatile-binds/files/mount-copybind32
-rw-r--r--meta/recipes-core/volatile-binds/volatile-binds.bb15
-rw-r--r--meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch38
-rw-r--r--meta/recipes-core/zlib/zlib-1.2.8/remove.ldconfig.call.patch20
-rw-r--r--meta/recipes-core/zlib/zlib-1.2.8/run-ptest2
-rw-r--r--meta/recipes-core/zlib/zlib/ldflags-tests.patch (renamed from meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch)4
-rw-r--r--meta/recipes-core/zlib/zlib/run-ptest7
-rw-r--r--meta/recipes-core/zlib/zlib_1.2.11.bb52
-rw-r--r--meta/recipes-core/zlib/zlib_1.2.8.bb59
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc12
-rw-r--r--meta/recipes-devtools/apt/apt-native_1.2.12.bb4
-rw-r--r--meta/recipes-devtools/apt/apt-native_1.2.31.bb7
-rw-r--r--meta/recipes-devtools/apt/apt-package.inc22
-rw-r--r--meta/recipes-devtools/apt/apt.inc12
-rw-r--r--meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch35
-rw-r--r--meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch24
-rw-r--r--meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch2
-rw-r--r--meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch74
-rw-r--r--meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch43
-rw-r--r--meta/recipes-devtools/apt/apt/disable-test.patch23
-rw-r--r--meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch10
-rw-r--r--meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch80
-rw-r--r--meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch46
-rw-r--r--meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch33
-rw-r--r--meta/recipes-devtools/apt/apt/makerace.patch10
-rw-r--r--meta/recipes-devtools/apt/apt/no-nls-dpkg.patch12
-rw-r--r--meta/recipes-devtools/apt/apt/nodoc.patch12
-rw-r--r--meta/recipes-devtools/apt/apt_1.2.31.bb (renamed from meta/recipes-devtools/apt/apt_1.2.12.bb)0
-rw-r--r--meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb18
-rw-r--r--meta/recipes-devtools/autoconf/autoconf.inc52
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch101
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch120
-rw-r--r--meta/recipes-devtools/autoconf/autoconf_2.69.bb2
-rw-r--r--meta/recipes-devtools/autogen/autogen-native_5.18.10.bb36
-rw-r--r--meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch37
-rw-r--r--meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch30
-rw-r--r--meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch30
-rw-r--r--meta/recipes-devtools/automake/automake.inc2
-rw-r--r--meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch27
-rw-r--r--meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch65
-rw-r--r--meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch60
-rw-r--r--meta/recipes-devtools/automake/automake/buildtest.patch42
-rw-r--r--meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch22
-rw-r--r--meta/recipes-devtools/automake/automake/performance.patch19
-rw-r--r--meta/recipes-devtools/automake/automake/python-libdir.patch19
-rw-r--r--meta/recipes-devtools/automake/automake_1.15.bb35
-rw-r--r--meta/recipes-devtools/automake/automake_1.16.1.bb44
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.27.inc41
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.33.inc51
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian.inc3
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian_2.33.bb (renamed from meta/recipes-devtools/binutils/binutils-cross-canadian_2.27.bb)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-testsuite_2.33.bb85
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross.inc8
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross_2.33.bb (renamed from meta/recipes-devtools/binutils/binutils-cross_2.27.bb)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-crosssdk_2.27.bb13
-rw-r--r--meta/recipes-devtools/binutils/binutils-crosssdk_2.33.bb13
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc19
-rw-r--r--meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch62
-rw-r--r--meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch59
-rw-r--r--meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch59
-rw-r--r--meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch56
-rw-r--r--meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch42
-rw-r--r--meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch44
-rw-r--r--meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch41
-rw-r--r--meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch39
-rw-r--r--meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch52
-rw-r--r--meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch35
-rw-r--r--meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch2077
-rw-r--r--meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch35
-rw-r--r--meta/recipes-devtools/binutils/binutils/0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch32
-rw-r--r--meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch35
-rw-r--r--meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch251
-rw-r--r--meta/recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch49
-rw-r--r--meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch273
-rw-r--r--meta/recipes-devtools/binutils/binutils/0010-Change-default-emulation-for-mips64-linux.patch52
-rw-r--r--meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch52
-rw-r--r--meta/recipes-devtools/binutils/binutils/0011-Add-support-for-Netlogic-XLP.patch362
-rw-r--r--meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch59
-rw-r--r--meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch413
-rw-r--r--meta/recipes-devtools/binutils/binutils/0012-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch33
-rw-r--r--meta/recipes-devtools/binutils/binutils/0013-Detect-64-bit-MIPS-targets.patch47
-rw-r--r--meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch36
-rw-r--r--meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch86
-rw-r--r--meta/recipes-devtools/binutils/binutils/0015-binutils-enable-x86_64-pep-for-producing-EFI-binarie.patch46
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2019-17450.patch94
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2019-17451.patch46
-rw-r--r--meta/recipes-devtools/binutils/binutils_2.27.bb45
-rw-r--r--meta/recipes-devtools/binutils/binutils_2.33.bb55
-rw-r--r--meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch33
-rw-r--r--meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch33
-rw-r--r--meta/recipes-devtools/bison/bison/bison-2.3_m4.patch591
-rw-r--r--meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch16
-rw-r--r--meta/recipes-devtools/bison/bison/m4.patch414
-rw-r--r--meta/recipes-devtools/bison/bison_2.3.bb26
-rw-r--r--meta/recipes-devtools/bison/bison_3.0.4.bb40
-rw-r--r--meta/recipes-devtools/bison/bison_3.4.2.bb40
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2/0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch30
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2/0001-bootchart2-support-usrmerge.patch37
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch45
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb18
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch25
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-parallel.patch32
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools_4.7.1.bb33
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb52
-rw-r--r--meta/recipes-devtools/build-compare/build-compare_git.bb17
-rw-r--r--meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch64
-rw-r--r--meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch17
-rw-r--r--meta/recipes-devtools/build-compare/files/Rename-rpm-check.sh-to-pkg-diff.sh.patch1599
-rw-r--r--meta/recipes-devtools/build-compare/files/functions.sh-improve-deb-and-ipk-checking.patch117
-rw-r--r--meta/recipes-devtools/build-compare/files/functions.sh-remove-space-at-head.patch41
-rw-r--r--meta/recipes-devtools/build-compare/files/functions.sh-run-rpm-once-to-make-it-faster.patch361
-rw-r--r--meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch35
-rw-r--r--meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch37
-rw-r--r--meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch32
-rw-r--r--meta/recipes-devtools/ccache/ccache.inc16
-rw-r--r--meta/recipes-devtools/ccache/ccache_3.2.5.bb11
-rw-r--r--meta/recipes-devtools/ccache/ccache_3.7.3.bb7
-rw-r--r--meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch32
-rw-r--r--meta/recipes-devtools/ccache/files/Revert-Create-man-page-in-the-make-install-from-git-.patch33
-rw-r--r--meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb9
-rw-r--r--meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch27
-rw-r--r--meta/recipes-devtools/chrpath/chrpath/standarddoc.patch25
-rw-r--r--meta/recipes-devtools/chrpath/chrpath_0.16.bb4
-rw-r--r--meta/recipes-devtools/cmake/cmake-native_3.16.1.bb52
-rw-r--r--meta/recipes-devtools/cmake/cmake-native_3.6.1.bb36
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc47
-rw-r--r--meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch44
-rw-r--r--meta/recipes-devtools/cmake/cmake/0002-cmake-Prevent-the-detection-of-Qt5.patch122
-rw-r--r--meta/recipes-devtools/cmake/cmake/0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch56
-rw-r--r--meta/recipes-devtools/cmake/cmake/0004-Fail-silently-if-system-Qt-installation-is-broken.patch79
-rw-r--r--meta/recipes-devtools/cmake/cmake/0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch40
-rw-r--r--meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake15
-rw-r--r--meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch26
-rw-r--r--meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh3
-rw-r--r--meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch77
-rw-r--r--meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch54
-rw-r--r--meta/recipes-devtools/cmake/cmake_3.16.1.bb53
-rw-r--r--meta/recipes-devtools/cmake/cmake_3.6.1.bb48
-rw-r--r--meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch25
-rw-r--r--meta/recipes-devtools/createrepo-c/createrepo-c_0.15.1.bb34
-rw-r--r--meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb59
-rw-r--r--meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch51
-rw-r--r--meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb17
-rw-r--r--meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb18
-rw-r--r--meta/recipes-devtools/desktop-file-utils/desktop-file-utils_0.24.bb24
-rw-r--r--meta/recipes-devtools/devel-config/distcc-config.bb3
-rw-r--r--meta/recipes-devtools/devel-config/nfs-export-root.bb3
-rw-r--r--meta/recipes-devtools/diffstat/diffstat/avoid-check-user-break-cc.patch32
-rw-r--r--meta/recipes-devtools/diffstat/diffstat_1.61.bb32
-rw-r--r--meta/recipes-devtools/diffstat/diffstat_1.62.bb28
-rw-r--r--meta/recipes-devtools/distcc/distcc_3.2.bb71
-rw-r--r--meta/recipes-devtools/distcc/distcc_3.3.3.bb87
-rw-r--r--meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch29
-rw-r--r--meta/recipes-devtools/distcc/files/default4
-rw-r--r--meta/recipes-devtools/distcc/files/distccmon-gnome.desktop12
-rw-r--r--meta/recipes-devtools/distcc/files/fix-gnome.patch122
-rw-r--r--meta/recipes-devtools/distcc/files/separatebuilddir.patch42
-rw-r--r--meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch24
-rw-r--r--meta/recipes-devtools/dmidecode/dmidecode_3.0.bb23
-rw-r--r--meta/recipes-devtools/dmidecode/dmidecode_3.2.bb24
-rw-r--r--meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch22
-rw-r--r--meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch27
-rw-r--r--meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch31
-rw-r--r--meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch25
-rw-r--r--meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch38
-rw-r--r--meta/recipes-devtools/dnf/dnf_4.2.2.bb86
-rw-r--r--meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb71
-rw-r--r--meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native_3.1.bb26
-rw-r--r--meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native_4.1.bb26
-rw-r--r--meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.5-native.bb18
-rw-r--r--meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc70
-rw-r--r--meta/recipes-devtools/docbook-sgml-dtd/files/LICENSE-OASIS16
-rw-r--r--meta/recipes-devtools/docbook-utils/docbook-utils-0.6.14/re.patch29
-rw-r--r--meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb63
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml68
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb36
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml6
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb37
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch41
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch38
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch37
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/fix_populated_dosfs_creation.patch489
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch22
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch241
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch639
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch19
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/nofat32_autoselect.patch27
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_2.11.bb34
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_4.0.bb25
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_4.1.bb28
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc71
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch41
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch12
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch50
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch36
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch58
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch43
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch30
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/arch_pm.patch19
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service17
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch86
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/noman.patch18
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/pager.patch21
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch27
-rw-r--r--meta/recipes-devtools/dpkg/dpkg_1.18.7.bb19
-rw-r--r--meta/recipes-devtools/dpkg/dpkg_1.19.7.bb22
-rw-r--r--meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb22
-rw-r--r--meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c111
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs.inc6
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-configure.ac-correct-AM_GNU_GETTEXT.patch26
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-intl-do-not-try-to-use-gettext-defines-that-no-longe.patch27
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch41
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch39
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4135
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch11
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch18
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir_p.patch20
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch44
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch13
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest15
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb111
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb141
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff449
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff71
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch37
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch23
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch39
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch57
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch73
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/gcc6.patch23
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff801
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h1657
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff309
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff713
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch27
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff756
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff1709
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch154
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff21
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch91
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h1632
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch1163
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/0001-fix-a-stack-usage-warning.patch28
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/0001-remove-the-unneed-checking.patch38
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/aarch64_uio.patch47
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/arm_backend.diff600
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch41
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/fixheadercheck.patch23
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/hppa_backend.diff799
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/kfreebsd_path.patch15
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/m68k_backend.diff492
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/mips_backend.diff711
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/mips_readelf_w.patch22
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/shadow.patch23
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/testsuite-ignore-elflint.diff39
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch128
-rw-r--r--meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch29
-rw-r--r--meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch32
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.148.bb91
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.166.bb89
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.177.bb155
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch50
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch36
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch44
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch32
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch73
-rw-r--r--meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch40
-rw-r--r--meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch38
-rw-r--r--meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch42
-rw-r--r--meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch59
-rw-r--r--meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch42
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.166/0001-Ignore-differences-between-mips-machine-identifiers.patch)12
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch48
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.166/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch)3
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.166/0003-Add-mips-n64-relocation-format-hack.patch)39
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/arm_backend.diff624
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/disable_werror.patch20
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff831
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/hurd_path.patch17
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff14
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch20
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/mips_backend.diff717
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch131
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch31
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff52
-rw-r--r--meta/recipes-devtools/elfutils/files/musl-libs.patch144
-rw-r--r--meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch128
-rw-r--r--meta/recipes-devtools/elfutils/files/musl-tests.patch29
-rw-r--r--meta/recipes-devtools/elfutils/files/musl-utils.patch165
-rw-r--r--meta/recipes-devtools/elfutils/files/ptest.patch76
-rw-r--r--meta/recipes-devtools/elfutils/files/run-ptest6
-rw-r--r--meta/recipes-devtools/expect/expect/0001-Resolve-string-formatting-issues.patch29
-rw-r--r--meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch55
-rw-r--r--meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch91
-rw-r--r--meta/recipes-devtools/expect/expect_5.45.4.bb77
-rw-r--r--meta/recipes-devtools/expect/expect_5.45.bb64
-rw-r--r--meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb26
-rw-r--r--meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb33
-rw-r--r--meta/recipes-devtools/file/file/0001-Add-P-prompt-into-Usage-info.patch39
-rw-r--r--meta/recipes-devtools/file/file/CVE-2019-18218.patch55
-rw-r--r--meta/recipes-devtools/file/file/debian-742262.patch19
-rw-r--r--meta/recipes-devtools/file/file_5.28.bb48
-rw-r--r--meta/recipes-devtools/file/file_5.37.bb50
-rw-r--r--meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch32
-rw-r--r--meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch64
-rw-r--r--meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch17
-rwxr-xr-xmeta/recipes-devtools/flex/flex/run-ptest2
-rw-r--r--meta/recipes-devtools/flex/flex_2.6.0.bb59
-rw-r--r--meta/recipes-devtools/flex/flex_2.6.4.bb76
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4.inc146
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch53
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch87
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch2862
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch257
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch68
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch542
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch192
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch39
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch73
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch85
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch101
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch59
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch96
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch46
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch74
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch57
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch216
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch40
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch113
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch43
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch102
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch53
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch52
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch98
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch83
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch27
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch26
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch56
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch213
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch102
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch137
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch44
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch270
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch216
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch78
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch66
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch103
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch307
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch284
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch43
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch85
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch51
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2.inc133
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0002-uclibc-conf.patch53
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch87
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0004-uclibc-locale.patch2862
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0005-uclibc-locale-no__x.patch257
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0006-uclibc-locale-wchar_fix.patch68
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0007-uclibc-locale-update.patch542
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0008-missing-execinfo_h.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0009-c99-snprintf.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0010-gcc-poison-system-directories.patch192
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0011-gcc-poison-dir-extend.patch39
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch73
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0013-64-bit-multilib-hack.patch85
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0014-optional-libstdc.patch125
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch59
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0016-COLLECT_GCC_OPTIONS.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch96
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0018-fortran-cross-compile-hack.patch46
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0019-cpp-honor-sysroot.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0020-MIPS64-Default-to-N64-ABI.patch57
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch234
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0022-gcc-Fix-argument-list-too-long-error.patch40
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0023-Disable-sdt.patch113
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0024-libtool.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch43
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch102
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0028-export-CPP.patch53
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch56
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0031-Ensure-target-gcc-headers-can-be-included.patch98
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0035-aarch64-Add-support-for-musl-ldso.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0037-handle-sysroot-support-for-nativesdk-gcc.patch213
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch102
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0039-Fix-various-_FOR_BUILD-and-related-variables.patch137
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0041-ssp_nonshared.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch292
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch43
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch125
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch85
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch92
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.2/CVE-2016-4490.patch290
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2.inc122
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0002-gcc-poison-system-directories.patch203
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch73
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0004-64-bit-multilib-hack.patch119
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0005-optional-libstdc.patch125
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0006-COLLECT_GCC_OPTIONS.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch96
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0008-fortran-cross-compile-hack.patch46
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0009-cpp-honor-sysroot.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0010-MIPS64-Default-to-N64-ABI.patch57
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch243
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0012-gcc-Fix-argument-list-too-long-error.patch40
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0013-Disable-sdt.patch113
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0014-libtool.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch43
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch102
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0018-export-CPP.patch53
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0019-Ensure-target-gcc-headers-can-be-included.patch55
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0023-aarch64-Add-support-for-musl-ldso.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch346
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch102
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0027-Fix-various-_FOR_BUILD-and-related-variables.patch137
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch87
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch79
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch86
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0033-sync-gcc-stddef.h-with-musl.patch91
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0034-fix-segmentation-fault-in-precompiled-header-generat.patch60
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0035-Fix-for-testsuite-failure.patch258
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0036-Re-introduce-spe-commandline-options.patch41
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-14250.patch44
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_1.patch521
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_2.patch77
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_3.patch62
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc50
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc33
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian.inc26
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian_6.2.bb5
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian_9.2.bb (renamed from meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc100
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial_6.2.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc170
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross_6.2.bb3
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross_9.2.bb (renamed from meta/recipes-devtools/gcc/gcc-cross_5.4.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc10
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb3
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.2.bb3
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk_6.2.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk_9.2.bb (renamed from meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-multilib-config.inc20
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc146
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime_5.4.bb7
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime_6.2.bb7
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime_9.2.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers.inc46
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_6.2.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_9.2.bb7
-rw-r--r--meta/recipes-devtools/gcc/gcc-source.inc9
-rw-r--r--meta/recipes-devtools/gcc/gcc-source_6.2.bb4
-rw-r--r--meta/recipes-devtools/gcc/gcc-source_9.2.bb (renamed from meta/recipes-devtools/gcc/gcc-source_5.4.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc35
-rw-r--r--meta/recipes-devtools/gcc/gcc-testsuite.inc107
-rw-r--r--meta/recipes-devtools/gcc/gcc_5.4.bb15
-rw-r--r--meta/recipes-devtools/gcc/gcc_6.2.bb15
-rw-r--r--meta/recipes-devtools/gcc/gcc_9.2.bb14
-rw-r--r--meta/recipes-devtools/gcc/libgcc-common.inc75
-rw-r--r--meta/recipes-devtools/gcc/libgcc-initial.inc55
-rw-r--r--meta/recipes-devtools/gcc/libgcc-initial_5.4.bb2
-rw-r--r--meta/recipes-devtools/gcc/libgcc-initial_6.2.bb2
-rw-r--r--meta/recipes-devtools/gcc/libgcc-initial_9.2.bb5
-rw-r--r--meta/recipes-devtools/gcc/libgcc.inc17
-rw-r--r--meta/recipes-devtools/gcc/libgcc_5.4.bb2
-rw-r--r--meta/recipes-devtools/gcc/libgcc_6.2.bb2
-rw-r--r--meta/recipes-devtools/gcc/libgcc_9.2.bb5
-rw-r--r--meta/recipes-devtools/gcc/libgfortran.inc54
-rw-r--r--meta/recipes-devtools/gcc/libgfortran_6.2.bb3
-rw-r--r--meta/recipes-devtools/gcc/libgfortran_9.2.bb (renamed from meta/recipes-devtools/gcc/libgfortran_5.4.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb-7.11.inc9
-rw-r--r--meta/recipes-devtools/gdb/gdb-8.3.1.inc22
-rw-r--r--meta/recipes-devtools/gdb/gdb-common.inc43
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian.inc8
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.1.bb (renamed from meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross.inc7
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross_8.3.1.bb (renamed from meta/recipes-devtools/gdb/gdb-cross_7.11.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb.inc4
-rw-r--r--meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch26
-rw-r--r--meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch30
-rw-r--r--meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch8
-rw-r--r--meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch26
-rw-r--r--meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch29
-rw-r--r--meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch85
-rw-r--r--meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch14
-rw-r--r--meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch10
-rw-r--r--meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch20
-rw-r--r--meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch26
-rw-r--r--meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch10
-rw-r--r--meta/recipes-devtools/gdb/gdb/0011-Fix-invalid-sigprocmask-call.patch49
-rw-r--r--meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch2601
-rw-r--r--meta/recipes-devtools/gdb/gdb/CVE-2019-1010180.patch132
-rw-r--r--meta/recipes-devtools/gdb/gdb_7.11.bb26
-rw-r--r--meta/recipes-devtools/gdb/gdb_8.3.1.bb28
-rw-r--r--meta/recipes-devtools/git/git.inc56
-rw-r--r--meta/recipes-devtools/git/git_2.24.1.bb11
-rw-r--r--meta/recipes-devtools/git/git_2.9.3.bb11
-rw-r--r--meta/recipes-devtools/glide/glide_0.13.3.bb38
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch170
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config/musl-support.patch25
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch23
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_20120814.bb41
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_git.bb10
-rw-r--r--meta/recipes-devtools/go/go-1.13.inc24
-rw-r--r--meta/recipes-devtools/go/go-1.13/0001-allow-CC-and-CXX-to-have-multiple-words.patch38
-rw-r--r--meta/recipes-devtools/go/go-1.13/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch226
-rw-r--r--meta/recipes-devtools/go/go-1.13/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch54
-rw-r--r--meta/recipes-devtools/go/go-1.13/0004-ld-add-soname-to-shareable-objects.patch50
-rw-r--r--meta/recipes-devtools/go/go-1.13/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch44
-rw-r--r--meta/recipes-devtools/go/go-1.13/0006-cmd-dist-separate-host-and-target-builds.patch279
-rw-r--r--meta/recipes-devtools/go/go-1.13/0007-cmd-go-make-GOROOT-precious-by-default.patch113
-rw-r--r--meta/recipes-devtools/go/go-1.13/0008-use-GOBUILDMODE-to-set-buildmode.patch47
-rw-r--r--meta/recipes-devtools/go/go-1.13/0009-ld-replace-glibc-dynamic-linker-with-musl.patch134
-rw-r--r--meta/recipes-devtools/go/go-common.inc42
-rw-r--r--meta/recipes-devtools/go/go-cross-canadian.inc62
-rw-r--r--meta/recipes-devtools/go/go-cross-canadian_1.13.bb2
-rw-r--r--meta/recipes-devtools/go/go-cross.inc53
-rw-r--r--meta/recipes-devtools/go/go-cross_1.13.bb2
-rw-r--r--meta/recipes-devtools/go/go-crosssdk.inc43
-rw-r--r--meta/recipes-devtools/go/go-crosssdk_1.13.bb2
-rw-r--r--meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch54
-rw-r--r--meta/recipes-devtools/go/go-dep_0.5.4.bb24
-rw-r--r--meta/recipes-devtools/go/go-native.inc55
-rw-r--r--meta/recipes-devtools/go/go-native_1.13.bb2
-rw-r--r--meta/recipes-devtools/go/go-runtime.inc87
-rw-r--r--meta/recipes-devtools/go/go-runtime_1.13.bb2
-rw-r--r--meta/recipes-devtools/go/go-target.inc45
-rw-r--r--meta/recipes-devtools/go/go_1.13.bb14
-rw-r--r--meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch32
-rw-r--r--meta/recipes-devtools/guile/files/arm_aarch64.patch19
-rw-r--r--meta/recipes-devtools/guile/files/arm_endianness.patch23
-rw-r--r--meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch39
-rw-r--r--meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch33
-rw-r--r--meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch24
-rw-r--r--meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch42
-rw-r--r--meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch39
-rw-r--r--meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch60
-rw-r--r--meta/recipes-devtools/guile/guile_2.0.12.bb121
-rw-r--r--meta/recipes-devtools/guilt/files/guilt-bash.patch288
-rw-r--r--meta/recipes-devtools/guilt/guilt-native_git.bb23
-rw-r--r--meta/recipes-devtools/help2man/help2man-native_1.47.11.bb24
-rw-r--r--meta/recipes-devtools/help2man/help2man-native_1.47.4.bb25
-rw-r--r--meta/recipes-devtools/i2c-tools/files/Module.mk72
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb33
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb43
-rw-r--r--meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb36
-rwxr-xr-xmeta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env424
-rw-r--r--meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb38
-rw-r--r--meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh49
-rw-r--r--meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh38
-rw-r--r--meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb38
-rw-r--r--meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb30
-rw-r--r--meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch14
-rw-r--r--meta/recipes-devtools/intltool/intltool_0.51.0.bb5
-rw-r--r--meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch53
-rw-r--r--meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch37
-rw-r--r--meta/recipes-devtools/json-c/json-c/add-disable-werror-option-to-configure.patch45
-rw-r--r--meta/recipes-devtools/json-c/json-c_0.12.bb30
-rw-r--r--meta/recipes-devtools/json-c/json-c_0.13.1.bb22
-rw-r--r--meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb38
-rw-r--r--meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch47
-rw-r--r--meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch25
-rw-r--r--meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch35
-rw-r--r--meta/recipes-devtools/libcomps/libcomps_git.bb24
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch49
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch31
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch27
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch28
-rw-r--r--meta/recipes-devtools/libdnf/libdnf_0.28.1.bb28
-rw-r--r--meta/recipes-devtools/libedit/libedit/stdc-predef.patch18
-rw-r--r--meta/recipes-devtools/libedit/libedit_20191025-3.1.bb19
-rw-r--r--meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch22
-rw-r--r--meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb25
-rw-r--r--meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch53
-rw-r--r--meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch27
-rw-r--r--meta/recipes-devtools/librepo/librepo_1.11.0.bb27
-rw-r--r--meta/recipes-devtools/libtool/libtool-2.4.6.inc1
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb8
-rw-r--r--meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch37
-rwxr-xr-xmeta/recipes-devtools/libtool/libtool/debian-no_hostname.patch21
-rw-r--r--meta/recipes-devtools/libtool/libtool/multilib.patch23
-rw-r--r--meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch2
-rw-r--r--meta/recipes-devtools/libtool/libtool_2.4.6.bb10
-rw-r--r--meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb26
-rw-r--r--meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_dvips_doc.patch33
-rw-r--r--meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_sgml2rtf.patch64
-rw-r--r--meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_tex_doc.patch29
-rw-r--r--meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_txt_doc.patch36
-rw-r--r--meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch90
-rw-r--r--meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch37
-rw-r--r--meta/recipes-devtools/llvm/llvm_git.bb182
-rw-r--r--meta/recipes-devtools/m4/m4-1.4.17.inc18
-rw-r--r--meta/recipes-devtools/m4/m4-1.4.18.inc62
-rw-r--r--meta/recipes-devtools/m4/m4-1.4.9.inc13
-rw-r--r--meta/recipes-devtools/m4/m4-native_1.4.17.bb13
-rw-r--r--meta/recipes-devtools/m4/m4-native_1.4.18.bb14
-rw-r--r--meta/recipes-devtools/m4/m4.inc10
-rw-r--r--meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch41
-rw-r--r--meta/recipes-devtools/m4/m4/ac_config_links.patch11
-rw-r--r--meta/recipes-devtools/m4/m4/fix_for_circular_dependency.patch77
-rw-r--r--meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch130
-rw-r--r--meta/recipes-devtools/m4/m4/remove-gets.patch23
-rw-r--r--meta/recipes-devtools/m4/m4/run-ptest5
-rw-r--r--meta/recipes-devtools/m4/m4/serial-tests-config.patch30
-rw-r--r--meta/recipes-devtools/m4/m4_1.4.18.bb (renamed from meta/recipes-devtools/m4/m4_1.4.17.bb)0
-rw-r--r--meta/recipes-devtools/m4/m4_1.4.9.bb3
-rw-r--r--meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch43
-rw-r--r--meta/recipes-devtools/make/make-3.81/makeinfo.patch22
-rw-r--r--meta/recipes-devtools/make/make.inc5
-rw-r--r--meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch70
-rw-r--r--meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch38
-rw-r--r--meta/recipes-devtools/make/make_3.81.bb15
-rw-r--r--meta/recipes-devtools/makedevs/makedevs/makedevs.c10
-rw-r--r--meta/recipes-devtools/meson/meson.inc35
-rw-r--r--meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch41
-rw-r--r--meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch36
-rw-r--r--meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch26
-rw-r--r--meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch44
-rw-r--r--meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch43
-rw-r--r--meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch26
-rw-r--r--meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch40
-rw-r--r--meta/recipes-devtools/meson/meson/0003-native_bindir.patch125
-rw-r--r--meta/recipes-devtools/meson/meson/cross-prop-default.patch23
-rw-r--r--meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch95
-rw-r--r--meta/recipes-devtools/meson/meson/disable-rpath-handling.patch26
-rwxr-xr-xmeta/recipes-devtools/meson/meson/meson-setup.py31
-rwxr-xr-xmeta/recipes-devtools/meson/meson/meson-wrapper14
-rw-r--r--meta/recipes-devtools/meson/meson_0.52.0.bb3
-rw-r--r--meta/recipes-devtools/meson/nativesdk-meson_0.52.0.bb66
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch106
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch30
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage_git.bb41
-rw-r--r--meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch25
-rw-r--r--meta/recipes-devtools/mklibs/mklibs-native_0.1.41.bb21
-rw-r--r--meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb22
-rw-r--r--meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch32
-rw-r--r--meta/recipes-devtools/mmc/mmc-utils_git.bb13
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch29
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch24
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch30
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch44
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch137
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils_git.bb54
-rw-r--r--meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch34
-rw-r--r--meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch17
-rw-r--r--meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch32
-rw-r--r--meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch23
-rw-r--r--meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch20
-rw-r--r--meta/recipes-devtools/mtools/mtools/mtools.patch129
-rw-r--r--meta/recipes-devtools/mtools/mtools/no-x11.patch21
-rw-r--r--meta/recipes-devtools/mtools/mtools_3.9.9.bb55
-rw-r--r--meta/recipes-devtools/mtools/mtools_4.0.18.bb52
-rw-r--r--meta/recipes-devtools/mtools/mtools_4.0.23.bb51
-rw-r--r--meta/recipes-devtools/nasm/nasm/0001-stdlib-Add-strlcat.patch117
-rw-r--r--meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch325
-rw-r--r--meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch116
-rw-r--r--meta/recipes-devtools/nasm/nasm/CVE-2019-14248.patch43
-rw-r--r--meta/recipes-devtools/nasm/nasm_2.12.02.bb29
-rw-r--r--meta/recipes-devtools/nasm/nasm_2.14.02.bb25
-rw-r--r--meta/recipes-devtools/ninja/ninja/fix-musl.patch46
-rw-r--r--meta/recipes-devtools/ninja/ninja_1.9.0.bb32
-rw-r--r--meta/recipes-devtools/openjade/openjade-1.3.2/fix-regex.patch32
-rw-r--r--meta/recipes-devtools/openjade/openjade-1.3.2/makefile.patch39
-rw-r--r--meta/recipes-devtools/openjade/openjade-1.3.2/msggen.pl.patch44
-rw-r--r--meta/recipes-devtools/openjade/openjade-1.3.2/no-libtool.patch20
-rw-r--r--meta/recipes-devtools/openjade/openjade-1.3.2/reautoconf.patch83
-rw-r--r--meta/recipes-devtools/openjade/openjade-1.3.2/user-declared-default-constructor.patch92
-rw-r--r--meta/recipes-devtools/openjade/openjade-native_1.3.2.bb121
-rw-r--r--meta/recipes-devtools/opensp/opensp-1.5.2/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-devtools/opensp/opensp_1.5.2.bb59
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch113
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch44
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch31
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch47
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb67
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_git.bb46
-rw-r--r--meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb2
-rw-r--r--meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb12
-rw-r--r--meta/recipes-devtools/opkg/opkg/0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch8
-rw-r--r--meta/recipes-devtools/opkg/opkg/open_inner.patch46
-rw-r--r--meta/recipes-devtools/opkg/opkg/opkg-configure.service17
-rw-r--r--meta/recipes-devtools/opkg/opkg/opkg_archive.patch54
-rw-r--r--meta/recipes-devtools/opkg/opkg/run-ptest5
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.3.3.bb73
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.4.1.bb86
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.25.bb27
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.31.bb30
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch119
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/0002-uuid-preserve-m-option-status-in-v-option-handling.patch62
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/0003-Fix-whatis-entries.patch58
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch43
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch19
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch26
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-libtool.patch27
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-nostrip.patch19
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb64
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch94
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch81
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch36
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch44
-rw-r--r--meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch35
-rw-r--r--meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch38
-rw-r--r--meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch215
-rw-r--r--meta/recipes-devtools/patch/patch/CVE-2019-13636.patch113
-rw-r--r--meta/recipes-devtools/patch/patch/debian.patch10426
-rw-r--r--meta/recipes-devtools/patch/patch/global-reject-file.diff203
-rw-r--r--meta/recipes-devtools/patch/patch/install.patch43
-rw-r--r--meta/recipes-devtools/patch/patch/unified-reject-files.diff307
-rw-r--r--meta/recipes-devtools/patch/patch_2.5.9.bb12
-rw-r--r--meta/recipes-devtools/patch/patch_2.7.5.bb15
-rw-r--r--meta/recipes-devtools/patch/patch_2.7.6.bb24
-rw-r--r--meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch46
-rw-r--r--meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch30
-rw-r--r--meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch45
-rw-r--r--meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch17
-rw-r--r--meta/recipes-devtools/patchelf/patchelf_0.10.bb16
-rw-r--r--meta/recipes-devtools/patchelf/patchelf_0.9.bb17
-rw-r--r--meta/recipes-devtools/pax-utils/pax-utils_1.1.6.bb35
-rw-r--r--meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch26
-rw-r--r--meta/recipes-devtools/perl/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch34
-rw-r--r--meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch69
-rw-r--r--meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch29
-rw-r--r--meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch30
-rw-r--r--meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch27
-rw-r--r--meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch32
-rw-r--r--meta/recipes-devtools/perl/files/errno_ver.diff37
-rw-r--r--meta/recipes-devtools/perl/files/native-perlinc.patch (renamed from meta/recipes-devtools/perl/perl/native-perlinc.patch)1
-rw-r--r--meta/recipes-devtools/perl/files/perl-configpm-switch.patch57
-rw-r--r--meta/recipes-devtools/perl/files/perl-dynloader.patch38
-rw-r--r--meta/recipes-devtools/perl/files/perl-rdepends.txt4467
-rw-r--r--meta/recipes-devtools/perl/files/run-ptest2
-rw-r--r--meta/recipes-devtools/perl/liberror-perl_0.17024.bb28
-rw-r--r--meta/recipes-devtools/perl/liberror-perl_0.17028.bb47
-rw-r--r--meta/recipes-devtools/perl/libmodule-build-perl/run-ptest16
-rw-r--r--meta/recipes-devtools/perl/libmodule-build-perl_0.4229.bb103
-rw-r--r--meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb29
-rw-r--r--meta/recipes-devtools/perl/liburi-perl_1.60.bb29
-rw-r--r--meta/recipes-devtools/perl/liburi-perl_1.74.bb50
-rw-r--r--meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb28
-rw-r--r--meta/recipes-devtools/perl/libxml-perl_0.08.bb5
-rw-r--r--meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb24
-rw-r--r--meta/recipes-devtools/perl/libxml-simple-perl_2.25.bb35
-rw-r--r--meta/recipes-devtools/perl/perl-native_5.22.1.bb128
-rw-r--r--meta/recipes-devtools/perl/perl-ptest.inc40
-rw-r--r--meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc2563
-rw-r--r--meta/recipes-devtools/perl/perl.inc10
-rw-r--r--meta/recipes-devtools/perl/perl/Configure-multilib.patch17
-rw-r--r--meta/recipes-devtools/perl/perl/MM_Unix.pm.patch22
-rw-r--r--meta/recipes-devtools/perl/perl/Makefile.SH.patch375
-rw-r--r--meta/recipes-devtools/perl/perl/Makefile.patch58
-rw-r--r--meta/recipes-devtools/perl/perl/config.sh1221
-rw-r--r--meta/recipes-devtools/perl/perl/config.sh-3238
-rw-r--r--meta/recipes-devtools/perl/perl/config.sh-32-be1
-rw-r--r--meta/recipes-devtools/perl/perl/config.sh-32-le1
-rw-r--r--meta/recipes-devtools/perl/perl/config.sh-6438
-rw-r--r--meta/recipes-devtools/perl/perl/config.sh-64-be1
-rw-r--r--meta/recipes-devtools/perl/perl/config.sh-64-le1
-rw-r--r--meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch15
-rw-r--r--meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff62
-rw-r--r--meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff37
-rw-r--r--meta/recipes-devtools/perl/perl/debian/db_file_ver.diff34
-rw-r--r--meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff56
-rw-r--r--meta/recipes-devtools/perl/perl/debian/doc_info.diff35
-rw-r--r--meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff70
-rw-r--r--meta/recipes-devtools/perl/perl/debian/errno_ver.diff35
-rw-r--r--meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff37
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fakeroot.diff42
-rw-r--r--meta/recipes-devtools/perl/perl/debian/find_html2text.diff35
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff31
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff110
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff25
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff73
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff170
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff51
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff109
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff86
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff33
-rw-r--r--meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff153
-rw-r--r--meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff27
-rw-r--r--meta/recipes-devtools/perl/perl/debian/ld_run_path.diff24
-rw-r--r--meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff37
-rw-r--r--meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff26
-rw-r--r--meta/recipes-devtools/perl/perl/debian/locale-robustness.diff52
-rw-r--r--meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff30
-rw-r--r--meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff42
-rw-r--r--meta/recipes-devtools/perl/perl/debian/mod_paths.diff99
-rw-r--r--meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff92
-rw-r--r--meta/recipes-devtools/perl/perl/debian/patchlevel.diff30
-rw-r--r--meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch29
-rw-r--r--meta/recipes-devtools/perl/perl/debian/perlivp.diff39
-rw-r--r--meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff23
-rw-r--r--meta/recipes-devtools/perl/perl/debian/prefix_changes.diff118
-rw-r--r--meta/recipes-devtools/perl/perl/debian/prune_libs.diff38
-rw-r--r--meta/recipes-devtools/perl/perl/debian/regen-skip.diff27
-rw-r--r--meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff40
-rw-r--r--meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff28
-rw-r--r--meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff56
-rw-r--r--meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff36
-rw-r--r--meta/recipes-devtools/perl/perl/dynaloaderhack.patch23
-rw-r--r--meta/recipes-devtools/perl/perl/ext-ODBM_File-hints-linux.pl-link-libgdbm_compat.patch35
-rw-r--r--meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch31
-rw-r--r--meta/recipes-devtools/perl/perl/fix_bad_rpath.patch24
-rw-r--r--meta/recipes-devtools/perl/perl/generate-sh.patch56
-rw-r--r--meta/recipes-devtools/perl/perl/installperl.patch17
-rw-r--r--meta/recipes-devtools/perl/perl/letgcc-find-errno.patch46
-rw-r--r--meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch30
-rw-r--r--meta/recipes-devtools/perl/perl/native-nopacklist.patch91
-rw-r--r--meta/recipes-devtools/perl/perl/perl-PathTools-don-t-filter-out-blib-from-INC.patch33
-rw-r--r--meta/recipes-devtools/perl/perl/perl-archlib-exp.patch40
-rw-r--r--meta/recipes-devtools/perl/perl/perl-configpm-switch.patch47
-rwxr-xr-xmeta/recipes-devtools/perl/perl/perl-configure.sh43
-rw-r--r--meta/recipes-devtools/perl/perl/perl-dynloader.patch34
-rw-r--r--meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch19
-rw-r--r--meta/recipes-devtools/perl/perl/perl-errno-generation-gcc5.patch37
-rw-r--r--meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch74
-rw-r--r--meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch352
-rw-r--r--meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-2381.patch114
-rw-r--r--meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch128
-rw-r--r--meta/recipes-devtools/perl/perl/perl-fix-conflict-between-skip_all-and-END.patch181
-rw-r--r--meta/recipes-devtools/perl/perl/perl-moreconfig.patch18
-rw-r--r--meta/recipes-devtools/perl/perl/perl-remove-nm-from-libswanted.patch30
-rw-r--r--meta/recipes-devtools/perl/perl/perl-test-customized.patch61
-rw-r--r--meta/recipes-devtools/perl/perl/run-ptest2
-rw-r--r--meta/recipes-devtools/perl/perl/t-run-switches.t-perl5-perl.patch30
-rw-r--r--meta/recipes-devtools/perl/perl/test/dist-threads-t-join.t-adjust-ps-option.patch38
-rw-r--r--meta/recipes-devtools/perl/perl/test/ext-DynaLoader-t-DynaLoader.t-fix-calling-dl_findfil.patch26
-rw-r--r--meta/recipes-devtools/perl/perl_5.22.1.bb375
-rw-r--r--meta/recipes-devtools/perl/perl_5.30.1.bb336
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in24
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in6
-rwxr-xr-xmeta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper16
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf_1.6.3.bb69
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch39
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in24
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in4
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig_git.bb38
-rw-r--r--meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb19
-rw-r--r--meta/recipes-devtools/prelink/prelink/0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch51
-rw-r--r--meta/recipes-devtools/prelink/prelink_git.bb23
-rw-r--r--meta/recipes-devtools/pseudo/files/0001-Add-statx.patch106
-rw-r--r--meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch48
-rw-r--r--meta/recipes-devtools/pseudo/files/0001-maketables-wrappers-use-Python-3.patch34
-rw-r--r--meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch57
-rw-r--r--meta/recipes-devtools/pseudo/files/Fix-xattr-performance.patch117
-rw-r--r--meta/recipes-devtools/pseudo/files/fallback-passwd1
-rw-r--r--meta/recipes-devtools/pseudo/files/toomanyfiles.patch71
-rw-r--r--meta/recipes-devtools/pseudo/pseudo.inc10
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.8.1.bb13
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_git.bb16
-rw-r--r--meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch60
-rw-r--r--meta/recipes-devtools/python-numpy/files/0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch32
-rw-r--r--meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h32
-rw-r--r--meta/recipes-devtools/python-numpy/files/aarch64/config.h139
-rw-r--r--meta/recipes-devtools/python-numpy/files/arm/config.h21
-rw-r--r--meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h17
-rw-r--r--meta/recipes-devtools/python-numpy/files/armeb/config.h21
-rw-r--r--meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h17
-rw-r--r--meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch29
-rw-r--r--meta/recipes-devtools/python-numpy/files/mips/_numpyconfig.h32
-rw-r--r--meta/recipes-devtools/python-numpy/files/mips/config.h139
-rw-r--r--meta/recipes-devtools/python-numpy/files/mips64/_numpyconfig.h32
-rw-r--r--meta/recipes-devtools/python-numpy/files/mips64/config.h139
-rw-r--r--meta/recipes-devtools/python-numpy/files/mips64n32/_numpyconfig.h31
-rw-r--r--meta/recipes-devtools/python-numpy/files/mips64n32/config.h139
-rw-r--r--meta/recipes-devtools/python-numpy/files/mipsel/config.h21
-rw-r--r--meta/recipes-devtools/python-numpy/files/mipsel/numpyconfig.h18
-rw-r--r--meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h32
-rw-r--r--meta/recipes-devtools/python-numpy/files/powerpc/config.h139
-rw-r--r--meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h32
-rw-r--r--meta/recipes-devtools/python-numpy/files/powerpc64/config.h139
-rw-r--r--meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch30
-rw-r--r--meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h32
-rw-r--r--meta/recipes-devtools/python-numpy/files/x86-64/config.h139
-rw-r--r--meta/recipes-devtools/python-numpy/files/x86/config.h108
-rw-r--r--meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h24
-rw-r--r--meta/recipes-devtools/python-numpy/python-numpy.inc52
-rw-r--r--meta/recipes-devtools/python-numpy/python-numpy_1.11.1.bb104
-rw-r--r--meta/recipes-devtools/python-numpy/python3-numpy_1.11.0.bb105
-rw-r--r--meta/recipes-devtools/python-numpy/python3-numpy_1.17.4.bb3
-rw-r--r--meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch32
-rw-r--r--meta/recipes-devtools/python/python-2.7-manifest.inc288
-rw-r--r--meta/recipes-devtools/python/python-3.5-manifest.inc280
-rw-r--r--meta/recipes-devtools/python/python-async.inc11
-rw-r--r--meta/recipes-devtools/python/python-async_0.6.2.bb5
-rw-r--r--meta/recipes-devtools/python/python-extras.inc12
-rw-r--r--meta/recipes-devtools/python/python-git.inc21
-rw-r--r--meta/recipes-devtools/python/python-git_2.0.7.bb7
-rw-r--r--meta/recipes-devtools/python/python-gitdb.inc20
-rw-r--r--meta/recipes-devtools/python/python-gitdb_0.6.4.bb7
-rw-r--r--meta/recipes-devtools/python/python-mako.inc15
-rw-r--r--meta/recipes-devtools/python/python-mako_1.0.4.bb17
-rw-r--r--meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch40
-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/debug.patch32
-rw-r--r--meta/recipes-devtools/python/python-native/multilib.patch102
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.12.bb61
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.17.bb90
-rw-r--r--meta/recipes-devtools/python/python-nose.inc18
-rw-r--r--meta/recipes-devtools/python/python-nose_1.3.7.bb24
-rw-r--r--meta/recipes-devtools/python/python-pbr.inc12
-rw-r--r--meta/recipes-devtools/python/python-pexpect_4.2.0.bb28
-rw-r--r--meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb23
-rw-r--r--meta/recipes-devtools/python/python-pycurl/no-static-link.patch17
-rw-r--r--meta/recipes-devtools/python/python-pycurl_7.21.5.bb33
-rw-r--r--meta/recipes-devtools/python/python-scons-native_2.5.0.bb8
-rw-r--r--meta/recipes-devtools/python/python-scons_2.5.0.bb23
-rw-r--r--meta/recipes-devtools/python/python-setuptools.inc45
-rw-r--r--meta/recipes-devtools/python/python-setuptools_22.0.5.bb38
-rw-r--r--meta/recipes-devtools/python/python-setuptools_42.0.2.bb9
-rw-r--r--meta/recipes-devtools/python/python-six.inc14
-rw-r--r--meta/recipes-devtools/python/python-six_1.10.0.bb4
-rw-r--r--meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch38
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch47
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch35
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch54
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch158
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-attempt.patch177
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch43
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch33
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch24
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-locale.patch27
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-recommends.patch381
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch57
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch20
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch112
-rw-r--r--meta/recipes-devtools/python/python-smartpm_git.bb141
-rw-r--r--meta/recipes-devtools/python/python-smmap.inc17
-rw-r--r--meta/recipes-devtools/python/python-smmap_0.9.0.bb5
-rw-r--r--meta/recipes-devtools/python/python-subunit.inc14
-rw-r--r--meta/recipes-devtools/python/python-testtools.inc28
-rw-r--r--meta/recipes-devtools/python/python.inc36
-rw-r--r--meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch59
-rw-r--r--meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch114
-rw-r--r--meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch68
-rw-r--r--meta/recipes-devtools/python/python/CVE-2016-5636.patch44
-rw-r--r--meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch8
-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.patch30
-rw-r--r--meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch12
-rw-r--r--meta/recipes-devtools/python/python/builddir.patch46
-rw-r--r--meta/recipes-devtools/python/python/create_manifest2.py298
-rw-r--r--meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch33
-rw-r--r--meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch16
-rw-r--r--meta/recipes-devtools/python/python/float-endian.patch216
-rw-r--r--meta/recipes-devtools/python/python/get_module_deps2.py112
-rw-r--r--meta/recipes-devtools/python/python/multilib.patch134
-rw-r--r--meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch12
-rw-r--r--meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch82
-rw-r--r--meta/recipes-devtools/python/python/python-fix-CVE-2016-1000110.patch162
-rw-r--r--meta/recipes-devtools/python/python/python2-manifest.json1138
-rw-r--r--meta/recipes-devtools/python/python/run-ptest4
-rw-r--r--meta/recipes-devtools/python/python/sitecustomize.py8
-rw-r--r--meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch34
-rw-r--r--meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch1
-rw-r--r--meta/recipes-devtools/python/python3-async_0.6.2.bb6
-rw-r--r--meta/recipes-devtools/python/python3-dbus_1.2.14.bb26
-rw-r--r--meta/recipes-devtools/python/python3-dbus_1.2.4.bb23
-rw-r--r--meta/recipes-devtools/python/python3-docutils_0.12.bb18
-rw-r--r--meta/recipes-devtools/python/python3-docutils_0.15.bb17
-rw-r--r--meta/recipes-devtools/python/python3-extras_1.0.0.bb2
-rw-r--r--meta/recipes-devtools/python/python3-git_2.0.7.bb7
-rw-r--r--meta/recipes-devtools/python/python3-git_3.0.2.bb33
-rw-r--r--meta/recipes-devtools/python/python3-gitdb_0.6.4.bb7
-rw-r--r--meta/recipes-devtools/python/python3-gitdb_2.0.5.bb2
-rw-r--r--meta/recipes-devtools/python/python3-iniparse/0001-Add-python-3-compatibility.patch552
-rw-r--r--meta/recipes-devtools/python/python3-iniparse_0.4.bb17
-rw-r--r--meta/recipes-devtools/python/python3-mako_1.0.4.bb11
-rw-r--r--meta/recipes-devtools/python/python3-mako_1.1.0.bb21
-rw-r--r--meta/recipes-devtools/python/python3-native_3.5.2.bb98
-rw-r--r--meta/recipes-devtools/python/python3-nose_1.3.7.bb24
-rw-r--r--meta/recipes-devtools/python/python3-pbr_5.4.4.bb5
-rw-r--r--meta/recipes-devtools/python/python3-pip_19.3.1.bb31
-rw-r--r--meta/recipes-devtools/python/python3-pip_8.1.2.bb47
-rw-r--r--meta/recipes-devtools/python/python3-pycairo_1.10.0.bb40
-rw-r--r--meta/recipes-devtools/python/python3-pycairo_1.18.2.bb27
-rw-r--r--meta/recipes-devtools/python/python3-pygments_2.4.2.bb20
-rw-r--r--meta/recipes-devtools/python/python3-pygobject/0001-Do-not-build-tests.patch30
-rw-r--r--meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch41
-rw-r--r--meta/recipes-devtools/python/python3-pygobject_3.20.1.bb25
-rw-r--r--meta/recipes-devtools/python/python3-pygobject_3.34.0.bb33
-rw-r--r--meta/recipes-devtools/python/python3-scons-native_3.1.1.bb8
-rw-r--r--meta/recipes-devtools/python/python3-scons_3.1.1.bb29
-rw-r--r--meta/recipes-devtools/python/python3-setuptools_22.0.5.bb37
-rw-r--r--meta/recipes-devtools/python/python3-setuptools_42.0.2.bb6
-rw-r--r--meta/recipes-devtools/python/python3-six_1.10.0.bb4
-rw-r--r--meta/recipes-devtools/python/python3-six_1.13.0.bb2
-rw-r--r--meta/recipes-devtools/python/python3-smmap_0.9.0.bb5
-rw-r--r--meta/recipes-devtools/python/python3-smmap_2.0.5.bb2
-rw-r--r--meta/recipes-devtools/python/python3-subunit_1.3.0.bb4
-rw-r--r--meta/recipes-devtools/python/python3-testtools/no_traceback2.patch23
-rw-r--r--meta/recipes-devtools/python/python3-testtools_2.3.0.bb4
-rw-r--r--meta/recipes-devtools/python/python3/000-cross-compile.patch85
-rw-r--r--meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch25
-rw-r--r--meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch196
-rw-r--r--meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch27
-rw-r--r--meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch31
-rw-r--r--meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch34
-rw-r--r--meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch25
-rw-r--r--meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch35
-rw-r--r--meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch201
-rw-r--r--meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch42
-rw-r--r--meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch37
-rw-r--r--meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch47
-rw-r--r--meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch120
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch46
-rw-r--r--meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch199
-rw-r--r--meta/recipes-devtools/python/python3/0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch80
-rw-r--r--meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch31
-rw-r--r--meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch48
-rw-r--r--meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch42
-rw-r--r--meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch33
-rw-r--r--meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch36
-rw-r--r--meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch92
-rw-r--r--meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch33
-rw-r--r--meta/recipes-devtools/python/python3/130-readline-setup.patch55
-rw-r--r--meta/recipes-devtools/python/python3/150-fix-setupterm.patch17
-rw-r--r--meta/recipes-devtools/python/python3/CVE-2016-5636.patch44
-rw-r--r--meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch21
-rw-r--r--meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch45
-rw-r--r--meta/recipes-devtools/python/python3/cgi_py.patch15
-rwxr-xr-xmeta/recipes-devtools/python/python3/check_build_completeness.py17
-rw-r--r--meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch30
-rw-r--r--meta/recipes-devtools/python/python3/create_manifest3.py433
-rw-r--r--meta/recipes-devtools/python/python3/crosspythonpath.patch25
-rw-r--r--meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch54
-rw-r--r--meta/recipes-devtools/python/python3/get_module_deps3.py146
-rw-r--r--meta/recipes-devtools/python/python3/host_include_contamination.patch28
-rw-r--r--meta/recipes-devtools/python/python3/python-3.3-multilib.patch312
-rw-r--r--meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch148
-rw-r--r--meta/recipes-devtools/python/python3/python3-manifest.json1222
-rw-r--r--meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch33
-rw-r--r--meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch28
-rw-r--r--meta/recipes-devtools/python/python3/reformat_sysconfig.py21
-rw-r--r--meta/recipes-devtools/python/python3/run-ptest3
-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/setup.py-find-libraries-in-staging-dirs.patch30
-rw-r--r--meta/recipes-devtools/python/python3/setuptweaks.patch57
-rw-r--r--meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch17
-rw-r--r--meta/recipes-devtools/python/python3/sitecustomize.py37
-rw-r--r--meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch54
-rw-r--r--meta/recipes-devtools/python/python3/sysroot-include-headers.patch35
-rw-r--r--meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch52
-rw-r--r--meta/recipes-devtools/python/python3/unixccompiler.patch35
-rw-r--r--meta/recipes-devtools/python/python3/use_packed_importlib.patch31
-rw-r--r--meta/recipes-devtools/python/python3_3.5.2.bb224
-rw-r--r--meta/recipes-devtools/python/python3_3.7.5.bb343
-rw-r--r--meta/recipes-devtools/python/python_2.7.12.bb171
-rw-r--r--meta/recipes-devtools/python/python_2.7.17.bb260
-rw-r--r--meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb6
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb7
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper/tunctl.c16
-rw-r--r--meta/recipes-devtools/qemu/qemu-native.inc16
-rw-r--r--meta/recipes-devtools/qemu/qemu-native_4.1.0.bb9
-rw-r--r--meta/recipes-devtools/qemu/qemu-system-native_4.1.0.bb24
-rw-r--r--meta/recipes-devtools/qemu/qemu-targets.inc20
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc182
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch139
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch54
-rw-r--r--meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch33
-rw-r--r--meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch33
-rw-r--r--meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch34
-rw-r--r--meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch26
-rw-r--r--meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch239
-rw-r--r--meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch44
-rw-r--r--meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch33
-rw-r--r--meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch137
-rw-r--r--meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch93
-rw-r--r--meta/recipes-devtools/qemu/qemu/0010-fix-libcap-header-issue-on-some-distro.patch86
-rw-r--r--meta/recipes-devtools/qemu/qemu/0011-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch74
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch108
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2019-15890.patch48
-rw-r--r--meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch46
-rw-r--r--meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch28
-rw-r--r--meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch32
-rw-r--r--meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch76
-rw-r--r--meta/recipes-devtools/qemu/qemu/disable-grabs.patch72
-rw-r--r--meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch93
-rw-r--r--meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch84
-rw-r--r--meta/recipes-devtools/qemu/qemu/no-valgrind.patch19
-rw-r--r--meta/recipes-devtools/qemu/qemu/pathlimit.patch137
-rw-r--r--meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch13
-rw-r--r--meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch31
-rw-r--r--meta/recipes-devtools/qemu/qemu/run-ptest8
-rw-r--r--meta/recipes-devtools/qemu/qemu/wacom.patch130
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.7.0.bb23
-rw-r--r--meta/recipes-devtools/qemu/qemu_4.1.0.bb25
-rw-r--r--meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb47
-rw-r--r--meta/recipes-devtools/quilt/quilt-native.inc18
-rw-r--r--meta/recipes-devtools/quilt/quilt-native_0.64.bb2
-rw-r--r--meta/recipes-devtools/quilt/quilt-native_0.66.bb2
-rw-r--r--meta/recipes-devtools/quilt/quilt.inc68
-rw-r--r--meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch29
-rw-r--r--meta/recipes-devtools/quilt/quilt/Makefile3
-rw-r--r--meta/recipes-devtools/quilt/quilt/aclocal.patch128
-rw-r--r--meta/recipes-devtools/quilt/quilt/install.patch13
-rwxr-xr-xmeta/recipes-devtools/quilt/quilt/run-ptest2
-rw-r--r--meta/recipes-devtools/quilt/quilt_0.64.bb16
-rw-r--r--meta/recipes-devtools/quilt/quilt_0.66.bb2
-rw-r--r--meta/recipes-devtools/remake/remake.inc16
-rw-r--r--meta/recipes-devtools/remake/remake/version-remake.texi.patch16
-rw-r--r--meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb28
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch40
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch33
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch58
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch38
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch28
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch48
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch84
-rw-r--r--meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch62
-rw-r--r--meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch58
-rw-r--r--meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch32
-rw-r--r--meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch65
-rw-r--r--meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch72
-rw-r--r--meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch127
-rw-r--r--meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch207
-rw-r--r--meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch336
-rw-r--r--meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch33
-rw-r--r--meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch55
-rw-r--r--meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch30
-rw-r--r--meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch35
-rw-r--r--meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch294
-rw-r--r--meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch63
-rw-r--r--meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch49
-rw-r--r--meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch29
-rw-r--r--meta/recipes-devtools/rpm/rpm/dbconvert.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm/debugedit-segv.patch100
-rw-r--r--meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch65
-rw-r--r--meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch54
-rw-r--r--meta/recipes-devtools/rpm/rpm/header-include-fix.patch36
-rw-r--r--meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch33
-rw-r--r--meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch14
-rwxr-xr-xmeta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh50
-rw-r--r--meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch31
-rwxr-xr-xmeta/recipes-devtools/rpm/rpm/pythondeps.sh16
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch73
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch78
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-autogen.patch25
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch136
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch96
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch19
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch174
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-db60.patch56
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch77
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch65
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch28
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch25
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch36
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch30
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch43
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch64
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch43
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch52
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch22
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch15
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-lua.patch33
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch31
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-macros.patch64
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch69
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch19
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch47
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch23
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch25
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch126
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch37
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch28
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-platform.patch137
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-platform2.patch105
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-py-init.patch29
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch35
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch49
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-realpath.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch31
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch40
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch124
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch34
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch19
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch26
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch159
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-showrc.patch26
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch1081
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch50
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch25
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch40
-rwxr-xr-xmeta/recipes-devtools/rpm/rpm/rpm2cpio39
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmatch.patch34
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch53
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch194
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch70
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch50
-rw-r--r--meta/recipes-devtools/rpm/rpm/uclibc-support.patch63
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.14.2.1.bb153
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.16.bb707
-rw-r--r--meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c426
-rw-r--r--meta/recipes-devtools/rpm/rpmresolve_1.0.bb29
-rw-r--r--meta/recipes-devtools/rsync/files/CVE-2016-9840.patch75
-rw-r--r--meta/recipes-devtools/rsync/files/CVE-2016-9841.patch228
-rw-r--r--meta/recipes-devtools/rsync/files/CVE-2016-9842.patch33
-rw-r--r--meta/recipes-devtools/rsync/files/CVE-2016-9843.patch53
-rw-r--r--meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch71
-rw-r--r--meta/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf15
-rw-r--r--meta/recipes-devtools/rsync/rsync.inc20
-rw-r--r--meta/recipes-devtools/rsync/rsync_2.6.9.bb15
-rw-r--r--meta/recipes-devtools/rsync/rsync_3.1.2.bb32
-rw-r--r--meta/recipes-devtools/rsync/rsync_3.1.3.bb54
-rw-r--r--meta/recipes-devtools/ruby/ruby.inc17
-rw-r--r--meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch34
-rw-r--r--meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch19
-rw-r--r--meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch103
-rw-r--r--meta/recipes-devtools/ruby/ruby/extmk.patch13
-rw-r--r--meta/recipes-devtools/ruby/ruby/run-ptest13
-rw-r--r--meta/recipes-devtools/ruby/ruby_2.2.5.bb42
-rw-r--r--meta/recipes-devtools/ruby/ruby_2.6.5.bb77
-rwxr-xr-xmeta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts24
-rw-r--r--meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service3
-rw-r--r--meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb5
-rw-r--r--meta/recipes-devtools/sgml-common/sgml-common-0.6.3/autohell.patch61
-rw-r--r--meta/recipes-devtools/sgml-common/sgml-common-0.6.3/license.patch29
-rw-r--r--meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb70
-rw-r--r--meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb68
-rw-r--r--meta/recipes-devtools/sgmlspl/sgmlspl-native_git.bb21
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-mksquashfs.c-get-inline-functions-work-with-C99.patch154
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch63
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb49
-rw-r--r--meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch36
-rw-r--r--meta/recipes-devtools/strace/strace/0001-caps-abbrev.awk-fix-gawk-s-path.patch47
-rw-r--r--meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch32
-rw-r--r--meta/recipes-devtools/strace/strace/Makefile-ptest.patch42
-rw-r--r--meta/recipes-devtools/strace/strace/disable-git-version-gen.patch37
-rw-r--r--meta/recipes-devtools/strace/strace/mips-SIGEMT.patch19
-rw-r--r--meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch19
-rw-r--r--meta/recipes-devtools/strace/strace/ptest-spacesave.patch19
-rwxr-xr-xmeta/recipes-devtools/strace/strace/run-ptest3
-rw-r--r--meta/recipes-devtools/strace/strace/sys_headers.patch25
-rw-r--r--meta/recipes-devtools/strace/strace/uintptr_t.patch17
-rw-r--r--meta/recipes-devtools/strace/strace/update-gawk-paths.patch73
-rw-r--r--meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch51
-rw-r--r--meta/recipes-devtools/strace/strace_4.13.bb49
-rw-r--r--meta/recipes-devtools/strace/strace_5.3.bb58
-rw-r--r--meta/recipes-devtools/subversion/subversion/disable_macos.patch45
-rw-r--r--meta/recipes-devtools/subversion/subversion/serf.m4-Regex-modified-to-allow-D-in-paths.patch32
-rw-r--r--meta/recipes-devtools/subversion/subversion/serfmacro.patch31
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.12.2.bb61
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.9.4.bb54
-rw-r--r--meta/recipes-devtools/swig/swig.inc23
-rw-r--r--meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch330
-rw-r--r--meta/recipes-devtools/swig/swig/0001-Fix-generated-code-for-constant-expressions-containi.patch179
-rw-r--r--meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch191
-rw-r--r--meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch36
-rw-r--r--meta/recipes-devtools/swig/swig_3.0.12.bb12
-rw-r--r--meta/recipes-devtools/swig/swig_3.0.8.bb8
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0001-install-don-t-install-obsolete-file-com32.ld.patch32
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch44
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch37
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch33
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch35
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch34
-rw-r--r--meta/recipes-devtools/syslinux/syslinux_6.03.bb89
-rw-r--r--meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb106
-rw-r--r--meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch45
-rw-r--r--meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch36
-rw-r--r--meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch423
-rw-r--r--meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch33
-rw-r--r--meta/recipes-devtools/systemd-bootchart/systemd-bootchart_230.bb29
-rw-r--r--meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb38
-rw-r--r--meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch46
-rw-r--r--meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch19
-rwxr-xr-xmeta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init12
-rw-r--r--meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service2
-rw-r--r--meta/recipes-devtools/tcf-agent/tcf-agent_git.bb25
-rw-r--r--meta/recipes-devtools/tcltk/tcl/0001-Fix-abd4abedd2-Failed-to-build-tk-8.6.10-with-cross-.patch44
-rw-r--r--meta/recipes-devtools/tcltk/tcl/alter-includedir.patch5
-rw-r--r--meta/recipes-devtools/tcltk/tcl/run-ptest15
-rw-r--r--meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch4
-rw-r--r--meta/recipes-devtools/tcltk/tcl/tcl-remove-hardcoded-install-path.patch15
-rw-r--r--meta/recipes-devtools/tcltk/tcl_8.6.10.bb102
-rw-r--r--meta/recipes-devtools/tcltk/tcl_8.6.6.bb97
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch54
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch85
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch37
-rw-r--r--meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb38
-rw-r--r--meta/recipes-devtools/unfs3/unfs3_git.bb43
-rw-r--r--meta/recipes-devtools/unifdef/unifdef_2.11.bb2
-rw-r--r--meta/recipes-devtools/vala/vala.inc20
-rw-r--r--meta/recipes-devtools/vala/vala_0.32.1.bb8
-rw-r--r--meta/recipes-devtools/vala/vala_0.46.4.bb8
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch36
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch182
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch27
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch40
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch69
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch82
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch108
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch32
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch31
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch39
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch39
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch52
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch32
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch35
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch32
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch45
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch68
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch63
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch37
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch4
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch30
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch32
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch37
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch33
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch64
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64236
-rwxr-xr-xmeta/recipes-devtools/valgrind/valgrind/run-ptest56
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch45
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.11.0.bb123
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.15.0.bb206
-rw-r--r--meta/recipes-devtools/xmlto/files/catalog.xml19
-rw-r--r--meta/recipes-devtools/xmlto/xmlto_0.0.28.bb18
-rw-r--r--meta/recipes-devtools/yasm/yasm_1.3.0.bb14
-rw-r--r--meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb20
-rw-r--r--meta/recipes-extended/acpica/acpica_20191018.bb49
-rw-r--r--meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch53
-rw-r--r--meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb26
-rw-r--r--meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch12
-rw-r--r--meta/recipes-extended/at/at/fix_parallel_build_error.patch15
-rw-r--r--meta/recipes-extended/at/at/makefile-fix-parallel.patch15
-rw-r--r--meta/recipes-extended/at/at/pam.conf.patch40
-rw-r--r--meta/recipes-extended/at/at_3.1.20.bb71
-rw-r--r--meta/recipes-extended/at/at_3.1.23.bb78
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/build-tests.patch44
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch33
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch29
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/run-ptest2
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/string-format.patch21
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/test-output.patch25
-rw-r--r--meta/recipes-extended/bash/bash.inc72
-rw-r--r--meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch35
-rw-r--r--meta/recipes-extended/bash/bash/build-tests.patch7
-rw-r--r--meta/recipes-extended/bash/bash/execute_cmd.patch19
-rw-r--r--meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch169
-rw-r--r--meta/recipes-extended/bash/bash/fix-run-intl.patch110
-rw-r--r--meta/recipes-extended/bash/bash/run-bash-ptests4
-rw-r--r--meta/recipes-extended/bash/bash/run-ptest6
-rw-r--r--meta/recipes-extended/bash/bash/test-output.patch47
-rw-r--r--meta/recipes-extended/bash/bash_3.2.48.bb47
-rw-r--r--meta/recipes-extended/bash/bash_4.3.30.bb71
-rw-r--r--meta/recipes-extended/bash/bash_5.0.bb45
-rw-r--r--meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch44
-rw-r--r--meta/recipes-extended/bc/bc/libmath.h46
-rw-r--r--meta/recipes-extended/bc/bc/no-gen-libmath.patch24
-rw-r--r--meta/recipes-extended/bc/bc_1.06.bb26
-rw-r--r--meta/recipes-extended/bc/bc_1.07.1.bb34
-rw-r--r--meta/recipes-extended/bc/files/fix-segment-fault.patch28
-rw-r--r--meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch2
-rw-r--r--meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch2
-rw-r--r--meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch2
-rw-r--r--meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch19
-rw-r--r--meta/recipes-extended/blktool/blktool_4-7.1.bb29
-rw-r--r--meta/recipes-extended/blktool/blktool_4-7.bb28
-rw-r--r--meta/recipes-extended/byacc/byacc.inc21
-rw-r--r--meta/recipes-extended/byacc/byacc/byacc-open.patch25
-rw-r--r--meta/recipes-extended/byacc/byacc_20160606.bb12
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch18
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac11
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch55
-rw-r--r--meta/recipes-extended/bzip2/bzip2/Makefile.am (renamed from meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am)3
-rw-r--r--meta/recipes-extended/bzip2/bzip2/configure.ac11
-rw-r--r--meta/recipes-extended/bzip2/bzip2/run-ptest (renamed from meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest)0
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.6.bb45
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.8.bb45
-rw-r--r--meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb2
-rw-r--r--meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb12
-rw-r--r--meta/recipes-extended/cpio/cpio-2.13/0001-Fix-CVE-2015-1197.patch (renamed from meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch)0
-rw-r--r--meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch (renamed from meta/recipes-extended/cpio/cpio-2.12/0001-Unset-need_charset_alias-when-building-for-musl.patch)0
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch26
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch217
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch31
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/statdef.patch15
-rw-r--r--meta/recipes-extended/cpio/cpio_2.12.bb12
-rw-r--r--meta/recipes-extended/cpio/cpio_2.13.bb49
-rw-r--r--meta/recipes-extended/cpio/cpio_2.8.bb19
-rw-r--r--meta/recipes-extended/cpio/cpio_v2.inc43
-rw-r--r--meta/recipes-extended/cronie/cronie/crond_pam_config.patch16
-rw-r--r--meta/recipes-extended/cronie/cronie_1.5.1.bb81
-rw-r--r--meta/recipes-extended/cronie/cronie_1.5.5.bb84
-rw-r--r--meta/recipes-extended/cups/cups.inc28
-rw-r--r--meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch31
-rw-r--r--meta/recipes-extended/cups/cups/cups-avoid-install-file-conflicts.patch21
-rw-r--r--meta/recipes-extended/cups/cups/cups_serverbin.patch10
-rw-r--r--meta/recipes-extended/cups/cups_2.1.4.bb6
-rw-r--r--meta/recipes-extended/cups/cups_2.2.12.bb6
-rw-r--r--meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch27
-rw-r--r--meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch31
-rw-r--r--meta/recipes-extended/diffutils/diffutils-3.4/0001-Unset-need_charset_alias-when-building-for-musl.patch33
-rw-r--r--meta/recipes-extended/diffutils/diffutils-3.4/run-ptest3
-rw-r--r--meta/recipes-extended/diffutils/diffutils.inc9
-rw-r--r--meta/recipes-extended/diffutils/diffutils/0001-Skip-strip-trailing-cr-test-case.patch35
-rw-r--r--meta/recipes-extended/diffutils/diffutils/run-ptest4
-rw-r--r--meta/recipes-extended/diffutils/diffutils_2.8.1.bb17
-rw-r--r--meta/recipes-extended/diffutils/diffutils_3.4.bb37
-rw-r--r--meta/recipes-extended/diffutils/diffutils_3.7.bb40
-rw-r--r--meta/recipes-extended/ed/ed_0.5.bb20
-rw-r--r--meta/recipes-extended/ed/ed_1.15.bb38
-rw-r--r--meta/recipes-extended/ed/ed_1.9.bb33
-rw-r--r--meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch20
-rw-r--r--meta/recipes-extended/ethtool/ethtool_4.6.bb30
-rw-r--r--meta/recipes-extended/ethtool/ethtool_5.3.bb33
-rw-r--r--meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch53
-rw-r--r--meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch23
-rw-r--r--meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch56
-rw-r--r--meta/recipes-extended/findutils/findutils.inc7
-rw-r--r--meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch15
-rw-r--r--meta/recipes-extended/findutils/findutils/0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch144
-rw-r--r--meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch140
-rw-r--r--meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch78
-rw-r--r--meta/recipes-extended/findutils/findutils_4.2.31.bb14
-rw-r--r--meta/recipes-extended/findutils/findutils_4.6.0.bb8
-rw-r--r--meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb1
-rw-r--r--meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch67
-rw-r--r--meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch41
-rw-r--r--meta/recipes-extended/gawk/gawk-4.1.3/run-ptest10
-rw-r--r--meta/recipes-extended/gawk/gawk/run-ptest22
-rw-r--r--meta/recipes-extended/gawk/gawk_3.1.5.bb44
-rw-r--r--meta/recipes-extended/gawk/gawk_4.1.3.bb46
-rw-r--r--meta/recipes-extended/gawk/gawk_5.0.1.bb53
-rw-r--r--meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch10
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14869-0001.patch70
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch33
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch14
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch14
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch36
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch99
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch28
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch10
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch47
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch78
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch37
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mipsarchn32eb/objarch.h (renamed from meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h)0
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mipsarchn32el/objarch.h (renamed from meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h)0
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mipsarchn64eb/objarch.h (renamed from meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h)0
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mipsarchn64el/objarch.h (renamed from meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h)0
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mipsarcho32eb/objarch.h (renamed from meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h)0
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mipsarcho32el/objarch.h (renamed from meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h)0
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch50
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/png_mak.patch32
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_9.19.bb106
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_9.50.bb129
-rw-r--r--meta/recipes-extended/go-examples/go-helloworld_0.1.bb20
-rw-r--r--meta/recipes-extended/gperf/gperf.inc22
-rw-r--r--meta/recipes-extended/gperf/gperf_3.0.3.bb10
-rw-r--r--meta/recipes-extended/gperf/gperf_3.0.4.bb5
-rw-r--r--meta/recipes-extended/gperf/gperf_3.1.bb18
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/Makevars25
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch17
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch17
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/gettext.patch15
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch33
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch1342
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch52
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch55
-rw-r--r--meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch33
-rw-r--r--meta/recipes-extended/grep/grep_2.25.bb43
-rw-r--r--meta/recipes-extended/grep/grep_2.5.1a.bb56
-rw-r--r--meta/recipes-extended/grep/grep_3.3.bb45
-rw-r--r--meta/recipes-extended/groff/files/0001-Include-config.h.patch1228
-rw-r--r--meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch106
-rw-r--r--meta/recipes-extended/groff/files/0001-support-musl.patch41
-rw-r--r--meta/recipes-extended/groff/files/groff-not-search-fonts-on-build-host.patch32
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch61
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch39
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch39
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch36
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch36
-rw-r--r--meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch34
-rw-r--r--meta/recipes-extended/groff/groff_1.18.1.4.bb50
-rw-r--r--meta/recipes-extended/groff/groff_1.22.3.bb81
-rw-r--r--meta/recipes-extended/groff/groff_1.22.4.bb65
-rw-r--r--meta/recipes-extended/gzip/files/run-ptest6
-rw-r--r--meta/recipes-extended/gzip/gzip-1.10/wrong-path-fix.patch36
-rw-r--r--meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch48
-rw-r--r--meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch56
-rw-r--r--meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch29
-rw-r--r--meta/recipes-extended/gzip/gzip_1.10.bb40
-rw-r--r--meta/recipes-extended/gzip/gzip_1.3.12.bb15
-rw-r--r--meta/recipes-extended/gzip/gzip_1.8.bb18
-rw-r--r--meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch38
-rw-r--r--meta/recipes-extended/hdparm/hdparm_9.48.bb40
-rw-r--r--meta/recipes-extended/hdparm/hdparm_9.58.bb43
-rw-r--r--meta/recipes-extended/images/core-image-kernel-dev.bb3
-rw-r--r--meta/recipes-extended/images/core-image-lsb-dev.bb7
-rw-r--r--meta/recipes-extended/images/core-image-lsb-sdk.bb9
-rw-r--r--meta/recipes-extended/images/core-image-lsb.bb14
-rw-r--r--meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch28
-rw-r--r--meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch46
-rw-r--r--meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch53
-rw-r--r--meta/recipes-extended/iptables/iptables/ip6tables.rules0
-rw-r--r--meta/recipes-extended/iptables/iptables/ip6tables.service13
-rw-r--r--meta/recipes-extended/iptables/iptables/iptables.rules0
-rw-r--r--meta/recipes-extended/iptables/iptables/iptables.service13
-rw-r--r--meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch49
-rw-r--r--meta/recipes-extended/iptables/iptables_1.6.0.bb50
-rw-r--r--meta/recipes-extended/iptables/iptables_1.8.3.bb108
-rw-r--r--meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch92
-rw-r--r--meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch52
-rw-r--r--meta/recipes-extended/iputils/files/debian/targets.diff15
-rw-r--r--meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff31
-rw-r--r--meta/recipes-extended/iputils/files/nsgmls-path-fix.patch27
-rw-r--r--meta/recipes-extended/iputils/iputils_s20151218.bb76
-rw-r--r--meta/recipes-extended/iputils/iputils_s20190709.bb59
-rw-r--r--meta/recipes-extended/less/less_481.bb42
-rw-r--r--meta/recipes-extended/less/less_551.bb43
-rw-r--r--meta/recipes-extended/libaio/libaio/00_arches.patch194
-rw-r--r--meta/recipes-extended/libaio/libaio/destdir.patch12
-rw-r--r--meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch65
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch61
-rw-r--r--meta/recipes-extended/libaio/libaio_0.3.110.bb26
-rw-r--r--meta/recipes-extended/libaio/libaio_0.3.111.bb23
-rw-r--r--meta/recipes-extended/libarchive/libarchive/CVE-2019-19221.patch101
-rw-r--r--meta/recipes-extended/libarchive/libarchive_3.2.1.bb67
-rw-r--r--meta/recipes-extended/libarchive/libarchive_3.4.0.bb68
-rw-r--r--meta/recipes-extended/libidn/libidn/0001-idn-format-security-warnings.patch (renamed from meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch)0
-rw-r--r--meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch25
-rw-r--r--meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch21
-rw-r--r--meta/recipes-extended/libidn/libidn2_2.3.0.bb31
-rw-r--r--meta/recipes-extended/libidn/libidn_0.6.14.bb36
-rw-r--r--meta/recipes-extended/libidn/libidn_1.33.bb42
-rw-r--r--meta/recipes-extended/libidn/libidn_1.35.bb42
-rw-r--r--meta/recipes-extended/libmnl/libmnl_1.0.4.bb15
-rw-r--r--meta/recipes-extended/libnsl/libnsl2_git.bb24
-rw-r--r--meta/recipes-extended/libnss-nis/libnss-nis.bb31
-rw-r--r--meta/recipes-extended/libpipeline/libpipeline_1.5.1.bb15
-rw-r--r--meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch254
-rw-r--r--meta/recipes-extended/libsolv/libsolv_0.6.23.bb29
-rw-r--r--meta/recipes-extended/libsolv/libsolv_0.7.8.bb31
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch62
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch878
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch26
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc/musl.patch30
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch144
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb40
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb28
-rw-r--r--meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch62
-rw-r--r--meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch34
-rw-r--r--meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch27
-rw-r--r--meta/recipes-extended/libuser/libuser_0.62.bb32
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch45
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/lighttpd2
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/lighttpd.service12
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.41.bb79
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.54.bb83
-rw-r--r--meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch141
-rw-r--r--meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch40
-rw-r--r--meta/recipes-extended/logrotate/logrotate/update-the-manual.patch16
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.15.1.bb99
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.9.1.bb63
-rw-r--r--meta/recipes-extended/lsb/lsb-release/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch38
-rw-r--r--meta/recipes-extended/lsb/lsb-release_1.4.bb36
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/init-functions44
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_killproc6
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_log_message27
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_pidofproc6
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_start_daemon45
-rw-r--r--meta/recipes-extended/lsb/lsb_4.1.bb132
-rw-r--r--meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch24
-rw-r--r--meta/recipes-extended/lsb/lsbinitscripts/functions.patch26
-rw-r--r--meta/recipes-extended/lsb/lsbinitscripts_9.68.bb33
-rw-r--r--meta/recipes-extended/lsb/lsbtest/LSB_Test.sh525
-rw-r--r--meta/recipes-extended/lsb/lsbtest/packages_list49
-rw-r--r--meta/recipes-extended/lsb/lsbtest/session185
-rw-r--r--meta/recipes-extended/lsb/lsbtest_1.0.bb49
-rw-r--r--meta/recipes-extended/lsof/files/lsof-remove-host-information.patch76
-rw-r--r--meta/recipes-extended/lsof/lsof_4.89.bb58
-rw-r--r--meta/recipes-extended/lsof/lsof_4.91.bb63
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch72
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch149
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch64
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch81
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch30
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch35
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch57
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch46
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch75
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch41
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-testcases-use-python3-everywhere-to-run-python-scrip.patch161
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch36
-rw-r--r--meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch43
-rw-r--r--meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch68
-rw-r--r--meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch47
-rw-r--r--meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch45
-rw-r--r--meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch58
-rw-r--r--meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch147
-rw-r--r--meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch34
-rw-r--r--meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch45
-rw-r--r--meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch35
-rw-r--r--meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch31
-rw-r--r--meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch32
-rw-r--r--meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch394
-rw-r--r--meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch285
-rw-r--r--meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch41
-rw-r--r--meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch270
-rw-r--r--meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch68
-rw-r--r--meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch73
-rw-r--r--meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch82
-rw-r--r--meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch136
-rw-r--r--meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch56
-rw-r--r--meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch351
-rw-r--r--meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch64
-rw-r--r--meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch67
-rw-r--r--meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch56
-rw-r--r--meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch64
-rw-r--r--meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch45
-rw-r--r--meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch88
-rw-r--r--meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch32
-rw-r--r--meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch32
-rw-r--r--meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch48
-rw-r--r--meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch71
-rw-r--r--meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch29
-rw-r--r--meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch48
-rw-r--r--meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch68
-rw-r--r--meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch28
-rw-r--r--meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch29
-rw-r--r--meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch29
-rw-r--r--meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch43
-rw-r--r--meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch32
-rw-r--r--meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch33
-rw-r--r--meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch33
-rw-r--r--meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch30
-rw-r--r--meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch41
-rw-r--r--meta/recipes-extended/ltp/ltp/0034-periodic_output.patch43
-rw-r--r--meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch23
-rw-r--r--meta/recipes-extended/ltp/ltp_20160126.bb118
-rw-r--r--meta/recipes-extended/ltp/ltp_20190517.bb122
-rw-r--r--meta/recipes-extended/lzip/lzip_1.21.bb41
-rw-r--r--meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch59
-rw-r--r--meta/recipes-extended/mailx/files/0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch41
-rw-r--r--meta/recipes-extended/mailx/files/0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch25
-rw-r--r--meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch71
-rw-r--r--meta/recipes-extended/mailx/files/0012-unpack-Disable-option-processing-for-email-addresses.patch79
-rw-r--r--meta/recipes-extended/mailx/files/0013-fio.c-Unconditionally-require-wordexp-support.patch113
-rw-r--r--meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch31
-rw-r--r--meta/recipes-extended/mailx/files/0015-usr-sbin-sendmail.patch38
-rw-r--r--meta/recipes-extended/mailx/files/explicitly.disable.krb5.support.patch46
-rw-r--r--meta/recipes-extended/mailx/mailx_12.5-5.bb53
-rw-r--r--meta/recipes-extended/man-db/files/99_mandb1
-rw-r--r--meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch16
-rw-r--r--meta/recipes-extended/man-db/man-db_2.9.0.bb59
-rw-r--r--meta/recipes-extended/man-pages/man-pages_4.07.bb31
-rw-r--r--meta/recipes-extended/man-pages/man-pages_5.04.bb37
-rw-r--r--meta/recipes-extended/man/man/configure_sed.patch32
-rw-r--r--meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch16
-rw-r--r--meta/recipes-extended/man/man/man-1.5h1-gencat.patch14
-rw-r--r--meta/recipes-extended/man/man/man-1.5h1-make.patch17
-rw-r--r--meta/recipes-extended/man/man/man-1.5i2-initial.patch19
-rw-r--r--meta/recipes-extended/man/man/man-1.5i2-newline.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.5i2-overflow.patch16
-rw-r--r--meta/recipes-extended/man/man/man-1.5j-i18n.patch16
-rw-r--r--meta/recipes-extended/man/man/man-1.5j-nocache.patch16
-rw-r--r--meta/recipes-extended/man/man/man-1.5j-utf8.patch61
-rw-r--r--meta/recipes-extended/man/man/man-1.5k-confpath.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.5k-nonascii.patch18
-rw-r--r--meta/recipes-extended/man/man/man-1.5k-sofix.patch24
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-bug11621.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-buildroot.patch52
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch30
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch145
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-mandirs.patch31
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-new_sections.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-ro_usr.patch33
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-security.patch62
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch160
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-whatis2.patch59
-rw-r--r--meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch105
-rw-r--r--meta/recipes-extended/man/man/man-1.6g-configure.patch68
-rw-r--r--meta/recipes-extended/man/man/man-1.6g-parallel.patch30
-rw-r--r--meta/recipes-extended/man/man/man-1.6g-whatis3.patch20
-rw-r--r--meta/recipes-extended/man/man/man.1.gzbin12323 -> 0 bytes
-rw-r--r--meta/recipes-extended/man/man/man.7.gzbin6192 -> 0 bytes
-rw-r--r--meta/recipes-extended/man/man/man.conf141
-rw-r--r--meta/recipes-extended/man/man/manpath.5.gzbin2133 -> 0 bytes
-rw-r--r--meta/recipes-extended/man/man_1.6g.bb86
-rw-r--r--meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch99
-rw-r--r--meta/recipes-extended/mc/files/0001-Ticket-3629-configure.ac-drop-bundled-gettext.patch110
-rw-r--r--meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch129
-rw-r--r--meta/recipes-extended/mc/mc/mc-CTRL.patch31
-rw-r--r--meta/recipes-extended/mc/mc_4.7.5.2.bb47
-rw-r--r--meta/recipes-extended/mc/mc_4.8.17.bb49
-rw-r--r--meta/recipes-extended/mc/mc_4.8.23.bb54
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch31
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch50
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch14
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch86
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch53
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch28
-rw-r--r--meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch39
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch28
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch43
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch12
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch55
-rw-r--r--meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch37
-rw-r--r--meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch45
-rw-r--r--meta/recipes-extended/mdadm/files/debian-no-Werror.patch25
-rw-r--r--meta/recipes-extended/mdadm/files/gcc-4.9.patch22
-rw-r--r--meta/recipes-extended/mdadm/files/include_sysmacros.patch14
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch23
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch26
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch10
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm.init72
-rw-r--r--meta/recipes-extended/mdadm/files/run-ptest10
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.4.bb75
-rw-r--r--meta/recipes-extended/mdadm/mdadm_4.1.bb106
-rw-r--r--meta/recipes-extended/mingetty/mingetty_1.08.bb1
-rw-r--r--meta/recipes-extended/minicom/minicom_2.7.1.bb28
-rw-r--r--meta/recipes-extended/minicom/minicom_2.7.bb28
-rw-r--r--meta/recipes-extended/mktemp/files/disable-strip.patch15
-rw-r--r--meta/recipes-extended/mktemp/files/fix-parallel-make.patch24
-rw-r--r--meta/recipes-extended/mktemp/mktemp_1.7.bb34
-rw-r--r--meta/recipes-extended/msmtp/msmtp_1.6.5.bb30
-rw-r--r--meta/recipes-extended/msmtp/msmtp_1.8.6.bb28
-rw-r--r--meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch47
-rw-r--r--meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch52
-rw-r--r--meta/recipes-extended/net-tools/net-tools_1.60-26.bb57
-rw-r--r--meta/recipes-extended/newt/files/cross_ar.patch26
-rw-r--r--meta/recipes-extended/newt/files/fix_SHAREDDIR.patch37
-rw-r--r--meta/recipes-extended/newt/files/pie-flags.patch27
-rw-r--r--meta/recipes-extended/newt/libnewt-python_0.52.19.bb28
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.19.bb54
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.21.bb58
-rw-r--r--meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb61
-rw-r--r--meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb31
-rw-r--r--meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb271
-rw-r--r--meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch226
-rw-r--r--meta/recipes-extended/pam/libpam/libpam-xtests.patch14
-rw-r--r--meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch23
-rw-r--r--meta/recipes-extended/pam/libpam/use-utmpx.patch233
-rw-r--r--meta/recipes-extended/pam/libpam_1.3.0.bb169
-rw-r--r--meta/recipes-extended/pam/libpam_1.3.1.bb167
-rw-r--r--meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch29
-rw-r--r--meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch33
-rw-r--r--meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch33
-rw-r--r--meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch26
-rw-r--r--meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch34
-rw-r--r--meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch66
-rw-r--r--meta/recipes-extended/parted/files/Makefile285
-rw-r--r--meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch57
-rw-r--r--meta/recipes-extended/parted/files/no_check.patch10
-rw-r--r--meta/recipes-extended/parted/files/run-ptest2
-rw-r--r--meta/recipes-extended/parted/files/syscalls.patch55
-rw-r--r--meta/recipes-extended/parted/parted_3.2.bb47
-rw-r--r--meta/recipes-extended/parted/parted_3.3.bb59
-rw-r--r--meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch1287
-rw-r--r--meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch33
-rw-r--r--meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch25
-rw-r--r--meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch185
-rw-r--r--meta/recipes-extended/pax/pax_3.4.bb28
-rw-r--r--meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch73
-rw-r--r--meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb9
-rw-r--r--meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb5
-rw-r--r--meta/recipes-extended/perl/libtimedate-perl_2.30.bb4
-rw-r--r--meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb22
-rw-r--r--meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb27
-rw-r--r--meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb23
-rw-r--r--meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb26
-rw-r--r--meta/recipes-extended/perl/libxml-sax-perl_0.99.bb27
-rw-r--r--meta/recipes-extended/perl/libxml-sax-perl_1.02.bb42
-rw-r--r--meta/recipes-extended/pigz/pigz.inc41
-rw-r--r--meta/recipes-extended/pigz/pigz/link-order.patch38
-rw-r--r--meta/recipes-extended/pigz/pigz_2.3.3.bb12
-rw-r--r--meta/recipes-extended/pigz/pigz_2.4.bb49
-rw-r--r--meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch51
-rw-r--r--meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch47
-rw-r--r--meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch68
-rw-r--r--meta/recipes-extended/pixz/pixz_1.0.6.bb24
-rw-r--r--meta/recipes-extended/procps/procps/0001-Fix-out-of-tree-builds.patch24
-rw-r--r--meta/recipes-extended/procps/procps/sysctl.conf105
-rw-r--r--meta/recipes-extended/procps/procps_3.3.12.bb66
-rw-r--r--meta/recipes-extended/procps/procps_3.3.15.bb69
-rw-r--r--meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch46
-rw-r--r--meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch29
-rw-r--r--meta/recipes-extended/psmisc/psmisc.inc14
-rw-r--r--meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch14
-rw-r--r--meta/recipes-extended/psmisc/psmisc_22.21.bb12
-rw-r--r--meta/recipes-extended/psmisc/psmisc_23.3.bb9
-rw-r--r--meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch33
-rw-r--r--meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch93
-rw-r--r--meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch83
-rw-r--r--meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch153
-rw-r--r--meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch62
-rw-r--r--meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch46
-rw-r--r--meta/recipes-extended/quota/quota/fcntl.patch48
-rw-r--r--meta/recipes-extended/quota/quota/remove_non_posix_types.patch198
-rw-r--r--meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch20
-rw-r--r--meta/recipes-extended/quota/quota_4.03.bb42
-rw-r--r--meta/recipes-extended/quota/quota_4.05.bb34
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch221
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch43
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch42
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch84
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch30
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch22
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf2
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.service12
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket8
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch130
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb73
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb52
-rw-r--r--meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb37
-rw-r--r--meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch23
-rw-r--r--meta/recipes-extended/screen/screen/0001-Remove-more-compatibility-stuff.patch31
-rw-r--r--meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch19
-rw-r--r--meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch57
-rw-r--r--meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch137
-rw-r--r--meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch65
-rw-r--r--meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch135
-rw-r--r--meta/recipes-extended/screen/screen/fix-parallel-make.patch19
-rw-r--r--meta/recipes-extended/screen/screen_4.4.0.bb52
-rw-r--r--meta/recipes-extended/screen/screen_4.7.0.bb49
-rw-r--r--meta/recipes-extended/sed/sed-4.1.2/Makevars25
-rw-r--r--meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch18
-rw-r--r--meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch37
-rw-r--r--meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch33
-rw-r--r--meta/recipes-extended/sed/sed-4.2.2/run-ptest3
-rw-r--r--meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch66
-rw-r--r--meta/recipes-extended/sed/sed/run-ptest5
-rw-r--r--meta/recipes-extended/sed/sed_4.1.2.bb35
-rw-r--r--meta/recipes-extended/sed/sed_4.2.2.bb46
-rw-r--r--meta/recipes-extended/sed/sed_4.7.bb61
-rw-r--r--meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch21
-rw-r--r--meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch46
-rw-r--r--meta/recipes-extended/shadow/files/0001-Make-the-sp_lstchg-shadow-field-reproducible-re.-71.patch89
-rw-r--r--meta/recipes-extended/shadow/files/0001-configure.ac-fix-configure-error-with-dash.patch36
-rw-r--r--meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch73
-rw-r--r--meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch181
-rw-r--r--meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch41
-rw-r--r--meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch28
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/chpasswd2
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/newusers2
-rw-r--r--meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch33
-rw-r--r--meta/recipes-extended/shadow/shadow-securetty_4.6.bb (renamed from meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb)0
-rw-r--r--meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb32
-rw-r--r--meta/recipes-extended/shadow/shadow-sysroot_4.6.bb32
-rw-r--r--meta/recipes-extended/shadow/shadow.inc51
-rw-r--r--meta/recipes-extended/shadow/shadow_4.2.1.bb10
-rw-r--r--meta/recipes-extended/shadow/shadow_4.6.bb10
-rw-r--r--meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch39
-rw-r--r--meta/recipes-extended/slang/slang/array_test.patch20
-rw-r--r--meta/recipes-extended/slang/slang/dont-link-to-host.patch16
-rw-r--r--meta/recipes-extended/slang/slang/fix-check-pcre.patch116
-rw-r--r--meta/recipes-extended/slang/slang/no-x.patch18
-rw-r--r--meta/recipes-extended/slang/slang/rpathfix.patch82
-rw-r--r--meta/recipes-extended/slang/slang/run-ptest3
-rw-r--r--meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch125
-rw-r--r--meta/recipes-extended/slang/slang/terminfo_fixes.patch148
-rw-r--r--meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch30
-rw-r--r--meta/recipes-extended/slang/slang_2.3.0.bb51
-rw-r--r--meta/recipes-extended/slang/slang_2.3.2.bb84
-rw-r--r--meta/recipes-extended/stat/stat-3.3/fix-error-return.patch16
-rw-r--r--meta/recipes-extended/stat/stat-3.3/fix-security-format.patch68
-rw-r--r--meta/recipes-extended/stat/stat_3.3.bb34
-rw-r--r--meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch23
-rw-r--r--meta/recipes-extended/stress-ng/stress-ng_0.10.11.bb25
-rw-r--r--meta/recipes-extended/stress/files/texinfo.patch79
-rw-r--r--meta/recipes-extended/stress/stress_1.0.4.bb15
-rw-r--r--meta/recipes-extended/sudo/sudo.inc29
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.17p1.bb36
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.29.bb40
-rw-r--r--meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch132
-rw-r--r--meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch44
-rw-r--r--meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch29
-rw-r--r--meta/recipes-extended/sysklogd/files/no-strip-install.patch17
-rw-r--r--meta/recipes-extended/sysklogd/files/no-vectorization.patch20
-rwxr-xr-xmeta/recipes-extended/sysklogd/files/sysklogd26
-rw-r--r--meta/recipes-extended/sysklogd/files/syslog.conf71
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd.inc60
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb4
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_2.0.3.bb3
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc52
-rw-r--r--meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch31
-rw-r--r--meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch31
-rw-r--r--meta/recipes-extended/sysstat/sysstat/CVE-2019-19725.patch28
-rw-r--r--meta/recipes-extended/sysstat/sysstat/sysstat.service2
-rw-r--r--meta/recipes-extended/sysstat/sysstat_11.4.0.bb8
-rw-r--r--meta/recipes-extended/sysstat/sysstat_12.2.0.bb11
-rw-r--r--meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch23
-rw-r--r--meta/recipes-extended/tar/tar-1.17/gcc43build.patch37
-rw-r--r--meta/recipes-extended/tar/tar-1.17/m4extensions.patch30
-rw-r--r--meta/recipes-extended/tar/tar.inc52
-rw-r--r--meta/recipes-extended/tar/tar/musl_dirent.patch4
-rw-r--r--meta/recipes-extended/tar/tar/remove-gets.patch29
-rw-r--r--meta/recipes-extended/tar/tar_1.17.bb14
-rw-r--r--meta/recipes-extended/tar/tar_1.29.bb18
-rw-r--r--meta/recipes-extended/tar/tar_1.32.bb64
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch65
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch24
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch25
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch200
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb11
-rw-r--r--meta/recipes-extended/texi2html/texi2html_5.0.bb28
-rw-r--r--meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py88
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch28
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch49
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch24
-rw-r--r--meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch30
-rw-r--r--meta/recipes-extended/texinfo/texinfo/link-zip.patch23
-rw-r--r--meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch75
-rw-r--r--meta/recipes-extended/texinfo/texinfo_4.8.bb55
-rw-r--r--meta/recipes-extended/texinfo/texinfo_6.0.bb82
-rw-r--r--meta/recipes-extended/texinfo/texinfo_6.7.bb91
-rw-r--r--meta/recipes-extended/time/time-1.7/debian.patch1301
-rw-r--r--meta/recipes-extended/time/time.inc12
-rw-r--r--meta/recipes-extended/time/time_1.7.bb11
-rw-r--r--meta/recipes-extended/time/time_1.9.bb21
-rw-r--r--meta/recipes-extended/timezone/timezone.inc20
-rw-r--r--meta/recipes-extended/timezone/tzcode-native.bb17
-rw-r--r--meta/recipes-extended/timezone/tzdata.bb210
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native_2016f.bb27
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2016f.bb213
-rw-r--r--meta/recipes-extended/unzip/unzip/0001-unzip-fix-CVE-2018-1000035.patch48
-rw-r--r--meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch12
-rw-r--r--meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch33
-rw-r--r--meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch32
-rw-r--r--meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch39
-rw-r--r--meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch33
-rw-r--r--meta/recipes-extended/unzip/unzip/CVE-2019-13232_p2.patch356
-rw-r--r--meta/recipes-extended/unzip/unzip/CVE-2019-13232_p3.patch121
-rw-r--r--meta/recipes-extended/unzip/unzip/symlink.patch26
-rw-r--r--meta/recipes-extended/unzip/unzip_6.0.bb13
-rw-r--r--meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch68
-rw-r--r--meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch14
-rw-r--r--meta/recipes-extended/watchdog/watchdog/watchdog-init.patch56
-rw-r--r--meta/recipes-extended/watchdog/watchdog/watchdog.init110
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.15.bb51
-rw-r--r--meta/recipes-extended/wget/wget.inc31
-rw-r--r--meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch61
-rw-r--r--meta/recipes-extended/wget/wget_1.18.bb8
-rw-r--r--meta/recipes-extended/wget/wget_1.20.3.bb8
-rw-r--r--meta/recipes-extended/which/which-2.18/automake-foreign.patch28
-rw-r--r--meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch53
-rw-r--r--meta/recipes-extended/which/which_2.18.bb34
-rw-r--r--meta/recipes-extended/which/which_2.21.bb3
-rw-r--r--meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb37
-rw-r--r--meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb37
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch1
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd.service5
-rw-r--r--meta/recipes-extended/xinetd/xinetd_2.3.15.bb8
-rw-r--r--meta/recipes-extended/xz/xz_5.2.2.bb36
-rw-r--r--meta/recipes-extended/xz/xz_5.2.4.bb43
-rw-r--r--meta/recipes-extended/zip/zip-3.0/10-remove-build-date.patch19
-rw-r--r--meta/recipes-extended/zip/zip_3.0.bb5
-rw-r--r--meta/recipes-gnome/epiphany/epiphany_3.20.3.bb25
-rw-r--r--meta/recipes-gnome/epiphany/epiphany_3.34.1.bb21
-rw-r--r--meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch33
-rw-r--r--meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch30
-rw-r--r--meta/recipes-gnome/gcr/gcr_3.20.0.bb40
-rw-r--r--meta/recipes-gnome/gcr/gcr_3.34.0.bb35
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch38
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch28
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch94
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0004-Do-not-run-tests-when-building.patch39
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch28
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch42
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch52
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch33
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/missing-test-data.patch30
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.34.0.bb102
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb127
-rw-r--r--meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.20.2.bb23
-rw-r--r--meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch27
-rw-r--r--meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch86
-rw-r--r--meta/recipes-gnome/gnome/adwaita-icon-theme_3.20.bb41
-rw-r--r--meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb41
-rw-r--r--meta/recipes-gnome/gnome/gconf/create_config_directory.patch28
-rw-r--r--meta/recipes-gnome/gnome/gconf_3.2.6.bb13
-rw-r--r--meta/recipes-gnome/gnome/gnome-common_3.18.0.bb20
-rw-r--r--meta/recipes-gnome/gnome/gnome-doc-utils/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch40
-rw-r--r--meta/recipes-gnome/gnome/gnome-themes-standard_3.20.2.bb39
-rw-r--r--meta/recipes-gnome/gnome/libart-lgpl/libart_lgpl-2.3.21-crosscompile.patch84
-rw-r--r--meta/recipes-gnome/gnome/libart-lgpl_2.3.21.bb22
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch50
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch163
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch76
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch50
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch70
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch28
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch26
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch203
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch14
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch16
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch67
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb173
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb209
-rw-r--r--meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas/0001-Do-not-skip-gir-installation-for-cross-compiling.patch33
-rw-r--r--meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.20.0.bb13
-rw-r--r--meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.34.0.bb18
-rw-r--r--meta/recipes-gnome/gtk+/gtk+.inc104
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch22
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch35
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch24
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/toggle-font.diff102
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/xsettings.patch20
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3.inc58
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch12
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch29
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch446
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch36
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/link_fribidi.patch19
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb19
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3_3.24.13.bb19
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.30.bb34
-rw-r--r--meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.20.9.bb60
-rw-r--r--meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch102
-rw-r--r--meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch40
-rw-r--r--meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch154
-rw-r--r--meta/recipes-gnome/gtk-doc/files/conditionaltests.patch46
-rw-r--r--meta/recipes-gnome/gtk-doc/files/no-clobber.patch40
-rw-r--r--meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch30
-rw-r--r--meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb52
-rw-r--r--meta/recipes-gnome/gtk-doc/gtk-doc_1.32.bb50
-rw-r--r--meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb14
-rw-r--r--meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb18
-rw-r--r--meta/recipes-gnome/json-glib/json-glib/run-ptest3
-rw-r--r--meta/recipes-gnome/json-glib/json-glib_1.2.2.bb18
-rw-r--r--meta/recipes-gnome/json-glib/json-glib_1.4.4.bb33
-rw-r--r--meta/recipes-gnome/libdazzle/libdazzle_3.34.1.bb20
-rw-r--r--meta/recipes-gnome/libgudev/libgudev_230.bb16
-rw-r--r--meta/recipes-gnome/libgudev/libgudev_233.bb23
-rw-r--r--meta/recipes-gnome/libnotify/libnotify_0.7.6.bb20
-rw-r--r--meta/recipes-gnome/libnotify/libnotify_0.7.8.bb22
-rw-r--r--meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch35
-rw-r--r--meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch30
-rw-r--r--meta/recipes-gnome/librsvg/librsvg_2.40.16.bb45
-rw-r--r--meta/recipes-gnome/librsvg/librsvg_2.40.20.bb50
-rw-r--r--meta/recipes-gnome/libsecret/libsecret_0.18.5.bb25
-rw-r--r--meta/recipes-gnome/libsecret/libsecret_0.19.1.bb27
-rw-r--r--meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb19
-rw-r--r--meta/recipes-graphics/cairo/cairo-fpu.inc6
-rw-r--r--meta/recipes-graphics/cairo/cairo.inc46
-rw-r--r--meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch34
-rw-r--r--meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch19
-rw-r--r--meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch20
-rw-r--r--meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff22
-rw-r--r--meta/recipes-graphics/cairo/cairo_1.14.6.bb43
-rw-r--r--meta/recipes-graphics/cairo/cairo_1.16.0.bb90
-rw-r--r--meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb10
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0.inc7
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch11
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0_1.26.0.bb10
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0_1.26.2.bb10
-rw-r--r--meta/recipes-graphics/clutter/clutter-gst-3.0.inc2
-rw-r--r--meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb7
-rw-r--r--meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.27.bb7
-rw-r--r--meta/recipes-graphics/clutter/clutter-gtk-1.0.inc7
-rw-r--r--meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch37
-rw-r--r--meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb6
-rw-r--r--meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb7
-rw-r--r--meta/recipes-graphics/cogl/cogl-1.0.inc11
-rw-r--r--meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch35
-rw-r--r--meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb7
-rw-r--r--meta/recipes-graphics/cogl/cogl-1.0_1.22.4.bb6
-rw-r--r--meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch56
-rw-r--r--meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch24
-rw-r--r--meta/recipes-graphics/drm/libdrm/installtests.patch15
-rw-r--r--meta/recipes-graphics/drm/libdrm/musl-ioctl.patch35
-rw-r--r--meta/recipes-graphics/drm/libdrm_2.4.100.bb60
-rw-r--r--meta/recipes-graphics/drm/libdrm_2.4.70.bb47
-rw-r--r--meta/recipes-graphics/eglinfo/eglinfo-fb_1.0.0.bb6
-rw-r--r--meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb12
-rw-r--r--meta/recipes-graphics/eglinfo/eglinfo.inc31
-rw-r--r--meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch34
-rw-r--r--meta/recipes-graphics/fontconfig/fontconfig/revert-static-pkgconfig.patch12
-rw-r--r--meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb49
-rw-r--r--meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb70
-rw-r--r--meta/recipes-graphics/freetype/freetype/use-right-libtool.patch2
-rw-r--r--meta/recipes-graphics/freetype/freetype_2.10.1.bb47
-rw-r--r--meta/recipes-graphics/freetype/freetype_2.6.5.bb49
-rw-r--r--meta/recipes-graphics/fstests/fstests_git.bb18
-rw-r--r--meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch73
-rw-r--r--meta/recipes-graphics/glew/glew_2.0.0.bb40
-rw-r--r--meta/recipes-graphics/glew/glew_2.1.0.bb45
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb39
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bb41
-rw-r--r--meta/recipes-graphics/images/core-image-clutter.bb2
-rw-r--r--meta/recipes-graphics/images/core-image-weston.bb2
-rw-r--r--meta/recipes-graphics/images/core-image-x11.bb4
-rw-r--r--meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch32
-rw-r--r--meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb46
-rw-r--r--meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.3.bb59
-rw-r--r--meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch117
-rw-r--r--meta/recipes-graphics/kmscube/kmscube_git.bb21
-rw-r--r--meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch128
-rw-r--r--meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch42
-rw-r--r--meta/recipes-graphics/libepoxy/libepoxy/no-need-for-python3.patch20
-rw-r--r--meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb42
-rw-r--r--meta/recipes-graphics/libepoxy/libepoxy_git.bb27
-rw-r--r--meta/recipes-graphics/libfakekey/libfakekey_git.bb6
-rw-r--r--meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb6
-rw-r--r--meta/recipes-graphics/libsdl/libsdl-1.2.15/libsdl-1.2.15-xdata32.patch19
-rw-r--r--meta/recipes-graphics/libsdl/libsdl-1.2.15/pkgconfig.patch187
-rw-r--r--meta/recipes-graphics/libsdl/libsdl_1.2.15.bb70
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch34
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch53
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch57
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch41
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/linkage.patch46
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch60
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb77
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb68
-rw-r--r--meta/recipes-graphics/libva/libva-utils/0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch35
-rw-r--r--meta/recipes-graphics/libva/libva-utils_2.5.0.bb35
-rw-r--r--meta/recipes-graphics/libva/libva_2.5.0.bb46
-rw-r--r--meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb1
-rw-r--r--meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb39
-rw-r--r--meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb39
-rw-r--r--meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb18
-rw-r--r--meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb18
-rw-r--r--meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch43
-rw-r--r--meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch46
-rw-r--r--meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch46
-rw-r--r--meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch147
-rw-r--r--meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch116
-rw-r--r--meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch29
-rw-r--r--meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch17
-rw-r--r--meta/recipes-graphics/mesa/libglu_9.0.0.bb30
-rw-r--r--meta/recipes-graphics/mesa/libglu_9.0.1.bb30
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch26
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch20
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch20
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb59
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb59
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb13
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb10
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc213
-rw-r--r--meta/recipes-graphics/mesa/mesa_12.0.1.bb18
-rw-r--r--meta/recipes-graphics/mesa/mesa_19.2.4.bb21
-rw-r--r--meta/recipes-graphics/mesa/mesa_git.bb22
-rw-r--r--meta/recipes-graphics/mx/mx.inc2
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb2
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb2
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb4
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb11
-rw-r--r--meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch121
-rw-r--r--meta/recipes-graphics/pango/pango/0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch147
-rw-r--r--meta/recipes-graphics/pango/pango/0001-Fix-build-reproducibility.patch31
-rw-r--r--meta/recipes-graphics/pango/pango_1.40.1.bb52
-rw-r--r--meta/recipes-graphics/pango/pango_1.44.7.bb45
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch41
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch54
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch32
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch54
-rw-r--r--meta/recipes-graphics/piglit/piglit_git.bb43
-rw-r--r--meta/recipes-graphics/pong-clock/pong-clock_1.0.bb2
-rw-r--r--meta/recipes-graphics/startup-notification/startup-notification_0.12.bb2
-rw-r--r--meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb40
-rw-r--r--meta/recipes-graphics/ttf-fonts/liberation-fonts_2.00.1.bb41
-rw-r--r--meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb34
-rw-r--r--meta/recipes-graphics/virglrenderer/virglrenderer/0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch36
-rw-r--r--meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb25
-rw-r--r--meta/recipes-graphics/vulkan/assimp/0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch1664
-rw-r--r--meta/recipes-graphics/vulkan/assimp_5.0.0.bb22
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch95
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-demos_git.bb44
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-headers_1.1.126.0.bb18
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-loader_1.1.126.0.bb38
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-tools_1.1.126.0.bb31
-rw-r--r--meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch54
-rw-r--r--meta/recipes-graphics/waffle/waffle_1.5.2.bb37
-rw-r--r--meta/recipes-graphics/waffle/waffle_1.6.0.bb37
-rw-r--r--meta/recipes-graphics/wayland/libinput/0001-adjust-for-64bit-time_t-for-32bit-architectures.patch386
-rw-r--r--meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch72
-rw-r--r--meta/recipes-graphics/wayland/libinput_1.14.3.bb39
-rw-r--r--meta/recipes-graphics/wayland/libinput_1.4.1.bb25
-rw-r--r--meta/recipes-graphics/wayland/mtdev/0001-adjust-for-64bit-time_t-for-32bit-architectures.patch77
-rw-r--r--meta/recipes-graphics/wayland/mtdev_1.1.5.bb4
-rw-r--r--meta/recipes-graphics/wayland/wayland-protocols_1.18.bb22
-rw-r--r--meta/recipes-graphics/wayland/wayland-protocols_1.7.bb20
-rw-r--r--meta/recipes-graphics/wayland/wayland/0001-scanner-Add-configure-check-for-strndup.patch50
-rw-r--r--meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch30
-rw-r--r--meta/recipes-graphics/wayland/wayland/0002-Move-wl_priv_signal-to-wayland-server-private.h.patch166
-rw-r--r--meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch32
-rw-r--r--meta/recipes-graphics/wayland/wayland_1.11.0.bb43
-rw-r--r--meta/recipes-graphics/wayland/wayland_1.17.0.bb49
-rw-r--r--meta/recipes-graphics/wayland/weston-init.bb30
-rw-r--r--meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules2
-rw-r--r--meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini2
-rw-r--r--meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini2
-rwxr-xr-xmeta/recipes-graphics/wayland/weston-init/weston-start29
-rw-r--r--meta/recipes-graphics/wayland/weston-init/weston.ini74
-rw-r--r--meta/recipes-graphics/wayland/weston-init/weston.service12
-rw-r--r--meta/recipes-graphics/wayland/weston-init/weston@.service37
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch34
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch80
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch28
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch151
-rw-r--r--meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch33
-rw-r--r--meta/recipes-graphics/wayland/weston_1.11.0.bb117
-rw-r--r--meta/recipes-graphics/wayland/weston_7.0.0.bb111
-rw-r--r--meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults3
-rw-r--r--meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh4
-rw-r--r--meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap260
-rw-r--r--meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch355
-rw-r--r--meta/recipes-graphics/x11-common/x11-common_0.1.bb22
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init.bb61
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession (renamed from meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession)0
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh (renamed from meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh)0
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/89xdgautostart.sh (renamed from meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/89xdgautostart.sh)0
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/90XWindowManager.sh (renamed from meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/90XWindowManager.sh)0
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in2
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in1
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb69
-rw-r--r--meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb1
-rw-r--r--meta/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-calibrator.hh-Include-string-to-get-std-string.patch28
-rw-r--r--meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch34
-rw-r--r--meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb11
-rw-r--r--meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb22
-rw-r--r--meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb18
-rw-r--r--meta/recipes-graphics/xorg-app/mkfontscale_1.2.1.bb21
-rw-r--r--meta/recipes-graphics/xorg-app/rgb_1.0.6.bb2
-rw-r--r--meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb19
-rw-r--r--meta/recipes-graphics/xorg-app/x11perf_1.6.1.bb23
-rw-r--r--meta/recipes-graphics/xorg-app/xauth_1.0.9.bb15
-rw-r--r--meta/recipes-graphics/xorg-app/xauth_1.1.bb15
-rw-r--r--meta/recipes-graphics/xorg-app/xdpyinfo_1.3.2.bb2
-rw-r--r--meta/recipes-graphics/xorg-app/xev/diet-x11.patch133
-rw-r--r--meta/recipes-graphics/xorg-app/xev_1.2.2.bb18
-rw-r--r--meta/recipes-graphics/xorg-app/xev_1.2.3.bb18
-rw-r--r--meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb14
-rw-r--r--meta/recipes-graphics/xorg-app/xeyes_1.1.2.bb14
-rw-r--r--meta/recipes-graphics/xorg-app/xhost_1.0.7.bb20
-rw-r--r--meta/recipes-graphics/xorg-app/xhost_1.0.8.bb20
-rw-r--r--meta/recipes-graphics/xorg-app/xinit_1.3.4.bb20
-rw-r--r--meta/recipes-graphics/xorg-app/xinit_1.4.1.bb20
-rw-r--r--meta/recipes-graphics/xorg-app/xinput_1.6.2.bb12
-rw-r--r--meta/recipes-graphics/xorg-app/xinput_1.6.3.bb12
-rw-r--r--meta/recipes-graphics/xorg-app/xkbcomp_1.3.1.bb19
-rw-r--r--meta/recipes-graphics/xorg-app/xkbcomp_1.4.2.bb17
-rw-r--r--meta/recipes-graphics/xorg-app/xmodmap_1.0.10.bb16
-rw-r--r--meta/recipes-graphics/xorg-app/xmodmap_1.0.9.bb17
-rw-r--r--meta/recipes-graphics/xorg-app/xorg-app-common.inc2
-rw-r--r--meta/recipes-graphics/xorg-app/xprop_1.2.2.bb18
-rw-r--r--meta/recipes-graphics/xorg-app/xprop_1.2.4.bb18
-rw-r--r--meta/recipes-graphics/xorg-app/xrandr_1.5.0.bb15
-rw-r--r--meta/recipes-graphics/xorg-app/xrandr_1.5.1.bb17
-rw-r--r--meta/recipes-graphics/xorg-app/xset/disable-xkb.patch12
-rw-r--r--meta/recipes-graphics/xorg-app/xset_1.2.3.bb19
-rw-r--r--meta/recipes-graphics/xorg-app/xset_1.2.4.bb19
-rw-r--r--meta/recipes-graphics/xorg-app/xvinfo_1.1.3.bb14
-rw-r--r--meta/recipes-graphics/xorg-app/xvinfo_1.1.4.bb14
-rw-r--r--meta/recipes-graphics/xorg-app/xwininfo_1.1.3.bb15
-rw-r--r--meta/recipes-graphics/xorg-app/xwininfo_1.1.5.bb15
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb20
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.6.bb20
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb13
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.9.0.bb13
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb16
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb11
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.29.0.bb11
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch21
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb15
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.3.bb14
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb18
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch51
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb16
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb18
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb18
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.4.bb9
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.5.0.bb9
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch65
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch30
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/01_Fix-build-on-i686.patch55
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch24
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch17
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch70
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch59
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb42
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb42
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb41
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch35
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch41
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch32
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0003-force-plain-mode.patch31
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-blacklist-tv-out.patch33
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0005-Attempt-to-fix-VRFB.patch325
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0006-omapfb-port-to-new-xserver-video-API.patch272
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch48
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb37
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vesa/0001-Refuse-to-run-on-UEFI-machines.patch52
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.4.bb21
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.4.0.bb23
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch37
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb19
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.3.0.bb19
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-common.inc10
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-input.inc4
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-video.inc4
-rw-r--r--meta/recipes-graphics/xorg-font/encodings/nocompiler.patch23
-rw-r--r--meta/recipes-graphics/xorg-font/encodings_1.0.4.bb22
-rw-r--r--meta/recipes-graphics/xorg-font/encodings_1.0.5.bb21
-rw-r--r--meta/recipes-graphics/xorg-font/font-util_1.3.1.bb22
-rw-r--r--meta/recipes-graphics/xorg-font/font-util_1.3.2.bb22
-rw-r--r--meta/recipes-graphics/xorg-font/xorg-font-common.inc5
-rw-r--r--meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb2
-rw-r--r--meta/recipes-graphics/xorg-lib/libdmx_1.1.3.bb20
-rw-r--r--meta/recipes-graphics/xorg-lib/libdmx_1.1.4.bb20
-rw-r--r--meta/recipes-graphics/xorg-lib/libfontenc_1.1.3.bb17
-rw-r--r--meta/recipes-graphics/xorg-lib/libfontenc_1.1.4.bb17
-rw-r--r--meta/recipes-graphics/xorg-lib/libice_1.0.10.bb28
-rw-r--r--meta/recipes-graphics/xorg-lib/libice_1.0.9.bb28
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess/0001-Include-config.h-before-anything-else-in-.c.patch187
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess/0002-Fix-quoting-issue.patch34
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess/0003-linux_sysfs.c-Include-limits.h-for-PATH_MAX.patch32
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess/0004-Don-t-include-sys-io.h-on-arm.patch28
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess_0.13.4.bb21
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess_0.16.bb19
-rw-r--r--meta/recipes-graphics/xorg-lib/libpthread-stubs_0.3.bb25
-rw-r--r--meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb19
-rw-r--r--meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb31
-rw-r--r--meta/recipes-graphics/xorg-lib/libsm_1.2.3.bb31
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11-compose-data/0001-Drop-x11-dependencies.patch86
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb35
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11-diet_1.6.3.bb19
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11.inc41
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11/Fix-hanging-issue-in-_XReply.patch58
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11/X18NCMSstubs.diff520
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11/fix-disable-xlocale.diff17
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11/fix-utf8-wrong-define.patch19
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch72
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb11
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11_1.6.9.bb45
-rw-r--r--meta/recipes-graphics/xorg-lib/libxau_1.0.8.bb24
-rw-r--r--meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb24
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcalibrate/fix-xcb.patch29
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb22
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch16
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb/gcc-mips-pr68302-mips-workaround.patch22
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb_1.12.bb36
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb37
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcomposite_0.4.4.bb28
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcomposite_0.4.5.bb28
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb22
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcursor_1.2.0.bb23
-rw-r--r--meta/recipes-graphics/xorg-lib/libxdamage_1.1.4.bb28
-rw-r--r--meta/recipes-graphics/xorg-lib/libxdamage_1.1.5.bb29
-rw-r--r--meta/recipes-graphics/xorg-lib/libxdmcp_1.1.2.bb29
-rw-r--r--meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb29
-rw-r--r--meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb26
-rw-r--r--meta/recipes-graphics/xorg-lib/libxext_1.3.4.bb26
-rw-r--r--meta/recipes-graphics/xorg-lib/libxext_git.bb24
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb22
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfixes_5.0.3.bb23
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfont2_2.0.4.bb24
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb25
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb25
-rw-r--r--meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb33
-rw-r--r--meta/recipes-graphics/xorg-lib/libxft_2.3.3.bb33
-rw-r--r--meta/recipes-graphics/xorg-lib/libxi_1.7.10.bb23
-rw-r--r--meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb21
-rw-r--r--meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb22
-rw-r--r--meta/recipes-graphics/xorg-lib/libxinerama_1.1.4.bb22
-rw-r--r--meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb22
-rw-r--r--meta/recipes-graphics/xorg-lib/libxkbcommon_0.9.1.bb27
-rw-r--r--meta/recipes-graphics/xorg-lib/libxkbfile_1.0.9.bb18
-rw-r--r--meta/recipes-graphics/xorg-lib/libxkbfile_1.1.0.bb18
-rw-r--r--meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb35
-rw-r--r--meta/recipes-graphics/xorg-lib/libxmu_1.1.3.bb34
-rw-r--r--meta/recipes-graphics/xorg-lib/libxpm_3.5.11.bb27
-rw-r--r--meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb27
-rw-r--r--meta/recipes-graphics/xorg-lib/libxrandr_1.5.0.bb23
-rw-r--r--meta/recipes-graphics/xorg-lib/libxrandr_1.5.2.bb23
-rw-r--r--meta/recipes-graphics/xorg-lib/libxrender_0.9.10.bb24
-rw-r--r--meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb23
-rw-r--r--meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb20
-rw-r--r--meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb20
-rw-r--r--meta/recipes-graphics/xorg-lib/libxscrnsaver_1.2.2.bb23
-rw-r--r--meta/recipes-graphics/xorg-lib/libxscrnsaver_1.2.3.bb23
-rw-r--r--meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb17
-rw-r--r--meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb17
-rw-r--r--meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch16
-rw-r--r--meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb33
-rw-r--r--meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb32
-rw-r--r--meta/recipes-graphics/xorg-lib/libxtst_1.2.2.bb20
-rw-r--r--meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb22
-rw-r--r--meta/recipes-graphics/xorg-lib/libxv_1.0.10.bb18
-rw-r--r--meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb19
-rw-r--r--meta/recipes-graphics/xorg-lib/libxvmc_1.0.12.bb19
-rw-r--r--meta/recipes-graphics/xorg-lib/libxvmc_1.0.9.bb19
-rw-r--r--meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.4.bb19
-rw-r--r--meta/recipes-graphics/xorg-lib/libxxf86misc_1.0.3.bb20
-rw-r--r--meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb2
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman/asm_include.patch29
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman_0.34.0.bb41
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman_0.38.4.bb40
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util.inc2
-rw-r--r--meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb31
-rw-r--r--meta/recipes-graphics/xorg-lib/xkeyboard-config_2.28.bb31
-rw-r--r--meta/recipes-graphics/xorg-lib/xorg-lib-common.inc3
-rw-r--r--meta/recipes-graphics/xorg-lib/xtrans/multilibfix.patch18
-rw-r--r--meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb24
-rw-r--r--meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb26
-rw-r--r--meta/recipes-graphics/xorg-proto/bigreqsproto_1.1.2.bb16
-rw-r--r--meta/recipes-graphics/xorg-proto/calibrateproto/fix.patch42
-rw-r--r--meta/recipes-graphics/xorg-proto/calibrateproto_git.bb19
-rw-r--r--meta/recipes-graphics/xorg-proto/compositeproto_0.4.2.bb21
-rw-r--r--meta/recipes-graphics/xorg-proto/damageproto_1.2.1.bb20
-rw-r--r--meta/recipes-graphics/xorg-proto/dmxproto_2.3.1.bb18
-rw-r--r--meta/recipes-graphics/xorg-proto/dri2proto_2.8.bb15
-rw-r--r--meta/recipes-graphics/xorg-proto/dri3proto_1.0.bb14
-rw-r--r--meta/recipes-graphics/xorg-proto/fixesproto_5.0.bb22
-rw-r--r--meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb18
-rw-r--r--meta/recipes-graphics/xorg-proto/glproto_1.4.17.bb18
-rw-r--r--meta/recipes-graphics/xorg-proto/inputproto_2.3.2.bb22
-rw-r--r--meta/recipes-graphics/xorg-proto/kbproto_1.0.7.bb18
-rw-r--r--meta/recipes-graphics/xorg-proto/presentproto_git.bb24
-rw-r--r--meta/recipes-graphics/xorg-proto/randrproto_1.5.0.bb19
-rw-r--r--meta/recipes-graphics/xorg-proto/recordproto_1.14.2.bb18
-rw-r--r--meta/recipes-graphics/xorg-proto/renderproto_0.11.1.bb21
-rw-r--r--meta/recipes-graphics/xorg-proto/resourceproto_1.2.0.bb19
-rw-r--r--meta/recipes-graphics/xorg-proto/scrnsaverproto_1.2.2.bb19
-rw-r--r--meta/recipes-graphics/xorg-proto/videoproto_2.3.3.bb14
-rw-r--r--meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch27
-rw-r--r--meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb30
-rw-r--r--meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb29
-rw-r--r--meta/recipes-graphics/xorg-proto/xcmiscproto_1.2.2.bb17
-rw-r--r--meta/recipes-graphics/xorg-proto/xextproto_7.3.0.bb24
-rw-r--r--meta/recipes-graphics/xorg-proto/xf86dgaproto_2.1.bb18
-rw-r--r--meta/recipes-graphics/xorg-proto/xf86driproto_2.1.1.bb17
-rw-r--r--meta/recipes-graphics/xorg-proto/xf86miscproto_0.9.3.bb17
-rw-r--r--meta/recipes-graphics/xorg-proto/xf86vidmodeproto_2.3.1.bb18
-rw-r--r--meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb19
-rw-r--r--meta/recipes-graphics/xorg-proto/xorgproto_2019.2.bb14
-rw-r--r--meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch22
-rw-r--r--meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb19
-rw-r--r--meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb21
-rw-r--r--meta/recipes-graphics/xorg-util/makedepend_1.0.5.bb21
-rw-r--r--meta/recipes-graphics/xorg-util/makedepend_1.0.6.bb21
-rw-r--r--meta/recipes-graphics/xorg-util/util-macros_1.19.0.bb19
-rw-r--r--meta/recipes-graphics/xorg-util/util-macros_1.19.2.bb19
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf9
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf31
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf31
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf32
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf31
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf31
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf31
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf31
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb9
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg.inc40
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-test-xtest-Initialize-array-with-braces.patch36
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch53
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch25
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch18
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/pkgconfig.patch34
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/sdksyms-no-build-path.patch50
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb27
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.6.bb31
-rw-r--r--meta/recipes-graphics/xrestop/xrestop_0.4.bb2
-rw-r--r--meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb17
-rw-r--r--meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch30
-rw-r--r--meta/recipes-kernel/blktrace/blktrace/CVE-2018-10689.patch150
-rw-r--r--meta/recipes-kernel/blktrace/blktrace/ldflags.patch22
-rw-r--r--meta/recipes-kernel/blktrace/blktrace_git.bb7
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-linux_1.10.bb (renamed from meta/recipes-kernel/cryptodev/cryptodev-linux_1.8.bb)0
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb (renamed from meta/recipes-kernel/cryptodev/cryptodev-module_1.8.bb)0
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb21
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-tests_1.8.bb21
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev.inc12
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch42
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch18
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-Fix-module-loading-with-Linux-v5.0-rc5.patch59
-rw-r--r--meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch54
-rw-r--r--meta/recipes-kernel/cryptodev/files/cb186f682679383e8b5806240927903730ce85d9.patch279
-rw-r--r--meta/recipes-kernel/dtc/dtc.inc10
-rw-r--r--meta/recipes-kernel/dtc/dtc/make_install.patch29
-rw-r--r--meta/recipes-kernel/dtc/dtc_1.5.1.bb10
-rw-r--r--meta/recipes-kernel/dtc/dtc_git.bb11
-rw-r--r--meta/recipes-kernel/kern-tools/kern-tools-native_git.bb5
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools.inc37
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-powerpc-change-the-memory-size-limit.patch35
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-Pass-r-directly-to-linker.patch32
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch31
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0002-powerpc-change-the-memory-size-limit.patch35
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0002-purgatory-Pass-r-directly-to-linker.patch29
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch49
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch93
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch28
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch40
-rwxr-xr-xmeta/recipes-kernel/kexec/kexec-tools/kdump2
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kdump.service14
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch801
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch88
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb37
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb88
-rw-r--r--meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb20
-rw-r--r--meta/recipes-kernel/kmod/kmod-native_git.bb3
-rw-r--r--meta/recipes-kernel/kmod/kmod.inc19
-rw-r--r--meta/recipes-kernel/kmod/kmod/0001-build-Stop-using-dolt.patch28
-rw-r--r--meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch39
-rw-r--r--meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch15
-rw-r--r--meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch38
-rw-r--r--meta/recipes-kernel/kmod/kmod_git.bb6
-rw-r--r--meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch64
-rw-r--r--meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch49
-rw-r--r--meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch39
-rw-r--r--meta/recipes-kernel/latencytop/latencytop_0.5.bb30
-rw-r--r--meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch31
-rw-r--r--meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch38
-rw-r--r--meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb33
-rw-r--r--meta/recipes-kernel/linux-firmware/linux-firmware_20190815.bb943
-rw-r--r--meta/recipes-kernel/linux-firmware/linux-firmware_git.bb629
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc36
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch31
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch44
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch41
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch26
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch46
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch67
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch36
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.4.bb9
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb13
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.2.bb18
-rw-r--r--meta/recipes-kernel/linux/kernel-devsrc.bb264
-rw-r--r--meta/recipes-kernel/linux/linux-dtb.inc89
-rw-r--r--meta/recipes-kernel/linux/linux-dummy.bb11
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-dev.bb15
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb36
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb44
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb36
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb38
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_5.2.bb44
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb23
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb32
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb23
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb25
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_5.2.bb32
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc24
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_4.1.bb42
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_4.19.bb50
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_4.4.bb42
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_4.8.bb44
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_5.2.bb54
-rw-r--r--meta/recipes-kernel/lttng/babeltrace_1.4.0.bb20
-rw-r--r--meta/recipes-kernel/lttng/babeltrace_1.5.7.bb20
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch94
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch44
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch105
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0004-sunrpc-introduce-lttng_get_clid-helper.patch130
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch43
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch2
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.10.11.bb50
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_git.bb34
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-Fix-error.h-common-error.h.patch33
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-Skip-when-testapp-is-not-present.patch610
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch55
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0002-Fix-check-for-lttng-modules-presence-before-testing.patch24
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service9
-rwxr-xr-xmeta/recipes-kernel/lttng/lttng-tools/run-ptest5
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/x32.patch36
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb163
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_git.bb116
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch31
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch13
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb49
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_git.bb42
-rw-r--r--meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb27
-rw-r--r--meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb2
-rw-r--r--meta/recipes-kernel/oprofile/oprofile.inc63
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch30
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch51
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/acinclude.m4581
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch12
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/musl.patch46
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch98
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch44
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/run-ptest19
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_1.1.0.bb10
-rw-r--r--meta/recipes-kernel/perf/perf-features.inc22
-rw-r--r--meta/recipes-kernel/perf/perf-perl.inc7
-rw-r--r--meta/recipes-kernel/perf/perf.bb145
-rw-r--r--meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch47
-rw-r--r--meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch55
-rw-r--r--meta/recipes-kernel/powertop/powertop_2.10.bb34
-rw-r--r--meta/recipes-kernel/powertop/powertop_2.8.bb36
-rw-r--r--meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch42
-rw-r--r--meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch32
-rw-r--r--meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch27
-rw-r--r--meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch38
-rw-r--r--meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch29
-rw-r--r--meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch41
-rw-r--r--meta/recipes-kernel/sysprof/sysprof_3.32.0.bb32
-rw-r--r--meta/recipes-kernel/sysprof/sysprof_git.bb40
-rw-r--r--meta/recipes-kernel/systemtap/systemtap-native_git.bb6
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-Do-not-let-configure-write-a-python-location-into-th.patch25
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-Install-python-modules-to-correct-library-dir.patch56
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-improve-reproducibility-for-c-compiling.patch31
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-po-LINGUAS-drop-the-polish-translation.patch27
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch37
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch39
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/system_map_location.patch23
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch34
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.bb55
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc18
-rw-r--r--meta/recipes-kernel/trace-cmd/kernelshark_git.bb32
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd.inc12
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch29
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd_git.bb33
-rw-r--r--meta/recipes-kernel/wireless-regdb/wireless-regdb_2019.06.03.bb44
-rw-r--r--meta/recipes-lsb4/libpng/libpng12_1.2.56.bb36
-rw-r--r--meta/recipes-lsb4/perl/libclass-isa-perl_0.36.bb31
-rw-r--r--meta/recipes-lsb4/perl/libdumpvalue-perl_1.17.bb18
-rw-r--r--meta/recipes-lsb4/perl/libenv-perl_1.04.bb21
-rw-r--r--meta/recipes-lsb4/perl/libfile-checktree-perl_4.41.bb32
-rw-r--r--meta/recipes-lsb4/perl/libi18n-collate-perl_1.02.bb21
-rw-r--r--meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb23
-rw-r--r--meta/recipes-multimedia/alsa/alsa-fpu.inc6
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch51
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch183
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb50
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.1.9.bb41
-rw-r--r--meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb103
-rw-r--r--meta/recipes-multimedia/alsa/alsa-plugins_1.1.9.bb173
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch75
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch31
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/autotools.patch32
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest13
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch29
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb42
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb86
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.9.bb (renamed from meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb)0
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch56
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb109
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils_1.1.9.bb106
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb142
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.1.bb158
-rw-r--r--meta/recipes-multimedia/flac/flac_1.3.1.bb42
-rw-r--r--meta/recipes-multimedia/flac/flac_1.3.3.bb46
-rw-r--r--meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch38
-rw-r--r--meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch35
-rw-r--r--meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch12
-rw-r--r--meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch69
-rw-r--r--meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch47
-rw-r--r--meta/recipes-multimedia/gstreamer/files/run-ptest3
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch39
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop (renamed from meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop)0
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples_1.16.0.bb31
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/0001-Disable-visualizations-by-default.patch36
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch252
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch107
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch54
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player_git.bb38
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-package.inc28
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-validate_1.16.1.bb25
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc47
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch35
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch36
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.1.bb70
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb20
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb38
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc42
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.1.bb57
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb11
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb25
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc157
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch57
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch27
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch634
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch244
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch32
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch77
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch51
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch495
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch17
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch63
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb145
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb26
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb45
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc51
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch168
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch29
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch119
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch12
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch24
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch14
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch69
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch)2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch12
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/link-with-libvchostif.patch45
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch12
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.1.bb73
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb19
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb31
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc53
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch62
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch44
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch40
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.1.bb76
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb17
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb29
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.1.bb40
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb13
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb37
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc20
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.1.bb35
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc38
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch27
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.1.bb34
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch33
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-vaapsink-downgrade-to-marginal.patch46
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.1.bb49
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0.inc71
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb91
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb13
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb25
-rw-r--r--meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch59
-rw-r--r--meta/recipes-multimedia/lame/lame_3.100.bb25
-rw-r--r--meta/recipes-multimedia/lame/lame_3.99.5.bb30
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch40
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch34
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch39
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb9
-rw-r--r--meta/recipes-multimedia/libogg/libogg_1.3.2.bb17
-rw-r--r--meta/recipes-multimedia/libogg/libogg_1.3.4.bb17
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.24.bb25
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.37.bb32
-rw-r--r--meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch62
-rw-r--r--meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb21
-rw-r--r--meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb28
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch107
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch96
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch42
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch34
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch73
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch59
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch37
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch37
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch115
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch34
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch37
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb26
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb39
-rw-r--r--meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb2
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch137
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch195
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch73
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch24
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch49
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch107
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtool2.patch19
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.0.6.bb52
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.1.0.bb50
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch56
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14160.patch34
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-10392.patch34
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb17
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis_1.3.6.bb21
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch156
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch55
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch63
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch70
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch (renamed from meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch)8
-rw-r--r--meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb40
-rw-r--r--meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb47
-rw-r--r--meta/recipes-multimedia/mpg123/mpg123/sdl2.patch14
-rw-r--r--meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb63
-rw-r--r--meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb51
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc140
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch61
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch70
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch37
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch30
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch429
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch72
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch79
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_13.0.bb14
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb19
-rw-r--r--meta/recipes-multimedia/sbc/sbc_1.3.bb16
-rw-r--r--meta/recipes-multimedia/sbc/sbc_1.4.bb23
-rw-r--r--meta/recipes-multimedia/speex/speex_1.2.0.bb20
-rw-r--r--meta/recipes-multimedia/speex/speex_1.2rc2.bb19
-rw-r--r--meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb2
-rw-r--r--meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch104
-rw-r--r--meta/recipes-multimedia/tremor/tremor_20150107.bb27
-rw-r--r--meta/recipes-multimedia/webp/libwebp_0.5.1.bb54
-rw-r--r--meta/recipes-multimedia/webp/libwebp_1.0.3.bb56
-rw-r--r--meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch53
-rw-r--r--meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch38
-rw-r--r--meta/recipes-multimedia/x264/x264_git.bb23
-rw-r--r--meta/recipes-rt/images/core-image-rt-sdk.bb6
-rw-r--r--meta/recipes-rt/images/core-image-rt.bb6
-rwxr-xr-xmeta/recipes-rt/rt-tests/files/rt_bmark.py2
-rw-r--r--meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb26
-rw-r--r--meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb26
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests.inc7
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests_1.1.bb35
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests_2.0.bb31
-rw-r--r--meta/recipes-sato/images/core-image-sato-ptest-fast.bb16
-rw-r--r--meta/recipes-sato/images/core-image-sato-sdk-ptest.bb15
-rw-r--r--meta/recipes-sato/images/core-image-sato.bb6
-rw-r--r--meta/recipes-sato/l3afpad/l3afpad_git.bb2
-rw-r--r--meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb2
-rw-r--r--meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb33
-rw-r--r--meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.2.bb33
-rw-r--r--meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb2
-rw-r--r--meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch34
-rw-r--r--meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb12
-rw-r--r--meta/recipes-sato/matchbox-sato/matchbox-session-sato/session5
-rw-r--r--meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb6
-rw-r--r--meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.1.bb21
-rw-r--r--meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb21
-rw-r--r--meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc2
-rw-r--r--meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb11
-rw-r--r--meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb43
-rw-r--r--meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb40
-rw-r--r--meta/recipes-sato/puzzles/files/0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch32
-rw-r--r--meta/recipes-sato/puzzles/files/0001-Use-labs-instead-of-abs.patch46
-rw-r--r--meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch24
-rw-r--r--meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch34
-rw-r--r--meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch32
-rw-r--r--meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch23
-rw-r--r--meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch25
-rw-r--r--meta/recipes-sato/puzzles/puzzles_git.bb49
-rw-r--r--meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc2
-rw-r--r--meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.20.bb8
-rw-r--r--meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb2
-rw-r--r--meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb4
-rw-r--r--meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb3
-rw-r--r--meta/recipes-sato/webkit/files/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch48
-rw-r--r--meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch32
-rw-r--r--meta/recipes-sato/webkit/files/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch49
-rw-r--r--meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch223
-rw-r--r--meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch37
-rw-r--r--meta/recipes-sato/webkit/files/musl-fixes.patch48
-rw-r--r--meta/recipes-sato/webkit/files/ppc-musl-fix.patch26
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch (renamed from meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch)0
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch75
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch46
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch35
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch47
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch52
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/cross-compile.patch23
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/include_array.patch15
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/x32_support.patch30
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.12.5.bb108
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.26.2.bb125
-rw-r--r--meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch135
-rw-r--r--meta/recipes-support/apr/apr-util_1.5.4.bb95
-rw-r--r--meta/recipes-support/apr/apr-util_1.6.1.bb95
-rw-r--r--meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch74
-rw-r--r--meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch63
-rw-r--r--meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch39
-rw-r--r--meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch36
-rw-r--r--meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch76
-rw-r--r--meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch50
-rw-r--r--meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch32
-rw-r--r--meta/recipes-support/apr/apr/cleanup.patch43
-rw-r--r--meta/recipes-support/apr/apr/configfix.patch53
-rw-r--r--meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch36
-rw-r--r--meta/recipes-support/apr/apr/configure_fixes.patch68
-rw-r--r--meta/recipes-support/apr/apr/libtoolize_check.patch28
-rw-r--r--meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch45
-rw-r--r--meta/recipes-support/apr/apr_1.5.2.bb112
-rw-r--r--meta/recipes-support/apr/apr_1.7.0.bb115
-rw-r--r--meta/recipes-support/argp-standalone/argp-standalone_1.3.bb3
-rw-r--r--meta/recipes-support/aspell/aspell_0.60.6.1.bb29
-rw-r--r--meta/recipes-support/aspell/aspell_0.60.8.bb30
-rw-r--r--meta/recipes-support/atk/at-spi2-atk_2.20.1.bb21
-rw-r--r--meta/recipes-support/atk/at-spi2-atk_2.32.0.bb19
-rw-r--r--meta/recipes-support/atk/at-spi2-core/0001-Fix-source-reproducibility.patch32
-rw-r--r--meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch49
-rw-r--r--meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch54
-rw-r--r--meta/recipes-support/atk/at-spi2-core_2.20.2.bb29
-rw-r--r--meta/recipes-support/atk/at-spi2-core_2.32.1.bb37
-rw-r--r--meta/recipes-support/atk/atk/0001-meson.build-enable-introspection-for-cross-compile.patch29
-rw-r--r--meta/recipes-support/atk/atk_2.20.0.bb21
-rw-r--r--meta/recipes-support/atk/atk_2.32.0.bb22
-rw-r--r--meta/recipes-support/attr/acl.inc42
-rw-r--r--meta/recipes-support/attr/acl/Makefile-libacl-should-depend-on-include.patch51
-rw-r--r--meta/recipes-support/attr/acl/add-missing-configure.ac.patch59
-rw-r--r--meta/recipes-support/attr/acl/configure.ac49
-rw-r--r--meta/recipes-support/attr/acl/test-fix-directory-permissions.patch17
-rw-r--r--meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch52
-rw-r--r--meta/recipes-support/attr/acl_2.2.52.bb47
-rw-r--r--meta/recipes-support/attr/attr.inc13
-rw-r--r--meta/recipes-support/attr/attr/0001-Use-stdint-types-consistently.patch69
-rw-r--r--meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch (renamed from meta/recipes-support/attr/files/attr-Missing-configure.ac.patch)0
-rw-r--r--meta/recipes-support/attr/attr/dont-use-decl-macros.patch (renamed from meta/recipes-support/attr/files/dont-use-decl-macros.patch)0
-rw-r--r--meta/recipes-support/attr/attr_2.4.47.bb3
-rw-r--r--meta/recipes-support/attr/ea-acl.inc52
-rw-r--r--meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch70
-rw-r--r--meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch240
-rw-r--r--meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch666
-rw-r--r--meta/recipes-support/bash-completion/bash-completion_2.4.bb42
-rw-r--r--meta/recipes-support/bash-completion/bash-completion_2.9.bb37
-rw-r--r--meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch29
-rw-r--r--meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch27
-rw-r--r--meta/recipes-support/bdwgc/bdwgc_7.6.0.bb42
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch34
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch37
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch43
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch39
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/fix-security.patch47
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/run-ptest5
-rw-r--r--meta/recipes-support/beecrypt/beecrypt_4.2.1.bb48
-rw-r--r--meta/recipes-support/bmap-tools/bmap-tools_3.2.bb24
-rw-r--r--meta/recipes-support/bmap-tools/bmap-tools_3.5.bb25
-rw-r--r--meta/recipes-support/boost/bjam-native_1.61.0.bb18
-rw-r--r--meta/recipes-support/boost/bjam-native_1.71.0.bb20
-rw-r--r--meta/recipes-support/boost/boost-1.61.0.inc19
-rw-r--r--meta/recipes-support/boost/boost-1.71.0.inc21
-rw-r--r--meta/recipes-support/boost/boost.inc96
-rw-r--r--meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch100
-rw-r--r--meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch153
-rw-r--r--meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch49
-rw-r--r--meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch42
-rw-r--r--meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch145
-rw-r--r--meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch60
-rw-r--r--meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch59
-rw-r--r--meta/recipes-support/boost/boost/consider-hardfp.patch19
-rw-r--r--meta/recipes-support/boost/boost_1.61.0.bb13
-rw-r--r--meta/recipes-support/boost/boost_1.71.0.bb10
-rw-r--r--meta/recipes-support/boost/files/0001-Build-debug-version-of-bjam.patch38
-rw-r--r--meta/recipes-support/boost/files/0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch27
-rw-r--r--meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch50
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates/0001-certdata2pem.py-use-python3.patch37
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch71
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates_20160104.bb82
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates_20190110.bb90
-rw-r--r--meta/recipes-support/consolekit/consolekit_0.4.6.bb7
-rw-r--r--meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch61
-rw-r--r--meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch22
-rw-r--r--meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch31
-rw-r--r--meta/recipes-support/createrepo/createrepo/fix-native-install.patch163
-rw-r--r--meta/recipes-support/createrepo/createrepo/fixstat.patch19
-rw-r--r--meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch47
-rw-r--r--meta/recipes-support/createrepo/createrepo/recommends.patch71
-rwxr-xr-xmeta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py64
-rw-r--r--meta/recipes-support/createrepo/createrepo_0.4.11.bb51
-rw-r--r--meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch17
-rw-r--r--meta/recipes-support/curl/curl/configure_ac.patch13
-rw-r--r--meta/recipes-support/curl/curl_7.50.1.bb71
-rw-r--r--meta/recipes-support/curl/curl_7.67.0.bb80
-rw-r--r--meta/recipes-support/db/db/0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch147
-rw-r--r--meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch45
-rw-r--r--meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch42
-rw-r--r--meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch32
-rw-r--r--meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch30
-rw-r--r--meta/recipes-support/db/db/arm-thumb-mutex_db5.patch48
-rw-r--r--meta/recipes-support/db/db/fix-parallel-build.patch8
-rw-r--r--meta/recipes-support/db/db/sequence-type.patch59
-rw-r--r--meta/recipes-support/db/db_5.3.28.bb74
-rw-r--r--meta/recipes-support/db/db_6.0.30.bb123
-rw-r--r--meta/recipes-support/debianutils/debianutils_4.8.6.3.bb55
-rw-r--r--meta/recipes-support/debianutils/debianutils_4.8.bb48
-rw-r--r--meta/recipes-support/dos2unix/dos2unix_7.4.1.bb34
-rw-r--r--meta/recipes-support/fribidi/fribidi_1.0.7.bb17
-rw-r--r--meta/recipes-support/gdbm/files/ptest.patch40
-rw-r--r--meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch22
-rw-r--r--meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch22
-rw-r--r--meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch60
-rw-r--r--meta/recipes-support/gdbm/gdbm_1.12.bb43
-rw-r--r--meta/recipes-support/gdbm/gdbm_1.18.1.bb43
-rw-r--r--meta/recipes-support/gdbm/gdbm_1.8.3.bb30
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch36
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch57
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch56
-rw-r--r--meta/recipes-support/gmp/gmp-6.1.1/amd64.patch18
-rw-r--r--meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch15
-rw-r--r--meta/recipes-support/gmp/gmp-6.1.2/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch (renamed from meta/recipes-support/gmp/gmp-6.1.1/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch)0
-rw-r--r--meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch (renamed from meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch)19
-rw-r--r--meta/recipes-support/gmp/gmp-6.1.2/amd64.patch18
-rw-r--r--meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch15
-rw-r--r--meta/recipes-support/gmp/gmp.inc2
-rw-r--r--meta/recipes-support/gmp/gmp_4.2.1.bb17
-rw-r--r--meta/recipes-support/gmp/gmp_6.1.1.bb38
-rw-r--r--meta/recipes-support/gmp/gmp_6.1.2.bb45
-rw-r--r--meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch35
-rw-r--r--meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch27
-rw-r--r--meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb22
-rw-r--r--meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2018.1.bb18
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch63
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch45
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch154
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch64
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch17
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch27
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch19
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch50
-rw-r--r--meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch105
-rw-r--r--meta/recipes-support/gnupg/gnupg/0001-Woverride-init-is-not-needed-with-gcc-9.patch34
-rw-r--r--meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch28
-rw-r--r--meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch85
-rw-r--r--meta/recipes-support/gnupg/gnupg/0003-dirmngr-uses-libgpg-error.patch32
-rw-r--r--meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch34
-rw-r--r--meta/recipes-support/gnupg/gnupg/autogen.sh-fix-find-version-for-beta-checking.patch31
-rw-r--r--meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch16
-rw-r--r--meta/recipes-support/gnupg/gnupg/pkgconfig.patch90
-rw-r--r--meta/recipes-support/gnupg/gnupg/relocate.patch89
-rw-r--r--meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch72
-rw-r--r--meta/recipes-support/gnupg/gnupg_1.4.7.bb104
-rw-r--r--meta/recipes-support/gnupg/gnupg_2.1.14.bb46
-rw-r--r--meta/recipes-support/gnupg/gnupg_2.2.17.bb73
-rw-r--r--meta/recipes-support/gnutls/gnutls.inc57
-rw-r--r--meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch31
-rw-r--r--meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch32
-rw-r--r--meta/recipes-support/gnutls/gnutls/arm_eabi.patch19
-rw-r--r--meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch67
-rw-r--r--meta/recipes-support/gnutls/gnutls/posix-shell.patch39
-rw-r--r--meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch67
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.5.3.bb12
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.6.8.bb68
-rw-r--r--meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch28
-rw-r--r--meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch28
-rw-r--r--meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch73
-rw-r--r--meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch56
-rw-r--r--meta/recipes-support/gnutls/libtasn1/fix-gtkdoc.patch38
-rw-r--r--meta/recipes-support/gnutls/libtasn1/fix-ldflags.patch31
-rw-r--r--meta/recipes-support/gnutls/libtasn1_4.14.bb24
-rw-r--r--meta/recipes-support/gnutls/libtasn1_4.9.bb24
-rw-r--r--meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch134
-rw-r--r--meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch291
-rw-r--r--meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch52
-rw-r--r--meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch33
-rw-r--r--meta/recipes-support/gpgme/gpgme/0004-python-import.patch34
-rw-r--r--meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch31
-rw-r--r--meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch37
-rw-r--r--meta/recipes-support/gpgme/gpgme/0007-python-Add-variables-to-tests.patch52
-rw-r--r--meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch36
-rw-r--r--meta/recipes-support/gpgme/gpgme/gpgme.pc10
-rw-r--r--meta/recipes-support/gpgme/gpgme/pkgconfig.patch279
-rw-r--r--meta/recipes-support/gpgme/gpgme_1.13.1.bb85
-rw-r--r--meta/recipes-support/gpgme/gpgme_1.6.0.bb41
-rw-r--r--meta/recipes-support/icu/icu.inc45
-rw-r--r--meta/recipes-support/icu/icu/0001-Fix-big-endian-build.patch28
-rw-r--r--meta/recipes-support/icu/icu/0001-icu-Added-armeb-support.patch30
-rw-r--r--meta/recipes-support/icu/icu/fix-install-manx.patch24
-rw-r--r--meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch28
-rw-r--r--meta/recipes-support/icu/icu_57.1.bb28
-rw-r--r--meta/recipes-support/icu/icu_64.2.bb30
-rw-r--r--meta/recipes-support/iso-codes/iso-codes_3.70.bb15
-rw-r--r--meta/recipes-support/iso-codes/iso-codes_4.4.bb19
-rw-r--r--meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch112
-rw-r--r--meta/recipes-support/libassuan/libassuan_2.4.3.bb31
-rw-r--r--meta/recipes-support/libassuan/libassuan_2.5.3.bb32
-rw-r--r--meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch70
-rw-r--r--meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb32
-rw-r--r--meta/recipes-support/libatomic-ops/libatomic-ops_7.6.10.bb22
-rw-r--r--meta/recipes-support/libbsd/libbsd_0.10.0.bb41
-rw-r--r--meta/recipes-support/libbsd/libbsd_0.8.3.bb43
-rw-r--r--meta/recipes-support/libcap-ng/libcap-ng-python_0.7.10.bb29
-rw-r--r--meta/recipes-support/libcap-ng/libcap-ng.inc19
-rw-r--r--meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch31
-rw-r--r--meta/recipes-support/libcap-ng/libcap-ng/0002-Wrap-pthread_atfork-usage-in-HAVE_PTHREAD_H.patch25
-rw-r--r--meta/recipes-support/libcap-ng/libcap-ng/python.patch28
-rw-r--r--meta/recipes-support/libcap-ng/libcap-ng_0.7.10.bb17
-rw-r--r--meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb37
-rw-r--r--meta/recipes-support/libcap/libcap_2.25.bb77
-rw-r--r--meta/recipes-support/libcap/libcap_2.27.bb75
-rw-r--r--meta/recipes-support/libcheck/libcheck/not-echo-compiler-info-to-check_stdint.h.patch19
-rw-r--r--meta/recipes-support/libcheck/libcheck_0.10.0.bb24
-rw-r--r--meta/recipes-support/libcheck/libcheck_0.13.0.bb29
-rw-r--r--meta/recipes-support/libcroco/libcroco_0.6.11.bb20
-rw-r--r--meta/recipes-support/libcroco/libcroco_0.6.13.bb20
-rw-r--r--meta/recipes-support/libevdev/libevdev_1.5.2.bb14
-rw-r--r--meta/recipes-support/libevdev/libevdev_1.8.0.bb13
-rw-r--r--meta/recipes-support/libevent/libevent/Makefile-missing-test-dir.patch27
-rw-r--r--meta/recipes-support/libevent/libevent/run-ptest41
-rw-r--r--meta/recipes-support/libevent/libevent_2.0.22.bb41
-rw-r--r--meta/recipes-support/libevent/libevent_2.1.11.bb57
-rw-r--r--meta/recipes-support/libexif/libexif/CVE-2016-6328.patch64
-rw-r--r--meta/recipes-support/libexif/libexif/CVE-2017-7544.patch40
-rw-r--r--meta/recipes-support/libexif/libexif/CVE-2018-20030.patch115
-rw-r--r--meta/recipes-support/libexif/libexif_0.6.21.bb10
-rw-r--r--meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128-part2.patch34
-rw-r--r--meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch27
-rw-r--r--meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch27
-rw-r--r--meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch32
-rw-r--r--meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch177
-rw-r--r--meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch38
-rw-r--r--meta/recipes-support/libffi/libffi/not-win32.patch21
-rw-r--r--meta/recipes-support/libffi/libffi_3.2.1.bb31
-rw-r--r--meta/recipes-support/libffi/libffi_3.3.bb40
-rw-r--r--meta/recipes-support/libfm/libfm-extra_1.2.4.bb23
-rw-r--r--meta/recipes-support/libfm/libfm-extra_1.3.1.bb23
-rw-r--r--meta/recipes-support/libfm/libfm/0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch28
-rw-r--r--meta/recipes-support/libfm/libfm/0001-Do-not-add-library-path-to-avoid-host-contamination.patch23
-rw-r--r--meta/recipes-support/libfm/libfm_1.2.4.bb38
-rw-r--r--meta/recipes-support/libfm/libfm_1.3.1.bb54
-rw-r--r--meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch90
-rw-r--r--meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch149
-rw-r--r--meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch332
-rw-r--r--meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch41
-rw-r--r--meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch178
-rw-r--r--meta/recipes-support/libgcrypt/files/0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch79
-rw-r--r--meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch28
-rw-r--r--meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch177
-rw-r--r--meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch71
-rw-r--r--meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch27
-rw-r--r--meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch32
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt.inc49
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb4
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb57
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.36-gawk5-support.patch144
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch187
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.24.bb53
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.36.bb72
-rw-r--r--meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch44
-rw-r--r--meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch33
-rw-r--r--meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch33
-rw-r--r--meta/recipes-support/libical/libical_2.0.0.bb21
-rw-r--r--meta/recipes-support/libical/libical_3.0.6.bb43
-rw-r--r--meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch50
-rw-r--r--meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch26
-rw-r--r--meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch5008
-rw-r--r--meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch50
-rw-r--r--meta/recipes-support/libiconv/libiconv_1.11.1.bb47
-rw-r--r--meta/recipes-support/libiconv/libiconv_1.14.bb51
-rw-r--r--meta/recipes-support/libjitterentropy/files/0001-Make-man-pages-reproducible.patch30
-rw-r--r--meta/recipes-support/libjitterentropy/files/0001-Makefile-cleanup-install-for-rebuilds.patch56
-rw-r--r--meta/recipes-support/libjitterentropy/libjitterentropy_2.2.0.bb29
-rw-r--r--meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch38
-rw-r--r--meta/recipes-support/libksba/libksba_1.3.4.bb26
-rw-r--r--meta/recipes-support/libksba/libksba_1.3.5.bb30
-rw-r--r--meta/recipes-support/libmpc/libmpc_1.0.3.bb15
-rw-r--r--meta/recipes-support/libmpc/libmpc_1.1.0.bb13
-rw-r--r--meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch146
-rw-r--r--meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch403
-rw-r--r--meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch82
-rw-r--r--meta/recipes-support/libnl/libnl/fix-pc-file.patch17
-rw-r--r--meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch36
-rw-r--r--meta/recipes-support/libnl/libnl_3.2.28.bb48
-rw-r--r--meta/recipes-support/libnl/libnl_3.5.0.bb42
-rw-r--r--meta/recipes-support/libpcre/libpcre/out-of-tree.patch26
-rw-r--r--meta/recipes-support/libpcre/libpcre/pcre-cross.patch48
-rw-r--r--meta/recipes-support/libpcre/libpcre2/pcre-cross.patch65
-rw-r--r--meta/recipes-support/libpcre/libpcre2_10.33.bb61
-rw-r--r--meta/recipes-support/libpcre/libpcre_8.39.bb81
-rw-r--r--meta/recipes-support/libpcre/libpcre_8.43.bb76
-rw-r--r--meta/recipes-support/libproxy/libproxy/0001-get-pac-test-Fix-build-with-clang-libc.patch31
-rw-r--r--meta/recipes-support/libproxy/libproxy_0.4.13.bb36
-rw-r--r--meta/recipes-support/libproxy/libproxy_0.4.15.bb39
-rw-r--r--meta/recipes-support/libpsl/libpsl/0001-Makefile.am-use-PYTHON-when-invoking-psl-make-dafsa.patch50
-rw-r--r--meta/recipes-support/libpsl/libpsl/0001-gtk-doc-do-not-include-tree_index.sgml.patch28
-rw-r--r--meta/recipes-support/libpsl/libpsl_0.21.0.bb23
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb35
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4_2.68.3.bb43
-rw-r--r--meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch56
-rw-r--r--meta/recipes-support/libunistring/libunistring_0.9.10.bb30
-rw-r--r--meta/recipes-support/libunistring/libunistring_0.9.6.bb28
-rw-r--r--meta/recipes-support/libunwind/libunwind.inc15
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch62
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch81
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch69
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch45
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch248
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch54
-rw-r--r--meta/recipes-support/libunwind/libunwind/0002-backtrace-Use-only-with-glibc-and-uclibc.patch45
-rw-r--r--meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch54
-rw-r--r--meta/recipes-support/libunwind/libunwind/0004-Fix-build-on-mips-musl.patch84
-rw-r--r--meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch249
-rw-r--r--meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch32
-rw-r--r--meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch62
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.3.1.bb24
-rw-r--r--meta/recipes-support/libunwind/libunwind_git.bb29
-rw-r--r--meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch144
-rw-r--r--meta/recipes-support/liburcu/liburcu/0002-Support-for-aarch64_be.patch19
-rw-r--r--meta/recipes-support/liburcu/liburcu_0.11.1.bb22
-rw-r--r--meta/recipes-support/liburcu/liburcu_0.9.2.bb21
-rw-r--r--meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch30
-rw-r--r--meta/recipes-support/libusb/libusb-compat_0.1.5.bb42
-rwxr-xr-xmeta/recipes-support/libusb/libusb1/run-ptest29
-rw-r--r--meta/recipes-support/libusb/libusb1_1.0.20.bb35
-rw-r--r--meta/recipes-support/libusb/libusb1_1.0.22.bb45
-rw-r--r--meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch130
-rw-r--r--meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch24
-rw-r--r--meta/recipes-support/libxslt/libxslt_1.1.29.bb50
-rw-r--r--meta/recipes-support/libxslt/libxslt_1.1.34.bb49
-rw-r--r--meta/recipes-support/libyaml/libyaml_0.1.7.bb20
-rw-r--r--meta/recipes-support/libyaml/libyaml_0.2.2.bb18
-rw-r--r--meta/recipes-support/lz4/files/run-ptest43
-rw-r--r--meta/recipes-support/lz4/lz4.bb21
-rw-r--r--meta/recipes-support/lz4/lz4_1.9.2.bb30
-rw-r--r--meta/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch27
-rw-r--r--meta/recipes-support/lzo/lzo/acinclude.m4358
-rw-r--r--meta/recipes-support/lzo/lzo_2.09.bb35
-rw-r--r--meta/recipes-support/lzo/lzo_2.10.bb31
-rw-r--r--meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch100
-rw-r--r--meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch37
-rw-r--r--meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch36
-rw-r--r--meta/recipes-support/lzop/lzop_1.03.bb29
-rw-r--r--meta/recipes-support/lzop/lzop_1.04.bb26
-rw-r--r--meta/recipes-support/mpfr/mpfr.inc6
-rw-r--r--meta/recipes-support/mpfr/mpfr/long-long-thumb.patch39
-rw-r--r--meta/recipes-support/mpfr/mpfr_3.1.4.bb18
-rw-r--r--meta/recipes-support/mpfr/mpfr_4.0.2.bb19
-rw-r--r--meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch68
-rw-r--r--meta/recipes-support/neon/neon/pkgconfig.patch15
-rw-r--r--meta/recipes-support/neon/neon_0.30.1.bb38
-rw-r--r--meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch46
-rw-r--r--meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch71
-rw-r--r--meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch272
-rw-r--r--meta/recipes-support/nettle/nettle-3.5.1/Add-target-to-only-build-tests-not-run-them.patch38
-rw-r--r--meta/recipes-support/nettle/nettle-3.5.1/check-header-files-of-openssl-only-if-enable_.patch36
-rw-r--r--meta/recipes-support/nettle/nettle-3.5.1/dlopen-test.patch21
-rw-r--r--meta/recipes-support/nettle/nettle-3.5.1/run-ptest (renamed from meta/recipes-support/nettle/files/run-ptest)0
-rw-r--r--meta/recipes-support/nettle/nettle.inc37
-rw-r--r--meta/recipes-support/nettle/nettle_2.7.1.bb18
-rw-r--r--meta/recipes-support/nettle/nettle_3.2.bb11
-rw-r--r--meta/recipes-support/nettle/nettle_3.5.1.bb55
-rw-r--r--meta/recipes-support/npth/npth_1.2.bb22
-rw-r--r--meta/recipes-support/npth/npth_1.6.bb27
-rw-r--r--meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch31
-rw-r--r--meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch25
-rw-r--r--meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch103
-rw-r--r--meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch2
-rw-r--r--meta/recipes-support/nspr/nspr/nspr.pc.in2
-rw-r--r--meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch10
-rw-r--r--meta/recipes-support/nspr/nspr_4.12.bb184
-rw-r--r--meta/recipes-support/nspr/nspr_4.24.bb193
-rw-r--r--meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch53
-rw-r--r--meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb5
-rw-r--r--meta/recipes-support/nss/nss/0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch35
-rw-r--r--meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch48
-rw-r--r--meta/recipes-support/nss/nss/blank-cert9.dbbin0 -> 28672 bytes
-rw-r--r--meta/recipes-support/nss/nss/blank-key4.dbbin0 -> 36864 bytes
-rw-r--r--meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch8
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch71
-rw-r--r--meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch16
-rw-r--r--meta/recipes-support/nss/nss/system-pkcs11.txt5
-rw-r--r--meta/recipes-support/nss/nss_3.25.bb242
-rw-r--r--meta/recipes-support/nss/nss_3.45.bb268
-rw-r--r--meta/recipes-support/p11-kit/p11-kit_0.22.1.bb41
-rw-r--r--meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb26
-rw-r--r--meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch100
-rw-r--r--meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch153
-rw-r--r--meta/recipes-support/pinentry/pinentry_0.9.2.bb34
-rw-r--r--meta/recipes-support/pinentry/pinentry_1.1.0.bb38
-rw-r--r--meta/recipes-support/popt/popt_1.16.bb2
-rw-r--r--meta/recipes-support/ptest-runner/ptest-runner_2.0.bb26
-rw-r--r--meta/recipes-support/ptest-runner/ptest-runner_2.3.2.bb28
-rw-r--r--meta/recipes-support/re2c/re2c_1.0.1.bb14
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch60
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch92
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/default4
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/init21
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/rngd.service13
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch63
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/underquote.patch31
-rw-r--r--meta/recipes-support/rng-tools/rng-tools_5.bb46
-rw-r--r--meta/recipes-support/rng-tools/rng-tools_6.8.bb52
-rw-r--r--meta/recipes-support/serf/serf/0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch29
-rw-r--r--meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch27
-rw-r--r--meta/recipes-support/serf/serf/0003-gen_def.patch27
-rw-r--r--meta/recipes-support/serf/serf/0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch29
-rw-r--r--meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch71
-rw-r--r--meta/recipes-support/serf/serf/norpath.patch18
-rw-r--r--meta/recipes-support/serf/serf_1.3.8.bb28
-rw-r--r--meta/recipes-support/serf/serf_1.3.9.bb33
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info.inc7
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch14
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch12
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_1.10.bb7
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_1.6.bb7
-rw-r--r--meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch30
-rw-r--r--meta/recipes-support/source-highlight/source-highlight_3.1.8.bb28
-rw-r--r--meta/recipes-support/sqlite/sqlite3.inc31
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.14.1.bb9
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.30.1.bb8
-rw-r--r--meta/recipes-support/taglib/taglib/CVE-2017-12678.patch40
-rw-r--r--meta/recipes-support/taglib/taglib/CVE-2018-11439.patch51
-rw-r--r--meta/recipes-support/taglib/taglib_1.11.1.bb44
-rw-r--r--meta/recipes-support/taglib/taglib_1.9.1.bb32
-rw-r--r--meta/recipes-support/vim/files/0001-src-Makefile-improve-reproducibility.patch46
-rw-r--r--meta/recipes-support/vim/files/disable_acl_header_check.patch39
-rw-r--r--meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch42
-rw-r--r--meta/recipes-support/vim/vim-tiny_8.1.1518.bb12
-rw-r--r--meta/recipes-support/vim/vim.inc135
-rw-r--r--meta/recipes-support/vim/vim_8.1.1518.bb10
-rw-r--r--meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch29
-rw-r--r--meta/recipes-support/vte/vte/0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch27
-rw-r--r--meta/recipes-support/vte/vte/0002-Add-W_EXITCODE-macro-for-non-glibc-systems.patch59
-rw-r--r--meta/recipes-support/vte/vte_0.44.2.bb28
-rw-r--r--meta/recipes-support/vte/vte_0.58.2.bb56
-rw-r--r--meta/recipes.txt3
-rw-r--r--meta/site/arc-common11
-rw-r--r--meta/site/arm-linux2
-rw-r--r--meta/site/arm-linux-uclibc105
-rw-r--r--meta/site/armeb-linux-uclibc38
-rw-r--r--meta/site/common2
-rw-r--r--meta/site/common-linux1
-rw-r--r--meta/site/common-musl1
-rw-r--r--meta/site/common-uclibc52
-rw-r--r--meta/site/ix86-common2
-rw-r--r--meta/site/microblaze-linux54
-rw-r--r--meta/site/mips-linux-uclibc80
-rw-r--r--meta/site/mips64-linux-uclibc83
-rw-r--r--meta/site/mips64el-linux1
-rw-r--r--meta/site/mips64el-linux-uclibc108
-rw-r--r--meta/site/mipsel-linux-uclibc100
-rw-r--r--meta/site/mipsisa32r6-linux79
-rw-r--r--meta/site/mipsisa32r6el-linux79
-rw-r--r--meta/site/mipsisa64r6-linux83
-rw-r--r--meta/site/mipsisa64r6el-linux83
-rw-r--r--meta/site/nios2-linux3
-rw-r--r--meta/site/powerpc32-linux1
-rw-r--r--meta/site/powerpc64-linux2
-rw-r--r--meta/site/riscv32-linux11
-rw-r--r--meta/site/riscv64-linux11
-rw-r--r--meta/site/sh-common1
-rw-r--r--meta/site/x32-linux1
-rw-r--r--meta/site/x86_64-linux1
-rw-r--r--meta/site/x86_64-linux-uclibc91
-rwxr-xr-xoe-init-build-env28
-rwxr-xr-xoe-init-build-env-memres90
-rwxr-xr-xscripts/autobuilder-worker-prereq-tests71
-rwxr-xr-xscripts/bitbake-prserv-tool3
-rwxr-xr-xscripts/bitbake-whatchanged12
-rwxr-xr-xscripts/buildhistory-collect-srcrevs14
-rwxr-xr-xscripts/buildhistory-diff126
-rwxr-xr-xscripts/buildstats-diff511
-rwxr-xr-xscripts/cleanup-workdir198
-rwxr-xr-xscripts/combo-layer24
-rwxr-xr-xscripts/combo-layer-hook-default.sh3
-rwxr-xr-xscripts/contrib/bb-perf/bb-matrix-plot.sh15
-rwxr-xr-xscripts/contrib/bb-perf/bb-matrix.sh15
-rwxr-xr-xscripts/contrib/bb-perf/buildstats-plot.sh144
-rwxr-xr-xscripts/contrib/bb-perf/buildstats.sh114
-rwxr-xr-xscripts/contrib/bbvars.py154
-rwxr-xr-xscripts/contrib/build-perf-test-wrapper.sh184
-rwxr-xr-xscripts/contrib/build-perf-test.sh400
-rwxr-xr-xscripts/contrib/ddimage92
-rwxr-xr-xscripts/contrib/devtool-stress.py13
-rwxr-xr-xscripts/contrib/dialog-power-control2
-rwxr-xr-xscripts/contrib/documentation-audit.sh3
-rwxr-xr-xscripts/contrib/graph-tool13
-rwxr-xr-xscripts/contrib/list-packageconfig-flags.py21
-rwxr-xr-xscripts/contrib/mkefidisk.sh459
-rwxr-xr-xscripts/contrib/oe-build-perf-report-email.py276
-rwxr-xr-xscripts/contrib/patchreview.py238
-rwxr-xr-xscripts/contrib/patchtest.sh104
-rwxr-xr-xscripts/contrib/python/generate-manifest-2.7.py397
-rwxr-xr-xscripts/contrib/python/generate-manifest-3.5.py396
-rwxr-xr-xscripts/contrib/serdevtry3
-rwxr-xr-xscripts/contrib/test_build_time.sh16
-rwxr-xr-xscripts/contrib/test_build_time_worker.sh4
-rwxr-xr-xscripts/contrib/uncovered15
-rwxr-xr-xscripts/contrib/verify-homepage.py8
-rwxr-xr-xscripts/cp-noerror2
-rwxr-xr-xscripts/create-pull-request53
-rwxr-xr-xscripts/crosstap592
-rwxr-xr-xscripts/devtool80
-rwxr-xr-xscripts/gen-lockedsig-cache58
-rwxr-xr-xscripts/gen-site-config12
-rw-r--r--scripts/lib/argparse_oe.py11
-rw-r--r--scripts/lib/build_perf/__init__.py24
-rw-r--r--scripts/lib/build_perf/html.py12
-rw-r--r--scripts/lib/build_perf/html/measurement_chart.html50
-rw-r--r--scripts/lib/build_perf/html/report.html289
-rw-r--r--scripts/lib/build_perf/report.py338
-rw-r--r--scripts/lib/build_perf/scrape-html-report.js56
-rw-r--r--scripts/lib/buildstats.py346
-rw-r--r--scripts/lib/checklayer/__init__.py398
-rw-r--r--scripts/lib/checklayer/case.py9
-rw-r--r--scripts/lib/checklayer/cases/__init__.py0
-rw-r--r--scripts/lib/checklayer/cases/bsp.py206
-rw-r--r--scripts/lib/checklayer/cases/common.py60
-rw-r--r--scripts/lib/checklayer/cases/distro.py28
-rw-r--r--scripts/lib/checklayer/context.py17
-rw-r--r--scripts/lib/devtool/__init__.py187
-rw-r--r--scripts/lib/devtool/build.py34
-rw-r--r--scripts/lib/devtool/build_image.py22
-rw-r--r--scripts/lib/devtool/build_sdk.py12
-rw-r--r--scripts/lib/devtool/deploy.py101
-rw-r--r--scripts/lib/devtool/export.py109
-rw-r--r--scripts/lib/devtool/import.py134
-rw-r--r--scripts/lib/devtool/menuconfig.py79
-rw-r--r--scripts/lib/devtool/package.py20
-rw-r--r--scripts/lib/devtool/runqemu.py25
-rw-r--r--scripts/lib/devtool/sdk.py31
-rw-r--r--scripts/lib/devtool/search.py114
-rw-r--r--scripts/lib/devtool/standard.py1446
-rw-r--r--scripts/lib/devtool/upgrade.py384
-rw-r--r--scripts/lib/devtool/utilcmds.py77
-rw-r--r--scripts/lib/recipetool/append.py75
-rw-r--r--scripts/lib/recipetool/create.py495
-rw-r--r--scripts/lib/recipetool/create_buildsys.py16
-rw-r--r--scripts/lib/recipetool/create_buildsys_python.py53
-rw-r--r--scripts/lib/recipetool/create_kernel.py16
-rw-r--r--scripts/lib/recipetool/create_kmod.py16
-rw-r--r--scripts/lib/recipetool/create_npm.py208
-rw-r--r--scripts/lib/recipetool/edit.py44
-rw-r--r--scripts/lib/recipetool/newappend.py34
-rw-r--r--scripts/lib/recipetool/setvar.py14
-rw-r--r--scripts/lib/resulttool/__init__.py0
-rw-r--r--scripts/lib/resulttool/log.py97
-rwxr-xr-xscripts/lib/resulttool/manualexecution.py235
-rw-r--r--scripts/lib/resulttool/merge.py46
-rw-r--r--scripts/lib/resulttool/regression.py186
-rw-r--r--scripts/lib/resulttool/report.py290
-rw-r--r--scripts/lib/resulttool/resultutils.py221
-rw-r--r--scripts/lib/resulttool/store.py104
-rw-r--r--scripts/lib/resulttool/template/test_report_full_text.txt79
-rw-r--r--scripts/lib/scriptpath.py12
-rw-r--r--scripts/lib/scriptutils.py282
-rw-r--r--scripts/lib/wic/__init__.py12
-rw-r--r--scripts/lib/wic/__version__.py1
-rw-r--r--scripts/lib/wic/canned-wks/common.wks.inc2
-rw-r--r--scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg28
-rw-r--r--scripts/lib/wic/canned-wks/efi-bootdisk.wks.in3
-rw-r--r--scripts/lib/wic/canned-wks/mkefidisk.wks4
-rw-r--r--scripts/lib/wic/canned-wks/mkgummidisk.wks11
-rw-r--r--scripts/lib/wic/canned-wks/mkhybridiso.wks2
-rw-r--r--scripts/lib/wic/canned-wks/mksystemd-bootdisk.wks11
-rw-r--r--scripts/lib/wic/canned-wks/qemuriscv.wks3
-rw-r--r--scripts/lib/wic/canned-wks/qemux86-directdisk.wks2
-rw-r--r--scripts/lib/wic/canned-wks/sdimage-bootpart.wks4
-rw-r--r--scripts/lib/wic/canned-wks/systemd-bootdisk.wks11
-rw-r--r--scripts/lib/wic/conf.py103
-rw-r--r--scripts/lib/wic/config/wic.conf6
-rw-r--r--scripts/lib/wic/creator.py125
-rw-r--r--scripts/lib/wic/engine.py511
-rw-r--r--scripts/lib/wic/filemap.py86
-rw-r--r--scripts/lib/wic/help.py413
-rw-r--r--scripts/lib/wic/imager/baseimager.py191
-rw-r--r--scripts/lib/wic/imager/direct.py407
-rw-r--r--scripts/lib/wic/ksparser.py113
-rw-r--r--scripts/lib/wic/misc.py249
-rw-r--r--scripts/lib/wic/msger.py235
-rw-r--r--scripts/lib/wic/partition.py384
-rw-r--r--scripts/lib/wic/plugin.py150
-rw-r--r--scripts/lib/wic/pluginbase.py95
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py602
-rw-r--r--scripts/lib/wic/plugins/imager/direct_plugin.py103
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-biosplusefi.py213
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py210
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-partition.py204
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py135
-rw-r--r--scripts/lib/wic/plugins/source/fsimage.py73
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py349
-rw-r--r--scripts/lib/wic/plugins/source/rawcopy.py84
-rw-r--r--scripts/lib/wic/plugins/source/rootfs.py91
-rw-r--r--scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py177
-rw-r--r--scripts/lib/wic/test1
-rw-r--r--scripts/lib/wic/utils/errors.py29
-rw-r--r--scripts/lib/wic/utils/misc.py95
-rw-r--r--scripts/lib/wic/utils/oe/__init__.py22
-rw-r--r--scripts/lib/wic/utils/oe/misc.py246
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py370
-rw-r--r--scripts/lib/wic/utils/runner.py110
-rw-r--r--scripts/lib/wic/utils/syslinux.py58
-rwxr-xr-xscripts/lnr3
-rw-r--r--scripts/multilib_header_wrapper.h47
-rwxr-xr-xscripts/native-intercept/chgrp5
-rwxr-xr-xscripts/native-intercept/chown3
-rwxr-xr-xscripts/oe-build-perf-report607
-rwxr-xr-xscripts/oe-build-perf-test115
-rwxr-xr-xscripts/oe-buildenv-internal44
-rwxr-xr-xscripts/oe-check-sstate12
-rwxr-xr-xscripts/oe-depends-dot157
-rwxr-xr-xscripts/oe-find-native-sysroot80
-rwxr-xr-xscripts/oe-git-archive118
-rwxr-xr-xscripts/oe-git-proxy43
-rwxr-xr-xscripts/oe-gnome-terminal-phonehome2
-rwxr-xr-xscripts/oe-pkgdata-util234
-rwxr-xr-xscripts/oe-publish-sdk20
-rwxr-xr-xscripts/oe-pylint13
-rwxr-xr-xscripts/oe-run-native56
-rwxr-xr-xscripts/oe-selftest667
-rwxr-xr-xscripts/oe-setup-builddir30
-rwxr-xr-xscripts/oe-setup-rpmrepo97
-rwxr-xr-xscripts/oe-test83
-rwxr-xr-xscripts/oe-trim-schemas12
-rwxr-xr-xscripts/oepydevshell-internal.py22
-rwxr-xr-xscripts/opkg-query-helper.py15
-rw-r--r--scripts/postinst-intercepts/delay_to_first_boot6
-rwxr-xr-xscripts/postinst-intercepts/postinst_intercept2
-rw-r--r--scripts/postinst-intercepts/update_font_cache6
-rw-r--r--scripts/postinst-intercepts/update_gio_module_cache8
-rw-r--r--scripts/postinst-intercepts/update_gtk_icon_cache17
-rw-r--r--scripts/postinst-intercepts/update_gtk_immodules_cache19
-rw-r--r--scripts/postinst-intercepts/update_icon_cache13
-rw-r--r--scripts/postinst-intercepts/update_pixbuf_cache6
-rw-r--r--scripts/postinst-intercepts/update_udev_hwdb9
-rwxr-xr-xscripts/pybootchartgui/pybootchartgui.py2
-rw-r--r--scripts/pybootchartgui/pybootchartgui/draw.py1315
-rw-r--r--scripts/pybootchartgui/pybootchartgui/gui.py208
-rw-r--r--scripts/pybootchartgui/pybootchartgui/parsing.py134
-rw-r--r--scripts/pybootchartgui/pybootchartgui/samples.py27
-rwxr-xr-xscripts/pythondeps10
-rwxr-xr-xscripts/recipetool19
-rwxr-xr-xscripts/relocate_sdk.py15
-rwxr-xr-xscripts/resulttool78
-rwxr-xr-xscripts/rpm2cpio.sh107
-rwxr-xr-xscripts/runqemu1119
-rwxr-xr-xscripts/runqemu-addptable2image14
-rwxr-xr-xscripts/runqemu-export-rootfs37
-rwxr-xr-xscripts/runqemu-extract-sdk37
-rwxr-xr-xscripts/runqemu-gen-tapdevs45
-rwxr-xr-xscripts/runqemu-ifdown28
-rwxr-xr-xscripts/runqemu-ifup18
-rw-r--r--scripts/runqemu.README2
-rwxr-xr-xscripts/send-error-report20
-rwxr-xr-xscripts/send-pull-request24
-rwxr-xr-xscripts/sstate-cache-management.sh13
-rwxr-xr-xscripts/sstate-diff-machines.sh6
-rwxr-xr-xscripts/sstate-sysroot-cruft.sh18
-rwxr-xr-xscripts/sysroot-relativelinks.py6
-rwxr-xr-xscripts/task-time135
-rwxr-xr-xscripts/test-dependencies.sh286
-rwxr-xr-xscripts/test-reexec21
-rwxr-xr-xscripts/test-remote-image14
-rwxr-xr-xscripts/tiny/dirsize.py16
-rwxr-xr-xscripts/tiny/ksize.py33
-rwxr-xr-xscripts/tiny/ksum.py154
-rwxr-xr-xscripts/verify-bashisms118
-rwxr-xr-xscripts/wic541
-rwxr-xr-xscripts/wipe-sysroot54
-rwxr-xr-xscripts/yocto-check-layer217
-rwxr-xr-xscripts/yocto-check-layer-wrapper47
5108 files changed, 176236 insertions, 241636 deletions
diff --git a/.gitignore b/.gitignore
index d8f2259228..d0e6b2fb89 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@ bitbake
*.pyc
*.pyo
/*.patch
+/.repo/
/build*/
pyshtables.py
pstage/
diff --git a/LICENSE b/LICENSE
index 21fa6e6bdf..d20dc59fb4 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,14 +1,20 @@
Different components of OpenEmbedded are under different licenses (a mix
-of MIT and GPLv2). Please see:
-
-meta/COPYING.GPLv2 (GPLv2)
-meta/COPYING.MIT (MIT)
-meta-selftest/COPYING.MIT (MIT)
-meta-skeleton/COPYING.MIT (MIT)
+of MIT and GPLv2). See LICENSE.GPL-2.0-only and LICENSE.MIT for further
+details of the individual licenses.
All metadata is MIT licensed unless otherwise stated. Source code
-included in tree for individual recipes is under the LICENSE stated in
-the associated recipe (.bb file) unless otherwise stated.
+included in tree for individual recipes (e.g. patches) are under
+the LICENSE stated in the associated recipe (.bb file) unless
+otherwise stated.
License information for any other files is either explicitly stated
-or defaults to GPL version 2.
+or defaults to GPL version 2 only.
+
+Individual files contain the following style tags instead of the full license
+text to identify their license:
+
+ SPDX-License-Identifier: GPL-2.0-only
+ SPDX-License-Identifier: MIT
+
+This enables machine processing of license information based on the SPDX
+License Identifiers that are here available: http://spdx.org/licenses/
diff --git a/LICENSE.GPL-2.0-only b/LICENSE.GPL-2.0-only
new file mode 100644
index 0000000000..5db3c0a21c
--- /dev/null
+++ b/LICENSE.GPL-2.0-only
@@ -0,0 +1,288 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+Note:
+Individual files contain the following tag instead of the full license text.
+
+ SPDX-License-Identifier: GPL-2.0-only
+
+This enables machine processing of license information based on the SPDX
+License Identifiers that are here available: http://spdx.org/licenses/
diff --git a/LICENSE.MIT b/LICENSE.MIT
new file mode 100644
index 0000000000..a6919eb7e1
--- /dev/null
+++ b/LICENSE.MIT
@@ -0,0 +1,25 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+Note:
+Individual files contain the following tag instead of the full license text.
+
+ SPDX-License-Identifier: MIT
+
+This enables machine processing of license information based on the SPDX
+License Identifiers that are here available: http://spdx.org/licenses/
diff --git a/README b/README.OE-Core
index 521916cd4f..521916cd4f 100644
--- a/README
+++ b/README.OE-Core
diff --git a/README.qemu b/README.qemu
new file mode 100644
index 0000000000..9f56b7d668
--- /dev/null
+++ b/README.qemu
@@ -0,0 +1,15 @@
+QEMU Emulation Targets
+======================
+
+To simplify development, the build system supports building images to
+work with the QEMU emulator in system emulation mode. Several architectures
+are currently supported in 32 and 64 bit variants:
+
+ * ARM (qemuarm + qemuarm64)
+ * x86 (qemux86 + qemux86-64)
+ * PowerPC (qemuppc only)
+ * MIPS (qemumips + qemumips64)
+
+Use of the QEMU images is covered in the Yocto Project Reference Manual.
+The appropriate MACHINE variable value corresponding to the target is given
+in brackets.
diff --git a/contrib/artwork/oe.svg b/contrib/artwork/oe.svg
new file mode 100644
index 0000000000..a3545cb136
--- /dev/null
+++ b/contrib/artwork/oe.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="209.104px" height="167.858px" viewBox="0 0 209.104 167.858" enable-background="new 0 0 209.104 167.858"
+ xml:space="preserve">
+<g>
+ <g>
+ <path fill="#00BCE4" d="M74.145,145.897c-0.568,0.568-0.841,1.228-0.841,2.03v0.339h5.744v-0.339c0-1.601-1.273-2.87-2.872-2.872
+ C75.372,145.056,74.713,145.33,74.145,145.897z M73.304,154.262c0,0.876,0.729,1.605,1.605,1.605h6.334
+ c1.357,0,2.195,0.838,2.195,2.194c0,1.357-0.838,2.195-2.195,2.195h-6.334c-1.657,0-3.101-0.58-4.265-1.73
+ c-1.15-1.163-1.731-2.607-1.731-4.265v-6.334c0-4.041,3.221-7.261,7.262-7.263c2.019,0,3.752,0.705,5.148,2.115
+ c1.41,1.396,2.114,3.13,2.114,5.147v4.729H73.304V154.262z"/>
+ <path fill="#00BCE4" d="M99.738,140.665c1.662,0,3.094,0.584,4.246,1.75c1.166,1.153,1.749,2.584,1.75,4.246v11.4
+ c0,1.357-0.838,2.195-2.195,2.195s-2.195-0.838-2.195-2.195v-11.4c0-0.922-0.684-1.604-1.605-1.605h-1.604v13.006
+ c0,1.357-0.838,2.195-2.195,2.195s-2.195-0.838-2.195-2.195v-13.006h-3.21v13.006c0,1.357-0.838,2.195-2.195,2.195
+ s-2.195-0.838-2.195-2.195V142.86c0-1.357,0.838-2.195,2.195-2.195H99.738z"/>
+ <path fill="#00BCE4" d="M123.308,154.262c0,3.37-2.625,5.995-5.995,5.995h-6.334c-1.356,0-2.194-0.838-2.194-2.195V135.26
+ c0-1.356,0.838-2.195,2.194-2.195c1.357,0,2.195,0.839,2.195,2.195v5.405h4.139c3.472,0,5.993,2.658,5.995,5.995V154.262z
+ M113.174,145.056v10.812h4.139c0.903,0,1.604-0.701,1.604-1.605v-7.601c0-0.927-0.678-1.604-1.605-1.605H113.174z"/>
+ <path fill="#00BCE4" d="M130.897,145.897c-0.568,0.568-0.842,1.228-0.842,2.03v0.339h5.744v-0.339c0-1.601-1.273-2.87-2.872-2.872
+ C132.124,145.056,131.466,145.33,130.897,145.897z M130.056,154.262c0,0.876,0.729,1.605,1.605,1.605h6.334
+ c1.357,0,2.195,0.838,2.195,2.194c0,1.357-0.838,2.195-2.195,2.195h-6.334c-1.657,0-3.102-0.58-4.266-1.73
+ c-1.148-1.163-1.73-2.607-1.73-4.265v-6.334c0-4.041,3.221-7.261,7.263-7.263c2.019,0,3.752,0.705,5.147,2.115
+ c1.41,1.396,2.115,3.13,2.115,5.147v4.729h-10.135V154.262z"/>
+ <path fill="#00BCE4" d="M143.688,143.646c1.129-1.972,2.906-2.98,5.201-2.981h4.139v-5.405c0-1.356,0.838-2.195,2.195-2.195
+ s2.195,0.839,2.195,2.195v22.802c0,1.357-0.838,2.195-2.195,2.195h-6.334c-1.657,0-3.102-0.58-4.266-1.73
+ c-1.149-1.163-1.73-2.607-1.73-4.265v-7.601C142.894,145.581,143.157,144.572,143.688,143.646z M147.741,145.532
+ c-0.307,0.309-0.457,0.665-0.457,1.129v7.601c0,0.878,0.727,1.605,1.605,1.605h4.139v-10.812h-4.139
+ C148.433,145.056,148.067,145.207,147.741,145.532z"/>
+ <path fill="#00BCE4" d="M160.917,143.646c1.129-1.972,2.905-2.98,5.201-2.981h4.139v-5.405c0-1.356,0.838-2.195,2.195-2.195
+ c1.356,0,2.195,0.839,2.195,2.195v22.802c0,1.357-0.839,2.195-2.195,2.195h-6.334c-1.657,0-3.102-0.58-4.266-1.73
+ c-1.149-1.163-1.73-2.607-1.73-4.265v-7.601C160.122,145.581,160.386,144.572,160.917,143.646z M164.97,145.532
+ c-0.308,0.309-0.457,0.665-0.457,1.129v7.601c0,0.878,0.727,1.605,1.605,1.605h4.139v-10.812h-4.139
+ C165.661,145.056,165.296,145.207,164.97,145.532z"/>
+ <path fill="#00BCE4" d="M182.583,145.897c-0.568,0.568-0.842,1.228-0.842,2.03v0.339h5.743l0.001-0.339
+ c0-1.601-1.273-2.87-2.873-2.872C183.81,145.056,183.15,145.33,182.583,145.897z M181.741,154.262
+ c0,0.876,0.729,1.605,1.605,1.605h6.333c1.357,0,2.195,0.838,2.195,2.194c0,1.357-0.838,2.195-2.195,2.195h-6.333
+ c-1.658,0-3.102-0.58-4.266-1.73c-1.149-1.163-1.73-2.607-1.73-4.265v-6.334c0-4.041,3.221-7.261,7.262-7.263
+ c2.019,0,3.752,0.705,5.148,2.115c1.41,1.396,2.114,3.13,2.114,5.147v4.729h-10.134V154.262z"/>
+ <path fill="#00BCE4" d="M195.374,143.646c1.129-1.972,2.905-2.98,5.2-2.981h4.139v-5.405c0-1.356,0.839-2.195,2.195-2.195
+ c1.357,0,2.195,0.839,2.195,2.195v22.802c0,1.357-0.838,2.195-2.195,2.195h-6.333c-1.658,0-3.102-0.58-4.266-1.73
+ c-1.149-1.163-1.73-2.607-1.73-4.265v-7.601C194.579,145.582,194.843,144.572,195.374,143.646z M199.427,145.532
+ c-0.308,0.309-0.457,0.665-0.457,1.129v7.601c0,0.878,0.727,1.605,1.605,1.605h4.138v-10.812h-4.138
+ C200.118,145.056,199.753,145.207,199.427,145.532z"/>
+ </g>
+ <g>
+ <path fill="#5C6F7B" d="M19.423,140.665h6.333c1.662,0,3.094,0.584,4.246,1.75c1.167,1.153,1.75,2.585,1.75,4.246v7.601
+ c0,1.651-0.587,3.082-1.748,4.244c-1.152,1.167-2.586,1.751-4.248,1.751h-4.138v5.406c0,1.357-0.838,2.195-2.195,2.195
+ s-2.195-0.839-2.195-2.195V142.86C17.228,141.503,18.066,140.665,19.423,140.665z M21.619,155.867h4.138
+ c0.903,0,1.605-0.701,1.605-1.605v-7.601c0-0.928-0.679-1.604-1.605-1.605h-4.138V155.867z"/>
+ <path fill="#5C6F7B" d="M39.688,145.897c-0.569,0.568-0.841,1.228-0.841,2.03v0.339h5.743v-0.339c0-1.601-1.272-2.87-2.872-2.872
+ C40.915,145.056,40.256,145.33,39.688,145.897z M38.847,154.262c0,0.876,0.729,1.605,1.605,1.605h6.333
+ c1.357,0,2.195,0.838,2.195,2.194c0,1.357-0.838,2.195-2.195,2.195h-6.333c-1.657,0-3.101-0.58-4.265-1.73
+ c-1.15-1.163-1.73-2.607-1.73-4.265v-6.334c0-4.041,3.22-7.261,7.262-7.263c2.018,0,3.752,0.705,5.147,2.115
+ c1.411,1.396,2.115,3.13,2.115,5.147v4.729H38.847V154.262z"/>
+ <path fill="#5C6F7B" d="M51.685,142.86c0-1.357,0.838-2.195,2.195-2.195h6.334c1.662,0,3.094,0.584,4.246,1.75
+ c1.167,1.153,1.749,2.584,1.75,4.246v11.4c0,1.357-0.838,2.195-2.195,2.195s-2.195-0.838-2.195-2.195v-11.4
+ c0-0.922-0.684-1.604-1.605-1.605h-4.138v13.006c0,1.357-0.838,2.195-2.195,2.195c-1.357,0-2.195-0.838-2.195-2.195V142.86z"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#5C6F7B" d="M10.134,147.928c0-1.601-1.273-2.87-2.872-2.872
+ c-1.599,0-2.872,1.273-2.872,2.872v5.067c0,0.824,0.267,1.485,0.822,2.049c0.564,0.555,1.226,0.823,2.05,0.823
+ c1.601,0,2.871-1.273,2.872-2.873V147.928z M0,147.928c0-4.041,3.22-7.261,7.262-7.263c2.019,0,3.752,0.705,5.148,2.115
+ c1.411,1.396,2.114,3.13,2.114,5.147v5.067c0,4.041-3.222,7.262-7.262,7.262c-1.997,0-3.732-0.713-5.147-2.114
+ C0.713,156.727,0,154.991,0,152.995V147.928z"/>
+ </g>
+ <g>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#5C6F7B" d="M25.428,79.124C25.428,35.424,60.853,0,104.552,0
+ s79.123,35.424,79.123,79.124c0,14.938-4.139,28.909-11.333,40.828h-26.366c10.352-10.5,16.738-24.918,16.738-40.828
+ c0-32.123-26.039-58.163-58.162-58.163s-58.163,26.04-58.163,58.163c0,15.91,6.388,30.328,16.738,40.828H36.761
+ C29.568,108.032,25.428,94.062,25.428,79.124z"/>
+ </g>
+ <g>
+ <path fill="#00BCE4" d="M94.122,79.124c0-2.882,1.168-5.491,3.059-7.379l17.436-17.494c-9.682-3.913-21.184-1.944-29.033,5.905
+ c-10.476,10.476-10.476,27.461,0,37.937c10.476,10.477,27.461,10.477,37.938,0c4.547-4.547,7.12-10.321,7.721-16.256l18.46-18.461
+ c5.838,16.774,2.056,36.151-11.345,49.553c-18.67,18.67-48.939,18.67-67.609,0c-18.67-18.67-18.67-48.938,0-67.608
+ c18.669-18.67,48.939-18.67,67.609,0c2.535,2.536,4.728,5.287,6.574,8.193l-32.986,32.997c-1.888,1.89-4.511,3.045-7.393,3.045
+ C98.791,89.554,94.122,84.884,94.122,79.124z"/>
+ </g>
+</g>
+</svg>
diff --git a/meta-selftest/COPYING.MIT b/meta-selftest/COPYING.MIT
deleted file mode 100644
index 89de354795..0000000000
--- a/meta-selftest/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/meta-selftest/conf/layer.conf b/meta-selftest/conf/layer.conf
index a847b78a20..08181a88cc 100644
--- a/meta-selftest/conf/layer.conf
+++ b/meta-selftest/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "selftest"
BBFILE_PATTERN_selftest = "^${LAYERDIR}/"
BBFILE_PRIORITY_selftest = "5"
+
+LAYERSERIES_COMPAT_selftest = "zeus"
diff --git a/meta-selftest/files/signing/key.passphrase b/meta-selftest/files/signing/key.passphrase
new file mode 100644
index 0000000000..5271a52680
--- /dev/null
+++ b/meta-selftest/files/signing/key.passphrase
@@ -0,0 +1 @@
+test123
diff --git a/meta-selftest/files/static-group b/meta-selftest/files/static-group
new file mode 100644
index 0000000000..9213b8e9bc
--- /dev/null
+++ b/meta-selftest/files/static-group
@@ -0,0 +1,14 @@
+messagebus:x:500:
+systemd-bus-proxy:x:501:
+systemd-network:x:502:
+systemd-resolve:x:503:
+systemd-timesync:x:504:
+polkitd:x:505:
+lock:x:506:
+systemd-journal:x:507:
+netdev:x:508:
+avahi:x:509:
+avahi-autoipd:x:510:
+rpc:x:511:
+rpcuser:x:513:
+
diff --git a/meta-selftest/files/static-passwd b/meta-selftest/files/static-passwd
new file mode 100644
index 0000000000..412f85d469
--- /dev/null
+++ b/meta-selftest/files/static-passwd
@@ -0,0 +1,11 @@
+messagebus:x:500:500::/var/lib/dbus:/bin/false
+systemd-bus-proxy:x:501:501::/:/bin/nologin
+systemd-network:x:502:502::/:/bin/nologin
+systemd-resolve:x:503:503::/:/bin/nologin
+systemd-timesync:x:504:504::/:/bin/nologin
+polkitd:x:505:505::/:/bin/nologin
+avahi:x:509:509::/:/bin/nologin
+avahi-autoipd:x:510:510::/:/bin/nologin
+rpc:x:511:511::/:/bin/nologin
+distcc:x:512:nogroup::/:/bin/nologin
+rpcuser:x:513:513::/var/lib/nfs:/bin/nologin
diff --git a/meta-selftest/lib/devtool/bbpath.py b/meta-selftest/lib/devtool/bbpath.py
new file mode 100644
index 0000000000..5e8ffb3af6
--- /dev/null
+++ b/meta-selftest/lib/devtool/bbpath.py
@@ -0,0 +1,44 @@
+import argparse
+
+already_loaded = False
+kept_context = None
+
+def plugin_name(filename):
+ return os.path.splitext(os.path.basename(filename))[0]
+
+def plugin_init(plugins):
+ global already_loaded
+ already_loaded = plugin_name(__file__) in (plugin_name(p.__name__) for p in plugins)
+
+def print_name(args, config, basepath, workspace):
+ print (__file__)
+
+def print_bbdir(args, config, basepath, workspace):
+ print (__file__.replace('/lib/devtool/bbpath.py',''))
+
+def print_registered(args, config, basepath, workspace):
+ global kept_context
+ print(kept_context.loaded)
+
+def multiloaded(args, config, basepath, workspace):
+ global already_loaded
+ print("yes" if already_loaded else "no")
+
+def register_commands(subparsers, context):
+ global kept_context
+ kept_context = context
+ if 'loaded' in context.__dict__:
+ context.loaded += 1
+ else:
+ context.loaded = 1
+
+ def addparser(name, helptxt, func):
+ parser = subparsers.add_parser(name, help=helptxt,
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser.set_defaults(func=func)
+ return parser
+
+ addparser('pluginfile', 'Print the filename of this plugin', print_name)
+ addparser('bbdir', 'Print the BBPATH directory of this plugin', print_bbdir)
+ addparser('count', 'How many times have this plugin been registered.', print_registered)
+ addparser('multiloaded', 'How many times have this plugin been initialized', multiloaded)
diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
new file mode 100644
index 0000000000..64a3502370
--- /dev/null
+++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
@@ -0,0 +1,50 @@
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.cases.dnf import DnfTest
+from oeqa.utils.httpserver import HTTPService
+from oeqa.core.decorator.data import skipIfDataVar
+
+class DnfSelftest(DnfTest):
+
+ @classmethod
+ def setUpClass(cls):
+ import tempfile
+ cls.temp_dir = tempfile.TemporaryDirectory(prefix="oeqa-remotefeeds-")
+ cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-rootfs-repo'),
+ cls.tc.target.server_ip)
+ cls.repo_server.start()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.repo_server.stop()
+ cls.temp_dir.cleanup()
+
+ @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+ @skipIfDataVar('PACKAGE_FEED_URIS', None,
+ 'Not suitable as PACKAGE_FEED_URIS is not set')
+ def test_verify_package_feeds(self):
+ """
+ Summary: Check correct setting of PACKAGE_FEED_URIS var
+ Expected: 1. Feeds were correctly set for dnf
+ 2. Update recovers packages from host's repo
+ Author: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ """
+ # When we created an image, we had to supply fake ip and port
+ # for the feeds. Now we can patch the real ones into the config file.
+ temp_file = os.path.join(self.temp_dir.name, 'tmp.repo')
+ self.tc.target.copyFrom("/etc/yum.repos.d/oe-remote-repo.repo", temp_file)
+ fixed_config = open(temp_file, "r").read().replace("bogus_ip", self.tc.target.server_ip).replace("bogus_port", str(self.repo_server.port))
+ with open(temp_file, "w") as f:
+ f.write(fixed_config)
+ self.tc.target.copyTo(temp_file, "/etc/yum.repos.d/oe-remote-repo.repo")
+
+ import re
+ # Use '-y' for non-interactive mode: automatically import the feed signing key
+ output_makecache = self.dnf('-vy makecache')
+ self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg = "dnf makecache failed to synchronize repo: %s" %(output_makecache))
+ self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg = "dnf makecache failed: %s" %(output_makecache))
+
+ output_repoinfo = self.dnf('-v repoinfo')
+ matchobj = re.match(r".*Repo-pkgs\s*:\s*(?P<n_pkgs>[0-9]+)", output_repoinfo, re.DOTALL)
+ self.assertTrue(matchobj is not None, msg = "Could not find the amount of packages in dnf repoinfo output: %s" %(output_repoinfo))
+ self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg = "Amount of remote packages is not more than zero: %s\n" %(output_repoinfo))
diff --git a/meta-selftest/lib/oeqa/runtime/selftest.json b/meta-selftest/lib/oeqa/runtime/cases/selftest.json
index e5ae46ecd4..e5ae46ecd4 100644
--- a/meta-selftest/lib/oeqa/runtime/selftest.json
+++ b/meta-selftest/lib/oeqa/runtime/cases/selftest.json
diff --git a/meta-selftest/lib/oeqa/runtime/cases/selftest.py b/meta-selftest/lib/oeqa/runtime/cases/selftest.py
new file mode 100644
index 0000000000..19de740623
--- /dev/null
+++ b/meta-selftest/lib/oeqa/runtime/cases/selftest.py
@@ -0,0 +1,31 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+
+class Selftest(OERuntimeTestCase):
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_install_package(self):
+ """
+ Summary: Check basic package installation functionality.
+ Expected: 1. Before the test socat must be installed using scp.
+ 2. After the test socat must be uninstalled using ssh.
+ This can't be checked in this test.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ (status, output) = self.target.run("socat -V")
+ self.assertEqual(status, 0, msg="socat is not installed")
+
+ @OETestDepends(['selftest.Selftest.test_install_package'])
+ def test_verify_uninstall(self):
+ """
+ Summary: Check basic package installation functionality.
+ Expected: 1. test_install_package must uninstall socat.
+ This test is just to verify that.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ (status, output) = self.target.run("socat -V")
+ self.assertNotEqual(status, 0, msg="socat is still installed")
diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
new file mode 100644
index 0000000000..c0abfd1b16
--- /dev/null
+++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
@@ -0,0 +1,18 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+import subprocess
+import oe.lsb
+
+class VirglTest(OERuntimeTestCase):
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_kernel_driver(self):
+ status, output = self.target.run('dmesg|grep virgl')
+ self.assertEqual(status, 0, "Checking for virgl driver in dmesg returned non-zero: %d\n%s" % (status, output))
+ self.assertIn("virgl 3d acceleration enabled", output, "virgl acceleration seems to be disabled:\n%s" %(output))
+
+ @OETestDepends(['virgl.VirglTest.test_kernel_driver'])
+ def test_kmscube(self):
+ status, output = self.target.run('kmscube', timeout=30)
+ self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
+ self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output))
diff --git a/meta-selftest/lib/oeqa/runtime/selftest.py b/meta-selftest/lib/oeqa/runtime/selftest.py
deleted file mode 100644
index a7e58ab3d5..0000000000
--- a/meta-selftest/lib/oeqa/runtime/selftest.py
+++ /dev/null
@@ -1,55 +0,0 @@
-import os
-
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.commands import runCmd
-from oeqa.utils.decorators import *
-
-class Selftest(oeRuntimeTest):
-
- @skipUnlessPassed("test_ssh")
- @tag("selftest_package_install")
- def test_install_package(self):
- """
- Summary: Check basic package installation functionality.
- Expected: 1. Before the test socat must be installed using scp.
- 2. After the test socat must be unistalled using ssh.
- This can't be checked in this test.
- Product: oe-core
- Author: Mariano Lopez <mariano.lopez@intel.com>
- """
-
- (status, output) = self.target.run("socat -V")
- self.assertEqual(status, 0, msg="socat is not installed")
-
- @skipUnlessPassed("test_install_package")
- @tag("selftest_package_install")
- def test_verify_unistall(self):
- """
- Summary: Check basic package installation functionality.
- Expected: 1. test_install_package must unistall socat.
- This test is just to verify that.
- Product: oe-core
- Author: Mariano Lopez <mariano.lopez@intel.com>
- """
-
- (status, output) = self.target.run("socat -V")
- self.assertNotEqual(status, 0, msg="socat is still installed")
-
- @tag("selftest_sdk")
- def test_sdk(self):
-
- result = runCmd("env -0")
- sdk_path = search_sdk_path(result.output)
- self.assertTrue(sdk_path, msg="Can't find SDK path")
-
- tar_cmd = os.path.join(sdk_path, "tar")
- result = runCmd("%s --help" % tar_cmd)
-
-def search_sdk_path(env):
- for line in env.split("\0"):
- (key, _, value) = line.partition("=")
- if key == "PATH":
- for path in value.split(":"):
- if "pokysdk" in path:
- return path
- return ""
diff --git a/meta-selftest/lib/oeqa/selftest/cases/external-layer.py b/meta-selftest/lib/oeqa/selftest/cases/external-layer.py
new file mode 100644
index 0000000000..59b1afab7d
--- /dev/null
+++ b/meta-selftest/lib/oeqa/selftest/cases/external-layer.py
@@ -0,0 +1,16 @@
+#from oeqa.selftest.base import oeSelfTest
+from oeqa.selftest.case import OESelftestTestCase
+#from oeqa.utils.decorators import testcase
+
+
+class ImportedTests(OESelftestTestCase):
+
+ def test_unconditional_pass(self):
+ """
+ Summary: Doesn't check anything, used to check import test from other layers.
+ Expected: 1. Pass unconditionally
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com
+ """
+
+ self.assertEqual(True, True, msg = "Impossible to fail this test")
diff --git a/meta-selftest/lib/recipetool/bbpath.py b/meta-selftest/lib/recipetool/bbpath.py
new file mode 100644
index 0000000000..783b2dc769
--- /dev/null
+++ b/meta-selftest/lib/recipetool/bbpath.py
@@ -0,0 +1,41 @@
+import argparse
+
+already_loaded = False
+register_count = 0
+
+def plugin_name(filename):
+ return os.path.splitext(os.path.basename(filename))[0]
+
+def plugin_init(plugins):
+ global already_loaded
+ already_loaded = plugin_name(__file__) in (plugin_name(p.__name__) for p in plugins)
+
+def print_name(opts):
+ print (__file__)
+
+def print_bbdir(opts):
+ print (__file__.replace('/lib/recipetool/bbpath.py',''))
+
+def print_registered(opts):
+ #global kept_context
+ #print(kept_context.loaded)
+ print ("1")
+
+def multiloaded(opts):
+ global already_loaded
+ print("yes" if already_loaded else "no")
+
+def register_commands(subparsers):
+ global register_count
+ register_count += 1
+
+ def addparser(name, helptxt, func):
+ parser = subparsers.add_parser(name, help=helptxt,
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser.set_defaults(func=func)
+ return parser
+
+ addparser('pluginfile', 'Print the filename of this plugin', print_name)
+ addparser('bbdir', 'Print the BBPATH directory of this plugin', print_bbdir)
+ addparser('count', 'How many times have this plugin been registered.', print_registered)
+ addparser('multiloaded', 'How many times have this plugin been initialized', multiloaded)
diff --git a/meta-selftest/recipes-devtools/python/python-async-test.inc b/meta-selftest/recipes-devtools/python/python-async-test.inc
new file mode 100644
index 0000000000..c9602e8e52
--- /dev/null
+++ b/meta-selftest/recipes-devtools/python/python-async-test.inc
@@ -0,0 +1,16 @@
+SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
+HOMEPAGE = "http://github.com/gitpython-developers/async"
+SECTION = "devel/python"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
+
+inherit pypi
+
+PYPI_PACKAGE = "async"
+
+SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
+SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
+
+RDEPENDS_${PN} += "${PYTHON_PN}-threading"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb b/meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb
new file mode 100644
index 0000000000..22e241afb3
--- /dev/null
+++ b/meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-async-test.inc
diff --git a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
index 20a0ab7d39..9f905a5198 100644
--- a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
+++ b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
@@ -8,12 +8,12 @@ SECTION = "console/utils"
LICENSE = "LGPLv2 | LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-PR = "r1"
-
SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz"
SRC_URI[md5sum] = "e66a9c9af6a60dc46134fdacf6ce97d7"
SRC_URI[sha256sum] = "f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1"
+EXCLUDE_FROM_WORLD = "1"
+
PACKAGECONFIG ??= ""
PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
@@ -26,5 +26,8 @@ FILES_${PN} = "${bindir}/aspell"
FILES_libpspell = "${libdir}/libpspell.so.*"
FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell"
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
inherit autotools gettext
diff --git a/meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend b/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend
index 205720982c..205720982c 100644
--- a/meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend
+++ b/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend
diff --git a/meta-selftest/recipes-test/container-image/container-image-testpkg.bb b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
new file mode 100644
index 0000000000..f8dd2290b3
--- /dev/null
+++ b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
@@ -0,0 +1,8 @@
+LICENSE = "MIT"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_install_append() {
+ install -d ${D}${bindir}
+ touch ${D}${bindir}/theapp
+}
diff --git a/meta-selftest/recipes-test/container-image/container-test-image.bb b/meta-selftest/recipes-test/container-image/container-test-image.bb
new file mode 100644
index 0000000000..d5f939c6e9
--- /dev/null
+++ b/meta-selftest/recipes-test/container-image/container-test-image.bb
@@ -0,0 +1,8 @@
+IMAGE_INSTALL += "container-image-testpkg"
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "container"
+IMAGE_LINGUAS = ""
+
+inherit core-image
diff --git a/meta-selftest/recipes-test/delay/delay.bb b/meta-selftest/recipes-test/delay/delay.bb
new file mode 100644
index 0000000000..f92d3d99e2
--- /dev/null
+++ b/meta-selftest/recipes-test/delay/delay.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Recipe with a fixed delay task"
+DESCRIPTION = "Contains a delay task to be used to for testing."
+LICENSE = "MIT"
+
+INHIBIT_DEFAULT_DEPS = "1"
+EXCLUDE_FROM_WORLD = "1"
+
+do_delay() {
+ sleep 5
+}
+do_delay[nostamp] = "1"
+addtask delay \ No newline at end of file
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local/file1 b/meta-selftest/recipes-test/devtool/devtool-test-local/file1
new file mode 100644
index 0000000000..f4bdcfc831
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-local/file1
@@ -0,0 +1 @@
+The first file
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local/file2 b/meta-selftest/recipes-test/devtool/devtool-test-local/file2
new file mode 100644
index 0000000000..a7e2414bd5
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-local/file2
@@ -0,0 +1 @@
+The second file
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
new file mode 100644
index 0000000000..6bfc557060
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
@@ -0,0 +1,15 @@
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/syslinux-${PV}.tar.xz \
+ file://file1 \
+ file://file2"
+
+SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
+SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e"
+
+S = "${WORKDIR}/syslinux-${PV}"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
new file mode 100644
index 0000000000..3f7123cda0
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
@@ -0,0 +1,7 @@
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "file://file1 \
+ file://file2"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly/file1 b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file1
new file mode 100644
index 0000000000..f4bdcfc831
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file1
@@ -0,0 +1 @@
+The first file
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly/file2 b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file2
new file mode 100644
index 0000000000..a7e2414bd5
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file2
@@ -0,0 +1 @@
+The second file
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb
new file mode 100644
index 0000000000..fc3799590c
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb
@@ -0,0 +1,18 @@
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+DEPENDS = "libxres libxext virtual/libx11 ncurses"
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/xrestop/xrestop-0.4.tar.gz \
+ file://readme.patch.gz \
+ "
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+S = "${WORKDIR}/xrestop-0.4"
+
+SRC_URI[md5sum] = "d8a54596cbaf037e62b80c4585a3ca9b"
+SRC_URI[sha256sum] = "67c2fc94a7ecedbaae0d1837e82e93d1d98f4a6d759828860e552119af3ce257"
+
+inherit autotools pkgconfig
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-patch-gz/readme.patch.gz b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz/readme.patch.gz
new file mode 100644
index 0000000000..4752492ccd
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz/readme.patch.gz
Binary files differ
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-subdir.bb b/meta-selftest/recipes-test/devtool/devtool-test-subdir.bb
new file mode 100644
index 0000000000..3f6956524b
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-subdir.bb
@@ -0,0 +1,9 @@
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "file://devtool-test-subdir.tar.gz \
+ file://testfile;subdir=${BPN}"
+
+S = "${WORKDIR}/${BPN}"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-subdir/devtool-test-subdir.tar.gz b/meta-selftest/recipes-test/devtool/devtool-test-subdir/devtool-test-subdir.tar.gz
new file mode 100644
index 0000000000..3d44f803cb
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-subdir/devtool-test-subdir.tar.gz
Binary files differ
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-subdir/testfile b/meta-selftest/recipes-test/devtool/devtool-test-subdir/testfile
new file mode 100644
index 0000000000..12b519c0d6
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-subdir/testfile
@@ -0,0 +1 @@
+Modified version
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch
new file mode 100644
index 0000000000..c4f3f12666
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch
@@ -0,0 +1,37 @@
+commit ced2ec32b657a7f52604b2e16e5d5881041c517a
+Author: OpenEmbedded <oe.patch@oe>
+Date: Mon Nov 18 18:43:15 2019 +0100
+
+ Backport of the NEWS file from version 1.6.0
+
+diff --git a/doc/NEWS b/doc/NEWS
+index 69793fc..fd49b1c 100644
+--- a/doc/NEWS
++++ b/doc/NEWS
+@@ -1,3 +1,26 @@
++1.6.0 - 15 March 2015
++ - fix lstat64 support when unavailable - separate patches supplied by
++ Ganael Laplanche and Peter Korsgaard
++ - (#1506) new option "-D" / "--delay-start" to only show bar after N
++ seconds (Damon Harper)
++ - new option "--fineta" / "-I" to show ETA as time of day rather than time
++ remaining - patch supplied by Erkki Seppälä (r147)
++ - (#1509) change ETA (--eta / -e) so that days are given if the hours
++ remaining are 24 or more (Jacek Wielemborek)
++ - (#1499) repeat read and write attempts on partial buffer fill/empty to
++ work around post-signal transfer rate drop reported by Ralf Ramsauer
++ - (#1507) do not try to calculate total size in line mode, due to bug
++ reported by Jacek Wielemborek and Michiel Van Herwegen
++ - cleanup: removed defunct RATS comments and unnecessary copyright notices
++ - clean up displayed lines when using --watchfd PID, when PID exits
++ - output errors on a new line to avoid overwriting transfer bar
++
++1.5.7 - 26 August 2014
++ - show KiB instead of incorrect kiB (Debian bug #706175)
++ - (#1284) do not gzip man page, for non-Linux OSes (Bob Friesenhahn)
++ - work around "awk" bug in tests/016-numeric-timer in decimal "," locales
++ - fix "make rpm" and "make srpm", extend "make release" to sign releases
++
+ 1.5.3 - 4 May 2014
+ - remove SPLICE_F_NONBLOCK to fix problem with slow splice() (Jan Seda)
+
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb
index e93b0d5514..fee5bee739 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb
@@ -3,7 +3,11 @@ LICENSE = "Artistic-2.0"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \
- file://0001-Add-a-note-line-to-the-quick-reference.patch"
+ file://0001-Add-a-note-line-to-the-quick-reference.patch \
+ file://backported.patch \
+ "
+UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
+RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd"
SRC_URI[sha256sum] = "681bcca9784bf3cb2207e68236d1f68e2aa7b80f999b5750dc77dcd756e81fbc"
@@ -12,5 +16,7 @@ PR = "r5"
S = "${WORKDIR}/pv-${PV}"
+EXCLUDE_FROM_WORLD = "1"
+
inherit autotools
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded
index afcc4aa13c..66e45c7e84 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded
@@ -3,12 +3,18 @@ LICENSE = "Artistic-2.0"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \
- file://0001-Add-a-note-line-to-the-quick-reference.patch"
+ file://0001-Add-a-note-line-to-the-quick-reference.patch \
+ file://backported.patch \
+ "
+UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
+RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
SRC_URI[md5sum] = "062bca5ff33df1dd09472e7fc3bbe332"
SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3"
S = "${WORKDIR}/pv-${PV}"
+EXCLUDE_FROM_WORLD = "1"
+
inherit autotools
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
index 9bfce0afee..07b83276fb 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
@@ -12,7 +12,11 @@ PV = "0.1+git${SRCPV}"
PR = "r2"
SRC_URI = "git://git.yoctoproject.org/dbus-wait"
+UPSTREAM_CHECK_COMMITS = "1"
+RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
S = "${WORKDIR}/git"
+EXCLUDE_FROM_WORLD = "1"
+
inherit autotools pkgconfig
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
index 9b947ed9ea..32ec4b14fa 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
@@ -11,7 +11,11 @@ SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517"
PV = "0.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/dbus-wait"
+UPSTREAM_CHECK_COMMITS = "1"
+RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
S = "${WORKDIR}/git"
+EXCLUDE_FROM_WORLD = "1"
+
inherit autotools pkgconfig
diff --git a/meta-selftest/recipes-test/error/error.bb b/meta-selftest/recipes-test/error/error.bb
index a7bdecf29d..65d00a46d9 100644
--- a/meta-selftest/recipes-test/error/error.bb
+++ b/meta-selftest/recipes-test/error/error.bb
@@ -1,9 +1,8 @@
SUMMARY = "Error Test case that fails on do_compile"
DESCRIPTION = "This generates a compile time error to be used to for testing."
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-INHIBIT_DEFAULT_DEPS = "1"
+INHIBIT_DEFAULT_DEPS = "1"
EXCLUDE_FROM_WORLD = "1"
do_compile() {
diff --git a/meta-selftest/recipes-test/fortran/files/hello.f95 b/meta-selftest/recipes-test/fortran/files/hello.f95
new file mode 100644
index 0000000000..a0745fc64d
--- /dev/null
+++ b/meta-selftest/recipes-test/fortran/files/hello.f95
@@ -0,0 +1,5 @@
+program helloworld
+
+ print * , "Hello World!"
+
+end program helloworld
diff --git a/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
new file mode 100644
index 0000000000..3a46404477
--- /dev/null
+++ b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Fortran Hello World"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+DEPENDS = "libgfortran"
+
+SRC_URI = "file://hello.f95"
+
+# These set flags that Fortran doesn't support
+SECURITY_CFLAGS = ""
+SECURITY_LDFLAGS = ""
+
+do_compile() {
+ ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
+}
+
+do_install() {
+ install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello
+}
+
+python () {
+ if not d.getVar("FORTRAN"):
+ raise bb.parse.SkipRecipe("Fortran isn't enabled")
+}
diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb b/meta-selftest/recipes-test/images/oe-selftest-image.bb
index f17094c5d0..5d4d10eef6 100644
--- a/meta-selftest/recipes-test/images/oe-selftest-image.bb
+++ b/meta-selftest/recipes-test/images/oe-selftest-image.bb
@@ -1,6 +1,6 @@
SUMMARY = "An image used during oe-selftest tests"
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} dropbear"
+IMAGE_INSTALL = "packagegroup-core-boot dropbear"
IMAGE_FEATURES = "debug-tweaks"
IMAGE_LINGUAS = " "
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb b/meta-selftest/recipes-test/images/wic-image-minimal.bb
index 58bf5a553c..e1da203b59 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -2,19 +2,14 @@ SUMMARY = "An example of partitioned image."
SRC_URI = "file://${FILE_DIRNAME}/${BPN}.wks"
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
+IMAGE_INSTALL = "packagegroup-core-boot"
IMAGE_FSTYPES = "wic"
-RM_OLD_IMAGE = "1"
-DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native gptfdisk-native"
+WKS_FILE_DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native gptfdisk-native"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-# core-image-minimal is referenced in .wks, so we need its rootfs
-# to be ready before our rootfs
-do_rootfs[depends] += "core-image-minimal:do_image core-image-minimal:do_rootfs_wicenv"
-
IMAGE_ROOTFS_EXTRA_SPACE = "2000"
inherit image
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.wks b/meta-selftest/recipes-test/images/wic-image-minimal.wks
index d55075d503..ae69cb6e3c 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.wks
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.wks
@@ -2,9 +2,9 @@
# long-description: This image contains boot partition and 3 rootfs partitions
# created from core-image-minimal and wic-image-minimal image recipes.
-part /boot --source bootimg-pcbios --ondisk vda --label boot --active --align 1024
-part / --source rootfs --ondisk vda --fstype=ext4 --label platform --align 1024 --use-uuid
-part /mnt --source rootfs --rootfs-dir=core-image-minimal --ondisk vda --fstype=ext4 --label core --align 1024
-part backup --source rootfs --rootfs-dir=wic-image-minimal --ondisk vda --fstype=ext4 --label backup --align 1024
+part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
+part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
+part /media --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label uuid-test --align 1024 --use-uuid --fsuuid 2c71ef06-a81d-4735-9d3a-379b69c6bdba
+part /mnt --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label core --align 1024
bootloader --ptable gpt --timeout=0 --append="rootwait console=tty0"
diff --git a/meta-selftest/recipes-test/license/incompatible-license-alias.bb b/meta-selftest/recipes-test/license/incompatible-license-alias.bb
new file mode 100644
index 0000000000..e0b4e13c26
--- /dev/null
+++ b/meta-selftest/recipes-test/license/incompatible-license-alias.bb
@@ -0,0 +1,3 @@
+SUMMARY = "Recipe with an alias of an SPDX license"
+DESCRIPTION = "Is licensed with an alias of an SPDX license to be used for testing"
+LICENSE = "GPLv3"
diff --git a/meta-selftest/recipes-test/license/incompatible-license.bb b/meta-selftest/recipes-test/license/incompatible-license.bb
new file mode 100644
index 0000000000..1728ad76b7
--- /dev/null
+++ b/meta-selftest/recipes-test/license/incompatible-license.bb
@@ -0,0 +1,3 @@
+SUMMARY = "Recipe with an SPDX license"
+DESCRIPTION = "Is licensed with an SPDX license to be used for testing"
+LICENSE = "GPL-3.0"
diff --git a/meta-selftest/recipes-test/license/incompatible-licenses.bb b/meta-selftest/recipes-test/license/incompatible-licenses.bb
new file mode 100644
index 0000000000..9c1545efba
--- /dev/null
+++ b/meta-selftest/recipes-test/license/incompatible-licenses.bb
@@ -0,0 +1,3 @@
+SUMMARY = "Recipe with multiple SPDX licenses"
+DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing"
+LICENSE = "GPL-2.0 & GPL-3.0 & LGPL-3.0"
diff --git a/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb
new file mode 100644
index 0000000000..35af0966ef
--- /dev/null
+++ b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb
@@ -0,0 +1,3 @@
+SUMMARY = "Recipe with a non-SPDX license"
+DESCRIPTION = "Is licensed with a non-SPDX license to be used for testing"
+LICENSE = "FooLicense"
diff --git a/meta-selftest/recipes-test/m4/m4_1.4.17.bbappend b/meta-selftest/recipes-test/m4/m4_%.bbappend
index 205720982c..205720982c 100644
--- a/meta-selftest/recipes-test/m4/m4_1.4.17.bbappend
+++ b/meta-selftest/recipes-test/m4/m4_%.bbappend
diff --git a/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch b/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch
new file mode 100644
index 0000000000..b1d5eab2b8
--- /dev/null
+++ b/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch
@@ -0,0 +1,22 @@
+From efc8831f33106e6b48de8e612c2d816fe7d1ae68 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 9 Feb 2018 17:37:48 +0200
+Subject: [PATCH] Test patch here!
+
+This is an invalid patch used by oe-selftest
+---
+ README | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/README b/README
+index 48fff57..26d1234 100644
+--- a/README
++++ b/README
+@@ -1,3 +1,4 @@
++This is a test patch for purposes of oe-selftest
+ THIS LINE MAKES THIS PATCH INVALID README for the man-db manual pager suite
+ ========================================
+
+--
+2.15.1
+
diff --git a/meta-selftest/recipes-test/man/man_1.6g.bbappend b/meta-selftest/recipes-test/man-db/man-db_%.bbappend
index 205720982c..205720982c 100644
--- a/meta-selftest/recipes-test/man/man_1.6g.bbappend
+++ b/meta-selftest/recipes-test/man-db/man-db_%.bbappend
diff --git a/meta-selftest/recipes-test/man/man/man-1.5h1-make.patch b/meta-selftest/recipes-test/man/man/man-1.5h1-make.patch
deleted file mode 100644
index a0d59b78ce..0000000000
--- a/meta-selftest/recipes-test/man/man/man-1.5h1-make.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Test patch here!
-This is invalid patch used by tests in scripts/lib/selftests.
-
---- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999
-+++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999
-@@ -1,8 +1,8 @@
- #MAKE THIS PATCH INVALID
- MAN1 = man whatis apropos
--MAN5 = man.conf
-+MAN5 = man.config
- MAN8 = makewhatis
--ALL = man.1 whatis.1 apropos.1 man.conf.5
-+ALL = man.1 whatis.1 apropos.1 man.config.5
- MAYBE8 = makewhatis
-
- .SUFFIXES: .man .1 .5 .8
diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
new file mode 100644
index 0000000000..a76a6bea1b
--- /dev/null
+++ b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
@@ -0,0 +1,28 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+MCMACHINE_virtclass-mcextend-musl = "qemux86-64"
+MCMACHINE_virtclass-mcextend-tiny = "qemux86"
+MCIMGTYPE_virtclass-mcextend-musl = "ext4"
+MCIMGTYPE_virtclass-mcextend-tiny = "cpio.gz"
+
+MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}"
+
+do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc::${MCNAME}:virtual/kernel:do_deploy"
+
+do_install () {
+ install -d ${D}/var/lib/machines/${MCNAME}
+ install ${MC_DEPLOY_DIR_IMAGE}/core-image-minimal-${MCMACHINE}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/core-image-minimal.${MCIMGTYPE}
+ install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME}
+}
+
+python () {
+ mcname = d.getVar('MCNAME')
+ if not mcname:
+ raise bb.parse.SkipRecipe("Not a multiconfig target")
+ multiconfigs = d.getVar('BBMULTICONFIG') or ""
+ if mcname not in multiconfigs:
+ raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname)
+}
+
+BBCLASSEXTEND = "mcextend:tiny mcextend:musl"
diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb
new file mode 100644
index 0000000000..6236697453
--- /dev/null
+++ b/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb
@@ -0,0 +1,11 @@
+SUMMARY = "Test Multiconfig Parsing"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_showvar() {
+ bbplain "MCTESTVAR=${MCTESTVAR}"
+}
+addtask do_showvar
+
diff --git a/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
new file mode 100644
index 0000000000..913bfabf89
--- /dev/null
+++ b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
@@ -0,0 +1,72 @@
+SUMMARY = "Packages to exercise postinstall functions"
+LICENSE = "MIT"
+
+inherit allarch
+
+PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing"
+
+ALLOW_EMPTY_${PN}-rootfs = "1"
+ALLOW_EMPTY_${PN}-delayed-a = "1"
+ALLOW_EMPTY_${PN}-delayed-b = "1"
+ALLOW_EMPTY_${PN}-rootfs-failing = "1"
+
+RDEPENDS_${PN}-delayed-a = "${PN}-rootfs"
+RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a"
+
+TESTDIR = "${sysconfdir}/postinst-test"
+
+# At rootfs time touch $TESTDIR/rootfs. Errors if the file already exists, or
+# if the function runs on first boot.
+pkg_postinst_${PN}-rootfs () {
+ set -e
+
+ if [ -z "$D" ]; then
+ echo "${PN}-rootfs should have finished at rootfs time"
+ exit 1
+ fi
+
+ if [ -e $D${TESTDIR}/rootfs ]; then
+ echo "$D${TESTDIR}/rootfs exists, but should not"
+ exit 1
+ fi
+
+ mkdir -p $D${TESTDIR}
+ touch $D${TESTDIR}/rootfs
+}
+
+# Depends on rootfs, delays until first boot, verifies that the rootfs file was
+# written.
+pkg_postinst_ontarget_${PN}-delayed-a () {
+ set -e
+
+ if [ ! -e ${TESTDIR}/rootfs ]; then
+ echo "${PN}-delayed-a: ${TESTDIR}/rootfs not found"
+ exit 1
+ fi
+
+ touch ${TESTDIR}/delayed-a
+}
+
+# Depends on delayed-a, delays until first boot, verifies that the delayed-a file was
+# written. This verifies the ordering between delayed postinsts.
+pkg_postinst_ontarget_${PN}-delayed-b () {
+ set -e
+
+ if [ ! -e ${TESTDIR}/delayed-a ]; then
+ echo "${PN}-delayed-b: ${TESTDIR}/delayed-a not found"
+ exit 1
+ fi
+
+ touch ${TESTDIR}/delayed-b
+}
+
+# This scriptlet intentionally includes a bogus command in the middle to test
+# that we catch and report such errors properly.
+pkg_postinst_${PN}-rootfs-failing () {
+ mkdir -p $D${TESTDIR}
+ touch $D${TESTDIR}/rootfs-before-failure
+ run_a_really_broken_command
+ # Scriptlet execution should stop here; the following commands are NOT supposed to run.
+ # (oe-selftest checks for it).
+ touch $D${TESTDIR}/rootfs-after-failure
+}
diff --git a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
index 7d0a040beb..7375c47933 100644
--- a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
+++ b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
@@ -15,6 +15,8 @@ SRC_URI = "file://installscript.sh \
file://selftest-replaceme-inst-todir-globfile \
file://selftest-replaceme-inst-func"
+EXCLUDE_FROM_WORLD = "1"
+
install_extrafunc() {
install -m 0644 ${WORKDIR}/selftest-replaceme-inst-func ${D}${datadir}/selftest-replaceme-inst-func
}
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test.inc b/meta-selftest/recipes-test/recipeutils/recipeutils-test.inc
new file mode 100644
index 0000000000..8490b902d7
--- /dev/null
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test.inc
@@ -0,0 +1,5 @@
+SRC_URI = "http://xorg.freedesktop.org/releases/individual/lib/libxshmfence-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "66662e76899112c0f99e22f2fc775a7e"
+SRC_URI[sha256sum] = "d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c"
+
diff --git a/meta/lib/oe/tests/__init__.py b/meta-selftest/recipes-test/recipeutils/recipeutils-test/anotherfile
index e69de29bb2..e69de29bb2 100644
--- a/meta/lib/oe/tests/__init__.py
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test/anotherfile
diff --git a/meta/recipes-core/base-files/base-files/usbd b/meta-selftest/recipes-test/recipeutils/recipeutils-test/somefile
index e69de29bb2..e69de29bb2 100644
--- a/meta/recipes-core/base-files/base-files/usbd
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test/somefile
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
new file mode 100644
index 0000000000..0cd0494da8
--- /dev/null
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Test recipe for recipeutils.patch_recipe()"
+
+require recipeutils-test.inc
+
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e"
+DEPENDS += "zlib"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI += "file://somefile"
+
+SRC_URI_append = " file://anotherfile"
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
new file mode 100644
index 0000000000..8e0d1cdd8e
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Line-oriented text editor -- selftest GPLv2 version"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
+ file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
+
+PR = "r2"
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
+SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
+
+inherit autotools texinfo
+
+S = "${WORKDIR}/ed-${PV}"
+
+EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
+
+CONFIGUREOPTS_remove = "--disable-dependency-tracking"
+CONFIGUREOPTS_remove = "--disable-silent-rules"
+EXTRA_OECONF_remove = "--disable-static"
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
new file mode 100644
index 0000000000..8a2b565ce5
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Line-oriented text editor -- selftest variant"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \
+ file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \
+ file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a"
+
+SECTION = "base"
+
+# LSB states that ed should be in /bin/
+bindir = "${base_bindir}"
+
+SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.lz"
+RECIPE_NO_UPDATE_REASON = "This recipe is used in selftest and shouldn't be updated otherwise"
+
+SRC_URI[md5sum] = "7f4a54fa7f366479f03654b8af645fd0"
+SRC_URI[sha256sum] = "ffb97eb8f2a2b5a71a9b97e3872adce953aa1b8958e04c5b7bf11d556f32552a"
+
+S = "${WORKDIR}/ed-${PV}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+inherit texinfo
+
+do_configure() {
+ ${S}/configure
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ # Info dir listing isn't interesting at this point so remove it if it exists.
+ if [ -e "${D}${infodir}/dir" ]; then
+ rm -f ${D}${infodir}/dir
+ fi
+}
diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
new file mode 100644
index 0000000000..842a9772cb
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
@@ -0,0 +1,30 @@
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+SRC_URI = "file://hello.c \
+ file://gdb.sh \
+"
+
+S = "${WORKDIR}"
+
+do_compile () {
+ ${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS}
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 755 ${WORKDIR}/gdb.sh ${D}${bindir}/
+ install -m 755 hello1 ${D}${bindir}/hello1
+ ln ${D}${bindir}/hello1 ${D}${bindir}/hello2
+
+ install -d ${D}${libexecdir}
+ ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3
+ ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4
+
+ dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M
+}
+
+RDEPENDS_${PN}-gdb += "gdb"
+PACKAGES =+ "${PN}-gdb"
+FILES_${PN}-gdb = "${bindir}/gdb.sh"
diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/gdb.sh b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/gdb.sh
new file mode 100755
index 0000000000..f6417d5458
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/gdb.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+gdb -q $1 <<'EOF'
+b main
+r
+c
+q
+EOF
+echo ""
diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c
new file mode 100644
index 0000000000..5c45dc60bd
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c
@@ -0,0 +1,5 @@
+#include <stdio.h>
+
+int main() {
+ printf("Hello World!\n");
+} \ No newline at end of file
diff --git a/meta-selftest/wic/test_biosplusefi_plugin.wks b/meta-selftest/wic/test_biosplusefi_plugin.wks
new file mode 100644
index 0000000000..5a56c84518
--- /dev/null
+++ b/meta-selftest/wic/test_biosplusefi_plugin.wks
@@ -0,0 +1,6 @@
+# short-description: This file is used in oe-selftest wic module to test biosplusefi plugin
+
+part /boot --source bootimg-biosplusefi --sourceparams="loader=grub-efi" --active --align 1024 --use-uuid
+part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
+
+bootloader --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/meta-selftest/wic/test_rawcopy_plugin.wks.in b/meta-selftest/wic/test_rawcopy_plugin.wks.in
new file mode 100644
index 0000000000..83be4be914
--- /dev/null
+++ b/meta-selftest/wic/test_rawcopy_plugin.wks.in
@@ -0,0 +1,6 @@
+# short-description: This file is used in oe-selftest wic module to test rawcopy plugin
+
+part /boot --active --source bootimg-pcbios
+part / --source rawcopy --sourceparams="file=core-image-minimal-${MACHINE}.ext4" --use-uuid
+
+bootloader --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/meta-selftest/wic/wictestdisk.wks b/meta-selftest/wic/wictestdisk.wks
new file mode 100644
index 0000000000..d4de24d830
--- /dev/null
+++ b/meta-selftest/wic/wictestdisk.wks
@@ -0,0 +1,7 @@
+# short-description: image for use in machine agnostic wic test cases
+
+# /boot is intentionally an empty partition
+part /boot --ondisk sda --label boot --active --align 1024 --size 16
+part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
+
+# bootloader is intentionally left out
diff --git a/meta-skeleton/COPYING.MIT b/meta-skeleton/COPYING.MIT
deleted file mode 100644
index fb950dc69f..0000000000
--- a/meta-skeleton/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/meta-skeleton/conf/layer.conf b/meta-skeleton/conf/layer.conf
index aca1633420..7d7381a700 100644
--- a/meta-skeleton/conf/layer.conf
+++ b/meta-skeleton/conf/layer.conf
@@ -13,3 +13,5 @@ BBFILE_PRIORITY_skeleton = "1"
LAYERVERSION_skeleton = "1"
LAYERDEPENDS_skeleton = "core"
+
+LAYERSERIES_COMPAT_skeleton = "zeus"
diff --git a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
index b140b0ac8e..3d33446500 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
+++ b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
@@ -13,3 +13,5 @@ S = "${WORKDIR}"
# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.
+
+RPROVIDES_${PN} += "kernel-module-hello"
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
index d3c02d5d61..7c5b9d0503 100644
--- a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
@@ -3,8 +3,7 @@ DESCRIPTION = "This recipe serves as an example for using features from useradd.
SECTION = "examples"
PR = "r1"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://file1 \
file://file2 \
@@ -15,6 +14,8 @@ S = "${WORKDIR}"
PACKAGES =+ "${PN}-user3"
+EXCLUDE_FROM_WORLD = "1"
+
inherit useradd
# You must set USERADD_PACKAGES when you inherit useradd. This
diff --git a/meta/COPYING.GPLv2 b/meta/COPYING.GPLv2
deleted file mode 100644
index d511905c16..0000000000
--- a/meta/COPYING.GPLv2
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index 208cde6e5e..5bd5c44a27 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -2,21 +2,29 @@
# This class is used for architecture independent recipes/data files (usually scripts)
#
-# Expand STAGING_DIR_HOST since for cross-canadian/native/nativesdk, this will
-# point elsewhere after these changes.
-STAGING_DIR_HOST := "${STAGING_DIR_HOST}"
+python allarch_package_arch_handler () {
+ if bb.data.inherits_class("native", d) or bb.data.inherits_class("nativesdk", d) \
+ or bb.data.inherits_class("crosssdk", d):
+ return
-PACKAGE_ARCH = "all"
+ variants = d.getVar("MULTILIB_VARIANTS")
+ if not variants:
+ d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise"
python () {
# Allow this class to be included but overridden - only set
# the values if we're still "all" package arch.
- if d.getVar("PACKAGE_ARCH", True) == "all":
+ if d.getVar("PACKAGE_ARCH") == "all":
# No need for virtual/libc or a cross compiler
d.setVar("INHIBIT_DEFAULT_DEPS","1")
# Set these to a common set of values, we shouldn't be using them other that for WORKDIR directory
# naming anyway
+ d.setVar("baselib", "lib")
d.setVar("TARGET_ARCH", "allarch")
d.setVar("TARGET_OS", "linux")
d.setVar("TARGET_CC_ARCH", "none")
@@ -24,13 +32,16 @@ python () {
d.setVar("TARGET_AS_ARCH", "none")
d.setVar("TARGET_FPU", "")
d.setVar("TARGET_PREFIX", "")
- d.setVar("PACKAGE_EXTRA_ARCHS", "")
+ # Expand PACKAGE_EXTRA_ARCHS since the staging code needs this
+ # (this removes any dependencies from the hash perspective)
+ d.setVar("PACKAGE_EXTRA_ARCHS", d.getVar("PACKAGE_EXTRA_ARCHS"))
d.setVar("SDK_ARCH", "none")
d.setVar("SDK_CC_ARCH", "none")
d.setVar("TARGET_CPPFLAGS", "none")
d.setVar("TARGET_CFLAGS", "none")
d.setVar("TARGET_CXXFLAGS", "none")
d.setVar("TARGET_LDFLAGS", "none")
+ d.setVar("POPULATESYSROOTDEPS", "")
# Avoid this being unnecessarily different due to nuances of
# the target machine that aren't important for "all" arch
@@ -41,7 +52,12 @@ python () {
d.setVar("EXCLUDE_FROM_SHLIBS", "1")
d.setVar("INHIBIT_PACKAGE_DEBUG_SPLIT", "1")
d.setVar("INHIBIT_PACKAGE_STRIP", "1")
+
+ # These multilib values shouldn't change allarch packages so exclude them
+ d.appendVarFlag("emit_pkgdata", "vardepsexclude", " MULTILIB_VARIANTS")
+ d.appendVarFlag("write_specfile", "vardepsexclude", " MULTILIBS")
+ d.appendVarFlag("do_package", "vardepsexclude", " package_do_shlibs")
elif bb.data.inherits_class('packagegroup', d) and not bb.data.inherits_class('nativesdk', d):
- bb.error("Please ensure recipe %s sets PACKAGE_ARCH before inherit packagegroup" % d.getVar("FILE", True))
+ bb.error("Please ensure recipe %s sets PACKAGE_ARCH before inherit packagegroup" % d.getVar("FILE"))
}
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 1d8e863bdc..7c46cff91f 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -23,9 +23,6 @@
# COPYLEFT_RECIPE_TYPES = 'target'
#
-# Don't filter the license by default
-COPYLEFT_LICENSE_INCLUDE ?= ''
-COPYLEFT_LICENSE_EXCLUDE ?= ''
# Create archive for all the recipe types
COPYLEFT_RECIPE_TYPES ?= 'target native nativesdk cross crosssdk cross-canadian'
inherit copyleft_filter
@@ -40,22 +37,24 @@ ARCHIVER_MODE[recipe] ?= "0"
DEPLOY_DIR_SRC ?= "${DEPLOY_DIR}/sources"
ARCHIVER_TOPDIR ?= "${WORKDIR}/deploy-sources"
ARCHIVER_OUTDIR = "${ARCHIVER_TOPDIR}/${TARGET_SYS}/${PF}/"
+ARCHIVER_RPMTOPDIR ?= "${WORKDIR}/deploy-sources-rpm"
+ARCHIVER_RPMOUTDIR = "${ARCHIVER_RPMTOPDIR}/${TARGET_SYS}/${PF}/"
ARCHIVER_WORKDIR = "${WORKDIR}/archiver-work/"
+
do_dumpdata[dirs] = "${ARCHIVER_OUTDIR}"
do_ar_recipe[dirs] = "${ARCHIVER_OUTDIR}"
do_ar_original[dirs] = "${ARCHIVER_OUTDIR} ${ARCHIVER_WORKDIR}"
do_deploy_archives[dirs] = "${WORKDIR}"
-do_deploy_all_archives[dirs] = "${WORKDIR}"
# This is a convenience for the shell script to use it
python () {
- pn = d.getVar('PN', True)
- assume_provided = (d.getVar("ASSUME_PROVIDED", True) or "").split()
+ pn = d.getVar('PN')
+ assume_provided = (d.getVar("ASSUME_PROVIDED") or "").split()
if pn in assume_provided:
- for p in d.getVar("PROVIDES", True).split():
+ for p in d.getVar("PROVIDES").split():
if p != pn:
pn = p
break
@@ -67,18 +66,32 @@ python () {
else:
bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
+
+ # glibc-locale: do_fetch, do_unpack and do_patch tasks have been deleted,
+ # so avoid archiving source here.
+ if pn.startswith('glibc-locale'):
+ return
+
# We just archive gcc-source for all the gcc related recipes
- if d.getVar('BPN', True) in ['gcc', 'libgcc'] \
+ if d.getVar('BPN') in ['gcc', 'libgcc'] \
and not pn.startswith('gcc-source'):
bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn)
return
- ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True)
- ar_dumpdata = d.getVarFlag('ARCHIVER_MODE', 'dumpdata', True)
- ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True)
+ def hasTask(task):
+ return bool(d.getVarFlag(task, "task", False)) and not bool(d.getVarFlag(task, "noexec", False))
+
+ ar_src = d.getVarFlag('ARCHIVER_MODE', 'src')
+ ar_dumpdata = d.getVarFlag('ARCHIVER_MODE', 'dumpdata')
+ ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe')
if ar_src == "original":
d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_original' % pn)
+ # 'patched' and 'configured' invoke do_unpack_and_patch because
+ # do_ar_patched resp. do_ar_configured depend on it, but for 'original'
+ # we have to add it explicitly.
+ if d.getVarFlag('ARCHIVER_MODE', 'diff') == '1':
+ d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_unpack_and_patch' % pn)
elif ar_src == "patched":
d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_patched' % pn)
elif ar_src == "configured":
@@ -88,9 +101,9 @@ python () {
# There is a corner case with "gcc-source-${PV}" recipes, they don't have
# the "do_configure" task, so we need to use "do_preconfigure"
- if pn.startswith("gcc-source-"):
+ if hasTask("do_preconfigure"):
d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_preconfigure' % pn)
- else:
+ elif hasTask("do_configure"):
d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn)
d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_configured' % pn)
@@ -103,11 +116,17 @@ python () {
if ar_recipe == "1":
d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_recipe' % pn)
- # Output the srpm package
- ar_srpm = d.getVarFlag('ARCHIVER_MODE', 'srpm', True)
- if ar_srpm == "1":
- if d.getVar('PACKAGES', True) != '' and d.getVar('IMAGE_PKGTYPE', True) == 'rpm':
+ # Output the SRPM package
+ if d.getVarFlag('ARCHIVER_MODE', 'srpm') == "1" and d.getVar('PACKAGES'):
+ if "package_rpm" not in d.getVar('PACKAGE_CLASSES'):
+ bb.fatal("ARCHIVER_MODE[srpm] needs package_rpm in PACKAGE_CLASSES")
+
+ # Some recipes do not have any packaging tasks
+ if hasTask("do_package_write_rpm"):
d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_package_write_rpm' % pn)
+ d.appendVarFlag('do_package_write_rpm', 'dirs', ' ${ARCHIVER_RPMTOPDIR}')
+ d.appendVarFlag('do_package_write_rpm', 'sstate-inputdirs', ' ${ARCHIVER_RPMTOPDIR}')
+ d.appendVarFlag('do_package_write_rpm', 'sstate-outputdirs', ' ${DEPLOY_DIR_SRC}')
if ar_dumpdata == "1":
d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_dumpdata' % pn)
if ar_recipe == "1":
@@ -125,14 +144,14 @@ python () {
# (e.g. git repositories) is "unpacked" and then put into a tarball.
python do_ar_original() {
- import shutil, tarfile, tempfile
+ import shutil, tempfile
- if d.getVarFlag('ARCHIVER_MODE', 'src', True) != "original":
+ if d.getVarFlag('ARCHIVER_MODE', 'src') != "original":
return
- ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
+ ar_outdir = d.getVar('ARCHIVER_OUTDIR')
bb.note('Archiving the original source...')
- urls = d.getVar("SRC_URI", True).split()
+ urls = d.getVar("SRC_URI").split()
# destsuffix (git fetcher) and subdir (everything else) are allowed to be
# absolute paths (for example, destsuffix=${S}/foobar).
# That messes with unpacking inside our tmpdir below, because the fetchers
@@ -157,7 +176,7 @@ python do_ar_original() {
if os.path.isfile(local):
shutil.copy(local, ar_outdir)
elif os.path.isdir(local):
- tmpdir = tempfile.mkdtemp(dir=d.getVar('ARCHIVER_WORKDIR', True))
+ tmpdir = tempfile.mkdtemp(dir=d.getVar('ARCHIVER_WORKDIR'))
fetch.unpack(tmpdir, (url,))
# To handle recipes with more than one source, we add the "name"
# URL parameter as suffix. We treat it as an error when
@@ -166,12 +185,18 @@ python do_ar_original() {
# to be set when using the git fetcher, otherwise SRCREV cannot
# be set separately for each URL.
params = bb.fetch2.decodeurl(url)[5]
+ type = bb.fetch2.decodeurl(url)[0]
+ location = bb.fetch2.decodeurl(url)[2]
name = params.get('name', '')
- if name in tarball_suffix:
- if not name:
- bb.fatal("Cannot determine archive names for original source because 'name' URL parameter is unset in more than one URL. Add it to at least one of these: %s %s" % (tarball_suffix[name], url))
- else:
- bb.fatal("Cannot determine archive names for original source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s %s" % (tarball_suffix[name], url))
+ if type.lower() == 'file':
+ name_tmp = location.rstrip("*").rstrip("/")
+ name = os.path.basename(name_tmp)
+ else:
+ if name in tarball_suffix:
+ if not name:
+ bb.fatal("Cannot determine archive names for original source because 'name' URL parameter is unset in more than one URL. Add it to at least one of these: %s %s" % (tarball_suffix[name], url))
+ else:
+ bb.fatal("Cannot determine archive names for original source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s %s" % (tarball_suffix[name], url))
tarball_suffix[name] = url
create_tarball(d, tmpdir + '/.', name, ar_outdir)
@@ -191,28 +216,35 @@ python do_ar_original() {
python do_ar_patched() {
- if d.getVarFlag('ARCHIVER_MODE', 'src', True) != 'patched':
+ if d.getVarFlag('ARCHIVER_MODE', 'src') != 'patched':
return
# Get the ARCHIVER_OUTDIR before we reset the WORKDIR
- ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
- ar_workdir = d.getVar('ARCHIVER_WORKDIR', True)
+ ar_outdir = d.getVar('ARCHIVER_OUTDIR')
+ if not is_work_shared(d):
+ ar_workdir = d.getVar('ARCHIVER_WORKDIR')
+ d.setVar('WORKDIR', ar_workdir)
bb.note('Archiving the patched source...')
- d.setVar('WORKDIR', ar_workdir)
- create_tarball(d, d.getVar('S', True), 'patched', ar_outdir)
+ create_tarball(d, d.getVar('S'), 'patched', ar_outdir)
}
python do_ar_configured() {
import shutil
- ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
- if d.getVarFlag('ARCHIVER_MODE', 'src', True) == 'configured':
+ # Forcibly expand the sysroot paths as we're about to change WORKDIR
+ d.setVar('STAGING_DIR_HOST', d.getVar('STAGING_DIR_HOST'))
+ d.setVar('STAGING_DIR_TARGET', d.getVar('STAGING_DIR_TARGET'))
+ d.setVar('RECIPE_SYSROOT', d.getVar('RECIPE_SYSROOT'))
+ d.setVar('RECIPE_SYSROOT_NATIVE', d.getVar('RECIPE_SYSROOT_NATIVE'))
+
+ ar_outdir = d.getVar('ARCHIVER_OUTDIR')
+ if d.getVarFlag('ARCHIVER_MODE', 'src') == 'configured':
bb.note('Archiving the configured source...')
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
# "gcc-source-${PV}" recipes don't have "do_configure"
# task, so we need to run "do_preconfigure" instead
if pn.startswith("gcc-source-"):
- d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True))
+ d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR'))
bb.build.exec_func('do_preconfigure', d)
# The libtool-native's do_configure will remove the
@@ -220,30 +252,43 @@ python do_ar_configured() {
# do_configure, we archive the already configured ${S} to
# instead of.
elif pn != 'libtool-native':
+ def runTask(task):
+ prefuncs = d.getVarFlag(task, 'prefuncs') or ''
+ for func in prefuncs.split():
+ if func != "sysroot_cleansstate":
+ bb.build.exec_func(func, d)
+ bb.build.exec_func(task, d)
+ postfuncs = d.getVarFlag(task, 'postfuncs') or ''
+ for func in postfuncs.split():
+ if func != 'do_qa_configure':
+ bb.build.exec_func(func, d)
+
# Change the WORKDIR to make do_configure run in another dir.
- d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True))
- if bb.data.inherits_class('kernel-yocto', d):
- bb.build.exec_func('do_kernel_configme', d)
- if bb.data.inherits_class('cmake', d):
- bb.build.exec_func('do_generate_toolchain_file', d)
- prefuncs = d.getVarFlag('do_configure', 'prefuncs', True)
- for func in (prefuncs or '').split():
- if func != "sysroot_cleansstate":
- bb.build.exec_func(func, d)
- bb.build.exec_func('do_configure', d)
- postfuncs = d.getVarFlag('do_configure', 'postfuncs', True)
- for func in (postfuncs or '').split():
- if func != "do_qa_configure":
- bb.build.exec_func(func, d)
- srcdir = d.getVar('S', True)
- builddir = d.getVar('B', True)
+ d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR'))
+
+ preceeds = bb.build.preceedtask('do_configure', False, d)
+ for task in preceeds:
+ if task != 'do_patch' and task != 'do_prepare_recipe_sysroot':
+ runTask(task)
+ runTask('do_configure')
+
+ srcdir = d.getVar('S')
+ builddir = d.getVar('B')
if srcdir != builddir:
if os.path.exists(builddir):
oe.path.copytree(builddir, os.path.join(srcdir, \
- 'build.%s.ar_configured' % d.getVar('PF', True)))
+ 'build.%s.ar_configured' % d.getVar('PF')))
create_tarball(d, srcdir, 'configured', ar_outdir)
}
+def exclude_useless_paths(tarinfo):
+ if tarinfo.isdir():
+ if tarinfo.name.endswith('/temp') or tarinfo.name.endswith('/patches') or tarinfo.name.endswith('/.pc'):
+ return None
+ elif tarinfo.name == 'temp' or tarinfo.name == 'patches' or tarinfo.name == '.pc':
+ return None
+ return tarinfo
+
def create_tarball(d, srcdir, suffix, ar_outdir):
"""
create the tarball from srcdir
@@ -251,23 +296,24 @@ def create_tarball(d, srcdir, suffix, ar_outdir):
import tarfile
# Make sure we are only creating a single tarball for gcc sources
- if (d.getVar('SRC_URI', True) == ""):
+ if (d.getVar('SRC_URI') == ""):
return
+ # For the kernel archive, srcdir may just be a link to the
+ # work-shared location. Use os.path.realpath to make sure
+ # that we archive the actual directory and not just the link.
+ srcdir = os.path.realpath(srcdir)
+
bb.utils.mkdirhier(ar_outdir)
if suffix:
- filename = '%s-%s.tar.gz' % (d.getVar('PF', True), suffix)
+ filename = '%s-%s.tar.gz' % (d.getVar('PF'), suffix)
else:
- filename = '%s.tar.gz' % d.getVar('PF', True)
+ filename = '%s.tar.gz' % d.getVar('PF')
tarname = os.path.join(ar_outdir, filename)
- srcdir = srcdir.rstrip('/')
- dirname = os.path.dirname(srcdir)
- basename = os.path.basename(srcdir)
- os.chdir(dirname)
bb.note('Creating %s' % tarname)
tar = tarfile.open(tarname, 'w:gz')
- tar.add(basename)
+ tar.add(srcdir, arcname=os.path.basename(srcdir), filter=exclude_useless_paths)
tar.close()
# creating .diff.gz between source.orig and source
@@ -283,56 +329,82 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
# exclude.
src_patched = src + '.patched'
oe.path.copyhardlinktree(src, src_patched)
- for i in d.getVarFlag('ARCHIVER_MODE', 'diff-exclude', True).split():
+ for i in d.getVarFlag('ARCHIVER_MODE', 'diff-exclude').split():
bb.utils.remove(os.path.join(src_orig, i), recurse=True)
bb.utils.remove(os.path.join(src_patched, i), recurse=True)
dirname = os.path.dirname(src)
basename = os.path.basename(src)
- os.chdir(dirname)
- out_file = os.path.join(ar_outdir, '%s-diff.gz' % d.getVar('PF', True))
- diff_cmd = 'diff -Naur %s.orig %s.patched | gzip -c > %s' % (basename, basename, out_file)
- subprocess.call(diff_cmd, shell=True)
- bb.utils.remove(src_patched, recurse=True)
+ bb.utils.mkdirhier(ar_outdir)
+ cwd = os.getcwd()
+ try:
+ os.chdir(dirname)
+ out_file = os.path.join(ar_outdir, '%s-diff.gz' % d.getVar('PF'))
+ diff_cmd = 'diff -Naur %s.orig %s.patched | gzip -c > %s' % (basename, basename, out_file)
+ subprocess.check_call(diff_cmd, shell=True)
+ bb.utils.remove(src_patched, recurse=True)
+ finally:
+ os.chdir(cwd)
+
+def is_work_shared(d):
+ pn = d.getVar('PN')
+ return bb.data.inherits_class('kernel', d) or pn.startswith('gcc-source')
# Run do_unpack and do_patch
python do_unpack_and_patch() {
- if d.getVarFlag('ARCHIVER_MODE', 'src', True) not in \
+ if d.getVarFlag('ARCHIVER_MODE', 'src') not in \
[ 'patched', 'configured'] and \
- d.getVarFlag('ARCHIVER_MODE', 'diff', True) != '1':
+ d.getVarFlag('ARCHIVER_MODE', 'diff') != '1':
return
- ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
- ar_workdir = d.getVar('ARCHIVER_WORKDIR', True)
+ ar_outdir = d.getVar('ARCHIVER_OUTDIR')
+ ar_workdir = d.getVar('ARCHIVER_WORKDIR')
+ ar_sysroot_native = d.getVar('STAGING_DIR_NATIVE')
+ pn = d.getVar('PN')
# The kernel class functions require it to be on work-shared, so we dont change WORKDIR
- if not bb.data.inherits_class('kernel-yocto', d):
+ if not is_work_shared(d):
# Change the WORKDIR to make do_unpack do_patch run in another dir.
d.setVar('WORKDIR', ar_workdir)
+ # Restore the original path to recipe's native sysroot (it's relative to WORKDIR).
+ d.setVar('STAGING_DIR_NATIVE', ar_sysroot_native)
# The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the
# possibly requiring of the following tasks (such as some recipes's
# do_patch required 'B' existed).
- bb.utils.mkdirhier(d.getVar('B', True))
+ bb.utils.mkdirhier(d.getVar('B'))
bb.build.exec_func('do_unpack', d)
# Save the original source for creating the patches
- if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1':
- src = d.getVar('S', True).rstrip('/')
+ if d.getVarFlag('ARCHIVER_MODE', 'diff') == '1':
+ src = d.getVar('S').rstrip('/')
src_orig = '%s.orig' % src
oe.path.copytree(src, src_orig)
# Make sure gcc and kernel sources are patched only once
- if not ((d.getVar('SRC_URI', True) == "" or bb.data.inherits_class('kernel-yocto', d))):
+ if not (d.getVar('SRC_URI') == "" or is_work_shared(d)):
bb.build.exec_func('do_patch', d)
# Create the patches
- if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1':
+ if d.getVarFlag('ARCHIVER_MODE', 'diff') == '1':
bb.note('Creating diff gz...')
create_diff_gz(d, src_orig, src, ar_outdir)
bb.utils.remove(src_orig, recurse=True)
}
+# BBINCLUDED is special (excluded from basehash signature
+# calculation). Using it in a task signature can cause "basehash
+# changed" errors.
+#
+# Depending on BBINCLUDED also causes do_ar_recipe to run again
+# for unrelated changes, like adding or removing buildhistory.bbclass.
+#
+# For these reasons we ignore the dependency completely. The versioning
+# of the output file ensures that we create it each time the recipe
+# gets rebuilt, at least as long as a PR server is used. We also rely
+# on that mechanism to catch changes in the file content, because the
+# file content is not part of of the task signature either.
+do_ar_recipe[vardepsexclude] += "BBINCLUDED"
python do_ar_recipe () {
"""
archive the recipe, including .bb and .inc.
@@ -342,24 +414,24 @@ python do_ar_recipe () {
require_re = re.compile( r"require\s+(.+)" )
include_re = re.compile( r"include\s+(.+)" )
- bbfile = d.getVar('FILE', True)
- outdir = os.path.join(d.getVar('WORKDIR', True), \
- '%s-recipe' % d.getVar('PF', True))
+ bbfile = d.getVar('FILE')
+ outdir = os.path.join(d.getVar('WORKDIR'), \
+ '%s-recipe' % d.getVar('PF'))
bb.utils.mkdirhier(outdir)
shutil.copy(bbfile, outdir)
- pn = d.getVar('PN', True)
- bbappend_files = d.getVar('BBINCLUDED', True).split()
+ pn = d.getVar('PN')
+ bbappend_files = d.getVar('BBINCLUDED').split()
# If recipe name is aa, we need to match files like aa.bbappend and aa_1.1.bbappend
# Files like aa1.bbappend or aa1_1.1.bbappend must be excluded.
- bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" %pn)
- bbappend_re1 = re.compile( r".*/%s\.bbappend$" %pn)
+ bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" % re.escape(pn))
+ bbappend_re1 = re.compile( r".*/%s\.bbappend$" % re.escape(pn))
for file in bbappend_files:
if bbappend_re.match(file) or bbappend_re1.match(file):
shutil.copy(file, outdir)
dirname = os.path.dirname(bbfile)
- bbpath = '%s:%s' % (dirname, d.getVar('BBPATH', True))
+ bbpath = '%s:%s' % (dirname, d.getVar('BBPATH'))
f = open(bbfile, 'r')
for line in f.readlines():
incfile = None
@@ -368,12 +440,13 @@ python do_ar_recipe () {
elif include_re.match(line):
incfile = include_re.match(line).group(1)
if incfile:
- incfile = bb.data.expand(incfile, d)
+ incfile = d.expand(incfile)
+ if incfile:
incfile = bb.utils.which(bbpath, incfile)
- if incfile:
- shutil.copy(incfile, outdir)
+ if incfile:
+ shutil.copy(incfile, outdir)
- create_tarball(d, outdir, 'recipe', d.getVar('ARCHIVER_OUTDIR', True))
+ create_tarball(d, outdir, 'recipe', d.getVar('ARCHIVER_OUTDIR'))
bb.utils.remove(outdir, recurse=True)
}
@@ -382,8 +455,8 @@ python do_dumpdata () {
dump environment data to ${PF}-showdata.dump
"""
- dumpfile = os.path.join(d.getVar('ARCHIVER_OUTDIR', True), \
- '%s-showdata.dump' % d.getVar('PF', True))
+ dumpfile = os.path.join(d.getVar('ARCHIVER_OUTDIR'), \
+ '%s-showdata.dump' % d.getVar('PF'))
bb.note('Dumping metadata into %s' % dumpfile)
with open(dumpfile, "w") as f:
# emit variables and shell functions
@@ -414,15 +487,11 @@ addtask do_dumpdata
addtask do_ar_recipe
addtask do_deploy_archives before do_build
-addtask do_deploy_all_archives after do_deploy_archives
-do_deploy_all_archives[recrdeptask] = "do_deploy_archives"
-do_deploy_all_archives[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_deploy_all_archives() {
- :
-}
-
python () {
- # Add tasks in the correct order, specifically for linux-yocto to avoid race condition
+ # Add tasks in the correct order, specifically for linux-yocto to avoid race condition.
+ # sstatesig.py:sstate_rundepfilter has special support that excludes this dependency
+ # so that do_kernel_configme does not need to run again when do_unpack_and_patch
+ # gets added or removed (by adding or removing archiver.bbclass).
if bb.data.inherits_class('kernel-yocto', d):
bb.build.addtask('do_kernel_configme', 'do_configure', 'do_unpack_and_patch', d)
}
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index ecbba9f603..3d22ad0255 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -1,8 +1,8 @@
def autotools_dep_prepend(d):
- if d.getVar('INHIBIT_AUTOTOOLS_DEPS', True):
+ if d.getVar('INHIBIT_AUTOTOOLS_DEPS'):
return ''
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
deps = ''
if pn in ['autoconf-native', 'automake-native', 'help2man-native']:
@@ -14,7 +14,7 @@ def autotools_dep_prepend(d):
if not bb.data.inherits_class('native', d) \
and not bb.data.inherits_class('nativesdk', d) \
and not bb.data.inherits_class('cross', d) \
- and not d.getVar('INHIBIT_DEFAULT_DEPS', True):
+ and not d.getVar('INHIBIT_DEFAULT_DEPS'):
deps += 'libtool-cross '
return deps + 'gnu-config-native '
@@ -25,9 +25,11 @@ inherit siteinfo
# Space separated list of shell scripts with variables defined to supply test
# results for autoconf tests we cannot run at build time.
-export CONFIG_SITE = "${@siteinfo_get_files(d)}"
+# The value of this variable is filled in in a prefunc because it depends on
+# the contents of the sysroot.
+export CONFIG_SITE
-acpaths = "default"
+acpaths ?= "default"
EXTRA_AUTORECONF = "--exclude=autopoint"
export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir}"
@@ -131,133 +133,21 @@ EXTRACONFFUNCS ??= ""
EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
-do_configure[prefuncs] += "autotools_preconfigure autotools_copy_aclocals ${EXTRACONFFUNCS}"
+do_configure[prefuncs] += "autotools_preconfigure autotools_aclocals ${EXTRACONFFUNCS}"
+do_compile[prefuncs] += "autotools_aclocals"
+do_install[prefuncs] += "autotools_aclocals"
do_configure[postfuncs] += "autotools_postconfigure"
-ACLOCALDIR = "${WORKDIR}/aclocal-copy"
-
-python autotools_copy_aclocals () {
- import copy
-
- s = d.getVar("AUTOTOOLS_SCRIPT_PATH", True)
- if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"):
- if not d.getVar("AUTOTOOLS_COPYACLOCAL", False):
- return
-
- taskdepdata = d.getVar("BB_TASKDEPDATA", False)
- #bb.warn(str(taskdepdata))
- pn = d.getVar("PN", True)
- aclocaldir = d.getVar("ACLOCALDIR", True)
- oe.path.remove(aclocaldir)
- bb.utils.mkdirhier(aclocaldir)
- start = None
- configuredeps = []
- # Detect bitbake -b usage
- # Everything but quilt-native would have dependencies
- nodeps = (pn != "quilt-native")
-
- for dep in taskdepdata:
- data = taskdepdata[dep]
- if data[1] == "do_configure" and data[0] == pn:
- start = dep
- if not nodeps and start:
- break
- if nodeps and data[0] != pn:
- nodeps = False
- if start is None:
- bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
-
- # We need to figure out which m4 files we need to expose to this do_configure task.
- # This needs to match what would get restored from sstate, which is controlled
- # ultimately by calls from bitbake to setscene_depvalid().
- # That function expects a setscene dependency tree. We build a dependency tree
- # condensed to do_populate_sysroot -> do_populate_sysroot dependencies, similar to
- # that used by setscene tasks. We can then call into setscene_depvalid() and decide
- # which dependencies we can "see" and should expose the m4 files for.
- setscenedeps = copy.deepcopy(taskdepdata)
-
- start = set([start])
-
- # Create collapsed do_populate_sysroot -> do_populate_sysroot tree
- for dep in taskdepdata:
- data = setscenedeps[dep]
- if data[1] != "do_populate_sysroot":
- for dep2 in setscenedeps:
- data2 = setscenedeps[dep2]
- if dep in data2[3]:
- data2[3].update(setscenedeps[dep][3])
- data2[3].remove(dep)
- if dep in start:
- start.update(setscenedeps[dep][3])
- start.remove(dep)
- del setscenedeps[dep]
-
- # Remove circular references
- for dep in setscenedeps:
- if dep in setscenedeps[dep][3]:
- setscenedeps[dep][3].remove(dep)
-
- # Direct dependencies should be present and can be depended upon
- for dep in start:
- configuredeps.append(setscenedeps[dep][0])
-
- # Call into setscene_depvalid for each sub-dependency and only copy m4 files
- # for ones that would be restored from sstate.
- done = list(start)
- next = list(start)
- while next:
- new = []
- for dep in next:
- data = setscenedeps[dep]
- for datadep in data[3]:
- if datadep in done:
- continue
- taskdeps = {}
- taskdeps[dep] = setscenedeps[dep][:2]
- taskdeps[datadep] = setscenedeps[datadep][:2]
- retval = setscene_depvalid(datadep, taskdeps, [], d)
- if retval:
- bb.note("Skipping setscene dependency %s for m4 macro copying" % datadep)
- continue
- done.append(datadep)
- new.append(datadep)
- configuredeps.append(setscenedeps[datadep][0])
- next = new
-
- cp = []
- if nodeps:
- bb.warn("autotools: Unable to find task dependencies, -b being used? Pulling in all m4 files")
- for l in [d.expand("${STAGING_DATADIR_NATIVE}/aclocal/"), d.expand("${STAGING_DATADIR}/aclocal/")]:
- cp.extend(os.path.join(l, f) for f in os.listdir(l))
-
- for c in configuredeps:
- if c.endswith("-native"):
- manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c)
- elif c.startswith("nativesdk-"):
- manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c)
- elif "-cross-" in c or "-crosssdk" in c:
- continue
- else:
- manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${MACHINE}-%s.populate_sysroot" % c)
- try:
- f = open(manifest, "r")
- for l in f:
- if "/aclocal/" in l and l.strip().endswith(".m4"):
- cp.append(l.strip())
- elif "config_site.d/" in l:
- cp.append(l.strip())
- except:
- bb.warn("%s not found" % manifest)
-
- for c in cp:
- t = os.path.join(aclocaldir, os.path.basename(c))
- if not os.path.exists(t):
- os.symlink(c, t)
-
- # Refresh variable with cache files
- d.setVar("CONFIG_SITE", siteinfo_get_files(d, aclocalcache=True))
+ACLOCALDIR = "${STAGING_DATADIR}/aclocal"
+ACLOCALEXTRAPATH = ""
+ACLOCALEXTRAPATH_class-target = " -I ${STAGING_DATADIR_NATIVE}/aclocal/"
+ACLOCALEXTRAPATH_class-nativesdk = " -I ${STAGING_DATADIR_NATIVE}/aclocal/"
+
+python autotools_aclocals () {
+ d.setVar("CONFIG_SITE", siteinfo_get_files(d, sysrootcache=True))
}
-autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
+
+CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am"
autotools_do_configure() {
# WARNING: gross hack follows:
@@ -277,6 +167,7 @@ autotools_do_configure() {
if [ -e ${AUTOTOOLS_SCRIPT_PATH}/configure.in -o -e ${AUTOTOOLS_SCRIPT_PATH}/configure.ac ]; then
olddir=`pwd`
cd ${AUTOTOOLS_SCRIPT_PATH}
+ mkdir -p ${ACLOCALDIR}
ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/"
if [ x"${acpaths}" = xdefault ]; then
acpaths=
@@ -287,6 +178,7 @@ autotools_do_configure() {
else
acpaths="${acpaths}"
fi
+ acpaths="$acpaths ${ACLOCALEXTRAPATH}"
AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]\+$//};q'`
automake --version
echo "AUTOV is $AUTOV"
@@ -304,14 +196,14 @@ autotools_do_configure() {
else
CONFIGURE_AC=configure.ac
fi
- if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
- if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
+ if grep -q "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC; then
+ if grep -q "sed.*POTFILES" $CONFIGURE_AC; then
: do nothing -- we still have an old unmodified configure.ac
else
bbnote Executing glib-gettextize --force --copy
echo "no" | glib-gettextize --force --copy
fi
- elif grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
+ elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
# We'd call gettextize here if it wasn't so broken...
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
if [ -d ${S}/po/ ]; then
@@ -323,7 +215,7 @@ autotools_do_configure() {
PRUNE_M4="$PRUNE_M4 gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4"
fi
mkdir -p m4
- if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
+ if grep -q "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC; then
if ! echo "${DEPENDS}" | grep -q intltool-native; then
bbwarn "Missing DEPENDS on intltool-native"
fi
@@ -336,7 +228,7 @@ autotools_do_configure() {
find ${S} -ignore_readdir_race -name $i -delete
done
- bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
+ bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
cd $olddir
fi
@@ -348,7 +240,7 @@ autotools_do_configure() {
}
autotools_do_compile() {
- oe_runmake
+ oe_runmake
}
autotools_do_install() {
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 21957d84a1..145daea3ec 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -10,13 +10,17 @@ inherit utility-tasks
inherit metadata_scm
inherit logging
-OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath"
+OE_EXTRA_IMPORTS ?= ""
+
+OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license ${OE_EXTRA_IMPORTS}"
OE_IMPORTS[type] = "list"
+PACKAGECONFIG_CONFARGS ??= ""
+
def oe_import(d):
import sys
- bbpath = d.getVar("BBPATH", True).split(":")
+ bbpath = d.getVar("BBPATH").split(":")
sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath]
def inject(name, value):
@@ -28,16 +32,18 @@ def oe_import(d):
import oe.data
for toimport in oe.data.typed_value("OE_IMPORTS", d):
- imported = __import__(toimport)
- inject(toimport.split(".", 1)[0], imported)
-
+ try:
+ imported = __import__(toimport)
+ inject(toimport.split(".", 1)[0], imported)
+ except AttributeError as e:
+ bb.error("Error importing OE modules: %s" % str(e))
return ""
# We need the oe module name space early (before INHERITs get added)
OE_IMPORTED := "${@oe_import(d)}"
def lsb_distro_identifier(d):
- adjust = d.getVar('LSB_DISTRO_ADJUST', True)
+ adjust = d.getVar('LSB_DISTRO_ADJUST')
adjust_func = None
if adjust:
try:
@@ -61,33 +67,26 @@ oe_runmake() {
def base_dep_prepend(d):
- #
- # Ideally this will check a flag so we will operate properly in
- # the case where host == build == target, for now we don't work in
- # that case though.
- #
+ if d.getVar('INHIBIT_DEFAULT_DEPS', False):
+ return ""
+ return "${BASE_DEFAULT_DEPS}"
- deps = ""
- # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
- # we need that built is the responsibility of the patch function / class, not
- # the application.
- if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
- if (d.getVar('HOST_SYS', True) != d.getVar('BUILD_SYS', True)):
- deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
- return deps
+BASE_DEFAULT_DEPS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
-BASEDEPENDS = "${@base_dep_prepend(d)}"
+BASEDEPENDS = ""
+BASEDEPENDS_class-target = "${@base_dep_prepend(d)}"
+BASEDEPENDS_class-nativesdk = "${@base_dep_prepend(d)}"
DEPENDS_prepend="${BASEDEPENDS} "
FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
# THISDIR only works properly with imediate expansion as it has to run
# in the context of the location its used (:=)
-THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
+THISDIR = "${@os.path.dirname(d.getVar('FILE'))}"
def extra_path_elements(d):
path = ""
- elements = (d.getVar('EXTRANATIVEPATH', True) or "").split()
+ elements = (d.getVar('EXTRANATIVEPATH') or "").split()
for e in elements:
path = path + "${STAGING_BINDIR_NATIVE}/" + e + ":"
return path
@@ -96,26 +95,53 @@ PATH_prepend = "${@extra_path_elements(d)}"
def get_lic_checksum_file_list(d):
filelist = []
- lic_files = d.getVar("LIC_FILES_CHKSUM", True) or ''
- tmpdir = d.getVar("TMPDIR", True)
+ lic_files = d.getVar("LIC_FILES_CHKSUM") or ''
+ tmpdir = d.getVar("TMPDIR")
+ s = d.getVar("S")
+ b = d.getVar("B")
+ workdir = d.getVar("WORKDIR")
urls = lic_files.split()
for url in urls:
# We only care about items that are absolute paths since
# any others should be covered by SRC_URI.
try:
- path = bb.fetch.decodeurl(url)[2]
- if not path:
+ (method, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
+ if method != "file" or not path:
raise bb.fetch.MalformedUrl(url)
if path[0] == '/':
- if path.startswith(tmpdir):
+ if path.startswith((tmpdir, s, b, workdir)):
continue
filelist.append(path + ":" + str(os.path.exists(path)))
except bb.fetch.MalformedUrl:
- raise bb.build.FuncFailed(d.getVar('PN', True) + ": LIC_FILES_CHKSUM contains an invalid URL: " + url)
+ bb.fatal(d.getVar('PN') + ": LIC_FILES_CHKSUM contains an invalid URL: " + url)
return " ".join(filelist)
+def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
+ tools = d.getVar(toolsvar).split()
+ origbbenv = d.getVar("BB_ORIGENV", False)
+ path = origbbenv.getVar("PATH")
+ bb.utils.mkdirhier(dest)
+ notfound = []
+ for tool in tools:
+ desttool = os.path.join(dest, tool)
+ if not os.path.exists(desttool):
+ srctool = bb.utils.which(path, tool, executable=True)
+ # gcc/g++ may link to ccache on some hosts, e.g.,
+ # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc)
+ # would return /usr/local/bin/ccache/gcc, but what we need is
+ # /usr/bin/gcc, this code can check and fix that.
+ if "ccache" in srctool:
+ srctool = bb.utils.which(path, tool, executable=True, direction=1)
+ if srctool:
+ os.symlink(srctool, desttool)
+ else:
+ notfound.append(tool)
+
+ if notfound and fatal:
+ bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound))
+
addtask fetch
do_fetch[dirs] = "${DL_DIR}"
do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}"
@@ -123,7 +149,7 @@ do_fetch[file-checksums] += " ${@get_lic_checksum_file_list(d)}"
do_fetch[vardeps] += "SRCREV"
python base_do_fetch() {
- src_uri = (d.getVar('SRC_URI', True) or "").split()
+ src_uri = (d.getVar('SRC_URI') or "").split()
if len(src_uri) == 0:
return
@@ -131,39 +157,29 @@ python base_do_fetch() {
fetcher = bb.fetch2.Fetch(src_uri, d)
fetcher.download()
except bb.fetch2.BBFetchException as e:
- raise bb.build.FuncFailed(e)
+ bb.fatal(str(e))
}
addtask unpack after do_fetch
do_unpack[dirs] = "${WORKDIR}"
-python () {
- if d.getVar('S', True) != d.getVar('WORKDIR', True):
- d.setVarFlag('do_unpack', 'cleandirs', '${S}')
- else:
- d.setVarFlag('do_unpack', 'cleandirs', os.path.join('${S}', 'patches'))
-}
+do_unpack[cleandirs] = "${@d.getVar('S') if os.path.normpath(d.getVar('S')) != os.path.normpath(d.getVar('WORKDIR')) else os.path.join('${S}', 'patches')}"
+
python base_do_unpack() {
- src_uri = (d.getVar('SRC_URI', True) or "").split()
+ src_uri = (d.getVar('SRC_URI') or "").split()
if len(src_uri) == 0:
return
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
- fetcher.unpack(d.getVar('WORKDIR', True))
+ fetcher.unpack(d.getVar('WORKDIR'))
except bb.fetch2.BBFetchException as e:
- raise bb.build.FuncFailed(e)
+ bb.fatal(str(e))
}
-def pkgarch_mapping(d):
- # Compatibility mappings of TUNE_PKGARCH (opt in)
- if d.getVar("PKGARCHCOMPAT_ARMV7A", True):
- if d.getVar("TUNE_PKGARCH", True) == "armv7a-vfp-neon":
- d.setVar("TUNE_PKGARCH", "armv7a")
-
def get_layers_branch_rev(d):
- layers = (d.getVar("BBLAYERS", True) or "").split()
- layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
+ layers = (d.getVar("BBLAYERS") or "").split()
+ layers_branch_rev = ["%-20s = \"%s:%s\"" % (os.path.basename(i), \
base_get_metadata_git_branch(i, None).strip(), \
base_get_metadata_git_revision(i, None)) \
for i in layers]
@@ -189,15 +205,15 @@ BUILDCFG_FUNCS[type] = "list"
def buildcfg_vars(d):
statusvars = oe.data.typed_value('BUILDCFG_VARS', d)
for var in statusvars:
- value = d.getVar(var, True)
+ value = d.getVar(var)
if value is not None:
- yield '%-17s = "%s"' % (var, value)
+ yield '%-20s = "%s"' % (var, value)
def buildcfg_neededvars(d):
needed_vars = oe.data.typed_value("BUILDCFG_NEEDEDVARS", d)
pesteruser = []
for v in needed_vars:
- val = d.getVar(v, True)
+ val = d.getVar(v)
if not val or val == 'INVALID':
pesteruser.append(v)
@@ -205,21 +221,36 @@ def buildcfg_neededvars(d):
bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
addhandler base_eventhandler
-base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete bb.event.RecipeParsed"
+base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.event.RecipeParsed"
python base_eventhandler() {
import bb.runqueue
if isinstance(e, bb.event.ConfigParsed):
- if not e.data.getVar("NATIVELSBSTRING", False):
- e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
- e.data.setVar('BB_VERSION', bb.__version__)
- pkgarch_mapping(e.data)
- oe.utils.features_backfill("DISTRO_FEATURES", e.data)
- oe.utils.features_backfill("MACHINE_FEATURES", e.data)
+ if not d.getVar("NATIVELSBSTRING", False):
+ d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
+ d.setVar('BB_VERSION', bb.__version__)
+
+ # There might be no bb.event.ConfigParsed event if bitbake server is
+ # running, so check bb.event.BuildStarted too to make sure ${HOSTTOOLS_DIR}
+ # exists.
+ if isinstance(e, bb.event.ConfigParsed) or \
+ (isinstance(e, bb.event.BuildStarted) and not os.path.exists(d.getVar('HOSTTOOLS_DIR'))):
+ # Works with the line in layer.conf which changes PATH to point here
+ setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d)
+ setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS_NONFATAL', d, fatal=False)
+
+ if isinstance(e, bb.event.MultiConfigParsed):
+ # We need to expand SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS in each of the multiconfig data stores
+ # own contexts so the variables get expanded correctly for that arch, then inject back into
+ # the main data store.
+ deps = []
+ for config in e.mcdata:
+ deps.append(e.mcdata[config].getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS"))
+ deps = " ".join(deps)
+ e.mcdata[''].setVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", deps)
if isinstance(e, bb.event.BuildStarted):
- localdata = bb.data.createCopy(e.data)
- bb.data.update_data(localdata)
+ localdata = bb.data.createCopy(d)
statuslines = []
for func in oe.data.typed_value('BUILDCFG_FUNCS', localdata):
g = globals()
@@ -230,7 +261,7 @@ python base_eventhandler() {
if flines:
statuslines.extend(flines)
- statusheader = e.data.getVar('BUILDCFG_HEADER', True)
+ statusheader = d.getVar('BUILDCFG_HEADER')
if statusheader:
bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
@@ -238,24 +269,11 @@ python base_eventhandler() {
# target ones and we'd see dulpicate key names overwriting each other
# for various PREFERRED_PROVIDERS
if isinstance(e, bb.event.RecipePreFinalise):
- if e.data.getVar("TARGET_PREFIX", True) == e.data.getVar("SDK_PREFIX", True):
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
-
- if isinstance(e, bb.runqueue.sceneQueueComplete):
- completions = e.data.expand("${STAGING_DIR}/sstatecompletions")
- if os.path.exists(completions):
- cmds = set()
- with open(completions, "r") as f:
- cmds = set(f)
- e.data.setVar("completion_function", "\n".join(cmds))
- e.data.setVarFlag("completion_function", "func", "1")
- bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
- bb.build.exec_func("completion_function", e.data)
- os.remove(completions)
+ if d.getVar("TARGET_PREFIX") == d.getVar("SDK_PREFIX"):
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
if isinstance(e, bb.event.RecipeParsed):
#
@@ -264,16 +282,16 @@ python base_eventhandler() {
# sysroot since they're now "unreachable". This makes switching virtual/kernel work in
# particular.
#
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
if not source_mirror_fetch:
- provs = (d.getVar("PROVIDES", True) or "").split()
- multiwhitelist = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
+ provs = (d.getVar("PROVIDES") or "").split()
+ multiwhitelist = (d.getVar("MULTI_PROVIDER_WHITELIST") or "").split()
for p in provs:
if p.startswith("virtual/") and p not in multiwhitelist:
- profprov = d.getVar("PREFERRED_PROVIDER_" + p, True)
+ profprov = d.getVar("PREFERRED_PROVIDER_" + p)
if profprov and pn != profprov:
- raise bb.parse.SkipPackage("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
+ raise bb.parse.SkipRecipe("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
}
CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
@@ -281,7 +299,6 @@ CLEANBROKEN = "0"
addtask configure after do_patch
do_configure[dirs] = "${B}"
-do_configure[deptask] = "do_populate_sysroot"
base_do_configure() {
if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then
@@ -289,7 +306,9 @@ base_do_configure() {
if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
oe_runmake clean
fi
- find ${B} -ignore_readdir_race -name \*.la -delete
+ # -ignore_readdir_race does not work correctly with -delete;
+ # use xargs to avoid spurious build failures
+ find ${B} -ignore_readdir_race -name \*.la -type f -print0 | xargs -0 rm -f
fi
fi
if [ -n "${CONFIGURESTAMPFILE}" ]; then
@@ -333,9 +352,9 @@ def set_packagetriplet(d):
tos = []
tvs = []
- archs.append(d.getVar("PACKAGE_ARCHS", True).split())
- tos.append(d.getVar("TARGET_OS", True))
- tvs.append(d.getVar("TARGET_VENDOR", True))
+ archs.append(d.getVar("PACKAGE_ARCHS").split())
+ tos.append(d.getVar("TARGET_OS"))
+ tvs.append(d.getVar("TARGET_VENDOR"))
def settriplet(d, varname, archs, tos, tvs):
triplets = []
@@ -347,34 +366,37 @@ def set_packagetriplet(d):
settriplet(d, "PKGTRIPLETS", archs, tos, tvs)
- variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ variants = d.getVar("MULTILIB_VARIANTS") or ""
for item in variants.split():
localdata = bb.data.createCopy(d)
overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
localdata.setVar("OVERRIDES", overrides)
- bb.data.update_data(localdata)
- archs.append(localdata.getVar("PACKAGE_ARCHS", True).split())
- tos.append(localdata.getVar("TARGET_OS", True))
- tvs.append(localdata.getVar("TARGET_VENDOR", True))
+ archs.append(localdata.getVar("PACKAGE_ARCHS").split())
+ tos.append(localdata.getVar("TARGET_OS"))
+ tvs.append(localdata.getVar("TARGET_VENDOR"))
settriplet(d, "PKGMLTRIPLETS", archs, tos, tvs)
python () {
import string, re
+ # Handle backfilling
+ oe.utils.features_backfill("DISTRO_FEATURES", d)
+ oe.utils.features_backfill("MACHINE_FEATURES", d)
+
# Handle PACKAGECONFIG
#
# These take the form:
#
# PACKAGECONFIG ??= "<default options>"
- # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends"
+ # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends,foo_runtime_recommends"
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
if pkgconfigflags:
- pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
- pn = d.getVar("PN", True)
+ pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
+ pn = d.getVar("PN")
- mlprefix = d.getVar("MLPREFIX", True)
+ mlprefix = d.getVar("MLPREFIX")
def expandFilter(appends, extension, prefix):
appends = bb.utils.explode_deps(d.expand(" ".join(appends)))
@@ -410,44 +432,52 @@ python () {
extradeps = []
extrardeps = []
+ extrarrecs = []
extraconf = []
for flag, flagval in sorted(pkgconfigflags.items()):
items = flagval.split(",")
num = len(items)
- if num > 4:
- bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend can be specified!"
- % (d.getVar('PN', True), flag))
+ if num > 5:
+ bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend,rrecommend can be specified!"
+ % (d.getVar('PN'), flag))
if flag in pkgconfig:
if num >= 3 and items[2]:
extradeps.append(items[2])
if num >= 4 and items[3]:
extrardeps.append(items[3])
+ if num >= 5 and items[4]:
+ extrarrecs.append(items[4])
if num >= 1 and items[0]:
extraconf.append(items[0])
elif num >= 2 and items[1]:
extraconf.append(items[1])
appendVar('DEPENDS', extradeps)
appendVar('RDEPENDS_${PN}', extrardeps)
+ appendVar('RRECOMMENDS_${PN}', extrarrecs)
appendVar('PACKAGECONFIG_CONFARGS', extraconf)
- pn = d.getVar('PN', True)
- license = d.getVar('LICENSE', True)
- if license == "INVALID":
+ pn = d.getVar('PN')
+ license = d.getVar('LICENSE')
+ if license == "INVALID" and pn != "defaultpkgname":
bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
if bb.data.inherits_class('license', d):
check_license_format(d)
- unmatched_license_flag = check_license_flags(d)
- if unmatched_license_flag:
- bb.debug(1, "Skipping %s because it has a restricted license not"
- " whitelisted in LICENSE_FLAGS_WHITELIST" % pn)
- raise bb.parse.SkipPackage("because it has a restricted license not"
- " whitelisted in LICENSE_FLAGS_WHITELIST")
+ unmatched_license_flags = check_license_flags(d)
+ if unmatched_license_flags:
+ if len(unmatched_license_flags) == 1:
+ message = "because it has a restricted license '{0}'. Which is not whitelisted in LICENSE_FLAGS_WHITELIST".format(unmatched_license_flags[0])
+ else:
+ message = "because it has restricted licenses {0}. Which are not whitelisted in LICENSE_FLAGS_WHITELIST".format(
+ ", ".join("'{0}'".format(f) for f in unmatched_license_flags))
+ bb.debug(1, "Skipping %s %s" % (pn, message))
+ raise bb.parse.SkipRecipe(message)
# If we're building a target package we need to use fakeroot (pseudo)
# in order to capture permissions, owners, groups and special files
if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
+ d.appendVarFlag('do_prepare_recipe_sysroot', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
d.setVarFlag('do_unpack', 'umask', '022')
d.setVarFlag('do_configure', 'umask', '022')
d.setVarFlag('do_compile', 'umask', '022')
@@ -462,26 +492,26 @@ python () {
d.setVarFlag('do_devshell', 'fakeroot', '1')
d.appendVarFlag('do_devshell', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
- need_machine = d.getVar('COMPATIBLE_MACHINE', True)
+ need_machine = d.getVar('COMPATIBLE_MACHINE')
if need_machine:
import re
- compat_machines = (d.getVar('MACHINEOVERRIDES', True) or "").split(":")
+ compat_machines = (d.getVar('MACHINEOVERRIDES') or "").split(":")
for m in compat_machines:
if re.match(need_machine, m):
break
else:
- raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE', True))
+ raise bb.parse.SkipRecipe("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE'))
source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
if not source_mirror_fetch:
- need_host = d.getVar('COMPATIBLE_HOST', True)
+ need_host = d.getVar('COMPATIBLE_HOST')
if need_host:
import re
- this_host = d.getVar('HOST_SYS', True)
+ this_host = d.getVar('HOST_SYS')
if not re.match(need_host, this_host):
- raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
+ raise bb.parse.SkipRecipe("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
- bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split()
+ bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE') or "").split()
check_license = False if pn.startswith("nativesdk-") else True
for t in ["-native", "-cross-${TARGET_ARCH}", "-cross-initial-${TARGET_ARCH}",
@@ -496,54 +526,54 @@ python () {
bad_licenses = expand_wildcard_licenses(d, bad_licenses)
whitelist = []
- incompatwl = []
for lic in bad_licenses:
spdx_license = return_spdx(d, lic)
- for w in ["LGPLv2_WHITELIST_", "WHITELIST_"]:
- whitelist.extend((d.getVar(w + lic, True) or "").split())
- if spdx_license:
- whitelist.extend((d.getVar(w + spdx_license, True) or "").split())
- '''
- We need to track what we are whitelisting and why. If pn is
- incompatible we need to be able to note that the image that
- is created may infact contain incompatible licenses despite
- INCOMPATIBLE_LICENSE being set.
- '''
- incompatwl.extend((d.getVar(w + lic, True) or "").split())
- if spdx_license:
- incompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
-
- if not pn in whitelist:
- pkgs = d.getVar('PACKAGES', True).split()
- skipped_pkgs = []
+ whitelist.extend((d.getVar("WHITELIST_" + lic) or "").split())
+ if spdx_license:
+ whitelist.extend((d.getVar("WHITELIST_" + spdx_license) or "").split())
+
+ if pn in whitelist:
+ '''
+ We need to track what we are whitelisting and why. If pn is
+ incompatible we need to be able to note that the image that
+ is created may infact contain incompatible licenses despite
+ INCOMPATIBLE_LICENSE being set.
+ '''
+ bb.note("Including %s as buildable despite it having an incompatible license because it has been whitelisted" % pn)
+ else:
+ pkgs = d.getVar('PACKAGES').split()
+ skipped_pkgs = {}
unskipped_pkgs = []
for pkg in pkgs:
- if incompatible_license(d, bad_licenses, pkg):
- skipped_pkgs.append(pkg)
+ incompatible_lic = incompatible_license(d, bad_licenses, pkg)
+ if incompatible_lic:
+ skipped_pkgs[pkg] = incompatible_lic
else:
unskipped_pkgs.append(pkg)
- all_skipped = skipped_pkgs and not unskipped_pkgs
if unskipped_pkgs:
for pkg in skipped_pkgs:
- bb.debug(1, "SKIPPING the package " + pkg + " at do_rootfs because it's " + license)
- mlprefix = d.getVar('MLPREFIX', True)
- d.setVar('LICENSE_EXCLUSION-' + mlprefix + pkg, 1)
+ bb.debug(1, "Skipping the package %s at do_rootfs because of incompatible license(s): %s" % (pkg, ' '.join(skipped_pkgs[pkg])))
+ mlprefix = d.getVar('MLPREFIX')
+ d.setVar('LICENSE_EXCLUSION-' + mlprefix + pkg, ' '.join(skipped_pkgs[pkg]))
for pkg in unskipped_pkgs:
- bb.debug(1, "INCLUDING the package " + pkg)
- elif all_skipped or incompatible_license(d, bad_licenses):
- bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, license))
- raise bb.parse.SkipPackage("incompatible with license %s" % license)
- elif pn in whitelist:
- if pn in incompatwl:
- bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted")
+ bb.debug(1, "Including the package %s" % pkg)
+ else:
+ incompatible_lic = incompatible_license(d, bad_licenses)
+ for pkg in skipped_pkgs:
+ incompatible_lic += skipped_pkgs[pkg]
+ incompatible_lic = sorted(list(set(incompatible_lic)))
+
+ if incompatible_lic:
+ bb.debug(1, "Skipping recipe %s because of incompatible license(s): %s" % (pn, ' '.join(incompatible_lic)))
+ raise bb.parse.SkipRecipe("it has incompatible license(s): %s" % ' '.join(incompatible_lic))
# Try to verify per-package (LICENSE_<pkg>) values. LICENSE should be a
# superset of all per-package licenses. We do not do advanced (pattern)
# matching of license expressions - just check that all license strings
# in LICENSE_<pkg> are found in LICENSE.
license_set = oe.license.list_licenses(license)
- for pkg in d.getVar('PACKAGES', True).split():
- pkg_license = d.getVar('LICENSE_' + pkg, True)
+ for pkg in d.getVar('PACKAGES').split():
+ pkg_license = d.getVar('LICENSE_' + pkg)
if pkg_license:
unlisted = oe.license.list_licenses(pkg_license) - license_set
if unlisted:
@@ -551,7 +581,7 @@ python () {
"listed in LICENSE" % (pkg, ' '.join(unlisted)))
needsrcrev = False
- srcuri = d.getVar('SRC_URI', True)
+ srcuri = d.getVar('SRC_URI')
for uri in srcuri.split():
(scheme, _ , path) = bb.fetch.decodeurl(uri)[:3]
@@ -572,6 +602,7 @@ python () {
# Mercurial packages should DEPEND on mercurial-native
elif scheme == "hg":
needsrcrev = True
+ d.appendVar("EXTRANATIVEPATH", ' python3-native ')
d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot')
# Perforce packages support SRCREV = "${AUTOREV}"
@@ -594,25 +625,41 @@ python () {
d.appendVarFlag('do_unpack', 'depends', ' lzip-native:do_populate_sysroot')
# *.xz should DEPEND on xz-native for unpacking
- elif path.endswith('.xz'):
+ elif path.endswith('.xz') or path.endswith('.txz'):
d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
# .zip should DEPEND on unzip-native for unpacking
- elif path.endswith('.zip'):
+ elif path.endswith('.zip') or path.endswith('.jar'):
d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
- # file is needed by rpm2cpio.sh
- elif path.endswith('.src.rpm'):
- d.appendVarFlag('do_unpack', 'depends', ' file-native:do_populate_sysroot')
+ # Some rpm files may be compressed internally using xz (for example, rpms from Fedora)
+ elif path.endswith('.rpm'):
+ d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
+
+ # *.deb should DEPEND on xz-native for unpacking
+ elif path.endswith('.deb'):
+ d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
if needsrcrev:
d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}")
+ # Gather all named SRCREVs to add to the sstate hash calculation
+ # This anonymous python snippet is called multiple times so we
+ # need to be careful to not double up the appends here and cause
+ # the base hash to mismatch the task hash
+ for uri in srcuri.split():
+ parm = bb.fetch.decodeurl(uri)[5]
+ uri_names = parm.get("name", "").split(",")
+ for uri_name in filter(None, uri_names):
+ srcrev_name = "SRCREV_{}".format(uri_name)
+ if srcrev_name not in (d.getVarFlag("do_fetch", "vardeps") or "").split():
+ d.appendVarFlag("do_fetch", "vardeps", " {}".format(srcrev_name))
+
set_packagetriplet(d)
# 'multimachine' handling
- mach_arch = d.getVar('MACHINE_ARCH', True)
- pkg_arch = d.getVar('PACKAGE_ARCH', True)
+ mach_arch = d.getVar('MACHINE_ARCH')
+ pkg_arch = d.getVar('PACKAGE_ARCH')
if (pkg_arch == mach_arch):
# Already machine specific - nothing further to do
@@ -622,11 +669,11 @@ python () {
# We always try to scan SRC_URI for urls with machine overrides
# unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0
#
- override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', True)
+ override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH')
if override != '0':
paths = []
- fpaths = (d.getVar('FILESPATH', True) or '').split(':')
- machine = d.getVar('MACHINE', True)
+ fpaths = (d.getVar('FILESPATH') or '').split(':')
+ machine = d.getVar('MACHINE')
for p in fpaths:
if os.path.basename(p) == machine and os.path.isdir(p):
paths.append(p)
@@ -643,16 +690,16 @@ python () {
d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}")
return
- packages = d.getVar('PACKAGES', True).split()
+ packages = d.getVar('PACKAGES').split()
for pkg in packages:
- pkgarch = d.getVar("PACKAGE_ARCH_%s" % pkg, True)
+ pkgarch = d.getVar("PACKAGE_ARCH_%s" % pkg)
# We could look for != PACKAGE_ARCH here but how to choose
# if multiple differences are present?
# Look through PACKAGE_ARCHS for the priority order?
if pkgarch and pkgarch == mach_arch:
d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}")
- bb.warn("Recipe %s is marked as only being architecture specific but seems to have machine specific packages?! The recipe may as well mark itself as machine specific directly." % d.getVar("PN", True))
+ bb.warn("Recipe %s is marked as only being architecture specific but seems to have machine specific packages?! The recipe may as well mark itself as machine specific directly." % d.getVar("PN"))
}
addtask cleansstate after do_clean
@@ -663,7 +710,7 @@ addtask cleanall after do_cleansstate
do_cleansstate[nostamp] = "1"
python do_cleanall() {
- src_uri = (d.getVar('SRC_URI', True) or "").split()
+ src_uri = (d.getVar('SRC_URI') or "").split()
if len(src_uri) == 0:
return
@@ -671,7 +718,7 @@ python do_cleanall() {
fetcher = bb.fetch2.Fetch(src_uri, d)
fetcher.clean()
except bb.fetch2.BBFetchException as e:
- raise bb.build.FuncFailed(e)
+ bb.fatal(str(e))
}
do_cleanall[nostamp] = "1"
diff --git a/meta/classes/bin_package.bbclass b/meta/classes/bin_package.bbclass
index a52b75be5c..cbc9b1fa13 100644
--- a/meta/classes/bin_package.bbclass
+++ b/meta/classes/bin_package.bbclass
@@ -26,7 +26,10 @@ do_compile[noexec] = "1"
bin_package_do_install () {
# Do it carefully
[ -d "${S}" ] || exit 1
- cd ${S} || exit 1
+ if [ -z "$(ls -A ${S})" ]; then
+ bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S.
+ fi
+ cd ${S}
tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
| tar --no-same-owner -xpf - -C ${D}
}
diff --git a/meta/classes/binconfig-disabled.bbclass b/meta/classes/binconfig-disabled.bbclass
index 602a669aa1..096b670e12 100644
--- a/meta/classes/binconfig-disabled.bbclass
+++ b/meta/classes/binconfig-disabled.bbclass
@@ -15,6 +15,7 @@ do_install_append () {
echo "echo 'ERROR: $x should not be used, use an alternative such as pkg-config' >&2" >> ${D}$x
echo "echo '--should-not-have-used-$x'" >> ${D}$x
echo "exit 1" >> ${D}$x
+ chmod +x ${D}$x
done
}
diff --git a/meta/classes/binconfig.bbclass b/meta/classes/binconfig.bbclass
index cbc4173601..9112ed4608 100644
--- a/meta/classes/binconfig.bbclass
+++ b/meta/classes/binconfig.bbclass
@@ -13,16 +13,16 @@ def get_binconfig_mangle(d):
s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
+ s += " -e 's:-L${WORKDIR}:-LOELIBDIR:'"
+ s += " -e 's:-I${WORKDIR}:-IOEINCDIR:'"
s += " -e 's:OEBASELIBDIR:${STAGING_BASELIBDIR}:;'"
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${prefix}:'"
s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${exec_prefix}:'"
- s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
- s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"
- if bb.data.getVar("OE_BINCONFIG_EXTRA_MANGLE", d):
- s += bb.data.getVar("OE_BINCONFIG_EXTRA_MANGLE", d)
+ if d.getVar("OE_BINCONFIG_EXTRA_MANGLE", False):
+ s += d.getVar("OE_BINCONFIG_EXTRA_MANGLE")
return s
@@ -31,7 +31,7 @@ BINCONFIG_GLOB ?= "*-config"
PACKAGE_PREPROCESS_FUNCS += "binconfig_package_preprocess"
binconfig_package_preprocess () {
- for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do
+ for config in `find ${PKGD} -type f -name '${BINCONFIG_GLOB}'`; do
sed -i \
-e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \
@@ -40,21 +40,12 @@ binconfig_package_preprocess () {
-e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \
$config
done
- for lafile in `find ${PKGD} -name "*.la"` ; do
- sed -i \
- -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \
- -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
- -e 's:${STAGING_INCDIR}:${includedir}:g;' \
- -e 's:${STAGING_DATADIR}:${datadir}:' \
- -e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \
- $lafile
- done
}
SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess"
binconfig_sysroot_preprocess () {
- for config in `find ${S} -name '${BINCONFIG_GLOB}'` `find ${B} -name '${BINCONFIG_GLOB}'`; do
+ for config in `find ${S} -type f -name '${BINCONFIG_GLOB}'` `find ${B} -type f -name '${BINCONFIG_GLOB}'`; do
configname=`basename $config`
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
sed ${@get_binconfig_mangle(d)} $config > ${SYSROOT_DESTDIR}${bindir_crossscripts}/$configname
diff --git a/meta/classes/blacklist.bbclass b/meta/classes/blacklist.bbclass
index a0141a82c0..dc794228ff 100644
--- a/meta/classes/blacklist.bbclass
+++ b/meta/classes/blacklist.bbclass
@@ -12,34 +12,9 @@
# PNBLACKLIST[pn] = "message"
#
-# Cope with PNBLACKLIST flags for multilib case
-addhandler blacklist_multilib_eventhandler
-blacklist_multilib_eventhandler[eventmask] = "bb.event.ConfigParsed"
-python blacklist_multilib_eventhandler() {
- multilibs = e.data.getVar('MULTILIBS', True)
- if not multilibs:
- return
-
- # this block has been copied from base.bbclass so keep it in sync
- prefixes = []
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib':
- prefixes.append(eext[1])
-
- blacklists = e.data.getVarFlags('PNBLACKLIST') or {}
- for pkg, reason in blacklists.items():
- if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in pkg:
- continue
- for p in prefixes:
- newpkg = p + "-" + pkg
- if not e.data.getVarFlag('PNBLACKLIST', newpkg, True):
- e.data.setVarFlag('PNBLACKLIST', newpkg, reason)
-}
-
python () {
- blacklist = d.getVarFlag('PNBLACKLIST', d.getVar('PN', True), True)
+ blacklist = d.getVarFlag('PNBLACKLIST', d.getVar('PN'))
if blacklist:
- raise bb.parse.SkipPackage("Recipe is blacklisted: %s" % (blacklist))
+ raise bb.parse.SkipRecipe("Recipe is blacklisted: %s" % (blacklist))
}
diff --git a/meta/classes/bluetooth.bbclass b/meta/classes/bluetooth.bbclass
deleted file mode 100644
index f88b4ae5b8..0000000000
--- a/meta/classes/bluetooth.bbclass
+++ /dev/null
@@ -1,14 +0,0 @@
-# Avoid code duplication in bluetooth-dependent recipes.
-
-# Define a variable that expands to the recipe (package) providing core
-# bluetooth support on the platform:
-# "" if bluetooth is not in DISTRO_FEATURES
-# else "bluez5" if bluez5 is in DISTRO_FEATURES
-# else "bluez4"
-
-# Use this with:
-# inherit bluetooth
-# PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}
-# PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4"
-
-BLUEZ ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5', 'bluez4', d), '', d)}"
diff --git a/meta/classes/bugzilla.bbclass b/meta/classes/bugzilla.bbclass
deleted file mode 100644
index 3fc8956428..0000000000
--- a/meta/classes/bugzilla.bbclass
+++ /dev/null
@@ -1,187 +0,0 @@
-#
-# Small event handler to automatically open URLs and file
-# bug reports at a bugzilla of your choiche
-# it uses XML-RPC interface, so you must have it enabled
-#
-# Before using you must define BUGZILLA_USER, BUGZILLA_PASS credentials,
-# BUGZILLA_XMLRPC - uri of xmlrpc.cgi,
-# BUGZILLA_PRODUCT, BUGZILLA_COMPONENT - a place in BTS for build bugs
-# BUGZILLA_VERSION - version against which to report new bugs
-#
-
-def bugzilla_find_bug_report(debug_file, server, args, bugname):
- args['summary'] = bugname
- bugs = server.Bug.search(args)
- if len(bugs['bugs']) == 0:
- print >> debug_file, "Bugs not found"
- return (False,None)
- else: # silently pick the first result
- print >> debug_file, "Result of bug search is "
- print >> debug_file, bugs
- status = bugs['bugs'][0]['status']
- id = bugs['bugs'][0]['id']
- return (not status in ["CLOSED", "RESOLVED", "VERIFIED"],id)
-
-def bugzilla_file_bug(debug_file, server, args, name, text, version):
- args['summary'] = name
- args['comment'] = text
- args['version'] = version
- args['op_sys'] = 'Linux'
- args['platform'] = 'Other'
- args['severity'] = 'normal'
- args['priority'] = 'Normal'
- try:
- return server.Bug.create(args)['id']
- except Exception, e:
- print >> debug_file, repr(e)
- return None
-
-def bugzilla_reopen_bug(debug_file, server, args, bug_number):
- args['ids'] = [bug_number]
- args['status'] = "CONFIRMED"
- try:
- server.Bug.update(args)
- return True
- except Exception, e:
- print >> debug_file, repr(e)
- return False
-
-def bugzilla_create_attachment(debug_file, server, args, bug_number, text, file_name, log, logdescription):
- args['ids'] = [bug_number]
- args['file_name'] = file_name
- args['summary'] = logdescription
- args['content_type'] = "text/plain"
- args['data'] = log
- args['comment'] = text
- try:
- server.Bug.add_attachment(args)
- return True
- except Exception, e:
- print >> debug_file, repr(e)
- return False
-
-def bugzilla_add_comment(debug_file, server, args, bug_number, text):
- args['id'] = bug_number
- args['comment'] = text
- try:
- server.Bug.add_comment(args)
- return True
- except Exception, e:
- print >> debug_file, repr(e)
- return False
-
-addhandler bugzilla_eventhandler
-bugzilla_eventhandler[eventmask] = "bb.event.MsgNote bb.build.TaskFailed"
-python bugzilla_eventhandler() {
- import glob
- import xmlrpclib, httplib
-
- class ProxiedTransport(xmlrpclib.Transport):
- def __init__(self, proxy, use_datetime = 0):
- xmlrpclib.Transport.__init__(self, use_datetime)
- self.proxy = proxy
- self.user = None
- self.password = None
-
- def set_user(self, user):
- self.user = user
-
- def set_password(self, password):
- self.password = password
-
- def make_connection(self, host):
- self.realhost = host
- return httplib.HTTP(self.proxy)
-
- def send_request(self, connection, handler, request_body):
- connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler))
- if self.user != None:
- if self.password != None:
- auth = "%s:%s" % (self.user, self.password)
- else:
- auth = self.user
- connection.putheader("Proxy-authorization", "Basic " + base64.encodestring(auth))
-
- event = e
- data = e.data
- name = bb.event.getName(event)
- if name == "MsgNote":
- # avoid recursion
- return
-
- if name == "TaskFailed":
- xmlrpc = data.getVar("BUGZILLA_XMLRPC", True)
- user = data.getVar("BUGZILLA_USER", True)
- passw = data.getVar("BUGZILLA_PASS", True)
- product = data.getVar("BUGZILLA_PRODUCT", True)
- compon = data.getVar("BUGZILLA_COMPONENT", True)
- version = data.getVar("BUGZILLA_VERSION", True)
-
- proxy = data.getVar('http_proxy', True )
- if (proxy):
- import urllib2
- s, u, p, hostport = urllib2._parse_proxy(proxy)
- transport = ProxiedTransport(hostport)
- else:
- transport = None
-
- server = xmlrpclib.ServerProxy(xmlrpc, transport=transport, verbose=0)
- args = {
- 'Bugzilla_login': user,
- 'Bugzilla_password': passw,
- 'product': product,
- 'component': compon}
-
- # evil hack to figure out what is going on
- debug_file = open(os.path.join(data.getVar("TMPDIR", True),"..","bugzilla-log"),"a")
-
- file = None
- bugname = "%(package)s-%(pv)s-autobuild" % { "package" : data.getVar("PN", True),
- "pv" : data.getVar("PV", True),
- }
- log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T', True), event.task))
- text = "The %s step in %s failed at %s for machine %s" % (e.task, data.getVar("PN", True), data.getVar('DATETIME', True), data.getVar( 'MACHINE', True ) )
- if len(log_file) != 0:
- print >> debug_file, "Adding log file %s" % log_file[0]
- file = open(log_file[0], 'r')
- log = file.read()
- file.close();
- else:
- print >> debug_file, "No log file found for the glob"
- log = None
-
- (bug_open, bug_number) = bugzilla_find_bug_report(debug_file, server, args.copy(), bugname)
- print >> debug_file, "Bug is open: %s and bug number: %s" % (bug_open, bug_number)
-
- # The bug is present and still open, attach an error log
- if not bug_number:
- bug_number = bugzilla_file_bug(debug_file, server, args.copy(), bugname, text, version)
- if not bug_number:
- print >> debug_file, "Couldn't acquire a new bug_numer, filing a bugreport failed"
- else:
- print >> debug_file, "The new bug_number: '%s'" % bug_number
- elif not bug_open:
- if not bugzilla_reopen_bug(debug_file, server, args.copy(), bug_number):
- print >> debug_file, "Failed to reopen the bug #%s" % bug_number
- else:
- print >> debug_file, "Reopened the bug #%s" % bug_number
-
- if bug_number and log:
- print >> debug_file, "The bug is known as '%s'" % bug_number
- desc = "Build log for machine %s" % (data.getVar('MACHINE', True))
- if not bugzilla_create_attachment(debug_file, server, args.copy(), bug_number, text, log_file[0], log, desc):
- print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number
- else:
- print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, compon, bug_number)
- else:
- print >> debug_file, "Not trying to create an attachment for bug #%s" % bug_number
- if not bugzilla_add_comment(debug_file, server, args.copy(), bug_number, text, ):
- print >> debug_file, "Failed to create a comment the build log for bug #%s" % bug_number
- else:
- print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, compon, bug_number)
-
- # store bug number for oestats-client
- if bug_number:
- data.setVar('OESTATS_BUG_NUMBER', bug_number)
-}
-
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 6e5de0ef69..affdf272d7 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -37,7 +37,7 @@ BUILDHISTORY_OLD_DIR_PACKAGE = "${BUILDHISTORY_OLD_DIR}/packages/${MULTIMACH_TAR
BUILDHISTORY_DIR_SDK = "${BUILDHISTORY_DIR}/sdk/${SDK_NAME}${SDK_EXT}/${IMAGE_BASENAME}"
BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
BUILDHISTORY_SDK_FILES ?= "conf/local.conf conf/bblayers.conf conf/auto.conf conf/locked-sigs.inc conf/devtool.conf"
-BUILDHISTORY_COMMIT ?= "0"
+BUILDHISTORY_COMMIT ?= "1"
BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
BUILDHISTORY_PUSH_REPO ?= ""
@@ -47,6 +47,11 @@ sstate_install[vardepsexclude] += "buildhistory_emit_pkghistory"
# then the value added to SSTATEPOSTINSTFUNCS:
SSTATEPOSTINSTFUNCS[vardepvalueexclude] .= "| buildhistory_emit_pkghistory"
+# Similarly for our function that gets the output signatures
+SSTATEPOSTUNPACKFUNCS_append = " buildhistory_emit_outputsigs"
+sstate_installpkgdir[vardepsexclude] += "buildhistory_emit_outputsigs"
+SSTATEPOSTUNPACKFUNCS[vardepvalueexclude] .= "| buildhistory_emit_outputsigs"
+
# All items excepts those listed here will be removed from a recipe's
# build history directory by buildhistory_emit_pkghistory(). This is
# necessary because some of these items (package directories, files that
@@ -55,24 +60,47 @@ SSTATEPOSTINSTFUNCS[vardepvalueexclude] .= "| buildhistory_emit_pkghistory"
# When extending build history, derive your class from buildhistory.bbclass
# and extend this list here with the additional files created by the derived
# class.
-BUILDHISTORY_PRESERVE = "latest latest_srcrev"
+BUILDHISTORY_PRESERVE = "latest latest_srcrev sysroot"
+
+PATCH_GIT_USER_EMAIL ?= "buildhistory@oe"
+PATCH_GIT_USER_NAME ?= "OpenEmbedded"
+
+#
+# Write out the contents of the sysroot
+#
+buildhistory_emit_sysroot() {
+ mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}
+ case ${CLASSOVERRIDE} in
+ class-native|class-cross|class-crosssdk)
+ BASE=${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}
+ ;;
+ *)
+ BASE=${SYSROOT_DESTDIR}
+ ;;
+ esac
+ buildhistory_list_files_no_owners $BASE ${BUILDHISTORY_DIR_PACKAGE}/sysroot
+}
#
# Write out metadata about this package for comparison when writing future packages
#
python buildhistory_emit_pkghistory() {
- if not d.getVar('BB_CURRENTTASK', True) in ['packagedata', 'packagedata_setscene']:
+ if d.getVar('BB_CURRENTTASK') in ['populate_sysroot', 'populate_sysroot_setscene']:
+ bb.build.exec_func("buildhistory_emit_sysroot", d)
+
+ if not d.getVar('BB_CURRENTTASK') in ['packagedata', 'packagedata_setscene']:
return 0
- if not "package" in (d.getVar('BUILDHISTORY_FEATURES', True) or "").split():
+ if not "package" in (d.getVar('BUILDHISTORY_FEATURES') or "").split():
return 0
import re
import json
+ import shlex
import errno
- pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE', True)
- oldpkghistdir = d.getVar('BUILDHISTORY_OLD_DIR_PACKAGE', True)
+ pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE')
+ oldpkghistdir = d.getVar('BUILDHISTORY_OLD_DIR_PACKAGE')
class RecipeInfo:
def __init__(self, name):
@@ -83,6 +111,7 @@ python buildhistory_emit_pkghistory() {
self.depends = ""
self.packages = ""
self.srcrev = ""
+ self.layer = ""
class PackageInfo:
@@ -179,12 +208,13 @@ python buildhistory_emit_pkghistory() {
items.sort()
return ' '.join(items)
- pn = d.getVar('PN', True)
- pe = d.getVar('PE', True) or "0"
- pv = d.getVar('PV', True)
- pr = d.getVar('PR', True)
+ pn = d.getVar('PN')
+ pe = d.getVar('PE') or "0"
+ pv = d.getVar('PV')
+ pr = d.getVar('PR')
+ layer = bb.utils.get_file_layer(d.getVar('FILE'), d)
- pkgdata_dir = d.getVar('PKGDATA_DIR', True)
+ pkgdata_dir = d.getVar('PKGDATA_DIR')
packages = ""
try:
with open(os.path.join(pkgdata_dir, pn)) as f:
@@ -200,7 +230,7 @@ python buildhistory_emit_pkghistory() {
raise
packagelist = packages.split()
- preserve = d.getVar('BUILDHISTORY_PRESERVE', True).split()
+ preserve = d.getVar('BUILDHISTORY_PRESERVE').split()
if not os.path.exists(pkghistdir):
bb.utils.mkdirhier(pkghistdir)
else:
@@ -220,11 +250,12 @@ python buildhistory_emit_pkghistory() {
rcpinfo.pe = pe
rcpinfo.pv = pv
rcpinfo.pr = pr
- rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS', True) or ""))
+ rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS') or ""))
rcpinfo.packages = packages
+ rcpinfo.layer = layer
write_recipehistory(rcpinfo, d)
- pkgdest = d.getVar('PKGDEST', True)
+ pkgdest = d.getVar('PKGDEST')
for pkg in packagelist:
pkgdata = {}
with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
@@ -233,7 +264,7 @@ python buildhistory_emit_pkghistory() {
key = item[0]
if key.endswith('_' + pkg):
key = key[:-len(pkg)-1]
- pkgdata[key] = item[1]
+ pkgdata[key] = item[1].encode('latin-1').decode('unicode_escape')
pkge = pkgdata.get('PKGE', '0')
pkgv = pkgdata['PKGV']
@@ -249,7 +280,7 @@ python buildhistory_emit_pkghistory() {
last_pkgr = lastversion.pkgr
r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr))
if r < 0:
- msg = "Package version for package %s went backwards which would break package feeds from (%s:%s-%s to %s:%s-%s)" % (pkg, last_pkge, last_pkgv, last_pkgr, pkge, pkgv, pkgr)
+ msg = "Package version for package %s went backwards which would break package feeds (from %s:%s-%s to %s:%s-%s)" % (pkg, last_pkge, last_pkgv, last_pkgr, pkge, pkgv, pkgr)
package_qa_handle_error("version-going-backwards", msg, d)
pkginfo = PackageInfo(pkg)
@@ -276,7 +307,7 @@ python buildhistory_emit_pkghistory() {
dictval = json.loads(val)
filelist = list(dictval.keys())
filelist.sort()
- pkginfo.filelist = " ".join(filelist)
+ pkginfo.filelist = " ".join([shlex.quote(x) for x in filelist])
pkginfo.size = int(pkgdata['PKGSIZE'])
@@ -286,11 +317,46 @@ python buildhistory_emit_pkghistory() {
bb.build.exec_func("buildhistory_list_pkg_files", d)
}
+python buildhistory_emit_outputsigs() {
+ if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split():
+ return
+
+ import hashlib
+
+ taskoutdir = os.path.join(d.getVar('BUILDHISTORY_DIR'), 'task', 'output')
+ bb.utils.mkdirhier(taskoutdir)
+ currenttask = d.getVar('BB_CURRENTTASK')
+ pn = d.getVar('PN')
+ taskfile = os.path.join(taskoutdir, '%s.%s' % (pn, currenttask))
+
+ cwd = os.getcwd()
+ filesigs = {}
+ for root, _, files in os.walk(cwd):
+ for fname in files:
+ if fname == 'fixmepath':
+ continue
+ fullpath = os.path.join(root, fname)
+ try:
+ if os.path.islink(fullpath):
+ sha256 = hashlib.sha256(os.readlink(fullpath).encode('utf-8')).hexdigest()
+ elif os.path.isfile(fullpath):
+ sha256 = bb.utils.sha256_file(fullpath)
+ else:
+ continue
+ except OSError:
+ bb.warn('buildhistory: unable to read %s to get output signature' % fullpath)
+ continue
+ filesigs[os.path.relpath(fullpath, cwd)] = sha256
+ with open(taskfile, 'w') as f:
+ for fpath, fsig in sorted(filesigs.items(), key=lambda item: item[0]):
+ f.write('%s %s\n' % (fpath, fsig))
+}
+
def write_recipehistory(rcpinfo, d):
bb.debug(2, "Writing recipe history")
- pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE', True)
+ pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE')
infofile = os.path.join(pkghistdir, "latest")
with open(infofile, "w") as f:
@@ -300,12 +366,14 @@ def write_recipehistory(rcpinfo, d):
f.write(u"PR = %s\n" % rcpinfo.pr)
f.write(u"DEPENDS = %s\n" % rcpinfo.depends)
f.write(u"PACKAGES = %s\n" % rcpinfo.packages)
+ f.write(u"LAYER = %s\n" % rcpinfo.layer)
+ write_latest_srcrev(d, pkghistdir)
def write_pkghistory(pkginfo, d):
bb.debug(2, "Writing package history for package %s" % pkginfo.name)
- pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE', True)
+ pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE')
pkgpath = os.path.join(pkghistdir, pkginfo.name)
if not os.path.exists(pkgpath):
@@ -366,7 +434,7 @@ def buildhistory_list_installed(d, rootfs_type="image"):
pkgs = sdk_list_installed_packages(d, rootfs_type == "sdk_target")
for output_type, output_file in process_list:
- output_file_full = os.path.join(d.getVar('WORKDIR', True), output_file)
+ output_file_full = os.path.join(d.getVar('WORKDIR'), output_file)
with open(output_file_full, 'w') as output:
output.write(format_pkg_list(pkgs, output_type))
@@ -399,19 +467,26 @@ buildhistory_get_installed() {
# Produce dependency graph
# First, quote each name to handle characters that cause issues for dot
- sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp && \
+ sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp &&
rm ${WORKDIR}/bh_installed_pkgs_deps.txt
- # Change delimiter from pipe to -> and set style for recommend lines
- sed -i -e 's:|: -> :' -e 's:"\[REC\]":[style=dotted]:' -e 's:$:;:' $1/depends.tmp
+ # Remove lines with rpmlib(...) and config(...) dependencies, change the
+ # delimiter from pipe to "->", set the style for recommend lines and
+ # turn versioned dependencies into edge labels.
+ sed -i -e '/rpmlib(/d' \
+ -e '/config(/d' \
+ -e 's:|: -> :' \
+ -e 's:"\[REC\]":[style=dotted]:' \
+ -e 's:"\([<>=]\+\)" "\([^"]*\)":[label="\1 \2"]:' \
+ $1/depends.tmp
# Add header, sorted and de-duped contents and footer and then delete the temp file
printf "digraph depends {\n node [shape=plaintext]\n" > $1/depends.dot
- cat $1/depends.tmp | sort | uniq >> $1/depends.dot
+ cat $1/depends.tmp | sort -u >> $1/depends.dot
echo "}" >> $1/depends.dot
rm $1/depends.tmp
# Produce installed package sizes list
oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PKGSIZE" -n -f $pkgcache > $1/installed-package-sizes.tmp
- cat $1/installed-package-sizes.tmp | awk '{print $2 "\tKiB " $1}' | sort -n -r > $1/installed-package-sizes.txt
+ cat $1/installed-package-sizes.tmp | awk '{print $2 "\tKiB\t" $1}' | sort -n -r > $1/installed-package-sizes.txt
rm $1/installed-package-sizes.tmp
# We're now done with the cache, delete it
@@ -463,12 +538,28 @@ buildhistory_get_sdk_installed_target() {
buildhistory_list_files() {
# List the files in the specified directory, but exclude date/time etc.
- # This awk script is somewhat messy, but handles where the size is not printed for device files under pseudo
+ # This is somewhat messy, but handles where the size is not printed for device files under pseudo
+ ( cd $1
+ find_cmd='find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n"'
if [ "$3" = "fakeroot" ] ; then
- ( cd $1 && ${FAKEROOTENV} ${FAKEROOTCMD} find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n" | sort -k5 | sed 's/ * -> $//' > $2 )
+ eval ${FAKEROOTENV} ${FAKEROOTCMD} $find_cmd
else
- ( cd $1 && find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n" | sort -k5 | sed 's/ * -> $//' > $2 )
- fi
+ eval $find_cmd
+ fi | sort -k5 | sed 's/ * -> $//' > $2 )
+}
+
+buildhistory_list_files_no_owners() {
+ # List the files in the specified directory, but exclude date/time etc.
+ # Also don't output the ownership data, but instead output just - - so
+ # that the same parsing code as for _list_files works.
+ # This is somewhat messy, but handles where the size is not printed for device files under pseudo
+ ( cd $1
+ find_cmd='find . ! -path . -printf "%M - - %10s %p -> %l\n"'
+ if [ "$3" = "fakeroot" ] ; then
+ eval ${FAKEROOTENV} ${FAKEROOTCMD} "$find_cmd"
+ else
+ eval "$find_cmd"
+ fi | sort -k5 | sed 's/ * -> $//' > $2 )
}
buildhistory_list_pkg_files() {
@@ -546,34 +637,33 @@ END
python buildhistory_get_extra_sdkinfo() {
import operator
- import math
- if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
- tasksizes = {}
- filesizes = {}
- for root, _, files in os.walk(d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')):
- for fn in files:
- if fn.endswith('.tgz'):
- fsize = int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024))
- task = fn.rsplit(':', 1)[1].split('_', 1)[1].split('.')[0]
- origtotal = tasksizes.get(task, 0)
- tasksizes[task] = origtotal + fsize
- filesizes[fn] = fsize
+ from oe.sdk import get_extra_sdkinfo
+
+ sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+ extra_info = get_extra_sdkinfo(sstate_dir)
+
+ if d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext' and \
+ "sdk" in (d.getVar('BUILDHISTORY_FEATURES') or "").split():
with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package-sizes.txt'), 'w') as f:
- filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1, 0), reverse=True)
+ filesizes_sorted = sorted(extra_info['filesizes'].items(), key=operator.itemgetter(1, 0), reverse=True)
for fn, size in filesizes_sorted:
f.write('%10d KiB %s\n' % (size, fn))
with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task-sizes.txt'), 'w') as f:
- tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1, 0), reverse=True)
+ tasksizes_sorted = sorted(extra_info['tasksizes'].items(), key=operator.itemgetter(1, 0), reverse=True)
for task, size in tasksizes_sorted:
f.write('%10d KiB %s\n' % (size, task))
}
# By using ROOTFS_POSTUNINSTALL_COMMAND we get in after uninstallation of
# unneeded packages but before the removal of packaging files
-ROOTFS_POSTUNINSTALL_COMMAND += " buildhistory_list_installed_image ;\
- buildhistory_get_image_installed ; "
+ROOTFS_POSTUNINSTALL_COMMAND += "buildhistory_list_installed_image ;"
+ROOTFS_POSTUNINSTALL_COMMAND += "buildhistory_get_image_installed ;"
+ROOTFS_POSTUNINSTALL_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_image ;| buildhistory_get_image_installed ;"
+ROOTFS_POSTUNINSTALL_COMMAND[vardepsexclude] += "buildhistory_list_installed_image buildhistory_get_image_installed"
-IMAGE_POSTPROCESS_COMMAND += " buildhistory_get_imageinfo ; "
+IMAGE_POSTPROCESS_COMMAND += "buildhistory_get_imageinfo ;"
+IMAGE_POSTPROCESS_COMMAND[vardepvalueexclude] .= "| buildhistory_get_imageinfo ;"
+IMAGE_POSTPROCESS_COMMAND[vardepsexclude] += "buildhistory_get_imageinfo"
# We want these to be the last run so that we get called after complementary package installation
POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed_sdk_target;"
@@ -587,11 +677,21 @@ POPULATE_SDK_POST_HOST_COMMAND[vardepvalueexclude] .= "| buildhistory_list_insta
SDK_POSTPROCESS_COMMAND_append = " buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; "
SDK_POSTPROCESS_COMMAND[vardepvalueexclude] .= "| buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; "
+python buildhistory_write_sigs() {
+ if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split():
+ return
+
+ # Create sigs file
+ if hasattr(bb.parse.siggen, 'dump_siglist'):
+ taskoutdir = os.path.join(d.getVar('BUILDHISTORY_DIR'), 'task')
+ bb.utils.mkdirhier(taskoutdir)
+ bb.parse.siggen.dump_siglist(os.path.join(taskoutdir, 'tasksigs.txt'))
+}
+
def buildhistory_get_build_id(d):
- if d.getVar('BB_WORKERCONTEXT', True) != '1':
+ if d.getVar('BB_WORKERCONTEXT') != '1':
return ""
localdata = bb.data.createCopy(d)
- bb.data.update_data(localdata)
statuslines = []
for func in oe.data.typed_value('BUILDCFG_FUNCS', localdata):
g = globals()
@@ -602,15 +702,32 @@ def buildhistory_get_build_id(d):
if flines:
statuslines.extend(flines)
- statusheader = d.getVar('BUILDCFG_HEADER', True)
+ statusheader = d.getVar('BUILDCFG_HEADER')
return('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
+def buildhistory_get_modified(path):
+ # copied from get_layer_git_status() in image-buildinfo.bbclass
+ import subprocess
+ try:
+ subprocess.check_output("""cd %s; export PSEUDO_UNLOAD=1; set -e;
+ git diff --quiet --no-ext-diff
+ git diff --quiet --no-ext-diff --cached""" % path,
+ shell=True,
+ stderr=subprocess.STDOUT)
+ return ""
+ except subprocess.CalledProcessError as ex:
+ # Silently treat errors as "modified", without checking for the
+ # (expected) return code 1 in a modified git repo. For example, we get
+ # output and a 129 return code when a layer isn't a git repo at all.
+ return " -- modified"
+
def buildhistory_get_metadata_revs(d):
# We want an easily machine-readable format here, so get_layers_branch_rev isn't quite what we want
- layers = (d.getVar("BBLAYERS", True) or "").split()
- medadata_revs = ["%-17s = %s:%s" % (os.path.basename(i), \
+ layers = (d.getVar("BBLAYERS") or "").split()
+ medadata_revs = ["%-17s = %s:%s%s" % (os.path.basename(i), \
base_get_metadata_git_branch(i, None).strip(), \
- base_get_metadata_git_revision(i, None)) \
+ base_get_metadata_git_revision(i, None), \
+ buildhistory_get_modified(i)) \
for i in layers]
return '\n'.join(medadata_revs)
@@ -619,7 +736,7 @@ def outputvars(vars, listvars, d):
listvars = listvars.split()
ret = ""
for var in vars:
- value = d.getVar(var, True) or ""
+ value = d.getVar(var) or ""
if var in listvars:
# Squash out spaces
value = oe.utils.squashspaces(value)
@@ -627,17 +744,17 @@ def outputvars(vars, listvars, d):
return ret.rstrip('\n')
def buildhistory_get_imagevars(d):
- if d.getVar('BB_WORKERCONTEXT', True) != '1':
+ if d.getVar('BB_WORKERCONTEXT') != '1':
return ""
imagevars = "DISTRO DISTRO_VERSION USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_EXCLUDE ROOTFS_POSTPROCESS_COMMAND IMAGE_POSTPROCESS_COMMAND"
listvars = "USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL BAD_RECOMMENDATIONS PACKAGE_EXCLUDE"
return outputvars(imagevars, listvars, d)
def buildhistory_get_sdkvars(d):
- if d.getVar('BB_WORKERCONTEXT', True) != '1':
+ if d.getVar('BB_WORKERCONTEXT') != '1':
return ""
sdkvars = "DISTRO DISTRO_VERSION SDK_NAME SDK_VERSION SDKMACHINE SDKIMAGE_FEATURES BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_EXCLUDE"
- if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
+ if d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext':
# Extensible SDK uses some additional variables
sdkvars += " SDK_LOCAL_CONF_WHITELIST SDK_LOCAL_CONF_BLACKLIST SDK_INHERIT_BLACKLIST SDK_UPDATE_URL SDK_EXT_TYPE SDK_RECRDEP_TASKS SDK_INCLUDE_PKGDATA SDK_INCLUDE_TOOLCHAIN"
listvars = "SDKIMAGE_FEATURES BAD_RECOMMENDATIONS PACKAGE_EXCLUDE SDK_LOCAL_CONF_WHITELIST SDK_LOCAL_CONF_BLACKLIST SDK_INHERIT_BLACKLIST"
@@ -645,20 +762,23 @@ def buildhistory_get_sdkvars(d):
def buildhistory_get_cmdline(d):
- if sys.argv[0].endswith('bin/bitbake'):
- bincmd = 'bitbake'
- else:
- bincmd = sys.argv[0]
- return '%s %s' % (bincmd, ' '.join(sys.argv[1:]))
+ argv = d.getVar('BB_CMDLINE', False)
+ if argv:
+ if argv[0].endswith('bin/bitbake'):
+ bincmd = 'bitbake'
+ else:
+ bincmd = argv[0]
+ return '%s %s' % (bincmd, ' '.join(argv[1:]))
+ return ''
buildhistory_single_commit() {
if [ "$3" = "" ] ; then
commitopts="${BUILDHISTORY_DIR}/ --allow-empty"
- item="No changes"
+ shortlogprefix="No changes: "
else
- commitopts="$3 metadata-revs"
- item="$3"
+ commitopts=""
+ shortlogprefix=""
fi
if [ "${BUILDHISTORY_BUILD_FAILURES}" = "0" ] ; then
result="succeeded"
@@ -675,7 +795,7 @@ buildhistory_single_commit() {
esac
commitmsgfile=`mktemp`
cat > $commitmsgfile << END
-$item: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $2
+${shortlogprefix}Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $2
cmd: $1
@@ -708,15 +828,9 @@ END
git tag -f build-minus-2 build-minus-1 > /dev/null 2>&1 || true
git tag -f build-minus-1 > /dev/null 2>&1 || true
fi
- # If the user hasn't set up their name/email, set some defaults
- # just for this repo (otherwise the commit will fail with older
- # versions of git)
- if ! git config user.email > /dev/null ; then
- git config --local user.email "buildhistory@${DISTRO}"
- fi
- if ! git config user.name > /dev/null ; then
- git config --local user.name "buildhistory"
- fi
+
+ check_git_config
+
# Check if there are new/changed files to commit (other than metadata-revs)
repostatus=`git status --porcelain | grep -v " metadata-revs$"`
HOSTNAME=`hostname 2>/dev/null || echo unknown`
@@ -725,9 +839,7 @@ END
git add -A .
# porcelain output looks like "?? packages/foo/bar"
# Ensure we commit metadata-revs with the first commit
- for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
- buildhistory_single_commit "$CMDLINE" "$HOSTNAME" "$entry"
- done
+ buildhistory_single_commit "$CMDLINE" "$HOSTNAME" dummy
git gc --auto --quiet
else
buildhistory_single_commit "$CMDLINE" "$HOSTNAME"
@@ -738,16 +850,16 @@ END
}
python buildhistory_eventhandler() {
- if e.data.getVar('BUILDHISTORY_FEATURES', True).strip():
- reset = e.data.getVar("BUILDHISTORY_RESET", True)
- olddir = e.data.getVar("BUILDHISTORY_OLD_DIR", True)
+ if e.data.getVar('BUILDHISTORY_FEATURES').strip():
+ reset = e.data.getVar("BUILDHISTORY_RESET")
+ olddir = e.data.getVar("BUILDHISTORY_OLD_DIR")
if isinstance(e, bb.event.BuildStarted):
if reset:
import shutil
# Clean up after potentially interrupted build.
if os.path.isdir(olddir):
shutil.rmtree(olddir)
- rootdir = e.data.getVar("BUILDHISTORY_DIR", True)
+ rootdir = e.data.getVar("BUILDHISTORY_DIR")
entries = [ x for x in os.listdir(rootdir) if not x.startswith('.') ]
bb.utils.mkdirhier(olddir)
for entry in entries:
@@ -757,13 +869,20 @@ python buildhistory_eventhandler() {
if reset:
import shutil
shutil.rmtree(olddir)
- if e.data.getVar("BUILDHISTORY_COMMIT", True) == "1":
+ if e.data.getVar("BUILDHISTORY_COMMIT") == "1":
bb.note("Writing buildhistory")
+ bb.build.exec_func("buildhistory_write_sigs", d)
+ import time
+ start=time.time()
localdata = bb.data.createCopy(e.data)
localdata.setVar('BUILDHISTORY_BUILD_FAILURES', str(e._failures))
interrupted = getattr(e, '_interrupted', 0)
localdata.setVar('BUILDHISTORY_BUILD_INTERRUPTED', str(interrupted))
bb.build.exec_func("buildhistory_commit", localdata)
+ stop=time.time()
+ bb.note("Writing buildhistory took: %s seconds" % round(stop-start))
+ else:
+ bb.note("No commit since BUILDHISTORY_COMMIT != '1'")
}
addhandler buildhistory_eventhandler
@@ -777,7 +896,7 @@ def _get_srcrev_values(d):
"""
scms = []
- fetcher = bb.fetch.Fetch(d.getVar('SRC_URI', True).split(), d)
+ fetcher = bb.fetch.Fetch(d.getVar('SRC_URI').split(), d)
urldata = fetcher.ud
for u in urldata:
if urldata[u].method.supports_srcrev():
@@ -809,7 +928,10 @@ def _get_srcrev_values(d):
do_fetch[postfuncs] += "write_srcrev"
do_fetch[vardepsexclude] += "write_srcrev"
python write_srcrev() {
- pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE', True)
+ write_latest_srcrev(d, d.getVar('BUILDHISTORY_DIR_PACKAGE'))
+}
+
+def write_latest_srcrev(d, pkghistdir):
srcrevfile = os.path.join(pkghistdir, 'latest_srcrev')
srcrevs, tag_srcrevs = _get_srcrev_values(d)
@@ -830,21 +952,50 @@ python write_srcrev() {
if orig_srcrev != 'INVALID':
f.write('# SRCREV = "%s"\n' % orig_srcrev)
if len(srcrevs) > 1:
- for name, srcrev in srcrevs.items():
+ for name, srcrev in sorted(srcrevs.items()):
orig_srcrev = d.getVar('SRCREV_%s' % name, False)
if orig_srcrev:
f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev))
f.write('SRCREV_%s = "%s"\n' % (name, srcrev))
else:
- f.write('SRCREV = "%s"\n' % srcrevs.values())
+ f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values())))
if len(tag_srcrevs) > 0:
- for name, srcrev in tag_srcrevs.items():
+ for name, srcrev in sorted(tag_srcrevs.items()):
f.write('# tag_%s = "%s"\n' % (name, srcrev))
if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev:
- pkg = d.getVar('PN', True)
+ pkg = d.getVar('PN')
bb.warn("Revision for tag %s in package %s was changed since last build (from %s to %s)" % (name, pkg, old_tag_srcrevs[name], srcrev))
else:
if os.path.exists(srcrevfile):
os.remove(srcrevfile)
+
+do_testimage[postfuncs] += "write_ptest_result"
+do_testimage[vardepsexclude] += "write_ptest_result"
+
+python write_ptest_result() {
+ write_latest_ptest_result(d, d.getVar('BUILDHISTORY_DIR'))
}
+
+def write_latest_ptest_result(d, histdir):
+ import glob
+ import subprocess
+ test_log_dir = d.getVar('TEST_LOG_DIR')
+ input_ptest = os.path.join(test_log_dir, 'ptest_log')
+ output_ptest = os.path.join(histdir, 'ptest')
+ if os.path.exists(input_ptest):
+ try:
+ # Lock it avoid race issue
+ lock = bb.utils.lockfile(output_ptest + "/ptest.lock")
+ bb.utils.mkdirhier(output_ptest)
+ oe.path.copytree(input_ptest, output_ptest)
+ # Sort test result
+ for result in glob.glob('%s/pass.fail.*' % output_ptest):
+ bb.debug(1, 'Processing %s' % result)
+ cmd = ['sort', result, '-o', result]
+ bb.debug(1, 'Running %s' % cmd)
+ ret = subprocess.call(cmd)
+ if ret != 0:
+ bb.error('Failed to run %s!' % cmd)
+ finally:
+ bb.utils.unlockfile(lock)
diff --git a/meta/classes/buildstats-summary.bbclass b/meta/classes/buildstats-summary.bbclass
index b86abcc3f1..f9b241b6c5 100644
--- a/meta/classes/buildstats-summary.bbclass
+++ b/meta/classes/buildstats-summary.bbclass
@@ -7,7 +7,7 @@ python buildstats_summary () {
if not os.path.exists(bsdir):
return
- sstatetasks = (e.data.getVar('SSTATETASKS', True) or '').split()
+ sstatetasks = (e.data.getVar('SSTATETASKS') or '').split()
built = collections.defaultdict(lambda: [set(), set()])
for pf in os.listdir(bsdir):
taskdir = os.path.join(bsdir, pf)
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 34ecb03861..2590c60c63 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -31,6 +31,11 @@ def get_process_cputime(pid):
i = f.readline().strip()
if not i:
break
+ if not ":" in i:
+ # one more extra line is appended (empty or containing "0")
+ # most probably due to race condition in kernel while
+ # updating IO stats
+ break
i = i.split(": ")
iostats[i[0]] = i[1]
resources = resource.getrusage(resource.RUSAGE_SELF)
@@ -75,13 +80,13 @@ def get_buildtimedata(var, d):
return timediff, cpuperc
def write_task_data(status, logfile, e, d):
- bn = d.getVar('BUILDNAME', True)
- bsdir = os.path.join(d.getVar('BUILDSTATS_BASE', True), bn)
+ bn = d.getVar('BUILDNAME')
+ bsdir = os.path.join(d.getVar('BUILDSTATS_BASE'), bn)
with open(os.path.join(logfile), "a") as f:
elapsedtime = get_timedata("__timedata_task", d, e.time)
if elapsedtime:
- f.write(d.expand("${PF}: %s: Elapsed time: %0.2f seconds \n" %
- (e.task, elapsedtime)))
+ f.write(d.expand("${PF}: %s\n" % e.task))
+ f.write(d.expand("Elapsed time: %0.2f seconds\n" % elapsedtime))
cpu, iostats, resources, childres = get_process_cputime(os.getpid())
if cpu:
f.write("utime: %s\n" % cpu['utime'])
@@ -95,7 +100,7 @@ def write_task_data(status, logfile, e, d):
f.write("rusage %s: %s\n" % (i, getattr(resources, i)))
for i in rusages:
f.write("Child rusage %s: %s\n" % (i, getattr(childres, i)))
- if status is "passed":
+ if status == "passed":
f.write("Status: PASSED \n")
else:
f.write("Status: FAILED \n")
@@ -106,9 +111,9 @@ python run_buildstats () {
import bb.event
import time, subprocess, platform
- bn = d.getVar('BUILDNAME', True)
- bsdir = os.path.join(d.getVar('BUILDSTATS_BASE', True), bn)
- taskdir = os.path.join(bsdir, d.getVar('PF', True))
+ bn = d.getVar('BUILDNAME')
+ bsdir = os.path.join(d.getVar('BUILDSTATS_BASE'), bn)
+ taskdir = os.path.join(bsdir, d.getVar('PF'))
if isinstance(e, bb.event.BuildStarted):
########################################################################
@@ -162,9 +167,14 @@ python run_buildstats () {
if e.task == "do_rootfs":
bs = os.path.join(bsdir, "build_stats")
with open(bs, "a") as f:
- rootfs = d.getVar('IMAGE_ROOTFS', True)
- rootfs_size = subprocess.Popen(["du", "-sh", rootfs], stdout=subprocess.PIPE).stdout.read()
- f.write("Uncompressed Rootfs size: %s" % rootfs_size)
+ rootfs = d.getVar('IMAGE_ROOTFS')
+ if os.path.isdir(rootfs):
+ try:
+ rootfs_size = subprocess.check_output(["du", "-sh", rootfs],
+ stderr=subprocess.STDOUT).decode('utf-8')
+ f.write("Uncompressed Rootfs size: %s" % rootfs_size)
+ except subprocess.CalledProcessError as err:
+ bb.warn("Failed to get rootfs size: %s" % err.output.decode('utf-8'))
elif isinstance(e, bb.build.TaskFailed):
# Can have a failure before TaskStarted so need to mkdir here too
@@ -183,3 +193,27 @@ python run_buildstats () {
addhandler run_buildstats
run_buildstats[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted bb.build.TaskStarted bb.build.TaskSucceeded bb.build.TaskFailed"
+python runqueue_stats () {
+ import buildstats
+ from bb import event, runqueue
+ # We should not record any samples before the first task has started,
+ # because that's the first activity shown in the process chart.
+ # Besides, at that point we are sure that the build variables
+ # are available that we need to find the output directory.
+ # The persistent SystemStats is stored in the datastore and
+ # closed when the build is done.
+ system_stats = d.getVar('_buildstats_system_stats', False)
+ if not system_stats and isinstance(e, (bb.runqueue.sceneQueueTaskStarted, bb.runqueue.runQueueTaskStarted)):
+ system_stats = buildstats.SystemStats(d)
+ d.setVar('_buildstats_system_stats', system_stats)
+ if system_stats:
+ # Ensure that we sample at important events.
+ done = isinstance(e, bb.event.BuildCompleted)
+ system_stats.sample(e, force=done)
+ if done:
+ system_stats.close()
+ d.delVar('_buildstats_system_stats')
+}
+
+addhandler runqueue_stats
+runqueue_stats[eventmask] = "bb.runqueue.sceneQueueTaskStarted bb.runqueue.runQueueTaskStarted bb.event.HeartbeatEvent bb.event.BuildCompleted bb.event.MonitorDiskEvent"
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 2e9837cf07..b5457359ca 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -1,6 +1,66 @@
-CCACHE = "${@bb.utils.which(d.getVar('PATH', True), 'ccache') and 'ccache '}"
-export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
-CCACHE_DISABLE[unexport] = "1"
+#
+# Usage:
+# - Enable ccache
+# Add the following line to a conffile such as conf/local.conf:
+# INHERIT += "ccache"
+#
+# - Disable ccache for a recipe
+# Add the following line to the recipe if it can't be built with ccache:
+# CCACHE_DISABLE = '1'
+#
+# - Share ccache files between different builds
+# Set CCACHE_TOP_DIR to a shared dir
+# CCACHE_TOP_DIR = /path/to/shared_ccache/
+#
+# - TO debug ccahe
+# export CCACHE_DEBUG = "1"
+# export CCACHE_LOGFILE = "${CCACHE_DIR}/logfile.log"
+# And also set PARALLEL_MAKE = "-j 1" to get make the log in order
+#
-do_configure[dirs] =+ "${CCACHE_DIR}"
-do_kernel_configme[dirs] =+ "${CCACHE_DIR}"
+# Set it to a shared location for different builds, so that cache files can
+# be shared between different builds.
+CCACHE_TOP_DIR ?= "${TMPDIR}/ccache"
+
+# ccahe removes CCACHE_BASEDIR from file path, so that hashes will be the same
+# in different builds.
+export CCACHE_BASEDIR ?= "${TMPDIR}"
+
+# Used for sharing cache files after compiler is rebuilt
+export CCACHE_COMPILERCHECK ?= "%compiler% -dumpspecs"
+
+export CCACHE_CONFIGPATH ?= "${COREBASE}/meta/conf/ccache.conf"
+
+export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}"
+
+# We need to stop ccache considering the current directory or the
+# debug-prefix-map target directory to be significant when calculating
+# its hash. Without this the cache would be invalidated every time
+# ${PV} or ${PR} change.
+export CCACHE_NOHASHDIR ?= "1"
+
+python() {
+ """
+ Enable ccache for the recipe
+ """
+ pn = d.getVar('PN')
+ # quilt-native doesn't need ccache since no c files
+ if not (pn in ('ccache-native', 'quilt-native') or
+ bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
+ d.appendVar('DEPENDS', ' ccache-native')
+ d.setVar('CCACHE', 'ccache ')
+}
+
+addtask cleanccache after do_clean
+python do_cleanccache() {
+ import shutil
+
+ ccache_dir = d.getVar('CCACHE_DIR')
+ if os.path.exists(ccache_dir):
+ bb.note("Removing %s" % ccache_dir)
+ shutil.rmtree(ccache_dir)
+ else:
+ bb.note("%s doesn't exist" % ccache_dir)
+}
+addtask cleanall after do_cleanccache
+do_cleanccache[nostamp] = "1"
diff --git a/meta/classes/ccmake.bbclass b/meta/classes/ccmake.bbclass
new file mode 100644
index 0000000000..df5134a108
--- /dev/null
+++ b/meta/classes/ccmake.bbclass
@@ -0,0 +1,97 @@
+inherit terminal
+
+python do_ccmake() {
+ import shutil
+
+ # copy current config for diffing
+ config = os.path.join(d.getVar("B"), "CMakeCache.txt")
+ if os.path.exists(config):
+ shutil.copy(config, config + ".orig")
+
+ oe_terminal(d.expand("ccmake ${OECMAKE_GENERATOR_ARGS} ${OECMAKE_SOURCEPATH} -Wno-dev"),
+ d.getVar("PN") + " - ccmake", d)
+
+ if os.path.exists(config) and os.path.exists(config + ".orig"):
+ if bb.utils.md5_file(config) != bb.utils.md5_file(config + ".orig"):
+ # the cmake class uses cmake --build, which will by default
+ # regenerate configuration, simply mark the compile step as tainted
+ # to ensure it is re-run
+ bb.note("Configuration changed, recompile will be forced")
+ bb.build.write_taint('do_compile', d)
+
+}
+do_ccmake[depends] += "cmake-native:do_populate_sysroot"
+do_ccmake[nostamp] = "1"
+do_ccmake[dirs] = "${B}"
+addtask ccmake after do_configure
+
+def cmake_parse_config_cache(path):
+ with open(path, "r") as f:
+ for i in f:
+ i = i.rstrip("\n")
+ if len(i) == 0 or i.startswith("//") or i.startswith("#"):
+ continue # empty or comment
+ key, value = i.split("=", 1)
+ key, keytype = key.split(":")
+ if keytype in ["INTERNAL", "STATIC"]:
+ continue # skip internal and static config options
+ yield key, keytype, value
+
+def cmake_diff_config_vars(a, b):
+ removed, added = [], []
+
+ for ak, akt, av in a:
+ found = False
+ for bk, bkt, bv in b:
+ if bk == ak:
+ found = True
+ if bkt != akt or bv != av: # changed
+ removed.append((ak, akt, av))
+ added.append((bk, bkt, bv))
+ break
+ # remove any missing from b
+ if not found:
+ removed.append((ak, akt, av))
+
+ # add any missing from a
+ for bk, bkt, bv in b:
+ if not any(bk == ak for ak, akt, av in a):
+ added.append((bk, bkt, bv))
+
+ return removed, added
+
+python do_ccmake_diffconfig() {
+ import shutil
+ config = os.path.join(d.getVar("B"), "CMakeCache.txt")
+ if os.path.exists(config) and os.path.exists(config + ".orig"):
+ if bb.utils.md5_file(config) != bb.utils.md5_file(config + ".orig"):
+ # scan the changed options
+ old = list(cmake_parse_config_cache(config + ".orig"))
+ new = list(cmake_parse_config_cache(config))
+ _, added = cmake_diff_config_vars(old, new)
+
+ if len(added) != 0:
+ with open(d.expand("${WORKDIR}/configuration.inc"), "w") as f:
+ f.write("EXTRA_OECMAKE += \" \\\n")
+ for k, kt, v in added:
+ escaped = v if " " not in v else "\"{0}\"".format(v)
+ f.write(" -D{0}:{1}={2} \\\n".format(k, kt, escaped))
+ f.write(" \"\n")
+ bb.plain("Configuration recipe fragment written to: {0}".format(d.expand("${WORKDIR}/configuration.inc")))
+
+ with open(d.expand("${WORKDIR}/site-file.cmake"), "w") as f:
+ for k, kt, v in added:
+ f.write("SET({0} \"{1}\" CACHE {2} \"\")\n".format(k, v, kt))
+ bb.plain("Configuration cmake fragment written to: {0}".format(d.expand("${WORKDIR}/site-file.cmake")))
+
+ # restore the original config
+ shutil.copy(config + ".orig", config)
+ else:
+ bb.plain("No configuration differences, skipping configuration fragment generation.")
+ else:
+ bb.fatal("No config files found. Did you run ccmake?")
+}
+do_ccmake_diffconfig[nostamp] = "1"
+do_ccmake_diffconfig[dirs] = "${B}"
+addtask ccmake_diffconfig
+
diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 72e8a122e3..2870c10d51 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -1,7 +1,7 @@
CHRPATH_BIN ?= "chrpath"
PREPROCESS_RELOCATE_DIRS ?= ""
-def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d):
+def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlinks = False):
import subprocess as sub
p = sub.Popen([cmd, '-l', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
@@ -17,32 +17,39 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d):
# Throw away everything other than the rpath list
curr_rpath = out.partition("RPATH=")[2]
#bb.note("Current rpath for %s is %s" % (fpath, curr_rpath.strip()))
- rpaths = curr_rpath.split(":")
+ rpaths = curr_rpath.strip().split(":")
new_rpaths = []
modified = False
for rpath in rpaths:
# If rpath is already dynamic copy it to new_rpath and continue
if rpath.find("$ORIGIN") != -1:
- new_rpaths.append(rpath.strip())
+ new_rpaths.append(rpath)
continue
rpath = os.path.normpath(rpath)
if baseprefix not in rpath and tmpdir not in rpath:
- new_rpaths.append(rpath.strip())
+ # Skip standard search paths
+ if rpath in ['/lib', '/usr/lib', '/lib64/', '/usr/lib64']:
+ bb.warn("Skipping RPATH %s as is a standard search path for %s" % (rpath, fpath))
+ modified = True
+ continue
+ new_rpaths.append(rpath)
continue
- new_rpaths.append("$ORIGIN/" + os.path.relpath(rpath.strip(), os.path.dirname(fpath.replace(rootdir, "/"))))
+ new_rpaths.append("$ORIGIN/" + os.path.relpath(rpath, os.path.dirname(fpath.replace(rootdir, "/"))))
modified = True
# if we have modified some rpaths call chrpath to update the binary
if modified:
+ if break_hardlinks:
+ bb.utils.break_hardlinks(fpath)
+
args = ":".join(new_rpaths)
#bb.note("Setting rpath for %s to %s" %(fpath, args))
p = sub.Popen([cmd, '-r', args, fpath],stdout=sub.PIPE,stderr=sub.PIPE)
out, err = p.communicate()
if p.returncode != 0:
- bb.error("%s: chrpath command failed with exit code %d:\n%s%s" % (d.getVar('PN', True), p.returncode, out, err))
- raise bb.build.FuncFailed
+ bb.fatal("%s: chrpath command failed with exit code %d:\n%s%s" % (d.getVar('PN'), p.returncode, out, err))
-def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d):
+def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlinks = False):
import subprocess as sub
p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
@@ -57,18 +64,21 @@ def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d):
if baseprefix not in rpath:
continue
+ if break_hardlinks:
+ bb.utils.break_hardlinks(fpath)
+
newpath = "@loader_path/" + os.path.relpath(rpath, os.path.dirname(fpath.replace(rootdir, "/")))
p = sub.Popen([d.expand("${HOST_PREFIX}install_name_tool"), '-change', rpath, newpath, fpath],stdout=sub.PIPE,stderr=sub.PIPE)
out, err = p.communicate()
-def process_dir (rootdir, directory, d):
+def process_dir(rootdir, directory, d, break_hardlinks = False):
import stat
rootdir = os.path.normpath(rootdir)
cmd = d.expand('${CHRPATH_BIN}')
tmpdir = os.path.normpath(d.getVar('TMPDIR', False))
baseprefix = os.path.normpath(d.expand('${base_prefix}'))
- hostos = d.getVar("HOST_OS", True)
+ hostos = d.getVar("HOST_OS")
#bb.debug("Checking %s for binaries to process" % directory)
if not os.path.exists(directory):
@@ -91,7 +101,7 @@ def process_dir (rootdir, directory, d):
continue
if os.path.isdir(fpath):
- process_dir(rootdir, fpath, d)
+ process_dir(rootdir, fpath, d, break_hardlinks = break_hardlinks)
else:
#bb.note("Testing %s for relocatability" % fpath)
@@ -104,8 +114,9 @@ def process_dir (rootdir, directory, d):
else:
# Temporarily make the file writeable so we can chrpath it
os.chmod(fpath, perms|stat.S_IRWXU)
- process_file(cmd, fpath, rootdir, baseprefix, tmpdir, d)
-
+
+ process_file(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlinks = break_hardlinks)
+
if perms:
os.chmod(fpath, perms)
diff --git a/meta/classes/clutter.bbclass b/meta/classes/clutter.bbclass
index 167407dfdc..24b53a13e4 100644
--- a/meta/classes/clutter.bbclass
+++ b/meta/classes/clutter.bbclass
@@ -1,22 +1,18 @@
-
def get_minor_dir(v):
import re
- m = re.match("^([0-9]+)\.([0-9]+)", v)
+ m = re.match(r"^([0-9]+)\.([0-9]+)", v)
return "%s.%s" % (m.group(1), m.group(2))
def get_real_name(n):
import re
- m = re.match("^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
+ m = re.match(r"^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
return "%s" % (m.group(1))
VERMINOR = "${@get_minor_dir("${PV}")}"
REALNAME = "${@get_real_name("${BPN}")}"
-CLUTTER_SRC_FTP = "${GNOME_MIRROR}/${REALNAME}/${VERMINOR}/${REALNAME}-${PV}.tar.xz;name=archive"
-
-CLUTTER_SRC_GIT = "git://git.gnome.org/${REALNAME}"
-
-SRC_URI = "${CLUTTER_SRC_FTP}"
+SRC_URI = "${GNOME_MIRROR}/${REALNAME}/${VERMINOR}/${REALNAME}-${PV}.tar.xz;name=archive"
S = "${WORKDIR}/${REALNAME}-${PV}"
-inherit autotools pkgconfig gtk-doc gettext
+CLUTTERBASEBUILDCLASS ??= "autotools"
+inherit ${CLUTTERBASEBUILDCLASS} pkgconfig gtk-doc gettext
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 7091f8ba81..8ccb1eefc7 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -1,15 +1,44 @@
# Path to the CMake file to process.
-OECMAKE_SOURCEPATH ?= "${S}"
+OECMAKE_SOURCEPATH ??= "${S}"
DEPENDS_prepend = "cmake-native "
B = "${WORKDIR}/build"
-# We need to unset CCACHE otherwise cmake gets too confused
-CCACHE = ""
-
-# C/C++ Compiler (without cpu arch/tune arguments)
-OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
-OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
+# What CMake generator to use.
+# The supported options are "Unix Makefiles" or "Ninja".
+OECMAKE_GENERATOR ?= "Ninja"
+
+python() {
+ generator = d.getVar("OECMAKE_GENERATOR")
+ if "Unix Makefiles" in generator:
+ args = "-G '" + generator + "' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE")
+ d.setVar("OECMAKE_GENERATOR_ARGS", args)
+ d.setVarFlag("do_compile", "progress", "percent")
+ elif "Ninja" in generator:
+ args = "-G '" + generator + "' -DCMAKE_MAKE_PROGRAM=ninja"
+ d.appendVar("DEPENDS", " ninja-native")
+ d.setVar("OECMAKE_GENERATOR_ARGS", args)
+ d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+")
+ else:
+ bb.fatal("Unknown CMake Generator %s" % generator)
+
+ # C/C++ Compiler (without cpu arch/tune arguments)
+ if not d.getVar('OECMAKE_C_COMPILER'):
+ cc_list = d.getVar('CC').split()
+ if cc_list[0] == 'ccache':
+ d.setVar('OECMAKE_C_COMPILER_LAUNCHER', cc_list[0])
+ d.setVar('OECMAKE_C_COMPILER', cc_list[1])
+ else:
+ d.setVar('OECMAKE_C_COMPILER', cc_list[0])
+
+ if not d.getVar('OECMAKE_CXX_COMPILER'):
+ cxx_list = d.getVar('CXX').split()
+ if cxx_list[0] == 'ccache':
+ d.setVar('OECMAKE_CXX_COMPILER_LAUNCHER', cxx_list[0])
+ d.setVar('OECMAKE_CXX_COMPILER', cxx_list[1])
+ else:
+ d.setVar('OECMAKE_CXX_COMPILER', cxx_list[0])
+}
OECMAKE_AR ?= "${AR}"
# Compiler flags
@@ -19,6 +48,11 @@ OECMAKE_C_FLAGS_RELEASE ?= "-DNDEBUG"
OECMAKE_CXX_FLAGS_RELEASE ?= "-DNDEBUG"
OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}"
+CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
+CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
+
+OECMAKE_C_COMPILER_LAUNCHER ?= ""
+OECMAKE_CXX_COMPILER_LAUNCHER ?= ""
OECMAKE_RPATH ?= ""
OECMAKE_PERLNATIVE_DIR ??= ""
@@ -29,6 +63,12 @@ OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
+EXTRA_OECMAKE_BUILD_prepend_task-compile = "${PARALLEL_MAKE} "
+EXTRA_OECMAKE_BUILD_prepend_task-install = "${PARALLEL_MAKEINST} "
+
+OECMAKE_TARGET_COMPILE ?= "all"
+OECMAKE_TARGET_INSTALL ?= "install"
+
# CMake expects target architectures in the format of uname(2),
# which do not always match TARGET_ARCH, so all the necessary
# conversions should happen here.
@@ -40,13 +80,19 @@ def map_target_arch_to_uname_arch(target_arch):
return target_arch
cmake_do_generate_toolchain_file() {
+ if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
+ cmake_crosscompiling="set( CMAKE_CROSSCOMPILING FALSE )"
+ fi
cat > ${WORKDIR}/toolchain.cmake <<EOF
# CMake system name must be something like "Linux".
# This is important for cross-compiling.
+$cmake_crosscompiling
set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` )
-set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH', True))} )
+set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} )
set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
+set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} )
+set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} )
set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} )
set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" )
set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
@@ -60,11 +106,12 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
# only search in the paths provided so cmake doesnt pick
# up libraries and tools from the native build machine
-set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN})
+set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN} ${HOSTTOOLS_DIR})
set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+set( CMAKE_PROGRAM_PATH "/" )
# Use qt.conf settings
set( ENV{QT_CONF_PATH} ${WORKDIR}/qt.conf )
@@ -73,17 +120,26 @@ set( ENV{QT_CONF_PATH} ${WORKDIR}/qt.conf )
# directory as rpath by default
set( CMAKE_INSTALL_RPATH ${OECMAKE_RPATH} )
-# Use native cmake modules
+# Use RPATHs relative to build directory for reproducibility
+set( CMAKE_BUILD_RPATH_USE_ORIGIN ON )
+
+# Use our cmake modules
list(APPEND CMAKE_MODULE_PATH "${STAGING_DATADIR}/cmake/Modules/")
# add for non /usr/lib libdir, e.g. /usr/lib64
set( CMAKE_LIBRARY_PATH ${libdir} ${base_libdir})
+# add include dir to implicit includes in case it differs from /usr/include
+list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${includedir})
+list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${includedir})
+
EOF
}
addtask generate_toolchain_file after do_patch before do_configure
+CONFIGURE_FILES = "CMakeLists.txt"
+
cmake_do_configure() {
if [ "${OECMAKE_BUILDPATH}" ]; then
bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build."
@@ -99,41 +155,43 @@ cmake_do_configure() {
# Just like autotools cmake can use a site file to cache result that need generated binaries to run
if [ -e ${WORKDIR}/site-file.cmake ] ; then
- OECMAKE_SITEFILE=" -C ${WORKDIR}/site-file.cmake"
+ oecmake_sitefile="-C ${WORKDIR}/site-file.cmake"
else
- OECMAKE_SITEFILE=""
+ oecmake_sitefile=
fi
cmake \
- ${OECMAKE_SITEFILE} \
+ ${OECMAKE_GENERATOR_ARGS} \
+ $oecmake_sitefile \
${OECMAKE_SOURCEPATH} \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
- -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir', True), d.getVar('prefix', True))} \
- -DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir', True), d.getVar('prefix', True))} \
- -DCMAKE_INSTALL_LIBEXECDIR:PATH=${@os.path.relpath(d.getVar('libexecdir', True), d.getVar('prefix', True))} \
+ -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'), d.getVar('prefix') + '/')} \
+ -DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir'), d.getVar('prefix') + '/')} \
+ -DCMAKE_INSTALL_LIBEXECDIR:PATH=${@os.path.relpath(d.getVar('libexecdir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
- -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@os.path.relpath(d.getVar('sharedstatedir', True), d. getVar('prefix', True))} \
+ -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@os.path.relpath(d.getVar('sharedstatedir'), d. getVar('prefix') + '/')} \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
- -DCMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir', True), d.getVar('prefix', True))} \
- -DCMAKE_INSTALL_INCLUDEDIR:PATH=${@os.path.relpath(d.getVar('includedir', True), d.getVar('prefix', True))} \
- -DCMAKE_INSTALL_DATAROOTDIR:PATH=${@os.path.relpath(d.getVar('datadir', True), d.getVar('prefix', True))} \
+ -DCMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} \
+ -DCMAKE_INSTALL_INCLUDEDIR:PATH=${@os.path.relpath(d.getVar('includedir'), d.getVar('prefix') + '/')} \
+ -DCMAKE_INSTALL_DATAROOTDIR:PATH=${@os.path.relpath(d.getVar('datadir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
- -DCMAKE_VERBOSE_MAKEFILE=1 \
-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \
${EXTRA_OECMAKE} \
-Wno-dev
}
-do_compile[progress] = "percent"
+cmake_runcmake_build() {
+ bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
+ eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
+}
+
cmake_do_compile() {
- cd ${B}
- base_do_compile VERBOSE=1
+ cmake_runcmake_build --target ${OECMAKE_TARGET_COMPILE}
}
cmake_do_install() {
- cd ${B}
- oe_runmake 'DESTDIR=${D}' install
+ DESTDIR='${D}' cmake_runcmake_build --target ${OECMAKE_TARGET_INSTALL}
}
EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index 5834806269..c7f6723cb3 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -1,7 +1,7 @@
cml1_do_configure() {
set -e
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- oe_runmake oldconfig
+ yes '' | oe_runmake oldconfig
}
EXPORT_FUNCTIONS do_configure
@@ -26,8 +26,8 @@ python do_menuconfig() {
except OSError:
mtime = 0
- oe_terminal("${SHELL} -c \"make %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND', True),
- d.getVar('PN', True ) + ' Configuration', d)
+ oe_terminal("sh -c \"make %s; if [ \\$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
+ d.getVar('PN') + ' Configuration', d)
# FIXME this check can be removed when the minimum bitbake version has been bumped
if hasattr(bb.build, 'write_taint'):
@@ -49,7 +49,7 @@ python do_diffconfig() {
import shutil
import subprocess
- workdir = d.getVar('WORKDIR', True)
+ workdir = d.getVar('WORKDIR')
fragment = workdir + '/fragment.cfg'
configorig = '.config.orig'
config = '.config'
@@ -64,7 +64,8 @@ python do_diffconfig() {
if isdiff:
statement = 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L" ' + configorig + ' ' + config + '>' + fragment
subprocess.call(statement, shell=True)
-
+ # No need to check the exit code as we know it's going to be
+ # non-zero, but that's what we expect.
shutil.copy(configorig, config)
bb.plain("Config fragment has been dumped into:\n %s" % fragment)
diff --git a/meta/classes/compress_doc.bbclass b/meta/classes/compress_doc.bbclass
index 8073c173e5..d6d11fad26 100644
--- a/meta/classes/compress_doc.bbclass
+++ b/meta/classes/compress_doc.bbclass
@@ -31,25 +31,25 @@ DOC_DECOMPRESS_CMD[xz] ?= "unxz -v"
PACKAGE_PREPROCESS_FUNCS += "package_do_compress_doc compress_doc_updatealternatives"
python package_do_compress_doc() {
- compress_mode = d.getVar('DOC_COMPRESS', True)
- compress_list = (d.getVar('DOC_COMPRESS_LIST', True) or '').split()
+ compress_mode = d.getVar('DOC_COMPRESS')
+ compress_list = (d.getVar('DOC_COMPRESS_LIST') or '').split()
if compress_mode not in compress_list:
bb.fatal('Compression policy %s not supported (not listed in %s)\n' % (compress_mode, compress_list))
- dvar = d.getVar('PKGD', True)
+ dvar = d.getVar('PKGD')
compress_cmds = {}
decompress_cmds = {}
for mode in compress_list:
- compress_cmds[mode] = d.getVarFlag('DOC_COMPRESS_CMD', mode, True)
- decompress_cmds[mode] = d.getVarFlag('DOC_DECOMPRESS_CMD', mode, True)
+ compress_cmds[mode] = d.getVarFlag('DOC_COMPRESS_CMD', mode)
+ decompress_cmds[mode] = d.getVarFlag('DOC_DECOMPRESS_CMD', mode)
- mandir = os.path.abspath(dvar + os.sep + d.getVar("mandir", True))
+ mandir = os.path.abspath(dvar + os.sep + d.getVar("mandir"))
if os.path.exists(mandir):
# Decompress doc files which format is not compress_mode
decompress_doc(mandir, compress_mode, decompress_cmds)
compress_doc(mandir, compress_mode, compress_cmds)
- infodir = os.path.abspath(dvar + os.sep + d.getVar("infodir", True))
+ infodir = os.path.abspath(dvar + os.sep + d.getVar("infodir"))
if os.path.exists(infodir):
# Decompress doc files which format is not compress_mode
decompress_doc(infodir, compress_mode, decompress_cmds)
@@ -79,6 +79,7 @@ def _collect_hardlink(hardlink_dict, file):
return hardlink_dict
def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False):
+ import subprocess
for target in hardlink_dict:
if decompress:
compress_format = _get_compress_format(target, shell_cmds.keys())
@@ -87,7 +88,7 @@ def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False
else:
cmd = "%s -f %s" % (shell_cmds[compress_mode], target)
bb.note('compress hardlink %s' % target)
- (retval, output) = oe.utils.getstatusoutput(cmd)
+ (retval, output) = subprocess.getstatusoutput(cmd)
if retval:
bb.warn("de/compress file failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
return
@@ -159,6 +160,7 @@ def _is_compress_doc(file, compress_format_list):
return False, ''
def compress_doc(topdir, compress_mode, compress_cmds):
+ import subprocess
hardlink_dict = {}
for root, dirs, files in os.walk(topdir):
for f in files:
@@ -176,7 +178,7 @@ def compress_doc(topdir, compress_mode, compress_cmds):
# Normal file
elif os.path.isfile(file):
cmd = "%s %s" % (compress_cmds[compress_mode], file)
- (retval, output) = oe.utils.getstatusoutput(cmd)
+ (retval, output) = subprocess.getstatusoutput(cmd)
if retval:
bb.warn("compress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
continue
@@ -186,6 +188,7 @@ def compress_doc(topdir, compress_mode, compress_cmds):
# Decompress doc files which format is not compress_mode
def decompress_doc(topdir, compress_mode, decompress_cmds):
+ import subprocess
hardlink_dict = {}
decompress = True
for root, dirs, files in os.walk(topdir):
@@ -206,7 +209,7 @@ def decompress_doc(topdir, compress_mode, decompress_cmds):
# Normal file
elif os.path.isfile(file):
cmd = "%s %s" % (decompress_cmds[compress_format], file)
- (retval, output) = oe.utils.getstatusoutput(cmd)
+ (retval, output) = subprocess.getstatusoutput(cmd)
if retval:
bb.warn("decompress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
continue
@@ -218,18 +221,18 @@ python compress_doc_updatealternatives () {
if not bb.data.inherits_class('update-alternatives', d):
return
- mandir = d.getVar("mandir", True)
- infodir = d.getVar("infodir", True)
- compress_mode = d.getVar('DOC_COMPRESS', True)
- for pkg in (d.getVar('PACKAGES', True) or "").split():
- old_names = (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split()
+ mandir = d.getVar("mandir")
+ infodir = d.getVar("infodir")
+ compress_mode = d.getVar('DOC_COMPRESS')
+ for pkg in (d.getVar('PACKAGES') or "").split():
+ old_names = (d.getVar('ALTERNATIVE_%s' % pkg) or "").split()
new_names = []
for old_name in old_names:
- old_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', old_name, True)
- old_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name, True) or \
- d.getVarFlag('ALTERNATIVE_TARGET', old_name, True) or \
- d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True) or \
- d.getVar('ALTERNATIVE_TARGET', True) or \
+ old_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', old_name)
+ old_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name) or \
+ d.getVarFlag('ALTERNATIVE_TARGET', old_name) or \
+ d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or \
+ d.getVar('ALTERNATIVE_TARGET') or \
old_link
# Sometimes old_target is specified as relative to the link name.
old_target = os.path.join(os.path.dirname(old_link), old_target)
@@ -241,15 +244,15 @@ python compress_doc_updatealternatives () {
new_target = old_target + '.' + compress_mode
d.delVarFlag('ALTERNATIVE_LINK_NAME', old_name)
d.setVarFlag('ALTERNATIVE_LINK_NAME', new_name, new_link)
- if d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name, True):
+ if d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name):
d.delVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name)
d.setVarFlag('ALTERNATIVE_TARGET_%s' % pkg, new_name, new_target)
- elif d.getVarFlag('ALTERNATIVE_TARGET', old_name, True):
+ elif d.getVarFlag('ALTERNATIVE_TARGET', old_name):
d.delVarFlag('ALTERNATIVE_TARGET', old_name)
d.setVarFlag('ALTERNATIVE_TARGET', new_name, new_target)
- elif d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True):
+ elif d.getVar('ALTERNATIVE_TARGET_%s' % pkg):
d.setVar('ALTERNATIVE_TARGET_%s' % pkg, new_target)
- elif d.getVar('ALTERNATIVE_TARGET', old_name, True):
+ elif d.getVar('ALTERNATIVE_TARGET'):
d.setVar('ALTERNATIVE_TARGET', new_target)
new_names.append(new_name)
diff --git a/meta/classes/copyleft_compliance.bbclass b/meta/classes/copyleft_compliance.bbclass
index 907c1836b3..eabf12ce7a 100644
--- a/meta/classes/copyleft_compliance.bbclass
+++ b/meta/classes/copyleft_compliance.bbclass
@@ -13,7 +13,7 @@ python do_prepare_copyleft_sources () {
import os.path
import shutil
- p = d.getVar('P', True)
+ p = d.getVar('P')
included, reason = copyleft_should_include(d)
if not included:
bb.debug(1, 'copyleft: %s is excluded: %s' % (p, reason))
@@ -21,13 +21,13 @@ python do_prepare_copyleft_sources () {
else:
bb.debug(1, 'copyleft: %s is included: %s' % (p, reason))
- sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', True)
- dl_dir = d.getVar('DL_DIR', True)
- src_uri = d.getVar('SRC_URI', True).split()
+ sources_dir = d.getVar('COPYLEFT_SOURCES_DIR')
+ dl_dir = d.getVar('DL_DIR')
+ src_uri = d.getVar('SRC_URI').split()
fetch = bb.fetch2.Fetch(src_uri, d)
ud = fetch.ud
- pf = d.getVar('PF', True)
+ pf = d.getVar('PF')
dest = os.path.join(sources_dir, pf)
shutil.rmtree(dest, ignore_errors=True)
bb.utils.mkdirhier(dest)
diff --git a/meta/classes/copyleft_filter.bbclass b/meta/classes/copyleft_filter.bbclass
index 46be7f7d2f..c36bce431a 100644
--- a/meta/classes/copyleft_filter.bbclass
+++ b/meta/classes/copyleft_filter.bbclass
@@ -6,7 +6,7 @@
#
# vi:sts=4:sw=4:et
-COPYLEFT_LICENSE_INCLUDE ?= 'GPL* LGPL*'
+COPYLEFT_LICENSE_INCLUDE ?= 'GPL* LGPL* AGPL*'
COPYLEFT_LICENSE_INCLUDE[type] = 'list'
COPYLEFT_LICENSE_INCLUDE[doc] = 'Space separated list of globs which include licenses'
@@ -47,32 +47,32 @@ def copyleft_should_include(d):
import oe.license
from fnmatch import fnmatchcase as fnmatch
- included, motive = False, 'recipe did not match anything'
-
- recipe_type = d.getVar('COPYLEFT_RECIPE_TYPE', True)
+ recipe_type = d.getVar('COPYLEFT_RECIPE_TYPE')
if recipe_type not in oe.data.typed_value('COPYLEFT_RECIPE_TYPES', d):
- include, motive = False, 'recipe type "%s" is excluded' % recipe_type
+ included, motive = False, 'recipe type "%s" is excluded' % recipe_type
+ else:
+ included, motive = False, 'recipe did not match anything'
- include = oe.data.typed_value('COPYLEFT_LICENSE_INCLUDE', d)
- exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
+ include = oe.data.typed_value('COPYLEFT_LICENSE_INCLUDE', d)
+ exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
- try:
- is_included, reason = oe.license.is_included(d.getVar('LICENSE', True), include, exclude)
- except oe.license.LicenseError as exc:
- bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
- else:
- if is_included:
- if reason:
- included, motive = True, 'recipe has included licenses: %s' % ', '.join(reason)
- else:
- included, motive = False, 'recipe does not include a copyleft license'
+ try:
+ is_included, reason = oe.license.is_included(d.getVar('LICENSE'), include, exclude)
+ except oe.license.LicenseError as exc:
+ bb.fatal('%s: %s' % (d.getVar('PF'), exc))
else:
- included, motive = False, 'recipe has excluded licenses: %s' % ', '.join(reason)
+ if is_included:
+ if reason:
+ included, motive = True, 'recipe has included licenses: %s' % ', '.join(reason)
+ else:
+ included, motive = False, 'recipe does not include a copyleft license'
+ else:
+ included, motive = False, 'recipe has excluded licenses: %s' % ', '.join(reason)
- if any(fnmatch(d.getVar('PN', True), name) \
+ if any(fnmatch(d.getVar('PN'), name) \
for name in oe.data.typed_value('COPYLEFT_PN_INCLUDE', d)):
included, motive = True, 'recipe included by name'
- if any(fnmatch(d.getVar('PN', True), name) \
+ if any(fnmatch(d.getVar('PN'), name) \
for name in oe.data.typed_value('COPYLEFT_PN_EXCLUDE', d)):
included, motive = False, 'recipe excluded by name'
diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index 8431440db4..94f112c397 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -24,11 +24,16 @@
# - hwcodecs - Install hardware acceleration codecs
# - package-management - installs package management tools and preserves the package manager database
# - debug-tweaks - makes an image suitable for development, e.g. allowing passwordless root logins
+# - empty-root-password
+# - allow-empty-password
+# - post-install-logging
# - dev-pkgs - development packages (headers, etc.) for all installed packages in the rootfs
# - dbg-pkgs - debug symbol packages for all installed packages in the rootfs
# - doc-pkgs - documentation packages for all installed packages in the rootfs
+# - bash-completion-pkgs - bash-completion packages for recipes using bash-completion bbclass
# - ptest-pkgs - ptest packages for all ptest-enabled recipes
# - read-only-rootfs - tweaks an image to support read-only rootfs
+# - splash - bootup splash screen
#
FEATURE_PACKAGES_x11 = "packagegroup-core-x11"
FEATURE_PACKAGES_x11-base = "packagegroup-core-x11-base"
diff --git a/meta/classes/cpan-base.bbclass b/meta/classes/cpan-base.bbclass
index 55ac052695..867edf8707 100644
--- a/meta/classes/cpan-base.bbclass
+++ b/meta/classes/cpan-base.bbclass
@@ -2,39 +2,17 @@
# cpan-base providers various perl related information needed for building
# cpan modules
#
-FILES_${PN} += "${libdir}/perl ${datadir}/perl"
+FILES_${PN} += "${libdir}/perl5 ${datadir}/perl5"
DEPENDS += "${@["perl", "perl-native"][(bb.data.inherits_class('native', d))]}"
RDEPENDS_${PN} += "${@["perl", ""][(bb.data.inherits_class('native', d))]}"
-PERL_OWN_DIR = "${@["", "/perl-native"][(bb.data.inherits_class('native', d))]}"
-
-# Determine the staged version of perl from the perl configuration file
-# Assign vardepvalue, because otherwise signature is changed before and after
-# perl is built (from None to real version in config.sh).
-get_perl_version[vardepvalue] = "${PERL_OWN_DIR}"
-def get_perl_version(d):
- import re
- cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh')
- try:
- f = open(cfg, 'r')
- except IOError:
- return None
- l = f.readlines();
- f.close();
- r = re.compile("^version='(\d*\.\d*\.\d*)'")
- for s in l:
- m = r.match(s)
- if m:
- return m.group(1)
- return None
+inherit perl-version
def is_target(d):
if not bb.data.inherits_class('native', d):
return "yes"
return "no"
-PERLLIBDIRS = "${libdir}/perl"
-PERLLIBDIRS_class-native = "${libdir}/perl-native"
-PERLVERSION := "${@get_perl_version(d)}"
-PERLVERSION[vardepvalue] = ""
+PERLLIBDIRS = "${libdir}/perl5"
+PERLLIBDIRS_class-native = "${libdir}/perl5"
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 8e079e0d55..e9908ae4b8 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -10,14 +10,14 @@ EXTRA_PERLFLAGS ?= ""
export PERLCONFIGTARGET = "${@is_target(d)}"
# Env var which tells perl where the perl include files are
-export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
-export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
-export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
-export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}/"
+export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}/CORE"
+export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}"
+export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/"
+export PERLHOSTARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/${@get_perl_hostarch(d)}/"
cpan_do_configure () {
- export PERL5LIB="${PERL_ARCHLIB}"
- yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor ${EXTRA_CPANFLAGS}
+ yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 PERL=$(which perl) ${EXTRA_CPANFLAGS}
# Makefile.PLs can exit with success without generating a
# Makefile, e.g. in cases of missing configure time
@@ -28,7 +28,7 @@ cpan_do_configure () {
[ -e Makefile ] || bbfatal "No Makefile was generated by Makefile.PL"
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
- . ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh
+ . ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/config.sh
# Use find since there can be a Makefile generated for each Makefile.PL
for f in `find -name Makefile.PL`; do
f2=`echo $f | sed -e 's/.PL//'`
@@ -41,6 +41,16 @@ cpan_do_configure () {
fi
}
+do_configure_append_class-target() {
+ find . -name Makefile | xargs sed -E -i \
+ -e 's:LD_RUN_PATH ?= ?"?[^"]*"?::g'
+}
+
+do_configure_append_class-nativesdk() {
+ find . -name Makefile | xargs sed -E -i \
+ -e 's:LD_RUN_PATH ?= ?"?[^"]*"?::g'
+}
+
cpan_do_compile () {
oe_runmake PASTHRU_INC="${CFLAGS}" LD="${CCLD}"
}
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index fac074d610..f3fb4666ef 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -7,14 +7,15 @@ EXTRA_CPAN_BUILD_FLAGS ?= ""
# Env var which tells perl if it should use host (no) or target (yes) settings
export PERLCONFIGTARGET = "${@is_target(d)}"
-export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
-export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}/"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}"
+export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/"
+export PERLHOSTARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/${@get_perl_hostarch(d)}/"
export LD = "${CCLD}"
cpan_build_do_configure () {
if [ "${@is_target(d)}" = "yes" ]; then
# build for target
- . ${STAGING_LIBDIR}/perl/config.sh
+ . ${STAGING_LIBDIR}/perl5/config.sh
fi
perl Build.PL --installdirs vendor --destdir ${D} \
@@ -30,7 +31,7 @@ cpan_build_do_configure () {
}
cpan_build_do_compile () {
- perl Build verbose=1
+ perl Build --perl "${bindir}/perl" verbose=1
}
cpan_build_do_install () {
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 099c0daf42..f5c9f61595 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -8,6 +8,8 @@
# SDK packages are built either explicitly by the user,
# or indirectly via dependency. No need to be in 'world'.
EXCLUDE_FROM_WORLD = "1"
+NATIVESDKLIBC ?= "libc-glibc"
+LIBCOVERRIDE = ":${NATIVESDKLIBC}"
CLASSOVERRIDE = "class-cross-canadian"
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
@@ -15,32 +17,30 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
#
PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
-BASECANADIANEXTRAOS ?= "linux-uclibc linux-musl"
+BASECANADIANEXTRAOS ?= "linux-musl"
CANADIANEXTRAOS = "${BASECANADIANEXTRAOS}"
CANADIANEXTRAVENDOR = ""
MODIFYTOS ??= "1"
python () {
- archs = d.getVar('PACKAGE_ARCHS', True).split()
+ archs = d.getVar('PACKAGE_ARCHS').split()
sdkarchs = []
for arch in archs:
sdkarchs.append(arch + '-${SDKPKGSUFFIX}')
d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
# Allow the following code segment to be disabled, e.g. meta-environment
- if d.getVar("MODIFYTOS", True) != "1":
+ if d.getVar("MODIFYTOS") != "1":
return
- if d.getVar("TCLIBC", True) == "baremetal":
+ if d.getVar("TCLIBC") in [ 'baremetal', 'newlib' ]:
return
- tos = d.getVar("TARGET_OS", True)
+ tos = d.getVar("TARGET_OS")
whitelist = []
extralibcs = [""]
- if "uclibc" in d.getVar("BASECANADIANEXTRAOS", True):
- extralibcs.append("uclibc")
- if "musl" in d.getVar("BASECANADIANEXTRAOS", True):
+ if "musl" in d.getVar("BASECANADIANEXTRAOS"):
extralibcs.append("musl")
- for variant in ["", "spe", "x32", "eabi", "n32"]:
+ for variant in ["", "spe", "x32", "eabi", "n32", "_ilp32"]:
for libc in extralibcs:
entry = "linux"
if variant and libc:
@@ -51,45 +51,45 @@ python () {
entry = entry + "-" + libc
whitelist.append(entry)
if tos not in whitelist:
- bb.fatal("Building cross-candian for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS", True))
+ bb.fatal("Building cross-candian for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS"))
for n in ["PROVIDES", "DEPENDS"]:
- d.setVar(n, d.getVar(n, True))
- d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN", True))
+ d.setVar(n, d.getVar(n))
+ d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN"))
for prefix in ["AR", "AS", "DLLTOOL", "CC", "CXX", "GCC", "LD", "LIPO", "NM", "OBJDUMP", "RANLIB", "STRIP", "WINDRES"]:
n = prefix + "_FOR_TARGET"
- d.setVar(n, d.getVar(n, True))
+ d.setVar(n, d.getVar(n))
# This is a bit ugly. We need to zero LIBC/ABI extension which will change TARGET_OS
# however we need the old value in some variables. We expand those here first.
- tarch = d.getVar("TARGET_ARCH", True)
+ tarch = d.getVar("TARGET_ARCH")
if tarch == "x86_64":
d.setVar("LIBCEXTENSION", "")
d.setVar("ABIEXTENSION", "")
d.appendVar("CANADIANEXTRAOS", " linux-gnux32")
- for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
+ for extraos in d.getVar("BASECANADIANEXTRAOS").split():
d.appendVar("CANADIANEXTRAOS", " " + extraos + "x32")
elif tarch == "powerpc":
# PowerPC can build "linux" and "linux-gnuspe"
d.setVar("LIBCEXTENSION", "")
d.setVar("ABIEXTENSION", "")
d.appendVar("CANADIANEXTRAOS", " linux-gnuspe")
- for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
+ for extraos in d.getVar("BASECANADIANEXTRAOS").split():
d.appendVar("CANADIANEXTRAOS", " " + extraos + "spe")
elif tarch == "mips64":
d.appendVar("CANADIANEXTRAOS", " linux-gnun32")
- for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
+ for extraos in d.getVar("BASECANADIANEXTRAOS").split():
d.appendVar("CANADIANEXTRAOS", " " + extraos + "n32")
if tarch == "arm" or tarch == "armeb":
- d.appendVar("CANADIANEXTRAOS", " linux-musleabi linux-uclibceabi")
+ d.appendVar("CANADIANEXTRAOS", " linux-gnueabi linux-musleabi")
d.setVar("TARGET_OS", "linux-gnueabi")
else:
d.setVar("TARGET_OS", "linux")
# Also need to handle multilib target vendors
- vendors = d.getVar("CANADIANEXTRAVENDOR", True)
+ vendors = d.getVar("CANADIANEXTRAVENDOR")
if not vendors:
vendors = all_multilib_tune_values(d, 'TARGET_VENDOR')
- origvendor = d.getVar("TARGET_VENDOR_MULTILIB_ORIGINAL", True)
+ origvendor = d.getVar("TARGET_VENDOR_MULTILIB_ORIGINAL")
if origvendor:
d.setVar("TARGET_VENDOR", origvendor)
if origvendor not in vendors.split():
@@ -100,9 +100,9 @@ MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
INHIBIT_DEFAULT_DEPS = "1"
-STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}"
+STAGING_DIR_HOST = "${RECIPE_SYSROOT}"
-TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}"
+TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
PATH_append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}"
PKGHIST_DIR = "${TMPDIR}/pkghistory/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/"
@@ -116,7 +116,7 @@ HOST_LD_ARCH = "${SDK_LD_ARCH}"
HOST_AS_ARCH = "${SDK_AS_ARCH}"
#assign DPKG_ARCH
-DPKG_ARCH = "${@debian_arch_map(d.getVar('SDK_ARCH', True), '')}"
+DPKG_ARCH = "${@debian_arch_map(d.getVar('SDK_ARCH'), '')}"
CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
CFLAGS = "${BUILDSDK_CFLAGS}"
@@ -125,8 +125,6 @@ LDFLAGS = "${BUILDSDK_LDFLAGS} \
-Wl,-rpath-link,${STAGING_LIBDIR}/.. \
-Wl,-rpath,${libdir}/.. "
-DEPENDS_GETTEXT = "gettext-native nativesdk-gettext"
-
#
# We need chrpath >= 0.14 to ensure we can deal with 32 and 64 bit
# binaries
@@ -169,6 +167,7 @@ USE_NLS = "${SDKUSE_NLS}"
# and not any particular tune that is enabled.
TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
+PKGDATA_DIR = "${TMPDIR}/pkgdata/${SDK_SYS}"
# If MLPREFIX is set by multilib code, shlibs
# points to the wrong place so force it
SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs2"
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 8d1e7795aa..6dcddd6f2e 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -17,29 +17,40 @@ HOST_CC_ARCH = "${BUILD_CC_ARCH}"
HOST_LD_ARCH = "${BUILD_LD_ARCH}"
HOST_AS_ARCH = "${BUILD_AS_ARCH}"
-STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
+# No strip sysroot when DEBUG_BUILD is enabled
+INHIBIT_SYSROOT_STRIP ?= "${@oe.utils.vartrue('DEBUG_BUILD', '1', '', d)}"
+
+export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64"
+
+STAGING_DIR_HOST = "${RECIPE_SYSROOT_NATIVE}"
PACKAGE_ARCH = "${BUILD_ARCH}"
-MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
+MULTIMACH_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
export PKG_CONFIG_DIR = "${exec_prefix}/lib/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR = ""
+TARGET_CPPFLAGS = ""
+TARGET_CFLAGS = ""
+TARGET_CXXFLAGS = ""
+TARGET_LDFLAGS = ""
+
CPPFLAGS = "${BUILD_CPPFLAGS}"
CFLAGS = "${BUILD_CFLAGS}"
CXXFLAGS = "${BUILD_CFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
-LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE}"
TOOLCHAIN_OPTIONS = ""
-DEPENDS_GETTEXT = "gettext-native"
+# This class encodes staging paths into its scripts data so can only be
+# reused if we manipulate the paths.
+SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
# Path mangling needed by the cross packaging
# Note that we use := here to ensure that libdir and includedir are
# target paths.
-target_base_prefix := "${base_prefix}"
+target_base_prefix := "${root_prefix}"
target_prefix := "${prefix}"
target_exec_prefix := "${exec_prefix}"
target_base_libdir = "${target_base_prefix}/${baselib}"
@@ -81,3 +92,9 @@ export STRIP = "${BUILD_STRIP}"
export NM = "${BUILD_NM}"
inherit nopackages
+
+python do_addto_recipe_sysroot () {
+ bb.build.exec_func("extend_recipe_sysroot", d)
+}
+addtask addto_recipe_sysroot after do_populate_sysroot
+do_addto_recipe_sysroot[deptask] = "do_populate_sysroot"
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index 7315c38f13..c0c0bfee16 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -1,16 +1,21 @@
inherit cross
CLASSOVERRIDE = "class-crosssdk"
+NATIVESDKLIBC ?= "libc-glibc"
+LIBCOVERRIDE = ":${NATIVESDKLIBC}"
MACHINEOVERRIDES = ""
PACKAGE_ARCH = "${SDK_ARCH}"
python () {
- # set TUNE_PKGARCH to SDK_ARCH
- d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH', True))
+ # set TUNE_PKGARCH to SDK_ARCH
+ d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH'))
}
-STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}"
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+# This class encodes staging paths into its scripts data so can only be
+# reused if we manipulate the paths.
+SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
+
TARGET_ARCH = "${SDK_ARCH}"
TARGET_VENDOR = "${SDK_VENDOR}"
TARGET_OS = "${SDK_OS}"
@@ -18,8 +23,13 @@ TARGET_PREFIX = "${SDK_PREFIX}"
TARGET_CC_ARCH = "${SDK_CC_ARCH}"
TARGET_LD_ARCH = "${SDK_LD_ARCH}"
TARGET_AS_ARCH = "${SDK_AS_ARCH}"
+TARGET_CPPFLAGS = ""
+TARGET_CFLAGS = ""
+TARGET_CXXFLAGS = ""
+TARGET_LDFLAGS = ""
TARGET_FPU = ""
+
target_libdir = "${SDKPATHNATIVE}${libdir_nativesdk}"
target_includedir = "${SDKPATHNATIVE}${includedir_nativesdk}"
target_base_libdir = "${SDKPATHNATIVE}${base_libdir_nativesdk}"
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 8251ca7c97..01b3637469 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -20,11 +20,15 @@
# the only method to check against CVEs. Running this tool
# doesn't guarantee your packages are free of CVEs.
+# The product name that the CVE database uses. Defaults to BPN, but may need to
+# be overriden per recipe (for example tiff.bb sets CVE_PRODUCT=libtiff).
+CVE_PRODUCT ??= "${BPN}"
+CVE_VERSION ??= "${PV}"
+
CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
-CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd.db"
+CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_1.1.db"
-CVE_CHECK_LOCAL_DIR ?= "${WORKDIR}/cve"
-CVE_CHECK_LOCAL_FILE ?= "${CVE_CHECK_LOCAL_DIR}/cve.log"
+CVE_CHECK_LOG ?= "${T}/cve.log"
CVE_CHECK_TMP_FILE ?= "${TMPDIR}/cve_check"
CVE_CHECK_DIR ??= "${DEPLOY_DIR}/cve"
@@ -33,40 +37,40 @@ CVE_CHECK_COPY_FILES ??= "1"
CVE_CHECK_CREATE_MANIFEST ??= "1"
# Whitelist for packages (PN)
-CVE_CHECK_PN_WHITELIST = "\
- glibc-locale \
-"
+CVE_CHECK_PN_WHITELIST ?= ""
-# Whitelist for CVE and version of package
-CVE_CHECK_CVE_WHITELIST = "{\
- 'CVE-2014-2524': ('6.3',), \
-}"
+# Whitelist for CVE. If a CVE is found, then it is considered patched.
+# The value is a string containing space separated CVE values:
+#
+# CVE_CHECK_WHITELIST = 'CVE-2014-2524 CVE-2018-1234'
+#
+CVE_CHECK_WHITELIST ?= ""
python do_cve_check () {
"""
Check recipe for patched and unpatched CVEs
"""
- if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE", True)):
+ if os.path.exists(d.getVar("CVE_CHECK_DB_FILE")):
patched_cves = get_patches_cves(d)
patched, unpatched = check_cves(d, patched_cves)
if patched or unpatched:
cve_data = get_cve_info(d, patched + unpatched)
cve_write_data(d, patched, unpatched, cve_data)
else:
- bb.note("Failed to update CVE database, skipping CVE check")
+ bb.note("No CVE database found, skipping CVE check")
+
}
-addtask cve_check after do_unpack before do_build
-do_cve_check[depends] = "cve-check-tool-native:do_populate_cve_db"
+addtask cve_check before do_build
+do_cve_check[depends] = "cve-update-db-native:do_populate_cve_db"
do_cve_check[nostamp] = "1"
python cve_check_cleanup () {
"""
Delete the file used to gather all the CVE information.
"""
-
- bb.utils.remove(e.data.getVar("CVE_CHECK_TMP_FILE", True))
+ bb.utils.remove(e.data.getVar("CVE_CHECK_TMP_FILE"))
}
addhandler cve_check_cleanup
@@ -79,12 +83,17 @@ python cve_check_write_rootfs_manifest () {
import shutil
- if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE", True)):
+ if d.getVar("CVE_CHECK_COPY_FILES") == "1":
+ deploy_file = os.path.join(d.getVar("CVE_CHECK_DIR"), d.getVar("PN"))
+ if os.path.exists(deploy_file):
+ bb.utils.remove(deploy_file)
+
+ if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE")):
bb.note("Writing rootfs CVE manifest")
- deploy_dir = d.getVar("DEPLOY_DIR_IMAGE", True)
- link_name = d.getVar("IMAGE_LINK_NAME", True)
- manifest_name = d.getVar("CVE_CHECK_MANIFEST", True)
- cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE", True)
+ deploy_dir = d.getVar("DEPLOY_DIR_IMAGE")
+ link_name = d.getVar("IMAGE_LINK_NAME")
+ manifest_name = d.getVar("CVE_CHECK_MANIFEST")
+ cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
shutil.copyfile(cve_tmp_file, manifest_name)
@@ -92,14 +101,13 @@ python cve_check_write_rootfs_manifest () {
manifest_link = os.path.join(deploy_dir, "%s.cve" % link_name)
# If we already have another manifest, update symlinks
if os.path.exists(os.path.realpath(manifest_link)):
- if d.getVar('RM_OLD_IMAGE', True) == "1":
- os.remove(os.path.realpath(manifest_link))
os.remove(manifest_link)
os.symlink(os.path.basename(manifest_name), manifest_link)
bb.plain("Image CVE report stored in: %s" % manifest_name)
}
-ROOTFS_POSTPROCESS_COMMAND_prepend = "${@'cve_check_write_rootfs_manifest; ' if d.getVar('CVE_CHECK_CREATE_MANIFEST', True) == '1' else ''}"
+ROOTFS_POSTPROCESS_COMMAND_prepend = "${@'cve_check_write_rootfs_manifest; ' if d.getVar('CVE_CHECK_CREATE_MANIFEST') == '1' else ''}"
+do_rootfs[recrdeptask] += "${@'do_cve_check' if d.getVar('CVE_CHECK_CREATE_MANIFEST') == '1' else ''}"
def get_patches_cves(d):
"""
@@ -108,12 +116,26 @@ def get_patches_cves(d):
import re
- pn = d.getVar("PN", True)
+ pn = d.getVar("PN")
cve_match = re.compile("CVE:( CVE\-\d{4}\-\d+)+")
+
+ # Matches last CVE-1234-211432 in the file name, also if written
+ # with small letters. Not supporting multiple CVE id's in a single
+ # file name.
+ cve_file_name_match = re.compile(".*([Cc][Vv][Ee]\-\d{4}\-\d+)")
+
patched_cves = set()
bb.debug(2, "Looking for patches that solves CVEs for %s" % pn)
for url in src_patches(d):
patch_file = bb.fetch.decodeurl(url)[2]
+
+ # Check patch file name for CVE ID
+ fname_match = cve_file_name_match.search(patch_file)
+ if fname_match:
+ cve = fname_match.group(1).upper()
+ patched_cves.add(cve)
+ bb.debug(2, "Found CVE %s from patch file name %s" % (cve, patch_file))
+
with open(patch_file, "r", encoding="utf-8") as f:
try:
patch_text = f.read()
@@ -124,103 +146,138 @@ def get_patches_cves(d):
with open(patch_file, "r", encoding="iso8859-1") as f:
patch_text = f.read()
- # Search for the "CVE: " line
- match = cve_match.search(patch_text)
- if match:
+ # Search for one or more "CVE: " lines
+ text_match = False
+ for match in cve_match.finditer(patch_text):
# Get only the CVEs without the "CVE: " tag
cves = patch_text[match.start()+5:match.end()]
for cve in cves.split():
bb.debug(2, "Patch %s solves %s" % (patch_file, cve))
patched_cves.add(cve)
- else:
+ text_match = True
+
+ if not fname_match and not text_match:
bb.debug(2, "Patch %s doesn't solve CVEs" % patch_file)
return patched_cves
def check_cves(d, patched_cves):
"""
- Run cve-check-tool looking for patched and unpatched CVEs.
+ Connect to the NVD database and find unpatched cves.
"""
+ from distutils.version import LooseVersion
- import ast, csv, tempfile, subprocess, io
-
- cves_patched = []
cves_unpatched = []
- bpn = d.getVar("BPN", True)
- pv = d.getVar("PV", True).split("git+")[0]
- cves = " ".join(patched_cves)
- cve_db_dir = d.getVar("CVE_CHECK_DB_DIR", True)
- cve_whitelist = ast.literal_eval(d.getVar("CVE_CHECK_CVE_WHITELIST", True))
- cve_cmd = "cve-check-tool"
- cmd = [cve_cmd, "--no-html", "--csv", "--not-affected", "-t", "faux", "-d", cve_db_dir]
+ # CVE_PRODUCT can contain more than one product (eg. curl/libcurl)
+ products = d.getVar("CVE_PRODUCT").split()
+ # If this has been unset then we're not scanning for CVEs here (for example, image recipes)
+ if not products:
+ return ([], [])
+ pv = d.getVar("CVE_VERSION").split("+git")[0]
# If the recipe has been whitlisted we return empty lists
- if d.getVar("PN", True) in d.getVar("CVE_CHECK_PN_WHITELIST", True).split():
+ if d.getVar("PN") in d.getVar("CVE_CHECK_PN_WHITELIST").split():
bb.note("Recipe has been whitelisted, skipping check")
return ([], [])
- # It is needed to export the proxies to download the database using HTTP
- bb.utils.export_proxies(d)
-
- try:
- # Write the faux CSV file to be used with cve-check-tool
- fd, faux = tempfile.mkstemp(prefix="cve-faux-")
- with os.fdopen(fd, "w") as f:
- f.write("%s,%s,%s," % (bpn, pv, cves))
- cmd.append(faux)
-
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
- bb.debug(2, "Output of command %s:\n%s" % ("\n".join(cmd), output))
- except subprocess.CalledProcessError as e:
- bb.warn("Couldn't check for CVEs: %s (output %s)" % (e, e.output))
- finally:
- os.remove(faux)
-
- for row in csv.reader(io.StringIO(output)):
- # Third row has the unpatched CVEs
- if row[2]:
- for cve in row[2].split():
- # Skip if the CVE has been whitlisted for the current version
- if pv in cve_whitelist.get(cve,[]):
- bb.note("%s-%s has been whitelisted for %s" % (bpn, pv, cve))
+ old_cve_whitelist = d.getVar("CVE_CHECK_CVE_WHITELIST")
+ if old_cve_whitelist:
+ bb.warn("CVE_CHECK_CVE_WHITELIST is deprecated, please use CVE_CHECK_WHITELIST.")
+ cve_whitelist = d.getVar("CVE_CHECK_WHITELIST").split()
+
+ import sqlite3
+ db_file = d.expand("file:${CVE_CHECK_DB_FILE}?mode=ro")
+ conn = sqlite3.connect(db_file, uri=True)
+
+ # For each of the known product names (e.g. curl has CPEs using curl and libcurl)...
+ for product in products:
+ if ":" in product:
+ vendor, product = product.split(":", 1)
+ else:
+ vendor = "%"
+
+ # Find all relevant CVE IDs.
+ for cverow in conn.execute("SELECT DISTINCT ID FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR LIKE ?", (product, vendor)):
+ cve = cverow[0]
+
+ if cve in cve_whitelist:
+ bb.note("%s-%s has been whitelisted for %s" % (product, pv, cve))
+ # TODO: this should be in the report as 'whitelisted'
+ patched_cves.add(cve)
+ continue
+ elif cve in patched_cves:
+ bb.note("%s has been patched" % (cve))
+ continue
+
+ vulnerable = False
+ for row in conn.execute("SELECT * FROM PRODUCTS WHERE ID IS ? AND PRODUCT IS ? AND VENDOR LIKE ?", (cve, product, vendor)):
+ (_, _, _, version_start, operator_start, version_end, operator_end) = row
+ #bb.debug(2, "Evaluating row " + str(row))
+
+ if (operator_start == '=' and pv == version_start):
+ vulnerable = True
else:
+ if operator_start:
+ try:
+ vulnerable_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start))
+ vulnerable_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start))
+ except:
+ bb.warn("%s: Failed to compare %s %s %s for %s" %
+ (product, pv, operator_start, version_start, cve))
+ vulnerable_start = False
+ else:
+ vulnerable_start = False
+
+ if operator_end:
+ try:
+ vulnerable_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end))
+ vulnerable_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end))
+ except:
+ bb.warn("%s: Failed to compare %s %s %s for %s" %
+ (product, pv, operator_end, version_end, cve))
+ vulnerable_end = False
+ else:
+ vulnerable_end = False
+
+ if operator_start and operator_end:
+ vulnerable = vulnerable_start and vulnerable_end
+ else:
+ vulnerable = vulnerable_start or vulnerable_end
+
+ if vulnerable:
+ bb.note("%s-%s is vulnerable to %s" % (product, pv, cve))
cves_unpatched.append(cve)
- bb.debug(2, "%s-%s is not patched for %s" % (bpn, pv, cve))
- # Fourth row has patched CVEs
- if row[3]:
- for cve in row[3].split():
- cves_patched.append(cve)
- bb.debug(2, "%s-%s is patched for %s" % (bpn, pv, cve))
+ break
- return (cves_patched, cves_unpatched)
+ if not vulnerable:
+ bb.note("%s-%s is not vulnerable to %s" % (product, pv, cve))
+ # TODO: not patched but not vulnerable
+ patched_cves.add(cve)
+
+ conn.close()
+
+ return (list(patched_cves), cves_unpatched)
def get_cve_info(d, cves):
"""
- Get CVE information from the database used by cve-check-tool.
-
- Unfortunately the only way to get CVE info is set the output to
- html (hard to parse) or query directly the database.
+ Get CVE information from the database.
"""
- try:
- import sqlite3
- except ImportError:
- from pysqlite2 import dbapi2 as sqlite3
+ import sqlite3
cve_data = {}
- db_file = d.getVar("CVE_CHECK_DB_FILE", True)
- placeholder = ",".join("?" * len(cves))
- query = "SELECT * FROM NVD WHERE id IN (%s)" % placeholder
- conn = sqlite3.connect(db_file)
- cur = conn.cursor()
- for row in cur.execute(query, tuple(cves)):
- cve_data[row[0]] = {}
- cve_data[row[0]]["summary"] = row[1]
- cve_data[row[0]]["score"] = row[2]
- cve_data[row[0]]["modified"] = row[3]
- cve_data[row[0]]["vector"] = row[4]
- conn.close()
+ conn = sqlite3.connect(d.getVar("CVE_CHECK_DB_FILE"))
+ for cve in cves:
+ for row in conn.execute("SELECT * FROM NVD WHERE ID IS ?", (cve,)):
+ cve_data[row[0]] = {}
+ cve_data[row[0]]["summary"] = row[1]
+ cve_data[row[0]]["scorev2"] = row[2]
+ cve_data[row[0]]["scorev3"] = row[3]
+ cve_data[row[0]]["modified"] = row[4]
+ cve_data[row[0]]["vector"] = row[5]
+
+ conn.close()
return cve_data
def cve_write_data(d, patched, unpatched, cve_data):
@@ -229,39 +286,41 @@ def cve_write_data(d, patched, unpatched, cve_data):
CVE manifest if enabled.
"""
- cve_file = d.getVar("CVE_CHECK_LOCAL_FILE", True)
+ cve_file = d.getVar("CVE_CHECK_LOG")
nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId="
write_string = ""
- first_alert = True
- bb.utils.mkdirhier(d.getVar("CVE_CHECK_LOCAL_DIR", True))
+ unpatched_cves = []
+ bb.utils.mkdirhier(os.path.dirname(cve_file))
for cve in sorted(cve_data):
- write_string += "PACKAGE NAME: %s\n" % d.getVar("PN", True)
- write_string += "PACKAGE VERSION: %s\n" % d.getVar("PV", True)
+ write_string += "PACKAGE NAME: %s\n" % d.getVar("PN")
+ write_string += "PACKAGE VERSION: %s\n" % d.getVar("PV")
write_string += "CVE: %s\n" % cve
if cve in patched:
write_string += "CVE STATUS: Patched\n"
else:
+ unpatched_cves.append(cve)
write_string += "CVE STATUS: Unpatched\n"
- if first_alert:
- bb.warn("Found unpatched CVE, for more information check %s" % cve_file)
- first_alert = False
write_string += "CVE SUMMARY: %s\n" % cve_data[cve]["summary"]
- write_string += "CVSS v2 BASE SCORE: %s\n" % cve_data[cve]["score"]
+ write_string += "CVSS v2 BASE SCORE: %s\n" % cve_data[cve]["scorev2"]
+ write_string += "CVSS v3 BASE SCORE: %s\n" % cve_data[cve]["scorev3"]
write_string += "VECTOR: %s\n" % cve_data[cve]["vector"]
write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve)
+ if unpatched_cves:
+ bb.warn("Found unpatched CVE (%s), for more information check %s" % (" ".join(unpatched_cves),cve_file))
+
with open(cve_file, "w") as f:
bb.note("Writing file %s with CVE information" % cve_file)
f.write(write_string)
- if d.getVar("CVE_CHECK_COPY_FILES", True) == "1":
- cve_dir = d.getVar("CVE_CHECK_DIR", True)
+ if d.getVar("CVE_CHECK_COPY_FILES") == "1":
+ cve_dir = d.getVar("CVE_CHECK_DIR")
bb.utils.mkdirhier(cve_dir)
- deploy_file = os.path.join(cve_dir, d.getVar("PN", True))
+ deploy_file = os.path.join(cve_dir, d.getVar("PN"))
with open(deploy_file, "w") as f:
f.write(write_string)
- if d.getVar("CVE_CHECK_CREATE_MANIFEST", True) == "1":
- with open(d.getVar("CVE_CHECK_TMP_FILE", True), "a") as f:
+ if d.getVar("CVE_CHECK_CREATE_MANIFEST") == "1":
+ with open(d.getVar("CVE_CHECK_TMP_FILE"), "a") as f:
f.write("%s" % write_string)
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index be7cacca98..6f8a599ccb 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -20,22 +20,20 @@ do_package_write_tar[rdeptask] = "${DEBIANRDEP}"
do_package_write_rpm[rdeptask] = "${DEBIANRDEP}"
python () {
- if not d.getVar("PACKAGES", True):
+ if not d.getVar("PACKAGES"):
d.setVar("DEBIANRDEP", "")
}
python debian_package_name_hook () {
- import glob, copy, stat, errno, re
+ import glob, copy, stat, errno, re, pathlib, subprocess
- pkgdest = d.getVar('PKGDEST', True)
- packages = d.getVar('PACKAGES', True)
- bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$")
- lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$")
- so_re = re.compile("lib.*\.so")
+ pkgdest = d.getVar("PKGDEST")
+ packages = d.getVar('PACKAGES')
+ so_re = re.compile(r"lib.*\.so")
def socrunch(s):
s = s.lower().replace('_', '-')
- m = re.match("^(.*)(.)\.so\.(.*)$", s)
+ m = re.match(r"^(.*)(.)\.so\.(.*)$", s)
if m is None:
return None
if m.group(2) in '0123456789':
@@ -53,38 +51,45 @@ python debian_package_name_hook () {
return (s[stat.ST_MODE] & stat.S_IEXEC)
def add_rprovides(pkg, d):
- newpkg = d.getVar('PKG_' + pkg, True)
+ newpkg = d.getVar('PKG_' + pkg)
if newpkg and newpkg != pkg:
- provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split()
+ provs = (d.getVar('RPROVIDES_' + pkg) or "").split()
if pkg not in provs:
- d.appendVar('RPROVIDES_' + pkg, " " + pkg + " (=" + d.getVar("PKGV", True) + ")")
+ d.appendVar('RPROVIDES_' + pkg, " " + pkg + " (=" + d.getVar("PKGV") + ")")
def auto_libname(packages, orig_pkg):
+ p = lambda var: pathlib.PurePath(d.getVar(var))
+ libdirs = (p("base_libdir"), p("libdir"))
+ bindirs = (p("base_bindir"), p("base_sbindir"), p("bindir"), p("sbindir"))
+
sonames = []
has_bins = 0
has_libs = 0
- for file in pkgfiles[orig_pkg]:
- root = os.path.dirname(file)
- if bin_re.match(root):
+ for f in pkgfiles[orig_pkg]:
+ # This is .../packages-split/orig_pkg/
+ pkgpath = pathlib.PurePath(pkgdest, orig_pkg)
+ # Strip pkgpath off the full path to a file in the package, re-root
+ # so it is absolute, and then get the parent directory of the file.
+ path = pathlib.PurePath("/") / (pathlib.PurePath(f).relative_to(pkgpath).parent)
+ if path in bindirs:
has_bins = 1
- if lib_re.match(root):
+ if path in libdirs:
has_libs = 1
- if so_re.match(os.path.basename(file)):
- cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + file + " 2>/dev/null"
- fd = os.popen(cmd)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- m = re.match("\s+SONAME\s+([^\s]*)", l)
- if m and not m.group(1) in sonames:
- sonames.append(m.group(1))
-
+ if so_re.match(os.path.basename(f)):
+ try:
+ cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f]
+ output = subprocess.check_output(cmd).decode("utf-8")
+ for m in re.finditer(r"\s+SONAME\s+([^\s]+)", output):
+ if m.group(1) not in sonames:
+ sonames.append(m.group(1))
+ except subprocess.CalledProcessError:
+ pass
bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames))
soname = None
if len(sonames) == 1:
soname = sonames[0]
elif len(sonames) > 1:
- lead = d.getVar('LEAD_SONAME', True)
+ lead = d.getVar('LEAD_SONAME')
if lead:
r = re.compile(lead)
filtered = []
@@ -115,11 +120,12 @@ python debian_package_name_hook () {
newpkg = pkgname
else:
newpkg = pkg.replace(orig_pkg, devname, 1)
- mlpre=d.getVar('MLPREFIX', True)
+ mlpre=d.getVar('MLPREFIX')
if mlpre:
if not newpkg.find(mlpre) == 0:
newpkg = mlpre + newpkg
if newpkg != pkg:
+ bb.note("debian: renaming %s to %s" % (pkg, newpkg))
d.setVar('PKG_' + pkg, newpkg)
add_rprovides(pkg, d)
else:
@@ -131,11 +137,10 @@ python debian_package_name_hook () {
# and later
# DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw
# so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5
- for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', True) or "").split(), reverse=True):
+ for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS') or "").split(), reverse=True):
auto_libname(packages, pkg)
}
EXPORT_FUNCTIONS package_name_hook
DEBIAN_NAMES = "1"
-
diff --git a/meta/classes/deploy.bbclass b/meta/classes/deploy.bbclass
index 8ad07da015..6d52908783 100644
--- a/meta/classes/deploy.bbclass
+++ b/meta/classes/deploy.bbclass
@@ -8,4 +8,4 @@ python do_deploy_setscene () {
}
addtask do_deploy_setscene
do_deploy[dirs] = "${DEPLOYDIR} ${B}"
-do_deploy[stamp-extra-info] = "${MACHINE}"
+do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
diff --git a/meta/classes/devicetree.bbclass b/meta/classes/devicetree.bbclass
new file mode 100644
index 0000000000..d8779c7943
--- /dev/null
+++ b/meta/classes/devicetree.bbclass
@@ -0,0 +1,148 @@
+# This bbclass implements device tree compliation for user provided device tree
+# sources. The compilation of the device tree sources is the same as the kernel
+# device tree compilation process, this includes being able to include sources
+# from the kernel such as soc dtsi files or header files such as gpio.h. In
+# addition to device trees this bbclass also handles compilation of device tree
+# overlays.
+#
+# The output of this class behaves similar to how kernel-devicetree.bbclass
+# operates in that the output files are installed into /boot/devicetree.
+# However this class on purpose separates the deployed device trees into the
+# 'devicetree' subdirectory. This prevents clashes with the kernel-devicetree
+# output. Additionally the device trees are populated into the sysroot for
+# access via the sysroot from within other recipes.
+
+SECTION ?= "bsp"
+
+# The default inclusion of kernel device tree includes and headers means that
+# device trees built with them are at least GPLv2 (and in some cases dual
+# licensed). Default to GPLv2 if the recipe does not specify a license.
+LICENSE ?= "GPLv2"
+LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "dtc-native"
+
+inherit deploy kernel-arch
+
+COMPATIBLE_MACHINE ?= "^$"
+
+PROVIDES = "virtual/dtb"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SYSROOT_DIRS += "/boot/devicetree"
+FILES_${PN} = "/boot/devicetree/*.dtb /boot/devicetree/*.dtbo"
+
+S = "${WORKDIR}"
+B = "${WORKDIR}/build"
+
+# Default kernel includes, these represent what are normally used for in-kernel
+# sources.
+KERNEL_INCLUDE ??= " \
+ ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts \
+ ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/* \
+ ${STAGING_KERNEL_DIR}/scripts/dtc/include-prefixes \
+ "
+
+DT_INCLUDE[doc] = "Search paths to be made available to both the device tree compiler and preprocessor for inclusion."
+DT_INCLUDE ?= "${DT_FILES_PATH} ${KERNEL_INCLUDE}"
+DT_FILES_PATH[doc] = "Defaults to source directory, can be used to select dts files that are not in source (e.g. generated)."
+DT_FILES_PATH ?= "${S}"
+
+DT_PADDING_SIZE[doc] = "Size of padding on the device tree blob, used as extra space typically for additional properties during boot."
+DT_PADDING_SIZE ??= "0x3000"
+DT_RESERVED_MAP[doc] = "Number of reserved map entires."
+DT_RESERVED_MAP ??= "8"
+DT_BOOT_CPU[doc] = "The boot cpu, defaults to 0"
+DT_BOOT_CPU ??= "0"
+
+DTC_FLAGS ?= "-R ${DT_RESERVED_MAP} -b ${DT_BOOT_CPU}"
+DTC_PPFLAGS ?= "-nostdinc -undef -D__DTS__ -x assembler-with-cpp"
+DTC_BFLAGS ?= "-p ${DT_PADDING_SIZE}"
+DTC_OFLAGS ?= "-p 0 -@ -H epapr"
+
+python () {
+ if d.getVar("KERNEL_INCLUDE"):
+ # auto add dependency on kernel tree, but only if kernel include paths
+ # are specified.
+ d.appendVarFlag("do_compile", "depends", " virtual/kernel:do_configure")
+}
+
+def expand_includes(varname, d):
+ import glob
+ includes = set()
+ # expand all includes with glob
+ for i in (d.getVar(varname) or "").split():
+ for g in glob.glob(i):
+ if os.path.isdir(g): # only add directories to include path
+ includes.add(g)
+ return includes
+
+def devicetree_source_is_overlay(path):
+ # determine if a dts file is an overlay by checking if it uses "/plugin/;"
+ with open(path, "r") as f:
+ for i in f:
+ if i.startswith("/plugin/;"):
+ return True
+ return False
+
+def devicetree_compile(dtspath, includes, d):
+ import subprocess
+ dts = os.path.basename(dtspath)
+ dtname = os.path.splitext(dts)[0]
+ bb.note("Processing {0} [{1}]".format(dtname, dts))
+
+ # preprocess
+ ppargs = d.getVar("BUILD_CPP").split()
+ ppargs += (d.getVar("DTC_PPFLAGS") or "").split()
+ for i in includes:
+ ppargs.append("-I{0}".format(i))
+ ppargs += ["-o", "{0}.pp".format(dts), dtspath]
+ bb.note("Running {0}".format(" ".join(ppargs)))
+ subprocess.run(ppargs, check = True)
+
+ # determine if the file is an overlay or not (using the preprocessed file)
+ isoverlay = devicetree_source_is_overlay("{0}.pp".format(dts))
+
+ # compile
+ dtcargs = ["dtc"] + (d.getVar("DTC_FLAGS") or "").split()
+ if isoverlay:
+ dtcargs += (d.getVar("DTC_OFLAGS") or "").split()
+ else:
+ dtcargs += (d.getVar("DTC_BFLAGS") or "").split()
+ for i in includes:
+ dtcargs += ["-i", i]
+ dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")]
+ dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)]
+ bb.note("Running {0}".format(" ".join(dtcargs)))
+ subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+
+python devicetree_do_compile() {
+ includes = expand_includes("DT_INCLUDE", d)
+ listpath = d.getVar("DT_FILES_PATH")
+ for dts in os.listdir(listpath):
+ dtspath = os.path.join(listpath, dts)
+ try:
+ if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)):
+ continue # skip non-.dts files and non-overlay files
+ except:
+ continue # skip if can't determine if overlay
+ devicetree_compile(dtspath, includes, d)
+}
+
+devicetree_do_install() {
+ for DTB_FILE in `ls *.dtb *.dtbo`; do
+ install -Dm 0644 ${B}/${DTB_FILE} ${D}/boot/devicetree/${DTB_FILE}
+ done
+}
+
+devicetree_do_deploy() {
+ for DTB_FILE in `ls *.dtb *.dtbo`; do
+ install -Dm 0644 ${B}/${DTB_FILE} ${DEPLOYDIR}/devicetree/${DTB_FILE}
+ done
+}
+addtask deploy before do_build after do_install
+
+EXPORT_FUNCTIONS do_compile do_install do_deploy
+
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index be71aff35f..fdf7dc100f 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -3,19 +3,19 @@ inherit terminal
DEVSHELL = "${SHELL}"
python do_devshell () {
- if d.getVarFlag("do_devshell", "manualfakeroot", True):
+ if d.getVarFlag("do_devshell", "manualfakeroot"):
d.prependVar("DEVSHELL", "pseudo ")
- fakeenv = d.getVar("FAKEROOTENV", True).split()
+ fakeenv = d.getVar("FAKEROOTENV").split()
for f in fakeenv:
k = f.split("=")
- d.setVar(k[0], k[1])
+ d.setVar(k[0], k[1])
d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0])
d.delVarFlag("do_devshell", "fakeroot")
- oe_terminal(d.getVar('DEVSHELL', True), 'OpenEmbedded Developer Shell', d)
+ oe_terminal(d.getVar('DEVSHELL'), 'OpenEmbedded Developer Shell', d)
}
-addtask devshell after do_patch
+addtask devshell after do_patch do_prepare_recipe_sysroot
# The directory that the terminal starts in
DEVSHELL_STARTDIR ?= "${S}"
@@ -27,7 +27,7 @@ do_devshell[nostamp] = "1"
# be done as the normal user. We therfore carefully construct the envionment
# manually
python () {
- if d.getVarFlag("do_devshell", "fakeroot", True):
+ if d.getVarFlag("do_devshell", "fakeroot"):
# We need to signal our code that we want fakeroot however we
# can't manipulate the environment and variables here yet (see YOCTO #4795)
d.setVarFlag("do_devshell", "manualfakeroot", "1")
@@ -49,7 +49,7 @@ def devpyshell(d):
old[3] = old[3] &~ termios.ECHO &~ termios.ICANON
# &~ termios.ISIG
termios.tcsetattr(fd, termios.TCSADRAIN, old)
-
+
# No echo or buffering over the pty
noechoicanon(s)
@@ -82,7 +82,7 @@ def devpyshell(d):
more = False
i = code.InteractiveInterpreter(locals=_context)
- print("OE PyShell (PN = %s)\n" % d.getVar("PN", True))
+ print("OE PyShell (PN = %s)\n" % d.getVar("PN"))
def prompt(more):
if more:
@@ -145,7 +145,7 @@ python do_devpyshell() {
try:
devpyshell(d)
except SystemExit:
- # Stop the SIGTERM above causing an error exit code
+ # Stop the SIGTERM above causing an error exit code
return
finally:
return
diff --git a/meta/classes/devtool-source.bbclass b/meta/classes/devtool-source.bbclass
new file mode 100644
index 0000000000..280d6009f3
--- /dev/null
+++ b/meta/classes/devtool-source.bbclass
@@ -0,0 +1,233 @@
+# Development tool - source extraction helper class
+#
+# NOTE: this class is intended for use by devtool and should not be
+# inherited manually.
+#
+# Copyright (C) 2014-2017 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+DEVTOOL_TEMPDIR ?= ""
+DEVTOOL_PATCH_SRCDIR = "${DEVTOOL_TEMPDIR}/patchworkdir"
+
+
+python() {
+ tempdir = d.getVar('DEVTOOL_TEMPDIR')
+
+ if not tempdir:
+ bb.fatal('devtool-source class is for internal use by devtool only')
+
+ # Make a subdir so we guard against WORKDIR==S
+ workdir = os.path.join(tempdir, 'workdir')
+ d.setVar('WORKDIR', workdir)
+ if not d.getVar('S').startswith(workdir):
+ # Usually a shared workdir recipe (kernel, gcc)
+ # Try to set a reasonable default
+ if bb.data.inherits_class('kernel', d):
+ d.setVar('S', '${WORKDIR}/source')
+ else:
+ d.setVar('S', '${WORKDIR}/%s' % os.path.basename(d.getVar('S')))
+ if bb.data.inherits_class('kernel', d):
+ # We don't want to move the source to STAGING_KERNEL_DIR here
+ d.setVar('STAGING_KERNEL_DIR', '${S}')
+
+ d.setVar('STAMPS_DIR', os.path.join(tempdir, 'stamps'))
+ d.setVar('T', os.path.join(tempdir, 'temp'))
+
+ # Hook in pre/postfuncs
+ is_kernel_yocto = bb.data.inherits_class('kernel-yocto', d)
+ if is_kernel_yocto:
+ unpacktask = 'do_kernel_checkout'
+ d.appendVarFlag('do_configure', 'postfuncs', ' devtool_post_configure')
+ else:
+ unpacktask = 'do_unpack'
+ d.appendVarFlag(unpacktask, 'postfuncs', ' devtool_post_unpack')
+ d.prependVarFlag('do_patch', 'prefuncs', ' devtool_pre_patch')
+ d.appendVarFlag('do_patch', 'postfuncs', ' devtool_post_patch')
+
+ # NOTE: in order for the patch stuff to be fully functional,
+ # PATCHTOOL and PATCH_COMMIT_FUNCTIONS need to be set; we can't
+ # do that here because we can't guarantee the order of the anonymous
+ # functions, so it gets done in the bbappend we create.
+}
+
+
+python devtool_post_unpack() {
+ import oe.recipeutils
+ import shutil
+ sys.path.insert(0, os.path.join(d.getVar('COREBASE'), 'scripts', 'lib'))
+ import scriptutils
+ from devtool import setup_git_repo
+
+ tempdir = d.getVar('DEVTOOL_TEMPDIR')
+ workdir = d.getVar('WORKDIR')
+ srcsubdir = d.getVar('S')
+
+ def _move_file(src, dst):
+ """Move a file. Creates all the directory components of destination path."""
+ dst_d = os.path.dirname(dst)
+ if dst_d:
+ bb.utils.mkdirhier(dst_d)
+ shutil.move(src, dst)
+
+ def _ls_tree(directory):
+ """Recursive listing of files in a directory"""
+ ret = []
+ for root, dirs, files in os.walk(directory):
+ ret.extend([os.path.relpath(os.path.join(root, fname), directory) for
+ fname in files])
+ return ret
+
+ is_kernel_yocto = bb.data.inherits_class('kernel-yocto', d)
+ # Move local source files into separate subdir
+ recipe_patches = [os.path.basename(patch) for patch in
+ oe.recipeutils.get_recipe_patches(d)]
+ local_files = oe.recipeutils.get_recipe_local_files(d)
+
+ if is_kernel_yocto:
+ for key in [f for f in local_files if f.endswith('scc')]:
+ with open(local_files[key], 'r') as sccfile:
+ for l in sccfile:
+ line = l.split()
+ if line and line[0] in ('kconf', 'patch'):
+ cfg = os.path.join(os.path.dirname(local_files[key]), line[-1])
+ if cfg not in local_files.values():
+ local_files[line[-1]] = cfg
+ shutil.copy2(cfg, workdir)
+
+ # Ignore local files with subdir={BP}
+ srcabspath = os.path.abspath(srcsubdir)
+ local_files = [fname for fname in local_files if
+ os.path.exists(os.path.join(workdir, fname)) and
+ (srcabspath == workdir or not
+ os.path.join(workdir, fname).startswith(srcabspath +
+ os.sep))]
+ if local_files:
+ for fname in local_files:
+ _move_file(os.path.join(workdir, fname),
+ os.path.join(tempdir, 'oe-local-files', fname))
+ with open(os.path.join(tempdir, 'oe-local-files', '.gitignore'),
+ 'w') as f:
+ f.write('# Ignore local files, by default. Remove this file '
+ 'if you want to commit the directory to Git\n*\n')
+
+ if srcsubdir == workdir:
+ # Find non-patch non-local sources that were "unpacked" to srctree
+ # directory
+ src_files = [fname for fname in _ls_tree(workdir) if
+ os.path.basename(fname) not in recipe_patches]
+ srcsubdir = d.getVar('DEVTOOL_PATCH_SRCDIR')
+ # Move source files to S
+ for path in src_files:
+ _move_file(os.path.join(workdir, path),
+ os.path.join(srcsubdir, path))
+ elif os.path.dirname(srcsubdir) != workdir:
+ # Handle if S is set to a subdirectory of the source
+ srcsubdir = os.path.join(workdir, os.path.relpath(srcsubdir, workdir).split(os.sep)[0])
+
+ scriptutils.git_convert_standalone_clone(srcsubdir)
+
+ # Make sure that srcsubdir exists
+ bb.utils.mkdirhier(srcsubdir)
+ if not os.listdir(srcsubdir):
+ bb.warn("No source unpacked to S - either the %s recipe "
+ "doesn't use any source or the correct source "
+ "directory could not be determined" % d.getVar('PN'))
+
+ devbranch = d.getVar('DEVTOOL_DEVBRANCH')
+ setup_git_repo(srcsubdir, d.getVar('PV'), devbranch, d=d)
+
+ (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srcsubdir)
+ initial_rev = stdout.rstrip()
+ with open(os.path.join(tempdir, 'initial_rev'), 'w') as f:
+ f.write(initial_rev)
+
+ with open(os.path.join(tempdir, 'srcsubdir'), 'w') as f:
+ f.write(srcsubdir)
+}
+
+python devtool_pre_patch() {
+ if d.getVar('S') == d.getVar('WORKDIR'):
+ d.setVar('S', '${DEVTOOL_PATCH_SRCDIR}')
+}
+
+python devtool_post_patch() {
+ import shutil
+ tempdir = d.getVar('DEVTOOL_TEMPDIR')
+ with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
+ srcsubdir = f.read()
+ with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
+ initial_rev = f.read()
+
+ def rm_patches():
+ patches_dir = os.path.join(srcsubdir, 'patches')
+ if os.path.exists(patches_dir):
+ shutil.rmtree(patches_dir)
+ # Restore any "patches" directory that was actually part of the source tree
+ try:
+ bb.process.run('git checkout -- patches', cwd=srcsubdir)
+ except bb.process.ExecutionError:
+ pass
+
+ extra_overrides = d.getVar('DEVTOOL_EXTRA_OVERRIDES')
+ if extra_overrides:
+ extra_overrides = set(extra_overrides.split(':'))
+ devbranch = d.getVar('DEVTOOL_DEVBRANCH')
+ default_overrides = d.getVar('OVERRIDES').split(':')
+ no_overrides = []
+ # First, we may have some overrides that are referred to in the recipe set in
+ # our configuration, so we need to make a branch that excludes those
+ for override in default_overrides:
+ if override not in extra_overrides:
+ no_overrides.append(override)
+ if default_overrides != no_overrides:
+ # Some overrides are active in the current configuration, so
+ # we need to create a branch where none of the overrides are active
+ bb.process.run('git checkout %s -b devtool-no-overrides' % initial_rev, cwd=srcsubdir)
+ # Run do_patch function with the override applied
+ localdata = bb.data.createCopy(d)
+ localdata.setVar('OVERRIDES', ':'.join(no_overrides))
+ bb.build.exec_func('do_patch', localdata)
+ rm_patches()
+ # Now we need to reconcile the dev branch with the no-overrides one
+ # (otherwise we'd likely be left with identical commits that have different hashes)
+ bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir)
+ bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir)
+ else:
+ bb.process.run('git checkout %s -b devtool-no-overrides' % devbranch, cwd=srcsubdir)
+
+ for override in extra_overrides:
+ localdata = bb.data.createCopy(d)
+ if override in default_overrides:
+ bb.process.run('git branch devtool-override-%s %s' % (override, devbranch), cwd=srcsubdir)
+ else:
+ # Reset back to the initial commit on a new branch
+ bb.process.run('git checkout %s -b devtool-override-%s' % (initial_rev, override), cwd=srcsubdir)
+ # Run do_patch function with the override applied
+ localdata.appendVar('OVERRIDES', ':%s' % override)
+ bb.build.exec_func('do_patch', localdata)
+ rm_patches()
+ # Now we need to reconcile the new branch with the no-overrides one
+ # (otherwise we'd likely be left with identical commits that have different hashes)
+ bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir)
+ bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir)
+ bb.process.run('git tag -f devtool-patched', cwd=srcsubdir)
+}
+
+python devtool_post_configure() {
+ import shutil
+ tempdir = d.getVar('DEVTOOL_TEMPDIR')
+ shutil.copy2(os.path.join(d.getVar('B'), '.config'), tempdir)
+}
diff --git a/meta/classes/devupstream.bbclass b/meta/classes/devupstream.bbclass
new file mode 100644
index 0000000000..7780c5482c
--- /dev/null
+++ b/meta/classes/devupstream.bbclass
@@ -0,0 +1,48 @@
+# Class for use in BBCLASSEXTEND to make it easier to have a single recipe that
+# can build both stable tarballs and snapshots from upstream source
+# repositories.
+#
+# Usage:
+# BBCLASSEXTEND = "devupstream:target"
+# SRC_URI_class-devupstream = "git://git.example.com/example"
+# SRCREV_class-devupstream = "abcdef"
+#
+# If the first entry in SRC_URI is a git: URL then S is rewritten to
+# WORKDIR/git.
+#
+# There are a few caveats that remain to be solved:
+# - You can't build native or nativesdk recipes using for example
+# devupstream:native, you can only build target recipes.
+# - If the fetcher requires native tools (such as subversion-native) then
+# bitbake won't be able to add them automatically.
+
+CLASSOVERRIDE .= ":class-devupstream"
+
+python devupstream_virtclass_handler () {
+ # Do nothing if this is inherited, as it's for BBCLASSEXTEND
+ if "devupstream" not in (d.getVar('BBCLASSEXTEND') or ""):
+ bb.error("Don't inherit devupstream, use BBCLASSEXTEND")
+ return
+
+ variant = d.getVar("BBEXTENDVARIANT")
+ if variant not in ("target"):
+ bb.error("Pass the variant when using devupstream, for example devupstream:target")
+ return
+
+ # Develpment releases are never preferred by default
+ d.setVar("DEFAULT_PREFERENCE", "-1")
+
+ uri = bb.fetch2.URI(d.getVar("SRC_URI").split()[0])
+
+ if uri.scheme == "git":
+ d.setVar("S", "${WORKDIR}/git")
+
+ # Modify the PV if the recipe hasn't already overridden it
+ pv = d.getVar("PV")
+ proto_marker = "+" + uri.scheme
+ if proto_marker not in pv:
+ d.setVar("PV", pv + proto_marker + "${SRCPV}")
+}
+
+addhandler devupstream_virtclass_handler
+devupstream_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
diff --git a/meta/classes/distro_features_check.bbclass b/meta/classes/distro_features_check.bbclass
index 7e91dbcf4a..8124a8ca27 100644
--- a/meta/classes/distro_features_check.bbclass
+++ b/meta/classes/distro_features_check.bbclass
@@ -1,37 +1,7 @@
-# Allow checking of required and conflicting DISTRO_FEATURES
-#
-# ANY_OF_DISTRO_FEATURES: ensure at least one item on this list is included
-# in DISTRO_FEATURES.
-# REQUIRED_DISTRO_FEATURES: ensure every item on this list is included
-# in DISTRO_FEATURES.
-# CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in
-# DISTRO_FEATURES.
-#
-# Copyright 2013 (C) O.S. Systems Software LTDA.
+# Temporarily provide fallback to the old name of the class
-python () {
- # Assume at least one var is set.
- distro_features = (d.getVar('DISTRO_FEATURES', True) or "").split()
-
- any_of_distro_features = d.getVar('ANY_OF_DISTRO_FEATURES', True)
- if any_of_distro_features:
- any_of_distro_features = any_of_distro_features.split()
- if set.isdisjoint(set(any_of_distro_features),set(distro_features)):
- raise bb.parse.SkipPackage("one of '%s' needs to be in DISTRO_FEATURES" % any_of_distro_features)
-
- required_distro_features = d.getVar('REQUIRED_DISTRO_FEATURES', True)
- if required_distro_features:
- required_distro_features = required_distro_features.split()
- for f in required_distro_features:
- if f in distro_features:
- continue
- else:
- raise bb.parse.SkipPackage("missing required distro feature '%s' (not in DISTRO_FEATURES)" % f)
-
- conflict_distro_features = d.getVar('CONFLICT_DISTRO_FEATURES', True)
- if conflict_distro_features:
- conflict_distro_features = conflict_distro_features.split()
- for f in conflict_distro_features:
- if f in distro_features:
- raise bb.parse.SkipPackage("conflicting distro feature '%s' (in DISTRO_FEATURES)" % f)
+python __anonymous() {
+ bb.warn("distro_features_check.bbclass is deprecated, please use features_check.bbclass instead")
}
+
+inherit features_check
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
deleted file mode 100644
index fbb7402e0c..0000000000
--- a/meta/classes/distrodata.bbclass
+++ /dev/null
@@ -1,479 +0,0 @@
-include conf/distro/include/upstream_tracking.inc
-include conf/distro/include/distro_alias.inc
-include conf/distro/include/maintainers.inc
-
-addhandler distro_eventhandler
-distro_eventhandler[eventmask] = "bb.event.BuildStarted"
-python distro_eventhandler() {
- import oe.distro_check as dc
- import csv
- logfile = dc.create_log_file(e.data, "distrodata.csv")
-
- lf = bb.utils.lockfile("%s.lock" % logfile)
- with open(logfile, "a") as f:
- writer = csv.writer(f)
- writer.writerow(['Package', 'Description', 'Owner', 'License',
- 'VerMatch', 'Version', 'Upstream', 'Reason', 'Recipe Status',
- 'Distro 1', 'Distro 2', 'Distro 3'])
- f.close()
- bb.utils.unlockfile(lf)
-
- return
-}
-
-addtask distrodata_np
-do_distrodata_np[nostamp] = "1"
-python do_distrodata_np() {
- localdata = bb.data.createCopy(d)
- pn = d.getVar("PN", True)
- bb.note("Package Name: %s" % pn)
-
- import oe.distro_check as dist_check
- tmpdir = d.getVar('TMPDIR', True)
- distro_check_dir = os.path.join(tmpdir, "distro_check")
- datetime = localdata.getVar('DATETIME', True)
- dist_check.update_distro_data(distro_check_dir, datetime, localdata)
-
- if pn.find("-native") != -1:
- pnstripped = pn.split("-native")
- bb.note("Native Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pn.find("-cross") != -1:
- pnstripped = pn.split("-cross")
- bb.note("cross Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pn.find("-crosssdk") != -1:
- pnstripped = pn.split("-crosssdk")
- bb.note("cross Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pn.startswith("nativesdk-"):
- pnstripped = pn.replace("nativesdk-", "")
- bb.note("NativeSDK Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
-
- if pn.find("-initial") != -1:
- pnstripped = pn.split("-initial")
- bb.note("initial Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- """generate package information from .bb file"""
- pname = localdata.getVar('PN', True)
- pcurver = localdata.getVar('PV', True)
- pdesc = localdata.getVar('DESCRIPTION', True)
- if pdesc is not None:
- pdesc = pdesc.replace(',','')
- pdesc = pdesc.replace('\n','')
-
- pgrp = localdata.getVar('SECTION', True)
- plicense = localdata.getVar('LICENSE', True).replace(',','_')
-
- rstatus = localdata.getVar('RECIPE_COLOR', True)
- if rstatus is not None:
- rstatus = rstatus.replace(',','')
-
- pupver = localdata.getVar('RECIPE_UPSTREAM_VERSION', True)
- if pcurver == pupver:
- vermatch="1"
- else:
- vermatch="0"
- noupdate_reason = localdata.getVar('RECIPE_NO_UPDATE_REASON', True)
- if noupdate_reason is None:
- noupdate="0"
- else:
- noupdate="1"
- noupdate_reason = noupdate_reason.replace(',','')
-
- maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
- rlrd = localdata.getVar('RECIPE_UPSTREAM_DATE', True)
- result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata)
-
- bb.note("DISTRO: %s,%s,%s,%s,%s,%s,%s,%s,%s\n" % \
- (pname, pdesc, maintainer, plicense, vermatch, pcurver, pupver, noupdate_reason, rstatus))
- line = pn
- for i in result:
- line = line + "," + i
- bb.note("%s\n" % line)
-}
-do_distrodata_np[vardepsexclude] = "DATETIME"
-
-addtask distrodata
-do_distrodata[nostamp] = "1"
-python do_distrodata() {
- import csv
- logpath = d.getVar('LOG_DIR', True)
- bb.utils.mkdirhier(logpath)
- logfile = os.path.join(logpath, "distrodata.csv")
-
- import oe.distro_check as dist_check
- localdata = bb.data.createCopy(d)
- tmpdir = d.getVar('TMPDIR', True)
- distro_check_dir = os.path.join(tmpdir, "distro_check")
- datetime = localdata.getVar('DATETIME', True)
- dist_check.update_distro_data(distro_check_dir, datetime, localdata)
-
- pn = d.getVar("PN", True)
- bb.note("Package Name: %s" % pn)
-
- if pn.find("-native") != -1:
- pnstripped = pn.split("-native")
- bb.note("Native Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pn.startswith("nativesdk-"):
- pnstripped = pn.replace("nativesdk-", "")
- bb.note("NativeSDK Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pn.find("-cross") != -1:
- pnstripped = pn.split("-cross")
- bb.note("cross Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pn.find("-crosssdk") != -1:
- pnstripped = pn.split("-crosssdk")
- bb.note("cross Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pn.find("-initial") != -1:
- pnstripped = pn.split("-initial")
- bb.note("initial Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- """generate package information from .bb file"""
- pname = localdata.getVar('PN', True)
- pcurver = localdata.getVar('PV', True)
- pdesc = localdata.getVar('DESCRIPTION', True)
- if pdesc is not None:
- pdesc = pdesc.replace(',','')
- pdesc = pdesc.replace('\n','')
-
- pgrp = localdata.getVar('SECTION', True)
- plicense = localdata.getVar('LICENSE', True).replace(',','_')
-
- rstatus = localdata.getVar('RECIPE_COLOR', True)
- if rstatus is not None:
- rstatus = rstatus.replace(',','')
-
- pupver = localdata.getVar('RECIPE_UPSTREAM_VERSION', True)
- if pcurver == pupver:
- vermatch="1"
- else:
- vermatch="0"
-
- noupdate_reason = localdata.getVar('RECIPE_NO_UPDATE_REASON', True)
- if noupdate_reason is None:
- noupdate="0"
- else:
- noupdate="1"
- noupdate_reason = noupdate_reason.replace(',','')
-
- maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
- rlrd = localdata.getVar('RECIPE_UPSTREAM_DATE', True)
- # do the comparison
- result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata)
-
- lf = bb.utils.lockfile("%s.lock" % logfile)
- with open(logfile, "a") as f:
- row = [pname, pdesc, maintainer, plicense, vermatch, pcurver, pupver, noupdate_reason, rstatus]
- row.extend(result)
-
- writer = csv.writer(f)
- writer.writerow(row)
- f.close()
- bb.utils.unlockfile(lf)
-}
-do_distrodata[vardepsexclude] = "DATETIME"
-
-addtask distrodataall after do_distrodata
-do_distrodataall[recrdeptask] = "do_distrodataall do_distrodata"
-do_distrodataall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_distrodataall[nostamp] = "1"
-do_distrodataall() {
- :
-}
-
-addhandler checkpkg_eventhandler
-checkpkg_eventhandler[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted"
-python checkpkg_eventhandler() {
- import csv
-
- def parse_csv_file(filename):
- package_dict = {}
-
- with open(filename, "r") as f:
- reader = csv.reader(f, delimiter='\t')
- for row in reader:
- pn = row[0]
-
- if reader.line_num == 1:
- header = row
- continue
-
- if not pn in package_dict.keys():
- package_dict[pn] = row
- f.close()
-
- with open(filename, "w") as f:
- writer = csv.writer(f, delimiter='\t')
- writer.writerow(header)
- for pn in package_dict.keys():
- writer.writerow(package_dict[pn])
- f.close()
-
- del package_dict
-
- if bb.event.getName(e) == "BuildStarted":
- import oe.distro_check as dc
- logfile = dc.create_log_file(e.data, "checkpkg.csv")
-
- lf = bb.utils.lockfile("%s.lock" % logfile)
- with open(logfile, "a") as f:
- writer = csv.writer(f, delimiter='\t')
- headers = ['Package', 'Version', 'Upver', 'License', 'Section',
- 'Home', 'Release', 'Depends', 'BugTracker', 'PE', 'Description',
- 'Status', 'Tracking', 'URI', 'MAINTAINER', 'NoUpReason']
- writer.writerow(headers)
- f.close()
- bb.utils.unlockfile(lf)
- elif bb.event.getName(e) == "BuildCompleted":
- import os
- filename = "tmp/log/checkpkg.csv"
- if os.path.isfile(filename):
- lf = bb.utils.lockfile("%s.lock"%filename)
- parse_csv_file(filename)
- bb.utils.unlockfile(lf)
- return
-}
-
-addtask checkpkg
-do_checkpkg[nostamp] = "1"
-python do_checkpkg() {
- localdata = bb.data.createCopy(d)
- import csv
- import re
- import tempfile
- import subprocess
- import oe.recipeutils
- from bb.utils import vercmp_string
- from bb.fetch2 import FetchError, NoMethodError, decodeurl
-
- """first check whether a uri is provided"""
- src_uri = (d.getVar('SRC_URI', True) or '').split()
- if src_uri:
- uri_type, _, _, _, _, _ = decodeurl(src_uri[0])
- else:
- uri_type = "none"
-
- """initialize log files."""
- logpath = d.getVar('LOG_DIR', True)
- bb.utils.mkdirhier(logpath)
- logfile = os.path.join(logpath, "checkpkg.csv")
-
- """generate package information from .bb file"""
- pname = d.getVar('PN', True)
-
- if pname.find("-native") != -1:
- if d.getVar('BBCLASSEXTEND', True):
- return
- pnstripped = pname.split("-native")
- bb.note("Native Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pname.startswith("nativesdk-"):
- if d.getVar('BBCLASSEXTEND', True):
- return
- pnstripped = pname.replace("nativesdk-", "")
- bb.note("NativeSDK Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pname.find("-cross") != -1:
- pnstripped = pname.split("-cross")
- bb.note("cross Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- if pname.find("-initial") != -1:
- pnstripped = pname.split("-initial")
- bb.note("initial Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
-
- pdesc = localdata.getVar('DESCRIPTION', True)
- pgrp = localdata.getVar('SECTION', True)
- pversion = localdata.getVar('PV', True)
- plicense = localdata.getVar('LICENSE', True)
- psection = localdata.getVar('SECTION', True)
- phome = localdata.getVar('HOMEPAGE', True)
- prelease = localdata.getVar('PR', True)
- pdepends = localdata.getVar('DEPENDS', True)
- pbugtracker = localdata.getVar('BUGTRACKER', True)
- ppe = localdata.getVar('PE', True)
- psrcuri = localdata.getVar('SRC_URI', True)
- maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
-
- """ Get upstream version version """
- pupver = ""
- pstatus = ""
-
- try:
- uv = oe.recipeutils.get_recipe_upstream_version(localdata)
-
- pupver = uv['version']
- except Exception as e:
- if e is FetchError:
- pstatus = "ErrAccess"
- elif e is NoMethodError:
- pstatus = "ErrUnsupportedProto"
- else:
- pstatus = "ErrUnknown"
-
- """Set upstream version status"""
- if not pupver:
- pupver = "N/A"
- else:
- pv, _, _ = oe.recipeutils.get_recipe_pv_without_srcpv(pversion, uri_type)
- upv, _, _ = oe.recipeutils.get_recipe_pv_without_srcpv(pupver, uri_type)
-
- cmp = vercmp_string(pv, upv)
- if cmp == -1:
- pstatus = "UPDATE"
- elif cmp == 0:
- pstatus = "MATCH"
-
- if psrcuri:
- psrcuri = psrcuri.split()[0]
- else:
- psrcuri = "none"
- pdepends = "".join(pdepends.split("\t"))
- pdesc = "".join(pdesc.split("\t"))
- no_upgr_reason = d.getVar('RECIPE_NO_UPDATE_REASON', True)
- lf = bb.utils.lockfile("%s.lock" % logfile)
- with open(logfile, "a") as f:
- writer = csv.writer(f, delimiter='\t')
- writer.writerow([pname, pversion, pupver, plicense, psection, phome,
- prelease, pdepends, pbugtracker, ppe, pdesc, pstatus, pupver,
- psrcuri, maintainer, no_upgr_reason])
- f.close()
- bb.utils.unlockfile(lf)
-}
-
-addtask checkpkgall after do_checkpkg
-do_checkpkgall[recrdeptask] = "do_checkpkgall do_checkpkg"
-do_checkpkgall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checkpkgall[nostamp] = "1"
-do_checkpkgall() {
- :
-}
-
-addhandler distro_check_eventhandler
-distro_check_eventhandler[eventmask] = "bb.event.BuildStarted"
-python distro_check_eventhandler() {
- """initialize log files."""
- import oe.distro_check as dc
- result_file = dc.create_log_file(e.data, "distrocheck.csv")
- return
-}
-
-addtask distro_check
-do_distro_check[nostamp] = "1"
-python do_distro_check() {
- """checks if the package is present in other public Linux distros"""
- import oe.distro_check as dc
- import shutil
- if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk',d):
- return
-
- localdata = bb.data.createCopy(d)
- bb.data.update_data(localdata)
- tmpdir = d.getVar('TMPDIR', True)
- distro_check_dir = os.path.join(tmpdir, "distro_check")
- logpath = d.getVar('LOG_DIR', True)
- bb.utils.mkdirhier(logpath)
- result_file = os.path.join(logpath, "distrocheck.csv")
- datetime = localdata.getVar('DATETIME', True)
- dc.update_distro_data(distro_check_dir, datetime, localdata)
-
- # do the comparison
- result = dc.compare_in_distro_packages_list(distro_check_dir, d)
-
- # save the results
- dc.save_distro_check_result(result, datetime, result_file, d)
-}
-
-addtask distro_checkall after do_distro_check
-do_distro_checkall[recrdeptask] = "do_distro_checkall do_distro_check"
-do_distro_checkall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_distro_checkall[nostamp] = "1"
-do_distro_checkall() {
- :
-}
-#
-#Check Missing License Text.
-#Use this task to generate the missing license text data for pkg-report system,
-#then we can search those recipes which license text isn't exsit in common-licenses directory
-#
-addhandler checklicense_eventhandler
-checklicense_eventhandler[eventmask] = "bb.event.BuildStarted"
-python checklicense_eventhandler() {
- """initialize log files."""
- import csv
- import oe.distro_check as dc
- logfile = dc.create_log_file(e.data, "missinglicense.csv")
- lf = bb.utils.lockfile("%s.lock" % logfile)
- with open(logfile, "a") as f:
- writer = csv.writer(f, delimiter='\t')
- writer.writerow(['Package', 'License', 'MissingLicense'])
- f.close()
- bb.utils.unlockfile(lf)
- return
-}
-
-addtask checklicense
-do_checklicense[nostamp] = "1"
-python do_checklicense() {
- import csv
- import shutil
- logpath = d.getVar('LOG_DIR', True)
- bb.utils.mkdirhier(logpath)
- pn = d.getVar('PN', True)
- logfile = os.path.join(logpath, "missinglicense.csv")
- generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
- license_types = d.getVar('LICENSE', True)
- for license_type in ((license_types.replace('+', '').replace('|', '&')
- .replace('(', '').replace(')', '').replace(';', '')
- .replace(',', '').replace(" ", "").split("&"))):
- if not os.path.isfile(os.path.join(generic_directory, license_type)):
- lf = bb.utils.lockfile("%s.lock" % logfile)
- with open(logfile, "a") as f:
- writer = csv.writer(f, delimiter='\t')
- writer.writerow([pn, license_types, license_type])
- f.close()
- bb.utils.unlockfile(lf)
- return
-}
-
-addtask checklicenseall after do_checklicense
-do_checklicenseall[recrdeptask] = "do_checklicenseall do_checklicense"
-do_checklicenseall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checklicenseall[nostamp] = "1"
-do_checklicenseall() {
- :
-}
-
-
diff --git a/meta/classes/distrooverrides.bbclass b/meta/classes/distrooverrides.bbclass
new file mode 100644
index 0000000000..9f4db0d771
--- /dev/null
+++ b/meta/classes/distrooverrides.bbclass
@@ -0,0 +1,32 @@
+# Turns certain DISTRO_FEATURES into overrides with the same
+# name plus a df- prefix. Ensures that these special
+# distro features remain set also for native and nativesdk
+# recipes, so that these overrides can also be used there.
+#
+# This makes it simpler to write .bbappends that only change the
+# task signatures of the recipe if the change is really enabled,
+# for example with:
+# do_install_append_df-my-feature () { ... }
+# where "my-feature" is a DISTRO_FEATURE.
+#
+# The class is meant to be used in a layer.conf or distro
+# .inc file with:
+# INHERIT += "distrooverrides"
+# DISTRO_FEATURES_OVERRIDES += "my-feature"
+#
+# Beware that this part of OVERRIDES changes during parsing, so usage
+# of these overrides should be limited to .bb and .bbappend files,
+# because then DISTRO_FEATURES is final.
+
+DISTRO_FEATURES_OVERRIDES ?= ""
+DISTRO_FEATURES_OVERRIDES[doc] = "A space-separated list of <feature> entries. \
+Each entry is added to OVERRIDES as df-<feature> if <feature> is in DISTRO_FEATURES."
+
+DISTRO_FEATURES_FILTER_NATIVE_append = " ${DISTRO_FEATURES_OVERRIDES}"
+DISTRO_FEATURES_FILTER_NATIVESDK_append = " ${DISTRO_FEATURES_OVERRIDES}"
+
+# If DISTRO_FEATURES_OVERRIDES or DISTRO_FEATURES show up in a task
+# signature because of this line, then the task dependency on
+# OVERRIDES itself should be fixed. Excluding these two variables
+# with DISTROOVERRIDES[vardepsexclude] would just work around the problem.
+DISTROOVERRIDES .= "${@ ''.join([':df-' + x for x in sorted(set(d.getVar('DISTRO_FEATURES_OVERRIDES').split()) & set((d.getVar('DISTRO_FEATURES') or '').split()))]) }"
diff --git a/meta/classes/distutils-base.bbclass b/meta/classes/distutils-base.bbclass
index aa18e8b292..9f398d7051 100644
--- a/meta/classes/distutils-base.bbclass
+++ b/meta/classes/distutils-base.bbclass
@@ -1,4 +1,4 @@
-DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
+DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES') == '')]}"
RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
inherit distutils-common-base pythonnative
diff --git a/meta/classes/distutils-common-base.bbclass b/meta/classes/distutils-common-base.bbclass
index 824a1b68b1..94b5fd426d 100644
--- a/meta/classes/distutils-common-base.bbclass
+++ b/meta/classes/distutils-common-base.bbclass
@@ -1,6 +1,18 @@
export STAGING_INCDIR
export STAGING_LIBDIR
+# LDSHARED is the ld *command* used to create shared library
+export LDSHARED = "${CCLD} -shared"
+# LDXXSHARED is the ld *command* used to create shared library of C++
+# objects
+export LDCXXSHARED = "${CXX} -shared"
+# CCSHARED are the C *flags* used to create objects to go into a shared
+# library (module)
+export CCSHARED = "-fPIC -DPIC"
+# LINKFORSHARED are the flags passed to the $(CC) command that links
+# the python executable
+export LINKFORSHARED = "{SECURITY_CFLAGS} -Xlinker -export-dynamic"
+
FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*"
FILES_${PN}-staticdev += "\
diff --git a/meta/classes/distutils-tools.bbclass b/meta/classes/distutils-tools.bbclass
deleted file mode 100644
index 3ef9cc5a78..0000000000
--- a/meta/classes/distutils-tools.bbclass
+++ /dev/null
@@ -1,73 +0,0 @@
-DISTUTILS_BUILD_ARGS ?= ""
-DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
-DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
- --install-data=${STAGING_DATADIR}"
-DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
- --install-data=${D}/${datadir}"
-
-distutils_do_compile() {
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed."
-}
-
-distutils_stage_headers() {
- install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
-}
-
-distutils_stage_all() {
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
- PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
-}
-
-distutils_do_install() {
- echo "Beginning ${PN} Install ..."
- install -d ${D}${PYTHON_SITEPACKAGES_DIR}
- echo "Step 2 of ${PN} Install ..."
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install execution failed."
-
- echo "Step 3 of ${PN} Install ..."
- # support filenames with *spaces*
- find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \
- sed -i -e s:${D}::g $i
- done
-
- echo "Step 4 of ${PN} Install ..."
- if test -e ${D}${bindir} ; then
- for i in ${D}${bindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
-
- echo "Step 4 of ${PN} Install ..."
- if test -e ${D}${sbindir}; then
- for i in ${D}${sbindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
-
- echo "Step 5 of ${PN} Install ..."
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
-
- #
- # FIXME: Bandaid against wrong datadir computation
- #
- if test -e ${D}${datadir}/share; then
- mv -f ${D}${datadir}/share/* ${D}${datadir}/
- fi
-}
-
-#EXPORT_FUNCTIONS do_compile do_install
-
-export LDSHARED="${CCLD} -shared"
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 857572d759..3759b58263 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -4,20 +4,33 @@ DISTUTILS_BUILD_ARGS ?= ""
DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
--install-data=${STAGING_DATADIR}"
-DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
- --install-data=${D}/${datadir}"
+DISTUTILS_INSTALL_ARGS ?= "--root=${D} \
+ --prefix=${prefix} \
+ --install-lib=${PYTHON_SITEPACKAGES_DIR} \
+ --install-data=${datadir}"
+
+DISTUTILS_PYTHON = "python"
+DISTUTILS_PYTHON_class-native = "nativepython"
+
+distutils_do_configure() {
+ if [ "${CLEANBROKEN}" != "1" ] ; then
+ NO_FETCH_BUILD=1 \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py clean ${DISTUTILS_BUILD_ARGS}
+ fi
+}
distutils_do_compile() {
+ NO_FETCH_BUILD=1 \
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py build execution failed."
+ bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed."
}
distutils_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
+ bbfatal_log "'${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS}' execution for stage_headers failed."
}
distutils_stage_all() {
@@ -26,7 +39,7 @@ distutils_stage_all() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
+ bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS}' execution for stage_all failed."
}
distutils_do_install() {
@@ -34,49 +47,41 @@ distutils_do_install() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install execution failed."
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \
+ bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed."
# support filenames with *spaces*
# only modify file if it contains path and recompile it
- find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; -exec ${STAGING_BINDIR_NATIVE}/python-native/python -mcompileall {} \;
+ find ${D} -name "*.py" -exec grep -q ${D} {} \; \
+ -exec sed -i -e s:${D}::g {} \; \
+ -exec ${STAGING_BINDIR_NATIVE}/python-native/python -mcompileall {} \;
- if test -e ${D}${bindir} ; then
- for i in ${D}${bindir}/* ; do \
- if [ ${PN} != "${BPN}-native" ]; then
- sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
- fi
+ for i in ${D}${bindir}/* ${D}${sbindir}/*; do
+ if [ -f "$i" ]; then
+ sed -i -e s:${PYTHON}:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
-
- if test -e ${D}${sbindir}; then
- for i in ${D}${sbindir}/* ; do \
- if [ ${PN} != "${BPN}-native" ]; then
- sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
- fi
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
+ fi
+ done
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py*
-
+
#
# FIXME: Bandaid against wrong datadir computation
#
- if test -e ${D}${datadir}/share; then
+ if [ -e ${D}${datadir}/share ]; then
mv -f ${D}${datadir}/share/* ${D}${datadir}/
rmdir ${D}${datadir}/share
fi
# Fix backport modules
- if test -e ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/backports/__init__.py && test -e ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py; then
+ if [ -e ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/backports/__init__.py ] &&
+ [ -e ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py ]; then
rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py;
rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc;
fi
}
-EXPORT_FUNCTIONS do_compile do_install
+EXPORT_FUNCTIONS do_configure do_compile do_install
export LDSHARED="${CCLD} -shared"
diff --git a/meta/classes/distutils3-base.bbclass b/meta/classes/distutils3-base.bbclass
index 82ab6a3d1c..7dbf07ac4b 100644
--- a/meta/classes/distutils3-base.bbclass
+++ b/meta/classes/distutils3-base.bbclass
@@ -1,4 +1,4 @@
-DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
+DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES') == '')]}"
RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
inherit distutils-common-base python3native
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index a6720c5b6b..05a24bfe26 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -5,22 +5,35 @@ DISTUTILS_BUILD_EXT_ARGS ?= ""
DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
--install-data=${STAGING_DATADIR}"
-DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
- --install-data=${D}/${datadir}"
+DISTUTILS_INSTALL_ARGS ?= "--root=${D} \
+ --prefix=${prefix} \
+ --install-lib=${PYTHON_SITEPACKAGES_DIR} \
+ --install-data=${datadir}"
+
+DISTUTILS_PYTHON = "python3"
+DISTUTILS_PYTHON_class-native = "nativepython3"
+
+distutils3_do_configure() {
+ if [ "${CLEANBROKEN}" != "1" ] ; then
+ NO_FETCH_BUILD=1 \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py clean ${DISTUTILS_BUILD_ARGS}
+ fi
+}
distutils3_do_compile() {
+ NO_FETCH_BUILD=1 \
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
build ${DISTUTILS_BUILD_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed."
+ bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed."
}
distutils3_do_compile[vardepsexclude] = "MACHINE"
distutils3_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
+ bbfatal_log "'${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS}' execution for stage_headers failed."
}
distutils3_stage_headers[vardepsexclude] = "MACHINE"
@@ -30,7 +43,7 @@ distutils3_stage_all() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
+ bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS}' execution for stage_all failed."
}
distutils3_stage_all[vardepsexclude] = "MACHINE"
@@ -39,38 +52,32 @@ distutils3_do_install() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
- bbfatal_log "${PYTHON_PN} setup.py install execution failed."
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \
+ bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed."
# support filenames with *spaces*
- find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \;
-
- if test -e ${D}${bindir} ; then
- for i in ${D}${bindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
+ find ${D} -name "*.py" -exec grep -q ${D} {} \; \
+ -exec sed -i -e s:${D}::g {} \;
- if test -e ${D}${sbindir}; then
- for i in ${D}${sbindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i
+ for i in ${D}${bindir}/* ${D}${sbindir}/*; do
+ if [ -f "$i" ]; then
+ sed -i -e s:${PYTHON}:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
+ fi
+ done
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
-
+
#
# FIXME: Bandaid against wrong datadir computation
#
- if test -e ${D}${datadir}/share; then
+ if [ -e ${D}${datadir}/share ]; then
mv -f ${D}${datadir}/share/* ${D}${datadir}/
rmdir ${D}${datadir}/share
fi
}
distutils3_do_install[vardepsexclude] = "MACHINE"
-EXPORT_FUNCTIONS do_compile do_install
+EXPORT_FUNCTIONS do_configure do_compile do_install
export LDSHARED="${CCLD} -shared"
diff --git a/meta/classes/dos2unix.bbclass b/meta/classes/dos2unix.bbclass
new file mode 100644
index 0000000000..3fc17e2196
--- /dev/null
+++ b/meta/classes/dos2unix.bbclass
@@ -0,0 +1,14 @@
+# Class for use to convert all CRLF line terminators to LF
+# provided that some projects are being developed/maintained
+# on Windows so they have different line terminators(CRLF) vs
+# on Linux(LF), which can cause annoying patching errors during
+# git push/checkout processes.
+
+do_convert_crlf_to_lf[depends] += "dos2unix-native:do_populate_sysroot"
+
+# Convert CRLF line terminators to LF
+do_convert_crlf_to_lf () {
+ find ${S} -type f -exec dos2unix {} \;
+}
+
+addtask convert_crlf_to_lf after do_unpack before do_patch
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 5c65d2b742..ea59d02ed9 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -4,7 +4,7 @@
# Copyright (C) 2009 Chris Larson <clarson@kergoth.com>
# Released under the MIT license (see COPYING.MIT for the terms)
#
-# externalsrc.bbclass enables use of an existing source tree, usually external to
+# externalsrc.bbclass enables use of an existing source tree, usually external to
# the build system to build a piece of software rather than the usual fetch/unpack/patch
# process.
#
@@ -28,34 +28,42 @@ SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
EXTERNALSRC_SYMLINKS ?= "oe-workdir:${WORKDIR} oe-logs:${T}"
python () {
- externalsrc = d.getVar('EXTERNALSRC', True)
+ externalsrc = d.getVar('EXTERNALSRC')
+ externalsrcbuild = d.getVar('EXTERNALSRC_BUILD')
+
+ if externalsrc and not externalsrc.startswith("/"):
+ bb.error("EXTERNALSRC must be an absolute path")
+ if externalsrcbuild and not externalsrcbuild.startswith("/"):
+ bb.error("EXTERNALSRC_BUILD must be an absolute path")
# If this is the base recipe and EXTERNALSRC is set for it or any of its
# derivatives, then enable BB_DONT_CACHE to force the recipe to always be
# re-parsed so that the file-checksums function for do_compile is run every
# time.
- bpn = d.getVar('BPN', True)
- if bpn == d.getVar('PN', True):
- classextend = (d.getVar('BBCLASSEXTEND', True) or '').split()
+ bpn = d.getVar('BPN')
+ classextend = (d.getVar('BBCLASSEXTEND') or '').split()
+ if bpn == d.getVar('PN') or not classextend:
if (externalsrc or
('native' in classextend and
- d.getVar('EXTERNALSRC_pn-%s-native' % bpn, True)) or
+ d.getVar('EXTERNALSRC_pn-%s-native' % bpn)) or
('nativesdk' in classextend and
- d.getVar('EXTERNALSRC_pn-nativesdk-%s' % bpn, True)) or
+ d.getVar('EXTERNALSRC_pn-nativesdk-%s' % bpn)) or
('cross' in classextend and
- d.getVar('EXTERNALSRC_pn-%s-cross' % bpn, True))):
+ d.getVar('EXTERNALSRC_pn-%s-cross' % bpn))):
d.setVar('BB_DONT_CACHE', '1')
if externalsrc:
+ import oe.recipeutils
+ import oe.path
+
d.setVar('S', externalsrc)
- externalsrcbuild = d.getVar('EXTERNALSRC_BUILD', True)
if externalsrcbuild:
d.setVar('B', externalsrcbuild)
else:
d.setVar('B', '${WORKDIR}/${BPN}-${PV}/')
local_srcuri = []
- fetch = bb.fetch2.Fetch((d.getVar('SRC_URI', True) or '').split(), d)
+ fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)
for url in fetch.urls:
url_data = fetch.ud[url]
parm = url_data.parm
@@ -69,7 +77,10 @@ python () {
# Dummy value because the default function can't be called with blank SRC_URI
d.setVar('SRCPV', '999')
- tasks = filter(lambda k: d.getVarFlag(k, "task", True), d.keys())
+ if d.getVar('CONFIGUREOPT_DEPTRACK') == '--disable-dependency-tracking':
+ d.setVar('CONFIGUREOPT_DEPTRACK', '')
+
+ tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys())
for task in tasks:
if task.endswith("_setscene"):
@@ -80,10 +91,10 @@ python () {
d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")
# We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
- cleandirs = (d.getVarFlag(task, 'cleandirs', False) or '').split()
+ cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 'cleandirs', False) or '')
setvalue = False
for cleandir in cleandirs[:]:
- if d.expand(cleandir) == externalsrc:
+ if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
cleandirs.remove(cleandir)
setvalue = True
if setvalue:
@@ -94,7 +105,7 @@ python () {
# Note that we cannot use d.appendVarFlag() here because deps is expected to be a list object, not a string
d.setVarFlag('do_configure', 'deps', (d.getVarFlag('do_configure', 'deps', False) or []) + ['do_unpack'])
- for task in d.getVar("SRCTREECOVEREDTASKS", True).split():
+ for task in d.getVar("SRCTREECOVEREDTASKS").split():
if local_srcuri and task in fetch_tasks:
continue
bb.build.deltask(task, d)
@@ -103,26 +114,34 @@ python () {
d.prependVarFlag('do_configure', 'prefuncs', "externalsrc_configure_prefunc ")
d.setVarFlag('do_compile', 'file-checksums', '${@srctree_hash_files(d)}')
+ d.setVarFlag('do_configure', 'file-checksums', '${@srctree_configure_hash_files(d)}')
# We don't want the workdir to go away
- d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN', True))
+ d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN'))
+
+ bb.build.addtask('do_buildclean',
+ 'do_clean' if d.getVar('S') == d.getVar('B') else None,
+ None, d)
# If B=S the same builddir is used even for different architectures.
# Thus, use a shared CONFIGURESTAMPFILE and STAMP directory so that
# change of do_configure task hash is correctly detected and stamps are
# invalidated if e.g. MACHINE changes.
- if d.getVar('S', True) == d.getVar('B', True):
+ if d.getVar('S') == d.getVar('B'):
configstamp = '${TMPDIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}/configure.sstate'
d.setVar('CONFIGURESTAMPFILE', configstamp)
d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}')
+ d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*')
}
python externalsrc_configure_prefunc() {
+ s_dir = d.getVar('S')
# Create desired symlinks
- symlinks = (d.getVar('EXTERNALSRC_SYMLINKS', True) or '').split()
+ symlinks = (d.getVar('EXTERNALSRC_SYMLINKS') or '').split()
+ newlinks = []
for symlink in symlinks:
symsplit = symlink.split(':', 1)
- lnkfile = os.path.join(d.getVar('S', True), symsplit[0])
+ lnkfile = os.path.join(s_dir, symsplit[0])
target = d.expand(symsplit[1])
if len(symsplit) > 1:
if os.path.islink(lnkfile):
@@ -134,35 +153,91 @@ python externalsrc_configure_prefunc() {
# File/dir exists with same name as link, just leave it alone
continue
os.symlink(target, lnkfile)
+ newlinks.append(symsplit[0])
+ # Hide the symlinks from git
+ try:
+ git_exclude_file = os.path.join(s_dir, '.git/info/exclude')
+ if os.path.exists(git_exclude_file):
+ with open(git_exclude_file, 'r+') as efile:
+ elines = efile.readlines()
+ for link in newlinks:
+ if link in elines or '/'+link in elines:
+ continue
+ efile.write('/' + link + '\n')
+ except IOError as ioe:
+ bb.note('Failed to hide EXTERNALSRC_SYMLINKS from git')
}
python externalsrc_compile_prefunc() {
# Make it obvious that this is happening, since forgetting about it could lead to much confusion
- bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN', True), d.getVar('EXTERNALSRC', True)))
+ bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN'), d.getVar('EXTERNALSRC')))
}
-def srctree_hash_files(d):
+do_buildclean[dirs] = "${S} ${B}"
+do_buildclean[nostamp] = "1"
+do_buildclean[doc] = "Call 'make clean' or equivalent in ${B}"
+externalsrc_do_buildclean() {
+ if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
+ rm -f ${@' '.join([x.split(':')[0] for x in (d.getVar('EXTERNALSRC_SYMLINKS') or '').split()])}
+ if [ "${CLEANBROKEN}" != "1" ]; then
+ oe_runmake clean || die "make failed"
+ fi
+ else
+ bbnote "nothing to do - no makefile found"
+ fi
+}
+
+def srctree_hash_files(d, srcdir=None):
import shutil
import subprocess
import tempfile
- s_dir = d.getVar('EXTERNALSRC', True)
- git_dir = os.path.join(s_dir, '.git')
- oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1')
+ s_dir = srcdir or d.getVar('EXTERNALSRC')
+ git_dir = None
+
+ try:
+ git_dir = os.path.join(s_dir,
+ subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip())
+ except subprocess.CalledProcessError:
+ pass
ret = " "
- if os.path.exists(git_dir):
- with tempfile.NamedTemporaryFile(dir=git_dir, prefix='oe-devtool-index') as tmp_index:
+ if git_dir is not None:
+ oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1-%s' % d.getVar('PN'))
+ with tempfile.NamedTemporaryFile(prefix='oe-devtool-index') as tmp_index:
# Clone index
- shutil.copy2(os.path.join(git_dir, 'index'), tmp_index.name)
+ shutil.copyfile(os.path.join(git_dir, 'index'), tmp_index.name)
# Update our custom index
env = os.environ.copy()
env['GIT_INDEX_FILE'] = tmp_index.name
- subprocess.check_output(['git', 'add', '.'], cwd=s_dir, env=env)
+ subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env)
sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8")
with open(oe_hash_file, 'w') as fobj:
fobj.write(sha1)
ret = oe_hash_file + ':True'
else:
- ret = d.getVar('EXTERNALSRC', True) + '/*:True'
+ ret = s_dir + '/*:True'
return ret
+
+def srctree_configure_hash_files(d):
+ """
+ Get the list of files that should trigger do_configure to re-execute,
+ based on the value of CONFIGURE_FILES
+ """
+ in_files = (d.getVar('CONFIGURE_FILES') or '').split()
+ out_items = []
+ search_files = []
+ for entry in in_files:
+ if entry.startswith('/'):
+ out_items.append('%s:%s' % (entry, os.path.exists(entry)))
+ else:
+ search_files.append(entry)
+ if search_files:
+ s_dir = d.getVar('EXTERNALSRC')
+ for root, _, files in os.walk(s_dir):
+ for f in files:
+ if f in search_files:
+ out_items.append('%s:True' % os.path.join(root, f))
+ return ' '.join(out_items)
+
+EXPORT_FUNCTIONS do_buildclean
diff --git a/meta/classes/extrausers.bbclass b/meta/classes/extrausers.bbclass
index 43900f359d..32569e97db 100644
--- a/meta/classes/extrausers.bbclass
+++ b/meta/classes/extrausers.bbclass
@@ -1,21 +1,20 @@
-# This bbclass is mainly used for image level user/group configuration.
+# This bbclass is used for image level user/group configuration.
# Inherit this class if you want to make EXTRA_USERS_PARAMS effective.
# Below is an example showing how to use this functionality.
-# INHERIT += "extrausers"
+# IMAGE_CLASSES += "extrausers"
# EXTRA_USERS_PARAMS = "\
-# useradd -p '' tester; \
-# groupadd developers; \
-# userdel nobody; \
-# groupdel -g video; \
-# groupmod -g 1020 developers; \
-# usermod -s /bin/sh tester; \
+# useradd -p '' tester; \
+# groupadd developers; \
+# userdel nobody; \
+# groupdel -g video; \
+# groupmod -g 1020 developers; \
+# usermod -s /bin/sh tester; \
# "
-
inherit useradd_base
-IMAGE_INSTALL_append = " ${@['', 'base-passwd shadow'][bool(d.getVar('EXTRA_USERS_PARAMS', True))]}"
+PACKAGE_INSTALL_append = " ${@['', 'base-passwd shadow'][bool(d.getVar('EXTRA_USERS_PARAMS'))]}"
# Image level user / group settings
ROOTFS_POSTPROCESS_COMMAND_append = " set_user_group;"
@@ -63,3 +62,7 @@ set_user_group () {
remaining=`echo $remaining | cut -d ';' -f2-`
done
}
+
+USERADDEXTENSION ?= ""
+
+inherit ${USERADDEXTENSION}
diff --git a/meta/classes/features_check.bbclass b/meta/classes/features_check.bbclass
new file mode 100644
index 0000000000..391fbe1c94
--- /dev/null
+++ b/meta/classes/features_check.bbclass
@@ -0,0 +1,85 @@
+# Allow checking of required and conflicting DISTRO_FEATURES
+#
+# ANY_OF_DISTRO_FEATURES: ensure at least one item on this list is included
+# in DISTRO_FEATURES.
+# REQUIRED_DISTRO_FEATURES: ensure every item on this list is included
+# in DISTRO_FEATURES.
+# CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in
+# DISTRO_FEATURES.
+# ANY_OF_MACHINE_FEATURES: ensure at least one item on this list is included
+# in MACHINE_FEATURES.
+# REQUIRED_MACHINE_FEATURES: ensure every item on this list is included
+# in MACHINE_FEATURES.
+# CONFLICT_MACHINE_FEATURES: ensure no item in this list is included in
+# MACHINE_FEATURES.
+# ANY_OF_COMBINED_FEATURES: ensure at least one item on this list is included
+# in COMBINED_FEATURES.
+# REQUIRED_COMBINED_FEATURES: ensure every item on this list is included
+# in COMBINED_FEATURES.
+# CONFLICT_COMBINED_FEATURES: ensure no item in this list is included in
+# COMBINED_FEATURES.
+#
+# Copyright 2019 (C) Texas Instruments Inc.
+# Copyright 2013 (C) O.S. Systems Software LTDA.
+
+python () {
+ # Assume at least one var is set.
+ distro_features = set((d.getVar('DISTRO_FEATURES') or '').split())
+
+ any_of_distro_features = set((d.getVar('ANY_OF_DISTRO_FEATURES') or '').split())
+ if any_of_distro_features:
+ if set.isdisjoint(any_of_distro_features, distro_features):
+ raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % ' '.join(any_of_distro_features))
+
+ required_distro_features = set((d.getVar('REQUIRED_DISTRO_FEATURES') or '').split())
+ if required_distro_features:
+ missing = set.difference(required_distro_features, distro_features)
+ if missing:
+ raise bb.parse.SkipRecipe("missing required distro feature%s '%s' (not in DISTRO_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing)))
+
+ conflict_distro_features = set((d.getVar('CONFLICT_DISTRO_FEATURES') or '').split())
+ if conflict_distro_features:
+ conflicts = set.intersection(conflict_distro_features, distro_features)
+ if conflicts:
+ raise bb.parse.SkipRecipe("conflicting distro feature%s '%s' (in DISTRO_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts)))
+
+ # Assume at least one var is set.
+ machine_features = set((d.getVar('MACHINE_FEATURES') or '').split())
+
+ any_of_machine_features = set((d.getVar('ANY_OF_MACHINE_FEATURES') or '').split())
+ if any_of_machine_features:
+ if set.isdisjoint(any_of_machine_features, machine_features):
+ raise bb.parse.SkipRecipe("one of '%s' needs to be in MACHINE_FEATURES" % ' '.join(any_of_machine_features))
+
+ required_machine_features = set((d.getVar('REQUIRED_MACHINE_FEATURES') or '').split())
+ if required_machine_features:
+ missing = set.difference(required_machine_features, machine_features)
+ if missing:
+ raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in MACHINE_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing)))
+
+ conflict_machine_features = set((d.getVar('CONFLICT_MACHINE_FEATURES') or '').split())
+ if conflict_machine_features:
+ conflicts = set.intersection(conflict_machine_features, machine_features)
+ if conflicts:
+ raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in MACHINE_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts)))
+
+ # Assume at least one var is set.
+ combined_features = set((d.getVar('COMBINED_FEATURES') or '').split())
+
+ any_of_combined_features = set((d.getVar('ANY_OF_COMBINED_FEATURES') or '').split())
+ if any_of_combined_features:
+ if set.isdisjoint(any_of_combined_features, combined_features):
+ raise bb.parse.SkipRecipe("one of '%s' needs to be in COMBINED_FEATURES" % ' '.join(any_of_combined_features))
+
+ required_combined_features = set((d.getVar('REQUIRED_COMBINED_FEATURES') or '').split())
+ if required_combined_features:
+ missing = set.difference(required_combined_features, combined_features)
+ if missing:
+ raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in COMBINED_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing)))
+
+ conflict_combined_features = set((d.getVar('CONFLICT_COMBINED_FEATURES') or '').split())
+ if conflict_combined_features:
+ conflicts = set.intersection(conflict_combined_features, combined_features)
+ if conflicts:
+ raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in COMBINED_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts)))
+}
diff --git a/meta/classes/fontcache.bbclass b/meta/classes/fontcache.bbclass
index 8ebdfc4f5c..13f9df1592 100644
--- a/meta/classes/fontcache.bbclass
+++ b/meta/classes/fontcache.bbclass
@@ -3,7 +3,7 @@
# packages.
#
-DEPENDS += "qemu-native"
+PACKAGE_WRITE_DEPS += "qemu-native"
inherit qemu
FONT_PACKAGES ??= "${PN}"
@@ -17,9 +17,10 @@ FONTCONFIG_CACHE_PARAMS ?= "-v"
FONTCONFIG_CACHE_ENV ?= "FC_DEBUG=1"
fontcache_common() {
if [ -n "$D" ] ; then
- $INTERCEPT_DIR/postinst_intercept update_font_cache ${PKG} mlprefix=${MLPREFIX} \
+ $INTERCEPT_DIR/postinst_intercept update_font_cache ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} \
'bindir="${bindir}"' \
'libdir="${libdir}"' \
+ 'libexecdir="${libexecdir}"' \
'base_libdir="${base_libdir}"' \
'fontconfigcachedir="${FONTCONFIG_CACHE_DIR}"' \
'fontconfigcacheparams="${FONTCONFIG_CACHE_PARAMS}"' \
@@ -30,26 +31,26 @@ fi
}
python () {
- font_pkgs = d.getVar('FONT_PACKAGES', True).split()
- deps = d.getVar("FONT_EXTRA_RDEPENDS", True)
+ font_pkgs = d.getVar('FONT_PACKAGES').split()
+ deps = d.getVar("FONT_EXTRA_RDEPENDS")
for pkg in font_pkgs:
if deps: d.appendVar('RDEPENDS_' + pkg, ' '+deps)
}
python add_fontcache_postinsts() {
- for pkg in d.getVar('FONT_PACKAGES', True).split():
+ for pkg in d.getVar('FONT_PACKAGES').split():
bb.note("adding fonts postinst and postrm scripts to %s" % pkg)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg) or d.getVar('pkg_postinst')
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += d.getVar('fontcache_common', True)
+ postinst += d.getVar('fontcache_common')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True)
+ postrm = d.getVar('pkg_postrm_%s' % pkg) or d.getVar('pkg_postrm')
if not postrm:
postrm = '#!/bin/sh\n'
- postrm += d.getVar('fontcache_common', True)
+ postrm += d.getVar('fontcache_common')
d.setVar('pkg_postrm_%s' % pkg, postrm)
}
diff --git a/meta/classes/fs-uuid.bbclass b/meta/classes/fs-uuid.bbclass
index bd2613cf10..9b53dfba7a 100644
--- a/meta/classes/fs-uuid.bbclass
+++ b/meta/classes/fs-uuid.bbclass
@@ -3,7 +3,7 @@
# on ext file systems and depends on tune2fs.
def get_rootfs_uuid(d):
import subprocess
- rootfs = d.getVar('ROOTFS', True)
+ rootfs = d.getVar('ROOTFS')
output = subprocess.check_output(['tune2fs', '-l', rootfs])
for line in output.split('\n'):
if line.startswith('Filesystem UUID:'):
@@ -13,7 +13,7 @@ def get_rootfs_uuid(d):
bb.fatal('Could not determine filesystem UUID of %s' % rootfs)
# Replace the special <<uuid-of-rootfs>> inside a string (like the
-# root= APPEND string in a syslinux.cfg or gummiboot entry) with the
+# root= APPEND string in a syslinux.cfg or systemd-boot entry) with the
# actual UUID of the rootfs. Does nothing if the special string
# is not used.
def replace_rootfs_uuid(d, string):
diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index d7afa7282f..3e3c509d5f 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -1,4 +1,5 @@
-DEPENDS += "gconf gconf-native"
+DEPENDS += "gconf"
+PACKAGE_WRITE_DEPS += "gconf-native"
# These are for when gconftool is used natively and the prefix isn't necessarily
# the sysroot. TODO: replicate the postinst logic for -native packages going
@@ -42,13 +43,13 @@ done
python populate_packages_append () {
import re
- packages = d.getVar('PACKAGES', True).split()
- pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar('PACKAGES').split()
+ pkgdest = d.getVar('PKGDEST')
for pkg in packages:
schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg)
schemas = []
- schema_re = re.compile(".*\.schemas$")
+ schema_re = re.compile(r".*\.schemas$")
if os.path.exists(schema_dir):
for f in os.listdir(schema_dir):
if schema_re.match(f):
@@ -56,15 +57,15 @@ python populate_packages_append () {
if schemas != []:
bb.note("adding gconf postinst and prerm scripts to %s" % pkg)
d.setVar('SCHEMA_FILES', " ".join(schemas))
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += d.getVar('gconf_postinst', True)
+ postinst += d.getVar('gconf_postinst')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- prerm = d.getVar('pkg_prerm_%s' % pkg, True)
+ prerm = d.getVar('pkg_prerm_%s' % pkg)
if not prerm:
prerm = '#!/bin/sh\n'
- prerm += d.getVar('gconf_prerm', True)
+ prerm += d.getVar('gconf_prerm')
d.setVar('pkg_prerm_%s' % pkg, prerm)
d.appendVar("RDEPENDS_%s" % pkg, ' ' + d.getVar('MLPREFIX', False) + 'gconf')
}
diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
index 03b89b2455..be2ef3b311 100644
--- a/meta/classes/gettext.bbclass
+++ b/meta/classes/gettext.bbclass
@@ -1,19 +1,22 @@
def gettext_dependencies(d):
- if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'):
+ if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
return ""
- if d.getVar('USE_NLS', True) == 'no':
+ if d.getVar('USE_NLS') == 'no':
return "gettext-minimal-native"
- return d.getVar('DEPENDS_GETTEXT', False)
+ return "gettext-native"
def gettext_oeconf(d):
- if d.getVar('USE_NLS', True) == 'no':
+ if d.getVar('USE_NLS') == 'no':
return '--disable-nls'
# Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
- if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'):
+ if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
return '--disable-nls'
return "--enable-nls"
-DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
-
-BASEDEPENDS =+ "${@gettext_dependencies(d)}"
+BASEDEPENDS_append = " ${@gettext_dependencies(d)}"
EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
+
+# Without this, msgfmt from gettext-native will not find ITS files
+# provided by target recipes (for example, polkit.its).
+GETTEXTDATADIRS_append_class-target = ":${STAGING_DATADIR}/gettext"
+export GETTEXTDATADIRS
diff --git a/meta/classes/gio-module-cache.bbclass b/meta/classes/gio-module-cache.bbclass
index 91461b11e7..e429bd3197 100644
--- a/meta/classes/gio-module-cache.bbclass
+++ b/meta/classes/gio-module-cache.bbclass
@@ -1,4 +1,4 @@
-DEPENDS += "qemu-native"
+PACKAGE_WRITE_DEPS += "qemu-native"
inherit qemu
GIO_MODULE_PACKAGES ??= "${PN}"
@@ -9,6 +9,7 @@ if [ "x$D" != "x" ]; then
mlprefix=${MLPREFIX} \
binprefix=${MLPREFIX} \
libdir=${libdir} \
+ libexecdir=${libexecdir} \
base_libdir=${base_libdir} \
bindir=${bindir}
else
@@ -17,21 +18,21 @@ fi
}
python populate_packages_append () {
- packages = d.getVar('GIO_MODULE_PACKAGES', True).split()
+ packages = d.getVar('GIO_MODULE_PACKAGES').split()
for pkg in packages:
bb.note("adding gio-module-cache postinst and postrm scripts to %s" % pkg)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += d.getVar('gio_module_cache_common', True)
+ postinst += d.getVar('gio_module_cache_common')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- postrm = d.getVar('pkg_postrm_%s' % pkg, True)
+ postrm = d.getVar('pkg_postrm_%s' % pkg)
if not postrm:
postrm = '#!/bin/sh\n'
- postrm += d.getVar('gio_module_cache_common', True)
+ postrm += d.getVar('gio_module_cache_common')
d.setVar('pkg_postrm_%s' % pkg, postrm)
}
diff --git a/meta/classes/glide.bbclass b/meta/classes/glide.bbclass
new file mode 100644
index 0000000000..db421745bd
--- /dev/null
+++ b/meta/classes/glide.bbclass
@@ -0,0 +1,9 @@
+# Handle Glide Vendor Package Management use
+#
+# Copyright 2018 (C) O.S. Systems Software LTDA.
+
+DEPENDS_append = " glide-native"
+
+do_compile_prepend() {
+ ( cd ${B}/src/${GO_IMPORT} && glide install )
+}
diff --git a/meta/classes/gnome.bbclass b/meta/classes/gnome.bbclass
deleted file mode 100644
index c6202bbb75..0000000000
--- a/meta/classes/gnome.bbclass
+++ /dev/null
@@ -1 +0,0 @@
-inherit gnomebase gtk-icon-cache gconf mime
diff --git a/meta/classes/gnomebase.bbclass b/meta/classes/gnomebase.bbclass
index e5c67760ce..efcb6caae1 100644
--- a/meta/classes/gnomebase.bbclass
+++ b/meta/classes/gnomebase.bbclass
@@ -6,8 +6,6 @@ SECTION ?= "x11/gnome"
GNOMEBN ?= "${BPN}"
SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive"
-DEPENDS += "gnome-common-native"
-
FILES_${PN} += "${datadir}/application-registry \
${datadir}/mime-info \
${datadir}/mime/packages \
@@ -16,15 +14,17 @@ FILES_${PN} += "${datadir}/application-registry \
${datadir}/polkit* \
${datadir}/GConf \
${datadir}/glib-2.0/schemas \
+ ${datadir}/appdata \
+ ${datadir}/icons \
"
FILES_${PN}-doc += "${datadir}/devhelp"
-inherit autotools pkgconfig
+GNOMEBASEBUILDCLASS ??= "autotools"
+inherit ${GNOMEBASEBUILDCLASS} pkgconfig
do_install_append() {
rm -rf ${D}${localstatedir}/lib/scrollkeeper/*
rm -rf ${D}${localstatedir}/scrollkeeper/*
rm -f ${D}${datadir}/applications/*.cache
}
-
diff --git a/meta/classes/go-ptest.bbclass b/meta/classes/go-ptest.bbclass
new file mode 100644
index 0000000000..e230a80587
--- /dev/null
+++ b/meta/classes/go-ptest.bbclass
@@ -0,0 +1,54 @@
+inherit go ptest
+
+do_compile_ptest_base() {
+ export TMPDIR="${GOTMPDIR}"
+ rm -f ${B}/.go_compiled_tests.list
+ go_list_package_tests | while read pkg; do
+ cd ${B}/src/$pkg
+ ${GO} test ${GOPTESTBUILDFLAGS} $pkg
+ find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
+ sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
+ done
+ do_compile_ptest
+}
+
+do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
+
+go_make_ptest_wrapper() {
+ cat >${D}${PTEST_PATH}/run-ptest <<EOF
+#!/bin/sh
+RC=0
+run_test() (
+ cd "\$1"
+ ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
+ exit \$?)
+EOF
+
+}
+
+do_install_ptest_base() {
+ test -f "${B}/.go_compiled_tests.list" || exit 0
+ install -d ${D}${PTEST_PATH}
+ go_stage_testdata
+ go_make_ptest_wrapper
+ havetests=""
+ while read test; do
+ testdir=`dirname $test`
+ testprog=`basename $test`
+ install -d ${D}${PTEST_PATH}/$testdir
+ install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
+ echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
+ havetests="yes"
+ done < ${B}/.go_compiled_tests.list
+ if [ -n "$havetests" ]; then
+ echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
+ chmod +x ${D}${PTEST_PATH}/run-ptest
+ else
+ rm -rf ${D}${PTEST_PATH}
+ fi
+ do_install_ptest
+ chown -R root:root ${D}${PTEST_PATH}
+}
+
+INSANE_SKIP_${PN}-ptest += "ldflags"
+
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
new file mode 100644
index 0000000000..e40e55689d
--- /dev/null
+++ b/meta/classes/go.bbclass
@@ -0,0 +1,154 @@
+inherit goarch
+
+GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
+
+GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go"
+GOROOT_class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go"
+GOROOT = "${STAGING_LIBDIR}/go"
+export GOROOT
+export GOROOT_FINAL = "${libdir}/go"
+export GOCACHE = "${B}/.cache"
+
+export GOARCH = "${TARGET_GOARCH}"
+export GOOS = "${TARGET_GOOS}"
+export GOHOSTARCH="${BUILD_GOARCH}"
+export GOHOSTOS="${BUILD_GOOS}"
+
+GOARM[export] = "0"
+GOARM_arm_class-target = "${TARGET_GOARM}"
+GOARM_arm_class-target[export] = "1"
+
+GO386[export] = "0"
+GO386_x86_class-target = "${TARGET_GO386}"
+GO386_x86_class-target[export] = "1"
+
+GOMIPS[export] = "0"
+GOMIPS_mips_class-target = "${TARGET_GOMIPS}"
+GOMIPS_mips_class-target[export] = "1"
+
+DEPENDS_GOLANG_class-target = "virtual/${TUNE_PKGARCH}-go virtual/${TARGET_PREFIX}go-runtime"
+DEPENDS_GOLANG_class-native = "go-native"
+DEPENDS_GOLANG_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk virtual/${TARGET_PREFIX}go-runtime"
+
+DEPENDS_append = " ${DEPENDS_GOLANG}"
+
+GO_LINKSHARED ?= "${@'-linkshared' if d.getVar('GO_DYNLINK') else ''}"
+GO_RPATH_LINK = "${@'-Wl,-rpath-link=${STAGING_DIR_TARGET}${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}"
+GO_RPATH = "${@'-r ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}"
+GO_RPATH_class-native = "${@'-r ${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}"
+GO_RPATH_LINK_class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}"
+GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}"
+GO_LINKMODE ?= ""
+GO_LINKMODE_class-nativesdk = "--linkmode=external"
+GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"'
+export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
+export GOPATH_OMIT_IN_ACTIONID ?= "1"
+export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
+export GOPTESTFLAGS ?= ""
+GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
+
+export GO = "${HOST_PREFIX}go"
+GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
+GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}"
+export GOTOOLDIR
+
+export CGO_ENABLED ?= "1"
+export CGO_CFLAGS ?= "${CFLAGS}"
+export CGO_CPPFLAGS ?= "${CPPFLAGS}"
+export CGO_CXXFLAGS ?= "${CXXFLAGS}"
+export CGO_LDFLAGS ?= "${LDFLAGS}"
+
+GO_INSTALL ?= "${GO_IMPORT}/..."
+GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
+
+B = "${WORKDIR}/build"
+export GOPATH = "${B}"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+
+python go_do_unpack() {
+ src_uri = (d.getVar('SRC_URI') or "").split()
+ if len(src_uri) == 0:
+ return
+
+ fetcher = bb.fetch2.Fetch(src_uri, d)
+ for url in fetcher.urls:
+ if fetcher.ud[url].type == 'git':
+ if fetcher.ud[url].parm.get('destsuffix') is None:
+ s_dirname = os.path.basename(d.getVar('S'))
+ fetcher.ud[url].parm['destsuffix'] = os.path.join(s_dirname, 'src', d.getVar('GO_IMPORT')) + '/'
+ fetcher.unpack(d.getVar('WORKDIR'))
+}
+
+go_list_packages() {
+ ${GO} list -f '{{.ImportPath}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
+ egrep -v '${GO_INSTALL_FILTEROUT}'
+}
+
+go_list_package_tests() {
+ ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
+ grep -v '\[\]$' | \
+ egrep -v '${GO_INSTALL_FILTEROUT}' | \
+ awk '{ print $1 }'
+}
+
+go_do_configure() {
+ ln -snf ${S}/src ${B}/
+}
+do_configure[dirs] =+ "${GOTMPDIR}"
+
+go_do_compile() {
+ export TMPDIR="${GOTMPDIR}"
+ if [ -n "${GO_INSTALL}" ]; then
+ if [ -n "${GO_LINKSHARED}" ]; then
+ ${GO} install ${GOBUILDFLAGS} `go_list_packages`
+ rm -rf ${B}/bin
+ fi
+ ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages`
+ fi
+}
+do_compile[dirs] =+ "${GOTMPDIR}"
+do_compile[cleandirs] = "${B}/bin ${B}/pkg"
+
+go_do_install() {
+ install -d ${D}${libdir}/go/src/${GO_IMPORT}
+ tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' . | \
+ tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf -
+ tar -C ${B} -cf - --exclude-vcs pkg | tar -C ${D}${libdir}/go --no-same-owner -xf -
+
+ if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/${GO_BUILD_BINDIR}/* ${D}${bindir}/
+ fi
+}
+
+go_stage_testdata() {
+ oldwd="$PWD"
+ cd ${S}/src
+ find ${GO_IMPORT} -depth -type d -name testdata | while read d; do
+ if echo "$d" | grep -q '/vendor/'; then
+ continue
+ fi
+ parent=`dirname $d`
+ install -d ${D}${PTEST_PATH}/$parent
+ cp --preserve=mode,timestamps -R $d ${D}${PTEST_PATH}/$parent/
+ done
+ cd "$oldwd"
+}
+
+EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
+
+FILES_${PN}-dev = "${libdir}/go/src"
+FILES_${PN}-staticdev = "${libdir}/go/pkg"
+
+INSANE_SKIP_${PN} += "ldflags"
+
+# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips
+# doesn't support -buildmode=pie, so skip the QA checking for mips and its
+# variants.
+python() {
+ if 'mips' in d.getVar('TARGET_ARCH'):
+ d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
+ else:
+ d.appendVar('GOBUILDFLAGS', ' -buildmode=pie')
+}
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
new file mode 100644
index 0000000000..1147b6d233
--- /dev/null
+++ b/meta/classes/goarch.bbclass
@@ -0,0 +1,118 @@
+BUILD_GOOS = "${@go_map_os(d.getVar('BUILD_OS'), d)}"
+BUILD_GOARCH = "${@go_map_arch(d.getVar('BUILD_ARCH'), d)}"
+BUILD_GOTUPLE = "${BUILD_GOOS}_${BUILD_GOARCH}"
+HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS'), d)}"
+HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}"
+HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d)}"
+HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+HOST_GOMIPS = "${@go_map_mips(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+HOST_GOARM_class-native = "7"
+HOST_GO386_class-native = "sse2"
+HOST_GOMIPS_class-native = "hardfloat"
+HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
+TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}"
+TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}"
+TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d)}"
+TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+TARGET_GOMIPS = "${@go_map_mips(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+TARGET_GOARM_class-native = "7"
+TARGET_GO386_class-native = "sse2"
+TARGET_GOMIPS_class-native = "hardfloat"
+TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
+GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}"
+
+# Use the MACHINEOVERRIDES to map ARM CPU architecture passed to GO via GOARM.
+# This is combined with *_ARCH to set HOST_GOARM and TARGET_GOARM.
+BASE_GOARM = ''
+BASE_GOARM_armv7ve = '7'
+BASE_GOARM_armv7a = '7'
+BASE_GOARM_armv6 = '6'
+BASE_GOARM_armv5 = '5'
+
+# Go supports dynamic linking on a limited set of architectures.
+# See the supportsDynlink function in go/src/cmd/compile/internal/gc/main.go
+GO_DYNLINK = ""
+GO_DYNLINK_arm = "1"
+GO_DYNLINK_aarch64 = "1"
+GO_DYNLINK_x86 = "1"
+GO_DYNLINK_x86-64 = "1"
+GO_DYNLINK_powerpc64 = "1"
+GO_DYNLINK_class-native = ""
+GO_DYNLINK_class-nativesdk = ""
+
+# define here because everybody inherits this class
+#
+COMPATIBLE_HOST_linux-gnux32 = "null"
+COMPATIBLE_HOST_linux-muslx32 = "null"
+COMPATIBLE_HOST_powerpc = "null"
+COMPATIBLE_HOST_powerpc64 = "null"
+COMPATIBLE_HOST_mipsarchn32 = "null"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
+TUNE_CCARGS_remove = "-march=mips32r2"
+SECURITY_CFLAGS_mipsarch = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_NOPIE_CFLAGS ??= ""
+
+# go can't be built with ccache:
+# gcc: fatal error: no input files
+CCACHE_DISABLE ?= "1"
+
+def go_map_arch(a, d):
+ import re
+ if re.match('i.86', a):
+ return '386'
+ elif a == 'x86_64':
+ return 'amd64'
+ elif re.match('arm.*', a):
+ return 'arm'
+ elif re.match('aarch64.*', a):
+ return 'arm64'
+ elif re.match('mips64el.*', a):
+ return 'mips64le'
+ elif re.match('mips64.*', a):
+ return 'mips64'
+ elif a == 'mips':
+ return 'mips'
+ elif a == 'mipsel':
+ return 'mipsle'
+ elif re.match('p(pc|owerpc)(64)', a):
+ return 'ppc64'
+ elif re.match('p(pc|owerpc)(64el)', a):
+ return 'ppc64le'
+ elif a == 'riscv64':
+ return 'riscv64'
+ else:
+ raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
+
+def go_map_arm(a, d):
+ if a.startswith("arm"):
+ return d.getVar('BASE_GOARM')
+ return ''
+
+def go_map_386(a, f, d):
+ import re
+ if re.match('i.86', a):
+ if ('core2' in f) or ('corei7' in f):
+ return 'sse2'
+ else:
+ return '387'
+ return ''
+
+def go_map_mips(a, f, d):
+ import re
+ if a == 'mips' or a == 'mipsel':
+ if 'fpu-hard' in f:
+ return 'hardfloat'
+ else:
+ return 'softfloat'
+ return ''
+
+def go_map_os(o, d):
+ if o.startswith('linux'):
+ return 'linux'
+ return o
+
+
diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass
index 37389cbc8b..504f75e28d 100644
--- a/meta/classes/gobject-introspection.bbclass
+++ b/meta/classes/gobject-introspection.bbclass
@@ -6,18 +6,28 @@
# This also sets up autoconf-based recipes to build introspection data (or not),
# depending on distro and machine features (see gobject-introspection-data class).
inherit python3native gobject-introspection-data
+
+# meson: default option name to enable/disable introspection. This matches most
+# project's configuration. In doubts - check meson_options.txt in project's
+# source path.
+GIR_MESON_OPTION ?= 'introspection'
+GIR_MESON_ENABLE_FLAG ?= 'true'
+GIR_MESON_DISABLE_FLAG ?= 'false'
+
+# Auto enable/disable based on GI_DATA_ENABLED
EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} "
+EXTRA_OEMESON_prepend_class-target = "-D${GIR_MESON_OPTION}=${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GIR_MESON_ENABLE_FLAG}', '${GIR_MESON_DISABLE_FLAG}', d)} "
# When building native recipes, disable introspection, as it is not necessary,
# pulls in additional dependencies, and makes build times longer
EXTRA_OECONF_prepend_class-native = "--disable-introspection "
EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection "
-
-UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection"
+EXTRA_OEMESON_prepend_class-native = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} "
+EXTRA_OEMESON_prepend_class-nativesdk = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} "
# Generating introspection data depends on a combination of native and target
# introspection tools, and qemu to run the target tools.
-DEPENDS_append_class-target = " gobject-introspection gobject-introspection-native qemu-native"
+DEPENDS_append_class-target = " gobject-introspection gobject-introspection-native qemu-native prelink-native"
# Even though introspection is disabled on -native, gobject-introspection package is still
# needed for m4 macros.
@@ -25,7 +35,7 @@ DEPENDS_append_class-native = " gobject-introspection-native"
DEPENDS_append_class-nativesdk = " gobject-introspection-native"
# This is used by introspection tools to find .gir includes
-export XDG_DATA_DIRS = "${STAGING_DATADIR}"
+export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}"
do_configure_prepend_class-target () {
# introspection.m4 pre-packaged with upstream tarballs does not yet
@@ -40,4 +50,4 @@ FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
# .gir files go to dev package, as they're needed for developing (but not for
# running) things that depends on introspection.
-FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir"
diff --git a/meta/classes/godep.bbclass b/meta/classes/godep.bbclass
new file mode 100644
index 0000000000..c82401c313
--- /dev/null
+++ b/meta/classes/godep.bbclass
@@ -0,0 +1,8 @@
+DEPENDS_append = " go-dep-native"
+
+do_compile_prepend() {
+ rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.toml
+ rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.lock
+ ( cd ${WORKDIR}/build/src/${GO_IMPORT} && dep init && dep ensure )
+}
+
diff --git a/meta/classes/grub-efi-cfg.bbclass b/meta/classes/grub-efi-cfg.bbclass
new file mode 100644
index 0000000000..8b5ff20c72
--- /dev/null
+++ b/meta/classes/grub-efi-cfg.bbclass
@@ -0,0 +1,116 @@
+# grub-efi.bbclass
+# Copyright (c) 2011, Intel Corporation.
+# All rights reserved.
+#
+# Released under the MIT license (see packages/COPYING)
+
+# Provide grub-efi specific functions for building bootable images.
+
+# External variables
+# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
+# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
+# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
+# ${LABELS} - a list of targets for the automatic config
+# ${APPEND} - an override list of append strings for each label
+# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
+# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
+# ${GRUB_ROOT} - grub's root device.
+
+GRUB_SERIAL ?= "console=ttyS0,115200"
+GRUB_CFG_VM = "${S}/grub_vm.cfg"
+GRUB_CFG_LIVE = "${S}/grub_live.cfg"
+GRUB_TIMEOUT ?= "10"
+#FIXME: build this from the machine config
+GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
+
+GRUB_ROOT ?= "${ROOT}"
+APPEND ?= ""
+
+# Uses MACHINE specific KERNEL_IMAGETYPE
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# Need UUID utility code.
+inherit fs-uuid
+
+python build_efi_cfg() {
+ import sys
+
+ workdir = d.getVar('WORKDIR')
+ if not workdir:
+ bb.error("WORKDIR not defined, unable to package")
+ return
+
+ gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
+
+ labels = d.getVar('LABELS')
+ if not labels:
+ bb.debug(1, "LABELS not defined, nothing to do")
+ return
+
+ if labels == []:
+ bb.debug(1, "No labels, nothing to do")
+ return
+
+ cfile = d.getVar('GRUB_CFG')
+ if not cfile:
+ bb.fatal('Unable to read GRUB_CFG')
+
+ try:
+ cfgfile = open(cfile, 'w')
+ except OSError:
+ bb.fatal('Unable to open %s' % cfile)
+
+ cfgfile.write('# Automatically created by OE\n')
+
+ opts = d.getVar('GRUB_OPTS')
+ if opts:
+ for opt in opts.split(';'):
+ cfgfile.write('%s\n' % opt)
+
+ cfgfile.write('default=%s\n' % (labels.split()[0]))
+
+ timeout = d.getVar('GRUB_TIMEOUT')
+ if timeout:
+ cfgfile.write('timeout=%s\n' % timeout)
+ else:
+ cfgfile.write('timeout=50\n')
+
+ root = d.getVar('GRUB_ROOT')
+ if not root:
+ bb.fatal('GRUB_ROOT not defined')
+
+ if gfxserial == "1":
+ btypes = [ [ " graphics console", "" ],
+ [ " serial console", d.getVar('GRUB_SERIAL') or "" ] ]
+ else:
+ btypes = [ [ "", "" ] ]
+
+ for label in labels.split():
+ localdata = d.createCopy()
+
+ for btype in btypes:
+ cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
+ lb = label
+ if label == "install":
+ lb = "install-efi"
+ kernel = localdata.getVar('KERNEL_IMAGETYPE')
+ cfgfile.write('linux /%s LABEL=%s' % (kernel, lb))
+
+ cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
+
+ append = localdata.getVar('APPEND')
+ initrd = localdata.getVar('INITRD')
+
+ if append:
+ append = replace_rootfs_uuid(d, append)
+ cfgfile.write(' %s' % (append))
+
+ cfgfile.write(' %s' % btype[1])
+ cfgfile.write('\n')
+
+ if initrd:
+ cfgfile.write('initrd /initrd')
+ cfgfile.write('\n}\n')
+
+ cfgfile.close()
+}
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 178d0c8350..8fc6999e52 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -1,158 +1,8 @@
-# grub-efi.bbclass
-# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
-#
-# Released under the MIT license (see packages/COPYING)
-
-# Provide grub-efi specific functions for building bootable images.
-
-# External variables
-# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
-# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
-# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
-# ${LABELS} - a list of targets for the automatic config
-# ${APPEND} - an override list of append strings for each label
-# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
-# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
-# ${GRUB_ROOT} - grub's root device.
-
-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
-
-GRUB_SERIAL ?= "console=ttyS0,115200"
-GRUB_CFG_VM = "${S}/grub_vm.cfg"
-GRUB_CFG_LIVE = "${S}/grub_live.cfg"
-GRUB_TIMEOUT ?= "10"
-#FIXME: build this from the machine config
-GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
-
-EFIDIR = "/EFI/BOOT"
-GRUB_ROOT ?= "${ROOT}"
-APPEND ?= ""
-
-# Need UUID utility code.
-inherit fs-uuid
+inherit grub-efi-cfg
+require conf/image-uefi.conf
efi_populate() {
- # DEST must be the root of the image so that EFIDIR is not
- # nested under a top level directory.
- DEST=$1
-
- install -d ${DEST}${EFIDIR}
-
- GRUB_IMAGE="bootia32.efi"
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- GRUB_IMAGE="bootx64.efi"
- fi
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
- EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" >${DEST}/startup.nsh
+ efi_populate_common "$1" grub-efi
install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
}
-
-efi_iso_populate() {
- iso_dir=$1
- efi_populate $iso_dir
- # Build a EFI directory to create efi.img
- mkdir -p ${EFIIMGDIR}/${EFIDIR}
- cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
- cp $iso_dir/vmlinuz ${EFIIMGDIR}
- EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
- if [ -f "$iso_dir/initrd" ] ; then
- cp $iso_dir/initrd ${EFIIMGDIR}
- fi
-}
-
-efi_hddimg_populate() {
- efi_populate $1
-}
-
-python build_efi_cfg() {
- import sys
-
- workdir = d.getVar('WORKDIR', True)
- if not workdir:
- bb.error("WORKDIR not defined, unable to package")
- return
-
- gfxserial = d.getVar('GRUB_GFXSERIAL', True) or ""
-
- labels = d.getVar('LABELS', True)
- if not labels:
- bb.debug(1, "LABELS not defined, nothing to do")
- return
-
- if labels == []:
- bb.debug(1, "No labels, nothing to do")
- return
-
- cfile = d.getVar('GRUB_CFG', True)
- if not cfile:
- raise bb.build.FuncFailed('Unable to read GRUB_CFG')
-
- try:
- cfgfile = open(cfile, 'w')
- except OSError:
- raise bb.build.FuncFailed('Unable to open %s' % (cfile))
-
- cfgfile.write('# Automatically created by OE\n')
-
- opts = d.getVar('GRUB_OPTS', True)
- if opts:
- for opt in opts.split(';'):
- cfgfile.write('%s\n' % opt)
-
- cfgfile.write('default=%s\n' % (labels.split()[0]))
-
- timeout = d.getVar('GRUB_TIMEOUT', True)
- if timeout:
- cfgfile.write('timeout=%s\n' % timeout)
- else:
- cfgfile.write('timeout=50\n')
-
- root = d.getVar('GRUB_ROOT', True)
- if not root:
- raise bb.build.FuncFailed('GRUB_ROOT not defined')
-
- if gfxserial == "1":
- btypes = [ [ " graphics console", "" ],
- [ " serial console", d.getVar('GRUB_SERIAL', True) or "" ] ]
- else:
- btypes = [ [ "", "" ] ]
-
- for label in labels.split():
- localdata = d.createCopy()
-
- overrides = localdata.getVar('OVERRIDES', True)
- if not overrides:
- raise bb.build.FuncFailed('OVERRIDES not defined')
-
- for btype in btypes:
- localdata.setVar('OVERRIDES', label + ':' + overrides)
- bb.data.update_data(localdata)
-
- cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
- lb = label
- if label == "install":
- lb = "install-efi"
- cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
-
- cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
-
- append = localdata.getVar('APPEND', True)
- initrd = localdata.getVar('INITRD', True)
-
- if append:
- append = replace_rootfs_uuid(d, append)
- cfgfile.write('%s' % (append))
- cfgfile.write(' %s' % btype[1])
- cfgfile.write('\n')
-
- if initrd:
- cfgfile.write('initrd /initrd')
- cfgfile.write('\n}\n')
-
- cfgfile.close()
-}
diff --git a/meta/classes/gsettings.bbclass b/meta/classes/gsettings.bbclass
index dec5abc026..33afc96a9c 100644
--- a/meta/classes/gsettings.bbclass
+++ b/meta/classes/gsettings.bbclass
@@ -7,31 +7,36 @@
# TODO use a trigger so that this runs once per package operation run
-DEPENDS += "glib-2.0-native"
-
-RDEPENDS_${PN} += "glib-2.0-utils"
-
-FILES_${PN} += "${datadir}/glib-2.0/schemas"
+GSETTINGS_PACKAGE ?= "${PN}"
+
+python __anonymous() {
+ pkg = d.getVar("GSETTINGS_PACKAGE")
+ if pkg:
+ d.appendVar("PACKAGE_WRITE_DEPS", " glib-2.0-native")
+ d.appendVar("RDEPENDS_" + pkg, " ${MLPREFIX}glib-2.0-utils")
+ d.appendVar("FILES_" + pkg, " ${datadir}/glib-2.0/schemas")
+}
gsettings_postinstrm () {
glib-compile-schemas $D${datadir}/glib-2.0/schemas
}
python populate_packages_append () {
- pkg = d.getVar('PN', True)
- bb.note("adding gsettings postinst scripts to %s" % pkg)
-
- postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
- if not postinst:
- postinst = '#!/bin/sh\n'
- postinst += d.getVar('gsettings_postinstrm', True)
- d.setVar('pkg_postinst_%s' % pkg, postinst)
-
- bb.note("adding gsettings postrm scripts to %s" % pkg)
-
- postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True)
- if not postrm:
- postrm = '#!/bin/sh\n'
- postrm += d.getVar('gsettings_postinstrm', True)
- d.setVar('pkg_postrm_%s' % pkg, postrm)
+ pkg = d.getVar('GSETTINGS_PACKAGE')
+ if pkg:
+ bb.note("adding gsettings postinst scripts to %s" % pkg)
+
+ postinst = d.getVar('pkg_postinst_%s' % pkg) or d.getVar('pkg_postinst')
+ if not postinst:
+ postinst = '#!/bin/sh\n'
+ postinst += d.getVar('gsettings_postinstrm')
+ d.setVar('pkg_postinst_%s' % pkg, postinst)
+
+ bb.note("adding gsettings postrm scripts to %s" % pkg)
+
+ postrm = d.getVar('pkg_postrm_%s' % pkg) or d.getVar('pkg_postrm')
+ if not postrm:
+ postrm = '#!/bin/sh\n'
+ postrm += d.getVar('gsettings_postinstrm')
+ d.setVar('pkg_postrm_%s' % pkg, postrm)
}
diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index 297eac63b7..7dd662bf86 100644
--- a/meta/classes/gtk-doc.bbclass
+++ b/meta/classes/gtk-doc.bbclass
@@ -10,47 +10,62 @@
GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \
bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}"
+# meson: default option name to enable/disable gtk-doc. This matches most
+# project's configuration. In doubts - check meson_options.txt in project's
+# source path.
+GTKDOC_MESON_OPTION ?= 'docs'
+GTKDOC_MESON_ENABLE_FLAG ?= 'true'
+GTKDOC_MESON_DISABLE_FLAG ?= 'false'
+
+# Auto enable/disable based on GTKDOC_ENABLED
EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \
'--disable-gtk-doc', d)} "
+EXTRA_OEMESON_prepend_class-target = "-D${GTKDOC_MESON_OPTION}=${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_MESON_ENABLE_FLAG}', '${GTKDOC_MESON_DISABLE_FLAG}', d)} "
# When building native recipes, disable gtkdoc, as it is not necessary,
# pulls in additional dependencies, and makes build times longer
EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc "
EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc "
-
-DEPENDS_append_class-target = " gtk-doc-native qemu-native"
+EXTRA_OEMESON_prepend_class-native = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} "
+EXTRA_OEMESON_prepend_class-nativesdk = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} "
# Even though gtkdoc is disabled on -native, gtk-doc package is still
# needed for m4 macros.
-DEPENDS_append_class-native = " gtk-doc-native"
-DEPENDS_append_class-nativesdk = " gtk-doc-native"
+DEPENDS_append = " gtk-doc-native"
# The documentation directory, where the infrastructure will be copied.
# gtkdocize has a default of "." so to handle out-of-tree builds set this to $S.
GTKDOC_DOCDIR ?= "${S}"
-do_configure_prepend () {
- ( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
-}
+export STAGING_DIR_HOST
-inherit qemu
+inherit python3native pkgconfig qemu
+DEPENDS_append = "${@' qemu-native' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
-export STAGING_DIR_HOST
+do_configure_prepend () {
+ # Need to use ||true as this is only needed if configure.ac both exists
+ # and uses GTK_DOC_CHECK.
+ gtkdocize --srcdir ${S} --docdir ${GTKDOC_DOCDIR} || true
+}
do_compile_prepend_class-target () {
-
+ if [ ${GTKDOC_ENABLED} = True ]; then
# Write out a qemu wrapper that will be given to gtkdoc-scangobj so that it
# can run target helper binaries through that.
- qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+ qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
cat > ${B}/gtkdoc-qemuwrapper << EOF
#!/bin/sh
# Use a modules directory which doesn't exist so we don't load random things
# which may then get deleted (or their dependencies) and potentially segfault
export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
+GIR_EXTRA_LIBS_PATH=\`find ${B} -name *.so -printf "%h\n"|sort|uniq| tr '\n' ':'\`\$GIR_EXTRA_LIBS_PATH
GIR_EXTRA_LIBS_PATH=\`find ${B} -name .libs| tr '\n' ':'\`\$GIR_EXTRA_LIBS_PATH
-if test -d ".libs"; then
+# meson sets this wrongly (only to libs in build-dir), qemu-wrapper_cmdline() and GIR_EXTRA_LIBS_PATH take care of it properly
+unset LD_LIBRARY_PATH
+
+if [ -d ".libs" ]; then
$qemu_binary ".libs/\$@"
else
$qemu_binary "\$@"
@@ -63,7 +78,5 @@ if [ \$? -ne 0 ]; then
fi
EOF
chmod +x ${B}/gtkdoc-qemuwrapper
+ fi
}
-
-
-inherit pkgconfig
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index 0f1052b08c..91cb4ad409 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -1,10 +1,12 @@
FILES_${PN} += "${datadir}/icons/hicolor"
-DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk-icon-utils-native"
+DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+3-native"
+
+PACKAGE_WRITE_DEPS += "gtk+3-native gdk-pixbuf-native"
gtk_icon_cache_postinst() {
if [ "x$D" != "x" ]; then
- $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \
+ $INTERCEPT_DIR/postinst_intercept update_gtk_icon_cache ${PKG} \
mlprefix=${MLPREFIX} \
libdir_native=${libdir_native}
else
@@ -22,7 +24,7 @@ fi
gtk_icon_cache_postrm() {
if [ "x$D" != "x" ]; then
- $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \
+ $INTERCEPT_DIR/postinst_intercept update_gtk_icon_cache ${PKG} \
mlprefix=${MLPREFIX} \
libdir=${libdir}
else
@@ -35,11 +37,11 @@ fi
}
python populate_packages_append () {
- packages = d.getVar('PACKAGES', True).split()
- pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar('PACKAGES').split()
+ pkgdest = d.getVar('PKGDEST')
for pkg in packages:
- icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, d.getVar('datadir', True))
+ icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, d.getVar('datadir'))
if not os.path.exists(icon_dir):
continue
@@ -49,16 +51,16 @@ python populate_packages_append () {
bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += d.getVar('gtk_icon_cache_postinst', True)
+ postinst += d.getVar('gtk_icon_cache_postinst')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- postrm = d.getVar('pkg_postrm_%s' % pkg, True)
+ postrm = d.getVar('pkg_postrm_%s' % pkg)
if not postrm:
postrm = '#!/bin/sh\n'
- postrm += d.getVar('gtk_icon_cache_postrm', True)
+ postrm += d.getVar('gtk_icon_cache_postrm')
d.setVar('pkg_postrm_%s' % pkg, postrm)
}
diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass
index 3a4634c4ed..9bb0af8b26 100644
--- a/meta/classes/gtk-immodules-cache.bbclass
+++ b/meta/classes/gtk-immodules-cache.bbclass
@@ -2,7 +2,7 @@
#
# Usage: Set GTKIMMODULES_PACKAGES to the packages that needs to update the inputmethod modules
-DEPENDS =+ "qemu-native"
+PACKAGE_WRITE_DEPS += "qemu-native"
inherit qemu
@@ -10,72 +10,58 @@ GTKIMMODULES_PACKAGES ?= "${PN}"
gtk_immodule_cache_postinst() {
if [ "x$D" != "x" ]; then
- if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then
- IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so)
- ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \
- $IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null &&
- sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
- fi
- if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
- IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so)
- ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \
- $IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null &&
- sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
- fi
-
- [ $? -ne 0 ] && exit 1
- exit 0
-fi
-if [ ! -z `which gtk-query-immodules-2.0` ]; then
- gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache
-fi
-if [ ! -z `which gtk-query-immodules-3.0` ]; then
- gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache
+ $INTERCEPT_DIR/postinst_intercept update_gtk_immodules_cache ${PKG} \
+ mlprefix=${MLPREFIX} \
+ binprefix=${MLPREFIX} \
+ libdir=${libdir} \
+ libexecdir=${libexecdir} \
+ base_libdir=${base_libdir} \
+ bindir=${bindir}
+else
+ if [ ! -z `which gtk-query-immodules-2.0` ]; then
+ gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache
+ fi
+ if [ ! -z `which gtk-query-immodules-3.0` ]; then
+ gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache
+ fi
fi
}
gtk_immodule_cache_postrm() {
if [ "x$D" != "x" ]; then
- if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then
- IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so)
- ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \
- $IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null &&
- sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
- fi
- if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
- IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so)
- ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \
- $IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null &&
- sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
- fi
-
- [ $? -ne 0 ] && exit 1
- exit 0
-fi
-if [ ! -z `which gtk-query-immodules-2.0` ]; then
- gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache
-fi
-if [ ! -z `which gtk-query-immodules-3.0` ]; then
- gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache
+ $INTERCEPT_DIR/postinst_intercept update_gtk_immodules_cache ${PKG} \
+ mlprefix=${MLPREFIX} \
+ binprefix=${MLPREFIX} \
+ libdir=${libdir} \
+ libexecdir=${libexecdir} \
+ base_libdir=${base_libdir} \
+ bindir=${bindir}
+else
+ if [ ! -z `which gtk-query-immodules-2.0` ]; then
+ gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache
+ fi
+ if [ ! -z `which gtk-query-immodules-3.0` ]; then
+ gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache
+ fi
fi
}
python populate_packages_append () {
- gtkimmodules_pkgs = d.getVar('GTKIMMODULES_PACKAGES', True).split()
+ gtkimmodules_pkgs = d.getVar('GTKIMMODULES_PACKAGES').split()
for pkg in gtkimmodules_pkgs:
bb.note("adding gtk-immodule-cache postinst and postrm scripts to %s" % pkg)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += d.getVar('gtk_immodule_cache_postinst', True)
+ postinst += d.getVar('gtk_immodule_cache_postinst')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- postrm = d.getVar('pkg_postrm_%s' % pkg, True)
+ postrm = d.getVar('pkg_postrm_%s' % pkg)
if not postrm:
postrm = '#!/bin/sh\n'
- postrm += d.getVar('gtk_immodule_cache_postrm', True)
+ postrm += d.getVar('gtk_immodule_cache_postrm')
d.setVar('pkg_postrm_%s' % pkg, postrm)
}
@@ -84,6 +70,6 @@ python __anonymous() {
gtkimmodules_check = d.getVar('GTKIMMODULES_PACKAGES', False)
if not gtkimmodules_check:
bb_filename = d.getVar('FILE', False)
- raise bb.build.FuncFailed("ERROR: %s inherits gtk-immodules-cache but doesn't set GTKIMMODULES_PACKAGES" % bb_filename)
+ bb.fatal("ERROR: %s inherits gtk-immodules-cache but doesn't set GTKIMMODULES_PACKAGES" % bb_filename)
}
diff --git a/meta/classes/gummiboot.bbclass b/meta/classes/gummiboot.bbclass
deleted file mode 100644
index e6eba17da1..0000000000
--- a/meta/classes/gummiboot.bbclass
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright (C) 2014 Intel Corporation
-#
-# Released under the MIT license (see COPYING.MIT)
-
-# gummiboot.bbclass - equivalent of grub-efi.bbclass
-# Set EFI_PROVIDER = "gummiboot" to use gummiboot on your live images instead of grub-efi
-# (images built by image-live.bbclass or image-vm.bbclass)
-
-do_bootimg[depends] += "${MLPREFIX}gummiboot:do_deploy"
-do_bootdirectdisk[depends] += "${MLPREFIX}gummiboot:do_deploy"
-
-EFIDIR = "/EFI/BOOT"
-
-GUMMIBOOT_CFG ?= "${S}/loader.conf"
-GUMMIBOOT_ENTRIES ?= ""
-GUMMIBOOT_TIMEOUT ?= "10"
-
-# Need UUID utility code.
-inherit fs-uuid
-
-efi_populate() {
- DEST=$1
-
- EFI_IMAGE="gummibootia32.efi"
- DEST_EFI_IMAGE="bootia32.efi"
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- EFI_IMAGE="gummibootx64.efi"
- DEST_EFI_IMAGE="bootx64.efi"
- fi
-
- install -d ${DEST}${EFIDIR}
- # gummiboot requires these paths for configuration files
- # they are not customizable so no point in new vars
- install -d ${DEST}/loader
- install -d ${DEST}/loader/entries
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE}
- EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh
- install -m 0644 ${GUMMIBOOT_CFG} ${DEST}/loader/loader.conf
- for i in ${GUMMIBOOT_ENTRIES}; do
- install -m 0644 ${i} ${DEST}/loader/entries
- done
-}
-
-efi_iso_populate() {
- iso_dir=$1
- efi_populate $iso_dir
- mkdir -p ${EFIIMGDIR}/${EFIDIR}
- cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
- cp $iso_dir/vmlinuz ${EFIIMGDIR}
- EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh
- if [ -f "$iso_dir/initrd" ] ; then
- cp $iso_dir/initrd ${EFIIMGDIR}
- fi
-}
-
-efi_hddimg_populate() {
- efi_populate $1
-}
-
-python build_efi_cfg() {
- s = d.getVar("S", True)
- labels = d.getVar('LABELS', True)
- if not labels:
- bb.debug(1, "LABELS not defined, nothing to do")
- return
-
- if labels == []:
- bb.debug(1, "No labels, nothing to do")
- return
-
- cfile = d.getVar('GUMMIBOOT_CFG', True)
- try:
- cfgfile = open(cfile, 'w')
- except OSError:
- raise bb.build.FuncFailed('Unable to open %s' % (cfile))
-
- cfgfile.write('# Automatically created by OE\n')
- cfgfile.write('default %s\n' % (labels.split()[0]))
- timeout = d.getVar('GUMMIBOOT_TIMEOUT', True)
- if timeout:
- cfgfile.write('timeout %s\n' % timeout)
- else:
- cfgfile.write('timeout 10\n')
- cfgfile.close()
-
- for label in labels.split():
- localdata = d.createCopy()
-
- overrides = localdata.getVar('OVERRIDES', True)
- if not overrides:
- raise bb.build.FuncFailed('OVERRIDES not defined')
-
- entryfile = "%s/%s.conf" % (s, label)
- d.appendVar("GUMMIBOOT_ENTRIES", " " + entryfile)
- try:
- entrycfg = open(entryfile, "w")
- except OSError:
- raise bb.build.FuncFailed('Unable to open %s' % (entryfile))
- localdata.setVar('OVERRIDES', label + ':' + overrides)
- bb.data.update_data(localdata)
-
- entrycfg.write('title %s\n' % label)
- entrycfg.write('linux /vmlinuz\n')
-
- append = localdata.getVar('APPEND', True)
- initrd = localdata.getVar('INITRD', True)
-
- if initrd:
- entrycfg.write('initrd /initrd\n')
- lb = label
- if label == "install":
- lb = "install-efi"
- entrycfg.write('options LABEL=%s ' % lb)
- if append:
- append = replace_rootfs_uuid(d, append)
- entrycfg.write('%s' % append)
- entrycfg.write('\n')
- entrycfg.close()
-}
diff --git a/meta/classes/gzipnative.bbclass b/meta/classes/gzipnative.bbclass
deleted file mode 100644
index 326cbbb6f6..0000000000
--- a/meta/classes/gzipnative.bbclass
+++ /dev/null
@@ -1,5 +0,0 @@
-EXTRANATIVEPATH += "pigz-native gzip-native"
-DEPENDS += "gzip-native"
-
-# tar may get run by do_unpack or do_populate_lic which could call gzip
-do_unpack[depends] += "gzip-native:do_populate_sysroot"
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index e1c06c49cb..bc3d6f4cc8 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -28,70 +28,106 @@
#Error checking is kept to minimum so double check any parameters you pass to the class
###########################################################################################
-BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC"
+BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL \
+ ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC \
+ ICECC_CARET_WORKAROUND ICECC_CFLAGS ICECC_ENV_VERSION \
+ ICECC_DEBUG ICECC_LOGFILE ICECC_REPEAT_RATE ICECC_PREFERRED_HOST \
+ ICECC_CLANG_REMOTE_CPP ICECC_IGNORE_UNVERIFIED ICECC_TEST_SOCKET \
+ ICECC_ENV_DEBUG ICECC_SYSTEM_PACKAGE_BL ICECC_SYSTEM_CLASS_BL \
+ ICECC_REMOTE_CPP \
+ "
ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
+HOSTTOOLS_NONFATAL += "icecc patchelf"
+
+# This version can be incremented when changes are made to the environment that
+# invalidate the version on the compile nodes. Changing it will cause a new
+# environment to be created.
+#
+# A useful thing to do for testing Icecream changes locally is to add a
+# subversion in local.conf:
+# ICECC_ENV_VERSION_append = "-my-ver-1"
+ICECC_ENV_VERSION = "2"
+
+# Default to disabling the caret workaround, If set to "1" in local.conf, icecc
+# will locally recompile any files that have warnings, which can adversely
+# affect performance.
+#
+# See: https://github.com/icecc/icecream/issues/190
+export ICECC_CARET_WORKAROUND ??= "0"
+
+export ICECC_REMOTE_CPP ??= "0"
+
+ICECC_CFLAGS = ""
+CFLAGS += "${ICECC_CFLAGS}"
+CXXFLAGS += "${ICECC_CFLAGS}"
+
+# Debug flags when generating environments
+ICECC_ENV_DEBUG ??= ""
+
+# "system" recipe blacklist contains a list of packages that can not distribute
+# compile tasks for one reason or the other. When adding new entry, please
+# document why (how it failed) so that we can re-evaluate it later e.g. when
+# there is new version
+#
+# libgcc-initial - fails with CPP sanity check error if host sysroot contains
+# cross gcc built for another target tune/variant
+# pixman - prng_state: TLS reference mismatches non-TLS reference, possibly due to
+# pragma omp threadprivate(prng_state)
+# systemtap - _HelperSDT.c undefs macros and uses the identifiers in macros emitting
+# inline assembly
+# target-sdk-provides-dummy - ${HOST_PREFIX} is empty which triggers the "NULL
+# prefix" error.
+ICECC_SYSTEM_PACKAGE_BL += "\
+ libgcc-initial \
+ pixman \
+ systemtap \
+ target-sdk-provides-dummy \
+ "
+
+# "system" classes that should be blacklisted. When adding new entry, please
+# document why (how it failed) so that we can re-evaluate it later
+#
+# image - Image aren't compiling, but the testing framework for images captures
+# PARALLEL_MAKE as part of the test environment. Many tests won't use
+# icecream, but leaving the high level of parallelism can cause them to
+# consume an unnecessary amount of resources.
+ICECC_SYSTEM_CLASS_BL += "\
+ image \
+ "
+
def icecc_dep_prepend(d):
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# we need that built is the responsibility of the patch function / class, not
# the application.
- if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
+ if not d.getVar('INHIBIT_DEFAULT_DEPS'):
return "icecc-create-env-native"
return ""
DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
+get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
def get_cross_kernel_cc(bb,d):
- kernel_cc = d.getVar('KERNEL_CC', False)
+ if not icecc_is_kernel(bb, d):
+ return None
# evaluate the expression by the shell if necessary
+ kernel_cc = d.getVar('KERNEL_CC')
if '`' in kernel_cc or '$(' in kernel_cc:
- kernel_cc = os.popen("echo %s" % kernel_cc).read()[:-1]
+ import subprocess
+ kernel_cc = subprocess.check_output("echo %s" % kernel_cc, shell=True).decode("utf-8")[:-1]
- kernel_cc = d.expand(kernel_cc)
kernel_cc = kernel_cc.replace('ccache', '').strip()
kernel_cc = kernel_cc.split(' ')[0]
kernel_cc = kernel_cc.strip()
return kernel_cc
def get_icecc(d):
- return d.getVar('ICECC_PATH', False) or bb.utils.which(os.getenv("PATH"), "icecc")
-
-def create_path(compilers, bb, d):
- """
- Create Symlinks for the icecc in the staging directory
- """
- staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
- if icecc_is_kernel(bb, d):
- staging += "-kernel"
-
- #check if the icecc path is set by the user
- icecc = get_icecc(d)
-
- # Create the dir if necessary
- try:
- os.stat(staging)
- except:
- try:
- os.makedirs(staging)
- except:
- pass
-
- for compiler in compilers:
- gcc_path = os.path.join(staging, compiler)
- try:
- os.stat(gcc_path)
- except:
- try:
- os.symlink(icecc, gcc_path)
- except:
- pass
-
- return staging
+ return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc")
def use_icecc(bb,d):
- if d.getVar('ICECC_DISABLED', False) == "1":
+ if d.getVar('ICECC_DISABLED') == "1":
# don't even try it, when explicitly disabled
return "no"
@@ -99,10 +135,24 @@ def use_icecc(bb,d):
if icecc_is_allarch(bb, d):
return "no"
- pn = d.getVar('PN', True)
+ if icecc_is_cross_canadian(bb, d):
+ return "no"
- system_class_blacklist = []
- user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL', False) or "none").split()
+ if d.getVar('INHIBIT_DEFAULT_DEPS', False):
+ # We don't have a compiler, so no icecc
+ return "no"
+
+ pn = d.getVar('PN')
+ bpn = d.getVar('BPN')
+
+ # Blacklist/whitelist checks are made against BPN, because there is a good
+ # chance that if icecc should be skipped for a recipe, it should be skipped
+ # for all the variants of that recipe. PN is still checked in case a user
+ # specified a more specific recipe.
+ check_pn = set([pn, bpn])
+
+ system_class_blacklist = (d.getVar('ICECC_SYSTEM_CLASS_BL') or "").split()
+ user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
package_class_blacklist = system_class_blacklist + user_class_blacklist
for black in package_class_blacklist:
@@ -110,35 +160,27 @@ def use_icecc(bb,d):
bb.debug(1, "%s: class %s found in blacklist, disable icecc" % (pn, black))
return "no"
- # "system" recipe blacklist contains a list of packages that can not distribute compile tasks
- # for one reason or the other
- # this is the old list (which doesn't seem to be valid anymore, because I was able to build
- # all these with icecc enabled)
- # system_package_blacklist = [ "uclibc", "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman", "orbit2" ]
- # when adding new entry, please document why (how it failed) so that we can re-evaluate it later
- # e.g. when there is new version
- # building libgcc-initial with icecc fails with CPP sanity check error if host sysroot contains cross gcc built for another target tune/variant
- system_package_blacklist = ["libgcc-initial"]
- user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL', False) or "").split()
- user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL', False) or "").split()
+ system_package_blacklist = (d.getVar('ICECC_SYSTEM_PACKAGE_BL') or "").split()
+ user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
+ user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist
- if pn in package_blacklist:
+ if check_pn & set(package_blacklist):
bb.debug(1, "%s: found in blacklist, disable icecc" % pn)
return "no"
- if pn in user_package_whitelist:
+ if check_pn & set(user_package_whitelist):
bb.debug(1, "%s: found in whitelist, enable icecc" % pn)
return "yes"
- if d.getVar('PARALLEL_MAKE', False) == "":
+ if d.getVar('PARALLEL_MAKE') == "":
bb.debug(1, "%s: has empty PARALLEL_MAKE, disable icecc" % pn)
return "no"
return "yes"
def icecc_is_allarch(bb, d):
- return d.getVar("PACKAGE_ARCH", True) == "all" or bb.data.inherits_class('allarch', d)
+ return d.getVar("PACKAGE_ARCH") == "all"
def icecc_is_kernel(bb, d):
return \
@@ -149,16 +191,27 @@ def icecc_is_native(bb, d):
bb.data.inherits_class("cross", d) or \
bb.data.inherits_class("native", d);
+def icecc_is_cross_canadian(bb, d):
+ return bb.data.inherits_class("cross-canadian", d)
+
+def icecc_dir(bb, d):
+ return d.expand('${TMPDIR}/work-shared/ice')
+
# Don't pollute allarch signatures with TARGET_FPU
icecc_version[vardepsexclude] += "TARGET_FPU"
def icecc_version(bb, d):
if use_icecc(bb, d) == "no":
return ""
- parallel = d.getVar('ICECC_PARALLEL_MAKE', False) or ""
- if not d.getVar('PARALLEL_MAKE', False) == "" and parallel:
+ parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
+ if not d.getVar('PARALLEL_MAKE') == "" and parallel:
d.setVar("PARALLEL_MAKE", parallel)
+ # Disable showing the caret in the GCC compiler output if the workaround is
+ # disabled
+ if d.getVar('ICECC_CARET_WORKAROUND') == '0':
+ d.setVar('ICECC_CFLAGS', '-fno-diagnostics-show-caret')
+
if icecc_is_native(bb, d):
archive_name = "local-host-env"
elif d.expand('${HOST_PREFIX}') == "":
@@ -167,14 +220,18 @@ def icecc_version(bb, d):
prefix = d.expand('${HOST_PREFIX}' )
distro = d.expand('${DISTRO}')
target_sys = d.expand('${TARGET_SYS}')
- float = d.getVar('TARGET_FPU', False) or "hard"
+ float = d.getVar('TARGET_FPU') or "hard"
archive_name = prefix + distro + "-" + target_sys + "-" + float
if icecc_is_kernel(bb, d):
archive_name += "-kernel"
import socket
- ice_dir = d.expand('${STAGING_DIR_NATIVE}${prefix_native}')
- tar_file = os.path.join(ice_dir, 'ice', archive_name + "-@VERSION@-" + socket.gethostname() + '.tar.gz')
+ ice_dir = icecc_dir(bb, d)
+ tar_file = os.path.join(ice_dir, "{archive}-{version}-@VERSION@-{hostname}.tar.gz".format(
+ archive=archive_name,
+ version=d.getVar('ICECC_ENV_VERSION'),
+ hostname=socket.gethostname()
+ ))
return tar_file
@@ -183,46 +240,70 @@ def icecc_path(bb,d):
# don't create unnecessary directories when icecc is disabled
return
+ staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
if icecc_is_kernel(bb, d):
- return create_path( [get_cross_kernel_cc(bb,d), ], bb, d)
+ staging += "-kernel"
- else:
- prefix = d.expand('${HOST_PREFIX}')
- return create_path( [prefix+"gcc", prefix+"g++"], bb, d)
+ return staging
def icecc_get_external_tool(bb, d, tool):
external_toolchain_bindir = d.expand('${EXTERNAL_TOOLCHAIN}${bindir_cross}')
target_prefix = d.expand('${TARGET_PREFIX}')
return os.path.join(external_toolchain_bindir, '%s%s' % (target_prefix, tool))
+def icecc_get_tool_link(tool, d):
+ import subprocess
+ try:
+ return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1]
+ except subprocess.CalledProcessError as e:
+ bb.note("icecc: one of the tools probably disappeared during recipe parsing, cmd readlink -f %s returned %d:\n%s" % (tool, e.returncode, e.output.decode("utf-8")))
+ return tool
+
+def icecc_get_path_tool(tool, d):
+ # This is a little ugly, but we want to make sure we add an actual
+ # compiler to the toolchain, not ccache. Some distros (e.g. Fedora)
+ # have ccache enabled by default using symlinks PATH, meaning ccache
+ # would be found first when looking for the compiler.
+ paths = os.getenv("PATH").split(':')
+ while True:
+ p, hist = bb.utils.which(':'.join(paths), tool, history=True)
+ if not p or os.path.basename(icecc_get_tool_link(p, d)) != 'ccache':
+ return p
+ paths = paths[len(hist):]
+
+ return ""
+
# Don't pollute native signatures with target TUNE_PKGARCH through STAGING_BINDIR_TOOLCHAIN
icecc_get_tool[vardepsexclude] += "STAGING_BINDIR_TOOLCHAIN"
def icecc_get_tool(bb, d, tool):
if icecc_is_native(bb, d):
- return bb.utils.which(os.getenv("PATH"), tool)
+ return icecc_get_path_tool(tool, d)
elif icecc_is_kernel(bb, d):
- return bb.utils.which(os.getenv("PATH"), get_cross_kernel_cc(bb, d))
+ return icecc_get_path_tool(get_cross_kernel_cc(bb, d), d)
else:
ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}')
target_sys = d.expand('${TARGET_SYS}')
- tool_bin = os.path.join(ice_dir, "%s-%s" % (target_sys, tool))
- if os.path.isfile(tool_bin):
- return tool_bin
- else:
- external_tool_bin = icecc_get_external_tool(bb, d, tool)
- if os.path.isfile(external_tool_bin):
- return external_tool_bin
- else:
- return ""
+ for p in ice_dir.split(':'):
+ tool_bin = os.path.join(p, "%s-%s" % (target_sys, tool))
+ if os.path.isfile(tool_bin):
+ return tool_bin
+ external_tool_bin = icecc_get_external_tool(bb, d, tool)
+ if os.path.isfile(external_tool_bin):
+ return external_tool_bin
+ return ""
def icecc_get_and_check_tool(bb, d, tool):
# Check that g++ or gcc is not a symbolic link to icecc binary in
# PATH or icecc-create-env script will silently create an invalid
# compiler environment package.
t = icecc_get_tool(bb, d, tool)
- if t and os.popen("readlink -f %s" % t).read()[:-1] == get_icecc(d):
- bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, get_icecc(d)))
- return ""
+ if t:
+ link_path = icecc_get_tool_link(t, d)
+ if link_path == get_icecc(d):
+ bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, link_path))
+ return ""
+ else:
+ return t
else:
return t
@@ -245,6 +326,7 @@ def set_icecc_env():
# dummy python version of set_icecc_env
return
+set_icecc_env[vardepsexclude] += "KERNEL_CC"
set_icecc_env() {
if [ "${@use_icecc(bb, d)}" = "no" ]
then
@@ -264,6 +346,16 @@ set_icecc_env() {
return
fi
+ ICECC_BIN="${@get_icecc(d)}"
+ if [ -z "${ICECC_BIN}" ]; then
+ bbwarn "Cannot use icecc: icecc binary not found"
+ return
+ fi
+ if [ -z "$(which patchelf patchelf-uninative)" ]; then
+ bbwarn "Cannot use icecc: patchelf not found"
+ return
+ fi
+
ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}"
ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}"
# cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix
@@ -282,6 +374,26 @@ set_icecc_env() {
return
fi
+ # Create symlinks to icecc and wrapper-scripts in the recipe-sysroot directory
+ mkdir -p $ICE_PATH/symlinks
+ if [ -n "${KERNEL_CC}" ]; then
+ compilers="${@get_cross_kernel_cc(bb,d)}"
+ else
+ compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++"
+ fi
+ for compiler in $compilers; do
+ ln -sf $ICECC_BIN $ICE_PATH/symlinks/$compiler
+ rm -f $ICE_PATH/$compiler
+ cat <<-__EOF__ > $ICE_PATH/$compiler
+ #!/bin/sh -e
+ export ICECC_VERSION=$ICECC_VERSION
+ export ICECC_CC=$ICECC_CC
+ export ICECC_CXX=$ICECC_CXX
+ $ICE_PATH/symlinks/$compiler "\$@"
+ __EOF__
+ chmod 775 $ICE_PATH/$compiler
+ done
+
ICECC_AS="`${ICECC_CC} -print-prog-name=as`"
# for target recipes should return something like:
# /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as
@@ -298,10 +410,10 @@ set_icecc_env() {
# the ICECC_VERSION generation step must be locked by a mutex
# in order to prevent race conditions
if flock -n "${ICECC_VERSION}.lock" \
- ${ICECC_ENV_EXEC} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
+ ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
then
touch "${ICECC_VERSION}.done"
- elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
+ elif ! wait_for_file "${ICECC_VERSION}.done" 30
then
# locking failed so wait for ${ICECC_VERSION}.done to appear
bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
@@ -309,11 +421,15 @@ set_icecc_env() {
fi
fi
- export ICECC_VERSION ICECC_CC ICECC_CXX
- export PATH="$ICE_PATH:$PATH"
+ # Don't let ccache find the icecream compiler links that have been created, otherwise
+ # it can end up invoking icecream recursively.
export CCACHE_PATH="$PATH"
+ export CCACHE_DISABLE="1"
+
+ export PATH="$ICE_PATH:$PATH"
- bbnote "Using icecc"
+ bbnote "Using icecc path: $ICE_PATH"
+ bbnote "Using icecc tarball: $ICECC_VERSION"
}
do_configure_prepend() {
@@ -331,3 +447,13 @@ do_compile_kernelmodules_prepend() {
do_install_prepend() {
set_icecc_env
}
+
+# IceCream is not (currently) supported in the extensible SDK
+ICECC_SDK_HOST_TASK = "nativesdk-icecc-toolchain"
+ICECC_SDK_HOST_TASK_task-populate-sdk-ext = ""
+
+# Don't include IceCream in uninative tarball
+ICECC_SDK_HOST_TASK_pn-uninative-tarball = ""
+
+# Add the toolchain scripts to the SDK
+TOOLCHAIN_HOST_TASK_append = " ${ICECC_SDK_HOST_TASK}"
diff --git a/meta/classes/image-buildinfo.bbclass b/meta/classes/image-buildinfo.bbclass
index 83d0db37d8..94c585d4cd 100644
--- a/meta/classes/image-buildinfo.bbclass
+++ b/meta/classes/image-buildinfo.bbclass
@@ -12,14 +12,16 @@
# Desired variables to display
IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION"
+# Desired location of the output file in the image.
+IMAGE_BUILDINFO_FILE ??= "${sysconfdir}/build"
+
# From buildhistory.bbclass
-def image_buildinfo_outputvars(vars, listvars, d):
+def image_buildinfo_outputvars(vars, d):
vars = vars.split()
- listvars = listvars.split()
ret = ""
for var in vars:
- value = d.getVar(var, True) or ""
- if (d.getVarFlag(var, 'type', True) == "list"):
+ value = d.getVar(var) or ""
+ if (d.getVarFlag(var, 'type') == "list"):
value = oe.utils.squashspaces(value)
ret += "%s = %s\n" % (var, value)
return ret.rstrip('\n')
@@ -28,7 +30,9 @@ def image_buildinfo_outputvars(vars, listvars, d):
def get_layer_git_status(path):
import subprocess
try:
- subprocess.check_output("cd %s; PSEUDO_UNLOAD=1 git diff --quiet --no-ext-diff" % path,
+ subprocess.check_output("""cd %s; export PSEUDO_UNLOAD=1; set -e;
+ git diff --quiet --no-ext-diff
+ git diff --quiet --no-ext-diff --cached""" % path,
shell=True,
stderr=subprocess.STDOUT)
return ""
@@ -40,7 +44,7 @@ def get_layer_git_status(path):
# Returns layer revisions along with their respective status
def get_layer_revs(d):
- layers = (d.getVar("BBLAYERS", True) or "").split()
+ layers = (d.getVar("BBLAYERS") or "").split()
medadata_revs = ["%-17s = %s:%s %s" % (os.path.basename(i), \
base_get_metadata_git_branch(i, None).strip(), \
base_get_metadata_git_revision(i, None), \
@@ -50,16 +54,17 @@ def get_layer_revs(d):
def buildinfo_target(d):
# Get context
- if d.getVar('BB_WORKERCONTEXT', True) != '1':
+ if d.getVar('BB_WORKERCONTEXT') != '1':
return ""
# Single and list variables to be read
- vars = (d.getVar("IMAGE_BUILDINFO_VARS", True) or "")
- listvars = (d.getVar("IMAGE_BUILDINFO_LVARS", True) or "")
- return image_buildinfo_outputvars(vars, listvars, d)
+ vars = (d.getVar("IMAGE_BUILDINFO_VARS") or "")
+ return image_buildinfo_outputvars(vars, d)
# Write build information to target filesystem
python buildinfo () {
- with open(d.expand('${IMAGE_ROOTFS}${sysconfdir}/build'), 'w') as build:
+ if not d.getVar('IMAGE_BUILDINFO_FILE'):
+ return
+ with open(d.expand('${IMAGE_ROOTFS}${IMAGE_BUILDINFO_FILE}'), 'w') as build:
build.writelines((
'''-----------------------
Build Configuration: |
@@ -71,7 +76,9 @@ Build Configuration: |
Layer Revisions: |
-----------------------
''',
- get_layer_revs(d)
+ get_layer_revs(d),
+ '''
+'''
))
}
diff --git a/meta/classes/image-combined-dbg.bbclass b/meta/classes/image-combined-dbg.bbclass
new file mode 100644
index 0000000000..f4772f7ea1
--- /dev/null
+++ b/meta/classes/image-combined-dbg.bbclass
@@ -0,0 +1,9 @@
+IMAGE_PREPROCESS_COMMAND_append = " combine_dbg_image; "
+
+combine_dbg_image () {
+ if [ "${IMAGE_GEN_DEBUGFS}" = "1" -a -e ${IMAGE_ROOTFS}-dbg ]; then
+ # copy target files into -dbg rootfs, so it can be used for
+ # debug purposes directly
+ tar -C ${IMAGE_ROOTFS} -cf - . | tar -C ${IMAGE_ROOTFS}-dbg -xf -
+ fi
+}
diff --git a/meta/classes/image-container.bbclass b/meta/classes/image-container.bbclass
new file mode 100644
index 0000000000..f002858bd2
--- /dev/null
+++ b/meta/classes/image-container.bbclass
@@ -0,0 +1,21 @@
+ROOTFS_BOOTSTRAP_INSTALL = ""
+IMAGE_TYPES_MASKED += "container"
+IMAGE_TYPEDEP_container = "tar.bz2"
+
+python __anonymous() {
+ if "container" in d.getVar("IMAGE_FSTYPES") and \
+ d.getVar("IMAGE_CONTAINER_NO_DUMMY") != "1" and \
+ "linux-dummy" not in d.getVar("PREFERRED_PROVIDER_virtual/kernel"):
+ msg = '"container" is in IMAGE_FSTYPES, but ' \
+ 'PREFERRED_PROVIDER_virtual/kernel is not "linux-dummy". ' \
+ 'Unless a particular kernel is needed, using linux-dummy will ' \
+ 'prevent a kernel from being built, which can reduce ' \
+ 'build times. If you don\'t want to use "linux-dummy", set ' \
+ '"IMAGE_CONTAINER_NO_DUMMY" to "1".'
+
+ # Raising skip recipe was Paul's clever idea. It causes the error to
+ # only be shown for the recipes actually requested to build, rather
+ # than bb.fatal which would appear for all recipes inheriting the
+ # class.
+ raise bb.parse.SkipRecipe(msg)
+}
diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
index 4a634dca96..54058b350d 100644
--- a/meta/classes/image-live.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -19,9 +19,6 @@
# External variables (also used by syslinux.bbclass)
# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
-# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
-# ${NOISO} - skip building the ISO image if set to 1
-# ${NOHDD} - skip building the HDD image if set to 1
# ${HDDIMG_ID} - FAT image volume-id
# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
@@ -33,26 +30,26 @@ do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
virtual/kernel:do_deploy \
${MLPREFIX}syslinux:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
- ${@oe.utils.ifelse(d.getVar('COMPRESSISO', False),'zisofs-tools-native:do_populate_sysroot','')} \
- ${PN}:do_image_ext4 \
+ ${PN}:do_image_${@d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')} \
"
LABELS_LIVE ?= "boot install"
ROOT_LIVE ?= "root=/dev/ram0"
-INITRD_IMAGE_LIVE ?= "core-image-minimal-initramfs"
-INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.cpio.gz"
+INITRD_IMAGE_LIVE ?= "${MLPREFIX}core-image-minimal-initramfs"
+INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.${INITRAMFS_FSTYPES}"
-ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ext4"
+LIVE_ROOTFS_TYPE ?= "ext4"
+ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${LIVE_ROOTFS_TYPE}"
-IMAGE_TYPEDEP_live = "ext4"
-IMAGE_TYPEDEP_iso = "ext4"
-IMAGE_TYPEDEP_hddimg = "ext4"
+IMAGE_TYPEDEP_live = "${LIVE_ROOTFS_TYPE}"
+IMAGE_TYPEDEP_iso = "${LIVE_ROOTFS_TYPE}"
+IMAGE_TYPEDEP_hddimg = "${LIVE_ROOTFS_TYPE}"
IMAGE_TYPES_MASKED += "live hddimg iso"
python() {
- image_b = d.getVar('IMAGE_BASENAME', True)
- initrd_i = d.getVar('INITRD_IMAGE_LIVE', True)
+ image_b = d.getVar('IMAGE_BASENAME')
+ initrd_i = d.getVar('INITRD_IMAGE_LIVE')
if image_b == initrd_i:
bb.error('INITRD_IMAGE_LIVE %s cannot use image live, hddimg or iso.' % initrd_i)
bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.')
@@ -64,7 +61,6 @@ HDDDIR = "${S}/hddimg"
ISODIR = "${S}/iso"
EFIIMGDIR = "${S}/efi_img"
COMPACT_ISODIR = "${S}/iso.z"
-COMPRESSISO ?= "0"
ISOLINUXDIR ?= "/isolinux"
ISO_BOOTIMG = "isolinux/isolinux.bin"
@@ -82,8 +78,8 @@ populate_live() {
}
build_iso() {
- # Only create an ISO if we have an INITRD and NOISO was not set
- if [ -z "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
+ # Only create an ISO if we have an INITRD and the live or iso image type was selected
+ if [ -z "${INITRD}" ] || [ "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso', '1', '0', d)}" != "1" ]; then
bbnote "ISO image will not be created."
return
fi
@@ -91,7 +87,7 @@ build_iso() {
for fs in ${INITRD}
do
if [ ! -s "$fs" ]; then
- bbnote "ISO image will not be created. $fs is invalid."
+ bbwarn "ISO image will not be created. $fs is invalid."
return
fi
done
@@ -114,18 +110,8 @@ build_iso() {
install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
fi
- if [ "${COMPRESSISO}" = "1" ] ; then
- # create compact directory, compress iso
- mkdir -p ${COMPACT_ISODIR}
- mkzftree -z 9 -p 4 -F ${ISODIR}/rootfs.img ${COMPACT_ISODIR}/rootfs.img
-
- # move compact iso to iso, then remove compact directory
- mv ${COMPACT_ISODIR}/rootfs.img ${ISODIR}/rootfs.img
- rm -Rf ${COMPACT_ISODIR}
- mkisofs_compress_opts="-R -z -D -l"
- else
- mkisofs_compress_opts="-r"
- fi
+ # We used to have support for zisofs; this is a relic of that
+ mkisofs_compress_opts="-r"
# Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3
# when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need
@@ -216,10 +202,10 @@ build_fat_img() {
fi
if [ -z "${HDDIMG_ID}" ]; then
- mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+ mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} ${MKDOSFS_EXTRAOPTS} -C ${FATIMG} \
${BLOCKS}
else
- mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+ mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} ${MKDOSFS_EXTRAOPTS} -C ${FATIMG} \
${BLOCKS} -i ${HDDIMG_ID}
fi
@@ -229,7 +215,7 @@ build_fat_img() {
build_hddimg() {
# Create an HDD image
- if [ "${NOHDD}" != "1" ] ; then
+ if [ "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live hddimg', '1', '0', d)}" = "1" ] ; then
populate_live ${HDDDIR}
if [ "${PCBIOS}" = "1" ]; then
@@ -244,11 +230,11 @@ build_hddimg() {
if [ -f ${HDDDIR}/rootfs.img ]; then
rootfs_img_size=`stat -c '%s' ${HDDDIR}/rootfs.img`
max_size=`expr 4 \* 1024 \* 1024 \* 1024`
- if [ $rootfs_img_size -gt $max_size ]; then
- bberror "${HDDDIR}/rootfs.img execeeds 4GB,"
- bberror "this doesn't work on FAT filesystem, you can try either of:"
- bberror "1) Reduce the size of rootfs.img"
- bbfatal "2) Use iso, vmdk or vdi to instead of hddimg\n"
+ if [ $rootfs_img_size -ge $max_size ]; then
+ bberror "${HDDDIR}/rootfs.img rootfs size is greather than or equal to 4GB,"
+ bberror "and this doesn't work on a FAT filesystem. You can either:"
+ bberror "1) Reduce the size of rootfs.img, or,"
+ bbfatal "2) Use wic, vmdk or vdi instead of hddimg\n"
fi
fi
@@ -264,9 +250,9 @@ build_hddimg() {
python do_bootimg() {
set_live_vm_vars(d, 'LIVE')
- if d.getVar("PCBIOS", True) == "1":
+ if d.getVar("PCBIOS") == "1":
bb.build.exec_func('build_syslinux_cfg', d)
- if d.getVar("EFI", True) == "1":
+ if d.getVar("EFI") == "1":
bb.build.exec_func('build_efi_cfg', d)
bb.build.exec_func('build_hddimg', d)
bb.build.exec_func('build_iso', d)
diff --git a/meta/classes/image-mklibs.bbclass b/meta/classes/image-mklibs.bbclass
index 5f6df1b17f..68e11d4365 100644
--- a/meta/classes/image-mklibs.bbclass
+++ b/meta/classes/image-mklibs.bbclass
@@ -19,7 +19,7 @@ mklibs_optimize_image_doit() {
echo $i
done > ${WORKDIR}/mklibs/executables.list
- dynamic_loader=$(linuxloader)
+ dynamic_loader=${@get_linuxloader(d)}
mklibs -v \
--ldlib ${dynamic_loader} \
diff --git a/meta/classes/image-postinst-intercepts.bbclass b/meta/classes/image-postinst-intercepts.bbclass
new file mode 100644
index 0000000000..ed30bbd98d
--- /dev/null
+++ b/meta/classes/image-postinst-intercepts.bbclass
@@ -0,0 +1,23 @@
+# Gather existing and candidate postinst intercepts from BBPATH
+POSTINST_INTERCEPTS_DIR ?= "${COREBASE}/scripts/postinst-intercepts"
+POSTINST_INTERCEPTS_PATHS ?= "${@':'.join('%s/postinst-intercepts' % p for p in '${BBPATH}'.split(':'))}:${POSTINST_INTERCEPTS_DIR}"
+
+python find_intercepts() {
+ intercepts = {}
+ search_paths = []
+ paths = d.getVar('POSTINST_INTERCEPTS_PATHS').split(':')
+ overrides = (':' + d.getVar('FILESOVERRIDES')).split(':') + ['']
+ search_paths = [os.path.join(p, op) for p in paths for op in overrides]
+ searched = oe.path.which_wild('*', ':'.join(search_paths), candidates=True)
+ files, chksums = [], []
+ for pathname, candidates in searched:
+ if os.path.isfile(pathname):
+ files.append(pathname)
+ chksums.append('%s:True' % pathname)
+ chksums.extend('%s:False' % c for c in candidates[:-1])
+
+ d.setVar('POSTINST_INTERCEPT_CHECKSUMS', ' '.join(chksums))
+ d.setVar('POSTINST_INTERCEPTS', ' '.join(files))
+}
+find_intercepts[eventmask] += "bb.event.RecipePreFinalise"
+addhandler find_intercepts
diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index 4157df021a..04dd57c940 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -1,6 +1,6 @@
do_rootfs[depends] += "prelink-native:do_populate_sysroot"
-IMAGE_PREPROCESS_COMMAND += "prelink_setup; prelink_image; "
+IMAGE_PREPROCESS_COMMAND_append_libc-glibc = " prelink_setup; prelink_image; "
python prelink_setup () {
oe.utils.write_ld_so_conf(d)
@@ -33,10 +33,20 @@ prelink_image () {
fi
cat ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf >> $ldsoconf
- dynamic_loader=$(linuxloader)
+ dynamic_loader=${@get_linuxloader(d)}
# prelink!
- ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
+ bbnote " prelink: BUILD_REPRODUCIBLE_BINARIES..."
+ if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
+ export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct `
+ else
+ export PRELINK_TIMESTAMP=$REPRODUCIBLE_TIMESTAMP_ROOTFS
+ fi
+ ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -am -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
+ else
+ ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
+ fi
# Remove the prelink.conf if we had to add it.
if [ "$dummy_prelink_conf" = "true" ]; then
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
deleted file mode 100644
index 32c6550037..0000000000
--- a/meta/classes/image-vm.bbclass
+++ /dev/null
@@ -1,179 +0,0 @@
-# image-vm.bbclass
-# (loosly based off image-live.bbclass Copyright (C) 2004, Advanced Micro Devices, Inc.)
-#
-# Create an image which can be placed directly onto a harddisk using dd and then
-# booted.
-#
-# This uses syslinux. extlinux would have been nice but required the ext2/3
-# partition to be mounted. grub requires to run itself as part of the install
-# process.
-#
-# The end result is a 512 boot sector populated with an MBR and partition table
-# followed by an msdos fat16 partition containing syslinux and a linux kernel
-# completed by the ext2/3 rootfs.
-#
-# We have to push the msdos parition table size > 16MB so fat 16 is used as parted
-# won't touch fat12 partitions.
-
-inherit live-vm-common
-
-do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
- virtual/kernel:do_deploy \
- syslinux:do_populate_sysroot \
- syslinux-native:do_populate_sysroot \
- parted-native:do_populate_sysroot \
- mtools-native:do_populate_sysroot \
- ${PN}:do_image_${VM_ROOTFS_TYPE} \
- "
-
-IMAGE_TYPEDEP_vmdk = "${VM_ROOTFS_TYPE}"
-IMAGE_TYPEDEP_vdi = "${VM_ROOTFS_TYPE}"
-IMAGE_TYPEDEP_qcow2 = "${VM_ROOTFS_TYPE}"
-IMAGE_TYPEDEP_hdddirect = "${VM_ROOTFS_TYPE}"
-IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect"
-
-VM_ROOTFS_TYPE ?= "ext4"
-ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${VM_ROOTFS_TYPE}"
-
-# Used by bootloader
-LABELS_VM ?= "boot"
-ROOT_VM ?= "root=/dev/sda2"
-# Using an initramfs is optional. Enable it by setting INITRD_IMAGE_VM.
-INITRD_IMAGE_VM ?= ""
-INITRD_VM ?= "${@'${IMGDEPLOYDIR}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}"
-do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE_VM}:do_image_complete' if '${INITRD_IMAGE_VM}' else ''}"
-
-BOOTDD_VOLUME_ID ?= "boot"
-BOOTDD_EXTRA_SPACE ?= "16384"
-
-DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}"
-DISK_SIGNATURE[vardepsexclude] = "DISK_SIGNATURE_GENERATED"
-
-build_boot_dd() {
- HDDDIR="${S}/hdd/boot"
- HDDIMG="${S}/hdd.image"
- IMAGE=${IMGDEPLOYDIR}/${IMAGE_NAME}.hdddirect
-
- populate_kernel $HDDDIR
-
- if [ "${PCBIOS}" = "1" ]; then
- syslinux_hddimg_populate $HDDDIR
- fi
- if [ "${EFI}" = "1" ]; then
- efi_hddimg_populate $HDDDIR
- fi
-
- BLOCKS=`du -bks $HDDDIR | cut -f 1`
- BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
-
- # Remove it since mkdosfs would fail when it exists
- rm -f $HDDIMG
- mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS
- mcopy -i $HDDIMG -s $HDDDIR/* ::/
-
- if [ "${PCBIOS}" = "1" ]; then
- syslinux_hdddirect_install $HDDIMG
- fi
- chmod 644 $HDDIMG
-
- ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1`
- TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS`
- END1=`expr $BLOCKS \* 1024`
- END2=`expr $END1 + 512`
- END3=`expr \( $ROOTFSBLOCKS \* 1024 \) + $END1`
-
- echo $ROOTFSBLOCKS $TOTALSIZE $END1 $END2 $END3
- rm -rf $IMAGE
- dd if=/dev/zero of=$IMAGE bs=1024 seek=$TOTALSIZE count=1
-
- parted $IMAGE mklabel msdos
- parted $IMAGE mkpart primary fat16 0 ${END1}B
- parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B
- parted $IMAGE set 1 boot on
-
- parted $IMAGE print
-
- awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
- dd of=$IMAGE bs=1 seek=440 conv=notrunc
-
- OFFSET=`expr $END2 / 512`
- if [ "${PCBIOS}" = "1" ]; then
- dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
- fi
-
- dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
- dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
-
- cd ${IMGDEPLOYDIR}
-
- if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ]; then
- rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect)
- fi
-
- ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect
-}
-
-python do_bootdirectdisk() {
- validate_disk_signature(d)
- set_live_vm_vars(d, 'VM')
- if d.getVar("PCBIOS", True) == "1":
- bb.build.exec_func('build_syslinux_cfg', d)
- if d.getVar("EFI", True) == "1":
- bb.build.exec_func('build_efi_cfg', d)
- bb.build.exec_func('build_boot_dd', d)
-}
-
-def generate_disk_signature():
- import uuid
-
- signature = str(uuid.uuid4())[:8]
-
- if signature != '00000000':
- return signature
- else:
- return 'ffffffff'
-
-def validate_disk_signature(d):
- import re
-
- disk_signature = d.getVar("DISK_SIGNATURE", True)
-
- if not re.match(r'^[0-9a-fA-F]{8}$', disk_signature):
- bb.fatal("DISK_SIGNATURE '%s' must be an 8 digit hex string" % disk_signature)
-
-DISK_SIGNATURE_GENERATED := "${@generate_disk_signature()}"
-
-run_qemu_img (){
- type="$1"
- qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type
-
- if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type ]; then
- rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type)
- fi
-
- ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type
-}
-create_vmdk_image () {
- run_qemu_img vmdk
-}
-
-create_vdi_image () {
- run_qemu_img vdi
-}
-
-create_qcow2_image () {
- run_qemu_img qcow2
-}
-
-python do_vmimg() {
- if 'vmdk' in d.getVar('IMAGE_FSTYPES', True):
- bb.build.exec_func('create_vmdk_image', d)
- if 'vdi' in d.getVar('IMAGE_FSTYPES', True):
- bb.build.exec_func('create_vdi_image', d)
- if 'qcow2' in d.getVar('IMAGE_FSTYPES', True):
- bb.build.exec_func('create_qcow2_image', d)
-}
-
-addtask bootdirectdisk before do_vmimg
-addtask vmimg after do_bootdirectdisk before do_image_complete
-do_vmimg[depends] += "qemu-native:do_populate_sysroot"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 4d5a401171..c2824395c9 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -1,41 +1,49 @@
-inherit rootfs_${IMAGE_PKGTYPE}
-# Only Linux SDKs support populate_sdk_ext, fall back to populate_sdk
+IMAGE_CLASSES ??= ""
+
+# rootfs bootstrap install
+# warning - image-container resets this
+ROOTFS_BOOTSTRAP_INSTALL = "run-postinsts"
+
+# Handle inherits of any of the image classes we need
+IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}"
+# Only Linux SDKs support populate_sdk_ext, fall back to populate_sdk_base
# in the non-Linux SDK_OS case, such as mingw32
-SDKEXTCLASS ?= "${@['populate_sdk', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS", True)]}"
-inherit ${SDKEXTCLASS}
+IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}"
+IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}"
+IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}"
+IMGCLASSES += "image_types_wic"
+IMGCLASSES += "rootfs-postcommands"
+IMGCLASSES += "image-postinst-intercepts"
+inherit ${IMGCLASSES}
TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}"
TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY}"
POPULATE_SDK_POST_TARGET_COMMAND += "rootfs_sysroot_relativelinks; "
-inherit gzipnative
-
-LICENSE = "MIT"
+LICENSE ?= "MIT"
PACKAGES = ""
-DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross"
-RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL}"
+DEPENDS += "${@' '.join(["%s-qemuwrapper-cross" % m for m in d.getVar("MULTILIB_VARIANTS").split()])} qemuwrapper-cross depmodwrapper-cross cross-localedef-native"
+RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL} ${IMAGE_INSTALL_DEBUGFS}"
RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}"
+PATH_prepend = "${@":".join(all_multilib_tune_values(d, 'STAGING_BINDIR_CROSS').split())}:"
INHIBIT_DEFAULT_DEPS = "1"
-TESTIMAGECLASS = "${@base_conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
-inherit ${TESTIMAGECLASS}
-
# IMAGE_FEATURES may contain any available package group
IMAGE_FEATURES ?= ""
IMAGE_FEATURES[type] = "list"
-IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs empty-root-password allow-empty-password post-install-logging"
+IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs stateless-rootfs empty-root-password allow-empty-password allow-root-login post-install-logging"
# Generate companion debugfs?
IMAGE_GEN_DEBUGFS ?= "0"
-# rootfs bootstrap install
-ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
+# These pacackages will be installed as additional into debug rootfs
+IMAGE_INSTALL_DEBUGFS ?= ""
# These packages will be removed from a read-only rootfs after all other
# packages have been installed
-ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}"
+ROOTFS_RO_UNNEEDED ??= "update-rc.d base-passwd shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}"
# packages to install from features
FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
@@ -51,7 +59,7 @@ FEATURE_PACKAGES_splash = "${SPLASH}"
IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}'
def check_image_features(d):
- valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems', True) or "").split()
+ valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems') or "").split()
valid_features += d.getVarFlags('COMPLEMENTARY_GLOB').keys()
for var in d:
if var.startswith("PACKAGE_GROUP_"):
@@ -87,7 +95,6 @@ PID = "${@os.getpid()}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot"
-LDCONFIGDEPEND_libc-uclibc = ""
LDCONFIGDEPEND_libc-musl = ""
# This is needed to have depmod data in PKGDATA_DIR,
@@ -117,10 +124,10 @@ python () {
def rootfs_variables(d):
from oe.rootfs import variable_depends
variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
- 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS',
+ 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', 'IMAGE_LINGUAS_COMPLEMENTARY',
'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS',
'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
- 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR']
+ 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY', 'REPRODUCIBLE_TIMESTAMP_ROOTFS', 'IMAGE_INSTALL_DEBUGFS']
variables.extend(rootfs_command_variables(d))
variables.extend(variable_depends(d))
return " ".join(variables)
@@ -129,76 +136,64 @@ do_rootfs[vardeps] += "${@rootfs_variables(d)}"
do_build[depends] += "virtual/kernel:do_deploy"
-def build_live(d):
- if bb.utils.contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg
- d.setVar('NOISO', bb.utils.contains('IMAGE_FSTYPES', "iso", "0", "1", d))
- d.setVar('NOHDD', bb.utils.contains('IMAGE_FSTYPES', "hddimg", "0", "1", d))
- if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0":
- return "image-live"
- return ""
- return "image-live"
-IMAGE_TYPE_live = "${@build_live(d)}"
-inherit ${IMAGE_TYPE_live}
+python () {
+ def extraimage_getdepends(task):
+ deps = ""
+ for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split():
+ deps += " %s:%s" % (dep, task)
+ return deps
-IMAGE_TYPE_vm = '${@bb.utils.contains_any("IMAGE_FSTYPES", ["vmdk", "vdi", "qcow2", "hdddirect"], "image-vm", "", d)}'
-inherit ${IMAGE_TYPE_vm}
+ d.appendVarFlag('do_image_complete', 'depends', extraimage_getdepends('do_populate_sysroot'))
-python () {
deps = " " + imagetypes_getdepends(d)
d.appendVarFlag('do_rootfs', 'depends', deps)
- deps = ""
- for dep in (d.getVar('EXTRA_IMAGEDEPENDS', True) or "").split():
- deps += " %s:do_populate_sysroot" % dep
- d.appendVarFlag('do_build', 'depends', deps)
-
#process IMAGE_FEATURES, we must do this before runtime_mapping_rename
#Check for replaces image features
features = set(oe.data.typed_value('IMAGE_FEATURES', d))
remain_features = features.copy()
for feature in features:
- replaces = set((d.getVar("IMAGE_FEATURES_REPLACES_%s" % feature, True) or "").split())
+ replaces = set((d.getVar("IMAGE_FEATURES_REPLACES_%s" % feature) or "").split())
remain_features -= replaces
#Check for conflict image features
for feature in remain_features:
- conflicts = set((d.getVar("IMAGE_FEATURES_CONFLICTS_%s" % feature, True) or "").split())
+ conflicts = set((d.getVar("IMAGE_FEATURES_CONFLICTS_%s" % feature) or "").split())
temp = conflicts & remain_features
if temp:
- bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp))))
+ bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN'), feature, ' '.join(list(temp))))
d.setVar('IMAGE_FEATURES', ' '.join(sorted(list(remain_features))))
check_image_features(d)
- initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""
- if initramfs_image != "":
- d.appendVarFlag('do_build', 'depends', " %s:do_bundle_initramfs" % d.getVar('PN', True))
- d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_image_complete" % initramfs_image)
}
-IMAGE_CLASSES += "image_types"
-inherit ${IMAGE_CLASSES}
-
IMAGE_POSTPROCESS_COMMAND ?= ""
# some default locales
IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
-LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', True).split()))}"
+LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS').split()))}"
# Prefer image, but use the fallback files for lookups if the image ones
# aren't yet available.
PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}"
-inherit rootfs-postcommands
-
PACKAGE_EXCLUDE ??= ""
PACKAGE_EXCLUDE[type] = "list"
fakeroot python do_rootfs () {
from oe.rootfs import create_rootfs
from oe.manifest import create_manifest
+ import logging
+
+ logger = d.getVar('BB_TASK_LOGGER', False)
+ if logger:
+ logcatcher = bb.utils.LogCatcher()
+ logger.addHandler(logcatcher)
+ else:
+ logcatcher = None
# NOTE: if you add, remove or significantly refactor the stages of this
# process then you should recalculate the weightings here. This is quite
@@ -212,20 +207,20 @@ fakeroot python do_rootfs () {
progress_reporter.next_stage()
# Handle package exclusions
- excl_pkgs = d.getVar("PACKAGE_EXCLUDE", True).split()
- inst_pkgs = d.getVar("PACKAGE_INSTALL", True).split()
- inst_attempt_pkgs = d.getVar("PACKAGE_INSTALL_ATTEMPTONLY", True).split()
+ excl_pkgs = d.getVar("PACKAGE_EXCLUDE").split()
+ inst_pkgs = d.getVar("PACKAGE_INSTALL").split()
+ inst_attempt_pkgs = d.getVar("PACKAGE_INSTALL_ATTEMPTONLY").split()
d.setVar('PACKAGE_INSTALL_ORIG', ' '.join(inst_pkgs))
d.setVar('PACKAGE_INSTALL_ATTEMPTONLY', ' '.join(inst_attempt_pkgs))
for pkg in excl_pkgs:
if pkg in inst_pkgs:
- bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL (%s). It will be removed from the list." % (pkg, d.getVar('PN', True), inst_pkgs))
+ bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL (%s). It will be removed from the list." % (pkg, d.getVar('PN'), inst_pkgs))
inst_pkgs.remove(pkg)
if pkg in inst_attempt_pkgs:
- bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL_ATTEMPTONLY (%s). It will be removed from the list." % (pkg, d.getVar('PN', True), inst_pkgs))
+ bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL_ATTEMPTONLY (%s). It will be removed from the list." % (pkg, d.getVar('PN'), inst_pkgs))
inst_attempt_pkgs.remove(pkg)
d.setVar("PACKAGE_INSTALL", ' '.join(inst_pkgs))
@@ -235,7 +230,7 @@ fakeroot python do_rootfs () {
# We have to delay the runtime_mapping_rename until just before rootfs runs
# otherwise, the multilib renaming could step in and squash any fixups that
# may have occurred.
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
runtime_mapping_rename("PACKAGE_INSTALL", pn, d)
runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", pn, d)
runtime_mapping_rename("BAD_RECOMMENDATIONS", pn, d)
@@ -246,30 +241,33 @@ fakeroot python do_rootfs () {
progress_reporter.next_stage()
# generate rootfs
- create_rootfs(d, progress_reporter=progress_reporter)
+ d.setVarFlag('REPRODUCIBLE_TIMESTAMP_ROOTFS', 'export', '1')
+ create_rootfs(d, progress_reporter=progress_reporter, logcatcher=logcatcher)
progress_reporter.finish()
}
do_rootfs[dirs] = "${TOPDIR}"
do_rootfs[cleandirs] += "${S} ${IMGDEPLOYDIR}"
do_rootfs[umask] = "022"
-addtask rootfs before do_build
+do_rootfs[file-checksums] += "${POSTINST_INTERCEPT_CHECKSUMS}"
+addtask rootfs after do_prepare_recipe_sysroot
fakeroot python do_image () {
from oe.utils import execute_pre_post_process
- pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND", True)
+ d.setVarFlag('REPRODUCIBLE_TIMESTAMP_ROOTFS', 'export', '1')
+ pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND")
execute_pre_post_process(d, pre_process_cmds)
}
do_image[dirs] = "${TOPDIR}"
do_image[umask] = "022"
-addtask do_image after do_rootfs before do_build
+addtask do_image after do_rootfs
fakeroot python do_image_complete () {
from oe.utils import execute_pre_post_process
- post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND", True)
+ post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND")
execute_pre_post_process(d, post_process_cmds)
}
@@ -279,20 +277,27 @@ SSTATETASKS += "do_image_complete"
SSTATE_SKIP_CREATION_task-image-complete = '1'
do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"
do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
-do_image_complete[stamp-extra-info] = "${MACHINE}"
+do_image_complete[stamp-extra-info] = "${MACHINE_ARCH}"
addtask do_image_complete after do_image before do_build
+python do_image_complete_setscene () {
+ sstate_setscene(d)
+}
+addtask do_image_complete_setscene
# Add image-level QA/sanity checks to IMAGE_QA_COMMANDS
#
# IMAGE_QA_COMMANDS += " \
# image_check_everything_ok \
# "
-# This task runs all functions in IMAGE_QA_COMMANDS after the image
+# This task runs all functions in IMAGE_QA_COMMANDS after the rootfs
# construction has completed in order to validate the resulting image.
+#
+# The functions should use ${IMAGE_ROOTFS} to find the unpacked rootfs
+# directory, which if QA passes will be the basis for the images.
fakeroot python do_image_qa () {
from oe.utils import ImageQAFailed
- qa_cmds = (d.getVar('IMAGE_QA_COMMANDS', True) or '').split()
+ qa_cmds = (d.getVar('IMAGE_QA_COMMANDS') or '').split()
qamsg = ""
for cmd in qa_cmds:
@@ -300,47 +305,31 @@ fakeroot python do_image_qa () {
bb.build.exec_func(cmd, d)
except oe.utils.ImageQAFailed as e:
qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description)
- except bb.build.FuncFailed as e:
- qamsg = qamsg + '\tImage QA function %s failed' % e.name
- if e.logfile:
- qamsg = qamsg + ' (log file is located at %s)' % e.logfile
- qamsg = qamsg + '\n'
+ except Exception as e:
+ qamsg = qamsg + '\tImage QA function %s failed\n' % cmd
if qamsg:
- imgname = d.getVar('IMAGE_NAME', True)
+ imgname = d.getVar('IMAGE_NAME')
bb.fatal("QA errors found whilst validating image: %s\n%s" % (imgname, qamsg))
}
-addtask do_image_qa after do_image_complete before do_build
-
-#
-# Write environment variables used by wic
-# to tmp/sysroots/<machine>/imgdata/<image>.env
-#
-python do_rootfs_wicenv () {
- wicvars = d.getVar('WICVARS', True)
- if not wicvars:
- return
-
- stdir = d.getVar('STAGING_DIR_TARGET', True)
- outdir = os.path.join(stdir, 'imgdata')
- bb.utils.mkdirhier(outdir)
- basename = d.getVar('IMAGE_BASENAME', True)
- with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
- for var in wicvars.split():
- value = d.getVar(var, True)
- if value:
- envf.write('%s="%s"\n' % (var, value.strip()))
+addtask do_image_qa after do_rootfs before do_image
+
+SSTATETASKS += "do_image_qa"
+SSTATE_SKIP_CREATION_task-image-qa = '1'
+do_image_qa[sstate-inputdirs] = ""
+do_image_qa[sstate-outputdirs] = ""
+python do_image_qa_setscene () {
+ sstate_setscene(d)
}
-addtask do_rootfs_wicenv after do_image before do_image_wic
-do_rootfs_wicenv[vardeps] += "${WICVARS}"
-do_rootfs_wicenv[prefuncs] = 'set_image_size'
+addtask do_image_qa_setscene
def setup_debugfs_variables(d):
d.appendVar('IMAGE_ROOTFS', '-dbg')
- d.appendVar('IMAGE_LINK_NAME', '-dbg')
+ if d.getVar('IMAGE_LINK_NAME'):
+ d.appendVar('IMAGE_LINK_NAME', '-dbg')
d.appendVar('IMAGE_NAME','-dbg')
d.setVar('IMAGE_BUILDING_DEBUGFS', 'true')
- debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True)
+ debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS')
if debugfs_image_fstypes:
d.setVar('IMAGE_FSTYPES', debugfs_image_fstypes)
@@ -358,7 +347,7 @@ python () {
#
# Without de-duplication, gen_conversion_cmds() below
# would create the same compression command multiple times.
- ctypes = set(d.getVar('CONVERSIONTYPES', True).split())
+ ctypes = set(d.getVar('CONVERSIONTYPES').split())
old_overrides = d.getVar('OVERRIDES', False)
def _image_base_type(type):
@@ -375,11 +364,11 @@ python () {
return basetype
basetypes = {}
- alltypes = d.getVar('IMAGE_FSTYPES', True).split()
+ alltypes = d.getVar('IMAGE_FSTYPES').split()
typedeps = {}
- if d.getVar('IMAGE_GEN_DEBUGFS', True) == "1":
- debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True).split()
+ if d.getVar('IMAGE_GEN_DEBUGFS') == "1":
+ debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS').split()
for t in debugfs_fstypes:
alltypes.append("debugfs_" + t)
@@ -394,7 +383,7 @@ python () {
if t.startswith("debugfs_"):
t = t[8:]
debug = "debugfs_"
- deps = (d.getVar('IMAGE_TYPEDEP_' + t, True) or "").split()
+ deps = (d.getVar('IMAGE_TYPEDEP_' + t) or "").split()
vardeps.add('IMAGE_TYPEDEP_' + t)
if baset not in typedeps:
typedeps[baset] = set()
@@ -414,7 +403,7 @@ python () {
d.appendVarFlag('do_image', 'vardeps', ' '.join(vardeps))
- maskedtypes = (d.getVar('IMAGE_TYPES_MASKED', True) or "").split()
+ maskedtypes = (d.getVar('IMAGE_TYPES_MASKED') or "").split()
maskedtypes = [dbg + t for t in maskedtypes for dbg in ("", "debugfs_")]
for t in basetypes:
@@ -433,16 +422,21 @@ python () {
debug = "setup_debugfs "
realt = t[8:]
localdata.setVar('OVERRIDES', '%s:%s' % (realt, old_overrides))
- bb.data.update_data(localdata)
localdata.setVar('type', realt)
# Delete DATETIME so we don't expand any references to it now
# This means the task's hash can be stable rather than having hardcoded
# date/time values. It will get expanded at execution time.
# Similarly TMPDIR since otherwise we see QA stamp comparision problems
+ # Expand PV else it can trigger get_srcrev which can fail due to these variables being unset
+ localdata.setVar('PV', d.getVar('PV'))
localdata.delVar('DATETIME')
+ localdata.delVar('DATE')
localdata.delVar('TMPDIR')
+ vardepsexclude = (d.getVarFlag('IMAGE_CMD_' + realt, 'vardepsexclude', True) or '').split()
+ for dep in vardepsexclude:
+ localdata.delVar(dep)
- image_cmd = localdata.getVar("IMAGE_CMD", True)
+ image_cmd = localdata.getVar("IMAGE_CMD")
vardeps.add('IMAGE_CMD_' + realt)
if image_cmd:
cmds.append("\t" + image_cmd)
@@ -456,15 +450,15 @@ python () {
rm_tmp_images = set()
def gen_conversion_cmds(bt):
- for ctype in ctypes:
- if bt[bt.find('.') + 1:] == ctype:
+ for ctype in sorted(ctypes):
+ if bt.endswith("." + ctype):
type = bt[0:-len(ctype) - 1]
if type.startswith("debugfs_"):
type = type[8:]
# Create input image first.
gen_conversion_cmds(type)
localdata.setVar('type', type)
- cmd = "\t" + (localdata.getVar("CONVERSION_CMD_" + ctype, True) or localdata.getVar("COMPRESS_CMD_" + ctype, True))
+ cmd = "\t" + (localdata.getVar("CONVERSION_CMD_" + ctype) or localdata.getVar("COMPRESS_CMD_" + ctype))
if cmd not in cmds:
cmds.append(cmd)
vardeps.add('CONVERSION_CMD_' + ctype)
@@ -487,26 +481,27 @@ python () {
# Clean up after applying all conversion commands. Some of them might
# use the same input, therefore we cannot delete sooner without applying
# some complex dependency analysis.
- for image in rm_tmp_images:
+ for image in sorted(rm_tmp_images):
cmds.append("\trm " + image)
after = 'do_image'
for dep in typedeps[t]:
after += ' do_image_%s' % dep.replace("-", "_").replace(".", "_")
- t = t.replace("-", "_").replace(".", "_")
+ task = "do_image_%s" % t.replace("-", "_").replace(".", "_")
+
+ d.setVar(task, '\n'.join(cmds))
+ d.setVarFlag(task, 'func', '1')
+ d.setVarFlag(task, 'fakeroot', '1')
- d.setVar('do_image_%s' % t, '\n'.join(cmds))
- d.setVarFlag('do_image_%s' % t, 'func', '1')
- d.setVarFlag('do_image_%s' % t, 'fakeroot', '1')
- d.setVarFlag('do_image_%s' % t, 'prefuncs', debug + 'set_image_size')
- d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks')
- d.setVarFlag('do_image_%s' % t, 'subimages', ' '.join(subimages))
- d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps))
- d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME')
+ d.appendVarFlag(task, 'prefuncs', ' ' + debug + ' set_image_size')
+ d.prependVarFlag(task, 'postfuncs', 'create_symlinks ')
+ d.appendVarFlag(task, 'subimages', ' ' + ' '.join(subimages))
+ d.appendVarFlag(task, 'vardeps', ' ' + ' '.join(vardeps))
+ d.appendVarFlag(task, 'vardepsexclude', ' DATETIME DATE ' + ' '.join(vardepsexclude))
- bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after))
- bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d)
+ bb.debug(2, "Adding task %s before %s, after %s" % (task, 'do_image_complete', after))
+ bb.build.addtask(task, 'do_image_complete', after, d)
}
#
@@ -515,33 +510,41 @@ python () {
def get_rootfs_size(d):
import subprocess
- rootfs_alignment = int(d.getVar('IMAGE_ROOTFS_ALIGNMENT', True))
- overhead_factor = float(d.getVar('IMAGE_OVERHEAD_FACTOR', True))
- rootfs_req_size = int(d.getVar('IMAGE_ROOTFS_SIZE', True))
- rootfs_extra_space = eval(d.getVar('IMAGE_ROOTFS_EXTRA_SPACE', True))
- rootfs_maxsize = d.getVar('IMAGE_ROOTFS_MAXSIZE', True)
- image_fstypes = d.getVar('IMAGE_FSTYPES', True) or ''
- initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES', True) or ''
- initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE', True)
+ rootfs_alignment = int(d.getVar('IMAGE_ROOTFS_ALIGNMENT'))
+ overhead_factor = float(d.getVar('IMAGE_OVERHEAD_FACTOR'))
+ rootfs_req_size = int(d.getVar('IMAGE_ROOTFS_SIZE'))
+ rootfs_extra_space = eval(d.getVar('IMAGE_ROOTFS_EXTRA_SPACE'))
+ rootfs_maxsize = d.getVar('IMAGE_ROOTFS_MAXSIZE')
+ image_fstypes = d.getVar('IMAGE_FSTYPES') or ''
+ initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES') or ''
+ initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE')
output = subprocess.check_output(['du', '-ks',
- d.getVar('IMAGE_ROOTFS', True)])
+ d.getVar('IMAGE_ROOTFS')])
size_kb = int(output.split()[0])
+
base_size = size_kb * overhead_factor
- base_size = max(base_size, rootfs_req_size) + rootfs_extra_space
+ bb.debug(1, '%f = %d * %f' % (base_size, size_kb, overhead_factor))
+ base_size2 = max(base_size, rootfs_req_size) + rootfs_extra_space
+ bb.debug(1, '%f = max(%f, %d)[%f] + %d' % (base_size2, base_size, rootfs_req_size, max(base_size, rootfs_req_size), rootfs_extra_space))
+ base_size = base_size2
if base_size != int(base_size):
base_size = int(base_size + 1)
else:
base_size = int(base_size)
+ bb.debug(1, '%f = int(%f)' % (base_size, base_size2))
+ base_size_saved = base_size
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
+ bb.debug(1, '%d = aligned(%d)' % (base_size, base_size_saved))
# Do not check image size of the debugfs image. This is not supposed
# to be deployed, etc. so it doesn't make sense to limit the size
# of the debug.
- if (d.getVar('IMAGE_BUILDING_DEBUGFS', True) or "") == "true":
+ if (d.getVar('IMAGE_BUILDING_DEBUGFS') or "") == "true":
+ bb.debug(1, 'returning debugfs size %d' % (base_size))
return base_size
# Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
@@ -559,6 +562,8 @@ def get_rootfs_size(d):
(base_size, initramfs_maxsize_int))
bb.error("You can set INITRAMFS_MAXSIZE a larger value. Usually, it should")
bb.fatal("be less than 1/2 of ram size, or you may fail to boot it.\n")
+
+ bb.debug(1, 'returning %d' % (base_size))
return base_size
python set_image_size () {
@@ -572,13 +577,13 @@ python set_image_size () {
#
python create_symlinks() {
- deploy_dir = d.getVar('IMGDEPLOYDIR', True)
- img_name = d.getVar('IMAGE_NAME', True)
- link_name = d.getVar('IMAGE_LINK_NAME', True)
- manifest_name = d.getVar('IMAGE_MANIFEST', True)
- taskname = d.getVar("BB_CURRENTTASK", True)
+ deploy_dir = d.getVar('IMGDEPLOYDIR')
+ img_name = d.getVar('IMAGE_NAME')
+ link_name = d.getVar('IMAGE_LINK_NAME')
+ manifest_name = d.getVar('IMAGE_MANIFEST')
+ taskname = d.getVar("BB_CURRENTTASK")
subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split()
- imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or d.expand("${IMAGE_NAME_SUFFIX}.")
+ imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix') or d.expand("${IMAGE_NAME_SUFFIX}.")
if not link_name:
return
@@ -588,9 +593,6 @@ python create_symlinks() {
if os.path.exists(os.path.join(deploy_dir, src)):
bb.note("Creating symlink: %s -> %s" % (dst, src))
if os.path.islink(dst):
- if d.getVar('RM_OLD_IMAGE', True) == "1" and \
- os.path.exists(os.path.realpath(dst)):
- os.remove(os.path.realpath(dst))
os.remove(dst)
os.symlink(src, dst)
else:
@@ -607,19 +609,66 @@ do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install[noexec] = "1"
-do_populate_sysroot[noexec] = "1"
+deltask do_populate_sysroot
do_package[noexec] = "1"
-do_package_qa[noexec] = "1"
+deltask do_package_qa
do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
-
-# Allow the kernel to be repacked with the initramfs and boot image file as a single file
-do_bundle_initramfs[depends] += "virtual/kernel:do_bundle_initramfs"
-do_bundle_initramfs[nostamp] = "1"
-do_bundle_initramfs[noexec] = "1"
-do_bundle_initramfs () {
- :
+deltask do_package_write_ipk
+deltask do_package_write_deb
+deltask do_package_write_rpm
+
+# Prepare the root links to point to the /usr counterparts.
+create_merged_usr_symlinks() {
+ root="$1"
+ install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
+ lnr $root${base_bindir} $root/bin
+ lnr $root${base_sbindir} $root/sbin
+ lnr $root${base_libdir} $root/${baselib}
+
+ if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
+ install -d $root${nonarch_base_libdir}
+ lnr $root${nonarch_base_libdir} $root/lib
+ fi
+
+ # create base links for multilibs
+ multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
+ for d in $multi_libdirs; do
+ install -d $root${exec_prefix}/$d
+ lnr $root${exec_prefix}/$d $root/$d
+ done
+}
+
+create_merged_usr_symlinks_rootfs() {
+ create_merged_usr_symlinks ${IMAGE_ROOTFS}
}
-addtask bundle_initramfs after do_image_complete
+
+create_merged_usr_symlinks_sdk() {
+ create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
+}
+
+ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}"
+POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
+
+reproducible_final_image_task () {
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
+ if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
+ REPRODUCIBLE_TIMESTAMP_ROOTFS=`git -C "${COREBASE}" log -1 --pretty=%ct 2>/dev/null` || true
+ if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" = "" ]; then
+ REPRODUCIBLE_TIMESTAMP_ROOTFS=`stat -c%Y ${@bb.utils.which(d.getVar("BBPATH"), "conf/bitbake.conf")}`
+ fi
+ fi
+ # Set mtime of all files to a reproducible value
+ bbnote "reproducible_final_image_task: mtime set to $REPRODUCIBLE_TIMESTAMP_ROOTFS"
+ find ${IMAGE_ROOTFS} -exec touch -h --date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS {} \;
+ fi
+}
+
+systemd_preset_all () {
+ if [ -e ${IMAGE_ROOTFS}${root_prefix}/lib/systemd/systemd ]; then
+ systemctl --root="${IMAGE_ROOTFS}" --preset-mode=enable-only preset-all
+ fi
+}
+
+IMAGE_PREPROCESS_COMMAND_append = " ${@ 'systemd_preset_all;' if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and not bb.utils.contains('IMAGE_FEATURES', 'stateless-rootfs', True, False, d) else ''} reproducible_final_image_task; "
+
+CVE_PRODUCT = ""
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 5ef6f60b89..f82f1d8862 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -17,30 +17,50 @@ def imagetypes_getdepends(d):
d += ":do_populate_sysroot"
deps.add(d)
- fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
- fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
+ # Take a type in the form of foo.bar.car and split it into the items
+ # needed for the image deps "foo", and the conversion deps ["bar", "car"]
+ def split_types(typestring):
+ types = typestring.split(".")
+ return types[0], types[1:]
+
+ fstypes = set((d.getVar('IMAGE_FSTYPES') or "").split())
+ fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS') or "").split())
+ deprecated = set()
deps = set()
for typestring in fstypes:
- types = typestring.split(".")
- basetype, resttypes = types[0], types[1:]
+ basetype, resttypes = split_types(typestring)
+
+ var = "IMAGE_DEPENDS_%s" % basetype
+ if d.getVar(var) is not None:
+ deprecated.add(var)
+
+ for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype) or "").split():
+ base, rest = split_types(typedepends)
+ resttypes += rest
+
+ var = "IMAGE_DEPENDS_%s" % base
+ if d.getVar(var) is not None:
+ deprecated.add(var)
- adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
- for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
- adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
for ctype in resttypes:
- adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype, True), deps)
- adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
+ adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype), deps)
+ adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype), deps)
+
+ if deprecated:
+ bb.fatal('Deprecated variable(s) found: "%s". '
+ 'Use do_image_<type>[depends] += "<recipe>:<task>" instead' % ', '.join(deprecated))
# Sort the set so that ordering is consistant
return " ".join(sorted(deps))
-XZ_COMPRESSION_LEVEL ?= "-3"
+XZ_COMPRESSION_LEVEL ?= "-9"
XZ_INTEGRITY_CHECK ?= "crc32"
-XZ_THREADS ?= "-T 0"
ZIP_COMPRESSION_LEVEL ?= "-9"
+ZSTD_COMPRESSION_LEVEL ?= "-3"
+
JFFS2_SUM_EXTRA_ARGS ?= ""
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}"
@@ -64,8 +84,14 @@ oe_mkext234fs () {
eval COUNT=\"$MIN_COUNT\"
fi
# Create a sparse image block
+ bbdebug 1 Executing "dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024"
dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
+ bbdebug 1 "Actual Rootfs size: `du -s ${IMAGE_ROOTFS}`"
+ bbdebug 1 "Actual Partion size: `stat -c '%s' ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`"
+ bbdebug 1 Executing "mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}"
mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}
+ # Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected)
+ fsck.$fstype -pvfD ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype || [ $? -le 3 ]
}
IMAGE_CMD_ext2 = "oe_mkext234fs ext2 ${EXTRA_IMAGECMD}"
@@ -74,34 +100,37 @@ IMAGE_CMD_ext4 = "oe_mkext234fs ext4 ${EXTRA_IMAGECMD}"
MIN_BTRFS_SIZE ?= "16384"
IMAGE_CMD_btrfs () {
- if [ ${ROOTFS_SIZE} -gt ${MIN_BTRFS_SIZE} ]; then
- dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs count=${ROOTFS_SIZE} bs=1024
- mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs
- else
- bbfatal "Rootfs is too small for BTRFS (Rootfs Actual Size: ${ROOTFS_SIZE}, BTRFS Minimum Size: ${MIN_BTRFS_SIZE})"
+ size=${ROOTFS_SIZE}
+ if [ ${size} -lt ${MIN_BTRFS_SIZE} ] ; then
+ size=${MIN_BTRFS_SIZE}
+ bbwarn "Rootfs size is too small for BTRFS. Filesystem will be extended to ${size}K"
fi
+ dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs seek=${size} count=0 bs=1024
+ mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs
}
IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs ${EXTRA_IMAGECMD} -noappend"
IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
+IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lz4 ${EXTRA_IMAGECMD} -noappend -comp lz4"
# By default, tar from the host is used, which can be quite old. If
# you need special parameters (like --xattrs) which are only supported
# by GNU tar upstream >= 1.27, then override that default:
# IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
-# IMAGE_DEPENDS_tar_append = " tar-replacement-native"
+# do_image_tar[depends] += "tar-replacement-native:do_populate_sysroot"
# EXTRANATIVEPATH += "tar-native"
#
# The GNU documentation does not specify whether --xattrs-include is necessary.
# In practice, it turned out to be not needed when creating archives and
# required when extracting, but it seems prudent to use it in both cases.
IMAGE_CMD_TAR ?= "tar"
-IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} ."
+# ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD_cpio () {
- (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
+ (cd ${IMAGE_ROOTFS} && find . | sort | cpio --reproducible -o -H newc >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
# We only need the /init symlink if we're building the real
# image. The -dbg image doesn't need it! By being clever
# about this we also avoid 'touch' below failing, as it
@@ -119,21 +148,17 @@ IMAGE_CMD_cpio () {
fi
}
-ELF_KERNEL ?= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
-ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console="
-
-IMAGE_CMD_elf () {
- test -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
- mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.cpio.gz --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
-}
-
-IMAGE_TYPEDEP_elf = "cpio.gz"
-
UBI_VOLNAME ?= "${MACHINE}-rootfs"
multiubi_mkfs() {
local mkubifs_args="$1"
local ubinize_args="$2"
+
+ # Added prompt error message for ubi and ubifs image creation.
+ if [ -z "$mkubifs_args" ] || [ -z "$ubinize_args" ]; then
+ bbfatal "MKUBIFS_ARGS and UBINIZE_ARGS have to be set, see http://www.linux-mtd.infradead.org/faq/ubifs.html for details"
+ fi
+
if [ -z "$3" ]; then
local vname=""
else
@@ -147,7 +172,9 @@ multiubi_mkfs() {
echo vol_type=dynamic >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg
- mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
+ if [ -n "$vname" ]; then
+ mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
+ fi
ubinize -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubi ${ubinize_args} ubinize${vname}-${IMAGE_NAME}.cfg
# Cleanup cfg file
@@ -181,94 +208,31 @@ IMAGE_CMD_multiubi () {
IMAGE_CMD_ubi () {
multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}"
}
+IMAGE_TYPEDEP_ubi = "ubifs"
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}"
-WKS_FILE ?= "${IMAGE_BASENAME}.${MACHINE}.wks"
-WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
-WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l for l in '${BBPATH}:${COREBASE}'.split(':'))}"
-WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(), '${WKS_SEARCH_PATH}') or ''}"
-
-def wks_search(files, search_path):
- for f in files:
- if os.path.isabs(f):
- if os.path.exists(f):
- return f
- else:
- searched = bb.utils.which(search_path, f)
- if searched:
- return searched
-
-WIC_CREATE_EXTRA_ARGS ?= ""
-
-IMAGE_CMD_wic () {
- out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
- wks="${WKS_FULL_PATH}"
- if [ -z "$wks" ]; then
- bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
+MIN_F2FS_SIZE ?= "524288"
+IMAGE_CMD_f2fs () {
+ # We need to add additional smarts here form devices smaller than 1.5G
+ # Need to scale appropriately between 40M -> 1.5G as the "overprovision
+ # ratio" goes down as the device gets bigger (70% -> 4.5%), below about
+ # 500M the standard IMAGE_OVERHEAD_FACTOR does not work, so add additional
+ # space here when under 500M
+ size=${ROOTFS_SIZE}
+ if [ ${size} -lt ${MIN_F2FS_SIZE} ] ; then
+ size=${MIN_F2FS_SIZE}
+ bbwarn "Rootfs size is too small for F2FS. Filesystem will be extended to ${size}K"
fi
-
- BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR_TARGET}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}
- mv "$out/build/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"
- rm -rf "$out/"
-}
-IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
-
-# Rebuild when the wks file or vars in WICVARS change
-USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
-WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
-do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
-
-python do_write_wks_template () {
- """Write out expanded template contents to WKS_FULL_PATH."""
- import re
-
- template_body = d.getVar('_WKS_TEMPLATE', True)
-
- # Remove any remnant variable references left behind by the expansion
- # due to undefined variables
- expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")
- while True:
- new_body = re.sub(expand_var_regexp, '', template_body)
- if new_body == template_body:
- break
- else:
- template_body = new_body
-
- wks_file = d.getVar('WKS_FULL_PATH', True)
- with open(wks_file, 'w') as f:
- f.write(template_body)
-}
-
-python () {
- if d.getVar('USING_WIC', True):
- wks_file_u = d.getVar('WKS_FULL_PATH', False)
- wks_file = d.expand(wks_file_u)
- base, ext = os.path.splitext(wks_file)
- if ext == '.in' and os.path.exists(wks_file):
- wks_out_file = os.path.join(d.getVar('WORKDIR', True), os.path.basename(base))
- d.setVar('WKS_FULL_PATH', wks_out_file)
- d.setVar('WKS_TEMPLATE_PATH', wks_file_u)
- d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True')
-
- try:
- with open(wks_file, 'r') as f:
- body = f.read()
- except (IOError, OSError) as exc:
- pass
- else:
- # Previously, I used expandWithRefs to get the dependency list
- # and add it to WICVARS, but there's no point re-parsing the
- # file in process_wks_template as well, so just put it in
- # a variable and let the metadata deal with the deps.
- d.setVar('_WKS_TEMPLATE', body)
- bb.build.addtask('do_write_wks_template', 'do_image_wic', None, d)
+ dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs seek=${size} count=0 bs=1024
+ mkfs.f2fs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs
+ sload.f2fs -f ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs
}
EXTRA_IMAGECMD = ""
-inherit siteinfo
-JFFS2_ENDIANNESS ?= "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
+inherit siteinfo kernel-arch
+JFFS2_ENDIANNESS ?= "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
JFFS2_ERASEBLOCK ?= "0x40000"
EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLOCK} --no-cleanmarkers"
@@ -277,23 +241,23 @@ EXTRA_IMAGECMD_ext2 ?= "-i 4096"
EXTRA_IMAGECMD_ext3 ?= "-i 4096"
EXTRA_IMAGECMD_ext4 ?= "-i 4096"
EXTRA_IMAGECMD_btrfs ?= "-n 4096"
-EXTRA_IMAGECMD_elf ?= ""
-
-IMAGE_DEPENDS = ""
-IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
-IMAGE_DEPENDS_cramfs = "util-linux-native"
-IMAGE_DEPENDS_ext2 = "e2fsprogs-native"
-IMAGE_DEPENDS_ext3 = "e2fsprogs-native"
-IMAGE_DEPENDS_ext4 = "e2fsprogs-native"
-IMAGE_DEPENDS_btrfs = "btrfs-tools-native"
-IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
-IMAGE_DEPENDS_squashfs-xz = "squashfs-tools-native"
-IMAGE_DEPENDS_squashfs-lzo = "squashfs-tools-native"
-IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native"
-IMAGE_DEPENDS_ubi = "mtd-utils-native"
-IMAGE_DEPENDS_ubifs = "mtd-utils-native"
-IMAGE_DEPENDS_multiubi = "mtd-utils-native"
-IMAGE_DEPENDS_wic = "parted-native"
+EXTRA_IMAGECMD_f2fs ?= ""
+
+do_image_cpio[depends] += "cpio-native:do_populate_sysroot"
+do_image_jffs2[depends] += "mtd-utils-native:do_populate_sysroot"
+do_image_cramfs[depends] += "util-linux-native:do_populate_sysroot"
+do_image_ext2[depends] += "e2fsprogs-native:do_populate_sysroot"
+do_image_ext3[depends] += "e2fsprogs-native:do_populate_sysroot"
+do_image_ext4[depends] += "e2fsprogs-native:do_populate_sysroot"
+do_image_btrfs[depends] += "btrfs-tools-native:do_populate_sysroot"
+do_image_squashfs[depends] += "squashfs-tools-native:do_populate_sysroot"
+do_image_squashfs_xz[depends] += "squashfs-tools-native:do_populate_sysroot"
+do_image_squashfs_lzo[depends] += "squashfs-tools-native:do_populate_sysroot"
+do_image_squashfs_lz4[depends] += "squashfs-tools-native:do_populate_sysroot"
+do_image_ubi[depends] += "mtd-utils-native:do_populate_sysroot"
+do_image_ubifs[depends] += "mtd-utils-native:do_populate_sysroot"
+do_image_multiubi[depends] += "mtd-utils-native:do_populate_sysroot"
+do_image_f2fs[depends] += "f2fs-tools-native:do_populate_sysroot"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
IMAGE_TYPES = " \
@@ -305,16 +269,13 @@ IMAGE_TYPES = " \
btrfs \
iso \
hddimg \
- squashfs squashfs-xz squashfs-lzo \
+ squashfs squashfs-xz squashfs-lzo squashfs-lz4 \
ubi ubifs multiubi \
- tar tar.gz tar.bz2 tar.xz tar.lz4 \
+ tar tar.gz tar.bz2 tar.xz tar.lz4 tar.zst \
cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \
- vmdk \
- vdi \
- qcow2 \
- hdddirect \
- elf \
wic wic.gz wic.bz2 wic.lzma \
+ container \
+ f2fs \
"
# Compression is a special case of conversion. The old variable
@@ -323,13 +284,15 @@ IMAGE_TYPES = " \
# CONVERSION_CMD/DEPENDS.
COMPRESSIONTYPES ?= ""
-CONVERSIONTYPES = "gz bz2 lzma xz lz4 zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap ${COMPRESSIONTYPES}"
+CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 ${COMPRESSIONTYPES}"
CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-CONVERSION_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
+CONVERSION_CMD_gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
-CONVERSION_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
+CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_DEFAULTS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
+CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
+CONVERSION_CMD_lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+CONVERSION_CMD_zst = "zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zst"
CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
CONVERSION_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum"
CONVERSION_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum"
@@ -338,27 +301,35 @@ CONVERSION_CMD_sha256sum = "sha256sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
CONVERSION_CMD_sha384sum = "sha384sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha384sum"
CONVERSION_CMD_sha512sum = "sha512sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha512sum"
CONVERSION_CMD_bmap = "bmaptool create ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.bmap"
+CONVERSION_CMD_u-boot = "mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C none -n ${IMAGE_NAME} -d ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.u-boot"
+CONVERSION_CMD_vmdk = "qemu-img convert -O vmdk ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vmdk"
+CONVERSION_CMD_vdi = "qemu-img convert -O vdi ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vdi"
+CONVERSION_CMD_qcow2 = "qemu-img convert -O qcow2 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qcow2"
+CONVERSION_CMD_base64 = "base64 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.base64"
CONVERSION_DEPENDS_lzma = "xz-native"
-CONVERSION_DEPENDS_gz = ""
+CONVERSION_DEPENDS_gz = "pigz-native"
CONVERSION_DEPENDS_bz2 = "pbzip2-native"
CONVERSION_DEPENDS_xz = "xz-native"
CONVERSION_DEPENDS_lz4 = "lz4-native"
+CONVERSION_DEPENDS_lzo = "lzop-native"
CONVERSION_DEPENDS_zip = "zip-native"
+CONVERSION_DEPENDS_zst = "zstd-native"
CONVERSION_DEPENDS_sum = "mtd-utils-native"
CONVERSION_DEPENDS_bmap = "bmap-tools-native"
+CONVERSION_DEPENDS_u-boot = "u-boot-tools-native"
+CONVERSION_DEPENDS_vmdk = "qemu-system-native"
+CONVERSION_DEPENDS_vdi = "qemu-system-native"
+CONVERSION_DEPENDS_qcow2 = "qemu-system-native"
+CONVERSION_DEPENDS_base64 = "coreutils-native"
RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4"
RUNNABLE_MACHINE_PATTERNS ?= "qemu"
DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso"
-# Use IMAGE_EXTENSION_xxx to map image type 'xxx' with real image file extension name(s) for Hob
-IMAGE_EXTENSION_live = "hddimg iso"
-
# The IMAGE_TYPES_MASKED variable will be used to mask out from the IMAGE_FSTYPES,
-# images that will not be built at do_rootfs time: vmdk, vdi, qcow2, hdddirect, hddimg, iso, etc.
+# images that will not be built at do_rootfs time: vmdk, vdi, qcow2, hddimg, iso, etc.
IMAGE_TYPES_MASKED ?= ""
-# The WICVARS variable is used to define list of bitbake variables used in wic code
-# variables from this list is written to <image>.env file
-WICVARS ?= "BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE HDDDIR IMAGE_BASENAME IMAGE_BOOT_FILES IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD ISODIR MACHINE_ARCH ROOTFS_SIZE STAGING_DATADIR STAGING_DIR_NATIVE STAGING_LIBDIR TARGET_SYS"
+# bmap requires python3 to be in the PATH
+EXTRANATIVEPATH += "${@'python3-native' if d.getVar('IMAGE_FSTYPES').find('.bmap') else ''}"
diff --git a/meta/classes/image_types_uboot.bbclass b/meta/classes/image_types_uboot.bbclass
deleted file mode 100644
index 6c8c1ff60e..0000000000
--- a/meta/classes/image_types_uboot.bbclass
+++ /dev/null
@@ -1,26 +0,0 @@
-inherit image_types kernel-arch
-
-oe_mkimage () {
- mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C $2 -n ${IMAGE_NAME} \
- -d ${IMGDEPLOYDIR}/$1 ${IMGDEPLOYDIR}/$1.u-boot
- if [ x$3 = x"clean" ]; then
- rm $1
- fi
-}
-
-CONVERSIONTYPES += "gz.u-boot bz2.u-boot lzma.u-boot u-boot"
-
-CONVERSION_DEPENDS_u-boot = "u-boot-mkimage-native"
-CONVERSION_CMD_u-boot = "oe_mkimage ${IMAGE_NAME}.rootfs.${type} none"
-
-CONVERSION_DEPENDS_gz.u-boot = "u-boot-mkimage-native"
-CONVERSION_CMD_gz.u-boot = "${CONVERSION_CMD_gz}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.gz gzip clean"
-
-CONVERSION_DEPENDS_bz2.u-boot = "u-boot-mkimage-native"
-CONVERSION_CMD_bz2.u-boot = "${CONVERSION_CMD_bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.bz2 bzip2 clean"
-
-CONVERSION_DEPENDS_lzma.u-boot = "u-boot-mkimage-native"
-CONVERSION_CMD_lzma.u-boot = "${CONVERSION_CMD_lzma}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.lzma lzma clean"
-
-IMAGE_TYPES += "ext2.u-boot ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot cpio.gz.u-boot"
-
diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass
new file mode 100644
index 0000000000..f350dc2723
--- /dev/null
+++ b/meta/classes/image_types_wic.bbclass
@@ -0,0 +1,142 @@
+# The WICVARS variable is used to define list of bitbake variables used in wic code
+# variables from this list is written to <image>.env file
+WICVARS ?= "\
+ BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_BOOT_FILES \
+ IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \
+ ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS \
+ KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME"
+
+inherit ${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', 'kernel-artifact-names', '', d)}
+
+WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
+WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
+WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l for l in '${BBPATH}:${COREBASE}'.split(':'))}"
+WKS_FULL_PATH = "${@wks_search(d.getVar('WKS_FILES').split(), d.getVar('WKS_SEARCH_PATH')) or ''}"
+
+def wks_search(files, search_path):
+ for f in files:
+ if os.path.isabs(f):
+ if os.path.exists(f):
+ return f
+ else:
+ searched = bb.utils.which(search_path, f)
+ if searched:
+ return searched
+
+WIC_CREATE_EXTRA_ARGS ?= ""
+
+IMAGE_CMD_wic () {
+ out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
+ wks="${WKS_FULL_PATH}"
+ if [ -z "$wks" ]; then
+ bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
+ fi
+
+ BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}
+ mv "$out/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"
+ rm -rf "$out/"
+}
+IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR"
+
+# Rebuild when the wks file or vars in WICVARS change
+USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
+WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
+do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
+do_image_wic[depends] += "${@' '.join('%s-native:do_populate_sysroot' % r for r in ('parted', 'gptfdisk', 'dosfstools', 'mtools'))}"
+
+# We ensure all artfacts are deployed (e.g virtual/bootloader)
+do_image_wic[recrdeptask] += "do_deploy"
+
+WKS_FILE_DEPENDS_DEFAULT = '${@bb.utils.contains_any("BUILD_ARCH", [ 'x86_64', 'i686' ], "syslinux-native", "",d)}'
+WKS_FILE_DEPENDS_DEFAULT += "bmap-tools-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native"
+WKS_FILE_DEPENDS_BOOTLOADERS = ""
+WKS_FILE_DEPENDS_BOOTLOADERS_x86 = "syslinux grub-efi systemd-boot"
+WKS_FILE_DEPENDS_BOOTLOADERS_x86-64 = "syslinux grub-efi systemd-boot"
+WKS_FILE_DEPENDS_BOOTLOADERS_x86-x32 = "syslinux grub-efi"
+
+WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS}"
+
+DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else '' }"
+
+python do_write_wks_template () {
+ """Write out expanded template contents to WKS_FULL_PATH."""
+ import re
+
+ template_body = d.getVar('_WKS_TEMPLATE')
+
+ # Remove any remnant variable references left behind by the expansion
+ # due to undefined variables
+ expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")
+ while True:
+ new_body = re.sub(expand_var_regexp, '', template_body)
+ if new_body == template_body:
+ break
+ else:
+ template_body = new_body
+
+ wks_file = d.getVar('WKS_FULL_PATH')
+ with open(wks_file, 'w') as f:
+ f.write(template_body)
+ f.close()
+ # Copy the finalized wks file to the deploy directory for later use
+ depdir = d.getVar('IMGDEPLOYDIR')
+ basename = d.getVar('IMAGE_BASENAME')
+ bb.utils.copyfile(wks_file, "%s/%s" % (depdir, basename + '-' + os.path.basename(wks_file)))
+}
+
+python () {
+ if d.getVar('USING_WIC'):
+ wks_file_u = d.getVar('WKS_FULL_PATH', False)
+ wks_file = d.expand(wks_file_u)
+ base, ext = os.path.splitext(wks_file)
+ if ext == '.in' and os.path.exists(wks_file):
+ wks_out_file = os.path.join(d.getVar('WORKDIR'), os.path.basename(base))
+ d.setVar('WKS_FULL_PATH', wks_out_file)
+ d.setVar('WKS_TEMPLATE_PATH', wks_file_u)
+ d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True')
+
+ # We need to re-parse each time the file changes, and bitbake
+ # needs to be told about that explicitly.
+ bb.parse.mark_dependency(d, wks_file)
+
+ try:
+ with open(wks_file, 'r') as f:
+ body = f.read()
+ except (IOError, OSError) as exc:
+ pass
+ else:
+ # Previously, I used expandWithRefs to get the dependency list
+ # and add it to WICVARS, but there's no point re-parsing the
+ # file in process_wks_template as well, so just put it in
+ # a variable and let the metadata deal with the deps.
+ d.setVar('_WKS_TEMPLATE', body)
+ bb.build.addtask('do_write_wks_template', 'do_image_wic', 'do_image', d)
+ bb.build.addtask('do_image_wic', 'do_image_complete', None, d)
+}
+
+#
+# Write environment variables used by wic
+# to tmp/sysroots/<machine>/imgdata/<image>.env
+#
+python do_rootfs_wicenv () {
+ wicvars = d.getVar('WICVARS')
+ if not wicvars:
+ return
+
+ stdir = d.getVar('STAGING_DIR')
+ outdir = os.path.join(stdir, d.getVar('MACHINE'), 'imgdata')
+ bb.utils.mkdirhier(outdir)
+ basename = d.getVar('IMAGE_BASENAME')
+ with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
+ for var in wicvars.split():
+ value = d.getVar(var)
+ if value:
+ envf.write('%s="%s"\n' % (var, value.strip()))
+ envf.close()
+ # Copy .env file to deploy directory for later use with stand alone wic
+ depdir = d.getVar('IMGDEPLOYDIR')
+ bb.utils.copyfile(os.path.join(outdir, basename) + '.env', os.path.join(depdir, basename) + '.env')
+}
+addtask do_rootfs_wicenv after do_image before do_image_wic
+do_rootfs_wicenv[vardeps] += "${WICVARS}"
+do_rootfs_wicenv[prefuncs] = 'set_image_size'
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 2f3f768d58..0564f9c2a4 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -16,13 +16,8 @@
# into exec_prefix
# -Check that scripts in base_[bindir|sbindir|libdir] do not reference
# files under exec_prefix
+# -Check if the package name is upper case
-
-# unsafe-references-in-binaries requires prelink-rtld from
-# prelink-native, but we don't want this DEPENDS for -native builds
-QADEPENDS = "prelink-native"
-QADEPENDS_class-native = ""
-QADEPENDS_class-nativesdk = ""
QA_SANE = "True"
# Elect whether a given type of error is a warning or error, they may
@@ -30,16 +25,20 @@ QA_SANE = "True"
WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
textrel already-stripped incompatible-license files-invalid \
installed-vs-shipped compile-host-path install-host-path \
- pn-overrides infodir build-deps file-rdeps \
+ pn-overrides infodir build-deps src-uri-bad \
unknown-configure-option symlink-to-sysroot multilib \
- invalid-packageconfig host-user-contaminated \
+ invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
split-strip packages-list pkgv-undefined var-undefined \
version-going-backwards expanded-d invalid-chars \
- license-checksum dev-elf \
+ license-checksum dev-elf file-rdeps configure-unsafe \
+ configure-gettext perllocalpod \
"
+# Add usrmerge QA check based on distro feature
+ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
+
FAKEROOT_QA = "host-user-contaminated"
FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \
enabled tests are listed here, the do_package_qa task will run under fakeroot."
@@ -48,160 +47,30 @@ ALL_QA = "${WARN_QA} ${ERROR_QA}"
UNKNOWN_CONFIGURE_WHITELIST ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot --disable-static"
-#
-# dictionary for elf headers
-#
-# feel free to add and correct.
-#
-# TARGET_OS TARGET_ARCH MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
-def package_qa_get_machine_dict(d):
- machdata = {
- "darwin9" : {
- "arm" : (40, 0, 0, True, 32),
- },
- "eabi" : {
- "arm" : (40, 0, 0, True, 32),
- },
- "elf" : {
- "i586" : (3, 0, 0, True, 32),
- "x86_64": (62, 0, 0, True, 64),
- "epiphany": (4643, 0, 0, True, 32),
- },
- "linux" : {
- "aarch64" : (183, 0, 0, True, 64),
- "aarch64_be" :(183, 0, 0, False, 64),
- "arm" : (40, 97, 0, True, 32),
- "armeb": (40, 97, 0, False, 32),
- "powerpc": (20, 0, 0, False, 32),
- "powerpc64": (21, 0, 0, False, 64),
- "i386": ( 3, 0, 0, True, 32),
- "i486": ( 3, 0, 0, True, 32),
- "i586": ( 3, 0, 0, True, 32),
- "i686": ( 3, 0, 0, True, 32),
- "x86_64": (62, 0, 0, True, 64),
- "ia64": (50, 0, 0, True, 64),
- "alpha": (36902, 0, 0, True, 64),
- "hppa": (15, 3, 0, False, 32),
- "m68k": ( 4, 0, 0, False, 32),
- "mips": ( 8, 0, 0, False, 32),
- "mipsel": ( 8, 0, 0, True, 32),
- "mips64": ( 8, 0, 0, False, 64),
- "mips64el": ( 8, 0, 0, True, 64),
- "nios2": (113, 0, 0, True, 32),
- "s390": (22, 0, 0, False, 32),
- "sh4": (42, 0, 0, True, 32),
- "sparc": ( 2, 0, 0, False, 32),
- "microblaze": (189, 0, 0, False, 32),
- "microblazeeb":(189, 0, 0, False, 32),
- "microblazeel":(189, 0, 0, True, 32),
- },
- "linux-uclibc" : {
- "arm" : ( 40, 97, 0, True, 32),
- "armeb": ( 40, 97, 0, False, 32),
- "powerpc": ( 20, 0, 0, False, 32),
- "i386": ( 3, 0, 0, True, 32),
- "i486": ( 3, 0, 0, True, 32),
- "i586": ( 3, 0, 0, True, 32),
- "i686": ( 3, 0, 0, True, 32),
- "x86_64": ( 62, 0, 0, True, 64),
- "mips": ( 8, 0, 0, False, 32),
- "mipsel": ( 8, 0, 0, True, 32),
- "mips64": ( 8, 0, 0, False, 64),
- "mips64el": ( 8, 0, 0, True, 64),
- "avr32": (6317, 0, 0, False, 32),
- "sh4": (42, 0, 0, True, 32),
-
- },
- "linux-musl" : {
- "aarch64" : (183, 0, 0, True, 64),
- "aarch64_be" :(183, 0, 0, False, 64),
- "arm" : ( 40, 97, 0, True, 32),
- "armeb": ( 40, 97, 0, False, 32),
- "powerpc": ( 20, 0, 0, False, 32),
- "i386": ( 3, 0, 0, True, 32),
- "i486": ( 3, 0, 0, True, 32),
- "i586": ( 3, 0, 0, True, 32),
- "i686": ( 3, 0, 0, True, 32),
- "x86_64": ( 62, 0, 0, True, 64),
- "mips": ( 8, 0, 0, False, 32),
- "mipsel": ( 8, 0, 0, True, 32),
- "mips64": ( 8, 0, 0, False, 64),
- "mips64el": ( 8, 0, 0, True, 64),
- "microblaze": (189, 0, 0, False, 32),
- "microblazeeb":(189, 0, 0, False, 32),
- "microblazeel":(189, 0, 0, True, 32),
- },
- "uclinux-uclibc" : {
- "bfin": ( 106, 0, 0, True, 32),
- },
- "linux-gnueabi" : {
- "arm" : (40, 0, 0, True, 32),
- "armeb" : (40, 0, 0, False, 32),
- },
- "linux-musleabi" : {
- "arm" : (40, 0, 0, True, 32),
- "armeb" : (40, 0, 0, False, 32),
- },
- "linux-uclibceabi" : {
- "arm" : (40, 0, 0, True, 32),
- "armeb" : (40, 0, 0, False, 32),
- },
- "linux-gnuspe" : {
- "powerpc": (20, 0, 0, False, 32),
- },
- "linux-muslspe" : {
- "powerpc": (20, 0, 0, False, 32),
- },
- "linux-uclibcspe" : {
- "powerpc": (20, 0, 0, False, 32),
- },
- "linux-gnu" : {
- "powerpc": (20, 0, 0, False, 32),
- "sh4": (42, 0, 0, True, 32),
- },
- "linux-gnux32" : {
- "x86_64": (62, 0, 0, True, 32),
- },
- "linux-gnun32" : {
- "mips64": ( 8, 0, 0, False, 32),
- "mips64el": ( 8, 0, 0, True, 32),
- },
- }
-
- # Add in any extra user supplied data which may come from a BSP layer, removing the
- # need to always change this class directly
- extra_machdata = (d.getVar("PACKAGEQA_EXTRA_MACHDEFFUNCS", True) or "").split()
- for m in extra_machdata:
- call = m + "(machdata, d)"
- locs = { "machdata" : machdata, "d" : d}
- machdata = bb.utils.better_eval(call, locs)
-
- return machdata
-
-
def package_qa_clean_path(path, d, pkg=None):
"""
Remove redundant paths from the path for display. If pkg isn't set then
TMPDIR is stripped, otherwise PKGDEST/pkg is stripped.
"""
if pkg:
- path = path.replace(os.path.join(d.getVar("PKGDEST", True), pkg), "/")
- return path.replace(d.getVar("TMPDIR", True), "/").replace("//", "/")
+ path = path.replace(os.path.join(d.getVar("PKGDEST"), pkg), "/")
+ return path.replace(d.getVar("TMPDIR"), "/").replace("//", "/")
def package_qa_write_error(type, error, d):
- logfile = d.getVar('QA_LOGFILE', True)
+ logfile = d.getVar('QA_LOGFILE')
if logfile:
- p = d.getVar('P', True)
+ p = d.getVar('P')
with open(logfile, "a+") as f:
f.write("%s: %s [%s]\n" % (p, error, type))
def package_qa_handle_error(error_class, error_msg, d):
- package_qa_write_error(error_class, error_msg, d)
- if error_class in (d.getVar("ERROR_QA", True) or "").split():
+ if error_class in (d.getVar("ERROR_QA") or "").split():
+ package_qa_write_error(error_class, error_msg, d)
bb.error("QA Issue: %s [%s]" % (error_msg, error_class))
d.setVar("QA_SANE", False)
return False
- elif error_class in (d.getVar("WARN_QA", True) or "").split():
+ elif error_class in (d.getVar("WARN_QA") or "").split():
+ package_qa_write_error(error_class, error_msg, d)
bb.warn("QA Issue: %s [%s]" % (error_msg, error_class))
else:
bb.note("QA Issue: %s [%s]" % (error_msg, error_class))
@@ -217,7 +86,7 @@ QAPATHTEST[libexec] = "package_qa_check_libexec"
def package_qa_check_libexec(path,name, d, elf, messages):
# Skip the case where the default is explicitly /usr/libexec
- libexec = d.getVar('libexecdir', True)
+ libexec = d.getVar('libexecdir')
if libexec == "/usr/libexec":
return True
@@ -238,12 +107,12 @@ def package_qa_check_rpath(file,name, d, elf, messages):
if os.path.islink(file):
return
- bad_dirs = [d.getVar('BASE_WORKDIR', True), d.getVar('STAGING_DIR_TARGET', True)]
+ bad_dirs = [d.getVar('BASE_WORKDIR'), d.getVar('STAGING_DIR_TARGET')]
phdrs = elf.run_objdump("-p", d)
import re
- rpath_re = re.compile("\s+RPATH\s+(.*)")
+ rpath_re = re.compile(r"\s+RPATH\s+(.*)")
for line in phdrs.split("\n"):
m = rpath_re.match(line)
if m:
@@ -266,13 +135,13 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
if os.path.islink(file):
return
- libdir = d.getVar("libdir", True)
- base_libdir = d.getVar("base_libdir", True)
+ libdir = d.getVar("libdir")
+ base_libdir = d.getVar("base_libdir")
phdrs = elf.run_objdump("-p", d)
import re
- rpath_re = re.compile("\s+RPATH\s+(.*)")
+ rpath_re = re.compile(r"\s+RPATH\s+(.*)")
for line in phdrs.split("\n"):
m = rpath_re.match(line)
if m:
@@ -324,29 +193,29 @@ def package_qa_check_libdir(d):
"""
import re
- pkgdest = d.getVar('PKGDEST', True)
- base_libdir = d.getVar("base_libdir",True) + os.sep
- libdir = d.getVar("libdir", True) + os.sep
- libexecdir = d.getVar("libexecdir", True) + os.sep
- exec_prefix = d.getVar("exec_prefix", True) + os.sep
+ pkgdest = d.getVar('PKGDEST')
+ base_libdir = d.getVar("base_libdir") + os.sep
+ libdir = d.getVar("libdir") + os.sep
+ libexecdir = d.getVar("libexecdir") + os.sep
+ exec_prefix = d.getVar("exec_prefix") + os.sep
messages = []
# The re's are purposely fuzzy, as some there are some .so.x.y.z files
# that don't follow the standard naming convention. It checks later
# that they are actual ELF files
- lib_re = re.compile("^/lib.+\.so(\..+)?$")
- exec_re = re.compile("^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
+ lib_re = re.compile(r"^/lib.+\.so(\..+)?$")
+ exec_re = re.compile(r"^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
for root, dirs, files in os.walk(pkgdest):
if root == pkgdest:
# Skip subdirectories for any packages with libdir in INSANE_SKIP
skippackages = []
for package in dirs:
- if 'libdir' in (d.getVar('INSANE_SKIP_' + package, True) or "").split():
+ if 'libdir' in (d.getVar('INSANE_SKIP_' + package) or "").split():
bb.note("Package %s skipping libdir QA test" % (package))
skippackages.append(package)
- elif d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory' and package.endswith("-dbg"):
+ elif d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-file-directory' and package.endswith("-dbg"):
bb.note("Package %s skipping libdir QA test for PACKAGE_DEBUG_SPLIT_STYLE equals debug-file-directory" % (package))
skippackages.append(package)
for package in skippackages:
@@ -387,138 +256,26 @@ def package_qa_check_dbg(path, name, d, elf, messages):
if not "-dbg" in name and not "-ptest" in name:
if '.debug' in path.split(os.path.sep):
- messages("debug-files", "non debug package contains .debug directory: %s path %s" % \
+ package_qa_add_message(messages, "debug-files", "non debug package contains .debug directory: %s path %s" % \
(name, package_qa_clean_path(path,d)))
-QAPATHTEST[perms] = "package_qa_check_perm"
-def package_qa_check_perm(path,name,d, elf, messages):
- """
- Check the permission of files
- """
- return
-
-QAPATHTEST[unsafe-references-in-binaries] = "package_qa_check_unsafe_references_in_binaries"
-def package_qa_check_unsafe_references_in_binaries(path, name, d, elf, messages):
- """
- Ensure binaries in base_[bindir|sbindir|libdir] do not link to files under exec_prefix
- """
- if unsafe_references_skippable(path, name, d):
- return
-
- if elf:
- import subprocess as sub
- pn = d.getVar('PN', True)
-
- exec_prefix = d.getVar('exec_prefix', True)
- sysroot_path = d.getVar('STAGING_DIR_TARGET', True)
- sysroot_path_usr = sysroot_path + exec_prefix
-
- try:
- ldd_output = bb.process.Popen(["prelink-rtld", "--root", sysroot_path, path], stdout=sub.PIPE).stdout.read().decode("utf-8")
- except bb.process.CmdError:
- error_msg = pn + ": prelink-rtld aborted when processing %s" % path
- package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
- return False
-
- if sysroot_path_usr in ldd_output:
- ldd_output = ldd_output.replace(sysroot_path, "")
-
- pkgdest = d.getVar('PKGDEST', True)
- packages = d.getVar('PACKAGES', True)
-
- for package in packages.split():
- short_path = path.replace('%s/%s' % (pkgdest, package), "", 1)
- if (short_path != path):
- break
-
- base_err = pn + ": %s, installed in the base_prefix, requires a shared library under exec_prefix (%s)" % (short_path, exec_prefix)
- for line in ldd_output.split('\n'):
- if exec_prefix in line:
- error_msg = "%s: %s" % (base_err, line.strip())
- package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
-
- return False
-
-QAPATHTEST[unsafe-references-in-scripts] = "package_qa_check_unsafe_references_in_scripts"
-def package_qa_check_unsafe_references_in_scripts(path, name, d, elf, messages):
- """
- Warn if scripts in base_[bindir|sbindir|libdir] reference files under exec_prefix
- """
- if unsafe_references_skippable(path, name, d):
- return
-
- if not elf:
- import stat
- import subprocess
- pn = d.getVar('PN', True)
-
- # Ensure we're checking an executable script
- statinfo = os.stat(path)
- if bool(statinfo.st_mode & stat.S_IXUSR):
- # grep shell scripts for possible references to /exec_prefix/
- exec_prefix = d.getVar('exec_prefix', True)
- statement = "grep -e '%s/[^ :]\{1,\}/[^ :]\{1,\}' %s > /dev/null" % (exec_prefix, path)
- if subprocess.call(statement, shell=True) == 0:
- error_msg = pn + ": Found a reference to %s/ in %s" % (exec_prefix, path)
- package_qa_handle_error("unsafe-references-in-scripts", error_msg, d)
- error_msg = "Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix"
- package_qa_handle_error("unsafe-references-in-scripts", error_msg, d)
-
-def unsafe_references_skippable(path, name, d):
- if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d):
- return True
-
- if "-dbg" in name or "-dev" in name:
- return True
-
- # Other package names to skip:
- if name.startswith("kernel-module-"):
- return True
-
- # Skip symlinks
- if os.path.islink(path):
- return True
-
- # Skip unusual rootfs layouts which make these tests irrelevant
- exec_prefix = d.getVar('exec_prefix', True)
- if exec_prefix == "":
- return True
-
- pkgdest = d.getVar('PKGDEST', True)
- pkgdest = pkgdest + "/" + name
- pkgdest = os.path.abspath(pkgdest)
- base_bindir = pkgdest + d.getVar('base_bindir', True)
- base_sbindir = pkgdest + d.getVar('base_sbindir', True)
- base_libdir = pkgdest + d.getVar('base_libdir', True)
- bindir = pkgdest + d.getVar('bindir', True)
- sbindir = pkgdest + d.getVar('sbindir', True)
- libdir = pkgdest + d.getVar('libdir', True)
-
- if base_bindir == bindir and base_sbindir == sbindir and base_libdir == libdir:
- return True
-
- # Skip files not in base_[bindir|sbindir|libdir]
- path = os.path.abspath(path)
- if not (base_bindir in path or base_sbindir in path or base_libdir in path):
- return True
-
- return False
-
QAPATHTEST[arch] = "package_qa_check_arch"
def package_qa_check_arch(path,name,d, elf, messages):
"""
Check if archs are compatible
"""
+ import re, oe.elf
+
if not elf:
return
- target_os = d.getVar('TARGET_OS', True)
- target_arch = d.getVar('TARGET_ARCH', True)
- provides = d.getVar('PROVIDES', True)
- bpn = d.getVar('BPN', True)
+ target_os = d.getVar('TARGET_OS')
+ target_arch = d.getVar('TARGET_ARCH')
+ provides = d.getVar('PROVIDES')
+ bpn = d.getVar('BPN')
if target_arch == "allarch":
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
package_qa_add_message(messages, "arch", pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries")
return
@@ -534,18 +291,20 @@ def package_qa_check_arch(path,name,d, elf, messages):
#if this will throw an exception, then fix the dict above
(machine, osabi, abiversion, littleendian, bits) \
- = package_qa_get_machine_dict(d)[target_os][target_arch]
+ = oe.elf.machine_dict(d)[target_os][target_arch]
# Check the architecture and endiannes of the binary
- if not ((machine == elf.machine()) or \
- ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
- package_qa_add_message(messages, "arch", "Architecture did not match (%d to %d) on %s" % \
- (machine, elf.machine(), package_qa_clean_path(path,d)))
- elif not ((bits == elf.abiSize()) or \
- ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
+ is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
+ (target_os == "linux-gnux32" or target_os == "linux-muslx32" or \
+ target_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE')))
+ is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF")
+ if not ((machine == elf.machine()) or is_32 or is_bpf):
+ package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
+ (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
+ elif not ((bits == elf.abiSize()) or is_32 or is_bpf):
package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \
(bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
- elif not littleendian == elf.isLittleEndian():
+ elif not ((littleendian == elf.isLittleEndian()) or is_bpf):
package_qa_add_message(messages, "arch", "Endiannes did not match (%d to %d) on %s" % \
(littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d)))
@@ -555,7 +314,7 @@ def package_qa_check_desktop(path, name, d, elf, messages):
Run all desktop files through desktop-file-validate.
"""
if path.endswith(".desktop"):
- desktop_file_validate = os.path.join(d.getVar('STAGING_BINDIR_NATIVE',True),'desktop-file-validate')
+ desktop_file_validate = os.path.join(d.getVar('STAGING_BINDIR_NATIVE'),'desktop-file-validate')
output = os.popen("%s %s" % (desktop_file_validate, path))
# This only produces output on errors
for l in output:
@@ -577,13 +336,15 @@ def package_qa_textrel(path, name, d, elf, messages):
sane = True
import re
- textrel_re = re.compile("\s+TEXTREL\s+")
+ textrel_re = re.compile(r"\s+TEXTREL\s+")
for line in phdrs.split("\n"):
if textrel_re.match(line):
sane = False
+ break
if not sane:
- package_qa_add_message(messages, "textrel", "ELF binary '%s' has relocations in .text" % path)
+ path = package_qa_clean_path(path, d, name)
+ package_qa_add_message(messages, "textrel", "%s: ELF binary %s has relocations in .text" % (name, path))
QAPATHTEST[ldflags] = "package_qa_hash_style"
def package_qa_hash_style(path, name, d, elf, messages):
@@ -597,9 +358,9 @@ def package_qa_hash_style(path, name, d, elf, messages):
if os.path.islink(path):
return
- gnu_hash = "--hash-style=gnu" in d.getVar('LDFLAGS', True)
+ gnu_hash = "--hash-style=gnu" in d.getVar('LDFLAGS')
if not gnu_hash:
- gnu_hash = "--hash-style=both" in d.getVar('LDFLAGS', True)
+ gnu_hash = "--hash-style=both" in d.getVar('LDFLAGS')
if not gnu_hash:
return
@@ -618,7 +379,7 @@ def package_qa_hash_style(path, name, d, elf, messages):
sane = True
if has_syms and not sane:
- package_qa_add_message(messages, "ldflags", "No GNU_HASH in the elf binary: '%s'" % path)
+ package_qa_add_message(messages, "ldflags", "No GNU_HASH in the ELF binary %s, didn't pass LDFLAGS?" % path)
QAPATHTEST[buildpaths] = "package_qa_check_buildpaths"
@@ -638,11 +399,12 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
if path.find(name + "/CONTROL/") != -1 or path.find(name + "/DEBIAN/") != -1:
return
- tmpdir = d.getVar('TMPDIR', True)
- with open(path) as f:
+ tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8")
+ with open(path, 'rb') as f:
file_content = f.read()
if tmpdir in file_content:
- package_qa_add_message(messages, "buildpaths", "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))
+ trimmed = path.replace(os.path.join (d.getVar("PKGDEST"), name), "")
+ package_qa_add_message(messages, "buildpaths", "File %s in package %s contains reference to TMPDIR" % (trimmed, name))
QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi"
@@ -657,8 +419,8 @@ def package_qa_check_xorg_driver_abi(path, name, d, elf, messages):
driverdir = d.expand("${libdir}/xorg/modules/drivers/")
if driverdir in path and path.endswith(".so"):
- mlprefix = d.getVar('MLPREFIX', True) or ''
- for rdep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + name, True) or ""):
+ mlprefix = d.getVar('MLPREFIX') or ''
+ for rdep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + name) or ""):
if rdep.startswith("%sxorg-abi-" % mlprefix):
return
package_qa_add_message(messages, "xorg-driver-abi", "Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path)))
@@ -681,9 +443,9 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
if os.path.islink(path):
target = os.readlink(path)
if os.path.isabs(target):
- tmpdir = d.getVar('TMPDIR', True)
+ tmpdir = d.getVar('TMPDIR')
if target.startswith(tmpdir):
- trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "")
+ trimmed = path.replace(os.path.join (d.getVar("PKGDEST"), name), "")
package_qa_add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name))
# Check license variables
@@ -692,32 +454,34 @@ python populate_lic_qa_checksum() {
"""
Check for changes in the license files.
"""
- import tempfile
sane = True
- lic_files = d.getVar('LIC_FILES_CHKSUM', True) or ''
- lic = d.getVar('LICENSE', True)
- pn = d.getVar('PN', True)
+ lic_files = d.getVar('LIC_FILES_CHKSUM') or ''
+ lic = d.getVar('LICENSE')
+ pn = d.getVar('PN')
if lic == "CLOSED":
return
- if not lic_files and d.getVar('SRC_URI', True):
- sane = package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
-
- srcdir = d.getVar('S', True)
+ if not lic_files and d.getVar('SRC_URI'):
+ sane &= package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
+ srcdir = d.getVar('S')
+ corebase_licensefile = d.getVar('COREBASE') + "/LICENSE"
for url in lic_files.split():
try:
(type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
except bb.fetch.MalformedUrl:
- sane = package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d)
+ sane &= package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d)
continue
srclicfile = os.path.join(srcdir, path)
if not os.path.isfile(srclicfile):
- package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d)
+ sane &= package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d)
continue
+ if (srclicfile == corebase_licensefile):
+ bb.warn("${COREBASE}/LICENSE is not a valid license file, please use '${COMMON_LICENSE_DIR}/MIT' for a MIT License file in LIC_FILES_CHKSUM. This will become an error in the future")
+
recipemd5 = parm.get('md5', '')
beginline, endline = 0, 0
if 'beginline' in parm:
@@ -727,32 +491,45 @@ python populate_lic_qa_checksum() {
if (not beginline) and (not endline):
md5chksum = bb.utils.md5_file(srclicfile)
+ with open(srclicfile, 'r', errors='replace') as f:
+ license = f.read().splitlines()
else:
- fi = open(srclicfile, 'rb')
- fo = tempfile.NamedTemporaryFile(mode='wb', prefix='poky.', suffix='.tmp', delete=False)
- tmplicfile = fo.name;
- lineno = 0
- linesout = 0
- for line in fi:
- lineno += 1
- if (lineno >= beginline):
- if ((lineno <= endline) or not endline):
- fo.write(line)
- linesout += 1
- else:
- break
- fo.flush()
- fo.close()
- fi.close()
- md5chksum = bb.utils.md5_file(tmplicfile)
- os.unlink(tmplicfile)
-
+ with open(srclicfile, 'rb') as f:
+ import hashlib
+ lineno = 0
+ license = []
+ m = hashlib.md5()
+ for line in f:
+ lineno += 1
+ if (lineno >= beginline):
+ if ((lineno <= endline) or not endline):
+ m.update(line)
+ license.append(line.decode('utf-8', errors='replace').rstrip())
+ else:
+ break
+ md5chksum = m.hexdigest()
if recipemd5 == md5chksum:
bb.note (pn + ": md5 checksum matched for ", url)
else:
if recipemd5:
msg = pn + ": The LIC_FILES_CHKSUM does not match for " + url
msg = msg + "\n" + pn + ": The new md5 checksum is " + md5chksum
+ max_lines = int(d.getVar('QA_MAX_LICENSE_LINES') or 20)
+ if not license or license[-1] != '':
+ # Ensure that our license text ends with a line break
+ # (will be added with join() below).
+ license.append('')
+ remove = len(license) - max_lines
+ if remove > 0:
+ start = max_lines // 2
+ end = start + remove - 1
+ del license[start:end]
+ license.insert(start, '...')
+ msg = msg + "\n" + pn + ": Here is the selected license text:" + \
+ "\n" + \
+ "{:v^70}".format(" beginline=%d " % beginline if beginline else "") + \
+ "\n" + "\n".join(license) + \
+ "{:^^70}".format(" endline=%d " % endline if endline else "")
if beginline:
if endline:
srcfiledesc = "%s (lines %d through to %d)" % (srclicfile, beginline, endline)
@@ -767,13 +544,13 @@ python populate_lic_qa_checksum() {
else:
msg = pn + ": LIC_FILES_CHKSUM is not specified for " + url
msg = msg + "\n" + pn + ": The md5 checksum is " + md5chksum
- sane = package_qa_handle_error("license-checksum", msg, d)
+ sane &= package_qa_handle_error("license-checksum", msg, d)
if not sane:
bb.fatal("Fatal QA errors found, failing task.")
}
-def package_qa_check_staged(path,d):
+def qa_check_staged(path,d):
"""
Check staged la and pc files for common problems like references to the work
directory.
@@ -783,42 +560,90 @@ def package_qa_check_staged(path,d):
"""
sane = True
- tmpdir = d.getVar('TMPDIR', True)
+ tmpdir = d.getVar('TMPDIR')
workdir = os.path.join(tmpdir, "work")
+ recipesysroot = d.getVar("RECIPE_SYSROOT")
if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d):
pkgconfigcheck = workdir
else:
pkgconfigcheck = tmpdir
+ skip = (d.getVar('INSANE_SKIP') or "").split()
+ skip_la = False
+ if 'la' in skip:
+ bb.note("Recipe %s skipping qa checking: la" % d.getVar('PN'))
+ skip_la = True
+
+ skip_pkgconfig = False
+ if 'pkgconfig' in skip:
+ bb.note("Recipe %s skipping qa checking: pkgconfig" % d.getVar('PN'))
+ skip_pkgconfig = True
+
# find all .la and .pc files
# read the content
# and check for stuff that looks wrong
for root, dirs, files in os.walk(path):
for file in files:
path = os.path.join(root,file)
- if file.endswith(".la"):
+ if file.endswith(".la") and not skip_la:
with open(path) as f:
file_content = f.read()
+ file_content = file_content.replace(recipesysroot, "")
if workdir in file_content:
error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
- sane = package_qa_handle_error("la", error_msg, d)
- elif file.endswith(".pc"):
+ sane &= package_qa_handle_error("la", error_msg, d)
+ elif file.endswith(".pc") and not skip_pkgconfig:
with open(path) as f:
file_content = f.read()
+ file_content = file_content.replace(recipesysroot, "")
if pkgconfigcheck in file_content:
error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root)
- sane = package_qa_handle_error("pkgconfig", error_msg, d)
+ sane &= package_qa_handle_error("pkgconfig", error_msg, d)
return sane
+# Run all package-wide warnfuncs and errorfuncs
+def package_qa_package(warnfuncs, errorfuncs, package, d):
+ warnings = {}
+ errors = {}
+
+ for func in warnfuncs:
+ func(package, d, warnings)
+ for func in errorfuncs:
+ func(package, d, errors)
+
+ for w in warnings:
+ package_qa_handle_error(w, warnings[w], d)
+ for e in errors:
+ package_qa_handle_error(e, errors[e], d)
+
+ return len(errors) == 0
+
+# Run all recipe-wide warnfuncs and errorfuncs
+def package_qa_recipe(warnfuncs, errorfuncs, pn, d):
+ warnings = {}
+ errors = {}
+
+ for func in warnfuncs:
+ func(pn, d, warnings)
+ for func in errorfuncs:
+ func(pn, d, errors)
+
+ for w in warnings:
+ package_qa_handle_error(w, warnings[w], d)
+ for e in errors:
+ package_qa_handle_error(e, errors[e], d)
+
+ return len(errors) == 0
+
# Walk over all files in a directory and call func
-def package_qa_walk(warnfuncs, errorfuncs, skip, package, d):
+def package_qa_walk(warnfuncs, errorfuncs, package, d):
import oe.qa
#if this will throw an exception, then fix the dict above
- target_os = d.getVar('TARGET_OS', True)
- target_arch = d.getVar('TARGET_ARCH', True)
+ target_os = d.getVar('TARGET_OS')
+ target_arch = d.getVar('TARGET_ARCH')
warnings = {}
errors = {}
@@ -847,11 +672,10 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
if not "-dbg" in pkg and not "packagegroup-" in pkg and not "-image" in pkg:
localdata = bb.data.createCopy(d)
- localdata.setVar('OVERRIDES', pkg)
- bb.data.update_data(localdata)
+ localdata.setVar('OVERRIDES', localdata.getVar('OVERRIDES') + ':' + pkg)
# Now check the RDEPENDS
- rdepends = bb.utils.explode_deps(localdata.getVar('RDEPENDS', True) or "")
+ rdepends = bb.utils.explode_deps(localdata.getVar('RDEPENDS') or "")
# Now do the sanity check!!!
if "build-deps" not in skip:
@@ -867,7 +691,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
continue
if not rdep_data or not 'PN' in rdep_data:
- pkgdata_dir = d.getVar("PKGDATA_DIR", True)
+ pkgdata_dir = d.getVar("PKGDATA_DIR")
try:
possibles = os.listdir("%s/runtime-rprovides/%s/" % (pkgdata_dir, rdepend))
except OSError:
@@ -887,38 +711,20 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
if "file-rdeps" not in skip:
ignored_file_rdeps = set(['/bin/sh', '/usr/bin/env', 'rtld(GNU_HASH)'])
if bb.data.inherits_class('nativesdk', d):
- ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl'])
+ ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl', 'perl'])
# For Saving the FILERDEPENDS
filerdepends = {}
rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
for key in rdep_data:
if key.startswith("FILERDEPENDS_"):
- for subkey in rdep_data[key].split():
- if subkey not in ignored_file_rdeps:
+ for subkey in bb.utils.explode_deps(rdep_data[key]):
+ if subkey not in ignored_file_rdeps and \
+ not subkey.startswith('perl('):
# We already know it starts with FILERDEPENDS_
filerdepends[subkey] = key[13:]
if filerdepends:
- next = rdepends
done = rdepends[:]
- # Find all the rdepends on the dependency chain
- while next:
- new = []
- for rdep in next:
- rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
- sub_rdeps = rdep_data.get("RDEPENDS_" + rdep)
- if not sub_rdeps:
- continue
- for sub_rdep in sub_rdeps.split():
- if sub_rdep in done:
- continue
- if not sub_rdep.startswith('(') and \
- oe.packagedata.has_subpkgdata(sub_rdep, d):
- # It's a new rdep
- done.append(sub_rdep)
- new.append(sub_rdep)
- next = new
-
# Add the rprovides of itself
if pkg not in done:
done.insert(0, pkg)
@@ -926,16 +732,20 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
# The python is not a package, but python-core provides it, so
# skip checking /usr/bin/python if python is in the rdeps, in
# case there is a RDEPENDS_pkg = "python" in the recipe.
- for py in [ d.getVar('MLPREFIX', True) + "python", "python" ]:
+ for py in [ d.getVar('MLPREFIX') + "python", "python" ]:
if py in done:
filerdepends.pop("/usr/bin/python",None)
done.remove(py)
for rdep in done:
+ # The file dependencies may contain package names, e.g.,
+ # perl
+ filerdepends.pop(rdep,None)
+
# For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
for key in rdep_data:
if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES_"):
- for subkey in rdep_data[key].split():
+ for subkey in bb.utils.explode_deps(rdep_data[key]):
filerdepends.pop(subkey,None)
# Add the files list to the rprovides
if key == "FILES_INFO":
@@ -949,17 +759,17 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
for key in filerdepends:
error_msg = "%s contained in package %s requires %s, but no providers found in RDEPENDS_%s?" % \
(filerdepends[key].replace("_%s" % pkg, "").replace("@underscore@", "_"), pkg, key, pkg)
- package_qa_handle_error("file-rdeps", error_msg, d)
+ package_qa_handle_error("file-rdeps", error_msg, d)
+package_qa_check_rdepends[vardepsexclude] = "OVERRIDES"
-def package_qa_check_deps(pkg, pkgdest, skip, d):
+def package_qa_check_deps(pkg, pkgdest, d):
localdata = bb.data.createCopy(d)
localdata.setVar('OVERRIDES', pkg)
- bb.data.update_data(localdata)
def check_valid_deps(var):
try:
- rvar = bb.utils.explode_dep_versions2(localdata.getVar(var, True) or "")
+ rvar = bb.utils.explode_dep_versions2(localdata.getVar(var) or "")
except ValueError as e:
bb.fatal("%s_%s: %s" % (var, pkg, e))
for dep in rvar:
@@ -975,37 +785,59 @@ def package_qa_check_deps(pkg, pkgdest, skip, d):
check_valid_deps('RREPLACES')
check_valid_deps('RCONFLICTS')
-QAPATHTEST[expanded-d] = "package_qa_check_expanded_d"
-def package_qa_check_expanded_d(path,name,d,elf,messages):
+QAPKGTEST[usrmerge] = "package_qa_check_usrmerge"
+def package_qa_check_usrmerge(pkg, d, messages):
+ pkgdest = d.getVar('PKGDEST')
+ pkg_dir = pkgdest + os.sep + pkg + os.sep
+ merged_dirs = ['bin', 'sbin', 'lib'] + d.getVar('MULTILIB_VARIANTS').split()
+ for f in merged_dirs:
+ if os.path.exists(pkg_dir + f) and not os.path.islink(pkg_dir + f):
+ msg = "%s package is not obeying usrmerge distro feature. /%s should be relocated to /usr." % (pkg, f)
+ package_qa_add_message(messages, "usrmerge", msg)
+ return False
+ return True
+
+QAPKGTEST[perllocalpod] = "package_qa_check_perllocalpod"
+def package_qa_check_perllocalpod(pkg, d, messages):
+ """
+ Check that the recipe didn't ship a perlocal.pod file, which shouldn't be
+ installed in a distribution package. cpan.bbclass sets NO_PERLLOCAL=1 to
+ handle this for most recipes.
+ """
+ import glob
+ pkgd = oe.path.join(d.getVar('PKGDEST'), pkg)
+ podpath = oe.path.join(pkgd, d.getVar("libdir"), "perl*", "*", "*", "perllocal.pod")
+
+ matches = glob.glob(podpath)
+ if matches:
+ matches = [package_qa_clean_path(path, d, pkg) for path in matches]
+ msg = "%s contains perllocal.pod (%s), should not be installed" % (pkg, " ".join(matches))
+ package_qa_add_message(messages, "perllocalpod", msg)
+
+QAPKGTEST[expanded-d] = "package_qa_check_expanded_d"
+def package_qa_check_expanded_d(package, d, messages):
"""
Check for the expanded D (${D}) value in pkg_* and FILES
variables, warn the user to use it correctly.
"""
-
sane = True
- expanded_d = d.getVar('D',True)
-
- # Get packages for current recipe and iterate
- packages = d.getVar('PACKAGES', True).split(" ")
- for pak in packages:
- # Go through all variables and check if expanded D is found, warn the user accordingly
- for var in 'FILES','pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm':
- bbvar = d.getVar(var + "_" + pak, False)
- if bbvar:
- # Bitbake expands ${D} within bbvar during the previous step, so we check for its expanded value
- if expanded_d in bbvar:
- if var == 'FILES':
- package_qa_add_message(messages, "expanded-d", "FILES in %s recipe should not contain the ${D} variable as it references the local build directory not the target filesystem, best solution is to remove the ${D} reference" % pak)
- sane = False
- else:
- package_qa_add_message(messages, "expanded-d", "%s in %s recipe contains ${D}, it should be replaced by $D instead" % (var, pak))
- sane = False
+ expanded_d = d.getVar('D')
+
+ for var in 'FILES','pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm':
+ bbvar = d.getVar(var + "_" + package) or ""
+ if expanded_d in bbvar:
+ if var == 'FILES':
+ package_qa_add_message(messages, "expanded-d", "FILES in %s recipe should not contain the ${D} variable as it references the local build directory not the target filesystem, best solution is to remove the ${D} reference" % package)
+ sane = False
+ else:
+ package_qa_add_message(messages, "expanded-d", "%s in %s recipe contains ${D}, it should be replaced by $D instead" % (var, package))
+ sane = False
return sane
def package_qa_check_encoding(keys, encode, d):
def check_encoding(key, enc):
sane = True
- value = d.getVar(key, True)
+ value = d.getVar(key)
if value:
try:
s = value.encode(enc)
@@ -1030,8 +862,8 @@ def package_qa_check_host_user(path, name, d, elf, messages):
if not os.path.lexists(path):
return
- dest = d.getVar('PKGDEST', True)
- pn = d.getVar('PN', True)
+ dest = d.getVar('PKGDEST')
+ pn = d.getVar('PN')
home = os.path.join(dest, 'home')
if path == home or path.startswith(home + os.sep):
return
@@ -1043,18 +875,29 @@ def package_qa_check_host_user(path, name, d, elf, messages):
if exc.errno != errno.ENOENT:
raise
else:
- rootfs_path = path[len(dest):]
- check_uid = int(d.getVar('HOST_USER_UID', True))
+ check_uid = int(d.getVar('HOST_USER_UID'))
if stat.st_uid == check_uid:
- package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, rootfs_path, check_uid))
+ package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_uid))
return False
- check_gid = int(d.getVar('HOST_USER_GID', True))
+ check_gid = int(d.getVar('HOST_USER_GID'))
if stat.st_gid == check_gid:
- package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, rootfs_path, check_gid))
+ package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_gid))
return False
return True
+QARECIPETEST[src-uri-bad] = "package_qa_check_src_uri"
+def package_qa_check_src_uri(pn, d, messages):
+ import re
+
+ if "${PN}" in d.getVar("SRC_URI", False):
+ package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d)
+
+ for url in d.getVar("SRC_URI").split():
+ if re.search(r"github\.com/.+/.+/archive/.+", url):
+ package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d)
+
+
# The PACKAGE FUNC to scan each package
python do_package_qa () {
import subprocess
@@ -1067,8 +910,8 @@ python do_package_qa () {
# Check non UTF-8 characters on recipe's metadata
package_qa_check_encoding(['DESCRIPTION', 'SUMMARY', 'LICENSE', 'SECTION'], 'utf-8', d)
- logdir = d.getVar('T', True)
- pkg = d.getVar('PN', True)
+ logdir = d.getVar('T')
+ pn = d.getVar('PN')
# Check the compile log for host contamination
compilelog = os.path.join(logdir,"log.do_compile")
@@ -1077,7 +920,7 @@ python do_package_qa () {
statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog
if subprocess.call(statement, shell=True) == 0:
msg = "%s: The compile log indicates that host include and/or library paths were used.\n \
- Please check the log '%s' for more information." % (pkg, compilelog)
+ Please check the log '%s' for more information." % (pn, compilelog)
package_qa_handle_error("compile-host-path", msg, d)
# Check the install log for host contamination
@@ -1087,12 +930,12 @@ python do_package_qa () {
statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog
if subprocess.call(statement, shell=True) == 0:
msg = "%s: The install log indicates that host include and/or library paths were used.\n \
- Please check the log '%s' for more information." % (pkg, installlog)
+ Please check the log '%s' for more information." % (pn, installlog)
package_qa_handle_error("install-host-path", msg, d)
# Scan the packages...
- pkgdest = d.getVar('PKGDEST', True)
- packages = set((d.getVar('PACKAGES', True) or '').split())
+ pkgdest = d.getVar('PKGDEST')
+ packages = set((d.getVar('PACKAGES') or '').split())
cpath = oe.cachedpath.CachedPath()
global pkgfiles
@@ -1107,38 +950,38 @@ python do_package_qa () {
if not packages:
return
- testmatrix = d.getVarFlags("QAPATHTEST")
import re
# The package name matches the [a-z0-9.+-]+ regular expression
- pkgname_pattern = re.compile("^[a-z0-9.+-]+$")
+ pkgname_pattern = re.compile(r"^[a-z0-9.+-]+$")
taskdepdata = d.getVar("BB_TASKDEPDATA", False)
taskdeps = set()
for dep in taskdepdata:
taskdeps.add(taskdepdata[dep][0])
- g = globals()
- for package in packages:
- skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
- if skip:
- bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
+ def parse_test_matrix(matrix_name):
+ testmatrix = d.getVarFlags(matrix_name) or {}
+ g = globals()
warnchecks = []
- for w in (d.getVar("WARN_QA", True) or "").split():
+ for w in (d.getVar("WARN_QA") or "").split():
if w in skip:
continue
if w in testmatrix and testmatrix[w] in g:
warnchecks.append(g[testmatrix[w]])
- if w == 'unsafe-references-in-binaries':
- oe.utils.write_ld_so_conf(d)
errorchecks = []
- for e in (d.getVar("ERROR_QA", True) or "").split():
+ for e in (d.getVar("ERROR_QA") or "").split():
if e in skip:
continue
if e in testmatrix and testmatrix[e] in g:
errorchecks.append(g[testmatrix[e]])
- if e == 'unsafe-references-in-binaries':
- oe.utils.write_ld_so_conf(d)
+ return warnchecks, errorchecks
+
+ for package in packages:
+ skip = set((d.getVar('INSANE_SKIP') or "").split() +
+ (d.getVar('INSANE_SKIP_' + package) or "").split())
+ if skip:
+ bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
bb.note("Checking Package: %s" % package)
# Check package name
@@ -1146,25 +989,41 @@ python do_package_qa () {
package_qa_handle_error("pkgname",
"%s doesn't match the [a-z0-9.+-]+ regex" % package, d)
- path = "%s/%s" % (pkgdest, package)
- package_qa_walk(warnchecks, errorchecks, skip, package, d)
+ warn_checks, error_checks = parse_test_matrix("QAPATHTEST")
+ package_qa_walk(warn_checks, error_checks, package, d)
+
+ warn_checks, error_checks = parse_test_matrix("QAPKGTEST")
+ package_qa_package(warn_checks, error_checks, package, d)
package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d)
- package_qa_check_deps(package, pkgdest, skip, d)
+ package_qa_check_deps(package, pkgdest, d)
- if 'libdir' in d.getVar("ALL_QA", True).split():
+ warn_checks, error_checks = parse_test_matrix("QARECIPETEST")
+ package_qa_recipe(warn_checks, error_checks, pn, d)
+
+ if 'libdir' in d.getVar("ALL_QA").split():
package_qa_check_libdir(d)
- qa_sane = d.getVar("QA_SANE", True)
+ qa_sane = d.getVar("QA_SANE")
if not qa_sane:
bb.fatal("QA run found fatal errors. Please consider fixing them.")
bb.note("DONE with PACKAGE QA")
}
+# binutils is used for most checks, so need to set as dependency
+# POPULATESYSROOTDEPS is defined in staging class.
+do_package_qa[depends] += "${POPULATESYSROOTDEPS}"
do_package_qa[vardepsexclude] = "BB_TASKDEPDATA"
do_package_qa[rdeptask] = "do_packagedata"
addtask do_package_qa after do_packagedata do_package before do_build
+# Add the package specific INSANE_SKIPs to the sstate dependencies
+python() {
+ pkgs = (d.getVar('PACKAGES') or '').split()
+ for pkg in pkgs:
+ d.appendVarFlag("do_package_qa", "vardeps", " INSANE_SKIP_{}".format(pkg))
+}
+
SSTATETASKS += "do_package_qa"
do_package_qa[sstate-inputdirs] = ""
do_package_qa[sstate-outputdirs] = ""
@@ -1175,11 +1034,58 @@ addtask do_package_qa_setscene
python do_qa_staging() {
bb.note("QA checking staging")
-
- if not package_qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d):
+ if not qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d):
bb.fatal("QA staging was broken by the package built above")
}
+python do_qa_patch() {
+ import subprocess
+
+ ###########################################################################
+ # Check patch.log for fuzz warnings
+ #
+ # Further information on why we check for patch fuzz warnings:
+ # http://lists.openembedded.org/pipermail/openembedded-core/2018-March/148675.html
+ # https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450
+ ###########################################################################
+
+ logdir = d.getVar('T')
+ patchlog = os.path.join(logdir,"log.do_patch")
+
+ if os.path.exists(patchlog):
+ fuzzheader = '--- Patch fuzz start ---'
+ fuzzfooter = '--- Patch fuzz end ---'
+ statement = "grep -e '%s' %s > /dev/null" % (fuzzheader, patchlog)
+ if subprocess.call(statement, shell=True) == 0:
+ msg = "Fuzz detected:\n\n"
+ fuzzmsg = ""
+ inFuzzInfo = False
+ f = open(patchlog, "r")
+ for line in f:
+ if fuzzheader in line:
+ inFuzzInfo = True
+ fuzzmsg = ""
+ elif fuzzfooter in line:
+ fuzzmsg = fuzzmsg.replace('\n\n', '\n')
+ msg += fuzzmsg
+ msg += "\n"
+ inFuzzInfo = False
+ elif inFuzzInfo and not 'Now at patch' in line:
+ fuzzmsg += line
+ f.close()
+ msg += "The context lines in the patches can be updated with devtool:\n"
+ msg += "\n"
+ msg += " devtool modify %s\n" % d.getVar('PN')
+ msg += " devtool finish --force-patch-refresh %s <layer_path>\n\n" % d.getVar('PN')
+ msg += "Don't forget to review changes done by devtool!\n"
+ if 'patch-fuzz' in d.getVar('ERROR_QA'):
+ bb.error(msg)
+ elif 'patch-fuzz' in d.getVar('WARN_QA'):
+ bb.warn(msg)
+ msg = "Patch log indicates that patches do not apply cleanly."
+ package_qa_handle_error("patch-fuzz", msg, d)
+}
+
python do_qa_configure() {
import subprocess
@@ -1188,17 +1094,24 @@ python do_qa_configure() {
###########################################################################
configs = []
- workdir = d.getVar('WORKDIR', True)
+ workdir = d.getVar('WORKDIR')
- if bb.data.inherits_class('autotools', d):
+ skip = (d.getVar('INSANE_SKIP') or "").split()
+ skip_configure_unsafe = False
+ if 'configure-unsafe' in skip:
+ bb.note("Recipe %s skipping qa checking: configure-unsafe" % d.getVar('PN'))
+ skip_configure_unsafe = True
+
+ if bb.data.inherits_class('autotools', d) and not skip_configure_unsafe:
bb.note("Checking autotools environment for common misconfiguration")
for root, dirs, files in os.walk(workdir):
statement = "grep -q -F -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s" % \
os.path.join(root,"config.log")
if "config.log" in files:
if subprocess.call(statement, shell=True) == 0:
- bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
-Rerun configure task after fixing this.""")
+ error_msg = """This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
+Rerun configure task after fixing this."""
+ package_qa_handle_error("configure-unsafe", error_msg, d)
if "configure.ac" in files:
configs.append(os.path.join(root,"configure.ac"))
@@ -1209,70 +1122,81 @@ Rerun configure task after fixing this.""")
# Check gettext configuration and dependencies are correct
###########################################################################
- cnf = d.getVar('EXTRA_OECONF', True) or ""
- if "gettext" not in d.getVar('P', True) and "gcc-runtime" not in d.getVar('P', True) and "--disable-nls" not in cnf:
- ml = d.getVar("MLPREFIX", True) or ""
- if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
- gt = "gettext-native"
- elif bb.data.inherits_class('cross-canadian', d):
+ skip_configure_gettext = False
+ if 'configure-gettext' in skip:
+ bb.note("Recipe %s skipping qa checking: configure-gettext" % d.getVar('PN'))
+ skip_configure_gettext = True
+
+ cnf = d.getVar('EXTRA_OECONF') or ""
+ if not ("gettext" in d.getVar('P') or "gcc-runtime" in d.getVar('P') or \
+ "--disable-nls" in cnf or skip_configure_gettext):
+ ml = d.getVar("MLPREFIX") or ""
+ if bb.data.inherits_class('cross-canadian', d):
gt = "nativesdk-gettext"
else:
- gt = "virtual/" + ml + "gettext"
- deps = bb.utils.explode_deps(d.getVar('DEPENDS', True) or "")
+ gt = "gettext-native"
+ deps = bb.utils.explode_deps(d.getVar('DEPENDS') or "")
if gt not in deps:
for config in configs:
gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
if subprocess.call(gnu, shell=True) == 0:
- bb.fatal("""%s required but not in DEPENDS for file %s.
-Missing inherit gettext?""" % (gt, config))
+ error_msg = "AM_GNU_GETTEXT used but no inherit gettext"
+ package_qa_handle_error("configure-gettext", error_msg, d)
###########################################################################
# Check unrecognised configure options (with a white list)
###########################################################################
- if bb.data.inherits_class("autotools", d):
+ if bb.data.inherits_class("autotools", d) or bb.data.inherits_class("meson", d):
bb.note("Checking configure output for unrecognised options")
try:
- flag = "WARNING: unrecognized options:"
- log = os.path.join(d.getVar('B', True), 'config.log')
- output = subprocess.check_output(['grep', '-F', flag, log]).decode("utf-8").replace(', ', ' ')
+ if bb.data.inherits_class("autotools", d):
+ flag = "WARNING: unrecognized options:"
+ log = os.path.join(d.getVar('B'), 'config.log')
+ if bb.data.inherits_class("meson", d):
+ flag = "WARNING: Unknown options:"
+ log = os.path.join(d.getVar('T'), 'log.do_configure')
+ output = subprocess.check_output(['grep', '-F', flag, log]).decode("utf-8").replace(', ', ' ').replace('"', '')
options = set()
for line in output.splitlines():
options |= set(line.partition(flag)[2].split())
- whitelist = set(d.getVar("UNKNOWN_CONFIGURE_WHITELIST", True).split())
+ whitelist = set(d.getVar("UNKNOWN_CONFIGURE_WHITELIST").split())
options -= whitelist
if options:
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
error_msg = pn + ": configure was passed unrecognised options: " + " ".join(options)
package_qa_handle_error("unknown-configure-option", error_msg, d)
except subprocess.CalledProcessError:
pass
# Check invalid PACKAGECONFIG
- pkgconfig = (d.getVar("PACKAGECONFIG", True) or "").split()
+ pkgconfig = (d.getVar("PACKAGECONFIG") or "").split()
if pkgconfig:
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
for pconfig in pkgconfig:
if pconfig not in pkgconfigflags:
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pconfig)
package_qa_handle_error("invalid-packageconfig", error_msg, d)
- qa_sane = d.getVar("QA_SANE", True)
+ qa_sane = d.getVar("QA_SANE")
if not qa_sane:
bb.fatal("Fatal QA errors found, failing task.")
}
python do_qa_unpack() {
- src_uri = d.getVar('SRC_URI', True)
- s_dir = d.getVar('S', True)
+ src_uri = d.getVar('SRC_URI')
+ s_dir = d.getVar('S')
if src_uri and not os.path.exists(s_dir):
- bb.warn('%s: the directory %s (%s) pointed to by the S variable doesn\'t exist - please set S within the recipe to point to where the source has been unpacked to' % (d.getVar('PN', True), d.getVar('S', False), s_dir))
+ bb.warn('%s: the directory %s (%s) pointed to by the S variable doesn\'t exist - please set S within the recipe to point to where the source has been unpacked to' % (d.getVar('PN'), d.getVar('S', False), s_dir))
}
# The Staging Func, to check all staging
#addtask qa_staging after do_populate_sysroot before do_build
do_populate_sysroot[postfuncs] += "do_qa_staging "
+# Check for patch fuzz
+do_patch[postfuncs] += "do_qa_patch "
+
# Check broken config.log files, for packages requiring Gettext which
# don't have it in DEPENDS.
#addtask qa_configure after do_configure before do_compile
@@ -1282,7 +1206,9 @@ do_configure[postfuncs] += "do_qa_configure "
do_unpack[postfuncs] += "do_qa_unpack"
python () {
- tests = d.getVar('ALL_QA', True).split()
+ import re
+
+ tests = d.getVar('ALL_QA').split()
if "desktop" in tests:
d.appendVar("PACKAGE_DEPENDS", " desktop-file-utils-native")
@@ -1291,7 +1217,7 @@ python () {
###########################################################################
# Checking ${FILESEXTRAPATHS}
- extrapaths = (d.getVar("FILESEXTRAPATHS", True) or "")
+ extrapaths = (d.getVar("FILESEXTRAPATHS") or "")
if '__default' not in extrapaths.split(":"):
msg = "FILESEXTRAPATHS-variable, must always use _prepend (or _append)\n"
msg += "type of assignment, and don't forget the colon.\n"
@@ -1303,29 +1229,37 @@ python () {
msg += "%s\n" % extrapaths
bb.warn(msg)
- overrides = d.getVar('OVERRIDES', True).split(':')
- pn = d.getVar('PN', True)
+ overrides = d.getVar('OVERRIDES').split(':')
+ pn = d.getVar('PN')
if pn in overrides:
- msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE", True), pn)
+ msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
package_qa_handle_error("pn-overrides", msg, d)
+ prog = re.compile(r'[A-Z]')
+ if prog.search(pn):
+ package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)
+
+ # Some people mistakenly use DEPENDS_${PN} instead of DEPENDS and wonder
+ # why it doesn't work.
+ if (d.getVar(d.expand('DEPENDS_${PN}'))):
+ package_qa_handle_error("pkgvarcheck", "recipe uses DEPENDS_${PN}, should use DEPENDS", d)
issues = []
- if (d.getVar('PACKAGES', True) or "").split():
- for dep in (d.getVar('QADEPENDS', True) or "").split():
+ if (d.getVar('PACKAGES') or "").split():
+ for dep in (d.getVar('QADEPENDS') or "").split():
d.appendVarFlag('do_package_qa', 'depends', " %s:do_populate_sysroot" % dep)
for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY':
if d.getVar(var, False):
issues.append(var)
- fakeroot_tests = d.getVar('FAKEROOT_QA', True).split()
+ fakeroot_tests = d.getVar('FAKEROOT_QA').split()
if set(tests) & set(fakeroot_tests):
d.setVarFlag('do_package_qa', 'fakeroot', '1')
d.appendVarFlag('do_package_qa', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
else:
d.setVarFlag('do_package_qa', 'rdeptask', '')
for i in issues:
- package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE", True), i), d)
- qa_sane = d.getVar("QA_SANE", True)
+ package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE"), i), d)
+ qa_sane = d.getVar("QA_SANE")
if not qa_sane:
bb.fatal("Fatal QA errors found, failing task.")
}
diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
index 3ed5986a52..07ec242e63 100644
--- a/meta/classes/kernel-arch.bbclass
+++ b/meta/classes/kernel-arch.bbclass
@@ -14,27 +14,34 @@ valid_archs = "alpha cris ia64 \
parisc s390 v850 \
avr32 blackfin \
microblaze \
- nios2"
+ nios2 arc riscv xtensa"
def map_kernel_arch(a, d):
import re
- valid_archs = d.getVar('valid_archs', True).split()
+ valid_archs = d.getVar('valid_archs').split()
if re.match('(i.86|athlon|x86.64)$', a): return 'x86'
+ elif re.match('arceb$', a): return 'arc'
elif re.match('armeb$', a): return 'arm'
elif re.match('aarch64$', a): return 'arm64'
elif re.match('aarch64_be$', a): return 'arm64'
- elif re.match('mips(el|64|64el)$', a): return 'mips'
+ elif re.match('aarch64_ilp32$', a): return 'arm64'
+ elif re.match('aarch64_be_ilp32$', a): return 'arm64'
+ elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'mips'
+ elif re.match('mcf', a): return 'm68k'
+ elif re.match('riscv(32|64|)(eb|)$', a): return 'riscv'
elif re.match('p(pc|owerpc)(|64)', a): return 'powerpc'
elif re.match('sh(3|4)$', a): return 'sh'
elif re.match('bfin', a): return 'blackfin'
elif re.match('microblazee[bl]', a): return 'microblaze'
elif a in valid_archs: return a
else:
+ if not d.getVar("TARGET_OS").startswith("linux"):
+ return a
bb.error("cannot map '%s' to a linux kernel architecture" % a)
-export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH', True), d)}"
+export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
def map_uboot_arch(a, d):
import re
@@ -43,7 +50,7 @@ def map_uboot_arch(a, d):
elif re.match('i.86$', a): return 'x86'
return a
-export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', True), d)}"
+export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH'), d)}"
# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
# specific options necessary for building the kernel and modules.
@@ -54,7 +61,8 @@ HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
TARGET_AR_KERNEL_ARCH ?= ""
HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd"
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH}"
KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
+TOOLCHAIN = "gcc"
diff --git a/meta/classes/kernel-artifact-names.bbclass b/meta/classes/kernel-artifact-names.bbclass
new file mode 100644
index 0000000000..bbeecba7bd
--- /dev/null
+++ b/meta/classes/kernel-artifact-names.bbclass
@@ -0,0 +1,18 @@
+KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
+KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
+
+KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
+KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
+
+KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
+KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
+
+KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
+KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
+
+MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
+MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
+MODULE_TARBALL_DEPLOY ?= "1"
+
+INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
+INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
new file mode 100644
index 0000000000..522c46575d
--- /dev/null
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -0,0 +1,95 @@
+# Support for device tree generation
+PACKAGES_append = " \
+ ${KERNEL_PACKAGE_NAME}-devicetree \
+ ${@[d.getVar('KERNEL_PACKAGE_NAME') + '-image-zimage-bundle', ''][d.getVar('KERNEL_DEVICETREE_BUNDLE') != '1']} \
+"
+FILES_${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
+FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
+
+# Generate kernel+devicetree bundle
+KERNEL_DEVICETREE_BUNDLE ?= "0"
+
+normalize_dtb () {
+ dtb="$1"
+ if echo $dtb | grep -q '/dts/'; then
+ bbwarn "$dtb contains the full path to the the dts file, but only the dtb name should be used."
+ dtb=`basename $dtb | sed 's,\.dts$,.dtb,g'`
+ fi
+ echo "$dtb"
+}
+
+get_real_dtb_path_in_kernel () {
+ dtb="$1"
+ dtb_path="${B}/arch/${ARCH}/boot/dts/$dtb"
+ if [ ! -e "$dtb_path" ]; then
+ dtb_path="${B}/arch/${ARCH}/boot/$dtb"
+ fi
+ echo "$dtb_path"
+}
+
+do_configure_append() {
+ if [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
+ if echo ${KERNEL_IMAGETYPE_FOR_MAKE} | grep -q 'zImage'; then
+ case "${ARCH}" in
+ "arm")
+ config="${B}/.config"
+ if ! grep -q 'CONFIG_ARM_APPENDED_DTB=y' $config; then
+ bbwarn 'CONFIG_ARM_APPENDED_DTB is NOT enabled in the kernel. Enabling it to allow the kernel to boot with the Device Tree appended!'
+ sed -i "/CONFIG_ARM_APPENDED_DTB[ =]/d" $config
+ echo "CONFIG_ARM_APPENDED_DTB=y" >> $config
+ echo "# CONFIG_ARM_ATAG_DTB_COMPAT is not set" >> $config
+ fi
+ ;;
+ *)
+ bberror "KERNEL_DEVICETREE_BUNDLE is not supported for ${ARCH}. Currently it is only supported for 'ARM'."
+ esac
+ else
+ bberror 'The KERNEL_DEVICETREE_BUNDLE requires the KERNEL_IMAGETYPE to contain zImage.'
+ fi
+ fi
+}
+
+do_compile_append() {
+ for dtbf in ${KERNEL_DEVICETREE}; do
+ dtb=`normalize_dtb "$dtbf"`
+ oe_runmake $dtb
+ done
+}
+
+do_install_append() {
+ for dtbf in ${KERNEL_DEVICETREE}; do
+ dtb=`normalize_dtb "$dtbf"`
+ dtb_ext=${dtb##*.}
+ dtb_base_name=`basename $dtb .$dtb_ext`
+ dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
+ install -m 0644 $dtb_path ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
+ done
+}
+
+do_deploy_append() {
+ for dtbf in ${KERNEL_DEVICETREE}; do
+ dtb=`normalize_dtb "$dtbf"`
+ dtb_ext=${dtb##*.}
+ dtb_base_name=`basename $dtb .$dtb_ext`
+ install -d $deployDir
+ install -m 0644 ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
+ ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext $deployDir/$dtb_base_name.$dtb_ext
+ ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext
+ for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
+ if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
+ cat ${D}/${KERNEL_IMAGEDEST}/$type \
+ $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
+ > $deployDir/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin
+ ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \
+ $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin
+ if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then
+ cat ${KERNEL_OUTPUT_DIR}/${type}.initramfs \
+ $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
+ > $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin
+ ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \
+ $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin
+ fi
+ fi
+ done
+ done
+}
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 8580247f82..ec18a3d699 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,39 +1,61 @@
-inherit kernel-uboot uboot-sign
+inherit kernel-uboot kernel-artifact-names uboot-sign
python __anonymous () {
- kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
+ kerneltypes = d.getVar('KERNEL_IMAGETYPES') or ""
if 'fitImage' in kerneltypes.split():
- depends = d.getVar("DEPENDS", True)
- depends = "%s u-boot-mkimage-native dtc-native" % depends
+ depends = d.getVar("DEPENDS")
+ depends = "%s u-boot-tools-native dtc-native" % depends
d.setVar("DEPENDS", depends)
- if d.getVar("UBOOT_ARCH", True) == "x86":
+ uarch = d.getVar("UBOOT_ARCH")
+ if uarch == "arm64":
+ replacementtype = "Image"
+ elif uarch == "riscv":
+ replacementtype = "Image"
+ elif uarch == "mips":
+ replacementtype = "vmlinuz.bin"
+ elif uarch == "x86":
replacementtype = "bzImage"
+ elif uarch == "microblaze":
+ replacementtype = "linux.bin"
else:
replacementtype = "zImage"
- # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
- # to kernel.bbclass . We have to override it, since we pack zImage
- # (at least for now) into the fitImage .
- typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+ # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
+ # to kernel.bbclass . We have to override it, since we pack zImage
+ # (at least for now) into the fitImage .
+ typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or ""
if 'fitImage' in typeformake.split():
d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', replacementtype))
- image = d.getVar('INITRAMFS_IMAGE', True)
+ image = d.getVar('INITRAMFS_IMAGE')
if image:
d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+ #check if there are any dtb providers
+ providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb")
+ if providerdtb:
+ d.appendVarFlag('do_assemble_fitimage', 'depends', ' virtual/dtb:do_populate_sysroot')
+ d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' virtual/dtb:do_populate_sysroot')
+ d.setVar('EXTERNAL_KERNEL_DEVICETREE', "${RECIPE_SYSROOT}/boot/devicetree")
+
# Verified boot will sign the fitImage and append the public key to
- # U-boot dtb. We ensure the U-Boot dtb is deployed before assembling
+ # U-Boot dtb. We ensure the U-Boot dtb is deployed before assembling
# the fitImage:
- if d.getVar('UBOOT_SIGN_ENABLE', True):
- uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot', True) or 'u-boot'
- d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn)
+ if d.getVar('UBOOT_SIGN_ENABLE') == "1" and d.getVar('UBOOT_DTB_BINARY'):
+ uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'
+ d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_populate_sysroot' % uboot_pn)
}
# Options for the device tree compiler passed to mkimage '-D' feature:
UBOOT_MKIMAGE_DTCOPTS ??= ""
+# fitImage Hash Algo
+FIT_HASH_ALG ?= "sha256"
+
+# fitImage Signature Algo
+FIT_SIGN_ALG ?= "rsa2048"
+
#
# Emit the fitImage ITS header
#
@@ -93,12 +115,12 @@ EOF
# $4 ... Compression type
fitimage_emit_section_kernel() {
- kernel_csum="sha1"
+ kernel_csum="${FIT_HASH_ALG}"
- ENTRYPOINT=${UBOOT_ENTRYPOINT}
- if test -n "${UBOOT_ENTRYSYMBOL}"; then
- ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
- awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'`
+ ENTRYPOINT="${UBOOT_ENTRYPOINT}"
+ if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
+ ENTRYPOINT=`${HOST_PREFIX}nm vmlinux | \
+ awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
fi
cat << EOF >> ${1}
@@ -126,8 +148,17 @@ EOF
# $3 ... Path to DTB image
fitimage_emit_section_dtb() {
- dtb_csum="sha1"
+ dtb_csum="${FIT_HASH_ALG}"
+ dtb_loadline=""
+ dtb_ext=${DTB##*.}
+ if [ "${dtb_ext}" = "dtbo" ]; then
+ if [ -n "${UBOOT_DTBO_LOADADDRESS}" ]; then
+ dtb_loadline="load = <${UBOOT_DTBO_LOADADDRESS}>;"
+ fi
+ elif [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then
+ dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
+ fi
cat << EOF >> ${1}
fdt@${2} {
description = "Flattened Device Tree blob";
@@ -135,6 +166,7 @@ fitimage_emit_section_dtb() {
type = "flat_dt";
arch = "${UBOOT_ARCH}";
compression = "none";
+ ${dtb_loadline}
hash@1 {
algo = "${dtb_csum}";
};
@@ -150,7 +182,7 @@ EOF
# $3 ... Path to setup image
fitimage_emit_section_setup() {
- setup_csum="sha1"
+ setup_csum="${FIT_HASH_ALG}"
cat << EOF >> ${1}
setup@${2} {
@@ -177,18 +209,27 @@ EOF
# $3 ... Path to ramdisk image
fitimage_emit_section_ramdisk() {
- ramdisk_csum="sha1"
+ ramdisk_csum="${FIT_HASH_ALG}"
+ ramdisk_loadline=""
+ ramdisk_entryline=""
+
+ if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then
+ ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;"
+ fi
+ if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then
+ ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;"
+ fi
cat << EOF >> ${1}
ramdisk@${2} {
- description = "ramdisk image";
+ description = "${INITRAMFS_IMAGE}";
data = /incbin/("${3}");
type = "ramdisk";
arch = "${UBOOT_ARCH}";
os = "linux";
compression = "none";
- load = <${UBOOT_RD_LOADADDRESS}>;
- entry = <${UBOOT_RD_ENTRYPOINT}>;
+ ${ramdisk_loadline}
+ ${ramdisk_entryline}
hash@1 {
algo = "${ramdisk_csum}";
};
@@ -201,41 +242,58 @@ EOF
#
# $1 ... .its filename
# $2 ... Linux kernel ID
-# $3 ... DTB image ID
+# $3 ... DTB image name
# $4 ... ramdisk ID
# $5 ... config ID
+# $6 ... default flag
fitimage_emit_section_config() {
- conf_csum="sha1"
+ conf_csum="${FIT_HASH_ALG}"
+ conf_sign_algo="${FIT_SIGN_ALG}"
if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then
conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
fi
# Test if we have any DTBs at all
- conf_desc="Linux kernel"
- kernel_line="kernel = \"kernel@${2}\";"
+ sep=""
+ conf_desc=""
+ kernel_line=""
fdt_line=""
ramdisk_line=""
+ setup_line=""
+ default_line=""
+
+ if [ -n "${2}" ]; then
+ conf_desc="Linux kernel"
+ sep=", "
+ kernel_line="kernel = \"kernel@${2}\";"
+ fi
if [ -n "${3}" ]; then
- conf_desc="${conf_desc}, FDT blob"
+ conf_desc="${conf_desc}${sep}FDT blob"
+ sep=", "
fdt_line="fdt = \"fdt@${3}\";"
fi
if [ -n "${4}" ]; then
- conf_desc="${conf_desc}, ramdisk"
+ conf_desc="${conf_desc}${sep}ramdisk"
+ sep=", "
ramdisk_line="ramdisk = \"ramdisk@${4}\";"
fi
if [ -n "${5}" ]; then
- conf_desc="${conf_desc}, setup"
+ conf_desc="${conf_desc}${sep}setup"
setup_line="setup = \"setup@${5}\";"
fi
+ if [ "${6}" = "1" ]; then
+ default_line="default = \"conf@${3}\";"
+ fi
+
cat << EOF >> ${1}
- default = "conf@1";
- conf@1 {
- description = "${conf_desc}";
+ ${default_line}
+ conf@${3} {
+ description = "${6} ${conf_desc}";
${kernel_line}
${fdt_line}
${ramdisk_line}
@@ -247,25 +305,33 @@ EOF
if [ ! -z "${conf_sign_keyname}" ] ; then
- sign_line="sign-images = \"kernel\""
+ sign_line="sign-images = "
+ sep=""
+
+ if [ -n "${2}" ]; then
+ sign_line="${sign_line}${sep}\"kernel\""
+ sep=", "
+ fi
if [ -n "${3}" ]; then
- sign_line="${sign_line}, \"fdt\""
+ sign_line="${sign_line}${sep}\"fdt\""
+ sep=", "
fi
if [ -n "${4}" ]; then
- sign_line="${sign_line}, \"ramdisk\""
+ sign_line="${sign_line}${sep}\"ramdisk\""
+ sep=", "
fi
if [ -n "${5}" ]; then
- sign_line="${sign_line}, \"setup\""
+ sign_line="${sign_line}${sep}\"setup\""
fi
sign_line="${sign_line};"
cat << EOF >> ${1}
signature@1 {
- algo = "${conf_csum},rsa2048";
+ algo = "${conf_csum},${conf_sign_algo}";
key-name-hint = "${conf_sign_keyname}";
${sign_line}
};
@@ -286,6 +352,7 @@ EOF
fitimage_assemble() {
kernelcount=1
dtbcount=""
+ DTBS=""
ramdiskcount=${3}
setupcount=""
rm -f ${1} arch/${ARCH}/boot/${2}
@@ -303,7 +370,8 @@ fitimage_assemble() {
#
# Step 2: Prepare a DTB image section
#
- if test -n "${KERNEL_DEVICETREE}"; then
+
+ if [ -z "${EXTERNAL_KERNEL_DEVICETREE}" ] && [ -n "${KERNEL_DEVICETREE}" ]; then
dtbcount=1
for DTB in ${KERNEL_DEVICETREE}; do
if echo ${DTB} | grep -q '/dts/'; then
@@ -315,15 +383,26 @@ fitimage_assemble() {
DTB_PATH="arch/${ARCH}/boot/${DTB}"
fi
- fitimage_emit_section_dtb ${1} ${dtbcount} ${DTB_PATH}
- dtbcount=`expr ${dtbcount} + 1`
+ DTB=$(echo "${DTB}" | tr '/' '_')
+ DTBS="${DTBS} ${DTB}"
+ fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH}
+ done
+ fi
+
+ if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
+ dtbcount=1
+ for DTBFILE in ${EXTERNAL_KERNEL_DEVICETREE}/*.dtb; do
+ DTB=`basename ${DTBFILE}`
+ DTB=$(echo "${DTB}" | tr '/' '_')
+ DTBS="${DTBS} ${DTB}"
+ fitimage_emit_section_dtb ${1} ${DTB} ${DTBFILE}
done
fi
#
# Step 3: Prepare a setup section. (For x86)
#
- if test -e arch/${ARCH}/boot/setup.bin ; then
+ if [ -e arch/${ARCH}/boot/setup.bin ]; then
setupcount=1
fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin
fi
@@ -332,15 +411,22 @@ fitimage_assemble() {
# Step 4: Prepare a ramdisk section.
#
if [ "x${ramdiskcount}" = "x1" ] ; then
- copy_initramfs
- fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
+ # Find and use the first initramfs image archive type we find
+ for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz cpio; do
+ initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
+ echo "Using $initramfs_path"
+ if [ -e "${initramfs_path}" ]; then
+ fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${initramfs_path}"
+ break
+ fi
+ done
fi
fitimage_emit_section_maint ${1} sectend
# Force the first Kernel and DTB in the default config
kernelcount=1
- if test -n "${dtbcount}"; then
+ if [ -n "${dtbcount}" ]; then
dtbcount=1
fi
@@ -349,7 +435,18 @@ fitimage_assemble() {
#
fitimage_emit_section_maint ${1} confstart
- fitimage_emit_section_config ${1} "${kernelcount}" "${dtbcount}" "${ramdiskcount}" "${setupcount}"
+ if [ -n "${DTBS}" ]; then
+ i=1
+ for DTB in ${DTBS}; do
+ dtb_ext=${DTB##*.}
+ if [ "${dtb_ext}" = "dtbo" ]; then
+ fitimage_emit_section_config ${1} "" "${DTB}" "" "" "`expr ${i} = ${dtbcount}`"
+ else
+ fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`"
+ fi
+ i=`expr ${i} + 1`
+ done
+ fi
fitimage_emit_section_maint ${1} sectend
@@ -367,10 +464,17 @@ fitimage_assemble() {
# Step 7: Sign the image and add public key to U-Boot dtb
#
if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
+ add_key_to_u_boot=""
+ if [ -n "${UBOOT_DTB_BINARY}" ]; then
+ # The u-boot.dtb is a symlink to UBOOT_DTB_IMAGE, so we need copy
+ # both of them, and don't dereference the symlink.
+ cp -P ${STAGING_DATADIR}/u-boot*.dtb ${B}
+ add_key_to_u_boot="-K ${B}/${UBOOT_DTB_BINARY}"
+ fi
uboot-mkimage \
${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
-F -k "${UBOOT_SIGN_KEYDIR}" \
- -K "${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY}" \
+ $add_key_to_u_boot \
-r arch/${ARCH}/boot/${2}
fi
}
@@ -392,39 +496,35 @@ do_assemble_fitimage_initramfs() {
fi
}
-addtask assemble_fitimage_initramfs before do_deploy after do_install
+addtask assemble_fitimage_initramfs before do_deploy after do_bundle_initramfs
kernel_do_deploy[vardepsexclude] = "DATETIME"
kernel_do_deploy_append() {
# Update deploy directory
if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
- cd ${B}
echo "Copying fit-image.its source file..."
- its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
- its_symlink_name=fitImage-its-${MACHINE}
- install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
- linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
- linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
- install -m 0644 linux.bin ${DEPLOYDIR}/${linux_bin_base_name}.bin
+ install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its"
+ ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}"
+
+ echo "Copying linux.bin file..."
+ install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}.bin
+ ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}"
if [ -n "${INITRAMFS_IMAGE}" ]; then
echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..."
- its_initramfs_base_name="${KERNEL_IMAGETYPE}-its-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
- its_initramfs_symlink_name=${KERNEL_IMAGETYPE}-its-${INITRAMFS_IMAGE}-${MACHINE}
- install -m 0644 fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its
- fit_initramfs_base_name="${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
- fit_initramfs_symlink_name=${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}
- install -m 0644 arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin
- fi
+ install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its"
+ ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}"
- cd ${DEPLOYDIR}
- ln -sf ${its_base_name}.its ${its_symlink_name}.its
- ln -sf ${linux_bin_base_name}.bin ${linux_bin_symlink_name}.bin
-
- if [ -n "${INITRAMFS_IMAGE}" ]; then
- ln -sf ${its_initramfs_base_name}.its ${its_initramfs_symlink_name}.its
- ln -sf ${fit_initramfs_base_name}.bin ${fit_initramfs_symlink_name}.bin
+ echo "Copying fitImage-${INITRAMFS_IMAGE} file..."
+ install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin"
+ ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}"
+ fi
+ if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then
+ # UBOOT_DTB_IMAGE is a realfile, but we can't use
+ # ${UBOOT_DTB_IMAGE} since it contains ${PV} which is aimed
+ # for u-boot, but we are in kernel env now.
+ install -m 0644 ${B}/u-boot-${MACHINE}*.dtb "$deployDir/"
fi
fi
}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index f7dcc0715a..5d92f3b636 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -92,7 +92,7 @@ python __anonymous () {
fi
'''
- imagetypes = d.getVar('KERNEL_IMAGETYPES', True)
+ imagetypes = d.getVar('KERNEL_IMAGETYPES')
imagetypes = re.sub(r'\.gz$', '', imagetypes)
for type in imagetypes.split():
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 08d226276e..221022b7bc 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -22,15 +22,19 @@ if [ x"$D" = "x" ]; then
fi
}
+PACKAGE_WRITE_DEPS += "kmod-native depmodwrapper-cross"
+
do_install_append() {
install -d ${D}${sysconfdir}/modules-load.d/ ${D}${sysconfdir}/modprobe.d/
}
PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages "
-KERNEL_MODULES_META_PACKAGE ?= "kernel-modules"
+KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules"
KERNEL_MODULE_PACKAGE_PREFIX ?= ""
+KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}"
+KERNEL_MODULE_PROVIDE_VIRTUAL ?= "1"
python split_kernel_module_packages () {
import re
@@ -39,16 +43,33 @@ python split_kernel_module_packages () {
def extract_modinfo(file):
import tempfile, subprocess
- tempfile.tempdir = d.getVar("WORKDIR", True)
+ tempfile.tempdir = d.getVar("WORKDIR")
+ compressed = re.match( r'.*\.([xg])z$', file)
tf = tempfile.mkstemp()
tmpfile = tf[1]
- cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX", True) or "", file, tmpfile)
- subprocess.call(cmd, shell=True)
- f = open(tmpfile)
+ if compressed:
+ tmpkofile = tmpfile + ".ko"
+ if compressed.group(1) == 'g':
+ cmd = "gunzip -dc %s > %s" % (file, tmpkofile)
+ subprocess.check_call(cmd, shell=True)
+ elif compressed.group(1) == 'x':
+ cmd = "xz -dc %s > %s" % (file, tmpkofile)
+ subprocess.check_call(cmd, shell=True)
+ else:
+ msg = "Cannot decompress '%s'" % file
+ raise msg
+ cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", tmpkofile, tmpfile)
+ else:
+ cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", file, tmpfile)
+ subprocess.check_call(cmd, shell=True)
+ # errors='replace': Some old kernel versions contain invalid utf-8 characters in mod descriptions (like 0xf6, 'ö')
+ f = open(tmpfile, errors='replace')
l = f.read().split("\000")
f.close()
os.close(tf[0])
os.unlink(tmpfile)
+ if compressed:
+ os.unlink(tmpkofile)
vals = {}
for i in l:
m = modinfoexp.match(i)
@@ -60,12 +81,12 @@ python split_kernel_module_packages () {
def frob_metadata(file, pkg, pattern, format, basename):
vals = extract_modinfo(file)
- dvar = d.getVar('PKGD', True)
+ dvar = d.getVar('PKGD')
# If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
# appropriate modprobe commands to the postinst
- autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD", True) or "").split()
- autoload = d.getVar('module_autoload_%s' % basename, True)
+ autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD") or "").split()
+ autoload = d.getVar('module_autoload_%s' % basename)
if autoload and autoload == basename:
bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename)
if autoload and basename not in autoloadlist:
@@ -79,15 +100,15 @@ python split_kernel_module_packages () {
else:
f.write('%s\n' % basename)
f.close()
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
bb.fatal("pkg_postinst_%s not defined" % pkg)
- postinst += d.getVar('autoload_postinst_fragment', True) % (autoload or basename)
+ postinst += d.getVar('autoload_postinst_fragment') % (autoload or basename)
d.setVar('pkg_postinst_%s' % pkg, postinst)
# Write out any modconf fragment
- modconflist = (d.getVar("KERNEL_MODULE_PROBECONF", True) or "").split()
- modconf = d.getVar('module_conf_%s' % basename, True)
+ modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split()
+ modconf = d.getVar('module_conf_%s' % basename)
if modconf and basename in modconflist:
name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
@@ -96,15 +117,15 @@ python split_kernel_module_packages () {
elif modconf:
bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename))
- files = d.getVar('FILES_%s' % pkg, True)
+ files = d.getVar('FILES_%s' % pkg)
files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
d.setVar('FILES_%s' % pkg, files)
if "description" in vals:
- old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
+ old_desc = d.getVar('DESCRIPTION_' + pkg) or ""
d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
- rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or "")
+ rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg) or "")
modinfo_deps = []
if "depends" in vals and vals["depends"] != "":
for dep in vals["depends"].split(","):
@@ -119,26 +140,36 @@ python split_kernel_module_packages () {
# Avoid automatic -dev recommendations for modules ending with -dev.
d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)
- module_regex = '^(.*)\.k?o$'
+ # Provide virtual package without postfix
+ providevirt = d.getVar('KERNEL_MODULE_PROVIDE_VIRTUAL')
+ if providevirt == "1":
+ postfix = format.split('%s')[1]
+ d.setVar('RPROVIDES_' + pkg, pkg.replace(postfix, ''))
+
+ kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
+ kernel_version = d.getVar("KERNEL_VERSION")
+
+ module_regex = r'^(.*)\.k?o(?:\.[xg]z)?$'
- module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX', True)
- module_pattern = module_pattern_prefix + 'kernel-module-%s'
+ module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
+ module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
+ module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
- postinst = d.getVar('pkg_postinst_modules', True)
- postrm = d.getVar('pkg_postrm_modules', True)
+ postinst = d.getVar('pkg_postinst_modules')
+ postrm = d.getVar('pkg_postrm_modules')
- modules = do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION", True)))
+ modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version))
if modules:
- metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE', True)
+ metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
# If modules-load.d and modprobe.d are empty at this point, remove them to
# avoid warnings. removedirs only raises an OSError if an empty
# directory cannot be removed.
- dvar = d.getVar('PKGD', True)
+ dvar = d.getVar('PKGD')
for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar), "%s/etc" % (dvar)]:
if len(os.listdir(dir)) == 0:
os.rmdir(dir)
}
-do_package[vardeps] += '${@" ".join(map(lambda s: "module_conf_" + s, (d.getVar("KERNEL_MODULE_PROBECONF", True) or "").split()))}'
+do_package[vardeps] += '${@" ".join(map(lambda s: "module_conf_" + s, (d.getVar("KERNEL_MODULE_PROBECONF") or "").split()))}'
diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass
index 345e7f5f3b..87f02654fa 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -1,15 +1,21 @@
uboot_prep_kimage() {
- if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
+ if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
linux_suffix=""
linux_comp="none"
+ elif [ -e arch/${ARCH}/boot/vmlinuz.bin ]; then
+ rm -f linux.bin
+ cp -l arch/${ARCH}/boot/vmlinuz.bin linux.bin
+ vmlinux_path=""
+ linux_suffix=""
+ linux_comp="none"
else
vmlinux_path="vmlinux"
linux_suffix=".gz"
linux_comp="gzip"
fi
- ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
+ [ -n "${vmlinux_path}" ] && ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
if [ "${linux_comp}" != "none" ] ; then
gzip -9 linux.bin
diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass
index 340503a2d6..cedb4fa070 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -1,9 +1,9 @@
inherit kernel-uboot
python __anonymous () {
- if "uImage" in (d.getVar('KERNEL_IMAGETYPES', True) or "").split():
- depends = d.getVar("DEPENDS", True)
- depends = "%s u-boot-mkimage-native" % depends
+ if "uImage" in d.getVar('KERNEL_IMAGETYPES'):
+ depends = d.getVar("DEPENDS")
+ depends = "%s u-boot-tools-native" % depends
d.setVar("DEPENDS", depends)
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
@@ -11,27 +11,25 @@ python __anonymous () {
# to build uImage using the kernel build system if and only if
# KEEPUIMAGE == yes. Otherwise, we pack compressed vmlinux into
# the uImage .
- if d.getVar("KEEPUIMAGE", True) != 'yes':
- typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+ if d.getVar("KEEPUIMAGE") != 'yes':
+ typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or ""
if "uImage" in typeformake.split():
d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('uImage', 'vmlinux'))
+
+ # Enable building of uImage with mkimage
+ bb.build.addtask('do_uboot_mkimage', 'do_install', 'do_kernel_link_images', d)
}
+do_uboot_mkimage[dirs] += "${B}"
do_uboot_mkimage() {
- if echo "${KERNEL_IMAGETYPES}" | grep -wq "uImage"; then
- if test "x${KEEPUIMAGE}" != "xyes" ; then
- uboot_prep_kimage
-
- ENTRYPOINT=${UBOOT_ENTRYPOINT}
- if test -n "${UBOOT_ENTRYSYMBOL}"; then
- ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
- awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
- fi
+ uboot_prep_kimage
- uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
- rm -f linux.bin
- fi
+ ENTRYPOINT=${UBOOT_ENTRYPOINT}
+ if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
+ ENTRYPOINT=`${HOST_PREFIX}nm ${B}/vmlinux | \
+ awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
fi
-}
-addtask uboot_mkimage before do_install after do_compile
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
+ rm -f linux.bin
+}
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 53659f2f37..ed9bcfa57c 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -1,14 +1,25 @@
# remove tasks that modify the source tree in case externalsrc is inherited
SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_fetch do_unpack do_patch"
+PATCH_GIT_USER_EMAIL ?= "kernel-yocto@oe"
+PATCH_GIT_USER_NAME ?= "OpenEmbedded"
# returns local (absolute) path names for all valid patches in the
# src_uri
-def find_patches(d):
+def find_patches(d,subdir):
patches = src_patches(d)
patch_list=[]
for p in patches:
- _, _, local, _, _, _ = bb.fetch.decodeurl(p)
- patch_list.append(local)
+ _, _, local, _, _, parm = bb.fetch.decodeurl(p)
+ # if patchdir has been passed, we won't be able to apply it so skip
+ # the patch for now, and special processing happens later
+ patchdir = ''
+ if "patchdir" in parm:
+ patchdir = parm["patchdir"]
+ if subdir:
+ if subdir == patchdir:
+ patch_list.append(local)
+ else:
+ patch_list.append(local)
return patch_list
@@ -105,26 +116,51 @@ do_kernel_metadata() {
cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}"
if [ $? -ne 0 ]; then
bbwarn "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped"
+ else
+ cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
fi
else
cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
- sccs="${WORKDIR}/defconfig"
fi
+ sccs="${WORKDIR}/defconfig"
else
- bbfatal "A KBUILD_DECONFIG '${KBUILD_DEFCONFIG}' was specified, but not present in the source tree"
+ bbfatal "A KBUILD_DEFCONFIG '${KBUILD_DEFCONFIG}' was specified, but not present in the source tree"
fi
fi
- sccs="$sccs ${@" ".join(find_sccs(d))}"
- patches="${@" ".join(find_patches(d))}"
+ # was anyone trying to patch the kernel meta data ?, we need to do
+ # this here, since the scc commands migrate the .cfg fragments to the
+ # kernel source tree, where they'll be used later.
+ check_git_config
+ patches="${@" ".join(find_patches(d,'kernel-meta'))}"
+ for p in $patches; do
+ (
+ cd ${WORKDIR}/kernel-meta
+ git am -s $p
+ )
+ done
+
+ sccs_from_src_uri="${@" ".join(find_sccs(d))}"
+ patches="${@" ".join(find_patches(d,''))}"
feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
+ # a quick check to make sure we don't have duplicate defconfigs
+ # If there's a defconfig in the SRC_URI, did we also have one from
+ # the KBUILD_DEFCONFIG processing above ?
+ if [ -n "$sccs" ]; then
+ # we did have a defconfig from above. remove any that might be in the src_uri
+ sccs_from_src_uri=$(echo $sccs_from_src_uri | awk '{ if ($0!="defconfig") { print $0 } }' RS=' ')
+ fi
+ sccs="$sccs $sccs_from_src_uri"
+
# check for feature directories/repos/branches that were part of the
# SRC_URI. If they were supplied, we convert them into include directives
# for the update part of the process
for f in ${feat_dirs}; do
if [ -d "${WORKDIR}/$f/meta" ]; then
includes="$includes -I${WORKDIR}/$f/kernel-meta"
+ elif [ -d "${WORKDIR}/../oe-local-files/$f" ]; then
+ includes="$includes -I${WORKDIR}/../oe-local-files/$f"
elif [ -d "${WORKDIR}/$f" ]; then
includes="$includes -I${WORKDIR}/$f"
fi
@@ -141,24 +177,39 @@ do_kernel_metadata() {
# expand kernel features into their full path equivalents
bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE})
+ if [ -z "$bsp_definition" ]; then
+ echo "$sccs" | grep -q defconfig
+ if [ $? -ne 0 ]; then
+ bbfatal_log "Could not locate BSP definition for ${KMACHINE}/${LINUX_KERNEL_TYPE} and no defconfig was provided"
+ fi
+ fi
meta_dir=$(kgit --meta)
# run1: pull all the configuration fragments, no matter where they come from
elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`"
if [ -n "${elements}" ]; then
- scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
+ echo "${bsp_definition}" > ${S}/${meta_dir}/bsp_definition
+ scc --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
+ if [ $? -ne 0 ]; then
+ bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
+ fi
fi
# run2: only generate patches for elements that have been passed on the SRC_URI
elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`"
if [ -n "${elements}" ]; then
scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES}
+ if [ $? -ne 0 ]; then
+ bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
+ fi
fi
}
do_patch() {
+ set +e
cd ${S}
+ check_git_config
meta_dir=$(kgit --meta)
(cd ${meta_dir}; ln -sf patch.queue series)
if [ -f "${meta_dir}/series" ]; then
@@ -168,6 +219,19 @@ do_patch() {
bbfatal_log "Patch failures can be resolved in the linux source directory ${S})"
fi
fi
+
+ if [ -f "${meta_dir}/merge.queue" ]; then
+ # we need to merge all these branches
+ for b in $(cat ${meta_dir}/merge.queue); do
+ git show-ref --verify --quiet refs/heads/${b}
+ if [ $? -eq 0 ]; then
+ bbnote "Merging branch ${b}"
+ git merge -q --no-ff -m "Merge branch ${b}" ${b}
+ else
+ bbfatal "branch ${b} does not exist, cannot merge"
+ fi
+ done
+ fi
}
do_kernel_checkout() {
@@ -206,6 +270,7 @@ do_kernel_checkout() {
fi
rm -f .gitignore
git init
+ check_git_config
git add .
git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
git clean -d -f
@@ -231,7 +296,11 @@ do_kernel_checkout[dirs] = "${S}"
addtask kernel_checkout before do_kernel_metadata after do_unpack
addtask kernel_metadata after do_validate_branches do_unpack before do_patch
do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot"
+do_validate_branches[depends] = "kern-tools-native:do_populate_sysroot"
+do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}binutils:do_populate_sysroot"
+do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot"
+do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot"
do_kernel_configme[dirs] += "${S} ${B}"
do_kernel_configme() {
set +e
@@ -256,11 +325,12 @@ do_kernel_configme() {
meta_dir=$(kgit --meta)
configs="$(scc --configs -o ${meta_dir})"
- if [ -z "${configs}" ]; then
+ if [ $? -ne 0 ]; then
+ bberror "${configs}"
bbfatal_log "Could not find configuration queue (${meta_dir}/config.queue)"
fi
- CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1
+ CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" CC="${KERNEL_CC}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1
if [ $? -ne 0 ]; then
bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
fi
@@ -272,25 +342,36 @@ do_kernel_configme() {
addtask kernel_configme before do_configure after do_patch
python do_kernel_configcheck() {
- import re, string, sys
+ import re, string, sys, subprocess
# if KMETA isn't set globally by a recipe using this routine, we need to
# set the default to 'meta'. Otherwise, kconf_check is not passed a valid
# meta-series for processing
- kmeta = d.getVar( "KMETA", True ) or "meta"
+ kmeta = d.getVar("KMETA") or "meta"
if not os.path.exists(kmeta):
kmeta = "." + kmeta
- pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/")
+ s = d.getVar('S')
+
+ env = os.environ.copy()
+ env['PATH'] = "%s:%s%s" % (d.getVar('PATH'), s, "/scripts/util/")
- cmd = d.expand("scc --configs -o ${S}/.kernel-meta")
- ret, configs = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
+ try:
+ configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8')
+ except subprocess.CalledProcessError as e:
+ bb.fatal( "Cannot gather config fragments for audit: %s" % e.output.decode("utf-8") )
- cmd = d.expand("cd ${S}; kconf_check --report -o ${S}/%s/cfg/ ${B}/.config ${S} %s" % (kmeta,configs))
- ret, result = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
+ try:
+ subprocess.check_call(['kconf_check', '--report', '-o',
+ '%s/%s/cfg' % (s, kmeta), d.getVar('B') + '/.config', s, configs], cwd=s, env=env)
+ except subprocess.CalledProcessError:
+ # The configuration gathering can return different exit codes, but
+ # we interpret them based on the KCONF_AUDIT_LEVEL variable, so we catch
+ # everything here, and let the run continue.
+ pass
- config_check_visibility = int(d.getVar( "KCONF_AUDIT_LEVEL", True ) or 0)
- bsp_check_visibility = int(d.getVar( "KCONF_BSP_AUDIT_LEVEL", True ) or 0)
+ config_check_visibility = int(d.getVar("KCONF_AUDIT_LEVEL") or 0)
+ bsp_check_visibility = int(d.getVar("KCONF_BSP_AUDIT_LEVEL") or 0)
# if config check visibility is non-zero, report dropped configuration values
mismatch_file = d.expand("${S}/%s/cfg/mismatch.txt" % kmeta)
@@ -299,6 +380,27 @@ python do_kernel_configcheck() {
with open (mismatch_file, "r") as myfile:
results = myfile.read()
bb.warn( "[kernel config]: specified values did not make it into the kernel's final configuration:\n\n%s" % results)
+
+ if bsp_check_visibility:
+ invalid_file = d.expand("${S}/%s/cfg/invalid.cfg" % kmeta)
+ if os.path.exists(invalid_file) and os.stat(invalid_file).st_size > 0:
+ with open (invalid_file, "r") as myfile:
+ results = myfile.read()
+ bb.warn( "[kernel config]: This BSP sets config options that are not offered anywhere within this kernel:\n\n%s" % results)
+ errors_file = d.expand("${S}/%s/cfg/fragment_errors.txt" % kmeta)
+ if os.path.exists(errors_file) and os.stat(errors_file).st_size > 0:
+ with open (errors_file, "r") as myfile:
+ results = myfile.read()
+ bb.warn( "[kernel config]: This BSP contains fragments with errors:\n\n%s" % results)
+
+ # if the audit level is greater than two, we report if a fragment has overriden
+ # a value from a base fragment. This is really only used for new kernel introduction
+ if bsp_check_visibility > 2:
+ redefinition_file = d.expand("${S}/%s/cfg/redefinition.txt" % kmeta)
+ if os.path.exists(redefinition_file) and os.stat(redefinition_file).st_size > 0:
+ with open (redefinition_file, "r") as myfile:
+ results = myfile.read()
+ bb.warn( "[kernel config]: This BSP has configuration options defined in more than one config, with differing values:\n\n%s" % results)
}
# Ensure that the branches (BSP and meta) are on the locations specified by
@@ -341,6 +443,10 @@ do_validate_branches() {
current_branch=`git rev-parse --abbrev-ref HEAD`
git branch "$current_branch-orig"
git reset --hard ${force_srcrev}
+ # We've checked out HEAD, make sure we cleanup kgit-s2q fence post check
+ # so the patches are applied as expected otherwise no patching
+ # would be done in some corner cases.
+ kgit-s2q --clean
fi
fi
}
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 25a153cd20..ebcb79a528 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,7 +1,16 @@
inherit linux-kernel-base kernel-module-split
-PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross bc-native lzop-native"
+KERNEL_PACKAGE_NAME ??= "kernel"
+KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
+
+PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
+PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
+
+do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"
+do_clean[depends] += "make-mod-scripts:do_clean"
+
+CVE_PRODUCT ?= "linux_kernel"
S = "${STAGING_KERNEL_DIR}"
B = "${WORKDIR}/build"
@@ -13,6 +22,7 @@ INHIBIT_DEFAULT_DEPS = "1"
KERNEL_IMAGETYPE ?= "zImage"
INITRAMFS_IMAGE ?= ""
+INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}-${MACHINE}', ''][d.getVar('INITRAMFS_IMAGE') == '']}"
INITRAMFS_TASK ?= ""
INITRAMFS_IMAGE_BUNDLE ?= ""
@@ -22,49 +32,73 @@ INITRAMFS_IMAGE_BUNDLE ?= ""
# number and cause kernel to be rebuilt. To avoid this, make
# KERNEL_VERSION_NAME and KERNEL_VERSION_PKG_NAME depend on
# LINUX_VERSION which is a constant.
-KERNEL_VERSION_NAME = "${@d.getVar('KERNEL_VERSION', True) or ""}"
+KERNEL_VERSION_NAME = "${@d.getVar('KERNEL_VERSION') or ""}"
KERNEL_VERSION_NAME[vardepvalue] = "${LINUX_VERSION}"
-KERNEL_VERSION_PKG_NAME = "${@legitimize_package_name(d.getVar('KERNEL_VERSION', True))}"
+KERNEL_VERSION_PKG_NAME = "${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}"
python __anonymous () {
- import re
+ pn = d.getVar("PN")
+ kpn = d.getVar("KERNEL_PACKAGE_NAME")
+
+ # XXX Remove this after bug 11905 is resolved
+ # FILES_${KERNEL_PACKAGE_NAME}-dev doesn't expand correctly
+ if kpn == pn:
+ bb.warn("Some packages (E.g. *-dev) might be missing due to "
+ "bug 11905 (variable KERNEL_PACKAGE_NAME == PN)")
+
+ # The default kernel recipe builds in a shared location defined by
+ # bitbake/distro confs: STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR.
+ # Set these variables to directories under ${WORKDIR} in alternate
+ # kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they
+ # may build in parallel with the default kernel without clobbering.
+ if kpn != "kernel":
+ workdir = d.getVar("WORKDIR")
+ sourceDir = os.path.join(workdir, 'kernel-source')
+ artifactsDir = os.path.join(workdir, 'kernel-build-artifacts')
+ d.setVar("STAGING_KERNEL_DIR", sourceDir)
+ d.setVar("STAGING_KERNEL_BUILDDIR", artifactsDir)
# Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES
- type = d.getVar('KERNEL_IMAGETYPE', True) or ""
- alttype = d.getVar('KERNEL_ALT_IMAGETYPE', True) or ""
- types = d.getVar('KERNEL_IMAGETYPES', True) or ""
+ type = d.getVar('KERNEL_IMAGETYPE') or ""
+ alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or ""
+ types = d.getVar('KERNEL_IMAGETYPES') or ""
if type not in types.split():
types = (type + ' ' + types).strip()
if alttype not in types.split():
types = (alttype + ' ' + types).strip()
d.setVar('KERNEL_IMAGETYPES', types)
- typeformake = re.sub(r'\.gz', '', types)
- d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake)
-
- for type in typeformake.split():
+ # KERNEL_IMAGETYPES may contain a mixture of image types supported directly
+ # by the kernel build system and types which are created by post-processing
+ # the output of the kernel build system (e.g. compressing vmlinux ->
+ # vmlinux.gz in kernel_do_compile()).
+ # KERNEL_IMAGETYPE_FOR_MAKE should contain only image types supported
+ # directly by the kernel build system.
+ if not d.getVar('KERNEL_IMAGETYPE_FOR_MAKE'):
+ typeformake = set()
+ for type in types.split():
+ if type == 'vmlinux.gz':
+ type = 'vmlinux'
+ typeformake.add(type)
+
+ d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', ' '.join(sorted(typeformake)))
+
+ kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel"
+ imagedest = d.getVar('KERNEL_IMAGEDEST')
+
+ for type in types.split():
typelower = type.lower()
-
- d.appendVar('PACKAGES', ' ' + 'kernel-image-' + typelower)
-
- d.setVar('FILES_kernel-image-' + typelower, '/boot/' + type + '*')
-
- d.appendVar('RDEPENDS_kernel-image', ' ' + 'kernel-image-' + typelower)
-
- d.setVar('PKG_kernel-image-' + typelower, 'kernel-image-' + typelower + '-${KERNEL_VERSION_PKG_NAME}')
-
- d.setVar('ALLOW_EMPTY_kernel-image-' + typelower, '1')
-
- imagedest = d.getVar('KERNEL_IMAGEDEST', True)
- priority = d.getVar('KERNEL_PRIORITY', True)
- postinst = '#!/bin/sh\n' + 'update-alternatives --install /' + imagedest + '/' + type + ' ' + type + ' ' + '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME} ' + priority + ' || true' + '\n'
- d.setVar('pkg_postinst_kernel-image-' + typelower, postinst)
-
- postrm = '#!/bin/sh\n' + 'update-alternatives --remove' + ' ' + type + ' ' + type + '-${KERNEL_VERSION_NAME} || true' + '\n'
- d.setVar('pkg_postrm_kernel-image-' + typelower, postrm)
-
- image = d.getVar('INITRAMFS_IMAGE', True)
+ d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
+ d.setVar('FILES_' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
+ d.appendVar('RDEPENDS_%s-image' % kname, ' %s-image-%s' % (kname, typelower))
+ d.setVar('PKG_%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
+ d.setVar('ALLOW_EMPTY_%s-image-%s' % (kname, typelower), '1')
+
+ image = d.getVar('INITRAMFS_IMAGE')
+ # If the INTIRAMFS_IMAGE is set but the INITRAMFS_IMAGE_BUNDLE is set to 0,
+ # the do_bundle_initramfs does nothing, but the INITRAMFS_IMAGE is built
+ # standalone for use by wic and other tools.
if image:
d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
@@ -72,7 +106,7 @@ python __anonymous () {
# The preferred method is to set INITRAMFS_IMAGE, because
# this INITRAMFS_TASK has circular dependency problems
# if the initramfs requires kernel modules
- image_task = d.getVar('INITRAMFS_TASK', True)
+ image_task = d.getVar('INITRAMFS_TASK')
if image_task:
d.appendVarFlag('do_configure', 'depends', ' ${INITRAMFS_TASK}')
}
@@ -100,16 +134,16 @@ inherit ${KERNEL_CLASSES}
# the symlink.
do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
-base_do_unpack_append () {
- s = d.getVar("S", True)
+python do_symlink_kernsrc () {
+ s = d.getVar("S")
if s[-1] == '/':
# drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as directory name and fail
s=s[:-1]
- kernsrc = d.getVar("STAGING_KERNEL_DIR", True)
+ kernsrc = d.getVar("STAGING_KERNEL_DIR")
if s != kernsrc:
bb.utils.mkdirhier(kernsrc)
bb.utils.remove(kernsrc, recurse=True)
- if d.getVar("EXTERNALSRC", True):
+ if d.getVar("EXTERNALSRC"):
# With EXTERNALSRC S will not be wiped so we can symlink to it
os.symlink(s, kernsrc)
else:
@@ -117,30 +151,30 @@ base_do_unpack_append () {
shutil.move(s, kernsrc)
os.symlink(kernsrc, s)
}
+addtask symlink_kernsrc before do_configure after do_unpack
inherit kernel-arch deploy
-PACKAGES_DYNAMIC += "^kernel-module-.*"
-PACKAGES_DYNAMIC += "^kernel-image-.*"
-PACKAGES_DYNAMIC += "^kernel-firmware-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-module-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-image-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-firmware-.*"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
-
-KERNEL_PRIORITY ?= "${@int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
- int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[1]) * 100 + \
- int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[-1])}"
+export KBUILD_BUILD_VERSION = "1"
+export KBUILD_BUILD_USER ?= "oe-user"
+export KBUILD_BUILD_HOST ?= "oe-host"
KERNEL_RELEASE ?= "${KERNEL_VERSION}"
# The directory where built kernel lies in the kernel tree
KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
-KERNEL_IMAGEDEST = "boot"
+KERNEL_IMAGEDEST ?= "boot"
#
# configuration
#
-export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE", True) or "ttyS0"}"
+export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE") or "ttyS0"}"
KERNEL_VERSION = "${@get_kernelversion_headers('${B}')}"
@@ -156,7 +190,7 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
# Some Linux kernel configurations need additional parameters on the command line
KERNEL_EXTRA_ARGS ?= ""
-EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}""
+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
KERNEL_ALT_IMAGETYPE ??= ""
copy_initramfs() {
@@ -164,83 +198,77 @@ copy_initramfs() {
# In case the directory is not created yet from the first pass compile:
mkdir -p ${B}/usr
# Find and use the first initramfs image archive type we find
- rm -f ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
- for img in cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz; do
- if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
- cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img ${B}/usr/.
+ rm -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
+ for img in cpio cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz; do
+ if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img" ]; then
+ cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img ${B}/usr/.
case $img in
*gz)
echo "gzip decompressing image"
- gunzip -f ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img
+ gunzip -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img
break
;;
*lz4)
echo "lz4 decompressing image"
- lz4 -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img
+ lz4 -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img
break
;;
*lzo)
echo "lzo decompressing image"
- lzop -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img
+ lzop -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img
break
;;
*lzma)
echo "lzma decompressing image"
- lzma -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img
+ lzma -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img
break
;;
*xz)
echo "xz decompressing image"
- xz -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img
+ xz -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img
break
;;
esac
+ break
fi
done
- echo "Finished copy of initramfs into ./usr"
+ # Verify that the above loop found a initramfs, fail otherwise
+ [ -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio ] && echo "Finished copy of initramfs into ./usr" || die "Could not find any ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.cpio{.gz|.lz4|.lzo|.lzma|.xz) for bundling; INITRAMFS_IMAGE_NAME might be wrong."
}
-INITRAMFS_BASE_NAME ?= "initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}"
-INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
do_bundle_initramfs () {
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
echo "Creating a kernel image with a bundled initramfs..."
copy_initramfs
# Backing up kernel image relies on its type(regular file or symbolic link)
tmp_path=""
- for type in ${KERNEL_IMAGETYPES} ; do
- if [ -h ${KERNEL_OUTPUT_DIR}/$type ] ; then
- linkpath=`readlink -n ${KERNEL_OUTPUT_DIR}/$type`
- realpath=`readlink -fn ${KERNEL_OUTPUT_DIR}/$type`
+ for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
+ if [ -h ${KERNEL_OUTPUT_DIR}/$imageType ] ; then
+ linkpath=`readlink -n ${KERNEL_OUTPUT_DIR}/$imageType`
+ realpath=`readlink -fn ${KERNEL_OUTPUT_DIR}/$imageType`
mv -f $realpath $realpath.bak
- tmp_path=$tmp_path" "$type"#"$linkpath"#"$realpath
- elif [ -f ${KERNEL_OUTPUT_DIR}/$type ]; then
- mv -f ${KERNEL_OUTPUT_DIR}/$type ${KERNEL_OUTPUT_DIR}/$type.bak
- tmp_path=$tmp_path" "$type"##"
+ tmp_path=$tmp_path" "$imageType"#"$linkpath"#"$realpath
+ elif [ -f ${KERNEL_OUTPUT_DIR}/$imageType ]; then
+ mv -f ${KERNEL_OUTPUT_DIR}/$imageType ${KERNEL_OUTPUT_DIR}/$imageType.bak
+ tmp_path=$tmp_path" "$imageType"##"
fi
done
- use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
+ use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
kernel_do_compile
# Restoring kernel image
for tp in $tmp_path ; do
- type=`echo $tp|cut -d "#" -f 1`
+ imageType=`echo $tp|cut -d "#" -f 1`
linkpath=`echo $tp|cut -d "#" -f 2`
realpath=`echo $tp|cut -d "#" -f 3`
if [ -n "$realpath" ]; then
mv -f $realpath $realpath.initramfs
mv -f $realpath.bak $realpath
- ln -sf $linkpath.initramfs ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs
+ ln -sf $linkpath.initramfs ${B}/${KERNEL_OUTPUT_DIR}/$imageType.initramfs
else
- mv -f ${KERNEL_OUTPUT_DIR}/$type ${KERNEL_OUTPUT_DIR}/$type.initramfs
- mv -f ${KERNEL_OUTPUT_DIR}/$type.bak ${KERNEL_OUTPUT_DIR}/$type
+ mv -f ${KERNEL_OUTPUT_DIR}/$imageType ${KERNEL_OUTPUT_DIR}/$imageType.initramfs
+ mv -f ${KERNEL_OUTPUT_DIR}/$imageType.bak ${KERNEL_OUTPUT_DIR}/$imageType
fi
done
- # Update install area
- for type in ${KERNEL_IMAGETYPES} ; do
- echo "There is kernel image bundled with initramfs: ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs"
- install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs ${D}/boot/$type-initramfs-${MACHINE}.bin
- echo "${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs"
- done
fi
}
do_bundle_initramfs[dirs] = "${B}"
@@ -251,8 +279,36 @@ python do_devshell_prepend () {
addtask bundle_initramfs after do_install before do_deploy
+get_cc_option () {
+ # Check if KERNEL_CC supports the option "file-prefix-map".
+ # This option allows us to build images with __FILE__ values that do not
+ # contain the host build path.
+ if ${KERNEL_CC} -Q --help=joined | grep -q "\-ffile-prefix-map=<old=new>"; then
+ echo "-ffile-prefix-map=${S}=/kernel-source/"
+ fi
+}
+
kernel_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
+ # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not
+ # be set....
+ if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then
+ olddir=`pwd`
+ cd ${S}
+ SOURCE_DATE_EPOCH=`git log -1 --pretty=%ct`
+ # git repo not guaranteed, so fall back to REPRODUCIBLE_TIMESTAMP_ROOTFS
+ if [ $? -ne 0 ]; then
+ SOURCE_DATE_EPOCH=${REPRODUCIBLE_TIMESTAMP_ROOTFS}
+ fi
+ cd $olddir
+ fi
+
+ ts=`LC_ALL=C date -d @$SOURCE_DATE_EPOCH`
+ export KBUILD_BUILD_TIMESTAMP="$ts"
+ export KCONFIG_NOTIMESTAMP=1
+ bbnote "KBUILD_BUILD_TIMESTAMP: $ts"
+ fi
# The $use_alternate_initrd is only set from
# do_bundle_initramfs() This variable is specifically for the
# case where we are making a second pass at the kernel
@@ -264,23 +320,24 @@ kernel_do_compile() {
# The old style way of copying an prebuilt image and building it
# is turned on via INTIRAMFS_TASK != ""
copy_initramfs
- use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
+ use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
fi
+ cc_extra=$(get_cc_option)
for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
- oe_runmake ${typeformake} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
- for type in ${KERNEL_IMAGETYPES} ; do
- if test "${typeformake}.gz" = "${type}"; then
- gzip -9c < "${typeformake}" > "${KERNEL_OUTPUT_DIR}/${type}"
- break;
- fi
- done
+ oe_runmake ${typeformake} CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
done
+ # vmlinux.gz is not built by kernel
+ if (echo "${KERNEL_IMAGETYPES}" | grep -wq "vmlinux\.gz"); then
+ mkdir -p "${KERNEL_OUTPUT_DIR}"
+ gzip -9cn < ${B}/vmlinux > "${KERNEL_OUTPUT_DIR}/vmlinux.gz"
+ fi
}
do_compile_kernelmodules() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
- oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
+ cc_extra=$(get_cc_option)
+ oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
# Module.symvers gets updated during the
# building of the kernel modules. We need to
@@ -301,11 +358,11 @@ kernel_do_install() {
#
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
- oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
- rm "${D}/lib/modules/${KERNEL_VERSION}/build"
- rm "${D}/lib/modules/${KERNEL_VERSION}/source"
+ oe_runmake DEPMOD=echo MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install
+ rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
+ rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
# If the kernel/ directory is empty remove it to prevent QA issues
- rmdir --ignore-fail-on-non-empty "${D}/lib/modules/${KERNEL_VERSION}/kernel"
+ rmdir --ignore-fail-on-non-empty "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel"
else
bbnote "no modules to install"
fi
@@ -315,8 +372,11 @@ kernel_do_install() {
#
install -d ${D}/${KERNEL_IMAGEDEST}
install -d ${D}/boot
- for type in ${KERNEL_IMAGETYPES} ; do
- install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${D}/${KERNEL_IMAGEDEST}/${type}-${KERNEL_VERSION}
+ for imageType in ${KERNEL_IMAGETYPES} ; do
+ install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} ${D}/${KERNEL_IMAGEDEST}/${imageType}-${KERNEL_VERSION}
+ if [ "${KERNEL_PACKAGE_NAME}" = "kernel" ]; then
+ ln -sf ${imageType}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${imageType}
+ fi
done
install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
@@ -329,6 +389,10 @@ do_install[prefuncs] += "package_get_auto_pr"
# Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile
do_kernel_version_sanity_check() {
+ if [ "x${KERNEL_VERSION_SANITY_SKIP}" = "x1" ]; then
+ exit 0
+ fi
+
# The Makefile determines the kernel version shown at runtime
# Don't use KERNEL_VERSION because the headers it grabs the version from aren't generated until do_compile
VERSION=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//)
@@ -352,7 +416,7 @@ do_kernel_version_sanity_check() {
reg="${reg}${EXTRAVERSION}"
if [ -z `echo ${PV} | grep -E "${reg}"` ]; then
- bbfatal "Package Version (${PV}) does not match of kernel being built (${vers}). Please update the PV variable to match the kernel source."
+ bbfatal "Package Version (${PV}) does not match of kernel being built (${vers}). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP=\"1\" in your recipe."
fi
exit 0
}
@@ -366,13 +430,14 @@ do_shared_workdir_setscene () {
emit_depmod_pkgdata() {
# Stash data for depmod
- install -d ${PKGDESTWORK}/kernel-depmod/
- echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/kernel-depmod/kernel-abiversion
- cp ${B}/System.map ${PKGDESTWORK}/kernel-depmod/System.map-${KERNEL_VERSION}
+ install -d ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/
+ echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/${KERNEL_PACKAGE_NAME}-abiversion
+ cp ${B}/System.map ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/System.map-${KERNEL_VERSION}
}
PACKAGEFUNCS += "emit_depmod_pkgdata"
+do_shared_workdir[cleandirs] += " ${STAGING_KERNEL_BUILDDIR}"
do_shared_workdir () {
cd ${B}
@@ -383,7 +448,7 @@ do_shared_workdir () {
# Store the kernel version in sysroots for module-base.bbclass
#
- echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion
+ echo "${KERNEL_VERSION}" > $kerneldir/${KERNEL_PACKAGE_NAME}-abiversion
# Copy files required for module builds
cp System.map $kerneldir/System.map-${KERNEL_VERSION}
@@ -391,7 +456,7 @@ do_shared_workdir () {
cp .config $kerneldir/
mkdir -p $kerneldir/include/config
cp include/config/kernel.release $kerneldir/include/config/kernel.release
- if [ -e certs/signing_key.pem ]; then
+ if [ -e certs/signing_key.x509 ]; then
# The signing_key.* files are stored in the certs/ dir in
# newer Linux kernels
mkdir -p $kerneldir/certs
@@ -412,8 +477,10 @@ do_shared_workdir () {
# arch/powerpc/lib/crtsavres.o which is present in
# KBUILD_LDFLAGS_MODULE, making it required to build external modules.
if [ ${ARCH} = "powerpc" ]; then
- mkdir -p $kerneldir/arch/powerpc/lib/
- cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ if [ -e arch/powerpc/lib/crtsavres.o ]; then
+ mkdir -p $kerneldir/arch/powerpc/lib/
+ cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ fi
fi
if [ -d include/generated ]; then
@@ -425,6 +492,15 @@ do_shared_workdir () {
mkdir -p $kerneldir/arch/${ARCH}/include/generated/
cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
fi
+
+ if (grep -q -i -e '^CONFIG_UNWINDER_ORC=y$' $kerneldir/.config); then
+ # With CONFIG_UNWINDER_ORC (the default in 4.14), objtool is required for
+ # out-of-tree modules to be able to generate object files.
+ if [ -x tools/objtool/objtool ]; then
+ mkdir -p ${kerneldir}/tools/objtool
+ cp tools/objtool/objtool ${kerneldir}/tools/objtool/
+ fi
+ fi
}
# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
@@ -432,17 +508,17 @@ sysroot_stage_all () {
:
}
-KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
+KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig || oe_runmake -C ${S} O=${B} CC="${KERNEL_CC}" oldnoconfig"
python check_oldest_kernel() {
- oldest_kernel = d.getVar('OLDEST_KERNEL', True)
- kernel_version = d.getVar('KERNEL_VERSION', True)
- tclibc = d.getVar('TCLIBC', True)
+ oldest_kernel = d.getVar('OLDEST_KERNEL')
+ kernel_version = d.getVar('KERNEL_VERSION')
+ tclibc = d.getVar('TCLIBC')
if tclibc == 'glibc':
kernel_version = kernel_version.split('-', 1)[0]
if oldest_kernel and kernel_version:
if bb.utils.vercmp_string(kernel_version, oldest_kernel) < 0:
- bb.warn('%s: OLDEST_KERNEL is "%s" but the version of the kernel you are building is "%s" - therefore %s as built may not be compatible with this kernel. Either set OLDEST_KERNEL to an older version, or build a newer kernel.' % (d.getVar('PN', True), oldest_kernel, kernel_version, tclibc))
+ bb.warn('%s: OLDEST_KERNEL is "%s" but the version of the kernel you are building is "%s" - therefore %s as built may not be compatible with this kernel. Either set OLDEST_KERNEL to an older version, or build a newer kernel.' % (d.getVar('PN'), oldest_kernel, kernel_version, tclibc))
}
check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION"
@@ -477,32 +553,34 @@ addtask savedefconfig after do_configure
inherit cml1
+KCONFIG_CONFIG_COMMAND_append = " HOSTLDFLAGS='${BUILD_LDFLAGS}'"
+
EXPORT_FUNCTIONS do_compile do_install do_configure
# kernel-base becomes kernel-${KERNEL_VERSION}
# kernel-image becomes kernel-image-${KERNEL_VERSION}
-PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-modules"
+PACKAGES = "${KERNEL_PACKAGE_NAME} ${KERNEL_PACKAGE_NAME}-base ${KERNEL_PACKAGE_NAME}-vmlinux ${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-dev ${KERNEL_PACKAGE_NAME}-modules"
FILES_${PN} = ""
-FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order /lib/modules/${KERNEL_VERSION}/modules.builtin"
-FILES_kernel-image = ""
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} /lib/modules/${KERNEL_VERSION}/build"
-FILES_kernel-vmlinux = "/boot/vmlinux*"
-FILES_kernel-modules = ""
-RDEPENDS_kernel = "kernel-base"
+FILES_${KERNEL_PACKAGE_NAME}-base = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.order ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo"
+FILES_${KERNEL_PACKAGE_NAME}-image = ""
+FILES_${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
+FILES_${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
+FILES_${KERNEL_PACKAGE_NAME}-modules = ""
+RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base"
# Allow machines to override this dependency if kernel image files are
# not wanted in images as standard
-RDEPENDS_kernel-base ?= "kernel-image"
-PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
-RDEPENDS_kernel-image += "${@base_conditional('KERNEL_IMAGETYPE', 'vmlinux', 'kernel-vmlinux', '', d)}"
-PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
-RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
-ALLOW_EMPTY_kernel = "1"
-ALLOW_EMPTY_kernel-base = "1"
-ALLOW_EMPTY_kernel-image = "1"
-ALLOW_EMPTY_kernel-modules = "1"
-DESCRIPTION_kernel-modules = "Kernel modules meta package"
-
-pkg_postinst_kernel-base () {
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image"
+PKG_${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
+RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}"
+PKG_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name('${KERNEL_VERSION}')}"
+RPROVIDES_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME} = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-base = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-image = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-modules = "1"
+DESCRIPTION_${KERNEL_PACKAGE_NAME}-modules = "Kernel modules meta package"
+
+pkg_postinst_${KERNEL_PACKAGE_NAME}-base () {
if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
mkdir -p $D/lib/modules/${KERNEL_VERSION}
fi
@@ -516,7 +594,7 @@ pkg_postinst_kernel-base () {
PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
python split_kernel_packages () {
- do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
+ do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex=r'^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
}
# Many scripts want to look in arch/$arch/boot for the bootable
@@ -532,7 +610,11 @@ do_kernel_link_images() {
if [ -f ../../../vmlinuz ]; then
ln -sf ../../../vmlinuz
fi
+ if [ -f ../../../vmlinuz.bin ]; then
+ ln -sf ../../../vmlinuz.bin
+ fi
}
+addtask kernel_link_images after do_compile before do_strip
do_strip() {
if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
@@ -561,75 +643,78 @@ do_strip() {
}
do_strip[dirs] = "${B}"
-addtask do_strip before do_sizecheck after do_kernel_link_images
+addtask strip before do_sizecheck after do_kernel_link_images
# Support checking the kernel size since some kernels need to reside in partitions
-# with a fixed length or there is a limit in transferring the kernel to memory
+# with a fixed length or there is a limit in transferring the kernel to memory.
+# If more than one image type is enabled, warn on any that don't fit but only fail
+# if none fit.
do_sizecheck() {
if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
invalid=`echo ${KERNEL_IMAGE_MAXSIZE} | sed 's/[0-9]//g'`
if [ -n "$invalid" ]; then
- die "Invalid KERNEL_IMAGE_MAXSIZE: ${KERNEL_IMAGE_MAXSIZE}, should be an integerx (The unit is Kbytes)"
+ die "Invalid KERNEL_IMAGE_MAXSIZE: ${KERNEL_IMAGE_MAXSIZE}, should be an integer (The unit is Kbytes)"
fi
- for type in ${KERNEL_IMAGETYPES} ; do
- size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$type | awk '{print $1}'`
+ at_least_one_fits=
+ for imageType in ${KERNEL_IMAGETYPES} ; do
+ size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$imageType | awk '{print $1}'`
if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
- warn "This kernel $type (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device. Please reduce the size of the kernel by making more of it modular."
+ bbwarn "This kernel $imageType (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device."
+ else
+ at_least_one_fits=y
fi
done
+ if [ -z "$at_least_one_fits" ]; then
+ die "All kernel images are too big for your device. Please reduce the size of the kernel by making more of it modular."
+ fi
fi
}
do_sizecheck[dirs] = "${B}"
addtask sizecheck before do_install after do_strip
-KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
-# Don't include the DATETIME variable in the sstate package signatures
-KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
-KERNEL_IMAGE_SYMLINK_NAME ?= "${MACHINE}"
-MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
-MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
-MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz"
-# Don't include the DATETIME variable in the sstate package signatures
-MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
-MODULE_TARBALL_DEPLOY ?= "1"
+inherit kernel-artifact-names
kernel_do_deploy() {
- for type in ${KERNEL_IMAGETYPES} ; do
- base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
- install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${DEPLOYDIR}/${base_name}.bin
- done
- if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
- mkdir -p ${D}/lib
- tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
- ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
+ deployDir="${DEPLOYDIR}"
+ if [ -n "${KERNEL_DEPLOYSUBDIR}" ]; then
+ deployDir="${DEPLOYDIR}/${KERNEL_DEPLOYSUBDIR}"
+ mkdir "$deployDir"
fi
- for type in ${KERNEL_IMAGETYPES} ; do
- base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
- symlink_name=${type}-${KERNEL_IMAGE_SYMLINK_NAME}
- ln -sf ${base_name}.bin ${DEPLOYDIR}/${symlink_name}.bin
- ln -sf ${base_name}.bin ${DEPLOYDIR}/${type}
+ for imageType in ${KERNEL_IMAGETYPES} ; do
+ base_name=${imageType}-${KERNEL_IMAGE_NAME}
+ install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin
+ symlink_name=${imageType}-${KERNEL_IMAGE_LINK_NAME}
+ ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin
+ ln -sf ${base_name}.bin $deployDir/${imageType}
done
- cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
+ if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
+ mkdir -p ${D}${root_prefix}/lib
+ tar -cvzf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz -C ${D}${root_prefix} lib
+ ln -sf modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz
+ fi
- cd ${B}
- # Update deploy directory
- for type in ${KERNEL_IMAGETYPES} ; do
- if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then
- echo "Copying deploy ${type} kernel-initramfs image and setting up links..."
- initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
- initramfs_symlink_name=${type}-initramfs-${MACHINE}
- install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
- ln -sf ${initramfs_base_name}.bin ${DEPLOYDIR}/${initramfs_symlink_name}.bin
- fi
- done
+ if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
+ for imageType in ${KERNEL_IMAGETYPES} ; do
+ if [ "$imageType" = "fitImage" ] ; then
+ continue
+ fi
+ initramfs_base_name=${imageType}-${INITRAMFS_NAME}
+ initramfs_symlink_name=${imageType}-${INITRAMFS_LINK_NAME}
+ install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType}.initramfs $deployDir/${initramfs_base_name}.bin
+ ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin
+ done
+ fi
}
do_deploy[cleandirs] = "${DEPLOYDIR}"
do_deploy[dirs] = "${DEPLOYDIR} ${B}"
do_deploy[prefuncs] += "package_get_auto_pr"
-addtask deploy after do_populate_sysroot
+addtask deploy after do_populate_sysroot do_packagedata
EXPORT_FUNCTIONS do_deploy
+
+# Add using Device Tree support
+inherit kernel-devicetree
diff --git a/meta/classes/kernelsrc.bbclass b/meta/classes/kernelsrc.bbclass
index 9efd46a92d..675d40ec9a 100644
--- a/meta/classes/kernelsrc.bbclass
+++ b/meta/classes/kernelsrc.bbclass
@@ -1,7 +1,7 @@
S = "${STAGING_KERNEL_DIR}"
-do_fetch[noexec] = "1"
-do_unpack[depends] += "virtual/kernel:do_patch"
-do_unpack[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+do_patch[depends] += "virtual/kernel:do_patch"
do_patch[noexec] = "1"
do_package[depends] += "virtual/kernel:do_populate_sysroot"
KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}")}"
diff --git a/meta/classes/libc-common.bbclass b/meta/classes/libc-common.bbclass
index 11b0065a6d..0e351b6746 100644
--- a/meta/classes/libc-common.bbclass
+++ b/meta/classes/libc-common.bbclass
@@ -1,9 +1,5 @@
do_install() {
oe_runmake install_root=${D} install
- for r in ${rpcsvc}; do
- h=`echo $r|sed -e's,\.x$,.h,'`
- install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
- done
install -Dm 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ld.so.conf
install -d ${D}${localedir}
make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
@@ -17,15 +13,15 @@ do_install() {
}
def get_libc_fpu_setting(bb, d):
- if d.getVar('TARGET_FPU', True) in [ 'soft', 'ppc-efd' ]:
+ if d.getVar('TARGET_FPU') in [ 'soft', 'ppc-efd' ]:
return "--without-fp"
return ""
python populate_packages_prepend () {
- if d.getVar('DEBIAN_NAMES', True):
- pkgs = d.getVar('PACKAGES', True).split()
- bpn = d.getVar('BPN', True)
- prefix = d.getVar('MLPREFIX', True) or ""
+ if d.getVar('DEBIAN_NAMES'):
+ pkgs = d.getVar('PACKAGES').split()
+ bpn = d.getVar('BPN')
+ prefix = d.getVar('MLPREFIX') or ""
# Set the base package...
d.setVar('PKG_' + prefix + bpn, prefix + 'libc6')
libcprefix = prefix + bpn + '-'
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 8c99d6113d..de816bcec1 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -9,25 +9,27 @@
GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice"
+GLIBC_SPLIT_LC_PACKAGES ?= "0"
+
python __anonymous () {
- enabled = d.getVar("ENABLE_BINARY_LOCALE_GENERATION", True)
+ enabled = d.getVar("ENABLE_BINARY_LOCALE_GENERATION")
- pn = d.getVar("PN", True)
+ pn = d.getVar("PN")
if pn.endswith("-initial"):
enabled = False
if enabled and int(enabled):
import re
- target_arch = d.getVar("TARGET_ARCH", True)
- binary_arches = d.getVar("BINARY_LOCALE_ARCHES", True) or ""
- use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", True) or ""
+ target_arch = d.getVar("TARGET_ARCH")
+ binary_arches = d.getVar("BINARY_LOCALE_ARCHES") or ""
+ use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF") or ""
for regexp in binary_arches.split(" "):
r = re.compile(regexp)
if r.match(target_arch):
- depends = d.getVar("DEPENDS", True)
+ depends = d.getVar("DEPENDS")
if use_cross_localedef == "1" :
depends = "%s cross-localedef-native" % depends
else:
@@ -35,25 +37,14 @@ python __anonymous () {
d.setVar("DEPENDS", depends)
d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile")
break
-
- # try to fix disable charsets/locales/locale-code compile fail
- if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \
- bb.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \
- bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d):
- d.setVar('PACKAGE_NO_GCONV', '0')
- else:
- d.setVar('PACKAGE_NO_GCONV', '1')
}
-OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
+# try to fix disable charsets/locales/locale-code compile fail
+PACKAGE_NO_GCONV ?= "0"
-locale_base_postinst() {
-#!/bin/sh
-
-if [ "x$D" != "x" ]; then
- exit 1
-fi
+OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
+locale_base_postinst_ontarget() {
localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s %s
}
@@ -73,9 +64,14 @@ do_prep_locale_tree() {
for i in $treedir/${datadir}/i18n/charmaps/*gz; do
gunzip $i
done
- tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir}
- if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then
- tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
+ # The extract pattern "./l*.so*" is carefully selected so that it will
+ # match ld*.so and lib*.so*, but not any files in the gconv directory
+ # (if it exists). This makes sure we only unpack the files we need.
+ # This is important in case usrmerge is set in DISTRO_FEATURES, which
+ # means ${base_libdir} == ${libdir}.
+ tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir} --wildcards './l*.so*'
+ if [ -f ${STAGING_LIBDIR_NATIVE}/libgcc_s.* ]; then
+ tar -cf - -C ${STAGING_LIBDIR_NATIVE} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
fi
install -m 0755 ${LOCALETREESRC}${bindir}/localedef $treedir/${base_bindir}
}
@@ -86,41 +82,44 @@ do_collect_bins_from_locale_tree() {
parent=$(dirname ${localedir})
mkdir -p ${PKGD}/$parent
tar -cf - -C $treedir/$parent -p $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent
+
+ # Finalize tree by chaning all duplicate files into hard links
+ cross-localedef-hardlink -c -v ${WORKDIR}/locale-tree
}
inherit qemu
python package_do_split_gconvs () {
import re
- if (d.getVar('PACKAGE_NO_GCONV', True) == '1'):
+ if (d.getVar('PACKAGE_NO_GCONV') == '1'):
bb.note("package requested not splitting gconvs")
return
- if not d.getVar('PACKAGES', True):
+ if not d.getVar('PACKAGES'):
return
- mlprefix = d.getVar("MLPREFIX", True) or ""
+ mlprefix = d.getVar("MLPREFIX") or ""
- bpn = d.getVar('BPN', True)
- libdir = d.getVar('libdir', True)
+ bpn = d.getVar('BPN')
+ libdir = d.getVar('libdir')
if not libdir:
bb.error("libdir not defined")
return
- datadir = d.getVar('datadir', True)
+ datadir = d.getVar('datadir')
if not datadir:
bb.error("datadir not defined")
return
- gconv_libdir = base_path_join(libdir, "gconv")
- charmap_dir = base_path_join(datadir, "i18n", "charmaps")
- locales_dir = base_path_join(datadir, "i18n", "locales")
- binary_locales_dir = d.getVar('localedir', True)
+ gconv_libdir = oe.path.join(libdir, "gconv")
+ charmap_dir = oe.path.join(datadir, "i18n", "charmaps")
+ locales_dir = oe.path.join(datadir, "i18n", "locales")
+ binary_locales_dir = d.getVar('localedir')
def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group):
deps = []
f = open(fn, "rb")
- c_re = re.compile('^copy "(.*)"')
- i_re = re.compile('^include "(\w+)".*')
+ c_re = re.compile(r'^copy "(.*)"')
+ i_re = re.compile(r'^include "(\w+)".*')
for l in f.readlines():
l = l.decode("latin-1")
m = c_re.match(l) or i_re.match(l)
@@ -134,15 +133,15 @@ python package_do_split_gconvs () {
if bpn != 'glibc':
d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'))
- do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern=bpn+'-gconv-%s', \
+ do_split_packages(d, gconv_libdir, file_regex=r'^(.*)\.so$', output_pattern=bpn+'-gconv-%s', \
description='gconv module for character set %s', hook=calc_gconv_deps, \
extra_depends=bpn+'-gconv')
def calc_charmap_deps(fn, pkg, file_regex, output_pattern, group):
deps = []
f = open(fn, "rb")
- c_re = re.compile('^copy "(.*)"')
- i_re = re.compile('^include "(\w+)".*')
+ c_re = re.compile(r'^copy "(.*)"')
+ i_re = re.compile(r'^include "(\w+)".*')
for l in f.readlines():
l = l.decode("latin-1")
m = c_re.match(l) or i_re.match(l)
@@ -156,14 +155,14 @@ python package_do_split_gconvs () {
if bpn != 'glibc':
d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'))
- do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern=bpn+'-charmap-%s', \
+ do_split_packages(d, charmap_dir, file_regex=r'^(.*)\.gz$', output_pattern=bpn+'-charmap-%s', \
description='character map for %s encoding', hook=calc_charmap_deps, extra_depends='')
def calc_locale_deps(fn, pkg, file_regex, output_pattern, group):
deps = []
f = open(fn, "rb")
- c_re = re.compile('^copy "(.*)"')
- i_re = re.compile('^include "(\w+)".*')
+ c_re = re.compile(r'^copy "(.*)"')
+ i_re = re.compile(r'^include "(\w+)".*')
for l in f.readlines():
l = l.decode("latin-1")
m = c_re.match(l) or i_re.match(l)
@@ -177,17 +176,17 @@ python package_do_split_gconvs () {
if bpn != 'glibc':
d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'))
- do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern=bpn+'-localedata-%s', \
+ do_split_packages(d, locales_dir, file_regex=r'(.*)', output_pattern=bpn+'-localedata-%s', \
description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
d.setVar('PACKAGES', d.getVar('PACKAGES', False) + ' ' + d.getVar('MLPREFIX', False) + bpn + '-gconv')
- use_bin = d.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", True)
+ use_bin = d.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE")
- dot_re = re.compile("(.*)\.(.*)")
+ dot_re = re.compile(r"(.*)\.(.*)")
# Read in supported locales and associated encodings
supported = {}
- with open(base_path_join(d.getVar('WORKDIR', True), "SUPPORTED")) as f:
+ with open(oe.path.join(d.getVar('WORKDIR'), "SUPPORTED")) as f:
for line in f.readlines():
try:
locale, charset = line.rstrip().split()
@@ -196,7 +195,7 @@ python package_do_split_gconvs () {
supported[locale] = charset
# GLIBC_GENERATE_LOCALES var specifies which locales to be generated. empty or "all" means all locales
- to_generate = d.getVar('GLIBC_GENERATE_LOCALES', True)
+ to_generate = d.getVar('GLIBC_GENERATE_LOCALES')
if not to_generate or to_generate == 'all':
to_generate = sorted(supported.keys())
else:
@@ -213,34 +212,35 @@ python package_do_split_gconvs () {
def output_locale_source(name, pkgname, locale, encoding):
d.setVar('RDEPENDS_%s' % pkgname, '%slocaledef %s-localedata-%s %s-charmap-%s' % \
(mlprefix, mlprefix+bpn, legitimize_package_name(locale), mlprefix+bpn, legitimize_package_name(encoding)))
- d.setVar('pkg_postinst_%s' % pkgname, d.getVar('locale_base_postinst', True) \
+ d.setVar('pkg_postinst_ontarget_%s' % pkgname, d.getVar('locale_base_postinst_ontarget') \
% (locale, encoding, locale))
- d.setVar('pkg_postrm_%s' % pkgname, d.getVar('locale_base_postrm', True) % \
+ d.setVar('pkg_postrm_%s' % pkgname, d.getVar('locale_base_postrm') % \
(locale, encoding, locale))
def output_locale_binary_rdepends(name, pkgname, locale, encoding):
- m = re.match("(.*)\.(.*)", name)
- if m:
- libc_name = "%s.%s" % (m.group(1), m.group(2).lower())
- else:
- libc_name = name
- d.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
- % (mlprefix+bpn, libc_name)))
+ dep = legitimize_package_name('%s-binary-localedata-%s' % (bpn, name))
+ lcsplit = d.getVar('GLIBC_SPLIT_LC_PACKAGES')
+ if lcsplit and int(lcsplit):
+ d.appendVar('PACKAGES', ' ' + dep)
+ d.setVar('ALLOW_EMPTY_%s' % dep, '1')
+ d.setVar('RDEPENDS_%s' % pkgname, mlprefix + dep)
commands = {}
def output_locale_binary(name, pkgname, locale, encoding):
- treedir = base_path_join(d.getVar("WORKDIR", True), "locale-tree")
- ldlibdir = base_path_join(treedir, d.getVar("base_libdir", True))
- path = d.getVar("PATH", True)
- i18npath = base_path_join(treedir, datadir, "i18n")
- gconvpath = base_path_join(treedir, "iconvdata")
- outputpath = base_path_join(treedir, binary_locales_dir)
-
- use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", True) or "0"
+ treedir = oe.path.join(d.getVar("WORKDIR"), "locale-tree")
+ ldlibdir = oe.path.join(treedir, d.getVar("base_libdir"))
+ path = d.getVar("PATH")
+ i18npath = oe.path.join(treedir, datadir, "i18n")
+ gconvpath = oe.path.join(treedir, "iconvdata")
+ outputpath = oe.path.join(treedir, binary_locales_dir)
+
+ use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF") or "0"
if use_cross_localedef == "1":
- target_arch = d.getVar('TARGET_ARCH', True)
+ target_arch = d.getVar('TARGET_ARCH')
locale_arch_options = { \
+ "arc": " --uint32-align=4 --little-endian ", \
+ "arceb": " --uint32-align=4 --big-endian ", \
"arm": " --uint32-align=4 --little-endian ", \
"armeb": " --uint32-align=4 --big-endian ", \
"aarch64": " --uint32-align=4 --little-endian ", \
@@ -249,9 +249,15 @@ python package_do_split_gconvs () {
"powerpc": " --uint32-align=4 --big-endian ", \
"powerpc64": " --uint32-align=4 --big-endian ", \
"mips": " --uint32-align=4 --big-endian ", \
+ "mipsisa32r6": " --uint32-align=4 --big-endian ", \
"mips64": " --uint32-align=4 --big-endian ", \
+ "mipsisa64r6": " --uint32-align=4 --big-endian ", \
"mipsel": " --uint32-align=4 --little-endian ", \
+ "mipsisa32r6el": " --uint32-align=4 --little-endian ", \
"mips64el":" --uint32-align=4 --little-endian ", \
+ "mipsisa64r6el":" --uint32-align=4 --little-endian ", \
+ "riscv64": " --uint32-align=4 --little-endian ", \
+ "riscv32": " --uint32-align=4 --little-endian ", \
"i586": " --uint32-align=4 --little-endian ", \
"i686": " --uint32-align=4 --little-endian ", \
"x86_64": " --uint32-align=4 --little-endian " }
@@ -260,9 +266,9 @@ python package_do_split_gconvs () {
localedef_opts = locale_arch_options[target_arch]
else:
bb.error("locale_arch_options not found for target_arch=" + target_arch)
- raise bb.build.FuncFailed("unknown arch:" + target_arch + " for locale_arch_options")
+ bb.fatal("unknown arch:" + target_arch + " for locale_arch_options")
- localedef_opts += " --force --no-archive --prefix=%s \
+ localedef_opts += " --force --no-hard-links --no-archive --prefix=%s \
--inputfile=%s/%s/i18n/locales/%s --charmap=%s %s/%s" \
% (treedir, treedir, datadir, locale, encoding, outputpath, name)
@@ -270,14 +276,14 @@ python package_do_split_gconvs () {
(path, i18npath, gconvpath, localedef_opts)
else: # earlier slower qemu way
qemu = qemu_target_binary(d)
- localedef_opts = "--force --no-archive --prefix=%s \
+ localedef_opts = "--force --no-hard-links --no-archive --prefix=%s \
--inputfile=%s/i18n/locales/%s --charmap=%s %s" \
% (treedir, datadir, locale, encoding, name)
- qemu_options = d.getVar('QEMU_OPTIONS', True)
+ qemu_options = d.getVar('QEMU_OPTIONS')
cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \
- -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \
+ -E LD_LIBRARY_PATH=%s %s %s${base_bindir}/localedef %s" % \
(path, i18npath, qemu, treedir, ldlibdir, qemu_options, treedir, localedef_opts)
commands["%s/%s" % (outputpath, name)] = cmd
@@ -287,9 +293,9 @@ python package_do_split_gconvs () {
def output_locale(name, locale, encoding):
pkgname = d.getVar('MLPREFIX', False) + 'locale-base-' + legitimize_package_name(name)
d.setVar('ALLOW_EMPTY_%s' % pkgname, '1')
- d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES', True)))
+ d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES')))
rprovides = ' %svirtual-locale-%s' % (mlprefix, legitimize_package_name(name))
- m = re.match("(.*)_(.*)", name)
+ m = re.match(r"(.*)_(.*)", name)
if m:
rprovides += ' %svirtual-locale-%s' % (mlprefix, m.group(1))
d.setVar('RPROVIDES_%s' % pkgname, rprovides)
@@ -306,8 +312,8 @@ python package_do_split_gconvs () {
bb.note("preparing tree for binary locale generation")
bb.build.exec_func("do_prep_locale_tree", d)
- utf8_only = int(d.getVar('LOCALE_UTF8_ONLY', True) or 0)
- utf8_is_default = int(d.getVar('LOCALE_UTF8_IS_DEFAULT', True) or 0)
+ utf8_only = int(d.getVar('LOCALE_UTF8_ONLY') or 0)
+ utf8_is_default = int(d.getVar('LOCALE_UTF8_IS_DEFAULT') or 0)
encodings = {}
for locale in to_generate:
@@ -333,26 +339,38 @@ python package_do_split_gconvs () {
else:
output_locale('%s.%s' % (base, charset), base, charset)
+ def metapkg_hook(file, pkg, pattern, format, basename):
+ name = basename.split('/', 1)[0]
+ metapkg = legitimize_package_name('%s-binary-localedata-%s' % (mlprefix+bpn, name))
+ d.appendVar('RDEPENDS_%s' % metapkg, ' ' + pkg)
+
if use_bin == "compile":
- makefile = base_path_join(d.getVar("WORKDIR", True), "locale-tree", "Makefile")
- m = open(makefile, "w")
- m.write("all: %s\n\n" % " ".join(commands.keys()))
- for cmd in commands:
- m.write(cmd + ":\n")
- m.write("\t" + commands[cmd] + "\n\n")
- m.close()
+ makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
+ with open(makefile, "w") as m:
+ m.write("all: %s\n\n" % " ".join(commands.keys()))
+ total = len(commands)
+ for i, (maketarget, makerecipe) in enumerate(commands.items()):
+ m.write(maketarget + ":\n")
+ m.write("\t@echo 'Progress %d/%d'\n" % (i, total))
+ m.write("\t" + makerecipe + "\n\n")
d.setVar("EXTRA_OEMAKE", "-C %s ${PARALLEL_MAKE}" % (os.path.dirname(makefile)))
+ d.setVarFlag("oe_runmake", "progress", "outof:Progress\s(\d+)/(\d+)")
bb.note("Executing binary locale generation makefile")
bb.build.exec_func("oe_runmake", d)
bb.note("collecting binary locales from locale tree")
bb.build.exec_func("do_collect_bins_from_locale_tree", d)
- do_split_packages(d, binary_locales_dir, file_regex='(.*)', \
- output_pattern=bpn+'-binary-localedata-%s', \
- description='binary locale definition for %s', extra_depends='', allow_dirs=True)
- elif use_bin == "precompiled":
- do_split_packages(d, binary_locales_dir, file_regex='(.*)', \
- output_pattern=bpn+'-binary-localedata-%s', \
- description='binary locale definition for %s', extra_depends='', allow_dirs=True)
+
+ if use_bin in ('compile', 'precompiled'):
+ lcsplit = d.getVar('GLIBC_SPLIT_LC_PACKAGES')
+ if lcsplit and int(lcsplit):
+ do_split_packages(d, binary_locales_dir, file_regex=r'^(.*/LC_\w+)', \
+ output_pattern=bpn+'-binary-localedata-%s', \
+ description='binary locale definition for %s', recursive=True,
+ hook=metapkg_hook, extra_depends='', allow_dirs=True, match_path=True)
+ else:
+ do_split_packages(d, binary_locales_dir, file_regex=r'(.*)', \
+ output_pattern=bpn+'-binary-localedata-%s', \
+ description='binary locale definition for %s', extra_depends='', allow_dirs=True)
else:
bb.note("generation of binary locales disabled. this may break i18n!")
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index ad12db4838..f90176d6c0 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -16,278 +16,6 @@ addtask populate_lic after do_patch before do_build
do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}"
do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
-python write_package_manifest() {
- # Get list of installed packages
- license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}')
- bb.utils.mkdirhier(license_image_dir)
- from oe.rootfs import image_list_installed_packages
- from oe.utils import format_pkg_list
-
- pkgs = image_list_installed_packages(d)
- output = format_pkg_list(pkgs)
- open(os.path.join(license_image_dir, 'package.manifest'),
- 'w+').write(output)
-}
-
-python write_deploy_manifest() {
- license_deployed_manifest(d)
-}
-
-python license_create_manifest() {
- import oe.packagedata
- from oe.rootfs import image_list_installed_packages
-
- build_images_from_feeds = d.getVar('BUILD_IMAGES_FROM_FEEDS', True)
- if build_images_from_feeds == "1":
- return 0
-
- pkg_dic = {}
- for pkg in sorted(image_list_installed_packages(d)):
- pkg_info = os.path.join(d.getVar('PKGDATA_DIR', True),
- 'runtime-reverse', pkg)
- pkg_name = os.path.basename(os.readlink(pkg_info))
-
- pkg_dic[pkg_name] = oe.packagedata.read_pkgdatafile(pkg_info)
- if not "LICENSE" in pkg_dic[pkg_name].keys():
- pkg_lic_name = "LICENSE_" + pkg_name
- pkg_dic[pkg_name]["LICENSE"] = pkg_dic[pkg_name][pkg_lic_name]
-
- rootfs_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
- d.getVar('IMAGE_NAME', True), 'license.manifest')
- write_license_files(d, rootfs_license_manifest, pkg_dic)
-}
-
-def write_license_files(d, license_manifest, pkg_dic):
- import re
-
- bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE", True) or "").split()
- bad_licenses = map(lambda l: canonical_license(d, l), bad_licenses)
- bad_licenses = expand_wildcard_licenses(d, bad_licenses)
-
- with open(license_manifest, "w") as license_file:
- for pkg in sorted(pkg_dic):
- if bad_licenses:
- try:
- (pkg_dic[pkg]["LICENSE"], pkg_dic[pkg]["LICENSES"]) = \
- oe.license.manifest_licenses(pkg_dic[pkg]["LICENSE"],
- bad_licenses, canonical_license, d)
- except oe.license.LicenseError as exc:
- bb.fatal('%s: %s' % (d.getVar('P', True), exc))
- else:
- pkg_dic[pkg]["LICENSES"] = re.sub('[|&()*]', ' ', pkg_dic[pkg]["LICENSE"])
- pkg_dic[pkg]["LICENSES"] = re.sub(' *', ' ', pkg_dic[pkg]["LICENSES"])
- pkg_dic[pkg]["LICENSES"] = pkg_dic[pkg]["LICENSES"].split()
-
- if not "IMAGE_MANIFEST" in pkg_dic[pkg]:
- # Rootfs manifest
- license_file.write("PACKAGE NAME: %s\n" % pkg)
- license_file.write("PACKAGE VERSION: %s\n" % pkg_dic[pkg]["PV"])
- license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"])
- license_file.write("LICENSE: %s\n\n" % pkg_dic[pkg]["LICENSE"])
-
- # If the package doesn't contain any file, that is, its size is 0, the license
- # isn't relevant as far as the final image is concerned. So doing license check
- # doesn't make much sense, skip it.
- if pkg_dic[pkg]["PKGSIZE_%s" % pkg] == "0":
- continue
- else:
- # Image manifest
- license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"])
- license_file.write("VERSION: %s\n" % pkg_dic[pkg]["PV"])
- license_file.write("LICENSE: %s\n" % pkg_dic[pkg]["LICENSE"])
- license_file.write("FILES: %s\n\n" % pkg_dic[pkg]["FILES"])
-
- for lic in pkg_dic[pkg]["LICENSES"]:
- lic_file = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
- pkg_dic[pkg]["PN"], "generic_%s" %
- re.sub('\+', '', lic))
- # add explicity avoid of CLOSED license because isn't generic
- if lic == "CLOSED":
- continue
-
- if not os.path.exists(lic_file):
- bb.warn("The license listed %s was not in the "\
- "licenses collected for recipe %s"
- % (lic, pkg_dic[pkg]["PN"]))
-
- # Two options here:
- # - Just copy the manifest
- # - Copy the manifest and the license directories
- # With both options set we see a .5 M increase in core-image-minimal
- copy_lic_manifest = d.getVar('COPY_LIC_MANIFEST', True)
- copy_lic_dirs = d.getVar('COPY_LIC_DIRS', True)
- if copy_lic_manifest == "1":
- rootfs_license_dir = os.path.join(d.getVar('IMAGE_ROOTFS', 'True'),
- 'usr', 'share', 'common-licenses')
- bb.utils.mkdirhier(rootfs_license_dir)
- rootfs_license_manifest = os.path.join(rootfs_license_dir,
- os.path.split(license_manifest)[1])
- if not os.path.exists(rootfs_license_manifest):
- os.link(license_manifest, rootfs_license_manifest)
-
- if copy_lic_dirs == "1":
- for pkg in sorted(pkg_dic):
- pkg_rootfs_license_dir = os.path.join(rootfs_license_dir, pkg)
- bb.utils.mkdirhier(pkg_rootfs_license_dir)
- pkg_license_dir = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
- pkg_dic[pkg]["PN"])
- licenses = os.listdir(pkg_license_dir)
- for lic in licenses:
- rootfs_license = os.path.join(rootfs_license_dir, lic)
- pkg_license = os.path.join(pkg_license_dir, lic)
- pkg_rootfs_license = os.path.join(pkg_rootfs_license_dir, lic)
-
- if re.match("^generic_.*$", lic):
- generic_lic = re.search("^generic_(.*)$", lic).group(1)
- if oe.license.license_ok(canonical_license(d,
- generic_lic), bad_licenses) == False:
- continue
-
- if not os.path.exists(rootfs_license):
- os.link(pkg_license, rootfs_license)
-
- if not os.path.exists(pkg_rootfs_license):
- os.symlink(os.path.join('..', lic), pkg_rootfs_license)
- else:
- if (oe.license.license_ok(canonical_license(d,
- lic), bad_licenses) == False or
- os.path.exists(pkg_rootfs_license)):
- continue
-
- os.link(pkg_license, pkg_rootfs_license)
-
-
-def license_deployed_manifest(d):
- """
- Write the license manifest for the deployed recipes.
- The deployed recipes usually includes the bootloader
- and extra files to boot the target.
- """
-
- dep_dic = {}
- man_dic = {}
- lic_dir = d.getVar("LICENSE_DIRECTORY", True)
-
- dep_dic = get_deployed_dependencies(d)
- for dep in dep_dic.keys():
- man_dic[dep] = {}
- # It is necessary to mark this will be used for image manifest
- man_dic[dep]["IMAGE_MANIFEST"] = True
- man_dic[dep]["PN"] = dep
- man_dic[dep]["FILES"] = \
- " ".join(get_deployed_files(dep_dic[dep]))
- with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f:
- for line in f.readlines():
- key,val = line.split(": ", 1)
- man_dic[dep][key] = val[:-1]
-
- lic_manifest_dir = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
- d.getVar('IMAGE_NAME', True))
- bb.utils.mkdirhier(lic_manifest_dir)
- image_license_manifest = os.path.join(lic_manifest_dir, 'image_license.manifest')
- write_license_files(d, image_license_manifest, man_dic)
-
-def get_deployed_dependencies(d):
- """
- Get all the deployed dependencies of an image
- """
-
- deploy = {}
- # Get all the dependencies for the current task (rootfs).
- # Also get EXTRA_IMAGEDEPENDS because the bootloader is
- # usually in this var and not listed in rootfs.
- # At last, get the dependencies from boot classes because
- # it might contain the bootloader.
- taskdata = d.getVar("BB_TASKDEPDATA", False)
- depends = list(set([dep[0] for dep
- in list(taskdata.values())
- if not dep[0].endswith("-native")]))
- extra_depends = d.getVar("EXTRA_IMAGEDEPENDS", True)
- boot_depends = get_boot_dependencies(d)
- depends.extend(extra_depends.split())
- depends.extend(boot_depends)
- depends = list(set(depends))
-
- # To verify what was deployed it checks the rootfs dependencies against
- # the SSTATE_MANIFESTS for "deploy" task.
- # The manifest file name contains the arch. Because we are not running
- # in the recipe context it is necessary to check every arch used.
- sstate_manifest_dir = d.getVar("SSTATE_MANIFESTS", True)
- sstate_archs = d.getVar("SSTATE_ARCHS", True)
- extra_archs = d.getVar("PACKAGE_EXTRA_ARCHS", True)
- archs = list(set(("%s %s" % (sstate_archs, extra_archs)).split()))
- for dep in depends:
- # Some recipes have an arch on their own, so we try that first.
- special_arch = d.getVar("PACKAGE_ARCH_pn-%s" % dep, True)
- if special_arch:
- sstate_manifest_file = os.path.join(sstate_manifest_dir,
- "manifest-%s-%s.deploy" % (special_arch, dep))
- if os.path.exists(sstate_manifest_file):
- deploy[dep] = sstate_manifest_file
- continue
-
- for arch in archs:
- sstate_manifest_file = os.path.join(sstate_manifest_dir,
- "manifest-%s-%s.deploy" % (arch, dep))
- if os.path.exists(sstate_manifest_file):
- deploy[dep] = sstate_manifest_file
- break
-
- return deploy
-get_deployed_dependencies[vardepsexclude] = "BB_TASKDEPDATA"
-
-def get_boot_dependencies(d):
- """
- Return the dependencies from boot tasks
- """
-
- depends = []
- boot_depends_string = ""
- taskdepdata = d.getVar("BB_TASKDEPDATA", False)
- # Only bootimg and bootdirectdisk include the depends flag
- boot_tasks = ["do_bootimg", "do_bootdirectdisk",]
-
- for task in boot_tasks:
- boot_depends_string = "%s %s" % (boot_depends_string,
- d.getVarFlag(task, "depends", True) or "")
- boot_depends = [dep.split(":")[0] for dep
- in boot_depends_string.split()
- if not dep.split(":")[0].endswith("-native")]
- for dep in boot_depends:
- info_file = os.path.join(d.getVar("LICENSE_DIRECTORY", True),
- dep, "recipeinfo")
- # If the recipe and dependency name is the same
- if os.path.exists(info_file):
- depends.append(dep)
- # We need to search for the provider of the dependency
- else:
- for taskdep in taskdepdata.values():
- # The fifth field contains what the task provides
- if dep in taskdep[4]:
- info_file = os.path.join(
- d.getVar("LICENSE_DIRECTORY", True),
- taskdep[0], "recipeinfo")
- if os.path.exists(info_file):
- depends.append(taskdep[0])
- break
- return depends
-get_boot_dependencies[vardepsexclude] = "BB_TASKDEPDATA"
-
-def get_deployed_files(man_file):
- """
- Get the files deployed from the sstate manifest
- """
-
- dep_files = []
- excluded_files = ["README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt"]
- with open(man_file, "r") as manifest:
- all_files = manifest.read()
- for f in all_files.splitlines():
- if ((not (os.path.islink(f) or os.path.isdir(f))) and
- not os.path.basename(f) in excluded_files):
- dep_files.append(os.path.basename(f))
- return dep_files
-
python do_populate_lic() {
"""
Populate LICENSE_DIRECTORY with licenses.
@@ -295,7 +23,7 @@ python do_populate_lic() {
lic_files_paths = find_license_files(d)
# The base directory we wrangle licenses to
- destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
+ destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('PN'))
copy_license_files(lic_files_paths, destdir)
info = get_recipe_info(d)
with open(os.path.join(destdir, "recipeinfo"), "w") as f:
@@ -306,11 +34,11 @@ python do_populate_lic() {
# it would be better to copy them in do_install_append, but find_license_filesa is python
python perform_packagecopy_prepend () {
enabled = oe.data.typed_value('LICENSE_CREATE_PACKAGE', d)
- if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled:
+ if d.getVar('CLASSOVERRIDE') == 'class-target' and enabled:
lic_files_paths = find_license_files(d)
# LICENSE_FILES_DIRECTORY starts with '/' so os.path.join cannot be used to join D and LICENSE_FILES_DIRECTORY
- destdir = d.getVar('D', True) + os.path.join(d.getVar('LICENSE_FILES_DIRECTORY', True), d.getVar('PN', True))
+ destdir = d.getVar('D') + os.path.join(d.getVar('LICENSE_FILES_DIRECTORY'), d.getVar('PN'))
copy_license_files(lic_files_paths, destdir)
add_package_and_files(d)
}
@@ -318,23 +46,26 @@ perform_packagecopy[vardeps] += "LICENSE_CREATE_PACKAGE"
def get_recipe_info(d):
info = {}
- info["PV"] = d.getVar("PV", True)
- info["PR"] = d.getVar("PR", True)
- info["LICENSE"] = d.getVar("LICENSE", True)
+ info["PV"] = d.getVar("PV")
+ info["PR"] = d.getVar("PR")
+ info["LICENSE"] = d.getVar("LICENSE")
return info
def add_package_and_files(d):
- packages = d.getVar('PACKAGES', True)
- files = d.getVar('LICENSE_FILES_DIRECTORY', True)
- pn = d.getVar('PN', True)
+ packages = d.getVar('PACKAGES')
+ files = d.getVar('LICENSE_FILES_DIRECTORY')
+ pn = d.getVar('PN')
pn_lic = "%s%s" % (pn, d.getVar('LICENSE_PACKAGE_SUFFIX', False))
- if pn_lic in packages:
+ if pn_lic in packages.split():
bb.warn("%s package already existed in %s." % (pn_lic, pn))
else:
# first in PACKAGES to be sure that nothing else gets LICENSE_FILES_DIRECTORY
d.setVar('PACKAGES', "%s %s" % (pn_lic, packages))
d.setVar('FILES_' + pn_lic, files)
- rrecommends_pn = d.getVar('RRECOMMENDS_' + pn, True)
+ for pn in packages.split():
+ if pn == pn_lic:
+ continue
+ rrecommends_pn = d.getVar('RRECOMMENDS_' + pn)
if rrecommends_pn:
d.setVar('RRECOMMENDS_' + pn, "%s %s" % (pn_lic, rrecommends_pn))
else:
@@ -345,13 +76,15 @@ def copy_license_files(lic_files_paths, destdir):
import errno
bb.utils.mkdirhier(destdir)
- for (basename, path) in lic_files_paths:
+ for (basename, path, beginline, endline) in lic_files_paths:
try:
src = path
dst = os.path.join(destdir, basename)
if os.path.exists(dst):
os.remove(dst)
- canlink = os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev)
+ if os.path.islink(src):
+ src = os.path.realpath(src)
+ canlink = os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev) and beginline is None and endline is None
if canlink:
try:
os.link(src, dst)
@@ -362,20 +95,19 @@ def copy_license_files(lic_files_paths, destdir):
canlink = False
else:
raise
- try:
- if canlink:
- os.chown(dst,0,0)
- except OSError as err:
- if err.errno in (errno.EPERM, errno.EINVAL):
- # Suppress "Operation not permitted" error, as
- # sometimes this function is not executed under pseudo.
- # Also ignore "Invalid argument" errors that happen in
- # some (unprivileged) container environments (no root).
- pass
- else:
- raise
+ # Only chown if we did hardling, and, we're running under pseudo
+ if canlink and os.environ.get('PSEUDO_DISABLED') == '0':
+ os.chown(dst,0,0)
if not canlink:
- shutil.copyfile(src, dst)
+ begin_idx = int(beginline)-1 if beginline is not None else None
+ end_idx = int(endline) if endline is not None else None
+ if begin_idx is None and end_idx is None:
+ shutil.copyfile(src, dst)
+ else:
+ with open(src, 'rb') as src_f:
+ with open(dst, 'wb') as dst_f:
+ dst_f.write(b''.join(src_f.readlines()[begin_idx:end_idx]))
+
except Exception as e:
bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e))
@@ -388,20 +120,22 @@ def find_license_files(d):
from collections import defaultdict, OrderedDict
# All the license files for the package
- lic_files = d.getVar('LIC_FILES_CHKSUM', True)
- pn = d.getVar('PN', True)
+ lic_files = d.getVar('LIC_FILES_CHKSUM') or ""
+ pn = d.getVar('PN')
# The license files are located in S/LIC_FILE_CHECKSUM.
- srcdir = d.getVar('S', True)
+ srcdir = d.getVar('S')
# Directory we store the generic licenses as set in the distro configuration
- generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
+ generic_directory = d.getVar('COMMON_LICENSE_DIR')
# List of basename, path tuples
lic_files_paths = []
+ # hash for keep track generic lics mappings
+ non_generic_lics = {}
# Entries from LIC_FILES_CHKSUM
lic_chksums = {}
license_source_dirs = []
license_source_dirs.append(generic_directory)
try:
- additional_lic_dirs = d.getVar('LICENSE_PATH', True).split()
+ additional_lic_dirs = d.getVar('LICENSE_PATH').split()
for lic_dir in additional_lic_dirs:
license_source_dirs.append(lic_dir)
except:
@@ -429,10 +163,10 @@ def find_license_files(d):
# unless NO_GENERIC_LICENSE is set.
for lic_dir in license_source_dirs:
if not os.path.isfile(os.path.join(lic_dir, license_type)):
- if d.getVarFlag('SPDXLICENSEMAP', license_type, True) != None:
+ if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
# Great, there is an SPDXLICENSEMAP. We can copy!
bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type))
- spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type, True)
+ spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
license_source = lic_dir
break
elif os.path.isfile(os.path.join(lic_dir, license_type)):
@@ -440,23 +174,25 @@ def find_license_files(d):
license_source = lic_dir
break
- non_generic_lic = d.getVarFlag('NO_GENERIC_LICENSE', license_type, True)
+ non_generic_lic = d.getVarFlag('NO_GENERIC_LICENSE', license_type)
if spdx_generic and license_source:
# we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest
# audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes)
- lic_files_paths.append(("generic_" + license_type, os.path.join(license_source, spdx_generic)))
+ lic_files_paths.append(("generic_" + license_type, os.path.join(license_source, spdx_generic),
+ None, None))
# The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense
# and should not be allowed, warn the user in this case.
- if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True):
+ if d.getVarFlag('NO_GENERIC_LICENSE', license_type):
bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type))
elif non_generic_lic and non_generic_lic in lic_chksums:
# if NO_GENERIC_LICENSE is set, we copy the license files from the fetched source
# of the package rather than the license_source_dirs.
lic_files_paths.append(("generic_" + license_type,
- os.path.join(srcdir, non_generic_lic)))
+ os.path.join(srcdir, non_generic_lic), None, None))
+ non_generic_lics[non_generic_lic] = license_type
else:
# Add explicity avoid of CLOSED license because this isn't generic
if license_type != 'CLOSED':
@@ -465,43 +201,44 @@ def find_license_files(d):
pass
if not generic_directory:
- raise bb.build.FuncFailed("COMMON_LICENSE_DIR is unset. Please set this in your distro config")
-
- if not lic_files:
- # No recipe should have an invalid license file. This is checked else
- # where, but let's be pedantic
- bb.note(pn + ": Recipe file does not have license file information.")
- return lic_files_paths
+ bb.fatal("COMMON_LICENSE_DIR is unset. Please set this in your distro config")
for url in lic_files.split():
try:
- (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
+ (method, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
+ if method != "file" or not path:
+ raise bb.fetch.MalformedUrl()
except bb.fetch.MalformedUrl:
- raise bb.build.FuncFailed("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF', True), url))
+ bb.fatal("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF'), url))
# We want the license filename and path
- chksum = parm['md5'] if 'md5' in parm else parm['sha256']
- lic_chksums[path] = chksum
+ chksum = parm.get('md5', None)
+ beginline = parm.get('beginline')
+ endline = parm.get('endline')
+ lic_chksums[path] = (chksum, beginline, endline)
v = FindVisitor()
try:
- v.visit_string(d.getVar('LICENSE', True))
+ v.visit_string(d.getVar('LICENSE'))
except oe.license.InvalidLicense as exc:
- bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
+ bb.fatal('%s: %s' % (d.getVar('PF'), exc))
except SyntaxError:
- bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True)))
-
+ bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF')))
# Add files from LIC_FILES_CHKSUM to list of license files
lic_chksum_paths = defaultdict(OrderedDict)
- for path, chksum in lic_chksums.items():
- lic_chksum_paths[os.path.basename(path)][chksum] = os.path.join(srcdir, path)
+ for path, data in sorted(lic_chksums.items()):
+ lic_chksum_paths[os.path.basename(path)][data] = (os.path.join(srcdir, path), data[1], data[2])
for basename, files in lic_chksum_paths.items():
if len(files) == 1:
- lic_files_paths.append((basename, list(files.values())[0]))
+ # Don't copy again a LICENSE already handled as non-generic
+ if basename in non_generic_lics:
+ continue
+ data = list(files.values())[0]
+ lic_files_paths.append(tuple([basename] + list(data)))
else:
# If there are multiple different license files with identical
# basenames we rename them to <file>.0, <file>.1, ...
- for i, path in enumerate(files.values()):
- lic_files_paths.append(("%s.%d" % (basename, i), path))
+ for i, data in enumerate(files.values()):
+ lic_files_paths.append(tuple(["%s.%d" % (basename, i)] + list(data)))
return lic_files_paths
@@ -509,35 +246,54 @@ def return_spdx(d, license):
"""
This function returns the spdx mapping of a license if it exists.
"""
- return d.getVarFlag('SPDXLICENSEMAP', license, True)
+ return d.getVarFlag('SPDXLICENSEMAP', license)
def canonical_license(d, license):
"""
Return the canonical (SPDX) form of the license if available (so GPLv3
becomes GPL-3.0), for the license named 'X+', return canonical form of
- 'X' if availabel and the tailing '+' (so GPLv3+ becomes GPL-3.0+),
+ 'X' if available and the tailing '+' (so GPLv3+ becomes GPL-3.0+),
or the passed license if there is no canonical form.
"""
- lic = d.getVarFlag('SPDXLICENSEMAP', license, True) or ""
+ lic = d.getVarFlag('SPDXLICENSEMAP', license) or ""
if not lic and license.endswith('+'):
- lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+'), True)
+ lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+'))
if lic:
lic += '+'
return lic or license
+def available_licenses(d):
+ """
+ Return the available licenses by searching the directories specified by
+ COMMON_LICENSE_DIR and LICENSE_PATH.
+ """
+ lic_dirs = ((d.getVar('COMMON_LICENSE_DIR') or '') + ' ' +
+ (d.getVar('LICENSE_PATH') or '')).split()
+
+ licenses = []
+ for lic_dir in lic_dirs:
+ licenses += os.listdir(lic_dir)
+
+ licenses = sorted(licenses)
+ return licenses
+
+# Only determine the list of all available licenses once. This assumes that any
+# additions to LICENSE_PATH have been done before this file is parsed.
+AVAILABLE_LICENSES := "${@' '.join(available_licenses(d))}"
+
def expand_wildcard_licenses(d, wildcard_licenses):
"""
- Return actual spdx format license names if wildcard used. We expand
- wildcards from SPDXLICENSEMAP flags and SRC_DISTRIBUTE_LICENSES values.
+ Return actual spdx format license names if wildcards are used. We expand
+ wildcards from SPDXLICENSEMAP flags and AVAILABLE_LICENSES.
"""
import fnmatch
- licenses = []
+ licenses = wildcard_licenses[:]
spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
for wld_lic in wildcard_licenses:
spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
- licenses += [d.getVarFlag('SPDXLICENSEMAP', flag, True) for flag in spdxflags]
+ licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
- spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split()
+ spdx_lics = d.getVar('AVAILABLE_LICENSES').split()
for wld_lic in wildcard_licenses:
licenses += fnmatch.filter(spdx_lics, wld_lic)
@@ -546,10 +302,30 @@ def expand_wildcard_licenses(d, wildcard_licenses):
def incompatible_license_contains(license, truevalue, falsevalue, d):
license = canonical_license(d, license)
- bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split()
+ bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE') or "").split()
bad_licenses = expand_wildcard_licenses(d, bad_licenses)
return truevalue if license in bad_licenses else falsevalue
+def incompatible_pkg_license(d, dont_want_licenses, license):
+ # Handles an "or" or two license sets provided by
+ # flattened_licenses(), pick one that works if possible.
+ def choose_lic_set(a, b):
+ return a if all(oe.license.license_ok(canonical_license(d, lic),
+ dont_want_licenses) for lic in a) else b
+
+ try:
+ licenses = oe.license.flattened_licenses(license, choose_lic_set)
+ except oe.license.LicenseError as exc:
+ bb.fatal('%s: %s' % (d.getVar('P'), exc))
+
+ incompatible_lic = []
+ for l in licenses:
+ license = canonical_license(d, l)
+ if not oe.license.license_ok(license, dont_want_licenses):
+ incompatible_lic.append(license)
+
+ return sorted(incompatible_lic)
+
def incompatible_license(d, dont_want_licenses, package=None):
"""
This function checks if a recipe has only incompatible licenses. It also
@@ -557,30 +333,19 @@ def incompatible_license(d, dont_want_licenses, package=None):
as canonical (SPDX) names.
"""
import oe.license
- license = d.getVar("LICENSE_%s" % package, True) if package else None
+ license = d.getVar("LICENSE_%s" % package) if package else None
if not license:
- license = d.getVar('LICENSE', True)
+ license = d.getVar('LICENSE')
- # Handles an "or" or two license sets provided by
- # flattened_licenses(), pick one that works if possible.
- def choose_lic_set(a, b):
- return a if all(oe.license.license_ok(canonical_license(d, lic),
- dont_want_licenses) for lic in a) else b
-
- try:
- licenses = oe.license.flattened_licenses(license, choose_lic_set)
- except oe.license.LicenseError as exc:
- bb.fatal('%s: %s' % (d.getVar('P', True), exc))
- return any(not oe.license.license_ok(canonical_license(d, l), \
- dont_want_licenses) for l in licenses)
+ return incompatible_pkg_license(d, dont_want_licenses, license)
def check_license_flags(d):
"""
This function checks if a recipe has any LICENSE_FLAGS that
aren't whitelisted.
- If it does, it returns the first LICENSE_FLAGS item missing from the
- whitelist, or all of the LICENSE_FLAGS if there is no whitelist.
+ If it does, it returns the all LICENSE_FLAGS missing from the whitelist, or
+ all of the LICENSE_FLAGS if there is no whitelist.
If everything is is properly whitelisted, it returns None.
"""
@@ -617,22 +382,23 @@ def check_license_flags(d):
return False
def all_license_flags_match(license_flags, whitelist):
- """ Return first unmatched flag, None if all flags match """
- pn = d.getVar('PN', True)
+ """ Return all unmatched flags, None if all flags match """
+ pn = d.getVar('PN')
split_whitelist = whitelist.split()
+ flags = []
for flag in license_flags.split():
if not license_flag_matches(flag, split_whitelist, pn):
- return flag
- return None
+ flags.append(flag)
+ return flags if flags else None
- license_flags = d.getVar('LICENSE_FLAGS', True)
+ license_flags = d.getVar('LICENSE_FLAGS')
if license_flags:
- whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True)
+ whitelist = d.getVar('LICENSE_FLAGS_WHITELIST')
if not whitelist:
- return license_flags
- unmatched_flag = all_license_flags_match(license_flags, whitelist)
- if unmatched_flag:
- return unmatched_flag
+ return license_flags.split()
+ unmatched_flags = all_license_flags_match(license_flags, whitelist)
+ if unmatched_flags:
+ return unmatched_flags
return None
def check_license_format(d):
@@ -641,8 +407,8 @@ def check_license_format(d):
Validate operators in LICENSES.
No spaces are allowed between LICENSES.
"""
- pn = d.getVar('PN', True)
- licenses = d.getVar('LICENSE', True)
+ pn = d.getVar('PN')
+ licenses = d.getVar('LICENSE')
from oe.license import license_operator, license_operator_chars, license_pattern
elements = list(filter(lambda x: x.strip(), license_operator.split(licenses)))
@@ -662,11 +428,7 @@ SSTATETASKS += "do_populate_lic"
do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
-ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; license_create_manifest; "
-do_rootfs[recrdeptask] += "do_populate_lic"
-
-IMAGE_POSTPROCESS_COMMAND_prepend = "write_deploy_manifest; "
-do_image[recrdeptask] += "do_populate_lic"
+IMAGE_CLASSES_append = " license_image"
python do_populate_lic_setscene () {
sstate_setscene(d)
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass
new file mode 100644
index 0000000000..a8c72da3cb
--- /dev/null
+++ b/meta/classes/license_image.bbclass
@@ -0,0 +1,256 @@
+python write_package_manifest() {
+ # Get list of installed packages
+ license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}')
+ bb.utils.mkdirhier(license_image_dir)
+ from oe.rootfs import image_list_installed_packages
+ from oe.utils import format_pkg_list
+
+ pkgs = image_list_installed_packages(d)
+ output = format_pkg_list(pkgs)
+ open(os.path.join(license_image_dir, 'package.manifest'),
+ 'w+').write(output)
+}
+
+python license_create_manifest() {
+ import oe.packagedata
+ from oe.rootfs import image_list_installed_packages
+
+ build_images_from_feeds = d.getVar('BUILD_IMAGES_FROM_FEEDS')
+ if build_images_from_feeds == "1":
+ return 0
+
+ pkg_dic = {}
+ for pkg in sorted(image_list_installed_packages(d)):
+ pkg_info = os.path.join(d.getVar('PKGDATA_DIR'),
+ 'runtime-reverse', pkg)
+ pkg_name = os.path.basename(os.readlink(pkg_info))
+
+ pkg_dic[pkg_name] = oe.packagedata.read_pkgdatafile(pkg_info)
+ if not "LICENSE" in pkg_dic[pkg_name].keys():
+ pkg_lic_name = "LICENSE_" + pkg_name
+ pkg_dic[pkg_name]["LICENSE"] = pkg_dic[pkg_name][pkg_lic_name]
+
+ rootfs_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY'),
+ d.getVar('IMAGE_NAME'), 'license.manifest')
+ write_license_files(d, rootfs_license_manifest, pkg_dic, rootfs=True)
+}
+
+def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
+ import re
+ import stat
+
+ bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE") or "").split()
+ bad_licenses = [canonical_license(d, l) for l in bad_licenses]
+ bad_licenses = expand_wildcard_licenses(d, bad_licenses)
+
+ whitelist = []
+ for lic in bad_licenses:
+ whitelist.extend((d.getVar("WHITELIST_" + lic) or "").split())
+
+ with open(license_manifest, "w") as license_file:
+ for pkg in sorted(pkg_dic):
+ if bad_licenses and pkg not in whitelist:
+ try:
+ licenses = incompatible_pkg_license(d, bad_licenses, pkg_dic[pkg]["LICENSE"])
+ if licenses:
+ bb.fatal("Package %s cannot be installed into the image because it has incompatible license(s): %s" %(pkg, ' '.join(licenses)))
+ (pkg_dic[pkg]["LICENSE"], pkg_dic[pkg]["LICENSES"]) = \
+ oe.license.manifest_licenses(pkg_dic[pkg]["LICENSE"],
+ bad_licenses, canonical_license, d)
+ except oe.license.LicenseError as exc:
+ bb.fatal('%s: %s' % (d.getVar('P'), exc))
+ else:
+ pkg_dic[pkg]["LICENSES"] = re.sub(r'[|&()*]', ' ', pkg_dic[pkg]["LICENSE"])
+ pkg_dic[pkg]["LICENSES"] = re.sub(r' *', ' ', pkg_dic[pkg]["LICENSES"])
+ pkg_dic[pkg]["LICENSES"] = pkg_dic[pkg]["LICENSES"].split()
+ if pkg in whitelist:
+ bb.warn("Including %s with an incompatible license %s into the image, because it has been whitelisted." %(pkg, pkg_dic[pkg]["LICENSE"]))
+
+ if not "IMAGE_MANIFEST" in pkg_dic[pkg]:
+ # Rootfs manifest
+ license_file.write("PACKAGE NAME: %s\n" % pkg)
+ license_file.write("PACKAGE VERSION: %s\n" % pkg_dic[pkg]["PV"])
+ license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"])
+ license_file.write("LICENSE: %s\n\n" % pkg_dic[pkg]["LICENSE"])
+
+ # If the package doesn't contain any file, that is, its size is 0, the license
+ # isn't relevant as far as the final image is concerned. So doing license check
+ # doesn't make much sense, skip it.
+ if pkg_dic[pkg]["PKGSIZE_%s" % pkg] == "0":
+ continue
+ else:
+ # Image manifest
+ license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"])
+ license_file.write("VERSION: %s\n" % pkg_dic[pkg]["PV"])
+ license_file.write("LICENSE: %s\n" % pkg_dic[pkg]["LICENSE"])
+ license_file.write("FILES: %s\n\n" % pkg_dic[pkg]["FILES"])
+
+ for lic in pkg_dic[pkg]["LICENSES"]:
+ lic_file = os.path.join(d.getVar('LICENSE_DIRECTORY'),
+ pkg_dic[pkg]["PN"], "generic_%s" %
+ re.sub(r'\+', '', lic))
+ # add explicity avoid of CLOSED license because isn't generic
+ if lic == "CLOSED":
+ continue
+
+ if not os.path.exists(lic_file):
+ bb.warn("The license listed %s was not in the "\
+ "licenses collected for recipe %s"
+ % (lic, pkg_dic[pkg]["PN"]))
+
+ # Two options here:
+ # - Just copy the manifest
+ # - Copy the manifest and the license directories
+ # With both options set we see a .5 M increase in core-image-minimal
+ copy_lic_manifest = d.getVar('COPY_LIC_MANIFEST')
+ copy_lic_dirs = d.getVar('COPY_LIC_DIRS')
+ if rootfs and copy_lic_manifest == "1":
+ rootfs_license_dir = os.path.join(d.getVar('IMAGE_ROOTFS'),
+ 'usr', 'share', 'common-licenses')
+ bb.utils.mkdirhier(rootfs_license_dir)
+ rootfs_license_manifest = os.path.join(rootfs_license_dir,
+ os.path.split(license_manifest)[1])
+ if not os.path.exists(rootfs_license_manifest):
+ oe.path.copyhardlink(license_manifest, rootfs_license_manifest)
+
+ if copy_lic_dirs == "1":
+ for pkg in sorted(pkg_dic):
+ pkg_rootfs_license_dir = os.path.join(rootfs_license_dir, pkg)
+ bb.utils.mkdirhier(pkg_rootfs_license_dir)
+ pkg_license_dir = os.path.join(d.getVar('LICENSE_DIRECTORY'),
+ pkg_dic[pkg]["PN"])
+
+ pkg_manifest_licenses = [canonical_license(d, lic) \
+ for lic in pkg_dic[pkg]["LICENSES"]]
+
+ licenses = os.listdir(pkg_license_dir)
+ for lic in licenses:
+ rootfs_license = os.path.join(rootfs_license_dir, lic)
+ pkg_license = os.path.join(pkg_license_dir, lic)
+ pkg_rootfs_license = os.path.join(pkg_rootfs_license_dir, lic)
+
+ if re.match(r"^generic_.*$", lic):
+ generic_lic = canonical_license(d,
+ re.search(r"^generic_(.*)$", lic).group(1))
+
+ # Do not copy generic license into package if isn't
+ # declared into LICENSES of the package.
+ if not re.sub(r'\+$', '', generic_lic) in \
+ [re.sub(r'\+', '', lic) for lic in \
+ pkg_manifest_licenses]:
+ continue
+
+ if oe.license.license_ok(generic_lic,
+ bad_licenses) == False:
+ continue
+
+ if not os.path.exists(rootfs_license):
+ oe.path.copyhardlink(pkg_license, rootfs_license)
+
+ if not os.path.exists(pkg_rootfs_license):
+ os.symlink(os.path.join('..', lic), pkg_rootfs_license)
+ else:
+ if (oe.license.license_ok(canonical_license(d,
+ lic), bad_licenses) == False or
+ os.path.exists(pkg_rootfs_license)):
+ continue
+
+ oe.path.copyhardlink(pkg_license, pkg_rootfs_license)
+ # Fixup file ownership and permissions
+ for walkroot, dirs, files in os.walk(rootfs_license_dir):
+ for f in files:
+ p = os.path.join(walkroot, f)
+ os.lchown(p, 0, 0)
+ if not os.path.islink(p):
+ os.chmod(p, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH)
+ for dir in dirs:
+ p = os.path.join(walkroot, dir)
+ os.lchown(p, 0, 0)
+ os.chmod(p, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
+
+
+
+def license_deployed_manifest(d):
+ """
+ Write the license manifest for the deployed recipes.
+ The deployed recipes usually includes the bootloader
+ and extra files to boot the target.
+ """
+
+ dep_dic = {}
+ man_dic = {}
+ lic_dir = d.getVar("LICENSE_DIRECTORY")
+
+ dep_dic = get_deployed_dependencies(d)
+ for dep in dep_dic.keys():
+ man_dic[dep] = {}
+ # It is necessary to mark this will be used for image manifest
+ man_dic[dep]["IMAGE_MANIFEST"] = True
+ man_dic[dep]["PN"] = dep
+ man_dic[dep]["FILES"] = \
+ " ".join(get_deployed_files(dep_dic[dep]))
+ with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f:
+ for line in f.readlines():
+ key,val = line.split(": ", 1)
+ man_dic[dep][key] = val[:-1]
+
+ lic_manifest_dir = os.path.join(d.getVar('LICENSE_DIRECTORY'),
+ d.getVar('IMAGE_NAME'))
+ bb.utils.mkdirhier(lic_manifest_dir)
+ image_license_manifest = os.path.join(lic_manifest_dir, 'image_license.manifest')
+ write_license_files(d, image_license_manifest, man_dic, rootfs=False)
+
+def get_deployed_dependencies(d):
+ """
+ Get all the deployed dependencies of an image
+ """
+
+ deploy = {}
+ # Get all the dependencies for the current task (rootfs).
+ taskdata = d.getVar("BB_TASKDEPDATA", False)
+ depends = list(set([dep[0] for dep
+ in list(taskdata.values())
+ if not dep[0].endswith("-native")]))
+
+ # To verify what was deployed it checks the rootfs dependencies against
+ # the SSTATE_MANIFESTS for "deploy" task.
+ # The manifest file name contains the arch. Because we are not running
+ # in the recipe context it is necessary to check every arch used.
+ sstate_manifest_dir = d.getVar("SSTATE_MANIFESTS")
+ archs = list(set(d.getVar("SSTATE_ARCHS").split()))
+ for dep in depends:
+ for arch in archs:
+ sstate_manifest_file = os.path.join(sstate_manifest_dir,
+ "manifest-%s-%s.deploy" % (arch, dep))
+ if os.path.exists(sstate_manifest_file):
+ deploy[dep] = sstate_manifest_file
+ break
+
+ return deploy
+get_deployed_dependencies[vardepsexclude] = "BB_TASKDEPDATA"
+
+def get_deployed_files(man_file):
+ """
+ Get the files deployed from the sstate manifest
+ """
+
+ dep_files = []
+ excluded_files = []
+ with open(man_file, "r") as manifest:
+ all_files = manifest.read()
+ for f in all_files.splitlines():
+ if ((not (os.path.islink(f) or os.path.isdir(f))) and
+ not os.path.basename(f) in excluded_files):
+ dep_files.append(os.path.basename(f))
+ return dep_files
+
+ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; license_create_manifest; "
+do_rootfs[recrdeptask] += "do_populate_lic"
+
+python do_populate_lic_deploy() {
+ license_deployed_manifest(d)
+}
+
+addtask populate_lic_deploy before do_build after do_image_complete
+do_populate_lic_deploy[recrdeptask] += "do_populate_lic do_deploy"
+
diff --git a/meta/classes/linux-kernel-base.bbclass b/meta/classes/linux-kernel-base.bbclass
index 89ce71605c..ba59222c24 100644
--- a/meta/classes/linux-kernel-base.bbclass
+++ b/meta/classes/linux-kernel-base.bbclass
@@ -34,8 +34,8 @@ def get_kernelversion_file(p):
return None
def linux_module_packages(s, d):
- suffix = ""
- return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
+ suffix = ""
+ return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
# that's all
diff --git a/meta/classes/linuxloader.bbclass b/meta/classes/linuxloader.bbclass
index 5c4dc5c51b..c0fbf26836 100644
--- a/meta/classes/linuxloader.bbclass
+++ b/meta/classes/linuxloader.bbclass
@@ -1,24 +1,65 @@
+def get_musl_loader(d):
+ import re
+ dynamic_loader = None
-linuxloader () {
- case ${TARGET_ARCH} in
- powerpc | mips | mipsel | microblaze )
- dynamic_loader="${base_libdir}/ld.so.1"
- ;;
- powerpc64)
- dynamic_loader="${base_libdir}/ld64.so.1"
- ;;
- x86_64)
- dynamic_loader="${base_libdir}/ld-linux-x86-64.so.2"
- ;;
- i*86 )
- dynamic_loader="${base_libdir}/ld-linux.so.2"
- ;;
- arm )
- dynamic_loader="${base_libdir}/ld-linux.so.3"
- ;;
- * )
- dynamic_loader="/unknown_dynamic_linker"
- ;;
- esac
- echo $dynamic_loader
-}
+ targetarch = d.getVar("TARGET_ARCH")
+ if targetarch.startswith("microblaze"):
+ dynamic_loader = "${base_libdir}/ld-musl-microblaze${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el' ,d)}.so.1"
+ elif targetarch.startswith("mips"):
+ dynamic_loader = "${base_libdir}/ld-musl-mips${ABIEXTENSION}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}.so.1"
+ elif targetarch == "powerpc":
+ dynamic_loader = "${base_libdir}/ld-musl-powerpc${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}.so.1"
+ elif targetarch == "powerpc64":
+ dynamic_loader = "${base_libdir}/ld-musl-powerpc64.so.1"
+ elif targetarch == "x86_64":
+ dynamic_loader = "${base_libdir}/ld-musl-x86_64.so.1"
+ elif re.search("i.86", targetarch):
+ dynamic_loader = "${base_libdir}/ld-musl-i386.so.1"
+ elif targetarch.startswith("arm"):
+ dynamic_loader = "${base_libdir}/ld-musl-arm${ARMPKGSFX_ENDIAN}${ARMPKGSFX_EABI}.so.1"
+ elif targetarch.startswith("aarch64"):
+ dynamic_loader = "${base_libdir}/ld-musl-aarch64${ARMPKGSFX_ENDIAN_64}.so.1"
+ elif targetarch.startswith("riscv64"):
+ dynamic_loader = "${base_libdir}/ld-musl-riscv64${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}.so.1"
+ return dynamic_loader
+
+def get_glibc_loader(d):
+ import re
+
+ dynamic_loader = None
+ targetarch = d.getVar("TARGET_ARCH")
+ if targetarch in ["powerpc", "microblaze"]:
+ dynamic_loader = "${base_libdir}/ld.so.1"
+ elif targetarch in ["mipsisa32r6el", "mipsisa32r6", "mipsisa64r6el", "mipsisa64r6"]:
+ dynamic_loader = "${base_libdir}/ld-linux-mipsn8.so.1"
+ elif targetarch.startswith("mips"):
+ dynamic_loader = "${base_libdir}/ld.so.1"
+ elif targetarch == "powerpc64":
+ dynamic_loader = "${base_libdir}/ld64.so.1"
+ elif targetarch == "x86_64":
+ dynamic_loader = "${base_libdir}/ld-linux-x86-64.so.2"
+ elif re.search("i.86", targetarch):
+ dynamic_loader = "${base_libdir}/ld-linux.so.2"
+ elif targetarch == "arm":
+ dynamic_loader = "${base_libdir}/ld-linux.so.3"
+ elif targetarch.startswith("aarch64"):
+ dynamic_loader = "${base_libdir}/ld-linux-aarch64${ARMPKGSFX_ENDIAN_64}.so.1"
+ elif targetarch.startswith("riscv64"):
+ dynamic_loader = "${base_libdir}/ld-linux-riscv64-lp64${@['d', ''][d.getVar('TARGET_FPU') == 'soft']}.so.1"
+ return dynamic_loader
+
+def get_linuxloader(d):
+ overrides = d.getVar("OVERRIDES").split(":")
+
+ if "libc-baremetal" in overrides:
+ return None
+
+ if "libc-musl" in overrides:
+ dynamic_loader = get_musl_loader(d)
+ else:
+ dynamic_loader = get_glibc_loader(d)
+ return dynamic_loader
+
+get_linuxloader[vardepvalue] = "${@get_linuxloader(d)}"
+get_musl_loader[vardepvalue] = "${@get_musl_loader(d)}"
+get_glibc_loader[vardepvalue] = "${@get_glibc_loader(d)}"
diff --git a/meta/classes/live-vm-common.bbclass b/meta/classes/live-vm-common.bbclass
index c751385e7d..74e7074a53 100644
--- a/meta/classes/live-vm-common.bbclass
+++ b/meta/classes/live-vm-common.bbclass
@@ -4,17 +4,19 @@ def set_live_vm_vars(d, suffix):
vars = ['GRUB_CFG', 'SYSLINUX_CFG', 'ROOT', 'LABELS', 'INITRD']
for var in vars:
var_with_suffix = var + '_' + suffix
- if d.getVar(var, True):
+ if d.getVar(var):
bb.warn('Found potential conflicted var %s, please use %s rather than %s' % \
(var, var_with_suffix, var))
- elif d.getVar(var_with_suffix, True):
- d.setVar(var, d.getVar(var_with_suffix, True))
+ elif d.getVar(var_with_suffix):
+ d.setVar(var, d.getVar(var_with_suffix))
EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
EFI_PROVIDER ?= "grub-efi"
EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}"
+MKDOSFS_EXTRAOPTS ??= "-S 512"
+
# Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
# contain "efi". This way legacy is supported by default if neither is
# specified, maintaining the original behavior.
@@ -25,20 +27,54 @@ def pcbios(d):
return pcbios
PCBIOS = "${@pcbios(d)}"
-PCBIOS_CLASS = "${@['','syslinux'][d.getVar('PCBIOS', True) == '1']}"
+PCBIOS_CLASS = "${@['','syslinux'][d.getVar('PCBIOS') == '1']}"
+
+# efi_populate_common DEST BOOTLOADER
+efi_populate_common() {
+ # DEST must be the root of the image so that EFIDIR is not
+ # nested under a top level directory.
+ DEST=$1
+
+ install -d ${DEST}${EFIDIR}
+
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/$2-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE}
+ EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
+ printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh
+}
+
+efi_iso_populate() {
+ iso_dir=$1
+ efi_populate $iso_dir
+ # Build a EFI directory to create efi.img
+ mkdir -p ${EFIIMGDIR}/${EFIDIR}
+ cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
+ cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
+
+ EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
+ printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${EFIIMGDIR}/startup.nsh
+
+ if [ -f "$iso_dir/initrd" ] ; then
+ cp $iso_dir/initrd ${EFIIMGDIR}
+ fi
+}
+
+efi_hddimg_populate() {
+ efi_populate $1
+}
inherit ${EFI_CLASS}
inherit ${PCBIOS_CLASS}
-KERNEL_IMAGETYPE ??= "bzImage"
-
populate_kernel() {
dest=$1
install -d $dest
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
+ bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} as $dest/${KERNEL_IMAGETYPE}"
if [ -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ]; then
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} $dest/vmlinuz
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} $dest/${KERNEL_IMAGETYPE}
+ else
+ bbwarn "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} doesn't exist"
fi
# initrd is made of concatenation of multiple filesystem images
diff --git a/meta/classes/logging.bbclass b/meta/classes/logging.bbclass
index 06c7c31c3e..a0c94e98c7 100644
--- a/meta/classes/logging.bbclass
+++ b/meta/classes/logging.bbclass
@@ -86,7 +86,7 @@ bbdebug() {
# Strip off the debug level and ensure it is an integer
DBGLVL=$1; shift
- NONDIGITS=$(echo "$DBGLVL" | tr -d [:digit:])
+ NONDIGITS=$(echo "$DBGLVL" | tr -d "[:digit:]")
if [ "$NONDIGITS" ]; then
bbfatal "$USAGE"
fi
diff --git a/meta/classes/manpages.bbclass b/meta/classes/manpages.bbclass
new file mode 100644
index 0000000000..50c254763e
--- /dev/null
+++ b/meta/classes/manpages.bbclass
@@ -0,0 +1,37 @@
+# Inherit this class to enable or disable building and installation of manpages
+# depending on whether 'api-documentation' is in DISTRO_FEATURES. Such building
+# tends to pull in the entire XML stack and other tools, so it's not enabled
+# by default.
+PACKAGECONFIG_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'manpages', '', d)}"
+
+inherit qemu
+
+# usually manual files are packaged to ${PN}-doc except man-pages
+MAN_PKG ?= "${PN}-doc"
+
+# only add man-db to RDEPENDS when manual files are built and installed
+RDEPENDS_${MAN_PKG} += "${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'man-db', '', d)}"
+
+pkg_postinst_append_${MAN_PKG} () {
+ # only update manual page index caches when manual files are built and installed
+ if ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'true', 'false', d)}; then
+ if test -n "$D"; then
+ if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then
+ sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf | ${@qemu_run_binary(d, '$D', '${bindir}/mandb')} -C - -u -q $D${mandir}
+ mkdir -p $D${localstatedir}/cache/man
+ mv $D${mandir}/index.db $D${localstatedir}/cache/man
+ else
+ $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
+ fi
+ else
+ mandb -q
+ fi
+ fi
+}
+
+pkg_postrm_append_${MAN_PKG} () {
+ # only update manual page index caches when manual files are built and installed
+ if ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'true', 'false', d)}; then
+ mandb -q
+ fi
+}
diff --git a/meta/classes/mcextend.bbclass b/meta/classes/mcextend.bbclass
new file mode 100644
index 0000000000..0f8f962298
--- /dev/null
+++ b/meta/classes/mcextend.bbclass
@@ -0,0 +1,16 @@
+python mcextend_virtclass_handler () {
+ cls = e.data.getVar("BBEXTENDCURR")
+ variant = e.data.getVar("BBEXTENDVARIANT")
+ if cls != "mcextend" or not variant:
+ return
+
+ override = ":virtclass-mcextend-" + variant
+
+ e.data.setVar("PN", e.data.getVar("PN", False) + "-" + variant)
+ e.data.setVar("MCNAME", variant)
+ e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
+}
+
+addhandler mcextend_virtclass_handler
+mcextend_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
+
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
new file mode 100644
index 0000000000..e1a13bbbf7
--- /dev/null
+++ b/meta/classes/meson.bbclass
@@ -0,0 +1,161 @@
+inherit siteinfo python3native
+
+DEPENDS_append = " meson-native ninja-native"
+
+# As Meson enforces out-of-tree builds we can just use cleandirs
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+# Where the meson.build build configuration is
+MESON_SOURCEPATH = "${S}"
+
+def noprefix(var, d):
+ return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
+
+MESON_BUILDTYPE ?= "plain"
+MESONOPTS = " --prefix ${prefix} \
+ --buildtype ${MESON_BUILDTYPE} \
+ --bindir ${@noprefix('bindir', d)} \
+ --sbindir ${@noprefix('sbindir', d)} \
+ --datadir ${@noprefix('datadir', d)} \
+ --libdir ${@noprefix('libdir', d)} \
+ --libexecdir ${@noprefix('libexecdir', d)} \
+ --includedir ${@noprefix('includedir', d)} \
+ --mandir ${@noprefix('mandir', d)} \
+ --infodir ${@noprefix('infodir', d)} \
+ --sysconfdir ${sysconfdir} \
+ --localstatedir ${localstatedir} \
+ --sharedstatedir ${sharedstatedir} \
+ --wrap-mode nodownload"
+
+EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"
+
+MESON_CROSS_FILE = ""
+MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
+MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
+
+def meson_array(var, d):
+ items = d.getVar(var).split()
+ return repr(items[0] if len(items) == 1 else items)
+
+# Map our ARCH values to what Meson expects:
+# http://mesonbuild.com/Reference-tables.html#cpu-families
+def meson_cpu_family(var, d):
+ import re
+ arch = d.getVar(var)
+ if arch == 'powerpc':
+ return 'ppc'
+ elif arch == 'powerpc64':
+ return 'ppc64'
+ elif arch == 'armeb':
+ return 'arm'
+ elif arch == 'aarch64_be':
+ return 'aarch64'
+ elif arch == 'mipsel':
+ return 'mips'
+ elif arch == 'mips64el':
+ return 'mips64'
+ elif re.match(r"i[3-6]86", arch):
+ return "x86"
+ elif arch == "microblazeel" or arch == "microblazeeb":
+ return "microblaze"
+ else:
+ return arch
+
+def meson_endian(prefix, d):
+ arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
+ sitedata = siteinfo_data_for_machine(arch, os, d)
+ if "endian-little" in sitedata:
+ return "little"
+ elif "endian-big" in sitedata:
+ return "big"
+ else:
+ bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
+
+addtask write_config before do_configure
+do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS"
+do_write_config() {
+ # This needs to be Py to split the args into single-element lists
+ cat >${WORKDIR}/meson.cross <<EOF
+[binaries]
+c = ${@meson_array('CC', d)}
+cpp = ${@meson_array('CXX', d)}
+ar = ${@meson_array('AR', d)}
+nm = ${@meson_array('NM', d)}
+ld = ${@meson_array('LD', d)}
+strip = ${@meson_array('STRIP', d)}
+readelf = ${@meson_array('READELF', d)}
+pkgconfig = 'pkg-config'
+llvm-config = 'llvm-config${LLVMVERSION}'
+
+[properties]
+needs_exe_wrapper = true
+c_args = ${@meson_array('CFLAGS', d)}
+c_link_args = ${@meson_array('LDFLAGS', d)}
+cpp_args = ${@meson_array('CXXFLAGS', d)}
+cpp_link_args = ${@meson_array('LDFLAGS', d)}
+gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
+
+[host_machine]
+system = '${HOST_OS}'
+cpu_family = '${@meson_cpu_family('HOST_ARCH', d)}'
+cpu = '${HOST_ARCH}'
+endian = '${@meson_endian('HOST', d)}'
+
+[target_machine]
+system = '${TARGET_OS}'
+cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}'
+cpu = '${TARGET_ARCH}'
+endian = '${@meson_endian('TARGET', d)}'
+EOF
+}
+
+CONFIGURE_FILES = "meson.build"
+
+meson_do_configure() {
+ # Work around "Meson fails if /tmp is mounted with noexec #2972"
+ mkdir -p "${B}/meson-private/tmp"
+ export TMPDIR="${B}/meson-private/tmp"
+ bbnote Executing meson ${EXTRA_OEMESON}...
+ if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
+ bbfatal_log meson failed
+ fi
+}
+
+override_native_tools() {
+ # Set these so that meson uses the native tools for its build sanity tests,
+ # which require executables to be runnable. The cross file will still
+ # override these for the target build.
+ export CC="${BUILD_CC}"
+ export CXX="${BUILD_CXX}"
+ export LD="${BUILD_LD}"
+ export AR="${BUILD_AR}"
+ export STRIP="${BUILD_STRIP}"
+ # These contain *target* flags but will be used as *native* flags. The
+ # correct native flags will be passed via -Dc_args and so on, unset them so
+ # they don't interfere with tools invoked by Meson (such as g-ir-scanner)
+ unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS
+}
+
+meson_do_configure_prepend_class-target() {
+ override_native_tools
+}
+
+meson_do_configure_prepend_class-nativesdk() {
+ override_native_tools
+}
+
+meson_do_configure_prepend_class-native() {
+ export PKG_CONFIG="pkg-config-native"
+}
+
+do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
+meson_do_compile() {
+ ninja -v ${PARALLEL_MAKE}
+}
+
+meson_do_install() {
+ DESTDIR='${D}' ninja -v ${PARALLEL_MAKEINST} install
+}
+
+EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index 2e6fac209a..58bb4c555a 100644
--- a/meta/classes/metadata_scm.bbclass
+++ b/meta/classes/metadata_scm.bbclass
@@ -3,54 +3,14 @@ METADATA_REVISION ?= "${@base_detect_revision(d)}"
def base_detect_revision(d):
path = base_get_scmbasepath(d)
-
- scms = [base_get_metadata_git_revision]
-
- for scm in scms:
- rev = scm(path, d)
- if rev != "<unknown>":
- return rev
-
- return "<unknown>"
+ return base_get_metadata_git_revision(path, d)
def base_detect_branch(d):
path = base_get_scmbasepath(d)
-
- scms = [base_get_metadata_git_branch]
-
- for scm in scms:
- rev = scm(path, d)
- if rev != "<unknown>":
- return rev.strip()
-
- return "<unknown>"
+ return base_get_metadata_git_branch(path, d)
def base_get_scmbasepath(d):
- return os.path.join(d.getVar('COREBASE', True), 'meta')
-
-def base_get_metadata_monotone_branch(path, d):
- monotone_branch = "<unknown>"
- try:
- with open("%s/_MTN/options" % path) as f:
- monotone_branch = f.read().strip()
- if monotone_branch.startswith( "database" ):
- monotone_branch_words = monotone_branch.split()
- monotone_branch = monotone_branch_words[ monotone_branch_words.index( "branch" )+1][1:-1]
- except:
- pass
- return monotone_branch
-
-def base_get_metadata_monotone_revision(path, d):
- monotone_revision = "<unknown>"
- try:
- with open("%s/_MTN/revision" % path) as f:
- monotone_revision = f.read().strip()
- if monotone_revision.startswith( "format_version" ):
- monotone_revision_words = monotone_revision.split()
- monotone_revision = monotone_revision_words[ monotone_revision_words.index( "old_revision" )+1][1:-1]
- except IOError:
- pass
- return monotone_revision
+ return os.path.join(d.getVar('COREBASE'), 'meta')
def base_get_metadata_svn_revision(path, d):
# This only works with older subversion. For newer versions
diff --git a/meta/classes/migrate_localcount.bbclass b/meta/classes/migrate_localcount.bbclass
index aa0df8bb76..810a541316 100644
--- a/meta/classes/migrate_localcount.bbclass
+++ b/meta/classes/migrate_localcount.bbclass
@@ -6,12 +6,12 @@ python migrate_localcount_handler () {
if not e.data:
return
- pv = e.data.getVar('PV', True)
+ pv = e.data.getVar('PV')
if not 'AUTOINC' in pv:
return
localcounts = bb.persist_data.persist('BB_URI_LOCALCOUNT', e.data)
- pn = e.data.getVar('PN', True)
+ pn = e.data.getVar('PN')
revs = localcounts.get_by_pattern('%%-%s_rev' % pn)
counts = localcounts.get_by_pattern('%%-%s_count' % pn)
if not revs or not counts:
@@ -21,10 +21,10 @@ python migrate_localcount_handler () {
bb.warn("The number of revs and localcounts don't match in %s" % pn)
return
- version = e.data.getVar('PRAUTOINX', True)
+ version = e.data.getVar('PRAUTOINX')
srcrev = bb.fetch2.get_srcrev(e.data)
base_ver = 'AUTOINC-%s' % version[:version.find(srcrev)]
- pkgarch = e.data.getVar('PACKAGE_ARCH', True)
+ pkgarch = e.data.getVar('PACKAGE_ARCH')
value = max(int(count) for count in counts)
if len(revs) == 1:
@@ -33,8 +33,8 @@ python migrate_localcount_handler () {
else:
value += 1
- bb.utils.mkdirhier(e.data.getVar('PRSERV_DUMPDIR', True))
- df = e.data.getVar('LOCALCOUNT_DUMPFILE', True)
+ bb.utils.mkdirhier(e.data.getVar('PRSERV_DUMPDIR'))
+ df = e.data.getVar('LOCALCOUNT_DUMPFILE')
flock = bb.utils.lockfile("%s.lock" % df)
with open(df, 'a') as fd:
fd.write('PRAUTO$%s$%s$%s = "%s"\n' %
diff --git a/meta/classes/mime.bbclass b/meta/classes/mime.bbclass
index 721c73fcff..6c7b868f79 100644
--- a/meta/classes/mime.bbclass
+++ b/meta/classes/mime.bbclass
@@ -1,4 +1,5 @@
-DEPENDS += "shared-mime-info-native shared-mime-info"
+DEPENDS += "shared-mime-info"
+PACKAGE_WRITE_DEPS += "shared-mime-info-native"
mime_postinst() {
if [ "$1" = configure ]; then
@@ -28,8 +29,8 @@ fi
python populate_packages_append () {
import re
- packages = d.getVar('PACKAGES', True).split()
- pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar('PACKAGES').split()
+ pkgdest = d.getVar('PKGDEST')
for pkg in packages:
mime_dir = '%s/%s/usr/share/mime/packages' % (pkgdest, pkg)
@@ -41,16 +42,16 @@ python populate_packages_append () {
mimes.append(f)
if mimes:
bb.note("adding mime postinst and postrm scripts to %s" % pkg)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += d.getVar('mime_postinst', True)
+ postinst += d.getVar('mime_postinst')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- postrm = d.getVar('pkg_postrm_%s' % pkg, True)
+ postrm = d.getVar('pkg_postrm_%s' % pkg)
if not postrm:
postrm = '#!/bin/sh\n'
- postrm += d.getVar('mime_postrm', True)
+ postrm += d.getVar('mime_postrm')
d.setVar('pkg_postrm_%s' % pkg, postrm)
bb.note("adding shared-mime-info-data dependency to %s" % pkg)
- d.appendVar('RDEPENDS_' + pkg, " shared-mime-info-data")
+ d.appendVar('RDEPENDS_' + pkg, " " + d.getVar('MLPREFIX')+"shared-mime-info-data")
}
diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass
index 11847085ba..87bba41472 100644
--- a/meta/classes/mirrors.bbclass
+++ b/meta/classes/mirrors.bbclass
@@ -1,25 +1,26 @@
MIRRORS += "\
+${DEBIAN_MIRROR} http://snapshot.debian.org/archive/debian/20180310T215105Z/pool \n \
${DEBIAN_MIRROR} http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool \n \
${DEBIAN_MIRROR} http://snapshot.debian.org/archive/debian-archive/20110127T084257Z/debian/pool \n \
${DEBIAN_MIRROR} http://snapshot.debian.org/archive/debian-archive/20090802T004153Z/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.de.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.au.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.cl.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.hr.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.fi.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.hk.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.hu.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.ie.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.it.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.jp.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.no.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.pl.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.ro.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.si.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.es.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.se.debian.org/debian/pool \n \
-${DEBIAN_MIRROR} ftp://ftp.tr.debian.org/debian/pool \n \
-${GNU_MIRROR} ftp://mirrors.kernel.org/gnu \n \
+${DEBIAN_MIRROR} http://ftp.de.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.au.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.cl.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.hr.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.fi.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.hk.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.hu.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.ie.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.it.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.jp.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.no.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.pl.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.ro.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.si.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.es.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.se.debian.org/debian/pool \n \
+${DEBIAN_MIRROR} http://ftp.tr.debian.org/debian/pool \n \
+${GNU_MIRROR} https://mirrors.kernel.org/gnu \n \
${KERNELORG_MIRROR} http://www.kernel.org/pub \n \
${GNUPG_MIRROR} ftp://ftp.gnupg.org/gcrypt \n \
${GNUPG_MIRROR} ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt \n \
@@ -27,24 +28,18 @@ ${GNUPG_MIRROR} ftp://mirrors.dotsrc.org/gcrypt \n \
ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n \
ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n \
ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n \
-ftp://ftp.gnutls.org/gcrypt/gnutls ${GNUPG_MIRROR} \n \
+ftp://ftp.gnutls.org/gcrypt/gnutls ${GNUPG_MIRROR}/gnutls \n \
http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/ \n \
http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tau.ac.il/pub/unix/admin/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.kaizo.org/pub/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tu-darmstadt.de/pub/sysadmin/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tux.org/pub/sites/vic.cc.purdue.edu/tools/unix/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://the.wiretapped.net/pub/security/host-security/lsof/ \n \
+http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/ \n \
${APACHE_MIRROR} http://www.us.apache.org/dist \n \
${APACHE_MIRROR} http://archive.apache.org/dist \n \
http://downloads.sourceforge.net/watchdog/ http://fossies.org/linux/misc/ \n \
${SAVANNAH_GNU_MIRROR} http://download-mirror.savannah.gnu.org/releases \n \
${SAVANNAH_NONGNU_MIRROR} http://download-mirror.savannah.nongnu.org/releases \n \
+ftp://sourceware.org/pub http://mirrors.kernel.org/sourceware \n \
+ftp://sourceware.org/pub http://gd.tuwien.ac.at/gnu/sourceware \n \
+ftp://sourceware.org/pub http://ftp.gwdg.de/pub/linux/sources.redhat.com/sourceware \n \
cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
@@ -54,7 +49,7 @@ p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
-npm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+npm://.*/?.* http://downloads.yoctoproject.org/mirror/sources/ \n \
cvs://.*/.* http://sources.openembedded.org/ \n \
svn://.*/.* http://sources.openembedded.org/ \n \
git://.*/.* http://sources.openembedded.org/ \n \
@@ -64,7 +59,18 @@ p4://.*/.* http://sources.openembedded.org/ \n \
osc://.*/.* http://sources.openembedded.org/ \n \
https?$://.*/.* http://sources.openembedded.org/ \n \
ftp://.*/.* http://sources.openembedded.org/ \n \
-npm://.*/.* http://sources.openembedded.org/ \n \
+npm://.*/?.* http://sources.openembedded.org/ \n \
${CPAN_MIRROR} http://cpan.metacpan.org/ \n \
${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \
"
+
+# Use MIRRORS to provide git repo fallbacks using the https protocol, for cases
+# where git native protocol fetches may fail due to local firewall rules, etc.
+
+MIRRORS += "\
+git://salsa.debian.org/.* git://salsa.debian.org/PATH;protocol=https \n \
+git://git.gnome.org/.* git://gitlab.gnome.org/GNOME/PATH;protocol=https \n \
+git://git.savannah.gnu.org/.* git://git.savannah.gnu.org/git/PATH;protocol=https \n \
+git://git.yoctoproject.org/.* git://git.yoctoproject.org/git/PATH;protocol=https \n \
+git://.*/.* git://HOST/PATH;protocol=https \n \
+"
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
index 6fe77c01b7..27bd69ff33 100644
--- a/meta/classes/module-base.bbclass
+++ b/meta/classes/module-base.bbclass
@@ -1,7 +1,8 @@
inherit kernel-arch
-# This is instead of DEPENDS = "virtual/kernel"
-do_configure[depends] += "virtual/kernel:do_compile_kernelmodules"
+# We do the dependency this way because the output is not preserved
+# in sstate, so we must force do_compile to run (once).
+do_configure[depends] += "make-mod-scripts:do_compile"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
@@ -12,16 +13,9 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
# we didn't pick the name.
export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}"
-export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
+export KERNEL_VERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
KERNEL_OBJECT_SUFFIX = ".ko"
# kernel modules are generally machine specific
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# Function to ensure the kernel scripts are created. Expected to
-# be called before do_compile. See module.bbclass for an example.
-do_make_scripts() {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
- -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts
-}
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 68e3d341a3..c0dfa35061 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -1,15 +1,12 @@
-inherit module-base kernel-module-split
-
-addtask make_scripts after do_patch before do_compile
-do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
-do_make_scripts[depends] += "virtual/kernel:do_shared_workdir"
+inherit module-base kernel-module-split pkgconfig
EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
MODULES_INSTALL_TARGET ?= "modules_install"
+MODULES_MODULE_SYMVERS_LOCATION ?= ""
python __anonymous () {
- depends = d.getVar('DEPENDS', True)
+ depends = d.getVar('DEPENDS')
extra_symbols = []
for dep in depends.split():
if dep.startswith("kernel-module-"):
@@ -17,6 +14,26 @@ python __anonymous () {
d.setVar('KBUILD_EXTRA_SYMBOLS', " ".join(extra_symbols))
}
+python do_devshell_prepend () {
+ os.environ['CFLAGS'] = ''
+ os.environ['CPPFLAGS'] = ''
+ os.environ['CXXFLAGS'] = ''
+ os.environ['LDFLAGS'] = ''
+
+ os.environ['KERNEL_PATH'] = d.getVar('STAGING_KERNEL_DIR')
+ os.environ['KERNEL_SRC'] = d.getVar('STAGING_KERNEL_DIR')
+ os.environ['KERNEL_VERSION'] = d.getVar('KERNEL_VERSION')
+ os.environ['CC'] = d.getVar('KERNEL_CC')
+ os.environ['LD'] = d.getVar('KERNEL_LD')
+ os.environ['AR'] = d.getVar('KERNEL_AR')
+ os.environ['O'] = d.getVar('STAGING_KERNEL_BUILDDIR')
+ kbuild_extra_symbols = d.getVar('KBUILD_EXTRA_SYMBOLS')
+ if kbuild_extra_symbols:
+ os.environ['KBUILD_EXTRA_SYMBOLS'] = kbuild_extra_symbols
+ else:
+ os.environ['KBUILD_EXTRA_SYMBOLS'] = ''
+}
+
module_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
@@ -30,15 +47,23 @@ module_do_compile() {
module_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
+ oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \
+ INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
O=${STAGING_KERNEL_BUILDDIR} \
${MODULES_INSTALL_TARGET}
- install -d -m0755 ${D}${includedir}/${BPN}
- cp -a --no-preserve=ownership ${B}/Module.symvers ${D}${includedir}/${BPN}
- # it doesn't actually seem to matter which path is specified here
- sed -e 's:${B}/::g' -i ${D}${includedir}/${BPN}/Module.symvers
+ if [ ! -e "${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers" ] ; then
+ bbwarn "Module.symvers not found in ${B}/${MODULES_MODULE_SYMVERS_LOCATION}"
+ bbwarn "Please consider setting MODULES_MODULE_SYMVERS_LOCATION to a"
+ bbwarn "directory below B to get correct inter-module dependencies"
+ else
+ install -Dm0644 "${B}/${MODULES_MODULE_SYMVERS_LOCATION}"/Module.symvers ${D}${includedir}/${BPN}/Module.symvers
+ # Module.symvers contains absolute path to the build directory.
+ # While it doesn't actually seem to matter which path is specified,
+ # clear them out to avoid confusion
+ sed -e 's:${B}/::g' -i ${D}${includedir}/${BPN}/Module.symvers
+ fi
}
EXPORT_FUNCTIONS do_compile do_install
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index d5a31287a8..ee677da1e2 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -1,20 +1,26 @@
python multilib_virtclass_handler () {
- cls = e.data.getVar("BBEXTENDCURR", True)
- variant = e.data.getVar("BBEXTENDVARIANT", True)
+ cls = e.data.getVar("BBEXTENDCURR")
+ variant = e.data.getVar("BBEXTENDVARIANT")
if cls != "multilib" or not variant:
return
- e.data.setVar('STAGING_KERNEL_DIR', e.data.getVar('STAGING_KERNEL_DIR', True))
+ localdata = bb.data.createCopy(e.data)
+ localdata.delVar('TMPDIR')
+ e.data.setVar('STAGING_KERNEL_DIR', localdata.getVar('STAGING_KERNEL_DIR'))
# There should only be one kernel in multilib configs
# We also skip multilib setup for module packages.
- provides = (e.data.getVar("PROVIDES", True) or "").split()
- if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data):
- raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
-
- save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or ""
+ provides = (e.data.getVar("PROVIDES") or "").split()
+ non_ml_recipes = d.getVar('NON_MULTILIB_RECIPES').split()
+ bpn = e.data.getVar("BPN")
+ if "virtual/kernel" in provides or \
+ bb.data.inherits_class('module-base', e.data) or \
+ bpn in non_ml_recipes:
+ raise bb.parse.SkipRecipe("We shouldn't have multilib variants for %s" % bpn)
+
+ save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME") or ""
for name in save_var_name.split():
- val=e.data.getVar(name, True)
+ val=e.data.getVar(name)
if val:
e.data.setVar(name + "_MULTILIB_ORIGINAL", val)
@@ -26,59 +32,66 @@ python multilib_virtclass_handler () {
if bb.data.inherits_class('image', e.data):
e.data.setVar("MLPREFIX", variant + "-")
e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
- e.data.setVar('SDKTARGETSYSROOT', e.data.getVar('SDKTARGETSYSROOT', True))
+ e.data.setVar('SDKTARGETSYSROOT', e.data.getVar('SDKTARGETSYSROOT'))
+ override = ":virtclass-multilib-" + variant
+ e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
target_vendor = e.data.getVar("TARGET_VENDOR_" + "virtclass-multilib-" + variant, False)
if target_vendor:
e.data.setVar("TARGET_VENDOR", target_vendor)
return
if bb.data.inherits_class('cross-canadian', e.data):
+ # Multilib cross-candian should use the same nativesdk sysroot without MLPREFIX
+ e.data.setVar("RECIPE_SYSROOT", "${WORKDIR}/recipe-sysroot")
+ e.data.setVar("STAGING_DIR_TARGET", "${WORKDIR}/recipe-sysroot")
+ e.data.setVar("STAGING_DIR_HOST", "${WORKDIR}/recipe-sysroot")
e.data.setVar("MLPREFIX", variant + "-")
override = ":virtclass-multilib-" + variant
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
- bb.data.update_data(e.data)
return
if bb.data.inherits_class('native', e.data):
- raise bb.parse.SkipPackage("We can't extend native recipes")
+ raise bb.parse.SkipRecipe("We can't extend native recipes")
if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
- raise bb.parse.SkipPackage("We can't extend nativesdk recipes")
-
- if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
- raise bb.parse.SkipPackage("Don't extend allarch recipes which are not packagegroups")
+ raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
+ if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+ and not bb.data.inherits_class('packagegroup', e.data):
+ raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
# Expand this since this won't work correctly once we set a multilib into place
- e.data.setVar("ALL_MULTILIB_PACKAGE_ARCHS", e.data.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True))
+ e.data.setVar("ALL_MULTILIB_PACKAGE_ARCHS", e.data.getVar("ALL_MULTILIB_PACKAGE_ARCHS"))
override = ":virtclass-multilib-" + variant
+ blacklist = e.data.getVarFlag('PNBLACKLIST', e.data.getVar('PN'))
+ if blacklist:
+ pn_new = variant + "-" + e.data.getVar('PN')
+ if not e.data.getVarFlag('PNBLACKLIST', pn_new):
+ e.data.setVarFlag('PNBLACKLIST', pn_new, blacklist)
+
e.data.setVar("MLPREFIX", variant + "-")
e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
- # Expand the WHITELISTs with multilib prefix
- for whitelist in ["WHITELIST_GPL-3.0", "LGPLv2_WHITELIST_GPL-3.0"]:
- pkgs = e.data.getVar(whitelist, True)
- for pkg in pkgs.split():
- pkgs += " " + variant + "-" + pkg
- e.data.setVar(whitelist, pkgs)
+ # Expand WHITELIST_GPL-3.0 with multilib prefix
+ pkgs = e.data.getVar("WHITELIST_GPL-3.0")
+ for pkg in pkgs.split():
+ pkgs += " " + variant + "-" + pkg
+ e.data.setVar("WHITELIST_GPL-3.0", pkgs)
# DEFAULTTUNE can change TARGET_ARCH override so expand this now before update_data
newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, False)
if newtune:
e.data.setVar("DEFAULTTUNE", newtune)
- e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune)
}
addhandler multilib_virtclass_handler
multilib_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
-STAGINGCC_prepend = "${BBEXTENDVARIANT}-"
-
python __anonymous () {
- variant = d.getVar("BBEXTENDVARIANT", True)
+ variant = d.getVar("BBEXTENDVARIANT")
import oe.classextend
@@ -88,13 +101,13 @@ python __anonymous () {
clsextend.map_depends_variable("PACKAGE_INSTALL")
clsextend.map_depends_variable("LINGUAS_INSTALL")
clsextend.map_depends_variable("RDEPENDS")
- pinstall = d.getVar("LINGUAS_INSTALL", True) + " " + d.getVar("PACKAGE_INSTALL", True)
+ pinstall = d.getVar("LINGUAS_INSTALL") + " " + d.getVar("PACKAGE_INSTALL")
d.setVar("PACKAGE_INSTALL", pinstall)
d.setVar("LINGUAS_INSTALL", "")
# FIXME, we need to map this to something, not delete it!
d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", "")
-
- if bb.data.inherits_class('image', d):
+ bb.build.deltask('do_populate_sdk', d)
+ bb.build.deltask('do_populate_sdk_ext', d)
return
clsextend.map_depends_variable("DEPENDS")
@@ -104,40 +117,93 @@ python __anonymous () {
return
clsextend.rename_packages()
- clsextend.rename_package_variables((d.getVar("PACKAGEVARS", True) or "").split())
+ clsextend.rename_package_variables((d.getVar("PACKAGEVARS") or "").split())
clsextend.map_packagevars()
clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
- clsextend.map_variable("PACKAGE_INSTALL")
clsextend.map_variable("INITSCRIPT_PACKAGES")
clsextend.map_variable("USERADD_PACKAGES")
clsextend.map_variable("SYSTEMD_PACKAGES")
+ clsextend.map_variable("UPDATERCPN")
+
+ reset_alternative_priority(d)
}
+def reset_alternative_priority(d):
+ if not bb.data.inherits_class('update-alternatives', d):
+ return
+
+ # There might be multiple multilibs at the same time, e.g., lib32 and
+ # lib64, each of them should have a different priority.
+ multilib_variants = d.getVar('MULTILIB_VARIANTS')
+ bbextendvariant = d.getVar('BBEXTENDVARIANT')
+ reset_gap = multilib_variants.split().index(bbextendvariant) + 1
+
+ # ALTERNATIVE_PRIORITY = priority
+ alt_priority_recipe = d.getVar('ALTERNATIVE_PRIORITY')
+ # Reset ALTERNATIVE_PRIORITY when found
+ if alt_priority_recipe:
+ reset_priority = int(alt_priority_recipe) - reset_gap
+ bb.debug(1, '%s: Setting ALTERNATIVE_PRIORITY to %s' % (d.getVar('PN'), reset_priority))
+ d.setVar('ALTERNATIVE_PRIORITY', reset_priority)
+
+ handled_pkgs = []
+ for pkg in (d.getVar('PACKAGES') or "").split():
+ # ALTERNATIVE_PRIORITY_pkg = priority
+ alt_priority_pkg = d.getVar('ALTERNATIVE_PRIORITY_%s' % pkg)
+ # Reset ALTERNATIVE_PRIORITY_pkg when found
+ if alt_priority_pkg:
+ reset_priority = int(alt_priority_pkg) - reset_gap
+ if not pkg in handled_pkgs:
+ handled_pkgs.append(pkg)
+ bb.debug(1, '%s: Setting ALTERNATIVE_PRIORITY_%s to %s' % (pkg, pkg, reset_priority))
+ d.setVar('ALTERNATIVE_PRIORITY_%s' % pkg, reset_priority)
+
+ for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split():
+ # ALTERNATIVE_PRIORITY_pkg[tool] = priority
+ alt_priority_pkg_name = d.getVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg, alt_name)
+ # ALTERNATIVE_PRIORITY[tool] = priority
+ alt_priority_name = d.getVarFlag('ALTERNATIVE_PRIORITY', alt_name)
+
+ if alt_priority_pkg_name:
+ reset_priority = int(alt_priority_pkg_name) - reset_gap
+ bb.debug(1, '%s: Setting ALTERNATIVE_PRIORITY_%s[%s] to %s' % (pkg, pkg, alt_name, reset_priority))
+ d.setVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg, alt_name, reset_priority)
+ elif alt_priority_name:
+ reset_priority = int(alt_priority_name) - reset_gap
+ bb.debug(1, '%s: Setting ALTERNATIVE_PRIORITY[%s] to %s' % (pkg, alt_name, reset_priority))
+ d.setVarFlag('ALTERNATIVE_PRIORITY', alt_name, reset_priority)
+
PACKAGEFUNCS_append = " do_package_qa_multilib"
python do_package_qa_multilib() {
def check_mlprefix(pkg, var, mlprefix):
- values = bb.utils.explode_deps(d.getVar('%s_%s' % (var, pkg), True) or d.getVar(var, True) or "")
+ values = bb.utils.explode_deps(d.getVar('%s_%s' % (var, pkg)) or d.getVar(var) or "")
candidates = []
for i in values:
if i.startswith('virtual/'):
i = i[len('virtual/'):]
- if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)) and \
- (not 'cross-canadian' in i) and (not i.startswith("nativesdk-")) and \
- (not i.startswith("rtld")) and (not i.startswith('kernel-vmlinux')):
+
+ if (not (i.startswith(mlprefix) or i.startswith("kernel-") \
+ or ('cross-canadian' in i) or i.startswith("nativesdk-") \
+ or i.startswith("rtld") or i.startswith("/"))):
candidates.append(i)
+
if len(candidates) > 0:
msg = "%s package %s - suspicious values '%s' in %s" \
- % (d.getVar('PN', True), pkg, ' '.join(candidates), var)
+ % (d.getVar('PN'), pkg, ' '.join(candidates), var)
package_qa_handle_error("multilib", msg, d)
- ml = d.getVar('MLPREFIX', True)
+ ml = d.getVar('MLPREFIX')
if not ml:
return
- packages = d.getVar('PACKAGES', True)
+ # exception for ${MLPREFIX}target-sdk-provides-dummy
+ if 'target-sdk-provides-dummy' in d.getVar('PN'):
+ return
+
+ packages = d.getVar('PACKAGES')
for pkg in packages.split():
check_mlprefix(pkg, 'RDEPENDS', ml)
check_mlprefix(pkg, 'RPROVIDES', ml)
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index 11ae2681f0..98f65c8aae 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -1,7 +1,7 @@
def preferred_ml_updates(d):
# If any PREFERRED_PROVIDER or PREFERRED_VERSION are set,
# we need to mirror these variables in the multilib case;
- multilibs = d.getVar('MULTILIBS', True) or ""
+ multilibs = d.getVar('MULTILIBS') or ""
if not multilibs:
return
@@ -13,11 +13,14 @@ def preferred_ml_updates(d):
versions = []
providers = []
+ rproviders = []
for v in d.keys():
if v.startswith("PREFERRED_VERSION_"):
versions.append(v)
if v.startswith("PREFERRED_PROVIDER_"):
providers.append(v)
+ if v.startswith("PREFERRED_RPROVIDER_"):
+ rproviders.append(v)
for v in versions:
val = d.getVar(v, False)
@@ -29,7 +32,6 @@ def preferred_ml_updates(d):
localdata = bb.data.createCopy(d)
override = ":virtclass-multilib-" + p
localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
- bb.data.update_data(localdata)
if "-canadian-" in pkg:
newname = localdata.expand(v)
else:
@@ -57,7 +59,6 @@ def preferred_ml_updates(d):
localdata = bb.data.createCopy(d)
override = ":virtclass-multilib-" + p
localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
- bb.data.update_data(localdata)
newname = localdata.expand(prov)
if newname != prov:
newval = localdata.expand(val)
@@ -80,7 +81,6 @@ def preferred_ml_updates(d):
localdata = bb.data.createCopy(d)
override = ":virtclass-multilib-" + p
localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
- bb.data.update_data(localdata)
newname = localdata.expand(prov)
if newname != prov and not d.getVar(newname, False):
d.setVar(newname, localdata.expand(newval))
@@ -94,7 +94,33 @@ def preferred_ml_updates(d):
if prov != provexp and d.getVar(prov, False):
d.renameVar(prov, provexp)
+ for prov in rproviders:
+ val = d.getVar(prov, False)
+ pkg = prov.replace("PREFERRED_RPROVIDER_", "")
+ for p in prefixes:
+ newval = p + "-" + val
+
+ # implement variable keys
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ newname = localdata.expand(prov)
+ if newname != prov and not d.getVar(newname, False):
+ d.setVar(newname, localdata.expand(newval))
+
+ # implement alternative multilib name
+ newname = localdata.expand("PREFERRED_RPROVIDER_" + p + "-" + pkg)
+ if not d.getVar(newname, False) and newval != None:
+ d.setVar(newname, localdata.expand(newval))
+ # Avoid future variable key expansion
+ provexp = d.expand(prov)
+ if prov != provexp and d.getVar(prov, False):
+ d.renameVar(prov, provexp)
+
def translate_provide(prefix, prov):
+ # Really need to know if kernel modules class is inherited somehow
+ if prov == "lttng-modules":
+ return prov
if not prov.startswith("virtual/"):
return prefix + "-" + prov
if prov == "virtual/kernel":
@@ -102,7 +128,7 @@ def preferred_ml_updates(d):
prov = prov.replace("virtual/", "")
return "virtual/" + prefix + "-" + prov
- mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
+ mp = (d.getVar("MULTI_PROVIDER_WHITELIST") or "").split()
extramp = []
for p in mp:
if p.endswith("-native") or "-crosssdk-" in p or p.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in p:
@@ -111,14 +137,14 @@ def preferred_ml_updates(d):
extramp.append(translate_provide(pref, p))
d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp))
- abisafe = (d.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE", True) or "").split()
+ abisafe = (d.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
extras = []
for p in prefixes:
for a in abisafe:
extras.append(p + "-" + a)
d.appendVar("SIGGEN_EXCLUDERECIPES_ABISAFE", " " + " ".join(extras))
- siggen_exclude = (d.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", True) or "").split()
+ siggen_exclude = (d.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
extras = []
for p in prefixes:
for a in siggen_exclude:
@@ -128,7 +154,7 @@ def preferred_ml_updates(d):
python multilib_virtclass_handler_vendor () {
if isinstance(e, bb.event.ConfigParsed):
- for v in e.data.getVar("MULTILIB_VARIANTS", True).split():
+ for v in e.data.getVar("MULTILIB_VARIANTS").split():
if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + v, False) is None:
e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + v, e.data.getVar("TARGET_VENDOR", False) + "ml" + v)
preferred_ml_updates(e.data)
@@ -137,39 +163,44 @@ addhandler multilib_virtclass_handler_vendor
multilib_virtclass_handler_vendor[eventmask] = "bb.event.ConfigParsed"
python multilib_virtclass_handler_global () {
- if not e.data:
+ variant = e.data.getVar("BBEXTENDVARIANT")
+ if variant:
return
- variant = e.data.getVar("BBEXTENDVARIANT", True)
+ non_ml_recipes = d.getVar('NON_MULTILIB_RECIPES').split()
- if isinstance(e, bb.event.RecipeParsed) and not variant:
- if bb.data.inherits_class('kernel', e.data) or \
+ if bb.data.inherits_class('kernel', e.data) or \
bb.data.inherits_class('module-base', e.data) or \
- (bb.data.inherits_class('allarch', e.data) and\
- not bb.data.inherits_class('packagegroup', e.data)):
- variants = (e.data.getVar("MULTILIB_VARIANTS", True) or "").split()
+ d.getVar('BPN') in non_ml_recipes:
+
+ # We need to avoid expanding KERNEL_VERSION which we can do by deleting it
+ # from a copy of the datastore
+ localdata = bb.data.createCopy(d)
+ localdata.delVar("KERNEL_VERSION")
+
+ variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
import oe.classextend
clsextends = []
for variant in variants:
- clsextends.append(oe.classextend.ClassExtender(variant, e.data))
+ clsextends.append(oe.classextend.ClassExtender(variant, localdata))
# Process PROVIDES
- origprovs = provs = e.data.getVar("PROVIDES", True) or ""
+ origprovs = provs = localdata.getVar("PROVIDES") or ""
for clsextend in clsextends:
provs = provs + " " + clsextend.map_variable("PROVIDES", setvar=False)
e.data.setVar("PROVIDES", provs)
# Process RPROVIDES
- origrprovs = rprovs = e.data.getVar("RPROVIDES", True) or ""
+ origrprovs = rprovs = localdata.getVar("RPROVIDES") or ""
for clsextend in clsextends:
rprovs = rprovs + " " + clsextend.map_variable("RPROVIDES", setvar=False)
if rprovs.strip():
e.data.setVar("RPROVIDES", rprovs)
- # Process RPROVIDES_${PN}...
- for pkg in (e.data.getVar("PACKAGES", True) or "").split():
- origrprovs = rprovs = e.data.getVar("RPROVIDES_%s" % pkg, True) or ""
+ # Process RPROVIDES_${PN}...
+ for pkg in (e.data.getVar("PACKAGES") or "").split():
+ origrprovs = rprovs = localdata.getVar("RPROVIDES_%s" % pkg) or ""
for clsextend in clsextends:
rprovs = rprovs + " " + clsextend.map_variable("RPROVIDES_%s" % pkg, setvar=False)
rprovs = rprovs + " " + clsextend.extname + "-" + pkg
@@ -177,5 +208,4 @@ python multilib_virtclass_handler_global () {
}
addhandler multilib_virtclass_handler_global
-multilib_virtclass_handler_global[eventmask] = "bb.event.RecipePreFinalise bb.event.RecipeParsed"
-
+multilib_virtclass_handler_global[eventmask] = "bb.event.RecipeTaskPreProcess"
diff --git a/meta/classes/multilib_header.bbclass b/meta/classes/multilib_header.bbclass
index 5ee0a2d562..e03f5b13b2 100644
--- a/meta/classes/multilib_header.bbclass
+++ b/meta/classes/multilib_header.bbclass
@@ -13,13 +13,9 @@ oe_multilib_header() {
;;
*)
esac
- # We use
- # For ARM: We don't support multilib builds.
# For MIPS: "n32" is a special case, which needs to be
# distinct from both 64-bit and 32-bit.
case ${TARGET_ARCH} in
- arm*) return
- ;;
mips*) case "${MIPSPKGSFX_ABI}" in
"-n32")
ident=n32
@@ -31,9 +27,6 @@ oe_multilib_header() {
;;
*) ident=${SITEINFO_BITS}
esac
- if echo ${TARGET_ARCH} | grep -q arm; then
- return
- fi
for each_header in "$@" ; do
if [ ! -f "${D}/${includedir}/$each_header" ]; then
bberror "oe_multilib_header: Unable to find header $each_header."
@@ -52,3 +45,8 @@ oe_multilib_header() {
oe_multilib_header_class-native () {
return
}
+
+# Nor do we need multilib headers for nativesdk builds.
+oe_multilib_header_class-nativesdk () {
+ return
+}
diff --git a/meta/classes/multilib_script.bbclass b/meta/classes/multilib_script.bbclass
new file mode 100644
index 0000000000..b11efc1ec5
--- /dev/null
+++ b/meta/classes/multilib_script.bbclass
@@ -0,0 +1,34 @@
+#
+# Recipe needs to set MULTILIB_SCRIPTS in the form <pkgname>:<scriptname>, e.g.
+# MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/file1 ${PN}:${base_bindir}/file2"
+# to indicate which script files to process from which packages.
+#
+
+inherit update-alternatives
+
+MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
+
+PACKAGE_PREPROCESS_FUNCS += "multilibscript_rename"
+
+multilibscript_rename() {
+ :
+}
+
+python () {
+ # Do nothing if multilib isn't being used
+ if not d.getVar("MULTILIB_VARIANTS"):
+ return
+ # Do nothing for native/cross
+ if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d):
+ return
+
+ for entry in (d.getVar("MULTILIB_SCRIPTS", False) or "").split():
+ pkg, script = entry.split(":")
+ epkg = d.expand(pkg)
+ scriptname = os.path.basename(script)
+ d.appendVar("ALTERNATIVE_" + epkg, " " + scriptname + " ")
+ d.setVarFlag("ALTERNATIVE_LINK_NAME", scriptname, script)
+ d.setVarFlag("ALTERNATIVE_TARGET", scriptname, script + "-${MULTILIB_SUFFIX}")
+ d.appendVar("multilibscript_rename", "\n mv ${PKGD}" + script + " ${PKGD}" + script + "-${MULTILIB_SUFFIX}")
+ d.appendVar("FILES_" + epkg, " " + script + "-${MULTILIB_SUFFIX}")
+}
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index f67ef00142..3a4f572552 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -44,7 +44,6 @@ CPPFLAGS = "${BUILD_CPPFLAGS}"
CFLAGS = "${BUILD_CFLAGS}"
CXXFLAGS = "${BUILD_CXXFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
-LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} "
STAGING_BINDIR = "${STAGING_BINDIR_NATIVE}"
STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}"
@@ -52,8 +51,6 @@ STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}"
# native pkg doesn't need the TOOLCHAIN_OPTIONS.
TOOLCHAIN_OPTIONS = ""
-DEPENDS_GETTEXT = "gettext-native"
-
# Don't build ptest natively
PTEST_ENABLED = "0"
@@ -80,6 +77,7 @@ exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
bindir = "${STAGING_BINDIR_NATIVE}"
sbindir = "${STAGING_SBINDIR_NATIVE}"
+base_libdir = "${STAGING_LIBDIR_NATIVE}"
libdir = "${STAGING_LIBDIR_NATIVE}"
includedir = "${STAGING_INCDIR_NATIVE}"
sysconfdir = "${STAGING_ETCDIR_NATIVE}"
@@ -87,16 +85,17 @@ datadir = "${STAGING_DATADIR_NATIVE}"
baselib = "lib"
-# Libtool's default paths are correct for the native machine
-lt_cv_sys_lib_dlsearch_path_spec[unexport] = "1"
+export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64"
NATIVE_PACKAGE_PATH_SUFFIX ?= ""
bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
+sbindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
+base_libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
libexecdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/"
-do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_NATIVE}/"
+do_populate_sysroot[sstate-outputdirs] = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/${PN}"
# Since we actually install these into situ there is no staging prefix
STAGING_DIR_HOST = ""
@@ -109,26 +108,40 @@ PKG_CONFIG_SYSROOT_DIR = ""
PKG_CONFIG_SYSTEM_LIBRARY_PATH[unexport] = "1"
PKG_CONFIG_SYSTEM_INCLUDE_PATH[unexport] = "1"
-# we dont want libc-uclibc or libc-glibc to kick in for native recipes
+# we dont want libc-*libc to kick in for native recipes
LIBCOVERRIDE = ""
CLASSOVERRIDE = "class-native"
MACHINEOVERRIDES = ""
+MACHINE_FEATURES = ""
PATH_prepend = "${COREBASE}/scripts/native-intercept:"
+# This class encodes staging paths into its scripts data so can only be
+# reused if we manipulate the paths.
+SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
+
+# No strip sysroot when DEBUG_BUILD is enabled
+INHIBIT_SYSROOT_STRIP ?= "${@oe.utils.vartrue('DEBUG_BUILD', '1', '', d)}"
+
python native_virtclass_handler () {
- classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
- if "native" not in classextend:
+ pn = e.data.getVar("PN")
+ if not pn.endswith("-native"):
return
- pn = e.data.getVar("PN", True)
- if not pn.endswith("-native"):
+ # Set features here to prevent appends and distro features backfill
+ # from modifying native distro features
+ features = set(d.getVar("DISTRO_FEATURES_NATIVE").split())
+ filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVE"), d).split())
+ d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
+
+ classextend = e.data.getVar('BBCLASSEXTEND') or ""
+ if "native" not in classextend:
return
def map_dependencies(varname, d, suffix = ""):
if suffix:
varname = varname + "_" + suffix
- deps = d.getVar(varname, True)
+ deps = d.getVar(varname)
if not deps:
return
deps = bb.utils.explode_deps(deps)
@@ -144,17 +157,15 @@ python native_virtclass_handler () {
newdeps.append(dep)
d.setVar(varname, " ".join(newdeps))
- e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native")
-
map_dependencies("DEPENDS", e.data)
- for pkg in [e.data.getVar("PN", True), "", "${PN}"]:
+ for pkg in [e.data.getVar("PN"), "", "${PN}"]:
map_dependencies("RDEPENDS", e.data, pkg)
map_dependencies("RRECOMMENDS", e.data, pkg)
map_dependencies("RSUGGESTS", e.data, pkg)
map_dependencies("RPROVIDES", e.data, pkg)
map_dependencies("RREPLACES", e.data, pkg)
- provides = e.data.getVar("PROVIDES", True)
+ provides = e.data.getVar("PROVIDES")
nprovides = []
for prov in provides.split():
if prov.find(pn) != -1:
@@ -171,9 +182,18 @@ python native_virtclass_handler () {
addhandler native_virtclass_handler
native_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
+python do_addto_recipe_sysroot () {
+ bb.build.exec_func("extend_recipe_sysroot", d)
+}
+addtask addto_recipe_sysroot after do_populate_sysroot
+do_addto_recipe_sysroot[deptask] = "do_populate_sysroot"
+
inherit nopackages
do_packagedata[stamp-extra-info] = ""
do_populate_sysroot[stamp-extra-info] = ""
USE_NLS = "no"
+
+RECIPERDEPTASK = "do_populate_sysroot"
+do_populate_sysroot[rdeptask] = "${RECIPERDEPTASK}"
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index f74da6267f..03135acedc 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -10,6 +10,13 @@ LIBCOVERRIDE = ":${NATIVESDKLIBC}"
CLASSOVERRIDE = "class-nativesdk"
MACHINEOVERRIDES = ""
+MULTILIBS = ""
+
+# we need consistent staging dir whether or not multilib is enabled
+STAGING_DIR_HOST = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_TARGET = "${WORKDIR}/recipe-sysroot"
+RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot"
+
#
# Update PACKAGE_ARCH and PACKAGE_ARCHS
#
@@ -23,9 +30,7 @@ PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}"
DEPENDS_append = " chrpath-replacement-native"
EXTRANATIVEPATH += "chrpath-native"
-STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}"
-STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}"
-PKGDATA_DIR = "${STAGING_DIR_HOST}/pkgdata"
+PKGDATA_DIR = "${TMPDIR}/pkgdata/${SDK_SYS}"
HOST_ARCH = "${SDK_ARCH}"
HOST_VENDOR = "${SDK_VENDOR}"
@@ -43,6 +48,10 @@ TARGET_PREFIX = "${SDK_PREFIX}"
TARGET_CC_ARCH = "${SDK_CC_ARCH}"
TARGET_LD_ARCH = "${SDK_LD_ARCH}"
TARGET_AS_ARCH = "${SDK_AS_ARCH}"
+TARGET_CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
+TARGET_CFLAGS = "${BUILDSDK_CFLAGS}"
+TARGET_CXXFLAGS = "${BUILDSDK_CXXFLAGS}"
+TARGET_LDFLAGS = "${BUILDSDK_LDFLAGS}"
TARGET_FPU = ""
EXTRA_OECONF_GCC_FLOAT = ""
@@ -62,17 +71,22 @@ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
python nativesdk_virtclass_handler () {
- pn = e.data.getVar("PN", True)
+ pn = e.data.getVar("PN")
if not (pn.endswith("-nativesdk") or pn.startswith("nativesdk-")):
return
+ # Set features here to prevent appends and distro features backfill
+ # from modifying nativesdk distro features
+ features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split())
+ filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVESDK"), d).split())
+ d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
+
e.data.setVar("MLPREFIX", "nativesdk-")
- e.data.setVar("PN", "nativesdk-" + e.data.getVar("PN", True).replace("-nativesdk", "").replace("nativesdk-", ""))
- e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-nativesdk")
+ e.data.setVar("PN", "nativesdk-" + e.data.getVar("PN").replace("-nativesdk", "").replace("nativesdk-", ""))
}
python () {
- pn = d.getVar("PN", True)
+ pn = d.getVar("PN")
if not pn.startswith("nativesdk-"):
return
@@ -80,12 +94,14 @@ python () {
clsextend = oe.classextend.NativesdkClassExtender("nativesdk", d)
clsextend.rename_packages()
- clsextend.rename_package_variables((d.getVar("PACKAGEVARS", True) or "").split())
+ clsextend.rename_package_variables((d.getVar("PACKAGEVARS") or "").split())
clsextend.map_depends_variable("DEPENDS")
clsextend.map_packagevars()
clsextend.map_variable("PROVIDES")
clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
+ d.setVar("LIBCEXTENSION", "")
+ d.setVar("ABIEXTENSION", "")
}
addhandler nativesdk_virtclass_handler
@@ -95,3 +111,5 @@ do_populate_sysroot[stamp-extra-info] = ""
do_packagedata[stamp-extra-info] = ""
USE_NLS = "${SDKUSE_NLS}"
+
+OLDEST_KERNEL = "${SDK_OLDEST_KERNEL}"
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index fce4c1146f..4b1f0a39f0 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -2,7 +2,15 @@ DEPENDS_prepend = "nodejs-native "
RDEPENDS_${PN}_prepend = "nodejs "
S = "${WORKDIR}/npmpkg"
-NPM_INSTALLDIR = "${D}${libdir}/node_modules/${PN}"
+def node_pkgname(d):
+ bpn = d.getVar('BPN')
+ if bpn.startswith("node-"):
+ return bpn[5:]
+ return bpn
+
+NPMPN ?= "${@node_pkgname(d)}"
+
+NPM_INSTALLDIR = "${libdir}/node_modules/${NPMPN}"
# function maps arch names to npm arch names
def npm_oe_arch_map(target_arch, d):
@@ -13,7 +21,8 @@ def npm_oe_arch_map(target_arch, d):
elif re.match('arm64$', target_arch): return 'arm'
return target_arch
-NPM_ARCH ?= "${@npm_oe_arch_map(d.getVar('TARGET_ARCH', True), d)}"
+NPM_ARCH ?= "${@npm_oe_arch_map(d.getVar('TARGET_ARCH'), d)}"
+NPM_INSTALL_DEV ?= "0"
npm_do_compile() {
# Copy in any additionally fetched modules
@@ -23,27 +32,45 @@ npm_do_compile() {
# changing the home directory to the working directory, the .npmrc will
# be created in this directory
export HOME=${WORKDIR}
- npm config set dev false
+ if [ "${NPM_INSTALL_DEV}" = "1" ]; then
+ npm config set dev true
+ else
+ npm config set dev false
+ fi
npm set cache ${WORKDIR}/npm_cache
# clear cache before every build
- npm cache clear
+ npm cache clear --force
# Install pkg into ${S} without going to the registry
- npm --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry install
+ if [ "${NPM_INSTALL_DEV}" = "1" ]; then
+ npm --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --no-registry install
+ else
+ npm --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry install
+ fi
}
npm_do_install() {
- mkdir -p ${NPM_INSTALLDIR}/
- cp -a ${S}/* ${NPM_INSTALLDIR}/ --no-preserve=ownership
+ # changing the home directory to the working directory, the .npmrc will
+ # be created in this directory
+ export HOME=${WORKDIR}
+ mkdir -p ${D}${libdir}/node_modules
+ local NPM_PACKFILE=$(npm pack .)
+ npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPM_PACKFILE}
+ ln -fs node_modules ${D}${libdir}/node
+ find ${D}${NPM_INSTALLDIR} -type f \( -name "*.a" -o -name "*.d" -o -name "*.o" \) -delete
+ if [ -d ${D}${prefix}/etc ] ; then
+ # This will be empty
+ rmdir ${D}${prefix}/etc
+ fi
}
python populate_packages_prepend () {
- instdir = d.expand('${D}${libdir}/node_modules/${PN}')
+ instdir = d.expand('${D}${NPM_INSTALLDIR}')
extrapackages = oe.package.npm_split_package_dirs(instdir)
pkgnames = extrapackages.keys()
d.prependVar('PACKAGES', '%s ' % ' '.join(pkgnames))
for pkgname in pkgnames:
pkgrelpath, pdata = extrapackages[pkgname]
- pkgpath = '${libdir}/node_modules/${PN}/' + pkgrelpath
+ pkgpath = '${NPM_INSTALLDIR}/' + pkgrelpath
# package names can't have underscores but npm packages sometimes use them
oe_pkg_name = pkgname.replace('_', '-')
expanded_pkgname = d.expand(oe_pkg_name)
@@ -55,11 +82,13 @@ python populate_packages_prepend () {
description = pdata.get('description', None)
if description:
d.setVar('SUMMARY_%s' % expanded_pkgname, description.replace(u"\u2018", "'").replace(u"\u2019", "'"))
- d.appendVar('RDEPENDS_%s' % d.getVar('PN', True), ' %s' % ' '.join(pkgnames).replace('_', '-'))
+ d.appendVar('RDEPENDS_%s' % d.getVar('PN'), ' %s' % ' '.join(pkgnames).replace('_', '-'))
}
FILES_${PN} += " \
- ${libdir}/node_modules/${PN} \
+ ${bindir} \
+ ${libdir}/node \
+ ${NPM_INSTALLDIR} \
"
EXPORT_FUNCTIONS do_compile do_install
diff --git a/meta/classes/oelint.bbclass b/meta/classes/oelint.bbclass
index c4febc2cfa..2589d34059 100644
--- a/meta/classes/oelint.bbclass
+++ b/meta/classes/oelint.bbclass
@@ -1,7 +1,7 @@
addtask lint before do_build
do_lint[nostamp] = "1"
python do_lint() {
- pkgname = d.getVar("PN", True)
+ pkgname = d.getVar("PN")
##############################
# Test that DESCRIPTION exists
@@ -35,7 +35,7 @@ python do_lint() {
# Check that all patches have Signed-off-by and Upstream-Status
#
srcuri = d.getVar("SRC_URI", False).split()
- fpaths = (d.getVar('FILESPATH', True) or '').split(':')
+ fpaths = (d.getVar('FILESPATH') or '').split(':')
def findPatch(patchname):
for dir in fpaths:
diff --git a/meta/classes/own-mirrors.bbclass b/meta/classes/own-mirrors.bbclass
index 12b42675bc..a777835138 100644
--- a/meta/classes/own-mirrors.bbclass
+++ b/meta/classes/own-mirrors.bbclass
@@ -1,13 +1,13 @@
-PREMIRRORS() {
-cvs://.*/.* ${SOURCE_MIRROR_URL}
-svn://.*/.* ${SOURCE_MIRROR_URL}
-git://.*/.* ${SOURCE_MIRROR_URL}
-gitsm://.*/.* ${SOURCE_MIRROR_URL}
-hg://.*/.* ${SOURCE_MIRROR_URL}
-bzr://.*/.* ${SOURCE_MIRROR_URL}
-p4://.*/.* ${SOURCE_MIRROR_URL}
-osc://.*/.* ${SOURCE_MIRROR_URL}
-https?$://.*/.* ${SOURCE_MIRROR_URL}
-ftp://.*/.* ${SOURCE_MIRROR_URL}
-npm://.*/.* ${SOURCE_MIRROR_URL}
-}
+PREMIRRORS_prepend = " \
+cvs://.*/.* ${SOURCE_MIRROR_URL} \n \
+svn://.*/.* ${SOURCE_MIRROR_URL} \n \
+git://.*/.* ${SOURCE_MIRROR_URL} \n \
+gitsm://.*/.* ${SOURCE_MIRROR_URL} \n \
+hg://.*/.* ${SOURCE_MIRROR_URL} \n \
+bzr://.*/.* ${SOURCE_MIRROR_URL} \n \
+p4://.*/.* ${SOURCE_MIRROR_URL} \n \
+osc://.*/.* ${SOURCE_MIRROR_URL} \n \
+https?$://.*/.* ${SOURCE_MIRROR_URL} \n \
+ftp://.*/.* ${SOURCE_MIRROR_URL} \n \
+npm://.*/?.* ${SOURCE_MIRROR_URL} \n \
+"
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index a9ca14164b..ef3de35961 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -26,7 +26,7 @@
# a list of affected files in FILER{PROVIDES,DEPENDS}FLIST_pkg
#
# h) package_do_shlibs - Look at the shared libraries generated and autotmatically add any
-# depenedencies found. Also stores the package name so anyone else using this library
+# dependencies found. Also stores the package name so anyone else using this library
# knows which package to depend on.
#
# i) package_do_pkgconfig - Keep track of which packages need and provide which .pc files
@@ -40,6 +40,7 @@
inherit packagedata
inherit chrpath
+inherit package_pkgdata
# Need the package_qa_handle_error() in insane.bbclass
inherit insane
@@ -52,7 +53,16 @@ LOCALE_SECTION ?= ''
ALL_MULTILIB_PACKAGE_ARCHS = "${@all_multilib_tune_values(d, 'PACKAGE_ARCHS')}"
# rpm is used for the per-file dependency identification
-PACKAGE_DEPENDS += "rpm-native"
+# dwarfsrcfiles is used to determine the list of debug source files
+PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native"
+
+
+# If your postinstall can execute at rootfs creation time rather than on
+# target but depends on a native/cross tool in order to execute, you need to
+# list that tool in PACKAGE_WRITE_DEPS. Target package dependencies belong
+# in the package dependencies as normal, this is just for native/cross support
+# tools at rootfs build time.
+PACKAGE_WRITE_DEPS ??= ""
def legitimize_package_name(s):
"""
@@ -66,7 +76,7 @@ def legitimize_package_name(s):
return ('\\u%s' % cp).encode('latin-1').decode('unicode_escape')
# Handle unicode codepoints encoded as <U0123>, as in glibc locale files.
- s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s)
+ s = re.sub(r'<U([0-9A-Fa-f]{1,4})>', fixutf, s)
# Remaining package name validity fixes
return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
@@ -120,7 +130,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
"""
- dvar = d.getVar('PKGD', True)
+ dvar = d.getVar('PKGD')
root = d.expand(root)
output_pattern = d.expand(output_pattern)
extra_depends = d.expand(extra_depends)
@@ -130,7 +140,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
if not os.path.exists(dvar + root):
return []
- ml = d.getVar("MLPREFIX", True)
+ ml = d.getVar("MLPREFIX")
if ml:
if not output_pattern.startswith(ml):
output_pattern = ml + output_pattern
@@ -145,7 +155,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
extra_depends = " ".join(newdeps)
- packages = d.getVar('PACKAGES', True).split()
+ packages = d.getVar('PACKAGES').split()
split_packages = set()
if postinst:
@@ -163,7 +173,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
objs.append(relpath)
if extra_depends == None:
- extra_depends = d.getVar("PN", True)
+ extra_depends = d.getVar("PN")
if not summary:
summary = description
@@ -189,7 +199,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
packages = [pkg] + packages
else:
packages.append(pkg)
- oldfiles = d.getVar('FILES_' + pkg, True)
+ oldfiles = d.getVar('FILES_' + pkg)
newfile = os.path.join(root, o)
# These names will be passed through glob() so if the filename actually
# contains * or ? (rare, but possible) we need to handle that specially
@@ -214,9 +224,9 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
d.setVar('FILES_' + pkg, oldfiles + " " + newfile)
if extra_depends != '':
d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
- if not d.getVar('DESCRIPTION_' + pkg, True):
+ if not d.getVar('DESCRIPTION_' + pkg):
d.setVar('DESCRIPTION_' + pkg, description % on)
- if not d.getVar('SUMMARY_' + pkg, True):
+ if not d.getVar('SUMMARY_' + pkg):
d.setVar('SUMMARY_' + pkg, summary % on)
if postinst:
d.setVar('pkg_postinst_' + pkg, postinst)
@@ -231,9 +241,9 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
PACKAGE_DEPENDS += "file-native"
python () {
- if d.getVar('PACKAGES', True) != '':
+ if d.getVar('PACKAGES') != '':
deps = ""
- for dep in (d.getVar('PACKAGE_DEPENDS', True) or "").split():
+ for dep in (d.getVar('PACKAGE_DEPENDS') or "").split():
deps += " %s:do_populate_sysroot" % dep
d.appendVarFlag('do_package', 'depends', deps)
@@ -286,14 +296,14 @@ def files_from_filevars(filevars):
# Called in package_<rpm,ipk,deb>.bbclass to get the correct list of configuration files
def get_conffiles(pkg, d):
- pkgdest = d.getVar('PKGDEST', True)
+ pkgdest = d.getVar('PKGDEST')
root = os.path.join(pkgdest, pkg)
cwd = os.getcwd()
os.chdir(root)
- conffiles = d.getVar('CONFFILES_%s' % pkg, True);
+ conffiles = d.getVar('CONFFILES_%s' % pkg);
if conffiles == None:
- conffiles = d.getVar('CONFFILES', True)
+ conffiles = d.getVar('CONFFILES')
if conffiles == None:
conffiles = ""
conffiles = conffiles.split()
@@ -318,7 +328,7 @@ def get_conffiles(pkg, d):
return conf_list
def checkbuildpath(file, d):
- tmpdir = d.getVar('TMPDIR', True)
+ tmpdir = d.getVar('TMPDIR')
with open(file) as f:
file_content = f.read()
if tmpdir in file_content:
@@ -326,22 +336,63 @@ def checkbuildpath(file, d):
return False
-def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
+def parse_debugsources_from_dwarfsrcfiles_output(dwarfsrcfiles_output):
+ debugfiles = {}
+
+ for line in dwarfsrcfiles_output.splitlines():
+ if line.startswith("\t"):
+ debugfiles[os.path.normpath(line.split()[0])] = ""
+
+ return debugfiles.keys()
+
+def source_info(file, d, fatal=True):
+ import subprocess
+
+ cmd = ["dwarfsrcfiles", file]
+ try:
+ output = subprocess.check_output(cmd, universal_newlines=True, stderr=subprocess.STDOUT)
+ retval = 0
+ except subprocess.CalledProcessError as exc:
+ output = exc.output
+ retval = exc.returncode
+
+ # 255 means a specific file wasn't fully parsed to get the debug file list, which is not a fatal failure
+ if retval != 0 and retval != 255:
+ msg = "dwarfsrcfiles failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")
+ if fatal:
+ bb.fatal(msg)
+ bb.note(msg)
+
+ debugsources = parse_debugsources_from_dwarfsrcfiles_output(output)
+
+ return list(debugsources)
+
+def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d):
# Function to split a single file into two components, one is the stripped
# target system binary, the other contains any debugging information. The
# two files are linked to reference each other.
#
- # sourcefile is also generated containing a list of debugsources
+ # return a mapping of files:debugsources
import stat
+ import subprocess
+
+ src = file[len(dvar):]
+ dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
+ debugfile = dvar + dest
+ sources = []
- dvar = d.getVar('PKGD', True)
- objcopy = d.getVar("OBJCOPY", True)
- debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
+ # Split the file...
+ bb.utils.mkdirhier(os.path.dirname(debugfile))
+ #bb.note("Split %s -> %s" % (file, debugfile))
+ # Only store off the hard link reference if we successfully split!
+
+ dvar = d.getVar('PKGD')
+ objcopy = d.getVar("OBJCOPY")
# We ignore kernel modules, we don't generate debug info files.
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
- return 1
+ return (file, sources)
newmode = None
if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
@@ -351,42 +402,42 @@ def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
# We need to extract the debug src information here...
if debugsrcdir:
- cmd = "'%s' -i -l '%s' '%s'" % (debugedit, sourcefile, file)
- (retval, output) = oe.utils.getstatusoutput(cmd)
- if retval:
- bb.fatal("debugedit failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ sources = source_info(file, d)
bb.utils.mkdirhier(os.path.dirname(debugfile))
- cmd = "'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile)
- (retval, output) = oe.utils.getstatusoutput(cmd)
- if retval:
- bb.fatal("objcopy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ subprocess.check_output([objcopy, '--only-keep-debug', file, debugfile], stderr=subprocess.STDOUT)
# Set the debuglink to have the view of the file path on the target
- cmd = "'%s' --add-gnu-debuglink='%s' '%s'" % (objcopy, debugfile, file)
- (retval, output) = oe.utils.getstatusoutput(cmd)
- if retval:
- bb.fatal("objcopy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ subprocess.check_output([objcopy, '--add-gnu-debuglink', debugfile, file], stderr=subprocess.STDOUT)
if newmode:
os.chmod(file, origmode)
- return 0
+ return (file, sources)
-def copydebugsources(debugsrcdir, d):
- # The debug src information written out to sourcefile is further procecessed
+def copydebugsources(debugsrcdir, sources, d):
+ # The debug src information written out to sourcefile is further processed
# and copied to the destination here.
import stat
-
- sourcefile = d.expand("${WORKDIR}/debugsources.list")
- if debugsrcdir and os.path.isfile(sourcefile):
- dvar = d.getVar('PKGD', True)
- strip = d.getVar("STRIP", True)
- objcopy = d.getVar("OBJCOPY", True)
- debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
- workdir = d.getVar("WORKDIR", True)
+ import subprocess
+
+ if debugsrcdir and sources:
+ sourcefile = d.expand("${WORKDIR}/debugsources.list")
+ bb.utils.remove(sourcefile)
+
+ # filenames are null-separated - this is an artefact of the previous use
+ # of rpm's debugedit, which was writing them out that way, and the code elsewhere
+ # is still assuming that.
+ debuglistoutput = '\0'.join(sources) + '\0'
+ with open(sourcefile, 'a') as sf:
+ sf.write(debuglistoutput)
+
+ dvar = d.getVar('PKGD')
+ strip = d.getVar("STRIP")
+ objcopy = d.getVar("OBJCOPY")
+ workdir = d.getVar("WORKDIR")
workparentdir = os.path.dirname(os.path.dirname(workdir))
workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir)
@@ -406,7 +457,8 @@ def copydebugsources(debugsrcdir, d):
bb.utils.mkdirhier(basepath)
cpath.updatecache(basepath)
- processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
+ # Ignore files from the recipe sysroots (target and native)
+ processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '((<internal>|<built-in>)$|/.*recipe-sysroot.*/)' | "
# We need to ignore files that are not actually ours
# we do this by only paying attention to items from this package
processdebugsrc += "fgrep -zw '%s' | "
@@ -415,23 +467,21 @@ def copydebugsources(debugsrcdir, d):
processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)"
cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir)
- (retval, output) = oe.utils.getstatusoutput(cmd)
- # Can "fail" if internal headers/transient sources are attempted
- #if retval:
- # bb.fatal("debug source copy failed with exit code %s (cmd was %s)" % (retval, cmd))
+ try:
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError:
+ # Can "fail" if internal headers/transient sources are attempted
+ pass
# cpio seems to have a bug with -lL together and symbolic links are just copied, not dereferenced.
# Work around this by manually finding and copying any symbolic links that made it through.
- cmd = "find %s%s -type l -print0 -delete | sed s#%s%s/##g | (cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)" % (dvar, debugsrcdir, dvar, debugsrcdir, workparentdir, dvar, debugsrcdir)
- (retval, output) = oe.utils.getstatusoutput(cmd)
- if retval:
- bb.fatal("debugsrc symlink fixup failed with exit code %s (cmd was %s)" % (retval, cmd))
+ cmd = "find %s%s -type l -print0 -delete | sed s#%s%s/##g | (cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s')" % \
+ (dvar, debugsrcdir, dvar, debugsrcdir, workparentdir, dvar, debugsrcdir)
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
# The copy by cpio may have resulted in some empty directories! Remove these
cmd = "find %s%s -empty -type d -delete" % (dvar, debugsrcdir)
- (retval, output) = oe.utils.getstatusoutput(cmd)
- if retval:
- bb.fatal("empty directory removal failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
# Also remove debugsrcdir if its empty
for p in nosuchdir[::-1]:
@@ -450,7 +500,8 @@ def get_package_mapping (pkg, basepkg, d):
if key in data:
# Have to avoid undoing the write_extra_pkgs(global_variants...)
- if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+ if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+ and data[key] == basepkg:
return pkg
return data[key]
@@ -462,26 +513,23 @@ def get_package_additional_metadata (pkg_type, d):
if d.getVar(key, False) is None:
continue
d.setVarFlag(key, "type", "list")
- if d.getVarFlag(key, "separator", True) is None:
+ if d.getVarFlag(key, "separator") is None:
d.setVarFlag(key, "separator", "\\n")
metadata_fields = [field.strip() for field in oe.data.typed_value(key, d)]
return "\n".join(metadata_fields).strip()
def runtime_mapping_rename (varname, pkg, d):
- #bb.note("%s before: %s" % (varname, d.getVar(varname, True)))
-
- if bb.data.inherits_class('packagegroup', d):
- return
+ #bb.note("%s before: %s" % (varname, d.getVar(varname)))
new_depends = {}
- deps = bb.utils.explode_dep_versions2(d.getVar(varname, True) or "")
+ deps = bb.utils.explode_dep_versions2(d.getVar(varname) or "")
for depend in deps:
new_depend = get_package_mapping(depend, pkg, d)
new_depends[new_depend] = deps[depend]
d.setVar(varname, bb.utils.join_deps(new_depends, commasep=False))
- #bb.note("%s after: %s" % (varname, d.getVar(varname, True)))
+ #bb.note("%s after: %s" % (varname, d.getVar(varname)))
#
# Package functions suitable for inclusion in PACKAGEFUNCS
@@ -492,34 +540,34 @@ python package_get_auto_pr() {
import re
# Support per recipe PRSERV_HOST
- pn = d.getVar('PN', True)
- host = d.getVar("PRSERV_HOST_" + pn, True)
+ pn = d.getVar('PN')
+ host = d.getVar("PRSERV_HOST_" + pn)
if not (host is None):
d.setVar("PRSERV_HOST", host)
- pkgv = d.getVar("PKGV", True)
+ pkgv = d.getVar("PKGV")
# PR Server not active, handle AUTOINC
- if not d.getVar('PRSERV_HOST', True):
+ if not d.getVar('PRSERV_HOST'):
if 'AUTOINC' in pkgv:
d.setVar("PKGV", pkgv.replace("AUTOINC", "0"))
return
auto_pr = None
- pv = d.getVar("PV", True)
- version = d.getVar("PRAUTOINX", True)
- pkgarch = d.getVar("PACKAGE_ARCH", True)
- checksum = d.getVar("BB_TASKHASH", True)
+ pv = d.getVar("PV")
+ version = d.getVar("PRAUTOINX")
+ pkgarch = d.getVar("PACKAGE_ARCH")
+ checksum = d.getVar("BB_TASKHASH")
- if d.getVar('PRSERV_LOCKDOWN', True):
- auto_pr = d.getVar('PRAUTO_' + version + '_' + pkgarch, True) or d.getVar('PRAUTO_' + version, True) or None
+ if d.getVar('PRSERV_LOCKDOWN'):
+ auto_pr = d.getVar('PRAUTO_' + version + '_' + pkgarch) or d.getVar('PRAUTO_' + version) or None
if auto_pr is None:
bb.fatal("Can NOT get PRAUTO from lockdown exported file")
d.setVar('PRAUTO',str(auto_pr))
return
try:
- conn = d.getVar("__PRSERV_CONN", True)
+ conn = d.getVar("__PRSERV_CONN")
if conn is None:
conn = oe.prservice.prserv_make_conn(d)
if conn is not None:
@@ -540,19 +588,19 @@ python package_get_auto_pr() {
LOCALEBASEPN ??= "${PN}"
python package_do_split_locales() {
- if (d.getVar('PACKAGE_NO_LOCALE', True) == '1'):
+ if (d.getVar('PACKAGE_NO_LOCALE') == '1'):
bb.debug(1, "package requested not splitting locales")
return
- packages = (d.getVar('PACKAGES', True) or "").split()
+ packages = (d.getVar('PACKAGES') or "").split()
- datadir = d.getVar('datadir', True)
+ datadir = d.getVar('datadir')
if not datadir:
bb.note("datadir not defined")
return
- dvar = d.getVar('PKGD', True)
- pn = d.getVar('LOCALEBASEPN', True)
+ dvar = d.getVar('PKGD')
+ pn = d.getVar('LOCALEBASEPN')
if pn + '-locale' in packages:
packages.remove(pn + '-locale')
@@ -565,10 +613,10 @@ python package_do_split_locales() {
locales = os.listdir(localedir)
- summary = d.getVar('SUMMARY', True) or pn
- description = d.getVar('DESCRIPTION', True) or ""
- locale_section = d.getVar('LOCALE_SECTION', True)
- mlprefix = d.getVar('MLPREFIX', True) or ""
+ summary = d.getVar('SUMMARY') or pn
+ description = d.getVar('DESCRIPTION') or ""
+ locale_section = d.getVar('LOCALE_SECTION')
+ mlprefix = d.getVar('MLPREFIX') or ""
for l in sorted(locales):
ln = legitimize_package_name(l)
pkg = pn + '-locale-' + ln
@@ -589,22 +637,22 @@ python package_do_split_locales() {
# glibc-localedata-translit* won't install as a dependency
# for some other package which breaks meta-toolchain
# Probably breaks since virtual-locale- isn't provided anywhere
- #rdep = (d.getVar('RDEPENDS_%s' % pn, True) or "").split()
+ #rdep = (d.getVar('RDEPENDS_%s' % pn) or "").split()
#rdep.append('%s-locale*' % pn)
#d.setVar('RDEPENDS_%s' % pn, ' '.join(rdep))
}
python perform_packagecopy () {
- dest = d.getVar('D', True)
- dvar = d.getVar('PKGD', True)
+ import subprocess
+
+ dest = d.getVar('D')
+ dvar = d.getVar('PKGD')
# Start by package population by taking a copy of the installed
# files to operate on
# Preserve sparse files and hard links
- cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (dest, dvar)
- (retval, output) = oe.utils.getstatusoutput(cmd)
- if retval:
- bb.fatal("file copy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar)
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
# replace RPATHs for the nativesdk binaries, to make them relocatable
if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d):
@@ -627,7 +675,7 @@ python fixup_perms () {
# __str__ can be used to print out an entry in the input format
#
# if fs_perms_entry.path is None:
- # an error occured
+ # an error occurred
# if fs_perms_entry.link, you can retrieve:
# fs_perms_entry.path = path
# fs_perms_entry.link = target of link
@@ -730,17 +778,19 @@ python fixup_perms () {
# paths are resolved via BBPATH
def get_fs_perms_list(d):
str = ""
- bbpath = d.getVar('BBPATH', True)
- fs_perms_tables = d.getVar('FILESYSTEM_PERMS_TABLES', True)
- if not fs_perms_tables:
- fs_perms_tables = 'files/fs-perms.txt'
+ bbpath = d.getVar('BBPATH')
+ fs_perms_tables = d.getVar('FILESYSTEM_PERMS_TABLES') or ""
for conf_file in fs_perms_tables.split():
- str += " %s" % bb.utils.which(bbpath, conf_file)
+ confpath = bb.utils.which(bbpath, conf_file)
+ if confpath:
+ str += " %s" % bb.utils.which(bbpath, conf_file)
+ else:
+ bb.warn("cannot find %s specified in FILESYSTEM_PERMS_TABLES" % conf_file)
return str
- dvar = d.getVar('PKGD', True)
+ dvar = d.getVar('PKGD')
fs_perms_table = {}
fs_link_table = {}
@@ -769,15 +819,16 @@ python fixup_perms () {
'oldincludedir' ]
for path in target_path_vars:
- dir = d.getVar(path, True) or ""
+ dir = d.getVar(path) or ""
if dir == "":
continue
- fs_perms_table[dir] = fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir), d))
+ fs_perms_table[dir] = fs_perms_entry(d.expand("%s 0755 root root false - - -" % (dir)))
# Now we actually load from the configuration files
for conf in get_fs_perms_list(d).split():
- if os.path.exists(conf):
- f = open(conf)
+ if not os.path.exists(conf):
+ continue
+ with open(conf) as f:
for line in f:
if line.startswith('#'):
continue
@@ -798,7 +849,6 @@ python fixup_perms () {
fs_perms_table[entry.path] = entry
if entry.path in fs_link_table:
fs_link_table.pop(entry.path)
- f.close()
# Debug -- list out in-memory table
#for dir in fs_perms_table:
@@ -853,26 +903,33 @@ python fixup_perms () {
python split_and_strip_files () {
import stat, errno
+ import subprocess
- dvar = d.getVar('PKGD', True)
- pn = d.getVar('PN', True)
+ dvar = d.getVar('PKGD')
+ pn = d.getVar('PN')
+ targetos = d.getVar('TARGET_OS')
oldcwd = os.getcwd()
os.chdir(dvar)
# We default to '.debug' style
- if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory':
+ if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-file-directory':
# Single debug-file-directory style debug info
debugappend = ".debug"
debugdir = ""
debuglibdir = "/usr/lib/debug"
debugsrcdir = "/usr/src/debug"
- elif d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-without-src':
+ elif d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-without-src':
# Original OE-core, a.k.a. ".debug", style debug info, but without sources in /usr/src/debug
debugappend = ""
debugdir = "/.debug"
debuglibdir = ""
debugsrcdir = ""
+ elif d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-with-srcpkg':
+ debugappend = ""
+ debugdir = "/.debug"
+ debuglibdir = ""
+ debugsrcdir = "/usr/src/debug"
else:
# Original OE-core, a.k.a. ".debug", style debug info
debugappend = ""
@@ -880,54 +937,30 @@ python split_and_strip_files () {
debuglibdir = ""
debugsrcdir = "/usr/src/debug"
- sourcefile = d.expand("${WORKDIR}/debugsources.list")
- bb.utils.remove(sourcefile)
-
- # Return type (bits):
- # 0 - not elf
- # 1 - ELF
- # 2 - stripped
- # 4 - executable
- # 8 - shared library
- # 16 - kernel module
- def isELF(path):
- type = 0
- ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
-
- if ret:
- msg = "split_and_strip_files: 'file %s' failed" % path
- package_qa_handle_error("split-strip", msg, d)
- return type
-
- # Not stripped
- if "ELF" in result:
- type |= 1
- if "not stripped" not in result:
- type |= 2
- if "executable" in result:
- type |= 4
- if "shared" in result:
- type |= 8
- return type
-
-
#
# First lets figure out all of the files we may have to process ... do this only once!
#
elffiles = {}
symlinks = {}
kernmods = []
+ staticlibs = []
inodes = {}
- libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
- baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
- if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1' or \
- d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1'):
+ libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir"))
+ baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir"))
+ skipfiles = (d.getVar("INHIBIT_PACKAGE_STRIP_FILES") or "").split()
+ if (d.getVar('INHIBIT_PACKAGE_STRIP') != '1' or \
+ d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
+ checkelf = {}
+ checkelflinks = {}
for root, dirs, files in cpath.walk(dvar):
for f in files:
file = os.path.join(root, f)
if file.endswith(".ko") and file.find("/lib/modules/") != -1:
kernmods.append(file)
continue
+ if oe.package.is_static_lib(file):
+ staticlibs.append(file)
+ continue
# Skip debug files
if debugappend and file.endswith(debugappend):
@@ -935,6 +968,9 @@ python split_and_strip_files () {
if debugdir and debugdir in os.path.dirname(file[len(dvar):]):
continue
+ if file in skipfiles:
+ continue
+
try:
ltarget = cpath.realpath(file, dvar, False)
s = cpath.lstat(ltarget)
@@ -946,76 +982,97 @@ python split_and_strip_files () {
continue
if not s:
continue
- # Check its an excutable
+ # Check its an executable
if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
or ((file.startswith(libdir) or file.startswith(baselibdir)) and (".so" in f or ".node" in f)):
- # If it's a symlink, and points to an ELF file, we capture the readlink target
+
if cpath.islink(file):
- target = os.readlink(file)
- if isELF(ltarget):
- #bb.note("Sym: %s (%d)" % (ltarget, isELF(ltarget)))
- symlinks[file] = target
+ checkelflinks[file] = ltarget
continue
+ # Use a reference of device ID and inode number to identify files
+ file_reference = "%d_%d" % (s.st_dev, s.st_ino)
+ checkelf[file] = (file, file_reference)
+
+ results = oe.utils.multiprocess_launch(oe.package.is_elf, checkelflinks.values(), d)
+ results_map = {}
+ for (ltarget, elf_file) in results:
+ results_map[ltarget] = elf_file
+ for file in checkelflinks:
+ ltarget = checkelflinks[file]
+ # If it's a symlink, and points to an ELF file, we capture the readlink target
+ if results_map[ltarget]:
+ target = os.readlink(file)
+ #bb.note("Sym: %s (%d)" % (ltarget, results_map[ltarget]))
+ symlinks[file] = target
+
+ results = oe.utils.multiprocess_launch(oe.package.is_elf, checkelf.keys(), d)
+
+ # Sort results by file path. This ensures that the files are always
+ # processed in the same order, which is important to make sure builds
+ # are reproducible when dealing with hardlinks
+ results.sort(key=lambda x: x[0])
+
+ for (file, elf_file) in results:
+ # It's a file (or hardlink), not a link
+ # ...but is it ELF, and is it already stripped?
+ if elf_file & 1:
+ if elf_file & 2:
+ if 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn) or "").split():
+ bb.note("Skipping file %s from %s for already-stripped QA test" % (file[len(dvar):], pn))
+ else:
+ msg = "File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn)
+ package_qa_handle_error("already-stripped", msg, d)
+ continue
- # It's a file (or hardlink), not a link
- # ...but is it ELF, and is it already stripped?
- elf_file = isELF(file)
- if elf_file & 1:
- if elf_file & 2:
- if 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
- bb.note("Skipping file %s from %s for already-stripped QA test" % (file[len(dvar):], pn))
- else:
- msg = "File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn)
- package_qa_handle_error("already-stripped", msg, d)
- continue
-
- # At this point we have an unstripped elf file. We need to:
- # a) Make sure any file we strip is not hardlinked to anything else outside this tree
- # b) Only strip any hardlinked file once (no races)
- # c) Track any hardlinks between files so that we can reconstruct matching debug file hardlinks
-
- # Use a reference of device ID and inode number to indentify files
- file_reference = "%d_%d" % (s.st_dev, s.st_ino)
- if file_reference in inodes:
- os.unlink(file)
- os.link(inodes[file_reference][0], file)
- inodes[file_reference].append(file)
- else:
- inodes[file_reference] = [file]
- # break hardlink
- bb.utils.copyfile(file, file)
- elffiles[file] = elf_file
- # Modified the file so clear the cache
- cpath.updatecache(file)
+ # At this point we have an unstripped elf file. We need to:
+ # a) Make sure any file we strip is not hardlinked to anything else outside this tree
+ # b) Only strip any hardlinked file once (no races)
+ # c) Track any hardlinks between files so that we can reconstruct matching debug file hardlinks
+
+ # Use a reference of device ID and inode number to identify files
+ file_reference = checkelf[file][1]
+ if file_reference in inodes:
+ os.unlink(file)
+ os.link(inodes[file_reference][0], file)
+ inodes[file_reference].append(file)
+ else:
+ inodes[file_reference] = [file]
+ # break hardlink
+ bb.utils.break_hardlinks(file)
+ elffiles[file] = elf_file
+ # Modified the file so clear the cache
+ cpath.updatecache(file)
#
# First lets process debug splitting
#
- if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1'):
- for file in elffiles:
- src = file[len(dvar):]
- dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
- fpath = dvar + dest
+ if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
+ results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d))
- # Split the file...
- bb.utils.mkdirhier(os.path.dirname(fpath))
- #bb.note("Split %s -> %s" % (file, fpath))
- # Only store off the hard link reference if we successfully split!
- splitdebuginfo(file, fpath, debugsrcdir, sourcefile, d)
+ if debugsrcdir and not targetos.startswith("mingw"):
+ for file in staticlibs:
+ results.extend(source_info(file, d, fatal=False))
+
+ sources = set()
+ for r in results:
+ sources.update(r[1])
# Hardlink our debug symbols to the other hardlink copies
for ref in inodes:
if len(inodes[ref]) == 1:
continue
+
+ target = inodes[ref][0][len(dvar):]
for file in inodes[ref][1:]:
src = file[len(dvar):]
- dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
+ dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(target) + debugappend
fpath = dvar + dest
- target = inodes[ref][0][len(dvar):]
ftarget = dvar + debuglibdir + os.path.dirname(target) + debugdir + "/" + os.path.basename(target) + debugappend
bb.utils.mkdirhier(os.path.dirname(fpath))
- #bb.note("Link %s -> %s" % (fpath, ftarget))
- os.link(ftarget, fpath)
+ # Only one hardlink of separated debug info file in each directory
+ if not os.access(fpath, os.R_OK):
+ #bb.note("Link %s -> %s" % (fpath, ftarget))
+ os.link(ftarget, fpath)
# Create symlinks for all cases we were able to split symbols
for file in symlinks:
@@ -1046,7 +1103,7 @@ python split_and_strip_files () {
# Process the debugsrcdir if requested...
# This copies and places the referenced sources for later debugging...
- copydebugsources(debugsrcdir, d)
+ copydebugsources(debugsrcdir, sources, d)
#
# End of debug splitting
#
@@ -1054,8 +1111,8 @@ python split_and_strip_files () {
#
# Now lets go back over things and strip them
#
- if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
- strip = d.getVar("STRIP", True)
+ if (d.getVar('INHIBIT_PACKAGE_STRIP') != '1'):
+ strip = d.getVar("STRIP")
sfiles = []
for file in elffiles:
elf_file = int(elffiles[file])
@@ -1064,7 +1121,7 @@ python split_and_strip_files () {
for f in kernmods:
sfiles.append((f, 16, strip))
- oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
+ oe.utils.multiprocess_launch(oe.package.runstrip, sfiles, d)
#
# End of strip
@@ -1075,31 +1132,48 @@ python split_and_strip_files () {
python populate_packages () {
import glob, re
- workdir = d.getVar('WORKDIR', True)
- outdir = d.getVar('DEPLOY_DIR', True)
- dvar = d.getVar('PKGD', True)
- packages = d.getVar('PACKAGES', True)
- pn = d.getVar('PN', True)
+ workdir = d.getVar('WORKDIR')
+ outdir = d.getVar('DEPLOY_DIR')
+ dvar = d.getVar('PKGD')
+ packages = d.getVar('PACKAGES').split()
+ pn = d.getVar('PN')
bb.utils.mkdirhier(outdir)
os.chdir(dvar)
- autodebug = not (d.getVar("NOAUTOPACKAGEDEBUG", True) or False)
+ autodebug = not (d.getVar("NOAUTOPACKAGEDEBUG") or False)
+
+ split_source_package = (d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-with-srcpkg')
+
+ # If debug-with-srcpkg mode is enabled then add the source package if it
+ # doesn't exist and add the source file contents to the source package.
+ if split_source_package:
+ src_package_name = ('%s-src' % d.getVar('PN'))
+ if not src_package_name in packages:
+ packages.append(src_package_name)
+ d.setVar('FILES_%s' % src_package_name, '/usr/src/debug')
# Sanity check PACKAGES for duplicates
- # Sanity should be moved to sanity.bbclass once we have the infrastucture
- package_list = []
+ # Sanity should be moved to sanity.bbclass once we have the infrastructure
+ package_dict = {}
- for pkg in packages.split():
- if pkg in package_list:
+ for i, pkg in enumerate(packages):
+ if pkg in package_dict:
msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg
package_qa_handle_error("packages-list", msg, d)
+ # Ensure the source package gets the chance to pick up the source files
+ # before the debug package by ordering it first in PACKAGES. Whether it
+ # actually picks up any source files is controlled by
+ # PACKAGE_DEBUG_SPLIT_STYLE.
+ elif pkg.endswith("-src"):
+ package_dict[pkg] = (10, i)
elif autodebug and pkg.endswith("-dbg"):
- package_list.insert(0, pkg)
+ package_dict[pkg] = (30, i)
else:
- package_list.append(pkg)
- d.setVar('PACKAGES', ' '.join(package_list))
- pkgdest = d.getVar('PKGDEST', True)
+ package_dict[pkg] = (50, i)
+ packages = sorted(package_dict.keys(), key=package_dict.get)
+ d.setVar('PACKAGES', ' '.join(packages))
+ pkgdest = d.getVar('PKGDEST')
seen = []
@@ -1116,11 +1190,11 @@ python populate_packages () {
if "/.debug/" in path or path.endswith("/.debug"):
debug.append(path)
- for pkg in package_list:
+ for pkg in packages:
root = os.path.join(pkgdest, pkg)
bb.utils.mkdirhier(root)
- filesvar = d.getVar('FILES_%s' % pkg, True) or ""
+ filesvar = d.getVar('FILES_%s' % pkg) or ""
if "//" in filesvar:
msg = "FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg
package_qa_handle_error("files-invalid", msg, d)
@@ -1143,7 +1217,8 @@ python populate_packages () {
src = os.path.join(src, p)
dest = os.path.join(dest, p)
fstat = cpath.stat(src)
- os.mkdir(dest, fstat.st_mode)
+ os.mkdir(dest)
+ os.chmod(dest, fstat.st_mode)
os.chown(dest, fstat.st_uid, fstat.st_gid)
if p not in seen:
seen.append(p)
@@ -1171,7 +1246,7 @@ python populate_packages () {
continue
ret = bb.utils.copyfile(file, fpath)
if ret is False or ret == 0:
- raise bb.build.FuncFailed("File population failed")
+ bb.fatal("File population failed")
# Check if symlink paths exist
for file in symlink_paths:
@@ -1187,9 +1262,10 @@ python populate_packages () {
# Handle LICENSE_EXCLUSION
package_list = []
- for pkg in packages.split():
- if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
- msg = "%s has an incompatible license. Excluding from packaging." % pkg
+ for pkg in packages:
+ licenses = d.getVar('LICENSE_EXCLUSION-' + pkg)
+ if licenses:
+ msg = "Excluding %s from packaging as it has incompatible license(s): %s" % (pkg, licenses)
package_qa_handle_error("incompatible-license", msg, d)
else:
package_list.append(pkg)
@@ -1207,7 +1283,7 @@ python populate_packages () {
if unshipped != []:
msg = pn + ": Files/directories were installed but not shipped in any package:"
- if "installed-vs-shipped" in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
+ if "installed-vs-shipped" in (d.getVar('INSANE_SKIP_' + pn) or "").split():
bb.note("Package %s skipping QA tests: installed-vs-shipped" % pn)
else:
for f in unshipped:
@@ -1220,7 +1296,7 @@ populate_packages[dirs] = "${D}"
python package_fixsymlinks () {
import errno
- pkgdest = d.getVar('PKGDEST', True)
+ pkgdest = d.getVar('PKGDEST')
packages = d.getVar("PACKAGES", False).split()
dangling_links = {}
@@ -1255,7 +1331,7 @@ python package_fixsymlinks () {
bb.note("%s contains dangling symlink to %s" % (pkg, l))
for pkg in newrdepends:
- rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or "")
+ rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg) or "")
for p in newrdepends[pkg]:
if p not in rdepends:
rdepends[p] = []
@@ -1276,21 +1352,57 @@ EXPORT_FUNCTIONS package_name_hook
PKGDESTWORK = "${WORKDIR}/pkgdata"
+PKGDATA_VARS = "PN PE PV PR PKGE PKGV PKGR LICENSE DESCRIPTION SUMMARY RDEPENDS RPROVIDES RRECOMMENDS RSUGGESTS RREPLACES RCONFLICTS SECTION PKG ALLOW_EMPTY FILES CONFFILES FILES_INFO pkg_postinst pkg_postrm pkg_preinst pkg_prerm"
+
python emit_pkgdata() {
from glob import glob
import json
+ def process_postinst_on_target(pkg, mlprefix):
+ pkgval = d.getVar('PKG_%s' % pkg)
+ if pkgval is None:
+ pkgval = pkg
+
+ defer_fragment = """
+if [ -n "$D" ]; then
+ $INTERCEPT_DIR/postinst_intercept delay_to_first_boot %s mlprefix=%s
+ exit 0
+fi
+""" % (pkgval, mlprefix)
+
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
+ postinst_ontarget = d.getVar('pkg_postinst_ontarget_%s' % pkg)
+
+ if postinst_ontarget:
+ bb.debug(1, 'adding deferred pkg_postinst_ontarget() to pkg_postinst() for %s' % pkg)
+ if not postinst:
+ postinst = '#!/bin/sh\n'
+ postinst += defer_fragment
+ postinst += postinst_ontarget
+ d.setVar('pkg_postinst_%s' % pkg, postinst)
+
+ def add_set_e_to_scriptlets(pkg):
+ for scriptlet_name in ('pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm'):
+ scriptlet = d.getVar('%s_%s' % (scriptlet_name, pkg))
+ if scriptlet:
+ scriptlet_split = scriptlet.split('\n')
+ if scriptlet_split[0].startswith("#!"):
+ scriptlet = scriptlet_split[0] + "\nset -e\n" + "\n".join(scriptlet_split[1:])
+ else:
+ scriptlet = "set -e\n" + "\n".join(scriptlet_split[0:])
+ d.setVar('%s_%s' % (scriptlet_name, pkg), scriptlet)
+
def write_if_exists(f, pkg, var):
def encode(str):
import codecs
c = codecs.getencoder("unicode_escape")
return c(str)[0].decode("latin1")
- val = d.getVar('%s_%s' % (var, pkg), True)
+ val = d.getVar('%s_%s' % (var, pkg))
if val:
f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
return val
- val = d.getVar('%s' % (var), True)
+ val = d.getVar('%s' % (var))
if val:
f.write('%s: %s\n' % (var, encode(val)))
return val
@@ -1309,32 +1421,29 @@ python emit_pkgdata() {
with open(subdata_file, 'w') as fd:
fd.write("PKG_%s: %s" % (ml_pkg, pkg))
- packages = d.getVar('PACKAGES', True)
- pkgdest = d.getVar('PKGDEST', True)
- pkgdatadir = d.getVar('PKGDESTWORK', True)
-
- # Take shared lock since we're only reading, not writing
- lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
+ packages = d.getVar('PACKAGES')
+ pkgdest = d.getVar('PKGDEST')
+ pkgdatadir = d.getVar('PKGDESTWORK')
- data_file = pkgdatadir + d.expand("/${PN}" )
- f = open(data_file, 'w')
- f.write("PACKAGES: %s\n" % packages)
- f.close()
+ data_file = pkgdatadir + d.expand("/${PN}")
+ with open(data_file, 'w') as fd:
+ fd.write("PACKAGES: %s\n" % packages)
- pn = d.getVar('PN', True)
- global_variants = (d.getVar('MULTILIB_GLOBAL_VARIANTS', True) or "").split()
- variants = (d.getVar('MULTILIB_VARIANTS', True) or "").split()
+ pn = d.getVar('PN')
+ global_variants = (d.getVar('MULTILIB_GLOBAL_VARIANTS') or "").split()
+ variants = (d.getVar('MULTILIB_VARIANTS') or "").split()
if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
write_extra_pkgs(variants, pn, packages, pkgdatadir)
- if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+ if bb.data.inherits_class('allarch', d) and not variants \
+ and not bb.data.inherits_class('packagegroup', d):
write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
- workdir = d.getVar('WORKDIR', True)
+ workdir = d.getVar('WORKDIR')
for pkg in packages.split():
- pkgval = d.getVar('PKG_%s' % pkg, True)
+ pkgval = d.getVar('PKG_%s' % pkg)
if pkgval is None:
pkgval = pkg
d.setVar('PKG_%s' % pkg, pkg)
@@ -1342,61 +1451,45 @@ python emit_pkgdata() {
pkgdestpkg = os.path.join(pkgdest, pkg)
files = {}
total_size = 0
+ seen = set()
for f in pkgfiles[pkg]:
relpth = os.path.relpath(f, pkgdestpkg)
fstat = os.lstat(f)
- total_size += fstat.st_size
files[os.sep + relpth] = fstat.st_size
- d.setVar('FILES_INFO', json.dumps(files))
+ if fstat.st_ino not in seen:
+ seen.add(fstat.st_ino)
+ total_size += fstat.st_size
+ d.setVar('FILES_INFO', json.dumps(files, sort_keys=True))
+
+ process_postinst_on_target(pkg, d.getVar("MLPREFIX"))
+ add_set_e_to_scriptlets(pkg)
subdata_file = pkgdatadir + "/runtime/%s" % pkg
- sf = open(subdata_file, 'w')
- write_if_exists(sf, pkg, 'PN')
- write_if_exists(sf, pkg, 'PE')
- write_if_exists(sf, pkg, 'PV')
- write_if_exists(sf, pkg, 'PR')
- write_if_exists(sf, pkg, 'PKGE')
- write_if_exists(sf, pkg, 'PKGV')
- write_if_exists(sf, pkg, 'PKGR')
- write_if_exists(sf, pkg, 'LICENSE')
- write_if_exists(sf, pkg, 'DESCRIPTION')
- write_if_exists(sf, pkg, 'SUMMARY')
- write_if_exists(sf, pkg, 'RDEPENDS')
- rprov = write_if_exists(sf, pkg, 'RPROVIDES')
- write_if_exists(sf, pkg, 'RRECOMMENDS')
- write_if_exists(sf, pkg, 'RSUGGESTS')
- write_if_exists(sf, pkg, 'RREPLACES')
- write_if_exists(sf, pkg, 'RCONFLICTS')
- write_if_exists(sf, pkg, 'SECTION')
- write_if_exists(sf, pkg, 'PKG')
- write_if_exists(sf, pkg, 'ALLOW_EMPTY')
- write_if_exists(sf, pkg, 'FILES')
- write_if_exists(sf, pkg, 'pkg_postinst')
- write_if_exists(sf, pkg, 'pkg_postrm')
- write_if_exists(sf, pkg, 'pkg_preinst')
- write_if_exists(sf, pkg, 'pkg_prerm')
- write_if_exists(sf, pkg, 'FILERPROVIDESFLIST')
- write_if_exists(sf, pkg, 'FILES_INFO')
- for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg, True) or "").split():
- write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile)
-
- write_if_exists(sf, pkg, 'FILERDEPENDSFLIST')
- for dfile in (d.getVar('FILERDEPENDSFLIST_' + pkg, True) or "").split():
- write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile)
-
- sf.write('%s_%s: %d\n' % ('PKGSIZE', pkg, total_size))
- sf.close()
+ with open(subdata_file, 'w') as sf:
+ for var in (d.getVar('PKGDATA_VARS') or "").split():
+ val = write_if_exists(sf, pkg, var)
+
+ write_if_exists(sf, pkg, 'FILERPROVIDESFLIST')
+ for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg) or "").split():
+ write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile)
+
+ write_if_exists(sf, pkg, 'FILERDEPENDSFLIST')
+ for dfile in (d.getVar('FILERDEPENDSFLIST_' + pkg) or "").split():
+ write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile)
+
+ sf.write('%s_%s: %d\n' % ('PKGSIZE', pkg, total_size))
# Symlinks needed for rprovides lookup
+ rprov = d.getVar('RPROVIDES_%s' % pkg) or d.getVar('RPROVIDES')
if rprov:
for p in rprov.strip().split():
subdata_sym = pkgdatadir + "/runtime-rprovides/%s/%s" % (p, pkg)
bb.utils.mkdirhier(os.path.dirname(subdata_sym))
oe.path.symlink("../../runtime/%s" % pkg, subdata_sym, True)
- allow_empty = d.getVar('ALLOW_EMPTY_%s' % pkg, True)
+ allow_empty = d.getVar('ALLOW_EMPTY_%s' % pkg)
if not allow_empty:
- allow_empty = d.getVar('ALLOW_EMPTY', True)
+ allow_empty = d.getVar('ALLOW_EMPTY')
root = "%s/%s" % (pkgdest, pkg)
os.chdir(root)
g = glob('*')
@@ -1411,10 +1504,10 @@ python emit_pkgdata() {
if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
write_extra_runtime_pkgs(variants, packages, pkgdatadir)
- if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+ if bb.data.inherits_class('allarch', d) and not variants \
+ and not bb.data.inherits_class('packagegroup', d):
write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
- bb.utils.unlockfile(lf)
}
emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides"
@@ -1424,7 +1517,7 @@ if [ x"$D" = "x" ]; then
fi
}
-RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps-oecore --macros ${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path ${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt ${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt"
+RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps --alldeps"
# Collect perfile run-time dependency metadata
# Output:
@@ -1435,26 +1528,26 @@ RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps-oecore --macros ${STAGING_LI
# FILERDEPENDS_filepath_pkg - per file dep
python package_do_filedeps() {
- if d.getVar('SKIP_FILEDEPS', True) == '1':
+ if d.getVar('SKIP_FILEDEPS') == '1':
return
- pkgdest = d.getVar('PKGDEST', True)
- packages = d.getVar('PACKAGES', True)
- rpmdeps = d.getVar('RPMDEPS', True)
+ pkgdest = d.getVar('PKGDEST')
+ packages = d.getVar('PACKAGES')
+ rpmdeps = d.getVar('RPMDEPS')
def chunks(files, n):
return [files[i:i+n] for i in range(0, len(files), n)]
pkglist = []
for pkg in packages.split():
- if d.getVar('SKIP_FILEDEPS_' + pkg, True) == '1':
+ if d.getVar('SKIP_FILEDEPS_' + pkg) == '1':
continue
- if pkg.endswith('-dbg') or pkg.endswith('-doc') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1 or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-'):
+ if pkg.endswith('-dbg') or pkg.endswith('-doc') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1 or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-') or pkg.endswith('-src'):
continue
for files in chunks(pkgfiles[pkg], 100):
pkglist.append((pkg, files, rpmdeps, pkgdest))
- processed = oe.utils.multiprocess_exec( pkglist, oe.package.filedeprunner)
+ processed = oe.utils.multiprocess_launch(oe.package.filedeprunner, pkglist, d)
provides_files = {}
requires_files = {}
@@ -1467,15 +1560,15 @@ python package_do_filedeps() {
if pkg not in requires_files:
requires_files[pkg] = []
- for file in provides:
+ for file in sorted(provides):
provides_files[pkg].append(file)
key = "FILERPROVIDES_" + file + "_" + pkg
- d.setVar(key, " ".join(provides[file]))
+ d.appendVar(key, " " + " ".join(provides[file]))
- for file in requires:
+ for file in sorted(requires):
requires_files[pkg].append(file)
key = "FILERDEPENDS_" + file + "_" + pkg
- d.setVar(key, " ".join(requires[file]))
+ d.appendVar(key, " " + " ".join(requires[file]))
for pkg in requires_files:
d.setVar("FILERDEPENDSFLIST_" + pkg, " ".join(requires_files[pkg]))
@@ -1483,71 +1576,85 @@ python package_do_filedeps() {
d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files[pkg]))
}
-SHLIBSDIRS = "${PKGDATA_DIR}/${MLPREFIX}shlibs2"
+SHLIBSDIRS = "${WORKDIR_PKGDATA}/${MLPREFIX}shlibs2"
SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs2"
python package_do_shlibs() {
+ import itertools
import re, pipes
- import subprocess as sub
+ import subprocess
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False)
if exclude_shlibs:
bb.note("not generating shlibs")
return
- lib_re = re.compile("^.*\.so")
- libdir_re = re.compile(".*/%s$" % d.getVar('baselib', True))
+ lib_re = re.compile(r"^.*\.so")
+ libdir_re = re.compile(r".*/%s$" % d.getVar('baselib'))
+
+ packages = d.getVar('PACKAGES')
+
+ shlib_pkgs = []
+ exclusion_list = d.getVar("EXCLUDE_PACKAGES_FROM_SHLIBS")
+ if exclusion_list:
+ for pkg in packages.split():
+ if pkg not in exclusion_list.split():
+ shlib_pkgs.append(pkg)
+ else:
+ bb.note("not generating shlibs for %s" % pkg)
+ else:
+ shlib_pkgs = packages.split()
- packages = d.getVar('PACKAGES', True)
- targetos = d.getVar('TARGET_OS', True)
+ targetos = d.getVar('TARGET_OS')
- workdir = d.getVar('WORKDIR', True)
+ workdir = d.getVar('WORKDIR')
- ver = d.getVar('PKGV', True)
+ ver = d.getVar('PKGV')
if not ver:
msg = "PKGV not defined"
package_qa_handle_error("pkgv-undefined", msg, d)
return
- pkgdest = d.getVar('PKGDEST', True)
-
- shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
+ pkgdest = d.getVar('PKGDEST')
- # Take shared lock since we're only reading, not writing
- lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
+ shlibswork_dir = d.getVar('SHLIBSWORKDIR')
- def linux_so(file, needed, sonames, renames, pkgver):
+ def linux_so(file, pkg, pkgver, d):
needs_ldconfig = False
+ needed = set()
+ sonames = set()
+ renames = []
ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '')
- cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(file) + " 2>/dev/null"
+ cmd = d.getVar('OBJDUMP') + " -p " + pipes.quote(file) + " 2>/dev/null"
fd = os.popen(cmd)
lines = fd.readlines()
fd.close()
- rpath = []
+ rpath = tuple()
for l in lines:
- m = re.match("\s+RPATH\s+([^\s]*)", l)
+ m = re.match(r"\s+RPATH\s+([^\s]*)", l)
if m:
rpaths = m.group(1).replace("$ORIGIN", ldir).split(":")
- rpath = list(map(os.path.normpath, rpaths))
+ rpath = tuple(map(os.path.normpath, rpaths))
for l in lines:
- m = re.match("\s+NEEDED\s+([^\s]*)", l)
+ m = re.match(r"\s+NEEDED\s+([^\s]*)", l)
if m:
dep = m.group(1)
- if dep not in needed[pkg]:
- needed[pkg].append((dep, file, rpath))
- m = re.match("\s+SONAME\s+([^\s]*)", l)
+ if dep not in needed:
+ needed.add((dep, file, rpath))
+ m = re.match(r"\s+SONAME\s+([^\s]*)", l)
if m:
this_soname = m.group(1)
prov = (this_soname, ldir, pkgver)
if not prov in sonames:
# if library is private (only used by package) then do not build shlib for it
- if not private_libs or this_soname not in private_libs:
- sonames.append(prov)
+ import fnmatch
+ if not private_libs or len([i for i in private_libs if fnmatch.fnmatch(this_soname, i)]) == 0:
+ sonames.add(prov)
if libdir_re.match(os.path.dirname(file)):
needs_ldconfig = True
if snap_symlinks and (os.path.basename(file) != this_soname):
renames.append((file, os.path.join(os.path.dirname(file), this_soname)))
- return needs_ldconfig
+ return (needs_ldconfig, needed, sonames, renames)
def darwin_so(file, needed, sonames, renames, pkgver):
if not os.path.exists(file):
@@ -1567,7 +1674,7 @@ python package_do_shlibs() {
combos.append("-".join(options[0:i]))
return combos
- if (file.endswith('.dylib') or file.endswith('.so')) and not pkg.endswith('-dev') and not pkg.endswith('-dbg'):
+ if (file.endswith('.dylib') or file.endswith('.so')) and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-src'):
# Drop suffix
name = os.path.basename(file).rsplit(".",1)[0]
# Find all combinations
@@ -1575,10 +1682,10 @@ python package_do_shlibs() {
for combo in combos:
if not combo in sonames:
prov = (combo, ldir, pkgver)
- sonames.append(prov)
+ sonames.add(prov)
if file.endswith('.dylib') or file.endswith('.so'):
rpath = []
- p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE)
+ p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
# If returned successfully, process stdout for results
if p.returncode == 0:
@@ -1587,7 +1694,7 @@ python package_do_shlibs() {
if l.startswith('path '):
rpath.append(l.split()[1])
- p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE)
+ p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
# If returned successfully, process stdout for results
if p.returncode == 0:
@@ -1599,78 +1706,102 @@ python package_do_shlibs() {
continue
name = os.path.basename(l.split()[0]).rsplit(".", 1)[0]
if name and name not in needed[pkg]:
- needed[pkg].append((name, file, []))
+ needed[pkg].add((name, file, tuple()))
+
+ def mingw_dll(file, needed, sonames, renames, pkgver):
+ if not os.path.exists(file):
+ return
+
+ if file.endswith(".dll"):
+ # assume all dlls are shared objects provided by the package
+ sonames.add((os.path.basename(file), os.path.dirname(file).replace(pkgdest + "/" + pkg, ''), pkgver))
- if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1":
+ if (file.endswith(".dll") or file.endswith(".exe")):
+ # use objdump to search for "DLL Name: .*\.dll"
+ p = subprocess.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ # process the output, grabbing all .dll names
+ if p.returncode == 0:
+ for m in re.finditer(r"DLL Name: (.*?\.dll)$", out.decode(), re.MULTILINE | re.IGNORECASE):
+ dllname = m.group(1)
+ if dllname:
+ needed[pkg].add((dllname, file, tuple()))
+
+ if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS') == "1":
snap_symlinks = True
else:
snap_symlinks = False
- if (d.getVar('USE_LDCONFIG', True) or "1") == "1":
- use_ldconfig = True
- else:
- use_ldconfig = False
-
needed = {}
+
shlib_provider = oe.package.read_shlib_providers(d)
- for pkg in packages.split():
- private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True) or ""
+ for pkg in shlib_pkgs:
+ private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""
private_libs = private_libs.split()
needs_ldconfig = False
bb.debug(2, "calculating shlib provides for %s" % pkg)
- pkgver = d.getVar('PKGV_' + pkg, True)
+ pkgver = d.getVar('PKGV_' + pkg)
if not pkgver:
- pkgver = d.getVar('PV_' + pkg, True)
+ pkgver = d.getVar('PV_' + pkg)
if not pkgver:
pkgver = ver
- needed[pkg] = []
- sonames = list()
- renames = list()
+ needed[pkg] = set()
+ sonames = set()
+ renames = []
+ linuxlist = []
for file in pkgfiles[pkg]:
soname = None
if cpath.islink(file):
continue
if targetos == "darwin" or targetos == "darwin8":
darwin_so(file, needed, sonames, renames, pkgver)
+ elif targetos.startswith("mingw"):
+ mingw_dll(file, needed, sonames, renames, pkgver)
elif os.access(file, os.X_OK) or lib_re.match(file):
- ldconfig = linux_so(file, needed, sonames, renames, pkgver)
- needs_ldconfig = needs_ldconfig or ldconfig
+ linuxlist.append(file)
+
+ if linuxlist:
+ results = oe.utils.multiprocess_launch(linux_so, linuxlist, d, extraargs=(pkg, pkgver, d))
+ for r in results:
+ ldconfig = r[0]
+ needed[pkg] |= r[1]
+ sonames |= r[2]
+ renames.extend(r[3])
+ needs_ldconfig = needs_ldconfig or ldconfig
+
for (old, new) in renames:
bb.note("Renaming %s to %s" % (old, new))
os.rename(old, new)
pkgfiles[pkg].remove(old)
-
+
shlibs_file = os.path.join(shlibswork_dir, pkg + ".list")
if len(sonames):
- fd = open(shlibs_file, 'w')
- for s in sonames:
- if s[0] in shlib_provider and s[1] in shlib_provider[s[0]]:
- (old_pkg, old_pkgver) = shlib_provider[s[0]][s[1]]
- if old_pkg != pkg:
- bb.warn('%s-%s was registered as shlib provider for %s, changing it to %s-%s because it was built later' % (old_pkg, old_pkgver, s[0], pkg, pkgver))
- bb.debug(1, 'registering %s-%s as shlib provider for %s' % (pkg, pkgver, s[0]))
- fd.write(s[0] + ':' + s[1] + ':' + s[2] + '\n')
- if s[0] not in shlib_provider:
- shlib_provider[s[0]] = {}
- shlib_provider[s[0]][s[1]] = (pkg, pkgver)
- fd.close()
- if needs_ldconfig and use_ldconfig:
+ with open(shlibs_file, 'w') as fd:
+ for s in sonames:
+ if s[0] in shlib_provider and s[1] in shlib_provider[s[0]]:
+ (old_pkg, old_pkgver) = shlib_provider[s[0]][s[1]]
+ if old_pkg != pkg:
+ bb.warn('%s-%s was registered as shlib provider for %s, changing it to %s-%s because it was built later' % (old_pkg, old_pkgver, s[0], pkg, pkgver))
+ bb.debug(1, 'registering %s-%s as shlib provider for %s' % (pkg, pkgver, s[0]))
+ fd.write(s[0] + ':' + s[1] + ':' + s[2] + '\n')
+ if s[0] not in shlib_provider:
+ shlib_provider[s[0]] = {}
+ shlib_provider[s[0]][s[1]] = (pkg, pkgver)
+ if needs_ldconfig:
bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += d.getVar('ldconfig_postinst_fragment', True)
+ postinst += d.getVar('ldconfig_postinst_fragment')
d.setVar('pkg_postinst_%s' % pkg, postinst)
bb.debug(1, 'LIBNAMES: pkg %s sonames %s' % (pkg, sonames))
- bb.utils.unlockfile(lf)
-
- assumed_libs = d.getVar('ASSUME_SHLIBS', True)
+ assumed_libs = d.getVar('ASSUME_SHLIBS')
if assumed_libs:
- libdir = d.getVar("libdir", True)
+ libdir = d.getVar("libdir")
for e in assumed_libs.split():
l, dep_pkg = e.split(":")
lib_ver = None
@@ -1682,11 +1813,14 @@ python package_do_shlibs() {
shlib_provider[l] = {}
shlib_provider[l][libdir] = (dep_pkg, lib_ver)
- libsearchpath = [d.getVar('libdir', True), d.getVar('base_libdir', True)]
+ libsearchpath = [d.getVar('libdir'), d.getVar('base_libdir')]
- for pkg in packages.split():
+ for pkg in shlib_pkgs:
bb.debug(2, "calculating shlib requirements for %s" % pkg)
+ private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""
+ private_libs = private_libs.split()
+
deps = list()
for n in needed[pkg]:
# if n is in private libraries, don't try to search provider for it
@@ -1694,20 +1828,21 @@ python package_do_shlibs() {
# /opt/abc/lib/libfoo.so.1 and contains /usr/bin/abc depending on system library libfoo.so.1
# but skipping it is still better alternative than providing own
# version and then adding runtime dependency for the same system library
- if private_libs and n[0] in private_libs:
+ import fnmatch
+ if private_libs and len([i for i in private_libs if fnmatch.fnmatch(n[0], i)]) > 0:
bb.debug(2, '%s: Dependency %s covered by PRIVATE_LIBS' % (pkg, n[0]))
continue
if n[0] in shlib_provider.keys():
- shlib_provider_path = []
- for k in shlib_provider[n[0]].keys():
- shlib_provider_path.append(k)
- match = None
- for p in n[2] + shlib_provider_path + libsearchpath:
- if p in shlib_provider[n[0]]:
- match = p
- break
- if match:
- (dep_pkg, ver_needed) = shlib_provider[n[0]][match]
+ shlib_provider_map = shlib_provider[n[0]]
+ matches = set()
+ for p in itertools.chain(list(n[2]), sorted(shlib_provider_map.keys()), libsearchpath):
+ if p in shlib_provider_map:
+ matches.add(p)
+ if len(matches) > 1:
+ matchpkgs = ', '.join([shlib_provider_map[match][0] for match in matches])
+ bb.error("%s: Multiple shlib providers for %s: %s (used by files: %s)" % (pkg, n[0], matchpkgs, n[1]))
+ elif len(matches) == 1:
+ (dep_pkg, ver_needed) = shlib_provider_map[matches.pop()]
bb.debug(2, '%s: Dependency %s requires package %s (used by files: %s)' % (pkg, n[0], dep_pkg, n[1]))
@@ -1726,26 +1861,25 @@ python package_do_shlibs() {
deps_file = os.path.join(pkgdest, pkg + ".shlibdeps")
if os.path.exists(deps_file):
os.remove(deps_file)
- if len(deps):
- fd = open(deps_file, 'w')
- for dep in deps:
- fd.write(dep + '\n')
- fd.close()
+ if deps:
+ with open(deps_file, 'w') as fd:
+ for dep in sorted(deps):
+ fd.write(dep + '\n')
}
python package_do_pkgconfig () {
import re
- packages = d.getVar('PACKAGES', True)
- workdir = d.getVar('WORKDIR', True)
- pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar('PACKAGES')
+ workdir = d.getVar('WORKDIR')
+ pkgdest = d.getVar('PKGDEST')
- shlibs_dirs = d.getVar('SHLIBSDIRS', True).split()
- shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
+ shlibs_dirs = d.getVar('SHLIBSDIRS').split()
+ shlibswork_dir = d.getVar('SHLIBSWORKDIR')
- pc_re = re.compile('(.*)\.pc$')
- var_re = re.compile('(.*)=(.*)')
- field_re = re.compile('(.*): (.*)')
+ pc_re = re.compile(r'(.*)\.pc$')
+ var_re = re.compile(r'(.*)=(.*)')
+ field_re = re.compile(r'(.*): (.*)')
pkgconfig_provided = {}
pkgconfig_needed = {}
@@ -1760,9 +1894,8 @@ python package_do_pkgconfig () {
pkgconfig_provided[pkg].append(name)
if not os.access(file, os.R_OK):
continue
- f = open(file, 'r')
- lines = f.readlines()
- f.close()
+ with open(file, 'r') as f:
+ lines = f.readlines()
for l in lines:
m = var_re.match(l)
if m:
@@ -1773,32 +1906,27 @@ python package_do_pkgconfig () {
m = field_re.match(l)
if m:
hdr = m.group(1)
- exp = bb.data.expand(m.group(2), pd)
+ exp = pd.expand(m.group(2))
if hdr == 'Requires':
pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
- # Take shared lock since we're only reading, not writing
- lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
-
for pkg in packages.split():
pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
if pkgconfig_provided[pkg] != []:
- f = open(pkgs_file, 'w')
- for p in pkgconfig_provided[pkg]:
- f.write('%s\n' % p)
- f.close()
+ with open(pkgs_file, 'w') as f:
+ for p in pkgconfig_provided[pkg]:
+ f.write('%s\n' % p)
# Go from least to most specific since the last one found wins
for dir in reversed(shlibs_dirs):
if not os.path.exists(dir):
continue
- for file in os.listdir(dir):
- m = re.match('^(.*)\.pclist$', file)
+ for file in sorted(os.listdir(dir)):
+ m = re.match(r'^(.*)\.pclist$', file)
if m:
pkg = m.group(1)
- fd = open(os.path.join(dir, file))
- lines = fd.readlines()
- fd.close()
+ with open(os.path.join(dir, file)) as fd:
+ lines = fd.readlines()
pkgconfig_provided[pkg] = []
for l in lines:
pkgconfig_provided[pkg].append(l.rstrip())
@@ -1816,25 +1944,21 @@ python package_do_pkgconfig () {
bb.note("couldn't find pkgconfig module '%s' in any package" % n)
deps_file = os.path.join(pkgdest, pkg + ".pcdeps")
if len(deps):
- fd = open(deps_file, 'w')
- for dep in deps:
- fd.write(dep + '\n')
- fd.close()
-
- bb.utils.unlockfile(lf)
+ with open(deps_file, 'w') as fd:
+ for dep in deps:
+ fd.write(dep + '\n')
}
def read_libdep_files(d):
pkglibdeps = {}
- packages = d.getVar('PACKAGES', True).split()
+ packages = d.getVar('PACKAGES').split()
for pkg in packages:
pkglibdeps[pkg] = {}
for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
depsfile = d.expand("${PKGDEST}/" + pkg + extension)
if os.access(depsfile, os.R_OK):
- fd = open(depsfile)
- lines = fd.readlines()
- fd.close()
+ with open(depsfile) as fd:
+ lines = fd.readlines()
for l in lines:
l.rstrip()
deps = bb.utils.explode_dep_versions2(l)
@@ -1846,10 +1970,10 @@ def read_libdep_files(d):
python read_shlibdeps () {
pkglibdeps = read_libdep_files(d)
- packages = d.getVar('PACKAGES', True).split()
+ packages = d.getVar('PACKAGES').split()
for pkg in packages:
- rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or "")
- for dep in pkglibdeps[pkg]:
+ rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg) or "")
+ for dep in sorted(pkglibdeps[pkg]):
# Add the dep if it's not already there, or if no comparison is set
if dep not in rdepends:
rdepends[dep] = []
@@ -1873,16 +1997,16 @@ python package_depchains() {
package.
"""
- packages = d.getVar('PACKAGES', True)
- postfixes = (d.getVar('DEPCHAIN_POST', True) or '').split()
- prefixes = (d.getVar('DEPCHAIN_PRE', True) or '').split()
+ packages = d.getVar('PACKAGES')
+ postfixes = (d.getVar('DEPCHAIN_POST') or '').split()
+ prefixes = (d.getVar('DEPCHAIN_PRE') or '').split()
def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d):
#bb.note('depends for %s is %s' % (base, depends))
- rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg, True) or "")
+ rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "")
- for depend in depends:
+ for depend in sorted(depends):
if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
#bb.note("Skipping %s" % depend)
continue
@@ -1901,9 +2025,9 @@ python package_depchains() {
def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
#bb.note('rdepends for %s is %s' % (base, rdepends))
- rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg, True) or "")
+ rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "")
- for depend in rdepends:
+ for depend in sorted(rdepends):
if depend.find('virtual-locale-') != -1:
#bb.note("Skipping %s" % depend)
continue
@@ -1924,12 +2048,12 @@ python package_depchains() {
list.append(dep)
depends = []
- for dep in bb.utils.explode_deps(d.getVar('DEPENDS', True) or ""):
+ for dep in bb.utils.explode_deps(d.getVar('DEPENDS') or ""):
add_dep(depends, dep)
rdepends = []
for pkg in packages.split():
- for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + pkg, True) or ""):
+ for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + pkg) or ""):
add_dep(rdepends, dep)
#bb.note('rdepends is %s' % rdepends)
@@ -1959,11 +2083,11 @@ python package_depchains() {
for pkg in pkglibdeps:
for k in pkglibdeps[pkg]:
add_dep(pkglibdeplist, k)
- dbgdefaultdeps = ((d.getVar('DEPCHAIN_DBGDEFAULTDEPS', True) == '1') or (bb.data.inherits_class('packagegroup', d)))
+ dbgdefaultdeps = ((d.getVar('DEPCHAIN_DBGDEFAULTDEPS') == '1') or (bb.data.inherits_class('packagegroup', d)))
for suffix in pkgs:
for pkg in pkgs[suffix]:
- if d.getVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', True):
+ if d.getVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs'):
continue
(base, func) = pkgs[suffix][pkg]
if suffix == "-dev":
@@ -1976,19 +2100,19 @@ python package_depchains() {
pkg_addrrecs(pkg, base, suffix, func, rdepends, d)
else:
rdeps = []
- for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + base, True) or ""):
+ for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + base) or ""):
add_dep(rdeps, dep)
pkg_addrrecs(pkg, base, suffix, func, rdeps, d)
}
# Since bitbake can't determine which variables are accessed during package
# iteration, we need to list them here:
-PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTERNATIVE PKGE PKGV PKGR USERADD_PARAM GROUPADD_PARAM CONFFILES SYSTEMD_SERVICE LICENSE SECTION pkg_preinst pkg_prerm RREPLACES GROUPMEMS_PARAM SYSTEMD_AUTO_ENABLE"
+PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm pkg_postinst_ontarget INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTERNATIVE PKGE PKGV PKGR USERADD_PARAM GROUPADD_PARAM CONFFILES SYSTEMD_SERVICE LICENSE SECTION pkg_preinst pkg_prerm RREPLACES GROUPMEMS_PARAM SYSTEMD_AUTO_ENABLE SKIP_FILEDEPS PRIVATE_LIBS"
def gen_packagevar(d):
ret = []
- pkgs = (d.getVar("PACKAGES", True) or "").split()
- vars = (d.getVar("PACKAGEVARS", True) or "").split()
+ pkgs = (d.getVar("PACKAGES") or "").split()
+ vars = (d.getVar("PACKAGEVARS") or "").split()
for p in pkgs:
for v in vars:
ret.append(v + "_" + p)
@@ -2001,6 +2125,7 @@ def gen_packagevar(d):
PACKAGE_PREPROCESS_FUNCS ?= ""
# Functions for setting up PKGD
PACKAGEBUILDPKGD ?= " \
+ package_prepare_pkgdata \
perform_packagecopy \
${PACKAGE_PREPROCESS_FUNCS} \
split_and_strip_files \
@@ -2026,7 +2151,7 @@ python do_package () {
# cache. This is useful if an item this class depends on changes in a
# way that the output of this class changes. rpmdeps is a good example
# as any change to rpmdeps requires this to be rerun.
- # PACKAGE_BBCLASS_VERSION = "1"
+ # PACKAGE_BBCLASS_VERSION = "2"
# Init cachedpath
global cpath
@@ -2036,16 +2161,16 @@ python do_package () {
# Sanity test the setup
###########################################################################
- packages = (d.getVar('PACKAGES', True) or "").split()
+ packages = (d.getVar('PACKAGES') or "").split()
if len(packages) < 1:
bb.debug(1, "No packages to build, skipping do_package")
return
- workdir = d.getVar('WORKDIR', True)
- outdir = d.getVar('DEPLOY_DIR', True)
- dest = d.getVar('D', True)
- dvar = d.getVar('PKGD', True)
- pn = d.getVar('PN', True)
+ workdir = d.getVar('WORKDIR')
+ outdir = d.getVar('DEPLOY_DIR')
+ dest = d.getVar('D')
+ dvar = d.getVar('PKGD')
+ pn = d.getVar('PN')
if not workdir or not outdir or not dest or not dvar or not pn:
msg = "WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package"
@@ -2063,7 +2188,7 @@ python do_package () {
# code pre-expands some frequently used variables
def expandVar(x, d):
- d.setVar(x, d.getVar(x, True))
+ d.setVar(x, d.getVar(x))
for x in 'PN', 'PV', 'BPN', 'TARGET_SYS', 'EXTENDPRAUTO':
expandVar(x, d)
@@ -2072,7 +2197,7 @@ python do_package () {
# Setup PKGD (from D)
###########################################################################
- for f in (d.getVar('PACKAGEBUILDPKGD', True) or '').split():
+ for f in (d.getVar('PACKAGEBUILDPKGD') or '').split():
bb.build.exec_func(f, d)
###########################################################################
@@ -2081,7 +2206,7 @@ python do_package () {
cpath = oe.cachedpath.CachedPath()
- for f in (d.getVar('PACKAGESPLITFUNCS', True) or '').split():
+ for f in (d.getVar('PACKAGESPLITFUNCS') or '').split():
bb.build.exec_func(f, d)
###########################################################################
@@ -2091,18 +2216,18 @@ python do_package () {
# Build global list of files in each split package
global pkgfiles
pkgfiles = {}
- packages = d.getVar('PACKAGES', True).split()
- pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar('PACKAGES').split()
+ pkgdest = d.getVar('PKGDEST')
for pkg in packages:
pkgfiles[pkg] = []
for walkroot, dirs, files in cpath.walk(pkgdest + "/" + pkg):
for file in files:
pkgfiles[pkg].append(walkroot + os.sep + file)
- for f in (d.getVar('PACKAGEFUNCS', True) or '').split():
+ for f in (d.getVar('PACKAGEFUNCS') or '').split():
bb.build.exec_func(f, d)
- qa_sane = d.getVar("QA_SANE", True)
+ qa_sane = d.getVar("QA_SANE")
if not qa_sane:
bb.fatal("Fatal QA errors found, failing task.")
}
@@ -2111,11 +2236,9 @@ do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK} ${D}"
do_package[vardeps] += "${PACKAGEBUILDPKGD} ${PACKAGESPLITFUNCS} ${PACKAGEFUNCS} ${@gen_packagevar(d)}"
addtask package after do_install
-PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
SSTATETASKS += "do_package"
do_package[cleandirs] = "${PKGDEST} ${PKGDESTWORK}"
do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
-do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
do_package_setscene[dirs] = "${STAGING_DIR}"
python do_package_setscene () {
@@ -2123,17 +2246,20 @@ python do_package_setscene () {
}
addtask do_package_setscene
-do_packagedata () {
- :
+# Copy from PKGDESTWORK to tempdirectory as tempdirectory can be cleaned at both
+# do_package_setscene and do_packagedata_setscene leading to races
+python do_packagedata () {
+ src = d.expand("${PKGDESTWORK}")
+ dest = d.expand("${WORKDIR}/pkgdata-pdata-input")
+ oe.path.copyhardlinktree(src, dest)
}
addtask packagedata before do_build after do_package
SSTATETASKS += "do_packagedata"
-do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}"
+do_packagedata[sstate-inputdirs] = "${WORKDIR}/pkgdata-pdata-input"
do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
-do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}"
-do_packagedata[stamp-extra-info] = "${MACHINE}"
+do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}"
python do_packagedata_setscene () {
sstate_setscene(d)
@@ -2149,7 +2275,7 @@ def mapping_rename_hook(d):
Rewrite variables to account for package renaming in things
like debian.bbclass or manual PKG variable name changes
"""
- pkg = d.getVar("PKG", True)
+ pkg = d.getVar("PKG")
runtime_mapping_rename("RDEPENDS", pkg, d)
runtime_mapping_rename("RRECOMMENDS", pkg, d)
runtime_mapping_rename("RSUGGESTS", pkg, d)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 4e5dc12850..790b26aef2 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -6,17 +6,21 @@ inherit package
IMAGE_PKGTYPE ?= "deb"
-DPKG_ARCH ?= "${@debian_arch_map(d.getVar('TARGET_ARCH', True), d.getVar('TUNE_FEATURES', True))}"
+DPKG_BUILDCMD ??= "dpkg-deb"
+
+DPKG_ARCH ?= "${@debian_arch_map(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'))}"
DPKG_ARCH[vardepvalue] = "${DPKG_ARCH}"
PKGWRITEDIRDEB = "${WORKDIR}/deploy-debs"
APTCONF_TARGET = "${WORKDIR}"
-APT_ARGS = "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS", True) == "1"]}"
+APT_ARGS = "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
def debian_arch_map(arch, tune):
tune_features = tune.split()
+ if arch == "allarch":
+ return "all"
if arch in ["i586", "i686"]:
return "i386"
if arch == "x86_64":
@@ -37,50 +41,31 @@ def debian_arch_map(arch, tune):
if arch == "arm":
return arch + ["el", "hf"]["callconvention-hard" in tune_features]
return arch
-#
-# install a bunch of packages using apt
-# the following shell variables needs to be set before calling this func:
-# INSTALL_ROOTFS_DEB - install root dir
-# INSTALL_BASEARCH_DEB - install base architecutre
-# INSTALL_ARCHS_DEB - list of available archs
-# INSTALL_PACKAGES_NORMAL_DEB - packages to be installed
-# INSTALL_PACKAGES_ATTEMPTONLY_DEB - packages attempted to be installed only
-# INSTALL_PACKAGES_LINGUAS_DEB - additional packages for uclibc
-# INSTALL_TASK_DEB - task name
python do_package_deb () {
- import re, copy
- import textwrap
- import subprocess
- import collections
-
- oldcwd = os.getcwd()
-
- workdir = d.getVar('WORKDIR', True)
- if not workdir:
- bb.error("WORKDIR not defined, unable to package")
- return
-
- outdir = d.getVar('PKGWRITEDIRDEB', True)
- if not outdir:
- bb.error("PKGWRITEDIRDEB not defined, unable to package")
- return
-
- packages = d.getVar('PACKAGES', True)
+ packages = d.getVar('PACKAGES')
if not packages:
bb.debug(1, "PACKAGES not defined, nothing to package")
return
- tmpdir = d.getVar('TMPDIR', True)
-
+ tmpdir = d.getVar('TMPDIR')
if os.access(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"),os.R_OK):
os.unlink(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"))
- if packages == []:
- bb.debug(1, "No packages; nothing to do")
- return
+ oe.utils.multiprocess_launch(deb_write_pkg, packages.split(), d, extraargs=(d,))
+}
+do_package_deb[vardeps] += "deb_write_pkg"
+do_package_deb[vardepsexclude] = "BB_NUMBER_THREADS"
- pkgdest = d.getVar('PKGDEST', True)
+def deb_write_pkg(pkg, d):
+ import re, copy
+ import textwrap
+ import subprocess
+ import collections
+ import codecs
+
+ outdir = d.getVar('PKGWRITEDIRDEB')
+ pkgdest = d.getVar('PKGDEST')
def cleanupcontrol(root):
for p in ['CONTROL', 'DEBIAN']:
@@ -88,25 +73,24 @@ python do_package_deb () {
if os.path.exists(p):
bb.utils.prunedir(p)
- for pkg in packages.split():
- localdata = bb.data.createCopy(d)
- root = "%s/%s" % (pkgdest, pkg)
+ localdata = bb.data.createCopy(d)
+ root = "%s/%s" % (pkgdest, pkg)
- lf = bb.utils.lockfile(root + ".lock")
+ lf = bb.utils.lockfile(root + ".lock")
+ try:
localdata.setVar('ROOT', '')
localdata.setVar('ROOT_%s' % pkg, root)
- pkgname = localdata.getVar('PKG_%s' % pkg, True)
+ pkgname = localdata.getVar('PKG_%s' % pkg)
if not pkgname:
pkgname = pkg
localdata.setVar('PKG', pkgname)
localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg)
- bb.data.update_data(localdata)
basedir = os.path.join(os.path.dirname(root))
- pkgoutdir = os.path.join(outdir, localdata.getVar('PACKAGE_ARCH', True))
+ pkgoutdir = os.path.join(outdir, localdata.getVar('PACKAGE_ARCH'))
bb.utils.mkdirhier(pkgoutdir)
os.chdir(root)
@@ -114,22 +98,17 @@ python do_package_deb () {
from glob import glob
g = glob('*')
if not g and localdata.getVar('ALLOW_EMPTY', False) != "1":
- bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
- bb.utils.unlockfile(lf)
- continue
+ bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV'), localdata.getVar('PKGR')))
+ return
controldir = os.path.join(root, 'DEBIAN')
bb.utils.mkdirhier(controldir)
os.chmod(controldir, 0o755)
- try:
- import codecs
- ctrlfile = codecs.open(os.path.join(controldir, 'control'), 'w', 'utf-8')
- except OSError:
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open control file for writing.")
+
+ ctrlfile = codecs.open(os.path.join(controldir, 'control'), 'w', 'utf-8')
fields = []
- pe = d.getVar('PKGE', True)
+ pe = d.getVar('PKGE')
if pe and int(pe) > 0:
fields.append(["Version: %s:%s-%s\n", ['PKGE', 'PKGV', 'PKGR']])
else:
@@ -141,7 +120,7 @@ python do_package_deb () {
fields.append(["Architecture: %s\n", ['DPKG_ARCH']])
fields.append(["OE: %s\n", ['PN']])
fields.append(["PackageArch: %s\n", ['PACKAGE_ARCH']])
- if d.getVar('HOMEPAGE', True):
+ if d.getVar('HOMEPAGE'):
fields.append(["Homepage: %s\n", ['HOMEPAGE']])
# Package, Version, Maintainer, Description - mandatory
@@ -151,10 +130,10 @@ python do_package_deb () {
def pullData(l, d):
l2 = []
for i in l:
- data = d.getVar(i, True)
+ data = d.getVar(i)
if data is None:
- raise KeyError(f)
- if i == 'DPKG_ARCH' and d.getVar('PACKAGE_ARCH', True) == 'all':
+ raise KeyError(i)
+ if i == 'DPKG_ARCH' and d.getVar('PACKAGE_ARCH') == 'all':
data = 'all'
elif i == 'PACKAGE_ARCH' or i == 'DPKG_ARCH':
# The params in deb package control don't allow character
@@ -165,62 +144,50 @@ python do_package_deb () {
return l2
ctrlfile.write("Package: %s\n" % pkgname)
- if d.getVar('PACKAGE_ARCH', True) == "all":
+ if d.getVar('PACKAGE_ARCH') == "all":
ctrlfile.write("Multi-Arch: foreign\n")
# check for required fields
- try:
- for (c, fs) in fields:
- for f in fs:
- if localdata.getVar(f, False) is None:
- raise KeyError(f)
- # Special behavior for description...
- if 'DESCRIPTION' in fs:
- summary = localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or "."
- ctrlfile.write('Description: %s\n' % summary)
- description = localdata.getVar('DESCRIPTION', True) or "."
- description = textwrap.dedent(description).strip()
- if '\\n' in description:
- # Manually indent
- for t in description.split('\\n'):
- # We don't limit the width when manually indent, but we do
- # need the textwrap.fill() to set the initial_indent and
- # subsequent_indent, so set a large width
- ctrlfile.write('%s\n' % textwrap.fill(t, width=100000, initial_indent=' ', subsequent_indent=' '))
- else:
- # Auto indent
- ctrlfile.write('%s\n' % textwrap.fill(description.strip(), width=74, initial_indent=' ', subsequent_indent=' '))
-
- else:
- ctrlfile.write(c % tuple(pullData(fs, localdata)))
- except KeyError:
- import sys
- (type, value, traceback) = sys.exc_info()
- bb.utils.unlockfile(lf)
- ctrlfile.close()
- raise bb.build.FuncFailed("Missing field for deb generation: %s" % value)
+ for (c, fs) in fields:
+ # Special behavior for description...
+ if 'DESCRIPTION' in fs:
+ summary = localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or "."
+ ctrlfile.write('Description: %s\n' % summary)
+ description = localdata.getVar('DESCRIPTION') or "."
+ description = textwrap.dedent(description).strip()
+ if '\\n' in description:
+ # Manually indent
+ for t in description.split('\\n'):
+ ctrlfile.write(' %s\n' % (t.strip() or '.'))
+ else:
+ # Auto indent
+ ctrlfile.write('%s\n' % textwrap.fill(description.strip(), width=74, initial_indent=' ', subsequent_indent=' '))
+
+ else:
+ ctrlfile.write(c % tuple(pullData(fs, localdata)))
# more fields
custom_fields_chunk = get_package_additional_metadata("deb", localdata)
- if custom_fields_chunk is not None:
+ if custom_fields_chunk:
ctrlfile.write(custom_fields_chunk)
ctrlfile.write("\n")
mapping_rename_hook(localdata)
def debian_cmp_remap(var):
- # dpkg does not allow for '(' or ')' in a dependency name
- # replace these instances with '__' and '__'
+ # dpkg does not allow for '(', ')' or ':' in a dependency name
+ # Replace any instances of them with '__'
#
# In debian '>' and '<' do not mean what it appears they mean
# '<' = less or equal
# '>' = greater or equal
# adjust these to the '<<' and '>>' equivalents
#
- for dep in var:
- if '(' in dep:
- newdep = dep.replace('(', '__')
- newdep = newdep.replace(')', '__')
+ for dep in list(var.keys()):
+ if '(' in dep or '/' in dep:
+ newdep = re.sub(r'[(:)/]', '__', dep)
+ if newdep.startswith("__"):
+ newdep = "A" + newdep
if newdep != dep:
var[newdep] = var[dep]
del var[dep]
@@ -231,7 +198,7 @@ python do_package_deb () {
elif (v or "").startswith("> "):
var[dep][i] = var[dep][i].replace("> ", ">> ")
- rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS", True) or "")
+ rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS") or "")
debian_cmp_remap(rdepends)
for dep in list(rdepends.keys()):
if dep == pkg:
@@ -239,20 +206,24 @@ python do_package_deb () {
continue
if '*' in dep:
del rdepends[dep]
- rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS", True) or "")
+ rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS") or "")
debian_cmp_remap(rrecommends)
for dep in list(rrecommends.keys()):
if '*' in dep:
del rrecommends[dep]
- rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS", True) or "")
+ rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS") or "")
debian_cmp_remap(rsuggests)
# Deliberately drop version information here, not wanted/supported by deb
- rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or ""), [])
+ rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or ""), [])
+ # Remove file paths if any from rprovides, debian does not support custom providers
+ for key in list(rprovides.keys()):
+ if key.startswith('/'):
+ del rprovides[key]
rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0]))
debian_cmp_remap(rprovides)
- rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
+ rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES") or "")
debian_cmp_remap(rreplaces)
- rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
+ rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS") or "")
debian_cmp_remap(rconflicts)
if rdepends:
ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends))
@@ -269,15 +240,11 @@ python do_package_deb () {
ctrlfile.close()
for script in ["preinst", "postinst", "prerm", "postrm"]:
- scriptvar = localdata.getVar('pkg_%s' % script, True)
+ scriptvar = localdata.getVar('pkg_%s' % script)
if not scriptvar:
continue
scriptvar = scriptvar.strip()
- try:
- scriptfile = open(os.path.join(controldir, script), 'w')
- except OSError:
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open %s script file for writing." % script)
+ scriptfile = open(os.path.join(controldir, script), 'w')
if scriptvar.startswith("#!"):
pos = scriptvar.find("\n") + 1
@@ -297,38 +264,34 @@ python do_package_deb () {
conffiles_str = ' '.join(get_conffiles(pkg, d))
if conffiles_str:
- try:
- conffiles = open(os.path.join(controldir, 'conffiles'), 'w')
- except OSError:
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open conffiles for writing.")
+ conffiles = open(os.path.join(controldir, 'conffiles'), 'w')
for f in conffiles_str.split():
if os.path.exists(oe.path.join(root, f)):
conffiles.write('%s\n' % f)
conffiles.close()
os.chdir(basedir)
- ret = subprocess.call("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH", True), root, pkgoutdir), shell=True)
- if ret != 0:
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("dpkg-deb execution failed")
+ subprocess.check_output("PATH=\"%s\" %s -b %s %s" % (localdata.getVar("PATH"), localdata.getVar("DPKG_BUILDCMD"),
+ root, pkgoutdir),
+ stderr=subprocess.STDOUT,
+ shell=True)
+ finally:
cleanupcontrol(root)
bb.utils.unlockfile(lf)
- os.chdir(oldcwd)
-}
-# Indirect references to these vars
-do_package_write_deb[vardeps] += "PKGV PKGR PKGV DESCRIPTION SECTION PRIORITY MAINTAINER DPKG_ARCH PN HOMEPAGE"
+
# Otherwise allarch packages may change depending on override configuration
-do_package_deb[vardepsexclude] = "OVERRIDES"
+deb_write_pkg[vardepsexclude] = "OVERRIDES"
+# Indirect references to these vars
+do_package_write_deb[vardeps] += "PKGV PKGR PKGV DESCRIPTION SECTION PRIORITY MAINTAINER DPKG_ARCH PN HOMEPAGE"
SSTATETASKS += "do_package_write_deb"
do_package_write_deb[sstate-inputdirs] = "${PKGWRITEDIRDEB}"
do_package_write_deb[sstate-outputdirs] = "${DEPLOY_DIR_DEB}"
python do_package_write_deb_setscene () {
- tmpdir = d.getVar('TMPDIR', True)
+ tmpdir = d.getVar('TMPDIR')
if os.access(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"),os.R_OK):
os.unlink(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"))
@@ -338,7 +301,7 @@ python do_package_write_deb_setscene () {
addtask do_package_write_deb_setscene
python () {
- if d.getVar('PACKAGES', True) != '':
+ if d.getVar('PACKAGES') != '':
deps = ' dpkg-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot'
d.appendVarFlag('do_package_write_deb', 'depends', deps)
d.setVarFlag('do_package_write_deb', 'fakeroot', "1")
@@ -351,6 +314,7 @@ python do_package_write_deb () {
do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
do_package_write_deb[cleandirs] = "${PKGWRITEDIRDEB}"
do_package_write_deb[umask] = "022"
+do_package_write_deb[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
addtask package_write_deb after do_packagedata do_package
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 930e154bd7..4f23977032 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -8,31 +8,24 @@ IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf"
PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
# Program to be used to build opkg packages
-OPKGBUILDCMD ??= "opkg-build"
+OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}"'
OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
-OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS", True) == "1"]}"
-OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE', True) or "").split())][(d.getVar("PACKAGE_EXCLUDE", True) or "") != ""]}"
+OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
+OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE') or "").split())][(d.getVar("PACKAGE_EXCLUDE") or "").strip() != ""]}"
-OPKGLIBDIR = "${localstatedir}/lib"
+OPKGLIBDIR ??= "${localstatedir}/lib"
python do_package_ipk () {
- import re, copy
- import textwrap
- import subprocess
- import collections
-
- oldcwd = os.getcwd()
-
- workdir = d.getVar('WORKDIR', True)
- outdir = d.getVar('PKGWRITEDIRIPK', True)
- tmpdir = d.getVar('TMPDIR', True)
- pkgdest = d.getVar('PKGDEST', True)
+ workdir = d.getVar('WORKDIR')
+ outdir = d.getVar('PKGWRITEDIRIPK')
+ tmpdir = d.getVar('TMPDIR')
+ pkgdest = d.getVar('PKGDEST')
if not workdir or not outdir or not tmpdir:
bb.error("Variables incorrectly set, unable to package")
return
- packages = d.getVar('PACKAGES', True)
+ packages = d.getVar('PACKAGES')
if not packages or packages == '':
bb.debug(1, "No packages; nothing to do")
return
@@ -42,30 +35,43 @@ python do_package_ipk () {
if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK):
os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"))
+ oe.utils.multiprocess_launch(ipk_write_pkg, packages.split(), d, extraargs=(d,))
+}
+do_package_ipk[vardeps] += "ipk_write_pkg"
+do_package_ipk[vardepsexclude] = "BB_NUMBER_THREADS"
+
+def ipk_write_pkg(pkg, d):
+ import re, copy
+ import subprocess
+ import textwrap
+ import collections
+
def cleanupcontrol(root):
for p in ['CONTROL', 'DEBIAN']:
p = os.path.join(root, p)
if os.path.exists(p):
bb.utils.prunedir(p)
- for pkg in packages.split():
- localdata = bb.data.createCopy(d)
- root = "%s/%s" % (pkgdest, pkg)
+ outdir = d.getVar('PKGWRITEDIRIPK')
+ pkgdest = d.getVar('PKGDEST')
+ recipesource = os.path.basename(d.getVar('FILE'))
- lf = bb.utils.lockfile(root + ".lock")
+ localdata = bb.data.createCopy(d)
+ root = "%s/%s" % (pkgdest, pkg)
+ lf = bb.utils.lockfile(root + ".lock")
+ try:
localdata.setVar('ROOT', '')
localdata.setVar('ROOT_%s' % pkg, root)
- pkgname = localdata.getVar('PKG_%s' % pkg, True)
+ pkgname = localdata.getVar('PKG_%s' % pkg)
if not pkgname:
pkgname = pkg
localdata.setVar('PKG', pkgname)
localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg)
- bb.data.update_data(localdata)
basedir = os.path.join(os.path.dirname(root))
- arch = localdata.getVar('PACKAGE_ARCH', True)
+ arch = localdata.getVar('PACKAGE_ARCH')
if localdata.getVar('IPK_HIERARCHICAL_FEED', False) == "1":
# Spread packages across subdirectories so each isn't too crowded
@@ -98,20 +104,15 @@ python do_package_ipk () {
from glob import glob
g = glob('*')
if not g and localdata.getVar('ALLOW_EMPTY', False) != "1":
- bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
- bb.utils.unlockfile(lf)
- continue
+ bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV'), localdata.getVar('PKGR')))
+ return
controldir = os.path.join(root, 'CONTROL')
bb.utils.mkdirhier(controldir)
- try:
- ctrlfile = open(os.path.join(controldir, 'control'), 'w')
- except OSError:
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open control file for writing.")
+ ctrlfile = open(os.path.join(controldir, 'control'), 'w')
fields = []
- pe = d.getVar('PKGE', True)
+ pe = d.getVar('PKGE')
if pe and int(pe) > 0:
fields.append(["Version: %s:%s-%s\n", ['PKGE', 'PKGV', 'PKGR']])
else:
@@ -123,47 +124,36 @@ python do_package_ipk () {
fields.append(["License: %s\n", ['LICENSE']])
fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']])
fields.append(["OE: %s\n", ['PN']])
- if d.getVar('HOMEPAGE', True):
+ if d.getVar('HOMEPAGE'):
fields.append(["Homepage: %s\n", ['HOMEPAGE']])
def pullData(l, d):
l2 = []
for i in l:
- l2.append(d.getVar(i, True))
+ l2.append(d.getVar(i))
return l2
ctrlfile.write("Package: %s\n" % pkgname)
# check for required fields
- try:
- for (c, fs) in fields:
- for f in fs:
- if localdata.getVar(f, False) is None:
- raise KeyError(f)
- # Special behavior for description...
- if 'DESCRIPTION' in fs:
- summary = localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or "."
- ctrlfile.write('Description: %s\n' % summary)
- description = localdata.getVar('DESCRIPTION', True) or "."
- description = textwrap.dedent(description).strip()
- if '\\n' in description:
- # Manually indent
- for t in description.split('\\n'):
- # We don't limit the width when manually indent, but we do
- # need the textwrap.fill() to set the initial_indent and
- # subsequent_indent, so set a large width
- ctrlfile.write('%s\n' % textwrap.fill(t.strip(), width=100000, initial_indent=' ', subsequent_indent=' '))
- else:
- # Auto indent
- ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' '))
+ for (c, fs) in fields:
+ for f in fs:
+ if localdata.getVar(f, False) is None:
+ raise KeyError(f)
+ # Special behavior for description...
+ if 'DESCRIPTION' in fs:
+ summary = localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or "."
+ ctrlfile.write('Description: %s\n' % summary)
+ description = localdata.getVar('DESCRIPTION') or "."
+ description = textwrap.dedent(description).strip()
+ if '\\n' in description:
+ # Manually indent: multiline description includes a leading space
+ for t in description.split('\\n'):
+ ctrlfile.write(' %s\n' % (t.strip() or ' .'))
else:
- ctrlfile.write(c % tuple(pullData(fs, localdata)))
- except KeyError:
- import sys
- (type, value, traceback) = sys.exc_info()
- ctrlfile.close()
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("Missing field for ipk generation: %s" % value)
- # more fields
+ # Auto indent
+ ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' '))
+ else:
+ ctrlfile.write(c % tuple(pullData(fs, localdata)))
custom_fields_chunk = get_package_additional_metadata("ipk", localdata)
if custom_fields_chunk is not None:
@@ -185,19 +175,19 @@ python do_package_ipk () {
elif (v or "").startswith("> "):
var[dep][i] = var[dep][i].replace("> ", ">> ")
- rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS", True) or "")
+ rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS") or "")
debian_cmp_remap(rdepends)
- rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS", True) or "")
+ rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS") or "")
debian_cmp_remap(rrecommends)
- rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS", True) or "")
+ rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS") or "")
debian_cmp_remap(rsuggests)
# Deliberately drop version information here, not wanted/supported by ipk
- rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or ""), [])
+ rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or ""), [])
rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0]))
debian_cmp_remap(rprovides)
- rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
+ rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES") or "")
debian_cmp_remap(rreplaces)
- rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
+ rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS") or "")
debian_cmp_remap(rconflicts)
if rdepends:
@@ -212,63 +202,51 @@ python do_package_ipk () {
ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces))
if rconflicts:
ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts))
- src_uri = localdata.getVar("SRC_URI", True).strip() or "None"
- if src_uri:
- src_uri = re.sub("\s+", " ", src_uri)
- ctrlfile.write("Source: %s\n" % " ".join(src_uri.split()))
+ ctrlfile.write("Source: %s\n" % recipesource)
ctrlfile.close()
for script in ["preinst", "postinst", "prerm", "postrm"]:
- scriptvar = localdata.getVar('pkg_%s' % script, True)
+ scriptvar = localdata.getVar('pkg_%s' % script)
if not scriptvar:
continue
- try:
- scriptfile = open(os.path.join(controldir, script), 'w')
- except OSError:
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open %s script file for writing." % script)
+ scriptfile = open(os.path.join(controldir, script), 'w')
scriptfile.write(scriptvar)
scriptfile.close()
os.chmod(os.path.join(controldir, script), 0o755)
conffiles_str = ' '.join(get_conffiles(pkg, d))
if conffiles_str:
- try:
- conffiles = open(os.path.join(controldir, 'conffiles'), 'w')
- except OSError:
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open conffiles for writing.")
+ conffiles = open(os.path.join(controldir, 'conffiles'), 'w')
for f in conffiles_str.split():
if os.path.exists(oe.path.join(root, f)):
conffiles.write('%s\n' % f)
conffiles.close()
os.chdir(basedir)
- ret = subprocess.call("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH", True),
- d.getVar("OPKGBUILDCMD", True), pkg, pkgoutdir), shell=True)
- if ret != 0:
- bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("opkg-build execution failed")
-
- if d.getVar('IPK_SIGN_PACKAGES', True) == '1':
- ipkver = "%s-%s" % (d.getVar('PKGV', True), d.getVar('PKGR', True))
- ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, ipkver, d.getVar('PACKAGE_ARCH', True))
+ subprocess.check_output("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH"),
+ d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir),
+ stderr=subprocess.STDOUT,
+ shell=True)
+
+ if d.getVar('IPK_SIGN_PACKAGES') == '1':
+ ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR'))
+ ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, ipkver, d.getVar('PACKAGE_ARCH'))
sign_ipk(d, ipk_to_sign)
+ finally:
cleanupcontrol(root)
bb.utils.unlockfile(lf)
- os.chdir(oldcwd)
-}
# Otherwise allarch packages may change depending on override configuration
-do_package_ipk[vardepsexclude] = "OVERRIDES"
+ipk_write_pkg[vardepsexclude] = "OVERRIDES"
+
SSTATETASKS += "do_package_write_ipk"
do_package_write_ipk[sstate-inputdirs] = "${PKGWRITEDIRIPK}"
do_package_write_ipk[sstate-outputdirs] = "${DEPLOY_DIR_IPK}"
python do_package_write_ipk_setscene () {
- tmpdir = d.getVar('TMPDIR', True)
+ tmpdir = d.getVar('TMPDIR')
if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK):
os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"))
@@ -278,8 +256,8 @@ python do_package_write_ipk_setscene () {
addtask do_package_write_ipk_setscene
python () {
- if d.getVar('PACKAGES', True) != '':
- deps = ' opkg-utils-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot'
+ if d.getVar('PACKAGES') != '':
+ deps = ' opkg-utils-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot xz-native:do_populate_sysroot'
d.appendVarFlag('do_package_write_ipk', 'depends', deps)
d.setVarFlag('do_package_write_ipk', 'fakeroot', "1")
}
@@ -291,6 +269,7 @@ python do_package_write_ipk () {
do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}"
do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}"
do_package_write_ipk[umask] = "022"
+do_package_write_ipk[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
addtask package_write_ipk after do_packagedata do_package
PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
diff --git a/meta/classes/package_pkgdata.bbclass b/meta/classes/package_pkgdata.bbclass
new file mode 100644
index 0000000000..18b7ed62e0
--- /dev/null
+++ b/meta/classes/package_pkgdata.bbclass
@@ -0,0 +1,167 @@
+WORKDIR_PKGDATA = "${WORKDIR}/pkgdata-sysroot"
+
+def package_populate_pkgdata_dir(pkgdatadir, d):
+ import glob
+
+ postinsts = []
+ seendirs = set()
+ stagingdir = d.getVar("PKGDATA_DIR")
+ pkgarchs = ['${MACHINE_ARCH}']
+ pkgarchs = pkgarchs + list(reversed(d.getVar("PACKAGE_EXTRA_ARCHS").split()))
+ pkgarchs.append('allarch')
+
+ bb.utils.mkdirhier(pkgdatadir)
+ for pkgarch in pkgarchs:
+ for manifest in glob.glob(d.expand("${SSTATE_MANIFESTS}/manifest-%s-*.packagedata" % pkgarch)):
+ with open(manifest, "r") as f:
+ for l in f:
+ l = l.strip()
+ dest = l.replace(stagingdir, "")
+ if l.endswith("/"):
+ staging_copydir(l, pkgdatadir, dest, seendirs)
+ continue
+ try:
+ staging_copyfile(l, pkgdatadir, dest, postinsts, seendirs)
+ except FileExistsError:
+ continue
+
+python package_prepare_pkgdata() {
+ import copy
+ import glob
+
+ taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+ mytaskname = d.getVar("BB_RUNTASK")
+ if mytaskname.endswith("_setscene"):
+ mytaskname = mytaskname.replace("_setscene", "")
+ workdir = d.getVar("WORKDIR")
+ pn = d.getVar("PN")
+ stagingdir = d.getVar("PKGDATA_DIR")
+ pkgdatadir = d.getVar("WORKDIR_PKGDATA")
+
+ # Detect bitbake -b usage
+ nodeps = d.getVar("BB_LIMITEDDEPS") or False
+ if nodeps:
+ staging_package_populate_pkgdata_dir(pkgdatadir, d)
+ return
+
+ start = None
+ configuredeps = []
+ for dep in taskdepdata:
+ data = taskdepdata[dep]
+ if data[1] == mytaskname and data[0] == pn:
+ start = dep
+ break
+ if start is None:
+ bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+
+ # We need to figure out which sysroot files we need to expose to this task.
+ # This needs to match what would get restored from sstate, which is controlled
+ # ultimately by calls from bitbake to setscene_depvalid().
+ # That function expects a setscene dependency tree. We build a dependency tree
+ # condensed to inter-sstate task dependencies, similar to that used by setscene
+ # tasks. We can then call into setscene_depvalid() and decide
+ # which dependencies we can "see" and should expose in the recipe specific sysroot.
+ setscenedeps = copy.deepcopy(taskdepdata)
+
+ start = set([start])
+
+ sstatetasks = d.getVar("SSTATETASKS").split()
+ # Add recipe specific tasks referenced by setscene_depvalid()
+ sstatetasks.append("do_stash_locale")
+
+ # If start is an sstate task (like do_package) we need to add in its direct dependencies
+ # else the code below won't recurse into them.
+ for dep in set(start):
+ for dep2 in setscenedeps[dep][3]:
+ start.add(dep2)
+ start.remove(dep)
+
+ # Create collapsed do_populate_sysroot -> do_populate_sysroot tree
+ for dep in taskdepdata:
+ data = setscenedeps[dep]
+ if data[1] not in sstatetasks:
+ for dep2 in setscenedeps:
+ data2 = setscenedeps[dep2]
+ if dep in data2[3]:
+ data2[3].update(setscenedeps[dep][3])
+ data2[3].remove(dep)
+ if dep in start:
+ start.update(setscenedeps[dep][3])
+ start.remove(dep)
+ del setscenedeps[dep]
+
+ # Remove circular references
+ for dep in setscenedeps:
+ if dep in setscenedeps[dep][3]:
+ setscenedeps[dep][3].remove(dep)
+
+ # Direct dependencies should be present and can be depended upon
+ for dep in set(start):
+ if setscenedeps[dep][1] == "do_packagedata":
+ if dep not in configuredeps:
+ configuredeps.append(dep)
+
+ msgbuf = []
+ # Call into setscene_depvalid for each sub-dependency and only copy sysroot files
+ # for ones that would be restored from sstate.
+ done = list(start)
+ next = list(start)
+ while next:
+ new = []
+ for dep in next:
+ data = setscenedeps[dep]
+ for datadep in data[3]:
+ if datadep in done:
+ continue
+ taskdeps = {}
+ taskdeps[dep] = setscenedeps[dep][:2]
+ taskdeps[datadep] = setscenedeps[datadep][:2]
+ retval = setscene_depvalid(datadep, taskdeps, [], d, msgbuf)
+ done.append(datadep)
+ new.append(datadep)
+ if retval:
+ msgbuf.append("Skipping setscene dependency %s" % datadep)
+ continue
+ if datadep not in configuredeps and setscenedeps[datadep][1] == "do_packagedata":
+ configuredeps.append(datadep)
+ msgbuf.append("Adding dependency on %s" % setscenedeps[datadep][0])
+ else:
+ msgbuf.append("Following dependency on %s" % setscenedeps[datadep][0])
+ next = new
+
+ # This logging is too verbose for day to day use sadly
+ #bb.debug(2, "\n".join(msgbuf))
+
+ seendirs = set()
+ postinsts = []
+ multilibs = {}
+ manifests = {}
+
+ msg_adding = []
+
+ for dep in configuredeps:
+ c = setscenedeps[dep][0]
+ msg_adding.append(c)
+
+ manifest, d2 = oe.sstatesig.find_sstate_manifest(c, setscenedeps[dep][2], "packagedata", d, multilibs)
+ destsysroot = pkgdatadir
+
+ if manifest:
+ targetdir = destsysroot
+ with open(manifest, "r") as f:
+ manifests[dep] = manifest
+ for l in f:
+ l = l.strip()
+ dest = targetdir + l.replace(stagingdir, "")
+ if l.endswith("/"):
+ staging_copydir(l, targetdir, dest, seendirs)
+ continue
+ staging_copyfile(l, targetdir, dest, postinsts, seendirs)
+
+ bb.note("Installed into pkgdata-sysroot: %s" % str(msg_adding))
+
+}
+package_prepare_pkgdata[cleandirs] = "${WORKDIR_PKGDATA}"
+package_prepare_pkgdata[vardepsexclude] += "MACHINE_ARCH PACKAGE_EXTRA_ARCHS SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
+
+
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index f9398a9522..9145717f98 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -7,26 +7,45 @@ RPMBUILD="rpmbuild"
PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
-# Maintaining the perfile dependencies has singificant overhead when writing the
+# Maintaining the perfile dependencies has singificant overhead when writing the
# packages. When set, this value merges them for efficiency.
MERGEPERFILEDEPS = "1"
+# Filter dependencies based on a provided function.
+def filter_deps(var, f):
+ import collections
+
+ depends_dict = bb.utils.explode_dep_versions2(var)
+ newdeps_dict = collections.OrderedDict()
+ for dep in depends_dict:
+ if f(dep):
+ newdeps_dict[dep] = depends_dict[dep]
+ return bb.utils.join_deps(newdeps_dict, commasep=False)
+
+# Filter out absolute paths (typically /bin/sh and /usr/bin/env) and any perl
+# dependencies for nativesdk packages.
+def filter_nativesdk_deps(srcname, var):
+ if var and srcname.startswith("nativesdk-"):
+ var = filter_deps(var, lambda dep: not dep.startswith('/') and dep != 'perl' and not dep.startswith('perl('))
+ return var
+
# Construct per file dependencies file
def write_rpm_perfiledata(srcname, d):
- workdir = d.getVar('WORKDIR', True)
- packages = d.getVar('PACKAGES', True)
- pkgd = d.getVar('PKGD', True)
+ workdir = d.getVar('WORKDIR')
+ packages = d.getVar('PACKAGES')
+ pkgd = d.getVar('PKGD')
def dump_filerdeps(varname, outfile, d):
- outfile.write("#!/usr/bin/env python\n\n")
+ outfile.write("#!/usr/bin/env python3\n\n")
outfile.write("# Dependency table\n")
outfile.write('deps = {\n')
for pkg in packages.split():
dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg
- dependsflist = (d.getVar(dependsflist_key, True) or "")
+ dependsflist = (d.getVar(dependsflist_key) or "")
for dfile in dependsflist.split():
key = "FILE" + varname + "_" + dfile + "_" + pkg
- depends_dict = bb.utils.explode_dep_versions(d.getVar(key, True) or "")
+ deps = filter_nativesdk_deps(srcname, d.getVar(key) or "")
+ depends_dict = bb.utils.explode_dep_versions(deps)
file = dfile.replace("@underscore@", "_")
file = file.replace("@closebrace@", "]")
file = file.replace("@openbrace@", "[")
@@ -55,10 +74,7 @@ def write_rpm_perfiledata(srcname, d):
# OE-core dependencies a.k.a. RPM requires
outdepends = workdir + "/" + srcname + ".requires"
- try:
- dependsfile = open(outdepends, 'w')
- except OSError:
- raise bb.build.FuncFailed("unable to open spec file for writing.")
+ dependsfile = open(outdepends, 'w')
dump_filerdeps('RDEPENDS', dependsfile, d)
@@ -68,10 +84,7 @@ def write_rpm_perfiledata(srcname, d):
# OE-core / RPM Provides
outprovides = workdir + "/" + srcname + ".provides"
- try:
- providesfile = open(outprovides, 'w')
- except OSError:
- raise bb.build.FuncFailed("unable to open spec file for writing.")
+ providesfile = open(outprovides, 'w')
dump_filerdeps('RPROVIDES', providesfile, d)
@@ -86,20 +99,24 @@ python write_specfile () {
# append information for logs and patches to %prep
def add_prep(d,spec_files_bottom):
- if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d):
- spec_files_bottom.append('%%prep -n %s' % d.getVar('PN', True) )
+ if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d):
+ spec_files_bottom.append('%%prep -n %s' % d.getVar('PN') )
spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"")
spec_files_bottom.append('')
# append the name of tarball to key word 'SOURCE' in xxx.spec.
def tail_source(d):
- if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d):
- ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
+ if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d):
+ ar_outdir = d.getVar('ARCHIVER_OUTDIR')
if not os.path.exists(ar_outdir):
return
source_list = os.listdir(ar_outdir)
source_number = 0
for source in source_list:
+ # do_deploy_archives may have already run (from sstate) meaning a .src.rpm may already
+ # exist in ARCHIVER_OUTDIR so skip if present.
+ if source.endswith(".src.rpm"):
+ continue
# The rpmbuild doesn't need the root permission, but it needs
# to know the file's user and group name, the only user and
# group in fakeroot is "root" when working in fakeroot.
@@ -107,27 +124,6 @@ python write_specfile () {
os.chown(f, 0, 0)
spec_preamble_top.append('Source%s: %s' % (source_number, source))
source_number += 1
- # We need a simple way to remove the MLPREFIX from the package name,
- # and dependency information...
- def strip_multilib(name, d):
- multilibs = d.getVar('MULTILIBS', True) or ""
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0:
- name = "".join(name.split(eext[1] + '-'))
- return name
-
- def strip_multilib_deps(deps, d):
- depends = bb.utils.explode_dep_versions2(deps or "")
- newdeps = {}
- for dep in depends:
- newdeps[strip_multilib(dep, d)] = depends[dep]
- return bb.utils.join_deps(newdeps)
-
-# ml = d.getVar("MLPREFIX", True)
-# if ml and name and len(ml) != 0 and name.find(ml) == 0:
-# return ml.join(name.split(ml, 1)[1:])
-# return name
# In RPM, dependencies are of the format: pkg <>= Epoch:Version-Release
# This format is similar to OE, however there are restrictions on the
@@ -144,7 +140,7 @@ python write_specfile () {
# after renaming we cannot look up the dependencies in the packagedata
# store.
def translate_vers(varname, d):
- depends = d.getVar(varname, True)
+ depends = d.getVar(varname)
if depends:
depends_dict = bb.utils.explode_dep_versions2(depends)
newdeps_dict = {}
@@ -197,6 +193,8 @@ python write_specfile () {
if path.endswith("DEBIAN") or path.endswith("CONTROL"):
continue
path = path.replace("%", "%%%%%%%%")
+ path = path.replace("[", "?")
+ path = path.replace("]", "?")
# Treat all symlinks to directories as normal files.
# os.walk() lists them as directories.
@@ -216,6 +214,8 @@ python write_specfile () {
if dir == "CONTROL" or dir == "DEBIAN":
continue
dir = dir.replace("%", "%%%%%%%%")
+ dir = dir.replace("[", "?")
+ dir = dir.replace("]", "?")
# All packages own the directories their files are in...
target.append('%dir "' + path + '/' + dir + '"')
else:
@@ -230,6 +230,8 @@ python write_specfile () {
if file == "CONTROL" or file == "DEBIAN":
continue
file = file.replace("%", "%%%%%%%%")
+ file = file.replace("[", "?")
+ file = file.replace("]", "?")
if conffiles.count(path + '/' + file):
target.append('%config "' + path + '/' + file + '"')
else:
@@ -248,10 +250,10 @@ python write_specfile () {
def get_perfile(varname, pkg, d):
deps = []
dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg
- dependsflist = (d.getVar(dependsflist_key, True) or "")
+ dependsflist = (d.getVar(dependsflist_key) or "")
for dfile in dependsflist.split():
key = "FILE" + varname + "_" + dfile + "_" + pkg
- depends = d.getVar(key, True)
+ depends = d.getVar(key)
if depends:
deps.append(depends)
return " ".join(deps)
@@ -269,33 +271,33 @@ python write_specfile () {
else:
spec_preamble.append('%s' % textwrap.fill(dedent_text, width=75))
- packages = d.getVar('PACKAGES', True)
+ packages = d.getVar('PACKAGES')
if not packages or packages == '':
bb.debug(1, "No packages; nothing to do")
return
- pkgdest = d.getVar('PKGDEST', True)
+ pkgdest = d.getVar('PKGDEST')
if not pkgdest:
bb.fatal("No PKGDEST")
- outspecfile = d.getVar('OUTSPECFILE', True)
+ outspecfile = d.getVar('OUTSPECFILE')
if not outspecfile:
bb.fatal("No OUTSPECFILE")
# Construct the SPEC file...
- srcname = strip_multilib(d.getVar('PN', True), d)
- srcsummary = (d.getVar('SUMMARY', True) or d.getVar('DESCRIPTION', True) or ".")
- srcversion = d.getVar('PKGV', True).replace('-', '+')
- srcrelease = d.getVar('PKGR', True)
- srcepoch = (d.getVar('PKGE', True) or "")
- srclicense = d.getVar('LICENSE', True)
- srcsection = d.getVar('SECTION', True)
- srcmaintainer = d.getVar('MAINTAINER', True)
- srchomepage = d.getVar('HOMEPAGE', True)
- srcdescription = d.getVar('DESCRIPTION', True) or "."
+ srcname = d.getVar('PN')
+ srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
+ srcversion = d.getVar('PKGV').replace('-', '+')
+ srcrelease = d.getVar('PKGR')
+ srcepoch = (d.getVar('PKGE') or "")
+ srclicense = d.getVar('LICENSE')
+ srcsection = d.getVar('SECTION')
+ srcmaintainer = d.getVar('MAINTAINER')
+ srchomepage = d.getVar('HOMEPAGE')
+ srcdescription = d.getVar('DESCRIPTION') or "."
srccustomtagschunk = get_package_additional_metadata("rpm", d)
- srcdepends = strip_multilib_deps(d.getVar('DEPENDS', True), d)
+ srcdepends = d.getVar('DEPENDS')
srcrdepends = []
srcrrecommends = []
srcrsuggests = []
@@ -318,8 +320,8 @@ python write_specfile () {
spec_files_top = []
spec_files_bottom = []
- perfiledeps = (d.getVar("MERGEPERFILEDEPS", True) or "0") == "0"
- extra_pkgdata = (d.getVar("RPM_EXTRA_PKGDATA", True) or "0") == "1"
+ perfiledeps = (d.getVar("MERGEPERFILEDEPS") or "0") == "0"
+ extra_pkgdata = (d.getVar("RPM_EXTRA_PKGDATA") or "0") == "1"
for pkg in packages.split():
localdata = bb.data.createCopy(d)
@@ -328,29 +330,27 @@ python write_specfile () {
localdata.setVar('ROOT', '')
localdata.setVar('ROOT_%s' % pkg, root)
- pkgname = localdata.getVar('PKG_%s' % pkg, True)
+ pkgname = localdata.getVar('PKG_%s' % pkg)
if not pkgname:
pkgname = pkg
localdata.setVar('PKG', pkgname)
localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg)
- bb.data.update_data(localdata)
-
conffiles = get_conffiles(pkg, d)
- dirfiles = localdata.getVar('DIRFILES', True)
+ dirfiles = localdata.getVar('DIRFILES')
if dirfiles is not None:
dirfiles = dirfiles.split()
- splitname = strip_multilib(pkgname, d)
+ splitname = pkgname
- splitsummary = (localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or ".")
- splitversion = (localdata.getVar('PKGV', True) or "").replace('-', '+')
- splitrelease = (localdata.getVar('PKGR', True) or "")
- splitepoch = (localdata.getVar('PKGE', True) or "")
- splitlicense = (localdata.getVar('LICENSE', True) or "")
- splitsection = (localdata.getVar('SECTION', True) or "")
- splitdescription = (localdata.getVar('DESCRIPTION', True) or ".")
+ splitsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
+ splitversion = (localdata.getVar('PKGV') or "").replace('-', '+')
+ splitrelease = (localdata.getVar('PKGR') or "")
+ splitepoch = (localdata.getVar('PKGE') or "")
+ splitlicense = (localdata.getVar('LICENSE') or "")
+ splitsection = (localdata.getVar('SECTION') or "")
+ splitdescription = (localdata.getVar('DESCRIPTION') or ".")
splitcustomtagschunk = get_package_additional_metadata("rpm", localdata)
translate_vers('RDEPENDS', localdata)
@@ -363,18 +363,18 @@ python write_specfile () {
# Map the dependencies into their final form
mapping_rename_hook(localdata)
- splitrdepends = strip_multilib_deps(localdata.getVar('RDEPENDS', True), d)
- splitrrecommends = strip_multilib_deps(localdata.getVar('RRECOMMENDS', True), d)
- splitrsuggests = strip_multilib_deps(localdata.getVar('RSUGGESTS', True), d)
- splitrprovides = strip_multilib_deps(localdata.getVar('RPROVIDES', True), d)
- splitrreplaces = strip_multilib_deps(localdata.getVar('RREPLACES', True), d)
- splitrconflicts = strip_multilib_deps(localdata.getVar('RCONFLICTS', True), d)
+ splitrdepends = localdata.getVar('RDEPENDS')
+ splitrrecommends = localdata.getVar('RRECOMMENDS')
+ splitrsuggests = localdata.getVar('RSUGGESTS')
+ splitrprovides = localdata.getVar('RPROVIDES')
+ splitrreplaces = localdata.getVar('RREPLACES')
+ splitrconflicts = localdata.getVar('RCONFLICTS')
splitrobsoletes = []
- splitrpreinst = localdata.getVar('pkg_preinst', True)
- splitrpostinst = localdata.getVar('pkg_postinst', True)
- splitrprerm = localdata.getVar('pkg_prerm', True)
- splitrpostrm = localdata.getVar('pkg_postrm', True)
+ splitrpreinst = localdata.getVar('pkg_preinst')
+ splitrpostinst = localdata.getVar('pkg_postinst')
+ splitrprerm = localdata.getVar('pkg_prerm')
+ splitrpostrm = localdata.getVar('pkg_postrm')
if not perfiledeps:
@@ -382,8 +382,16 @@ python write_specfile () {
splitrdepends = splitrdepends + " " + get_perfile('RDEPENDS', pkg, d)
splitrprovides = splitrprovides + " " + get_perfile('RPROVIDES', pkg, d)
+ splitrdepends = filter_nativesdk_deps(srcname, splitrdepends)
+
# Gather special src/first package data
if srcname == splitname:
+ archiving = d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and \
+ bb.data.inherits_class('archiver', d)
+ if archiving and srclicense != splitlicense:
+ bb.warn("The SRPM produced may not have the correct overall source license in the License tag. This is due to the LICENSE for the primary package and SRPM conflicting.")
+
+ srclicense = splitlicense
srcrdepends = splitrdepends
srcrrecommends = splitrrecommends
srcrsuggests = splitrsuggests
@@ -401,7 +409,6 @@ python write_specfile () {
if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
- bb.note("Creating RPM package for %s" % splitname)
spec_files_top.append('%files')
if extra_pkgdata:
package_rpm_extra_pkgdata(splitname, spec_files_top, localdata)
@@ -410,7 +417,7 @@ python write_specfile () {
bb.note("Creating RPM package for %s" % splitname)
spec_files_top.extend(file_list)
else:
- bb.note("Creating EMPTY RPM Package for %s" % splitname)
+ bb.note("Creating empty RPM package for %s" % splitname)
spec_files_top.append('')
continue
@@ -423,8 +430,7 @@ python write_specfile () {
spec_preamble_bottom.append('Release: %s' % splitrelease)
if srcepoch != splitepoch:
spec_preamble_bottom.append('Epoch: %s' % splitepoch)
- if srclicense != splitlicense:
- spec_preamble_bottom.append('License: %s' % splitlicense)
+ spec_preamble_bottom.append('License: %s' % splitlicense)
spec_preamble_bottom.append('Group: %s' % splitsection)
if srccustomtagschunk != splitcustomtagschunk:
@@ -452,25 +458,10 @@ python write_specfile () {
if splitrpostrm:
print_deps(splitrdepends, "Requires(postun)", spec_preamble_bottom, d)
- # Suggests in RPM are like recommends in OE-core!
- print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
- # While there is no analog for suggests... (So call them recommends for now)
- print_deps(splitrsuggests, "Recommends", spec_preamble_bottom, d)
+ print_deps(splitrrecommends, "Recommends", spec_preamble_bottom, d)
+ print_deps(splitrsuggests, "Suggests", spec_preamble_bottom, d)
print_deps(splitrprovides, "Provides", spec_preamble_bottom, d)
print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
-
- # conflicts can not be in a provide! We will need to filter it.
- if splitrconflicts:
- depends_dict = bb.utils.explode_dep_versions2(splitrconflicts)
- newdeps_dict = {}
- for dep in depends_dict:
- if dep not in splitrprovides:
- newdeps_dict[dep] = depends_dict[dep]
- if newdeps_dict:
- splitrconflicts = bb.utils.join_deps(newdeps_dict)
- else:
- splitrconflicts = ""
-
print_deps(splitrconflicts, "Conflicts", spec_preamble_bottom, d)
spec_preamble_bottom.append('')
@@ -518,7 +509,7 @@ python write_specfile () {
bb.note("Creating RPM package for %s" % splitname)
spec_files_bottom.extend(file_list)
else:
- bb.note("Creating EMPTY RPM Package for %s" % splitname)
+ bb.note("Creating empty RPM package for %s" % splitname)
spec_files_bottom.append('')
del localdata
@@ -562,25 +553,10 @@ python write_specfile () {
if srcrpostrm:
print_deps(srcrdepends, "Requires(postun)", spec_preamble_top, d)
- # Suggests in RPM are like recommends in OE-core!
- print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
- # While there is no analog for suggests... (So call them recommends for now)
- print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
- print_deps(srcrprovides, "Provides", spec_preamble_top, d)
+ print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
+ print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
+ print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d)
print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
-
- # conflicts can not be in a provide! We will need to filter it.
- if srcrconflicts:
- depends_dict = bb.utils.explode_dep_versions2(srcrconflicts)
- newdeps_dict = {}
- for dep in depends_dict:
- if dep not in srcrprovides:
- newdeps_dict[dep] = depends_dict[dep]
- if newdeps_dict:
- srcrconflicts = bb.utils.join_deps(newdeps_dict)
- else:
- srcrconflicts = ""
-
print_deps(srcrconflicts, "Conflicts", spec_preamble_top, d)
spec_preamble_top.append('')
@@ -614,14 +590,11 @@ python write_specfile () {
spec_scriptlets_top.append('')
# Write the SPEC file
- try:
- specfile = open(outspecfile, 'w')
- except OSError:
- raise bb.build.FuncFailed("unable to open spec file for writing.")
+ specfile = open(outspecfile, 'w')
# RPMSPEC_PREAMBLE is a way to add arbitrary text to the top
# of the generated spec file
- external_preamble = d.getVar("RPMSPEC_PREAMBLE", True)
+ external_preamble = d.getVar("RPMSPEC_PREAMBLE")
if external_preamble:
specfile.write(external_preamble + "\n")
@@ -649,23 +622,15 @@ python write_specfile () {
write_specfile[vardepsexclude] = "OVERRIDES"
python do_package_rpm () {
- # We need a simple way to remove the MLPREFIX from the package name,
- # and dependency information...
- def strip_multilib(name, d):
- ml = d.getVar("MLPREFIX", True)
- if ml and name and len(ml) != 0 and name.find(ml) >= 0:
- return "".join(name.split(ml))
- return name
-
- workdir = d.getVar('WORKDIR', True)
- tmpdir = d.getVar('TMPDIR', True)
- pkgd = d.getVar('PKGD', True)
- pkgdest = d.getVar('PKGDEST', True)
+ workdir = d.getVar('WORKDIR')
+ tmpdir = d.getVar('TMPDIR')
+ pkgd = d.getVar('PKGD')
+ pkgdest = d.getVar('PKGDEST')
if not workdir or not pkgd or not tmpdir:
bb.error("Variables incorrectly set, unable to package")
return
- packages = d.getVar('PACKAGES', True)
+ packages = d.getVar('PACKAGES')
if not packages or packages == '':
bb.debug(1, "No packages; nothing to do")
return
@@ -674,42 +639,49 @@ python do_package_rpm () {
# If the spec file already exist, and has not been stored into
# pseudo's files.db, it maybe cause rpmbuild src.rpm fail,
# so remove it before doing rpmbuild src.rpm.
- srcname = strip_multilib(d.getVar('PN', True), d)
+ srcname = d.getVar('PN')
outspecfile = workdir + "/" + srcname + ".spec"
if os.path.isfile(outspecfile):
os.remove(outspecfile)
d.setVar('OUTSPECFILE', outspecfile)
bb.build.exec_func('write_specfile', d)
- perfiledeps = (d.getVar("MERGEPERFILEDEPS", True) or "0") == "0"
+ perfiledeps = (d.getVar("MERGEPERFILEDEPS") or "0") == "0"
if perfiledeps:
outdepends, outprovides = write_rpm_perfiledata(srcname, d)
# Setup the rpmbuild arguments...
- rpmbuild = d.getVar('RPMBUILD', True)
- targetsys = d.getVar('TARGET_SYS', True)
- targetvendor = d.getVar('HOST_VENDOR', True)
- package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_")
- sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX', True) or "nativesdk").replace("-", "_")
- if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix):
- ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_")
- d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
- else:
- d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
+ rpmbuild = d.getVar('RPMBUILD')
+ targetsys = d.getVar('TARGET_SYS')
+ targetvendor = d.getVar('HOST_VENDOR')
+
+ # Too many places in dnf stack assume that arch-independent packages are "noarch".
+ # Let's not fight against this.
+ package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", "_")
+ if package_arch == "all":
+ package_arch = "noarch"
+
+ sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX') or "nativesdk").replace("-", "_")
+ d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
- bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR', True))
- pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
- magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
+ bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
+ pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-linux')
bb.utils.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0o755)
cmd = rpmbuild
- cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
+ cmd = cmd + " --noclean --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
- cmd = cmd + " --define '_builddir " + d.getVar('S', True) + "'"
+ cmd = cmd + " --define '_builddir " + d.getVar('B') + "'"
cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
+ cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
+ cmd = cmd + " --define '_build_id_links none'"
+ cmd = cmd + " --define '_binary_payload w6T.xzdio'"
+ cmd = cmd + " --define '_source_payload w6T.xzdio'"
+ cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
+ cmd = cmd + " --define '_buildhost reproducible'"
if perfiledeps:
cmd = cmd + " --define '__find_requires " + outdepends + "'"
cmd = cmd + " --define '__find_provides " + outprovides + "'"
@@ -718,11 +690,10 @@ python do_package_rpm () {
cmd = cmd + " --define '__find_provides %{nil}'"
cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
cmd = cmd + " --define 'debug_package %{nil}'"
- cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
cmd = cmd + " --define '_tmppath " + workdir + "'"
- if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d):
- cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR', True) + "'"
- cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_OUTDIR', True) + "'"
+ if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d):
+ cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + "'"
+ cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_RPMOUTDIR') + "'"
cmdsrpm = cmdsrpm + " -bs " + outspecfile
# Build the .src.rpm
d.setVar('SBUILDSPEC', cmdsrpm + "\n")
@@ -730,17 +701,20 @@ python do_package_rpm () {
bb.build.exec_func('SBUILDSPEC', d)
cmd = cmd + " -bb " + outspecfile
+ # rpm 4 creates various empty directories in _topdir, let's clean them up
+ cleanupcmd = "rm -rf %s/BUILDROOT %s/SOURCES %s/SPECS %s/SRPMS" % (workdir, workdir, workdir, workdir)
+
# Build the rpm package!
- d.setVar('BUILDSPEC', cmd + "\n")
+ d.setVar('BUILDSPEC', cmd + "\n" + cleanupcmd + "\n")
d.setVarFlag('BUILDSPEC', 'func', '1')
bb.build.exec_func('BUILDSPEC', d)
- if d.getVar('RPM_SIGN_PACKAGES', True) == '1':
+ if d.getVar('RPM_SIGN_PACKAGES') == '1':
bb.build.exec_func("sign_rpm", d)
}
python () {
- if d.getVar('PACKAGES', True) != '':
+ if d.getVar('PACKAGES') != '':
deps = ' rpm-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot'
d.appendVarFlag('do_package_write_rpm', 'depends', deps)
d.setVarFlag('do_package_write_rpm', 'fakeroot', '1')
@@ -766,9 +740,10 @@ python do_package_write_rpm () {
do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}"
do_package_write_rpm[umask] = "022"
+do_package_write_rpm[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
addtask package_write_rpm after do_packagedata do_package
PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
-PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"
+PACKAGEINDEXDEPS += "createrepo-c-native:do_populate_sysroot"
do_build[recrdeptask] += "do_package_write_rpm"
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass
index 854e645286..ce3ab4c8e2 100644
--- a/meta/classes/package_tar.bbclass
+++ b/meta/classes/package_tar.bbclass
@@ -4,27 +4,30 @@ IMAGE_PKGTYPE ?= "tar"
python do_package_tar () {
import subprocess
- workdir = d.getVar('WORKDIR', True)
+
+ oldcwd = os.getcwd()
+
+ workdir = d.getVar('WORKDIR')
if not workdir:
bb.error("WORKDIR not defined, unable to package")
return
- outdir = d.getVar('DEPLOY_DIR_TAR', True)
+ outdir = d.getVar('DEPLOY_DIR_TAR')
if not outdir:
bb.error("DEPLOY_DIR_TAR not defined, unable to package")
return
- dvar = d.getVar('D', True)
+ dvar = d.getVar('D')
if not dvar:
bb.error("D not defined, unable to package")
return
- packages = d.getVar('PACKAGES', True)
+ packages = d.getVar('PACKAGES')
if not packages:
bb.debug(1, "PACKAGES not defined, nothing to package")
return
- pkgdest = d.getVar('PKGDEST', True)
+ pkgdest = d.getVar('PKGDEST')
bb.utils.mkdirhier(outdir)
bb.utils.mkdirhier(dvar)
@@ -35,7 +38,6 @@ python do_package_tar () {
overrides = localdata.getVar('OVERRIDES', False)
localdata.setVar('OVERRIDES', '%s:%s' % (overrides, pkg))
- bb.data.update_data(localdata)
bb.utils.mkdirhier(root)
basedir = os.path.dirname(root)
@@ -43,17 +45,19 @@ python do_package_tar () {
os.chdir(root)
dlist = os.listdir(root)
if not dlist:
- bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
+ bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV'), localdata.getVar('PKGR')))
continue
args = "tar -cz --exclude=CONTROL --exclude=DEBIAN -f".split()
ret = subprocess.call(args + [tarfn] + dlist)
if ret != 0:
bb.error("Creation of tar %s failed." % tarfn)
+
+ os.chdir(oldcwd)
}
python () {
- if d.getVar('PACKAGES', True) != '':
- deps = (d.getVarFlag('do_package_write_tar', 'depends', True) or "").split()
+ if d.getVar('PACKAGES') != '':
+ deps = (d.getVarFlag('do_package_write_tar', 'depends') or "").split()
deps.append('tar-native:do_populate_sysroot')
deps.append('virtual/fakeroot-native:do_populate_sysroot')
d.setVarFlag('do_package_write_tar', 'depends', " ".join(deps))
diff --git a/meta/classes/packagedata.bbclass b/meta/classes/packagedata.bbclass
index 3397f1e36b..a903e5cfd2 100644
--- a/meta/classes/packagedata.bbclass
+++ b/meta/classes/packagedata.bbclass
@@ -2,10 +2,10 @@ python read_subpackage_metadata () {
import oe.packagedata
vars = {
- "PN" : d.getVar('PN', True),
- "PE" : d.getVar('PE', True),
- "PV" : d.getVar('PV', True),
- "PR" : d.getVar('PR', True),
+ "PN" : d.getVar('PN'),
+ "PE" : d.getVar('PE'),
+ "PV" : d.getVar('PV'),
+ "PR" : d.getVar('PR'),
}
data = oe.packagedata.read_pkgdata(vars["PN"], d)
@@ -13,7 +13,7 @@ python read_subpackage_metadata () {
for key in data.keys():
d.setVar(key, data[key])
- for pkg in d.getVar('PACKAGES', True).split():
+ for pkg in d.getVar('PACKAGES').split():
sdata = oe.packagedata.read_subpkgdata(pkg, d)
for key in sdata.keys():
if key in vars:
diff --git a/meta/classes/packagefeed-stability.bbclass b/meta/classes/packagefeed-stability.bbclass
index aa01def74d..5648602564 100644
--- a/meta/classes/packagefeed-stability.bbclass
+++ b/meta/classes/packagefeed-stability.bbclass
@@ -31,7 +31,7 @@ python() {
# This assumes that the package_write task is called package_write_<pkgtype>
# and that the directory in which packages should be written is
# pointed to by the variable DEPLOY_DIR_<PKGTYPE>
- for pkgclass in (d.getVar('PACKAGE_CLASSES', True) or '').split():
+ for pkgclass in (d.getVar('PACKAGE_CLASSES') or '').split():
if pkgclass.startswith('package_'):
pkgtype = pkgclass.split('_', 1)[1]
pkgwritefunc = 'do_package_write_%s' % pkgtype
@@ -51,7 +51,7 @@ python() {
d.appendVarFlag('do_build', 'recrdeptask', ' ' + pkgcomparefunc)
- if d.getVarFlag(pkgwritefunc, 'noexec', True) or not d.getVarFlag(pkgwritefunc, 'task', True):
+ if d.getVarFlag(pkgwritefunc, 'noexec') or not d.getVarFlag(pkgwritefunc, 'task'):
# Packaging is disabled for this recipe, we shouldn't do anything
continue
@@ -71,7 +71,7 @@ python() {
# This isn't the real task function - it's a template that we use in the
# anonymous python code above
fakeroot python do_package_compare () {
- currenttask = d.getVar('BB_CURRENTTASK', True)
+ currenttask = d.getVar('BB_CURRENTTASK')
pkgtype = currenttask.rsplit('_', 1)[1]
package_compare_impl(pkgtype, d)
}
@@ -83,12 +83,12 @@ def package_compare_impl(pkgtype, d):
import subprocess
import oe.sstatesig
- pn = d.getVar('PN', True)
- deploydir = d.getVar('DEPLOY_DIR_%s' % pkgtype.upper(), True)
+ pn = d.getVar('PN')
+ deploydir = d.getVar('DEPLOY_DIR_%s' % pkgtype.upper())
prepath = deploydir + '-prediff/'
# Find out PKGR values are
- pkgdatadir = d.getVar('PKGDATA_DIR', True)
+ pkgdatadir = d.getVar('PKGDATA_DIR')
packages = []
try:
with open(os.path.join(pkgdatadir, pn), 'r') as f:
@@ -138,7 +138,7 @@ def package_compare_impl(pkgtype, d):
files = []
docopy = False
manifest, _ = oe.sstatesig.sstate_get_manifest_filename(pkgwritetask, d)
- mlprefix = d.getVar('MLPREFIX', True)
+ mlprefix = d.getVar('MLPREFIX')
# Copy recipe's all packages if one of the packages are different to make
# they have the same PR.
with open(manifest, 'r') as f:
@@ -189,7 +189,7 @@ def package_compare_impl(pkgtype, d):
# Remove all the old files and copy again if docopy
if docopy:
- bb.plain('Copying packages for recipe %s' % pn)
+ bb.note('Copying packages for recipe %s' % pn)
pcmanifest = os.path.join(prepath, d.expand('pkg-compare-manifest-${MULTIMACH_TARGET_SYS}-${PN}'))
try:
with open(pcmanifest, 'r') as f:
@@ -215,7 +215,7 @@ def package_compare_impl(pkgtype, d):
# multilib), they're identical in theory, but sstate.bbclass
# copies it again, so keep align with that.
if os.path.exists(destpath) and pkgtype == 'rpm' \
- and d.getVar('PACKAGE_ARCH', True) == 'all':
+ and d.getVar('PACKAGE_ARCH') == 'all':
os.unlink(destpath)
if (os.stat(srcpath).st_dev == os.stat(destdir).st_dev):
# Use a hard link to save space
@@ -224,15 +224,15 @@ def package_compare_impl(pkgtype, d):
shutil.copyfile(srcpath, destpath)
f.write('%s\n' % destpath)
else:
- bb.plain('Not copying packages for recipe %s' % pn)
+ bb.note('Not copying packages for recipe %s' % pn)
do_cleansstate[postfuncs] += "pfs_cleanpkgs"
python pfs_cleanpkgs () {
import errno
- for pkgclass in (d.getVar('PACKAGE_CLASSES', True) or '').split():
+ for pkgclass in (d.getVar('PACKAGE_CLASSES') or '').split():
if pkgclass.startswith('package_'):
pkgtype = pkgclass.split('_', 1)[1]
- deploydir = d.getVar('DEPLOY_DIR_%s' % pkgtype.upper(), True)
+ deploydir = d.getVar('DEPLOY_DIR_%s' % pkgtype.upper())
prepath = deploydir + '-prediff'
pcmanifest = os.path.join(prepath, d.expand('pkg-compare-manifest-${MULTIMACH_TARGET_SYS}-${PN}'))
try:
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index 3928c8a4ac..1541c8fbff 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -8,7 +8,7 @@ PACKAGES = "${PN}"
# By default, packagegroup packages do not depend on a certain architecture.
# Only if dependencies are modified by MACHINE_FEATURES, packages
-# need to be set to MACHINE_ARCH after inheriting packagegroup.bbclass
+# need to be set to MACHINE_ARCH before inheriting packagegroup.bbclass
PACKAGE_ARCH ?= "all"
# Fully expanded - so it applies the overrides as well
@@ -16,15 +16,15 @@ PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
LICENSE ?= "MIT"
-inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')}
+inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED') == 'all', 'allarch', '')}
# This automatically adds -dbg and -dev flavours of all PACKAGES
# to the list. Their dependencies (RRECOMMENDS) are handled as usual
# by package_depchains in a following step.
# Also mark all packages as ALLOW_EMPTY
python () {
- packages = d.getVar('PACKAGES', True).split()
- if d.getVar('PACKAGEGROUP_DISABLE_COMPLEMENTARY', True) != '1':
+ packages = d.getVar('PACKAGES').split()
+ if d.getVar('PACKAGEGROUP_DISABLE_COMPLEMENTARY') != '1':
types = ['', '-dbg', '-dev']
if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
types.append('-ptest')
@@ -40,17 +40,22 @@ python () {
DEPCHAIN_DBGDEFAULTDEPS = "1"
# We only need the packaging tasks - disable the rest
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_install[noexec] = "1"
-do_populate_sysroot[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_install
+deltask do_populate_sysroot
+
+INHIBIT_DEFAULT_DEPS = "1"
python () {
- initman = d.getVar("VIRTUAL-RUNTIME_init_manager", True)
+ if bb.data.inherits_class('nativesdk', d):
+ return
+ initman = d.getVar("VIRTUAL-RUNTIME_init_manager")
if initman and initman in ['sysvinit', 'systemd'] and not bb.utils.contains('DISTRO_FEATURES', initman, True, False, d):
bb.fatal("Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (%s) matches the entries enabled in DISTRO_FEATURES" % initman)
}
+CVE_PRODUCT = ""
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 1f6927be04..cd241f1c84 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -10,110 +10,79 @@ PATCH_GIT_USER_EMAIL ?= "oe.patch@oe"
inherit terminal
-def src_patches(d, all = False ):
- workdir = d.getVar('WORKDIR', True)
- fetch = bb.fetch2.Fetch([], d)
- patches = []
- sources = []
- for url in fetch.urls:
- local = patch_path(url, fetch, workdir)
- if not local:
- if all:
- local = fetch.localpath(url)
- sources.append(local)
- continue
-
- urldata = fetch.ud[url]
- parm = urldata.parm
- patchname = parm.get('pname') or os.path.basename(local)
-
- apply, reason = should_apply(parm, d)
- if not apply:
- if reason:
- bb.note("Patch %s %s" % (patchname, reason))
- continue
-
- patchparm = {'patchname': patchname}
- if "striplevel" in parm:
- striplevel = parm["striplevel"]
- elif "pnum" in parm:
- #bb.msg.warn(None, "Deprecated usage of 'pnum' url parameter in '%s', please use 'striplevel'" % url)
- striplevel = parm["pnum"]
- else:
- striplevel = '1'
- patchparm['striplevel'] = striplevel
-
- patchdir = parm.get('patchdir')
- if patchdir:
- patchparm['patchdir'] = patchdir
-
- localurl = bb.fetch.encodeurl(('file', '', local, '', '', patchparm))
- patches.append(localurl)
-
- if all:
- return sources
-
- return patches
-
-def patch_path(url, fetch, workdir):
- """Return the local path of a patch, or None if this isn't a patch"""
+python () {
+ if d.getVar('PATCHTOOL') == 'git' and d.getVar('PATCH_COMMIT_FUNCTIONS') == '1':
+ extratasks = bb.build.tasksbetween('do_unpack', 'do_patch', d)
+ try:
+ extratasks.remove('do_unpack')
+ except ValueError:
+ # For some recipes do_unpack doesn't exist, ignore it
+ pass
+
+ d.appendVarFlag('do_patch', 'prefuncs', ' patch_task_patch_prefunc')
+ for task in extratasks:
+ d.appendVarFlag(task, 'postfuncs', ' patch_task_postfunc')
+}
- local = fetch.localpath(url)
- base, ext = os.path.splitext(os.path.basename(local))
- if ext in ('.gz', '.bz2', '.Z'):
- local = os.path.join(workdir, base)
- ext = os.path.splitext(base)[1]
+python patch_task_patch_prefunc() {
+ # Prefunc for do_patch
+ srcsubdir = d.getVar('S')
+
+ workdir = os.path.abspath(d.getVar('WORKDIR'))
+ testsrcdir = os.path.abspath(srcsubdir)
+ if (testsrcdir + os.sep).startswith(workdir + os.sep):
+ # Double-check that either workdir or S or some directory in-between is a git repository
+ found = False
+ while testsrcdir != workdir:
+ if os.path.exists(os.path.join(testsrcdir, '.git')):
+ found = True
+ break
+ if testsrcdir == workdir:
+ break
+ testsrcdir = os.path.dirname(testsrcdir)
+ if not found:
+ bb.fatal('PATCHTOOL = "git" set for source tree that is not a git repository. Refusing to continue as that may result in commits being made in your metadata repository.')
+
+ patchdir = os.path.join(srcsubdir, 'patches')
+ if os.path.exists(patchdir):
+ if os.listdir(patchdir):
+ d.setVar('PATCH_HAS_PATCHES_DIR', '1')
+ else:
+ os.rmdir(patchdir)
+}
- urldata = fetch.ud[url]
- if "apply" in urldata.parm:
- apply = oe.types.boolean(urldata.parm["apply"])
- if not apply:
- return
- elif ext not in (".diff", ".patch"):
- return
+python patch_task_postfunc() {
+ # Prefunc for task functions between do_unpack and do_patch
+ import oe.patch
+ import shutil
+ func = d.getVar('BB_RUNTASK')
+ srcsubdir = d.getVar('S')
+
+ if os.path.exists(srcsubdir):
+ if func == 'do_patch':
+ haspatches = (d.getVar('PATCH_HAS_PATCHES_DIR') == '1')
+ patchdir = os.path.join(srcsubdir, 'patches')
+ if os.path.exists(patchdir):
+ shutil.rmtree(patchdir)
+ if haspatches:
+ stdout, _ = bb.process.run('git status --porcelain patches', cwd=srcsubdir)
+ if stdout:
+ bb.process.run('git checkout patches', cwd=srcsubdir)
+ stdout, _ = bb.process.run('git status --porcelain .', cwd=srcsubdir)
+ if stdout:
+ useroptions = []
+ oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d)
+ bb.process.run('git add .; git %s commit -a -m "Committing changes from %s\n\n%s"' % (' '.join(useroptions), func, oe.patch.GitApplyTree.ignore_commit_prefix + ' - from %s' % func), cwd=srcsubdir)
+}
- return local
+def src_patches(d, all=False, expand=True):
+ import oe.patch
+ return oe.patch.src_patches(d, all, expand)
def should_apply(parm, d):
"""Determine if we should apply the given patch"""
-
- if "mindate" in parm or "maxdate" in parm:
- pn = d.getVar('PN', True)
- srcdate = d.getVar('SRCDATE_%s' % pn, True)
- if not srcdate:
- srcdate = d.getVar('SRCDATE', True)
-
- if srcdate == "now":
- srcdate = d.getVar('DATE', True)
-
- if "maxdate" in parm and parm["maxdate"] < srcdate:
- return False, 'is outdated'
-
- if "mindate" in parm and parm["mindate"] > srcdate:
- return False, 'is predated'
-
-
- if "minrev" in parm:
- srcrev = d.getVar('SRCREV', True)
- if srcrev and srcrev < parm["minrev"]:
- return False, 'applies to later revisions'
-
- if "maxrev" in parm:
- srcrev = d.getVar('SRCREV', True)
- if srcrev and srcrev > parm["maxrev"]:
- return False, 'applies to earlier revisions'
-
- if "rev" in parm:
- srcrev = d.getVar('SRCREV', True)
- if srcrev and parm["rev"] not in srcrev:
- return False, "doesn't apply to revision"
-
- if "notrev" in parm:
- srcrev = d.getVar('SRCREV', True)
- if srcrev and parm["notrev"] in srcrev:
- return False, "doesn't apply to revision"
-
- return True, None
+ import oe.patch
+ return oe.patch.should_apply(parm, d)
should_apply[vardepsexclude] = "DATE SRCDATE"
@@ -126,20 +95,20 @@ python patch_do_patch() {
"git": oe.patch.GitApplyTree,
}
- cls = patchsetmap[d.getVar('PATCHTOOL', True) or 'quilt']
+ cls = patchsetmap[d.getVar('PATCHTOOL') or 'quilt']
resolvermap = {
"noop": oe.patch.NOOPResolver,
"user": oe.patch.UserResolver,
}
- rcls = resolvermap[d.getVar('PATCHRESOLVE', True) or 'user']
+ rcls = resolvermap[d.getVar('PATCHRESOLVE') or 'user']
classes = {}
- s = d.getVar('S', True)
+ s = d.getVar('S')
- os.putenv('PATH', d.getVar('PATH', True))
+ os.putenv('PATH', d.getVar('PATH'))
# We must use one TMPDIR per process so that the "patch" processes
# don't generate the same temp file name.
@@ -184,6 +153,7 @@ python patch_do_patch() {
patch_do_patch[vardepsexclude] = "PATCHRESOLVE"
addtask patch after do_unpack
+do_patch[umask] = "022"
do_patch[dirs] = "${WORKDIR}"
do_patch[depends] = "${PATCHDEPENDENCY}"
diff --git a/meta/classes/perl-version.bbclass b/meta/classes/perl-version.bbclass
new file mode 100644
index 0000000000..84b67b8180
--- /dev/null
+++ b/meta/classes/perl-version.bbclass
@@ -0,0 +1,66 @@
+PERL_OWN_DIR = ""
+
+# Determine the staged version of perl from the perl configuration file
+# Assign vardepvalue, because otherwise signature is changed before and after
+# perl is built (from None to real version in config.sh).
+get_perl_version[vardepvalue] = "${PERL_OWN_DIR}"
+def get_perl_version(d):
+ import re
+ cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/config.sh')
+ try:
+ f = open(cfg, 'r')
+ except IOError:
+ return None
+ l = f.readlines();
+ f.close();
+ r = re.compile(r"^version='(\d*\.\d*\.\d*)'")
+ for s in l:
+ m = r.match(s)
+ if m:
+ return m.group(1)
+ return None
+
+PERLVERSION := "${@get_perl_version(d)}"
+PERLVERSION[vardepvalue] = ""
+
+
+# Determine the staged arch of perl from the perl configuration file
+# Assign vardepvalue, because otherwise signature is changed before and after
+# perl is built (from None to real version in config.sh).
+def get_perl_arch(d):
+ import re
+ cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/config.sh')
+ try:
+ f = open(cfg, 'r')
+ except IOError:
+ return None
+ l = f.readlines();
+ f.close();
+ r = re.compile("^archname='([^']*)'")
+ for s in l:
+ m = r.match(s)
+ if m:
+ return m.group(1)
+ return None
+
+PERLARCH := "${@get_perl_arch(d)}"
+PERLARCH[vardepvalue] = ""
+
+# Determine the staged arch of perl-native from the perl configuration file
+# Assign vardepvalue, because otherwise signature is changed before and after
+# perl is built (from None to real version in config.sh).
+def get_perl_hostarch(d):
+ import re
+ cfg = d.expand('${STAGING_LIBDIR_NATIVE}/perl5/config.sh')
+ try:
+ f = open(cfg, 'r')
+ except IOError:
+ return None
+ l = f.readlines();
+ f.close();
+ r = re.compile("^archname='([^']*)'")
+ for s in l:
+ m = r.match(s)
+ if m:
+ return m.group(1)
+ return None
diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index dbe11e12da..b07f51ed56 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -3,14 +3,16 @@
# packages.
#
-DEPENDS += "qemu-native"
+DEPENDS_append_class-target = " qemu-native"
inherit qemu
PIXBUF_PACKAGES ??= "${PN}"
+PACKAGE_WRITE_DEPS += "qemu-native gdk-pixbuf-native"
+
pixbufcache_common() {
if [ "x$D" != "x" ]; then
- $INTERCEPT_DIR/postinst_intercept update_pixbuf_cache ${PKG} mlprefix=${MLPREFIX} libdir=${libdir} \
+ $INTERCEPT_DIR/postinst_intercept update_pixbuf_cache ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} libdir=${libdir} \
bindir=${bindir} base_libdir=${base_libdir}
else
@@ -28,40 +30,34 @@ fi
}
python populate_packages_append() {
- pixbuf_pkgs = d.getVar('PIXBUF_PACKAGES', True).split()
+ pixbuf_pkgs = d.getVar('PIXBUF_PACKAGES').split()
for pkg in pixbuf_pkgs:
bb.note("adding pixbuf postinst and postrm scripts to %s" % pkg)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg) or d.getVar('pkg_postinst')
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += d.getVar('pixbufcache_common', True)
+ postinst += d.getVar('pixbufcache_common')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True)
+ postrm = d.getVar('pkg_postrm_%s' % pkg) or d.getVar('pkg_postrm')
if not postrm:
postrm = '#!/bin/sh\n'
- postrm += d.getVar('pixbufcache_common', True)
+ postrm += d.getVar('pixbufcache_common')
d.setVar('pkg_postrm_%s' % pkg, postrm)
}
gdkpixbuf_complete() {
- GDK_PIXBUF_FATAL_LOADER=1 ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache || exit 1
+GDK_PIXBUF_FATAL_LOADER=1 ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache || exit 1
}
-#
-# Add an sstate postinst hook to update the cache for native packages.
-# An error exit during populate_sysroot_setscene allows bitbake to
-# try to recover by re-building the package.
-#
-SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst"
+DEPENDS_append_class-native = " gdk-pixbuf-native"
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " pixbufcache_sstate_postinst"
-# See base.bbclass for the other half of this
pixbufcache_sstate_postinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then
- ${gdkpixbuf_complete}
- elif [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]; then
- echo "${gdkpixbuf_complete}" >> ${STAGING_DIR}/sstatecompletions
- fi
+ mkdir -p ${SYSROOT_DESTDIR}${bindir}
+ dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}
+ echo '#!/bin/sh' > $dest
+ echo "${gdkpixbuf_complete}" >> $dest
+ chmod 0755 $dest
}
-
diff --git a/meta/classes/podfix.bbclass b/meta/classes/podfix.bbclass
new file mode 100644
index 0000000000..cc8210a27e
--- /dev/null
+++ b/meta/classes/podfix.bbclass
@@ -0,0 +1,35 @@
+python pod_strip_version() {
+ import re
+
+ def opener(filename, mode):
+ if filename.endswith(".gz"):
+ import gzip
+ return gzip.open(filename, mode)
+ elif filename.endswith(".bz2"):
+ import bz2
+ return bz2.open(filename, mode)
+ else:
+ return open(filename, mode)
+
+ bad_re = re.compile(rb"Automatically generated by Pod::Man( [0-9]+.+)")
+
+ for root, dirs, files in os.walk(d.expand("${D}${mandir}")):
+ for filename in files:
+ filename = os.path.join(root, filename)
+ if not os.path.isfile(filename):
+ continue
+
+ with opener(filename, "rb") as manfile:
+ manpage = manfile.read()
+ m = bad_re.search(manpage)
+ if not m:
+ continue
+
+ bb.note("podfix: stripping version from %s" % filename)
+ os.unlink(filename)
+ with opener(filename, "wb") as manfile:
+ manfile.write(manpage[:m.start(1)])
+ manfile.write(manpage[m.end(1):])
+}
+
+do_install[postfuncs] += "pod_strip_version"
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index a23775e6c5..d03465b6fc 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -1,4 +1,4 @@
-inherit meta
+inherit meta image-postinst-intercepts
# Wildcards specifying complementary packages to install for every package that has been explicitly
# installed into the rootfs
@@ -6,20 +6,28 @@ COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
COMPLEMENTARY_GLOB[staticdev-pkgs] = '*-staticdev'
COMPLEMENTARY_GLOB[doc-pkgs] = '*-doc'
COMPLEMENTARY_GLOB[dbg-pkgs] = '*-dbg'
+COMPLEMENTARY_GLOB[src-pkgs] = '*-src'
COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest'
+COMPLEMENTARY_GLOB[bash-completion-pkgs] = '*-bash-completion'
def complementary_globs(featurevar, d):
all_globs = d.getVarFlags('COMPLEMENTARY_GLOB')
globs = []
- features = set((d.getVar(featurevar, True) or '').split())
+ features = set((d.getVar(featurevar) or '').split())
for name, glob in all_globs.items():
if name in features:
globs.append(glob)
return ' '.join(globs)
-SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs"
+SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs src-pkgs ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'doc-pkgs', '', d)}"
SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}'
+PACKAGE_ARCHS_append_task-populate-sdk = " sdk-provides-dummy-target"
+SDK_PACKAGE_ARCHS += "sdk-provides-dummy-${SDKPKGSUFFIX}"
+
+# List of locales to install, or "all" for all of them, or unset for none.
+SDKIMAGE_LINGUAS ?= "all"
+
inherit rootfs_${IMAGE_PKGTYPE}
SDK_DIR = "${WORKDIR}/sdk"
@@ -34,15 +42,29 @@ SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
TOOLCHAIN_HOST_TASK ?= "nativesdk-packagegroup-sdk-host packagegroup-cross-canadian-${MACHINE}"
TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
-TOOLCHAIN_TARGET_TASK ?= " \
- ${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')} \
- ${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target-dbg')} \
- "
+TOOLCHAIN_TARGET_TASK ?= "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')} target-sdk-provides-dummy"
TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
+# Default archived SDK's suffix
+SDK_ARCHIVE_TYPE ?= "tar.xz"
+
+# To support different sdk type according to SDK_ARCHIVE_TYPE, now support zip and tar.xz
+python () {
+ if d.getVar('SDK_ARCHIVE_TYPE') == 'zip':
+ d.setVar('SDK_ARCHIVE_DEPENDS', 'zip-native')
+ # SDK_ARCHIVE_CMD used to generate archived sdk ${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR}
+ # recommand to cd into input dir first to avoid archive with buildpath
+ d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
+ else:
+ d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native')
+ d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz -T 0 -9 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')
+}
+
SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
-SDK_DEPENDS = "virtual/fakeroot-native pixz-native"
+SDK_DEPENDS = "virtual/fakeroot-native ${SDK_ARCHIVE_DEPENDS} cross-localedef-native nativesdk-qemuwrapper-cross ${@' '.join(["%s-qemuwrapper-cross" % m for m in d.getVar("MULTILIB_VARIANTS").split()])} qemuwrapper-cross"
+PATH_prepend = "${STAGING_DIR_HOST}${SDKPATHNATIVE}${bindir}/crossscripts:${@":".join(all_multilib_tune_values(d, 'STAGING_BINDIR_CROSS').split())}:"
+SDK_DEPENDS += "nativesdk-glibc-locale"
# We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it
# could be set to the MACHINE_ARCH
@@ -57,48 +79,74 @@ SDK_PRE_INSTALL_COMMAND ?= ""
SDK_POST_INSTALL_COMMAND ?= ""
SDK_RELOCATE_AFTER_INSTALL ?= "1"
-SDKEXTPATH ?= "~/${@d.getVar('DISTRO', True)}_sdk"
-SDK_TITLE ?= "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} SDK"
+SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
+SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
+SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
+SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
+
python write_target_sdk_manifest () {
from oe.sdk import sdk_list_installed_packages
from oe.utils import format_pkg_list
- sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST", True))
+ sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST"))
pkgs = sdk_list_installed_packages(d, True)
if not os.path.exists(sdkmanifestdir):
bb.utils.mkdirhier(sdkmanifestdir)
- with open(d.getVar('SDK_TARGET_MANIFEST', True), 'w') as output:
+ with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output:
output.write(format_pkg_list(pkgs, 'ver'))
}
+python write_sdk_test_data() {
+ from oe.data import export2json
+ testdata = "%s/%s.testdata.json" % (d.getVar('SDKDEPLOYDIR'), d.getVar('TOOLCHAIN_OUTPUTNAME'))
+ bb.utils.mkdirhier(os.path.dirname(testdata))
+ export2json(d, testdata)
+}
+
python write_host_sdk_manifest () {
from oe.sdk import sdk_list_installed_packages
from oe.utils import format_pkg_list
- sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST", True))
+ sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST"))
pkgs = sdk_list_installed_packages(d, False)
if not os.path.exists(sdkmanifestdir):
bb.utils.mkdirhier(sdkmanifestdir)
- with open(d.getVar('SDK_HOST_MANIFEST', True), 'w') as output:
+ with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output:
output.write(format_pkg_list(pkgs, 'ver'))
}
-POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; "
-POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; "
+POPULATE_SDK_POST_TARGET_COMMAND_append = " write_sdk_test_data ; "
+POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " write_target_sdk_manifest ; "
+POPULATE_SDK_POST_HOST_COMMAND_append_task-populate-sdk = " write_host_sdk_manifest; "
SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}"
-SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; ${SDK_PACKAGING_COMMAND} "
-
-# Some archs override this, we need the nativesdk version
-# turns out this is hard to get from the datastore due to TRANSLATED_TARGET_ARCH
-# manipulation.
-SDK_OLDEST_KERNEL = "3.2.0"
+SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; archive_sdk; ${SDK_PACKAGING_COMMAND} "
def populate_sdk_common(d):
from oe.sdk import populate_sdk
from oe.manifest import create_manifest, Manifest
- pn = d.getVar('PN', True)
+ # Handle package exclusions
+ excl_pkgs = (d.getVar("PACKAGE_EXCLUDE") or "").split()
+ inst_pkgs = (d.getVar("PACKAGE_INSTALL") or "").split()
+ inst_attempt_pkgs = (d.getVar("PACKAGE_INSTALL_ATTEMPTONLY") or "").split()
+
+ d.setVar('PACKAGE_INSTALL_ORIG', ' '.join(inst_pkgs))
+ d.setVar('PACKAGE_INSTALL_ATTEMPTONLY', ' '.join(inst_attempt_pkgs))
+
+ for pkg in excl_pkgs:
+ if pkg in inst_pkgs:
+ bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL (%s). It will be removed from the list." % (pkg, d.getVar('PN'), inst_pkgs))
+ inst_pkgs.remove(pkg)
+
+ if pkg in inst_attempt_pkgs:
+ bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL_ATTEMPTONLY (%s). It will be removed from the list." % (pkg, d.getVar('PN'), inst_pkgs))
+ inst_attempt_pkgs.remove(pkg)
+
+ d.setVar("PACKAGE_INSTALL", ' '.join(inst_pkgs))
+ d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", ' '.join(inst_attempt_pkgs))
+
+ pn = d.getVar('PN')
runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d)
runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d)
@@ -106,13 +154,13 @@ def populate_sdk_common(d):
ld.setVar("PKGDATA_DIR", "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}/pkgdata")
runtime_mapping_rename("TOOLCHAIN_HOST_TASK", pn, ld)
runtime_mapping_rename("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", pn, ld)
- d.setVar("TOOLCHAIN_HOST_TASK", ld.getVar("TOOLCHAIN_HOST_TASK", True))
- d.setVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", ld.getVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", True))
+ d.setVar("TOOLCHAIN_HOST_TASK", ld.getVar("TOOLCHAIN_HOST_TASK"))
+ d.setVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", ld.getVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY"))
# create target/host SDK manifests
- create_manifest(d, manifest_dir=d.getVar('SDK_DIR', True),
+ create_manifest(d, manifest_dir=d.getVar('SDK_DIR'),
manifest_type=Manifest.MANIFEST_TYPE_SDK_HOST)
- create_manifest(d, manifest_dir=d.getVar('SDK_DIR', True),
+ create_manifest(d, manifest_dir=d.getVar('SDK_DIR'),
manifest_type=Manifest.MANIFEST_TYPE_SDK_TARGET)
populate_sdk(d)
@@ -125,7 +173,7 @@ SSTATE_SKIP_CREATION_task-populate-sdk = '1'
do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}"
do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}"
-do_populate_sdk[stamp-extra-info] = "${MACHINE}${SDKMACHINE}"
+do_populate_sdk[stamp-extra-info] = "${MACHINE_ARCH}${SDKMACHINE}"
fakeroot create_sdk_files() {
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
@@ -139,7 +187,7 @@ fakeroot create_sdk_files() {
python check_sdk_sysroots() {
# Fails build if there are broken or dangling symlinks in SDK sysroots
- if d.getVar('CHECK_SDK_SYSROOTS', True) != '1':
+ if d.getVar('CHECK_SDK_SYSROOTS') != '1':
# disabled, bail out
return
@@ -147,8 +195,8 @@ python check_sdk_sysroots() {
return os.path.abspath(path)
# Get scan root
- SCAN_ROOT = norm_path("%s/%s/sysroots/" % (d.getVar('SDK_OUTPUT', True),
- d.getVar('SDKPATH', True)))
+ SCAN_ROOT = norm_path("%s/%s/sysroots/" % (d.getVar('SDK_OUTPUT'),
+ d.getVar('SDKPATH')))
bb.note('Checking SDK sysroots at ' + SCAN_ROOT)
@@ -190,21 +238,23 @@ python check_sdk_sysroots() {
SDKTAROPTS = "--owner=root --group=root"
-fakeroot tar_sdk() {
+fakeroot archive_sdk() {
# Package it up
mkdir -p ${SDKDEPLOYDIR}
- cd ${SDK_OUTPUT}/${SDKPATH}
- tar ${SDKTAROPTS} -cf - . | pixz > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
+ ${SDK_ARCHIVE_CMD}
}
+TOOLCHAIN_SHAR_EXT_TMPL ?= "${COREBASE}/meta/files/toolchain-shar-extract.sh"
+TOOLCHAIN_SHAR_REL_TMPL ?= "${COREBASE}/meta/files/toolchain-shar-relocate.sh"
+
fakeroot create_shar() {
# copy in the template shar extractor script
- cp ${COREBASE}/meta/files/toolchain-shar-extract.sh ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
+ cp ${TOOLCHAIN_SHAR_EXT_TMPL} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
rm -f ${T}/pre_install_command ${T}/post_install_command
if [ ${SDK_RELOCATE_AFTER_INSTALL} -eq 1 ] ; then
- cp ${COREBASE}/meta/files/toolchain-shar-relocate.sh ${T}/post_install_command
+ cp ${TOOLCHAIN_SHAR_REL_TMPL} ${T}/post_install_command
fi
cat << "EOF" >> ${T}/pre_install_command
${SDK_PRE_INSTALL_COMMAND}
@@ -223,20 +273,22 @@ EOF
-e 's#@SDKEXTPATH@#${SDKEXTPATH}#g' \
-e 's#@OLDEST_KERNEL@#${SDK_OLDEST_KERNEL}#g' \
-e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \
- -e 's#@SDK_TITLE@#${SDK_TITLE}#g' \
+ -e 's#@SDK_TITLE@#${@d.getVar("SDK_TITLE").replace('&', '\\&')}#g' \
-e 's#@SDK_VERSION@#${SDK_VERSION}#g' \
-e '/@SDK_PRE_INSTALL_COMMAND@/d' \
-e '/@SDK_POST_INSTALL_COMMAND@/d' \
+ -e 's#@SDK_GCC_VER@#${@oe.utils.host_gcc_version(d, taskcontextonly=True)}#g' \
+ -e 's#@SDK_ARCHIVE_TYPE@#${SDK_ARCHIVE_TYPE}#g' \
${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
# add execution permission
chmod +x ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
# append the SDK tarball
- cat ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz >> ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
+ cat ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} >> ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
# delete the old tarball, we don't need it anymore
- rm ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
+ rm ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}
}
populate_sdk_log_check() {
@@ -246,8 +298,7 @@ populate_sdk_log_check() {
echo "log_check: Using $lf_path as logfile"
- if test -e "$lf_path"
- then
+ if [ -e "$lf_path" ]; then
${IMAGE_PKGTYPE}_log_check $target $lf_path
else
echo "Cannot find logfile [$lf_path]"
@@ -257,23 +308,23 @@ populate_sdk_log_check() {
}
def sdk_command_variables(d):
- return ['OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS',
- 'RPM_POSTPROCESS_COMMANDS']
+ return ['OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_PRE_TARGET_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS','RPM_POSTPROCESS_COMMANDS']
def sdk_variables(d):
variables = ['BUILD_IMAGES_FROM_FEEDS','SDK_OS','SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT',
'SDKTARGETSYSROOT','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS','PACKAGE_ARCHS',
- 'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI']
+ 'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI', 'PACKAGE_EXCLUDE_COMPLEMENTARY', 'IMAGE_INSTALL_DEBUGFS']
variables.extend(sdk_command_variables(d))
return " ".join(variables)
do_populate_sdk[vardeps] += "${@sdk_variables(d)}"
-do_populate_sdk[file-checksums] += "${COREBASE}/meta/files/toolchain-shar-relocate.sh:True \
- ${COREBASE}/meta/files/toolchain-shar-extract.sh:True"
+do_populate_sdk[file-checksums] += "${TOOLCHAIN_SHAR_REL_TMPL}:True \
+ ${TOOLCHAIN_SHAR_EXT_TMPL}:True"
do_populate_sdk[dirs] = "${PKGDATA_DIR} ${TOPDIR}"
-do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS', True).split()])} ${@d.getVarFlag('do_rootfs', 'depends', False)}"
-do_populate_sdk[rdepends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_RDEPENDS', True).split()])}"
+do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS').split()])} ${@d.getVarFlag('do_rootfs', 'depends', False)}"
+do_populate_sdk[rdepends] = "${@' '.join([x + ':do_package_write_${IMAGE_PKGTYPE} ' + x + ':do_packagedata' for x in d.getVar('SDK_RDEPENDS').split()])}"
do_populate_sdk[recrdeptask] += "do_packagedata do_package_write_rpm do_package_write_ipk do_package_write_deb"
+do_populate_sdk[file-checksums] += "${POSTINST_INTERCEPT_CHECKSUMS}"
addtask populate_sdk
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 5402988ba9..05cfc1cc15 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -11,8 +11,6 @@ TOOLCHAIN_HOST_TASK_task-populate-sdk-ext = " \
TOOLCHAIN_TARGET_TASK_task-populate-sdk-ext = ""
-SDK_RDEPENDS_append_task-populate-sdk-ext = " ${SDK_TARGETS}"
-
SDK_RELOCATE_AFTER_INSTALL_task-populate-sdk-ext = "0"
SDK_EXT = ""
@@ -21,7 +19,9 @@ SDK_EXT_task-populate-sdk-ext = "-ext"
# Options are full or minimal
SDK_EXT_TYPE ?= "full"
SDK_INCLUDE_PKGDATA ?= "0"
-SDK_INCLUDE_TOOLCHAIN ?= "${@'1' if d.getVar('SDK_EXT_TYPE', True) == 'full' else '0'}"
+SDK_INCLUDE_TOOLCHAIN ?= "${@'1' if d.getVar('SDK_EXT_TYPE') == 'full' else '0'}"
+SDK_INCLUDE_NATIVESDK ?= "0"
+SDK_INCLUDE_BUILDTOOLS ?= '1'
SDK_RECRDEP_TASKS ?= ""
@@ -35,6 +35,7 @@ SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
DL_DIR \
SSTATE_DIR \
TMPDIR \
+ BB_SERVER_TIMEOUT \
"
SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
SDK_UPDATE_URL ?= ""
@@ -43,19 +44,21 @@ SDK_TARGETS ?= "${PN}"
def get_sdk_install_targets(d, images_only=False):
sdk_install_targets = ''
- if images_only or d.getVar('SDK_EXT_TYPE', True) != 'minimal':
- sdk_install_targets = d.getVar('SDK_TARGETS', True)
+ if images_only or d.getVar('SDK_EXT_TYPE') != 'minimal':
+ sdk_install_targets = d.getVar('SDK_TARGETS')
depd = d.getVar('BB_TASKDEPDATA', False)
+ tasklist = bb.build.tasksbetween('do_image_complete', 'do_build', d)
+ tasklist.remove('do_build')
for v in depd.values():
- if v[1] == 'do_image_complete':
+ if v[1] in tasklist:
if v[0] not in sdk_install_targets:
sdk_install_targets += ' {}'.format(v[0])
if not images_only:
- if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
+ if d.getVar('SDK_INCLUDE_PKGDATA') == '1':
sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata'
- if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1':
+ if d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1':
sdk_install_targets += ' meta-extsdk-toolchain:do_populate_sysroot'
return sdk_install_targets
@@ -69,7 +72,6 @@ OE_INIT_ENV_SCRIPT ?= "oe-init-build-env"
# COREBASE be preserved as well as untracked files.
COREBASE_FILES ?= " \
oe-init-build-env \
- oe-init-build-env-memres \
scripts \
LICENSE \
.templateconf \
@@ -77,18 +79,52 @@ COREBASE_FILES ?= " \
SDK_DIR_task-populate-sdk-ext = "${WORKDIR}/sdk-ext"
B_task-populate-sdk-ext = "${SDK_DIR}"
-TOOLCHAINEXT_OUTPUTNAME = "${SDK_NAME}-toolchain-ext-${SDK_VERSION}"
+TOOLCHAINEXT_OUTPUTNAME ?= "${SDK_NAME}-toolchain-ext-${SDK_VERSION}"
TOOLCHAIN_OUTPUTNAME_task-populate-sdk-ext = "${TOOLCHAINEXT_OUTPUTNAME}"
SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
-SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} Extensible SDK"
+python write_target_sdk_ext_manifest () {
+ from oe.sdk import get_extra_sdkinfo
+ sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+ extra_info = get_extra_sdkinfo(sstate_dir)
+
+ target = d.getVar('TARGET_SYS')
+ target_multimach = d.getVar('MULTIMACH_TARGET_SYS')
+ real_target_multimach = d.getVar('REAL_MULTIMACH_TARGET_SYS')
+
+ pkgs = {}
+ os.makedirs(os.path.dirname(d.getVar('SDK_EXT_TARGET_MANIFEST')), exist_ok=True)
+ with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f:
+ for fn in extra_info['filesizes']:
+ info = fn.split(':')
+ if info[2] in (target, target_multimach, real_target_multimach) \
+ or info[5] == 'allarch':
+ if not info[1] in pkgs:
+ f.write("%s %s %s\n" % (info[1], info[2], info[3]))
+ pkgs[info[1]] = {}
+}
+python write_host_sdk_ext_manifest () {
+ from oe.sdk import get_extra_sdkinfo
+ sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+ extra_info = get_extra_sdkinfo(sstate_dir)
+ host = d.getVar('BUILD_SYS')
+ with open(d.getVar('SDK_EXT_HOST_MANIFEST'), 'w') as f:
+ for fn in extra_info['filesizes']:
+ info = fn.split(':')
+ if info[2] == host:
+ f.write("%s %s %s\n" % (info[1], info[2], info[3]))
+}
+
+SDK_POSTPROCESS_COMMAND_append_task-populate-sdk-ext = "write_target_sdk_ext_manifest; write_host_sdk_ext_manifest; "
+
+SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK"
def clean_esdk_builddir(d, sdkbasepath):
"""Clean up traces of the fake build for create_filtered_tasklist()"""
import shutil
- cleanpaths = 'cache conf/sanity_info conf/templateconf.cfg tmp'.split()
+ cleanpaths = 'cache conf/sanity_info tmp'.split()
for pth in cleanpaths:
fullpth = os.path.join(sdkbasepath, pth)
if os.path.isdir(fullpth):
@@ -110,10 +146,11 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath):
try:
with open(sdkbasepath + '/conf/local.conf', 'a') as f:
# Force the use of sstate from the build system
- f.write('\nSSTATE_DIR_forcevariable = "%s"\n' % d.getVar('SSTATE_DIR', True))
- f.write('SSTATE_MIRRORS_forcevariable = ""\n')
+ f.write('\nSSTATE_DIR_forcevariable = "%s"\n' % d.getVar('SSTATE_DIR'))
+ f.write('SSTATE_MIRRORS_forcevariable = "file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n')
# Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it
f.write('TMPDIR_forcevariable = "${TOPDIR}/tmp"\n')
+ f.write('TCLIBCAPPEND_forcevariable = ""\n')
# Drop uninative if the build isn't using it (or else NATIVELSBSTRING will
# be different and we won't be able to find our native sstate)
if not bb.data.inherits_class('uninative', d):
@@ -121,25 +158,23 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath):
# Unfortunately the default SDKPATH (or even a custom value) may contain characters that bitbake
# will not allow in its COREBASE path, so we need to rename the directory temporarily
- temp_sdkbasepath = d.getVar('SDK_OUTPUT', True) + '/tmp-renamed-sdk'
+ temp_sdkbasepath = d.getVar('SDK_OUTPUT') + '/tmp-renamed-sdk'
# Delete any existing temp dir
try:
shutil.rmtree(temp_sdkbasepath)
except FileNotFoundError:
pass
os.rename(sdkbasepath, temp_sdkbasepath)
+ cmdprefix = '. %s .; ' % conf_initpath
+ logfile = d.getVar('WORKDIR') + '/tasklist_bb_log.txt'
try:
- cmdprefix = '. %s .; ' % conf_initpath
- logfile = d.getVar('WORKDIR', True) + '/tasklist_bb_log.txt'
- try:
- oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile)
- except bb.process.ExecutionError as e:
- msg = 'Failed to generate filtered task list for extensible SDK:\n%s' % e.stdout.rstrip()
- if 'attempted to execute unexpectedly and should have been setscened' in e.stdout:
- msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
- bb.fatal(msg)
- finally:
- os.rename(temp_sdkbasepath, sdkbasepath)
+ oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile)
+ except bb.process.ExecutionError as e:
+ msg = 'Failed to generate filtered task list for extensible SDK:\n%s' % e.stdout.rstrip()
+ if 'attempted to execute unexpectedly and should have been setscened' in e.stdout:
+ msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
+ bb.fatal(msg)
+ os.rename(temp_sdkbasepath, sdkbasepath)
# Clean out residue of running bitbake, which check_sstate_task_list()
# will effectively do
clean_esdk_builddir(d, sdkbasepath)
@@ -152,7 +187,7 @@ python copy_buildsystem () {
import glob
import oe.copy_buildsystem
- oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT', True)
+ oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT')
conf_bbpath = ''
conf_initpath = ''
@@ -160,23 +195,17 @@ python copy_buildsystem () {
# Copy in all metadata layers + bitbake (as repositories)
buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d)
- baseoutpath = d.getVar('SDK_OUTPUT', True) + '/' + d.getVar('SDKPATH', True)
+ baseoutpath = d.getVar('SDK_OUTPUT') + '/' + d.getVar('SDKPATH')
# Determine if we're building a derivative extensible SDK (from devtool build-sdk)
- derivative = (d.getVar('SDK_DERIVATIVE', True) or '') == '1'
+ derivative = (d.getVar('SDK_DERIVATIVE') or '') == '1'
if derivative:
workspace_name = 'orig-workspace'
else:
workspace_name = None
- layers_copied = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers', workspace_name)
- sdkbblayers = []
- corebase = os.path.basename(d.getVar('COREBASE', True))
- for layer in layers_copied:
- if corebase == os.path.basename(layer):
- conf_bbpath = os.path.join('layers', layer, 'bitbake')
- else:
- sdkbblayers.append(layer)
+ corebase, sdkbblayers = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers', workspace_name)
+ conf_bbpath = os.path.join('layers', corebase, 'bitbake')
for path in os.listdir(baseoutpath + '/layers'):
relpath = os.path.join('layers', path, oe_init_env_script)
@@ -202,8 +231,8 @@ python copy_buildsystem () {
config.set('General', 'init_path', conf_initpath)
config.set('General', 'core_meta_subdir', core_meta_subdir)
config.add_section('SDK')
- config.set('SDK', 'sdk_targets', d.getVar('SDK_TARGETS', True))
- updateurl = d.getVar('SDK_UPDATE_URL', True)
+ config.set('SDK', 'sdk_targets', d.getVar('SDK_TARGETS'))
+ updateurl = d.getVar('SDK_UPDATE_URL')
if updateurl:
config.set('SDK', 'updateserver', updateurl)
bb.utils.mkdirhier(os.path.join(baseoutpath, 'conf'))
@@ -215,7 +244,7 @@ python copy_buildsystem () {
pass
# Create a layer for new recipes / appends
- bbpath = d.getVar('BBPATH', True)
+ bbpath = d.getVar('BBPATH')
bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')])
# Create bblayers.conf
@@ -242,22 +271,27 @@ python copy_buildsystem () {
# Copy uninative tarball
# For now this is where uninative.bbclass expects the tarball
- uninative_file = d.expand('${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2')
- uninative_checksum = bb.utils.sha256_file(uninative_file)
- uninative_outdir = '%s/downloads/uninative/%s' % (baseoutpath, uninative_checksum)
- bb.utils.mkdirhier(uninative_outdir)
- shutil.copy(uninative_file, uninative_outdir)
-
- env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE', True) or '').split()
+ if bb.data.inherits_class('uninative', d):
+ uninative_file = d.expand('${UNINATIVE_DLDIR}/' + d.getVarFlag("UNINATIVE_CHECKSUM", d.getVar("BUILD_ARCH")) + '/${UNINATIVE_TARBALL}')
+ uninative_checksum = bb.utils.sha256_file(uninative_file)
+ uninative_outdir = '%s/downloads/uninative/%s' % (baseoutpath, uninative_checksum)
+ bb.utils.mkdirhier(uninative_outdir)
+ shutil.copy(uninative_file, uninative_outdir)
+
+ env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE') or '').split()
env_whitelist_values = {}
# Create local.conf
- builddir = d.getVar('TOPDIR', True)
+ builddir = d.getVar('TOPDIR')
+ if derivative and os.path.exists(builddir + '/conf/site.conf'):
+ shutil.copyfile(builddir + '/conf/site.conf', baseoutpath + '/conf/site.conf')
+ if derivative and os.path.exists(builddir + '/conf/auto.conf'):
+ shutil.copyfile(builddir + '/conf/auto.conf', baseoutpath + '/conf/auto.conf')
if derivative:
shutil.copyfile(builddir + '/conf/local.conf', baseoutpath + '/conf/local.conf')
else:
- local_conf_whitelist = (d.getVar('SDK_LOCAL_CONF_WHITELIST', True) or '').split()
- local_conf_blacklist = (d.getVar('SDK_LOCAL_CONF_BLACKLIST', True) or '').split()
+ local_conf_whitelist = (d.getVar('SDK_LOCAL_CONF_WHITELIST') or '').split()
+ local_conf_blacklist = (d.getVar('SDK_LOCAL_CONF_BLACKLIST') or '').split()
def handle_var(varname, origvalue, op, newlines):
if varname in local_conf_blacklist or (origvalue.strip().startswith('/') and not varname in local_conf_whitelist):
newlines.append('# Removed original setting of %s\n' % varname)
@@ -267,8 +301,15 @@ python copy_buildsystem () {
env_whitelist_values[varname] = origvalue
return origvalue, op, 0, True
varlist = ['[^#=+ ]*']
+ oldlines = []
+ if os.path.exists(builddir + '/conf/site.conf'):
+ with open(builddir + '/conf/site.conf', 'r') as f:
+ oldlines += f.readlines()
+ if os.path.exists(builddir + '/conf/auto.conf'):
+ with open(builddir + '/conf/auto.conf', 'r') as f:
+ oldlines += f.readlines()
with open(builddir + '/conf/local.conf', 'r') as f:
- oldlines = f.readlines()
+ oldlines += f.readlines()
(updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
with open(baseoutpath + '/conf/local.conf', 'w') as f:
@@ -282,8 +323,13 @@ python copy_buildsystem () {
# Write a newline just in case there's none at the end of the original
f.write('\n')
- f.write('INHERIT += "%s"\n' % 'uninative')
- f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH', True), uninative_checksum))
+ f.write('TMPDIR = "${TOPDIR}/tmp"\n')
+ f.write('TCLIBCAPPEND = ""\n')
+ f.write('DL_DIR = "${TOPDIR}/downloads"\n')
+
+ if bb.data.inherits_class('uninative', d):
+ f.write('INHERIT += "%s"\n' % 'uninative')
+ f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH'), uninative_checksum))
f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False))
# Some classes are not suitable for SDK, remove them from INHERIT
@@ -302,11 +348,20 @@ python copy_buildsystem () {
# the sig computed from the metadata.
f.write('SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n\n')
+ # We want to be able to set this without a full reparse
+ f.write('BB_HASHCONFIG_WHITELIST_append = " SIGGEN_UNLOCKED_RECIPES"\n\n')
+
# Set up whitelist for run on install
- f.write('BB_SETSCENE_ENFORCE_WHITELIST = "%:* *:do_shared_workdir *:do_rm_work"\n\n')
+ f.write('BB_SETSCENE_ENFORCE_WHITELIST = "%:* *:do_shared_workdir *:do_rm_work wic-tools:* *:do_addto_recipe_sysroot"\n\n')
# Hide the config information from bitbake output (since it's fixed within the SDK)
- f.write('BUILDCFG_HEADER = ""\n')
+ f.write('BUILDCFG_HEADER = ""\n\n')
+
+ f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n')
+ f.write('WITHIN_EXT_SDK = "1"\n\n')
+
+ # Map gcc-dependent uninative sstate cache for installer usage
+ f.write('SSTATE_MIRRORS += " file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n\n')
# Allow additional config through sdk-extra.conf
fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d)
@@ -317,7 +372,7 @@ python copy_buildsystem () {
# If you define a sdk_extraconf() function then it can contain additional config
# (Though this is awkward; sdk-extra.conf should probably be used instead)
- extraconf = (d.getVar('sdk_extraconf', True) or '').strip()
+ extraconf = (d.getVar('sdk_extraconf') or '').strip()
if extraconf:
# Strip off any leading / trailing spaces
for line in extraconf.splitlines():
@@ -326,27 +381,20 @@ python copy_buildsystem () {
f.write('require conf/locked-sigs.inc\n')
f.write('require conf/unlocked-sigs.inc\n')
- if os.path.exists(builddir + '/conf/auto.conf'):
- if derivative:
- shutil.copyfile(builddir + '/conf/auto.conf', baseoutpath + '/conf/auto.conf')
- else:
- with open(builddir + '/conf/auto.conf', 'r') as f:
- oldlines = f.readlines()
- (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
- with open(baseoutpath + '/conf/auto.conf', 'w') as f:
- f.write('# WARNING: this configuration has been automatically generated and in\n')
- f.write('# most cases should not be edited. If you need more flexibility than\n')
- f.write('# this configuration provides, it is strongly suggested that you set\n')
- f.write('# up a proper instance of the full build system and use that instead.\n\n')
- for line in newlines:
- if line.strip() and not line.startswith('#'):
- f.write(line)
+ if os.path.exists(builddir + '/cache/bb_unihashes.dat'):
+ bb.parse.siggen.save_unitaskhashes()
+ bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache'))
+ shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')
+
+ # Write a templateconf.cfg
+ with open(baseoutpath + '/conf/templateconf.cfg', 'w') as f:
+ f.write('meta/conf\n')
# Ensure any variables set from the external environment (by way of
# BB_ENV_EXTRAWHITE) are set in the SDK's configuration
extralines = []
for name, value in env_whitelist_values.items():
- actualvalue = d.getVar(name, True) or ''
+ actualvalue = d.getVar(name) or ''
if value != actualvalue:
extralines.append('%s = "%s"\n' % (name, actualvalue))
if extralines:
@@ -359,48 +407,72 @@ python copy_buildsystem () {
# Filter the locked signatures file to just the sstate tasks we are interested in
excluded_targets = get_sdk_install_targets(d, images_only=True)
- sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc'
+ sigfile = d.getVar('WORKDIR') + '/locked-sigs.inc'
lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc'
+ #nativesdk-only sigfile to merge into locked-sigs.inc
+ sdk_include_nativesdk = (d.getVar("SDK_INCLUDE_NATIVESDK") == '1')
+ nativesigfile = d.getVar('WORKDIR') + '/locked-sigs_nativesdk.inc'
+ nativesigfile_pruned = d.getVar('WORKDIR') + '/locked-sigs_nativesdk_pruned.inc'
+
+ if sdk_include_nativesdk:
+ oe.copy_buildsystem.prune_lockedsigs([],
+ excluded_targets.split(),
+ nativesigfile,
+ True,
+ nativesigfile_pruned)
+
+ oe.copy_buildsystem.merge_lockedsigs([],
+ sigfile,
+ nativesigfile_pruned,
+ sigfile)
+
oe.copy_buildsystem.prune_lockedsigs([],
excluded_targets.split(),
sigfile,
+ False,
lockedsigs_pruned)
sstate_out = baseoutpath + '/sstate-cache'
bb.utils.remove(sstate_out, True)
- # uninative.bbclass sets NATIVELSBSTRING to 'universal'
- fixedlsbstring = 'universal'
- sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1')
- sdk_ext_type = d.getVar('SDK_EXT_TYPE', True)
- if sdk_ext_type != 'minimal' or sdk_include_toolchain or derivative:
+ # uninative.bbclass sets NATIVELSBSTRING to 'universal%s' % oe.utils.host_gcc_version(d)
+ fixedlsbstring = "universal%s" % oe.utils.host_gcc_version(d)
+
+ sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1')
+ sdk_ext_type = d.getVar('SDK_EXT_TYPE')
+ if (sdk_ext_type != 'minimal' or sdk_include_toolchain or derivative) and not sdk_include_nativesdk:
# Create the filtered task list used to generate the sstate cache shipped with the SDK
- tasklistfn = d.getVar('WORKDIR', True) + '/tasklist.txt'
+ tasklistfn = d.getVar('WORKDIR') + '/tasklist.txt'
create_filtered_tasklist(d, baseoutpath, tasklistfn, conf_initpath)
else:
tasklistfn = None
+ if os.path.exists(builddir + '/cache/bb_unihashes.dat'):
+ bb.parse.siggen.save_unitaskhashes()
+ bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache'))
+ shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')
+
# Add packagedata if enabled
- if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
- lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base.inc'
- lockedsigs_copy = d.getVar('WORKDIR', True) + '/locked-sigs-copy.inc'
+ if d.getVar('SDK_INCLUDE_PKGDATA') == '1':
+ lockedsigs_base = d.getVar('WORKDIR') + '/locked-sigs-base.inc'
+ lockedsigs_copy = d.getVar('WORKDIR') + '/locked-sigs-copy.inc'
shutil.move(lockedsigs_pruned, lockedsigs_base)
oe.copy_buildsystem.merge_lockedsigs(['do_packagedata'],
lockedsigs_base,
- d.getVar('STAGING_DIR_HOST', True) + '/world-pkgdata/locked-sigs-pkgdata.inc',
+ d.getVar('STAGING_DIR_HOST') + '/world-pkgdata/locked-sigs-pkgdata.inc',
lockedsigs_pruned,
lockedsigs_copy)
if sdk_include_toolchain:
- lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base2.inc'
- lockedsigs_toolchain = d.getVar('STAGING_DIR_HOST', True) + '/locked-sigs/locked-sigs-extsdk-toolchain.inc'
+ lockedsigs_base = d.getVar('WORKDIR') + '/locked-sigs-base2.inc'
+ lockedsigs_toolchain = d.expand("${STAGING_DIR}/${TUNE_PKGARCH}/meta-extsdk-toolchain/locked-sigs/locked-sigs-extsdk-toolchain.inc")
shutil.move(lockedsigs_pruned, lockedsigs_base)
oe.copy_buildsystem.merge_lockedsigs([],
lockedsigs_base,
lockedsigs_toolchain,
lockedsigs_pruned)
oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_toolchain,
- d.getVar('SSTATE_DIR', True),
+ d.getVar('SSTATE_DIR'),
sstate_out, d,
fixedlsbstring,
filterfile=tasklistfn)
@@ -410,22 +482,22 @@ python copy_buildsystem () {
# Assume the user is not going to set up an additional sstate
# mirror, thus we need to copy the additional artifacts (from
# workspace recipes) into the derivative SDK
- lockedsigs_orig = d.getVar('TOPDIR', True) + '/conf/locked-sigs.inc'
+ lockedsigs_orig = d.getVar('TOPDIR') + '/conf/locked-sigs.inc'
if os.path.exists(lockedsigs_orig):
- lockedsigs_extra = d.getVar('WORKDIR', True) + '/locked-sigs-extra.inc'
+ lockedsigs_extra = d.getVar('WORKDIR') + '/locked-sigs-extra.inc'
oe.copy_buildsystem.merge_lockedsigs(None,
lockedsigs_orig,
lockedsigs_pruned,
None,
lockedsigs_extra)
oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_extra,
- d.getVar('SSTATE_DIR', True),
+ d.getVar('SSTATE_DIR'),
sstate_out, d,
fixedlsbstring,
filterfile=tasklistfn)
else:
oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned,
- d.getVar('SSTATE_DIR', True),
+ d.getVar('SSTATE_DIR'),
sstate_out, d,
fixedlsbstring,
filterfile=tasklistfn)
@@ -456,24 +528,28 @@ python copy_buildsystem () {
def get_current_buildtools(d):
"""Get the file name of the current buildtools installer"""
import glob
- btfiles = glob.glob(os.path.join(d.getVar('SDK_DEPLOY', True), '*-buildtools-nativesdk-standalone-*.sh'))
+ btfiles = glob.glob(os.path.join(d.getVar('SDK_DEPLOY'), '*-buildtools-nativesdk-standalone-*.sh'))
btfiles.sort(key=os.path.getctime)
return os.path.basename(btfiles[-1])
def get_sdk_required_utilities(buildtools_fn, d):
"""Find required utilities that aren't provided by the buildtools"""
- sanity_required_utilities = (d.getVar('SANITY_REQUIRED_UTILITIES', True) or '').split()
+ sanity_required_utilities = (d.getVar('SANITY_REQUIRED_UTILITIES') or '').split()
sanity_required_utilities.append(d.expand('${BUILD_PREFIX}gcc'))
sanity_required_utilities.append(d.expand('${BUILD_PREFIX}g++'))
- buildtools_installer = os.path.join(d.getVar('SDK_DEPLOY', True), buildtools_fn)
- filelist, _ = bb.process.run('%s -l' % buildtools_installer)
+ if buildtools_fn:
+ buildtools_installer = os.path.join(d.getVar('SDK_DEPLOY'), buildtools_fn)
+ filelist, _ = bb.process.run('%s -l' % buildtools_installer)
+ else:
+ buildtools_installer = None
+ filelist = ""
localdata = bb.data.createCopy(d)
localdata.setVar('SDKPATH', '.')
- sdkpathnative = localdata.getVar('SDKPATHNATIVE', True)
- sdkbindirs = [localdata.getVar('bindir_nativesdk', True),
- localdata.getVar('sbindir_nativesdk', True),
- localdata.getVar('base_bindir_nativesdk', True),
- localdata.getVar('base_sbindir_nativesdk', True)]
+ sdkpathnative = localdata.getVar('SDKPATHNATIVE')
+ sdkbindirs = [localdata.getVar('bindir_nativesdk'),
+ localdata.getVar('sbindir_nativesdk'),
+ localdata.getVar('base_bindir_nativesdk'),
+ localdata.getVar('base_sbindir_nativesdk')]
for line in filelist.splitlines():
splitline = line.split()
if len(splitline) > 5:
@@ -492,12 +568,26 @@ def get_sdk_required_utilities(buildtools_fn, d):
install_tools() {
install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}
- lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool
- lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool
+ scripts="devtool recipetool oe-find-native-sysroot runqemu* wic"
+ for script in $scripts; do
+ for scriptfn in `find ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath} -maxdepth 1 -executable -name "$script"`; do
+ targetscriptfn="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/$(basename $scriptfn)"
+ test -e ${targetscriptfn} || lnr ${scriptfn} ${targetscriptfn}
+ done
+ done
+ # We can't use the same method as above because files in the sysroot won't exist at this point
+ # (they get populated from sstate on installation)
+ unfsd_path="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/unfsd"
+ if [ "${SDK_INCLUDE_TOOLCHAIN}" = "1" -a ! -e $unfsd_path ] ; then
+ binrelpath=${@os.path.relpath(d.getVar('STAGING_BINDIR_NATIVE'), d.getVar('TMPDIR'))}
+ lnr ${SDK_OUTPUT}/${SDKPATH}/tmp/$binrelpath/unfsd $unfsd_path
+ fi
touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase
# find latest buildtools-tarball and install it
- install ${SDK_DEPLOY}/${SDK_BUILDTOOLS_INSTALLER} ${SDK_OUTPUT}/${SDKPATH}
+ if [ -n "${SDK_BUILDTOOLS_INSTALLER}" ]; then
+ install ${SDK_DEPLOY}/${SDK_BUILDTOOLS_INSTALLER} ${SDK_OUTPUT}/${SDKPATH}
+ fi
install -m 0644 ${COREBASE}/meta/files/ext-sdk-prepare.py ${SDK_OUTPUT}/${SDKPATH}
}
@@ -536,11 +626,8 @@ sdk_ext_preinst() {
exit 1
fi
SDK_EXTENSIBLE="1"
- if [ "$publish" = "1" ] ; then
- EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=ext-sdk-prepare.py"
- if [ "${SDK_EXT_TYPE}" = "minimal" ] ; then
- EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=sstate-cache"
- fi
+ if [ "$publish" = "1" ] && [ "${SDK_EXT_TYPE}" = "minimal" ] ; then
+ EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=sstate-cache"
fi
}
SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
@@ -550,19 +637,23 @@ sdk_ext_postinst() {
printf "\nExtracting buildtools...\n"
cd $target_sdk_dir
env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
- printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
+ if [ -n "${SDK_BUILDTOOLS_INSTALLER}" ]; then
+ printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
- # Delete the buildtools tar file since it won't be used again
- rm -f ./${SDK_BUILDTOOLS_INSTALLER}
- # We don't need the log either since it succeeded
- rm -f buildtools.log
+ # Delete the buildtools tar file since it won't be used again
+ rm -f ./${SDK_BUILDTOOLS_INSTALLER}
+ # We don't need the log either since it succeeded
+ rm -f buildtools.log
- # Make sure when the user sets up the environment, they also get
- # the buildtools-tarball tools in their path.
- echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script
+ # Make sure when the user sets up the environment, they also get
+ # the buildtools-tarball tools in their path.
+ echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script
+ fi
# Allow bitbake environment setup to be ran as part of this sdk.
echo "export OE_SKIP_SDK_CHECK=1" >> $env_setup_script
+ # Work around runqemu not knowing how to get this information within the eSDK
+ echo "export DEPLOY_DIR_IMAGE=$target_sdk_dir/tmp/${@os.path.relpath(d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('TMPDIR'))}" >> $env_setup_script
# A bit of another hack, but we need this in the path only for devtool
# so put it at the end of $PATH.
@@ -573,13 +664,15 @@ sdk_ext_postinst() {
# Warn if trying to use external bitbake and the ext SDK together
echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script
- if [ "$prepare_buildsystem" != "no" ]; then
+ if [ "$prepare_buildsystem" != "no" -a -n "${SDK_BUILDTOOLS_INSTALLER}" ]; then
printf "Preparing build system...\n"
# dash which is /bin/sh on Ubuntu will not preserve the
# current working directory when first ran, nor will it set $1 when
# sourcing a script. That is why this has to look so ugly.
LOGFILE="$target_sdk_dir/preparing_build_system.log"
sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
+ fi
+ if [ -e $target_sdk_dir/ext-sdk-prepare.py ]; then
rm $target_sdk_dir/ext-sdk-prepare.py
fi
echo done
@@ -593,25 +686,38 @@ SDK_INSTALL_TARGETS = ""
fakeroot python do_populate_sdk_ext() {
# FIXME hopefully we can remove this restriction at some point, but uninative
# currently forces this upon us
- if d.getVar('SDK_ARCH', True) != d.getVar('BUILD_ARCH', True):
- bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH', True), d.getVar('BUILD_ARCH', True)))
+ if d.getVar('SDK_ARCH') != d.getVar('BUILD_ARCH'):
+ bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH'), d.getVar('BUILD_ARCH')))
d.setVar('SDK_INSTALL_TARGETS', get_sdk_install_targets(d))
- buildtools_fn = get_current_buildtools(d)
+ if d.getVar('SDK_INCLUDE_BUILDTOOLS') == '1':
+ buildtools_fn = get_current_buildtools(d)
+ else:
+ buildtools_fn = None
d.setVar('SDK_REQUIRED_UTILITIES', get_sdk_required_utilities(buildtools_fn, d))
d.setVar('SDK_BUILDTOOLS_INSTALLER', buildtools_fn)
d.setVar('SDKDEPLOYDIR', '${SDKEXTDEPLOYDIR}')
-
+ # ESDKs have a libc from the buildtools so ensure we don't ship linguas twice
+ d.delVar('SDKIMAGE_LINGUAS')
+ if d.getVar("SDK_INCLUDE_NATIVESDK") == '1':
+ generate_nativesdk_lockedsigs(d)
populate_sdk_common(d)
}
+def generate_nativesdk_lockedsigs(d):
+ import oe.copy_buildsystem
+ sigfile = d.getVar('WORKDIR') + '/locked-sigs_nativesdk.inc'
+ oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
+
def get_ext_sdk_depends(d):
# Note: the deps varflag is a list not a string, so we need to specify expand=False
deps = d.getVarFlag('do_image_complete', 'deps', False)
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
deplist = ['%s:%s' % (pn, dep) for dep in deps]
- for task in ['do_image_complete', 'do_rootfs', 'do_build']:
- deplist.extend((d.getVarFlag(task, 'depends', True) or '').split())
+ tasklist = bb.build.tasksbetween('do_image_complete', 'do_build', d)
+ tasklist.append('do_rootfs')
+ for task in tasklist:
+ deplist.extend((d.getVarFlag(task, 'depends') or '').split())
return ' '.join(deplist)
python do_sdk_depends() {
@@ -619,13 +725,13 @@ python do_sdk_depends() {
# dependencies we don't need to (e.g. buildtools-tarball) and bringing those
# into the SDK's sstate-cache
import oe.copy_buildsystem
- sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc'
+ sigfile = d.getVar('WORKDIR') + '/locked-sigs.inc'
oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
}
addtask sdk_depends
do_sdk_depends[dirs] = "${WORKDIR}"
-do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}"
+do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)} meta-extsdk-toolchain:do_populate_sysroot"
do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}"
do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
@@ -633,17 +739,21 @@ do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
def get_sdk_ext_rdepends(d):
localdata = d.createCopy()
localdata.appendVar('OVERRIDES', ':task-populate-sdk-ext')
- bb.data.update_data(localdata)
- return localdata.getVarFlag('do_populate_sdk', 'rdepends', True)
+ return localdata.getVarFlag('do_populate_sdk', 'rdepends')
do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}"
do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \
- buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk \
- ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''} \
- ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1' else ''}"
+ ${@'buildtools-tarball:do_populate_sdk' if d.getVar('SDK_INCLUDE_BUILDTOOLS') == '1' else ''} \
+ ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA') == '1' else ''} \
+ ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1' else ''}"
-do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}"
+# We must avoid depending on do_build here if rm_work.bbclass is active,
+# because otherwise do_rm_work may run before do_populate_sdk_ext itself.
+# We can't mark do_populate_sdk_ext and do_sdk_depends as having to
+# run before do_rm_work, because then they would also run as part
+# of normal builds.
+do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':' + (d.getVar('RM_WORK_BUILD_WITHOUT') or 'do_build') for x in d.getVar('SDK_TARGETS').split()])}"
# Make sure code changes can result in rebuild
do_populate_sdk_ext[vardeps] += "copy_buildsystem \
@@ -658,9 +768,9 @@ SDKEXTDEPLOYDIR = "${WORKDIR}/deploy-${PN}-populate-sdk-ext"
SSTATETASKS += "do_populate_sdk_ext"
SSTATE_SKIP_CREATION_task-populate-sdk-ext = '1'
-do_populate_sdk_ext[cleandirs] = "${SDKDEPLOYDIR}"
+do_populate_sdk_ext[cleandirs] = "${SDKEXTDEPLOYDIR}"
do_populate_sdk_ext[sstate-inputdirs] = "${SDKEXTDEPLOYDIR}"
do_populate_sdk_ext[sstate-outputdirs] = "${SDK_DEPLOY}"
-do_populate_sdk_ext[stamp-extra-info] = "${MACHINE}"
+do_populate_sdk_ext[stamp-extra-info] = "${MACHINE_ARCH}"
addtask populate_sdk_ext after do_sdk_depends
diff --git a/meta/classes/prexport.bbclass b/meta/classes/prexport.bbclass
index 809ec1034e..6dcf99e29f 100644
--- a/meta/classes/prexport.bbclass
+++ b/meta/classes/prexport.bbclass
@@ -15,7 +15,7 @@ python prexport_handler () {
if isinstance(e, bb.event.RecipeParsed):
import oe.prservice
#get all PR values for the current PRAUTOINX
- ver = e.data.getVar('PRSERV_DUMPOPT_VERSION', True)
+ ver = e.data.getVar('PRSERV_DUMPOPT_VERSION')
ver = ver.replace('%','-')
retval = oe.prservice.prserv_dump_db(e.data)
if not retval:
@@ -40,7 +40,7 @@ python prexport_handler () {
import oe.prservice
oe.prservice.prserv_check_avail(e.data)
#remove dumpfile
- bb.utils.remove(e.data.getVar('PRSERV_DUMPFILE', True))
+ bb.utils.remove(e.data.getVar('PRSERV_DUMPFILE'))
elif isinstance(e, bb.event.ParseCompleted):
import oe.prservice
#dump meta info of tables
diff --git a/meta/classes/ptest-perl.bbclass b/meta/classes/ptest-perl.bbclass
new file mode 100644
index 0000000000..a4bc40b51a
--- /dev/null
+++ b/meta/classes/ptest-perl.bbclass
@@ -0,0 +1,30 @@
+inherit ptest
+
+FILESEXTRAPATHS_prepend := "${COREBASE}/meta/files:"
+
+SRC_URI += "file://ptest-perl/run-ptest"
+
+do_install_ptest_perl() {
+ install -d ${D}${PTEST_PATH}
+ if [ ! -f ${D}${PTEST_PATH}/run-ptest ]; then
+ install -m 0755 ${WORKDIR}/ptest-perl/run-ptest ${D}${PTEST_PATH}
+ fi
+ cp -r ${B}/t ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}
+}
+
+FILES_${PN}-ptest_prepend = "${PTEST_PATH}/t/* ${PTEST_PATH}/run-ptest "
+
+RDEPENDS_${PN}-ptest_prepend = "perl "
+
+addtask install_ptest_perl after do_install_ptest_base before do_package
+
+python () {
+ if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
+ d.setVarFlag('do_install_ptest_perl', 'fakeroot', '1')
+
+ # Remove all '*ptest_perl' tasks when ptest is not enabled
+ if not(d.getVar('PTEST_ENABLED') == "1"):
+ for i in ['do_install_ptest_perl']:
+ bb.build.deltask(i, d)
+}
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index fa3561e621..fa4c36ec76 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -2,7 +2,10 @@ SUMMARY_${PN}-ptest ?= "${SUMMARY} - Package test files"
DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION} \
This package contains a test directory ${PTEST_PATH} for package test purposes."
-PTEST_PATH ?= "${libdir}/${PN}/ptest"
+PTEST_PATH ?= "${libdir}/${BPN}/ptest"
+PTEST_BUILD_HOST_FILES ?= "Makefile"
+PTEST_BUILD_HOST_PATTERN ?= ""
+
FILES_${PN}-ptest = "${PTEST_PATH}"
SECTION_${PN}-ptest = "devel"
ALLOW_EMPTY_${PN}-ptest = "1"
@@ -10,6 +13,7 @@ PTEST_ENABLED = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '1', '0', d)}"
PTEST_ENABLED_class-native = ""
PTEST_ENABLED_class-nativesdk = ""
PTEST_ENABLED_class-cross-canadian = ""
+RDEPENDS_${PN}-ptest += "${PN}"
RDEPENDS_${PN}-ptest_class-native = ""
RDEPENDS_${PN}-ptest_class-nativesdk = ""
RRECOMMENDS_${PN}-ptest += "ptest-runner"
@@ -45,6 +49,53 @@ do_install_ptest_base() {
fi
do_install_ptest
chown -R root:root ${D}${PTEST_PATH}
+
+ # Strip build host paths from any installed Makefile
+ for filename in ${PTEST_BUILD_HOST_FILES}; do
+ for installed_ptest_file in $(find ${D}${PTEST_PATH} -type f -name $filename); do
+ bbnote "Stripping host paths from: $installed_ptest_file"
+ sed -e 's#${HOSTTOOLS_DIR}/*##g' \
+ -e 's#${WORKDIR}/*=#.=#g' \
+ -e 's#${WORKDIR}/*##g' \
+ -i $installed_ptest_file
+ if [ -n "${PTEST_BUILD_HOST_PATTERN}" ]; then
+ sed -E '/${PTEST_BUILD_HOST_PATTERN}/d' \
+ -i $installed_ptest_file
+ fi
+ done
+ done
+}
+
+PTEST_BINDIR_PKGD_PATH = "${PKGD}${PTEST_PATH}/bin"
+
+# This function needs to run after apply_update_alternative_renames because the
+# aforementioned function will update the ALTERNATIVE_LINK_NAME flag. Append is
+# used here to make this function to run as late as possible.
+PACKAGE_PREPROCESS_FUNCS_append = "${@bb.utils.contains('PTEST_BINDIR', '1', \
+ bb.utils.contains('PTEST_ENABLED', '1', ' ptest_update_alternatives', '', d), '', d)}"
+
+python ptest_update_alternatives() {
+ """
+ This function will generate the symlinks in the PTEST_BINDIR_PKGD_PATH
+ to match the renamed binaries by update-alternatives.
+ """
+
+ if not bb.data.inherits_class('update-alternatives', d) \
+ or not update_alternatives_enabled(d):
+ return
+
+ bb.note("Generating symlinks for ptest")
+ bin_paths = { d.getVar("bindir"), d.getVar("base_bindir"),
+ d.getVar("sbindir"), d.getVar("base_sbindir") }
+ ptest_bindir = d.getVar("PTEST_BINDIR_PKGD_PATH")
+ os.mkdir(ptest_bindir)
+ for pkg in (d.getVar('PACKAGES') or "").split():
+ alternatives = update_alternatives_alt_targets(d, pkg)
+ for alt_name, alt_link, alt_target, _ in alternatives:
+ # Some alternatives are for man pages,
+ # check if the alternative is in PATH
+ if os.path.dirname(alt_link) in bin_paths:
+ os.symlink(alt_target, os.path.join(ptest_bindir, alt_name))
}
do_configure_ptest_base[dirs] = "${B}"
@@ -59,9 +110,10 @@ addtask install_ptest_base after do_install before do_package do_populate_sy
python () {
if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
d.setVarFlag('do_install_ptest_base', 'fakeroot', '1')
+ d.setVarFlag('do_install_ptest_base', 'umask', '022')
# Remove all '*ptest_base' tasks when ptest is not enabled
- if not(d.getVar('PTEST_ENABLED', True) == "1"):
+ if not(d.getVar('PTEST_ENABLED') == "1"):
for i in ['do_configure_ptest_base', 'do_compile_ptest_base', 'do_install_ptest_base']:
bb.build.deltask(i, d)
}
diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
new file mode 100644
index 0000000000..e5d7ab3ce1
--- /dev/null
+++ b/meta/classes/pypi.bbclass
@@ -0,0 +1,26 @@
+def pypi_package(d):
+ bpn = d.getVar('BPN')
+ if bpn.startswith('python-'):
+ return bpn[7:]
+ elif bpn.startswith('python3-'):
+ return bpn[8:]
+ return bpn
+
+PYPI_PACKAGE ?= "${@pypi_package(d)}"
+PYPI_PACKAGE_EXT ?= "tar.gz"
+
+def pypi_src_uri(d):
+ package = d.getVar('PYPI_PACKAGE')
+ package_ext = d.getVar('PYPI_PACKAGE_EXT')
+ pv = d.getVar('PV')
+ return 'https://files.pythonhosted.org/packages/source/%s/%s/%s-%s.%s' % (package[0], package, package, pv, package_ext)
+
+PYPI_SRC_URI ?= "${@pypi_src_uri(d)}"
+
+HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
+SECTION = "devel/python"
+SRC_URI += "${PYPI_SRC_URI}"
+S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
+
+UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
+UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
diff --git a/meta/classes/python3-dir.bbclass b/meta/classes/python3-dir.bbclass
index 06bb046d9c..7dd130bad9 100644
--- a/meta/classes/python3-dir.bbclass
+++ b/meta/classes/python3-dir.bbclass
@@ -1,4 +1,4 @@
-PYTHON_BASEVERSION = "3.5"
+PYTHON_BASEVERSION = "3.7"
PYTHON_ABI = "m"
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
PYTHON_PN = "python3"
diff --git a/meta/classes/python3native.bbclass b/meta/classes/python3native.bbclass
index ef468b3fde..182c11aa2e 100644
--- a/meta/classes/python3native.bbclass
+++ b/meta/classes/python3native.bbclass
@@ -1,13 +1,28 @@
inherit python3-dir
-PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
-EXTRANATIVEPATH += "${PYTHON_PN}-native"
-DEPENDS_append = " ${PYTHON_PN}-native "
+PYTHON="${STAGING_BINDIR_NATIVE}/python3-native/python3"
+# PYTHON_EXECUTABLE is used by cmake
+PYTHON_EXECUTABLE="${PYTHON}"
+EXTRANATIVEPATH += "python3-native"
+DEPENDS_append = " python3-native "
# python-config and other scripts are using distutils modules
# which we patch to access these variables
export STAGING_INCDIR
export STAGING_LIBDIR
+# Packages can use
+# find_package(PythonInterp REQUIRED)
+# find_package(PythonLibs REQUIRED)
+# which ends up using libs/includes from build host
+# Therefore pre-empt that effort
+export PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
+export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
+
+export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
+
+# suppress host user's site-packages dirs.
+export PYTHONNOUSERSITE = "1"
+
# autoconf macros will use their internal default preference otherwise
export PYTHON
diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass
index 4e0381b568..0e9019d1e2 100644
--- a/meta/classes/pythonnative.bbclass
+++ b/meta/classes/pythonnative.bbclass
@@ -1,16 +1,27 @@
inherit python-dir
-PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
+PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
# PYTHON_EXECUTABLE is used by cmake
PYTHON_EXECUTABLE="${PYTHON}"
-EXTRANATIVEPATH += "${PYTHON_PN}-native"
-DEPENDS_append = " ${PYTHON_PN}-native "
+EXTRANATIVEPATH += "python-native"
+DEPENDS_append = " python-native "
# python-config and other scripts are using distutils modules
# which we patch to access these variables
export STAGING_INCDIR
export STAGING_LIBDIR
+# Packages can use
+# find_package(PythonInterp REQUIRED)
+# find_package(PythonLibs REQUIRED)
+# which ends up using libs/includes from build host
+# Therefore pre-empt that effort
+export PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
+export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
+
+# suppress host user's site-packages dirs.
+export PYTHONNOUSERSITE = "1"
+
# autoconf macros will use their internal default preference otherwise
export PYTHON
diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
index f2d4d1c9e1..f5c5780125 100644
--- a/meta/classes/qemu.bbclass
+++ b/meta/classes/qemu.bbclass
@@ -4,12 +4,12 @@
#
def qemu_target_binary(data):
- package_arch = data.getVar("PACKAGE_ARCH", True)
- qemu_target_binary = (data.getVar("QEMU_TARGET_BINARY_%s" % package_arch, True) or "")
+ package_arch = data.getVar("PACKAGE_ARCH")
+ qemu_target_binary = (data.getVar("QEMU_TARGET_BINARY_%s" % package_arch) or "")
if qemu_target_binary:
return qemu_target_binary
- target_arch = data.getVar("TARGET_ARCH", True)
+ target_arch = data.getVar("TARGET_ARCH")
if target_arch in ("i486", "i586", "i686"):
target_arch = "i386"
elif target_arch == "powerpc":
@@ -26,7 +26,7 @@ def qemu_wrapper_cmdline(data, rootfs_path, library_paths):
if qemu_binary == "qemu-allarch":
qemu_binary = "qemuwrapper"
- qemu_options = data.getVar("QEMU_OPTIONS", True)
+ qemu_options = data.getVar("QEMU_OPTIONS")
return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+ " -E LD_LIBRARY_PATH=" + ":".join(library_paths) + " "
@@ -52,7 +52,7 @@ def qemu_run_binary(data, rootfs_path, binary):
# this dance). For others (e.g. arm) a -cpu option is not necessary, since the
# qemu-arm default CPU supports all required architecture levels.
-QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or ""}"
+QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}"
QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}"
QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2"
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 97a235772d..15a9e63f2b 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -3,30 +3,52 @@
# boot by runqemu:
#
# QB_SYSTEM_NAME: qemu name, e.g., "qemu-system-i386"
+#
# QB_OPT_APPEND: options to append to qemu, e.g., "-show-cursor"
+#
# QB_DEFAULT_KERNEL: default kernel to boot, e.g., "bzImage"
+#
# QB_DEFAULT_FSTYPE: default FSTYPE to boot, e.g., "ext4"
+#
# QB_MEM: memory, e.g., "-m 512"
+#
# QB_MACHINE: qemu machine, e.g., "-machine virt"
+#
# QB_CPU: qemu cpu, e.g., "-cpu qemu32"
+#
# QB_CPU_KVM: the similar to QB_CPU, but used when kvm, e.g., '-cpu kvm64',
# set it when support kvm.
+#
# QB_KERNEL_CMDLINE_APPEND: options to append to kernel's -append
# option, e.g., "console=ttyS0 console=tty"
+#
# QB_DTB: qemu dtb name
+#
# QB_AUDIO_DRV: qemu audio driver, e.g., "alsa", set it when support audio
+#
# QB_AUDIO_OPT: qemu audio option, e.g., "-soundhw ac97,es1370", used
# when QB_AUDIO_DRV is set.
+#
# QB_KERNEL_ROOT: kernel's root, e.g., /dev/vda
+#
+# QB_NETWORK_DEVICE: network device, e.g., "-device virtio-net-pci,netdev=net0,mac=@MAC@",
+# it needs work with QB_TAP_OPT and QB_SLIRP_OPT.
+# Note, runqemu will replace @MAC@ with a predefined mac, you can set
+# a custom one, but that may cause conflicts when multiple qemus are
+# running on the same host.
+#
# QB_TAP_OPT: netowrk option for 'tap' mode, e.g.,
-# "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0"
+# "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
# Note, runqemu will replace "@TAP@" with the one which is used, such as tap0, tap1 ...
-# QB_SLIRP_OPT: network option for SLIRP mode, e.g.,
-# "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
+#
+# QB_SLIRP_OPT: network option for SLIRP mode, e.g., -netdev user,id=net0"
+#
# QB_ROOTFS_OPT: used as rootfs, e.g.,
# "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
# Note, runqemu will replace "@ROOTFS@" with the one which is used, such as core-image-minimal-qemuarm64.ext4.
+#
# QB_SERIAL_OPT: serial port, e.g., "-serial mon:stdio"
+#
# QB_TCPSERIAL_OPT: tcp serial port option, e.g.,
# " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
# Note, runqemu will replace "@PORT@" with the port number which is used.
@@ -40,46 +62,63 @@ QB_SERIAL_OPT ?= "-serial mon:stdio -serial null"
QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}"
QB_DEFAULT_FSTYPE ?= "ext4"
QB_OPT_APPEND ?= "-show-cursor"
+QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@"
-# Create qemuboot.conf
-ROOTFS_POSTPROCESS_COMMAND += "write_qemuboot_conf; "
+# This should be kept align with ROOT_VM
+QB_DRIVE_TYPE ?= "/dev/sd"
-python write_qemuboot_conf() {
- import configparser
+# Create qemuboot.conf
+addtask do_write_qemuboot_conf after do_rootfs before do_image
+IMGDEPLOYDIR ?= "${WORKDIR}/deploy-${PN}-image-complete"
- build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', \
- 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME', \
- 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE', \
+def qemuboot_vars(d):
+ build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE',
+ 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME',
+ 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE',
'STAGING_DIR_HOST']
+ return build_vars + [k for k in d.keys() if k.startswith('QB_')]
- # Vars from bsp
- qb_vars = []
- for k in d.keys():
- if k.startswith('QB_'):
- qb_vars.append(k)
+do_write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}"
+do_write_qemuboot_conf[vardepsexclude] += "TOPDIR"
+python do_write_qemuboot_conf() {
+ import configparser
- qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_NAME', True))
- qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_LINK_NAME', True))
+ qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_NAME'))
+ qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'))
+ finalpath = d.getVar("DEPLOY_DIR_IMAGE")
+ topdir = d.getVar('TOPDIR')
cf = configparser.ConfigParser()
cf.add_section('config_bsp')
- for k in build_vars + qb_vars:
- cf.set('config_bsp', k, '%s' % d.getVar(k, True))
+ for k in sorted(qemuboot_vars(d)):
+ # qemu-helper-native sysroot is not removed by rm_work and
+ # contains all tools required by runqemu
+ if k == 'STAGING_BINDIR_NATIVE':
+ val = os.path.join(d.getVar('BASE_WORKDIR'), d.getVar('BUILD_SYS'),
+ 'qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/')
+ else:
+ val = d.getVar(k)
+ # we only want to write out relative paths so that we can relocate images
+ # and still run them
+ if val.startswith(topdir):
+ val = os.path.relpath(val, finalpath)
+ cf.set('config_bsp', k, '%s' % val)
# QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink
# to the kernel file, which hinders relocatability of the qb conf.
# Read the link and replace it with the full filename of the target.
- kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('QB_DEFAULT_KERNEL', True))
- kernel = os.readlink(kernel_link)
+ kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('QB_DEFAULT_KERNEL'))
+ kernel = os.path.realpath(kernel_link)
+ # we only want to write out relative paths so that we can relocate images
+ # and still run them
+ kernel = os.path.relpath(kernel, finalpath)
cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel)
bb.utils.mkdirhier(os.path.dirname(qemuboot))
with open(qemuboot, 'w') as f:
cf.write(f)
- if d.getVar('RM_OLD_IMAGE', True) == "1" and os.path.exists(qemuboot_link):
- os.remove(os.path.realpath(qemuboot_link))
-
- if os.path.lexists(qemuboot_link):
- os.remove(qemuboot_link)
- os.symlink(os.path.basename(qemuboot), qemuboot_link)
+ if qemuboot_link != qemuboot:
+ if os.path.lexists(qemuboot_link):
+ os.remove(qemuboot_link)
+ os.symlink(os.path.basename(qemuboot), qemuboot_link)
}
diff --git a/meta/classes/recipe_sanity.bbclass b/meta/classes/recipe_sanity.bbclass
index add34df9d6..7fa4a849ea 100644
--- a/meta/classes/recipe_sanity.bbclass
+++ b/meta/classes/recipe_sanity.bbclass
@@ -1,5 +1,5 @@
def __note(msg, d):
- bb.note("%s: recipe_sanity: %s" % (d.getVar("P", True), msg))
+ bb.note("%s: recipe_sanity: %s" % (d.getVar("P"), msg))
__recipe_sanity_badruntimevars = "RDEPENDS RPROVIDES RRECOMMENDS RCONFLICTS"
def bad_runtime_vars(cfgdata, d):
@@ -7,7 +7,7 @@ def bad_runtime_vars(cfgdata, d):
bb.data.inherits_class("cross", d):
return
- for var in d.getVar("__recipe_sanity_badruntimevars", True).split():
+ for var in d.getVar("__recipe_sanity_badruntimevars").split():
val = d.getVar(var, False)
if val and val != cfgdata.get(var):
__note("%s should be %s_${PN}" % (var, var), d)
@@ -15,11 +15,11 @@ def bad_runtime_vars(cfgdata, d):
__recipe_sanity_reqvars = "DESCRIPTION"
__recipe_sanity_reqdiffvars = ""
def req_vars(cfgdata, d):
- for var in d.getVar("__recipe_sanity_reqvars", True).split():
+ for var in d.getVar("__recipe_sanity_reqvars").split():
if not d.getVar(var, False):
__note("%s should be set" % var, d)
- for var in d.getVar("__recipe_sanity_reqdiffvars", True).split():
+ for var in d.getVar("__recipe_sanity_reqdiffvars").split():
val = d.getVar(var, False)
cfgval = cfgdata.get(var)
@@ -38,11 +38,11 @@ def var_renames_overwrite(cfgdata, d):
def incorrect_nonempty_PACKAGES(cfgdata, d):
if bb.data.inherits_class("native", d) or \
bb.data.inherits_class("cross", d):
- if d.getVar("PACKAGES", True):
+ if d.getVar("PACKAGES"):
return True
def can_use_autotools_base(cfgdata, d):
- cfg = d.getVar("do_configure", True)
+ cfg = d.getVar("do_configure")
if not bb.data.inherits_class("autotools", d):
return False
@@ -61,7 +61,7 @@ def can_delete_FILESPATH(cfgdata, d):
expected = cfgdata.get("FILESPATH")
expectedpaths = d.expand(expected)
unexpanded = d.getVar("FILESPATH", False)
- filespath = d.getVar("FILESPATH", True).split(":")
+ filespath = d.getVar("FILESPATH").split(":")
filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)]
for fp in filespath:
if not fp in expectedpaths:
@@ -70,22 +70,6 @@ def can_delete_FILESPATH(cfgdata, d):
return False
return expected != unexpanded
-def can_delete_FILESDIR(cfgdata, d):
- expected = cfgdata.get("FILESDIR")
- #expected = "${@bb.utils.which(d.getVar('FILESPATH', True), '.')}"
- unexpanded = d.getVar("FILESDIR", False)
- if unexpanded is None:
- return False
-
- expanded = os.path.normpath(d.getVar("FILESDIR", True))
- filespath = d.getVar("FILESPATH", True).split(":")
- filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)]
-
- return unexpanded != expected and \
- os.path.exists(expanded) and \
- (expanded in filespath or
- expanded == d.expand(expected))
-
def can_delete_others(p, cfgdata, d):
for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS",
"SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]:
@@ -96,7 +80,7 @@ def can_delete_others(p, cfgdata, d):
continue
try:
- expanded = d.getVar(k, True)
+ expanded = d.getVar(k)
cfgexpanded = d.expand(cfgunexpanded)
except bb.fetch.ParameterError:
continue
@@ -108,11 +92,10 @@ def can_delete_others(p, cfgdata, d):
(p, cfgunexpanded, unexpanded, expanded))
python do_recipe_sanity () {
- p = d.getVar("P", True)
- p = "%s %s %s" % (d.getVar("PN", True), d.getVar("PV", True), d.getVar("PR", True))
+ p = d.getVar("P")
+ p = "%s %s %s" % (d.getVar("PN"), d.getVar("PV"), d.getVar("PR"))
sanitychecks = [
- (can_delete_FILESDIR, "candidate for removal of FILESDIR"),
(can_delete_FILESPATH, "candidate for removal of FILESPATH"),
#(can_use_autotools_base, "candidate for use of autotools_base"),
(incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"),
diff --git a/meta/classes/relative_symlinks.bbclass b/meta/classes/relative_symlinks.bbclass
new file mode 100644
index 0000000000..3157737347
--- /dev/null
+++ b/meta/classes/relative_symlinks.bbclass
@@ -0,0 +1,5 @@
+do_install[postfuncs] += "install_relative_symlinks"
+
+python install_relative_symlinks () {
+ oe.path.replace_absolute_symlinks(d.getVar('D'), d)
+}
diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass
index 4ca9981f44..582812c1cf 100644
--- a/meta/classes/relocatable.bbclass
+++ b/meta/classes/relocatable.bbclass
@@ -1,7 +1,18 @@
inherit chrpath
-SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess"
+SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess relocatable_native_pcfiles"
python relocatable_binaries_preprocess() {
rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
}
+
+relocatable_native_pcfiles () {
+ if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
+ rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('libdir') + "/pkgconfig")}
+ sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
+ fi
+ if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
+ rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('datadir') + "/pkgconfig")}
+ sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
+ fi
+}
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass
index 5bb231efc1..1a12db1206 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -10,7 +10,7 @@ ERR_REPORT_DIR ?= "${LOG_DIR}/error-report"
def errorreport_getdata(e):
import codecs
- logpath = e.data.getVar('ERR_REPORT_DIR', True)
+ logpath = e.data.getVar('ERR_REPORT_DIR')
datafile = os.path.join(logpath, "error-report.txt")
with codecs.open(datafile, 'r', 'utf-8') as f:
data = f.read()
@@ -19,31 +19,53 @@ def errorreport_getdata(e):
def errorreport_savedata(e, newdata, file):
import json
import codecs
- logpath = e.data.getVar('ERR_REPORT_DIR', True)
+ logpath = e.data.getVar('ERR_REPORT_DIR')
datafile = os.path.join(logpath, file)
with codecs.open(datafile, 'w', 'utf-8') as f:
json.dump(newdata, f, indent=4, sort_keys=True)
return datafile
+def get_conf_data(e, filename):
+ builddir = e.data.getVar('TOPDIR')
+ filepath = os.path.join(builddir, "conf", filename)
+ jsonstring = ""
+ if os.path.exists(filepath):
+ with open(filepath, 'r') as f:
+ for line in f.readlines():
+ if line.startswith("#") or len(line.strip()) == 0:
+ continue
+ else:
+ jsonstring=jsonstring + line
+ return jsonstring
+
python errorreport_handler () {
import json
import codecs
- logpath = e.data.getVar('ERR_REPORT_DIR', True)
+ def nativelsb():
+ nativelsbstr = e.data.getVar("NATIVELSBSTRING")
+ # provide a bit more host info in case of uninative build
+ if e.data.getVar('UNINATIVE_URL') != 'unset':
+ return '/'.join([nativelsbstr, lsb_distro_identifier(e.data)])
+ return nativelsbstr
+
+ logpath = e.data.getVar('ERR_REPORT_DIR')
datafile = os.path.join(logpath, "error-report.txt")
if isinstance(e, bb.event.BuildStarted):
bb.utils.mkdirhier(logpath)
data = {}
- machine = e.data.getVar("MACHINE", True)
+ machine = e.data.getVar("MACHINE")
data['machine'] = machine
- data['build_sys'] = e.data.getVar("BUILD_SYS", True)
- data['nativelsb'] = e.data.getVar("NATIVELSBSTRING", True)
- data['distro'] = e.data.getVar("DISTRO", True)
- data['target_sys'] = e.data.getVar("TARGET_SYS", True)
+ data['build_sys'] = e.data.getVar("BUILD_SYS")
+ data['nativelsb'] = nativelsb()
+ data['distro'] = e.data.getVar("DISTRO")
+ data['target_sys'] = e.data.getVar("TARGET_SYS")
data['failures'] = []
data['component'] = " ".join(e.getPkgs())
data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data))
+ data['local_conf'] = get_conf_data(e, 'local.conf')
+ data['auto_conf'] = get_conf_data(e, 'auto.conf')
lock = bb.utils.lockfile(datafile + '.lock')
errorreport_savedata(e, data, "error-report.txt")
bb.utils.unlockfile(lock)
@@ -51,24 +73,20 @@ python errorreport_handler () {
elif isinstance(e, bb.build.TaskFailed):
task = e.task
taskdata={}
- log = e.data.getVar('BB_LOGFILE', True)
+ log = e.data.getVar('BB_LOGFILE')
taskdata['package'] = e.data.expand("${PF}")
taskdata['task'] = task
if log:
try:
- logFile = codecs.open(log, 'r', 'utf-8')
- logdata = logFile.read()
-
+ with codecs.open(log, encoding='utf-8') as logFile:
+ logdata = logFile.read()
# Replace host-specific paths so the logs are cleaner
for d in ("TOPDIR", "TMPDIR"):
- s = e.data.getVar(d, True)
+ s = e.data.getVar(d)
if s:
logdata = logdata.replace(s, d)
-
- logFile.close()
except:
logdata = "Unable to read log file"
-
else:
logdata = "No Log"
@@ -92,7 +110,7 @@ python errorreport_handler () {
bb.utils.unlockfile(lock)
failures = jsondata['failures']
if(len(failures) > 0):
- filename = "error_report_" + e.data.getVar("BUILDNAME", True)+".txt"
+ filename = "error_report_" + e.data.getVar("BUILDNAME")+".txt"
datafile = errorreport_savedata(e, jsondata, filename)
bb.note("The errors for this build are stored in %s\nYou can send the errors to a reports server by running:\n send-error-report %s [-s server]" % (datafile, datafile))
bb.note("The contents of these logs will be posted in public if you use the above command with the default server. Please ensure you remove any identifying or proprietary information when prompted before sending.")
diff --git a/meta/classes/reproducible_build.bbclass b/meta/classes/reproducible_build.bbclass
new file mode 100644
index 0000000000..39b6e40cac
--- /dev/null
+++ b/meta/classes/reproducible_build.bbclass
@@ -0,0 +1,179 @@
+# reproducible_build.bbclass
+#
+# Sets SOURCE_DATE_EPOCH in each component's build environment.
+# Upstream components (generally) respect this environment variable,
+# using it in place of the "current" date and time.
+# See https://reproducible-builds.org/specs/source-date-epoch/
+#
+# After sources are unpacked but before they are patched, we set a reproducible value for SOURCE_DATE_EPOCH.
+# This value should be reproducible for anyone who builds the same revision from the same sources.
+#
+# There are 4 ways we determine SOURCE_DATE_EPOCH:
+#
+# 1. Use the value from __source_date_epoch.txt file if this file exists.
+# This file was most likely created in the previous build by one of the following methods 2,3,4.
+# Alternatively, it can be provided by a recipe via SRC_URI.
+#
+# If the file does not exist:
+#
+# 2. If there is a git checkout, use the last git commit timestamp.
+# Git does not preserve file timestamps on checkout.
+#
+# 3. Use the mtime of "known" files such as NEWS, CHANGLELOG, ...
+# This works for well-kept repositories distributed via tarball.
+#
+# 4. Use the modification time of the youngest file in the source tree, if there is one.
+# This will be the newest file from the distribution tarball, if any.
+#
+# 5. Fall back to a fixed timestamp.
+#
+# Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe's SDE_FILE.
+# If none of these mechanisms are suitable, replace the do_deploy_source_date_epoch task
+# with recipe-specific functionality to write the appropriate SOURCE_DATE_EPOCH into the SDE_FILE.
+#
+# If this file is found by other tasks, the value is exported in the SOURCE_DATE_EPOCH variable.
+# SOURCE_DATE_EPOCH is set for all tasks that might use it (do_configure, do_compile, do_package, ...)
+
+BUILD_REPRODUCIBLE_BINARIES ??= '1'
+inherit ${@oe.utils.ifelse(d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1', 'reproducible_build_simple', '')}
+
+SDE_DIR ="${WORKDIR}/source-date-epoch"
+SDE_FILE = "${SDE_DIR}/__source_date_epoch.txt"
+SDE_DEPLOYDIR = "${WORKDIR}/deploy-source-date-epoch"
+
+SSTATETASKS += "do_deploy_source_date_epoch"
+
+do_deploy_source_date_epoch () {
+ echo "Deploying SDE to ${SDE_DIR}."
+ mkdir -p ${SDE_DEPLOYDIR}
+ if [ -e ${SDE_FILE} ]; then
+ cp -p ${SDE_FILE} ${SDE_DEPLOYDIR}/__source_date_epoch.txt
+ fi
+}
+
+python do_deploy_source_date_epoch_setscene () {
+ sstate_setscene(d)
+ bb.utils.mkdirhier(d.getVar('SDE_DIR'))
+ sde_file = os.path.join(d.getVar('SDE_DEPLOYDIR'), '__source_date_epoch.txt')
+ if os.path.exists(sde_file):
+ os.rename(sde_file, d.getVar('SDE_FILE'))
+}
+
+do_deploy_source_date_epoch[dirs] = "${SDE_DEPLOYDIR}"
+do_deploy_source_date_epoch[sstate-plaindirs] = "${SDE_DEPLOYDIR}"
+addtask do_deploy_source_date_epoch_setscene
+addtask do_deploy_source_date_epoch before do_configure after do_patch
+
+def get_source_date_epoch_from_known_files(d, sourcedir):
+ source_date_epoch = None
+ newest_file = None
+ known_files = set(["NEWS", "ChangeLog", "Changelog", "CHANGES"])
+ for file in known_files:
+ filepath = os.path.join(sourcedir, file)
+ if os.path.isfile(filepath):
+ mtime = int(os.lstat(filepath).st_mtime)
+ # There may be more than one "known_file" present, if so, use the youngest one
+ if not source_date_epoch or mtime > source_date_epoch:
+ source_date_epoch = mtime
+ newest_file = filepath
+ if newest_file:
+ bb.debug(1, "SOURCE_DATE_EPOCH taken from: %s" % newest_file)
+ return source_date_epoch
+
+def find_git_folder(d, sourcedir):
+ # First guess: WORKDIR/git
+ # This is the default git fetcher unpack path
+ workdir = d.getVar('WORKDIR')
+ gitpath = os.path.join(workdir, "git/.git")
+ if os.path.isdir(gitpath):
+ return gitpath
+
+ # Second guess: ${S}
+ gitpath = os.path.join(sourcedir, ".git")
+ if os.path.isdir(gitpath):
+ return gitpath
+
+ # Perhaps there was a subpath or destsuffix specified.
+ # Go looking in the WORKDIR
+ exclude = set(["build", "image", "license-destdir", "patches", "pseudo",
+ "recipe-sysroot", "recipe-sysroot-native", "sysroot-destdir", "temp"])
+ for root, dirs, files in os.walk(workdir, topdown=True):
+ dirs[:] = [d for d in dirs if d not in exclude]
+ if '.git' in dirs:
+ return root
+
+ bb.warn("Failed to find a git repository in WORKDIR: %s" % workdir)
+ return None
+
+def get_source_date_epoch_from_git(d, sourcedir):
+ source_date_epoch = None
+ if "git://" in d.getVar('SRC_URI'):
+ gitpath = find_git_folder(d, sourcedir)
+ if gitpath:
+ import subprocess
+ source_date_epoch = int(subprocess.check_output(['git','log','-1','--pretty=%ct'], cwd=gitpath))
+ bb.debug(1, "git repository: %s" % gitpath)
+ return source_date_epoch
+
+def get_source_date_epoch_from_youngest_file(d, sourcedir):
+ if sourcedir == d.getVar('WORKDIR'):
+ # These sources are almost certainly not from a tarball
+ return None
+
+ # Do it the hard way: check all files and find the youngest one...
+ source_date_epoch = None
+ newest_file = None
+ for root, dirs, files in os.walk(sourcedir, topdown=True):
+ files = [f for f in files if not f[0] == '.']
+
+ for fname in files:
+ filename = os.path.join(root, fname)
+ try:
+ mtime = int(os.lstat(filename).st_mtime)
+ except ValueError:
+ mtime = 0
+ if not source_date_epoch or mtime > source_date_epoch:
+ source_date_epoch = mtime
+ newest_file = filename
+
+ if newest_file:
+ bb.debug(1, "Newest file found: %s" % newest_file)
+ return source_date_epoch
+
+def fixed_source_date_epoch():
+ bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
+ return 0
+
+python do_create_source_date_epoch_stamp() {
+ epochfile = d.getVar('SDE_FILE')
+ if os.path.isfile(epochfile):
+ bb.debug(1, "Reusing SOURCE_DATE_EPOCH from: %s" % epochfile)
+ return
+
+ sourcedir = d.getVar('S')
+ source_date_epoch = (
+ get_source_date_epoch_from_git(d, sourcedir) or
+ get_source_date_epoch_from_known_files(d, sourcedir) or
+ get_source_date_epoch_from_youngest_file(d, sourcedir) or
+ fixed_source_date_epoch() # Last resort
+ )
+
+ bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch)
+ bb.utils.mkdirhier(d.getVar('SDE_DIR'))
+ with open(epochfile, 'w') as f:
+ f.write(str(source_date_epoch))
+}
+
+BB_HASHBASE_WHITELIST += "SOURCE_DATE_EPOCH"
+
+python () {
+ if d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1':
+ d.appendVarFlag("do_unpack", "postfuncs", " do_create_source_date_epoch_stamp")
+ epochfile = d.getVar('SDE_FILE')
+ source_date_epoch = "0"
+ if os.path.isfile(epochfile):
+ with open(epochfile, 'r') as f:
+ source_date_epoch = f.read()
+ bb.debug(1, "SOURCE_DATE_EPOCH: %s" % source_date_epoch)
+ d.setVar('SOURCE_DATE_EPOCH', source_date_epoch)
+}
diff --git a/meta/classes/reproducible_build_simple.bbclass b/meta/classes/reproducible_build_simple.bbclass
new file mode 100644
index 0000000000..d0842f0f90
--- /dev/null
+++ b/meta/classes/reproducible_build_simple.bbclass
@@ -0,0 +1,11 @@
+# Setup default environment for reproducible builds.
+
+BUILD_REPRODUCIBLE_BINARIES = "1"
+
+export PYTHONHASHSEED = "0"
+export PERL_HASH_SEED = "0"
+export SOURCE_DATE_EPOCH ??= "1520598896"
+
+REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
+
+inherit podfix
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index b71a9d1cf8..01c2ab1c78 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -10,6 +10,14 @@
#
# RM_WORK_EXCLUDE += "icu-native icu busybox"
#
+# Recipes can also configure which entries in their ${WORKDIR}
+# are preserved besides temp, which already gets excluded by default
+# because it contains logs:
+# do_install_append () {
+# echo "bar" >${WORKDIR}/foo
+# }
+# RM_WORK_EXCLUDE_ITEMS += "foo"
+RM_WORK_EXCLUDE_ITEMS = "temp"
# Use the completion scheduler by default when rm_work is active
# to try and reduce disk usage
@@ -18,9 +26,6 @@ BB_SCHEDULER ?= "completion"
# Run the rm_work task in the idle scheduling class
BB_TASK_IONICE_LEVEL_task-rm_work = "3.0"
-RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
-BB_DEFAULT_TASK = "rm_work_all"
-
do_rm_work () {
# If the recipe name is in the RM_WORK_EXCLUDE, skip the recipe.
for p in ${RM_WORK_EXCLUDE}; do
@@ -30,80 +35,83 @@ do_rm_work () {
fi
done
- cd ${WORKDIR}
- for dir in *
- do
- # Retain only logs and other files in temp, safely ignore
- # failures of removing pseudo folers on NFS2/3 server.
- if [ $dir = 'pseudo' ]; then
- rm -rf $dir 2> /dev/null || true
- elif [ $dir != 'temp' ]; then
- rm -rf $dir
- fi
- done
-
# Need to add pseudo back or subsqeuent work in this workdir
# might fail since setscene may not rerun to recreate it
mkdir -p ${WORKDIR}/pseudo/
+ excludes='${RM_WORK_EXCLUDE_ITEMS}'
+
# Change normal stamps into setscene stamps as they better reflect the
# fact WORKDIR is now empty
# Also leave noexec stamps since setscene stamps don't cover them
cd `dirname ${STAMP}`
for i in `basename ${STAMP}`*
do
- for j in ${SSTATETASKS} do_shared_workdir
- do
- case $i in
- *do_setscene*)
- break
- ;;
- *sigdata*)
- i=dummy
- break
- ;;
- *do_package_write*)
- i=dummy
- break
- ;;
- *do_rootfs*|*do_image*|*do_bootimg*|*do_bootdirectdisk*|*do_vmimg*)
- i=dummy
- break
- ;;
- *do_build*)
- i=dummy
- break
- ;;
+ case $i in
+ *sigdata*|*sigbasedata*)
+ # Save/skip anything that looks like a signature data file.
+ ;;
+ *do_image_complete_setscene*|*do_image_qa_setscene*)
+ # Ensure we don't 'stack' setscene extensions to these stamps with the sections below
+ ;;
+ *do_image_complete*)
+ # Promote do_image_complete stamps to setscene versions (ahead of *do_image* below)
+ mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"`
+ ;;
+ *do_image_qa*)
+ # Promote do_image_qa stamps to setscene versions (ahead of *do_image* below)
+ mv $i `echo $i | sed -e "s#do_image_qa#do_image_qa_setscene#"`
+ ;;
+ *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*)
+ ;;
+ *do_addto_recipe_sysroot*)
+ # Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used
+ excludes="$excludes recipe-sysroot-native"
+ ;;
+ *do_package|*do_package.*|*do_package_setscene.*)
# We remove do_package entirely, including any
# sstate version since otherwise we'd need to leave 'plaindirs' around
# such as 'packages' and 'packages-split' and these can be large. No end
# of chain tasks depend directly on do_package anymore.
- *do_package|*do_package.*|*do_package_setscene.*)
- rm -f $i;
- i=dummy
- break
- ;;
- *_setscene*)
- i=dummy
- break
- ;;
- *$j|*$j.*)
- mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
- i=dummy
- break
+ rm -f $i;
+ ;;
+ *_setscene*)
+ # Skip stamps which are already setscene versions
;;
- esac
- done
- rm -f $i
+ *)
+ # For everything else: if suitable, promote the stamp to a setscene
+ # version, otherwise remove it
+ for j in ${SSTATETASKS} do_shared_workdir
+ do
+ case $i in
+ *$j|*$j.*)
+ mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
+ break
+ ;;
+ esac
+ done
+ rm -f $i
+ esac
done
-}
-addtask rm_work after do_${RMWORK_ORIG_TASK}
+ cd ${WORKDIR}
+ for dir in *
+ do
+ # Retain only logs and other files in temp, safely ignore
+ # failures of removing pseudo folers on NFS2/3 server.
+ if [ $dir = 'pseudo' ]; then
+ rm -rf $dir 2> /dev/null || true
+ elif ! echo "$excludes" | grep -q -w "$dir"; then
+ rm -rf $dir
+ fi
+ done
+}
do_rm_work_all () {
:
}
do_rm_work_all[recrdeptask] = "do_rm_work"
-addtask rm_work_all after do_rm_work
+do_rm_work_all[noexec] = "1"
+addtask rm_work_all before do_build
do_populate_sdk[postfuncs] += "rm_work_populatesdk"
rm_work_populatesdk () {
@@ -117,13 +125,55 @@ rm_work_rootfs () {
}
rm_work_rootfs[cleandirs] = "${WORKDIR}/rootfs"
-python () {
+# This task can be used instead of do_build to trigger building
+# without also invoking do_rm_work. It only exists when rm_work.bbclass
+# is active, otherwise do_build needs to be used.
+#
+# The intended usage is
+# ${@ d.getVar('RM_WORK_BUILD_WITHOUT') or 'do_build'}
+# in places that previously used just 'do_build'.
+RM_WORK_BUILD_WITHOUT = "do_build_without_rm_work"
+do_build_without_rm_work () {
+ :
+}
+do_build_without_rm_work[noexec] = "1"
+
+# We have to add these tasks already now, because all tasks are
+# meant to be defined before the RecipeTaskPreProcess event triggers.
+# The inject_rm_work event handler then merely changes task dependencies.
+addtask do_rm_work
+addtask do_build_without_rm_work
+addhandler inject_rm_work
+inject_rm_work[eventmask] = "bb.event.RecipeTaskPreProcess"
+python inject_rm_work() {
if bb.data.inherits_class('kernel', d):
- d.appendVar("RM_WORK_EXCLUDE", ' ' + d.getVar("PN", True))
+ d.appendVar("RM_WORK_EXCLUDE", ' ' + d.getVar("PN"))
# If the recipe name is in the RM_WORK_EXCLUDE, skip the recipe.
- excludes = (d.getVar("RM_WORK_EXCLUDE", True) or "").split()
- pn = d.getVar("PN", True)
+ excludes = (d.getVar("RM_WORK_EXCLUDE") or "").split()
+ pn = d.getVar("PN")
+
+ # Determine what do_build depends upon, without including do_build
+ # itself or our own special do_rm_work_all.
+ deps = sorted((set(bb.build.preceedtask('do_build', True, d))).difference(('do_build', 'do_rm_work_all')) or "")
+
+ # deps can be empty if do_build doesn't exist, e.g. *-inital recipes
+ if not deps:
+ deps = ["do_populate_sysroot", "do_populate_lic"]
+
if pn in excludes:
d.delVarFlag('rm_work_rootfs', 'cleandirs')
d.delVarFlag('rm_work_populatesdk', 'cleandirs')
+ else:
+ # Inject do_rm_work into the tasks of the current recipe such that do_build
+ # depends on it and that it runs after all other tasks that block do_build,
+ # i.e. after all work on the current recipe is done. The reason for taking
+ # this approach instead of making do_rm_work depend on do_build is that
+ # do_build inherits additional runtime dependencies on
+ # other recipes and thus will typically run much later than completion of
+ # work in the recipe itself.
+ # In practice, addtask() here merely updates the dependencies.
+ bb.build.addtask('do_rm_work', 'do_build', ' '.join(deps), d)
+
+ # Always update do_build_without_rm_work dependencies.
+ bb.build.addtask('do_build_without_rm_work', '', ' '.join(deps), d)
}
diff --git a/meta/classes/rm_work_and_downloads.bbclass b/meta/classes/rm_work_and_downloads.bbclass
new file mode 100644
index 0000000000..7c00bea597
--- /dev/null
+++ b/meta/classes/rm_work_and_downloads.bbclass
@@ -0,0 +1,33 @@
+# Author: Patrick Ohly <patrick.ohly@intel.com>
+# Copyright: Copyright (C) 2015 Intel Corporation
+#
+# This file is licensed under the MIT license, see COPYING.MIT in
+# this source distribution for the terms.
+
+# This class is used like rm_work:
+# INHERIT += "rm_work_and_downloads"
+#
+# In addition to removing local build directories of a recipe, it also
+# removes the downloaded source. This is achieved by making the DL_DIR
+# recipe-specific. While reducing disk usage, it increases network usage (for
+# example, compiling the same source for target and host implies downloading
+# the source twice).
+#
+# Because the "do_fetch" task does not get re-run after removing the downloaded
+# sources, this class is also not suitable for incremental builds.
+#
+# Where it works well is in well-connected build environments with limited
+# disk space (like TravisCI).
+
+inherit rm_work
+
+# This would ensure that the existing do_rm_work() removes the downloads,
+# but does not work because some recipes have a circular dependency between
+# WORKDIR and DL_DIR (via ${SRCPV}?).
+# DL_DIR = "${WORKDIR}/downloads"
+
+# Instead go up one level and remove ourself.
+DL_DIR = "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/downloads"
+do_rm_work_append () {
+ rm -rf ${DL_DIR}
+}
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 07e265c5ac..2f171836fa 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -2,9 +2,12 @@
# Zap the root password if debug-tweaks feature is not enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
-# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled
+# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
+# Allow dropbear/openssh to accept root logins if debug-tweaks or allow-root-login is enabled
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "ssh_allow_root_login; ", "",d)}'
+
# Enable postinst logging if debug-tweaks is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
@@ -14,8 +17,19 @@ ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
+# We also need to do the same for the kernel boot parameters,
+# otherwise kernel or initramfs end up mounting the rootfs read/write
+# (the default) if supported by the underlying storage.
+#
+# We do this with _append because the default value might get set later with ?=
+# and we don't want to disable such a default that by setting a value here.
+APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}'
+
+# Generates test data file with data store variables expanded in json format
+ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
+
# Write manifest
-IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest"
+IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
# Set default postinst log file
POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
@@ -25,10 +39,23 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd"
ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
-# Disable DNS lookups, the SSH_DISABLE_DNS_LOOKUP can be overridden to allow
-# distros to choose not to take this change
-SSH_DISABLE_DNS_LOOKUP ?= " ssh_disable_dns_lookup ; "
-ROOTFS_POSTPROCESS_COMMAND_append_qemuall = "${SSH_DISABLE_DNS_LOOKUP}"
+# Sort the user and group entries in /etc by ID in order to make the content
+# deterministic. Package installs are not deterministic, causing the ordering
+# of entries to change between builds. In case that this isn't desired,
+# the command can be overridden.
+#
+# Note that useradd-staticids.bbclass has to be used to ensure that
+# the numeric IDs of dynamically created entries remain stable.
+#
+# We want this to run as late as possible, in particular after
+# systemd_sysusers_create and set_user_group. Using _append is not
+# enough for that, set_user_group is added that way and would end
+# up running after us.
+SORT_PASSWD_POSTPROCESS_COMMAND ??= " sort_passwd; "
+python () {
+ d.appendVar('ROOTFS_POSTPROCESS_COMMAND', '${SORT_PASSWD_POSTPROCESS_COMMAND}')
+ d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;')
+}
systemd_create_users () {
for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
@@ -64,31 +91,35 @@ systemd_create_users () {
#
read_only_rootfs_hook () {
# Tweak the mount option and fs_passno for rootfs in fstab
- sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
+ if [ -f ${IMAGE_ROOTFS}/etc/fstab ]; then
+ sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
+ fi
+
+ # Tweak the "mount -o remount,rw /" command in busybox-inittab inittab
+ if [ -f ${IMAGE_ROOTFS}/etc/inittab ]; then
+ sed -i 's|/bin/mount -o remount,rw /|/bin/mount -o remount,ro /|' ${IMAGE_ROOTFS}/etc/inittab
+ fi
# If we're using openssh and the /etc/ssh directory has no pre-generated keys,
# we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly
# and the keys under /var/run/ssh.
if [ -d ${IMAGE_ROOTFS}/etc/ssh ]; then
if [ -e ${IMAGE_ROOTFS}/etc/ssh/ssh_host_rsa_key ]; then
- echo "SYSCONFDIR=/etc/ssh" >> ${IMAGE_ROOTFS}/etc/default/ssh
+ echo "SYSCONFDIR=\${SYSCONFDIR:-/etc/ssh}" >> ${IMAGE_ROOTFS}/etc/default/ssh
echo "SSHD_OPTS=" >> ${IMAGE_ROOTFS}/etc/default/ssh
else
- echo "SYSCONFDIR=/var/run/ssh" >> ${IMAGE_ROOTFS}/etc/default/ssh
+ echo "SYSCONFDIR=\${SYSCONFDIR:-/var/run/ssh}" >> ${IMAGE_ROOTFS}/etc/default/ssh
echo "SSHD_OPTS='-f /etc/ssh/sshd_config_readonly'" >> ${IMAGE_ROOTFS}/etc/default/ssh
fi
fi
# Also tweak the key location for dropbear in the same way.
if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then
- if [ -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then
- echo "DROPBEAR_RSAKEY_DIR=/etc/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
- else
+ if [ ! -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then
echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
fi
fi
-
if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
# Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then
@@ -100,6 +131,12 @@ read_only_rootfs_hook () {
${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh
fi
fi
+
+ if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then
+ # Create machine-id
+ # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
+ touch ${IMAGE_ROOTFS}${sysconfdir}/machine-id
+ fi
}
#
@@ -112,15 +149,14 @@ zap_empty_root_password () {
if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then
sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd
fi
-}
+}
#
-# allow dropbear/openssh to accept root logins and logins from accounts with an empty password string
+# allow dropbear/openssh to accept logins from accounts with an empty password string
#
ssh_allow_empty_password () {
for config in sshd_config sshd_config_readonly; do
if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config ]; then
- sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config
sed -i 's/^[#[:space:]]*PermitEmptyPasswords.*/PermitEmptyPasswords yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config
fi
done
@@ -136,16 +172,35 @@ ssh_allow_empty_password () {
fi
if [ -d ${IMAGE_ROOTFS}${sysconfdir}/pam.d ] ; then
- sed -i 's/nullok_secure/nullok/' ${IMAGE_ROOTFS}${sysconfdir}/pam.d/*
+ for f in `find ${IMAGE_ROOTFS}${sysconfdir}/pam.d/* -type f -exec test -e {} \; -print`
+ do
+ sed -i 's/nullok_secure/nullok/' $f
+ done
fi
}
-ssh_disable_dns_lookup () {
- if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
- sed -i -e 's:#UseDNS yes:UseDNS no:' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
+#
+# allow dropbear/openssh to accept root logins
+#
+ssh_allow_root_login () {
+ for config in sshd_config sshd_config_readonly; do
+ if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config ]; then
+ sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config
+ fi
+ done
+
+ if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then
+ if grep -q DROPBEAR_EXTRA_ARGS ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then
+ sed -i '/^DROPBEAR_EXTRA_ARGS=/ s/-w//' ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear
+ fi
fi
}
+python sort_passwd () {
+ import rootfspostcommands
+ rootfspostcommands.sort_passwd(d.expand('${IMAGE_ROOTFS}${sysconfdir}'))
+}
+
#
# Enable postinst logging if debug-tweaks is enabled
#
@@ -195,31 +250,13 @@ make_zimage_symlink_relative () {
fi
}
-insert_feed_uris () {
-
- echo "Building feeds for [${DISTRO}].."
-
- for line in ${FEED_URIS}
- do
- # strip leading and trailing spaces/tabs, then split into name and uri
- line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
- feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
- feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
-
- echo "Added $feed_name feed with URL $feed_uri"
-
- # insert new feed-sources
- echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf
- done
-}
-
python write_image_manifest () {
from oe.rootfs import image_list_installed_packages
from oe.utils import format_pkg_list
- deploy_dir = d.getVar('IMGDEPLOYDIR', True)
- link_name = d.getVar('IMAGE_LINK_NAME', True)
- manifest_name = d.getVar('IMAGE_MANIFEST', True)
+ deploy_dir = d.getVar('IMGDEPLOYDIR')
+ link_name = d.getVar('IMAGE_LINK_NAME')
+ manifest_name = d.getVar('IMAGE_MANIFEST')
if not manifest_name:
return
@@ -227,22 +264,25 @@ python write_image_manifest () {
pkgs = image_list_installed_packages(d)
with open(manifest_name, 'w+') as image_manifest:
image_manifest.write(format_pkg_list(pkgs, "ver"))
- image_manifest.write("\n")
- if os.path.exists(manifest_name):
+ if os.path.exists(manifest_name) and link_name:
manifest_link = deploy_dir + "/" + link_name + ".manifest"
if os.path.lexists(manifest_link):
- if d.getVar('RM_OLD_IMAGE', True) == "1" and \
- os.path.exists(os.path.realpath(manifest_link)):
- os.remove(os.path.realpath(manifest_link))
os.remove(manifest_link)
os.symlink(os.path.basename(manifest_name), manifest_link)
}
-# Can be use to create /etc/timestamp during image construction to give a reasonably
+# Can be used to create /etc/timestamp during image construction to give a reasonably
# sane default time setting
rootfs_update_timestamp () {
- date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
+ if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
+ # Convert UTC into %4Y%2m%2d%2H%2M%2S
+ sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S`
+ else
+ sformatted=`date -u +%4Y%2m%2d%2H%2M%2S`
+ fi
+ echo $sformatted > ${IMAGE_ROOTFS}/etc/timestamp
+ bbnote "rootfs_update_timestamp: set /etc/timestamp to $sformatted"
}
# Prevent X from being started
@@ -281,3 +321,49 @@ rootfs_check_host_user_contaminated () {
rootfs_sysroot_relativelinks () {
sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT}
}
+
+# Generated test data json file
+python write_image_test_data() {
+ from oe.data import export2json
+
+ deploy_dir = d.getVar('IMGDEPLOYDIR')
+ link_name = d.getVar('IMAGE_LINK_NAME')
+ testdata_name = os.path.join(deploy_dir, "%s.testdata.json" % d.getVar('IMAGE_NAME'))
+
+ searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
+ export2json(d, testdata_name, searchString=searchString, replaceString="")
+
+ if os.path.exists(testdata_name) and link_name:
+ testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name)
+ if os.path.lexists(testdata_link):
+ os.remove(testdata_link)
+ os.symlink(os.path.basename(testdata_name), testdata_link)
+}
+write_image_test_data[vardepsexclude] += "TOPDIR"
+
+# Check for unsatisfied recommendations (RRECOMMENDS)
+python rootfs_log_check_recommends() {
+ log_path = d.expand("${T}/log.do_rootfs")
+ with open(log_path, 'r') as log:
+ for line in log:
+ if 'log_check' in line:
+ continue
+
+ if 'unsatisfied recommendation for' in line:
+ bb.warn('[log_check] %s: %s' % (d.getVar('PN'), line))
+}
+
+# Perform any additional adjustments needed to make rootf binary reproducible
+rootfs_reproducible () {
+ if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
+ # Convert UTC into %4Y%2m%2d%2H%2M%2S
+ sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S`
+ echo $sformatted > ${IMAGE_ROOTFS}/etc/version
+ bbnote "rootfs_reproducible: set /etc/version to $sformatted"
+
+ if [ -d ${IMAGE_ROOTFS}${sysconfdir}/gconf ]; then
+ find ${IMAGE_ROOTFS}${sysconfdir}/gconf -name '%gconf.xml' -print0 | xargs -0r \
+ sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g'
+ fi
+ fi
+}
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index f79fca608e..2b93796a76 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -3,18 +3,18 @@
#
ROOTFS_PKGMANAGE = "dpkg apt"
-ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
-do_rootfs[recrdeptask] += "do_package_write_deb"
+do_rootfs[recrdeptask] += "do_package_write_deb do_package_qa"
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
+do_populate_sdk_ext[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
python rootfs_deb_bad_recommendations() {
- if d.getVar("BAD_RECOMMENDATIONS", True):
+ if d.getVar("BAD_RECOMMENDATIONS"):
bb.warn("Debian package install does not support BAD_RECOMMENDATIONS")
}
do_rootfs[prefuncs] += "rootfs_deb_bad_recommendations"
@@ -25,7 +25,7 @@ opkglibdir = "${localstatedir}/lib/opkg"
python () {
# Map TARGET_ARCH to Debian's ideas about architectures
- darch = d.getVar('SDK_ARCH', True)
+ darch = d.getVar('SDK_ARCH')
if darch in ["x86", "i486", "i586", "i686", "pentium"]:
d.setVar('DEB_SDK_ARCH', 'i386')
elif darch == "x86_64":
@@ -33,6 +33,3 @@ python () {
elif darch == "arm":
d.setVar('DEB_SDK_ARCH', 'armel')
}
-
-# This will of course only work after rootfs_deb_do_rootfs or populate_sdk_deb has been called
-DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg"
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index d5c38fef74..e73d2bfdae 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -7,28 +7,28 @@
EXTRAOPKGCONFIG ?= ""
ROOTFS_PKGMANAGE = "opkg ${EXTRAOPKGCONFIG}"
-ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
-do_rootfs[recrdeptask] += "do_package_write_ipk"
+do_rootfs[recrdeptask] += "do_package_write_ipk do_package_qa"
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
+do_populate_sdk_ext[lockfiles] += "${WORKDIR}/ipk.lock"
OPKG_PREPROCESS_COMMANDS = ""
OPKG_POSTPROCESS_COMMANDS = ""
-OPKGLIBDIR = "${localstatedir}/lib"
+OPKGLIBDIR ??= "${localstatedir}/lib"
MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg|/usr/lib/opkg"
python () {
- if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
- flags = d.getVarFlag('do_rootfs', 'recrdeptask', True)
+ if d.getVar('BUILD_IMAGES_FROM_FEEDS'):
+ flags = d.getVarFlag('do_rootfs', 'recrdeptask')
flags = flags.replace("do_package_write_ipk", "")
flags = flags.replace("do_deploy", "")
flags = flags.replace("do_populate_sysroot", "")
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 37730a7104..51f89ea990 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -2,31 +2,33 @@
# Creates a root filesystem out of rpm packages
#
-ROOTFS_PKGMANAGE = "rpm smartpm"
-ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
+ROOTFS_PKGMANAGE = "rpm dnf"
-# Add 100Meg of extra space for Smart
-IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 102400", "" ,d)}"
+# dnf is using our custom distutils, and so will fail without these
+export STAGING_INCDIR
+export STAGING_LIBDIR
-# Smart is python based, so be sure python-native is available to us.
-EXTRANATIVEPATH += "python-native"
+# Add 100Meg of extra space for dnf
+IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "dnf", " + 102400", "" ,d)}"
+
+# Dnf is python based, so be sure python3-native is available to us.
+EXTRANATIVEPATH += "python3-native"
# opkg is needed for update-alternatives
RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
- rpmresolve-native:do_populate_sysroot \
- python-smartpm-native:do_populate_sysroot \
- createrepo-native:do_populate_sysroot \
+ dnf-native:do_populate_sysroot \
+ createrepo-c-native:do_populate_sysroot \
opkg-native:do_populate_sysroot"
do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
-do_rootfs[recrdeptask] += "do_package_write_rpm"
+do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa"
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
python () {
- if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
- flags = d.getVarFlag('do_rootfs', 'recrdeptask', True)
+ if d.getVar('BUILD_IMAGES_FROM_FEEDS'):
+ flags = d.getVarFlag('do_rootfs', 'recrdeptask')
flags = flags.replace("do_package_write_rpm", "")
flags = flags.replace("do_deploy", "")
flags = flags.replace("do_populate_sysroot", "")
@@ -35,7 +37,3 @@ python () {
d.setVar('RPM_POSTPROCESS_COMMANDS', '')
}
-# Smart is python based, so be sure python-native is available to us.
-EXTRANATIVEPATH += "python-native"
-
-rpmlibdir = "/var/lib/rpm"
diff --git a/meta/classes/rootfsdebugfiles.bbclass b/meta/classes/rootfsdebugfiles.bbclass
index a558871e99..e2ba4e3647 100644
--- a/meta/classes/rootfsdebugfiles.bbclass
+++ b/meta/classes/rootfsdebugfiles.bbclass
@@ -15,6 +15,10 @@
# ROOTFS_DEBUG_FILES += "${TOPDIR}/conf/dropbear_rsa_host_key ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ;"
# 2. Boot the image once, copy the dropbear_rsa_host_key from
# the device into your build conf directory.
+# 3. A optional parameter can be used to set file mode
+# of the copied target, for instance:
+# ROOTFS_DEBUG_FILES += "${TOPDIR}/conf/dropbear_rsa_host_key ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key 0600;"
+# in case they might be required to have a specific mode. (Shoundn't be too open, for example)
#
# Do not use for production images! It bypasses several
# core build mechanisms (updating the image when one
@@ -27,10 +31,11 @@ ROOTFS_DEBUG_FILES[doc] = "Lists additional files or directories to be installed
ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files ;"
rootfs_debug_files () {
#!/bin/sh -e
- echo "${ROOTFS_DEBUG_FILES}" | sed -e 's/;/\n/g' | while read source target; do
+ echo "${ROOTFS_DEBUG_FILES}" | sed -e 's/;/\n/g' | while read source target mode; do
if [ -e "$source" ]; then
mkdir -p $(dirname $target)
cp -a $source $target
+ [ -n "$mode" ] && chmod $mode $target
fi
done
}
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 7682ffbb8c..63ab6cf3df 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -3,10 +3,10 @@
#
SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar \
- gzip gawk chrpath wget cpio perl file"
+ gzip gawk chrpath wget cpio perl file which"
def bblayers_conf_file(d):
- return os.path.join(d.getVar('TOPDIR', True), 'conf/bblayers.conf')
+ return os.path.join(d.getVar('TOPDIR'), 'conf/bblayers.conf')
def sanity_conf_read(fn):
with open(fn, 'r') as f:
@@ -39,8 +39,8 @@ SANITY_DIFF_TOOL ?= "meld"
SANITY_LOCALCONF_SAMPLE ?= "${COREBASE}/meta*/conf/local.conf.sample"
python oecore_update_localconf() {
# Check we are using a valid local.conf
- current_conf = d.getVar('CONF_VERSION', True)
- conf_version = d.getVar('LOCALCONF_VERSION', True)
+ current_conf = d.getVar('CONF_VERSION')
+ conf_version = d.getVar('LOCALCONF_VERSION')
failmsg = """Your version of local.conf was generated from an older/newer version of
local.conf.sample and there have been updates made to this file. Please compare the two
@@ -59,8 +59,8 @@ is a good way to visualise the changes."""
SANITY_SITECONF_SAMPLE ?= "${COREBASE}/meta*/conf/site.conf.sample"
python oecore_update_siteconf() {
# If we have a site.conf, check it's valid
- current_sconf = d.getVar('SCONF_VERSION', True)
- sconf_version = d.getVar('SITE_CONF_VERSION', True)
+ current_sconf = d.getVar('SCONF_VERSION')
+ sconf_version = d.getVar('SITE_CONF_VERSION')
failmsg = """Your version of site.conf was generated from an older version of
site.conf.sample and there have been updates made to this file. Please compare the two
@@ -80,8 +80,8 @@ SANITY_BBLAYERCONF_SAMPLE ?= "${COREBASE}/meta*/conf/bblayers.conf.sample"
python oecore_update_bblayers() {
# bblayers.conf is out of date, so see if we can resolve that
- current_lconf = int(d.getVar('LCONF_VERSION', True))
- lconf_version = int(d.getVar('LAYER_CONF_VERSION', True))
+ current_lconf = int(d.getVar('LCONF_VERSION'))
+ lconf_version = int(d.getVar('LAYER_CONF_VERSION'))
failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has ${LCONF_VERSION}, expecting ${LAYER_CONF_VERSION}).
Please compare your file against bblayers.conf.sample and merge any changes before continuing.
@@ -141,7 +141,7 @@ is a good way to visualise the changes."""
# Handle rename of meta-yocto -> meta-poky
# This marks the start of separate version numbers but code is needed in OE-Core
# for the migration, one last time.
- layers = d.getVar('BBLAYERS', True).split()
+ layers = d.getVar('BBLAYERS').split()
layers = [ os.path.basename(path) for path in layers ]
if 'meta-yocto' in layers:
found = False
@@ -172,7 +172,7 @@ is a good way to visualise the changes."""
}
def raise_sanity_error(msg, d, network_error=False):
- if d.getVar("SANITY_USE_EVENTS", True) == "1":
+ if d.getVar("SANITY_USE_EVENTS") == "1":
try:
bb.event.fire(bb.event.SanityCheckFailed(msg, network_error), d)
except TypeError:
@@ -198,8 +198,8 @@ def check_toolchain_tune_args(data, tune, multilib, errs):
return found_errors
def check_toolchain_args_present(data, tune, multilib, tune_errors, which):
- args_set = (data.getVar("TUNE_%s" % which, True) or "").split()
- args_wanted = (data.getVar("TUNEABI_REQUIRED_%s_tune-%s" % (which, tune), True) or "").split()
+ args_set = (data.getVar("TUNE_%s" % which) or "").split()
+ args_wanted = (data.getVar("TUNEABI_REQUIRED_%s_tune-%s" % (which, tune)) or "").split()
args_missing = []
# If no args are listed/required, we are done.
@@ -226,9 +226,8 @@ def check_toolchain_tune(data, tune, multilib):
# Apply the overrides so we can look at the details.
overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + multilib
localdata.setVar("OVERRIDES", overrides)
- bb.data.update_data(localdata)
bb.debug(2, "Sanity-checking tuning '%s' (%s) features:" % (tune, multilib))
- features = (localdata.getVar("TUNE_FEATURES_tune-%s" % tune, True) or "").split()
+ features = (localdata.getVar("TUNE_FEATURES_tune-%s" % tune) or "").split()
if not features:
return "Tuning '%s' has no defined features, and cannot be used." % tune
valid_tunes = localdata.getVarFlags('TUNEVALID') or {}
@@ -248,9 +247,9 @@ def check_toolchain_tune(data, tune, multilib):
bb.debug(2, " %s: %s" % (feature, valid_tunes[feature]))
else:
tune_errors.append("Feature '%s' is not defined." % feature)
- whitelist = localdata.getVar("TUNEABI_WHITELIST", True)
+ whitelist = localdata.getVar("TUNEABI_WHITELIST")
if whitelist:
- tuneabi = localdata.getVar("TUNEABI_tune-%s" % tune, True)
+ tuneabi = localdata.getVar("TUNEABI_tune-%s" % tune)
if not tuneabi:
tuneabi = tune
if True not in [x in whitelist.split() for x in tuneabi.split()]:
@@ -264,13 +263,13 @@ def check_toolchain_tune(data, tune, multilib):
def check_toolchain(data):
tune_error_set = []
- deftune = data.getVar("DEFAULTTUNE", True)
+ deftune = data.getVar("DEFAULTTUNE")
tune_errors = check_toolchain_tune(data, deftune, 'default')
if tune_errors:
tune_error_set.append(tune_errors)
- multilibs = (data.getVar("MULTILIB_VARIANTS", True) or "").split()
- global_multilibs = (data.getVar("MULTILIB_GLOBAL_VARIANTS", True) or "").split()
+ multilibs = (data.getVar("MULTILIB_VARIANTS") or "").split()
+ global_multilibs = (data.getVar("MULTILIB_GLOBAL_VARIANTS") or "").split()
if multilibs:
seen_libs = []
@@ -282,7 +281,7 @@ def check_toolchain(data):
seen_libs.append(lib)
if not lib in global_multilibs:
tune_error_set.append("Multilib %s is not present in MULTILIB_GLOBAL_VARIANTS" % lib)
- tune = data.getVar("DEFAULTTUNE_virtclass-multilib-%s" % lib, True)
+ tune = data.getVar("DEFAULTTUNE_virtclass-multilib-%s" % lib)
if tune in seen_tunes:
tune_error_set.append("The tuning '%s' appears in more than one multilib." % tune)
else:
@@ -337,11 +336,11 @@ def check_path_length(filepath, pathname, limit):
return ""
def get_filesystem_id(path):
- status, result = oe.utils.getstatusoutput("stat -f -c '%s' %s" % ("%t", path))
- if status == 0:
- return result
- else:
- bb.warn("Can't get the filesystem id of: %s" % path)
+ import subprocess
+ try:
+ return subprocess.check_output(["stat", "-f", "-c", "%t", path]).decode('utf-8').strip()
+ except subprocess.CalledProcessError:
+ bb.warn("Can't get filesystem id of: %s" % path)
return None
# Check that the path isn't located on nfs.
@@ -351,6 +350,14 @@ def check_not_nfs(path, name):
return "The %s: %s can't be located on nfs.\n" % (name, path)
return ""
+# Check that the path is on a case-sensitive file system
+def check_case_sensitive(path, name):
+ import tempfile
+ with tempfile.NamedTemporaryFile(prefix='TmP', dir=path) as tmp_file:
+ if os.path.exists(tmp_file.name.lower()):
+ return "The %s (%s) can't be on a case-insensitive file system.\n" % (name, path)
+ return ""
+
# Check that path isn't a broken symlink
def check_symlink(lnk, data):
if os.path.islink(lnk) and not os.path.exists(lnk):
@@ -360,27 +367,34 @@ def check_connectivity(d):
# URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable
# using the same syntax as for SRC_URI. If the variable is not set
# the check is skipped
- test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS', True) or "").split()
+ test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS') or "").split()
retval = ""
+ bbn = d.getVar('BB_NO_NETWORK')
+ if bbn not in (None, '0', '1'):
+ return 'BB_NO_NETWORK should be "0" or "1", but it is "%s"' % bbn
+
# Only check connectivity if network enabled and the
# CONNECTIVITY_CHECK_URIS are set
- network_enabled = not d.getVar('BB_NO_NETWORK', True)
+ network_enabled = not (bbn == '1')
check_enabled = len(test_uris)
- # Take a copy of the data store and unset MIRRORS and PREMIRRORS
- data = bb.data.createCopy(d)
- data.delVar('PREMIRRORS')
- data.delVar('MIRRORS')
if check_enabled and network_enabled:
+ # Take a copy of the data store and unset MIRRORS and PREMIRRORS
+ data = bb.data.createCopy(d)
+ data.delVar('PREMIRRORS')
+ data.delVar('MIRRORS')
try:
fetcher = bb.fetch2.Fetch(test_uris, data)
fetcher.checkstatus()
except Exception as err:
# Allow the message to be configured so that users can be
# pointed to a support mechanism.
- msg = data.getVar('CONNECTIVITY_CHECK_MSG', True) or ""
+ msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
if len(msg) == 0:
- msg = "%s. Please ensure your network is configured correctly.\n" % err
+ msg = "%s.\n" % err
+ msg += " Please ensure your host's network is configured correctly,\n"
+ msg += " or set BB_NO_NETWORK = \"1\" to disable network access if\n"
+ msg += " all required sources are on local disk.\n"
retval = msg
return retval
@@ -388,7 +402,7 @@ def check_connectivity(d):
def check_supported_distro(sanity_data):
from fnmatch import fnmatch
- tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS', True)
+ tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS')
if not tested_distros:
return
@@ -411,17 +425,17 @@ def check_sanity_validmachine(sanity_data):
messages = ""
# Check TUNE_ARCH is set
- if sanity_data.getVar('TUNE_ARCH', True) == 'INVALID':
+ if sanity_data.getVar('TUNE_ARCH') == 'INVALID':
messages = messages + 'TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a valid tune configuration file which will set this correctly.\n'
# Check TARGET_OS is set
- if sanity_data.getVar('TARGET_OS', True) == 'INVALID':
+ if sanity_data.getVar('TARGET_OS') == 'INVALID':
messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
# Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_ARCHS
- pkgarchs = sanity_data.getVar('PACKAGE_ARCHS', True)
- tunepkg = sanity_data.getVar('TUNE_PKGARCH', True)
- defaulttune = sanity_data.getVar('DEFAULTTUNE', True)
+ pkgarchs = sanity_data.getVar('PACKAGE_ARCHS')
+ tunepkg = sanity_data.getVar('TUNE_PKGARCH')
+ defaulttune = sanity_data.getVar('DEFAULTTUNE')
tunefound = False
seen = {}
dups = []
@@ -442,52 +456,32 @@ def check_sanity_validmachine(sanity_data):
return messages
-# Checks if necessary to add option march to host gcc
-def check_gcc_march(sanity_data):
- result = True
- message = ""
-
- # Check if -march not in BUILD_CFLAGS
- if sanity_data.getVar("BUILD_CFLAGS",True).find("-march") < 0:
- result = False
-
- # Construct a test file
- f = open("gcc_test.c", "w")
- f.write("int main (){ volatile int atomic = 2; __sync_bool_compare_and_swap (&atomic, 2, 3); return 0; }\n")
- f.close()
-
- # Check if GCC could work without march
- if not result:
- status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} gcc_test.c -o gcc_test"))
- if status == 0:
- result = True;
-
- if not result:
- status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} -march=native gcc_test.c -o gcc_test"))
- if status == 0:
- message = "BUILD_CFLAGS_append = \" -march=native\""
- result = True;
-
- if not result:
- build_arch = sanity_data.getVar('BUILD_ARCH', True)
- status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} -march=%s gcc_test.c -o gcc_test" % build_arch))
- if status == 0:
- message = "BUILD_CFLAGS_append = \" -march=%s\"" % build_arch
- result = True;
-
- os.remove("gcc_test.c")
- if os.path.exists("gcc_test"):
- os.remove("gcc_test")
+# Patch before 2.7 can't handle all the features in git-style diffs. Some
+# patches may incorrectly apply, and others won't apply at all.
+def check_patch_version(sanity_data):
+ from distutils.version import LooseVersion
+ import re, subprocess
- return (result, message)
+ try:
+ result = subprocess.check_output(["patch", "--version"], stderr=subprocess.STDOUT).decode('utf-8')
+ version = re.search(r"[0-9.]+", result.splitlines()[0]).group()
+ if LooseVersion(version) < LooseVersion("2.7"):
+ return "Your version of patch is older than 2.7 and has bugs which will break builds. Please install a newer version of patch.\n"
+ else:
+ return None
+ except subprocess.CalledProcessError as e:
+ return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output)
# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612.
# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
def check_make_version(sanity_data):
from distutils.version import LooseVersion
- status, result = oe.utils.getstatusoutput("make --version")
- if status != 0:
- return "Unable to execute make --version, exit code %s\n" % status
+ import subprocess
+
+ try:
+ result = subprocess.check_output(['make', '--version'], stderr=subprocess.STDOUT).decode('utf-8')
+ except subprocess.CalledProcessError as e:
+ return "Unable to execute make --version, exit code %d\n%s\n" % (e.returncode, e.output)
version = result.split()[2]
if LooseVersion(version) == LooseVersion("3.82"):
# Construct a test file
@@ -502,31 +496,46 @@ def check_make_version(sanity_data):
f.close()
# Check if make 3.82 has been patched
- status,result = oe.utils.getstatusoutput("make -f makefile_test")
-
- os.remove("makefile_test")
- if os.path.exists("makefile_test_a.c"):
- os.remove("makefile_test_a.c")
- if os.path.exists("makefile_test_b.c"):
- os.remove("makefile_test_b.c")
- if os.path.exists("makefile_test.a"):
- os.remove("makefile_test.a")
-
- if status != 0:
+ try:
+ subprocess.check_call(['make', '-f', 'makefile_test'])
+ except subprocess.CalledProcessError as e:
return "Your version of make 3.82 is broken. Please revert to 3.81 or install a patched version.\n"
+ finally:
+ os.remove("makefile_test")
+ if os.path.exists("makefile_test_a.c"):
+ os.remove("makefile_test_a.c")
+ if os.path.exists("makefile_test_b.c"):
+ os.remove("makefile_test_b.c")
+ if os.path.exists("makefile_test.a"):
+ os.remove("makefile_test.a")
return None
+# Check if we're running on WSL (Windows Subsystem for Linux). Its known not to
+# work but we should tell the user that upfront.
+def check_wsl(d):
+ with open("/proc/version", "r") as f:
+ verdata = f.readlines()
+ for l in verdata:
+ if "Microsoft" in l:
+ return "OpenEmbedded doesn't work under WSL at this time, sorry"
+ return None
+
# Tar version 1.24 and onwards handle overwriting symlinks correctly
# but earlier versions do not; this needs to work properly for sstate
+# Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled
def check_tar_version(sanity_data):
from distutils.version import LooseVersion
- status, result = oe.utils.getstatusoutput("tar --version")
- if status != 0:
- return "Unable to execute tar --version, exit code %s\n" % status
+ import subprocess
+ try:
+ result = subprocess.check_output(["tar", "--version"], stderr=subprocess.STDOUT).decode('utf-8')
+ except subprocess.CalledProcessError as e:
+ return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output)
version = result.split()[3]
if LooseVersion(version) < LooseVersion("1.24"):
- return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n"
+ return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar (1.28+).\n"
+ if LooseVersion(version) < LooseVersion("1.28"):
+ return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the projects buildtools-tarball from our last release).\n"
return None
# We use git parameters and functionality only found in 1.7.8 or later
@@ -534,9 +543,11 @@ def check_tar_version(sanity_data):
# The git fetcher also had workarounds for git < 1.7.9.2 which we've dropped
def check_git_version(sanity_data):
from distutils.version import LooseVersion
- status, result = oe.utils.getstatusoutput("git --version 2> /dev/null")
- if status != 0:
- return "Unable to execute git --version, exit code %s\n" % status
+ import subprocess
+ try:
+ result = subprocess.check_output(["git", "--version"], stderr=subprocess.DEVNULL).decode('utf-8')
+ except subprocess.CalledProcessError as e:
+ return "Unable to execute git --version, exit code %d\n%s\n" % (e.returncode, e.output)
version = result.split()[2]
if LooseVersion(version) < LooseVersion("1.8.3.1"):
return "Your version of git is older than 1.8.3.1 and has bugs which will break builds. Please install a newer version of git.\n"
@@ -544,28 +555,30 @@ def check_git_version(sanity_data):
# Check the required perl modules which may not be installed by default
def check_perl_modules(sanity_data):
+ import subprocess
ret = ""
modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
errresult = ''
for m in modules:
- status, result = oe.utils.getstatusoutput("perl -e 'use %s'" % m)
- if status != 0:
- errresult += result
+ try:
+ subprocess.check_output(["perl", "-e", "use %s" % m])
+ except subprocess.CalledProcessError as e:
+ errresult += bytes.decode(e.output)
ret += "%s " % m
if ret:
return "Required perl module(s) not found: %s\n\n%s\n" % (ret, errresult)
return None
def sanity_check_conffiles(d):
- funcs = d.getVar('BBLAYERS_CONF_UPDATE_FUNCS', True).split()
+ funcs = d.getVar('BBLAYERS_CONF_UPDATE_FUNCS').split()
for func in funcs:
conffile, current_version, required_version, func = func.split(":")
- if check_conf_exists(conffile, d) and d.getVar(current_version, True) is not None and \
- d.getVar(current_version, True) != d.getVar(required_version, True):
+ if check_conf_exists(conffile, d) and d.getVar(current_version) is not None and \
+ d.getVar(current_version) != d.getVar(required_version):
try:
- bb.build.exec_func(func, d, pythonexception=True)
+ bb.build.exec_func(func, d)
except NotImplementedError as e:
- bb.fatal(e)
+ bb.fatal(str(e))
d.setVar("BB_INVALIDCONF", True)
def sanity_handle_abichanges(status, d):
@@ -574,55 +587,16 @@ def sanity_handle_abichanges(status, d):
#
import subprocess
- current_abi = d.getVar('OELAYOUT_ABI', True)
- abifile = d.getVar('SANITY_ABIFILE', True)
+ current_abi = d.getVar('OELAYOUT_ABI')
+ abifile = d.getVar('SANITY_ABIFILE')
if os.path.exists(abifile):
with open(abifile, "r") as f:
abi = f.read().strip()
if not abi.isdigit():
with open(abifile, "w") as f:
f.write(current_abi)
- elif abi == "2" and current_abi == "3":
- bb.note("Converting staging from layout version 2 to layout version 3")
- subprocess.call(d.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots"), shell=True)
- subprocess.call(d.expand("ln -s sysroots ${TMPDIR}/staging"), shell=True)
- subprocess.call(d.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done"), shell=True)
- with open(abifile, "w") as f:
- f.write(current_abi)
- elif abi == "3" and current_abi == "4":
- bb.note("Converting staging layout from version 3 to layout version 4")
- if os.path.exists(d.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}")):
- subprocess.call(d.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}"), shell=True)
- subprocess.call(d.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"), shell=True)
- with open(abifile, "w") as f:
- f.write(current_abi)
- elif abi == "4":
- status.addresult("Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n")
- elif abi == "5" and current_abi == "6":
- bb.note("Converting staging layout from version 5 to layout version 6")
- subprocess.call(d.expand("mv ${TMPDIR}/pstagelogs ${SSTATE_MANIFESTS}"), shell=True)
- with open(abifile, "w") as f:
- f.write(current_abi)
- elif abi == "7" and current_abi == "8":
- status.addresult("Your configuration is using stamp files including the sstate hash but your build directory was built with stamp files that do not include this.\nTo continue, either rebuild or switch back to the OEBasic signature handler with BB_SIGNATURE_HANDLER = 'OEBasic'.\n")
- elif (abi != current_abi and current_abi == "9"):
- status.addresult("The layout of the TMPDIR STAMPS directory has changed. Please clean out TMPDIR and rebuild (sstate will be still be valid and reused)\n")
- elif (abi != current_abi and current_abi == "10" and (abi == "8" or abi == "9")):
- bb.note("Converting staging layout from version 8/9 to layout version 10")
- cmd = d.expand("grep -r -l sysroot-providers/virtual_kernel ${SSTATE_MANIFESTS}")
- ret, result = oe.utils.getstatusoutput(cmd)
- result = result.split()
- for f in result:
- bb.note("Uninstalling manifest file %s" % f)
- sstate_clean_manifest(f, d)
- with open(abifile, "w") as f:
- f.write(current_abi)
- elif abi == "10" and current_abi == "11":
- bb.note("Converting staging layout from version 10 to layout version 11")
- # Files in xf86-video-modesetting moved to xserver-xorg and bitbake can't currently handle that:
- subprocess.call(d.expand("rm ${TMPDIR}/sysroots/*/usr/lib/xorg/modules/drivers/modesetting_drv.so ${TMPDIR}/sysroots/*/pkgdata/runtime/xf86-video-modesetting* ${TMPDIR}/sysroots/*/pkgdata/runtime-reverse/xf86-video-modesetting* ${TMPDIR}/sysroots/*/pkgdata/shlibs2/xf86-video-modesetting*"), shell=True)
- with open(abifile, "w") as f:
- f.write(current_abi)
+ elif int(abi) <= 11 and current_abi == "12":
+ status.addresult("The layout of TMPDIR changed for Recipe Specific Sysroots.\nConversion doesn't make sense and this change will rebuild everything so please delete TMPDIR (%s).\n" % d.getVar("TMPDIR"))
elif (abi != current_abi):
# Code to convert from one ABI to another could go here if possible.
status.addresult("Error, TMPDIR has changed its layout version number (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi))
@@ -645,24 +619,27 @@ def check_sanity_sstate_dir_change(sstate_dir, data):
except IndexError:
pass
return testmsg
-
+
def check_sanity_version_change(status, d):
# Sanity checks to be done when SANITY_VERSION or NATIVELSBSTRING changes
# In other words, these tests run once in a given build directory and then
# never again until the sanity version or host distrubution id/version changes.
- # Check the python install is complete. glib-2.0-natives requries
- # xml.parsers.expat
+ # Check the python install is complete. Examples that are often removed in
+ # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu
+ # requires distutils.sysconfig.
try:
import xml.parsers.expat
- except ImportError:
- status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
- import stat
+ import distutils.sysconfig
+ except ImportError as e:
+ status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name)
status.addresult(check_make_version(d))
+ status.addresult(check_patch_version(d))
status.addresult(check_tar_version(d))
status.addresult(check_git_version(d))
status.addresult(check_perl_modules(d))
+ status.addresult(check_wsl(d))
missing = ""
@@ -670,12 +647,12 @@ def check_sanity_version_change(status, d):
missing = missing + "GNU make,"
if not check_app_exists('${BUILD_CC}', d):
- missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC", True)
+ missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC")
if not check_app_exists('${BUILD_CXX}', d):
- missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX", True)
+ missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX")
- required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES', True)
+ required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES')
for util in required_utilities.split():
if not check_app_exists(util, d):
@@ -685,30 +662,14 @@ def check_sanity_version_change(status, d):
missing = missing.rstrip(',')
status.addresult("Please install the following missing utilities: %s\n" % missing)
- assume_provided = d.getVar('ASSUME_PROVIDED', True).split()
+ assume_provided = d.getVar('ASSUME_PROVIDED').split()
# Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
if "diffstat-native" not in assume_provided:
status.addresult('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n')
- if "qemu-native" in assume_provided:
- if not check_app_exists("qemu-arm", d):
- status.addresult("qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH")
-
- if "libsdl-native" in assume_provided:
- if not check_app_exists("sdl-config", d):
- status.addresult("libsdl-native is set to be ASSUME_PROVIDED but sdl-config can't be found in PATH. Please either install it, or configure qemu not to require sdl.")
-
- (result, message) = check_gcc_march(d)
- if result and message:
- status.addresult("Your gcc version is older than 4.5, please add the following param to local.conf\n \
- %s\n" % message)
- if not result:
- status.addresult("Your gcc version is older than 4.5 or is not working properly. Please verify you can build")
- status.addresult(" and link something that uses atomic operations, such as: \n")
- status.addresult(" __sync_bool_compare_and_swap (&atomic, 2, 3);\n")
-
# Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
- tmpdir = d.getVar('TMPDIR', True)
+ import stat
+ tmpdir = d.getVar('TMPDIR')
status.addresult(check_create_long_filename(tmpdir, "TMPDIR"))
tmpdirmode = os.stat(tmpdir).st_mode
if (tmpdirmode & stat.S_ISGID):
@@ -732,7 +693,7 @@ def check_sanity_version_change(status, d):
if netcheck:
status.network_error = True
- nolibs = d.getVar('NO32LIBS', True)
+ nolibs = d.getVar('NO32LIBS')
if not nolibs:
lib32path = '/lib'
if os.path.exists('/lib64') and ( os.path.islink('/lib64') or os.path.islink('/lib') ):
@@ -741,7 +702,7 @@ def check_sanity_version_change(status, d):
if os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
status.addresult("You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc headers.\n")
- bbpaths = d.getVar('BBPATH', True).split(":")
+ bbpaths = d.getVar('BBPATH').split(":")
if ("." in bbpaths or "./" in bbpaths or "" in bbpaths):
status.addresult("BBPATH references the current directory, either through " \
"an empty entry, a './' or a '.'.\n\t This is unsafe and means your "\
@@ -751,7 +712,7 @@ def check_sanity_version_change(status, d):
"references.\n" \
"Parsed BBPATH is" + str(bbpaths));
- oes_bb_conf = d.getVar( 'OES_BITBAKE_CONF', True)
+ oes_bb_conf = d.getVar( 'OES_BITBAKE_CONF')
if not oes_bb_conf:
status.addresult('You are not using the OpenEmbedded version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n')
@@ -761,6 +722,10 @@ def check_sanity_version_change(status, d):
# Check that TMPDIR isn't located on nfs
status.addresult(check_not_nfs(tmpdir, "TMPDIR"))
+ # Check for case-insensitive file systems (such as Linux in Docker on
+ # macOS with default HFS+ file system)
+ status.addresult(check_case_sensitive(tmpdir, "TMPDIR"))
+
def sanity_check_locale(d):
"""
Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.
@@ -769,7 +734,7 @@ def sanity_check_locale(d):
try:
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
except locale.Error:
- raise_sanity_error("You system needs to support the en_US.UTF-8 locale.", d)
+ raise_sanity_error("Your system needs to support the en_US.UTF-8 locale.", d)
def check_sanity_everybuild(status, d):
import os, stat
@@ -779,33 +744,38 @@ def check_sanity_everybuild(status, d):
if 0 == os.getuid():
raise_sanity_error("Do not use Bitbake as root.", d)
- # Check the Python version, we now have a minimum of Python 2.7.3
+ # Check the Python version, we now have a minimum of Python 3.4
import sys
- if sys.hexversion < 0x020703F0:
- status.addresult('The system requires at least Python 2.7.3 to run. Please update your Python interpreter.\n')
+ if sys.hexversion < 0x03040000:
+ status.addresult('The system requires at least Python 3.4 to run. Please update your Python interpreter.\n')
# Check the bitbake version meets minimum requirements
from distutils.version import LooseVersion
- minversion = d.getVar('BB_MIN_VERSION', True)
+ minversion = d.getVar('BB_MIN_VERSION')
if (LooseVersion(bb.__version__) < LooseVersion(minversion)):
status.addresult('Bitbake version %s is required and version %s was found\n' % (minversion, bb.__version__))
sanity_check_locale(d)
- paths = d.getVar('PATH', True).split(":")
+ paths = d.getVar('PATH').split(":")
if "." in paths or "./" in paths or "" in paths:
status.addresult("PATH contains '.', './' or '' (empty element), which will break the build, please remove this.\nParsed PATH is " + str(paths) + "\n")
# Check that the DISTRO is valid, if set
# need to take into account DISTRO renaming DISTRO
- distro = d.getVar('DISTRO', True)
+ distro = d.getVar('DISTRO')
if distro and distro != "nodistro":
if not ( check_conf_exists("conf/distro/${DISTRO}.conf", d) or check_conf_exists("conf/distro/include/${DISTRO}.inc", d) ):
- status.addresult("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % d.getVar("DISTRO", True))
+ status.addresult("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % d.getVar("DISTRO"))
+
+ # Check that these variables don't use tilde-expansion as we don't do that
+ for v in ("TMPDIR", "DL_DIR", "SSTATE_DIR"):
+ if d.getVar(v).startswith("~"):
+ status.addresult("%s uses ~ but Bitbake will not expand this, use an absolute path or variables." % v)
# Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't
# set, since so much relies on it being set.
- dldir = d.getVar('DL_DIR', True)
+ dldir = d.getVar('DL_DIR')
if not dldir:
status.addresult("DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, and if the directory exists, that it is writable. \n")
if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
@@ -814,9 +784,9 @@ def check_sanity_everybuild(status, d):
# Check that the MACHINE is valid, if it is set
machinevalid = True
- if d.getVar('MACHINE', True):
+ if d.getVar('MACHINE'):
if not check_conf_exists("conf/machine/${MACHINE}.conf", d):
- status.addresult('Please set a valid MACHINE in your local.conf or environment\n')
+ status.addresult('MACHINE=%s is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file.\n' % (d.getVar('MACHINE')))
machinevalid = False
else:
status.addresult(check_sanity_validmachine(d))
@@ -827,12 +797,17 @@ def check_sanity_everybuild(status, d):
status.addresult(check_toolchain(d))
# Check that the SDKMACHINE is valid, if it is set
- if d.getVar('SDKMACHINE', True):
+ if d.getVar('SDKMACHINE'):
if not check_conf_exists("conf/machine-sdk/${SDKMACHINE}.conf", d):
status.addresult('Specified SDKMACHINE value is not valid\n')
elif d.getVar('SDK_ARCH', False) == "${BUILD_ARCH}":
status.addresult('SDKMACHINE is set, but SDK_ARCH has not been changed as a result - SDKMACHINE may have been set too late (e.g. in the distro configuration)\n')
+ # If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early
+ sdkvendor = d.getVar("SDK_VENDOR")
+ if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1):
+ status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash\n")
+
check_supported_distro(d)
omask = os.umask(0o022)
@@ -840,7 +815,7 @@ def check_sanity_everybuild(status, d):
status.addresult("Please use a umask which allows a+rx and u+rwx\n")
os.umask(omask)
- if d.getVar('TARGET_ARCH', True) == "arm":
+ if d.getVar('TARGET_ARCH') == "arm":
# This path is no longer user-readable in modern (very recent) Linux
try:
if os.path.exists("/proc/sys/vm/mmap_min_addr"):
@@ -853,7 +828,7 @@ def check_sanity_everybuild(status, d):
except:
pass
- oeroot = d.getVar('COREBASE', True)
+ oeroot = d.getVar('COREBASE')
if oeroot.find('+') != -1:
status.addresult("Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include any + characters.")
if oeroot.find('@') != -1:
@@ -866,20 +841,18 @@ def check_sanity_everybuild(status, d):
mirror_vars = ['MIRRORS', 'PREMIRRORS', 'SSTATE_MIRRORS']
protocols = ['http', 'ftp', 'file', 'https', \
'git', 'gitsm', 'hg', 'osc', 'p4', 'svn', \
- 'bzr', 'cvs', 'npm', 'sftp', 'ssh']
+ 'bzr', 'cvs', 'npm', 'sftp', 'ssh', 's3' ]
for mirror_var in mirror_vars:
- mirrors = (d.getVar(mirror_var, True) or '').replace('\\n', '\n').split('\n')
- for mirror_entry in mirrors:
- mirror_entry = mirror_entry.strip()
- if not mirror_entry:
- # ignore blank lines
- continue
+ mirrors = (d.getVar(mirror_var) or '').replace('\\n', ' ').split()
- try:
- pattern, mirror = mirror_entry.split()
- except ValueError:
- bb.warn('Invalid %s: %s, should be 2 members.' % (mirror_var, mirror_entry.strip()))
- continue
+ # Split into pairs
+ if len(mirrors) % 2 != 0:
+ bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, str(mirrors)))
+ continue
+ mirrors = list(zip(*[iter(mirrors)]*2))
+
+ for mirror_entry in mirrors:
+ pattern, mirror = mirror_entry
decoded = bb.fetch2.decodeurl(pattern)
try:
@@ -907,13 +880,13 @@ def check_sanity_everybuild(status, d):
check_symlink(mirror_base, d)
# Check that TMPDIR hasn't changed location since the last time we were run
- tmpdir = d.getVar('TMPDIR', True)
+ tmpdir = d.getVar('TMPDIR')
checkfile = os.path.join(tmpdir, "saved_tmpdir")
if os.path.exists(checkfile):
with open(checkfile, "r") as f:
saved_tmpdir = f.read().strip()
if (saved_tmpdir != tmpdir):
- status.addresult("Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir)
+ status.addresult("Error, TMPDIR has changed location. You need to either move it back to %s or delete it and rebuild\n" % saved_tmpdir)
else:
bb.utils.mkdirhier(tmpdir)
# Remove setuid, setgid and sticky bits from TMPDIR
@@ -929,7 +902,9 @@ def check_sanity_everybuild(status, d):
# If /bin/sh is a symlink, check that it points to dash or bash
if os.path.islink('/bin/sh'):
real_sh = os.path.realpath('/bin/sh')
- if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'):
+ # Due to update-alternatives, the shell name may take various
+ # forms, such as /bin/dash, bin/bash, /bin/bash.bash ...
+ if '/dash' not in real_sh and '/bash' not in real_sh:
status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh)
def check_sanity(sanity_data):
@@ -944,8 +919,8 @@ def check_sanity(sanity_data):
status = SanityStatus()
- tmpdir = sanity_data.getVar('TMPDIR', True)
- sstate_dir = sanity_data.getVar('SSTATE_DIR', True)
+ tmpdir = sanity_data.getVar('TMPDIR')
+ sstate_dir = sanity_data.getVar('SSTATE_DIR')
check_symlink(sstate_dir, sanity_data)
@@ -969,7 +944,7 @@ def check_sanity(sanity_data):
check_sanity_everybuild(status, sanity_data)
- sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1)
+ sanity_version = int(sanity_data.getVar('SANITY_VERSION') or 1)
network_error = False
# NATIVELSBSTRING var may have been overridden with "universal", so
# get actual host distribution id and version
diff --git a/meta/classes/scons.bbclass b/meta/classes/scons.bbclass
index b9ae19d582..6b171ca8df 100644
--- a/meta/classes/scons.bbclass
+++ b/meta/classes/scons.bbclass
@@ -1,17 +1,31 @@
-DEPENDS += "python-scons-native"
+inherit python3native
+
+DEPENDS += "python3-scons-native"
EXTRA_OESCONS ?= ""
-do_configure[noexec] = "1"
+do_configure() {
+ unset _PYTHON_SYSCONFIGDATA_NAME
+ if [ -n "${CONFIGURESTAMPFILE}" ]; then
+ if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
+ ${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
+ fi
+
+ mkdir -p `dirname ${CONFIGURESTAMPFILE}`
+ echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
+ fi
+}
scons_do_compile() {
- ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
- die "scons build execution failed."
+ unset _PYTHON_SYSCONFIGDATA_NAME
+ ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
+ die "scons build execution failed."
}
scons_do_install() {
- ${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
- die "scons install execution failed."
+ unset _PYTHON_SYSCONFIGDATA_NAME
+ ${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
+ die "scons install execution failed."
}
EXPORT_FUNCTIONS do_compile do_install
diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
index 56343b1c73..a923ea3c4a 100644
--- a/meta/classes/setuptools.bbclass
+++ b/meta/classes/setuptools.bbclass
@@ -1,8 +1,3 @@
inherit distutils
-DEPENDS += "python-distribute-native"
-
-DISTUTILS_INSTALL_ARGS = "--root=${D} \
- --prefix=${prefix} \
- --install-lib=${PYTHON_SITEPACKAGES_DIR} \
- --install-data=${datadir}"
+DEPENDS += "python-setuptools-native"
diff --git a/meta/classes/setuptools3.bbclass b/meta/classes/setuptools3.bbclass
index de6dd9440c..8ca66ee708 100644
--- a/meta/classes/setuptools3.bbclass
+++ b/meta/classes/setuptools3.bbclass
@@ -2,7 +2,3 @@ inherit distutils3
DEPENDS += "python3-setuptools-native"
-DISTUTILS_INSTALL_ARGS = "--root=${D} \
- --prefix=${prefix} \
- --install-lib=${PYTHON_SITEPACKAGES_DIR} \
- --install-data=${datadir}"
diff --git a/meta/classes/sign_ipk.bbclass b/meta/classes/sign_ipk.bbclass
index a481f6d9a8..e5057b7799 100644
--- a/meta/classes/sign_ipk.bbclass
+++ b/meta/classes/sign_ipk.bbclass
@@ -29,10 +29,10 @@ IPK_GPG_SIGNATURE_TYPE ?= 'ASC'
python () {
# Check configuration
for var in ('IPK_GPG_NAME', 'IPK_GPG_PASSPHRASE_FILE'):
- if not d.getVar(var, True):
+ if not d.getVar(var):
raise_sanity_error("You need to define %s in the config" % var, d)
- sigtype = d.getVar("IPK_GPG_SIGNATURE_TYPE", True)
+ sigtype = d.getVar("IPK_GPG_SIGNATURE_TYPE")
if sigtype.upper() != "ASC" and sigtype.upper() != "BIN":
raise_sanity_error("Bad value for IPK_GPG_SIGNATURE_TYPE (%s), use either ASC or BIN" % sigtype)
}
@@ -42,11 +42,11 @@ def sign_ipk(d, ipk_to_sign):
bb.debug(1, 'Signing ipk: %s' % ipk_to_sign)
- signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
- sig_type = d.getVar('IPK_GPG_SIGNATURE_TYPE', True)
+ signer = get_signer(d, d.getVar('IPK_GPG_BACKEND'))
+ sig_type = d.getVar('IPK_GPG_SIGNATURE_TYPE')
is_ascii_sig = (sig_type.upper() != "BIN")
signer.detach_sign(ipk_to_sign,
- d.getVar('IPK_GPG_NAME', True),
- d.getVar('IPK_GPG_PASSPHRASE_FILE', True),
+ d.getVar('IPK_GPG_NAME'),
+ d.getVar('IPK_GPG_PASSPHRASE_FILE'),
armor=is_ascii_sig)
diff --git a/meta/classes/sign_package_feed.bbclass b/meta/classes/sign_package_feed.bbclass
index 31a6e9b042..7ff3a35a2f 100644
--- a/meta/classes/sign_package_feed.bbclass
+++ b/meta/classes/sign_package_feed.bbclass
@@ -28,16 +28,19 @@ PACKAGE_FEED_SIGN = '1'
PACKAGE_FEED_GPG_BACKEND ?= 'local'
PACKAGE_FEED_GPG_SIGNATURE_TYPE ?= 'ASC'
+# Make feed signing key to be present in rootfs
+FEATURE_PACKAGES_package-management_append = " signing-keys-packagefeed"
+
python () {
# Check sanity of configuration
for var in ('PACKAGE_FEED_GPG_NAME', 'PACKAGE_FEED_GPG_PASSPHRASE_FILE'):
- if not d.getVar(var, True):
+ if not d.getVar(var):
raise_sanity_error("You need to define %s in the config" % var, d)
- sigtype = d.getVar("PACKAGE_FEED_GPG_SIGNATURE_TYPE", True)
+ sigtype = d.getVar("PACKAGE_FEED_GPG_SIGNATURE_TYPE")
if sigtype.upper() != "ASC" and sigtype.upper() != "BIN":
raise_sanity_error("Bad value for PACKAGE_FEED_GPG_SIGNATURE_TYPE (%s), use either ASC or BIN" % sigtype)
}
do_package_index[depends] += "signing-keys:do_deploy"
-do_rootfs[depends] += "signing-keys:do_populate_sysroot"
+do_rootfs[depends] += "signing-keys:do_populate_sysroot gnupg-native:do_populate_sysroot"
diff --git a/meta/classes/sign_rpm.bbclass b/meta/classes/sign_rpm.bbclass
index a8ea75faaa..64ae7ce30e 100644
--- a/meta/classes/sign_rpm.bbclass
+++ b/meta/classes/sign_rpm.bbclass
@@ -9,45 +9,63 @@
# Optional variable for specifying the backend to use for signing.
# Currently the only available option is 'local', i.e. local signing
# on the build host.
+# RPM_FILE_CHECKSUM_DIGEST
+# Optional variable for specifying the algorithm for generating file
+# checksum digest.
+# RPM_FSK_PATH
+# Optional variable for the file signing key.
+# RPM_FSK_PASSWORD
+# Optional variable for the file signing key password.
# GPG_BIN
# Optional variable for specifying the gpg binary/wrapper to use for
# signing.
+# RPM_GPG_SIGN_CHUNK
+# Optional variable indicating the number of packages used per gpg
+# invocation
# GPG_PATH
# Optional variable for specifying the gnupg "home" directory:
-#
+
inherit sanity
RPM_SIGN_PACKAGES='1'
+RPM_SIGN_FILES ?= '0'
RPM_GPG_BACKEND ?= 'local'
+# SHA-256 is used by default
+RPM_FILE_CHECKSUM_DIGEST ?= '8'
+RPM_GPG_SIGN_CHUNK ?= "${BB_NUMBER_THREADS}"
python () {
- if d.getVar('RPM_GPG_PASSPHRASE_FILE', True):
+ if d.getVar('RPM_GPG_PASSPHRASE_FILE'):
raise_sanity_error('RPM_GPG_PASSPHRASE_FILE is replaced by RPM_GPG_PASSPHRASE', d)
# Check configuration
for var in ('RPM_GPG_NAME', 'RPM_GPG_PASSPHRASE'):
- if not d.getVar(var, True):
+ if not d.getVar(var):
raise_sanity_error("You need to define %s in the config" % var, d)
- # Set the expected location of the public key
- d.setVar('RPM_GPG_PUBKEY', os.path.join(d.getVar('STAGING_DIR_TARGET', False),
- d.getVar('sysconfdir', False),
- 'pki',
- 'rpm-gpg',
- 'RPM-GPG-KEY-${DISTRO_VERSION}'))
+ if d.getVar('RPM_SIGN_FILES') == '1':
+ for var in ('RPM_FSK_PATH', 'RPM_FSK_PASSWORD'):
+ if not d.getVar(var):
+ raise_sanity_error("You need to define %s in the config" % var, d)
}
python sign_rpm () {
import glob
from oe.gpg_sign import get_signer
- signer = get_signer(d, d.getVar('RPM_GPG_BACKEND', True))
- rpms = glob.glob(d.getVar('RPM_PKGWRITEDIR', True) + '/*')
+ signer = get_signer(d, d.getVar('RPM_GPG_BACKEND'))
+ rpms = glob.glob(d.getVar('RPM_PKGWRITEDIR') + '/*')
signer.sign_rpms(rpms,
- d.getVar('RPM_GPG_NAME', True),
- d.getVar('RPM_GPG_PASSPHRASE', True))
+ d.getVar('RPM_GPG_NAME'),
+ d.getVar('RPM_GPG_PASSPHRASE'),
+ d.getVar('RPM_FILE_CHECKSUM_DIGEST'),
+ int(d.getVar('RPM_GPG_SIGN_CHUNK')),
+ d.getVar('RPM_FSK_PATH'),
+ d.getVar('RPM_FSK_PASSWORD'))
}
do_package_index[depends] += "signing-keys:do_deploy"
do_rootfs[depends] += "signing-keys:do_populate_sysroot"
+
+PACKAGE_WRITE_DEPS += "gnupg-native"
diff --git a/meta/classes/siteconfig.bbclass b/meta/classes/siteconfig.bbclass
index 45dce489de..0cfa5a6834 100644
--- a/meta/classes/siteconfig.bbclass
+++ b/meta/classes/siteconfig.bbclass
@@ -1,13 +1,13 @@
python siteconfig_do_siteconfig () {
- shared_state = sstate_state_fromvars(d)
- if shared_state['task'] != 'populate_sysroot':
- return
- if not os.path.isdir(os.path.join(d.getVar('FILE_DIRNAME', True), 'site_config')):
- bb.debug(1, "No site_config directory, skipping do_siteconfig")
- return
- bb.build.exec_func('do_siteconfig_gencache', d)
- sstate_clean(shared_state, d)
- sstate_install(shared_state, d)
+ shared_state = sstate_state_fromvars(d)
+ if shared_state['task'] != 'populate_sysroot':
+ return
+ if not os.path.isdir(os.path.join(d.getVar('FILE_DIRNAME'), 'site_config')):
+ bb.debug(1, "No site_config directory, skipping do_siteconfig")
+ return
+ sstate_install(shared_state, d)
+ bb.build.exec_func('do_siteconfig_gencache', d)
+ sstate_clean(shared_state, d)
}
EXTRASITECONFIG ?= ""
diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass
index 6a2e4bf560..411e70478e 100644
--- a/meta/classes/siteinfo.bbclass
+++ b/meta/classes/siteinfo.bbclass
@@ -15,11 +15,13 @@
# It is an error for the target not to exist.
# If 'what' doesn't exist then an empty value is returned
#
-def siteinfo_data(d):
+def siteinfo_data_for_machine(arch, os, d):
archinfo = {
"allarch": "endian-little bit-32", # bogus, but better than special-casing the checks below for allarch
"aarch64": "endian-little bit-64 arm-common arm-64",
"aarch64_be": "endian-big bit-64 arm-common arm-64",
+ "arc": "endian-little bit-32 arc-common",
+ "arceb": "endian-big bit-32 arc-common",
"arm": "endian-little bit-32 arm-common arm-32",
"armeb": "endian-big bit-32 arm-common arm-32",
"avr32": "endian-big bit-32 avr32-common",
@@ -30,19 +32,27 @@ def siteinfo_data(d):
"i586": "endian-little bit-32 ix86-common",
"i686": "endian-little bit-32 ix86-common",
"ia64": "endian-little bit-64",
+ "lm32": "endian-big bit-32",
+ "m68k": "endian-big bit-32",
"microblaze": "endian-big bit-32 microblaze-common",
"microblazeeb": "endian-big bit-32 microblaze-common",
"microblazeel": "endian-little bit-32 microblaze-common",
"mips": "endian-big bit-32 mips-common",
"mips64": "endian-big bit-64 mips-common",
"mips64el": "endian-little bit-64 mips-common",
+ "mipsisa64r6": "endian-big bit-64 mips-common",
+ "mipsisa64r6el": "endian-little bit-64 mips-common",
"mipsel": "endian-little bit-32 mips-common",
+ "mipsisa32r6": "endian-big bit-32 mips-common",
+ "mipsisa32r6el": "endian-little bit-32 mips-common",
"powerpc": "endian-big bit-32 powerpc-common",
"nios2": "endian-little bit-32 nios2-common",
"powerpc64": "endian-big bit-64 powerpc-common",
"ppc": "endian-big bit-32 powerpc-common",
"ppc64": "endian-big bit-64 powerpc-common",
"ppc64le" : "endian-little bit-64 powerpc-common",
+ "riscv32": "endian-little bit-32 riscv-common",
+ "riscv64": "endian-little bit-64 riscv-common",
"sh3": "endian-little bit-32 sh-common",
"sh4": "endian-little bit-32 sh-common",
"sparc": "endian-big bit-32",
@@ -54,14 +64,13 @@ def siteinfo_data(d):
"darwin9": "common-darwin",
"linux": "common-linux common-glibc",
"linux-gnu": "common-linux common-glibc",
+ "linux-gnu_ilp32": "common-linux common-glibc",
"linux-gnux32": "common-linux common-glibc",
"linux-gnun32": "common-linux common-glibc",
"linux-gnueabi": "common-linux common-glibc",
"linux-gnuspe": "common-linux common-glibc",
- "linux-uclibc": "common-linux common-uclibc",
- "linux-uclibceabi": "common-linux common-uclibc",
- "linux-uclibcspe": "common-linux common-uclibc",
"linux-musl": "common-linux common-musl",
+ "linux-muslx32": "common-linux common-musl",
"linux-musleabi": "common-linux common-musl",
"linux-muslspe": "common-linux common-musl",
"uclinux-uclibc": "common-uclibc",
@@ -71,36 +80,44 @@ def siteinfo_data(d):
targetinfo = {
"aarch64-linux-gnu": "aarch64-linux",
"aarch64_be-linux-gnu": "aarch64_be-linux",
+ "aarch64-linux-gnu_ilp32": "bit-32 aarch64_be-linux arm-32",
+ "aarch64_be-linux-gnu_ilp32": "bit-32 aarch64_be-linux arm-32",
"aarch64-linux-musl": "aarch64-linux",
"aarch64_be-linux-musl": "aarch64_be-linux",
"arm-linux-gnueabi": "arm-linux",
"arm-linux-musleabi": "arm-linux",
- "arm-linux-uclibceabi": "arm-linux-uclibc",
"armeb-linux-gnueabi": "armeb-linux",
- "armeb-linux-uclibceabi": "armeb-linux-uclibc",
"armeb-linux-musleabi": "armeb-linux",
+ "microblazeeb-linux" : "microblaze-linux",
+ "microblazeeb-linux-musl" : "microblaze-linux",
+ "microblazeel-linux" : "microblaze-linux",
+ "microblazeel-linux-musl" : "microblaze-linux",
"mips-linux-musl": "mips-linux",
"mipsel-linux-musl": "mipsel-linux",
"mips64-linux-musl": "mips64-linux",
"mips64el-linux-musl": "mips64el-linux",
"mips64-linux-gnun32": "mips-linux bit-32",
"mips64el-linux-gnun32": "mipsel-linux bit-32",
+ "mipsisa64r6-linux-gnun32": "mipsisa32r6-linux bit-32",
+ "mipsisa64r6el-linux-gnun32": "mipsisa32r6el-linux bit-32",
"powerpc-linux": "powerpc32-linux",
"powerpc-linux-musl": "powerpc-linux powerpc32-linux",
- "powerpc-linux-uclibc": "powerpc-linux powerpc32-linux",
"powerpc-linux-gnuspe": "powerpc-linux powerpc32-linux",
"powerpc-linux-muslspe": "powerpc-linux powerpc32-linux",
- "powerpc-linux-uclibcspe": "powerpc-linux powerpc32-linux powerpc-linux-uclibc",
"powerpc64-linux-gnuspe": "powerpc-linux powerpc64-linux",
"powerpc64-linux-muslspe": "powerpc-linux powerpc64-linux",
"powerpc64-linux": "powerpc-linux",
"powerpc64-linux-musl": "powerpc-linux",
+ "riscv32-linux": "riscv32-linux",
+ "riscv32-linux-musl": "riscv32-linux",
+ "riscv64-linux": "riscv64-linux",
+ "riscv64-linux-musl": "riscv64-linux",
"x86_64-cygwin": "bit-64",
"x86_64-darwin": "bit-64",
"x86_64-darwin9": "bit-64",
"x86_64-linux": "bit-64",
"x86_64-linux-musl": "x86_64-linux bit-64",
- "x86_64-linux-uclibc": "bit-64",
+ "x86_64-linux-muslx32": "bit-32 ix86-common x32-linux",
"x86_64-elf": "bit-64",
"x86_64-linux-gnu": "bit-64 x86_64-linux",
"x86_64-linux-gnux32": "bit-32 ix86-common x32-linux",
@@ -109,21 +126,19 @@ def siteinfo_data(d):
# Add in any extra user supplied data which may come from a BSP layer, removing the
# need to always change this class directly
- extra_siteinfo = (d.getVar("SITEINFO_EXTRA_DATAFUNCS", True) or "").split()
+ extra_siteinfo = (d.getVar("SITEINFO_EXTRA_DATAFUNCS") or "").split()
for m in extra_siteinfo:
call = m + "(archinfo, osinfo, targetinfo, d)"
locs = { "archinfo" : archinfo, "osinfo" : osinfo, "targetinfo" : targetinfo, "d" : d}
archinfo, osinfo, targetinfo = bb.utils.better_eval(call, locs)
- hostarch = d.getVar("HOST_ARCH", True)
- hostos = d.getVar("HOST_OS", True)
- target = "%s-%s" % (hostarch, hostos)
+ target = "%s-%s" % (arch, os)
sitedata = []
- if hostarch in archinfo:
- sitedata.extend(archinfo[hostarch].split())
- if hostos in osinfo:
- sitedata.extend(osinfo[hostos].split())
+ if arch in archinfo:
+ sitedata.extend(archinfo[arch].split())
+ if os in osinfo:
+ sitedata.extend(osinfo[os].split())
if target in targetinfo:
sitedata.extend(targetinfo[target].split())
sitedata.append(target)
@@ -132,6 +147,9 @@ def siteinfo_data(d):
bb.debug(1, "SITE files %s" % sitedata);
return sitedata
+def siteinfo_data(d):
+ return siteinfo_data_for_machine(d.getVar("HOST_ARCH"), d.getVar("HOST_OS"), d)
+
python () {
sitedata = set(siteinfo_data(d))
if "endian-little" in sitedata:
@@ -140,7 +158,7 @@ python () {
d.setVar("SITEINFO_ENDIANNESS", "be")
else:
bb.error("Unable to determine endianness for architecture '%s'" %
- d.getVar("HOST_ARCH", True))
+ d.getVar("HOST_ARCH"))
bb.fatal("Please add your architecture to siteinfo.bbclass")
if "bit-32" in sitedata:
@@ -149,31 +167,24 @@ python () {
d.setVar("SITEINFO_BITS", "64")
else:
bb.error("Unable to determine bit size for architecture '%s'" %
- d.getVar("HOST_ARCH", True))
+ d.getVar("HOST_ARCH"))
bb.fatal("Please add your architecture to siteinfo.bbclass")
}
-def siteinfo_get_files(d, aclocalcache = False):
+def siteinfo_get_files(d, sysrootcache = False):
sitedata = siteinfo_data(d)
sitefiles = ""
- for path in d.getVar("BBPATH", True).split(":"):
+ for path in d.getVar("BBPATH").split(":"):
for element in sitedata:
filename = os.path.join(path, "site", element)
if os.path.exists(filename):
sitefiles += filename + " "
- if not aclocalcache:
+ if not sysrootcache:
return sitefiles
- # Now check for siteconfig cache files in the directory setup by autotools.bbclass to
- # avoid races.
- #
- # ACLOCALDIR may or may not exist so cache should only be set to True from autotools.bbclass
- # after files have been copied into this location. To do otherwise risks parsing/signature
- # issues and the directory being created/removed whilst this code executes. This can happen
- # when a multilib recipe is parsed along with its base variant which may be running at the time
- # causing rare but nasty failures
- path_siteconfig = d.getVar('ACLOCALDIR', True)
+ # Now check for siteconfig cache files in sysroots
+ path_siteconfig = d.getVar('SITECONFIG_SYSROOTCACHE')
if path_siteconfig and os.path.isdir(path_siteconfig):
for i in os.listdir(path_siteconfig):
if not i.endswith("_config"):
diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index 0c9276584c..fb78e274a8 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -26,20 +26,20 @@ python do_spdx () {
import json, shutil
info = {}
- info['workdir'] = d.getVar('WORKDIR', True)
- info['sourcedir'] = d.getVar('SPDX_S', True)
- info['pn'] = d.getVar('PN', True)
- info['pv'] = d.getVar('PV', True)
- info['spdx_version'] = d.getVar('SPDX_VERSION', True)
- info['data_license'] = d.getVar('DATA_LICENSE', True)
-
- sstatedir = d.getVar('SPDXSSTATEDIR', True)
+ info['workdir'] = d.getVar('WORKDIR')
+ info['sourcedir'] = d.getVar('SPDX_S')
+ info['pn'] = d.getVar('PN')
+ info['pv'] = d.getVar('PV')
+ info['spdx_version'] = d.getVar('SPDX_VERSION')
+ info['data_license'] = d.getVar('DATA_LICENSE')
+
+ sstatedir = d.getVar('SPDXSSTATEDIR')
sstatefile = os.path.join(sstatedir, info['pn'] + info['pv'] + ".spdx")
- manifest_dir = d.getVar('SPDX_MANIFEST_DIR', True)
+ manifest_dir = d.getVar('SPDX_MANIFEST_DIR')
info['outfile'] = os.path.join(manifest_dir, info['pn'] + ".spdx" )
- info['spdx_temp_dir'] = d.getVar('SPDX_TEMP_DIR', True)
+ info['spdx_temp_dir'] = d.getVar('SPDX_TEMP_DIR')
info['tar_file'] = os.path.join(info['workdir'], info['pn'] + ".tar.gz" )
# Make sure important dirs exist
@@ -74,9 +74,9 @@ python do_spdx () {
foss_license_info = cached_spdx['Licenses']
else:
## setup fossology command
- foss_server = d.getVar('FOSS_SERVER', True)
- foss_flags = d.getVar('FOSS_WGET_FLAGS', True)
- foss_full_spdx = d.getVar('FOSS_FULL_SPDX', True) == "true" or False
+ foss_server = d.getVar('FOSS_SERVER')
+ foss_flags = d.getVar('FOSS_WGET_FLAGS')
+ foss_full_spdx = d.getVar('FOSS_FULL_SPDX') == "true" or False
foss_command = "wget %s --post-file=%s %s"\
% (foss_flags, info['tar_file'], foss_server)
@@ -202,32 +202,26 @@ def list_files(dir):
return
def hash_file(file_name):
- try:
- with open(file_name, 'rb') as f:
- data_string = f.read()
- sha1 = hash_string(data_string)
- return sha1
- except:
- return None
+ from bb.utils import sha1_file
+ return sha1_file(file_name)
def hash_string(data):
import hashlib
sha1 = hashlib.sha1()
- sha1.update(data)
+ sha1.update(data.encode('utf-8'))
return sha1.hexdigest()
def run_fossology(foss_command, full_spdx):
import string, re
import subprocess
-
- p = subprocess.Popen(foss_command.split(),
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- foss_output, foss_error = p.communicate()
- if p.returncode != 0:
+
+ try:
+ foss_output = subprocess.check_output(foss_command.split(),
+ stderr=subprocess.STDOUT).decode('utf-8')
+ except subprocess.CalledProcessError as e:
return None
- foss_output = unicode(foss_output, "utf-8")
- foss_output = string.replace(foss_output, '\r', '')
+ foss_output = foss_output.replace('\r', '')
# Package info
package_info = {}
@@ -290,7 +284,8 @@ def create_spdx_doc(file_info, scanned_files):
def get_ver_code(dirname):
chksums = []
for f_dir, f in list_files(dirname):
- hash = hash_file(os.path.join(dirname, f_dir, f))
+ path = os.path.join(dirname, f_dir, f)
+ hash = hash_file(path)
if not hash is None:
chksums.append(hash)
else:
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index ac9d77d528..b5267f00be 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -11,7 +11,7 @@ def generate_sstatefn(spec, hash, d):
SSTATE_PKGARCH = "${PACKAGE_ARCH}"
SSTATE_PKGSPEC = "sstate:${PN}:${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}:${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:"
SSTATE_SWSPEC = "sstate:${PN}::${PV}:${PR}::${SSTATE_VERSION}:"
-SSTATE_PKGNAME = "${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PKGSPEC', True), d.getVar('BB_TASKHASH', True), d)}"
+SSTATE_PKGNAME = "${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PKGSPEC'), d.getVar('BB_UNIHASH'), d)}"
SSTATE_PKG = "${SSTATE_DIR}/${SSTATE_PKGNAME}"
SSTATE_EXTRAPATH = ""
SSTATE_EXTRAPATHWILDCARD = ""
@@ -23,18 +23,28 @@ PV[vardepvalue] = "${PV}"
# We don't want the sstate to depend on things like the distro string
# of the system, we let the sstate paths take care of this.
SSTATE_EXTRAPATH[vardepvalue] = ""
+SSTATE_EXTRAPATHWILDCARD[vardepvalue] = ""
# For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical)
-SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/all/"
+SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/"
# Avoid docbook/sgml catalog warnings for now
SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
+# sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/sdk_provides_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/sdk-provides-dummy-nativesdk/"
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/buildtools_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/buildtools-dummy-nativesdk/"
+# target-sdk-provides-dummy overlaps that allarch is disabled when multilib is used
+SSTATE_DUPWHITELIST += "${COMPONENTS_DIR}/sdk-provides-dummy-target/ ${DEPLOY_DIR_RPM}/sdk_provides_dummy_target/ ${DEPLOY_DIR_IPK}/sdk-provides-dummy-target/"
# Archive the sources for many architectures in one deploy folder
SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}"
-# Ignore overlapping README
-SSTATE_DUPWHITELIST += "${DEPLOY_DIR}/sdk/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt"
+# ovmf/grub-efi/systemd-boot/intel-microcode multilib recipes can generate identical overlapping files
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/ovmf"
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/grub-efi"
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/systemd-boot"
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/microcode"
-SSTATE_SCAN_FILES ?= "*.la *-config *_config"
-SSTATE_SCAN_CMD ?= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES", True).split())}" \) -type f'
+SSTATE_SCAN_FILES ?= "*.la *-config *_config postinst-*"
+SSTATE_SCAN_CMD ??= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES").split())}" \) -type f'
+SSTATE_SCAN_CMD_NATIVE ??= 'grep -Irl -e ${RECIPE_SYSROOT} -e ${RECIPE_SYSROOT_NATIVE} -e ${HOSTTOOLS_DIR} ${SSTATE_BUILDDIR}'
BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
@@ -46,17 +56,18 @@ SSTATE_ARCHS = " \
${SDK_ARCH}_${PACKAGE_ARCH} \
allarch \
${PACKAGE_ARCH} \
- ${MACHINE}"
+ ${PACKAGE_EXTRA_ARCHS} \
+ ${MACHINE_ARCH}"
SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
SSTATECREATEFUNCS = "sstate_hardcode_path"
+SSTATECREATEFUNCS[vardeps] = "SSTATE_SCAN_FILES"
SSTATEPOSTCREATEFUNCS = ""
SSTATEPREINSTFUNCS = ""
SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack"
SSTATEPOSTINSTFUNCS = ""
-EXTRA_STAGING_FIXMES ?= ""
-SSTATECLEANFUNCS = ""
+EXTRA_STAGING_FIXMES ?= "HOSTTOOLS_DIR"
# Check whether sstate exists for tasks that support sstate and are in the
# locked signatures file.
@@ -73,6 +84,18 @@ SSTATE_SIG_PASSPHRASE ?= ""
# Whether to verify the GnUPG signatures when extracting sstate archives
SSTATE_VERIFY_SIG ?= "0"
+SSTATE_HASHEQUIV_METHOD ?= "oe.sstatesig.OEOuthashBasic"
+SSTATE_HASHEQUIV_METHOD[doc] = "The fully-qualified function used to calculate \
+ the output hash for a task, which in turn is used to determine equivalency. \
+ "
+
+SSTATE_HASHEQUIV_REPORT_TASKDATA ?= "0"
+SSTATE_HASHEQUIV_REPORT_TASKDATA[doc] = "Report additional useful data to the \
+ hash equivalency server, such as PN, PV, taskname, etc. This information \
+ is very useful for developers looking at task data, but may leak sensitive \
+ data if the equivalence server is public. \
+ "
+
python () {
if bb.data.inherits_class('native', d):
d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False))
@@ -84,7 +107,7 @@ python () {
d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${SDK_OS}"))
elif bb.data.inherits_class('cross-canadian', d):
d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}"))
- elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH", True) == "all":
+ elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH") == "all":
d.setVar('SSTATE_PKGARCH', "allarch")
else:
d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))
@@ -92,15 +115,9 @@ python () {
if bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d):
d.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
d.setVar('BB_HASHFILENAME', "True ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}")
- d.setVar('SSTATE_EXTRAPATHWILDCARD', "*/")
+ d.setVar('SSTATE_EXTRAPATHWILDCARD', "${NATIVELSBSTRING}/")
- # These classes encode staging paths into their scripts data so can only be
- # reused if we manipulate the paths
- if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d) or bb.data.inherits_class('crosssdk', d):
- scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}"
- d.setVar('SSTATE_SCAN_CMD', scan_cmd)
-
- unique_tasks = sorted(set((d.getVar('SSTATETASKS', True) or "").split()))
+ unique_tasks = sorted(set((d.getVar('SSTATETASKS') or "").split()))
d.setVar('SSTATETASKS', " ".join(unique_tasks))
for task in unique_tasks:
d.prependVarFlag(task, 'prefuncs', "sstate_task_prefunc ")
@@ -118,19 +135,20 @@ def sstate_init(task, d):
def sstate_state_fromvars(d, task = None):
if task is None:
- task = d.getVar('BB_CURRENTTASK', True)
+ task = d.getVar('BB_CURRENTTASK')
if not task:
bb.fatal("sstate code running without task context?!")
task = task.replace("_setscene", "")
if task.startswith("do_"):
task = task[3:]
- inputs = (d.getVarFlag("do_" + task, 'sstate-inputdirs', True) or "").split()
- outputs = (d.getVarFlag("do_" + task, 'sstate-outputdirs', True) or "").split()
- plaindirs = (d.getVarFlag("do_" + task, 'sstate-plaindirs', True) or "").split()
- lockfiles = (d.getVarFlag("do_" + task, 'sstate-lockfile', True) or "").split()
- lockfilesshared = (d.getVarFlag("do_" + task, 'sstate-lockfile-shared', True) or "").split()
- interceptfuncs = (d.getVarFlag("do_" + task, 'sstate-interceptfuncs', True) or "").split()
+ inputs = (d.getVarFlag("do_" + task, 'sstate-inputdirs') or "").split()
+ outputs = (d.getVarFlag("do_" + task, 'sstate-outputdirs') or "").split()
+ plaindirs = (d.getVarFlag("do_" + task, 'sstate-plaindirs') or "").split()
+ lockfiles = (d.getVarFlag("do_" + task, 'sstate-lockfile') or "").split()
+ lockfilesshared = (d.getVarFlag("do_" + task, 'sstate-lockfile-shared') or "").split()
+ interceptfuncs = (d.getVarFlag("do_" + task, 'sstate-interceptfuncs') or "").split()
+ fixmedir = d.getVarFlag("do_" + task, 'sstate-fixmedir') or ""
if not task or len(inputs) != len(outputs):
bb.fatal("sstate variables not setup correctly?!")
@@ -146,6 +164,7 @@ def sstate_state_fromvars(d, task = None):
ss['lockfiles-shared'] = lockfilesshared
ss['plaindirs'] = plaindirs
ss['interceptfuncs'] = interceptfuncs
+ ss['fixmedir'] = fixmedir
return ss
def sstate_add(ss, source, dest, d):
@@ -195,15 +214,18 @@ def sstate_install(ss, d):
srcdir = os.path.join(walkroot, dir)
dstdir = srcdir.replace(state[1], state[2])
#bb.debug(2, "Staging %s to %s" % (srcdir, dstdir))
+ if os.path.islink(srcdir):
+ sharedfiles.append(dstdir)
+ continue
if not dstdir.endswith("/"):
dstdir = dstdir + "/"
shareddirs.append(dstdir)
# Check the file list for conflicts against files which already exist
- whitelist = (d.getVar("SSTATE_DUPWHITELIST", True) or "").split()
+ whitelist = (d.getVar("SSTATE_DUPWHITELIST") or "").split()
match = []
for f in sharedfiles:
- if os.path.exists(f):
+ if os.path.exists(f) and not os.path.islink(f):
f = os.path.normpath(f)
realmatch = True
for w in whitelist:
@@ -213,25 +235,27 @@ def sstate_install(ss, d):
break
if realmatch:
match.append(f)
- sstate_search_cmd = "grep -rl '%s' %s --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}"))
+ sstate_search_cmd = "grep -rlF '%s' %s --exclude=master.list | sed -e 's:^.*/::'" % (f, d.expand("${SSTATE_MANIFESTS}"))
search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
- if search_output != "":
- match.append("Matched in %s" % search_output.rstrip())
+ if search_output:
+ match.append(" (matched in %s)" % search_output.decode('utf-8').rstrip())
+ else:
+ match.append(" (not matched to any task)")
if match:
bb.error("The recipe %s is trying to install files into a shared " \
"area when those files already exist. Those files and their manifest " \
- "location are:\n %s\nPlease verify which recipe should provide the " \
- "above files.\nThe build has stopped as continuing in this scenario WILL " \
- "break things, if not now, possibly in the future (we've seen builds fail " \
+ "location are:\n %s\nPlease verify which recipe should provide the " \
+ "above files.\n\nThe build has stopped, as continuing in this scenario WILL " \
+ "break things - if not now, possibly in the future (we've seen builds fail " \
"several months later). If the system knew how to recover from this " \
- "automatically it would however there are several different scenarios " \
+ "automatically it would, however there are several different scenarios " \
"which can result in this and we don't know which one this is. It may be " \
"you have switched providers of something like virtual/kernel (e.g. from " \
"linux-yocto to linux-yocto-dev), in that case you need to execute the " \
"clean task for both recipes and it will resolve this error. It may be " \
"you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning " \
- "those recipes should again resolve this error however switching " \
- "DISTRO_FEATURES on an existing build directory is not supported, you " \
+ "those recipes should again resolve this error, however switching " \
+ "DISTRO_FEATURES on an existing build directory is not supported - you " \
"should really clean out tmp and rebuild (reusing sstate should be safe). " \
"It could be the overlapping files detected are harmless in which case " \
"adding them to SSTATE_DUPWHITELIST may be the correct solution. It could " \
@@ -239,9 +263,13 @@ def sstate_install(ss, d):
"things (e.g. bluez 4 and bluez 5 and the correct solution for that would " \
"be to resolve the conflict. If in doubt, please ask on the mailing list, " \
"sharing the error and filelist above." % \
- (d.getVar('PN', True), "\n ".join(match)))
+ (d.getVar('PN'), "\n ".join(match)))
bb.fatal("If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.")
+ if ss['fixmedir'] and os.path.exists(ss['fixmedir'] + "/fixmepath.cmd"):
+ sharedfiles.append(ss['fixmedir'] + "/fixmepath.cmd")
+ sharedfiles.append(ss['fixmedir'] + "/fixmepath")
+
# Write out the manifest
f = open(manifest, "w")
for file in sharedfiles:
@@ -260,7 +288,7 @@ def sstate_install(ss, d):
i = d2.expand("${SSTATE_MANIFESTS}/index-${SSTATE_MANMACH}")
l = bb.utils.lockfile(i + ".lock")
- filedata = d.getVar("STAMP", True) + " " + d2.getVar("SSTATE_MANFILEPREFIX", True) + " " + d.getVar("WORKDIR", True) + "\n"
+ filedata = d.getVar("STAMP") + " " + d2.getVar("SSTATE_MANFILEPREFIX") + " " + d.getVar("WORKDIR") + "\n"
manifests = []
if os.path.exists(i):
with open(i, "r") as f:
@@ -275,7 +303,7 @@ def sstate_install(ss, d):
if os.path.exists(state[1]):
oe.path.copyhardlinktree(state[1], state[2])
- for postinst in (d.getVar('SSTATEPOSTINSTFUNCS', True) or '').split():
+ for postinst in (d.getVar('SSTATEPOSTINSTFUNCS') or '').split():
# All hooks should run in the SSTATE_INSTDIR
bb.build.exec_func(postinst, d, (sstateinst,))
@@ -286,50 +314,73 @@ sstate_install[vardepsexclude] += "SSTATE_DUPWHITELIST STATE_MANMACH SSTATE_MANF
sstate_install[vardeps] += "${SSTATEPOSTINSTFUNCS}"
def sstate_installpkg(ss, d):
- import oe.path
- import subprocess
from oe.gpg_sign import get_signer
- def prepdir(dir):
- # remove dir if it exists, ensure any parent directories do exist
- if os.path.exists(dir):
- oe.path.remove(dir)
- bb.utils.mkdirhier(dir)
- oe.path.remove(dir)
-
sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['task'])
- sstatefetch = d.getVar('SSTATE_PKGNAME', True) + '_' + ss['task'] + ".tgz"
- sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['task'] + ".tgz"
+ sstatefetch = d.getVar('SSTATE_PKGNAME') + '_' + ss['task'] + ".tgz"
+ d.appendVar('SSTATE_PKG', '_'+ ss['task'] + ".tgz")
+ sstatepkg = d.getVar('SSTATE_PKG')
if not os.path.exists(sstatepkg):
- pstaging_fetch(sstatefetch, sstatepkg, d)
+ pstaging_fetch(sstatefetch, d)
if not os.path.isfile(sstatepkg):
- bb.note("Staging package %s does not exist" % sstatepkg)
+ bb.note("Sstate package %s does not exist" % sstatepkg)
return False
sstate_clean(ss, d)
d.setVar('SSTATE_INSTDIR', sstateinst)
- d.setVar('SSTATE_PKG', sstatepkg)
- if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG", True), False):
+ if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False):
signer = get_signer(d, 'local')
if not signer.verify(sstatepkg + '.sig'):
- bb.warn("Cannot verify signature on sstate package %s" % sstatepkg)
+ bb.warn("Cannot verify signature on sstate package %s, skipping acceleration..." % sstatepkg)
+ return False
+
+ # Empty sstateinst directory, ensure its clean
+ if os.path.exists(sstateinst):
+ oe.path.remove(sstateinst)
+ bb.utils.mkdirhier(sstateinst)
+
+ sstateinst = d.getVar("SSTATE_INSTDIR")
+ d.setVar('SSTATE_FIXMEDIR', ss['fixmedir'])
+
+ for f in (d.getVar('SSTATEPREINSTFUNCS') or '').split() + ['sstate_unpack_package']:
+ # All hooks should run in the SSTATE_INSTDIR
+ bb.build.exec_func(f, d, (sstateinst,))
+
+ return sstate_installpkgdir(ss, d)
+
+def sstate_installpkgdir(ss, d):
+ import oe.path
+ import subprocess
+
+ sstateinst = d.getVar("SSTATE_INSTDIR")
+ d.setVar('SSTATE_FIXMEDIR', ss['fixmedir'])
- for f in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split() + ['sstate_unpack_package'] + (d.getVar('SSTATEPOSTUNPACKFUNCS', True) or '').split():
+ for f in (d.getVar('SSTATEPOSTUNPACKFUNCS') or '').split():
# All hooks should run in the SSTATE_INSTDIR
bb.build.exec_func(f, d, (sstateinst,))
+ def prepdir(dir):
+ # remove dir if it exists, ensure any parent directories do exist
+ if os.path.exists(dir):
+ oe.path.remove(dir)
+ bb.utils.mkdirhier(dir)
+ oe.path.remove(dir)
+
for state in ss['dirs']:
prepdir(state[1])
os.rename(sstateinst + state[0], state[1])
sstate_install(ss, d)
for plain in ss['plaindirs']:
- workdir = d.getVar('WORKDIR', True)
+ workdir = d.getVar('WORKDIR')
+ sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared")
src = sstateinst + "/" + plain.replace(workdir, '')
+ if sharedworkdir in plain:
+ src = sstateinst + "/" + plain.replace(sharedworkdir, '')
dest = plain
bb.utils.mkdirhier(src)
prepdir(dest)
@@ -344,32 +395,44 @@ python sstate_hardcode_path_unpack () {
# sstate_hardcode_path(d)
import subprocess
- sstateinst = d.getVar('SSTATE_INSTDIR', True)
- fixmefn = sstateinst + "fixmepath"
+ sstateinst = d.getVar('SSTATE_INSTDIR')
+ sstatefixmedir = d.getVar('SSTATE_FIXMEDIR')
+ fixmefn = sstateinst + "fixmepath"
if os.path.isfile(fixmefn):
- staging = d.getVar('STAGING_DIR', True)
- staging_target = d.getVar('STAGING_DIR_TARGET', True)
- staging_host = d.getVar('STAGING_DIR_HOST', True)
-
- if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d):
- sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIR:%s:g'" % (staging)
- elif bb.data.inherits_class('cross', d):
- sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIR:%s:g'" % (staging_target, staging)
- else:
+ staging_target = d.getVar('RECIPE_SYSROOT')
+ staging_host = d.getVar('RECIPE_SYSROOT_NATIVE')
+
+ if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross-canadian', d):
sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host)
+ elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d):
+ sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (staging_target, staging_host)
+ else:
+ sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g'" % (staging_target)
- extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES', True) or ''
+ extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES') or ''
for fixmevar in extra_staging_fixmes.split():
- fixme_path = d.getVar(fixmevar, True)
+ fixme_path = d.getVar(fixmevar)
sstate_sed_cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
# Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed
sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd)
+ # Defer do_populate_sysroot relocation command
+ if sstatefixmedir:
+ bb.utils.mkdirhier(sstatefixmedir)
+ with open(sstatefixmedir + "/fixmepath.cmd", "w") as f:
+ sstate_hardcode_cmd = sstate_hardcode_cmd.replace(fixmefn, sstatefixmedir + "/fixmepath")
+ sstate_hardcode_cmd = sstate_hardcode_cmd.replace(sstateinst, "FIXMEFINALSSTATEINST")
+ sstate_hardcode_cmd = sstate_hardcode_cmd.replace(staging_host, "FIXMEFINALSSTATEHOST")
+ sstate_hardcode_cmd = sstate_hardcode_cmd.replace(staging_target, "FIXMEFINALSSTATETARGET")
+ f.write(sstate_hardcode_cmd)
+ bb.utils.copyfile(fixmefn, sstatefixmedir + "/fixmepath")
+ return
+
bb.note("Replacing fixme paths in sstate package: %s" % (sstate_hardcode_cmd))
- subprocess.call(sstate_hardcode_cmd, shell=True)
+ subprocess.check_call(sstate_hardcode_cmd, shell=True)
- # Need to remove this or we'd copy it into the target directory and may
+ # Need to remove this or we'd copy it into the target directory and may
# conflict with another writer
os.remove(fixmefn)
}
@@ -377,17 +440,18 @@ python sstate_hardcode_path_unpack () {
def sstate_clean_cachefile(ss, d):
import oe.path
- sstatepkgfile = d.getVar('SSTATE_PATHSPEC', True) + "*_" + ss['task'] + ".tgz*"
- bb.note("Removing %s" % sstatepkgfile)
- oe.path.remove(sstatepkgfile)
+ sstatepkgfile = d.getVar('SSTATE_PATHSPEC') + "*_" + ss['task'] + ".tgz*"
+ if d.getVarFlag('do_%s' % ss['task'], 'task'):
+ bb.note("Removing %s" % sstatepkgfile)
+ oe.path.remove(sstatepkgfile)
def sstate_clean_cachefiles(d):
- for task in (d.getVar('SSTATETASKS', True) or "").split():
+ for task in (d.getVar('SSTATETASKS') or "").split():
ld = d.createCopy()
ss = sstate_state_fromvars(ld, task)
sstate_clean_cachefile(ss, ld)
-def sstate_clean_manifest(manifest, d):
+def sstate_clean_manifest(manifest, d, prefix=None):
import oe.path
mfile = open(manifest)
@@ -396,6 +460,8 @@ def sstate_clean_manifest(manifest, d):
for entry in entries:
entry = entry.strip()
+ if prefix and not entry.startswith("/"):
+ entry = prefix + "/" + entry
bb.debug(2, "Removing manifest: %s" % entry)
# We can race against another package populating directories as we're removing them
# so we ignore errors here.
@@ -406,7 +472,7 @@ def sstate_clean_manifest(manifest, d):
elif os.path.exists(entry) and len(os.listdir(entry)) == 0:
os.rmdir(entry[:-1])
else:
- oe.path.remove(entry)
+ os.remove(entry)
except OSError:
pass
@@ -414,7 +480,7 @@ def sstate_clean_manifest(manifest, d):
if os.path.exists(manifest + ".postrm"):
import subprocess
os.chmod(postrm, 0o755)
- subprocess.call(postrm, shell=True)
+ subprocess.check_call(postrm, shell=True)
oe.path.remove(postrm)
oe.path.remove(manifest)
@@ -424,8 +490,8 @@ def sstate_clean(ss, d):
import glob
d2 = d.createCopy()
- stamp_clean = d.getVar("STAMPCLEAN", True)
- extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
+ stamp_clean = d.getVar("STAMPCLEAN")
+ extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info')
if extrainf:
d2.setVar("SSTATE_MANMACH", extrainf)
wildcard_stfile = "%s.do_%s*.%s" % (stamp_clean, ss['task'], extrainf)
@@ -457,7 +523,7 @@ def sstate_clean(ss, d):
rm_nohash = ".do_%s" % ss['task']
for stfile in glob.glob(wildcard_stfile):
# Keep the sigdata
- if ".sigdata." in stfile:
+ if ".sigdata." in stfile or ".sigbasedata." in stfile:
continue
# Preserve taint files in the stamps directory
if stfile.endswith('.taint'):
@@ -466,22 +532,18 @@ def sstate_clean(ss, d):
stfile.endswith(rm_nohash):
oe.path.remove(stfile)
- # Removes the users/groups created by the package
- for cleanfunc in (d.getVar('SSTATECLEANFUNCS', True) or '').split():
- bb.build.exec_func(cleanfunc, d)
-
sstate_clean[vardepsexclude] = "SSTATE_MANFILEPREFIX"
CLEANFUNCS += "sstate_cleanall"
python sstate_cleanall() {
- bb.note("Removing shared state for package %s" % d.getVar('PN', True))
+ bb.note("Removing shared state for package %s" % d.getVar('PN'))
- manifest_dir = d.getVar('SSTATE_MANIFESTS', True)
+ manifest_dir = d.getVar('SSTATE_MANIFESTS')
if not os.path.exists(manifest_dir):
return
- tasks = d.getVar('SSTATETASKS', True).split()
+ tasks = d.getVar('SSTATETASKS').split()
for name in tasks:
ld = d.createCopy()
shared_state = sstate_state_fromvars(ld, name)
@@ -497,29 +559,29 @@ python sstate_hardcode_path () {
# Note: the logic in this function needs to match the reverse logic
# in sstate_installpkg(ss, d)
- staging = d.getVar('STAGING_DIR', True)
- staging_target = d.getVar('STAGING_DIR_TARGET', True)
- staging_host = d.getVar('STAGING_DIR_HOST', True)
- sstate_builddir = d.getVar('SSTATE_BUILDDIR', True)
+ staging_target = d.getVar('RECIPE_SYSROOT')
+ staging_host = d.getVar('RECIPE_SYSROOT_NATIVE')
+ sstate_builddir = d.getVar('SSTATE_BUILDDIR')
- if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d):
- sstate_grep_cmd = "grep -l -e '%s'" % (staging)
- sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIR:g'" % (staging)
- elif bb.data.inherits_class('cross', d):
- sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging)
- sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIR:g'" % (staging_target, staging)
- else:
+ sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % staging_host
+ if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross-canadian', d):
sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
- sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
+ elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d):
+ sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host)
+ sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target
+ else:
+ sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host)
+ sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target
- extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES', True) or ''
+ extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES') or ''
for fixmevar in extra_staging_fixmes.split():
- fixme_path = d.getVar(fixmevar, True)
+ fixme_path = d.getVar(fixmevar)
sstate_sed_cmd += " -e 's:%s:FIXME_%s:g'" % (fixme_path, fixmevar)
+ sstate_grep_cmd += " -e '%s'" % (fixme_path)
fixmefn = sstate_builddir + "fixmepath"
- sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)
+ sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD')
sstate_filelist_cmd = "tee %s" % (fixmefn)
# fixmepath file needs relative paths, drop sstate_builddir prefix
@@ -534,96 +596,87 @@ python sstate_hardcode_path () {
sstate_hardcode_cmd = "%s | xargs %s | %s | xargs %s %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, xargs_no_empty_run_cmd, sstate_sed_cmd)
bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd))
- subprocess.call(sstate_hardcode_cmd, shell=True)
+ subprocess.check_output(sstate_hardcode_cmd, shell=True, cwd=sstate_builddir)
# If the fixmefn is empty, remove it..
if os.stat(fixmefn).st_size == 0:
os.remove(fixmefn)
else:
bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd))
- subprocess.call(sstate_filelist_relative_cmd, shell=True)
+ subprocess.check_output(sstate_filelist_relative_cmd, shell=True)
}
def sstate_package(ss, d):
import oe.path
- def make_relative_symlink(path, outputpath, d):
- # Replace out absolute TMPDIR paths in symlinks with relative ones
- if not os.path.islink(path):
- return
- link = os.readlink(path)
- if not os.path.isabs(link):
- return
- if not link.startswith(tmpdir):
- return
-
- depth = outputpath.rpartition(tmpdir)[2].count('/')
- base = link.partition(tmpdir)[2].strip()
- while depth > 1:
- base = "/.." + base
- depth -= 1
- base = "." + base
-
- bb.debug(2, "Replacing absolute path %s with relative path %s for %s" % (link, base, outputpath))
- os.remove(path)
- os.symlink(base, path)
-
- tmpdir = d.getVar('TMPDIR', True)
+ tmpdir = d.getVar('TMPDIR')
sstatebuild = d.expand("${WORKDIR}/sstate-build-%s/" % ss['task'])
- sstatepkg = d.getVar('SSTATE_PKG', True) + '_'+ ss['task'] + ".tgz"
+ d.appendVar('SSTATE_PKG', '_'+ ss['task'] + ".tgz")
bb.utils.remove(sstatebuild, recurse=True)
bb.utils.mkdirhier(sstatebuild)
- bb.utils.mkdirhier(os.path.dirname(sstatepkg))
for state in ss['dirs']:
if not os.path.exists(state[1]):
continue
- if d.getVar('SSTATE_SKIP_CREATION', True) == '1':
- continue
srcbase = state[0].rstrip("/").rsplit('/', 1)[0]
+ # Find and error for absolute symlinks. We could attempt to relocate but its not
+ # clear where the symlink is relative to in this context. We could add that markup
+ # to sstate tasks but there aren't many of these so better just avoid them entirely.
for walkroot, dirs, files in os.walk(state[1]):
- for file in files:
+ for file in files + dirs:
srcpath = os.path.join(walkroot, file)
- dstpath = srcpath.replace(state[1], state[2])
- make_relative_symlink(srcpath, dstpath, d)
- for dir in dirs:
- srcpath = os.path.join(walkroot, dir)
- dstpath = srcpath.replace(state[1], state[2])
- make_relative_symlink(srcpath, dstpath, d)
+ if not os.path.islink(srcpath):
+ continue
+ link = os.readlink(srcpath)
+ if not os.path.isabs(link):
+ continue
+ if not link.startswith(tmpdir):
+ continue
+ bb.error("sstate found an absolute path symlink %s pointing at %s. Please replace this with a relative link." % (srcpath, link))
bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0]))
- oe.path.copyhardlinktree(state[1], sstatebuild + state[0])
+ os.rename(state[1], sstatebuild + state[0])
- workdir = d.getVar('WORKDIR', True)
+ workdir = d.getVar('WORKDIR')
+ sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared")
for plain in ss['plaindirs']:
pdir = plain.replace(workdir, sstatebuild)
+ if sharedworkdir in plain:
+ pdir = plain.replace(sharedworkdir, sstatebuild)
bb.utils.mkdirhier(plain)
bb.utils.mkdirhier(pdir)
- oe.path.copyhardlinktree(plain, pdir)
+ os.rename(plain, pdir)
d.setVar('SSTATE_BUILDDIR', sstatebuild)
- d.setVar('SSTATE_PKG', sstatepkg)
+ d.setVar('SSTATE_INSTDIR', sstatebuild)
- for f in (d.getVar('SSTATECREATEFUNCS', True) or '').split() + \
- ['sstate_create_package', 'sstate_sign_package'] + \
- (d.getVar('SSTATEPOSTCREATEFUNCS', True) or '').split():
+ if d.getVar('SSTATE_SKIP_CREATION') == '1':
+ return
+
+ sstate_create_package = ['sstate_report_unihash', 'sstate_create_package']
+ if d.getVar('SSTATE_SIG_KEY'):
+ sstate_create_package.append('sstate_sign_package')
+
+ for f in (d.getVar('SSTATECREATEFUNCS') or '').split() + \
+ sstate_create_package + \
+ (d.getVar('SSTATEPOSTCREATEFUNCS') or '').split():
# All hooks should run in SSTATE_BUILDDIR.
bb.build.exec_func(f, d, (sstatebuild,))
- bb.siggen.dump_this_task(sstatepkg + ".siginfo", d)
+ # SSTATE_PKG may have been changed by sstate_report_unihash
+ bb.siggen.dump_this_task(d.getVar('SSTATE_PKG') + ".siginfo", d)
return
-def pstaging_fetch(sstatefetch, sstatepkg, d):
+def pstaging_fetch(sstatefetch, d):
import bb.fetch2
# Only try and fetch if the user has configured a mirror
- mirrors = d.getVar('SSTATE_MIRRORS', True)
+ mirrors = d.getVar('SSTATE_MIRRORS')
if not mirrors:
return
# Copy the data object and override DL_DIR and SRC_URI
localdata = bb.data.createCopy(d)
- bb.data.update_data(localdata)
dldir = localdata.expand("${SSTATE_DIR}")
bb.utils.mkdirhier(dldir)
@@ -635,14 +688,15 @@ def pstaging_fetch(sstatefetch, sstatepkg, d):
# if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK,
# we'll want to allow network access for the current set of fetches.
- if localdata.getVar('BB_NO_NETWORK', True) == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK', True) == "1":
+ if bb.utils.to_boolean(localdata.getVar('BB_NO_NETWORK')) and \
+ bb.utils.to_boolean(localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK')):
localdata.delVar('BB_NO_NETWORK')
# Try a fetch from the sstate mirror, if it fails just return and
# we will build the package
uris = ['file://{0};downloadfilename={0}'.format(sstatefetch),
'file://{0}.siginfo;downloadfilename={0}.siginfo'.format(sstatefetch)]
- if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG", True), False):
+ if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False):
uris += ['file://{0}.sig;downloadfilename={0}.sig'.format(sstatefetch)]
for srcuri in uris:
@@ -658,7 +712,7 @@ def sstate_setscene(d):
shared_state = sstate_state_fromvars(d)
accelerate = sstate_installpkg(shared_state, d)
if not accelerate:
- raise bb.build.FuncFailed("No suitable staging package found")
+ bb.fatal("No suitable staging package found")
python sstate_task_prefunc () {
shared_state = sstate_state_fromvars(d)
@@ -669,14 +723,21 @@ sstate_task_prefunc[dirs] = "${WORKDIR}"
python sstate_task_postfunc () {
shared_state = sstate_state_fromvars(d)
- sstate_install(shared_state, d)
for intercept in shared_state['interceptfuncs']:
- bb.build.exec_func(intercept, d, (d.getVar("WORKDIR", True),))
+ bb.build.exec_func(intercept, d, (d.getVar("WORKDIR"),))
+
omask = os.umask(0o002)
if omask != 0o002:
bb.note("Using umask 0o002 (not %0o) for sstate packaging" % omask)
sstate_package(shared_state, d)
os.umask(omask)
+
+ sstateinst = d.getVar("SSTATE_INSTDIR")
+ d.setVar('SSTATE_FIXMEDIR', shared_state['fixmedir'])
+
+ sstate_installpkgdir(shared_state, d)
+
+ bb.utils.remove(d.getVar("SSTATE_BUILDDIR"), recurse=True)
}
sstate_task_postfunc[dirs] = "${WORKDIR}"
@@ -686,36 +747,59 @@ sstate_task_postfunc[dirs] = "${WORKDIR}"
# set as SSTATE_BUILDDIR. Will be run from within SSTATE_BUILDDIR.
#
sstate_create_package () {
+ # Exit early if it already exists
+ if [ -e ${SSTATE_PKG} ]; then
+ return
+ fi
+
+ mkdir -p `dirname ${SSTATE_PKG}`
TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
+
+ # Use pigz if available
+ OPT="-czS"
+ if [ -x "$(command -v pigz)" ]; then
+ OPT="-I pigz -cS"
+ fi
+
# Need to handle empty directories
if [ "$(ls -A)" ]; then
set +e
- tar -czf $TFILE *
+ tar $OPT -f $TFILE *
ret=$?
if [ $ret -ne 0 ] && [ $ret -ne 1 ]; then
exit 1
fi
set -e
else
- tar -cz --file=$TFILE --files-from=/dev/null
+ tar $OPT --file=$TFILE --files-from=/dev/null
fi
chmod 0664 $TFILE
- mv -f $TFILE ${SSTATE_PKG}
-
- cd ${WORKDIR}
- rm -rf ${SSTATE_BUILDDIR}
+ # Skip if it was already created by some other process
+ if [ ! -e ${SSTATE_PKG} ]; then
+ mv -f $TFILE ${SSTATE_PKG}
+ else
+ rm $TFILE
+ fi
}
python sstate_sign_package () {
from oe.gpg_sign import get_signer
- if d.getVar('SSTATE_SIG_KEY', True):
- signer = get_signer(d, 'local')
- sstate_pkg = d.getVar('SSTATE_PKG', True)
- if os.path.exists(sstate_pkg + '.sig'):
- os.unlink(sstate_pkg + '.sig')
- signer.detach_sign(sstate_pkg, d.getVar('SSTATE_SIG_KEY', False), None,
- d.getVar('SSTATE_SIG_PASSPHRASE', True), armor=False)
+
+ signer = get_signer(d, 'local')
+ sstate_pkg = d.getVar('SSTATE_PKG')
+ if os.path.exists(sstate_pkg + '.sig'):
+ os.unlink(sstate_pkg + '.sig')
+ signer.detach_sign(sstate_pkg, d.getVar('SSTATE_SIG_KEY', False), None,
+ d.getVar('SSTATE_SIG_PASSPHRASE'), armor=False)
+}
+
+python sstate_report_unihash() {
+ report_unihash = getattr(bb.parse.siggen, 'report_unihash', None)
+
+ if report_unihash:
+ ss = sstate_state_fromvars(d)
+ report_unihash(os.getcwd(), ss['task'], d)
}
#
@@ -724,6 +808,8 @@ python sstate_sign_package () {
#
sstate_unpack_package () {
tar -xvzf ${SSTATE_PKG}
+ # update .siginfo atime on local/NFS mirror
+ [ -w ${SSTATE_PKG}.siginfo ] && [ -h ${SSTATE_PKG}.siginfo ] && touch -a ${SSTATE_PKG}.siginfo
# Use "! -w ||" to return true for read only files
[ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
[ ! -w ${SSTATE_PKG}.sig ] || [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig
@@ -732,25 +818,26 @@ sstate_unpack_package () {
BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
-def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
-
- ret = []
- missed = []
- missing = []
+def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, **kwargs):
+ found = set()
+ missed = set()
extension = ".tgz"
if siginfo:
extension = extension + ".siginfo"
+ def gethash(task):
+ return sq_data['unihash'][task]
+
def getpathcomponents(task, d):
# Magic data from BB_HASHFILENAME
- splithashfn = sq_hashfn[task].split(" ")
+ splithashfn = sq_data['hashfn'][task].split(" ")
spec = splithashfn[1]
if splithashfn[0] == "True":
- extrapath = d.getVar("NATIVELSBSTRING", True) + "/"
+ extrapath = d.getVar("NATIVELSBSTRING") + "/"
else:
extrapath = ""
-
- tname = sq_task[task][3:]
+
+ tname = bb.runqueue.taskname_from_tid(task)[3:]
if tname in ["fetch", "unpack", "patch", "populate_lic", "preconfigure"] and splithashfn[2]:
spec = splithashfn[2]
@@ -758,38 +845,25 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
return spec, extrapath, tname
- def sstate_pkg_to_pn(pkg, d):
- """
- Translate an sstate filename to a PN value by way of SSTATE_PKGSPEC. This is slightly hacky but
- we don't have access to everything in this context.
- """
- pkgspec = d.getVar('SSTATE_PKGSPEC', False)
- try:
- idx = pkgspec.split(':').index('${PN}')
- except ValueError:
- bb.fatal('Unable to find ${PN} in SSTATE_PKGSPEC')
- return pkg.split(':')[idx]
-
- for task in range(len(sq_fn)):
+ for tid in sq_data['hash']:
- spec, extrapath, tname = getpathcomponents(task, d)
+ spec, extrapath, tname = getpathcomponents(tid, d)
- sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + extension)
+ sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, gethash(tid), d) + "_" + tname + extension)
if os.path.exists(sstatefile):
bb.debug(2, "SState: Found valid sstate file %s" % sstatefile)
- ret.append(task)
+ found.add(tid)
continue
else:
- missed.append(task)
+ missed.add(tid)
bb.debug(2, "SState: Looked for but didn't find file %s" % sstatefile)
- mirrors = d.getVar("SSTATE_MIRRORS", True)
+ mirrors = d.getVar("SSTATE_MIRRORS")
if mirrors:
# Copy the data object and override DL_DIR and SRC_URI
localdata = bb.data.createCopy(d)
- bb.data.update_data(localdata)
dldir = localdata.expand("${SSTATE_DIR}")
localdata.delVar('MIRRORS')
@@ -801,11 +875,10 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
# if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK,
# we'll want to allow network access for the current set of fetches.
- if localdata.getVar('BB_NO_NETWORK', True) == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK', True) == "1":
+ if bb.utils.to_boolean(localdata.getVar('BB_NO_NETWORK')) and \
+ bb.utils.to_boolean(localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK')):
localdata.delVar('BB_NO_NETWORK')
- whitelist = bb.runqueue.get_setscene_enforce_whitelist(d)
-
from bb.fetch2 import FetchConnectionCache
def checkstatus_init(thread_worker):
thread_worker.connection_cache = FetchConnectionCache()
@@ -814,7 +887,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
thread_worker.connection_cache.close_connections()
def checkstatus(thread_worker, arg):
- (task, sstatefile) = arg
+ (tid, sstatefile) = arg
localdata2 = bb.data.createCopy(localdata)
srcuri = "file://" + sstatefile
@@ -826,82 +899,103 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
connection_cache=thread_worker.connection_cache)
fetcher.checkstatus()
bb.debug(2, "SState: Successful fetch test for %s" % srcuri)
- ret.append(task)
- if task in missed:
- missed.remove(task)
+ found.add(tid)
+ if tid in missed:
+ missed.remove(tid)
except:
- missed.append(task)
+ missed.add(tid)
bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
- if whitelist:
- pn = sstate_pkg_to_pn(sstatefile, d)
- taskname = sq_task[task]
- if not bb.runqueue.check_setscene_enforce_whitelist(pn, taskname, whitelist):
- missing.append(task)
- bb.error('Sstate artifact unavailable for %s.%s' % (pn, taskname))
pass
- bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d)
+ bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
tasklist = []
- for task in range(len(sq_fn)):
- if task in ret:
+ for tid in sq_data['hash']:
+ if tid in found:
continue
- spec, extrapath, tname = getpathcomponents(task, d)
- sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + extension)
- tasklist.append((task, sstatefile))
+ spec, extrapath, tname = getpathcomponents(tid, d)
+ sstatefile = d.expand(extrapath + generate_sstatefn(spec, gethash(tid), d) + "_" + tname + extension)
+ tasklist.append((tid, sstatefile))
if tasklist:
- bb.event.fire(bb.event.ProcessStarted("Checking sstate mirror object availability", len(tasklist)), d)
+ msg = "Checking sstate mirror object availability"
+ bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
+
import multiprocessing
nproc = min(multiprocessing.cpu_count(), len(tasklist))
+ bb.event.enable_threadlock()
pool = oe.utils.ThreadedPool(nproc, len(tasklist),
worker_init=checkstatus_init, worker_end=checkstatus_end)
for t in tasklist:
pool.add_task(checkstatus, t)
pool.start()
pool.wait_completion()
- bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d)
- if whitelist and missing:
- bb.fatal('Required artifacts were unavailable - exiting')
+ bb.event.disable_threadlock()
+
+ bb.event.fire(bb.event.ProcessFinished(msg), d)
+
+ # Likely checking an individual task hash again for multiconfig sharing of sstate tasks so skip reporting
+ if len(sq_data['hash']) == 1:
+ return found
- inheritlist = d.getVar("INHERIT", True)
+ inheritlist = d.getVar("INHERIT")
if "toaster" in inheritlist:
evdata = {'missed': [], 'found': []};
- for task in missed:
- spec, extrapath, tname = getpathcomponents(task, d)
- sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + ".tgz")
- evdata['missed'].append( (sq_fn[task], sq_task[task], sq_hash[task], sstatefile ) )
- for task in ret:
- spec, extrapath, tname = getpathcomponents(task, d)
- sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + ".tgz")
- evdata['found'].append( (sq_fn[task], sq_task[task], sq_hash[task], sstatefile ) )
+ for tid in missed:
+ spec, extrapath, tname = getpathcomponents(tid, d)
+ sstatefile = d.expand(extrapath + generate_sstatefn(spec, gethash(tid), d) + "_" + tname + ".tgz")
+ evdata['missed'].append((bb.runqueue.fn_from_tid(tid), bb.runqueue.taskname_from_tid(tid), gethash(tid), sstatefile ) )
+ for tid in found:
+ spec, extrapath, tname = getpathcomponents(tid, d)
+ sstatefile = d.expand(extrapath + generate_sstatefn(spec, gethash(tid), d) + "_" + tname + ".tgz")
+ evdata['found'].append((bb.runqueue.fn_from_tid(tid), bb.runqueue.taskname_from_tid(tid), gethash(tid), sstatefile ) )
bb.event.fire(bb.event.MetadataEvent("MissedSstate", evdata), d)
+ if summary:
+ # Print some summary statistics about the current task completion and how much sstate
+ # reuse there was. Avoid divide by zero errors.
+ total = len(sq_data['hash'])
+ complete = 0
+ if currentcount:
+ complete = (len(found) + currentcount) / (total + currentcount) * 100
+ match = 0
+ if total:
+ match = len(found) / total * 100
+ bb.plain("Sstate summary: Wanted %d Found %d Missed %d Current %d (%d%% match, %d%% complete)" % (total, len(found), len(missed), currentcount, match, complete))
+
if hasattr(bb.parse.siggen, "checkhashes"):
- bb.parse.siggen.checkhashes(missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d)
+ bb.parse.siggen.checkhashes(sq_data, missed, found, d)
- return ret
+ return found
BB_SETSCENE_DEPVALID = "setscene_depvalid"
-def setscene_depvalid(task, taskdependees, notneeded, d):
+def setscene_depvalid(task, taskdependees, notneeded, d, log=None):
# taskdependees is a dict of tasks which depend on task, each being a 3 item list of [PN, TASKNAME, FILENAME]
# task is included in taskdependees too
+ # Return - False - We need this dependency
+ # - True - We can skip this dependency
+ import re
- bb.debug(2, "Considering setscene task: %s" % (str(taskdependees[task])))
+ def logit(msg, log):
+ if log is not None:
+ log.append(msg)
+ else:
+ bb.debug(2, msg)
- def isNativeCross(x):
- return x.endswith("-native") or "-cross-" in x or "-crosssdk" in x
+ logit("Considering setscene task: %s" % (str(taskdependees[task])), log)
- def isPostInstDep(x):
- if x in ["qemu-native", "gdk-pixbuf-native", "qemuwrapper-cross", "depmodwrapper-cross", "systemd-systemctl-native", "gtk-icon-utils-native", "ca-certificates-native"]:
- return True
- return False
+ def isNativeCross(x):
+ return x.endswith("-native") or "-cross-" in x or "-crosssdk" in x or x.endswith("-cross")
# We only need to trigger populate_lic through direct dependencies
if taskdependees[task][1] == "do_populate_lic":
return True
+ # stash_locale and gcc_stash_builddir are never needed as a dependency for built objects
+ if taskdependees[task][1] == "do_stash_locale" or taskdependees[task][1] == "do_gcc_stash_builddir":
+ return True
+
# We only need to trigger packagedata through direct dependencies
# but need to preserve packagedata on packagedata links
if taskdependees[task][1] == "do_packagedata":
@@ -911,7 +1005,7 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
return True
for dep in taskdependees:
- bb.debug(2, " considering dependency: %s" % (str(taskdependees[dep])))
+ logit(" considering dependency: %s" % (str(taskdependees[dep])), log)
if task == dep:
continue
if dep in notneeded:
@@ -919,10 +1013,11 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
# do_package_write_* and do_package doesn't need do_package
if taskdependees[task][1] == "do_package" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package_qa']:
continue
- # do_package_write_* and do_package doesn't need do_populate_sysroot, unless is a postinstall dependency
- if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package_qa']:
- if isPostInstDep(taskdependees[task][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm']:
- return False
+ # do_package_write_* need do_populate_sysroot as they're mainly postinstall dependencies
+ if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm']:
+ return False
+ # do_package/packagedata/package_qa don't need do_populate_sysroot
+ if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package', 'do_packagedata', 'do_package_qa']:
continue
# Native/Cross packages don't exist and are noexec anyway
if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package', 'do_package_qa']:
@@ -935,11 +1030,24 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
# Consider sysroot depending on sysroot tasks
if taskdependees[task][1] == 'do_populate_sysroot' and taskdependees[dep][1] == 'do_populate_sysroot':
- # base-passwd/shadow-sysroot don't need their dependencies
- if taskdependees[dep][0].endswith(("base-passwd", "shadow-sysroot")):
- continue
- # Nothing need depend on libc-initial/gcc-cross-initial
- if "-initial" in taskdependees[task][0]:
+ # Allow excluding certain recursive dependencies. If a recipe needs it should add a
+ # specific dependency itself, rather than relying on one of its dependees to pull
+ # them in.
+ # See also http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html
+ not_needed = False
+ excludedeps = d.getVar('_SSTATE_EXCLUDEDEPS_SYSROOT')
+ if excludedeps is None:
+ # Cache the regular expressions for speed
+ excludedeps = []
+ for excl in (d.getVar('SSTATE_EXCLUDEDEPS_SYSROOT') or "").split():
+ excludedeps.append((re.compile(excl.split('->', 1)[0]), re.compile(excl.split('->', 1)[1])))
+ d.setVar('_SSTATE_EXCLUDEDEPS_SYSROOT', excludedeps)
+ for excl in excludedeps:
+ if excl[0].match(taskdependees[dep][0]):
+ if excl[1].match(taskdependees[task][0]):
+ not_needed = True
+ break
+ if not_needed:
continue
# For meta-extsdk-toolchain we want all sysroot dependencies
if taskdependees[dep][0] == 'meta-extsdk-toolchain':
@@ -951,7 +1059,8 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
if isNativeCross(taskdependees[dep][0]):
return False
# Native/cross tools depended upon by target sysroot are not needed
- if isNativeCross(taskdependees[task][0]):
+ # Add an exception for shadow-native as required by useradd.bbclass
+ if isNativeCross(taskdependees[task][0]) and taskdependees[task][0] != 'shadow-native':
continue
# Target populate_sysroot need their dependencies
return False
@@ -964,7 +1073,7 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
# Safe fallthrough default
- bb.debug(2, " Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep])))
+ logit(" Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep])), log)
return False
return True
@@ -973,19 +1082,19 @@ sstate_eventhandler[eventmask] = "bb.build.TaskSucceeded"
python sstate_eventhandler() {
d = e.data
# When we write an sstate package we rewrite the SSTATE_PKG
- spkg = d.getVar('SSTATE_PKG', True)
+ spkg = d.getVar('SSTATE_PKG')
if not spkg.endswith(".tgz"):
- taskname = d.getVar("BB_RUNTASK", True)[3:]
- spec = d.getVar('SSTATE_PKGSPEC', True)
- swspec = d.getVar('SSTATE_SWSPEC', True)
+ taskname = d.getVar("BB_RUNTASK")[3:]
+ spec = d.getVar('SSTATE_PKGSPEC')
+ swspec = d.getVar('SSTATE_SWSPEC')
if taskname in ["fetch", "unpack", "patch", "populate_lic", "preconfigure"] and swspec:
d.setVar("SSTATE_PKGSPEC", "${SSTATE_SWSPEC}")
d.setVar("SSTATE_EXTRAPATH", "")
- sstatepkg = d.getVar('SSTATE_PKG', True)
+ sstatepkg = d.getVar('SSTATE_PKG')
bb.siggen.dump_this_task(sstatepkg + '_' + taskname + ".tgz" ".siginfo", d)
}
-SSTATE_PRUNE_OBSOLETEWORKDIR = "1"
+SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1"
# Event handler which removes manifests and stamps file for
# recipes which are no longer reachable in a build where they
@@ -999,8 +1108,23 @@ python sstate_eventhandler2() {
d = e.data
stamps = e.stamps.values()
removeworkdir = (d.getVar("SSTATE_PRUNE_OBSOLETEWORKDIR", False) == "1")
+ preservestampfile = d.expand('${SSTATE_MANIFESTS}/preserve-stamps')
+ preservestamps = []
+ if os.path.exists(preservestampfile):
+ with open(preservestampfile, 'r') as f:
+ preservestamps = f.readlines()
seen = []
- for a in d.getVar("SSTATE_ARCHS", True).split():
+
+ # The machine index contains all the stamps this machine has ever seen in this build directory.
+ # We should only remove things which this machine once accessed but no longer does.
+ machineindex = set()
+ bb.utils.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
+ mi = d.expand("${SSTATE_MANIFESTS}/index-machine-${MACHINE}")
+ if os.path.exists(mi):
+ with open(mi, "r") as f:
+ machineindex = set(line.strip() for line in f.readlines())
+
+ for a in sorted(list(set(d.getVar("SSTATE_ARCHS").split()))):
toremove = []
i = d.expand("${SSTATE_MANIFESTS}/index-" + a)
if not os.path.exists(i):
@@ -1008,27 +1132,44 @@ python sstate_eventhandler2() {
with open(i, "r") as f:
lines = f.readlines()
for l in lines:
- (stamp, manifest, workdir) = l.split()
- if stamp not in stamps:
- toremove.append(l)
- if stamp not in seen:
- bb.debug(2, "Stamp %s is not reachable, removing related manifests" % stamp)
- seen.append(stamp)
+ try:
+ (stamp, manifest, workdir) = l.split()
+ if stamp not in stamps and stamp not in preservestamps and stamp in machineindex:
+ toremove.append(l)
+ if stamp not in seen:
+ bb.debug(2, "Stamp %s is not reachable, removing related manifests" % stamp)
+ seen.append(stamp)
+ except ValueError:
+ bb.fatal("Invalid line '%s' in sstate manifest '%s'" % (l, i))
if toremove:
- bb.note("There are %d recipes to be removed from sysroot %s, removing..." % (len(toremove), a))
+ msg = "Removing %d recipes from the %s sysroot" % (len(toremove), a)
+ bb.event.fire(bb.event.ProcessStarted(msg, len(toremove)), d)
+
+ removed = 0
+ for r in toremove:
+ (stamp, manifest, workdir) = r.split()
+ for m in glob.glob(manifest + ".*"):
+ if m.endswith(".postrm"):
+ continue
+ sstate_clean_manifest(m, d)
+ bb.utils.remove(stamp + "*")
+ if removeworkdir:
+ bb.utils.remove(workdir, recurse = True)
+ lines.remove(r)
+ removed = removed + 1
+ bb.event.fire(bb.event.ProcessProgress(msg, removed), d)
+
+ bb.event.fire(bb.event.ProcessFinished(msg), d)
- for r in toremove:
- (stamp, manifest, workdir) = r.split()
- for m in glob.glob(manifest + ".*"):
- if m.endswith(".postrm"):
- continue
- sstate_clean_manifest(m, d)
- bb.utils.remove(stamp + "*")
- if removeworkdir:
- bb.utils.remove(workdir, recurse = True)
- lines.remove(r)
with open(i, "w") as f:
for l in lines:
f.write(l)
+ machineindex |= set(stamps)
+ with open(mi, "w") as f:
+ for l in machineindex:
+ f.write(l + "\n")
+
+ if preservestamps:
+ os.remove(preservestampfile)
}
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index a0b09a00bd..7e108950f5 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -27,10 +27,12 @@ SYSROOT_DIRS_BLACKLIST = " \
${mandir} \
${docdir} \
${infodir} \
- ${datadir}/locale \
${datadir}/applications \
${datadir}/fonts \
+ ${datadir}/gtk-doc/html \
+ ${datadir}/locale \
${datadir}/pixmaps \
+ ${libdir}/${PN}/ptest \
"
sysroot_stage_dir() {
@@ -67,101 +69,19 @@ sysroot_stage_all() {
}
python sysroot_strip () {
- import stat, errno
-
- dvar = d.getVar('SYSROOT_DESTDIR', True)
- pn = d.getVar('PN', True)
-
- os.chdir(dvar)
-
- # Return type (bits):
- # 0 - not elf
- # 1 - ELF
- # 2 - stripped
- # 4 - executable
- # 8 - shared library
- # 16 - kernel module
- def isELF(path):
- type = 0
- ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
-
- if ret:
- bb.error("split_and_strip_files: 'file %s' failed" % path)
- return type
-
- # Not stripped
- if "ELF" in result:
- type |= 1
- if "not stripped" not in result:
- type |= 2
- if "executable" in result:
- type |= 4
- if "shared" in result:
- type |= 8
- return type
-
-
- elffiles = {}
- inodes = {}
- libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
- baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
- if (d.getVar('INHIBIT_SYSROOT_STRIP', True) != '1'):
- #
- # First lets figure out all of the files we may have to process
- #
- for root, dirs, files in os.walk(dvar):
- for f in files:
- file = os.path.join(root, f)
-
- try:
- ltarget = oe.path.realpath(file, dvar, False)
- s = os.lstat(ltarget)
- except OSError as e:
- (err, strerror) = e.args
- if err != errno.ENOENT:
- raise
- # Skip broken symlinks
- continue
- if not s:
- continue
- # Check its an excutable
- if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
- or ((file.startswith(libdir) or file.startswith(baselibdir)) and ".so" in f):
- # If it's a symlink, and points to an ELF file, we capture the readlink target
- if os.path.islink(file):
- continue
-
- # It's a file (or hardlink), not a link
- # ...but is it ELF, and is it already stripped?
- elf_file = isELF(file)
- if elf_file & 1:
- if elf_file & 2:
- if 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
- bb.note("Skipping file %s from %s for already-stripped QA test" % (file[len(dvar):], pn))
- else:
- bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn))
- continue
-
- if s.st_ino in inodes:
- os.unlink(file)
- os.link(inodes[s.st_ino], file)
- else:
- inodes[s.st_ino] = file
- # break hardlink
- bb.utils.copyfile(file, file)
- elffiles[file] = elf_file
-
- #
- # Now strip them (in parallel)
- #
- strip = d.getVar("STRIP", True)
- sfiles = []
- for file in elffiles:
- elf_file = int(elffiles[file])
- #bb.note("Strip %s" % file)
- sfiles.append((file, elf_file, strip))
-
- oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
+ inhibit_sysroot = d.getVar('INHIBIT_SYSROOT_STRIP')
+ if inhibit_sysroot and oe.types.boolean(inhibit_sysroot):
+ return
+
+ dstdir = d.getVar('SYSROOT_DESTDIR')
+ pn = d.getVar('PN')
+ libdir = d.getVar("libdir")
+ base_libdir = d.getVar("base_libdir")
+ qa_already_stripped = 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn) or "").split()
+ strip_cmd = d.getVar("STRIP")
+
+ oe.package.strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d,
+ qa_already_stripped=qa_already_stripped)
}
do_populate_sysroot[dirs] = "${SYSROOT_DESTDIR}"
@@ -171,54 +91,17 @@ addtask populate_sysroot after do_install
SYSROOT_PREPROCESS_FUNCS ?= ""
SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir"
-SYSROOT_LOCK = "${STAGING_DIR}/staging.lock"
-
-# We clean out any existing sstate from the sysroot if we rerun configure
-python sysroot_cleansstate () {
- ss = sstate_state_fromvars(d, "populate_sysroot")
- sstate_clean(ss, d)
-}
-do_configure[prefuncs] += "sysroot_cleansstate"
-
-
-BB_SETSCENE_VERIFY_FUNCTION2 = "sysroot_checkhashes2"
-
-def sysroot_checkhashes2(covered, tasknames, fns, d, invalidtasks):
- problems = set()
- configurefns = set()
- for tid in invalidtasks:
- if tasknames[tid] == "do_configure" and tid not in covered:
- configurefns.add(fns[tid])
- for tid in covered:
- if tasknames[tid] == "do_populate_sysroot" and fns[tid] in configurefns:
- problems.add(tid)
- return problems
-
-BB_SETSCENE_VERIFY_FUNCTION = "sysroot_checkhashes"
-
-def sysroot_checkhashes(covered, tasknames, fnids, fns, d, invalidtasks = None):
- problems = set()
- configurefnids = set()
- if not invalidtasks:
- invalidtasks = range(len(tasknames))
- for task in invalidtasks:
- if tasknames[task] == "do_configure" and task not in covered:
- configurefnids.add(fnids[task])
- for task in covered:
- if tasknames[task] == "do_populate_sysroot" and fnids[task] in configurefnids:
- problems.add(task)
- return problems
python do_populate_sysroot () {
bb.build.exec_func("sysroot_stage_all", d)
bb.build.exec_func("sysroot_strip", d)
- for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split():
+ for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS') or '').split():
bb.build.exec_func(f, d)
- pn = d.getVar("PN", True)
- multiprov = d.getVar("MULTI_PROVIDER_WHITELIST", True).split()
+ pn = d.getVar("PN")
+ multiprov = d.getVar("MULTI_PROVIDER_WHITELIST").split()
provdir = d.expand("${SYSROOT_DESTDIR}${base_prefix}/sysroot-providers/")
bb.utils.mkdirhier(provdir)
- for p in d.getVar("PROVIDES", True).split():
+ for p in d.getVar("PROVIDES").split():
if p in multiprov:
continue
p = p.replace("/", "_")
@@ -229,15 +112,491 @@ python do_populate_sysroot () {
do_populate_sysroot[vardeps] += "${SYSROOT_PREPROCESS_FUNCS}"
do_populate_sysroot[vardepsexclude] += "MULTI_PROVIDER_WHITELIST"
+POPULATESYSROOTDEPS = ""
+POPULATESYSROOTDEPS_class-target = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot"
+POPULATESYSROOTDEPS_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot"
+do_populate_sysroot[depends] += "${POPULATESYSROOTDEPS}"
+
SSTATETASKS += "do_populate_sysroot"
do_populate_sysroot[cleandirs] = "${SYSROOT_DESTDIR}"
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}"
-do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/"
-do_populate_sysroot[stamp-extra-info] = "${MACHINE}"
+do_populate_sysroot[sstate-outputdirs] = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/${PN}"
+do_populate_sysroot[sstate-fixmedir] = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/${PN}"
python do_populate_sysroot_setscene () {
sstate_setscene(d)
}
addtask do_populate_sysroot_setscene
+def staging_copyfile(c, target, dest, postinsts, seendirs):
+ import errno
+
+ destdir = os.path.dirname(dest)
+ if destdir not in seendirs:
+ bb.utils.mkdirhier(destdir)
+ seendirs.add(destdir)
+ if "/usr/bin/postinst-" in c:
+ postinsts.append(dest)
+ if os.path.islink(c):
+ linkto = os.readlink(c)
+ if os.path.lexists(dest):
+ if not os.path.islink(dest):
+ raise OSError(errno.EEXIST, "Link %s already exists as a file" % dest, dest)
+ if os.readlink(dest) == linkto:
+ return dest
+ raise OSError(errno.EEXIST, "Link %s already exists to a different location? (%s vs %s)" % (dest, os.readlink(dest), linkto), dest)
+ os.symlink(linkto, dest)
+ #bb.warn(c)
+ else:
+ try:
+ os.link(c, dest)
+ except OSError as err:
+ if err.errno == errno.EXDEV:
+ bb.utils.copyfile(c, dest)
+ else:
+ raise
+ return dest
+
+def staging_copydir(c, target, dest, seendirs):
+ if dest not in seendirs:
+ bb.utils.mkdirhier(dest)
+ seendirs.add(dest)
+
+def staging_processfixme(fixme, target, recipesysroot, recipesysrootnative, d):
+ import subprocess
+
+ if not fixme:
+ return
+ cmd = "sed -e 's:^[^/]*/:%s/:g' %s | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (target, " ".join(fixme), recipesysroot, recipesysrootnative)
+ for fixmevar in ['PSEUDO_SYSROOT', 'HOSTTOOLS_DIR', 'PKGDATA_DIR', 'PSEUDO_LOCALSTATEDIR', 'LOGFIFO']:
+ fixme_path = d.getVar(fixmevar)
+ cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
+ bb.debug(2, cmd)
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
+
+
+def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d):
+ import glob
+ import subprocess
+ import errno
+
+ fixme = []
+ postinsts = []
+ seendirs = set()
+ stagingdir = d.getVar("STAGING_DIR")
+ if native:
+ pkgarchs = ['${BUILD_ARCH}', '${BUILD_ARCH}_*']
+ targetdir = nativesysroot
+ else:
+ pkgarchs = ['${MACHINE_ARCH}']
+ pkgarchs = pkgarchs + list(reversed(d.getVar("PACKAGE_EXTRA_ARCHS").split()))
+ pkgarchs.append('allarch')
+ targetdir = targetsysroot
+
+ bb.utils.mkdirhier(targetdir)
+ for pkgarch in pkgarchs:
+ for manifest in glob.glob(d.expand("${SSTATE_MANIFESTS}/manifest-%s-*.populate_sysroot" % pkgarch)):
+ if manifest.endswith("-initial.populate_sysroot"):
+ # skip libgcc-initial due to file overlap
+ continue
+ if not native and (manifest.endswith("-native.populate_sysroot") or "nativesdk-" in manifest):
+ continue
+ if native and not (manifest.endswith("-native.populate_sysroot") or manifest.endswith("-cross.populate_sysroot") or "-cross-" in manifest):
+ continue
+ tmanifest = targetdir + "/" + os.path.basename(manifest)
+ if os.path.exists(tmanifest):
+ continue
+ try:
+ os.link(manifest, tmanifest)
+ except OSError as err:
+ if err.errno == errno.EXDEV:
+ bb.utils.copyfile(manifest, tmanifest)
+ else:
+ raise
+ with open(manifest, "r") as f:
+ for l in f:
+ l = l.strip()
+ if l.endswith("/fixmepath"):
+ fixme.append(l)
+ continue
+ if l.endswith("/fixmepath.cmd"):
+ continue
+ dest = l.replace(stagingdir, "")
+ dest = targetdir + "/" + "/".join(dest.split("/")[3:])
+ if l.endswith("/"):
+ staging_copydir(l, targetdir, dest, seendirs)
+ continue
+ try:
+ staging_copyfile(l, targetdir, dest, postinsts, seendirs)
+ except FileExistsError:
+ continue
+
+ staging_processfixme(fixme, targetdir, targetsysroot, nativesysroot, d)
+ for p in postinsts:
+ subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
+
+#
+# Manifests here are complicated. The main sysroot area has the unpacked sstate
+# which us unrelocated and tracked by the main sstate manifests. Each recipe
+# specific sysroot has manifests for each dependency that is installed there.
+# The task hash is used to tell whether the data needs to be reinstalled. We
+# use a symlink to point to the currently installed hash. There is also a
+# "complete" stamp file which is used to mark if installation completed. If
+# something fails (e.g. a postinst), this won't get written and we would
+# remove and reinstall the dependency. This also means partially installed
+# dependencies should get cleaned up correctly.
+#
+
+python extend_recipe_sysroot() {
+ import copy
+ import subprocess
+ import errno
+ import collections
+ import glob
+
+ taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+ mytaskname = d.getVar("BB_RUNTASK")
+ if mytaskname.endswith("_setscene"):
+ mytaskname = mytaskname.replace("_setscene", "")
+ workdir = d.getVar("WORKDIR")
+ #bb.warn(str(taskdepdata))
+ pn = d.getVar("PN")
+ stagingdir = d.getVar("STAGING_DIR")
+ sharedmanifests = d.getVar("COMPONENTS_DIR") + "/manifests"
+ recipesysroot = d.getVar("RECIPE_SYSROOT")
+ recipesysrootnative = d.getVar("RECIPE_SYSROOT_NATIVE")
+
+ # Detect bitbake -b usage
+ nodeps = d.getVar("BB_LIMITEDDEPS") or False
+ if nodeps:
+ lock = bb.utils.lockfile(recipesysroot + "/sysroot.lock")
+ staging_populate_sysroot_dir(recipesysroot, recipesysrootnative, True, d)
+ staging_populate_sysroot_dir(recipesysroot, recipesysrootnative, False, d)
+ bb.utils.unlockfile(lock)
+ return
+
+ start = None
+ configuredeps = []
+ for dep in taskdepdata:
+ data = taskdepdata[dep]
+ if data[1] == mytaskname and data[0] == pn:
+ start = dep
+ break
+ if start is None:
+ bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+
+ # We need to figure out which sysroot files we need to expose to this task.
+ # This needs to match what would get restored from sstate, which is controlled
+ # ultimately by calls from bitbake to setscene_depvalid().
+ # That function expects a setscene dependency tree. We build a dependency tree
+ # condensed to inter-sstate task dependencies, similar to that used by setscene
+ # tasks. We can then call into setscene_depvalid() and decide
+ # which dependencies we can "see" and should expose in the recipe specific sysroot.
+ setscenedeps = copy.deepcopy(taskdepdata)
+
+ start = set([start])
+
+ sstatetasks = d.getVar("SSTATETASKS").split()
+ # Add recipe specific tasks referenced by setscene_depvalid()
+ sstatetasks.append("do_stash_locale")
+
+ def print_dep_tree(deptree):
+ data = ""
+ for dep in deptree:
+ deps = " " + "\n ".join(deptree[dep][3]) + "\n"
+ data = data + "%s:\n %s\n %s\n%s %s\n %s\n" % (deptree[dep][0], deptree[dep][1], deptree[dep][2], deps, deptree[dep][4], deptree[dep][5])
+ return data
+
+ #bb.note("Full dep tree is:\n%s" % print_dep_tree(taskdepdata))
+
+ #bb.note(" start2 is %s" % str(start))
+
+ # If start is an sstate task (like do_package) we need to add in its direct dependencies
+ # else the code below won't recurse into them.
+ for dep in set(start):
+ for dep2 in setscenedeps[dep][3]:
+ start.add(dep2)
+ start.remove(dep)
+
+ #bb.note(" start3 is %s" % str(start))
+
+ # Create collapsed do_populate_sysroot -> do_populate_sysroot tree
+ for dep in taskdepdata:
+ data = setscenedeps[dep]
+ if data[1] not in sstatetasks:
+ for dep2 in setscenedeps:
+ data2 = setscenedeps[dep2]
+ if dep in data2[3]:
+ data2[3].update(setscenedeps[dep][3])
+ data2[3].remove(dep)
+ if dep in start:
+ start.update(setscenedeps[dep][3])
+ start.remove(dep)
+ del setscenedeps[dep]
+
+ # Remove circular references
+ for dep in setscenedeps:
+ if dep in setscenedeps[dep][3]:
+ setscenedeps[dep][3].remove(dep)
+
+ #bb.note("Computed dep tree is:\n%s" % print_dep_tree(setscenedeps))
+ #bb.note(" start is %s" % str(start))
+
+ # Direct dependencies should be present and can be depended upon
+ for dep in set(start):
+ if setscenedeps[dep][1] == "do_populate_sysroot":
+ if dep not in configuredeps:
+ configuredeps.append(dep)
+ bb.note("Direct dependencies are %s" % str(configuredeps))
+ #bb.note(" or %s" % str(start))
+
+ msgbuf = []
+ # Call into setscene_depvalid for each sub-dependency and only copy sysroot files
+ # for ones that would be restored from sstate.
+ done = list(start)
+ next = list(start)
+ while next:
+ new = []
+ for dep in next:
+ data = setscenedeps[dep]
+ for datadep in data[3]:
+ if datadep in done:
+ continue
+ taskdeps = {}
+ taskdeps[dep] = setscenedeps[dep][:2]
+ taskdeps[datadep] = setscenedeps[datadep][:2]
+ retval = setscene_depvalid(datadep, taskdeps, [], d, msgbuf)
+ if retval:
+ msgbuf.append("Skipping setscene dependency %s for installation into the sysroot" % datadep)
+ continue
+ done.append(datadep)
+ new.append(datadep)
+ if datadep not in configuredeps and setscenedeps[datadep][1] == "do_populate_sysroot":
+ configuredeps.append(datadep)
+ msgbuf.append("Adding dependency on %s" % setscenedeps[datadep][0])
+ else:
+ msgbuf.append("Following dependency on %s" % setscenedeps[datadep][0])
+ next = new
+
+ # This logging is too verbose for day to day use sadly
+ #bb.debug(2, "\n".join(msgbuf))
+
+ depdir = recipesysrootnative + "/installeddeps"
+ bb.utils.mkdirhier(depdir)
+ bb.utils.mkdirhier(sharedmanifests)
+
+ lock = bb.utils.lockfile(recipesysroot + "/sysroot.lock")
+
+ fixme = {}
+ seendirs = set()
+ postinsts = []
+ multilibs = {}
+ manifests = {}
+ # All files that we're going to be installing, to find conflicts.
+ fileset = {}
+
+ for f in os.listdir(depdir):
+ if not f.endswith(".complete"):
+ continue
+ f = depdir + "/" + f
+ if os.path.islink(f) and not os.path.exists(f):
+ bb.note("%s no longer exists, removing from sysroot" % f)
+ lnk = os.readlink(f.replace(".complete", ""))
+ sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+ os.unlink(f)
+ os.unlink(f.replace(".complete", ""))
+
+ installed = []
+ for dep in configuredeps:
+ c = setscenedeps[dep][0]
+ if mytaskname in ["do_sdk_depends", "do_populate_sdk_ext"] and c.endswith("-initial"):
+ bb.note("Skipping initial setscene dependency %s for installation into the sysroot" % c)
+ continue
+ installed.append(c)
+
+ # We want to remove anything which this task previously installed but is no longer a dependency
+ taskindex = depdir + "/" + "index." + mytaskname
+ if os.path.exists(taskindex):
+ potential = []
+ with open(taskindex, "r") as f:
+ for l in f:
+ l = l.strip()
+ if l not in installed:
+ fl = depdir + "/" + l
+ if not os.path.exists(fl):
+ # Was likely already uninstalled
+ continue
+ potential.append(l)
+ # We need to ensure not other task needs this dependency. We hold the sysroot
+ # lock so we ca search the indexes to check
+ if potential:
+ for i in glob.glob(depdir + "/index.*"):
+ if i.endswith("." + mytaskname):
+ continue
+ with open(i, "r") as f:
+ for l in f:
+ l = l.strip()
+ if l in potential:
+ potential.remove(l)
+ for l in potential:
+ fl = depdir + "/" + l
+ bb.note("Task %s no longer depends on %s, removing from sysroot" % (mytaskname, l))
+ lnk = os.readlink(fl)
+ sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+ os.unlink(fl)
+ os.unlink(fl + ".complete")
+
+ msg_exists = []
+ msg_adding = []
+
+ # Handle all removals first since files may move between recipes
+ for dep in configuredeps:
+ c = setscenedeps[dep][0]
+ if c not in installed:
+ continue
+ taskhash = setscenedeps[dep][5]
+ taskmanifest = depdir + "/" + c + "." + taskhash
+
+ if os.path.exists(depdir + "/" + c):
+ lnk = os.readlink(depdir + "/" + c)
+ if lnk == c + "." + taskhash and os.path.exists(depdir + "/" + c + ".complete"):
+ continue
+ else:
+ bb.note("%s exists in sysroot, but is stale (%s vs. %s), removing." % (c, lnk, c + "." + taskhash))
+ sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+ os.unlink(depdir + "/" + c)
+ if os.path.lexists(depdir + "/" + c + ".complete"):
+ os.unlink(depdir + "/" + c + ".complete")
+ elif os.path.lexists(depdir + "/" + c):
+ os.unlink(depdir + "/" + c)
+
+ # Now handle installs
+ for dep in configuredeps:
+ c = setscenedeps[dep][0]
+ if c not in installed:
+ continue
+ taskhash = setscenedeps[dep][5]
+ taskmanifest = depdir + "/" + c + "." + taskhash
+
+ if os.path.exists(depdir + "/" + c):
+ lnk = os.readlink(depdir + "/" + c)
+ if lnk == c + "." + taskhash and os.path.exists(depdir + "/" + c + ".complete"):
+ msg_exists.append(c)
+ continue
+
+ msg_adding.append(c)
+
+ os.symlink(c + "." + taskhash, depdir + "/" + c)
+
+ manifest, d2 = oe.sstatesig.find_sstate_manifest(c, setscenedeps[dep][2], "populate_sysroot", d, multilibs)
+ if d2 is not d:
+ # If we don't do this, the recipe sysroot will be placed in the wrong WORKDIR for multilibs
+ # We need a consistent WORKDIR for the image
+ d2.setVar("WORKDIR", d.getVar("WORKDIR"))
+ destsysroot = d2.getVar("RECIPE_SYSROOT")
+ # We put allarch recipes into the default sysroot
+ if manifest and "allarch" in manifest:
+ destsysroot = d.getVar("RECIPE_SYSROOT")
+
+ native = False
+ if c.endswith("-native") or "-cross-" in c or "-crosssdk" in c:
+ native = True
+
+ if manifest:
+ newmanifest = collections.OrderedDict()
+ targetdir = destsysroot
+ if native:
+ targetdir = recipesysrootnative
+ if targetdir not in fixme:
+ fixme[targetdir] = []
+ fm = fixme[targetdir]
+
+ with open(manifest, "r") as f:
+ manifests[dep] = manifest
+ for l in f:
+ l = l.strip()
+ if l.endswith("/fixmepath"):
+ fm.append(l)
+ continue
+ if l.endswith("/fixmepath.cmd"):
+ continue
+ dest = l.replace(stagingdir, "")
+ dest = "/" + "/".join(dest.split("/")[3:])
+ newmanifest[l] = targetdir + dest
+
+ # Check if files have already been installed by another
+ # recipe and abort if they have, explaining what recipes are
+ # conflicting.
+ hashname = targetdir + dest
+ if not hashname.endswith("/"):
+ if hashname in fileset:
+ bb.fatal("The file %s is installed by both %s and %s, aborting" % (dest, c, fileset[hashname]))
+ else:
+ fileset[hashname] = c
+
+ # Having multiple identical manifests in each sysroot eats diskspace so
+ # create a shared pool of them and hardlink if we can.
+ # We create the manifest in advance so that if something fails during installation,
+ # or the build is interrupted, subsequent exeuction can cleanup.
+ sharedm = sharedmanifests + "/" + os.path.basename(taskmanifest)
+ if not os.path.exists(sharedm):
+ smlock = bb.utils.lockfile(sharedm + ".lock")
+ # Can race here. You'd think it just means we may not end up with all copies hardlinked to each other
+ # but python can lose file handles so we need to do this under a lock.
+ if not os.path.exists(sharedm):
+ with open(sharedm, 'w') as m:
+ for l in newmanifest:
+ dest = newmanifest[l]
+ m.write(dest.replace(workdir + "/", "") + "\n")
+ bb.utils.unlockfile(smlock)
+ try:
+ os.link(sharedm, taskmanifest)
+ except OSError as err:
+ if err.errno == errno.EXDEV:
+ bb.utils.copyfile(sharedm, taskmanifest)
+ else:
+ raise
+ # Finally actually install the files
+ for l in newmanifest:
+ dest = newmanifest[l]
+ if l.endswith("/"):
+ staging_copydir(l, targetdir, dest, seendirs)
+ continue
+ staging_copyfile(l, targetdir, dest, postinsts, seendirs)
+
+ bb.note("Installed into sysroot: %s" % str(msg_adding))
+ bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists))
+
+ for f in fixme:
+ staging_processfixme(fixme[f], f, recipesysroot, recipesysrootnative, d)
+
+ for p in postinsts:
+ subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
+
+ for dep in manifests:
+ c = setscenedeps[dep][0]
+ os.symlink(manifests[dep], depdir + "/" + c + ".complete")
+
+ with open(taskindex, "w") as f:
+ for l in sorted(installed):
+ f.write(l + "\n")
+ bb.utils.unlockfile(lock)
+}
+extend_recipe_sysroot[vardepsexclude] += "MACHINE_ARCH PACKAGE_EXTRA_ARCHS SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
+
+do_prepare_recipe_sysroot[deptask] = "do_populate_sysroot"
+python do_prepare_recipe_sysroot () {
+ bb.build.exec_func("extend_recipe_sysroot", d)
+}
+addtask do_prepare_recipe_sysroot before do_configure after do_fetch
+
+python staging_taskhandler() {
+ bbtasks = e.tasklist
+ for task in bbtasks:
+ deps = d.getVarFlag(task, "depends")
+ if deps and "populate_sysroot" in deps:
+ d.appendVarFlag(task, "prefuncs", " extend_recipe_sysroot")
+}
+staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess"
+addhandler staging_taskhandler
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index 9b0c2c7fc6..894f6b3718 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -75,21 +75,16 @@ syslinux_hddimg_install() {
syslinux ${IMGDEPLOYDIR}/${IMAGE_NAME}.hddimg
}
-syslinux_hdddirect_install() {
- DEST=$1
- syslinux $DEST
-}
-
python build_syslinux_cfg () {
import copy
import sys
- workdir = d.getVar('WORKDIR', True)
+ workdir = d.getVar('WORKDIR')
if not workdir:
bb.error("WORKDIR not defined, unable to package")
return
- labels = d.getVar('LABELS', True)
+ labels = d.getVar('LABELS')
if not labels:
bb.debug(1, "LABELS not defined, nothing to do")
return
@@ -98,50 +93,50 @@ python build_syslinux_cfg () {
bb.debug(1, "No labels, nothing to do")
return
- cfile = d.getVar('SYSLINUX_CFG', True)
+ cfile = d.getVar('SYSLINUX_CFG')
if not cfile:
- raise bb.build.FuncFailed('Unable to read SYSLINUX_CFG')
+ bb.fatal('Unable to read SYSLINUX_CFG')
try:
cfgfile = open(cfile, 'w')
except OSError:
- raise bb.build.FuncFailed('Unable to open %s' % (cfile))
+ bb.fatal('Unable to open %s' % cfile)
cfgfile.write('# Automatically created by OE\n')
- opts = d.getVar('SYSLINUX_OPTS', True)
+ opts = d.getVar('SYSLINUX_OPTS')
if opts:
for opt in opts.split(';'):
cfgfile.write('%s\n' % opt)
- allowoptions = d.getVar('SYSLINUX_ALLOWOPTIONS', True)
+ allowoptions = d.getVar('SYSLINUX_ALLOWOPTIONS')
if allowoptions:
cfgfile.write('ALLOWOPTIONS %s\n' % allowoptions)
else:
cfgfile.write('ALLOWOPTIONS 1\n')
- syslinux_default_console = d.getVar('SYSLINUX_DEFAULT_CONSOLE', True)
- syslinux_serial_tty = d.getVar('SYSLINUX_SERIAL_TTY', True)
- syslinux_serial = d.getVar('SYSLINUX_SERIAL', True)
+ syslinux_default_console = d.getVar('SYSLINUX_DEFAULT_CONSOLE')
+ syslinux_serial_tty = d.getVar('SYSLINUX_SERIAL_TTY')
+ syslinux_serial = d.getVar('SYSLINUX_SERIAL')
if syslinux_serial:
cfgfile.write('SERIAL %s\n' % syslinux_serial)
- menu = (d.getVar('AUTO_SYSLINUXMENU', True) == "1")
+ menu = (d.getVar('AUTO_SYSLINUXMENU') == "1")
if menu and syslinux_serial:
cfgfile.write('DEFAULT Graphics console %s\n' % (labels.split()[0]))
else:
cfgfile.write('DEFAULT %s\n' % (labels.split()[0]))
- timeout = d.getVar('SYSLINUX_TIMEOUT', True)
+ timeout = d.getVar('SYSLINUX_TIMEOUT')
if timeout:
cfgfile.write('TIMEOUT %s\n' % timeout)
else:
cfgfile.write('TIMEOUT 50\n')
- prompt = d.getVar('SYSLINUX_PROMPT', True)
+ prompt = d.getVar('SYSLINUX_PROMPT')
if prompt:
cfgfile.write('PROMPT %s\n' % prompt)
else:
@@ -151,38 +146,38 @@ python build_syslinux_cfg () {
cfgfile.write('ui vesamenu.c32\n')
cfgfile.write('menu title Select kernel options and boot kernel\n')
cfgfile.write('menu tabmsg Press [Tab] to edit, [Return] to select\n')
- splash = d.getVar('SYSLINUX_SPLASH', True)
+ splash = d.getVar('SYSLINUX_SPLASH')
if splash:
cfgfile.write('menu background splash.lss\n')
for label in labels.split():
localdata = bb.data.createCopy(d)
- overrides = localdata.getVar('OVERRIDES', True)
+ overrides = localdata.getVar('OVERRIDES')
if not overrides:
- raise bb.build.FuncFailed('OVERRIDES not defined')
+ bb.fatal('OVERRIDES not defined')
localdata.setVar('OVERRIDES', label + ':' + overrides)
- bb.data.update_data(localdata)
btypes = [ [ "", syslinux_default_console ] ]
if menu and syslinux_serial:
btypes = [ [ "Graphics console ", syslinux_default_console ],
[ "Serial console ", syslinux_serial_tty ] ]
- root= d.getVar('SYSLINUX_ROOT', True)
+ root= d.getVar('SYSLINUX_ROOT')
if not root:
- raise bb.build.FuncFailed('SYSLINUX_ROOT not defined')
+ bb.fatal('SYSLINUX_ROOT not defined')
+ kernel = localdata.getVar('KERNEL_IMAGETYPE')
for btype in btypes:
- cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
+ cfgfile.write('LABEL %s%s\nKERNEL /%s\n' % (btype[0], label, kernel))
- exargs = d.getVar('SYSLINUX_KERNEL_ARGS', True)
+ exargs = d.getVar('SYSLINUX_KERNEL_ARGS')
if exargs:
btype[1] += " " + exargs
- append = localdata.getVar('APPEND', True)
- initrd = localdata.getVar('INITRD', True)
+ append = localdata.getVar('APPEND')
+ initrd = localdata.getVar('INITRD')
append = root + " " + append
cfgfile.write('APPEND ')
diff --git a/meta/classes/systemd-boot-cfg.bbclass b/meta/classes/systemd-boot-cfg.bbclass
new file mode 100644
index 0000000000..b3e0e6ad41
--- /dev/null
+++ b/meta/classes/systemd-boot-cfg.bbclass
@@ -0,0 +1,71 @@
+SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
+SYSTEMD_BOOT_ENTRIES ?= ""
+SYSTEMD_BOOT_TIMEOUT ?= "10"
+
+# Uses MACHINE specific KERNEL_IMAGETYPE
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# Need UUID utility code.
+inherit fs-uuid
+
+python build_efi_cfg() {
+ s = d.getVar("S")
+ labels = d.getVar('LABELS')
+ if not labels:
+ bb.debug(1, "LABELS not defined, nothing to do")
+ return
+
+ if labels == []:
+ bb.debug(1, "No labels, nothing to do")
+ return
+
+ cfile = d.getVar('SYSTEMD_BOOT_CFG')
+ cdir = os.path.dirname(cfile)
+ if not os.path.exists(cdir):
+ os.makedirs(cdir)
+ try:
+ cfgfile = open(cfile, 'w')
+ except OSError:
+ bb.fatal('Unable to open %s' % cfile)
+
+ cfgfile.write('# Automatically created by OE\n')
+ cfgfile.write('default %s\n' % (labels.split()[0]))
+ timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT')
+ if timeout:
+ cfgfile.write('timeout %s\n' % timeout)
+ else:
+ cfgfile.write('timeout 10\n')
+ cfgfile.close()
+
+ for label in labels.split():
+ localdata = d.createCopy()
+
+ entryfile = "%s/%s.conf" % (s, label)
+ if not os.path.exists(s):
+ os.makedirs(s)
+ d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
+ try:
+ entrycfg = open(entryfile, "w")
+ except OSError:
+ bb.fatal('Unable to open %s' % entryfile)
+
+ entrycfg.write('title %s\n' % label)
+
+ kernel = localdata.getVar("KERNEL_IMAGETYPE")
+ entrycfg.write('linux /%s\n' % kernel)
+
+ append = localdata.getVar('APPEND')
+ initrd = localdata.getVar('INITRD')
+
+ if initrd:
+ entrycfg.write('initrd /initrd\n')
+ lb = label
+ if label == "install":
+ lb = "install-efi"
+ entrycfg.write('options LABEL=%s ' % lb)
+ if append:
+ append = replace_rootfs_uuid(d, append)
+ entrycfg.write('%s' % append)
+ entrycfg.write('\n')
+ entrycfg.close()
+}
diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass
index b550b61a7c..336c4c2ff5 100644
--- a/meta/classes/systemd-boot.bbclass
+++ b/meta/classes/systemd-boot.bbclass
@@ -4,121 +4,32 @@
# systemd-boot.bbclass - The "systemd-boot" is essentially the gummiboot merged into systemd.
# The original standalone gummiboot project is dead without any more
-# maintenance. As a start point, we replace all gummitboot occurrences
-# with systemd-boot in gummiboot.bbclass to have a base version of this
-# systemd-boot.bbclass.
+# maintenance.
#
# Set EFI_PROVIDER = "systemd-boot" to use systemd-boot on your live images instead of grub-efi
-# (images built by image-live.bbclass or image-vm.bbclass)
+# (images built by image-live.bbclass)
do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy"
-do_bootdirectdisk[depends] += "${MLPREFIX}systemd-boot:do_deploy"
-
-EFIDIR = "/EFI/BOOT"
-
-SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
-SYSTEMD_BOOT_ENTRIES ?= ""
-SYSTEMD_BOOT_TIMEOUT ?= "10"
+require conf/image-uefi.conf
# Need UUID utility code.
inherit fs-uuid
efi_populate() {
- DEST=$1
+ efi_populate_common "$1" systemd
- EFI_IMAGE="systemd-bootia32.efi"
- DEST_EFI_IMAGE="bootia32.efi"
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- EFI_IMAGE="systemd-bootx64.efi"
- DEST_EFI_IMAGE="bootx64.efi"
- fi
-
- install -d ${DEST}${EFIDIR}
# systemd-boot requires these paths for configuration files
# they are not customizable so no point in new vars
install -d ${DEST}/loader
install -d ${DEST}/loader/entries
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE}
install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf
for i in ${SYSTEMD_BOOT_ENTRIES}; do
install -m 0644 ${i} ${DEST}/loader/entries
done
}
-efi_iso_populate() {
- iso_dir=$1
- efi_populate $iso_dir
- mkdir -p ${EFIIMGDIR}/${EFIDIR}
- cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
- cp $iso_dir/vmlinuz ${EFIIMGDIR}
- EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh
- if [ -f "$iso_dir/initrd" ] ; then
- cp $iso_dir/initrd ${EFIIMGDIR}
- fi
-}
-
-efi_hddimg_populate() {
- efi_populate $1
+efi_iso_populate_append() {
+ cp -r $iso_dir/loader ${EFIIMGDIR}
}
-python build_efi_cfg() {
- s = d.getVar("S", True)
- labels = d.getVar('LABELS', True)
- if not labels:
- bb.debug(1, "LABELS not defined, nothing to do")
- return
-
- if labels == []:
- bb.debug(1, "No labels, nothing to do")
- return
-
- cfile = d.getVar('SYSTEMD_BOOT_CFG', True)
- try:
- cfgfile = open(cfile, 'w')
- except OSError:
- raise bb.build.FuncFailed('Unable to open %s' % (cfile))
-
- cfgfile.write('# Automatically created by OE\n')
- cfgfile.write('default %s\n' % (labels.split()[0]))
- timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT', True)
- if timeout:
- cfgfile.write('timeout %s\n' % timeout)
- else:
- cfgfile.write('timeout 10\n')
- cfgfile.close()
-
- for label in labels.split():
- localdata = d.createCopy()
-
- overrides = localdata.getVar('OVERRIDES', True)
- if not overrides:
- raise bb.build.FuncFailed('OVERRIDES not defined')
-
- entryfile = "%s/%s.conf" % (s, label)
- d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
- try:
- entrycfg = open(entryfile, "w")
- except OSError:
- raise bb.build.FuncFailed('Unable to open %s' % (entryfile))
- localdata.setVar('OVERRIDES', label + ':' + overrides)
- bb.data.update_data(localdata)
-
- entrycfg.write('title %s\n' % label)
- entrycfg.write('linux /vmlinuz\n')
-
- append = localdata.getVar('APPEND', True)
- initrd = localdata.getVar('INITRD', True)
-
- if initrd:
- entrycfg.write('initrd /initrd\n')
- lb = label
- if label == "install":
- lb = "install-efi"
- entrycfg.write('options LABEL=%s ' % lb)
- if append:
- append = replace_rootfs_uuid(d, append)
- entrycfg.write('%s' % append)
- entrycfg.write('\n')
- entrycfg.close()
-}
+inherit systemd-boot-cfg
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index db7873fbe2..9e8a82c9f1 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -17,39 +17,43 @@ python __anonymous() {
# files.
if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
d.appendVar("DEPENDS", " systemd-systemctl-native")
+ d.appendVar("PACKAGE_WRITE_DEPS", " systemd-systemctl-native")
if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
}
systemd_postinst() {
-OPTS=""
+if type systemctl >/dev/null 2>/dev/null; then
+ OPTS=""
-if [ -n "$D" ]; then
- OPTS="--root=$D"
-fi
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
-if type systemctl >/dev/null 2>/dev/null; then
- systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
+ if [ "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
+ for service in ${SYSTEMD_SERVICE_ESCAPED}; do
+ systemctl ${OPTS} enable "$service"
+ done
+ fi
+
+ if [ -z "$D" ]; then
+ systemctl daemon-reload
+ systemctl preset ${SYSTEMD_SERVICE_ESCAPED}
- if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
- systemctl restart ${SYSTEMD_SERVICE}
+ if [ "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
+ systemctl --no-block restart ${SYSTEMD_SERVICE_ESCAPED}
+ fi
fi
fi
}
systemd_prerm() {
-OPTS=""
-
-if [ -n "$D" ]; then
- OPTS="--root=$D"
-fi
-
if type systemctl >/dev/null 2>/dev/null; then
if [ -z "$D" ]; then
- systemctl stop ${SYSTEMD_SERVICE}
- fi
+ systemctl stop ${SYSTEMD_SERVICE_ESCAPED}
- systemctl $OPTS disable ${SYSTEMD_SERVICE}
+ systemctl disable ${SYSTEMD_SERVICE_ESCAPED}
+ fi
fi
}
@@ -60,19 +64,20 @@ systemd_populate_packages[vardepsexclude] += "OVERRIDES"
python systemd_populate_packages() {
import re
+ import shlex
if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
return
def get_package_var(d, var, pkg):
- val = (d.getVar('%s_%s' % (var, pkg), True) or "").strip()
+ val = (d.getVar('%s_%s' % (var, pkg)) or "").strip()
if val == "":
- val = (d.getVar(var, True) or "").strip()
+ val = (d.getVar(var) or "").strip()
return val
# Check if systemd-packages already included in PACKAGES
def systemd_check_package(pkg_systemd):
- packages = d.getVar('PACKAGES', True)
+ packages = d.getVar('PACKAGES')
if not pkg_systemd in packages.split():
bb.error('%s does not appear in package list, please add it' % pkg_systemd)
@@ -80,29 +85,31 @@ python systemd_populate_packages() {
def systemd_generate_package_scripts(pkg):
bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
+ paths_escaped = ' '.join(shlex.quote(s) for s in d.getVar('SYSTEMD_SERVICE_' + pkg).split())
+ d.setVar('SYSTEMD_SERVICE_ESCAPED_' + pkg, paths_escaped)
+
# Add pkg to the overrides so that it finds the SYSTEMD_SERVICE_pkg
# variable.
localdata = d.createCopy()
localdata.prependVar("OVERRIDES", pkg + ":")
- bb.data.update_data(localdata)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += localdata.getVar('systemd_postinst', True)
+ postinst += localdata.getVar('systemd_postinst')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- prerm = d.getVar('pkg_prerm_%s' % pkg, True)
+ prerm = d.getVar('pkg_prerm_%s' % pkg)
if not prerm:
prerm = '#!/bin/sh\n'
- prerm += localdata.getVar('systemd_prerm', True)
+ prerm += localdata.getVar('systemd_prerm')
d.setVar('pkg_prerm_%s' % pkg, prerm)
# Add files to FILES_*-systemd if existent and not already done
def systemd_append_file(pkg_systemd, file_append):
appended = False
- if os.path.exists(oe.path.join(d.getVar("D", True), file_append)):
+ if os.path.exists(oe.path.join(d.getVar("D"), file_append)):
var_name = "FILES_" + pkg_systemd
files = d.getVar(var_name, False) or ""
if file_append not in files.split():
@@ -114,7 +121,7 @@ python systemd_populate_packages() {
def systemd_add_files_and_parse(pkg_systemd, path, service, keys):
# avoid infinite recursion
if systemd_append_file(pkg_systemd, oe.path.join(path, service)):
- fullpath = oe.path.join(d.getVar("D", True), path, service)
+ fullpath = oe.path.join(d.getVar("D"), path, service)
if service.find('.service') != -1:
# for *.service add *@.service
service_base = service.replace('.service', '')
@@ -126,7 +133,7 @@ python systemd_populate_packages() {
systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service', keys)
for key in keys.split():
# recurse all dependencies found in keys ('Also';'Conflicts';..) and add to files
- cmd = "grep %s %s | sed 's,%s=,,g' | tr ',' '\\n'" % (key, fullpath, key)
+ cmd = "grep %s %s | sed 's,%s=,,g' | tr ',' '\\n'" % (key, shlex.quote(fullpath), key)
pipe = os.popen(cmd, 'r')
line = pipe.readline()
while line:
@@ -137,9 +144,9 @@ python systemd_populate_packages() {
# Check service-files and call systemd_add_files_and_parse for each entry
def systemd_check_services():
- searchpaths = [oe.path.join(d.getVar("sysconfdir", True), "systemd", "system"),]
- searchpaths.append(d.getVar("systemd_system_unitdir", True))
- systemd_packages = d.getVar('SYSTEMD_PACKAGES', True)
+ searchpaths = [oe.path.join(d.getVar("sysconfdir"), "systemd", "system"),]
+ searchpaths.append(d.getVar("systemd_system_unitdir"))
+ systemd_packages = d.getVar('SYSTEMD_PACKAGES')
keys = 'Also'
# scan for all in SYSTEMD_SERVICE[]
@@ -150,30 +157,44 @@ python systemd_populate_packages() {
# Deal with adding, for example, 'ifplugd@eth0.service' from
# 'ifplugd@.service'
base = None
- if service.find('@') != -1:
- base = re.sub('@[^.]+.', '@.', service)
+ at = service.find('@')
+ if at != -1:
+ ext = service.rfind('.')
+ base = service[:at] + '@' + service[ext:]
for path in searchpaths:
- if os.path.exists(oe.path.join(d.getVar("D", True), path, service)):
+ if os.path.exists(oe.path.join(d.getVar("D"), path, service)):
path_found = path
break
elif base is not None:
- if os.path.exists(oe.path.join(d.getVar("D", True), path, base)):
+ if os.path.exists(oe.path.join(d.getVar("D"), path, base)):
path_found = path
break
if path_found != '':
systemd_add_files_and_parse(pkg_systemd, path_found, service, keys)
else:
- raise bb.build.FuncFailed("SYSTEMD_SERVICE_%s value %s does not exist" % \
- (pkg_systemd, service))
+ bb.fatal("SYSTEMD_SERVICE_%s value %s does not exist" % (pkg_systemd, service))
+
+ def systemd_create_presets(pkg, action):
+ presetf = oe.path.join(d.getVar("PKGD"), d.getVar("systemd_unitdir"), "system-preset/98-%s.preset" % pkg)
+ bb.utils.mkdirhier(os.path.dirname(presetf))
+ with open(presetf, 'a') as fd:
+ for service in d.getVar('SYSTEMD_SERVICE_%s' % pkg).split():
+ fd.write("%s %s\n" % (action,service))
+ d.appendVar("FILES_%s" % pkg, ' ' + oe.path.join(d.getVar("systemd_unitdir"), "system-preset/98-%s.preset" % pkg))
# Run all modifications once when creating package
- if os.path.exists(d.getVar("D", True)):
- for pkg in d.getVar('SYSTEMD_PACKAGES', True).split():
+ if os.path.exists(d.getVar("D")):
+ for pkg in d.getVar('SYSTEMD_PACKAGES').split():
systemd_check_package(pkg)
- if d.getVar('SYSTEMD_SERVICE_' + pkg, True):
+ if d.getVar('SYSTEMD_SERVICE_' + pkg):
systemd_generate_package_scripts(pkg)
+ action = get_package_var(d, 'SYSTEMD_AUTO_ENABLE', pkg)
+ if action in ("enable", "disable"):
+ systemd_create_presets(pkg, action)
+ elif action not in ("mask", "preset"):
+ bb.fatal("SYSTEMD_AUTO_ENABLE_%s '%s' is not 'enable', 'disable', 'mask' or 'preset'" % (pkg, action))
systemd_check_services()
}
@@ -182,26 +203,30 @@ PACKAGESPLITFUNCS_prepend = "systemd_populate_packages "
python rm_systemd_unitdir (){
import shutil
if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
- systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True))
+ systemd_unitdir = oe.path.join(d.getVar("D"), d.getVar('systemd_unitdir'))
if os.path.exists(systemd_unitdir):
shutil.rmtree(systemd_unitdir)
systemd_libdir = os.path.dirname(systemd_unitdir)
if (os.path.exists(systemd_libdir) and not os.listdir(systemd_libdir)):
os.rmdir(systemd_libdir)
}
-do_install[postfuncs] += "rm_systemd_unitdir "
python rm_sysvinit_initddir (){
import shutil
- sysv_initddir = oe.path.join(d.getVar("D", True), (d.getVar('INIT_D_DIR', True) or "/etc/init.d"))
+ sysv_initddir = oe.path.join(d.getVar("D"), (d.getVar('INIT_D_DIR') or "/etc/init.d"))
if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and \
not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
os.path.exists(sysv_initddir):
- systemd_system_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_system_unitdir', True))
+ systemd_system_unitdir = oe.path.join(d.getVar("D"), d.getVar('systemd_system_unitdir'))
# If systemd_system_unitdir contains anything, delete sysv_initddir
if (os.path.exists(systemd_system_unitdir) and os.listdir(systemd_system_unitdir)):
shutil.rmtree(sysv_initddir)
}
-do_install[postfuncs] += "rm_sysvinit_initddir "
+
+do_install[postfuncs] += "${RMINITDIR} "
+RMINITDIR_class-target = " rm_sysvinit_initddir rm_systemd_unitdir "
+RMINITDIR_class-nativesdk = " rm_sysvinit_initddir rm_systemd_unitdir "
+RMINITDIR = ""
+
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index a94f755a40..6059ae95e0 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -3,7 +3,7 @@ OE_TERMINAL[type] = 'choice'
OE_TERMINAL[choices] = 'auto none \
${@oe_terminal_prioritized()}'
-OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE'
+OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE CACHED_CONFIGUREVARS CONFIGUREOPTS EXTRA_OECONF'
OE_TERMINAL_EXPORTS[type] = 'list'
XAUTHORITY ?= "${HOME}/.Xauthority"
@@ -14,18 +14,19 @@ def oe_terminal_prioritized():
return " ".join(o.name for o in oe.terminal.prioritized())
def emit_terminal_func(command, envdata, d):
+ import bb.build
cmd_func = 'do_terminal'
envdata.setVar(cmd_func, 'exec ' + command)
envdata.setVarFlag(cmd_func, 'func', '1')
- runfmt = d.getVar('BB_RUNFMT', True) or "run.{func}.{pid}"
+ runfmt = d.getVar('BB_RUNFMT') or "run.{func}.{pid}"
runfile = runfmt.format(func=cmd_func, task=cmd_func, taskfunc=cmd_func, pid=os.getpid())
- runfile = os.path.join(d.getVar('T', True), runfile)
+ runfile = os.path.join(d.getVar('T'), runfile)
bb.utils.mkdirhier(os.path.dirname(runfile))
with open(runfile, 'w') as script:
- script.write('#!/bin/sh -e\n')
+ script.write(bb.build.shell_trap_code())
bb.data.emit_func(cmd_func, script, envdata)
script.write(cmd_func)
script.write("\n")
@@ -44,7 +45,7 @@ def oe_terminal(command, title, d):
envdata.setVarFlag(v, 'export', '1')
for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
- value = d.getVar(export, True)
+ value = d.getVar(export)
if value is not None:
os.environ[export] = str(value)
envdata.setVar(export, str(value))
@@ -60,12 +61,17 @@ def oe_terminal(command, title, d):
for key in origbbenv:
if key in envdata:
continue
- value = origbbenv.getVar(key, True)
+ value = origbbenv.getVar(key)
if value is not None:
os.environ[key] = str(value)
envdata.setVar(key, str(value))
envdata.setVarFlag(key, 'export', '1')
+ # Use original PATH as a fallback
+ path = d.getVar('PATH') + ":" + origbbenv.getVar('PATH')
+ os.environ['PATH'] = path
+ envdata.setVar('PATH', path)
+
# A complex PS1 might need more escaping of chars.
# Lets not export PS1 instead.
envdata.delVar("PS1")
@@ -88,8 +94,12 @@ def oe_terminal(command, title, d):
try:
oe.terminal.spawn_preferred(command, title, None, d)
- except oe.terminal.NoSupportedTerminals:
- bb.fatal('No valid terminal found, unable to open devshell')
+ except oe.terminal.NoSupportedTerminals as nosup:
+ nosup.terms.remove("false")
+ cmds = '\n\t'.join(nosup.terms).replace("{command}",
+ "do_terminal").replace("{title}", title)
+ bb.fatal('No valid terminal found, unable to open devshell.\n' +
+ 'Tried the following commands:\n\t%s' % cmds)
except oe.terminal.ExecutionError as exc:
bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))
diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass
index 5147020820..59cbaefbf9 100644
--- a/meta/classes/testexport.bbclass
+++ b/meta/classes/testexport.bbclass
@@ -33,162 +33,141 @@ TEST_EXPORT_DEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-nativ
TEST_EXPORT_DEPENDS += "${@bb.utils.contains('TEST_EXPORT_SDK_ENABLED', '1', 'testexport-tarball:do_populate_sdk', '', d)}"
TEST_EXPORT_LOCK = "${TMPDIR}/testimage.lock"
-python do_testexport() {
- testexport_main(d)
-}
-
addtask testexport
do_testexport[nostamp] = "1"
do_testexport[depends] += "${TEST_EXPORT_DEPENDS} ${TESTIMAGEDEPENDS}"
do_testexport[lockfiles] += "${TEST_EXPORT_LOCK}"
-def exportTests(d,tc):
+python do_testexport() {
+ testexport_main(d)
+}
+
+def testexport_main(d):
import json
+ import logging
+
+ from oeqa.runtime.context import OERuntimeTestContext
+ from oeqa.runtime.context import OERuntimeTestContextExecutor
+
+ image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'),
+ d.getVar('IMAGE_LINK_NAME')))
+
+ tdname = "%s.testdata.json" % image_name
+ td = json.load(open(tdname, "r"))
+
+ logger = logging.getLogger("BitBake")
+
+ target = OERuntimeTestContextExecutor.getTarget(
+ d.getVar("TEST_TARGET"), None, d.getVar("TEST_TARGET_IP"),
+ d.getVar("TEST_SERVER_IP"))
+
+ host_dumper = OERuntimeTestContextExecutor.getHostDumper(
+ d.getVar("testimage_dump_host"), d.getVar("TESTIMAGE_DUMP_DIR"))
+
+ image_manifest = "%s.manifest" % image_name
+ image_packages = OERuntimeTestContextExecutor.readPackagesManifest(image_manifest)
+
+ extract_dir = d.getVar("TEST_EXTRACTED_DIR")
+
+ tc = OERuntimeTestContext(td, logger, target, host_dumper,
+ image_packages, extract_dir)
+
+ copy_needed_files(d, tc)
+
+def copy_needed_files(d, tc):
import shutil
- import pkgutil
- import re
import oe.path
- exportpath = d.getVar("TEST_EXPORT_DIR", True)
-
- savedata = {}
- savedata["d"] = {}
- savedata["target"] = {}
- savedata["target"]["ip"] = tc.target.ip or d.getVar("TEST_TARGET_IP", True)
- savedata["target"]["server_ip"] = tc.target.server_ip or d.getVar("TEST_SERVER_IP", True)
-
- keys = [ key for key in d.keys() if not key.startswith("_") and not key.startswith("BB") \
- and not key.startswith("B_pn") and not key.startswith("do_") and not d.getVarFlag(key, "func", True)]
- for key in keys:
- try:
- savedata["d"][key] = d.getVar(key, True)
- except bb.data_smart.ExpansionError:
- # we don't care about those anyway
- pass
-
- json_file = os.path.join(exportpath, "testdata.json")
- with open(json_file, "w") as f:
- json.dump(savedata, f, skipkeys=True, indent=4, sort_keys=True)
-
- # Replace absolute path with relative in the file
- exclude_path = os.path.join(d.getVar("COREBASE", True),'meta','lib','oeqa')
- f1 = open(json_file,'r').read()
- f2 = open(json_file,'w')
- m = f1.replace(exclude_path,'oeqa')
- f2.write(m)
- f2.close()
-
- # now start copying files
- # we'll basically copy everything under meta/lib/oeqa, with these exceptions
- # - oeqa/targetcontrol.py - not needed
- # - oeqa/selftest - something else
- # That means:
- # - all tests from oeqa/runtime defined in TEST_SUITES (including from other layers)
- # - the contents of oeqa/utils and oeqa/runtime/files
- # - oeqa/oetest.py and oeqa/runexport.py (this will get copied to exportpath not exportpath/oeqa)
- # - __init__.py files
- bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/runtime/files"))
- bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/utils"))
- # copy test modules, this should cover tests in other layers too
- bbpath = d.getVar("BBPATH", True).split(':')
- for t in tc.testslist:
- isfolder = False
- if re.search("\w+\.\w+\.test_\S+", t):
- t = '.'.join(t.split('.')[:3])
- mod = pkgutil.get_loader(t)
- # More depth than usual?
- if (t.count('.') > 2):
- for p in bbpath:
- foldername = os.path.join(p, 'lib', os.sep.join(t.split('.')).rsplit(os.sep, 1)[0])
- if os.path.isdir(foldername):
- isfolder = True
- target_folder = os.path.join(exportpath, "oeqa", "runtime", os.path.basename(foldername))
- if not os.path.exists(target_folder):
- oe.path.copytree(foldername, target_folder)
- if not isfolder:
- shutil.copy2(mod.path, os.path.join(exportpath, "oeqa/runtime"))
- json_file = "%s.json" % mod.path.rsplit(".", 1)[0]
- if os.path.isfile(json_file):
- shutil.copy2(json_file, os.path.join(exportpath, "oeqa/runtime"))
- # Get meta layer
- for layer in d.getVar("BBLAYERS", True).split():
- if os.path.basename(layer) == "meta":
- meta_layer = layer
- break
- # copy oeqa/oetest.py and oeqa/runexported.py
- oeqadir = os.path.join(meta_layer, "lib/oeqa")
- shutil.copy2(os.path.join(oeqadir, "oetest.py"), os.path.join(exportpath, "oeqa"))
- shutil.copy2(os.path.join(oeqadir, "runexported.py"), exportpath)
- # copy oeqa/utils/*.py
- for root, dirs, files in os.walk(os.path.join(oeqadir, "utils")):
- for f in files:
- if f.endswith(".py"):
- shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/utils"))
- # copy oeqa/runtime/files/*
- for root, dirs, files in os.walk(os.path.join(oeqadir, "runtime/files")):
- for f in files:
- shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/runtime/files"))
+ from oeqa.utils.package_manager import _get_json_file
+ from oeqa.core.utils.test import getSuiteCasesFiles
+
+ export_path = d.getVar('TEST_EXPORT_DIR')
+ corebase_path = d.getVar('COREBASE')
+
+ # Clean everything before starting
+ oe.path.remove(export_path)
+ bb.utils.mkdirhier(os.path.join(export_path, 'lib', 'oeqa'))
+
+ # The source of files to copy are relative to 'COREBASE' directory
+ # The destination is relative to 'TEST_EXPORT_DIR'
+ # Because we are squashing the libraries, we need to remove
+ # the layer/script directory
+ files_to_copy = [ os.path.join('meta', 'lib', 'oeqa', 'core'),
+ os.path.join('meta', 'lib', 'oeqa', 'runtime'),
+ os.path.join('meta', 'lib', 'oeqa', 'files'),
+ os.path.join('meta', 'lib', 'oeqa', 'utils'),
+ os.path.join('scripts', 'oe-test'),
+ os.path.join('scripts', 'lib', 'argparse_oe.py'),
+ os.path.join('scripts', 'lib', 'scriptutils.py'), ]
+
+ for f in files_to_copy:
+ src = os.path.join(corebase_path, f)
+ dst = os.path.join(export_path, f.split('/', 1)[-1])
+ if os.path.isdir(src):
+ oe.path.copytree(src, dst)
+ else:
+ shutil.copy2(src, dst)
+
+ # Remove cases and just copy the ones specified
+ cases_path = os.path.join(export_path, 'lib', 'oeqa', 'runtime', 'cases')
+ oe.path.remove(cases_path)
+ bb.utils.mkdirhier(cases_path)
+ test_paths = get_runtime_paths(d)
+ test_modules = d.getVar('TEST_SUITES').split()
+ tc.loadTests(test_paths, modules=test_modules)
+ for f in getSuiteCasesFiles(tc.suites):
+ shutil.copy2(f, cases_path)
+ json_file = _get_json_file(f)
+ if json_file:
+ shutil.copy2(json_file, cases_path)
+
+ # Copy test data
+ image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'),
+ d.getVar('IMAGE_LINK_NAME')))
+ image_manifest = "%s.manifest" % image_name
+ tdname = "%s.testdata.json" % image_name
+ test_data_path = os.path.join(export_path, 'data')
+ bb.utils.mkdirhier(test_data_path)
+ shutil.copy2(image_manifest, os.path.join(test_data_path, 'manifest'))
+ shutil.copy2(tdname, os.path.join(test_data_path, 'testdata.json'))
+
+ for subdir, dirs, files in os.walk(export_path):
+ for dir in dirs:
+ if dir == '__pycache__':
+ shutil.rmtree(os.path.join(subdir, dir))
# Create tar file for common parts of testexport
- create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR", True))
+ create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR"))
# Copy packages needed for runtime testing
- test_pkg_dir = d.getVar("TEST_NEEDED_PACKAGES_DIR", True)
- if os.listdir(test_pkg_dir):
- export_pkg_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True), "packages")
+ package_extraction(d, tc.suites)
+ test_pkg_dir = d.getVar("TEST_NEEDED_PACKAGES_DIR")
+ if os.path.isdir(test_pkg_dir) and os.listdir(test_pkg_dir):
+ export_pkg_dir = os.path.join(d.getVar("TEST_EXPORT_DIR"), "packages")
oe.path.copytree(test_pkg_dir, export_pkg_dir)
# Create tar file for packages needed by the DUT
- create_tarball(d, "testexport_packages_%s.tar.gz" % d.getVar("MACHINE", True), export_pkg_dir)
+ create_tarball(d, "testexport_packages_%s.tar.gz" % d.getVar("MACHINE"), export_pkg_dir)
# Copy SDK
- if d.getVar("TEST_EXPORT_SDK_ENABLED", True) == "1":
- sdk_deploy = d.getVar("SDK_DEPLOY", True)
- tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME", True)
+ if d.getVar("TEST_EXPORT_SDK_ENABLED") == "1":
+ sdk_deploy = d.getVar("SDK_DEPLOY")
+ tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME")
tarball_path = os.path.join(sdk_deploy, tarball_name)
- export_sdk_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True),
- d.getVar("TEST_EXPORT_SDK_DIR", True))
+ export_sdk_dir = os.path.join(d.getVar("TEST_EXPORT_DIR"),
+ d.getVar("TEST_EXPORT_SDK_DIR"))
bb.utils.mkdirhier(export_sdk_dir)
shutil.copy2(tarball_path, export_sdk_dir)
# Create tar file for the sdk
- create_tarball(d, "testexport_sdk_%s.tar.gz" % d.getVar("SDK_ARCH", True), export_sdk_dir)
-
- bb.plain("Exported tests to: %s" % exportpath)
+ create_tarball(d, "testexport_sdk_%s.tar.gz" % d.getVar("SDK_ARCH"), export_sdk_dir)
-def testexport_main(d):
- from oeqa.oetest import ExportTestContext
- from oeqa.targetcontrol import get_target_controller
- from oeqa.utils.dump import get_host_dumper
-
- test_create_extract_dirs(d)
- export_dir = d.getVar("TEST_EXPORT_DIR", True)
- bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
- bb.utils.remove(export_dir, recurse=True)
- bb.utils.mkdirhier(export_dir)
-
- # the robot dance
- target = get_target_controller(d)
-
- # test context
- tc = ExportTestContext(d, target)
-
- # this is a dummy load of tests
- # we are doing that to find compile errors in the tests themselves
- # before booting the image
- try:
- tc.loadTests()
- except Exception as e:
- import traceback
- bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
-
- tc.extract_packages()
- exportTests(d,tc)
+ bb.plain("Exported tests to: %s" % export_path)
def create_tarball(d, tar_name, src_dir):
import tarfile
- tar_path = os.path.join(d.getVar("TEST_EXPORT_DIR", True), tar_name)
+ tar_path = os.path.join(d.getVar("TEST_EXPORT_DIR"), tar_name)
current_dir = os.getcwd()
src_dir = src_dir.rstrip('/')
dir_name = os.path.dirname(src_dir)
@@ -200,7 +179,4 @@ def create_tarball(d, tar_name, src_dir):
tar.close()
os.chdir(current_dir)
-
-testexport_main[vardepsexclude] =+ "BB_ORIGENV"
-
inherit testimage
diff --git a/meta/classes/testimage-auto.bbclass b/meta/classes/testimage-auto.bbclass
deleted file mode 100644
index e0a22b773c..0000000000
--- a/meta/classes/testimage-auto.bbclass
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (C) 2013 Intel Corporation
-#
-# Released under the MIT license (see COPYING.MIT)
-
-
-# Run tests automatically on an image after the image is constructed
-# (as opposed to testimage.bbclass alone where tests must be called
-# manually using bitbake -c testimage <image>).
-#
-# NOTE: to use this class, simply set TEST_IMAGE = "1" - no need to
-# inherit it since that will be done in image.bbclass when this variable
-# has been set.
-#
-# See testimage.bbclass for the test implementation.
-
-inherit testimage
-
-python do_testimage_auto() {
- testimage_main(d)
-}
-addtask testimage_auto before do_build after do_image_complete
-do_testimage_auto[depends] += "${TESTIMAGEDEPENDS}"
-do_testimage_auto[lockfiles] += "${TESTIMAGELOCK}"
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index a908f92fee..844ed87944 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -2,18 +2,23 @@
#
# Released under the MIT license (see COPYING.MIT)
-
+inherit metadata_scm
# testimage.bbclass enables testing of qemu images using python unittests.
# Most of the tests are commands run on target image over ssh.
# To use it add testimage to global inherit and call your target image with -c testimage
# You can try it out like this:
-# - first build a qemu core-image-sato
-# - add IMAGE_CLASSES += "testimage" in local.conf
+# - first add IMAGE_CLASSES += "testimage" in local.conf
+# - build a qemu core-image-sato
# - then bitbake core-image-sato -c testimage. That will run a standard suite of tests.
+#
+# The tests can be run automatically each time an image is built if you set
+# TESTIMAGE_AUTO = "1"
+
+TESTIMAGE_AUTO ??= "0"
# You can set (or append to) TEST_SUITES in local.conf to select the tests
# which you want to run for your target.
-# The test names are the module names in meta/lib/oeqa/runtime.
+# The test names are the module names in meta/lib/oeqa/runtime/cases.
# Each name in TEST_SUITES represents a required test for the image. (no skipping allowed)
# Appending "auto" means that it will try to run all tests that are suitable for the image (each test decides that on it's own).
# Note that order in TEST_SUITES is relevant: tests are run in an order such that
@@ -26,6 +31,8 @@
# TEST_LOG_DIR contains a command ssh log and may contain infromation about what command is running, output and return codes and for qemu a boot log till login.
# Booting is handled by this class, and it's not a test in itself.
# TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt.
+# TEST_QEMUPARAMS can be used to pass extra parameters to qemu, e.g. "-m 1024" for setting the amount of ram to 1 GB.
+# TEST_RUNQEMUPARAMS can be used to pass extra parameters to runqemu, e.g. "gl" to enable OpenGL acceleration.
TEST_LOG_DIR ?= "${WORKDIR}/testimage"
@@ -35,48 +42,46 @@ TEST_NEEDED_PACKAGES_DIR ?= "${WORKDIR}/testimage/packages"
TEST_EXTRACTED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/extracted"
TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
-RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', d)}"
-MINTESTSUITE = "ping"
-NETTESTSUITE = "${MINTESTSUITE} ssh df date scp syslog"
-DEVTESTSUITE = "gcc kernelmodule ldd"
-
-DEFAULT_TEST_SUITES = "${MINTESTSUITE} auto"
-DEFAULT_TEST_SUITES_pn-core-image-minimal = "${MINTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-minimal-dev = "${MINTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-full-cmdline = "${NETTESTSUITE} perl python logrotate"
-DEFAULT_TEST_SUITES_pn-core-image-x11 = "${MINTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs ${RPMTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg parselogs ${RPMTESTSUITE} \
- ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)}"
-DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} connman xorg perl python \
- ${DEVTESTSUITE} parselogs ${RPMTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcvs buildiptables buildgalculator \
- connman ${DEVTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
+BASICTESTSUITE = "\
+ ping date df ssh scp python perl gi ptest parselogs \
+ logrotate connman systemd oe_syslog pam stap ldd xorg \
+ kernelmodule gcc buildcpio buildlzip buildgalculator \
+ dnf rpm opkg apt"
+
+DEFAULT_TEST_SUITES = "${BASICTESTSUITE}"
# aarch64 has no graphics
DEFAULT_TEST_SUITES_remove_aarch64 = "xorg"
+# musl doesn't support systemtap
+DEFAULT_TEST_SUITES_remove_libc-musl = "stap"
+
+# qemumips is quite slow and has reached the timeout limit several times on the YP build cluster,
+# mitigate this by removing build tests for qemumips machines.
+MIPSREMOVE ??= "buildcpio buildlzip buildgalculator"
+DEFAULT_TEST_SUITES_remove_qemumips = "${MIPSREMOVE}"
+DEFAULT_TEST_SUITES_remove_qemumips64 = "${MIPSREMOVE}"
TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
TEST_QEMUBOOT_TIMEOUT ?= "1000"
TEST_TARGET ?= "qemu"
+TEST_QEMUPARAMS ?= ""
+TEST_RUNQEMUPARAMS ?= ""
TESTIMAGEDEPENDS = ""
-TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot"
+TESTIMAGEDEPENDS_append_qemuall = " qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartpm-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt-native:do_populate_sysroot', '', d)}"
-
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-native:do_populate_sysroot package-index:do_package_index', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt-native:do_populate_sysroot package-index:do_package_index', '', d)}"
TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
TESTIMAGELOCK_qemuall = ""
-TESTIMAGE_DUMP_DIR ?= "/tmp/oe-saved-tests/"
+TESTIMAGE_DUMP_DIR ?= "${LOG_DIR}/runtime-hostdump/"
+
+TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
testimage_dump_target () {
top -bn1
@@ -114,72 +119,312 @@ do_testimage[nostamp] = "1"
do_testimage[depends] += "${TESTIMAGEDEPENDS}"
do_testimage[lockfiles] += "${TESTIMAGELOCK}"
+def testimage_sanity(d):
+ if (d.getVar('TEST_TARGET') == 'simpleremote'
+ and (not d.getVar('TEST_TARGET_IP')
+ or not d.getVar('TEST_SERVER_IP'))):
+ bb.fatal('When TEST_TARGET is set to "simpleremote" '
+ 'TEST_TARGET_IP and TEST_SERVER_IP are needed too.')
+
+def get_testimage_configuration(d, test_type, machine):
+ import platform
+ from oeqa.utils.metadata import get_layers
+ configuration = {'TEST_TYPE': test_type,
+ 'MACHINE': machine,
+ 'DISTRO': d.getVar("DISTRO"),
+ 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"),
+ 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"),
+ 'STARTTIME': d.getVar("DATETIME"),
+ 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
+ 'LAYERS': get_layers(d.getVar("BBLAYERS"))}
+ return configuration
+get_testimage_configuration[vardepsexclude] = "DATETIME"
+
+def get_testimage_json_result_dir(d):
+ json_result_dir = os.path.join(d.getVar("LOG_DIR"), 'oeqa')
+ custom_json_result_dir = d.getVar("OEQA_JSON_RESULT_DIR")
+ if custom_json_result_dir:
+ json_result_dir = custom_json_result_dir
+ return json_result_dir
+
+def get_testimage_result_id(configuration):
+ return '%s_%s_%s_%s' % (configuration['TEST_TYPE'], configuration['IMAGE_BASENAME'], configuration['MACHINE'], configuration['STARTTIME'])
+
def testimage_main(d):
- import unittest
import os
- import oeqa.runtime
- import time
+ import json
import signal
- from oeqa.oetest import ImageTestContext
- from oeqa.targetcontrol import get_target_controller
- from oeqa.utils.dump import get_host_dumper
+ import logging
+
+ from bb.utils import export_proxies
+ from oeqa.core.utils.misc import updateTestData
+ from oeqa.runtime.context import OERuntimeTestContext
+ from oeqa.runtime.context import OERuntimeTestContextExecutor
+ from oeqa.core.target.qemu import supported_fstypes
+ from oeqa.core.utils.test import getSuiteCases
+ from oeqa.utils import make_logger_bitbake_compatible
+
+ def sigterm_exception(signum, stackframe):
+ """
+ Catch SIGTERM from worker in order to stop qemu.
+ """
+ raise RuntimeError
+
+ testimage_sanity(d)
+
+ if (d.getVar('IMAGE_PKGTYPE') == 'rpm'
+ and ('dnf' in d.getVar('TEST_SUITES') or 'auto' in d.getVar('TEST_SUITES'))):
+ create_rpm_index(d)
+
+ logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
+ pn = d.getVar("PN")
+
+ bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR"))
+
+ image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'),
+ d.getVar('IMAGE_LINK_NAME')))
+
+ tdname = "%s.testdata.json" % image_name
+ try:
+ td = json.load(open(tdname, "r"))
+ except (FileNotFoundError) as err:
+ bb.fatal('File %s Not Found. Have you built the image with INHERIT+="testimage" in the conf/local.conf?' % tdname)
+
+ # Some variables need to be updates (mostly paths) with the
+ # ones of the current environment because some tests require them.
+ updateTestData(d, td, d.getVar('TESTIMAGE_UPDATE_VARS').split())
+
+ image_manifest = "%s.manifest" % image_name
+ image_packages = OERuntimeTestContextExecutor.readPackagesManifest(image_manifest)
+
+ extract_dir = d.getVar("TEST_EXTRACTED_DIR")
+
+ # Get machine
+ machine = d.getVar("MACHINE")
+
+ # Get rootfs
+ fstypes = d.getVar('IMAGE_FSTYPES').split()
+ if d.getVar("TEST_TARGET") == "qemu":
+ fstypes = [fs for fs in fstypes if fs in supported_fstypes]
+ if not fstypes:
+ bb.fatal('Unsupported image type built. Add a comptible image to '
+ 'IMAGE_FSTYPES. Supported types: %s' %
+ ', '.join(supported_fstypes))
+ qfstype = fstypes[0]
+ qdeffstype = d.getVar("QB_DEFAULT_FSTYPE")
+ if qdeffstype:
+ qfstype = qdeffstype
+ rootfs = '%s.%s' % (image_name, qfstype)
+
+ # Get tmpdir (not really used, just for compatibility)
+ tmpdir = d.getVar("TMPDIR")
+
+ # Get deploy_dir_image (not really used, just for compatibility)
+ dir_image = d.getVar("DEPLOY_DIR_IMAGE")
+
+ # Get bootlog
+ bootlog = os.path.join(d.getVar("TEST_LOG_DIR"),
+ 'qemu_boot_log.%s' % d.getVar('DATETIME'))
+
+ # Get display
+ display = d.getVar("BB_ORIGENV").getVar("DISPLAY")
+
+ # Get kernel
+ kernel_name = ('%s-%s.bin' % (d.getVar("KERNEL_IMAGETYPE"), machine))
+ kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), kernel_name)
- pn = d.getVar("PN", True)
- bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
- test_create_extract_dirs(d)
+ # Get boottime
+ boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT"))
+
+ # Get use_kvm
+ kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
+
+ slirp = False
+ if d.getVar("QEMU_USE_SLIRP"):
+ slirp = True
+
+ # TODO: We use the current implementatin of qemu runner because of
+ # time constrains, qemu runner really needs a refactor too.
+ target_kwargs = { 'machine' : machine,
+ 'rootfs' : rootfs,
+ 'tmpdir' : tmpdir,
+ 'dir_image' : dir_image,
+ 'display' : display,
+ 'kernel' : kernel,
+ 'boottime' : boottime,
+ 'bootlog' : bootlog,
+ 'kvm' : kvm,
+ 'slirp' : slirp,
+ 'dump_dir' : d.getVar("TESTIMAGE_DUMP_DIR"),
+ }
+
+ # TODO: Currently BBPATH is needed for custom loading of targets.
+ # It would be better to find these modules using instrospection.
+ target_kwargs['target_modules_path'] = d.getVar('BBPATH')
+
+ # hardware controlled targets might need further access
+ target_kwargs['powercontrol_cmd'] = d.getVar("TEST_POWERCONTROL_CMD") or None
+ target_kwargs['powercontrol_extra_args'] = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or ""
+ target_kwargs['serialcontrol_cmd'] = d.getVar("TEST_SERIALCONTROL_CMD") or None
+ target_kwargs['serialcontrol_extra_args'] = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or ""
+
+ def export_ssh_agent(d):
+ import os
+
+ variables = ['SSH_AGENT_PID', 'SSH_AUTH_SOCK']
+ for v in variables:
+ if v not in os.environ.keys():
+ val = d.getVar(v)
+ if val is not None:
+ os.environ[v] = val
+
+ export_ssh_agent(d)
+
+ # runtime use network for download projects for build
+ export_proxies(d)
# we need the host dumper in test context
- host_dumper = get_host_dumper(d)
+ host_dumper = OERuntimeTestContextExecutor.getHostDumper(
+ d.getVar("testimage_dump_host"),
+ d.getVar("TESTIMAGE_DUMP_DIR"))
# the robot dance
- target = get_target_controller(d)
+ target = OERuntimeTestContextExecutor.getTarget(
+ d.getVar("TEST_TARGET"), logger, d.getVar("TEST_TARGET_IP"),
+ d.getVar("TEST_SERVER_IP"), **target_kwargs)
# test context
- tc = ImageTestContext(d, target, host_dumper)
+ tc = OERuntimeTestContext(td, logger, target, host_dumper,
+ image_packages, extract_dir)
- # this is a dummy load of tests
- # we are doing that to find compile errors in the tests themselves
- # before booting the image
- try:
- tc.loadTests()
- except Exception as e:
- import traceback
- bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+ # Load tests before starting the target
+ test_paths = get_runtime_paths(d)
+ test_modules = d.getVar('TEST_SUITES').split()
+ if not test_modules:
+ bb.fatal('Empty test suite, please verify TEST_SUITES variable')
+
+ tc.loadTests(test_paths, modules=test_modules)
+
+ suitecases = getSuiteCases(tc.suites)
+ if not suitecases:
+ bb.fatal('Empty test suite, please verify TEST_SUITES variable')
+ else:
+ bb.debug(2, 'test suites:\n\t%s' % '\n\t'.join([str(c) for c in suitecases]))
- tc.extract_packages()
- target.deploy()
+ package_extraction(d, tc.suites)
+
+ results = None
+ orig_sigterm_handler = signal.signal(signal.SIGTERM, sigterm_exception)
try:
- bootparams = None
- if d.getVar('VIRTUAL-RUNTIME_init_manager', '') == 'systemd':
- bootparams = 'systemd.log_level=debug systemd.log_target=console'
- target.start(extra_bootparams=bootparams)
- starttime = time.time()
- result = tc.runTests()
- stoptime = time.time()
- if result.wasSuccessful():
- bb.plain("%s - Ran %d test%s in %.3fs" % (pn, result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
- msg = "%s - OK - All required tests passed" % pn
- skipped = len(result.skipped)
- if skipped:
- msg += " (skipped=%d)" % skipped
- bb.plain(msg)
+ # We need to check if runqemu ends unexpectedly
+ # or if the worker send us a SIGTERM
+ tc.target.start(params=d.getVar("TEST_QEMUPARAMS"), runqemuparams=d.getVar("TEST_RUNQEMUPARAMS"))
+ results = tc.runTests()
+ except (RuntimeError, BlockingIOError) as err:
+ if isinstance(err, RuntimeError):
+ bb.error('testimage received SIGTERM, shutting down...')
else:
- raise bb.build.FuncFailed("%s - FAILED - check the task log and the ssh log" % pn )
+ bb.error('runqemu failed, shutting down...')
+ if results:
+ results.stop()
+ results = None
finally:
- signal.signal(signal.SIGTERM, tc.origsigtermhandler)
- target.stop()
+ signal.signal(signal.SIGTERM, orig_sigterm_handler)
+ tc.target.stop()
+
+ # Show results (if we have them)
+ if not results:
+ bb.fatal('%s - FAILED - tests were interrupted during execution' % pn, forcelog=True)
+ configuration = get_testimage_configuration(d, 'runtime', machine)
+ results.logDetails(get_testimage_json_result_dir(d),
+ configuration,
+ get_testimage_result_id(configuration),
+ dump_streams=d.getVar('TESTREPORT_FULLLOGS'))
+ results.logSummary(pn)
+ if not results.wasSuccessful():
+ bb.fatal('%s - FAILED - check the task log and the ssh log' % pn, forcelog=True)
+
+def get_runtime_paths(d):
+ """
+ Returns a list of paths where runtime test must reside.
-def test_create_extract_dirs(d):
- install_path = d.getVar("TEST_INSTALL_TMP_DIR", True)
- package_path = d.getVar("TEST_PACKAGED_DIR", True)
- extracted_path = d.getVar("TEST_EXTRACTED_DIR", True)
- bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
- bb.utils.remove(package_path, recurse=True)
- bb.utils.mkdirhier(install_path)
- bb.utils.mkdirhier(package_path)
- bb.utils.mkdirhier(extracted_path)
+ Runtime tests are expected in <LAYER_DIR>/lib/oeqa/runtime/cases/
+ """
+ paths = []
+ for layer in d.getVar('BBLAYERS').split():
+ path = os.path.join(layer, 'lib/oeqa/runtime/cases')
+ if os.path.isdir(path):
+ paths.append(path)
+ return paths
-testimage_main[vardepsexclude] =+ "BB_ORIGENV"
+def create_index(arg):
+ import subprocess
+
+ index_cmd = arg
+ try:
+ bb.note("Executing '%s' ..." % index_cmd)
+ result = subprocess.check_output(index_cmd,
+ stderr=subprocess.STDOUT,
+ shell=True)
+ result = result.decode('utf-8')
+ except subprocess.CalledProcessError as e:
+ return("Index creation command '%s' failed with return code "
+ '%d:\n%s' % (e.cmd, e.returncode, e.output.decode("utf-8")))
+ if result:
+ bb.note(result)
+ return None
+
+def create_rpm_index(d):
+ import glob
+ # Index RPMs
+ rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c")
+ index_cmds = []
+ archs = (d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or '').replace('-', '_')
+
+ for arch in archs.split():
+ rpm_dir = os.path.join(d.getVar('DEPLOY_DIR_RPM'), arch)
+ idx_path = os.path.join(d.getVar('WORKDIR'), 'oe-testimage-repo', arch)
+
+ if not os.path.isdir(rpm_dir):
+ continue
+
+ lockfilename = os.path.join(d.getVar('DEPLOY_DIR_RPM'), 'rpm.lock')
+ lf = bb.utils.lockfile(lockfilename, False)
+ oe.path.copyhardlinktree(rpm_dir, idx_path)
+ # Full indexes overload a 256MB image so reduce the number of rpms
+ # in the feed by filtering to specific packages needed by the tests.
+ package_list = glob.glob(idx_path + "*/*.rpm")
+
+ for pkg in package_list:
+ if not os.path.basename(pkg).startswith(("rpm", "run-postinsts", "busybox", "bash", "update-alternatives", "libc6", "curl", "musl")):
+ bb.utils.remove(pkg)
+
+ bb.utils.unlockfile(lf)
+ cmd = '%s --update -q %s' % (rpm_createrepo, idx_path)
+
+ # Create repodata
+ result = create_index(cmd)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
+
+def package_extraction(d, test_suites):
+ from oeqa.utils.package_manager import find_packages_to_extract
+ from oeqa.utils.package_manager import extract_packages
+
+ bb.utils.remove(d.getVar("TEST_NEEDED_PACKAGES_DIR"), recurse=True)
+ packages = find_packages_to_extract(test_suites)
+ if packages:
+ bb.utils.mkdirhier(d.getVar("TEST_INSTALL_TMP_DIR"))
+ bb.utils.mkdirhier(d.getVar("TEST_PACKAGED_DIR"))
+ bb.utils.mkdirhier(d.getVar("TEST_EXTRACTED_DIR"))
+ extract_packages(d, packages)
+
+testimage_main[vardepsexclude] += "BB_ORIGENV DATETIME"
+
+python () {
+ if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"):
+ bb.build.addtask("testimage", "do_build", "do_image_complete", d)
+}
inherit testsdk
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 0b8716edb5..758a23ac55 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -4,147 +4,47 @@
# testsdk.bbclass enables testing for SDK and Extensible SDK
#
-# For run SDK tests you need to do,
-# - bitbake core-image-sato -c populate_sdk
-# - bitbake core-image-sato -c testsdk
+# To run SDK tests, run the commands:
+# $ bitbake <image-name> -c populate_sdk
+# $ bitbake <image-name> -c testsdk
#
-# For run eSDK tests you need to do,
-# - bitbake core-image-sato -c populate_sdk_ext
-# - bitbake core-image-sato -c testsdkext
-
-TEST_LOG_DIR ?= "${WORKDIR}/testimage"
-TESTSDKLOCK = "${TMPDIR}/testsdk.lock"
-
-def run_test_context(CTestContext, d, testdir, tcname, pn, *args):
- import glob
- import time
-
- targets = glob.glob(d.expand(testdir + "/tc/environment-setup-*"))
- for sdkenv in targets:
- bb.plain("Testing %s" % sdkenv)
- tc = CTestContext(d, testdir, sdkenv, tcname, args)
-
- # this is a dummy load of tests
- # we are doing that to find compile errors in the tests themselves
- # before booting the image
- try:
- tc.loadTests()
- except Exception as e:
- import traceback
- bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
-
- starttime = time.time()
- result = tc.runTests()
- stoptime = time.time()
- if result.wasSuccessful():
- bb.plain("%s SDK(%s):%s - Ran %d test%s in %.3fs" % (pn, os.path.basename(tcname), os.path.basename(sdkenv),result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
- msg = "%s - OK - All required tests passed" % pn
- skipped = len(result.skipped)
- if skipped:
- msg += " (skipped=%d)" % skipped
- bb.plain(msg)
- else:
- raise bb.build.FuncFailed("%s - FAILED - check the task log and the commands log" % pn )
-
-def testsdk_main(d):
- import os
- import oeqa.sdk
- import subprocess
- from oeqa.oetest import SDKTestContext
-
- pn = d.getVar("PN", True)
- bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
+# To run eSDK tests, run the commands:
+# $ bitbake <image-name> -c populate_sdk_ext
+# $ bitbake <image-name> -c testsdkext
+#
+# where "<image-name>" is an image like core-image-sato.
- tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
- if not os.path.exists(tcname):
- bb.fatal("The toolchain is not built. Build it before running the tests: 'bitbake <image> -c populate_sdk' .")
+TESTSDK_CLASS_NAME ?= "oeqa.sdk.testsdk.TestSDK"
+TESTSDKEXT_CLASS_NAME ?= "oeqa.sdkext.testsdk.TestSDKExt"
- sdktestdir = d.expand("${WORKDIR}/testimage-sdk/")
- bb.utils.remove(sdktestdir, True)
- bb.utils.mkdirhier(sdktestdir)
- try:
- subprocess.check_output("cd %s; %s <<EOF\n./tc\nY\nEOF" % (sdktestdir, tcname), shell=True)
- except subprocess.CalledProcessError as e:
- bb.fatal("Couldn't install the SDK:\n%s" % e.output.decode("utf-8"))
+def import_and_run(name, d):
+ import importlib
- try:
- run_test_context(SDKTestContext, d, sdktestdir, tcname, pn)
- finally:
- bb.utils.remove(sdktestdir, True)
+ class_name = d.getVar(name)
+ if class_name:
+ module, cls = class_name.rsplit('.', 1)
+ m = importlib.import_module(module)
+ c = getattr(m, cls)()
+ c.run(d)
+ else:
+ bb.warn('No tests were run because %s did not define a class' % name)
-testsdk_main[vardepsexclude] =+ "BB_ORIGENV"
+import_and_run[vardepsexclude] = "DATETIME BB_ORIGENV"
python do_testsdk() {
- testsdk_main(d)
+ import_and_run('TESTSDK_CLASS_NAME', d)
}
addtask testsdk
do_testsdk[nostamp] = "1"
-do_testsdk[lockfiles] += "${TESTSDKLOCK}"
-
-TEST_LOG_SDKEXT_DIR ?= "${WORKDIR}/testsdkext"
-TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock"
-
-def testsdkext_main(d):
- import os
- import oeqa.sdkext
- import subprocess
- from bb.utils import export_proxies
- from oeqa.oetest import SDKTestContext, SDKExtTestContext
- from oeqa.utils import avoid_paths_in_environ
-
-
- # extensible sdk use network
- export_proxies(d)
-
- # extensible sdk can be contaminated if native programs are
- # in PATH, i.e. use perl-native instead of eSDK one.
- paths_to_avoid = [d.getVar('STAGING_DIR', True),
- d.getVar('BASE_WORKDIR', True)]
- os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid)
-
- pn = d.getVar("PN", True)
- bb.utils.mkdirhier(d.getVar("TEST_LOG_SDKEXT_DIR", True))
-
- tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
- if not os.path.exists(tcname):
- bb.fatal("The toolchain ext is not built. Build it before running the" \
- " tests: 'bitbake <image> -c populate_sdk_ext' .")
-
- testdir = d.expand("${WORKDIR}/testsdkext/")
- bb.utils.remove(testdir, True)
- bb.utils.mkdirhier(testdir)
- sdkdir = os.path.join(testdir, 'tc')
- try:
- subprocess.check_output("%s -y -d %s" % (tcname, sdkdir), shell=True)
- except subprocess.CalledProcessError as e:
- msg = "Couldn't install the extensible SDK:\n%s" % e.output.decode("utf-8")
- logfn = os.path.join(sdkdir, 'preparing_build_system.log')
- if os.path.exists(logfn):
- msg += '\n\nContents of preparing_build_system.log:\n'
- with open(logfn, 'r') as f:
- for line in f:
- msg += line
- bb.fatal(msg)
-
- try:
- bb.plain("Running SDK Compatibility tests ...")
- run_test_context(SDKExtTestContext, d, testdir, tcname, pn, True)
- finally:
- pass
-
- try:
- bb.plain("Running Extensible SDK tests ...")
- run_test_context(SDKExtTestContext, d, testdir, tcname, pn)
- finally:
- pass
-
- bb.utils.remove(testdir, True)
-
-testsdkext_main[vardepsexclude] =+ "BB_ORIGENV"
python do_testsdkext() {
- testsdkext_main(d)
+ import_and_run('TESTSDKEXT_CLASS_NAME', d)
}
addtask testsdkext
do_testsdkext[nostamp] = "1"
-do_testsdkext[lockfiles] += "${TESTSDKEXTLOCK}"
+
+python () {
+ if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"):
+ bb.build.addtask("testsdk", None, "do_populate_sdk", d)
+ bb.build.addtask("testsdkext", None, "do_populate_sdk_ext", d)
+}
diff --git a/meta/classes/texinfo.bbclass b/meta/classes/texinfo.bbclass
index 92efbccddf..6b0def0eac 100644
--- a/meta/classes/texinfo.bbclass
+++ b/meta/classes/texinfo.bbclass
@@ -1,10 +1,10 @@
# This class is inherited by recipes whose upstream packages invoke the
# texinfo utilities at build-time. Native and cross recipes are made to use the
-# dummy scripts provided by texinfo-dummy-native, for improved performance.
-# Target architecture recipes use the genuine Texinfo utilities. By default,
+# dummy scripts provided by texinfo-dummy-native, for improved performance.
+# Target architecture recipes use the genuine Texinfo utilities. By default,
# they use the Texinfo utilities on the host system. If you want to use the
-# Texinfo recipe shipped with yoco, you can remove texinfo-native from
-# ASSUME_PROVIDED and makeinfo from SANITY_REQUIRED_UTILITIES.
+# Texinfo recipe, you can remove texinfo-native from ASSUME_PROVIDED and
+# makeinfo from SANITY_REQUIRED_UTILITIES.
TEXDEP = "texinfo-native"
TEXDEP_class-native = "texinfo-dummy-native"
@@ -13,3 +13,6 @@ DEPENDS_append = " ${TEXDEP}"
PATH_prepend_class-native = "${STAGING_BINDIR_NATIVE}/texinfo-dummy-native:"
PATH_prepend_class-cross = "${STAGING_BINDIR_NATIVE}/texinfo-dummy-native:"
+# libtool-cross doesn't inherit cross
+TEXDEP_pn-libtool-cross = "texinfo-dummy-native"
+PATH_prepend_pn-libtool-cross = "${STAGING_BINDIR_NATIVE}/texinfo-dummy-native:"
diff --git a/meta/classes/tinderclient.bbclass b/meta/classes/tinderclient.bbclass
deleted file mode 100644
index 917b74d887..0000000000
--- a/meta/classes/tinderclient.bbclass
+++ /dev/null
@@ -1,368 +0,0 @@
-def tinder_http_post(server, selector, content_type, body):
- import httplib
- # now post it
- for i in range(0,5):
- try:
- h = httplib.HTTP(server)
- h.putrequest('POST', selector)
- h.putheader('content-type', content_type)
- h.putheader('content-length', str(len(body)))
- h.endheaders()
- h.send(body)
- errcode, errmsg, headers = h.getreply()
- #print(errcode, errmsg, headers)
- return (errcode,errmsg, headers, h.file)
- except:
- print("Error sending the report!")
- # try again
- pass
-
- # return some garbage
- return (-1, "unknown", "unknown", None)
-
-def tinder_form_data(bound, dict, log):
- output = []
- # for each key in the dictionary
- for name in dict:
- assert dict[name]
- output.append( "--" + bound )
- output.append( 'Content-Disposition: form-data; name="%s"' % name )
- output.append( "" )
- output.append( dict[name] )
- if log:
- output.append( "--" + bound )
- output.append( 'Content-Disposition: form-data; name="log"; filename="log.txt"' )
- output.append( '' )
- output.append( log )
- output.append( '--' + bound + '--' )
- output.append( '' )
-
- return "\r\n".join(output)
-
-def tinder_time_string():
- """
- Return the time as GMT
- """
- return ""
-
-def tinder_format_http_post(d,status,log):
- """
- Format the Tinderbox HTTP post with the data needed
- for the tinderbox to be happy.
- """
-
- import random
-
- # the variables we will need to send on this form post
- variables = {
- "tree" : d.getVar('TINDER_TREE', True),
- "machine_name" : d.getVar('TINDER_MACHINE', True),
- "os" : os.uname()[0],
- "os_version" : os.uname()[2],
- "compiler" : "gcc",
- "clobber" : d.getVar('TINDER_CLOBBER', True) or "0",
- "srcdate" : d.getVar('SRCDATE', True),
- "PN" : d.getVar('PN', True),
- "PV" : d.getVar('PV', True),
- "PR" : d.getVar('PR', True),
- "FILE" : d.getVar('FILE', True) or "N/A",
- "TARGETARCH" : d.getVar('TARGET_ARCH', True),
- "TARGETFPU" : d.getVar('TARGET_FPU', True) or "Unknown",
- "TARGETOS" : d.getVar('TARGET_OS', True) or "Unknown",
- "MACHINE" : d.getVar('MACHINE', True) or "Unknown",
- "DISTRO" : d.getVar('DISTRO', True) or "Unknown",
- "zecke-rocks" : "sure",
- }
-
- # optionally add the status
- if status:
- variables["status"] = str(status)
-
- # try to load the machine id
- # we only need on build_status.pl but sending it
- # always does not hurt
- try:
- f = open(d.getVar('TMPDIR',True)+'/tinder-machine.id', 'r')
- id = f.read()
- variables['machine_id'] = id
- except:
- pass
-
- # the boundary we will need
- boundary = "----------------------------------%d" % int(random.random()*1000000000000)
-
- # now format the body
- body = tinder_form_data( boundary, variables, log )
-
- return ("multipart/form-data; boundary=%s" % boundary),body
-
-
-def tinder_build_start(d):
- """
- Inform the tinderbox that a build is starting. We do this
- by posting our name and tree to the build_start.pl script
- on the server.
- """
-
- # get the body and type
- content_type, body = tinder_format_http_post(d,None,None)
- server = d.getVar('TINDER_HOST', True )
- url = d.getVar('TINDER_URL', True )
-
- selector = url + "/xml/build_start.pl"
-
- #print("selector %s and url %s" % (selector, url))
-
- # now post it
- errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body)
- #print(errcode, errmsg, headers)
- report = h_file.read()
-
- # now let us find the machine id that was assigned to us
- search = "<machine id='"
- report = report[report.find(search)+len(search):]
- report = report[0:report.find("'")]
-
- bb.note("Machine ID assigned by tinderbox: %s" % report )
-
- # now we will need to save the machine number
- # we will override any previous numbers
- f = open(d.getVar('TMPDIR', True)+"/tinder-machine.id", 'w')
- f.write(report)
-
-
-def tinder_send_http(d, status, _log):
- """
- Send this log as build status
- """
-
- # get the body and type
- server = d.getVar('TINDER_HOST', True)
- url = d.getVar('TINDER_URL', True)
-
- selector = url + "/xml/build_status.pl"
-
- # now post it - in chunks of 10.000 characters
- new_log = _log
- while len(new_log) > 0:
- content_type, body = tinder_format_http_post(d,status,new_log[0:18000])
- errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body)
- #print(errcode, errmsg, headers)
- #print(h.file.read())
- new_log = new_log[18000:]
-
-
-def tinder_print_info(d):
- """
- Print the TinderBox Info
- Including informations of the BaseSystem and the Tree
- we use.
- """
-
- # get the local vars
- time = tinder_time_string()
- ops = os.uname()[0]
- version = os.uname()[2]
- url = d.getVar( 'TINDER_URL' , True )
- tree = d.getVar( 'TINDER_TREE', True )
- branch = d.getVar( 'TINDER_BRANCH', True )
- srcdate = d.getVar( 'SRCDATE', True )
- machine = d.getVar( 'MACHINE', True )
- distro = d.getVar( 'DISTRO', True )
- bbfiles = d.getVar( 'BBFILES', True )
- tarch = d.getVar( 'TARGET_ARCH', True )
- fpu = d.getVar( 'TARGET_FPU', True )
- oerev = d.getVar( 'OE_REVISION', True ) or "unknown"
-
- # there is a bug with tipple quoted strings
- # i will work around but will fix the original
- # bug as well
- output = []
- output.append("== Tinderbox Info" )
- output.append("Time: %(time)s" )
- output.append("OS: %(ops)s" )
- output.append("%(version)s" )
- output.append("Compiler: gcc" )
- output.append("Tinderbox Client: 0.1" )
- output.append("Tinderbox Client Last Modified: yesterday" )
- output.append("Tinderbox Protocol: 0.1" )
- output.append("URL: %(url)s" )
- output.append("Tree: %(tree)s" )
- output.append("Config:" )
- output.append("branch = '%(branch)s'" )
- output.append("TARGET_ARCH = '%(tarch)s'" )
- output.append("TARGET_FPU = '%(fpu)s'" )
- output.append("SRCDATE = '%(srcdate)s'" )
- output.append("MACHINE = '%(machine)s'" )
- output.append("DISTRO = '%(distro)s'" )
- output.append("BBFILES = '%(bbfiles)s'" )
- output.append("OEREV = '%(oerev)s'" )
- output.append("== End Tinderbox Client Info" )
-
- # now create the real output
- return "\n".join(output) % vars()
-
-
-def tinder_print_env():
- """
- Print the environment variables of this build
- """
- time_start = tinder_time_string()
- time_end = tinder_time_string()
-
- # build the environment
- env = ""
- for var in os.environ:
- env += "%s=%s\n" % (var, os.environ[var])
-
- output = []
- output.append( "---> TINDERBOX RUNNING env %(time_start)s" )
- output.append( env )
- output.append( "<--- TINDERBOX FINISHED (SUCCESS) %(time_end)s" )
-
- return "\n".join(output) % vars()
-
-def tinder_tinder_start(d, event):
- """
- PRINT the configuration of this build
- """
-
- time_start = tinder_time_string()
- config = tinder_print_info(d)
- #env = tinder_print_env()
- time_end = tinder_time_string()
- packages = " ".join( event.getPkgs() )
-
- output = []
- output.append( "---> TINDERBOX PRINTING CONFIGURATION %(time_start)s" )
- output.append( config )
- #output.append( env )
- output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" )
- output.append( "---> TINDERBOX BUILDING '%(packages)s'" )
- output.append( "<--- TINDERBOX STARTING BUILD NOW" )
-
- output.append( "" )
-
- return "\n".join(output) % vars()
-
-def tinder_do_tinder_report(event):
- """
- Report to the tinderbox:
- On the BuildStart we will inform the box directly
- On the other events we will write to the TINDER_LOG and
- when the Task is finished we will send the report.
-
- The above is not yet fully implemented. Currently we send
- information immediately. The caching/queuing needs to be
- implemented. Also sending more or less information is not
- implemented yet.
-
- We have two temporary files stored in the TMP directory. One file
- contains the assigned machine id for the tinderclient. This id gets
- assigned when we connect the box and start the build process the second
- file is used to workaround an EventHandler limitation. If BitBake is ran
- with the continue option we want the Build to fail even if we get the
- BuildCompleted Event. In this case we have to look up the status and
- send it instead of 100/success.
- """
- import glob
-
- # variables
- name = bb.event.getName(event)
- log = ""
- status = 1
- # Check what we need to do Build* shows we start or are done
- if name == "BuildStarted":
- tinder_build_start(event.data)
- log = tinder_tinder_start(event.data,event)
-
- try:
- # truncate the tinder log file
- f = open(event.data.getVar('TINDER_LOG', True), 'w')
- f.write("")
- f.close()
- except:
- pass
-
- try:
- # write a status to the file. This is needed for the -k option
- # of BitBake
- g = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
- g.write("")
- g.close()
- except IOError:
- pass
-
- # Append the Task-Log (compile,configure...) to the log file
- # we will send to the server
- if name == "TaskSucceeded" or name == "TaskFailed":
- log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T', True), event.task))
-
- if len(log_file) != 0:
- to_file = event.data.getVar('TINDER_LOG', True)
- log += "".join(open(log_file[0], 'r').readlines())
-
- # set the right 'HEADER'/Summary for the TinderBox
- if name == "TaskStarted":
- log += "---> TINDERBOX Task %s started\n" % event.task
- elif name == "TaskSucceeded":
- log += "<--- TINDERBOX Task %s done (SUCCESS)\n" % event.task
- elif name == "TaskFailed":
- log += "<--- TINDERBOX Task %s failed (FAILURE)\n" % event.task
- elif name == "PkgStarted":
- log += "---> TINDERBOX Package %s started\n" % event.data.getVar('PF', True)
- elif name == "PkgSucceeded":
- log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % event.data.getVar('PF', True)
- elif name == "PkgFailed":
- if not event.data.getVar('TINDER_AUTOBUILD', True) == "0":
- build.exec_task('do_clean', event.data)
- log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % event.data.getVar('PF', True)
- status = 200
- # remember the failure for the -k case
- h = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
- h.write("200")
- elif name == "BuildCompleted":
- log += "Build Completed\n"
- status = 100
- # Check if we have a old status...
- try:
- h = open(event.data.getVar('TMPDIR',True)+'/tinder-status', 'r')
- status = int(h.read())
- except:
- pass
-
- elif name == "MultipleProviders":
- log += "---> TINDERBOX Multiple Providers\n"
- log += "multiple providers are available (%s);\n" % ", ".join(event.getCandidates())
- log += "consider defining PREFERRED_PROVIDER_%s\n" % event.getItem()
- log += "is runtime: %d\n" % event.isRuntime()
- log += "<--- TINDERBOX Multiple Providers\n"
- elif name == "NoProvider":
- log += "Error: No Provider for: %s\n" % event.getItem()
- log += "Error:Was Runtime: %d\n" % event.isRuntime()
- status = 200
- # remember the failure for the -k case
- h = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
- h.write("200")
-
- # now post the log
- if len(log) == 0:
- return
-
- # for now we will use the http post method as it is the only one
- log_post_method = tinder_send_http
- log_post_method(event.data, status, log)
-
-
-# we want to be an event handler
-addhandler tinderclient_eventhandler
-python tinderclient_eventhandler() {
- if e.data is None or bb.event.getName(e) == "MsgNote":
- return
-
- do_tinder_report = e.data.getVar('TINDER_REPORT', True)
- if do_tinder_report and do_tinder_report == "1":
- tinder_do_tinder_report(e)
-
- return
-}
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 4bddf34e9c..6cef0b8f6e 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -80,7 +80,7 @@ python toaster_layerinfo_dumpdata() {
return layer_info
- bblayers = e.data.getVar("BBLAYERS", True)
+ bblayers = e.data.getVar("BBLAYERS")
llayerinfo = {}
@@ -119,10 +119,10 @@ python toaster_package_dumpdata() {
"""
# No need to try and dumpdata if the recipe isn't generating packages
- if not d.getVar('PACKAGES', True):
+ if not d.getVar('PACKAGES'):
return
- pkgdatadir = d.getVar('PKGDESTWORK', True)
+ pkgdatadir = d.getVar('PKGDESTWORK')
lpkgdata = {}
datadir = os.path.join(pkgdatadir, 'runtime')
@@ -142,7 +142,7 @@ python toaster_artifact_dumpdata() {
"""
event_data = {
- "TOOLCHAIN_OUTPUTNAME": d.getVar("TOOLCHAIN_OUTPUTNAME", True)
+ "TOOLCHAIN_OUTPUTNAME": d.getVar("TOOLCHAIN_OUTPUTNAME")
}
bb.event.fire(bb.event.MetadataEvent("SDKArtifactInfo", event_data), d)
@@ -157,11 +157,11 @@ python toaster_collect_task_stats() {
import bb.utils
import os
- toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist")
-
- if not e.data.getVar('BUILDSTATS_BASE', True):
+ if not e.data.getVar('BUILDSTATS_BASE'):
return # if we don't have buildstats, we cannot collect stats
+ toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE'), "toasterstatlist")
+
def stat_to_float(value):
return float(value.strip('% \n\r'))
@@ -246,7 +246,7 @@ python toaster_buildhistory_dump() {
import re
BUILDHISTORY_DIR = e.data.expand("${TOPDIR}/buildhistory")
BUILDHISTORY_DIR_IMAGE_BASE = e.data.expand("%s/images/${MACHINE_ARCH}/${TCLIBC}/"% BUILDHISTORY_DIR)
- pkgdata_dir = e.data.getVar("PKGDATA_DIR", True)
+ pkgdata_dir = e.data.getVar("PKGDATA_DIR")
# scan the build targets for this build
@@ -265,28 +265,33 @@ python toaster_buildhistory_dump() {
with open("%s/installed-package-sizes.txt" % installed_img_path, "r") as fin:
for line in fin:
line = line.rstrip(";")
- psize, px = line.split("\t")
- punit, pname = px.split(" ")
+ psize, punit, pname = line.split()
# this size is "installed-size" as it measures how much space it takes on disk
images[target][pname.strip()] = {'size':int(psize)*1024, 'depends' : []}
with open("%s/depends.dot" % installed_img_path, "r") as fin:
- p = re.compile(r' -> ')
- dot = re.compile(r'.*style=dotted')
+ p = re.compile(r'\s*"(?P<name>[^"]+)"\s*->\s*"(?P<dep>[^"]+)"(?P<rec>.*?\[style=dotted\])?')
for line in fin:
- line = line.rstrip(';')
- linesplit = p.split(line)
- if len(linesplit) == 2:
- pname = linesplit[0].rstrip('"').strip('"')
- dependsname = linesplit[1].split(" ")[0].strip().strip(";").strip('"').rstrip('"')
- deptype = "depends"
- if dot.match(line):
- deptype = "recommends"
- if not pname in images[target]:
- images[target][pname] = {'size': 0, 'depends' : []}
- if not dependsname in images[target]:
- images[target][dependsname] = {'size': 0, 'depends' : []}
- images[target][pname]['depends'].append((dependsname, deptype))
+ m = p.match(line)
+ if not m:
+ continue
+ pname = m.group('name')
+ dependsname = m.group('dep')
+ deptype = 'recommends' if m.group('rec') else 'depends'
+
+ # If RPM is used for packaging, then there may be
+ # dependencies such as "/bin/sh", which will confuse
+ # _toaster_load_pkgdatafile() later on. While at it, ignore
+ # any dependencies that contain parentheses, e.g.,
+ # "libc.so.6(GLIBC_2.7)".
+ if dependsname.startswith('/') or '(' in dependsname:
+ continue
+
+ if not pname in images[target]:
+ images[target][pname] = {'size': 0, 'depends' : []}
+ if not dependsname in images[target]:
+ images[target][dependsname] = {'size': 0, 'depends' : []}
+ images[target][pname]['depends'].append((dependsname, deptype))
# files-in-image.txt is only generated if an image file is created,
# so the file entries ('syms', 'dirs', 'files') for a target will be
@@ -329,8 +334,18 @@ python toaster_artifacts() {
if e.taskname in ["do_deploy", "do_image_complete", "do_populate_sdk", "do_populate_sdk_ext"]:
d2 = d.createCopy()
d2.setVar('FILE', e.taskfile)
- d2.setVar('SSTATE_MANMACH', d2.expand("${MACHINE}"))
+ # Use 'stamp-extra-info' if present, else use workaround
+ # to determine 'SSTATE_MANMACH'
+ extrainf = d2.getVarFlag(e.taskname, 'stamp-extra-info')
+ if extrainf:
+ d2.setVar('SSTATE_MANMACH', extrainf)
+ else:
+ if "do_populate_sdk" == e.taskname:
+ d2.setVar('SSTATE_MANMACH', d2.expand("${MACHINE}${SDKMACHINE}"))
+ else:
+ d2.setVar('SSTATE_MANMACH', d2.expand("${MACHINE}"))
manifest = oe.sstatesig.sstate_get_manifest_filename(e.taskname[3:], d2)[0]
+
if os.access(manifest, os.R_OK):
with open(manifest) as fmanifest:
artifacts = [fname.strip() for fname in fmanifest]
@@ -357,8 +372,9 @@ do_packagedata_setscene[vardepsexclude] += "toaster_package_dumpdata "
do_package[postfuncs] += "toaster_package_dumpdata "
do_package[vardepsexclude] += "toaster_package_dumpdata "
-do_populate_sdk[postfuncs] += "toaster_artifact_dumpdata "
-do_populate_sdk[vardepsexclude] += "toaster_artifact_dumpdata "
+#do_populate_sdk[postfuncs] += "toaster_artifact_dumpdata "
+#do_populate_sdk[vardepsexclude] += "toaster_artifact_dumpdata "
+
+#do_populate_sdk_ext[postfuncs] += "toaster_artifact_dumpdata "
+#do_populate_sdk_ext[vardepsexclude] += "toaster_artifact_dumpdata "
-do_populate_sdk_ext[postfuncs] += "toaster_artifact_dumpdata "
-do_populate_sdk_ext[vardepsexclude] += "toaster_artifact_dumpdata " \ No newline at end of file
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 0e11f2d7a0..db1d3215ef 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -3,7 +3,6 @@ inherit toolchain-scripts-base siteinfo kernel-arch
# We want to be able to change the value of MULTIMACH_TARGET_SYS, because it
# doesn't always match our expectations... but we default to the stock value
REAL_MULTIMACH_TARGET_SYS ?= "${MULTIMACH_TARGET_SYS}"
-TARGET_CC_ARCH_append_libc-uclibc = " -muclibc"
TARGET_CC_ARCH_append_libc-musl = " -mmusl"
# default debug prefix map isn't valid in the SDK
@@ -25,19 +24,37 @@ toolchain_create_sdk_env_script () {
script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-$multimach_target_sys}
rm -f $script
touch $script
+
+ echo '# Check for LD_LIBRARY_PATH being set, which can break SDK and generally is a bad practice' >> $script
+ echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $script
+ echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script
+ echo '# Only disable this check if you are absolutely know what you are doing!' >> $script
+ echo 'if [ ! -z "$LD_LIBRARY_PATH" ]; then' >> $script
+ echo " echo \"Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'\"" >> $script
+ echo " echo \"but please check why this was set in the first place and that it's safe to unset.\"" >> $script
+ echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script
+ echo ' echo "For more references see:"' >> $script
+ echo ' echo " http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80"' >> $script
+ echo ' echo " http://xahlee.info/UnixResource_dir/_/ldpath.html"' >> $script
+ echo ' return 1' >> $script
+ echo 'fi' >> $script
+
echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script
EXTRAPATH=""
for i in ${CANADIANEXTRAOS}; do
EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH' >> $script
- echo "export CCACHE_PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$CCACHE_PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig' >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
echo "export OECORE_NATIVE_SYSROOT=\"$sdkpathnative\"" >> $script
echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script
echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script
+ echo 'export OECORE_BASELIB="${baselib}"' >> $script
+ echo 'export OECORE_TARGET_ARCH="${TARGET_ARCH}"' >>$script
+ echo 'export OECORE_TARGET_OS="${TARGET_OS}"' >>$script
+
echo 'unset command_not_found_handle' >> $script
toolchain_shared_env_script
@@ -49,8 +66,8 @@ toolchain_create_tree_env_script () {
script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
rm -f $script
touch $script
- echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${PATH}' >> $script
- echo 'export CCACHE_PATH=${STAGING_DIR_NATIVE}/usr/bin:${CCACHE_PATH}' >> $script
+ echo 'orig=`pwd`; cd ${COREBASE}; . ./oe-init-build-env ${TOPDIR}; cd $orig' >> $script
+ echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
@@ -73,6 +90,7 @@ toolchain_shared_env_script () {
echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
+ echo 'export READELF=${TARGET_PREFIX}readelf' >> $script
echo 'export AR=${TARGET_PREFIX}ar' >> $script
echo 'export NM=${TARGET_PREFIX}nm' >> $script
echo 'export M4=m4' >> $script
@@ -104,10 +122,46 @@ fi
EOF
}
+toolchain_create_post_relocate_script() {
+ relocate_script=$1
+ env_dir=$2
+ rm -f $relocate_script
+ touch $relocate_script
+
+ cat >> $relocate_script <<EOF
+if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
+ # Source top-level SDK env scripts in case they are needed for the relocate
+ # scripts.
+ for env_setup_script in ${env_dir}/environment-setup-*; do
+ . \$env_setup_script
+ status=\$?
+ if [ \$status != 0 ]; then
+ echo "\$0: Failed to source \$env_setup_script with status \$status"
+ exit \$status
+ fi
+
+ for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
+ if [ ! -x \$s ]; then
+ continue
+ fi
+ \$s "\$1"
+ status=\$?
+ if [ \$status != 0 ]; then
+ echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2
+ exit \$status
+ fi
+ done
+ done
+ rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
+fi
+EOF
+}
+
#we get the cached site config in the runtime
TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d)}"
TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/${MLPREFIX}libc ncurses"
+DEPENDS += "${TOOLCHAIN_NEED_CONFIGSITE_CACHE}"
#This function create a site config file
toolchain_create_sdk_siteconfig () {
@@ -139,9 +193,9 @@ toolchain_create_sdk_siteconfig[vardepsexclude] = "TOOLCHAIN_CONFIGSITE_SYSROOTC
python __anonymous () {
import oe.classextend
deps = ""
- for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
+ for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or "").split():
deps += " %s:do_populate_sysroot" % dep
- for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
+ for variant in (d.getVar('MULTILIB_VARIANTS') or "").split():
clsextend = oe.classextend.ClassExtender(variant, d)
newdep = clsextend.extend_name(dep)
deps += " %s:do_populate_sysroot" % newdep
diff --git a/meta/classes/typecheck.bbclass b/meta/classes/typecheck.bbclass
index 6bff7c7138..72da932232 100644
--- a/meta/classes/typecheck.bbclass
+++ b/meta/classes/typecheck.bbclass
@@ -5,7 +5,7 @@
python check_types() {
import oe.types
for key in e.data.keys():
- if e.data.getVarFlag(key, "type", True):
+ if e.data.getVarFlag(key, "type"):
oe.data.typed_value(key, e.data)
}
addhandler check_types
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass
index 3f760f2fbe..89ff970fcc 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -14,37 +14,34 @@
UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
python () {
- ubootmachine = d.getVar("UBOOT_MACHINE", True)
+ ubootmachine = d.getVar("UBOOT_MACHINE")
ubootconfigflags = d.getVarFlags('UBOOT_CONFIG')
- ubootbinary = d.getVar('UBOOT_BINARY', True)
- ubootbinaries = d.getVar('UBOOT_BINARIES', True)
+ ubootbinary = d.getVar('UBOOT_BINARY')
+ ubootbinaries = d.getVar('UBOOT_BINARIES')
# The "doc" varflag is special, we don't want to see it here
ubootconfigflags.pop('doc', None)
+ ubootconfig = (d.getVar('UBOOT_CONFIG') or "").split()
- if not ubootmachine and not ubootconfigflags:
- PN = d.getVar("PN", True)
- FILE = os.path.basename(d.getVar("FILE", True))
+ if not ubootmachine and not ubootconfig:
+ PN = d.getVar("PN")
+ FILE = os.path.basename(d.getVar("FILE"))
bb.debug(1, "To build %s, see %s for instructions on \
setting up your machine config" % (PN, FILE))
- raise bb.parse.SkipPackage("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE", True))
+ raise bb.parse.SkipRecipe("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE"))
- if ubootmachine and ubootconfigflags:
- raise bb.parse.SkipPackage("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.")
+ if ubootmachine and ubootconfig:
+ raise bb.parse.SkipRecipe("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.")
if ubootconfigflags and ubootbinaries:
- raise bb.parse.SkipPackage("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.")
+ raise bb.parse.SkipRecipe("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.")
- if not ubootconfigflags:
- return
-
- ubootconfig = (d.getVar('UBOOT_CONFIG', True) or "").split()
if len(ubootconfig) > 0:
for config in ubootconfig:
for f, v in ubootconfigflags.items():
if config == f:
items = v.split(',')
if items[0] and len(items) > 3:
- raise bb.parse.SkipPackage('Only config,images,binary can be specified!')
+ raise bb.parse.SkipRecipe('Only config,images,binary can be specified!')
d.appendVar('UBOOT_MACHINE', ' ' + items[0])
# IMAGE_FSTYPES appending
if len(items) > 1 and items[1]:
@@ -57,6 +54,4 @@ python () {
bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % ubootbinary)
d.appendVar('UBOOT_BINARIES', ' ' + ubootbinary)
break
- elif len(ubootconfig) == 0:
- raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
}
diff --git a/meta/classes/uboot-extlinux-config.bbclass b/meta/classes/uboot-extlinux-config.bbclass
new file mode 100644
index 0000000000..f4bf94be04
--- /dev/null
+++ b/meta/classes/uboot-extlinux-config.bbclass
@@ -0,0 +1,157 @@
+# uboot-extlinux-config.bbclass
+#
+# This class allow the extlinux.conf generation for U-Boot use. The
+# U-Boot support for it is given to allow the Generic Distribution
+# Configuration specification use by OpenEmbedded-based products.
+#
+# External variables:
+#
+# UBOOT_EXTLINUX_CONSOLE - Set to "console=ttyX" to change kernel boot
+# default console.
+# UBOOT_EXTLINUX_LABELS - A list of targets for the automatic config.
+# UBOOT_EXTLINUX_KERNEL_ARGS - Add additional kernel arguments.
+# UBOOT_EXTLINUX_KERNEL_IMAGE - Kernel image name.
+# UBOOT_EXTLINUX_FDTDIR - Device tree directory.
+# UBOOT_EXTLINUX_FDT - Device tree file.
+# UBOOT_EXTLINUX_INITRD - Indicates a list of filesystem images to
+# concatenate and use as an initrd (optional).
+# UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description.
+# UBOOT_EXTLINUX_ROOT - Root kernel cmdline.
+# UBOOT_EXTLINUX_TIMEOUT - Timeout before DEFAULT selection is made.
+# Measured in 1/10 of a second.
+# UBOOT_EXTLINUX_DEFAULT_LABEL - Target to be selected by default after
+# the timeout period
+#
+# If there's only one label system will boot automatically and menu won't be
+# created. If you want to use more than one labels, e.g linux and alternate,
+# use overrides to set menu description, console and others variables.
+#
+# Ex:
+#
+# UBOOT_EXTLINUX_LABELS ??= "default fallback"
+#
+# UBOOT_EXTLINUX_DEFAULT_LABEL ??= "Linux Default"
+# UBOOT_EXTLINUX_TIMEOUT ??= "30"
+#
+# UBOOT_EXTLINUX_KERNEL_IMAGE_default ??= "../zImage"
+# UBOOT_EXTLINUX_MENU_DESCRIPTION_default ??= "Linux Default"
+#
+# UBOOT_EXTLINUX_KERNEL_IMAGE_fallback ??= "../zImage-fallback"
+# UBOOT_EXTLINUX_MENU_DESCRIPTION_fallback ??= "Linux Fallback"
+#
+# Results:
+#
+# menu title Select the boot mode
+# TIMEOUT 30
+# DEFAULT Linux Default
+# LABEL Linux Default
+# KERNEL ../zImage
+# FDTDIR ../
+# APPEND root=/dev/mmcblk2p2 rootwait rw console=${console}
+# LABEL Linux Fallback
+# KERNEL ../zImage-fallback
+# FDTDIR ../
+# APPEND root=/dev/mmcblk2p2 rootwait rw console=${console}
+#
+# Copyright (C) 2016, O.S. Systems Software LTDA. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+#
+# The kernel has an internal default console, which you can override with
+# a console=...some_tty...
+UBOOT_EXTLINUX_CONSOLE ??= "console=${console},${baudrate}"
+UBOOT_EXTLINUX_LABELS ??= "linux"
+UBOOT_EXTLINUX_FDT ??= ""
+UBOOT_EXTLINUX_FDTDIR ??= "../"
+UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}"
+UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw"
+UBOOT_EXTLINUX_MENU_DESCRIPTION_linux ??= "${DISTRO_NAME}"
+
+UBOOT_EXTLINUX_CONFIG = "${B}/extlinux.conf"
+
+python do_create_extlinux_config() {
+ if d.getVar("UBOOT_EXTLINUX") != "1":
+ return
+
+ if not d.getVar('WORKDIR'):
+ bb.error("WORKDIR not defined, unable to package")
+
+ labels = d.getVar('UBOOT_EXTLINUX_LABELS')
+ if not labels:
+ bb.fatal("UBOOT_EXTLINUX_LABELS not defined, nothing to do")
+
+ if not labels.strip():
+ bb.fatal("No labels, nothing to do")
+
+ cfile = d.getVar('UBOOT_EXTLINUX_CONFIG')
+ if not cfile:
+ bb.fatal('Unable to read UBOOT_EXTLINUX_CONFIG')
+
+ localdata = bb.data.createCopy(d)
+
+ try:
+ with open(cfile, 'w') as cfgfile:
+ cfgfile.write('# Generic Distro Configuration file generated by OpenEmbedded\n')
+
+ if len(labels.split()) > 1:
+ cfgfile.write('menu title Select the boot mode\n')
+
+ timeout = localdata.getVar('UBOOT_EXTLINUX_TIMEOUT')
+ if timeout:
+ cfgfile.write('TIMEOUT %s\n' % (timeout))
+
+ if len(labels.split()) > 1:
+ default = localdata.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL')
+ if default:
+ cfgfile.write('DEFAULT %s\n' % (default))
+
+ # Need to deconflict the labels with existing overrides
+ label_overrides = labels.split()
+ default_overrides = localdata.getVar('OVERRIDES').split(':')
+ # We're keeping all the existing overrides that aren't used as a label
+ # an override for that label will be added back in while we're processing that label
+ keep_overrides = list(filter(lambda x: x not in label_overrides, default_overrides))
+
+ for label in labels.split():
+
+ localdata.setVar('OVERRIDES', ':'.join(keep_overrides + [label]))
+
+ extlinux_console = localdata.getVar('UBOOT_EXTLINUX_CONSOLE')
+
+ menu_description = localdata.getVar('UBOOT_EXTLINUX_MENU_DESCRIPTION')
+ if not menu_description:
+ menu_description = label
+
+ root = localdata.getVar('UBOOT_EXTLINUX_ROOT')
+ if not root:
+ bb.fatal('UBOOT_EXTLINUX_ROOT not defined')
+
+ kernel_image = localdata.getVar('UBOOT_EXTLINUX_KERNEL_IMAGE')
+ fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR')
+
+ fdt = localdata.getVar('UBOOT_EXTLINUX_FDT')
+
+ if fdt:
+ cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDT %s\n' %
+ (menu_description, kernel_image, fdt))
+ elif fdtdir:
+ cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDTDIR %s\n' %
+ (menu_description, kernel_image, fdtdir))
+ else:
+ cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image))
+
+ kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS')
+
+ initrd = localdata.getVar('UBOOT_EXTLINUX_INITRD')
+ if initrd:
+ cfgfile.write('\tINITRD %s\n'% initrd)
+
+ kernel_args = root + " " + kernel_args
+ cfgfile.write('\tAPPEND %s %s\n' % (kernel_args, extlinux_console))
+
+ except OSError:
+ bb.fatal('Unable to open %s' % (cfile))
+}
+UBOOT_EXTLINUX_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT KERNEL_ARGS INITRD"
+do_create_extlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s_%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS').split()])}"
+
+addtask create_extlinux_config before do_install do_deploy after do_compile
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index 3c56db8872..982ed46d01 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -19,13 +19,17 @@
# The tasks sequence is set as below, using DEPLOY_IMAGE_DIR as common place to
# treat the device tree blob:
#
-# u-boot:do_deploy_dtb
-# u-boot:do_deploy
-# virtual/kernel:do_assemble_fitimage
-# u-boot:do_concat_dtb
-# u-boot:do_install
+# * u-boot:do_install_append
+# Install UBOOT_DTB_BINARY to datadir, so that kernel can use it for
+# signing, and kernel will deploy UBOOT_DTB_BINARY after signs it.
#
-# For more details on signature process, please refer to U-boot documentation.
+# * virtual/kernel:do_assemble_fitimage
+# Sign the image
+#
+# * u-boot:do_deploy[postfuncs]
+# Deploy files like UBOOT_DTB_IMAGE, UBOOT_DTB_SYMLINK and others.
+#
+# For more details on signature process, please refer to U-Boot documentation.
# Signature activation.
UBOOT_SIGN_ENABLE ?= "0"
@@ -38,58 +42,90 @@ UBOOT_NODTB_IMAGE ?= "u-boot-nodtb-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
UBOOT_NODTB_BINARY ?= "u-boot-nodtb.${UBOOT_SUFFIX}"
UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.${UBOOT_SUFFIX}"
-#
-# Following is relevant only for u-boot recipes:
-#
-
-do_deploy_dtb () {
- mkdir -p ${DEPLOYDIR}
- cd ${DEPLOYDIR}
+# Functions in this bbclass is for u-boot only
+UBOOT_PN = "${@d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'}"
- if [ -f ${B}/${UBOOT_DTB_BINARY} ]; then
- install ${B}/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_IMAGE}
- rm -f ${UBOOT_DTB_BINARY} ${UBOOT_DTB_SYMLINK}
- ln -sf ${UBOOT_DTB_IMAGE} ${UBOOT_DTB_SYMLINK}
- ln -sf ${UBOOT_DTB_IMAGE} ${UBOOT_DTB_BINARY}
+concat_dtb_helper() {
+ if [ -e "${UBOOT_DTB_BINARY}" ]; then
+ ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY}
+ ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_SYMLINK}
fi
- if [ -f ${B}/${UBOOT_NODTB_BINARY} ]; then
- install ${B}/${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}
- rm -f ${UBOOT_NODTB_BINARY} ${UBOOT_NODTB_SYMLINK}
- ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_SYMLINK}
- ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_BINARY}
+
+ if [ -f "${UBOOT_NODTB_BINARY}" ]; then
+ install ${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}
+ ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_SYMLINK}
+ ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY}
fi
-}
-do_concat_dtb () {
# Concatenate U-Boot w/o DTB & DTB with public key
# (cf. kernel-fitimage.bbclass for more details)
- if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ]; then
- if [ "x${UBOOT_SUFFIX}" = "ximg" -o "x${UBOOT_SUFFIX}" = "xrom" ] && \
- [ -e "${DEPLOYDIR}/${UBOOT_DTB_IMAGE}" ]; then
+ deployed_uboot_dtb_binary='${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_IMAGE}'
+ if [ "x${UBOOT_SUFFIX}" = "ximg" -o "x${UBOOT_SUFFIX}" = "xrom" ] && \
+ [ -e "$deployed_uboot_dtb_binary" ]; then
+ oe_runmake EXT_DTB=$deployed_uboot_dtb_binary
+ install ${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+ elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then
+ cd ${DEPLOYDIR}
+ cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${B}/${CONFIG_B_PATH}/${UBOOT_BINARY} > ${UBOOT_IMAGE}
+ else
+ bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."
+ fi
+}
+
+concat_dtb() {
+ if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" -a -n "${UBOOT_DTB_BINARY}" ]; then
+ mkdir -p ${DEPLOYDIR}
+ if [ -n "${UBOOT_CONFIG}" ]; then
+ for config in ${UBOOT_MACHINE}; do
+ CONFIG_B_PATH="${config}"
+ cd ${B}/${config}
+ concat_dtb_helper
+ done
+ else
+ CONFIG_B_PATH=""
cd ${B}
- oe_runmake EXT_DTB=${DEPLOYDIR}/${UBOOT_DTB_IMAGE}
- install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
- install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
- elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "${DEPLOYDIR}/${UBOOT_DTB_IMAGE}" ]; then
- cd ${DEPLOYDIR}
- cat ${UBOOT_NODTB_IMAGE} ${UBOOT_DTB_IMAGE} | tee ${B}/${UBOOT_BINARY} > ${UBOOT_IMAGE}
+ concat_dtb_helper
+ fi
+ fi
+}
+
+# Install UBOOT_DTB_BINARY to datadir, so that kernel can use it for
+# signing, and kernel will deploy UBOOT_DTB_BINARY after signs it.
+install_helper() {
+ if [ -f "${UBOOT_DTB_BINARY}" ]; then
+ install -d ${D}${datadir}
+ # UBOOT_DTB_BINARY is a symlink to UBOOT_DTB_IMAGE, so we
+ # need both of them.
+ install ${UBOOT_DTB_BINARY} ${D}${datadir}/${UBOOT_DTB_IMAGE}
+ ln -sf ${UBOOT_DTB_IMAGE} ${D}${datadir}/${UBOOT_DTB_BINARY}
+ else
+ bbwarn "${UBOOT_DTB_BINARY} not found"
+ fi
+}
+
+do_install_append() {
+ if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" -a -n "${UBOOT_DTB_BINARY}" ]; then
+ if [ -n "${UBOOT_CONFIG}" ]; then
+ for config in ${UBOOT_MACHINE}; do
+ cd ${B}/${config}
+ install_helper
+ done
else
- bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."
+ cd ${B}
+ install_helper
fi
fi
}
python () {
- uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot', True) or 'u-boot'
- if d.getVar('UBOOT_SIGN_ENABLE', True) == '1' and d.getVar('PN', True) == uboot_pn:
- kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel', True)
+ if d.getVar('UBOOT_SIGN_ENABLE') == '1' and d.getVar('PN') == d.getVar('UBOOT_PN') and d.getVar('UBOOT_DTB_BINARY'):
+ kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel')
- # u-boot.dtb and u-boot-nodtb.bin are deployed _before_ do_deploy
- # Thus, do_deploy_setscene will also populate them in DEPLOY_IMAGE_DIR
- bb.build.addtask('do_deploy_dtb', 'do_deploy', 'do_compile', d)
+ # Make "bitbake u-boot -cdeploy" deploys the signed u-boot.dtb
+ d.appendVarFlag('do_deploy', 'depends', ' %s:do_deploy' % kernel_pn)
- # do_concat_dtb is scheduled _before_ do_install as it overwrite the
- # u-boot.bin in both DEPLOYDIR and DEPLOY_IMAGE_DIR.
- bb.build.addtask('do_concat_dtb', 'do_install', None, d)
- d.appendVarFlag('do_concat_dtb', 'depends', ' %s:do_assemble_fitimage' % kernel_pn)
+ # kernerl's do_deploy is a litle special, so we can't use
+ # do_deploy_append, otherwise it would override
+ # kernel_do_deploy.
+ d.appendVarFlag('do_deploy', 'prefuncs', ' concat_dtb')
}
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 89cec07d78..9f8645a36a 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -1,22 +1,16 @@
-UNINATIVE_LOADER ?= "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/lib/${@bb.utils.contains('BUILD_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
+UNINATIVE_LOADER ?= "${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux/lib/${@bb.utils.contains('BUILD_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', '', d)}${@bb.utils.contains('BUILD_ARCH', 'i686', 'ld-linux.so.2', '', d)}${@bb.utils.contains('BUILD_ARCH', 'aarch64', 'ld-linux-aarch64.so.1', '', d)}"
+UNINATIVE_STAGING_DIR ?= "${STAGING_DIR}"
UNINATIVE_URL ?= "unset"
-UNINATIVE_TARBALL ?= "${BUILD_ARCH}-nativesdk-libc.tar.bz2"
+UNINATIVE_TARBALL ?= "${BUILD_ARCH}-nativesdk-libc.tar.xz"
# Example checksums
-#UNINATIVE_CHECKSUM[i586] = "dead"
+#UNINATIVE_CHECKSUM[aarch64] = "dead"
+#UNINATIVE_CHECKSUM[i686] = "dead"
#UNINATIVE_CHECKSUM[x86_64] = "dead"
UNINATIVE_DLDIR ?= "${DL_DIR}/uninative/"
-# https://wiki.debian.org/GCC5
-# We may see binaries built with gcc5 run or linked into gcc4 environment
-# so use the older libstdc++ standard for now until we don't support gcc4
-# on the host system.
-BUILD_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0"
-
-#
-# icu configure defaults to CXX11 if no -std= option is passed in CXXFLAGS
-# therefore pass one
-BUILD_CXXFLAGS_append_pn-icu-native = " -std=c++98"
+# Enabling uninative will change the following variables so they need to go the parsing white list to prevent multiple recipe parsing
+BB_HASHCONFIG_WHITELIST += "NATIVELSBSTRING SSTATEPOSTUNPACKFUNCS BUILD_LDFLAGS"
addhandler uninative_event_fetchloader
uninative_event_fetchloader[eventmask] = "bb.event.BuildStarted"
@@ -30,11 +24,11 @@ python uninative_event_fetchloader() {
loader isn't already present.
"""
- chksum = d.getVarFlag("UNINATIVE_CHECKSUM", d.getVar("BUILD_ARCH", True), True)
+ chksum = d.getVarFlag("UNINATIVE_CHECKSUM", d.getVar("BUILD_ARCH"))
if not chksum:
- bb.fatal("Uninative selected but not configured correctly, please set UNINATIVE_CHECKSUM[%s]" % d.getVar("BUILD_ARCH", True))
+ bb.fatal("Uninative selected but not configured correctly, please set UNINATIVE_CHECKSUM[%s]" % d.getVar("BUILD_ARCH"))
- loader = d.getVar("UNINATIVE_LOADER", True)
+ loader = d.getVar("UNINATIVE_LOADER")
loaderchksum = loader + ".chksum"
if os.path.exists(loader) and os.path.exists(loaderchksum):
with open(loaderchksum, "r") as f:
@@ -47,18 +41,24 @@ python uninative_event_fetchloader() {
# Save and restore cwd as Fetch.download() does a chdir()
olddir = os.getcwd()
- tarball = d.getVar("UNINATIVE_TARBALL", True)
- tarballdir = os.path.join(d.getVar("UNINATIVE_DLDIR", True), chksum)
+ tarball = d.getVar("UNINATIVE_TARBALL")
+ tarballdir = os.path.join(d.getVar("UNINATIVE_DLDIR"), chksum)
tarballpath = os.path.join(tarballdir, tarball)
- if not os.path.exists(tarballpath):
+ if not os.path.exists(tarballpath + ".done"):
bb.utils.mkdirhier(tarballdir)
- if d.getVar("UNINATIVE_URL", True) == "unset":
+ if d.getVar("UNINATIVE_URL") == "unset":
bb.fatal("Uninative selected but not configured, please set UNINATIVE_URL")
localdata = bb.data.createCopy(d)
localdata.setVar('FILESPATH', "")
localdata.setVar('DL_DIR', tarballdir)
+ # Our games with path manipulation of DL_DIR mean standard PREMIRRORS don't work
+ # and we can't easily put 'chksum' into the url path from a url parameter with
+ # the current fetcher url handling
+ ownmirror = d.getVar('SOURCE_MIRROR_URL')
+ if ownmirror:
+ localdata.appendVar("PREMIRRORS", " ${UNINATIVE_URL}${UNINATIVE_TARBALL} ${SOURCE_MIRROR_URL}/uninative/%s/${UNINATIVE_TARBALL}" % chksum)
srcuri = d.expand("${UNINATIVE_URL}${UNINATIVE_TARBALL};sha256sum=%s" % chksum)
bb.note("Fetching uninative binary shim from %s" % srcuri)
@@ -67,16 +67,44 @@ python uninative_event_fetchloader() {
fetcher.download()
localpath = fetcher.localpath(srcuri)
if localpath != tarballpath and os.path.exists(localpath) and not os.path.exists(tarballpath):
+ # Follow the symlink behavior from the bitbake fetch2.
+ # This will cover the case where an existing symlink is broken
+ # as well as if there are two processes trying to create it
+ # at the same time.
+ if os.path.islink(tarballpath):
+ # Broken symbolic link
+ os.unlink(tarballpath)
+
+ # Deal with two processes trying to make symlink at once
+ try:
os.symlink(localpath, tarballpath)
-
- cmd = d.expand("mkdir -p ${STAGING_DIR}-uninative; cd ${STAGING_DIR}-uninative; tar -xjf ${UNINATIVE_DLDIR}/%s/${UNINATIVE_TARBALL}; ${STAGING_DIR}-uninative/relocate_sdk.py ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${base_libdir_native}/libc*.so" % chksum)
- subprocess.check_call(cmd, shell=True)
+ except FileExistsError:
+ pass
+
+ # ldd output is "ldd (Ubuntu GLIBC 2.23-0ubuntu10) 2.23", extract last option from first line
+ glibcver = subprocess.check_output(["ldd", "--version"]).decode('utf-8').split('\n')[0].split()[-1]
+ if bb.utils.vercmp_string(d.getVar("UNINATIVE_MAXGLIBCVERSION"), glibcver) < 0:
+ raise RuntimeError("Your host glibc verson (%s) is newer than that in uninative (%s). Disabling uninative so that sstate is not corrupted." % (glibcver, d.getVar("UNINATIVE_MAXGLIBCVERSION")))
+
+ cmd = d.expand("\
+mkdir -p ${UNINATIVE_STAGING_DIR}-uninative; \
+cd ${UNINATIVE_STAGING_DIR}-uninative; \
+tar -xJf ${UNINATIVE_DLDIR}/%s/${UNINATIVE_TARBALL}; \
+${UNINATIVE_STAGING_DIR}-uninative/relocate_sdk.py \
+ ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux \
+ ${UNINATIVE_LOADER} \
+ ${UNINATIVE_LOADER} \
+ ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative \
+ ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux${base_libdir_native}/libc*.so" % chksum)
+ subprocess.check_output(cmd, shell=True)
with open(loaderchksum, "w") as f:
f.write(chksum)
enable_uninative(d)
+ except RuntimeError as e:
+ bb.warn(str(e))
except bb.fetch2.BBFetchException as exc:
bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc))
bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.")
@@ -96,11 +124,15 @@ python uninative_event_enable() {
}
def enable_uninative(d):
- loader = d.getVar("UNINATIVE_LOADER", True)
+ loader = d.getVar("UNINATIVE_LOADER")
if os.path.exists(loader):
bb.debug(2, "Enabling uninative")
- d.setVar("NATIVELSBSTRING", "universal")
+ d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d))
d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
+ d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp")
+ d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
+ d.appendVarFlag("BUILD_LDFLAGS", "vardepvalueexclude", "| -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
+ d.appendVarFlag("BUILD_LDFLAGS", "vardepsexclude", "UNINATIVE_LOADER")
d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
python uninative_changeinterp () {
@@ -111,7 +143,7 @@ python uninative_changeinterp () {
if not (bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d)):
return
- sstateinst = d.getVar('SSTATE_INSTDIR', True)
+ sstateinst = d.getVar('SSTATE_INSTDIR')
for walkroot, dirs, files in os.walk(sstateinst):
for file in files:
if file.endswith(".so") or ".so." in file:
@@ -130,11 +162,5 @@ python uninative_changeinterp () {
if not elf.isDynamic():
continue
- try:
- subprocess.check_output(("patchelf-uninative", "--set-interpreter",
- d.getVar("UNINATIVE_LOADER", True), f),
- stderr=subprocess.STDOUT)
- except subprocess.CalledProcessError as e:
- bb.fatal("'%s' failed with exit code %d and the following output:\n%s" %
- (e.cmd, e.returncode, e.output))
+ subprocess.check_output(("patchelf-uninative", "--set-interpreter", d.getVar("UNINATIVE_LOADER"), f), stderr=subprocess.STDOUT)
}
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 1fdd681315..8c2b66e7f1 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -65,9 +65,11 @@ ALTERNATIVE_PRIORITY = "10"
# and include that vairable in the set.
UPDALTVARS = "ALTERNATIVE ALTERNATIVE_LINK_NAME ALTERNATIVE_TARGET ALTERNATIVE_PRIORITY"
+PACKAGE_WRITE_DEPS += "virtual/update-alternatives-native"
+
def gen_updatealternativesvardeps(d):
- pkgs = (d.getVar("PACKAGES", True) or "").split()
- vars = (d.getVar("UPDALTVARS", True) or "").split()
+ pkgs = (d.getVar("PACKAGES") or "").split()
+ vars = (d.getVar("UPDALTVARS") or "").split()
# First compute them for non_pkg versions
for v in vars:
@@ -84,14 +86,24 @@ def gen_updatealternativesvardeps(d):
d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False)))
def ua_extend_depends(d):
- if not 'virtual/update-alternatives' in d.getVar('PROVIDES', True):
+ if not 'virtual/update-alternatives' in d.getVar('PROVIDES'):
d.appendVar('DEPENDS', ' virtual/${MLPREFIX}update-alternatives')
-python __anonymous() {
+def update_alternatives_enabled(d):
# Update Alternatives only works on target packages...
if bb.data.inherits_class('native', d) or \
bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or \
bb.data.inherits_class('cross-canadian', d):
+ return False
+
+ # Disable when targeting mingw32 (no target support)
+ if d.getVar("TARGET_OS") == "mingw32":
+ return False
+
+ return True
+
+python __anonymous() {
+ if not update_alternatives_enabled(d):
return
# compute special vardeps
@@ -103,8 +115,8 @@ python __anonymous() {
def gen_updatealternativesvars(d):
ret = []
- pkgs = (d.getVar("PACKAGES", True) or "").split()
- vars = (d.getVar("UPDALTVARS", True) or "").split()
+ pkgs = (d.getVar("PACKAGES") or "").split()
+ vars = (d.getVar("UPDALTVARS") or "").split()
for v in vars:
ret.append(v + "_VARDEPS")
@@ -119,27 +131,43 @@ def gen_updatealternativesvars(d):
populate_packages[vardeps] += "${UPDALTVARS} ${@gen_updatealternativesvars(d)}"
# We need to do the rename after the image creation step, but before
-# the split and strip steps.. packagecopy seems to be the earliest reasonable
-# place.
-python perform_packagecopy_append () {
+# the split and strip steps.. PACKAGE_PREPROCESS_FUNCS is the right
+# place for that.
+PACKAGE_PREPROCESS_FUNCS += "apply_update_alternative_renames"
+python apply_update_alternative_renames () {
+ if not update_alternatives_enabled(d):
+ return
+
+ import re
+
+ def update_files(alt_target, alt_target_rename, pkg, d):
+ f = d.getVar('FILES_' + pkg)
+ if f:
+ f = re.sub(r'(^|\s)%s(\s|$)' % re.escape (alt_target), r'\1%s\2' % alt_target_rename, f)
+ d.setVar('FILES_' + pkg, f)
+
# Check for deprecated usage...
- pn = d.getVar('BPN', True)
- if d.getVar('ALTERNATIVE_LINKS', True) != None:
+ pn = d.getVar('BPN')
+ if d.getVar('ALTERNATIVE_LINKS') != None:
bb.fatal('%s: Use of ALTERNATIVE_LINKS/ALTERNATIVE_PATH/ALTERNATIVE_NAME is no longer supported, please convert to the updated syntax, see update-alternatives.bbclass for more info.' % pn)
# Do actual update alternatives processing
- pkgdest = d.getVar('PKGD', True)
- for pkg in (d.getVar('PACKAGES', True) or "").split():
+ pkgdest = d.getVar('PKGD')
+ for pkg in (d.getVar('PACKAGES') or "").split():
# If the src == dest, we know we need to rename the dest by appending ${BPN}
- link_rename = {}
- for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split():
- alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True)
+ link_rename = []
+ for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split():
+ alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name)
if not alt_link:
- alt_link = "%s/%s" % (d.getVar('bindir', True), alt_name)
+ alt_link = "%s/%s" % (d.getVar('bindir'), alt_name)
d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link)
+ if alt_link.startswith(os.path.join(d.getVar('sysconfdir'), 'init.d')):
+ # Managing init scripts does not work (bug #10433), foremost
+ # because of a race with update-rc.d
+ bb.fatal("Using update-alternatives for managing SysV init scripts is not supported")
- alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name, True)
- alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True) or d.getVar('ALTERNATIVE_TARGET', True) or alt_link
+ alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name)
+ alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link
# Sometimes alt_target is specified as relative to the link name.
alt_target = os.path.join(os.path.dirname(alt_link), alt_target)
@@ -153,10 +181,11 @@ python perform_packagecopy_append () {
elif os.path.lexists(src):
if os.path.islink(src):
# Delay rename of links
- link_rename[alt_target] = alt_target_rename
+ link_rename.append((alt_target, alt_target_rename))
else:
bb.note('%s: Rename %s -> %s' % (pn, alt_target, alt_target_rename))
os.rename(src, dest)
+ update_files(alt_target, alt_target_rename, pkg, d)
else:
bb.warn("%s: alternative target (%s or %s) does not exist, skipping..." % (pn, alt_target, alt_target_rename))
continue
@@ -164,92 +193,124 @@ python perform_packagecopy_append () {
# Process delayed link names
# Do these after other renames so we can correct broken links
- for alt_target in link_rename:
+ for (alt_target, alt_target_rename) in link_rename:
src = '%s/%s' % (pkgdest, alt_target)
- dest = '%s/%s' % (pkgdest, link_rename[alt_target])
- link = os.readlink(src)
+ dest = '%s/%s' % (pkgdest, alt_target_rename)
link_target = oe.path.realpath(src, pkgdest, True)
if os.path.lexists(link_target):
# Ok, the link_target exists, we can rename
- bb.note('%s: Rename (link) %s -> %s' % (pn, alt_target, link_rename[alt_target]))
+ bb.note('%s: Rename (link) %s -> %s' % (pn, alt_target, alt_target_rename))
os.rename(src, dest)
else:
# Try to resolve the broken link to link.${BPN}
link_maybe = '%s.%s' % (os.readlink(src), pn)
if os.path.lexists(os.path.join(os.path.dirname(src), link_maybe)):
# Ok, the renamed link target exists.. create a new link, and remove the original
- bb.note('%s: Creating new link %s -> %s' % (pn, link_rename[alt_target], link_maybe))
+ bb.note('%s: Creating new link %s -> %s' % (pn, alt_target_rename, link_maybe))
os.symlink(link_maybe, dest)
os.unlink(src)
else:
bb.warn('%s: Unable to resolve dangling symlink: %s' % (pn, alt_target))
+ continue
+ update_files(alt_target, alt_target_rename, pkg, d)
}
+def update_alternatives_alt_targets(d, pkg):
+ """
+ Returns the update-alternatives metadata for a package.
+
+ The returned format is a list of tuples where the tuple contains:
+ alt_name: The binary name
+ alt_link: The path for the binary (Shared by different packages)
+ alt_target: The path for the renamed binary (Unique per package)
+ alt_priority: The priority of the alt_target
+
+ All the alt_targets will be installed into the sysroot. The alt_link is
+ a symlink pointing to the alt_target with the highest priority.
+ """
+
+ pn = d.getVar('BPN')
+ pkgdest = d.getVar('PKGD')
+ updates = list()
+ for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split():
+ alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name)
+ alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or \
+ d.getVarFlag('ALTERNATIVE_TARGET', alt_name) or \
+ d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or \
+ d.getVar('ALTERNATIVE_TARGET') or \
+ alt_link
+ alt_priority = d.getVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg, alt_name) or \
+ d.getVarFlag('ALTERNATIVE_PRIORITY', alt_name) or \
+ d.getVar('ALTERNATIVE_PRIORITY_%s' % pkg) or \
+ d.getVar('ALTERNATIVE_PRIORITY')
+
+ # This shouldn't trigger, as it should have been resolved earlier!
+ if alt_link == alt_target:
+ bb.note('alt_link == alt_target: %s == %s -- correcting, this should not happen!' % (alt_link, alt_target))
+ alt_target = '%s.%s' % (alt_target, pn)
+
+ if not os.path.lexists('%s/%s' % (pkgdest, alt_target)):
+ bb.warn('%s: NOT adding alternative provide %s: %s does not exist' % (pn, alt_link, alt_target))
+ continue
+
+ alt_target = os.path.normpath(alt_target)
+ updates.append( (alt_name, alt_link, alt_target, alt_priority) )
+
+ return updates
+
PACKAGESPLITFUNCS_prepend = "populate_packages_updatealternatives "
python populate_packages_updatealternatives () {
- pn = d.getVar('BPN', True)
+ if not update_alternatives_enabled(d):
+ return
# Do actual update alternatives processing
- pkgdest = d.getVar('PKGD', True)
- for pkg in (d.getVar('PACKAGES', True) or "").split():
+ for pkg in (d.getVar('PACKAGES') or "").split():
# Create post install/removal scripts
alt_setup_links = ""
alt_remove_links = ""
- for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split():
- alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True)
- alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name, True)
- alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True) or d.getVar('ALTERNATIVE_TARGET', True) or alt_link
- # Sometimes alt_target is specified as relative to the link name.
- alt_target = os.path.join(os.path.dirname(alt_link), alt_target)
-
- alt_priority = d.getVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_PRIORITY', alt_name, True)
- alt_priority = alt_priority or d.getVar('ALTERNATIVE_PRIORITY_%s' % pkg, True) or d.getVar('ALTERNATIVE_PRIORITY', True)
-
- # This shouldn't trigger, as it should have been resolved earlier!
- if alt_link == alt_target:
- bb.note('alt_link == alt_target: %s == %s -- correcting, this should not happen!' % (alt_link, alt_target))
- alt_target = '%s.%s' % (alt_target, pn)
-
- if not os.path.lexists('%s/%s' % (pkgdest, alt_target)):
- bb.warn('%s: NOT adding alternative provide %s: %s does not exist' % (pn, alt_link, alt_target))
- continue
-
- # Default to generate shell script.. eventually we may want to change this...
- alt_target = os.path.normpath(alt_target)
-
+ updates = update_alternatives_alt_targets(d, pkg)
+ for alt_name, alt_link, alt_target, alt_priority in updates:
alt_setup_links += '\tupdate-alternatives --install %s %s %s %s\n' % (alt_link, alt_name, alt_target, alt_priority)
alt_remove_links += '\tupdate-alternatives --remove %s %s\n' % (alt_name, alt_target)
if alt_setup_links:
# RDEPENDS setup
- provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True)
+ provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives')
if provider:
#bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
d.appendVar('RDEPENDS_%s' % pkg, ' ' + d.getVar('MLPREFIX', False) + provider)
bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg)
bb.note('%s' % alt_setup_links)
- postinst = d.getVar('pkg_postinst_%s' % pkg, True) or '#!/bin/sh\n'
- postinst += alt_setup_links
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
+ if postinst:
+ postinst = alt_setup_links + postinst
+ else:
+ postinst = '#!/bin/sh\n' + alt_setup_links
d.setVar('pkg_postinst_%s' % pkg, postinst)
bb.note('%s' % alt_remove_links)
- prerm = d.getVar('pkg_prerm_%s' % pkg, True) or '#!/bin/sh\n'
+ prerm = d.getVar('pkg_prerm_%s' % pkg) or '#!/bin/sh\n'
prerm += alt_remove_links
d.setVar('pkg_prerm_%s' % pkg, prerm)
}
python package_do_filedeps_append () {
- pn = d.getVar('BPN', True)
- pkgdest = d.getVar('PKGDEST', True)
+ if update_alternatives_enabled(d):
+ apply_update_alternative_provides(d)
+}
+
+def apply_update_alternative_provides(d):
+ pn = d.getVar('BPN')
+ pkgdest = d.getVar('PKGDEST')
- for pkg in packages.split():
- for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split():
- alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True)
- alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name, True)
- alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True) or d.getVar('ALTERNATIVE_TARGET', True) or alt_link
+ for pkg in d.getVar('PACKAGES').split():
+ for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split():
+ alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name)
+ alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name)
+ alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link
if alt_link == alt_target:
bb.warn('%s: alt_link == alt_target: %s == %s' % (pn, alt_link, alt_target))
@@ -261,7 +322,6 @@ python package_do_filedeps_append () {
# Add file provide
trans_target = oe.package.file_translate(alt_target)
d.appendVar('FILERPROVIDES_%s_%s' % (trans_target, pkg), " " + alt_link)
- if not trans_target in (d.getVar('FILERPROVIDESFLIST_%s' % pkg, True) or ""):
+ if not trans_target in (d.getVar('FILERPROVIDESFLIST_%s' % pkg) or ""):
d.appendVar('FILERPROVIDESFLIST_%s' % pkg, " " + trans_target)
-}
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 82b80245d4..1366fee653 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -1,6 +1,6 @@
UPDATERCPN ?= "${PN}"
-DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' update-rc.d-native update-rc.d initscripts', '', d)}"
+DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' update-rc.d initscripts', '', d)}"
UPDATERCD = "update-rc.d"
UPDATERCD_class-cross = ""
@@ -11,22 +11,19 @@ INITSCRIPT_PARAMS ?= "defaults"
INIT_D_DIR = "${sysconfdir}/init.d"
-updatercd_preinst() {
-if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
- ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
-fi
-if type update-rc.d >/dev/null 2>/dev/null; then
- if [ -n "$D" ]; then
- OPT="-f -r $D"
- else
- OPT="-f"
- fi
- update-rc.d $OPT ${INITSCRIPT_NAME} remove
-fi
-}
+def use_updatercd(d):
+ # If the distro supports both sysvinit and systemd, and the current recipe
+ # supports systemd, only call update-rc.d on rootfs creation or if systemd
+ # is not running. That's because systemctl enable/disable will already call
+ # update-rc.d if it detects initscripts.
+ if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and bb.data.inherits_class('systemd', d):
+ return '[ -n "$D" -o ! -d /run/systemd/system ]'
+ return 'true'
+
+PACKAGE_WRITE_DEPS += "update-rc.d-native"
updatercd_postinst() {
-if type update-rc.d >/dev/null 2>/dev/null; then
+if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-r $D"
else
@@ -37,13 +34,13 @@ fi
}
updatercd_prerm() {
-if [ -z "$D" ]; then
- ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
+if ${@use_updatercd(d)} && [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
+ ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
fi
}
updatercd_postrm() {
-if type update-rc.d >/dev/null 2>/dev/null; then
+if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-f -r $D"
else
@@ -57,9 +54,9 @@ fi
def update_rc_after_parse(d):
if d.getVar('INITSCRIPT_PACKAGES', False) == None:
if d.getVar('INITSCRIPT_NAME', False) == None:
- raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % d.getVar('FILE', False))
+ bb.fatal("%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % d.getVar('FILE', False))
if d.getVar('INITSCRIPT_PARAMS', False) == None:
- raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % d.getVar('FILE', False))
+ bb.fatal("%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % d.getVar('FILE', False))
python __anonymous() {
update_rc_after_parse(d)
@@ -68,7 +65,7 @@ python __anonymous() {
PACKAGESPLITFUNCS_prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'populate_packages_updatercd ', '', d)}"
PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd "
-populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst"
+populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_postinst"
populate_packages_updatercd[vardepsexclude] += "OVERRIDES"
python populate_packages_updatercd () {
@@ -80,52 +77,45 @@ python populate_packages_updatercd () {
return
statement = "grep -q -w '/etc/init.d/functions' %s" % path
if subprocess.call(statement, shell=True) == 0:
- mlprefix = d.getVar('MLPREFIX', True) or ""
- d.appendVar('RDEPENDS_' + pkg, ' %sinitscripts-functions' % (mlprefix))
+ mlprefix = d.getVar('MLPREFIX') or ""
+ d.appendVar('RDEPENDS_' + pkg, ' %sinitd-functions' % (mlprefix))
def update_rcd_package(pkg):
- bb.debug(1, 'adding update-rc.d calls to preinst/postinst/prerm/postrm for %s' % pkg)
+ bb.debug(1, 'adding update-rc.d calls to postinst/prerm/postrm for %s' % pkg)
localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", True)
+ overrides = localdata.getVar("OVERRIDES")
localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides))
- bb.data.update_data(localdata)
update_rcd_auto_depend(pkg)
- preinst = d.getVar('pkg_preinst_%s' % pkg, True)
- if not preinst:
- preinst = '#!/bin/sh\n'
- preinst += localdata.getVar('updatercd_preinst', True)
- d.setVar('pkg_preinst_%s' % pkg, preinst)
-
- postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += localdata.getVar('updatercd_postinst', True)
+ postinst += localdata.getVar('updatercd_postinst')
d.setVar('pkg_postinst_%s' % pkg, postinst)
- prerm = d.getVar('pkg_prerm_%s' % pkg, True)
+ prerm = d.getVar('pkg_prerm_%s' % pkg)
if not prerm:
prerm = '#!/bin/sh\n'
- prerm += localdata.getVar('updatercd_prerm', True)
+ prerm += localdata.getVar('updatercd_prerm')
d.setVar('pkg_prerm_%s' % pkg, prerm)
- postrm = d.getVar('pkg_postrm_%s' % pkg, True)
+ postrm = d.getVar('pkg_postrm_%s' % pkg)
if not postrm:
postrm = '#!/bin/sh\n'
- postrm += localdata.getVar('updatercd_postrm', True)
+ postrm += localdata.getVar('updatercd_postrm')
d.setVar('pkg_postrm_%s' % pkg, postrm)
d.appendVar('RRECOMMENDS_' + pkg, " ${MLPREFIX}${UPDATERCD}")
# Check that this class isn't being inhibited (generally, by
# systemd.bbclass) before doing any work.
- if not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
- pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
+ if not d.getVar("INHIBIT_UPDATERCD_BBCLASS"):
+ pkgs = d.getVar('INITSCRIPT_PACKAGES')
if pkgs == None:
- pkgs = d.getVar('UPDATERCPN', True)
- packages = (d.getVar('PACKAGES', True) or "").split()
+ pkgs = d.getVar('UPDATERCPN')
+ packages = (d.getVar('PACKAGES') or "").split()
if not pkgs in packages and packages != []:
pkgs = packages[0]
for pkg in pkgs.split():
diff --git a/meta/classes/upstream-version-is-even.bbclass b/meta/classes/upstream-version-is-even.bbclass
index 89556ed7d4..256c752423 100644
--- a/meta/classes/upstream-version-is-even.bbclass
+++ b/meta/classes/upstream-version-is-even.bbclass
@@ -2,4 +2,4 @@
# accepts even minor versions (i.e. 3.0.x, 3.2.x, 3.4.x, etc.)
# This scheme is used by Gnome and a number of other projects
# to signify stable releases vs development releases.
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
+UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>\d+\.(\d*[02468])+(\.\d+)+)\.tar"
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index 46d4a4b3da..3a1b5f1320 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -1,22 +1,10 @@
# In order to support a deterministic set of 'dynamic' users/groups,
# we need a function to reformat the params based on a static file
def update_useradd_static_config(d):
- import argparse
import itertools
import re
import errno
-
- class myArgumentParser( argparse.ArgumentParser ):
- def _print_message(self, message, file=None):
- bb.warn("%s - %s: %s" % (d.getVar('PN', True), pkg, message))
-
- # This should never be called...
- def exit(self, status=0, message=None):
- message = message or ("%s - %s: useradd.bbclass: Argument parsing exited" % (d.getVar('PN', True), pkg))
- error(message)
-
- def error(self, message):
- raise bb.build.FuncFailed(message)
+ import oe.useradd
def list_extend(iterable, length, obj = None):
"""Ensure that iterable is the specified length by extending with obj
@@ -50,64 +38,46 @@ def update_useradd_static_config(d):
return id_table
- def handle_missing_id(id, type, pkg):
+ def handle_missing_id(id, type, pkg, files, var, value):
# For backwards compatibility we accept "1" in addition to "error"
- if d.getVar('USERADD_ERROR_DYNAMIC', True) == 'error' or d.getVar('USERADD_ERROR_DYNAMIC', True) == '1':
- #bb.error("Skipping recipe %s, package %s which adds %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id))
- raise bb.build.FuncFailed("%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id))
- elif d.getVar('USERADD_ERROR_DYNAMIC', True) == 'warn':
- bb.warn("%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id))
+ error_dynamic = d.getVar('USERADD_ERROR_DYNAMIC')
+ msg = "%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN'), pkg, type, id)
+ if files:
+ msg += " Add %s to one of these files: %s" % (id, files)
+ else:
+ msg += " %s file(s) not found in BBPATH: %s" % (var, value)
+ if error_dynamic == 'error' or error_dynamic == '1':
+ raise NotImplementedError(msg)
+ elif error_dynamic == 'warn':
+ bb.warn(msg)
+ elif error_dynamic == 'skip':
+ raise bb.parse.SkipRecipe(msg)
+
+ # Return a list of configuration files based on either the default
+ # files/group or the contents of USERADD_GID_TABLES, resp.
+ # files/passwd for USERADD_UID_TABLES.
+ # Paths are resolved via BBPATH.
+ def get_table_list(d, var, default):
+ files = []
+ bbpath = d.getVar('BBPATH')
+ tables = d.getVar(var)
+ if not tables:
+ tables = default
+ for conf_file in tables.split():
+ files.append(bb.utils.which(bbpath, conf_file))
+ return (' '.join(files), var, default)
# We parse and rewrite the useradd components
- def rewrite_useradd(params):
- # The following comes from --help on useradd from shadow
- parser = myArgumentParser(prog='useradd')
- parser.add_argument("-b", "--base-dir", metavar="BASE_DIR", help="base directory for the home directory of the new account")
- parser.add_argument("-c", "--comment", metavar="COMMENT", help="GECOS field of the new account")
- parser.add_argument("-d", "--home-dir", metavar="HOME_DIR", help="home directory of the new account")
- parser.add_argument("-D", "--defaults", help="print or change default useradd configuration", action="store_true")
- parser.add_argument("-e", "--expiredate", metavar="EXPIRE_DATE", help="expiration date of the new account")
- parser.add_argument("-f", "--inactive", metavar="INACTIVE", help="password inactivity period of the new account")
- parser.add_argument("-g", "--gid", metavar="GROUP", help="name or ID of the primary group of the new account")
- parser.add_argument("-G", "--groups", metavar="GROUPS", help="list of supplementary groups of the new account")
- parser.add_argument("-k", "--skel", metavar="SKEL_DIR", help="use this alternative skeleton directory")
- parser.add_argument("-K", "--key", metavar="KEY=VALUE", help="override /etc/login.defs defaults")
- parser.add_argument("-l", "--no-log-init", help="do not add the user to the lastlog and faillog databases", action="store_true")
- parser.add_argument("-m", "--create-home", help="create the user's home directory", action="store_const", const=True)
- parser.add_argument("-M", "--no-create-home", dest="create_home", help="do not create the user's home directory", action="store_const", const=False)
- parser.add_argument("-N", "--no-user-group", dest="user_group", help="do not create a group with the same name as the user", action="store_const", const=False)
- parser.add_argument("-o", "--non-unique", help="allow to create users with duplicate (non-unique UID)", action="store_true")
- parser.add_argument("-p", "--password", metavar="PASSWORD", help="encrypted password of the new account")
- parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into")
- parser.add_argument("-r", "--system", help="create a system account", action="store_true")
- parser.add_argument("-s", "--shell", metavar="SHELL", help="login shell of the new account")
- parser.add_argument("-u", "--uid", metavar="UID", help="user ID of the new account")
- parser.add_argument("-U", "--user-group", help="create a group with the same name as the user", action="store_const", const=True)
- parser.add_argument("LOGIN", help="Login name of the new user")
-
- # Return a list of configuration files based on either the default
- # files/passwd or the contents of USERADD_UID_TABLES
- # paths are resolved via BBPATH
- def get_passwd_list(d):
- str = ""
- bbpath = d.getVar('BBPATH', True)
- passwd_tables = d.getVar('USERADD_UID_TABLES', True)
- if not passwd_tables:
- passwd_tables = 'files/passwd'
- for conf_file in passwd_tables.split():
- str += " %s" % bb.utils.which(bbpath, conf_file)
- return str
+ def rewrite_useradd(params, is_pkg):
+ parser = oe.useradd.build_useradd_parser()
newparams = []
users = None
- for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
- param = param.strip()
- if not param:
- continue
+ for param in oe.useradd.split_commands(params):
try:
- uaargs = parser.parse_args(re.split('''[ \t]+(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
- except:
- raise bb.build.FuncFailed("%s: Unable to parse arguments for USERADD_PARAM_%s: '%s'" % (d.getVar('PN', True), pkg, param))
+ uaargs = parser.parse_args(oe.useradd.split_args(param))
+ except Exception as e:
+ bb.fatal("%s: Unable to parse arguments for USERADD_PARAM_%s '%s': %s" % (d.getVar('PN'), pkg, param, e))
# Read all passwd files specified in USERADD_UID_TABLES or files/passwd
# Use the standard passwd layout:
@@ -121,17 +91,19 @@ def update_useradd_static_config(d):
# all new users get the default ('*' which prevents login) until the user is
# specifically configured by the system admin.
if not users:
- users = merge_files(get_passwd_list(d), 7)
+ files, table_var, table_value = get_table_list(d, 'USERADD_UID_TABLES', 'files/passwd')
+ users = merge_files(files, 7)
+ type = 'system user' if uaargs.system else 'normal user'
if uaargs.LOGIN not in users:
- if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid:
- handle_missing_id(uaargs.LOGIN, 'user', pkg)
+ handle_missing_id(uaargs.LOGIN, type, pkg, files, table_var, table_value)
+ newparams.append(param)
continue
field = users[uaargs.LOGIN]
if uaargs.uid and field[2] and (uaargs.uid != field[2]):
- bb.warn("%s: Changing username %s's uid from (%s) to (%s), verify configuration files!" % (d.getVar('PN', True), uaargs.LOGIN, uaargs.uid, field[2]))
+ bb.warn("%s: Changing username %s's uid from (%s) to (%s), verify configuration files!" % (d.getVar('PN'), uaargs.LOGIN, uaargs.uid, field[2]))
uaargs.uid = field[2] or uaargs.uid
# Determine the possible groupname
@@ -141,9 +113,13 @@ def update_useradd_static_config(d):
# So if the implicit username-group creation is on, then the implicit groupname (LOGIN)
# is used, and we disable the user_group option.
#
- user_group = uaargs.user_group is None or uaargs.user_group is True
- uaargs.groupname = uaargs.LOGIN if user_group else uaargs.gid
- uaargs.groupid = field[3] or uaargs.gid or uaargs.groupname
+ if uaargs.gid:
+ uaargs.groupname = uaargs.gid
+ elif uaargs.user_group is not False:
+ uaargs.groupname = uaargs.LOGIN
+ else:
+ uaargs.groupname = 'users'
+ uaargs.groupid = field[3] or uaargs.groupname
if uaargs.groupid and uaargs.gid != uaargs.groupid:
newgroup = None
@@ -159,14 +135,16 @@ def update_useradd_static_config(d):
# We want to add a group, but we don't know it's name... so we can't add the group...
# We have to assume the group has previously been added or we'll fail on the adduser...
# Note: specifying the actual gid is very rare in OE, usually the group name is specified.
- bb.warn("%s: Changing gid for login %s to %s, verify configuration files!" % (d.getVar('PN', True), uaargs.LOGIN, uaargs.groupid))
+ bb.warn("%s: Changing gid for login %s to %s, verify configuration files!" % (d.getVar('PN'), uaargs.LOGIN, uaargs.groupid))
uaargs.gid = uaargs.groupid
uaargs.user_group = None
- if newgroup:
- groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg, True)
+ if newgroup and is_pkg:
+ groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg)
if groupadd:
- d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup))
+ # Only add the group if not already specified
+ if not uaargs.groupname in groupadd:
+ d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup))
else:
d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup)
@@ -176,14 +154,14 @@ def update_useradd_static_config(d):
# Should be an error if a specific option is set...
if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid:
- handle_missing_id(uaargs.LOGIN, 'user', pkg)
+ handle_missing_id(uaargs.LOGIN, type, pkg, files, table_var, table_value)
# Reconstruct the args...
newparam = ['', ' --defaults'][uaargs.defaults]
newparam += ['', ' --base-dir %s' % uaargs.base_dir][uaargs.base_dir != None]
newparam += ['', ' --comment %s' % uaargs.comment][uaargs.comment != None]
newparam += ['', ' --home-dir %s' % uaargs.home_dir][uaargs.home_dir != None]
- newparam += ['', ' --expiredata %s' % uaargs.expiredate][uaargs.expiredate != None]
+ newparam += ['', ' --expiredate %s' % uaargs.expiredate][uaargs.expiredate != None]
newparam += ['', ' --inactive %s' % uaargs.inactive][uaargs.inactive != None]
newparam += ['', ' --gid %s' % uaargs.gid][uaargs.gid != None]
newparam += ['', ' --groups %s' % uaargs.groups][uaargs.groups != None]
@@ -194,7 +172,10 @@ def update_useradd_static_config(d):
newparam += ['', ' --no-create-home'][uaargs.create_home is False]
newparam += ['', ' --no-user-group'][uaargs.user_group is False]
newparam += ['', ' --non-unique'][uaargs.non_unique]
- newparam += ['', ' --password %s' % uaargs.password][uaargs.password != None]
+ if uaargs.password != None:
+ newparam += ['', ' --password %s' % uaargs.password][uaargs.password != None]
+ elif uaargs.clear_password:
+ newparam += ['', ' --clear-password %s' % uaargs.clear_password][uaargs.clear_password != None]
newparam += ['', ' --root %s' % uaargs.root][uaargs.root != None]
newparam += ['', ' --system'][uaargs.system]
newparam += ['', ' --shell %s' % uaargs.shell][uaargs.shell != None]
@@ -207,42 +188,17 @@ def update_useradd_static_config(d):
return ";".join(newparams).strip()
# We parse and rewrite the groupadd components
- def rewrite_groupadd(params):
- # The following comes from --help on groupadd from shadow
- parser = myArgumentParser(prog='groupadd')
- parser.add_argument("-f", "--force", help="exit successfully if the group already exists, and cancel -g if the GID is already used", action="store_true")
- parser.add_argument("-g", "--gid", metavar="GID", help="use GID for the new group")
- parser.add_argument("-K", "--key", metavar="KEY=VALUE", help="override /etc/login.defs defaults")
- parser.add_argument("-o", "--non-unique", help="allow to create groups with duplicate (non-unique) GID", action="store_true")
- parser.add_argument("-p", "--password", metavar="PASSWORD", help="use this encrypted password for the new group")
- parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into")
- parser.add_argument("-r", "--system", help="create a system account", action="store_true")
- parser.add_argument("GROUP", help="Group name of the new group")
-
- # Return a list of configuration files based on either the default
- # files/group or the contents of USERADD_GID_TABLES
- # paths are resolved via BBPATH
- def get_group_list(d):
- str = ""
- bbpath = d.getVar('BBPATH', True)
- group_tables = d.getVar('USERADD_GID_TABLES', True)
- if not group_tables:
- group_tables = 'files/group'
- for conf_file in group_tables.split():
- str += " %s" % bb.utils.which(bbpath, conf_file)
- return str
+ def rewrite_groupadd(params, is_pkg):
+ parser = oe.useradd.build_groupadd_parser()
newparams = []
groups = None
- for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
- param = param.strip()
- if not param:
- continue
+ for param in oe.useradd.split_commands(params):
try:
# If we're processing multiple lines, we could have left over values here...
- gaargs = parser.parse_args(re.split('''[ \t]+(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
- except:
- raise bb.build.FuncFailed("%s: Unable to parse arguments for GROUPADD_PARAM_%s: '%s'" % (d.getVar('PN', True), pkg, param))
+ gaargs = parser.parse_args(oe.useradd.split_args(param))
+ except Exception as e:
+ bb.fatal("%s: Unable to parse arguments for GROUPADD_PARAM_%s '%s': %s" % (d.getVar('PN'), pkg, param, e))
# Read all group files specified in USERADD_GID_TABLES or files/group
# Use the standard group layout:
@@ -254,29 +210,34 @@ def update_useradd_static_config(d):
# Note: similar to the passwd file, the 'password' filed is ignored
# Note: group_members is ignored, group members must be configured with the GROUPMEMS_PARAM
if not groups:
- groups = merge_files(get_group_list(d), 4)
+ files, table_var, table_value = get_table_list(d, 'USERADD_GID_TABLES', 'files/group')
+ groups = merge_files(files, 4)
+ type = 'system group' if gaargs.system else 'normal group'
if gaargs.GROUP not in groups:
- if not gaargs.gid or not gaargs.gid.isdigit():
- handle_missing_id(gaargs.GROUP, 'group', pkg)
+ handle_missing_id(gaargs.GROUP, type, pkg, files, table_var, table_value)
+ newparams.append(param)
continue
field = groups[gaargs.GROUP]
if field[2]:
if gaargs.gid and (gaargs.gid != field[2]):
- bb.warn("%s: Changing groupname %s's gid from (%s) to (%s), verify configuration files!" % (d.getVar('PN', True), gaargs.GROUP, gaargs.gid, field[2]))
+ bb.warn("%s: Changing groupname %s's gid from (%s) to (%s), verify configuration files!" % (d.getVar('PN'), gaargs.GROUP, gaargs.gid, field[2]))
gaargs.gid = field[2]
if not gaargs.gid or not gaargs.gid.isdigit():
- handle_missing_id(gaargs.GROUP, 'group', pkg)
+ handle_missing_id(gaargs.GROUP, type, pkg, files, table_var, table_value)
# Reconstruct the args...
newparam = ['', ' --force'][gaargs.force]
newparam += ['', ' --gid %s' % gaargs.gid][gaargs.gid != None]
newparam += ['', ' --key %s' % gaargs.key][gaargs.key != None]
newparam += ['', ' --non-unique'][gaargs.non_unique]
- newparam += ['', ' --password %s' % gaargs.password][gaargs.password != None]
+ if gaargs.password != None:
+ newparam += ['', ' --password %s' % gaargs.password][gaargs.password != None]
+ elif gaargs.clear_password:
+ newparam += ['', ' --clear-password %s' % gaargs.clear_password][gaargs.clear_password != None]
newparam += ['', ' --root %s' % gaargs.root][gaargs.root != None]
newparam += ['', ' --system'][gaargs.system]
newparam += ' %s' % gaargs.GROUP
@@ -289,33 +250,54 @@ def update_useradd_static_config(d):
# the files listed in USERADD_UID/GID_TABLES. We need to tell bitbake
# about that explicitly to trigger re-parsing and thus re-execution of
# this code when the files change.
- bbpath = d.getVar('BBPATH', True)
+ bbpath = d.getVar('BBPATH')
for varname, default in (('USERADD_UID_TABLES', 'files/passwd'),
('USERADD_GID_TABLES', 'files/group')):
- tables = d.getVar(varname, True)
+ tables = d.getVar(varname)
if not tables:
tables = default
for conf_file in tables.split():
bb.parse.mark_dependency(d, bb.utils.which(bbpath, conf_file))
# Load and process the users and groups, rewriting the adduser/addgroup params
- useradd_packages = d.getVar('USERADD_PACKAGES', True)
+ useradd_packages = d.getVar('USERADD_PACKAGES') or ""
for pkg in useradd_packages.split():
# Groupmems doesn't have anything we might want to change, so simply validating
# is a bit of a waste -- only process useradd/groupadd
- useradd_param = d.getVar('USERADD_PARAM_%s' % pkg, True)
+ useradd_param = d.getVar('USERADD_PARAM_%s' % pkg)
if useradd_param:
#bb.warn("Before: 'USERADD_PARAM_%s' - '%s'" % (pkg, useradd_param))
- d.setVar('USERADD_PARAM_%s' % pkg, rewrite_useradd(useradd_param))
- #bb.warn("After: 'USERADD_PARAM_%s' - '%s'" % (pkg, d.getVar('USERADD_PARAM_%s' % pkg, True)))
+ d.setVar('USERADD_PARAM_%s' % pkg, rewrite_useradd(useradd_param, True))
+ #bb.warn("After: 'USERADD_PARAM_%s' - '%s'" % (pkg, d.getVar('USERADD_PARAM_%s' % pkg)))
- groupadd_param = d.getVar('GROUPADD_PARAM_%s' % pkg, True)
+ groupadd_param = d.getVar('GROUPADD_PARAM_%s' % pkg)
if groupadd_param:
#bb.warn("Before: 'GROUPADD_PARAM_%s' - '%s'" % (pkg, groupadd_param))
- d.setVar('GROUPADD_PARAM_%s' % pkg, rewrite_groupadd(groupadd_param))
- #bb.warn("After: 'GROUPADD_PARAM_%s' - '%s'" % (pkg, d.getVar('GROUPADD_PARAM_%s' % pkg, True)))
+ d.setVar('GROUPADD_PARAM_%s' % pkg, rewrite_groupadd(groupadd_param, True))
+ #bb.warn("After: 'GROUPADD_PARAM_%s' - '%s'" % (pkg, d.getVar('GROUPADD_PARAM_%s' % pkg)))
+
+ # Load and process extra users and groups, rewriting only adduser/addgroup params
+ pkg = d.getVar('PN')
+ extrausers = d.getVar('EXTRA_USERS_PARAMS') or ""
+
+ #bb.warn("Before: 'EXTRA_USERS_PARAMS' - '%s'" % (d.getVar('EXTRA_USERS_PARAMS')))
+ new_extrausers = []
+ for cmd in oe.useradd.split_commands(extrausers):
+ if re.match('''useradd (.*)''', cmd):
+ useradd_param = re.match('''useradd (.*)''', cmd).group(1)
+ useradd_param = rewrite_useradd(useradd_param, False)
+ cmd = 'useradd %s' % useradd_param
+ elif re.match('''groupadd (.*)''', cmd):
+ groupadd_param = re.match('''groupadd (.*)''', cmd).group(1)
+ groupadd_param = rewrite_groupadd(groupadd_param, False)
+ cmd = 'groupadd %s' % groupadd_param
+
+ new_extrausers.append(cmd)
+ new_extrausers.append('')
+ d.setVar('EXTRA_USERS_PARAMS', ';'.join(new_extrausers))
+ #bb.warn("After: 'EXTRA_USERS_PARAMS' - '%s'" % (d.getVar('EXTRA_USERS_PARAMS')))
python __anonymous() {
@@ -323,7 +305,7 @@ python __anonymous() {
and not bb.data.inherits_class('native', d):
try:
update_useradd_static_config(d)
- except bb.build.FuncFailed as f:
- bb.debug(1, "Skipping recipe %s: %s" % (d.getVar('PN', True), f))
- raise bb.parse.SkipPackage(f)
+ except NotImplementedError as f:
+ bb.debug(1, "Skipping recipe %s: %s" % (d.getVar('PN'), f))
+ raise bb.parse.SkipRecipe(f)
}
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index bf62ada8b5..e5f3ba24f9 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -3,7 +3,8 @@ inherit useradd_base
# base-passwd-cross provides the default passwd and group files in the
# target sysroot, and shadow -native and -sysroot provide the utilities
# and support files needed to add and modify user and group accounts
-DEPENDS_append_class-target = " base-files shadow-native shadow-sysroot shadow"
+DEPENDS_append_class-target = " base-files shadow-native shadow-sysroot shadow base-passwd"
+PACKAGE_WRITE_DEPS += "shadow-native"
# This preinstall function can be run in four different contexts:
#
@@ -31,7 +32,7 @@ if test "x$D" != "x"; then
fi
# user/group lookups should match useradd/groupadd --root
- export PSEUDO_PASSWD="$SYSROOT:${STAGING_DIR_NATIVE}"
+ export PSEUDO_PASSWD="$SYSROOT"
fi
# If we're not doing a special SSTATE/SYSROOT install
@@ -96,15 +97,33 @@ fi
}
useradd_sysroot () {
- # Pseudo may (do_install) or may not (do_populate_sysroot_setscene) be running
+ # Pseudo may (do_prepare_recipe_sysroot) or may not (do_populate_sysroot_setscene) be running
# at this point so we're explicit about the environment so pseudo can load if
# not already present.
- export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir_native}/pseudo"
+ # PSEUDO_SYSROOT can contain references to the build architecture and COMPONENT_DIR
+ # so needs the STAGING_FIXME below
+ export PSEUDO="${FAKEROOTENV} ${PSEUDO_SYSROOT}${bindir_native}/pseudo"
# Explicitly set $D since it isn't set to anything
- # before do_install
+ # before do_prepare_recipe_sysroot
D=${STAGING_DIR_TARGET}
+ # base-passwd's postinst may not have run yet in which case we'll get called later, just exit.
+ # Beware that in some cases we might see the fake pseudo passwd here, in which case we also must
+ # exit.
+ if [ ! -f $D${sysconfdir}/passwd ] ||
+ grep -q this-is-the-pseudo-passwd $D${sysconfdir}/passwd; then
+ exit 0
+ fi
+
+ # It is also possible we may be in a recipe which doesn't have useradd dependencies and hence the
+ # useradd/groupadd tools are unavailable. If there is no dependency, we assume we don't want to
+ # create users in the sysroot
+ if ! command -v useradd; then
+ bbwarn "command useradd not found!"
+ exit 0
+ fi
+
# Add groups and users defined for all recipe packages
GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}"
USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}"
@@ -116,49 +135,40 @@ useradd_sysroot () {
useradd_preinst
}
-useradd_sysroot_sstate () {
- if [ "${BB_CURRENTTASK}" = "package_setscene" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- useradd_sysroot
- fi
-}
-
-userdel_sysroot_sstate () {
-if test "x${STAGING_DIR_TARGET}" != "x"; then
- if [ "${BB_CURRENTTASK}" = "clean" ]; then
- export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir_native}/pseudo"
- OPT="--root ${STAGING_DIR_TARGET}"
-
- # Remove groups and users defined for package
- GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}"
- USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}"
-
- user=`echo "$USERADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
- remaining=`echo "$USERADD_PARAM" | cut -d ';' -f 2- -s | sed -e 's#[ \t]*$##'`
- while test "x$user" != "x"; do
- perform_userdel "${STAGING_DIR_TARGET}" "$OPT $user"
- user=`echo "$remaining" | cut -d ';' -f 1 | awk '{ print $NF }'`
- remaining=`echo "$remaining" | cut -d ';' -f 2- -s | sed -e 's#[ \t]*$##'`
- done
-
- user=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
- remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2- -s | sed -e 's#[ \t]*$##'`
- while test "x$user" != "x"; do
- perform_groupdel "${STAGING_DIR_TARGET}" "$OPT $user"
- user=`echo "$remaining" | cut -d ';' -f 1 | awk '{ print $NF }'`
- remaining=`echo "$remaining" | cut -d ';' -f 2- -s | sed -e 's#[ \t]*$##'`
- done
-
- fi
-fi
+# The export of PSEUDO in useradd_sysroot() above contains references to
+# ${PSEUDO_SYSROOT} and ${PSEUDO_LOCALSTATEDIR}. Additionally, the logging
+# shell functions use ${LOGFIFO}. These need to be handled when restoring
+# postinst-useradd-${PN} from the sstate cache.
+EXTRA_STAGING_FIXMES += "PSEUDO_SYSROOT PSEUDO_LOCALSTATEDIR LOGFIFO"
+
+python useradd_sysroot_sstate () {
+ scriptfile = None
+ task = d.getVar("BB_CURRENTTASK")
+ if task == "package_setscene":
+ bb.build.exec_func("useradd_sysroot", d)
+ elif task == "prepare_recipe_sysroot":
+ # Used to update this recipe's own sysroot so the user/groups are available to do_install
+ scriptfile = d.expand("${RECIPE_SYSROOT}${bindir}/postinst-useradd-${PN}")
+ bb.build.exec_func("useradd_sysroot", d)
+ elif task == "populate_sysroot":
+ # Used when installed in dependent task sysroots
+ scriptfile = d.expand("${SYSROOT_DESTDIR}${bindir}/postinst-useradd-${PN}")
+
+ if scriptfile:
+ bb.utils.mkdirhier(os.path.dirname(scriptfile))
+ with open(scriptfile, 'w') as script:
+ script.write("#!/bin/sh\n")
+ bb.data.emit_func("useradd_sysroot", script, d)
+ script.write("useradd_sysroot\n")
+ os.chmod(scriptfile, 0o755)
}
-SSTATECLEANFUNCS_append_class-target = " userdel_sysroot_sstate"
-
-do_install[prefuncs] += "${SYSROOTFUNC}"
-SYSROOTFUNC_class-target = "useradd_sysroot"
+do_prepare_recipe_sysroot[postfuncs] += "${SYSROOTFUNC}"
+SYSROOTFUNC_class-target = "useradd_sysroot_sstate"
SYSROOTFUNC = ""
+SYSROOT_PREPROCESS_FUNCS += "${SYSROOTFUNC}"
+
SSTATEPREINSTFUNCS_append_class-target = " useradd_sysroot_sstate"
do_package_setscene[depends] += "${USERADDSETSCENEDEPS}"
@@ -168,13 +178,14 @@ USERADDSETSCENEDEPS = ""
# Recipe parse-time sanity checks
def update_useradd_after_parse(d):
- useradd_packages = d.getVar('USERADD_PACKAGES', True)
+ useradd_packages = d.getVar('USERADD_PACKAGES')
if not useradd_packages:
- raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
+ bb.fatal("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
for pkg in useradd_packages.split():
- if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg, True):
+ d.appendVarFlag("do_populate_sysroot", "vardeps", "USERADD_PARAM_%s GROUPADD_PARAM_%s GROUPMEMS_PARAM_%s" % (pkg, pkg, pkg))
+ if not d.getVar('USERADD_PARAM_%s' % pkg) and not d.getVar('GROUPADD_PARAM_%s' % pkg) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg):
bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE', False), pkg))
python __anonymous() {
@@ -191,9 +202,9 @@ def get_all_cmd_params(d, cmd_type):
param_type = cmd_type.upper() + "_PARAM_%s"
params = []
- useradd_packages = d.getVar('USERADD_PACKAGES', True) or ""
+ useradd_packages = d.getVar('USERADD_PACKAGES') or ""
for pkg in useradd_packages.split():
- param = d.getVar(param_type % pkg, True)
+ param = d.getVar(param_type % pkg)
if param:
params.append(param.rstrip(" ;"))
@@ -209,20 +220,20 @@ fakeroot python populate_packages_prepend () {
required to execute on the target. Not doing so may cause
useradd preinst to be invoked twice, causing unwanted warnings.
"""
- preinst = d.getVar('pkg_preinst_%s' % pkg, True) or d.getVar('pkg_preinst', True)
+ preinst = d.getVar('pkg_preinst_%s' % pkg) or d.getVar('pkg_preinst')
if not preinst:
preinst = '#!/bin/sh\n'
preinst += 'bbnote () {\n\techo "NOTE: $*"\n}\n'
preinst += 'bbwarn () {\n\techo "WARNING: $*"\n}\n'
preinst += 'bbfatal () {\n\techo "ERROR: $*"\n\texit 1\n}\n'
- preinst += 'perform_groupadd () {\n%s}\n' % d.getVar('perform_groupadd', True)
- preinst += 'perform_useradd () {\n%s}\n' % d.getVar('perform_useradd', True)
- preinst += 'perform_groupmems () {\n%s}\n' % d.getVar('perform_groupmems', True)
- preinst += d.getVar('useradd_preinst', True)
+ preinst += 'perform_groupadd () {\n%s}\n' % d.getVar('perform_groupadd')
+ preinst += 'perform_useradd () {\n%s}\n' % d.getVar('perform_useradd')
+ preinst += 'perform_groupmems () {\n%s}\n' % d.getVar('perform_groupmems')
+ preinst += d.getVar('useradd_preinst')
d.setVar('pkg_preinst_%s' % pkg, preinst)
# RDEPENDS setup
- rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
+ rdepends = d.getVar("RDEPENDS_%s" % pkg) or ""
rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-passwd'
rdepends += ' ' + d.getVar('MLPREFIX', False) + 'shadow'
# base-files is where the default /etc/skel is packaged
@@ -233,7 +244,7 @@ fakeroot python populate_packages_prepend () {
# to packages specified by USERADD_PACKAGES
if not bb.data.inherits_class('nativesdk', d) \
and not bb.data.inherits_class('native', d):
- useradd_packages = d.getVar('USERADD_PACKAGES', True) or ""
+ useradd_packages = d.getVar('USERADD_PACKAGES') or ""
for pkg in useradd_packages.split():
update_useradd_package(pkg)
}
diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass
index ba87edc57a..0d0bdb80f5 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -51,10 +51,10 @@ perform_groupmems () {
local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group") print $(i+1) }'`
local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") print $(i+1) }'`
bbnote "${PN}: Running groupmems command with group $groupname and user $username"
- local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`"
+ local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/group || true`"
if test "x$mem_exists" = "x"; then
eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmems \$opts\" || true
- mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`"
+ mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/group || true`"
if test "x$mem_exists" = "x"; then
bbfatal "${PN}: groupmems command did not succeed."
fi
@@ -69,11 +69,21 @@ perform_groupdel () {
bbnote "${PN}: Performing groupdel with [$opts]"
local groupname=`echo "$opts" | awk '{ print $NF }'`
local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
+
if test "x$group_exists" != "x"; then
- eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupdel \$opts\" || true
- group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
- if test "x$group_exists" != "x"; then
- bbfatal "${PN}: groupdel command did not succeed."
+ local awk_input='BEGIN {FS=":"}; $1=="'$groupname'" { print $3 }'
+ local groupid=`echo "$awk_input" | awk -f- $rootdir/etc/group`
+ local awk_check_users='BEGIN {FS=":"}; $4=="'$groupid'" {print $1}'
+ local other_users=`echo "$awk_check_users" | awk -f- $rootdir/etc/passwd`
+
+ if test "x$other_users" = "x"; then
+ eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupdel \$opts\" || true
+ group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
+ if test "x$group_exists" != "x"; then
+ bbfatal "${PN}: groupdel command did not succeed."
+ fi
+ else
+ bbnote "${PN}: '$groupname' is primary group for users '$other_users', not removing it"
fi
else
bbnote "${PN}: group $groupname doesn't exist, not removing it"
diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass
index 7bc584abb9..b1f27d3658 100644
--- a/meta/classes/utility-tasks.bbclass
+++ b/meta/classes/utility-tasks.bbclass
@@ -4,12 +4,12 @@ python do_listtasks() {
taskdescs = {}
maxlen = 0
for e in d.keys():
- if d.getVarFlag(e, 'task', True):
+ if d.getVarFlag(e, 'task'):
maxlen = max(maxlen, len(e))
if e.endswith('_setscene'):
- desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc', True) or '')
+ desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '')
else:
- desc = d.getVarFlag(e, 'doc', True) or ''
+ desc = d.getVarFlag(e, 'doc') or ''
taskdescs[e] = desc
tasks = sorted(taskdescs.keys())
@@ -28,18 +28,18 @@ python do_clean() {
bb.note("Removing " + dir)
oe.path.remove(dir)
- dir = "%s.*" % bb.data.expand(d.getVar('STAMP', False), d)
+ dir = "%s.*" % d.getVar('STAMP')
bb.note("Removing " + dir)
oe.path.remove(dir)
- for f in (d.getVar('CLEANFUNCS', True) or '').split():
+ for f in (d.getVar('CLEANFUNCS') or '').split():
bb.build.exec_func(f, d)
}
addtask checkuri
do_checkuri[nostamp] = "1"
python do_checkuri() {
- src_uri = (d.getVar('SRC_URI', True) or "").split()
+ src_uri = (d.getVar('SRC_URI') or "").split()
if len(src_uri) == 0:
return
@@ -47,20 +47,7 @@ python do_checkuri() {
fetcher = bb.fetch2.Fetch(src_uri, d)
fetcher.checkstatus()
except bb.fetch2.BBFetchException as e:
- raise bb.build.FuncFailed(e)
+ bb.fatal(str(e))
}
-addtask checkuriall after do_checkuri
-do_checkuriall[recrdeptask] = "do_checkuriall do_checkuri"
-do_checkuriall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checkuriall[nostamp] = "1"
-do_checkuriall() {
- :
-}
-addtask fetchall after do_fetch
-do_fetchall[recrdeptask] = "do_fetchall do_fetch"
-do_fetchall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_fetchall() {
- :
-}
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 800b56578c..cd3d05709e 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -1,49 +1,8 @@
-# For compatibility
-def base_path_join(a, *p):
- return oe.path.join(a, *p)
-
-def base_path_relative(src, dest):
- return oe.path.relative(src, dest)
-
-def base_path_out(path, d):
- return oe.path.format_display(path, d)
-
-def base_read_file(filename):
- return oe.utils.read_file(filename)
-
-def base_ifelse(condition, iftrue = True, iffalse = False):
- return oe.utils.ifelse(condition, iftrue, iffalse)
-
-def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
- return oe.utils.conditional(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- return oe.utils.less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_contains(variable, checkvalues, truevalue, falsevalue, d):
- bb.note('base_contains is deprecated, please use bb.utils.contains instead.')
- return bb.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
-
-def base_both_contain(variable1, variable2, checkvalue, d):
- return oe.utils.both_contain(variable1, variable2, checkvalue, d)
-
-def base_prune_suffix(var, suffixes, d):
- return oe.utils.prune_suffix(var, suffixes, d)
-
-def oe_filter(f, str, d):
- return oe.utils.str_filter(f, str, d)
-
-def oe_filter_out(f, str, d):
- return oe.utils.str_filter_out(f, str, d)
-
def machine_paths(d):
"""List any existing machine specific filespath directories"""
- machine = d.getVar("MACHINE", True)
- filespathpkg = d.getVar("FILESPATHPKG", True).split(":")
- for basepath in d.getVar("FILESPATHBASE", True).split(":"):
+ machine = d.getVar("MACHINE")
+ filespathpkg = d.getVar("FILESPATHPKG").split(":")
+ for basepath in d.getVar("FILESPATHBASE").split(":"):
for pkgpath in filespathpkg:
machinepath = os.path.join(basepath, pkgpath, machine)
if os.path.isdir(machinepath):
@@ -52,7 +11,7 @@ def machine_paths(d):
def is_machine_specific(d):
"""Determine whether the current recipe is machine specific"""
machinepaths = set(machine_paths(d))
- srcuri = d.getVar("SRC_URI", True).split()
+ srcuri = d.getVar("SRC_URI").split()
for url in srcuri:
fetcher = bb.fetch2.Fetch([srcuri], d)
if url.startswith("file://"):
@@ -264,10 +223,17 @@ create_cmdline_wrapper () {
mv $cmd $cmd.real
cmdname=`basename $cmd`
+ dirname=`dirname $cmd`
+ cmdoptions=$@
+ if [ "${base_prefix}" != "" ]; then
+ relpath=`python3 -c "import os; print(os.path.relpath('${D}${base_prefix}', '$dirname'))"`
+ cmdoptions=`echo $@ | sed -e "s:${base_prefix}:\\$realdir/$relpath:g"`
+ fi
cat <<END >$cmd
#!/bin/bash
realpath=\`readlink -fn \$0\`
-exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real $@ "\$@"
+realdir=\`dirname \$realpath\`
+exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real $cmdoptions "\$@"
END
chmod +x $cmd
}
@@ -287,11 +253,18 @@ create_wrapper () {
mv $cmd $cmd.real
cmdname=`basename $cmd`
+ dirname=`dirname $cmd`
+ exportstring=$@
+ if [ "${base_prefix}" != "" ]; then
+ relpath=`python3 -c "import os; print(os.path.relpath('${D}${base_prefix}', '$dirname'))"`
+ exportstring=`echo $@ | sed -e "s:${base_prefix}:\\$realdir/$relpath:g"`
+ fi
cat <<END >$cmd
#!/bin/bash
realpath=\`readlink -fn \$0\`
-export $@
-exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real "\$@"
+realdir=\`dirname \$realpath\`
+export $exportstring
+exec -a "\$0" \$realdir/$cmdname.real "\$@"
END
chmod +x $cmd
}
@@ -306,8 +279,8 @@ hardlinkdir () {
def check_app_exists(app, d):
- app = d.expand(app).strip()
- path = d.getVar('PATH', d, True)
+ app = d.expand(app).split()[0].strip()
+ path = d.getVar('PATH')
return bool(bb.utils.which(path, app))
def explode_deps(s):
@@ -315,14 +288,14 @@ def explode_deps(s):
def base_set_filespath(path, d):
filespath = []
- extrapaths = (d.getVar("FILESEXTRAPATHS", True) or "")
+ extrapaths = (d.getVar("FILESEXTRAPATHS") or "")
# Remove default flag which was used for checking
extrapaths = extrapaths.replace("__default:", "")
# Don't prepend empty strings to the path list
if extrapaths != "":
path = extrapaths.split(":") + path
# The ":" ensures we have an 'empty' override
- overrides = (":" + (d.getVar("FILESOVERRIDES", True) or "")).split(":")
+ overrides = (":" + (d.getVar("FILESOVERRIDES") or "")).split(":")
overrides.reverse()
for o in overrides:
for p in path:
@@ -333,7 +306,7 @@ def base_set_filespath(path, d):
def extend_variants(d, var, extend, delim=':'):
"""Return a string of all bb class extend variants for the given extend"""
variants = []
- whole = d.getVar(var, True) or ""
+ whole = d.getVar(var) or ""
for ext in whole.split():
eext = ext.split(delim)
if len(eext) > 1 and eext[0] == extend:
@@ -341,7 +314,7 @@ def extend_variants(d, var, extend, delim=':'):
return " ".join(variants)
def multilib_pkg_extend(d, pkg):
- variants = (d.getVar("MULTILIB_VARIANTS", True) or "").split()
+ variants = (d.getVar("MULTILIB_VARIANTS") or "").split()
if not variants:
return pkg
pkgs = pkg
@@ -349,24 +322,18 @@ def multilib_pkg_extend(d, pkg):
pkgs = pkgs + " " + v + "-" + pkg
return pkgs
+def get_multilib_datastore(variant, d):
+ return oe.utils.get_multilib_datastore(variant, d)
+
def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
"""Return a string of all ${var} in all multilib tune configuration"""
values = []
- value = d.getVar(var, True) or ""
- if value != "":
- if need_split:
- for item in value.split(delim):
- values.append(item)
- else:
- values.append(value)
- variants = d.getVar("MULTILIB_VARIANTS", True) or ""
- for item in variants.split():
- localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- localdata.setVar("MLPREFIX", item + "-")
- bb.data.update_data(localdata)
- value = localdata.getVar(var, True) or ""
+ variants = (d.getVar("MULTILIB_VARIANTS") or "").split() + ['']
+ for item in variants:
+ localdata = get_multilib_datastore(item, d)
+ # We need WORKDIR to be consistent with the original datastore
+ localdata.setVar("WORKDIR", d.getVar("WORKDIR"))
+ value = localdata.getVar(var) or ""
if value != "":
if need_split:
for item in value.split(delim):
@@ -393,29 +360,22 @@ def all_multilib_tune_list(vars, d):
values = {}
for v in vars:
values[v] = []
-
- localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", False).split(":")
- newoverrides = []
- for o in overrides:
- if not o.startswith("virtclass-multilib-"):
- newoverrides.append(o)
- localdata.setVar("OVERRIDES", ":".join(newoverrides))
- localdata.setVar("MLPREFIX", "")
- origdefault = localdata.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL", True)
- if origdefault:
- localdata.setVar("DEFAULTTUNE", origdefault)
- bb.data.update_data(localdata)
values['ml'] = ['']
- for v in vars:
- values[v].append(localdata.getVar(v, True))
- variants = d.getVar("MULTILIB_VARIANTS", True) or ""
- for item in variants.split():
- localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- localdata.setVar("MLPREFIX", item + "-")
- bb.data.update_data(localdata)
- values[v].append(localdata.getVar(v, True))
+
+ variants = (d.getVar("MULTILIB_VARIANTS") or "").split() + ['']
+ for item in variants:
+ localdata = get_multilib_datastore(item, d)
+ values[v].append(localdata.getVar(v))
values['ml'].append(item)
return values
+all_multilib_tune_list[vardepsexclude] = "OVERRIDES"
+
+# If the user hasn't set up their name/email, set some defaults
+check_git_config() {
+ if ! git config user.email > /dev/null ; then
+ git config --local user.email "${PATCH_GIT_USER_EMAIL}"
+ fi
+ if ! git config user.name > /dev/null ; then
+ git config --local user.name "${PATCH_GIT_USER_NAME}"
+ fi
+}
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 5e55833ca4..900244004e 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -1,38 +1,65 @@
# avoids build breaks when using no-static-libs.inc
DISABLE_STATIC = ""
-def get_waf_parallel_make(d):
- pm = d.getVar('PARALLEL_MAKE', True)
- if pm:
- # look for '-j' and throw other options (e.g. '-l') away
- # because they might have different meaning in bjam
- pm = pm.split()
- while pm:
- v = None
- opt = pm.pop(0)
- if opt == '-j':
- v = pm.pop(0)
- elif opt.startswith('-j'):
- v = opt[2:].strip()
- else:
- v = None
-
- if v:
- v = min(64, int(v))
- return '-j' + str(v)
-
- return ""
+B = "${WORKDIR}/build"
+
+EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
+
+def waflock_hash(d):
+ # Calculates the hash used for the waf lock file. This should include
+ # all of the user controllable inputs passed to waf configure. Note
+ # that the full paths for ${B} and ${S} are used; this is OK and desired
+ # because a change to either of these should create a unique lock file
+ # to prevent collisions.
+ import hashlib
+ h = hashlib.sha512()
+ def update(name):
+ val = d.getVar(name)
+ if val is not None:
+ h.update(val.encode('utf-8'))
+ update('S')
+ update('B')
+ update('prefix')
+ update('EXTRA_OECONF')
+ return h.hexdigest()
+
+# Use WAFLOCK to specify a separate lock file. The build is already
+# sufficiently isolated by setting the output directory, this ensures that
+# bitbake won't step on toes of any other configured context in the source
+# directory (e.g. if the source is coming from externalsrc and was previously
+# configured elsewhere).
+export WAFLOCK = ".lock-waf_oe_${@waflock_hash(d)}_build"
+BB_HASHBASE_WHITELIST += "WAFLOCK"
+
+python waf_preconfigure() {
+ import subprocess
+ from distutils.version import StrictVersion
+ subsrcdir = d.getVar('S')
+ wafbin = os.path.join(subsrcdir, 'waf')
+ try:
+ result = subprocess.check_output([wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT)
+ version = result.decode('utf-8').split()[1]
+ if StrictVersion(version) >= StrictVersion("1.8.7"):
+ d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
+ except subprocess.CalledProcessError as e:
+ bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode)
+ except FileNotFoundError:
+ bb.fatal("waf does not exist in %s" % subsrcdir)
+}
+
+do_configure[prefuncs] += "waf_preconfigure"
waf_do_configure() {
- ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF}
+ (cd ${S} && ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
}
+do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
waf_do_compile() {
- ${S}/waf build ${@get_waf_parallel_make(d)}
+ (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
}
waf_do_install() {
- ${S}/waf install --destdir=${D}
+ (cd ${S} && ./waf install --destdir=${D})
}
EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/meta/classes/xmlcatalog.bbclass b/meta/classes/xmlcatalog.bbclass
new file mode 100644
index 0000000000..ae4811fdeb
--- /dev/null
+++ b/meta/classes/xmlcatalog.bbclass
@@ -0,0 +1,26 @@
+DEPENDS = "libxml2-native"
+
+# A whitespace-separated list of XML catalogs to be registered, for example
+# "${sysconfdir}/xml/docbook-xml.xml".
+XMLCATALOGS ?= ""
+
+SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst"
+
+xmlcatalog_complete() {
+ ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog"
+ if [ ! -f $ROOTCATALOG ]; then
+ mkdir --parents $(dirname $ROOTCATALOG)
+ xmlcatalog --noout --create $ROOTCATALOG
+ fi
+ for CATALOG in ${XMLCATALOGS}; do
+ xmlcatalog --noout --add nextCatalog unused file://$CATALOG $ROOTCATALOG
+ done
+}
+
+xmlcatalog_sstate_postinst() {
+ mkdir -p ${SYSROOT_DESTDIR}${bindir}
+ dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}-xmlcatalog
+ echo '#!/bin/sh' > $dest
+ echo '${xmlcatalog_complete}' >> $dest
+ chmod 0755 $dest
+}
diff --git a/meta/conf/abi_version.conf b/meta/conf/abi_version.conf
index a829687780..4964880108 100644
--- a/meta/conf/abi_version.conf
+++ b/meta/conf/abi_version.conf
@@ -4,4 +4,4 @@
# that breaks the format and have been previously discussed on the mailing list
# with general agreement from the core team.
#
-OELAYOUT_ABI = "11"
+OELAYOUT_ABI = "12"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 34e9e3b50b..e75bbcece0 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -17,11 +17,13 @@ export base_prefix = ""
export prefix = "/usr"
export exec_prefix = "${prefix}"
+root_prefix = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '${exec_prefix}', '${base_prefix}', d)}"
+
# Base paths
-export base_bindir = "${base_prefix}/bin"
-export base_sbindir = "${base_prefix}/sbin"
-export base_libdir = "${base_prefix}/${baselib}"
-export nonarch_base_libdir = "${base_prefix}/lib"
+export base_bindir = "${root_prefix}/bin"
+export base_sbindir = "${root_prefix}/sbin"
+export base_libdir = "${root_prefix}/${baselib}"
+export nonarch_base_libdir = "${root_prefix}/lib"
# Architecture independent paths
export sysconfdir = "${base_prefix}/etc"
@@ -83,11 +85,15 @@ USRBINPATH_class-nativesdk = "/usr/bin"
# Root home directory
ROOT_HOME ??= "/home/root"
+# If set to boolean true ('yes', 'y', 'true', 't', '1'), /var/log links to /var/volatile/log.
+# If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on persistent storage.
+VOLATILE_LOG_DIR ?= "yes"
+
##################################################################
# Architecture-dependent build variables.
##################################################################
-# Immediate expansion since there is no point in reapeatedly calling
+# Immediate expansion since there is no point in repeatedly calling
# os.uname() throughout parsing
BUILD_ARCH := "${@os.uname()[4]}"
BUILD_OS := "${@os.uname()[0].lower()}"
@@ -117,13 +123,13 @@ TUNE_ASARGS ??= ""
TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
LIBCEXTENSION ??= ""
ABIEXTENSION ??= ""
-USE_NLS ??= "${@bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', 'yes', 'no', d)}"
+USE_NLS ??= "yes"
SDKUSE_NLS ??= "yes"
TARGET_ARCH = "${TUNE_ARCH}"
TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}"
TARGET_VENDOR = "-oe"
-TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS', True), ''][d.getVar('TARGET_OS', True) == ('' or 'custom')]}"
+TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS'), ''][d.getVar('TARGET_OS') == ('' or 'custom')]}"
TARGET_PREFIX = "${TARGET_SYS}-"
TARGET_CC_ARCH = "${TUNE_CCARGS}"
TARGET_LD_ARCH = "${TUNE_LDARGS}"
@@ -132,7 +138,7 @@ TARGET_AS_ARCH = "${TUNE_ASARGS}"
SDKMACHINE ??= "x86_64"
SDK_OS = "${BUILD_OS}"
SDK_VENDOR = "-oesdk"
-SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}"
+SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS'), ''][d.getVar('SDK_OS') == ('' or 'custom')]}"
SDK_PREFIX = "${SDK_SYS}-"
SDK_CC_ARCH = "${BUILD_CC_ARCH}"
SDKPKGSUFFIX = "nativesdk"
@@ -142,7 +148,7 @@ SDK_AS_ARCH = "${BUILD_AS_ARCH}"
TUNE_PKGARCH ??= ""
PACKAGE_ARCH ??= "${TUNE_PKGARCH}"
-MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}"
+MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH'), d.getVar('MACHINE')][bool(d.getVar('MACHINE'))].replace('-', '_')}"
PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"
PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
# MACHINE_ARCH shouldn't be included here as a variable dependency
@@ -150,7 +156,6 @@ PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
PACKAGE_ARCHS[vardepsexclude] = "MACHINE_ARCH"
MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
-MULTIMACH_HOST_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
##################################################################
# Date/time variables.
@@ -171,6 +176,7 @@ ASSUME_PROVIDED = "\
chrpath-native \
file-native \
findutils-native \
+ gawk-native \
git-native \
grep-native \
diffstat-native \
@@ -181,6 +187,7 @@ ASSUME_PROVIDED = "\
tar-native \
virtual/libintl-native \
virtual/libiconv-native \
+ virtual/crypt-native \
texinfo-native \
bash-native \
sed-native \
@@ -192,29 +199,29 @@ ASSUME_PROVIDED = "\
# Package default variables.
##################################################################
-PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
-PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
-PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
+PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
+PV = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
+PR = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
PE = ""
PF = "${PN}-${EXTENDPE}${PV}-${PR}"
-EXTENDPE = "${@['','${PE}_'][int(d.getVar('PE', True) or 0) > 0]}"
+EXTENDPE = "${@['','${PE}_'][int(d.getVar('PE') or 0) > 0]}"
P = "${PN}-${PV}"
PRAUTO = ""
-EXTENDPRAUTO = "${@['.${PRAUTO}', ''][not d.getVar('PRAUTO', True)]}"
+EXTENDPRAUTO = "${@['.${PRAUTO}', ''][not d.getVar('PRAUTO')]}"
PRAUTOINX = "${PF}"
PKGV ?= "${PV}"
PKGR ?= "${PR}${EXTENDPRAUTO}"
-PKGE ?= "${@['','${PE}'][int(d.getVar('PE', True) or 0) > 0]}"
-EXTENDPKGEVER = "${@['','${PKGE}:'][d.getVar('PKGE', True).strip() != '']}"
+PKGE ?= "${@['','${PE}'][int(d.getVar('PE') or 0) > 0]}"
+EXTENDPKGEVER = "${@['','${PKGE}:'][d.getVar('PKGE').strip() != '']}"
EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
# Base package name
# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
# otherwise it is the same as PN and P
SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -crosssdk -cross-canadian"
-BPN = "${@base_prune_suffix(d.getVar('PN', True), d.getVar('SPECIAL_PKGSUFFIX', True).split(), d)}"
+BPN = "${@oe.utils.prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}"
BP = "${BPN}-${PV}"
# Package info.
@@ -230,6 +237,10 @@ DESCRIPTION ?= "${SUMMARY}."
#SUMMARY_${PN} ?= "${SUMMARY}"
#DESCRIPTION_${PN} ?= "${DESCRIPTION}"
+SUMMARY_${PN}-src ?= "${SUMMARY} - Source files"
+DESCRIPTION_${PN}-src ?= "${DESCRIPTION} \
+This package contains sources for debugging purposes."
+
SUMMARY_${PN}-dbg ?= "${SUMMARY} - Debugging files"
DESCRIPTION_${PN}-dbg ?= "${DESCRIPTION} \
This package contains ELF symbols and related sources for debugging purposes."
@@ -275,8 +286,10 @@ SOLIBSDEV = ".so"
# at least means builds aren't completely broken and symlinks don't take up much space.
SOLIBSDEV_darwin = ".dylibbroken"
+PACKAGE_DEBUG_SPLIT_STYLE ?= "debug-with-srcpkg"
+
PACKAGE_BEFORE_PN ?= ""
-PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
+PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
PACKAGES_DYNAMIC = "^${PN}-locale-.*"
FILES = ""
@@ -301,7 +314,8 @@ FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
FILES_${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \
${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \
${datadir}/aclocal ${base_libdir}/*.o \
- ${libdir}/${BPN}/*.la ${base_libdir}/*.la"
+ ${libdir}/${BPN}/*.la ${base_libdir}/*.la \
+ ${libdir}/cmake ${datadir}/cmake"
SECTION_${PN}-dev = "devel"
ALLOW_EMPTY_${PN}-dev = "1"
RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"
@@ -311,10 +325,14 @@ SECTION_${PN}-staticdev = "devel"
RDEPENDS_${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})"
FILES_${PN}-dbg = "/usr/lib/debug /usr/src/debug"
-
SECTION_${PN}-dbg = "devel"
ALLOW_EMPTY_${PN}-dbg = "1"
+# The files list for source packages are dynamically set based on
+# PACKAGE_DEBUG_SPLIT_STYLE
+FILES_${PN}-src = ""
+SECTION_${PN}-src = "devel"
+
FILES_${PN}-locale = "${datadir}/locale"
# File manifest
@@ -325,21 +343,23 @@ FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
# This default was only used for checking
FILESEXTRAPATHS ?= "__default:"
+# The default list of fs-perms files to process. If the list is empty only
+# the builtin definitions will be used. Builtin definitions included:
+# base_prefix, prefix, exec_prefix, base_bindir, base_sbindir, base_libdir,
+# datadir, sysconfdir, servicedir, sharedstatedir, localstatedir, infodir,
+# mandir, docdir, bindir, sbindir, libexecdir, libdir, includedir and
+# oldincludedir
+FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'files/fs-perms-persistent-log.txt'}"
+
##################################################################
# General work and output directories for the build system.
##################################################################
TMPDIR ?= "${TOPDIR}/tmp"
-CACHE = "${TMPDIR}/cache${@['', '/' + str(d.getVar('MACHINE', True))][bool(d.getVar('MACHINE', True))]}${@['', '/' + str(d.getVar('SDKMACHINE', True))][bool(d.getVar('SDKMACHINE', True))]}"
+CACHE = "${TMPDIR}/cache${@['', '/' + str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
# The persistent cache should be shared by all builds
PERSISTENT_DIR = "${TOPDIR}/cache"
LOG_DIR = "${TMPDIR}/log"
-CO_DIR = "${DL_DIR}"
-CVSDIR = "${CO_DIR}/cvs"
-SVNDIR = "${CO_DIR}/svn"
-GITDIR = "${CO_DIR}/git2"
-BZRDIR = "${CO_DIR}/bzr"
-HGDIR = "${CO_DIR}/hg"
STAMPS_DIR ?= "${TMPDIR}/stamps"
STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
@@ -352,8 +372,11 @@ S = "${WORKDIR}/${BP}"
B = "${S}"
STAGING_DIR = "${TMPDIR}/sysroots"
+COMPONENTS_DIR = "${STAGING_DIR}-components"
+RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot"
+RECIPE_SYSROOT_NATIVE = "${WORKDIR}/recipe-sysroot-native"
-STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
+STAGING_DIR_NATIVE = "${RECIPE_SYSROOT_NATIVE}"
STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}"
STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts"
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
@@ -365,7 +388,7 @@ STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}"
STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}"
-STAGING_DIR_HOST = "${STAGING_DIR}/${MACHINE}"
+STAGING_DIR_HOST = "${RECIPE_SYSROOT}"
STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
STAGING_LIBDIR = "${STAGING_DIR_HOST}${libdir}"
STAGING_LIBEXECDIR = "${STAGING_DIR_HOST}${libexecdir}"
@@ -376,8 +399,7 @@ STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${exec_prefix}"
STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader"
STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware"
-STAGING_DIR_TARGET = "${STAGING_DIR}/${MACHINE}"
-STAGING_DIR_TCBOOTSTRAP = "${STAGING_DIR_TARGET}-tcbootstrap"
+STAGING_DIR_TARGET = "${RECIPE_SYSROOT}"
# Setting DEPLOY_DIR outside of TMPDIR is helpful, when you are using
# packaged staging and/or multimachine.
@@ -389,7 +411,7 @@ DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
DEPLOY_DIR_IMAGE ?= "${DEPLOY_DIR}/images/${MACHINE}"
DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
-PKGDATA_DIR = "${STAGING_DIR_HOST}/pkgdata"
+PKGDATA_DIR = "${TMPDIR}/pkgdata/${MACHINE}"
##################################################################
# SDK variables.
@@ -407,6 +429,13 @@ SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
OLDEST_KERNEL = "3.2.0"
OLDEST_KERNEL_aarch64 = "3.14"
OLDEST_KERNEL_nios2 = "3.19"
+OLDEST_KERNEL_riscv32 = "4.15"
+OLDEST_KERNEL_riscv64 = "4.15"
+
+# SDK_OLDEST_KERNEL can't be set using overrides since there are
+# none for the SDK architecture. Best to set it from a machine-sdk
+# include file if you need an SDK arch-specific value
+SDK_OLDEST_KERNEL = "3.2.0"
# Define where the kernel headers are installed on the target as well as where
# they are staged.
@@ -421,8 +450,9 @@ STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifac
IMAGE_ROOTFS = "${WORKDIR}/rootfs"
IMAGE_BASENAME = "${PN}"
-IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
-IMAGE_NAME[vardepsexclude] += "DATETIME"
+IMAGE_VERSION_SUFFIX = "-${DATETIME}"
+IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME"
+IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
# This option allows for a percentage overage of the actual image size rather than a
@@ -447,14 +477,40 @@ export PATH
# Build utility info.
##################################################################
+# Directory where host tools are copied
+HOSTTOOLS_DIR = "${TMPDIR}/hosttools"
+
+# Tools needed to run builds with OE-Core
+HOSTTOOLS += " \
+ [ ar as awk basename bash bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \
+ cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \
+ fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \
+ head hostname iconv id install ld ldd ln ls make makeinfo md5sum mkdir mknod \
+ mktemp mv nm objcopy objdump od patch perl pod2man pr printf pwd \
+ python3 ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh sha256sum \
+ sleep sort split stat strings strip tail tar tee test touch tr true uname \
+ uniq wc wget which xargs \
+"
+
+# Tools needed to run testimage runtime image testing
+HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", "testsdk.bbclass"])) else ''}"
+
+# Link to these if present
+HOSTTOOLS_NONFATAL += "aws gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh sudo"
+
+# Temporary add few more detected in bitbake world
+HOSTTOOLS_NONFATAL += "join nl size yes zcat"
+
+# Used by bzr fetcher
+HOSTTOOLS_NONFATAL += "bzr"
+
+# Used by ssh fetcher
+HOSTTOOLS_NONFATAL += "scp"
+
+# Link to git-lfs if present
+HOSTTOOLS_NONFATAL += "git-lfs"
+
CCACHE ??= ""
-# Disable ccache explicitly if CCACHE is null since gcc may be a symlink
-# of ccache some distributions (e.g., Fedora 17).
-export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE', True) == '']}"
-# ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and
-# autogen sets HOME=/dev/null so in certain situations builds can fail.
-# Explicitly export CCACHE_DIR until we can assume ccache >3.1.10 on the host.
-export CCACHE_DIR ??= "${@os.getenv('HOME')}/.ccache"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
@@ -464,9 +520,9 @@ export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}"
export CCLD = "${CC}"
-export AR = "${HOST_PREFIX}ar"
+export AR = "${HOST_PREFIX}gcc-ar"
export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}"
-export RANLIB = "${HOST_PREFIX}ranlib"
+export RANLIB = "${HOST_PREFIX}gcc-ranlib"
export STRIP = "${HOST_PREFIX}strip"
export OBJCOPY = "${HOST_PREFIX}objcopy"
export OBJDUMP = "${HOST_PREFIX}objdump"
@@ -491,6 +547,7 @@ export MAKE = "make"
EXTRA_OEMAKE = ""
EXTRA_OECONF = ""
export LC_ALL = "en_US.UTF-8"
+export TZ = 'UTC'
##################################################################
# Patch handling.
@@ -505,19 +562,21 @@ PATCHRESOLVE = "noop"
export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
BUILDSDK_CPPFLAGS = ""
export CPPFLAGS = "${TARGET_CPPFLAGS}"
-export TARGET_CPPFLAGS = ""
+TARGET_CPPFLAGS = ""
export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
-BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION}"
+BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION} ${DEBUG_PREFIX_MAP}"
export CFLAGS = "${TARGET_CFLAGS}"
-export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
+TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
export BUILD_CXXFLAGS = "${BUILD_CFLAGS}"
+BUILDSDK_CXXFLAGS = "${BUILDSDK_CFLAGS}"
export CXXFLAGS = "${TARGET_CXXFLAGS}"
-export TARGET_CXXFLAGS = "${TARGET_CFLAGS}"
+TARGET_CXXFLAGS = "${TARGET_CFLAGS}"
export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
-L${STAGING_BASE_LIBDIR_NATIVE} \
+ -Wl,--enable-new-dtags \
-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} \
-Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} \
-Wl,-rpath,${STAGING_LIBDIR_NATIVE} \
@@ -528,19 +587,14 @@ BUILDSDK_LDFLAGS = "-Wl,-O1"
LINKER_HASH_STYLE ??= "gnu"
# mips does not support GNU hash style therefore we override
-LINKER_HASH_STYLE_mips = "sysv"
-LINKER_HASH_STYLE_mipsel = "sysv"
-LINKER_HASH_STYLE_mips64 = "sysv"
-LINKER_HASH_STYLE_mips64el = "sysv"
-LINKER_HASH_STYLE_mips64n32 = "sysv"
-LINKER_HASH_STYLE_mips64eln32 = "sysv"
-TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}"
+LINKER_HASH_STYLE_mipsarch = "sysv"
+
+TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE') != 'gnu']}"
+
+ASNEEDED ?= "-Wl,--as-needed"
export LDFLAGS = "${TARGET_LDFLAGS}"
-export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
-#export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${libdir} \
-# -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir} \
-# -Wl,-O1"
+TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
# Pass parallel make options to the compile task
EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
@@ -551,44 +605,47 @@ EXTRA_OEMAKE_prepend_task-install = "${PARALLEL_MAKEINST} "
##################################################################
# Optimization flags.
##################################################################
-DEBUG_PREFIX_MAP ?= "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
- -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+# Beware: applied last to first
+DEBUG_PREFIX_MAP ?= "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+ -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
-fdebug-prefix-map=${STAGING_DIR_HOST}= \
+ -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
"
DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
# Disabled until the option works properly -feliminate-dwarf2-dups
FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
-DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
-SELECTED_OPTIMIZATION = "${@d.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][d.getVar('DEBUG_BUILD', True) == '1'], True)}"
-SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION"
-BUILD_OPTIMIZATION = "-O2 -pipe"
+DEBUG_OPTIMIZATION = "-Og ${DEBUG_FLAGS} -pipe"
+SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
+SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
+BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g -feliminate-unused-debug-types', '-O2', d)} -pipe"
+BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD"
##################################################################
# Settings used by bitbake-layers.
##################################################################
-BBLAYERS_LAYERINDEX_URL ??= "http://layers.openembedded.org/layerindex/"
+BBLAYERS_LAYERINDEX_URL ??= "https://layers.openembedded.org/layerindex/"
BBLAYERS_FETCH_DIR ??= "${COREBASE}"
##################################################################
# Download locations and utilities.
##################################################################
-APACHE_MIRROR = "http://archive.apache.org/dist"
-DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
+APACHE_MIRROR = "https://archive.apache.org/dist"
+DEBIAN_MIRROR = "http://ftp.debian.org/debian/pool"
GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
-GNOME_GIT = "git://git.gnome.org"
-GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
-GNU_MIRROR = "http://ftp.gnu.org/gnu"
+GNOME_GIT = "git://gitlab.gnome.org/GNOME"
+GNOME_MIRROR = "https://ftp.gnome.org/pub/GNOME/sources"
+GNU_MIRROR = "https://ftp.gnu.org/gnu"
GNUPG_MIRROR = "https://www.gnupg.org/ftp/gcrypt"
GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
-KERNELORG_MIRROR = "http://kernel.org/pub"
-SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"
-XLIBS_MIRROR = "http://xlibs.freedesktop.org/release"
-XORG_MIRROR = "http://xorg.freedesktop.org/releases"
-SAVANNAH_GNU_MIRROR = "http://download.savannah.gnu.org/releases"
-SAVANNAH_NONGNU_MIRROR = "http://download.savannah.nongnu.org/releases"
-CPAN_MIRROR = "http://search.cpan.org/CPAN"
+KERNELORG_MIRROR = "https://cdn.kernel.org/pub"
+SOURCEFORGE_MIRROR = "https://downloads.sourceforge.net"
+XLIBS_MIRROR = "https://xlibs.freedesktop.org/release"
+XORG_MIRROR = "https://www.x.org/releases/"
+SAVANNAH_GNU_MIRROR = "https://download.savannah.gnu.org/releases"
+SAVANNAH_NONGNU_MIRROR = "https://download.savannah.nongnu.org/releases"
+CPAN_MIRROR = "https://search.cpan.org/CPAN"
SRC_URI[vardepsexclude] += "\
APACHE_MIRROR \
@@ -609,18 +666,13 @@ SRC_URI[vardepsexclude] += "\
"
# You can use the mirror of your country to get faster downloads by putting
-# export DEBIAN_MIRROR = "ftp://ftp.de.debian.org/debian/pool"
+# export DEBIAN_MIRROR = "http://ftp.de.debian.org/debian/pool"
# into your local.conf
-FETCHCMD_svn = "/usr/bin/env svn --non-interactive --trust-server-cert"
-FETCHCMD_cvs = "/usr/bin/env cvs"
-FETCHCMD_wget = "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
-FETCHCMD_bzr = "/usr/bin/env bzr"
-FETCHCMD_hg = "/usr/bin/env hg"
-
SRCDATE = "${DATE}"
SRCREV ??= "INVALID"
AUTOREV = "${@bb.fetch2.get_autorev(d)}"
+AUTOREV[vardepvalue] = "${SRCPV}"
# Set Dynamically in base.bbclass
# SRCPV = "${@bb.fetch2.get_srcrev(d)}"
SRCPV[vardepvalue] = "${SRCPV}"
@@ -629,14 +681,15 @@ SRC_URI = ""
# Use pseudo as the fakeroot implementation
PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/"
-PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}"
+PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${PSEUDO_SYSROOT}"
+PSEUDO_SYSROOT = "${COMPONENTS_DIR}/${BUILD_ARCH}/pseudo-native"
export PSEUDO_DISABLED = "1"
#export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
#export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
#export PSEUDO_LIBDIR = "${STAGING_DIR_NATIVE}$PSEUDOBINDIR/../lib/pseudo/lib
-FAKEROOTBASEENV = "PSEUDO_BINDIR=${STAGING_BINDIR_NATIVE} PSEUDO_LIBDIR=${STAGING_BINDIR_NATIVE}/../lib/pseudo/lib PSEUDO_PREFIX=${STAGING_BINDIR_NATIVE}/../../ PSEUDO_DISABLED=1"
-FAKEROOTCMD = "${STAGING_BINDIR_NATIVE}/pseudo"
-FAKEROOTENV = "PSEUDO_PREFIX=${STAGING_DIR_NATIVE}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0"
+FAKEROOTBASEENV = "PSEUDO_BINDIR=${PSEUDO_SYSROOT}${bindir_native} PSEUDO_LIBDIR=${PSEUDO_SYSROOT}${prefix_native}/lib/pseudo/lib PSEUDO_PREFIX=${PSEUDO_SYSROOT}${prefix_native} PSEUDO_DISABLED=1"
+FAKEROOTCMD = "${PSEUDO_SYSROOT}${bindir_native}/pseudo"
+FAKEROOTENV = "PSEUDO_PREFIX=${PSEUDO_SYSROOT}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0"
FAKEROOTNOENV = "PSEUDO_UNLOAD=1"
FAKEROOTDIRS = "${PSEUDO_LOCALSTATEDIR}"
PREFERRED_PROVIDER_virtual/fakeroot-native ?= "pseudo-native"
@@ -670,25 +723,21 @@ export PKG_CONFIG_SYSTEM_INCLUDE_PATH = "${includedir}"
# is a bad idea. Setting a dummy value is better than a ton of anonymous python.
DISTRO ??= "nodistro"
DISTRO_NAME ??= "OpenEmbedded"
+
# Overrides are processed left to right, so the ones that are named later take precedence.
-# You generally want them to go from least to most specific.
-#
-# This means that an envionment variable named '<foo>_arm' overrides an
-# environment variable '<foo>' (when ${TARGET_ARCH} is arm).
-# An environment variable '<foo>_qemuarm' overrides '<foo>' and overrides
-# '<foo>_arm' when ${MACHINE} is 'qemuarm'.
+# You generally want them to go from least to most specific. This means that:
+# A variable '<foo>_arm' overrides a variable '<foo>' when ${TARGET_ARCH} is arm.
+# A variable '<foo>_qemuarm' overrides '<foo>' and overrides '<foo>_arm' when ${MACHINE} is 'qemuarm'.
# If you use combination ie '<foo>_qemuarm_arm', then '<foo>_qemuarm_arm' will override
# '<foo>_qemuarm' and then '<foo>' will be overriden with that value from '<foo>_qemuarm'.
# And finally '<foo>_forcevariable' overrides any standard variable, with the highest priority.
+# This works for functions as well, they are really just variables.
#
-# This works for functions as well, they are really just environment variables.
-# Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
-OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:forcevariable"
-OVERRIDES[vardepsexclude] = "MACHINEOVERRIDES"
+OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:forcevariable"
+LIBCOVERRIDE ?= ""
CLASSOVERRIDE ?= "class-target"
-DISTROOVERRIDES ?= "${@d.getVar('DISTRO', True) or ''}"
+DISTROOVERRIDES ?= "${@d.getVar('DISTRO') or ''}"
MACHINEOVERRIDES ?= "${MACHINE}"
-MACHINEOVERRIDES[vardepsexclude] = "MACHINE"
FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
@@ -700,8 +749,7 @@ require conf/abi_version.conf
include conf/site.conf
include conf/auto.conf
include conf/local.conf
-include conf/build/${BUILD_SYS}.conf
-include conf/target/${TARGET_SYS}.conf
+require conf/multiconfig/${BB_CURRENT_MC}.conf
include conf/machine/${MACHINE}.conf
include conf/machine-sdk/${SDKMACHINE}.conf
include conf/distro/${DISTRO}.conf
@@ -717,7 +765,7 @@ require conf/sanity.conf
DL_DIR ?= "${TOPDIR}/downloads"
SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
IMAGE_FSTYPES ?= "tar.gz"
-IMAGE_FSTYPES_DEBUGFS ?= "${IMAGE_FSTYPES}"
+IMAGE_FSTYPES_DEBUGFS ?= "tar.gz"
INITRAMFS_FSTYPES ?= "cpio.gz"
# The maximum size in Kbytes for the generated initramfs image size.
@@ -743,6 +791,9 @@ BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
# Default to setting automatically based on cpu count
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
+# Default parallelism and resource usage for xz
+XZ_DEFAULTS ?= "--memlimit=50% --threads=${@oe.utils.cpu_count()}"
+
##################################################################
# Magic Cookie for SANITY CHECK
##################################################################
@@ -765,16 +816,26 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
EXTRA_IMAGE_FEATURES ??= ""
IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"
+# Native distro features (will always be used for -native, even if they
+# are not enabled for target)
+DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr"
+DISTRO_FEATURES_NATIVESDK ?= "x11"
+
+# Normally target distro features will not be applied to native builds:
+# Native distro features on this list will use the target feature value
+DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation"
+DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation"
+
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 'MACHINE_FEATURES', d)}"
COMBINED_FEATURES[vardeps] += "DISTRO_FEATURES MACHINE_FEATURES"
SERIAL_CONSOLE ??= ""
-SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE', True).replace(' ', ';')}"
+SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE').replace(' ', ';')}"
-NO_RECOMMENDATIONS ?= ""
+NO_RECOMMENDATIONS ??= ""
BAD_RECOMMENDATIONS ?= ""
# Make sure MACHINE isn't exported
@@ -796,7 +857,7 @@ DISTRO[unexport] = "1"
SHELL[unexport] = "1"
# Used by canadian-cross to handle string conversions on TARGET_ARCH where needed
-TRANSLATED_TARGET_ARCH ??= "${@d.getVar('TARGET_ARCH', True).replace("_", "-")}"
+TRANSLATED_TARGET_ARCH ??= "${@d.getVar('TARGET_ARCH').replace("_", "-")}"
# Complete output from bitbake
BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log"
@@ -806,22 +867,30 @@ BB_SIGNATURE_HANDLER ?= "OEBasicHash"
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \
SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
- PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
- CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX \
+ STAMPS_DIR PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
+ CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_NOHASHDIR LICENSE_PATH SDKPKGSUFFIX \
WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \
- BB_WORKERCONTEXT"
+ BB_WORKERCONTEXT BB_LIMITEDDEPS BB_UNIHASH extend_recipe_sysroot DEPLOY_DIR \
+ SSTATE_HASHEQUIV_METHOD SSTATE_HASHEQUIV_REPORT_TASKDATA \
+ SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR BB_HASHSERVE"
BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \
PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \
HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \
- BB_SETSCENE_ENFORCE"
+ BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT"
BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \
file-checksums python func task export unexport noexec nostamp dirs cleandirs \
sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \
recrdeptask nodeprrecs stamp-extra-info sstate-outputdirs filename lineno \
- progress"
+ progress mcdepends"
MLPREFIX ??= ""
MULTILIB_VARIANTS ??= ""
+
+# Older versions of bitbake (< 1.42) don't set BB_UNIHASH. For compatibility with these
+# versions, set BB_UNIHASH equivalent to BB_TASKHASH if unspecified, which is
+# what it would be anyway if the signature generator (e.g. OEEquivHash) doesn't
+# support unihashes.
+BB_UNIHASH ?= "${BB_TASKHASH}"
diff --git a/meta/conf/ccache.conf b/meta/conf/ccache.conf
new file mode 100644
index 0000000000..931012dec9
--- /dev/null
+++ b/meta/conf/ccache.conf
@@ -0,0 +1,2 @@
+max_size = 0
+cache_dir_levels = 1
diff --git a/meta/conf/conf-notes.txt b/meta/conf/conf-notes.txt
index 2f2932ba1f..5af13a8357 100644
--- a/meta/conf/conf-notes.txt
+++ b/meta/conf/conf-notes.txt
@@ -1,7 +1,17 @@
+
+### Shell environment set up for builds. ###
+
+You can now run 'bitbake <target>'
+
Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
meta-ide-support
-You can also run generated qemu images with a command like 'runqemu qemux86'
+You can also run generated qemu images with a command like 'runqemu qemux86'.
+
+Other commonly useful commands are:
+ - 'devtool' and 'recipetool' handle common recipe tasks
+ - 'bitbake-layers' handles common layer tasks
+ - 'oe-pkgdata-util' handles common target package tasks
diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf
index 71c65b1462..66fd246526 100644
--- a/meta/conf/distro/defaultsetup.conf
+++ b/meta/conf/distro/defaultsetup.conf
@@ -1,7 +1,7 @@
include conf/distro/include/default-providers.inc
include conf/distro/include/default-versions.inc
include conf/distro/include/default-distrovars.inc
-include conf/distro/include/world-broken.inc
+include conf/distro/include/maintainers.inc
TCMODE ?= "default"
require conf/distro/include/tcmode-${TCMODE}.inc
@@ -9,15 +9,19 @@ require conf/distro/include/tcmode-${TCMODE}.inc
TCLIBC ?= "glibc"
require conf/distro/include/tclibc-${TCLIBC}.inc
+require conf/distro/include/uninative-flags.inc
+
# Allow single libc distros to disable this code
TCLIBCAPPEND ?= "-${TCLIBC}"
TMPDIR .= "${TCLIBCAPPEND}"
-CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(d.getVar('MACHINE', True))][bool(d.getVar('MACHINE', True))]}${@['', '/' + str(d.getVar('SDKMACHINE', True))][bool(d.getVar('SDKMACHINE', True))]}"
+CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
USER_CLASSES ?= ""
PACKAGE_CLASSES ?= "package_ipk"
INHERIT_BLACKLIST = "blacklist"
-INHERIT_DISTRO ?= "debian devshell sstate license"
+INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
+INIT_MANAGER ??= "none"
+require conf/distro/include/init-manager-${INIT_MANAGER}.inc
diff --git a/meta/conf/distro/include/as-needed.inc b/meta/conf/distro/include/as-needed.inc
deleted file mode 100644
index 114d377eac..0000000000
--- a/meta/conf/distro/include/as-needed.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-
-ASNEEDED = "-Wl,--as-needed"
-
-ASNEEDED_pn-babeltrace = ""
-ASNEEDED_pn-console-tools = ""
-ASNEEDED_pn-distcc = ""
-ASNEEDED_pn-openobex = ""
-ASNEEDED_pn-icu = ""
-ASNEEDED_pn-pciutils = ""
-ASNEEDED_pn-puzzles = ""
-ASNEEDED_pn-pulseaudio = ""
-ASNEEDED_pn-rpm = ""
-
-TARGET_LDFLAGS += "${ASNEEDED}"
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index f7ed943c92..10d86cf7b1 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -8,22 +8,13 @@ IMAGE_LINGUAS ?= "en-us en-gb"
ENABLE_BINARY_LOCALE_GENERATION ?= "1"
LOCALE_UTF8_ONLY ?= "0"
LOCALE_UTF8_IS_DEFAULT ?= "1"
+LOCALE_UTF8_IS_DEFAULT_class-nativesdk = "0"
-DISTRO_FEATURES_DEFAULT ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11"
-DISTRO_FEATURES_LIBC_DEFAULT ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
- libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
- libc-getlogin libc-idn libc-inet-anl libc-libm libc-locales libc-locale-code \
- libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
- libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
- libc-posix-wchar-io"
-DISTRO_FEATURES_LIBC ?= "${DISTRO_FEATURES_LIBC_DEFAULT}"
-DISTRO_FEATURES_LIBC_class-nativesdk = "${DISTRO_FEATURES_LIBC_DEFAULT}"
-DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
-
+DISTRO_FEATURES_DEFAULT ?= "acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11"
+DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}"
IMAGE_FEATURES ?= ""
WHITELIST_GPL-3.0 ?= ""
-LGPLv2_WHITELIST_GPL-3.0 ?= ""
COMMERCIAL_AUDIO_PLUGINS ?= ""
# COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
@@ -46,3 +37,15 @@ BB_STRICT_CHECKSUM = "1"
GTK2DISTROFEATURES = "directfb x11"
GTK3DISTROFEATURES = "x11 wayland"
+
+ARCH_DEFAULT_KERNELIMAGETYPE = "zImage"
+ARCH_DEFAULT_KERNELIMAGETYPE_x86 = "bzImage"
+ARCH_DEFAULT_KERNELIMAGETYPE_x86-64 = "bzImage"
+KERNEL_IMAGETYPE ??= "${ARCH_DEFAULT_KERNELIMAGETYPE}"
+KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
+
+# The CONNECTIVITY_CHECK_URIS are used to test whether we can succesfully
+# fetch from the network (and warn you if not). To disable the test set
+# the variable to be empty.
+# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master
+CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index ece4d8b300..ea88bd4876 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -1,12 +1,12 @@
#
# Default virtual providers
#
-PREFERRED_PROVIDER_virtual/db ?= "db"
-PREFERRED_PROVIDER_virtual/db-native ?= "db-native"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "mesa"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
+PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native"
+PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa"
PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
PREFERRED_PROVIDER_virtual/mesa ?= "mesa"
@@ -25,9 +25,9 @@ VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-opkg"
VIRTUAL-RUNTIME_apm ?= "apm"
VIRTUAL-RUNTIME_alsa-state ?= "alsa-state"
VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt"
-VIRTUAL-RUNTIME_wireless-tools ?= "iw wireless-tools"
VIRTUAL-RUNTIME_base-utils ?= "busybox"
VIRTUAL-RUNTIME_base-utils-hwclock ?= "busybox-hwclock"
+VIRTUAL-RUNTIME_base-utils-syslog ?= "busybox-syslog"
#
# Default recipe providers
@@ -46,11 +46,15 @@ PREFERRED_PROVIDER_nativesdk-opkg ?= "nativesdk-opkg"
PREFERRED_PROVIDER_console-tools ?= "kbd"
PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','eudev',d)}"
-PREFERRED_RPROVIDER_libasound-module-bluez ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez4',d)}"
-PREFERRED_RPROVIDER_bluez-hcidump ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez-hcidump',d)}"
# Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
PREFERRED_PROVIDER_ltp ?= "ltp"
PREFERRED_PROVIDER_getopt ?= "util-linux-getopt"
PREFERRED_PROVIDER_openssl ?= "openssl"
PREFERRED_PROVIDER_openssl-native ?= "openssl-native"
PREFERRED_PROVIDER_nativesdk-openssl ?= "nativesdk-openssl"
+PREFERRED_PROVIDER_pkgconfig ?= "pkgconfig"
+PREFERRED_PROVIDER_nativesdk-pkgconfig ?= "nativesdk-pkgconfig"
+PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconfig-native"
+PREFERRED_RPROVIDER_initd-functions ?= "initscripts"
+
+PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa"
diff --git a/meta/conf/distro/include/default-versions.inc b/meta/conf/distro/include/default-versions.inc
index cc8c533d4c..a6f331350e 100644
--- a/meta/conf/distro/include/default-versions.inc
+++ b/meta/conf/distro/include/default-versions.inc
@@ -2,9 +2,3 @@
# Default preferred versions
#
-# Force the older version of liberation-fonts until we fix the fontforge issue
-PREFERRED_VERSION_liberation-fonts ?= "1.04"
-
-# Force db-native's version to keep sync with db while
-# 'AGPL-3.0' in ${INCOMPATIBLE_LICENSE} blacklist
-PREFERRED_VERSION_db-native = "${@incompatible_license_contains('AGPL-3.0', '5.%', '6.%', d)}"
diff --git a/meta/conf/distro/include/distro_alias.inc b/meta/conf/distro/include/distro_alias.inc
index 10efb096f0..e314642b9c 100644
--- a/meta/conf/distro/include/distro_alias.inc
+++ b/meta/conf/distro/include/distro_alias.inc
@@ -15,8 +15,6 @@ DISTRO_PN_ALIAS_pn-alsa-utils-scripts = "OE-Core"
DISTRO_PN_ALIAS_pn-atk = "Fedora=atk OpenSuSE=atk"
DISTRO_PN_ALIAS_pn-avahi-ui = "Ubuntu=avahi-discover Debian=avahi-discover"
DISTRO_PN_ALIAS_pn-babeltrace = "OSPDT"
-DISTRO_PN_ALIAS_pn-bdwgc = "OSPDT"
-DISTRO_PN_ALIAS_pn-bigreqsproto = "Meego=xorg-x11-proto-bigreqsproto"
DISTRO_PN_ALIAS_pn-bjam = "OpenSuSE=boost-jam Debina=bjam"
DISTRO_PN_ALIAS_pn-blktool = "Debian=blktool Mandriva=blktool"
DISTRO_PN_ALIAS_pn-bluez5 = "Fedora=bluez Opensuse=bluez"
@@ -26,7 +24,6 @@ DISTRO_PN_ALIAS_pn-build-appliance-image = "OSPDT"
DISTRO_PN_ALIAS_pn-build-compare = "Opensuse=build-compare Fedora=build-compare"
DISTRO_PN_ALIAS_pn-builder = "OE-Core"
DISTRO_PN_ALIAS_pn-buildtools-tarball = "OE-Core"
-DISTRO_PN_ALIAS_pn-calibrateproto = "OSPDT upstream=http://cgit.freedesktop.org/xorg/proto/calibrateproto"
DISTRO_PN_ALIAS_pn-cdrtools = "OpenSUSE=cdrtools OSPDT"
DISTRO_PN_ALIAS_pn-chkconfig-alternatives = "Mandriva=chkconfig Debian=chkconfig"
DISTRO_PN_ALIAS_pn-clutter = "Fedora=clutter OpenSuse=clutter Ubuntu=clutter-1.0 Mandriva=clutter Debian=clutter"
@@ -38,7 +35,6 @@ DISTRO_PN_ALIAS_pn-clutter-gtk-1.0 = "Debian=clutter-gtk Ubuntu=clutter-gtk Fedo
DISTRO_PN_ALIAS_pn-clutter-gtk-1.8 = "Fedora=clutter-gtk OpenSuSE=clutter-gtk Ubuntu=clutter-gtk-0.10 Mandriva=clutter-gtk Debian=clutter-gtk"
DISTRO_PN_ALIAS_pn-cogl-1.0 = "Debian=cogl Ubuntu=cogl Fedora=cogl"
DISTRO_PN_ALIAS_pn-cogl = "Fedora=cogl OpenSuse=cogl Ubuntu=cogl Mandriva=cogl Debian=cogl"
-DISTRO_PN_ALIAS_pn-compositeproto = "Meego=xorg-x11-proto-compositeproto"
DISTRO_PN_ALIAS_pn-connman = "Meego=connman"
DISTRO_PN_ALIAS_pn-connman-conf = "OE-Core"
DISTRO_PN_ALIAS_pn-connman-gnome = "Intel"
@@ -47,9 +43,6 @@ DISTRO_PN_ALIAS_pn-core-image-base = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-clutter = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-full-cmdline = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-kernel-dev = "OE-Core"
-DISTRO_PN_ALIAS_pn-core-image-lsb = "OE-Core"
-DISTRO_PN_ALIAS_pn-core-image-lsb-dev = "OE-Core"
-DISTRO_PN_ALIAS_pn-core-image-lsb-sdk = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-minimal = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-minimal-dev = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-minimal-initramfs = "OE-Core"
@@ -63,19 +56,18 @@ DISTRO_PN_ALIAS_pn-core-image-testmaster = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-testmaster-initramfs = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-weston = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-x11 = "OE-Core"
+DISTRO_PN_ALIAS_pn-createrepo-c = "Fedora=createrepo_c Clear=createrepo_c"
DISTRO_PN_ALIAS_pn-cross-localedef = "OSPDT"
DISTRO_PN_ALIAS_pn-cryptodev-linux = "OE-Core"
DISTRO_PN_ALIAS_pn-cryptodev-module = "OE-Core"
DISTRO_PN_ALIAS_pn-cryptodev-tests = "OE-Core"
DISTRO_PN_ALIAS_pn-cwautomacros = "OSPDT upstream=http://cwautomacros.berlios.de/"
-DISTRO_PN_ALIAS_pn-damageproto = "Meego=xorg-x11-proto-damageproto"
DISTRO_PN_ALIAS_pn-db = "Debian=db5.1 Ubuntu=db5.1"
DISTRO_PN_ALIAS_pn-dbus-test = "Fedora=dbus Ubuntu=dbus"
DISTRO_PN_ALIAS_pn-dbus-wait = "OpenedHand"
DISTRO_PN_ALIAS_pn-depmodwrapper-cross = "OE-Core"
DISTRO_PN_ALIAS_pn-distcc = "Debian=distcc Fedora=distcc"
DISTRO_PN_ALIAS_pn-distcc-config = "OpenedHand"
-DISTRO_PN_ALIAS_pn-dmxproto = "Meego=xorg-x11-proto-dmxproto Ubuntu=x11proto-dmx Debian=x11proto-dmx"
DISTRO_PN_ALIAS_pn-docbook-dsssl-stylesheets = "Fedora=docbook-style-dsssl Ubuntu=docbook-dsssl"
DISTRO_PN_ALIAS_pn-docbook-sgml-dtd-3.1 = "Fedora=docbook-dtds Mandriva=docbook-dtd31-sgml"
DISTRO_PN_ALIAS_pn-docbook-sgml-dtd-4.1 = "Fedora=docbook-dtds Mandriva=docbook-dtd41-sgml"
@@ -83,21 +75,12 @@ DISTRO_PN_ALIAS_pn-docbook-sgml-dtd-4.5 = "Fedora=docbook-dtds Mandriva=docbook-
DISTRO_PN_ALIAS_pn-docbook-xml-dtd4 = "Ubuntu=docbook-xml Fedora=docbook-dtds"
DISTRO_PN_ALIAS_pn-docbook-xml-dtd4-native = "Ubuntu=docbook-xml Fedora=docbook-dtds"
DISTRO_PN_ALIAS_pn-docbook-xsl-stylesheets = "Fedora=docbook-xsl-stylesheets Opensuse=docbook-xsl-stylesheets"
-DISTRO_PN_ALIAS_pn-dri2proto = "Meego=xorg-x11-proto-dri2proto"
-DISTRO_PN_ALIAS_pn-dri3proto = "Fedora=dri3proto Opensuse=dri3proto-devel"
DISTRO_PN_ALIAS_pn-dropbear = "Debian=dropbear Ubuntu=dropbear"
DISTRO_PN_ALIAS_pn-dtc = "Fedora=dtc Ubuntu=dtc"
-DISTRO_PN_ALIAS_pn-eee-acpi-scripts = "Debian=eeepc-acpi-scripts Ubuntu=eeepc-acpi-scripts"
-DISTRO_PN_ALIAS_pn-eglinfo-fb = "OE-Core"
-DISTRO_PN_ALIAS_pn-eglinfo-x11 = "OE-Core"
DISTRO_PN_ALIAS_pn-encodings = "Ubuntu=xfonts-encodings Mandriva=x11-font-encodings Debian=xfonts-encodings"
-DISTRO_PN_ALIAS_pn-fixesproto = "Meego=xorg-x11-proto-fixesproto"
DISTRO_PN_ALIAS_pn-font-alias = "Fedora=xorg-x11-fonts-base Mandriva=x11-font-alias Meego=xorg-x11-fonts"
-DISTRO_PN_ALIAS_pn-fontcacheproto = "Meego=xorg-x11-proto-fontcacheproto"
-DISTRO_PN_ALIAS_pn-fontsproto = "Meego=xorg-x11-proto-fontsproto"
DISTRO_PN_ALIAS_pn-font-util = "Meego=xorg-x11-font-utils Fedora=xorg-x11-font-utils Ubuntu=xfonts-utils Mandriva=x11-font-util Debian=xfonts-utils"
DISTRO_PN_ALIAS_pn-formfactor = "OE-Core"
-DISTRO_PN_ALIAS_pn-fstests = "OpenedHand"
DISTRO_PN_ALIAS_pn-gcc-cross-initial = "OE-Core"
DISTRO_PN_ALIAS_pn-gcc-cross-initial-i586 = "OE-Core"
DISTRO_PN_ALIAS_pn-gcc-crosssdk-initial = "OE-Core"
@@ -114,7 +97,6 @@ DISTRO_PN_ALIAS_pn-glib-2.0 = "Meego=glib2 Fedora=glib2 OpenSuSE=glib2 Ubuntu=gl
DISTRO_PN_ALIAS_pn-glibc-locale = "OpenSuSE=glibc-locale Fedora=glibc-devel"
DISTRO_PN_ALIAS_pn-glibc-mtrace = "Fedora=glibc-utils Ubuntu=libc-dev-bin"
DISTRO_PN_ALIAS_pn-glibc-scripts = "Fedora=glibc Ubuntu=libc-bin"
-DISTRO_PN_ALIAS_pn-glproto = "Meego=xorg-x11-proto-glproto"
DISTRO_PN_ALIAS_pn-gnome-desktop-testing = "Debian=gnome-desktop-testing Fedora=gnome-desktop-testing"
DISTRO_PN_ALIAS_pn-gnu-config = "OpenedHand"
DISTRO_PN_ALIAS_pn-gptfdisk = "Fedora=gdisk Ubuntu=gdisk"
@@ -129,15 +111,15 @@ DISTRO_PN_ALIAS_pn-gstreamer1.0-plugins-bad = "Debian=gstreamer1.0-plugins-bad U
DISTRO_PN_ALIAS_pn-gstreamer1.0-plugins-base = "Debian=gstreamer1.0-plugins-base Ubuntu=gstreamer1.0-plugins-base"
DISTRO_PN_ALIAS_pn-gstreamer1.0-plugins-good = "Debian=gstreamer1.0-plugins-good Ubuntu=gstreamer1.0-plugins-bad"
DISTRO_PN_ALIAS_pn-gstreamer1.0-rtsp-server = "Ubuntu=gstreamer0.10-rtsp Fedora=gstreamer-rtsp"
+DISTRO_PN_ALIAS_pn-gstreamer1.0-vaapi = "Fedora=gstreamer1-vaapi Debian=gstreamer-vaapi Clear=gstreamer-vaapi"
DISTRO_PN_ALIAS_pn-gtk+ = "Meego=gtk2 Fedora=gtk2 OpenSuSE=gtk2 Ubuntu=gtk+2.0 Mandriva=gtk+2.0 Debian=gtk+2.0"
DISTRO_PN_ALIAS_pn-gtk+3 = "Ubuntu=gtk+3.0 Debian=gtk+3.0 Fedora=gtk3"
DISTRO_PN_ALIAS_pn-gtk-doc = "Fedora=gtk-doc Ubuntu=gtk-doc"
DISTRO_PN_ALIAS_pn-gtk-engines = "Fedora=gtk2-engines OpenSuSE=gtk2-engines Ubuntu=gtk2-engines Mandriva=gtk-engines2 Debian=gtk2-engines"
DISTRO_PN_ALIAS_pn-gtk-sato-engine = "OpenedHand"
DISTRO_PN_ALIAS_pn-gtk-icon-utils-native = "OSPDT"
-DISTRO_PN_ALIAS_pn-gummiboot = "Debian=gummiboot Fedora=gummiboot"
+DISTRO_PN_ALIAS_pn-systemd-boot = "Ubuntu=systemd-boot Fedora=systemd-boot"
DISTRO_PN_ALIAS_pn-hello-mod = "OE-Core"
-DISTRO_PN_ALIAS_pn-hostap-conf = "OE-Core"
DISTRO_PN_ALIAS_pn-hwlatdetect = "OSPDT"
DISTRO_PN_ALIAS_pn-icecc-create-env = "OE-Core"
DISTRO_PN_ALIAS_pn-init-ifupdown = "Debian=ifupdown Ubuntu=ifupdown"
@@ -149,18 +131,13 @@ DISTRO_PN_ALIAS_pn-initramfs-live-install-efi = "OE-Core"
DISTRO_PN_ALIAS_pn-initramfs-live-install-efi-testfs = "OE-Core"
DISTRO_PN_ALIAS_pn-initramfs-live-install-testfs = "OE-Core"
DISTRO_PN_ALIAS_pn-initscripts = "Fedora=initscripts Mandravia=initscripts"
-DISTRO_PN_ALIAS_pn-inputproto = "Meego=xorg-x11-proto-inputproto"
DISTRO_PN_ALIAS_pn-iproute2 = "OSPDT"
DISTRO_PN_ALIAS_pn-jpeg = "OpenSuSE=libjpeg Ubuntu=libjpeg62"
-DISTRO_PN_ALIAS_pn-kbproto = "Meego=xorg-x11-proto-kbproto Ubuntu=x11proto-kb-dev Debian=x11proto-kb-dev"
-DISTRO_PN_ALIAS_pn-kconfig-frontends = "OSPDT"
DISTRO_PN_ALIAS_pn-kernel-devsrc = "Debian=linux-base Ubuntu=linux"
-DISTRO_PN_ALIAS_pn-kernelshark = "Mandriva=kernelshark Ubuntu=kernelshark"
DISTRO_PN_ALIAS_pn-kern-tools-native = "Windriver"
DISTRO_PN_ALIAS_pn-keymaps = "OE-Core"
DISTRO_PN_ALIAS_pn-kf = "OSPDT"
DISTRO_PN_ALIAS_pn-lame = "Debian=lame Ubuntu=lame"
-DISTRO_PN_ALIAS_pn-latencytop = "Meego=latencytop Fedora=latencytop Debian=latencytop OpenSuSE=latencytop"
DISTRO_PN_ALIAS_pn-ldconfig-native = "Ubuntu=libc-bin Fedora=glibc"
DISTRO_PN_ALIAS_pn-liba52 = "Mandriva=a52dec Debian=a52dec"
DISTRO_PN_ALIAS_pn-libacpi = "Ubuntu=libacpi Mandriva=libacpi"
@@ -195,10 +172,10 @@ DISTRO_PN_ALIAS_pn-libomxil = "OSPDT upstream=http://omxil.sourceforge.net/"
DISTRO_PN_ALIAS_pn-libowl = "Debian=owl OpenedHand"
DISTRO_PN_ALIAS_pn-libpam = "Meego=pam Fedora=pam OpenSuSE=pam Ubuntu=pam Mandriva=pam Debian=pam"
DISTRO_PN_ALIAS_pn-libpcre = "Mandriva=libpcre0 Fedora=pcre"
+DISTRO_PN_ALIAS_pn-libpcre2 = "Fedora=pcre2 Debian=pcre2 Clear=pcre2"
DISTRO_PN_ALIAS_pn-libpng12 = "Debian=libpng12-0 Fedora=libpng"
DISTRO_PN_ALIAS_pn-libpod-plainer-perl = "OSPDT"
DISTRO_PN_ALIAS_pn-libsamplerate0 = "Meego=libsamplerate Fedora=libsamplerate OpenSuSE=libsamplerate Ubuntu=libsamplerate Mandriva=libsamplerate Debian=libsamplerate"
-DISTRO_PN_ALIAS_pn-libsdl = "Fedora=SDL Opensuse=SDL"
DISTRO_PN_ALIAS_pn-libsdl2 = "Fedora=sdl2 Opensuse=libsdl2 Ubuntu=libsdl2 Debian=libsdl2"
DISTRO_PN_ALIAS_pn-libsndfile1 = "Meego=libsndfile Fedora=libsndfile OpenSuSE=libsndfile Ubuntu=libsndfile Mandriva=libsndfile Debian=libsndfile"
DISTRO_PN_ALIAS_pn-libsoup-2.4 = "Meego=libsoup Fedora=libsoup OpenSuSE=libsoup Ubuntu=libsoup2.4 Mandriva=libsoup Debian=libsoup2.4"
@@ -206,14 +183,13 @@ DISTRO_PN_ALIAS_pn-libtelepathy = "Debian=libtelepathy2 Ubuntu=libtelepathy2"
DISTRO_PN_ALIAS_pn-libtimedate-perl = "Debian=libtimedate-perl Ubuntu=libtimedate-perl"
DISTRO_PN_ALIAS_pn-liburcu = "Fedora=userspace-rcu Ubuntu=liburcu0"
DISTRO_PN_ALIAS_pn-libusb1 = "Debian=libusb-1.0-0 Fedora=libusb1"
-DISTRO_PN_ALIAS_pn-libusb-compat = "OSPDT"
DISTRO_PN_ALIAS_pn-libx11 = "Debian=libx11-6 Fedora=libX11 Ubuntu=libx11-6 OpenSuSE=xorg-x11-libX11"
DISTRO_PN_ALIAS_pn-libxcalibrate = "OSPDT upstream=http://cgit.freedesktop.org/xorg/lib/libXCalibrate/"
+DISTRO_PN_ALIAS_pn-libxfont2 = "Fedora=libXfont2 Clear=libXfont2"
DISTRO_PN_ALIAS_pn-libxft = "Mandriva=libxft Debian=libxft2 Ubuntu=libxft2"
DISTRO_PN_ALIAS_pn-libxi = "Ubuntu=libxi Fedora=libXi"
DISTRO_PN_ALIAS_pn-libxkbcommon = "Fedora=libxkbcommon Debian=libxkbcommon"
DISTRO_PN_ALIAS_pn-libxscrnsaver = "Fedora=libXScrnSaver Ubuntu=libxss1 Mandriva=libxscrnsaver"
-DISTRO_PN_ALIAS_pn-libxxf86misc = "Mandriva=libxxf86misc Fedora=libXxf86misc"
DISTRO_PN_ALIAS_pn-linux-dummy = "Intel"
DISTRO_PN_ALIAS_pn-linux-firmware = "Fedora=linux-firmware Ubuntu=linux-firmware"
DISTRO_PN_ALIAS_pn-linux-libc-headers = "Debian=linux-kernel-headers Ubuntu=linux-kernel-headers"
@@ -221,8 +197,6 @@ DISTRO_PN_ALIAS_pn-linux-libc-headers-yocto = "Debian=linux-kernel-headers Ubunt
DISTRO_PN_ALIAS_pn-linux-yocto = "Debian=linux-base Ubuntu=linux"
DISTRO_PN_ALIAS_pn-linux-yocto-rt = "Debian=linux-base Ubuntu=linux"
DISTRO_PN_ALIAS_pn-linux-yocto-tiny = "OSPDT"
-DISTRO_PN_ALIAS_pn-lsbinitscripts = "Windriver"
-DISTRO_PN_ALIAS_pn-lsbtest = "Windriver"
DISTRO_PN_ALIAS_pn-ltp = "Mandriva=ltp Ubuntu=ltp"
DISTRO_PN_ALIAS_pn-lttng-modules = "OSPDT upstream=http://lttng.org/"
DISTRO_PN_ALIAS_pn-lttng-tools = "OSPDT upstream=http://lttng.org/"
@@ -257,7 +231,6 @@ DISTRO_PN_ALIAS_pn-mini-x-session = "OSPDT"
DISTRO_PN_ALIAS_pn-mkelfimage = "Ubuntu=mkelfimage Fedora=mkelfimage"
DISTRO_PN_ALIAS_pn-mkfontdir = "Mandriva=mkfontdir Ubuntu=xfonts-utils Fedora=xorg-x11-font-utils"
DISTRO_PN_ALIAS_pn-mkfontscale = "Mandriva=mkfontscale Ubuntu=xfonts-utils Fedora=xorg-x11-font-utils"
-DISTRO_PN_ALIAS_pn-mktemp = "Mandriva=mktemp Fedora=mktemp"
DISTRO_PN_ALIAS_pn-mmc-utils = "OE-Core"
DISTRO_PN_ALIAS_pn-modutils-initscripts = "OE-Core"
DISTRO_PN_ALIAS_pn-mtd-utils = "Debian=mtd-utils Ubuntu=mtd-utils"
@@ -276,7 +249,6 @@ DISTRO_PN_ALIAS_pn-opkg-collateral = "OE-Core"
DISTRO_PN_ALIAS_pn-opkg-keyrings = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
DISTRO_PN_ALIAS_pn-opkg-nogpg = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
DISTRO_PN_ALIAS_pn-opkg-utils = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
-DISTRO_PN_ALIAS_pn-oprofile = "Debian=oprofile Fedora=oprofile"
DISTRO_PN_ALIAS_pn-os-release = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core"
@@ -286,7 +258,6 @@ DISTRO_PN_ALIAS_pn-packagegroup-core-clutter = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-device-devel = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-eclipse-debug = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-full-cmdline = "OE-Core"
-DISTRO_PN_ALIAS_pn-packagegroup-core-lsb = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-nfs = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-sdk = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-ssh-dropbear = "OE-Core"
@@ -314,25 +285,23 @@ DISTRO_PN_ALIAS_pn-pkgconfig = "Ubuntu=pkg-config Fedora=pkgconfig"
DISTRO_PN_ALIAS_pn-pointercal-xinput = "OE-Core"
DISTRO_PN_ALIAS_pn-pong-clock = "OpenedHand"
DISTRO_PN_ALIAS_pn-portmap = "Debian=rpcbind Fedora=rpcbind"
-DISTRO_PN_ALIAS_pn-postinst-intercept = "OE-Core"
DISTRO_PN_ALIAS_pn-powertop = "Meego=powertop Fedora=powertop Debian=powertop OpenSuSE=powertop Mandriva=powertop"
DISTRO_PN_ALIAS_pn-ppp-dialin = "OE-Core"
-DISTRO_PN_ALIAS_pn-presentproto = "Debian=x11proto-present-dev Fedora=xorg-x11-proto-devel"
DISTRO_PN_ALIAS_pn-pseudo = "Windriver"
DISTRO_PN_ALIAS_pn-psplash = "OpenedHand"
DISTRO_PN_ALIAS_pn-ptest-runner = "OE-Core"
DISTRO_PN_ALIAS_pn-pulseaudio-client-conf-sato = "OE-Core"
DISTRO_PN_ALIAS_pn-puzzles = "Debian=sgt-puzzles Fedora=puzzles"
DISTRO_PN_ALIAS_pn-python3 = "Fedora=python3 Debian=python3.2"
-DISTRO_PN_ALIAS_pn-python3-distribute = "Debian=python3-setuptools Fedora=python3-setuptools"
+DISTRO_PN_ALIAS_pn-python3-iniparse = "Fedora=python-iniparse Debian=python-iniparse"
DISTRO_PN_ALIAS_pn-python3-pip = "OpenSuSE=python3-pip Debian=python3-pip"
+DISTRO_PN_ALIAS_pn-python3-pycurl = "Fedora=python-pycurl Debian=pycurl"
+DISTRO_PN_ALIAS_pn-python3-pygpgme = "Fedora=python-pygpgme Debian=pygpgme"
DISTRO_PN_ALIAS_pn-python3-setuptools = "OpenSuSE=python3-setuptools Debian=python3-setuptools"
DISTRO_PN_ALIAS_pn-python-dbus = "Ubuntu=python-dbus Debian=python-dbus Mandriva=python-dbus"
-DISTRO_PN_ALIAS_pn-python-distribute = "Opensuse=python-setuptools Fedora=python-setuptools"
DISTRO_PN_ALIAS_pn-python-git = "Debian=python-git Fedora=GitPython"
DISTRO_PN_ALIAS_pn-python-mako = "Fedora=python-mako Opensuse=python-Mako"
DISTRO_PN_ALIAS_pn-python-pycairo = "Meego=pycairo Fedora=pycairo Ubuntu=pycairo Debian=pycairo"
-DISTRO_PN_ALIAS_pn-python-pycurl = "Debian=python-pycurl Ubuntu=python-pycurl"
DISTRO_PN_ALIAS_pn-python-pygobject = "Meego=pygobject2 Fedora=pygobject2 Ubuntu=pygobject Debian=pygobject"
DISTRO_PN_ALIAS_pn-python-scons = "Fedora=scons OpenSuSE=scons Ubuntu=scons Mandriva=scons Debian=scons"
DISTRO_PN_ALIAS_pn-python-setuptools = "Mandriva=python-setup OpenSuSE=python-setup-git"
@@ -341,12 +310,8 @@ DISTRO_PN_ALIAS_pn-qemu-config = "OpenedHand"
DISTRO_PN_ALIAS_pn-qemugl = "OpenedHand"
DISTRO_PN_ALIAS_pn-qemu-helper = "OpenedHand"
DISTRO_PN_ALIAS_pn-qemuwrapper-cross = "OE-Core"
-DISTRO_PN_ALIAS_pn-randrproto = "Meego=xorg-x11-proto-randrproto"
DISTRO_PN_ALIAS_pn-readline = "Fedora=readline Debian=readline-common"
-DISTRO_PN_ALIAS_pn-recordproto = "Meego=xorg-x11-proto-recordproto"
DISTRO_PN_ALIAS_pn-remake = "Mandriva=remake Debian=remake"
-DISTRO_PN_ALIAS_pn-renderproto = "Meego=xorg-x11-proto-renderproto"
-DISTRO_PN_ALIAS_pn-resourceproto = "Meego=xorg-x11-proto-resourceproto"
DISTRO_PN_ALIAS_pn-rgb = "Fedora=xorg-X11-server-utils Debian=x11-xserver-utils"
DISTRO_PN_ALIAS_pn-rpmresolve = "OSPDT"
DISTRO_PN_ALIAS_pn-rt-tests = "Debian=rt-tests Ubuntu=rt-tests"
@@ -355,7 +320,6 @@ DISTRO_PN_ALIAS_pn-sato-icon-theme = "OpenedHand"
DISTRO_PN_ALIAS_pn-sato-screenshot = "OpenedHand"
DISTRO_PN_ALIAS_pn-sbc = "Fedora=sbc Debian=libsbc1"
DISTRO_PN_ALIAS_pn-screenshot = "OpenedHand"
-DISTRO_PN_ALIAS_pn-scrnsaverproto = "Meego=xorg-x11-proto-scrnsaverproto Ubuntu=x11proto-scrnsaver-dev Debian=x11proto-scrnsaver-dev"
DISTRO_PN_ALIAS_pn-settings-daemon = "OpenedHand"
DISTRO_PN_ALIAS_pn-sgml-common = "OpenSuSE=sgml-common Fedora=sgml-common"
DISTRO_PN_ALIAS_pn-sgmlspl = "Debian=sgmlspl Ubuntu=sgmlspl"
@@ -376,12 +340,11 @@ DISTRO_PN_ALIAS_pn-tar-replacement = "Fedora=tar Ubuntu=tar"
DISTRO_PN_ALIAS_pn-tcf-agent = "Windriver upstream=http://www.eclipse.org/dsdp/tm/"
DISTRO_PN_ALIAS_pn-texinfo-dummy-native = "OE-Core"
DISTRO_PN_ALIAS_pn-tiny-init = "OSPDT"
-DISTRO_PN_ALIAS_pn-trace-cmd = "Mandriva=trace-cmd Ubuntu=trace-cmd"
DISTRO_PN_ALIAS_pn-tremor = "OSPDT upstream=http://www.xiph.org/vorbis/"
DISTRO_PN_ALIAS_pn-ttf-bitstream-vera = "Debian=ttf-bitstream-vera Ubuntu=ttf-bitstream-vera"
DISTRO_PN_ALIAS_pn-tzcode = "OSPDT"
DISTRO_PN_ALIAS_pn-u-boot-fw-utils = "Ubuntu=u-boot-tools Debian=u-boot-tools"
-DISTRO_PN_ALIAS_pn-u-boot-mkimage = "Ubuntu=uboot-mkimage Debian=uboot-mkimage"
+DISTRO_PN_ALIAS_pn-u-boot-tools = "Ubuntu=u-boot-tools Debian=uboot-tools"
DISTRO_PN_ALIAS_pn-udev = "Mandriva=udev Fedora=udev"
DISTRO_PN_ALIAS_pn-udev-extraconf = "OE-Core"
DISTRO_PN_ALIAS_pn-unfs3 = "Debian=unfs3 Fedora=unfs3"
@@ -392,7 +355,6 @@ DISTRO_PN_ALIAS_pn-update-rc.d = "OE-Core"
DISTRO_PN_ALIAS_pn-usbinit = "OE-Core"
DISTRO_PN_ALIAS_pn-util-macros = "Meego=xorg-x11-util-macros Fedora=xorg-x11-util-macros Mandriva=x11-util-macros"
DISTRO_PN_ALIAS_pn-v86d = "Debian=v86d Ubuntu=v86d"
-DISTRO_PN_ALIAS_pn-videoproto = "Meego=xorg-x11-proto-videoproto"
DISTRO_PN_ALIAS_pn-waffle = "OE-Core"
DISTRO_PN_ALIAS_pn-watchdog = "Debian=watchdog Ubuntu=watchdog Mandriva=watchdog"
DISTRO_PN_ALIAS_pn-webkitgtk = "Fedora=webkitgtk Ubuntu=libwebkit"
@@ -400,26 +362,19 @@ DISTRO_PN_ALIAS_pn-weston = "Fedora=weston OpenSuSE=weston"
DISTRO_PN_ALIAS_pn-weston-init = "OE-Core"
DISTRO_PN_ALIAS_pn-which = "Mandriva=which Fedora=which"
DISTRO_PN_ALIAS_pn-wpa-supplicant = "Meego=wpa_supplicant Fedora=wpa_supplicant OpenSuSE=wpa_supplicant Ubuntu=wpasupplicant Mandriva=wpa_supplicant Debian=wpasupplicant"
-DISTRO_PN_ALIAS_pn-x11-common = "OE-Core"
DISTRO_PN_ALIAS_pn-x11perf = "Fedora=xorg-x11-apps Ubuntu=x11-apps"
DISTRO_PN_ALIAS_pn-xcb-util-image = "Debian=xcb-util Fedora=xcb-util"
DISTRO_PN_ALIAS_pn-xcb-util-keysyms = "Debian=xcb-util Fedora=xcb-util"
DISTRO_PN_ALIAS_pn-xcb-util-wm = "Debian=xcb-util Fedora=xcb-util"
-DISTRO_PN_ALIAS_pn-xcmiscproto = "Meego=xorg-x11-proto-xcmiscproto"
DISTRO_PN_ALIAS_pn-xcursor-transparent-theme = "OpenedHand"
DISTRO_PN_ALIAS_pn-xdpyinfo = "Fedora=xorg-x11-utils Ubuntu=x11-utils"
DISTRO_PN_ALIAS_pn-xev = "Fedora=xorg-x11-utils Ubuntu=x11-utils"
-DISTRO_PN_ALIAS_pn-xextproto = "Meego=xorg-x11-proto-xextproto"
DISTRO_PN_ALIAS_pn-xeyes = "Ubuntu=x11-apps Fedora=xorg-x11-apps"
-DISTRO_PN_ALIAS_pn-xf86bigfontproto = "Meego=xorg-x11-proto-xf86bigfontproto"
-DISTRO_PN_ALIAS_pn-xf86dgaproto = "Meego=xorg-x11-proto-xf86dgaproto"
-DISTRO_PN_ALIAS_pn-xf86driproto = "Meego=xorg-x11-proto-xf86driproto"
DISTRO_PN_ALIAS_pn-xf86-input-evdev = "Ubuntu=xserver-xorg-input-evdev Mandriva=x11-driver-input-evdev Debian=xserver-xorg-input-evdev Fedora=xorg-x11-drv-evdev Meego=xorg-x11-drv-evdev"
DISTRO_PN_ALIAS_pn-xf86-input-keyboard = "Meego=xorg-x11-drv-keyboard Fedora=xorg-x11-drv-keyboard Mandriva=x11-driver-input-keyboard Debian=xserver-xorg-input-keyboard"
DISTRO_PN_ALIAS_pn-xf86-input-mouse = "Ubuntu=xserver-xorg-input-mouse Mandriva=x11-driver-input-mouse Debian=xserver-xorg-input-mouse"
DISTRO_PN_ALIAS_pn-xf86-input-synaptics = "Meego=xorg-x11-drv-synaptics Fedora=xorg-x11-drv-synaptics Ubuntu=xserver-xorg-input-synaptics Mandriva=x11-driver-input-synaptics Debian=xfree86-driver-synaptics"
DISTRO_PN_ALIAS_pn-xf86-input-vmmouse = "Fedora=xorg-x11-drv-vmmouse Ubuntu=xserver-xorg-input-vmmouse Mandriva=x11-driver-input-vmmouse Debian=xserver-xorg-input-vmmouse"
-DISTRO_PN_ALIAS_pn-xf86miscproto = "Meego=xorg-x11-proto-xf86miscproto"
DISTRO_PN_ALIAS_pn-xf86-video-cirrus = "Opensuse=xf86-video-cirrus Debian=xserver-xorg-video-cirrus"
DISTRO_PN_ALIAS_pn-xf86-video-fbdev = "Ubuntu=xserver-xorg-video-fbdev Debian=xserver-xorg-video-fbdev"
DISTRO_PN_ALIAS_pn-xf86-video-intel = "Debian=xserver-xorg-video-intel Fedora=xorg-x11-drv-intel Mandriva=x11-driver-video-intel Meego=xorg-x11-drv-intel Ubuntu=xserver-xorg-video-intel"
@@ -428,15 +383,13 @@ DISTRO_PN_ALIAS_pn-xf86-video-omap = "Ubuntu=xf86-video-omap Debian=xf86-video-o
DISTRO_PN_ALIAS_pn-xf86-video-omapfb = "OSPDT"
DISTRO_PN_ALIAS_pn-xf86-video-vesa = "Debian=xserver-xorg-video-vesa Fedora=xorg-x11-drv-vesa Mandriva=x11-driver-video-vesa Ubuntu=xserver-xorg-video-vesa"
DISTRO_PN_ALIAS_pn-xf86-video-vmware = "Debian=xserver-xorg-video-vmware Fedora=xorg-x11-drv-vmware Mandriva=x11-driver-video-vmware Ubuntu=xserver-xorg-video-vmware"
-DISTRO_PN_ALIAS_pn-xf86vidmodeproto = "Meego=xorg-x11-proto-xf86vidmodeproto Ubuntu=x11proto-xf86vidmode Debian=x11proto-xf86vidmode"
DISTRO_PN_ALIAS_pn-xhost = "Ubuntu=x11-xserver-utils Fedora=xorg-x11-server-utils"
-DISTRO_PN_ALIAS_pn-xineramaproto = "Meego=xorg-x11-proto-xineramaproto Ubuntu=x11proto-xinerama Debian=x11proto-xinerama"
DISTRO_PN_ALIAS_pn-xinput-calibrator = "Fedora=xinput-calibrator Mandravia=xinput-calibrator Ubuntu=xinput-calibrator"
DISTRO_PN_ALIAS_pn-xkbcomp = "Ubuntu=x11-xkb-utils Fedora=xorg-x11-xkb-utils"
DISTRO_PN_ALIAS_pn-xmodmap = "Meego=xorg-x11-utils-xmodmap Fedora=xorg-x11-server-utils Ubuntu=x11-xserver-utils"
DISTRO_PN_ALIAS_pn-xorg-minimal-fonts = "Ubuntu=xfonts-base Fedora=xorg-x11-fonts-base"
+DISTRO_PN_ALIAS_pn-xorgproto = "OSPDT upstream=http://cgit.freedesktop.org/xorg/proto/xorgproto"
DISTRO_PN_ALIAS_pn-xprop = "Meego=xorg-x11-utils-xprop Fedora=xorg-x11-utils Ubuntu=x11-utils"
-DISTRO_PN_ALIAS_pn-xproto = "Meego=xorg-x11-proto-xproto Fedora=xorg-x11-proto-devel Ubuntu=x11proto-core-dev Debian=x11proto-core-dev Opensuse=xorg-x11-proto-devel Mandriva=x11-proto-devel"
DISTRO_PN_ALIAS_pn-xproxymanagementprotocol = "Meego=xorg-x11-proto-xproxymanagementprotocol"
DISTRO_PN_ALIAS_pn-xrandr = "Ubuntu=x11-xserver-utils Fedora=xorg-x11-server-utils"
DISTRO_PN_ALIAS_pn-xrdb = "Ubuntu=x11-xserver-utils Fedora=xorg-x11-server-utils"
@@ -447,6 +400,5 @@ DISTRO_PN_ALIAS_pn-xserver-xf86-lite = "Fedora=xorg-x11-server Ubuntu=xserver-xo
DISTRO_PN_ALIAS_pn-xserver-xorg = "Fedora=xorg-x11-server Ubuntu=xserver-xorg"
DISTRO_PN_ALIAS_pn-xset = "Fedora=xorg-x11-server-utils Ubuntu=x11-xserver-utils Debian=x11-xserver-utils Opensuse=xorg-x11"
DISTRO_PN_ALIAS_pn-xuser-account = "OE-Core"
-DISTRO_PN_ALIAS_pn-xvideo-tests = "OpenedHand"
DISTRO_PN_ALIAS_pn-xvinfo = "Fedora=xorg-x11-utils Ubuntu=x11-utils"
DISTRO_PN_ALIAS_pn-xwininfo = "Fedora=xorg-x11-utils Ubuntu=x11-utils"
diff --git a/meta/conf/distro/include/init-manager-mdev-busybox.inc b/meta/conf/distro/include/init-manager-mdev-busybox.inc
new file mode 100644
index 0000000000..4e3be14a82
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-mdev-busybox.inc
@@ -0,0 +1,7 @@
+# enable mdev/busybox for init
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd sysvinit"
+VIRTUAL-RUNTIME_dev_manager ??= "busybox-mdev"
+VIRTUAL-RUNTIME_init_manager ??= "busybox"
+VIRTUAL-RUNTIME_initscripts ??= "initscripts"
+VIRTUAL-RUNTIME_keymaps ??= "keymaps"
+VIRTUAL-RUNTIME_login_manager ??= "busybox"
diff --git a/meta/conf/distro/include/init-manager-none.inc b/meta/conf/distro/include/init-manager-none.inc
new file mode 100644
index 0000000000..bbedf898f7
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-none.inc
@@ -0,0 +1,3 @@
+VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
+VIRTUAL-RUNTIME_initscripts ??= "initscripts"
+VIRTUAL-RUNTIME_login_manager ??= "busybox"
diff --git a/meta/conf/distro/include/init-manager-systemd.inc b/meta/conf/distro/include/init-manager-systemd.inc
new file mode 100644
index 0000000000..1558b85250
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-systemd.inc
@@ -0,0 +1,6 @@
+# Use systemd for system initialization
+DISTRO_FEATURES_append = " systemd"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
+VIRTUAL-RUNTIME_init_manager ??= "systemd"
+VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
+VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc b/meta/conf/distro/include/init-manager-sysvinit.inc
new file mode 100644
index 0000000000..6b662d60bb
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-sysvinit.inc
@@ -0,0 +1,6 @@
+# Use sysvinit for system initialization
+DISTRO_FEATURES_append = " sysvinit"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
+VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
+VIRTUAL-RUNTIME_initscripts ??= "initscripts"
+VIRTUAL-RUNTIME_login_manager ??= "busybox"
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
new file mode 100644
index 0000000000..79404dfbdb
--- /dev/null
+++ b/meta/conf/distro/include/maintainers.inc
@@ -0,0 +1,774 @@
+# Yocto Project / OpenEmbedded-Core (OE-Core) Maintainers File
+#
+# This file contains a list of recipe maintainers.
+#
+# Please submit any patches against recipes in meta to the
+# OE-Core mail list (openembedded-core@lists.openembedded.org)
+# For recipes in meta-yocto please use the Poky list (poky@yoctoproject.org)
+#
+# If you have problems with or questions about a particular recipe, feel
+# free to contact the maintainer directly (cc:ing the appropriate mailing list
+# puts it in the archive and helps other people who might have the same
+# questions in the future), but please try to do the following first:
+#
+# - look in the Yocto Project Bugzilla
+# (http://bugzilla.yoctoproject.org/) to see if a problem has
+# already been reported
+#
+# - look through recent entries of the appropriate mailing list archives
+# (http://lists.linuxtogo.org/pipermail/openembedded-core or
+# https://lists.yoctoproject.org/pipermail/poky/) to see if other
+# people have run into similar problems or had similar questions
+# answered.
+#
+# The format is as a bitbake variable override for each recipe
+#
+# RECIPE_MAINTAINER_pn-<recipe name> = "Full Name <address@domain>"
+#
+# Please keep this list in alphabetical order.
+#
+RECIPE_MAINTAINER_pn-acl = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-acpica = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-acpid = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-adwaita-icon-theme = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-alsa-lib = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-plugins = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-state = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-tools = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-utils = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-utils-scripts = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-apmd = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-apr = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-apr-util = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-apt = "Aníbal Limón <limon.anibal@gmail.com>"
+RECIPE_MAINTAINER_pn-apt-native = "Aníbal Limón <limon.anibal@gmail.com>"
+RECIPE_MAINTAINER_pn-argp-standalone = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-asciidoc = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-aspell = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-assimp = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-at = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-at-spi2-atk = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-at-spi2-core = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-atk = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-attr = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-autoconf = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-autoconf-archive = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-automake = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-avahi = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-avahi-ui = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-babeltrace = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-base-files = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-base-passwd = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-bash = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-bash-completion = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-bc = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-bind = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-binutils = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-binutils-cross-${TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-binutils-cross-testsuite = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-binutils-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-bison = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-bjam-native = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-blktool = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-blktrace = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-bluez5 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-bmap-tools = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-boost = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-bootchart2 = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-bsd-headers = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-btrfs-tools = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-build-appliance-image = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-build-compare = "Paul Eggleton <paul.eggleton@linux.intel.com>"
+RECIPE_MAINTAINER_pn-build-sysroots = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-builder = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-buildtools-tarball = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-busybox = "Andrej Valek <andrej.valek@siemens.com>"
+RECIPE_MAINTAINER_pn-busybox-inittab = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-bzip2 = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-ca-certificates = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-cairo = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-cantarell-fonts = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-ccache = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-cdrtools-native = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-chkconfig = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-chkconfig-alternatives-native = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-chrpath = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-clutter-1.0 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-gst-3.0 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-gtk-1.0 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-cmake = "Pascal Bach <pascal.bach@siemens.com>"
+RECIPE_MAINTAINER_pn-cmake-native = "Pascal Bach <pascal.bach@siemens.com>"
+RECIPE_MAINTAINER_pn-cogl-1.0 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-connman = "Changhyeok Bae <changhyeok.bae@gmail.com>"
+RECIPE_MAINTAINER_pn-connman-conf = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-connman-gnome = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-consolekit = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-core-image-base = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-minimal = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-minimal-dev = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-minimal-initramfs = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-minimal-mtdutils = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-tiny-initramfs = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-full-cmdline = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-kernel-dev = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-sato = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-sato-sdk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-testmaster-initramfs = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-testmaster = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-clutter = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-weston = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-x11 = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-sato-dev = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-sato-ptest-fast = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-core-image-sato-sdk-ptest = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-coreutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-cpio = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-cracklib = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-createrepo-c = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-cronie = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-cross-localedef-native = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-cryptodev-linux = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-cryptodev-module = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-cryptodev-tests = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-cups = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-curl = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-cve-check-tool = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-cve-update-db-native = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-cwautomacros = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-db = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-dbus = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-dbus-glib = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-dbus-test = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-dbus-wait = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-debianutils = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-dejagnu = "Nathan Rossi <nathan@nathanrossi.com>"
+RECIPE_MAINTAINER_pn-depmodwrapper-cross = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-desktop-file-utils = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-dhcp = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-diffstat = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-diffutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-distcc = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-distcc-config = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-dmidecode = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-dnf = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-docbook-xml-dtd4 = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-docbook-xsl-stylesheets = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-dos2unix = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-dosfstools = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-dpkg = "Aníbal Limón <limon.anibal@gmail.com>"
+RECIPE_MAINTAINER_pn-dropbear = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-dtc = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-dwarfsrcfiles = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-e2fsprogs = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-ed = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-efivar = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-efibootmgr = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-elfutils = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-ell = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-enchant = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-encodings = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-epiphany = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-ethtool = "Changhyeok Bae <changhyeok.bae@gmail.com>"
+RECIPE_MAINTAINER_pn-eudev = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-expat = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-expect = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-ffmpeg = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-file = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-findutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-flac = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-flex = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-font-alias = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-font-util = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-fontconfig = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-foomatic-filters = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-formfactor = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-freetype = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-fribidi = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-fts = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gawk = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-gcc = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-cross-${TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-cross-initial-${TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-crosssdk-initial-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-runtime = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-sanitizers = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-source-8.3.0 = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-source-9.2.0 = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gccmakedep = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gconf = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gcr = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-gdb = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gdb-cross-${TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gdbm = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-gdk-pixbuf = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gettext = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gettext-minimal-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-ghostscript = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-git = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-glew = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-glib-2.0 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-glib-networking = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-glibc = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-glibc-locale = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-glibc-mtrace = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-glibc-scripts = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-glibc-testsuite = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-glide = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-gmp = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gnome-desktop-testing = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-themes-standard = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gnu-config = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gnu-efi = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-gnupg = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-gnutls = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-go = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-go-cross-${TUNE_PKGARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-go-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-go-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-go-dep = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-go-helloworld = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-go-native = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-go-runtime = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gobject-introspection = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-gperf = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-gpgme = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-gptfdisk = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-grep = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-groff = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-grub = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-grub-bootconf = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-grub-efi = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gst-examples = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gst-validate = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-libav = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-omx = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-meta-base = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-bad = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-base = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-good = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-ugly = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-python = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-rtsp-server = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-vaapi = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gtk+ = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gtk+3 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-doc = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-gtk-icon-utils-native = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gzip = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-harfbuzz = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-hdparm = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-help2man-native = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-hicolor-icon-theme = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-hwlatdetect = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-i2c-tools = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-icecc-create-env = "Joshua Watt <JPEWhacker@gmail.com>"
+RECIPE_MAINTAINER_pn-icu = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-ifupdown = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-inetutils = "Tom Rini <trini@konsulko.com>"
+RECIPE_MAINTAINER_pn-init-ifupdown = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-boot = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-initramfs-framework = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-initramfs-live-boot = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-boot-tiny = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-efi = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-efi-testfs = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-testfs = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-initscripts = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-intltool = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-iproute2 = "Changhyeok Bae <changhyeok.bae@gmail.com>"
+RECIPE_MAINTAINER_pn-iptables = "Changhyeok Bae <changhyeok.bae@gmail.com>"
+RECIPE_MAINTAINER_pn-iputils = "Changhyeok Bae <changhyeok.bae@gmail.com>"
+RECIPE_MAINTAINER_pn-iso-codes = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-iw = "Changhyeok Bae <changhyeok.bae@gmail.com>"
+RECIPE_MAINTAINER_pn-libjpeg-turbo = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-json-c = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-json-glib = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-kbd = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-kern-tools-native = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-kernel-devsrc = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-kexec-tools = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-keymaps = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-kmod = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-kmod-native = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-kmscube = "Carlos Rafael Giani <dv@pseudoterminal.org>"
+RECIPE_MAINTAINER_pn-l3afpad = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-lame = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-ldconfig-native = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-less = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-liba52 = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libacpi = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libaio = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libarchive = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-libassuan = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libatomic-ops = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libbsd = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap-ng = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap-ng-python = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcgroup = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libcheck = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcomps = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libcroco = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libdaemon = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libdazzle = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libdmx = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libdnf = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libdrm = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-libedit = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libepoxy = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-liberation-fonts = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-liberror-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libevdev = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libevent = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libexif = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libfakekey = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libffi = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libfm = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libfm-extra = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libfontenc = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libgcc = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libgcc-initial = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libgfortran = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libgloss = "Alejandro Hernandez <aehs29@gmail.com>"
+RECIPE_MAINTAINER_pn-libglu = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libgpg-error = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libgudev = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libical = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libice = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libid3tag = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libidn = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libidn2 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libinput = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libjitterentropy = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libksba = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libmatchbox = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libmnl = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libmpc = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libmodule-build-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libmodulemd-v1 = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libnewt = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libnewt-python = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libnl = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libnotify = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libnsl2 = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libnss-mdns = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libnss-nis = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libogg = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libomxil = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libpam = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libpcap = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libpciaccess = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libpcre = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libpcre2 = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libpipeline = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libpng = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libproxy = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libpthread-stubs = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libpsl = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-librepo = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-librsvg = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libsamplerate0 = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libsdl2 = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libsecret = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libsm = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libsndfile1 = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libsolv = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libsoup-2.4 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libssp-nonshared = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libtasn1 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libtest-needs-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libtheora = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libtimedate-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libtirpc = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libunwind = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-liburcu = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-liburi-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libusb1 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libva = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libva-utils = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libvorbis = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libwebp = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libx11 = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxau = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxcb = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxcomposite = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxcursor = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxcrypt = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libxcrypt-compat = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-libxdamage = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxdmcp = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxext = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxfixes = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxfont = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxfont2 = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxft = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxi = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxinerama = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxkbcommon = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxkbfile = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxml-namespacesupport-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-parser-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-sax-base-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-sax-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-simple-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml2 = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libxmu = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxpm = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxrandr = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxrender = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxres = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxscrnsaver = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxshmfence = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxslt = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-libxt = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxtst = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxv = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxvmc = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libxxf86vm = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-libyaml = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-lighttpd = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-linux-dummy = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-linux-firmware = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-linux-libc-headers = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-linux-yocto = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-linux-yocto-dev = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-llvm = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-lrzsz = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-lsb-release = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-lsof = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-ltp = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-lttng-modules = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-lttng-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-lttng-ust = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-lz4 = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-lzo = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-lzip = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-lzop = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-m4 = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-m4-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-make = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-makedepend = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-makedevs = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-make-mod-scripts = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-man-db = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-man-pages = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-matchbox-config-gtk = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-desktop = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-keyboard = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-panel-2 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-session = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-session-sato = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-terminal = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-theme-sato = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-wm = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-mc = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-mdadm = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-menu-cache = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-mesa = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-mesa-demos = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-mesa-gl = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-meson = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-meta-environment-${MACHINE} = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-meta-environment-extsdk-${MACHINE} = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-meta-extsdk-toolchain = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-meta-go-toolchain = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-meta-ide-support = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-meta-toolchain = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-meta-world-pkgdata = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-mingetty = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-mini-x-session = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-minicom = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-mkfontdir = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-mkfontscale = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-mklibs-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-mmc-utils = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-modutils-initscripts = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-mpeg2dec = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-mpfr = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-mpg123 = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-msmtp = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-mtd-utils = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-mtdev = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-mtools = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-musl = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-musl-obstack = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-musl-utils = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-mx-1.0 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-nasm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-nativesdk-buildtools-perl-dummy = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-nativesdk-icecc-toolchain = "Joshua Watt <JPEWhacker@gmail.com>"
+RECIPE_MAINTAINER_pn-nativesdk-libtool = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-nativesdk-meson = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-nativesdk-packagegroup-sdk-host = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-nativesdk-qemu-helper = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-nativesdk-sdk-provides-dummy = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-newlib = "Alejandro Hernandez <aehs29@gmail.com>"
+RECIPE_MAINTAINER_pn-ncurses = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-neard = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-net-tools = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-netbase = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-nettle = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-nfs-export-root = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-nfs-utils = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-ninja = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-npth = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-nspr = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-nss = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-nss-myhostname = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-ofono = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-opensbi = "Alistair Francis <alistair.francis@wdc.com>"
+RECIPE_MAINTAINER_pn-openssh = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-openssl = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-opkg = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
+RECIPE_MAINTAINER_pn-opkg-arch-config = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
+RECIPE_MAINTAINER_pn-opkg-keyrings = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
+RECIPE_MAINTAINER_pn-opkg-utils = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
+RECIPE_MAINTAINER_pn-orc = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-os-release = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-ovmf = "Ricardo Neri <ricardo.neri-calderon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ovmf-shell-image = "Ricardo Neri <ricardo.neri-calderon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-p11-kit = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-package-index = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-pango = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-parted = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-patch = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-patchelf = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-pbzip2 = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-pciutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-pcmanfm = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-perf = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER_pn-perl = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-perl-native = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-piglit = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-pigz = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-pinentry = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-pixman = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-pkgconf = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-pkgconfig = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-pm-utils = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-pointercal-xinput = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-pong-clock = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-popt = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-powertop = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-ppp = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-ppp-dialin = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-prelink = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-procps = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-pseudo = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-psmisc = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-psplash = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-ptest-runner = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-pulseaudio = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-pulseaudio-client-conf-sato = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-puzzles = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-python = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python-native = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python-setuptools = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3 = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-async = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-dbus = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-docutils = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-extras = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-file-utils = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-git = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-gitdb = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-iniparse = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-mako = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-native = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-nose = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-numpy = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-pbr = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-pip = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-pycairo = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-pygments = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-pygobject = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-scons = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python3-scons-native = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python3-setuptools = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-six = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-smmap = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-subunit = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-python3-testtools = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
+RECIPE_MAINTAINER_pn-qemu = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-qemu-helper-native = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-qemu-native = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-qemu-system-native = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-qemuwrapper-cross = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-quilt = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-quilt-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-quota = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-re2c = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-readline = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-resolvconf = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-rgb = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-rpcbind = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-rng-tools = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-rpcsvc-proto = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-rpm = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-rsync = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-rt-tests = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-ruby = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-run-postinsts = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-rxvt-unicode = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-sato-screenshot = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-sbc = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-screen = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-sed = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-serf = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-setserial = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-settings-daemon = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-shadow = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-shadow-securetty = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-shadow-sysroot = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-shared-mime-info = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-shutdown-desktop = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-signing-keys = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-slang = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-speex = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-speexdsp = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-sqlite3 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-squashfs-tools = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-startup-notification = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-strace = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-stress-ng = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-subversion = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-sudo = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-swig = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-sysfsutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-sysklogd = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-syslinux = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-sysprof = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-sysstat = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-boot = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-bootchart = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-bootconf = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-conf = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-compat-units = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-serialgetty = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-systemctl-native = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemtap = "Victor Kamensky <kamensky@cisco.com>"
+RECIPE_MAINTAINER_pn-systemtap-native = "Victor Kamensky <kamensky@cisco.com>"
+RECIPE_MAINTAINER_pn-systemtap-uprobes = "Victor Kamensky <kamensky@cisco.com>"
+RECIPE_MAINTAINER_pn-sysvinit = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-sysvinit-inittab = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-taglib = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-tar = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-tcf-agent = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-tcl = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-tcp-wrappers = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-testexport-tarball = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-texinfo = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-texinfo-dummy-native = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-tiff = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-time = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-tzcode-native = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-tzdata = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-u-boot = "Marek Vasut <marek.vasut@gmail.com>"
+RECIPE_MAINTAINER_pn-u-boot-fw-utils = "Marek Vasut <marek.vasut@gmail.com>"
+RECIPE_MAINTAINER_pn-u-boot-tools = "Marek Vasut <marek.vasut@gmail.com>"
+RECIPE_MAINTAINER_pn-udev-extraconf = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-unfs3 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-unifdef = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-uninative-tarball = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-unzip = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-valgrind = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-vim = "Tom Rini <trini@konsulko.com>"
+RECIPE_MAINTAINER_pn-vim-tiny = "Tom Rini <trini@konsulko.com>"
+RECIPE_MAINTAINER_pn-virglrenderer = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-volatile-binds = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-vte = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-demos = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-headers = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-loader = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-tools = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-waffle = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-watchdog = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-watchdog-config = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-wayland = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-wayland-protocols = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-weston = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-weston-init = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-wget = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-which = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-wic-tools = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-wireless-regdb = "Adrian Bunk <bunk@kernel.org>"
+RECIPE_MAINTAINER_pn-wpa-supplicant = "Changhyeok Bae <changhyeok.bae@gmail.com>"
+RECIPE_MAINTAINER_pn-x11perf = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-x264 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-xauth = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xcb-proto = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xcb-util = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xcb-util-image = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xcb-util-keysyms = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xcb-util-renderutil = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xcb-util-wm = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xcursor-transparent-theme = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xdg-utils = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-xdpyinfo = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xev = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xeyes = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-input-evdev = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-input-keyboard = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-input-libinput = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-input-mouse = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-input-synaptics = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-input-vmmouse = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-video-cirrus = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-video-fbdev = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-video-intel = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-video-vesa = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xf86-video-vmware = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xhost = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xinetd = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-xinit = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xinput = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xinput-calibrator = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xkbcomp = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xkeyboard-config = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xmlto = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-xmodmap = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xorg-minimal-fonts = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xorgproto = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xprop = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xrandr = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xrestop = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xserver-nodm-init = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xserver-xf86-config = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xserver-xorg = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xset = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xtrans = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xuser-account = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xvinfo = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xwininfo = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-xz = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-zip = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-zlib = "Denys Dmytriyenko <denys@ti.com>"
diff --git a/meta/conf/distro/include/no-static-libs.inc b/meta/conf/distro/include/no-static-libs.inc
index 13a791869d..a3a865cac4 100644
--- a/meta/conf/distro/include/no-static-libs.inc
+++ b/meta/conf/distro/include/no-static-libs.inc
@@ -1,9 +1,10 @@
-DISABLE_STATIC = " --disable-static"
+DISABLE_STATIC ?= " --disable-static"
# qemu aborts on unrecognised option
DISABLE_STATIC_pn-qemu = ""
DISABLE_STATIC_pn-qemu-native = ""
DISABLE_STATIC_pn-nativesdk-qemu = ""
+DISABLE_STATIC_pn-qemu-system-native = ""
# pciutils fails build
DISABLE_STATIC_pn-pciutils = ""
# libcap aborts on unrecognised option
@@ -14,10 +15,6 @@ DISABLE_STATIC_pn-nativesdk-libcap = ""
DISABLE_STATIC_pn-libpcap = ""
# needed by gdb
DISABLE_STATIC_pn-readline = ""
-# needed by pseudo
-DISABLE_STATIC_pn-sqlite3 = ""
-DISABLE_STATIC_pn-sqlite3-native = ""
-DISABLE_STATIC_pn-nativesdk-sqlite3 = ""
# openjade/sgml-common have build issues without static libs
DISABLE_STATIC_pn-sgml-common-native = ""
DISABLE_STATIC_pn-openjade-native = ""
@@ -32,4 +29,9 @@ DISABLE_STATIC_pn-libusb1-native = ""
EXTRA_OECONF_append = "${DISABLE_STATIC}"
-EXTRA_OECMAKE_append_pn-libical = "-DSHARED_ONLY=True"
+EXTRA_OECMAKE_append_pn-libical = " -DSHARED_ONLY=True"
+EXTRA_OECMAKE_append_pn-libjpeg-turbo = " -DENABLE_STATIC=False"
+
+EXCONFIG_ARGS_append_pn-ncurses = " --without-normal"
+EXCONFIG_ARGS_append_pn-ncurses-native = " --without-normal"
+EXCONFIG_ARGS_append_pn-nativesdk-ncurses = " --without-normal"
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
new file mode 100644
index 0000000000..bb4724cf52
--- /dev/null
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -0,0 +1,81 @@
+#
+# Lists of the ptests in OE-Core, sorted into two sets by the time they take
+#
+# ptests which take less than ~30s each
+#
+PTESTS_FAST = "\
+ acl-ptest \
+ apr-ptest \
+ apr-util-ptest \
+ attr-ptest \
+ bluez5-ptest \
+ bzip2-ptest \
+ diffstat-ptest \
+ diffutils-ptest \
+ elfutils-ptest \
+ ethtool-ptest \
+ flex-ptest \
+ gawk-ptest \
+ gdbm-ptest \
+ gdk-pixbuf-ptest \
+ gettext-ptest \
+ gzip-ptest \
+ json-glib-ptest \
+ kbd-ptest \
+ libconvert-asn1-perl-ptest \
+ liberror-perl-ptest \
+ libmodule-build-perl-ptest \
+ libpcre-ptest \
+ libtimedate-perl-ptest \
+ libtest-needs-perl-ptest \
+ liburi-perl-ptest \
+ libusb1-ptest \
+ libxml-namespacesupport-perl-ptest \
+ libxml-perl-ptest \
+ libxml-parser-perl-ptest \
+ libxml-sax-perl-ptest \
+ libxml-sax-base-perl-ptest \
+ libxml-simple-perl-ptest \
+ libxml2-ptest \
+ lzo-ptest \
+ m4-ptest \
+ nettle-ptest \
+ openssl-ptest \
+ opkg-ptest \
+ pango-ptest \
+ parted-ptest \
+ quilt-ptest \
+ sed-ptest \
+ slang-ptest \
+ zlib-ptest \
+"
+
+#PTESTS_PROBLEMS = "\
+# qemu-ptest \ # Doesn't run any tests?
+# ruby-ptest \ # Timeout
+# mdadm-ptest \ # Timeout
+# clutter-1.0-ptest \ # Doesn't build due to depends on cogl-1.0
+#"
+
+PTESTS_SLOW = "\
+ bash-ptest \
+ busybox-ptest \
+ dbus-test-ptest \
+ e2fsprogs-ptest \
+ glib-2.0-ptest \
+ gstreamer1.0-ptest \
+ libevent-ptest \
+ lttng-tools-ptest \
+ mdadm-ptest \
+ openssh-ptest \
+ openssl-ptest \
+ perl-ptest \
+ python-ptest \
+ python3-ptest \
+ strace-ptest \
+ tcl-ptest \
+ util-linux-ptest \
+ valgrind-ptest \
+"
+
+PTESTS_SLOW_remove_riscv64 = "valgrind-ptest"
diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index 1c1e50bd3f..aaf04e9e59 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -1,117 +1,71 @@
-# Setup extra CFLAGS and LDFLAGS which have 'security' benefits. These
+# Setup extra CFLAGS and LDFLAGS which have 'security' benefits. These
# don't work universally, there are recipes which can't use one, the other
# or both so a blacklist is maintained here. The idea would be over
# time to reduce this list to nothing.
# From a Yocto Project perspective, this file is included and tested
-# in the DISTRO="poky-lsb" configuration.
+# in the DISTRO="poky" configuration.
+
+GCCPIE ?= "--enable-default-pie"
+# If static PIE is known to work well, GLIBCPIE="--enable-static-pie" can be set
# _FORTIFY_SOURCE requires -O1 or higher, so disable in debug builds as they use
# -O0 which then results in a compiler warning.
-lcl_maybe_fortify = "${@base_conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
+lcl_maybe_fortify ?= "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
# Error on use of format strings that represent possible security problems
SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security -Werror=format-security"
-SECURITY_CFLAGS ?= "-fstack-protector-strong -pie -fpie ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
-SECURITY_NO_PIE_CFLAGS ?= "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
+# Inject pie flags into compiler flags if not configured with gcc itself
+# especially useful with external toolchains
+SECURITY_PIE_CFLAGS ?= "${@'' if '${GCCPIE}' else '-pie -fPIE'}"
+
+SECURITY_NOPIE_CFLAGS ?= "-no-pie -fno-PIE"
+
+SECURITY_STACK_PROTECTOR ?= "-fstack-protector-strong"
-SECURITY_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro,-z,now"
-SECURITY_X_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro"
+SECURITY_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${SECURITY_PIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
+SECURITY_NO_PIE_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
+
+SECURITY_LDFLAGS ?= "${SECURITY_STACK_PROTECTOR} -Wl,-z,relro,-z,now"
+SECURITY_X_LDFLAGS ?= "${SECURITY_STACK_PROTECTOR} -Wl,-z,relro"
# powerpc does not get on with pie for reasons not looked into as yet
-SECURITY_CFLAGS_powerpc = "-fstack-protector-strong ${lcl_maybe_fortify}"
-# Deal with ppc specific linker failures when using the cflags
-SECURITY_CFLAGS_pn-dbus_powerpc = ""
-SECURITY_CFLAGS_pn-dbus-ptest_powerpc = ""
-SECURITY_CFLAGS_pn-libmatchbox_powerpc = ""
+GCCPIE_powerpc = ""
+GLIBCPIE_powerpc = ""
+SECURITY_CFLAGS_remove_powerpc = "${SECURITY_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-libgcc_powerpc = ""
-# arm specific security flag issues
-SECURITY_CFLAGS_pn-lttng-tools_arm = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-aspell = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-coreutils = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-db = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-directfb = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-glibc = ""
-SECURITY_CFLAGS_pn-glibc-initial = ""
-SECURITY_CFLAGS_pn-elfutils = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-enchant = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-expect = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-flac = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-gcc = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-glibc-testsuite = ""
SECURITY_CFLAGS_pn-gcc-runtime = ""
-SECURITY_CFLAGS_pn-gcc-sanitizers = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-gdb = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-gmp = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-gnutls = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-grub = ""
SECURITY_CFLAGS_pn-grub-efi = ""
SECURITY_CFLAGS_pn-grub-efi-native = ""
SECURITY_CFLAGS_pn-grub-efi-x86-native = ""
SECURITY_CFLAGS_pn-grub-efi-i586-native = ""
SECURITY_CFLAGS_pn-grub-efi-x86-64-native = ""
-SECURITY_CFLAGS_pn-gstreamer1.0-plugins-bad = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-gstreamer1.0-plugins-good = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-harfbuzz = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-kexec-tools = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-iptables = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libaio = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libcap = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libgcc = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libid3tag = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libnewt-python = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libglu = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libpcap = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libpcre = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libproxy = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-mesa = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-openssl = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-opensp = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-ppp = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python-pycurl = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python-smartpm = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python3-numpy = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python3-pycairo = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python3 = "${SECURITY_NO_PIE_CFLAGS}"
-# Revert RPM to using internally supported values
-SECURITY_CFLAGS_pn-rpm = "${lcl_maybe_fortify} -fstack-protector"
-SECURITY_CFLAGS_pn-syslinux = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-slang = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-source-highlight = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-tcl = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-tiff = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-uclibc = ""
-SECURITY_CFLAGS_pn-uclibc-initial = ""
-SECURITY_CFLAGS_pn-valgrind = ""
-SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-mkelfimage_x86 = ""
+
+SECURITY_CFLAGS_pn-valgrind = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_LDFLAGS_pn-valgrind = ""
+SECURITY_CFLAGS_pn-sysklogd = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_LDFLAGS_pn-sysklogd = ""
# Recipes which fail to compile when elevating -Wformat-security to an error
SECURITY_STRINGFORMAT_pn-busybox = ""
-SECURITY_STRINGFORMAT_pn-console-tools = ""
-SECURITY_STRINGFORMAT_pn-cmake = ""
-SECURITY_STRINGFORMAT_pn-expect = ""
SECURITY_STRINGFORMAT_pn-gcc = ""
-SECURITY_STRINGFORMAT_pn-gettext = ""
-SECURITY_STRINGFORMAT_pn-kexec-tools = ""
-SECURITY_STRINGFORMAT_pn-oh-puzzles = ""
-TARGET_CFLAGS_append_class-target = " ${SECURITY_CFLAGS}"
+TARGET_CC_ARCH_append_class-target = " ${SECURITY_CFLAGS}"
TARGET_LDFLAGS_append_class-target = " ${SECURITY_LDFLAGS}"
-SECURITY_LDFLAGS_remove_pn-gcc-runtime = "-fstack-protector-strong"
-SECURITY_LDFLAGS_remove_pn-glibc = "-fstack-protector-strong"
-SECURITY_LDFLAGS_remove_pn-glibc-initial = "-fstack-protector-strong"
-SECURITY_LDFLAGS_remove_pn-uclibc = "-fstack-protector-strong"
-SECURITY_LDFLAGS_remove_pn-uclibc-initial = "-fstack-protector-strong"
-SECURITY_LDFLAGS_pn-xf86-video-fbdev = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-intel = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-omapfb = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-omap = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-vesa = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-vmware = "${SECURITY_X_LDFLAGS}"
+SECURITY_STACK_PROTECTOR_pn-gcc-runtime = ""
+SECURITY_STACK_PROTECTOR_pn-glibc = ""
+SECURITY_STACK_PROTECTOR_pn-glibc-testsuite = ""
+# All xorg module drivers need to be linked this way as well and are
+# handled in recipes-graphics/xorg-driver/xorg-driver-common.inc
SECURITY_LDFLAGS_pn-xserver-xorg = "${SECURITY_X_LDFLAGS}"
-TARGET_CC_ARCH_append_pn-binutils = " ${SECURITY_CFLAGS} ${SELECTED_OPTIMIZATION}"
+TARGET_CC_ARCH_append_pn-binutils = " ${SELECTED_OPTIMIZATION}"
+TARGET_CC_ARCH_append_pn-gcc = " ${SELECTED_OPTIMIZATION}"
+TARGET_CC_ARCH_append_pn-gdb = " ${SELECTED_OPTIMIZATION}"
+TARGET_CC_ARCH_append_pn-perf = " ${SELECTED_OPTIMIZATION}"
diff --git a/meta/conf/distro/include/tclibc-baremetal.inc b/meta/conf/distro/include/tclibc-baremetal.inc
index a8ce6d3ac2..e04f8c8812 100644
--- a/meta/conf/distro/include/tclibc-baremetal.inc
+++ b/meta/conf/distro/include/tclibc-baremetal.inc
@@ -4,11 +4,9 @@
LIBCEXTENSION = ""
-# Add baremetal libc overrides to the overrides.
LIBCOVERRIDE = ":libc-baremetal"
-OVERRIDES .= "${LIBCOVERRIDE}"
-ASSUME_PROVIDED += "virtual/libc virtual/libiconv"
+ASSUME_PROVIDED += "virtual/libc virtual/libiconv virtual/crypt"
PREFERRED_PROVIDER_virtual/libc ?= "musl"
PREFERRED_PROVIDER_virtual/libiconv ?= "musl"
@@ -23,6 +21,9 @@ LIBC_DEPENDENCIES = ""
EXTRA_OECONF_pn-gcc-cross-${TARGET_ARCH}_append = " --without-headers"
DEPENDS_remove_pn-meta-toolchain = "virtual/libc virtual/${TARGET_PREFIX}compilerlibs"
+# certain compiler libs cannot be used without libc, avoid the dependence on compilerlibs
+BASEDEPENDS_remove_class-target = "virtual/${TARGET_PREFIX}compilerlibs"
+
TARGET_OS = "elf"
TARGET_OS_arm = "eabi"
@@ -30,3 +31,9 @@ TOOLCHAIN_HOST_TASK ?= "packagegroup-cross-canadian-${MACHINE}"
TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
TOOLCHAIN_TARGET_TASK ?= "libgcc-dev"
TOOLCHAIN_NEED_CONFIGSITE_CACHE_remove = "virtual/${MLPREFIX}libc zlib ncurses"
+
+# disable stack protector by default (no-libc, no protector implementation)
+SECURITY_STACK_PROTECTOR_libc-baremetal = ""
+# disable pie security flags by default
+SECURITY_CFLAGS_libc-baremetal = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_LDFLAGS_libc-baremetal = ""
diff --git a/meta/conf/distro/include/tclibc-glibc.inc b/meta/conf/distro/include/tclibc-glibc.inc
index 649918fd2b..3246490997 100644
--- a/meta/conf/distro/include/tclibc-glibc.inc
+++ b/meta/conf/distro/include/tclibc-glibc.inc
@@ -2,11 +2,9 @@
# glibc specific configuration
#
-LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}"
+LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION') or '') != '']}"
-# Add glibc overrides to the overrides for glibc.
LIBCOVERRIDE = ":libc-glibc"
-OVERRIDES .= "${LIBCOVERRIDE}"
PREFERRED_PROVIDER_virtual/libiconv ?= "glibc"
PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
@@ -24,17 +22,8 @@ LIBC_DEPENDENCIES = "libsegfault \
glibc-dev \
glibc-utils \
glibc-thread-db \
- ${@get_libc_locales_dependencies(d)}"
-
-LIBC_LOCALE_DEPENDENCIES = "\
- glibc-localedata-i18n \
- glibc-gconv-ibm850 \
- glibc-gconv-cp1252 \
- glibc-gconv-iso8859-1 \
- glibc-gconv-iso8859-15"
-
-def get_libc_locales_dependencies(d):
- if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() :
- return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or ''
- else:
- return ''
+ glibc-localedata-i18n \
+ glibc-gconv-ibm850 \
+ glibc-gconv-cp1252 \
+ glibc-gconv-iso8859-1 \
+ glibc-gconv-iso8859-15"
diff --git a/meta/conf/distro/include/tclibc-musl.inc b/meta/conf/distro/include/tclibc-musl.inc
index e6b10f9469..8badbbb40a 100644
--- a/meta/conf/distro/include/tclibc-musl.inc
+++ b/meta/conf/distro/include/tclibc-musl.inc
@@ -4,16 +4,17 @@
LIBCEXTENSION = "-musl"
-# Add uclibc overrides to the overrides.
LIBCOVERRIDE = ":libc-musl"
-OVERRIDES .= "${LIBCOVERRIDE}"
PREFERRED_PROVIDER_virtual/libc ?= "musl"
PREFERRED_PROVIDER_virtual/libiconv ?= "musl"
PREFERRED_PROVIDER_virtual/libintl ?= "musl"
+PREFERRED_PROVIDER_virtual/crypt ?= "musl"
PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "ldconfig"
+
#USE_NLS ?= "no"
CXXFLAGS += "-fvisibility-inlines-hidden"
@@ -24,8 +25,7 @@ LIBC_DEPENDENCIES = "\
musl \
musl-dbg \
musl-dev \
+ musl-utils \
+ musl-utils-iconv \
+ bsd-headers-dev \
"
-
-# GLib binaries trigger assertion failures and crash under qemu
-# when musl is in use
-DISTRO_FEATURES_BACKFILL_CONSIDERED += "gobject-introspection-data"
diff --git a/meta/conf/distro/include/tclibc-newlib.inc b/meta/conf/distro/include/tclibc-newlib.inc
new file mode 100644
index 0000000000..896c0b16d7
--- /dev/null
+++ b/meta/conf/distro/include/tclibc-newlib.inc
@@ -0,0 +1,48 @@
+#
+# Newlib configuration
+#
+
+LIBCEXTENSION = "-newlib"
+LIBCOVERRIDE = ":libc-newlib"
+
+PREFERRED_PROVIDER_virtual/libc ?= "newlib"
+PREFERRED_PROVIDER_virtual/libiconv ?= "newlib"
+PREFERRED_PROVIDER_virtual/libintl ?= "newlib"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
+
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "ldconfig"
+
+#USE_NLS ?= "no"
+
+IMAGE_LINGUAS = ""
+
+LIBC_DEPENDENCIES = "\
+ newlib-dbg \
+ newlib-dev \
+ libgloss \
+ libgloss-dev \
+ libgloss-dbg \
+ libgcc-dev \
+ libgcc-dbg \
+ "
+
+# compilerlibs defaults to gcc-runtime, but we get runtime from libgloss
+# we set ASSUME_PROVIDED because we cant set PREFERRED_PROVIDER
+# for compilerlibs since its overridden by tcmode-default
+ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}compilerlibs virtual/crypt"
+
+# Its useful to be able to extend newlib, but we dont provide a native variant of libgloss
+NEWLIB_EXTENDED ?= "libgloss libgcc"
+BASE_DEFAULT_DEPS_append_class-target = " ${NEWLIB_EXTENDED}"
+
+TARGET_OS = "elf"
+TARGET_OS_arm = "eabi"
+
+TOOLCHAIN_HOST_TASK ?= "packagegroup-cross-canadian-${MACHINE}"
+TOOLCHAIN_TARGET_TASK ?= "${LIBC_DEPENDENCIES}"
+TOOLCHAIN_NEED_CONFIGSITE_CACHE_remove = "zlib ncurses"
+
+# disable pie security flags by default
+SECURITY_CFLAGS_libc-newlib = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_LDFLAGS_libc-newlib = ""
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index ca3c5ec90a..8bea58a98e 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -3,32 +3,30 @@
#
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross-${TARGET_ARCH}"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial-${TARGET_ARCH}"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross-${TARGET_ARCH}"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross-${TARGET_ARCH}"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-runtime"
PREFERRED_PROVIDER_gdb = "gdb"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils-crosssdk ?= "binutils-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc-initial = "gcc-crosssdk-initial-${SDK_SYS}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc = "gcc-crosssdk-${SDK_SYS}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = "gcc-crosssdk-${SDK_SYS}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}compilerlibs = "nativesdk-gcc-runtime"
# Default libc config
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}"
-PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc ?= "nativesdk-glibc"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial"
-PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial ?= "nativesdk-glibc-initial"
PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
-GCCVERSION ?= "6.2%"
+GCCVERSION ?= "9.%"
SDKGCCVERSION ?= "${GCCVERSION}"
-BINUVERSION ?= "2.27%"
-GDBVERSION ?= "7.11%"
-GLIBCVERSION ?= "2.24"
-UCLIBCVERSION ?= "1.0%"
-LINUXLIBCVERSION ?= "4.8%"
+BINUVERSION ?= "2.33%"
+GDBVERSION ?= "8.3%"
+GLIBCVERSION ?= "2.30%"
+LINUXLIBCVERSION ?= "5.2%"
+QEMUVERSION ?= "4.1%"
+GOVERSION ?= "1.13%"
+# This can not use wildcards like 8.0.% since it is also used in mesa to denote
+# llvm version being used, so always bump it with llvm recipe version bump
+LLVMVERSION ?= "9.0.0"
PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
@@ -42,13 +40,14 @@ PREFERRED_VERSION_nativesdk-gcc-runtime ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_nativesdk-gcc-sanitizers ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_libgcc ?= "${GCCVERSION}"
PREFERRED_VERSION_libgcc-initial ?= "${GCCVERSION}"
+PREFERRED_VERSION_libgfortran ?= "${GCCVERSION}"
PREFERRED_VERSION_nativesdk-gcc ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_nativesdk-libgcc ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_nativesdk-libgcc-initial ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_binutils ?= "${BINUVERSION}"
PREFERRED_VERSION_binutils-native ?= "${BINUVERSION}"
PREFERRED_VERSION_binutils-cross-${TARGET_ARCH} ?= "${BINUVERSION}"
-PREFERRED_VERSION_binutils-crosssdk-${SDK_ARCH} ?= "${BINUVERSION}"
+PREFERRED_VERSION_binutils-crosssdk-${SDK_SYS} ?= "${BINUVERSION}"
PREFERRED_VERSION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${BINUVERSION}"
PREFERRED_VERSION_gdb ?= "${GDBVERSION}"
PREFERRED_VERSION_gdb-cross-${TARGET_ARCH} ?= "${GDBVERSION}"
@@ -61,15 +60,22 @@ PREFERRED_VERSION_glibc-locale ?= "${GLIBCVERSION}"
PREFERRED_VERSION_glibc-mtrace ?= "${GLIBCVERSION}"
PREFERRED_VERSION_glibc-scripts ?= "${GLIBCVERSION}"
PREFERRED_VERSION_nativesdk-glibc ?= "${GLIBCVERSION}"
-PREFERRED_VERSION_glibc-initial ?= "${GLIBCVERSION}"
-PREFERRED_VERSION_nativesdk-glibc-initial ?= "${GLIBCVERSION}"
PREFERRED_VERSION_cross-localedef-native ?= "${GLIBCVERSION}"
-PREFERRED_VERSION_uclibc ?= "${UCLIBCVERSION}"
-PREFERRED_VERSION_uclibc-initial ?= "${UCLIBCVERSION}"
-# don't use version earlier than 1.4 for gzip-native, as it's necessary for
-# some packages using an archive format incompatible with earlier gzip
-PREFERRED_VERSION_gzip-native ?= "1.8"
-# Setup suitable toolchain flags
-require conf/distro/include/as-needed.inc
+PREFERRED_VERSION_qemu ?= "${QEMUVERSION}"
+PREFERRED_VERSION_qemu-native ?= "${QEMUVERSION}"
+PREFERRED_VERSION_nativesdk-qemu ?= "${QEMUVERSION}"
+PREFERRED_VERSION_virtual/${TARGET_PREFIX}go ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-${TUNE_PKGARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-crosssdk-${SDK_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go ?= "${GOVERSION}"
+PREFERRED_VERSION_go-native ?= "${GOVERSION}"
+PREFERRED_VERSION_go-runtime ?= "${GOVERSION}"
+PREFERRED_VERSION_nativesdk-go ?= "${GOVERSION}"
+PREFERRED_VERSION_nativesdk-go-runtime ?= "${GOVERSION}"
+
+PREFERRED_VERSION_llvm = "${LLVMVERSION}"
+PREFERRED_VERSION_llvm-native = "${LLVMVERSION}"
+PREFERRED_VERSION_nativesdk-llvm = "${LLVMVERSION}"
diff --git a/meta/conf/distro/include/uninative-flags.inc b/meta/conf/distro/include/uninative-flags.inc
new file mode 100644
index 0000000000..febf2a53e5
--- /dev/null
+++ b/meta/conf/distro/include/uninative-flags.inc
@@ -0,0 +1,7 @@
+# Some distros (ubuntu 16.10, debian-testing) default to gcc configured with
+# --enable-default-pie (see gcc -v). This breaks e.g. prelink-native on a pie
+# default system if binutils-native was built on a system which is not pie default
+# We therefore enable pie unconditionally for native recipes where static libs are
+# used such as libiberty from binutils, for now, until our minimum distro set is
+# all default pie.
+BUILD_CFLAGS_append_pn-binutils-native = " -pie -fpie"
diff --git a/meta/conf/distro/include/upstream_tracking.inc b/meta/conf/distro/include/upstream_tracking.inc
deleted file mode 100644
index e2a5e6ce40..0000000000
--- a/meta/conf/distro/include/upstream_tracking.inc
+++ /dev/null
@@ -1,24 +0,0 @@
-# NOTE: THIS FILE IS DEPRECATED. Please add new entries to the recipes themselves.
-#
-# upstream_tracking.inc - This file contains data that tracks the
-# upstream project associated with a given recipe. This list is needed
-# for recipes that version information can not be automagically discovered.
-# As we automate this checking, this file will slowed be reduced.
-#
-# This data is used by the package reporting system (packages.yoctoproject.org)
-#
-# The format is as a bitbake variable override for each recipe
-#
-# RECIPE_UPSTREAM_VERSION_pn-<recipe name> = "<version>"
-# RECIPE_UPSTREAM_DATE_pn-<recipe name> = "Mmm dd, YYYY"
-# - This is the latest upstream version and date
-# RECIPE_NO_UPDATE_REASON_pn-<recipe name> = "<free form text>"
-# - Used to note why a recipe should not be upgraded to a newer versoin
-# CHECK_DATE_pn-<recipe name> = "Mmm dd, YYYY"
-# - This is the date that upstream was last manually checked over time
-# this should be removed as we automate this checking
-#
-# These entries will slowly be removed as we can automatically determine
-# the information in this file. So for existing recipes that we can get
-# from the Recipe reporting system, the entries here can be removed.
-#
diff --git a/meta/conf/distro/include/world-broken.inc b/meta/conf/distro/include/world-broken.inc
deleted file mode 100644
index d4bdddfcfe..0000000000
--- a/meta/conf/distro/include/world-broken.inc
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# Exclude known broken packages
-#
-
-# rt-tests needs PI mutex support in libc
-EXCLUDE_FROM_WORLD_pn-rt-tests_libc-musl = "1"
-
-# error: no member named 'sin_port' in 'struct sockaddr_in6'
-# this is due to libtirpc using ipv6 but portmap rpc expecting ipv4
-EXCLUDE_FROM_WORLD_pn-portmap_libc-musl = "1"
-EXCLUDE_FROM_WORLD_pn-unfs3_libc-musl = "1"
-
-# error: use of undeclared identifier '_STAT_VER'
-EXCLUDE_FROM_WORLD_pn-pseudo_libc-musl = "1"
-
-# error: Need to implement custom I/O
-EXCLUDE_FROM_WORLD_pn-libsolv_libc-musl = "1"
-
-# undefined reference to `pthread_tryjoin_np'
-EXCLUDE_FROM_WORLD_pn-btrfs-tools_libc-musl = "1"
-
-# error: error.h: No such file or directory
-EXCLUDE_FROM_WORLD_pn-prelink_libc-musl = "1"
-
-# error: use of undeclared identifier 'O_CREAT'
-EXCLUDE_FROM_WORLD_pn-libbsd_libc-musl = "1"
-
-# error: expected declaration specifiers before '__nonnull'
-EXCLUDE_FROM_WORLD_pn-lttng-ust_libc-musl = "1"
-EXCLUDE_FROM_WORLD_pn-lttng-tools_libc-musl = "1"
-
-# error: obstack.h: No such file or directory
-EXCLUDE_FROM_WORLD_pn-systemtap_libc-musl = "1"
-EXCLUDE_FROM_WORLD_pn-systemtap-uprobes_libc-musl = "1"
-
-# error: a parameter list without types is only allowed in a function definition
-# void (*_function)(sigval_t);
-EXCLUDE_FROM_WORLD_pn-qemu_libc-musl = "1"
-
-# glibc specific funcrions
-# error: storage size of 'mi' isn't known struct mallinfo mi
-EXCLUDE_FROM_WORLD_pn-valgrind_libc-musl = "1"
-
-# error: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Werror=format=]
-# snprintf(buf, size, "%s", strerror_r(err, sbuf, sizeof(sbuf)));
-EXCLUDE_FROM_WORLD_pn-perf_libc-musl = "1"
-
-# error: 'RTLD_NEXT' was not declared in this scope
-EXCLUDE_FROM_WORLD_pn-gcc-sanitizers_libc-musl = "1"
-
-# gcc fails to build when libuwind is staged before building gcc since
-# it then finds the unwind.h header from libunwind and not from libgcc
-# and on arm specially they are different since libgcc defines some functions
-# as macros which are functions in libunwind and it fails during linking
-# libbacktrace/backtrace.c:76: undefined reference to `_Unwind_GetIP'
-EXCLUDE_FROM_WORLD_pn-libunwind_libc-musl_arm = "1"
diff --git a/meta/conf/distro/include/yocto-uninative.inc b/meta/conf/distro/include/yocto-uninative.inc
index 2f794f72bc..ad75d3e2a3 100644
--- a/meta/conf/distro/include/yocto-uninative.inc
+++ b/meta/conf/distro/include/yocto-uninative.inc
@@ -6,6 +6,9 @@
# to the distro running on the build machine.
#
-UNINATIVE_URL = "http://downloads.yoctoproject.org/releases/uninative/1.4/"
-UNINATIVE_CHECKSUM[i686] ?= "b4bc60511ce479736808273ffa043df4ed2a225407dd7ca150ae6220d9ce76d5"
-UNINATIVE_CHECKSUM[x86_64] ?= "101ff8f2580c193488db9e76f9646fb6ed38b65fb76f403acb0e2178ce7127ca"
+UNINATIVE_MAXGLIBCVERSION = "2.30"
+
+UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/2.7/"
+UNINATIVE_CHECKSUM[aarch64] ?= "e76a45886ee8a0b3904b761c17ac8ff91edf9811ee455f1832d10763ba794dfc"
+UNINATIVE_CHECKSUM[i686] ?= "810d027dfb1c7675226afbcec07808770516c969ee7378f6d8240281083f8924"
+UNINATIVE_CHECKSUM[x86_64] ?= "9498d8bba047499999a7310ac2576d0796461184965351a56f6d32c888a1f216"
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 51c4116983..0b21d1f63e 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -8,7 +8,6 @@ do_bootimg[doc] = "Creates a bootable live image"
do_build[doc] = "Default task for a recipe - depends on all other normal tasks required to 'build' a recipe"
do_bundle_initramfs[doc] = "Combines an initial ramdisk image and kernel together to form a single image"
do_checkuri[doc] = "Validates the SRC_URI value"
-do_checkuriall[doc] = "Validates the SRC_URI value for all recipes required to build a target"
do_clean[doc] = "Removes all output files for a target"
do_cleanall[doc] = "Removes all output files, shared state cache, and downloaded source files for a target"
do_cleansstate[doc] = "Removes all output files and shared state cache for a target"
@@ -22,7 +21,6 @@ do_devpyshell[doc] = "Starts an interactive Python shell for development/debuggi
do_devshell[doc] = "Starts a shell with the environment set up for development/debugging"
do_diffconfig[doc] = "Compares the old and new config files after running do_menuconfig for the kernel"
do_fetch[doc] = "Fetches the source code"
-do_fetchall[doc] = "Fetches all remote sources required to build a target"
do_install[doc] = "Copies files from the compilation directory to a holding area"
do_install_ptest_base[doc] = "Copies the runtime test suite files from the compilation directory to a holding area"
do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto style kernel"
@@ -56,7 +54,6 @@ do_testsdk[doc] = "Installs an SDK and performs runtime tests on the tools insta
do_uboot_mkimage[doc] = "Creates a uImage file from the kernel for the U-Boot bootloader"
do_unpack[doc] = "Unpacks the source code into a working directory"
do_validate_branches[doc] = "Ensures that the source/meta branches are on the locations specified by their SRCREV values for a linux-yocto style kernel"
-do_vmimg[doc] = "Creates an image for use with VMware or VirtualBox compatible virtual machine hosts (based on IMAGE_FSTYPES either .vmdk or .vdi)"
# DESCRIPTIONS FOR VARIABLES #
@@ -72,6 +69,7 @@ ASSUME_SHLIBS[doc] = "List of shlib:package[_version] mappings. Useful for lib p
AUTHOR[doc] = "Email address used to contact the original author(s) in order to send patches and forward bugs."
AUTO_SYSLINUXMENU[doc] = "Enables creating an automatic menu for the syslinux bootloader."
AUTOREV[doc] = "When SRCREV is set to the value of this variable, it specifies to use the latest source revision in the repository."
+AVAILABLE_LICENSES[doc] = "List of licenses found in the directories specified by COMMON_LICENSE_DIR and LICENSE_PATH."
#B
@@ -116,7 +114,7 @@ COMPATIBLE_MACHINE[doc] = "A regular expression that resolves to one or more tar
COMPLEMENTARY_GLOB[doc] = "Defines wildcards to match when installing a list of complementary packages for all the packages installed in an image."
CONFFILES[doc] = "Identifies editable or configurable files that are part of a package."
CONFIG_SITE[doc] = "A list of files that contains autoconf test results relevant to the current build. This variable is used by the Autotools utilities when running configure."
-CONFLICT_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that would be in conflict should the recipe be built."
+CONFLICT_DISTRO_FEATURES[doc] = "When a recipe inherits the features_check class, this variable identifies distribution features that would be in conflict should the recipe be built."
CORE_IMAGE_EXTRA_INSTALL[doc] = "Specifies the list of packages to be added to the image. You should only set this variable in the conf/local.conf file in the Build Directory."
COREBASE[doc] = "Specifies the parent directory of the OpenEmbedded Core Metadata layer (i.e. meta)."
CONF_VERSION[doc] = "Tracks the version of local.conf. Increased each time build/conf/ changes incompatibly."
@@ -128,7 +126,7 @@ D[doc] = "The destination directory."
DATE[doc] = "The date the build was started using YMD format."
DATETIME[doc] = "The date and time the build was started."
DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable."
-DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe'."
+DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-Og ${DEBUG_FLAGS} -pipe'."
DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority."
DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)."
DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
@@ -248,6 +246,7 @@ KERNEL_IMAGETYPE[doc] = "The type of kernel to build for a device, usually set b
KERNEL_IMAGETYPES[doc] = "The list of types of kernel to build for a device, usually set by the machine configuration files and defaults to KERNEL_IMAGETYPE."
KERNEL_MODULE_AUTOLOAD[doc] = "Lists kernel modules that need to be auto-loaded during boot"
KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system expects to find module_conf_* values that specify configuration for each of the modules"
+KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 'kernel'."
KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
@@ -290,8 +289,6 @@ MULTIMACH_TARGET_SYS[doc] = "Separates files for different machines such that yo
NATIVELSBSTRING[doc] = "A string identifying the host distribution."
NO_RECOMMENDATIONS[doc] = "When set to '1', no recommended packages will be installed. Realize that some recommended packages might be required for certain system functionality, such as kernel-modules. It is up to the user to add packages to IMAGE_INSTALL as needed."
-NOHDD[doc] = "Causes the OpenEmbedded build system to skip building the .hddimg image."
-NOISO[doc] = "Causes the OpenEmbedded build system to skip building the ISO image."
#O
@@ -334,11 +331,13 @@ PR[doc] = "The revision of the recipe. The default value for this variable is 'r
PREFERRED_PROVIDER[doc] = "If multiple recipes provide an item, this variable determines which recipe should be given preference."
PREFERRED_VERSION[doc] = "If there are multiple versions of recipes available, this variable determines which recipe should be given preference."
PREMIRRORS[doc] = "Specifies additional paths from which the OpenEmbedded build system gets source code."
-PRINC[doc] = "Causes the PR variable of .bbappend files to dynamically increment. This increment minimizes the impact of layer ordering. This variable defaults to '0'."
PRIORITY[doc] = "Indicates the importance of a package. The default value is 'optional'. Other standard values are 'required', 'standard' and 'extra'."
PROVIDES[doc] = "A list of aliases that a recipe also provides. These aliases are useful for satisfying dependencies of other recipes during the build as specified by DEPENDS."
PRSERV_HOST[doc] = "The network based PR service host and port."
PV[doc] = "The version of the recipe. The version is normally extracted from the recipe filename."
+PYPI_PACKAGE[doc] = "The python package name to use for fetching from pypi. Default is parsed from the recipe name, but can be overridden if upstream name is different than recipe name."
+PYPI_PACKAGE_EXT[doc] = "The archive file extension to use for fetching from pypi. Default is tar.gz, but can be overridden if upstream uses a different compression scheme."
+PYPI_SRC_URI[doc] = "The URI to use to fetch from pypi, default uses pythonhosted.org and is constructed from PYPI_PACKAGE, PYPI_PACKAGE_EXT and PV."
#Q
@@ -348,8 +347,7 @@ QMAKE_PROFILES[doc] = "Specifies your own subset of .pro files to be built for u
RCONFLICTS[doc] = "The list of packages that conflict with another package. Note that the package will not be installed if the conflicting packages are not first removed."
RDEPENDS[doc] = "Lists a package's runtime dependencies (i.e. other packages) that must be installed for the package to be built. They must be the names of other packages as listed in the PACKAGES variable, not recipe names (PN)."
-REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe."
-RM_OLD_IMAGE[doc] = "Reclaims disk space by removing previously built versions of the same image from the images directory pointed to by the DEPLOY_DIR variable."
+REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe."
RM_WORK_EXCLUDE[doc] = "With rm_work enabled, this variable specifies a list of packages whose work directories should not be removed."
ROOTFS[doc] = "Indicates a filesystem image to include as the root filesystem."
ROOTFS_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the root filesystem."
@@ -416,9 +414,9 @@ TARGET_FPU[doc] = "Specifies the method for handling FPU code. For FPU-less targ
TARGET_OS[doc] = "Specifies the target's operating system."
TARGET_PREFIX[doc] = "The prefix for the cross-compile toolchain (e.g. arm-linux-)."
TARGET_SYS[doc] = "The target system is comprised of TARGET_ARCH,TARGET_VENDOR and TARGET_OS."
-TCLIBC[doc] = "Specifies GNU standard C library (libc) variant to use during the build process. You can select 'glibc' or 'uclibc'."
+TCLIBC[doc] = "Specifies C library (libc) variant to use during the build process. You can select 'baremetal', 'glibc', 'musl' or 'newlib'."
TCMODE[doc] = "Enables an external toolchain (where provided by an additional layer) if set to a value other than 'default'."
-TEST_IMAGE[doc] = "Enables test booting of virtual machine images under the QEMU emulator after any root filesystems are created and runs tests against those images."
+TESTIMAGE_AUTO[doc] = "Enables test booting of virtual machine images under the QEMU emulator after any root filesystems are created and runs tests against those images each time an image is built."
TEST_QEMUBOOT_TIMEOUT[doc] = "The time in seconds allowed for an image to boot before automated runtime tests begin to run against an image."
TEST_SUITES[doc] = "An ordered list of tests (modules) to run against an image when performing automated runtime testing."
TEST_POWERCONTROL_CMD[doc] = "For automated hardware testing, specifies the command to use to control the power of the target machine under test"
diff --git a/meta/conf/image-uefi.conf b/meta/conf/image-uefi.conf
new file mode 100644
index 0000000000..aaeff12ccb
--- /dev/null
+++ b/meta/conf/image-uefi.conf
@@ -0,0 +1,16 @@
+# Location of EFI files inside EFI System Partition
+EFIDIR ?= "/EFI/BOOT"
+
+# Prefix where ESP is mounted inside rootfs. Set to empty if package is going
+# to be installed to ESP directly
+EFI_PREFIX ?= "/boot"
+
+# Location inside rootfs.
+EFI_FILES_PATH = "${EFI_PREFIX}${EFIDIR}"
+
+# Determine name of bootloader image
+EFI_BOOT_IMAGE ?= "bootINVALID.efi"
+EFI_BOOT_IMAGE_x86-64 = "bootx64.efi"
+EFI_BOOT_IMAGE_x86 = "bootia32.efi"
+EFI_BOOT_IMAGE_aarch64 = "bootaa64.efi"
+EFI_BOOT_IMAGE_arm = "bootarm.efi"
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 24b4df07f5..fcdf9ae5a3 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -7,9 +7,12 @@ BBFILE_COLLECTIONS += "core"
BBFILE_PATTERN_core = "^${LAYERDIR}/"
BBFILE_PRIORITY_core = "5"
+LAYERSERIES_CORENAMES = "zeus"
+
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
-LAYERVERSION_core = "9"
+LAYERVERSION_core = "11"
+LAYERSERIES_COMPAT_core = "warrior zeus"
BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
@@ -19,6 +22,7 @@ COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
# opkg-utils is for update-alternatives :(
SIGGEN_EXCLUDERECIPES_ABISAFE += " \
sysvinit-inittab \
+ busybox-inittab \
shadow-securetty \
opkg-arch-config \
netbase \
@@ -38,24 +42,59 @@ SIGGEN_EXCLUDERECIPES_ABISAFE += " \
base-passwd \
opkg-utils \
gstreamer1.0-meta-base \
+ ca-certificates \
"
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
- gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc \
+ *->quilt-native \
+ *->subversion-native \
+ *->git-native \
+ *->icecc-create-env-native \
gcc-cross-${TARGET_ARCH}->linux-libc-headers \
ppp-dialin->ppp \
resolvconf->bash \
docbook-xsl-stylesheets->perl \
ca-certificates->openssl \
initramfs-framework->${VIRTUAL-RUNTIME_base-utils} \
- initramfs-framework->systemd \
initramfs-framework->eudev \
+ initramfs-framework->systemd \
+ initramfs-module-install-efi->dosfstools \
+ initramfs-module-install-efi->e2fsprogs \
+ initramfs-module-install-efi->parted \
+ initramfs-module-install-efi->util-linux \
+ initramfs-module-install->e2fsprogs \
+ initramfs-module-install->grub \
+ initramfs-module-install->parted \
+ initramfs-module-install->util-linux \
+ grub-efi->grub-bootconf \
liberation-fonts->fontconfig \
cantarell-fonts->fontconfig \
gnome-icon-theme->librsvg \
font-alias->font-util \
+ systemd-boot->systemd-bootconf \
+ systemd->systemd-conf \
+ weston->weston-init \
weston-init->weston \
weston-init->kbd \
- oprofile->virtual/kernel \
+ connman->xl2tpd \
+ lttng-tools->lttng-modules \
+"
+
+# Avoid adding bison-native to the sysroot without a specific
+# dependency in the recipe. This means indirect dependencies
+# (e.g. X -> Y -> binutils-cross -> bison-native) no longer meet the
+# dependency incidentally. This improves determinism and avoids build
+# failures when people switch to external toolchains.
+SSTATE_EXCLUDEDEPS_SYSROOT += ".*->bison-native"
+# Nothing needs to depend on libc-initial/gcc-cross-initial
+# base-passwd/shadow-sysroot don't need their dependencies
+SSTATE_EXCLUDEDEPS_SYSROOT += "\
+ .*->.*-initial.* \
+ .*(base-passwd|shadow-sysroot)->.* \
"
+# Avoid adding autoconf-archive-native to sysroot without a specific
+# dependency in the recipe.
+SSTATE_EXCLUDEDEPS_SYSROOT += ".*->autoconf-archive-native"
+# We need to keep bitbake tools in PATH
+PATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}:${HOSTTOOLS_DIR}"
diff --git a/meta/conf/licenses.conf b/meta/conf/licenses.conf
index 9917c40e19..1c586a3bc6 100644
--- a/meta/conf/licenses.conf
+++ b/meta/conf/licenses.conf
@@ -1,44 +1,3 @@
-# These aren't actually used anywhere that I can tell
-# They may be in the future (or are used by someone else
-# For completion sake, I've updated them
-SRC_DISTRIBUTE_LICENSES += "AAL Adobe AFL-1.2 AFL-2.0 AFL-2.1 AFL-3.0"
-SRC_DISTRIBUTE_LICENSES += "AGPL-3.0 ANTLR-PD Apache-1.0 Apache-1.1 Apache-2.0"
-SRC_DISTRIBUTE_LICENSES += "APL-1.0 APSL-1.0 APSL-1.1 APSL-1.2 APSL-2.0"
-SRC_DISTRIBUTE_LICENSES += "Artistic-1.0 Artistic-2.0 BitstreamVera BSD"
-SRC_DISTRIBUTE_LICENSES += "BSD-2-Clause BSD-3-Clause BSD-4-Clause BSL-1.0"
-SRC_DISTRIBUTE_LICENSES += "CATOSL-1.1 CC0-1.0 CC-BY-1.0 CC-BY-2.0 CC-BY-2.5"
-SRC_DISTRIBUTE_LICENSES += "CC-BY-3.0 CC-BY-NC-1.0 CC-BY-NC-2.0 CC-BY-NC-2.5"
-SRC_DISTRIBUTE_LICENSES += "CC-BY-NC-3.0 CC-BY-NC-ND-1.0 CC-BY-NC-ND-2.0"
-SRC_DISTRIBUTE_LICENSES += "CC-BY-NC-ND-2.5 CC-BY-NC-ND-3.0 CC-BY-NC-SA-1.0"
-SRC_DISTRIBUTE_LICENSES += "CC-BY-NC-SA-2.0 CC-BY-NC-SA-2.5 CC-BY-NC-SA-3.0"
-SRC_DISTRIBUTE_LICENSES += "CC-BY-ND-1.0 CC-BY-ND-2.0 CC-BY-ND-2.5 CC-BY-ND-3.0"
-SRC_DISTRIBUTE_LICENSES += "CC-BY-SA-1.0 CC-BY-SA-2.0 CC-BY-SA-2.5 CC-BY-SA-3.0"
-SRC_DISTRIBUTE_LICENSES += "CDDL-1.0 CECILL-1.0 CECILL-2.0 CECILL-B CECILL-C"
-SRC_DISTRIBUTE_LICENSES += "ClArtistic CPAL-1.0 CPL-1.0 CUA-OPL-1.0 DSSSL"
-SRC_DISTRIBUTE_LICENSES += "ECL-1.0 ECL-2.0 eCos-2.0 EDL-1.0 EFL-1.0 EFL-2.0"
-SRC_DISTRIBUTE_LICENSES += "Elfutils-Exception Entessa EPL-1.0 ErlPL-1.1"
-SRC_DISTRIBUTE_LICENSES += "EUDatagrid EUPL-1.0 EUPL-1.1 Fair Frameworx-1.0"
-SRC_DISTRIBUTE_LICENSES += "FreeType GFDL-1.1 GFDL-1.2 GFDL-1.3 GPL-1.0"
-SRC_DISTRIBUTE_LICENSES += "GPL-2.0 GPL-2.0-with-autoconf-exception"
-SRC_DISTRIBUTE_LICENSES += "GPL-2.0-with-classpath-exception"
-SRC_DISTRIBUTE_LICENSES += "GPL-2.0-with-font-exception"
-SRC_DISTRIBUTE_LICENSES += "GPL-2.0-with-GCC-exception"
-SRC_DISTRIBUTE_LICENSES += "GPL-2-with-bison-exception GPL-3.0"
-SRC_DISTRIBUTE_LICENSES += "GPL-3.0-with-autoconf-exception"
-SRC_DISTRIBUTE_LICENSES += "GPL-3.0-with-GCC-exception"
-SRC_DISTRIBUTE_LICENSES += "gSOAP-1 gSOAP-1.3b HPND IPA IPL-1.0 ISC LGPL-2.0"
-SRC_DISTRIBUTE_LICENSES += "LGPL-2.1 LGPL-3.0 Libpng LPL-1.02 LPPL-1.0 LPPL-1.1"
-SRC_DISTRIBUTE_LICENSES += "LPPL-1.2 LPPL-1.3c MirOS MIT Motosoto MPL-1.0"
-SRC_DISTRIBUTE_LICENSES += "MPL-1.1 MS-PL MS-RL Multics NASA-1.3 Nauman NCSA"
-SRC_DISTRIBUTE_LICENSES += "NGPL Nokia NPOSL-3.0 NTP OASIS OCLC-2.0 ODbL-1.0"
-SRC_DISTRIBUTE_LICENSES += "OFL-1.1 OGTSL OLDAP-2.8 OpenSSL OSL-1.0 OSL-2.0"
-SRC_DISTRIBUTE_LICENSES += "OSL-3.0 PD PHP-3.0 PostgreSQL Proprietary"
-SRC_DISTRIBUTE_LICENSES += "Python-2.0 QPL-1.0 RHeCos-1 RHeCos-1.1 RPL-1.5"
-SRC_DISTRIBUTE_LICENSES += "RPSL-1.0 RSCPL Ruby SAX-PD SGI-1 Simple-2.0 Sleepycat"
-SRC_DISTRIBUTE_LICENSES += "SPL-1.0 SugarCRM-1 SugarCRM-1.1.3 UCB VSL-1.0 W3C"
-SRC_DISTRIBUTE_LICENSES += "Watcom-1.0 WXwindows XFree86-1.0 XFree86-1.1 Xnet XSL YPL-1.1"
-SRC_DISTRIBUTE_LICENSES += "Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1"
-
# Standards are great! Everyone has their own. In an effort to standardize licensing
# names, common-licenses will use the SPDX standard license names. In order to not
# break the non-standardized license names that we find in LICENSE, we'll set
@@ -105,6 +64,10 @@ SPDXLICENSEMAP[AFL-1] = "AFL-1.2"
SPDXLICENSEMAP[AFLv2] = "AFL-2.0"
SPDXLICENSEMAP[AFLv1] = "AFL-1.2"
+#CDDL variations
+SPDXLICENSEMAP[CDDLv1] = "CDDL-1.0"
+SPDXLICENSEMAP[CDDL-1] = "CDDL-1.0"
+
#Other variations
SPDXLICENSEMAP[EPLv1.0] = "EPL-1.0"
@@ -133,11 +96,10 @@ DATA_LICENSE = "CC0-1.0"
# You can set option to control if the copyright information will be skipped
# during the identification process.
#
-# It is defined as [FOSS_COPYRIGHT] in ./meta/conf/licenses.conf.
-# FOSS_COPYRIGHT = "true"
+# FOSS_NO_COPYRIGHT = "true"
# NO copyright will be processed. That means only license information will be
# identified and output to SPDX file
-# FOSS_COPYRIGHT = "false"
+# FOSS_NO_COPYRIGHT = "false"
# Copyright will be identified and output to SPDX file along with license
# information. The process will take more time than not processing copyright
# information.
@@ -185,5 +147,3 @@ FOSS_BASE_URL = "http://localhost/repo/?mod=spdx_license_once"
FOSS_SERVER = "${FOSS_BASE_URL}&fullSPDXFlag=${FOSS_FULL_SPDX}&noCopyright=${FOSS_NO_COPYRIGHT}&recursiveUnpack=${FOSS_RECURSIVE_UNPACK}"
FOSS_WGET_FLAGS = "-qO - --no-check-certificate --timeout=0"
-
-
diff --git a/meta/conf/local.conf.sample b/meta/conf/local.conf.sample
index 85c5e21fb5..783d2c4c16 100644
--- a/meta/conf/local.conf.sample
+++ b/meta/conf/local.conf.sample
@@ -25,8 +25,8 @@
#MACHINE ?= "qemux86"
#MACHINE ?= "qemux86-64"
#
-# This sets the default machine to be qemux86 if no other machine is selected:
-MACHINE ??= "qemux86"
+# This sets the default machine to be qemux86-64 if no other machine is selected:
+MACHINE ??= "qemux86-64"
#
# Where to place downloads
@@ -101,6 +101,8 @@ PACKAGE_CLASSES ?= "package_ipk"
# variable can contain the following options:
# "dbg-pkgs" - add -dbg packages for all installed packages
# (adds symbol information for debugging/profiling)
+# "src-pkgs" - add -src packages for all installed packages
+# (adds source code for debugging)
# "dev-pkgs" - add -dev packages for all installed packages
# (useful if you want to develop against libs in the image)
# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
@@ -126,7 +128,6 @@ EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
# - 'buildstats' collect build statistics
# - 'image-mklibs' to reduce shared library files size for an image
# - 'image-prelink' in order to prelink the filesystem image
-# - 'image-swab' to perform host system intrusion detection
# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
@@ -136,10 +137,12 @@ USER_CLASSES ?= "buildstats image-mklibs image-prelink"
# Runtime testing of images
#
# The build system can test booting virtual machine images under qemu (an emulator)
-# after any root filesystems are created and run tests against those images. To
-# enable this uncomment this line. See classes/testimage(-auto).bbclass for
-# further details.
-#TEST_IMAGE = "1"
+# after any root filesystems are created and run tests against those images. It can also
+# run tests against any SDK that are built. To enable this uncomment these lines.
+# See classes/test{image,sdk}.bbclass for further details.
+#IMAGE_CLASSES += "testimage testsdk"
+#TESTIMAGE_AUTO_qemuall = "1"
+
#
# Interactive shell configuration
#
@@ -169,7 +172,7 @@ PATCHRESOLVE = "noop"
# files and damages the build in ways which may not be easily recoverable.
# It's necesary to monitor /tmp, if there is no space left the build will fail
# with very exotic errors.
-BB_DISKMON_DIRS = "\
+BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
@@ -202,12 +205,26 @@ BB_DISKMON_DIRS = "\
# Qemu configuration
#
# By default qemu will build with a builtin VNC server where graphical output can be
-# seen. The two lines below enable the SDL backend too. By default libsdl-native will
+# seen. The two lines below enable the SDL backend too. By default libsdl2-native will
# be built, if you want to use your host's libSDL instead of the minimal libsdl built
-# by libsdl-native then uncomment the ASSUME_PROVIDED line below.
-PACKAGECONFIG_append_pn-qemu-native = " sdl"
+# by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
+PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
-#ASSUME_PROVIDED += "libsdl-native"
+#ASSUME_PROVIDED += "libsdl2-native"
+
+#
+# Hash Equivalence
+#
+# Enable support for automatically running a local hash equivalence server and
+# instruct bitbake to use a hash equivalence aware signature generator. Hash
+# equivalence improves reuse of sstate by detecting when a given sstate
+# artifact can be reused as equivalent, even if the current task hash doesn't
+# match the one that generated the artifact.
+#
+# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
+#
+#BB_HASHSERVE = "auto"
+#BB_SIGNATURE_HANDLER = "OEEquivHash"
# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
# track the version of this file when it was generated. This can safely be ignored if
diff --git a/meta/conf/local.conf.sample.extended b/meta/conf/local.conf.sample.extended
index da4820dbbf..fcf4a9b7c1 100644
--- a/meta/conf/local.conf.sample.extended
+++ b/meta/conf/local.conf.sample.extended
@@ -24,22 +24,10 @@
# For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
# be appropriate for example.
-
-# glibc configurability is used to reduce minimal image's size.
-# the all supported glibc options are listed in DISTRO_FEATURES_LIBC
-# and disabled by default. Uncomment and copy the DISTRO_FEATURES_LIBC
-# and DISTRO_FEATURES definitions to local.conf to enable the options.
-#DISTRO_FEATURES_LIBC = "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
-# libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
-# libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-locales libc-locale-code \
-# libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
-# libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
-# libc-posix-wchar-io"
-
-#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
+#DISTRO_FEATURES = "alsa bluetooth ext2 irda ipv4 ipv6 pcmcia usbgadget usbhost wifi nfs zeroconf pci"
# If you want to get an image based on directfb without x11, Please copy this variable to build/conf/local.conf
-#DISTRO_FEATURES = "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g directfb ${DISTRO_FEATURES_LIBC}"
+#DISTRO_FEATURES = "alsa argp bluetooth ext2 irda ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g directfb"
# ENABLE_BINARY_LOCALE_GENERATION controls the generation of binary locale
# packages at build time using qemu-native. Disabling it (by setting it to 0)
@@ -47,11 +35,23 @@
# less than 128MB RAM.
#ENABLE_BINARY_LOCALE_GENERATION = "1"
+# If GLIBC_SPLIT_LC_PACKAGES is set to a non-zero value, convert
+# glibc-binary-localedata-XX-YY to be a meta package depending on
+# glibc-binary-localedata-XX-YY-lc-address and so on. This enables
+# saving quite some space if someone doesn't need LC_COLLATE for
+# example.
+#GLIBC_SPLIT_LC_PACKAGES = "1"
+
# Set GLIBC_GENERATE_LOCALES to the locales you wish to generate should you not
# wish to perform the time-consuming step of generating all LIBC locales.
# NOTE: If removing en_US.UTF-8 you will also need to uncomment, and set
# appropriate value for IMAGE_LINGUAS.
# WARNING: this may break localisation!
+# WARNING: some recipes expect certain localizations to be enabled, e.g.
+# bash-ptest: fr-fr, de-de
+# glib-2.0-ptest: tr-tr, lt-lt, ja-jp.euc-jp, fa-ir, ru-ru, de-de, hr-hr, el-gr, fr-fr, es-es, en-gb
+# if you remove some of these and enable ptest, you'll get QA warning like:
+# ERROR: glib-2.0-1_2.58.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-de-de, but it isn't a build dependency? [build-deps]
#GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
#IMAGE_LINGUAS ?= "en-gb"
@@ -87,10 +87,7 @@
# PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
# Uncomment these to build a package such that you can use gprof to profile it.
-# NOTE: This will only work with 'linux' targets, not
-# 'linux-uclibc', as uClibc doesn't provide the necessary
-# object files. Also, don't build glibc itself with these
-# flags, or it'll fail to build.
+# NOTE: Don't build glibc itself with these flags, or it'll fail to build.
#
# PROFILE_OPTIMIZATION = "-pg"
# SELECTED_OPTIMIZATION = "${PROFILE_OPTIMIZATION}"
@@ -266,9 +263,6 @@
#COPYLEFT_RECIPE_TYPES = 'target'
#
-# Remove the old image before the new one generated to save disk space
-#RM_OLD_IMAGE = "1"
-
#
# GCC/LD FLAGS to enable more secure code generation
#
@@ -282,18 +276,18 @@
# Image level user/group configuration.
# Inherit extrausers to make the setting of EXTRA_USERS_PARAMS effective.
-#INHERIT += "extrausers"
+#IMAGE_CLASSES += "extrausers"
# User / group settings
-# The settings are sperated by the ; character.
+# The settings are separated by the ; character.
# Each setting is actually a command. The supported commands are useradd,
# groupadd, userdel, groupdel, usermod and groupmod.
#EXTRA_USERS_PARAMS = "\
-#useradd -p '' tester; \
-#groupadd developers; \
-#userdel nobody; \
-#groupdel video; \
-#groupmod -g 1020 developers; \
-#usermod -s /bin/sh tester; \
+# useradd -p '' tester; \
+# groupadd developers; \
+# userdel nobody; \
+# groupdel video; \
+# groupmod -g 1020 developers; \
+# usermod -s /bin/sh tester; \
#"
# Various packages dynamically add users and groups to the system at package
@@ -325,7 +319,6 @@
# show an example of how it can be done
# You'll also need your fortran recipe to depend on libgfortran
#FORTRAN_forcevariable = ",fortran"
-#RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"
#
# Kernel image features
@@ -387,5 +380,14 @@
#
#DISTRO_FEATURES_append = " systemd"
#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
+#VIRTUAL-RUNTIME_login_manager = "shadow-base"
#VIRTUAL-RUNTIME_init_manager = "systemd"
#VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
+
+#
+# Use a full set of packages instead of busybox for base utils
+#
+#PREFERRED_PROVIDER_base-utils = "packagegroup-core-base-utils"
+#VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
+#VIRTUAL-RUNTIME_base-utils-hwclock = "util-linux-hwclock"
+#VIRTUAL-RUNTIME_base-utils-syslog = "syslog"
diff --git a/meta/conf/machine-sdk/aarch64.conf b/meta/conf/machine-sdk/aarch64.conf
new file mode 100644
index 0000000000..98d8380ecb
--- /dev/null
+++ b/meta/conf/machine-sdk/aarch64.conf
@@ -0,0 +1,2 @@
+SDK_ARCH = "aarch64"
+ABIEXTENSION_class-nativesdk = ""
diff --git a/meta/conf/machine-sdk/i586.conf b/meta/conf/machine-sdk/i586.conf
index baacce70af..41e5e159d1 100644
--- a/meta/conf/machine-sdk/i586.conf
+++ b/meta/conf/machine-sdk/i586.conf
@@ -1,3 +1,4 @@
SDK_ARCH = "i586"
SDK_CC_ARCH = "-march=i586"
+ABIEXTENSION_class-nativesdk = ""
diff --git a/meta/conf/machine-sdk/i686.conf b/meta/conf/machine-sdk/i686.conf
index ffdb46131c..fe406972c8 100644
--- a/meta/conf/machine-sdk/i686.conf
+++ b/meta/conf/machine-sdk/i686.conf
@@ -1,2 +1,3 @@
SDK_ARCH = "i686"
SDK_CC_ARCH = "-march=i686"
+ABIEXTENSION_class-nativesdk = ""
diff --git a/meta/conf/machine-sdk/x86_64.conf b/meta/conf/machine-sdk/x86_64.conf
index 812d67c8d2..61439b4fb0 100644
--- a/meta/conf/machine-sdk/x86_64.conf
+++ b/meta/conf/machine-sdk/x86_64.conf
@@ -1 +1,2 @@
SDK_ARCH = "x86_64"
+ABIEXTENSION_class-nativesdk = ""
diff --git a/meta/conf/machine/include/arm/arch-arm.inc b/meta/conf/machine/include/arm/arch-arm.inc
index 2e3127c799..99625d8417 100644
--- a/meta/conf/machine/include/arm/arch-arm.inc
+++ b/meta/conf/machine/include/arm/arch-arm.inc
@@ -13,4 +13,4 @@ TUNE_PKGARCH = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}
ABIEXTENSION = "eabi"
-TARGET_FPU = "${@d.getVar('TUNE_CCARGS_MFLOAT', True) or 'soft'}"
+TARGET_FPU = "${@d.getVar('TUNE_CCARGS_MFLOAT') or 'soft'}"
diff --git a/meta/conf/machine/include/arm/arch-arm64.inc b/meta/conf/machine/include/arm/arch-arm64.inc
index 944069836b..53f4566815 100644
--- a/meta/conf/machine/include/arm/arch-arm64.inc
+++ b/meta/conf/machine/include/arm/arch-arm64.inc
@@ -1,10 +1,10 @@
DEFAULTTUNE ?= "aarch64"
-require conf/machine/include/arm/arch-armv7a.inc
+require conf/machine/include/arm/arch-armv7ve.inc
TUNEVALID[aarch64] = "Enable instructions for aarch64"
-MACHINEOVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', ':aarch64', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'aarch64:', '' ,d)}"
# Little Endian base configs
AVAILTUNES += "aarch64 aarch64_be"
@@ -28,7 +28,7 @@ TARGET_FPU_64 = ""
TUNE_ARCH_32 = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'armeb', 'arm', d)}"
TUNE_PKGARCH_32 = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
ABIEXTENSION_32 = "eabi"
-TARGET_FPU_32 = "${@d.getVar('TUNE_CCARGS_MFLOAT', True) or 'soft'}"
+TARGET_FPU_32 = "${@d.getVar('TUNE_CCARGS_MFLOAT') or 'soft'}"
TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_ARCH_64}', '${TUNE_ARCH_32}' ,d)}"
TUNE_PKGARCH = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_PKGARCH_64}', '${TUNE_PKGARCH_32}' ,d)}"
diff --git a/meta/conf/machine/include/arm/arch-armv4.inc b/meta/conf/machine/include/arm/arch-armv4.inc
index 813ed159dc..47a7ad2830 100644
--- a/meta/conf/machine/include/arm/arch-armv4.inc
+++ b/meta/conf/machine/include/arm/arch-armv4.inc
@@ -2,7 +2,7 @@ DEFAULTTUNE ?= "armv4"
TUNEVALID[arm] = "Enable ARM instruction set"
TUNEVALID[armv4] = "Enable instructions for ARMv4"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4${ARMPKGSFX_THUMB}', '', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4t', '', d)}"
# enable --fix-v4bx when we have armv4 in TUNE_FEATURES, but then disable it when we have also armv5 or thumb
# maybe we should extend bb.utils.contains to support check for any checkvalues in value, now it does
# checkvalues.issubset(val) which cannot be used for negative test of foo neither bar in value
diff --git a/meta/conf/machine/include/arm/arch-armv5-dsp.inc b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
index f204920710..d117af1520 100644
--- a/meta/conf/machine/include/arm/arch-armv5-dsp.inc
+++ b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
@@ -1,4 +1,4 @@
-ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'armv5', 'dsp' ], 'e', '', d)}"
+ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'dsp' ], 'e', '', d)}"
TUNEVALID[dsp] = "ARM DSP functionality"
require conf/machine/include/arm/arch-armv5.inc
@@ -7,9 +7,9 @@ require conf/machine/include/arm/arch-armv5.inc
AVAILTUNES += "armv5e armv5te"
ARMPKGARCH_tune-armv5e ?= "armv5"
ARMPKGARCH_tune-armv5te ?= "armv5"
-TUNE_FEATURES_tune-armv5e = "${TUNE_FEATURES_tune-armv5} dsp"
+TUNE_FEATURES_tune-armv5e = "${TUNE_FEATURES_tune-armv5} dsp"
TUNE_FEATURES_tune-armv5te = "${TUNE_FEATURES_tune-armv5t} dsp"
-PACKAGE_EXTRA_ARCHS_tune-armv5e = "${PACKAGE_EXTRA_ARCHS_tune-armv5} armv5e"
+PACKAGE_EXTRA_ARCHS_tune-armv5e = "${PACKAGE_EXTRA_ARCHS_tune-armv5} armv5e"
PACKAGE_EXTRA_ARCHS_tune-armv5te = "${PACKAGE_EXTRA_ARCHS_tune-armv5t} armv5e armv5te"
# Little Endian + VFP/DSP
@@ -18,22 +18,22 @@ ARMPKGARCH_tune-armv5e-vfp ?= "armv5"
ARMPKGARCH_tune-armv5te-vfp ?= "armv5"
ARMPKGARCH_tune-armv5ehf-vfp ?= "armv5"
ARMPKGARCH_tune-armv5tehf-vfp ?= "armv5"
-TUNE_FEATURES_tune-armv5e-vfp = "${TUNE_FEATURES_tune-armv5e} vfp"
-TUNE_FEATURES_tune-armv5te-vfp = "${TUNE_FEATURES_tune-armv5te} vfp"
-TUNE_FEATURES_tune-armv5ehf-vfp = "${TUNE_FEATURES_tune-armv5e-vfp} callconvention-hard"
+TUNE_FEATURES_tune-armv5e-vfp = "${TUNE_FEATURES_tune-armv5e} vfp"
+TUNE_FEATURES_tune-armv5te-vfp = "${TUNE_FEATURES_tune-armv5te} vfp"
+TUNE_FEATURES_tune-armv5ehf-vfp = "${TUNE_FEATURES_tune-armv5e-vfp} callconvention-hard"
TUNE_FEATURES_tune-armv5tehf-vfp = "${TUNE_FEATURES_tune-armv5te-vfp} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5-vfp} armv5e armv5e-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5te-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5t-vfp} armv5e armv5te armv5e-vfp armv5te-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5hf-vfp} armv5ehf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5-vfp} armv5e armv5e-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5te-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5t-vfp} armv5e armv5te armv5e-vfp armv5te-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5hf-vfp} armv5ehf-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5tehf-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5thf-vfp} armv5ehf-vfp armv5tehf-vfp"
# Big Endian
AVAILTUNES += "armv5eb armv5teb"
ARMPKGARCH_tune-armv5eb ?= "armv5"
ARMPKGARCH_tune-armv5teb ?= "armv5"
-TUNE_FEATURES_tune-armv5eb = "${TUNE_FEATURES_tune-armv5e} bigendian"
+TUNE_FEATURES_tune-armv5eb = "${TUNE_FEATURES_tune-armv5e} bigendian"
TUNE_FEATURES_tune-armv5teb = "${TUNE_FEATURES_tune-armv5te} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv5eb = "${PACKAGE_EXTRA_ARCHS_tune-armv5b} armv5eb"
+PACKAGE_EXTRA_ARCHS_tune-armv5eb = "${PACKAGE_EXTRA_ARCHS_tune-armv5b} armv5eb"
PACKAGE_EXTRA_ARCHS_tune-armv5teb = "${PACKAGE_EXTRA_ARCHS_tune-armv5tb} armv5eb armv5teb"
# Big Endian + VFP/DSP
@@ -42,11 +42,11 @@ ARMPKGARCH_tune-armv5eb-vfp ?= "armv5"
ARMPKGARCH_tune-armv5teb-vfp ?= "armv5"
ARMPKGARCH_tune-armv5ehfb-vfp ?= "armv5"
ARMPKGARCH_tune-armv5tehfb-vfp ?= "armv5"
-TUNE_FEATURES_tune-armv5eb-vfp = "${TUNE_FEATURES_tune-armv5e-vfp} bigendian"
-TUNE_FEATURES_tune-armv5teb-vfp = "${TUNE_FEATURES_tune-armv5te-vfp} bigendian"
-TUNE_FEATURES_tune-armv5ehfb-vfp = "${TUNE_FEATURES_tune-armv5ehf-vfp} bigendian"
+TUNE_FEATURES_tune-armv5eb-vfp = "${TUNE_FEATURES_tune-armv5e-vfp} bigendian"
+TUNE_FEATURES_tune-armv5teb-vfp = "${TUNE_FEATURES_tune-armv5te-vfp} bigendian"
+TUNE_FEATURES_tune-armv5ehfb-vfp = "${TUNE_FEATURES_tune-armv5ehf-vfp} bigendian"
TUNE_FEATURES_tune-armv5tehfb-vfp = "${TUNE_FEATURES_tune-armv5tehf-vfp} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv5eb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5b-vfp} armv5eb armv5eb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5eb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5b-vfp} armv5eb armv5eb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5teb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5tb-vfp} armv5eb armv5teb armv5eb-vfp armv5teb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5ehfb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5hfb-vfp} armv5ehfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5ehfb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5hfb-vfp} armv5ehfb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5tehfb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5thfb-vfp} armv5ehfb-vfp armv5tehfb-vfp"
diff --git a/meta/conf/machine/include/arm/arch-armv5.inc b/meta/conf/machine/include/arm/arch-armv5.inc
index e6ff902a95..f9068af9de 100644
--- a/meta/conf/machine/include/arm/arch-armv5.inc
+++ b/meta/conf/machine/include/arm/arch-armv5.inc
@@ -2,7 +2,7 @@ DEFAULTTUNE ?= "armv5"
TUNEVALID[armv5] = "Enable instructions for ARMv5"
TUNECONFLICTS[armv5] = "armv4"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}', '', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5t${ARMPKGSFX_DSP}', '', d)}"
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv5', 'armv5:', '' ,d)}"
require conf/machine/include/arm/arch-armv4.inc
@@ -14,7 +14,7 @@ ARMPKGARCH_tune-armv5 ?= "armv5"
ARMPKGARCH_tune-armv5t ?= "armv5"
TUNE_FEATURES_tune-armv5 = "arm armv5"
TUNE_FEATURES_tune-armv5t = "${TUNE_FEATURES_tune-armv5} thumb"
-PACKAGE_EXTRA_ARCHS_tune-armv5 = "${PACKAGE_EXTRA_ARCHS_tune-armv4} armv5"
+PACKAGE_EXTRA_ARCHS_tune-armv5 = "${PACKAGE_EXTRA_ARCHS_tune-armv4} armv5"
PACKAGE_EXTRA_ARCHS_tune-armv5t = "${PACKAGE_EXTRA_ARCHS_tune-armv4t} armv5 armv5t"
# Little Endian + VFP/DSP
@@ -23,11 +23,11 @@ ARMPKGARCH_tune-armv5-vfp ?= "armv5"
ARMPKGARCH_tune-armv5t-vfp ?= "armv5"
ARMPKGARCH_tune-armv5hf-vfp ?= "armv5"
ARMPKGARCH_tune-armv5thf-vfp ?= "armv5"
-TUNE_FEATURES_tune-armv5-vfp = "${TUNE_FEATURES_tune-armv5} vfp"
-TUNE_FEATURES_tune-armv5t-vfp = "${TUNE_FEATURES_tune-armv5t} vfp"
-TUNE_FEATURES_tune-armv5hf-vfp = "${TUNE_FEATURES_tune-armv5-vfp} callconvention-hard"
+TUNE_FEATURES_tune-armv5-vfp = "${TUNE_FEATURES_tune-armv5} vfp"
+TUNE_FEATURES_tune-armv5t-vfp = "${TUNE_FEATURES_tune-armv5t} vfp"
+TUNE_FEATURES_tune-armv5hf-vfp = "${TUNE_FEATURES_tune-armv5-vfp} callconvention-hard"
TUNE_FEATURES_tune-armv5thf-vfp = "${TUNE_FEATURES_tune-armv5t-vfp} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv5-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5} armv5-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5} armv5-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5t-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5t} armv5-vfp armv5t-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5hf-vfp = "armv5hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5thf-vfp = "armv5hf-vfp armv5thf-vfp"
@@ -36,9 +36,9 @@ PACKAGE_EXTRA_ARCHS_tune-armv5thf-vfp = "armv5hf-vfp armv5thf-vfp"
AVAILTUNES += "armv5b armv5tb"
ARMPKGARCH_tune-armv5b ?= "armv5"
ARMPKGARCH_tune-armv5tb ?= "armv5"
-TUNE_FEATURES_tune-armv5b = "${TUNE_FEATURES_tune-armv5} bigendian"
+TUNE_FEATURES_tune-armv5b = "${TUNE_FEATURES_tune-armv5} bigendian"
TUNE_FEATURES_tune-armv5tb = "${TUNE_FEATURES_tune-armv5t} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv5b = "${PACKAGE_EXTRA_ARCHS_tune-armv4b} armv5b"
+PACKAGE_EXTRA_ARCHS_tune-armv5b = "${PACKAGE_EXTRA_ARCHS_tune-armv4b} armv5b"
PACKAGE_EXTRA_ARCHS_tune-armv5tb = "${PACKAGE_EXTRA_ARCHS_tune-armv4tb} armv5b armv5tb"
# Big Endian + VFP/DSP
@@ -47,11 +47,11 @@ ARMPKGARCH_tune-armv5b-vfp ?= "armv5"
ARMPKGARCH_tune-armv5tb-vfp ?= "armv5"
ARMPKGARCH_tune-armv5hfb-vfp ?= "armv5"
ARMPKGARCH_tune-armv5thfb-vfp ?= "armv5"
-TUNE_FEATURES_tune-armv5b-vfp = "${TUNE_FEATURES_tune-armv5-vfp} bigendian"
-TUNE_FEATURES_tune-armv5tb-vfp = "${TUNE_FEATURES_tune-armv5t-vfp} bigendian"
-TUNE_FEATURES_tune-armv5hfb-vfp = "${TUNE_FEATURES_tune-armv5hf-vfp} bigendian"
+TUNE_FEATURES_tune-armv5b-vfp = "${TUNE_FEATURES_tune-armv5-vfp} bigendian"
+TUNE_FEATURES_tune-armv5tb-vfp = "${TUNE_FEATURES_tune-armv5t-vfp} bigendian"
+TUNE_FEATURES_tune-armv5hfb-vfp = "${TUNE_FEATURES_tune-armv5hf-vfp} bigendian"
TUNE_FEATURES_tune-armv5thfb-vfp = "${TUNE_FEATURES_tune-armv5thf-vfp} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv5b-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5b} armv5b-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5b-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5b} armv5b-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5tb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5tb} armv5b-vfp armv5tb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5hfb-vfp = "armv5hfb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv5thfb-vfp = "armv5hfb-vfp armv5thfb-vfp"
diff --git a/meta/conf/machine/include/arm/arch-armv6.inc b/meta/conf/machine/include/arm/arch-armv6.inc
index 4c93f2c7a9..6c838e999c 100644
--- a/meta/conf/machine/include/arm/arch-armv6.inc
+++ b/meta/conf/machine/include/arm/arch-armv6.inc
@@ -1,4 +1,4 @@
-DEFAULTTUNE ?= "armv6"
+DEFAULTTUNE ?= "armv6hf"
TUNEVALID[armv6] = "Enable instructions for ARMv6"
TUNECONFLICTS[armv6] = "armv4 armv5"
@@ -16,16 +16,16 @@ ARMPKGARCH_tune-armv6t ?= "armv6"
ARMPKGARCH_tune-armv6hf ?= "armv6"
ARMPKGARCH_tune-armv6thf ?= "armv6"
TUNE_FEATURES_tune-armv6-novfp = "arm armv6"
-TUNE_FEATURES_tune-armv6t-novfp = "${TUNE_FEATURES_tune-armv6-novfp} thumb"
-TUNE_FEATURES_tune-armv6 = "${TUNE_FEATURES_tune-armv6-novfp} vfp"
+TUNE_FEATURES_tune-armv6t-novfp = "${TUNE_FEATURES_tune-armv6-novfp} thumb"
+TUNE_FEATURES_tune-armv6 = "${TUNE_FEATURES_tune-armv6-novfp} vfp"
TUNE_FEATURES_tune-armv6t = "${TUNE_FEATURES_tune-armv6t-novfp} vfp"
-TUNE_FEATURES_tune-armv6hf = "${TUNE_FEATURES_tune-armv6} callconvention-hard"
-TUNE_FEATURES_tune-armv6thf = "${TUNE_FEATURES_tune-armv6t} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv6-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5e} armv6"
+TUNE_FEATURES_tune-armv6hf = "${TUNE_FEATURES_tune-armv6} callconvention-hard"
+TUNE_FEATURES_tune-armv6thf = "${TUNE_FEATURES_tune-armv6t} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-armv6-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5e} armv6"
PACKAGE_EXTRA_ARCHS_tune-armv6t-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5te} armv6 armv6t"
-PACKAGE_EXTRA_ARCHS_tune-armv6 = "${PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp} armv6 armv6-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6 = "${PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp} armv6 armv6-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv6t = "${PACKAGE_EXTRA_ARCHS_tune-armv5te-vfp} armv6 armv6t armv6-vfp armv6t-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv6hf = "${PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp} armv6hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6hf = "${PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp} armv6hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv6thf = "${PACKAGE_EXTRA_ARCHS_tune-armv5tehf-vfp} armv6hf-vfp armv6thf-vfp"
# Big Endian
@@ -36,15 +36,15 @@ ARMPKGARCH_tune-armv6b ?= "armv6"
ARMPKGARCH_tune-armv6tb ?= "armv6"
ARMPKGARCH_tune-armv6hfb ?= "armv6"
ARMPKGARCH_tune-armv6thfb ?= "armv6"
-TUNE_FEATURES_tune-armv6b-novfp = "${TUNE_FEATURES_tune-armv6-novfp} bigendian"
+TUNE_FEATURES_tune-armv6b-novfp = "${TUNE_FEATURES_tune-armv6-novfp} bigendian"
TUNE_FEATURES_tune-armv6tb-novfp = "${TUNE_FEATURES_tune-armv6t-novfp} bigendian"
-TUNE_FEATURES_tune-armv6b = "${TUNE_FEATURES_tune-armv6} bigendian"
-TUNE_FEATURES_tune-armv6tb = "${TUNE_FEATURES_tune-armv6t} bigendian"
-TUNE_FEATURES_tune-armv6hfb = "${TUNE_FEATURES_tune-armv6hf} bigendian"
-TUNE_FEATURES_tune-armv6thfb = "${TUNE_FEATURES_tune-armv6thf} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv6b-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5eb} armv6b"
+TUNE_FEATURES_tune-armv6b = "${TUNE_FEATURES_tune-armv6} bigendian"
+TUNE_FEATURES_tune-armv6tb = "${TUNE_FEATURES_tune-armv6t} bigendian"
+TUNE_FEATURES_tune-armv6hfb = "${TUNE_FEATURES_tune-armv6hf} bigendian"
+TUNE_FEATURES_tune-armv6thfb = "${TUNE_FEATURES_tune-armv6thf} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv6b-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5eb} armv6b"
PACKAGE_EXTRA_ARCHS_tune-armv6tb-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5teb} armv6b armv6tb"
-PACKAGE_EXTRA_ARCHS_tune-armv6b = "${PACKAGE_EXTRA_ARCHS_tune-armv5eb-vfp} armv6b armv6b-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6b = "${PACKAGE_EXTRA_ARCHS_tune-armv5eb-vfp} armv6b armv6b-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv6tb = "${PACKAGE_EXTRA_ARCHS_tune-armv5teb-vfp} armv6b armv6tb armv6b-vfp armv6tb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv6hfb = "${PACKAGE_EXTRA_ARCHS_tune-armv5ehfb-vfp} armv6hfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6hfb = "${PACKAGE_EXTRA_ARCHS_tune-armv5ehfb-vfp} armv6hfb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv6thfb = "${PACKAGE_EXTRA_ARCHS_tune-armv5tehfb-vfp} armv6hfb-vfp armv6thfb-vfp"
diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc b/meta/conf/machine/include/arm/arch-armv7a.inc
index 1f2e071d57..199e63f98a 100644
--- a/meta/conf/machine/include/arm/arch-armv7a.inc
+++ b/meta/conf/machine/include/arm/arch-armv7a.inc
@@ -1,4 +1,5 @@
-DEFAULTTUNE ?= "armv7a"
+DEFAULTTUNE ?= "armv7athf"
+ARM_INSTRUCTION_SET ?= "thumb"
TUNEVALID[armv7a] = "Enable instructions for ARMv7-a"
TUNECONFLICTS[armv7a] = "armv4 armv5 armv6 armv7"
@@ -9,133 +10,157 @@ require conf/machine/include/arm/arch-armv6.inc
require conf/machine/include/arm/feature-arm-neon.inc
# Little Endian base configs
-AVAILTUNES += "armv7a armv7at armv7a-vfpv3d16 armv7at-vfpv3d16 armv7a-vfpv3 armv7at-vfpv3 armv7a-neon armv7at-neon armv7a-neon-vfpv4 armv7at-neon-vfpv4"
+AVAILTUNES += "armv7a armv7at armv7a-vfpv3d16 armv7at-vfpv3d16 armv7a-vfpv3 armv7at-vfpv3 armv7a-vfpv4d16 armv7at-vfpv4d16 armv7a-neon armv7at-neon armv7a-neon-vfpv4 armv7at-neon-vfpv4"
ARMPKGARCH_tune-armv7a ?= "armv7a"
ARMPKGARCH_tune-armv7at ?= "armv7a"
ARMPKGARCH_tune-armv7a-vfpv3d16 ?= "armv7a"
ARMPKGARCH_tune-armv7at-vfpv3d16 ?= "armv7a"
ARMPKGARCH_tune-armv7a-vfpv3 ?= "armv7a"
ARMPKGARCH_tune-armv7at-vfpv3 ?= "armv7a"
+ARMPKGARCH_tune-armv7a-vfpv4d16 ?= "armv7a"
+ARMPKGARCH_tune-armv7at-vfpv4d16 ?= "armv7a"
ARMPKGARCH_tune-armv7a-neon ?= "armv7a"
ARMPKGARCH_tune-armv7at-neon ?= "armv7a"
ARMPKGARCH_tune-armv7a-neon-vfpv4 ?= "armv7a"
ARMPKGARCH_tune-armv7at-neon-vfpv4 ?= "armv7a"
TUNE_FEATURES_tune-armv7a = "arm armv7a vfp"
TUNE_FEATURES_tune-armv7at = "${TUNE_FEATURES_tune-armv7a} thumb"
-TUNE_FEATURES_tune-armv7a-vfpv3d16 = "${TUNE_FEATURES_tune-armv7a} vfpv3d16"
+TUNE_FEATURES_tune-armv7a-vfpv3d16 = "${TUNE_FEATURES_tune-armv7a} vfpv3d16"
TUNE_FEATURES_tune-armv7at-vfpv3d16 = "${TUNE_FEATURES_tune-armv7at} vfpv3d16"
-TUNE_FEATURES_tune-armv7a-vfpv3 = "${TUNE_FEATURES_tune-armv7a-vfpv3d16} vfpv3"
+TUNE_FEATURES_tune-armv7a-vfpv3 = "${TUNE_FEATURES_tune-armv7a-vfpv3d16} vfpv3"
TUNE_FEATURES_tune-armv7at-vfpv3 = "${TUNE_FEATURES_tune-armv7at-vfpv3d16} vfpv3"
-TUNE_FEATURES_tune-armv7a-neon = "${TUNE_FEATURES_tune-armv7a} neon"
+TUNE_FEATURES_tune-armv7a-vfpv4d16 = "${TUNE_FEATURES_tune-armv7a} vfpv4d16"
+TUNE_FEATURES_tune-armv7at-vfpv4d16 = "${TUNE_FEATURES_tune-armv7at} vfpv4d16"
+TUNE_FEATURES_tune-armv7a-neon = "${TUNE_FEATURES_tune-armv7a} neon"
TUNE_FEATURES_tune-armv7at-neon = "${TUNE_FEATURES_tune-armv7at} neon"
-TUNE_FEATURES_tune-armv7a-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7a-neon} vfpv4"
+TUNE_FEATURES_tune-armv7a-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7a-neon} vfpv4"
TUNE_FEATURES_tune-armv7at-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon} vfpv4"
-PACKAGE_EXTRA_ARCHS_tune-armv7a = "${PACKAGE_EXTRA_ARCHS_tune-armv6} armv7a armv7a-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7a = "${PACKAGE_EXTRA_ARCHS_tune-armv6} armv7a armv7a-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7at = "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7a armv7a-vfp armv7at2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7a-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7a-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfpv3d16 armv7at2-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16} armv7a-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16} armv7a-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16} armv7a-vfpv3 armv7at2-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7a-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7a-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7a-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfpv4d16 armv7at2-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7a-neon"
PACKAGE_EXTRA_ARCHS_tune-armv7at-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-neon armv7at2-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7a-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} armv7a-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} armv7a-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-armv7at-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} armv7a-neon-vfpv4 armv7at2-neon-vfpv4"
# HF Tunes
-AVAILTUNES += "armv7ahf armv7athf armv7ahf-vfpv3d16 armv7athf-vfpv3d16 armv7ahf-vfpv3 armv7athf-vfpv3 armv7ahf-neon armv7athf-neon armv7ahf-neon-vfpv4 armv7athf-neon-vfpv4"
+AVAILTUNES += "armv7ahf armv7athf armv7ahf-vfpv3d16 armv7athf-vfpv3d16 armv7ahf-vfpv3 armv7athf-vfpv3 armv7ahf-vfpv4d16 armv7athf-vfpv4d16 armv7ahf-neon armv7athf-neon armv7ahf-neon-vfpv4 armv7athf-neon-vfpv4"
ARMPKGARCH_tune-armv7ahf ?= "armv7a"
ARMPKGARCH_tune-armv7athf ?= "armv7a"
ARMPKGARCH_tune-armv7ahf-vfpv3d16 ?= "armv7a"
ARMPKGARCH_tune-armv7athf-vfpv3d16 ?= "armv7a"
ARMPKGARCH_tune-armv7ahf-vfpv3 ?= "armv7a"
ARMPKGARCH_tune-armv7athf-vfpv3 ?= "armv7a"
+ARMPKGARCH_tune-armv7ahf-vfpv4d16 ?= "armv7a"
+ARMPKGARCH_tune-armv7athf-vfpv4d16 ?= "armv7a"
ARMPKGARCH_tune-armv7ahf-neon ?= "armv7a"
ARMPKGARCH_tune-armv7athf-neon ?= "armv7a"
ARMPKGARCH_tune-armv7ahf-neon-vfpv4 ?= "armv7a"
ARMPKGARCH_tune-armv7athf-neon-vfpv4 ?= "armv7a"
-TUNE_FEATURES_tune-armv7ahf = "${TUNE_FEATURES_tune-armv7a} callconvention-hard"
-TUNE_FEATURES_tune-armv7athf = "${TUNE_FEATURES_tune-armv7at} callconvention-hard"
-TUNE_FEATURES_tune-armv7ahf-vfpv3d16 = "${TUNE_FEATURES_tune-armv7a-vfpv3d16} callconvention-hard"
-TUNE_FEATURES_tune-armv7athf-vfpv3d16 = "${TUNE_FEATURES_tune-armv7at-vfpv3d16} callconvention-hard"
-TUNE_FEATURES_tune-armv7ahf-vfpv3 = "${TUNE_FEATURES_tune-armv7a-vfpv3} callconvention-hard"
-TUNE_FEATURES_tune-armv7athf-vfpv3 = "${TUNE_FEATURES_tune-armv7at-vfpv3} callconvention-hard"
-TUNE_FEATURES_tune-armv7ahf-neon = "${TUNE_FEATURES_tune-armv7a-neon} callconvention-hard"
-TUNE_FEATURES_tune-armv7athf-neon = "${TUNE_FEATURES_tune-armv7at-neon} callconvention-hard"
-TUNE_FEATURES_tune-armv7ahf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7a-neon-vfpv4} callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf = "${TUNE_FEATURES_tune-armv7a} callconvention-hard"
+TUNE_FEATURES_tune-armv7athf = "${TUNE_FEATURES_tune-armv7at} callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-vfpv3d16 = "${TUNE_FEATURES_tune-armv7a-vfpv3d16} callconvention-hard"
+TUNE_FEATURES_tune-armv7athf-vfpv3d16 = "${TUNE_FEATURES_tune-armv7at-vfpv3d16} callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-vfpv3 = "${TUNE_FEATURES_tune-armv7a-vfpv3} callconvention-hard"
+TUNE_FEATURES_tune-armv7athf-vfpv3 = "${TUNE_FEATURES_tune-armv7at-vfpv3} callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-vfpv4d16 = "${TUNE_FEATURES_tune-armv7a-vfpv4d16} callconvention-hard"
+TUNE_FEATURES_tune-armv7athf-vfpv4d16 = "${TUNE_FEATURES_tune-armv7at-vfpv4d16} callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-neon = "${TUNE_FEATURES_tune-armv7a-neon} callconvention-hard"
+TUNE_FEATURES_tune-armv7athf-neon = "${TUNE_FEATURES_tune-armv7at-neon} callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7a-neon-vfpv4} callconvention-hard"
TUNE_FEATURES_tune-armv7athf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon-vfpv4} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} armv7ahf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} armv7ahf-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7athf = "${PACKAGE_EXTRA_ARCHS_tune-armv6thf} armv7ahf-vfp armv7at2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-vfpv3d16 armv7at2hf-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3d16} armv7ahf-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3d16} armv7ahf-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3d16} armv7ahf-vfpv3 armv7at2hf-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-vfpv4d16 armv7at2hf-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-neon"
PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-neon armv7at2hf-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} armv7ahf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} armv7ahf-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} armv7ahf-neon-vfpv4 armv7at2hf-neon-vfpv4"
# Big Endian
-AVAILTUNES += "armv7ab armv7atb armv7ab-vfpv3d16 armv7atb-vfpv3d16 armv7ab-vfpv3 armv7atb-vfpv3 armv7ab-neon armv7atb-neon armv7ab-neon-vfpv4 armv7atb-neon-vfpv4"
+AVAILTUNES += "armv7ab armv7atb armv7ab-vfpv3d16 armv7atb-vfpv3d16 armv7ab-vfpv3 armv7atb-vfpv3 armv7ab-vfpv4d16 armv7atb-vfpv4d16 armv7ab-neon armv7atb-neon armv7ab-neon-vfpv4 armv7atb-neon-vfpv4"
ARMPKGARCH_tune-armv7ab ?= "armv7a"
ARMPKGARCH_tune-armv7atb ?= "armv7a"
ARMPKGARCH_tune-armv7ab-vfpv3d16 ?= "armv7a"
ARMPKGARCH_tune-armv7atb-vfpv3d16 ?= "armv7a"
ARMPKGARCH_tune-armv7ab-vfpv3 ?= "armv7a"
ARMPKGARCH_tune-armv7atb-vfpv3 ?= "armv7a"
+ARMPKGARCH_tune-armv7ab-vfpv4d16 ?= "armv7a"
+ARMPKGARCH_tune-armv7atb-vfpv4d16 ?= "armv7a"
ARMPKGARCH_tune-armv7ab-neon ?= "armv7a"
ARMPKGARCH_tune-armv7atb-neon ?= "armv7a"
ARMPKGARCH_tune-armv7ab-neon-vfpv4 ?= "armv7a"
ARMPKGARCH_tune-armv7atb-neon-vfpv4 ?= "armv7a"
-TUNE_FEATURES_tune-armv7ab = "${TUNE_FEATURES_tune-armv7a} bigendian"
-TUNE_FEATURES_tune-armv7atb = "${TUNE_FEATURES_tune-armv7at} bigendian"
-TUNE_FEATURES_tune-armv7ab-vfpv3d16 = "${TUNE_FEATURES_tune-armv7a-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7atb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7at-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7ab-vfpv3 = "${TUNE_FEATURES_tune-armv7a-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7atb-vfpv3 = "${TUNE_FEATURES_tune-armv7at-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7ab-neon = "${TUNE_FEATURES_tune-armv7a-neon} bigendian"
-TUNE_FEATURES_tune-armv7atb-neon = "${TUNE_FEATURES_tune-armv7at-neon} bigendian"
-TUNE_FEATURES_tune-armv7ab-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7a-neon-vfpv4} bigendian"
+TUNE_FEATURES_tune-armv7ab = "${TUNE_FEATURES_tune-armv7a} bigendian"
+TUNE_FEATURES_tune-armv7atb = "${TUNE_FEATURES_tune-armv7at} bigendian"
+TUNE_FEATURES_tune-armv7ab-vfpv3d16 = "${TUNE_FEATURES_tune-armv7a-vfpv3d16} bigendian"
+TUNE_FEATURES_tune-armv7atb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7at-vfpv3d16} bigendian"
+TUNE_FEATURES_tune-armv7ab-vfpv3 = "${TUNE_FEATURES_tune-armv7a-vfpv3} bigendian"
+TUNE_FEATURES_tune-armv7atb-vfpv3 = "${TUNE_FEATURES_tune-armv7at-vfpv3} bigendian"
+TUNE_FEATURES_tune-armv7ab-vfpv4d16 = "${TUNE_FEATURES_tune-armv7a-vfpv4d16} bigendian"
+TUNE_FEATURES_tune-armv7atb-vfpv4d16 = "${TUNE_FEATURES_tune-armv7at-vfpv4d16} bigendian"
+TUNE_FEATURES_tune-armv7ab-neon = "${TUNE_FEATURES_tune-armv7a-neon} bigendian"
+TUNE_FEATURES_tune-armv7atb-neon = "${TUNE_FEATURES_tune-armv7at-neon} bigendian"
+TUNE_FEATURES_tune-armv7ab-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7a-neon-vfpv4} bigendian"
TUNE_FEATURES_tune-armv7atb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon-vfpv4} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab = "${PACKAGE_EXTRA_ARCHS_tune-armv6b} armv7ab-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab = "${PACKAGE_EXTRA_ARCHS_tune-armv6b} armv7ab-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7atb = "${PACKAGE_EXTRA_ARCHS_tune-armv6tb} armv7ab-vfp armv7at2b-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7ab-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7ab-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb} armv7ab-vfpv3d16 armv7at2b-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16} armv7ab-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16} armv7ab-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfpv3d16} armv7ab-vfpv3 armv7at2b-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7ab-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7ab-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfp43d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb} armv7ab-vfpv4d16 armv7at2b-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7ab-neon"
PACKAGE_EXTRA_ARCHS_tune-armv7atb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb} armv7ab-neon armv7at2b-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon} armv7ab-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon} armv7ab-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-armv7atb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb-neon} armv7ab-neon-vfpv4 armv7at2b-neon-vfpv4"
# Big Endian + HF
-AVAILTUNES += "armv7ahfb armv7athfb armv7ahfb-vfpv3d16 armv7athfb-vfpv3d16 armv7ahfb-vfpv3 armv7athfb-vfpv3 armv7ahfb-neon armv7athfb-neon armv7ahfb-neon-vfpv4 armv7athfb-neon-vfpv4"
+AVAILTUNES += "armv7ahfb armv7athfb armv7ahfb-vfpv3d16 armv7athfb-vfpv3d16 armv7ahfb-vfpv3 armv7athfb-vfpv3 armv7ahfb-vfpv4d16 armv7athfb-vfpv4d16 armv7ahfb-neon armv7athfb-neon armv7ahfb-neon-vfpv4 armv7athfb-neon-vfpv4"
ARMPKGARCH_tune-armv7ahfb ?= "armv7a"
ARMPKGARCH_tune-armv7athfb ?= "armv7a"
ARMPKGARCH_tune-armv7ahfb-vfpv3d16 ?= "armv7a"
ARMPKGARCH_tune-armv7athfb-vfpv3d16 ?= "armv7a"
ARMPKGARCH_tune-armv7ahfb-vfpv3 ?= "armv7a"
ARMPKGARCH_tune-armv7athfb-vfpv3 ?= "armv7a"
+ARMPKGARCH_tune-armv7ahfb-vfpv4d16 ?= "armv7a"
+ARMPKGARCH_tune-armv7athfb-vfpv4d16 ?= "armv7a"
ARMPKGARCH_tune-armv7ahfb-neon ?= "armv7a"
ARMPKGARCH_tune-armv7athfb-neon ?= "armv7a"
ARMPKGARCH_tune-armv7ahfb-neon-vfpv4 ?= "armv7a"
ARMPKGARCH_tune-armv7athfb-neon-vfpv4 ?= "armv7a"
-TUNE_FEATURES_tune-armv7ahfb = "${TUNE_FEATURES_tune-armv7ahf} bigendian"
-TUNE_FEATURES_tune-armv7athfb = "${TUNE_FEATURES_tune-armv7athf} bigendian"
-TUNE_FEATURES_tune-armv7ahfb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7ahf-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7athfb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7athf-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7ahfb-vfpv3 = "${TUNE_FEATURES_tune-armv7ahf-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7athfb-vfpv3 = "${TUNE_FEATURES_tune-armv7athf-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7ahfb-neon = "${TUNE_FEATURES_tune-armv7ahf-neon} bigendian"
-TUNE_FEATURES_tune-armv7athfb-neon = "${TUNE_FEATURES_tune-armv7athf-neon} bigendian"
-TUNE_FEATURES_tune-armv7ahfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ahf-neon-vfpv4} bigendian"
+TUNE_FEATURES_tune-armv7ahfb = "${TUNE_FEATURES_tune-armv7ahf} bigendian"
+TUNE_FEATURES_tune-armv7athfb = "${TUNE_FEATURES_tune-armv7athf} bigendian"
+TUNE_FEATURES_tune-armv7ahfb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7ahf-vfpv3d16} bigendian"
+TUNE_FEATURES_tune-armv7athfb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7athf-vfpv3d16} bigendian"
+TUNE_FEATURES_tune-armv7ahfb-vfpv3 = "${TUNE_FEATURES_tune-armv7ahf-vfpv3} bigendian"
+TUNE_FEATURES_tune-armv7athfb-vfpv3 = "${TUNE_FEATURES_tune-armv7athf-vfpv3} bigendian"
+TUNE_FEATURES_tune-armv7ahfb-vfpv4d16 = "${TUNE_FEATURES_tune-armv7ahf-vfpv4d16} bigendian"
+TUNE_FEATURES_tune-armv7athfb-vfpv4d16 = "${TUNE_FEATURES_tune-armv7athf-vfpv4d16} bigendian"
+TUNE_FEATURES_tune-armv7ahfb-neon = "${TUNE_FEATURES_tune-armv7ahf-neon} bigendian"
+TUNE_FEATURES_tune-armv7athfb-neon = "${TUNE_FEATURES_tune-armv7athf-neon} bigendian"
+TUNE_FEATURES_tune-armv7ahfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ahf-neon-vfpv4} bigendian"
TUNE_FEATURES_tune-armv7athfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7athf-neon-vfpv4} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6hfb} armv7ahfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6hfb} armv7ahfb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7athfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6thfb} armv7ahfb-vfp armv7at2hfb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7ahfb-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7ahfb-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7ahfb-vfpv3d16 armv7at2hfb-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3d16} armv7ahfb-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3d16} armv7ahfb-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3d16} armv7ahfb-vfpv3 armv7at2hfb-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7ahfb-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7ahfb-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7ahfb-vfpv4d16 armv7at2hfb-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7ahfb-neon"
PACKAGE_EXTRA_ARCHS_tune-armv7athfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7ahfb-neon armv7at2hfb-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon} armv7ahfb-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon} armv7ahfb-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-armv7athfb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb-neon} armv7ahfb-neon-vfpv4 armv7at2hfb-neon-vfpv4"
diff --git a/meta/conf/machine/include/arm/arch-armv7ve.inc b/meta/conf/machine/include/arm/arch-armv7ve.inc
index e13156c178..fc172d0cb0 100644
--- a/meta/conf/machine/include/arm/arch-armv7ve.inc
+++ b/meta/conf/machine/include/arm/arch-armv7ve.inc
@@ -1,4 +1,4 @@
-DEFAULTTUNE ?= "armv7ve"
+DEFAULTTUNE ?= "armv7vethf"
TUNEVALID[armv7ve] = "Enable instructions for ARMv7ve"
TUNECONFLICTS[armv7ve] = "armv4 armv5 armv6 armv7 armv7a"
@@ -8,133 +8,157 @@ MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', 'armv7ve:'
require conf/machine/include/arm/arch-armv7a.inc
# Little Endian base configs
-AVAILTUNES += "armv7ve armv7vet armv7ve-vfpv3d16 armv7vet-vfpv3d16 armv7ve-vfpv3 armv7vet-vfpv3 armv7ve-neon armv7vet-neon armv7ve-neon-vfpv4 armv7vet-neon-vfpv4"
+AVAILTUNES += "armv7ve armv7vet armv7ve-vfpv3d16 armv7vet-vfpv3d16 armv7ve-vfpv3 armv7vet-vfpv3 armv7ve-vfpv4d16 armv7vet-vfpv4d16 armv7ve-neon armv7vet-neon armv7ve-neon-vfpv4 armv7vet-neon-vfpv4"
ARMPKGARCH_tune-armv7ve ?= "armv7ve"
ARMPKGARCH_tune-armv7vet ?= "armv7ve"
ARMPKGARCH_tune-armv7ve-vfpv3d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7vet-vfpv3d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7ve-vfpv3 ?= "armv7ve"
ARMPKGARCH_tune-armv7vet-vfpv3 ?= "armv7ve"
+ARMPKGARCH_tune-armv7ve-vfpv4d16 ?= "armv7ve"
+ARMPKGARCH_tune-armv7vet-vfpv4d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7ve-neon ?= "armv7ve"
ARMPKGARCH_tune-armv7vet-neon ?= "armv7ve"
ARMPKGARCH_tune-armv7ve-neon-vfpv4 ?= "armv7ve"
ARMPKGARCH_tune-armv7vet-neon-vfpv4 ?= "armv7ve"
TUNE_FEATURES_tune-armv7ve = "arm armv7ve vfp"
TUNE_FEATURES_tune-armv7vet = "${TUNE_FEATURES_tune-armv7ve} thumb"
-TUNE_FEATURES_tune-armv7ve-vfpv3d16 = "${TUNE_FEATURES_tune-armv7ve} vfpv3d16"
+TUNE_FEATURES_tune-armv7ve-vfpv3d16 = "${TUNE_FEATURES_tune-armv7ve} vfpv3d16"
TUNE_FEATURES_tune-armv7vet-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vet} vfpv3d16"
-TUNE_FEATURES_tune-armv7ve-vfpv3 = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16} vfpv3"
+TUNE_FEATURES_tune-armv7ve-vfpv3 = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16} vfpv3"
TUNE_FEATURES_tune-armv7vet-vfpv3 = "${TUNE_FEATURES_tune-armv7vet-vfpv3d16} vfpv3"
-TUNE_FEATURES_tune-armv7ve-neon = "${TUNE_FEATURES_tune-armv7ve} neon"
+TUNE_FEATURES_tune-armv7ve-vfpv4d16 = "${TUNE_FEATURES_tune-armv7ve} vfpv4d16"
+TUNE_FEATURES_tune-armv7vet-vfpv4d16 = "${TUNE_FEATURES_tune-armv7vet} vfpv4d16"
+TUNE_FEATURES_tune-armv7ve-neon = "${TUNE_FEATURES_tune-armv7ve} neon"
TUNE_FEATURES_tune-armv7vet-neon = "${TUNE_FEATURES_tune-armv7vet} neon"
-TUNE_FEATURES_tune-armv7ve-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon} vfpv4"
+TUNE_FEATURES_tune-armv7ve-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon} vfpv4"
TUNE_FEATURES_tune-armv7vet-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon} vfpv4"
-PACKAGE_EXTRA_ARCHS_tune-armv7ve = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7ve armv7ve-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7ve armv7ve-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7vet = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7ve armv7ve-vfp armv7vet2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} armv7ve-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} armv7ve-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vet-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} armv7ve-vfpv3d16 armv7vet2-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3d16} armv7ve-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3d16} armv7ve-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-armv7vet-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-vfpv3d16} armv7ve-vfpv3 armv7vet2-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} armv7ve-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} armv7ve-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vet-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} armv7ve-vfpv4d16 armv7vet2-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} armv7ve-neon"
PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} armv7ve-neon armv7vet2-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} armv7ve-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} armv7ve-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon} armv7ve-neon-vfpv4 armv7vet2-neon-vfpv4"
# HF Tunes
-AVAILTUNES += "armv7vehf armv7vethf armv7vehf-vfpv3d16 armv7vethf-vfpv3d16 armv7vehf-vfpv3 armv7vethf-vfpv3 armv7vehf-neon armv7vethf-neon armv7vehf-neon-vfpv4 armv7vethf-neon-vfpv4"
+AVAILTUNES += "armv7vehf armv7vethf armv7vehf-vfpv3d16 armv7vethf-vfpv3d16 armv7vehf-vfpv3 armv7vethf-vfpv3 armv7vehf-vfpv4d16 armv7vethf-vfpv4d16 armv7vehf-neon armv7vethf-neon armv7vehf-neon-vfpv4 armv7vethf-neon-vfpv4"
ARMPKGARCH_tune-armv7vehf ?= "armv7ve"
ARMPKGARCH_tune-armv7vethf ?= "armv7ve"
ARMPKGARCH_tune-armv7vehf-vfpv3d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7vethf-vfpv3d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7vehf-vfpv3 ?= "armv7ve"
ARMPKGARCH_tune-armv7vethf-vfpv3 ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehf-vfpv4d16 ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethf-vfpv4d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7vehf-neon ?= "armv7ve"
ARMPKGARCH_tune-armv7vethf-neon ?= "armv7ve"
ARMPKGARCH_tune-armv7vehf-neon-vfpv4 ?= "armv7ve"
ARMPKGARCH_tune-armv7vethf-neon-vfpv4 ?= "armv7ve"
-TUNE_FEATURES_tune-armv7vehf = "${TUNE_FEATURES_tune-armv7ve} callconvention-hard"
-TUNE_FEATURES_tune-armv7vethf = "${TUNE_FEATURES_tune-armv7vet} callconvention-hard"
-TUNE_FEATURES_tune-armv7vehf-vfpv3d16 = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16} callconvention-hard"
-TUNE_FEATURES_tune-armv7vethf-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vet-vfpv3d16} callconvention-hard"
-TUNE_FEATURES_tune-armv7vehf-vfpv3 = "${TUNE_FEATURES_tune-armv7ve-vfpv3} callconvention-hard"
-TUNE_FEATURES_tune-armv7vethf-vfpv3 = "${TUNE_FEATURES_tune-armv7vet-vfpv3} callconvention-hard"
-TUNE_FEATURES_tune-armv7vehf-neon = "${TUNE_FEATURES_tune-armv7ve-neon} callconvention-hard"
-TUNE_FEATURES_tune-armv7vethf-neon = "${TUNE_FEATURES_tune-armv7vet-neon} callconvention-hard"
-TUNE_FEATURES_tune-armv7vehf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf = "${TUNE_FEATURES_tune-armv7ve} callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf = "${TUNE_FEATURES_tune-armv7vet} callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-vfpv3d16 = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16} callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vet-vfpv3d16} callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-vfpv3 = "${TUNE_FEATURES_tune-armv7ve-vfpv3} callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf-vfpv3 = "${TUNE_FEATURES_tune-armv7vet-vfpv3} callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-vfpv4d16 = "${TUNE_FEATURES_tune-armv7ve-vfpv4d16} callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf-vfpv4d16 = "${TUNE_FEATURES_tune-armv7vet-vfpv4d16} callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-neon = "${TUNE_FEATURES_tune-armv7ve-neon} callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf-neon = "${TUNE_FEATURES_tune-armv7vet-neon} callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} callconvention-hard"
TUNE_FEATURES_tune-armv7vethf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7vehf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7vehf-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7vethf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7vehf-vfp armv7vet2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} armv7vehf-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} armv7vehf-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vethf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} armv7vehf-vfpv3d16 armv7vet2hf-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3d16} armv7vehf-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3d16} armv7vehf-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-armv7vethf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-vfpv3d16} armv7vehf-vfpv3 armv7vet2hf-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} armv7vehf-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} armv7vehf-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethf-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} armv7vehf-vfpv4d16 armv7vet2hf-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} armv7vehf-neon"
PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} armv7vehf-neon armv7vet2hf-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} armv7vehf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} armv7vehf-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon} armv7vehf-neon-vfpv4 armv7vet2hf-neon-vfpv4"
# Big Endian
-AVAILTUNES += "armv7veb armv7vetb armv7veb-vfpv3d16 armv7vetb-vfpv3d16 armv7veb-vfpv3 armv7vetb-vfpv3 armv7veb-neon armv7vetb-neon armv7veb-neon-vfpv4 armv7vetb-neon-vfpv4"
+AVAILTUNES += "armv7veb armv7vetb armv7veb-vfpv3d16 armv7vetb-vfpv3d16 armv7veb-vfpv3 armv7vetb-vfpv3 armv7veb-vfpv4d16 armv7vetb-vfpv4d16 armv7veb-neon armv7vetb-neon armv7veb-neon-vfpv4 armv7vetb-neon-vfpv4"
ARMPKGARCH_tune-armv7veb ?= "armv7ve"
ARMPKGARCH_tune-armv7vetb ?= "armv7ve"
ARMPKGARCH_tune-armv7veb-vfpv3d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7vetb-vfpv3d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7veb-vfpv3 ?= "armv7ve"
ARMPKGARCH_tune-armv7vetb-vfpv3 ?= "armv7ve"
+ARMPKGARCH_tune-armv7veb-vfpv4d16 ?= "armv7ve"
+ARMPKGARCH_tune-armv7vetb-vfpv4d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7veb-neon ?= "armv7ve"
ARMPKGARCH_tune-armv7vetb-neon ?= "armv7ve"
ARMPKGARCH_tune-armv7veb-neon-vfpv4 ?= "armv7ve"
ARMPKGARCH_tune-armv7vetb-neon-vfpv4 ?= "armv7ve"
-TUNE_FEATURES_tune-armv7veb = "${TUNE_FEATURES_tune-armv7ve} bigendian"
-TUNE_FEATURES_tune-armv7vetb = "${TUNE_FEATURES_tune-armv7vet} bigendian"
-TUNE_FEATURES_tune-armv7veb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7vetb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vet-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7veb-vfpv3 = "${TUNE_FEATURES_tune-armv7ve-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7vetb-vfpv3 = "${TUNE_FEATURES_tune-armv7vet-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7veb-neon = "${TUNE_FEATURES_tune-armv7ve-neon} bigendian"
-TUNE_FEATURES_tune-armv7vetb-neon = "${TUNE_FEATURES_tune-armv7vet-neon} bigendian"
-TUNE_FEATURES_tune-armv7veb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} bigendian"
+TUNE_FEATURES_tune-armv7veb = "${TUNE_FEATURES_tune-armv7ve} bigendian"
+TUNE_FEATURES_tune-armv7vetb = "${TUNE_FEATURES_tune-armv7vet} bigendian"
+TUNE_FEATURES_tune-armv7veb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16} bigendian"
+TUNE_FEATURES_tune-armv7vetb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vet-vfpv3d16} bigendian"
+TUNE_FEATURES_tune-armv7veb-vfpv3 = "${TUNE_FEATURES_tune-armv7ve-vfpv3} bigendian"
+TUNE_FEATURES_tune-armv7vetb-vfpv3 = "${TUNE_FEATURES_tune-armv7vet-vfpv3} bigendian"
+TUNE_FEATURES_tune-armv7veb-vfpv4d16 = "${TUNE_FEATURES_tune-armv7ve-vfpv4d16} bigendian"
+TUNE_FEATURES_tune-armv7vetb-vfpv4d16 = "${TUNE_FEATURES_tune-armv7vet-vfpv4d16} bigendian"
+TUNE_FEATURES_tune-armv7veb-neon = "${TUNE_FEATURES_tune-armv7ve-neon} bigendian"
+TUNE_FEATURES_tune-armv7vetb-neon = "${TUNE_FEATURES_tune-armv7vet-neon} bigendian"
+TUNE_FEATURES_tune-armv7veb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} bigendian"
TUNE_FEATURES_tune-armv7vetb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv7veb = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7veb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7veb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7vetb = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb} armv7veb-vfp armv7vet2b-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb} armv7veb-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb} armv7veb-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vetb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb} armv7veb-vfpv3d16 armv7vet2b-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3d16} armv7veb-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3d16} armv7veb-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-armv7vetb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb-vfpv3d16} armv7veb-vfpv3 armv7vet2b-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb} armv7veb-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb} armv7veb-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vetb-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb} armv7veb-vfpv4d16 armv7vet2b-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb} armv7veb-neon"
PACKAGE_EXTRA_ARCHS_tune-armv7vetb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb} armv7veb-neon armv7vet2b-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon} armv7veb-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon} armv7veb-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-armv7vetb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb-neon} armv7veb-neon-vfpv4 armv7vet2b-neon-vfpv4"
# Big Endian + HF
-AVAILTUNES += "armv7vehfb armv7vethfb armv7vehfb-vfpv3d16 armv7vethfb-vfpv3d16 armv7vehfb-vfpv3 armv7vethfb-vfpv3 armv7vehfb-neon armv7vethfb-neon armv7vehfb-neon-vfpv4 armv7vethfb-neon-vfpv4"
+AVAILTUNES += "armv7vehfb armv7vethfb armv7vehfb-vfpv3d16 armv7vethfb-vfpv3d16 armv7vehfb-vfpv3 armv7vethfb-vfpv3 armv7vehfb-vfpv4d16 armv7vethfb-vfpv4d16 armv7vehfb-neon armv7vethfb-neon armv7vehfb-neon-vfpv4 armv7vethfb-neon-vfpv4"
ARMPKGARCH_tune-armv7vehfb ?= "armv7ve"
ARMPKGARCH_tune-armv7vethfb ?= "armv7ve"
ARMPKGARCH_tune-armv7vehfb-vfpv3d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7vethfb-vfpv3d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7vehfb-vfpv3 ?= "armv7ve"
ARMPKGARCH_tune-armv7vethfb-vfpv3 ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehfb-vfpv4d16 ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethfb-vfpv4d16 ?= "armv7ve"
ARMPKGARCH_tune-armv7vehfb-neon ?= "armv7ve"
ARMPKGARCH_tune-armv7vethfb-neon ?= "armv7ve"
ARMPKGARCH_tune-armv7vehfb-neon-vfpv4 ?= "armv7ve"
ARMPKGARCH_tune-armv7vethfb-neon-vfpv4 ?= "armv7ve"
-TUNE_FEATURES_tune-armv7vehfb = "${TUNE_FEATURES_tune-armv7vehf} bigendian"
-TUNE_FEATURES_tune-armv7vethfb = "${TUNE_FEATURES_tune-armv7vethf} bigendian"
-TUNE_FEATURES_tune-armv7vehfb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vehf-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7vethfb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vethf-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7vehfb-vfpv3 = "${TUNE_FEATURES_tune-armv7vehf-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7vethfb-vfpv3 = "${TUNE_FEATURES_tune-armv7vethf-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7vehfb-neon = "${TUNE_FEATURES_tune-armv7vehf-neon} bigendian"
-TUNE_FEATURES_tune-armv7vethfb-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} bigendian"
-TUNE_FEATURES_tune-armv7vehfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} bigendian"
+TUNE_FEATURES_tune-armv7vehfb = "${TUNE_FEATURES_tune-armv7vehf} bigendian"
+TUNE_FEATURES_tune-armv7vethfb = "${TUNE_FEATURES_tune-armv7vethf} bigendian"
+TUNE_FEATURES_tune-armv7vehfb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vehf-vfpv3d16} bigendian"
+TUNE_FEATURES_tune-armv7vethfb-vfpv3d16 = "${TUNE_FEATURES_tune-armv7vethf-vfpv3d16} bigendian"
+TUNE_FEATURES_tune-armv7vehfb-vfpv3 = "${TUNE_FEATURES_tune-armv7vehf-vfpv3} bigendian"
+TUNE_FEATURES_tune-armv7vethfb-vfpv3 = "${TUNE_FEATURES_tune-armv7vethf-vfpv3} bigendian"
+TUNE_FEATURES_tune-armv7vehfb-vfpv4d16 = "${TUNE_FEATURES_tune-armv7vehf-vfpv4d16} bigendian"
+TUNE_FEATURES_tune-armv7vethfb-vfpv4d16 = "${TUNE_FEATURES_tune-armv7vethf-vfpv4d16} bigendian"
+TUNE_FEATURES_tune-armv7vehfb-neon = "${TUNE_FEATURES_tune-armv7vehf-neon} bigendian"
+TUNE_FEATURES_tune-armv7vethfb-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} bigendian"
+TUNE_FEATURES_tune-armv7vehfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} bigendian"
TUNE_FEATURES_tune-armv7vethfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehfb = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7vehfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7vehfb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7vethfb = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7vehfb-vfp armv7vet2hfb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb} armv7vehfb-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb} armv7vehfb-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb} armv7vehfb-vfpv3d16 armv7vet2hfb-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3d16} armv7vehfb-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3d16} armv7vehfb-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-vfpv3d16} armv7vehfb-vfpv3 armv7vet2hfb-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb} armv7vehfb-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb} armv7vehfb-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-vfpv4d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb} armv7vehfb-vfpv4d16 armv7vet2hfb-vfpv4d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb} armv7vehfb-neon"
PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb} armv7vehfb-neon armv7vet2hfb-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon} armv7vehfb-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon} armv7vehfb-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-neon} armv7vehfb-neon-vfpv4 armv7vet2hfb-neon-vfpv4"
diff --git a/meta/conf/machine/include/arm/arch-armv8.inc b/meta/conf/machine/include/arm/arch-armv8.inc
deleted file mode 100644
index 5e832fae6d..0000000000
--- a/meta/conf/machine/include/arm/arch-armv8.inc
+++ /dev/null
@@ -1 +0,0 @@
-require conf/machine/include/arm/arch-arm64.inc
diff --git a/meta/conf/machine/include/arm/arch-armv8a.inc b/meta/conf/machine/include/arm/arch-armv8a.inc
new file mode 100644
index 0000000000..f810a1e8fc
--- /dev/null
+++ b/meta/conf/machine/include/arm/arch-armv8a.inc
@@ -0,0 +1,30 @@
+DEFAULTTUNE ?= "armv8a-crc"
+
+TUNEVALID[armv8a] = "Enable instructions for ARMv8-a"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8a', ' -march=armv8-a', '', d)}"
+TUNEVALID[crc] = "Enable instructions for ARMv8-a Cyclic Redundancy Check (CRC)"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'crc', '+crc', '', d)}"
+TUNEVALID[crypto] = "Enable instructions for ARMv8-a cryptographic"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '+crypto', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8a', 'armv8a:', '' ,d)}"
+
+require conf/machine/include/arm/arch-arm64.inc
+
+# Little Endian base configs
+AVAILTUNES += "armv8a armv8a-crc armv8a-crc-crypto armv8a-crypto"
+ARMPKGARCH_tune-armv8a ?= "armv8a"
+ARMPKGARCH_tune-armv8a-crc ?= "armv8a"
+ARMPKGARCH_tune-armv8a-crypto ?= "armv8a"
+ARMPKGARCH_tune-armv8a-crc-crypto ?= "armv8a"
+TUNE_FEATURES_tune-armv8a = "aarch64 armv8a"
+TUNE_FEATURES_tune-armv8a-crc = "${TUNE_FEATURES_tune-armv8a} crc"
+TUNE_FEATURES_tune-armv8a-crypto = "${TUNE_FEATURES_tune-armv8a} crypto"
+TUNE_FEATURES_tune-armv8a-crc-crypto = "${TUNE_FEATURES_tune-armv8a-crc} crypto"
+PACKAGE_EXTRA_ARCHS_tune-armv8a = "aarch64 armv8a"
+PACKAGE_EXTRA_ARCHS_tune-armv8a-crc = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8a-crc"
+PACKAGE_EXTRA_ARCHS_tune-armv8a-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8a-crypto"
+PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} armv8a-crypto armv8a-crc-crypto"
+BASE_LIB_tune-armv8a = "lib64"
+BASE_LIB_tune-armv8a-crc = "lib64"
+BASE_LIB_tune-armv8a-crypto = "lib64"
+BASE_LIB_tune-armv8a-crc-crypto = "lib64"
diff --git a/meta/conf/machine/include/arm/feature-arm-neon.inc b/meta/conf/machine/include/arm/feature-arm-neon.inc
index b34af8e7c7..eaddd054ce 100644
--- a/meta/conf/machine/include/arm/feature-arm-neon.inc
+++ b/meta/conf/machine/include/arm/feature-arm-neon.inc
@@ -16,3 +16,6 @@ TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3', ' vfpv3', ''
TUNEVALID[vfpv4] = "Enable Vector Floating Point Version 4 (vfpv4) unit."
TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv4', ' vfpv4', '', d)}"
TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'vfpv4', 'neon' ], ' neon-vfpv4', '', d)}"
+
+TUNEVALID[vfpv4d16] = "Enable Vector Floating Point Version 4 with 16 registers (vfpv4-d16) unit."
+TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv4d16', ' vfpv4-d16', '', d)}"
diff --git a/meta/conf/machine/include/arm/feature-arm-thumb.inc b/meta/conf/machine/include/arm/feature-arm-thumb.inc
index 1faebf7c26..bae169da3a 100644
--- a/meta/conf/machine/include/arm/feature-arm-thumb.inc
+++ b/meta/conf/machine/include/arm/feature-arm-thumb.inc
@@ -1,33 +1,33 @@
-TUNEVALID[thumb] = "Use thumb instructions instead of ARM"
-ARM_THUMB_OPT = "${@['arm', 'thumb'][d.getVar('ARM_INSTRUCTION_SET', True) == 'thumb']}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', 't', '', d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', 't', '', d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6', 't', '', d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', 't2', '', d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7r', 't2', '', d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', 't2', '', d)}"
+
+TUNEVALID[thumb] = "Support Thumb instructions"
# If the device supports ARM, then respect ARM_THUMB_OPT (which can be "arm" or "thumb")
-# If the defice doesn't support ARM, then always set "thumb" even when
+# If the device doesn't support ARM, then always set "thumb" even when
# some recipe explicitly sets ARM_INSTRUCTION_SET to "arm"
+ARM_THUMB_OPT = "${@['arm', 'thumb'][d.getVar('ARM_INSTRUCTION_SET') == 'thumb']}"
ARM_M_OPT = "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 'thumb', d)}"
+
python () {
if bb.utils.contains('TUNE_FEATURES', 'thumb', False, True, d):
return
- selected = d.getVar('ARM_INSTRUCTION_SET', True)
+ selected = d.getVar('ARM_INSTRUCTION_SET')
if selected == None:
return
- used = d.getVar('ARM_M_OPT', True)
+ used = d.getVar('ARM_M_OPT')
if selected != used:
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
bb.warn("Recipe '%s' selects ARM_INSTRUCTION_SET to be '%s', but tune configuration overrides it to '%s'" % (pn, selected, used))
}
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}"
+ARM_THUMB_SUFFIX = "t2"
+ARM_THUMB_SUFFIX_armv4 = "t"
+ARM_THUMB_SUFFIX_armv5 = "t"
+ARM_THUMB_SUFFIX_armv6 = "t"
+
# Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb
-ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d) if d.getVar('ARM_M_OPT', True) == 'thumb' else ''}"
+ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d) if d.getVar('ARM_M_OPT') == 'thumb' else ''}"
# what about armv7m devices which don't support -marm (e.g. Cortex-M3)?
TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"
diff --git a/meta/conf/machine/include/arm/feature-arm-vfp.inc b/meta/conf/machine/include/arm/feature-arm-vfp.inc
index 9ef31e70e2..678888e638 100644
--- a/meta/conf/machine/include/arm/feature-arm-vfp.inc
+++ b/meta/conf/machine/include/arm/feature-arm-vfp.inc
@@ -5,10 +5,11 @@
TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit."
TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', ' vfp', '', d)}"
-TUNE_CCARGS .= "${@ (' -mfpu=%s ' % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}"
-ARMPKGSFX_FPU = "${@ ('-%s' % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1].replace('vfpv3-d16', 'vfpv3d16')) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}"
+TUNE_CCARGS .= "${@ (' -mfpu=%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}"
+# The following deals with both vfpv3-d16 and vfpv4-d16
+ARMPKGSFX_FPU = "${@ ('-%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1].replace('-d16', 'd16')) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}"
TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP."
-TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else '' }"
-TUNE_CCARGS .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT', True) != '') else ''}"
-ARMPKGSFX_EABI = "${@ 'hf' if (d.getVar('TUNE_CCARGS_MFLOAT', True) == 'hard') else ''}"
+TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '') else '' }"
+TUNE_CCARGS .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
+ARMPKGSFX_EABI = "${@ 'hf' if (d.getVar('TUNE_CCARGS_MFLOAT') == 'hard') else ''}"
diff --git a/meta/conf/machine/include/m68k/arch-m68k.inc b/meta/conf/machine/include/m68k/arch-m68k.inc
new file mode 100644
index 0000000000..3ff8a3a5b5
--- /dev/null
+++ b/meta/conf/machine/include/m68k/arch-m68k.inc
@@ -0,0 +1,8 @@
+# m68k Architecture definitions
+
+DEFAULTTUNE ?= "m68k"
+
+# Architecture name
+TUNE_ARCH = "m68k"
+
+TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
diff --git a/meta/conf/machine/include/microblaze/arch-microblaze.inc b/meta/conf/machine/include/microblaze/arch-microblaze.inc
new file mode 100644
index 0000000000..eab7171cb2
--- /dev/null
+++ b/meta/conf/machine/include/microblaze/arch-microblaze.inc
@@ -0,0 +1,53 @@
+# MicroBlaze architecture tune feature configuration
+
+# Architecture feature and override
+TUNEVALID[microblaze] = "MicroBlaze"
+MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}"
+
+# Endian
+TUNEVALID[bigendian] = "Use Microblaze Big Endian"
+TUNECONFLICTS[bigendian] += "v10.0"
+
+MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-mbig-endian", "-mlittle-endian", d)}"
+
+# General features
+TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter"
+TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions"
+TUNEVALID[reorder] = "Enable Reorder Instructions"
+TUNECONFLICTS[reorder] += "v8.00 v8.10 v8.20"
+
+# Core configuration tune optimizations
+TUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)"
+TUNECONFLICTS[frequency-optimized] += "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6"
+
+# Feature compiler args
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-mxl-frequency", "", d)}"
+
+# Disable reorder for v8.30 if pattern-compare is not enabled
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \
+ bb.utils.contains("TUNE_FEATURES", "v8.30", \
+ bb.utils.contains("TUNE_FEATURES", "pattern-compare", \
+ "-mxl-reorder", "-mno-xl-reorder", d), \
+ "-mxl-reorder", d), "-mno-xl-reorder", d)}"
+
+# Feature package architecture formatting
+MBPKGARCH_TUNE = ""
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-fo", "", d)}"
+
+# Additional features
+require conf/machine/include/microblaze/feature-microblaze-versions.inc
+require conf/machine/include/microblaze/feature-microblaze-math.inc
+
+# Architecture name, either 'microblazeeb' or 'microblazeel' depending on endianess
+TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}"
+
+# Package Architecture formatting
+TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}"
+
diff --git a/meta/conf/machine/include/microblaze/feature-microblaze-math.inc b/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
new file mode 100644
index 0000000000..a31516659c
--- /dev/null
+++ b/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
@@ -0,0 +1,33 @@
+# This include describes the math features (integer and floating point) that
+# are available for the MicroBlaze ISA
+
+TUNEVALID[multiply-low] = "Hardware multipler with 32 bit result"
+TUNEVALID[multiply-high] = "Hardware multipler with 64 bit result"
+TUNEVALID[divide-hard] = "Hardware divider"
+TUNEVALID[fpu-soft] = "Software FPU"
+TUNEVALID[fpu-hard] = "Hardware FPU in basic mode"
+TUNEVALID[fpu-hard-extended] = "Hardware FPU in extended mode (conversion and square root instructions)"
+
+TUNECONFLICTS[fpu-soft] = "fpu-hard fpu-hard-extended"
+TUNECONFLICTS[fpu-hard] = "fpu-soft"
+TUNECONFLICTS[fpu-hard-extended] = "fpu-soft"
+
+# Compiler args
+TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['multiply-low', 'multiply-high'], '-mno-xl-soft-mul', '-mxl-soft-mul', d)}"
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mxl-multiply-high', '', d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-mno-xl-soft-div', '-mxl-soft-div', d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', '', '', d)}"
+TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['fpu-hard', 'fpu-hard-extended'], '-mhard-float', '', d)}"
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-mxl-float-convert -mxl-float-sqrt', '', d)}"
+
+# Set target fpu (bitbake known target) to soft or hard (basic or extended)
+TARGET_FPU = "${@bb.utils.contains_any('TUNE_FEATURES', 'fpu-hard fpu-hard-extended', 'fpu-hard', 'fpu-soft', d)}"
+
+# Package Architecture formatting
+MBPKGARCH_MATH = ""
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mh', bb.utils.contains('TUNE_FEATURES', 'multiply-low', '-ml', '', d), d)}"
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-div', '', d)}"
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-fe', bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '-fb', '', d), d)}"
+
diff --git a/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc b/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
new file mode 100644
index 0000000000..955674fff9
--- /dev/null
+++ b/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
@@ -0,0 +1,67 @@
+# MicroBlaze versions are defined as features, the features are setup to
+# conflict with other versions as well as unavailable features for particular
+# versions.
+#
+# Versions before v9.0 of MicroBlaze use a versioning scheme of "vX.YY.Z"
+# (where Z = [abc]). For v8.* versions of MicroBlaze the revision (Z) changes
+# did not affect ABI and are ignored by this tune configuration. Though this
+# format is expected by GCC including the revision, but this is defaulted to
+# ".a".
+#
+# Since v9.0 of MicroBlaze the revision (Z) part of versions was entirely
+# dropped and the version scheme was changed to "vX.Y".
+
+def microblaze_current_version(d, gcc = False):
+ import re
+ # find the current version, and convert it to major/minor integers
+ version = None
+ for t in (d.getVar("TUNE_FEATURES") or "").split():
+ m = re.search("^v(\d+)\.(\d+)", t)
+ if m:
+ version = int(m.group(1)), int(m.group(2))
+ break
+
+ # format the version string in generic or GCC specific formats
+ if version:
+ if version[0] <= 8:
+ return ("v%d.%02d" % version[0:2]) + (".a" if gcc else "")
+ else:
+ return "v%d.%d" % version[0:2]
+ return ""
+
+# MicroBlaze versions
+TUNEVALID[v8.00] = "MicroBlaze version 8.00"
+TUNEVALID[v8.10] = "MicroBlaze version 8.10"
+TUNEVALID[v8.20] = "MicroBlaze version 8.20"
+TUNEVALID[v8.30] = "MicroBlaze version 8.30"
+TUNEVALID[v8.40] = "MicroBlaze version 8.40"
+TUNEVALID[v8.50] = "MicroBlaze version 8.50"
+TUNEVALID[v9.0] = "MicroBlaze version 9.0"
+TUNEVALID[v9.1] = "MicroBlaze version 9.1"
+TUNEVALID[v9.2] = "MicroBlaze version 9.2"
+TUNEVALID[v9.3] = "MicroBlaze version 9.3"
+TUNEVALID[v9.4] = "MicroBlaze version 9.4"
+TUNEVALID[v9.5] = "MicroBlaze version 9.5"
+TUNEVALID[v9.6] = "MicroBlaze version 9.6"
+TUNEVALID[v10.0] = "MicroBlaze version 10.0"
+
+# Version conflict matrix
+TUNECONFLICTS[v8.00] = ""
+TUNECONFLICTS[v8.10] = "v8.00"
+TUNECONFLICTS[v8.20] = "v8.00 v8.10"
+TUNECONFLICTS[v8.30] = "v8.00 v8.10 v8.20"
+TUNECONFLICTS[v8.40] = "v8.00 v8.10 v8.20 v8.30"
+TUNECONFLICTS[v8.50] = "v8.00 v8.10 v8.20 v8.30 v8.40"
+TUNECONFLICTS[v9.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50"
+TUNECONFLICTS[v9.1] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0"
+TUNECONFLICTS[v9.2] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1"
+TUNECONFLICTS[v9.3] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2"
+TUNECONFLICTS[v9.4] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3"
+TUNECONFLICTS[v9.5] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4"
+TUNECONFLICTS[v9.6] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5"
+TUNECONFLICTS[v10.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6"
+
+# Version flags
+TUNE_CCARGS += "-mcpu=${@microblaze_current_version(d, True)}"
+MBPKGARCH_VERSION = "-${@microblaze_current_version(d)}"
+
diff --git a/meta/conf/machine/include/mips/README b/meta/conf/machine/include/mips/README
index c375f316df..f36e87b45a 100644
--- a/meta/conf/machine/include/mips/README
+++ b/meta/conf/machine/include/mips/README
@@ -1,3 +1,6 @@
+2016/09/30 - Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
+ - Add Release 6 support
+
2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
- Initial Version
@@ -6,9 +9,14 @@ MIPS currently defines 12 ABIs. Combinations of:
*) Hardware/Software Floating Point
*) o32, n32, n64 ABI
+Release 6 of the ISA is a major revision and doesn't build up on previous
+releases of the ISA.
+
+For more details about tuples, check https://wiki.debian.org/Multiarch/Tuples
+
TUNE_ARCH, the GNU canonical arch, is defined as:
-mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}
+"mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
The package arch is defined in such a way to generated a standard naming
scheme. The scheme is: <mips variant>[-nf][-n32]
@@ -24,6 +32,9 @@ MIPSPKGSFX_BYTE - This is defined as either blank and "64" for MIPS64 CPUs.
MIPSPKGSFX_ENDIAN - For bigendian hardware this is blank, otherwise it's
defined as "el".
+MIPSPKGSFX_ENDIAN2 - For bigendian hardware this is "eb", otherwise it's
+defined as "el".
+
MIPSPKGSFX_VARIANT_tune-<tune> - In the default tunings it is set to the
same value as TUNE_ARCH. In custom, optimized tunings, the value should
be modified to more precisely describe the tuning.
@@ -34,3 +45,12 @@ that the tune is using a non-floating point ABI.
MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous
values are not enough to distringuish the package. "-n32" is added when
building for N32 ABI.
+
+MIPSPKGSFX_R6 - This is used to specify the presence of release 6.
+"r6" is added in the tuple for release 6 of the isa.
+
+MIPSPKGSFX_64R6 - This is used to specify "isa" in the tuple.
+Release 6 onwards we use "mipsisa64" instead of just "mips64".
+
+MIPSPKGSFX_32R6 - This is used to specify "isa32" in the tuple.
+Release 6 onwards we use "mipsisa32" instead of just "mips".
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index 28d3b51b05..2f625119cb 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -17,7 +17,7 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'o32', ' -mabi=32', '', d)
TUNEVALID[n32] = "MIPS64 n32 ABI"
TUNECONFLICTS[n32] = "o32 n64"
-ABIEXTENSION .= "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'n32', '' ,d)}"
+ABIEXTENSION .= "${@bb.utils.filter('TUNE_FEATURES', 'n32' ,d)}"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'n32', ' -mabi=n32', '', d)}"
# user mode qemu doesn't support mips64 n32: "Invalid ELF image for this architecture"
@@ -32,16 +32,36 @@ TUNEVALID[fpu-hard] = "Use hardware FPU"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', ' -mhard-float', ' -msoft-float', d)}"
TARGET_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '', 'soft', d)}"
+# MIPS r6 ABI
+TUNEVALID[r6] = "Use r6"
+TUNEVALID[mipsisa64r6] = "Use 64r6"
+TUNEVALID[mipsisa32r6] = "Use 32r6"
+
# Package naming
MIPSPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el', d)}"
+MIPSPKGSFX_ENDIAN2 = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'eb', 'el', d)}"
MIPSPKGSFX_BYTE = "${@bb.utils.contains('TUNE_FEATURES', 'n64' , '64', '', d)}"
MIPSPKGSFX_BYTE .= "${@bb.utils.contains('TUNE_FEATURES', 'n32' , '64', '', d)}"
MIPSPKGSFX_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard' , '', '-nf', d)}"
MIPSPKGSFX_ABI = "${@bb.utils.contains('TUNE_FEATURES', 'n32', '-n32', '', d)}"
+MIPSPKGSFX_R6 = "${@bb.utils.filter('TUNE_FEATURES', 'r6', d)}"
+MIPSPKGSFX_64R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', 'isa', '', d)}"
+MIPSPKGSFX_32R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', 'isa32', '', d)}"
-TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
+TUNE_ARCH = "mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
+# Various Global Machine Overrides
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 'mipsarchn64${MIPSPKGSFX_ENDIAN2}:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 'mipsarcho32${MIPSPKGSFX_ENDIAN2}:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'mipsarchn32${MIPSPKGSFX_ENDIAN2}:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 'mipsarchn64:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 'mipsarcho32:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'mipsarchn32:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'r6', 'mipsarchr6:', '' ,d)}"
+MACHINEOVERRIDES =. "mipsarch${MIPSPKGSFX_ENDIAN2}:"
+MACHINEOVERRIDES =. "mipsarch:"
+
# Base tunes
AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
@@ -110,7 +130,7 @@ AVAILTUNES += "mips64-o32 mips64el-o32"
TUNE_FEATURES_tune-mips64-o32 = "o32 bigendian fpu-hard"
BASE_LIB_tune-mips64-o32 = "lib"
MIPSPKGSFX_VARIANT_tune-mips64-o32 = "${TUNE_ARCH}"
-PACKAGE_EXTRA_ARCHS_tune-mips64-o32 = "mips mips64-o32 mips64-o32"
+PACKAGE_EXTRA_ARCHS_tune-mips64-o32 = "mips mips64-o32"
TUNE_FEATURES_tune-mips64el-o32 = "o32 fpu-hard"
BASE_LIB_tune-mips64el-o32 = "lib"
diff --git a/meta/conf/machine/include/mips/feature-mips-mips16e.inc b/meta/conf/machine/include/mips/feature-mips-mips16e.inc
index 05011dec41..101d5331bc 100644
--- a/meta/conf/machine/include/mips/feature-mips-mips16e.inc
+++ b/meta/conf/machine/include/mips/feature-mips-mips16e.inc
@@ -1,8 +1,8 @@
TUNEVALID[mips16e] = "Build target packages with MIPS16e ASE instructions"
-MIPS_MIPS16E_OPT = "${@['mno-mips16', 'mips16'][d.getVar('MIPS_INSTRUCTION_SET', True) == 'mips16e']}"
+MIPS_MIPS16E_OPT = "${@['mno-mips16', 'mips16'][d.getVar('MIPS_INSTRUCTION_SET') == 'mips16e']}"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' -${MIPS_MIPS16E_OPT}', '', d)}"
-MIPSPKGSFX_MIPS16E .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', '-m16', '', d) if d.getVar('MIPS_MIPS16E_OPT', True) == 'mips16' else ''}"
+MIPSPKGSFX_MIPS16E .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', '-m16', '', d) if d.getVar('MIPS_MIPS16E_OPT') == 'mips16' else ''}"
# Whether to compile with code to allow interworking between the two
# instruction sets. This allows mips16e code to be executed on a primarily
@@ -14,4 +14,4 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' ${MIPS16_TUNE
OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ':mips16e', '', d)}"
# show status (if compiling in MIPS16e mode)
-BUILDCFG_VARS += "${@['', 'MIPS_INSTRUCTION_SET'][d.getVar('MIPS_INSTRUCTION_SET', True) == 'mips16e']}"
+BUILDCFG_VARS += "${@['', 'MIPS_INSTRUCTION_SET'][d.getVar('MIPS_INSTRUCTION_SET') == 'mips16e']}"
diff --git a/meta/conf/machine/include/mips/tune-mips-74k.inc b/meta/conf/machine/include/mips/tune-mips-74k.inc
new file mode 100644
index 0000000000..94afee34bd
--- /dev/null
+++ b/meta/conf/machine/include/mips/tune-mips-74k.inc
@@ -0,0 +1,37 @@
+DEFAULTTUNE ?= "mips32r2-74kc"
+
+MIPSPKGSFX_MIPS16E ??= ""
+
+require conf/machine/include/tune-mips32r2.inc
+require conf/machine/include/mips/feature-mips-mips16e.inc
+
+
+TUNEVALID[74kc] = "Enable MIPS 74K with DSPr2 processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "74kc", " -mtune=74kc", "", d)}"
+
+AVAILTUNES += "mips32r2-74kc mips32r2-74kc-m16"
+AVAILTUNES += "mips32r2el-74kc mips32r2el-74kc-m16"
+
+# big endian: kc+dsp2=kc, kc+dsp2+mips16e=kc-m16
+TUNE_FEATURES_tune-mips32r2-74kc = "${TUNE_FEATURES_tune-mips32r2-nf} 74kc"
+TUNE_FEATURES_tune-mips32r2-74kc-m16 = "${TUNE_FEATURES_tune-mips32r2-74kc} mips16e"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2-74kc = "mips32r2-74kc"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2-74kc = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-nf} mips32r2-74kc-nf"
+QEMU_EXTRAOPTIONS_mips32r2-74kc-nf = " -cpu 24Kc"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2-74kc-m16 = "mips32r2-74kc${MIPSPKGSFX_MIPS16E}"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2-74kc-m16 = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-74kc} mips32r2-74kc-m16-nf"
+QEMU_EXTRAOPTIONS_mips32r2-74kc-m16-nf = " -cpu 24KEc"
+
+# little endian: kc+dsp2=kc, kc+dsp2+mips16e=kc-m16
+TUNE_FEATURES_tune-mips32r2el-74kc = "${TUNE_FEATURES_tune-mips32r2el-nf} 74kc"
+TUNE_FEATURES_tune-mips32r2el-74kc-m16 = "${TUNE_FEATURES_tune-mips32r2el-74kc} mips16e"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2el-74kc = "mips32r2el-74kc"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2el-74kc = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-nf} mips32r2el-74kc-nf"
+QEMU_EXTRAOPTIONS_mips32r2el-74kc-nf = " -cpu 24Kc"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2el-74kc-m16 = "mips32r2el-74kc${MIPSPKGSFX_MIPS16E}"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2el-74kc-m16 = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-74kc} mips32r2el-74kc-m16-nf"
+QEMU_EXTRAOPTIONS_mips32r2el-74kc-m16-nf = " -cpu 24KEc"
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
index 9cf6b88fd1..8c0c943044 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -8,6 +8,11 @@ DEFAULTTUNE ?= "powerpc"
TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
ABIEXTENSION ?= ""
+# Endian
+TUNEVALID[bigendian] = "Use PowerPC Big Endian"
+
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}"
+
TUNEVALID[m32] = "Power ELF32 standard ABI"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', ' -m32', '', d)}"
TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', 'powerpc', '', d)}"
@@ -22,13 +27,24 @@ TARGET_FPU .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', 'soft', '', d)}
TUNEVALID[altivec] = "Altivec"
# Basic tune definitions
-AVAILTUNES += "powerpc powerpc-nf"
-TUNE_FEATURES_tune-powerpc-nf = "m32 fpu-soft"
+AVAILTUNES += "powerpc powerpc-nf powerpcle powerpcle-nf"
+
+TUNE_FEATURES_tune-powerpc-nf = "m32 fpu-soft bigendian"
BASE_LIB_tune-powerpc-nf = "lib"
TUNE_PKGARCH_tune-powerpc-nf = "powerpc-nf"
PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
-TUNE_FEATURES_tune-powerpc = "m32 fpu-hard"
+TUNE_FEATURES_tune-powerpc = "m32 fpu-hard bigendian"
BASE_LIB_tune-powerpc = "lib"
TUNE_PKGARCH_tune-powerpc = "powerpc"
PACKAGE_EXTRA_ARCHS_tune-powerpc = "powerpc"
+
+TUNE_FEATURES_tune-powerpcle-nf = "m32 fpu-soft"
+BASE_LIB_tune-powerpcle-nf = "lib"
+TUNE_PKGARCH_tune-powerpcle-nf = "powerpcle-nf"
+PACKAGE_EXTRA_ARCHS_tune-powerpcle-nf = "powerpcle-nf"
+
+TUNE_FEATURES_tune-powerpcle = "m32 fpu-hard"
+BASE_LIB_tune-powerpcle = "lib"
+TUNE_PKGARCH_tune-powerpcle = "powerpcle"
+PACKAGE_EXTRA_ARCHS_tune-powerpcle = "powerpcle"
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc64.inc b/meta/conf/machine/include/powerpc/arch-powerpc64.inc
index f751c6b76c..4bc5983087 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc64.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc64.inc
@@ -7,11 +7,20 @@ TUNECONFLICTS[m64] = "m32 nf"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', ' -m64', '', d)}"
TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', [ 'm64' ], 'powerpc64', '', d)}"
+# musl only supports elfv2 ABI for ppc64
+TUNE_CCARGS .= "${@['', ' -mabi=elfv2']['libc-musl' in d.getVar('OVERRIDES').split(':')]}"
+
# user mode qemu doesn't support ppc64
MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'm64', 'qemu-usermode', '', d)}"
-AVAILTUNES += "powerpc64"
-TUNE_FEATURES_tune-powerpc64 = "m64 fpu-hard"
+AVAILTUNES += "powerpc64 powerpc64le"
+
+TUNE_FEATURES_tune-powerpc64 = "m64 fpu-hard bigendian"
BASE_LIB_tune-powerpc64 = "lib64"
TUNE_PKGARCH_tune-powerpc64 = "powerpc64"
PACKAGE_EXTRA_ARCHS_tune-powerpc64 = "powerpc64"
+
+TUNE_FEATURES_tune-powerpc64le = "m64 fpu-hard"
+BASE_LIB_tune-powerpc64le = "lib64"
+TUNE_PKGARCH_tune-powerpc64le = "powerpc64le"
+PACKAGE_EXTRA_ARCHS_tune-powerpc64le = "powerpc64le"
diff --git a/meta/conf/machine/include/qemu.inc b/meta/conf/machine/include/qemu.inc
index 2bc4dc2db6..5050e41066 100644
--- a/meta/conf/machine/include/qemu.inc
+++ b/meta/conf/machine/include/qemu.inc
@@ -6,10 +6,8 @@ PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
XSERVER ?= "xserver-xorg \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \
- xf86-input-evdev \
- xf86-input-mouse \
xf86-video-fbdev \
- xf86-input-keyboard"
+ "
MACHINE_FEATURES = "alsa bluetooth usbgadget screen"
@@ -18,16 +16,15 @@ MACHINEOVERRIDES =. "qemuall:"
IMAGE_FSTYPES += "tar.bz2 ext4"
# Don't include kernels in standard images
-RDEPENDS_kernel-base = ""
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
# Use a common kernel recipe for all QEMU machines
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
+PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
# Provide the nfs server kernel module for all qemu images
KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
-
-MACHINE_EXTRA_RRECOMMENDS += "rng-tools"
+KERNEL_FEATURES_append_pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc"
IMAGE_CLASSES += "qemuboot"
diff --git a/meta/conf/machine/include/qemuboot-mips.inc b/meta/conf/machine/include/qemuboot-mips.inc
index 0c60cf297f..978820a2e0 100644
--- a/meta/conf/machine/include/qemuboot-mips.inc
+++ b/meta/conf/machine/include/qemuboot-mips.inc
@@ -1,8 +1,7 @@
# For runqemu
IMAGE_CLASSES += "qemuboot"
-QB_MEM = "-m 256"
QB_MACHINE = "-machine malta"
QB_KERNEL_CMDLINE_APPEND = "console=ttyS0 console=tty"
+QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet"
# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
-QB_OPT_APPEND = "-vga cirrus -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
-QB_SYSTEM_NAME = "qemu-system-${TUNE_ARCH}"
+QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0"
diff --git a/meta/conf/machine/include/qemuboot-x86.inc b/meta/conf/machine/include/qemuboot-x86.inc
index 06ac983d4d..495418fa04 100644
--- a/meta/conf/machine/include/qemuboot-x86.inc
+++ b/meta/conf/machine/include/qemuboot-x86.inc
@@ -1,15 +1,16 @@
# For runqemu
IMAGE_CLASSES += "qemuboot"
-QB_SYSTEM_NAME_x86 = "qemu-system-i386"
-QB_CPU_x86 = "-cpu qemu32"
-QB_CPU_KVM_x86 = "-cpu kvm32"
+QB_CPU_x86 = "-cpu core2duo"
+QB_CPU_KVM_x86 = "-cpu core2duo"
-QB_SYSTEM_NAME_x86-64 = "qemu-system-x86_64"
QB_CPU_x86-64 = "-cpu core2duo"
-QB_CPU_KVM_x86-64 = "-cpu kvm64"
+QB_CPU_KVM_x86-64 = "-cpu core2duo"
QB_AUDIO_DRV = "alsa"
QB_AUDIO_OPT = "-soundhw ac97,es1370"
-QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1"
+QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=${UVESA_MODE} oprofile.timer=1 uvesafb.task_timeout=-1"
+QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet"
# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
-QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
+QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0"
+
+UVESA_MODE ?= "640x480-32"
diff --git a/meta/conf/machine/include/riscv/arch-riscv.inc b/meta/conf/machine/include/riscv/arch-riscv.inc
new file mode 100644
index 0000000000..8ed9874389
--- /dev/null
+++ b/meta/conf/machine/include/riscv/arch-riscv.inc
@@ -0,0 +1,15 @@
+# RISCV Architecture definition
+
+DEFAULTTUNE ?= "riscv64"
+
+TUNE_ARCH = "${TUNE_ARCH_tune-${DEFAULTTUNE}}"
+TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
+TUNE_CCARGS .= ""
+
+# QEMU usermode fails with invalid instruction error (For riscv32)
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv32', ' qemu-usermode', '', d)}"
+
+# Fix: ld: unrecognized option '--hash-style=sysv'
+LINKER_HASH_STYLE_libc-newlib = ""
+# Fix: ld: unrecognized option '--hash-style=gnu'
+LINKER_HASH_STYLE_libc-baremetal = ""
diff --git a/meta/conf/machine/include/riscv/qemuriscv.inc b/meta/conf/machine/include/riscv/qemuriscv.inc
new file mode 100644
index 0000000000..a42346f361
--- /dev/null
+++ b/meta/conf/machine/include/riscv/qemuriscv.inc
@@ -0,0 +1,38 @@
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/riscv/tune-riscv.inc
+
+MACHINE_FEATURES = "screen keyboard ext2 ext3 serial"
+
+KERNEL_IMAGETYPE = "Image"
+KERNEL_IMAGETYPES += "uImage"
+KEEPUIMAGE = "no"
+
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0"
+
+IMAGE_FSTYPES += "ext4 wic.qcow2"
+
+WKS_FILE ?= "qemuriscv.wks"
+
+MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
+
+EXTRA_IMAGEDEPENDS += "opensbi"
+RISCV_SBI_PLAT ?= "qemu/virt"
+RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin"
+
+UBOOT_ENTRYPOINT_riscv32 = "0x80400000"
+UBOOT_ENTRYPOINT_riscv64 = "0x80200000"
+
+# qemuboot options
+QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi"
+QB_MACHINE = "-machine virt"
+QB_DEFAULT_BIOS = "fw_jump.elf"
+QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
+QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
+QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
+QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
+QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND = " -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0"
+
diff --git a/meta/conf/machine/include/riscv/tune-riscv.inc b/meta/conf/machine/include/riscv/tune-riscv.inc
new file mode 100644
index 0000000000..25d0463492
--- /dev/null
+++ b/meta/conf/machine/include/riscv/tune-riscv.inc
@@ -0,0 +1,19 @@
+require conf/machine/include/riscv/arch-riscv.inc
+
+TUNEVALID[riscv64] = "Enable 64-bit RISC-V optimizations"
+TUNEVALID[riscv32] = "Enable 32-bit RISC-V optimizations"
+
+TUNEVALID[bigendian] = "Big endian mode"
+
+AVAILTUNES += "riscv64 riscv32"
+
+TUNE_FEATURES_tune-riscv64 = "riscv64"
+TUNE_ARCH_tune-riscv64 = "riscv64"
+TUNE_PKGARCH_tune-riscv64 = "riscv64"
+PACKAGE_EXTRA_ARCHS_tune-riscv64 = "riscv64"
+
+TUNE_FEATURES_tune-riscv32 = "riscv32"
+TUNE_ARCH_tune-riscv32 = "riscv32"
+TUNE_PKGARCH_tune-riscv32 = "riscv32"
+PACKAGE_EXTRA_ARCHS_tune-riscv32 = "riscv32"
+
diff --git a/meta/conf/machine/include/tune-arm1136jf-s.inc b/meta/conf/machine/include/tune-arm1136jf-s.inc
index 53994ef363..b25995d495 100644
--- a/meta/conf/machine/include/tune-arm1136jf-s.inc
+++ b/meta/conf/machine/include/tune-arm1136jf-s.inc
@@ -1,11 +1,16 @@
-DEFAULTTUNE ?= "armv6"
+DEFAULTTUNE ?= "armv6hf"
require conf/machine/include/arm/arch-armv6.inc
TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', 'armv6:', '' ,d)}"
-AVAILTUNES += "arm1136jfs"
+AVAILTUNES += "arm1136jfs arm1136jfshf"
ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"
-TUNE_FEATURES_tune-arm1136jfs = "${TUNE_FEATURES_tune-armv6} arm1136jfs"
+ARMPKGARCH_tune-arm1136jfshf = "arm1136jfs"
+# mcpu is used so don't use armv6 as we don't want march
+TUNE_FEATURES_tune-arm1136jfs = "arm arm1136jfs"
+TUNE_FEATURES_tune-arm1136jfshf = "${TUNE_FEATURES_tune-arm1136jfs} callconvention-hard"
PACKAGE_EXTRA_ARCHS_tune-arm1136jfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6} arm1136jfs-vfp"
+PACKAGE_EXTRA_ARCHS_tune-arm1136jfshf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} arm1136jfshf-vfp"
diff --git a/meta/conf/machine/include/tune-arm1176jz-s.inc b/meta/conf/machine/include/tune-arm1176jz-s.inc
new file mode 100644
index 0000000000..c741e80521
--- /dev/null
+++ b/meta/conf/machine/include/tune-arm1176jz-s.inc
@@ -0,0 +1,17 @@
+DEFAULTTUNE ?= "arm1176jzs"
+
+require conf/machine/include/arm/arch-armv6.inc
+
+TUNEVALID[arm1176jzs] = "Enable arm1176jzs specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1176jzs', ' -mcpu=arm1176jz-s', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm1176jzs', 'armv6:', '' ,d)}"
+
+AVAILTUNES += "arm1176jzs"
+ARMPKGARCH_tune-arm1176jzs = "arm1176jzs"
+TUNE_FEATURES_tune-arm1176jzs = "arm thumb arm1176jzs"
+PACKAGE_EXTRA_ARCHS_tune-arm1176jzs = "${PACKAGE_EXTRA_ARCHS_tune-armv6tb-novfp} arm1176jzs arm1176jzst"
+
+AVAILTUNES += "arm1176jzs-be"
+ARMPKGARCH_tune-arm1176jzs-be = "${ARMPKGARCH_tune-arm1176jzs}"
+TUNE_FEATURES_tune-arm1176jzs-be = "${TUNE_FEATURES_tune-arm1176jzs} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-arm1176jzs-be = "${PACKAGE_EXTRA_ARCHS_tune-armv6tb-novfp} arm1176jzsb arm1176jzstb"
diff --git a/meta/conf/machine/include/tune-arm920t.inc b/meta/conf/machine/include/tune-arm920t.inc
index c6e74b6772..42e8ed2b51 100644
--- a/meta/conf/machine/include/tune-arm920t.inc
+++ b/meta/conf/machine/include/tune-arm920t.inc
@@ -4,8 +4,10 @@ require conf/machine/include/arm/arch-armv4.inc
TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', 'armv4:', '' ,d)}"
AVAILTUNES += "arm920t"
ARMPKGARCH_tune-arm920t = "arm920t"
-TUNE_FEATURES_tune-arm920t = "${TUNE_FEATURES_tune-armv4t} arm920t"
+# mcpu is used so don't use armv4t as we don't want march
+TUNE_FEATURES_tune-arm920t = "arm thumb arm920t"
PACKAGE_EXTRA_ARCHS_tune-arm920t = "${PACKAGE_EXTRA_ARCHS_tune-armv4t} arm920t arm920tt"
diff --git a/meta/conf/machine/include/tune-arm926ejs.inc b/meta/conf/machine/include/tune-arm926ejs.inc
index 81bcda339b..563d53bc4e 100644
--- a/meta/conf/machine/include/tune-arm926ejs.inc
+++ b/meta/conf/machine/include/tune-arm926ejs.inc
@@ -4,8 +4,10 @@ require conf/machine/include/arm/arch-armv5-dsp.inc
TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', 'armv5:', '' ,d)}"
AVAILTUNES += "arm926ejs"
ARMPKGARCH_tune-arm926ejs = "arm926ejs"
-TUNE_FEATURES_tune-arm926ejs = "${TUNE_FEATURES_tune-armv5te} arm926ejs"
+# mcpu is used so don't use armv5te as we don't want march
+TUNE_FEATURES_tune-arm926ejs = "arm thumb dsp arm926ejs"
PACKAGE_EXTRA_ARCHS_tune-arm926ejs = "${PACKAGE_EXTRA_ARCHS_tune-armv5te} arm926ejste arm926ejse"
diff --git a/meta/conf/machine/include/tune-arm9tdmi.inc b/meta/conf/machine/include/tune-arm9tdmi.inc
index e9c2b8fcf5..e03a8b86a0 100644
--- a/meta/conf/machine/include/tune-arm9tdmi.inc
+++ b/meta/conf/machine/include/tune-arm9tdmi.inc
@@ -4,8 +4,10 @@ require conf/machine/include/arm/arch-armv4.inc
TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', 'armv4:', '' ,d)}"
AVAILTUNES += "arm9tdmi"
ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"
-TUNE_FEATURES_tune-arm9tdmi = "${TUNE_FEATURES_tune-armv4t} arm9tdmi"
+# mcpu is used so don't use armv4t as we don't want march
+TUNE_FEATURES_tune-arm9tdmi = "arm thumb arm9tdmi"
PACKAGE_EXTRA_ARCHS_tune-arm9tdmi = "${PACKAGE_EXTRA_ARCHS_tune-armv4t} arm9tdmit"
diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc
index f4ba43fbfd..ddde719bde 100644
--- a/meta/conf/machine/include/tune-core2.inc
+++ b/meta/conf/machine/include/tune-core2.inc
@@ -8,11 +8,8 @@
#
DEFAULTTUNE ?= "core2-32"
-# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
-X86ARCH32 ?= "i686"
-
# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
-require conf/machine/include/tune-i586.inc
+require conf/machine/include/tune-i686.inc
# Extra tune features
TUNEVALID[core2] = "Enable core2 specific processor optimizations"
@@ -23,16 +20,19 @@ AVAILTUNES += "core2-32"
TUNE_FEATURES_tune-core2-32 = "${TUNE_FEATURES_tune-x86} core2"
BASE_LIB_tune-core2-32 = "lib"
TUNE_PKGARCH_tune-core2-32 = "core2-32"
-PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i586} core2-32"
+PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i686} core2-32"
+QEMU_EXTRAOPTIONS_core2-32 = " -cpu n270"
AVAILTUNES += "core2-64"
TUNE_FEATURES_tune-core2-64 = "${TUNE_FEATURES_tune-x86-64} core2"
BASE_LIB_tune-core2-64 = "lib64"
TUNE_PKGARCH_tune-core2-64 = "core2-64"
PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64} core2-64"
+QEMU_EXTRAOPTIONS_core2-64 = " -cpu core2duo"
AVAILTUNES += "core2-64-x32"
TUNE_FEATURES_tune-core2-64-x32 = "${TUNE_FEATURES_tune-x86-64-x32} core2"
BASE_LIB_tune-core2-64-x32 = "libx32"
TUNE_PKGARCH_tune-core2-64-x32 = "core2-64-x32"
PACKAGE_EXTRA_ARCHS_tune-core2-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-64-x32"
+QEMU_EXTRAOPTIONS_core2-64-x32 = " -cpu core2duo"
diff --git a/meta/conf/machine/include/tune-corei7.inc b/meta/conf/machine/include/tune-corei7.inc
index 6edfb680e2..d06af47b86 100644
--- a/meta/conf/machine/include/tune-corei7.inc
+++ b/meta/conf/machine/include/tune-corei7.inc
@@ -1,20 +1,19 @@
-# Settings for the GCC(1) cpu-type "corei7":
+# Settings for the GCC(1) cpu-type "nehalem":
#
-# Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1
-# and SSE4.2 instruction set support.
+# Intel Nehalem CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1,
+# SSE4.2 and POPCNT instruction set support.
#
# This tune is recommended for Intel Nehalem and Silvermont (e.g. Bay Trail) CPUs
# (and beyond).
#
DEFAULTTUNE ?= "corei7-64"
-# Pull in the previous tune in to pull in PACKAGE_EXTRA_ARCHS
+# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
require conf/machine/include/tune-core2.inc
-
# Extra tune features
TUNEVALID[corei7] = "Enable corei7 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2', '', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=nehalem -mtune=generic -mfpmath=sse -msse4.2', '', d)}"
# Extra tune selections
AVAILTUNES += "corei7-32"
diff --git a/meta/conf/machine/include/tune-cortexa15.inc b/meta/conf/machine/include/tune-cortexa15.inc
index a33b27f327..d53403af35 100644
--- a/meta/conf/machine/include/tune-cortexa15.inc
+++ b/meta/conf/machine/include/tune-cortexa15.inc
@@ -1,9 +1,10 @@
-DEFAULTTUNE ?= "armv7ve-neon"
+DEFAULTTUNE ?= "armv7vethf-neon"
require conf/machine/include/arm/arch-armv7ve.inc
TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', 'armv7ve:', '' ,d)}"
# Little Endian base configs
AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"
@@ -13,17 +14,18 @@ ARMPKGARCH_tune-cortexa15-neon = "cortexa15"
ARMPKGARCH_tune-cortexa15t-neon = "cortexa15"
ARMPKGARCH_tune-cortexa15-neon-vfpv4 = "cortexa15"
ARMPKGARCH_tune-cortexa15t-neon-vfpv4 = "cortexa15"
-TUNE_FEATURES_tune-cortexa15 = "${TUNE_FEATURES_tune-armv7ve} cortexa15"
-TUNE_FEATURES_tune-cortexa15t = "${TUNE_FEATURES_tune-armv7vet} cortexa15"
-TUNE_FEATURES_tune-cortexa15-neon = "${TUNE_FEATURES_tune-armv7ve-neon} cortexa15"
-TUNE_FEATURES_tune-cortexa15t-neon = "${TUNE_FEATURES_tune-armv7vet-neon} cortexa15"
-TUNE_FEATURES_tune-cortexa15-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} cortexa15"
-TUNE_FEATURES_tune-cortexa15t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa15"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa15-vfp"
+# mcpu is used so don't use armv7ve as we don't want march
+TUNE_FEATURES_tune-cortexa15 = "arm vfp cortexa15"
+TUNE_FEATURES_tune-cortexa15t = "${TUNE_FEATURES_tune-cortexa15} thumb"
+TUNE_FEATURES_tune-cortexa15-neon = "${TUNE_FEATURES_tune-cortexa15} neon"
+TUNE_FEATURES_tune-cortexa15t-neon = "${TUNE_FEATURES_tune-cortexa15-neon} thumb"
+TUNE_FEATURES_tune-cortexa15-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa15-neon} vfpv4"
+TUNE_FEATURES_tune-cortexa15t-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa15-neon-vfpv4} thumb"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa15-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa15t = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa15-vfp cortexa15t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa15-vfp cortexa15-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa15-vfp cortexa15-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa15t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon} cortexa15-vfp cortexa15-neon cortexa15t2-vfp cortexa15t2-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4} cortexa15-vfp cortexa15-neon cortexa15-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4} cortexa15-vfp cortexa15-neon cortexa15-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-cortexa15t-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon-vfpv4} cortexa15-vfp cortexa15-neon cortexa15-neon-vfpv4 cortexa15t2-vfp cortexa15t2-neon cortexa15t2-neon-vfpv4"
# HF Tunes
@@ -34,15 +36,16 @@ ARMPKGARCH_tune-cortexa15hf-neon = "cortexa15"
ARMPKGARCH_tune-cortexa15thf-neon = "cortexa15"
ARMPKGARCH_tune-cortexa15hf-neon-vfpv4 = "cortexa15"
ARMPKGARCH_tune-cortexa15thf-neon-vfpv4 = "cortexa15"
-TUNE_FEATURES_tune-cortexa15hf = "${TUNE_FEATURES_tune-armv7vehf} cortexa15"
-TUNE_FEATURES_tune-cortexa15thf = "${TUNE_FEATURES_tune-armv7vethf} cortexa15"
-TUNE_FEATURES_tune-cortexa15hf-neon = "${TUNE_FEATURES_tune-armv7vehf-neon} cortexa15"
-TUNE_FEATURES_tune-cortexa15thf-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} cortexa15"
-TUNE_FEATURES_tune-cortexa15hf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} cortexa15"
-TUNE_FEATURES_tune-cortexa15thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa15"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa15hf-vfp"
+# mcpu is used so don't use armv7ve as we don't want march
+TUNE_FEATURES_tune-cortexa15hf = "${TUNE_FEATURES_tune-cortexa15} callconvention-hard"
+TUNE_FEATURES_tune-cortexa15thf = "${TUNE_FEATURES_tune-cortexa15t} callconvention-hard"
+TUNE_FEATURES_tune-cortexa15hf-neon = "${TUNE_FEATURES_tune-cortexa15-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa15thf-neon = "${TUNE_FEATURES_tune-cortexa15t-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa15hf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa15-neon-vfpv4} callconvention-hard"
+TUNE_FEATURES_tune-cortexa15thf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa15t-neon-vfpv4} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa15hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa15thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa15hf-vfp cortexa15t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa15hf-vfp cortexa15hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa15hf-vfp cortexa15hf-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa15thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon} cortexa15hf-vfp cortexa15hf-neon cortexa15t2hf-vfp cortexa15t2hf-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15hf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4} cortexa15hf-vfp cortexa15hf-neon cortexa15hf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15hf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4} cortexa15hf-vfp cortexa15hf-neon cortexa15hf-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-cortexa15thf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon-vfpv4} cortexa15hf-vfp cortexa15hf-neon cortexa15hf-neon-vfpv4 cortexa15t2hf-vfp cortexa15t2hf-neon cortexa15t2hf-neon-vfpv4"
diff --git a/meta/conf/machine/include/tune-cortexa17.inc b/meta/conf/machine/include/tune-cortexa17.inc
index d08b002963..3ffc02bf9f 100644
--- a/meta/conf/machine/include/tune-cortexa17.inc
+++ b/meta/conf/machine/include/tune-cortexa17.inc
@@ -1,9 +1,10 @@
-DEFAULTTUNE ?= "armv7ve-neon"
+DEFAULTTUNE ?= "armv7vethf-neon"
require conf/machine/include/arm/arch-armv7ve.inc
TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', 'armv7ve:', '' ,d)}"
# Little Endian base configs
AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"
@@ -13,17 +14,18 @@ ARMPKGARCH_tune-cortexa17-neon = "cortexa17"
ARMPKGARCH_tune-cortexa17t-neon = "cortexa17"
ARMPKGARCH_tune-cortexa17-neon-vfpv4 = "cortexa17"
ARMPKGARCH_tune-cortexa17t-neon-vfpv4 = "cortexa17"
-TUNE_FEATURES_tune-cortexa17 = "${TUNE_FEATURES_tune-armv7ve} cortexa17"
-TUNE_FEATURES_tune-cortexa17t = "${TUNE_FEATURES_tune-armv7vet} cortexa17"
-TUNE_FEATURES_tune-cortexa17-neon = "${TUNE_FEATURES_tune-armv7ve-neon} cortexa17"
-TUNE_FEATURES_tune-cortexa17t-neon = "${TUNE_FEATURES_tune-armv7vet-neon} cortexa17"
-TUNE_FEATURES_tune-cortexa17-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} cortexa17"
-TUNE_FEATURES_tune-cortexa17t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa17"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa17-vfp"
+# mcpu is used so don't use armv7ve as we don't want march
+TUNE_FEATURES_tune-cortexa17 = "arm vfp cortexa17"
+TUNE_FEATURES_tune-cortexa17t = "${TUNE_FEATURES_tune-cortexa17} thumb"
+TUNE_FEATURES_tune-cortexa17-neon = "${TUNE_FEATURES_tune-cortexa17} neon"
+TUNE_FEATURES_tune-cortexa17t-neon = "${TUNE_FEATURES_tune-cortexa17-neon} thumb"
+TUNE_FEATURES_tune-cortexa17-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa17-neon} vfpv4"
+TUNE_FEATURES_tune-cortexa17t-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa17-neon-vfpv4} thumb"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa17-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa17t = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa17-vfp cortexa17t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa17-vfp cortexa17-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa17-vfp cortexa17-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa17t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon} cortexa17-vfp cortexa17-neon cortexa17t2-vfp cortexa17t2-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4} cortexa17-vfp cortexa17-neon cortexa17-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4} cortexa17-vfp cortexa17-neon cortexa17-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-cortexa17t-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon-vfpv4} cortexa17-vfp cortexa17-neon cortexa17-neon-vfpv4 cortexa17t2-vfp cortexa17t2-neon cortexa17t2-neon-vfpv4"
# HF Tunes
@@ -34,15 +36,16 @@ ARMPKGARCH_tune-cortexa17hf-neon = "cortexa17"
ARMPKGARCH_tune-cortexa17thf-neon = "cortexa17"
ARMPKGARCH_tune-cortexa17hf-neon-vfpv4 = "cortexa17"
ARMPKGARCH_tune-cortexa17thf-neon-vfpv4 = "cortexa17"
-TUNE_FEATURES_tune-cortexa17hf = "${TUNE_FEATURES_tune-armv7vehf} cortexa17"
-TUNE_FEATURES_tune-cortexa17thf = "${TUNE_FEATURES_tune-armv7vethf} cortexa17"
-TUNE_FEATURES_tune-cortexa17hf-neon = "${TUNE_FEATURES_tune-armv7vehf-neon} cortexa17"
-TUNE_FEATURES_tune-cortexa17thf-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} cortexa17"
-TUNE_FEATURES_tune-cortexa17hf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} cortexa17"
-TUNE_FEATURES_tune-cortexa17thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa17"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa17hf-vfp"
+# mcpu is used so don't use armv7ve as we don't want march
+TUNE_FEATURES_tune-cortexa17hf = "${TUNE_FEATURES_tune-cortexa17} callconvention-hard"
+TUNE_FEATURES_tune-cortexa17thf = "${TUNE_FEATURES_tune-cortexa17t} callconvention-hard"
+TUNE_FEATURES_tune-cortexa17hf-neon = "${TUNE_FEATURES_tune-cortexa17-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa17thf-neon = "${TUNE_FEATURES_tune-cortexa17t-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa17hf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa17-neon-vfpv4} callconvention-hard"
+TUNE_FEATURES_tune-cortexa17thf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa17t-neon-vfpv4} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa17hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa17thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa17hf-vfp cortexa17t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa17hf-vfp cortexa17hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa17hf-vfp cortexa17hf-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa17thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon} cortexa17hf-vfp cortexa17hf-neon cortexa17t2hf-vfp cortexa17t2hf-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17hf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4} cortexa17hf-vfp cortexa17hf-neon cortexa17hf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17hf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4} cortexa17hf-vfp cortexa17hf-neon cortexa17hf-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-cortexa17thf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon-vfpv4} cortexa17hf-vfp cortexa17hf-neon cortexa17hf-neon-vfpv4 cortexa17t2hf-vfp cortexa17t2hf-neon cortexa17t2hf-neon-vfpv4"
diff --git a/meta/conf/machine/include/tune-cortexa32.inc b/meta/conf/machine/include/tune-cortexa32.inc
new file mode 100644
index 0000000000..3ab1addd91
--- /dev/null
+++ b/meta/conf/machine/include/tune-cortexa32.inc
@@ -0,0 +1,18 @@
+DEFAULTTUNE ?= "cortexa32"
+
+
+TUNEVALID[cortexa32] = "Enable Cortex-A32 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa32', ' -mcpu=cortex-a32', '', d)}"
+
+require conf/machine/include/arm/arch-armv8a.inc
+
+# Little Endian base configs
+AVAILTUNES += "cortexa32 cortexa32-crypto"
+ARMPKGARCH_tune-cortexa32 = "cortexa32"
+ARMPKGARCH_tune-cortexa32-crypto = "cortexa32"
+TUNE_FEATURES_tune-cortexa32 = "armv8a cortexa32 crc"
+TUNE_FEATURES_tune-cortexa32-crypto = "armv8a cortexa32 crc crypto"
+PACKAGE_EXTRA_ARCHS_tune-cortexa32 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa32"
+PACKAGE_EXTRA_ARCHS_tune-cortexa32-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa32 cortexa32-crypto"
+BASE_LIB_tune-cortexa32 = "lib"
+BASE_LIB_tune-cortexa32-crypto = "lib"
diff --git a/meta/conf/machine/include/tune-cortexa35.inc b/meta/conf/machine/include/tune-cortexa35.inc
new file mode 100644
index 0000000000..d6df6cd6bd
--- /dev/null
+++ b/meta/conf/machine/include/tune-cortexa35.inc
@@ -0,0 +1,17 @@
+DEFAULTTUNE ?= "cortexa35"
+
+TUNEVALID[cortexa35] = "Enable Cortex-A35 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa35', ' -mcpu=cortex-a35', '', d)}"
+
+require conf/machine/include/arm/arch-armv8a.inc
+
+# Little Endian base configs
+AVAILTUNES += "cortexa35 cortexa35-crypto"
+ARMPKGARCH_tune-cortexa35 = "cortexa35"
+ARMPKGARCH_tune-cortexa35-crypto = "cortexa35"
+TUNE_FEATURES_tune-cortexa35 = "aarch64 cortexa35 crc"
+TUNE_FEATURES_tune-cortexa35-crypto = "aarch64 cortexa35 crc crypto"
+PACKAGE_EXTRA_ARCHS_tune-cortexa35 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa35"
+PACKAGE_EXTRA_ARCHS_tune-cortexa35-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa35 cortexa35-crypto"
+BASE_LIB_tune-cortexa35 = "lib64"
+BASE_LIB_tune-cortexa35-crypto = "lib64"
diff --git a/meta/conf/machine/include/tune-cortexa5.inc b/meta/conf/machine/include/tune-cortexa5.inc
index c7e5ab96a1..496739e454 100644
--- a/meta/conf/machine/include/tune-cortexa5.inc
+++ b/meta/conf/machine/include/tune-cortexa5.inc
@@ -1,36 +1,51 @@
-DEFAULTTUNE ?= "armv7a-neon"
+DEFAULTTUNE ?= "armv7athf-neon"
require conf/machine/include/arm/arch-armv7a.inc
TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', 'armv7a:', '' ,d)}"
# Little Endian base configs
-AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"
+AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon cortexa5-neon-vfpv4 cortexa5t-neon-vfpv4"
ARMPKGARCH_tune-cortexa5 = "cortexa5"
ARMPKGARCH_tune-cortexa5t = "cortexa5"
ARMPKGARCH_tune-cortexa5-neon = "cortexa5"
ARMPKGARCH_tune-cortexa5t-neon = "cortexa5"
-TUNE_FEATURES_tune-cortexa5 = "${TUNE_FEATURES_tune-armv7a} cortexa5"
-TUNE_FEATURES_tune-cortexa5t = "${TUNE_FEATURES_tune-armv7at} cortexa5"
-TUNE_FEATURES_tune-cortexa5-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa5"
-TUNE_FEATURES_tune-cortexa5t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa5"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa5-vfp"
+ARMPKGARCH_tune-cortexa5-neon-vfpv4 = "cortexa5"
+ARMPKGARCH_tune-cortexa5t-neon-vfpv4 = "cortexa5"
+# mcpu is used so don't use armv7a as we don't want march
+TUNE_FEATURES_tune-cortexa5 = "arm vfp cortexa5"
+TUNE_FEATURES_tune-cortexa5t = "${TUNE_FEATURES_tune-cortexa5} thumb"
+TUNE_FEATURES_tune-cortexa5-neon = "${TUNE_FEATURES_tune-cortexa5} neon"
+TUNE_FEATURES_tune-cortexa5t-neon = "${TUNE_FEATURES_tune-cortexa5-neon} thumb"
+TUNE_FEATURES_tune-cortexa5-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa5-neon} vfpv4"
+TUNE_FEATURES_tune-cortexa5t-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa5-neon-vfpv4} thumb"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa5-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa5t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa5-vfp cortexa5t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa5-vfp cortexa5-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa5-vfp cortexa5-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa5t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa5-vfp cortexa5-neon cortexa5t2-vfp cortexa5t2-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon-vfpv4} cortexa5-vfp cortexa5-neon cortexa5-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5t-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon-vfpv4} cortexa5-vfp cortexa5-neon cortexa5-neon-vfpv4 cortexa5t2-vfp cortexa5t2-neon cortexa5t2-neon-vfpv4"
# HF Tunes
-AVAILTUNES += "cortexa5hf cortexa5thf cortexa5hf-neon cortexa5thf-neon"
+AVAILTUNES += "cortexa5hf cortexa5thf cortexa5hf-neon cortexa5thf-neon cortexa5hf-neon-vfpv4 cortexa5thf-neon-vfpv4"
ARMPKGARCH_tune-cortexa5hf = "cortexa5"
ARMPKGARCH_tune-cortexa5thf = "cortexa5"
ARMPKGARCH_tune-cortexa5hf-neon = "cortexa5"
ARMPKGARCH_tune-cortexa5thf-neon = "cortexa5"
-TUNE_FEATURES_tune-cortexa5hf = "${TUNE_FEATURES_tune-armv7ahf} cortexa5"
-TUNE_FEATURES_tune-cortexa5thf = "${TUNE_FEATURES_tune-armv7athf} cortexa5"
-TUNE_FEATURES_tune-cortexa5hf-neon = "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa5"
-TUNE_FEATURES_tune-cortexa5thf-neon = "${TUNE_FEATURES_tune-armv7athf-neon} cortexa5"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa5hf-vfp"
+ARMPKGARCH_tune-cortexa5hf-neon-vfpv4 = "cortexa5"
+ARMPKGARCH_tune-cortexa5thf-neon-vfpv4 = "cortexa5"
+# mcpu is used so don't use armv7a as we don't want march
+TUNE_FEATURES_tune-cortexa5hf = "${TUNE_FEATURES_tune-cortexa5} callconvention-hard"
+TUNE_FEATURES_tune-cortexa5thf = "${TUNE_FEATURES_tune-cortexa5t} callconvention-hard"
+TUNE_FEATURES_tune-cortexa5hf-neon = "${TUNE_FEATURES_tune-cortexa5-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa5thf-neon = "${TUNE_FEATURES_tune-cortexa5t-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa5hf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa5-neon-vfpv4} callconvention-hard"
+TUNE_FEATURES_tune-cortexa5thf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa5t-neon-vfpv4} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa5hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa5thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa5hf-vfp cortexa5t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa5hf-vfp cortexa5hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa5hf-vfp cortexa5hf-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa5thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa5hf-vfp cortexa5hf-neon cortexa5t2hf-vfp cortexa5t2hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon-vfpv4} cortexa5hf-vfp cortexa5hf-neon cortexa5hf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5thf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon-vfpv4} cortexa5hf-vfp cortexa5hf-neon cortexa5hf-neon-vfpv4 cortexa5t2hf-vfp cortexa5t2hf-neon cortexa5t2hf-neon-vfpv4"
diff --git a/meta/conf/machine/include/tune-cortexa53.inc b/meta/conf/machine/include/tune-cortexa53.inc
new file mode 100644
index 0000000000..6c0b443eaf
--- /dev/null
+++ b/meta/conf/machine/include/tune-cortexa53.inc
@@ -0,0 +1,17 @@
+DEFAULTTUNE ?= "cortexa53"
+
+TUNEVALID[cortexa53] = "Enable Cortex-A53 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa53', ' -mcpu=cortex-a53', '', d)}"
+
+require conf/machine/include/arm/arch-armv8a.inc
+
+# Little Endian base configs
+AVAILTUNES += "cortexa53 cortexa53-crypto"
+ARMPKGARCH_tune-cortexa53 = "cortexa53"
+ARMPKGARCH_tune-cortexa53-crypto = "cortexa53"
+TUNE_FEATURES_tune-cortexa53 = "aarch64 cortexa53 crc"
+TUNE_FEATURES_tune-cortexa53-crypto = "aarch64 cortexa53 crc crypto"
+PACKAGE_EXTRA_ARCHS_tune-cortexa53 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa53"
+PACKAGE_EXTRA_ARCHS_tune-cortexa53-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa53 cortexa53-crypto"
+BASE_LIB_tune-cortexa53 = "lib64"
+BASE_LIB_tune-cortexa53-crypto = "lib64"
diff --git a/meta/conf/machine/include/tune-cortexa57-cortexa53.inc b/meta/conf/machine/include/tune-cortexa57-cortexa53.inc
new file mode 100644
index 0000000000..d05e93f51e
--- /dev/null
+++ b/meta/conf/machine/include/tune-cortexa57-cortexa53.inc
@@ -0,0 +1,18 @@
+DEFAULTTUNE ?= "cortexa57-cortexa53"
+require conf/machine/include/arm/arch-armv8a.inc
+
+TUNEVALID[cortexa57-cortexa53] = "Enable big.LITTLE Cortex-A57.Cortex-A53 specific processor optimizations"
+TUNECONFLICTS[aarch64] = "armv4 armv5 armv6 armv7 armv7a"
+
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", " -march=armv8-a", "" ,d)}"
+
+MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "cortexa57-cortexa53", "cortexa57-cortexa53:", "" ,d)}"
+
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa57-cortexa53", " -mtune=cortex-a57.cortex-a53", "", d)}"
+
+# Little Endian base configs
+AVAILTUNES += "cortexa57-cortexa53"
+ARMPKGARCH_tune-cortexa57-cortexa53 = "cortexa57-cortexa53"
+TUNE_FEATURES_tune-cortexa57-cortexa53 = "${TUNE_FEATURES_tune-aarch64} cortexa57-cortexa53"
+PACKAGE_EXTRA_ARCHS_tune-cortexa57-cortexa53 = "${PACKAGE_EXTRA_ARCHS_tune-aarch64} cortexa57-cortexa53"
+BASE_LIB_tune-cortexa57-cortexa53 = "lib64"
diff --git a/meta/conf/machine/include/tune-cortexa7.inc b/meta/conf/machine/include/tune-cortexa7.inc
index 10b6ea7f31..34a77b4788 100644
--- a/meta/conf/machine/include/tune-cortexa7.inc
+++ b/meta/conf/machine/include/tune-cortexa7.inc
@@ -1,9 +1,10 @@
-DEFAULTTUNE ?= "armv7ve-neon"
+DEFAULTTUNE ?= "armv7vethf-neon"
require conf/machine/include/arm/arch-armv7ve.inc
TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', 'armv7ve:', '' ,d)}"
# Little Endian base configs
AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"
@@ -13,17 +14,18 @@ ARMPKGARCH_tune-cortexa7-neon = "cortexa7"
ARMPKGARCH_tune-cortexa7t-neon = "cortexa7"
ARMPKGARCH_tune-cortexa7-neon-vfpv4 = "cortexa7"
ARMPKGARCH_tune-cortexa7t-neon-vfpv4 = "cortexa7"
-TUNE_FEATURES_tune-cortexa7 = "${TUNE_FEATURES_tune-armv7ve} cortexa7"
-TUNE_FEATURES_tune-cortexa7t = "${TUNE_FEATURES_tune-armv7vet} cortexa7"
-TUNE_FEATURES_tune-cortexa7-neon = "${TUNE_FEATURES_tune-armv7ve-neon} cortexa7"
-TUNE_FEATURES_tune-cortexa7t-neon = "${TUNE_FEATURES_tune-armv7vet-neon} cortexa7"
-TUNE_FEATURES_tune-cortexa7-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} cortexa7"
-TUNE_FEATURES_tune-cortexa7t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa7"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa7-vfp"
+# mcpu is used so don't use armv7ve as we don't want march
+TUNE_FEATURES_tune-cortexa7 = "arm vfp cortexa7"
+TUNE_FEATURES_tune-cortexa7t = "${TUNE_FEATURES_tune-cortexa7} thumb"
+TUNE_FEATURES_tune-cortexa7-neon = "${TUNE_FEATURES_tune-cortexa7} neon"
+TUNE_FEATURES_tune-cortexa7t-neon = "${TUNE_FEATURES_tune-cortexa7-neon} thumb"
+TUNE_FEATURES_tune-cortexa7-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa7-neon} vfpv4"
+TUNE_FEATURES_tune-cortexa7t-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa7-neon-vfpv4} thumb"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa7-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa7t = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa7-vfp cortexa7t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa7-vfp cortexa7-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa7-vfp cortexa7-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa7t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon} cortexa7-vfp cortexa7-neon cortexa7t2-vfp cortexa7t2-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4} cortexa7-vfp cortexa7-neon cortexa7-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4} cortexa7-vfp cortexa7-neon cortexa7-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-cortexa7t-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon-vfpv4} cortexa7-vfp cortexa7-neon cortexa7-neon-vfpv4 cortexa7t2-vfp cortexa7t2-neon cortexa7t2-neon-vfpv4"
# HF Tunes
@@ -34,15 +36,16 @@ ARMPKGARCH_tune-cortexa7hf-neon = "cortexa7"
ARMPKGARCH_tune-cortexa7thf-neon = "cortexa7"
ARMPKGARCH_tune-cortexa7hf-neon-vfpv4 = "cortexa7"
ARMPKGARCH_tune-cortexa7thf-neon-vfpv4 = "cortexa7"
-TUNE_FEATURES_tune-cortexa7hf = "${TUNE_FEATURES_tune-armv7vehf} cortexa7"
-TUNE_FEATURES_tune-cortexa7thf = "${TUNE_FEATURES_tune-armv7vethf} cortexa7"
-TUNE_FEATURES_tune-cortexa7hf-neon = "${TUNE_FEATURES_tune-armv7vehf-neon} cortexa7"
-TUNE_FEATURES_tune-cortexa7thf-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} cortexa7"
-TUNE_FEATURES_tune-cortexa7hf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} cortexa7"
-TUNE_FEATURES_tune-cortexa7thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa7"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa7hf-vfp"
+# mcpu is used so don't use armv7ve as we don't want march
+TUNE_FEATURES_tune-cortexa7hf = "${TUNE_FEATURES_tune-cortexa7} callconvention-hard"
+TUNE_FEATURES_tune-cortexa7thf = "${TUNE_FEATURES_tune-cortexa7t} callconvention-hard"
+TUNE_FEATURES_tune-cortexa7hf-neon = "${TUNE_FEATURES_tune-cortexa7-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa7thf-neon = "${TUNE_FEATURES_tune-cortexa7t-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa7hf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa7-neon-vfpv4} callconvention-hard"
+TUNE_FEATURES_tune-cortexa7thf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa7t-neon-vfpv4} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa7hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa7thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa7hf-vfp cortexa7t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa7hf-vfp cortexa7hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa7hf-vfp cortexa7hf-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa7thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon} cortexa7hf-vfp cortexa7hf-neon cortexa7t2hf-vfp cortexa7t2hf-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4} cortexa7hf-vfp cortexa7hf-neon cortexa7hf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4} cortexa7hf-vfp cortexa7hf-neon cortexa7hf-neon-vfpv4"
PACKAGE_EXTRA_ARCHS_tune-cortexa7thf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon-vfpv4} cortexa7hf-vfp cortexa7hf-neon cortexa7hf-neon-vfpv4 cortexa7t2hf-vfp cortexa7t2hf-neon cortexa7t2hf-neon-vfpv4"
diff --git a/meta/conf/machine/include/tune-cortexa72.inc b/meta/conf/machine/include/tune-cortexa72.inc
new file mode 100644
index 0000000000..00f7745a22
--- /dev/null
+++ b/meta/conf/machine/include/tune-cortexa72.inc
@@ -0,0 +1,13 @@
+DEFAULTTUNE ?= "cortexa72"
+
+TUNEVALID[cortexa72] = "Enable Cortex-A72 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa72', ' -mcpu=cortex-a72', '', d)}"
+
+require conf/machine/include/arm/arch-armv8a.inc
+
+# Little Endian base configs
+AVAILTUNES += "cortexa72"
+ARMPKGARCH_tune-cortexa72 = "cortexa72"
+TUNE_FEATURES_tune-cortexa72 = "aarch64 cortexa72 crc crypto"
+PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa72"
+BASE_LIB_tune-cortexa72 = "lib64"
diff --git a/meta/conf/machine/include/tune-cortexa8.inc b/meta/conf/machine/include/tune-cortexa8.inc
index c8ce021693..6551ba4952 100644
--- a/meta/conf/machine/include/tune-cortexa8.inc
+++ b/meta/conf/machine/include/tune-cortexa8.inc
@@ -1,9 +1,10 @@
-DEFAULTTUNE ?= "armv7a-neon"
+DEFAULTTUNE ?= "armv7athf-neon"
require conf/machine/include/arm/arch-armv7a.inc
TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', 'armv7a:', '' ,d)}"
# Little Endian base configs
AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"
@@ -11,13 +12,14 @@ ARMPKGARCH_tune-cortexa8 = "cortexa8"
ARMPKGARCH_tune-cortexa8t = "cortexa8"
ARMPKGARCH_tune-cortexa8-neon = "cortexa8"
ARMPKGARCH_tune-cortexa8t-neon = "cortexa8"
-TUNE_FEATURES_tune-cortexa8 = "${TUNE_FEATURES_tune-armv7a} cortexa8"
-TUNE_FEATURES_tune-cortexa8t = "${TUNE_FEATURES_tune-armv7at} cortexa8"
-TUNE_FEATURES_tune-cortexa8-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa8"
-TUNE_FEATURES_tune-cortexa8t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa8"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa8-vfp"
+# mcpu is used so don't use armv7a as we don't want march
+TUNE_FEATURES_tune-cortexa8 = "arm vfp cortexa8"
+TUNE_FEATURES_tune-cortexa8t = "${TUNE_FEATURES_tune-cortexa8} thumb"
+TUNE_FEATURES_tune-cortexa8-neon = "${TUNE_FEATURES_tune-cortexa8} neon"
+TUNE_FEATURES_tune-cortexa8t-neon = "${TUNE_FEATURES_tune-cortexa8-neon} thumb"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa8-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa8t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa8-vfp cortexa8t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa8-vfp cortexa8-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa8-vfp cortexa8-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa8t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa8-vfp cortexa8-neon cortexa8t2-vfp cortexa8t2-neon"
# HF Tunes
@@ -26,11 +28,12 @@ ARMPKGARCH_tune-cortexa8hf = "cortexa8"
ARMPKGARCH_tune-cortexa8thf = "cortexa8"
ARMPKGARCH_tune-cortexa8hf-neon = "cortexa8"
ARMPKGARCH_tune-cortexa8thf-neon = "cortexa8"
-TUNE_FEATURES_tune-cortexa8hf = "${TUNE_FEATURES_tune-armv7ahf} cortexa8"
-TUNE_FEATURES_tune-cortexa8thf = "${TUNE_FEATURES_tune-armv7athf} cortexa8"
-TUNE_FEATURES_tune-cortexa8hf-neon = "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa8"
-TUNE_FEATURES_tune-cortexa8thf-neon = "${TUNE_FEATURES_tune-armv7athf-neon} cortexa8"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa8hf-vfp"
+# mcpu is used so don't use armv7a as we don't want march
+TUNE_FEATURES_tune-cortexa8hf = "${TUNE_FEATURES_tune-cortexa8} callconvention-hard"
+TUNE_FEATURES_tune-cortexa8thf = "${TUNE_FEATURES_tune-cortexa8t} callconvention-hard"
+TUNE_FEATURES_tune-cortexa8hf-neon = "${TUNE_FEATURES_tune-cortexa8-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa8thf-neon = "${TUNE_FEATURES_tune-cortexa8t-neon} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa8hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa8thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa8hf-vfp cortexa8t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa8hf-vfp cortexa8hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa8hf-vfp cortexa8hf-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa8thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa8hf-vfp cortexa8hf-neon cortexa8t2hf-vfp cortexa8t2hf-neon"
diff --git a/meta/conf/machine/include/tune-cortexa9.inc b/meta/conf/machine/include/tune-cortexa9.inc
index 3d8dc1d8cc..ecc7908cd7 100644
--- a/meta/conf/machine/include/tune-cortexa9.inc
+++ b/meta/conf/machine/include/tune-cortexa9.inc
@@ -1,9 +1,10 @@
-DEFAULTTUNE ?= "armv7a-neon"
+DEFAULTTUNE ?= "armv7athf-neon"
require conf/machine/include/arm/arch-armv7a.inc
TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', 'armv7a:', '' ,d)}"
# Little Endian base configs
AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"
@@ -11,13 +12,14 @@ ARMPKGARCH_tune-cortexa9 = "cortexa9"
ARMPKGARCH_tune-cortexa9t = "cortexa9"
ARMPKGARCH_tune-cortexa9-neon = "cortexa9"
ARMPKGARCH_tune-cortexa9t-neon = "cortexa9"
-TUNE_FEATURES_tune-cortexa9 = "${TUNE_FEATURES_tune-armv7a} cortexa9"
-TUNE_FEATURES_tune-cortexa9t = "${TUNE_FEATURES_tune-armv7at} cortexa9"
-TUNE_FEATURES_tune-cortexa9-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa9"
-TUNE_FEATURES_tune-cortexa9t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa9"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa9-vfp"
+# mcpu is used so don't use armv7a as we don't want march
+TUNE_FEATURES_tune-cortexa9 = "arm vfp cortexa9"
+TUNE_FEATURES_tune-cortexa9t = "${TUNE_FEATURES_tune-cortexa9} thumb"
+TUNE_FEATURES_tune-cortexa9-neon = "${TUNE_FEATURES_tune-cortexa9} neon"
+TUNE_FEATURES_tune-cortexa9t-neon = "${TUNE_FEATURES_tune-cortexa9-neon} thumb"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa9-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa9t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa9-vfp cortexa9t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa9-vfp cortexa9-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa9-vfp cortexa9-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa9t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa9-vfp cortexa9-neon cortexa9t2-vfp cortexa9t2-neon"
# HF Tunes
@@ -26,13 +28,14 @@ ARMPKGARCH_tune-cortexa9hf = "cortexa9"
ARMPKGARCH_tune-cortexa9thf = "cortexa9"
ARMPKGARCH_tune-cortexa9hf-neon = "cortexa9"
ARMPKGARCH_tune-cortexa9thf-neon = "cortexa9"
-TUNE_FEATURES_tune-cortexa9hf = "${TUNE_FEATURES_tune-armv7ahf} cortexa9"
-TUNE_FEATURES_tune-cortexa9thf = "${TUNE_FEATURES_tune-armv7athf} cortexa9"
-TUNE_FEATURES_tune-cortexa9hf-neon = "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa9"
-TUNE_FEATURES_tune-cortexa9thf-neon = "${TUNE_FEATURES_tune-armv7athf-neon} cortexa9"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa9hf-vfp"
+# mcpu is used so don't use armv7a as we don't want march
+TUNE_FEATURES_tune-cortexa9hf = "${TUNE_FEATURES_tune-cortexa9} callconvention-hard"
+TUNE_FEATURES_tune-cortexa9thf = "${TUNE_FEATURES_tune-cortexa9t} callconvention-hard"
+TUNE_FEATURES_tune-cortexa9hf-neon = "${TUNE_FEATURES_tune-cortexa9-neon} callconvention-hard"
+TUNE_FEATURES_tune-cortexa9thf-neon = "${TUNE_FEATURES_tune-cortexa9t-neon} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa9hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortexa9thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa9hf-vfp cortexa9t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa9hf-vfp cortexa9hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa9hf-vfp cortexa9hf-neon"
PACKAGE_EXTRA_ARCHS_tune-cortexa9thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa9hf-vfp cortexa9hf-neon cortexa9t2hf-vfp cortexa9t2hf-neon"
# VFPv3 Tunes
@@ -41,11 +44,12 @@ ARMPKGARCH_tune-cortexa9-vfpv3 = "cortexa9"
ARMPKGARCH_tune-cortexa9t-vfpv3 = "cortexa9"
ARMPKGARCH_tune-cortexa9hf-vfpv3 = "cortexa9"
ARMPKGARCH_tune-cortexa9thf-vfpv3 = "cortexa9"
-TUNE_FEATURES_tune-cortexa9-vfpv3 = "${TUNE_FEATURES_tune-armv7a-vfpv3} cortexa9"
-TUNE_FEATURES_tune-cortexa9t-vfpv3 = "${TUNE_FEATURES_tune-armv7at-vfpv3} cortexa9"
-TUNE_FEATURES_tune-cortexa9hf-vfpv3 = "${TUNE_FEATURES_tune-armv7ahf-vfpv3} cortexa9"
-TUNE_FEATURES_tune-cortexa9thf-vfpv3 = "${TUNE_FEATURES_tune-armv7athf-vfpv3} cortexa9"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3} cortexa9-vfp cortexa9-vfpv3"
+# mcpu is used so don't use armv7a as we don't want march
+TUNE_FEATURES_tune-cortexa9-vfpv3 = "${TUNE_FEATURES_tune-cortexa9} vfpv3"
+TUNE_FEATURES_tune-cortexa9t-vfpv3 = "${TUNE_FEATURES_tune-cortexa9t} vfpv3"
+TUNE_FEATURES_tune-cortexa9hf-vfpv3 = "${TUNE_FEATURES_tune-cortexa9hf} vfpv3"
+TUNE_FEATURES_tune-cortexa9thf-vfpv3 = "${TUNE_FEATURES_tune-cortexa9thf} vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3} cortexa9-vfp cortexa9-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-cortexa9t-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3} cortexa9-vfp cortexa9-vfpv3 cortexa9t2-vfp cortexa9t2-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3} cortexa9hf-vfp cortexa9hf-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3} cortexa9hf-vfp cortexa9hf-vfpv3"
PACKAGE_EXTRA_ARCHS_tune-cortexa9thf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3} cortexa9hf-vfp cortexa9hf-vfpv3 cortexa9t2hf-vfp cortexa9t2hf-vfpv3"
diff --git a/meta/conf/machine/include/tune-ep9312.inc b/meta/conf/machine/include/tune-ep9312.inc
index 84ca528d6d..be20eb363b 100644
--- a/meta/conf/machine/include/tune-ep9312.inc
+++ b/meta/conf/machine/include/tune-ep9312.inc
@@ -2,8 +2,9 @@ DEFAULTTUNE ?= "ep9312"
require conf/machine/include/arm/arch-armv4.inc
-TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations"
+TUNEVALID[ep9312] = "Enable Cirrus Logic EP9312 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', 'armv4:', '' ,d)}"
AVAILTUNES += "ep9312"
ARMPKGARCH_tune-ep9312 = "ep9312"
diff --git a/meta/conf/machine/include/tune-i686.inc b/meta/conf/machine/include/tune-i686.inc
new file mode 100644
index 0000000000..bdb4799209
--- /dev/null
+++ b/meta/conf/machine/include/tune-i686.inc
@@ -0,0 +1,27 @@
+#
+# The i686 CPU family was introduced with the Intel Pentium Pro in 1995.
+# It has as required feature flags: fpu tsc cx8 cmov.
+#
+# It is the minimum CPU required by the Debian i386 port.
+# https://lists.debian.org/debian-devel-announce/2016/05/msg00001.html
+#
+#
+
+DEFAULTTUNE ?= "i686"
+
+# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
+X86ARCH32 ?= "i686"
+
+# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
+require conf/machine/include/tune-i586.inc
+
+# Extra tune features
+TUNEVALID[i686] = "Enable i686 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'i686', ' -march=i686', '', d)}"
+
+# Extra tune selections
+AVAILTUNES += "i686"
+TUNE_FEATURES_tune-i686 = "${TUNE_FEATURES_tune-x86} i686"
+BASE_LIB_tune-i686 = "lib"
+TUNE_PKGARCH_tune-i686 = "i686"
+PACKAGE_EXTRA_ARCHS_tune-i686 = "${PACKAGE_EXTRA_ARCHS_tune-i586} i686"
diff --git a/meta/conf/machine/include/tune-iwmmxt.inc b/meta/conf/machine/include/tune-iwmmxt.inc
index f27423cb2e..9a6cd23c99 100644
--- a/meta/conf/machine/include/tune-iwmmxt.inc
+++ b/meta/conf/machine/include/tune-iwmmxt.inc
@@ -6,7 +6,8 @@ DEFAULTTUNE ?= "iwmmxt"
require conf/machine/include/arm/arch-armv5-dsp.inc
TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -mcpu=iwmmxt', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', 'armv5:', '' ,d)}"
AVAILTUNES += "iwmmxt"
ARMPKGARCH_tune-iwmmxt = "iwmmxt"
diff --git a/meta/conf/machine/include/tune-mcf5441x.inc b/meta/conf/machine/include/tune-mcf5441x.inc
new file mode 100644
index 0000000000..11a41a7c5d
--- /dev/null
+++ b/meta/conf/machine/include/tune-mcf5441x.inc
@@ -0,0 +1,13 @@
+DEFAULTTUNE ?= "mcf5441x"
+
+require conf/machine/include/m68k/arch-m68k.inc
+
+TUNEVALID[mcf5441x] = "Enable coldfire specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mcf5441x', ' -mcpu=54418', '', d)}"
+
+AVAILTUNES += "mcf5441x"
+TUNE_FEATURES_tune-mcf5441x = "mcf5441x"
+TUNE_ARCH_tune-mcf5441x = "mcf5441x"
+TUNE_PKGARCH_tune-mcf5441x = "mcf5441x"
+PACKAGE_EXTRA_ARCHS_tune-mcf5441x = "m68k mcf5441x"
+
diff --git a/meta/conf/machine/include/tune-microblaze.inc b/meta/conf/machine/include/tune-microblaze.inc
new file mode 100644
index 0000000000..41f0afe668
--- /dev/null
+++ b/meta/conf/machine/include/tune-microblaze.inc
@@ -0,0 +1,8 @@
+DEFAULTTUNE ?= "microblaze"
+
+require conf/machine/include/microblaze/arch-microblaze.inc
+
+AVAILTUNES += "microblaze"
+TUNE_FEATURES_tune-microblaze = "microblaze"
+PACKAGE_EXTRA_ARCHS_tune-microblaze = "${TUNE_PKGARCH}"
+
diff --git a/meta/conf/machine/include/tune-mips32.inc b/meta/conf/machine/include/tune-mips32.inc
index ce0445f849..a90c0f059d 100644
--- a/meta/conf/machine/include/tune-mips32.inc
+++ b/meta/conf/machine/include/tune-mips32.inc
@@ -6,7 +6,8 @@ TUNEVALID[mips32] = "Enable mips32 specific processor optimizations"
TUNECONFLICTS[mips32] = "n64 n32"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips32', ' -march=mips32', '', d)}"
-AVAILTUNES += "mips32 mips32el mips32-nf mips32el-nf"
+# Base Tunes (Hard Float)
+AVAILTUNES += "mips32 mips32el"
TUNE_FEATURES_tune-mips32 = "${TUNE_FEATURES_tune-mips} mips32"
MIPSPKGSFX_VARIANT_tune-mips32 = "mips32"
@@ -16,6 +17,9 @@ TUNE_FEATURES_tune-mips32el = "${TUNE_FEATURES_tune-mipsel} mips32"
MIPSPKGSFX_VARIANT_tune-mips32el = "mips32el"
PACKAGE_EXTRA_ARCHS_tune-mips32el = "mipsel mips32el"
+# Soft Float
+AVAILTUNES += "mips32-nf mips32el-nf"
+
TUNE_FEATURES_tune-mips32-nf = "${TUNE_FEATURES_tune-mips-nf} mips32"
MIPSPKGSFX_VARIANT_tune-mips32-nf = "mips32"
PACKAGE_EXTRA_ARCHS_tune-mips32-nf = "mips-nf mips32-nf"
diff --git a/meta/conf/machine/include/tune-mips32r2.inc b/meta/conf/machine/include/tune-mips32r2.inc
index 5e398cbe74..14473ca831 100644
--- a/meta/conf/machine/include/tune-mips32r2.inc
+++ b/meta/conf/machine/include/tune-mips32r2.inc
@@ -6,7 +6,7 @@ TUNEVALID[mips32r2] = "Enable mips32r2 specific processor optimizations"
TUNECONFLICTS[mips32r2] = "n64 n32"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', ' -march=mips32r2', '', d)}"
-# hard float
+# Base Tunes (Hard Float)
AVAILTUNES += "mips32r2 mips32r2el"
TUNE_FEATURES_tune-mips32r2 = "${TUNE_FEATURES_tune-mips} mips32r2"
@@ -17,7 +17,7 @@ TUNE_FEATURES_tune-mips32r2el = "${TUNE_FEATURES_tune-mipsel} mips32r2"
MIPSPKGSFX_VARIANT_tune-mips32r2el = "mips32r2el"
PACKAGE_EXTRA_ARCHS_tune-mips32r2el = "mipsel mips32el mips32r2el"
-# soft float
+# Soft Float
AVAILTUNES += "mips32r2-nf mips32r2el-nf"
TUNE_FEATURES_tune-mips32r2-nf = "${TUNE_FEATURES_tune-mips-nf} mips32r2"
diff --git a/meta/conf/machine/include/tune-mips32r6.inc b/meta/conf/machine/include/tune-mips32r6.inc
new file mode 100644
index 0000000000..44369cb59c
--- /dev/null
+++ b/meta/conf/machine/include/tune-mips32r6.inc
@@ -0,0 +1,29 @@
+DEFAULTTUNE ?= "mipsisa32r6el"
+
+require conf/machine/include/mips/arch-mips.inc
+
+TUNEVALID[mipsisa32r6] = "Enable mipsisa32r6 specific processor optimizations"
+TUNECONFLICTS[mipsisa32r6] = "n64 n32"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', ' -march=mips32r6', '', d)}"
+
+# Base Tunes (Hard Float)
+AVAILTUNES += "mipsisa32r6 mipsisa32r6el"
+
+TUNE_FEATURES_tune-mipsisa32r6 = "o32 bigendian mipsisa32r6 fpu-hard r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa32r6 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6 = "mipsisa32r6"
+
+TUNE_FEATURES_tune-mipsisa32r6el = "o32 fpu-hard mipsisa32r6 r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa32r6el = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6el = "mipsisa32r6el"
+
+# Soft Float
+AVAILTUNES += "mipsisa32r6-nf mipsisa32r6el-nf"
+
+TUNE_FEATURES_tune-mipsisa32r6-nf = "o32 bigendian mipsisa32r6 r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa32r6-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6-nf = "mipsisa32r6-nf"
+
+TUNE_FEATURES_tune-mipsisa32r6el-nf = "o32 mipsisa32r6 r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa32r6el-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6el-nf = "mipsisa32r6el-nf"
diff --git a/meta/conf/machine/include/tune-mips64r6.inc b/meta/conf/machine/include/tune-mips64r6.inc
new file mode 100644
index 0000000000..4fe3eedf1b
--- /dev/null
+++ b/meta/conf/machine/include/tune-mips64r6.inc
@@ -0,0 +1,58 @@
+DEFAULTTUNE ?= "mipsisa64r6el"
+
+require conf/machine/include/mips/arch-mips.inc
+
+TUNEVALID[mipsisa64r6] = "Enable mipsisa64r6 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', ' -march=mips64r6', '', d)}"
+
+# Base Tunes
+AVAILTUNES += "mipsisa64r6 mipsisa64r6el"
+
+TUNE_FEATURES_tune-mipsisa64r6 = "bigendian fpu-hard n64 mipsisa64r6 r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6 = "${TUNE_ARCH}"
+BASE_LIB_tune-mipsisa64r6 = "lib64"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6 = "mipsisa64r6"
+
+TUNE_FEATURES_tune-mipsisa64r6el = "fpu-hard r6 n64 mipsisa64r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6el = "${TUNE_ARCH}"
+BASE_LIB_tune-mipsisa64r6el = "lib64"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6el = "mipsisa64r6el"
+
+# Soft Float
+AVAILTUNES += "mipsisa64r6-nf mipsisa64r6el-nf"
+
+TUNE_FEATURES_tune-mipsisa64r6-nf = "bigendian r6 n64 mipsisa64r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6-nf = "${TUNE_ARCH}"
+BASE_LIB_tune-mipsisa64r6-nf = "lib64"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6-nf = "mipsisa64r6"
+
+TUNE_FEATURES_tune-mipsisa64r6el-nf = "r6 n64 mipsisa64r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6el-nf = "${TUNE_ARCH}"
+BASE_LIB_tune-mipsisa64r6el-nf = "lib64"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6el-nf = "mipsisa64r6el-nf"
+
+# MIPS 64r6 n32
+AVAILTUNES += "mipsisa64r6-n32 mipsisa64r6el-n32"
+
+TUNE_FEATURES_tune-mipsisa64r6-n32 = "bigendian fpu-hard r6 n32 mipsisa64r6"
+BASE_LIB_tune-mipsisa64r6-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6-n32 = "mipsisa64r6-n32"
+
+TUNE_FEATURES_tune-mipsisa64r6el-n32 = "fpu-hard r6 n32 mipsisa64r6"
+BASE_LIB_tune-mipsisa64r6el-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6el-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6el-n32 = "mipsisa64r6el-n32"
+
+# MIPS 64r6 n32 and Soft Float
+AVAILTUNES += "mipsisa64r6-nf-n32 mipsisa64r6el-nf-n32"
+
+TUNE_FEATURES_tune-mipsisa64r6-nf-n32 = "bigendian r6 n32 mipsisa64r6"
+BASE_LIB_tune-mipsisa64r6-nf-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6-nf-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6-nf-n32 = "mipsisa64r6-nf-n32"
+
+TUNE_FEATURES_tune-mipsisa64r6el-nf-n32 = "r6 n32 mipsisa64r6"
+BASE_LIB_tune-mipsisa64r6el-nf-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6el-nf-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6el-nf-n32 = "mipsisa64r6el-nf-n32"
diff --git a/meta/conf/machine/include/tune-power5.inc b/meta/conf/machine/include/tune-power5.inc
index a346c309a6..48c33fb273 100644
--- a/meta/conf/machine/include/tune-power5.inc
+++ b/meta/conf/machine/include/tune-power5.inc
@@ -1,4 +1,4 @@
-DEFAULTTUNE ?= "ppc64p5"
+DEFAULTTUNE ?= "ppcp5"
require conf/machine/include/powerpc/arch-powerpc64.inc
@@ -6,12 +6,12 @@ TUNEVALID[power5] = "Enable IBM Power5 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'power5', ' -mcpu=power5', '', d)}"
AVAILTUNES += "ppcp5 ppc64p5"
-TUNE_FEATURES_tune-ppcp5 = "m32 fpu-hard power5 altivec"
+TUNE_FEATURES_tune-ppcp5 = "m32 fpu-hard power5 altivec bigendian"
BASE_LIB_tune-ppcp5 = "lib"
TUNE_PKGARCH_tune-ppcp5 = "ppcp5"
PACKAGE_EXTRA_ARCHS_tune-ppcp5 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppcp5"
-TUNE_FEATURES_tune-ppc64p5 = "m64 fpu-hard power5 altivec"
+TUNE_FEATURES_tune-ppc64p5 = "m64 fpu-hard power5 altivec bigendian"
BASE_LIB_tune-ppc64p5 = "lib64"
TUNE_PKGARCH_tune-ppc64p5 = "ppc64p5"
PACKAGE_EXTRA_ARCHS_tune-ppc64p5 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p5"
@@ -19,3 +19,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64p5 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p
# glibc configure options to get power5 specific library
GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power5', '--with-cpu=power5', '', d)}"
GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power5', '--with-cpu=power5', '', d)}"
+
+# QEMU usermode fails with invalid instruction error
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'power5', ' qemu-usermode', '', d)}"
diff --git a/meta/conf/machine/include/tune-power6.inc b/meta/conf/machine/include/tune-power6.inc
index ee200f97b9..b708660217 100644
--- a/meta/conf/machine/include/tune-power6.inc
+++ b/meta/conf/machine/include/tune-power6.inc
@@ -1,4 +1,4 @@
-DEFAULTTUNE ?= "ppcpr6"
+DEFAULTTUNE ?= "ppcp6"
require conf/machine/include/powerpc/arch-powerpc64.inc
@@ -6,12 +6,12 @@ TUNEVALID[power6] = "Enable IBM Power6 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'power6', ' -mcpu=power6', '', d)}"
AVAILTUNES += "ppcp6 ppc64p6"
-TUNE_FEATURES_tune-ppcp6 = "m32 fpu-hard power6 altivec"
+TUNE_FEATURES_tune-ppcp6 = "m32 fpu-hard power6 altivec bigendian"
BASE_LIB_tune-ppcp6 = "lib"
TUNE_PKGARCH_tune-ppcp6 = "ppcp6"
PACKAGE_EXTRA_ARCHS_tune-ppcp6 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppcp6"
-TUNE_FEATURES_tune-ppc64p6 = "m64 fpu-hard power6 altivec"
+TUNE_FEATURES_tune-ppc64p6 = "m64 fpu-hard power6 altivec bigendian"
BASE_LIB_tune-ppc64p6 = "lib64"
TUNE_PKGARCH_tune-ppc64p6 = "ppc64p6"
PACKAGE_EXTRA_ARCHS_tune-ppc64p6 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p6"
@@ -19,3 +19,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64p6 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p
# glibc configure options to get power6 specific library
GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power6', '--with-cpu=power6', '', d)}"
GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power6', '--with-cpu=power6', '', d)}"
+
+# QEMU usermode fails with invalid instruction error
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'power6', ' qemu-usermode', '', d)}"
diff --git a/meta/conf/machine/include/tune-power7.inc b/meta/conf/machine/include/tune-power7.inc
index 3a27719be4..e976cc0467 100644
--- a/meta/conf/machine/include/tune-power7.inc
+++ b/meta/conf/machine/include/tune-power7.inc
@@ -1,4 +1,4 @@
-DEFAULTTUNE ?= "ppcpr7"
+DEFAULTTUNE ?= "ppcp7"
require conf/machine/include/powerpc/arch-powerpc64.inc
@@ -6,12 +6,12 @@ TUNEVALID[power7] = "Enable IBM Power7 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'power7', ' -mcpu=power7', '', d)}"
AVAILTUNES += "ppcp7 ppc64p7"
-TUNE_FEATURES_tune-ppcp7 = "m32 fpu-hard power7 altivec"
+TUNE_FEATURES_tune-ppcp7 = "m32 fpu-hard power7 altivec bigendian"
BASE_LIB_tune-ppcp7 = "lib"
TUNE_PKGARCH_tune-ppcp7 = "ppcp7"
PACKAGE_EXTRA_ARCHS_tune-ppcp7 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppcp7"
-TUNE_FEATURES_tune-ppc64p7 = "m64 fpu-hard power7 altivec"
+TUNE_FEATURES_tune-ppc64p7 = "m64 fpu-hard power7 altivec bigendian"
BASE_LIB_tune-ppc64p7 = "lib64"
TUNE_PKGARCH_tune-ppc64p7 = "ppc64p7"
PACKAGE_EXTRA_ARCHS_tune-ppc64p7 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p7"
@@ -19,3 +19,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64p7 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p
# glibc configure options to get power7 specific library
GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power7', '--with-cpu=power7', '', d)}"
GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power7', '--with-cpu=power7', '', d)}"
+
+# QEMU usermode fails with invalid instruction error
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'power7', ' qemu-usermode', '', d)}"
diff --git a/meta/conf/machine/include/tune-ppc476.inc b/meta/conf/machine/include/tune-ppc476.inc
index d0011ff213..31eecc435c 100644
--- a/meta/conf/machine/include/tune-ppc476.inc
+++ b/meta/conf/machine/include/tune-ppc476.inc
@@ -6,7 +6,7 @@ TUNEVALID[ppc476] = "Enable ppc476 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppc476', ' -mcpu=476', '', d)}"
AVAILTUNES += "ppc476"
-TUNE_FEATURES_tune-ppc476 = "m32 fpu-hard ppc476"
+TUNE_FEATURES_tune-ppc476 = "m32 fpu-hard ppc476 bigendian"
TUNE_PKGARCH_tune-ppc476 = "ppc476"
PACKAGE_EXTRA_ARCHS_tune-ppc476 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppc476"
diff --git a/meta/conf/machine/include/tune-ppc603e.inc b/meta/conf/machine/include/tune-ppc603e.inc
index 13f60dd067..b110f13870 100644
--- a/meta/conf/machine/include/tune-ppc603e.inc
+++ b/meta/conf/machine/include/tune-ppc603e.inc
@@ -6,7 +6,7 @@ TUNEVALID[ppc603e] = "Enable ppc603e specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppc603e', ' -mcpu=603e', '', d)}"
AVAILTUNES += "ppc603e"
-TUNE_FEATURES_tune-ppc603e = "m32 fpu-hard ppc603e"
+TUNE_FEATURES_tune-ppc603e = "m32 fpu-hard ppc603e bigendian"
TUNE_PKGARCH_tune-ppc603e = "ppc603e"
PACKAGE_EXTRA_ARCHS_tune-ppc603e = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppc603e"
diff --git a/meta/conf/machine/include/tune-ppc7400.inc b/meta/conf/machine/include/tune-ppc7400.inc
index 425e8bd215..92d902994b 100644
--- a/meta/conf/machine/include/tune-ppc7400.inc
+++ b/meta/conf/machine/include/tune-ppc7400.inc
@@ -6,7 +6,7 @@ TUNEVALID[ppc7400] = "Enable ppc7400 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppc7400', ' -mcpu=7400 -mno-spe', '', d)}"
AVAILTUNES += "ppc7400"
-TUNE_FEATURES_tune-ppc7400 = "m32 fpu-hard ppc7400 altivec"
+TUNE_FEATURES_tune-ppc7400 = "m32 fpu-hard ppc7400 altivec bigendian"
TUNE_PKGARCH_tune-ppc7400 = "ppc7400"
PACKAGE_EXTRA_ARCHS_tune-ppc7400 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppc7400"
diff --git a/meta/conf/machine/include/tune-ppce300c2.inc b/meta/conf/machine/include/tune-ppce300c2.inc
index af21f601a8..6adeb4bdec 100644
--- a/meta/conf/machine/include/tune-ppce300c2.inc
+++ b/meta/conf/machine/include/tune-ppce300c2.inc
@@ -6,6 +6,6 @@ TUNEVALID[ppce300c2] = "Enable ppce300c2 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce300c2', ' -mcpu=e300c2', '', d)}"
AVAILTUNES += "ppce300c2"
-TUNE_FEATURES_tune-ppce300c2 = "m32 fpu-soft ppce300c2"
+TUNE_FEATURES_tune-ppce300c2 = "m32 fpu-soft ppce300c2 bigendian"
TUNE_PKGARCH_tune-ppce300c2 = "ppce300c2"
PACKAGE_EXTRA_ARCHS_tune-ppce300c2 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc-nf} ppce300c2"
diff --git a/meta/conf/machine/include/tune-ppce500.inc b/meta/conf/machine/include/tune-ppce500.inc
index 96073d2d0b..abf81b90c4 100644
--- a/meta/conf/machine/include/tune-ppce500.inc
+++ b/meta/conf/machine/include/tune-ppce500.inc
@@ -11,10 +11,10 @@ TARGET_FPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'ppce500' , 'spe' ], 'ppc
# spe is defined potentially in two places, so we want to be sure it will
# only write spe once to the ABIEXTENSIONS field.
-SPEABIEXTENSION = "${@bb.utils.contains('TUNE_FEATURES', 'spe', 'spe', '', d)}"
+SPEABIEXTENSION = "${@bb.utils.filter('TUNE_FEATURES', 'spe', d)}"
ABIEXTENSION .= "${SPEABIEXTENSION}"
AVAILTUNES += "ppce500"
-TUNE_FEATURES_tune-ppce500 = "m32 spe ppce500"
+TUNE_FEATURES_tune-ppce500 = "m32 spe ppce500 bigendian"
TUNE_PKGARCH_tune-ppce500 = "ppce500"
PACKAGE_EXTRA_ARCHS_tune-ppce500 = "ppce500"
diff --git a/meta/conf/machine/include/tune-ppce500mc.inc b/meta/conf/machine/include/tune-ppce500mc.inc
index bc26a0f875..9f8a172804 100644
--- a/meta/conf/machine/include/tune-ppce500mc.inc
+++ b/meta/conf/machine/include/tune-ppce500mc.inc
@@ -6,7 +6,7 @@ TUNEVALID[ppce500mc] = "Enable ppce500mc specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce500mc', ' -mcpu=e500mc', '', d)}"
AVAILTUNES += "ppce500mc"
-TUNE_FEATURES_tune-ppce500mc = "m32 fpu-hard ppce500mc"
+TUNE_FEATURES_tune-ppce500mc = "m32 fpu-hard ppce500mc bigendian"
TUNE_PKGARCH_tune-ppce500mc = "ppce500mc"
PACKAGE_EXTRA_ARCHS_tune-ppce500mc = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce500mc"
diff --git a/meta/conf/machine/include/tune-ppce500v2.inc b/meta/conf/machine/include/tune-ppce500v2.inc
index 20a5f25b62..f6c7c17623 100644
--- a/meta/conf/machine/include/tune-ppce500v2.inc
+++ b/meta/conf/machine/include/tune-ppce500v2.inc
@@ -11,10 +11,10 @@ TARGET_FPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'ppce500v2' , 'spe' ], 'p
# spe is defined potentially in two places, so we want to be sure it will
# only write spe once to the ABIEXTENSIONS field.
-SPEABIEXTENSION = "${@bb.utils.contains('TUNE_FEATURES', 'spe', 'spe', '', d)}"
+SPEABIEXTENSION = "${@bb.utils.filter('TUNE_FEATURES', 'spe', d)}"
ABIEXTENSION .= "${SPEABIEXTENSION}"
AVAILTUNES += "ppce500v2"
-TUNE_FEATURES_tune-ppce500v2 = "m32 spe ppce500v2"
+TUNE_FEATURES_tune-ppce500v2 = "m32 ppce500v2 bigendian"
TUNE_PKGARCH_tune-ppce500v2 = "ppce500v2"
PACKAGE_EXTRA_ARCHS_tune-ppce500v2 = "ppce500v2"
diff --git a/meta/conf/machine/include/tune-ppce5500.inc b/meta/conf/machine/include/tune-ppce5500.inc
index cebb244068..acc6a50fca 100644
--- a/meta/conf/machine/include/tune-ppce5500.inc
+++ b/meta/conf/machine/include/tune-ppce5500.inc
@@ -6,12 +6,12 @@ TUNEVALID[e5500] = "Enable Freescale e5500 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' -mcpu=e5500', '', d)}"
AVAILTUNES += "ppce5500 ppc64e5500"
-TUNE_FEATURES_tune-ppce5500 = "m32 fpu-hard e5500"
+TUNE_FEATURES_tune-ppce5500 = "m32 fpu-hard e5500 bigendian"
BASE_LIB_tune-ppce5500 = "lib"
TUNE_PKGARCH_tune-ppce5500 = "ppce5500"
PACKAGE_EXTRA_ARCHS_tune-ppce5500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce5500"
-TUNE_FEATURES_tune-ppc64e5500 = "m64 fpu-hard e5500"
+TUNE_FEATURES_tune-ppc64e5500 = "m64 fpu-hard e5500 bigendian"
BASE_LIB_tune-ppc64e5500 = "lib64"
TUNE_PKGARCH_tune-ppc64e5500 = "ppc64e5500"
PACKAGE_EXTRA_ARCHS_tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64e5500"
diff --git a/meta/conf/machine/include/tune-ppce6500.inc b/meta/conf/machine/include/tune-ppce6500.inc
index 5db7e760c3..d12d218d06 100644
--- a/meta/conf/machine/include/tune-ppce6500.inc
+++ b/meta/conf/machine/include/tune-ppce6500.inc
@@ -6,12 +6,12 @@ TUNEVALID[e6500] = "Enable Freescale e6500 specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' -mcpu=e6500', '', d)}"
AVAILTUNES += "ppce6500 ppc64e6500"
-TUNE_FEATURES_tune-ppce6500 = "m32 fpu-hard e6500 altivec"
+TUNE_FEATURES_tune-ppce6500 = "m32 fpu-hard e6500 altivec bigendian"
BASE_LIB_tune-ppce6500 = "lib"
TUNE_PKGARCH_tune-ppce6500 = "ppce6500"
PACKAGE_EXTRA_ARCHS_tune-ppce6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce6500"
-TUNE_FEATURES_tune-ppc64e6500 = "m64 fpu-hard e6500 altivec"
+TUNE_FEATURES_tune-ppc64e6500 = "m64 fpu-hard e6500 altivec bigendian"
BASE_LIB_tune-ppc64e6500 = "lib64"
TUNE_PKGARCH_tune-ppc64e6500 = "ppc64e6500"
PACKAGE_EXTRA_ARCHS_tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64e6500"
diff --git a/meta/conf/machine/include/tune-strongarm1100.inc b/meta/conf/machine/include/tune-strongarm1100.inc
index 80cfb8ab8a..e978e925d2 100644
--- a/meta/conf/machine/include/tune-strongarm1100.inc
+++ b/meta/conf/machine/include/tune-strongarm1100.inc
@@ -4,8 +4,9 @@ require conf/machine/include/arm/arch-armv4.inc
TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', 'armv4:', '' ,d)}"
AVAILTUNES += "strongarm"
ARMPKGARCH_tune-strongarm = "strongarm"
-TUNE_FEATURES_tune-strongarm = "${TUNE_FEATURES_tune-armv4} strongarm"
+TUNE_FEATURES_tune-strongarm = "arm strongarm"
PACKAGE_EXTRA_ARCHS_tune-strongarm = "${PACKAGE_EXTRA_ARCHS_tune-armv4} strongarm"
diff --git a/meta/conf/machine/include/tune-thunderx.inc b/meta/conf/machine/include/tune-thunderx.inc
index 3d43b0f7e5..aa4d0501d4 100644
--- a/meta/conf/machine/include/tune-thunderx.inc
+++ b/meta/conf/machine/include/tune-thunderx.inc
@@ -1,11 +1,11 @@
-require conf/machine/include/arm/arch-armv8.inc
-
DEFAULTTUNE ?= "thunderx"
AVAILTUNES += "thunderx thunderx_be"
TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx', '',d)}"
+
+require conf/machine/include/arm/arch-armv8a.inc
ARMPKGARCH_tune-thunderx ?= "thunderx"
ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"
@@ -15,5 +15,5 @@ TUNE_FEATURES_tune-thunderx_be = "${TUNE_FEATURES_tune-thunderx} bigendian"
BASE_LIB_tune-thunderx = "lib64"
BASE_LIB_tune-thunderx_be = "lib64"
-PACKAGE_EXTRA_ARCHS_tune-thunderx = "aarch64 thunderx"
+PACKAGE_EXTRA_ARCHS_tune-thunderx = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} thunderx"
PACKAGE_EXTRA_ARCHS_tune-thunderx_be = "aarch64_be thunderx_be"
diff --git a/meta/conf/machine/include/tune-xscale.inc b/meta/conf/machine/include/tune-xscale.inc
index 0d07333955..19d5e13e61 100644
--- a/meta/conf/machine/include/tune-xscale.inc
+++ b/meta/conf/machine/include/tune-xscale.inc
@@ -4,13 +4,16 @@ require conf/machine/include/arm/arch-armv5-dsp.inc
TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'xscale', 'armv5:', '' ,d)}"
AVAILTUNES += "xscale"
ARMPKGARCH_tune-xscale = "xscale"
-TUNE_FEATURES_tune-xscale = "${TUNE_FEATURES_tune-armv5te} xscale"
+# mcpu is used so don't use armv5te as we don't want march
+TUNE_FEATURES_tune-xscale = "arm thumb dsp xscale"
PACKAGE_EXTRA_ARCHS_tune-xscale = "${PACKAGE_EXTRA_ARCHS_tune-armv5te} xscale xscalet xscalee xscalete"
AVAILTUNES += "xscale-be"
ARMPKGARCH_tune-xscale-be = "xscale"
-TUNE_FEATURES_tune-xscale-be = "${TUNE_FEATURES_tune-armv5teb} xscale bigendian"
+# mcpu is used so don't use armv5te as we don't want march
+TUNE_FEATURES_tune-xscale-be = "${TUNE_FEATURES_tune-xscale} bigendian"
PACKAGE_EXTRA_ARCHS_tune-xscale-be = "${PACKAGE_EXTRA_ARCHS_tune-armv5teb} xscaleb xscaletb xscaleeb xscaleteb"
diff --git a/meta/conf/machine/include/x86-base.inc b/meta/conf/machine/include/x86-base.inc
index 5663145be9..da56cc3574 100644
--- a/meta/conf/machine/include/x86-base.inc
+++ b/meta/conf/machine/include/x86-base.inc
@@ -8,28 +8,22 @@
MACHINE_FEATURES += "screen keyboard pci usbhost ext2 ext3 x86 \
acpi serial usbgadget alsa"
-MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
-
-IMAGE_FSTYPES += "live"
+IMAGE_FSTYPES ?= "wic"
KERNEL_IMAGETYPE ?= "bzImage"
-SERIAL_CONSOLE ?= "115200 ttyS0"
+SERIAL_CONSOLES ?= "115200;ttyS0"
#
# kernel-related variables
#
PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ??= "4.4%"
+PREFERRED_VERSION_linux-yocto ??= "5.2%"
#
# XSERVER subcomponents, used to build the XSERVER variable
#
XSERVER_X86_BASE = "xserver-xorg \
- xf86-input-mouse \
- xf86-input-keyboard \
- xf86-input-evdev \
- xf86-input-synaptics \
"
XSERVER_X86_EXT = " \
diff --git a/meta/conf/machine/include/x86/arch-x86.inc b/meta/conf/machine/include/x86/arch-x86.inc
index e51d595f74..70814b8d4d 100644
--- a/meta/conf/machine/include/x86/arch-x86.inc
+++ b/meta/conf/machine/include/x86/arch-x86.inc
@@ -26,6 +26,7 @@ TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-m elf32_x86_64',
TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}"
# user mode qemu doesn't support x32
MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'qemu-usermode', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '' ,d)}"
# ELF64 ABI
TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
index 17402ef3b3..26f40b1419 100644
--- a/meta/conf/machine/qemuarm.conf
+++ b/meta/conf/machine/qemuarm.conf
@@ -1,20 +1,32 @@
#@TYPE: Machine
-#@NAME: arm_versatile_926ejs
-#@DESCRIPTION: arm_versatile_926ejs
+#@NAME: QEMU Arm Cortex-A15 machine
+#@DESCRIPTION: Machine configuration for running an ARMv7 system on QEMU
+require conf/machine/include/tune-cortexa15.inc
require conf/machine/include/qemu.inc
-require conf/machine/include/tune-arm926ejs.inc
-#require conf/machine/include/tune-arm1136jf-s.inc
KERNEL_IMAGETYPE = "zImage"
-SERIAL_CONSOLES = "115200;ttyAMA0 115200;ttyAMA1"
+SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0"
# For runqemu
QB_SYSTEM_NAME = "qemu-system-arm"
-QB_MACHINE = "-machine versatilepb"
-QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 console=tty"
-# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
-QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
-PREFERRED_VERSION_linux-yocto ??= "4.8%"
-QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
+QB_MACHINE = "-machine virt"
+QB_CPU = "-cpu cortex-a15"
+# Standard Serial console
+QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0"
+# For graphics to work we need to define the VGA device as well as the necessary USB devices
+QB_OPT_APPEND = "-show-cursor -device VGA,edid=on"
+QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd"
+# Add the virtio RNG
+QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0"
+# Virtio Networking support
+QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
+QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
+# Virtio block device
+QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
+# Virtio serial console
+QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
+QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
+
+KMACHINE_qemuarm = "qemuarma15"
diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
index d0750624a8..ec2a887bdd 100644
--- a/meta/conf/machine/qemuarm64.conf
+++ b/meta/conf/machine/qemuarm64.conf
@@ -1,24 +1,31 @@
#@TYPE: Machine
-#@NAME: generic armv8 machine
-#@DESCRIPTION: Machine configuration for running a generic armv8
+#@NAME: QEMU ARMv8 machine
+#@DESCRIPTION: Machine configuration for running an ARMv8 system on QEMU
-require conf/machine/include/arm/arch-armv8.inc
+require conf/machine/include/arm/arch-armv8a.inc
require conf/machine/include/qemu.inc
KERNEL_IMAGETYPE = "Image"
-SERIAL_CONSOLES = "38400;ttyAMA0 38400;hvc0"
+SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0"
# For runqemu
QB_SYSTEM_NAME = "qemu-system-aarch64"
-QB_MEM = "-m 512"
QB_MACHINE = "-machine virt"
QB_CPU = "-cpu cortex-a57"
-QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,38400"
+QB_CPU_KVM = "-cpu host"
+# Standard Serial console
+QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0"
+# For graphics to work we need to define the VGA device as well as the necessary USB devices
+QB_OPT_APPEND = "-show-cursor -device VGA,edid=on"
+QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd"
# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
-QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci"
-QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0,mac=@MAC@"
-QB_SLIRP_OPT = "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
+QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0"
+# Virtio Networking support
+QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
+QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
+# Virtio block device
QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
+# Virtio serial console
QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
-QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
+QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
diff --git a/meta/conf/machine/qemuarmv5.conf b/meta/conf/machine/qemuarmv5.conf
new file mode 100644
index 0000000000..fb4789fdac
--- /dev/null
+++ b/meta/conf/machine/qemuarmv5.conf
@@ -0,0 +1,23 @@
+#@TYPE: Machine
+#@NAME: QEMU ARM9 machine
+#@DESCRIPTION: Machine configuration for running an ARMv5 system on QEMU
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/tune-arm926ejs.inc
+#require conf/machine/include/tune-arm1136jf-s.inc
+
+KERNEL_IMAGETYPE = "zImage"
+
+SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;ttyAMA1"
+
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_MACHINE = "-machine versatilepb"
+QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 console=tty"
+QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet"
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0"
+PREFERRED_VERSION_linux-yocto ??= "5.2%"
+QB_DTB = "${@oe.utils.version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
+
+KMACHINE_qemuarmv5 = "qemuarm"
diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
index 3182ea1b54..31ad754483 100644
--- a/meta/conf/machine/qemumips.conf
+++ b/meta/conf/machine/qemumips.conf
@@ -1,6 +1,6 @@
#@TYPE: Machine
-#@NAME: mti_malta32_be MIPS
-#@DESCRIPTION: mti_malta32_be
+#@NAME: QEMU MIPS32 machine
+#@DESCRIPTION: Machine configuration for running a MIPS system on QEMU
require conf/machine/include/qemu.inc
require conf/machine/include/tune-mips32r2.inc
@@ -9,6 +9,6 @@ require conf/machine/include/qemuboot-mips.inc
KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
-SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+QB_SYSTEM_NAME = "qemu-system-mips"
diff --git a/meta/conf/machine/qemumips64.conf b/meta/conf/machine/qemumips64.conf
index 9529f4c4f3..6d5174665f 100644
--- a/meta/conf/machine/qemumips64.conf
+++ b/meta/conf/machine/qemumips64.conf
@@ -1,14 +1,16 @@
#@TYPE: Machine
-#@NAME: mti-malta64-be MIPS64
-#@DESCRIPTION: mti-malta64-be
+#@NAME: QEMU MIPS64 machine
+#@DESCRIPTION: Machine configuration for running a MIPS64 system on QEMU
require conf/machine/include/qemu.inc
-require conf/machine/include/tune-mips64.inc
+require conf/machine/include/tune-mips64r2.inc
require conf/machine/include/qemuboot-mips.inc
+QB_CPU = "-cpu MIPS64R2-generic"
+
KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
-SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+QB_SYSTEM_NAME = "qemu-system-mips64"
diff --git a/meta/conf/machine/qemuppc.conf b/meta/conf/machine/qemuppc.conf
index 8703c2086a..bd88eeb12a 100644
--- a/meta/conf/machine/qemuppc.conf
+++ b/meta/conf/machine/qemuppc.conf
@@ -1,6 +1,6 @@
#@TYPE: Machine
-#@NAME: qemu PPC Emulator setup
-#@DESCRIPTION: Machine configuration for running an PPC system under qemu emulation
+#@NAME: QEMU PPC machine
+#@DESCRIPTION: Machine configuration for running a PPC system on QEMU
require conf/machine/include/qemu.inc
require conf/machine/include/tune-ppc7400.inc
@@ -9,13 +9,14 @@ TARGET_CC_KERNEL_ARCH = "-mno-spe"
KERNEL_IMAGETYPE = "vmlinux"
-SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
# For runqemu
QB_SYSTEM_NAME = "qemu-system-ppc"
QB_MACHINE = "-machine mac99"
QB_CPU = "-cpu G4"
QB_KERNEL_CMDLINE_APPEND = "console=tty console=ttyS0"
+QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet"
# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
-QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
-QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-pci,netdev=net0,mac=@MAC@"
+QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0"
+QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
diff --git a/meta/conf/machine/qemuriscv64.conf b/meta/conf/machine/qemuriscv64.conf
new file mode 100644
index 0000000000..b45fdd556d
--- /dev/null
+++ b/meta/conf/machine/qemuriscv64.conf
@@ -0,0 +1,9 @@
+#@TYPE: Machine
+#@NAME: generic riscv64 machine
+#@DESCRIPTION: Machine configuration for running a generic riscv64
+
+require conf/machine/include/riscv/qemuriscv.inc
+
+EXTRA_IMAGEDEPENDS += "u-boot"
+UBOOT_MACHINE = "qemu-riscv64_smode_defconfig"
+UBOOT_ELF = "u-boot"
diff --git a/meta/conf/machine/qemux86-64.conf b/meta/conf/machine/qemux86-64.conf
index b191ddd3cb..648cf2fe8f 100644
--- a/meta/conf/machine/qemux86-64.conf
+++ b/meta/conf/machine/qemux86-64.conf
@@ -1,6 +1,6 @@
#@TYPE: Machine
-#@NAME: common_pc
-#@DESCRIPTION: Machine configuration for running a common x86
+#@NAME: QEMU x86-64 machine
+#@DESCRIPTION: Machine configuration for running an x86-64 system on QEMU
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
@@ -12,22 +12,37 @@ DEFAULTTUNE ?= "core2-64"
require conf/machine/include/tune-core2.inc
require conf/machine/include/qemuboot-x86.inc
+UBOOT_MACHINE ?= "qemu-x86_64_defconfig"
+
KERNEL_IMAGETYPE = "bzImage"
-SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
+# Install swrast and glx if opengl is in DISTRO_FEATURES and x32 is not in use.
+# This is because gallium swrast driver was found to crash X server on startup in qemu x32.
XSERVER = "xserver-xorg \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \
- xf86-input-vmmouse \
- xf86-input-keyboard \
- xf86-input-evdev \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', \
+ bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'mesa-driver-swrast xserver-xorg-extension-glx', d), '', d)} \
xf86-video-cirrus \
xf86-video-fbdev \
xf86-video-vmware \
xf86-video-modesetting \
+ xf86-video-vesa \
xserver-xorg-module-libint10 \
"
-MACHINE_FEATURES += "x86"
+MACHINE_FEATURES += "x86 pci"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
+
+MACHINE_EXTRA_RRECOMMENDS = "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+
+KERNEL_MODULE_AUTOLOAD += "uvesafb"
+KERNEL_MODULE_PROBECONF += "uvesafb"
+module_conf_uvesafb = "options uvesafb mode_option=${UVESA_MODE}"
+
+WKS_FILE ?= "qemux86-directdisk.wks"
+do_image_wic[depends] += "syslinux:do_populate_sysroot syslinux-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
+
+#For runqemu
+QB_SYSTEM_NAME = "qemu-system-x86_64"
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index 8555fd6bfe..8e0da82076 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -1,6 +1,6 @@
#@TYPE: Machine
-#@NAME: common_pc
-#@DESCRIPTION: Machine configuration for running a common x86
+#@NAME: QEMU x86 machine
+#@DESCRIPTION: Machine configuration for running an x86 system on QEMU
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
@@ -8,25 +8,38 @@ PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
require conf/machine/include/qemu.inc
-require conf/machine/include/tune-i586.inc
+DEFAULTTUNE ?= "core2-32"
+require conf/machine/include/tune-corei7.inc
require conf/machine/include/qemuboot-x86.inc
+UBOOT_MACHINE ?= "qemu-x86_defconfig"
+
KERNEL_IMAGETYPE = "bzImage"
-SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
XSERVER = "xserver-xorg \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \
- xf86-input-vmmouse \
- xf86-input-keyboard \
- xf86-input-evdev \
xf86-video-cirrus \
xf86-video-fbdev \
xf86-video-vmware \
xf86-video-modesetting \
+ xf86-video-vesa \
xserver-xorg-module-libint10 \
"
-MACHINE_FEATURES += "x86"
+MACHINE_FEATURES += "x86 pci"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
+
+MACHINE_EXTRA_RRECOMMENDS = "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+
+KERNEL_MODULE_AUTOLOAD += "uvesafb"
+KERNEL_MODULE_PROBECONF += "uvesafb"
+module_conf_uvesafb = "options uvesafb mode_option=${UVESA_MODE}"
+
+WKS_FILE ?= "qemux86-directdisk.wks"
+do_image_wic[depends] += "syslinux:do_populate_sysroot syslinux-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
+
+#For runqemu
+QB_SYSTEM_NAME = "qemu-system-i386"
diff --git a/scripts/lib/wic/imager/__init__.py b/meta/conf/multiconfig/default.conf
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/wic/imager/__init__.py
+++ b/meta/conf/multiconfig/default.conf
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 50303fb5d6..cfed3fbbd0 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -1,14 +1,14 @@
-baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or d.getVar('BASELIB', True)}"
+baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE') or 'INVALID')) or d.getVar('BASELIB')}"
MULTILIB_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}"
MULTILIB_SAVE_VARNAME = "DEFAULTTUNE TARGET_ARCH TARGET_SYS TARGET_VENDOR"
MULTILIBS ??= "multilib:lib32"
-STAGING_DIR_HOST = "${STAGING_DIR}/${MLPREFIX}${MACHINE}"
-STAGING_DIR_TARGET = "${STAGING_DIR}/${MLPREFIX}${MACHINE}"
-PKGDATA_DIR = "${STAGING_DIR}/${MACHINE}/pkgdata"
+STAGING_DIR_HOST = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
+STAGING_DIR_TARGET = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
+RECIPE_SYSROOT = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
INHERIT += "multilib_global"
@@ -23,5 +23,10 @@ OPKG_ARGS_append = " --force-maintainer --force-overwrite"
# find an allarch pkgconfig file will fail as the PKG_CONFIG_PATH only looks
# inside the multilib sysroot. Fix this by explicitly adding the MACHINE's
# architecture-independent pkgconfig location to PKG_CONFIG_PATH.
-PKG_CONFIG_PATH .= ":${STAGING_DIR}/${MACHINE}${datadir}/pkgconfig"
-PKG_CONFIG_PATH[vardepsexclude] = "MACHINE"
+PKG_CONFIG_PATH .= ":${WORKDIR}/recipe-sysroot/${datadir}/pkgconfig"
+PKG_CONFIG_PATH[vardepsexclude] = "datadir WORKDIR"
+PKG_CONFIG_PATH[vardepvalueexclude] = ":${WORKDIR}/recipe-sysroot/${datadir}/pkgconfig"
+
+# These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES
+# ${MLPREFIX}${BPN}
+NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf"
diff --git a/meta/conf/sanity.conf b/meta/conf/sanity.conf
index e07b09da74..8b2f655394 100644
--- a/meta/conf/sanity.conf
+++ b/meta/conf/sanity.conf
@@ -3,7 +3,7 @@
# See sanity.bbclass
#
# Expert users can confirm their sanity with "touch conf/sanity.conf"
-BB_MIN_VERSION = "1.31.1"
+BB_MIN_VERSION = "1.43.2"
SANITY_ABIFILE = "${TMPDIR}/abi_version"
diff --git a/meta/conf/site.conf.sample b/meta/conf/site.conf.sample
index 6cfefc574a..5164fedf63 100644
--- a/meta/conf/site.conf.sample
+++ b/meta/conf/site.conf.sample
@@ -24,7 +24,9 @@ SCONF_VERSION = "1"
#or
#ALL_PROXY ?= "https://proxy.example.com:8080"
# If you wish to use certain hosts without the proxy, specify them in NO_PROXY.
-# See the script for details on syntax.
+# See the script for details on syntax. The script oe-git-proxy uses some tools
+# that may not be included on HOSTTOOLS, thus add them manually through
+# HOSTTOOLS += "getent"
# Uncomment this to use a shared download directory
#DL_DIR = "/some/shared/download/directory/"
diff --git a/meta/conf/toasterconf.json b/meta/conf/toasterconf.json
deleted file mode 100644
index 796125bbfd..0000000000
--- a/meta/conf/toasterconf.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "config": {
- "MACHINE" : "qemux86",
- "DISTRO" : "nodistro",
- "DL_DIR" : "${TOPDIR}/../downloads",
- "IMAGE_FSTYPES": "ext4 jffs2 tar.bz2",
- "IMAGE_INSTALL_append": "",
- "PACKAGE_CLASSES": "package_rpm",
- "SSTATE_DIR" : "${TOPDIR}/../sstate-cache"
- },
- "layersources": [
- {
- "name": "Local OpenEmbedded",
- "sourcetype": "local",
- "apiurl": "../../",
- "branches": ["HEAD", "master"],
- "layers": [
- {
- "name": "openembedded-core",
- "local_path": "meta",
- "vcs_url": "remote:origin",
- "dirpath": "meta"
- }
- ]
- },
- {
- "name": "OpenEmbedded",
- "sourcetype": "layerindex",
- "apiurl": "http://layers.openembedded.org/layerindex/api/",
- "branches": ["master"]
- },
- {
- "name": "Imported layers",
- "sourcetype": "imported",
- "apiurl": "",
- "branches": ["master", "HEAD"]
-
- }
- ],
- "bitbake" : [
- {
- "name": "master",
- "giturl": "git://git.openembedded.org/bitbake",
- "branch": "master",
- "dirpath": ""
- },
- {
- "name": "HEAD",
- "giturl": "git://git.openembedded.org/bitbake",
- "branch": "HEAD",
- "dirpath": ""
- }
- ],
-
- "defaultrelease": "master",
-
- "releases": [
- {
- "name": "master",
- "description": "OpenEmbedded master",
- "bitbake": "master",
- "branch": "master",
- "defaultlayers": [ "openembedded-core" ],
- "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/\">OpenEmbedded master</a> branch, where active development takes place. This is not a stable branch, so your builds might not work as expected."
- },
- {
- "name": "local",
- "description": "Local OpenEmbedded",
- "bitbake": "HEAD",
- "branch": "HEAD",
- "defaultlayers": [ "openembedded-core" ],
- "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds with the version of OpenEmbedded that you have cloned or downloaded to your computer."
- }
- ]
-}
diff --git a/meta/files/common-licenses/Apache-2.0-with-LLVM-exception b/meta/files/common-licenses/Apache-2.0-with-LLVM-exception
new file mode 100644
index 0000000000..f9dc50615d
--- /dev/null
+++ b/meta/files/common-licenses/Apache-2.0-with-LLVM-exception
@@ -0,0 +1,219 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+
+--- LLVM Exceptions to the Apache 2.0 License ----
+
+As an exception, if, as a result of your compiling your source code, portions
+of this Software are embedded into an Object form of such source code, you
+may redistribute such embedded portions in such Object form without complying
+with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
+
+In addition, if you combine or link compiled forms of this Software with
+software that is licensed under the GPLv2 ("Combined Software") and if a
+court of competent jurisdiction determines that the patent provision (Section
+3), the indemnity provision (Section 9) or other Section of the License
+conflicts with the conditions of the GPLv2, you may retroactively and
+prospectively choose to deem waived or otherwise exclude such Section(s) of
+the License, but only in their entirety and only with respect to the Combined
+Software.
+
diff --git a/meta/files/common-licenses/BSD-1-Clause b/meta/files/common-licenses/BSD-1-Clause
new file mode 100644
index 0000000000..ded889768f
--- /dev/null
+++ b/meta/files/common-licenses/BSD-1-Clause
@@ -0,0 +1,9 @@
+
+Copyright (c) <YEAR>, <OWNER>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. "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 Berkeley Software Design, Inc. 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.
+
diff --git a/meta/files/common-licenses/BSD-2-Clause b/meta/files/common-licenses/BSD-2-Clause
index ade0f34d59..f1917d6b73 100644
--- a/meta/files/common-licenses/BSD-2-Clause
+++ b/meta/files/common-licenses/BSD-2-Clause
@@ -1,13 +1,10 @@
-The FreeBSD Copyright
-
-Copyright 1992-2010 The FreeBSD Project. All rights reserved.
+Copyright <YEAR> <COPYRIGHT HOLDER>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-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 FREEBSD PROJECT ``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 FREEBSD PROJECT 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.
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project.
+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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
diff --git a/meta/files/common-licenses/CC-BY-SA-4.0 b/meta/files/common-licenses/CC-BY-SA-4.0
new file mode 100644
index 0000000000..fe8dbc50fc
--- /dev/null
+++ b/meta/files/common-licenses/CC-BY-SA-4.0
@@ -0,0 +1,428 @@
+Attribution-ShareAlike 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+=======================================================================
+
+Creative Commons Attribution-ShareAlike 4.0 International Public
+License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution-ShareAlike 4.0 International Public License ("Public
+License"). To the extent this Public License may be interpreted as a
+contract, You are granted the Licensed Rights in consideration of Your
+acceptance of these terms and conditions, and the Licensor grants You
+such rights in consideration of benefits the Licensor receives from
+making the Licensed Material available under these terms and
+conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. BY-SA Compatible License means a license listed at
+ creativecommons.org/compatiblelicenses, approved by Creative
+ Commons as essentially the equivalent of this Public License.
+
+ d. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ e. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ f. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ g. License Elements means the license attributes listed in the name
+ of a Creative Commons Public License. The License Elements of this
+ Public License are Attribution and ShareAlike.
+
+ h. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ i. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ j. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ k. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ l. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ m. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+
+ b. produce, reproduce, and Share Adapted Material.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. Additional offer from the Licensor -- Adapted Material.
+ Every recipient of Adapted Material from You
+ automatically receives an offer from the Licensor to
+ exercise the Licensed Rights in the Adapted Material
+ under the conditions of the Adapter's License You apply.
+
+ c. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ b. ShareAlike.
+
+ In addition to the conditions in Section 3(a), if You Share
+ Adapted Material You produce, the following conditions also apply.
+
+ 1. The Adapter's License You apply must be a Creative Commons
+ license with the same License Elements, this version or
+ later, or a BY-SA Compatible License.
+
+ 2. You must include the text of, or the URI or hyperlink to, the
+ Adapter's License You apply. You may satisfy this condition
+ in any reasonable manner based on the medium, means, and
+ context in which You Share Adapted Material.
+
+ 3. You may not offer or impose any additional or different terms
+ or conditions on, or apply any Effective Technological
+ Measures to, Adapted Material that restrict exercise of the
+ rights granted under the Adapter's License You apply.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material,
+
+ including for purposes of Section 3(b); and
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+
+=======================================================================
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the “Licensor.†The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
+
diff --git a/meta/files/common-licenses/EPL-2.0 b/meta/files/common-licenses/EPL-2.0
new file mode 100644
index 0000000000..e48e096345
--- /dev/null
+++ b/meta/files/common-licenses/EPL-2.0
@@ -0,0 +1,277 @@
+Eclipse Public License - v 2.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+ a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+ i) changes to the Program, and
+ ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ "originates" from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+
+"Contributor" means any person or entity that Distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+"Program" means the Contributions Distributed in accordance with this
+Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+"Derivative Works" shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+"Modified Works" shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+"Distribute" means the acts of a) distributing or b) making available
+in any manner that enables the transfer of a copy.
+
+"Source Code" means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+"Secondary License" means either the GNU General Public License,
+Version 2.0, or any later versions of that license, including any
+exceptions or additional permissions as identified by the initial
+Contributor.
+
+2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby
+ assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party
+ patent license is required to allow Recipient to Distribute the
+ Program, it is Recipient's responsibility to acquire that license
+ before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+
+ e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License
+ (if permitted under the terms of Section 3).
+
+3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+
+ ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+
+ iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+
+ iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements
+ of this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ a) it must be made available under this Agreement, or if the
+ Program (i) is combined with other material in a separate file or
+ files made available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+
+ b) a copy of this Agreement must be included with each copy of
+ the Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability ("notices") contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program,
+the Contributor who includes the Program in a commercial product
+offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes
+the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify every
+other Contributor ("Indemnified Contributor") against any losses,
+damages and costs (collectively "Losses") arising from claims, lawsuits
+and other legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the Program
+in a commercial product offering. The obligations in this section do not
+apply to any claims or Losses relating to any actual or alleged
+intellectual property infringement. In order to qualify, an Indemnified
+Contributor must: a) promptly notify the Commercial Contributor in
+writing of such claim, and b) allow the Commercial Contributor to control,
+and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those performance
+claims and warranties, and if a court requires any other Contributor to
+pay any damages as a result, the Commercial Contributor must pay
+those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs
+or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further
+action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software
+or hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of
+time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use
+and distribution of the Program as soon as reasonably practicable.
+However, Recipient's obligations under this Agreement and any licenses
+granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and
+may only be modified in the following manner. The Agreement Steward
+reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement
+Steward has the right to modify this Agreement. The Eclipse Foundation
+is the initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is published,
+Contributor may elect to Distribute the Program (including its
+Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+Exhibit A - Form of Secondary Licenses Notice
+
+"This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}."
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a LICENSE
+ file in a relevant directory) where a recipient would be likely to
+ look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
diff --git a/meta/files/common-licenses/Elfutils-Exception b/meta/files/common-licenses/Elfutils-Exception
deleted file mode 100644
index 627d769126..0000000000
--- a/meta/files/common-licenses/Elfutils-Exception
+++ /dev/null
@@ -1,12 +0,0 @@
- This file describes the limits of the Exception under which you are allowed
- to distribute Non-GPL Code in linked combination with Red Hat elfutils.
- For the full text of the license, please see one of the header files
- included with the source distribution or the file COPYING found in the
- top level directory of the source.
-
- The Approved Interfaces are the functions declared in the files:
-
- libelf.h
- libdw.h
- libdwfl.h
-
diff --git a/meta/files/common-licenses/FreeType b/meta/files/common-licenses/FreeType
index b7d4d11c0f..3666649f3e 100644
--- a/meta/files/common-licenses/FreeType
+++ b/meta/files/common-licenses/FreeType
@@ -48,7 +48,7 @@ Introduction
encourage you to use the following text:
"""
- Portions of this software are copyright � <year> The FreeType
+ Portions of this software are copyright © <year> The FreeType
Project (www.freetype.org). All rights reserved.
"""
@@ -163,7 +163,7 @@ Legal Terms
Our home page can be found at
- http://www.freetype.org
+ https://www.freetype.org
--- end of FTL.TXT ---
diff --git a/meta/files/common-licenses/Intel b/meta/files/common-licenses/Intel
new file mode 100644
index 0000000000..29ddf57a8c
--- /dev/null
+++ b/meta/files/common-licenses/Intel
@@ -0,0 +1,105 @@
+1. Copyright Notice
+
+Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
+All rights reserved.
+
+2. License
+
+2.1. This is your license from Intel Corp. under its intellectual property
+rights. You may have additional license terms from the party that provided
+you this software, covering your right to use that party's intellectual
+property rights.
+
+2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+copy of the source code appearing in this file ("Covered Code") an
+irrevocable, perpetual, worldwide license under Intel's copyrights in the
+base code distributed originally by Intel ("Original Intel Code") to copy,
+make derivatives, distribute, use and display any portion of the Covered
+Code in any form, with the right to sublicense such rights; and
+
+2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+license (with the right to sublicense), under only those claims of Intel
+patents that are infringed by the Original Intel Code, to make, use, sell,
+offer to sell, and import the Covered Code and derivative works thereof
+solely to the minimum extent necessary to exercise the above copyright
+license, and in no event shall the patent license extend to any additions
+to or modifications of the Original Intel Code. No other license or right
+is granted directly or by implication, estoppel or otherwise;
+
+The above copyright and patent license is granted only if the following
+conditions are met:
+
+3. Conditions
+
+3.1. Redistribution of Source with Rights to Further Distribute Source.
+Redistribution of source code of any substantial portion of the Covered
+Code or modification with rights to further distribute source must include
+the above Copyright Notice, the above License, this list of Conditions,
+and the following Disclaimer and Export Compliance provision. In addition,
+Licensee must cause all Covered Code to which Licensee contributes to
+contain a file documenting the changes Licensee made to create that Covered
+Code and the date of any change. Licensee must include in that file the
+documentation of any changes made by any predecessor Licensee. Licensee
+must include a prominent statement that the modification is derived,
+directly or indirectly, from Original Intel Code.
+
+3.2. Redistribution of Source with no Rights to Further Distribute Source.
+Redistribution of source code of any substantial portion of the Covered
+Code or modification without rights to further distribute source must
+include the following Disclaimer and Export Compliance provision in the
+documentation and/or other materials provided with distribution. In
+addition, Licensee may not authorize further sublicense of source of any
+portion of the Covered Code, and must include terms to the effect that the
+license from Licensee to its licensee is limited to the intellectual
+property embodied in the software Licensee provides to its licensee, and
+not to intellectual property embodied in modifications its licensee may
+make.
+
+3.3. Redistribution of Executable. Redistribution in executable form of any
+substantial portion of the Covered Code or modification must reproduce the
+above Copyright Notice, and the following Disclaimer and Export Compliance
+provision in the documentation and/or other materials provided with the
+distribution.
+
+3.4. Intel retains all right, title, and interest in and to the Original
+Intel Code.
+
+3.5. Neither the name Intel nor any other trademark owned or controlled by
+Intel shall be used in advertising or otherwise to promote the sale, use or
+other dealings in products derived from or relating to the Covered Code
+without prior written authorization from Intel.
+
+4. Disclaimer and Export Compliance
+
+4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+PARTICULAR PURPOSE.
+
+4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+LIMITED REMEDY.
+
+4.3. Licensee shall not export, either directly or indirectly, any of this
+software or system incorporating such software without first obtaining any
+required license or other approval from the U. S. Department of Commerce or
+any other agency or department of the United States Government. In the
+event Licensee exports any such software from the United States or
+re-exports any such software from a foreign destination, Licensee shall
+ensure that the distribution and export/re-export of the software is in
+compliance with all laws, regulations, orders, or other restrictions of the
+U.S. Export Administration Regulations. Licensee agrees that neither it nor
+any of its subsidiaries will export/re-export any technical data, process,
+software, or service, directly or indirectly, to any country for which the
+United States government or any agency thereof requires an export license,
+other governmental approval, or letter of assurance, without first obtaining
+such license, approval or letter.
+
diff --git a/meta/files/common-licenses/Libpng b/meta/files/common-licenses/Libpng
index a9d5b031b0..62ab8e48dc 100644
--- a/meta/files/common-licenses/Libpng
+++ b/meta/files/common-licenses/Libpng
@@ -1,112 +1,134 @@
-
-This copy of the libpng notices is provided for your convenience. In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
-
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
-
-If you modify libpng you may insert additional notices immediately following
-this sentence.
-
-This code is released under the libpng license.
-
-libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are
-Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.2.5
-with the following individual added to the list of Contributing Authors
-
- Cosmin Truta
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
-Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.0.6
-with the following individuals added to the list of Contributing Authors
-
- Simon-Pierre Cadieux
- Eric S. Raymond
- Gilles Vollant
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
+=========================================
+
+PNG Reference Library License version 2
+---------------------------------------
+
+ * Copyright (c) 1995-2018 The PNG Reference Library Authors.
+ * Copyright (c) 2018 Cosmin Truta.
+ * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
+ * Copyright (c) 1996-1997 Andreas Dilger.
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+The software is supplied "as is", without warranty of any kind,
+express or implied, including, without limitation, the warranties
+of merchantability, fitness for a particular purpose, title, and
+non-infringement. In no even shall the Copyright owners, or
+anyone distributing the software, be liable for any damages or
+other liability, whether in contract, tort or otherwise, arising
+from, out of, or in connection with the software, or the use or
+other dealings in the software, even if advised of the possibility
+of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute
+this software, or portions hereof, for any purpose, without fee,
+subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you
+ must not claim that you wrote the original software. If you
+ use this software in a product, an acknowledgment in the product
+ documentation would be appreciated, but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+
+
+PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
+-----------------------------------------------------------------------
+
+libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
+Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
+derived from libpng-1.0.6, and are distributed according to the same
+disclaimer and license as libpng-1.0.6 with the following individuals
+added to the list of Contributing Authors:
+
+ Simon-Pierre Cadieux
+ Eric S. Raymond
+ Mans Rullgard
+ Cosmin Truta
+ Gilles Vollant
+ James Yu
+ Mandar Sahastrabuddhe
+ Google Inc.
+ Vadim Barkov
and with the following additions to the disclaimer:
- There is no warranty against interference with your enjoyment of the
- library or against infringement. There is no warranty that our
- efforts or the library will fulfill any of your particular purposes
- or needs. This library is provided with all faults, and the entire
- risk of satisfactory quality, performance, accuracy, and effort is with
- the user.
+ There is no warranty against interference with your enjoyment of
+ the library or against infringement. There is no warranty that our
+ efforts or the library will fulfill any of your particular purposes
+ or needs. This library is provided with all faults, and the entire
+ risk of satisfactory quality, performance, accuracy, and effort is
+ with the user.
+
+Some files in the "contrib" directory and some configure-generated
+files that are distributed with libpng have other copyright owners, and
+are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-0.96,
-with the following individuals added to the list of Contributing Authors:
+Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
+libpng-0.96, and are distributed according to the same disclaimer and
+license as libpng-0.96, with the following individuals added to the
+list of Contributing Authors:
- Tom Lane
- Glenn Randers-Pehrson
- Willem van Schaik
+ Tom Lane
+ Glenn Randers-Pehrson
+ Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996, 1997 Andreas Dilger
-Distributed according to the same disclaimer and license as libpng-0.88,
-with the following individuals added to the list of Contributing Authors:
+Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
+and are distributed according to the same disclaimer and license as
+libpng-0.88, with the following individuals added to the list of
+Contributing Authors:
- John Bowler
- Kevin Bracey
- Sam Bushell
- Magnus Holmgren
- Greg Roelofs
- Tom Tanner
+ John Bowler
+ Kevin Bracey
+ Sam Bushell
+ Magnus Holmgren
+ Greg Roelofs
+ Tom Tanner
+
+Some files in the "scripts" directory have other copyright owners,
+but are released under this license.
libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
- Andreas Dilger
- Dave Martindale
- Guy Eric Schalnat
- Paul Schmidt
- Tim Wegner
-
-The PNG Reference Library is supplied "AS IS". The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose. The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
+ Andreas Dilger
+ Dave Martindale
+ Guy Eric Schalnat
+ Paul Schmidt
+ Tim Wegner
+
+The PNG Reference Library is supplied "AS IS". The Contributing
+Authors and Group 42, Inc. disclaim all warranties, expressed or
+implied, including, without limitation, the warranties of
+merchantability and of fitness for any purpose. The Contributing
+Authors and Group 42, Inc. assume no liability for direct, indirect,
+incidental, special, exemplary, or consequential damages, which may
+result from the use of the PNG Reference Library, even if advised of
+the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
-1. The origin of this source code must not be misrepresented.
-
-2. Altered versions must be plainly marked as such and must not
- be misrepresented as being the original source.
-
-3. This Copyright notice may not be removed or altered from any
- source or altered source distribution.
-
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products. If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
-
-
-A "png_get_copyright" function is available, for convenient use in "about"
-boxes and the like:
-
- printf("%s",png_get_copyright(NULL));
-
-Also, the PNG logo (in PNG format, of course) is supplied in the
-files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
+ 1. The origin of this source code must not be misrepresented.
-Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
-certification mark of the Open Source Initiative.
+ 2. Altered versions must be plainly marked as such and must not
+ be misrepresented as being the original source.
-Glenn Randers-Pehrson
-glennrp at users.sourceforge.net
-December 9, 2010
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+The Contributing Authors and Group 42, Inc. specifically permit,
+without fee, and encourage the use of this source code as a component
+to supporting the PNG file format in commercial products. If you use
+this source code in a product, acknowledgment is not required but would
+be appreciated.
diff --git a/meta/files/common-licenses/pkgconf b/meta/files/common-licenses/pkgconf
new file mode 100644
index 0000000000..81a5221507
--- /dev/null
+++ b/meta/files/common-licenses/pkgconf
@@ -0,0 +1,10 @@
+Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017
+ pkgconf authors (see AUTHORS file in source directory).
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+This software is provided 'as is' and without any warranty, express or
+implied. In no event shall the authors be liable for any damages arising
+from the use of this software.
diff --git a/meta/files/common-licenses/vim b/meta/files/common-licenses/vim
new file mode 100644
index 0000000000..4aa818eb24
--- /dev/null
+++ b/meta/files/common-licenses/vim
@@ -0,0 +1,81 @@
+VIM LICENSE
+
+I) There are no restrictions on distributing unmodified copies of Vim except
+ that they must include this license text. You can also distribute
+ unmodified parts of Vim, likewise unrestricted except that they must
+ include this license text. You are also allowed to include executables
+ that you made from the unmodified Vim sources, plus your own usage
+ examples and Vim scripts.
+
+II) It is allowed to distribute a modified (or extended) version of Vim,
+ including executables and/or source code, when the following four
+ conditions are met:
+ 1) This license text must be included unmodified.
+ 2) The modified Vim must be distributed in one of the following five ways:
+ a) If you make changes to Vim yourself, you must clearly describe in
+ the distribution how to contact you. When the maintainer asks you
+ (in any way) for a copy of the modified Vim you distributed, you
+ must make your changes, including source code, available to the
+ maintainer without fee. The maintainer reserves the right to
+ include your changes in the official version of Vim. What the
+ maintainer will do with your changes and under what license they
+ will be distributed is negotiable. If there has been no negotiation
+ then this license, or a later version, also applies to your changes.
+ The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
+ changes it will be announced in appropriate places (most likely
+ vim.sf.net, www.vim.org and/or comp.editors). When it is completely
+ impossible to contact the maintainer, the obligation to send him
+ your changes ceases. Once the maintainer has confirmed that he has
+ received your changes they will not have to be sent again.
+ b) If you have received a modified Vim that was distributed as
+ mentioned under a) you are allowed to further distribute it
+ unmodified, as mentioned at I). If you make additional changes the
+ text under a) applies to those changes.
+ c) Provide all the changes, including source code, with every copy of
+ the modified Vim you distribute. This may be done in the form of a
+ context diff. You can choose what license to use for new code you
+ add. The changes and their license must not restrict others from
+ making their own changes to the official version of Vim.
+ d) When you have a modified Vim which includes changes as mentioned
+ under c), you can distribute it without the source code for the
+ changes if the following three conditions are met:
+ - The license that applies to the changes permits you to distribute
+ the changes to the Vim maintainer without fee or restriction, and
+ permits the Vim maintainer to include the changes in the official
+ version of Vim without fee or restriction.
+ - You keep the changes for at least three years after last
+ distributing the corresponding modified Vim. When the maintainer
+ or someone who you distributed the modified Vim to asks you (in
+ any way) for the changes within this period, you must make them
+ available to him.
+ - You clearly describe in the distribution how to contact you. This
+ contact information must remain valid for at least three years
+ after last distributing the corresponding modified Vim, or as long
+ as possible.
+ e) When the GNU General Public License (GPL) applies to the changes,
+ you can distribute the modified Vim under the GNU GPL version 2 or
+ any later version.
+ 3) A message must be added, at least in the output of the ":version"
+ command and in the intro screen, such that the user of the modified Vim
+ is able to see that it was modified. When distributing as mentioned
+ under 2)e) adding the message is only required for as far as this does
+ not conflict with the license used for the changes.
+ 4) The contact information as required under 2)a) and 2)d) must not be
+ removed or changed, except that the person himself can make
+ corrections.
+
+III) If you distribute a modified version of Vim, you are encouraged to use
+ the Vim license for your changes and make them available to the
+ maintainer, including the source code. The preferred way to do this is
+ by e-mail or by uploading the files to a server and e-mailing the URL.
+ If the number of changes is small (e.g., a modified Makefile) e-mailing a
+ context diff will do. The e-mail address to be used is
+ <maintainer@vim.org>
+
+IV) It is not allowed to remove this license from the distribution of the Vim
+ sources, parts of it or from a modified version. You may use this
+ license for previous Vim releases instead of the license that they came
+ with, at your option.
+
+===
+Read more about this license at http://vimdoc.sourceforge.net/htmldoc/uganda.html#license
diff --git a/meta/files/deploydir_readme.txt b/meta/files/deploydir_readme.txt
deleted file mode 100644
index 97ec1855f5..0000000000
--- a/meta/files/deploydir_readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Files in the deploy directory will not be re-created automatically if you
-delete them. If you do delete a file, you will need to run:
-
- bitbake -c clean TARGET
- bitbake TARGET
-
-where TARGET is the name of the appropriate package or target e.g.
-"virtual/kernel" for the kernel, an image, etc.
diff --git a/meta/files/ext-sdk-prepare.py b/meta/files/ext-sdk-prepare.py
index 78c1d16304..163d5e9912 100644
--- a/meta/files/ext-sdk-prepare.py
+++ b/meta/files/ext-sdk-prepare.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Prepare the build system within the extensible SDK
@@ -53,6 +53,8 @@ def main():
logf.write('Preparing SDK for %s...\n' % ', '.join(sdk_targets))
ret = run_command_interruptible('BB_SETSCENE_ENFORCE=1 bitbake --quiet %s' % ' '.join(sdk_targets))
+ if not ret:
+ ret = run_command_interruptible('bitbake --quiet build-sysroots')
lastlog = get_last_consolelog()
if lastlog:
with open(lastlog, 'r') as f:
diff --git a/meta/files/fs-perms-persistent-log.txt b/meta/files/fs-perms-persistent-log.txt
new file mode 100644
index 0000000000..3a7cf3ab94
--- /dev/null
+++ b/meta/files/fs-perms-persistent-log.txt
@@ -0,0 +1,66 @@
+# This file contains a list of files and directories with known permissions.
+# It is used by the packaging class to ensure that the permissions, owners and
+# group of listed files and directories are in sync across the system.
+#
+# The format of this file
+#
+#<path> <mode> <uid> <gid> <walk> <fmode> <fuid> <fgid>
+#
+# or
+#
+#<path> link <target>
+#
+# <path>: directory path
+# <mode>: mode for directory
+# <uid>: uid for directory
+# <gid>: gid for directory
+# <walk>: recursively walk the directory? true or false
+# <fmode>: if walking, new mode for files
+# <fuid>: if walking, new uid for files
+# <fgid>: if walking, new gid for files
+# <target>: turn the directory into a symlink point to target
+#
+# in mode, uid or gid, a "-" means don't change any existing values
+#
+# /usr/src 0755 root root false - - -
+# /usr/share/man 0755 root root true 0644 root root
+
+# Note: all standard config directories are automatically assigned "0755 root root false - - -"
+
+# Documentation should always be corrected
+${mandir} 0755 root root true 0644 root root
+${infodir} 0755 root root true 0644 root root
+${docdir} 0755 root root true 0644 root root
+${datadir}/gtk-doc 0755 root root true 0644 root root
+
+# Fixup locales
+${datadir}/locale 0755 root root true 0644 root root
+
+# Cleanup headers
+${includedir} 0755 root root true 0644 root root
+${oldincludedir} 0755 root root true 0644 root root
+
+# Cleanup debug src
+/usr/src/debug 0755 root root true - root root
+
+# Items from base-files
+# Links
+${localstatedir}/run link /run
+${localstatedir}/lock link /run/lock
+${localstatedir}/tmp link volatile/tmp
+
+/home 0755 root root false - - -
+/srv 0755 root root false - - -
+${prefix}/src 0755 root root false - - -
+${localstatedir}/local 0755 root root false - - -
+
+# Special permissions from base-files
+# Set 1777
+/tmp 01777 root root false - - -
+${localstatedir}/volatile/tmp 01777 root root false - - -
+
+# Set 0700
+${ROOT_HOME} 0700 root root false - - -
+
+# Set 2775-lsb
+${localstatedir}/mail 02775 root mail false - - -
diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
index 3d00e862e3..c8c3ac5dbe 100644
--- a/meta/files/fs-perms.txt
+++ b/meta/files/fs-perms.txt
@@ -63,8 +63,5 @@ ${localstatedir}/volatile/tmp 01777 root root false - - -
# Set 0700
${ROOT_HOME} 0700 root root false - - -
-# Set 755-lsb
-/srv 0755 root root false - - -
-
# Set 2775-lsb
-/var/mail 02775 root mail false - - -
+${localstatedir}/mail 02775 root mail false - - -
diff --git a/meta/files/ptest-perl/run-ptest b/meta/files/ptest-perl/run-ptest
new file mode 100644
index 0000000000..c9f9ca94d0
--- /dev/null
+++ b/meta/files/ptest-perl/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+ perl $case >$case.output 2>&1
+ ret=$?
+ cat $case.output
+ if [ $ret -ne 0 ]; then
+ echo "FAIL: ${case%.t}"
+ elif grep -i 'SKIP' $case.output; then
+ echo "SKIP: ${case%.t}"
+ else
+ echo "PASS: ${case%.t}"
+ fi
+
+ rm -f $case.output
+done
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 66c017f50d..ccc4f4e1ac 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -3,14 +3,32 @@
[ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 HOME="$HOME" \
LC_ALL=en_US.UTF-8 \
TERM=$TERM \
+ ICECC_PATH="$ICECC_PATH" \
http_proxy="$http_proxy" https_proxy="$https_proxy" ftp_proxy="$ftp_proxy" \
no_proxy="$no_proxy" all_proxy="$all_proxy" GIT_PROXY_COMMAND="$GIT_PROXY_COMMAND" "$0" "$@"
[ -f /etc/environment ] && . /etc/environment
export PATH=`echo "$PATH" | sed -e 's/:\.//' -e 's/::/:/'`
+tweakpath () {
+ case ":${PATH}:" in
+ *:"$1":*)
+ ;;
+ *)
+ PATH=$PATH:$1
+ esac
+}
+
+# Some systems don't have /usr/sbin or /sbin in the cleaned environment PATH but we make need it
+# for the system's host tooling checks
+tweakpath /usr/sbin
+tweakpath /sbin
+
INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
+INST_GCC_VER=$(gcc --version | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p')
+SDK_GCC_VER='@SDK_GCC_VER@'
+
verlte () {
[ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ]
}
@@ -28,7 +46,7 @@ fi
if [ "$INST_ARCH" != "$SDK_ARCH" ]; then
# Allow for installation of ix86 SDK on x86_64 host
if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then
- echo "Error: Installation machine not supported!"
+ echo "Error: Incompatible SDK installer! Your host is $INST_ARCH and this SDK was built for $SDK_ARCH hosts."
exit 1
fi
fi
@@ -95,7 +113,16 @@ done
payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
if [ "$listcontents" = "1" ] ; then
- tail -n +$payload_offset $0| tar tvJ || exit 1
+ if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then
+ tail -n +$payload_offset $0 > sdk.zip
+ if unzip -l sdk.zip;then
+ rm sdk.zip
+ else
+ rm sdk.zip && exit 1
+ fi
+ else
+ tail -n +$payload_offset $0| tar tvJ || exit 1
+ fi
exit
fi
@@ -112,6 +139,11 @@ fi
# SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above
if [ "$SDK_EXTENSIBLE" = "1" ]; then
DEFAULT_INSTALL_DIR="@SDKEXTPATH@"
+ if [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '4.9' ] || [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '' ] || \
+ [ "$INST_GCC_VER" = '4.9' -a "$SDK_GCC_VER" = '' ]; then
+ echo "Error: Incompatible SDK installer! Your host gcc version is $INST_GCC_VER and this SDK was built by gcc higher version."
+ exit 1
+ fi
fi
if [ "$target_sdk_dir" = "" ]; then
@@ -162,11 +194,11 @@ fi
if [ -e "$target_sdk_dir/environment-setup-@REAL_MULTIMACH_TARGET_SYS@" ]; then
echo "The directory \"$target_sdk_dir\" already contains a SDK for this architecture."
- printf "If you continue, existing files will be overwritten! Proceed[y/N]? "
+ printf "If you continue, existing files will be overwritten! Proceed [y/N]? "
default_answer="n"
else
- printf "You are about to install the SDK to \"$target_sdk_dir\". Proceed[Y/n]? "
+ printf "You are about to install the SDK to \"$target_sdk_dir\". Proceed [Y/n]? "
default_answer="y"
fi
@@ -209,7 +241,16 @@ if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; the
fi
printf "Extracting SDK..."
-tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
+if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then
+ tail -n +$payload_offset $0 > sdk.zip
+ if $SUDO_EXEC unzip $EXTRA_TAR_OPTIONS sdk.zip -d $target_sdk_dir;then
+ rm sdk.zip
+ else
+ rm sdk.zip && exit 1
+ fi
+else
+ tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
+fi
echo "done"
printf "Setting it up..."
@@ -237,6 +278,14 @@ if [ $savescripts = 0 ] ; then
$SUDO_EXEC rm -f ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh
fi
+# Execute post-relocation script
+post_relocate="$target_sdk_dir/post-relocate-setup.sh"
+if [ -e "$post_relocate" ]; then
+ $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate
+ $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@"
+ $SUDO_EXEC rm -f $post_relocate
+fi
+
echo "SDK has been successfully set up and is ready to be used."
echo "Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g."
for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py
new file mode 100644
index 0000000000..542f31fc81
--- /dev/null
+++ b/meta/lib/bblayers/create.py
@@ -0,0 +1,77 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import logging
+import os
+import sys
+import shutil
+
+import bb.utils
+
+from bblayers.common import LayerPlugin
+
+logger = logging.getLogger('bitbake-layers')
+
+def plugin_init(plugins):
+ return CreatePlugin()
+
+def read_template(template, template_dir='templates'):
+ lines = str()
+ with open(os.path.join(os.path.dirname(__file__), template_dir, template)) as fd:
+ lines = ''.join(fd.readlines())
+ return lines
+
+class CreatePlugin(LayerPlugin):
+ def do_create_layer(self, args):
+ """Create a basic layer"""
+ layerdir = os.path.abspath(args.layerdir)
+ if os.path.exists(layerdir):
+ sys.stderr.write("Specified layer directory exists\n")
+ return 1
+
+ # create dirs
+ conf = os.path.join(layerdir, 'conf')
+ bb.utils.mkdirhier(conf)
+
+ layername = os.path.basename(os.path.normpath(args.layerdir))
+
+ # Create the README from templates/README
+ readme_template = read_template('README').format(layername=layername)
+ readme = os.path.join(layerdir, 'README')
+ with open(readme, 'w') as fd:
+ fd.write(readme_template)
+
+ # Copy the MIT license from meta
+ copying = 'COPYING.MIT'
+ dn = os.path.dirname
+ license_src = os.path.join(dn(dn(dn(__file__))), copying)
+ license_dst = os.path.join(layerdir, copying)
+ shutil.copy(license_src, license_dst)
+
+ # Get the compat value for core layer.
+ compat = self.tinfoil.config_data.getVar('LAYERSERIES_COMPAT_core') or ""
+
+ # Create the layer.conf from templates/layer.conf
+ layerconf_template = read_template('layer.conf').format(
+ layername=layername, priority=args.priority, compat=compat)
+ layerconf = os.path.join(conf, 'layer.conf')
+ with open(layerconf, 'w') as fd:
+ fd.write(layerconf_template)
+
+ # Create the example from templates/example.bb
+ example_template = read_template('example.bb')
+ example = os.path.join(layerdir, 'recipes-' + args.examplerecipe, args.examplerecipe)
+ bb.utils.mkdirhier(example)
+ with open(os.path.join(example, args.examplerecipe + '_%s.bb') % args.version, 'w') as fd:
+ fd.write(example_template)
+
+ logger.plain('Add your new layer with \'bitbake-layers add-layer %s\'' % args.layerdir)
+
+ def register_commands(self, sp):
+ parser_create_layer = self.add_command(sp, 'create-layer', self.do_create_layer, parserecipes=False)
+ parser_create_layer.add_argument('layerdir', help='Layer directory to create')
+ parser_create_layer.add_argument('--priority', '-p', default=6, help='Layer directory to create')
+ parser_create_layer.add_argument('--example-recipe-name', '-e', dest='examplerecipe', default='example', help='Filename of the example recipe')
+ parser_create_layer.add_argument('--example-recipe-version', '-v', dest='version', default='0.1', help='Version number for the example recipe')
+
diff --git a/meta/lib/bblayers/templates/README b/meta/lib/bblayers/templates/README
new file mode 100644
index 0000000000..fb2d28e177
--- /dev/null
+++ b/meta/lib/bblayers/templates/README
@@ -0,0 +1,41 @@
+This README file contains information on the contents of the {layername} layer.
+
+Please see the corresponding sections below for details.
+
+Dependencies
+============
+
+ URI: <first dependency>
+ branch: <branch name>
+
+ URI: <second dependency>
+ branch: <branch name>
+
+ .
+ .
+ .
+
+Patches
+=======
+
+Please submit any patches against the {layername} layer to the xxxx mailing list (xxxx@zzzz.org)
+and cc: the maintainer:
+
+Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
+
+Table of Contents
+=================
+
+ I. Adding the {layername} layer to your build
+ II. Misc
+
+
+I. Adding the {layername} layer to your build
+=================================================
+
+Run 'bitbake-layers add-layer {layername}'
+
+II. Misc
+========
+
+--- replace with specific information about the {layername} layer ---
diff --git a/meta/lib/bblayers/templates/example.bb b/meta/lib/bblayers/templates/example.bb
new file mode 100644
index 0000000000..c4b873d593
--- /dev/null
+++ b/meta/lib/bblayers/templates/example.bb
@@ -0,0 +1,11 @@
+SUMMARY = "bitbake-layers recipe"
+DESCRIPTION = "Recipe created by bitbake-layers"
+LICENSE = "MIT"
+
+python do_build() {
+ bb.plain("***********************************************");
+ bb.plain("* *");
+ bb.plain("* Example recipe created by bitbake-layers *");
+ bb.plain("* *");
+ bb.plain("***********************************************");
+}
diff --git a/meta/lib/bblayers/templates/layer.conf b/meta/lib/bblayers/templates/layer.conf
new file mode 100644
index 0000000000..e2eaff4346
--- /dev/null
+++ b/meta/lib/bblayers/templates/layer.conf
@@ -0,0 +1,13 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${{LAYERDIR}}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${{LAYERDIR}}/recipes-*/*/*.bb \
+ ${{LAYERDIR}}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "{layername}"
+BBFILE_PATTERN_{layername} = "^${{LAYERDIR}}/"
+BBFILE_PRIORITY_{layername} = "{priority}"
+
+LAYERDEPENDS_{layername} = "core"
+LAYERSERIES_COMPAT_{layername} = "{compat}"
diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
new file mode 100644
index 0000000000..8627ed3c31
--- /dev/null
+++ b/meta/lib/buildstats.py
@@ -0,0 +1,161 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Implements system state sampling. Called by buildstats.bbclass.
+# Because it is a real Python module, it can hold persistent state,
+# like open log files and the time of the last sampling.
+
+import time
+import re
+import bb.event
+
+class SystemStats:
+ def __init__(self, d):
+ bn = d.getVar('BUILDNAME')
+ bsdir = os.path.join(d.getVar('BUILDSTATS_BASE'), bn)
+ bb.utils.mkdirhier(bsdir)
+
+ self.proc_files = []
+ for filename, handler in (
+ ('diskstats', self._reduce_diskstats),
+ ('meminfo', self._reduce_meminfo),
+ ('stat', self._reduce_stat),
+ ):
+ # The corresponding /proc files might not exist on the host.
+ # For example, /proc/diskstats is not available in virtualized
+ # environments like Linux-VServer. Silently skip collecting
+ # the data.
+ if os.path.exists(os.path.join('/proc', filename)):
+ # In practice, this class gets instantiated only once in
+ # the bitbake cooker process. Therefore 'append' mode is
+ # not strictly necessary, but using it makes the class
+ # more robust should two processes ever write
+ # concurrently.
+ destfile = os.path.join(bsdir, '%sproc_%s.log' % ('reduced_' if handler else '', filename))
+ self.proc_files.append((filename, open(destfile, 'ab'), handler))
+ self.monitor_disk = open(os.path.join(bsdir, 'monitor_disk.log'), 'ab')
+ # Last time that we sampled /proc data resp. recorded disk monitoring data.
+ self.last_proc = 0
+ self.last_disk_monitor = 0
+ # Minimum number of seconds between recording a sample. This
+ # becames relevant when we get called very often while many
+ # short tasks get started. Sampling during quiet periods
+ # depends on the heartbeat event, which fires less often.
+ self.min_seconds = 1
+
+ self.meminfo_regex = re.compile(b'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)')
+ self.diskstats_regex = re.compile(b'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
+ self.diskstats_ltime = None
+ self.diskstats_data = None
+ self.stat_ltimes = None
+
+ def close(self):
+ self.monitor_disk.close()
+ for _, output, _ in self.proc_files:
+ output.close()
+
+ def _reduce_meminfo(self, time, data):
+ """
+ Extracts 'MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree'
+ and writes their values into a single line, in that order.
+ """
+ values = {}
+ for line in data.split(b'\n'):
+ m = self.meminfo_regex.match(line)
+ if m:
+ values[m.group(1)] = m.group(2)
+ if len(values) == 6:
+ return (time,
+ b' '.join([values[x] for x in
+ (b'MemTotal', b'MemFree', b'Buffers', b'Cached', b'SwapTotal', b'SwapFree')]) + b'\n')
+
+ def _diskstats_is_relevant_line(self, linetokens):
+ if len(linetokens) != 14:
+ return False
+ disk = linetokens[2]
+ return self.diskstats_regex.match(disk)
+
+ def _reduce_diskstats(self, time, data):
+ relevant_tokens = filter(self._diskstats_is_relevant_line, map(lambda x: x.split(), data.split(b'\n')))
+ diskdata = [0] * 3
+ reduced = None
+ for tokens in relevant_tokens:
+ # rsect
+ diskdata[0] += int(tokens[5])
+ # wsect
+ diskdata[1] += int(tokens[9])
+ # use
+ diskdata[2] += int(tokens[12])
+ if self.diskstats_ltime:
+ # We need to compute information about the time interval
+ # since the last sampling and record the result as sample
+ # for that point in the past.
+ interval = time - self.diskstats_ltime
+ if interval > 0:
+ sums = [ a - b for a, b in zip(diskdata, self.diskstats_data) ]
+ readTput = sums[0] / 2.0 * 100.0 / interval
+ writeTput = sums[1] / 2.0 * 100.0 / interval
+ util = float( sums[2] ) / 10 / interval
+ util = max(0.0, min(1.0, util))
+ reduced = (self.diskstats_ltime, (readTput, writeTput, util))
+
+ self.diskstats_ltime = time
+ self.diskstats_data = diskdata
+ return reduced
+
+
+ def _reduce_nop(self, time, data):
+ return (time, data)
+
+ def _reduce_stat(self, time, data):
+ if not data:
+ return None
+ # CPU times {user, nice, system, idle, io_wait, irq, softirq} from first line
+ tokens = data.split(b'\n', 1)[0].split()
+ times = [ int(token) for token in tokens[1:] ]
+ reduced = None
+ if self.stat_ltimes:
+ user = float((times[0] + times[1]) - (self.stat_ltimes[0] + self.stat_ltimes[1]))
+ system = float((times[2] + times[5] + times[6]) - (self.stat_ltimes[2] + self.stat_ltimes[5] + self.stat_ltimes[6]))
+ idle = float(times[3] - self.stat_ltimes[3])
+ iowait = float(times[4] - self.stat_ltimes[4])
+
+ aSum = max(user + system + idle + iowait, 1)
+ reduced = (time, (user/aSum, system/aSum, iowait/aSum))
+
+ self.stat_ltimes = times
+ return reduced
+
+ def sample(self, event, force):
+ now = time.time()
+ if (now - self.last_proc > self.min_seconds) or force:
+ for filename, output, handler in self.proc_files:
+ with open(os.path.join('/proc', filename), 'rb') as input:
+ data = input.read()
+ if handler:
+ reduced = handler(now, data)
+ else:
+ reduced = (now, data)
+ if reduced:
+ if isinstance(reduced[1], bytes):
+ # Use as it is.
+ data = reduced[1]
+ else:
+ # Convert to a single line.
+ data = (' '.join([str(x) for x in reduced[1]]) + '\n').encode('ascii')
+ # Unbuffered raw write, less overhead and useful
+ # in case that we end up with concurrent writes.
+ os.write(output.fileno(),
+ ('%.0f\n' % reduced[0]).encode('ascii') +
+ data +
+ b'\n')
+ self.last_proc = now
+
+ if isinstance(event, bb.event.MonitorDiskEvent) and \
+ ((now - self.last_disk_monitor > self.min_seconds) or force):
+ os.write(self.monitor_disk.fileno(),
+ ('%.0f\n' % now).encode('ascii') +
+ ''.join(['%s: %d\n' % (dev, sample.total_bytes - sample.free_bytes)
+ for dev, sample in event.disk_usage.items()]).encode('ascii') +
+ b'\n')
+ self.last_disk_monitor = now
diff --git a/meta/lib/oe/__init__.py b/meta/lib/oe/__init__.py
index 3ad9513f40..4e7c09da04 100644
--- a/meta/lib/oe/__init__.py
+++ b/meta/lib/oe/__init__.py
@@ -1,2 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index b6c0265c15..5b28774c98 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -1,8 +1,10 @@
# Report significant differences in the buildhistory repository since a specific revision
#
-# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2012-2013, 2016-2017 Intel Corporation
# Author: Paul Eggleton <paul.eggleton@linux.intel.com>
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Note: requires GitPython 0.3.1+
#
# You can use this from the command line by running scripts/buildhistory-diff
@@ -13,7 +15,11 @@ import os.path
import difflib
import git
import re
+import shlex
+import hashlib
+import collections
import bb.utils
+import bb.tinfoil
# How to display fields
@@ -28,15 +34,27 @@ ver_monitor_fields = ['PKGE', 'PKGV', 'PKGR']
monitor_numeric_threshold = 10
# Image files to monitor (note that image-info.txt is handled separately)
img_monitor_files = ['installed-package-names.txt', 'files-in-image.txt']
-# Related context fields for reporting (note: PE, PV & PR are always reported for monitored package fields)
-related_fields = {}
-related_fields['RDEPENDS'] = ['DEPENDS']
-related_fields['RRECOMMENDS'] = ['DEPENDS']
-related_fields['FILELIST'] = ['FILES']
-related_fields['PKGSIZE'] = ['FILELIST']
-related_fields['files-in-image.txt'] = ['installed-package-names.txt', 'USER_CLASSES', 'IMAGE_CLASSES', 'ROOTFS_POSTPROCESS_COMMAND', 'IMAGE_POSTPROCESS_COMMAND']
-related_fields['installed-package-names.txt'] = ['IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS', 'NO_RECOMMENDATIONS', 'PACKAGE_EXCLUDE']
+colours = {
+ 'colour_default': '',
+ 'colour_add': '',
+ 'colour_remove': '',
+}
+
+def init_colours(use_colours):
+ global colours
+ if use_colours:
+ colours = {
+ 'colour_default': '\033[0m',
+ 'colour_add': '\033[1;32m',
+ 'colour_remove': '\033[1;31m',
+ }
+ else:
+ colours = {
+ 'colour_default': '',
+ 'colour_add': '',
+ 'colour_remove': '',
+ }
class ChangeRecord:
def __init__(self, path, fieldname, oldvalue, newvalue, monitored):
@@ -45,7 +63,6 @@ class ChangeRecord:
self.oldvalue = oldvalue
self.newvalue = newvalue
self.monitored = monitored
- self.related = []
self.filechanges = None
def __str__(self):
@@ -69,24 +86,77 @@ class ChangeRecord:
pkglist.append(k)
return pkglist
+ def detect_renamed_dirs(aitems, bitems):
+ adirs = set(map(os.path.dirname, aitems))
+ bdirs = set(map(os.path.dirname, bitems))
+ files_ab = [(name, sorted(os.path.basename(item) for item in aitems if os.path.dirname(item) == name)) \
+ for name in adirs - bdirs]
+ files_ba = [(name, sorted(os.path.basename(item) for item in bitems if os.path.dirname(item) == name)) \
+ for name in bdirs - adirs]
+ renamed_dirs = []
+ for dir1, files1 in files_ab:
+ rename = False
+ for dir2, files2 in files_ba:
+ if files1 == files2 and not rename:
+ renamed_dirs.append((dir1,dir2))
+ # Make sure that we don't use this (dir, files) pair again.
+ files_ba.remove((dir2,files2))
+ # If a dir has already been found to have a rename, stop and go no further.
+ rename = True
+
+ # remove files that belong to renamed dirs from aitems and bitems
+ for dir1, dir2 in renamed_dirs:
+ aitems = [item for item in aitems if os.path.dirname(item) not in (dir1, dir2)]
+ bitems = [item for item in bitems if os.path.dirname(item) not in (dir1, dir2)]
+ return renamed_dirs, aitems, bitems
+
if self.fieldname in list_fields or self.fieldname in list_order_fields:
+ renamed_dirs = []
+ changed_order = False
if self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
(depvera, depverb) = compare_pkg_lists(self.oldvalue, self.newvalue)
aitems = pkglist_combine(depvera)
bitems = pkglist_combine(depverb)
else:
- aitems = self.oldvalue.split()
- bitems = self.newvalue.split()
+ if self.fieldname == 'FILELIST':
+ aitems = shlex.split(self.oldvalue)
+ bitems = shlex.split(self.newvalue)
+ renamed_dirs, aitems, bitems = detect_renamed_dirs(aitems, bitems)
+ else:
+ aitems = self.oldvalue.split()
+ bitems = self.newvalue.split()
+
removed = list(set(aitems) - set(bitems))
added = list(set(bitems) - set(aitems))
+ if not removed and not added and self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
+ depvera = bb.utils.explode_dep_versions2(self.oldvalue, sort=False)
+ depverb = bb.utils.explode_dep_versions2(self.newvalue, sort=False)
+ for i, j in zip(depvera.items(), depverb.items()):
+ if i[0] != j[0]:
+ changed_order = True
+ break
+
+ lines = []
+ if renamed_dirs:
+ for dfrom, dto in renamed_dirs:
+ lines.append('directory renamed {colour_remove}{}{colour_default} -> {colour_add}{}{colour_default}'.format(dfrom, dto, **colours))
if removed or added:
if removed and not bitems:
- out = '%s: removed all items "%s"' % (self.fieldname, ' '.join(removed))
+ lines.append('removed all items "{colour_remove}{}{colour_default}"'.format(' '.join(removed), **colours))
else:
- out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '')
+ if removed:
+ lines.append('removed "{colour_remove}{value}{colour_default}"'.format(value=' '.join(removed), **colours))
+ if added:
+ lines.append('added "{colour_add}{value}{colour_default}"'.format(value=' '.join(added), **colours))
+ else:
+ lines.append('changed order')
+
+ if not (removed or added or changed_order):
+ out = ''
else:
- out = '%s changed order' % self.fieldname
+ out = '%s: %s' % (self.fieldname, ', '.join(lines))
+
elif self.fieldname in numeric_fields:
aval = int(self.oldvalue or 0)
bval = int(self.newvalue or 0)
@@ -94,9 +164,9 @@ class ChangeRecord:
percentchg = ((bval - aval) / float(aval)) * 100
else:
percentchg = 100
- out = '%s changed from %s to %s (%s%d%%)' % (self.fieldname, self.oldvalue or "''", self.newvalue or "''", '+' if percentchg > 0 else '', percentchg)
+ out = '{} changed from {colour_remove}{}{colour_default} to {colour_add}{}{colour_default} ({}{:.0f}%)'.format(self.fieldname, self.oldvalue or "''", self.newvalue or "''", '+' if percentchg > 0 else '', percentchg, **colours)
elif self.fieldname in defaultval_map:
- out = '%s changed from %s to %s' % (self.fieldname, self.oldvalue, self.newvalue)
+ out = '{} changed from {colour_remove}{}{colour_default} to {colour_add}{}{colour_default}'.format(self.fieldname, self.oldvalue, self.newvalue, **colours)
if self.fieldname == 'PKG' and '[default]' in self.newvalue:
out += ' - may indicate debian renaming failure'
elif self.fieldname in ['pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm']:
@@ -111,34 +181,30 @@ class ChangeRecord:
diff = difflib.unified_diff(alines, blines, self.fieldname, self.fieldname, lineterm='')
out += '\n '.join(list(diff)[2:])
out += '\n --'
- elif self.fieldname in img_monitor_files or '/image-files/' in self.path:
- fieldname = self.fieldname
- if '/image-files/' in self.path:
- fieldname = os.path.join('/' + self.path.split('/image-files/')[1], self.fieldname)
- out = 'Changes to %s:\n ' % fieldname
- else:
- if outer:
- prefix = 'Changes to %s ' % self.path
- out = '(%s):\n ' % self.fieldname
- if self.filechanges:
- out += '\n '.join(['%s' % i for i in self.filechanges])
+ elif self.fieldname in img_monitor_files or '/image-files/' in self.path or self.fieldname == "sysroot":
+ if self.filechanges or (self.oldvalue and self.newvalue):
+ fieldname = self.fieldname
+ if '/image-files/' in self.path:
+ fieldname = os.path.join('/' + self.path.split('/image-files/')[1], self.fieldname)
+ out = 'Changes to %s:\n ' % fieldname
+ else:
+ if outer:
+ prefix = 'Changes to %s ' % self.path
+ out = '(%s):\n ' % self.fieldname
+ if self.filechanges:
+ out += '\n '.join(['%s' % i for i in self.filechanges])
+ else:
+ alines = self.oldvalue.splitlines()
+ blines = self.newvalue.splitlines()
+ diff = difflib.unified_diff(alines, blines, fieldname, fieldname, lineterm='')
+ out += '\n '.join(list(diff))
+ out += '\n --'
else:
- alines = self.oldvalue.splitlines()
- blines = self.newvalue.splitlines()
- diff = difflib.unified_diff(alines, blines, fieldname, fieldname, lineterm='')
- out += '\n '.join(list(diff))
- out += '\n --'
+ out = ''
else:
- out = '%s changed from "%s" to "%s"' % (self.fieldname, self.oldvalue, self.newvalue)
-
- if self.related:
- for chg in self.related:
- if not outer and chg.fieldname in ['PE', 'PV', 'PR']:
- continue
- for line in chg._str_internal(False).splitlines():
- out += '\n * %s' % line
+ out = '{} changed from "{colour_remove}{}{colour_default}" to "{colour_add}{}{colour_default}"'.format(self.fieldname, self.oldvalue, self.newvalue, **colours)
- return '%s%s' % (prefix, out)
+ return '%s%s' % (prefix, out) if out else ''
class FileChange:
changetype_add = 'A'
@@ -216,7 +282,7 @@ def file_list_to_dict(lines):
return adict
-def compare_file_lists(alines, blines):
+def compare_file_lists(alines, blines, compare_ownership=True):
adict = file_list_to_dict(alines)
bdict = file_list_to_dict(blines)
filechanges = []
@@ -228,16 +294,20 @@ def compare_file_lists(alines, blines):
newvalue = newsplitv[0][0]
if oldvalue != newvalue:
filechanges.append(FileChange(path, FileChange.changetype_type, oldvalue, newvalue))
+
# Check permissions
oldvalue = splitv[0][1:]
newvalue = newsplitv[0][1:]
if oldvalue != newvalue:
filechanges.append(FileChange(path, FileChange.changetype_perms, oldvalue, newvalue))
- # Check owner/group
- oldvalue = '%s/%s' % (splitv[1], splitv[2])
- newvalue = '%s/%s' % (newsplitv[1], newsplitv[2])
- if oldvalue != newvalue:
- filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue))
+
+ if compare_ownership:
+ # Check owner/group
+ oldvalue = '%s/%s' % (splitv[1], splitv[2])
+ newvalue = '%s/%s' % (newsplitv[1], newsplitv[2])
+ if oldvalue != newvalue:
+ filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue))
+
# Check symlink target
if newsplitv[0][0] == 'l':
if len(splitv) > 3:
@@ -343,15 +413,19 @@ def compare_dict_blobs(path, ablob, bblob, report_all, report_ver):
if abs(percentchg) < monitor_numeric_threshold:
continue
elif (not report_all) and key in list_fields:
- if key == "FILELIST" and path.endswith("-dbg") and bstr.strip() != '':
+ if key == "FILELIST" and (path.endswith("-dbg") or path.endswith("-src")) and bstr.strip() != '':
continue
if key in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
(depvera, depverb) = compare_pkg_lists(astr, bstr)
if depvera == depverb:
continue
- alist = astr.split()
+ if key == 'FILELIST':
+ alist = shlex.split(astr)
+ blist = shlex.split(bstr)
+ else:
+ alist = astr.split()
+ blist = bstr.split()
alist.sort()
- blist = bstr.split()
blist.sort()
# We don't care about the removal of self-dependencies
if pkgname in alist and not pkgname in blist:
@@ -382,13 +456,116 @@ def compare_dict_blobs(path, ablob, bblob, report_all, report_ver):
return changes
-def process_changes(repopath, revision1, revision2='HEAD', report_all=False, report_ver=False):
+def compare_siglists(a_blob, b_blob, taskdiff=False):
+ # FIXME collapse down a recipe's tasks?
+ alines = a_blob.data_stream.read().decode('utf-8').splitlines()
+ blines = b_blob.data_stream.read().decode('utf-8').splitlines()
+ keys = []
+ pnmap = {}
+ def readsigs(lines):
+ sigs = {}
+ for line in lines:
+ linesplit = line.split()
+ if len(linesplit) > 2:
+ sigs[linesplit[0]] = linesplit[2]
+ if not linesplit[0] in keys:
+ keys.append(linesplit[0])
+ pnmap[linesplit[1]] = linesplit[0].rsplit('.', 1)[0]
+ return sigs
+ adict = readsigs(alines)
+ bdict = readsigs(blines)
+ out = []
+
+ changecount = 0
+ addcount = 0
+ removecount = 0
+ if taskdiff:
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=True)
+
+ changes = collections.OrderedDict()
+
+ def compare_hashfiles(pn, taskname, hash1, hash2):
+ hashes = [hash1, hash2]
+ hashfiles = bb.siggen.find_siginfo(pn, taskname, hashes, tinfoil.config_data)
+
+ if not taskname:
+ (pn, taskname) = pn.rsplit('.', 1)
+ pn = pnmap.get(pn, pn)
+ desc = '%s.%s' % (pn, taskname)
+
+ if len(hashfiles) == 0:
+ out.append("Unable to find matching sigdata for %s with hashes %s or %s" % (desc, hash1, hash2))
+ elif not hash1 in hashfiles:
+ out.append("Unable to find matching sigdata for %s with hash %s" % (desc, hash1))
+ elif not hash2 in hashfiles:
+ out.append("Unable to find matching sigdata for %s with hash %s" % (desc, hash2))
+ else:
+ out2 = bb.siggen.compare_sigfiles(hashfiles[hash1], hashfiles[hash2], recursecb, collapsed=True)
+ for line in out2:
+ m = hashlib.sha256()
+ m.update(line.encode('utf-8'))
+ entry = changes.get(m.hexdigest(), (line, []))
+ if desc not in entry[1]:
+ changes[m.hexdigest()] = (line, entry[1] + [desc])
+
+ # Define recursion callback
+ def recursecb(key, hash1, hash2):
+ compare_hashfiles(key, None, hash1, hash2)
+ return []
+
+ for key in keys:
+ siga = adict.get(key, None)
+ sigb = bdict.get(key, None)
+ if siga is not None and sigb is not None and siga != sigb:
+ changecount += 1
+ (pn, taskname) = key.rsplit('.', 1)
+ compare_hashfiles(pn, taskname, siga, sigb)
+ elif siga is None:
+ addcount += 1
+ elif sigb is None:
+ removecount += 1
+ for key, item in changes.items():
+ line, tasks = item
+ if len(tasks) == 1:
+ desc = tasks[0]
+ elif len(tasks) == 2:
+ desc = '%s and %s' % (tasks[0], tasks[1])
+ else:
+ desc = '%s and %d others' % (tasks[-1], len(tasks)-1)
+ out.append('%s: %s' % (desc, line))
+ else:
+ for key in keys:
+ siga = adict.get(key, None)
+ sigb = bdict.get(key, None)
+ if siga is not None and sigb is not None and siga != sigb:
+ out.append('%s changed from %s to %s' % (key, siga, sigb))
+ changecount += 1
+ elif siga is None:
+ out.append('%s was added' % key)
+ addcount += 1
+ elif sigb is None:
+ out.append('%s was removed' % key)
+ removecount += 1
+ out.append('Summary: %d tasks added, %d tasks removed, %d tasks modified (%.1f%%)' % (addcount, removecount, changecount, (changecount / float(len(bdict)) * 100)))
+ return '\n'.join(out)
+
+
+def process_changes(repopath, revision1, revision2='HEAD', report_all=False, report_ver=False,
+ sigs=False, sigsdiff=False, exclude_path=None):
repo = git.Repo(repopath)
assert repo.bare == False
commit = repo.commit(revision1)
diff = commit.diff(revision2)
changes = []
+
+ if sigs or sigsdiff:
+ for d in diff.iter_change_type('M'):
+ if d.a_blob.path == 'siglist.txt':
+ changes.append(compare_siglists(d.a_blob, d.b_blob, taskdiff=sigsdiff))
+ return changes
+
for d in diff.iter_change_type('M'):
path = os.path.dirname(d.a_blob.path)
if path.startswith('packages/'):
@@ -398,6 +575,15 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
elif filename.startswith('latest.'):
chg = ChangeRecord(path, filename, d.a_blob.data_stream.read().decode('utf-8'), d.b_blob.data_stream.read().decode('utf-8'), True)
changes.append(chg)
+ elif filename == 'sysroot':
+ alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
+ blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
+ filechanges = compare_file_lists(alines,blines, compare_ownership=False)
+ if filechanges:
+ chg = ChangeRecord(path, filename, None, None, True)
+ chg.filechanges = filechanges
+ changes.append(chg)
+
elif path.startswith('images/'):
filename = os.path.basename(d.a_blob.path)
if filename in img_monitor_files:
@@ -457,16 +643,18 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
chg = ChangeRecord(path, filename[7:], d.a_blob.data_stream.read().decode('utf-8'), '', True)
changes.append(chg)
- # Link related changes
- for chg in changes:
- if chg.monitored:
- for chg2 in changes:
- # (Check dirname in the case of fields from recipe info files)
- if chg.path == chg2.path or os.path.dirname(chg.path) == chg2.path:
- if chg2.fieldname in related_fields.get(chg.fieldname, []):
- chg.related.append(chg2)
- elif chg.path == chg2.path and chg.path.startswith('packages/') and chg2.fieldname in ['PE', 'PV', 'PR']:
- chg.related.append(chg2)
+ # filter out unwanted paths
+ if exclude_path:
+ for chg in changes:
+ if chg.filechanges:
+ fchgs = []
+ for fchg in chg.filechanges:
+ for epath in exclude_path:
+ if fchg.path.startswith(epath):
+ break
+ else:
+ fchgs.append(fchg)
+ chg.filechanges = fchgs
if report_all:
return changes
diff --git a/meta/lib/oe/cachedpath.py b/meta/lib/oe/cachedpath.py
index 0840cc4c3f..254257a83f 100644
--- a/meta/lib/oe/cachedpath.py
+++ b/meta/lib/oe/cachedpath.py
@@ -1,4 +1,6 @@
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Based on standard python library functions but avoid
# repeated stat calls. Its assumed the files will not change from under us
# so we can cache stat calls.
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index 4c8a00070c..f02fbe9fba 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import collections
class ClassExtender(object):
@@ -20,12 +24,14 @@ class ClassExtender(object):
if not subs.startswith(self.extname):
return "virtual/" + self.extname + "-" + subs
return name
+ if name.startswith("/"):
+ return name
if not name.startswith(self.extname):
return self.extname + "-" + name
return name
def map_variable(self, varname, setvar = True):
- var = self.d.getVar(varname, True)
+ var = self.d.getVar(varname)
if not var:
return ""
var = var.split()
@@ -38,7 +44,7 @@ class ClassExtender(object):
return newdata
def map_regexp_variable(self, varname, setvar = True):
- var = self.d.getVar(varname, True)
+ var = self.d.getVar(varname)
if not var:
return ""
var = var.split()
@@ -60,7 +66,7 @@ class ClassExtender(object):
return dep
else:
# Do not extend for that already have multilib prefix
- var = self.d.getVar("MULTILIB_VARIANTS", True)
+ var = self.d.getVar("MULTILIB_VARIANTS")
if var:
var = var.split()
for v in var:
@@ -74,7 +80,7 @@ class ClassExtender(object):
varname = varname + "_" + suffix
orig = self.d.getVar("EXTENDPKGV", False)
self.d.setVar("EXTENDPKGV", "EXTENDPKGV")
- deps = self.d.getVar(varname, True)
+ deps = self.d.getVar(varname)
if not deps:
self.d.setVar("EXTENDPKGV", orig)
return
@@ -87,7 +93,7 @@ class ClassExtender(object):
self.d.setVar("EXTENDPKGV", orig)
def map_packagevars(self):
- for pkg in (self.d.getVar("PACKAGES", True).split() + [""]):
+ for pkg in (self.d.getVar("PACKAGES").split() + [""]):
self.map_depends_variable("RDEPENDS", pkg)
self.map_depends_variable("RRECOMMENDS", pkg)
self.map_depends_variable("RSUGGESTS", pkg)
@@ -97,7 +103,7 @@ class ClassExtender(object):
self.map_depends_variable("PKG", pkg)
def rename_packages(self):
- for pkg in (self.d.getVar("PACKAGES", True) or "").split():
+ for pkg in (self.d.getVar("PACKAGES") or "").split():
if pkg.startswith(self.extname):
self.pkgs_mapping.append([pkg.split(self.extname + "-")[1], pkg])
continue
@@ -114,7 +120,7 @@ class NativesdkClassExtender(ClassExtender):
def map_depends(self, dep):
if dep.startswith(self.extname):
return dep
- if dep.endswith(("-gcc-initial", "-gcc", "-g++")):
+ if dep.endswith(("-gcc", "-g++")):
return dep + "-crosssdk"
elif dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('-cross-' in dep) or ('-crosssdk-' in dep):
return dep
diff --git a/meta/lib/oe/classutils.py b/meta/lib/oe/classutils.py
index e7856c86f2..08bb66b365 100644
--- a/meta/lib/oe/classutils.py
+++ b/meta/lib/oe/classutils.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
class ClassRegistryMeta(type):
"""Give each ClassRegistry their own registry"""
@@ -36,7 +39,7 @@ abstract base classes out of the registry)."""
@classmethod
def prioritized(tcls):
return sorted(list(tcls.registry.values()),
- key=lambda v: v.priority, reverse=True)
+ key=lambda v: (v.priority, v.name), reverse=True)
def unregister(cls):
for key in cls.registry.keys():
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index afaff68598..31a84f5b06 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -1,14 +1,28 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This class should provide easy access to the different aspects of the
# buildsystem such as layers, bitbake location, etc.
+#
+# SDK_LAYERS_EXCLUDE: Layers which will be excluded from SDK layers.
+# SDK_LAYERS_EXCLUDE_PATTERN: The simiar to SDK_LAYERS_EXCLUDE, this supports
+# python regular expression, use space as separator,
+# e.g.: ".*-downloads closed-.*"
+#
+
import stat
import shutil
def _smart_copy(src, dest):
+ import subprocess
# smart_copy will choose the correct function depending on whether the
# source is a file or a directory.
mode = os.stat(src).st_mode
if stat.S_ISDIR(mode):
- shutil.copytree(src, dest, symlinks=True, ignore=shutil.ignore_patterns('.git'))
+ bb.utils.mkdirhier(dest)
+ cmd = "tar --exclude='.git' --xattrs --xattrs-include='*' -chf - -C %s -p . \
+ | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dest)
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
else:
shutil.copyfile(src, dest)
shutil.copymode(src, dest)
@@ -17,23 +31,42 @@ class BuildSystem(object):
def __init__(self, context, d):
self.d = d
self.context = context
- self.layerdirs = [os.path.abspath(pth) for pth in d.getVar('BBLAYERS', True).split()]
- self.layers_exclude = (d.getVar('SDK_LAYERS_EXCLUDE', True) or "").split()
+ self.layerdirs = [os.path.abspath(pth) for pth in d.getVar('BBLAYERS').split()]
+ self.layers_exclude = (d.getVar('SDK_LAYERS_EXCLUDE') or "").split()
+ self.layers_exclude_pattern = d.getVar('SDK_LAYERS_EXCLUDE_PATTERN')
def copy_bitbake_and_layers(self, destdir, workspace_name=None):
+ import re
# Copy in all metadata layers + bitbake (as repositories)
+ copied_corebase = None
layers_copied = []
bb.utils.mkdirhier(destdir)
layers = list(self.layerdirs)
- corebase = os.path.abspath(self.d.getVar('COREBASE', True))
+ corebase = os.path.abspath(self.d.getVar('COREBASE'))
layers.append(corebase)
+ # Get relationship between TOPDIR and COREBASE
+ # Layers should respect it
+ corebase_relative = os.path.dirname(os.path.relpath(os.path.abspath(self.d.getVar('TOPDIR')), corebase))
+ # The bitbake build system uses the meta-skeleton layer as a layout
+ # for common recipies, e.g: the recipetool script to create kernel recipies
+ # Add the meta-skeleton layer to be included as part of the eSDK installation
+ layers.append(os.path.join(corebase, 'meta-skeleton'))
# Exclude layers
for layer_exclude in self.layers_exclude:
if layer_exclude in layers:
+ bb.note('Excluded %s from sdk layers since it is in SDK_LAYERS_EXCLUDE' % layer_exclude)
layers.remove(layer_exclude)
+ if self.layers_exclude_pattern:
+ layers_cp = layers[:]
+ for pattern in self.layers_exclude_pattern.split():
+ for layer in layers_cp:
+ if re.match(pattern, layer):
+ bb.note('Excluded %s from sdk layers since matched SDK_LAYERS_EXCLUDE_PATTERN' % layer)
+ layers.remove(layer)
+
workspace_newname = workspace_name
if workspace_newname:
layernames = [os.path.basename(layer) for layer in layers]
@@ -42,7 +75,7 @@ class BuildSystem(object):
extranum += 1
workspace_newname = '%s-%d' % (workspace_name, extranum)
- corebase_files = self.d.getVar('COREBASE_FILES', True).split()
+ corebase_files = self.d.getVar('COREBASE_FILES').split()
corebase_files = [corebase + '/' +x for x in corebase_files]
# Make sure bitbake goes in
bitbake_dir = bb.__file__.rsplit('/', 3)[0]
@@ -67,22 +100,31 @@ class BuildSystem(object):
layerdestpath = destdir
if corebase == os.path.dirname(layer):
layerdestpath += '/' + os.path.basename(corebase)
+ else:
+ layer_relative = os.path.relpath(layer, corebase)
+ if os.path.dirname(layer_relative) == corebase_relative:
+ layer_relative = os.path.dirname(corebase_relative) + '/' + layernewname
+ layer_relative = os.path.basename(corebase) + '/' + layer_relative
+ if os.path.dirname(layer_relative) != layernewname:
+ layerdestpath += '/' + os.path.dirname(layer_relative)
+
layerdestpath += '/' + layernewname
layer_relative = os.path.relpath(layerdestpath,
destdir)
- layers_copied.append(layer_relative)
-
# Treat corebase as special since it typically will contain
# build directories or other custom items.
if corebase == layer:
+ copied_corebase = layer_relative
bb.utils.mkdirhier(layerdestpath)
for f in corebase_files:
f_basename = os.path.basename(f)
destname = os.path.join(layerdestpath, f_basename)
_smart_copy(f, destname)
else:
- if os.path.exists(layerdestpath):
+ layers_copied.append(layer_relative)
+
+ if os.path.exists(os.path.join(layerdestpath, 'conf/layer.conf')):
bb.note("Skipping layer %s, already handled" % layer)
else:
_smart_copy(layer, layerdestpath)
@@ -96,7 +138,7 @@ class BuildSystem(object):
# Drop all bbappends except the one for the image the SDK is being built for
# (because of externalsrc, the workspace bbappends will interfere with the
# locked signatures if present, and we don't need them anyway)
- image_bbappend = os.path.splitext(os.path.basename(self.d.getVar('FILE', True)))[0] + '.bbappend'
+ image_bbappend = os.path.splitext(os.path.basename(self.d.getVar('FILE')))[0] + '.bbappend'
appenddir = os.path.join(layerdestpath, 'appends')
if os.path.isdir(appenddir):
for fn in os.listdir(appenddir):
@@ -119,15 +161,23 @@ class BuildSystem(object):
line = line.replace('workspacelayer', workspace_newname)
f.write(line)
- return layers_copied
+ # meta-skeleton layer is added as part of the build system
+ # but not as a layer included in the build, therefore it is
+ # not reported to the function caller.
+ for layer in layers_copied:
+ if layer.endswith('/meta-skeleton'):
+ layers_copied.remove(layer)
+ break
+
+ return copied_corebase, layers_copied
def generate_locked_sigs(sigfile, d):
bb.utils.mkdirhier(os.path.dirname(sigfile))
depd = d.getVar('BB_TASKDEPDATA', False)
- tasks = ['%s.%s' % (v[2], v[1]) for v in depd.values()]
+ tasks = ['%s:%s' % (v[2], v[1]) for v in depd.values()]
bb.parse.siggen.dump_lockedsigs(sigfile, tasks)
-def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output):
+def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, onlynative, pruned_output):
with open(lockedsigs, 'r') as infile:
bb.utils.mkdirhier(os.path.dirname(pruned_output))
with open(pruned_output, 'w') as f:
@@ -137,7 +187,11 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output
if line.endswith('\\\n'):
splitval = line.strip().split(':')
if not splitval[1] in excluded_tasks and not splitval[0] in excluded_targets:
- f.write(line)
+ if onlynative:
+ if 'nativesdk' in splitval[0]:
+ f.write(line)
+ else:
+ f.write(line)
else:
f.write(line)
invalue = False
@@ -204,7 +258,7 @@ def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cac
import shutil
bb.note('Generating sstate-cache...')
- nativelsbstring = d.getVar('NATIVELSBSTRING', True)
+ nativelsbstring = d.getVar('NATIVELSBSTRING')
bb.process.run("gen-lockedsig-cache %s %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring, filterfile or ''))
if fixedlsbstring and nativelsbstring != fixedlsbstring:
nativedir = output_sstate_cache + '/' + nativelsbstring
@@ -235,6 +289,7 @@ def check_sstate_task_list(d, targets, filteroutfile, cmdprefix='', cwd=None, lo
cmd = "%sBB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate %s -s -o %s %s" % (cmdprefix, targets, filteroutfile, logparam)
env = dict(d.getVar('BB_ORIGENV', False))
env.pop('BUILDDIR', '')
+ env.pop('BBPATH', '')
pathitems = env['PATH'].split(':')
env['PATH'] = ':'.join([item for item in pathitems if not item.endswith('/bitbake/bin')])
bb.process.run(cmd, stderr=subprocess.STDOUT, env=env, cwd=cwd, executable='/bin/bash')
diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py
index ee48950a82..602130a904 100644
--- a/meta/lib/oe/data.py
+++ b/meta/lib/oe/data.py
@@ -1,9 +1,14 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import json
import oe.maketype
def typed_value(key, d):
"""Construct a value for the specified metadata variable, using its flags
to determine the type and parameters for construction."""
- var_type = d.getVarFlag(key, 'type', True)
+ var_type = d.getVarFlag(key, 'type')
flags = d.getVarFlags(key)
if flags is not None:
flags = dict((flag, d.expand(value))
@@ -12,6 +17,35 @@ def typed_value(key, d):
flags = {}
try:
- return oe.maketype.create(d.getVar(key, True) or '', var_type, **flags)
+ return oe.maketype.create(d.getVar(key) or '', var_type, **flags)
except (TypeError, ValueError) as exc:
bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))
+
+def export2json(d, json_file, expand=True, searchString="",replaceString=""):
+ data2export = {}
+ keys2export = []
+
+ for key in d.keys():
+ if key.startswith("_"):
+ continue
+ elif key.startswith("BB"):
+ continue
+ elif key.startswith("B_pn"):
+ continue
+ elif key.startswith("do_"):
+ continue
+ elif d.getVarFlag(key, "func"):
+ continue
+
+ keys2export.append(key)
+
+ for key in keys2export:
+ try:
+ data2export[key] = d.getVar(key, expand).replace(searchString,replaceString)
+ except bb.data_smart.ExpansionError:
+ data2export[key] = ''
+ except AttributeError:
+ pass
+
+ with open(json_file, "w") as f:
+ json.dump(data2export, f, skipkeys=True, indent=4, sort_keys=True)
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 87c52fae9c..88e46c354d 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -1,32 +1,21 @@
-from contextlib import contextmanager
-
-from bb.utils import export_proxies
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
def create_socket(url, d):
import urllib
+ from bb.utils import export_proxies
- socket = None
- try:
- export_proxies(d)
- socket = urllib.request.urlopen(url)
- except:
- bb.warn("distro_check: create_socket url %s can't access" % url)
-
- return socket
+ export_proxies(d)
+ return urllib.request.urlopen(url)
def get_links_from_url(url, d):
"Return all the href links found on the web location"
from bs4 import BeautifulSoup, SoupStrainer
+ soup = BeautifulSoup(create_socket(url,d), "html.parser", parse_only=SoupStrainer("a"))
hyperlinks = []
-
- webpage = ''
- sock = create_socket(url,d)
- if sock:
- webpage = sock.read()
-
- soup = BeautifulSoup(webpage, "html.parser", parse_only=SoupStrainer("a"))
for line in soup.find_all('a', href=True):
hyperlinks.append(line['href'].strip('/'))
return hyperlinks
@@ -37,6 +26,7 @@ def find_latest_numeric_release(url, d):
maxstr=""
for link in get_links_from_url(url, d):
try:
+ # TODO use LooseVersion
release = float(link)
except:
release = 0
@@ -47,144 +37,105 @@ def find_latest_numeric_release(url, d):
def is_src_rpm(name):
"Check if the link is pointing to a src.rpm file"
- if name[-8:] == ".src.rpm":
- return True
- else:
- return False
+ return name.endswith(".src.rpm")
def package_name_from_srpm(srpm):
"Strip out the package name from the src.rpm filename"
- strings = srpm.split('-')
- package_name = strings[0]
- for i in range(1, len (strings) - 1):
- str = strings[i]
- if not str[0].isdigit():
- package_name += '-' + str
- return package_name
-
-def clean_package_list(package_list):
- "Removes multiple entries of packages and sorts the list"
- set = {}
- map(set.__setitem__, package_list, [])
- return set.keys()
-
-def get_latest_released_meego_source_package_list(d):
- "Returns list of all the name os packages in the latest meego distro"
-
- package_names = []
- try:
- f = open("/tmp/Meego-1.1", "r")
- for line in f:
- package_names.append(line[:-1] + ":" + "main") # Also strip the '\n' at the end
- except IOError: pass
- package_list=clean_package_list(package_names)
- return "1.0", package_list
+ # ca-certificates-2016.2.7-1.0.fc24.src.rpm
+ # ^name ^ver ^release^removed
+ (name, version, release) = srpm.replace(".src.rpm", "").rsplit("-", 2)
+ return name
def get_source_package_list_from_url(url, section, d):
"Return a sectioned list of package names from a URL list"
bb.note("Reading %s: %s" % (url, section))
links = get_links_from_url(url, d)
- srpms = list(filter(is_src_rpm, links))
- names_list = list(map(package_name_from_srpm, srpms))
+ srpms = filter(is_src_rpm, links)
+ names_list = map(package_name_from_srpm, srpms)
- new_pkgs = []
+ new_pkgs = set()
for pkgs in names_list:
- new_pkgs.append(pkgs + ":" + section)
-
+ new_pkgs.add(pkgs + ":" + section)
return new_pkgs
+def get_source_package_list_from_url_by_letter(url, section, d):
+ import string
+ from urllib.error import HTTPError
+ packages = set()
+ for letter in (string.ascii_lowercase + string.digits):
+ # Not all subfolders may exist, so silently handle 404
+ try:
+ packages |= get_source_package_list_from_url(url + "/" + letter, section, d)
+ except HTTPError as e:
+ if e.code != 404: raise
+ return packages
+
def get_latest_released_fedora_source_package_list(d):
"Returns list of all the name os packages in the latest fedora distro"
latest = find_latest_numeric_release("http://archive.fedoraproject.org/pub/fedora/linux/releases/", d)
-
- package_names = get_source_package_list_from_url("http://archive.fedoraproject.org/pub/fedora/linux/releases/%s/Fedora/source/SRPMS/" % latest, "main", d)
-
-# package_names += get_source_package_list_from_url("http://download.fedora.redhat.com/pub/fedora/linux/releases/%s/Everything/source/SPRMS/" % latest, "everything")
- package_names += get_source_package_list_from_url("http://archive.fedoraproject.org/pub/fedora/linux/updates/%s/SRPMS/" % latest, "updates", d)
-
- package_list=clean_package_list(package_names)
-
- return latest, package_list
+ package_names = get_source_package_list_from_url_by_letter("http://archive.fedoraproject.org/pub/fedora/linux/releases/%s/Everything/source/tree/Packages/" % latest, "main", d)
+ package_names |= get_source_package_list_from_url_by_letter("http://archive.fedoraproject.org/pub/fedora/linux/updates/%s/SRPMS/" % latest, "updates", d)
+ return latest, package_names
def get_latest_released_opensuse_source_package_list(d):
"Returns list of all the name os packages in the latest opensuse distro"
- latest = find_latest_numeric_release("http://download.opensuse.org/source/distribution/",d)
-
- package_names = get_source_package_list_from_url("http://download.opensuse.org/source/distribution/%s/repo/oss/suse/src/" % latest, "main", d)
- package_names += get_source_package_list_from_url("http://download.opensuse.org/update/%s/rpm/src/" % latest, "updates", d)
-
- package_list=clean_package_list(package_names)
- return latest, package_list
+ latest = find_latest_numeric_release("http://download.opensuse.org/source/distribution/leap", d)
-def get_latest_released_mandriva_source_package_list(d):
- "Returns list of all the name os packages in the latest mandriva distro"
- latest = find_latest_numeric_release("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/", d)
- package_names = get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/main/release/" % latest, "main", d)
-# package_names += get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/contrib/release/" % latest, "contrib")
- package_names += get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/main/updates/" % latest, "updates", d)
+ package_names = get_source_package_list_from_url("http://download.opensuse.org/source/distribution/leap/%s/repo/oss/suse/src/" % latest, "main", d)
+ package_names |= get_source_package_list_from_url("http://download.opensuse.org/update/leap/%s/oss/src/" % latest, "updates", d)
+ return latest, package_names
- package_list=clean_package_list(package_names)
- return latest, package_list
+def get_latest_released_clear_source_package_list(d):
+ latest = find_latest_numeric_release("https://download.clearlinux.org/releases/", d)
+ package_names = get_source_package_list_from_url("https://download.clearlinux.org/releases/%s/clear/source/SRPMS/" % latest, "main", d)
+ return latest, package_names
def find_latest_debian_release(url, d):
"Find the latest listed debian release on the given url"
- releases = []
- for link in get_links_from_url(url, d):
- if link[:6] == "Debian":
- if ';' not in link:
- releases.append(link)
+ releases = [link.replace("Debian", "")
+ for link in get_links_from_url(url, d)
+ if link.startswith("Debian")]
releases.sort()
try:
- return releases.pop()[6:]
+ return releases[-1]
except:
return "_NotFound_"
def get_debian_style_source_package_list(url, section, d):
"Return the list of package-names stored in the debian style Sources.gz file"
- import tempfile
import gzip
- webpage = ''
- sock = create_socket(url,d)
- if sock:
- webpage = sock.read()
-
- tmpfile = tempfile.NamedTemporaryFile(mode='wb', prefix='oecore.', suffix='.tmp', delete=False)
- tmpfilename=tmpfile.name
- tmpfile.write(sock.read())
- tmpfile.close()
- bb.note("Reading %s: %s" % (url, section))
-
- f = gzip.open(tmpfilename)
- package_names = []
- for line in f:
- if line[:9] == "Package: ":
- package_names.append(line[9:-1] + ":" + section) # Also strip the '\n' at the end
- os.unlink(tmpfilename)
-
+ package_names = set()
+ for line in gzip.open(create_socket(url, d), mode="rt"):
+ if line.startswith("Package:"):
+ pkg = line.split(":", 1)[1].strip()
+ package_names.add(pkg + ":" + section)
return package_names
def get_latest_released_debian_source_package_list(d):
- "Returns list of all the name os packages in the latest debian distro"
+ "Returns list of all the name of packages in the latest debian distro"
latest = find_latest_debian_release("http://ftp.debian.org/debian/dists/", d)
- url = "http://ftp.debian.org/debian/dists/stable/main/source/Sources.gz"
+ url = "http://ftp.debian.org/debian/dists/stable/main/source/Sources.gz"
package_names = get_debian_style_source_package_list(url, "main", d)
-# url = "http://ftp.debian.org/debian/dists/stable/contrib/source/Sources.gz"
-# package_names += get_debian_style_source_package_list(url, "contrib")
- url = "http://ftp.debian.org/debian/dists/stable-proposed-updates/main/source/Sources.gz"
- package_names += get_debian_style_source_package_list(url, "updates", d)
- package_list=clean_package_list(package_names)
- return latest, package_list
+ url = "http://ftp.debian.org/debian/dists/stable-proposed-updates/main/source/Sources.gz"
+ package_names |= get_debian_style_source_package_list(url, "updates", d)
+ return latest, package_names
def find_latest_ubuntu_release(url, d):
- "Find the latest listed ubuntu release on the given url"
+ """
+ Find the latest listed Ubuntu release on the given ubuntu/dists/ URL.
+
+ To avoid matching development releases look for distributions that have
+ updates, so the resulting distro could be any supported release.
+ """
url += "?C=M;O=D" # Descending Sort by Last Modified
for link in get_links_from_url(url, d):
- if link[-8:] == "-updates":
- return link[:-8]
+ if "-updates" in link:
+ distro = link.replace("-updates", "")
+ return distro
return "_NotFound_"
def get_latest_released_ubuntu_source_package_list(d):
@@ -192,52 +143,44 @@ def get_latest_released_ubuntu_source_package_list(d):
latest = find_latest_ubuntu_release("http://archive.ubuntu.com/ubuntu/dists/", d)
url = "http://archive.ubuntu.com/ubuntu/dists/%s/main/source/Sources.gz" % latest
package_names = get_debian_style_source_package_list(url, "main", d)
-# url = "http://archive.ubuntu.com/ubuntu/dists/%s/multiverse/source/Sources.gz" % latest
-# package_names += get_debian_style_source_package_list(url, "multiverse")
-# url = "http://archive.ubuntu.com/ubuntu/dists/%s/universe/source/Sources.gz" % latest
-# package_names += get_debian_style_source_package_list(url, "universe")
url = "http://archive.ubuntu.com/ubuntu/dists/%s-updates/main/source/Sources.gz" % latest
- package_names += get_debian_style_source_package_list(url, "updates", d)
- package_list=clean_package_list(package_names)
- return latest, package_list
+ package_names |= get_debian_style_source_package_list(url, "updates", d)
+ return latest, package_names
def create_distro_packages_list(distro_check_dir, d):
+ import shutil
+
pkglst_dir = os.path.join(distro_check_dir, "package_lists")
- if not os.path.isdir (pkglst_dir):
- os.makedirs(pkglst_dir)
- # first clear old stuff
- for file in os.listdir(pkglst_dir):
- os.unlink(os.path.join(pkglst_dir, file))
-
- per_distro_functions = [
- ["Debian", get_latest_released_debian_source_package_list],
- ["Ubuntu", get_latest_released_ubuntu_source_package_list],
- ["Fedora", get_latest_released_fedora_source_package_list],
- ["OpenSuSE", get_latest_released_opensuse_source_package_list],
- ["Mandriva", get_latest_released_mandriva_source_package_list],
- ["Meego", get_latest_released_meego_source_package_list]
- ]
-
- from datetime import datetime
- begin = datetime.now()
- for distro in per_distro_functions:
- name = distro[0]
- release, package_list = distro[1](d)
+ bb.utils.remove(pkglst_dir, True)
+ bb.utils.mkdirhier(pkglst_dir)
+
+ per_distro_functions = (
+ ("Debian", get_latest_released_debian_source_package_list),
+ ("Ubuntu", get_latest_released_ubuntu_source_package_list),
+ ("Fedora", get_latest_released_fedora_source_package_list),
+ ("openSUSE", get_latest_released_opensuse_source_package_list),
+ ("Clear", get_latest_released_clear_source_package_list),
+ )
+
+ for name, fetcher_func in per_distro_functions:
+ try:
+ release, package_list = fetcher_func(d)
+ except Exception as e:
+ bb.warn("Cannot fetch packages for %s: %s" % (name, e))
bb.note("Distro: %s, Latest Release: %s, # src packages: %d" % (name, release, len(package_list)))
+ if len(package_list) == 0:
+ bb.error("Didn't fetch any packages for %s %s" % (name, release))
+
package_list_file = os.path.join(pkglst_dir, name + "-" + release)
- f = open(package_list_file, "w+b")
- for pkg in package_list:
- f.write(pkg + "\n")
- f.close()
- end = datetime.now()
- delta = end - begin
- bb.note("package_list generatiosn took this much time: %d seconds" % delta.seconds)
+ with open(package_list_file, 'w') as f:
+ for pkg in sorted(package_list):
+ f.write(pkg + "\n")
def update_distro_data(distro_check_dir, datetime, d):
"""
- If distro packages list data is old then rebuild it.
- The operations has to be protected by a lock so that
- only one thread performes it at a time.
+ If distro packages list data is old then rebuild it.
+ The operations has to be protected by a lock so that
+ only one thread performes it at a time.
"""
if not os.path.isdir (distro_check_dir):
try:
@@ -264,71 +207,59 @@ def update_distro_data(distro_check_dir, datetime, d):
f.seek(0)
f.write(datetime)
- except OSError:
- raise Exception('Unable to read/write this file: %s' % (datetime_file))
+ except OSError as e:
+ raise Exception('Unable to open timestamp: %s' % e)
finally:
fcntl.lockf(f, fcntl.LOCK_UN)
f.close()
-
+
def compare_in_distro_packages_list(distro_check_dir, d):
if not os.path.isdir(distro_check_dir):
raise Exception("compare_in_distro_packages_list: invalid distro_check_dir passed")
-
+
localdata = bb.data.createCopy(d)
pkglst_dir = os.path.join(distro_check_dir, "package_lists")
matching_distros = []
- pn = d.getVar('PN', True)
- recipe_name = d.getVar('PN', True)
+ pn = recipe_name = d.getVar('PN')
bb.note("Checking: %s" % pn)
- trim_dict = dict({"-native":"-native", "-cross":"-cross", "-initial":"-initial"})
-
if pn.find("-native") != -1:
pnstripped = pn.split("-native")
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
+ localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
recipe_name = pnstripped[0]
if pn.startswith("nativesdk-"):
pnstripped = pn.split("nativesdk-")
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[1] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
+ localdata.setVar('OVERRIDES', "pn-" + pnstripped[1] + ":" + d.getVar('OVERRIDES'))
recipe_name = pnstripped[1]
if pn.find("-cross") != -1:
pnstripped = pn.split("-cross")
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
+ localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
recipe_name = pnstripped[0]
if pn.find("-initial") != -1:
pnstripped = pn.split("-initial")
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
- bb.data.update_data(localdata)
+ localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
recipe_name = pnstripped[0]
bb.note("Recipe: %s" % recipe_name)
- tmp = localdata.getVar('DISTRO_PN_ALIAS', True)
distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "Windriver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'})
-
- if tmp:
- list = tmp.split(' ')
- for str in list:
- if str and str.find("=") == -1 and distro_exceptions[str]:
- matching_distros.append(str)
+ tmp = localdata.getVar('DISTRO_PN_ALIAS') or ""
+ for str in tmp.split():
+ if str and str.find("=") == -1 and distro_exceptions[str]:
+ matching_distros.append(str)
distro_pn_aliases = {}
- if tmp:
- list = tmp.split(' ')
- for str in list:
- if str.find("=") != -1:
- (dist, pn_alias) = str.split('=')
- distro_pn_aliases[dist.strip().lower()] = pn_alias.strip()
-
+ for str in tmp.split():
+ if "=" in str:
+ (dist, pn_alias) = str.split('=')
+ distro_pn_aliases[dist.strip().lower()] = pn_alias.strip()
+
for file in os.listdir(pkglst_dir):
(distro, distro_release) = file.split("-")
- f = open(os.path.join(pkglst_dir, file), "rb")
+ f = open(os.path.join(pkglst_dir, file), "r")
for line in f:
(pkg, section) = line.split(":")
if distro.lower() in distro_pn_aliases:
@@ -341,38 +272,34 @@ def compare_in_distro_packages_list(distro_check_dir, d):
break
f.close()
-
- if tmp != None:
- list = tmp.split(' ')
- for item in list:
- matching_distros.append(item)
+ for item in tmp.split():
+ matching_distros.append(item)
bb.note("Matching: %s" % matching_distros)
return matching_distros
def create_log_file(d, logname):
- import subprocess
- logpath = d.getVar('LOG_DIR', True)
+ logpath = d.getVar('LOG_DIR')
bb.utils.mkdirhier(logpath)
logfn, logsuffix = os.path.splitext(logname)
- logfile = os.path.join(logpath, "%s.%s%s" % (logfn, d.getVar('DATETIME', True), logsuffix))
+ logfile = os.path.join(logpath, "%s.%s%s" % (logfn, d.getVar('DATETIME'), logsuffix))
if not os.path.exists(logfile):
slogfile = os.path.join(logpath, logname)
if os.path.exists(slogfile):
os.remove(slogfile)
- subprocess.call("touch %s" % logfile, shell=True)
+ open(logfile, 'w+').close()
os.symlink(logfile, slogfile)
d.setVar('LOG_FILE', logfile)
return logfile
def save_distro_check_result(result, datetime, result_file, d):
- pn = d.getVar('PN', True)
- logdir = d.getVar('LOG_DIR', True)
+ pn = d.getVar('PN')
+ logdir = d.getVar('LOG_DIR')
if not logdir:
bb.error("LOG_DIR variable is not defined, can't write the distro_check results")
return
- if not os.path.isdir(logdir):
- os.makedirs(logdir)
+ bb.utils.mkdirhier(logdir)
+
line = pn
for i in result:
line = line + "," + i
diff --git a/meta/lib/oe/elf.py b/meta/lib/oe/elf.py
new file mode 100644
index 0000000000..2562cea1dd
--- /dev/null
+++ b/meta/lib/oe/elf.py
@@ -0,0 +1,133 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+def machine_dict(d):
+# TARGET_OS TARGET_ARCH MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
+ machdata = {
+ "darwin9" : {
+ "arm" : (40, 0, 0, True, 32),
+ },
+ "eabi" : {
+ "arm" : (40, 0, 0, True, 32),
+ },
+ "elf" : {
+ "aarch64" : (183, 0, 0, True, 64),
+ "aarch64_be" :(183, 0, 0, False, 64),
+ "i586" : (3, 0, 0, True, 32),
+ "x86_64": (62, 0, 0, True, 64),
+ "epiphany": (4643, 0, 0, True, 32),
+ "lm32": (138, 0, 0, False, 32),
+ "mips": ( 8, 0, 0, False, 32),
+ "mipsel": ( 8, 0, 0, True, 32),
+ "microblaze": (189, 0, 0, False, 32),
+ "microblazeeb":(189, 0, 0, False, 32),
+ "microblazeel":(189, 0, 0, True, 32),
+ "powerpc": (20, 0, 0, False, 32),
+ "riscv32": (243, 0, 0, True, 32),
+ "riscv64": (243, 0, 0, True, 64),
+ },
+ "linux" : {
+ "aarch64" : (183, 0, 0, True, 64),
+ "aarch64_be" :(183, 0, 0, False, 64),
+ "arm" : (40, 97, 0, True, 32),
+ "armeb": (40, 97, 0, False, 32),
+ "powerpc": (20, 0, 0, False, 32),
+ "powerpc64": (21, 0, 0, False, 64),
+ "i386": ( 3, 0, 0, True, 32),
+ "i486": ( 3, 0, 0, True, 32),
+ "i586": ( 3, 0, 0, True, 32),
+ "i686": ( 3, 0, 0, True, 32),
+ "x86_64": (62, 0, 0, True, 64),
+ "ia64": (50, 0, 0, True, 64),
+ "alpha": (36902, 0, 0, True, 64),
+ "hppa": (15, 3, 0, False, 32),
+ "m68k": ( 4, 0, 0, False, 32),
+ "mips": ( 8, 0, 0, False, 32),
+ "mipsel": ( 8, 0, 0, True, 32),
+ "mips64": ( 8, 0, 0, False, 64),
+ "mips64el": ( 8, 0, 0, True, 64),
+ "mipsisa32r6": ( 8, 0, 0, False, 32),
+ "mipsisa32r6el": ( 8, 0, 0, True, 32),
+ "mipsisa64r6": ( 8, 0, 0, False, 64),
+ "mipsisa64r6el": ( 8, 0, 0, True, 64),
+ "nios2": (113, 0, 0, True, 32),
+ "riscv32": (243, 0, 0, True, 32),
+ "riscv64": (243, 0, 0, True, 64),
+ "s390": (22, 0, 0, False, 32),
+ "sh4": (42, 0, 0, True, 32),
+ "sparc": ( 2, 0, 0, False, 32),
+ "microblaze": (189, 0, 0, False, 32),
+ "microblazeeb":(189, 0, 0, False, 32),
+ "microblazeel":(189, 0, 0, True, 32),
+ },
+ "linux-musl" : {
+ "aarch64" : (183, 0, 0, True, 64),
+ "aarch64_be" :(183, 0, 0, False, 64),
+ "arm" : ( 40, 97, 0, True, 32),
+ "armeb": ( 40, 97, 0, False, 32),
+ "powerpc": ( 20, 0, 0, False, 32),
+ "powerpc64": ( 21, 0, 0, False, 64),
+ "i386": ( 3, 0, 0, True, 32),
+ "i486": ( 3, 0, 0, True, 32),
+ "i586": ( 3, 0, 0, True, 32),
+ "i686": ( 3, 0, 0, True, 32),
+ "x86_64": ( 62, 0, 0, True, 64),
+ "mips": ( 8, 0, 0, False, 32),
+ "mipsel": ( 8, 0, 0, True, 32),
+ "mips64": ( 8, 0, 0, False, 64),
+ "mips64el": ( 8, 0, 0, True, 64),
+ "microblaze": (189, 0, 0, False, 32),
+ "microblazeeb":(189, 0, 0, False, 32),
+ "microblazeel":(189, 0, 0, True, 32),
+ "riscv32": (243, 0, 0, True, 32),
+ "riscv64": (243, 0, 0, True, 64),
+ "sh4": ( 42, 0, 0, True, 32),
+ },
+ "uclinux-uclibc" : {
+ "bfin": ( 106, 0, 0, True, 32),
+ },
+ "linux-gnueabi" : {
+ "arm" : (40, 0, 0, True, 32),
+ "armeb" : (40, 0, 0, False, 32),
+ },
+ "linux-musleabi" : {
+ "arm" : (40, 0, 0, True, 32),
+ "armeb" : (40, 0, 0, False, 32),
+ },
+ "linux-gnuspe" : {
+ "powerpc": (20, 0, 0, False, 32),
+ },
+ "linux-muslspe" : {
+ "powerpc": (20, 0, 0, False, 32),
+ },
+ "linux-gnu" : {
+ "powerpc": (20, 0, 0, False, 32),
+ "sh4": (42, 0, 0, True, 32),
+ },
+ "linux-gnu_ilp32" : {
+ "aarch64" : (183, 0, 0, True, 32),
+ },
+ "linux-gnux32" : {
+ "x86_64": (62, 0, 0, True, 32),
+ },
+ "linux-muslx32" : {
+ "x86_64": (62, 0, 0, True, 32),
+ },
+ "linux-gnun32" : {
+ "mips64": ( 8, 0, 0, False, 32),
+ "mips64el": ( 8, 0, 0, True, 32),
+ "mipsisa64r6": ( 8, 0, 0, False, 32),
+ "mipsisa64r6el":( 8, 0, 0, True, 32),
+ },
+ }
+
+ # Add in any extra user supplied data which may come from a BSP layer, removing the
+ # need to always change this class directly
+ extra_machdata = (d and d.getVar("PACKAGEQA_EXTRA_MACHDEFFUNCS" or None) or "").split()
+ for m in extra_machdata:
+ call = m + "(machdata, d)"
+ locs = { "machdata" : machdata, "d" : d}
+ machdata = bb.utils.better_eval(call, locs)
+
+ return machdata
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index 38eb0cb137..7634d7ef1d 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -1,55 +1,71 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
"""Helper module for GPG signing"""
import os
import bb
-import oe.utils
+import subprocess
+import shlex
class LocalSigner(object):
"""Class for handling local (on the build host) signing"""
def __init__(self, d):
- self.gpg_bin = d.getVar('GPG_BIN', True) or \
+ self.gpg_bin = d.getVar('GPG_BIN') or \
bb.utils.which(os.getenv('PATH'), 'gpg')
- self.gpg_path = d.getVar('GPG_PATH', True)
- self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpm")
+ self.gpg_cmd = [self.gpg_bin]
+ self.gpg_agent_bin = bb.utils.which(os.getenv('PATH'), "gpg-agent")
+ # Without this we see "Cannot allocate memory" errors when running processes in parallel
+ # It needs to be set for any gpg command since any agent launched can stick around in memory
+ # and this parameter must be set.
+ if self.gpg_agent_bin:
+ self.gpg_cmd += ["--agent-program=%s|--auto-expand-secmem" % (self.gpg_agent_bin)]
+ self.gpg_path = d.getVar('GPG_PATH')
+ self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
+ self.gpg_version = self.get_gpg_version()
+
def export_pubkey(self, output_file, keyid, armor=True):
"""Export GPG public key to a file"""
- cmd = '%s --batch --yes --export -o %s ' % \
- (self.gpg_bin, output_file)
+ cmd = self.gpg_cmd + ["--no-permission-warning", "--batch", "--yes", "--export", "-o", output_file]
if self.gpg_path:
- cmd += "--homedir %s " % self.gpg_path
+ cmd += ["--homedir", self.gpg_path]
if armor:
- cmd += "--armor "
- cmd += keyid
- status, output = oe.utils.getstatusoutput(cmd)
- if status:
- raise bb.build.FuncFailed('Failed to export gpg public key (%s): %s' %
- (keyid, output))
-
- def sign_rpms(self, files, keyid, passphrase):
+ cmd += ["--armor"]
+ cmd += [keyid]
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+
+ def sign_rpms(self, files, keyid, passphrase, digest, sign_chunk, fsk=None, fsk_password=None):
"""Sign RPM files"""
cmd = self.rpm_bin + " --addsign --define '_gpg_name %s' " % keyid
- cmd += "--define '_gpg_passphrase %s' " % passphrase
+ gpg_args = '--no-permission-warning --batch --passphrase=%s --agent-program=%s|--auto-expand-secmem' % (passphrase, self.gpg_agent_bin)
+ if self.gpg_version > (2,1,):
+ gpg_args += ' --pinentry-mode=loopback'
+ cmd += "--define '_gpg_sign_cmd_extra_args %s' " % gpg_args
+ cmd += "--define '_binary_filedigest_algorithm %s' " % digest
if self.gpg_bin:
- cmd += "--define '%%__gpg %s' " % self.gpg_bin
+ cmd += "--define '__gpg %s' " % self.gpg_bin
if self.gpg_path:
cmd += "--define '_gpg_path %s' " % self.gpg_path
- cmd += ' '.join(files)
+ if fsk:
+ cmd += "--signfiles --fskpath %s " % fsk
+ if fsk_password:
+ cmd += "--define '_file_signing_key_password %s' " % fsk_password
- status, output = oe.utils.getstatusoutput(cmd)
- if status:
- raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output)
+ # Sign in chunks
+ for i in range(0, len(files), sign_chunk):
+ subprocess.check_output(shlex.split(cmd + ' '.join(files[i:i+sign_chunk])), stderr=subprocess.STDOUT)
def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True):
"""Create a detached signature of a file"""
- import subprocess
if passphrase_file and passphrase:
raise Exception("You should use either passphrase_file of passphrase, not both")
- cmd = [self.gpg_bin, '--detach-sign', '--batch', '--no-tty', '--yes',
- '--passphrase-fd', '0', '-u', keyid]
+ cmd = self.gpg_cmd + ['--detach-sign', '--no-permission-warning', '--batch',
+ '--no-tty', '--yes', '--passphrase-fd', '0', '-u', keyid]
if self.gpg_path:
cmd += ['--homedir', self.gpg_path]
@@ -58,9 +74,7 @@ class LocalSigner(object):
#gpg > 2.1 supports password pipes only through the loopback interface
#gpg < 2.1 errors out if given unknown parameters
- dots = self.get_gpg_version().split('.')
- assert len(dots) >= 2
- if int(dots[0]) >= 2 and int(dots[1]) >= 1:
+ if self.gpg_version > (2,1,):
cmd += ['--pinentry-mode', 'loopback']
cmd += [input_file]
@@ -74,8 +88,7 @@ class LocalSigner(object):
(_, stderr) = job.communicate(passphrase.encode("utf-8"))
if job.returncode:
- raise bb.build.FuncFailed("GPG exited with code %d: %s" %
- (job.returncode, stderr.decode("utf-8")))
+ bb.fatal("GPG exited with code %d: %s" % (job.returncode, stderr.decode("utf-8")))
except IOError as e:
bb.error("IO error (%s): %s" % (e.errno, e.strerror))
@@ -87,21 +100,23 @@ class LocalSigner(object):
def get_gpg_version(self):
- """Return the gpg version"""
- import subprocess
+ """Return the gpg version as a tuple of ints"""
try:
- return subprocess.check_output((self.gpg_bin, "--version")).split()[2].decode("utf-8")
+ cmd = self.gpg_cmd + ["--version", "--no-permission-warning"]
+ ver_str = subprocess.check_output(cmd).split()[2].decode("utf-8")
+ return tuple([int(i) for i in ver_str.split("-")[0].split('.')])
except subprocess.CalledProcessError as e:
- raise bb.build.FuncFailed("Could not get gpg version: %s" % e)
+ bb.fatal("Could not get gpg version: %s" % e)
def verify(self, sig_file):
"""Verify signature"""
- cmd = self.gpg_bin + " --verify "
+ cmd = self.gpg_cmd + [" --verify", "--no-permission-warning"]
if self.gpg_path:
- cmd += "--homedir %s " % self.gpg_path
- cmd += sig_file
- status, _ = oe.utils.getstatusoutput(cmd)
+ cmd += ["--homedir", self.gpg_path]
+
+ cmd += [sig_file]
+ status = subprocess.call(cmd)
ret = False if status else True
return ret
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 8d2fd1709c..c1274a61de 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -1,4 +1,6 @@
-# vi:sts=4:sw=4:et
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
"""Code for parsing OpenEmbedded license strings"""
import ast
@@ -13,8 +15,8 @@ def license_ok(license, dont_want_licenses):
# will exclude a trailing '+' character from LICENSE in
# case INCOMPATIBLE_LICENSE is not a 'X+' license.
lic = license
- if not re.search('\+$', dwl):
- lic = re.sub('\+', '', license)
+ if not re.search(r'\+$', dwl):
+ lic = re.sub(r'\+', '', license)
if fnmatch(lic, dwl):
return False
return True
@@ -40,8 +42,8 @@ class InvalidLicense(LicenseError):
return "invalid characters in license '%s'" % self.license
license_operator_chars = '&|() '
-license_operator = re.compile('([' + license_operator_chars + '])')
-license_pattern = re.compile('[a-zA-Z0-9.+_\-]+$')
+license_operator = re.compile(r'([' + license_operator_chars + '])')
+license_pattern = re.compile(r'[a-zA-Z0-9.+_\-]+$')
class LicenseVisitor(ast.NodeVisitor):
"""Get elements based on OpenEmbedded license strings"""
@@ -106,7 +108,8 @@ def is_included(licensestr, whitelist=None, blacklist=None):
license string matches the whitelist and does not match the blacklist.
Returns a tuple holding the boolean state and a list of the applicable
- licenses which were excluded (or None, if the state is True)
+ licenses that were excluded if state is False, or the licenses that were
+ included if the state is True.
"""
def include_license(license):
@@ -117,10 +120,17 @@ def is_included(licensestr, whitelist=None, blacklist=None):
def choose_licenses(alpha, beta):
"""Select the option in an OR which is the 'best' (has the most
- included licenses)."""
- alpha_weight = len(list(filter(include_license, alpha)))
- beta_weight = len(list(filter(include_license, beta)))
- if alpha_weight > beta_weight:
+ included licenses and no excluded licenses)."""
+ # The factor 1000 below is arbitrary, just expected to be much larger
+ # that the number of licenses actually specified. That way the weight
+ # will be negative if the list of licenses contains an excluded license,
+ # but still gives a higher weight to the list with the most included
+ # licenses.
+ alpha_weight = (len(list(filter(include_license, alpha))) -
+ 1000 * (len(list(filter(exclude_license, alpha))) > 0))
+ beta_weight = (len(list(filter(include_license, beta))) -
+ 1000 * (len(list(filter(exclude_license, beta))) > 0))
+ if alpha_weight >= beta_weight:
return alpha
else:
return beta
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index e0bdfba255..43e46380d7 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -1,26 +1,65 @@
-def release_dict():
- """Return the output of lsb_release -ir as a dictionary"""
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+def get_os_release():
+ """Get all key-value pairs from /etc/os-release as a dict"""
+ from collections import OrderedDict
+
+ data = OrderedDict()
+ if os.path.exists('/etc/os-release'):
+ with open('/etc/os-release') as f:
+ for line in f:
+ try:
+ key, val = line.rstrip().split('=', 1)
+ except ValueError:
+ continue
+ data[key.strip()] = val.strip('"')
+ return data
+
+def release_dict_osr():
+ """ Populate a dict with pertinent values from /etc/os-release """
+ data = {}
+ os_release = get_os_release()
+ if 'ID' in os_release:
+ data['DISTRIB_ID'] = os_release['ID']
+ if 'VERSION_ID' in os_release:
+ data['DISTRIB_RELEASE'] = os_release['VERSION_ID']
+
+ return data
+
+def release_dict_lsb():
+ """ Return the output of lsb_release -ir as a dictionary """
from subprocess import PIPE
try:
output, err = bb.process.run(['lsb_release', '-ir'], stderr=PIPE)
except bb.process.CmdError as exc:
- return None
+ return {}
+
+ lsb_map = { 'Distributor ID': 'DISTRIB_ID',
+ 'Release': 'DISTRIB_RELEASE'}
+ lsb_keys = lsb_map.keys()
data = {}
for line in output.splitlines():
- if line.startswith("-e"): line = line[3:]
+ if line.startswith("-e"):
+ line = line[3:]
try:
key, value = line.split(":\t", 1)
except ValueError:
continue
- else:
- data[key] = value
+ if key in lsb_keys:
+ data[lsb_map[key]] = value
+
+ if len(data.keys()) != 2:
+ return None
+
return data
def release_dict_file():
- """ Try to gather LSB release information manually when lsb_release tool is unavailable """
- data = None
+ """ Try to gather release information manually when other methods fail """
+ data = {}
try:
if os.path.exists('/etc/lsb-release'):
data = {}
@@ -37,14 +76,6 @@ def release_dict_file():
if match:
data['DISTRIB_ID'] = match.group(1)
data['DISTRIB_RELEASE'] = match.group(2)
- elif os.path.exists('/etc/os-release'):
- data = {}
- with open('/etc/os-release') as f:
- for line in f:
- if line.startswith('NAME='):
- data['DISTRIB_ID'] = line[5:].rstrip().strip('"')
- if line.startswith('VERSION_ID='):
- data['DISTRIB_RELEASE'] = line[11:].rstrip().strip('"')
elif os.path.exists('/etc/SuSE-release'):
data = {}
data['DISTRIB_ID'] = 'SUSE LINUX'
@@ -55,7 +86,7 @@ def release_dict_file():
break
except IOError:
- return None
+ return {}
return data
def distro_identifier(adjust_hook=None):
@@ -64,22 +95,24 @@ def distro_identifier(adjust_hook=None):
import re
- lsb_data = release_dict()
- if lsb_data:
- distro_id, release = lsb_data['Distributor ID'], lsb_data['Release']
- else:
- lsb_data_file = release_dict_file()
- if lsb_data_file:
- distro_id, release = lsb_data_file['DISTRIB_ID'], lsb_data_file.get('DISTRIB_RELEASE', None)
- else:
- distro_id, release = None, None
+ # Try /etc/os-release first, then the output of `lsb_release -ir` and
+ # finally fall back on parsing various release files in order to determine
+ # host distro name and version.
+ distro_data = release_dict_osr()
+ if not distro_data:
+ distro_data = release_dict_lsb()
+ if not distro_data:
+ distro_data = release_dict_file()
+
+ distro_id = distro_data.get('DISTRIB_ID', '')
+ release = distro_data.get('DISTRIB_RELEASE', '')
if adjust_hook:
distro_id, release = adjust_hook(distro_id, release)
if not distro_id:
- return "Unknown"
- # Filter out any non-alphanumerics
- distro_id = re.sub(r'\W', '', distro_id)
+ return "unknown"
+ # Filter out any non-alphanumerics and convert to lowercase
+ distro_id = re.sub(r'\W', '', distro_id).lower()
if release:
id_str = '{0}-{1}'.format(distro_id, release)
diff --git a/meta/lib/oe/maketype.py b/meta/lib/oe/maketype.py
index f88981dd90..d929c8b3e5 100644
--- a/meta/lib/oe/maketype.py
+++ b/meta/lib/oe/maketype.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
"""OpenEmbedded variable typing support
Types are defined in the metadata by name, using the 'type' flag on a
@@ -7,7 +10,12 @@ the arguments of the type's factory for details.
import inspect
import oe.types as types
-import collections
+try:
+ # Python 3.7+
+ from collections.abc import Callable
+except ImportError:
+ # Python < 3.7
+ from collections import Callable
available_types = {}
@@ -96,7 +104,7 @@ for name in dir(types):
continue
obj = getattr(types, name)
- if not isinstance(obj, collections.Callable):
+ if not isinstance(obj, Callable):
continue
register(name, obj)
diff --git a/meta/lib/oe/manifest.py b/meta/lib/oe/manifest.py
index 95f8eb2df3..f7c88f9a09 100644
--- a/meta/lib/oe/manifest.py
+++ b/meta/lib/oe/manifest.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from abc import ABCMeta, abstractmethod
import os
import re
@@ -59,9 +63,9 @@ class Manifest(object, metaclass=ABCMeta):
if manifest_dir is None:
if manifest_type != self.MANIFEST_TYPE_IMAGE:
- self.manifest_dir = self.d.getVar('SDK_DIR', True)
+ self.manifest_dir = self.d.getVar('SDK_DIR')
else:
- self.manifest_dir = self.d.getVar('WORKDIR', True)
+ self.manifest_dir = self.d.getVar('WORKDIR')
else:
self.manifest_dir = manifest_dir
@@ -82,7 +86,7 @@ class Manifest(object, metaclass=ABCMeta):
This will be used for testing until the class is implemented properly!
"""
def _create_dummy_initial(self):
- image_rootfs = self.d.getVar('IMAGE_ROOTFS', True)
+ image_rootfs = self.d.getVar('IMAGE_ROOTFS')
pkg_list = dict()
if image_rootfs.find("core-image-sato-sdk") > 0:
pkg_list[self.PKG_TYPE_MUST_INSTALL] = \
@@ -104,7 +108,7 @@ class Manifest(object, metaclass=ABCMeta):
pkg_list['lgp'] = \
"locale-base-en-us locale-base-en-gb"
elif image_rootfs.find("core-image-minimal") > 0:
- pkg_list[self.PKG_TYPE_MUST_INSTALL] = "run-postinsts packagegroup-core-boot"
+ pkg_list[self.PKG_TYPE_MUST_INSTALL] = "packagegroup-core-boot"
with open(self.initial_manifest, "w+") as manifest:
manifest.write(self.initial_manifest_file_header)
@@ -195,7 +199,7 @@ class RpmManifest(Manifest):
for pkg in pkg_list.split():
pkg_type = self.PKG_TYPE_MUST_INSTALL
- ml_variants = self.d.getVar('MULTILIB_VARIANTS', True).split()
+ ml_variants = self.d.getVar('MULTILIB_VARIANTS').split()
for ml_variant in ml_variants:
if pkg.startswith(ml_variant + '-'):
@@ -216,13 +220,13 @@ class RpmManifest(Manifest):
for var in self.var_maps[self.manifest_type]:
if var in self.vars_to_split:
- split_pkgs = self._split_multilib(self.d.getVar(var, True))
+ split_pkgs = self._split_multilib(self.d.getVar(var))
if split_pkgs is not None:
pkgs = dict(list(pkgs.items()) + list(split_pkgs.items()))
else:
- pkg_list = self.d.getVar(var, True)
+ pkg_list = self.d.getVar(var)
if pkg_list is not None:
- pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var, True)
+ pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var)
for pkg_type in pkgs:
for pkg in pkgs[pkg_type].split():
@@ -245,7 +249,7 @@ class OpkgManifest(Manifest):
for pkg in pkg_list.split():
pkg_type = self.PKG_TYPE_MUST_INSTALL
- ml_variants = self.d.getVar('MULTILIB_VARIANTS', True).split()
+ ml_variants = self.d.getVar('MULTILIB_VARIANTS').split()
for ml_variant in ml_variants:
if pkg.startswith(ml_variant + '-'):
@@ -266,16 +270,16 @@ class OpkgManifest(Manifest):
for var in self.var_maps[self.manifest_type]:
if var in self.vars_to_split:
- split_pkgs = self._split_multilib(self.d.getVar(var, True))
+ split_pkgs = self._split_multilib(self.d.getVar(var))
if split_pkgs is not None:
pkgs = dict(list(pkgs.items()) + list(split_pkgs.items()))
else:
- pkg_list = self.d.getVar(var, True)
+ pkg_list = self.d.getVar(var)
if pkg_list is not None:
- pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var, True)
+ pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var)
- for pkg_type in pkgs:
- for pkg in pkgs[pkg_type].split():
+ for pkg_type in sorted(pkgs):
+ for pkg in sorted(pkgs[pkg_type].split()):
manifest.write("%s,%s\n" % (pkg_type, pkg))
def create_final(self):
@@ -310,7 +314,7 @@ class DpkgManifest(Manifest):
manifest.write(self.initial_manifest_file_header)
for var in self.var_maps[self.manifest_type]:
- pkg_list = self.d.getVar(var, True)
+ pkg_list = self.d.getVar(var)
if pkg_list is None:
continue
@@ -332,7 +336,7 @@ def create_manifest(d, final_manifest=False, manifest_dir=None,
'ipk': OpkgManifest,
'deb': DpkgManifest}
- manifest = manifest_map[d.getVar('IMAGE_PKGTYPE', True)](d, manifest_dir, manifest_type)
+ manifest = manifest_map[d.getVar('IMAGE_PKGTYPE')](d, manifest_dir, manifest_type)
if final_manifest:
manifest.create_final()
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 02642f29f0..b8585d4253 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -1,15 +1,21 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import stat
+import mmap
+import subprocess
+
def runstrip(arg):
# Function to strip a single file, called from split_and_strip_files below
# A working 'file' (one which works on the target architecture)
#
- # The elftype is a bit pattern (explained in split_and_strip_files) to tell
+ # The elftype is a bit pattern (explained in is_elf below) to tell
# us what type of file we're processing...
# 4 - executable
# 8 - shared library
# 16 - kernel module
- import stat, subprocess
-
(file, elftype, strip) = arg
newmode = None
@@ -18,30 +24,157 @@ def runstrip(arg):
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
- extraflags = ""
-
+ stripcmd = [strip]
+ skip_strip = False
# kernel module
if elftype & 16:
- extraflags = "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
+ if is_kernel_module_signed(file):
+ bb.debug(1, "Skip strip on signed module %s" % file)
+ skip_strip = True
+ else:
+ stripcmd.extend(["--strip-debug", "--remove-section=.comment",
+ "--remove-section=.note", "--preserve-dates"])
# .so and shared library
elif ".so" in file and elftype & 8:
- extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
+ stripcmd.extend(["--remove-section=.comment", "--remove-section=.note", "--strip-unneeded"])
# shared or executable:
elif elftype & 8 or elftype & 4:
- extraflags = "--remove-section=.comment --remove-section=.note"
+ stripcmd.extend(["--remove-section=.comment", "--remove-section=.note"])
- stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+ stripcmd.append(file)
bb.debug(1, "runstrip: %s" % stripcmd)
- try:
- output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT, shell=True)
- except subprocess.CalledProcessError as e:
- bb.error("runstrip: '%s' strip command failed with %s (%s)" % (stripcmd, e.returncode, e.output))
+ if not skip_strip:
+ output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
if newmode:
os.chmod(file, origmode)
- return
+# Detect .ko module by searching for "vermagic=" string
+def is_kernel_module(path):
+ with open(path) as f:
+ return mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ).find(b"vermagic=") >= 0
+
+# Detect if .ko module is signed
+def is_kernel_module_signed(path):
+ with open(path, "rb") as f:
+ f.seek(-28, 2)
+ module_tail = f.read()
+ return "Module signature appended" in "".join(chr(c) for c in bytearray(module_tail))
+
+# Return type (bits):
+# 0 - not elf
+# 1 - ELF
+# 2 - stripped
+# 4 - executable
+# 8 - shared library
+# 16 - kernel module
+def is_elf(path):
+ exec_type = 0
+ result = subprocess.check_output(["file", "-b", path], stderr=subprocess.STDOUT).decode("utf-8")
+
+ if "ELF" in result:
+ exec_type |= 1
+ if "not stripped" not in result:
+ exec_type |= 2
+ if "executable" in result:
+ exec_type |= 4
+ if "shared" in result:
+ exec_type |= 8
+ if "relocatable" in result:
+ if path.endswith(".ko") and path.find("/lib/modules/") != -1 and is_kernel_module(path):
+ exec_type |= 16
+ return (path, exec_type)
+
+def is_static_lib(path):
+ if path.endswith('.a') and not os.path.islink(path):
+ with open(path, 'rb') as fh:
+ # The magic must include the first slash to avoid
+ # matching golang static libraries
+ magic = b'!<arch>\x0a/'
+ start = fh.read(len(magic))
+ return start == magic
+ return False
+
+def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, qa_already_stripped=False):
+ """
+ Strip executable code (like executables, shared libraries) _in_place_
+ - Based on sysroot_strip in staging.bbclass
+ :param dstdir: directory in which to strip files
+ :param strip_cmd: Strip command (usually ${STRIP})
+ :param libdir: ${libdir} - strip .so files in this directory
+ :param base_libdir: ${base_libdir} - strip .so files in this directory
+ :param qa_already_stripped: Set to True if already-stripped' in ${INSANE_SKIP}
+ This is for proper logging and messages only.
+ """
+ import stat, errno, oe.path, oe.utils
+
+ elffiles = {}
+ inodes = {}
+ libdir = os.path.abspath(dstdir + os.sep + libdir)
+ base_libdir = os.path.abspath(dstdir + os.sep + base_libdir)
+ exec_mask = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
+ #
+ # First lets figure out all of the files we may have to process
+ #
+ checkelf = []
+ inodecache = {}
+ for root, dirs, files in os.walk(dstdir):
+ for f in files:
+ file = os.path.join(root, f)
+
+ try:
+ ltarget = oe.path.realpath(file, dstdir, False)
+ s = os.lstat(ltarget)
+ except OSError as e:
+ (err, strerror) = e.args
+ if err != errno.ENOENT:
+ raise
+ # Skip broken symlinks
+ continue
+ if not s:
+ continue
+ # Check its an excutable
+ if s[stat.ST_MODE] & exec_mask \
+ or ((file.startswith(libdir) or file.startswith(base_libdir)) and ".so" in f) \
+ or file.endswith('.ko'):
+ # If it's a symlink, and points to an ELF file, we capture the readlink target
+ if os.path.islink(file):
+ continue
+
+ # It's a file (or hardlink), not a link
+ # ...but is it ELF, and is it already stripped?
+ checkelf.append(file)
+ inodecache[file] = s.st_ino
+ results = oe.utils.multiprocess_launch(is_elf, checkelf, d)
+ for (file, elf_file) in results:
+ #elf_file = is_elf(file)
+ if elf_file & 1:
+ if elf_file & 2:
+ if qa_already_stripped:
+ bb.note("Skipping file %s from %s for already-stripped QA test" % (file[len(dstdir):], pn))
+ else:
+ bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dstdir):], pn))
+ continue
+
+ if inodecache[file] in inodes:
+ os.unlink(file)
+ os.link(inodes[inodecache[file]], file)
+ else:
+ # break hardlinks so that we do not strip the original.
+ inodes[inodecache[file]] = file
+ bb.utils.break_hardlinks(file)
+ elffiles[file] = elf_file
+
+ #
+ # Now strip them (in parallel)
+ #
+ sfiles = []
+ for file in elffiles:
+ elf_file = int(elffiles[file])
+ sfiles.append((file, elf_file, strip_cmd))
+
+ oe.utils.multiprocess_launch(runstrip, sfiles, d)
def file_translate(file):
@@ -60,41 +193,63 @@ def filedeprunner(arg):
provides = {}
requires = {}
- r = re.compile(r'[<>=]+ +[^ ]*')
+ file_re = re.compile(r'\s+\d+\s(.*)')
+ dep_re = re.compile(r'\s+(\S)\s+(.*)')
+ r = re.compile(r'[<>=]+\s+\S*')
def process_deps(pipe, pkg, pkgdest, provides, requires):
- for line in pipe:
- f = line.decode("utf-8").split(" ", 1)[0].strip()
- line = line.decode("utf-8").split(" ", 1)[1].strip()
+ file = None
+ for line in pipe.split("\n"):
+
+ m = file_re.match(line)
+ if m:
+ file = m.group(1)
+ file = file.replace(pkgdest + "/" + pkg, "")
+ file = file_translate(file)
+ continue
- if line.startswith("Requires:"):
+ m = dep_re.match(line)
+ if not m or not file:
+ continue
+
+ type, dep = m.groups()
+
+ if type == 'R':
i = requires
- elif line.startswith("Provides:"):
+ elif type == 'P':
i = provides
else:
- continue
+ continue
- file = f.replace(pkgdest + "/" + pkg, "")
- file = file_translate(file)
- value = line.split(":", 1)[1].strip()
- value = r.sub(r'(\g<0>)', value)
+ if dep.startswith("python("):
+ continue
- if value.startswith("rpmlib("):
+ # Ignore all perl(VMS::...) and perl(Mac::...) dependencies. These
+ # are typically used conditionally from the Perl code, but are
+ # generated as unconditional dependencies.
+ if dep.startswith('perl(VMS::') or dep.startswith('perl(Mac::'):
continue
- if value == "python":
+
+ # Ignore perl dependencies on .pl files.
+ if dep.startswith('perl(') and dep.endswith('.pl)'):
continue
+
+ # Remove perl versions and perl module versions since they typically
+ # do not make sense when used as package versions.
+ if dep.startswith('perl') and r.search(dep):
+ dep = dep.split()[0]
+
+ # Put parentheses around any version specifications.
+ dep = r.sub(r'(\g<0>)',dep)
+
if file not in i:
i[file] = []
- i[file].append(value)
+ i[file].append(dep)
return provides, requires
- try:
- dep_popen = subprocess.Popen(shlex.split(rpmdeps) + pkgfiles, stdout=subprocess.PIPE)
- provides, requires = process_deps(dep_popen.stdout, pkg, pkgdest, provides, requires)
- except OSError as e:
- bb.error("rpmdeps: '%s' command failed, '%s'" % (shlex.split(rpmdeps) + pkgfiles, e))
- raise e
+ output = subprocess.check_output(shlex.split(rpmdeps) + pkgfiles, stderr=subprocess.STDOUT).decode("utf-8")
+ provides, requires = process_deps(output, pkg, pkgdest, provides, requires)
return (pkg, provides, requires)
@@ -103,14 +258,14 @@ def read_shlib_providers(d):
import re
shlib_provider = {}
- shlibs_dirs = d.getVar('SHLIBSDIRS', True).split()
- list_re = re.compile('^(.*)\.list$')
+ shlibs_dirs = d.getVar('SHLIBSDIRS').split()
+ list_re = re.compile(r'^(.*)\.list$')
# Go from least to most specific since the last one found wins
for dir in reversed(shlibs_dirs):
bb.debug(2, "Reading shlib providers in %s" % (dir))
if not os.path.exists(dir):
continue
- for file in os.listdir(dir):
+ for file in sorted(os.listdir(dir)):
m = list_re.match(file)
if m:
dep_pkg = m.group(1)
@@ -149,6 +304,7 @@ def npm_split_package_dirs(pkgdir):
continue
pkgitems.append(pathitem)
pkgname = '-'.join(pkgitems).replace('_', '-')
+ pkgname = pkgname.replace('@', '')
pkgfile = os.path.join(root, dn, 'package.json')
data = None
if os.path.exists(pkgfile):
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 434b898d3d..4ff19cf09c 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1,9 +1,12 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from abc import ABCMeta, abstractmethod
import os
import glob
import subprocess
import shutil
-import multiprocessing
import re
import collections
import bb
@@ -12,30 +15,25 @@ import oe.utils
import oe.path
import string
from oe.gpg_sign import get_signer
+import hashlib
+import fnmatch
# this can be used by all PM backends to create the index files in parallel
def create_index(arg):
index_cmd = arg
- try:
- bb.note("Executing '%s' ..." % index_cmd)
- result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
- except subprocess.CalledProcessError as e:
- return("Index creation command '%s' failed with return code %d:\n%s" %
- (e.cmd, e.returncode, e.output.decode("utf-8")))
-
+ bb.note("Executing '%s' ..." % index_cmd)
+ result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
if result:
bb.note(result)
- return None
-
-"""
-This method parse the output from the package managerand return
-a dictionary with the information of the packages. This is used
-when the packages are in deb or ipk format.
-"""
def opkg_query(cmd_output):
- verregex = re.compile(' \([=<>]* [^ )]*\)')
+ """
+ This method parse the output from the package managerand return
+ a dictionary with the information of the packages. This is used
+ when the packages are in deb or ipk format.
+ """
+ verregex = re.compile(r' \([=<>]* [^ )]*\)')
output = dict()
pkg = ""
arch = ""
@@ -90,6 +88,56 @@ def opkg_query(cmd_output):
return output
+def failed_postinsts_abort(pkgs, log_path):
+ bb.fatal("""Postinstall scriptlets of %s have failed. If the intention is to defer them to first boot,
+then please place them into pkg_postinst_ontarget_${PN} ().
+Deferring to first boot via 'exit 1' is no longer supported.
+Details of the failure are in %s.""" %(pkgs, log_path))
+
+def generate_locale_archive(d, rootfs, target_arch, localedir):
+ # Pretty sure we don't need this for locale archive generation but
+ # keeping it to be safe...
+ locale_arch_options = { \
+ "arc": ["--uint32-align=4", "--little-endian"],
+ "arceb": ["--uint32-align=4", "--big-endian"],
+ "arm": ["--uint32-align=4", "--little-endian"],
+ "armeb": ["--uint32-align=4", "--big-endian"],
+ "aarch64": ["--uint32-align=4", "--little-endian"],
+ "aarch64_be": ["--uint32-align=4", "--big-endian"],
+ "sh4": ["--uint32-align=4", "--big-endian"],
+ "powerpc": ["--uint32-align=4", "--big-endian"],
+ "powerpc64": ["--uint32-align=4", "--big-endian"],
+ "mips": ["--uint32-align=4", "--big-endian"],
+ "mipsisa32r6": ["--uint32-align=4", "--big-endian"],
+ "mips64": ["--uint32-align=4", "--big-endian"],
+ "mipsisa64r6": ["--uint32-align=4", "--big-endian"],
+ "mipsel": ["--uint32-align=4", "--little-endian"],
+ "mipsisa32r6el": ["--uint32-align=4", "--little-endian"],
+ "mips64el": ["--uint32-align=4", "--little-endian"],
+ "mipsisa64r6el": ["--uint32-align=4", "--little-endian"],
+ "riscv64": ["--uint32-align=4", "--little-endian"],
+ "riscv32": ["--uint32-align=4", "--little-endian"],
+ "i586": ["--uint32-align=4", "--little-endian"],
+ "i686": ["--uint32-align=4", "--little-endian"],
+ "x86_64": ["--uint32-align=4", "--little-endian"]
+ }
+ if target_arch in locale_arch_options:
+ arch_options = locale_arch_options[target_arch]
+ else:
+ bb.error("locale_arch_options not found for target_arch=" + target_arch)
+ bb.fatal("unknown arch:" + target_arch + " for locale_arch_options")
+
+ # Need to set this so cross-localedef knows where the archive is
+ env = dict(os.environ)
+ env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-archive")
+
+ for name in os.listdir(localedir):
+ path = os.path.join(localedir, name)
+ if os.path.isdir(path):
+ cmd = ["cross-localedef", "--verbose"]
+ cmd += arch_options
+ cmd += ["--add-to-archive", path]
+ subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT)
class Indexer(object, metaclass=ABCMeta):
def __init__(self, d, deploy_dir):
@@ -102,118 +150,50 @@ class Indexer(object, metaclass=ABCMeta):
class RpmIndexer(Indexer):
- def get_ml_prefix_and_os_list(self, arch_var=None, os_var=None):
- package_archs = collections.OrderedDict()
- target_os = collections.OrderedDict()
-
- if arch_var is not None and os_var is not None:
- package_archs['default'] = self.d.getVar(arch_var, True).split()
- package_archs['default'].reverse()
- target_os['default'] = self.d.getVar(os_var, True).strip()
- else:
- package_archs['default'] = self.d.getVar("PACKAGE_ARCHS", True).split()
- # arch order is reversed. This ensures the -best- match is
- # listed first!
- package_archs['default'].reverse()
- target_os['default'] = self.d.getVar("TARGET_OS", True).strip()
- multilibs = self.d.getVar('MULTILIBS', True) or ""
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib':
- localdata = bb.data.createCopy(self.d)
- default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
- default_tune = localdata.getVar(default_tune_key, False)
- if default_tune is None:
- default_tune_key = "DEFAULTTUNE_ML_" + eext[1]
- default_tune = localdata.getVar(default_tune_key, False)
- if default_tune:
- localdata.setVar("DEFAULTTUNE", default_tune)
- bb.data.update_data(localdata)
- package_archs[eext[1]] = localdata.getVar('PACKAGE_ARCHS',
- True).split()
- package_archs[eext[1]].reverse()
- target_os[eext[1]] = localdata.getVar("TARGET_OS",
- True).strip()
-
- ml_prefix_list = collections.OrderedDict()
- for mlib in package_archs:
- if mlib == 'default':
- ml_prefix_list[mlib] = package_archs[mlib]
- else:
- ml_prefix_list[mlib] = list()
- for arch in package_archs[mlib]:
- if arch in ['all', 'noarch', 'any']:
- ml_prefix_list[mlib].append(arch)
- else:
- ml_prefix_list[mlib].append(mlib + "_" + arch)
-
- return (ml_prefix_list, target_os)
-
def write_index(self):
- sdk_pkg_archs = (self.d.getVar('SDK_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
- all_mlb_pkg_archs = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
+ self.do_write_index(self.deploy_dir)
- mlb_prefix_list = self.get_ml_prefix_and_os_list()[0]
-
- archs = set()
- for item in mlb_prefix_list:
- archs = archs.union(set(i.replace('-', '_') for i in mlb_prefix_list[item]))
-
- if len(archs) == 0:
- archs = archs.union(set(all_mlb_pkg_archs))
-
- archs = archs.union(set(sdk_pkg_archs))
-
- rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
- if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
- signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
+ def do_write_index(self, deploy_dir):
+ if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
+ signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
else:
signer = None
- index_cmds = []
- repomd_files = []
- rpm_dirs_found = False
- for arch in archs:
- dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch)
- if os.path.exists(dbpath):
- bb.utils.remove(dbpath, True)
- arch_dir = os.path.join(self.deploy_dir, arch)
- if not os.path.isdir(arch_dir):
- continue
-
- index_cmds.append("%s --dbpath %s --update -q %s" % \
- (rpm_createrepo, dbpath, arch_dir))
- repomd_files.append(os.path.join(arch_dir, 'repodata', 'repomd.xml'))
-
- rpm_dirs_found = True
- if not rpm_dirs_found:
- bb.note("There are no packages in %s" % self.deploy_dir)
- return
-
- # Create repodata
- result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c")
+ result = create_index("%s --update -q %s" % (createrepo_c, deploy_dir))
if result:
- bb.fatal('%s' % ('\n'.join(result)))
+ bb.fatal(result)
+
# Sign repomd
if signer:
- for repomd in repomd_files:
- feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE', True)
- is_ascii_sig = (feed_sig_type.upper() != "BIN")
- signer.detach_sign(repomd,
- self.d.getVar('PACKAGE_FEED_GPG_NAME', True),
- self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True),
- armor=is_ascii_sig)
-
+ sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
+ is_ascii_sig = (sig_type.upper() != "BIN")
+ signer.detach_sign(os.path.join(deploy_dir, 'repodata', 'repomd.xml'),
+ self.d.getVar('PACKAGE_FEED_GPG_NAME'),
+ self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
+ armor=is_ascii_sig)
+
+class RpmSubdirIndexer(RpmIndexer):
+ def write_index(self):
+ bb.note("Generating package index for %s" %(self.deploy_dir))
+ self.do_write_index(self.deploy_dir)
+ for entry in os.walk(self.deploy_dir):
+ if os.path.samefile(self.deploy_dir, entry[0]):
+ for dir in entry[1]:
+ if dir != 'repodata':
+ dir_path = oe.path.join(self.deploy_dir, dir)
+ bb.note("Generating package index for %s" %(dir_path))
+ self.do_write_index(dir_path)
class OpkgIndexer(Indexer):
def write_index(self):
arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS",
"SDK_PACKAGE_ARCHS",
- "MULTILIB_ARCHS"]
+ ]
opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index")
- if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
- signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
+ if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
+ signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
else:
signer = None
@@ -223,7 +203,7 @@ class OpkgIndexer(Indexer):
index_cmds = set()
index_sign_files = set()
for arch_var in arch_vars:
- archs = self.d.getVar(arch_var, True)
+ archs = self.d.getVar(arch_var)
if archs is None:
continue
@@ -237,7 +217,7 @@ class OpkgIndexer(Indexer):
if not os.path.exists(pkgs_file):
open(pkgs_file, "w").close()
- index_cmds.add('%s -r %s -p %s -m %s' %
+ index_cmds.add('%s --checksum md5 --checksum sha256 -r %s -p %s -m %s' %
(opkg_index_cmd, pkgs_file, pkgs_file, pkgs_dir))
index_sign_files.add(pkgs_file)
@@ -246,17 +226,15 @@ class OpkgIndexer(Indexer):
bb.note("There are no packages in %s!" % self.deploy_dir)
return
- result = oe.utils.multiprocess_exec(index_cmds, create_index)
- if result:
- bb.fatal('%s' % ('\n'.join(result)))
+ oe.utils.multiprocess_launch(create_index, index_cmds, self.d)
if signer:
- feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE', True)
+ feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
is_ascii_sig = (feed_sig_type.upper() != "BIN")
for f in index_sign_files:
signer.detach_sign(f,
- self.d.getVar('PACKAGE_FEED_GPG_NAME', True),
- self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True),
+ self.d.getVar('PACKAGE_FEED_GPG_NAME'),
+ self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
armor=is_ascii_sig)
@@ -278,8 +256,8 @@ class DpkgIndexer(Indexer):
with open(os.path.join(self.d.expand("${STAGING_ETCDIR_NATIVE}"),
"apt", "apt.conf.sample")) as apt_conf_sample:
for line in apt_conf_sample.read().split("\n"):
- line = re.sub("#ROOTFS#", "/dev/null", line)
- line = re.sub("#APTCONF#", self.apt_conf_dir, line)
+ line = re.sub(r"#ROOTFS#", "/dev/null", line)
+ line = re.sub(r"#APTCONF#", self.apt_conf_dir, line)
apt_conf.write(line + "\n")
def write_index(self):
@@ -290,16 +268,16 @@ class DpkgIndexer(Indexer):
os.environ['APT_CONFIG'] = self.apt_conf_file
- pkg_archs = self.d.getVar('PACKAGE_ARCHS', True)
+ pkg_archs = self.d.getVar('PACKAGE_ARCHS')
if pkg_archs is not None:
arch_list = pkg_archs.split()
- sdk_pkg_archs = self.d.getVar('SDK_PACKAGE_ARCHS', True)
+ sdk_pkg_archs = self.d.getVar('SDK_PACKAGE_ARCHS')
if sdk_pkg_archs is not None:
for a in sdk_pkg_archs.split():
if a not in pkg_archs:
arch_list.append(a)
- all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").split()
+ all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").split()
arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in arch_list)
apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
@@ -314,13 +292,13 @@ class DpkgIndexer(Indexer):
cmd = "cd %s; PSEUDO_UNLOAD=1 %s packages . > Packages;" % (arch_dir, apt_ftparchive)
- cmd += "%s -fc Packages > Packages.gz;" % gzip
+ cmd += "%s -fcn Packages > Packages.gz;" % gzip
with open(os.path.join(arch_dir, "Release"), "w+") as release:
release.write("Label: %s\n" % arch)
cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive
-
+
index_cmds.append(cmd)
deb_dirs_found = True
@@ -329,10 +307,8 @@ class DpkgIndexer(Indexer):
bb.note("There are no packages in %s" % self.deploy_dir)
return
- result = oe.utils.multiprocess_exec(index_cmds, create_index)
- if result:
- bb.fatal('%s' % ('\n'.join(result)))
- if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
+ oe.utils.multiprocess_launch(create_index, index_cmds, self.d)
+ if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
raise NotImplementedError('Package feed signing not implementd for dpkg')
@@ -346,119 +322,9 @@ class PkgsList(object, metaclass=ABCMeta):
def list_pkgs(self):
pass
-
class RpmPkgsList(PkgsList):
- def __init__(self, d, rootfs_dir, arch_var=None, os_var=None):
- super(RpmPkgsList, self).__init__(d, rootfs_dir)
-
- self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
- self.image_rpmlib = os.path.join(self.rootfs_dir, 'var/lib/rpm')
-
- self.ml_prefix_list, self.ml_os_list = \
- RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, os_var)
-
- # Determine rpm version
- cmd = "%s --version" % self.rpm_cmd
- try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
- except subprocess.CalledProcessError as e:
- bb.fatal("Getting rpm version failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
- '''
- Translate the RPM/Smart format names to the OE multilib format names
- '''
- def _pkg_translate_smart_to_oe(self, pkg, arch):
- new_pkg = pkg
- new_arch = arch
- fixed_arch = arch.replace('_', '-')
- found = 0
- for mlib in self.ml_prefix_list:
- for cmp_arch in self.ml_prefix_list[mlib]:
- fixed_cmp_arch = cmp_arch.replace('_', '-')
- if fixed_arch == fixed_cmp_arch:
- if mlib == 'default':
- new_pkg = pkg
- new_arch = cmp_arch
- else:
- new_pkg = mlib + '-' + pkg
- # We need to strip off the ${mlib}_ prefix on the arch
- new_arch = cmp_arch.replace(mlib + '_', '')
-
- # Workaround for bug 3565. Simply look to see if we
- # know of a package with that name, if not try again!
- filename = os.path.join(self.d.getVar('PKGDATA_DIR', True),
- 'runtime-reverse',
- new_pkg)
- if os.path.exists(filename):
- found = 1
- break
-
- if found == 1 and fixed_arch == fixed_cmp_arch:
- break
- #bb.note('%s, %s -> %s, %s' % (pkg, arch, new_pkg, new_arch))
- return new_pkg, new_arch
-
- def _list_pkg_deps(self):
- cmd = [bb.utils.which(os.getenv('PATH'), "rpmresolve"),
- "-t", self.image_rpmlib]
-
- try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
- except subprocess.CalledProcessError as e:
- bb.fatal("Cannot get the package dependencies. Command '%s' "
- "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
- return output
-
def list_pkgs(self):
- cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
- cmd += ' -D "_dbpath /var/lib/rpm" -qa'
- cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
-
- try:
- # bb.note(cmd)
- tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
- except subprocess.CalledProcessError as e:
- bb.fatal("Cannot get the installed packages list. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
- output = dict()
- deps = dict()
- dependencies = self._list_pkg_deps()
-
- # Populate deps dictionary for better manipulation
- for line in dependencies.splitlines():
- try:
- pkg, dep = line.split("|")
- if not pkg in deps:
- deps[pkg] = list()
- if not dep in deps[pkg]:
- deps[pkg].append(dep)
- except:
- # Ignore any other lines they're debug or errors
- pass
-
- for line in tmp_output.split('\n'):
- if len(line.strip()) == 0:
- continue
- pkg = line.split()[0]
- arch = line.split()[1]
- ver = line.split()[2]
- dep = deps.get(pkg, [])
-
- # Skip GPG keys
- if pkg == 'gpg-pubkey':
- continue
-
- pkgorigin = line.split()[3]
- new_pkg, new_arch = self._pkg_translate_smart_to_oe(pkg, arch)
-
- output[new_pkg] = {"arch":new_arch, "ver":ver,
- "filename":pkgorigin, "deps":dep}
-
- return output
-
+ return RpmPM(self.d, self.rootfs_dir, self.d.getVar('TARGET_VENDOR'), needfeed=False).list_installed()
class OpkgPkgsList(PkgsList):
def __init__(self, d, rootfs_dir, config_file):
@@ -466,7 +332,7 @@ class OpkgPkgsList(PkgsList):
self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
self.opkg_args = "-f %s -o %s " % (config_file, rootfs_dir)
- self.opkg_args += self.d.getVar("OPKG_ARGS", True)
+ self.opkg_args += self.d.getVar("OPKG_ARGS")
def list_pkgs(self, format=None):
cmd = "%s %s status" % (self.opkg_cmd, self.opkg_args)
@@ -510,42 +376,129 @@ class PackageManager(object, metaclass=ABCMeta):
This is an abstract class. Do not instantiate this directly.
"""
- def __init__(self, d):
+ def __init__(self, d, target_rootfs):
self.d = d
+ self.target_rootfs = target_rootfs
self.deploy_dir = None
self.deploy_lock = None
- self.feed_uris = self.d.getVar('PACKAGE_FEED_URIS', True) or ""
- self.feed_base_paths = self.d.getVar('PACKAGE_FEED_BASE_PATHS', True) or ""
- self.feed_archs = self.d.getVar('PACKAGE_FEED_ARCHS', True)
+ self._initialize_intercepts()
+
+ def _initialize_intercepts(self):
+ bb.note("Initializing intercept dir for %s" % self.target_rootfs)
+ # As there might be more than one instance of PackageManager operating at the same time
+ # we need to isolate the intercept_scripts directories from each other,
+ # hence the ugly hash digest in dir name.
+ self.intercepts_dir = os.path.join(self.d.getVar('WORKDIR'), "intercept_scripts-%s" %
+ (hashlib.sha256(self.target_rootfs.encode()).hexdigest()))
+
+ postinst_intercepts = (self.d.getVar("POSTINST_INTERCEPTS") or "").split()
+ if not postinst_intercepts:
+ postinst_intercepts_path = self.d.getVar("POSTINST_INTERCEPTS_PATH")
+ if not postinst_intercepts_path:
+ postinst_intercepts_path = self.d.getVar("POSTINST_INTERCEPTS_DIR") or self.d.expand("${COREBASE}/scripts/postinst-intercepts")
+ postinst_intercepts = oe.path.which_wild('*', postinst_intercepts_path)
+
+ bb.debug(1, 'Collected intercepts:\n%s' % ''.join(' %s\n' % i for i in postinst_intercepts))
+ bb.utils.remove(self.intercepts_dir, True)
+ bb.utils.mkdirhier(self.intercepts_dir)
+ for intercept in postinst_intercepts:
+ bb.utils.copyfile(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
+
+ @abstractmethod
+ def _handle_intercept_failure(self, failed_script):
+ pass
+
+ def _postpone_to_first_boot(self, postinst_intercept_hook):
+ with open(postinst_intercept_hook) as intercept:
+ registered_pkgs = None
+ for line in intercept.read().split("\n"):
+ m = re.match(r"^##PKGS:(.*)", line)
+ if m is not None:
+ registered_pkgs = m.group(1).strip()
+ break
+
+ if registered_pkgs is not None:
+ bb.note("If an image is being built, the postinstalls for the following packages "
+ "will be postponed for first boot: %s" %
+ registered_pkgs)
+
+ # call the backend dependent handler
+ self._handle_intercept_failure(registered_pkgs)
+
+
+ def run_intercepts(self, populate_sdk=None):
+ intercepts_dir = self.intercepts_dir
+
+ bb.note("Running intercept scripts:")
+ os.environ['D'] = self.target_rootfs
+ os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
+ for script in os.listdir(intercepts_dir):
+ script_full = os.path.join(intercepts_dir, script)
+
+ if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
+ continue
+
+ # we do not want to run any multilib variant of this
+ if script.startswith("delay_to_first_boot"):
+ self._postpone_to_first_boot(script_full)
+ continue
+
+ if populate_sdk == 'host' and self.d.getVar('SDK_OS') == 'mingw32':
+ bb.note("The postinstall intercept hook '%s' could not be executed due to missing wine support, details in %s/log.do_%s"
+ % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+ continue
+
+ bb.note("> Executing %s intercept ..." % script)
+
+ try:
+ output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
+ if output: bb.note(output.decode("utf-8"))
+ except subprocess.CalledProcessError as e:
+ bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
+ if populate_sdk == 'host':
+ bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+ elif populate_sdk == 'target':
+ if "qemuwrapper: qemu usermode is not supported" in e.output.decode("utf-8"):
+ bb.note("The postinstall intercept hook '%s' could not be executed due to missing qemu usermode support, details in %s/log.do_%s"
+ % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+ else:
+ bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+ else:
+ if "qemuwrapper: qemu usermode is not supported" in e.output.decode("utf-8"):
+ bb.note("The postinstall intercept hook '%s' could not be executed due to missing qemu usermode support, details in %s/log.do_%s"
+ % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+ self._postpone_to_first_boot(script_full)
+ else:
+ bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
- """
- Update the package manager package database.
- """
@abstractmethod
def update(self):
+ """
+ Update the package manager package database.
+ """
pass
- """
- Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is
- True, installation failures are ignored.
- """
@abstractmethod
def install(self, pkgs, attempt_only=False):
+ """
+ Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is
+ True, installation failures are ignored.
+ """
pass
- """
- Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies'
- is False, the any dependencies are left in place.
- """
@abstractmethod
def remove(self, pkgs, with_dependencies=True):
+ """
+ Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies'
+ is False, then any dependencies are left in place.
+ """
pass
- """
- This function creates the index files
- """
@abstractmethod
def write_index(self):
+ """
+ This function creates the index files
+ """
pass
@abstractmethod
@@ -557,31 +510,59 @@ class PackageManager(object, metaclass=ABCMeta):
pass
@abstractmethod
- def insert_feeds_uris(self):
+ def extract(self, pkg):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+ Deleting the tmpdir is responsability of the caller.
+ """
pass
- """
- Install complementary packages based upon the list of currently installed
- packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install
- these packages, if they don't exist then no error will occur. Note: every
- backend needs to call this function explicitly after the normal package
- installation
- """
- def install_complementary(self, globs=None):
- # we need to write the list of installed packages to a file because the
- # oe-pkgdata-util reads it from a file
- installed_pkgs_file = os.path.join(self.d.getVar('WORKDIR', True),
- "installed_pkgs.txt")
- with open(installed_pkgs_file, "w+") as installed_pkgs:
- pkgs = self.list_installed()
- output = oe.utils.format_pkg_list(pkgs, "arch")
- installed_pkgs.write(output)
+ @abstractmethod
+ def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+ """
+ Add remote package feeds into repository manager configuration. The parameters
+ for the feeds are set by feed_uris, feed_base_paths and feed_archs.
+ See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
+ for their description.
+ """
+ pass
+
+ def install_glob(self, globs, sdk=False):
+ """
+ Install all packages that match a glob.
+ """
+ # TODO don't have sdk here but have a property on the superclass
+ # (and respect in install_complementary)
+ if sdk:
+ pkgdatadir = self.d.expand("${TMPDIR}/pkgdata/${SDK_SYS}")
+ else:
+ pkgdatadir = self.d.getVar("PKGDATA_DIR")
+
+ try:
+ bb.note("Installing globbed packages...")
+ cmd = ["oe-pkgdata-util", "-p", pkgdatadir, "list-pkgs", globs]
+ pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
+ self.install(pkgs.split(), attempt_only=True)
+ except subprocess.CalledProcessError as e:
+ # Return code 1 means no packages matched
+ if e.returncode != 1:
+ bb.fatal("Could not compute globbed packages list. Command "
+ "'%s' returned %d:\n%s" %
+ (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+ def install_complementary(self, globs=None):
+ """
+ Install complementary packages based upon the list of currently installed
+ packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install
+ these packages, if they don't exist then no error will occur. Note: every
+ backend needs to call this function explicitly after the normal package
+ installation
+ """
if globs is None:
- globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY', True)
+ globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY')
split_linguas = set()
- for translation in self.d.getVar('IMAGE_LINGUAS', True).split():
+ for translation in self.d.getVar('IMAGE_LINGUAS').split():
split_linguas.add(translation)
split_linguas.add(translation.split('-')[0])
@@ -589,26 +570,42 @@ class PackageManager(object, metaclass=ABCMeta):
for lang in split_linguas:
globs += " *-locale-%s" % lang
+ for complementary_linguas in (self.d.getVar('IMAGE_LINGUAS_COMPLEMENTARY') or "").split():
+ globs += (" " + complementary_linguas) % lang
if globs is None:
return
- cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"),
- "-p", self.d.getVar('PKGDATA_DIR', True), "glob", installed_pkgs_file,
- globs]
- exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY', True)
- if exclude:
- cmd.extend(['-x', exclude])
- try:
- bb.note("Installing complementary packages ...")
- bb.note('Running %s' % cmd)
- complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
- except subprocess.CalledProcessError as e:
- bb.fatal("Could not compute complementary packages list. Command "
- "'%s' returned %d:\n%s" %
- (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
- self.install(complementary_pkgs.split(), attempt_only=True)
- os.remove(installed_pkgs_file)
+ # we need to write the list of installed packages to a file because the
+ # oe-pkgdata-util reads it from a file
+ with tempfile.NamedTemporaryFile(mode="w+", prefix="installed-pkgs") as installed_pkgs:
+ pkgs = self.list_installed()
+ output = oe.utils.format_pkg_list(pkgs, "arch")
+ installed_pkgs.write(output)
+ installed_pkgs.flush()
+
+ cmd = ["oe-pkgdata-util",
+ "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name,
+ globs]
+ exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY')
+ if exclude:
+ cmd.extend(['--exclude=' + '|'.join(exclude.split())])
+ try:
+ bb.note("Installing complementary packages ...")
+ bb.note('Running %s' % cmd)
+ complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
+ self.install(complementary_pkgs.split(), attempt_only=True)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Could not compute complementary packages list. Command "
+ "'%s' returned %d:\n%s" %
+ (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+
+ target_arch = self.d.getVar('TARGET_ARCH')
+ localedir = oe.path.join(self.target_rootfs, self.d.getVar("libdir"), "locale")
+ if os.path.exists(localedir) and os.listdir(localedir):
+ generate_locale_archive(self.d, self.target_rootfs, target_arch, localedir)
+ # And now delete the binary locales
+ self.remove(fnmatch.filter(self.list_installed(), "glibc-binary-localedata-*"), False)
def deploy_dir_lock(self):
if self.deploy_dir is None:
@@ -626,13 +623,13 @@ class PackageManager(object, metaclass=ABCMeta):
self.deploy_lock = None
- """
- Construct URIs based on the following pattern: uri/base_path where 'uri'
- and 'base_path' correspond to each element of the corresponding array
- argument leading to len(uris) x len(base_paths) elements on the returned
- array
- """
def construct_uris(self, uris, base_paths):
+ """
+ Construct URIs based on the following pattern: uri/base_path where 'uri'
+ and 'base_path' correspond to each element of the corresponding array
+ argument leading to len(uris) x len(base_paths) elements on the returned
+ array
+ """
def _append(arr1, arr2, sep='/'):
res = []
narr1 = [a.rstrip(sep) for a in arr1]
@@ -646,837 +643,416 @@ class PackageManager(object, metaclass=ABCMeta):
return res
return _append(uris, base_paths)
+def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies):
+ """
+ Go through our do_package_write_X dependencies and hardlink the packages we depend
+ upon into the repo directory. This prevents us seeing other packages that may
+ have been built that we don't depend upon and also packages for architectures we don't
+ support.
+ """
+ import errno
+
+ taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+ mytaskname = d.getVar("BB_RUNTASK")
+ pn = d.getVar("PN")
+ seendirs = set()
+ multilibs = {}
+
+ bb.utils.remove(subrepo_dir, recurse=True)
+ bb.utils.mkdirhier(subrepo_dir)
+
+ # Detect bitbake -b usage
+ nodeps = d.getVar("BB_LIMITEDDEPS") or False
+ if nodeps or not filterbydependencies:
+ oe.path.symlink(deploydir, subrepo_dir, True)
+ return
+
+ start = None
+ for dep in taskdepdata:
+ data = taskdepdata[dep]
+ if data[1] == mytaskname and data[0] == pn:
+ start = dep
+ break
+ if start is None:
+ bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+ pkgdeps = set()
+ start = [start]
+ seen = set(start)
+ # Support direct dependencies (do_rootfs -> do_package_write_X)
+ # or indirect dependencies within PN (do_populate_sdk_ext -> do_rootfs -> do_package_write_X)
+ while start:
+ next = []
+ for dep2 in start:
+ for dep in taskdepdata[dep2][3]:
+ if taskdepdata[dep][0] != pn:
+ if "do_" + taskname in dep:
+ pkgdeps.add(dep)
+ elif dep not in seen:
+ next.append(dep)
+ seen.add(dep)
+ start = next
+
+ for dep in pkgdeps:
+ c = taskdepdata[dep][0]
+ manifest, d2 = oe.sstatesig.find_sstate_manifest(c, taskdepdata[dep][2], taskname, d, multilibs)
+ if not manifest:
+ bb.fatal("No manifest generated from: %s in %s" % (c, taskdepdata[dep][2]))
+ if not os.path.exists(manifest):
+ continue
+ with open(manifest, "r") as f:
+ for l in f:
+ l = l.strip()
+ deploydir = os.path.normpath(deploydir)
+ if bb.data.inherits_class('packagefeed-stability', d):
+ dest = l.replace(deploydir + "-prediff", "")
+ else:
+ dest = l.replace(deploydir, "")
+ dest = subrepo_dir + dest
+ if l.endswith("/"):
+ if dest not in seendirs:
+ bb.utils.mkdirhier(dest)
+ seendirs.add(dest)
+ continue
+ # Try to hardlink the file, copy if that fails
+ destdir = os.path.dirname(dest)
+ if destdir not in seendirs:
+ bb.utils.mkdirhier(destdir)
+ seendirs.add(destdir)
+ try:
+ os.link(l, dest)
+ except OSError as err:
+ if err.errno == errno.EXDEV:
+ bb.utils.copyfile(l, dest)
+ else:
+ raise
+
class RpmPM(PackageManager):
def __init__(self,
d,
target_rootfs,
target_vendor,
task_name='target',
- providename=None,
arch_var=None,
- os_var=None):
- super(RpmPM, self).__init__(d)
- self.target_rootfs = target_rootfs
+ os_var=None,
+ rpm_repo_workdir="oe-rootfs-repo",
+ filterbydependencies=True,
+ needfeed=True):
+ super(RpmPM, self).__init__(d, target_rootfs)
self.target_vendor = target_vendor
self.task_name = task_name
- self.providename = providename
- self.fullpkglist = list()
- self.deploy_dir = self.d.getVar('DEPLOY_DIR_RPM', True)
- self.etcrpm_dir = os.path.join(self.target_rootfs, "etc/rpm")
- self.install_dir_name = "oe_install"
- self.install_dir_path = os.path.join(self.target_rootfs, self.install_dir_name)
- self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
- self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart")
- # 0 = default, only warnings
- # 1 = --log-level=info (includes information about executing scriptlets and their output)
- # 2 = --log-level=debug
- # 3 = --log-level=debug plus dumps of scriplet content and command invocation
- self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG', True) or "0")
- self.smart_opt = "--log-level=%s --data-dir=%s" % \
- ("warning" if self.debug_level == 0 else
- "info" if self.debug_level == 1 else
- "debug",
- os.path.join(target_rootfs, 'var/lib/smart'))
- self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
+ if arch_var == None:
+ self.archs = self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS').replace("-","_")
+ else:
+ self.archs = self.d.getVar(arch_var).replace("-","_")
+ if task_name == "host":
+ self.primary_arch = self.d.getVar('SDK_ARCH')
+ else:
+ self.primary_arch = self.d.getVar('MACHINE_ARCH')
+
+ if needfeed:
+ self.rpm_repo_dir = oe.path.join(self.d.getVar('WORKDIR'), rpm_repo_workdir)
+ create_packages_dir(self.d, oe.path.join(self.rpm_repo_dir, "rpm"), d.getVar("DEPLOY_DIR_RPM"), "package_write_rpm", filterbydependencies)
+
+ self.saved_packaging_data = self.d.expand('${T}/saved_packaging_data/%s' % self.task_name)
+ if not os.path.exists(self.d.expand('${T}/saved_packaging_data')):
+ bb.utils.mkdirhier(self.d.expand('${T}/saved_packaging_data'))
+ self.packaging_data_dirs = ['etc/rpm', 'etc/rpmrc', 'etc/dnf', 'var/lib/rpm', 'var/lib/dnf', 'var/cache/dnf']
self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
self.task_name)
- self.saved_rpmlib = self.d.expand('${T}/saved/%s' % self.task_name)
- self.image_rpmlib = os.path.join(self.target_rootfs, 'var/lib/rpm')
-
if not os.path.exists(self.d.expand('${T}/saved')):
bb.utils.mkdirhier(self.d.expand('${T}/saved'))
- packageindex_dir = os.path.join(self.d.getVar('WORKDIR', True), 'rpms')
- self.indexer = RpmIndexer(self.d, packageindex_dir)
- self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var)
+ def _configure_dnf(self):
+ # libsolv handles 'noarch' internally, we don't need to specify it explicitly
+ archs = [i for i in reversed(self.archs.split()) if i not in ["any", "all", "noarch"]]
+ # This prevents accidental matching against libsolv's built-in policies
+ if len(archs) <= 1:
+ archs = archs + ["bogusarch"]
+ confdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/")
+ bb.utils.mkdirhier(confdir)
+ open(confdir + "arch", 'w').write(":".join(archs))
+ distro_codename = self.d.getVar('DISTRO_CODENAME')
+ open(confdir + "releasever", 'w').write(distro_codename if distro_codename is not None else '')
+
+ open(oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 'w').write("")
+
+
+ def _configure_rpm(self):
+ # We need to configure rpm to use our primary package architecture as the installation architecture,
+ # and to make it compatible with other package architectures that we use.
+ # Otherwise it will refuse to proceed with packages installation.
+ platformconfdir = "%s/%s" %(self.target_rootfs, "etc/rpm/")
+ rpmrcconfdir = "%s/%s" %(self.target_rootfs, "etc/")
+ bb.utils.mkdirhier(platformconfdir)
+ open(platformconfdir + "platform", 'w').write("%s-pc-linux" % self.primary_arch)
+ with open(rpmrcconfdir + "rpmrc", 'w') as f:
+ f.write("arch_compat: %s: %s\n" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch))
+ f.write("buildarch_compat: %s: noarch\n" % self.primary_arch)
+
+ open(platformconfdir + "macros", 'w').write("%_transaction_color 7\n")
+ if self.d.getVar('RPM_PREFER_ELF_ARCH'):
+ open(platformconfdir + "macros", 'a').write("%%_prefer_color %s" % (self.d.getVar('RPM_PREFER_ELF_ARCH')))
+ else:
+ open(platformconfdir + "macros", 'a').write("%_prefer_color 7")
+
+ if self.d.getVar('RPM_SIGN_PACKAGES') == '1':
+ signer = get_signer(self.d, self.d.getVar('RPM_GPG_BACKEND'))
+ pubkey_path = oe.path.join(self.d.getVar('B'), 'rpm-key')
+ signer.export_pubkey(pubkey_path, self.d.getVar('RPM_GPG_NAME'))
+ rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmkeys")
+ cmd = [rpm_bin, '--root=%s' % self.target_rootfs, '--import', pubkey_path]
+ try:
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Importing GPG key failed. Command '%s' "
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
- self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
+ def create_configs(self):
+ self._configure_dnf()
+ self._configure_rpm()
- def insert_feeds_uris(self):
- if self.feed_uris == "":
- return
+ def write_index(self):
+ lockfilename = self.d.getVar('DEPLOY_DIR_RPM') + "/rpm.lock"
+ lf = bb.utils.lockfile(lockfilename, False)
+ RpmIndexer(self.d, self.rpm_repo_dir).write_index()
+ bb.utils.unlockfile(lf)
- arch_list = []
- if self.feed_archs is not None:
- # User define feed architectures
- arch_list = self.feed_archs.split()
- else:
- # List must be prefered to least preferred order
- default_platform_extra = list()
- platform_extra = list()
- bbextendvariant = self.d.getVar('BBEXTENDVARIANT', True) or ""
- for mlib in self.ml_os_list:
- for arch in self.ml_prefix_list[mlib]:
- plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
- if mlib == bbextendvariant:
- if plt not in default_platform_extra:
- default_platform_extra.append(plt)
- else:
- if plt not in platform_extra:
- platform_extra.append(plt)
- platform_extra = default_platform_extra + platform_extra
+ def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+ from urllib.parse import urlparse
- for canonical_arch in platform_extra:
- arch = canonical_arch.split('-')[0]
- if not os.path.exists(os.path.join(self.deploy_dir, arch)):
- continue
- arch_list.append(arch)
+ if feed_uris == "":
+ return
- feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
-
- uri_iterator = 0
- channel_priority = 10 + 5 * len(feed_uris) * (len(arch_list) if arch_list else 1)
-
- for uri in feed_uris:
- if arch_list:
- for arch in arch_list:
- bb.note('Adding Smart channel url%d%s (%s)' %
- (uri_iterator, arch, channel_priority))
- self._invoke_smart('channel --add url%d-%s type=rpm-md baseurl=%s/%s -y'
- % (uri_iterator, arch, uri, arch))
- self._invoke_smart('channel --set url%d-%s priority=%d' %
- (uri_iterator, arch, channel_priority))
- channel_priority -= 5
+ gpg_opts = ''
+ if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
+ gpg_opts += 'repo_gpgcheck=1\n'
+ gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME'))
+
+ if self.d.getVar('RPM_SIGN_PACKAGES') != '1':
+ gpg_opts += 'gpgcheck=0\n'
+
+ bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
+ remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
+ for uri in remote_uris:
+ repo_base = "oe-remote-repo" + "-".join(urlparse(uri).path.split("/"))
+ if feed_archs is not None:
+ for arch in feed_archs.split():
+ repo_uri = uri + "/" + arch
+ repo_id = "oe-remote-repo" + "-".join(urlparse(repo_uri).path.split("/"))
+ repo_name = "OE Remote Repo:" + " ".join(urlparse(repo_uri).path.split("/"))
+ open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'a').write(
+ "[%s]\nname=%s\nbaseurl=%s\n%s\n" % (repo_id, repo_name, repo_uri, gpg_opts))
else:
- bb.note('Adding Smart channel url%d (%s)' %
- (uri_iterator, channel_priority))
- self._invoke_smart('channel --add url%d type=rpm-md baseurl=%s -y'
- % (uri_iterator, uri))
- self._invoke_smart('channel --set url%d priority=%d' %
- (uri_iterator, channel_priority))
- channel_priority -= 5
-
- uri_iterator += 1
-
- '''
- Create configs for rpm and smart, and multilib is supported
- '''
- def create_configs(self):
- target_arch = self.d.getVar('TARGET_ARCH', True)
- platform = '%s%s-%s' % (target_arch.replace('-', '_'),
- self.target_vendor,
- self.ml_os_list['default'])
-
- # List must be prefered to least preferred order
- default_platform_extra = list()
- platform_extra = list()
- bbextendvariant = self.d.getVar('BBEXTENDVARIANT', True) or ""
- for mlib in self.ml_os_list:
- for arch in self.ml_prefix_list[mlib]:
- plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
- if mlib == bbextendvariant:
- if plt not in default_platform_extra:
- default_platform_extra.append(plt)
- else:
- if plt not in platform_extra:
- platform_extra.append(plt)
- platform_extra = default_platform_extra + platform_extra
-
- self._create_configs(platform, platform_extra)
+ repo_name = "OE Remote Repo:" + " ".join(urlparse(uri).path.split("/"))
+ repo_uri = uri
+ open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'w').write(
+ "[%s]\nname=%s\nbaseurl=%s\n%s" % (repo_base, repo_name, repo_uri, gpg_opts))
- def _invoke_smart(self, args):
- cmd = "%s %s %s" % (self.smart_cmd, self.smart_opt, args)
- # bb.note(cmd)
- try:
- complementary_pkgs = subprocess.check_output(cmd,
- stderr=subprocess.STDOUT,
- shell=True).decode("utf-8")
- # bb.note(complementary_pkgs)
- return complementary_pkgs
- except subprocess.CalledProcessError as e:
- bb.fatal("Could not invoke smart. Command "
- "'%s' returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
- def _search_pkg_name_in_feeds(self, pkg, feed_archs):
- for arch in feed_archs:
- arch = arch.replace('-', '_')
- regex_match = re.compile(r"^%s-[^-]*-[^-]*@%s$" % \
- (re.escape(pkg), re.escape(arch)))
- for p in self.fullpkglist:
- if regex_match.match(p) is not None:
- # First found is best match
- # bb.note('%s -> %s' % (pkg, pkg + '@' + arch))
- return pkg + '@' + arch
-
- # Search provides if not found by pkgname.
- bb.note('Not found %s by name, searching provides ...' % pkg)
- cmd = "%s %s query --provides %s --show-format='$name-$version'" % \
- (self.smart_cmd, self.smart_opt, pkg)
- cmd += " | sed -ne 's/ *Provides://p'"
- bb.note('cmd: %s' % cmd)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
- # Found a provider
- if output:
- bb.note('Found providers for %s: %s' % (pkg, output))
- for p in output.split():
- for arch in feed_archs:
- arch = arch.replace('-', '_')
- if p.rstrip().endswith('@' + arch):
- return p
-
- return ""
-
- '''
- Translate the OE multilib format names to the RPM/Smart format names
- It searched the RPM/Smart format names in probable multilib feeds first,
- and then searched the default base feed.
- '''
- def _pkg_translate_oe_to_smart(self, pkgs, attempt_only=False):
- new_pkgs = list()
-
- for pkg in pkgs:
- new_pkg = pkg
- # Search new_pkg in probable multilibs first
- for mlib in self.ml_prefix_list:
- # Jump the default archs
- if mlib == 'default':
- continue
-
- subst = pkg.replace(mlib + '-', '')
- # if the pkg in this multilib feed
- if subst != pkg:
- feed_archs = self.ml_prefix_list[mlib]
- new_pkg = self._search_pkg_name_in_feeds(subst, feed_archs)
- if not new_pkg:
- # Failed to translate, package not found!
- err_msg = '%s not found in the %s feeds (%s) in %s.' % \
- (pkg, mlib, " ".join(feed_archs), self.d.getVar('DEPLOY_DIR_RPM', True))
- if not attempt_only:
- bb.error(err_msg)
- bb.fatal("This is often caused by an empty package declared " \
- "in a recipe's PACKAGES variable. (Empty packages are " \
- "not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)")
- bb.warn(err_msg)
- else:
- new_pkgs.append(new_pkg)
+ def _prepare_pkg_transaction(self):
+ os.environ['D'] = self.target_rootfs
+ os.environ['OFFLINE_ROOT'] = self.target_rootfs
+ os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
+ os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
+ os.environ['INTERCEPT_DIR'] = self.intercepts_dir
+ os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
- break
- # Apparently not a multilib package...
- if pkg == new_pkg:
- # Search new_pkg in default archs
- default_archs = self.ml_prefix_list['default']
- new_pkg = self._search_pkg_name_in_feeds(pkg, default_archs)
- if not new_pkg:
- err_msg = '%s not found in the feeds (%s) in %s.' % \
- (pkg, " ".join(default_archs), self.d.getVar('DEPLOY_DIR_RPM', True))
- if not attempt_only:
- bb.error(err_msg)
- bb.fatal("This is often caused by an empty package declared " \
- "in a recipe's PACKAGES variable. (Empty packages are " \
- "not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)")
- bb.warn(err_msg)
- else:
- new_pkgs.append(new_pkg)
-
- return new_pkgs
-
- def _create_configs(self, platform, platform_extra):
- # Setup base system configuration
- bb.note("configuring RPM platform settings")
-
- # Configure internal RPM environment when using Smart
- os.environ['RPM_ETCRPM'] = self.etcrpm_dir
- bb.utils.mkdirhier(self.etcrpm_dir)
-
- # Setup temporary directory -- install...
- if os.path.exists(self.install_dir_path):
- bb.utils.remove(self.install_dir_path, True)
- bb.utils.mkdirhier(os.path.join(self.install_dir_path, 'tmp'))
-
- channel_priority = 5
- platform_dir = os.path.join(self.etcrpm_dir, "platform")
- sdkos = self.d.getVar("SDK_OS", True)
- with open(platform_dir, "w+") as platform_fd:
- platform_fd.write(platform + '\n')
- for pt in platform_extra:
- channel_priority += 5
- if sdkos:
- tmp = re.sub("-%s$" % sdkos, "-%s\n" % sdkos, pt)
- tmp = re.sub("-linux.*$", "-linux.*\n", tmp)
- platform_fd.write(tmp)
-
- # Tell RPM that the "/" directory exist and is available
- bb.note("configuring RPM system provides")
- sysinfo_dir = os.path.join(self.etcrpm_dir, "sysinfo")
- bb.utils.mkdirhier(sysinfo_dir)
- with open(os.path.join(sysinfo_dir, "Dirnames"), "w+") as dirnames:
- dirnames.write("/\n")
-
- if self.providename:
- providename_dir = os.path.join(sysinfo_dir, "Providename")
- if not os.path.exists(providename_dir):
- providename_content = '\n'.join(self.providename)
- providename_content += '\n'
- open(providename_dir, "w+").write(providename_content)
-
- # Configure RPM... we enforce these settings!
- bb.note("configuring RPM DB settings")
- # After change the __db.* cache size, log file will not be
- # generated automatically, that will raise some warnings,
- # so touch a bare log for rpm write into it.
- rpmlib_log = os.path.join(self.image_rpmlib, 'log', 'log.0000000001')
- if not os.path.exists(rpmlib_log):
- bb.utils.mkdirhier(os.path.join(self.image_rpmlib, 'log'))
- open(rpmlib_log, 'w+').close()
-
- DB_CONFIG_CONTENT = "# ================ Environment\n" \
- "set_data_dir .\n" \
- "set_create_dir .\n" \
- "set_lg_dir ./log\n" \
- "set_tmp_dir ./tmp\n" \
- "set_flags db_log_autoremove on\n" \
- "\n" \
- "# -- thread_count must be >= 8\n" \
- "set_thread_count 64\n" \
- "\n" \
- "# ================ Logging\n" \
- "\n" \
- "# ================ Memory Pool\n" \
- "set_cachesize 0 1048576 0\n" \
- "set_mp_mmapsize 268435456\n" \
- "\n" \
- "# ================ Locking\n" \
- "set_lk_max_locks 16384\n" \
- "set_lk_max_lockers 16384\n" \
- "set_lk_max_objects 16384\n" \
- "mutex_set_max 163840\n" \
- "\n" \
- "# ================ Replication\n"
-
- db_config_dir = os.path.join(self.image_rpmlib, 'DB_CONFIG')
- if not os.path.exists(db_config_dir):
- open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
-
- # Create database so that smart doesn't complain (lazy init)
- opt = "-qa"
- cmd = "%s --root %s --dbpath /var/lib/rpm %s > /dev/null" % (
- self.rpm_cmd, self.target_rootfs, opt)
- try:
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
- except subprocess.CalledProcessError as e:
- bb.fatal("Create rpm database failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
- # Import GPG key to RPM database of the target system
- if self.d.getVar('RPM_SIGN_PACKAGES', True) == '1':
- pubkey_path = self.d.getVar('RPM_GPG_PUBKEY', True)
- cmd = "%s --root %s --dbpath /var/lib/rpm --import %s > /dev/null" % (
- self.rpm_cmd, self.target_rootfs, pubkey_path)
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ def install(self, pkgs, attempt_only = False):
+ if len(pkgs) == 0:
+ return
+ self._prepare_pkg_transaction()
- # Configure smart
- bb.note("configuring Smart settings")
- bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
- True)
- self._invoke_smart('config --set rpm-root=%s' % self.target_rootfs)
- self._invoke_smart('config --set rpm-dbpath=/var/lib/rpm')
- self._invoke_smart('config --set rpm-extra-macros._var=%s' %
- self.d.getVar('localstatedir', True))
- cmd = "config --set rpm-extra-macros._tmppath=/%s/tmp" % (self.install_dir_name)
-
- prefer_color = self.d.getVar('RPM_PREFER_ELF_ARCH', True)
- if prefer_color:
- if prefer_color not in ['0', '1', '2', '4']:
- bb.fatal("Invalid RPM_PREFER_ELF_ARCH: %s, it should be one of:\n"
- "\t1: ELF32 wins\n"
- "\t2: ELF64 wins\n"
- "\t4: ELF64 N32 wins (mips64 or mips64el only)" %
- prefer_color)
- if prefer_color == "4" and self.d.getVar("TUNE_ARCH", True) not in \
- ['mips64', 'mips64el']:
- bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
- "only.")
- self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
- % prefer_color)
-
- self._invoke_smart(cmd)
- self._invoke_smart('config --set rpm-ignoresize=1')
-
- # Write common configuration for host and target usage
- self._invoke_smart('config --set rpm-nolinktos=1')
- self._invoke_smart('config --set rpm-noparentdirs=1')
- check_signature = self.d.getVar('RPM_CHECK_SIGNATURES', True)
- if check_signature and check_signature.strip() == "0":
- self._invoke_smart('config --set rpm-check-signatures=false')
- for i in self.d.getVar('BAD_RECOMMENDATIONS', True).split():
- self._invoke_smart('flag --set ignore-recommends %s' % i)
-
- # Do the following configurations here, to avoid them being
- # saved for field upgrade
- if self.d.getVar('NO_RECOMMENDATIONS', True).strip() == "1":
- self._invoke_smart('config --set ignore-all-recommends=1')
- pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE', True) or ""
- for i in pkg_exclude.split():
- self._invoke_smart('flag --set exclude-packages %s' % i)
-
- # Optional debugging
- # self._invoke_smart('config --set rpm-log-level=debug')
- # cmd = 'config --set rpm-log-file=/tmp/smart-debug-logfile'
- # self._invoke_smart(cmd)
- ch_already_added = []
- for canonical_arch in platform_extra:
- arch = canonical_arch.split('-')[0]
- arch_channel = os.path.join(self.d.getVar('WORKDIR', True), 'rpms', arch)
- oe.path.remove(arch_channel)
- deploy_arch_dir = os.path.join(self.deploy_dir, arch)
- if not os.path.exists(deploy_arch_dir):
- continue
+ bad_recommendations = self.d.getVar('BAD_RECOMMENDATIONS')
+ package_exclude = self.d.getVar('PACKAGE_EXCLUDE')
+ exclude_pkgs = (bad_recommendations.split() if bad_recommendations else []) + (package_exclude.split() if package_exclude else [])
- lockfilename = self.d.getVar('DEPLOY_DIR_RPM', True) + "/rpm.lock"
- lf = bb.utils.lockfile(lockfilename, False)
- oe.path.copyhardlinktree(deploy_arch_dir, arch_channel)
- bb.utils.unlockfile(lf)
-
- if not arch in ch_already_added:
- bb.note('Adding Smart channel %s (%s)' %
- (arch, channel_priority))
- self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y'
- % (arch, arch_channel))
- self._invoke_smart('channel --set %s priority=%d' %
- (arch, channel_priority))
- channel_priority -= 5
-
- ch_already_added.append(arch)
-
- bb.note('adding Smart RPM DB channel')
- self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
-
- # Construct install scriptlet wrapper.
- # Scripts need to be ordered when executed, this ensures numeric order.
- # If we ever run into needing more the 899 scripts, we'll have to.
- # change num to start with 1000.
- #
- scriptletcmd = "$2 $1/$3 $4\n"
- scriptpath = "$1/$3"
-
- # When self.debug_level >= 3, also dump the content of the
- # executed scriptlets and how they get invoked. We have to
- # replace "exit 1" and "ERR" because printing those as-is
- # would trigger a log analysis failure.
- if self.debug_level >= 3:
- dump_invocation = 'echo "Executing ${name} ${kind} with: ' + scriptletcmd + '"\n'
- dump_script = 'cat ' + scriptpath + '| sed -e "s/exit 1/exxxit 1/g" -e "s/ERR/IRR/g"; echo\n'
- else:
- dump_invocation = 'echo "Executing ${name} ${kind}"\n'
- dump_script = ''
-
- SCRIPTLET_FORMAT = "#!/bin/bash\n" \
- "\n" \
- "export PATH=%s\n" \
- "export D=%s\n" \
- 'export OFFLINE_ROOT="$D"\n' \
- 'export IPKG_OFFLINE_ROOT="$D"\n' \
- 'export OPKG_OFFLINE_ROOT="$D"\n' \
- "export INTERCEPT_DIR=%s\n" \
- "export NATIVE_ROOT=%s\n" \
- "\n" \
- "name=`head -1 " + scriptpath + " | cut -d\' \' -f 2`\n" \
- "kind=`head -1 " + scriptpath + " | cut -d\' \' -f 4`\n" \
- + dump_invocation \
- + dump_script \
- + scriptletcmd + \
- "ret=$?\n" \
- "echo Result of ${name} ${kind}: ${ret}\n" \
- "if [ ${ret} -ne 0 ]; then\n" \
- " if [ $4 -eq 1 ]; then\n" \
- " mkdir -p $1/etc/rpm-postinsts\n" \
- " num=100\n" \
- " while [ -e $1/etc/rpm-postinsts/${num}-* ]; do num=$((num + 1)); done\n" \
- ' echo "#!$2" > $1/etc/rpm-postinsts/${num}-${name}\n' \
- ' echo "# Arg: $4" >> $1/etc/rpm-postinsts/${num}-${name}\n' \
- " cat " + scriptpath + " >> $1/etc/rpm-postinsts/${num}-${name}\n" \
- " chmod +x $1/etc/rpm-postinsts/${num}-${name}\n" \
- ' echo "Info: deferring ${name} ${kind} install scriptlet to first boot"\n' \
- " else\n" \
- ' echo "Error: ${name} ${kind} remove scriptlet failed"\n' \
- " fi\n" \
- "fi\n"
-
- intercept_dir = self.d.expand('${WORKDIR}/intercept_scripts')
- native_root = self.d.getVar('STAGING_DIR_NATIVE', True)
- scriptlet_content = SCRIPTLET_FORMAT % (os.environ['PATH'],
- self.target_rootfs,
- intercept_dir,
- native_root)
- open(self.scriptlet_wrapper, 'w+').write(scriptlet_content)
-
- bb.note("configuring RPM cross-install scriptlet_wrapper")
- os.chmod(self.scriptlet_wrapper, 0o755)
- cmd = 'config --set rpm-extra-macros._cross_scriptlet_wrapper=%s' % \
- self.scriptlet_wrapper
- self._invoke_smart(cmd)
-
- # Debug to show smart config info
- # bb.note(self._invoke_smart('config --show'))
+ output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) +
+ (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) +
+ (["--setopt=install_weak_deps=False"] if self.d.getVar('NO_RECOMMENDATIONS') == "1" else []) +
+ (["--nogpgcheck"] if self.d.getVar('RPM_SIGN_PACKAGES') != '1' else ["--setopt=gpgcheck=True"]) +
+ ["install"] +
+ pkgs)
- def update(self):
- self._invoke_smart('update rpmsys')
-
- def get_rdepends_recursively(self, pkgs):
- # pkgs will be changed during the loop, so use [:] to make a copy.
- for pkg in pkgs[:]:
- sub_data = oe.packagedata.read_subpkgdata(pkg, self.d)
- sub_rdep = sub_data.get("RDEPENDS_" + pkg)
- if not sub_rdep:
- continue
- done = list(bb.utils.explode_dep_versions2(sub_rdep).keys())
- next = done
- # Find all the rdepends on dependency chain
- while next:
- new = []
- for sub_pkg in next:
- sub_data = oe.packagedata.read_subpkgdata(sub_pkg, self.d)
- sub_pkg_rdep = sub_data.get("RDEPENDS_" + sub_pkg)
- if not sub_pkg_rdep:
- continue
- for p in bb.utils.explode_dep_versions2(sub_pkg_rdep):
- # Already handled, skip it.
- if p in done or p in pkgs:
- continue
- # It's a new dep
- if oe.packagedata.has_subpkgdata(p, self.d):
- done.append(p)
- new.append(p)
- next = new
- pkgs.extend(done)
- return pkgs
+ failed_scriptlets_pkgnames = collections.OrderedDict()
+ for line in output.splitlines():
+ if line.startswith("Error in POSTIN scriptlet in rpm package"):
+ failed_scriptlets_pkgnames[line.split()[-1]] = True
- '''
- Install pkgs with smart, the pkg name is oe format
- '''
- def install(self, pkgs, attempt_only=False):
+ if len(failed_scriptlets_pkgnames) > 0:
+ failed_postinsts_abort(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
+ def remove(self, pkgs, with_dependencies = True):
if not pkgs:
- bb.note("There are no packages to install")
return
- bb.note("Installing the following packages: %s" % ' '.join(pkgs))
- if not attempt_only:
- # Pull in multilib requires since rpm may not pull in them
- # correctly, for example,
- # lib32-packagegroup-core-standalone-sdk-target requires
- # lib32-libc6, but rpm may pull in libc6 rather than lib32-libc6
- # since it doesn't know mlprefix (lib32-), bitbake knows it and
- # can handle it well, find out the RDEPENDS on the chain will
- # fix the problem. Both do_rootfs and do_populate_sdk have this
- # issue.
- # The attempt_only packages don't need this since they are
- # based on the installed ones.
- #
- # Separate pkgs into two lists, one is multilib, the other one
- # is non-multilib.
- ml_pkgs = []
- non_ml_pkgs = pkgs[:]
- for pkg in pkgs:
- for mlib in (self.d.getVar("MULTILIB_VARIANTS", True) or "").split():
- if pkg.startswith(mlib + '-'):
- ml_pkgs.append(pkg)
- non_ml_pkgs.remove(pkg)
-
- if len(ml_pkgs) > 0 and len(non_ml_pkgs) > 0:
- # Found both foo and lib-foo
- ml_pkgs = self.get_rdepends_recursively(ml_pkgs)
- non_ml_pkgs = self.get_rdepends_recursively(non_ml_pkgs)
- # Longer list makes smart slower, so only keep the pkgs
- # which have the same BPN, and smart can handle others
- # correctly.
- pkgs_new = []
- for pkg in non_ml_pkgs:
- for mlib in (self.d.getVar("MULTILIB_VARIANTS", True) or "").split():
- mlib_pkg = mlib + "-" + pkg
- if mlib_pkg in ml_pkgs:
- pkgs_new.append(pkg)
- pkgs_new.append(mlib_pkg)
- for pkg in pkgs:
- if pkg not in pkgs_new:
- pkgs_new.append(pkg)
- pkgs = pkgs_new
- new_depends = {}
- deps = bb.utils.explode_dep_versions2(" ".join(pkgs))
- for depend in deps:
- data = oe.packagedata.read_subpkgdata(depend, self.d)
- key = "PKG_%s" % depend
- if key in data:
- new_depend = data[key]
- else:
- new_depend = depend
- new_depends[new_depend] = deps[depend]
- pkgs = bb.utils.join_deps(new_depends, commasep=True).split(', ')
- pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)
- if not pkgs:
- bb.note("There are no packages to install")
- return
- if not attempt_only:
- bb.note('to be installed: %s' % ' '.join(pkgs))
- cmd = "%s %s install -y %s" % \
- (self.smart_cmd, self.smart_opt, ' '.join(pkgs))
- bb.note(cmd)
- else:
- bb.note('installing attempt only packages...')
- bb.note('Attempting %s' % ' '.join(pkgs))
- cmd = "%s %s install --attempt -y %s" % \
- (self.smart_cmd, self.smart_opt, ' '.join(pkgs))
- try:
- output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
- bb.note(output)
- except subprocess.CalledProcessError as e:
- bb.fatal("Unable to install packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
- '''
- Remove pkgs with smart, the pkg name is smart/rpm format
- '''
- def remove(self, pkgs, with_dependencies=True):
- bb.note('to be removed: ' + ' '.join(pkgs))
-
- if not with_dependencies:
- cmd = "%s -e --nodeps " % self.rpm_cmd
- cmd += "--root=%s " % self.target_rootfs
- cmd += "--dbpath=/var/lib/rpm "
- cmd += "--define='_cross_scriptlet_wrapper %s' " % \
- self.scriptlet_wrapper
- cmd += "--define='_tmppath /%s/tmp' %s" % (self.install_dir_name, ' '.join(pkgs))
- else:
- # for pkg in pkgs:
- # bb.note('Debug: What required: %s' % pkg)
- # bb.note(self._invoke_smart('query %s --show-requiredby' % pkg))
+ self._prepare_pkg_transaction()
- cmd = "%s %s remove -y %s" % (self.smart_cmd,
- self.smart_opt,
- ' '.join(pkgs))
+ if with_dependencies:
+ self._invoke_dnf(["remove"] + pkgs)
+ else:
+ cmd = bb.utils.which(os.getenv('PATH'), "rpm")
+ args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs]
- try:
- bb.note(cmd)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
- bb.note(output)
- except subprocess.CalledProcessError as e:
- bb.note("Unable to remove packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ try:
+ bb.note("Running %s" % ' '.join([cmd] + args + pkgs))
+ output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8")
+ bb.note(output)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Could not invoke rpm. Command "
+ "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8")))
def upgrade(self):
- bb.note('smart upgrade')
- self._invoke_smart('upgrade')
+ self._prepare_pkg_transaction()
+ self._invoke_dnf(["upgrade"])
- def write_index(self):
- result = self.indexer.write_index()
-
- if result is not None:
- bb.fatal(result)
+ def autoremove(self):
+ self._prepare_pkg_transaction()
+ self._invoke_dnf(["autoremove"])
def remove_packaging_data(self):
- bb.utils.remove(self.image_rpmlib, True)
- bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
- True)
- bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/opkg'), True)
-
- # remove temp directory
- bb.utils.remove(self.install_dir_path, True)
+ self._invoke_dnf(["clean", "all"])
+ for dir in self.packaging_data_dirs:
+ bb.utils.remove(oe.path.join(self.target_rootfs, dir), True)
def backup_packaging_data(self):
- # Save the rpmlib for increment rpm image generation
- if os.path.exists(self.saved_rpmlib):
- bb.utils.remove(self.saved_rpmlib, True)
- shutil.copytree(self.image_rpmlib,
- self.saved_rpmlib,
- symlinks=True)
+ # Save the packaging dirs for increment rpm image generation
+ if os.path.exists(self.saved_packaging_data):
+ bb.utils.remove(self.saved_packaging_data, True)
+ for i in self.packaging_data_dirs:
+ source_dir = oe.path.join(self.target_rootfs, i)
+ target_dir = oe.path.join(self.saved_packaging_data, i)
+ if os.path.isdir(source_dir):
+ shutil.copytree(source_dir, target_dir, symlinks=True)
+ elif os.path.isfile(source_dir):
+ shutil.copy2(source_dir, target_dir)
def recovery_packaging_data(self):
# Move the rpmlib back
- if os.path.exists(self.saved_rpmlib):
- if os.path.exists(self.image_rpmlib):
- bb.utils.remove(self.image_rpmlib, True)
-
- bb.note('Recovery packaging data')
- shutil.copytree(self.saved_rpmlib,
- self.image_rpmlib,
- symlinks=True)
+ if os.path.exists(self.saved_packaging_data):
+ for i in self.packaging_data_dirs:
+ target_dir = oe.path.join(self.target_rootfs, i)
+ if os.path.exists(target_dir):
+ bb.utils.remove(target_dir, True)
+ source_dir = oe.path.join(self.saved_packaging_data, i)
+ if os.path.isdir(source_dir):
+ shutil.copytree(source_dir, target_dir, symlinks=True)
+ elif os.path.isfile(source_dir):
+ shutil.copy2(source_dir, target_dir)
def list_installed(self):
- return self.pkgs_list.list_pkgs()
-
- '''
- If incremental install, we need to determine what we've got,
- what we need to add, and what to remove...
- The dump_install_solution will dump and save the new install
- solution.
- '''
- def dump_install_solution(self, pkgs):
- bb.note('creating new install solution for incremental install')
- if len(pkgs) == 0:
- return
-
- pkgs = self._pkg_translate_oe_to_smart(pkgs, False)
- install_pkgs = list()
+ output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{name}-%{version}-%{release}.%{arch}.rpm\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"],
+ print_output = False)
+ packages = {}
+ current_package = None
+ current_deps = None
+ current_state = "initial"
+ for line in output.splitlines():
+ if line.startswith("Package:"):
+ package_info = line.split(" ")[1:]
+ current_package = package_info[0]
+ package_arch = package_info[1]
+ package_version = package_info[2]
+ package_rpm = package_info[3]
+ packages[current_package] = {"arch":package_arch, "ver":package_version, "filename":package_rpm}
+ current_deps = []
+ elif line.startswith("Dependencies:"):
+ current_state = "dependencies"
+ elif line.startswith("Recommendations"):
+ current_state = "recommendations"
+ elif line.startswith("DependenciesEndHere:"):
+ current_state = "initial"
+ packages[current_package]["deps"] = current_deps
+ elif len(line) > 0:
+ if current_state == "dependencies":
+ current_deps.append(line)
+ elif current_state == "recommendations":
+ current_deps.append("%s [REC]" % line)
+
+ return packages
- cmd = "%s %s install -y --dump %s 2>%s" % \
- (self.smart_cmd,
- self.smart_opt,
- ' '.join(pkgs),
- self.solution_manifest)
+ def update(self):
+ self._invoke_dnf(["makecache", "--refresh"])
+
+ def _invoke_dnf(self, dnf_args, fatal = True, print_output = True ):
+ os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs
+
+ dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf")
+ standard_dnf_args = ["-v", "--rpmverbosity=info", "-y",
+ "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"),
+ "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")),
+ "--installroot=%s" % (self.target_rootfs),
+ "--setopt=logdir=%s" % (self.d.getVar('T'))
+ ]
+ if hasattr(self, "rpm_repo_dir"):
+ standard_dnf_args.append("--repofrompath=oe-repo,%s" % (self.rpm_repo_dir))
+ cmd = [dnf_cmd] + standard_dnf_args + dnf_args
+ bb.note('Running %s' % ' '.join(cmd))
try:
- # Disable rpmsys channel for the fake install
- self._invoke_smart('channel --disable rpmsys')
-
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
- with open(self.solution_manifest, 'r') as manifest:
- for pkg in manifest.read().split('\n'):
- if '@' in pkg:
- install_pkgs.append(pkg)
+ output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
+ if print_output:
+ bb.debug(1, output)
+ return output
except subprocess.CalledProcessError as e:
- bb.note("Unable to dump install packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
- # Recovery rpmsys channel
- self._invoke_smart('channel --enable rpmsys')
- return install_pkgs
-
- '''
- If incremental install, we need to determine what we've got,
- what we need to add, and what to remove...
- The load_old_install_solution will load the previous install
- solution
- '''
- def load_old_install_solution(self):
- bb.note('load old install solution for incremental install')
- installed_pkgs = list()
- if not os.path.exists(self.solution_manifest):
- bb.note('old install solution not exist')
- return installed_pkgs
-
- with open(self.solution_manifest, 'r') as manifest:
- for pkg in manifest.read().split('\n'):
- if '@' in pkg:
- installed_pkgs.append(pkg.strip())
-
- return installed_pkgs
-
- '''
- Dump all available packages in feeds, it should be invoked after the
- newest rpm index was created
- '''
- def dump_all_available_pkgs(self):
- available_manifest = self.d.expand('${T}/saved/available_pkgs.txt')
- available_pkgs = list()
- cmd = "%s %s query --output %s" % \
- (self.smart_cmd, self.smart_opt, available_manifest)
- try:
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
- with open(available_manifest, 'r') as manifest:
- for pkg in manifest.read().split('\n'):
- if '@' in pkg:
- available_pkgs.append(pkg.strip())
- except subprocess.CalledProcessError as e:
- bb.note("Unable to list all available packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ if print_output:
+ (bb.note, bb.fatal)[fatal]("Could not invoke dnf. Command "
+ "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+ else:
+ (bb.note, bb.fatal)[fatal]("Could not invoke dnf. Command "
+ "'%s' returned %d:" % (' '.join(cmd), e.returncode))
+ return e.output.decode("utf-8")
- self.fullpkglist = available_pkgs
+ def dump_install_solution(self, pkgs):
+ open(self.solution_manifest, 'w').write(" ".join(pkgs))
+ return pkgs
- return
+ def load_old_install_solution(self):
+ if not os.path.exists(self.solution_manifest):
+ return []
+ with open(self.solution_manifest, 'r') as fd:
+ return fd.read().split()
+
+ def _script_num_prefix(self, path):
+ files = os.listdir(path)
+ numbers = set()
+ numbers.add(99)
+ for f in files:
+ numbers.add(int(f.split("-")[0]))
+ return max(numbers) + 1
def save_rpmpostinst(self, pkg):
- mlibs = (self.d.getVar('MULTILIB_GLOBAL_VARIANTS', False) or "").split()
-
- new_pkg = pkg
- # Remove any multilib prefix from the package name
- for mlib in mlibs:
- if mlib in pkg:
- new_pkg = pkg.replace(mlib + '-', '')
- break
-
- bb.note(' * postponing %s' % new_pkg)
- saved_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/') + new_pkg
-
- cmd = self.rpm_cmd + ' -q --scripts --root ' + self.target_rootfs
- cmd += ' --dbpath=/var/lib/rpm ' + new_pkg
- cmd += ' | sed -n -e "/^postinstall scriptlet (using .*):$/,/^.* scriptlet (using .*):$/ {/.*/p}"'
- cmd += ' | sed -e "/postinstall scriptlet (using \(.*\)):$/d"'
- cmd += ' -e "/^.* scriptlet (using .*):$/d" > %s' % saved_dir
+ bb.note("Saving postinstall script of %s" % (pkg))
+ cmd = bb.utils.which(os.getenv('PATH'), "rpm")
+ args = ["-q", "--root=%s" % self.target_rootfs, "--queryformat", "%{postin}", pkg]
try:
- bb.note(cmd)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
- bb.note(output)
- os.chmod(saved_dir, 0o755)
- except subprocess.CalledProcessError as e:
- bb.fatal("Invoke save_rpmpostinst failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
- '''Write common configuration for target usage'''
- def rpm_setup_smart_target_config(self):
- bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
- True)
-
- self._invoke_smart('config --set rpm-nolinktos=1')
- self._invoke_smart('config --set rpm-noparentdirs=1')
- for i in self.d.getVar('BAD_RECOMMENDATIONS', True).split():
- self._invoke_smart('flag --set ignore-recommends %s' % i)
- self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
-
- '''
- The rpm db lock files were produced after invoking rpm to query on
- build system, and they caused the rpm on target didn't work, so we
- need to unlock the rpm db by removing the lock files.
- '''
- def unlock_rpm_db(self):
- # Remove rpm db lock files
- rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.target_rootfs)
- for f in rpm_db_locks:
- bb.utils.remove(f, True)
-
- """
- Returns a dictionary with the package info.
- """
- def package_info(self, pkg):
- cmd = "%s %s info --urls %s" % (self.smart_cmd, self.smart_opt, pkg)
- try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+ output = subprocess.check_output([cmd] + args,stderr=subprocess.STDOUT).decode("utf-8")
except subprocess.CalledProcessError as e:
- bb.fatal("Unable to list available packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ bb.fatal("Could not invoke rpm. Command "
+ "'%s' returned %d:\n%s" % (' '.join([cmd] + args), e.returncode, e.output.decode("utf-8")))
- # Set default values to avoid UnboundLocalError
- arch = ""
- ver = ""
- filename = ""
+ # may need to prepend #!/bin/sh to output
- #Parse output
- for line in output.splitlines():
- line = line.rstrip()
- if line.startswith("Name:"):
- pkg = line.split(": ")[1]
- elif line.startswith("Version:"):
- tmp_str = line.split(": ")[1]
- ver, arch = tmp_str.split("@")
- break
-
- # Get filename
- index = re.search("^URLs", output, re.MULTILINE)
- tmp_str = output[index.end():]
- for line in tmp_str.splitlines():
- if "/" in line:
- line = line.lstrip()
- filename = line.split(" ")[0]
- break
-
- # To have the same data type than other package_info methods
- filepath = os.path.join(self.deploy_dir, arch, filename)
- pkg_dict = {}
- pkg_dict[pkg] = {"arch":arch, "ver":ver, "filename":filename,
- "filepath": filepath}
-
- return pkg_dict
+ target_path = oe.path.join(self.target_rootfs, self.d.expand('${sysconfdir}/rpm-postinsts/'))
+ bb.utils.mkdirhier(target_path)
+ num = self._script_num_prefix(target_path)
+ saved_script_name = oe.path.join(target_path, "%d-%s" % (num, pkg))
+ open(saved_script_name, 'w').write(output)
+ os.chmod(saved_script_name, 0o755)
- """
- Returns the path to a tmpdir where resides the contents of a package.
+ def _handle_intercept_failure(self, registered_pkgs):
+ rpm_postinsts_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
+ bb.utils.mkdirhier(rpm_postinsts_dir)
- Deleting the tmpdir is responsability of the caller.
+ # Save the package postinstalls in /etc/rpm-postinsts
+ for pkg in registered_pkgs.split():
+ self.save_rpmpostinst(pkg)
- """
def extract(self, pkg):
- pkg_info = self.package_info(pkg)
- if not pkg_info:
- bb.fatal("Unable to get information for package '%s' while "
- "trying to extract the package." % pkg)
-
- pkg_path = pkg_info[pkg]["filepath"]
+ output = self._invoke_dnf(["repoquery", "--queryformat", "%{location}", pkg])
+ pkg_name = output.splitlines()[-1]
+ if not pkg_name.endswith(".rpm"):
+ bb.fatal("dnf could not find package %s in repository: %s" %(pkg, output))
+ pkg_path = oe.path.join(self.rpm_repo_dir, pkg_name)
cpio_cmd = bb.utils.which(os.getenv("PATH"), "cpio")
rpm2cpio_cmd = bb.utils.which(os.getenv("PATH"), "rpm2cpio")
@@ -1508,18 +1084,18 @@ class RpmPM(PackageManager):
class OpkgDpkgPM(PackageManager):
- """
- This is an abstract class. Do not instantiate this directly.
- """
- def __init__(self, d):
- super(OpkgDpkgPM, self).__init__(d)
+ def __init__(self, d, target_rootfs):
+ """
+ This is an abstract class. Do not instantiate this directly.
+ """
+ super(OpkgDpkgPM, self).__init__(d, target_rootfs)
- """
- Returns a dictionary with the package info.
-
- This method extracts the common parts for Opkg and Dpkg
- """
def package_info(self, pkg, cmd):
+ """
+ Returns a dictionary with the package info.
+
+ This method extracts the common parts for Opkg and Dpkg
+ """
try:
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
@@ -1528,14 +1104,14 @@ class OpkgDpkgPM(PackageManager):
"returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
return opkg_query(output)
- """
- Returns the path to a tmpdir where resides the contents of a package.
+ def extract(self, pkg, pkg_info):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
- Deleting the tmpdir is responsability of the caller.
+ Deleting the tmpdir is responsability of the caller.
- This method extracts the common parts for Opkg and Dpkg
- """
- def extract(self, pkg, pkg_info):
+ This method extracts the common parts for Opkg and Dpkg
+ """
ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
@@ -1548,20 +1124,21 @@ class OpkgDpkgPM(PackageManager):
tmp_dir = tempfile.mkdtemp()
current_dir = os.getcwd()
os.chdir(tmp_dir)
+ data_tar = 'data.tar.xz'
try:
- cmd = "%s x %s" % (ar_cmd, pkg_path)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
- cmd = "%s xf data.tar.*" % tar_cmd
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ cmd = [ar_cmd, 'x', pkg_path]
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ cmd = [tar_cmd, 'xf', data_tar]
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.utils.remove(tmp_dir, recurse=True)
bb.fatal("Unable to extract %s package. Command '%s' "
- "returned %d:\n%s" % (pkg_path, cmd, e.returncode, e.output.decode("utf-8")))
+ "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
except OSError as e:
bb.utils.remove(tmp_dir, recurse=True)
bb.fatal("Unable to extract %s package. Command '%s' "
- "returned %d:\n%s at %s" % (pkg_path, cmd, e.errno, e.strerror, e.filename))
+ "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
@@ -1570,23 +1147,27 @@ class OpkgDpkgPM(PackageManager):
return tmp_dir
+ def _handle_intercept_failure(self, registered_pkgs):
+ self.mark_packages("unpacked", registered_pkgs.split())
class OpkgPM(OpkgDpkgPM):
- def __init__(self, d, target_rootfs, config_file, archs, task_name='target'):
- super(OpkgPM, self).__init__(d)
+ def __init__(self, d, target_rootfs, config_file, archs, task_name='target', ipk_repo_workdir="oe-rootfs-repo", filterbydependencies=True, prepare_index=True):
+ super(OpkgPM, self).__init__(d, target_rootfs)
- self.target_rootfs = target_rootfs
self.config_file = config_file
self.pkg_archs = archs
self.task_name = task_name
- self.deploy_dir = self.d.getVar("DEPLOY_DIR_IPK", True)
+ self.deploy_dir = oe.path.join(self.d.getVar('WORKDIR'), ipk_repo_workdir)
self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock")
self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/') ,target_rootfs)
- self.opkg_args += self.d.getVar("OPKG_ARGS", True)
+ self.opkg_args += self.d.getVar("OPKG_ARGS")
- opkg_lib_dir = self.d.getVar('OPKGLIBDIR', True)
+ if prepare_index:
+ create_packages_dir(self.d, self.deploy_dir, d.getVar("DEPLOY_DIR_IPK"), "package_write_ipk", filterbydependencies)
+
+ opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
if opkg_lib_dir[0] == "/":
opkg_lib_dir = opkg_lib_dir[1:]
@@ -1598,7 +1179,7 @@ class OpkgPM(OpkgDpkgPM):
if not os.path.exists(self.d.expand('${T}/saved')):
bb.utils.mkdirhier(self.d.expand('${T}/saved'))
- self.from_feeds = (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") == "1"
+ self.from_feeds = (self.d.getVar('BUILD_IMAGES_FROM_FEEDS') or "") == "1"
if self.from_feeds:
self._create_custom_config()
else:
@@ -1606,12 +1187,12 @@ class OpkgPM(OpkgDpkgPM):
self.indexer = OpkgIndexer(self.d, self.deploy_dir)
- """
- This function will change a package's status in /var/lib/opkg/status file.
- If 'packages' is None then the new_status will be applied to all
- packages
- """
def mark_packages(self, status_tag, packages=None):
+ """
+ This function will change a package's status in /var/lib/opkg/status file.
+ If 'packages' is None then the new_status will be applied to all
+ packages
+ """
status_file = os.path.join(self.opkg_dir, "status")
with open(status_file, "r") as sf:
@@ -1643,8 +1224,8 @@ class OpkgPM(OpkgDpkgPM):
config_file.write("arch %s %d\n" % (arch, priority))
priority += 5
- for line in (self.d.getVar('IPK_FEED_URIS', True) or "").split():
- feed_match = re.match("^[ \t]*(.*)##([^ \t]*)[ \t]*$", line)
+ for line in (self.d.getVar('IPK_FEED_URIS') or "").split():
+ feed_match = re.match(r"^[ \t]*(.*)##([^ \t]*)[ \t]*$", line)
if feed_match is not None:
feed_name = feed_match.group(1)
@@ -1660,27 +1241,29 @@ class OpkgPM(OpkgDpkgPM):
specified as compatible for the current machine.
NOTE: Development-helper feature, NOT a full-fledged feed.
"""
- if (self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True) or "") != "":
+ if (self.d.getVar('FEED_DEPLOYDIR_BASE_URI') or "") != "":
for arch in self.pkg_archs.split():
cfg_file_name = os.path.join(self.target_rootfs,
- self.d.getVar("sysconfdir", True),
+ self.d.getVar("sysconfdir"),
"opkg",
"local-%s-feed.conf" % arch)
with open(cfg_file_name, "w+") as cfg_file:
cfg_file.write("src/gz local-%s %s/%s" %
(arch,
- self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
+ self.d.getVar('FEED_DEPLOYDIR_BASE_URI'),
arch))
- if self.opkg_dir != '/var/lib/opkg':
+ if self.d.getVar('OPKGLIBDIR') != '/var/lib':
# There is no command line option for this anymore, we need to add
# info_dir and status_file to config file, if OPKGLIBDIR doesn't have
# the default value of "/var/lib" as defined in opkg:
- # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
- # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
- cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
- cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR VARDIR "/lib/opkg/lists"
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR VARDIR "/lib/opkg/info"
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status"
+ cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
+ cfg_file.write("option lists_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists'))
+ cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
def _create_config(self):
@@ -1698,31 +1281,35 @@ class OpkgPM(OpkgDpkgPM):
config_file.write("src oe-%s file:%s\n" %
(arch, pkgs_dir))
- if self.opkg_dir != '/var/lib/opkg':
+ if self.d.getVar('OPKGLIBDIR') != '/var/lib':
# There is no command line option for this anymore, we need to add
# info_dir and status_file to config file, if OPKGLIBDIR doesn't have
# the default value of "/var/lib" as defined in opkg:
- # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
- # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
- config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
- config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
-
- def insert_feeds_uris(self):
- if self.feed_uris == "":
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR VARDIR "/lib/opkg/lists"
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR VARDIR "/lib/opkg/info"
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status"
+ config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
+ config_file.write("option lists_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists'))
+ config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
+
+ def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+ if feed_uris == "":
return
rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf'
% self.target_rootfs)
- feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
- archs = self.pkg_archs.split() if self.feed_archs is None else self.feed_archs.split()
+ os.makedirs('%s/etc/opkg' % self.target_rootfs, exist_ok=True)
+
+ feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
+ archs = self.pkg_archs.split() if feed_archs is None else feed_archs.split()
with open(rootfs_config, "w+") as config_file:
uri_iterator = 0
for uri in feed_uris:
if archs:
for arch in archs:
- if (self.feed_archs is None) and (not os.path.exists(os.path.join(self.deploy_dir, arch))):
+ if (feed_archs is None) and (not os.path.exists(oe.path.join(self.deploy_dir, arch))):
continue
bb.note('Adding opkg feed url-%s-%d (%s)' %
(arch, uri_iterator, uri))
@@ -1754,29 +1341,44 @@ class OpkgPM(OpkgDpkgPM):
if not pkgs:
return
- cmd = "%s %s install %s" % (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
+ cmd = "%s %s" % (self.opkg_cmd, self.opkg_args)
+ for exclude in (self.d.getVar("PACKAGE_EXCLUDE") or "").split():
+ cmd += " --add-exclude %s" % exclude
+ for bad_recommendation in (self.d.getVar("BAD_RECOMMENDATIONS") or "").split():
+ cmd += " --add-ignore-recommends %s" % bad_recommendation
+ cmd += " install "
+ cmd += " ".join(pkgs)
os.environ['D'] = self.target_rootfs
os.environ['OFFLINE_ROOT'] = self.target_rootfs
os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
- os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR', True),
- "intercept_scripts")
- os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE', True)
+ os.environ['INTERCEPT_DIR'] = self.intercepts_dir
+ os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
try:
bb.note("Installing the following packages: %s" % ' '.join(pkgs))
bb.note(cmd)
output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
bb.note(output)
+ failed_pkgs = []
+ for line in output.split('\n'):
+ if line.endswith("configuration required on target."):
+ bb.warn(line)
+ failed_pkgs.append(line.split(".")[0])
+ if failed_pkgs:
+ failed_postinsts_abort(failed_pkgs, self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
except subprocess.CalledProcessError as e:
- (bb.fatal, bb.note)[attempt_only]("Unable to install packages. "
+ (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
"Command '%s' returned %d:\n%s" %
(cmd, e.returncode, e.output.decode("utf-8")))
def remove(self, pkgs, with_dependencies=True):
+ if not pkgs:
+ return
+
if with_dependencies:
- cmd = "%s %s --force-depends --force-remove --force-removal-of-dependent-packages remove %s" % \
+ cmd = "%s %s --force-remove --force-removal-of-dependent-packages remove %s" % \
(self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
else:
cmd = "%s %s --force-depends remove %s" % \
@@ -1812,59 +1414,23 @@ class OpkgPM(OpkgDpkgPM):
def list_installed(self):
return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs()
- def handle_bad_recommendations(self):
- bad_recommendations = self.d.getVar("BAD_RECOMMENDATIONS", True) or ""
- if bad_recommendations.strip() == "":
- return
-
- status_file = os.path.join(self.opkg_dir, "status")
-
- # If status file existed, it means the bad recommendations has already
- # been handled
- if os.path.exists(status_file):
- return
-
- cmd = "%s %s info " % (self.opkg_cmd, self.opkg_args)
-
- with open(status_file, "w+") as status:
- for pkg in bad_recommendations.split():
- pkg_info = cmd + pkg
-
- try:
- output = subprocess.check_output(pkg_info.split(), stderr=subprocess.STDOUT).strip().decode("utf-8")
- except subprocess.CalledProcessError as e:
- bb.fatal("Cannot get package info. Command '%s' "
- "returned %d:\n%s" % (pkg_info, e.returncode, e.output.decode("utf-8")))
-
- if output == "":
- bb.note("Ignored bad recommendation: '%s' is "
- "not a package" % pkg)
- continue
-
- for line in output.split('\n'):
- if line.startswith("Status:"):
- status.write("Status: deinstall hold not-installed\n")
- else:
- status.write(line + "\n")
-
- # Append a blank line after each package entry to ensure that it
- # is separated from the following entry
- status.write("\n")
-
- '''
- The following function dummy installs pkgs and returns the log of output.
- '''
def dummy_install(self, pkgs):
+ """
+ The following function dummy installs pkgs and returns the log of output.
+ """
if len(pkgs) == 0:
return
# Create an temp dir as opkg root for dummy installation
temp_rootfs = self.d.expand('${T}/opkg')
- temp_opkg_dir = os.path.join(temp_rootfs, 'var/lib/opkg')
+ opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
+ if opkg_lib_dir[0] == "/":
+ opkg_lib_dir = opkg_lib_dir[1:]
+ temp_opkg_dir = os.path.join(temp_rootfs, opkg_lib_dir, 'opkg')
bb.utils.mkdirhier(temp_opkg_dir)
opkg_args = "-f %s -o %s " % (self.config_file, temp_rootfs)
- opkg_args += self.d.getVar("OPKG_ARGS", True)
+ opkg_args += self.d.getVar("OPKG_ARGS")
cmd = "%s %s update" % (self.opkg_cmd, opkg_args)
try:
@@ -1906,10 +1472,10 @@ class OpkgPM(OpkgDpkgPM):
self.opkg_dir,
symlinks=True)
- """
- Returns a dictionary with the package info.
- """
def package_info(self, pkg):
+ """
+ Returns a dictionary with the package info.
+ """
cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg)
pkg_info = super(OpkgPM, self).package_info(pkg, cmd)
@@ -1920,27 +1486,29 @@ class OpkgPM(OpkgDpkgPM):
return pkg_info
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
- """
def extract(self, pkg):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+ """
pkg_info = self.package_info(pkg)
if not pkg_info:
bb.fatal("Unable to get information for package '%s' while "
"trying to extract the package." % pkg)
tmp_dir = super(OpkgPM, self).extract(pkg, pkg_info)
- bb.utils.remove(os.path.join(tmp_dir, "data.tar.gz"))
+ bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
return tmp_dir
class DpkgPM(OpkgDpkgPM):
- def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None):
- super(DpkgPM, self).__init__(d)
- self.target_rootfs = target_rootfs
- self.deploy_dir = self.d.getVar('DEPLOY_DIR_DEB', True)
+ def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None, deb_repo_workdir="oe-rootfs-repo", filterbydependencies=True):
+ super(DpkgPM, self).__init__(d, target_rootfs)
+ self.deploy_dir = oe.path.join(self.d.getVar('WORKDIR'), deb_repo_workdir)
+
+ create_packages_dir(self.d, self.deploy_dir, d.getVar("DEPLOY_DIR_DEB"), "package_write_deb", filterbydependencies)
+
if apt_conf_dir is None:
self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")
else:
@@ -1949,22 +1517,22 @@ class DpkgPM(OpkgDpkgPM):
self.apt_get_cmd = bb.utils.which(os.getenv('PATH'), "apt-get")
self.apt_cache_cmd = bb.utils.which(os.getenv('PATH'), "apt-cache")
- self.apt_args = d.getVar("APT_ARGS", True)
+ self.apt_args = d.getVar("APT_ARGS")
self.all_arch_list = archs.split()
- all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").split()
+ all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").split()
self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list)
self._create_configs(archs, base_archs)
self.indexer = DpkgIndexer(self.d, self.deploy_dir)
- """
- This function will change a package's status in /var/lib/dpkg/status file.
- If 'packages' is None then the new_status will be applied to all
- packages
- """
def mark_packages(self, status_tag, packages=None):
+ """
+ This function will change a package's status in /var/lib/dpkg/status file.
+ If 'packages' is None then the new_status will be applied to all
+ packages
+ """
status_file = self.target_rootfs + "/var/lib/dpkg/status"
with open(status_file, "r") as sf:
@@ -1987,19 +1555,22 @@ class DpkgPM(OpkgDpkgPM):
os.rename(status_file + ".tmp", status_file)
- """
- Run the pre/post installs for package "package_name". If package_name is
- None, then run all pre/post install scriptlets.
- """
def run_pre_post_installs(self, package_name=None):
+ """
+ Run the pre/post installs for package "package_name". If package_name is
+ None, then run all pre/post install scriptlets.
+ """
info_dir = self.target_rootfs + "/var/lib/dpkg/info"
- suffixes = [(".preinst", "Preinstall"), (".postinst", "Postinstall")]
+ ControlScript = collections.namedtuple("ControlScript", ["suffix", "name", "argument"])
+ control_scripts = [
+ ControlScript(".preinst", "Preinstall", "install"),
+ ControlScript(".postinst", "Postinstall", "configure")]
status_file = self.target_rootfs + "/var/lib/dpkg/status"
installed_pkgs = []
with open(status_file, "r") as status:
for line in status.read().split('\n'):
- m = re.match("^Package: (.*)", line)
+ m = re.match(r"^Package: (.*)", line)
if m is not None:
installed_pkgs.append(m.group(1))
@@ -2010,27 +1581,24 @@ class DpkgPM(OpkgDpkgPM):
os.environ['OFFLINE_ROOT'] = self.target_rootfs
os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
- os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR', True),
- "intercept_scripts")
- os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE', True)
+ os.environ['INTERCEPT_DIR'] = self.intercepts_dir
+ os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
- failed_pkgs = []
for pkg_name in installed_pkgs:
- for suffix in suffixes:
- p_full = os.path.join(info_dir, pkg_name + suffix[0])
+ for control_script in control_scripts:
+ p_full = os.path.join(info_dir, pkg_name + control_script.suffix)
if os.path.exists(p_full):
try:
bb.note("Executing %s for package: %s ..." %
- (suffix[1].lower(), pkg_name))
- subprocess.check_output(p_full, stderr=subprocess.STDOUT)
+ (control_script.name.lower(), pkg_name))
+ output = subprocess.check_output([p_full, control_script.argument],
+ stderr=subprocess.STDOUT).decode("utf-8")
+ bb.note(output)
except subprocess.CalledProcessError as e:
- bb.note("%s for package %s failed with %d:\n%s" %
- (suffix[1], pkg_name, e.returncode, e.output.decode("utf-8")))
- failed_pkgs.append(pkg_name)
- break
-
- if len(failed_pkgs):
- self.mark_packages("unpacked", failed_pkgs)
+ bb.warn("%s for package %s failed with %d:\n%s" %
+ (control_script.name, pkg_name, e.returncode,
+ e.output.decode("utf-8")))
+ failed_postinsts_abort([pkg_name], self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
def update(self):
os.environ['APT_CONFIG'] = self.apt_conf_file
@@ -2060,26 +1628,29 @@ class DpkgPM(OpkgDpkgPM):
bb.note("Installing the following packages: %s" % ' '.join(pkgs))
subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
- (bb.fatal, bb.note)[attempt_only]("Unable to install packages. "
+ (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
"Command '%s' returned %d:\n%s" %
(cmd, e.returncode, e.output.decode("utf-8")))
# rename *.dpkg-new files/dirs
for root, dirs, files in os.walk(self.target_rootfs):
for dir in dirs:
- new_dir = re.sub("\.dpkg-new", "", dir)
+ new_dir = re.sub(r"\.dpkg-new", "", dir)
if dir != new_dir:
os.rename(os.path.join(root, dir),
os.path.join(root, new_dir))
for file in files:
- new_file = re.sub("\.dpkg-new", "", file)
+ new_file = re.sub(r"\.dpkg-new", "", file)
if file != new_file:
os.rename(os.path.join(root, file),
os.path.join(root, new_file))
def remove(self, pkgs, with_dependencies=True):
+ if not pkgs:
+ return
+
if with_dependencies:
os.environ['APT_CONFIG'] = self.apt_conf_file
cmd = "%s purge %s" % (self.apt_get_cmd, ' '.join(pkgs))
@@ -2105,23 +1676,23 @@ class DpkgPM(OpkgDpkgPM):
if result is not None:
bb.fatal(result)
- def insert_feeds_uris(self):
- if self.feed_uris == "":
+ def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+ if feed_uris == "":
return
sources_conf = os.path.join("%s/etc/apt/sources.list"
% self.target_rootfs)
arch_list = []
- if self.feed_archs is None:
+ if feed_archs is None:
for arch in self.all_arch_list:
if not os.path.exists(os.path.join(self.deploy_dir, arch)):
continue
arch_list.append(arch)
else:
- arch_list = self.feed_archs.split()
+ arch_list = feed_archs.split()
- feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
+ feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
with open(sources_conf, "w+") as sources_file:
for uri in feed_uris:
@@ -2135,7 +1706,7 @@ class DpkgPM(OpkgDpkgPM):
sources_file.write("deb %s ./\n" % uri)
def _create_configs(self, archs, base_archs):
- base_archs = re.sub("_", "-", base_archs)
+ base_archs = re.sub(r"_", r"-", base_archs)
if os.path.exists(self.apt_conf_dir):
bb.utils.remove(self.apt_conf_dir, True)
@@ -2161,7 +1732,7 @@ class DpkgPM(OpkgDpkgPM):
priority += 5
- pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE', True) or ""
+ pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE') or ""
for pkg in pkg_exclude.split():
prefs_file.write(
"Package: %s\n"
@@ -2176,21 +1747,20 @@ class DpkgPM(OpkgDpkgPM):
os.path.join(self.deploy_dir, arch))
base_arch_list = base_archs.split()
- multilib_variants = self.d.getVar("MULTILIB_VARIANTS", True);
+ multilib_variants = self.d.getVar("MULTILIB_VARIANTS");
for variant in multilib_variants.split():
localdata = bb.data.createCopy(self.d)
variant_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, False)
- orig_arch = localdata.getVar("DPKG_ARCH", True)
+ orig_arch = localdata.getVar("DPKG_ARCH")
localdata.setVar("DEFAULTTUNE", variant_tune)
- bb.data.update_data(localdata)
- variant_arch = localdata.getVar("DPKG_ARCH", True)
+ variant_arch = localdata.getVar("DPKG_ARCH")
if variant_arch not in base_arch_list:
base_arch_list.append(variant_arch)
with open(self.apt_conf_file, "w+") as apt_conf:
with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample:
for line in apt_conf_sample.read().split("\n"):
- match_arch = re.match(" Architecture \".*\";$", line)
+ match_arch = re.match(r" Architecture \".*\";$", line)
architectures = ""
if match_arch:
for base_arch in base_arch_list:
@@ -2198,8 +1768,8 @@ class DpkgPM(OpkgDpkgPM):
apt_conf.write(" Architectures {%s};\n" % architectures);
apt_conf.write(" Architecture \"%s\";\n" % base_archs)
else:
- line = re.sub("#ROOTFS#", self.target_rootfs, line)
- line = re.sub("#APTCONF#", self.apt_conf_dir, line)
+ line = re.sub(r"#ROOTFS#", self.target_rootfs, line)
+ line = re.sub(r"#APTCONF#", self.apt_conf_dir, line)
apt_conf.write(line + "\n")
target_dpkg_dir = "%s/var/lib/dpkg" % self.target_rootfs
@@ -2214,7 +1784,7 @@ class DpkgPM(OpkgDpkgPM):
def remove_packaging_data(self):
bb.utils.remove(os.path.join(self.target_rootfs,
- self.d.getVar('opkglibdir', True)), True)
+ self.d.getVar('opkglibdir')), True)
bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True)
def fix_broken_dependencies(self):
@@ -2231,10 +1801,10 @@ class DpkgPM(OpkgDpkgPM):
def list_installed(self):
return DpkgPkgsList(self.d, self.target_rootfs).list_pkgs()
- """
- Returns a dictionary with the package info.
- """
def package_info(self, pkg):
+ """
+ Returns a dictionary with the package info.
+ """
cmd = "%s show %s" % (self.apt_cache_cmd, pkg)
pkg_info = super(DpkgPM, self).package_info(pkg, cmd)
@@ -2245,12 +1815,12 @@ class DpkgPM(OpkgDpkgPM):
return pkg_info
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
- """
def extract(self, pkg):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+ """
pkg_info = self.package_info(pkg)
if not pkg_info:
bb.fatal("Unable to get information for package '%s' while "
@@ -2262,12 +1832,12 @@ class DpkgPM(OpkgDpkgPM):
return tmp_dir
def generate_index_files(d):
- classes = d.getVar('PACKAGE_CLASSES', True).replace("package_", "").split()
+ classes = d.getVar('PACKAGE_CLASSES').replace("package_", "").split()
indexer_map = {
- "rpm": (RpmIndexer, d.getVar('DEPLOY_DIR_RPM', True)),
- "ipk": (OpkgIndexer, d.getVar('DEPLOY_DIR_IPK', True)),
- "deb": (DpkgIndexer, d.getVar('DEPLOY_DIR_DEB', True))
+ "rpm": (RpmSubdirIndexer, d.getVar('DEPLOY_DIR_RPM')),
+ "ipk": (OpkgIndexer, d.getVar('DEPLOY_DIR_IPK')),
+ "deb": (DpkgIndexer, d.getVar('DEPLOY_DIR_DEB'))
}
result = None
@@ -2281,12 +1851,3 @@ def generate_index_files(d):
if result is not None:
bb.fatal(result)
-
-if __name__ == "__main__":
- """
- We should be able to run this as a standalone script, from outside bitbake
- environment.
- """
- """
- TBD
- """
diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py
index 21d4de914f..a82085a792 100644
--- a/meta/lib/oe/packagedata.py
+++ b/meta/lib/oe/packagedata.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import codecs
import os
@@ -13,9 +17,8 @@ def read_pkgdatafile(fn):
if os.access(fn, os.R_OK):
import re
- f = open(fn, 'r')
- lines = f.readlines()
- f.close()
+ with open(fn, 'r') as f:
+ lines = f.readlines()
r = re.compile("([^:]+):\s*(.*)")
for l in lines:
m = r.match(l)
@@ -57,7 +60,7 @@ def read_subpkgdata_dict(pkg, d):
def _pkgmap(d):
"""Return a dictionary mapping package to recipe name."""
- pkgdatadir = d.getVar("PKGDATA_DIR", True)
+ pkgdatadir = d.getVar("PKGDATA_DIR")
pkgmap = {}
try:
diff --git a/meta/lib/oe/packagegroup.py b/meta/lib/oe/packagegroup.py
index 97819279b7..2419cbb6d3 100644
--- a/meta/lib/oe/packagegroup.py
+++ b/meta/lib/oe/packagegroup.py
@@ -1,17 +1,21 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import itertools
def is_optional(feature, d):
- packages = d.getVar("FEATURE_PACKAGES_%s" % feature, True)
+ packages = d.getVar("FEATURE_PACKAGES_%s" % feature)
if packages:
- return bool(d.getVarFlag("FEATURE_PACKAGES_%s" % feature, "optional", True))
+ return bool(d.getVarFlag("FEATURE_PACKAGES_%s" % feature, "optional"))
else:
- return bool(d.getVarFlag("PACKAGE_GROUP_%s" % feature, "optional", True))
+ return bool(d.getVarFlag("PACKAGE_GROUP_%s" % feature, "optional"))
def packages(features, d):
for feature in features:
- packages = d.getVar("FEATURE_PACKAGES_%s" % feature, True)
+ packages = d.getVar("FEATURE_PACKAGES_%s" % feature)
if not packages:
- packages = d.getVar("PACKAGE_GROUP_%s" % feature, True)
+ packages = d.getVar("PACKAGE_GROUP_%s" % feature)
for pkg in (packages or "").split():
yield pkg
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 0332f100f1..2b1eee1003 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -1,4 +1,9 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import oe.path
+import oe.types
class NotFoundError(bb.BBHandledException):
def __init__(self, path):
@@ -20,6 +25,7 @@ class CmdError(bb.BBHandledException):
def runcmd(args, dir = None):
import pipes
+ import subprocess
if dir:
olddir = os.path.abspath(os.curdir)
@@ -32,9 +38,14 @@ def runcmd(args, dir = None):
args = [ pipes.quote(str(arg)) for arg in args ]
cmd = " ".join(args)
# print("cmd: %s" % cmd)
- (exitstatus, output) = oe.utils.getstatusoutput(cmd)
+ (exitstatus, output) = subprocess.getstatusoutput(cmd)
if exitstatus != 0:
raise CmdError(cmd, exitstatus >> 8, output)
+ if " fuzz " in output:
+ # Drop patch fuzz info with header and footer to log file so
+ # insane.bbclass can handle to throw error/warning
+ bb.note("--- Patch fuzz start ---\n%s\n--- Patch fuzz end ---" % format(output))
+
return output
finally:
@@ -81,7 +92,7 @@ class PatchSet(object):
patch[param] = PatchSet.defaults[param]
if patch.get("remote"):
- patch["file"] = bb.data.expand(bb.fetch2.localpath(patch["remote"], self.d), self.d)
+ patch["file"] = self.d.expand(bb.fetch2.localpath(patch["remote"], self.d))
patch["filemd5"] = bb.utils.md5_file(patch["file"])
@@ -211,7 +222,7 @@ class PatchTree(PatchSet):
self.patches.insert(i, patch)
def _applypatch(self, patch, force = False, reverse = False, run = True):
- shellcmd = ["cat", patch['file'], "|", "patch", "-p", patch['strippath']]
+ shellcmd = ["cat", patch['file'], "|", "patch", "--no-backup-if-mismatch", "-p", patch['strippath']]
if reverse:
shellcmd.append('-R')
@@ -281,8 +292,8 @@ class GitApplyTree(PatchTree):
def __init__(self, dir, d):
PatchTree.__init__(self, dir, d)
- self.commituser = d.getVar('PATCH_GIT_USER_NAME', True)
- self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL', True)
+ self.commituser = d.getVar('PATCH_GIT_USER_NAME')
+ self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
@staticmethod
def extractPatchHeader(patchfile):
@@ -316,8 +327,8 @@ class GitApplyTree(PatchTree):
@staticmethod
def interpretPatchHeader(headerlines):
import re
- author_re = re.compile('[\S ]+ <\S+@\S+\.\S+>')
- from_commit_re = re.compile('^From [a-z0-9]{40} .*')
+ author_re = re.compile(r'[\S ]+ <\S+@\S+\.\S+>')
+ from_commit_re = re.compile(r'^From [a-z0-9]{40} .*')
outlines = []
author = None
date = None
@@ -371,8 +382,8 @@ class GitApplyTree(PatchTree):
@staticmethod
def gitCommandUserOptions(cmd, commituser=None, commitemail=None, d=None):
if d:
- commituser = d.getVar('PATCH_GIT_USER_NAME', True)
- commitemail = d.getVar('PATCH_GIT_USER_EMAIL', True)
+ commituser = d.getVar('PATCH_GIT_USER_NAME')
+ commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
if commituser:
cmd += ['-c', 'user.name="%s"' % commituser]
if commitemail:
@@ -428,9 +439,10 @@ class GitApplyTree(PatchTree):
def extractPatches(tree, startcommit, outdir, paths=None):
import tempfile
import shutil
+ import re
tempdir = tempfile.mkdtemp(prefix='oepatch')
try:
- shellcmd = ["git", "format-patch", startcommit, "-o", tempdir]
+ shellcmd = ["git", "format-patch", "--no-signature", "--no-numbered", startcommit, "-o", tempdir]
if paths:
shellcmd.append('--')
shellcmd.extend(paths)
@@ -443,10 +455,13 @@ class GitApplyTree(PatchTree):
try:
with open(srcfile, 'r', encoding=encoding) as f:
for line in f:
- if line.startswith(GitApplyTree.patch_line_prefix):
+ checkline = line
+ if checkline.startswith('Subject: '):
+ checkline = re.sub(r'\[.+?\]\s*', '', checkline[9:])
+ if checkline.startswith(GitApplyTree.patch_line_prefix):
outfile = line.split()[-1].strip()
continue
- if line.startswith(GitApplyTree.ignore_commit_prefix):
+ if checkline.startswith(GitApplyTree.ignore_commit_prefix):
continue
patchlines.append(line)
except UnicodeDecodeError:
@@ -547,7 +562,7 @@ class GitApplyTree(PatchTree):
class QuiltTree(PatchSet):
def _runcmd(self, args, run = True):
- quiltrc = self.d.getVar('QUILTRCFILE', True)
+ quiltrc = self.d.getVar('QUILTRCFILE')
if not run:
return ["quilt"] + ["--quiltrc"] + [quiltrc] + args
runcmd(["quilt"] + ["--quiltrc"] + [quiltrc] + args, self.dir)
@@ -723,7 +738,7 @@ class UserResolver(Resolver):
# Patch application failed
patchcmd = self.patchset.Push(True, False, False)
- t = self.patchset.d.getVar('T', True)
+ t = self.patchset.d.getVar('T')
if not t:
bb.msg.fatal("Build", "T not set")
bb.utils.mkdirhier(t)
@@ -765,3 +780,123 @@ class UserResolver(Resolver):
os.chdir(olddir)
raise
os.chdir(olddir)
+
+
+def patch_path(url, fetch, workdir, expand=True):
+ """Return the local path of a patch, or return nothing if this isn't a patch"""
+
+ local = fetch.localpath(url)
+ if os.path.isdir(local):
+ return
+ base, ext = os.path.splitext(os.path.basename(local))
+ if ext in ('.gz', '.bz2', '.xz', '.Z'):
+ if expand:
+ local = os.path.join(workdir, base)
+ ext = os.path.splitext(base)[1]
+
+ urldata = fetch.ud[url]
+ if "apply" in urldata.parm:
+ apply = oe.types.boolean(urldata.parm["apply"])
+ if not apply:
+ return
+ elif ext not in (".diff", ".patch"):
+ return
+
+ return local
+
+def src_patches(d, all=False, expand=True):
+ workdir = d.getVar('WORKDIR')
+ fetch = bb.fetch2.Fetch([], d)
+ patches = []
+ sources = []
+ for url in fetch.urls:
+ local = patch_path(url, fetch, workdir, expand)
+ if not local:
+ if all:
+ local = fetch.localpath(url)
+ sources.append(local)
+ continue
+
+ urldata = fetch.ud[url]
+ parm = urldata.parm
+ patchname = parm.get('pname') or os.path.basename(local)
+
+ apply, reason = should_apply(parm, d)
+ if not apply:
+ if reason:
+ bb.note("Patch %s %s" % (patchname, reason))
+ continue
+
+ patchparm = {'patchname': patchname}
+ if "striplevel" in parm:
+ striplevel = parm["striplevel"]
+ elif "pnum" in parm:
+ #bb.msg.warn(None, "Deprecated usage of 'pnum' url parameter in '%s', please use 'striplevel'" % url)
+ striplevel = parm["pnum"]
+ else:
+ striplevel = '1'
+ patchparm['striplevel'] = striplevel
+
+ patchdir = parm.get('patchdir')
+ if patchdir:
+ patchparm['patchdir'] = patchdir
+
+ localurl = bb.fetch.encodeurl(('file', '', local, '', '', patchparm))
+ patches.append(localurl)
+
+ if all:
+ return sources
+
+ return patches
+
+
+def should_apply(parm, d):
+ import bb.utils
+ if "mindate" in parm or "maxdate" in parm:
+ pn = d.getVar('PN')
+ srcdate = d.getVar('SRCDATE_%s' % pn)
+ if not srcdate:
+ srcdate = d.getVar('SRCDATE')
+
+ if srcdate == "now":
+ srcdate = d.getVar('DATE')
+
+ if "maxdate" in parm and parm["maxdate"] < srcdate:
+ return False, 'is outdated'
+
+ if "mindate" in parm and parm["mindate"] > srcdate:
+ return False, 'is predated'
+
+
+ if "minrev" in parm:
+ srcrev = d.getVar('SRCREV')
+ if srcrev and srcrev < parm["minrev"]:
+ return False, 'applies to later revisions'
+
+ if "maxrev" in parm:
+ srcrev = d.getVar('SRCREV')
+ if srcrev and srcrev > parm["maxrev"]:
+ return False, 'applies to earlier revisions'
+
+ if "rev" in parm:
+ srcrev = d.getVar('SRCREV')
+ if srcrev and parm["rev"] not in srcrev:
+ return False, "doesn't apply to revision"
+
+ if "notrev" in parm:
+ srcrev = d.getVar('SRCREV')
+ if srcrev and parm["notrev"] in srcrev:
+ return False, "doesn't apply to revision"
+
+ if "maxver" in parm:
+ pv = d.getVar('PV')
+ if bb.utils.vercmp_string_op(pv, parm["maxver"], ">"):
+ return False, "applies to earlier version"
+
+ if "minver" in parm:
+ pv = d.getVar('PV')
+ if bb.utils.vercmp_string_op(pv, parm["minver"], "<"):
+ return False, "applies to later version"
+
+ return True, None
+
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index 06a5af2659..fa209b9795 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import errno
import glob
import shutil
@@ -50,9 +54,30 @@ def make_relative_symlink(path):
os.remove(path)
os.symlink(base, path)
+def replace_absolute_symlinks(basedir, d):
+ """
+ Walk basedir looking for absolute symlinks and replacing them with relative ones.
+ The absolute links are assumed to be relative to basedir
+ (compared to make_relative_symlink above which tries to compute common ancestors
+ using pattern matching instead)
+ """
+ for walkroot, dirs, files in os.walk(basedir):
+ for file in files + dirs:
+ path = os.path.join(walkroot, file)
+ if not os.path.islink(path):
+ continue
+ link = os.readlink(path)
+ if not os.path.isabs(link):
+ continue
+ walkdir = os.path.dirname(path.rpartition(basedir)[2])
+ base = os.path.relpath(link, walkdir)
+ bb.debug(2, "Replacing absolute path %s with relative path %s" % (link, base))
+ os.remove(path)
+ os.symlink(base, path)
+
def format_display(path, metadata):
""" Prepare a path for display to the user. """
- rel = relative(metadata.getVar("TOPDIR", True), path)
+ rel = relative(metadata.getVar("TOPDIR"), path)
if len(rel) > len(path):
return path
else:
@@ -65,11 +90,11 @@ def copytree(src, dst):
# This way we also preserve hardlinks between files in the tree.
bb.utils.mkdirhier(dst)
- cmd = "tar --xattrs --xattrs-include='*' -cf - -C %s -p . | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dst)
+ cmd = "tar --xattrs --xattrs-include='*' -cf - -S -C %s -p . | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dst)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
def copyhardlinktree(src, dst):
- """ Make the hard link when possible, otherwise copy. """
+ """Make a tree of hard links when possible, otherwise copy."""
bb.utils.mkdirhier(dst)
if os.path.isdir(src) and not len(os.listdir(src)):
return
@@ -77,23 +102,42 @@ def copyhardlinktree(src, dst):
if (os.stat(src).st_dev == os.stat(dst).st_dev):
# Need to copy directories only with tar first since cp will error if two
# writers try and create a directory at the same time
- cmd = "cd %s; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, src, dst)
+ cmd = "cd %s; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -S -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xhf - -C %s" % (src, src, dst)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
source = ''
if os.path.isdir(src):
- import glob
if len(glob.glob('%s/.??*' % src)) > 0:
- source = '%s/.??* ' % src
- source = source + '%s/*' % src
+ source = './.??* '
+ source += './*'
+ s_dir = src
else:
source = src
- cmd = 'cp -afl --preserve=xattr %s %s' % (source, dst)
- subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
+ s_dir = os.getcwd()
+ cmd = 'cp -afl --preserve=xattr %s %s' % (source, os.path.realpath(dst))
+ subprocess.check_output(cmd, shell=True, cwd=s_dir, stderr=subprocess.STDOUT)
else:
copytree(src, dst)
+def copyhardlink(src, dst):
+ """Make a hard link when possible, otherwise copy."""
+
+ # We need to stat the destination directory as the destination file probably
+ # doesn't exist yet.
+ dstdir = os.path.dirname(dst)
+ if os.stat(src).st_dev == os.stat(dstdir).st_dev:
+ os.link(src, dst)
+ else:
+ shutil.copy(src, dst)
+
def remove(path, recurse=True):
- """Equivalent to rm -f or rm -rf"""
+ """
+ Equivalent to rm -f or rm -rf
+ NOTE: be careful about passing paths that may contain filenames with
+ wildcards in them (as opposed to passing an actual wildcarded path) -
+ since we use glob.glob() to expand the path. Filenames containing
+ square brackets are particularly problematic since the they may not
+ actually expand to match the original filename.
+ """
for name in glob.glob(path):
try:
os.unlink(name)
@@ -208,3 +252,59 @@ def realpath(file, root, use_physdir = True, loop_cnt = 100, assume_dir = False)
raise
return file
+
+def is_path_parent(possible_parent, *paths):
+ """
+ Return True if a path is the parent of another, False otherwise.
+ Multiple paths to test can be specified in which case all
+ specified test paths must be under the parent in order to
+ return True.
+ """
+ def abs_path_trailing(pth):
+ pth_abs = os.path.abspath(pth)
+ if not pth_abs.endswith(os.sep):
+ pth_abs += os.sep
+ return pth_abs
+
+ possible_parent_abs = abs_path_trailing(possible_parent)
+ if not paths:
+ return False
+ for path in paths:
+ path_abs = abs_path_trailing(path)
+ if not path_abs.startswith(possible_parent_abs):
+ return False
+ return True
+
+def which_wild(pathname, path=None, mode=os.F_OK, *, reverse=False, candidates=False):
+ """Search a search path for pathname, supporting wildcards.
+
+ Return all paths in the specific search path matching the wildcard pattern
+ in pathname, returning only the first encountered for each file. If
+ candidates is True, information on all potential candidate paths are
+ included.
+ """
+ paths = (path or os.environ.get('PATH', os.defpath)).split(':')
+ if reverse:
+ paths.reverse()
+
+ seen, files = set(), []
+ for index, element in enumerate(paths):
+ if not os.path.isabs(element):
+ element = os.path.abspath(element)
+
+ candidate = os.path.join(element, pathname)
+ globbed = glob.glob(candidate)
+ if globbed:
+ for found_path in sorted(globbed):
+ if not os.access(found_path, mode):
+ continue
+ rel = os.path.relpath(found_path, element)
+ if rel not in seen:
+ seen.add(rel)
+ if candidates:
+ files.append((found_path, [os.path.join(p, rel) for p in paths[:index+1]]))
+ else:
+ files.append(found_path)
+
+ return files
+
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index 0054f954cc..b1132ccb11 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -1,7 +1,10 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
def prserv_make_conn(d, check = False):
import prserv.serv
- host_params = list([_f for _f in (d.getVar("PRSERV_HOST", True) or '').split(':') if _f])
+ host_params = list([_f for _f in (d.getVar("PRSERV_HOST") or '').split(':') if _f])
try:
conn = None
conn = prserv.serv.PRServerConnection(host_params[0], int(host_params[1]))
@@ -15,11 +18,11 @@ def prserv_make_conn(d, check = False):
return conn
def prserv_dump_db(d):
- if not d.getVar('PRSERV_HOST', True):
+ if not d.getVar('PRSERV_HOST'):
bb.error("Not using network based PR service")
return None
- conn = d.getVar("__PRSERV_CONN", True)
+ conn = d.getVar("__PRSERV_CONN")
if conn is None:
conn = prserv_make_conn(d)
if conn is None:
@@ -27,18 +30,18 @@ def prserv_dump_db(d):
return None
#dump db
- opt_version = d.getVar('PRSERV_DUMPOPT_VERSION', True)
- opt_pkgarch = d.getVar('PRSERV_DUMPOPT_PKGARCH', True)
- opt_checksum = d.getVar('PRSERV_DUMPOPT_CHECKSUM', True)
- opt_col = ("1" == d.getVar('PRSERV_DUMPOPT_COL', True))
+ opt_version = d.getVar('PRSERV_DUMPOPT_VERSION')
+ opt_pkgarch = d.getVar('PRSERV_DUMPOPT_PKGARCH')
+ opt_checksum = d.getVar('PRSERV_DUMPOPT_CHECKSUM')
+ opt_col = ("1" == d.getVar('PRSERV_DUMPOPT_COL'))
return conn.export(opt_version, opt_pkgarch, opt_checksum, opt_col)
def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksum=None):
- if not d.getVar('PRSERV_HOST', True):
+ if not d.getVar('PRSERV_HOST'):
bb.error("Not using network based PR service")
return None
- conn = d.getVar("__PRSERV_CONN", True)
+ conn = d.getVar("__PRSERV_CONN")
if conn is None:
conn = prserv_make_conn(d)
if conn is None:
@@ -58,7 +61,7 @@ def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksu
(filter_checksum and filter_checksum != checksum):
continue
try:
- value = int(d.getVar(remain + '$' + version + '$' + pkgarch + '$' + checksum, True))
+ value = int(d.getVar(remain + '$' + version + '$' + pkgarch + '$' + checksum))
except BaseException as exc:
bb.debug("Not valid value of %s:%s" % (v,str(exc)))
continue
@@ -72,8 +75,8 @@ def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksu
def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
import bb.utils
#initilize the output file
- bb.utils.mkdirhier(d.getVar('PRSERV_DUMPDIR', True))
- df = d.getVar('PRSERV_DUMPFILE', True)
+ bb.utils.mkdirhier(d.getVar('PRSERV_DUMPDIR'))
+ df = d.getVar('PRSERV_DUMPFILE')
#write data
lf = bb.utils.lockfile("%s.lock" % df)
f = open(df, "a")
@@ -114,7 +117,7 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
bb.utils.unlockfile(lf)
def prserv_check_avail(d):
- host_params = list([_f for _f in (d.getVar("PRSERV_HOST", True) or '').split(':') if _f])
+ host_params = list([_f for _f in (d.getVar("PRSERV_HOST") or '').split(':') if _f])
try:
if len(host_params) != 2:
raise TypeError
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index 75e7df8546..21066c4dc3 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -1,4 +1,8 @@
-import os, struct
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os, struct, mmap
class NotELFFileError(Exception):
pass
@@ -23,9 +27,9 @@ class ELFFile:
EV_CURRENT = 1
# possible values for EI_DATA
- ELFDATANONE = 0
- ELFDATA2LSB = 1
- ELFDATA2MSB = 2
+ EI_DATA_NONE = 0
+ EI_DATA_LSB = 1
+ EI_DATA_MSB = 2
PT_INTERP = 3
@@ -34,51 +38,46 @@ class ELFFile:
#print "'%x','%x' %s" % (ord(expectation), ord(result), self.name)
raise NotELFFileError("%s is not an ELF" % self.name)
- def __init__(self, name, bits = 0):
+ def __init__(self, name):
self.name = name
- self.bits = bits
self.objdump_output = {}
- def open(self):
- if not os.path.isfile(self.name):
- raise NotELFFileError("%s is not a normal file" % self.name)
+ # Context Manager functions to close the mmap explicitly
+ def __enter__(self):
+ return self
+ def __exit__(self, exc_type, exc_value, traceback):
+ self.data.close()
+
+ def open(self):
with open(self.name, "rb") as f:
- # Read 4k which should cover most of the headers we're after
- self.data = f.read(4096)
+ try:
+ self.data = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
+ except ValueError:
+ # This means the file is empty
+ raise NotELFFileError("%s is empty" % self.name)
+ # Check the file has the minimum number of ELF table entries
if len(self.data) < ELFFile.EI_NIDENT + 4:
raise NotELFFileError("%s is not an ELF" % self.name)
+ # ELF header
self.my_assert(self.data[0], 0x7f)
self.my_assert(self.data[1], ord('E'))
self.my_assert(self.data[2], ord('L'))
self.my_assert(self.data[3], ord('F'))
- if self.bits == 0:
- if self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS32:
- self.bits = 32
- elif self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS64:
- self.bits = 64
- else:
- # Not 32-bit or 64.. lets assert
- raise NotELFFileError("ELF but not 32 or 64 bit.")
- elif self.bits == 32:
- self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS32)
- elif self.bits == 64:
- self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS64)
+ if self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS32:
+ self.bits = 32
+ elif self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS64:
+ self.bits = 64
else:
- raise NotELFFileError("Must specify unknown, 32 or 64 bit size.")
+ # Not 32-bit or 64.. lets assert
+ raise NotELFFileError("ELF but not 32 or 64 bit.")
self.my_assert(self.data[ELFFile.EI_VERSION], ELFFile.EV_CURRENT)
- self.sex = self.data[ELFFile.EI_DATA]
- if self.sex == ELFFile.ELFDATANONE:
- raise NotELFFileError("self.sex == ELFDATANONE")
- elif self.sex == ELFFile.ELFDATA2LSB:
- self.sex = "<"
- elif self.sex == ELFFile.ELFDATA2MSB:
- self.sex = ">"
- else:
- raise NotELFFileError("Unknown self.sex")
+ self.endian = self.data[ELFFile.EI_DATA]
+ if self.endian not in (ELFFile.EI_DATA_LSB, ELFFile.EI_DATA_MSB):
+ raise NotELFFileError("Unexpected EI_DATA %x" % self.endian)
def osAbi(self):
return self.data[ELFFile.EI_OSABI]
@@ -90,16 +89,20 @@ class ELFFile:
return self.bits
def isLittleEndian(self):
- return self.sex == "<"
+ return self.endian == ELFFile.EI_DATA_LSB
def isBigEndian(self):
- return self.sex == ">"
+ return self.endian == ELFFile.EI_DATA_MSB
+
+ def getStructEndian(self):
+ return {ELFFile.EI_DATA_LSB: "<",
+ ELFFile.EI_DATA_MSB: ">"}[self.endian]
def getShort(self, offset):
- return struct.unpack_from(self.sex+"H", self.data, offset)[0]
+ return struct.unpack_from(self.getStructEndian() + "H", self.data, offset)[0]
def getWord(self, offset):
- return struct.unpack_from(self.sex+"i", self.data, offset)[0]
+ return struct.unpack_from(self.getStructEndian() + "i", self.data, offset)[0]
def isDynamic(self):
"""
@@ -118,7 +121,7 @@ class ELFFile:
def machine(self):
"""
- We know the sex stored in self.sex and we
+ We know the endian stored in self.endian and we
know the position
"""
return self.getShort(ELFFile.E_MACHINE)
@@ -130,11 +133,11 @@ class ELFFile:
if cmd in self.objdump_output:
return self.objdump_output[cmd]
- objdump = d.getVar('OBJDUMP', True)
+ objdump = d.getVar('OBJDUMP')
env = os.environ.copy()
env["LC_ALL"] = "C"
- env["PATH"] = d.getVar('PATH', True)
+ env["PATH"] = d.getVar('PATH')
try:
bb.note("%s %s %s" % (objdump, cmd, self.name))
@@ -144,8 +147,30 @@ class ELFFile:
bb.note("%s %s %s failed: %s" % (objdump, cmd, self.name, e))
return ""
+def elf_machine_to_string(machine):
+ """
+ Return the name of a given ELF e_machine field or the hex value as a string
+ if it isn't recognised.
+ """
+ try:
+ return {
+ 0x02: "SPARC",
+ 0x03: "x86",
+ 0x08: "MIPS",
+ 0x14: "PowerPC",
+ 0x28: "ARM",
+ 0x2A: "SuperH",
+ 0x32: "IA-64",
+ 0x3E: "x86-64",
+ 0xB7: "AArch64",
+ 0xF7: "BPF"
+ }[machine]
+ except:
+ return "Unknown (%s)" % repr(machine)
+
if __name__ == "__main__":
import sys
- elf = ELFFile(sys.argv[1])
- elf.open()
- print(elf.isDynamic())
+
+ with ELFFile(sys.argv[1]) as elf:
+ elf.open()
+ print(elf.isDynamic())
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 58e4028aed..630ae967af 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -2,7 +2,9 @@
#
# Some code borrowed from the OE layer index
#
-# Copyright (C) 2013-2016 Intel Corporation
+# Copyright (C) 2013-2017 Intel Corporation
+#
+# SPDX-License-Identifier: GPL-2.0-only
#
import sys
@@ -16,71 +18,40 @@ import shutil
import re
import fnmatch
import glob
-from collections import OrderedDict, defaultdict
+import bb.tinfoil
+from collections import OrderedDict, defaultdict
+from bb.utils import vercmp_string
# Help us to find places to insert values
recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LICENSE_FLAGS', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRCPV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'EXTRA_OECMAKE', 'EXTRA_OESCONS', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'populate_packages()', 'do_package()', 'do_deploy()']
# Variables that sometimes are a bit long but shouldn't be wrapped
-nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]']
+nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', r'SRC_URI\[(.+\.)?md5sum\]', r'SRC_URI\[(.+\.)?sha256sum\]']
list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM']
meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION']
-def pn_to_recipe(cooker, pn, mc=''):
- """Convert a recipe name (PN) to the path to the recipe file"""
- import bb.providers
-
- if pn in cooker.recipecaches[mc].pkg_pn:
- best = bb.providers.findBestProvider(pn, cooker.data, cooker.recipecaches[mc], cooker.recipecaches[mc].pkg_pn)
- return best[3]
- elif pn in cooker.recipecaches[mc].providers:
- filenames = cooker.recipecaches[mc].providers[pn]
- eligible, foundUnique = bb.providers.filterProviders(filenames, pn, cooker.expanded_data, cooker.recipecaches[mc])
- filename = eligible[0]
- return filename
- else:
- return None
-
-
-def get_unavailable_reasons(cooker, pn):
- """If a recipe could not be found, find out why if possible"""
- import bb.taskdata
- taskdata = bb.taskdata.TaskData(None, skiplist=cooker.skiplist)
- return taskdata.get_reasons(pn)
-
-
-def parse_recipe(cooker, fn, appendfiles):
- """
- Parse an individual recipe file, optionally with a list of
- bbappend files.
- """
- import bb.cache
- parser = bb.cache.NoCache(cooker.databuilder)
- envdata = parser.loadDataFull(fn, appendfiles)
- return envdata
-
-
-def parse_recipe_simple(cooker, pn, d, appends=True):
+def simplify_history(history, d):
"""
- Parse a recipe and optionally all bbappends that apply to it
- in the current configuration.
+ Eliminate any irrelevant events from a variable history
"""
- import bb.providers
-
- recipefile = pn_to_recipe(cooker, pn)
- if not recipefile:
- skipreasons = get_unavailable_reasons(cooker, pn)
- # We may as well re-use bb.providers.NoProvider here
- if skipreasons:
- raise bb.providers.NoProvider(skipreasons)
- else:
- raise bb.providers.NoProvider('Unable to find any recipe file matching %s' % pn)
- if appends:
- appendfiles = cooker.collection.get_file_appends(recipefile)
- else:
- appendfiles = None
- return parse_recipe(cooker, recipefile, appendfiles)
+ ret_history = []
+ has_set = False
+ # Go backwards through the history and remove any immediate operations
+ # before the most recent set
+ for event in reversed(history):
+ if 'flag' in event or not 'file' in event:
+ continue
+ if event['op'] == 'set':
+ if has_set:
+ continue
+ has_set = True
+ elif event['op'] in ('append', 'prepend', 'postdot', 'predot'):
+ # Reminder: "append" and "prepend" mean += and =+ respectively, NOT _append / _prepend
+ if has_set:
+ continue
+ ret_history.insert(0, event)
+ return ret_history
def get_var_files(fn, varlist, d):
@@ -89,11 +60,19 @@ def get_var_files(fn, varlist, d):
"""
varfiles = {}
for v in varlist:
- history = d.varhistory.variable(v)
files = []
- for event in history:
- if 'file' in event and not 'flag' in event:
- files.append(event['file'])
+ if '[' in v:
+ varsplit = v.split('[')
+ varflag = varsplit[1].split(']')[0]
+ history = d.varhistory.variable(varsplit[0])
+ for event in history:
+ if 'file' in event and event.get('flag', '') == varflag:
+ files.append(event['file'])
+ else:
+ history = d.varhistory.variable(v)
+ for event in history:
+ if 'file' in event and not 'flag' in event:
+ files.append(event['file'])
if files:
actualfile = files[-1]
else:
@@ -173,6 +152,10 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True):
else:
newline = ''
+ nowrap_vars_res = []
+ for item in nowrap_vars:
+ nowrap_vars_res.append(re.compile('^%s$' % item))
+
recipe_progression_res = []
recipe_progression_restrs = []
for item in recipe_progression:
@@ -180,7 +163,7 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True):
key = item[:-2]
else:
key = item
- restr = '%s(_[a-zA-Z0-9-_$(){}]+|\[[^\]]*\])?' % key
+ restr = r'%s(_[a-zA-Z0-9-_$(){}]+|\[[^\]]*\])?' % key
if item.endswith('()'):
recipe_progression_restrs.append(restr + '()')
else:
@@ -203,15 +186,27 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True):
def outputvalue(name, lines, rewindcomments=False):
if values[name] is None:
return
- rawtext = '%s = "%s"%s' % (name, values[name], newline)
+ if isinstance(values[name], tuple):
+ op, value = values[name]
+ if op == '+=' and value.strip() == '':
+ return
+ else:
+ value = values[name]
+ op = '='
+ rawtext = '%s %s "%s"%s' % (name, op, value, newline)
addlines = []
- if name in nowrap_vars:
+ nowrap = False
+ for nowrap_re in nowrap_vars_res:
+ if nowrap_re.match(name):
+ nowrap = True
+ break
+ if nowrap:
addlines.append(rawtext)
elif name in list_vars:
- splitvalue = split_var_value(values[name], assignment=False)
+ splitvalue = split_var_value(value, assignment=False)
if len(splitvalue) > 1:
linesplit = ' \\\n' + (' ' * (len(name) + 4))
- addlines.append('%s = "%s%s"%s' % (name, linesplit.join(splitvalue), linesplit, newline))
+ addlines.append('%s %s "%s%s"%s' % (name, op, linesplit.join(splitvalue), linesplit, newline))
else:
addlines.append(rawtext)
else:
@@ -219,6 +214,11 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True):
for wrapline in wrapped[:-1]:
addlines.append('%s \\%s' % (wrapline, newline))
addlines.append('%s%s' % (wrapped[-1], newline))
+
+ # Split on newlines - this isn't strictly necessary if you are only
+ # going to write the output to disk, but if you want to compare it
+ # (as patch_recipe_file() will do if patch=True) then it's important.
+ addlines = [line for l in addlines for line in l.splitlines(True)]
if rewindcomments:
# Ensure we insert the lines before any leading comments
# (that we'd want to ensure remain leading the next value)
@@ -268,7 +268,7 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True):
return changed, tolines
-def patch_recipe_file(fn, values, patch=False, relpath=''):
+def patch_recipe_file(fn, values, patch=False, relpath='', redirect_output=None):
"""Update or insert variable values into a recipe file (assuming you
have already identified the exact file you want to update.)
Note that some manual inspection/intervention may be required
@@ -280,7 +280,11 @@ def patch_recipe_file(fn, values, patch=False, relpath=''):
_, tolines = patch_recipe_lines(fromlines, values)
- if patch:
+ if redirect_output:
+ with open(os.path.join(redirect_output, os.path.basename(fn)), 'w') as f:
+ f.writelines(tolines)
+ return None
+ elif patch:
relfn = os.path.relpath(fn, relpath)
diff = difflib.unified_diff(fromlines, tolines, 'a/%s' % relfn, 'b/%s' % relfn)
return diff
@@ -330,17 +334,52 @@ def localise_file_vars(fn, varfiles, varlist):
return filevars
-def patch_recipe(d, fn, varvalues, patch=False, relpath=''):
+def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None):
"""Modify a list of variable values in the specified recipe. Handles inc files if
used by the recipe.
"""
+ overrides = d.getVar('OVERRIDES').split(':')
+ def override_applicable(hevent):
+ op = hevent['op']
+ if '[' in op:
+ opoverrides = op.split('[')[1].split(']')[0].split('_')
+ for opoverride in opoverrides:
+ if not opoverride in overrides:
+ return False
+ return True
+
varlist = varvalues.keys()
+ fn = os.path.abspath(fn)
varfiles = get_var_files(fn, varlist, d)
locs = localise_file_vars(fn, varfiles, varlist)
patches = []
for f,v in locs.items():
vals = {k: varvalues[k] for k in v}
- patchdata = patch_recipe_file(f, vals, patch, relpath)
+ f = os.path.abspath(f)
+ if f == fn:
+ extravals = {}
+ for var, value in vals.items():
+ if var in list_vars:
+ history = simplify_history(d.varhistory.variable(var), d)
+ recipe_set = False
+ for event in history:
+ if os.path.abspath(event['file']) == fn:
+ if event['op'] == 'set':
+ recipe_set = True
+ if not recipe_set:
+ for event in history:
+ if event['op'].startswith('_remove'):
+ continue
+ if not override_applicable(event):
+ continue
+ newvalue = value.replace(event['detail'], '')
+ if newvalue == value and os.path.abspath(event['file']) == fn and event['op'].startswith('_'):
+ op = event['op'].replace('[', '_').replace(']', '')
+ extravals[var + op] = None
+ value = newvalue
+ vals[var] = ('+=', value)
+ vals.update(extravals)
+ patchdata = patch_recipe_file(f, vals, patch, relpath, redirect_output)
if patch:
patches.append(patchdata)
@@ -351,7 +390,7 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath=''):
-def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
+def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True, all_variants=False):
"""Copy (local) recipe files, including both files included via include/require,
and files referred to in the SRC_URI variable."""
import bb.fetch2
@@ -359,18 +398,41 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
# FIXME need a warning if the unexpanded SRC_URI value contains variable references
- uris = (d.getVar('SRC_URI', True) or "").split()
- fetch = bb.fetch2.Fetch(uris, d)
- if download:
- fetch.download()
+ uri_values = []
+ localpaths = []
+ def fetch_urls(rdata):
+ # Collect the local paths from SRC_URI
+ srcuri = rdata.getVar('SRC_URI') or ""
+ if srcuri not in uri_values:
+ fetch = bb.fetch2.Fetch(srcuri.split(), rdata)
+ if download:
+ fetch.download()
+ for pth in fetch.localpaths():
+ if pth not in localpaths:
+ localpaths.append(pth)
+ uri_values.append(srcuri)
+
+ fetch_urls(d)
+ if all_variants:
+ # Get files for other variants e.g. in the case of a SRC_URI_append
+ localdata = bb.data.createCopy(d)
+ variants = (localdata.getVar('BBCLASSEXTEND') or '').split()
+ if variants:
+ # Ensure we handle class-target if we're dealing with one of the variants
+ variants.append('target')
+ for variant in variants:
+ localdata.setVar('CLASSOVERRIDE', 'class-%s' % variant)
+ fetch_urls(localdata)
# Copy local files to target directory and gather any remote files
- bb_dir = os.path.dirname(d.getVar('FILE', True)) + os.sep
+ bb_dir = os.path.abspath(os.path.dirname(d.getVar('FILE'))) + os.sep
remotes = []
copied = []
- includes = [path for path in d.getVar('BBINCLUDED', True).split() if
- path.startswith(bb_dir) and os.path.exists(path)]
- for path in fetch.localpaths() + includes:
+ # Need to do this in two steps since we want to check against the absolute path
+ includes = [os.path.abspath(path) for path in d.getVar('BBINCLUDED').split() if os.path.exists(path)]
+ # We also check this below, but we don't want any items in this list being considered remotes
+ includes = [path for path in includes if path.startswith(bb_dir)]
+ for path in localpaths + includes:
# Only import files that are under the meta directory
if path.startswith(bb_dir):
if not whole_dir:
@@ -389,15 +451,21 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
return copied, remotes
-def get_recipe_local_files(d, patches=False):
+def get_recipe_local_files(d, patches=False, archives=False):
"""Get a list of local files in SRC_URI within a recipe."""
- uris = (d.getVar('SRC_URI', True) or "").split()
+ import oe.patch
+ uris = (d.getVar('SRC_URI') or "").split()
fetch = bb.fetch2.Fetch(uris, d)
+ # FIXME this list should be factored out somewhere else (such as the
+ # fetcher) though note that this only encompasses actual container formats
+ # i.e. that can contain multiple files as opposed to those that only
+ # contain a compressed stream (i.e. .tar.gz as opposed to just .gz)
+ archive_exts = ['.tar', '.tgz', '.tar.gz', '.tar.Z', '.tbz', '.tbz2', '.tar.bz2', '.txz', '.tar.xz', '.tar.lz', '.zip', '.jar', '.rpm', '.srpm', '.deb', '.ipk', '.tar.7z', '.7z']
ret = {}
for uri in uris:
if fetch.ud[uri].type == 'file':
if (not patches and
- bb.utils.exec_flat_python_func('patch_path', uri, fetch, '')):
+ oe.patch.patch_path(uri, fetch, '', expand=False)):
continue
# Skip files that are referenced by absolute path
fname = fetch.ud[uri].basepath
@@ -409,16 +477,29 @@ def get_recipe_local_files(d, patches=False):
if os.path.isabs(subdir):
continue
fname = os.path.join(subdir, fname)
- ret[fname] = fetch.localpath(uri)
+ localpath = fetch.localpath(uri)
+ if not archives:
+ # Ignore archives that will be unpacked
+ if localpath.endswith(tuple(archive_exts)):
+ unpack = fetch.ud[uri].parm.get('unpack', True)
+ if unpack:
+ continue
+ if os.path.isdir(localpath):
+ for root, dirs, files in os.walk(localpath):
+ for fname in files:
+ fileabspath = os.path.join(root,fname)
+ srcdir = os.path.dirname(localpath)
+ ret[os.path.relpath(fileabspath,srcdir)] = fileabspath
+ else:
+ ret[fname] = localpath
return ret
def get_recipe_patches(d):
"""Get a list of the patches included in SRC_URI within a recipe."""
+ import oe.patch
+ patches = oe.patch.src_patches(d, expand=False)
patchfiles = []
- # Execute src_patches() defined in patch.bbclass - this works since that class
- # is inherited globally
- patches = bb.utils.exec_flat_python_func('src_patches', d)
for patch in patches:
_, _, local, _, _, parm = bb.fetch.decodeurl(patch)
patchfiles.append(local)
@@ -435,14 +516,12 @@ def get_recipe_patched_files(d):
change mode ('A' for add, 'D' for delete or 'M' for modify)
"""
import oe.patch
- # Execute src_patches() defined in patch.bbclass - this works since that class
- # is inherited globally
- patches = bb.utils.exec_flat_python_func('src_patches', d)
+ patches = oe.patch.src_patches(d, expand=False)
patchedfiles = {}
for patch in patches:
_, _, patchfile, _, _, parm = bb.fetch.decodeurl(patch)
striplevel = int(parm['striplevel'])
- patchedfiles[patchfile] = oe.patch.PatchSet.getPatchedFiles(patchfile, striplevel, os.path.join(d.getVar('S', True), parm.get('patchdir', '')))
+ patchedfiles[patchfile] = oe.patch.PatchSet.getPatchedFiles(patchfile, striplevel, os.path.join(d.getVar('S'), parm.get('patchdir', '')))
return patchedfiles
@@ -480,9 +559,9 @@ def get_bbfile_path(d, destdir, extrapathhint=None):
confdata.setVar('LAYERDIR', destlayerdir)
destlayerconf = os.path.join(destlayerdir, "conf", "layer.conf")
confdata = bb.cookerdata.parse_config_file(destlayerconf, confdata)
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
- bbfilespecs = (confdata.getVar('BBFILES', True) or '').split()
+ bbfilespecs = (confdata.getVar('BBFILES') or '').split()
if destdir == destlayerdir:
for bbfilespec in bbfilespecs:
if not bbfilespec.endswith('.bbappend'):
@@ -495,8 +574,8 @@ def get_bbfile_path(d, destdir, extrapathhint=None):
# Try to make up a path that matches BBFILES
# this is a little crude, but better than nothing
- bpn = d.getVar('BPN', True)
- recipefn = os.path.basename(d.getVar('FILE', True))
+ bpn = d.getVar('BPN')
+ recipefn = os.path.basename(d.getVar('FILE'))
pathoptions = [destdir]
if extrapathhint:
pathoptions.append(os.path.join(destdir, extrapathhint))
@@ -520,7 +599,7 @@ def get_bbappend_path(d, destlayerdir, wildcardver=False):
import bb.cookerdata
destlayerdir = os.path.abspath(destlayerdir)
- recipefile = d.getVar('FILE', True)
+ recipefile = d.getVar('FILE')
recipefn = os.path.splitext(os.path.basename(recipefile))[0]
if wildcardver and '_' in recipefn:
recipefn = recipefn.split('_', 1)[0] + '_%'
@@ -540,7 +619,7 @@ def get_bbappend_path(d, destlayerdir, wildcardver=False):
appendpath = os.path.join(destlayerdir, os.path.relpath(os.path.dirname(recipefile), origlayerdir), appendfn)
closepath = ''
pathok = True
- for bbfilespec in confdata.getVar('BBFILES', True).split():
+ for bbfilespec in confdata.getVar('BBFILES').split():
if fnmatch.fnmatchcase(appendpath, bbfilespec):
# Our append path works, we're done
break
@@ -568,7 +647,7 @@ def get_bbappend_path(d, destlayerdir, wildcardver=False):
return (appendpath, pathok)
-def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None):
+def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None, redirect_output=None):
"""
Writes a bbappend file for a recipe
Parameters:
@@ -595,6 +674,9 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
value pairs, or simply a list of the lines.
removevalues:
Variable values to remove - a dict of names/values.
+ redirect_output:
+ If specified, redirects writing the output file to the
+ specified directory (for dry-run purposes)
"""
if not removevalues:
@@ -609,11 +691,12 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
bb.warn('Unable to determine correct subdirectory path for bbappend file - check that what %s adds to BBFILES also matches .bbappend files. Using %s for now, but until you fix this the bbappend will not be applied.' % (os.path.join(destlayerdir, 'conf', 'layer.conf'), os.path.dirname(appendpath)))
appenddir = os.path.dirname(appendpath)
- bb.utils.mkdirhier(appenddir)
+ if not redirect_output:
+ bb.utils.mkdirhier(appenddir)
# FIXME check if the bbappend doesn't get overridden by a higher priority layer?
- layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS', True).split()]
+ layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS').split()]
if not os.path.abspath(destlayerdir) in layerdirs:
bb.warn('Specified layer is not currently enabled in bblayers.conf, you will need to add it before this bbappend will be active')
@@ -649,7 +732,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
else:
bbappendlines.append((varname, op, value))
- destsubdir = rd.getVar('PN', True)
+ destsubdir = rd.getVar('PN')
if srcfiles:
bbappendlines.append(('FILESEXTRAPATHS_prepend', ':=', '${THISDIR}/${PN}:'))
@@ -668,7 +751,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
srcurientry = 'file://%s' % srcfile
# Double-check it's not there already
# FIXME do we care if the entry is added by another bbappend that might go away?
- if not srcurientry in rd.getVar('SRC_URI', True).split():
+ if not srcurientry in rd.getVar('SRC_URI').split():
if machine:
appendline('SRC_URI_append%s' % appendoverride, '=', ' ' + srcurientry)
else:
@@ -686,9 +769,18 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
if instfunclines:
bbappendlines.append(('do_install_append%s()' % appendoverride, '', instfunclines))
- bb.note('Writing append file %s' % appendpath)
+ if redirect_output:
+ bb.note('Writing append file %s (dry-run)' % appendpath)
+ outfile = os.path.join(redirect_output, os.path.basename(appendpath))
+ # Only take a copy if the file isn't already there (this function may be called
+ # multiple times per operation when we're handling overrides)
+ if os.path.exists(appendpath) and not os.path.exists(outfile):
+ shutil.copy2(appendpath, outfile)
+ else:
+ bb.note('Writing append file %s' % appendpath)
+ outfile = appendpath
- if os.path.exists(appendpath):
+ if os.path.exists(outfile):
# Work around lack of nonlocal in python 2
extvars = {'destsubdir': destsubdir}
@@ -760,7 +852,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
if removevalues:
varnames.extend(list(removevalues.keys()))
- with open(appendpath, 'r') as f:
+ with open(outfile, 'r') as f:
(updated, newlines) = bb.utils.edit_metadata(f, varnames, appendfile_varfunc)
destsubdir = extvars['destsubdir']
@@ -777,16 +869,27 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
updated = True
if updated:
- with open(appendpath, 'w') as f:
+ with open(outfile, 'w') as f:
f.writelines(newlines)
if copyfiles:
if machine:
destsubdir = os.path.join(destsubdir, machine)
+ if redirect_output:
+ outdir = redirect_output
+ else:
+ outdir = appenddir
for newfile, srcfile in copyfiles.items():
- filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile))
+ filedest = os.path.join(outdir, destsubdir, os.path.basename(srcfile))
if os.path.abspath(newfile) != os.path.abspath(filedest):
- bb.note('Copying %s to %s' % (newfile, filedest))
+ if newfile.startswith(tempfile.gettempdir()):
+ newfiledisp = os.path.basename(newfile)
+ else:
+ newfiledisp = newfile
+ if redirect_output:
+ bb.note('Copying %s to %s (dry-run)' % (newfiledisp, os.path.join(appenddir, destsubdir, os.path.basename(srcfile))))
+ else:
+ bb.note('Copying %s to %s' % (newfiledisp, filedest))
bb.utils.mkdirhier(os.path.dirname(filedest))
shutil.copyfile(newfile, filedest)
@@ -795,7 +898,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
def find_layerdir(fn):
""" Figure out the path to the base of the layer containing a file (e.g. a recipe)"""
- pth = fn
+ pth = os.path.abspath(fn)
layerdir = ''
while pth:
if os.path.exists(os.path.join(pth, 'conf', 'layer.conf')):
@@ -813,7 +916,7 @@ def replace_dir_vars(path, d):
# Sort by length so we get the variables we're interested in first
for var in sorted(list(d.keys()), key=len):
if var.endswith('dir') and var.lower() == var:
- value = d.getVar(var, True)
+ value = d.getVar(var)
if value.startswith('/') and not '\n' in value and value not in dirvars:
dirvars[value] = var
for dirpath in sorted(list(dirvars.keys()), reverse=True):
@@ -831,7 +934,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
sfx = ''
if uri_type == 'git':
- git_regex = re.compile("(?P<pfx>v?)(?P<ver>[^\+]*)((?P<sfx>\+(git)?r?(AUTOINC\+))(?P<rev>.*))?")
+ git_regex = re.compile(r"(?P<pfx>v?)(?P<ver>.*?)(?P<sfx>\+[^\+]*(git)?r?(AUTOINC\+))(?P<rev>.*)")
m = git_regex.match(pv)
if m:
@@ -839,7 +942,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
pfx = m.group('pfx')
sfx = m.group('sfx')
else:
- regex = re.compile("(?P<pfx>(v|r)?)(?P<ver>.*)")
+ regex = re.compile(r"(?P<pfx>(v|r)?)(?P<ver>.*)")
m = regex.match(pv)
if m:
pv = m.group('ver')
@@ -856,25 +959,25 @@ def get_recipe_upstream_version(rd):
FetchError when don't have network access or upstream site don't response.
NoMethodError when uri latest_versionstring method isn't implemented.
- Returns a dictonary with version, type and datetime.
+ Returns a dictonary with version, repository revision, current_version, type and datetime.
Type can be A for Automatic, M for Manual and U for Unknown.
"""
from bb.fetch2 import decodeurl
from datetime import datetime
ru = {}
+ ru['current_version'] = rd.getVar('PV')
ru['version'] = ''
ru['type'] = 'U'
ru['datetime'] = ''
-
- pv = rd.getVar('PV', True)
+ ru['revision'] = ''
# XXX: If don't have SRC_URI means that don't have upstream sources so
# returns the current recipe version, so that upstream version check
# declares a match.
- src_uris = rd.getVar('SRC_URI', True)
+ src_uris = rd.getVar('SRC_URI')
if not src_uris:
- ru['version'] = pv
+ ru['version'] = ru['current_version']
ru['type'] = 'M'
ru['datetime'] = datetime.now()
return ru
@@ -883,13 +986,16 @@ def get_recipe_upstream_version(rd):
src_uri = src_uris.split()[0]
uri_type, _, _, _, _, _ = decodeurl(src_uri)
- manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION", True)
+ (pv, pfx, sfx) = get_recipe_pv_without_srcpv(rd.getVar('PV'), uri_type)
+ ru['current_version'] = pv
+
+ manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION")
if manual_upstream_version:
# manual tracking of upstream version.
ru['version'] = manual_upstream_version
ru['type'] = 'M'
- manual_upstream_date = rd.getVar("CHECK_DATE", True)
+ manual_upstream_date = rd.getVar("CHECK_DATE")
if manual_upstream_date:
date = datetime.strptime(manual_upstream_date, "%b %d, %Y")
else:
@@ -903,33 +1009,106 @@ def get_recipe_upstream_version(rd):
ru['datetime'] = datetime.now()
else:
ud = bb.fetch2.FetchData(src_uri, rd)
- pupver = ud.method.latest_versionstring(ud, rd)
- (upversion, revision) = pupver
+ if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1":
+ revision = ud.method.latest_revision(ud, rd, 'default')
+ upversion = pv
+ if revision != rd.getVar("SRCREV"):
+ upversion = upversion + "-new-commits-available"
+ else:
+ pupver = ud.method.latest_versionstring(ud, rd)
+ (upversion, revision) = pupver
+
+ if upversion:
+ ru['version'] = upversion
+ ru['type'] = 'A'
- # format git version version+gitAUTOINC+HASH
- if uri_type == 'git':
- (pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type)
+ if revision:
+ ru['revision'] = revision
- # if contains revision but not upversion use current pv
- if upversion == '' and revision:
- upversion = pv
+ ru['datetime'] = datetime.now()
+
+ return ru
+
+def _get_recipe_upgrade_status(data):
+ uv = get_recipe_upstream_version(data)
- if upversion:
- tmp = upversion
- upversion = ''
+ pn = data.getVar('PN')
+ cur_ver = uv['current_version']
- if pfx:
- upversion = pfx + tmp
+ upstream_version_unknown = data.getVar('UPSTREAM_VERSION_UNKNOWN')
+ if not uv['version']:
+ status = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN"
+ else:
+ cmp = vercmp_string(uv['current_version'], uv['version'])
+ if cmp == -1:
+ status = "UPDATE" if not upstream_version_unknown else "KNOWN_BROKEN"
+ elif cmp == 0:
+ status = "MATCH" if not upstream_version_unknown else "KNOWN_BROKEN"
+ else:
+ status = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN"
+
+ next_ver = uv['version'] if uv['version'] else "N/A"
+ revision = uv['revision'] if uv['revision'] else "N/A"
+ maintainer = data.getVar('RECIPE_MAINTAINER')
+ no_upgrade_reason = data.getVar('RECIPE_NO_UPDATE_REASON')
+
+ return (pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason)
+
+def get_recipe_upgrade_status(recipes=None):
+ pkgs_list = []
+ data_copy_list = []
+ copy_vars = ('SRC_URI',
+ 'PV',
+ 'GITDIR',
+ 'DL_DIR',
+ 'PN',
+ 'CACHE',
+ 'PERSISTENT_DIR',
+ 'BB_URI_HEADREVS',
+ 'UPSTREAM_CHECK_COMMITS',
+ 'UPSTREAM_CHECK_GITTAGREGEX',
+ 'UPSTREAM_CHECK_REGEX',
+ 'UPSTREAM_CHECK_URI',
+ 'UPSTREAM_VERSION_UNKNOWN',
+ 'RECIPE_MAINTAINER',
+ 'RECIPE_NO_UPDATE_REASON',
+ 'RECIPE_UPSTREAM_VERSION',
+ 'RECIPE_UPSTREAM_DATE',
+ 'CHECK_DATE',
+ )
+
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=False)
+
+ if not recipes:
+ recipes = tinfoil.all_recipe_files(variants=False)
+
+ for fn in recipes:
+ try:
+ if fn.startswith("/"):
+ data = tinfoil.parse_recipe_file(fn)
else:
- upversion = tmp
+ data = tinfoil.parse_recipe(fn)
+ except bb.providers.NoProvider:
+ bb.note(" No provider for %s" % fn)
+ continue
- if sfx:
- upversion = upversion + sfx + revision[:10]
+ unreliable = data.getVar('UPSTREAM_CHECK_UNRELIABLE')
+ if unreliable == "1":
+ bb.note(" Skip package %s as upstream check unreliable" % pn)
+ continue
- if upversion:
- ru['version'] = upversion
- ru['type'] = 'A'
+ data_copy = bb.data.init()
+ for var in copy_vars:
+ data_copy.setVar(var, data.getVar(var))
+ for k in data:
+ if k.startswith('SRCREV'):
+ data_copy.setVar(k, data.getVar(k))
- ru['datetime'] = datetime.now()
+ data_copy_list.append(data_copy)
- return ru
+ from concurrent.futures import ProcessPoolExecutor
+ with ProcessPoolExecutor(max_workers=utils.cpu_count()) as executor:
+ pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list)
+
+ return pkgs_list
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index a348b975c2..c62fa5f54a 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
from abc import ABCMeta, abstractmethod
from oe.utils import execute_pre_post_process
from oe.package_manager import *
@@ -15,12 +18,13 @@ class Rootfs(object, metaclass=ABCMeta):
This is an abstract class. Do not instantiate this directly.
"""
- def __init__(self, d, progress_reporter=None):
+ def __init__(self, d, progress_reporter=None, logcatcher=None):
self.d = d
self.pm = None
- self.image_rootfs = self.d.getVar('IMAGE_ROOTFS', True)
- self.deploydir = self.d.getVar('IMGDEPLOYDIR', True)
+ self.image_rootfs = self.d.getVar('IMAGE_ROOTFS')
+ self.deploydir = self.d.getVar('IMGDEPLOYDIR')
self.progress_reporter = progress_reporter
+ self.logcatcher = logcatcher
self.install_order = Manifest.INSTALL_ORDER
@@ -53,6 +57,8 @@ class Rootfs(object, metaclass=ABCMeta):
messages = []
with open(log_path, 'r') as log:
for line in log:
+ if self.logcatcher and self.logcatcher.contains(line.rstrip()):
+ continue
for ee in excludes:
m = ee.search(line)
if m:
@@ -69,7 +75,7 @@ class Rootfs(object, metaclass=ABCMeta):
else:
msg = '%d %s messages' % (len(messages), type)
msg = '[log_check] %s: found %s in the logfile:\n%s' % \
- (self.d.getVar('PN', True), msg, ''.join(messages))
+ (self.d.getVar('PN'), msg, ''.join(messages))
if type == 'error':
bb.fatal(msg)
else:
@@ -84,11 +90,10 @@ class Rootfs(object, metaclass=ABCMeta):
def _insert_feed_uris(self):
if bb.utils.contains("IMAGE_FEATURES", "package-management",
True, False, self.d):
- self.pm.insert_feeds_uris()
+ self.pm.insert_feeds_uris(self.d.getVar('PACKAGE_FEED_URIS') or "",
+ self.d.getVar('PACKAGE_FEED_BASE_PATHS') or "",
+ self.d.getVar('PACKAGE_FEED_ARCHS'))
- @abstractmethod
- def _handle_intercept_failure(self, failed_script):
- pass
"""
The _cleanup() method should be used to clean-up stuff that we don't really
@@ -100,7 +105,7 @@ class Rootfs(object, metaclass=ABCMeta):
pass
def _setup_dbg_rootfs(self, dirs):
- gen_debugfs = self.d.getVar('IMAGE_GEN_DEBUGFS', True) or '0'
+ gen_debugfs = self.d.getVar('IMAGE_GEN_DEBUGFS') or '0'
if gen_debugfs != '1':
return
@@ -142,6 +147,20 @@ class Rootfs(object, metaclass=ABCMeta):
bb.note(" Install complementary '*-dbg' packages...")
self.pm.install_complementary('*-dbg')
+ if self.d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-with-srcpkg':
+ bb.note(" Install complementary '*-src' packages...")
+ self.pm.install_complementary('*-src')
+
+ """
+ Install additional debug packages. Possibility to install additional packages,
+ which are not automatically installed as complementary package of
+ standard one, e.g. debug package of static libraries.
+ """
+ extra_debug_pkgs = self.d.getVar('IMAGE_INSTALL_DEBUGFS')
+ if extra_debug_pkgs:
+ bb.note(" Install extra debug packages...")
+ self.pm.install(extra_debug_pkgs.split(), True)
+
bb.note(" Rename debug rootfs...")
try:
shutil.rmtree(self.image_rootfs + '-dbg')
@@ -153,7 +172,7 @@ class Rootfs(object, metaclass=ABCMeta):
os.rename(self.image_rootfs + '-orig', self.image_rootfs)
def _exec_shell_cmd(self, cmd):
- fakerootcmd = self.d.getVar('FAKEROOT', True)
+ fakerootcmd = self.d.getVar('FAKEROOT')
if fakerootcmd is not None:
exec_cmd = [fakerootcmd, cmd]
else:
@@ -168,28 +187,14 @@ class Rootfs(object, metaclass=ABCMeta):
def create(self):
bb.note("###### Generate rootfs #######")
- pre_process_cmds = self.d.getVar("ROOTFS_PREPROCESS_COMMAND", True)
- post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND", True)
- rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND', True)
-
- postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR", True)
- if not postinst_intercepts_dir:
- postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
- intercepts_dir = os.path.join(self.d.getVar('WORKDIR', True),
- "intercept_scripts")
-
- bb.utils.remove(intercepts_dir, True)
+ pre_process_cmds = self.d.getVar("ROOTFS_PREPROCESS_COMMAND")
+ post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND")
+ rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND')
bb.utils.mkdirhier(self.image_rootfs)
bb.utils.mkdirhier(self.deploydir)
- shutil.copytree(postinst_intercepts_dir, intercepts_dir)
-
- shutil.copy(self.d.expand("${COREBASE}/meta/files/deploydir_readme.txt"),
- self.deploydir +
- "/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt")
-
execute_pre_post_process(self.d, pre_process_cmds)
if self.progress_reporter:
@@ -198,14 +203,14 @@ class Rootfs(object, metaclass=ABCMeta):
# call the package manager dependent create method
self._create()
- sysconfdir = self.image_rootfs + self.d.getVar('sysconfdir', True)
+ sysconfdir = self.image_rootfs + self.d.getVar('sysconfdir')
bb.utils.mkdirhier(sysconfdir)
with open(sysconfdir + "/version", "w+") as ver:
- ver.write(self.d.getVar('BUILDNAME', True) + "\n")
+ ver.write(self.d.getVar('BUILDNAME') + "\n")
execute_pre_post_process(self.d, rootfs_post_install_cmds)
- self._run_intercepts()
+ self.pm.run_intercepts()
execute_pre_post_process(self.d, post_process_cmds)
@@ -220,7 +225,7 @@ class Rootfs(object, metaclass=ABCMeta):
"offline and rootfs is read-only: %s" %
delayed_postinsts)
- if self.d.getVar('USE_DEVFS', True) != "1":
+ if self.d.getVar('USE_DEVFS') != "1":
self._create_devfs()
self._uninstall_unneeded()
@@ -232,7 +237,7 @@ class Rootfs(object, metaclass=ABCMeta):
self._run_ldconfig()
- if self.d.getVar('USE_DEPMOD', True) != "0":
+ if self.d.getVar('USE_DEPMOD') != "0":
self._generate_kernel_module_deps()
self._cleanup()
@@ -248,21 +253,33 @@ class Rootfs(object, metaclass=ABCMeta):
if delayed_postinsts is None:
if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")):
self._exec_shell_cmd(["update-rc.d", "-f", "-r",
- self.d.getVar('IMAGE_ROOTFS', True),
+ self.d.getVar('IMAGE_ROOTFS'),
"run-postinsts", "remove"])
image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
True, False, self.d)
- image_rorfs_force = self.d.getVar('FORCE_RO_REMOVE', True)
+ image_rorfs_force = self.d.getVar('FORCE_RO_REMOVE')
if image_rorfs or image_rorfs_force == "1":
# Remove components that we don't need if it's a read-only rootfs
- unneeded_pkgs = self.d.getVar("ROOTFS_RO_UNNEEDED", True).split()
+ unneeded_pkgs = self.d.getVar("ROOTFS_RO_UNNEEDED").split()
pkgs_installed = image_list_installed_packages(self.d)
- pkgs_to_remove = [pkg for pkg in pkgs_installed if pkg in unneeded_pkgs]
-
+ # Make sure update-alternatives is removed last. This is
+ # because its database has to available while uninstalling
+ # other packages, allowing alternative symlinks of packages
+ # to be uninstalled or to be managed correctly otherwise.
+ provider = self.d.getVar("VIRTUAL-RUNTIME_update-alternatives")
+ pkgs_to_remove = sorted([pkg for pkg in pkgs_installed if pkg in unneeded_pkgs], key=lambda x: x == provider)
+
+ # update-alternatives provider is removed in its own remove()
+ # call because all package managers do not guarantee the packages
+ # are removed in the order they given in the list (which is
+ # passed to the command line). The sorting done earlier is
+ # utilized to implement the 2-stage removal.
+ if len(pkgs_to_remove) > 1:
+ self.pm.remove(pkgs_to_remove[:-1], False)
if len(pkgs_to_remove) > 0:
- self.pm.remove(pkgs_to_remove, False)
+ self.pm.remove([pkgs_to_remove[-1]], False)
if delayed_postinsts:
self._save_postinsts()
@@ -270,7 +287,7 @@ class Rootfs(object, metaclass=ABCMeta):
bb.warn("There are post install scripts "
"in a read-only rootfs")
- post_uninstall_cmds = self.d.getVar("ROOTFS_POSTUNINSTALL_COMMAND", True)
+ post_uninstall_cmds = self.d.getVar("ROOTFS_POSTUNINSTALL_COMMAND")
execute_pre_post_process(self.d, post_uninstall_cmds)
runtime_pkgmanage = bb.utils.contains("IMAGE_FEATURES", "package-management",
@@ -279,45 +296,8 @@ class Rootfs(object, metaclass=ABCMeta):
# Remove the package manager data files
self.pm.remove_packaging_data()
- def _run_intercepts(self):
- intercepts_dir = os.path.join(self.d.getVar('WORKDIR', True),
- "intercept_scripts")
-
- bb.note("Running intercept scripts:")
- os.environ['D'] = self.image_rootfs
- os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE', True)
- for script in os.listdir(intercepts_dir):
- script_full = os.path.join(intercepts_dir, script)
-
- if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
- continue
-
- bb.note("> Executing %s intercept ..." % script)
-
- try:
- subprocess.check_call(script_full)
- except subprocess.CalledProcessError as e:
- bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details!" %
- (script, e.returncode))
-
- with open(script_full) as intercept:
- registered_pkgs = None
- for line in intercept.read().split("\n"):
- m = re.match("^##PKGS:(.*)", line)
- if m is not None:
- registered_pkgs = m.group(1).strip()
- break
-
- if registered_pkgs is not None:
- bb.warn("The postinstalls for the following packages "
- "will be postponed for first boot: %s" %
- registered_pkgs)
-
- # call the backend dependent handler
- self._handle_intercept_failure(registered_pkgs)
-
def _run_ldconfig(self):
- if self.d.getVar('LDCONFIGDEPEND', True):
+ if self.d.getVar('LDCONFIGDEPEND'):
bb.note("Executing: ldconfig -r" + self.image_rootfs + "-c new -v")
self._exec_shell_cmd(['ldconfig', '-r', self.image_rootfs, '-c',
'new', '-v'])
@@ -337,7 +317,7 @@ class Rootfs(object, metaclass=ABCMeta):
bb.note("No Kernel Modules found, not running depmod")
return
- kernel_abi_ver_file = oe.path.join(self.d.getVar('PKGDATA_DIR', True), "kernel-depmod",
+ kernel_abi_ver_file = oe.path.join(self.d.getVar('PKGDATA_DIR'), "kernel-depmod",
'kernel-abiversion')
if not os.path.exists(kernel_abi_ver_file):
bb.fatal("No kernel-abiversion file found (%s), cannot run depmod, aborting" % kernel_abi_ver_file)
@@ -359,15 +339,15 @@ class Rootfs(object, metaclass=ABCMeta):
"""
def _create_devfs(self):
devtable_list = []
- devtable = self.d.getVar('IMAGE_DEVICE_TABLE', True)
+ devtable = self.d.getVar('IMAGE_DEVICE_TABLE')
if devtable is not None:
devtable_list.append(devtable)
else:
- devtables = self.d.getVar('IMAGE_DEVICE_TABLES', True)
+ devtables = self.d.getVar('IMAGE_DEVICE_TABLES')
if devtables is None:
devtables = 'files/device_table-minimal.txt'
for devtable in devtables.split():
- devtable_list.append("%s" % bb.utils.which(self.d.getVar('BBPATH', True), devtable))
+ devtable_list.append("%s" % bb.utils.which(self.d.getVar('BBPATH'), devtable))
for devtable in devtable_list:
self._exec_shell_cmd(["makedevs", "-r",
@@ -375,24 +355,24 @@ class Rootfs(object, metaclass=ABCMeta):
class RpmRootfs(Rootfs):
- def __init__(self, d, manifest_dir, progress_reporter=None):
- super(RpmRootfs, self).__init__(d, progress_reporter)
- self.log_check_regex = '(unpacking of archive failed|Cannot find package'\
- '|exit 1|ERROR: |Error: |Error |ERROR '\
- '|Failed |Failed: |Failed$|Failed\(\d+\):)'
+ def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+ super(RpmRootfs, self).__init__(d, progress_reporter, logcatcher)
+ self.log_check_regex = r'(unpacking of archive failed|Cannot find package'\
+ r'|exit 1|ERROR: |Error: |Error |ERROR '\
+ r'|Failed |Failed: |Failed$|Failed\(\d+\):)'
self.manifest = RpmManifest(d, manifest_dir)
self.pm = RpmPM(d,
- d.getVar('IMAGE_ROOTFS', True),
- self.d.getVar('TARGET_VENDOR', True)
+ d.getVar('IMAGE_ROOTFS'),
+ self.d.getVar('TARGET_VENDOR')
)
- self.inc_rpm_image_gen = self.d.getVar('INC_RPM_IMAGE_GEN', True)
+ self.inc_rpm_image_gen = self.d.getVar('INC_RPM_IMAGE_GEN')
if self.inc_rpm_image_gen != "1":
bb.utils.remove(self.image_rootfs, True)
else:
self.pm.recovery_packaging_data()
- bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS', True), True)
+ bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
self.pm.create_configs()
@@ -424,10 +404,12 @@ class RpmRootfs(Rootfs):
bb.note('incremental removed: %s' % ' '.join(pkg_to_remove))
self.pm.remove(pkg_to_remove)
+ self.pm.autoremove()
+
def _create(self):
pkgs_to_install = self.manifest.parse_initial_manifest()
- rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS', True)
- rpm_post_process_cmds = self.d.getVar('RPM_POSTPROCESS_COMMANDS', True)
+ rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS')
+ rpm_post_process_cmds = self.d.getVar('RPM_POSTPROCESS_COMMANDS')
# update PM index files
self.pm.write_index()
@@ -437,8 +419,6 @@ class RpmRootfs(Rootfs):
if self.progress_reporter:
self.progress_reporter.next_stage()
- self.pm.dump_all_available_pkgs()
-
if self.inc_rpm_image_gen == "1":
self._create_incremental(pkgs_to_install)
@@ -473,17 +453,13 @@ class RpmRootfs(Rootfs):
if self.progress_reporter:
self.progress_reporter.next_stage()
- self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm', '/var/lib/smart'])
+ self._setup_dbg_rootfs(['/etc', '/var/lib/rpm', '/var/cache/dnf', '/var/lib/dnf'])
execute_pre_post_process(self.d, rpm_post_process_cmds)
- self._log_check()
-
if self.inc_rpm_image_gen == "1":
self.pm.backup_packaging_data()
- self.pm.rpm_setup_smart_target_config()
-
if self.progress_reporter:
self.progress_reporter.next_stage()
@@ -512,35 +488,21 @@ class RpmRootfs(Rootfs):
self._log_check_warn()
self._log_check_error()
- def _handle_intercept_failure(self, registered_pkgs):
- rpm_postinsts_dir = self.image_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
- bb.utils.mkdirhier(rpm_postinsts_dir)
-
- # Save the package postinstalls in /etc/rpm-postinsts
- for pkg in registered_pkgs.split():
- self.pm.save_rpmpostinst(pkg)
-
def _cleanup(self):
- # during the execution of postprocess commands, rpm is called several
- # times to get the files installed, dependencies, etc. This creates the
- # __db.00* (Berkeley DB files that hold locks, rpm specific environment
- # settings, etc.), that should not get into the final rootfs
- self.pm.unlock_rpm_db()
- if os.path.isdir(self.pm.install_dir_path + "/tmp") and not os.listdir(self.pm.install_dir_path + "/tmp"):
- bb.utils.remove(self.pm.install_dir_path + "/tmp", True)
- if os.path.isdir(self.pm.install_dir_path) and not os.listdir(self.pm.install_dir_path):
- bb.utils.remove(self.pm.install_dir_path, True)
+ if bb.utils.contains("IMAGE_FEATURES", "package-management", True, False, self.d):
+ self.pm._invoke_dnf(["clean", "all"])
+
class DpkgOpkgRootfs(Rootfs):
- def __init__(self, d, progress_reporter=None):
- super(DpkgOpkgRootfs, self).__init__(d, progress_reporter)
+ def __init__(self, d, progress_reporter=None, logcatcher=None):
+ super(DpkgOpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
def _get_pkgs_postinsts(self, status_file):
def _get_pkg_depends_list(pkg_depends):
pkg_depends_list = []
# filter version requirements like libc (>= 1.1)
for dep in pkg_depends.split(', '):
- m_dep = re.match("^(.*) \(.*\)$", dep)
+ m_dep = re.match(r"^(.*) \(.*\)$", dep)
if m_dep:
dep = m_dep.group(1)
pkg_depends_list.append(dep)
@@ -556,21 +518,33 @@ class DpkgOpkgRootfs(Rootfs):
data = status.read()
status.close()
for line in data.split('\n'):
- m_pkg = re.match("^Package: (.*)", line)
- m_status = re.match("^Status:.*unpacked", line)
- m_depends = re.match("^Depends: (.*)", line)
+ m_pkg = re.match(r"^Package: (.*)", line)
+ m_status = re.match(r"^Status:.*unpacked", line)
+ m_depends = re.match(r"^Depends: (.*)", line)
+ #Only one of m_pkg, m_status or m_depends is not None at time
+ #If m_pkg is not None, we started a new package
if m_pkg is not None:
- if pkg_name and pkg_status_match:
- pkgs[pkg_name] = _get_pkg_depends_list(pkg_depends)
-
+ #Get Package name
pkg_name = m_pkg.group(1)
+ #Make sure we reset other variables
pkg_status_match = False
pkg_depends = ""
elif m_status is not None:
+ #New status matched
pkg_status_match = True
elif m_depends is not None:
+ #New depends macthed
pkg_depends = m_depends.group(1)
+ else:
+ pass
+
+ #Now check if we can process package depends and postinst
+ if "" != pkg_name and pkg_status_match:
+ pkgs[pkg_name] = _get_pkg_depends_list(pkg_depends)
+ else:
+ #Not enough information
+ pass
# remove package dependencies not in postinsts
pkg_names = list(pkgs.keys())
@@ -600,7 +574,7 @@ class DpkgOpkgRootfs(Rootfs):
pkg_list = []
pkgs = None
- if not self.d.getVar('PACKAGE_INSTALL', True).strip():
+ if not self.d.getVar('PACKAGE_INSTALL').strip():
bb.note("Building empty image")
else:
pkgs = self._get_pkgs_postinsts(status_file)
@@ -616,6 +590,9 @@ class DpkgOpkgRootfs(Rootfs):
return pkg_list
def _save_postinsts_common(self, dst_postinst_dir, src_postinst_dir):
+ if bb.utils.contains("IMAGE_FEATURES", "package-management",
+ True, False, self.d):
+ return
num = 0
for p in self._get_delayed_postinsts():
bb.utils.mkdirhier(dst_postinst_dir)
@@ -627,8 +604,8 @@ class DpkgOpkgRootfs(Rootfs):
num += 1
class DpkgRootfs(DpkgOpkgRootfs):
- def __init__(self, d, manifest_dir, progress_reporter=None):
- super(DpkgRootfs, self).__init__(d, progress_reporter)
+ def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+ super(DpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
self.log_check_regex = '^E:'
self.log_check_expected_regexes = \
[
@@ -636,17 +613,17 @@ class DpkgRootfs(DpkgOpkgRootfs):
]
bb.utils.remove(self.image_rootfs, True)
- bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS', True), True)
+ bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
self.manifest = DpkgManifest(d, manifest_dir)
- self.pm = DpkgPM(d, d.getVar('IMAGE_ROOTFS', True),
- d.getVar('PACKAGE_ARCHS', True),
- d.getVar('DPKG_ARCH', True))
+ self.pm = DpkgPM(d, d.getVar('IMAGE_ROOTFS'),
+ d.getVar('PACKAGE_ARCHS'),
+ d.getVar('DPKG_ARCH'))
def _create(self):
pkgs_to_install = self.manifest.parse_initial_manifest()
- deb_pre_process_cmds = self.d.getVar('DEB_PREPROCESS_COMMANDS', True)
- deb_post_process_cmds = self.d.getVar('DEB_POSTPROCESS_COMMANDS', True)
+ deb_pre_process_cmds = self.d.getVar('DEB_PREPROCESS_COMMANDS')
+ deb_post_process_cmds = self.d.getVar('DEB_POSTPROCESS_COMMANDS')
alt_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/alternatives")
bb.utils.mkdirhier(alt_dir)
@@ -670,6 +647,7 @@ class DpkgRootfs(DpkgOpkgRootfs):
if pkg_type in pkgs_to_install:
self.pm.install(pkgs_to_install[pkg_type],
[False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
+ self.pm.fix_broken_dependencies()
if self.progress_reporter:
# Don't support attemptonly, so skip that
@@ -707,9 +685,6 @@ class DpkgRootfs(DpkgOpkgRootfs):
src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/info")
return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
- def _handle_intercept_failure(self, registered_pkgs):
- self.pm.mark_packages("unpacked", registered_pkgs.split())
-
def _log_check(self):
self._log_check_warn()
self._log_check_error()
@@ -719,15 +694,15 @@ class DpkgRootfs(DpkgOpkgRootfs):
class OpkgRootfs(DpkgOpkgRootfs):
- def __init__(self, d, manifest_dir, progress_reporter=None):
- super(OpkgRootfs, self).__init__(d, progress_reporter)
+ def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+ super(OpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
self.log_check_regex = '(exit 1|Collected errors)'
self.manifest = OpkgManifest(d, manifest_dir)
- self.opkg_conf = self.d.getVar("IPKGCONF_TARGET", True)
- self.pkg_archs = self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True)
+ self.opkg_conf = self.d.getVar("IPKGCONF_TARGET")
+ self.pkg_archs = self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS")
- self.inc_opkg_image_gen = self.d.getVar('INC_IPK_IMAGE_GEN', True) or ""
+ self.inc_opkg_image_gen = self.d.getVar('INC_IPK_IMAGE_GEN') or ""
if self._remove_old_rootfs():
bb.utils.remove(self.image_rootfs, True)
self.pm = OpkgPM(d,
@@ -741,7 +716,7 @@ class OpkgRootfs(DpkgOpkgRootfs):
self.pkg_archs)
self.pm.recover_packaging_data()
- bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS', True), True)
+ bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
def _prelink_file(self, root_dir, filename):
bb.note('prelink %s in %s' % (filename, root_dir))
@@ -776,15 +751,16 @@ class OpkgRootfs(DpkgOpkgRootfs):
if filecmp.cmp(f1, f2):
return True
- if self.image_rootfs not in f1:
- self._prelink_file(f1.replace(key, ''), f1)
+ if bb.data.inherits_class('image-prelink', self.d):
+ if self.image_rootfs not in f1:
+ self._prelink_file(f1.replace(key, ''), f1)
- if self.image_rootfs not in f2:
- self._prelink_file(f2.replace(key, ''), f2)
+ if self.image_rootfs not in f2:
+ self._prelink_file(f2.replace(key, ''), f2)
- # Both of them are prelinked
- if filecmp.cmp(f1, f2):
- return True
+ # Both of them are prelinked
+ if filecmp.cmp(f1, f2):
+ return True
# Not equal
return False
@@ -796,11 +772,11 @@ class OpkgRootfs(DpkgOpkgRootfs):
"""
def _multilib_sanity_test(self, dirs):
- allow_replace = self.d.getVar("MULTILIBRE_ALLOW_REP", True)
+ allow_replace = self.d.getVar("MULTILIBRE_ALLOW_REP")
if allow_replace is None:
allow_replace = ""
- allow_rep = re.compile(re.sub("\|$", "", allow_replace))
+ allow_rep = re.compile(re.sub(r"\|$", r"", allow_replace))
error_prompt = "Multilib check error:"
files = {}
@@ -828,12 +804,12 @@ class OpkgRootfs(DpkgOpkgRootfs):
files[key] = item
def _multilib_test_install(self, pkgs):
- ml_temp = self.d.getVar("MULTILIB_TEMP_ROOTFS", True)
+ ml_temp = self.d.getVar("MULTILIB_TEMP_ROOTFS")
bb.utils.mkdirhier(ml_temp)
dirs = [self.image_rootfs]
- for variant in self.d.getVar("MULTILIB_VARIANTS", True).split():
+ for variant in self.d.getVar("MULTILIB_VARIANTS").split():
ml_target_rootfs = os.path.join(ml_temp, variant)
bb.utils.remove(ml_target_rootfs, True)
@@ -841,7 +817,7 @@ class OpkgRootfs(DpkgOpkgRootfs):
ml_opkg_conf = os.path.join(ml_temp,
variant + "-" + os.path.basename(self.opkg_conf))
- ml_pm = OpkgPM(self.d, ml_target_rootfs, ml_opkg_conf, self.pkg_archs)
+ ml_pm = OpkgPM(self.d, ml_target_rootfs, ml_opkg_conf, self.pkg_archs, prepare_index=False)
ml_pm.update()
ml_pm.install(pkgs)
@@ -893,9 +869,9 @@ class OpkgRootfs(DpkgOpkgRootfs):
old_vars_list = open(vars_list_file, 'r+').read()
new_vars_list = '%s:%s:%s\n' % \
- ((self.d.getVar('BAD_RECOMMENDATIONS', True) or '').strip(),
- (self.d.getVar('NO_RECOMMENDATIONS', True) or '').strip(),
- (self.d.getVar('PACKAGE_EXCLUDE', True) or '').strip())
+ ((self.d.getVar('BAD_RECOMMENDATIONS') or '').strip(),
+ (self.d.getVar('NO_RECOMMENDATIONS') or '').strip(),
+ (self.d.getVar('PACKAGE_EXCLUDE') or '').strip())
open(vars_list_file, 'w+').write(new_vars_list)
if old_vars_list != new_vars_list:
@@ -905,12 +881,11 @@ class OpkgRootfs(DpkgOpkgRootfs):
def _create(self):
pkgs_to_install = self.manifest.parse_initial_manifest()
- opkg_pre_process_cmds = self.d.getVar('OPKG_PREPROCESS_COMMANDS', True)
- opkg_post_process_cmds = self.d.getVar('OPKG_POSTPROCESS_COMMANDS', True)
+ opkg_pre_process_cmds = self.d.getVar('OPKG_PREPROCESS_COMMANDS')
+ opkg_post_process_cmds = self.d.getVar('OPKG_POSTPROCESS_COMMANDS')
- # update PM index files, unless users provide their own feeds
- if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") != "1":
- self.pm.write_index()
+ # update PM index files
+ self.pm.write_index()
execute_pre_post_process(self.d, opkg_pre_process_cmds)
@@ -921,8 +896,6 @@ class OpkgRootfs(DpkgOpkgRootfs):
self.pm.update()
- self.pm.handle_bad_recommendations()
-
if self.progress_reporter:
self.progress_reporter.next_stage()
@@ -951,7 +924,9 @@ class OpkgRootfs(DpkgOpkgRootfs):
if self.progress_reporter:
self.progress_reporter.next_stage()
- self._setup_dbg_rootfs(['/etc', '/var/lib/opkg', '/usr/lib/ssl'])
+ opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
+ opkg_dir = os.path.join(opkg_lib_dir, 'opkg')
+ self._setup_dbg_rootfs([opkg_dir])
execute_pre_post_process(self.d, opkg_post_process_cmds)
@@ -967,7 +942,7 @@ class OpkgRootfs(DpkgOpkgRootfs):
def _get_delayed_postinsts(self):
status_file = os.path.join(self.image_rootfs,
- self.d.getVar('OPKGLIBDIR', True).strip('/'),
+ self.d.getVar('OPKGLIBDIR').strip('/'),
"opkg", "status")
return self._get_delayed_postinsts_common(status_file)
@@ -976,9 +951,6 @@ class OpkgRootfs(DpkgOpkgRootfs):
src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/info")
return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
- def _handle_intercept_failure(self, registered_pkgs):
- self.pm.mark_packages("unpacked", registered_pkgs.split())
-
def _log_check(self):
self._log_check_warn()
self._log_check_error()
@@ -992,20 +964,20 @@ def get_class_for_type(imgtype):
"deb": DpkgRootfs}[imgtype]
def variable_depends(d, manifest_dir=None):
- img_type = d.getVar('IMAGE_PKGTYPE', True)
+ img_type = d.getVar('IMAGE_PKGTYPE')
cls = get_class_for_type(img_type)
return cls._depends_list()
-def create_rootfs(d, manifest_dir=None, progress_reporter=None):
+def create_rootfs(d, manifest_dir=None, progress_reporter=None, logcatcher=None):
env_bkp = os.environ.copy()
- img_type = d.getVar('IMAGE_PKGTYPE', True)
+ img_type = d.getVar('IMAGE_PKGTYPE')
if img_type == "rpm":
- RpmRootfs(d, manifest_dir, progress_reporter).create()
+ RpmRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
elif img_type == "ipk":
- OpkgRootfs(d, manifest_dir, progress_reporter).create()
+ OpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
elif img_type == "deb":
- DpkgRootfs(d, manifest_dir, progress_reporter).create()
+ DpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
os.environ.clear()
os.environ.update(env_bkp)
@@ -1013,13 +985,13 @@ def create_rootfs(d, manifest_dir=None, progress_reporter=None):
def image_list_installed_packages(d, rootfs_dir=None):
if not rootfs_dir:
- rootfs_dir = d.getVar('IMAGE_ROOTFS', True)
+ rootfs_dir = d.getVar('IMAGE_ROOTFS')
- img_type = d.getVar('IMAGE_PKGTYPE', True)
+ img_type = d.getVar('IMAGE_PKGTYPE')
if img_type == "rpm":
return RpmPkgsList(d, rootfs_dir).list_pkgs()
elif img_type == "ipk":
- return OpkgPkgsList(d, rootfs_dir, d.getVar("IPKGCONF_TARGET", True)).list_pkgs()
+ return OpkgPkgsList(d, rootfs_dir, d.getVar("IPKGCONF_TARGET")).list_pkgs()
elif img_type == "deb":
return DpkgPkgsList(d, rootfs_dir).list_pkgs()
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index c74525f929..d02a274812 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from abc import ABCMeta, abstractmethod
from oe.utils import execute_pre_post_process
from oe.manifest import *
@@ -7,20 +11,19 @@ import shutil
import glob
import traceback
-
class Sdk(object, metaclass=ABCMeta):
def __init__(self, d, manifest_dir):
self.d = d
- self.sdk_output = self.d.getVar('SDK_OUTPUT', True)
- self.sdk_native_path = self.d.getVar('SDKPATHNATIVE', True).strip('/')
- self.target_path = self.d.getVar('SDKTARGETSYSROOT', True).strip('/')
- self.sysconfdir = self.d.getVar('sysconfdir', True).strip('/')
+ self.sdk_output = self.d.getVar('SDK_OUTPUT')
+ self.sdk_native_path = self.d.getVar('SDKPATHNATIVE').strip('/')
+ self.target_path = self.d.getVar('SDKTARGETSYSROOT').strip('/')
+ self.sysconfdir = self.d.getVar('sysconfdir').strip('/')
self.sdk_target_sysroot = os.path.join(self.sdk_output, self.target_path)
self.sdk_host_sysroot = self.sdk_output
if manifest_dir is None:
- self.manifest_dir = self.d.getVar("SDK_DIR", True)
+ self.manifest_dir = self.d.getVar("SDK_DIR")
else:
self.manifest_dir = manifest_dir
@@ -40,12 +43,12 @@ class Sdk(object, metaclass=ABCMeta):
# Don't ship any libGL in the SDK
self.remove(os.path.join(self.sdk_output, self.sdk_native_path,
- self.d.getVar('libdir_nativesdk', True).strip('/'),
+ self.d.getVar('libdir_nativesdk').strip('/'),
"libGL*"))
# Fix or remove broken .la files
self.remove(os.path.join(self.sdk_output, self.sdk_native_path,
- self.d.getVar('libdir_nativesdk', True).strip('/'),
+ self.d.getVar('libdir_nativesdk').strip('/'),
"*.la"))
# Link the ld.so.cache file into the hosts filesystem
@@ -54,7 +57,7 @@ class Sdk(object, metaclass=ABCMeta):
self.mkdirhier(os.path.dirname(link_name))
os.symlink("/etc/ld.so.cache", link_name)
- execute_pre_post_process(self.d, self.d.getVar('SDK_POSTPROCESS_COMMAND', True))
+ execute_pre_post_process(self.d, self.d.getVar('SDK_POSTPROCESS_COMMAND'))
def movefile(self, sourcefile, destdir):
try:
@@ -84,8 +87,31 @@ class Sdk(object, metaclass=ABCMeta):
bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc())
bb.warn("cannot remove SDK dir: %s" % path)
+ def install_locales(self, pm):
+ linguas = self.d.getVar("SDKIMAGE_LINGUAS")
+ if linguas:
+ import fnmatch
+ # Install the binary locales
+ if linguas == "all":
+ pm.install_glob("nativesdk-glibc-binary-localedata-*.utf-8", sdk=True)
+ else:
+ pm.install(["nativesdk-glibc-binary-localedata-%s.utf-8" % \
+ lang for lang in linguas.split()])
+ # Generate a locale archive of them
+ target_arch = self.d.getVar('SDK_ARCH')
+ rootfs = oe.path.join(self.sdk_host_sysroot, self.sdk_native_path)
+ localedir = oe.path.join(rootfs, self.d.getVar("libdir_nativesdk"), "locale")
+ generate_locale_archive(self.d, rootfs, target_arch, localedir)
+ # And now delete the binary locales
+ pkgs = fnmatch.filter(pm.list_installed(), "nativesdk-glibc-binary-localedata-*.utf-8")
+ pm.remove(pkgs)
+ else:
+ # No linguas so do nothing
+ pass
+
+
class RpmSdk(Sdk):
- def __init__(self, d, manifest_dir=None):
+ def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"):
super(RpmSdk, self).__init__(d, manifest_dir)
self.target_manifest = RpmManifest(d, self.manifest_dir,
@@ -93,36 +119,24 @@ class RpmSdk(Sdk):
self.host_manifest = RpmManifest(d, self.manifest_dir,
Manifest.MANIFEST_TYPE_SDK_HOST)
- target_providename = ['/bin/sh',
- '/bin/bash',
- '/usr/bin/env',
- '/usr/bin/perl',
- 'pkgconfig'
- ]
+ rpm_repo_workdir = "oe-sdk-repo"
+ if "sdk_ext" in d.getVar("BB_RUNTASK"):
+ rpm_repo_workdir = "oe-sdk-ext-repo"
self.target_pm = RpmPM(d,
self.sdk_target_sysroot,
- self.d.getVar('TARGET_VENDOR', True),
+ self.d.getVar('TARGET_VENDOR'),
'target',
- target_providename
+ rpm_repo_workdir=rpm_repo_workdir
)
- sdk_providename = ['/bin/sh',
- '/bin/bash',
- '/usr/bin/env',
- '/usr/bin/perl',
- 'pkgconfig',
- 'libGL.so()(64bit)',
- 'libGL.so'
- ]
-
self.host_pm = RpmPM(d,
self.sdk_host_sysroot,
- self.d.getVar('SDK_VENDOR', True),
+ self.d.getVar('SDK_VENDOR'),
'host',
- sdk_providename,
"SDK_PACKAGE_ARCHS",
- "SDK_OS"
+ "SDK_OS",
+ rpm_repo_workdir=rpm_repo_workdir
)
def _populate_sysroot(self, pm, manifest):
@@ -130,7 +144,6 @@ class RpmSdk(Sdk):
pm.create_configs()
pm.write_index()
- pm.dump_all_available_pkgs()
pm.update()
pkgs = []
@@ -146,20 +159,27 @@ class RpmSdk(Sdk):
pm.install(pkgs_attempt, True)
def _populate(self):
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
bb.note("Installing TARGET packages")
self._populate_sysroot(self.target_pm, self.target_manifest)
- self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY', True))
+ self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
- execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
+ self.target_pm.run_intercepts(populate_sdk='target')
+
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
self.target_pm.remove_packaging_data()
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
+ self.install_locales(self.host_pm)
+
+ self.host_pm.run_intercepts(populate_sdk='host')
- execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True))
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
self.host_pm.remove_packaging_data()
@@ -167,7 +187,7 @@ class RpmSdk(Sdk):
# Move host RPM library data
native_rpm_state_dir = os.path.join(self.sdk_output,
self.sdk_native_path,
- self.d.getVar('localstatedir_nativesdk', True).strip('/'),
+ self.d.getVar('localstatedir_nativesdk').strip('/'),
"lib",
"rpm"
)
@@ -188,7 +208,9 @@ class RpmSdk(Sdk):
True).strip('/'),
)
self.mkdirhier(native_sysconf_dir)
- for f in glob.glob(os.path.join(self.sdk_output, "etc", "*")):
+ for f in glob.glob(os.path.join(self.sdk_output, "etc", "rpm*")):
+ self.movefile(f, native_sysconf_dir)
+ for f in glob.glob(os.path.join(self.sdk_output, "etc", "dnf", "*")):
self.movefile(f, native_sysconf_dir)
self.remove(os.path.join(self.sdk_output, "etc"), True)
@@ -197,24 +219,30 @@ class OpkgSdk(Sdk):
def __init__(self, d, manifest_dir=None):
super(OpkgSdk, self).__init__(d, manifest_dir)
- self.target_conf = self.d.getVar("IPKGCONF_TARGET", True)
- self.host_conf = self.d.getVar("IPKGCONF_SDK", True)
+ self.target_conf = self.d.getVar("IPKGCONF_TARGET")
+ self.host_conf = self.d.getVar("IPKGCONF_SDK")
self.target_manifest = OpkgManifest(d, self.manifest_dir,
Manifest.MANIFEST_TYPE_SDK_TARGET)
self.host_manifest = OpkgManifest(d, self.manifest_dir,
Manifest.MANIFEST_TYPE_SDK_HOST)
+ ipk_repo_workdir = "oe-sdk-repo"
+ if "sdk_ext" in d.getVar("BB_RUNTASK"):
+ ipk_repo_workdir = "oe-sdk-ext-repo"
+
self.target_pm = OpkgPM(d, self.sdk_target_sysroot, self.target_conf,
- self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True))
+ self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS"),
+ ipk_repo_workdir=ipk_repo_workdir)
self.host_pm = OpkgPM(d, self.sdk_host_sysroot, self.host_conf,
- self.d.getVar("SDK_PACKAGE_ARCHS", True))
+ self.d.getVar("SDK_PACKAGE_ARCHS"),
+ ipk_repo_workdir=ipk_repo_workdir)
def _populate_sysroot(self, pm, manifest):
pkgs_to_install = manifest.parse_initial_manifest()
- if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") != "1":
+ if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS') or "") != "1":
pm.write_index()
pm.update()
@@ -225,20 +253,27 @@ class OpkgSdk(Sdk):
[False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
def _populate(self):
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
bb.note("Installing TARGET packages")
self._populate_sysroot(self.target_pm, self.target_manifest)
- self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY', True))
+ self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
- execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
+ self.target_pm.run_intercepts(populate_sdk='target')
+
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
self.target_pm.remove_packaging_data()
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
+ self.install_locales(self.host_pm)
+
+ self.host_pm.run_intercepts(populate_sdk='host')
- execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True))
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
self.host_pm.remove_packaging_data()
@@ -257,7 +292,7 @@ class OpkgSdk(Sdk):
os.path.basename(self.host_conf)), 0o644)
native_opkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path,
- self.d.getVar('localstatedir_nativesdk', True).strip('/'),
+ self.d.getVar('localstatedir_nativesdk').strip('/'),
"lib", "opkg")
self.mkdirhier(native_opkg_state_dir)
for f in glob.glob(os.path.join(self.sdk_output, "var", "lib", "opkg", "*")):
@@ -270,26 +305,32 @@ class DpkgSdk(Sdk):
def __init__(self, d, manifest_dir=None):
super(DpkgSdk, self).__init__(d, manifest_dir)
- self.target_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET", True), "apt")
- self.host_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET", True), "apt-sdk")
+ self.target_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET"), "apt")
+ self.host_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET"), "apt-sdk")
self.target_manifest = DpkgManifest(d, self.manifest_dir,
Manifest.MANIFEST_TYPE_SDK_TARGET)
self.host_manifest = DpkgManifest(d, self.manifest_dir,
Manifest.MANIFEST_TYPE_SDK_HOST)
+ deb_repo_workdir = "oe-sdk-repo"
+ if "sdk_ext" in d.getVar("BB_RUNTASK"):
+ deb_repo_workdir = "oe-sdk-ext-repo"
+
self.target_pm = DpkgPM(d, self.sdk_target_sysroot,
- self.d.getVar("PACKAGE_ARCHS", True),
- self.d.getVar("DPKG_ARCH", True),
- self.target_conf_dir)
+ self.d.getVar("PACKAGE_ARCHS"),
+ self.d.getVar("DPKG_ARCH"),
+ self.target_conf_dir,
+ deb_repo_workdir=deb_repo_workdir)
self.host_pm = DpkgPM(d, self.sdk_host_sysroot,
- self.d.getVar("SDK_PACKAGE_ARCHS", True),
- self.d.getVar("DEB_SDK_ARCH", True),
- self.host_conf_dir)
+ self.d.getVar("SDK_PACKAGE_ARCHS"),
+ self.d.getVar("DEB_SDK_ARCH"),
+ self.host_conf_dir,
+ deb_repo_workdir=deb_repo_workdir)
def _copy_apt_dir_to(self, dst_dir):
- staging_etcdir_native = self.d.getVar("STAGING_ETCDIR_NATIVE", True)
+ staging_etcdir_native = self.d.getVar("STAGING_ETCDIR_NATIVE")
self.remove(dst_dir, True)
@@ -307,12 +348,16 @@ class DpkgSdk(Sdk):
[False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
def _populate(self):
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
bb.note("Installing TARGET packages")
self._populate_sysroot(self.target_pm, self.target_manifest)
- self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY', True))
+ self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
+
+ self.target_pm.run_intercepts(populate_sdk='target')
- execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
@@ -321,8 +366,11 @@ class DpkgSdk(Sdk):
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
+ self.install_locales(self.host_pm)
- execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True))
+ self.host_pm.run_intercepts(populate_sdk='host')
+
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path,
"etc", "apt"))
@@ -341,26 +389,26 @@ class DpkgSdk(Sdk):
def sdk_list_installed_packages(d, target, rootfs_dir=None):
if rootfs_dir is None:
- sdk_output = d.getVar('SDK_OUTPUT', True)
- target_path = d.getVar('SDKTARGETSYSROOT', True).strip('/')
+ sdk_output = d.getVar('SDK_OUTPUT')
+ target_path = d.getVar('SDKTARGETSYSROOT').strip('/')
rootfs_dir = [sdk_output, os.path.join(sdk_output, target_path)][target is True]
- img_type = d.getVar('IMAGE_PKGTYPE', True)
+ img_type = d.getVar('IMAGE_PKGTYPE')
if img_type == "rpm":
arch_var = ["SDK_PACKAGE_ARCHS", None][target is True]
os_var = ["SDK_OS", None][target is True]
- return RpmPkgsList(d, rootfs_dir, arch_var, os_var).list_pkgs()
+ return RpmPkgsList(d, rootfs_dir).list_pkgs()
elif img_type == "ipk":
conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_TARGET"][target is True]
- return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var, True)).list_pkgs()
+ return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var)).list_pkgs()
elif img_type == "deb":
return DpkgPkgsList(d, rootfs_dir).list_pkgs()
def populate_sdk(d, manifest_dir=None):
env_bkp = os.environ.copy()
- img_type = d.getVar('IMAGE_PKGTYPE', True)
+ img_type = d.getVar('IMAGE_PKGTYPE')
if img_type == "rpm":
RpmSdk(d, manifest_dir).populate()
elif img_type == "ipk":
@@ -371,5 +419,24 @@ def populate_sdk(d, manifest_dir=None):
os.environ.clear()
os.environ.update(env_bkp)
+def get_extra_sdkinfo(sstate_dir):
+ """
+ This function is going to be used for generating the target and host manifest files packages of eSDK.
+ """
+ import math
+
+ extra_info = {}
+ extra_info['tasksizes'] = {}
+ extra_info['filesizes'] = {}
+ for root, _, files in os.walk(sstate_dir):
+ for fn in files:
+ if fn.endswith('.tgz'):
+ fsize = int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024))
+ task = fn.rsplit(':',1)[1].split('_',1)[1].split(',')[0]
+ origtotal = extra_info['tasksizes'].get(task, 0)
+ extra_info['tasksizes'][task] = origtotal + fsize
+ extra_info['filesizes'][fn] = fsize
+ return extra_info
+
if __name__ == "__main__":
pass
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 8224e3a12e..7cecb59d8e 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -1,4 +1,8 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import bb.siggen
+import oe
def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
# Return True if we should keep the dependency, False to drop it
@@ -20,19 +24,22 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
def isImage(fn):
return "/image.bbclass" in " ".join(dataCache.inherits[fn])
- # Always include our own inter-task dependencies
+ # (Almost) always include our own inter-task dependencies.
+ # The exception is the special do_kernel_configme->do_unpack_and_patch
+ # dependency from archiver.bbclass.
if recipename == depname:
+ if task == "do_kernel_configme" and dep.endswith(".do_unpack_and_patch"):
+ return False
return True
- # Quilt (patch application) changing isn't likely to affect anything
- excludelist = ['quilt-native', 'subversion-native', 'git-native']
- if depname in excludelist and recipename != depname:
- return False
-
# Exclude well defined recipe->dependency
if "%s->%s" % (recipename, depname) in siggen.saferecipedeps:
return False
+ # Check for special wildcard
+ if "*->%s" % depname in siggen.saferecipedeps and recipename != depname:
+ return False
+
# Don't change native/cross/nativesdk recipe dependencies any further
if isNative(recipename) or isCross(recipename) or isNativeSDK(recipename):
return True
@@ -41,7 +48,7 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
# allarch packagegroups are assumed to have well behaved names which don't change between architecures/tunes
if isPackageGroup(fn) and isAllArch(fn) and not isNative(depname):
- return False
+ return False
# Exclude well defined machine specific configurations which don't change ABI
if depname in siggen.abisaferecipes and not isImage(fn):
@@ -52,7 +59,7 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
# is machine specific.
# Therefore if we're not a kernel or a module recipe (inheriting the kernel classes)
# and we reccomend a kernel-module, we exclude the dependency.
- depfn = dep.rsplit(".", 1)[0]
+ depfn = dep.rsplit(":", 1)[0]
if dataCache and isKernel(depfn) and not isKernel(fn):
for pkg in dataCache.runrecs[fn]:
if " ".join(dataCache.runrecs[fn][pkg]).find("kernel-module-") != -1:
@@ -63,10 +70,10 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
def sstate_lockedsigs(d):
sigs = {}
- types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES", True) or "").split()
+ types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES") or "").split()
for t in types:
siggen_lockedsigs_var = "SIGGEN_LOCKEDSIGS_%s" % t
- lockedsigs = (d.getVar(siggen_lockedsigs_var, True) or "").split()
+ lockedsigs = (d.getVar(siggen_lockedsigs_var) or "").split()
for ls in lockedsigs:
pn, task, h = ls.split(":", 2)
if pn not in sigs:
@@ -77,24 +84,23 @@ def sstate_lockedsigs(d):
class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
name = "OEBasic"
def init_rundepcheck(self, data):
- self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE", True) or "").split()
- self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", True) or "").split()
+ self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
+ self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
pass
def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None):
return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache)
-class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
- name = "OEBasicHash"
+class SignatureGeneratorOEBasicHashMixIn(object):
def init_rundepcheck(self, data):
- self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE", True) or "").split()
- self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", True) or "").split()
+ self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
+ self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
self.lockedsigs = sstate_lockedsigs(data)
self.lockedhashes = {}
self.lockedpnmap = {}
self.lockedhashfn = {}
- self.machine = data.getVar("MACHINE", True)
+ self.machine = data.getVar("MACHINE")
self.mismatch_msgs = []
- self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES", True) or
+ self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES") or
"").split()
self.unlockedrecipes = { k: "" for k in self.unlockedrecipes }
pass
@@ -122,12 +128,11 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache)
def get_taskdata(self):
- data = super(bb.siggen.SignatureGeneratorBasicHash, self).get_taskdata()
- return (data, self.lockedpnmap, self.lockedhashfn)
+ return (self.lockedpnmap, self.lockedhashfn, self.lockedhashes) + super().get_taskdata()
def set_taskdata(self, data):
- coredata, self.lockedpnmap, self.lockedhashfn = data
- super(bb.siggen.SignatureGeneratorBasicHash, self).set_taskdata(coredata)
+ self.lockedpnmap, self.lockedhashfn, self.lockedhashes = data[:3]
+ super().set_taskdata(data[3:])
def dump_sigs(self, dataCache, options):
sigfile = os.getcwd() + "/locked-sigs.inc"
@@ -135,8 +140,16 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
self.dump_lockedsigs(sigfile)
return super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigs(dataCache, options)
- def get_taskhash(self, fn, task, deps, dataCache):
- h = super(bb.siggen.SignatureGeneratorBasicHash, self).get_taskhash(fn, task, deps, dataCache)
+ def get_taskhash(self, tid, deps, dataCache):
+ if tid in self.lockedhashes:
+ if self.lockedhashes[tid]:
+ return self.lockedhashes[tid]
+ else:
+ return super().get_taskhash(tid, deps, dataCache)
+
+ h = super().get_taskhash(tid, deps, dataCache)
+
+ (mc, _, task, fn) = bb.runqueue.split_tid_mcfn(tid)
recipename = dataCache.pkg_fn[fn]
self.lockedpnmap[fn] = recipename
@@ -147,90 +160,105 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
unlocked = True
else:
def recipename_from_dep(dep):
- # The dep entry will look something like
- # /path/path/recipename.bb.task, virtual:native:/p/foo.bb.task,
- # ...
- fn = dep.rsplit('.', 1)[0]
+ fn = bb.runqueue.fn_from_tid(dep)
return dataCache.pkg_fn[fn]
# If any unlocked recipe is in the direct dependencies then the
# current recipe should be unlocked as well.
- depnames = [ recipename_from_dep(x) for x in deps ]
+ depnames = [ recipename_from_dep(x) for x in deps if mc == bb.runqueue.mc_from_tid(x)]
if any(x in y for y in depnames for x in self.unlockedrecipes):
self.unlockedrecipes[recipename] = ''
unlocked = True
if not unlocked and recipename in self.lockedsigs:
if task in self.lockedsigs[recipename]:
- k = fn + "." + task
h_locked = self.lockedsigs[recipename][task][0]
var = self.lockedsigs[recipename][task][1]
- self.lockedhashes[k] = h_locked
- self.taskhash[k] = h_locked
+ self.lockedhashes[tid] = h_locked
+ unihash = super().get_unihash(tid)
+ self.taskhash[tid] = h_locked
#bb.warn("Using %s %s %s" % (recipename, task, h))
- if h != h_locked:
+ if h != h_locked and h_locked != unihash:
self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s'
% (recipename, task, h, h_locked, var))
return h_locked
+
+ self.lockedhashes[tid] = False
#bb.warn("%s %s %s" % (recipename, task, h))
return h
+ def get_unihash(self, tid):
+ if tid in self.lockedhashes and self.lockedhashes[tid]:
+ return self.lockedhashes[tid]
+ return super().get_unihash(tid)
+
def dump_sigtask(self, fn, task, stampbase, runtime):
- k = fn + "." + task
- if k in self.lockedhashes:
+ tid = fn + ":" + task
+ if tid in self.lockedhashes and self.lockedhashes[tid]:
return
super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, stampbase, runtime)
def dump_lockedsigs(self, sigfile, taskfilter=None):
types = {}
- for k in self.runtaskdeps:
+ for tid in self.runtaskdeps:
if taskfilter:
- if not k in taskfilter:
+ if not tid in taskfilter:
continue
- fn = k.rsplit(".",1)[0]
+ fn = bb.runqueue.fn_from_tid(tid)
t = self.lockedhashfn[fn].split(" ")[1].split(":")[5]
t = 't-' + t.replace('_', '-')
if t not in types:
types[t] = []
- types[t].append(k)
+ types[t].append(tid)
with open(sigfile, "w") as f:
- for t in types:
+ l = sorted(types)
+ for t in l:
f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % t)
types[t].sort()
- sortedk = sorted(types[t], key=lambda k: self.lockedpnmap[k.rsplit(".",1)[0]])
- for k in sortedk:
- fn = k.rsplit(".",1)[0]
- task = k.rsplit(".",1)[1]
- if k not in self.taskhash:
+ sortedtid = sorted(types[t], key=lambda tid: self.lockedpnmap[bb.runqueue.fn_from_tid(tid)])
+ for tid in sortedtid:
+ (_, _, task, fn) = bb.runqueue.split_tid_mcfn(tid)
+ if tid not in self.taskhash:
continue
- f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[k] + " \\\n")
+ f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n")
f.write(' "\n')
- f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(list(types.keys()))))
+ f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l)))
- def checkhashes(self, missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d):
+ def dump_siglist(self, sigfile):
+ with open(sigfile, "w") as f:
+ tasks = []
+ for taskitem in self.taskhash:
+ (fn, task) = taskitem.rsplit(":", 1)
+ pn = self.lockedpnmap[fn]
+ tasks.append((pn, task, fn, self.taskhash[taskitem]))
+ for (pn, task, fn, taskhash) in sorted(tasks):
+ f.write('%s:%s %s %s\n' % (pn, task, fn, taskhash))
+
+ def checkhashes(self, sq_data, missed, found, d):
warn_msgs = []
error_msgs = []
sstate_missing_msgs = []
- for task in range(len(sq_fn)):
- if task not in ret:
+ for tid in sq_data['hash']:
+ if tid not in found:
for pn in self.lockedsigs:
- if sq_hash[task] in iter(self.lockedsigs[pn].values()):
- if sq_task[task] == 'do_shared_workdir':
+ taskname = bb.runqueue.taskname_from_tid(tid)
+ if sq_data['hash'][tid] in iter(self.lockedsigs[pn].values()):
+ if taskname == 'do_shared_workdir':
continue
sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
- % (pn, sq_task[task], sq_hash[task]))
+ % (pn, taskname, sq_data['hash'][tid]))
- checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK", True)
+ checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK")
if checklevel == 'warn':
warn_msgs += self.mismatch_msgs
elif checklevel == 'error':
error_msgs += self.mismatch_msgs
- checklevel = d.getVar("SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK", True)
+ checklevel = d.getVar("SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK")
if checklevel == 'warn':
warn_msgs += sstate_missing_msgs
elif checklevel == 'error':
@@ -241,10 +269,25 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
if error_msgs:
bb.fatal("\n".join(error_msgs))
+class SignatureGeneratorOEBasicHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorBasicHash):
+ name = "OEBasicHash"
+
+class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorUniHashMixIn, bb.siggen.SignatureGeneratorBasicHash):
+ name = "OEEquivHash"
+
+ def init_rundepcheck(self, data):
+ super().init_rundepcheck(data)
+ self.server = data.getVar('BB_HASHSERVE')
+ if not self.server:
+ bb.fatal("OEEquivHash requires BB_HASHSERVE to be set")
+ self.method = data.getVar('SSTATE_HASHEQUIV_METHOD')
+ if not self.method:
+ bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set")
# Insert these classes into siggen's namespace so it can see and select them
bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic
bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash
+bb.siggen.SignatureGeneratorOEEquivHash = SignatureGeneratorOEEquivHash
def find_siginfo(pn, taskname, taskhashlist, d):
@@ -253,20 +296,24 @@ def find_siginfo(pn, taskname, taskhashlist, d):
import fnmatch
import glob
- if taskhashlist:
- hashfiles = {}
-
if not taskname:
# We have to derive pn and taskname
key = pn
- splitit = key.split('.bb.')
+ splitit = key.split('.bb:')
taskname = splitit[1]
pn = os.path.basename(splitit[0]).split('_')[0]
if key.startswith('virtual:native:'):
pn = pn + '-native'
+ hashfiles = {}
filedates = {}
+ def get_hashval(siginfo):
+ if siginfo.endswith('.siginfo'):
+ return siginfo.rpartition(':')[2].partition('_')[0]
+ else:
+ return siginfo.rpartition('.')[2]
+
# First search in stamps dir
localdata = d.createCopy()
localdata.setVar('MULTIMACH_TARGET_SYS', '*')
@@ -274,7 +321,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
localdata.setVar('PV', '*')
localdata.setVar('PR', '*')
localdata.setVar('EXTENDPE', '')
- stamp = localdata.getVar('STAMP', True)
+ stamp = localdata.getVar('STAMP')
if pn.startswith("gcc-source"):
# gcc-source shared workdir is a special case :(
stamp = localdata.expand("${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}")
@@ -296,10 +343,12 @@ def find_siginfo(pn, taskname, taskhashlist, d):
filedates[fullpath] = os.stat(fullpath).st_mtime
except OSError:
continue
+ hashval = get_hashval(fullpath)
+ hashfiles[hashval] = fullpath
if not taskhashlist or (len(filedates) < 2 and not foundall):
# That didn't work, look in sstate-cache
- hashes = taskhashlist or ['*']
+ hashes = taskhashlist or ['?' * 64]
localdata = bb.data.createCopy(d)
for hashval in hashes:
localdata.setVar('PACKAGE_ARCH', '*')
@@ -309,30 +358,25 @@ def find_siginfo(pn, taskname, taskhashlist, d):
localdata.setVar('PV', '*')
localdata.setVar('PR', '*')
localdata.setVar('BB_TASKHASH', hashval)
- swspec = localdata.getVar('SSTATE_SWSPEC', True)
+ swspec = localdata.getVar('SSTATE_SWSPEC')
if taskname in ['do_fetch', 'do_unpack', 'do_patch', 'do_populate_lic', 'do_preconfigure'] and swspec:
localdata.setVar('SSTATE_PKGSPEC', '${SSTATE_SWSPEC}')
elif pn.endswith('-native') or "-cross-" in pn or "-crosssdk-" in pn:
localdata.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
sstatename = taskname[3:]
- filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG', True), sstatename)
+ filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG'), sstatename)
- if hashval != '*':
- sstatedir = "%s/%s" % (d.getVar('SSTATE_DIR', True), hashval[:2])
- else:
- sstatedir = d.getVar('SSTATE_DIR', True)
-
- for root, dirs, files in os.walk(sstatedir):
- for fn in files:
- fullpath = os.path.join(root, fn)
- if fnmatch.fnmatch(fullpath, filespec):
- if taskhashlist:
- hashfiles[hashval] = fullpath
- else:
- try:
- filedates[fullpath] = os.stat(fullpath).st_mtime
- except:
- continue
+ matchedfiles = glob.glob(filespec)
+ for fullpath in matchedfiles:
+ actual_hashval = get_hashval(fullpath)
+ if actual_hashval in hashfiles:
+ continue
+ hashfiles[hashval] = fullpath
+ if not taskhashlist:
+ try:
+ filedates[fullpath] = os.stat(fullpath).st_mtime
+ except:
+ continue
if taskhashlist:
return hashfiles
@@ -348,7 +392,176 @@ def sstate_get_manifest_filename(task, d):
Also returns the datastore that can be used to query related variables.
"""
d2 = d.createCopy()
- extrainf = d.getVarFlag("do_" + task, 'stamp-extra-info', True)
+ extrainf = d.getVarFlag("do_" + task, 'stamp-extra-info')
if extrainf:
d2.setVar("SSTATE_MANMACH", extrainf)
return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2)
+
+def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
+ d2 = d
+ variant = ''
+ curr_variant = ''
+ if d.getVar("BBEXTENDCURR") == "multilib":
+ curr_variant = d.getVar("BBEXTENDVARIANT")
+ if "virtclass-multilib" not in d.getVar("OVERRIDES"):
+ curr_variant = "invalid"
+ if taskdata2.startswith("virtual:multilib"):
+ variant = taskdata2.split(":")[2]
+ if curr_variant != variant:
+ if variant not in multilibcache:
+ multilibcache[variant] = oe.utils.get_multilib_datastore(variant, d)
+ d2 = multilibcache[variant]
+
+ if taskdata.endswith("-native"):
+ pkgarchs = ["${BUILD_ARCH}"]
+ elif taskdata.startswith("nativesdk-"):
+ pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"]
+ elif "-cross-canadian" in taskdata:
+ pkgarchs = ["${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}"]
+ elif "-cross-" in taskdata:
+ pkgarchs = ["${BUILD_ARCH}_${TARGET_ARCH}"]
+ elif "-crosssdk" in taskdata:
+ pkgarchs = ["${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"]
+ else:
+ pkgarchs = ['${MACHINE_ARCH}']
+ pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split()))
+ pkgarchs.append('allarch')
+ pkgarchs.append('${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}')
+
+ for pkgarch in pkgarchs:
+ manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.%s" % (pkgarch, taskdata, taskname))
+ if os.path.exists(manifest):
+ return manifest, d2
+ bb.warn("Manifest %s not found in %s (variant '%s')?" % (manifest, d2.expand(" ".join(pkgarchs)), variant))
+ return None, d2
+
+def OEOuthashBasic(path, sigfile, task, d):
+ """
+ Basic output hash function
+
+ Calculates the output hash of a task by hashing all output file metadata,
+ and file contents.
+ """
+ import hashlib
+ import stat
+ import pwd
+ import grp
+
+ def update_hash(s):
+ s = s.encode('utf-8')
+ h.update(s)
+ if sigfile:
+ sigfile.write(s)
+
+ h = hashlib.sha256()
+ prev_dir = os.getcwd()
+ include_owners = os.environ.get('PSEUDO_DISABLED') == '0'
+
+ try:
+ os.chdir(path)
+
+ update_hash("OEOuthashBasic\n")
+
+ # It is only currently useful to get equivalent hashes for things that
+ # can be restored from sstate. Since the sstate object is named using
+ # SSTATE_PKGSPEC and the task name, those should be included in the
+ # output hash calculation.
+ update_hash("SSTATE_PKGSPEC=%s\n" % d.getVar('SSTATE_PKGSPEC'))
+ update_hash("task=%s\n" % task)
+
+ for root, dirs, files in os.walk('.', topdown=True):
+ # Sort directories to ensure consistent ordering when recursing
+ dirs.sort()
+ files.sort()
+
+ def process(path):
+ s = os.lstat(path)
+
+ if stat.S_ISDIR(s.st_mode):
+ update_hash('d')
+ elif stat.S_ISCHR(s.st_mode):
+ update_hash('c')
+ elif stat.S_ISBLK(s.st_mode):
+ update_hash('b')
+ elif stat.S_ISSOCK(s.st_mode):
+ update_hash('s')
+ elif stat.S_ISLNK(s.st_mode):
+ update_hash('l')
+ elif stat.S_ISFIFO(s.st_mode):
+ update_hash('p')
+ else:
+ update_hash('-')
+
+ def add_perm(mask, on, off='-'):
+ if mask & s.st_mode:
+ update_hash(on)
+ else:
+ update_hash(off)
+
+ add_perm(stat.S_IRUSR, 'r')
+ add_perm(stat.S_IWUSR, 'w')
+ if stat.S_ISUID & s.st_mode:
+ add_perm(stat.S_IXUSR, 's', 'S')
+ else:
+ add_perm(stat.S_IXUSR, 'x')
+
+ add_perm(stat.S_IRGRP, 'r')
+ add_perm(stat.S_IWGRP, 'w')
+ if stat.S_ISGID & s.st_mode:
+ add_perm(stat.S_IXGRP, 's', 'S')
+ else:
+ add_perm(stat.S_IXGRP, 'x')
+
+ add_perm(stat.S_IROTH, 'r')
+ add_perm(stat.S_IWOTH, 'w')
+ if stat.S_ISVTX & s.st_mode:
+ update_hash('t')
+ else:
+ add_perm(stat.S_IXOTH, 'x')
+
+ if include_owners:
+ update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
+ update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
+
+ update_hash(" ")
+ if stat.S_ISBLK(s.st_mode) or stat.S_ISCHR(s.st_mode):
+ update_hash("%9s" % ("%d.%d" % (os.major(s.st_rdev), os.minor(s.st_rdev))))
+ else:
+ update_hash(" " * 9)
+
+ update_hash(" ")
+ if stat.S_ISREG(s.st_mode):
+ update_hash("%10d" % s.st_size)
+ else:
+ update_hash(" " * 10)
+
+ update_hash(" ")
+ fh = hashlib.sha256()
+ if stat.S_ISREG(s.st_mode):
+ # Hash file contents
+ with open(path, 'rb') as d:
+ for chunk in iter(lambda: d.read(4096), b""):
+ fh.update(chunk)
+ update_hash(fh.hexdigest())
+ else:
+ update_hash(" " * len(fh.hexdigest()))
+
+ update_hash(" %s" % path)
+
+ if stat.S_ISLNK(s.st_mode):
+ update_hash(" -> %s" % os.readlink(path))
+
+ update_hash("\n")
+
+ # Process this directory and all its child files
+ process(root)
+ for f in files:
+ if f == 'fixmepath':
+ continue
+ process(os.path.join(root, f))
+ finally:
+ os.chdir(prev_dir)
+
+ return h.hexdigest()
+
+
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 3901ad3f26..a1daa2bed6 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import logging
import oe.classutils
import shlex
@@ -11,7 +14,8 @@ class UnsupportedTerminal(Exception):
pass
class NoSupportedTerminals(Exception):
- pass
+ def __init__(self, terms):
+ self.terms = terms
class Registry(oe.classutils.ClassRegistry):
@@ -38,7 +42,7 @@ class Terminal(Popen, metaclass=Registry):
raise
def format_command(self, sh_cmd, title):
- fmt = {'title': title or 'Terminal', 'command': sh_cmd}
+ fmt = {'title': title or 'Terminal', 'command': sh_cmd, 'cwd': os.getcwd() }
if isinstance(self.command, str):
return shlex.split(self.command.format(**fmt))
else:
@@ -51,7 +55,7 @@ class XTerminal(Terminal):
raise UnsupportedTerminal(self.name)
class Gnome(XTerminal):
- command = 'gnome-terminal -t "{title}" -x {command}'
+ command = 'gnome-terminal -t "{title}" -- {command}'
priority = 2
def __init__(self, sh_cmd, title=None, env=None, d=None):
@@ -61,31 +65,10 @@ class Gnome(XTerminal):
# Once fixed on the gnome-terminal project, this should be removed.
if os.getenv('LC_ALL'): os.putenv('LC_ALL','')
- # We need to know when the command completes but gnome-terminal gives us no way
- # to do this. We therefore write the pid to a file using a "phonehome" wrapper
- # script, then monitor the pid until it exits. Thanks gnome!
- import tempfile
- pidfile = tempfile.NamedTemporaryFile(delete = False).name
- try:
- sh_cmd = "oe-gnome-terminal-phonehome " + pidfile + " " + sh_cmd
- XTerminal.__init__(self, sh_cmd, title, env, d)
- while os.stat(pidfile).st_size <= 0:
- continue
- with open(pidfile, "r") as f:
- pid = int(f.readline())
- finally:
- os.unlink(pidfile)
-
- import time
- while True:
- try:
- os.kill(pid, 0)
- time.sleep(0.1)
- except OSError:
- return
+ XTerminal.__init__(self, sh_cmd, title, env, d)
class Mate(XTerminal):
- command = 'mate-terminal -t "{title}" -x {command}'
+ command = 'mate-terminal --disable-factory -t "{title}" -x {command}'
priority = 2
class Xfce(XTerminal):
@@ -97,7 +80,7 @@ class Terminology(XTerminal):
priority = 2
class Konsole(XTerminal):
- command = 'konsole --nofork --workdir . -p tabtitle="{title}" -e {command}'
+ command = 'konsole --separate --workdir . -p tabtitle="{title}" -e {command}'
priority = 2
def __init__(self, sh_cmd, title=None, env=None, d=None):
@@ -106,6 +89,9 @@ class Konsole(XTerminal):
if vernum and LooseVersion(vernum) < '2.0.0':
# Konsole from KDE 3.x
self.command = 'konsole -T "{title}" -e {command}'
+ elif vernum and LooseVersion(vernum) < '16.08.1':
+ # Konsole pre 16.08.01 Has nofork
+ self.command = 'konsole --nofork --workdir . -p tabtitle="{title}" -e {command}'
XTerminal.__init__(self, sh_cmd, title, env, d)
class XTerm(XTerminal):
@@ -129,12 +115,12 @@ class Screen(Terminal):
bb.event.fire(bb.event.LogExecTTY(msg, "screen -r %s" % s_id,
0.5, 10), d)
else:
- logger.warn(msg)
+ logger.warning(msg)
class TmuxRunning(Terminal):
"""Open a new pane in the current running tmux window"""
name = 'tmux-running'
- command = 'tmux split-window "{command}"'
+ command = 'tmux split-window -c "{cwd}" "{command}"'
priority = 2.75
def __init__(self, sh_cmd, title=None, env=None, d=None):
@@ -152,7 +138,7 @@ class TmuxRunning(Terminal):
class TmuxNewWindow(Terminal):
"""Open a new window in the current running tmux session"""
name = 'tmux-new-window'
- command = 'tmux new-window -n "{title}" "{command}"'
+ command = 'tmux new-window -c "{cwd}" -n "{title}" "{command}"'
priority = 2.70
def __init__(self, sh_cmd, title=None, env=None, d=None):
@@ -166,7 +152,7 @@ class TmuxNewWindow(Terminal):
class Tmux(Terminal):
"""Start a new tmux session and window"""
- command = 'tmux new -d -s devshell -n devshell "{command}"'
+ command = 'tmux new -c "{cwd}" -d -s devshell -n devshell "{command}"'
priority = 0.75
def __init__(self, sh_cmd, title=None, env=None, d=None):
@@ -177,7 +163,7 @@ class Tmux(Terminal):
# devshells, if it's already there, add a new window to it.
window_name = 'devshell-%i' % os.getpid()
- self.command = 'tmux new -d -s {0} -n {0} "{{command}}"'.format(window_name)
+ self.command = 'tmux new -c "{{cwd}}" -d -s {0} -n {0} "{{command}}"'.format(window_name)
Terminal.__init__(self, sh_cmd, title, env, d)
attach_cmd = 'tmux att -t {0}'.format(window_name)
@@ -185,19 +171,19 @@ class Tmux(Terminal):
if d:
bb.event.fire(bb.event.LogExecTTY(msg, attach_cmd, 0.5, 10), d)
else:
- logger.warn(msg)
+ logger.warning(msg)
class Custom(Terminal):
command = 'false' # This is a placeholder
priority = 3
def __init__(self, sh_cmd, title=None, env=None, d=None):
- self.command = d and d.getVar('OE_TERMINAL_CUSTOMCMD', True)
+ self.command = d and d.getVar('OE_TERMINAL_CUSTOMCMD')
if self.command:
if not '{command}' in self.command:
self.command += ' {command}'
Terminal.__init__(self, sh_cmd, title, env, d)
- logger.warn('Custom terminal was started.')
+ logger.warning('Custom terminal was started.')
else:
logger.debug(1, 'No custom terminal (OE_TERMINAL_CUSTOMCMD) set')
raise UnsupportedTerminal('OE_TERMINAL_CUSTOMCMD not set')
@@ -206,6 +192,14 @@ class Custom(Terminal):
def prioritized():
return Registry.prioritized()
+def get_cmd_list():
+ terms = Registry.prioritized()
+ cmds = []
+ for term in terms:
+ if term.command:
+ cmds.append(term.command)
+ return cmds
+
def spawn_preferred(sh_cmd, title=None, env=None, d=None):
"""Spawn the first supported terminal, by priority"""
for terminal in prioritized():
@@ -215,7 +209,7 @@ def spawn_preferred(sh_cmd, title=None, env=None, d=None):
except UnsupportedTerminal:
continue
else:
- raise NoSupportedTerminals()
+ raise NoSupportedTerminals(get_cmd_list())
def spawn(name, sh_cmd, title=None, env=None, d=None):
"""Spawn the specified terminal, by name"""
@@ -225,10 +219,36 @@ def spawn(name, sh_cmd, title=None, env=None, d=None):
except KeyError:
raise UnsupportedTerminal(name)
- pipe = terminal(sh_cmd, title, env, d)
- output = pipe.communicate()[0]
- if pipe.returncode != 0:
- raise ExecutionError(sh_cmd, pipe.returncode, output)
+ # We need to know when the command completes but some terminals (at least
+ # gnome and tmux) gives us no way to do this. We therefore write the pid
+ # to a file using a "phonehome" wrapper script, then monitor the pid
+ # until it exits.
+ import tempfile
+ import time
+ pidfile = tempfile.NamedTemporaryFile(delete = False).name
+ try:
+ sh_cmd = bb.utils.which(os.getenv('PATH'), "oe-gnome-terminal-phonehome") + " " + pidfile + " " + sh_cmd
+ pipe = terminal(sh_cmd, title, env, d)
+ output = pipe.communicate()[0]
+ if output:
+ output = output.decode("utf-8")
+ if pipe.returncode != 0:
+ raise ExecutionError(sh_cmd, pipe.returncode, output)
+
+ while os.stat(pidfile).st_size <= 0:
+ time.sleep(0.01)
+ continue
+ with open(pidfile, "r") as f:
+ pid = int(f.readline())
+ finally:
+ os.unlink(pidfile)
+
+ while True:
+ try:
+ os.kill(pid, 0)
+ time.sleep(0.1)
+ except OSError:
+ return
def check_tmux_pane_size(tmux):
import subprocess as sub
@@ -275,8 +295,12 @@ def check_terminal_version(terminalName):
vernum = ver.split(' ')[-1]
if ver.startswith('GNOME Terminal'):
vernum = ver.split(' ')[-1]
+ if ver.startswith('MATE Terminal'):
+ vernum = ver.split(' ')[-1]
if ver.startswith('tmux'):
vernum = ver.split()[-1]
+ if ver.startswith('tmux next-'):
+ vernum = ver.split()[-1][5:]
return vernum
def distro_name():
diff --git a/meta/lib/oe/tests/test_license.py b/meta/lib/oe/tests/test_license.py
deleted file mode 100644
index c388886184..0000000000
--- a/meta/lib/oe/tests/test_license.py
+++ /dev/null
@@ -1,68 +0,0 @@
-import unittest
-import oe.license
-
-class SeenVisitor(oe.license.LicenseVisitor):
- def __init__(self):
- self.seen = []
- oe.license.LicenseVisitor.__init__(self)
-
- def visit_Str(self, node):
- self.seen.append(node.s)
-
-class TestSingleLicense(unittest.TestCase):
- licenses = [
- "GPLv2",
- "LGPL-2.0",
- "Artistic",
- "MIT",
- "GPLv3+",
- "FOO_BAR",
- ]
- invalid_licenses = ["GPL/BSD"]
-
- @staticmethod
- def parse(licensestr):
- visitor = SeenVisitor()
- visitor.visit_string(licensestr)
- return visitor.seen
-
- def test_single_licenses(self):
- for license in self.licenses:
- licenses = self.parse(license)
- self.assertListEqual(licenses, [license])
-
- def test_invalid_licenses(self):
- for license in self.invalid_licenses:
- with self.assertRaises(oe.license.InvalidLicense) as cm:
- self.parse(license)
- self.assertEqual(cm.exception.license, license)
-
-class TestSimpleCombinations(unittest.TestCase):
- tests = {
- "FOO&BAR": ["FOO", "BAR"],
- "BAZ & MOO": ["BAZ", "MOO"],
- "ALPHA|BETA": ["ALPHA"],
- "BAZ&MOO|FOO": ["FOO"],
- "FOO&BAR|BAZ": ["FOO", "BAR"],
- }
- preferred = ["ALPHA", "FOO", "BAR"]
-
- def test_tests(self):
- def choose(a, b):
- if all(lic in self.preferred for lic in b):
- return b
- else:
- return a
-
- for license, expected in self.tests.items():
- licenses = oe.license.flattened_licenses(license, choose)
- self.assertListEqual(licenses, expected)
-
-class TestComplexCombinations(TestSimpleCombinations):
- tests = {
- "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"],
- "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"],
- "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"],
- "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-clause", "MIT"],
- }
- preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"]
diff --git a/meta/lib/oe/tests/test_path.py b/meta/lib/oe/tests/test_path.py
deleted file mode 100644
index 44d068143e..0000000000
--- a/meta/lib/oe/tests/test_path.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import unittest
-import oe, oe.path
-import tempfile
-import os
-import errno
-import shutil
-
-class TestRealPath(unittest.TestCase):
- DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm" ]
- FILES = [ "etc/passwd", "b/file" ]
- LINKS = [
- ( "bin", "/usr/bin", "/usr/bin" ),
- ( "binX", "usr/binX", "/usr/binX" ),
- ( "c", "broken", "/broken" ),
- ( "etc/passwd-1", "passwd", "/etc/passwd" ),
- ( "etc/passwd-2", "passwd-1", "/etc/passwd" ),
- ( "etc/passwd-3", "/etc/passwd-1", "/etc/passwd" ),
- ( "etc/shadow-1", "/etc/shadow", "/etc/shadow" ),
- ( "etc/shadow-2", "/etc/shadow-1", "/etc/shadow" ),
- ( "prog-A", "bin/prog-A", "/usr/bin/prog-A" ),
- ( "prog-B", "/bin/prog-B", "/usr/bin/prog-B" ),
- ( "usr/bin/prog-C", "../../sbin/prog-C", "/sbin/prog-C" ),
- ( "usr/bin/prog-D", "/sbin/prog-D", "/sbin/prog-D" ),
- ( "usr/binX/prog-E", "../sbin/prog-E", None ),
- ( "usr/bin/prog-F", "../../../sbin/prog-F", "/sbin/prog-F" ),
- ( "loop", "a/loop", None ),
- ( "a/loop", "../loop", None ),
- ( "b/test", "file/foo", "/b/file/foo" ),
- ]
-
- LINKS_PHYS = [
- ( "./", "/", "" ),
- ( "binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E" ),
- ]
-
- EXCEPTIONS = [
- ( "loop", errno.ELOOP ),
- ( "b/test", errno.ENOENT ),
- ]
-
- def __del__(self):
- try:
- #os.system("tree -F %s" % self.tmpdir)
- shutil.rmtree(self.tmpdir)
- except:
- pass
-
- def setUp(self):
- self.tmpdir = tempfile.mkdtemp(prefix = "oe-test_path")
- self.root = os.path.join(self.tmpdir, "R")
-
- os.mkdir(os.path.join(self.tmpdir, "_real"))
- os.symlink("_real", self.root)
-
- for d in self.DIRS:
- os.mkdir(os.path.join(self.root, d))
- for f in self.FILES:
- open(os.path.join(self.root, f), "w")
- for l in self.LINKS:
- os.symlink(l[1], os.path.join(self.root, l[0]))
-
- def __realpath(self, file, use_physdir, assume_dir = True):
- return oe.path.realpath(os.path.join(self.root, file), self.root,
- use_physdir, assume_dir = assume_dir)
-
- def test_norm(self):
- for l in self.LINKS:
- if l[2] == None:
- continue
-
- target_p = self.__realpath(l[0], True)
- target_l = self.__realpath(l[0], False)
-
- if l[2] != False:
- self.assertEqual(target_p, target_l)
- self.assertEqual(l[2], target_p[len(self.root):])
-
- def test_phys(self):
- for l in self.LINKS_PHYS:
- target_p = self.__realpath(l[0], True)
- target_l = self.__realpath(l[0], False)
-
- self.assertEqual(l[1], target_p[len(self.root):])
- self.assertEqual(l[2], target_l[len(self.root):])
-
- def test_loop(self):
- for e in self.EXCEPTIONS:
- self.assertRaisesRegex(OSError, r'\[Errno %u\]' % e[1],
- self.__realpath, e[0], False, False)
diff --git a/meta/lib/oe/tests/test_types.py b/meta/lib/oe/tests/test_types.py
deleted file mode 100644
index 367cc30e45..0000000000
--- a/meta/lib/oe/tests/test_types.py
+++ /dev/null
@@ -1,62 +0,0 @@
-import unittest
-from oe.maketype import create, factory
-
-class TestTypes(unittest.TestCase):
- def assertIsInstance(self, obj, cls):
- return self.assertTrue(isinstance(obj, cls))
-
- def assertIsNot(self, obj, other):
- return self.assertFalse(obj is other)
-
- def assertFactoryCreated(self, value, type, **flags):
- cls = factory(type)
- self.assertIsNot(cls, None)
- self.assertIsInstance(create(value, type, **flags), cls)
-
-class TestBooleanType(TestTypes):
- def test_invalid(self):
- self.assertRaises(ValueError, create, '', 'boolean')
- self.assertRaises(ValueError, create, 'foo', 'boolean')
- self.assertRaises(TypeError, create, object(), 'boolean')
-
- def test_true(self):
- self.assertTrue(create('y', 'boolean'))
- self.assertTrue(create('yes', 'boolean'))
- self.assertTrue(create('1', 'boolean'))
- self.assertTrue(create('t', 'boolean'))
- self.assertTrue(create('true', 'boolean'))
- self.assertTrue(create('TRUE', 'boolean'))
- self.assertTrue(create('truE', 'boolean'))
-
- def test_false(self):
- self.assertFalse(create('n', 'boolean'))
- self.assertFalse(create('no', 'boolean'))
- self.assertFalse(create('0', 'boolean'))
- self.assertFalse(create('f', 'boolean'))
- self.assertFalse(create('false', 'boolean'))
- self.assertFalse(create('FALSE', 'boolean'))
- self.assertFalse(create('faLse', 'boolean'))
-
- def test_bool_equality(self):
- self.assertEqual(create('n', 'boolean'), False)
- self.assertNotEqual(create('n', 'boolean'), True)
- self.assertEqual(create('y', 'boolean'), True)
- self.assertNotEqual(create('y', 'boolean'), False)
-
-class TestList(TestTypes):
- def assertListEqual(self, value, valid, sep=None):
- obj = create(value, 'list', separator=sep)
- self.assertEqual(obj, valid)
- if sep is not None:
- self.assertEqual(obj.separator, sep)
- self.assertEqual(str(obj), obj.separator.join(obj))
-
- def test_list_nosep(self):
- testlist = ['alpha', 'beta', 'theta']
- self.assertListEqual('alpha beta theta', testlist)
- self.assertListEqual('alpha beta\ttheta', testlist)
- self.assertListEqual('alpha', ['alpha'])
-
- def test_list_usersep(self):
- self.assertListEqual('foo:bar', ['foo', 'bar'], ':')
- self.assertListEqual('foo:bar:baz', ['foo', 'bar', 'baz'], ':')
diff --git a/meta/lib/oe/tests/test_utils.py b/meta/lib/oe/tests/test_utils.py
deleted file mode 100644
index 5d9ac52e7d..0000000000
--- a/meta/lib/oe/tests/test_utils.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import unittest
-from oe.utils import packages_filter_out_system
-
-class TestPackagesFilterOutSystem(unittest.TestCase):
- def test_filter(self):
- """
- Test that oe.utils.packages_filter_out_system works.
- """
- try:
- import bb
- except ImportError:
- self.skipTest("Cannot import bb")
-
- d = bb.data_smart.DataSmart()
- d.setVar("PN", "foo")
-
- d.setVar("PACKAGES", "foo foo-doc foo-dev")
- pkgs = packages_filter_out_system(d)
- self.assertEqual(pkgs, [])
-
- d.setVar("PACKAGES", "foo foo-doc foo-data foo-dev")
- pkgs = packages_filter_out_system(d)
- self.assertEqual(pkgs, ["foo-data"])
-
- d.setVar("PACKAGES", "foo foo-locale-en-gb")
- pkgs = packages_filter_out_system(d)
- self.assertEqual(pkgs, [])
-
- d.setVar("PACKAGES", "foo foo-data foo-locale-en-gb")
- pkgs = packages_filter_out_system(d)
- self.assertEqual(pkgs, ["foo-data"])
-
-
-class TestTrimVersion(unittest.TestCase):
- def test_version_exception(self):
- with self.assertRaises(TypeError):
- trim_version(None, 2)
- with self.assertRaises(TypeError):
- trim_version((1, 2, 3), 2)
-
- def test_num_exception(self):
- with self.assertRaises(ValueError):
- trim_version("1.2.3", 0)
- with self.assertRaises(ValueError):
- trim_version("1.2.3", -1)
-
- def test_valid(self):
- self.assertEqual(trim_version("1.2.3", 1), "1")
- self.assertEqual(trim_version("1.2.3", 2), "1.2")
- self.assertEqual(trim_version("1.2.3", 3), "1.2.3")
- self.assertEqual(trim_version("1.2.3", 4), "1.2.3")
diff --git a/meta/lib/oe/types.py b/meta/lib/oe/types.py
index 4ae58acfac..bbbabafbf6 100644
--- a/meta/lib/oe/types.py
+++ b/meta/lib/oe/types.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import errno
import re
import os
@@ -103,8 +107,13 @@ def boolean(value):
"""OpenEmbedded 'boolean' type
Valid values for true: 'yes', 'y', 'true', 't', '1'
- Valid values for false: 'no', 'n', 'false', 'f', '0'
+ Valid values for false: 'no', 'n', 'false', 'f', '0', None
"""
+ if value is None:
+ return False
+
+ if isinstance(value, bool):
+ return value
if not isinstance(value, str):
raise TypeError("boolean accepts a string, not '%s'" % type(value))
@@ -145,9 +154,33 @@ def path(value, relativeto='', normalize='true', mustexist='false'):
if boolean(mustexist):
try:
- open(value, 'r')
+ with open(value, 'r'):
+ pass
except IOError as exc:
if exc.errno == errno.ENOENT:
raise ValueError("{0}: {1}".format(value, os.strerror(errno.ENOENT)))
return value
+
+def is_x86(arch):
+ """
+ Check whether arch is x86 or x86_64
+ """
+ if arch.startswith('x86_') or re.match('i.*86', arch):
+ return True
+ else:
+ return False
+
+def qemu_use_kvm(kvm, target_arch):
+ """
+ Enable kvm if target_arch == build_arch or both of them are x86 archs.
+ """
+
+ use_kvm = False
+ if kvm and boolean(kvm):
+ build_arch = os.uname()[4]
+ if is_x86(build_arch) and is_x86(target_arch):
+ use_kvm = True
+ elif build_arch == target_arch:
+ use_kvm = True
+ return use_kvm
diff --git a/meta/lib/oe/useradd.py b/meta/lib/oe/useradd.py
new file mode 100644
index 0000000000..8fc77568ff
--- /dev/null
+++ b/meta/lib/oe/useradd.py
@@ -0,0 +1,71 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+import argparse
+import re
+
+class myArgumentParser(argparse.ArgumentParser):
+ def _print_message(self, message, file=None):
+ bb.warn("%s - %s: %s" % (d.getVar('PN'), pkg, message))
+
+ # This should never be called...
+ def exit(self, status=0, message=None):
+ message = message or ("%s - %s: useradd.bbclass: Argument parsing exited" % (d.getVar('PN'), pkg))
+ error(message)
+
+ def error(self, message):
+ bb.fatal(message)
+
+def split_commands(params):
+ params = re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params.strip())
+ # Remove any empty items
+ return [x for x in params if x]
+
+def split_args(params):
+ params = re.split('''[ \t]+(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params.strip())
+ # Remove any empty items
+ return [x for x in params if x]
+
+def build_useradd_parser():
+ # The following comes from --help on useradd from shadow
+ parser = myArgumentParser(prog='useradd')
+ parser.add_argument("-b", "--base-dir", metavar="BASE_DIR", help="base directory for the home directory of the new account")
+ parser.add_argument("-c", "--comment", metavar="COMMENT", help="GECOS field of the new account")
+ parser.add_argument("-d", "--home-dir", metavar="HOME_DIR", help="home directory of the new account")
+ parser.add_argument("-D", "--defaults", help="print or change default useradd configuration", action="store_true")
+ parser.add_argument("-e", "--expiredate", metavar="EXPIRE_DATE", help="expiration date of the new account")
+ parser.add_argument("-f", "--inactive", metavar="INACTIVE", help="password inactivity period of the new account")
+ parser.add_argument("-g", "--gid", metavar="GROUP", help="name or ID of the primary group of the new account")
+ parser.add_argument("-G", "--groups", metavar="GROUPS", help="list of supplementary groups of the new account")
+ parser.add_argument("-k", "--skel", metavar="SKEL_DIR", help="use this alternative skeleton directory")
+ parser.add_argument("-K", "--key", metavar="KEY=VALUE", help="override /etc/login.defs defaults")
+ parser.add_argument("-l", "--no-log-init", help="do not add the user to the lastlog and faillog databases", action="store_true")
+ parser.add_argument("-m", "--create-home", help="create the user's home directory", action="store_const", const=True)
+ parser.add_argument("-M", "--no-create-home", dest="create_home", help="do not create the user's home directory", action="store_const", const=False)
+ parser.add_argument("-N", "--no-user-group", dest="user_group", help="do not create a group with the same name as the user", action="store_const", const=False)
+ parser.add_argument("-o", "--non-unique", help="allow to create users with duplicate (non-unique UID)", action="store_true")
+ parser.add_argument("-p", "--password", metavar="PASSWORD", help="encrypted password of the new account")
+ parser.add_argument("-P", "--clear-password", metavar="CLEAR_PASSWORD", help="use this clear password for the new account")
+ parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into")
+ parser.add_argument("-r", "--system", help="create a system account", action="store_true")
+ parser.add_argument("-s", "--shell", metavar="SHELL", help="login shell of the new account")
+ parser.add_argument("-u", "--uid", metavar="UID", help="user ID of the new account")
+ parser.add_argument("-U", "--user-group", help="create a group with the same name as the user", action="store_const", const=True)
+ parser.add_argument("LOGIN", help="Login name of the new user")
+
+ return parser
+
+def build_groupadd_parser():
+ # The following comes from --help on groupadd from shadow
+ parser = myArgumentParser(prog='groupadd')
+ parser.add_argument("-f", "--force", help="exit successfully if the group already exists, and cancel -g if the GID is already used", action="store_true")
+ parser.add_argument("-g", "--gid", metavar="GID", help="use GID for the new group")
+ parser.add_argument("-K", "--key", metavar="KEY=VALUE", help="override /etc/login.defs defaults")
+ parser.add_argument("-o", "--non-unique", help="allow to create groups with duplicate (non-unique) GID", action="store_true")
+ parser.add_argument("-p", "--password", metavar="PASSWORD", help="use this encrypted password for the new group")
+ parser.add_argument("-P", "--clear-password", metavar="CLEAR_PASSWORD", help="use this clear password for the new group")
+ parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into")
+ parser.add_argument("-r", "--system", help="create a system account", action="store_true")
+ parser.add_argument("GROUP", help="Group name of the new group")
+
+ return parser
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index d6545b197d..652b2be145 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -1,9 +1,10 @@
-try:
- # Python 2
- import commands as cmdstatus
-except ImportError:
- # Python 3
- import subprocess as cmdstatus
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import subprocess
+import multiprocessing
+import traceback
def read_file(filename):
try:
@@ -23,27 +24,34 @@ def ifelse(condition, iftrue = True, iffalse = False):
return iffalse
def conditional(variable, checkvalue, truevalue, falsevalue, d):
- if d.getVar(variable, True) == checkvalue:
+ if d.getVar(variable) == checkvalue:
return truevalue
else:
return falsevalue
+def vartrue(var, iftrue, iffalse, d):
+ import oe.types
+ if oe.types.boolean(d.getVar(var)):
+ return iftrue
+ else:
+ return iffalse
+
def less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- if float(d.getVar(variable, True)) <= float(checkvalue):
+ if float(d.getVar(variable)) <= float(checkvalue):
return truevalue
else:
return falsevalue
def version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- result = bb.utils.vercmp_string(d.getVar(variable,True), checkvalue)
+ result = bb.utils.vercmp_string(d.getVar(variable), checkvalue)
if result <= 0:
return truevalue
else:
return falsevalue
def both_contain(variable1, variable2, checkvalue, d):
- val1 = d.getVar(variable1, True)
- val2 = d.getVar(variable2, True)
+ val1 = d.getVar(variable1)
+ val2 = d.getVar(variable2)
val1 = set(val1.split())
val2 = set(val2.split())
if isinstance(checkvalue, str):
@@ -66,20 +74,20 @@ def set_intersect(variable1, variable2, d):
s3 = set_intersect(s1, s2)
=> s3 = "b c"
"""
- val1 = set(d.getVar(variable1, True).split())
- val2 = set(d.getVar(variable2, True).split())
+ val1 = set(d.getVar(variable1).split())
+ val2 = set(d.getVar(variable2).split())
return " ".join(val1 & val2)
def prune_suffix(var, suffixes, d):
# See if var ends with any of the suffixes listed and
# remove it if found
for suffix in suffixes:
- if var.endswith(suffix):
- var = var.replace(suffix, "")
+ if suffix and var.endswith(suffix):
+ var = var[:-len(suffix)]
- prefix = d.getVar("MLPREFIX", True)
+ prefix = d.getVar("MLPREFIX")
if prefix and var.startswith(prefix):
- var = var.replace(prefix, "")
+ var = var[len(prefix):]
return var
@@ -91,16 +99,9 @@ def str_filter_out(f, str, d):
from re import match
return " ".join([x for x in str.split() if not match(f, x, 0)])
-def param_bool(cfg, field, dflt = None):
- """Lookup <field> in <cfg> map and convert it to a boolean; take
- <dflt> when this <field> does not exist"""
- value = cfg.get(field, dflt)
- strvalue = str(value).lower()
- if strvalue in ('yes', 'y', 'true', 't', '1'):
- return True
- elif strvalue in ('no', 'n', 'false', 'f', '0'):
- return False
- raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value))
+def build_depends_string(depends, task):
+ """Append a taskname to a string of dependencies as used by the [depends] flag"""
+ return " ".join(dep + ":" + task for dep in depends.split())
def inherits(d, *classes):
"""Return True if the metadata inherits any of the specified classes"""
@@ -115,9 +116,9 @@ def features_backfill(var,d):
# disturbing distributions that have already set DISTRO_FEATURES.
# Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should
# add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED
- features = (d.getVar(var, True) or "").split()
- backfill = (d.getVar(var+"_BACKFILL", True) or "").split()
- considered = (d.getVar(var+"_BACKFILL_CONSIDERED", True) or "").split()
+ features = (d.getVar(var) or "").split()
+ backfill = (d.getVar(var+"_BACKFILL") or "").split()
+ considered = (d.getVar(var+"_BACKFILL_CONSIDERED") or "").split()
addfeatures = []
for feature in backfill:
@@ -127,24 +128,107 @@ def features_backfill(var,d):
if addfeatures:
d.appendVar(var, " " + " ".join(addfeatures))
+def all_distro_features(d, features, truevalue="1", falsevalue=""):
+ """
+ Returns truevalue if *all* given features are set in DISTRO_FEATURES,
+ else falsevalue. The features can be given as single string or anything
+ that can be turned into a set.
+
+ This is a shorter, more flexible version of
+ bb.utils.contains("DISTRO_FEATURES", features, truevalue, falsevalue, d).
+
+ Without explicit true/false values it can be used directly where
+ Python expects a boolean:
+ if oe.utils.all_distro_features(d, "foo bar"):
+ bb.fatal("foo and bar are mutually exclusive DISTRO_FEATURES")
+
+ With just a truevalue, it can be used to include files that are meant to be
+ used only when requested via DISTRO_FEATURES:
+ require ${@ oe.utils.all_distro_features(d, "foo bar", "foo-and-bar.inc")
+ """
+ return bb.utils.contains("DISTRO_FEATURES", features, truevalue, falsevalue, d)
+
+def any_distro_features(d, features, truevalue="1", falsevalue=""):
+ """
+ Returns truevalue if at least *one* of the given features is set in DISTRO_FEATURES,
+ else falsevalue. The features can be given as single string or anything
+ that can be turned into a set.
+
+ This is a shorter, more flexible version of
+ bb.utils.contains_any("DISTRO_FEATURES", features, truevalue, falsevalue, d).
+
+ Without explicit true/false values it can be used directly where
+ Python expects a boolean:
+ if not oe.utils.any_distro_features(d, "foo bar"):
+ bb.fatal("foo, bar or both must be set in DISTRO_FEATURES")
+
+ With just a truevalue, it can be used to include files that are meant to be
+ used only when requested via DISTRO_FEATURES:
+ require ${@ oe.utils.any_distro_features(d, "foo bar", "foo-or-bar.inc")
+
+ """
+ return bb.utils.contains_any("DISTRO_FEATURES", features, truevalue, falsevalue, d)
+
+def parallel_make(d):
+ """
+ Return the integer value for the number of parallel threads to use when
+ building, scraped out of PARALLEL_MAKE. If no parallelization option is
+ found, returns None
+
+ e.g. if PARALLEL_MAKE = "-j 10", this will return 10 as an integer.
+ """
+ pm = (d.getVar('PARALLEL_MAKE') or '').split()
+ # look for '-j' and throw other options (e.g. '-l') away
+ while pm:
+ opt = pm.pop(0)
+ if opt == '-j':
+ v = pm.pop(0)
+ elif opt.startswith('-j'):
+ v = opt[2:].strip()
+ else:
+ continue
+
+ return int(v)
+
+ return None
+
+def parallel_make_argument(d, fmt, limit=None):
+ """
+ Helper utility to construct a parallel make argument from the number of
+ parallel threads specified in PARALLEL_MAKE.
+
+ Returns the input format string `fmt` where a single '%d' will be expanded
+ with the number of parallel threads to use. If `limit` is specified, the
+ number of parallel threads will be no larger than it. If no parallelization
+ option is found in PARALLEL_MAKE, returns an empty string
+
+ e.g. if PARALLEL_MAKE = "-j 10", parallel_make_argument(d, "-n %d") will return
+ "-n 10"
+ """
+ v = parallel_make(d)
+ if v:
+ if limit:
+ v = min(limit, v)
+ return fmt % v
+ return ''
def packages_filter_out_system(d):
"""
Return a list of packages from PACKAGES with the "system" packages such as
PN-dbg PN-doc PN-locale-eb-gb removed.
"""
- pn = d.getVar('PN', True)
- blacklist = [pn + suffix for suffix in ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev')]
+ pn = d.getVar('PN')
+ blacklist = [pn + suffix for suffix in ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev', '-src')]
localepkg = pn + "-locale-"
pkgs = []
- for pkg in d.getVar('PACKAGES', True).split():
+ for pkg in d.getVar('PACKAGES').split():
if pkg not in blacklist and localepkg not in pkg:
pkgs.append(pkg)
return pkgs
def getstatusoutput(cmd):
- return cmdstatus.getstatusoutput(cmd)
+ return subprocess.getstatusoutput(cmd)
def trim_version(version, num_parts=2):
@@ -175,38 +259,87 @@ def execute_pre_post_process(d, cmds):
bb.note("Executing %s ..." % cmd)
bb.build.exec_func(cmd, d)
-def multiprocess_exec(commands, function):
- import signal
- import multiprocessing
-
- if not commands:
- return []
+# For each item in items, call the function 'target' with item as the first
+# argument, extraargs as the other arguments and handle any exceptions in the
+# parent thread
+def multiprocess_launch(target, items, d, extraargs=None):
- def init_worker():
- signal.signal(signal.SIGINT, signal.SIG_IGN)
+ class ProcessLaunch(multiprocessing.Process):
+ def __init__(self, *args, **kwargs):
+ multiprocessing.Process.__init__(self, *args, **kwargs)
+ self._pconn, self._cconn = multiprocessing.Pipe()
+ self._exception = None
+ self._result = None
- nproc = min(multiprocessing.cpu_count(), len(commands))
- pool = bb.utils.multiprocessingpool(nproc, init_worker)
- imap = pool.imap(function, commands)
-
- try:
- res = list(imap)
- pool.close()
- pool.join()
- results = []
- for result in res:
- if result is not None:
- results.append(result)
- return results
-
- except KeyboardInterrupt:
- pool.terminate()
- pool.join()
- raise
+ def run(self):
+ try:
+ ret = self._target(*self._args, **self._kwargs)
+ self._cconn.send((None, ret))
+ except Exception as e:
+ tb = traceback.format_exc()
+ self._cconn.send((e, tb))
+
+ def update(self):
+ if self._pconn.poll():
+ (e, tb) = self._pconn.recv()
+ if e is not None:
+ self._exception = (e, tb)
+ else:
+ self._result = tb
+
+ @property
+ def exception(self):
+ self.update()
+ return self._exception
+
+ @property
+ def result(self):
+ self.update()
+ return self._result
+
+ max_process = int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1)
+ launched = []
+ errors = []
+ results = []
+ items = list(items)
+ while (items and not errors) or launched:
+ if not errors and items and len(launched) < max_process:
+ args = (items.pop(),)
+ if extraargs is not None:
+ args = args + extraargs
+ p = ProcessLaunch(target=target, args=args)
+ p.start()
+ launched.append(p)
+ for q in launched:
+ # Have to manually call update() to avoid deadlocks. The pipe can be full and
+ # transfer stalled until we try and read the results object but the subprocess won't exit
+ # as it still has data to write (https://bugs.python.org/issue8426)
+ q.update()
+ # The finished processes are joined when calling is_alive()
+ if not q.is_alive():
+ if q.exception:
+ errors.append(q.exception)
+ if q.result:
+ results.append(q.result)
+ launched.remove(q)
+ # Paranoia doesn't hurt
+ for p in launched:
+ p.join()
+ if errors:
+ msg = ""
+ for (e, tb) in errors:
+ if isinstance(e, subprocess.CalledProcessError) and e.output:
+ msg = msg + str(e) + "\n"
+ msg = msg + "Subprocess output:"
+ msg = msg + e.output.decode("utf-8", errors="ignore")
+ else:
+ msg = msg + str(e) + ": " + str(tb) + "\n"
+ bb.fatal("Fatal errors occurred in subprocesses:\n%s" % msg)
+ return results
def squashspaces(string):
import re
- return re.sub("\s+", " ", string).strip()
+ return re.sub(r"\s+", " ", string).strip()
def format_pkg_list(pkg_dict, ret_format=None):
output = []
@@ -228,7 +361,55 @@ def format_pkg_list(pkg_dict, ret_format=None):
for pkg in sorted(pkg_dict):
output.append(pkg)
- return '\n'.join(output)
+ output_str = '\n'.join(output)
+
+ if output_str:
+ # make sure last line is newline terminated
+ output_str += '\n'
+
+ return output_str
+
+def host_gcc_version(d, taskcontextonly=False):
+ import re, subprocess
+
+ if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
+ return
+
+ compiler = d.getVar("BUILD_CC")
+ # Get rid of ccache since it is not present when parsing.
+ if compiler.startswith('ccache '):
+ compiler = compiler[7:]
+ try:
+ env = os.environ.copy()
+ env["PATH"] = d.getVar("PATH")
+ output = subprocess.check_output("%s --version" % compiler, \
+ shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
+
+ match = re.match(r".* (\d\.\d)\.\d.*", output.split('\n')[0])
+ if not match:
+ bb.fatal("Can't get compiler version from %s --version output" % compiler)
+
+ version = match.group(1)
+ return "-%s" % version if version in ("4.8", "4.9") else ""
+
+
+def get_multilib_datastore(variant, d):
+ localdata = bb.data.createCopy(d)
+ if variant:
+ overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", variant + "-")
+ else:
+ origdefault = localdata.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL")
+ if origdefault:
+ localdata.setVar("DEFAULTTUNE", origdefault)
+ overrides = localdata.getVar("OVERRIDES", False).split(":")
+ overrides = ":".join([x for x in overrides if not x.startswith("virtclass-multilib-")])
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", "")
+ return localdata
#
# Python 2.7 doesn't have threaded pools (just multiprocessing)
@@ -302,10 +483,10 @@ def write_ld_so_conf(d):
bb.utils.remove(ldsoconf)
bb.utils.mkdirhier(os.path.dirname(ldsoconf))
with open(ldsoconf, "w") as f:
- f.write(d.getVar("base_libdir", True) + '\n')
- f.write(d.getVar("libdir", True) + '\n')
+ f.write(d.getVar("base_libdir") + '\n')
+ f.write(d.getVar("libdir") + '\n')
-class ImageQAFailed(bb.build.FuncFailed):
+class ImageQAFailed(Exception):
def __init__(self, description, name=None, logfile=None):
self.description = description
self.name = name
@@ -317,3 +498,7 @@ class ImageQAFailed(bb.build.FuncFailed):
msg = msg + ' (%s)' % self.description
return msg
+
+def sh_quote(string):
+ import shlex
+ return shlex.quote(string)
diff --git a/meta/lib/oeqa/buildperf/__init__.py b/meta/lib/oeqa/buildperf/__init__.py
index 605f429ecc..b7ebd036ae 100644
--- a/meta/lib/oeqa/buildperf/__init__.py
+++ b/meta/lib/oeqa/buildperf/__init__.py
@@ -1,13 +1,7 @@
# Copyright (c) 2016, Intel Corporation.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
#
-# This program is distributed in the hope 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.
+# SPDX-License-Identifier: GPL-2.0-only
#
"""Build performance tests"""
from .base import (BuildPerfTestCase,
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 2c102554b9..3b2fed549f 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -1,30 +1,24 @@
# Copyright (c) 2016, Intel Corporation.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-#
-# This program is distributed in the hope 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.
+# SPDX-License-Identifier: GPL-2.0-only
#
"""Build performance test base classes and functionality"""
-import glob
import json
import logging
import os
import re
import resource
-import shutil
import socket
+import shutil
import time
-import traceback
import unittest
+import xml.etree.ElementTree as ET
+from collections import OrderedDict
from datetime import datetime, timedelta
from functools import partial
from multiprocessing import Process
from multiprocessing import SimpleQueue
+from xml.dom import minidom
import oe.path
from oeqa.utils.commands import CommandError, runCmd, get_bb_vars
@@ -35,7 +29,7 @@ log = logging.getLogger('build-perf')
# Our own version of runCmd which does not raise AssertErrors which would cause
# errors to interpreted as failures
-runCmd2 = partial(runCmd, assert_error=False)
+runCmd2 = partial(runCmd, assert_error=False, limit_exc_output=40)
class KernelDropCaches(object):
@@ -99,50 +93,34 @@ class BuildPerfTestResult(unittest.TextTestResult):
super(BuildPerfTestResult, self).__init__(*args, **kwargs)
self.out_dir = out_dir
- # Get Git parameters
- try:
- self.repo = GitRepo('.')
- except GitError:
- self.repo = None
- self.git_commit, self.git_commit_count, self.git_branch = \
- self.get_git_revision()
self.hostname = socket.gethostname()
self.product = os.getenv('OE_BUILDPERFTEST_PRODUCT', 'oe-core')
self.start_time = self.elapsed_time = None
self.successes = []
- log.info("Using Git branch:commit %s:%s (%s)", self.git_branch,
- self.git_commit, self.git_commit_count)
-
- def get_git_revision(self):
- """Get git branch and commit under testing"""
- commit = os.getenv('OE_BUILDPERFTEST_GIT_COMMIT')
- commit_cnt = os.getenv('OE_BUILDPERFTEST_GIT_COMMIT_COUNT')
- branch = os.getenv('OE_BUILDPERFTEST_GIT_BRANCH')
- if not self.repo and (not commit or not commit_cnt or not branch):
- log.info("The current working directory doesn't seem to be a Git "
- "repository clone. You can specify branch and commit "
- "displayed in test results with OE_BUILDPERFTEST_GIT_BRANCH, "
- "OE_BUILDPERFTEST_GIT_COMMIT and "
- "OE_BUILDPERFTEST_GIT_COMMIT_COUNT environment variables")
- else:
- if not commit:
- commit = self.repo.rev_parse('HEAD^0')
- commit_cnt = self.repo.run_cmd(['rev-list', '--count', 'HEAD^0'])
- if not branch:
- branch = self.repo.get_current_branch()
- if not branch:
- log.debug('Currently on detached HEAD')
- return str(commit), str(commit_cnt), str(branch)
def addSuccess(self, test):
"""Record results from successful tests"""
super(BuildPerfTestResult, self).addSuccess(test)
- self.successes.append((test, None))
+ self.successes.append(test)
+
+ def addError(self, test, err):
+ """Record results from crashed test"""
+ test.err = err
+ super(BuildPerfTestResult, self).addError(test, err)
+
+ def addFailure(self, test, err):
+ """Record results from failed test"""
+ test.err = err
+ super(BuildPerfTestResult, self).addFailure(test, err)
+
+ def addExpectedFailure(self, test, err):
+ """Record results from expectedly failed test"""
+ test.err = err
+ super(BuildPerfTestResult, self).addExpectedFailure(test, err)
def startTest(self, test):
"""Pre-test hook"""
test.base_dir = self.out_dir
- os.mkdir(test.out_dir)
log.info("Executing test %s: %s", test.name, test.shortDescription())
self.stream.write(datetime.now().strftime("[%Y-%m-%d %H:%M:%S] "))
super(BuildPerfTestResult, self).startTest(test)
@@ -154,141 +132,113 @@ class BuildPerfTestResult(unittest.TextTestResult):
def stopTestRun(self):
"""Pre-run hook"""
self.elapsed_time = datetime.utcnow() - self.start_time
- self.write_results_json()
def all_results(self):
- result_map = {'SUCCESS': self.successes,
- 'FAIL': self.failures,
- 'ERROR': self.errors,
- 'EXP_FAIL': self.expectedFailures,
- 'UNEXP_SUCCESS': self.unexpectedSuccesses,
- 'SKIPPED': self.skipped}
- for status, tests in result_map.items():
- for test in tests:
- yield (status, test)
-
-
- def update_globalres_file(self, filename):
- """Write results to globalres csv file"""
- # Map test names to time and size columns in globalres
- # The tuples represent index and length of times and sizes
- # respectively
- gr_map = {'test1': ((0, 1), (8, 1)),
- 'test12': ((1, 1), (None, None)),
- 'test13': ((2, 1), (9, 1)),
- 'test2': ((3, 1), (None, None)),
- 'test3': ((4, 3), (None, None)),
- 'test4': ((7, 1), (10, 2))}
-
- if self.repo:
- git_tag_rev = self.repo.run_cmd(['describe', self.git_commit])
- else:
- git_tag_rev = self.git_commit
+ compound = [('SUCCESS', t, None) for t in self.successes] + \
+ [('FAILURE', t, m) for t, m in self.failures] + \
+ [('ERROR', t, m) for t, m in self.errors] + \
+ [('EXPECTED_FAILURE', t, m) for t, m in self.expectedFailures] + \
+ [('UNEXPECTED_SUCCESS', t, None) for t in self.unexpectedSuccesses] + \
+ [('SKIPPED', t, m) for t, m in self.skipped]
+ return sorted(compound, key=lambda info: info[1].start_time)
+
+
+ def write_buildstats_json(self):
+ """Write buildstats file"""
+ buildstats = OrderedDict()
+ for _, test, _ in self.all_results():
+ for key, val in test.buildstats.items():
+ buildstats[test.name + '.' + key] = val
+ with open(os.path.join(self.out_dir, 'buildstats.json'), 'w') as fobj:
+ json.dump(buildstats, fobj, cls=ResultsJsonEncoder)
- values = ['0'] * 12
- for status, (test, msg) in self.all_results():
- if status in ['ERROR', 'SKIPPED']:
- continue
- (t_ind, t_len), (s_ind, s_len) = gr_map[test.name]
- if t_ind is not None:
- values[t_ind:t_ind + t_len] = test.times
- if s_ind is not None:
- values[s_ind:s_ind + s_len] = test.sizes
-
- log.debug("Writing globalres log to %s", filename)
- with open(filename, 'a') as fobj:
- fobj.write('{},{}:{},{},'.format(self.hostname,
- self.git_branch,
- self.git_commit,
- git_tag_rev))
- fobj.write(','.join(values) + '\n')
def write_results_json(self):
"""Write test results into a json-formatted file"""
- results = {'tester_host': self.hostname,
- 'git_branch': self.git_branch,
- 'git_commit': self.git_commit,
- 'git_commit_count': self.git_commit_count,
- 'product': self.product,
- 'start_time': self.start_time,
- 'elapsed_time': self.elapsed_time}
-
- tests = {}
- for status, (test, reason) in self.all_results():
- tests[test.name] = {'name': test.name,
- 'description': test.shortDescription(),
- 'status': status,
- 'start_time': test.start_time,
- 'elapsed_time': test.elapsed_time,
- 'cmd_log_file': os.path.relpath(test.cmd_log_file,
- self.out_dir),
- 'measurements': test.measurements}
- results['tests'] = tests
+ results = OrderedDict([('tester_host', self.hostname),
+ ('start_time', self.start_time),
+ ('elapsed_time', self.elapsed_time),
+ ('tests', OrderedDict())])
+
+ for status, test, reason in self.all_results():
+ test_result = OrderedDict([('name', test.name),
+ ('description', test.shortDescription()),
+ ('status', status),
+ ('start_time', test.start_time),
+ ('elapsed_time', test.elapsed_time),
+ ('measurements', test.measurements)])
+ if status in ('ERROR', 'FAILURE', 'EXPECTED_FAILURE'):
+ test_result['message'] = str(test.err[1])
+ test_result['err_type'] = test.err[0].__name__
+ test_result['err_output'] = reason
+ elif reason:
+ test_result['message'] = reason
+
+ results['tests'][test.name] = test_result
with open(os.path.join(self.out_dir, 'results.json'), 'w') as fobj:
- json.dump(results, fobj, indent=4, sort_keys=True,
+ json.dump(results, fobj, indent=4,
cls=ResultsJsonEncoder)
-
- def git_commit_results(self, repo_path, branch=None, tag=None):
- """Commit results into a Git repository"""
- repo = GitRepo(repo_path, is_topdir=True)
- if not branch:
- branch = self.git_branch
- else:
- # Replace keywords
- branch = branch.format(git_branch=self.git_branch,
- tester_host=self.hostname)
-
- log.info("Committing test results into %s %s", repo_path, branch)
- tmp_index = os.path.join(repo_path, '.git', 'index.oe-build-perf')
- try:
- # Create new commit object from the new results
- env_update = {'GIT_INDEX_FILE': tmp_index,
- 'GIT_WORK_TREE': self.out_dir}
- repo.run_cmd('add .', env_update)
- tree = repo.run_cmd('write-tree', env_update)
- parent = repo.rev_parse(branch)
- msg = "Results of {}:{}\n".format(self.git_branch, self.git_commit)
- git_cmd = ['commit-tree', tree, '-m', msg]
- if parent:
- git_cmd += ['-p', parent]
- commit = repo.run_cmd(git_cmd, env_update)
-
- # Update branch head
- git_cmd = ['update-ref', 'refs/heads/' + branch, commit]
- if parent:
- git_cmd.append(parent)
- repo.run_cmd(git_cmd)
-
- # Update current HEAD, if we're on branch 'branch'
- if repo.get_current_branch() == branch:
- log.info("Updating %s HEAD to latest commit", repo_path)
- repo.run_cmd('reset --hard')
-
- # Create (annotated) tag
- if tag:
- # Find tags matching the pattern
- tag_keywords = dict(git_branch=self.git_branch,
- git_commit=self.git_commit,
- git_commit_count=self.git_commit_count,
- tester_host=self.hostname,
- tag_num='[0-9]{1,5}')
- tag_re = re.compile(tag.format(**tag_keywords) + '$')
- tag_keywords['tag_num'] = 0
- for existing_tag in repo.run_cmd('tag').splitlines():
- if tag_re.match(existing_tag):
- tag_keywords['tag_num'] += 1
-
- tag = tag.format(**tag_keywords)
- msg = "Test run #{} of {}:{}\n".format(tag_keywords['tag_num'],
- self.git_branch,
- self.git_commit)
- repo.run_cmd(['tag', '-a', '-m', msg, tag, commit])
-
- finally:
- if os.path.exists(tmp_index):
- os.unlink(tmp_index)
+ def write_results_xml(self):
+ """Write test results into a JUnit XML file"""
+ top = ET.Element('testsuites')
+ suite = ET.SubElement(top, 'testsuite')
+ suite.set('name', 'oeqa.buildperf')
+ suite.set('timestamp', self.start_time.isoformat())
+ suite.set('time', str(self.elapsed_time.total_seconds()))
+ suite.set('hostname', self.hostname)
+ suite.set('failures', str(len(self.failures) + len(self.expectedFailures)))
+ suite.set('errors', str(len(self.errors)))
+ suite.set('skipped', str(len(self.skipped)))
+
+ test_cnt = 0
+ for status, test, reason in self.all_results():
+ test_cnt += 1
+ testcase = ET.SubElement(suite, 'testcase')
+ testcase.set('classname', test.__module__ + '.' + test.__class__.__name__)
+ testcase.set('name', test.name)
+ testcase.set('description', test.shortDescription())
+ testcase.set('timestamp', test.start_time.isoformat())
+ testcase.set('time', str(test.elapsed_time.total_seconds()))
+ if status in ('ERROR', 'FAILURE', 'EXP_FAILURE'):
+ if status in ('FAILURE', 'EXP_FAILURE'):
+ result = ET.SubElement(testcase, 'failure')
+ else:
+ result = ET.SubElement(testcase, 'error')
+ result.set('message', str(test.err[1]))
+ result.set('type', test.err[0].__name__)
+ result.text = reason
+ elif status == 'SKIPPED':
+ result = ET.SubElement(testcase, 'skipped')
+ result.text = reason
+ elif status not in ('SUCCESS', 'UNEXPECTED_SUCCESS'):
+ raise TypeError("BUG: invalid test status '%s'" % status)
+
+ for data in test.measurements.values():
+ measurement = ET.SubElement(testcase, data['type'])
+ measurement.set('name', data['name'])
+ measurement.set('legend', data['legend'])
+ vals = data['values']
+ if data['type'] == BuildPerfTestCase.SYSRES:
+ ET.SubElement(measurement, 'time',
+ timestamp=vals['start_time'].isoformat()).text = \
+ str(vals['elapsed_time'].total_seconds())
+ attrib = dict((k, str(v)) for k, v in vals['iostat'].items())
+ ET.SubElement(measurement, 'iostat', attrib=attrib)
+ attrib = dict((k, str(v)) for k, v in vals['rusage'].items())
+ ET.SubElement(measurement, 'rusage', attrib=attrib)
+ elif data['type'] == BuildPerfTestCase.DISKUSAGE:
+ ET.SubElement(measurement, 'size').text = str(vals['size'])
+ else:
+ raise TypeError('BUG: unsupported measurement type')
+
+ suite.set('tests', str(test_cnt))
+
+ # Use minidom for pretty-printing
+ dom_doc = minidom.parseString(ET.tostring(top, 'utf-8'))
+ with open(os.path.join(self.out_dir, 'results.xml'), 'w') as fobj:
+ dom_doc.writexml(fobj, addindent=' ', newl='\n', encoding='utf-8')
class BuildPerfTestCase(unittest.TestCase):
@@ -303,7 +253,10 @@ class BuildPerfTestCase(unittest.TestCase):
self.base_dir = None
self.start_time = None
self.elapsed_time = None
- self.measurements = []
+ self.measurements = OrderedDict()
+ self.buildstats = OrderedDict()
+ # self.err is supposed to be a tuple from sys.exc_info()
+ self.err = None
self.bb_vars = get_bb_vars()
# TODO: remove 'times' and 'sizes' arrays when globalres support is
# removed
@@ -311,18 +264,23 @@ class BuildPerfTestCase(unittest.TestCase):
self.sizes = []
@property
- def out_dir(self):
- return os.path.join(self.base_dir, self.name)
+ def tmp_dir(self):
+ return os.path.join(self.base_dir, self.name + '.tmp')
- @property
- def cmd_log_file(self):
- return os.path.join(self.out_dir, 'commands.log')
+ def shortDescription(self):
+ return super(BuildPerfTestCase, self).shortDescription() or ""
def setUp(self):
"""Set-up fixture for each test"""
+ if not os.path.isdir(self.tmp_dir):
+ os.mkdir(self.tmp_dir)
if self.build_target:
- self.log_cmd_output(['bitbake', self.build_target,
- '-c', 'fetchall'])
+ self.run_cmd(['bitbake', self.build_target, '--runall=fetch'])
+
+ def tearDown(self):
+ """Tear-down fixture for each test"""
+ if os.path.isdir(self.tmp_dir):
+ shutil.rmtree(self.tmp_dir)
def run(self, *args, **kwargs):
"""Run test"""
@@ -330,17 +288,23 @@ class BuildPerfTestCase(unittest.TestCase):
super(BuildPerfTestCase, self).run(*args, **kwargs)
self.elapsed_time = datetime.now() - self.start_time
- def log_cmd_output(self, cmd):
- """Run a command and log it's output"""
+ def run_cmd(self, cmd):
+ """Convenience method for running a command"""
cmd_str = cmd if isinstance(cmd, str) else ' '.join(cmd)
log.info("Logging command: %s", cmd_str)
try:
- with open(self.cmd_log_file, 'a') as fobj:
- runCmd2(cmd, stdout=fobj)
+ runCmd2(cmd)
except CommandError as err:
log.error("Command failed: %s", err.retcode)
raise
+ def _append_measurement(self, measurement):
+ """Simple helper for adding measurements results"""
+ if measurement['name'] in self.measurements:
+ raise ValueError('BUG: two measurements with the same name in {}'.format(
+ self.__class__.__name__))
+ self.measurements[measurement['name']] = measurement
+
def measure_cmd_resources(self, cmd, name, legend, save_bs=False):
"""Measure system resource usage of a command"""
def _worker(data_q, cmd, **kwargs):
@@ -350,12 +314,12 @@ class BuildPerfTestCase(unittest.TestCase):
ret = runCmd2(cmd, **kwargs)
etime = datetime.now() - start_time
rusage_struct = resource.getrusage(resource.RUSAGE_CHILDREN)
- iostat = {}
+ iostat = OrderedDict()
with open('/proc/{}/io'.format(os.getpid())) as fobj:
for line in fobj.readlines():
key, val = line.split(':')
iostat[key] = int(val)
- rusage = {}
+ rusage = OrderedDict()
# Skip unused fields, (i.e. 'ru_ixrss', 'ru_idrss', 'ru_isrss',
# 'ru_nswap', 'ru_msgsnd', 'ru_msgrcv' and 'ru_nsignals')
for key in ['ru_utime', 'ru_stime', 'ru_maxrss', 'ru_minflt',
@@ -374,33 +338,28 @@ class BuildPerfTestCase(unittest.TestCase):
log.info("Timing command: %s", cmd_str)
data_q = SimpleQueue()
try:
- with open(self.cmd_log_file, 'a') as fobj:
- proc = Process(target=_worker, args=(data_q, cmd,),
- kwargs={'stdout': fobj})
- proc.start()
- data = data_q.get()
- proc.join()
+ proc = Process(target=_worker, args=(data_q, cmd,))
+ proc.start()
+ data = data_q.get()
+ proc.join()
if isinstance(data, Exception):
raise data
except CommandError:
- log.error("Command '%s' failed, see %s for more details", cmd_str,
- self.cmd_log_file)
+ log.error("Command '%s' failed", cmd_str)
raise
etime = data['elapsed_time']
- measurement = {'type': self.SYSRES,
- 'name': name,
- 'legend': legend}
- measurement['values'] = {'start_time': data['start_time'],
- 'elapsed_time': etime,
- 'rusage': data['rusage'],
- 'iostat': data['iostat']}
+ measurement = OrderedDict([('type', self.SYSRES),
+ ('name', name),
+ ('legend', legend)])
+ measurement['values'] = OrderedDict([('start_time', data['start_time']),
+ ('elapsed_time', etime),
+ ('rusage', data['rusage']),
+ ('iostat', data['iostat'])])
if save_bs:
- bs_file = self.save_buildstats(legend)
- measurement['values']['buildstats_file'] = \
- os.path.relpath(bs_file, self.base_dir)
+ self.save_buildstats(name)
- self.measurements.append(measurement)
+ self._append_measurement(measurement)
# Append to 'times' array for globalres log
e_sec = etime.total_seconds()
@@ -408,20 +367,25 @@ class BuildPerfTestCase(unittest.TestCase):
int((e_sec % 3600) / 60),
e_sec % 60))
- def measure_disk_usage(self, path, name, legend):
+ def measure_disk_usage(self, path, name, legend, apparent_size=False):
"""Estimate disk usage of a file or directory"""
- ret = runCmd2(['du', '-s', path])
+ cmd = ['du', '-s', '--block-size', '1024']
+ if apparent_size:
+ cmd.append('--apparent-size')
+ cmd.append(path)
+
+ ret = runCmd2(cmd)
size = int(ret.output.split()[0])
log.debug("Size of %s path is %s", path, size)
- measurement = {'type': self.DISKUSAGE,
- 'name': name,
- 'legend': legend}
- measurement['values'] = {'size': size}
- self.measurements.append(measurement)
+ measurement = OrderedDict([('type', self.DISKUSAGE),
+ ('name', name),
+ ('legend', legend)])
+ measurement['values'] = OrderedDict([('size', size)])
+ self._append_measurement(measurement)
# Append to 'sizes' array for globalres log
self.sizes.append(str(size))
- def save_buildstats(self, label=None):
+ def save_buildstats(self, measurement_name):
"""Save buildstats"""
def split_nevr(nevr):
"""Split name and version information from recipe "nevr" string"""
@@ -440,9 +404,9 @@ class BuildPerfTestCase(unittest.TestCase):
def bs_to_json(filename):
"""Convert (task) buildstats file into json format"""
- bs_json = {'iostat': {},
- 'rusage': {},
- 'child_rusage': {}}
+ bs_json = OrderedDict()
+ iostat = OrderedDict()
+ rusage = OrderedDict()
with open(filename) as fobj:
for line in fobj.readlines():
key, val = line.split(':', 1)
@@ -454,7 +418,7 @@ class BuildPerfTestCase(unittest.TestCase):
end_time = datetime.utcfromtimestamp(float(val))
elif key.startswith('IO '):
split = key.split()
- bs_json['iostat'][split[1]] = int(val)
+ iostat[split[1]] = int(val)
elif key.find('rusage') >= 0:
split = key.split()
ru_key = split[-1]
@@ -462,12 +426,12 @@ class BuildPerfTestCase(unittest.TestCase):
val = float(val)
else:
val = int(val)
- ru_type = 'rusage' if split[0] == 'rusage' else \
- 'child_rusage'
- bs_json[ru_type][ru_key] = val
+ rusage[ru_key] = rusage.get(ru_key, 0) + val
elif key == 'Status':
bs_json['status'] = val
bs_json['elapsed_time'] = end_time - start_time
+ bs_json['rusage'] = rusage
+ bs_json['iostat'] = iostat
return bs_json
log.info('Saving buildstats in JSON format')
@@ -483,24 +447,17 @@ class BuildPerfTestCase(unittest.TestCase):
if not os.path.isdir(recipe_dir):
continue
name, epoch, version, revision = split_nevr(fname)
- recipe_bs = {'name': name,
- 'epoch': epoch,
- 'version': version,
- 'revision': revision,
- 'tasks': {}}
+ recipe_bs = OrderedDict((('name', name),
+ ('epoch', epoch),
+ ('version', version),
+ ('revision', revision),
+ ('tasks', OrderedDict())))
for task in os.listdir(recipe_dir):
recipe_bs['tasks'][task] = bs_to_json(os.path.join(recipe_dir,
task))
buildstats.append(recipe_bs)
- # Write buildstats into json file
- postfix = '.' + str_to_fn(label) if label else ''
- postfix += '.json'
- outfile = os.path.join(self.out_dir, 'buildstats' + postfix)
- with open(outfile, 'w') as fobj:
- json.dump(buildstats, fobj, indent=4, sort_keys=True,
- cls=ResultsJsonEncoder)
- return outfile
+ self.buildstats[measurement_name] = buildstats
def rm_tmp(self):
"""Cleanup temporary/intermediate files and directories"""
@@ -521,6 +478,7 @@ class BuildPerfTestCase(unittest.TestCase):
@staticmethod
def sync():
"""Sync and drop kernel caches"""
+ runCmd2('bitbake -m', ignore_status=True)
log.debug("Syncing and dropping kernel caches""")
KernelDropCaches.drop()
os.sync()
@@ -542,5 +500,5 @@ class BuildPerfTestRunner(unittest.TextTestRunner):
self.out_dir = out_dir
def _makeResult(self):
- return BuildPerfTestResult(self.out_dir, self.stream, self.descriptions,
- self.verbosity)
+ return BuildPerfTestResult(self.out_dir, self.stream, self.descriptions,
+ self.verbosity)
diff --git a/meta/lib/oeqa/buildperf/test_basic.py b/meta/lib/oeqa/buildperf/test_basic.py
index e448ed18c9..2104617ba3 100644
--- a/meta/lib/oeqa/buildperf/test_basic.py
+++ b/meta/lib/oeqa/buildperf/test_basic.py
@@ -1,13 +1,6 @@
# Copyright (c) 2016, Intel Corporation.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-#
-# This program is distributed in the hope 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.
+# SPDX-License-Identifier: GPL-2.0-only
#
"""Basic set of build performance tests"""
import os
@@ -15,14 +8,13 @@ import shutil
import oe.path
from oeqa.buildperf import BuildPerfTestCase
-from oeqa.utils.commands import get_bb_vars
-
+from oeqa.utils.commands import get_bb_var, get_bb_vars
class Test1P1(BuildPerfTestCase):
build_target = 'core-image-sato'
def test1(self):
- """Measure wall clock of bitbake core-image-sato and size of tmp dir"""
+ """Build core-image-sato"""
self.rm_tmp()
self.rm_sstate()
self.rm_cache()
@@ -30,16 +22,17 @@ class Test1P1(BuildPerfTestCase):
self.measure_cmd_resources(['bitbake', self.build_target], 'build',
'bitbake ' + self.build_target, save_bs=True)
self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
+ self.measure_disk_usage(get_bb_var("IMAGE_ROOTFS", self.build_target), 'rootfs', 'rootfs', True)
class Test1P2(BuildPerfTestCase):
build_target = 'virtual/kernel'
def test12(self):
- """Measure bitbake virtual/kernel"""
+ """Build virtual/kernel"""
# Build and cleans state in order to get all dependencies pre-built
- self.log_cmd_output(['bitbake', self.build_target])
- self.log_cmd_output(['bitbake', self.build_target, '-c', 'cleansstate'])
+ self.run_cmd(['bitbake', self.build_target])
+ self.run_cmd(['bitbake', self.build_target, '-c', 'cleansstate'])
self.sync()
self.measure_cmd_resources(['bitbake', self.build_target], 'build',
@@ -51,30 +44,28 @@ class Test1P3(BuildPerfTestCase):
def test13(self):
"""Build core-image-sato with rm_work enabled"""
- postfile = os.path.join(self.out_dir, 'postfile.conf')
+ postfile = os.path.join(self.tmp_dir, 'postfile.conf')
with open(postfile, 'w') as fobj:
fobj.write('INHERIT += "rm_work"\n')
- try:
- self.rm_tmp()
- self.rm_sstate()
- self.rm_cache()
- self.sync()
- cmd = ['bitbake', '-R', postfile, self.build_target]
- self.measure_cmd_resources(cmd, 'build',
- 'bitbake' + self.build_target,
- save_bs=True)
- self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
- finally:
- os.unlink(postfile)
+
+ self.rm_tmp()
+ self.rm_sstate()
+ self.rm_cache()
+ self.sync()
+ cmd = ['bitbake', '-R', postfile, self.build_target]
+ self.measure_cmd_resources(cmd, 'build',
+ 'bitbake' + self.build_target,
+ save_bs=True)
+ self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
class Test2(BuildPerfTestCase):
build_target = 'core-image-sato'
def test2(self):
- """Measure bitbake core-image-sato -c rootfs with sstate"""
+ """Run core-image-sato do_rootfs with sstate"""
# Build once in order to populate sstate cache
- self.log_cmd_output(['bitbake', self.build_target])
+ self.run_cmd(['bitbake', self.build_target])
self.rm_tmp()
self.rm_cache()
@@ -86,7 +77,7 @@ class Test2(BuildPerfTestCase):
class Test3(BuildPerfTestCase):
def test3(self):
- """Parsing time metrics (bitbake -p)"""
+ """Bitbake parsing (bitbake -p)"""
# Drop all caches and parse
self.rm_cache()
oe.path.remove(os.path.join(self.bb_vars['TMPDIR'], 'cache'), True)
@@ -106,15 +97,16 @@ class Test4(BuildPerfTestCase):
def test4(self):
"""eSDK metrics"""
- self.log_cmd_output("bitbake {} -c do_populate_sdk_ext".format(
- self.build_target))
+ self.run_cmd(['bitbake', '-c', 'do_populate_sdk_ext',
+ self.build_target])
self.bb_vars = get_bb_vars(None, self.build_target)
tmp_dir = self.bb_vars['TMPDIR']
installer = os.path.join(
self.bb_vars['SDK_DEPLOY'],
self.bb_vars['TOOLCHAINEXT_OUTPUTNAME'] + '.sh')
# Measure installer size
- self.measure_disk_usage(installer, 'installer_bin', 'eSDK installer')
+ self.measure_disk_usage(installer, 'installer_bin', 'eSDK installer',
+ apparent_size=True)
# Measure deployment time and deployed size
deploy_dir = os.path.join(tmp_dir, 'esdk-deploy')
if os.path.exists(deploy_dir):
@@ -122,4 +114,7 @@ class Test4(BuildPerfTestCase):
self.sync()
self.measure_cmd_resources([installer, '-y', '-d', deploy_dir],
'deploy', 'eSDK deploy')
- self.measure_disk_usage(deploy_dir, 'deploy_dir', 'deploy dir')
+ #make sure bitbake is unloaded
+ self.sync()
+ self.measure_disk_usage(deploy_dir, 'deploy_dir', 'deploy dir',
+ apparent_size=True)
diff --git a/meta/lib/oeqa/controllers/__init__.py b/meta/lib/oeqa/controllers/__init__.py
index 8eda92763c..cc3836c4bf 100644
--- a/meta/lib/oeqa/controllers/__init__.py
+++ b/meta/lib/oeqa/controllers/__init__.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Enable other layers to have modules in the same named directory
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py
index 9ce3bf803d..0435dfa125 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -1,7 +1,7 @@
# Copyright (C) 2014 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
-
+# SPDX-License-Identifier: MIT
+#
# This module adds support to testimage.bbclass to deploy images and run
# tests using a "master image" - this is a "known good" image that is
# installed onto the device as part of initial setup and will be booted into
@@ -32,14 +32,14 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
super(MasterImageHardwareTarget, self).__init__(d)
# target ip
- addr = d.getVar("TEST_TARGET_IP", True) or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.')
+ addr = d.getVar("TEST_TARGET_IP") or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.')
self.ip = addr.split(":")[0]
try:
self.port = addr.split(":")[1]
except IndexError:
self.port = None
bb.note("Target IP: %s" % self.ip)
- self.server_ip = d.getVar("TEST_SERVER_IP", True)
+ self.server_ip = d.getVar("TEST_SERVER_IP")
if not self.server_ip:
try:
self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1]
@@ -49,8 +49,8 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
# test rootfs + kernel
self.image_fstype = self.get_image_fstype(d)
- self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
- self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
+ self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("IMAGE_LINK_NAME") + '.' + self.image_fstype)
+ self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
if not os.path.isfile(self.rootfs):
# we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be
# the same as the config with which the image was build, ie
@@ -64,16 +64,16 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
# master ssh connection
self.master = None
# if the user knows what they are doing, then by all means...
- self.user_cmds = d.getVar("TEST_DEPLOY_CMDS", True)
+ self.user_cmds = d.getVar("TEST_DEPLOY_CMDS")
self.deploy_cmds = None
# this is the name of the command that controls the power for a board
# e.g: TEST_POWERCONTROL_CMD = "/home/user/myscripts/powercontrol.py ${MACHINE} what-ever-other-args-the-script-wants"
# the command should take as the last argument "off" and "on" and "cycle" (off, on)
- self.powercontrol_cmd = d.getVar("TEST_POWERCONTROL_CMD", True) or None
+ self.powercontrol_cmd = d.getVar("TEST_POWERCONTROL_CMD") or None
self.powercontrol_args = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS", False) or ""
- self.serialcontrol_cmd = d.getVar("TEST_SERIALCONTROL_CMD", True) or None
+ self.serialcontrol_cmd = d.getVar("TEST_SERIALCONTROL_CMD") or None
self.serialcontrol_args = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS", False) or ""
self.origenv = os.environ
@@ -82,7 +82,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
# ssh + keys means we need the original user env
bborigenv = d.getVar("BB_ORIGENV", False) or {}
for key in bborigenv:
- val = bborigenv.getVar(key, True)
+ val = bborigenv.getVar(key)
if val is not None:
self.origenv[key] = str(val)
@@ -108,7 +108,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
time.sleep(10)
self.power_ctl("cycle")
else:
- status, output = conn.run("reboot")
+ status, output = conn.run("sync; { sleep 1; reboot; } > /dev/null &")
if status != 0:
bb.error("Failed rebooting target and no power control command defined. You need to manually reset the device.\n%s" % output)
@@ -143,7 +143,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
def _deploy(self):
pass
- def start(self, params=None):
+ def start(self, extra_bootparams=None):
bb.plain("%s - boot test image on target" % self.pn)
self._start()
# set the ssh object for the target/test image
@@ -156,47 +156,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
def stop(self):
bb.plain("%s - reboot/powercycle target" % self.pn)
- self.power_cycle(self.connection)
-
-
-class GummibootTarget(MasterImageHardwareTarget):
-
- def __init__(self, d):
- super(GummibootTarget, self).__init__(d)
- # this the value we need to set in the LoaderEntryOneShot EFI variable
- # so the system boots the 'test' bootloader label and not the default
- # The first four bytes are EFI bits, and the rest is an utf-16le string
- # (EFI vars values need to be utf-16)
- # $ echo -en "test\0" | iconv -f ascii -t utf-16le | hexdump -C
- # 00000000 74 00 65 00 73 00 74 00 00 00 |t.e.s.t...|
- self.efivarvalue = r'\x07\x00\x00\x00\x74\x00\x65\x00\x73\x00\x74\x00\x00\x00'
- self.deploy_cmds = [
- 'mount -L boot /boot',
- 'mkdir -p /mnt/testrootfs',
- 'mount -L testrootfs /mnt/testrootfs',
- 'modprobe efivarfs',
- 'mount -t efivarfs efivarfs /sys/firmware/efi/efivars',
- 'cp ~/test-kernel /boot',
- 'rm -rf /mnt/testrootfs/*',
- 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype,
- 'printf "%s" > /sys/firmware/efi/efivars/LoaderEntryOneShot-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f' % self.efivarvalue
- ]
-
- def _deploy(self):
- # make sure these aren't mounted
- self.master.run("umount /boot; umount /mnt/testrootfs; umount /sys/firmware/efi/efivars;")
- # from now on, every deploy cmd should return 0
- # else an exception will be thrown by sshcontrol
- self.master.ignore_status = False
- self.master.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
- self.master.copy_to(self.kernel, "~/test-kernel")
- for cmd in self.deploy_cmds:
- self.master.run(cmd)
-
- def _start(self, params=None):
self.power_cycle(self.master)
- # there are better ways than a timeout but this should work for now
- time.sleep(120)
class SystemdbootTarget(MasterImageHardwareTarget):
diff --git a/meta/lib/oeqa/controllers/testtargetloader.py b/meta/lib/oeqa/controllers/testtargetloader.py
index a1b7b1d92b..23101c7371 100644
--- a/meta/lib/oeqa/controllers/testtargetloader.py
+++ b/meta/lib/oeqa/controllers/testtargetloader.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import types
import bb
import os
@@ -61,8 +65,6 @@ class TestTargetLoader:
obj = getattr(module, target)
if obj:
from oeqa.targetcontrol import BaseTarget
- if (not isinstance(obj, (type, types.ClassType))):
- bb.warn("Target {0} found, but not of type Class".format(target))
if( not issubclass(obj, BaseTarget)):
bb.warn("Target {0} found, but subclass is not BaseTarget".format(target))
except:
diff --git a/meta/lib/oeqa/core/README b/meta/lib/oeqa/core/README
new file mode 100644
index 0000000000..d4fcda41f2
--- /dev/null
+++ b/meta/lib/oeqa/core/README
@@ -0,0 +1,76 @@
+= OEQA (v2) Framework =
+
+== Introduction ==
+
+This is version 2 of the OEQA framework. Base clases are located in the
+'oeqa/core' directory and subsequent components must extend from these.
+
+The main design consideration was to implement the needed functionality on
+top of the Python unittest framework. To achieve this goal, the following
+modules are used:
+
+ * oeqa/core/runner.py: Provides OETestResult and OETestRunner base
+ classes extending the unittest class. These classes support exporting
+ results to different formats; currently RAW and XML support exist.
+
+ * oeqa/core/loader.py: Provides OETestLoader extending the unittest class.
+ It also features a unified implementation of decorator support and
+ filtering test cases.
+
+ * oeqa/core/case.py: Provides OETestCase base class extending
+ unittest.TestCase and provides access to the Test data (td), Test context
+ and Logger functionality.
+
+ * oeqa/core/decorator: Provides OETestDecorator, a new class to implement
+ decorators for Test cases.
+
+ * oeqa/core/context: Provides OETestContext, a high-level API for
+ loadTests and runTests of certain Test component and
+ OETestContextExecutor a base class to enable oe-test to discover/use
+ the Test component.
+
+Also, a new 'oe-test' runner is located under 'scripts', allowing scans for components
+that supports OETestContextExecutor (see below).
+
+== Terminology ==
+
+ * Test component: The area of testing in the Project, for example: runtime, SDK, eSDK, selftest.
+
+ * Test data: Data associated with the Test component. Currently we use bitbake datastore as
+ a Test data input.
+
+ * Test context: A context of what tests needs to be run and how to do it; this additionally
+ provides access to the Test data and could have custom methods and/or attrs.
+
+== oe-test ==
+
+The new tool, oe-test, has the ability to scan the code base for test components and provide
+a unified way to run test cases. Internally it scans folders inside oeqa module in order to find
+specific classes that implement a test component.
+
+== Usage ==
+
+Executing the example test component
+
+ $ source oe-init-build-env
+ $ oe-test core
+
+Getting help
+
+ $ oe-test -h
+
+== Creating new Test Component ==
+
+Adding a new test component the developer needs to extend OETestContext/OETestContextExecutor
+(from context.py) and OETestCase (from case.py)
+
+== Selftesting the framework ==
+
+Run all tests:
+
+ $ PATH=$PATH:../../ python3 -m unittest discover -s tests
+
+Run some test:
+
+ $ cd tests/
+ $ ./test_data.py
diff --git a/scripts/lib/wic/utils/__init__.py b/meta/lib/oeqa/core/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/wic/utils/__init__.py
+++ b/meta/lib/oeqa/core/__init__.py
diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
new file mode 100644
index 0000000000..aae451fef2
--- /dev/null
+++ b/meta/lib/oeqa/core/case.py
@@ -0,0 +1,100 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import base64
+import zlib
+import unittest
+
+from oeqa.core.exception import OEQAMissingVariable
+
+def _validate_td_vars(td, td_vars, type_msg):
+ if td_vars:
+ for v in td_vars:
+ if not v in td:
+ raise OEQAMissingVariable("Test %s need %s variable but"\
+ " isn't into td" % (type_msg, v))
+
+class OETestCase(unittest.TestCase):
+ # TestContext and Logger instance set by OETestLoader.
+ tc = None
+ logger = None
+
+ # td has all the variables needed by the test cases
+ # is the same across all the test cases.
+ td = None
+
+ # td_vars has the variables needed by a test class
+ # or test case instance, if some var isn't into td a
+ # OEQAMissingVariable exception is raised
+ td_vars = None
+
+ @classmethod
+ def _oeSetUpClass(clss):
+ _validate_td_vars(clss.td, clss.td_vars, "class")
+ if hasattr(clss, 'setUpHooker') and callable(getattr(clss, 'setUpHooker')):
+ clss.setUpHooker()
+ clss.setUpClassMethod()
+
+ @classmethod
+ def _oeTearDownClass(clss):
+ clss.tearDownClassMethod()
+
+ def _oeSetUp(self):
+ for d in self.decorators:
+ d.setUpDecorator()
+ self.setUpMethod()
+
+ def _oeTearDown(self):
+ for d in self.decorators:
+ d.tearDownDecorator()
+ self.tearDownMethod()
+
+class OEPTestResultTestCase:
+ """
+ Mix-in class to provide functions to make interacting with extraresults for
+ the purposes of storing ptestresult data.
+ """
+ @staticmethod
+ def _compress_log(log):
+ logdata = log.encode("utf-8") if isinstance(log, str) else log
+ logdata = zlib.compress(logdata)
+ logdata = base64.b64encode(logdata).decode("utf-8")
+ return {"compressed" : logdata}
+
+ def ptest_rawlog(self, log):
+ if not hasattr(self, "extraresults"):
+ self.extraresults = {"ptestresult.sections" : {}}
+ self.extraresults["ptestresult.rawlogs"] = {"log" : self._compress_log(log)}
+
+ def ptest_section(self, section, duration = None, log = None, logfile = None, exitcode = None):
+ if not hasattr(self, "extraresults"):
+ self.extraresults = {"ptestresult.sections" : {}}
+
+ sections = self.extraresults.get("ptestresult.sections")
+ if section not in sections:
+ sections[section] = {}
+
+ if log is not None:
+ sections[section]["log"] = self._compress_log(log)
+ elif logfile is not None:
+ with open(logfile, "rb") as f:
+ sections[section]["log"] = self._compress_log(f.read())
+
+ if duration is not None:
+ sections[section]["duration"] = duration
+ if exitcode is not None:
+ sections[section]["exitcode"] = exitcode
+
+ def ptest_result(self, section, test, result):
+ if not hasattr(self, "extraresults"):
+ self.extraresults = {"ptestresult.sections" : {}}
+
+ sections = self.extraresults.get("ptestresult.sections")
+ if section not in sections:
+ sections[section] = {}
+ resultname = "ptestresult.{}.{}".format(section, test)
+ self.extraresults[resultname] = {"status" : result}
+
diff --git a/meta/lib/oeqa/core/cases/__init__.py b/meta/lib/oeqa/core/cases/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/lib/oeqa/core/cases/__init__.py
diff --git a/meta/lib/oeqa/core/cases/example/data.json b/meta/lib/oeqa/core/cases/example/data.json
new file mode 100644
index 0000000000..21d6b16d17
--- /dev/null
+++ b/meta/lib/oeqa/core/cases/example/data.json
@@ -0,0 +1 @@
+{"ARCH": "x86", "IMAGE": "core-image-minimal"} \ No newline at end of file
diff --git a/meta/lib/oeqa/core/cases/example/test_basic.py b/meta/lib/oeqa/core/cases/example/test_basic.py
new file mode 100644
index 0000000000..d77edcdcec
--- /dev/null
+++ b/meta/lib/oeqa/core/cases/example/test_basic.py
@@ -0,0 +1,22 @@
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator.depends import OETestDepends
+
+class OETestExample(OETestCase):
+ def test_example(self):
+ self.logger.info('IMAGE: %s' % self.td.get('IMAGE'))
+ self.assertEqual('core-image-minimal', self.td.get('IMAGE'))
+ self.logger.info('ARCH: %s' % self.td.get('ARCH'))
+ self.assertEqual('x86', self.td.get('ARCH'))
+
+class OETestExampleDepend(OETestCase):
+ @OETestDepends(['OETestExample.test_example'])
+ def test_example_depends(self):
+ pass
+
+ def test_example_no_depends(self):
+ pass
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
new file mode 100644
index 0000000000..14fc6a54f4
--- /dev/null
+++ b/meta/lib/oeqa/core/context.py
@@ -0,0 +1,212 @@
+## Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import sys
+import json
+import time
+import logging
+import collections
+import unittest
+
+from oeqa.core.loader import OETestLoader
+from oeqa.core.runner import OETestRunner
+from oeqa.core.exception import OEQAMissingManifest, OEQATestNotFound
+
+class OETestContext(object):
+ loaderClass = OETestLoader
+ runnerClass = OETestRunner
+
+ files_dir = os.path.abspath(os.path.join(os.path.dirname(
+ os.path.abspath(__file__)), "../files"))
+
+ def __init__(self, td=None, logger=None):
+ if not type(td) is dict:
+ raise TypeError("td isn't dictionary type")
+
+ self.td = td
+ self.logger = logger
+ self._registry = {}
+ self._registry['cases'] = collections.OrderedDict()
+
+ def _read_modules_from_manifest(self, manifest):
+ if not os.path.exists(manifest):
+ raise OEQAMissingManifest("Manifest does not exist on %s" % manifest)
+
+ modules = []
+ for line in open(manifest).readlines():
+ line = line.strip()
+ if line and not line.startswith("#"):
+ modules.append(line)
+
+ return modules
+
+ def skipTests(self, skips):
+ if not skips:
+ return
+ def skipfuncgen(skipmsg):
+ def func():
+ raise unittest.SkipTest(skipmsg)
+ return func
+ class_ids = {}
+ for test in self.suites:
+ if test.__class__ not in class_ids:
+ class_ids[test.__class__] = '.'.join(test.id().split('.')[:-1])
+ for skip in skips:
+ if (test.id()+'.').startswith(skip+'.'):
+ setattr(test, 'setUp', skipfuncgen('Skip by the command line argument "%s"' % skip))
+ for tclass in class_ids:
+ cid = class_ids[tclass]
+ for skip in skips:
+ if (cid + '.').startswith(skip + '.'):
+ setattr(tclass, 'setUpHooker', skipfuncgen('Skip by the command line argument "%s"' % skip))
+
+ def loadTests(self, module_paths, modules=[], tests=[],
+ modules_manifest="", modules_required=[], **kwargs):
+ if modules_manifest:
+ modules = self._read_modules_from_manifest(modules_manifest)
+
+ self.loader = self.loaderClass(self, module_paths, modules, tests,
+ modules_required, **kwargs)
+ self.suites = self.loader.discover()
+
+ def runTests(self, processes=None, skips=[]):
+ self.runner = self.runnerClass(self, descriptions=False, verbosity=2)
+
+ # Dinamically skip those tests specified though arguments
+ self.skipTests(skips)
+
+ self._run_start_time = time.time()
+ if processes:
+ from oeqa.core.utils.concurrencytest import ConcurrentTestSuite
+
+ concurrent_suite = ConcurrentTestSuite(self.suites, processes)
+ result = self.runner.run(concurrent_suite)
+ else:
+ self.runner.buffer = True
+ result = self.runner.run(self.suites)
+ self._run_end_time = time.time()
+
+ return result
+
+ def listTests(self, display_type):
+ self.runner = self.runnerClass(self, verbosity=2)
+ return self.runner.list_tests(self.suites, display_type)
+
+class OETestContextExecutor(object):
+ _context_class = OETestContext
+ _script_executor = 'oe-test'
+
+ name = 'core'
+ help = 'core test component example'
+ description = 'executes core test suite example'
+
+ default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
+ 'cases/example')]
+ default_test_data = os.path.join(default_cases[0], 'data.json')
+ default_tests = None
+
+ def register_commands(self, logger, subparsers):
+ self.parser = subparsers.add_parser(self.name, help=self.help,
+ description=self.description, group='components')
+
+ self.default_output_log = '%s-results-%s.log' % (self.name,
+ time.strftime("%Y%m%d%H%M%S"))
+ self.parser.add_argument('--output-log', action='store',
+ default=self.default_output_log,
+ help="results output log, default: %s" % self.default_output_log)
+
+ group = self.parser.add_mutually_exclusive_group()
+ group.add_argument('--run-tests', action='store', nargs='+',
+ default=self.default_tests,
+ help="tests to run in <module>[.<class>[.<name>]]")
+ group.add_argument('--list-tests', action='store',
+ choices=('module', 'class', 'name'),
+ help="lists available tests")
+
+ if self.default_test_data:
+ self.parser.add_argument('--test-data-file', action='store',
+ default=self.default_test_data,
+ help="data file to load, default: %s" % self.default_test_data)
+ else:
+ self.parser.add_argument('--test-data-file', action='store',
+ help="data file to load")
+
+ if self.default_cases:
+ self.parser.add_argument('CASES_PATHS', action='store',
+ default=self.default_cases, nargs='*',
+ help="paths to directories with test cases, default: %s"\
+ % self.default_cases)
+ else:
+ self.parser.add_argument('CASES_PATHS', action='store',
+ nargs='+', help="paths to directories with test cases")
+
+ self.parser.set_defaults(func=self.run)
+
+ def _setup_logger(self, logger, args):
+ formatter = logging.Formatter('%(asctime)s - ' + self.name + \
+ ' - %(levelname)s - %(message)s')
+ sh = logger.handlers[0]
+ sh.setFormatter(formatter)
+ fh = logging.FileHandler(args.output_log)
+ fh.setFormatter(formatter)
+ logger.addHandler(fh)
+
+ return logger
+
+ def _process_args(self, logger, args):
+ self.tc_kwargs = {}
+ self.tc_kwargs['init'] = {}
+ self.tc_kwargs['load'] = {}
+ self.tc_kwargs['list'] = {}
+ self.tc_kwargs['run'] = {}
+
+ self.tc_kwargs['init']['logger'] = self._setup_logger(logger, args)
+ if args.test_data_file:
+ self.tc_kwargs['init']['td'] = json.load(
+ open(args.test_data_file, "r"))
+ else:
+ self.tc_kwargs['init']['td'] = {}
+
+ if args.run_tests:
+ self.tc_kwargs['load']['modules'] = args.run_tests
+ self.tc_kwargs['load']['modules_required'] = args.run_tests
+ else:
+ self.tc_kwargs['load']['modules'] = []
+
+ self.tc_kwargs['run']['skips'] = []
+
+ self.module_paths = args.CASES_PATHS
+
+ def _pre_run(self):
+ pass
+
+ def run(self, logger, args):
+ self._process_args(logger, args)
+
+ self.tc = self._context_class(**self.tc_kwargs['init'])
+ try:
+ self.tc.loadTests(self.module_paths, **self.tc_kwargs['load'])
+ except OEQATestNotFound as ex:
+ logger.error(ex)
+ sys.exit(1)
+
+ if args.list_tests:
+ rc = self.tc.listTests(args.list_tests, **self.tc_kwargs['list'])
+ else:
+ self._pre_run()
+ rc = self.tc.runTests(**self.tc_kwargs['run'])
+ rc.logDetails()
+ rc.logSummary(self.name)
+
+ output_link = os.path.join(os.path.dirname(args.output_log),
+ "%s-results.log" % self.name)
+ if os.path.exists(output_link):
+ os.remove(output_link)
+ os.symlink(args.output_log, output_link)
+
+ return rc
+
+_executor_class = OETestContextExecutor
diff --git a/meta/lib/oeqa/core/decorator/__init__.py b/meta/lib/oeqa/core/decorator/__init__.py
new file mode 100644
index 0000000000..1a82518ab6
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/__init__.py
@@ -0,0 +1,79 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from functools import wraps
+from abc import abstractmethod, ABCMeta
+from oeqa.core.utils.misc import strToList
+
+decoratorClasses = set()
+
+def registerDecorator(cls):
+ decoratorClasses.add(cls)
+ return cls
+
+class OETestDecorator(object, metaclass=ABCMeta):
+ case = None # Reference of OETestCase decorated
+ attrs = None # Attributes to be loaded by decorator implementation
+
+ def __init__(self, *args, **kwargs):
+ if not self.attrs:
+ return
+
+ for idx, attr in enumerate(self.attrs):
+ if attr in kwargs:
+ value = kwargs[attr]
+ else:
+ value = args[idx]
+ setattr(self, attr, value)
+
+ def __call__(self, func):
+ @wraps(func)
+ def wrapped_f(*args, **kwargs):
+ self.attrs = self.attrs # XXX: Enables OETestLoader discover
+ return func(*args, **kwargs)
+ return wrapped_f
+
+ # OETestLoader call it when is loading test cases.
+ # XXX: Most methods would change the registry for later
+ # processing; be aware that filtrate method needs to
+ # run later than bind, so there could be data (in the
+ # registry) of a cases that were filtered.
+ def bind(self, registry, case):
+ self.case = case
+ self.logger = case.tc.logger
+ self.case.decorators.append(self)
+
+ # OETestRunner call this method when tries to run
+ # the test case.
+ def setUpDecorator(self):
+ pass
+
+ # OETestRunner call it after a test method has been
+ # called even if the method raised an exception.
+ def tearDownDecorator(self):
+ pass
+
+class OETestDiscover(OETestDecorator):
+
+ # OETestLoader call it after discover test cases
+ # needs to return the cases to be run.
+ @staticmethod
+ def discover(registry):
+ return registry['cases']
+
+def OETestTag(*tags):
+ expandedtags = []
+ for tag in tags:
+ expandedtags += strToList(tag)
+ def decorator(item):
+ if hasattr(item, "__oeqa_testtags"):
+ # do not append, create a new list (to handle classes with inheritance)
+ item.__oeqa_testtags = list(item.__oeqa_testtags) + expandedtags
+ else:
+ item.__oeqa_testtags = expandedtags
+ return item
+ return decorator
+
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py
new file mode 100644
index 0000000000..bc4939e87c
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -0,0 +1,222 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.exception import OEQAMissingVariable
+
+from . import OETestDecorator, registerDecorator
+
+def has_feature(td, feature):
+ """
+ Checks for feature in DISTRO_FEATURES or IMAGE_FEATURES.
+ """
+
+ if (feature in td.get('DISTRO_FEATURES', '') or
+ feature in td.get('IMAGE_FEATURES', '')):
+ return True
+ return False
+
+def has_machine(td, machine):
+ """
+ Checks for MACHINE.
+ """
+
+ if (machine in td.get('MACHINE', '')):
+ return True
+ return False
+
+def is_qemu(td, qemu):
+ """
+ Checks if MACHINE is qemu.
+ """
+
+ machine = td.get('MACHINE', '')
+ if (qemu in td.get('MACHINE', '') or
+ machine.startswith('qemu')):
+ return True
+ return False
+
+@registerDecorator
+class skipIfDataVar(OETestDecorator):
+ """
+ Skip test based on value of a data store's variable.
+
+ It will get the info of var from the data store and will
+ check it against value; if are equal it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('var', 'value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %r value is %r to skip test' %
+ (self.var, self.value))
+ self.logger.debug(msg)
+ if self.case.td.get(self.var) == self.value:
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfNotDataVar(OETestDecorator):
+ """
+ Skip test based on value of a data store's variable.
+
+ It will get the info of var from the data store and will
+ check it against value; if are not equal it will skip the
+ test with msg as the reason.
+ """
+
+ attrs = ('var', 'value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %r value is not %r to skip test' %
+ (self.var, self.value))
+ self.logger.debug(msg)
+ if not self.case.td.get(self.var) == self.value:
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfInDataVar(OETestDecorator):
+ """
+ Skip test if value is in data store's variable.
+ """
+
+ attrs = ('var', 'value', 'msg')
+ def setUpDecorator(self):
+ msg = ('Checking if %r value contains %r to skip '
+ 'the test' % (self.var, self.value))
+ self.logger.debug(msg)
+ if self.value in (self.case.td.get(self.var)):
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfNotInDataVar(OETestDecorator):
+ """
+ Skip test if value is not in data store's variable.
+ """
+
+ attrs = ('var', 'value', 'msg')
+ def setUpDecorator(self):
+ msg = ('Checking if %r value contains %r to run '
+ 'the test' % (self.var, self.value))
+ self.logger.debug(msg)
+ if not self.value in (self.case.td.get(self.var) or ""):
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class OETestDataDepends(OETestDecorator):
+ attrs = ('td_depends',)
+
+ def setUpDecorator(self):
+ for v in self.td_depends:
+ try:
+ value = self.case.td[v]
+ except KeyError:
+ raise OEQAMissingVariable("Test case need %s variable but"\
+ " isn't into td" % v)
+
+@registerDecorator
+class skipIfNotFeature(OETestDecorator):
+ """
+ Skip test based on DISTRO_FEATURES.
+
+ value must be in distro features or it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %s is in DISTRO_FEATURES '
+ 'or IMAGE_FEATURES' % (self.value))
+ self.logger.debug(msg)
+ if not has_feature(self.case.td, self.value):
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfFeature(OETestDecorator):
+ """
+ Skip test based on DISTRO_FEATURES.
+
+ value must not be in distro features or it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %s is not in DISTRO_FEATURES '
+ 'or IMAGE_FEATURES' % (self.value))
+ self.logger.debug(msg)
+ if has_feature(self.case.td, self.value):
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfNotMachine(OETestDecorator):
+ """
+ Skip test based on MACHINE.
+
+ value must be match MACHINE or it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %s is not this MACHINE' % self.value)
+ self.logger.debug(msg)
+ if not has_machine(self.case.td, self.value):
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfMachine(OETestDecorator):
+ """
+ Skip test based on Machine.
+
+ value must not be this machine or it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %s is this MACHINE' % self.value)
+ self.logger.debug(msg)
+ if has_machine(self.case.td, self.value):
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfNotQemu(OETestDecorator):
+ """
+ Skip test based on MACHINE.
+
+ value must be a qemu MACHINE or it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %s is not this MACHINE' % self.value)
+ self.logger.debug(msg)
+ if not is_qemu(self.case.td, self.value):
+ self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfQemu(OETestDecorator):
+ """
+ Skip test based on Qemu Machine.
+
+ value must not be a qemu machine or it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %s is this MACHINE' % self.value)
+ self.logger.debug(msg)
+ if is_qemu(self.case.td, self.value):
+ self.case.skipTest(self.msg)
+
diff --git a/meta/lib/oeqa/core/decorator/depends.py b/meta/lib/oeqa/core/decorator/depends.py
new file mode 100644
index 0000000000..33f0841cab
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/depends.py
@@ -0,0 +1,98 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from unittest import SkipTest
+
+from oeqa.core.exception import OEQADependency
+
+from . import OETestDiscover, registerDecorator
+
+def _add_depends(registry, case, depends):
+ module_name = case.__module__
+ class_name = case.__class__.__name__
+
+ case_id = case.id()
+
+ for depend in depends:
+ dparts = depend.split('.')
+
+ if len(dparts) == 1:
+ depend_id = ".".join((module_name, class_name, dparts[0]))
+ elif len(dparts) == 2:
+ depend_id = ".".join((module_name, dparts[0], dparts[1]))
+ else:
+ depend_id = depend
+
+ if not case_id in registry:
+ registry[case_id] = []
+ if not depend_id in registry[case_id]:
+ registry[case_id].append(depend_id)
+
+def _validate_test_case_depends(cases, depends):
+ for case in depends:
+ if not case in cases:
+ continue
+ for dep in depends[case]:
+ if not dep in cases:
+ raise OEQADependency("TestCase %s depends on %s and isn't available"\
+ ", cases available %s." % (case, dep, str(cases.keys())))
+
+def _order_test_case_by_depends(cases, depends):
+ def _dep_resolve(graph, node, resolved, seen):
+ seen.append(node)
+ for edge in graph[node]:
+ if edge not in resolved:
+ if edge in seen:
+ raise OEQADependency("Test cases %s and %s have a circular" \
+ " dependency." % (node, edge))
+ _dep_resolve(graph, edge, resolved, seen)
+ resolved.append(node)
+
+ dep_graph = {}
+ dep_graph['__root__'] = cases.keys()
+ for case in cases:
+ if case in depends:
+ dep_graph[case] = depends[case]
+ else:
+ dep_graph[case] = []
+
+ cases_ordered = []
+ _dep_resolve(dep_graph, '__root__', cases_ordered, [])
+ cases_ordered.remove('__root__')
+
+ return [cases[case_id] for case_id in cases_ordered]
+
+def _skipTestDependency(case, depends):
+ for dep in depends:
+ found = False
+ for test, _ in case.tc.results.successes:
+ if test.id() == dep:
+ found = True
+ break
+ if not found:
+ raise SkipTest("Test case %s depends on %s but it didn't pass/run." \
+ % (case.id(), dep))
+
+@registerDecorator
+class OETestDepends(OETestDiscover):
+ attrs = ('depends',)
+
+ def bind(self, registry, case):
+ super(OETestDepends, self).bind(registry, case)
+ if not registry.get('depends'):
+ registry['depends'] = {}
+ _add_depends(registry['depends'], case, self.depends)
+
+ @staticmethod
+ def discover(registry):
+ if registry.get('depends'):
+ _validate_test_case_depends(registry['cases'], registry['depends'])
+ return _order_test_case_by_depends(registry['cases'], registry['depends'])
+ else:
+ return [registry['cases'][case_id] for case_id in registry['cases']]
+
+ def setUpDecorator(self):
+ _skipTestDependency(self.case, self.depends)
diff --git a/meta/lib/oeqa/core/decorator/oetimeout.py b/meta/lib/oeqa/core/decorator/oetimeout.py
new file mode 100644
index 0000000000..df90d1c798
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/oetimeout.py
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import signal
+from . import OETestDecorator, registerDecorator
+from oeqa.core.exception import OEQATimeoutError
+
+@registerDecorator
+class OETimeout(OETestDecorator):
+ attrs = ('oetimeout',)
+
+ def setUpDecorator(self):
+ timeout = self.oetimeout
+ def _timeoutHandler(signum, frame):
+ raise OEQATimeoutError("Timed out after %s "
+ "seconds of execution" % timeout)
+
+ self.logger.debug("Setting up a %d second(s) timeout" % self.oetimeout)
+ self.alarmSignal = signal.signal(signal.SIGALRM, _timeoutHandler)
+ signal.alarm(self.oetimeout)
+
+ def tearDownDecorator(self):
+ signal.alarm(0)
+ signal.signal(signal.SIGALRM, self.alarmSignal)
+ self.logger.debug("Removed SIGALRM handler")
diff --git a/meta/lib/oeqa/core/exception.py b/meta/lib/oeqa/core/exception.py
new file mode 100644
index 0000000000..05be0ed21f
--- /dev/null
+++ b/meta/lib/oeqa/core/exception.py
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+class OEQAException(Exception):
+ pass
+
+class OEQATimeoutError(OEQAException):
+ pass
+
+class OEQAMissingVariable(OEQAException):
+ pass
+
+class OEQADependency(OEQAException):
+ pass
+
+class OEQAMissingManifest(OEQAException):
+ pass
+
+class OEQAPreRun(OEQAException):
+ pass
+
+class OEQATestNotFound(OEQAException):
+ pass
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
new file mode 100644
index 0000000000..0d7970d49e
--- /dev/null
+++ b/meta/lib/oeqa/core/loader.py
@@ -0,0 +1,342 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+import sys
+import unittest
+import inspect
+
+from oeqa.core.utils.path import findFile
+from oeqa.core.utils.test import getSuiteModules, getCaseID
+
+from oeqa.core.exception import OEQATestNotFound
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator import decoratorClasses, OETestDecorator, \
+ OETestDiscover
+
+# When loading tests, the unittest framework stores any exceptions and
+# displays them only when the run method is called.
+#
+# For our purposes, it is better to raise the exceptions in the loading
+# step rather than waiting to run the test suite.
+#
+# Generate the function definition because this differ across python versions
+# Python >= 3.4.4 uses tree parameters instead four but for example Python 3.5.3
+# ueses four parameters so isn't incremental.
+_failed_test_args = inspect.getfullargspec(unittest.loader._make_failed_test).args
+exec("""def _make_failed_test(%s): raise exception""" % ', '.join(_failed_test_args))
+unittest.loader._make_failed_test = _make_failed_test
+
+def _find_duplicated_modules(suite, directory):
+ for module in getSuiteModules(suite):
+ path = findFile('%s.py' % module, directory)
+ if path:
+ raise ImportError("Duplicated %s module found in %s" % (module, path))
+
+def _built_modules_dict(modules):
+ modules_dict = {}
+
+ if modules == None:
+ return modules_dict
+
+ for module in modules:
+ # Assumption: package and module names do not contain upper case
+ # characters, whereas class names do
+ m = re.match(r'^(\w+)(?:\.(\w[^.]*)(?:\.([^.]+))?)?$', module, flags=re.ASCII)
+ if not m:
+ continue
+
+ module_name, class_name, test_name = m.groups()
+
+ if module_name and module_name not in modules_dict:
+ modules_dict[module_name] = {}
+ if class_name and class_name not in modules_dict[module_name]:
+ modules_dict[module_name][class_name] = []
+ if test_name and test_name not in modules_dict[module_name][class_name]:
+ modules_dict[module_name][class_name].append(test_name)
+
+ return modules_dict
+
+class OETestLoader(unittest.TestLoader):
+ caseClass = OETestCase
+
+ kwargs_names = ['testMethodPrefix', 'sortTestMethodUsing', 'suiteClass',
+ '_top_level_dir']
+
+ def __init__(self, tc, module_paths, modules, tests, modules_required,
+ *args, **kwargs):
+ self.tc = tc
+
+ self.modules = _built_modules_dict(modules)
+
+ self.tests = tests
+ self.modules_required = modules_required
+
+ self.tags_filter = kwargs.get("tags_filter", None)
+
+ if isinstance(module_paths, str):
+ module_paths = [module_paths]
+ elif not isinstance(module_paths, list):
+ raise TypeError('module_paths must be a str or a list of str')
+ self.module_paths = module_paths
+
+ for kwname in self.kwargs_names:
+ if kwname in kwargs:
+ setattr(self, kwname, kwargs[kwname])
+
+ self._patchCaseClass(self.caseClass)
+
+ super(OETestLoader, self).__init__()
+
+ def _patchCaseClass(self, testCaseClass):
+ # Adds custom attributes to the OETestCase class
+ setattr(testCaseClass, 'tc', self.tc)
+ setattr(testCaseClass, 'td', self.tc.td)
+ setattr(testCaseClass, 'logger', self.tc.logger)
+
+ def _registerTestCase(self, case):
+ case_id = case.id()
+ self.tc._registry['cases'][case_id] = case
+
+ def _handleTestCaseDecorators(self, case):
+ def _handle(obj):
+ if isinstance(obj, OETestDecorator):
+ if not obj.__class__ in decoratorClasses:
+ raise Exception("Decorator %s isn't registered" \
+ " in decoratorClasses." % obj.__name__)
+ obj.bind(self.tc._registry, case)
+
+ def _walk_closure(obj):
+ if hasattr(obj, '__closure__') and obj.__closure__:
+ for f in obj.__closure__:
+ obj = f.cell_contents
+ _handle(obj)
+ _walk_closure(obj)
+ method = getattr(case, case._testMethodName, None)
+ _walk_closure(method)
+
+ def _filterTest(self, case):
+ """
+ Returns True if test case must be filtered, False otherwise.
+ """
+ # XXX; If the module has more than one namespace only use
+ # the first to support run the whole module specifying the
+ # <module_name>.[test_class].[test_name]
+ module_name_small = case.__module__.split('.')[0]
+ module_name = case.__module__
+
+ class_name = case.__class__.__name__
+ test_name = case._testMethodName
+
+ # 'auto' is a reserved key word to run test cases automatically
+ # warn users if their test case belong to a module named 'auto'
+ if module_name_small == "auto":
+ bb.warn("'auto' is a reserved key word for TEST_SUITES. "
+ "But test case '%s' is detected to belong to auto module. "
+ "Please condier using a new name for your module." % str(case))
+
+ # check if case belongs to any specified module
+ # if 'auto' is specified, such check is skipped
+ if self.modules and not 'auto' in self.modules:
+ module = None
+ try:
+ module = self.modules[module_name_small]
+ except KeyError:
+ try:
+ module = self.modules[module_name]
+ except KeyError:
+ return True
+
+ if module:
+ if not class_name in module:
+ return True
+
+ if module[class_name]:
+ if test_name not in module[class_name]:
+ return True
+
+ # Decorator filters
+ if self.tags_filter is not None and callable(self.tags_filter):
+ alltags = set()
+ # pull tags from the case class
+ if hasattr(case, "__oeqa_testtags"):
+ for t in getattr(case, "__oeqa_testtags"):
+ alltags.add(t)
+ # pull tags from the method itself
+ if hasattr(case, test_name):
+ method = getattr(case, test_name)
+ if hasattr(method, "__oeqa_testtags"):
+ for t in getattr(method, "__oeqa_testtags"):
+ alltags.add(t)
+
+ if self.tags_filter(alltags):
+ return True
+
+ return False
+
+ def _getTestCase(self, testCaseClass, tcName):
+ if not hasattr(testCaseClass, '__oeqa_loader') and \
+ issubclass(testCaseClass, OETestCase):
+ # In order to support data_vars validation
+ # monkey patch the default setUp/tearDown{Class} to use
+ # the ones provided by OETestCase
+ setattr(testCaseClass, 'setUpClassMethod',
+ getattr(testCaseClass, 'setUpClass'))
+ setattr(testCaseClass, 'tearDownClassMethod',
+ getattr(testCaseClass, 'tearDownClass'))
+ setattr(testCaseClass, 'setUpClass',
+ testCaseClass._oeSetUpClass)
+ setattr(testCaseClass, 'tearDownClass',
+ testCaseClass._oeTearDownClass)
+
+ # In order to support decorators initialization
+ # monkey patch the default setUp/tearDown to use
+ # a setUpDecorators/tearDownDecorators that methods
+ # will call setUp/tearDown original methods.
+ setattr(testCaseClass, 'setUpMethod',
+ getattr(testCaseClass, 'setUp'))
+ setattr(testCaseClass, 'tearDownMethod',
+ getattr(testCaseClass, 'tearDown'))
+ setattr(testCaseClass, 'setUp', testCaseClass._oeSetUp)
+ setattr(testCaseClass, 'tearDown', testCaseClass._oeTearDown)
+
+ setattr(testCaseClass, '__oeqa_loader', True)
+
+ case = testCaseClass(tcName)
+ if isinstance(case, OETestCase):
+ setattr(case, 'decorators', [])
+
+ return case
+
+ def loadTestsFromTestCase(self, testCaseClass):
+ """
+ Returns a suite of all tests cases contained in testCaseClass.
+ """
+ if issubclass(testCaseClass, unittest.suite.TestSuite):
+ raise TypeError("Test cases should not be derived from TestSuite." \
+ " Maybe you meant to derive %s from TestCase?" \
+ % testCaseClass.__name__)
+ if not issubclass(testCaseClass, unittest.case.TestCase):
+ raise TypeError("Test %s is not derived from %s" % \
+ (testCaseClass.__name__, unittest.case.TestCase.__name__))
+
+ testCaseNames = self.getTestCaseNames(testCaseClass)
+ if not testCaseNames and hasattr(testCaseClass, 'runTest'):
+ testCaseNames = ['runTest']
+
+ suite = []
+ for tcName in testCaseNames:
+ case = self._getTestCase(testCaseClass, tcName)
+ # Filer by case id
+ if not (self.tests and not 'auto' in self.tests
+ and not getCaseID(case) in self.tests):
+ self._handleTestCaseDecorators(case)
+
+ # Filter by decorators
+ if not self._filterTest(case):
+ self._registerTestCase(case)
+ suite.append(case)
+
+ return self.suiteClass(suite)
+
+ def _required_modules_validation(self):
+ """
+ Search in Test context registry if a required
+ test is found, raise an exception when not found.
+ """
+
+ for module in self.modules_required:
+ found = False
+
+ # The module name is splitted to only compare the
+ # first part of a test case id.
+ comp_len = len(module.split('.'))
+ for case in self.tc._registry['cases']:
+ case_comp = '.'.join(case.split('.')[0:comp_len])
+ if module == case_comp:
+ found = True
+ break
+
+ if not found:
+ raise OEQATestNotFound("Not found %s in loaded test cases" % \
+ module)
+
+ def discover(self):
+ big_suite = self.suiteClass()
+ for path in self.module_paths:
+ _find_duplicated_modules(big_suite, path)
+ suite = super(OETestLoader, self).discover(path,
+ pattern='*.py', top_level_dir=path)
+ big_suite.addTests(suite)
+
+ cases = None
+ discover_classes = [clss for clss in decoratorClasses
+ if issubclass(clss, OETestDiscover)]
+ for clss in discover_classes:
+ cases = clss.discover(self.tc._registry)
+
+ if self.modules_required:
+ self._required_modules_validation()
+
+ return self.suiteClass(cases) if cases else big_suite
+
+ def _filterModule(self, module):
+ if module.__name__ in sys.builtin_module_names:
+ msg = 'Tried to import %s test module but is a built-in'
+ raise ImportError(msg % module.__name__)
+
+ # XXX; If the module has more than one namespace only use
+ # the first to support run the whole module specifying the
+ # <module_name>.[test_class].[test_name]
+ module_name_small = module.__name__.split('.')[0]
+ module_name = module.__name__
+
+ # Normal test modules are loaded if no modules were specified,
+ # if module is in the specified module list or if 'auto' is in
+ # module list.
+ # Underscore modules are loaded only if specified in module list.
+ load_module = True if not module_name.startswith('_') \
+ and (not self.modules \
+ or module_name in self.modules \
+ or module_name_small in self.modules \
+ or 'auto' in self.modules) \
+ else False
+
+ load_underscore = True if module_name.startswith('_') \
+ and (module_name in self.modules or \
+ module_name_small in self.modules) \
+ else False
+
+ return (load_module, load_underscore)
+
+
+ # XXX After Python 3.5, remove backward compatibility hacks for
+ # use_load_tests deprecation via *args and **kws. See issue 16662.
+ if sys.version_info >= (3,5):
+ def loadTestsFromModule(self, module, *args, pattern=None, **kws):
+ """
+ Returns a suite of all tests cases contained in module.
+ """
+ load_module, load_underscore = self._filterModule(module)
+
+ if load_module or load_underscore:
+ return super(OETestLoader, self).loadTestsFromModule(
+ module, *args, pattern=pattern, **kws)
+ else:
+ return self.suiteClass()
+ else:
+ def loadTestsFromModule(self, module, use_load_tests=True):
+ """
+ Returns a suite of all tests cases contained in module.
+ """
+ load_module, load_underscore = self._filterModule(module)
+
+ if load_module or load_underscore:
+ return super(OETestLoader, self).loadTestsFromModule(
+ module, use_load_tests)
+ else:
+ return self.suiteClass()
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
new file mode 100644
index 0000000000..f656e1a9c5
--- /dev/null
+++ b/meta/lib/oeqa/core/runner.py
@@ -0,0 +1,328 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import time
+import unittest
+import logging
+import re
+import json
+import sys
+
+from unittest import TextTestResult as _TestResult
+from unittest import TextTestRunner as _TestRunner
+
+class OEStreamLogger(object):
+ def __init__(self, logger):
+ self.logger = logger
+ self.buffer = ""
+
+ def write(self, msg):
+ if len(msg) > 1 and msg[0] != '\n':
+ if '...' in msg:
+ self.buffer += msg
+ elif self.buffer:
+ self.buffer += msg
+ self.logger.log(logging.INFO, self.buffer)
+ self.buffer = ""
+ else:
+ self.logger.log(logging.INFO, msg)
+
+ def flush(self):
+ for handler in self.logger.handlers:
+ handler.flush()
+
+class OETestResult(_TestResult):
+ def __init__(self, tc, *args, **kwargs):
+ super(OETestResult, self).__init__(*args, **kwargs)
+
+ self.successes = []
+ self.starttime = {}
+ self.endtime = {}
+ self.progressinfo = {}
+ self.extraresults = {}
+
+ # Inject into tc so that TestDepends decorator can see results
+ tc.results = self
+
+ self.tc = tc
+
+ # stdout and stderr for each test case
+ self.logged_output = {}
+
+ def startTest(self, test):
+ # May have been set by concurrencytest
+ if test.id() not in self.starttime:
+ self.starttime[test.id()] = time.time()
+ super(OETestResult, self).startTest(test)
+
+ def stopTest(self, test):
+ self.endtime[test.id()] = time.time()
+ if self.buffer:
+ self.logged_output[test.id()] = (
+ sys.stdout.getvalue(), sys.stderr.getvalue())
+ super(OETestResult, self).stopTest(test)
+ if test.id() in self.progressinfo:
+ self.tc.logger.info(self.progressinfo[test.id()])
+
+ # Print the errors/failures early to aid/speed debugging, its a pain
+ # to wait until selftest finishes to see them.
+ for t in ['failures', 'errors', 'skipped', 'expectedFailures']:
+ for (scase, msg) in getattr(self, t):
+ if test.id() == scase.id():
+ self.tc.logger.info(str(msg))
+ break
+
+ def logSummary(self, component, context_msg=''):
+ elapsed_time = self.tc._run_end_time - self.tc._run_start_time
+ self.tc.logger.info("SUMMARY:")
+ self.tc.logger.info("%s (%s) - Ran %d test%s in %.3fs" % (component,
+ context_msg, self.testsRun, self.testsRun != 1 and "s" or "",
+ elapsed_time))
+
+ if self.wasSuccessful():
+ msg = "%s - OK - All required tests passed" % component
+ else:
+ msg = "%s - FAIL - Required tests failed" % component
+ msg += " (successes=%d, skipped=%d, failures=%d, errors=%d)" % (len(self.successes), len(self.skipped), len(self.failures), len(self.errors))
+ self.tc.logger.info(msg)
+
+ def _getTestResultDetails(self, case):
+ result_types = {'failures': 'FAILED', 'errors': 'ERROR', 'skipped': 'SKIPPED',
+ 'expectedFailures': 'EXPECTEDFAIL', 'successes': 'PASSED',
+ 'unexpectedSuccesses' : 'PASSED'}
+
+ for rtype in result_types:
+ found = False
+ for resultclass in getattr(self, rtype):
+ # unexpectedSuccesses are just lists, not lists of tuples
+ if isinstance(resultclass, tuple):
+ scase, msg = resultclass
+ else:
+ scase, msg = resultclass, None
+ if case.id() == scase.id():
+ found = True
+ break
+ scase_str = str(scase.id())
+
+ # When fails at module or class level the class name is passed as string
+ # so figure out to see if match
+ m = re.search(r"^setUpModule \((?P<module_name>.*)\).*$", scase_str)
+ if m:
+ if case.__class__.__module__ == m.group('module_name'):
+ found = True
+ break
+
+ m = re.search(r"^setUpClass \((?P<class_name>.*)\).*$", scase_str)
+ if m:
+ class_name = "%s.%s" % (case.__class__.__module__,
+ case.__class__.__name__)
+
+ if class_name == m.group('class_name'):
+ found = True
+ break
+
+ if found:
+ return result_types[rtype], msg
+
+ return 'UNKNOWN', None
+
+ def extractExtraResults(self, test, details = None):
+ extraresults = None
+ if details is not None and "extraresults" in details:
+ extraresults = details.get("extraresults", {})
+ elif hasattr(test, "extraresults"):
+ extraresults = test.extraresults
+
+ if extraresults is not None:
+ for k, v in extraresults.items():
+ # handle updating already existing entries (e.g. ptestresults.sections)
+ if k in self.extraresults:
+ self.extraresults[k].update(v)
+ else:
+ self.extraresults[k] = v
+
+ def addError(self, test, *args, details = None):
+ self.extractExtraResults(test, details = details)
+ return super(OETestResult, self).addError(test, *args)
+
+ def addFailure(self, test, *args, details = None):
+ self.extractExtraResults(test, details = details)
+ return super(OETestResult, self).addFailure(test, *args)
+
+ def addSuccess(self, test, details = None):
+ #Added so we can keep track of successes too
+ self.successes.append((test, None))
+ self.extractExtraResults(test, details = details)
+ return super(OETestResult, self).addSuccess(test)
+
+ def addExpectedFailure(self, test, *args, details = None):
+ self.extractExtraResults(test, details = details)
+ return super(OETestResult, self).addExpectedFailure(test, *args)
+
+ def addUnexpectedSuccess(self, test, details = None):
+ self.extractExtraResults(test, details = details)
+ return super(OETestResult, self).addUnexpectedSuccess(test)
+
+ def logDetails(self, json_file_dir=None, configuration=None, result_id=None,
+ dump_streams=False):
+ self.tc.logger.info("RESULTS:")
+
+ result = self.extraresults
+ logs = {}
+ if hasattr(self.tc, "extraresults"):
+ result.update(self.tc.extraresults)
+
+ for case_name in self.tc._registry['cases']:
+ case = self.tc._registry['cases'][case_name]
+
+ (status, log) = self._getTestResultDetails(case)
+
+ t = ""
+ if case.id() in self.starttime and case.id() in self.endtime:
+ t = " (" + "{0:.2f}".format(self.endtime[case.id()] - self.starttime[case.id()]) + "s)"
+
+ if status not in logs:
+ logs[status] = []
+ logs[status].append("RESULTS - %s: %s%s" % (case.id(), status, t))
+ report = {'status': status}
+ if log:
+ report['log'] = log
+ if dump_streams and case.id() in self.logged_output:
+ (stdout, stderr) = self.logged_output[case.id()]
+ report['stdout'] = stdout
+ report['stderr'] = stderr
+ result[case.id()] = report
+
+ for i in ['PASSED', 'SKIPPED', 'EXPECTEDFAIL', 'ERROR', 'FAILED', 'UNKNOWN']:
+ if i not in logs:
+ continue
+ for l in logs[i]:
+ self.tc.logger.info(l)
+
+ if json_file_dir:
+ tresultjsonhelper = OETestResultJSONHelper()
+ tresultjsonhelper.dump_testresult_file(json_file_dir, configuration, result_id, result)
+
+ def wasSuccessful(self):
+ # Override as we unexpected successes aren't failures for us
+ return (len(self.failures) == len(self.errors) == 0)
+
+class OEListTestsResult(object):
+ def wasSuccessful(self):
+ return True
+
+class OETestRunner(_TestRunner):
+ streamLoggerClass = OEStreamLogger
+
+ def __init__(self, tc, *args, **kwargs):
+ kwargs['stream'] = self.streamLoggerClass(tc.logger)
+ super(OETestRunner, self).__init__(*args, **kwargs)
+ self.tc = tc
+ self.resultclass = OETestResult
+
+ def _makeResult(self):
+ return self.resultclass(self.tc, self.stream, self.descriptions,
+ self.verbosity)
+
+ def _walk_suite(self, suite, func):
+ for obj in suite:
+ if isinstance(obj, unittest.suite.TestSuite):
+ if len(obj._tests):
+ self._walk_suite(obj, func)
+ elif isinstance(obj, unittest.case.TestCase):
+ func(self.tc.logger, obj)
+ self._walked_cases = self._walked_cases + 1
+
+ def _list_tests_name(self, suite):
+ self._walked_cases = 0
+
+ def _list_cases(logger, case):
+ oetags = []
+ if hasattr(case, '__oeqa_testtags'):
+ oetags = getattr(case, '__oeqa_testtags')
+ if oetags:
+ logger.info("%s (%s)" % (case.id(), ",".join(oetags)))
+ else:
+ logger.info("%s" % (case.id()))
+
+ self.tc.logger.info("Listing all available tests:")
+ self._walked_cases = 0
+ self.tc.logger.info("test (tags)")
+ self.tc.logger.info("-" * 80)
+ self._walk_suite(suite, _list_cases)
+ self.tc.logger.info("-" * 80)
+ self.tc.logger.info("Total found:\t%s" % self._walked_cases)
+
+ def _list_tests_class(self, suite):
+ self._walked_cases = 0
+
+ curr = {}
+ def _list_classes(logger, case):
+ if not 'module' in curr or curr['module'] != case.__module__:
+ curr['module'] = case.__module__
+ logger.info(curr['module'])
+
+ if not 'class' in curr or curr['class'] != \
+ case.__class__.__name__:
+ curr['class'] = case.__class__.__name__
+ logger.info(" -- %s" % curr['class'])
+
+ logger.info(" -- -- %s" % case._testMethodName)
+
+ self.tc.logger.info("Listing all available test classes:")
+ self._walk_suite(suite, _list_classes)
+
+ def _list_tests_module(self, suite):
+ self._walked_cases = 0
+
+ listed = []
+ def _list_modules(logger, case):
+ if not case.__module__ in listed:
+ if case.__module__.startswith('_'):
+ logger.info("%s (hidden)" % case.__module__)
+ else:
+ logger.info(case.__module__)
+ listed.append(case.__module__)
+
+ self.tc.logger.info("Listing all available test modules:")
+ self._walk_suite(suite, _list_modules)
+
+ def list_tests(self, suite, display_type):
+ if display_type == 'name':
+ self._list_tests_name(suite)
+ elif display_type == 'class':
+ self._list_tests_class(suite)
+ elif display_type == 'module':
+ self._list_tests_module(suite)
+
+ return OEListTestsResult()
+
+class OETestResultJSONHelper(object):
+
+ testresult_filename = 'testresults.json'
+
+ def _get_existing_testresults_if_available(self, write_dir):
+ testresults = {}
+ file = os.path.join(write_dir, self.testresult_filename)
+ if os.path.exists(file):
+ with open(file, "r") as f:
+ testresults = json.load(f)
+ return testresults
+
+ def _write_file(self, write_dir, file_name, file_content):
+ file_path = os.path.join(write_dir, file_name)
+ with open(file_path, 'w') as the_file:
+ the_file.write(file_content)
+
+ def dump_testresult_file(self, write_dir, configuration, result_id, test_result):
+ bb.utils.mkdirhier(write_dir)
+ lf = bb.utils.lockfile(os.path.join(write_dir, 'jsontestresult.lock'))
+ test_results = self._get_existing_testresults_if_available(write_dir)
+ test_results[result_id] = {'configuration': configuration, 'result': test_result}
+ json_testresults = json.dumps(test_results, sort_keys=True, indent=4)
+ self._write_file(write_dir, self.testresult_filename, json_testresults)
+ bb.utils.unlockfile(lf)
diff --git a/meta/lib/oeqa/core/target/__init__.py b/meta/lib/oeqa/core/target/__init__.py
new file mode 100644
index 0000000000..1382aa9b52
--- /dev/null
+++ b/meta/lib/oeqa/core/target/__init__.py
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from abc import abstractmethod
+
+class OETarget(object):
+
+ def __init__(self, logger, *args, **kwargs):
+ self.logger = logger
+
+ @abstractmethod
+ def start(self):
+ pass
+
+ @abstractmethod
+ def stop(self):
+ pass
+
+ @abstractmethod
+ def run(self, cmd, timeout=None):
+ pass
+
+ @abstractmethod
+ def copyTo(self, localSrc, remoteDst):
+ pass
+
+ @abstractmethod
+ def copyFrom(self, remoteSrc, localDst):
+ pass
+
+ @abstractmethod
+ def copyDirTo(self, localSrc, remoteDst):
+ pass
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
new file mode 100644
index 0000000000..758703c0d1
--- /dev/null
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import sys
+import signal
+import time
+
+from .ssh import OESSHTarget
+from oeqa.utils.qemurunner import QemuRunner
+
+supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
+
+class OEQemuTarget(OESSHTarget):
+ def __init__(self, logger, server_ip, timeout=300, user='root',
+ port=None, machine='', rootfs='', kernel='', kvm=False, slirp=False,
+ dump_dir='', dump_host_cmds='', display='', bootlog='',
+ tmpdir='', dir_image='', boottime=60, **kwargs):
+
+ super(OEQemuTarget, self).__init__(logger, None, server_ip, timeout,
+ user, port)
+
+ self.server_ip = server_ip
+ self.server_port = 0
+ self.machine = machine
+ self.rootfs = rootfs
+ self.kernel = kernel
+ self.kvm = kvm
+ self.use_slirp = slirp
+
+ self.runner = QemuRunner(machine=machine, rootfs=rootfs, tmpdir=tmpdir,
+ deploy_dir_image=dir_image, display=display,
+ logfile=bootlog, boottime=boottime,
+ use_kvm=kvm, use_slirp=slirp, dump_dir=dump_dir,
+ dump_host_cmds=dump_host_cmds, logger=logger)
+
+ def start(self, params=None, extra_bootparams=None, runqemuparams=''):
+ if self.use_slirp and not self.server_ip:
+ self.logger.error("Could not start qemu with slirp without server ip - provide 'TEST_SERVER_IP'")
+ raise RuntimeError("FAILED to start qemu - check the task log and the boot log")
+ if self.runner.start(params, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams):
+ self.ip = self.runner.ip
+ if self.use_slirp:
+ target_ip_port = self.runner.ip.split(':')
+ if len(target_ip_port) == 2:
+ target_ip = target_ip_port[0]
+ port = target_ip_port[1]
+ self.ip = target_ip
+ self.ssh = self.ssh + ['-p', port]
+ self.scp = self.scp + ['-P', port]
+ else:
+ self.logger.error("Could not get host machine port to connect qemu with slirp, ssh will not be "
+ "able to connect to qemu with slirp")
+ if self.runner.server_ip:
+ self.server_ip = self.runner.server_ip
+ else:
+ self.stop()
+ raise RuntimeError("FAILED to start qemu - check the task log and the boot log")
+
+ def stop(self):
+ self.runner.stop()
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
new file mode 100644
index 0000000000..63fc9468b3
--- /dev/null
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -0,0 +1,271 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import time
+import select
+import logging
+import subprocess
+import codecs
+
+from . import OETarget
+
+class OESSHTarget(OETarget):
+ def __init__(self, logger, ip, server_ip, timeout=300, user='root',
+ port=None, server_port=0, **kwargs):
+ if not logger:
+ logger = logging.getLogger('target')
+ logger.setLevel(logging.INFO)
+ filePath = os.path.join(os.getcwd(), 'remoteTarget.log')
+ fileHandler = logging.FileHandler(filePath, 'w', 'utf-8')
+ formatter = logging.Formatter(
+ '%(asctime)s.%(msecs)03d %(levelname)s: %(message)s',
+ '%H:%M:%S')
+ fileHandler.setFormatter(formatter)
+ logger.addHandler(fileHandler)
+
+ super(OESSHTarget, self).__init__(logger)
+ self.ip = ip
+ self.server_ip = server_ip
+ self.server_port = server_port
+ self.timeout = timeout
+ self.user = user
+ ssh_options = [
+ '-o', 'UserKnownHostsFile=/dev/null',
+ '-o', 'StrictHostKeyChecking=no',
+ '-o', 'LogLevel=ERROR'
+ ]
+ self.ssh = ['ssh', '-l', self.user ] + ssh_options
+ self.scp = ['scp'] + ssh_options
+ if port:
+ self.ssh = self.ssh + [ '-p', port ]
+ self.scp = self.scp + [ '-P', port ]
+
+ def start(self, **kwargs):
+ pass
+
+ def stop(self, **kwargs):
+ pass
+
+ def _run(self, command, timeout=None, ignore_status=True):
+ """
+ Runs command in target using SSHProcess.
+ """
+ self.logger.debug("[Running]$ %s" % " ".join(command))
+
+ starttime = time.time()
+ status, output = SSHCall(command, self.logger, timeout)
+ self.logger.debug("[Command returned '%d' after %.2f seconds]"
+ "" % (status, time.time() - starttime))
+
+ if status and not ignore_status:
+ raise AssertionError("Command '%s' returned non-zero exit "
+ "status %d:\n%s" % (command, status, output))
+
+ return (status, output)
+
+ def run(self, command, timeout=None):
+ """
+ Runs command in target.
+
+ command: Command to run on target.
+ timeout: <value>: Kill command after <val> seconds.
+ None: Kill command default value seconds.
+ 0: No timeout, runs until return.
+ """
+ targetCmd = 'export PATH=/usr/sbin:/sbin:/usr/bin:/bin; %s' % command
+ sshCmd = self.ssh + [self.ip, targetCmd]
+
+ if timeout:
+ processTimeout = timeout
+ elif timeout==0:
+ processTimeout = None
+ else:
+ processTimeout = self.timeout
+
+ status, output = self._run(sshCmd, processTimeout, True)
+ self.logger.debug('Command: %s\nOutput: %s\n' % (command, output))
+ return (status, output)
+
+ def copyTo(self, localSrc, remoteDst):
+ """
+ Copy file to target.
+
+ If local file is symlink, recreate symlink in target.
+ """
+ if os.path.islink(localSrc):
+ link = os.readlink(localSrc)
+ dstDir, dstBase = os.path.split(remoteDst)
+ sshCmd = 'cd %s; ln -s %s %s' % (dstDir, link, dstBase)
+ return self.run(sshCmd)
+
+ else:
+ remotePath = '%s@%s:%s' % (self.user, self.ip, remoteDst)
+ scpCmd = self.scp + [localSrc, remotePath]
+ return self._run(scpCmd, ignore_status=False)
+
+ def copyFrom(self, remoteSrc, localDst):
+ """
+ Copy file from target.
+ """
+ remotePath = '%s@%s:%s' % (self.user, self.ip, remoteSrc)
+ scpCmd = self.scp + [remotePath, localDst]
+ return self._run(scpCmd, ignore_status=False)
+
+ def copyDirTo(self, localSrc, remoteDst):
+ """
+ Copy recursively localSrc directory to remoteDst in target.
+ """
+
+ for root, dirs, files in os.walk(localSrc):
+ # Create directories in the target as needed
+ for d in dirs:
+ tmpDir = os.path.join(root, d).replace(localSrc, "")
+ newDir = os.path.join(remoteDst, tmpDir.lstrip("/"))
+ cmd = "mkdir -p %s" % newDir
+ self.run(cmd)
+
+ # Copy files into the target
+ for f in files:
+ tmpFile = os.path.join(root, f).replace(localSrc, "")
+ dstFile = os.path.join(remoteDst, tmpFile.lstrip("/"))
+ srcFile = os.path.join(root, f)
+ self.copyTo(srcFile, dstFile)
+
+ def deleteFiles(self, remotePath, files):
+ """
+ Deletes files in target's remotePath.
+ """
+
+ cmd = "rm"
+ if not isinstance(files, list):
+ files = [files]
+
+ for f in files:
+ cmd = "%s %s" % (cmd, os.path.join(remotePath, f))
+
+ self.run(cmd)
+
+
+ def deleteDir(self, remotePath):
+ """
+ Deletes target's remotePath directory.
+ """
+
+ cmd = "rmdir %s" % remotePath
+ self.run(cmd)
+
+
+ def deleteDirStructure(self, localPath, remotePath):
+ """
+ Delete recursively localPath structure directory in target's remotePath.
+
+ This function is very usefult to delete a package that is installed in
+ the DUT and the host running the test has such package extracted in tmp
+ directory.
+
+ Example:
+ pwd: /home/user/tmp
+ tree: .
+ └── work
+ ├── dir1
+ │   └── file1
+ └── dir2
+
+ localpath = "/home/user/tmp" and remotepath = "/home/user"
+
+ With the above variables this function will try to delete the
+ directory in the DUT in this order:
+ /home/user/work/dir1/file1
+ /home/user/work/dir1 (if dir is empty)
+ /home/user/work/dir2 (if dir is empty)
+ /home/user/work (if dir is empty)
+ """
+
+ for root, dirs, files in os.walk(localPath, topdown=False):
+ # Delete files first
+ tmpDir = os.path.join(root).replace(localPath, "")
+ remoteDir = os.path.join(remotePath, tmpDir.lstrip("/"))
+ self.deleteFiles(remoteDir, files)
+
+ # Remove dirs if empty
+ for d in dirs:
+ tmpDir = os.path.join(root, d).replace(localPath, "")
+ remoteDir = os.path.join(remotePath, tmpDir.lstrip("/"))
+ self.deleteDir(remoteDir)
+
+def SSHCall(command, logger, timeout=None, **opts):
+
+ def run():
+ nonlocal output
+ nonlocal process
+ starttime = time.time()
+ process = subprocess.Popen(command, **options)
+ if timeout:
+ endtime = starttime + timeout
+ eof = False
+ while time.time() < endtime and not eof:
+ logger.debug('time: %s, endtime: %s' % (time.time(), endtime))
+ try:
+ if select.select([process.stdout], [], [], 5)[0] != []:
+ reader = codecs.getreader('utf-8')(process.stdout, 'ignore')
+ data = reader.read(1024, 4096)
+ if not data:
+ process.stdout.close()
+ eof = True
+ else:
+ output += data
+ logger.debug('Partial data from SSH call: %s' % data)
+ endtime = time.time() + timeout
+ except InterruptedError:
+ continue
+
+ # process hasn't returned yet
+ if not eof:
+ process.terminate()
+ time.sleep(5)
+ try:
+ process.kill()
+ except OSError:
+ pass
+ endtime = time.time() - starttime
+ lastline = ("\nProcess killed - no output for %d seconds. Total"
+ " running time: %d seconds." % (timeout, endtime))
+ logger.debug('Received data from SSH call %s ' % lastline)
+ output += lastline
+
+ else:
+ output = process.communicate()[0].decode('utf-8', errors='ignore')
+ logger.debug('Data from SSH call: %s' % output.rstrip())
+
+ options = {
+ "stdout": subprocess.PIPE,
+ "stderr": subprocess.STDOUT,
+ "stdin": None,
+ "shell": False,
+ "bufsize": -1,
+ "preexec_fn": os.setsid,
+ }
+ options.update(opts)
+ output = ''
+ process = None
+
+ # Unset DISPLAY which means we won't trigger SSH_ASKPASS
+ env = os.environ.copy()
+ if "DISPLAY" in env:
+ del env['DISPLAY']
+ options['env'] = env
+
+ try:
+ run()
+ except:
+ # Need to guard against a SystemExit or other exception ocurring
+ # whilst running and ensure we don't leave a process behind.
+ if process.poll() is None:
+ process.kill()
+ logger.debug('Something went wrong, killing SSH process')
+ raise
+ return (process.wait(), output.rstrip())
diff --git a/meta/lib/oeqa/core/tests/__init__.py b/meta/lib/oeqa/core/tests/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/__init__.py
diff --git a/meta/lib/oeqa/core/tests/cases/data.py b/meta/lib/oeqa/core/tests/cases/data.py
new file mode 100644
index 0000000000..61f88547f7
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/data.py
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator import OETestTag
+from oeqa.core.decorator.data import OETestDataDepends
+
+class DataTest(OETestCase):
+ data_vars = ['IMAGE', 'ARCH']
+
+ @OETestDataDepends(['MACHINE',])
+ @OETestTag('dataTestOk')
+ def testDataOk(self):
+ self.assertEqual(self.td.get('IMAGE'), 'core-image-minimal')
+ self.assertEqual(self.td.get('ARCH'), 'x86')
+ self.assertEqual(self.td.get('MACHINE'), 'qemuarm')
+
+ @OETestTag('dataTestFail')
+ def testDataFail(self):
+ pass
diff --git a/meta/lib/oeqa/core/tests/cases/depends.py b/meta/lib/oeqa/core/tests/cases/depends.py
new file mode 100644
index 0000000000..46e7db900d
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/depends.py
@@ -0,0 +1,41 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator.depends import OETestDepends
+
+class DependsTest(OETestCase):
+
+ def testDependsFirst(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestDepends(['testDependsFirst'])
+ def testDependsSecond(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestDepends(['testDependsSecond'])
+ def testDependsThird(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestDepends(['testDependsSecond'])
+ def testDependsFourth(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestDepends(['testDependsThird', 'testDependsFourth'])
+ def testDependsFifth(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestDepends(['testDependsCircular3'])
+ def testDependsCircular1(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestDepends(['testDependsCircular1'])
+ def testDependsCircular2(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestDepends(['testDependsCircular2'])
+ def testDependsCircular3(self):
+ self.assertTrue(True, msg='How is this possible?')
diff --git a/meta/lib/oeqa/core/tests/cases/loader/valid/another.py b/meta/lib/oeqa/core/tests/cases/loader/valid/another.py
new file mode 100644
index 0000000000..bedc20c8a6
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/loader/valid/another.py
@@ -0,0 +1,12 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.case import OETestCase
+
+class AnotherTest(OETestCase):
+
+ def testAnother(self):
+ self.assertTrue(True, msg='How is this possible?')
diff --git a/meta/lib/oeqa/core/tests/cases/oetag.py b/meta/lib/oeqa/core/tests/cases/oetag.py
new file mode 100644
index 0000000000..52f97dfda6
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/oetag.py
@@ -0,0 +1,38 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator import OETestTag
+
+class TagTest(OETestCase):
+ @OETestTag('goodTag')
+ def testTagGood(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestTag('otherTag')
+ def testTagOther(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestTag('otherTag', 'multiTag')
+ def testTagOtherMulti(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ def testTagNone(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+@OETestTag('classTag')
+class TagClassTest(OETestCase):
+ @OETestTag('otherTag')
+ def testTagOther(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETestTag('otherTag', 'multiTag')
+ def testTagOtherMulti(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ def testTagNone(self):
+ self.assertTrue(True, msg='How is this possible?')
+
diff --git a/meta/lib/oeqa/core/tests/cases/timeout.py b/meta/lib/oeqa/core/tests/cases/timeout.py
new file mode 100644
index 0000000000..5dfecc7b7c
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/timeout.py
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from time import sleep
+
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator.oetimeout import OETimeout
+
+class TimeoutTest(OETestCase):
+
+ @OETimeout(1)
+ def testTimeoutPass(self):
+ self.assertTrue(True, msg='How is this possible?')
+
+ @OETimeout(1)
+ def testTimeoutFail(self):
+ sleep(2)
+ self.assertTrue(True, msg='How is this possible?')
diff --git a/meta/lib/oeqa/core/tests/common.py b/meta/lib/oeqa/core/tests/common.py
new file mode 100644
index 0000000000..88cc758ad3
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/common.py
@@ -0,0 +1,38 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import sys
+import os
+
+import unittest
+import logging
+import os
+
+logger = logging.getLogger("oeqa")
+logger.setLevel(logging.INFO)
+consoleHandler = logging.StreamHandler()
+formatter = logging.Formatter('OEQATest: %(message)s')
+consoleHandler.setFormatter(formatter)
+logger.addHandler(consoleHandler)
+
+def setup_sys_path():
+ directory = os.path.dirname(os.path.abspath(__file__))
+ oeqa_lib = os.path.realpath(os.path.join(directory, '../../../'))
+ if not oeqa_lib in sys.path:
+ sys.path.insert(0, oeqa_lib)
+
+class TestBase(unittest.TestCase):
+ def setUp(self):
+ self.logger = logger
+ directory = os.path.dirname(os.path.abspath(__file__))
+ self.cases_path = os.path.join(directory, 'cases')
+
+ def _testLoader(self, d={}, modules=[], tests=[], **kwargs):
+ from oeqa.core.context import OETestContext
+ tc = OETestContext(d, self.logger)
+ tc.loadTests(self.cases_path, modules=modules, tests=tests,
+ **kwargs)
+ return tc
diff --git a/meta/lib/oeqa/core/tests/test_data.py b/meta/lib/oeqa/core/tests/test_data.py
new file mode 100755
index 0000000000..ac74098b78
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/test_data.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python3
+
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import unittest
+import logging
+import os
+
+from common import setup_sys_path, TestBase
+setup_sys_path()
+
+from oeqa.core.exception import OEQAMissingVariable
+from oeqa.core.utils.test import getCaseMethod, getSuiteCasesNames
+
+class TestData(TestBase):
+ modules = ['data']
+
+ def test_data_fail_missing_variable(self):
+ expectedException = "oeqa.core.exception.OEQAMissingVariable"
+
+ tc = self._testLoader(modules=self.modules)
+ results = tc.runTests()
+ self.assertFalse(results.wasSuccessful())
+ for test, data in results.errors:
+ expect = False
+ if expectedException in data:
+ expect = True
+
+ self.assertTrue(expect)
+
+ def test_data_fail_wrong_variable(self):
+ expectedError = 'AssertionError'
+ d = {'IMAGE' : 'core-image-sato', 'ARCH' : 'arm'}
+
+ tc = self._testLoader(d=d, modules=self.modules)
+ results = tc.runTests()
+ self.assertFalse(results.wasSuccessful())
+ for test, data in results.failures:
+ expect = False
+ if expectedError in data:
+ expect = True
+
+ self.assertTrue(expect)
+
+ def test_data_ok(self):
+ d = {'IMAGE' : 'core-image-minimal', 'ARCH' : 'x86', 'MACHINE' : 'qemuarm'}
+
+ tc = self._testLoader(d=d, modules=self.modules)
+ self.assertEqual(True, tc.runTests().wasSuccessful())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/meta/lib/oeqa/core/tests/test_decorators.py b/meta/lib/oeqa/core/tests/test_decorators.py
new file mode 100755
index 0000000000..b798bf7d33
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/test_decorators.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import signal
+import unittest
+
+from common import setup_sys_path, TestBase
+setup_sys_path()
+
+from oeqa.core.exception import OEQADependency
+from oeqa.core.utils.test import getCaseMethod, getSuiteCasesNames, getSuiteCasesIDs
+
+class TestTagDecorator(TestBase):
+ def _runTest(self, modules, filterfn, expect):
+ tc = self._testLoader(modules = modules, tags_filter = filterfn)
+ test_loaded = set(getSuiteCasesIDs(tc.suites))
+ self.assertEqual(expect, test_loaded)
+
+ def test_oetag(self):
+ # get all cases without any filtering
+ self._runTest(['oetag'], None, {
+ 'oetag.TagTest.testTagGood',
+ 'oetag.TagTest.testTagOther',
+ 'oetag.TagTest.testTagOtherMulti',
+ 'oetag.TagTest.testTagNone',
+ 'oetag.TagClassTest.testTagOther',
+ 'oetag.TagClassTest.testTagOtherMulti',
+ 'oetag.TagClassTest.testTagNone',
+ })
+
+ # exclude any case with tags
+ self._runTest(['oetag'], lambda tags: tags, {
+ 'oetag.TagTest.testTagNone',
+ })
+
+ # exclude any case with otherTag
+ self._runTest(['oetag'], lambda tags: "otherTag" in tags, {
+ 'oetag.TagTest.testTagGood',
+ 'oetag.TagTest.testTagNone',
+ 'oetag.TagClassTest.testTagNone',
+ })
+
+ # exclude any case with classTag
+ self._runTest(['oetag'], lambda tags: "classTag" in tags, {
+ 'oetag.TagTest.testTagGood',
+ 'oetag.TagTest.testTagOther',
+ 'oetag.TagTest.testTagOtherMulti',
+ 'oetag.TagTest.testTagNone',
+ })
+
+ # include any case with classTag
+ self._runTest(['oetag'], lambda tags: "classTag" not in tags, {
+ 'oetag.TagClassTest.testTagOther',
+ 'oetag.TagClassTest.testTagOtherMulti',
+ 'oetag.TagClassTest.testTagNone',
+ })
+
+ # include any case with classTag or no tags
+ self._runTest(['oetag'], lambda tags: tags and "classTag" not in tags, {
+ 'oetag.TagTest.testTagNone',
+ 'oetag.TagClassTest.testTagOther',
+ 'oetag.TagClassTest.testTagOtherMulti',
+ 'oetag.TagClassTest.testTagNone',
+ })
+
+class TestDependsDecorator(TestBase):
+ modules = ['depends']
+
+ def test_depends_order(self):
+ tests = ['depends.DependsTest.testDependsFirst',
+ 'depends.DependsTest.testDependsSecond',
+ 'depends.DependsTest.testDependsThird',
+ 'depends.DependsTest.testDependsFourth',
+ 'depends.DependsTest.testDependsFifth']
+ tests2 = list(tests)
+ tests2[2], tests2[3] = tests[3], tests[2]
+ tc = self._testLoader(modules=self.modules, tests=tests)
+ test_loaded = getSuiteCasesIDs(tc.suites)
+ result = True if test_loaded == tests or test_loaded == tests2 else False
+ msg = 'Failed to order tests using OETestDepends decorator.\nTest order:'\
+ ' %s.\nExpected: %s\nOr: %s' % (test_loaded, tests, tests2)
+ self.assertTrue(result, msg=msg)
+
+ def test_depends_fail_missing_dependency(self):
+ expect = "TestCase depends.DependsTest.testDependsSecond depends on "\
+ "depends.DependsTest.testDependsFirst and isn't available"
+ tests = ['depends.DependsTest.testDependsSecond']
+ try:
+ # Must throw OEQADependency because missing 'testDependsFirst'
+ tc = self._testLoader(modules=self.modules, tests=tests)
+ self.fail('Expected OEQADependency exception')
+ except OEQADependency as e:
+ result = True if expect in str(e) else False
+ msg = 'Expected OEQADependency exception missing testDependsFirst test'
+ self.assertTrue(result, msg=msg)
+
+ def test_depends_fail_circular_dependency(self):
+ expect = 'have a circular dependency'
+ tests = ['depends.DependsTest.testDependsCircular1',
+ 'depends.DependsTest.testDependsCircular2',
+ 'depends.DependsTest.testDependsCircular3']
+ try:
+ # Must throw OEQADependency because circular dependency
+ tc = self._testLoader(modules=self.modules, tests=tests)
+ self.fail('Expected OEQADependency exception')
+ except OEQADependency as e:
+ result = True if expect in str(e) else False
+ msg = 'Expected OEQADependency exception having a circular dependency'
+ self.assertTrue(result, msg=msg)
+
+class TestTimeoutDecorator(TestBase):
+ modules = ['timeout']
+
+ def test_timeout(self):
+ tests = ['timeout.TimeoutTest.testTimeoutPass']
+ msg = 'Failed to run test using OETestTimeout'
+ alarm_signal = signal.getsignal(signal.SIGALRM)
+ tc = self._testLoader(modules=self.modules, tests=tests)
+ self.assertTrue(tc.runTests().wasSuccessful(), msg=msg)
+ msg = "OETestTimeout didn't restore SIGALRM"
+ self.assertIs(alarm_signal, signal.getsignal(signal.SIGALRM), msg=msg)
+
+ def test_timeout_fail(self):
+ tests = ['timeout.TimeoutTest.testTimeoutFail']
+ msg = "OETestTimeout test didn't timeout as expected"
+ alarm_signal = signal.getsignal(signal.SIGALRM)
+ tc = self._testLoader(modules=self.modules, tests=tests)
+ self.assertFalse(tc.runTests().wasSuccessful(), msg=msg)
+ msg = "OETestTimeout didn't restore SIGALRM"
+ self.assertIs(alarm_signal, signal.getsignal(signal.SIGALRM), msg=msg)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/meta/lib/oeqa/core/tests/test_loader.py b/meta/lib/oeqa/core/tests/test_loader.py
new file mode 100755
index 0000000000..cb38ac845e
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/test_loader.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import unittest
+
+from common import setup_sys_path, TestBase
+setup_sys_path()
+
+from oeqa.core.exception import OEQADependency
+from oeqa.core.utils.test import getSuiteModules, getSuiteCasesIDs
+
+class TestLoader(TestBase):
+ @unittest.skip("invalid directory is missing oetag.py")
+ def test_fail_duplicated_module(self):
+ cases_path = self.cases_path
+ invalid_path = os.path.join(cases_path, 'loader', 'invalid')
+ self.cases_path = [self.cases_path, invalid_path]
+ expect = 'Duplicated oetag module found in'
+ msg = 'Expected ImportError exception for having duplicated module'
+ try:
+ # Must throw ImportEror because duplicated module
+ tc = self._testLoader()
+ self.fail(msg)
+ except ImportError as e:
+ result = True if expect in str(e) else False
+ self.assertTrue(result, msg=msg)
+ finally:
+ self.cases_path = cases_path
+
+ def test_filter_modules(self):
+ expected_modules = {'oetag'}
+ tc = self._testLoader(modules=expected_modules)
+ modules = getSuiteModules(tc.suites)
+ msg = 'Expected just %s modules' % ', '.join(expected_modules)
+ self.assertEqual(modules, expected_modules, msg=msg)
+
+ def test_filter_cases(self):
+ modules = ['oetag', 'data']
+ expected_cases = {'data.DataTest.testDataOk',
+ 'oetag.TagTest.testTagGood'}
+ tc = self._testLoader(modules=modules, tests=expected_cases)
+ cases = set(getSuiteCasesIDs(tc.suites))
+ msg = 'Expected just %s cases' % ', '.join(expected_cases)
+ self.assertEqual(cases, expected_cases, msg=msg)
+
+ def test_import_from_paths(self):
+ cases_path = self.cases_path
+ cases2_path = os.path.join(cases_path, 'loader', 'valid')
+ expected_modules = {'another'}
+ self.cases_path = [self.cases_path, cases2_path]
+ tc = self._testLoader(modules=expected_modules)
+ modules = getSuiteModules(tc.suites)
+ self.cases_path = cases_path
+ msg = 'Expected modules from two different paths'
+ self.assertEqual(modules, expected_modules, msg=msg)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/meta/lib/oeqa/core/tests/test_runner.py b/meta/lib/oeqa/core/tests/test_runner.py
new file mode 100755
index 0000000000..205464cfae
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/test_runner.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import unittest
+import logging
+import tempfile
+
+from common import setup_sys_path, TestBase
+setup_sys_path()
+
+from oeqa.core.runner import OEStreamLogger
+
+class TestRunner(TestBase):
+ def test_stream_logger(self):
+ fp = tempfile.TemporaryFile(mode='w+')
+
+ logging.basicConfig(format='%(message)s', stream=fp)
+ logger = logging.getLogger()
+ logger.setLevel(logging.INFO)
+
+ oeSL = OEStreamLogger(logger)
+
+ lines = ['init', 'bigline_' * 65535, 'morebigline_' * 65535 * 4, 'end']
+ for line in lines:
+ oeSL.write(line)
+
+ fp.seek(0)
+ fp_lines = fp.readlines()
+ for i, fp_line in enumerate(fp_lines):
+ fp_line = fp_line.strip()
+ self.assertEqual(lines[i], fp_line)
+
+ fp.close()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/meta/lib/oeqa/core/utils/__init__.py b/meta/lib/oeqa/core/utils/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/__init__.py
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
new file mode 100644
index 0000000000..71ec0df5fa
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -0,0 +1,354 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Modified for use in OE by Richard Purdie, 2018
+#
+# Modified by: Corey Goldberg, 2013
+# License: GPLv2+
+#
+# Original code from:
+# Bazaar (bzrlib.tests.__init__.py, v2.6, copied Jun 01 2013)
+# Copyright (C) 2005-2011 Canonical Ltd
+# License: GPLv2+
+
+import os
+import sys
+import traceback
+import unittest
+import subprocess
+import testtools
+import threading
+import time
+import io
+import json
+import subunit
+
+from queue import Queue
+from itertools import cycle
+from subunit import ProtocolTestCase, TestProtocolClient
+from subunit.test_results import AutoTimingTestResultDecorator
+from testtools import ThreadsafeForwardingResult, iterate_tests
+from testtools.content import Content
+from testtools.content_type import ContentType
+from oeqa.utils.commands import get_test_layer
+
+import bb.utils
+import oe.path
+
+_all__ = [
+ 'ConcurrentTestSuite',
+ 'fork_for_tests',
+ 'partition_tests',
+]
+
+#
+# Patch the version from testtools to allow access to _test_start and allow
+# computation of timing information and threading progress
+#
+class BBThreadsafeForwardingResult(ThreadsafeForwardingResult):
+
+ def __init__(self, target, semaphore, threadnum, totalinprocess, totaltests):
+ super(BBThreadsafeForwardingResult, self).__init__(target, semaphore)
+ self.threadnum = threadnum
+ self.totalinprocess = totalinprocess
+ self.totaltests = totaltests
+
+ def _add_result_with_semaphore(self, method, test, *args, **kwargs):
+ self.semaphore.acquire()
+ try:
+ if self._test_start:
+ self.result.starttime[test.id()] = self._test_start.timestamp()
+ self.result.threadprogress[self.threadnum].append(test.id())
+ totalprogress = sum(len(x) for x in self.result.threadprogress.values())
+ self.result.progressinfo[test.id()] = "%s: %s/%s %s/%s (%ss) (%s)" % (
+ self.threadnum,
+ len(self.result.threadprogress[self.threadnum]),
+ self.totalinprocess,
+ totalprogress,
+ self.totaltests,
+ "{0:.2f}".format(time.time()-self._test_start.timestamp()),
+ test.id())
+ finally:
+ self.semaphore.release()
+ super(BBThreadsafeForwardingResult, self)._add_result_with_semaphore(method, test, *args, **kwargs)
+
+class ProxyTestResult:
+ # a very basic TestResult proxy, in order to modify add* calls
+ def __init__(self, target):
+ self.result = target
+
+ def _addResult(self, method, test, *args, exception = False, **kwargs):
+ return method(test, *args, **kwargs)
+
+ def addError(self, test, err = None, **kwargs):
+ self._addResult(self.result.addError, test, err, exception = True, **kwargs)
+
+ def addFailure(self, test, err = None, **kwargs):
+ self._addResult(self.result.addFailure, test, err, exception = True, **kwargs)
+
+ def addSuccess(self, test, **kwargs):
+ self._addResult(self.result.addSuccess, test, **kwargs)
+
+ def addExpectedFailure(self, test, err = None, **kwargs):
+ self._addResult(self.result.addExpectedFailure, test, err, exception = True, **kwargs)
+
+ def addUnexpectedSuccess(self, test, **kwargs):
+ self._addResult(self.result.addUnexpectedSuccess, test, **kwargs)
+
+ def __getattr__(self, attr):
+ return getattr(self.result, attr)
+
+class ExtraResultsDecoderTestResult(ProxyTestResult):
+ def _addResult(self, method, test, *args, exception = False, **kwargs):
+ if "details" in kwargs and "extraresults" in kwargs["details"]:
+ if isinstance(kwargs["details"]["extraresults"], Content):
+ kwargs = kwargs.copy()
+ kwargs["details"] = kwargs["details"].copy()
+ extraresults = kwargs["details"]["extraresults"]
+ data = bytearray()
+ for b in extraresults.iter_bytes():
+ data += b
+ extraresults = json.loads(data.decode())
+ kwargs["details"]["extraresults"] = extraresults
+ return method(test, *args, **kwargs)
+
+class ExtraResultsEncoderTestResult(ProxyTestResult):
+ def _addResult(self, method, test, *args, exception = False, **kwargs):
+ if hasattr(test, "extraresults"):
+ extras = lambda : [json.dumps(test.extraresults).encode()]
+ kwargs = kwargs.copy()
+ if "details" not in kwargs:
+ kwargs["details"] = {}
+ else:
+ kwargs["details"] = kwargs["details"].copy()
+ kwargs["details"]["extraresults"] = Content(ContentType("application", "json", {'charset': 'utf8'}), extras)
+ # if using details, need to encode any exceptions into the details obj,
+ # testtools does not handle "err" and "details" together.
+ if "details" in kwargs and exception and (len(args) >= 1 and args[0] is not None):
+ kwargs["details"]["traceback"] = testtools.content.TracebackContent(args[0], test)
+ args = []
+ return method(test, *args, **kwargs)
+
+#
+# We have to patch subunit since it doesn't understand how to handle addError
+# outside of a running test case. This can happen if classSetUp() fails
+# for a class of tests. This unfortunately has horrible internal knowledge.
+#
+def outSideTestaddError(self, offset, line):
+ """An 'error:' directive has been read."""
+ test_name = line[offset:-1].decode('utf8')
+ self.parser._current_test = subunit.RemotedTestCase(test_name)
+ self.parser.current_test_description = test_name
+ self.parser._state = self.parser._reading_error_details
+ self.parser._reading_error_details.set_simple()
+ self.parser.subunitLineReceived(line)
+
+subunit._OutSideTest.addError = outSideTestaddError
+
+
+#
+# A dummy structure to add to io.StringIO so that the .buffer object
+# is available and accepts writes. This allows unittest with buffer=True
+# to interact ok with subunit which wants to access sys.stdout.buffer.
+#
+class dummybuf(object):
+ def __init__(self, parent):
+ self.p = parent
+ def write(self, data):
+ self.p.write(data.decode("utf-8"))
+
+#
+# Taken from testtools.ConncurrencyTestSuite but modified for OE use
+#
+class ConcurrentTestSuite(unittest.TestSuite):
+
+ def __init__(self, suite, processes):
+ super(ConcurrentTestSuite, self).__init__([suite])
+ self.processes = processes
+
+ def run(self, result):
+ tests, totaltests = fork_for_tests(self.processes, self)
+ try:
+ threads = {}
+ queue = Queue()
+ semaphore = threading.Semaphore(1)
+ result.threadprogress = {}
+ for i, (test, testnum) in enumerate(tests):
+ result.threadprogress[i] = []
+ process_result = BBThreadsafeForwardingResult(
+ ExtraResultsDecoderTestResult(result),
+ semaphore, i, testnum, totaltests)
+ # Force buffering of stdout/stderr so the console doesn't get corrupted by test output
+ # as per default in parent code
+ process_result.buffer = True
+ # We have to add a buffer object to stdout to keep subunit happy
+ process_result._stderr_buffer = io.StringIO()
+ process_result._stderr_buffer.buffer = dummybuf(process_result._stderr_buffer)
+ process_result._stdout_buffer = io.StringIO()
+ process_result._stdout_buffer.buffer = dummybuf(process_result._stdout_buffer)
+ reader_thread = threading.Thread(
+ target=self._run_test, args=(test, process_result, queue))
+ threads[test] = reader_thread, process_result
+ reader_thread.start()
+ while threads:
+ finished_test = queue.get()
+ threads[finished_test][0].join()
+ del threads[finished_test]
+ except:
+ for thread, process_result in threads.values():
+ process_result.stop()
+ raise
+ finally:
+ for test in tests:
+ test[0]._stream.close()
+
+ def _run_test(self, test, process_result, queue):
+ try:
+ try:
+ test.run(process_result)
+ except Exception:
+ # The run logic itself failed
+ case = testtools.ErrorHolder(
+ "broken-runner",
+ error=sys.exc_info())
+ case.run(process_result)
+ finally:
+ queue.put(test)
+
+def removebuilddir(d):
+ delay = 5
+ while delay and os.path.exists(d + "/bitbake.lock"):
+ time.sleep(1)
+ delay = delay - 1
+ # Deleting these directories takes a lot of time, use autobuilder
+ # clobberdir if its available
+ clobberdir = os.path.expanduser("~/yocto-autobuilder-helper/janitor/clobberdir")
+ if os.path.exists(clobberdir):
+ try:
+ subprocess.check_call([clobberdir, d])
+ return
+ except subprocess.CalledProcessError:
+ pass
+ bb.utils.prunedir(d, ionice=True)
+
+def fork_for_tests(concurrency_num, suite):
+ result = []
+ if 'BUILDDIR' in os.environ:
+ selftestdir = get_test_layer()
+
+ test_blocks = partition_tests(suite, concurrency_num)
+ # Clear the tests from the original suite so it doesn't keep them alive
+ suite._tests[:] = []
+ totaltests = sum(len(x) for x in test_blocks)
+ for process_tests in test_blocks:
+ numtests = len(process_tests)
+ process_suite = unittest.TestSuite(process_tests)
+ # Also clear each split list so new suite has only reference
+ process_tests[:] = []
+ c2pread, c2pwrite = os.pipe()
+ # Clear buffers before fork to avoid duplicate output
+ sys.stdout.flush()
+ sys.stderr.flush()
+ pid = os.fork()
+ if pid == 0:
+ ourpid = os.getpid()
+ try:
+ newbuilddir = None
+ stream = os.fdopen(c2pwrite, 'wb', 1)
+ os.close(c2pread)
+
+ # Create a new separate BUILDDIR for each group of tests
+ if 'BUILDDIR' in os.environ:
+ builddir = os.environ['BUILDDIR']
+ newbuilddir = builddir + "-st-" + str(ourpid)
+ newselftestdir = newbuilddir + "/meta-selftest"
+
+ bb.utils.mkdirhier(newbuilddir)
+ oe.path.copytree(builddir + "/conf", newbuilddir + "/conf")
+ oe.path.copytree(builddir + "/cache", newbuilddir + "/cache")
+ oe.path.copytree(selftestdir, newselftestdir)
+
+ for e in os.environ:
+ if builddir in os.environ[e]:
+ os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
+
+ subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True)
+
+ # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow
+ subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True)
+
+ os.chdir(newbuilddir)
+
+ for t in process_suite:
+ if not hasattr(t, "tc"):
+ continue
+ cp = t.tc.config_paths
+ for p in cp:
+ if selftestdir in cp[p] and newselftestdir not in cp[p]:
+ cp[p] = cp[p].replace(selftestdir, newselftestdir)
+ if builddir in cp[p] and newbuilddir not in cp[p]:
+ cp[p] = cp[p].replace(builddir, newbuilddir)
+
+ # Leave stderr and stdout open so we can see test noise
+ # Close stdin so that the child goes away if it decides to
+ # read from stdin (otherwise its a roulette to see what
+ # child actually gets keystrokes for pdb etc).
+ newsi = os.open(os.devnull, os.O_RDWR)
+ os.dup2(newsi, sys.stdin.fileno())
+
+ subunit_client = TestProtocolClient(stream)
+ # Force buffering of stdout/stderr so the console doesn't get corrupted by test output
+ # as per default in parent code
+ subunit_client.buffer = True
+ subunit_result = AutoTimingTestResultDecorator(subunit_client)
+ process_suite.run(ExtraResultsEncoderTestResult(subunit_result))
+ if ourpid != os.getpid():
+ os._exit(0)
+ if newbuilddir:
+ removebuilddir(newbuilddir)
+ except:
+ # Don't do anything with process children
+ if ourpid != os.getpid():
+ os._exit(1)
+ # Try and report traceback on stream, but exit with error
+ # even if stream couldn't be created or something else
+ # goes wrong. The traceback is formatted to a string and
+ # written in one go to avoid interleaving lines from
+ # multiple failing children.
+ try:
+ stream.write(traceback.format_exc().encode('utf-8'))
+ except:
+ sys.stderr.write(traceback.format_exc())
+ finally:
+ if newbuilddir:
+ removebuilddir(newbuilddir)
+ stream.flush()
+ os._exit(1)
+ stream.flush()
+ os._exit(0)
+ else:
+ os.close(c2pwrite)
+ stream = os.fdopen(c2pread, 'rb', 1)
+ test = ProtocolTestCase(stream)
+ result.append((test, numtests))
+ return result, totaltests
+
+def partition_tests(suite, count):
+ # Keep tests from the same class together but allow tests from modules
+ # to go to different processes to aid parallelisation.
+ modules = {}
+ for test in iterate_tests(suite):
+ m = test.__module__ + "." + test.__class__.__name__
+ if m not in modules:
+ modules[m] = []
+ modules[m].append(test)
+
+ # Simply divide the test blocks between the available processes
+ partitions = [list() for _ in range(count)]
+ for partition, m in zip(cycle(partitions), modules):
+ partition.extend(modules[m])
+
+ # No point in empty threads so drop them
+ return [p for p in partitions if p]
+
diff --git a/meta/lib/oeqa/core/utils/misc.py b/meta/lib/oeqa/core/utils/misc.py
new file mode 100644
index 0000000000..e1a59588eb
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/misc.py
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+def toList(obj, obj_type, obj_name="Object"):
+ if isinstance(obj, obj_type):
+ return [obj]
+ elif isinstance(obj, list):
+ return obj
+ else:
+ raise TypeError("%s must be %s or list" % (obj_name, obj_type))
+
+def toSet(obj, obj_type, obj_name="Object"):
+ if isinstance(obj, obj_type):
+ return {obj}
+ elif isinstance(obj, list):
+ return set(obj)
+ elif isinstance(obj, set):
+ return obj
+ else:
+ raise TypeError("%s must be %s or set" % (obj_name, obj_type))
+
+def strToList(obj, obj_name="Object"):
+ return toList(obj, str, obj_name)
+
+def strToSet(obj, obj_name="Object"):
+ return toSet(obj, str, obj_name)
+
+def intToList(obj, obj_name="Object"):
+ return toList(obj, int, obj_name)
+
+def dataStoteToDict(d, variables):
+ data = {}
+
+ for v in variables:
+ data[v] = d.getVar(v)
+
+ return data
+
+def updateTestData(d, td, variables):
+ """
+ Updates variables with values of data store to test data.
+ """
+ for var in variables:
+ td[var] = d.getVar(var)
diff --git a/meta/lib/oeqa/core/utils/path.py b/meta/lib/oeqa/core/utils/path.py
new file mode 100644
index 0000000000..c086dcb0b0
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/path.py
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import sys
+
+def findFile(file_name, directory):
+ """
+ Search for a file in directory and returns its complete path.
+ """
+ for r, d, f in os.walk(directory):
+ if file_name in f:
+ return os.path.join(r, file_name)
+ return None
+
+def remove_safe(path):
+ if os.path.exists(path):
+ os.remove(path)
+
diff --git a/meta/lib/oeqa/core/utils/test.py b/meta/lib/oeqa/core/utils/test.py
new file mode 100644
index 0000000000..d38cab8a51
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/test.py
@@ -0,0 +1,89 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import inspect
+import unittest
+
+def getSuiteCases(suite):
+ """
+ Returns individual test from a test suite.
+ """
+ tests = []
+
+ if isinstance(suite, unittest.TestCase):
+ tests.append(suite)
+ elif isinstance(suite, unittest.suite.TestSuite):
+ for item in suite:
+ tests.extend(getSuiteCases(item))
+
+ return tests
+
+def getSuiteModules(suite):
+ """
+ Returns modules in a test suite.
+ """
+ modules = set()
+ for test in getSuiteCases(suite):
+ modules.add(getCaseModule(test))
+ return modules
+
+def getSuiteCasesInfo(suite, func):
+ """
+ Returns test case info from suite. Info is fetched from func.
+ """
+ tests = []
+ for test in getSuiteCases(suite):
+ tests.append(func(test))
+ return tests
+
+def getSuiteCasesNames(suite):
+ """
+ Returns test case names from suite.
+ """
+ return getSuiteCasesInfo(suite, getCaseMethod)
+
+def getSuiteCasesIDs(suite):
+ """
+ Returns test case ids from suite.
+ """
+ return getSuiteCasesInfo(suite, getCaseID)
+
+def getSuiteCasesFiles(suite):
+ """
+ Returns test case files paths from suite.
+ """
+ return getSuiteCasesInfo(suite, getCaseFile)
+
+def getCaseModule(test_case):
+ """
+ Returns test case module name.
+ """
+ return test_case.__module__
+
+def getCaseClass(test_case):
+ """
+ Returns test case class name.
+ """
+ return test_case.__class__.__name__
+
+def getCaseID(test_case):
+ """
+ Returns test case complete id.
+ """
+ return test_case.id()
+
+def getCaseFile(test_case):
+ """
+ Returns test case file path.
+ """
+ return inspect.getsourcefile(test_case.__class__)
+
+def getCaseMethod(test_case):
+ """
+ Returns test case method name.
+ """
+ return getCaseID(test_case).split('.')[-1]
diff --git a/meta/lib/oeqa/runtime/files/test.c b/meta/lib/oeqa/files/test.c
index 2d8389c92e..2d8389c92e 100644
--- a/meta/lib/oeqa/runtime/files/test.c
+++ b/meta/lib/oeqa/files/test.c
diff --git a/meta/lib/oeqa/runtime/files/test.cpp b/meta/lib/oeqa/files/test.cpp
index 9e1a76473d..9e1a76473d 100644
--- a/meta/lib/oeqa/runtime/files/test.cpp
+++ b/meta/lib/oeqa/files/test.cpp
diff --git a/meta/lib/oeqa/files/testresults/testresults.json b/meta/lib/oeqa/files/testresults/testresults.json
new file mode 100644
index 0000000000..1a62155618
--- /dev/null
+++ b/meta/lib/oeqa/files/testresults/testresults.json
@@ -0,0 +1,40 @@
+{
+ "runtime_core-image-minimal_qemuarm_20181225195701": {
+ "configuration": {
+ "DISTRO": "poky",
+ "HOST_DISTRO": "ubuntu-16.04",
+ "IMAGE_BASENAME": "core-image-minimal",
+ "IMAGE_PKGTYPE": "rpm",
+ "LAYERS": {
+ "meta": {
+ "branch": "master",
+ "commit": "801745d918e83f976c706f29669779f5b292ade3",
+ "commit_count": 52782
+ },
+ "meta-poky": {
+ "branch": "master",
+ "commit": "801745d918e83f976c706f29669779f5b292ade3",
+ "commit_count": 52782
+ },
+ "meta-yocto-bsp": {
+ "branch": "master",
+ "commit": "801745d918e83f976c706f29669779f5b292ade3",
+ "commit_count": 52782
+ }
+ },
+ "MACHINE": "qemuarm",
+ "STARTTIME": "20181225195701",
+ "TEST_TYPE": "runtime"
+ },
+ "result": {
+ "apt.AptRepoTest.test_apt_install_from_repo": {
+ "log": "Test requires apt to be installed",
+ "status": "PASSED"
+ },
+ "buildcpio.BuildCpioTest.test_cpio": {
+ "log": "Test requires autoconf to be installed",
+ "status": "ERROR"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/meta/lib/oeqa/manual/abat.patch b/meta/lib/oeqa/manual/abat.patch
new file mode 100644
index 0000000000..1541ac80cb
--- /dev/null
+++ b/meta/lib/oeqa/manual/abat.patch
@@ -0,0 +1,64 @@
+########
+diff --git a/glxgears_check.sh b/glxgears_check.sh
+index 17622b8..c4d3b97 100755
+--- a/glxgears_check.sh
++++ b/glxgears_check.sh
+@@ -31,7 +31,7 @@ else
+
+ sleep 6
+
+- XPID=$( ps ax | awk '{print $1, $5}' | grep glxgears | awk '{print $1}')
++ XPID=$( ps | awk '{print $1, $5}' | grep glxgears | awk '{print $1}')
+ if [ ! -z "$XPID" ]; then
+ kill -9 $XPID >/dev/null 2>&1
+ echo "glxgears can run, PASS!"
+diff --git a/x_close.sh b/x_close.sh
+index e287be1..3429f1a 100755
+--- a/x_close.sh
++++ b/x_close.sh
+@@ -22,7 +22,7 @@
+ #
+ function close_proc(){
+ echo "kill process Xorg"
+-XPID=$( ps ax | awk '{print $1, $5}' | egrep "X$|Xorg$" | awk '{print $1}')
++XPID=$( ps | awk '{print $1, $6}' | egrep "X$|Xorg$" | awk '{print $1}')
+ if [ ! -z "$XPID" ]; then
+ kill $XPID
+ sleep 4
+diff --git a/x_start.sh b/x_start.sh
+index 9cf6eab..2305796 100755
+--- a/x_start.sh
++++ b/x_start.sh
+@@ -24,7 +24,7 @@
+ X_ERROR=0
+
+ #test whether X has started
+-PXID=$(ps ax |awk '{print $1,$5}' |egrep "Xorg$|X$" |grep -v grep | awk '{print $1}')
++PXID=$(ps |awk '{print $1,$6}' |egrep "Xorg$|X$" |grep -v grep | awk '{print $1}')
+ if [ ! -z "$PXID" ]; then
+ echo "[WARNING] Xorg has started!"
+ XORG_STATUS="started"
+@@ -35,9 +35,11 @@ else
+ #start up the x server
+ echo "Start up the X server for test in display $DISPLAY................"
+
+- $XORG_DIR/bin/X >/dev/null 2>&1 &
++ #$XORG_DIR/bin/X >/dev/null 2>&1 &
++ #sleep 8
++ #xterm &
++ /etc/init.d/xserver-nodm start &
+ sleep 8
+- xterm &
+ fi
+ XLOG_FILE=/var/log/Xorg.0.log
+ [ -f $XORG_DIR/var/log/Xorg.0.log ] && XLOG_FILE=$XORG_DIR/var/log/Xorg.0.log
+@@ -54,7 +56,7 @@ fi
+ X_ERROR=1
+ fi
+
+- XPID=$( ps ax | awk '{print $1, $5}' | egrep "X$|Xorg$" |grep -v grep| awk '{print $1}')
++ XPID=$( ps | awk '{print $1, $6}' | egrep "X$|Xorg$" |grep -v grep| awk '{print $1}')
+ if [ -z "$XPID" ]; then
+ echo "Start up X server FAIL!"
+ echo
+######## \ No newline at end of file
diff --git a/meta/lib/oeqa/manual/bsp-hw.json b/meta/lib/oeqa/manual/bsp-hw.json
new file mode 100644
index 0000000000..5c5b9b50bb
--- /dev/null
+++ b/meta/lib/oeqa/manual/bsp-hw.json
@@ -0,0 +1,1000 @@
+[
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.boot_and_install_from_USB",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "plugin usb which contains live image burned",
+ "expected_results": "User can choose install system from usb stick onto harddisk from boot menu or command line option \n"
+ },
+ "2": {
+ "action": "configure device BIOS to firstly boot from USB if necessary",
+ "expected_results": "Installed system can boot up"
+ },
+ "3": {
+ "action": "boot the device and select option \"Install\" from boot menu",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "proceed through default install process",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Remove USB, and reboot into new installed system. \nNote: If installation was successfully completed and received this message \"\"(sdx): Volume was not properly unmounted...Please run fsck.\"\" ignore it because this was whitelisted according to bug 9652.",
+ "expected_results": ""
+ }
+ },
+ "summary": "boot_and_install_from_USB"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.live_boot_from_USB",
+ "author": [
+ {
+ "email": "juan.fernandox.ramos.frayle@intel.com",
+ "name": "juan.fernandox.ramos.frayle@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Plugin usb which contains live image burned.",
+ "expected_results": "User can choose boot from live image on usb stick from boot menu or command line option"
+ },
+ "2": {
+ "action": "Configure device BIOS to firstly boot from USB if necessary.",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Reboot the device and boot from USB stick.",
+ "expected_results": "Live image can boot up with usb stick"
+ }
+ },
+ "summary": "live_boot_from_USB"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.boot_from_runlevel_3",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Boot into system and edit /etc/inittab to make sure that system enter at the run level 3 by default, this is done by changing the line \n\n\nid:5:initdefault \n\nto \n\nid:3:initdefault \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Reboot system, and press \"Tab\" to enter \"grub\"",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Get into the \"kernel\" line with the edit option \"e\" and add \"psplash=false text\" at the end line.",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Press \"F10\" or \"ctrl+x\" to boot system",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "If system ask you for a login type \"root\"",
+ "expected_results": "System should boot to run level 3, showing the command prompt."
+ }
+ },
+ "summary": "boot_from_runlevel_3"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.boot_from_runlevel_5",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Boot into system and edit /etc/inittab to make sure that system enter at the run level 5 by default, this is done by changing the line \n\nid:3:initdefault \n\nto \n\nid:5:initdefault \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Reboot system, and press \"Tab\" to enter \"grub\"",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Get into the \"kernel\" line with the edit option \"e\" and add \"psplash=false text\" at the end line.",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Press \"F10\" or \"ctrl+x\" to boot system \nNote: The test is only for sato image.",
+ "expected_results": "System should boot to runlevel 5 ."
+ }
+ },
+ "summary": "boot_from_runlevel_5"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.shutdown_system",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "boot system",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "launch terminal and run \"shutdown -h now\" or \"poweroff\"",
+ "expected_results": "System can be shutdown successfully . "
+ }
+ },
+ "summary": "shutdown_system"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.switch_among_multi_applications_and_desktop",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "launch several applications(like contacts, file manager, notes, etc)",
+ "expected_results": "user could switch among multi applications and desktop"
+ },
+ "2": {
+ "action": "launch terminal",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "switch among multi applications and desktop",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "close applications \nNote: The case is for sato image only. ",
+ "expected_results": ""
+ }
+ },
+ "summary": "switch_among_multi_applications_and_desktop"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.ethernet_static_ip_set_in_connman",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Boot the system and check internet connection is on . ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Launch connmand-properties (up-right corner on desktop)",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Choose Ethernet device and set a valid static ip address for it. \nFor example, in our internal network, we can set as following: \nip address: 10.239.48.xxx \nMask: 255.255.255.0 \nGateway (Broadcast): 10.239.48.255",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check the Network configuration with \"ifconfig\"",
+ "expected_results": "Static IP was set successfully \n"
+ },
+ "5": {
+ "action": "ping to another IP adress",
+ "expected_results": "Ping works correclty\n"
+ }
+ },
+ "summary": "ethernet_static_ip_set_in_connman"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.ethernet_get_IP_in_connman_via_DHCP",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Launch connmand-properties (up-right corner on your desktop). ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Check if Ethernet device can work properly with static IP, doing \"ping XXX.XXX.XXX.XXX\", once this is set.",
+ "expected_results": "Ping executed successfully . \n\n"
+ },
+ "3": {
+ "action": "Then choose DHCP method for Ethernet device in connmand-properties.",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check with 'ifconfig\" and \"ping\" if Ethernet device get IP address via DHCP.",
+ "expected_results": "Ethernet device can get dynamic IP address via DHCP in connmand ."
+ }
+ },
+ "summary": "ethernet_get_IP_in_connman_via_DHCP"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.connman_offline_mode_in_connman-gnome",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Launch connman-properties after system booting \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "choose \"offline mode\" and check the connection of all network interfaces ",
+ "expected_results": "All connection should be off after clicking \"offline mode\" . "
+ }
+ },
+ "summary": "connman_offline_mode_in_connman-gnome"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.X_server_can_start_up_with_runlevel_5_boot",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "boot up system with default runlevel \n\n",
+ "expected_results": "X server can start up well and desktop display has no problem . \n\n"
+ },
+ "2": {
+ "action": "type runlevel at command prompt",
+ "expected_results": "Output:N 5"
+ }
+ },
+ "summary": "X_server_can_start_up_with_runlevel_5_boot"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.standby",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "boot system and launch terminal; check output of \"date\" and launch script \"continue.sh\"",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "echo \"mem\" > /sys/power/state",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "After system go into S3 mode, move mouse or press any key to make it resume (on NUC press power button)",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check \"date\" and script \"continue.sh\"",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check if application can work as normal \ncontinue.sh as below: \n \n#!/bin/sh \n \ni=1 \nwhile [ 0 ] \ndo \n echo $i \n sleep 1 \n i=$((i+1)) \ndone ",
+ "expected_results": "Screen should resume back and script can run continuously incrementing the i's value from where it was before going to standby state. Date should be the same with the corresponding time increment."
+ }
+ },
+ "summary": "standby"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.check_CPU_utilization_after_standby",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start up system",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "run \"top\" command and check if there is any process eating CPU time",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "make system into standby and resume it",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "run \"top\" command and check if there is any difference with the data before standby",
+ "expected_results": "There should be no big difference before/after standby with \"top\" . "
+ }
+ },
+ "summary": "check_CPU_utilization_after_standby"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Test_if_LAN_device_works_well_after_resume_from_suspend_state",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "boot system and launch terminal",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "echo \"mem\" > /sys/power/state",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "After system go into S3 mode, move mouse or press any key to make it resume",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "check ping status \n\nNote: This TC apply only for core-image-full-cmd.",
+ "expected_results": "ping should always work before/after standby"
+ }
+ },
+ "summary": "Test_if_LAN_device_works_well_after_resume_from_suspend_state"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Test_if_usb_hid_device_works_well_after_resume_from_suspend_state",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "boot system and launch terminal",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "echo \"mem\" > /sys/power/state",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "After system go into S3 mode, resume the device by pressing the power button or using HID devices",
+ "expected_results": "Devices resumes "
+ },
+ "4": {
+ "action": "check usb mouse and keyboard",
+ "expected_results": "Usb mouse and keyboard should work"
+ }
+ },
+ "summary": "Test_if_usb_hid_device_works_well_after_resume_from_suspend_state"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.click_terminal_icon_on_X_desktop",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "After system launch and X start up, click terminal icon on desktop",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Check if only one terminal window launched and no other problem met",
+ "expected_results": "There should be no problem after launching terminal . "
+ }
+ },
+ "summary": "click_terminal_icon_on_X_desktop"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Add_multiple_files_in_media_player",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Launch media player",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Add multiple files(5 files) in media player at same time (ogg or wav)",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Verify the sound.",
+ "expected_results": "Media player should be OK with this action, it reproduce files correctly."
+ }
+ },
+ "summary": "Add_multiple_files_in_media_player"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.video_-_libva_check_(ogg_video_play)",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "check if libva is installed on system (or libogg)",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "copy sample ogg file to system",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "launch media player can play the ogg file",
+ "expected_results": "ogg file can be played without problem when libva is used (or libogg) "
+ }
+ },
+ "summary": "video_-_libva_check_(ogg_video_play)"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.media_player_-_play_video_(ogv)",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "copy sample ogv file to system",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "launch media player and make sure it can play the ogv file",
+ "expected_results": "ogv file can be played without problem"
+ }
+ },
+ "summary": "media_player_-_play_video_(ogv)"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.media_player_-_stop/play_button_(ogv)",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "copy sample ogv file to system",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "launch media player can play the ogv file",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "click \"stop\" button to stop playing",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "click \"start\" button to resume playing",
+ "expected_results": "ogv file can be start/stop without problem"
+ }
+ },
+ "summary": "media_player_-_stop/play_button_(ogv)"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.audio_-_play_(ogg)_with_HDMI",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "copy sample ogg file to system",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "connect system with a monitor with HDMI",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "launch media player and play the ogg file",
+ "expected_results": "ogg file can be played without problem with HDMI"
+ }
+ },
+ "summary": "audio_-_play_(ogg)_with_HDMI"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.audio_-_play_(wav)_with_HDMI",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "copy sample wav file to system",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "connect system with a monitor with HDMI",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "launch media player and play the wav file",
+ "expected_results": "wav file can be played without problem, with HDMI"
+ }
+ },
+ "summary": "audio_-_play_(wav)_with_HDMI"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Graphics_-_ABAT",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Download ABAT test suite from internal git repository, git clone git://tinderbox.sh.intel.com/git/abat",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Apply following patch to make it work on yocto environment",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Run \"./abat.sh\" to run ABAT test refer to abat.patch",
+ "expected_results": "All ABAT test should pass. \nNote : If below 3 fails appears ignore them. \n- start up X server fail.. due is already up \n- module [intel_agp] \n- module [i915]"
+ }
+ },
+ "summary": "Graphics_-_ABAT"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Graphics_-_x11perf_-_2D",
+ "author": [
+ {
+ "email": "alexandru.c.georgescu@intel.com",
+ "name": "alexandru.c.georgescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Run \"x11perf -aa10text\" and \"x11perf -rgb10text\"",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Get the FPS result and compare it with upstream graphics data on Sandybridge",
+ "expected_results": "There should not be big regression between Yocto and upstream linux . "
+ }
+ },
+ "summary": "Graphics_-_x11perf_-_2D"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Check_if_SATA_disk_can_work_correctly",
+ "author": [
+ {
+ "email": "yi.zhao@windriver.com",
+ "name": "yi.zhao@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Run fdisk command to create partition on SATA disk. ",
+ "expected_results": "The SATA device can mount, umount, read and write. "
+ },
+ "2": {
+ "action": "Mount/Umount \n mke2fs /dev/sda1 \n mount -t ext2 /dev/sda1 /mnt/disk \n umount /mnt/disk",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Read/Write (filesystem) \n touch /mnt/disk/test.txt \n echo abcd > /mnt/disk/test.txt \n cat /mnt/disk/test.txt",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Read/Write (raw) \n dd if=/dev/sda1 of=/tmp/test bs=1k count=1k \n This command will read 1MB from /dev/sda1 to /tmp/test",
+ "expected_results": ""
+ }
+ },
+ "summary": "Check_if_SATA_disk_can_work_correctly"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Install_and_boot_from_USB-drive_to_HDD-drive",
+ "author": [
+ {
+ "email": "david.israelx.rodriguez.castellanos@intel.com",
+ "name": "david.israelx.rodriguez.castellanos@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Get a HDD drive.",
+ "expected_results": "User can choose install system from USB stick on HDD drive from boot menu or command line option \n"
+ },
+ "2": {
+ "action": "Plugin USB which contains live image burned (USB1).",
+ "expected_results": "Installed system can boot up."
+ },
+ "3": {
+ "action": "Configure device BIOS to firstly boot from USB if necessary",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Boot the device and select option \"Install\" from boot menu.",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Make sure that the divice in which image is going to be installed is the HDD drive.",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Proceed through default install process.",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Remove USB1, and reboot into new installed system.",
+ "expected_results": ""
+ }
+ },
+ "summary": "Install_and_boot_from_USB-drive_to_HDD-drive"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Install_and_boot_from_USB-drive_to_SD-drive",
+ "author": [
+ {
+ "email": "david.israelx.rodriguez.castellanos@intel.com",
+ "name": "david.israelx.rodriguez.castellanos@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Get a SD-drive with enough free space to install an image.",
+ "expected_results": "User can choose install system from USB stick on SD-drive from boot menu or command line option. \n"
+ },
+ "2": {
+ "action": "Plugin USB which contains live image burned (USB1).",
+ "expected_results": "Installed system can boot up."
+ },
+ "3": {
+ "action": "Configure device BIOS to firstly boot from USB if necessary",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Boot the device and select option \"Install\" from boot menu.",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Make sure that the device in which image is going to be installed is the SD-drive.",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Proceed through default install process.",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Remove USB1, and reboot into new installed system.",
+ "expected_results": ""
+ }
+ },
+ "summary": "Install_and_boot_from_USB-drive_to_SD-drive"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Test_boot_on_serial_communication_SD",
+ "author": [
+ {
+ "email": "juan.fernandox.ramos.frayle@intel.com",
+ "name": "juan.fernandox.ramos.frayle@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "1.- Create a yocto project image in a SD card \nexample \n2 - Configure a connection like shown in the link avobe: \nhttps://wiki.yoctoproject.org/wiki/MinnowMax_board_Serial_video_connection_guide \n3 - Verify the Minow Max board is connected to the host \n4 - Boot the system to desktop \n5 - Open a Terminal and check the IP \nIn Terminal type $ifconfig\"",
+ "expected_results": "Verify you can create a live image \n"
+ }
+ },
+ "summary": "Test_boot_on_serial_communication_SD"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Test_boot_on_serial_communication_HDD",
+ "author": [
+ {
+ "email": "juan.fernandox.ramos.frayle@intel.com",
+ "name": "juan.fernandox.ramos.frayle@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "1 - Create a yocto project image in a HDD \nexample \n2 - Configure a connection like shown in the link avobe: \nhttps://wiki.yoctoproject.org/wiki/MinnowMax_board_Serial_video_connection_guide \n3 - Verify the Minow Max board is connected to the host \n4 - Boot the system to desktop \n5 - Open a Terminal and check the IP \nIn Terminal type $ifconfig\"> ",
+ "expected_results": "Verify you can create a live image \n"
+ }
+ },
+ "summary": "Test_boot_on_serial_communication_HDD"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Test_boot_on_serial_communication_USB",
+ "author": [
+ {
+ "email": "juan.fernandox.ramos.frayle@intel.com",
+ "name": "juan.fernandox.ramos.frayle@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "1.- Create a yocto project image in a USB \nexample <dd if= core-image-sato-sdk.hddimg of =/dev/sdb>",
+ "expected_results": "Verify you can create a live image \n"
+ },
+ "2": {
+ "action": "Configure a connection like shown in the link avobe: \nhttps://wiki.yoctoproject.org/wiki/MinnowMax_board_Serial_video_connection_guide\n\n",
+ "expected_results": "Video signal is present and not delayed \n"
+ },
+ "3": {
+ "action": " Verify the Minow Max board is connected to the host",
+ "expected_results": "Verify the system boot ok and no errors are present \n"
+ },
+ "4": {
+ "action": " Boot the system to desktop",
+ "expected_results": " Check that a valid IP is retrieved"
+ },
+ "5": {
+ "action": " Open a Terminal and check the IP \nIn Terminal type $ifconfig\" ",
+ "expected_results": ""
+ }
+ },
+ "summary": "Test_boot_on_serial_communication_USB"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Test_Seek_bar_and_volume_control",
+ "author": [
+ {
+ "email": "juan.fernandox.ramos.frayle@intel.com",
+ "name": "juan.fernandox.ramos.frayle@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Run media player and load a media file ",
+ "expected_results": "Media player correctly open audio/video file \n"
+ },
+ "2": {
+ "action": "Verify that seek and volume control are present ",
+ "expected_results": "Seek bar and volume control are present \n"
+ },
+ "3": {
+ "action": "Verify that selecting the speaker icon opens the volume control",
+ "expected_results": "Volume control bar must appear \n"
+ },
+ "4": {
+ "action": "Verify you can increase and decrease volume level with the volume control",
+ "expected_results": "Volume level must be increased and decreased \n"
+ },
+ "5": {
+ "action": "Observe that slider on the seek bar moves along with the video/audio play",
+ "expected_results": "Video/audio file can be played and slider moves along with the video/audio play \n"
+ },
+ "6": {
+ "action": "Verify you can navigate the video with the slider back and forward",
+ "expected_results": "The slider can move back and forward in the seek bar \n"
+ },
+ "7": {
+ "action": "Verify that seek and volume control are functional in full screen mode",
+ "expected_results": "Press the full screen mode icon, seek bar and volume control must work fine \n"
+ },
+ "8": {
+ "action": "Verify that pressing << or >> while playing a file makes the slide goes slow/backwards or faster",
+ "expected_results": "Verify << and >> works correctly"
+ }
+ },
+ "summary": "Test_Seek_bar_and_volume_control"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Check_if_watchdog_can_reset_the_target_system",
+ "author": [
+ {
+ "email": "yi.zhao@windriver.com",
+ "name": "yi.zhao@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "1.Check if watchdog device exist in /dev/ directory. Run command echo 1 > /dev/watchdog and wait for 60s. Then, the target will reboot.",
+ "expected_results": "The watchdog device exist in /dev/ directory and can reboot the target.\n"
+ }
+ },
+ "summary": "Check_if_watchdog_can_reset_the_target_system"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Check_if_RTC_(Real_Time_Clock)_can_work_correctly",
+ "author": [
+ {
+ "email": "yi.zhao@windriver.com",
+ "name": "yi.zhao@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Read time from RTC registers. root@localhost:/root> hwclock -r Sun Mar 22 04:05:47 1970 -0.001948 seconds ",
+ "expected_results": "Can read and set the time from RTC.\n"
+ },
+ "2": {
+ "action": "Set system current time root@localhost:/root> date 062309452008 ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Synchronize the system current time to RTC registers root@localhost:/root> hwclock -w ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Read time from RTC registers root@localhost:/root> hwclock -r ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Reboot target and read time from RTC again\n",
+ "expected_results": ""
+ }
+ },
+ "summary": "Check_if_RTC_(Real_Time_Clock)_can_work_correctly"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Check_if_target_can_support_EEPROM",
+ "author": [
+ {
+ "email": "yi.zhao@windriver.com",
+ "name": "yi.zhao@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Check eeprom device exist in /sys/bus/i2c/devices/ ",
+ "expected_results": "Hexdump can read data from eeprom.\n"
+ },
+ "2": {
+ "action": "Run \"hexdump eeprom\" commandroot@mpc8315e-rdb:/sys/bus/i2c/devices/1-0051> hexdump eeprom0000000 9210 0b02 0211 0009 0b52 0108 0c00 3c000000010 6978 6930 6911 208c 7003 3c3c 00f0 8381\u2026\n",
+ "expected_results": ""
+ }
+ },
+ "summary": "Check_if_target_can_support_EEPROM"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.System_can_boot_up_via_NFS",
+ "author": [
+ {
+ "email": "yi.zhao@windriver.com",
+ "name": "yi.zhao@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Connect the board's first serial port to your workstation and then start up your favourite serial terminal so that you will be able to interact with the serial console. If you don't have a favourite, picocom is suggested: $ picocom /dev/ttyS0 -b 115200 ",
+ "expected_results": "The system can boot up without problem\n"
+ },
+ "2": {
+ "action": "Power up or reset the board and press a key on the terminal when prompted to get to the U-Boot command line ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Set up the environment in U-Boot: => setenv ipaddr => setenv serverip ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Download the kernel and boot: => tftp tftp $loadaddr vmlinux => bootoctlinux $loadaddr coremask=0x3 root=/dev/nfs rw nfsroot=: ip=::::edgerouter:eth0:off mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom)\n",
+ "expected_results": ""
+ }
+ },
+ "summary": "System_can_boot_up_via_NFS"
+ }
+ },
+ {
+ "test": {
+ "@alias": "bsps-hw.bsps-hw.Boot_from_JFFS2_image",
+ "author": [
+ {
+ "email": "yi.zhao@windriver.com",
+ "name": "yi.zhao@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "First boot the board with NFS root. ",
+ "expected_results": "The system can boot up without problem\n"
+ },
+ "2": {
+ "action": "Install mtd-utils package. Erase the MTD partition which will be used as root: $ flash_eraseall /dev/mtd3 ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Copy the JFFS2 image to the MTD partition: $ flashcp core-image-minimal-mpc8315e-rdb.jffs2 /dev/mtd3 ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Then reboot the board and set up the environment in U-Boot: => setenv bootargs root=/dev/mtdblock3 rootfstype=jffs2 console=ttyS0,115200 ",
+ "expected_results": ""
+ }
+ },
+ "summary": "Boot_from_JFFS2_image"
+ }
+ }
+]
diff --git a/meta/lib/oeqa/manual/build-appliance.json b/meta/lib/oeqa/manual/build-appliance.json
new file mode 100644
index 0000000000..70f8c72c9b
--- /dev/null
+++ b/meta/lib/oeqa/manual/build-appliance.json
@@ -0,0 +1,96 @@
+[
+ {
+ "test": {
+ "@alias": "build-appliance.build-appliance.Build_core-image-minimal_with_build-appliance-image",
+ "author": [
+ {
+ "email": "corneliux.stoicescu@intel.com",
+ "name": "corneliux.stoicescu@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Build with AUTOREV or download from Autobuilder an image for Yocto Build Appliance. ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Boot the image under VMWare Player. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Build qemux86 core-image-minimal using bitbake command line in the build-appliance-image ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Launch the image just built using runqemu. ",
+ "expected_results": "core-image-minimal should build and boot. "
+ }
+ },
+ "summary": "Build_core-image-minimal_with_build-appliance-image"
+ }
+ },
+ {
+ "test": {
+ "@alias": "build-appliance.build-appliance.Build_a_image_without_error_(added_recipe)",
+ "author": [
+ {
+ "email": "sstncr@gmail.com",
+ "name": "sstncr@gmail.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Launch Build Appliance",
+ "expected_results": "User could build a image without error and the added package is in the image"
+ },
+ "2": {
+ "action": "Set \"Machine\" in conf/local.conf, for example, qemuarm",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Install a new package to the image, for example, acpid. Set the following line in conf/local.conf: IMAGE_INSTALL_append = \" acpid\"",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Build a image using bitbake command line, for example, bitbake core-image-minimal",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "After build finished, launch the image and check if the added package built into image",
+ "expected_results": ""
+ }
+ },
+ "summary": "Build_a_image_without_error_(added_recipe)."
+ }
+ },
+ {
+ "test": {
+ "@alias": "build-appliance.build-appliance.Create_core-image-sato-sdk_using_build_appliance",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Build with AUTOREV or download from Autobuilder an image for Yocto Build Appliance. ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Boot the image under VMWare Player. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Build qemux86 core-image-sato-sdk using bitbake command line in the build-appliance-image ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Launch the image just built using runqemu. ",
+ "expected_results": ""
+ }
+ },
+ "summary": "Create_core-image-sato-sdk_using_build_appliance"
+ }
+ }
+] \ No newline at end of file
diff --git a/meta/lib/oeqa/manual/crops.json b/meta/lib/oeqa/manual/crops.json
new file mode 100644
index 0000000000..5cfa653843
--- /dev/null
+++ b/meta/lib/oeqa/manual/crops.json
@@ -0,0 +1,294 @@
+[
+ {
+ "test": {
+ "@alias": "crops-default.crops-default.sdkext_eSDK_devtool_build_make",
+ "author": [
+ {
+ "email": "francisco.j.pedraza.gonzalez@intel.com",
+ "name": "francisco.j.pedraza.gonzalez@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n",
+ "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n"
+ },
+ "5": {
+ "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n",
+ "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces."
+ },
+ "6": {
+ "action": " source environment-setup-i586-poky-linux \n\n",
+ "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
+ },
+ "7": {
+ "action": " run command which devtool \n\n",
+ "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n "
+ },
+ "8": {
+ "action": "devtool add myapp <directory>(this is myapp dir) \n\n\n",
+ "expected_results": "The directory you should input is the myapp directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb"
+ },
+ "9": {
+ "action": " devtool build myapp \n\n",
+ "expected_results": "This should compile an image"
+ },
+ "10": {
+ "action": " devtool reset myapp ",
+ "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase."
+ }
+ },
+ "summary": "sdkext_eSDK_devtool_build_make"
+ }
+ },
+ {
+ "test": {
+ "@alias": "crops-default.crops-default.sdkext_devtool_build_esdk_package",
+ "author": [
+ {
+ "email": "francisco.j.pedraza.gonzalez@intel.com",
+ "name": "francisco.j.pedraza.gonzalez@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": " Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp/ \n <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n",
+ "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n"
+ },
+ "5": {
+ "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include<stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n",
+ "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces. \n\n"
+ },
+ "6": {
+ "action": " source environment-setup-i586-poky-linux \n\n",
+ "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
+ },
+ "7": {
+ "action": " run command which devtool \n\n",
+ "expected_results": " this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
+ },
+ "8": {
+ "action": " devtool add myapp <directory> (this is myapp dir) \n\n",
+ "expected_results": " The directory you should input is the myapp directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb \n\n"
+ },
+ "9": {
+ "action": " devtool package myapp \n\n",
+ "expected_results": " you should expect a package creation of myapp and it should be under the /tmp/deploy/ \n\n"
+ },
+ "10": {
+ "action": " devtool reset myapp ",
+ "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase.\n</package_format>"
+ }
+ },
+ "summary": "sdkext_devtool_build_esdk_package"
+ }
+ },
+ {
+ "test": {
+ "@alias": "crops-default.crops-default.sdkext_devtool_build_cmake",
+ "author": [
+ {
+ "email": "francisco.j.pedraza.gonzalez@intel.com",
+ "name": "francisco.j.pedraza.gonzalez@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": " Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp \n <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n",
+ "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n"
+ },
+ "5": {
+ "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n",
+ "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces. \n\n"
+ },
+ "6": {
+ "action": " source environment-setup-i586-poky-linux \n\n",
+ "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
+ },
+ "7": {
+ "action": " run command which devtool \n\n",
+ "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
+ },
+ "8": {
+ "action": " devtool add myapp <directory> (this is myapp_cmake dir) \n\n",
+ "expected_results": "The directory you should input is the myapp_cmake directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb \n\n"
+ },
+ "9": {
+ "action": " devtool build myapp \n\n",
+ "expected_results": "This should compile an image \n\n"
+ },
+ "10": {
+ "action": " devtool reset myapp ",
+ "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase. "
+ }
+ },
+ "summary": "sdkext_devtool_build_cmake"
+ }
+ },
+ {
+ "test": {
+ "@alias": "crops-default.crops-default.sdkext_extend_autotools_recipe_creation",
+ "author": [
+ {
+ "email": "francisco.j.pedraza.gonzalez@intel.com",
+ "name": "francisco.j.pedraza.gonzalez@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": " source environment-setup-i586-poky-linux \n\n",
+ "expected_results": " This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
+ },
+ "4": {
+ "action": "run command which devtool \n\n",
+ "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
+ },
+ "5": {
+ "action": "devtool sdk-install -s libxml2 \n\n",
+ "expected_results": "this should install libxml2 \n\n"
+ },
+ "6": {
+ "action": "devtool add librdfa https://github.com/rdfa/librdfa \n\n",
+ "expected_results": "This should automatically create the recipe librdfa.bb under /recipes/librdfa/librdfa.bb \n\n"
+ },
+ "7": {
+ "action": "devtool build librdfa \n\n",
+ "expected_results": "This should compile \n\n"
+ },
+ "8": {
+ "action": "devtool reset librdfa ",
+ "expected_results": "This cleans sysroot of the librdfa recipe, but it leaves the source tree intact. meaning it does not erase."
+ }
+ },
+ "summary": "sdkext_extend_autotools_recipe_creation"
+ }
+ },
+ {
+ "test": {
+ "@alias": "crops-default.crops-default.sdkext_devtool_kernelmodule",
+ "author": [
+ {
+ "email": "francisco.j.pedraza.gonzalez@intel.com",
+ "name": "francisco.j.pedraza.gonzalez@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "source environment-setup-i586-poky-linux \n\n",
+ "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n \n"
+ },
+ "4": {
+ "action": "run command which devtool \n\n",
+ "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
+ },
+ "5": {
+ "action": "devtool add kernel-module-hello-world https://git.yoctoproject.org/git/kernel-module-hello-world \n\n",
+ "expected_results": "This should automatically create the recipe kernel-module-hello-world.bb under <crops-esdk-workdir-workspace>/recipes/kernel-module-hello-world/kernel-module-hello-world.bb "
+ },
+ "6": {
+ "action": "devtool build kernel-module-hello-world \n\n",
+ "expected_results": "This should compile an image \n\n"
+ },
+ "7": {
+ "action": "devtool reset kernel-module-hello-world ",
+ "expected_results": "This cleans sysroot of the kernel-module-hello-world recipe, but it leaves the source tree intact. meaning it does not erase."
+ }
+ },
+ "summary": "sdkext_devtool_kernelmodule"
+ }
+ },
+ {
+ "test": {
+ "@alias": "crops-default.crops-default.sdkext_recipes_for_nodejs",
+ "author": [
+ {
+ "email": "francisco.j.pedraza.gonzalez@intel.com",
+ "name": "francisco.j.pedraza.gonzalez@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\nlets say variable npm = npm://registry.npmjs.org;name=winston;version=2.2.0 \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "source environment-setup-i586-poky-linux \n\n",
+ "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
+ },
+ "4": {
+ "action": "run command which devtool \n\n",
+ "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
+ },
+ "5": {
+ "action": " 4a) git clone git://git.openembedded.org/meta-openembedded in layers/build directory \n \n4b) Add meta-openembedded/meta-oe in bblayer.conf as mentioned below: ${SDKBASEMETAPATH}/layers/build/meta-openembedded/meta-oe \\ \n\n4c) devtool add \"npm://registry.npmjs.org;name=npm;version=2.2.0\" \n\n",
+ "expected_results": " This should automatically create the recipe npm.bb under /recipes/npm/npm.bb \n\n"
+ },
+ "6": {
+ "action": "devtool build npm \n\n",
+ "expected_results": "This should compile an image \n\n"
+ },
+ "7": {
+ "action": " devtool reset npm",
+ "expected_results": "This cleans sysroot of the npm recipe, but it leaves the source tree intact. meaning it does not erase."
+ }
+ },
+ "summary": "sdkext_recipes_for_nodejs"
+ }
+ }
+]
diff --git a/meta/lib/oeqa/manual/eclipse-plugin.json b/meta/lib/oeqa/manual/eclipse-plugin.json
new file mode 100644
index 0000000000..9869150dcf
--- /dev/null
+++ b/meta/lib/oeqa/manual/eclipse-plugin.json
@@ -0,0 +1,322 @@
+[
+ {
+ "test": {
+ "@alias": "eclipse-plugin.eclipse-plugin.support_SSH_connection_to_Target",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "In Eclipse, swich to Remote System Explorer to create a connention baseed on SSH, input the remote target IP address as the Host name, make sure disable the proxy in Window->Preferences->General->Network Connection, set Direct as Active Provider field. ",
+ "expected_results": "the connection based on SSH could be set up."
+ },
+ "2": {
+ "action": "Configure connection from Eclipse: Run->Run Configurations->C/C++ Remote Application\\ ->New Connection->General->SSH Only ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Then right click to connect, input the user ID and password. ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "expand the connection, it will show the Sftp Files etc. \nNOTE. Might need to change dropbear to openssh and add the packagegroup-core-eclipse-debug recipe",
+ "expected_results": ""
+ }
+ },
+ "summary": "support_SSH_connection_to_Target"
+ }
+ },
+ {
+ "test": {
+ "@alias": "eclipse-plugin.eclipse-plugin.Launch_QEMU_from_Eclipse",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Set the Yocto ADT's toolchain root location, sysroot location and kernel, in the menu Window -> Preferences -> Yocto ADT. \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "wget autobuilder.yoctoproject.org/pub/releases//machines/qemu/qemux86/qemu (ex:core-image-sato-sdk-qemux86-date-rootfs-tar-bz2) \nsource /opt/poky/version/environment-setup-i585-poky-linux \n\nExtract qemu with runqemu-extract-sdk /home/user/file(ex.core-image-sato-sdk-qemux86.bz2) \n/home/user/qemux86-sato-sdk \n\n",
+ "expected_results": " Qemu can be lauched normally."
+ },
+ "3": {
+ "action": "(a)Point to the Toolchain: \n \nIf you are using a stand-alone pre-built toolchain, you should be pointing to the /opt/poky/{test-version} directory as Toolchain Root Location. This is the default location for toolchains installed by the ADT Installer or by hand. If ADT is installed in other location, use that location as Toolchain location.\nIf you are using a system-derived toolchain, the path you provide for the Toolchain Root Location field is the Yocto Project's build directory. \n \n E.g:/home/user/yocto/poky/build \n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "(b)Specify the Sysroot Location: \nSysroot Location is the location where the root filesystem for the target hardware is created on the development system by the ADT Installer (SYSROOT in step 2 of the case ADT installer Installation). \n \n Local : e.g: /home/user/qemux86-sato-sdk \nUsing ADT : e.g :/home/user/test-yocto/qemux86 \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "(c)Select the Target Architecture: \n \nThe target architecture is the type of hardware you are going to use or emulate. Use the pull-down Target Architecture menu to make your selection. \n \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "(d) QEMU: \nSelect this option if you will be using the QEMU emulator. Specify the Kernel matching the QEMU architecture you are using. \n wget autobuilder.yoctoproject.org/pub/releases//machines/qemu/qemux86/bzImage-qemux86.bin \n e.g: /home/$USER/yocto/adt-installer/download_image/bzImage-qemux86.bin \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "(e) select OK to save the settings. \n\n\n1: In the Eclipse toolbar, expose the Run -> External Tools menu. Your image should appear as a selectable menu item. \n2: Select your image in the navigation pane to launch the emulator in a new window. \n3: If needed, enter your host root password in the shell window at the prompt. This sets up a Tap 0 connection needed for running in user-space NFS mode. \n",
+ "expected_results": ""
+ }
+ },
+ "summary": "Launch_QEMU_from_Eclipse"
+ }
+ },
+ {
+ "test": {
+ "@alias": "eclipse-plugin.eclipse-plugin.Relocatable_SDK_-_C_-_Build_Hello_World_ANSI_C_Autotools_Project",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Launch a QEMU of target enviroment.(Reference to case \"ADT - Launch qemu by eclipse\") ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Select File -> New -> Project.",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Double click C/C++.",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Click C or C++ Project to create the project.",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Expand Yocto ADT Project.",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Select Hello World ANSI C Autotools Project.",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Put a name in the Project name. Do not use hyphens as part of the name. \n \n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Click Next.",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Add information in the Author and Copyright notice fields. \n1",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "Click Finish. \n1",
+ "expected_results": ""
+ },
+ "11": {
+ "action": "If the \"open perspective\" prompt appears, click \"Yes\" so that you open the C/C++ perspective. \n1",
+ "expected_results": ""
+ },
+ "12": {
+ "action": "In the Project Explorer window, right click the project -> Reconfigure project. \n1",
+ "expected_results": ""
+ },
+ "13": {
+ "action": "In the Project Explorer window, right click the project -> Build project. \n1",
+ "expected_results": "Under the Project files, a new folder appears called Binaries. This indicates that the compilation have been successful and the project binary have been created. \n"
+ },
+ "14": {
+ "action": "Right click it again and Run as -> Run Configurations. \n\t\t\tUnder Run Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. e.g.: /home/root/myapplication \n\t\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button. \n1",
+ "expected_results": "step 14 to step 16 -> Build succeed and the console outputs Hello world, you can also check the output on target."
+ },
+ "15": {
+ "action": "After all settings are done, select the Run button on the bottom right corner \n\n1",
+ "expected_results": ""
+ },
+ "16": {
+ "action": "Repeat the steps 14-15, but instead of using Run Configurations use Debug Configurations: \nRight click it again and Debug as -> Debug Configurations \nUnder Debug Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \nin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application.\ne.g.: /home/root/myapplication \nIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button \n1",
+ "expected_results": ""
+ },
+ "17": {
+ "action": "After all settings are done, select the Debug button on the bottom right corner",
+ "expected_results": ""
+ }
+ },
+ "summary": "Relocatable_SDK_-_C_-_Build_Hello_World_ANSI_C_Autotools_Project"
+ }
+ },
+ {
+ "test": {
+ "@alias": "eclipse-plugin.eclipse-plugin.Relocatable_SDK_-_C++_-_Build_Hello_World_C++_Autotools_project",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Launch a QEMU of target enviroment.(Reference to case \"ADT - Launch qemu by eclipse\") ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Select File -> New -> Project. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Double click C/C++. ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Click C or C++ Project to create the project. ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Expand Yocto ADT Project. ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Select Hello World ANSI C++ Autotools Project. ",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Put a name in the Project name. Do not use hyphens as part of the name. \n \n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Click Next.",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Add information in the Author and Copyright notice fields.",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "Click Finish. \n1",
+ "expected_results": ""
+ },
+ "11": {
+ "action": "If the \"open perspective\" prompt appears, click \"Yes\" so that you open the C/C++ perspective. \n1",
+ "expected_results": ""
+ },
+ "12": {
+ "action": "In the Project Explorer window, right click the project -> Reconfigure project. \n1",
+ "expected_results": ""
+ },
+ "13": {
+ "action": "In the Project Explorer window, right click the project -> Build project. \n\n1",
+ "expected_results": "under the Project files, a new folder appears called Binaries. This indicates that the compilation have been successful and the project binary have been created. \n"
+ },
+ "14": {
+ "action": "Right click it again and Run as -> Run Configurations. \n\t\t\tUnder Run Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. e.g.: /home/root/myapplication \n\t\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button. \n1",
+ "expected_results": "step 14 to step 16 -> Build succeed and the console outputs Hello world, you can also check the output on target."
+ },
+ "15": {
+ "action": "After all settings are done, select the Run button on the bottom right corner \n\n1",
+ "expected_results": ""
+ },
+ "16": {
+ "action": "Repeat the steps 14-15, but instead of using Run Configurations use Debug Configurations: \n\t\tRight click it again and Debug as -> Debug Configurations \n\t\tUnder Debug Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. \n\t\te.g.: /home/root/myapplication \n\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button \n1",
+ "expected_results": ""
+ },
+ "17": {
+ "action": "After all settings are done, select the Debug button on the bottom right corner",
+ "expected_results": ""
+ }
+ },
+ "summary": "Relocatable_SDK_-_C++_-_Build_Hello_World_C++_Autotools_project"
+ }
+ },
+ {
+ "test": {
+ "@alias": "eclipse-plugin.eclipse-plugin.Build_Eclipse_Plugin_from_source",
+ "author": [
+ {
+ "email": "laurentiu.serban@intel.com",
+ "name": "laurentiu.serban@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Clone eclipse-poky source. \n \n - git clone git://git.yoctoproject.org/eclipse-poky \n\n",
+ "expected_results": "Eclipse plugin is successfully installed \n\nDocumentation is there. For example if you have release yocto-2.0.1 you will found on http://autobuilder.yoctoproject.org/pub/releases/yocto-2.0.1/eclipse-plugin/mars/ archive with documentation like org.yocto.doc-development-$date.zip \n \n"
+ },
+ "2": {
+ "action": "Checkout correct tag. \n\n - git checkout <eclipse-version>/<yocto-version> \n\n",
+ "expected_results": "After plugin is build you must have 4 archive in foder scripts from eclipse-poky: \n - org.yocto.bc - mars-master-$date.zip \n - org.yocto.doc - mars-master-$date.zip --> documentation \n - org.yocto.sdk - mars-master-$date.zip \n - org.yocto.sdk - mars-master-$date.-archive.zip --> plugin "
+ },
+ "3": {
+ "action": "Move to scripts/ folder. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Run ./setup.sh \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "When the script finishes, it prompts a command to issue to build the plugin. It should look similar to the following: \n\n$ ECLIPSE_HOME=/eclipse-poky/scripts/eclipse ./build.sh /&1 | tee -a build.log \n\nHere, the three arguments to the build script are tag name, branch for documentation and release name. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "On an eclipse without the Yocto Plugin, select \"Install New Software\" from Help pull-down menu \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Select Add and from the dialog choose Archive... Look for the *archive.zip file that was built previously with the build.sh script. Click OK. \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Select all components and proceed with Installation of plugin. Restarting eclipse might be required.\n",
+ "expected_results": ""
+ }
+ },
+ "summary": "Build_Eclipse_Plugin_from_source"
+ }
+ },
+ {
+ "test": {
+ "@alias": "eclipse-plugin.eclipse-plugin.Eclipse_Poky_installation_and_setup",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Install SDK \n\ta)Download https://autobuilder.yocto.io/pub/releases//toolchain/x86_64/poky-glibc-x86_64-core-\timage-sato-i586-toolchain-.sh \n\tb)Run the SDK installer and accept the default installation directory ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Install \"Eclipse IDE for C/C++ Developers\" Oxygen release (4.7.0) \n\ta) Go to https://www.eclipse.org/downloads/packages/all, click \"Oxygen R\" \n\tb) Click to download the build for your OS \n\tc) Click \"Download\" button to download from a mirror \n\td) Run \"tar xf\" to extract the downloaded archive ",
+ "expected_result": ""
+ },
+ "3": {
+ "action": "Install \"Eclipse IDE for C/C++ Developers\" Oxygen release (4.7.0) (Continue) \n\te) Run \"eclipse/eclipse\" to start Eclipse \n\tf) Optional step for host machine within Intel network: In Eclipse workbench window, go to \"Window\" menu -> \"Preferences...\". \n\tg) In \"Preferences\" dialog, go to \"General\" -> \"Network Connections\", set \"Active Provider\" to \"Manual\". In \"Proxy \tentries\" table, select HTTP and click \"Edit\" and enter host \"proxy-chain.intel.com\" port 911, click OK. Repeat for HTTPS with port 912 \nClick OK to close \"Preferences\" dialog. \n\th) Go to \"File\" menu -> \"Restart\" to restart Eclipse for proxy settings to take effect. ",
+ "expected_result": ""
+ },
+ "4": {
+ "action": "Install Eclipse Poky plugins \n\ta) Download https://autobuilder.yocto.io/pub/releases/<yocto-version>/eclipse-plugin/<eclipse-version>/org.yocto.sdk-development-<date>-archive.zip \n\tb) In Eclipse workbench window, go to \"Help\" menu -> \"Install New Software...\" \n\tc) In \"Install\" dialog, click \"Add...\" button \n\td) In \"Add Repository\" dialog, enter \"Eclipse Poky\" for (repository) Name, click \"Archive...\" ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Install Eclipse Poky plugins (continue) \n\te) In \"Repository archive\" browse dialog, select the downloaded Eclipse Poky repository archive \n\tf) Back in \"Add Repository\" dialog, click \"OK\" \n\tg) Back in \"Install\" dialog, make sure \"Work with:\" is set to \"Eclipse Poky\" repository, tick \"Yocto Project \tDocumentation Plug-in\" and \"Yocto Project SDK Plug-in\", click \"Next >\" and verify plugins/features name/version, \tclick \"Next >\" and accept license agreement, click \"Finish\" \n\th) If \"Security Warning\" dialog appears, click \"OK\" to install unsigned content. \n\ti) In \"Software Updates\" dialog, click \"Yes\" to restart Eclipse to complete Eclipse Poky plugins installation. ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Setup Eclipse Poky to use SDK \n\ta) In Eclipse workbench window, go to \"Window\" menu -> \"Preferences\". \n\tb) In \"Preferences\" window, go to \"Yocto Project SDK\", in \"Cross Compiler Options\" frame, select \"Standalone pre-\tbuilt toolchain\". ",
+ "expected_results": "Eclipse Poky plugins installed and running successfully, e.g. observe that \"Yocto Project Tools\" menu is available on Eclipse workbench window."
+ }
+ },
+ "summary": "Eclipse_Poky_installation_and_setup"
+ }
+ }
+] \ No newline at end of file
diff --git a/meta/lib/oeqa/manual/kernel-dev.json b/meta/lib/oeqa/manual/kernel-dev.json
new file mode 100644
index 0000000000..0dd99199dc
--- /dev/null
+++ b/meta/lib/oeqa/manual/kernel-dev.json
@@ -0,0 +1,200 @@
+[
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_defconfig",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites_7 ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Steps_7",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results_7"
+ }
+ },
+ "summary": "Kernel_dev_defconfig"
+ }
+ },
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_defconfig+fragments",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites_8 ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Steps_8",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results_8"
+ }
+ },
+ "summary": "Kernel_dev_defconfig+fragments"
+ }
+ },
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_Applying_patches",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Steps",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results"
+ }
+ },
+ "summary": "Kernel_dev_Applying_patches"
+ }
+ },
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_linux-yocto-local-source",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites_2 ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Steps_2",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results_2"
+ }
+ },
+ "summary": "Kernel_dev_linux-yocto-local-source"
+ }
+ },
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_linux-yocto-custom-local-source",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites_3 ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Steps_3",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results_3"
+ }
+ },
+ "summary": "Kernel_dev_linux-yocto-custom-local-source"
+ }
+ },
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_recipe-space_meta",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites_5 ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Steps_5",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results_5"
+ }
+ },
+ "summary": "Kernel_dev_recipe-space_meta"
+ }
+ },
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_External_source",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites_6 ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Steps_6",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results_6"
+ }
+ },
+ "summary": "Kernel_dev_External_source"
+ }
+ },
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_building_external_modules(hello-mod)",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites_10 ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup_10",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results_10"
+ }
+ },
+ "summary": "Kernel_dev_building_external_modules(hello-mod)"
+ }
+ },
+ {
+ "test": {
+ "@alias": "kernel-dev.kernel-dev.Kernel_dev_local_parallel_meta",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Follow the Set Up procedure to complete the common and specific prerequisites for this test case. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Setup https://wikioproject.org/wiki/Kernel_Development_Test_Cases#Prerequisites_4 ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Execute the test case steps asdocumented on the \"Kernel Development Test Cases\" wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Steps_4",
+ "expected_results": "Review expected results on thethe \"Kernel Development Test Cases\"wiki. https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases#Expected_Results_4"
+ }
+ },
+ "summary": "Kernel_dev_local_parallel_meta"
+ }
+ }
+] \ No newline at end of file
diff --git a/meta/lib/oeqa/manual/oe-core.json b/meta/lib/oeqa/manual/oe-core.json
new file mode 100644
index 0000000000..fb47c5ec36
--- /dev/null
+++ b/meta/lib/oeqa/manual/oe-core.json
@@ -0,0 +1,158 @@
+[
+ {
+ "test": {
+ "@alias": "oe-core.bitbake.Test_bitbake_menuconfig",
+ "author": [
+ {
+ "email": "jose.perez.carranza@intel.com",
+ "name": "jose.perez.carranza@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "clone poky \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "cd poky \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "source oe-init-build-env && cd build \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "set below in local.conf \n\n \tMACHINE = \"qemux86\" \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "bitbake linux-yocto -c kernel_configme -f \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "bitbake linux-yocto -c menuconfig \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Once menuconfig launches, use the interface to navigate through the selections and \n enable option \"64-bit kernel\" \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Save changes and set name of the file as \"test.config\" ",
+ "expected_results": "Open file: \n \npoky/build//tmp/work/qemux86-poky-linux/linux-yocto/4.X.X+*/linux-qemux86-standard-build/test.config \n \n \n\nand verify that changes are present in the file as follows: \n \nCONFIG_64BIT=y \n \nCONFIG_X86_64=y"
+ }
+ },
+ "summary": "Test_bitbake_menuconfig"
+ }
+ },
+ {
+ "test": {
+ "@alias": "oe-core.bitbake.test_bitbake_devshell",
+ "author": [
+ {
+ "email": "jose.perez.carranza@intel.com",
+ "name": "jose.perez.carranza@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "clone poky ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "cd poky ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "source oe-init-build-env && cd build ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "bitbake matchbox-desktop ",
+ "expected_results": "Package was build correctly "
+ },
+ "5": {
+ "action": "bitbake matchbox-desktop -c devshell ",
+ "expected_results": "A terminal with a shell prompt within the OpenEmbedded build environment is opened "
+ },
+ "6": {
+ "action": "Verify that \"matchbox-desktop\" binary file is not created under\"src\" directory ",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Run command:./configure && make ",
+ "expected_results": "Verify that \"matchbox-desktop\" binary file was created successfully under \"src/\" directory "
+ },
+ "8": {
+ "action": "Exit fromthe devshell terminal,exit ",
+ "expected_results": "Terminal back to the build directory"
+ }
+ },
+ "summary": "test_bitbake_devshell"
+ }
+ },
+ {
+ "test": {
+ "@alias": "oe-core.bitbake.test_dependency_explorer_is_launched",
+ "author": [
+ {
+ "email": "jose.perez.carranza@intel.com",
+ "name": "jose.perez.carranza@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "clone poky ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "cd poky ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "source oe-init-build-env ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "bitbake -u taskexp -g core-image-full-cmdline \n\nNOTE: To execute the last command of this test, it's necessary that the machine is executing an X11 server, or if that's not the case (for example, if running the test on a headless server), it is required to enable ssh X11 forwarding on both, the server and the client, and have the X11 server running on the client. \n\nThe instructions to enable X11 forwarding vary between distributions. But for example, these are the steps to enable it between a server running openSUSE Leap 42.1 and a client with Fedora 24: \nA. On the server, make sure /home//.ssh/config contains the line: \n ForwardX11 yes \nB. On the server, make sure xauth is installed by running: \n which xauth \nC. On the client, connect to the server, enabling X11 forwarding, for example by using: \n ssh -X user@server \nNOTE 2: depexp was renamed to taskexp on 2.3 M4",
+ "expected_results": "Verify that a \"dependency explorer\" is opened and file \n dependencies are listed "
+ }
+ },
+ "summary": "test_dependency_explorer_is_launched"
+ }
+ },
+ {
+ "test": {
+ "@alias": "oe-core.bitbake.test_bitbake_sane_error_for_invalid_layer",
+ "author": [
+ {
+ "email": "jose.perez.carranza@intel.com",
+ "name": "jose.perez.carranza@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "clone poky \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "cd poky \n \n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "source oe-init-build-env && cd build \n \n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Add a invalid layer to conf/bblayers.conf \"<poky dir>/my-invalid-layer\" \n\t\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "bitbake core-image-minimal",
+ "expected_results": "Below error should be displayed:\n\"ERROR: Layer directory does not exist! Please check BBLAYERS in <poky dir>/<build dir>/conf/bblayers.conf\""
+ }
+ },
+ "summary": "test_bitbake_sane_error_for_invalid_layer"
+ }
+ }
+]
diff --git a/meta/lib/oeqa/manual/sdk.json b/meta/lib/oeqa/manual/sdk.json
new file mode 100644
index 0000000000..434982f7f5
--- /dev/null
+++ b/meta/lib/oeqa/manual/sdk.json
@@ -0,0 +1,32 @@
+[
+ {
+ "test": {
+ "@alias": "sdk.sdk_runqemu.test_install_cross_toolchain_can_run_multiple_qemu_for_x86",
+ "author": [
+ {
+ "email": "ee.peng.yeoh@intel.com",
+ "name": "ee.peng.yeoh@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Prepare kernel, rootfs tar.bz2 image, and qemu configuration \n \ta. Download kernel, rootfs tar.bz2 image and qemu configuration from public autobuilder webpage \n \tb. Goto https://autobuilder.yocto.io/pub/releases/<target_release>/machines/qemu/qemux86/ \n \tc. Download \n \t \ti. rootfs tar.bz2: core-image-sato-sdk-qemux86.tar.bz2 \n \t\tii. kernel: bzImage-qemux86.bin \n \t\tiii. qemu configuration: core-image-sato-sdk-qemux86.qemuboot.conf ",
+ "expected_results": "Download completes successfully."
+ },
+ "2": {
+ "action": "Download & install toolchain tarball matching your host from public autobuilder \n \ta. Goto https://autobuilder.yocto.io/pub/releases/<target_release>/toolchain/x86_64/ \n \tb. Download poky-glibc-x86_64-core-image-sato-<type-arch>-toolchain-<release-version>.sh \n \tc. Run command: poky-glibc-x86_64-core-image-sato-<type-arch>-toolchain-<release-version>.sh \n \td. After installation toolchain Run source command : source /toolchain-installed-path/environment-setup-<architecture name>-poky-linux",
+ "expected_results": "Toolchain gets installed successfully."
+ },
+ "3": {
+ "action": "Extract rootfs twice into two images \n \ta. Run 2 commands below: \n runqemu-extract-sdk core-image-sato-sdk-qemux86.tar.bz2 qemux86_rootfs_image1 \n runqemu-extract-sdk core-image-sato-sdk-qemux86.tar.bz2 qemux86_rootfs_image2",
+ "expected_results": "Both images build successfully."
+ },
+ "4": {
+ "action": " From the 2 terminals, start qemu to boot up both two images \n \ta. Run 2 commands below: \n runqemu <kernel-name> core-image-sato-sdk-qemux86.qemuboot.conf qemux86_rootfs_image1 \n runqemu <kernel-name> core-image-sato-sdk-qemux86.qemuboot.conf qemux86_rootfs_image2 ",
+ "expected_results": "Expect both qemu to boot up successfully."
+ }
+ },
+ "summary": "test_install_cross_toolchain_can_run_multiple_qemu_for_x86"
+ }
+ }
+] \ No newline at end of file
diff --git a/meta/lib/oeqa/manual/toaster-managed-mode.json b/meta/lib/oeqa/manual/toaster-managed-mode.json
new file mode 100644
index 0000000000..12374c7c64
--- /dev/null
+++ b/meta/lib/oeqa/manual/toaster-managed-mode.json
@@ -0,0 +1,2572 @@
+[
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.All_layers:_default_view",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table.",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"View compatible layers\" link situated on the right-hand side, mid-page, under the \"Project configuration\" menu, in the \"Layers\" table.",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that the table is populated with the default layers (eg. meta-yocto-bsp, meta-yocto)",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check that by default the following columns are shown: Layer, Summary, Revision, Dependencies and Add/Delete",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that the \"Revision\" entries match the release entry from the main project page, in the project details section.",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Check that only one instance of the core layers (openembedded-core, meta-yocto and meta-yocto-bsp) shows in this table, and that instance has a branch that matches the selected project release from the main project page.",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Check that in the \"Dependencies\" column some of the layers should have a square box with a number in it. When clicking on it, a small popup should appear containing a list of other layers required for this layer to work. Every layer listed here should also be a link to the layer's detail page. \n \n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "From the \"Edit columns\" menu, activate the \"Git repository URL\" and the \"Subdirectory\" columns. In \"Git repository URL\": all the entries should have a link to the external site where the layer was downloaded from. Similarly, in \"Subdirectory\" links should exist, if a subdirectory entry is present.",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "All_layers:_default_view"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.All_layers:_Add/delete_layers",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"View compatible layers\" link situated on the right-hand side, mid-page, under the \"Project configuration\" menus, in the \"Layers\" table. \n\n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that the Add/delete column is enabled. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Add a new layer \nPick a layer that hasn't been added to the project. \n \nClick on the \"Add layer\" button present in the \"Add/delete\" column. \nIf the layer has unsatisfied dependencies a dialog will appear listing the dependencies (in alphabetical order), each of them with a checkbox so that you can select / deselect them. All checkboxes are checked by default. If you click the \"Cancel\" button the dialog closes. If you click the \"Add layers\" button, the layers are added to the project. \n\nMake sure to uncheck at least 1 of the dependencies so you can check that only the checked dependencies are added, and not the unchecked one(s). ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that the \"Add layer\" button fades out and is replaced temporarily by a message like \"1 layer added\" and then it is replaced by the \"Delete layer\" button. \nCheck that a confirmation message is displayed at the top of the page similar to \"You have added 1 layer to project_name_here: meta-yocto-bsp\". \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Delete an existing layer \nPick a layer that's already been added to the project. \nClick on the \"Delete layer\" button present in the \"Add/delete\" column. \nCheck that once the button is pressed, it fades out and is replaced temporarily by the message \"1 layer deleted\" and then it is replaced by the \"Add layer\" button. \nCheck that a confirmation is displayed at the top of the page similar to \"You have deleted 1 layer from project_name_here: meta-yocto-bsp\". ",
+ "expected_results": "All actions should complete successfully."
+ }
+ },
+ "summary": "All_layers:_Add/delete_layers"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.All_targets:_Default_view",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": " If no images exist in the project, build an image by inserting \"core-image-minimal\" in the \"Recipes\" field and press the \"Build\" button. Wait for the image to finish building. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "On the project page click on the \"Image Recipes\" link situated in the left-handed side of the page, under the \"Project configuration\" menus, in the \"COMPATIBLE METADATA\" table. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check that \"Compatible image recipes\" table is populated. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that the following columns are shown by default: \n\t\tImage recipe \n\t\tDescription \n \n\t\tLayer \n\t\tBuild \n\t\t Version ",
+ "expected_results": ""
+ }
+ },
+ "summary": "All_targets:_Default_view"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Configuration_variables:_default_view",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In the main project page, click on \"BitBake variables\" in the left-hand side of the page, under the \"CONFIGURATION\" menu. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that default values are as follows: \n\tDISTRO - poky \n\tIMAGE_FSTYPES - ext3 jffs2 tar.bz2 \n\tIMAGE_INSTALL_append - \"Not set\" \n\tPACKAGE_CLASES - package_rpm \n SSTATE_DIR - /homeDirectory/poky/sstate-cache \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check that under the \"Add variable\" section, the \"Variable\" field has the default text \"Type variable name\" present, the \"Value\" field has the default text \"Type variable value\" present and that the \"Add variable\" button is inactive. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that under the \"Add variable\" section, there is text present that describes the variables that Toaster cannot modify. ",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Configuration_variables:_default_view"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Configuration_variables:_Test_UI_elements",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In the main project page, click on \"BitBake variables\" in the left-hand side of the page, under the \"CONFIGURATION\" menu. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "DISTRO: \n\t- check that the \"change\" icon is present (represented by a pen icon) \n\t- click on the \"change\" icon and check that the variable becomes an editable text field, populated with the current value of the variable \n\t- check that, if you delete the content of the text field, the save button is disabled \n\t- enter a distro name containing spaces (for example, \"poky tiny\") - check that an error message is shown explaining that the value entered cannot contain spaces \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "IMAGE_FSTYPES: \n\t- check that the \"change\" icon is present (represented by a pen icon) \n\t- click on the \"change\" icon and check that the variable becomes editable like so: the main input control is a set of checkboxes. There is a checkbox for each supported image type. The checkboxes are listed in ascending alphabetical order, broken down in 2 groups: \n\t\t",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "The selected types are checked and listed at the top \n\t\t",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "The other types are not checked and listed afterwards \n\t- check that all this is inside a scrollable div, and a text field is present above that filters out the content of the div as you type. \n\t- check that if there are no image types matching your typed string, a message is shown notifying you of this: \"No image types found\" \n\t- unselect all checkboxes and check that the save button is disabled and a message is shown: \"You must select at least one image type\" \n\t- select different checkboxes and hit save then make sure that the \tsaved value is consistent with the selected checkboxes \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "IMAGE_INSTALL_append: \n\t- check that the \"change\" icon is present (represented by a pen icon) \n\t- click on the \"change\" icon and check that the variable becomes a text field, populated with the current value of the variable. \n\n\t- check that the save button is disabled when the text field is empty \n\t- insert test in the text field (for example \"package1\") and hit save; be aware that there is no input validation for this variable \n\t- check that a new \"delete\" icon(a trashcan) has appeared next to the pen icon \n\t- check that clicking on the trashcan icon resets the value to \"Not set\" and makes the trashcan icon dissapear \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "PACKAGE_CLASSES: \n\t- check that the \"change\" icon is present (represented by a pen icon) \n\t- click on the \"change\" icon and check that the variable becomes editable with the following components: \n\t\t",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "A dropdown menu with values 'package_dev', 'package_ipk' and 'package_rpm' in this order. The value selected when you enter the editable state matches the first value of the variable (e.g. if the value is set to 'package_dev package_ipk' the value selected is 'package_dev'). \n \n\t\t",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "Two checkboxes, showing the 2 unselected values in the dropdown menu. \n\n\t- verify that the checkboxes are checked or unchecked to reflect the variable value (e.g. if the value is set to 'package_dev package_ipk', the 'package_ipk' checkbox is checked, and the 'package_rpm' checkbox is unchecked). \n\n\tBoth checkboxes can be unchecked. The value of the checkboxes changes dynamically as I change the selected value in the dropdown menu. This means that any changes to the dropdown menu should uncheck the checkboxes. \n\n\t- click on save and check that the value selected in the dropdown menu is the first value in the variable, followed by any checked checkboxes. \n\n\n",
+ "expected_results": ""
+ },
+ "11": {
+ "action": "Adding variables: \n\t- check that the \"add variable\" form has 2 text fields: one for the variable name and a second one for the variable value, plus an \"add\" button that is disabled until both text fields have some input in them. \n \n\t- check variable name validation: variable names cannot have spaces, and can only include letters, numbers, underscores and dashes; variable names entered cannot match the name of a variable already on the list; variable names cannot match the blacklisted variables mentioned in the text on the right-hand side of the page \n\n\t - check that an error message is shown indicating validation has failed and why once you try to put in the value or click on the \"Add variable\" button ",
+ "expected_results": "All mentioned elements should be present and functional."
+ },
+ "12": {
+ "action": "insert a valid combination and click on \"Add variable\"; check that a new variable/value pair is added at the bottom of the variable list and that the text fields in the \"add variable\" form are cleared and the \"add\" button is disabled \n\t- check that the added variable has a \"change\" icon present next to the variable value, and also that a \"delete\" icon is present next to the variable name \n\t- check that clicking the \"change\" icon makes the variable editable in a text field containing the value of the variable \n\t- check that, if you delete the content of the text field, the save button is\tdisabled\n\t- check that clicking on the \"delete\" button causes both the variable name and the variable value to be removed from the variables list",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Configuration_variables:_Test_UI_elements"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Project_builds:_Default_view",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"Builds\" , next to the \"Configuration\" Button. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that the page heading includes a counter with the number of builds run for the project(eg. \"Project builds (4)\"). \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check that the following table heads are visible by default: outcome, completed on, failed tasks, errors, warnings, image files. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that by default the table is sorted by \"Completed on\" in descending order",
+ "expected_results": "All mentioned elements should be present."
+ }
+ },
+ "summary": "Project_builds:_Default_view"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Project_builds:_Sorting_the_project_builds_table",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"View all project builds\" link situated below the top-most \"Build\" button and text field, next to the \"View all targets\" link \n\n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Verify that, by default, the table is sorted by \"Completed on\" in descending order. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Activate all columns from the \"Edit columns\" table. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that the following columns are sortable, both in ascending and descending order: outcome, target, machine, started on, completed on, warning, project \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Verify that hiding a column that is currently being used as the sorting criteria causes the sorting to reset to the default - i.e \"Completed on\" in descending order.",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Project_builds:_Sorting_the_project_builds_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Project_builds:_customize_the_columns_of_the_table",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"View all project builds\" link situated below the top-most \"Build\" button and text field, next to the \"View all targets\" link \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Click on the \"Edit column\" menu and check that the selected columns match the columns currently being shown. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check that the following columns cannot be removed from the shown columns: completed on, outcome, recipe \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that unchecked items changed to checked immediately appear in the table and that checked items changed to unchecked immediately disappear from the table.",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Project_builds:_customize_the_columns_of_the_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Project_builds:_filter_the_contents_of_the_table",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"View all project builds\" link situated below the top-most \"Build\" button and text field, next to the \"View all targets\" link. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Make sure the following columns have filters: outcome, started on, completed on, failed tasks. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Filters are mutually exclusive. Click a filter button of a one column and a filter dialogue occurs. Select a filter item. The filter result would be showed. Then select another filter item of another column and the previously applied filter is overridden by the newly selected filter when a filter from a different column is applied to the table. This filter will override the current filter.\" \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Filters are overridden by search. Run a search query and you can see previous filter results are overridden by the results of the search query.",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Project_builds:_filter_the_contents_of_the_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Project_builds:_search_the_contents_of_the_table",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"View all project builds\" link situated below the top-most \"Build\" button and text field, next to the \"View all targets\" link. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "When no search query has been entered, we have placeholder text saying: \"Search builds\". The placeholder text disappears when the first character is typed. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "When a search query has been submitted and results returned: \n- We keep the search string in the text input field. \n- We provide a \"Clear search\" icon (icon-remove-sign). Click it to clear the search and display all packages. \n- We change the page heading to indicate the number of results returned by the search query. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "If your search query returns no results, the page heading changes to \"No packages found\", and we show you an alert with a search form and an option to show all packages. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Searching does not change the state of the table: the same columns remain hidden and the same sorting applied. ",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Project_builds:_search_the_contents_of_the_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Layer_details_page:_Default_view",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"View compatible layers\" link situated in the \"Project configuration\" portion of the page, under \"Layers\" table. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Click on a layer (for example \"meta-aarch64\"). Notice that the page is divided into 2 columns: the left one is broken down into tabs; the right one provides information about the layer. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check that breadcrumbs exist at the top of the page. Check that they work by clicking on them, then hitting back to return to the layer detail page. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that the page heading includes the layer branch name - it should look something like meta-aarch64(dizzy) if the dizzy branch was selected. The branch name should also be present in the breadcrumbs. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "The \"About\" information: \nit shows summary, description in this order, if not empty. If an information item is empty (like the Summary in the example shown in this page), it does not display. \n \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "The tabs: \nCheck that there are 3 tabs: \"layer details\", \"recipes\", \"machines\" showing up in this order. \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "\"Layer details\" tab: \nCheck that the tab shows: \n- A button to add / remove the layer to / from the project. In this tab, the button labels are\"Add the $layer_name layer to your project\" \"Delete the $layer_name layer from your project\" \n- Some details about the layer: repository URL, repository subdirectory, revision (the branch) and the list of layer dependencies. If any of the above details is blank (most likely, the subdirectory) it does not display.The icons next to the repository and subdirectory information are links to their web instances. Those links should open in a new window. \n\n",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "The \"Recipes\" tab: \nCheck that it shows: \n\t",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "A counter in the tab label showing the total number of targets provided by the layer \n\t",
+ "expected_results": ""
+ },
+ "11": {
+ "action": "A button to add / remove the layer to / from the project. In this tab, the button labels are \"Add the $layer_name layer to your project to enable these targets\"/\"Delete the $layer_name layer from your project\" \n\t",
+ "expected_results": ""
+ },
+ "12": {
+ "action": "A recipes table with the following columns: \n \n- Recipe \n- Description: the value of the DESCRIPTION variable. If not set, then the value of the SUMMARY variable. \n- Build recipe, which shows a \"build recipe\" button. The \"build recipe\" button is disabled when the layer is not added to the project. \n\nThe recipes table is sorted by \"Recipe\" in ascending alphabetical order. \n\n1",
+ "expected_results": ""
+ },
+ "13": {
+ "action": "The \"Machines\" tab: \n\t",
+ "expected_results": ""
+ },
+ "14": {
+ "action": "A counter in the tab label showing the total number of machines provided by the layer \n\t",
+ "expected_results": ""
+ },
+ "15": {
+ "action": "A button to add/remove the layer to/from the project. In this tab, the button labels are \"Add the $layer_name layer to your project to enable these machines\"/\"Delete the $layer_name layer from your project\" \n\t",
+ "expected_results": ""
+ },
+ "16": {
+ "action": "A machines table with the following columns: \n \n- Machine. \n \n- Description: The value of the DESCRIPTION variable in the .conf file \n- Select machine, which shows a \"select\" button. The \"select\" button is disabled when the layer is not added to the project. \nThe machines table is sorted by \"Machine\" in ascending alphabetical order. \n",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Layer_details_page:_Default_view"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Layer_details_page:_UI_functionality",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"View compatible layers\" link situated in the \"Project configuration\" portion of the page, under \"Layers\" \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Click on a layer (for example \"meta-aarch64\"). \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Adding/removing a layer: \nClick on \"Add the $layer_name_here layer to your project\" and verify that the \"Add layer\" button turns into a red button with the label \"Delete the $layer_name_here layer from your project\" and that at the top of the page, below the header, you see a message \"You have added 1 layer to $project_name_here: $layer_name_here\". This message can be dismissed by clicking on the \"X\" at the top right side of the message. ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Click on the red \"Delete the $layer_name_here from your project\" button and verify that the \"Delete layer\" button turns back into a grey button with the label \"Add the $layer_name_here to your project\" and that at the top of the page, below the header, you see a message \"You have deleted 1 layer to $project_name_here: $layer_name_here\". This message can be dismissed by clicking on the \"X\" at the top right side of the message. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Dependencies window: \n For a layer that has dependencies( for example \"meta-ettus\"), once you click the \"Add layer\" button, verify that you get a message window that presents the dependencies for this layer with the message \"$layer_name_here depends on some layers that are not added to your project. Select the ones you want to add:\", a list with a checkbox for each one and 2 options: \"Add layers\" or \"Cancel\". \nClicking on \"Add layers\" adds all the dependencies and the current layer. Clicking on \"Cancel\" takes you back to the layer detail page without adding any of the layers. \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "\"Recipes\" table \nCheck that if the layer hasn't been added to the project, the \"Build recipe\" button(s) are disabled. After the project is added, check that the \"Build recipe\" button(s) become active and clicking on a button sends you to the main project page and starts a build. \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "\"Machines table\" \nCheck that if the layer hasn't been added to the project, the \"Select machine\" button(s) are disabled. After the project is added, check that the \"Build machine\" button(s) become active and clicking on a button sends you to the main project page and modifies the project machine to the one selected. ",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Layer_details_page:_UI_functionality"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Importing_new_layers",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"Import layer\" link situated in the \"Project configuration\" portion of the page, under \"Layers\" table. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that the import layer form is shown, with the following elements as text fields to be filled out: \nLayer name (example: meta-imported) \nGit repository URL (example: git://github.com/shr-distribution/meta-smartphone.git) \nRepository subdirectory (optional) (example: meta-acer) \nRevision (example: master) \n\nIn addition, a separate portion of the form will be the \"Layer dependencies\" portion, where you can add dependency layers for the layer you are importing. This portion will contain a list of dependencies already added, with a trashcan icon next to them that will delete them when pressed and a text field with a \"add layer\" button next to it for adding dependencies. (for example: meta-android, meta-oe) \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "At the bottom of the form, check that a button exists with the label \"Import and add to project\". Check that this button is inactive until the required fields are filled out. \nCheck that clicking on the \"Import button\" takes you back to the main project page and that the imported layer, along with any dependencies, were added in the project's layers. ",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Importing_new_layers"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Layer_details_page:_UI_functionality_for_imported_layers",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Click on the \"View compatible layers\" link situated in the \"Project configuration\" portion of the page, under \"Layers\" table. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Select an imported layer (see in TC 1112 how to import a layer). \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Page heading \nCheck that the page heading includes the branch, tag or commit as entered when importing the layer.\nIf it's a commit, Check that only the first 10 characters are shown followed by an ellipsis character. The full commit shows on hover.The branch, tag or commit information also shows in the breadcrumb. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "The \"About\" information \nIt shows: \n- Summary \n- Description \nin this order. Those two items always show, independently of them being blank or not, since they can be edited by users. \n\nWhen an information item is empty, it shows as \"not set\" with a \"change\" icon. Click on the icon to add a value. \n\nFor \"Summary\" and \"Description\" clicking the \"change\" icon shows the selected information item in its editable state. It consists of a text area, set to 2 rows for the \"Summary\" and to 6 rows for the \"Description\", plus 'save' and 'cancel' buttons. \nThe 'save' buttons only activate when there is at least one character in the text area. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "The tabs \nCheck that the tabs shown are: \n- \"Layer details\" \n- \"Recipes\" \n- \"Machines\" \nThe tabs should show in the order in which they are listed above. \n\n\"Layer details\" tab: \nIn not-editable pages, the tab shows: \n- A button to add / remove the layer to / from the project. In this tab, the button labels are: \n\t- \"Add the $layer_name layer to your project\" \n\t- \"Delete the $layer_name layer from your project\" \n\n- Some details about the layer: repository URL, repository subdirectory, revision (branch / tag / commit) and the list of layer dependencies. This is the information required from users when importing a layer. The subdirectory and the layer dependencies can be blank.",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "If blank, they show as \"not set\". \n\nEditing the \"Repository URL\" \nThe \"Git repository URL\" cannot be blank. Therefore, we show only a \"change\" icon next to it. When you click the icon, the text input field is set to the current value. If you delete the value from the input field, we disable the \"save\" button. We enable it again when you type something in the field. \n\nEditing the \"Repository subdirectory\" \nThe \"Repository subdirectory\" can be blank. Therefore, we show both \"change\" and \"delete\" icons. When you click the \"delete\" icon, we \nshow the label \"Not set\".",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "\nWhen you click the \"change\" icon, the text input field is set \nto the current value. \nIf you delete the value from the input field, we disable the \"save\" button. We enable it again when you type something in the field. \n \n\nEditing the \"Revision\" \nThe \"Revision\" cannot be blank. Therefore, we show only a \"change\" icon next to it. When you click the icon, the text input field is set to the current value. If you delete the value from the input field, we disable the \"save\" button. We enable it again when you type something in the field. \n\nThe \"Recipes\" tab \nIt shows: \n1: A counter in the tab label showing the total number of targets provided by the layer \n2: A button to add/remove the layer to/from the project. ",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "In this tab, the button labels are \n \n\"Add the $layer_name layer to your project to enable \nthese targets\" \n\"Delete the $layer_name layer from your project\" \n\n3: A \"Recipes\" table with the following columns: \n \n- Recipe \n- Description: the value of the DESCRIPTION variable. If not set, then the value of the SUMMARY variable. \n- Build recipe, which shows a \"build recipe\" button. The \"build recipe\" button is disabled when the layer is not added to the project. \nThe recipes table is sorted by \"Recipe\" in ascending alphabetical order. \n\nThe \"Machines\" tab: \nIt shows: \n1: A counter in the tab label showing the total number of machines provided by the layer \n2: A button to add/remove the layer to/from the project.",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "In this tab, the button labels are \n \n\t- \"Add the $layer_name layer to your project to enable these machines\" \n\t- \"Delete the $layer_name layer from your project\" \n3: A \"machines\" table with the following columns: \n- Machine. \n \n- Description: The value of the DESCRIPTION variable in the .conf file \n- Select machine, which shows a \"select\" button. The \"select\" button is disabled when the layer is not added to the project. \nThe machines table is sorted by \"Machine\" in ascending alphabetical order. ",
+ "expected_results": "All mentioned elements should be present and functional."
+ }
+ },
+ "summary": "Layer_details_page:_UI_functionality_for_imported_layers"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Multiple_build_directories",
+ "author": [
+ {
+ "email": "stanciux.mihail@intel.com",
+ "name": "stanciux.mihail@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "after starting Toaster for the first time, go to http://[localhost]:8000/admin/ and login with the admin user you created during setup. Click on the Build environments section, and on the BuildEnvironment object. \n\n\n\nNote: you can create a superuser to enter as admin with ... poky/bitbake/lib/toaster/manage.py createsuperuser \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "make note of the \"sourcedir\" and \"builddir\" values. The build dir will be something like \"/home/user/path/build\" \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": " click \"back\", and click on the \"Add build environment\" button in the upper right corner. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "enter Address \"2\", Betype: \"local\", \"sourcedir\" is to be set to whatever the original build env is set, and \"builddir\" is ANOTHER path at the same level as the original builddir - e.g. \"/home/user/path/build2\" \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Click save \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Execute command : /poky$ source oe-init-build-env build2 \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Create new project \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "issue 2 build (e.g. core-image-minimal core-image-sato)\n\n\n\n\n\n",
+ "expected_results": "Both build commands should run simultaneously."
+ }
+ },
+ "summary": "Multiple_build_directories"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Run_again_button_from_all_builds_page_must_run_the_specified_task",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": "Click on new project button.",
+ "expected_results": " Open create a new project page. \n"
+ },
+ "3": {
+ "action": "Enter a project name, select a release and click on create project or select an existing project.",
+ "expected_results": " Project Created. \n"
+ },
+ "4": {
+ "action": "Build a image task (ex: core-image-minimal:clean) and wait until build finish.\nfrom all build page.",
+ "expected_results": " Build task finishes successfully. \n"
+ },
+ "5": {
+ "action": "Click on rebuild button from all build page.",
+ "expected_results": "Specified task will run again. \n"
+ },
+ "6": {
+ "action": "Click on the build and verify if the number of tasks executed = 1.",
+ "expected_results": "Only the specified task is executed. \n"
+ },
+ "7": {
+ "action": "From project builds page click on run again button.",
+ "expected_results": "Specified task will run again.\n"
+ },
+ "8": {
+ "action": "Click on the build and verify if the number of tasks executed = 1.",
+ "expected_results": ""
+ }
+ },
+ "summary": "Run_again_button_from_all_builds_page_must_run_the_specified_task"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Intel_layers_builds",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": "Click on new project button.",
+ "expected_results": "Open create a new project page. \n"
+ },
+ "3": {
+ "action": "Enter a project name, select a release and click on create project.",
+ "expected_results": "Project Created. \n"
+ },
+ "4": {
+ "action": "Click on layers tab.",
+ "expected_results": "Open compatible layers page. \n"
+ },
+ "5": {
+ "action": "Search for intel.",
+ "expected_results": "Return results \n"
+ },
+ "6": {
+ "action": "Add intel layers like: meta-intel, meta-intel-quark.",
+ "expected_results": "Layers added to project. \n"
+ },
+ "7": {
+ "action": "Click on the added layer.",
+ "expected_results": "Open layer page. \n"
+ },
+ "8": {
+ "action": "From machine tab, select a machine.",
+ "expected_results": "Machine has changed. \n"
+ },
+ "9": {
+ "action": "Build a recipe(core-image-minimal) or a recipe from recipe tab.",
+ "expected_results": "Build finishes successfully."
+ }
+ },
+ "summary": "Intel_layers_builds"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Download_other_artifacts",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Delete the build/tmp folder. (to make sure the rootfs task runs and other artifacts are generated for the build)",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n\t"
+ },
+ "3": {
+ "action": "Click on new project button.",
+ "expected_results": "Open create a new project page. \n\t"
+ },
+ "4": {
+ "action": "Enter a project name, select a release and click on create project.",
+ "expected_results": "Project Created. \n\t"
+ },
+ "5": {
+ "action": "Build an image recipe (ex: core-image-minimal) and wait until build finish.",
+ "expected_results": "Build finishes successfully. \n\t"
+ },
+ "6": {
+ "action": "Click on the built recipe.",
+ "expected_results": "Open build summary page. \n\t"
+ },
+ "7": {
+ "action": "From other artifacts tab click on a link.",
+ "expected_results": "You can download other artifacts."
+ }
+ },
+ "summary": "Download_other_artifacts"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Download_licence_manifest",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Delete the build/tmp folder. (to make sure license manifest is generated)",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Start Toaster \n\n",
+ "expected_results": "Toaster starts. \n"
+ },
+ "3": {
+ "action": "Click on new project button. \n\n",
+ "expected_results": "Open create a new project page. \n"
+ },
+ "4": {
+ "action": "Enter a project name, select a release and click on create project. \n\n",
+ "expected_results": "Project Created. \n"
+ },
+ "5": {
+ "action": "Build an image recipe (ex: core-image-minimal) and wait until build finish. \n\n",
+ "expected_results": "Build finishes successfully. \n"
+ },
+ "6": {
+ "action": "Click on the built recipe. \n\n",
+ "expected_results": "Open build summary page. \n"
+ },
+ "7": {
+ "action": "From Image tab click on \"Download\" button for License manifest.",
+ "expected_results": "You can download license manifest."
+ }
+ },
+ "summary": "Download_licence_manifest"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_dependencies_layers",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": "Click on new project button.",
+ "expected_results": "Open create a new project page. \n"
+ },
+ "3": {
+ "action": "Enter a project name, select a release and click on create project.",
+ "expected_results": "Project Created. \n"
+ },
+ "4": {
+ "action": "Click on Layers.",
+ "expected_results": "Open compatible layers page. \n"
+ },
+ "5": {
+ "action": "Add a layer with multi-level dependencies. (ex: meta-acer) \nThis layer depends on meta-networking, which in turn depends on meta-android. \n \n",
+ "expected_results": "The selected layer and dependencies were added to project. \n"
+ },
+ "6": {
+ "action": "Check if meta-python appears in the dependencies list, and add the layers to project.",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Delete a dependency layer.",
+ "expected_results": "Layer removed from project. \n \n"
+ },
+ "8": {
+ "action": "Build a recipe (ex: core-image-minimal) and wait until build finish.\n",
+ "expected_results": "Build will fail with an error.\n\n\t"
+ }
+ },
+ "summary": "Test_dependencies_layers"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_build_recipe_button_from_recipes_page",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": "Click on new project button.",
+ "expected_results": "Open create a new project page. \n"
+ },
+ "3": {
+ "action": "Enter a project name, select a release and click on create project.",
+ "expected_results": "Project Created. \n"
+ },
+ "4": {
+ "action": "Click on software recipes / image recipes.",
+ "expected_results": "Open compatible software recipes page. \n"
+ },
+ "5": {
+ "action": "Select a recipe and click on 'add layer' button.",
+ "expected_results": "Layer added to project and the 'add layer' button becomes 'build recipe'. \n"
+ },
+ "6": {
+ "action": "Click on \"Build recipe\" button for one recipe (ex : core-image-minimal / busybox).",
+ "expected_results": "Build finishes successfully."
+ },
+ "7": {
+ "action": "Test this for software and image recipes tables.",
+ "expected_results": ""
+ }
+ },
+ "summary": "Test_build_recipe_button_from_recipes_page"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_compatible_machines",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": "Click on new project button.",
+ "expected_results": "Open create a new project page. \n"
+ },
+ "3": {
+ "action": "Enter a project name, select a master release and click on create project.",
+ "expected_results": "Project Created. \n"
+ },
+ "4": {
+ "action": "Go to machines page.",
+ "expected_results": "Open compatible machines page. \n"
+ },
+ "5": {
+ "action": "Choose a machine and click on add layer for it. (intel-core2-32)",
+ "expected_results": "Layers added to project and add layer button becomes select machine. \n"
+ },
+ "6": {
+ "action": "Click on select machine.",
+ "expected_results": "Machine has changed. \n"
+ },
+ "7": {
+ "action": "Go to layer page that generate the machine. (meta-intel)",
+ "expected_results": "Open layer page \n"
+ },
+ "8": {
+ "action": "Build a recipe generated by that layer.",
+ "expected_results": "Build finishes successfully."
+ }
+ },
+ "summary": "Test_compatible_machines"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Builds_with_different_machines",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": "Click on new project button.",
+ "expected_results": "Open create a new project page. \n"
+ },
+ "3": {
+ "action": "Enter a project name, select a master release and click on create project.",
+ "expected_results": "Project Created. \n"
+ },
+ "4": {
+ "action": "Select a machine (ex: qemux86-64)",
+ "expected_results": "The machine has changed. \n"
+ },
+ "5": {
+ "action": "Build a recipe (ex: core-image-minimal) and wait until buid finish.",
+ "expected_results": "Build finishes successfully. \n"
+ },
+ "6": {
+ "action": "Go to project page and change the machine (ex: qemumips)",
+ "expected_results": "The machine has changed. \n"
+ },
+ "7": {
+ "action": "Build a recipe (ex: core-image-sato) and wait until build finish.",
+ "expected_results": "Build finishes successfully. \n\nYou can build recipes with different machines."
+ },
+ "8": {
+ "action": "Check on build summary page that the machine match the machine selected.",
+ "expected_results": ""
+ }
+ },
+ "summary": "Builds_with_different_machines"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_bitbake_variables_-_IMAGE_FSTYPES",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": "Click on new project button.",
+ "expected_results": "Open create a new project page. \n"
+ },
+ "3": {
+ "action": "Enter a project name, select release and click on create project.",
+ "expected_results": "Project Created. \n"
+ },
+ "4": {
+ "action": "Go to Configuration --> BitBake variables",
+ "expected_results": "Open Bitbake variables page. \n"
+ },
+ "5": {
+ "action": "Change IMAGE_FSTYPES variable, add some image types like: hddimg, ext4, etc.",
+ "expected_results": "Image types were added. \n"
+ },
+ "6": {
+ "action": "Build a recipe (ex: core-image-minimal) and wait until build finish.",
+ "expected_results": "Build finishes successfully. \n"
+ },
+ "7": {
+ "action": "Verify in the build summary page if the image types selected were built.",
+ "expected_results": "All the image types selected appears in the build summary page."
+ }
+ },
+ "summary": "Test_bitbake_variables_-_IMAGE_FSTYPES"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Software_recipes:_default_view",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": " If no images exist in the project, build an image by inserting \"core-image-minimal\" in the \"Recipes\" field and press the \"Build\" button. Wait for the image to finish building. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "On the project page click on the \"Software Recipes\" link situated in the left-handed side of the page, under the \"Project configuration\" menus, in the \"COMPATIBLE METADATA\" table. \n\n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Check that \"Compatible software recipes\" table is populated. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that the following columns are shown by default: \n\n\t\tSoftware recipe \n\t\tDescription \n \n\t\tLayer \n\t\tBuild \n\t\t Version ",
+ "expected_results": ""
+ }
+ },
+ "summary": "Software_recipes:_default_view"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Software_recipes:_sorting_the_content_of_the_software_recipes_table",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Navigate to the \"Software Recipes\" page. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Make sure the table is sorted on the \"Software Recipe\" column by default in ascending order. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Activate all columns from the \"Edit column\" drop-down menu. Check that \"Build\" and \"Software Recipe\" columns cannot be unchecked. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that \"Software Recipe\", \"Section\", \"License\", \"Layer\" are the only sortable table heads. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Sort the table by \"Layer\" and then navigate away by selecting a layer(such as meta-yocto). When you click \"back\" button in web-browser to go back to the \"Compatible image recipes\" table it should still be sorted by \"Layer\". \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Sorting and \"Edit columns\" \nIf you use the \"Edit columns\" menu to hide the column with the applied sorting, we revert the sorting to the default sorting (i.e. \"Recipe\"). The default sorting always uses one of the core columns, which cannot be hidden using the \"Edit columns\" menu. \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Sorting and search \nSearching should have no impact on the applied sorting. Any results returned should be sorted by the sorting criteria selected when the search query was submitted. \nSort recipes by \"Layer\" column heading. Input a string (such as \"meta\") in search box and click search button. Make sure results returned are sorted by \"Layer\".",
+ "expected_results": ""
+ }
+ },
+ "summary": "Software_recipes:_sorting_the_content_of_the_software_recipes_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Software_recipes:_Searching_the_content_of_the_software_recipes_table",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Navigate to the \"Software Recipes\" page. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that the search is made of a text input field and a \"Search\" button in a toolbar above the table. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "When no search query has been entered, we have placeholder text saying: \"Search compatible software recipes\". \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Input \"core\" in the text input field. The placeholder text disappears when the first character is typed. Click search button. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": " \n(1) returned results \nThe search string is kept in the text input field. The results returned occur. Click \"Clear search\" icon to clear the search and display the compatible recipes. \n(2) no results returned \nIf your search query returns no results, the page heading changes to \"No recipes found\", and we show you an alert with a search form and an option to show all targets. Check that \"show compatible recipes\" button is available. \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "When I run a search, the search happens against the following columns (independently of they being shown or hidden):\n- Software Recipe\n- Recipe version\n- Description\n- Recipe file\n- Section\n- License\n- Layer\n- Revision\nInput a string to search for the above column headings separately to make sure that the search happens against the columns. \n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Search, sorting and \"Edit columns\" \nSearching does not change the state of the table: the same columns remain hidden and the same sorting applied when search results are displayed, but filters are cleared by the search results.\nSearch a string and make sure that the same columns remain hidden and the same sorting applied. \n\n",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Search and filters \nThe scope of the filters is the content currently on the table (this means all table pages, not only the one displayed). The scope of the search is always the content of the database. \n\nIf I run a search query, any filter applied afterwards will filter the content returned by the search query. \n\nIf I run a search query while a filter is applied, the filter is cleared by the results of the search query (i.e. we display the results of the search query and clear the filter applied beforehand). The same happens if I click the \"Clear search\" icon when a filter is applied to a set of search results (both search results and applied filter are cleared, and the table shows all the targets). ",
+ "expected_results": ""
+ }
+ },
+ "summary": "Software_recipes:_Searching_the_content_of_the_software_recipes_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Software_recipes:_Filter_the_contents_of_the_software_recipes_table",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All builds\" table.",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Navigate to the \"Software Recipes\" page.",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Make sure the following table column has filters: \n- Build",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Filters are mutually exclusive. Click a filter button of a one column and a filter dialogue occurs. Select a filter item. The filter result would be showed. Then select another filter item of another column and the previously applied filter is overridden by the newly selected filter when a filter from a different column is applied to the table. In this state, we show some help text next to the \"Apply\" button, saying \"You can only apply one filter to the table. This filter will override the current filter.\"",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Filters are overridden by search. Run a search query and you can see previous filter results are overridden by the results of the search query.",
+ "expected_results": ""
+ }
+ },
+ "summary": "Software_recipes:_Filter_the_contents_of_the_software_recipes_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_the_packages_included_in_the_image",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": " Click on new project button.",
+ "expected_results": " Open create a new project page. \n"
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project.",
+ "expected_results": " Project Created. \n"
+ },
+ "4": {
+ "action": " Build a recipe (ex: core-image-minimal) and wait until build finish.",
+ "expected_results": " Build finishes successfully. \n"
+ },
+ "5": {
+ "action": " Click on the built recipe.",
+ "expected_results": " Open build summary page. \n"
+ },
+ "6": {
+ "action": " Under IMAGES tab click on the recipe built.",
+ "expected_results": "Image page open. \n"
+ },
+ "7": {
+ "action": "Click on a package name.",
+ "expected_results": "Open the package page. \n"
+ },
+ "8": {
+ "action": "Under file title click on the link to file.",
+ "expected_results": "You are redirected to directory structure and you can see where the file is located."
+ }
+ },
+ "summary": "Test_the_packages_included_in_the_image"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_the_filters_from_a_image_page",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": " Click on new project button.",
+ "expected_results": " Open create a new project page. \n"
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project.",
+ "expected_results": " Project Created. \n"
+ },
+ "4": {
+ "action": " Build a recipe (ex: core-image-minimal) and wait until build finish.",
+ "expected_results": " Build finishes successfully. \n"
+ },
+ "5": {
+ "action": " Click on the built recipe.",
+ "expected_results": " Open build summary page. \n"
+ },
+ "6": {
+ "action": "Click on Configuration - Bitbake Variables.",
+ "expected_results": "Open bitbake variables page. \n"
+ },
+ "7": {
+ "action": "Test Description filter. ",
+ "expected_results": "Filter works ok. (filter returns only items that match the selected criteria) "
+ }
+ },
+ "summary": "Test_the_filters_from_a_image_page"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_dependencies_link",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Start Toaster.",
+ "expected_results": "Toaster starts. \n"
+ },
+ "2": {
+ "action": " Click on new project button.",
+ "expected_results": " Open create a new project page. \n"
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project.",
+ "expected_results": " Project Created. \n"
+ },
+ "4": {
+ "action": " Build a recipe (ex: core-image-minimal) and wait until build finish.",
+ "expected_results": " Build finishes successfully. \n"
+ },
+ "5": {
+ "action": " Click on the built recipe.",
+ "expected_results": " Open build summary page. \n"
+ },
+ "6": {
+ "action": "Click on recipes tab.",
+ "expected_results": "Open recipes page. \n"
+ },
+ "7": {
+ "action": "Click on edit columns and select Dependencies.",
+ "expected_results": "Dependencies column is shown in the table. \n"
+ },
+ "8": {
+ "action": "Click on a number of dependencies.",
+ "expected_results": "A pop up with dependencies will appear. \n"
+ },
+ "9": {
+ "action": "Click on a dependency. ",
+ "expected_results": "Open recipe dependency page. "
+ }
+ },
+ "summary": "Test_dependencies_link"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_recipe_file_link",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster. \n\n\t",
+ "expected_results": "Toaster starts. \n\n\t"
+ },
+ "2": {
+ "action": " Click on new project button. \n\n\t",
+ "expected_results": " Open create a new project page. \n\n\t"
+ },
+ "3": {
+ "action": " Enter a project name, select a release (ex: master) and click on create project. \n\n\t",
+ "expected_results": " Project Created. \n\n\t"
+ },
+ "4": {
+ "action": "Click on Image recipes tab. \n\n\t",
+ "expected_results": "Open Compatible image recipes table. \n\n\t"
+ },
+ "5": {
+ "action": "Click on edit columns and select recipe file. \n\n\t",
+ "expected_results": "Recipe file column appears in the table. \n\n\t"
+ },
+ "6": {
+ "action": "Click on the blue button near a recipe file. \n\n\t",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Repet steps - 4 to 6 for software recipes.",
+ "expected_results": ""
+ }
+ },
+ "summary": "Test_recipe_file_link"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.See_packages_size",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster. \n\n\t",
+ "expected_results": " Toaster starts. \n\n\t"
+ },
+ "2": {
+ "action": " Click on new project button. \n\n\t",
+ "expected_results": " Open create a new project page. \n\n\t"
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project. \n\n\t",
+ "expected_results": " Project Created. \n\n\t"
+ },
+ "4": {
+ "action": " Build a recipe (ex: core-image-minimal) and wait until build finish. \n\n\t",
+ "expected_results": " Build finishes successfully. \n\n\t"
+ },
+ "5": {
+ "action": " Click on the built recipe. \n\n\t",
+ "expected_results": " Open build summary page. \n\n\t"
+ },
+ "6": {
+ "action": "Click on packages tab. \n\n\t",
+ "expected_results": "Open packages page. \n\n\t"
+ },
+ "7": {
+ "action": "Click on size to sort the table. ",
+ "expected_results": "You can check the size of each package. \n\nWhen you click on 'Size' the first time, the correct sorting is the inverse one (biggest package on top). Clicking a second time will invert the sorting (you'll see packages with 0 B size on top)."
+ }
+ },
+ "summary": "See_packages_size"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Build_multiple_recipes",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Start Toaster. \n\n\t",
+ "expected_results": " Toaster starts. \n\n\t"
+ },
+ "2": {
+ "action": " Click on new project button. \n\n\t",
+ "expected_results": " Open create a new project page. \n\n\t"
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project. \n\n\t",
+ "expected_results": " Project Created. \n\n\t"
+ },
+ "4": {
+ "action": " Build a multiple recipes (ex: \"core-image-minimal core-image-sato\") and wait until build finish. ",
+ "expected_results": "Builds finishes successfully. \n\nYou can build multiple recipes with toaster"
+ }
+ },
+ "summary": "Build_multiple_recipes"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Build_a_recipe_with_different_distro",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Start Toaster. \n\n\t",
+ "expected_results": " Toaster starts. \n\n\t"
+ },
+ "2": {
+ "action": " Click on new project button. \n\n\t",
+ "expected_results": " Open create a new project page. \n\n\t"
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project. \n\n\t",
+ "expected_results": " Project Created. \n\n\t"
+ },
+ "4": {
+ "action": "From project page click on Bitbake variables tab. \n\n\t",
+ "expected_results": "Open Bitbake variables page. \n\n\t"
+ },
+ "5": {
+ "action": "Click on change button for distro. \n\n\t",
+ "expected_results": "A type in form appears. \n\n\t"
+ },
+ "6": {
+ "action": "Change distro (ex: poky-tiny). \n\n\t",
+ "expected_results": "Distro has changed. \n\n\t"
+ },
+ "7": {
+ "action": "Add specific layers for distro (meta-qt3, meta-qt4) \n\t\n\t",
+ "expected_results": "Layers added to the project \n\n\t"
+ },
+ "8": {
+ "action": " Build a recipe (ex: core-image-minimal) and wait until build finish.",
+ "expected_results": "Build finishes successfully. \n\nThe 'success' criteria for this one should be that the build is reported as using the poky-tiny distro in the build summary page, and that the DISTRO variable value in the bitbake variables table is set to the value specified in toaster (poky-tiny again)."
+ }
+ },
+ "summary": "Build_a_recipe_with_different_distro"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_package_format_-_ipk_rpm_deb",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " Start Toaster. \n\n\t",
+ "expected_results": " Toaster starts. \n\n\t"
+ },
+ "2": {
+ "action": " Click on new project button. \n\n\t",
+ "expected_results": " Open create a new project page. \n\n\t"
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project. \n\n\t",
+ "expected_results": " Project Created. \n\n\t"
+ },
+ "4": {
+ "action": "From the project page click on bitbake variables tab. \n\n\t",
+ "expected_results": "Open bitbake variables page. \n\n\t"
+ },
+ "5": {
+ "action": "Click on change button near PACKAGE_CLASSES and select all the package formats (rpm, deb, ipk). \n\n\t",
+ "expected_results": "Package classes selected. \n\n\t"
+ },
+ "6": {
+ "action": "Build a recipe (ex: core-image-minimal) and wait until build finish.",
+ "expected_results": "Build finishes successfully.\nYou can see the package classes in the build summary page."
+ }
+ },
+ "summary": "Test_package_format_-_ipk_rpm_deb"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Test_IMAGE_INSTALL_append_variable",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster. \n\n",
+ "expected_results": " Toaster starts. \n\n\t"
+ },
+ "2": {
+ "action": " Click on new project button. \n\n",
+ "expected_results": " Open create a new project page. \n\n\t"
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project. \n\n",
+ "expected_results": " Project Created. \n\n\t"
+ },
+ "4": {
+ "action": "From the project page click on bitbake variables tab. \n\n",
+ "expected_results": "Open bitbake variables page. \n\n\t"
+ },
+ "5": {
+ "action": "Click on change button for IMAGE_INSTALL_append and add a variable (ex: acpid). \n\n",
+ "expected_results": "Variable added. \n\n\t"
+ },
+ "6": {
+ "action": "Build a recipe (ex: core-image-minimal) and wait until build finish. \n\n",
+ "expected_results": "Build finishes successfully. \n\n\t"
+ },
+ "7": {
+ "action": "After build finishes go to build page. \n\n",
+ "expected_results": "Open build summary page. \n\n\t"
+ },
+ "8": {
+ "action": "Go to package tab and search for acpid.",
+ "expected_results": "You should get results for ssh packages."
+ }
+ },
+ "summary": "Test_IMAGE_INSTALL_append_variable"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.New_custom_image:_default_view",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All projects\" table. \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"New custom image\" link situated on the left-hand side, near Configuration, builds, import layer \n\n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that the table is populated with the list of image recipes (eg. core-image minimal) \n\n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": " Check that by default the following columns are shown: Image recipe, Version, Description, Layer, Customise \n\n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "From the \"Edit columns\" menu, activate the: Recipe file, Section, License, Git revision \n\n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Check that the \"Git revision\" entries match the release entry from the main project page, in the project details section. \n\n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Check that the image recipes provided by layers added to the project show a 'customise' button, while image recipes provided by layers not added to the project show an 'add layer' button ",
+ "expected_results": ""
+ }
+ },
+ "summary": "New_custom_image:_default_view"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.New_custom_image:_sorting_the_content_of_new_custom_image_table",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All projects\" table. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"New custom image\" link situated on the left-hand side, near Configuration, builds, import layer \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Make sure that the table is sorted on the ‘Image recipe’ column by default in ascending order. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Clicking on Image recipe should revert the sorting. (from 'a to z' changes to 'z to a') \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "From the \"Edit columns\" menu activate all the columns. Check that ‘Image recipe’ and ‘Customise’ columns cannot be unchecked. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Check that Image recipe, Section, Layer and License are the only sortable table heads. \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Sort the table by \"Layer\" and then navigate away by selecting an image. When you click the \"back\" button in the web-browser to go back, the \"New custom image\" table should still be sorted by \"Layer\". \nThis should apply also by navigating back to the page by any other means. \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Sorting and \"Edit columns\" menu: If you use the \"Edit columns\" menu to hide the column with the applied sorting, we revert the sorting to the default sorting (i.e. \"Image recipe\"). The default sorting always uses one of the core columns, which cannot be hidden using the \"Edit columns\" menu \n\n",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Sorting and search: Searching should have no impact on the applied sorting. Any results returned should be sorted by the sorting criteria selected when the search query was submitted. Sort recipes by \"Layer\" column heading. Input a string (such as \"core-image\") in search box and click search button. Make sure results returned are sorted by \"Layer\".",
+ "expected_results": "N/A"
+ }
+ },
+ "summary": "New_custom_image:_sorting_the_content_of_new_custom_image_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.New_custom_image:_searching_the_content_of_new_custom_image_table",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All projects\" table. \n \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"New custom image\" link situated on the left-hand side, near Configuration, builds, import layer \n \n\n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that the search is made of a text input field and a \"Search\" button in a toolbar above the table. When no search query has been entered, the text input field should show the following placeholder text: \"Search select the image recipe you want to customise\" \n \n\n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Input \"core\" in the text input field. The placeholder text disappears when the first character is typed. Click search button. \n \n\n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "The search string is kept in the text input field. The results returned occur. Click \"Clear search\" icon to clear the search and display the image recipes. If your search query returns no results, we show you an alert with a search form and an option to show all image recipes. Check that \"show all\" link is available. \n\n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Search, sorting and \"Edit columns\": Searching does not change the state of the table: the same columns remain hidden and the same sorting applied when search results are displayed, but filters are cleared by the search results. Search a string and make sure that the same columns remain hidden and the same sorting applied. \n\n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Search and filters \n \n\t•\tThe scope of the filters is the content currently on the table (this means all table pages, not only the one displayed). The scope of the search is always the content of the database. \n\n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "If I run a search query, any filter applied afterwards will filter the content returned by the search query. \tIf I run a search query while a filter is applied, the filter is cleared by the results of the search query (i.e. we display the results of the search query and clear the filter applied beforehand). The same happens if I click the \"Clear search\" icon when a filter is applied to a set of search results (both search results and applied filter are cleared, and the table shows all the targets). ",
+ "expected_results": "\n \n"
+ }
+ },
+ "summary": "New_custom_image:_searching_the_content_of_new_custom_image_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.New_custom_image:_Filter_the_contents_of_the_new_custom_image_table",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All projects\" table. \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"New custom image\" link situated on the left-hand side, near Configuration, builds, import layer \n\n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Make sure the following table column has filters: Customise \n\n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Click the filter button in the \"Customise\" column and a filter dialogue comes up. Select a filter option. The filter results should be showed. \n\n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Filters are overridden by search. Run a search query and you can see previous filter results are overridden by the results of the search query.",
+ "expected_results": "N/A"
+ }
+ },
+ "summary": "New_custom_image:_Filter_the_contents_of_the_new_custom_image_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Create_new_custom_image",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All projects\" table. \n \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"New custom image\" link situated on the left-hand side, near Configuration, builds, import layer \n\n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Search for rpi-basic-image, click on 'add layer' button. Make sure a \"layer added\" notification shows and a \"customise\" button is displayed. Click the \"customise\" button, type a name for you new custom image and click on create custom image. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Verify that image was created: when you create the custom image you will be redirected to the custom image details page, and a notification at the top of the page should tell you: ‘Your custom image X has been created. You can now add or remove packages as needed. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "If you select an image that has not been built beforehand you should not see the 'add / remove' packages table until you build the image. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "If you select an image that has been built beforehand you should see the 'add / remove' packages table when you create the custom image. ",
+ "expected_results": "N/A"
+ }
+ },
+ "summary": "Create_new_custom_image"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Custom_image_page_details",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "After you create a new custom image go to the custom image page, by clicking on the custom image. \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Breadcrumbs \n \n\t * Observe that the 3 breadcrumbs at the top left are: \n \n\t\ta live link that will take you back to the project page \n\t\tCustom images: a live link that will take you back to the custom images table \n\t\timage name(toaster-custom-images): the name of the current custom image (not a link) \n \n\n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe the 2 buttons build Custom image and Download recipe file \n \n\ti.\tTest this 2 buttons \n\tii.\tYou should always be able to build the custom image, but you only should be able to download the recipe file when the package content of the custom image is known. When you cannot download the recipe file, the 'download' button at the top of the page is disabled, and the right hand column does not show information about the recipe file. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Observe that there is a right-hand box, with information about the images \n \n\ti.\tThere is a number of packages included in the custom image \n\tii.\tApprox package size \n \n\tiii.\tLayer \n \n\tiv.\tImage based on \n \n\tv.\tRecipe file (only when you can download it_ \n\tvi.\tVersion \n \n\tvii.\tLicense \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Observe that the page includes a table with packages and you can add or remove packages from the custom image. The packages table only appears when: \n\na) the image recipe you chose as your base image when creating the custom image has been built within the project \n\nb) the custom image itself has been built \n\nIf no packages table shows, you see a notification with a build button instead. ",
+ "expected_results": "N/A"
+ }
+ },
+ "summary": "Custom_image_page_details"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Custom_image_page_–_Add_|_Remove_packages_table",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "After you create a new custom image go to the custom image page, by clicking on the custom image. \n\n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Make sure that the table is sorted on the ‘Package’ column by default in ascending order. \n\n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Check that by default the following columns are shown: Package, Package Version, Approx Size \n\n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "From the \"Edit columns\" menu, activate the: License, Recipe, Recipe version and Reverse dependencies columns \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Check that ‘Package’, Approx Size, License, Recipe are the only sortable table heads. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Sorting and \"Edit columns\": If you use the \"Edit columns\" menu to hide the column with the applied sorting, we revert the sorting to the default sorting (i.e. \"Package\"). The default sorting always uses one of the core columns, which cannot be hidden using the \"Edit columns\" menu \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Sorting and search: Searching should have no impact on the applied sorting. Any results returned should be sorted by the sorting criteria selected when the search query was submitted. Sort recipes by \"Recipe\" column heading. Input a string (such as \"acl\") in search box and click search button. Make sure results returned are still sorted by \"Recipe\". \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Click \"Clear search\" icon to clear the search and display the Packages. \n\n",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Make sure the following table column has filters: Add | Remove (Click on 'Edit custom image' in the left pane of the custom image) \n\n1",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "Click the filter button: a filter dialogue displays. Select a filter option. The filter results should be showed. \n\n1",
+ "expected_results": ""
+ },
+ "11": {
+ "action": "Filters are overridden by search. Run a search query and you can see previous filter results are overridden by the results of the search query. \n\n1",
+ "expected_results": ""
+ },
+ "12": {
+ "action": "This page needs a special no results message for the search. You can see in the doc attached to\nhttps://bugzilla.yoctoproject.org/show_bug.cgi?id=9154 \n\nTo test it, enter a random string in the search input field (something like \"bbb\") and click the 'search' button. The special no results message includes the following: \n\na) instructions about searching and building recipes in order to generate new packages \n\nb) a search text input field with the search string you typed, a 'clear' icon and a search button. Click the 'clear' icon: the search field should be cleared and the full list of packages should be shown. \n\nc) a 'show all packages' link. Click the link: the search field should be cleared and the full list of packages should be shown. ",
+ "expected_results": "N/A"
+ }
+ },
+ "summary": "Custom_image_page_–_Add_|_Remove_packages_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Adding_packages_without_dependencies_from_custom_images",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All projects\" table. \n\n ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"New custom image\" link situated on the left-hand side, near Configuration, builds, import layer \n\n\n ",
+ "expected_results": " "
+ },
+ "3": {
+ "action": "Choose an image recipe example:(core-image-sato) and click on the customise button on the far right (note if that layer is not added the button will say +Add layer, add it and then customise) \n\n\n ",
+ "expected_results": " A pop out should appear and you should get to give the new image a customized name. Then you will be redirected to a page of Add|Remove Packages. If this image has not been build it will not have packages.\n\n"
+ },
+ "4": {
+ "action": "Build the new image if it has not been build, else start adding packages without dependencies example: attr-doc \n\n \n ",
+ "expected_results": "You should get a message in blue that says \"You have added 1 package to $image-custom-name: $package-name\" "
+ },
+ "5": {
+ "action": "Build the image again.\n",
+ "expected_results": "Expected Result on step 5: the packages you have added should be installed in the image."
+ }
+ },
+ "summary": "Adding_packages_without_dependencies_from_custom_images"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Removing_packages_without_and_with_dependencies__from_custom_images",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All projects\" table. \n\n ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"New custom image\" link situated on the left-hand side, near Configuration, builds, import layer \n\n\n\n ",
+ "expected_results": " A pop out should appear and you should get to give the new image a customized name. Then you will be redirected to a page of Add|Remove Packages. If this image has not been build it will not have packages. \n\n"
+ },
+ "3": {
+ "action": "Choose an image recipe example:(core-image-sato) and click on the customise button on the far right (note if that layer is not added the button will say +Add layer, add it and then customise) \n\n\n\n ",
+ "expected_results": "A pop out should appear and you should get to give the new image a customized name. Then you will be redirected to a page of Add|Remove Packages. If this image has not been build it will not have packages.\n\n"
+ },
+ "4": {
+ "action": "Build the new image if it has not been build else start removing a packages (click on 'Edit custom image' in the left pane of the custom image) that have dependencies and packages that have no dependencies that are already included by clicking on the red button \"Remove Package\" \n\n\n \n ",
+ "expected_results": "You should get a message in blue that says \"You have removed 1 package to $image-custom-name: $package-name\" "
+ },
+ "5": {
+ "action": "Build the image again.",
+ "expected_results": "the packages you have removed should not be installed in the image."
+ }
+ },
+ "summary": "Removing_packages_without_and_with_dependencies__from_custom_images"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Adding_packages_with_dependencies",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Access a project page, either by creating a new project or accessing an existing project from the \"All projects\" table. \n\n ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "On the project page click on the \"New custom image\" link situated on the left-hand side, near Configuration, builds, import layer \n\n\n ",
+ "expected_results": " "
+ },
+ "3": {
+ "action": "Choose an image recipe example:(core-image-sato) and click on the customise button on the far right (note if that layer is not added the button will say +Add layer, add it and then customise) \n\n\n ",
+ "expected_results": "A pop out should appear and you should get to give the new image a customized name. Then you will be redirected to a page of Add|Remove Packages. If this image has not been build it will not have packages."
+ },
+ "4": {
+ "action": "Build the new image if it has not been build else start adding packages that have dependencies ( you will be able to see in the dependencies column a little square with a number, that tells you the dependencies it holds) example: libattr this holds 2 dependencies( bash and glibc) ",
+ "expected_results": " You should get a pop-out that that say \"$package_name dependencies\" then it should list the dependencies. Once clicked on the add packages button it should add the packages listed in the pop-out."
+ },
+ "5": {
+ "action": "Build the image again.",
+ "expected_results": ""
+ }
+ },
+ "summary": "Adding_packages_with_dependencies"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Create_Project",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project by issuing a name and selecting a release version.",
+ "expected_results": "Once project is created it should redirect you to a new project configuration page"
+ },
+ "3": {
+ "action": "Check that the h1 page title is set to the name the user typed in the new project form. ",
+ "expected_results": ""
+ }
+ },
+ "summary": "Create_Project"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_project_detail_page_left_bar_menu",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n \n",
+ "expected_results": "Once project is created it should redirect you to a new project configuration page. \n\n"
+ },
+ "3": {
+ "action": "Check the page contains the tabs \n Configuration ---> selected by default \n Compatible Metadata (separation label) \n Custom images \n Image recipes \n Software recipes \n Machines \n Layers \n Extra Configuration (separation label) \n BitBake variables \n\n",
+ "expected_results": " All elements are present. \n\n"
+ },
+ "4": {
+ "action": "Click on each element to see if the h2 title is changing to the respective link clicked. Example if clicked on \"Custom Images\" then the h2 title should change to \"Custom images\"",
+ "expected_results": "All elements are clickable and h2 title changes to the corresponding title.."
+ }
+ },
+ "summary": "Verify_project_detail_page_left_bar_menu"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Configuration_information_of_Project_Detail_page",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Clone Poky and start toaster \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a master toaster project \n \n",
+ "expected_results": "Once project is created it should redirect you to a new project configuration page \n\n"
+ },
+ "3": {
+ "action": "Check that the configuration button on the left side bar is selected by default \n\n",
+ "expected_results": " Expected result step 3 & 4: The configuration link next to the build link should be selected see attachment. \n\n\n\n"
+ },
+ "4": {
+ "action": "The configuration details should include canvas: \n Machine \n Most built recipes \n Layers \n Project Release ",
+ "expected_results": "Expected result step 4: A machine must always be set. \n\nThe default layers specified in the Toaster configuration must always be listed in the layer section (in our case, for the poky configuration we should have openembedded-core, meta-poky and meta-yocto-bsp)"
+ }
+ },
+ "summary": "Configuration_information_of_Project_Detail_page"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_Machine_information_of_project_detail_page",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n \n",
+ "expected_results": "Expected result step 2: Once project is created it should redirect you to a new project Configuration page \n\n"
+ },
+ "3": {
+ "action": "The configuration details should include a label in bold font that says: \n Machine: this canvas should have the machine label type under it and an editing button on the side ",
+ "expected_results": "Expected result step 3: Compare to the attached snapshot. The machine must always be set."
+ }
+ },
+ "summary": "Verify_Machine_information_of_project_detail_page"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_most_built_recipes_information_of_the_project_detail_page",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n \n",
+ "expected_results": "Expected result step 2: Once project is created it should redirect you to a new project configuration page "
+ },
+ "3": {
+ "action": "The configuration details should include a label in bold font that says: \n Most built recipes: In this canvas one of the following information should show: \n\n a) If there has been no built recipes it should have a label that says: \n \"You haven't built any recipes yet, choose a recipe to build\" \n\n b) Else it should have a list of built recipes and a check box in front of it. So that it could be selected and built again ",
+ "expected_results": "Expected result step a: See ProjectDetailPage2.png attachment.\n\nExpected result step b: See ProjectDetailPage.png attachment."
+ }
+ },
+ "summary": "Verify_most_built_recipes_information_of_the_project_detail_page"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_project_release_information_on_project_detail_page",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n \n",
+ "expected_results": "Expected result step 2: Once project is created it should redirect you to a new project configuration page. "
+ },
+ "3": {
+ "action": "The configuration details should include a label in bold font that says: \n Project release: this canvas should also have a label that show the release project you chose at the beginning.",
+ "expected_results": "Expected result step 3: See attachment ProjectDetailPage.jnp."
+ }
+ },
+ "summary": "Verify_project_release_information_on_project_detail_page"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_layer_information_of_the_project_detail_page",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Clone the poky environment git clone http://git.yoctoproject.org/git/poky",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Start toaster",
+ "expected_results": "Expected result step 2: Once project is created it should redirect you to a new project configuration page. \n\n"
+ },
+ "3": {
+ "action": "Create a toaster project \n \n",
+ "expected_results": "Expected result step 3: See attachment of layerCanvas.png\n"
+ },
+ "4": {
+ "action": "The configuration details should include a label with bold font that says: \n Layer: this canvas should have 3 layers listed by default (openembedded-core, meta-poky, and meta-yocto-bsp). \n Each layer should have a trashcan icon at the side that can be used to erase the label from the project. \n The layer canvas should have a text box with the text \"type a layer name\" a button \"Add layer\" next to it. \n just underneath a \"view compatible layer | import layer\" link. ",
+ "expected_results": ""
+ }
+ },
+ "summary": "Verify_layer_information_of_the_project_detail_page"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_project_detail_links",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n\n",
+ "expected_results": "Expected result step 2: Once project is created it should redirect you to a new project configuration page. \n\n"
+ },
+ "3": {
+ "action": "The configuration details should include \n 4 links, starting in the upper left side the Configuration link, Builds(#) link, Import layer link, and the New custom image link. \n\n ",
+ "expected_results": "Expected result step 3: All links should be clickable and should have information or tables, or forms. see attachment projectDetailLinks.png"
+ }
+ },
+ "summary": "Verify_project_detail_links"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_build_texbox_exists_and_works",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n \n",
+ "expected_results": " Once project is created it should redirect you to a new project configuration page. \n\n\n"
+ },
+ "3": {
+ "action": "The configuration details should include \n After the 4 links (Configuration, Build(#), Import layer & New custom image) at the far right there should be a textbox with the label that says....\"Type the recipe you want to build\" and a button \"Build\" \n\n",
+ "expected_results": "See attachment buildTXT.png, The build button should be disabled whenever the text input field is empty, so that you cannot start a build with a blank target \n\n"
+ },
+ "4": {
+ "action": "Type in the textbox an image you would like to build example (core-image-minimal) and click the build button.\n\n",
+ "expected_results": " Image starts building. Whenever there is information in the image recipes and software recipes tables, the text input field should present suggestions from the list of recipes provided by the layers in the \"layers\" list. The suggestions contain the string typed in the input field, and update as you type. They appear on typing the second character. A maximum of 8 suggestions can be shown. They are sorted as follows: first recipes starting with the string, in alphabetical order; then recipes containing the string, also in alphabetical order \n\n\nWhen you click the build button you are brought to the \"Builds\" tab, and a new build in progress appears at the top of the \"Latest project builds\" section"
+ }
+ },
+ "summary": "Verify_build_texbox_exists_and_works."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Veryfing_the_builds_link_show_proper_information",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n \n",
+ "expected_results": " Once project is created it should redirect you to a new project configuration page. \n\n\n"
+ },
+ "3": {
+ "action": "The configuration details should include \n A builds tab that when clicking on, it should display one of the following: \n \n\n a) A label that says \"Latest project builds\" then a label with \"All project builds\" \n If you have a finished build or there is an ongoing builds then: \n You should see a progress bar of the ongoing builds in the project. \n You should see a table with the already done builds in the project. \n\n\n b) \"All project builds\" and a search textbox with a button nothing else only if there are no builds done in the project \n ",
+ "expected_results": "Expected result for step a): See ExistingBuilds.png attachment. \n\n\nExpected result for step b): See ZeroBuilds.png attachment. "
+ }
+ },
+ "summary": "Veryfing_the_builds_link_show_proper_information"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_that_the_Import_layer_link_shows_the_form",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n\n",
+ "expected_results": " Once project is created it should redirect you to a new project configuration page. \n\n\n"
+ },
+ "3": {
+ "action": "The configuration details should include \n An Import layer link that when clicking on, it should display: \n A label that says \"Layer repository information\" \n A label that says \"The layer you are importing must be compatible with Yocto Project master, which is the release you are using in this project.\" \n Form composed of the following elements: \n Layer name : textbox \n Git repository URL : textbox \n Repository subdirectory (optional) : textbox \n Git revision : textbox \n Layer dependencies (optional) : \"openembedded-core\" link and (trash icon), textbox and \"Add layer\" button \n Import and add to project : button",
+ "expected_results": " See attachment ImportLayerForm.png"
+ }
+ },
+ "summary": "Verify_that_the_Import_layer_link_shows_the_form"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_that_New_Custom_Image_link_works_and_shows_information",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project \n\n",
+ "expected_results": " Once project is created it should redirect you to a new project configuration page \n\n\n"
+ },
+ "3": {
+ "action": "The configuration details should include \n A \"New custom image\" tab that when clicking on, it should display: \n a Title label that says: \"Select the image recipe you want to customise(#number_or_recipes_available)\" \n A search textbox with the label of: \"Search and select the image recipe you want to customise\" \n A \"Search button\" \n A \"Edit columns\" button \n A table that will display the customise images available ",
+ "expected_results": "See attachment CustomImage.png"
+ }
+ },
+ "summary": "Verify_that_New_Custom_Image_link_works_and_shows_information"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_most_built_recipe_shows_a_maximum_of_5_recipes",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Build 6 recipes example (core-image-sato, core-image-minimal, core-image-base, core-image-clutter) to name a few. ",
+ "expected_results": " All recipes are built correctly \n\n"
+ },
+ "4": {
+ "action": "Wait for the recipes to finish ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Go to the configuration details.",
+ "expected_results": " You should see 5 of the 6 recipes that were build. If you order the recipes in alphabetical order you should see that the first 5 made the list. "
+ }
+ },
+ "summary": "Verify_most_built_recipe_shows_a_maximum_of_5_recipes"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_order_sequence_of_listing_in_Most_build_recipes",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Build 6 recipes example (core-image-sato, core-image-minimal, core-image-base, core-image-clutter) to name a few. \n\n",
+ "expected_results": "All recipes are built correctly \n\n"
+ },
+ "4": {
+ "action": "Wait for the recipes to finish \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Go to the configuration details. \n\n",
+ "expected_results": " If you order the recipes in alphabetical order you should see that the first 5 made the list. Only 5 out of the 6 should make the list. \n\n"
+ },
+ "6": {
+ "action": "Select the 6th recipe that did not make the list and build it again. ",
+ "expected_results": " Since the 6th recipe is now built twice it should make the list and the recipe in the 5th place should not appear."
+ }
+ },
+ "summary": "Verify_order_sequence_of_listing_in_Most_build_recipes"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_Most_build_recipes_multiple_selection",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start toaster",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create a toaster project",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Build 4 recipes example (core-image-sato, core-image-minimal, core-image-base, core-image-clutter) to name a few. \n\n",
+ "expected_results": " All recipes are built correctly \n\n"
+ },
+ "4": {
+ "action": "Wait for the recipes to finish. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Go to the configuration details. \n\n",
+ "expected_results": " You should see the 4 recipes in alphabetical order. You should also note that the Build button on the upper right hand corner is disabled since no recipe has been selected. \n\n"
+ },
+ "6": {
+ "action": "Select 1 of the recipes in the most built recipes section. \n\n",
+ "expected_results": "The build button is automatically enabled. \n\n"
+ },
+ "7": {
+ "action": "Select multiple (example 2 or 3) recipes in the most built recipes section. \n\n",
+ "expected_results": " The build button is enabled. \n\n"
+ },
+ "8": {
+ "action": "Click on the build button to start building the recipes.",
+ "expected_results": "One recipe start to build and the others are on queue."
+ }
+ },
+ "summary": "Verify_Most_build_recipes_multiple_selection"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_layer_addition_functionality",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Clone the poky environment git clone http://git.yoctoproject.org/git/poky",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Start toaster",
+ "expected_results": " Once project is created it should redirect you to a new project configuration page. \n\n"
+ },
+ "3": {
+ "action": "Create a toaster project with master release \n \n\n",
+ "expected_results": " See attachment of layerCanvas.png \n\n\n"
+ },
+ "4": {
+ "action": "Add layers by typing the name in the \"Type a layer name\" input box and adding by clicking the button. \n\n",
+ "expected_results": " A list of layers with similar name to the one you are typing should appear, giving you the choice to add it. The default text \"Type a layer name\" should disappear as soon as you start typing. \n\n"
+ },
+ "5": {
+ "action": "Add layers by clicking on the View compatible layers link just bellow the input text box. \n\n",
+ "expected_results": "This should redirect you to the compatible layers page where a list of compatible layers should appear and allow you to Add layers to the project. \n\n"
+ },
+ "6": {
+ "action": "Add a layer by importing a layer clicking in the Import layer",
+ "expected_results": "This link should redirect you to the import layer form where you will be able to add layers from git repository or a local directory. \n\n\n"
+ }
+ },
+ "summary": "Verify_layer_addition_functionality"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Verify_delete_layer_functionality",
+ "author": [
+ {
+ "email": "libertad.gonzalez.de.la.cruz@intel.com",
+ "name": "libertad.gonzalez.de.la.cruz@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Clone the poky environment git clone http://git.yoctoproject.org/git/poky\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Start toaster",
+ "expected_results": " Once project is created it should redirect you to a new project configuration page.\n\n"
+ },
+ "3": {
+ "action": "Create a toaster project master release \n \n",
+ "expected_results": "See attachment of layerCanvas.png \n\n"
+ },
+ "4": {
+ "action": "Remove openembedded-core layer from the project by clicking the trash icon next to it. \n\n",
+ "expected_results": "The layer should disappear from the list and a notification should appear at the top of the page saying: \"You have removed 1 layer from your project: \". The layer_name should be a link to the corresponding layer detail page. The layer counter next to the \"layers\" heading should decrease by one. \n"
+ },
+ "5": {
+ "action": "Remove all the layers from the project",
+ "expected_results": " you should see a message that reads: \n\nYou need to add some layers. For that you can: \n\n-View all layers compatible with this project \n\n-Import a layer \n\n-Read about layers in the documentation \n\nOr type a layer name below. \n\n\n The \"Choose from the layers compatible with this project\" link should go to the compatible layers page The \"Import a layer\" link should go to the import layer page The \"Read about layers in the documentation\" link should open in a new window and bring you to http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers"
+ }
+ },
+ "summary": "Verify_delete_layer_functionality"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-managed-mode.toaster-managed.Download_task_log",
+ "author": [
+ {
+ "email": "alexandru.costinx.roman@intel.com",
+ "name": "alexandru.costinx.roman@intel.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start Toaster. ",
+ "expected_results": "Toaster starts."
+ },
+ "2": {
+ "action": "Click on new project button.\n\n",
+ "expected_results": "Open create a new project page."
+ },
+ "3": {
+ "action": " Enter a project name, select a release and click on create project or select an existing project. \n\n",
+ "expected_results": "Project Created."
+ },
+ "4": {
+ "action": "Build a recipe (ex: core-image-minimal). \n\n",
+ "expected_results": "Build finish."
+ },
+ "5": {
+ "action": "Click on the built recipe. \n\n",
+ "expected_results": "Open build summary page."
+ },
+ "6": {
+ "action": "Click on tasks tab. \n\n",
+ "expected_results": "Open tasks page."
+ },
+ "7": {
+ "action": "Click on a task executed successfully. \n\n",
+ "expected_results": "Open task page."
+ },
+ "8": {
+ "action": "Click on \"Download task log\" button. \n",
+ "expected_results": "You can download the task log. \n"
+ },
+ "9": {
+ "action": "Click on a failed task. \n",
+ "expected_results": "Open task page, not appear download task \n"
+ }
+ },
+ "summary": "Download_task_log"
+ }
+ }
+] \ No newline at end of file
diff --git a/meta/lib/oeqa/manual/toaster-unmanaged-mode.json b/meta/lib/oeqa/manual/toaster-unmanaged-mode.json
new file mode 100644
index 0000000000..29d11a87d5
--- /dev/null
+++ b/meta/lib/oeqa/manual/toaster-unmanaged-mode.json
@@ -0,0 +1,1170 @@
+[
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.Create_a_Yocto_project_and_start_the_Toaster",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Set up yocto project and toaster test environment. \ncd ${installdir} \ngit clone git://git.yoctoproject.org/poky \n\n",
+ "expected_results": "NA \n\n"
+ },
+ "2": {
+ "action": "Start up toaster. \ncd ${installdir} \nsource poky/oe-init-build-env \nsource toaster start \n\n",
+ "expected_results": " \nlog: \nThe system will start. \nSyncing... \nCreating tables ... \nCreating table south_migrationhistory \nInstalling custom SQL ... \nInstalling indexes ... \nInstalled 0 object(s) from 0 fixture(s) \n > south \n\nNot synced (use migrations): \n - orm \n(use ./manage.py migrate to migrate these) \nRunning migrations for orm: \n - Migrating forwards to 0004_auto__add_field_package_installed_name. \n > orm:0001_initial \n > orm:0002_auto__add_field_build_timespent \n > orm:0003_timespent \n - Migration 'orm:0003_timespent' is marked for no-dry-run. \n > orm:0004_auto__add_field_package_installed_name \n - Loading initial data for orm. \nInstalled 0 object(s) from 0 fixture(s) \nserver address: 127.0.0.1, server port: 8200 \nSuccessful start."
+ },
+ "3": {
+ "action": "Build the yocto project. \nbitbake core-image-minimal \n\n",
+ "expected_results": "Build successfully. \n"
+ },
+ "4": {
+ "action": "Use a default web brower to see project build process. \nxdg-open http://localhost:8000/ \nWait for build completion. \n",
+ "expected_results": "You can open http://localhost:8000/ in a default browser. The build process is showed. "
+ }
+ },
+ "summary": "Create_a_Yocto_project_and_start_the_Toaster."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.Sort_the_content_of_the_builds_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start up toaster.",
+ "expected_results": "Succeed to start up toaster. "
+ },
+ "2": {
+ "action": "Create 2 builds, such as \"bitbake core-image-minimal\" and \"bitbake core-image-sato\". Wait for successful builds and then run: http://localhost:8000/",
+ "expected_results": "Succeed to build the targets. "
+ },
+ "3": {
+ "action": "Enter \"All build\" table in web browser.",
+ "expected_results": "NA "
+ },
+ "4": {
+ "action": "Click \"Completed on\" component to sort.",
+ "expected_results": "Build targets are sorted out by the \"Completed on\". "
+ },
+ "5": {
+ "action": "Click \"Completed on\" component again to invert the sorting .",
+ "expected_results": "The sorting is inverted. "
+ },
+ "6": {
+ "action": "Have a sort try in other columns. outcome, machine, started on, completed on, errors, warnings, project.",
+ "expected_results": "See item 4 and 5."
+ }
+ },
+ "summary": "Sort_the_content_of_the_builds_table."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.Search_the_content_of_the_builds_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start up toaster.",
+ "expected_results": "NA "
+ },
+ "2": {
+ "action": "Create 2 builds, such as \"bitbake core-image-minimal\" and \"bitbake core-image-sato\". Wait for successful builds and then run: xdg-open http://localhost:8000/",
+ "expected_results": "NA "
+ },
+ "3": {
+ "action": "Enter \"All build\" table in web browser.",
+ "expected_results": "NA "
+ },
+ "4": {
+ "action": "Input a string in search component and click search.",
+ "expected_results": "Show returned search results. When no search query has been entered, we have placeholder text saying: \"Search builds\". The placeholder text disappears when the first character is typed. "
+ },
+ "5": {
+ "action": "See returned search results.",
+ "expected_results": "If your search query returns no results, the section heading changes to \"No builds found\", and we show you an alert with a search form and an option to show all builds. "
+ },
+ "6": {
+ "action": "Click \"Clear search\" icon (icon-remove-sign). Observe all builds are showed. ",
+ "expected_results": "Click it to clear the search and display all builds."
+ }
+ },
+ "summary": "Search_the_content_of_the_builds_table."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.Filter_the_content_of_the_builds_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start up toaster.",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create 2 builds, such as \"bitbake core-image-minimal\" and \"bitbake core-image-sato\". Wait for successful builds and then run: xdg-open http://localhost:8000/.",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Enter \"All build\" table in web browser.",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Make sure the following table columns have filters. \n- Outcome \n-- Started on \n- Completed on \n- Failed tasks",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Filters are mutually exclusive. Click a filter button of a one column and a filter dialogue occurs. Select a filter item. The filter result would be showed. Then select another filter item of another column and the previously applied filter is overridden by the newly selected filter when a filter from a different column is applied to the table. In this state, we show some help text next to the \"Apply\" button, saying \"You can only apply one filter to the table. This filter will override the current filter.\"",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Filters are overridden by search. Run a search query and you can see previous filter results are overridden by the results of the search query.",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Have a try in filters of the following table columns. \n- Outcome \n- Started on \n- Completed on \n- Failed tasks \n",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "Filter_the_content_of_the_builds_table."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.Tasks_in_toaster_UI",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": " === TOASTER: Test Instructions for \"Tasks\", \"Time\", \"CPU Usage\", and \"Disk I/O\" pages === \n \nNOTE TO TESTERS: The three pages \"Time\", \"CPU Usage\", and \"Disk I/O\" are simple variations on the \"Tasks\" page. Those test instructions will demonstrate the respective unique parts. \n \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "In Toaster, select the build, and select the \"Tasks\" link in the left sidebar \n \n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Breadcrumbs \n \n * Observe that the 4 breadcrumbs at the top left are: \n \n : a live link that will take you back to the project page \n \t: a live link that will take you back to the project Builds page \n : a live link that will take you back to the image dashboard page \n \"Tasks\" \n \n * Test the breadcrumb live links, return to this page \n \n \n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "General Layout \n \n * Observe the left-hand box with links to the other pages of the build \n \n * Observe the title of the table is \"Tasks\", in bold \n \n * Observe the search/filter bar above the table \n \n * Observe the number of table rows in each page matches the number selected in the \"Show rows\" dropdown menu \n \n * Observe at the bottom of the page the \"Showing XX to XX out of xxx entries\", the page selection links, and the \"Show Rows\" selection. \n \n \n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Columns \n \nNote: to restore the default columns in your browser, for example in Firefox, select \"Tools > Privacy > remove individual cookies\", find the cookies for the IP address of the Toaster engine (for example \"localhost\"), and remove each sub-cookie with the prefix \"_displaycols_*\" (or the whole cookie if those are the only sub-cookies). \n \n * Observe that the default columns are: \n \n \"Order, Recipe, Task, Executed, Outcome, Cache attempt\" \n \n * Click the \"Edit Columns\" button. ",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Observe that the fields are sorted as follows (with the indicated items greyed) \n \n [ ] CPU usage \n [x] Cache attempt \n [ ] Disk I/O (ms) \n [x] Executed \n [x] Order {greyed} \n [x] Outcome \n [x] Recipe {greyed} \n [ ] Recipe version \n [x] Task {greyed} \n [ ] Time (secs) \n \n * For each of the greyed items, attempt to click them. Observe that they do not change. \n \n * For each of the non-greyed items, attempt to click them. Observe that the respective column dynamically appears when checked and disappears when un-checked. ",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Search \n \n * Observe that the search text box background text is \"Search tasks\". \n \n * Set the search text to \"busybox\" and click \"Search\". Observe that only the busybox tasks are listed (about 16). \n \n * Click the \"X\" next to the search text box. Observe that all of the tasks re-appear. \n \n \n",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Column sorts \n \n * Enable all of the columns. \n \n * Observe that by default the \"Order\" column header is in bold, it has a down-arrow icon, and that the table is sorted by this column in ascending order. \n \n * Observe that the columns are in this order, and are sortable only if indicated: \n \n Order {sortable} \n Recipe {sortable} \n Recipe version \n Task {sortable} \n Executed {sortable} \n Outcome {sortable} \n Cache attempt {sortable} \n Time (secs) {sortable} \n CPU usage {sortable} \n Disk I/O (ms) {sortable} ",
+ "expected_results": ""
+ },
+ "10": {
+ "action": " Test that each of the sortable columns do sort, ascending and descending \n \n * Observe that each of the column headers have a question mark icon, and that hovering over it provides help text.",
+ "expected_results": ""
+ },
+ "11": {
+ "action": "\"Executed\" Filter \n \n * Observe that the \"Executed\" column has the filter icon. Click on it and observe these values, where \"All Tasks\" is the default \n \n (*) All Tasks \n ( ) Executed Tasks \n ( ) Not Executed Tasks \n \n * Click on \"Executed Tasks\" and observe that only rows with the value \"Executed\" are displayed. \n \n * Click on \"Not Executed Tasks\" and observe that only rows with the value \"Not Executed\" are displayed. \n \n * Click on \"All Tasks\" and observe that all rows are displayed. \n \n \n",
+ "expected_results": ""
+ },
+ "12": {
+ "action": "\"Outcome\" Filter \n \n * Observe that the \"Outcome\" column has the filter icon. Click on it and observe these values, where \"All Tasks\" is the default \n \n (*) All Tasks \n ( ) Succeeded Tasks \n ( ) Failed Tasks \n ( ) Cached Tasks \n ( ) Prebuilt Tasks \n ( ) Covered Tasks \n ( ) Empty Tasks \n \n * Click on each of the filter selections, and observe that the resulting row \"Outcome\" values match the selection. \n \n * Click on \"All Tasks\" and observe that all rows are displayed. \n \n \n1",
+ "expected_results": ""
+ },
+ "13": {
+ "action": "\"Cache attempt\" Filter \n \n * Observe that the \"Cache attempt\" column has the filter icon. Click on it and observe these values, where \"All Tasks\" is the default \n \n (*) All Tasks \n ( ) Tasks with cache attempts \n ( ) Tasks with 'File not in cache' attempts \n ( ) Tasks with 'Failed' cache attempts \n ( ) Tasks with 'Succeeded' cache attempts \n \n * Click on each of the filter selections, and observe that the resulting row \"Outcome\" values match the selection. \n \n Note the with a clean build, only the \"All Tasks\" and \"Tasks with cache attempts\" will return rows. \n \n * Click on \"All Tasks\" and observe that all rows are displayed. \n \n \n1",
+ "expected_results": ""
+ },
+ "14": {
+ "action": "Order, Task, Executed, Outcome, Cache attempt links \n \n * Observe that for a given row, the above values are live links that will both take you to the respective task detail page. Click the back button to return. \n\n * Observe that for a given row the values in \"Recipe\" and \"Recipe version\" are live links that will both take you to the respective recipe details page. Click the back button to return \n \n \n1",
+ "expected_results": ""
+ },
+ "15": {
+ "action": "Time Page \n \n * \"In Toaster, select the build, and select the \"Time\" link in the left sidebar \n \n * Observe that the default columns are: \n \n \"Recipe\", \"Task\", \"Executed\", \" Outcome\", \"Time (secs)\" \n \n * Observe that the default sort is \"Time (secs)\", in descending order. \n \n * In the \"Edit Columns\" button, turn on all of the columns. \n \n * Observe that the page now matches the \"Tasks\" page, and passes the same tests. \n \n \n1",
+ "expected_results": ""
+ },
+ "16": {
+ "action": "CPU Usage Page \n \n * \"In Toaster, select the build, and select the \"CPU Usage\" link in the left sidebar \n \n * Observe that the default columns are: \n \n \"Recipe\", \"Task\", \"Executed\", \"Outcome\", \"CPU Usage\" \n \n * Observe that the default sort is \"CPU Usage\", in descending order. \n \n * In the \"Edit Columns\" button, turn on all of the columns. \n \n * Observe that the page now matches the \"Tasks\" page, and passes the same tests. \n \n \n1",
+ "expected_results": ""
+ },
+ "17": {
+ "action": "Disk I/O Page \n \n * \"In Toaster, select the build, and select the \"Disk I/O\" link in the left sidebar \n \n * Observe that the default columns are: \n \n \"Recipe\", \"Task\", \"Executed\", \"Outcome\", \"Disk I/O (ms)\" \n \n * Observe that the default sort is \"Disk I/O (ms)\", in descending order. \n \n * In the \"Edit Columns\" button, turn on all of the columns. \n \n * Observe that the page now matches the \"Tasks\" page, and passes the same tests. ",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "Tasks_in_toaster_UI"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.package_detail_in_toaster_UI",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "TOASTER: Test Instructions for \"Package Detail\" page \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "In Toaster, select the build, and select the \"Packages\" link in the left sidebar.",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Select a package from the \"Package\" column.",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Breadcrumbs \n * Observe that the 3 breadcrumbs at the top left are: \n : a live link that will take you back to the image dashboard page \n \"Packages\": a live link that will take you back to the Packages page \n \"bash\": the name of the current package (not a link) \n * Test the breadcrumb live links, return to this page ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "General Layout \n * Click on any package \n * Observe that there is no the left-hand box \n * Observe that there is a right-hand box, with information about the package \n * Observe the title is the package name and version, in bold \n * Observe that, if the package is installed in an image, there is a link to the image(s) the package appears in \n * Observe that, if the package is not installed in the image, there are two tab buttons below the title ",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Observe that the tab buttons are: \n Generated files (2) {highlighted} \n Runtime dependencies (4) \n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Generated files tab \n * Click the \"Generated files\" tab (which should be selected by default) \n * Observe that the number of files in the table matches the number in parenthesis after the \"Generated files\" tab title. \n * Observe that the columns in the table are \"File\" and \"Size\" \n * Observe that the table is sorted by \"File\" in ascending alphabetical order (A to Z). ",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Runtime dependencies tab \n * Click the \"Runtime dependencies\" tab \n * Observe that the number of dependencies in the table matches the number in parenthesis after the \"Runtime dependencies\" tab title. \n * Observe that the columns in the table are: \n \"Package, Version, Size\" \n * Observe that the table is sorted by Package in ascending alphabetical order (A to Z) \n * Observe that the package name values are live links to the respective package details page. ",
+ "expected_results": "The information icon was eliminated on the columns that where self explanatory. "
+ },
+ "10": {
+ "action": "Package information box \n * Observe that there is a right-hand box, with information about the package, including in this example the fields: \n \"Size, License, Recipe, Recipe version, Layer, Layer branch, Layer commit\" \n * Observe that each of the field has a question mark icon, and that hovering will provide help text. \n * Observe that none of the values in the right-hand box are blank \n * Observe that the \"Recipe\" value is a live link to the respective recipe detail page. ",
+ "expected_results": ""
+ }
+ },
+ "summary": "package_detail_in_toaster_UI"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.recipes:_Sort_the_content_of_the_recipes_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Recipes\" link in the left sidebar. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Make sure that by default the \"Recipes\" table is sorted by \"Recipe\" in ascending alphabetical order (A to Z). \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Sort my \"Recipes\" table by \"Section\" and then navigate away by selecting a recipe(such as click busybox recipe). When you click \"back\" button in web-browser to go back to the \"Recipes\" table it should still be sorted by \"Section\". \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Make sure all column headings are sortable, except \"Recipe version\", \"Dependencies\", \"Reverse dependencies\" and \"Layer commit\". \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Sorting and \"Edit columns\" \nIf you use the \"Edit columns\" menu to hide the column with the applied sorting, we revert the sorting to the default sorting (i.e. \"Recipe\"). The default sorting always uses one of the core columns, which cannot be hidden using the \"Edit columns\" menu. \nSort recipes by \"section\" column heading. Then hide \"Section\" column by \"Edit columns\". Make sure that the \"Recipes\" table is sorted by \"Recipe\" in ascending alphabetical order (A to Z). \nNOTE: Bug 5919 is filed against the issue. \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Sorting and search \nSearching should have no impact on the applied sorting. Any results returned should be sorted by the sorting criteria selected when the search query was submitted. \nSort recipes by \"section\" column heading. Input a string (such as \"lib\") in search box and click search button. Make sure results returned should be sorted by \"section\". \n",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "recipes:_Sort_the_content_of_the_recipes_table."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.recipes:_Search_the_content_of_the_recipes_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "recipes: Search the content of the recipes table \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "In Toaster, select the build, and select the \"Recipes\" link in the left sidebar. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Observe the search is made of a text input field and a \"Search\" button in a toolbar above the table. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "When no search query has been entered, we have placeholder text saying: \"Search recipes\". \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Input \"lib\" in the text input field. The placeholder text disappears when the first character is typed. Click search button. \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": " \n(1) returned results \nThe search string is kept in the text input field. The results returned occur. Click \"Clear search\" icon to clear the search and display all recipes. \n(2) no results returned \nIf your search query returns no results, the page heading changes to \"No recipes found\", and we show you an alert with a search form and an option to show all recipes. Observe \"show all recipes\" button is available. \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "When I run a search, the search happens against the following columns (independently of they being shown or hidden): \n- Recipe \n- Recipe version \n- Recipe file \n- Section \n- License \n- Layer \n- Layer branch \n- Layer commit \n\nInput a string to search for the above 8 column headings separately to make sure that the search happens against the columns. \n\n \n\n",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Search, sorting and \"Edit columns\" \nSearching does not change the state of the table: the same columns remain hidden and the same sorting applied when search results are displayed, but filters are cleared by the search results.\nSearch a string and make sure that the same columns remain hidden and the same sorting applied. Since filter feature of recipes (4296) is obsolete, we don't have to test filter. \n\n",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "Search and filters \nThe scope of the filters is the content currently on the table (this means all table pages, not only the one displayed). The scope of the search is always the content of the database.\nSince filter feature of recipes (4296) is obsolete, we don't have to test filter. \n\nIf I run a search query, any filter applied afterwards will filter the content returned by the search query. \n\nIf I run a search query while a filter is applied, the filter is cleared by the results of the search query (i.e. we display the results of the search query and clear the filter applied beforehand).",
+ "expected_results": "NA"
+ },
+ "11": {
+ "action": " The same happens if I click the \"Clear search\" icon when a filter is applied to a set of search results (both search results and applied filter are cleared, and the table shows all the tasks). \nSince filter feature of recipes (4296) is obsolete, we don't have to test filter. \n\n",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "recipes:_Search_the_content_of_the_recipes_table."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.recipes:_Customise_the_columns_of_the_recipes_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Recipes\" link in the left sidebar. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "* Observe that the default columns are: \n \"Recipe, Recipe version, Recipe file, Section , License, Layer\" \n \n * Click the \"Edit Columns\" button. \n * Observe that the fields are sorted as follows (with the indicated items greyed) \n [ ] Dependencies \n [x] Layer \n [ ] Layer branch \n [ ] Layer commit \n [x] License \n [x] Recipe {greyed} \n [x] Recipe file \n [x] Recipe version {greyed} \n [ ] Reverse dependencies \n [x] Section \n \n * For each of the greyed items, attempt to click them. Observe that they do not change. \n * For each of the non-greyed items, attempt to click them. Observe that the respective column dynamically appears when checked and disappears when un-checked.\n",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "recipes:_Customise_the_columns_of_the_recipes_table."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.recipes:_View_a_table_with_all_the_recipes_included_in_an_image_recipe",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Recipes\" link in the left sidebar. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "By default, the all recipes table displays the following columns in this order: \n(1) Recipe (2) Recipe version: the target version and revision (3) Dependencies (4)Reverse Dependencies (5) License: the value of the target's LICENSE variable (6) Layer: the name of the layer providing the target \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "In the \"Edit columns\" menu, table columns appear listed alphabetically. \nIn the table itself, the default order of columns is as follows: \n(1) Dependencies (2) Layer (3) Layer branch (4) Layer commit (5) License (6) Recipe (7) Recipe file (8) Reverse dependencies (9) Section (10) Version \n\nThe minimum table is made of the 2 columns that provide the information needed to identify a target: Recipe and Recipe version.",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "recipes:_View_a_table_with_all_the_recipes_included_in_an_image_recipe"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.recipes:_View_detailed_information_about_a_recipe。",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Create a default Yocto project (qemux86), and start the Toaster. \n \n $ source poky/oe-init-build-env \n $ source toaster start \n $ bitbake core-image-minimal \n $ http://localhost:8000/ \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Select the \"core-image-minimal\" build link \n \n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Select the \"Recipes\" link in the left sidebar \n \nObserve that the recipes are listed in a table, and that each recipe name is a live URL link. \n \n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Observe that \"Packages\" link. It should have an appended value like \"(4)\". Now click on this link. \n \nObserve: \n a) The number of packages matches the previous number in parenthesis. \n \n b) Each package has a version and a size. The size may be zero. \n \n c) Note that if you hover on a package name, it will reveal a URL of the following form. This link should take you to the corresponding package detail page. \n \n localhost:8000/gui/build//package/ \n \n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Observe that recipes of \"Build Dependencies\" link has an appended value like \"(0)\". Now click on this link. \n \nObserve: \n a) No dependencies appear, and you get a message of the form: \n \n \"$RECIPE_NAME_VERSION has no build dependencies.\" \n \n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Observe that \"Reverse build dependencies\" link has an appended value like \"(1)\". Now click on this link. \n \nObserve: \n a) The number of packages matches the previous number in parenthesis. \n \n b) The recipe dependency should be \"packagegroup-core-boot\", \n \n c) There should be a respective version displayed, for example \"1.0-r11\" \n \n d) If you hover on the recipe name, it will reveal a URL of the following form. This link should take you to the corresponding recipe detail page. \n \n localhost:8000/gui/build//recipe/ \n \n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Click the breadcrumb \"Recipes\" at the top, locate the \"gdbm\" recipe, and select it. \n \n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Observe that \"Packages\" link. It should have an appended value like \"(0)\". Now click on this link. \n \nObserve: \n a) No packages appear, and you get a message of the form: \n \n \"$PACKAGE_NAME_VERSION does not build any packages.\" \n \n",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Observe that \"Build dependencies\" link. It should have an appended value like \"(2)\". Now click on this link. \n \nObserve: \n a) The number of build dependencies matches the previous number in parenthesis. \n \n b) The recipe dependency should have values like \"gettext-native\" and \"libtool-cross\". \n \n c) There should be a respective versions displayed for each dependency. \n \n d) If you hover on a recipe name, it will reveal a URL of the following form. This link should take you to the corresponding recipe detail page. \n \n localhost:8000/gui/build//recipe/ \n \n1",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "Observe that \"Reverse build dependencies\" link. It should have an appended value like \"(0)\". Now click on this link. \n \nObserve: \n a) No reverse dependencies appear, and you get a message of the form: \n \n \"$RECIPE_NAME_VERSION does not build any packages.",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "recipes:_View_detailed_information_about_a_recipe。"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.variables:_Search_the_content_of_the_bitbake_variables_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Configuration\" link in the left sidebar. Then click \"BitBake variables\" tab. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "When no search query has been entered, we have placeholder text saying: \"Search BitBake variables\". \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Input \"lib\" in text input field. The placeholder text disappears when the first character is typed. Click search button. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Observe \"4 variables found\" is showed. (It may be other number.) \n If your search query returns no results, we display an alert with: \n - A h3 heading saying: \"No variables found\" \n - A search box \n - The search query is showed in the text input shield. \n - A link to show all variables. we show the variables table. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "We provide a \"Clear search\" icon (icon-remove-sign). Click it to clear the search and display all variables. Check that the \"Clear search\" icon cannot be accessed using the tab key. \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Verify search scope. \nWhen I run a search, the search happens against the following columns (independently of they being shown or hidden): \n- Variable \n- Value \n- Set in file \n- Description \n\n",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Verify \"search, sorting and 'Edit columns'\" \nSearching does not change the state of the table: the same columns remain hidden and the same sorting applied \nwhen search results are displayed, but filters are cleared by the search results. \n\n",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Search and filters \nIf I run a search query, any filter applied afterwards will filter the content returned by the search query. \nIf I run a search query while a filter is applied, the filter is cleared by the results of the search query. \n",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "variables:_Search_the_content_of_the_bitbake_variables_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.variables:_Sort_the_content_of_the_bitbake_variables_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Configuration\" link in the left sidebar. Then click \"BitBake variables\" tab. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "By default, the \"variables\" table is sorted by \"Variable\" in ascending alphabetical order (A to Z). \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Make sure that \"Variable\" column is sortable (Developers have disabled sort function of all other columns to avoid bug 6004) \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Sorting and search \nSearching should have no impact on the applied sorting. Any results returned should be sorted by the sorting criteria selected when the search query was submitted.",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "variables:_Sort_the_content_of_the_bitbake_variables_table."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.builds:_View_a_table_of_all_the_builds_run_for_a_certain_build_directory",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start up toaster and open localhost:8000. ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "You can see 'Latest builds' section lists. - Builds in progress, sorted by inverse start time (last one starting at the top). - 3 latest completed builds, as long as they are less than 24 hours old. If there are no builds in progress or builds completed within the last 24 hours we don't display it: the page shows only the 'All builds' section. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "You can see the following column headings. You can see the their description in https://bugzilla.yoctoproject.org/attachment.cgi?id=1617. outcome, recipe, machine, started on, completed on, failed tasks, errors, warnings, time, image files, project",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "builds:_View_a_table_of_all_the_builds_run_for_a_certain_build_directory"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.builds:_Customise_the_columns_of_the_builds_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start up toaster.",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Create 2 builds, such as \"bitbake core-image-minimal\" and \"bitbake core-image-sato\". Wait for successful builds and then run: xdg-open http://localhost:8000/",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Enter \"All build\" table in web browser.",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Select a few item in \"Edit columns\" to show or hide them in all builds.",
+ "expected_results": "Unchecked items changed to checked should immediately appear in the table. Checked items changed to unchecked should immediately disappear from the table. If you uncheck the column with the applied sorting, when you close the \"Edit columns\" menu the applied sorting should revert to the table default sorting. Bug 5919 is filed for the function."
+ }
+ },
+ "summary": "builds:_Customise_the_columns_of_the_builds_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.packages:_View_a_table_with_all_the_packages_built_for_an_image_recipe",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Packages\" link in the left sidebar. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "By default, the built packages table displays the following columns in this order: Package, Package version, Size ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Apart from the columns shown by default, the following additional columns are also available to users via the \"Edit columns\" menu: Layer, Layer branch, Layer commit, License, Recipe version ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Enable these columns and observe that table columns appear listed alphabetically in the \"Edit columns\" menu (1)Package (2)Package version (3)Size (4)License (5)Recipe (6)Recipe version (7)Layer (8)Layer branch (9)Layer commit ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "The minimum table is made of the 2 columns that provide the information needed to identify a package: Package and Package version. Their corresponding checkboxes in the \"Edit columns\" menu appear always selected and are in an inactive state. ",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "packages:_View_a_table_with_all_the_packages_built_for_an_image_recipe"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.packages:_Sort_the_content_of_the_packages_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Packages\" link in the left sidebar. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe that by default the \"built packages\" table is sorted by \"Package\" in ascending alphabetical order (A to Z). ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Click \"Size\" column heading to sort my \"built packages\" table by \"Size\". Then navigate away by selecting a package and you can see the package page. After click \"go back\" button in browser to return to the \"built packages\" table it should still be sorted by \"Size\". ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Observe that all except \"Package version\", \"Recipe version\", \"Layer commit\" are sortable. ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "If you use the \"Edit columns\" menu to hide the column with the applied sorting, we revert the sorting to the default sorting (i.e. \"Package\"). The default sorting always uses one of the core columns, which cannot be hidden using the \"Edit columns\" menu. Bug 5919 is filed for the issue. ",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Searching should have no impact on the applied sorting. Any results returned should be sorted by the sorting criteria selected when the search query was submitted. Sort packages by size and search a string. Observe that results returned should be sorted by size. ",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "In Toaster, select the build, and select the \"core-image*\" link in the left sidebar. Observe that by default the \"built packages\" table is sorted by \"Package\" in ascending alphabetical order (A to Z). ",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "If choose to sort my \"included packages\" table by \"Size\" and then navigate away by selecting a package, when I go back to the \"included packages\" table it should still be sorted by \"Size\". ",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "Enable all columns by \"Edit columns\". All except \"Package version\", \"Recipe version\", \"Dependencies\", \"Reverse dependencies\", \"Layer commit\", should be sortable. ",
+ "expected_results": ""
+ },
+ "11": {
+ "action": "If you use the \"Edit columns\" menu to hide the column with the applied sorting, we revert the sorting to the default sorting (i.e. \"Package\"). The default sorting always uses one of the core columns, which cannot be hidden using the \"Edit columns\" menu. Bug 5919 is filed for the issue. ",
+ "expected_results": ""
+ },
+ "12": {
+ "action": "Searching should have no impact on the applied sorting. Any results returned should be sorted by the sorting criteria selected when the search query was submitted. Sort packages by size and search a string. Observe that results returned should be sorted by size.",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "packages:_Sort_the_content_of_the_packages_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.packages:_Customise_the_columns_of_the_packages_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Packages\" link in the left sidebar. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe that by default the \"built packages\" table is sorted by \"Package\" in ascending alphabetical order (A to Z). ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Select 1 column in \"Edit column\" to show the column. ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Deselect 1 column in \"Edit column\" to hide 1 column by \"Edit columns\".",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "packages:_Customise_the_columns_of_the_packages_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.packages:_Search_the_content_of_the_packages_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Packages\" link in the left sidebar. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe that by default the \"built packages\" table is sorted by \"Package\" in ascending alphabetical order (A to Z). ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "When no search query has been entered, we have placeholder text saying: \"Search packages built\". The placeholder text disappears when the first character is typed. ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "When a search query has been submitted and results returned: â–ª We keep the search string in the text input field. â–ª We provide a \"Clear search\" icon (icon-remove-sign). Click it to clear the search and display all packages. â–ª We change the page heading to indicate the number of results returned by the search query. ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "If your search query returns no results, the page heading changes to \"No packages found\", and we show you an alert with a search form and an option to show all packages. ",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Searching does not change the state of the table: the same columns remain hidden and the same sorting applied. ",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "When I run a search, the search happens against the following columns (independently of they being shown or hidden): - Package - Package version - License - Recipe - Recipe version - Layer - Layer branch - Layer commit ",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Hide all columns except \"Package\" and \"Package version\". Search a string which is included in other hidden columns, not the 2 columns. See if returned results occur. ",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "In Toaster, select the build, and select the \"core-image*\" link in the left sidebar. Observe that by default the \"included packages\" table is sorted by \"Package\" in ascending alphabetical order (A to Z). Rerun tests according to step 4~9.",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "packages:_Search_the_content_of_the_packages_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.View_detailed_information_about_a_layer",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n\n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Make sure that layer information is shown in: \n* recipes table \n All builds-> core-image-minimal-> recipes \n Select \"Layer\", \"Layer branch\", \"Layer commit\" in Edit columns and observe the 3 columns are showed. Note that the \"Layer branch\" column can be empty. \n\n* recipe details \n All builds-> core-image-minimal-> recipes \n Click a recipe and you can see \"Layer\", \"Layer branch\", \"Layer commit\", \"Recipe details\" information. Note that \"Layer branch\" is not required. If there is no layer branch, you should not see the \"Layer branch\" item on the list.",
+ "expected_results": "NA"
+ },
+ "3": {
+ "action": "built packages table \n All builds-> core-image-minimal-> packages \n Select \"Layer\", \"Layer branch\", \"Layer commit\" in Edit columns and observer the 3 columns is showed. Note that the \"Layer branch\" column can be empty. \n\n* built package details \n All builds-> core-image-minimal-> packages \n Click a package and you can see \"Layer\", \"Layer branch\", \"Layer commit\" in package information. Note that \"Layer branch\" is not required. If there is no layer branch, you should not see the \"Layer branch\" item on the list. \n\n* image information \n All builds-> core-image-minimal-> core-image-minimal(images) \n Select \"Layer\", \"Layer branch\", \"Layer commit\" in Edit columns and observer the 3 columns is showed.",
+ "expected_results": "NA"
+ },
+ "4": {
+ "action": "Note that the \"Layer branch\" column can be empty. \n\n* installed package details \n All builds-> core-image-minimal-> core-image-minimal(images) \n Click a package and you can see layer information in package information. Note that \"Layer branch\" is not required. If there is no layer branch, you should not see the \"Layer branch\" item on the list. \n\n* configuration \n All builds-> core-image-minimal-> Configuration \n You can see \"Layer\", \"Layer branch\", \"Layer commit\" in configuration summary. Note that the \"Layer branch\" column can be empty. \n\n* build dashboard \n All builds-> core-image-minimal \n You can see \"Layers\" in build summary. ",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "View_detailed_information_about_a_layer"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.Select_the_number_of_table_rows_displayed_per_page",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Packages\" link in the left sidebar. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Users can select the number of rows they want to see in a table using the \"Show rows\" dropdown menu, which displays above and below each table. The options of the \"Show rows\" dropdown are: 10, 25, 50, 100, 150. ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "The last selected option from the \"Show rows\" menu should be remembered: * Select one option, for example 10 * Click on a package name to navigate away from the built packages table * Click on the \"Packages\" link in the breadcrumb at the top of the page to go back to the packages table Note that 25 is still selected in the \"Show rows\" menu. ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Observe that the pagination widget is made of: - A \"Previous\" button - A \"Next\" button - A maximum of 5 page buttons. ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "See the pagination function of \"Tasks\", \"Recipes\" links according to steps 3~4.",
+ "expected_results": "Expected result for step 4: This widget has no previous or next button if testing in toaster 2.2. see Bug 9831"
+ }
+ },
+ "summary": "Select_the_number_of_table_rows_displayed_per_page"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.View_detailed_configuration_information_for_a_build",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Configuration\" link in the left sidebar. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe that the configuration page has 2 tabs: - Summary - BitBake variables The Summary tab is the default tab. ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "The following content is included in summary tab. (1) Build configuration (2) Layers (Layer, Layer branch - if any, Layer commit) ",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Observe that \"BitBake variables\" tab includes \"Variable\", \"Value\", \" Set in file\", \"Description\" columns. ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Click filter button of \"Set in file\" column. Select \"Local configuration variables\" and click \"Apply\" button to see if filter function works well. ",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "In the \"Edit columns\" menu, table columns appear listed alphabetically: Description, Set in file, Value, Variable ",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "The minimum table is made of the \"Variable\" and \"Value\" columns. ",
+ "expected_results": ""
+ },
+ "9": {
+ "action": "Click a variable and a \"History of ${variable}\" dialog will occur. The modal dialog shows the variable value followed by the history table, which has the following columns: - Order: indicates the sequence in which the files set the variable - Configuration file: the location in disk of the file that set the variable - Operation: the value of the operation field as stored in the database. - Line number: the line number where the operation is performed in the configuration file. For such variables, whose value is an empty string, the Value cell in the variables table isempty, which is probably the right thing. In the modal, instead of the variable value, we show an alert (with the class .alert-info) saying: \"The value of is an empty string\" ",
+ "expected_results": ""
+ },
+ "10": {
+ "action": "Click arrow links in description tab to see linking variables to the Yocto Project reference manual.",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "View_detailed_configuration_information_for_a_build"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.variables:_Customise_the_columns_of_the_bitbake_variables_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Configuration\" link in the left sidebar. Then click \"BitBake variables\" tab. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Show or hide columns by select or deselect options of \"Edit columns\".",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "variables:_Customise_the_columns_of_the_bitbake_variables_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.variables:_Filter_the_content_of_the_bitbake_variables_table",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"Configuration\" link in the left sidebar. Then click \"BitBake variables\" tab. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe \"Set in file\" and \"Description\" columns have filters. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Filters are mutually exclusive. Only one column filter can be applied to a table at any given time. \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Filters are overridden by search. \nThe scope of the filters is the content currently on the table. \nThe scope of the search is always the full content of the database. \nSo: \n- if I run a search query, any filter applied afterwards will filter the content returned by the search query. \nSearch a string and apply a filter. Observe it would filter the content returned by the search query. \n\n- if I run a search query while a filter is applied, the filter is overridden by the results of the search query. \nApply a filter and search a string. Observe that the previous filtered result is overridden by the search. ",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "variables:_Filter_the_content_of_the_bitbake_variables_table"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.View_and_navigate_the_full_directory_structure_of_built_images",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build, and select the \"core-image-minimal\" link in the left sidebar. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe image information page has 2 tabs: \n- Packages included: this tab shows a table with all the packages installed in the image. The tab label includes the total number of packages listed in the table and their size. \n- Directory structure: this tab shows all the files included in the image. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "By default, the included packages table displays the following columns in this order: \nPackage, Package version, Size, Dependencies \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Apart from the columns shown by default, the following additional columns are also available to users via the \"Edit columns\" menu: \nLayer, Layer branch, Layer commit, License, Recipe, Recipe version. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "The minimum table is made of the 2 columns that provide the information needed to identify a package: Package and Package version. \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "By default, the directory structure table shows the top level directories and files in the file system.\nThe table includes the following columns: \nDirectory/File, Symbolic link to, Source package, Size, Permissions, Owner, Group \nOpen some directories and see files. ",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "View_and_navigate_the_full_directory_structure_of_built_images"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.View_a_summary_of_all_the_information_available_for_a_build",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and build \"bitbake core-image-minimal\". \n \n",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select the build. \n\n",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "A 'Build dashboard' page is showed. \nThe 'Build dashboard' page has two main states: \n(1) Success state: when the build completes successfully. In the success state, if the build target(s) include an image recipe, the page displays an image content module, and the left navigation has an \"Images\" section at the top. \n(2) Fail state: when the build fails (shown in this page). In the fail state, the page always displays an errors content module, and the left navigation does not have an \"Images\" section at the top. \n\n",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Observe that the page provides access to all information available for the selected build. \n(1) Images \n(2) Build: this group provides links to the following pages: \nConfiguration, Tasks, Recipes, Packages \n(3) Performance: this group provides links to the following pages: \nTime, CPU usage, Disk I/O \n\n",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "The page heading is made of the build target(s) and the machine, such as \"core-image-minimal qemux86\". If the build has more than one target, they show in ascending alphabetical order (A to Z) both in the page heading and in the \"Images\" section of the left navigation. If the build was successful, there is an image content module for each target that is an image recipe. The modules also show in ascending alphabetical order by target name. \n\n",
+ "expected_results": ""
+ },
+ "6": {
+ "action": "Packages included, total package size, license manifest, image files are included in the images section. \n\n",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "The information of Machine, Distro, Layers is included in configuration content module of \"Build summary\" section. \nThe information of \"Total number of task\", \"Tasks executed\", \" Tasks not executed\", \"Reuse\" is included in the tasks content module. \nThe information of \"Recipes built\" and \"Packages built\" is included in the \"Recipes&Packages\" content module. ",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "View_a_summary_of_all_the_information_available_for_a_build"
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.Display_the_content_of_error_messages_and_warnings",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and create a successful build and a failed build. You can force a build to terminate by ctrl+c. ",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "Observe that the number of errors and warnings thrown by a build shows in both 'All builds' page and the 'Latest builds' section. ",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe that the number and content of errors and warnings thrown by a build shows in the 'Build dashboard' page. ",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Click warning or error links to see warning and error details. ",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "Display_the_content_of_error_messages_and_warnings."
+ }
+ },
+ {
+ "test": {
+ "@alias": "toaster-unmanaged-mode.toaster-unmanaged.Build_summary_information_fully_implemented",
+ "author": [
+ {
+ "email": "Yuan.Sun2@windriver.com",
+ "name": "Yuan.Sun2@windriver.com"
+ }
+ ],
+ "execution": {
+ "1": {
+ "action": "Start with a default Yocto project (qemux86), start the Toaster, and create 4 builds. \na) a successful build with images (bitbake core-image-minimal) \nb) a successful build without images (bitbake mtools-native) \nc) a failed build with errors and warnings (run \"bitbake core-image-sato\", then press control+c to terminate the build)",
+ "expected_results": ""
+ },
+ "2": {
+ "action": "In Toaster, select a core-image-minimal build.",
+ "expected_results": ""
+ },
+ "3": {
+ "action": "Observe that there is a 'Build dashboard' page captured by Toaster. The page does not exist for builds in progress, only for finished builds. \nThe 'Build dashboard' page is made of: \na) Breadcrumb \nb) Navigation \n IMAGES: core-image-minimal \n BUILD: \n Configuration \n Tasks \n Recipes \n Packages \n PERFORMANCE: \n Time \n CPU usage \n Disk I/O \nc) Page heading (core-image-minimal qemux86) \nd) Section heading (Images, Build summary) \ne) Build status notification (Completed on xx/xx/xx... Build time:xx:xx:xx)",
+ "expected_results": ""
+ },
+ "4": {
+ "action": "Observe \"images\" section is made of the following \n.\na) Heading: core-image-minimal, which links to the \"Packages included\" tab of the image information page \nb) Number of packages installed: (packages included xx), which is a link to the \"Packages included\" tab of the image information page \nc) Total installed package size: xxMB \nd) License manifest (which is a link to the \"Packages included\" tab of the information page with the following columns showing: \"Package\", \"Package version\", \"License\" and \"Recipe\". We have bug 6079 open for this). Next to the license manifest is the path to the directory where you can find the license manifest file. \n \ne) Image files (rootfs file names and rootfs file sizes)",
+ "expected_results": ""
+ },
+ "5": {
+ "action": "Observe \"Build summary\" section is made of the following. \na) Configuration (which is a link to the configuration page): \n Machine \n Distro \n Layers (sorted in alphabetical order) \nb) Tasks (which is a link to the tasks page) \n Total number of tasks (which is a link to the tasks page) \n Tasks executed (which is a link to the tasks page with the tasks executed filter applied) \n Tasks not executed (which is a link to the tasks pages with the tasks not executed filter applied)\n Reuse \nc) Note that \"Total number of tasks\" should equal number of \"Tasks executed\" + number of \"Tasks not executed\" \nd) Recipes (which is a link to the recipes page) & Packages (which is a link to the packages built page) ",
+ "expected_results": ""
+ },
+ "6": {
+ "action": " Number of recipes built (which is a link to the recipes page) \n \n Number of packages built (which is a link to the packages built page)",
+ "expected_results": ""
+ },
+ "7": {
+ "action": "Return to localhost:8000 and select a successful build without images (mtools-native) \n.\nObserve the build dashboard for a successful build of a target that is not an image recipe. There is no image content module, and no \"Images\" section in the left navigation.",
+ "expected_results": ""
+ },
+ "8": {
+ "action": "Return to localhost:8000 and select the failed build (core-image-sato). Observe the build dashboard for the failed build. \n \na) the errors content module: \nThis module exists for those builds that throw error(s). It appears immediately below the build status notification. \nThe module has 2 states: \nâ–ª Expanded (shows number of errors and error content) \nâ–ª Collapsed (shows only the number of errors) \nBy default, the errors module is in the expanded state. \nErrors content modules include the following information: \n(1.1) A heading, which indicates the number of errors thrown by the build, and toggles the module between its 2 states on click. ",
+ "expected_results": "NA"
+ },
+ "9": {
+ "action": "Transitions between states should use a slide up / slide down animation. \n(1.2) Error(s) content \n\nb) the warning content module: \nThis module exists for those builds that throw warning(s). \nIt is the last content module shown on the build dashboard. \nThe module has 2 states: \nâ–ª Expanded (shows number of warnings and warning content) \nâ–ª Collapsed (shows only the number of warnings) \nBy default, the warning module is in the collapsed state. Warnings content modules include the following information: \n(2.1) A heading, which indicates the number of warnings thrown by the build, and toggles the module between its 2 \nstates on click. Transitions between states should use a slide up / slide down animation. \n(2.2) Warning(s) content ",
+ "expected_results": "NA"
+ }
+ },
+ "summary": "Build_summary_information_fully_implemented"
+ }
+ }
+] \ No newline at end of file
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 95d3bf72fc..9c84466dd0 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -1,13 +1,15 @@
+#
# Copyright (C) 2013 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# Main unittest module used by testimage.bbclass
# This provides the oeRuntimeTest base class which is inherited by all tests in meta/lib/oeqa/runtime.
# It also has some helper functions and it's responsible for actually starting the tests
-import os, re, mmap, sys
+import os, re, sys
import unittest
import inspect
import subprocess
@@ -27,7 +29,6 @@ try:
except ImportError:
pass
from oeqa.utils.decorators import LogResults, gettag, getResults
-from oeqa.utils import avoid_paths_in_environ
logger = logging.getLogger("BitBake")
@@ -107,7 +108,7 @@ class oeRuntimeTest(oeTest):
pass
def tearDown(self):
- # Unistall packages in the DUT
+ # Uninstall packages in the DUT
self.tc.install_uninstall_packages(self.id(), False)
res = getResults()
@@ -129,48 +130,6 @@ class oeRuntimeTest(oeTest):
def tearDownLocal(self):
pass
- #TODO: use package_manager.py to install packages on any type of image
- def install_packages(self, packagelist):
- for package in packagelist:
- (status, result) = self.target.run("smart install -y "+package)
- if status != 0:
- return status
-
-class OETestCalledProcessError(subprocess.CalledProcessError):
- def __str__(self):
- if hasattr(self, "stderr"):
- return "Command '%s' returned non-zero exit status %d with output %s and stderr %s" % (self.cmd, self.returncode, self.output, self.stderr)
- else:
- return "Command '%s' returned non-zero exit status %d with output %s" % (self.cmd, self.returncode, self.output)
-
-subprocess.CalledProcessError = OETestCalledProcessError
-
-class oeSDKTest(oeTest):
- def __init__(self, methodName='runTest'):
- self.sdktestdir = oeSDKTest.tc.sdktestdir
- super(oeSDKTest, self).__init__(methodName)
-
- @classmethod
- def hasHostPackage(self, pkg):
- if re.search(pkg, oeTest.tc.hostpkgmanifest):
- return True
- return False
-
- def _run(self, cmd):
- return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True, stderr=subprocess.STDOUT).decode("utf-8")
-
-class oeSDKExtTest(oeSDKTest):
- def _run(self, cmd):
- # extensible sdk shows a warning if found bitbake in the path
- # because can cause contamination, i.e. use devtool from
- # poky/scripts instead of eSDK one.
- env = os.environ.copy()
- paths_to_avoid = ['bitbake/bin', 'poky/scripts']
- env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
-
- return subprocess.check_output(". %s > /dev/null;"\
- " %s;" % (self.tc.sdkenv, cmd), stderr=subprocess.STDOUT, shell=True, env=env).decode("utf-8")
-
def getmodule(pos=2):
# stack returns a list of tuples containg frame information
# First element of the list the is current frame, caller is 1
@@ -221,15 +180,16 @@ class TestContext(object):
path = [os.path.dirname(os.path.abspath(__file__))]
extrapath = ""
else:
- path = d.getVar("BBPATH", True).split(':')
+ path = d.getVar("BBPATH").split(':')
extrapath = "lib/oeqa"
self.testslist = self._get_tests_list(path, extrapath)
self.testsrequired = self._get_test_suites_required()
self.filesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files")
- self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
- self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
+ self.corefilesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
+ self.imagefeatures = d.getVar("IMAGE_FEATURES").split()
+ self.distrofeatures = d.getVar("DISTRO_FEATURES").split()
# get testcase list from specified file
# if path is a relative path, then relative to build/conf/
@@ -406,9 +366,9 @@ class RuntimeTestContext(TestContext):
self.target = target
self.pkgmanifest = {}
- manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True),
- d.getVar("IMAGE_LINK_NAME", True) + ".manifest")
- nomanifest = d.getVar("IMAGE_NO_MANIFEST", True)
+ manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"),
+ d.getVar("IMAGE_LINK_NAME") + ".manifest")
+ nomanifest = d.getVar("IMAGE_NO_MANIFEST")
if nomanifest is None or nomanifest != "1":
try:
with open(manifest) as f:
@@ -424,19 +384,19 @@ class RuntimeTestContext(TestContext):
def _get_test_suites(self):
testsuites = []
- manifests = (self.d.getVar("TEST_SUITES_MANIFEST", True) or '').split()
+ manifests = (self.d.getVar("TEST_SUITES_MANIFEST") or '').split()
if manifests:
for manifest in manifests:
testsuites.extend(self._read_testlist(manifest,
- self.d.getVar("TOPDIR", True)).split())
+ self.d.getVar("TOPDIR")).split())
else:
- testsuites = self.d.getVar("TEST_SUITES", True).split()
+ testsuites = self.d.getVar("TEST_SUITES").split()
return testsuites
def _get_test_suites_required(self):
- return [t for t in self.d.getVar("TEST_SUITES", True).split() if t != "auto"]
+ return [t for t in self.d.getVar("TEST_SUITES").split() if t != "auto"]
def loadTests(self):
super(RuntimeTestContext, self).loadTests()
@@ -449,10 +409,10 @@ class RuntimeTestContext(TestContext):
"""
modules = self.getTestModules()
- bbpaths = self.d.getVar("BBPATH", True).split(":")
+ bbpaths = self.d.getVar("BBPATH").split(":")
- shutil.rmtree(self.d.getVar("TEST_EXTRACTED_DIR", True))
- shutil.rmtree(self.d.getVar("TEST_PACKAGED_DIR", True))
+ shutil.rmtree(self.d.getVar("TEST_EXTRACTED_DIR"))
+ shutil.rmtree(self.d.getVar("TEST_PACKAGED_DIR"))
for module in modules:
json_file = self._getJsonFile(module)
if json_file:
@@ -466,8 +426,8 @@ class RuntimeTestContext(TestContext):
import oe.path
- extracted_path = self.d.getVar("TEST_EXTRACTED_DIR", True)
- packaged_path = self.d.getVar("TEST_PACKAGED_DIR", True)
+ extracted_path = self.d.getVar("TEST_EXTRACTED_DIR")
+ packaged_path = self.d.getVar("TEST_PACKAGED_DIR")
for key,value in needed_packages.items():
packages = ()
@@ -548,7 +508,7 @@ class RuntimeTestContext(TestContext):
from oeqa.utils.package_manager import get_package_manager
- pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR", True), pkg)
+ pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR"), pkg)
pm = get_package_manager(self.d, pkg_path)
extract_dir = pm.extract(pkg)
shutil.rmtree(pkg_path)
@@ -562,8 +522,8 @@ class RuntimeTestContext(TestContext):
from oeqa.utils.package_manager import get_package_manager
- pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR", True), pkg)
- dst_dir = self.d.getVar("TEST_PACKAGED_DIR", True)
+ pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR"), pkg)
+ dst_dir = self.d.getVar("TEST_PACKAGED_DIR")
pm = get_package_manager(self.d, pkg_path)
pkg_info = pm.package_info(pkg)
file_path = pkg_info[pkg]["filepath"]
@@ -572,7 +532,7 @@ class RuntimeTestContext(TestContext):
def install_uninstall_packages(self, test_id, pkg_dir, install):
"""
- Check if the test requires a package and Install/Unistall it in the DUT
+ Check if the test requires a package and Install/Uninstall it in the DUT
"""
test = test_id.split(".")[4]
@@ -585,7 +545,7 @@ class RuntimeTestContext(TestContext):
def _install_uninstall_packages(self, needed_packages, pkg_dir, install=True):
"""
- Install/Unistall packages in the DUT without using a package manager
+ Install/Uninstall packages in the DUT without using a package manager
"""
if isinstance(needed_packages, dict):
@@ -603,7 +563,7 @@ class RuntimeTestContext(TestContext):
if install and extract:
self.target.connection.copy_dir_to(src_dir, "/")
- # Unistall package
+ # Uninstall package
elif not install and rm:
self.target.connection.delete_dir_structure(src_dir, "/")
@@ -611,7 +571,7 @@ class ImageTestContext(RuntimeTestContext):
def __init__(self, d, target, host_dumper):
super(ImageTestContext, self).__init__(d, target)
- self.tagexp = d.getVar("TEST_SUITES_TAGS", True)
+ self.tagexp = d.getVar("TEST_SUITES_TAGS")
self.host_dumper = host_dumper
@@ -626,10 +586,10 @@ class ImageTestContext(RuntimeTestContext):
def install_uninstall_packages(self, test_id, install=True):
"""
- Check if the test requires a package and Install/Unistall it in the DUT
+ Check if the test requires a package and Install/Uninstall it in the DUT
"""
- pkg_dir = self.d.getVar("TEST_EXTRACTED_DIR", True)
+ pkg_dir = self.d.getVar("TEST_EXTRACTED_DIR")
super(ImageTestContext, self).install_uninstall_packages(test_id, pkg_dir, install)
class ExportTestContext(RuntimeTestContext):
@@ -643,80 +603,16 @@ class ExportTestContext(RuntimeTestContext):
super(ExportTestContext, self).__init__(d, target, exported)
tag = parsedArgs.get("tag", None)
- self.tagexp = tag if tag != None else d.getVar("TEST_SUITES_TAGS", True)
+ self.tagexp = tag if tag != None else d.getVar("TEST_SUITES_TAGS")
self.sigterm = None
def install_uninstall_packages(self, test_id, install=True):
"""
- Check if the test requires a package and Install/Unistall it in the DUT
+ Check if the test requires a package and Install/Uninstall it in the DUT
"""
export_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
- extracted_dir = self.d.getVar("TEST_EXPORT_EXTRACTED_DIR", True)
+ extracted_dir = self.d.getVar("TEST_EXPORT_EXTRACTED_DIR")
pkg_dir = os.path.join(export_dir, extracted_dir)
super(ExportTestContext, self).install_uninstall_packages(test_id, pkg_dir, install)
-
-class SDKTestContext(TestContext):
- def __init__(self, d, sdktestdir, sdkenv, tcname, *args):
- super(SDKTestContext, self).__init__(d)
-
- self.sdktestdir = sdktestdir
- self.sdkenv = sdkenv
- self.tcname = tcname
-
- if not hasattr(self, 'target_manifest'):
- self.target_manifest = d.getVar("SDK_TARGET_MANIFEST", True)
- try:
- self.pkgmanifest = {}
- with open(self.target_manifest) as f:
- for line in f:
- (pkg, arch, version) = line.strip().split()
- self.pkgmanifest[pkg] = (version, arch)
- except IOError as e:
- bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e)
-
- if not hasattr(self, 'host_manifest'):
- self.host_manifest = d.getVar("SDK_HOST_MANIFEST", True)
- try:
- with open(self.host_manifest) as f:
- self.hostpkgmanifest = f.read()
- except IOError as e:
- bb.fatal("No host package manifest file found. Did you build the sdk image?\n%s" % e)
-
- def _get_test_namespace(self):
- return "sdk"
-
- def _get_test_suites(self):
- return (self.d.getVar("TEST_SUITES_SDK", True) or "auto").split()
-
- def _get_test_suites_required(self):
- return [t for t in (self.d.getVar("TEST_SUITES_SDK", True) or \
- "auto").split() if t != "auto"]
-
-class SDKExtTestContext(SDKTestContext):
- def __init__(self, d, sdktestdir, sdkenv, tcname, *args):
- self.target_manifest = d.getVar("SDK_EXT_TARGET_MANIFEST", True)
- self.host_manifest = d.getVar("SDK_EXT_HOST_MANIFEST", True)
- if args:
- self.cm = args[0] # Compatibility mode for run SDK tests
- else:
- self.cm = False
-
- super(SDKExtTestContext, self).__init__(d, sdktestdir, sdkenv, tcname)
-
- self.sdkextfilesdir = os.path.join(os.path.dirname(os.path.abspath(
- oeqa.sdkext.__file__)), "files")
-
- def _get_test_namespace(self):
- if self.cm:
- return "sdk"
- else:
- return "sdkext"
-
- def _get_test_suites(self):
- return (self.d.getVar("TEST_SUITES_SDK_EXT", True) or "auto").split()
-
- def _get_test_suites_required(self):
- return [t for t in (self.d.getVar("TEST_SUITES_SDK_EXT", True) or \
- "auto").split() if t != "auto"]
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index 7e245c4120..7e37213df6 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -1,9 +1,9 @@
#!/usr/bin/env python3
-
-
+#
# Copyright (C) 2013 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# This script should be used outside of the build system to run image tests.
# It needs a json file as input as exported by the build.
@@ -43,8 +43,8 @@ class FakeTarget(object):
self.ip = None
self.server_ip = None
self.datetime = time.strftime('%Y%m%d%H%M%S',time.gmtime())
- self.testdir = d.getVar("TEST_LOG_DIR", True)
- self.pn = d.getVar("PN", True)
+ self.testdir = d.getVar("TEST_LOG_DIR")
+ self.pn = d.getVar("PN")
def exportStart(self):
self.sshlog = os.path.join(self.testdir, "ssh_target_log.%s" % self.datetime)
@@ -130,8 +130,8 @@ def extract_sdk(d):
"""
export_dir = os.path.dirname(os.path.realpath(__file__))
- tools_dir = d.getVar("TEST_EXPORT_SDK_DIR", True)
- tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME", True)
+ tools_dir = d.getVar("TEST_EXPORT_SDK_DIR")
+ tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME")
tarball_path = os.path.join(export_dir, tools_dir, tarball_name)
extract_path = os.path.join(export_dir, "sysroot")
if os.path.isfile(tarball_path):
diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py
deleted file mode 100644
index 71324d3da2..0000000000
--- a/meta/lib/oeqa/runtime/_ptest.py
+++ /dev/null
@@ -1,125 +0,0 @@
-import unittest, os, shutil
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.logparser import *
-from oeqa.utils.httpserver import HTTPService
-import bb
-import glob
-from oe.package_manager import RpmPkgsList
-import subprocess
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("package-management"):
- skipModule("Image doesn't have package management feature")
- if not oeRuntimeTest.hasPackage("smartpm"):
- skipModule("Image doesn't have smart installed")
- if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]:
- skipModule("Rpm is not the primary package manager")
-
-class PtestRunnerTest(oeRuntimeTest):
-
- # a ptest log parser
- def parse_ptest(self, logfile):
- parser = Lparser(test_0_pass_regex="^PASS:(.+)", test_0_fail_regex="^FAIL:(.+)", section_0_begin_regex="^BEGIN: .*/(.+)/ptest", section_0_end_regex="^END: .*/(.+)/ptest")
- parser.init()
- result = Result()
-
- with open(logfile) as f:
- for line in f:
- result_tuple = parser.parse_line(line)
- if not result_tuple:
- continue
- result_tuple = line_type, category, status, name = parser.parse_line(line)
-
- if line_type == 'section' and status == 'begin':
- current_section = name
- continue
-
- if line_type == 'section' and status == 'end':
- current_section = None
- continue
-
- if line_type == 'test' and status == 'pass':
- result.store(current_section, name, status)
- continue
-
- if line_type == 'test' and status == 'fail':
- result.store(current_section, name, status)
- continue
-
- result.sort_tests()
- return result
-
- @classmethod
- def setUpClass(self):
- #note the existing channels that are on the board before creating new ones
-# self.existingchannels = set()
-# (status, result) = oeRuntimeTest.tc.target.run('smart channel --show | grep "\["', 0)
-# for x in result.split("\n"):
-# self.existingchannels.add(x)
- self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), oeRuntimeTest.tc.target.server_ip)
- self.repo_server.start()
-
- @classmethod
- def tearDownClass(self):
- self.repo_server.stop()
- #remove created channels to be able to repeat the tests on same image
-# (status, result) = oeRuntimeTest.tc.target.run('smart channel --show | grep "\["', 0)
-# for x in result.split("\n"):
-# if x not in self.existingchannels:
-# oeRuntimeTest.tc.target.run('smart channel --remove '+x[1:-1]+' -y', 0)
-
- def add_smart_channel(self):
- image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True)
- deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype)
- pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS', True).replace("-","_").split()
- for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)):
- if arch in pkgarchs:
- self.target.run('smart channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url), 0)
- self.target.run('smart update', 0)
-
- def install_complementary(self, globs=None):
- installed_pkgs_file = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True),
- "installed_pkgs.txt")
- self.pkgs_list = RpmPkgsList(oeRuntimeTest.tc.d, oeRuntimeTest.tc.d.getVar('IMAGE_ROOTFS', True), oeRuntimeTest.tc.d.getVar('arch_var', True), oeRuntimeTest.tc.d.getVar('os_var', True))
- with open(installed_pkgs_file, "w+") as installed_pkgs:
- installed_pkgs.write(self.pkgs_list.list("arch"))
-
- cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"),
- "-p", oeRuntimeTest.tc.d.getVar('PKGDATA_DIR', True), "glob", installed_pkgs_file,
- globs]
- try:
- bb.note("Installing complementary packages ...")
- complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- except subprocess.CalledProcessError as e:
- bb.fatal("Could not compute complementary packages list. Command "
- "'%s' returned %d:\n%s" %
- (' '.join(cmd), e.returncode, e.output))
-
- return complementary_pkgs.split()
-
- def setUpLocal(self):
- self.ptest_log = os.path.join(oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR",True), "ptest-%s.log" % oeRuntimeTest.tc.d.getVar('DATETIME', True))
-
- @skipUnlessPassed('test_ssh')
- def test_ptestrunner(self):
- self.add_smart_channel()
- (runnerstatus, result) = self.target.run('which ptest-runner', 0)
- cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackageMatch("-ptest") and (runnerstatus != 0)
- if cond:
- self.install_packages(self.install_complementary("*-ptest"))
- self.install_packages(['ptest-runner'])
-
- (runnerstatus, result) = self.target.run('/usr/bin/ptest-runner > /tmp/ptest.log 2>&1', 0)
- #exit code is !=0 even if ptest-runner executes because some ptest tests fail.
- self.assertTrue(runnerstatus != 127, msg="Cannot execute ptest-runner!")
- self.target.copy_from('/tmp/ptest.log', self.ptest_log)
- shutil.copyfile(self.ptest_log, "ptest.log")
-
- result = self.parse_ptest("ptest.log")
- log_results_to_location = "./results"
- if os.path.exists(log_results_to_location):
- shutil.rmtree(log_results_to_location)
- os.makedirs(log_results_to_location)
-
- result.log_as_files(log_results_to_location, test_status = ['pass','fail'])
diff --git a/meta/lib/oeqa/runtime/_qemutiny.py b/meta/lib/oeqa/runtime/_qemutiny.py
deleted file mode 100644
index a3c29f3572..0000000000
--- a/meta/lib/oeqa/runtime/_qemutiny.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest
-from oeqa.utils.qemutinyrunner import *
-
-class QemuTinyTest(oeRuntimeTest):
-
- def test_boot_tiny(self):
- (status, output) = self.target.run_serial('uname -a')
- self.assertTrue("yocto-tiny" in output, msg="Cannot detect poky tiny boot!") \ No newline at end of file
diff --git a/meta/lib/oeqa/runtime/buildcvs.py b/meta/lib/oeqa/runtime/buildcvs.py
deleted file mode 100644
index fe6cbfbcd5..0000000000
--- a/meta/lib/oeqa/runtime/buildcvs.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import TargetBuildProject
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("tools-sdk"):
- skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
-
-class BuildCvsTest(oeRuntimeTest):
-
- @classmethod
- def setUpClass(self):
- self.project = TargetBuildProject(oeRuntimeTest.tc.target, oeRuntimeTest.tc.d,
- "http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2")
- self.project.download_archive()
-
- @testcase(205)
- @skipUnlessPassed("test_ssh")
- def test_cvs(self):
- self.assertEqual(self.project.run_configure(), 0,
- msg="Running configure failed")
-
- self.assertEqual(self.project.run_make(), 0,
- msg="Running make failed")
-
- self.assertEqual(self.project.run_install(), 0,
- msg="Running make install failed")
-
- @classmethod
- def tearDownClass(self):
- self.project.clean()
diff --git a/meta/lib/oeqa/runtime/buildgalculator.py b/meta/lib/oeqa/runtime/buildgalculator.py
deleted file mode 100644
index 28ba29e5c2..0000000000
--- a/meta/lib/oeqa/runtime/buildgalculator.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import TargetBuildProject
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("tools-sdk"):
- skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
-
-class GalculatorTest(oeRuntimeTest):
- @skipUnlessPassed("test_ssh")
- def test_galculator(self):
- try:
- project = TargetBuildProject(oeRuntimeTest.tc.target, oeRuntimeTest.tc.d,
- "http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2")
- project.download_archive()
-
- self.assertEqual(project.run_configure(), 0,
- msg="Running configure failed")
-
- self.assertEqual(project.run_make(), 0,
- msg="Running make failed")
- finally:
- project.clean()
diff --git a/meta/lib/oeqa/runtime/buildiptables.py b/meta/lib/oeqa/runtime/buildiptables.py
deleted file mode 100644
index bc75d0a0c7..0000000000
--- a/meta/lib/oeqa/runtime/buildiptables.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import TargetBuildProject
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("tools-sdk"):
- skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
-
-class BuildIptablesTest(oeRuntimeTest):
-
- @classmethod
- def setUpClass(self):
- self.project = TargetBuildProject(oeRuntimeTest.tc.target, oeRuntimeTest.tc.d,
- "http://downloads.yoctoproject.org/mirror/sources/iptables-1.4.13.tar.bz2")
- self.project.download_archive()
-
- @testcase(206)
- @skipUnlessPassed("test_ssh")
- def test_iptables(self):
- self.assertEqual(self.project.run_configure(), 0,
- msg="Running configure failed")
-
- self.assertEqual(self.project.run_make(), 0,
- msg="Running make failed")
-
- self.assertEqual(self.project.run_install(), 0,
- msg="Running make install failed")
-
- @classmethod
- def tearDownClass(self):
- self.project.clean()
diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py
new file mode 100644
index 0000000000..f036982e1f
--- /dev/null
+++ b/meta/lib/oeqa/runtime/case.py
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.case import OETestCase
+from oeqa.utils.package_manager import install_package, uninstall_package
+
+class OERuntimeTestCase(OETestCase):
+ # target instance set by OERuntimeTestLoader.
+ target = None
+
+ def setUp(self):
+ super(OERuntimeTestCase, self).setUp()
+ install_package(self)
+
+ def tearDown(self):
+ super(OERuntimeTestCase, self).tearDown()
+ uninstall_package(self)
diff --git a/meta/lib/oeqa/runtime/cases/_qemutiny.py b/meta/lib/oeqa/runtime/cases/_qemutiny.py
new file mode 100644
index 0000000000..6886e36502
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/_qemutiny.py
@@ -0,0 +1,12 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+
+class QemuTinyTest(OERuntimeTestCase):
+
+ def test_boot_tiny(self):
+ status, output = self.target.run_serial('uname -a')
+ msg = "Cannot detect poky tiny boot!"
+ self.assertTrue("yocto-tiny" in output, msg)
diff --git a/meta/lib/oeqa/runtime/cases/apt.py b/meta/lib/oeqa/runtime/cases/apt.py
new file mode 100644
index 0000000000..c5378d90c3
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/apt.py
@@ -0,0 +1,53 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+from oeqa.utils.httpserver import HTTPService
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class AptTest(OERuntimeTestCase):
+
+ def pkg(self, command, expected = 0):
+ command = 'apt-get %s' % command
+ status, output = self.target.run(command, 1500)
+ message = os.linesep.join([command, output])
+ self.assertEqual(status, expected, message)
+ return output
+
+class AptRepoTest(AptTest):
+
+ @classmethod
+ def setUpClass(cls):
+ service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_DEB'], 'all')
+ cls.repo_server = HTTPService(service_repo,
+ '0.0.0.0', port=cls.tc.target.server_port,
+ logger=cls.tc.logger)
+ cls.repo_server.start()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.repo_server.stop()
+
+ def setup_source_config_for_package_install(self):
+ apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port)
+ apt_get_sourceslist_dir = '/etc/apt/'
+ self.target.run('cd %s; echo deb %s ./ > sources.list' % (apt_get_sourceslist_dir, apt_get_source_server))
+
+ def cleanup_source_config_for_package_install(self):
+ apt_get_sourceslist_dir = '/etc/apt/'
+ self.target.run('cd %s; rm sources.list' % (apt_get_sourceslist_dir))
+
+ @skipIfNotFeature('package-management',
+ 'Test requires package-management to be in IMAGE_FEATURES')
+ @skipIfNotDataVar('IMAGE_PKGTYPE', 'deb',
+ 'DEB is not the primary package manager')
+ @OEHasPackage(['apt'])
+ def test_apt_install_from_repo(self):
+ self.setup_source_config_for_package_install()
+ self.pkg('update')
+ self.pkg('remove --yes run-postinsts-dev')
+ self.pkg('install --yes --allow-unauthenticated run-postinsts-dev')
+ self.cleanup_source_config_for_package_install()
diff --git a/meta/lib/oeqa/runtime/cases/boot.py b/meta/lib/oeqa/runtime/cases/boot.py
new file mode 100644
index 0000000000..2142f400a0
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/boot.py
@@ -0,0 +1,33 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from subprocess import Popen, PIPE
+import time
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.oetimeout import OETimeout
+from oeqa.core.decorator.data import skipIfQemu
+
+class BootTest(OERuntimeTestCase):
+
+ @OETimeout(120)
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_reboot(self):
+ output = ''
+ count = 0
+ (status, output) = self.target.run('reboot -h')
+ while count < 5:
+ time.sleep(5)
+ cmd = 'ping -c 1 %s' % self.target.ip
+ proc = Popen(cmd, shell=True, stdout=PIPE)
+ output += proc.communicate()[0].decode('utf-8')
+ if proc.poll() == 0:
+ count += 1
+ else:
+ count = 0
+ msg = ('Expected 5 consecutive, got %d.\n'
+ 'ping output is:\n%s' % (count,output))
+ self.assertEqual(count, 5, msg = msg)
diff --git a/meta/lib/oeqa/runtime/cases/buildcpio.py b/meta/lib/oeqa/runtime/cases/buildcpio.py
new file mode 100644
index 0000000000..f4e871e421
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/buildcpio.py
@@ -0,0 +1,32 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
+
+class BuildCpioTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ uri = 'https://downloads.yoctoproject.org/mirror/sources/cpio-2.12.tar.gz'
+ cls.project = TargetBuildProject(cls.tc.target,
+ uri,
+ dl_dir = cls.tc.td['DL_DIR'])
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.project.clean()
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['make'])
+ @OEHasPackage(['autoconf'])
+ def test_cpio(self):
+ self.project.download_archive()
+ self.project.run_configure()
+ self.project.run_make()
+ self.project.run_install()
diff --git a/meta/lib/oeqa/runtime/cases/buildgalculator.py b/meta/lib/oeqa/runtime/cases/buildgalculator.py
new file mode 100644
index 0000000000..e5cc3e2888
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/buildgalculator.py
@@ -0,0 +1,32 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
+
+class GalculatorTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ uri = 'http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2'
+ cls.project = TargetBuildProject(cls.tc.target,
+ uri,
+ dl_dir = cls.tc.td['DL_DIR'])
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.project.clean()
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['make'])
+ @OEHasPackage(['autoconf'])
+ @OEHasPackage(['gtk+3'])
+ def test_galculator(self):
+ self.project.download_archive()
+ self.project.run_configure()
+ self.project.run_make()
diff --git a/meta/lib/oeqa/runtime/cases/buildlzip.py b/meta/lib/oeqa/runtime/cases/buildlzip.py
new file mode 100644
index 0000000000..bc70b41461
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/buildlzip.py
@@ -0,0 +1,34 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
+
+class BuildLzipTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ uri = 'http://downloads.yoctoproject.org/mirror/sources'
+ uri = '%s/lzip-1.19.tar.gz' % uri
+ cls.project = TargetBuildProject(cls.tc.target,
+ uri,
+ dl_dir = cls.tc.td['DL_DIR'])
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.project.clean()
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['make'])
+ @OEHasPackage(['autoconf'])
+ def test_lzip(self):
+ self.project.download_archive()
+ self.project.run_configure()
+ self.project.run_make()
+ self.project.run_install()
+
diff --git a/meta/lib/oeqa/runtime/cases/connman.py b/meta/lib/oeqa/runtime/cases/connman.py
new file mode 100644
index 0000000000..f0d15fac9b
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/connman.py
@@ -0,0 +1,31 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class ConnmanTest(OERuntimeTestCase):
+
+ def service_status(self, service):
+ if 'systemd' in self.tc.td['DISTRO_FEATURES']:
+ (_, output) = self.target.run('systemctl status -l %s' % service)
+ return output
+ else:
+ return "Unable to get status or logs for %s" % service
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(["connman"])
+ def test_connmand_help(self):
+ (status, output) = self.target.run('/usr/sbin/connmand --help')
+ msg = 'Failed to get connman help. Output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['connman.ConnmanTest.test_connmand_help'])
+ def test_connmand_running(self):
+ cmd = '%s | grep [c]onnmand' % self.tc.target_cmds['ps']
+ (status, output) = self.target.run(cmd)
+ if status != 0:
+ self.logger.info(self.service_status("connman"))
+ self.fail("No connmand process running")
diff --git a/meta/lib/oeqa/runtime/cases/date.py b/meta/lib/oeqa/runtime/cases/date.py
new file mode 100644
index 0000000000..7750a7293f
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/date.py
@@ -0,0 +1,42 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import re
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class DateTest(OERuntimeTestCase):
+
+ def setUp(self):
+ if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
+ self.logger.debug('Stopping systemd-timesyncd daemon')
+ self.target.run('systemctl stop systemd-timesyncd')
+
+ def tearDown(self):
+ if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
+ self.logger.debug('Starting systemd-timesyncd daemon')
+ self.target.run('systemctl start systemd-timesyncd')
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['coreutils', 'busybox'])
+ def test_date(self):
+ (status, output) = self.target.run('date +"%Y-%m-%d %T"')
+ msg = 'Failed to get initial date, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+ oldDate = output
+
+ sampleDate = '"2016-08-09 10:00:00"'
+ (status, output) = self.target.run("date -s %s" % sampleDate)
+ self.assertEqual(status, 0, msg='Date set failed, output: %s' % output)
+
+ (status, output) = self.target.run("date -R")
+ p = re.match('Tue, 09 Aug 2016 10:00:.. \+0000', output)
+ msg = 'The date was not set correctly, output: %s' % output
+ self.assertTrue(p, msg=msg)
+
+ (status, output) = self.target.run('date -s "%s"' % oldDate)
+ msg = 'Failed to reset date, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/df.py b/meta/lib/oeqa/runtime/cases/df.py
new file mode 100644
index 0000000000..89fd0fb901
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/df.py
@@ -0,0 +1,17 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class DfTest(OERuntimeTestCase):
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['coreutils', 'busybox'])
+ def test_df(self):
+ cmd = "df -P / | sed -n '2p' | awk '{print $4}'"
+ (status,output) = self.target.run(cmd)
+ msg = 'Not enough space on image. Current size is %s' % output
+ self.assertTrue(int(output)>5120, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
new file mode 100644
index 0000000000..f40c63026e
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -0,0 +1,191 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+import subprocess
+from oeqa.utils.httpserver import HTTPService
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfInDataVar, skipIfNotInDataVar
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class DnfTest(OERuntimeTestCase):
+
+ def dnf(self, command, expected = 0):
+ command = 'dnf %s' % command
+ status, output = self.target.run(command, 1500)
+ message = os.linesep.join([command, output])
+ self.assertEqual(status, expected, message)
+ return output
+
+class DnfBasicTest(DnfTest):
+
+ @skipIfNotFeature('package-management',
+ 'Test requires package-management to be in IMAGE_FEATURES')
+ @skipIfNotDataVar('IMAGE_PKGTYPE', 'rpm',
+ 'RPM is not the primary package manager')
+ @OEHasPackage(['dnf'])
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_dnf_help(self):
+ self.dnf('--help')
+
+ @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+ def test_dnf_version(self):
+ self.dnf('--version')
+
+ @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+ def test_dnf_info(self):
+ self.dnf('info dnf')
+
+ @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+ def test_dnf_search(self):
+ self.dnf('search dnf')
+
+ @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+ def test_dnf_history(self):
+ self.dnf('history')
+
+class DnfRepoTest(DnfTest):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-testimage-repo'),
+ '0.0.0.0', port=cls.tc.target.server_port,
+ logger=cls.tc.logger)
+ cls.repo_server.start()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.repo_server.stop()
+
+ def dnf_with_repo(self, command):
+ pkgarchs = os.listdir(os.path.join(self.tc.td['WORKDIR'], 'oe-testimage-repo'))
+ deploy_url = 'http://%s:%s/' %(self.target.server_ip, self.repo_server.port)
+ cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" %(arch, deploy_url, arch) for arch in pkgarchs]
+
+ output = self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command)
+ return output
+
+ @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+ def test_dnf_makecache(self):
+ self.dnf_with_repo('makecache')
+
+
+# Does not work when repo is specified on the command line
+# @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+# def test_dnf_repolist(self):
+# self.dnf_with_repo('repolist')
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+ def test_dnf_repoinfo(self):
+ self.dnf_with_repo('repoinfo')
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+ def test_dnf_install(self):
+ output = self.dnf_with_repo('list run-postinsts-dev')
+ if 'Installed Packages' in output:
+ self.dnf_with_repo('remove -y run-postinsts-dev')
+ self.dnf_with_repo('install -y run-postinsts-dev')
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_install'])
+ def test_dnf_install_dependency(self):
+ self.dnf_with_repo('remove -y run-postinsts')
+ self.dnf_with_repo('install -y run-postinsts-dev')
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_install_dependency'])
+ def test_dnf_install_from_disk(self):
+ self.dnf_with_repo('remove -y run-postinsts-dev')
+ self.dnf_with_repo('install -y --downloadonly run-postinsts-dev')
+ status, output = self.target.run('find /var/cache/dnf -name run-postinsts-dev*rpm', 1500)
+ self.assertEqual(status, 0, output)
+ self.dnf_with_repo('install -y %s' % output)
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_install_from_disk'])
+ def test_dnf_install_from_http(self):
+ output = subprocess.check_output('%s %s -name run-postinsts-dev*' % (bb.utils.which(os.getenv('PATH'), "find"),
+ os.path.join(self.tc.td['WORKDIR'], 'oe-testimage-repo')), shell=True).decode("utf-8")
+ rpm_path = output.split("/")[-2] + "/" + output.split("/")[-1]
+ url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, rpm_path)
+ self.dnf_with_repo('remove -y run-postinsts-dev')
+ self.dnf_with_repo('install -y %s' % url)
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_install'])
+ def test_dnf_reinstall(self):
+ self.dnf_with_repo('reinstall -y run-postinsts-dev')
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+ @skipIfInDataVar('DISTRO_FEATURES', 'usrmerge', 'Test run when not enable usrmerge')
+ @OEHasPackage('busybox')
+ def test_dnf_installroot(self):
+ rootpath = '/home/root/chroot/test'
+ #Copy necessary files to avoid errors with not yet installed tools on
+ #installroot directory.
+ self.target.run('mkdir -p %s/etc' % rootpath, 1500)
+ self.target.run('mkdir -p %s/bin %s/sbin %s/usr/bin %s/usr/sbin' % (rootpath, rootpath, rootpath, rootpath), 1500)
+ self.target.run('mkdir -p %s/dev' % rootpath, 1500)
+ #Handle different architectures lib dirs
+ self.target.run('mkdir -p %s/lib' % rootpath, 1500)
+ self.target.run('mkdir -p %s/libx32' % rootpath, 1500)
+ self.target.run('mkdir -p %s/lib64' % rootpath, 1500)
+ self.target.run('cp /lib/libtinfo.so.5 %s/lib' % rootpath, 1500)
+ self.target.run('cp /libx32/libtinfo.so.5 %s/libx32' % rootpath, 1500)
+ self.target.run('cp /lib64/libtinfo.so.5 %s/lib64' % rootpath, 1500)
+ self.target.run('cp -r /etc/rpm %s/etc' % rootpath, 1500)
+ self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500)
+ self.target.run('cp /bin/sh %s/bin' % rootpath, 1500)
+ self.target.run('mount -o bind /dev %s/dev/' % rootpath, 1500)
+ self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox run-postinsts' % rootpath)
+ status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath, 1500)
+ self.assertEqual(0, status, output)
+ status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 1500)
+ self.assertEqual(0, status, output)
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+ @skipIfNotInDataVar('DISTRO_FEATURES', 'usrmerge', 'Test run when enable usrmege')
+ @OEHasPackage('busybox')
+ def test_dnf_installroot_usrmerge(self):
+ rootpath = '/home/root/chroot/test'
+ #Copy necessary files to avoid errors with not yet installed tools on
+ #installroot directory.
+ self.target.run('mkdir -p %s/etc' % rootpath, 1500)
+ self.target.run('mkdir -p %s/usr/bin %s/usr/sbin' % (rootpath, rootpath), 1500)
+ self.target.run('ln -sf -r %s/usr/bin %s/bin' % (rootpath, rootpath), 1500)
+ self.target.run('ln -sf -r %s/usr/sbin %s/sbin' % (rootpath, rootpath), 1500)
+ self.target.run('mkdir -p %s/dev' % rootpath, 1500)
+ #Handle different architectures lib dirs
+ self.target.run('mkdir -p %s/usr/lib' % rootpath, 1500)
+ self.target.run('mkdir -p %s/usr/libx32' % rootpath, 1500)
+ self.target.run('mkdir -p %s/usr/lib64' % rootpath, 1500)
+ self.target.run('cp /lib/libtinfo.so.5 %s/usr/lib' % rootpath, 1500)
+ self.target.run('cp /libx32/libtinfo.so.5 %s/usr/libx32' % rootpath, 1500)
+ self.target.run('cp /lib64/libtinfo.so.5 %s/usr/lib64' % rootpath, 1500)
+ self.target.run('ln -sf -r %s/lib %s/usr/lib' % (rootpath,rootpath), 1500)
+ self.target.run('ln -sf -r %s/libx32 %s/usr/libx32' % (rootpath,rootpath), 1500)
+ self.target.run('ln -sf -r %s/lib64 %s/usr/lib64' % (rootpath,rootpath), 1500)
+ self.target.run('cp -r /etc/rpm %s/etc' % rootpath, 1500)
+ self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500)
+ self.target.run('cp /bin/sh %s/bin' % rootpath, 1500)
+ self.target.run('mount -o bind /dev %s/dev/' % rootpath, 1500)
+ self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox run-postinsts' % rootpath)
+ status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath, 1500)
+ self.assertEqual(0, status, output)
+ status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 1500)
+ self.assertEqual(0, status, output)
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+ def test_dnf_exclude(self):
+ excludepkg = 'curl-dev'
+ self.dnf_with_repo('install -y curl*')
+ self.dnf('list %s' % excludepkg, 0)
+ #Avoid remove dependencies to skip some errors on different archs and images
+ self.dnf_with_repo('remove --setopt=clean_requirements_on_remove=0 -y curl*')
+ #check curl-dev is not installed adter removing all curl occurrences
+ status, output = self.target.run('dnf list --installed | grep %s'% excludepkg, 1500)
+ self.assertEqual(1, status, "%s was not removed, is listed as installed"%excludepkg)
+ self.dnf_with_repo('install -y --exclude=%s --exclude=curl-staticdev curl*' % excludepkg)
+ #check curl-dev is not installed after being excluded
+ status, output = self.target.run('dnf list --installed | grep %s'% excludepkg , 1500)
+ self.assertEqual(1, status, "%s was not excluded, is listed as installed"%excludepkg)
diff --git a/meta/lib/oeqa/runtime/cases/gcc.py b/meta/lib/oeqa/runtime/cases/gcc.py
new file mode 100644
index 0000000000..1b6e431bf4
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/gcc.py
@@ -0,0 +1,69 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class GccCompileTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUp(cls):
+ dst = '/tmp/'
+ src = os.path.join(cls.tc.files_dir, 'test.c')
+ cls.tc.target.copyTo(src, dst)
+
+ src = os.path.join(cls.tc.runtime_files_dir, 'testmakefile')
+ cls.tc.target.copyTo(src, dst)
+
+ src = os.path.join(cls.tc.files_dir, 'test.cpp')
+ cls.tc.target.copyTo(src, dst)
+
+ @classmethod
+ def tearDown(cls):
+ files = '/tmp/test.c /tmp/test.o /tmp/test /tmp/testmakefile'
+ cls.tc.target.run('rm %s' % files)
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ def test_gcc_compile(self):
+ status, output = self.target.run('gcc /tmp/test.c -o /tmp/test -lm')
+ msg = 'gcc compile failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ status, output = self.target.run('/tmp/test')
+ msg = 'running compiled file failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['g++'])
+ def test_gpp_compile(self):
+ status, output = self.target.run('g++ /tmp/test.c -o /tmp/test -lm')
+ msg = 'g++ compile failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ status, output = self.target.run('/tmp/test')
+ msg = 'running compiled file failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['g++'])
+ def test_gpp2_compile(self):
+ status, output = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm')
+ msg = 'g++ compile failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ status, output = self.target.run('/tmp/test')
+ msg = 'running compiled file failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['make'])
+ def test_make(self):
+ status, output = self.target.run('cd /tmp; make -f testmakefile')
+ msg = 'running make failed, output %s' % output
+ self.assertEqual(status, 0, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/gi.py b/meta/lib/oeqa/runtime/cases/gi.py
new file mode 100644
index 0000000000..42bd100a31
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/gi.py
@@ -0,0 +1,19 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class GObjectIntrospectionTest(OERuntimeTestCase):
+
+ @OETestDepends(["ssh.SSHTest.test_ssh"])
+ @OEHasPackage(["python3-pygobject"])
+ def test_python(self):
+ script = """from gi.repository import GLib; print(GLib.markup_escape_text("<testing&testing>"))"""
+ status, output = self.target.run("python3 -c '%s'" % script)
+ self.assertEqual(status, 0, msg="Python failed (%s)" % (output))
+ self.assertEqual(output, "&lt;testing&amp;testing&gt;", msg="Unexpected output (%s)" % output)
diff --git a/meta/lib/oeqa/runtime/cases/gstreamer.py b/meta/lib/oeqa/runtime/cases/gstreamer.py
new file mode 100644
index 0000000000..f735f82e3b
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/gstreamer.py
@@ -0,0 +1,18 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class GstreamerCliTest(OERuntimeTestCase):
+
+ @OEHasPackage(['gstreamer1.0'])
+ def test_gst_inspect_can_list_all_plugins(self):
+ status, output = self.target.run('gst-inspect-1.0')
+ self.assertEqual(status, 0, 'gst-inspect-1.0 does not appear to be running.')
+
+ @OEHasPackage(['gstreamer1.0'])
+ def test_gst_launch_can_create_video_pipeline(self):
+ status, output = self.target.run('gst-launch-1.0 -v fakesrc silent=false num-buffers=3 ! fakesink silent=false')
+ self.assertEqual(status, 0, 'gst-launch-1.0 does not appear to be running.')
diff --git a/meta/lib/oeqa/runtime/cases/kernelmodule.py b/meta/lib/oeqa/runtime/cases/kernelmodule.py
new file mode 100644
index 0000000000..47fd2f850c
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/kernelmodule.py
@@ -0,0 +1,46 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class KernelModuleTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUp(cls):
+ src = os.path.join(cls.tc.runtime_files_dir, 'hellomod.c')
+ dst = '/tmp/hellomod.c'
+ cls.tc.target.copyTo(src, dst)
+
+ src = os.path.join(cls.tc.runtime_files_dir, 'hellomod_makefile')
+ dst = '/tmp/Makefile'
+ cls.tc.target.copyTo(src, dst)
+
+ @classmethod
+ def tearDown(cls):
+ files = '/tmp/Makefile /tmp/hellomod.c'
+ cls.tc.target.run('rm %s' % files)
+
+ @skipIfNotFeature('tools-sdk',
+ 'Test requires tools-sdk to be in IMAGE_FEATURES')
+ @OETestDepends(['gcc.GccCompileTest.test_gcc_compile'])
+ @OEHasPackage(['kernel-devsrc'])
+ @OEHasPackage(['make'])
+ @OEHasPackage(['gcc'])
+ def test_kernel_module(self):
+ cmds = [
+ 'cd /usr/src/kernel && make scripts prepare',
+ 'cd /tmp && make',
+ 'cd /tmp && insmod hellomod.ko',
+ 'lsmod | grep hellomod',
+ 'dmesg | grep Hello',
+ 'rmmod hellomod', 'dmesg | grep "Cleaning up hellomod"'
+ ]
+ for cmd in cmds:
+ status, output = self.target.run(cmd, 900)
+ self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
diff --git a/meta/lib/oeqa/runtime/cases/ksample.py b/meta/lib/oeqa/runtime/cases/ksample.py
new file mode 100644
index 0000000000..a9a1620ebd
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ksample.py
@@ -0,0 +1,231 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import time
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotFeature
+
+# need some kernel fragments
+# echo "KERNEL_FEATURES_append += \" features\/kernel\-sample\/kernel\-sample.scc\"" >> local.conf
+class KSample(OERuntimeTestCase):
+ def cmd_and_check(self, cmd='', match_string=''):
+ status, output = self.target.run(cmd)
+ if not match_string:
+ # send cmd
+ msg = '%s failed, %s' % (cmd, output)
+ self.assertEqual(status, 0, msg=msg)
+ else:
+ # check result
+ result = ("%s" % match_string) in output
+ msg = output
+ self.assertTrue(result, msg)
+ self.assertEqual(status, 0, cmd)
+
+ def check_arch(self, archset=''):
+ status, output = self.target.run("uname -m")
+ result = ("%s" % output) in archset
+ if not result:
+ self.skipTest("This case doesn't support %s" % output)
+
+ def check_config(self, config_opt=''):
+ cmd = "zcat /proc/config.gz | grep %s" % config_opt
+ status, output = self.target.run(cmd)
+ result = ("%s=y" % config_opt) in output
+ if not result:
+ self.skipTest("%s is not set" % config_opt)
+
+ def check_module_exist(self, path='', module_name=''):
+ status, output = self.target.run("uname -r")
+ cmd = "ls " + "/lib/modules/" + output + "/kernel/samples/" + path + module_name
+ status, output = self.target.run(cmd)
+ if status != 0:
+ error_info = module_name + " doesn't exist"
+ self.skipTest(error_info)
+
+ def kfifo_func(self, name=''):
+ module_prename = name + "-example"
+ module_name = name + "-example.ko"
+ sysmbol_name = name + "_example"
+
+ # make sure if module exists
+ self.check_module_exist("kfifo/", module_name)
+ # modprobe
+ self.cmd_and_check("modprobe %s" % module_prename)
+ # lsmod
+ self.cmd_and_check("lsmod | grep %s | cut -d\' \' -f1" % sysmbol_name, sysmbol_name)
+ # check result
+ self.cmd_and_check("dmesg | grep \"test passed\" ", "test passed")
+ # rmmod
+ self.cmd_and_check("rmmod %s" % module_prename)
+
+ def kprobe_func(self, name=''):
+ # check config
+ self.check_config("CONFIG_KPROBES")
+
+ module_prename = name + "_example"
+ module_name = name + "_example.ko"
+ sysmbol_name = module_prename
+
+ # make sure if module exists
+ self.check_module_exist("kprobes/", module_name)
+ # modprobe
+ self.cmd_and_check("modprobe %s" % module_prename)
+ # lsmod
+ self.cmd_and_check("lsmod | grep %s | cut -d\' \' -f1" % sysmbol_name, sysmbol_name)
+ # check result
+ self.cmd_and_check("dmesg | grep Planted | head -n10", "Planted")
+ # rmmod
+ self.cmd_and_check("rmmod %s" % module_prename)
+
+ def kobject_func(self, name=''):
+ module_prename = name + "_example"
+ module_name = name + "-example.ko"
+ sysmbol_name = module_prename
+
+ # make sure if module exists
+ self.check_module_exist("kobject/", module_name)
+ # modprobe
+ self.cmd_and_check("modprobe %s" % module_prename)
+ # lsmod
+ self.cmd_and_check("lsmod | grep %s | cut -d\' \' -f1" % sysmbol_name, sysmbol_name)
+ # check result
+ self.cmd_and_check("ls /sys/kernel/%s/" % sysmbol_name, "bar")
+ # rmmod
+ self.cmd_and_check("rmmod %s" % module_prename)
+
+class KSampleTest(KSample):
+ # kfifo
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_kfifo_test(self):
+ index = ["dma", "bytestream", "inttype", "record"]
+ for i in index:
+ self.kfifo_func(i)
+
+ # kprobe
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_kprobe_test(self):
+ self.check_arch("x86_64 i686 ppc")
+ index = ["kprobe", "kretprobe"]
+ for i in index:
+ self.kprobe_func(i)
+
+ # kobject
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_kobject_test(self):
+ index = ["kobject", "kset"]
+ for i in index:
+ self.kobject_func(i)
+
+ #trace
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_trace_events(self):
+ # check config
+ self.check_config("CONFIG_TRACING_SUPPORT")
+ # make sure if module exists
+ self.check_module_exist("trace_events/", "trace-events-sample.ko")
+ # modprobe
+ self.cmd_and_check("modprobe trace-events-sample")
+ # lsmod
+ self.cmd_and_check("lsmod | grep trace_events_sample | cut -d\' \' -f1", "trace_events_sample")
+ # check dir
+ self.cmd_and_check("ls /sys/kernel/debug/tracing/events/ | grep sample-trace", "sample-trace")
+ # enable trace
+ self.cmd_and_check("echo 1 > /sys/kernel/debug/tracing/events/sample-trace/enable")
+ self.cmd_and_check("cat /sys/kernel/debug/tracing/events/sample-trace/enable")
+ # check result
+ status = 1
+ count = 0
+ while status != 0:
+ time.sleep(1)
+ status, output = self.target.run('cat /sys/kernel/debug/tracing/trace | grep hello | head -n1 | cut -d\':\' -f2')
+ if " foo_bar" in output:
+ break
+ count = count + 1
+ if count > 5:
+ self.assertTrue(False, "Time out when check result")
+ # disable trace
+ self.cmd_and_check("echo 0 > /sys/kernel/debug/tracing/events/sample-trace/enable")
+ # clean up trace
+ self.cmd_and_check("echo > /sys/kernel/debug/tracing/trace")
+ # rmmod
+ self.cmd_and_check("rmmod trace-events-sample")
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_trace_printk(self):
+ # check config
+ self.check_config("CONFIG_TRACING_SUPPORT")
+ # make sure if module exists
+ self.check_module_exist("trace_printk/", "trace-printk.ko")
+ # modprobe
+ self.cmd_and_check("modprobe trace-printk")
+ # lsmod
+ self.cmd_and_check("lsmod | grep trace_printk | cut -d\' \' -f1", "trace_printk")
+ # check result
+ self.cmd_and_check("cat /sys/kernel/debug/tracing/trace | grep trace_printk_irq_work | head -n1 | cut -d\':\' -f2", " trace_printk_irq_work")
+ # clean up trace
+ self.cmd_and_check("echo > /sys/kernel/debug/tracing/trace")
+ # rmmod
+ self.cmd_and_check("rmmod trace-printk")
+
+ # hw breakpoint
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_hw_breakpoint_example(self):
+ # check arch
+ status, output = self.target.run("uname -m")
+ result = ("x86_64" in output) or ("aarch64" in output)
+ if not result:
+ self.skipTest("the arch %s doesn't support hw breakpoint" % output)
+ # check config
+ self.check_config("CONFIG_KALLSYMS_ALL")
+ # make sure if module exists
+ self.check_module_exist("hw_breakpoint/", "data_breakpoint.ko")
+ # modprobe
+ self.cmd_and_check("modprobe data_breakpoint")
+ # lsmod
+ self.cmd_and_check("lsmod | grep data_breakpoint | cut -d\' \' -f1", "data_breakpoint")
+ # check result
+ self.cmd_and_check("cat /var/log/messages | grep sample_hbp_handler", "sample_hbp_handler")
+ # rmmod
+ self.cmd_and_check("rmmod data_breakpoint")
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_configfs_sample(self):
+ # check config
+ status, ret = self.target.run('zcat /proc/config.gz | grep CONFIG_CONFIGFS_FS')
+ if not ["CONFIG_CONFIGFS_FS=m" in ret or "CONFIG_CONFIGFS_FS=y" in ret]:
+ self.skipTest("CONFIG error")
+ # make sure if module exists
+ self.check_module_exist("configfs/", "configfs_sample.ko")
+ # modprobe
+ self.cmd_and_check("modprobe configfs_sample")
+ # lsmod
+ self.cmd_and_check("lsmod | grep configfs_sample | cut -d\' \' -f1 | head -n1", "configfs_sample")
+
+ status = 1
+ count = 0
+ while status != 0:
+ time.sleep(1)
+ status, ret = self.target.run('cat /sys/kernel/config/01-childless/description')
+ count = count + 1
+ if count > 200:
+ self.skipTest("Time out for check dir")
+
+ # rmmod
+ self.cmd_and_check("rmmod configfs_sample")
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_cn_test(self):
+ # make sure if module exists
+ self.check_module_exist("connector/", "cn_test.ko")
+ # modprobe
+ self.cmd_and_check("modprobe cn_test")
+ # lsmod
+ self.cmd_and_check("lsmod | grep cn_test | cut -d\' \' -f1", "cn_test")
+ # check result
+ self.cmd_and_check("cat /proc/net/connector | grep cn_test | head -n1 | cut -d\' \' -f1", "cn_test")
+ # rmmod
+ self.cmd_and_check("rmmod cn_test")
diff --git a/meta/lib/oeqa/runtime/cases/ldd.py b/meta/lib/oeqa/runtime/cases/ldd.py
new file mode 100644
index 0000000000..9c2caa8f65
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ldd.py
@@ -0,0 +1,26 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class LddTest(OERuntimeTestCase):
+
+ @OEHasPackage(["ldd"])
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_ldd(self):
+ status, output = self.target.run('which ldd')
+ msg = 'ldd does not exist in PATH: which ldd: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ cmd = ('for i in $(which ldd | xargs cat | grep "^RTLDLIST"| '
+ 'cut -d\'=\' -f2|tr -d \'"\'); '
+ 'do test -f $i && echo $i && break; done')
+ status, output = self.target.run(cmd)
+ self.assertEqual(status, 0, msg="ldd path not correct or RTLDLIST files don't exist.")
+
+ status, output = self.target.run("ldd /bin/true")
+ self.assertEqual(status, 0, msg="ldd failed to execute: %s" % output)
diff --git a/meta/lib/oeqa/runtime/cases/logrotate.py b/meta/lib/oeqa/runtime/cases/logrotate.py
new file mode 100644
index 0000000000..bfa57c534a
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/logrotate.py
@@ -0,0 +1,49 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=289 testcase
+# Note that the image under test must have logrotate installed
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class LogrotateTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.tc.target.run('cp /etc/logrotate.d/wtmp $HOME/wtmp.oeqabak')
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.tc.target.run('mv -f $HOME/wtmp.oeqabak /etc/logrotate.d/wtmp && rm -rf $HOME/logrotate_dir')
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['logrotate'])
+ def test_1_logrotate_setup(self):
+ status, output = self.target.run('mkdir $HOME/logrotate_dir')
+ msg = 'Could not create logrotate_dir. Output: %s' % output
+ self.assertEqual(status, 0, msg = msg)
+
+ cmd = ('sed -i "s#wtmp {#wtmp {\\n olddir $HOME/logrotate_dir#"'
+ ' /etc/logrotate.d/wtmp')
+ status, output = self.target.run(cmd)
+ msg = ('Could not write to logrotate.d/wtmp file. Status and output: '
+ ' %s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
+
+ @OETestDepends(['logrotate.LogrotateTest.test_1_logrotate_setup'])
+ def test_2_logrotate(self):
+ status, output = self.target.run('echo "create \n include /etc/logrotate.d" > /tmp/logrotate-test.conf')
+ status, output = self.target.run('logrotate -f /tmp/logrotate-test.conf')
+
+ msg = ('logrotate service could not be reloaded. Status and output: '
+ '%s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
+
+ _, output = self.target.run('ls -la $HOME/logrotate_dir/ | wc -l')
+ msg = ('new logfile could not be created. List of files within log '
+ 'directory: %s' % (
+ self.target.run('ls -la $HOME/logrotate_dir')[1]))
+ self.assertTrue(int(output)>=3, msg = msg)
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py
new file mode 100644
index 0000000000..30548640bc
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ltp.py
@@ -0,0 +1,118 @@
+# LTP runtime
+#
+# Copyright (c) 2019 MontaVista Software, LLC
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import time
+import datetime
+import pprint
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+from oeqa.utils.logparser import LtpParser
+
+class LtpTestBase(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.ltp_startup()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.ltp_finishup()
+
+ @classmethod
+ def ltp_startup(cls):
+ cls.sections = {}
+ cls.failmsg = ""
+ test_log_dir = os.path.join(cls.td.get('WORKDIR', ''), 'testimage')
+ timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
+
+ cls.ltptest_log_dir_link = os.path.join(test_log_dir, 'ltp_log')
+ cls.ltptest_log_dir = '%s.%s' % (cls.ltptest_log_dir_link, timestamp)
+ os.makedirs(cls.ltptest_log_dir)
+
+ cls.tc.target.run("mkdir -p /opt/ltp/results")
+
+ if not hasattr(cls.tc, "extraresults"):
+ cls.tc.extraresults = {}
+ cls.extras = cls.tc.extraresults
+ cls.extras['ltpresult.rawlogs'] = {'log': ""}
+
+
+ @classmethod
+ def ltp_finishup(cls):
+ cls.extras['ltpresult.sections'] = cls.sections
+
+ # update symlink to ltp_log
+ if os.path.exists(cls.ltptest_log_dir_link):
+ os.remove(cls.ltptest_log_dir_link)
+ os.symlink(os.path.basename(cls.ltptest_log_dir), cls.ltptest_log_dir_link)
+
+ if cls.failmsg:
+ cls.fail(cls.failmsg)
+
+class LtpTest(LtpTestBase):
+
+ ltp_groups = ["math", "syscalls", "dio", "io", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "filecaps", "cap_bounds", "fcntl-locktests", "connectors","timers", "commands", "net.ipv6_lib", "input","fs_perms_simple"]
+
+ ltp_fs = ["fs", "fsx", "fs_bind", "fs_ext4"]
+ # skip kernel cpuhotplug
+ ltp_kernel = ["power_management_tests", "hyperthreading ", "kernel_misc", "hugetlb"]
+ ltp_groups += ltp_fs
+
+ def runltp(self, ltp_group):
+ cmd = '/opt/ltp/runltp -f %s -p -q -r /opt/ltp -l /opt/ltp/results/%s -I 1 -d /opt/ltp' % (ltp_group, ltp_group)
+ starttime = time.time()
+ (status, output) = self.target.run(cmd)
+ endtime = time.time()
+
+ with open(os.path.join(self.ltptest_log_dir, "%s-raw.log" % ltp_group), 'w') as f:
+ f.write(output)
+
+ self.extras['ltpresult.rawlogs']['log'] = self.extras['ltpresult.rawlogs']['log'] + output
+
+ # copy nice log from DUT
+ dst = os.path.join(self.ltptest_log_dir, "%s" % ltp_group )
+ remote_src = "/opt/ltp/results/%s" % ltp_group
+ (status, output) = self.target.copyFrom(remote_src, dst)
+ msg = 'File could not be copied. Output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ parser = LtpParser()
+ results, sections = parser.parse(dst)
+
+ runtime = int(endtime-starttime)
+ sections['duration'] = runtime
+ self.sections[ltp_group] = sections
+
+ failed_tests = {}
+ for test in results:
+ result = results[test]
+ testname = ("ltpresult." + ltp_group + "." + test)
+ self.extras[testname] = {'status': result}
+ if result == 'FAILED':
+ failed_tests[ltp_group] = test
+
+ if failed_tests:
+ self.failmsg = self.failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
+
+ # LTP runtime tests
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(["ltp"])
+ def test_ltp_help(self):
+ (status, output) = self.target.run('/opt/ltp/runltp --help')
+ msg = 'Failed to get ltp help. Output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['ltp.LtpTest.test_ltp_help'])
+ def test_ltp_groups(self):
+ for ltp_group in self.ltp_groups:
+ self.runltp(ltp_group)
+
+ @OETestDepends(['ltp.LtpTest.test_ltp_groups'])
+ def test_ltp_runltp_cve(self):
+ self.runltp("cve")
diff --git a/meta/lib/oeqa/runtime/cases/ltp_compliance.py b/meta/lib/oeqa/runtime/cases/ltp_compliance.py
new file mode 100644
index 0000000000..ba47c78fd4
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ltp_compliance.py
@@ -0,0 +1,97 @@
+# LTP compliance runtime
+#
+# Copyright (c) 2019 MontaVista Software, LLC
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import time
+import datetime
+import pprint
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+from oeqa.utils.logparser import LtpComplianceParser
+
+class LtpPosixBase(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.ltp_startup()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.ltp_finishup()
+
+ @classmethod
+ def ltp_startup(cls):
+ cls.sections = {}
+ cls.failmsg = ""
+ test_log_dir = os.path.join(cls.td.get('WORKDIR', ''), 'testimage')
+ timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
+
+ cls.ltptest_log_dir_link = os.path.join(test_log_dir, 'ltpcomp_log')
+ cls.ltptest_log_dir = '%s.%s' % (cls.ltptest_log_dir_link, timestamp)
+ os.makedirs(cls.ltptest_log_dir)
+
+ cls.tc.target.run("mkdir -p /opt/ltp/results")
+
+ if not hasattr(cls.tc, "extraresults"):
+ cls.tc.extraresults = {}
+ cls.extras = cls.tc.extraresults
+ cls.extras['ltpposixresult.rawlogs'] = {'log': ""}
+
+
+ @classmethod
+ def ltp_finishup(cls):
+ cls.extras['ltpposixresult.sections'] = cls.sections
+
+ # update symlink to ltp_log
+ if os.path.exists(cls.ltptest_log_dir_link):
+ os.remove(cls.ltptest_log_dir_link)
+
+ os.symlink(os.path.basename(cls.ltptest_log_dir), cls.ltptest_log_dir_link)
+
+ if cls.failmsg:
+ cls.fail(cls.failmsg)
+
+class LtpPosixTest(LtpPosixBase):
+ posix_groups = ["AIO", "MEM", "MSG", "SEM", "SIG", "THR", "TMR", "TPS"]
+
+ def runltp(self, posix_group):
+ cmd = "/opt/ltp/bin/run-posix-option-group-test.sh %s 2>@1 | tee /opt/ltp/results/%s" % (posix_group, posix_group)
+ starttime = time.time()
+ (status, output) = self.target.run(cmd)
+ endtime = time.time()
+
+ with open(os.path.join(self.ltptest_log_dir, "%s" % posix_group), 'w') as f:
+ f.write(output)
+
+ self.extras['ltpposixresult.rawlogs']['log'] = self.extras['ltpposixresult.rawlogs']['log'] + output
+
+ parser = LtpComplianceParser()
+ results, sections = parser.parse(os.path.join(self.ltptest_log_dir, "%s" % posix_group))
+
+ runtime = int(endtime-starttime)
+ sections['duration'] = runtime
+ self.sections[posix_group] = sections
+
+ failed_tests = {}
+ for test in results:
+ result = results[test]
+ testname = ("ltpposixresult." + posix_group + "." + test)
+ self.extras[testname] = {'status': result}
+ if result == 'FAILED':
+ failed_tests[posix_group] = test
+
+ if failed_tests:
+ self.failmsg = self.failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
+
+ # LTP Posix compliance runtime tests
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(["ltp"])
+ def test_posix_groups(self):
+ for posix_group in self.posix_groups:
+ self.runltp(posix_group)
diff --git a/meta/lib/oeqa/runtime/cases/ltp_stress.py b/meta/lib/oeqa/runtime/cases/ltp_stress.py
new file mode 100644
index 0000000000..2445ffbc93
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ltp_stress.py
@@ -0,0 +1,98 @@
+# LTP Stress runtime
+#
+# Copyright (c) 2019 MontaVista Software, LLC
+#
+# SPDX-License-Identifier: MIT
+#
+
+import time
+import datetime
+import pprint
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+from oeqa.core.decorator.data import skipIfQemu
+from oeqa.utils.logparser import LtpParser
+
+class LtpStressBase(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.ltp_startup()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.ltp_finishup()
+
+ @classmethod
+ def ltp_startup(cls):
+ cls.sections = {}
+ cls.failmsg = ""
+ test_log_dir = os.path.join(cls.td.get('WORKDIR', ''), 'testimage')
+ timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
+
+ cls.ltptest_log_dir_link = os.path.join(test_log_dir, 'ltpstress_log')
+ cls.ltptest_log_dir = '%s.%s' % (cls.ltptest_log_dir_link, timestamp)
+ os.makedirs(cls.ltptest_log_dir)
+
+ cls.tc.target.run("mkdir -p /opt/ltp/results")
+
+ if not hasattr(cls.tc, "extraresults"):
+ cls.tc.extraresults = {}
+ cls.extras = cls.tc.extraresults
+ cls.extras['ltpstressresult.rawlogs'] = {'log': ""}
+
+
+ @classmethod
+ def ltp_finishup(cls):
+ cls.extras['ltpstressresult.sections'] = cls.sections
+
+ # update symlink to ltp_log
+ if os.path.exists(cls.ltptest_log_dir_link):
+ os.remove(cls.ltptest_log_dir_link)
+
+ os.symlink(os.path.basename(cls.ltptest_log_dir), cls.ltptest_log_dir_link)
+
+ if cls.failmsg:
+ cls.fail(cls.failmsg)
+
+class LtpStressTest(LtpStressBase):
+
+ def runltp(self, stress_group):
+ cmd = '/opt/ltp/runltp -f %s -p -q 2>@1 | tee /opt/ltp/results/%s' % (stress_group, stress_group)
+ starttime = time.time()
+ (status, output) = self.target.run(cmd)
+ endtime = time.time()
+ with open(os.path.join(self.ltptest_log_dir, "%s" % stress_group), 'w') as f:
+ f.write(output)
+
+ self.extras['ltpstressresult.rawlogs']['log'] = self.extras['ltpstressresult.rawlogs']['log'] + output
+
+ parser = LtpParser()
+ results, sections = parser.parse(os.path.join(self.ltptest_log_dir, "%s" % stress_group))
+
+ runtime = int(endtime-starttime)
+ sections['duration'] = runtime
+ self.sections[stress_group] = sections
+
+ failed_tests = {}
+ for test in results:
+ result = results[test]
+ testname = ("ltpstressresult." + stress_group + "." + test)
+ self.extras[testname] = {'status': result}
+ if result == 'FAILED':
+ failed_tests[stress_group] = test
+
+ if failed_tests:
+ self.failmsg = self.failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
+
+ # LTP stress runtime tests
+ #
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(["ltp"])
+ def test_ltp_stress(self):
+ self.tc.target.run("sed -i -r 's/^fork12.*//' /opt/ltp/runtest/crashme")
+ self.runltp('crashme')
diff --git a/meta/lib/oeqa/runtime/cases/multilib.py b/meta/lib/oeqa/runtime/cases/multilib.py
new file mode 100644
index 0000000000..62e662b01c
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/multilib.py
@@ -0,0 +1,44 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotInDataVar
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class MultilibTest(OERuntimeTestCase):
+
+ def archtest(self, binary, arch):
+ """
+ Check that ``binary`` has the ELF class ``arch`` (e.g. ELF32/ELF64).
+ """
+
+ status, output = self.target.run('readelf -h %s' % binary)
+ self.assertEqual(status, 0, 'Failed to readelf %s' % binary)
+
+ l = [l.split()[1] for l in output.split('\n') if "Class:" in l]
+ if l:
+ theclass = l[0]
+ else:
+ self.fail('Cannot parse readelf. Output:\n%s' % output)
+
+ msg = "%s isn't %s (is %s)" % (binary, arch, theclass)
+ self.assertEqual(theclass, arch, msg=msg)
+
+ @skipIfNotInDataVar('MULTILIBS', 'multilib:lib32',
+ "This isn't a multilib:lib32 image")
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['binutils'])
+ @OEHasPackage(['lib32-libc6'])
+ def test_check_multilib_libc(self):
+ """
+ Check that a multilib image has both 32-bit and 64-bit libc in.
+ """
+ self.archtest("/lib/libc.so.6", "ELF32")
+ self.archtest("/lib64/libc.so.6", "ELF64")
+
+ @OETestDepends(['multilib.MultilibTest.test_check_multilib_libc'])
+ @OEHasPackage(['lib32-connman', '!connman'])
+ def test_file_connman(self):
+ self.archtest("/usr/sbin/connmand", "ELF32")
diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py b/meta/lib/oeqa/runtime/cases/oe_syslog.py
new file mode 100644
index 0000000000..f3c2bedbaf
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -0,0 +1,131 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfDataVar
+from oeqa.runtime.decorator.package import OEHasPackage
+import time
+
+class SyslogTest(OERuntimeTestCase):
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(["busybox-syslog", "sysklogd", "rsyslog", "syslog-ng"])
+ def test_syslog_running(self):
+ status, output = self.target.run(self.tc.target_cmds['ps'])
+ msg = "Failed to execute %s" % self.tc.target_cmds['ps']
+ self.assertEqual(status, 0, msg=msg)
+ msg = "No syslog daemon process; %s output:\n%s" % (self.tc.target_cmds['ps'], output)
+ hasdaemon = "syslogd" in output or "syslog-ng" in output or "svlogd" in output
+ self.assertTrue(hasdaemon, msg=msg)
+
+class SyslogTestConfig(OERuntimeTestCase):
+
+ def verif_not_running(self, pids):
+ for pid in pids:
+ status, err_output = self.target.run('kill -0 %s' %pid)
+ if not status:
+ self.logger.debug("previous %s is still running" %pid)
+ return 1
+
+ def verify_running(self, names):
+ pids = []
+ for name in names:
+ status, pid = self.target.run('pidof %s' %name)
+ if status:
+ self.logger.debug("%s is not running" %name)
+ return 1, pids
+ pids.append(pid)
+ return 0, pids
+
+
+ def restart_sanity(self, names, restart_cmd, pidchange=True):
+ status, original_pids = self.verify_running(names)
+ if status:
+ return False
+
+ status, output = self.target.run(restart_cmd)
+
+ msg = ('Could not restart %s service. Status and output: %s and %s' % (names, status, output))
+ self.assertEqual(status, 0, msg)
+
+ if not pidchange:
+ return True
+
+ # Always check for an error, most likely a race between shutting down and starting up
+ timeout = time.time() + 30
+
+ restarted = False
+ status = ""
+ while time.time() < timeout:
+ # Verify the previous ones are no longer running
+ status = self.verif_not_running(original_pids)
+ if status:
+ status = "Original syslog processes still running"
+ continue
+
+ status, pids = self.verify_running(names)
+ if status:
+ status = "New syslog processes not running"
+ continue
+
+ # Everything is fine now, so exit to continue the test
+ restarted = True
+ break
+
+ msg = ('%s didn\'t appear to restart: %s' % (names, status))
+ self.assertTrue(restarted, msg)
+
+ return True
+
+ @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
+ def test_syslog_logger(self):
+ status, output = self.target.run('logger foobar')
+ msg = "Can't log into syslog. Output: %s " % output
+ self.assertEqual(status, 0, msg=msg)
+
+ # There is no way to flush the logger to disk in all cases
+ time.sleep(1)
+
+ status, output = self.target.run('grep foobar /var/log/messages')
+ if status != 0:
+ if self.tc.td.get("VIRTUAL-RUNTIME_init_manager") == "systemd":
+ status, output = self.target.run('journalctl -o cat | grep foobar')
+ else:
+ status, output = self.target.run('logread | grep foobar')
+ msg = ('Test log string not found in /var/log/messages or logread.'
+ ' Output: %s ' % output)
+ self.assertEqual(status, 0, msg=msg)
+
+
+ @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
+ def test_syslog_restart(self):
+ if self.restart_sanity(['systemd-journald'], 'systemctl restart syslog.service', pidchange=False):
+ pass
+ elif self.restart_sanity(['rsyslogd'], '/etc/init.d/rsyslog restart'):
+ pass
+ elif self.restart_sanity(['syslogd', 'klogd'], '/etc/init.d/syslog restart'):
+ pass
+ else:
+ self.logger.info("No syslog found to restart, ignoring")
+
+
+ @OETestDepends(['oe_syslog.SyslogTestConfig.test_syslog_logger'])
+ @OEHasPackage(["busybox-syslog"])
+ @skipIfDataVar('VIRTUAL-RUNTIME_init_manager', 'systemd',
+ 'Not appropiate for systemd image')
+ def test_syslog_startup_config(self):
+ cmd = 'echo "LOGFILE=/var/log/test" >> /etc/syslog-startup.conf'
+ self.target.run(cmd)
+
+ self.test_syslog_restart()
+
+ cmd = 'logger foobar && grep foobar /var/log/test'
+ status,output = self.target.run(cmd)
+ msg = 'Test log string not found. Output: %s ' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ cmd = "sed -i 's#LOGFILE=/var/log/test##' /etc/syslog-startup.conf"
+ self.target.run(cmd)
+ self.test_syslog_restart()
diff --git a/meta/lib/oeqa/runtime/cases/opkg.py b/meta/lib/oeqa/runtime/cases/opkg.py
new file mode 100644
index 0000000000..9cfee1cd88
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/opkg.py
@@ -0,0 +1,58 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+from oeqa.utils.httpserver import HTTPService
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class OpkgTest(OERuntimeTestCase):
+
+ def pkg(self, command, expected = 0):
+ command = 'opkg %s' % command
+ status, output = self.target.run(command, 1500)
+ message = os.linesep.join([command, output])
+ self.assertEqual(status, expected, message)
+ return output
+
+class OpkgRepoTest(OpkgTest):
+
+ @classmethod
+ def setUp(cls):
+ allarchfeed = 'all'
+ if cls.tc.td["MULTILIB_VARIANTS"]:
+ allarchfeed = cls.tc.td["TUNE_PKGARCH"]
+ service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_IPK'], allarchfeed)
+ cls.repo_server = HTTPService(service_repo,
+ '0.0.0.0', port=cls.tc.target.server_port,
+ logger=cls.tc.logger)
+ cls.repo_server.start()
+
+ @classmethod
+ def tearDown(cls):
+ cls.repo_server.stop()
+
+ def setup_source_config_for_package_install(self):
+ apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port)
+ apt_get_sourceslist_dir = '/etc/opkg/'
+ self.target.run('cd %s; echo src/gz all %s >> opkg.conf' % (apt_get_sourceslist_dir, apt_get_source_server))
+
+ def cleanup_source_config_for_package_install(self):
+ apt_get_sourceslist_dir = '/etc/opkg/'
+ self.target.run('cd %s; sed -i "/^src/d" opkg.conf' % (apt_get_sourceslist_dir))
+
+ @skipIfNotFeature('package-management',
+ 'Test requires package-management to be in IMAGE_FEATURES')
+ @skipIfNotDataVar('IMAGE_PKGTYPE', 'ipk',
+ 'IPK is not the primary package manager')
+ @skipIfFeature('read-only-rootfs',
+ 'Test does not work with read-only-rootfs in IMAGE_FEATURES')
+ @OEHasPackage(['opkg'])
+ def test_opkg_install_from_repo(self):
+ self.setup_source_config_for_package_install()
+ self.pkg('update')
+ self.pkg('remove run-postinsts-dev')
+ self.pkg('install run-postinsts-dev')
+ self.cleanup_source_config_for_package_install()
diff --git a/meta/lib/oeqa/runtime/cases/pam.py b/meta/lib/oeqa/runtime/cases/pam.py
new file mode 100644
index 0000000000..271a1943e3
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/pam.py
@@ -0,0 +1,35 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=287 testcase
+# Note that the image under test must have "pam" in DISTRO_FEATURES
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotFeature
+
+class PamBasicTest(OERuntimeTestCase):
+
+ @skipIfNotFeature('pam', 'Test requires pam to be in DISTRO_FEATURES')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_pam(self):
+ status, output = self.target.run('login --help')
+ msg = ('login command does not work as expected. '
+ 'Status and output:%s and %s' % (status, output))
+ self.assertEqual(status, 1, msg = msg)
+
+ status, output = self.target.run('passwd --help')
+ msg = ('passwd command does not work as expected. '
+ 'Status and output:%s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
+
+ status, output = self.target.run('su --help')
+ msg = ('su command does not work as expected. '
+ 'Status and output:%s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
+
+ status, output = self.target.run('useradd --help')
+ msg = ('useradd command does not work as expected. '
+ 'Status and output:%s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py
new file mode 100644
index 0000000000..b7c7b30adf
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -0,0 +1,379 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from subprocess import check_output
+from shutil import rmtree
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfDataVar
+from oeqa.runtime.decorator.package import OEHasPackage
+
+#in the future these lists could be moved outside of module
+errors = ["error", "cannot", "can\'t", "failed"]
+
+common_errors = [
+ "(WW) warning, (EE) error, (NI) not implemented, (??) unknown.",
+ "dma timeout",
+ "can\'t add hid device:",
+ "usbhid: probe of ",
+ "_OSC failed (AE_ERROR)",
+ "_OSC failed (AE_SUPPORT)",
+ "AE_ALREADY_EXISTS",
+ "ACPI _OSC request failed (AE_SUPPORT)",
+ "can\'t disable ASPM",
+ "Failed to load module \"vesa\"",
+ "Failed to load module vesa",
+ "Failed to load module \"modesetting\"",
+ "Failed to load module modesetting",
+ "Failed to load module \"glx\"",
+ "Failed to load module \"fbdev\"",
+ "Failed to load module fbdev",
+ "Failed to load module glx",
+ "[drm] Cannot find any crtc or sizes - going 1024x768",
+ "_OSC failed (AE_NOT_FOUND); disabling ASPM",
+ "Open ACPI failed (/var/run/acpid.socket) (No such file or directory)",
+ "NX (Execute Disable) protection cannot be enabled: non-PAE kernel!",
+ "hd.: possibly failed opcode",
+ 'NETLINK INITIALIZATION FAILED',
+ 'kernel: Cannot find map file',
+ 'omap_hwmod: debugss: _wait_target_disable failed',
+ 'VGA arbiter: cannot open kernel arbiter, no multi-card support',
+ 'Failed to find URL:http://ipv4.connman.net/online/status.html',
+ 'Online check failed for',
+ 'netlink init failed',
+ 'Fast TSC calibration',
+ "BAR 0-9",
+ "Failed to load module \"ati\"",
+ "controller can't do DEVSLP, turning off",
+ "stmmac_dvr_probe: warning: cannot get CSR clock",
+ "error: couldn\'t mount because of unsupported optional features",
+ "GPT: Use GNU Parted to correct GPT errors",
+ "Cannot set xattr user.Librepo.DownloadInProgress",
+ "Failed to read /var/lib/nfs/statd/state: Success",
+ "error retry time-out =",
+ "logind: cannot setup systemd-logind helper (-61), using legacy fallback",
+ "Error changing net interface name 'eth0' to ",
+ "Cannot find a map file"
+ ]
+
+video_related = [
+ "uvesafb",
+]
+
+x86_common = [
+ '[drm:psb_do_init] *ERROR* Debug is',
+ 'wrong ELF class',
+ 'Could not enable PowerButton event',
+ 'probe of LNXPWRBN:00 failed with error -22',
+ 'pmd_set_huge: Cannot satisfy',
+ 'failed to setup card detect gpio',
+ 'amd_nb: Cannot enumerate AMD northbridges',
+ 'failed to retrieve link info, disabling eDP',
+ 'Direct firmware load for iwlwifi',
+ 'Direct firmware load for regulatory.db',
+ 'failed to load regulatory.db',
+] + common_errors
+
+qemux86_common = [
+ 'wrong ELF class',
+ "fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.",
+ "can't claim BAR ",
+ 'amd_nb: Cannot enumerate AMD northbridges',
+ 'uvesafb: 5000 ms task timeout, infinitely waiting',
+ 'tsc: HPET/PMTIMER calibration failed',
+ "modeset(0): Failed to initialize the DRI2 extension",
+ "uvesafb: cannot reserve video memory at",
+ "uvesafb: probe of uvesafb.0 failed with error",
+ "glamor initialization failed",
+] + common_errors
+
+ignore_errors = {
+ 'default' : common_errors,
+ 'qemux86' : [
+ 'Failed to access perfctr msr (MSR',
+ 'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
+ ] + qemux86_common,
+ 'qemux86-64' : qemux86_common,
+ 'qemumips' : [
+ 'Failed to load module "glx"',
+ 'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
+ 'cacheinfo: Failed to find cpu0 device node',
+ ] + common_errors,
+ 'qemumips64' : [
+ 'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
+ 'cacheinfo: Failed to find cpu0 device node',
+ ] + common_errors,
+ 'qemuppc' : [
+ 'PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]',
+ 'host side 80-wire cable detection failed, limiting max speed',
+ 'mode "640x480" test failed',
+ 'Failed to load module "glx"',
+ 'can\'t handle BAR above 4GB',
+ 'Cannot reserve Legacy IO',
+ ] + common_errors,
+ 'qemuarm' : [
+ 'mmci-pl18x: probe of fpga:05 failed with error -22',
+ 'mmci-pl18x: probe of fpga:0b failed with error -22',
+ 'Failed to load module "glx"',
+ 'OF: amba_device_add() failed (-19) for /amba/smc@10100000',
+ 'OF: amba_device_add() failed (-19) for /amba/mpmc@10110000',
+ 'OF: amba_device_add() failed (-19) for /amba/sctl@101e0000',
+ 'OF: amba_device_add() failed (-19) for /amba/watchdog@101e1000',
+ 'OF: amba_device_add() failed (-19) for /amba/sci@101f0000',
+ 'OF: amba_device_add() failed (-19) for /amba/spi@101f4000',
+ 'OF: amba_device_add() failed (-19) for /amba/ssp@101f4000',
+ 'OF: amba_device_add() failed (-19) for /amba/fpga/sci@a000',
+ 'Failed to initialize \'/amba/timer@101e3000\': -22',
+ 'jitterentropy: Initialization failed with host not compliant with requirements: 2',
+ ] + common_errors,
+ 'qemuarm64' : [
+ 'Fatal server error:',
+ '(EE) Server terminated with error (1). Closing log file.',
+ 'dmi: Firmware registration failed.',
+ 'irq: type mismatch, failed to map hwirq-27 for /intc',
+ ] + common_errors,
+ 'intel-core2-32' : [
+ 'ACPI: No _BQC method, cannot determine initial brightness',
+ '[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness',
+ '(EE) Failed to load module "psb"',
+ '(EE) Failed to load module psb',
+ '(EE) Failed to load module "psbdrv"',
+ '(EE) Failed to load module psbdrv',
+ '(EE) open /dev/fb0: No such file or directory',
+ '(EE) AIGLX: reverting to software rendering',
+ 'dmi: Firmware registration failed.',
+ 'ioremap error for 0x78',
+ ] + x86_common,
+ 'intel-corei7-64' : [
+ 'can\'t set Max Payload Size to 256',
+ 'intel_punit_ipc: can\'t request region for resource',
+ '[drm] parse error at position 4 in video mode \'efifb\'',
+ 'ACPI Error: Could not enable RealTimeClock event',
+ 'ACPI Warning: Could not enable fixed event - RealTimeClock',
+ 'hci_intel INT33E1:00: Unable to retrieve gpio',
+ 'hci_intel: probe of INT33E1:00 failed',
+ 'can\'t derive routing for PCI INT A',
+ 'failed to read out thermal zone',
+ 'Bluetooth: hci0: Setting Intel event mask failed',
+ 'ttyS2 - failed to request DMA',
+ 'Bluetooth: hci0: Failed to send firmware data (-38)',
+ 'atkbd serio0: Failed to enable keyboard on isa0060/serio0',
+ ] + x86_common,
+ 'genericx86' : x86_common,
+ 'genericx86-64' : [
+ 'Direct firmware load for i915',
+ 'Failed to load firmware i915',
+ 'Failed to fetch GuC',
+ 'Failed to initialize GuC',
+ 'Failed to load DMC firmware',
+ 'The driver is built-in, so to load the firmware you need to',
+ ] + x86_common,
+ 'edgerouter' : [
+ 'not creating \'/sys/firmware/fdt\'',
+ 'Failed to find cpu0 device node',
+ 'Fatal server error:',
+ 'Server terminated with error',
+ ] + common_errors,
+ 'beaglebone-yocto' : [
+ 'Direct firmware load for regulatory.db',
+ 'failed to load regulatory.db',
+ 'l4_wkup_cm',
+ 'Failed to load module "glx"',
+ 'Failed to make EGL context current',
+ 'glamor initialization failed',
+ ] + common_errors,
+ 'mpc8315e-rdb' : [
+ 'of_irq_parse_pci: failed with',
+ 'Fatal server error:',
+ 'Server terminated with error',
+ ] + common_errors,
+}
+
+log_locations = ["/var/log/","/var/log/dmesg", "/tmp/dmesg_output.log"]
+
+class ParseLogsTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.errors = errors
+
+ # When systemd is enabled we need to notice errors on
+ # circular dependencies in units.
+ if 'systemd' in cls.td.get('DISTRO_FEATURES', ''):
+ cls.errors.extend([
+ 'Found ordering cycle on',
+ 'Breaking ordering cycle by deleting job',
+ 'deleted to break ordering cycle',
+ 'Ordering cycle found, skipping',
+ ])
+
+ cls.ignore_errors = ignore_errors
+ cls.log_locations = log_locations
+ cls.msg = ''
+ is_lsb, _ = cls.tc.target.run("which LSB_Test.sh")
+ if is_lsb == 0:
+ for machine in cls.ignore_errors:
+ cls.ignore_errors[machine] = cls.ignore_errors[machine] \
+ + video_related
+
+ def getMachine(self):
+ return self.td.get('MACHINE', '')
+
+ def getWorkdir(self):
+ return self.td.get('WORKDIR', '')
+
+ # Get some information on the CPU of the machine to display at the
+ # beginning of the output. This info might be useful in some cases.
+ def getHardwareInfo(self):
+ hwi = ""
+ cmd = ('cat /proc/cpuinfo | grep "model name" | head -n1 | '
+ " awk 'BEGIN{FS=\":\"}{print $2}'")
+ _, cpu_name = self.target.run(cmd)
+
+ cmd = ('cat /proc/cpuinfo | grep "cpu cores" | head -n1 | '
+ "awk {'print $4'}")
+ _, cpu_physical_cores = self.target.run(cmd)
+
+ cmd = 'cat /proc/cpuinfo | grep "processor" | wc -l'
+ _, cpu_logical_cores = self.target.run(cmd)
+
+ _, cpu_arch = self.target.run('uname -m')
+
+ hwi += 'Machine information: \n'
+ hwi += '*******************************\n'
+ hwi += 'Machine name: ' + self.getMachine() + '\n'
+ hwi += 'CPU: ' + str(cpu_name) + '\n'
+ hwi += 'Arch: ' + str(cpu_arch)+ '\n'
+ hwi += 'Physical cores: ' + str(cpu_physical_cores) + '\n'
+ hwi += 'Logical cores: ' + str(cpu_logical_cores) + '\n'
+ hwi += '*******************************\n'
+
+ return hwi
+
+ # Go through the log locations provided and if it's a folder
+ # create a list with all the .log files in it, if it's a file
+ # just add it to that list.
+ def getLogList(self, log_locations):
+ logs = []
+ for location in log_locations:
+ status, _ = self.target.run('test -f ' + str(location))
+ if status == 0:
+ logs.append(str(location))
+ else:
+ status, _ = self.target.run('test -d ' + str(location))
+ if status == 0:
+ cmd = 'find ' + str(location) + '/*.log -maxdepth 1 -type f'
+ status, output = self.target.run(cmd)
+ if status == 0:
+ output = output.splitlines()
+ for logfile in output:
+ logs.append(os.path.join(location, str(logfile)))
+ return logs
+
+ # Copy the log files to be parsed locally
+ def transfer_logs(self, log_list):
+ workdir = self.getWorkdir()
+ self.target_logs = workdir + '/' + 'target_logs'
+ target_logs = self.target_logs
+ if os.path.exists(target_logs):
+ rmtree(self.target_logs)
+ os.makedirs(target_logs)
+ for f in log_list:
+ self.target.copyFrom(str(f), target_logs)
+
+ # Get the local list of logs
+ def get_local_log_list(self, log_locations):
+ self.transfer_logs(self.getLogList(log_locations))
+ list_dir = os.listdir(self.target_logs)
+ dir_files = [os.path.join(self.target_logs, f) for f in list_dir]
+ logs = [f for f in dir_files if os.path.isfile(f)]
+ return logs
+
+ # Build the grep command to be used with filters and exclusions
+ def build_grepcmd(self, errors, ignore_errors, log):
+ grepcmd = 'grep '
+ grepcmd += '-Ei "'
+ for error in errors:
+ grepcmd += '\<' + error + '\>' + '|'
+ grepcmd = grepcmd[:-1]
+ grepcmd += '" ' + str(log) + " | grep -Eiv \'"
+
+ try:
+ errorlist = ignore_errors[self.getMachine()]
+ except KeyError:
+ self.msg += 'No ignore list found for this machine, using default\n'
+ errorlist = ignore_errors['default']
+
+ for ignore_error in errorlist:
+ ignore_error = ignore_error.replace('(', '\(')
+ ignore_error = ignore_error.replace(')', '\)')
+ ignore_error = ignore_error.replace("'", '.')
+ ignore_error = ignore_error.replace('?', '\?')
+ ignore_error = ignore_error.replace('[', '\[')
+ ignore_error = ignore_error.replace(']', '\]')
+ ignore_error = ignore_error.replace('*', '\*')
+ ignore_error = ignore_error.replace('0-9', '[0-9]')
+ grepcmd += ignore_error + '|'
+ grepcmd = grepcmd[:-1]
+ grepcmd += "\'"
+
+ return grepcmd
+
+ # Grep only the errors so that their context could be collected.
+ # Default context is 10 lines before and after the error itself
+ def parse_logs(self, errors, ignore_errors, logs,
+ lines_before = 10, lines_after = 10):
+ results = {}
+ rez = []
+ grep_output = ''
+
+ for log in logs:
+ result = None
+ thegrep = self.build_grepcmd(errors, ignore_errors, log)
+
+ try:
+ result = check_output(thegrep, shell=True).decode('utf-8')
+ except:
+ pass
+
+ if result is not None:
+ results[log] = {}
+ rez = result.splitlines()
+
+ for xrez in rez:
+ try:
+ cmd = ['grep', '-F', xrez, '-B', str(lines_before)]
+ cmd += ['-A', str(lines_after), log]
+ grep_output = check_output(cmd).decode('utf-8')
+ except:
+ pass
+ results[log][xrez]=grep_output
+
+ return results
+
+ # Get the output of dmesg and write it in a file.
+ # This file is added to log_locations.
+ def write_dmesg(self):
+ (status, dmesg) = self.target.run('dmesg > /tmp/dmesg_output.log')
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_parselogs(self):
+ self.write_dmesg()
+ log_list = self.get_local_log_list(self.log_locations)
+ result = self.parse_logs(self.errors, self.ignore_errors, log_list)
+ print(self.getHardwareInfo())
+ errcount = 0
+ for log in result:
+ self.msg += 'Log: ' + log + '\n'
+ self.msg += '-----------------------\n'
+ for error in result[log]:
+ errcount += 1
+ self.msg += 'Central error: ' + str(error) + '\n'
+ self.msg += '***********************\n'
+ self.msg += result[str(log)][str(error)] + '\n'
+ self.msg += '***********************\n'
+ self.msg += '%s errors found in logs.' % errcount
+ self.assertEqual(errcount, 0, msg=self.msg)
diff --git a/meta/lib/oeqa/runtime/cases/perl.py b/meta/lib/oeqa/runtime/cases/perl.py
new file mode 100644
index 0000000000..2c6b3b7846
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/perl.py
@@ -0,0 +1,17 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class PerlTest(OERuntimeTestCase):
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['perl'])
+ def test_perl_works(self):
+ status, output = self.target.run("perl -e '$_=\"Uryyb, jbeyq\"; tr/a-zA-Z/n-za-mN-ZA-M/;print'")
+ self.assertEqual(status, 0)
+ self.assertEqual(output, "Hello, world")
diff --git a/meta/lib/oeqa/runtime/cases/ping.py b/meta/lib/oeqa/runtime/cases/ping.py
new file mode 100644
index 0000000000..f6603f75ec
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ping.py
@@ -0,0 +1,26 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from subprocess import Popen, PIPE
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.oetimeout import OETimeout
+
+class PingTest(OERuntimeTestCase):
+
+ @OETimeout(30)
+ def test_ping(self):
+ output = ''
+ count = 0
+ while count < 5:
+ cmd = 'ping -c 1 %s' % self.target.ip
+ proc = Popen(cmd, shell=True, stdout=PIPE)
+ output += proc.communicate()[0].decode('utf-8')
+ if proc.poll() == 0:
+ count += 1
+ else:
+ count = 0
+ msg = ('Expected 5 consecutive, got %d.\n'
+ 'ping output is:\n%s' % (count,output))
+ self.assertEqual(count, 5, msg = msg)
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
new file mode 100644
index 0000000000..d8d1e1b344
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -0,0 +1,84 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import unittest
+import pprint
+import datetime
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+from oeqa.utils.logparser import PtestParser
+
+class PtestRunnerTest(OERuntimeTestCase):
+
+ @skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['ptest-runner'])
+ @unittest.expectedFailure
+ def test_ptestrunner(self):
+ status, output = self.target.run('which ptest-runner', 0)
+ if status != 0:
+ self.skipTest("No -ptest packages are installed in the image")
+
+ test_log_dir = self.td.get('TEST_LOG_DIR', '')
+ # The TEST_LOG_DIR maybe NULL when testimage is added after
+ # testdata.json is generated.
+ if not test_log_dir:
+ test_log_dir = os.path.join(self.td.get('WORKDIR', ''), 'testimage')
+ # Don't use self.td.get('DATETIME'), it's from testdata.json, not
+ # up-to-date, and may cause "File exists" when re-reun.
+ timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
+ ptest_log_dir_link = os.path.join(test_log_dir, 'ptest_log')
+ ptest_log_dir = '%s.%s' % (ptest_log_dir_link, timestamp)
+ ptest_runner_log = os.path.join(ptest_log_dir, 'ptest-runner.log')
+
+ status, output = self.target.run('ptest-runner', 0)
+ os.makedirs(ptest_log_dir)
+ with open(ptest_runner_log, 'w') as f:
+ f.write(output)
+
+ # status != 0 is OK since some ptest tests may fail
+ self.assertTrue(status != 127, msg="Cannot execute ptest-runner!")
+
+ if not hasattr(self.tc, "extraresults"):
+ self.tc.extraresults = {}
+ extras = self.tc.extraresults
+ extras['ptestresult.rawlogs'] = {'log': output}
+
+ # Parse and save results
+ parser = PtestParser()
+ results, sections = parser.parse(ptest_runner_log)
+ parser.results_as_files(ptest_log_dir)
+ if os.path.exists(ptest_log_dir_link):
+ # Remove the old link to create a new one
+ os.remove(ptest_log_dir_link)
+ os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link)
+
+ extras['ptestresult.sections'] = sections
+
+ trans = str.maketrans("()", "__")
+ for section in results:
+ for test in results[section]:
+ result = results[section][test]
+ testname = "ptestresult." + (section or "No-section") + "." + "_".join(test.translate(trans).split())
+ extras[testname] = {'status': result}
+
+ failed_tests = {}
+ for section in results:
+ failed_testcases = [ "_".join(test.translate(trans).split()) for test in results[section] if results[section][test] == 'fail' ]
+ if failed_testcases:
+ failed_tests[section] = failed_testcases
+
+ failmsg = ""
+ status, output = self.target.run('dmesg | grep "Killed process"', 0)
+ if output:
+ failmsg = "ERROR: Processes were killed by the OOM Killer:\n%s\n" % output
+
+ if failed_tests:
+ failmsg = failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
+
+ if failmsg:
+ self.fail(failmsg)
diff --git a/meta/lib/oeqa/runtime/cases/python.py b/meta/lib/oeqa/runtime/cases/python.py
new file mode 100644
index 0000000000..ec54f1e1db
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/python.py
@@ -0,0 +1,19 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class PythonTest(OERuntimeTestCase):
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['python3-core'])
+ def test_python3(self):
+ cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\""
+ status, output = self.target.run(cmd)
+ msg = 'Exit status was not 0. Output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ msg = 'Incorrect output: %s' % output
+ self.assertEqual(output, "Hello, world", msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
new file mode 100644
index 0000000000..8e18b426f8
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -0,0 +1,153 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import fnmatch
+import time
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfDataVar
+from oeqa.runtime.decorator.package import OEHasPackage
+from oeqa.core.utils.path import findFile
+
+class RpmBasicTest(OERuntimeTestCase):
+
+ @OEHasPackage(['rpm'])
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_rpm_help(self):
+ status, output = self.target.run('rpm --help')
+ msg = 'status and output: %s and %s' % (status, output)
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['rpm.RpmBasicTest.test_rpm_help'])
+ def test_rpm_query(self):
+ status, output = self.target.run('ls /var/lib/rpm/')
+ if status != 0:
+ self.skipTest('No /var/lib/rpm on target')
+ status, output = self.target.run('rpm -q rpm')
+ msg = 'status and output: %s and %s' % (status, output)
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
+ def test_rpm_query_nonroot(self):
+
+ def set_up_test_user(u):
+ status, output = self.target.run('id -u %s' % u)
+ if status:
+ status, output = self.target.run('useradd %s' % u)
+ msg = 'Failed to create new user: %s' % output
+ self.assertTrue(status == 0, msg=msg)
+
+ def exec_as_test_user(u):
+ status, output = self.target.run('su -c id %s' % u)
+ msg = 'Failed to execute as new user'
+ self.assertTrue("({0})".format(u) in output, msg=msg)
+
+ status, output = self.target.run('su -c "rpm -qa" %s ' % u)
+ msg = 'status: %s. Cannot run rpm -qa: %s' % (status, output)
+ self.assertEqual(status, 0, msg=msg)
+
+ def check_no_process_for_user(u):
+ _, output = self.target.run(self.tc.target_cmds['ps'])
+ if u + ' ' in output:
+ return False
+ else:
+ return True
+
+ def unset_up_test_user(u):
+ # ensure no test1 process in running
+ timeout = time.time() + 30
+ while time.time() < timeout:
+ if check_no_process_for_user(u):
+ break
+ else:
+ time.sleep(1)
+ status, output = self.target.run('userdel -r %s' % u)
+ msg = 'Failed to erase user: %s' % output
+ self.assertTrue(status == 0, msg=msg)
+
+ tuser = 'test1'
+
+ try:
+ set_up_test_user(tuser)
+ exec_as_test_user(tuser)
+ finally:
+ unset_up_test_user(tuser)
+
+
+class RpmInstallRemoveTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ pkgarch = cls.td['TUNE_PKGARCH'].replace('-', '_')
+ rpmdir = os.path.join(cls.tc.td['DEPLOY_DIR'], 'rpm', pkgarch)
+ # Pick base-passwd-doc as a test file to get installed, because it's small
+ # and it will always be built for standard targets
+ rpm_doc = 'base-passwd-doc-*.%s.rpm' % pkgarch
+ if not os.path.exists(rpmdir):
+ return
+ for f in fnmatch.filter(os.listdir(rpmdir), rpm_doc):
+ cls.test_file = os.path.join(rpmdir, f)
+ cls.dst = '/tmp/base-passwd-doc.rpm'
+
+ @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
+ def test_rpm_install(self):
+ self.tc.target.copyTo(self.test_file, self.dst)
+ status, output = self.target.run('rpm -ivh /tmp/base-passwd-doc.rpm')
+ msg = 'Failed to install base-passwd-doc package: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+ self.tc.target.run('rm -f %s' % self.dst)
+
+ @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_install'])
+ def test_rpm_remove(self):
+ status,output = self.target.run('rpm -e base-passwd-doc')
+ msg = 'Failed to remove base-passwd-doc package: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_remove'])
+ def test_check_rpm_install_removal_log_file_size(self):
+ """
+ Summary: Check that rpm writes into /var/log/messages
+ Expected: There should be some RPM prefixed entries in the above file.
+ Product: BSPs
+ Author: Alexandru Georgescu <alexandru.c.georgescu@intel.com>
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+ db_files_cmd = 'ls /var/lib/rpm/__db.*'
+ check_log_cmd = "grep RPM /var/log/messages | wc -l"
+
+ # Make sure that some database files are under /var/lib/rpm as '__db.xxx'
+ status, output = self.target.run(db_files_cmd)
+ msg = 'Failed to find database files under /var/lib/rpm/ as __db.xxx'
+ self.assertEqual(0, status, msg=msg)
+
+ self.tc.target.copyTo(self.test_file, self.dst)
+
+ # Remove the package just in case
+ self.target.run('rpm -e base-passwd-doc')
+
+ # Install/Remove a package 10 times
+ for i in range(10):
+ status, output = self.target.run('rpm -ivh /tmp/base-passwd-doc.rpm')
+ msg = 'Failed to install base-passwd-doc package. Reason: {}'.format(output)
+ self.assertEqual(0, status, msg=msg)
+
+ status, output = self.target.run('rpm -e base-passwd-doc')
+ msg = 'Failed to remove base-passwd-doc package. Reason: {}'.format(output)
+ self.assertEqual(0, status, msg=msg)
+
+ self.tc.target.run('rm -f %s' % self.dst)
+
+ # if using systemd this should ensure all entries are flushed to /var
+ status, output = self.target.run("journalctl --sync")
+ # Get the amount of entries in the log file
+ status, output = self.target.run(check_log_cmd)
+ msg = 'Failed to get the final size of the log file.'
+ self.assertEqual(0, status, msg=msg)
+
+ # Check that there's enough of them
+ self.assertGreaterEqual(int(output), 80,
+ 'Cound not find sufficient amount of rpm entries in /var/log/messages, found {} entries'.format(output))
diff --git a/meta/lib/oeqa/runtime/cases/scons.py b/meta/lib/oeqa/runtime/cases/scons.py
new file mode 100644
index 0000000000..3c7c7f7270
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/scons.py
@@ -0,0 +1,37 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class SconsCompileTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUp(cls):
+ dst = '/tmp/'
+ src = os.path.join(cls.tc.runtime_files_dir, 'hello.c')
+ cls.tc.target.copyTo(src, dst)
+
+ src = os.path.join(cls.tc.runtime_files_dir, 'SConstruct')
+ cls.tc.target.copyTo(src, dst)
+
+ @classmethod
+ def tearDown(cls):
+ files = '/tmp/hello.c /tmp/hello.o /tmp/hello /tmp/SConstruct'
+ cls.tc.target.run('rm %s' % files)
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['python3-scons'])
+ def test_scons_compile(self):
+ status, output = self.target.run('cd /tmp/ && scons')
+ msg = 'scons compile failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ status, output = self.target.run('/tmp/hello')
+ msg = 'running compiled file failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/scp.py b/meta/lib/oeqa/runtime/cases/scp.py
new file mode 100644
index 0000000000..3a5f292152
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/scp.py
@@ -0,0 +1,37 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+from tempfile import mkstemp
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class ScpTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.tmp_fd, cls.tmp_path = mkstemp()
+ with os.fdopen(cls.tmp_fd, 'w') as f:
+ f.seek(2 ** 22 -1)
+ f.write(os.linesep)
+
+ @classmethod
+ def tearDownClass(cls):
+ os.remove(cls.tmp_path)
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['openssh-scp', 'dropbear'])
+ def test_scp_file(self):
+ dst = '/tmp/test_scp_file'
+
+ (status, output) = self.target.copyTo(self.tmp_path, dst)
+ msg = 'File could not be copied. Output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ (status, output) = self.target.run('ls -la %s' % dst)
+ self.assertEqual(status, 0, msg = 'SCP test failed')
+
+ self.target.run('rm %s' % dst)
diff --git a/meta/lib/oeqa/runtime/cases/skeletoninit.py b/meta/lib/oeqa/runtime/cases/skeletoninit.py
new file mode 100644
index 0000000000..4779cd6bb4
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/skeletoninit.py
@@ -0,0 +1,35 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=284
+# testcase. Image under test must have meta-skeleton layer in bblayers and
+# IMAGE_INSTALL_append = " service" in local.conf
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfDataVar
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class SkeletonBasicTest(OERuntimeTestCase):
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['service'])
+ @skipIfDataVar('VIRTUAL-RUNTIME_init_manager', 'systemd',
+ 'Not appropiate for systemd image')
+ def test_skeleton_availability(self):
+ status, output = self.target.run('ls /etc/init.d/skeleton')
+ msg = 'skeleton init script not found. Output:\n%s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ status, output = self.target.run('ls /usr/sbin/skeleton-test')
+ msg = 'skeleton-test not found. Output:\n%s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ @OETestDepends(['skeletoninit.SkeletonBasicTest.test_skeleton_availability'])
+ def test_skeleton_script(self):
+ output1 = self.target.run("/etc/init.d/skeleton start")[1]
+ cmd = '%s | grep [s]keleton-test' % self.tc.target_cmds['ps']
+ status, output2 = self.target.run(cmd)
+ msg = ('Skeleton script could not be started:'
+ '\n%s\n%s' % (output1, output2))
+ self.assertEqual(status, 0, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/ssh.py b/meta/lib/oeqa/runtime/cases/ssh.py
new file mode 100644
index 0000000000..60a5fbbfbf
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ssh.py
@@ -0,0 +1,19 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class SSHTest(OERuntimeTestCase):
+
+ @OETestDepends(['ping.PingTest.test_ping'])
+ @OEHasPackage(['dropbear', 'openssh-sshd'])
+ def test_ssh(self):
+ (status, output) = self.target.run('uname -a')
+ self.assertEqual(status, 0, msg='SSH Test failed: %s' % output)
+ (status, output) = self.target.run('cat /etc/masterimage')
+ msg = "This isn't the right image - /etc/masterimage " \
+ "shouldn't be here %s" % output
+ self.assertEqual(status, 1, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/stap.py b/meta/lib/oeqa/runtime/cases/stap.py
new file mode 100644
index 0000000000..5342f6ac34
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/stap.py
@@ -0,0 +1,37 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class StapTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUp(cls):
+ src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp')
+ dst = '/tmp/hello.stp'
+ cls.tc.target.copyTo(src, dst)
+
+ @classmethod
+ def tearDown(cls):
+ files = '/tmp/hello.stp'
+ cls.tc.target.run('rm %s' % files)
+
+ @skipIfNotFeature('tools-profile',
+ 'Test requires tools-profile to be in IMAGE_FEATURES')
+ @OETestDepends(['kernelmodule.KernelModuleTest.test_kernel_module'])
+ @OEHasPackage(['systemtap'])
+ def test_stap(self):
+ cmds = [
+ 'cd /usr/src/kernel && make scripts prepare',
+ 'cd /lib/modules/`uname -r` && (if [ ! -e build ]; then ln -s /usr/src/kernel build; fi)',
+ 'stap --disable-cache -DSTP_NO_VERREL_CHECK /tmp/hello.stp'
+ ]
+ for cmd in cmds:
+ status, output = self.target.run(cmd, 900)
+ self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
diff --git a/meta/lib/oeqa/runtime/cases/storage.py b/meta/lib/oeqa/runtime/cases/storage.py
new file mode 100644
index 0000000000..166d26b252
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/storage.py
@@ -0,0 +1,149 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import re
+import time
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfQemu
+
+class StorageBase(OERuntimeTestCase):
+ def storage_mount(cls, tmo=1):
+
+ (status, output) = cls.target.run('mkdir -p %s' % cls.mount_point)
+ (status, output) = cls.target.run('mount %s %s' % (cls.device, cls.mount_point))
+ msg = ('Mount failed: %s.' % status)
+ cls.assertFalse(output, msg = msg)
+ time.sleep(tmo)
+ (status, output) = cls.target.run('cat /proc/mounts')
+ match = re.search('%s' % cls.device, output)
+ if match:
+ msg = ('Device %s not mounted.' % cls.device)
+ cls.assertTrue(match, msg = msg)
+
+ (status, output) = cls.target.run('mkdir -p %s' % cls.test_dir)
+
+ (status, output) = cls.target.run('rm -f %s/*' % cls.test_dir)
+ msg = ('Failed to cleanup files @ %s/*' % cls.test_dir)
+ cls.assertFalse(output, msg = msg)
+
+
+ def storage_basic(cls):
+ # create file on device
+ (status, output) = cls.target.run('touch %s/%s' % (cls.test_dir, cls.test_file))
+ msg = ('File %s not created on %s' % (cls.test_file, cls.device))
+ cls.assertFalse(status, msg = msg)
+ # move file
+ (status, output) = cls.target.run('mv %s/%s %s/%s1' %
+ (cls.test_dir, cls.test_file, cls.test_dir, cls.test_file))
+ msg = ('File %s not moved to %s' % (cls.test_file, cls.device))
+ cls.assertFalse(status, msg = msg)
+ # remove file
+ (status, output) = cls.target.run('rm %s/%s1' % (cls.test_dir, cls.test_file))
+ msg = ('File %s not removed on %s' % (cls.test_file, cls.device))
+ cls.assertFalse(status, msg = msg)
+
+ def storage_read(cls):
+ # check if message is in file
+ (status, output) = cls.target.run('cat %s/%s' %
+ (cls.test_dir, cls.test_file))
+
+ match = re.search('%s' % cls.test_msg, output)
+ msg = ('Test message %s not in file %s.' % (cls.test_msg, cls.test_file))
+ cls.assertEqual(status, 0, msg = msg)
+
+ def storage_write(cls):
+ # create test message in file on device
+ (status, output) = cls.target.run('echo "%s" > %s/%s' %
+ (cls.test_msg, cls.test_dir, cls.test_file))
+ msg = ('File %s not create test message on %s' % (cls.test_file, cls.device))
+ cls.assertEqual(status, 0, msg = msg)
+
+ def storage_umount(cls, tmo=1):
+ time.sleep(tmo)
+ (status, output) = cls.target.run('umount %s' % cls.mount_point)
+
+ if status == 32:
+ # already unmounted, should it fail?
+ return
+ else:
+ msg = ('Device not unmount %s' % cls.mount_point)
+ cls.assertEqual(status, 0, msg = msg)
+
+ (status, output) = cls.target.run('cat /proc/mounts')
+ match = re.search('%s' % cls.device, output)
+ if match:
+ msg = ('Device %s still mounted.' % cls.device)
+ cls.assertTrue(match, msg = msg)
+
+
+class UsbTest(StorageBase):
+ '''
+ This is to mimic the usb test previously done in manual bsp-hw.json
+ '''
+ @classmethod
+ def setUpClass(self):
+ self.test_msg = "Hello World - USB"
+ self.mount_point = "/media/usb"
+ self.device = "/dev/sda1"
+ self.test_file = "usb.tst"
+ self.test_dir = os.path.join(self.mount_point, "oeqa")
+
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_usb_mount(self):
+ self.storage_umount(2)
+ self.storage_mount(5)
+
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['storage.UsbTest.test_usb_mount'])
+ def test_usb_basic_operations(self):
+ self.storage_basic()
+
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['storage.UsbTest.test_usb_basic_operations'])
+ def test_usb_basic_rw(self):
+ self.storage_write()
+ self.storage_read()
+
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['storage.UsbTest.test_usb_mount'])
+ def test_usb_umount(self):
+ self.storage_umount(2)
+
+
+class MMCTest(StorageBase):
+ '''
+ This is to mimic the usb test previously done in manual bsp-hw.json
+ '''
+ @classmethod
+ def setUpClass(self):
+ self.test_msg = "Hello World - MMC"
+ self.mount_point = "/media/mmc"
+ self.device = "/dev/mmcblk1p1"
+ self.test_file = "mmc.tst"
+ self.test_dir = os.path.join(self.mount_point, "oeqa")
+
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_mmc_mount(self):
+ self.storage_umount(2)
+ self.storage_mount()
+
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['storage.MMCTest.test_mmc_mount'])
+ def test_mmc_basic_operations(self):
+ self.storage_basic()
+
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['storage.MMCTest.test_mmc_basic_operations'])
+ def test_mmc_basic_rw(self):
+ self.storage_write()
+ self.storage_read()
+
+ @skipIfQemu('qemuall', 'Test only runs on real hardware')
+ @OETestDepends(['storage.MMCTest.test_mmc_mount'])
+ def test_mmc_umount(self):
+ self.storage_umount(2)
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py
new file mode 100644
index 0000000000..7c44abe8ed
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/systemd.py
@@ -0,0 +1,194 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import re
+import time
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfDataVar, skipIfNotDataVar
+from oeqa.runtime.decorator.package import OEHasPackage
+from oeqa.core.decorator.data import skipIfNotFeature, skipIfFeature
+
+class SystemdTest(OERuntimeTestCase):
+
+ def systemctl(self, action='', target='', expected=0, verbose=False):
+ command = 'SYSTEMD_BUS_TIMEOUT=240s systemctl %s %s' % (action, target)
+ status, output = self.target.run(command)
+ message = '\n'.join([command, output])
+ if status != expected and verbose:
+ cmd = 'SYSTEMD_BUS_TIMEOUT=240s systemctl status --full %s' % target
+ message += self.target.run(cmd)[1]
+ self.assertEqual(status, expected, message)
+ return output
+
+ #TODO: use pyjournalctl instead
+ def journalctl(self, args='',l_match_units=None):
+ """
+ Request for the journalctl output to the current target system
+
+ Arguments:
+ -args, an optional argument pass through argument
+ -l_match_units, an optional list of units to filter the output
+ Returns:
+ -string output of the journalctl command
+ Raises:
+ -AssertionError, on remote commands that fail
+ -ValueError, on a journalctl call with filtering by l_match_units that
+ returned no entries
+ """
+
+ query_units=''
+ if l_match_units:
+ query_units = ['_SYSTEMD_UNIT='+unit for unit in l_match_units]
+ query_units = ' '.join(query_units)
+ command = 'journalctl %s %s' %(args, query_units)
+ status, output = self.target.run(command)
+ if status:
+ raise AssertionError("Command '%s' returned non-zero exit "
+ 'code %d:\n%s' % (command, status, output))
+ if len(output) == 1 and "-- No entries --" in output:
+ raise ValueError('List of units to match: %s, returned no entries'
+ % l_match_units)
+ return output
+
+class SystemdBasicTests(SystemdTest):
+
+ def settle(self):
+ """
+ Block until systemd has finished activating any units being activated,
+ or until two minutes has elapsed.
+
+ Returns a tuple, either (True, '') if all units have finished
+ activating, or (False, message string) if there are still units
+ activating (generally, failing units that restart).
+ """
+ endtime = time.time() + (60 * 2)
+ while True:
+ status, output = self.target.run('SYSTEMD_BUS_TIMEOUT=240s systemctl --state=activating')
+ if "0 loaded units listed" in output:
+ return (True, '')
+ if time.time() >= endtime:
+ return (False, output)
+ time.sleep(10)
+
+ @skipIfNotFeature('systemd',
+ 'Test requires systemd to be in DISTRO_FEATURES')
+ @skipIfNotDataVar('VIRTUAL-RUNTIME_init_manager', 'systemd',
+ 'systemd is not the init manager for this image')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_systemd_basic(self):
+ self.systemctl('--version')
+
+ @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
+ def test_systemd_list(self):
+ self.systemctl('list-unit-files')
+
+ @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
+ def test_systemd_failed(self):
+ settled, output = self.settle()
+ msg = "Timed out waiting for systemd to settle:\n%s" % output
+ self.assertTrue(settled, msg=msg)
+
+ output = self.systemctl('list-units', '--failed')
+ match = re.search('0 loaded units listed', output)
+ if not match:
+ output += self.systemctl('status --full --failed')
+ self.assertTrue(match, msg='Some systemd units failed:\n%s' % output)
+
+
+class SystemdServiceTests(SystemdTest):
+
+ @OEHasPackage(['avahi-daemon'])
+ @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
+ def test_systemd_status(self):
+ self.systemctl('status --full', 'avahi-daemon.service')
+
+ @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status'])
+ def test_systemd_stop_start(self):
+ self.systemctl('stop', 'avahi-daemon.service')
+ self.systemctl('is-active', 'avahi-daemon.service',
+ expected=3, verbose=True)
+ self.systemctl('start','avahi-daemon.service')
+ self.systemctl('is-active', 'avahi-daemon.service', verbose=True)
+
+ @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status'])
+ @skipIfFeature('read-only-rootfs',
+ 'Test is only meant to run without read-only-rootfs in IMAGE_FEATURES')
+ def test_systemd_disable_enable(self):
+ self.systemctl('disable', 'avahi-daemon.service')
+ self.systemctl('is-enabled', 'avahi-daemon.service', expected=1)
+ self.systemctl('enable', 'avahi-daemon.service')
+ self.systemctl('is-enabled', 'avahi-daemon.service')
+
+ @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status'])
+ @skipIfNotFeature('read-only-rootfs',
+ 'Test is only meant to run with read-only-rootfs in IMAGE_FEATURES')
+ def test_systemd_disable_enable_ro(self):
+ status = self.target.run('mount -orw,remount /')[0]
+ self.assertTrue(status == 0, msg='Remounting / as r/w failed')
+ try:
+ self.test_systemd_disable_enable()
+ finally:
+ status = self.target.run('mount -oro,remount /')[0]
+ self.assertTrue(status == 0, msg='Remounting / as r/o failed')
+
+class SystemdJournalTests(SystemdTest):
+
+ @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
+ def test_systemd_journal(self):
+ status, output = self.target.run('journalctl')
+ self.assertEqual(status, 0, output)
+
+ @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
+ def test_systemd_boot_time(self, systemd_TimeoutStartSec=90):
+ """
+ Get the target boot time from journalctl and log it
+
+ Arguments:
+ -systemd_TimeoutStartSec, an optional argument containing systemd's
+ unit start timeout to compare against
+ """
+
+ # The expression chain that uniquely identifies the time boot message.
+ expr_items=['Startup finished', 'kernel', 'userspace','\.$']
+ try:
+ output = self.journalctl(args='-o cat --reverse')
+ except AssertionError:
+ self.fail('Error occurred while calling journalctl')
+ if not len(output):
+ self.fail('Error, unable to get startup time from systemd journal')
+
+ # Check for the regular expression items that match the startup time.
+ for line in output.split('\n'):
+ check_match = ''.join(re.findall('.*'.join(expr_items), line))
+ if check_match:
+ break
+ # Put the startup time in the test log
+ if check_match:
+ self.tc.logger.info('%s' % check_match)
+ else:
+ self.skipTest('Error at obtaining the boot time from journalctl')
+ boot_time_sec = 0
+
+ # Get the numeric values from the string and convert them to seconds
+ # same data will be placed in list and string for manipulation.
+ l_boot_time = check_match.split(' ')[-2:]
+ s_boot_time = ' '.join(l_boot_time)
+ try:
+ # Obtain the minutes it took to boot.
+ if l_boot_time[0].endswith('min') and l_boot_time[0][0].isdigit():
+ boot_time_min = s_boot_time.split('min')[0]
+ # Convert to seconds and accumulate it.
+ boot_time_sec += int(boot_time_min) * 60
+ # Obtain the seconds it took to boot and accumulate.
+ boot_time_sec += float(l_boot_time[1].split('s')[0])
+ except ValueError:
+ self.skipTest('Error when parsing time from boot string')
+
+ # Assert the target boot time against systemd's unit start timeout.
+ if boot_time_sec > systemd_TimeoutStartSec:
+ msg = ("Target boot time %s exceeds systemd's TimeoutStartSec %s"
+ % (boot_time_sec, systemd_TimeoutStartSec))
+ self.tc.logger.info(msg)
diff --git a/meta/lib/oeqa/runtime/cases/x32lib.py b/meta/lib/oeqa/runtime/cases/x32lib.py
new file mode 100644
index 0000000000..ddf220140e
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/x32lib.py
@@ -0,0 +1,21 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotInDataVar
+
+class X32libTest(OERuntimeTestCase):
+
+ @skipIfNotInDataVar('DEFAULTTUNE', 'x86-64-x32',
+ 'DEFAULTTUNE is not set to x86-64-x32')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_x32_file(self):
+ cmd = 'readelf -h /bin/ls | grep Class | grep ELF32'
+ status1 = self.target.run(cmd)[0]
+ cmd = 'readelf -h /bin/ls | grep Machine | grep X86-64'
+ status2 = self.target.run(cmd)[0]
+ msg = ("/bin/ls isn't an X86-64 ELF32 binary. readelf says: %s" %
+ self.target.run("readelf -h /bin/ls")[1])
+ self.assertTrue(status1 == 0 and status2 == 0, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/xorg.py b/meta/lib/oeqa/runtime/cases/xorg.py
new file mode 100644
index 0000000000..d6845587c2
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/xorg.py
@@ -0,0 +1,21 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class XorgTest(OERuntimeTestCase):
+
+ @skipIfNotFeature('x11-base',
+ 'Test requires x11 to be in IMAGE_FEATURES')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['xserver-nodm-init'])
+ def test_xorg_running(self):
+ cmd ='%s | grep -v xinit | grep [X]org' % self.tc.target_cmds['ps']
+ status, output = self.target.run(cmd)
+ msg = ('Xorg does not appear to be running %s' %
+ self.target.run(self.tc.target_cmds['ps'])[1])
+ self.assertEqual(status, 0, msg=msg)
diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py
deleted file mode 100644
index 003fefe2ce..0000000000
--- a/meta/lib/oeqa/runtime/connman.py
+++ /dev/null
@@ -1,31 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasPackage("connman"):
- skipModule("No connman package in image")
-
-
-class ConnmanTest(oeRuntimeTest):
-
- def service_status(self, service):
- if oeRuntimeTest.hasFeature("systemd"):
- (status, output) = self.target.run('systemctl status -l %s' % service)
- return output
- else:
- return "Unable to get status or logs for %s" % service
-
- @testcase(961)
- @skipUnlessPassed('test_ssh')
- def test_connmand_help(self):
- (status, output) = self.target.run('/usr/sbin/connmand --help')
- self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
-
- @testcase(221)
- @skipUnlessPassed('test_connmand_help')
- def test_connmand_running(self):
- (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
- if status != 0:
- print(self.service_status("connman"))
- self.fail("No connmand process running")
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
new file mode 100644
index 0000000000..2ecb1a8f01
--- /dev/null
+++ b/meta/lib/oeqa/runtime/context.py
@@ -0,0 +1,226 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.core.context import OETestContext, OETestContextExecutor
+from oeqa.core.target.ssh import OESSHTarget
+from oeqa.core.target.qemu import OEQemuTarget
+from oeqa.utils.dump import HostDumper
+
+from oeqa.runtime.loader import OERuntimeTestLoader
+
+class OERuntimeTestContext(OETestContext):
+ loaderClass = OERuntimeTestLoader
+ runtime_files_dir = os.path.join(
+ os.path.dirname(os.path.abspath(__file__)), "files")
+
+ def __init__(self, td, logger, target,
+ host_dumper, image_packages, extract_dir):
+ super(OERuntimeTestContext, self).__init__(td, logger)
+
+ self.target = target
+ self.image_packages = image_packages
+ self.host_dumper = host_dumper
+ self.extract_dir = extract_dir
+ self._set_target_cmds()
+
+ def _set_target_cmds(self):
+ self.target_cmds = {}
+
+ self.target_cmds['ps'] = 'ps'
+ if 'procps' in self.image_packages:
+ self.target_cmds['ps'] = self.target_cmds['ps'] + ' -ef'
+
+class OERuntimeTestContextExecutor(OETestContextExecutor):
+ _context_class = OERuntimeTestContext
+
+ name = 'runtime'
+ help = 'runtime test component'
+ description = 'executes runtime tests over targets'
+
+ default_cases = os.path.join(os.path.abspath(os.path.dirname(__file__)),
+ 'cases')
+ default_data = None
+ default_test_data = 'data/testdata.json'
+ default_tests = ''
+
+ default_target_type = 'simpleremote'
+ default_manifest = 'data/manifest'
+ default_server_ip = '192.168.7.1'
+ default_target_ip = '192.168.7.2'
+ default_extract_dir = 'packages/extracted'
+
+ def register_commands(self, logger, subparsers):
+ super(OERuntimeTestContextExecutor, self).register_commands(logger, subparsers)
+
+ runtime_group = self.parser.add_argument_group('runtime options')
+
+ runtime_group.add_argument('--target-type', action='store',
+ default=self.default_target_type, choices=['simpleremote', 'qemu'],
+ help="Target type of device under test, default: %s" \
+ % self.default_target_type)
+ runtime_group.add_argument('--target-ip', action='store',
+ default=self.default_target_ip,
+ help="IP address of device under test, default: %s" \
+ % self.default_target_ip)
+ runtime_group.add_argument('--server-ip', action='store',
+ default=self.default_target_ip,
+ help="IP address of device under test, default: %s" \
+ % self.default_server_ip)
+
+ runtime_group.add_argument('--host-dumper-dir', action='store',
+ help="Directory where host status is dumped, if tests fails")
+
+ runtime_group.add_argument('--packages-manifest', action='store',
+ default=self.default_manifest,
+ help="Package manifest of the image under testi, default: %s" \
+ % self.default_manifest)
+
+ runtime_group.add_argument('--extract-dir', action='store',
+ default=self.default_extract_dir,
+ help='Directory where extracted packages reside, default: %s' \
+ % self.default_extract_dir)
+
+ runtime_group.add_argument('--qemu-boot', action='store',
+ help="Qemu boot configuration, only needed when target_type is QEMU.")
+
+ @staticmethod
+ def getTarget(target_type, logger, target_ip, server_ip, **kwargs):
+ target = None
+
+ if target_ip:
+ target_ip_port = target_ip.split(':')
+ if len(target_ip_port) == 2:
+ target_ip = target_ip_port[0]
+ kwargs['port'] = target_ip_port[1]
+
+ if server_ip:
+ server_ip_port = server_ip.split(':')
+ if len(server_ip_port) == 2:
+ server_ip = server_ip_port[0]
+ kwargs['server_port'] = int(server_ip_port[1])
+
+ if target_type == 'simpleremote':
+ target = OESSHTarget(logger, target_ip, server_ip, **kwargs)
+ elif target_type == 'qemu':
+ target = OEQemuTarget(logger, server_ip, **kwargs)
+ else:
+ # XXX: This code uses the old naming convention for controllers and
+ # targets, the idea it is to leave just targets as the controller
+ # most of the time was just a wrapper.
+ # XXX: This code tries to import modules from lib/oeqa/controllers
+ # directory and treat them as controllers, it will less error prone
+ # to use introspection to load such modules.
+ # XXX: Don't base your targets on this code it will be refactored
+ # in the near future.
+ # Custom target module loading
+ target_modules_path = kwargs.get('target_modules_path', '')
+ controller = OERuntimeTestContextExecutor.getControllerModule(target_type, target_modules_path)
+ target = controller(logger, target_ip, server_ip, **kwargs)
+
+ return target
+
+ # Search oeqa.controllers module directory for and return a controller
+ # corresponding to the given target name.
+ # AttributeError raised if not found.
+ # ImportError raised if a provided module can not be imported.
+ @staticmethod
+ def getControllerModule(target, target_modules_path):
+ controllerslist = OERuntimeTestContextExecutor._getControllerModulenames(target_modules_path)
+ controller = OERuntimeTestContextExecutor._loadControllerFromName(target, controllerslist)
+ return controller
+
+ # Return a list of all python modules in lib/oeqa/controllers for each
+ # layer in bbpath
+ @staticmethod
+ def _getControllerModulenames(target_modules_path):
+
+ controllerslist = []
+
+ def add_controller_list(path):
+ if not os.path.exists(os.path.join(path, '__init__.py')):
+ raise OSError('Controllers directory %s exists but is missing __init__.py' % path)
+ files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_') and not f.startswith('.#')])
+ for f in files:
+ module = 'oeqa.controllers.' + f[:-3]
+ if module not in controllerslist:
+ controllerslist.append(module)
+ else:
+ raise RuntimeError("Duplicate controller module found for %s. Layers should create unique controller module names" % module)
+
+ extpath = target_modules_path.split(':')
+ for p in extpath:
+ controllerpath = os.path.join(p, 'lib', 'oeqa', 'controllers')
+ if os.path.exists(controllerpath):
+ add_controller_list(controllerpath)
+ return controllerslist
+
+ # Search for and return a controller from given target name and
+ # set of module names.
+ # Raise AttributeError if not found.
+ # Raise ImportError if a provided module can not be imported
+ @staticmethod
+ def _loadControllerFromName(target, modulenames):
+ for name in modulenames:
+ obj = OERuntimeTestContextExecutor._loadControllerFromModule(target, name)
+ if obj:
+ return obj
+ raise AttributeError("Unable to load {0} from available modules: {1}".format(target, str(modulenames)))
+
+ # Search for and return a controller or None from given module name
+ @staticmethod
+ def _loadControllerFromModule(target, modulename):
+ obj = None
+ # import module, allowing it to raise import exception
+ module = __import__(modulename, globals(), locals(), [target])
+ # look for target class in the module, catching any exceptions as it
+ # is valid that a module may not have the target class.
+ try:
+ obj = getattr(module, target)
+ except:
+ obj = None
+ return obj
+
+ @staticmethod
+ def readPackagesManifest(manifest):
+ if not manifest or not os.path.exists(manifest):
+ raise OSError("Manifest file not exists: %s" % manifest)
+
+ image_packages = set()
+ with open(manifest, 'r') as f:
+ for line in f.readlines():
+ line = line.strip()
+ if line and not line.startswith("#"):
+ image_packages.add(line.split()[0])
+
+ return image_packages
+
+ @staticmethod
+ def getHostDumper(cmds, directory):
+ return HostDumper(cmds, directory)
+
+ def _process_args(self, logger, args):
+ if not args.packages_manifest:
+ raise TypeError('Manifest file not provided')
+
+ super(OERuntimeTestContextExecutor, self)._process_args(logger, args)
+
+ target_kwargs = {}
+ target_kwargs['qemuboot'] = args.qemu_boot
+
+ self.tc_kwargs['init']['target'] = \
+ OERuntimeTestContextExecutor.getTarget(args.target_type,
+ None, args.target_ip, args.server_ip, **target_kwargs)
+ self.tc_kwargs['init']['host_dumper'] = \
+ OERuntimeTestContextExecutor.getHostDumper(None,
+ args.host_dumper_dir)
+ self.tc_kwargs['init']['image_packages'] = \
+ OERuntimeTestContextExecutor.readPackagesManifest(
+ args.packages_manifest)
+ self.tc_kwargs['init']['extract_dir'] = args.extract_dir
+
+_executor_class = OERuntimeTestContextExecutor
diff --git a/meta/lib/oeqa/runtime/date.py b/meta/lib/oeqa/runtime/date.py
deleted file mode 100644
index 447987e075..0000000000
--- a/meta/lib/oeqa/runtime/date.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from oeqa.oetest import oeRuntimeTest
-from oeqa.utils.decorators import *
-import re
-
-class DateTest(oeRuntimeTest):
-
- def setUpLocal(self):
- if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd":
- self.target.run('systemctl stop systemd-timesyncd')
-
- def tearDownLocal(self):
- if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd":
- self.target.run('systemctl start systemd-timesyncd')
-
- @testcase(211)
- @skipUnlessPassed("test_ssh")
- def test_date(self):
- (status, output) = self.target.run('date +"%Y-%m-%d %T"')
- self.assertEqual(status, 0, msg="Failed to get initial date, output: %s" % output)
- oldDate = output
-
- sampleDate = '"2016-08-09 10:00:00"'
- (status, output) = self.target.run("date -s %s" % sampleDate)
- self.assertEqual(status, 0, msg="Date set failed, output: %s" % output)
-
- (status, output) = self.target.run("date -R")
- p = re.match('Tue, 09 Aug 2016 10:00:.. \+0000', output)
- self.assertTrue(p, msg="The date was not set correctly, output: %s" % output)
-
- (status, output) = self.target.run('date -s "%s"' % oldDate)
- self.assertEqual(status, 0, msg="Failed to reset date, output: %s" % output)
diff --git a/meta/lib/oeqa/runtime/decorator/package.py b/meta/lib/oeqa/runtime/decorator/package.py
new file mode 100644
index 0000000000..4c5ca198b0
--- /dev/null
+++ b/meta/lib/oeqa/runtime/decorator/package.py
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.decorator import OETestDecorator, registerDecorator
+from oeqa.core.utils.misc import strToSet
+
+@registerDecorator
+class OEHasPackage(OETestDecorator):
+ """
+ Checks if image has packages (un)installed.
+
+ The argument must be a string, set, or list of packages that must be
+ installed or not present in the image.
+
+ The way to tell a package must not be in an image is using an
+ exclamation point ('!') before the name of the package.
+
+ If test depends on pkg1 or pkg2 you need to use:
+ @OEHasPackage({'pkg1', 'pkg2'})
+
+ If test depends on pkg1 and pkg2 you need to use:
+ @OEHasPackage('pkg1')
+ @OEHasPackage('pkg2')
+
+ If test depends on pkg1 but pkg2 must not be present use:
+ @OEHasPackage({'pkg1', '!pkg2'})
+ """
+
+ attrs = ('need_pkgs',)
+
+ def setUpDecorator(self):
+ need_pkgs = set()
+ unneed_pkgs = set()
+ pkgs = strToSet(self.need_pkgs)
+ for pkg in pkgs:
+ if pkg.startswith('!'):
+ unneed_pkgs.add(pkg[1:])
+ else:
+ need_pkgs.add(pkg)
+
+ if unneed_pkgs:
+ msg = 'Checking if %s is not installed' % ', '.join(unneed_pkgs)
+ self.logger.debug(msg)
+ if not self.case.tc.image_packages.isdisjoint(unneed_pkgs):
+ msg = "Test can't run with %s installed" % ', or'.join(unneed_pkgs)
+ self.case.skipTest(msg)
+
+ if need_pkgs:
+ msg = 'Checking if at least one of %s is installed' % ', '.join(need_pkgs)
+ self.logger.debug(msg)
+ if self.case.tc.image_packages.isdisjoint(need_pkgs):
+ msg = "Test requires %s to be installed" % ', or'.join(need_pkgs)
+ self.case.skipTest(msg)
diff --git a/meta/lib/oeqa/runtime/df.py b/meta/lib/oeqa/runtime/df.py
deleted file mode 100644
index 09569d5ff6..0000000000
--- a/meta/lib/oeqa/runtime/df.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest
-from oeqa.utils.decorators import *
-
-
-class DfTest(oeRuntimeTest):
-
- @testcase(234)
- @skipUnlessPassed("test_ssh")
- def test_df(self):
- (status,output) = self.target.run("df / | sed -n '2p' | awk '{print $4}'")
- self.assertTrue(int(output)>5120, msg="Not enough space on image. Current size is %s" % output)
diff --git a/meta/lib/oeqa/runtime/files/SConstruct b/meta/lib/oeqa/runtime/files/SConstruct
new file mode 100644
index 0000000000..d2cb6dd122
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/SConstruct
@@ -0,0 +1 @@
+Program('hello.c')
diff --git a/meta/lib/oeqa/runtime/files/hello.c b/meta/lib/oeqa/runtime/files/hello.c
new file mode 100644
index 0000000000..b0697a3304
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/hello.c
@@ -0,0 +1,5 @@
+int
+ main()
+ {
+ printf("Hello, world!\n");
+ }
diff --git a/meta/lib/oeqa/runtime/files/hello.stp b/meta/lib/oeqa/runtime/files/hello.stp
new file mode 100644
index 0000000000..3677147162
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/hello.stp
@@ -0,0 +1 @@
+probe oneshot { println("hello world") }
diff --git a/meta/lib/oeqa/runtime/files/test.pl b/meta/lib/oeqa/runtime/files/test.pl
deleted file mode 100644
index 689c8f1635..0000000000
--- a/meta/lib/oeqa/runtime/files/test.pl
+++ /dev/null
@@ -1,2 +0,0 @@
-$a = 9.01e+21 - 9.01e+21 + 0.01;
-print ("the value of a is ", $a, "\n");
diff --git a/meta/lib/oeqa/runtime/files/test.py b/meta/lib/oeqa/runtime/files/test.py
deleted file mode 100644
index f389225d72..0000000000
--- a/meta/lib/oeqa/runtime/files/test.py
+++ /dev/null
@@ -1,6 +0,0 @@
-import os
-
-os.system('touch /tmp/testfile.python')
-
-a = 9.01e+21 - 9.01e+21 + 0.01
-print("the value of a is %s" % a)
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
deleted file mode 100644
index d90cd1799a..0000000000
--- a/meta/lib/oeqa/runtime/gcc.py
+++ /dev/null
@@ -1,47 +0,0 @@
-import unittest
-import os
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("tools-sdk"):
- skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
-
-
-class GccCompileTest(oeRuntimeTest):
-
- @classmethod
- def setUpClass(self):
- oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.c"), "/tmp/test.c")
- oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "testmakefile"), "/tmp/testmakefile")
- oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.cpp"), "/tmp/test.cpp")
-
- @testcase(203)
- def test_gcc_compile(self):
- (status, output) = self.target.run('gcc /tmp/test.c -o /tmp/test -lm')
- self.assertEqual(status, 0, msg="gcc compile failed, output: %s" % output)
- (status, output) = self.target.run('/tmp/test')
- self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
-
- @testcase(200)
- def test_gpp_compile(self):
- (status, output) = self.target.run('g++ /tmp/test.c -o /tmp/test -lm')
- self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
- (status, output) = self.target.run('/tmp/test')
- self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
-
- @testcase(1142)
- def test_gpp2_compile(self):
- (status, output) = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm')
- self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
- (status, output) = self.target.run('/tmp/test')
- self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
-
- @testcase(204)
- def test_make(self):
- (status, output) = self.target.run('cd /tmp; make -f testmakefile')
- self.assertEqual(status, 0, msg="running make failed, output %s" % output)
-
- @classmethod
- def tearDownClass(self):
- oeRuntimeTest.tc.target.run("rm /tmp/test.c /tmp/test.o /tmp/test /tmp/testmakefile")
diff --git a/meta/lib/oeqa/runtime/kernelmodule.py b/meta/lib/oeqa/runtime/kernelmodule.py
deleted file mode 100644
index 38ca184540..0000000000
--- a/meta/lib/oeqa/runtime/kernelmodule.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import unittest
-import os
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("tools-sdk"):
- skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
-
-
-class KernelModuleTest(oeRuntimeTest):
-
- def setUpLocal(self):
- self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod.c"), "/tmp/hellomod.c")
- self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod_makefile"), "/tmp/Makefile")
-
- @testcase('316')
- @skipUnlessPassed('test_ssh')
- @skipUnlessPassed('test_gcc_compile')
- def test_kernel_module(self):
- cmds = [
- 'cd /usr/src/kernel && make scripts',
- 'cd /tmp && make',
- 'cd /tmp && insmod hellomod.ko',
- 'lsmod | grep hellomod',
- 'dmesg | grep Hello',
- 'rmmod hellomod', 'dmesg | grep "Cleaning up hellomod"'
- ]
- for cmd in cmds:
- (status, output) = self.target.run(cmd, 900)
- self.assertEqual(status, 0, msg="\n".join([cmd, output]))
-
- def tearDownLocal(self):
- self.target.run('rm -f /tmp/Makefile /tmp/hellomod.c')
diff --git a/meta/lib/oeqa/runtime/ldd.py b/meta/lib/oeqa/runtime/ldd.py
deleted file mode 100644
index 47b3885df2..0000000000
--- a/meta/lib/oeqa/runtime/ldd.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("tools-sdk"):
- skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
-
-class LddTest(oeRuntimeTest):
-
- @testcase(962)
- @skipUnlessPassed('test_ssh')
- def test_ldd_exists(self):
- (status, output) = self.target.run('which ldd')
- self.assertEqual(status, 0, msg = "ldd does not exist in PATH: which ldd: %s" % output)
-
- @testcase(239)
- @skipUnlessPassed('test_ldd_exists')
- def test_ldd_rtldlist_check(self):
- (status, output) = self.target.run('for i in $(which ldd | xargs cat | grep "^RTLDLIST"|cut -d\'=\' -f2|tr -d \'"\'); do test -f $i && echo $i && break; done')
- self.assertEqual(status, 0, msg = "ldd path not correct or RTLDLIST files don't exist. ")
diff --git a/meta/lib/oeqa/runtime/loader.py b/meta/lib/oeqa/runtime/loader.py
new file mode 100644
index 0000000000..7041ddfde8
--- /dev/null
+++ b/meta/lib/oeqa/runtime/loader.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.loader import OETestLoader
+from oeqa.runtime.case import OERuntimeTestCase
+
+class OERuntimeTestLoader(OETestLoader):
+ caseClass = OERuntimeTestCase
+
+ def _getTestCase(self, testCaseClass, tcName):
+ case = super(OERuntimeTestLoader, self)._getTestCase(testCaseClass, tcName)
+
+ # Adds custom attributes to the OERuntimeTestCase
+ setattr(case, 'target', self.tc.target)
+
+ return case
diff --git a/meta/lib/oeqa/runtime/logrotate.py b/meta/lib/oeqa/runtime/logrotate.py
deleted file mode 100644
index de300bf55f..0000000000
--- a/meta/lib/oeqa/runtime/logrotate.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=289 testcase
-# Note that the image under test must have logrotate installed
-
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasPackage("logrotate"):
- skipModule("No logrotate package in image")
-
-
-class LogrotateTest(oeRuntimeTest):
-
- @skipUnlessPassed("test_ssh")
- def test_1_logrotate_setup(self):
- (status, output) = self.target.run('mkdir $HOME/logrotate_dir')
- self.assertEqual(status, 0, msg = "Could not create logrotate_dir. Output: %s" % output)
- (status, output) = self.target.run("sed -i \"s#wtmp {#wtmp {\\n olddir $HOME/logrotate_dir#\" /etc/logrotate.conf")
- self.assertEqual(status, 0, msg = "Could not write to logrotate.conf file. Status and output: %s and %s)" % (status, output))
-
- @testcase(289)
- @skipUnlessPassed("test_1_logrotate_setup")
- def test_2_logrotate(self):
- (status, output) = self.target.run('logrotate -f /etc/logrotate.conf')
- self.assertEqual(status, 0, msg = "logrotate service could not be reloaded. Status and output: %s and %s" % (status, output))
- output = self.target.run('ls -la $HOME/logrotate_dir/ | wc -l')[1]
- self.assertTrue(int(output)>=3, msg = "new logfile could not be created. List of files within log directory: %s" %(self.target.run('ls -la $HOME/logrotate_dir')[1]))
diff --git a/meta/lib/oeqa/runtime/multilib.py b/meta/lib/oeqa/runtime/multilib.py
deleted file mode 100644
index 593d385021..0000000000
--- a/meta/lib/oeqa/runtime/multilib.py
+++ /dev/null
@@ -1,42 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- multilibs = oeRuntimeTest.tc.d.getVar("MULTILIBS", True) or ""
- if "multilib:lib32" not in multilibs:
- skipModule("this isn't a multilib:lib32 image")
-
-
-class MultilibTest(oeRuntimeTest):
-
- def archtest(self, binary, arch):
- """
- Check that ``binary`` has the ELF class ``arch`` (e.g. ELF32/ELF64).
- """
-
- (status, output) = self.target.run("readelf -h %s" % binary)
- self.assertEqual(status, 0, "Failed to readelf %s" % binary)
-
- l = [l.split()[1] for l in output.split('\n') if "Class:" in l]
- if l:
- theclass = l[0]
- else:
- self.fail("Cannot parse readelf output\n" + s)
-
- self.assertEqual(theclass, arch, msg="%s isn't %s (is %s)" % (binary, arch, theclass))
-
- @skipUnlessPassed('test_ssh')
- def test_check_multilib_libc(self):
- """
- Check that a multilib image has both 32-bit and 64-bit libc in.
- """
- self.archtest("/lib/libc.so.6", "ELF32")
- self.archtest("/lib64/libc.so.6", "ELF64")
-
- @testcase('279')
- @skipUnlessPassed('test_check_multilib_libc')
- def test_file_connman(self):
- self.assertTrue(oeRuntimeTest.hasPackage('lib32-connman'), msg="This test assumes lib32-connman is installed")
-
- self.archtest("/usr/sbin/connmand", "ELF32")
diff --git a/meta/lib/oeqa/runtime/pam.py b/meta/lib/oeqa/runtime/pam.py
deleted file mode 100644
index c8205c9abc..0000000000
--- a/meta/lib/oeqa/runtime/pam.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=287 testcase
-# Note that the image under test must have "pam" in DISTRO_FEATURES
-
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("pam"):
- skipModule("target doesn't have 'pam' in DISTRO_FEATURES")
-
-
-class PamBasicTest(oeRuntimeTest):
-
- @testcase(287)
- @skipUnlessPassed('test_ssh')
- def test_pam(self):
- (status, output) = self.target.run('login --help')
- self.assertEqual(status, 1, msg = "login command does not work as expected. Status and output:%s and %s" %(status, output))
- (status, output) = self.target.run('passwd --help')
- self.assertEqual(status, 0, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output))
- (status, output) = self.target.run('su --help')
- self.assertEqual(status, 0, msg = "su command does not work as expected. Status and output:%s and %s" %(status, output))
- (status, output) = self.target.run('useradd --help')
- self.assertEqual(status, 0, msg = "useradd command does not work as expected. Status and output:%s and %s" %(status, output))
diff --git a/meta/lib/oeqa/runtime/parselogs.py b/meta/lib/oeqa/runtime/parselogs.py
deleted file mode 100644
index 2d4a13375b..0000000000
--- a/meta/lib/oeqa/runtime/parselogs.py
+++ /dev/null
@@ -1,313 +0,0 @@
-import os
-import unittest
-import subprocess
-from oeqa.oetest import oeRuntimeTest
-from oeqa.utils.decorators import *
-
-#in the future these lists could be moved outside of module
-errors = ["error", "cannot", "can\'t", "failed"]
-
-common_errors = [
- "(WW) warning, (EE) error, (NI) not implemented, (??) unknown.",
- "dma timeout",
- "can\'t add hid device:",
- "usbhid: probe of ",
- "_OSC failed (AE_ERROR)",
- "_OSC failed (AE_SUPPORT)",
- "AE_ALREADY_EXISTS",
- "ACPI _OSC request failed (AE_SUPPORT)",
- "can\'t disable ASPM",
- "Failed to load module \"vesa\"",
- "Failed to load module vesa",
- "Failed to load module \"modesetting\"",
- "Failed to load module modesetting",
- "Failed to load module \"glx\"",
- "Failed to load module \"fbdev\"",
- "Failed to load module fbdev",
- "Failed to load module glx",
- "[drm] Cannot find any crtc or sizes - going 1024x768",
- "_OSC failed (AE_NOT_FOUND); disabling ASPM",
- "Open ACPI failed (/var/run/acpid.socket) (No such file or directory)",
- "NX (Execute Disable) protection cannot be enabled: non-PAE kernel!",
- "hd.: possibly failed opcode",
- 'NETLINK INITIALIZATION FAILED',
- 'kernel: Cannot find map file',
- 'omap_hwmod: debugss: _wait_target_disable failed',
- 'VGA arbiter: cannot open kernel arbiter, no multi-card support',
- 'Failed to find URL:http://ipv4.connman.net/online/status.html',
- 'Online check failed for',
- 'netlink init failed',
- 'Fast TSC calibration',
- "BAR 0-9",
- "Failed to load module \"ati\"",
- "controller can't do DEVSLP, turning off",
- "stmmac_dvr_probe: warning: cannot get CSR clock",
- "error: couldn\'t mount because of unsupported optional features",
- ]
-
-video_related = [
- "uvesafb",
-]
-
-x86_common = [
- '[drm:psb_do_init] *ERROR* Debug is',
- 'wrong ELF class',
- 'Could not enable PowerButton event',
- 'probe of LNXPWRBN:00 failed with error -22',
- 'pmd_set_huge: Cannot satisfy',
- 'failed to setup card detect gpio',
- 'amd_nb: Cannot enumerate AMD northbridges',
-] + common_errors
-
-qemux86_common = [
- 'wrong ELF class',
- "fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.",
- "can't claim BAR ",
- 'amd_nb: Cannot enumerate AMD northbridges',
- 'uvesafb: 5000 ms task timeout error',
- 'detected fb_set_par error, error code: -22',
- 'Getting VBE info block failed',
- 'vbe_init() failed with -22',
- 'uvesafb: mode switch failed',
- 'tsc: HPET/PMTIMER calibration failed',
-] + common_errors
-
-ignore_errors = {
- 'default' : common_errors,
- 'qemux86' : [
- 'Failed to access perfctr msr (MSR',
- 'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
- ] + qemux86_common,
- 'qemux86-64' : qemux86_common,
- 'qemumips' : [
- 'Failed to load module "glx"',
- 'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
- ] + common_errors,
- 'qemumips64' : [
- 'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
- ] + common_errors,
- 'qemuppc' : [
- 'PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]',
- 'host side 80-wire cable detection failed, limiting max speed',
- 'mode "640x480" test failed',
- 'Failed to load module "glx"',
- 'can\'t handle BAR above 4GB',
- 'Cannot reserve Legacy IO',
- ] + common_errors,
- 'qemuarm' : [
- 'mmci-pl18x: probe of fpga:05 failed with error -22',
- 'mmci-pl18x: probe of fpga:0b failed with error -22',
- 'Failed to load module "glx"',
- 'OF: amba_device_add() failed (-19) for /amba/smc@10100000',
- 'OF: amba_device_add() failed (-19) for /amba/mpmc@10110000',
- 'OF: amba_device_add() failed (-19) for /amba/sctl@101e0000',
- 'OF: amba_device_add() failed (-19) for /amba/watchdog@101e1000',
- 'OF: amba_device_add() failed (-19) for /amba/sci@101f0000',
- 'OF: amba_device_add() failed (-19) for /amba/ssp@101f4000',
- 'OF: amba_device_add() failed (-19) for /amba/fpga/sci@a000',
- 'Failed to initialize \'/amba/timer@101e3000\': -22',
- 'jitterentropy: Initialization failed with host not compliant with requirements: 2',
- ] + common_errors,
- 'qemuarm64' : [
- 'Fatal server error:',
- '(EE) Server terminated with error (1). Closing log file.',
- 'dmi: Firmware registration failed.',
- 'irq: type mismatch, failed to map hwirq-27 for /intc',
- ] + common_errors,
- 'emenlow' : [
- '[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness',
- '(EE) Failed to load module "psb"',
- '(EE) Failed to load module psb',
- '(EE) Failed to load module "psbdrv"',
- '(EE) Failed to load module psbdrv',
- '(EE) open /dev/fb0: No such file or directory',
- '(EE) AIGLX: reverting to software rendering',
- ] + x86_common,
- 'intel-core2-32' : [
- 'ACPI: No _BQC method, cannot determine initial brightness',
- '[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness',
- '(EE) Failed to load module "psb"',
- '(EE) Failed to load module psb',
- '(EE) Failed to load module "psbdrv"',
- '(EE) Failed to load module psbdrv',
- '(EE) open /dev/fb0: No such file or directory',
- '(EE) AIGLX: reverting to software rendering',
- 'dmi: Firmware registration failed.',
- 'ioremap error for 0x78',
- ] + x86_common,
- 'intel-corei7-64' : x86_common,
- 'crownbay' : x86_common,
- 'genericx86' : x86_common,
- 'genericx86-64' : [
- 'Direct firmware load for i915',
- 'Failed to load firmware i915',
- 'Failed to fetch GuC',
- 'Failed to initialize GuC',
- 'The driver is built-in, so to load the firmware you need to',
- ] + x86_common,
- 'edgerouter' : [
- 'Fatal server error:',
- ] + common_errors,
- 'jasperforest' : [
- 'Activated service \'org.bluez\' failed:',
- 'Unable to find NFC netlink family',
- ] + common_errors,
-}
-
-log_locations = ["/var/log/","/var/log/dmesg", "/tmp/dmesg_output.log"]
-
-class ParseLogsTest(oeRuntimeTest):
-
- @classmethod
- def setUpClass(self):
- self.errors = errors
-
- # When systemd is enabled we need to notice errors on
- # circular dependencies in units.
- if self.hasFeature("systemd"):
- self.errors.extend([
- 'Found ordering cycle on',
- 'Breaking ordering cycle by deleting job',
- 'deleted to break ordering cycle',
- 'Ordering cycle found, skipping',
- ])
-
- self.ignore_errors = ignore_errors
- self.log_locations = log_locations
- self.msg = ""
- (is_lsb, location) = oeRuntimeTest.tc.target.run("which LSB_Test.sh")
- if is_lsb == 0:
- for machine in self.ignore_errors:
- self.ignore_errors[machine] = self.ignore_errors[machine] + video_related
-
- def getMachine(self):
- return oeRuntimeTest.tc.d.getVar("MACHINE", True)
-
- def getWorkdir(self):
- return oeRuntimeTest.tc.d.getVar("WORKDIR", True)
-
- #get some information on the CPU of the machine to display at the beginning of the output. This info might be useful in some cases.
- def getHardwareInfo(self):
- hwi = ""
- (status, cpu_name) = self.target.run("cat /proc/cpuinfo | grep \"model name\" | head -n1 | awk 'BEGIN{FS=\":\"}{print $2}'")
- (status, cpu_physical_cores) = self.target.run("cat /proc/cpuinfo | grep \"cpu cores\" | head -n1 | awk {'print $4'}")
- (status, cpu_logical_cores) = self.target.run("cat /proc/cpuinfo | grep \"processor\" | wc -l")
- (status, cpu_arch) = self.target.run("uname -m")
- hwi += "Machine information: \n"
- hwi += "*******************************\n"
- hwi += "Machine name: "+self.getMachine()+"\n"
- hwi += "CPU: "+str(cpu_name)+"\n"
- hwi += "Arch: "+str(cpu_arch)+"\n"
- hwi += "Physical cores: "+str(cpu_physical_cores)+"\n"
- hwi += "Logical cores: "+str(cpu_logical_cores)+"\n"
- hwi += "*******************************\n"
- return hwi
-
- #go through the log locations provided and if it's a folder create a list with all the .log files in it, if it's a file just add
- #it to that list
- def getLogList(self, log_locations):
- logs = []
- for location in log_locations:
- (status, output) = self.target.run("test -f "+str(location))
- if (status == 0):
- logs.append(str(location))
- else:
- (status, output) = self.target.run("test -d "+str(location))
- if (status == 0):
- (status, output) = self.target.run("find "+str(location)+"/*.log -maxdepth 1 -type f")
- if (status == 0):
- output = output.splitlines()
- for logfile in output:
- logs.append(os.path.join(location,str(logfile)))
- return logs
-
- #copy the log files to be parsed locally
- def transfer_logs(self, log_list):
- workdir = self.getWorkdir()
- self.target_logs = workdir + '/' + 'target_logs'
- target_logs = self.target_logs
- if not os.path.exists(target_logs):
- os.makedirs(target_logs)
- bb.utils.remove(self.target_logs + "/*")
- for f in log_list:
- self.target.copy_from(f, target_logs)
-
- #get the local list of logs
- def get_local_log_list(self, log_locations):
- self.transfer_logs(self.getLogList(log_locations))
- logs = [ os.path.join(self.target_logs, f) for f in os.listdir(self.target_logs) if os.path.isfile(os.path.join(self.target_logs, f)) ]
- return logs
-
- #build the grep command to be used with filters and exclusions
- def build_grepcmd(self, errors, ignore_errors, log):
- grepcmd = "grep "
- grepcmd +="-Ei \""
- for error in errors:
- grepcmd += error+"|"
- grepcmd = grepcmd[:-1]
- grepcmd += "\" "+str(log)+" | grep -Eiv \'"
- try:
- errorlist = ignore_errors[self.getMachine()]
- except KeyError:
- self.msg += "No ignore list found for this machine, using default\n"
- errorlist = ignore_errors['default']
- for ignore_error in errorlist:
- ignore_error = ignore_error.replace("(", "\(")
- ignore_error = ignore_error.replace(")", "\)")
- ignore_error = ignore_error.replace("'", ".")
- ignore_error = ignore_error.replace("?", "\?")
- ignore_error = ignore_error.replace("[", "\[")
- ignore_error = ignore_error.replace("]", "\]")
- ignore_error = ignore_error.replace("*", "\*")
- ignore_error = ignore_error.replace("0-9", "[0-9]")
- grepcmd += ignore_error+"|"
- grepcmd = grepcmd[:-1]
- grepcmd += "\'"
- return grepcmd
-
- #grep only the errors so that their context could be collected. Default context is 10 lines before and after the error itself
- def parse_logs(self, errors, ignore_errors, logs, lines_before = 10, lines_after = 10):
- results = {}
- rez = []
- grep_output = ''
- for log in logs:
- result = None
- thegrep = self.build_grepcmd(errors, ignore_errors, log)
- try:
- result = subprocess.check_output(thegrep, shell=True).decode("utf-8")
- except:
- pass
- if (result is not None):
- results[log.replace('target_logs/','')] = {}
- rez = result.splitlines()
- for xrez in rez:
- try:
- grep_output = subprocess.check_output(['grep', '-F', xrez, '-B', str(lines_before), '-A', str(lines_after), log]).decode("utf-8")
- except:
- pass
- results[log.replace('target_logs/','')][xrez]=grep_output
- return results
-
- #get the output of dmesg and write it in a file. This file is added to log_locations.
- def write_dmesg(self):
- (status, dmesg) = self.target.run("dmesg > /tmp/dmesg_output.log")
-
- @testcase(1059)
- @skipUnlessPassed('test_ssh')
- def test_parselogs(self):
- self.write_dmesg()
- log_list = self.get_local_log_list(self.log_locations)
- result = self.parse_logs(self.errors, self.ignore_errors, log_list)
- print(self.getHardwareInfo())
- errcount = 0
- for log in result:
- self.msg += "Log: "+log+"\n"
- self.msg += "-----------------------\n"
- for error in result[log]:
- errcount += 1
- self.msg += "Central error: "+str(error)+"\n"
- self.msg += "***********************\n"
- self.msg += result[str(log)][str(error)]+"\n"
- self.msg += "***********************\n"
- self.msg += "%s errors found in logs." % errcount
- self.assertEqual(errcount, 0, msg=self.msg)
diff --git a/meta/lib/oeqa/runtime/perl.py b/meta/lib/oeqa/runtime/perl.py
deleted file mode 100644
index e044d0a5fe..0000000000
--- a/meta/lib/oeqa/runtime/perl.py
+++ /dev/null
@@ -1,30 +0,0 @@
-import unittest
-import os
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasPackage("perl"):
- skipModule("No perl package in the image")
-
-
-class PerlTest(oeRuntimeTest):
-
- @classmethod
- def setUpClass(self):
- oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.pl"), "/tmp/test.pl")
-
- @testcase(1141)
- def test_perl_exists(self):
- (status, output) = self.target.run('which perl')
- self.assertEqual(status, 0, msg="Perl binary not in PATH or not on target.")
-
- @testcase(208)
- def test_perl_works(self):
- (status, output) = self.target.run('perl /tmp/test.pl')
- self.assertEqual(status, 0, msg="Exit status was not 0. Output: %s" % output)
- self.assertEqual(output, "the value of a is 0.01", msg="Incorrect output: %s" % output)
-
- @classmethod
- def tearDownClass(self):
- oeRuntimeTest.tc.target.run("rm /tmp/test.pl")
diff --git a/meta/lib/oeqa/runtime/ping.py b/meta/lib/oeqa/runtime/ping.py
deleted file mode 100644
index 0f27447926..0000000000
--- a/meta/lib/oeqa/runtime/ping.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import subprocess
-import unittest
-import sys
-import time
-from oeqa.oetest import oeRuntimeTest
-from oeqa.utils.decorators import *
-
-class PingTest(oeRuntimeTest):
-
- @testcase(964)
- def test_ping(self):
- output = ''
- count = 0
- endtime = time.time() + 60
- while count < 5 and time.time() < endtime:
- proc = subprocess.Popen("ping -c 1 %s" % self.target.ip, shell=True, stdout=subprocess.PIPE)
- output += proc.communicate()[0].decode("utf-8")
- if proc.poll() == 0:
- count += 1
- else:
- count = 0
- self.assertEqual(count, 5, msg = "Expected 5 consecutive replies, got %d.\nping output is:\n%s" % (count,output))
diff --git a/meta/lib/oeqa/runtime/python.py b/meta/lib/oeqa/runtime/python.py
deleted file mode 100644
index 29a231c7c3..0000000000
--- a/meta/lib/oeqa/runtime/python.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import unittest
-import os
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasPackage("python-core"):
- skipModule("No python package in the image")
-
-
-class PythonTest(oeRuntimeTest):
-
- @classmethod
- def setUpClass(self):
- oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.py"), "/tmp/test.py")
-
- @testcase(1145)
- def test_python_exists(self):
- (status, output) = self.target.run('which python')
- self.assertEqual(status, 0, msg="Python binary not in PATH or not on target.")
-
- @testcase(965)
- def test_python_stdout(self):
- (status, output) = self.target.run('python /tmp/test.py')
- self.assertEqual(status, 0, msg="Exit status was not 0. Output: %s" % output)
- self.assertEqual(output, "the value of a is 0.01", msg="Incorrect output: %s" % output)
-
- @testcase(1146)
- def test_python_testfile(self):
- (status, output) = self.target.run('ls /tmp/testfile.python')
- self.assertEqual(status, 0, msg="Python test file generate failed.")
-
- @classmethod
- def tearDownClass(self):
- oeRuntimeTest.tc.target.run("rm /tmp/test.py /tmp/testfile.python")
diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
deleted file mode 100644
index 7f514ca00c..0000000000
--- a/meta/lib/oeqa/runtime/rpm.py
+++ /dev/null
@@ -1,120 +0,0 @@
-import unittest
-import os
-import fnmatch
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("package-management"):
- skipModule("rpm module skipped: target doesn't have package-management in IMAGE_FEATURES")
- if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]:
- skipModule("rpm module skipped: target doesn't have rpm as primary package manager")
-
-
-class RpmBasicTest(oeRuntimeTest):
-
- @testcase(960)
- @skipUnlessPassed('test_ssh')
- def test_rpm_help(self):
- (status, output) = self.target.run('rpm --help')
- self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
-
- @testcase(191)
- @skipUnlessPassed('test_rpm_help')
- def test_rpm_query(self):
- (status, output) = self.target.run('rpm -q rpm')
- self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
-
-class RpmInstallRemoveTest(oeRuntimeTest):
-
- @classmethod
- def setUpClass(self):
- pkgarch = oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True).replace("-", "_")
- rpmdir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), "rpm", pkgarch)
- # pick rpm-doc as a test file to get installed, because it's small and it will always be built for standard targets
- for f in fnmatch.filter(os.listdir(rpmdir), "rpm-doc-*.%s.rpm" % pkgarch):
- testrpmfile = f
- oeRuntimeTest.tc.target.copy_to(os.path.join(rpmdir,testrpmfile), "/tmp/rpm-doc.rpm")
-
- @testcase(192)
- @skipUnlessPassed('test_rpm_help')
- def test_rpm_install(self):
- (status, output) = self.target.run('rpm -ivh /tmp/rpm-doc.rpm')
- self.assertEqual(status, 0, msg="Failed to install rpm-doc package: %s" % output)
-
- @testcase(194)
- @skipUnlessPassed('test_rpm_install')
- def test_rpm_remove(self):
- (status,output) = self.target.run('rpm -e rpm-doc')
- self.assertEqual(status, 0, msg="Failed to remove rpm-doc package: %s" % output)
-
- @testcase(1096)
- @skipUnlessPassed('test_ssh')
- def test_rpm_query_nonroot(self):
-
- def set_up_test_user(u):
- (status, output) = self.target.run("id -u %s" % u)
- if status == 0:
- pass
- else:
- (status, output) = self.target.run("useradd %s" % u)
- self.assertTrue(status == 0, msg="Failed to create new user: " + output)
-
- def exec_as_test_user(u):
- (status, output) = self.target.run("su -c id %s" % u)
- self.assertTrue("({0})".format(u) in output, msg="Failed to execute as new user")
- (status, output) = self.target.run("su -c \"rpm -qa\" %s " % u)
- self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output))
-
- def unset_up_test_user(u):
- (status, output) = self.target.run("userdel -r %s" % u)
- self.assertTrue(status == 0, msg="Failed to erase user: %s" % output)
-
- tuser = 'test1'
-
- try:
- set_up_test_user(tuser)
- exec_as_test_user(tuser)
- finally:
- unset_up_test_user(tuser)
-
- @testcase(195)
- @skipUnlessPassed('test_rpm_install')
- def test_check_rpm_install_removal_log_file_size(self):
- """
- Summary: Check rpm install/removal log file size
- Expected: There should be some method to keep rpm log in a small size .
- Product: BSPs
- Author: Alexandru Georgescu <alexandru.c.georgescu@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
- db_files_cmd = 'ls /var/lib/rpm/__db.*'
- get_log_size_cmd = "du /var/lib/rpm/log/log.* | awk '{print $1}'"
-
- # Make sure that some database files are under /var/lib/rpm as '__db.xxx'
- (status, output) = self.target.run(db_files_cmd)
- self.assertEqual(0, status, 'Failed to find database files under /var/lib/rpm/ as __db.xxx')
-
- # Remove the package just in case
- self.target.run('rpm -e rpm-doc')
-
- # Install/Remove a package 10 times
- for i in range(10):
- (status, output) = self.target.run('rpm -ivh /tmp/rpm-doc.rpm')
- self.assertEqual(0, status, "Failed to install rpm-doc package. Reason: {}".format(output))
-
- (status, output) = self.target.run('rpm -e rpm-doc')
- self.assertEqual(0, status, "Failed to remove rpm-doc package. Reason: {}".format(output))
-
- # Get the size of log file
- (status, output) = self.target.run(get_log_size_cmd)
- self.assertEqual(0, status, 'Failed to get the final size of the log file.')
-
- # Compare each log size
- for log_file_size in output:
- self.assertLessEqual(int(log_file_size), 11264,
- 'Log file size is greater that expected (~10MB), found {} bytes'.format(log_file_size))
-
- @classmethod
- def tearDownClass(self):
- oeRuntimeTest.tc.target.run('rm -f /tmp/rpm-doc.rpm')
diff --git a/meta/lib/oeqa/runtime/scanelf.py b/meta/lib/oeqa/runtime/scanelf.py
deleted file mode 100644
index 67e02ff455..0000000000
--- a/meta/lib/oeqa/runtime/scanelf.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasPackage("pax-utils"):
- skipModule("pax-utils package not installed")
-
-class ScanelfTest(oeRuntimeTest):
-
- def setUpLocal(self):
- self.scancmd = 'scanelf --quiet --recursive --mount --ldpath --path'
-
- @testcase(966)
- @skipUnlessPassed('test_ssh')
- def test_scanelf_textrel(self):
- # print TEXTREL information
- self.scancmd += " --textrel"
- (status, output) = self.target.run(self.scancmd)
- self.assertEqual(output.strip(), "", "\n".join([self.scancmd, output]))
-
- @testcase(967)
- @skipUnlessPassed('test_ssh')
- def test_scanelf_rpath(self):
- # print RPATH information
- self.scancmd += " --rpath"
- (status, output) = self.target.run(self.scancmd)
- self.assertEqual(output.strip(), "", "\n".join([self.scancmd, output]))
diff --git a/meta/lib/oeqa/runtime/scp.py b/meta/lib/oeqa/runtime/scp.py
deleted file mode 100644
index 48e87d2d0b..0000000000
--- a/meta/lib/oeqa/runtime/scp.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import os
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import skipUnlessPassed, testcase
-
-def setUpModule():
- if not (oeRuntimeTest.hasPackage("dropbear") or oeRuntimeTest.hasPackage("openssh-sshd")):
- skipModule("No ssh package in image")
-
-class ScpTest(oeRuntimeTest):
-
- @testcase(220)
- @skipUnlessPassed('test_ssh')
- def test_scp_file(self):
- test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR", True)
- test_file_path = os.path.join(test_log_dir, 'test_scp_file')
- with open(test_file_path, 'w') as test_scp_file:
- test_scp_file.seek(2 ** 22 - 1)
- test_scp_file.write(os.linesep)
- (status, output) = self.target.copy_to(test_file_path, '/tmp/test_scp_file')
- self.assertEqual(status, 0, msg = "File could not be copied. Output: %s" % output)
- (status, output) = self.target.run("ls -la /tmp/test_scp_file")
- self.assertEqual(status, 0, msg = "SCP test failed")
diff --git a/meta/lib/oeqa/runtime/skeletoninit.py b/meta/lib/oeqa/runtime/skeletoninit.py
deleted file mode 100644
index cb0cb9b4cf..0000000000
--- a/meta/lib/oeqa/runtime/skeletoninit.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=284 testcase
-# Note that the image under test must have meta-skeleton layer in bblayers and IMAGE_INSTALL_append = " service" in local.conf
-
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasPackage("service"):
- skipModule("No service package in image")
-
-
-class SkeletonBasicTest(oeRuntimeTest):
-
- @skipUnlessPassed('test_ssh')
- @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", False), "Not appropiate for systemd image")
- def test_skeleton_availability(self):
- (status, output) = self.target.run('ls /etc/init.d/skeleton')
- self.assertEqual(status, 0, msg = "skeleton init script not found. Output:\n%s " % output)
- (status, output) = self.target.run('ls /usr/sbin/skeleton-test')
- self.assertEqual(status, 0, msg = "skeleton-test not found. Output:\n%s" % output)
-
- @testcase(284)
- @skipUnlessPassed('test_skeleton_availability')
- @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", False), "Not appropiate for systemd image")
- def test_skeleton_script(self):
- output1 = self.target.run("/etc/init.d/skeleton start")[1]
- (status, output2) = self.target.run(oeRuntimeTest.pscmd + ' | grep [s]keleton-test')
- self.assertEqual(status, 0, msg = "Skeleton script could not be started:\n%s\n%s" % (output1, output2))
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py
deleted file mode 100644
index 6cdb10d631..0000000000
--- a/meta/lib/oeqa/runtime/smart.py
+++ /dev/null
@@ -1,218 +0,0 @@
-import unittest
-import re
-import oe
-import subprocess
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.httpserver import HTTPService
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("package-management"):
- skipModule("Image doesn't have package management feature")
- if not oeRuntimeTest.hasPackage("smartpm"):
- skipModule("Image doesn't have smart installed")
- if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]:
- skipModule("Rpm is not the primary package manager")
-
-class SmartTest(oeRuntimeTest):
-
- @skipUnlessPassed('test_smart_help')
- def smart(self, command, expected = 0):
- command = 'smart %s' % command
- status, output = self.target.run(command, 1500)
- message = os.linesep.join([command, output])
- self.assertEqual(status, expected, message)
- self.assertFalse("Cannot allocate memory" in output, message)
- return output
-
-class SmartBasicTest(SmartTest):
-
- @testcase(716)
- @skipUnlessPassed('test_ssh')
- def test_smart_help(self):
- self.smart('--help')
-
- @testcase(968)
- def test_smart_version(self):
- self.smart('--version')
-
- @testcase(721)
- def test_smart_info(self):
- self.smart('info python-smartpm')
-
- @testcase(421)
- def test_smart_query(self):
- self.smart('query python-smartpm')
-
- @testcase(720)
- def test_smart_search(self):
- self.smart('search python-smartpm')
-
- @testcase(722)
- def test_smart_stats(self):
- self.smart('stats')
-
-class SmartRepoTest(SmartTest):
-
- @classmethod
- def create_index(self, arg):
- index_cmd = arg
- try:
- bb.note("Executing '%s' ..." % index_cmd)
- result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
- except subprocess.CalledProcessError as e:
- return("Index creation command '%s' failed with return code %d:\n%s" %
- (e.cmd, e.returncode, e.output.decode("utf-8")))
- if result:
- bb.note(result)
- return None
-
- @classmethod
- def setUpClass(self):
- self.repolist = []
-
- # Index RPMs
- rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
- index_cmds = []
- rpm_dirs_found = False
- archs = (oeRuntimeTest.tc.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
- for arch in archs:
- rpm_dir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR_RPM', True), arch)
- idx_path = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True), 'rpm', arch)
- db_path = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True), 'rpmdb', arch)
- if not os.path.isdir(rpm_dir):
- continue
- if os.path.exists(db_path):
- bb.utils.remove(dbpath, True)
- lockfilename = oeRuntimeTest.tc.d.getVar('DEPLOY_DIR_RPM', True) + "/rpm.lock"
- lf = bb.utils.lockfile(lockfilename, False)
- oe.path.copyhardlinktree(rpm_dir, idx_path)
- # Full indexes overload a 256MB image so reduce the number of rpms
- # in the feed. Filter to p* since we use the psplash packages and
- # this leaves some allarch and machine arch packages too.
- bb.utils.remove(idx_path + "*/[a-oq-z]*.rpm")
- bb.utils.unlockfile(lf)
- index_cmds.append("%s --dbpath %s --update -q %s" % (rpm_createrepo, db_path, idx_path))
- rpm_dirs_found = True
- # Create repodata¬
- result = oe.utils.multiprocess_exec(index_cmds, self.create_index)
- if result:
- bb.fatal('%s' % ('\n'.join(result)))
- self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('WORKDIR', True), oeRuntimeTest.tc.target.server_ip)
- self.repo_server.start()
-
- @classmethod
- def tearDownClass(self):
- self.repo_server.stop()
- for i in self.repolist:
- oeRuntimeTest.tc.target.run('smart channel -y --remove '+str(i))
-
- @testcase(1143)
- def test_smart_channel(self):
- self.smart('channel', 1)
-
- @testcase(719)
- def test_smart_channel_add(self):
- image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True)
- deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype)
- pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS', True).replace("-","_").split()
- for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)):
- if arch in pkgarchs:
- self.smart('channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url))
- self.repolist.append(arch)
- self.smart('update')
-
- @testcase(969)
- def test_smart_channel_help(self):
- self.smart('channel --help')
-
- @testcase(970)
- def test_smart_channel_list(self):
- self.smart('channel --list')
-
- @testcase(971)
- def test_smart_channel_show(self):
- self.smart('channel --show')
-
- @testcase(717)
- def test_smart_channel_rpmsys(self):
- self.smart('channel --show rpmsys')
- self.smart('channel --disable rpmsys')
- self.smart('channel --enable rpmsys')
-
- @testcase(1144)
- @skipUnlessPassed('test_smart_channel_add')
- def test_smart_install(self):
- self.smart('remove -y psplash-default')
- self.smart('install -y psplash-default')
-
- @testcase(728)
- @skipUnlessPassed('test_smart_install')
- def test_smart_install_dependency(self):
- self.smart('remove -y psplash')
- self.smart('install -y psplash-default')
-
- @testcase(723)
- @skipUnlessPassed('test_smart_channel_add')
- def test_smart_install_from_disk(self):
- self.smart('remove -y psplash-default')
- self.smart('download psplash-default')
- self.smart('install -y ./psplash-default*')
-
- @testcase(725)
- @skipUnlessPassed('test_smart_channel_add')
- def test_smart_install_from_http(self):
- output = self.smart('download --urls psplash-default')
- url = re.search('(http://.*/psplash-default.*\.rpm)', output)
- self.assertTrue(url, msg="Couln't find download url in %s" % output)
- self.smart('remove -y psplash-default')
- self.smart('install -y %s' % url.group(0))
-
- @testcase(729)
- @skipUnlessPassed('test_smart_install')
- def test_smart_reinstall(self):
- self.smart('reinstall -y psplash-default')
-
- @testcase(727)
- @skipUnlessPassed('test_smart_channel_add')
- def test_smart_remote_repo(self):
- self.smart('update')
- self.smart('install -y psplash')
- self.smart('remove -y psplash')
-
- @testcase(726)
- def test_smart_local_dir(self):
- self.target.run('mkdir /tmp/myrpmdir')
- self.smart('channel --add myrpmdir type=rpm-dir path=/tmp/myrpmdir -y')
- self.target.run('cd /tmp/myrpmdir')
- self.smart('download psplash')
- output = self.smart('channel --list')
- for i in output.split("\n"):
- if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)):
- self.smart('channel --disable '+str(i))
- self.target.run('cd $HOME')
- self.smart('install psplash')
- for i in output.split("\n"):
- if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)):
- self.smart('channel --enable '+str(i))
- self.smart('channel --remove myrpmdir -y')
- self.target.run("rm -rf /tmp/myrpmdir")
-
- @testcase(718)
- def test_smart_add_rpmdir(self):
- self.target.run('mkdir /tmp/myrpmdir')
- self.smart('channel --add myrpmdir type=rpm-dir path=/tmp/myrpmdir -y')
- self.smart('channel --disable myrpmdir -y')
- output = self.smart('channel --show myrpmdir')
- self.assertTrue("disabled = yes" in output, msg="Failed to disable rpm dir")
- self.smart('channel --enable myrpmdir -y')
- output = self.smart('channel --show myrpmdir')
- self.assertFalse("disabled = yes" in output, msg="Failed to enable rpm dir")
- self.smart('channel --remove myrpmdir -y')
- self.target.run("rm -rf /tmp/myrpmdir")
-
- @testcase(731)
- @skipUnlessPassed('test_smart_channel_add')
- def test_smart_remove_package(self):
- self.smart('install -y psplash')
- self.smart('remove -y psplash')
diff --git a/meta/lib/oeqa/runtime/ssh.py b/meta/lib/oeqa/runtime/ssh.py
deleted file mode 100644
index 0e76d5d512..0000000000
--- a/meta/lib/oeqa/runtime/ssh.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import subprocess
-import unittest
-import sys
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not (oeRuntimeTest.hasPackage("dropbear") or oeRuntimeTest.hasPackage("openssh")):
- skipModule("No ssh package in image")
-
-class SshTest(oeRuntimeTest):
-
- @testcase(224)
- @skipUnlessPassed('test_ping')
- def test_ssh(self):
- (status, output) = self.target.run('uname -a')
- self.assertEqual(status, 0, msg="SSH Test failed: %s" % output)
- (status, output) = self.target.run('cat /etc/masterimage')
- self.assertEqual(status, 1, msg="This isn't the right image - /etc/masterimage shouldn't be here %s" % output)
diff --git a/meta/lib/oeqa/runtime/syslog.py b/meta/lib/oeqa/runtime/syslog.py
deleted file mode 100644
index 8f550329e7..0000000000
--- a/meta/lib/oeqa/runtime/syslog.py
+++ /dev/null
@@ -1,52 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not (oeRuntimeTest.hasPackage("busybox-syslog") or oeRuntimeTest.hasPackage("sysklogd")):
- skipModule("No syslog package in image")
-
-class SyslogTest(oeRuntimeTest):
-
- @testcase(201)
- def test_syslog_running(self):
- (status,output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -i [s]yslogd')
- self.assertEqual(status, 0, msg="no syslogd process, ps output: %s" % self.target.run(oeRuntimeTest.pscmd)[1])
-
-class SyslogTestConfig(oeRuntimeTest):
-
- @testcase(1149)
- @skipUnlessPassed("test_syslog_running")
- def test_syslog_logger(self):
- (status, output) = self.target.run('logger foobar')
- self.assertEqual(status, 0, msg="Can't log into syslog. Output: %s " % output)
-
- (status, output) = self.target.run('grep foobar /var/log/messages')
- if status != 0:
- if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", "") == "systemd":
- (status, output) = self.target.run('journalctl -o cat | grep foobar')
- else:
- (status, output) = self.target.run('logread | grep foobar')
- self.assertEqual(status, 0, msg="Test log string not found in /var/log/messages or logread. Output: %s " % output)
-
- @testcase(1150)
- @skipUnlessPassed("test_syslog_running")
- def test_syslog_restart(self):
- if "systemd" != oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", False):
- (status,output) = self.target.run('/etc/init.d/syslog restart')
- else:
- (status,output) = self.target.run('systemctl restart syslog.service')
-
- @testcase(202)
- @skipUnlessPassed("test_syslog_restart")
- @skipUnlessPassed("test_syslog_logger")
- @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", False), "Not appropiate for systemd image")
- @unittest.skipIf(oeRuntimeTest.hasPackage("sysklogd") or not oeRuntimeTest.hasPackage("busybox"), "Non-busybox syslog")
- def test_syslog_startup_config(self):
- self.target.run('echo "LOGFILE=/var/log/test" >> /etc/syslog-startup.conf')
- (status,output) = self.target.run('/etc/init.d/syslog restart')
- self.assertEqual(status, 0, msg="Could not restart syslog service. Status and output: %s and %s" % (status,output))
- (status,output) = self.target.run('logger foobar && grep foobar /var/log/test')
- self.assertEqual(status, 0, msg="Test log string not found. Output: %s " % output)
- self.target.run("sed -i 's#LOGFILE=/var/log/test##' /etc/syslog-startup.conf")
- self.target.run('/etc/init.d/syslog restart')
diff --git a/meta/lib/oeqa/runtime/systemd.py b/meta/lib/oeqa/runtime/systemd.py
deleted file mode 100644
index 8de799cd63..0000000000
--- a/meta/lib/oeqa/runtime/systemd.py
+++ /dev/null
@@ -1,178 +0,0 @@
-import unittest
-import re
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("systemd"):
- skipModule("target doesn't have systemd in DISTRO_FEATURES")
- if "systemd" != oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True):
- skipModule("systemd is not the init manager for this image")
-
-
-class SystemdTest(oeRuntimeTest):
-
- def systemctl(self, action = '', target = '', expected = 0, verbose = False):
- command = 'systemctl %s %s' % (action, target)
- status, output = self.target.run(command)
- message = '\n'.join([command, output])
- if status != expected and verbose:
- message += self.target.run('systemctl status --full %s' % target)[1]
- self.assertEqual(status, expected, message)
- return output
-
- #TODO: use pyjournalctl instead
- def journalctl(self, args='',l_match_units=[]):
- """
- Request for the journalctl output to the current target system
-
- Arguments:
- -args, an optional argument pass through argument
- -l_match_units, an optional list of units to filter the output
- Returns:
- -string output of the journalctl command
- Raises:
- -AssertionError, on remote commands that fail
- -ValueError, on a journalctl call with filtering by l_match_units that
- returned no entries
- """
- query_units=""
- if len(l_match_units):
- query_units = ['_SYSTEMD_UNIT='+unit for unit in l_match_units]
- query_units = " ".join(query_units)
- command = 'journalctl %s %s' %(args, query_units)
- status, output = self.target.run(command)
- if status:
- raise AssertionError("Command '%s' returned non-zero exit \
- code %d:\n%s" % (command, status, output))
- if len(output) == 1 and "-- No entries --" in output:
- raise ValueError("List of units to match: %s, returned no entries"
- % l_match_units)
- return output
-
-class SystemdBasicTests(SystemdTest):
-
- @skipUnlessPassed('test_ssh')
- def test_systemd_basic(self):
- self.systemctl('--version')
-
- @testcase(551)
- @skipUnlessPassed('test_systemd_basic')
- def test_systemd_list(self):
- self.systemctl('list-unit-files')
-
- def settle(self):
- """
- Block until systemd has finished activating any units being activated,
- or until two minutes has elapsed.
-
- Returns a tuple, either (True, '') if all units have finished
- activating, or (False, message string) if there are still units
- activating (generally, failing units that restart).
- """
- import time
- endtime = time.time() + (60 * 2)
- while True:
- status, output = self.target.run('systemctl --state=activating')
- if "0 loaded units listed" in output:
- return (True, '')
- if time.time() >= endtime:
- return (False, output)
- time.sleep(10)
-
- @testcase(550)
- @skipUnlessPassed('test_systemd_basic')
- def test_systemd_failed(self):
- settled, output = self.settle()
- self.assertTrue(settled, msg="Timed out waiting for systemd to settle:\n" + output)
-
- output = self.systemctl('list-units', '--failed')
- match = re.search("0 loaded units listed", output)
- if not match:
- output += self.systemctl('status --full --failed')
- self.assertTrue(match, msg="Some systemd units failed:\n%s" % output)
-
-
-class SystemdServiceTests(SystemdTest):
-
- def check_for_avahi(self):
- if not self.hasPackage('avahi-daemon'):
- raise unittest.SkipTest("Testcase dependency not met: need avahi-daemon installed on target")
-
- @skipUnlessPassed('test_systemd_basic')
- def test_systemd_status(self):
- self.check_for_avahi()
- self.systemctl('status --full', 'avahi-daemon.service')
-
- @testcase(695)
- @skipUnlessPassed('test_systemd_status')
- def test_systemd_stop_start(self):
- self.check_for_avahi()
- self.systemctl('stop', 'avahi-daemon.service')
- self.systemctl('is-active', 'avahi-daemon.service', expected=3, verbose=True)
- self.systemctl('start','avahi-daemon.service')
- self.systemctl('is-active', 'avahi-daemon.service', verbose=True)
-
- @testcase(696)
- @skipUnlessPassed('test_systemd_basic')
- def test_systemd_disable_enable(self):
- self.check_for_avahi()
- self.systemctl('disable', 'avahi-daemon.service')
- self.systemctl('is-enabled', 'avahi-daemon.service', expected=1)
- self.systemctl('enable', 'avahi-daemon.service')
- self.systemctl('is-enabled', 'avahi-daemon.service')
-
-class SystemdJournalTests(SystemdTest):
- @skipUnlessPassed('test_ssh')
- def test_systemd_journal(self):
- (status, output) = self.target.run('journalctl')
- self.assertEqual(status, 0, output)
-
- @skipUnlessPassed('test_systemd_basic')
- def test_systemd_boot_time(self, systemd_TimeoutStartSec=90):
- """
- Get the target boot time from journalctl and log it
-
- Arguments:
- -systemd_TimeoutStartSec, an optional argument containing systemd's
- unit start timeout to compare against
- """
-
- # the expression chain that uniquely identifies the time boot message
- expr_items=["Startup finished","kernel", "userspace","\.$"]
- try:
- output = self.journalctl(args="-o cat --reverse")
- except AssertionError:
- self.fail("Error occurred while calling journalctl")
- if not len(output):
- self.fail("Error, unable to get startup time from systemd journal")
-
- # check for the regular expression items that match the startup time
- for line in output.split('\n'):
- check_match = "".join(re.findall(".*".join(expr_items), line))
- if check_match: break
- # put the startup time in the test log
- if check_match:
- print("%s" % check_match)
- else:
- self.skipTest("Error at obtaining the boot time from journalctl")
- boot_time_sec = 0
-
- # get the numeric values from the string and convert them to seconds
- # same data will be placed in list and string for manipulation
- l_boot_time = check_match.split(" ")[-2:]
- s_boot_time = " ".join(l_boot_time)
- try:
- # Obtain the minutes it took to boot
- if l_boot_time[0].endswith('min') and l_boot_time[0][0].isdigit():
- boot_time_min = s_boot_time.split("min")[0]
- # convert to seconds and accumulate it
- boot_time_sec += int(boot_time_min) * 60
- # Obtain the seconds it took to boot and accumulate
- boot_time_sec += float(l_boot_time[1].split("s")[0])
- except ValueError:
- self.skipTest("Error when parsing time from boot string")
- #Assert the target boot time against systemd's unit start timeout
- if boot_time_sec > systemd_TimeoutStartSec:
- print("Target boot time %s exceeds systemd's TimeoutStartSec %s"\
- %(boot_time_sec, systemd_TimeoutStartSec))
diff --git a/meta/lib/oeqa/runtime/utils/__init__.py b/meta/lib/oeqa/runtime/utils/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/lib/oeqa/runtime/utils/__init__.py
diff --git a/meta/lib/oeqa/runtime/utils/targetbuildproject.py b/meta/lib/oeqa/runtime/utils/targetbuildproject.py
new file mode 100644
index 0000000000..f4f4816a9b
--- /dev/null
+++ b/meta/lib/oeqa/runtime/utils/targetbuildproject.py
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.utils.buildproject import BuildProject
+
+class TargetBuildProject(BuildProject):
+
+ def __init__(self, target, uri, foldername=None, dl_dir=None):
+ self.target = target
+ self.targetdir = "~/buildtest/"
+ BuildProject.__init__(self, uri, foldername, dl_dir=dl_dir)
+
+ def download_archive(self):
+ self.target.run("mkdir " + self.targetdir + " || true")
+
+ self._download_archive()
+
+ status, output = self.target.copyTo(self.localarchive, self.targetdir)
+ if status:
+ raise Exception('Failed to copy archive to target, '
+ 'output: %s' % output)
+
+ cmd = 'tar xf %s%s -C %s' % (self.targetdir,
+ self.archive,
+ self.targetdir)
+ status, output = self.target.run(cmd)
+ if status:
+ raise Exception('Failed to extract archive, '
+ 'output: %s' % output)
+
+ # Change targetdir to project folder
+ self.targetdir = self.targetdir + self.fname
+
+ # The timeout parameter of target.run is set to 0
+ # to make the ssh command run with no timeout.
+ def _run(self, cmd):
+ ret = self.target.run(cmd, 0)
+ msg = "Command %s failed with exit code %s: %s" % (cmd, ret[0], ret[1])
+ if ret[0] != 0:
+ raise Exception(msg)
+ return ret[0]
diff --git a/meta/lib/oeqa/runtime/x32lib.py b/meta/lib/oeqa/runtime/x32lib.py
deleted file mode 100644
index ce5e214035..0000000000
--- a/meta/lib/oeqa/runtime/x32lib.py
+++ /dev/null
@@ -1,18 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- #check if DEFAULTTUNE is set and it's value is: x86-64-x32
- defaulttune = oeRuntimeTest.tc.d.getVar("DEFAULTTUNE", True)
- if "x86-64-x32" not in defaulttune:
- skipModule("DEFAULTTUNE is not set to x86-64-x32")
-
-class X32libTest(oeRuntimeTest):
-
- @testcase(281)
- @skipUnlessPassed("test_ssh")
- def test_x32_file(self):
- status1 = self.target.run("readelf -h /bin/ls | grep Class | grep ELF32")[0]
- status2 = self.target.run("readelf -h /bin/ls | grep Machine | grep X86-64")[0]
- self.assertTrue(status1 == 0 and status2 == 0, msg="/bin/ls isn't an X86-64 ELF32 binary. readelf says: %s" % self.target.run("readelf -h /bin/ls")[1])
diff --git a/meta/lib/oeqa/runtime/xorg.py b/meta/lib/oeqa/runtime/xorg.py
deleted file mode 100644
index 12bcd371af..0000000000
--- a/meta/lib/oeqa/runtime/xorg.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("x11-base"):
- skipModule("target doesn't have x11 in IMAGE_FEATURES")
-
-
-class XorgTest(oeRuntimeTest):
-
- @testcase(1151)
- @skipUnlessPassed('test_ssh')
- def test_xorg_running(self):
- (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -v xinit | grep [X]org')
- self.assertEqual(status, 0, msg="Xorg does not appear to be running %s" % self.target.run(oeRuntimeTest.pscmd)[1])
diff --git a/meta/lib/oeqa/sdk/__init__.py b/meta/lib/oeqa/sdk/__init__.py
index 4cf3fa76b6..e69de29bb2 100644
--- a/meta/lib/oeqa/sdk/__init__.py
+++ b/meta/lib/oeqa/sdk/__init__.py
@@ -1,3 +0,0 @@
-# Enable other layers to have tests in the same named directory
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oeqa/sdk/buildcvs.py b/meta/lib/oeqa/sdk/buildcvs.py
deleted file mode 100644
index c7146fa4af..0000000000
--- a/meta/lib/oeqa/sdk/buildcvs.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from oeqa.oetest import oeSDKTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import SDKBuildProject
-
-class BuildCvsTest(oeSDKTest):
-
- @classmethod
- def setUpClass(self):
- self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/cvs/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
- "http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2")
- self.project.download_archive()
-
- def test_cvs(self):
- self.assertEqual(self.project.run_configure(), 0,
- msg="Running configure failed")
-
- self.assertEqual(self.project.run_make(), 0,
- msg="Running make failed")
-
- self.assertEqual(self.project.run_install(), 0,
- msg="Running make install failed")
-
- @classmethod
- def tearDownClass(self):
- self.project.clean()
diff --git a/meta/lib/oeqa/sdk/buildgalculator.py b/meta/lib/oeqa/sdk/buildgalculator.py
deleted file mode 100644
index dc2fa9ce19..0000000000
--- a/meta/lib/oeqa/sdk/buildgalculator.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from oeqa.oetest import oeSDKTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import SDKBuildProject
-
-def setUpModule():
- if not (oeSDKTest.hasPackage("gtk+3") or oeSDKTest.hasPackage("libgtk-3.0")):
- skipModule("Image doesn't have gtk+3 in manifest")
-
-class GalculatorTest(oeSDKTest):
- def test_galculator(self):
- try:
- project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/galculator/",
- oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
- "http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2")
-
- project.download_archive()
-
- # regenerate configure to get support for --with-libtool-sysroot
- legacy_preconf=("autoreconf -i -f -I ${OECORE_TARGET_SYSROOT}/usr/share/aclocal -I m4;")
-
- self.assertEqual(project.run_configure(extra_cmds=legacy_preconf),
- 0, msg="Running configure failed")
-
- self.assertEqual(project.run_make(), 0,
- msg="Running make failed")
- finally:
- project.clean()
diff --git a/meta/lib/oeqa/sdk/buildiptables.py b/meta/lib/oeqa/sdk/buildiptables.py
deleted file mode 100644
index f0cb8a4287..0000000000
--- a/meta/lib/oeqa/sdk/buildiptables.py
+++ /dev/null
@@ -1,26 +0,0 @@
-from oeqa.oetest import oeSDKTest
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import SDKBuildProject
-
-
-class BuildIptablesTest(oeSDKTest):
-
- @classmethod
- def setUpClass(self):
- self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/iptables/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
- "http://downloads.yoctoproject.org/mirror/sources/iptables-1.4.13.tar.bz2")
- self.project.download_archive()
-
- def test_iptables(self):
- self.assertEqual(self.project.run_configure(), 0,
- msg="Running configure failed")
-
- self.assertEqual(self.project.run_make(), 0,
- msg="Running make failed")
-
- self.assertEqual(self.project.run_install(), 0,
- msg="Running make install failed")
-
- @classmethod
- def tearDownClass(self):
- self.project.clean()
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
new file mode 100644
index 0000000000..ebb03af9eb
--- /dev/null
+++ b/meta/lib/oeqa/sdk/case.py
@@ -0,0 +1,54 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import subprocess
+
+from oeqa.core.case import OETestCase
+
+class OESDKTestCase(OETestCase):
+ def _run(self, cmd):
+ return subprocess.check_output(". %s > /dev/null; %s;" % \
+ (self.tc.sdk_env, cmd), shell=True, executable="/bin/bash",
+ stderr=subprocess.STDOUT, universal_newlines=True)
+
+ def fetch(self, workdir, dl_dir, url, archive=None):
+ if not archive:
+ from urllib.parse import urlparse
+ archive = os.path.basename(urlparse(url).path)
+
+ if dl_dir:
+ tarball = os.path.join(dl_dir, archive)
+ if os.path.exists(tarball):
+ return tarball
+
+ tarball = os.path.join(workdir, archive)
+ subprocess.check_output(["wget", "-O", tarball, url])
+ return tarball
+
+ def check_elf(self, path, target_os=None, target_arch=None):
+ """
+ Verify that the ELF binary $path matches the specified target
+ OS/architecture, or if not specified the currently configured MACHINE's
+ OS/architecture.
+ """
+ import oe.qa, oe.elf
+
+ if not target_os or not target_arch:
+ output = self._run("echo $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
+ target_os, target_arch = output.strip().split(":")
+
+ machine_data = oe.elf.machine_dict(None)[target_os][target_arch]
+ (machine, osabi, abiversion, endian, bits) = machine_data
+
+ elf = oe.qa.ELFFile(path)
+ elf.open()
+
+ self.assertEqual(machine, elf.machine(),
+ "Binary was %s but expected %s" %
+ (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine)))
+ self.assertEqual(bits, elf.abiSize())
+ self.assertEqual(endian, elf.isLittleEndian())
diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py
new file mode 100644
index 0000000000..f26b17f2e9
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/assimp.py
@@ -0,0 +1,40 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import subprocess
+import tempfile
+import unittest
+from oeqa.sdk.case import OESDKTestCase
+
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class BuildAssimp(OESDKTestCase):
+ """
+ Test case to build a project using cmake.
+ """
+
+ def setUp(self):
+ if not (self.tc.hasHostPackage("nativesdk-cmake") or
+ self.tc.hasHostPackage("cmake-native")):
+ raise unittest.SkipTest("Needs cmake")
+
+ def test_assimp(self):
+ with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir:
+ tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v4.1.0.tar.gz")
+
+ dirs = {}
+ dirs["source"] = os.path.join(testdir, "assimp-4.1.0")
+ dirs["build"] = os.path.join(testdir, "build")
+ dirs["install"] = os.path.join(testdir, "install")
+
+ subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+ self.assertTrue(os.path.isdir(dirs["source"]))
+ os.makedirs(dirs["build"])
+
+ self._run("cd {build} && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON {source}".format(**dirs))
+ self._run("cmake --build {build} -- -j".format(**dirs))
+ self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**dirs))
+ self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.4.1.0"))
diff --git a/meta/lib/oeqa/sdk/cases/buildcpio.py b/meta/lib/oeqa/sdk/cases/buildcpio.py
new file mode 100644
index 0000000000..0a5e68d5fd
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/buildcpio.py
@@ -0,0 +1,35 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import tempfile
+import subprocess
+import unittest
+
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class BuildCpioTest(OESDKTestCase):
+ """
+ Check that autotools will cross-compile correctly.
+ """
+ def test_cpio(self):
+ with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir:
+ tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.gz")
+
+ dirs = {}
+ dirs["source"] = os.path.join(testdir, "cpio-2.12")
+ dirs["build"] = os.path.join(testdir, "build")
+ dirs["install"] = os.path.join(testdir, "install")
+
+ subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+ self.assertTrue(os.path.isdir(dirs["source"]))
+ os.makedirs(dirs["build"])
+
+ self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs))
+ self._run("cd {build} && make -j".format(**dirs))
+ self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
+
+ self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "cpio"))
diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/buildepoxy.py
new file mode 100644
index 0000000000..4211955f8d
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/buildepoxy.py
@@ -0,0 +1,41 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import subprocess
+import tempfile
+import unittest
+
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class EpoxyTest(OESDKTestCase):
+ """
+ Test that Meson builds correctly.
+ """
+ def setUp(self):
+ if not (self.tc.hasHostPackage("nativesdk-meson")):
+ raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain Meson")
+
+ def test_epoxy(self):
+ with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir:
+ tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/anholt/libepoxy/releases/download/1.5.3/libepoxy-1.5.3.tar.xz")
+
+ dirs = {}
+ dirs["source"] = os.path.join(testdir, "libepoxy-1.5.3")
+ dirs["build"] = os.path.join(testdir, "build")
+ dirs["install"] = os.path.join(testdir, "install")
+
+ subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+ self.assertTrue(os.path.isdir(dirs["source"]))
+ os.makedirs(dirs["build"])
+
+ log = self._run("meson -Degl=no -Dglx=no -Dx11=false {build} {source}".format(**dirs))
+ # Check that Meson thinks we're doing a cross build and not a native
+ self.assertIn("Build type: cross build", log)
+ self._run("ninja -C {build} -v".format(**dirs))
+ self._run("DESTDIR={install} ninja -C {build} -v install".format(**dirs))
+
+ self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libepoxy.so"))
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/buildgalculator.py
new file mode 100644
index 0000000000..bbaa5c55c9
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -0,0 +1,43 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import subprocess
+import tempfile
+import unittest
+
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class GalculatorTest(OESDKTestCase):
+ """
+ Test that autotools and GTK+ 3 compiles correctly.
+ """
+ def setUp(self):
+ if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or \
+ self.tc.hasTargetPackage("libgtk-3.0", multilib=True)):
+ raise unittest.SkipTest("GalculatorTest class: SDK don't support gtk+3")
+ if not (self.tc.hasHostPackage("nativesdk-gettext-dev")):
+ raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain gettext")
+
+ def test_galculator(self):
+ with tempfile.TemporaryDirectory(prefix="galculator", dir=self.tc.sdk_dir) as testdir:
+ tarball = self.fetch(testdir, self.td["DL_DIR"], "http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2")
+
+ dirs = {}
+ dirs["source"] = os.path.join(testdir, "galculator-2.1.4")
+ dirs["build"] = os.path.join(testdir, "build")
+ dirs["install"] = os.path.join(testdir, "install")
+
+ subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+ self.assertTrue(os.path.isdir(dirs["source"]))
+ os.makedirs(dirs["build"])
+
+ self._run("cd {source} && autoreconf -i -f -I $OECORE_TARGET_SYSROOT/usr/share/aclocal -I m4".format(**dirs))
+ self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs))
+ self._run("cd {build} && make -j".format(**dirs))
+ self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
+
+ self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "galculator"))
diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/buildlzip.py
new file mode 100644
index 0000000000..515acd2891
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
@@ -0,0 +1,37 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os, tempfile, subprocess, unittest
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class BuildLzipTest(OESDKTestCase):
+ """
+ Test that "plain" compilation works, using just $CC $CFLAGS etc.
+ """
+ def test_lzip(self):
+ with tempfile.TemporaryDirectory(prefix="lzip", dir=self.tc.sdk_dir) as testdir:
+ tarball = self.fetch(testdir, self.td["DL_DIR"], "http://downloads.yoctoproject.org/mirror/sources/lzip-1.19.tar.gz")
+
+ dirs = {}
+ dirs["source"] = os.path.join(testdir, "lzip-1.19")
+ dirs["build"] = os.path.join(testdir, "build")
+ dirs["install"] = os.path.join(testdir, "install")
+
+ subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+ self.assertTrue(os.path.isdir(dirs["source"]))
+ os.makedirs(dirs["build"])
+
+ cmd = """cd {build} && \
+ {source}/configure --srcdir {source} \
+ CXX="$CXX" \
+ CPPFLAGS="$CPPFLAGS" \
+ CXXFLAGS="$CXXFLAGS" \
+ LDFLAGS="$LDFLAGS" \
+ """
+ self._run(cmd.format(**dirs))
+ self._run("cd {build} && make -j".format(**dirs))
+ self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
+ self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "lzip"))
diff --git a/meta/lib/oeqa/sdk/cases/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py
new file mode 100644
index 0000000000..eb08eadd28
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/gcc.py
@@ -0,0 +1,50 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import shutil
+import unittest
+
+from oeqa.core.utils.path import remove_safe
+from oeqa.sdk.case import OESDKTestCase
+
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class GccCompileTest(OESDKTestCase):
+ td_vars = ['MACHINE']
+
+ @classmethod
+ def setUpClass(self):
+ files = {'test.c' : self.tc.files_dir, 'test.cpp' : self.tc.files_dir,
+ 'testsdkmakefile' : self.tc.sdk_files_dir}
+ for f in files:
+ shutil.copyfile(os.path.join(files[f], f),
+ os.path.join(self.tc.sdk_dir, f))
+
+ def setUp(self):
+ machine = self.td.get("MACHINE")
+ if not (self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine) or
+ self.tc.hasHostPackage("^gcc-", regex=True)):
+ raise unittest.SkipTest("GccCompileTest class: SDK doesn't contain a cross-canadian toolchain")
+
+ def test_gcc_compile(self):
+ self._run('$CC %s/test.c -o %s/test -lm' % (self.tc.sdk_dir, self.tc.sdk_dir))
+
+ def test_gpp_compile(self):
+ self._run('$CXX %s/test.c -o %s/test -lm' % (self.tc.sdk_dir, self.tc.sdk_dir))
+
+ def test_gpp2_compile(self):
+ self._run('$CXX %s/test.cpp -o %s/test -lm' % (self.tc.sdk_dir, self.tc.sdk_dir))
+
+ def test_make(self):
+ self._run('cd %s; make -f testsdkmakefile' % self.tc.sdk_dir)
+
+ @classmethod
+ def tearDownClass(self):
+ files = [os.path.join(self.tc.sdk_dir, f) \
+ for f in ['test.c', 'test.cpp', 'test.o', 'test',
+ 'testsdkmakefile']]
+ for f in files:
+ remove_safe(f)
diff --git a/meta/lib/oeqa/sdk/cases/perl.py b/meta/lib/oeqa/sdk/cases/perl.py
new file mode 100644
index 0000000000..14d76d820f
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/perl.py
@@ -0,0 +1,20 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import unittest
+from oeqa.sdk.case import OESDKTestCase
+
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class PerlTest(OESDKTestCase):
+ def setUp(self):
+ if not (self.tc.hasHostPackage("nativesdk-perl") or
+ self.tc.hasHostPackage("perl-native")):
+ raise unittest.SkipTest("No perl package in the SDK")
+
+ def test_perl(self):
+ cmd = "perl -e '$_=\"Uryyb, jbeyq\"; tr/a-zA-Z/n-za-mN-ZA-M/;print'"
+ output = self._run(cmd)
+ self.assertEqual(output, "Hello, world")
diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py
new file mode 100644
index 0000000000..a334abce5f
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/python.py
@@ -0,0 +1,31 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import subprocess, unittest
+from oeqa.sdk.case import OESDKTestCase
+
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class Python2Test(OESDKTestCase):
+ def setUp(self):
+ if not (self.tc.hasHostPackage("nativesdk-python-core") or
+ self.tc.hasHostPackage("python-core-native")):
+ raise unittest.SkipTest("No python package in the SDK")
+
+ def test_python2(self):
+ cmd = "python -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\""
+ output = self._run(cmd)
+ self.assertEqual(output, "Hello, world\n")
+
+class Python3Test(OESDKTestCase):
+ def setUp(self):
+ if not (self.tc.hasHostPackage("nativesdk-python3-core") or
+ self.tc.hasHostPackage("python3-core-native")):
+ raise unittest.SkipTest("No python3 package in the SDK")
+
+ def test_python3(self):
+ cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\""
+ output = self._run(cmd)
+ self.assertEqual(output, "Hello, world\n")
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
new file mode 100644
index 0000000000..09e77c19fe
--- /dev/null
+++ b/meta/lib/oeqa/sdk/context.py
@@ -0,0 +1,153 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import sys
+import glob
+import re
+
+from oeqa.core.context import OETestContext, OETestContextExecutor
+
+class OESDKTestContext(OETestContext):
+ sdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
+
+ def __init__(self, td=None, logger=None, sdk_dir=None, sdk_env=None,
+ target_pkg_manifest=None, host_pkg_manifest=None):
+ super(OESDKTestContext, self).__init__(td, logger)
+
+ self.sdk_dir = sdk_dir
+ self.sdk_env = sdk_env
+ self.target_pkg_manifest = target_pkg_manifest
+ self.host_pkg_manifest = host_pkg_manifest
+
+ def _hasPackage(self, manifest, pkg, regex=False):
+ if regex:
+ # do regex match
+ pat = re.compile(pkg)
+ for p in manifest.keys():
+ if pat.search(p):
+ return True
+ else:
+ # do exact match
+ if pkg in manifest.keys():
+ return True
+ return False
+
+ def hasHostPackage(self, pkg, regex=False):
+ return self._hasPackage(self.host_pkg_manifest, pkg, regex=regex)
+
+ def hasTargetPackage(self, pkg, multilib=False, regex=False):
+ if multilib:
+ # match multilib according to sdk_env
+ mls = self.td.get('MULTILIB_VARIANTS', '').split()
+ for ml in mls:
+ if ('ml'+ml) in self.sdk_env:
+ pkg = ml + '-' + pkg
+ return self._hasPackage(self.target_pkg_manifest, pkg, regex=regex)
+
+class OESDKTestContextExecutor(OETestContextExecutor):
+ _context_class = OESDKTestContext
+
+ name = 'sdk'
+ help = 'sdk test component'
+ description = 'executes sdk tests'
+
+ default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
+ 'cases')]
+ default_test_data = None
+
+ def register_commands(self, logger, subparsers):
+ super(OESDKTestContextExecutor, self).register_commands(logger, subparsers)
+
+ sdk_group = self.parser.add_argument_group('sdk options')
+ sdk_group.add_argument('--sdk-env', action='store',
+ help='sdk environment')
+ sdk_group.add_argument('--target-manifest', action='store',
+ help='sdk target manifest')
+ sdk_group.add_argument('--host-manifest', action='store',
+ help='sdk host manifest')
+
+ sdk_dgroup = self.parser.add_argument_group('sdk display options')
+ sdk_dgroup.add_argument('--list-sdk-env', action='store_true',
+ default=False, help='sdk list available environment')
+
+ # XXX this option is required but argparse_oe has a bug handling
+ # required options, seems that don't keep track of already parsed
+ # options
+ sdk_rgroup = self.parser.add_argument_group('sdk required options')
+ sdk_rgroup.add_argument('--sdk-dir', required=False, action='store',
+ help='sdk installed directory')
+
+ self.parser.add_argument('-j', '--num-processes', dest='processes', action='store',
+ type=int, help="number of processes to execute in parallel with")
+
+ @staticmethod
+ def _load_manifest(manifest):
+ pkg_manifest = {}
+ if manifest:
+ with open(manifest) as f:
+ for line in f:
+ (pkg, arch, version) = line.strip().split()
+ pkg_manifest[pkg] = (version, arch)
+
+ return pkg_manifest
+
+ def _process_args(self, logger, args):
+ super(OESDKTestContextExecutor, self)._process_args(logger, args)
+
+ self.tc_kwargs['init']['sdk_dir'] = args.sdk_dir
+ self.tc_kwargs['init']['sdk_env'] = self.sdk_env
+ self.tc_kwargs['init']['target_pkg_manifest'] = \
+ OESDKTestContextExecutor._load_manifest(args.target_manifest)
+ self.tc_kwargs['init']['host_pkg_manifest'] = \
+ OESDKTestContextExecutor._load_manifest(args.host_manifest)
+ self.tc_kwargs['run']['processes'] = args.processes
+
+ @staticmethod
+ def _get_sdk_environs(sdk_dir):
+ sdk_env = {}
+
+ environ_pattern = sdk_dir + '/environment-setup-*'
+ full_sdk_env = glob.glob(sdk_dir + '/environment-setup-*')
+ for env in full_sdk_env:
+ m = re.search('environment-setup-(.*)', env)
+ if m:
+ sdk_env[m.group(1)] = env
+
+ return sdk_env
+
+ def _display_sdk_envs(self, log, args, sdk_envs):
+ log("Available SDK environments at directory %s:" \
+ % args.sdk_dir)
+ log("")
+ for env in sdk_envs:
+ log(env)
+
+ def run(self, logger, args):
+ import argparse_oe
+
+ if not args.sdk_dir:
+ raise argparse_oe.ArgumentUsageError("No SDK directory "\
+ "specified please do, --sdk-dir SDK_DIR", self.name)
+
+ sdk_envs = OESDKTestContextExecutor._get_sdk_environs(args.sdk_dir)
+ if not sdk_envs:
+ raise argparse_oe.ArgumentUsageError("No available SDK "\
+ "enviroments found at %s" % args.sdk_dir, self.name)
+
+ if args.list_sdk_env:
+ self._display_sdk_envs(logger.info, args, sdk_envs)
+ sys.exit(0)
+
+ if not args.sdk_env in sdk_envs:
+ self._display_sdk_envs(logger.error, args, sdk_envs)
+ raise argparse_oe.ArgumentUsageError("No valid SDK "\
+ "environment (%s) specified" % args.sdk_env, self.name)
+
+ self.sdk_env = sdk_envs[args.sdk_env]
+ return super(OESDKTestContextExecutor, self).run(logger, args)
+
+_executor_class = OESDKTestContextExecutor
diff --git a/meta/lib/oeqa/runtime/files/testsdkmakefile b/meta/lib/oeqa/sdk/files/testsdkmakefile
index fb05f822f3..fb05f822f3 100644
--- a/meta/lib/oeqa/runtime/files/testsdkmakefile
+++ b/meta/lib/oeqa/sdk/files/testsdkmakefile
diff --git a/meta/lib/oeqa/sdk/gcc.py b/meta/lib/oeqa/sdk/gcc.py
deleted file mode 100644
index 8395b9b908..0000000000
--- a/meta/lib/oeqa/sdk/gcc.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import unittest
-import os
-import shutil
-from oeqa.oetest import oeSDKTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- machine = oeSDKTest.tc.d.getVar("MACHINE", True)
- if not oeSDKTest.hasHostPackage("packagegroup-cross-canadian-" + machine):
- skipModule("SDK doesn't contain a cross-canadian toolchain")
-
-
-class GccCompileTest(oeSDKTest):
-
- @classmethod
- def setUpClass(self):
- for f in ['test.c', 'test.cpp', 'testsdkmakefile']:
- shutil.copyfile(os.path.join(self.tc.filesdir, f), self.tc.sdktestdir + f)
-
- def test_gcc_compile(self):
- self._run('$CC %s/test.c -o %s/test -lm' % (self.tc.sdktestdir, self.tc.sdktestdir))
-
- def test_gpp_compile(self):
- self._run('$CXX %s/test.c -o %s/test -lm' % (self.tc.sdktestdir, self.tc.sdktestdir))
-
- def test_gpp2_compile(self):
- self._run('$CXX %s/test.cpp -o %s/test -lm' % (self.tc.sdktestdir, self.tc.sdktestdir))
-
- def test_make(self):
- self._run('cd %s; make -f testsdkmakefile' % self.tc.sdktestdir)
-
- @classmethod
- def tearDownClass(self):
- files = [self.tc.sdktestdir + f for f in ['test.c', 'test.cpp', 'test.o', 'test', 'testsdkmakefile']]
- for f in files:
- bb.utils.remove(f)
diff --git a/meta/lib/oeqa/sdk/perl.py b/meta/lib/oeqa/sdk/perl.py
deleted file mode 100644
index 45f422ef0b..0000000000
--- a/meta/lib/oeqa/sdk/perl.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import unittest
-import os
-import shutil
-from oeqa.oetest import oeSDKTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeSDKTest.hasHostPackage("nativesdk-perl"):
- skipModule("No perl package in the SDK")
-
-
-class PerlTest(oeSDKTest):
-
- @classmethod
- def setUpClass(self):
- for f in ['test.pl']:
- shutil.copyfile(os.path.join(self.tc.filesdir, f), self.tc.sdktestdir + f)
- self.testfile = self.tc.sdktestdir + "test.pl"
-
- def test_perl_exists(self):
- self._run('which perl')
-
- def test_perl_works(self):
- self._run('perl %s/test.pl' % self.tc.sdktestdir)
-
- @classmethod
- def tearDownClass(self):
- bb.utils.remove("%s/test.pl" % self.tc.sdktestdir)
diff --git a/meta/lib/oeqa/sdk/python.py b/meta/lib/oeqa/sdk/python.py
deleted file mode 100644
index 896fab4dfb..0000000000
--- a/meta/lib/oeqa/sdk/python.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import unittest
-import os
-import shutil
-from oeqa.oetest import oeSDKTest, skipModule
-from oeqa.utils.decorators import *
-
-def setUpModule():
- if not oeSDKTest.hasHostPackage("nativesdk-python"):
- skipModule("No python package in the SDK")
-
-
-class PythonTest(oeSDKTest):
-
- @classmethod
- def setUpClass(self):
- for f in ['test.py']:
- shutil.copyfile(os.path.join(self.tc.filesdir, f), self.tc.sdktestdir + f)
-
- def test_python_exists(self):
- self._run('which python')
-
- def test_python_stdout(self):
- output = self._run('python %s/test.py' % self.tc.sdktestdir)
- self.assertEqual(output.strip(), "the value of a is 0.01", msg="Incorrect output: %s" % output)
-
- def test_python_testfile(self):
- self._run('ls /tmp/testfile.python')
-
- @classmethod
- def tearDownClass(self):
- bb.utils.remove("%s/test.py" % self.tc.sdktestdir)
- bb.utils.remove("/tmp/testfile.python")
diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
new file mode 100644
index 0000000000..35e40187bc
--- /dev/null
+++ b/meta/lib/oeqa/sdk/testsdk.py
@@ -0,0 +1,145 @@
+#
+# Copyright 2018 by Garmin Ltd. or its subsidiaries
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
+
+class TestSDKBase(object):
+ @staticmethod
+ def get_sdk_configuration(d, test_type):
+ import platform
+ import oe.lsb
+ from oeqa.utils.metadata import get_layers
+ configuration = {'TEST_TYPE': test_type,
+ 'MACHINE': d.getVar("MACHINE"),
+ 'SDKMACHINE': d.getVar("SDKMACHINE"),
+ 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"),
+ 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"),
+ 'STARTTIME': d.getVar("DATETIME"),
+ 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
+ 'LAYERS': get_layers(d.getVar("BBLAYERS"))}
+ return configuration
+
+ @staticmethod
+ def get_sdk_json_result_dir(d):
+ json_result_dir = os.path.join(d.getVar("LOG_DIR"), 'oeqa')
+ custom_json_result_dir = d.getVar("OEQA_JSON_RESULT_DIR")
+ if custom_json_result_dir:
+ json_result_dir = custom_json_result_dir
+ return json_result_dir
+
+ @staticmethod
+ def get_sdk_result_id(configuration):
+ return '%s_%s_%s_%s_%s' % (configuration['TEST_TYPE'], configuration['IMAGE_BASENAME'], configuration['SDKMACHINE'], configuration['MACHINE'], configuration['STARTTIME'])
+
+class TestSDK(TestSDKBase):
+ context_executor_class = OESDKTestContextExecutor
+ context_class = OESDKTestContext
+ test_type = 'sdk'
+
+ def get_tcname(self, d):
+ """
+ Get the name of the SDK file
+ """
+ return d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
+
+ def extract_sdk(self, tcname, sdk_dir, d):
+ """
+ Extract the SDK to the specified location
+ """
+ import subprocess
+
+ try:
+ subprocess.check_output("cd %s; %s <<EOF\n./\nY\nEOF" % (sdk_dir, tcname), shell=True)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Couldn't install the SDK:\n%s" % e.output.decode("utf-8"))
+
+ def setup_context(self, d):
+ """
+ Return a dictionary of additional arguments that should be passed to
+ the context_class on construction
+ """
+ return dict()
+
+ def run(self, d):
+
+ import os
+ import subprocess
+ import json
+ import logging
+
+ from bb.utils import export_proxies
+ from oeqa.utils import make_logger_bitbake_compatible
+
+ pn = d.getVar("PN")
+ logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
+
+ # sdk use network for download projects for build
+ export_proxies(d)
+
+ tcname = self.get_tcname(d)
+
+ if not os.path.exists(tcname):
+ bb.fatal("The toolchain %s is not built. Build it before running the tests: 'bitbake <image> -c populate_sdk' ." % tcname)
+
+ tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.testdata.json")
+ test_data = json.load(open(tdname, "r"))
+
+ target_pkg_manifest = self.context_executor_class._load_manifest(
+ d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"))
+ host_pkg_manifest = self.context_executor_class._load_manifest(
+ d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
+
+ processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
+ if processes:
+ try:
+ import testtools, subunit
+ except ImportError:
+ bb.warn("Failed to import testtools or subunit, the testcases will run serially")
+ processes = None
+
+ sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
+ bb.utils.remove(sdk_dir, True)
+ bb.utils.mkdirhier(sdk_dir)
+
+ context_args = self.setup_context(d)
+
+ self.extract_sdk(tcname, sdk_dir, d)
+
+ fail = False
+ sdk_envs = self.context_executor_class._get_sdk_environs(sdk_dir)
+ for s in sdk_envs:
+ sdk_env = sdk_envs[s]
+ bb.plain("SDK testing environment: %s" % s)
+ tc = self.context_class(td=test_data, logger=logger, sdk_dir=sdk_dir,
+ sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
+ host_pkg_manifest=host_pkg_manifest, **context_args)
+
+ try:
+ tc.loadTests(self.context_executor_class.default_cases)
+ except Exception as e:
+ import traceback
+ bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+
+ if processes:
+ result = tc.runTests(processes=int(processes))
+ else:
+ result = tc.runTests()
+
+ component = "%s %s" % (pn, self.context_executor_class.name)
+ context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env))
+ configuration = self.get_sdk_configuration(d, self.test_type)
+ result.logDetails(self.get_sdk_json_result_dir(d),
+ configuration,
+ self.get_sdk_result_id(configuration))
+ result.logSummary(component, context_msg)
+
+ if not result.wasSuccessful():
+ fail = True
+
+ if fail:
+ bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
+
+
diff --git a/meta/lib/oeqa/sdk/utils/__init__.py b/meta/lib/oeqa/sdk/utils/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/lib/oeqa/sdk/utils/__init__.py
diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
new file mode 100644
index 0000000000..32f5e3310d
--- /dev/null
+++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import subprocess
+
+from oeqa.utils.buildproject import BuildProject
+
+class SDKBuildProject(BuildProject):
+ def __init__(self, testpath, sdkenv, uri, testlogdir, builddatetime,
+ foldername=None, dl_dir=None):
+ self.sdkenv = sdkenv
+ self.testdir = testpath
+ self.targetdir = testpath
+ os.makedirs(testpath, exist_ok=True)
+ self.datetime = builddatetime
+ self.testlogdir = testlogdir
+ os.makedirs(self.testlogdir, exist_ok=True)
+ self.logfile = os.path.join(self.testlogdir, "sdk_target_log.%s" % self.datetime)
+ BuildProject.__init__(self, uri, foldername, tmpdir=testpath, dl_dir=dl_dir)
+
+ def download_archive(self):
+ self._download_archive()
+
+ cmd = 'tar xf %s -C %s' % (os.path.join(self.targetdir, self.archive), self.targetdir)
+ subprocess.check_output(cmd, shell=True)
+
+ #Change targetdir to project folder
+ self.targetdir = os.path.join(self.targetdir, self.fname)
+
+ def run_configure(self, configure_args='', extra_cmds=''):
+ return super(SDKBuildProject, self).run_configure(configure_args=(configure_args or '$CONFIGURE_FLAGS'), extra_cmds=extra_cmds)
+
+ def run_install(self, install_args=''):
+ return super(SDKBuildProject, self).run_install(install_args=(install_args or "DESTDIR=%s/../install" % self.targetdir))
+
+ def log(self, msg):
+ if self.logfile:
+ with open(self.logfile, "a") as f:
+ f.write("%s\n" % msg)
+
+ def _run(self, cmd):
+ self.log("Running . %s; " % self.sdkenv + cmd)
+ try:
+ output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True,
+ executable='/bin/bash', stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as exc:
+ print(exc.output.decode('utf-8'))
+ return exc.returncode
+ return 0
diff --git a/meta/lib/oeqa/sdkext/__init__.py b/meta/lib/oeqa/sdkext/__init__.py
index 4cf3fa76b6..e69de29bb2 100644
--- a/meta/lib/oeqa/sdkext/__init__.py
+++ b/meta/lib/oeqa/sdkext/__init__.py
@@ -1,3 +0,0 @@
-# Enable other layers to have tests in the same named directory
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oeqa/sdkext/case.py b/meta/lib/oeqa/sdkext/case.py
new file mode 100644
index 0000000000..668faec9b9
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/case.py
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import subprocess
+
+from oeqa.utils import avoid_paths_in_environ
+from oeqa.sdk.case import OESDKTestCase
+
+class OESDKExtTestCase(OESDKTestCase):
+ def _run(self, cmd):
+ # extensible sdk shows a warning if found bitbake in the path
+ # because can cause contamination, i.e. use devtool from
+ # poky/scripts instead of eSDK one.
+ env = os.environ.copy()
+ paths_to_avoid = ['bitbake/bin', 'poky/scripts']
+ env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
+
+ return subprocess.check_output(". %s > /dev/null;"\
+ " %s;" % (self.tc.sdk_env, cmd), stderr=subprocess.STDOUT,
+ shell=True, env=env, universal_newlines=True)
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
new file mode 100644
index 0000000000..8e92bf8064
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -0,0 +1,120 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import shutil
+import subprocess
+
+from oeqa.sdkext.case import OESDKExtTestCase
+from oeqa.utils.httpserver import HTTPService
+
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class DevtoolTest(OESDKExtTestCase):
+ @classmethod
+ def setUpClass(cls):
+ myapp_src = os.path.join(cls.tc.esdk_files_dir, "myapp")
+ cls.myapp_dst = os.path.join(cls.tc.sdk_dir, "myapp")
+ shutil.copytree(myapp_src, cls.myapp_dst)
+
+ myapp_cmake_src = os.path.join(cls.tc.esdk_files_dir, "myapp_cmake")
+ cls.myapp_cmake_dst = os.path.join(cls.tc.sdk_dir, "myapp_cmake")
+ shutil.copytree(myapp_cmake_src, cls.myapp_cmake_dst)
+
+ @classmethod
+ def tearDownClass(cls):
+ shutil.rmtree(cls.myapp_dst)
+ shutil.rmtree(cls.myapp_cmake_dst)
+
+ def _test_devtool_build(self, directory):
+ self._run('devtool add myapp %s' % directory)
+ try:
+ self._run('devtool build myapp')
+ finally:
+ self._run('devtool reset myapp')
+
+ def _test_devtool_build_package(self, directory):
+ self._run('devtool add myapp %s' % directory)
+ try:
+ self._run('devtool package myapp')
+ finally:
+ self._run('devtool reset myapp')
+
+ def test_devtool_location(self):
+ output = self._run('which devtool')
+ self.assertEqual(output.startswith(self.tc.sdk_dir), True, \
+ msg="Seems that devtool isn't the eSDK one: %s" % output)
+
+ def test_devtool_add_reset(self):
+ self._run('devtool add myapp %s' % self.myapp_dst)
+ self._run('devtool reset myapp')
+
+ def test_devtool_build_make(self):
+ self._test_devtool_build(self.myapp_dst)
+
+ def test_devtool_build_esdk_package(self):
+ self._test_devtool_build_package(self.myapp_dst)
+
+ def test_devtool_build_cmake(self):
+ self._test_devtool_build(self.myapp_cmake_dst)
+
+ def test_extend_autotools_recipe_creation(self):
+ req = 'https://github.com/rdfa/librdfa'
+ recipe = "librdfa"
+ self._run('devtool sdk-install libxml2')
+ self._run('devtool add %s %s' % (recipe, req) )
+ try:
+ self._run('devtool build %s' % recipe)
+ finally:
+ self._run('devtool reset %s' % recipe)
+
+ def test_devtool_kernelmodule(self):
+ docfile = 'https://git.yoctoproject.org/git/kernel-module-hello-world'
+ recipe = 'kernel-module-hello-world'
+ self._run('devtool add %s %s' % (recipe, docfile) )
+ try:
+ self._run('devtool build %s' % recipe)
+ finally:
+ self._run('devtool reset %s' % recipe)
+
+ def test_recipes_for_nodejs(self):
+ package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0"
+ self._run('devtool add %s ' % package_nodejs)
+ try:
+ self._run('devtool build %s ' % package_nodejs)
+ finally:
+ self._run('devtool reset %s '% package_nodejs)
+
+class SdkUpdateTest(OESDKExtTestCase):
+ @classmethod
+ def setUpClass(self):
+ self.publish_dir = os.path.join(self.tc.sdk_dir, 'esdk_publish')
+ if os.path.exists(self.publish_dir):
+ shutil.rmtree(self.publish_dir)
+ os.mkdir(self.publish_dir)
+
+ base_tcname = "%s/%s" % (self.td.get("SDK_DEPLOY", ''),
+ self.td.get("TOOLCHAINEXT_OUTPUTNAME", ''))
+ tcname_new = "%s-new.sh" % base_tcname
+ if not os.path.exists(tcname_new):
+ tcname_new = "%s.sh" % base_tcname
+
+ cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir)
+ subprocess.check_output(cmd, shell=True)
+
+ self.http_service = HTTPService(self.publish_dir)
+ self.http_service.start()
+
+ self.http_url = "http://127.0.0.1:%d" % self.http_service.port
+
+ def test_sdk_update_http(self):
+ output = self._run("devtool sdk-update \"%s\"" % self.http_url)
+
+ @classmethod
+ def tearDownClass(self):
+ self.http_service.stop()
+ shutil.rmtree(self.publish_dir)
diff --git a/meta/lib/oeqa/sdkext/context.py b/meta/lib/oeqa/sdkext/context.py
new file mode 100644
index 0000000000..2ac2bf6ff7
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/context.py
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
+
+class OESDKExtTestContext(OESDKTestContext):
+ esdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
+
+ # FIXME - We really need to do better mapping of names here, this at
+ # least allows some tests to run
+ def hasHostPackage(self, pkg):
+ # We force a toolchain to be installed into the eSDK even if its minimal
+ if pkg.startswith("packagegroup-cross-canadian-"):
+ return True
+ return self._hasPackage(self.host_pkg_manifest, pkg)
+
+class OESDKExtTestContextExecutor(OESDKTestContextExecutor):
+ _context_class = OESDKExtTestContext
+
+ name = 'esdk'
+ help = 'esdk test component'
+ description = 'executes esdk tests'
+
+ default_cases = OESDKTestContextExecutor.default_cases + \
+ [os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')]
+ default_test_data = None
+
+_executor_class = OESDKExtTestContextExecutor
diff --git a/meta/lib/oeqa/sdkext/devtool.py b/meta/lib/oeqa/sdkext/devtool.py
deleted file mode 100644
index 65f41f6875..0000000000
--- a/meta/lib/oeqa/sdkext/devtool.py
+++ /dev/null
@@ -1,108 +0,0 @@
-import shutil
-import subprocess
-import urllib.request
-from oeqa.oetest import oeSDKExtTest
-from oeqa.utils.decorators import *
-
-class DevtoolTest(oeSDKExtTest):
- @classmethod
- def setUpClass(self):
- self.myapp_src = os.path.join(self.tc.sdkextfilesdir, "myapp")
- self.myapp_dst = os.path.join(self.tc.sdktestdir, "myapp")
- shutil.copytree(self.myapp_src, self.myapp_dst)
-
- self.myapp_cmake_src = os.path.join(self.tc.sdkextfilesdir, "myapp_cmake")
- self.myapp_cmake_dst = os.path.join(self.tc.sdktestdir, "myapp_cmake")
- shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst)
-
- def _test_devtool_build(self, directory):
- self._run('devtool add myapp %s' % directory)
- try:
- self._run('devtool build myapp')
- except Exception as e:
- print(e.output)
- self._run('devtool reset myapp')
- raise e
- self._run('devtool reset myapp')
-
- def _test_devtool_build_package(self, directory):
- self._run('devtool add myapp %s' % directory)
- try:
- self._run('devtool package myapp')
- except Exception as e:
- print(e.output)
- self._run('devtool reset myapp')
- raise e
- self._run('devtool reset myapp')
-
- def test_devtool_location(self):
- output = self._run('which devtool')
- self.assertEqual(output.startswith(self.tc.sdktestdir), True, \
- msg="Seems that devtool isn't the eSDK one: %s" % output)
-
- @skipUnlessPassed('test_devtool_location')
- def test_devtool_add_reset(self):
- self._run('devtool add myapp %s' % self.myapp_dst)
- self._run('devtool reset myapp')
-
- @testcase(1473)
- @skipUnlessPassed('test_devtool_location')
- def test_devtool_build_make(self):
- self._test_devtool_build(self.myapp_dst)
-
- @testcase(1474)
- @skipUnlessPassed('test_devtool_location')
- def test_devtool_build_esdk_package(self):
- self._test_devtool_build_package(self.myapp_dst)
-
- @testcase(1479)
- @skipUnlessPassed('test_devtool_location')
- def test_devtool_build_cmake(self):
- self._test_devtool_build(self.myapp_cmake_dst)
-
- @testcase(1482)
- @skipUnlessPassed('test_devtool_location')
- def test_extend_autotools_recipe_creation(self):
- req = 'https://github.com/rdfa/librdfa'
- recipe = "bbexample"
- self._run('devtool add %s %s' % (recipe, req) )
- try:
- self._run('devtool build %s' % recipe)
- except Exception as e:
- print(e.output)
- self._run('devtool reset %s' % recipe)
- raise e
- self._run('devtool reset %s' % recipe)
-
- @testcase(1484)
- @skipUnlessPassed('test_devtool_location')
- def test_devtool_kernelmodule(self):
- docfile = 'https://github.com/umlaeute/v4l2loopback.git'
- recipe = 'v4l2loopback-driver'
- self._run('devtool add %s %s' % (recipe, docfile) )
- try:
- self._run('devtool build %s' % recipe)
- except Exception as e:
- print(e.output)
- self._run('devtool reset %s' % recipe)
- raise e
- self._run('devtool reset %s' % recipe)
-
- @testcase(1478)
- @skipUnlessPassed('test_devtool_location')
- def test_recipes_for_nodejs(self):
- package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0"
- self._run('devtool add %s ' % package_nodejs)
- try:
- self._run('devtool build %s ' % package_nodejs)
- except Exception as e:
- print(e.output)
- self._run('devtool reset %s' % package_nodejs)
- raise e
- self._run('devtool reset %s '% package_nodejs)
-
-
- @classmethod
- def tearDownClass(self):
- shutil.rmtree(self.myapp_dst)
- shutil.rmtree(self.myapp_cmake_dst)
diff --git a/meta/lib/oeqa/sdkext/sdk_update.py b/meta/lib/oeqa/sdkext/sdk_update.py
deleted file mode 100644
index 2ade839c05..0000000000
--- a/meta/lib/oeqa/sdkext/sdk_update.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import os
-import shutil
-import subprocess
-
-from oeqa.oetest import oeSDKExtTest
-from oeqa.utils.httpserver import HTTPService
-
-class SdkUpdateTest(oeSDKExtTest):
-
- @classmethod
- def setUpClass(self):
- self.publish_dir = os.path.join(self.tc.sdktestdir, 'esdk_publish')
- if os.path.exists(self.publish_dir):
- shutil.rmtree(self.publish_dir)
- os.mkdir(self.publish_dir)
-
- tcname_new = self.tc.d.expand(
- "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}-new.sh")
- if not os.path.exists(tcname_new):
- tcname_new = self.tc.tcname
-
- cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir)
- subprocess.check_output(cmd, shell=True)
-
- self.http_service = HTTPService(self.publish_dir)
- self.http_service.start()
-
- self.http_url = "http://127.0.0.1:%d" % self.http_service.port
-
- def test_sdk_update_http(self):
- output = self._run("devtool sdk-update \"%s\"" % self.http_url)
-
- @classmethod
- def tearDownClass(self):
- self.http_service.stop()
- shutil.rmtree(self.publish_dir)
diff --git a/meta/lib/oeqa/sdkext/testsdk.py b/meta/lib/oeqa/sdkext/testsdk.py
new file mode 100644
index 0000000000..785b5dda53
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/testsdk.py
@@ -0,0 +1,107 @@
+#
+# Copyright 2018 by Garmin Ltd. or its subsidiaries
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.sdk.testsdk import TestSDKBase
+
+class TestSDKExt(TestSDKBase):
+ def run(self, d):
+ import os
+ import json
+ import subprocess
+ import logging
+
+ from bb.utils import export_proxies
+ from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak
+ from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor
+
+ pn = d.getVar("PN")
+ logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
+
+ # extensible sdk use network
+ export_proxies(d)
+
+ subprocesstweak.errors_have_output()
+
+ # extensible sdk can be contaminated if native programs are
+ # in PATH, i.e. use perl-native instead of eSDK one.
+ paths_to_avoid = [d.getVar('STAGING_DIR'),
+ d.getVar('BASE_WORKDIR')]
+ os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid)
+
+ tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
+ if not os.path.exists(tcname):
+ bb.fatal("The toolchain ext %s is not built. Build it before running the" \
+ " tests: 'bitbake <image> -c populate_sdk_ext' ." % tcname)
+
+ tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.testdata.json")
+ test_data = json.load(open(tdname, "r"))
+
+ target_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
+ d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"))
+ host_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
+ d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"))
+
+ sdk_dir = d.expand("${WORKDIR}/testsdkext/")
+ bb.utils.remove(sdk_dir, True)
+ bb.utils.mkdirhier(sdk_dir)
+ try:
+ subprocess.check_output("%s -y -d %s" % (tcname, sdk_dir), shell=True)
+ except subprocess.CalledProcessError as e:
+ msg = "Couldn't install the extensible SDK:\n%s" % e.output.decode("utf-8")
+ logfn = os.path.join(sdk_dir, 'preparing_build_system.log')
+ if os.path.exists(logfn):
+ msg += '\n\nContents of preparing_build_system.log:\n'
+ with open(logfn, 'r') as f:
+ for line in f:
+ msg += line
+ bb.fatal(msg)
+
+ fail = False
+ sdk_envs = OESDKExtTestContextExecutor._get_sdk_environs(sdk_dir)
+ for s in sdk_envs:
+ bb.plain("Extensible SDK testing environment: %s" % s)
+
+ sdk_env = sdk_envs[s]
+
+ # Use our own SSTATE_DIR and DL_DIR so that updates to the eSDK come from our sstate cache
+ # and we don't spend hours downloading kernels for the kernel module test
+ # Abuse auto.conf since local.conf would be overwritten by the SDK
+ with open(os.path.join(sdk_dir, 'conf', 'auto.conf'), 'a+') as f:
+ f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
+ f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
+ f.write('INHERIT += "own-mirrors"\n')
+ f.write('PREMIRRORS_prepend = " git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME \\n "\n' % test_data.get('DL_DIR'))
+
+ # We need to do this in case we have a minimal SDK
+ subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \
+ sdk_env, cwd=sdk_dir, shell=True, stderr=subprocess.STDOUT)
+
+ tc = OESDKExtTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
+ sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
+ host_pkg_manifest=host_pkg_manifest)
+
+ try:
+ tc.loadTests(OESDKExtTestContextExecutor.default_cases)
+ except Exception as e:
+ import traceback
+ bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+
+ result = tc.runTests()
+
+ component = "%s %s" % (pn, OESDKExtTestContextExecutor.name)
+ context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env))
+ configuration = self.get_sdk_configuration(d, 'sdkext')
+ result.logDetails(self.get_sdk_json_result_dir(d),
+ configuration,
+ self.get_sdk_result_id(configuration))
+ result.logSummary(component, context_msg)
+
+ if not result.wasSuccessful():
+ fail = True
+
+ if fail:
+ bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
+
diff --git a/meta/lib/oeqa/selftest/__init__.py b/meta/lib/oeqa/selftest/__init__.py
deleted file mode 100644
index 3ad9513f40..0000000000
--- a/meta/lib/oeqa/selftest/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oeqa/selftest/_toaster.py b/meta/lib/oeqa/selftest/_toaster.py
deleted file mode 100644
index 15ea9df9ef..0000000000
--- a/meta/lib/oeqa/selftest/_toaster.py
+++ /dev/null
@@ -1,320 +0,0 @@
-import unittest
-import os
-import sys
-import shlex, subprocess
-import urllib.request, urllib.parse, urllib.error, subprocess, time, getpass, re, json, shlex
-
-import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd
-
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../', 'bitbake/lib/toaster')))
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toastermain.settings")
-
-import toastermain.settings
-from django.db.models import Q
-from orm.models import *
-from oeqa.utils.decorators import testcase
-
-class ToasterSetup(oeSelfTest):
-
- def recipe_parse(self, file_path, var):
- for line in open(file_path,'r'):
- if line.find(var) > -1:
- val = line.split(" = ")[1].replace("\"", "").strip()
- return val
-
- def fix_file_path(self, file_path):
- if ":" in file_path:
- file_path=file_path.split(":")[2]
- return file_path
-
-class Toaster_DB_Tests(ToasterSetup):
-
- # Check if build name is unique - tc_id=795
- @testcase(795)
- def test_Build_Unique_Name(self):
- all_builds = Build.objects.all().count()
- distinct_builds = Build.objects.values('id').distinct().count()
- self.assertEqual(distinct_builds, all_builds, msg = 'Build name is not unique')
-
- # Check if build coocker log path is unique - tc_id=819
- @testcase(819)
- def test_Build_Unique_Cooker_Log_Path(self):
- distinct_path = Build.objects.values('cooker_log_path').distinct().count()
- total_builds = Build.objects.values('id').count()
- self.assertEqual(distinct_path, total_builds, msg = 'Build coocker log path is not unique')
-
- # Check if task order is unique for one build - tc=824
- @testcase(824)
- def test_Task_Unique_Order(self):
- builds = Build.objects.values('id')
- cnt_err = []
- for build in builds:
- total_task_order = Task.objects.filter(build = build['id']).values('order').count()
- distinct_task_order = Task.objects.filter(build = build['id']).values('order').distinct().count()
- if (total_task_order != distinct_task_order):
- cnt_err.append(build['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
-
- # Check task order sequence for one build - tc=825
- @testcase(825)
- def test_Task_Order_Sequence(self):
- builds = builds = Build.objects.values('id')
- cnt_err = []
- for build in builds:
- tasks = Task.objects.filter(Q(build = build['id']), ~Q(order = None), ~Q(task_name__contains = '_setscene')).values('id', 'order').order_by("order")
- cnt_tasks = 0
- for task in tasks:
- cnt_tasks += 1
- if (task['order'] != cnt_tasks):
- cnt_err.append(task['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
-
- # Check if disk_io matches the difference between EndTimeIO and StartTimeIO in build stats - tc=828
- ### this needs to be updated ###
- #def test_Task_Disk_IO_TC828(self):
-
- # Check if outcome = 2 (SSTATE) then sstate_result must be 3 (RESTORED) - tc=832
- @testcase(832)
- def test_Task_If_Outcome_2_Sstate_Result_Must_Be_3(self):
- tasks = Task.objects.filter(outcome = 2).values('id', 'sstate_result')
- cnt_err = []
- for task in tasks:
- if (row['sstate_result'] != 3):
- cnt_err.append(task['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
-
- # Check if outcome = 1 (COVERED) or 3 (EXISTING) then sstate_result must be 0 (SSTATE_NA) - tc=833
- @testcase(833)
- def test_Task_If_Outcome_1_3_Sstate_Result_Must_Be_0(self):
- tasks = Task.objects.filter(outcome__in = (1, 3)).values('id', 'sstate_result')
- cnt_err = []
- for task in tasks:
- if (task['sstate_result'] != 0):
- cnt_err.append(task['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
-
- # Check if outcome is 0 (SUCCESS) or 4 (FAILED) then sstate_result must be 0 (NA), 1 (MISS) or 2 (FAILED) - tc=834
- @testcase(834)
- def test_Task_If_Outcome_0_4_Sstate_Result_Must_Be_0_1_2(self):
- tasks = Task.objects.filter(outcome__in = (0, 4)).values('id', 'sstate_result')
- cnt_err = []
- for task in tasks:
- if (task['sstate_result'] not in [0, 1, 2]):
- cnt_err.append(task['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
-
- # Check if task_executed = TRUE (1), script_type must be 0 (CODING_NA), 2 (CODING_PYTHON), 3 (CODING_SHELL) - tc=891
- @testcase(891)
- def test_Task_If_Task_Executed_True_Script_Type_0_2_3(self):
- tasks = Task.objects.filter(task_executed = 1).values('id', 'script_type')
- cnt_err = []
- for task in tasks:
- if (task['script_type'] not in [0, 2, 3]):
- cnt_err.append(task['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
-
- # Check if task_executed = TRUE (1), outcome must be 0 (SUCCESS) or 4 (FAILED) - tc=836
- @testcase(836)
- def test_Task_If_Task_Executed_True_Outcome_0_4(self):
- tasks = Task.objects.filter(task_executed = 1).values('id', 'outcome')
- cnt_err = []
- for task in tasks:
- if (task['outcome'] not in [0, 4]):
- cnt_err.append(task['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
-
- # Check if task_executed = FALSE (0), script_type must be 0 - tc=890
- @testcase(890)
- def test_Task_If_Task_Executed_False_Script_Type_0(self):
- tasks = Task.objects.filter(task_executed = 0).values('id', 'script_type')
- cnt_err = []
- for task in tasks:
- if (task['script_type'] != 0):
- cnt_err.append(task['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
-
- # Check if task_executed = FALSE (0) and build outcome = SUCCEEDED (0), task outcome must be 1 (COVERED), 2 (CACHED), 3 (PREBUILT), 5 (EMPTY) - tc=837
- @testcase(837)
- def test_Task_If_Task_Executed_False_Outcome_1_2_3_5(self):
- builds = Build.objects.filter(outcome = 0).values('id')
- cnt_err = []
- for build in builds:
- tasks = Task.objects.filter(build = build['id'], task_executed = 0).values('id', 'outcome')
- for task in tasks:
- if (task['outcome'] not in [1, 2, 3, 5]):
- cnt_err.append(task['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
-
- # Key verification - tc=888
- @testcase(888)
- def test_Target_Installed_Package(self):
- rows = Target_Installed_Package.objects.values('id', 'target_id', 'package_id')
- cnt_err = []
- for row in rows:
- target = Target.objects.filter(id = row['target_id']).values('id')
- package = Package.objects.filter(id = row['package_id']).values('id')
- if (not target or not package):
- cnt_err.append(row['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for target installed package id: %s' % cnt_err)
-
- # Key verification - tc=889
- @testcase(889)
- def test_Task_Dependency(self):
- rows = Task_Dependency.objects.values('id', 'task_id', 'depends_on_id')
- cnt_err = []
- for row in rows:
- task_id = Task.objects.filter(id = row['task_id']).values('id')
- depends_on_id = Task.objects.filter(id = row['depends_on_id']).values('id')
- if (not task_id or not depends_on_id):
- cnt_err.append(row['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for task dependency id: %s' % cnt_err)
-
- # Check if build target file_name is populated only if is_image=true AND orm_build.outcome=0 then if the file exists and its size matches the file_size value
- ### Need to add the tc in the test run
- @testcase(1037)
- def test_Target_File_Name_Populated(self):
- builds = Build.objects.filter(outcome = 0).values('id')
- for build in builds:
- targets = Target.objects.filter(build_id = build['id'], is_image = 1).values('id')
- for target in targets:
- target_files = Target_Image_File.objects.filter(target_id = target['id']).values('id', 'file_name', 'file_size')
- cnt_err = []
- for file_info in target_files:
- target_id = file_info['id']
- target_file_name = file_info['file_name']
- target_file_size = file_info['file_size']
- if (not target_file_name or not target_file_size):
- cnt_err.append(target_id)
- else:
- if (not os.path.exists(target_file_name)):
- cnt_err.append(target_id)
- else:
- if (os.path.getsize(target_file_name) != target_file_size):
- cnt_err.append(target_id)
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for target image file id: %s' % cnt_err)
-
- # Key verification - tc=884
- @testcase(884)
- def test_Package_Dependency(self):
- cnt_err = []
- deps = Package_Dependency.objects.values('id', 'package_id', 'depends_on_id')
- for dep in deps:
- if (dep['package_id'] == dep['depends_on_id']):
- cnt_err.append(dep['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for package dependency id: %s' % cnt_err)
-
- # Recipe key verification, recipe name does not depends on a recipe having the same name - tc=883
- @testcase(883)
- def test_Recipe_Dependency(self):
- deps = Recipe_Dependency.objects.values('id', 'recipe_id', 'depends_on_id')
- cnt_err = []
- for dep in deps:
- if (not dep['recipe_id'] or not dep['depends_on_id']):
- cnt_err.append(dep['id'])
- else:
- name = Recipe.objects.filter(id = dep['recipe_id']).values('name')
- dep_name = Recipe.objects.filter(id = dep['depends_on_id']).values('name')
- if (name == dep_name):
- cnt_err.append(dep['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe dependency id: %s' % cnt_err)
-
- # Check if package name does not start with a number (0-9) - tc=846
- @testcase(846)
- def test_Package_Name_For_Number(self):
- packages = Package.objects.filter(~Q(size = -1)).values('id', 'name')
- cnt_err = []
- for package in packages:
- if (package['name'][0].isdigit() is True):
- cnt_err.append(package['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
-
- # Check if package version starts with a number (0-9) - tc=847
- @testcase(847)
- def test_Package_Version_Starts_With_Number(self):
- packages = Package.objects.filter(~Q(size = -1)).values('id', 'version')
- cnt_err = []
- for package in packages:
- if (package['version'][0].isdigit() is False):
- cnt_err.append(package['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
-
- # Check if package revision starts with 'r' - tc=848
- @testcase(848)
- def test_Package_Revision_Starts_With_r(self):
- packages = Package.objects.filter(~Q(size = -1)).values('id', 'revision')
- cnt_err = []
- for package in packages:
- if (package['revision'][0].startswith("r") is False):
- cnt_err.append(package['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
-
- # Check the validity of the package build_id
- ### TC must be added in test run
- @testcase(1038)
- def test_Package_Build_Id(self):
- packages = Package.objects.filter(~Q(size = -1)).values('id', 'build_id')
- cnt_err = []
- for package in packages:
- build_id = Build.objects.filter(id = package['build_id']).values('id')
- if (not build_id):
- cnt_err.append(package['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
-
- # Check the validity of package recipe_id
- ### TC must be added in test run
- @testcase(1039)
- def test_Package_Recipe_Id(self):
- packages = Package.objects.filter(~Q(size = -1)).values('id', 'recipe_id')
- cnt_err = []
- for package in packages:
- recipe_id = Recipe.objects.filter(id = package['recipe_id']).values('id')
- if (not recipe_id):
- cnt_err.append(package['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
-
- # Check if package installed_size field is not null
- ### TC must be aded in test run
- @testcase(1040)
- def test_Package_Installed_Size_Not_NULL(self):
- packages = Package.objects.filter(installed_size__isnull = True).values('id')
- cnt_err = []
- for package in packages:
- cnt_err.append(package['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
-
- # Check if all layers requests return exit code is 200 - tc=843
- @testcase(843)
- def test_Layers_Requests_Exit_Code(self):
- layers = Layer.objects.values('id', 'layer_index_url')
- cnt_err = []
- for layer in layers:
- resp = urllib.request.urlopen(layer['layer_index_url'])
- if (resp.getcode() != 200):
- cnt_err.append(layer['id'])
- self.assertEqual(len(cnt_err), 0, msg = 'Errors for layer id: %s' % cnt_err)
-
- # Check if django server starts regardless of the timezone set on the machine - tc=905
- @testcase(905)
- def test_Start_Django_Timezone(self):
- current_path = os.getcwd()
- zonefilelist = []
- ZONEINFOPATH = '/usr/share/zoneinfo/'
- os.chdir("../bitbake/lib/toaster/")
- cnt_err = 0
- for filename in os.listdir(ZONEINFOPATH):
- if os.path.isfile(os.path.join(ZONEINFOPATH, filename)):
- zonefilelist.append(filename)
- for k in range(len(zonefilelist)):
- if k <= 5:
- files = zonefilelist[k]
- os.system("export TZ="+str(files)+"; python manage.py runserver > /dev/null 2>&1 &")
- time.sleep(3)
- pid = subprocess.check_output("ps aux | grep '[/u]sr/bin/python manage.py runserver' | awk '{print $2}'", shell = True)
- if pid:
- os.system("kill -9 "+str(pid))
- else:
- cnt_err.append(zonefilelist[k])
- self.assertEqual(cnt_err, 0, msg = 'Errors django server does not start with timezone: %s' % cnt_err)
- os.chdir(current_path)
diff --git a/meta/lib/oeqa/selftest/archiver.py b/meta/lib/oeqa/selftest/archiver.py
deleted file mode 100644
index f2030c446d..0000000000
--- a/meta/lib/oeqa/selftest/archiver.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import bitbake, get_bb_var
-from oeqa.utils.decorators import testcase
-import glob
-import os
-import shutil
-
-
-class Archiver(oeSelfTest):
-
- @testcase(1345)
- def test_archiver_allows_to_filter_on_recipe_name(self):
- """
- Summary: The archiver should offer the possibility to filter on the recipe. (#6929)
- Expected: 1. Included recipe (busybox) should be included
- 2. Excluded recipe (zlib) should be excluded
- Product: oe-core
- Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- include_recipe = 'busybox'
- exclude_recipe = 'zlib'
-
- features = 'INHERIT += "archiver"\n'
- features += 'ARCHIVER_MODE[src] = "original"\n'
- features += 'COPYLEFT_PN_INCLUDE = "%s"\n' % include_recipe
- features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % exclude_recipe
-
- # Update local.conf
- self.write_config(features)
-
- tmp_dir = get_bb_var('TMPDIR')
- deploy_dir_src = get_bb_var('DEPLOY_DIR_SRC')
- target_sys = get_bb_var('TARGET_SYS')
- src_path = os.path.join(deploy_dir_src, target_sys)
-
- # Delete tmp directory
- shutil.rmtree(tmp_dir)
-
- # Build core-image-minimal
- bitbake('core-image-minimal')
-
- # Check that include_recipe was included
- is_included = len(glob.glob(src_path + '/%s*' % include_recipe))
- self.assertEqual(1, is_included, 'Recipe %s was not included.' % include_recipe)
-
- # Check that exclude_recipe was excluded
- is_excluded = len(glob.glob(src_path + '/%s*' % exclude_recipe))
- self.assertEqual(0, is_excluded, 'Recipe %s was not excluded.' % exclude_recipe)
diff --git a/meta/lib/oeqa/selftest/base.py b/meta/lib/oeqa/selftest/base.py
deleted file mode 100644
index 26c93f905a..0000000000
--- a/meta/lib/oeqa/selftest/base.py
+++ /dev/null
@@ -1,235 +0,0 @@
-# Copyright (c) 2013 Intel Corporation
-#
-# Released under the MIT license (see COPYING.MIT)
-
-
-# DESCRIPTION
-# Base class inherited by test classes in meta/lib/oeqa/selftest
-
-import unittest
-import os
-import sys
-import shutil
-import logging
-import errno
-
-import oeqa.utils.ftools as ftools
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
-from oeqa.utils.decorators import LogResults
-from random import choice
-import glob
-
-@LogResults
-class oeSelfTest(unittest.TestCase):
-
- log = logging.getLogger("selftest.base")
- longMessage = True
-
- def __init__(self, methodName="runTest"):
- self.builddir = os.environ.get("BUILDDIR")
- self.localconf_path = os.path.join(self.builddir, "conf/local.conf")
- self.localconf_backup = os.path.join(self.builddir, "conf/local.bk")
- self.testinc_path = os.path.join(self.builddir, "conf/selftest.inc")
- self.local_bblayers_path = os.path.join(self.builddir, "conf/bblayers.conf")
- self.local_bblayers_backup = os.path.join(self.builddir,
- "conf/bblayers.bk")
- self.testinc_bblayers_path = os.path.join(self.builddir, "conf/bblayers.inc")
- self.machineinc_path = os.path.join(self.builddir, "conf/machine.inc")
- self.testlayer_path = oeSelfTest.testlayer_path
- self._extra_tear_down_commands = []
- self._track_for_cleanup = [
- self.testinc_path, self.testinc_bblayers_path,
- self.machineinc_path, self.localconf_backup,
- self.local_bblayers_backup]
- super(oeSelfTest, self).__init__(methodName)
-
- def setUp(self):
- os.chdir(self.builddir)
- # Check if local.conf or bblayers.conf files backup exists
- # from a previous failed test and restore them
- if os.path.isfile(self.localconf_backup) or os.path.isfile(
- self.local_bblayers_backup):
- self.log.debug("Found a local.conf and/or bblayers.conf backup \
-from a previously aborted test. Restoring these files now, but tests should \
-be re-executed from a clean environment to ensure accurate results.")
- try:
- shutil.copyfile(self.localconf_backup, self.localconf_path)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
- try:
- shutil.copyfile(self.local_bblayers_backup,
- self.local_bblayers_path)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
- else:
- # backup local.conf and bblayers.conf
- shutil.copyfile(self.localconf_path, self.localconf_backup)
- shutil.copyfile(self.local_bblayers_path,
- self.local_bblayers_backup)
- self.log.debug("Creating local.conf and bblayers.conf backups.")
- # we don't know what the previous test left around in config or inc files
- # if it failed so we need a fresh start
- try:
- os.remove(self.testinc_path)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
- for root, _, files in os.walk(self.testlayer_path):
- for f in files:
- if f == 'test_recipe.inc':
- os.remove(os.path.join(root, f))
-
- for incl_file in [self.testinc_bblayers_path, self.machineinc_path]:
- try:
- os.remove(incl_file)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
-
- # Get CUSTOMMACHINE from env (set by --machine argument to oe-selftest)
- custommachine = os.getenv('CUSTOMMACHINE')
- if custommachine:
- if custommachine == 'random':
- machine = get_random_machine()
- else:
- machine = custommachine
- machine_conf = 'MACHINE ??= "%s"\n' % machine
- self.set_machine_config(machine_conf)
- print('MACHINE: %s' % machine)
-
- # tests might need their own setup
- # but if they overwrite this one they have to call
- # super each time, so let's give them an alternative
- self.setUpLocal()
-
- def setUpLocal(self):
- pass
-
- def tearDown(self):
- if self._extra_tear_down_commands:
- failed_extra_commands = []
- for command in self._extra_tear_down_commands:
- result = runCmd(command, ignore_status=True)
- if not result.status == 0:
- failed_extra_commands.append(command)
- if failed_extra_commands:
- self.log.warning("tearDown commands have failed: %s" % ', '.join(map(str, failed_extra_commands)))
- self.log.debug("Trying to move on.")
- self._extra_tear_down_commands = []
-
- if self._track_for_cleanup:
- for path in self._track_for_cleanup:
- if os.path.isdir(path):
- shutil.rmtree(path)
- if os.path.isfile(path):
- os.remove(path)
- self._track_for_cleanup = []
-
- self.tearDownLocal()
-
- def tearDownLocal(self):
- pass
-
- # add test specific commands to the tearDown method.
- def add_command_to_tearDown(self, command):
- self.log.debug("Adding command '%s' to tearDown for this test." % command)
- self._extra_tear_down_commands.append(command)
- # add test specific files or directories to be removed in the tearDown method
- def track_for_cleanup(self, path):
- self.log.debug("Adding path '%s' to be cleaned up when test is over" % path)
- self._track_for_cleanup.append(path)
-
- # write to <builddir>/conf/selftest.inc
- def write_config(self, data):
- self.log.debug("Writing to: %s\n%s\n" % (self.testinc_path, data))
- ftools.write_file(self.testinc_path, data)
-
- custommachine = os.getenv('CUSTOMMACHINE')
- if custommachine and 'MACHINE' in data:
- machine = get_bb_var('MACHINE')
- self.log.warning('MACHINE overridden: %s' % machine)
-
- # append to <builddir>/conf/selftest.inc
- def append_config(self, data):
- self.log.debug("Appending to: %s\n%s\n" % (self.testinc_path, data))
- ftools.append_file(self.testinc_path, data)
-
- custommachine = os.getenv('CUSTOMMACHINE')
- if custommachine and 'MACHINE' in data:
- machine = get_bb_var('MACHINE')
- self.log.warning('MACHINE overridden: %s' % machine)
-
- # remove data from <builddir>/conf/selftest.inc
- def remove_config(self, data):
- self.log.debug("Removing from: %s\n\%s\n" % (self.testinc_path, data))
- ftools.remove_from_file(self.testinc_path, data)
-
- # write to meta-sefltest/recipes-test/<recipe>/test_recipe.inc
- def write_recipeinc(self, recipe, data):
- inc_file = os.path.join(self.testlayer_path, 'recipes-test', recipe, 'test_recipe.inc')
- self.log.debug("Writing to: %s\n%s\n" % (inc_file, data))
- ftools.write_file(inc_file, data)
-
- # append data to meta-sefltest/recipes-test/<recipe>/test_recipe.inc
- def append_recipeinc(self, recipe, data):
- inc_file = os.path.join(self.testlayer_path, 'recipes-test', recipe, 'test_recipe.inc')
- self.log.debug("Appending to: %s\n%s\n" % (inc_file, data))
- ftools.append_file(inc_file, data)
-
- # remove data from meta-sefltest/recipes-test/<recipe>/test_recipe.inc
- def remove_recipeinc(self, recipe, data):
- inc_file = os.path.join(self.testlayer_path, 'recipes-test', recipe, 'test_recipe.inc')
- self.log.debug("Removing from: %s\n%s\n" % (inc_file, data))
- ftools.remove_from_file(inc_file, data)
-
- # delete meta-sefltest/recipes-test/<recipe>/test_recipe.inc file
- def delete_recipeinc(self, recipe):
- inc_file = os.path.join(self.testlayer_path, 'recipes-test', recipe, 'test_recipe.inc')
- self.log.debug("Deleting file: %s" % inc_file)
- try:
- os.remove(inc_file)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
-
- # write to <builddir>/conf/bblayers.inc
- def write_bblayers_config(self, data):
- self.log.debug("Writing to: %s\n%s\n" % (self.testinc_bblayers_path, data))
- ftools.write_file(self.testinc_bblayers_path, data)
-
- # append to <builddir>/conf/bblayers.inc
- def append_bblayers_config(self, data):
- self.log.debug("Appending to: %s\n%s\n" % (self.testinc_bblayers_path, data))
- ftools.append_file(self.testinc_bblayers_path, data)
-
- # remove data from <builddir>/conf/bblayers.inc
- def remove_bblayers_config(self, data):
- self.log.debug("Removing from: %s\n\%s\n" % (self.testinc_bblayers_path, data))
- ftools.remove_from_file(self.testinc_bblayers_path, data)
-
- # write to <builddir>/conf/machine.inc
- def set_machine_config(self, data):
- self.log.debug("Writing to: %s\n%s\n" % (self.machineinc_path, data))
- ftools.write_file(self.machineinc_path, data)
-
-
-def get_available_machines():
- # Get a list of all available machines
- bbpath = get_bb_var('BBPATH').split(':')
- machines = []
-
- for path in bbpath:
- found_machines = glob.glob(os.path.join(path, 'conf', 'machine', '*.conf'))
- if found_machines:
- for i in found_machines:
- # eg: '/home/<user>/poky/meta-intel/conf/machine/intel-core2-32.conf'
- machines.append(os.path.splitext(os.path.basename(i))[0])
-
- return machines
-
-
-def get_random_machine():
- # Get a random machine
- return choice(get_available_machines())
diff --git a/meta/lib/oeqa/selftest/bblayers.py b/meta/lib/oeqa/selftest/bblayers.py
deleted file mode 100644
index d23675e84a..0000000000
--- a/meta/lib/oeqa/selftest/bblayers.py
+++ /dev/null
@@ -1,104 +0,0 @@
-import unittest
-import os
-import logging
-import re
-import shutil
-
-import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, get_bb_var
-from oeqa.utils.decorators import testcase
-
-class BitbakeLayers(oeSelfTest):
-
- @testcase(756)
- def test_bitbakelayers_showcrossdepends(self):
- result = runCmd('bitbake-layers show-cross-depends')
- self.assertTrue('aspell' in result.output, msg = "No dependencies were shown. bitbake-layers show-cross-depends output: %s" % result.output)
-
- @testcase(83)
- def test_bitbakelayers_showlayers(self):
- result = runCmd('bitbake-layers show-layers')
- self.assertTrue('meta-selftest' in result.output, msg = "No layers were shown. bitbake-layers show-layers output: %s" % result.output)
-
- @testcase(93)
- def test_bitbakelayers_showappends(self):
- recipe = "xcursor-transparent-theme"
- bb_file = self.get_recipe_basename(recipe)
- result = runCmd('bitbake-layers show-appends')
- self.assertTrue(bb_file in result.output, msg="%s file was not recognised. bitbake-layers show-appends output: %s" % (bb_file, result.output))
-
- @testcase(90)
- def test_bitbakelayers_showoverlayed(self):
- result = runCmd('bitbake-layers show-overlayed')
- self.assertTrue('aspell' in result.output, msg="aspell overlayed recipe was not recognised bitbake-layers show-overlayed %s" % result.output)
-
- @testcase(95)
- def test_bitbakelayers_flatten(self):
- recipe = "xcursor-transparent-theme"
- recipe_path = "recipes-graphics/xcursor-transparent-theme"
- recipe_file = self.get_recipe_basename(recipe)
- testoutdir = os.path.join(self.builddir, 'test_bitbakelayers_flatten')
- self.assertFalse(os.path.isdir(testoutdir), msg = "test_bitbakelayers_flatten should not exist at this point in time")
- self.track_for_cleanup(testoutdir)
- result = runCmd('bitbake-layers flatten %s' % testoutdir)
- bb_file = os.path.join(testoutdir, recipe_path, recipe_file)
- self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.")
- contents = ftools.read_file(bb_file)
- find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents)
- self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output)
-
- @testcase(1195)
- def test_bitbakelayers_add_remove(self):
- test_layer = os.path.join(get_bb_var('COREBASE'), 'meta-skeleton')
- result = runCmd('bitbake-layers show-layers')
- self.assertNotIn('meta-skeleton', result.output, "This test cannot run with meta-skeleton in bblayers.conf. bitbake-layers show-layers output: %s" % result.output)
- result = runCmd('bitbake-layers add-layer %s' % test_layer)
- result = runCmd('bitbake-layers show-layers')
- self.assertIn('meta-skeleton', result.output, msg = "Something wrong happened. meta-skeleton layer was not added to conf/bblayers.conf. bitbake-layers show-layers output: %s" % result.output)
- result = runCmd('bitbake-layers remove-layer %s' % test_layer)
- result = runCmd('bitbake-layers show-layers')
- self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step. bitbake-layers show-layers output: %s" % result.output)
- result = runCmd('bitbake-layers add-layer %s' % test_layer)
- result = runCmd('bitbake-layers show-layers')
- self.assertIn('meta-skeleton', result.output, msg = "Something wrong happened. meta-skeleton layer was not added to conf/bblayers.conf. bitbake-layers show-layers output: %s" % result.output)
- result = runCmd('bitbake-layers remove-layer */meta-skeleton')
- result = runCmd('bitbake-layers show-layers')
- self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step. bitbake-layers show-layers output: %s" % result.output)
-
- @testcase(1384)
- def test_bitbakelayers_showrecipes(self):
- result = runCmd('bitbake-layers show-recipes')
- self.assertIn('aspell:', result.output)
- self.assertIn('mtd-utils:', result.output)
- self.assertIn('linux-yocto:', result.output)
- self.assertIn('core-image-minimal:', result.output)
- result = runCmd('bitbake-layers show-recipes mtd-utils')
- self.assertIn('mtd-utils:', result.output)
- self.assertNotIn('aspell:', result.output)
- result = runCmd('bitbake-layers show-recipes -i kernel')
- self.assertIn('linux-yocto:', result.output)
- self.assertNotIn('mtd-utils:', result.output)
- result = runCmd('bitbake-layers show-recipes -i image')
- self.assertIn('core-image-minimal', result.output)
- self.assertNotIn('linux-yocto:', result.output)
- self.assertNotIn('mtd-utils:', result.output)
- result = runCmd('bitbake-layers show-recipes -i cmake,pkgconfig')
- self.assertIn('libproxy:', result.output)
- self.assertNotIn('mtd-utils:', result.output) # doesn't inherit either
- self.assertNotIn('wget:', result.output) # doesn't inherit cmake
- self.assertNotIn('waffle:', result.output) # doesn't inherit pkgconfig
- result = runCmd('bitbake-layers show-recipes -i nonexistentclass', ignore_status=True)
- self.assertNotEqual(result.status, 0, 'bitbake-layers show-recipes -i nonexistentclass should have failed')
- self.assertIn('ERROR:', result.output)
-
- def get_recipe_basename(self, recipe):
- recipe_file = ""
- result = runCmd("bitbake-layers show-recipes -f %s" % recipe)
- for line in result.output.splitlines():
- if recipe in line:
- recipe_file = line
- break
-
- self.assertTrue(os.path.isfile(recipe_file), msg = "Can't find recipe file for %s" % recipe)
- return os.path.basename(recipe_file)
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
deleted file mode 100644
index d8cb835829..0000000000
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ /dev/null
@@ -1,277 +0,0 @@
-import os
-import re
-
-import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
-from oeqa.utils.decorators import testcase
-
-class BitbakeTests(oeSelfTest):
-
- def getline(self, res, line):
- for l in res.output.split('\n'):
- if line in l:
- return l
-
- @testcase(789)
- def test_run_bitbake_from_dir_1(self):
- os.chdir(os.path.join(self.builddir, 'conf'))
- self.assertEqual(bitbake('-e').status, 0, msg = "bitbake couldn't run from \"conf\" dir")
-
- @testcase(790)
- def test_run_bitbake_from_dir_2(self):
- my_env = os.environ.copy()
- my_env['BBPATH'] = my_env['BUILDDIR']
- os.chdir(os.path.dirname(os.environ['BUILDDIR']))
- self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from builddir")
-
- @testcase(806)
- def test_event_handler(self):
- self.write_config("INHERIT += \"test_events\"")
- result = bitbake('m4-native')
- find_build_started = re.search("NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Executing RunQueue Tasks", result.output)
- find_build_completed = re.search("Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
- self.assertTrue(find_build_started, msg = "Match failed in:\n%s" % result.output)
- self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
- self.assertFalse('Test for bb.event.InvalidEvent' in result.output, msg = "\"Test for bb.event.InvalidEvent\" message found during bitbake process. bitbake output: %s" % result.output)
-
- @testcase(103)
- def test_local_sstate(self):
- bitbake('m4-native -ccleansstate')
- bitbake('m4-native')
- bitbake('m4-native -cclean')
- result = bitbake('m4-native')
- find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
- self.assertTrue(find_setscene, msg = "No \"m4-native.*do_.*_setscene\" message found during bitbake m4-native. bitbake output: %s" % result.output )
-
- @testcase(105)
- def test_bitbake_invalid_recipe(self):
- result = bitbake('-b asdf', ignore_status=True)
- self.assertTrue("ERROR: Unable to find any recipe file matching 'asdf'" in result.output, msg = "Though asdf recipe doesn't exist, bitbake didn't output any err. message. bitbake output: %s" % result.output)
-
- @testcase(107)
- def test_bitbake_invalid_target(self):
- result = bitbake('asdf', ignore_status=True)
- self.assertTrue("ERROR: Nothing PROVIDES 'asdf'" in result.output, msg = "Though no 'asdf' target exists, bitbake didn't output any err. message. bitbake output: %s" % result.output)
-
- @testcase(106)
- def test_warnings_errors(self):
- result = bitbake('-b asdf', ignore_status=True)
- find_warnings = re.search("Summary: There w.{2,3}? [1-9][0-9]* WARNING messages* shown", result.output)
- find_errors = re.search("Summary: There w.{2,3}? [1-9][0-9]* ERROR messages* shown", result.output)
- self.assertTrue(find_warnings, msg="Did not find the mumber of warnings at the end of the build:\n" + result.output)
- self.assertTrue(find_errors, msg="Did not find the mumber of errors at the end of the build:\n" + result.output)
-
- @testcase(108)
- def test_invalid_patch(self):
- # This patch already exists in SRC_URI so adding it again will cause the
- # patch to fail.
- self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
- self.write_config("INHERIT_remove = \"report-error\"")
- result = bitbake('man -c patch', ignore_status=True)
- self.delete_recipeinc('man')
- bitbake('-cclean man')
- line = self.getline(result, "Function failed: patch_do_patch")
- self.assertTrue(line and line.startswith("ERROR:"), msg = "Repeated patch application didn't fail. bitbake output: %s" % result.output)
-
- @testcase(1354)
- def test_force_task_1(self):
- # test 1 from bug 5875
- test_recipe = 'zlib'
- test_data = "Microsoft Made No Profit From Anyone's Zunes Yo"
- image_dir = get_bb_var('D', test_recipe)
- pkgsplit_dir = get_bb_var('PKGDEST', test_recipe)
- man_dir = get_bb_var('mandir', test_recipe)
-
- bitbake('-c cleansstate %s' % test_recipe)
- bitbake(test_recipe)
- self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
-
- man_file = os.path.join(image_dir + man_dir, 'man3/zlib.3')
- ftools.append_file(man_file, test_data)
- bitbake('-c package -f %s' % test_recipe)
-
- man_split_file = os.path.join(pkgsplit_dir, 'zlib-doc' + man_dir, 'man3/zlib.3')
- man_split_content = ftools.read_file(man_split_file)
- self.assertIn(test_data, man_split_content, 'The man file has not changed in packages-split.')
-
- ret = bitbake(test_recipe)
- self.assertIn('task do_package_write_rpm:', ret.output, 'Task do_package_write_rpm did not re-executed.')
-
- @testcase(163)
- def test_force_task_2(self):
- # test 2 from bug 5875
- test_recipe = 'zlib'
-
- bitbake('-c cleansstate %s' % test_recipe)
- bitbake(test_recipe)
- self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
-
- result = bitbake('-C compile %s' % test_recipe)
- look_for_tasks = ['do_compile:', 'do_install:', 'do_populate_sysroot:', 'do_package:']
- for task in look_for_tasks:
- self.assertIn(task, result.output, msg="Couldn't find %s task.")
-
- @testcase(167)
- def test_bitbake_g(self):
- result = bitbake('-g core-image-full-cmdline')
- for f in ['pn-buildlist', 'pn-depends.dot', 'package-depends.dot', 'task-depends.dot']:
- self.addCleanup(os.remove, f)
- self.assertTrue('NOTE: PN build list saved to \'pn-buildlist\'' in result.output, msg = "No dependency \"pn-buildlist\" file was generated for the given task target. bitbake output: %s" % result.output)
- self.assertTrue('openssh' in ftools.read_file(os.path.join(self.builddir, 'pn-buildlist')), msg = "No \"openssh\" dependency found in pn-buildlist file.")
-
- @testcase(899)
- def test_image_manifest(self):
- bitbake('core-image-minimal')
- deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
- imagename = get_bb_var("IMAGE_LINK_NAME", target="core-image-minimal")
- manifest = os.path.join(deploydir, imagename + ".manifest")
- self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest)
-
- @testcase(168)
- def test_invalid_recipe_src_uri(self):
- data = 'SRC_URI = "file://invalid"'
- self.write_recipeinc('man', data)
- self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
-SSTATE_DIR = \"${TOPDIR}/download-selftest\"
-INHERIT_remove = \"report-error\"
-""")
- self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
-
- bitbake('-ccleanall man')
- result = bitbake('-c fetch man', ignore_status=True)
- bitbake('-ccleanall man')
- self.delete_recipeinc('man')
- self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
- self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \
-doesn't exist, yet no error message encountered. bitbake output: %s" % result.output)
- line = self.getline(result, 'Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
- self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
-doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
-
- @testcase(171)
- def test_rename_downloaded_file(self):
- self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
-SSTATE_DIR = \"${TOPDIR}/download-selftest\"
-""")
- self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
-
- data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"'
- self.write_recipeinc('aspell', data)
- bitbake('-ccleanall aspell')
- result = bitbake('-c fetch aspell', ignore_status=True)
- self.delete_recipeinc('aspell')
- self.assertEqual(result.status, 0, msg = "Couldn't fetch aspell. %s" % result.output)
- self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz')), msg = "File rename failed. No corresponding test-aspell.tar.gz file found under %s" % str(get_bb_var("DL_DIR")))
- self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done')), "File rename failed. No corresponding test-aspell.tar.gz.done file found under %s" % str(get_bb_var("DL_DIR")))
-
- @testcase(1028)
- def test_environment(self):
- self.write_config("TEST_ENV=\"localconf\"")
- result = runCmd('bitbake -e | grep TEST_ENV=')
- self.assertTrue('localconf' in result.output, msg = "bitbake didn't report any value for TEST_ENV variable. To test, run 'bitbake -e | grep TEST_ENV='")
-
- @testcase(1029)
- def test_dry_run(self):
- result = runCmd('bitbake -n m4-native')
- self.assertEqual(0, result.status, "bitbake dry run didn't run as expected. %s" % result.output)
-
- @testcase(1030)
- def test_just_parse(self):
- result = runCmd('bitbake -p')
- self.assertEqual(0, result.status, "errors encountered when parsing recipes. %s" % result.output)
-
- @testcase(1031)
- def test_version(self):
- result = runCmd('bitbake -s | grep wget')
- find = re.search("wget *:([0-9a-zA-Z\.\-]+)", result.output)
- self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output)
-
- @testcase(1032)
- def test_prefile(self):
- preconf = os.path.join(self.builddir, 'conf/prefile.conf')
- self.track_for_cleanup(preconf)
- ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"")
- result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
- self.assertTrue('prefile' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration. ")
- self.write_config("TEST_PREFILE=\"localconf\"")
- result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
- self.assertTrue('localconf' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration.")
-
- @testcase(1033)
- def test_postfile(self):
- postconf = os.path.join(self.builddir, 'conf/postfile.conf')
- self.track_for_cleanup(postconf)
- ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"")
- self.write_config("TEST_POSTFILE=\"localconf\"")
- result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')
- self.assertTrue('postfile' in result.output, "Postconfigure file \"postfile.conf\"was not taken into consideration.")
-
- @testcase(1034)
- def test_checkuri(self):
- result = runCmd('bitbake -c checkuri m4')
- self.assertEqual(0, result.status, msg = "\"checkuri\" task was not executed. bitbake output: %s" % result.output)
-
- @testcase(1035)
- def test_continue(self):
- self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
-SSTATE_DIR = \"${TOPDIR}/download-selftest\"
-INHERIT_remove = \"report-error\"
-""")
- self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
- self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
- runCmd('bitbake -c cleanall man xcursor-transparent-theme')
- result = runCmd('bitbake man xcursor-transparent-theme -k', ignore_status=True)
- errorpos = result.output.find('ERROR: Function failed: do_fail_task')
- manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
- continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
- self.assertLess(errorpos,continuepos, msg = "bitbake didn't pass do_fail_task. bitbake output: %s" % result.output)
-
- @testcase(1119)
- def test_non_gplv3(self):
- data = 'INCOMPATIBLE_LICENSE = "GPLv3"'
- conf = os.path.join(self.builddir, 'conf/local.conf')
- ftools.append_file(conf ,data)
- self.addCleanup(ftools.remove_from_file, conf ,data)
- result = bitbake('readline', ignore_status=True)
- self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
- self.assertFalse(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv3')))
- self.assertTrue(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv2')))
-
- @testcase(1422)
- def test_setscene_only(self):
- """ Bitbake option to restore from sstate only within a build (i.e. execute no real tasks, only setscene)"""
- test_recipe = 'ed'
-
- bitbake(test_recipe)
- bitbake('-c clean %s' % test_recipe)
- ret = bitbake('--setscene-only %s' % test_recipe)
-
- tasks = re.findall(r'task\s+(do_\S+):', ret.output)
-
- for task in tasks:
- self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n'
- 'Executed tasks were: %s' % (task, str(tasks)))
-
- @testcase(1425)
- def test_bbappend_order(self):
- """ Bitbake should bbappend to recipe in a predictable order """
- test_recipe = 'ed'
- test_recipe_summary_before = get_bb_var('SUMMARY', test_recipe)
- test_recipe_pv = get_bb_var('PV', test_recipe)
- recipe_append_file = test_recipe + '_' + test_recipe_pv + '.bbappend'
- expected_recipe_summary = test_recipe_summary_before
-
- for i in range(5):
- recipe_append_dir = test_recipe + '_test_' + str(i)
- recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', recipe_append_dir, recipe_append_file)
- os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', recipe_append_dir))
- feature = 'SUMMARY += "%s"\n' % i
- ftools.write_file(recipe_append_path, feature)
- expected_recipe_summary += ' %s' % i
-
- self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test',
- test_recipe + '_test_*'))
-
- test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
- self.assertEqual(expected_recipe_summary, test_recipe_summary_after)
diff --git a/meta/lib/oeqa/selftest/buildhistory.py b/meta/lib/oeqa/selftest/buildhistory.py
deleted file mode 100644
index 674da6205a..0000000000
--- a/meta/lib/oeqa/selftest/buildhistory.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import os
-import re
-import datetime
-
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import bitbake, get_bb_var
-from oeqa.utils.decorators import testcase
-
-
-class BuildhistoryBase(oeSelfTest):
-
- def config_buildhistory(self, tmp_bh_location=False):
- if (not 'buildhistory' in get_bb_var('USER_CLASSES')) and (not 'buildhistory' in get_bb_var('INHERIT')):
- add_buildhistory_config = 'INHERIT += "buildhistory"\nBUILDHISTORY_COMMIT = "1"'
- self.append_config(add_buildhistory_config)
-
- if tmp_bh_location:
- # Using a temporary buildhistory location for testing
- tmp_bh_dir = os.path.join(self.builddir, "tmp_buildhistory_%s" % datetime.datetime.now().strftime('%Y%m%d%H%M%S'))
- buildhistory_dir_config = "BUILDHISTORY_DIR = \"%s\"" % tmp_bh_dir
- self.append_config(buildhistory_dir_config)
- self.track_for_cleanup(tmp_bh_dir)
-
- def run_buildhistory_operation(self, target, global_config='', target_config='', change_bh_location=False, expect_error=False, error_regex=''):
- if change_bh_location:
- tmp_bh_location = True
- else:
- tmp_bh_location = False
- self.config_buildhistory(tmp_bh_location)
-
- self.append_config(global_config)
- self.append_recipeinc(target, target_config)
- bitbake("-cclean %s" % target)
- result = bitbake(target, ignore_status=True)
- self.remove_config(global_config)
- self.remove_recipeinc(target, target_config)
-
- if expect_error:
- self.assertEqual(result.status, 1, msg="Error expected for global config '%s' and target config '%s'" % (global_config, target_config))
- search_for_error = re.search(error_regex, result.output)
- self.assertTrue(search_for_error, msg="Could not find desired error in output: %s (%s)" % (error_regex, result.output))
- else:
- self.assertEqual(result.status, 0, msg="Command 'bitbake %s' has failed unexpectedly: %s" % (target, result.output))
-
- # No tests should be added to the base class.
- # Please create a new class that inherit this one, or use one of those already available for adding tests.
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
deleted file mode 100644
index 86e4836b83..0000000000
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ /dev/null
@@ -1,216 +0,0 @@
-import os
-import re
-import glob as g
-import shutil
-import tempfile
-from oeqa.selftest.base import oeSelfTest
-from oeqa.selftest.buildhistory import BuildhistoryBase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
-import oeqa.utils.ftools as ftools
-from oeqa.utils.decorators import testcase
-
-class ImageOptionsTests(oeSelfTest):
-
- @testcase(761)
- def test_incremental_image_generation(self):
- image_pkgtype = get_bb_var("IMAGE_PKGTYPE")
- if image_pkgtype != 'rpm':
- self.skipTest('Not using RPM as main package format')
- bitbake("-c cleanall core-image-minimal")
- self.write_config('INC_RPM_IMAGE_GEN = "1"')
- self.append_config('IMAGE_FEATURES += "ssh-server-openssh"')
- bitbake("core-image-minimal")
- log_data_file = os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")
- log_data_created = ftools.read_file(log_data_file)
- incremental_created = re.search("NOTE: load old install solution for incremental install\nNOTE: old install solution not exist\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: Installing the following packages:.*packagegroup-core-ssh-openssh", log_data_created)
- self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
- self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
- bitbake("core-image-minimal")
- log_data_removed = ftools.read_file(log_data_file)
- incremental_removed = re.search("NOTE: load old install solution for incremental install\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*", log_data_removed)
- self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
-
- @testcase(925)
- def test_rm_old_image(self):
- bitbake("core-image-minimal")
- deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
- imagename = get_bb_var("IMAGE_LINK_NAME", target="core-image-minimal")
- deploydir_files = os.listdir(deploydir)
- track_original_files = []
- for image_file in deploydir_files:
- if imagename in image_file and os.path.islink(os.path.join(deploydir, image_file)):
- track_original_files.append(os.path.realpath(os.path.join(deploydir, image_file)))
- self.write_config("RM_OLD_IMAGE = \"1\"")
- bitbake("-C rootfs core-image-minimal")
- deploydir_files = os.listdir(deploydir)
- remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files]
- self.assertFalse(remaining_not_expected, msg="\nThe following image files were not removed: %s" % ', '.join(map(str, remaining_not_expected)))
-
- @testcase(286)
- def test_ccache_tool(self):
- bitbake("ccache-native")
- self.assertTrue(os.path.isfile(os.path.join(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native'), "ccache")), msg = "No ccache found under %s" % str(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native')))
- self.write_config('INHERIT += "ccache"')
- bitbake("m4 -c cleansstate")
- bitbake("m4 -c compile")
- self.addCleanup(bitbake, 'ccache-native -ccleansstate')
- res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True)
- self.assertEqual(0, res.status, msg="No match for ccache in m4 log.do_compile. For further details: %s" % os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile"))
-
- @testcase(1435)
- def test_read_only_image(self):
- self.write_config('IMAGE_FEATURES += "read-only-rootfs"')
- bitbake("core-image-sato")
- # do_image will fail if there are any pending postinsts
-
-class DiskMonTest(oeSelfTest):
-
- @testcase(277)
- def test_stoptask_behavior(self):
- self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"')
- res = bitbake("m4", ignore_status = True)
- self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output, msg = "Tasks should have stopped. Disk monitor is set to STOPTASK: %s" % res.output)
- self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
- self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"')
- res = bitbake("m4", ignore_status = True)
- self.assertTrue('ERROR: Immediately abort since the disk space monitor action is "ABORT"!' in res.output, "Tasks should have been aborted immediatelly. Disk monitor is set to ABORT: %s" % res.output)
- self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
- self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"')
- res = bitbake("m4")
- self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output)
-
-class SanityOptionsTest(oeSelfTest):
- def getline(self, res, line):
- for l in res.output.split('\n'):
- if line in l:
- return l
-
- @testcase(927)
- def test_options_warnqa_errorqa_switch(self):
- bitbake("xcursor-transparent-theme -ccleansstate")
-
- self.write_config("INHERIT_remove = \"report-error\"")
- if "packages-list" not in get_bb_var("ERROR_QA"):
- self.append_config("ERROR_QA_append = \" packages-list\"")
-
- self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
- res = bitbake("xcursor-transparent-theme", ignore_status=True)
- self.delete_recipeinc('xcursor-transparent-theme')
- line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
- self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
- self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
- self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
- self.append_config('ERROR_QA_remove = "packages-list"')
- self.append_config('WARN_QA_append = " packages-list"')
- bitbake("xcursor-transparent-theme -ccleansstate")
- res = bitbake("xcursor-transparent-theme")
- self.delete_recipeinc('xcursor-transparent-theme')
- line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
- self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
-
- @testcase(278)
- def test_sanity_unsafe_script_references(self):
- self.write_config('WARN_QA_append = " unsafe-references-in-scripts"')
-
- bitbake("-ccleansstate gzip")
- res = bitbake("gzip")
- line = self.getline(res, "QA Issue: gzip")
- self.assertFalse(line, "WARNING: QA Issue: gzip message is present in bitbake's output and shouldn't be: %s" % res.output)
-
- self.append_config("""
-do_install_append_pn-gzip () {
- echo "\n${bindir}/test" >> ${D}${bindir}/zcat
-}
-""")
- res = bitbake("gzip")
- line = self.getline(res, "QA Issue: gzip")
- self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output)
-
- @testcase(1434)
- def test_sanity_unsafe_binary_references(self):
- self.write_config('WARN_QA_append = " unsafe-references-in-binaries"')
-
- bitbake("-ccleansstate nfs-utils")
- #res = bitbake("nfs-utils")
- # FIXME when nfs-utils passes this test
- #line = self.getline(res, "QA Issue: nfs-utils")
- #self.assertFalse(line, "WARNING: QA Issue: nfs-utils message is present in bitbake's output and shouldn't be: %s" % res.output)
-
-# self.append_config("""
-#do_install_append_pn-nfs-utils () {
-# echo "\n${bindir}/test" >> ${D}${base_sbindir}/osd_login
-#}
-#""")
- res = bitbake("nfs-utils")
- line = self.getline(res, "QA Issue: nfs-utils")
- self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: nfs-utils message is not present in bitbake's output: %s" % res.output)
-
- @testcase(1421)
- def test_layer_without_git_dir(self):
- """
- Summary: Test that layer git revisions are displayed and do not fail without git repository
- Expected: The build to be successful and without "fatal" errors
- Product: oe-core
- Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- dirpath = tempfile.mkdtemp()
-
- dummy_layer_name = 'meta-dummy'
- dummy_layer_path = os.path.join(dirpath, dummy_layer_name)
- dummy_layer_conf_dir = os.path.join(dummy_layer_path, 'conf')
- os.makedirs(dummy_layer_conf_dir)
- dummy_layer_conf_path = os.path.join(dummy_layer_conf_dir, 'layer.conf')
-
- dummy_layer_content = 'BBPATH .= ":${LAYERDIR}"\n' \
- 'BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"\n' \
- 'BBFILE_COLLECTIONS += "%s"\n' \
- 'BBFILE_PATTERN_%s = "^${LAYERDIR}/"\n' \
- 'BBFILE_PRIORITY_%s = "6"\n' % (dummy_layer_name, dummy_layer_name, dummy_layer_name)
-
- ftools.write_file(dummy_layer_conf_path, dummy_layer_content)
-
- bblayers_conf = 'BBLAYERS += "%s"\n' % dummy_layer_path
- self.write_bblayers_config(bblayers_conf)
-
- test_recipe = 'ed'
-
- ret = bitbake('-n %s' % test_recipe)
-
- err = 'fatal: Not a git repository'
-
- shutil.rmtree(dirpath)
-
- self.assertNotIn(err, ret.output)
-
-
-class BuildhistoryTests(BuildhistoryBase):
-
- @testcase(293)
- def test_buildhistory_basic(self):
- self.run_buildhistory_operation('xcursor-transparent-theme')
- self.assertTrue(os.path.isdir(get_bb_var('BUILDHISTORY_DIR')), "buildhistory dir was not created.")
-
- @testcase(294)
- def test_buildhistory_buildtime_pr_backwards(self):
- self.add_command_to_tearDown('cleanup-workdir')
- target = 'xcursor-transparent-theme'
- error = "ERROR:.*QA Issue: Package version for package %s went backwards which would break package feeds from (.*-r1.* to .*-r0.*)" % target
- self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
- self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error)
-
-class ArchiverTest(oeSelfTest):
- @testcase(926)
- def test_arch_work_dir_and_export_source(self):
- """
- Test for archiving the work directory and exporting the source files.
- """
- self.add_command_to_tearDown('cleanup-workdir')
- self.write_config("INHERIT += \"archiver\"\nARCHIVER_MODE[src] = \"original\"\nARCHIVER_MODE[srpm] = \"1\"")
- res = bitbake("xcursor-transparent-theme", ignore_status=True)
- self.assertEqual(res.status, 0, "\nCouldn't build xcursortransparenttheme.\nbitbake output %s" % res.output)
- pkgs_path = g.glob(str(self.builddir) + "/tmp/deploy/sources/allarch*/xcurs*")
- src_file_glob = str(pkgs_path[0]) + "/xcursor*.src.rpm"
- tar_file_glob = str(pkgs_path[0]) + "/xcursor*.tar.gz"
- self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under tmp/deploy/sources/allarch*/xcursor*")
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
new file mode 100644
index 0000000000..ac3308d8a4
--- /dev/null
+++ b/meta/lib/oeqa/selftest/case.py
@@ -0,0 +1,290 @@
+#
+# Copyright (C) 2013-2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import sys
+import os
+import shutil
+import glob
+import errno
+from unittest.util import safe_repr
+
+import oeqa.utils.ftools as ftools
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.core.case import OETestCase
+
+import bb.utils
+
+class OESelftestTestCase(OETestCase):
+ def __init__(self, methodName="runTest"):
+ self._extra_tear_down_commands = []
+ super(OESelftestTestCase, self).__init__(methodName)
+
+ @classmethod
+ def setUpClass(cls):
+ super(OESelftestTestCase, cls).setUpClass()
+
+ cls.testlayer_path = cls.tc.config_paths['testlayer_path']
+ cls.builddir = cls.tc.config_paths['builddir']
+
+ cls.localconf_path = cls.tc.config_paths['localconf']
+ cls.localconf_backup = cls.tc.config_paths['localconf_class_backup']
+ cls.local_bblayers_path = cls.tc.config_paths['bblayers']
+ cls.local_bblayers_backup = cls.tc.config_paths['bblayers_class_backup']
+
+ cls.testinc_path = os.path.join(cls.tc.config_paths['builddir'],
+ "conf/selftest.inc")
+ cls.testinc_bblayers_path = os.path.join(cls.tc.config_paths['builddir'],
+ "conf/bblayers.inc")
+ cls.machineinc_path = os.path.join(cls.tc.config_paths['builddir'],
+ "conf/machine.inc")
+
+ cls._track_for_cleanup = [
+ cls.testinc_path, cls.testinc_bblayers_path,
+ cls.machineinc_path, cls.localconf_backup,
+ cls.local_bblayers_backup]
+
+ cls.add_include()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.remove_include()
+ cls.remove_inc_files()
+ super(OESelftestTestCase, cls).tearDownClass()
+
+ @classmethod
+ def add_include(cls):
+ if "#include added by oe-selftest" \
+ not in ftools.read_file(os.path.join(cls.builddir, "conf/local.conf")):
+ cls.logger.info("Adding: \"include selftest.inc\" in %s" % os.path.join(cls.builddir, "conf/local.conf"))
+ ftools.append_file(os.path.join(cls.builddir, "conf/local.conf"), \
+ "\n#include added by oe-selftest\ninclude machine.inc\ninclude selftest.inc")
+
+ if "#include added by oe-selftest" \
+ not in ftools.read_file(os.path.join(cls.builddir, "conf/bblayers.conf")):
+ cls.logger.info("Adding: \"include bblayers.inc\" in bblayers.conf")
+ ftools.append_file(os.path.join(cls.builddir, "conf/bblayers.conf"), \
+ "\n#include added by oe-selftest\ninclude bblayers.inc")
+
+ @classmethod
+ def remove_include(cls):
+ if "#include added by oe-selftest.py" \
+ in ftools.read_file(os.path.join(cls.builddir, "conf/local.conf")):
+ cls.logger.info("Removing the include from local.conf")
+ ftools.remove_from_file(os.path.join(cls.builddir, "conf/local.conf"), \
+ "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc")
+
+ if "#include added by oe-selftest.py" \
+ in ftools.read_file(os.path.join(cls.builddir, "conf/bblayers.conf")):
+ cls.logger.info("Removing the include from bblayers.conf")
+ ftools.remove_from_file(os.path.join(cls.builddir, "conf/bblayers.conf"), \
+ "\n#include added by oe-selftest.py\ninclude bblayers.inc")
+
+ @classmethod
+ def remove_inc_files(cls):
+ try:
+ os.remove(os.path.join(cls.builddir, "conf/selftest.inc"))
+ for root, _, files in os.walk(cls.testlayer_path):
+ for f in files:
+ if f == 'test_recipe.inc':
+ os.remove(os.path.join(root, f))
+ except OSError as e:
+ pass
+
+ for incl_file in ['conf/bblayers.inc', 'conf/machine.inc']:
+ try:
+ os.remove(os.path.join(cls.builddir, incl_file))
+ except:
+ pass
+
+ def setUp(self):
+ super(OESelftestTestCase, self).setUp()
+ os.chdir(self.builddir)
+ # Check if local.conf or bblayers.conf files backup exists
+ # from a previous failed test and restore them
+ if os.path.isfile(self.localconf_backup) or os.path.isfile(
+ self.local_bblayers_backup):
+ self.logger.debug("\
+Found a local.conf and/or bblayers.conf backup from a previously aborted test.\
+Restoring these files now, but tests should be re-executed from a clean environment\
+to ensure accurate results.")
+ try:
+ shutil.copyfile(self.localconf_backup, self.localconf_path)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ try:
+ shutil.copyfile(self.local_bblayers_backup,
+ self.local_bblayers_path)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ else:
+ # backup local.conf and bblayers.conf
+ shutil.copyfile(self.localconf_path, self.localconf_backup)
+ shutil.copyfile(self.local_bblayers_path, self.local_bblayers_backup)
+ self.logger.debug("Creating local.conf and bblayers.conf backups.")
+ # we don't know what the previous test left around in config or inc files
+ # if it failed so we need a fresh start
+ try:
+ os.remove(self.testinc_path)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ for root, _, files in os.walk(self.testlayer_path):
+ for f in files:
+ if f == 'test_recipe.inc':
+ os.remove(os.path.join(root, f))
+
+ for incl_file in [self.testinc_bblayers_path, self.machineinc_path]:
+ try:
+ os.remove(incl_file)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+
+ if self.tc.custommachine:
+ machine_conf = 'MACHINE ??= "%s"\n' % self.tc.custommachine
+ self.set_machine_config(machine_conf)
+
+ # tests might need their own setup
+ # but if they overwrite this one they have to call
+ # super each time, so let's give them an alternative
+ self.setUpLocal()
+
+ def setUpLocal(self):
+ pass
+
+ def tearDown(self):
+ if self._extra_tear_down_commands:
+ failed_extra_commands = []
+ for command in self._extra_tear_down_commands:
+ result = runCmd(command, ignore_status=True)
+ if not result.status == 0:
+ failed_extra_commands.append(command)
+ if failed_extra_commands:
+ self.logger.warning("tearDown commands have failed: %s" % ', '.join(map(str, failed_extra_commands)))
+ self.logger.debug("Trying to move on.")
+ self._extra_tear_down_commands = []
+
+ if self._track_for_cleanup:
+ for path in self._track_for_cleanup:
+ if os.path.isdir(path):
+ bb.utils.remove(path, recurse=True)
+ if os.path.isfile(path):
+ os.remove(path)
+ self._track_for_cleanup = []
+
+ self.tearDownLocal()
+ super(OESelftestTestCase, self).tearDown()
+
+ def tearDownLocal(self):
+ pass
+
+ def add_command_to_tearDown(self, command):
+ """Add test specific commands to the tearDown method"""
+ self.logger.debug("Adding command '%s' to tearDown for this test." % command)
+ self._extra_tear_down_commands.append(command)
+
+ def track_for_cleanup(self, path):
+ """Add test specific files or directories to be removed in the tearDown method"""
+ self.logger.debug("Adding path '%s' to be cleaned up when test is over" % path)
+ self._track_for_cleanup.append(path)
+
+ def write_config(self, data, multiconfig=None):
+ """Write to config file"""
+ if multiconfig:
+ multiconfigdir = "%s/conf/multiconfig" % self.builddir
+ os.makedirs(multiconfigdir, exist_ok=True)
+ dest_path = '%s/%s.conf' % (multiconfigdir, multiconfig)
+ self.track_for_cleanup(dest_path)
+ else:
+ dest_path = self.testinc_path
+
+ self.logger.debug("Writing to: %s\n%s\n" % (dest_path, data))
+ ftools.write_file(dest_path, data)
+
+ if not multiconfig and self.tc.custommachine and 'MACHINE' in data:
+ machine = get_bb_var('MACHINE')
+ self.logger.warning('MACHINE overridden: %s' % machine)
+
+ def append_config(self, data):
+ """Append to <builddir>/conf/selftest.inc"""
+ self.logger.debug("Appending to: %s\n%s\n" % (self.testinc_path, data))
+ ftools.append_file(self.testinc_path, data)
+
+ if self.tc.custommachine and 'MACHINE' in data:
+ machine = get_bb_var('MACHINE')
+ self.logger.warning('MACHINE overridden: %s' % machine)
+
+ def remove_config(self, data):
+ """Remove data from <builddir>/conf/selftest.inc"""
+ self.logger.debug("Removing from: %s\n%s\n" % (self.testinc_path, data))
+ ftools.remove_from_file(self.testinc_path, data)
+
+ def recipeinc(self, recipe):
+ """Return absolute path of meta-selftest/recipes-test/<recipe>/test_recipe.inc"""
+ return os.path.join(self.testlayer_path, 'recipes-test', recipe, 'test_recipe.inc')
+
+ def write_recipeinc(self, recipe, data):
+ """Write to meta-selftest/recipes-test/<recipe>/test_recipe.inc"""
+ inc_file = self.recipeinc(recipe)
+ self.logger.debug("Writing to: %s\n%s\n" % (inc_file, data))
+ ftools.write_file(inc_file, data)
+ return inc_file
+
+ def append_recipeinc(self, recipe, data):
+ """Append data to meta-selftest/recipes-test/<recipe>/test_recipe.inc"""
+ inc_file = self.recipeinc(recipe)
+ self.logger.debug("Appending to: %s\n%s\n" % (inc_file, data))
+ ftools.append_file(inc_file, data)
+ return inc_file
+
+ def remove_recipeinc(self, recipe, data):
+ """Remove data from meta-selftest/recipes-test/<recipe>/test_recipe.inc"""
+ inc_file = self.recipeinc(recipe)
+ self.logger.debug("Removing from: %s\n%s\n" % (inc_file, data))
+ ftools.remove_from_file(inc_file, data)
+
+ def delete_recipeinc(self, recipe):
+ """Delete meta-selftest/recipes-test/<recipe>/test_recipe.inc file"""
+ inc_file = self.recipeinc(recipe)
+ self.logger.debug("Deleting file: %s" % inc_file)
+ try:
+ os.remove(inc_file)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ def write_bblayers_config(self, data):
+ """Write to <builddir>/conf/bblayers.inc"""
+ self.logger.debug("Writing to: %s\n%s\n" % (self.testinc_bblayers_path, data))
+ ftools.write_file(self.testinc_bblayers_path, data)
+
+ def append_bblayers_config(self, data):
+ """Append to <builddir>/conf/bblayers.inc"""
+ self.logger.debug("Appending to: %s\n%s\n" % (self.testinc_bblayers_path, data))
+ ftools.append_file(self.testinc_bblayers_path, data)
+
+ def remove_bblayers_config(self, data):
+ """Remove data from <builddir>/conf/bblayers.inc"""
+ self.logger.debug("Removing from: %s\n%s\n" % (self.testinc_bblayers_path, data))
+ ftools.remove_from_file(self.testinc_bblayers_path, data)
+
+ def set_machine_config(self, data):
+ """Write to <builddir>/conf/machine.inc"""
+ self.logger.debug("Writing to: %s\n%s\n" % (self.machineinc_path, data))
+ ftools.write_file(self.machineinc_path, data)
+
+ # check does path exist
+ def assertExists(self, expr, msg=None):
+ if not os.path.exists(expr):
+ msg = self._formatMessage(msg, "%s does not exist" % safe_repr(expr))
+ raise self.failureException(msg)
+
+ # check does path not exist
+ def assertNotExists(self, expr, msg=None):
+ if os.path.exists(expr):
+ msg = self._formatMessage(msg, "%s exists when it should not" % safe_repr(expr))
+ raise self.failureException(msg)
diff --git a/meta/lib/oeqa/selftest/_sstatetests_noauto.py b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
index fc9ae7efb9..f7c356ad09 100644
--- a/meta/lib/oeqa/selftest/_sstatetests_noauto.py
+++ b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
@@ -1,19 +1,20 @@
-import datetime
-import unittest
+#
+# SPDX-License-Identifier: MIT
+#
+
import os
-import re
import shutil
import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
-from oeqa.selftest.sstate import SStateBase
+from oeqa.selftest.cases.sstate import SStateBase
class RebuildFromSState(SStateBase):
@classmethod
def setUpClass(self):
+ super(RebuildFromSState, self).setUpClass()
self.builddir = os.path.join(os.environ.get('BUILDDIR'))
def get_dep_targets(self, primary_targets):
diff --git a/meta/lib/oeqa/selftest/cases/archiver.py b/meta/lib/oeqa/selftest/cases/archiver.py
new file mode 100644
index 0000000000..6bd0e06ec4
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/archiver.py
@@ -0,0 +1,197 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import glob
+from oeqa.utils.commands import bitbake, get_bb_vars
+from oeqa.selftest.case import OESelftestTestCase
+
+class Archiver(OESelftestTestCase):
+
+ def test_archiver_allows_to_filter_on_recipe_name(self):
+ """
+ Summary: The archiver should offer the possibility to filter on the recipe. (#6929)
+ Expected: 1. Included recipe (busybox) should be included
+ 2. Excluded recipe (zlib) should be excluded
+ Product: oe-core
+ Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ include_recipe = 'busybox'
+ exclude_recipe = 'zlib'
+
+ features = 'INHERIT += "archiver"\n'
+ features += 'ARCHIVER_MODE[src] = "original"\n'
+ features += 'COPYLEFT_PN_INCLUDE = "%s"\n' % include_recipe
+ features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % exclude_recipe
+ self.write_config(features)
+
+ bitbake('-c clean %s %s' % (include_recipe, exclude_recipe))
+ bitbake("-c deploy_archives %s %s" % (include_recipe, exclude_recipe))
+
+ bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS'])
+ src_path = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS'])
+
+ # Check that include_recipe was included
+ included_present = len(glob.glob(src_path + '/%s-*' % include_recipe))
+ self.assertTrue(included_present, 'Recipe %s was not included.' % include_recipe)
+
+ # Check that exclude_recipe was excluded
+ excluded_present = len(glob.glob(src_path + '/%s-*' % exclude_recipe))
+ self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % exclude_recipe)
+
+ def test_archiver_filters_by_type(self):
+ """
+ Summary: The archiver is documented to filter on the recipe type.
+ Expected: 1. included recipe type (target) should be included
+ 2. other types should be excluded
+ Product: oe-core
+ Author: André Draszik <adraszik@tycoint.com>
+ """
+
+ target_recipe = 'initscripts'
+ native_recipe = 'zlib-native'
+
+ features = 'INHERIT += "archiver"\n'
+ features += 'ARCHIVER_MODE[src] = "original"\n'
+ features += 'COPYLEFT_RECIPE_TYPES = "target"\n'
+ self.write_config(features)
+
+ bitbake('-c clean %s %s' % (target_recipe, native_recipe))
+ bitbake("%s -c deploy_archives %s" % (target_recipe, native_recipe))
+
+ bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS', 'BUILD_SYS'])
+ src_path_target = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS'])
+ src_path_native = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['BUILD_SYS'])
+
+ # Check that target_recipe was included
+ included_present = len(glob.glob(src_path_target + '/%s-*' % target_recipe))
+ self.assertTrue(included_present, 'Recipe %s was not included.' % target_recipe)
+
+ # Check that native_recipe was excluded
+ excluded_present = len(glob.glob(src_path_native + '/%s-*' % native_recipe))
+ self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % native_recipe)
+
+ def test_archiver_filters_by_type_and_name(self):
+ """
+ Summary: Test that the archiver archives by recipe type, taking the
+ recipe name into account.
+ Expected: 1. included recipe type (target) should be included
+ 2. other types should be excluded
+ 3. recipe by name should be included / excluded,
+ overriding previous decision by type
+ Product: oe-core
+ Author: André Draszik <adraszik@tycoint.com>
+ """
+
+ target_recipes = [ 'initscripts', 'zlib' ]
+ native_recipes = [ 'update-rc.d-native', 'zlib-native' ]
+
+ features = 'INHERIT += "archiver"\n'
+ features += 'ARCHIVER_MODE[src] = "original"\n'
+ features += 'COPYLEFT_RECIPE_TYPES = "target"\n'
+ features += 'COPYLEFT_PN_INCLUDE = "%s"\n' % native_recipes[1]
+ features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % target_recipes[1]
+ self.write_config(features)
+
+ bitbake('-c clean %s %s' % (' '.join(target_recipes), ' '.join(native_recipes)))
+ bitbake('-c deploy_archives %s %s' % (' '.join(target_recipes), ' '.join(native_recipes)))
+
+ bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS', 'BUILD_SYS'])
+ src_path_target = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS'])
+ src_path_native = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['BUILD_SYS'])
+
+ # Check that target_recipe[0] and native_recipes[1] were included
+ included_present = len(glob.glob(src_path_target + '/%s-*' % target_recipes[0]))
+ self.assertTrue(included_present, 'Recipe %s was not included.' % target_recipes[0])
+
+ included_present = len(glob.glob(src_path_native + '/%s-*' % native_recipes[1]))
+ self.assertTrue(included_present, 'Recipe %s was not included.' % native_recipes[1])
+
+ # Check that native_recipes[0] and target_recipes[1] were excluded
+ excluded_present = len(glob.glob(src_path_native + '/%s-*' % native_recipes[0]))
+ self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % native_recipes[0])
+
+ excluded_present = len(glob.glob(src_path_target + '/%s-*' % target_recipes[1]))
+ self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % target_recipes[1])
+
+
+
+ def test_archiver_srpm_mode(self):
+ """
+ Test that in srpm mode, the added recipe dependencies at least exist/work [YOCTO #11121]
+ """
+
+ features = 'INHERIT += "archiver"\n'
+ features += 'ARCHIVER_MODE[srpm] = "1"\n'
+ self.write_config(features)
+
+ bitbake('-n core-image-sato')
+
+ def _test_archiver_mode(self, mode, target_file_name, extra_config=None):
+ target = "selftest-ed"
+
+ features = 'INHERIT += "archiver"\n'
+ features += 'ARCHIVER_MODE[src] = "%s"\n' % (mode)
+ if extra_config:
+ features += extra_config
+ self.write_config(features)
+
+ bitbake('-c clean %s' % (target))
+ bitbake('-c deploy_archives %s' % (target))
+
+ bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS'])
+ glob_str = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS'], '%s-*' % (target))
+ glob_result = glob.glob(glob_str)
+ self.assertTrue(glob_result, 'Missing archiver directory for %s' % (target))
+
+ archive_path = os.path.join(glob_result[0], target_file_name)
+ self.assertTrue(os.path.exists(archive_path), 'Missing archive file %s' % (target_file_name))
+
+ def test_archiver_mode_original(self):
+ """
+ Test that the archiver works in with `ARCHIVER_MODE[src] = "original"`.
+ """
+
+ self._test_archiver_mode('original', 'ed-1.14.1.tar.lz')
+
+ def test_archiver_mode_patched(self):
+ """
+ Test that the archiver works in with `ARCHIVER_MODE[src] = "patched"`.
+ """
+
+ self._test_archiver_mode('patched', 'selftest-ed-1.14.1-r0-patched.tar.gz')
+
+ def test_archiver_mode_configured(self):
+ """
+ Test that the archiver works in with `ARCHIVER_MODE[src] = "configured"`.
+ """
+
+ self._test_archiver_mode('configured', 'selftest-ed-1.14.1-r0-configured.tar.gz')
+
+ def test_archiver_mode_recipe(self):
+ """
+ Test that the archiver works in with `ARCHIVER_MODE[recipe] = "1"`.
+ """
+
+ self._test_archiver_mode('patched', 'selftest-ed-1.14.1-r0-recipe.tar.gz',
+ 'ARCHIVER_MODE[recipe] = "1"\n')
+
+ def test_archiver_mode_diff(self):
+ """
+ Test that the archiver works in with `ARCHIVER_MODE[diff] = "1"`.
+ Exclusions controlled by `ARCHIVER_MODE[diff-exclude]` are not yet tested.
+ """
+
+ self._test_archiver_mode('patched', 'selftest-ed-1.14.1-r0-diff.gz',
+ 'ARCHIVER_MODE[diff] = "1"\n')
+
+ def test_archiver_mode_dumpdata(self):
+ """
+ Test that the archiver works in with `ARCHIVER_MODE[dumpdata] = "1"`.
+ """
+
+ self._test_archiver_mode('patched', 'selftest-ed-1.14.1-r0-showdata.dump',
+ 'ARCHIVER_MODE[dumpdata] = "1"\n')
diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py
new file mode 100644
index 0000000000..f131d9856c
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/bblayers.py
@@ -0,0 +1,118 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+
+import oeqa.utils.ftools as ftools
+from oeqa.utils.commands import runCmd, get_bb_var, get_bb_vars
+
+from oeqa.selftest.case import OESelftestTestCase
+
+class BitbakeLayers(OESelftestTestCase):
+
+ def test_bitbakelayers_showcrossdepends(self):
+ result = runCmd('bitbake-layers show-cross-depends')
+ self.assertIn('aspell', result.output)
+
+ def test_bitbakelayers_showlayers(self):
+ result = runCmd('bitbake-layers show-layers')
+ self.assertIn('meta-selftest', result.output)
+
+ def test_bitbakelayers_showappends(self):
+ recipe = "xcursor-transparent-theme"
+ bb_file = self.get_recipe_basename(recipe)
+ result = runCmd('bitbake-layers show-appends')
+ self.assertIn(bb_file, result.output)
+
+ def test_bitbakelayers_showoverlayed(self):
+ result = runCmd('bitbake-layers show-overlayed')
+ self.assertIn('aspell', result.output)
+
+ def test_bitbakelayers_flatten(self):
+ recipe = "xcursor-transparent-theme"
+ recipe_path = "recipes-graphics/xcursor-transparent-theme"
+ recipe_file = self.get_recipe_basename(recipe)
+ testoutdir = os.path.join(self.builddir, 'test_bitbakelayers_flatten')
+ self.assertFalse(os.path.isdir(testoutdir), msg = "test_bitbakelayers_flatten should not exist at this point in time")
+ self.track_for_cleanup(testoutdir)
+ result = runCmd('bitbake-layers flatten %s' % testoutdir)
+ bb_file = os.path.join(testoutdir, recipe_path, recipe_file)
+ self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.")
+ contents = ftools.read_file(bb_file)
+ find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents)
+ self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output)
+
+ def test_bitbakelayers_add_remove(self):
+ test_layer = os.path.join(get_bb_var('COREBASE'), 'meta-skeleton')
+ result = runCmd('bitbake-layers show-layers')
+ self.assertNotIn('meta-skeleton', result.output, "This test cannot run with meta-skeleton in bblayers.conf. bitbake-layers show-layers output: %s" % result.output)
+ result = runCmd('bitbake-layers add-layer %s' % test_layer)
+ result = runCmd('bitbake-layers show-layers')
+ self.assertIn('meta-skeleton', result.output, msg = "Something wrong happened. meta-skeleton layer was not added to conf/bblayers.conf. bitbake-layers show-layers output: %s" % result.output)
+ result = runCmd('bitbake-layers remove-layer %s' % test_layer)
+ result = runCmd('bitbake-layers show-layers')
+ self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step. bitbake-layers show-layers output: %s" % result.output)
+ result = runCmd('bitbake-layers add-layer %s' % test_layer)
+ result = runCmd('bitbake-layers show-layers')
+ self.assertIn('meta-skeleton', result.output, msg = "Something wrong happened. meta-skeleton layer was not added to conf/bblayers.conf. bitbake-layers show-layers output: %s" % result.output)
+ result = runCmd('bitbake-layers remove-layer */meta-skeleton')
+ result = runCmd('bitbake-layers show-layers')
+ self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step. bitbake-layers show-layers output: %s" % result.output)
+
+ def test_bitbakelayers_showrecipes(self):
+ result = runCmd('bitbake-layers show-recipes')
+ self.assertIn('aspell:', result.output)
+ self.assertIn('mtd-utils:', result.output)
+ self.assertIn('core-image-minimal:', result.output)
+ result = runCmd('bitbake-layers show-recipes mtd-utils')
+ self.assertIn('mtd-utils:', result.output)
+ self.assertNotIn('aspell:', result.output)
+ result = runCmd('bitbake-layers show-recipes -i image')
+ self.assertIn('core-image-minimal', result.output)
+ self.assertNotIn('mtd-utils:', result.output)
+ result = runCmd('bitbake-layers show-recipes -i cmake,pkgconfig')
+ self.assertIn('libproxy:', result.output)
+ self.assertNotIn('mtd-utils:', result.output) # doesn't inherit either
+ self.assertNotIn('wget:', result.output) # doesn't inherit cmake
+ self.assertNotIn('waffle:', result.output) # doesn't inherit pkgconfig
+ result = runCmd('bitbake-layers show-recipes -i nonexistentclass', ignore_status=True)
+ self.assertNotEqual(result.status, 0, 'bitbake-layers show-recipes -i nonexistentclass should have failed')
+ self.assertIn('ERROR:', result.output)
+
+ def test_bitbakelayers_createlayer(self):
+ priority = 10
+ layername = 'test-bitbakelayer-layercreate'
+ layerpath = os.path.join(self.builddir, layername)
+ self.assertFalse(os.path.exists(layerpath), '%s should not exist at this point in time' % layerpath)
+ result = runCmd('bitbake-layers create-layer --priority=%d %s' % (priority, layerpath))
+ self.track_for_cleanup(layerpath)
+ result = runCmd('bitbake-layers add-layer %s' % layerpath)
+ self.add_command_to_tearDown('bitbake-layers remove-layer %s' % layerpath)
+ result = runCmd('bitbake-layers show-layers')
+ find_in_contents = re.search(re.escape(layername) + r'\s+' + re.escape(layerpath) + r'\s+' + re.escape(str(priority)), result.output)
+ self.assertTrue(find_in_contents, "%s not found in layers\n%s" % (layername, result.output))
+
+ layervars = ['BBFILE_PRIORITY', 'BBFILE_PATTERN', 'LAYERDEPENDS', 'LAYERSERIES_COMPAT']
+ bb_vars = get_bb_vars(['BBFILE_COLLECTIONS'] + ['%s_%s' % (v, layername) for v in layervars])
+
+ for v in layervars:
+ varname = '%s_%s' % (v, layername)
+ self.assertIsNotNone(bb_vars[varname], "%s not found" % varname)
+
+ find_in_contents = re.search(r'(^|\s)' + re.escape(layername) + r'($|\s)', bb_vars['BBFILE_COLLECTIONS'])
+ self.assertTrue(find_in_contents, "%s not in BBFILE_COLLECTIONS" % layername)
+
+ self.assertEqual(bb_vars['BBFILE_PRIORITY_%s' % layername], str(priority), 'BBFILE_PRIORITY_%s != %d' % (layername, priority))
+
+ def get_recipe_basename(self, recipe):
+ recipe_file = ""
+ result = runCmd("bitbake-layers show-recipes -f %s" % recipe)
+ for line in result.output.splitlines():
+ if recipe in line:
+ recipe_file = line
+ break
+
+ self.assertTrue(os.path.isfile(recipe_file), msg = "Can't find recipe file for %s" % recipe)
+ return os.path.basename(recipe_file)
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
new file mode 100644
index 0000000000..dc423ec439
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -0,0 +1,299 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+
+import oeqa.utils.ftools as ftools
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+
+from oeqa.selftest.case import OESelftestTestCase
+
+class BitbakeTests(OESelftestTestCase):
+
+ def getline(self, res, line):
+ for l in res.output.split('\n'):
+ if line in l:
+ return l
+
+ # Test bitbake can run from the <builddir>/conf directory
+ def test_run_bitbake_from_dir_1(self):
+ os.chdir(os.path.join(self.builddir, 'conf'))
+ self.assertEqual(bitbake('-e').status, 0, msg = "bitbake couldn't run from \"conf\" dir")
+
+ # Test bitbake can run from the <builddir>'s parent directory
+ def test_run_bitbake_from_dir_2(self):
+ my_env = os.environ.copy()
+ my_env['BBPATH'] = my_env['BUILDDIR']
+ os.chdir(os.path.dirname(os.environ['BUILDDIR']))
+ self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from builddir's parent directory")
+
+ # Test bitbake can run from some other random system location (we use /tmp/)
+ def test_run_bitbake_from_dir_3(self):
+ my_env = os.environ.copy()
+ my_env['BBPATH'] = my_env['BUILDDIR']
+ os.chdir("/tmp/")
+ self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from /tmp/")
+
+
+ def test_event_handler(self):
+ self.write_config("INHERIT += \"test_events\"")
+ result = bitbake('m4-native')
+ find_build_started = re.search(r"NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Executing.*Tasks", result.output)
+ find_build_completed = re.search(r"Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
+ self.assertTrue(find_build_started, msg = "Match failed in:\n%s" % result.output)
+ self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
+ self.assertNotIn('Test for bb.event.InvalidEvent', result.output)
+
+ def test_local_sstate(self):
+ bitbake('m4-native')
+ bitbake('m4-native -cclean')
+ result = bitbake('m4-native')
+ find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
+ self.assertTrue(find_setscene, msg = "No \"m4-native.*do_.*_setscene\" message found during bitbake m4-native. bitbake output: %s" % result.output )
+
+ def test_bitbake_invalid_recipe(self):
+ result = bitbake('-b asdf', ignore_status=True)
+ self.assertTrue("ERROR: Unable to find any recipe file matching 'asdf'" in result.output, msg = "Though asdf recipe doesn't exist, bitbake didn't output any err. message. bitbake output: %s" % result.output)
+
+ def test_bitbake_invalid_target(self):
+ result = bitbake('asdf', ignore_status=True)
+ self.assertIn("ERROR: Nothing PROVIDES 'asdf'", result.output)
+
+ def test_warnings_errors(self):
+ result = bitbake('-b asdf', ignore_status=True)
+ find_warnings = re.search("Summary: There w.{2,3}? [1-9][0-9]* WARNING messages* shown", result.output)
+ find_errors = re.search("Summary: There w.{2,3}? [1-9][0-9]* ERROR messages* shown", result.output)
+ self.assertTrue(find_warnings, msg="Did not find the mumber of warnings at the end of the build:\n" + result.output)
+ self.assertTrue(find_errors, msg="Did not find the mumber of errors at the end of the build:\n" + result.output)
+
+ def test_invalid_patch(self):
+ # This patch should fail to apply.
+ self.write_recipeinc('man-db', 'FILESEXTRAPATHS_prepend := "${THISDIR}/files:"\nSRC_URI += "file://0001-Test-patch-here.patch"')
+ self.write_config("INHERIT_remove = \"report-error\"")
+ result = bitbake('man-db -c patch', ignore_status=True)
+ self.delete_recipeinc('man-db')
+ bitbake('-cclean man-db')
+ found = False
+ for l in result.output.split('\n'):
+ if l.startswith("ERROR:") and "failed" in l and "do_patch" in l:
+ found = l
+ self.assertTrue(found and found.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output)
+
+ def test_force_task_1(self):
+ # test 1 from bug 5875
+ test_recipe = 'zlib'
+ test_data = "Microsoft Made No Profit From Anyone's Zunes Yo"
+ bb_vars = get_bb_vars(['D', 'PKGDEST', 'mandir'], test_recipe)
+ image_dir = bb_vars['D']
+ pkgsplit_dir = bb_vars['PKGDEST']
+ man_dir = bb_vars['mandir']
+
+ bitbake('-c clean %s' % test_recipe)
+ bitbake('-c package -f %s' % test_recipe)
+ self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
+
+ man_file = os.path.join(image_dir + man_dir, 'man3/zlib.3')
+ ftools.append_file(man_file, test_data)
+ bitbake('-c package -f %s' % test_recipe)
+
+ man_split_file = os.path.join(pkgsplit_dir, 'zlib-doc' + man_dir, 'man3/zlib.3')
+ man_split_content = ftools.read_file(man_split_file)
+ self.assertIn(test_data, man_split_content, 'The man file has not changed in packages-split.')
+
+ ret = bitbake(test_recipe)
+ self.assertIn('task do_package_write_rpm:', ret.output, 'Task do_package_write_rpm did not re-executed.')
+
+ def test_force_task_2(self):
+ # test 2 from bug 5875
+ test_recipe = 'zlib'
+
+ bitbake(test_recipe)
+ self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
+
+ result = bitbake('-C compile %s' % test_recipe)
+ look_for_tasks = ['do_compile:', 'do_install:', 'do_populate_sysroot:', 'do_package:']
+ for task in look_for_tasks:
+ self.assertIn(task, result.output, msg="Couldn't find %s task.")
+
+ def test_bitbake_g(self):
+ recipe = 'base-files'
+ result = bitbake('-g %s' % recipe)
+ for f in ['pn-buildlist', 'task-depends.dot']:
+ self.addCleanup(os.remove, f)
+ self.assertTrue('Task dependencies saved to \'task-depends.dot\'' in result.output, msg = "No task dependency \"task-depends.dot\" file was generated for the given task target. bitbake output: %s" % result.output)
+ self.assertIn(recipe, ftools.read_file(os.path.join(self.builddir, 'task-depends.dot')))
+
+ def test_image_manifest(self):
+ bitbake('core-image-minimal')
+ bb_vars = get_bb_vars(["DEPLOY_DIR_IMAGE", "IMAGE_LINK_NAME"], "core-image-minimal")
+ deploydir = bb_vars["DEPLOY_DIR_IMAGE"]
+ imagename = bb_vars["IMAGE_LINK_NAME"]
+ manifest = os.path.join(deploydir, imagename + ".manifest")
+ self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest)
+
+ def test_invalid_recipe_src_uri(self):
+ data = 'SRC_URI = "file://invalid"'
+ self.write_recipeinc('man-db', data)
+ self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
+SSTATE_DIR = \"${TOPDIR}/download-selftest\"
+INHERIT_remove = \"report-error\"
+""")
+ self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
+
+ bitbake('-ccleanall man-db')
+ result = bitbake('-c fetch man-db', ignore_status=True)
+ bitbake('-ccleanall man-db')
+ self.delete_recipeinc('man-db')
+ self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
+ self.assertIn('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:', result.output)
+ line = self.getline(result, 'Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
+ self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
+doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
+
+ def test_rename_downloaded_file(self):
+ # TODO unique dldir instead of using cleanall
+ # TODO: need to set sstatedir?
+ self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
+SSTATE_DIR = \"${TOPDIR}/download-selftest\"
+""")
+ self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
+
+ data = 'SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz;downloadfilename=test-aspell.tar.gz"'
+ self.write_recipeinc('aspell', data)
+ result = bitbake('-f -c fetch aspell', ignore_status=True)
+ self.delete_recipeinc('aspell')
+ self.assertEqual(result.status, 0, msg = "Couldn't fetch aspell. %s" % result.output)
+ dl_dir = get_bb_var("DL_DIR")
+ self.assertTrue(os.path.isfile(os.path.join(dl_dir, 'test-aspell.tar.gz')), msg = "File rename failed. No corresponding test-aspell.tar.gz file found under %s" % dl_dir)
+ self.assertTrue(os.path.isfile(os.path.join(dl_dir, 'test-aspell.tar.gz.done')), "File rename failed. No corresponding test-aspell.tar.gz.done file found under %s" % dl_dir)
+
+ def test_environment(self):
+ self.write_config("TEST_ENV=\"localconf\"")
+ result = runCmd('bitbake -e | grep TEST_ENV=')
+ self.assertIn('localconf', result.output)
+
+ def test_dry_run(self):
+ result = runCmd('bitbake -n m4-native')
+ self.assertEqual(0, result.status, "bitbake dry run didn't run as expected. %s" % result.output)
+
+ def test_just_parse(self):
+ result = runCmd('bitbake -p')
+ self.assertEqual(0, result.status, "errors encountered when parsing recipes. %s" % result.output)
+
+ def test_version(self):
+ result = runCmd('bitbake -s | grep wget')
+ find = re.search(r"wget *:([0-9a-zA-Z\.\-]+)", result.output)
+ self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output)
+
+ def test_prefile(self):
+ preconf = os.path.join(self.builddir, 'conf/prefile.conf')
+ self.track_for_cleanup(preconf)
+ ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"")
+ result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
+ self.assertIn('prefile', result.output)
+ self.write_config("TEST_PREFILE=\"localconf\"")
+ result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
+ self.assertIn('localconf', result.output)
+
+ def test_postfile(self):
+ postconf = os.path.join(self.builddir, 'conf/postfile.conf')
+ self.track_for_cleanup(postconf)
+ ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"")
+ self.write_config("TEST_POSTFILE=\"localconf\"")
+ result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')
+ self.assertIn('postfile', result.output)
+
+ def test_checkuri(self):
+ result = runCmd('bitbake -c checkuri m4')
+ self.assertEqual(0, result.status, msg = "\"checkuri\" task was not executed. bitbake output: %s" % result.output)
+
+ def test_continue(self):
+ self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
+SSTATE_DIR = \"${TOPDIR}/download-selftest\"
+INHERIT_remove = \"report-error\"
+""")
+ self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
+ self.write_recipeinc('man-db',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
+ runCmd('bitbake -c cleanall man-db xcursor-transparent-theme')
+ result = runCmd('bitbake -c unpack -k man-db xcursor-transparent-theme', ignore_status=True)
+ errorpos = result.output.find('ERROR: Function failed: do_fail_task')
+ manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
+ continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
+ self.assertLess(errorpos,continuepos, msg = "bitbake didn't pass do_fail_task. bitbake output: %s" % result.output)
+
+ def test_non_gplv3(self):
+ self.write_config('INCOMPATIBLE_LICENSE = "GPLv3"')
+ result = bitbake('selftest-ed', ignore_status=True)
+ self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
+ lic_dir = get_bb_var('LICENSE_DIRECTORY')
+ self.assertFalse(os.path.isfile(os.path.join(lic_dir, 'selftest-ed/generic_GPLv3')))
+ self.assertTrue(os.path.isfile(os.path.join(lic_dir, 'selftest-ed/generic_GPLv2')))
+
+ def test_setscene_only(self):
+ """ Bitbake option to restore from sstate only within a build (i.e. execute no real tasks, only setscene)"""
+ test_recipe = 'ed'
+
+ bitbake(test_recipe)
+ bitbake('-c clean %s' % test_recipe)
+ ret = bitbake('--setscene-only %s' % test_recipe)
+
+ tasks = re.findall(r'task\s+(do_\S+):', ret.output)
+
+ for task in tasks:
+ self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n'
+ 'Executed tasks were: %s' % (task, str(tasks)))
+
+ def test_skip_setscene(self):
+ test_recipe = 'ed'
+
+ bitbake(test_recipe)
+ bitbake('-c clean %s' % test_recipe)
+
+ ret = bitbake('--setscene-only %s' % test_recipe)
+ tasks = re.findall(r'task\s+(do_\S+):', ret.output)
+
+ for task in tasks:
+ self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n'
+ 'Executed tasks were: %s' % (task, str(tasks)))
+
+ # Run without setscene. Should do nothing
+ ret = bitbake('--skip-setscene %s' % test_recipe)
+ tasks = re.findall(r'task\s+(do_\S+):', ret.output)
+
+ self.assertFalse(tasks, 'Tasks %s ran when they should not have' % (str(tasks)))
+
+ # Clean (leave sstate cache) and run with --skip-setscene. No setscene
+ # tasks should run
+ bitbake('-c clean %s' % test_recipe)
+
+ ret = bitbake('--skip-setscene %s' % test_recipe)
+ tasks = re.findall(r'task\s+(do_\S+):', ret.output)
+
+ for task in tasks:
+ self.assertNotIn('_setscene', task, 'A _setscene task ran: %s.\n'
+ 'Executed tasks were: %s' % (task, str(tasks)))
+
+ def test_bbappend_order(self):
+ """ Bitbake should bbappend to recipe in a predictable order """
+ test_recipe = 'ed'
+ bb_vars = get_bb_vars(['SUMMARY', 'PV'], test_recipe)
+ test_recipe_summary_before = bb_vars['SUMMARY']
+ test_recipe_pv = bb_vars['PV']
+ recipe_append_file = test_recipe + '_' + test_recipe_pv + '.bbappend'
+ expected_recipe_summary = test_recipe_summary_before
+
+ for i in range(5):
+ recipe_append_dir = test_recipe + '_test_' + str(i)
+ recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', recipe_append_dir, recipe_append_file)
+ os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', recipe_append_dir))
+ feature = 'SUMMARY += "%s"\n' % i
+ ftools.write_file(recipe_append_path, feature)
+ expected_recipe_summary += ' %s' % i
+
+ self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test',
+ test_recipe + '_test_*'))
+
+ test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
+ self.assertEqual(expected_recipe_summary, test_recipe_summary_after)
diff --git a/meta/lib/oeqa/selftest/cases/binutils.py b/meta/lib/oeqa/selftest/cases/binutils.py
new file mode 100644
index 0000000000..821f52f5a8
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/binutils.py
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: MIT
+import os
+import sys
+import re
+import logging
+from oeqa.core.decorator import OETestTag
+from oeqa.core.case import OEPTestResultTestCase
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars
+
+def parse_values(content):
+ for i in content:
+ for v in ["PASS", "FAIL", "XPASS", "XFAIL", "UNRESOLVED", "UNSUPPORTED", "UNTESTED", "ERROR", "WARNING"]:
+ if i.startswith(v + ": "):
+ yield i[len(v) + 2:].strip(), v
+ break
+
+@OETestTag("toolchain-user", "toolchain-system")
+class BinutilsCrossSelfTest(OESelftestTestCase, OEPTestResultTestCase):
+ def test_binutils(self):
+ self.run_binutils("binutils")
+
+ def test_gas(self):
+ self.run_binutils("gas")
+
+ def test_ld(self):
+ self.run_binutils("ld")
+
+ def run_binutils(self, suite):
+ features = []
+ features.append('CHECK_TARGETS = "{0}"'.format(suite))
+ self.write_config("\n".join(features))
+
+ recipe = "binutils-cross-testsuite"
+ bb_vars = get_bb_vars(["B", "TARGET_SYS", "T"], recipe)
+ builddir, target_sys, tdir = bb_vars["B"], bb_vars["TARGET_SYS"], bb_vars["T"]
+
+ bitbake("{0} -c check".format(recipe))
+
+ sumspath = os.path.join(builddir, suite, "{0}.sum".format(suite))
+ if not os.path.exists(sumspath):
+ sumspath = os.path.join(builddir, suite, "testsuite", "{0}.sum".format(suite))
+ logpath = os.path.splitext(sumspath)[0] + ".log"
+
+ ptestsuite = "binutils-{}".format(suite) if suite != "binutils" else suite
+ self.ptest_section(ptestsuite, logfile = logpath)
+ with open(sumspath, "r") as f:
+ for test, result in parse_values(f):
+ self.ptest_result(ptestsuite, test, result)
+
diff --git a/meta/lib/oeqa/selftest/cases/buildhistory.py b/meta/lib/oeqa/selftest/cases/buildhistory.py
new file mode 100644
index 0000000000..d865da6252
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/buildhistory.py
@@ -0,0 +1,50 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+import datetime
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_vars
+
+
+class BuildhistoryBase(OESelftestTestCase):
+
+ def config_buildhistory(self, tmp_bh_location=False):
+ bb_vars = get_bb_vars(['USER_CLASSES', 'INHERIT'])
+ if (not 'buildhistory' in bb_vars['USER_CLASSES']) and (not 'buildhistory' in bb_vars['INHERIT']):
+ add_buildhistory_config = 'INHERIT += "buildhistory"\nBUILDHISTORY_COMMIT = "1"'
+ self.append_config(add_buildhistory_config)
+
+ if tmp_bh_location:
+ # Using a temporary buildhistory location for testing
+ tmp_bh_dir = os.path.join(self.builddir, "tmp_buildhistory_%s" % datetime.datetime.now().strftime('%Y%m%d%H%M%S'))
+ buildhistory_dir_config = "BUILDHISTORY_DIR = \"%s\"" % tmp_bh_dir
+ self.append_config(buildhistory_dir_config)
+ self.track_for_cleanup(tmp_bh_dir)
+
+ def run_buildhistory_operation(self, target, global_config='', target_config='', change_bh_location=False, expect_error=False, error_regex=''):
+ if change_bh_location:
+ tmp_bh_location = True
+ else:
+ tmp_bh_location = False
+ self.config_buildhistory(tmp_bh_location)
+
+ self.append_config(global_config)
+ self.append_recipeinc(target, target_config)
+ bitbake("-cclean %s" % target)
+ result = bitbake(target, ignore_status=True)
+ self.remove_config(global_config)
+ self.remove_recipeinc(target, target_config)
+
+ if expect_error:
+ self.assertEqual(result.status, 1, msg="Error expected for global config '%s' and target config '%s'" % (global_config, target_config))
+ search_for_error = re.search(error_regex, result.output)
+ self.assertTrue(search_for_error, msg="Could not find desired error in output: %s (%s)" % (error_regex, result.output))
+ else:
+ self.assertEqual(result.status, 0, msg="Command 'bitbake %s' has failed unexpectedly: %s" % (target, result.output))
+
+ # No tests should be added to the base class.
+ # Please create a new class that inherit this one, or use one of those already available for adding tests.
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
new file mode 100644
index 0000000000..e91f0bd18f
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -0,0 +1,198 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+import glob as g
+import shutil
+import tempfile
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.selftest.cases.buildhistory import BuildhistoryBase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+import oeqa.utils.ftools as ftools
+
+class ImageOptionsTests(OESelftestTestCase):
+
+ def test_incremental_image_generation(self):
+ image_pkgtype = get_bb_var("IMAGE_PKGTYPE")
+ if image_pkgtype != 'rpm':
+ self.skipTest('Not using RPM as main package format')
+ bitbake("-c clean core-image-minimal")
+ self.write_config('INC_RPM_IMAGE_GEN = "1"')
+ self.append_config('IMAGE_FEATURES += "ssh-server-openssh"')
+ bitbake("core-image-minimal")
+ log_data_file = os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")
+ log_data_created = ftools.read_file(log_data_file)
+ incremental_created = re.search(r"Installing\s*:\s*packagegroup-core-ssh-openssh", log_data_created)
+ self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
+ self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
+ bitbake("core-image-minimal")
+ log_data_removed = ftools.read_file(log_data_file)
+ incremental_removed = re.search(r"Erasing\s*:\s*packagegroup-core-ssh-openssh", log_data_removed)
+ self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
+
+ def test_ccache_tool(self):
+ bitbake("ccache-native")
+ bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'ccache-native')
+ p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache"
+ self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p)
+ self.write_config('INHERIT += "ccache"')
+ self.add_command_to_tearDown('bitbake -c clean m4-native')
+ bitbake("m4-native -c clean")
+ bitbake("m4-native -f -c compile")
+ log_compile = os.path.join(get_bb_var("WORKDIR","m4-native"), "temp/log.do_compile")
+ with open(log_compile, "r") as f:
+ loglines = "".join(f.readlines())
+ self.assertIn("ccache", loglines, msg="No match for ccache in m4-native log.do_compile. For further details: %s" % log_compile)
+
+ def test_read_only_image(self):
+ distro_features = get_bb_var('DISTRO_FEATURES')
+ if not ('x11' in distro_features and 'opengl' in distro_features):
+ self.skipTest('core-image-sato requires x11 and opengl in distro features')
+ self.write_config('IMAGE_FEATURES += "read-only-rootfs"')
+ bitbake("core-image-sato")
+ # do_image will fail if there are any pending postinsts
+
+class DiskMonTest(OESelftestTestCase):
+
+ def test_stoptask_behavior(self):
+ self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"')
+ res = bitbake("delay -c delay", ignore_status = True)
+ self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output, msg = "Tasks should have stopped. Disk monitor is set to STOPTASK: %s" % res.output)
+ self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
+ self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"')
+ res = bitbake("delay -c delay", ignore_status = True)
+ self.assertTrue('ERROR: Immediately abort since the disk space monitor action is "ABORT"!' in res.output, "Tasks should have been aborted immediatelly. Disk monitor is set to ABORT: %s" % res.output)
+ self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
+ self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"')
+ res = bitbake("delay -c delay")
+ self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output)
+
+class SanityOptionsTest(OESelftestTestCase):
+ def getline(self, res, line):
+ for l in res.output.split('\n'):
+ if line in l:
+ return l
+
+ def test_options_warnqa_errorqa_switch(self):
+
+ self.write_config("INHERIT_remove = \"report-error\"")
+ if "packages-list" not in get_bb_var("ERROR_QA"):
+ self.append_config("ERROR_QA_append = \" packages-list\"")
+
+ self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
+ self.add_command_to_tearDown('bitbake -c clean xcursor-transparent-theme')
+ res = bitbake("xcursor-transparent-theme -f -c package", ignore_status=True)
+ self.delete_recipeinc('xcursor-transparent-theme')
+ line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
+ self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
+ self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
+ self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
+ self.append_config('ERROR_QA_remove = "packages-list"')
+ self.append_config('WARN_QA_append = " packages-list"')
+ res = bitbake("xcursor-transparent-theme -f -c package")
+ self.delete_recipeinc('xcursor-transparent-theme')
+ line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
+ self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
+
+ def test_layer_without_git_dir(self):
+ """
+ Summary: Test that layer git revisions are displayed and do not fail without git repository
+ Expected: The build to be successful and without "fatal" errors
+ Product: oe-core
+ Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ dirpath = tempfile.mkdtemp()
+
+ dummy_layer_name = 'meta-dummy'
+ dummy_layer_path = os.path.join(dirpath, dummy_layer_name)
+ dummy_layer_conf_dir = os.path.join(dummy_layer_path, 'conf')
+ os.makedirs(dummy_layer_conf_dir)
+ dummy_layer_conf_path = os.path.join(dummy_layer_conf_dir, 'layer.conf')
+
+ dummy_layer_content = 'BBPATH .= ":${LAYERDIR}"\n' \
+ 'BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"\n' \
+ 'BBFILE_COLLECTIONS += "%s"\n' \
+ 'BBFILE_PATTERN_%s = "^${LAYERDIR}/"\n' \
+ 'BBFILE_PRIORITY_%s = "6"\n' % (dummy_layer_name, dummy_layer_name, dummy_layer_name)
+
+ ftools.write_file(dummy_layer_conf_path, dummy_layer_content)
+
+ bblayers_conf = 'BBLAYERS += "%s"\n' % dummy_layer_path
+ self.write_bblayers_config(bblayers_conf)
+
+ test_recipe = 'ed'
+
+ ret = bitbake('-n %s' % test_recipe)
+
+ err = 'fatal: Not a git repository'
+
+ shutil.rmtree(dirpath)
+
+ self.assertNotIn(err, ret.output)
+
+
+class BuildhistoryTests(BuildhistoryBase):
+
+ def test_buildhistory_basic(self):
+ self.run_buildhistory_operation('xcursor-transparent-theme')
+ self.assertTrue(os.path.isdir(get_bb_var('BUILDHISTORY_DIR')), "buildhistory dir was not created.")
+
+ def test_buildhistory_buildtime_pr_backwards(self):
+ target = 'xcursor-transparent-theme'
+ error = "ERROR:.*QA Issue: Package version for package %s went backwards which would break package feeds \(from .*-r1.* to .*-r0.*\)" % target
+ self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
+ self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error)
+
+class ArchiverTest(OESelftestTestCase):
+ def test_arch_work_dir_and_export_source(self):
+ """
+ Test for archiving the work directory and exporting the source files.
+ """
+ self.write_config("INHERIT += \"archiver\"\nARCHIVER_MODE[src] = \"original\"\nARCHIVER_MODE[srpm] = \"1\"")
+ res = bitbake("xcursor-transparent-theme", ignore_status=True)
+ self.assertEqual(res.status, 0, "\nCouldn't build xcursortransparenttheme.\nbitbake output %s" % res.output)
+ deploy_dir_src = get_bb_var('DEPLOY_DIR_SRC')
+ pkgs_path = g.glob(str(deploy_dir_src) + "/allarch*/xcurs*")
+ src_file_glob = str(pkgs_path[0]) + "/xcursor*.src.rpm"
+ tar_file_glob = str(pkgs_path[0]) + "/xcursor*.tar.gz"
+ self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/allarch*/xcursor*" % deploy_dir_src)
+
+class ToolchainOptions(OESelftestTestCase):
+ def test_toolchain_fortran(self):
+ """
+ Test that Fortran works by building a Hello, World binary.
+ """
+
+ features = 'FORTRAN_forcevariable = ",fortran"\n'
+ self.write_config(features)
+ bitbake('fortran-helloworld')
+
+class SourceMirroring(OESelftestTestCase):
+ # Can we download everything from the Yocto Sources Mirror over http only
+ def test_yocto_source_mirror(self):
+ self.write_config("""
+BB_ALLOWED_NETWORKS = "downloads.yoctoproject.org"
+MIRRORS = ""
+DL_DIR = "${TMPDIR}/test_downloads"
+STAMPS_DIR = "${TMPDIR}/test_stamps"
+SSTATE_DIR = "${TMPDIR}/test_sstate-cache"
+PREMIRRORS = "\\
+ bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
+ https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n"
+""")
+
+ bitbake("world --runall fetch")
+
diff --git a/meta/lib/oeqa/selftest/cases/containerimage.py b/meta/lib/oeqa/selftest/cases/containerimage.py
new file mode 100644
index 0000000000..c0998e319e
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/containerimage.py
@@ -0,0 +1,88 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
+
+# This test builds an image with using the "container" IMAGE_FSTYPE, and
+# ensures that then files in the image are only the ones expected.
+#
+# The only package added to the image is container_image_testpkg, which
+# contains one file. However, due to some other things not cleaning up during
+# rootfs creation, there is some cruft. Ideally bugs will be filed and the
+# cruft removed, but for now we whitelist some known set.
+#
+# Also for performance reasons we're only checking the cruft when using ipk.
+# When using deb, and rpm it is a bit different and we could test all
+# of them, but this test is more to catch if other packages get added by
+# default other than what is in ROOTFS_BOOTSTRAP_INSTALL.
+#
+class ContainerImageTests(OESelftestTestCase):
+
+ # Verify that when specifying a IMAGE_TYPEDEP_ of the form "foo.bar" that
+ # the conversion type bar gets added as a dep as well
+ def test_expected_files(self):
+
+ def get_each_path_part(path):
+ if path:
+ part = [ '.' + path + '/' ]
+ result = get_each_path_part(path.rsplit('/', 1)[0])
+ if result:
+ return part + result
+ else:
+ return part
+ else:
+ return None
+
+ self.write_config("""PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
+IMAGE_FSTYPES = "container"
+PACKAGE_CLASSES = "package_ipk"
+IMAGE_FEATURES = ""
+IMAGE_BUILDINFO_FILE = ""
+""")
+
+ bbvars = get_bb_vars(['bindir', 'sysconfdir', 'localstatedir',
+ 'DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'],
+ target='container-test-image')
+ expected_files = [
+ './',
+ '.{bindir}/theapp',
+ '.{sysconfdir}/default/',
+ '.{sysconfdir}/default/postinst',
+ '.{sysconfdir}/ld.so.cache',
+ '.{sysconfdir}/timestamp',
+ '.{sysconfdir}/version',
+ './run/',
+ '.{localstatedir}/cache/',
+ '.{localstatedir}/cache/ldconfig/',
+ '.{localstatedir}/cache/ldconfig/aux-cache',
+ '.{localstatedir}/cache/opkg/',
+ '.{localstatedir}/lib/',
+ '.{localstatedir}/lib/opkg/'
+ ]
+
+ expected_files = [ x.format(bindir=bbvars['bindir'],
+ sysconfdir=bbvars['sysconfdir'],
+ localstatedir=bbvars['localstatedir'])
+ for x in expected_files ]
+
+ # Since tar lists all directories individually, make sure each element
+ # from bindir, sysconfdir, etc is added
+ expected_files += get_each_path_part(bbvars['bindir'])
+ expected_files += get_each_path_part(bbvars['sysconfdir'])
+ expected_files += get_each_path_part(bbvars['localstatedir'])
+
+ expected_files = sorted(expected_files)
+
+ # Build the image of course
+ bitbake('container-test-image')
+
+ image = os.path.join(bbvars['DEPLOY_DIR_IMAGE'],
+ bbvars['IMAGE_LINK_NAME'] + '.tar.bz2')
+
+ # Ensure the files in the image are what we expect
+ result = runCmd("tar tf {} | sort".format(image), shell=True)
+ self.assertEqual(result.output.split('\n'), expected_files)
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
new file mode 100644
index 0000000000..57e6662e4a
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -0,0 +1,1779 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+import shutil
+import tempfile
+import glob
+import fnmatch
+
+import oeqa.utils.ftools as ftools
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
+from oeqa.utils.commands import get_bb_vars, runqemu, get_test_layer
+
+oldmetapath = None
+
+def setUpModule():
+ import bb.utils
+
+ global templayerdir
+ templayerdir = tempfile.mkdtemp(prefix='devtoolqa')
+ corecopydir = os.path.join(templayerdir, 'core-copy')
+ bblayers_conf = os.path.join(os.environ['BUILDDIR'], 'conf', 'bblayers.conf')
+ edited_layers = []
+
+ # We need to take a copy of the meta layer so we can modify it and not
+ # have any races against other tests that might be running in parallel
+ # however things like COREBASE mean that you can't just copy meta, you
+ # need the whole repository.
+ def bblayers_edit_cb(layerpath, canonical_layerpath):
+ global oldmetapath
+ if not canonical_layerpath.endswith('/'):
+ # This helps us match exactly when we're using this path later
+ canonical_layerpath += '/'
+ if not edited_layers and canonical_layerpath.endswith('/meta/'):
+ canonical_layerpath = os.path.realpath(canonical_layerpath) + '/'
+ edited_layers.append(layerpath)
+ oldmetapath = os.path.realpath(layerpath)
+ result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath)
+ oldreporoot = result.output.rstrip()
+ newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot))
+ runCmd('git clone %s %s' % (oldreporoot, corecopydir), cwd=templayerdir)
+ # Now we need to copy any modified files
+ # You might ask "why not just copy the entire tree instead of
+ # cloning and doing this?" - well, the problem with that is
+ # TMPDIR or an equally large subdirectory might exist
+ # under COREBASE and we don't want to copy that, so we have
+ # to be selective.
+ result = runCmd('git status --porcelain', cwd=oldreporoot)
+ for line in result.output.splitlines():
+ if line.startswith(' M ') or line.startswith('?? '):
+ relpth = line.split()[1]
+ pth = os.path.join(oldreporoot, relpth)
+ if pth.startswith(canonical_layerpath):
+ if relpth.endswith('/'):
+ destdir = os.path.join(corecopydir, relpth)
+ shutil.copytree(pth, destdir)
+ else:
+ destdir = os.path.join(corecopydir, os.path.dirname(relpth))
+ bb.utils.mkdirhier(destdir)
+ shutil.copy2(pth, destdir)
+ return newmetapath
+ else:
+ return layerpath
+ bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb)
+
+def tearDownModule():
+ if oldmetapath:
+ edited_layers = []
+ def bblayers_edit_cb(layerpath, canonical_layerpath):
+ if not edited_layers and canonical_layerpath.endswith('/meta'):
+ edited_layers.append(layerpath)
+ return oldmetapath
+ else:
+ return layerpath
+ bblayers_conf = os.path.join(os.environ['BUILDDIR'], 'conf', 'bblayers.conf')
+ bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb)
+ shutil.rmtree(templayerdir)
+
+class DevtoolBase(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(DevtoolBase, cls).setUpClass()
+ bb_vars = get_bb_vars(['TOPDIR', 'SSTATE_DIR'])
+ cls.original_sstate = bb_vars['SSTATE_DIR']
+ cls.devtool_sstate = os.path.join(bb_vars['TOPDIR'], 'sstate_devtool')
+ cls.sstate_conf = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate
+ cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n'
+ % cls.original_sstate)
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.logger.debug('Deleting devtool sstate cache on %s' % cls.devtool_sstate)
+ runCmd('rm -rf %s' % cls.devtool_sstate)
+ super(DevtoolBase, cls).tearDownClass()
+
+ def setUp(self):
+ """Test case setup function"""
+ super(DevtoolBase, self).setUp()
+ self.workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(self.workspacedir),
+ 'This test cannot be run with a workspace directory '
+ 'under the build directory')
+ self.append_config(self.sstate_conf)
+
+ def _check_src_repo(self, repo_dir):
+ """Check srctree git repository"""
+ self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')),
+ 'git repository for external source tree not found')
+ result = runCmd('git status --porcelain', cwd=repo_dir)
+ self.assertEqual(result.output.strip(), "",
+ 'Created git repo is not clean')
+ result = runCmd('git symbolic-ref HEAD', cwd=repo_dir)
+ self.assertEqual(result.output.strip(), "refs/heads/devtool",
+ 'Wrong branch in git repo')
+
+ def _check_repo_status(self, repo_dir, expected_status):
+ """Check the worktree status of a repository"""
+ result = runCmd('git status . --porcelain',
+ cwd=repo_dir)
+ for line in result.output.splitlines():
+ for ind, (f_status, fn_re) in enumerate(expected_status):
+ if re.match(fn_re, line[3:]):
+ if f_status != line[:2]:
+ self.fail('Unexpected status in line: %s' % line)
+ expected_status.pop(ind)
+ break
+ else:
+ self.fail('Unexpected modified file in line: %s' % line)
+ if expected_status:
+ self.fail('Missing file changes: %s' % expected_status)
+
+ def _test_recipe_contents(self, recipefile, checkvars, checkinherits):
+ with open(recipefile, 'r') as f:
+ invar = None
+ invalue = None
+ inherits = set()
+ for line in f:
+ var = None
+ if invar:
+ value = line.strip().strip('"')
+ if value.endswith('\\'):
+ invalue += ' ' + value[:-1].strip()
+ continue
+ else:
+ invalue += ' ' + value.strip()
+ var = invar
+ value = invalue
+ invar = None
+ elif '=' in line:
+ splitline = line.split('=', 1)
+ var = splitline[0].rstrip()
+ value = splitline[1].strip().strip('"')
+ if value.endswith('\\'):
+ invalue = value[:-1].strip()
+ invar = var
+ continue
+ elif line.startswith('inherit '):
+ inherits.update(line.split()[1:])
+
+ if var and var in checkvars:
+ needvalue = checkvars.pop(var)
+ if needvalue is None:
+ self.fail('Variable %s should not appear in recipe, but value is being set to "%s"' % (var, value))
+ if isinstance(needvalue, set):
+ if var == 'LICENSE':
+ value = set(value.split(' & '))
+ else:
+ value = set(value.split())
+ self.assertEqual(value, needvalue, 'values for %s do not match' % var)
+
+
+ missingvars = {}
+ for var, value in checkvars.items():
+ if value is not None:
+ missingvars[var] = value
+ self.assertEqual(missingvars, {}, 'Some expected variables not found in recipe: %s' % checkvars)
+
+ for inherit in checkinherits:
+ self.assertIn(inherit, inherits, 'Missing inherit of %s' % inherit)
+
+ def _check_bbappend(self, testrecipe, recipefile, appenddir):
+ result = runCmd('bitbake-layers show-appends', cwd=self.builddir)
+ resultlines = result.output.splitlines()
+ inrecipe = False
+ bbappends = []
+ bbappendfile = None
+ for line in resultlines:
+ if inrecipe:
+ if line.startswith(' '):
+ bbappends.append(line.strip())
+ else:
+ break
+ elif line == '%s:' % os.path.basename(recipefile):
+ inrecipe = True
+ self.assertLessEqual(len(bbappends), 2, '%s recipe is being bbappended by another layer - bbappends found:\n %s' % (testrecipe, '\n '.join(bbappends)))
+ for bbappend in bbappends:
+ if bbappend.startswith(appenddir):
+ bbappendfile = bbappend
+ break
+ else:
+ self.fail('bbappend for recipe %s does not seem to be created in test layer' % testrecipe)
+ return bbappendfile
+
+ def _create_temp_layer(self, templayerdir, addlayer, templayername, priority=999, recipepathspec='recipes-*/*'):
+ create_temp_layer(templayerdir, templayername, priority, recipepathspec)
+ if addlayer:
+ self.add_command_to_tearDown('bitbake-layers remove-layer %s || true' % templayerdir)
+ result = runCmd('bitbake-layers add-layer %s' % templayerdir, cwd=self.builddir)
+
+ def _process_ls_output(self, output):
+ """
+ Convert ls -l output to a format we can reasonably compare from one context
+ to another (e.g. from host to target)
+ """
+ filelist = []
+ for line in output.splitlines():
+ splitline = line.split()
+ if len(splitline) < 8:
+ self.fail('_process_ls_output: invalid output line: %s' % line)
+ # Remove trailing . on perms
+ splitline[0] = splitline[0].rstrip('.')
+ # Remove leading . on paths
+ splitline[-1] = splitline[-1].lstrip('.')
+ # Drop fields we don't want to compare
+ del splitline[7]
+ del splitline[6]
+ del splitline[5]
+ del splitline[4]
+ del splitline[1]
+ filelist.append(' '.join(splitline))
+ return filelist
+
+
+class DevtoolTests(DevtoolBase):
+
+ def test_create_workspace(self):
+ # Check preconditions
+ result = runCmd('bitbake-layers show-layers')
+ self.assertTrue('\nworkspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
+ # remove conf/devtool.conf to avoid it corrupting tests
+ devtoolconf = os.path.join(self.builddir, 'conf', 'devtool.conf')
+ self.track_for_cleanup(devtoolconf)
+ # Try creating a workspace layer with a specific path
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ result = runCmd('devtool create-workspace %s' % tempdir)
+ self.assertTrue(os.path.isfile(os.path.join(tempdir, 'conf', 'layer.conf')), msg = "No workspace created. devtool output: %s " % result.output)
+ result = runCmd('bitbake-layers show-layers')
+ self.assertIn(tempdir, result.output)
+ # Try creating a workspace layer with the default path
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool create-workspace')
+ self.assertTrue(os.path.isfile(os.path.join(self.workspacedir, 'conf', 'layer.conf')), msg = "No workspace created. devtool output: %s " % result.output)
+ result = runCmd('bitbake-layers show-layers')
+ self.assertNotIn(tempdir, result.output)
+ self.assertIn(self.workspacedir, result.output)
+
+class DevtoolAddTests(DevtoolBase):
+
+ def test_devtool_add(self):
+ # Fetch source
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ pn = 'pv'
+ pv = '1.5.3'
+ url = 'http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2'
+ result = runCmd('wget %s' % url, cwd=tempdir)
+ result = runCmd('tar xfv %s' % os.path.basename(url), cwd=tempdir)
+ srcdir = os.path.join(tempdir, '%s-%s' % (pn, pv))
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory')
+ # Test devtool add
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c cleansstate %s' % pn)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool add %s %s' % (pn, srcdir))
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ recipepath = '%s/recipes/%s/%s_%s.bb' % (self.workspacedir, pn, pn, pv)
+ self.assertIn(recipepath, result.output)
+ self.assertIn(srcdir, result.output)
+ # Test devtool find-recipe
+ result = runCmd('devtool -q find-recipe %s' % pn)
+ self.assertEqual(recipepath, result.output.strip())
+ # Test devtool edit-recipe
+ result = runCmd('VISUAL="echo 123" devtool -q edit-recipe %s' % pn)
+ self.assertEqual('123 %s' % recipepath, result.output.strip())
+ # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
+ bitbake('%s -c cleansstate' % pn)
+ # Test devtool build
+ result = runCmd('devtool build %s' % pn)
+ bb_vars = get_bb_vars(['D', 'bindir'], pn)
+ installdir = bb_vars['D']
+ self.assertTrue(installdir, 'Could not query installdir variable')
+ bindir = bb_vars['bindir']
+ self.assertTrue(bindir, 'Could not query bindir variable')
+ if bindir[0] == '/':
+ bindir = bindir[1:]
+ self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D')
+
+ def test_devtool_add_git_local(self):
+ # We need dbus built so that DEPENDS recognition works
+ bitbake('dbus')
+ # Fetch source from a remote URL, but do it outside of devtool
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ pn = 'dbus-wait'
+ srcrev = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
+ # We choose an https:// git URL here to check rewriting the URL works
+ url = 'https://git.yoctoproject.org/git/dbus-wait'
+ # Force fetching to "noname" subdir so we verify we're picking up the name from autoconf
+ # instead of the directory name
+ result = runCmd('git clone %s noname' % url, cwd=tempdir)
+ srcdir = os.path.join(tempdir, 'noname')
+ result = runCmd('git reset --hard %s' % srcrev, cwd=srcdir)
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure script in source directory')
+ # Test devtool add
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # Don't specify a name since we should be able to auto-detect it
+ result = runCmd('devtool add %s' % srcdir)
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
+ # Check the recipe name is correct
+ recipefile = get_bb_var('FILE', pn)
+ self.assertIn('%s_git.bb' % pn, recipefile, 'Recipe file incorrectly named')
+ self.assertIn(recipefile, result.output)
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(pn, result.output)
+ self.assertIn(srcdir, result.output)
+ self.assertIn(recipefile, result.output)
+ checkvars = {}
+ checkvars['LICENSE'] = 'GPLv2'
+ checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'
+ checkvars['S'] = '${WORKDIR}/git'
+ checkvars['PV'] = '0.1+git${SRCPV}'
+ checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/dbus-wait;protocol=https'
+ checkvars['SRCREV'] = srcrev
+ checkvars['DEPENDS'] = set(['dbus'])
+ self._test_recipe_contents(recipefile, checkvars, [])
+
+ def test_devtool_add_library(self):
+ # Fetch source
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ version = '1.1'
+ url = 'https://www.intra2net.com/en/developer/libftdi/download/libftdi1-%s.tar.bz2' % version
+ result = runCmd('wget %s' % url, cwd=tempdir)
+ result = runCmd('tar xfv libftdi1-%s.tar.bz2' % version, cwd=tempdir)
+ srcdir = os.path.join(tempdir, 'libftdi1-%s' % version)
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'CMakeLists.txt')), 'Unable to find CMakeLists.txt in source directory')
+ # Test devtool add (and use -V so we test that too)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool add libftdi %s -V %s' % (srcdir, version))
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn('libftdi', result.output)
+ self.assertIn(srcdir, result.output)
+ # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
+ bitbake('libftdi -c cleansstate')
+ # libftdi's python/CMakeLists.txt is a bit broken, so let's just disable it
+ # There's also the matter of it installing cmake files to a path we don't
+ # normally cover, which triggers the installed-vs-shipped QA test we have
+ # within do_package
+ recipefile = '%s/recipes/libftdi/libftdi_%s.bb' % (self.workspacedir, version)
+ result = runCmd('recipetool setvar %s EXTRA_OECMAKE -- \'-DPYTHON_BINDINGS=OFF -DLIBFTDI_CMAKE_CONFIG_DIR=${datadir}/cmake/Modules\'' % recipefile)
+ with open(recipefile, 'a') as f:
+ f.write('\nFILES_${PN}-dev += "${datadir}/cmake/Modules"\n')
+ # We don't have the ability to pick up this dependency automatically yet...
+ f.write('\nDEPENDS += "libusb1"\n')
+ f.write('\nTESTLIBOUTPUT = "${COMPONENTS_DIR}/${TUNE_PKGARCH}/${PN}/${libdir}"\n')
+ # Test devtool build
+ result = runCmd('devtool build libftdi')
+ bb_vars = get_bb_vars(['TESTLIBOUTPUT', 'STAMP'], 'libftdi')
+ staging_libdir = bb_vars['TESTLIBOUTPUT']
+ self.assertTrue(staging_libdir, 'Could not query TESTLIBOUTPUT variable')
+ self.assertTrue(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), "libftdi binary not found in STAGING_LIBDIR. Output of devtool build libftdi %s" % result.output)
+ # Test devtool reset
+ stampprefix = bb_vars['STAMP']
+ result = runCmd('devtool reset libftdi')
+ result = runCmd('devtool status')
+ self.assertNotIn('libftdi', result.output)
+ self.assertTrue(stampprefix, 'Unable to get STAMP value for recipe libftdi')
+ matches = glob.glob(stampprefix + '*')
+ self.assertFalse(matches, 'Stamp files exist for recipe libftdi that should have been cleaned')
+ self.assertFalse(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), 'libftdi binary still found in STAGING_LIBDIR after cleaning')
+
+ def test_devtool_add_fetch(self):
+ # Fetch source
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ testver = '0.23'
+ url = 'https://files.pythonhosted.org/packages/c0/41/bae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f/MarkupSafe-%s.tar.gz' % testver
+ testrecipe = 'python-markupsafe'
+ srcdir = os.path.join(tempdir, testrecipe)
+ # Test devtool add
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c cleansstate %s' % testrecipe)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url))
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created. %s' % result.output)
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory')
+ self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(testrecipe, result.output)
+ self.assertIn(srcdir, result.output)
+ # Check recipe
+ recipefile = get_bb_var('FILE', testrecipe)
+ self.assertIn('%s_%s.bb' % (testrecipe, testver), recipefile, 'Recipe file incorrectly named')
+ checkvars = {}
+ checkvars['S'] = '${WORKDIR}/MarkupSafe-${PV}'
+ checkvars['SRC_URI'] = url.replace(testver, '${PV}')
+ self._test_recipe_contents(recipefile, checkvars, [])
+ # Try with version specified
+ result = runCmd('devtool reset -n %s' % testrecipe)
+ shutil.rmtree(srcdir)
+ fakever = '1.9'
+ result = runCmd('devtool add %s %s -f %s -V %s' % (testrecipe, srcdir, url, fakever))
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(testrecipe, result.output)
+ self.assertIn(srcdir, result.output)
+ # Check recipe
+ recipefile = get_bb_var('FILE', testrecipe)
+ self.assertIn('%s_%s.bb' % (testrecipe, fakever), recipefile, 'Recipe file incorrectly named')
+ checkvars = {}
+ checkvars['S'] = '${WORKDIR}/MarkupSafe-%s' % testver
+ checkvars['SRC_URI'] = url
+ self._test_recipe_contents(recipefile, checkvars, [])
+
+ def test_devtool_add_fetch_git(self):
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ url = 'gitsm://git.yoctoproject.org/mraa'
+ checkrev = 'ae127b19a50aa54255e4330ccfdd9a5d058e581d'
+ testrecipe = 'mraa'
+ srcdir = os.path.join(tempdir, testrecipe)
+ # Test devtool add
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c cleansstate %s' % testrecipe)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool add %s %s -a -f %s' % (testrecipe, srcdir, url))
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created: %s' % result.output)
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'imraa', 'imraa.c')), 'Unable to find imraa/imraa.c in source directory')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(testrecipe, result.output)
+ self.assertIn(srcdir, result.output)
+ # Check recipe
+ recipefile = get_bb_var('FILE', testrecipe)
+ self.assertIn('_git.bb', recipefile, 'Recipe file incorrectly named')
+ checkvars = {}
+ checkvars['S'] = '${WORKDIR}/git'
+ checkvars['PV'] = '1.0+git${SRCPV}'
+ checkvars['SRC_URI'] = url
+ checkvars['SRCREV'] = '${AUTOREV}'
+ self._test_recipe_contents(recipefile, checkvars, [])
+ # Try with revision and version specified
+ result = runCmd('devtool reset -n %s' % testrecipe)
+ shutil.rmtree(srcdir)
+ url_rev = '%s;rev=%s' % (url, checkrev)
+ result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe, srcdir, url_rev))
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'imraa', 'imraa.c')), 'Unable to find imraa/imraa.c in source directory')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(testrecipe, result.output)
+ self.assertIn(srcdir, result.output)
+ # Check recipe
+ recipefile = get_bb_var('FILE', testrecipe)
+ self.assertIn('_git.bb', recipefile, 'Recipe file incorrectly named')
+ checkvars = {}
+ checkvars['S'] = '${WORKDIR}/git'
+ checkvars['PV'] = '1.5+git${SRCPV}'
+ checkvars['SRC_URI'] = url
+ checkvars['SRCREV'] = checkrev
+ self._test_recipe_contents(recipefile, checkvars, [])
+
+ def test_devtool_add_fetch_simple(self):
+ # Fetch source from a remote URL, auto-detecting name
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ testver = '1.6.0'
+ url = 'http://www.ivarch.com/programs/sources/pv-%s.tar.bz2' % testver
+ testrecipe = 'pv'
+ srcdir = os.path.join(self.workspacedir, 'sources', testrecipe)
+ # Test devtool add
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool add %s' % url)
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created. %s' % result.output)
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory')
+ self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(testrecipe, result.output)
+ self.assertIn(srcdir, result.output)
+ # Check recipe
+ recipefile = get_bb_var('FILE', testrecipe)
+ self.assertIn('%s_%s.bb' % (testrecipe, testver), recipefile, 'Recipe file incorrectly named')
+ checkvars = {}
+ checkvars['S'] = None
+ checkvars['SRC_URI'] = url.replace(testver, '${PV}')
+ self._test_recipe_contents(recipefile, checkvars, [])
+
+class DevtoolModifyTests(DevtoolBase):
+
+ def test_devtool_modify(self):
+ import oe.path
+
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean mdadm')
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify mdadm -x %s' % tempdir)
+ self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source could not be found')
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
+ matches = glob.glob(os.path.join(self.workspacedir, 'appends', 'mdadm_*.bbappend'))
+ self.assertTrue(matches, 'bbappend not created %s' % result.output)
+
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn('mdadm', result.output)
+ self.assertIn(tempdir, result.output)
+ self._check_src_repo(tempdir)
+
+ bitbake('mdadm -C unpack')
+
+ def check_line(checkfile, expected, message, present=True):
+ # Check for $expected, on a line on its own, in checkfile.
+ with open(checkfile, 'r') as f:
+ if present:
+ self.assertIn(expected + '\n', f, message)
+ else:
+ self.assertNotIn(expected + '\n', f, message)
+
+ modfile = os.path.join(tempdir, 'mdadm.8.in')
+ bb_vars = get_bb_vars(['PKGD', 'mandir'], 'mdadm')
+ pkgd = bb_vars['PKGD']
+ self.assertTrue(pkgd, 'Could not query PKGD variable')
+ mandir = bb_vars['mandir']
+ self.assertTrue(mandir, 'Could not query mandir variable')
+ manfile = oe.path.join(pkgd, mandir, 'man8', 'mdadm.8')
+
+ check_line(modfile, 'Linux Software RAID', 'Could not find initial string')
+ check_line(modfile, 'antique pin sardine', 'Unexpectedly found replacement string', present=False)
+
+ result = runCmd("sed -i 's!^Linux Software RAID$!antique pin sardine!' %s" % modfile)
+ check_line(modfile, 'antique pin sardine', 'mdadm.8.in file not modified (sed failed)')
+
+ bitbake('mdadm -c package')
+ check_line(manfile, 'antique pin sardine', 'man file not modified. man searched file path: %s' % manfile)
+
+ result = runCmd('git checkout -- %s' % modfile, cwd=tempdir)
+ check_line(modfile, 'Linux Software RAID', 'man .in file not restored (git failed)')
+
+ bitbake('mdadm -c package')
+ check_line(manfile, 'Linux Software RAID', 'man file not updated. man searched file path: %s' % manfile)
+
+ result = runCmd('devtool reset mdadm')
+ result = runCmd('devtool status')
+ self.assertNotIn('mdadm', result.output)
+
+ def test_devtool_buildclean(self):
+ def assertFile(path, *paths):
+ f = os.path.join(path, *paths)
+ self.assertExists(f)
+ def assertNoFile(path, *paths):
+ f = os.path.join(path, *paths)
+ self.assertNotExists(f)
+
+ # Clean up anything in the workdir/sysroot/sstate cache
+ bitbake('mdadm m4 -c cleansstate')
+ # Try modifying a recipe
+ tempdir_mdadm = tempfile.mkdtemp(prefix='devtoolqa')
+ tempdir_m4 = tempfile.mkdtemp(prefix='devtoolqa')
+ builddir_m4 = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir_mdadm)
+ self.track_for_cleanup(tempdir_m4)
+ self.track_for_cleanup(builddir_m4)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean mdadm m4')
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ self.write_recipeinc('m4', 'EXTERNALSRC_BUILD = "%s"\ndo_clean() {\n\t:\n}\n' % builddir_m4)
+ try:
+ runCmd('devtool modify mdadm -x %s' % tempdir_mdadm)
+ runCmd('devtool modify m4 -x %s' % tempdir_m4)
+ assertNoFile(tempdir_mdadm, 'mdadm')
+ assertNoFile(builddir_m4, 'src/m4')
+ result = bitbake('m4 -e')
+ result = bitbake('mdadm m4 -c compile')
+ self.assertEqual(result.status, 0)
+ assertFile(tempdir_mdadm, 'mdadm')
+ assertFile(builddir_m4, 'src/m4')
+ # Check that buildclean task exists and does call make clean
+ bitbake('mdadm m4 -c buildclean')
+ assertNoFile(tempdir_mdadm, 'mdadm')
+ assertNoFile(builddir_m4, 'src/m4')
+ runCmd('echo "#Trigger rebuild" >> %s/Makefile' % tempdir_mdadm)
+ bitbake('mdadm m4 -c compile')
+ assertFile(tempdir_mdadm, 'mdadm')
+ assertFile(builddir_m4, 'src/m4')
+ bitbake('mdadm m4 -c clean')
+ # Check that buildclean task is run before clean for B == S
+ assertNoFile(tempdir_mdadm, 'mdadm')
+ # Check that buildclean task is not run before clean for B != S
+ assertFile(builddir_m4, 'src/m4')
+ finally:
+ self.delete_recipeinc('m4')
+
+ def test_devtool_modify_invalid(self):
+ # Try modifying some recipes
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+
+ testrecipes = 'perf kernel-devsrc package-index core-image-minimal meta-toolchain packagegroup-core-sdk meta-ide-support'.split()
+ # Find actual name of gcc-source since it now includes the version - crude, but good enough for this purpose
+ result = runCmd('bitbake-layers show-recipes gcc-source*')
+ for line in result.output.splitlines():
+ # just match those lines that contain a real target
+ m = re.match('(?P<recipe>^[a-zA-Z0-9.-]+)(?P<colon>:$)', line)
+ if m:
+ testrecipes.append(m.group('recipe'))
+ for testrecipe in testrecipes:
+ # Check it's a valid recipe
+ bitbake('%s -e' % testrecipe)
+ # devtool extract should fail
+ result = runCmd('devtool extract %s %s' % (testrecipe, os.path.join(tempdir, testrecipe)), ignore_status=True)
+ self.assertNotEqual(result.status, 0, 'devtool extract on %s should have failed. devtool output: %s' % (testrecipe, result.output))
+ self.assertNotIn('Fetching ', result.output, 'devtool extract on %s should have errored out before trying to fetch' % testrecipe)
+ self.assertIn('ERROR: ', result.output, 'devtool extract on %s should have given an ERROR' % testrecipe)
+ # devtool modify should fail
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, os.path.join(tempdir, testrecipe)), ignore_status=True)
+ self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed. devtool output: %s' % (testrecipe, result.output))
+ self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe)
+
+ def test_devtool_modify_native(self):
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ # Try modifying some recipes
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+
+ bbclassextended = False
+ inheritnative = False
+ testrecipes = 'mtools-native apt-native desktop-file-utils-native'.split()
+ for testrecipe in testrecipes:
+ checkextend = 'native' in (get_bb_var('BBCLASSEXTEND', testrecipe) or '').split()
+ if not bbclassextended:
+ bbclassextended = checkextend
+ if not inheritnative:
+ inheritnative = not checkextend
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, os.path.join(tempdir, testrecipe)))
+ self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool modify output: %s' % result.output)
+ result = runCmd('devtool build %s' % testrecipe)
+ self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool build output: %s' % result.output)
+ result = runCmd('devtool reset %s' % testrecipe)
+ self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool reset output: %s' % result.output)
+
+ self.assertTrue(bbclassextended, 'None of these recipes are BBCLASSEXTENDed to native - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
+ self.assertTrue(inheritnative, 'None of these recipes do "inherit native" - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
+
+
+ def test_devtool_modify_git(self):
+ # Check preconditions
+ testrecipe = 'psplash'
+ src_uri = get_bb_var('SRC_URI', testrecipe)
+ self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
+ # Clean up anything in the workdir/sysroot/sstate cache
+ bitbake('%s -c cleansstate' % testrecipe)
+ # Try modifying a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
+ self.assertExists(os.path.join(tempdir, 'Makefile.am'), 'Extracted source could not be found')
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created. devtool output: %s' % result.output)
+ matches = glob.glob(os.path.join(self.workspacedir, 'appends', 'psplash_*.bbappend'))
+ self.assertTrue(matches, 'bbappend not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(testrecipe, result.output)
+ self.assertIn(tempdir, result.output)
+ # Check git repo
+ self._check_src_repo(tempdir)
+ # Try building
+ bitbake(testrecipe)
+
+ def test_devtool_modify_localfiles(self):
+ # Check preconditions
+ testrecipe = 'lighttpd'
+ src_uri = (get_bb_var('SRC_URI', testrecipe) or '').split()
+ foundlocal = False
+ for item in src_uri:
+ if item.startswith('file://') and '.patch' not in item:
+ foundlocal = True
+ break
+ self.assertTrue(foundlocal, 'This test expects the %s recipe to fetch local files and it seems that it no longer does' % testrecipe)
+ # Clean up anything in the workdir/sysroot/sstate cache
+ bitbake('%s -c cleansstate' % testrecipe)
+ # Try modifying a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
+ self.assertExists(os.path.join(tempdir, 'configure.ac'), 'Extracted source could not be found')
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
+ matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % testrecipe))
+ self.assertTrue(matches, 'bbappend not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(testrecipe, result.output)
+ self.assertIn(tempdir, result.output)
+ # Try building
+ bitbake(testrecipe)
+
+ def test_devtool_modify_virtual(self):
+ # Try modifying a virtual recipe
+ virtrecipe = 'virtual/make'
+ realrecipe = 'make'
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify %s -x %s' % (virtrecipe, tempdir))
+ self.assertExists(os.path.join(tempdir, 'Makefile.am'), 'Extracted source could not be found')
+ self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
+ matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % realrecipe))
+ self.assertTrue(matches, 'bbappend not created %s' % result.output)
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertNotIn(virtrecipe, result.output)
+ self.assertIn(realrecipe, result.output)
+ # Check git repo
+ self._check_src_repo(tempdir)
+ # This is probably sufficient
+
+class DevtoolUpdateTests(DevtoolBase):
+
+ def test_devtool_update_recipe(self):
+ # Check preconditions
+ testrecipe = 'minicom'
+ bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
+ recipefile = bb_vars['FILE']
+ src_uri = bb_vars['SRC_URI']
+ self.assertNotIn('git://', src_uri, 'This test expects the %s recipe to NOT be a git recipe' % testrecipe)
+ self._check_repo_status(os.path.dirname(recipefile), [])
+ # First, modify a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be building it)
+ # We don't use -x here so that we test the behaviour of devtool modify without it
+ result = runCmd('devtool modify %s %s' % (testrecipe, tempdir))
+ # Check git repo
+ self._check_src_repo(tempdir)
+ # Add a couple of commits
+ # FIXME: this only tests adding, need to also test update and remove
+ result = runCmd('echo "Additional line" >> README', cwd=tempdir)
+ result = runCmd('git commit -a -m "Change the README"', cwd=tempdir)
+ result = runCmd('echo "A new file" > devtool-new-file', cwd=tempdir)
+ result = runCmd('git add devtool-new-file', cwd=tempdir)
+ result = runCmd('git commit -m "Add a new file"', cwd=tempdir)
+ self.add_command_to_tearDown('cd %s; rm %s/*.patch; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
+ result = runCmd('devtool update-recipe %s' % testrecipe)
+ expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
+ ('??', '.*/0001-Change-the-README.patch$'),
+ ('??', '.*/0002-Add-a-new-file.patch$')]
+ self._check_repo_status(os.path.dirname(recipefile), expected_status)
+
+ def test_devtool_update_recipe_git(self):
+ # Check preconditions
+ testrecipe = 'mtd-utils'
+ bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
+ recipefile = bb_vars['FILE']
+ src_uri = bb_vars['SRC_URI']
+ self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
+ patches = []
+ for entry in src_uri.split():
+ if entry.startswith('file://') and entry.endswith('.patch'):
+ patches.append(entry[7:].split(';')[0])
+ self.assertGreater(len(patches), 0, 'The %s recipe does not appear to contain any patches, so this test will not be effective' % testrecipe)
+ self._check_repo_status(os.path.dirname(recipefile), [])
+ # First, modify a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be building it)
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
+ # Check git repo
+ self._check_src_repo(tempdir)
+ # Add a couple of commits
+ # FIXME: this only tests adding, need to also test update and remove
+ result = runCmd('echo "# Additional line" >> Makefile.am', cwd=tempdir)
+ result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempdir)
+ result = runCmd('echo "A new file" > devtool-new-file', cwd=tempdir)
+ result = runCmd('git add devtool-new-file', cwd=tempdir)
+ result = runCmd('git commit -m "Add a new file"', cwd=tempdir)
+ self.add_command_to_tearDown('cd %s; rm -rf %s; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
+ result = runCmd('devtool update-recipe -m srcrev %s' % testrecipe)
+ expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile))] + \
+ [(' D', '.*/%s$' % patch) for patch in patches]
+ self._check_repo_status(os.path.dirname(recipefile), expected_status)
+
+ result = runCmd('git diff %s' % os.path.basename(recipefile), cwd=os.path.dirname(recipefile))
+ addlines = ['SRCREV = ".*"', 'SRC_URI = "git://git.infradead.org/mtd-utils.git"']
+ srcurilines = src_uri.split()
+ srcurilines[0] = 'SRC_URI = "' + srcurilines[0]
+ srcurilines.append('"')
+ removelines = ['SRCREV = ".*"'] + srcurilines
+ for line in result.output.splitlines():
+ if line.startswith('+++') or line.startswith('---'):
+ continue
+ elif line.startswith('+'):
+ matched = False
+ for item in addlines:
+ if re.match(item, line[1:].strip()):
+ matched = True
+ break
+ self.assertTrue(matched, 'Unexpected diff add line: %s' % line)
+ elif line.startswith('-'):
+ matched = False
+ for item in removelines:
+ if re.match(item, line[1:].strip()):
+ matched = True
+ break
+ self.assertTrue(matched, 'Unexpected diff remove line: %s' % line)
+ # Now try with auto mode
+ runCmd('cd %s; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, os.path.basename(recipefile)))
+ result = runCmd('devtool update-recipe %s' % testrecipe)
+ result = runCmd('git rev-parse --show-toplevel', cwd=os.path.dirname(recipefile))
+ topleveldir = result.output.strip()
+ relpatchpath = os.path.join(os.path.relpath(os.path.dirname(recipefile), topleveldir), testrecipe)
+ expected_status = [(' M', os.path.relpath(recipefile, topleveldir)),
+ ('??', '%s/0001-Change-the-Makefile.patch' % relpatchpath),
+ ('??', '%s/0002-Add-a-new-file.patch' % relpatchpath)]
+ self._check_repo_status(os.path.dirname(recipefile), expected_status)
+
+ def test_devtool_update_recipe_append(self):
+ # Check preconditions
+ testrecipe = 'mdadm'
+ bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
+ recipefile = bb_vars['FILE']
+ src_uri = bb_vars['SRC_URI']
+ self.assertNotIn('git://', src_uri, 'This test expects the %s recipe to NOT be a git recipe' % testrecipe)
+ self._check_repo_status(os.path.dirname(recipefile), [])
+ # First, modify a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ tempsrcdir = os.path.join(tempdir, 'source')
+ templayerdir = os.path.join(tempdir, 'layer')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be building it)
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempsrcdir))
+ # Check git repo
+ self._check_src_repo(tempsrcdir)
+ # Add a commit
+ result = runCmd("sed 's!\\(#define VERSION\\W*\"[^\"]*\\)\"!\\1-custom\"!' -i ReadMe.c", cwd=tempsrcdir)
+ result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
+ self.add_command_to_tearDown('cd %s; rm -f %s/*.patch; git checkout .' % (os.path.dirname(recipefile), testrecipe))
+ # Create a temporary layer and add it to bblayers.conf
+ self._create_temp_layer(templayerdir, True, 'selftestupdaterecipe')
+ # Create the bbappend
+ result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
+ self.assertNotIn('WARNING:', result.output)
+ # Check recipe is still clean
+ self._check_repo_status(os.path.dirname(recipefile), [])
+ # Check bbappend was created
+ splitpath = os.path.dirname(recipefile).split(os.sep)
+ appenddir = os.path.join(templayerdir, splitpath[-2], splitpath[-1])
+ bbappendfile = self._check_bbappend(testrecipe, recipefile, appenddir)
+ patchfile = os.path.join(appenddir, testrecipe, '0001-Add-our-custom-version.patch')
+ self.assertExists(patchfile, 'Patch file not created')
+
+ # Check bbappend contents
+ expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
+ '\n',
+ 'SRC_URI += "file://0001-Add-our-custom-version.patch"\n',
+ '\n']
+ with open(bbappendfile, 'r') as f:
+ self.assertEqual(expectedlines, f.readlines())
+
+ # Check we can run it again and bbappend isn't modified
+ result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
+ with open(bbappendfile, 'r') as f:
+ self.assertEqual(expectedlines, f.readlines())
+ # Drop new commit and check patch gets deleted
+ result = runCmd('git reset HEAD^', cwd=tempsrcdir)
+ result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
+ self.assertNotExists(patchfile, 'Patch file not deleted')
+ expectedlines2 = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
+ '\n']
+ with open(bbappendfile, 'r') as f:
+ self.assertEqual(expectedlines2, f.readlines())
+ # Put commit back and check we can run it if layer isn't in bblayers.conf
+ os.remove(bbappendfile)
+ result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
+ result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
+ result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
+ self.assertIn('WARNING: Specified layer is not currently enabled in bblayers.conf', result.output)
+ self.assertExists(patchfile, 'Patch file not created (with disabled layer)')
+ with open(bbappendfile, 'r') as f:
+ self.assertEqual(expectedlines, f.readlines())
+ # Deleting isn't expected to work under these circumstances
+
+ def test_devtool_update_recipe_append_git(self):
+ # Check preconditions
+ testrecipe = 'mtd-utils'
+ bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
+ recipefile = bb_vars['FILE']
+ src_uri = bb_vars['SRC_URI']
+ self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
+ for entry in src_uri.split():
+ if entry.startswith('git://'):
+ git_uri = entry
+ break
+ self._check_repo_status(os.path.dirname(recipefile), [])
+ # First, modify a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ tempsrcdir = os.path.join(tempdir, 'source')
+ templayerdir = os.path.join(tempdir, 'layer')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be building it)
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempsrcdir))
+ # Check git repo
+ self._check_src_repo(tempsrcdir)
+ # Add a commit
+ result = runCmd('echo "# Additional line" >> Makefile.am', cwd=tempsrcdir)
+ result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir)
+ self.add_command_to_tearDown('cd %s; rm -f %s/*.patch; git checkout .' % (os.path.dirname(recipefile), testrecipe))
+ # Create a temporary layer
+ os.makedirs(os.path.join(templayerdir, 'conf'))
+ with open(os.path.join(templayerdir, 'conf', 'layer.conf'), 'w') as f:
+ f.write('BBPATH .= ":${LAYERDIR}"\n')
+ f.write('BBFILES += "${LAYERDIR}/recipes-*/*/*.bbappend"\n')
+ f.write('BBFILE_COLLECTIONS += "oeselftesttemplayer"\n')
+ f.write('BBFILE_PATTERN_oeselftesttemplayer = "^${LAYERDIR}/"\n')
+ f.write('BBFILE_PRIORITY_oeselftesttemplayer = "999"\n')
+ f.write('BBFILE_PATTERN_IGNORE_EMPTY_oeselftesttemplayer = "1"\n')
+ f.write('LAYERSERIES_COMPAT_oeselftesttemplayer = "${LAYERSERIES_COMPAT_core}"\n')
+ self.add_command_to_tearDown('bitbake-layers remove-layer %s || true' % templayerdir)
+ result = runCmd('bitbake-layers add-layer %s' % templayerdir, cwd=self.builddir)
+ # Create the bbappend
+ result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
+ self.assertNotIn('WARNING:', result.output)
+ # Check recipe is still clean
+ self._check_repo_status(os.path.dirname(recipefile), [])
+ # Check bbappend was created
+ splitpath = os.path.dirname(recipefile).split(os.sep)
+ appenddir = os.path.join(templayerdir, splitpath[-2], splitpath[-1])
+ bbappendfile = self._check_bbappend(testrecipe, recipefile, appenddir)
+ self.assertNotExists(os.path.join(appenddir, testrecipe), 'Patch directory should not be created')
+
+ # Check bbappend contents
+ result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
+ expectedlines = set(['SRCREV = "%s"\n' % result.output,
+ '\n',
+ 'SRC_URI = "%s"\n' % git_uri,
+ '\n'])
+ with open(bbappendfile, 'r') as f:
+ self.assertEqual(expectedlines, set(f.readlines()))
+
+ # Check we can run it again and bbappend isn't modified
+ result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
+ with open(bbappendfile, 'r') as f:
+ self.assertEqual(expectedlines, set(f.readlines()))
+ # Drop new commit and check SRCREV changes
+ result = runCmd('git reset HEAD^', cwd=tempsrcdir)
+ result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
+ self.assertNotExists(os.path.join(appenddir, testrecipe), 'Patch directory should not be created')
+ result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
+ expectedlines = set(['SRCREV = "%s"\n' % result.output,
+ '\n',
+ 'SRC_URI = "%s"\n' % git_uri,
+ '\n'])
+ with open(bbappendfile, 'r') as f:
+ self.assertEqual(expectedlines, set(f.readlines()))
+ # Put commit back and check we can run it if layer isn't in bblayers.conf
+ os.remove(bbappendfile)
+ result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir)
+ result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
+ result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
+ self.assertIn('WARNING: Specified layer is not currently enabled in bblayers.conf', result.output)
+ self.assertNotExists(os.path.join(appenddir, testrecipe), 'Patch directory should not be created')
+ result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
+ expectedlines = set(['SRCREV = "%s"\n' % result.output,
+ '\n',
+ 'SRC_URI = "%s"\n' % git_uri,
+ '\n'])
+ with open(bbappendfile, 'r') as f:
+ self.assertEqual(expectedlines, set(f.readlines()))
+ # Deleting isn't expected to work under these circumstances
+
+ def test_devtool_update_recipe_local_files(self):
+ """Check that local source files are copied over instead of patched"""
+ testrecipe = 'makedevs'
+ recipefile = get_bb_var('FILE', testrecipe)
+ # Setup srctree for modifying the recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be
+ # building it)
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
+ # Check git repo
+ self._check_src_repo(tempdir)
+ # Try building just to ensure we haven't broken that
+ bitbake("%s" % testrecipe)
+ # Edit / commit local source
+ runCmd('echo "/* Foobar */" >> oe-local-files/makedevs.c', cwd=tempdir)
+ runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
+ runCmd('echo "Bar" > new-file', cwd=tempdir)
+ runCmd('git add new-file', cwd=tempdir)
+ runCmd('git commit -m "Add new file"', cwd=tempdir)
+ self.add_command_to_tearDown('cd %s; git clean -fd .; git checkout .' %
+ os.path.dirname(recipefile))
+ runCmd('devtool update-recipe %s' % testrecipe)
+ expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
+ (' M', '.*/makedevs/makedevs.c$'),
+ ('??', '.*/makedevs/new-local$'),
+ ('??', '.*/makedevs/0001-Add-new-file.patch$')]
+ self._check_repo_status(os.path.dirname(recipefile), expected_status)
+
+ def test_devtool_update_recipe_local_files_2(self):
+ """Check local source files support when oe-local-files is in Git"""
+ testrecipe = 'devtool-test-local'
+ recipefile = get_bb_var('FILE', testrecipe)
+ recipedir = os.path.dirname(recipefile)
+ result = runCmd('git status --porcelain .', cwd=recipedir)
+ if result.output.strip():
+ self.fail('Recipe directory for %s contains uncommitted changes' % testrecipe)
+ # Setup srctree for modifying the recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
+ # Check git repo
+ self._check_src_repo(tempdir)
+ # Add oe-local-files to Git
+ runCmd('rm oe-local-files/.gitignore', cwd=tempdir)
+ runCmd('git add oe-local-files', cwd=tempdir)
+ runCmd('git commit -m "Add local sources"', cwd=tempdir)
+ # Edit / commit local sources
+ runCmd('echo "# Foobar" >> oe-local-files/file1', cwd=tempdir)
+ runCmd('git commit -am "Edit existing file"', cwd=tempdir)
+ runCmd('git rm oe-local-files/file2', cwd=tempdir)
+ runCmd('git commit -m"Remove file"', cwd=tempdir)
+ runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
+ runCmd('git add oe-local-files/new-local', cwd=tempdir)
+ runCmd('git commit -m "Add new local file"', cwd=tempdir)
+ runCmd('echo "Gar" > new-file', cwd=tempdir)
+ runCmd('git add new-file', cwd=tempdir)
+ runCmd('git commit -m "Add new file"', cwd=tempdir)
+ self.add_command_to_tearDown('cd %s; git clean -fd .; git checkout .' %
+ os.path.dirname(recipefile))
+ # Checkout unmodified file to working copy -> devtool should still pick
+ # the modified version from HEAD
+ runCmd('git checkout HEAD^ -- oe-local-files/file1', cwd=tempdir)
+ runCmd('devtool update-recipe %s' % testrecipe)
+ expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
+ (' M', '.*/file1$'),
+ (' D', '.*/file2$'),
+ ('??', '.*/new-local$'),
+ ('??', '.*/0001-Add-new-file.patch$')]
+ self._check_repo_status(os.path.dirname(recipefile), expected_status)
+
+ def test_devtool_update_recipe_local_files_3(self):
+ # First, modify the recipe
+ testrecipe = 'devtool-test-localonly'
+ bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
+ recipefile = bb_vars['FILE']
+ src_uri = bb_vars['SRC_URI']
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be building it)
+ result = runCmd('devtool modify %s' % testrecipe)
+ # Modify one file
+ runCmd('echo "Another line" >> file2', cwd=os.path.join(self.workspacedir, 'sources', testrecipe, 'oe-local-files'))
+ self.add_command_to_tearDown('cd %s; rm %s/*; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
+ result = runCmd('devtool update-recipe %s' % testrecipe)
+ expected_status = [(' M', '.*/%s/file2$' % testrecipe)]
+ self._check_repo_status(os.path.dirname(recipefile), expected_status)
+
+ def test_devtool_update_recipe_local_patch_gz(self):
+ # First, modify the recipe
+ testrecipe = 'devtool-test-patch-gz'
+ if get_bb_var('DISTRO') == 'poky-tiny':
+ self.skipTest("The DISTRO 'poky-tiny' does not provide the dependencies needed by %s" % testrecipe)
+ bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
+ recipefile = bb_vars['FILE']
+ src_uri = bb_vars['SRC_URI']
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be building it)
+ result = runCmd('devtool modify %s' % testrecipe)
+ # Modify one file
+ srctree = os.path.join(self.workspacedir, 'sources', testrecipe)
+ runCmd('echo "Another line" >> README', cwd=srctree)
+ runCmd('git commit -a --amend --no-edit', cwd=srctree)
+ self.add_command_to_tearDown('cd %s; rm %s/*; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
+ result = runCmd('devtool update-recipe %s' % testrecipe)
+ expected_status = [(' M', '.*/%s/readme.patch.gz$' % testrecipe)]
+ self._check_repo_status(os.path.dirname(recipefile), expected_status)
+ patch_gz = os.path.join(os.path.dirname(recipefile), testrecipe, 'readme.patch.gz')
+ result = runCmd('file %s' % patch_gz)
+ if 'gzip compressed data' not in result.output:
+ self.fail('New patch file is not gzipped - file reports:\n%s' % result.output)
+
+ def test_devtool_update_recipe_local_files_subdir(self):
+ # Try devtool update-recipe on a recipe that has a file with subdir= set in
+ # SRC_URI such that it overwrites a file that was in an archive that
+ # was also in SRC_URI
+ # First, modify the recipe
+ testrecipe = 'devtool-test-subdir'
+ bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
+ recipefile = bb_vars['FILE']
+ src_uri = bb_vars['SRC_URI']
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be building it)
+ result = runCmd('devtool modify %s' % testrecipe)
+ testfile = os.path.join(self.workspacedir, 'sources', testrecipe, 'testfile')
+ self.assertExists(testfile, 'Extracted source could not be found')
+ with open(testfile, 'r') as f:
+ contents = f.read().rstrip()
+ self.assertEqual(contents, 'Modified version', 'File has apparently not been overwritten as it should have been')
+ # Test devtool update-recipe without modifying any files
+ self.add_command_to_tearDown('cd %s; rm %s/*; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
+ result = runCmd('devtool update-recipe %s' % testrecipe)
+ expected_status = []
+ self._check_repo_status(os.path.dirname(recipefile), expected_status)
+
+class DevtoolExtractTests(DevtoolBase):
+
+ def test_devtool_extract(self):
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ # Try devtool extract
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool extract matchbox-terminal %s' % tempdir)
+ self.assertExists(os.path.join(tempdir, 'Makefile.am'), 'Extracted source could not be found')
+ self._check_src_repo(tempdir)
+
+ def test_devtool_extract_virtual(self):
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ # Try devtool extract
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool extract virtual/make %s' % tempdir)
+ self.assertExists(os.path.join(tempdir, 'Makefile.am'), 'Extracted source could not be found')
+ self._check_src_repo(tempdir)
+
+ def test_devtool_reset_all(self):
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ testrecipe1 = 'mdadm'
+ testrecipe2 = 'cronie'
+ result = runCmd('devtool modify -x %s %s' % (testrecipe1, os.path.join(tempdir, testrecipe1)))
+ result = runCmd('devtool modify -x %s %s' % (testrecipe2, os.path.join(tempdir, testrecipe2)))
+ result = runCmd('devtool build %s' % testrecipe1)
+ result = runCmd('devtool build %s' % testrecipe2)
+ stampprefix1 = get_bb_var('STAMP', testrecipe1)
+ self.assertTrue(stampprefix1, 'Unable to get STAMP value for recipe %s' % testrecipe1)
+ stampprefix2 = get_bb_var('STAMP', testrecipe2)
+ self.assertTrue(stampprefix2, 'Unable to get STAMP value for recipe %s' % testrecipe2)
+ result = runCmd('devtool reset -a')
+ self.assertIn(testrecipe1, result.output)
+ self.assertIn(testrecipe2, result.output)
+ result = runCmd('devtool status')
+ self.assertNotIn(testrecipe1, result.output)
+ self.assertNotIn(testrecipe2, result.output)
+ matches1 = glob.glob(stampprefix1 + '*')
+ self.assertFalse(matches1, 'Stamp files exist for recipe %s that should have been cleaned' % testrecipe1)
+ matches2 = glob.glob(stampprefix2 + '*')
+ self.assertFalse(matches2, 'Stamp files exist for recipe %s that should have been cleaned' % testrecipe2)
+
+ def test_devtool_deploy_target(self):
+ # NOTE: Whilst this test would seemingly be better placed as a runtime test,
+ # unfortunately the runtime tests run under bitbake and you can't run
+ # devtool within bitbake (since devtool needs to run bitbake itself).
+ # Additionally we are testing build-time functionality as well, so
+ # really this has to be done as an oe-selftest test.
+ #
+ # Check preconditions
+ machine = get_bb_var('MACHINE')
+ if not machine.startswith('qemu'):
+ self.skipTest('This test only works with qemu machines')
+ if not os.path.exists('/etc/runqemu-nosudo'):
+ self.skipTest('You must set up tap devices with scripts/runqemu-gen-tapdevs before running this test')
+ result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ip tuntap show', ignore_status=True)
+ if result.status != 0:
+ result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ifconfig -a', ignore_status=True)
+ if result.status != 0:
+ self.skipTest('Failed to determine if tap devices exist with ifconfig or ip: %s' % result.output)
+ for line in result.output.splitlines():
+ if line.startswith('tap'):
+ break
+ else:
+ self.skipTest('No tap devices found - you must set up tap devices with scripts/runqemu-gen-tapdevs before running this test')
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ # Definitions
+ testrecipe = 'mdadm'
+ testfile = '/sbin/mdadm'
+ testimage = 'oe-selftest-image'
+ testcommand = '/sbin/mdadm --help'
+ # Build an image to run
+ bitbake("%s qemu-native qemu-helper-native" % testimage)
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ self.add_command_to_tearDown('bitbake -c clean %s' % testimage)
+ self.add_command_to_tearDown('rm -f %s/%s*' % (deploy_dir_image, testimage))
+ # Clean recipe so the first deploy will fail
+ bitbake("%s -c clean" % testrecipe)
+ # Try devtool modify
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
+ # Test that deploy-target at this point fails (properly)
+ result = runCmd('devtool deploy-target -n %s root@localhost' % testrecipe, ignore_status=True)
+ self.assertNotEqual(result.output, 0, 'devtool deploy-target should have failed, output: %s' % result.output)
+ self.assertNotIn(result.output, 'Traceback', 'devtool deploy-target should have failed with a proper error not a traceback, output: %s' % result.output)
+ result = runCmd('devtool build %s' % testrecipe)
+ # First try a dry-run of deploy-target
+ result = runCmd('devtool deploy-target -n %s root@localhost' % testrecipe)
+ self.assertIn(' %s' % testfile, result.output)
+ # Boot the image
+ with runqemu(testimage) as qemu:
+ # Now really test deploy-target
+ result = runCmd('devtool deploy-target -c %s root@%s' % (testrecipe, qemu.ip))
+ # Run a test command to see if it was installed properly
+ sshargs = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+ result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand))
+ # Check if it deployed all of the files with the right ownership/perms
+ # First look on the host - need to do this under pseudo to get the correct ownership/perms
+ bb_vars = get_bb_vars(['D', 'FAKEROOTENV', 'FAKEROOTCMD'], testrecipe)
+ installdir = bb_vars['D']
+ fakerootenv = bb_vars['FAKEROOTENV']
+ fakerootcmd = bb_vars['FAKEROOTCMD']
+ result = runCmd('%s %s find . -type f -exec ls -l {} \\;' % (fakerootenv, fakerootcmd), cwd=installdir)
+ filelist1 = self._process_ls_output(result.output)
+
+ # Now look on the target
+ tempdir2 = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir2)
+ tmpfilelist = os.path.join(tempdir2, 'files.txt')
+ with open(tmpfilelist, 'w') as f:
+ for line in filelist1:
+ splitline = line.split()
+ f.write(splitline[-1] + '\n')
+ result = runCmd('cat %s | ssh -q %s root@%s \'xargs ls -l\'' % (tmpfilelist, sshargs, qemu.ip))
+ filelist2 = self._process_ls_output(result.output)
+ filelist1.sort(key=lambda item: item.split()[-1])
+ filelist2.sort(key=lambda item: item.split()[-1])
+ self.assertEqual(filelist1, filelist2)
+ # Test undeploy-target
+ result = runCmd('devtool undeploy-target -c %s root@%s' % (testrecipe, qemu.ip))
+ result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand), ignore_status=True)
+ self.assertNotEqual(result, 0, 'undeploy-target did not remove command as it should have')
+
+ def test_devtool_build_image(self):
+ """Test devtool build-image plugin"""
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ image = 'core-image-minimal'
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean %s' % image)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ bitbake('%s -c clean' % image)
+ # Add target and native recipes to workspace
+ recipes = ['mdadm', 'parted-native']
+ for recipe in recipes:
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.add_command_to_tearDown('bitbake -c clean %s' % recipe)
+ runCmd('devtool modify %s -x %s' % (recipe, tempdir))
+ # Try to build image
+ result = runCmd('devtool build-image %s' % image)
+ self.assertNotEqual(result, 0, 'devtool build-image failed')
+ # Check if image contains expected packages
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ image_link_name = get_bb_var('IMAGE_LINK_NAME', image)
+ reqpkgs = [item for item in recipes if not item.endswith('-native')]
+ with open(os.path.join(deploy_dir_image, image_link_name + '.manifest'), 'r') as f:
+ for line in f:
+ splitval = line.split()
+ if splitval:
+ pkg = splitval[0]
+ if pkg in reqpkgs:
+ reqpkgs.remove(pkg)
+ if reqpkgs:
+ self.fail('The following packages were not present in the image as expected: %s' % ', '.join(reqpkgs))
+
+class DevtoolUpgradeTests(DevtoolBase):
+
+ def test_devtool_upgrade(self):
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # Check parameters
+ result = runCmd('devtool upgrade -h')
+ for param in 'recipename srctree --version -V --branch -b --keep-temp --no-patch'.split():
+ self.assertIn(param, result.output)
+ # For the moment, we are using a real recipe.
+ recipe = 'devtool-upgrade-test1'
+ version = '1.6.0'
+ oldrecipefile = get_bb_var('FILE', recipe)
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ # Check that recipe is not already under devtool control
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output)
+ # Check upgrade. Code does not check if new PV is older or newer that current PV, so, it may be that
+ # we are downgrading instead of upgrading.
+ result = runCmd('devtool upgrade %s %s -V %s' % (recipe, tempdir, version))
+ # Check if srctree at least is populated
+ self.assertTrue(len(os.listdir(tempdir)) > 0, 'srctree (%s) should be populated with new (%s) source code' % (tempdir, version))
+ # Check new recipe subdirectory is present
+ self.assertExists(os.path.join(self.workspacedir, 'recipes', recipe, '%s-%s' % (recipe, version)), 'Recipe folder should exist')
+ # Check new recipe file is present
+ newrecipefile = os.path.join(self.workspacedir, 'recipes', recipe, '%s_%s.bb' % (recipe, version))
+ self.assertExists(newrecipefile, 'Recipe file should exist after upgrade')
+ # Check devtool status and make sure recipe is present
+ result = runCmd('devtool status')
+ self.assertIn(recipe, result.output)
+ self.assertIn(tempdir, result.output)
+ # Check recipe got changed as expected
+ with open(oldrecipefile + '.upgraded', 'r') as f:
+ desiredlines = f.readlines()
+ with open(newrecipefile, 'r') as f:
+ newlines = f.readlines()
+ self.assertEqual(desiredlines, newlines)
+ # Check devtool reset recipe
+ result = runCmd('devtool reset %s -n' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output)
+ self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after resetting')
+
+ def test_devtool_upgrade_git(self):
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ recipe = 'devtool-upgrade-test2'
+ commit = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
+ oldrecipefile = get_bb_var('FILE', recipe)
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ # Check that recipe is not already under devtool control
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output)
+ # Check upgrade
+ result = runCmd('devtool upgrade %s %s -S %s' % (recipe, tempdir, commit))
+ # Check if srctree at least is populated
+ self.assertTrue(len(os.listdir(tempdir)) > 0, 'srctree (%s) should be populated with new (%s) source code' % (tempdir, commit))
+ # Check new recipe file is present
+ newrecipefile = os.path.join(self.workspacedir, 'recipes', recipe, os.path.basename(oldrecipefile))
+ self.assertExists(newrecipefile, 'Recipe file should exist after upgrade')
+ # Check devtool status and make sure recipe is present
+ result = runCmd('devtool status')
+ self.assertIn(recipe, result.output)
+ self.assertIn(tempdir, result.output)
+ # Check recipe got changed as expected
+ with open(oldrecipefile + '.upgraded', 'r') as f:
+ desiredlines = f.readlines()
+ with open(newrecipefile, 'r') as f:
+ newlines = f.readlines()
+ self.assertEqual(desiredlines, newlines)
+ # Check devtool reset recipe
+ result = runCmd('devtool reset %s -n' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output)
+ self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after resetting')
+
+ def test_devtool_layer_plugins(self):
+ """Test that devtool can use plugins from other layers.
+
+ This test executes the selftest-reverse command from meta-selftest."""
+
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+
+ s = "Microsoft Made No Profit From Anyone's Zunes Yo"
+ result = runCmd("devtool --quiet selftest-reverse \"%s\"" % s)
+ self.assertEqual(result.output, s[::-1])
+
+ def _copy_file_with_cleanup(self, srcfile, basedstdir, *paths):
+ dstdir = basedstdir
+ self.assertExists(dstdir)
+ for p in paths:
+ dstdir = os.path.join(dstdir, p)
+ if not os.path.exists(dstdir):
+ os.makedirs(dstdir)
+ self.track_for_cleanup(dstdir)
+ dstfile = os.path.join(dstdir, os.path.basename(srcfile))
+ if srcfile != dstfile:
+ shutil.copy(srcfile, dstfile)
+ self.track_for_cleanup(dstfile)
+
+ def test_devtool_load_plugin(self):
+ """Test that devtool loads only the first found plugin in BBPATH."""
+
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+
+ devtool = runCmd("which devtool")
+ fromname = runCmd("devtool --quiet pluginfile")
+ srcfile = fromname.output
+ bbpath = get_bb_var('BBPATH')
+ searchpath = bbpath.split(':') + [os.path.dirname(devtool.output)]
+ plugincontent = []
+ with open(srcfile) as fh:
+ plugincontent = fh.readlines()
+ try:
+ self.assertIn('meta-selftest', srcfile, 'wrong bbpath plugin found')
+ for path in searchpath:
+ self._copy_file_with_cleanup(srcfile, path, 'lib', 'devtool')
+ result = runCmd("devtool --quiet count")
+ self.assertEqual(result.output, '1')
+ result = runCmd("devtool --quiet multiloaded")
+ self.assertEqual(result.output, "no")
+ for path in searchpath:
+ result = runCmd("devtool --quiet bbdir")
+ self.assertEqual(result.output, path)
+ os.unlink(os.path.join(result.output, 'lib', 'devtool', 'bbpath.py'))
+ finally:
+ with open(srcfile, 'w') as fh:
+ fh.writelines(plugincontent)
+
+ def _setup_test_devtool_finish_upgrade(self):
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # Use a "real" recipe from meta-selftest
+ recipe = 'devtool-upgrade-test1'
+ oldversion = '1.5.3'
+ newversion = '1.6.0'
+ oldrecipefile = get_bb_var('FILE', recipe)
+ recipedir = os.path.dirname(oldrecipefile)
+ result = runCmd('git status --porcelain .', cwd=recipedir)
+ if result.output.strip():
+ self.fail('Recipe directory for %s contains uncommitted changes' % recipe)
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ # Check that recipe is not already under devtool control
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output)
+ # Do the upgrade
+ result = runCmd('devtool upgrade %s %s -V %s' % (recipe, tempdir, newversion))
+ # Check devtool status and make sure recipe is present
+ result = runCmd('devtool status')
+ self.assertIn(recipe, result.output)
+ self.assertIn(tempdir, result.output)
+ # Make a change to the source
+ result = runCmd('sed -i \'/^#include "pv.h"/a \\/* Here is a new comment *\\/\' src/pv/number.c', cwd=tempdir)
+ result = runCmd('git status --porcelain', cwd=tempdir)
+ self.assertIn('M src/pv/number.c', result.output)
+ result = runCmd('git commit src/pv/number.c -m "Add a comment to the code"', cwd=tempdir)
+ # Check if patch is there
+ recipedir = os.path.dirname(oldrecipefile)
+ olddir = os.path.join(recipedir, recipe + '-' + oldversion)
+ patchfn = '0001-Add-a-note-line-to-the-quick-reference.patch'
+ backportedpatchfn = 'backported.patch'
+ self.assertExists(os.path.join(olddir, patchfn), 'Original patch file does not exist')
+ self.assertExists(os.path.join(olddir, backportedpatchfn), 'Backported patch file does not exist')
+ return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn
+
+ def test_devtool_finish_upgrade_origlayer(self):
+ recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade()
+ # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
+ self.assertIn('/meta-selftest/', recipedir)
+ # Try finish to the original layer
+ self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+ result = runCmd('devtool finish %s meta-selftest' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+ self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish')
+ self.assertNotExists(oldrecipefile, 'Old recipe file should have been deleted but wasn\'t')
+ self.assertNotExists(os.path.join(olddir, patchfn), 'Old patch file should have been deleted but wasn\'t')
+ self.assertNotExists(os.path.join(olddir, backportedpatchfn), 'Old backported patch file should have been deleted but wasn\'t')
+ newrecipefile = os.path.join(recipedir, '%s_%s.bb' % (recipe, newversion))
+ newdir = os.path.join(recipedir, recipe + '-' + newversion)
+ self.assertExists(newrecipefile, 'New recipe file should have been copied into existing layer but wasn\'t')
+ self.assertExists(os.path.join(newdir, patchfn), 'Patch file should have been copied into new directory but wasn\'t')
+ self.assertNotExists(os.path.join(newdir, backportedpatchfn), 'Backported patch file should not have been copied into new directory but was')
+ self.assertExists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch'), 'New patch file should have been created but wasn\'t')
+ with open(newrecipefile, 'r') as f:
+ newcontent = f.read()
+ self.assertNotIn(backportedpatchfn, newcontent, "Backported patch should have been removed from the recipe but wasn't")
+ self.assertIn(patchfn, newcontent, "Old patch should have not been removed from the recipe but was")
+ self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't")
+ self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI")
+
+
+ def test_devtool_finish_upgrade_otherlayer(self):
+ recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade()
+ # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
+ self.assertIn('/meta-selftest/', recipedir)
+ # Try finish to a different layer - should create a bbappend
+ # This cleanup isn't strictly necessary but do it anyway just in case it goes wrong and writes to here
+ self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+ oe_core_dir = os.path.join(get_bb_var('COREBASE'), 'meta')
+ newrecipedir = os.path.join(oe_core_dir, 'recipes-test', 'devtool')
+ newrecipefile = os.path.join(newrecipedir, '%s_%s.bb' % (recipe, newversion))
+ self.track_for_cleanup(newrecipedir)
+ result = runCmd('devtool finish %s oe-core' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+ self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish')
+ self.assertExists(oldrecipefile, 'Old recipe file should not have been deleted')
+ self.assertExists(os.path.join(olddir, patchfn), 'Old patch file should not have been deleted')
+ self.assertExists(os.path.join(olddir, backportedpatchfn), 'Old backported patch file should not have been deleted')
+ newdir = os.path.join(newrecipedir, recipe + '-' + newversion)
+ self.assertExists(newrecipefile, 'New recipe file should have been copied into existing layer but wasn\'t')
+ self.assertExists(os.path.join(newdir, patchfn), 'Patch file should have been copied into new directory but wasn\'t')
+ self.assertNotExists(os.path.join(newdir, backportedpatchfn), 'Backported patch file should not have been copied into new directory but was')
+ self.assertExists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch'), 'New patch file should have been created but wasn\'t')
+ with open(newrecipefile, 'r') as f:
+ newcontent = f.read()
+ self.assertNotIn(backportedpatchfn, newcontent, "Backported patch should have been removed from the recipe but wasn't")
+ self.assertIn(patchfn, newcontent, "Old patch should have not been removed from the recipe but was")
+ self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't")
+ self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI")
+
+ def _setup_test_devtool_finish_modify(self):
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ # Try modifying a recipe
+ self.track_for_cleanup(self.workspacedir)
+ recipe = 'mdadm'
+ oldrecipefile = get_bb_var('FILE', recipe)
+ recipedir = os.path.dirname(oldrecipefile)
+ result = runCmd('git status --porcelain .', cwd=recipedir)
+ if result.output.strip():
+ self.fail('Recipe directory for %s contains uncommitted changes' % recipe)
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify %s %s' % (recipe, tempdir))
+ self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source could not be found')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(recipe, result.output)
+ self.assertIn(tempdir, result.output)
+ # Make a change to the source
+ result = runCmd('sed -i \'/^#include "mdadm.h"/a \\/* Here is a new comment *\\/\' maps.c', cwd=tempdir)
+ result = runCmd('git status --porcelain', cwd=tempdir)
+ self.assertIn('M maps.c', result.output)
+ result = runCmd('git commit maps.c -m "Add a comment to the code"', cwd=tempdir)
+ for entry in os.listdir(recipedir):
+ filesdir = os.path.join(recipedir, entry)
+ if os.path.isdir(filesdir):
+ break
+ else:
+ self.fail('Unable to find recipe files directory for %s' % recipe)
+ return recipe, oldrecipefile, recipedir, filesdir
+
+ def test_devtool_finish_modify_origlayer(self):
+ recipe, oldrecipefile, recipedir, filesdir = self._setup_test_devtool_finish_modify()
+ # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
+ self.assertIn('/meta/', recipedir)
+ # Try finish to the original layer
+ self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+ result = runCmd('devtool finish %s meta' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+ self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish')
+ expected_status = [(' M', '.*/%s$' % os.path.basename(oldrecipefile)),
+ ('??', '.*/.*-Add-a-comment-to-the-code.patch$')]
+ self._check_repo_status(recipedir, expected_status)
+
+ def test_devtool_finish_modify_otherlayer(self):
+ recipe, oldrecipefile, recipedir, filesdir = self._setup_test_devtool_finish_modify()
+ # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
+ self.assertIn('/meta/', recipedir)
+ relpth = os.path.relpath(recipedir, os.path.join(get_bb_var('COREBASE'), 'meta'))
+ appenddir = os.path.join(get_test_layer(), relpth)
+ self.track_for_cleanup(appenddir)
+ # Try finish to the original layer
+ self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+ result = runCmd('devtool finish %s meta-selftest' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+ self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish')
+ result = runCmd('git status --porcelain .', cwd=recipedir)
+ if result.output.strip():
+ self.fail('Recipe directory for %s contains the following unexpected changes after finish:\n%s' % (recipe, result.output.strip()))
+ recipefn = os.path.splitext(os.path.basename(oldrecipefile))[0]
+ recipefn = recipefn.split('_')[0] + '_%'
+ appendfile = os.path.join(appenddir, recipefn + '.bbappend')
+ self.assertExists(appendfile, 'bbappend %s should have been created but wasn\'t' % appendfile)
+ newdir = os.path.join(appenddir, recipe)
+ files = os.listdir(newdir)
+ foundpatch = None
+ for fn in files:
+ if fnmatch.fnmatch(fn, '*-Add-a-comment-to-the-code.patch'):
+ foundpatch = fn
+ if not foundpatch:
+ self.fail('No patch file created next to bbappend')
+ files.remove(foundpatch)
+ if files:
+ self.fail('Unexpected file(s) copied next to bbappend: %s' % ', '.join(files))
+
+ def test_devtool_rename(self):
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+
+ # First run devtool add
+ # We already have this recipe in OE-Core, but that doesn't matter
+ recipename = 'i2c-tools'
+ recipever = '3.1.2'
+ recipefile = os.path.join(self.workspacedir, 'recipes', recipename, '%s_%s.bb' % (recipename, recipever))
+ url = 'http://downloads.yoctoproject.org/mirror/sources/i2c-tools-%s.tar.bz2' % recipever
+ def add_recipe():
+ result = runCmd('devtool add %s' % url)
+ self.assertExists(recipefile, 'Expected recipe file not created')
+ self.assertExists(os.path.join(self.workspacedir, 'sources', recipename), 'Source directory not created')
+ checkvars = {}
+ checkvars['S'] = None
+ checkvars['SRC_URI'] = url.replace(recipever, '${PV}')
+ self._test_recipe_contents(recipefile, checkvars, [])
+ add_recipe()
+ # Now rename it - change both name and version
+ newrecipename = 'mynewrecipe'
+ newrecipever = '456'
+ newrecipefile = os.path.join(self.workspacedir, 'recipes', newrecipename, '%s_%s.bb' % (newrecipename, newrecipever))
+ result = runCmd('devtool rename %s %s -V %s' % (recipename, newrecipename, newrecipever))
+ self.assertExists(newrecipefile, 'Recipe file not renamed')
+ self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipename), 'Old recipe directory still exists')
+ newsrctree = os.path.join(self.workspacedir, 'sources', newrecipename)
+ self.assertExists(newsrctree, 'Source directory not renamed')
+ checkvars = {}
+ checkvars['S'] = '${WORKDIR}/%s-%s' % (recipename, recipever)
+ checkvars['SRC_URI'] = url
+ self._test_recipe_contents(newrecipefile, checkvars, [])
+ # Try again - change just name this time
+ result = runCmd('devtool reset -n %s' % newrecipename)
+ shutil.rmtree(newsrctree)
+ add_recipe()
+ newrecipefile = os.path.join(self.workspacedir, 'recipes', newrecipename, '%s_%s.bb' % (newrecipename, recipever))
+ result = runCmd('devtool rename %s %s' % (recipename, newrecipename))
+ self.assertExists(newrecipefile, 'Recipe file not renamed')
+ self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipename), 'Old recipe directory still exists')
+ self.assertExists(os.path.join(self.workspacedir, 'sources', newrecipename), 'Source directory not renamed')
+ checkvars = {}
+ checkvars['S'] = '${WORKDIR}/%s-${PV}' % recipename
+ checkvars['SRC_URI'] = url.replace(recipever, '${PV}')
+ self._test_recipe_contents(newrecipefile, checkvars, [])
+ # Try again - change just version this time
+ result = runCmd('devtool reset -n %s' % newrecipename)
+ shutil.rmtree(newsrctree)
+ add_recipe()
+ newrecipefile = os.path.join(self.workspacedir, 'recipes', recipename, '%s_%s.bb' % (recipename, newrecipever))
+ result = runCmd('devtool rename %s -V %s' % (recipename, newrecipever))
+ self.assertExists(newrecipefile, 'Recipe file not renamed')
+ self.assertExists(os.path.join(self.workspacedir, 'sources', recipename), 'Source directory no longer exists')
+ checkvars = {}
+ checkvars['S'] = '${WORKDIR}/${BPN}-%s' % recipever
+ checkvars['SRC_URI'] = url
+ self._test_recipe_contents(newrecipefile, checkvars, [])
+
+ def test_devtool_virtual_kernel_modify(self):
+ """
+ Summary: The purpose of this test case is to verify that
+ devtool modify works correctly when building
+ the kernel.
+ Dependencies: NA
+ Steps: 1. Build kernel with bitbake.
+ 2. Save the config file generated.
+ 3. Clean the environment.
+ 4. Use `devtool modify virtual/kernel` to validate following:
+ 4.1 The source is checked out correctly.
+ 4.2 The resulting configuration is the same as
+ what was get on step 2.
+ 4.3 The Kernel can be build correctly.
+ 4.4 Changes made on the source are reflected on the
+ subsequent builds.
+ 4.5 Changes on the configuration are reflected on the
+ subsequent builds
+ Expected: devtool modify is able to checkout the source of the kernel
+ and modification to the source and configurations are reflected
+ when building the kernel.
+ """
+ kernel_provider = get_bb_var('PREFERRED_PROVIDER_virtual/kernel')
+ # Clean up the enviroment
+ bitbake('%s -c clean' % kernel_provider)
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ tempdir_cfg = tempfile.mkdtemp(prefix='config_qa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(tempdir_cfg)
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean %s' % kernel_provider)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ #Step 1
+ #Here is just generated the config file instead of all the kernel to optimize the
+ #time of executing this test case.
+ bitbake('%s -c configure' % kernel_provider)
+ bbconfig = os.path.join(get_bb_var('B', kernel_provider),'.config')
+ #Step 2
+ runCmd('cp %s %s' % (bbconfig, tempdir_cfg))
+ self.assertExists(os.path.join(tempdir_cfg, '.config'), 'Could not copy .config file from kernel')
+
+ tmpconfig = os.path.join(tempdir_cfg, '.config')
+ #Step 3
+ bitbake('%s -c clean' % kernel_provider)
+ #Step 4.1
+ runCmd('devtool modify virtual/kernel -x %s' % tempdir)
+ self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source could not be found')
+ #Step 4.2
+ configfile = os.path.join(tempdir,'.config')
+ diff = runCmd('diff %s %s' % (tmpconfig, configfile))
+ self.assertEqual(0,diff.status,'Kernel .config file is not the same using bitbake and devtool')
+ #Step 4.3
+ #NOTE: virtual/kernel is mapped to kernel_provider
+ result = runCmd('devtool build %s' % kernel_provider)
+ self.assertEqual(0,result.status,'Cannot build kernel using `devtool build`')
+ kernelfile = os.path.join(get_bb_var('KBUILD_OUTPUT', kernel_provider), 'vmlinux')
+ self.assertExists(kernelfile, 'Kernel was not build correctly')
+
+ #Modify the kernel source
+ modfile = os.path.join(tempdir,'arch/x86/boot/header.S')
+ modstring = "Use a boot loader. Devtool testing."
+ modapplied = runCmd("sed -i 's/Use a boot loader./%s/' %s" % (modstring, modfile))
+ self.assertEqual(0,modapplied.status,'Modification to %s on kernel source failed' % modfile)
+ #Modify the configuration
+ codeconfigfile = os.path.join(tempdir,'.config.new')
+ modconfopt = "CONFIG_SG_POOL=n"
+ modconf = runCmd("sed -i 's/CONFIG_SG_POOL=y/%s/' %s" % (modconfopt, codeconfigfile))
+ self.assertEqual(0,modconf.status,'Modification to %s failed' % codeconfigfile)
+ #Build again kernel with devtool
+ rebuild = runCmd('devtool build %s' % kernel_provider)
+ self.assertEqual(0,rebuild.status,'Fail to build kernel after modification of source and config')
+ #Step 4.4
+ bzimagename = 'bzImage-' + get_bb_var('KERNEL_VERSION_NAME', kernel_provider)
+ bzimagefile = os.path.join(get_bb_var('D', kernel_provider),'boot', bzimagename)
+ checkmodcode = runCmd("grep '%s' %s" % (modstring, bzimagefile))
+ self.assertEqual(0,checkmodcode.status,'Modification on kernel source failed')
+ #Step 4.5
+ checkmodconfg = runCmd("grep %s %s" % (modconfopt, codeconfigfile))
+ self.assertEqual(0,checkmodconfg.status,'Modification to configuration file failed')
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py b/meta/lib/oeqa/selftest/cases/distrodata.py
new file mode 100644
index 0000000000..68ba556485
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -0,0 +1,89 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+from oeqa.utils.decorators import testcase
+from oeqa.utils.ftools import write_file
+
+import oe.recipeutils
+
+class Distrodata(OESelftestTestCase):
+
+ def test_checkpkg(self):
+ """
+ Summary: Test that upstream version checks do not regress
+ Expected: Upstream version checks should succeed except for the recipes listed in the exception list.
+ Product: oe-core
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ """
+ feature = 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
+ self.write_config(feature)
+
+ pkgs = oe.recipeutils.get_recipe_upgrade_status()
+
+ regressed_failures = [pkg[0] for pkg in pkgs if pkg[1] == 'UNKNOWN_BROKEN']
+ regressed_successes = [pkg[0] for pkg in pkgs if pkg[1] == 'KNOWN_BROKEN']
+ msg = ""
+ if len(regressed_failures) > 0:
+ msg = msg + """
+The following packages failed upstream version checks. Please fix them using UPSTREAM_CHECK_URI/UPSTREAM_CHECK_REGEX
+(when using tarballs) or UPSTREAM_CHECK_GITTAGREGEX (when using git). If an upstream version check cannot be performed
+(for example, if upstream does not use git tags), you can set UPSTREAM_VERSION_UNKNOWN to '1' in the recipe to acknowledge
+that the check cannot be performed.
+""" + "\n".join(regressed_failures)
+ if len(regressed_successes) > 0:
+ msg = msg + """
+The following packages have been checked successfully for upstream versions,
+but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please remove that line from the recipes.
+""" + "\n".join(regressed_successes)
+ self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg)
+
+ def test_maintainers(self):
+ """
+ Summary: Test that oe-core recipes have a maintainer
+ Expected: All oe-core recipes (except a few special static/testing ones) should have a maintainer listed in maintainers.inc file.
+ Product: oe-core
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ """
+ def is_exception(pkg):
+ exceptions = ["packagegroup-", "initramfs-", "systemd-machine-units", "target-sdk-provides-dummy"]
+ for i in exceptions:
+ if i in pkg:
+ return True
+ return False
+
+ feature = 'require conf/distro/include/maintainers.inc\n'
+ self.write_config(feature)
+
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=False)
+
+ with_maintainer_list = []
+ no_maintainer_list = []
+ # We could have used all_recipes() here, but this method will find
+ # every recipe if we ever move to setting RECIPE_MAINTAINER in recipe files
+ # instead of maintainers.inc
+ for fn in tinfoil.all_recipe_files(variants=False):
+ if not '/meta/recipes-' in fn:
+ # We are only interested in OE-Core
+ continue
+ rd = tinfoil.parse_recipe_file(fn, appends=False)
+ pn = rd.getVar('PN')
+ if is_exception(pn):
+ continue
+ if rd.getVar('RECIPE_MAINTAINER'):
+ with_maintainer_list.append((pn, fn))
+ else:
+ no_maintainer_list.append((pn, fn))
+
+ if no_maintainer_list:
+ self.fail("""
+The following recipes do not have a maintainer assigned to them. Please add an entry to meta/conf/distro/include/maintainers.inc file.
+""" + "\n".join(['%s (%s)' % i for i in no_maintainer_list]))
+
+ if not with_maintainer_list:
+ self.fail("""
+The list of oe-core recipes with maintainers is empty. This may indicate that the test has regressed and needs fixing.
+""")
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py
new file mode 100644
index 0000000000..862849af35
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -0,0 +1,120 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import tempfile
+import shutil
+import os
+import glob
+import time
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+
+class oeSDKExtSelfTest(OESelftestTestCase):
+ """
+ # Bugzilla Test Plan: 6033
+ # This code is planned to be part of the automation for eSDK containig
+ # Install libraries and headers, image generation binary feeds, sdk-update.
+ """
+
+ @staticmethod
+ def get_esdk_environment(env_eSDK, tmpdir_eSDKQA):
+ # XXX: at this time use the first env need to investigate
+ # what environment load oe-selftest, i586, x86_64
+ pattern = os.path.join(tmpdir_eSDKQA, 'environment-setup-*')
+ return glob.glob(pattern)[0]
+
+ @staticmethod
+ def run_esdk_cmd(env_eSDK, tmpdir_eSDKQA, cmd, postconfig=None, **options):
+ if postconfig:
+ esdk_conf_file = os.path.join(tmpdir_eSDKQA, 'conf', 'local.conf')
+ with open(esdk_conf_file, 'a+') as f:
+ f.write(postconfig)
+ if not options:
+ options = {}
+ if not 'shell' in options:
+ options['shell'] = True
+
+ runCmd("cd %s; unset BBPATH; unset BUILDDIR; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
+
+ @staticmethod
+ def generate_eSDK(image):
+ pn_task = '%s -c populate_sdk_ext' % image
+ bitbake(pn_task)
+
+ @staticmethod
+ def get_eSDK_toolchain(image):
+ pn_task = '%s -c populate_sdk_ext' % image
+
+ bb_vars = get_bb_vars(['SDK_DEPLOY', 'TOOLCHAINEXT_OUTPUTNAME'], pn_task)
+ sdk_deploy = bb_vars['SDK_DEPLOY']
+ toolchain_name = bb_vars['TOOLCHAINEXT_OUTPUTNAME']
+ return os.path.join(sdk_deploy, toolchain_name + '.sh')
+
+ @staticmethod
+ def update_configuration(cls, image, tmpdir_eSDKQA, env_eSDK, ext_sdk_path):
+ sstate_dir = os.path.join(os.environ['BUILDDIR'], 'sstate-cache')
+
+ oeSDKExtSelfTest.generate_eSDK(cls.image)
+
+ cls.ext_sdk_path = oeSDKExtSelfTest.get_eSDK_toolchain(cls.image)
+ runCmd("%s -y -d \"%s\"" % (cls.ext_sdk_path, cls.tmpdir_eSDKQA))
+
+ cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA)
+
+ sstate_config="""
+SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
+SSTATE_MIRRORS = "file://.* file://%s/PATH"
+CORE_IMAGE_EXTRA_INSTALL = "perl"
+ """ % sstate_dir
+
+ with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f:
+ f.write(sstate_config)
+
+ @classmethod
+ def setUpClass(cls):
+ super(oeSDKExtSelfTest, cls).setUpClass()
+ cls.image = 'core-image-minimal'
+
+ bb_vars = get_bb_vars(['SSTATE_DIR', 'WORKDIR'], cls.image)
+ bb.utils.mkdirhier(bb_vars["WORKDIR"])
+ cls.tmpdirobj = tempfile.TemporaryDirectory(prefix="selftest-esdk-", dir=bb_vars["WORKDIR"])
+ cls.tmpdir_eSDKQA = cls.tmpdirobj.name
+
+ oeSDKExtSelfTest.generate_eSDK(cls.image)
+
+ # Install eSDK
+ cls.ext_sdk_path = oeSDKExtSelfTest.get_eSDK_toolchain(cls.image)
+ runCmd("%s -y -d \"%s\"" % (cls.ext_sdk_path, cls.tmpdir_eSDKQA))
+
+ cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA)
+
+ # Configure eSDK to use sstate mirror from poky
+ sstate_config="""
+SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
+SSTATE_MIRRORS = "file://.* file://%s/PATH"
+ """ % bb_vars["SSTATE_DIR"]
+ with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f:
+ f.write(sstate_config)
+
+ @classmethod
+ def tearDownClass(cls):
+ for i in range(0, 10):
+ if os.path.exists(os.path.join(cls.tmpdir_eSDKQA, 'bitbake.lock')):
+ time.sleep(1)
+ else:
+ break
+ cls.tmpdirobj.cleanup()
+ super().tearDownClass()
+
+ def test_install_libraries_headers(self):
+ pn_sstate = 'bc'
+ bitbake(pn_sstate)
+ cmd = "devtool sdk-install %s " % pn_sstate
+ oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
+
+ def test_image_generation_binary_feeds(self):
+ image = 'core-image-minimal'
+ cmd = "devtool build-image %s" % image
+ oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
+
diff --git a/meta/lib/oeqa/selftest/cases/efibootpartition.py b/meta/lib/oeqa/selftest/cases/efibootpartition.py
new file mode 100644
index 0000000000..a61cf9bcb3
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/efibootpartition.py
@@ -0,0 +1,46 @@
+# Based on runqemu.py test file
+#
+# Copyright (c) 2017 Wind River Systems, Inc.
+#
+# SPDX-License-Identifier: MIT
+#
+
+import re
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, runqemu, get_bb_var
+
+class GenericEFITest(OESelftestTestCase):
+ """EFI booting test class"""
+
+ cmd_common = "runqemu nographic serial wic ovmf"
+ efi_provider = "systemd-boot"
+ image = "core-image-minimal"
+ machine = "qemux86-64"
+ recipes_built = False
+
+ @classmethod
+ def setUpLocal(self):
+ super(GenericEFITest, self).setUpLocal(self)
+
+ self.write_config(self,
+"""
+EFI_PROVIDER = "%s"
+IMAGE_FSTYPES_pn-%s_append = " wic"
+MACHINE = "%s"
+MACHINE_FEATURES_append = " efi"
+WKS_FILE = "efi-bootdisk.wks.in"
+IMAGE_INSTALL_append = " grub-efi systemd-boot kernel-image-bzimage"
+"""
+% (self.efi_provider, self.image, self.machine))
+ if not self.recipes_built:
+ bitbake("ovmf")
+ bitbake(self.image)
+ self.recipes_built = True
+
+ @classmethod
+ def test_boot_efi(self):
+ """Test generic boot partition with qemu"""
+ cmd = "%s %s" % (self.cmd_common, self.machine)
+ with runqemu(self.image, ssh=False, launch_cmd=cmd) as qemu:
+ self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
diff --git a/meta/lib/oeqa/selftest/cases/fetch.py b/meta/lib/oeqa/selftest/cases/fetch.py
new file mode 100644
index 0000000000..76cbadf2ff
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/fetch.py
@@ -0,0 +1,51 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import oe.path
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class Fetch(OESelftestTestCase):
+ def test_git_mirrors(self):
+ """
+ Verify that the git fetcher will fall back to the HTTP mirrors. The
+ recipe needs to be one that we have on the Yocto Project source mirror
+ and is hosted in git.
+ """
+
+ # TODO: mktempd instead of hardcoding
+ dldir = os.path.join(self.builddir, "download-git-mirrors")
+ self.track_for_cleanup(dldir)
+
+ # No mirrors, should use git to fetch successfully
+ features = """
+DL_DIR = "%s"
+MIRRORS_forcevariable = ""
+PREMIRRORS_forcevariable = ""
+""" % dldir
+ self.write_config(features)
+ oe.path.remove(dldir, recurse=True)
+ bitbake("dbus-wait -c fetch -f")
+
+ # No mirrors and broken git, should fail
+ features = """
+DL_DIR = "%s"
+GIT_PROXY_COMMAND = "false"
+MIRRORS_forcevariable = ""
+PREMIRRORS_forcevariable = ""
+""" % dldir
+ self.write_config(features)
+ oe.path.remove(dldir, recurse=True)
+ with self.assertRaises(AssertionError):
+ bitbake("dbus-wait -c fetch -f")
+
+ # Broken git but a specific mirror
+ features = """
+DL_DIR = "%s"
+GIT_PROXY_COMMAND = "false"
+MIRRORS_forcevariable = "git://.*/.* http://downloads.yoctoproject.org/mirror/sources/"
+""" % dldir
+ self.write_config(features)
+ oe.path.remove(dldir, recurse=True)
+ bitbake("dbus-wait -c fetch -f")
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py
new file mode 100644
index 0000000000..3efe15228f
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/gcc.py
@@ -0,0 +1,152 @@
+# SPDX-License-Identifier: MIT
+import os
+from oeqa.core.decorator import OETestTag
+from oeqa.core.case import OEPTestResultTestCase
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command
+
+def parse_values(content):
+ for i in content:
+ for v in ["PASS", "FAIL", "XPASS", "XFAIL", "UNRESOLVED", "UNSUPPORTED", "UNTESTED", "ERROR", "WARNING"]:
+ if i.startswith(v + ": "):
+ yield i[len(v) + 2:].strip(), v
+ break
+
+class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
+ def check_skip(self, suite):
+ targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split()
+ if suite not in targets:
+ self.skipTest("Target does not use {0}".format(suite))
+
+ def run_check(self, *suites, ssh = None):
+ targets = set()
+ for s in suites:
+ if s == "gcc":
+ targets.add("check-gcc-c")
+ elif s == "g++":
+ targets.add("check-gcc-c++")
+ else:
+ targets.add("check-target-{}".format(s))
+
+ # configure ssh target
+ features = []
+ features.append('MAKE_CHECK_TARGETS = "{0}"'.format(" ".join(targets)))
+ if ssh is not None:
+ features.append('TOOLCHAIN_TEST_TARGET = "ssh"')
+ features.append('TOOLCHAIN_TEST_HOST = "{0}"'.format(ssh))
+ features.append('TOOLCHAIN_TEST_HOST_USER = "root"')
+ features.append('TOOLCHAIN_TEST_HOST_PORT = "22"')
+ self.write_config("\n".join(features))
+
+ recipe = "gcc-runtime"
+ bitbake("{} -c check".format(recipe))
+
+ bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe)
+ builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"]
+
+ for suite in suites:
+ sumspath = os.path.join(builddir, "gcc", "testsuite", suite, "{0}.sum".format(suite))
+ if not os.path.exists(sumspath): # check in target dirs
+ sumspath = os.path.join(builddir, target_sys, suite, "testsuite", "{0}.sum".format(suite))
+ if not os.path.exists(sumspath): # handle libstdc++-v3 -> libstdc++
+ sumspath = os.path.join(builddir, target_sys, suite, "testsuite", "{0}.sum".format(suite.split("-")[0]))
+ logpath = os.path.splitext(sumspath)[0] + ".log"
+
+ ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite
+ ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite
+ self.ptest_section(ptestsuite, logfile = logpath)
+ with open(sumspath, "r") as f:
+ for test, result in parse_values(f):
+ self.ptest_result(ptestsuite, test, result)
+
+ def run_check_emulated(self, *args, **kwargs):
+ # build core-image-minimal with required packages
+ default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"]
+ features = []
+ features.append('IMAGE_FEATURES += "ssh-server-openssh"')
+ features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages)))
+ self.write_config("\n".join(features))
+ bitbake("core-image-minimal")
+
+ # wrap the execution with a qemu instance
+ with runqemu("core-image-minimal", runqemuparams = "nographic") as qemu:
+ # validate that SSH is working
+ status, _ = qemu.run("uname")
+ self.assertEqual(status, 0)
+
+ return self.run_check(*args, ssh=qemu.ip, **kwargs)
+
+@OETestTag("toolchain-user")
+class GccCrossSelfTest(GccSelfTestBase):
+ def test_cross_gcc(self):
+ self.run_check("gcc")
+
+@OETestTag("toolchain-user")
+class GxxCrossSelfTest(GccSelfTestBase):
+ def test_cross_gxx(self):
+ self.run_check("g++")
+
+@OETestTag("toolchain-user")
+class GccLibAtomicSelfTest(GccSelfTestBase):
+ def test_libatomic(self):
+ self.run_check("libatomic")
+
+@OETestTag("toolchain-user")
+class GccLibGompSelfTest(GccSelfTestBase):
+ def test_libgomp(self):
+ self.run_check("libgomp")
+
+@OETestTag("toolchain-user")
+class GccLibStdCxxSelfTest(GccSelfTestBase):
+ def test_libstdcxx(self):
+ self.run_check("libstdc++-v3")
+
+@OETestTag("toolchain-user")
+class GccLibSspSelfTest(GccSelfTestBase):
+ def test_libssp(self):
+ self.check_skip("libssp")
+ self.run_check("libssp")
+
+@OETestTag("toolchain-user")
+class GccLibItmSelfTest(GccSelfTestBase):
+ def test_libitm(self):
+ self.check_skip("libitm")
+ self.run_check("libitm")
+
+@OETestTag("toolchain-system")
+class GccCrossSelfTestSystemEmulated(GccSelfTestBase):
+ def test_cross_gcc(self):
+ self.run_check_emulated("gcc")
+
+@OETestTag("toolchain-system")
+class GxxCrossSelfTestSystemEmulated(GccSelfTestBase):
+ def test_cross_gxx(self):
+ self.run_check_emulated("g++")
+
+@OETestTag("toolchain-system")
+class GccLibAtomicSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libatomic(self):
+ self.run_check_emulated("libatomic")
+
+@OETestTag("toolchain-system")
+class GccLibGompSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libgomp(self):
+ self.run_check_emulated("libgomp")
+
+@OETestTag("toolchain-system")
+class GccLibStdCxxSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libstdcxx(self):
+ self.run_check_emulated("libstdc++-v3")
+
+@OETestTag("toolchain-system")
+class GccLibSspSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libssp(self):
+ self.check_skip("libssp")
+ self.run_check_emulated("libssp")
+
+@OETestTag("toolchain-system")
+class GccLibItmSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libitm(self):
+ self.check_skip("libitm")
+ self.run_check_emulated("libitm")
+
diff --git a/meta/lib/oeqa/selftest/cases/glibc.py b/meta/lib/oeqa/selftest/cases/glibc.py
new file mode 100644
index 0000000000..c687f6ef93
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/glibc.py
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: MIT
+import os
+import contextlib
+from oeqa.core.decorator import OETestTag
+from oeqa.core.case import OEPTestResultTestCase
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command
+from oeqa.utils.nfs import unfs_server
+
+def parse_values(content):
+ for i in content:
+ for v in ["PASS", "FAIL", "XPASS", "XFAIL", "UNRESOLVED", "UNSUPPORTED", "UNTESTED", "ERROR", "WARNING"]:
+ if i.startswith(v + ": "):
+ yield i[len(v) + 2:].strip(), v
+ break
+
+class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
+ def run_check(self, ssh = None):
+ # configure ssh target
+ features = []
+ if ssh is not None:
+ features.append('TOOLCHAIN_TEST_TARGET = "ssh"')
+ features.append('TOOLCHAIN_TEST_HOST = "{0}"'.format(ssh))
+ features.append('TOOLCHAIN_TEST_HOST_USER = "root"')
+ features.append('TOOLCHAIN_TEST_HOST_PORT = "22"')
+ # force single threaded test execution
+ features.append('EGLIBCPARALLELISM_task-check_pn-glibc-testsuite = "PARALLELMFLAGS="-j1""')
+ self.write_config("\n".join(features))
+
+ bitbake("glibc-testsuite -c check")
+
+ builddir = get_bb_var("B", "glibc-testsuite")
+
+ ptestsuite = "glibc-user" if ssh is None else "glibc"
+ self.ptest_section(ptestsuite)
+ with open(os.path.join(builddir, "tests.sum"), "r") as f:
+ for test, result in parse_values(f):
+ self.ptest_result(ptestsuite, test, result)
+
+ def run_check_emulated(self):
+ with contextlib.ExitStack() as s:
+ # use the base work dir, as the nfs mount, since the recipe directory may not exist
+ tmpdir = get_bb_var("BASE_WORKDIR")
+ nfsport, mountport = s.enter_context(unfs_server(tmpdir))
+
+ # build core-image-minimal with required packages
+ default_installed_packages = [
+ "glibc-charmaps",
+ "libgcc",
+ "libstdc++",
+ "libatomic",
+ "libgomp",
+ # "python3",
+ # "python3-pexpect",
+ "nfs-utils",
+ ]
+ features = []
+ features.append('IMAGE_FEATURES += "ssh-server-openssh"')
+ features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages)))
+ self.write_config("\n".join(features))
+ bitbake("core-image-minimal")
+
+ # start runqemu
+ qemu = s.enter_context(runqemu("core-image-minimal", runqemuparams = "nographic"))
+
+ # validate that SSH is working
+ status, _ = qemu.run("uname")
+ self.assertEqual(status, 0)
+
+ # setup nfs mount
+ if qemu.run("mkdir -p \"{0}\"".format(tmpdir))[0] != 0:
+ raise Exception("Failed to setup NFS mount directory on target")
+ mountcmd = "mount -o noac,nfsvers=3,port={0},udp,mountport={1} \"{2}:{3}\" \"{3}\"".format(nfsport, mountport, qemu.server_ip, tmpdir)
+ status, output = qemu.run(mountcmd)
+ if status != 0:
+ raise Exception("Failed to setup NFS mount on target ({})".format(repr(output)))
+
+ self.run_check(ssh = qemu.ip)
+
+@OETestTag("toolchain-user")
+class GlibcSelfTest(GlibcSelfTestBase):
+ def test_glibc(self):
+ self.run_check()
+
+@OETestTag("toolchain-system")
+class GlibcSelfTestSystemEmulated(GlibcSelfTestBase):
+ def test_glibc(self):
+ self.run_check_emulated()
+
diff --git a/meta/lib/oeqa/selftest/cases/gotoolchain.py b/meta/lib/oeqa/selftest/cases/gotoolchain.py
new file mode 100644
index 0000000000..3119520f0d
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/gotoolchain.py
@@ -0,0 +1,71 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import glob
+import os
+import shutil
+import tempfile
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_vars
+
+
+class oeGoToolchainSelfTest(OESelftestTestCase):
+ """
+ Test cases for OE's Go toolchain
+ """
+
+ @staticmethod
+ def get_sdk_environment(tmpdir_SDKQA):
+ pattern = os.path.join(tmpdir_SDKQA, "environment-setup-*")
+ # FIXME: this is a very naive implementation
+ return glob.glob(pattern)[0]
+
+ @staticmethod
+ def get_sdk_toolchain():
+ bb_vars = get_bb_vars(['SDK_DEPLOY', 'TOOLCHAIN_OUTPUTNAME'],
+ "meta-go-toolchain")
+ sdk_deploy = bb_vars['SDK_DEPLOY']
+ toolchain_name = bb_vars['TOOLCHAIN_OUTPUTNAME']
+ return os.path.join(sdk_deploy, toolchain_name + ".sh")
+
+ @classmethod
+ def setUpClass(cls):
+ super(oeGoToolchainSelfTest, cls).setUpClass()
+ cls.tmpdir_SDKQA = tempfile.mkdtemp(prefix='SDKQA')
+ cls.go_path = os.path.join(cls.tmpdir_SDKQA, "go")
+ # Build the SDK and locate it in DEPLOYDIR
+ bitbake("meta-go-toolchain")
+ cls.sdk_path = oeGoToolchainSelfTest.get_sdk_toolchain()
+ # Install the SDK into the tmpdir
+ runCmd("sh %s -y -d \"%s\"" % (cls.sdk_path, cls.tmpdir_SDKQA))
+ cls.env_SDK = oeGoToolchainSelfTest.get_sdk_environment(cls.tmpdir_SDKQA)
+
+ @classmethod
+ def tearDownClass(cls):
+ shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True)
+ super(oeGoToolchainSelfTest, cls).tearDownClass()
+
+ def run_sdk_go_command(self, gocmd):
+ cmd = "cd %s; " % self.tmpdir_SDKQA
+ cmd = cmd + ". %s; " % self.env_SDK
+ cmd = cmd + "export GOPATH=%s; " % self.go_path
+ cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd
+ return runCmd(cmd).status
+
+ def test_go_dep_build(self):
+ proj = "github.com/golang"
+ name = "dep"
+ ver = "v0.3.1"
+ archive = ".tar.gz"
+ url = "https://%s/%s/archive/%s%s" % (proj, name, ver, archive)
+
+ runCmd("cd %s; wget %s" % (self.tmpdir_SDKQA, url))
+ runCmd("cd %s; tar -xf %s" % (self.tmpdir_SDKQA, ver+archive))
+ runCmd("mkdir -p %s/src/%s" % (self.go_path, proj))
+ runCmd("mv %s/dep-0.3.1 %s/src/%s/%s"
+ % (self.tmpdir_SDKQA, self.go_path, proj, name))
+ retv = self.run_sdk_go_command('build %s/%s/cmd/dep'
+ % (proj, name))
+ self.assertEqual(retv, 0,
+ msg="Running go build failed for %s" % name)
diff --git a/meta/lib/oeqa/selftest/cases/image_typedep.py b/meta/lib/oeqa/selftest/cases/image_typedep.py
new file mode 100644
index 0000000000..52e1080f13
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/image_typedep.py
@@ -0,0 +1,58 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class ImageTypeDepTests(OESelftestTestCase):
+
+ # Verify that when specifying a IMAGE_TYPEDEP_ of the form "foo.bar" that
+ # the conversion type bar gets added as a dep as well
+ def test_conversion_typedep_added(self):
+
+ self.write_recipeinc('emptytest', """
+# Try to empty out the default dependency list
+PACKAGE_INSTALL = ""
+DISTRO_EXTRA_RDEPENDS=""
+
+LICENSE = "MIT"
+IMAGE_FSTYPES = "testfstype"
+
+IMAGE_TYPES_MASKED += "testfstype"
+IMAGE_TYPEDEP_testfstype = "tar.bz2"
+
+inherit image
+
+""")
+ # First get the dependency that should exist for bz2, it will look
+ # like CONVERSION_DEPENDS_bz2="somedep"
+ result = bitbake('-e emptytest')
+
+ dep = None
+ for line in result.output.split('\n'):
+ if line.startswith('CONVERSION_DEPENDS_bz2'):
+ dep = line.split('=')[1].strip('"')
+ break
+
+ self.assertIsNotNone(dep, "CONVERSION_DEPENDS_bz2 dependency not found in bitbake -e output")
+
+ # Now get the dependency task list and check for the expected task
+ # dependency
+ bitbake('-g emptytest')
+
+ taskdependsfile = os.path.join(self.builddir, 'task-depends.dot')
+ dep = dep + ".do_populate_sysroot"
+ depfound = False
+ expectedline = '"emptytest.do_rootfs" -> "{}"'.format(dep)
+
+ with open(taskdependsfile, "r") as f:
+ for line in f:
+ if line.strip() == expectedline:
+ depfound = True
+ break
+
+ if not depfound:
+ raise AssertionError("\"{}\" not found".format(expectedline))
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
new file mode 100644
index 0000000000..5c519ac3d6
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -0,0 +1,264 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
+from oeqa.utils.sshcontrol import SSHControl
+import os
+import json
+
+class ImageFeatures(OESelftestTestCase):
+
+ test_user = 'tester'
+ root_user = 'root'
+
+ def test_non_root_user_can_connect_via_ssh_without_password(self):
+ """
+ Summary: Check if non root user can connect via ssh without password
+ Expected: 1. Connection to the image via ssh using root user without providing a password should be allowed.
+ 2. Connection to the image via ssh using tester user without providing a password should be allowed.
+ Product: oe-core
+ Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password allow-root-login"\n'
+ features += 'INHERIT += "extrausers"\n'
+ features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
+ self.write_config(features)
+
+ # Build a core-image-minimal
+ bitbake('core-image-minimal')
+
+ with runqemu("core-image-minimal") as qemu:
+ # Attempt to ssh with each user into qemu with empty password
+ for user in [self.root_user, self.test_user]:
+ ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
+ status, output = ssh.run("true")
+ self.assertEqual(status, 0, 'ssh to user %s failed with %s' % (user, output))
+
+ def test_all_users_can_connect_via_ssh_without_password(self):
+ """
+ Summary: Check if all users can connect via ssh without password
+ Expected: 1. Connection to the image via ssh using root user without providing a password should NOT be allowed.
+ 2. Connection to the image via ssh using tester user without providing a password should be allowed.
+ Product: oe-core
+ Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password allow-root-login"\n'
+ features += 'INHERIT += "extrausers"\n'
+ features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
+ self.write_config(features)
+
+ # Build a core-image-minimal
+ bitbake('core-image-minimal')
+
+ with runqemu("core-image-minimal") as qemu:
+ # Attempt to ssh with each user into qemu with empty password
+ for user in [self.root_user, self.test_user]:
+ ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
+ status, output = ssh.run("true")
+ if user == 'root':
+ self.assertNotEqual(status, 0, 'ssh to user root was allowed when it should not have been')
+ else:
+ self.assertEqual(status, 0, 'ssh to user tester failed with %s' % output)
+
+
+ def test_clutter_image_can_be_built(self):
+ """
+ Summary: Check if clutter image can be built
+ Expected: 1. core-image-clutter can be built
+ Product: oe-core
+ Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ # Build a core-image-clutter
+ bitbake('core-image-clutter')
+
+ def test_wayland_support_in_image(self):
+ """
+ Summary: Check Wayland support in image
+ Expected: 1. Wayland image can be build
+ 2. Wayland feature can be installed
+ Product: oe-core
+ Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ distro_features = get_bb_var('DISTRO_FEATURES')
+ if not ('opengl' in distro_features and 'wayland' in distro_features):
+ self.skipTest('neither opengl nor wayland present on DISTRO_FEATURES so core-image-weston cannot be built')
+
+ # Build a core-image-weston
+ bitbake('core-image-weston')
+
+ def test_bmap(self):
+ """
+ Summary: Check bmap support
+ Expected: 1. core-image-minimal can be build with bmap support
+ 2. core-image-minimal is sparse
+ Product: oe-core
+ Author: Ed Bartosh <ed.bartosh@linux.intel.com>
+ """
+
+ features = 'IMAGE_FSTYPES += " ext4 ext4.bmap ext4.bmap.gz"'
+ self.write_config(features)
+
+ image_name = 'core-image-minimal'
+ bitbake(image_name)
+
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
+ image_path = os.path.join(deploy_dir_image, "%s.ext4" % link_name)
+ bmap_path = "%s.bmap" % image_path
+ gzip_path = "%s.gz" % bmap_path
+
+ # check if result image, bmap and bmap.gz files are in deploy directory
+ self.assertTrue(os.path.exists(image_path))
+ self.assertTrue(os.path.exists(bmap_path))
+ self.assertTrue(os.path.exists(gzip_path))
+
+ # check if result image is sparse
+ image_stat = os.stat(image_path)
+ self.assertGreater(image_stat.st_size, image_stat.st_blocks * 512)
+
+ # check if the resulting gzip is valid
+ self.assertTrue(runCmd('gzip -t %s' % gzip_path))
+
+ def test_hypervisor_fmts(self):
+ """
+ Summary: Check various hypervisor formats
+ Expected: 1. core-image-minimal can be built with vmdk, vdi and
+ qcow2 support.
+ 2. qemu-img says each image has the expected format
+ Product: oe-core
+ Author: Tom Rini <trini@konsulko.com>
+ """
+
+ img_types = [ 'vmdk', 'vdi', 'qcow2' ]
+ features = ""
+ for itype in img_types:
+ features += 'IMAGE_FSTYPES += "wic.%s"\n' % itype
+ self.write_config(features)
+
+ image_name = 'core-image-minimal'
+ bitbake(image_name)
+
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
+ for itype in img_types:
+ image_path = os.path.join(deploy_dir_image, "%s.wic.%s" %
+ (link_name, itype))
+
+ # check if result image file is in deploy directory
+ self.assertTrue(os.path.exists(image_path))
+
+ # check if result image is vmdk
+ sysroot = get_bb_var('STAGING_DIR_NATIVE', 'core-image-minimal')
+ result = runCmd('qemu-img info --output json %s' % image_path,
+ native_sysroot=sysroot)
+ try:
+ data = json.loads(result.output)
+ self.assertEqual(data.get('format'), itype,
+ msg="Unexpected format in '%s'" % (result.output))
+ except json.decoder.JSONDecodeError:
+ self.fail("Could not parse '%ss'" % result.output)
+
+ def test_long_chain_conversion(self):
+ """
+ Summary: Check for chaining many CONVERSION_CMDs together
+ Expected: 1. core-image-minimal can be built with
+ ext4.bmap.gz.bz2.lzo.xz.u-boot and also create a
+ sha256sum
+ 2. The above image has a valid sha256sum
+ Product: oe-core
+ Author: Tom Rini <trini@konsulko.com>
+ """
+
+ conv = "ext4.bmap.gz.bz2.lzo.xz.u-boot"
+ features = 'IMAGE_FSTYPES += "%s %s.sha256sum"' % (conv, conv)
+ self.write_config(features)
+
+ image_name = 'core-image-minimal'
+ bitbake(image_name)
+
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
+ image_path = os.path.join(deploy_dir_image, "%s.%s" %
+ (link_name, conv))
+
+ # check if resulting image is in the deploy directory
+ self.assertTrue(os.path.exists(image_path))
+ self.assertTrue(os.path.exists(image_path + ".sha256sum"))
+
+ # check if the resulting sha256sum agrees
+ self.assertTrue(runCmd('cd %s;sha256sum -c %s.%s.sha256sum' %
+ (deploy_dir_image, link_name, conv)))
+
+ def test_image_fstypes(self):
+ """
+ Summary: Check if image of supported image fstypes can be built
+ Expected: core-image-minimal can be built for various image types
+ Product: oe-core
+ Author: Ed Bartosh <ed.bartosh@linux.intel.com>
+ """
+ image_name = 'core-image-minimal'
+
+ all_image_types = set(get_bb_var("IMAGE_TYPES", image_name).split())
+ blacklist = set(('container', 'elf', 'f2fs', 'multiubi', 'tar.zst'))
+ img_types = all_image_types - blacklist
+
+ config = 'IMAGE_FSTYPES += "%s"\n'\
+ 'MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047"\n'\
+ 'UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512"' % ' '.join(img_types)
+ self.write_config(config)
+
+ bitbake(image_name)
+
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
+ for itype in img_types:
+ image_path = os.path.join(deploy_dir_image, "%s.%s" % (link_name, itype))
+ # check if result image is in deploy directory
+ self.assertTrue(os.path.exists(image_path),
+ "%s image %s doesn't exist" % (itype, image_path))
+
+ def test_useradd_static(self):
+ config = """
+USERADDEXTENSION = "useradd-staticids"
+USERADD_ERROR_DYNAMIC = "skip"
+USERADD_UID_TABLES += "files/static-passwd"
+USERADD_GID_TABLES += "files/static-group"
+"""
+ self.write_config(config)
+ bitbake("core-image-base")
+
+ def test_no_busybox_base_utils(self):
+ config = """
+# Enable x11
+DISTRO_FEATURES_append += "x11"
+
+# Switch to systemd
+DISTRO_FEATURES += "systemd"
+VIRTUAL-RUNTIME_init_manager = "systemd"
+VIRTUAL-RUNTIME_initscripts = ""
+VIRTUAL-RUNTIME_syslog = ""
+VIRTUAL-RUNTIME_login_manager = "shadow-base"
+DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
+
+# Replace busybox
+PREFERRED_PROVIDER_virtual/base-utils = "packagegroup-core-base-utils"
+VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
+VIRTUAL-RUNTIME_base-utils-hwclock = "util-linux-hwclock"
+VIRTUAL-RUNTIME_base-utils-syslog = ""
+
+# Blacklist busybox
+PNBLACKLIST[busybox] = "Don't build this"
+"""
+ self.write_config(config)
+
+ bitbake("--graphviz core-image-sato")
diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
new file mode 100644
index 0000000000..3eabd79097
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
@@ -0,0 +1,135 @@
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class IncompatibleLicenseTests(OESelftestTestCase):
+
+ def lic_test(self, pn, pn_lic, lic):
+ error_msg = 'ERROR: Nothing PROVIDES \'%s\'\n%s was skipped: it has incompatible license(s): %s' % (pn, pn, pn_lic)
+
+ self.write_config("INCOMPATIBLE_LICENSE += \"%s\"" % (lic))
+
+ result = bitbake('%s --dry-run' % (pn), ignore_status=True)
+ if error_msg not in result.output:
+ raise AssertionError(result.output)
+
+ # Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
+ # cannot be built when INCOMPATIBLE_LICENSE contains this SPDX license
+ def test_incompatible_spdx_license(self):
+ self.lic_test('incompatible-license', 'GPL-3.0', 'GPL-3.0')
+
+ # Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
+ # cannot be built when INCOMPATIBLE_LICENSE contains an alias (in
+ # SPDXLICENSEMAP) of this SPDX license
+ def test_incompatible_alias_spdx_license(self):
+ self.lic_test('incompatible-license', 'GPL-3.0', 'GPLv3')
+
+ # Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
+ # cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded license
+ # matching this SPDX license
+ def test_incompatible_spdx_license_wildcard(self):
+ self.lic_test('incompatible-license', 'GPL-3.0', '*GPL-3.0')
+
+ # Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
+ # cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded alias
+ # license matching this SPDX license
+ def test_incompatible_alias_spdx_license_wildcard(self):
+ self.lic_test('incompatible-license', 'GPL-3.0', '*GPLv3')
+
+ # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
+ # license cannot be built when INCOMPATIBLE_LICENSE contains this SPDX
+ # license
+ def test_incompatible_spdx_license_alias(self):
+ self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPL-3.0')
+
+ # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
+ # license cannot be built when INCOMPATIBLE_LICENSE contains this alias
+ def test_incompatible_alias_spdx_license_alias(self):
+ self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPLv3')
+
+ # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
+ # license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded
+ # license matching this SPDX license
+ def test_incompatible_spdx_license_alias_wildcard(self):
+ self.lic_test('incompatible-license-alias', 'GPL-3.0', '*GPL-3.0')
+
+ # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
+ # license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded
+ # alias license matching the SPDX license
+ def test_incompatible_alias_spdx_license_alias_wildcard(self):
+ self.lic_test('incompatible-license-alias', 'GPL-3.0', '*GPLv3')
+
+ # Verify that a package with multiple SPDX licenses (from
+ # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains
+ # some of them
+ def test_incompatible_spdx_licenses(self):
+ self.lic_test('incompatible-licenses', 'GPL-3.0 LGPL-3.0', 'GPL-3.0 LGPL-3.0')
+
+ # Verify that a package with multiple SPDX licenses (from
+ # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a
+ # wildcard to some of them
+ def test_incompatible_spdx_licenses_wildcard(self):
+ self.lic_test('incompatible-licenses', 'GPL-3.0 LGPL-3.0', '*GPL-3.0')
+
+ # Verify that a package with multiple SPDX licenses (from
+ # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a
+ # wildcard matching all licenses
+ def test_incompatible_all_licenses_wildcard(self):
+ self.lic_test('incompatible-licenses', 'GPL-2.0 GPL-3.0 LGPL-3.0', '*')
+
+ # Verify that a package with a non-SPDX license (neither in
+ # AVAILABLE_LICENSES nor in SPDXLICENSEMAP) cannot be built when
+ # INCOMPATIBLE_LICENSE contains this license
+ def test_incompatible_nonspdx_license(self):
+ self.lic_test('incompatible-nonspdx-license', 'FooLicense', 'FooLicense')
+
+class IncompatibleLicensePerImageTests(OESelftestTestCase):
+ def default_config(self):
+ return """
+IMAGE_INSTALL_append = "bash"
+INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
+"""
+
+ def test_bash_default(self):
+ self.write_config(self.default_config())
+ error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0+"
+
+ result = bitbake('core-image-minimal', ignore_status=True)
+ if error_msg not in result.output:
+ raise AssertionError(result.output)
+
+ def test_bash_and_license(self):
+ self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " & SomeLicense"')
+ error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0+"
+
+ result = bitbake('core-image-minimal', ignore_status=True)
+ if error_msg not in result.output:
+ raise AssertionError(result.output)
+
+ def test_bash_or_license(self):
+ self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " | SomeLicense"')
+
+ bitbake('core-image-minimal')
+
+ def test_bash_whitelist(self):
+ self.write_config(self.default_config() + '\nWHITELIST_GPL-3.0_pn-core-image-minimal = "bash"')
+
+ bitbake('core-image-minimal')
+
+class NoGPL3InImagesTests(OESelftestTestCase):
+ def test_core_image_minimal(self):
+ self.write_config("""
+INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
+""")
+ bitbake('core-image-minimal')
+
+ def test_core_image_full_cmdline(self):
+ self.write_config("""
+INHERIT += "testimage"\n
+INCOMPATIBLE_LICENSE_pn-core-image-full-cmdline = "GPL-3.0 LGPL-3.0"\n
+RDEPENDS_packagegroup-core-full-cmdline-utils_remove = "bash bc coreutils cpio ed findutils gawk grep mc mc-fish mc-helpers mc-helpers-perl sed tar time"\n
+RDEPENDS_packagegroup-core-full-cmdline-dev-utils_remove = "diffutils m4 make patch"\n
+RDEPENDS_packagegroup-core-full-cmdline-multiuser_remove = "gzip"\n
+""")
+ bitbake('core-image-full-cmdline')
+ bitbake('-c testimage core-image-full-cmdline')
+
diff --git a/meta/lib/oeqa/selftest/cases/kerneldevelopment.py b/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
new file mode 100644
index 0000000000..a61876ee61
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
@@ -0,0 +1,67 @@
+import os
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, get_bb_var
+from oeqa.utils.git import GitRepo
+
+class KernelDev(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(KernelDev, cls).setUpClass()
+ # Create the recipe directory structure inside the created layer
+ cls.layername = 'meta-kerneltest'
+ runCmd('bitbake-layers create-layer %s' % cls.layername)
+ runCmd('mkdir -p %s/recipes-kernel/linux/linux-yocto' % cls.layername)
+ cls.recipes_linuxyocto_dir = os.path.join \
+ (cls.builddir, cls.layername, 'recipes-kernel', 'linux', 'linux-yocto')
+ cls.recipeskernel_dir = os.path.dirname(cls.recipes_linuxyocto_dir)
+ runCmd('bitbake-layers add-layer %s' % cls.layername)
+
+ @classmethod
+ def tearDownClass(cls):
+ runCmd('bitbake-layers remove-layer %s' % cls.layername, ignore_status=True)
+ runCmd('rm -rf %s' % cls.layername)
+ super(KernelDev, cls).tearDownClass()
+
+ def setUp(self):
+ super(KernelDev, self).setUp()
+ self.set_machine_config('MACHINE = "qemux86-64"\n')
+
+ def test_apply_patches(self):
+ """
+ Summary: Able to apply a single patch to the Linux kernel source
+ Expected: The README file should exist and the patch changes should be
+ displayed at the end of the file.
+ Product: Kernel Development
+ Author: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
+ AutomatedBy: Mazliana Mohamad <mazliana.mohamad@intel.com>
+ """
+ runCmd('bitbake virtual/kernel -c patch')
+ kernel_source = get_bb_var('STAGING_KERNEL_DIR')
+ readme = os.path.join(kernel_source, 'README')
+
+ # This test step adds modified file 'README' to git and creates a
+ # patch file '0001-KERNEL_DEV_TEST_CASE.patch' at the same location as file
+ patch_content = 'This is a test to apply a patch to the kernel'
+ with open(readme, 'a+') as f:
+ f.write(patch_content)
+ repo = GitRepo('%s' % kernel_source, is_topdir=True)
+ repo.run_cmd('add %s' % readme)
+ repo.run_cmd(['commit', '-m', 'KERNEL_DEV_TEST_CASE'])
+ repo.run_cmd(['format-patch', '-1'])
+ patch_name = '0001-KERNEL_DEV_TEST_CASE.patch'
+ patchpath = os.path.join(kernel_source, patch_name)
+ runCmd('mv %s %s' % (patchpath, self.recipes_linuxyocto_dir))
+ runCmd('rm %s ' % readme)
+ self.assertFalse(os.path.exists(readme))
+
+ recipe_append = os.path.join(self.recipeskernel_dir, 'linux-yocto_%.bbappend')
+ with open(recipe_append, 'w+') as fh:
+ fh.write('SRC_URI += "file://%s"\n' % patch_name)
+ fh.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"')
+
+ runCmd('bitbake virtual/kernel -c clean')
+ runCmd('bitbake virtual/kernel -c patch')
+ self.assertTrue(os.path.exists(readme))
+ result = runCmd('tail -n 1 %s' % readme)
+ self.assertEqual(result.output, patch_content)
diff --git a/meta/lib/oeqa/selftest/layerappend.py b/meta/lib/oeqa/selftest/cases/layerappend.py
index 4de5034a94..05e9426fc6 100644
--- a/meta/lib/oeqa/selftest/layerappend.py
+++ b/meta/lib/oeqa/selftest/cases/layerappend.py
@@ -1,15 +1,14 @@
-import unittest
+#
+# SPDX-License-Identifier: MIT
+#
+
import os
-import logging
-import re
-from oeqa.selftest.base import oeSelfTest
-from oeqa.selftest.buildhistory import BuildhistoryBase
+from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
import oeqa.utils.ftools as ftools
-from oeqa.utils.decorators import testcase
-class LayerAppendTests(oeSelfTest):
+class LayerAppendTests(OESelftestTestCase):
layerconf = """
# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"
@@ -44,18 +43,18 @@ sysroot_stage_all_append() {
append2 = """
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI_append += "file://appendtest.txt"
+SRC_URI_append = " file://appendtest.txt"
"""
layerappend = ''
def tearDownLocal(self):
if self.layerappend:
ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
+ super(LayerAppendTests, self).tearDownLocal()
- @testcase(1196)
def test_layer_appends(self):
corebase = get_bb_var("COREBASE")
- stagingdir = get_bb_var("STAGING_DIR_TARGET")
+
for l in ["0", "1", "2"]:
layer = os.path.join(corebase, "meta-layertest" + l)
self.assertFalse(os.path.exists(layer))
@@ -83,6 +82,7 @@ SRC_URI_append += "file://appendtest.txt"
self.layerappend = "BBLAYERS += \"{0}/meta-layertest0 {0}/meta-layertest1 {0}/meta-layertest2\"".format(corebase)
ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
+ stagingdir = get_bb_var("SYSROOT_DESTDIR", "layerappendtest")
bitbake("layerappendtest")
data = ftools.read_file(stagingdir + "/appendtest.txt")
self.assertEqual(data, "Layer 2 test")
@@ -95,5 +95,3 @@ SRC_URI_append += "file://appendtest.txt"
bitbake("layerappendtest")
data = ftools.read_file(stagingdir + "/appendtest.txt")
self.assertEqual(data, "Layer 2 test")
-
-
diff --git a/meta/lib/oeqa/selftest/liboe.py b/meta/lib/oeqa/selftest/cases/liboe.py
index 35131eb240..afe8f8809f 100644
--- a/meta/lib/oeqa/selftest/liboe.py
+++ b/meta/lib/oeqa/selftest/cases/liboe.py
@@ -1,11 +1,19 @@
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import get_bb_var, bitbake, runCmd
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import get_bb_var, get_bb_vars, bitbake, runCmd
import oe.path
-import glob
import os
-import os.path
-class LibOE(oeSelfTest):
+class LibOE(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(LibOE, cls).setUpClass()
+ cls.tmp_dir = get_bb_var('TMPDIR')
+
def test_copy_tree_special(self):
"""
Summary: oe.path.copytree() should copy files with special character
@@ -14,8 +22,7 @@ class LibOE(oeSelfTest):
Product: OE-Core
Author: Joshua Lock <joshua.g.lock@intel.com>
"""
- tmp_dir = get_bb_var('TMPDIR')
- testloc = oe.path.join(tmp_dir, 'liboetests')
+ testloc = oe.path.join(self.tmp_dir, 'liboetests')
src = oe.path.join(testloc, 'src')
dst = oe.path.join(testloc, 'dst')
bb.utils.mkdirhier(testloc)
@@ -40,8 +47,7 @@ class LibOE(oeSelfTest):
Product: OE-Core
Author: Joshua Lock <joshua.g.lock@intel.com>
"""
- tmp_dir = get_bb_var('TMPDIR')
- testloc = oe.path.join(tmp_dir, 'liboetests')
+ testloc = oe.path.join(self.tmp_dir, 'liboetests')
src = oe.path.join(testloc, 'src')
dst = oe.path.join(testloc, 'dst')
bb.utils.mkdirhier(testloc)
@@ -50,7 +56,11 @@ class LibOE(oeSelfTest):
# ensure we have setfattr available
bitbake("attr-native")
- bindir = get_bb_var('STAGING_BINDIR_NATIVE')
+
+ bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'attr-native')
+ destdir = bb_vars['SYSROOT_DESTDIR']
+ bindir = bb_vars['bindir']
+ bindir = destdir + bindir
# create a file with xattr and copy it
open(oe.path.join(src, testfilename), 'w+b').close()
@@ -70,8 +80,7 @@ class LibOE(oeSelfTest):
Product: OE-Core
Author: Joshua Lock <joshua.g.lock@intel.com>
"""
- tmp_dir = get_bb_var('TMPDIR')
- testloc = oe.path.join(tmp_dir, 'liboetests')
+ testloc = oe.path.join(self.tmp_dir, 'liboetests')
src = oe.path.join(testloc, 'src')
dst = oe.path.join(testloc, 'dst')
bb.utils.mkdirhier(testloc)
diff --git a/meta/lib/oeqa/selftest/cases/lic_checksum.py b/meta/lib/oeqa/selftest/cases/lic_checksum.py
new file mode 100644
index 0000000000..bae935d697
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/lic_checksum.py
@@ -0,0 +1,38 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import tempfile
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+from oeqa.utils import CommandError
+
+class LicenseTests(OESelftestTestCase):
+
+ # Verify that changing a license file that has an absolute path causes
+ # the license qa to fail due to a mismatched md5sum.
+ def test_nonmatching_checksum(self):
+ bitbake_cmd = '-c populate_lic emptytest'
+ error_msg = 'emptytest: The new md5 checksum is 8d777f385d3dfec8815d20f7496026dc'
+
+ lic_file, lic_path = tempfile.mkstemp()
+ os.close(lic_file)
+ self.track_for_cleanup(lic_path)
+
+ self.write_config("INHERIT_remove = \"report-error\"")
+
+ self.write_recipeinc('emptytest', """
+INHIBIT_DEFAULT_DEPS = "1"
+LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"
+SRC_URI = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"
+""" % (lic_path, lic_path))
+ result = bitbake(bitbake_cmd)
+
+ with open(lic_path, "w") as f:
+ f.write("data")
+
+ result = bitbake(bitbake_cmd, ignore_status=True)
+ if error_msg not in result.output:
+ raise AssertionError(result.output)
diff --git a/meta/lib/oeqa/selftest/manifest.py b/meta/lib/oeqa/selftest/cases/manifest.py
index 44d0404c5d..5d13f35468 100644
--- a/meta/lib/oeqa/selftest/manifest.py
+++ b/meta/lib/oeqa/selftest/cases/manifest.py
@@ -1,9 +1,11 @@
-import unittest
+#
+# SPDX-License-Identifier: MIT
+#
+
import os
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import get_bb_var, bitbake
-from oeqa.utils.decorators import testcase
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import get_bb_var, get_bb_vars, bitbake
class ManifestEntry:
'''A manifest item of a collection able to list missing packages'''
@@ -11,7 +13,7 @@ class ManifestEntry:
self.file = entry
self.missing = []
-class VerifyManifest(oeSelfTest):
+class VerifyManifest(OESelftestTestCase):
'''Tests for the manifest files and contents of an image'''
@classmethod
@@ -21,14 +23,14 @@ class VerifyManifest(oeSelfTest):
with open(manifest, "r") as mfile:
for line in mfile:
manifest_entry = os.path.join(path, line.split()[0])
- self.log.debug("{}: looking for {}"\
+ self.logger.debug("{}: looking for {}"\
.format(self.classname, manifest_entry))
if not os.path.isfile(manifest_entry):
manifest_errors.append(manifest_entry)
- self.log.debug("{}: {} not found"\
+ self.logger.debug("{}: {} not found"\
.format(self.classname, manifest_entry))
except OSError as e:
- self.log.debug("{}: checking of {} failed"\
+ self.logger.debug("{}: checking of {} failed"\
.format(self.classname, manifest))
raise e
@@ -40,7 +42,7 @@ class VerifyManifest(oeSelfTest):
target == self.buildtarget if target == None else target
directory = get_bb_var(bb_var, target);
if not directory or not os.path.isdir(directory):
- self.log.debug("{}: {} points to {} when target = {}"\
+ self.logger.debug("{}: {} points to {} when target = {}"\
.format(self.classname, bb_var, directory, target))
raise OSError
return directory
@@ -48,18 +50,18 @@ class VerifyManifest(oeSelfTest):
@classmethod
def setUpClass(self):
+ super(VerifyManifest, self).setUpClass()
self.buildtarget = 'core-image-minimal'
self.classname = 'VerifyManifest'
- self.log.info("{}: doing bitbake {} as a prerequisite of the test"\
+ self.logger.info("{}: doing bitbake {} as a prerequisite of the test"\
.format(self.classname, self.buildtarget))
if bitbake(self.buildtarget).status:
- self.log.debug("{} Failed to setup {}"\
+ self.logger.debug("{} Failed to setup {}"\
.format(self.classname, self.buildtarget))
- unittest.SkipTest("{}: Cannot setup testing scenario"\
+ self.skipTest("{}: Cannot setup testing scenario"\
.format(self.classname))
- @testcase(1380)
def test_SDK_manifest_entries(self):
'''Verifying the SDK manifest entries exist, this may take a build'''
@@ -67,12 +69,12 @@ class VerifyManifest(oeSelfTest):
# to do an additional setup for the sdk
sdktask = '-c populate_sdk'
bbargs = sdktask + ' ' + self.buildtarget
- self.log.debug("{}: doing bitbake {} as a prerequisite of the test"\
+ self.logger.debug("{}: doing bitbake {} as a prerequisite of the test"\
.format(self.classname, bbargs))
if bitbake(bbargs).status:
- self.log.debug("{} Failed to bitbake {}"\
+ self.logger.debug("{} Failed to bitbake {}"\
.format(self.classname, bbargs))
- unittest.SkipTest("{}: Cannot setup testing scenario"\
+ self.skipTest("{}: Cannot setup testing scenario"\
.format(self.classname))
@@ -84,13 +86,11 @@ class VerifyManifest(oeSelfTest):
try:
mdir = self.get_dir_from_bb_var('SDK_DEPLOY', self.buildtarget)
for k in d_target.keys():
- mfilename[k] = "{}-toolchain-{}.{}.manifest".format(
- get_bb_var("SDK_NAME", self.buildtarget),
- get_bb_var("SDK_VERSION", self.buildtarget),
- k)
+ toolchain_outputname = get_bb_var('TOOLCHAIN_OUTPUTNAME', self.buildtarget)
+ mfilename[k] = "{}.{}.manifest".format(toolchain_outputname, k)
mpath[k] = os.path.join(mdir, mfilename[k])
if not os.path.isfile(mpath[k]):
- self.log.debug("{}: {} does not exist".format(
+ self.logger.debug("{}: {} does not exist".format(
self.classname, mpath[k]))
raise IOError
m_entry[k] = ManifestEntry(mpath[k])
@@ -100,11 +100,11 @@ class VerifyManifest(oeSelfTest):
reverse_dir[k] = os.path.join(pkgdata_dir[k],
'runtime-reverse')
if not os.path.exists(reverse_dir[k]):
- self.log.debug("{}: {} does not exist".format(
+ self.logger.debug("{}: {} does not exist".format(
self.classname, reverse_dir[k]))
raise IOError
except OSError:
- raise unittest.SkipTest("{}: Error in obtaining manifest dirs"\
+ raise self.skipTest("{}: Error in obtaining manifest dirs"\
.format(self.classname))
except IOError:
msg = "{}: Error cannot find manifests in the specified dir:\n{}"\
@@ -112,7 +112,7 @@ class VerifyManifest(oeSelfTest):
self.fail(msg)
for k in d_target.keys():
- self.log.debug("{}: Check manifest {}".format(
+ self.logger.debug("{}: Check manifest {}".format(
self.classname, m_entry[k].file))
m_entry[k].missing = self.check_manifest_entries(\
@@ -121,11 +121,10 @@ class VerifyManifest(oeSelfTest):
msg = '{}: {} Error has the following missing entries'\
.format(self.classname, m_entry[k].file)
logmsg = msg+':\n'+'\n'.join(m_entry[k].missing)
- self.log.debug(logmsg)
- self.log.info(msg)
+ self.logger.debug(logmsg)
+ self.logger.info(msg)
self.fail(logmsg)
- @testcase(1381)
def test_image_manifest_entries(self):
'''Verifying the image manifest entries exist'''
@@ -145,14 +144,14 @@ class VerifyManifest(oeSelfTest):
revdir = os.path.join(pkgdata_dir, 'runtime-reverse')
if not os.path.exists(revdir): raise IOError
except OSError:
- raise unittest.SkipTest("{}: Error in obtaining manifest dirs"\
+ raise self.skipTest("{}: Error in obtaining manifest dirs"\
.format(self.classname))
except IOError:
msg = "{}: Error cannot find manifests in dir:\n{}"\
.format(self.classname, mdir)
self.fail(msg)
- self.log.debug("{}: Check manifest {}"\
+ self.logger.debug("{}: Check manifest {}"\
.format(self.classname, m_entry.file))
m_entry.missing = self.check_manifest_entries(\
m_entry.file, revdir)
@@ -160,6 +159,6 @@ class VerifyManifest(oeSelfTest):
msg = '{}: {} Error has the following missing entries'\
.format(self.classname, m_entry.file)
logmsg = msg+':\n'+'\n'.join(m_entry.missing)
- self.log.debug(logmsg)
- self.log.info(msg)
+ self.logger.debug(logmsg)
+ self.logger.info(msg)
self.fail(logmsg)
diff --git a/meta/lib/oeqa/selftest/cases/meta_ide.py b/meta/lib/oeqa/selftest/cases/meta_ide.py
new file mode 100644
index 0000000000..03901a2f32
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/meta_ide.py
@@ -0,0 +1,51 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
+from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
+from oeqa.core.decorator import OETestTag
+import tempfile
+import shutil
+
+@OETestTag("machine")
+class MetaIDE(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(MetaIDE, cls).setUpClass()
+ bitbake('meta-ide-support')
+ bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'TMPDIR', 'COREBASE'])
+ cls.environment_script = 'environment-setup-%s' % bb_vars['MULTIMACH_TARGET_SYS']
+ cls.tmpdir = bb_vars['TMPDIR']
+ cls.environment_script_path = '%s/%s' % (cls.tmpdir, cls.environment_script)
+ cls.corebasedir = bb_vars['COREBASE']
+ cls.tmpdir_metaideQA = tempfile.mkdtemp(prefix='metaide')
+
+ @classmethod
+ def tearDownClass(cls):
+ shutil.rmtree(cls.tmpdir_metaideQA, ignore_errors=True)
+ super(MetaIDE, cls).tearDownClass()
+
+ def test_meta_ide_had_installed_meta_ide_support(self):
+ self.assertExists(self.environment_script_path)
+
+ def test_meta_ide_can_compile_c_program(self):
+ runCmd('cp %s/test.c %s' % (self.tc.files_dir, self.tmpdir_metaideQA))
+ runCmd("cd %s; . %s; $CC test.c -lm" % (self.tmpdir_metaideQA, self.environment_script_path))
+ compiled_file = '%s/a.out' % self.tmpdir_metaideQA
+ self.assertExists(compiled_file)
+
+ def test_meta_ide_can_build_cpio_project(self):
+ dl_dir = self.td.get('DL_DIR', None)
+ self.project = SDKBuildProject(self.tmpdir_metaideQA + "/cpio/", self.environment_script_path,
+ "https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.gz",
+ self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
+ self.project.download_archive()
+ self.assertEqual(self.project.run_configure(), 0,
+ msg="Running configure failed")
+ self.assertEqual(self.project.run_make(), 0,
+ msg="Running make failed")
+ self.assertEqual(self.project.run_install(), 0,
+ msg="Running make install failed")
diff --git a/meta/lib/oeqa/selftest/cases/multiconfig.py b/meta/lib/oeqa/selftest/cases/multiconfig.py
new file mode 100644
index 0000000000..39b92f2439
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/multiconfig.py
@@ -0,0 +1,72 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import textwrap
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class MultiConfig(OESelftestTestCase):
+
+ def test_multiconfig(self):
+ """
+ Test that a simple multiconfig build works. This uses the mcextend class and the
+ multiconfig-image-packager test recipe to build a core-image-full-cmdline image which
+ contains a tiny core-image-minimal and a musl core-image-minimal, installed as packages.
+ """
+
+ config = """
+IMAGE_INSTALL_append_pn-core-image-full-cmdline = " multiconfig-image-packager-tiny multiconfig-image-packager-musl"
+BBMULTICONFIG = "tiny musl"
+"""
+ self.write_config(config)
+
+ muslconfig = """
+MACHINE = "qemux86-64"
+DISTRO = "poky"
+TCLIBC = "musl"
+TMPDIR = "${TOPDIR}/tmp-mc-musl"
+"""
+ self.write_config(muslconfig, 'musl')
+
+ tinyconfig = """
+MACHINE = "qemux86"
+DISTRO = "poky-tiny"
+TMPDIR = "${TOPDIR}/tmp-mc-tiny"
+"""
+ self.write_config(tinyconfig, 'tiny')
+
+ # Build a core-image-minimal
+ bitbake('core-image-full-cmdline')
+
+ def test_multiconfig_reparse(self):
+ """
+ Test that changes to a multiconfig conf file are correctly detected and
+ cause a reparse/rebuild of a recipe.
+ """
+ config = textwrap.dedent('''\
+ MCTESTVAR = "test"
+ BBMULTICONFIG = "test"
+ ''')
+ self.write_config(config)
+
+ testconfig = textwrap.dedent('''\
+ MCTESTVAR_append = "1"
+ ''')
+ self.write_config(testconfig, 'test')
+
+ # Check that the 1) the task executed and 2) that it output the correct
+ # value. Note "bitbake -e" is not used because it always reparses the
+ # recipe and we want to ensure that the automatic reparsing and parse
+ # caching is detected.
+ result = bitbake('mc:test:multiconfig-test-parse -c showvar')
+ self.assertIn('MCTESTVAR=test1', result.output.splitlines())
+
+ testconfig = textwrap.dedent('''\
+ MCTESTVAR_append = "2"
+ ''')
+ self.write_config(testconfig, 'test')
+
+ result = bitbake('mc:test:multiconfig-test-parse -c showvar')
+ self.assertIn('MCTESTVAR=test2', result.output.splitlines())
diff --git a/meta/lib/oeqa/selftest/cases/oelib/__init__.py b/meta/lib/oeqa/selftest/cases/oelib/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oelib/__init__.py
diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
new file mode 100644
index 0000000000..6d80827652
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
@@ -0,0 +1,99 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+from oeqa.selftest.case import OESelftestTestCase
+import tempfile
+from oeqa.utils.commands import get_bb_var
+
+class TestBlobParsing(OESelftestTestCase):
+
+ def setUp(self):
+ import time
+ self.repo_path = tempfile.mkdtemp(prefix='selftest-buildhistory',
+ dir=get_bb_var('TOPDIR'))
+
+ try:
+ from git import Repo
+ self.repo = Repo.init(self.repo_path)
+ except ImportError:
+ self.skipTest('Python module GitPython is not present')
+
+ self.test_file = "test"
+ self.var_map = {}
+
+ def tearDown(self):
+ import shutil
+ shutil.rmtree(self.repo_path)
+
+ def commit_vars(self, to_add={}, to_remove = [], msg="A commit message"):
+ if len(to_add) == 0 and len(to_remove) == 0:
+ return
+
+ for k in to_remove:
+ self.var_map.pop(x,None)
+ for k in to_add:
+ self.var_map[k] = to_add[k]
+
+ with open(os.path.join(self.repo_path, self.test_file), 'w') as repo_file:
+ for k in self.var_map:
+ repo_file.write("%s = %s\n" % (k, self.var_map[k]))
+
+ self.repo.git.add("--all")
+ self.repo.git.commit(message=msg)
+
+ def test_blob_to_dict(self):
+ """
+ Test convertion of git blobs to dictionary
+ """
+ from oe.buildhistory_analysis import blob_to_dict
+ valuesmap = { "foo" : "1", "bar" : "2" }
+ self.commit_vars(to_add = valuesmap)
+
+ blob = self.repo.head.commit.tree.blobs[0]
+ self.assertEqual(valuesmap, blob_to_dict(blob),
+ "commit was not translated correctly to dictionary")
+
+ def test_compare_dict_blobs(self):
+ """
+ Test comparisson of dictionaries extracted from git blobs
+ """
+ from oe.buildhistory_analysis import compare_dict_blobs
+
+ changesmap = { "foo-2" : ("2", "8"), "bar" : ("","4"), "bar-2" : ("","5")}
+
+ self.commit_vars(to_add = { "foo" : "1", "foo-2" : "2", "foo-3" : "3" })
+ blob1 = self.repo.heads.master.commit.tree.blobs[0]
+
+ self.commit_vars(to_add = { "foo-2" : "8", "bar" : "4", "bar-2" : "5" })
+ blob2 = self.repo.heads.master.commit.tree.blobs[0]
+
+ change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file),
+ blob1, blob2, False, False)
+
+ var_changes = { x.fieldname : (x.oldvalue, x.newvalue) for x in change_records}
+ self.assertEqual(changesmap, var_changes, "Changes not reported correctly")
+
+ def test_compare_dict_blobs_default(self):
+ """
+ Test default values for comparisson of git blob dictionaries
+ """
+ from oe.buildhistory_analysis import compare_dict_blobs
+ defaultmap = { x : ("default", "1") for x in ["PKG", "PKGE", "PKGV", "PKGR"]}
+
+ self.commit_vars(to_add = { "foo" : "1" })
+ blob1 = self.repo.heads.master.commit.tree.blobs[0]
+
+ self.commit_vars(to_add = { "PKG" : "1", "PKGE" : "1", "PKGV" : "1", "PKGR" : "1" })
+ blob2 = self.repo.heads.master.commit.tree.blobs[0]
+
+ change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file),
+ blob1, blob2, False, False)
+
+ var_changes = {}
+ for x in change_records:
+ oldvalue = "default" if ("default" in x.oldvalue) else x.oldvalue
+ var_changes[x.fieldname] = (oldvalue, x.newvalue)
+
+ self.assertEqual(defaultmap, var_changes, "Defaults not set properly")
diff --git a/meta/lib/oeqa/selftest/cases/oelib/elf.py b/meta/lib/oeqa/selftest/cases/oelib/elf.py
new file mode 100644
index 0000000000..d0a28090f2
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oelib/elf.py
@@ -0,0 +1,26 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from unittest.case import TestCase
+import oe.qa
+
+class TestElf(TestCase):
+ def test_machine_name(self):
+ """
+ Test elf_machine_to_string()
+ """
+ self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
+ self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
+ self.assertEqual(oe.qa.elf_machine_to_string(0xF7), "BPF")
+
+ self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)")
+ self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
+ self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")
diff --git a/meta/lib/oeqa/selftest/cases/oelib/license.py b/meta/lib/oeqa/selftest/cases/oelib/license.py
new file mode 100644
index 0000000000..6ebbee589f
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oelib/license.py
@@ -0,0 +1,103 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from unittest.case import TestCase
+import oe.license
+
+class SeenVisitor(oe.license.LicenseVisitor):
+ def __init__(self):
+ self.seen = []
+ oe.license.LicenseVisitor.__init__(self)
+
+ def visit_Str(self, node):
+ self.seen.append(node.s)
+
+class TestSingleLicense(TestCase):
+ licenses = [
+ "GPLv2",
+ "LGPL-2.0",
+ "Artistic",
+ "MIT",
+ "GPLv3+",
+ "FOO_BAR",
+ ]
+ invalid_licenses = ["GPL/BSD"]
+
+ @staticmethod
+ def parse(licensestr):
+ visitor = SeenVisitor()
+ visitor.visit_string(licensestr)
+ return visitor.seen
+
+ def test_single_licenses(self):
+ for license in self.licenses:
+ licenses = self.parse(license)
+ self.assertListEqual(licenses, [license])
+
+ def test_invalid_licenses(self):
+ for license in self.invalid_licenses:
+ with self.assertRaises(oe.license.InvalidLicense) as cm:
+ self.parse(license)
+ self.assertEqual(cm.exception.license, license)
+
+class TestSimpleCombinations(TestCase):
+ tests = {
+ "FOO&BAR": ["FOO", "BAR"],
+ "BAZ & MOO": ["BAZ", "MOO"],
+ "ALPHA|BETA": ["ALPHA"],
+ "BAZ&MOO|FOO": ["FOO"],
+ "FOO&BAR|BAZ": ["FOO", "BAR"],
+ }
+ preferred = ["ALPHA", "FOO", "BAR"]
+
+ def test_tests(self):
+ def choose(a, b):
+ if all(lic in self.preferred for lic in b):
+ return b
+ else:
+ return a
+
+ for license, expected in self.tests.items():
+ licenses = oe.license.flattened_licenses(license, choose)
+ self.assertListEqual(licenses, expected)
+
+class TestComplexCombinations(TestSimpleCombinations):
+ tests = {
+ "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"],
+ "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"],
+ "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"],
+ "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-clause", "MIT"],
+ }
+ preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"]
+
+class TestIsIncluded(TestCase):
+ tests = {
+ ("FOO | BAR", None, None):
+ [True, ["FOO"]],
+ ("FOO | BAR", None, "FOO"):
+ [True, ["BAR"]],
+ ("FOO | BAR", "BAR", None):
+ [True, ["BAR"]],
+ ("FOO | BAR & FOOBAR", "*BAR", None):
+ [True, ["BAR", "FOOBAR"]],
+ ("FOO | BAR & FOOBAR", None, "FOO*"):
+ [False, ["FOOBAR"]],
+ ("(FOO | BAR) & FOOBAR | BARFOO", None, "FOO"):
+ [True, ["BAR", "FOOBAR"]],
+ ("(FOO | BAR) & FOOBAR | BAZ & MOO & BARFOO", None, "FOO"):
+ [True, ["BAZ", "MOO", "BARFOO"]],
+ ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, None):
+ [True, ["GPL-3.0", "GPL-2.0", "LGPL-2.1"]],
+ ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, "GPL-3.0"):
+ [True, ["Proprietary"]],
+ ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, "GPL-3.0 Proprietary"):
+ [False, ["GPL-3.0"]]
+ }
+
+ def test_tests(self):
+ for args, expected in self.tests.items():
+ is_included, licenses = oe.license.is_included(
+ args[0], (args[1] or '').split(), (args[2] or '').split())
+ self.assertEqual(is_included, expected[0])
+ self.assertListEqual(licenses, expected[1])
diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py
new file mode 100644
index 0000000000..a1cfa08c09
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
@@ -0,0 +1,89 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from unittest.case import TestCase
+import oe, oe.path
+import tempfile
+import os
+import errno
+import shutil
+
+class TestRealPath(TestCase):
+ DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm" ]
+ FILES = [ "etc/passwd", "b/file" ]
+ LINKS = [
+ ( "bin", "/usr/bin", "/usr/bin" ),
+ ( "binX", "usr/binX", "/usr/binX" ),
+ ( "c", "broken", "/broken" ),
+ ( "etc/passwd-1", "passwd", "/etc/passwd" ),
+ ( "etc/passwd-2", "passwd-1", "/etc/passwd" ),
+ ( "etc/passwd-3", "/etc/passwd-1", "/etc/passwd" ),
+ ( "etc/shadow-1", "/etc/shadow", "/etc/shadow" ),
+ ( "etc/shadow-2", "/etc/shadow-1", "/etc/shadow" ),
+ ( "prog-A", "bin/prog-A", "/usr/bin/prog-A" ),
+ ( "prog-B", "/bin/prog-B", "/usr/bin/prog-B" ),
+ ( "usr/bin/prog-C", "../../sbin/prog-C", "/sbin/prog-C" ),
+ ( "usr/bin/prog-D", "/sbin/prog-D", "/sbin/prog-D" ),
+ ( "usr/binX/prog-E", "../sbin/prog-E", None ),
+ ( "usr/bin/prog-F", "../../../sbin/prog-F", "/sbin/prog-F" ),
+ ( "loop", "a/loop", None ),
+ ( "a/loop", "../loop", None ),
+ ( "b/test", "file/foo", "/b/file/foo" ),
+ ]
+
+ LINKS_PHYS = [
+ ( "./", "/", "" ),
+ ( "binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E" ),
+ ]
+
+ EXCEPTIONS = [
+ ( "loop", errno.ELOOP ),
+ ( "b/test", errno.ENOENT ),
+ ]
+
+ def setUp(self):
+ self.tmpdir = tempfile.mkdtemp(prefix = "oe-test_path")
+ self.root = os.path.join(self.tmpdir, "R")
+
+ os.mkdir(os.path.join(self.tmpdir, "_real"))
+ os.symlink("_real", self.root)
+
+ for d in self.DIRS:
+ os.mkdir(os.path.join(self.root, d))
+ for f in self.FILES:
+ open(os.path.join(self.root, f), "w")
+ for l in self.LINKS:
+ os.symlink(l[1], os.path.join(self.root, l[0]))
+
+ def tearDown(self):
+ shutil.rmtree(self.tmpdir)
+
+ def __realpath(self, file, use_physdir, assume_dir = True):
+ return oe.path.realpath(os.path.join(self.root, file), self.root,
+ use_physdir, assume_dir = assume_dir)
+
+ def test_norm(self):
+ for l in self.LINKS:
+ if l[2] == None:
+ continue
+
+ target_p = self.__realpath(l[0], True)
+ target_l = self.__realpath(l[0], False)
+
+ if l[2] != False:
+ self.assertEqual(target_p, target_l)
+ self.assertEqual(l[2], target_p[len(self.root):])
+
+ def test_phys(self):
+ for l in self.LINKS_PHYS:
+ target_p = self.__realpath(l[0], True)
+ target_l = self.__realpath(l[0], False)
+
+ self.assertEqual(l[1], target_p[len(self.root):])
+ self.assertEqual(l[2], target_l[len(self.root):])
+
+ def test_loop(self):
+ for e in self.EXCEPTIONS:
+ self.assertRaisesRegex(OSError, r'\[Errno %u\]' % e[1],
+ self.__realpath, e[0], False, False)
diff --git a/meta/lib/oeqa/selftest/cases/oelib/types.py b/meta/lib/oeqa/selftest/cases/oelib/types.py
new file mode 100644
index 0000000000..7eb49e6f95
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oelib/types.py
@@ -0,0 +1,54 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from unittest.case import TestCase
+from oe.maketype import create
+
+class TestBooleanType(TestCase):
+ def test_invalid(self):
+ self.assertRaises(ValueError, create, '', 'boolean')
+ self.assertRaises(ValueError, create, 'foo', 'boolean')
+ self.assertRaises(TypeError, create, object(), 'boolean')
+
+ def test_true(self):
+ self.assertTrue(create('y', 'boolean'))
+ self.assertTrue(create('yes', 'boolean'))
+ self.assertTrue(create('1', 'boolean'))
+ self.assertTrue(create('t', 'boolean'))
+ self.assertTrue(create('true', 'boolean'))
+ self.assertTrue(create('TRUE', 'boolean'))
+ self.assertTrue(create('truE', 'boolean'))
+
+ def test_false(self):
+ self.assertFalse(create('n', 'boolean'))
+ self.assertFalse(create('no', 'boolean'))
+ self.assertFalse(create('0', 'boolean'))
+ self.assertFalse(create('f', 'boolean'))
+ self.assertFalse(create('false', 'boolean'))
+ self.assertFalse(create('FALSE', 'boolean'))
+ self.assertFalse(create('faLse', 'boolean'))
+
+ def test_bool_equality(self):
+ self.assertEqual(create('n', 'boolean'), False)
+ self.assertNotEqual(create('n', 'boolean'), True)
+ self.assertEqual(create('y', 'boolean'), True)
+ self.assertNotEqual(create('y', 'boolean'), False)
+
+class TestList(TestCase):
+ def assertListEqual(self, value, valid, sep=None):
+ obj = create(value, 'list', separator=sep)
+ self.assertEqual(obj, valid)
+ if sep is not None:
+ self.assertEqual(obj.separator, sep)
+ self.assertEqual(str(obj), obj.separator.join(obj))
+
+ def test_list_nosep(self):
+ testlist = ['alpha', 'beta', 'theta']
+ self.assertListEqual('alpha beta theta', testlist)
+ self.assertListEqual('alpha beta\ttheta', testlist)
+ self.assertListEqual('alpha', ['alpha'])
+
+ def test_list_usersep(self):
+ self.assertListEqual('foo:bar', ['foo', 'bar'], ':')
+ self.assertListEqual('foo:bar:baz', ['foo', 'bar', 'baz'], ':')
diff --git a/meta/lib/oeqa/selftest/cases/oelib/utils.py b/meta/lib/oeqa/selftest/cases/oelib/utils.py
new file mode 100644
index 0000000000..a7214beb4c
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oelib/utils.py
@@ -0,0 +1,103 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import sys
+from unittest.case import TestCase
+from contextlib import contextmanager
+from io import StringIO
+from oe.utils import packages_filter_out_system, trim_version, multiprocess_launch
+
+class TestPackagesFilterOutSystem(TestCase):
+ def test_filter(self):
+ """
+ Test that oe.utils.packages_filter_out_system works.
+ """
+ try:
+ import bb
+ except ImportError:
+ self.skipTest("Cannot import bb")
+
+ d = bb.data_smart.DataSmart()
+ d.setVar("PN", "foo")
+
+ d.setVar("PACKAGES", "foo foo-doc foo-dev")
+ pkgs = packages_filter_out_system(d)
+ self.assertEqual(pkgs, [])
+
+ d.setVar("PACKAGES", "foo foo-doc foo-data foo-dev")
+ pkgs = packages_filter_out_system(d)
+ self.assertEqual(pkgs, ["foo-data"])
+
+ d.setVar("PACKAGES", "foo foo-locale-en-gb")
+ pkgs = packages_filter_out_system(d)
+ self.assertEqual(pkgs, [])
+
+ d.setVar("PACKAGES", "foo foo-data foo-locale-en-gb")
+ pkgs = packages_filter_out_system(d)
+ self.assertEqual(pkgs, ["foo-data"])
+
+
+class TestTrimVersion(TestCase):
+ def test_version_exception(self):
+ with self.assertRaises(TypeError):
+ trim_version(None, 2)
+ with self.assertRaises(TypeError):
+ trim_version((1, 2, 3), 2)
+
+ def test_num_exception(self):
+ with self.assertRaises(ValueError):
+ trim_version("1.2.3", 0)
+ with self.assertRaises(ValueError):
+ trim_version("1.2.3", -1)
+
+ def test_valid(self):
+ self.assertEqual(trim_version("1.2.3", 1), "1")
+ self.assertEqual(trim_version("1.2.3", 2), "1.2")
+ self.assertEqual(trim_version("1.2.3", 3), "1.2.3")
+ self.assertEqual(trim_version("1.2.3", 4), "1.2.3")
+
+
+class TestMultiprocessLaunch(TestCase):
+
+ def test_multiprocesslaunch(self):
+ import bb
+
+ def testfunction(item, d):
+ if item == "2" or item == "1":
+ raise KeyError("Invalid number %s" % item)
+ return "Found %s" % item
+
+ def dummyerror(msg):
+ print("ERROR: %s" % msg)
+ def dummyfatal(msg):
+ print("ERROR: %s" % msg)
+ raise bb.BBHandledException()
+
+ @contextmanager
+ def captured_output():
+ new_out, new_err = StringIO(), StringIO()
+ old_out, old_err = sys.stdout, sys.stderr
+ try:
+ sys.stdout, sys.stderr = new_out, new_err
+ yield sys.stdout, sys.stderr
+ finally:
+ sys.stdout, sys.stderr = old_out, old_err
+
+ d = bb.data_smart.DataSmart()
+ bb.error = dummyerror
+ bb.fatal = dummyfatal
+
+ # Assert the function returns the right results
+ result = multiprocess_launch(testfunction, ["3", "4", "5", "6"], d, extraargs=(d,))
+ self.assertIn("Found 3", result)
+ self.assertIn("Found 4", result)
+ self.assertIn("Found 5", result)
+ self.assertIn("Found 6", result)
+ self.assertEqual(len(result), 4)
+
+ # Assert the function prints exceptions
+ with captured_output() as (out, err):
+ self.assertRaises(bb.BBHandledException, multiprocess_launch, testfunction, ["1", "2", "3", "4", "5", "6"], d, extraargs=(d,))
+ self.assertIn("KeyError: 'Invalid number 1'", out.getvalue())
+ self.assertIn("KeyError: 'Invalid number 2'", out.getvalue())
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
new file mode 100644
index 0000000000..41cbe04808
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -0,0 +1,188 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import shutil
+import unittest
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.selftest.cases.buildhistory import BuildhistoryBase
+from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils import CommandError
+
+class BuildhistoryDiffTests(BuildhistoryBase):
+
+ def test_buildhistory_diff(self):
+ target = 'xcursor-transparent-theme'
+ self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
+ self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True)
+ result = runCmd("oe-pkgdata-util read-value PKGV %s" % target)
+ pkgv = result.output.rstrip()
+ result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR'))
+ expected_endlines = [
+ "xcursor-transparent-theme-dev: RDEPENDS: removed \"xcursor-transparent-theme (['= %s-r1'])\", added \"xcursor-transparent-theme (['= %s-r0'])\"" % (pkgv, pkgv),
+ "xcursor-transparent-theme-staticdev: RDEPENDS: removed \"xcursor-transparent-theme-dev (['= %s-r1'])\", added \"xcursor-transparent-theme-dev (['= %s-r0'])\"" % (pkgv, pkgv)
+ ]
+ for line in result.output.splitlines():
+ for el in expected_endlines:
+ if line.endswith(el):
+ expected_endlines.remove(el)
+ break
+ else:
+ self.fail('Unexpected line:\n%s\nExpected line endings:\n %s' % (line, '\n '.join(expected_endlines)))
+ if expected_endlines:
+ self.fail('Missing expected line endings:\n %s' % '\n '.join(expected_endlines))
+
+class OEScriptTests(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(OEScriptTests, cls).setUpClass()
+ try:
+ import cairo
+ except ImportError:
+ raise unittest.SkipTest('Python module cairo is not present')
+ bitbake("core-image-minimal -c rootfs -f")
+ cls.tmpdir = get_bb_var('TMPDIR')
+ cls.buildstats = cls.tmpdir + "/buildstats/" + sorted(os.listdir(cls.tmpdir + "/buildstats"))[-1]
+
+ scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts')
+
+class OEPybootchartguyTests(OEScriptTests):
+
+ def test_pybootchartguy_help(self):
+ runCmd('%s/pybootchartgui/pybootchartgui.py --help' % self.scripts_dir)
+
+ def test_pybootchartguy_to_generate_build_png_output(self):
+ runCmd('%s/pybootchartgui/pybootchartgui.py %s -o %s/charts -f png' % (self.scripts_dir, self.buildstats, self.tmpdir))
+ self.assertTrue(os.path.exists(self.tmpdir + "/charts.png"))
+
+ def test_pybootchartguy_to_generate_build_svg_output(self):
+ runCmd('%s/pybootchartgui/pybootchartgui.py %s -o %s/charts -f svg' % (self.scripts_dir, self.buildstats, self.tmpdir))
+ self.assertTrue(os.path.exists(self.tmpdir + "/charts.svg"))
+
+ def test_pybootchartguy_to_generate_build_pdf_output(self):
+ runCmd('%s/pybootchartgui/pybootchartgui.py %s -o %s/charts -f pdf' % (self.scripts_dir, self.buildstats, self.tmpdir))
+ self.assertTrue(os.path.exists(self.tmpdir + "/charts.pdf"))
+
+
+class OEGitproxyTests(OESelftestTestCase):
+
+ scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts')
+
+ def test_oegitproxy_help(self):
+ try:
+ res = runCmd('%s/oe-git-proxy --help' % self.scripts_dir, assert_error=False)
+ self.assertTrue(False)
+ except CommandError as e:
+ self.assertEqual(2, e.retcode)
+
+ def run_oegitproxy(self, custom_shell=None):
+ os.environ['SOCAT'] = shutil.which("echo")
+ os.environ['ALL_PROXY'] = "https://proxy.example.com:3128"
+ os.environ['NO_PROXY'] = "*.example.com,.no-proxy.org,192.168.42.0/24,127.*.*.*"
+
+ if custom_shell is None:
+ prefix = ''
+ else:
+ prefix = custom_shell + ' '
+
+ # outside, use the proxy
+ res = runCmd('%s%s/oe-git-proxy host.outside-example.com 9418' %
+ (prefix,self.scripts_dir))
+ self.assertIn('PROXY:', res.output)
+ # match with wildcard suffix
+ res = runCmd('%s%s/oe-git-proxy host.example.com 9418' %
+ (prefix, self.scripts_dir))
+ self.assertIn('TCP:', res.output)
+ # match just suffix
+ res = runCmd('%s%s/oe-git-proxy host.no-proxy.org 9418' %
+ (prefix, self.scripts_dir))
+ self.assertIn('TCP:', res.output)
+ # match IP subnet
+ res = runCmd('%s%s/oe-git-proxy 192.168.42.42 9418' %
+ (prefix, self.scripts_dir))
+ self.assertIn('TCP:', res.output)
+ # match IP wildcard
+ res = runCmd('%s%s/oe-git-proxy 127.1.2.3 9418' %
+ (prefix, self.scripts_dir))
+ self.assertIn('TCP:', res.output)
+
+ # test that * globbering is off
+ os.environ['NO_PROXY'] = "*"
+ res = runCmd('%s%s/oe-git-proxy host.example.com 9418' %
+ (prefix, self.scripts_dir))
+ self.assertIn('TCP:', res.output)
+
+ def test_oegitproxy_proxy(self):
+ self.run_oegitproxy()
+
+ def test_oegitproxy_proxy_dash(self):
+ dash = shutil.which("dash")
+ if dash is None:
+ self.skipTest("No \"dash\" found on test system.")
+ self.run_oegitproxy(custom_shell=dash)
+
+class OeRunNativeTest(OESelftestTestCase):
+ def test_oe_run_native(self):
+ bitbake("qemu-helper-native -c addto_recipe_sysroot")
+ result = runCmd("oe-run-native qemu-helper-native tunctl -h")
+ self.assertIn("Delete: tunctl -d device-name [-f tun-clone-device]", result.output)
+
+class OEListPackageconfigTests(OEScriptTests):
+ #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
+ def check_endlines(self, results, expected_endlines):
+ for line in results.output.splitlines():
+ for el in expected_endlines:
+ if line == el:
+ expected_endlines.remove(el)
+ break
+
+ if expected_endlines:
+ self.fail('Missing expected listings:\n %s' % '\n '.join(expected_endlines))
+
+
+ #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
+ def test_packageconfig_flags_help(self):
+ runCmd('%s/contrib/list-packageconfig-flags.py -h' % self.scripts_dir)
+
+ def test_packageconfig_flags_default(self):
+ results = runCmd('%s/contrib/list-packageconfig-flags.py' % self.scripts_dir)
+ expected_endlines = []
+ expected_endlines.append("RECIPE NAME PACKAGECONFIG FLAGS")
+ expected_endlines.append("pinentry gtk2 libcap ncurses qt secret")
+ expected_endlines.append("tar acl")
+
+ self.check_endlines(results, expected_endlines)
+
+
+ def test_packageconfig_flags_option_flags(self):
+ results = runCmd('%s/contrib/list-packageconfig-flags.py -f' % self.scripts_dir)
+ expected_endlines = []
+ expected_endlines.append("PACKAGECONFIG FLAG RECIPE NAMES")
+ expected_endlines.append("qt nativesdk-pinentry pinentry pinentry-native")
+ expected_endlines.append("secret nativesdk-pinentry pinentry pinentry-native")
+
+ self.check_endlines(results, expected_endlines)
+
+ def test_packageconfig_flags_option_all(self):
+ results = runCmd('%s/contrib/list-packageconfig-flags.py -a' % self.scripts_dir)
+ expected_endlines = []
+ expected_endlines.append("pinentry-1.1.0")
+ expected_endlines.append("PACKAGECONFIG ncurses libcap")
+ expected_endlines.append("PACKAGECONFIG[qt] --enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase")
+ expected_endlines.append("PACKAGECONFIG[gtk2] --enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0")
+ expected_endlines.append("PACKAGECONFIG[libcap] --with-libcap, --without-libcap, libcap")
+ expected_endlines.append("PACKAGECONFIG[ncurses] --enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses")
+ expected_endlines.append("PACKAGECONFIG[secret] --enable-libsecret, --disable-libsecret, libsecret")
+
+ self.check_endlines(results, expected_endlines)
+
+ def test_packageconfig_flags_optiins_preferred_only(self):
+ results = runCmd('%s/contrib/list-packageconfig-flags.py -p' % self.scripts_dir)
+ expected_endlines = []
+ expected_endlines.append("RECIPE NAME PACKAGECONFIG FLAGS")
+ expected_endlines.append("pinentry gtk2 libcap ncurses qt secret")
+
+ self.check_endlines(results, expected_endlines)
+
diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py
new file mode 100644
index 0000000000..291627877e
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/package.py
@@ -0,0 +1,150 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var, runqemu
+import stat
+import subprocess, os
+import oe.path
+import re
+
+class VersionOrdering(OESelftestTestCase):
+ # version1, version2, sort order
+ tests = (
+ ("1.0", "1.0", 0),
+ ("1.0", "2.0", -1),
+ ("2.0", "1.0", 1),
+ ("2.0-rc", "2.0", 1),
+ ("2.0~rc", "2.0", -1),
+ ("1.2rc2", "1.2.0", -1)
+ )
+
+ @classmethod
+ def setUpClass(cls):
+ super().setUpClass()
+
+ # Build the tools we need and populate a sysroot
+ bitbake("dpkg-native opkg-native rpm-native python3-native")
+ bitbake("build-sysroots -c build_native_sysroot")
+
+ # Get the paths so we can point into the sysroot correctly
+ vars = get_bb_vars(["STAGING_DIR", "BUILD_ARCH", "bindir_native", "libdir_native"])
+ cls.staging = oe.path.join(vars["STAGING_DIR"], vars["BUILD_ARCH"])
+ cls.bindir = oe.path.join(cls.staging, vars["bindir_native"])
+ cls.libdir = oe.path.join(cls.staging, vars["libdir_native"])
+
+ def setUpLocal(self):
+ # Just for convenience
+ self.staging = type(self).staging
+ self.bindir = type(self).bindir
+ self.libdir = type(self).libdir
+
+ def test_dpkg(self):
+ for ver1, ver2, sort in self.tests:
+ op = { -1: "<<", 0: "=", 1: ">>" }[sort]
+ status = subprocess.call((oe.path.join(self.bindir, "dpkg"), "--compare-versions", ver1, op, ver2))
+ self.assertEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
+
+ # Now do it again but with incorrect operations
+ op = { -1: ">>", 0: ">>", 1: "<<" }[sort]
+ status = subprocess.call((oe.path.join(self.bindir, "dpkg"), "--compare-versions", ver1, op, ver2))
+ self.assertNotEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
+
+ # Now do it again but with incorrect operations
+ op = { -1: "=", 0: "<<", 1: "=" }[sort]
+ status = subprocess.call((oe.path.join(self.bindir, "dpkg"), "--compare-versions", ver1, op, ver2))
+ self.assertNotEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
+
+ def test_opkg(self):
+ for ver1, ver2, sort in self.tests:
+ op = { -1: "<<", 0: "=", 1: ">>" }[sort]
+ status = subprocess.call((oe.path.join(self.bindir, "opkg"), "compare-versions", ver1, op, ver2))
+ self.assertEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
+
+ # Now do it again but with incorrect operations
+ op = { -1: ">>", 0: ">>", 1: "<<" }[sort]
+ status = subprocess.call((oe.path.join(self.bindir, "opkg"), "compare-versions", ver1, op, ver2))
+ self.assertNotEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
+
+ # Now do it again but with incorrect operations
+ op = { -1: "=", 0: "<<", 1: "=" }[sort]
+ status = subprocess.call((oe.path.join(self.bindir, "opkg"), "compare-versions", ver1, op, ver2))
+ self.assertNotEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
+
+ def test_rpm(self):
+ # Need to tell the Python bindings where to find its configuration
+ env = os.environ.copy()
+ env["RPM_CONFIGDIR"] = oe.path.join(self.libdir, "rpm")
+
+ for ver1, ver2, sort in self.tests:
+ # The only way to test rpm is via the Python module, so we need to
+ # execute python3-native. labelCompare returns -1/0/1 (like strcmp)
+ # so add 100 and use that as the exit code.
+ command = (oe.path.join(self.bindir, "python3-native", "python3"), "-c",
+ "import sys, rpm; v1=(None, \"%s\", None); v2=(None, \"%s\", None); sys.exit(rpm.labelCompare(v1, v2) + 100)" % (ver1, ver2))
+ status = subprocess.call(command, env=env)
+ self.assertIn(status, (99, 100, 101))
+ self.assertEqual(status - 100, sort, "%s %s (%d) failed" % (ver1, ver2, sort))
+
+class PackageTests(OESelftestTestCase):
+ # Verify that a recipe which sets up hardlink files has those preserved into split packages
+ # Also test file sparseness is preserved
+ def test_preserve_sparse_hardlinks(self):
+ bitbake("selftest-hardlink -c package")
+
+ dest = get_bb_var('PKGDEST', 'selftest-hardlink')
+ bindir = get_bb_var('bindir', 'selftest-hardlink')
+
+ def checkfiles():
+ # Recipe creates 4 hardlinked files, there is a copy in package/ and a copy in packages-split/
+ # so expect 8 in total.
+ self.assertEqual(os.stat(dest + "/selftest-hardlink" + bindir + "/hello1").st_nlink, 8)
+
+ # Test a sparse file remains sparse
+ sparsestat = os.stat(dest + "/selftest-hardlink" + bindir + "/sparsetest")
+ self.assertEqual(sparsestat.st_blocks, 0)
+ self.assertEqual(sparsestat.st_size, 1048576)
+
+ checkfiles()
+
+ # Clean and reinstall so its now definitely from sstate, then retest.
+ bitbake("selftest-hardlink -c clean")
+ bitbake("selftest-hardlink -c package")
+
+ checkfiles()
+
+ # Verify gdb to read symbols from separated debug hardlink file correctly
+ def test_gdb_hardlink_debug(self):
+ features = 'IMAGE_INSTALL_append = " selftest-hardlink"\n'
+ features += 'IMAGE_INSTALL_append = " selftest-hardlink-dbg"\n'
+ features += 'IMAGE_INSTALL_append = " selftest-hardlink-gdb"\n'
+ self.write_config(features)
+ bitbake("core-image-minimal")
+
+ def gdbtest(qemu, binary):
+ """
+ Check that gdb ``binary`` to read symbols from separated debug file
+ """
+ self.logger.info("gdbtest %s" % binary)
+ status, output = qemu.run_serial('/usr/bin/gdb.sh %s' % binary, timeout=60)
+ for l in output.split('\n'):
+ # Check debugging symbols exists
+ if '(no debugging symbols found)' in l:
+ self.logger.error("No debugging symbols found. GDB result:\n%s" % output)
+ return False
+
+ # Check debugging symbols works correctly
+ elif re.match("Breakpoint 1.*hello\.c.*4", l):
+ return True
+
+ self.logger.error("GDB result:\n%d: %s", status, output)
+ return False
+
+ with runqemu('core-image-minimal') as qemu:
+ for binary in ['/usr/bin/hello1',
+ '/usr/bin/hello2',
+ '/usr/libexec/hello3',
+ '/usr/libexec/hello4']:
+ if not gdbtest(qemu, binary):
+ self.fail('GDB %s failed' % binary)
diff --git a/meta/lib/oeqa/selftest/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index 5a63f89ff2..833a1803ba 100644
--- a/meta/lib/oeqa/selftest/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -1,81 +1,78 @@
-import unittest
+#
+# SPDX-License-Identifier: MIT
+#
+
import os
import tempfile
-import logging
import fnmatch
-import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
-from oeqa.utils.decorators import testcase
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
-class OePkgdataUtilTests(oeSelfTest):
+class OePkgdataUtilTests(OESelftestTestCase):
@classmethod
def setUpClass(cls):
+ super(OePkgdataUtilTests, cls).setUpClass()
# Ensure we have the right data in pkgdata
- logger = logging.getLogger("selftest")
- logger.info('Running bitbake to generate pkgdata')
- bitbake('glibc busybox zlib bash')
+ cls.logger.info('Running bitbake to generate pkgdata')
+ bitbake('target-sdk-provides-dummy -c clean')
+ bitbake('busybox zlib m4')
- @testcase(1203)
def test_lookup_pkg(self):
# Forward tests
- result = runCmd('oe-pkgdata-util lookup-pkg "glibc busybox"')
- self.assertEqual(result.output, 'libc6\nbusybox')
+ result = runCmd('oe-pkgdata-util lookup-pkg "zlib busybox"')
+ self.assertEqual(result.output, 'libz1\nbusybox')
result = runCmd('oe-pkgdata-util lookup-pkg zlib-dev')
self.assertEqual(result.output, 'libz-dev')
result = runCmd('oe-pkgdata-util lookup-pkg nonexistentpkg', ignore_status=True)
self.assertEqual(result.status, 1, "Status different than 1. output: %s" % result.output)
self.assertEqual(result.output, 'ERROR: The following packages could not be found: nonexistentpkg')
# Reverse tests
- result = runCmd('oe-pkgdata-util lookup-pkg -r "libc6 busybox"')
- self.assertEqual(result.output, 'glibc\nbusybox')
+ result = runCmd('oe-pkgdata-util lookup-pkg -r "libz1 busybox"')
+ self.assertEqual(result.output, 'zlib\nbusybox')
result = runCmd('oe-pkgdata-util lookup-pkg -r libz-dev')
self.assertEqual(result.output, 'zlib-dev')
result = runCmd('oe-pkgdata-util lookup-pkg -r nonexistentpkg', ignore_status=True)
self.assertEqual(result.status, 1, "Status different than 1. output: %s" % result.output)
self.assertEqual(result.output, 'ERROR: The following packages could not be found: nonexistentpkg')
- @testcase(1205)
def test_read_value(self):
result = runCmd('oe-pkgdata-util read-value PN libz1')
self.assertEqual(result.output, 'zlib')
- result = runCmd('oe-pkgdata-util read-value PKGSIZE bash')
+ result = runCmd('oe-pkgdata-util read-value PKG libz1')
+ self.assertEqual(result.output, 'libz1')
+ result = runCmd('oe-pkgdata-util read-value PKGSIZE m4')
pkgsize = int(result.output.strip())
self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output)
- @testcase(1198)
def test_find_path(self):
- result = runCmd('oe-pkgdata-util find-path /lib/libc.so.6')
- self.assertEqual(result.output, 'glibc: /lib/libc.so.6')
- result = runCmd('oe-pkgdata-util find-path /bin/bash')
- self.assertEqual(result.output, 'bash: /bin/bash')
+ result = runCmd('oe-pkgdata-util find-path /lib/libz.so.1')
+ self.assertEqual(result.output, 'zlib: /lib/libz.so.1')
+ result = runCmd('oe-pkgdata-util find-path /usr/bin/m4')
+ self.assertEqual(result.output, 'm4: /usr/bin/m4')
result = runCmd('oe-pkgdata-util find-path /not/exist', ignore_status=True)
self.assertEqual(result.status, 1, "Status different than 1. output: %s" % result.output)
self.assertEqual(result.output, 'ERROR: Unable to find any package producing path /not/exist')
- @testcase(1204)
def test_lookup_recipe(self):
- result = runCmd('oe-pkgdata-util lookup-recipe "libc6-staticdev busybox"')
- self.assertEqual(result.output, 'glibc\nbusybox')
+ result = runCmd('oe-pkgdata-util lookup-recipe "libz-staticdev busybox"')
+ self.assertEqual(result.output, 'zlib\nbusybox')
result = runCmd('oe-pkgdata-util lookup-recipe libz-dbg')
self.assertEqual(result.output, 'zlib')
result = runCmd('oe-pkgdata-util lookup-recipe nonexistentpkg', ignore_status=True)
self.assertEqual(result.status, 1, "Status different than 1. output: %s" % result.output)
self.assertEqual(result.output, 'ERROR: The following packages could not be found: nonexistentpkg')
- @testcase(1202)
def test_list_pkgs(self):
# No arguments
result = runCmd('oe-pkgdata-util list-pkgs')
pkglist = result.output.split()
- self.assertIn('glibc-utils', pkglist, "Listed packages: %s" % result.output)
+ self.assertIn('zlib', pkglist, "Listed packages: %s" % result.output)
self.assertIn('zlib-dev', pkglist, "Listed packages: %s" % result.output)
# No pkgspec, runtime
result = runCmd('oe-pkgdata-util list-pkgs -r')
pkglist = result.output.split()
- self.assertIn('libc6-utils', pkglist, "Listed packages: %s" % result.output)
self.assertIn('libz-dev', pkglist, "Listed packages: %s" % result.output)
# With recipe specified
result = runCmd('oe-pkgdata-util list-pkgs -p zlib')
@@ -84,7 +81,7 @@ class OePkgdataUtilTests(oeSelfTest):
pkglist.remove('zlib-ptest') # in case ptest is disabled
except ValueError:
pass
- self.assertEqual(pkglist, ['zlib', 'zlib-dbg', 'zlib-dev', 'zlib-doc', 'zlib-staticdev'], "Packages listed after remove: %s" % result.output)
+ self.assertEqual(pkglist, ['zlib', 'zlib-dbg', 'zlib-dev', 'zlib-doc', 'zlib-src', 'zlib-staticdev'], "Packages listed after remove: %s" % result.output)
# With recipe specified, runtime
result = runCmd('oe-pkgdata-util list-pkgs -p zlib -r')
pkglist = sorted(result.output.split())
@@ -92,7 +89,7 @@ class OePkgdataUtilTests(oeSelfTest):
pkglist.remove('libz-ptest') # in case ptest is disabled
except ValueError:
pass
- self.assertEqual(pkglist, ['libz-dbg', 'libz-dev', 'libz-doc', 'libz-staticdev', 'libz1'], "Packages listed after remove: %s" % result.output)
+ self.assertEqual(pkglist, ['libz-dbg', 'libz-dev', 'libz-doc', 'libz-src', 'libz-staticdev', 'libz1'], "Packages listed after remove: %s" % result.output)
# With recipe specified and unpackaged
result = runCmd('oe-pkgdata-util list-pkgs -p zlib -u')
pkglist = sorted(result.output.split())
@@ -110,7 +107,6 @@ class OePkgdataUtilTests(oeSelfTest):
pkglist = sorted(result.output.split())
self.assertEqual(pkglist, ['libz-dbg', 'libz-dev', 'libz-doc'], "Packages listed: %s" % result.output)
- @testcase(1201)
def test_list_pkg_files(self):
def splitoutput(output):
files = {}
@@ -124,10 +120,11 @@ class OePkgdataUtilTests(oeSelfTest):
curpkg = line.split(':')[0]
files[curpkg] = []
return files
- base_libdir = get_bb_var('base_libdir')
- libdir = get_bb_var('libdir')
- includedir = get_bb_var('includedir')
- mandir = get_bb_var('mandir')
+ bb_vars = get_bb_vars(['base_libdir', 'libdir', 'includedir', 'mandir'])
+ base_libdir = bb_vars['base_libdir']
+ libdir = bb_vars['libdir']
+ includedir = bb_vars['includedir']
+ mandir = bb_vars['mandir']
# Test recipe-space package name
result = runCmd('oe-pkgdata-util list-pkg-files zlib-dev zlib-doc')
files = splitoutput(result.output)
@@ -199,17 +196,15 @@ class OePkgdataUtilTests(oeSelfTest):
self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['libz-doc'])
self.assertIn(os.path.join(libdir, 'libz.a'), files['libz-staticdev'])
- @testcase(1200)
def test_glob(self):
tempdir = tempfile.mkdtemp(prefix='pkgdataqa')
self.track_for_cleanup(tempdir)
pkglistfile = os.path.join(tempdir, 'pkglist')
with open(pkglistfile, 'w') as f:
- f.write('libc6\n')
f.write('libz1\n')
f.write('busybox\n')
result = runCmd('oe-pkgdata-util glob %s "*-dev"' % pkglistfile)
- desiredresult = ['libc6-dev', 'libz-dev', 'busybox-dev']
+ desiredresult = ['libz-dev', 'busybox-dev']
self.assertEqual(sorted(result.output.split()), sorted(desiredresult))
# The following should not error (because when we use this during rootfs construction, sometimes the complementary package won't exist)
result = runCmd('oe-pkgdata-util glob %s "*-nonexistent"' % pkglistfile)
@@ -220,7 +215,6 @@ class OePkgdataUtilTests(oeSelfTest):
self.assertNotIn('libz-dev', resultlist)
self.assertNotIn('libz-dbg', resultlist)
- @testcase(1206)
def test_specify_pkgdatadir(self):
- result = runCmd('oe-pkgdata-util -p %s lookup-pkg glibc' % get_bb_var('PKGDATA_DIR'))
- self.assertEqual(result.output, 'libc6')
+ result = runCmd('oe-pkgdata-util -p %s lookup-pkg zlib' % get_bb_var('PKGDATA_DIR'))
+ self.assertEqual(result.output, 'libz1')
diff --git a/meta/lib/oeqa/selftest/prservice.py b/meta/lib/oeqa/selftest/cases/prservice.py
index 1b9a510fd4..fe1f24ea6d 100644
--- a/meta/lib/oeqa/selftest/prservice.py
+++ b/meta/lib/oeqa/selftest/cases/prservice.py
@@ -1,23 +1,28 @@
-import unittest
+#
+# SPDX-License-Identifier: MIT
+#
+
import os
-import logging
import re
import shutil
import datetime
import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
+from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
-from oeqa.utils.decorators import testcase
from oeqa.utils.network import get_free_port
-class BitbakePrTests(oeSelfTest):
-
+class BitbakePrTests(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(BitbakePrTests, cls).setUpClass()
+ cls.pkgdata_dir = get_bb_var('PKGDATA_DIR')
+
def get_pr_version(self, package_name):
- pkgdata_dir = get_bb_var('PKGDATA_DIR')
- package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name)
+ package_data_file = os.path.join(self.pkgdata_dir, 'runtime', package_name)
package_data = ftools.read_file(package_data_file)
- find_pr = re.search("PKGR: r[0-9]+\.([0-9]+)", package_data)
+ find_pr = re.search(r"PKGR: r[0-9]+\.([0-9]+)", package_data)
self.assertTrue(find_pr, "No PKG revision found in %s" % package_data_file)
return int(find_pr.group(1))
@@ -27,7 +32,7 @@ class BitbakePrTests(oeSelfTest):
package_stamps_path = "/".join(stampdata[:-1])
stamps = []
for stamp in os.listdir(package_stamps_path):
- find_stamp = re.match("%s\.%s\.([a-z0-9]{32})" % (re.escape(prefix), recipe_task), stamp)
+ find_stamp = re.match(r"%s\.%s\.([a-z0-9]{32})" % (re.escape(prefix), recipe_task), stamp)
if find_stamp:
stamps.append(find_stamp.group(1))
self.assertFalse(len(stamps) == 0, msg="Cound not find stamp for task %s for recipe %s" % (recipe_task, package_name))
@@ -37,11 +42,9 @@ class BitbakePrTests(oeSelfTest):
def increment_package_pr(self, package_name):
inc_data = "do_package_append() {\n bb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime.datetime.now()
self.write_recipeinc(package_name, inc_data)
- bitbake("-ccleansstate %s" % package_name)
res = bitbake(package_name, ignore_status=True)
self.delete_recipeinc(package_name)
self.assertEqual(res.status, 0, msg=res.output)
- self.assertTrue("NOTE: Started PRServer with DBfile" in res.output, msg=res.output)
def config_pr_tests(self, package_name, package_type='rpm', pr_socket='localhost:0'):
config_package_data = 'PACKAGE_CLASSES = "package_%s"' % package_type
@@ -60,7 +63,6 @@ class BitbakePrTests(oeSelfTest):
pr_2 = self.get_pr_version(package_name)
stamp_2 = self.get_task_stamp(package_name, track_task)
- bitbake("-ccleansstate %s" % package_name)
self.assertTrue(pr_2 - pr_1 == 1, "Step between same pkg. revision is greater than 1")
self.assertTrue(stamp_1 != stamp_2, "Different pkg rev. but same stamp: %s" % stamp_1)
@@ -73,6 +75,7 @@ class BitbakePrTests(oeSelfTest):
exported_db_path = os.path.join(self.builddir, 'export.inc')
export_result = runCmd("bitbake-prserv-tool export %s" % exported_db_path, ignore_status=True)
self.assertEqual(export_result.status, 0, msg="PR Service database export failed: %s" % export_result.output)
+ self.assertTrue(os.path.exists(exported_db_path))
if replace_current_db:
current_db_path = os.path.join(get_bb_var('PERSISTENT_DIR'), 'prserv.sqlite3')
@@ -86,42 +89,32 @@ class BitbakePrTests(oeSelfTest):
self.increment_package_pr(package_name)
pr_2 = self.get_pr_version(package_name)
- bitbake("-ccleansstate %s" % package_name)
self.assertTrue(pr_2 - pr_1 == 1, "Step between same pkg. revision is greater than 1")
- @testcase(930)
def test_import_export_replace_db(self):
self.run_test_pr_export_import('m4')
- @testcase(931)
def test_import_export_override_db(self):
self.run_test_pr_export_import('m4', replace_current_db=False)
- @testcase(932)
def test_pr_service_rpm_arch_dep(self):
self.run_test_pr_service('m4', 'rpm', 'do_package')
- @testcase(934)
def test_pr_service_deb_arch_dep(self):
self.run_test_pr_service('m4', 'deb', 'do_package')
- @testcase(933)
def test_pr_service_ipk_arch_dep(self):
self.run_test_pr_service('m4', 'ipk', 'do_package')
- @testcase(935)
def test_pr_service_rpm_arch_indep(self):
self.run_test_pr_service('xcursor-transparent-theme', 'rpm', 'do_package')
- @testcase(937)
def test_pr_service_deb_arch_indep(self):
self.run_test_pr_service('xcursor-transparent-theme', 'deb', 'do_package')
- @testcase(936)
def test_pr_service_ipk_arch_indep(self):
self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 'do_package')
- @testcase(1419)
def test_stopping_prservice_message(self):
port = get_free_port()
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index db1f8deeb0..c1562c63b2 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -1,16 +1,18 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
import os
-import logging
+import shutil
import tempfile
import urllib.parse
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
-from oeqa.utils.decorators import testcase
-from oeqa.selftest import devtool
-
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.commands import get_bb_vars, create_temp_layer
+from oeqa.selftest.cases import devtool
templayerdir = None
-
def setUpModule():
global templayerdir
templayerdir = tempfile.mkdtemp(prefix='recipetoolqa')
@@ -24,7 +26,9 @@ def tearDownModule():
class RecipetoolBase(devtool.DevtoolBase):
+
def setUpLocal(self):
+ super(RecipetoolBase, self).setUpLocal()
self.templayerdir = templayerdir
self.tempdir = tempfile.mkdtemp(prefix='recipetoolqa')
self.track_for_cleanup(self.tempdir)
@@ -34,6 +38,7 @@ class RecipetoolBase(devtool.DevtoolBase):
def tearDownLocal(self):
runCmd('rm -rf %s/recipes-*' % self.templayerdir)
+ super(RecipetoolBase, self).tearDownLocal()
def _try_recipetool_appendcmd(self, cmd, testrecipe, expectedfiles, expectedlines=None):
result = runCmd(cmd)
@@ -64,17 +69,16 @@ class RecipetoolBase(devtool.DevtoolBase):
class RecipetoolTests(RecipetoolBase):
+
@classmethod
def setUpClass(cls):
+ super(RecipetoolTests, cls).setUpClass()
# Ensure we have the right data in shlibs/pkgdata
- logger = logging.getLogger("selftest")
- logger.info('Running bitbake to generate pkgdata')
+ cls.logger.info('Running bitbake to generate pkgdata')
bitbake('-c packagedata base-files coreutils busybox selftest-recipetool-appendfile')
-
- @classmethod
- def tearDownClass(cls):
- # Shouldn't leave any traces of this artificial recipe behind
- bitbake('-c cleansstate selftest-recipetool-appendfile')
+ bb_vars = get_bb_vars(['COREBASE', 'BBPATH'])
+ cls.corebase = bb_vars['COREBASE']
+ cls.bbpath = bb_vars['BBPATH']
def _try_recipetool_appendfile(self, testrecipe, destfile, newfile, options, expectedlines, expectedfiles):
cmd = 'recipetool appendfile %s %s %s %s' % (self.templayerdir, destfile, newfile, options)
@@ -88,7 +92,6 @@ class RecipetoolTests(RecipetoolBase):
for errorstr in checkerror:
self.assertIn(errorstr, result.output)
- @testcase(1177)
def test_recipetool_appendfile_basic(self):
# Basic test
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -96,21 +99,18 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('base-files', '/etc/motd', self.testfile, '', expectedlines, ['motd'])
self.assertNotIn('WARNING: ', output)
- @testcase(1183)
def test_recipetool_appendfile_invalid(self):
# Test some commands that should error
self._try_recipetool_appendfile_fail('/etc/passwd', self.testfile, ['ERROR: /etc/passwd cannot be handled by this tool', 'useradd', 'extrausers'])
self._try_recipetool_appendfile_fail('/etc/timestamp', self.testfile, ['ERROR: /etc/timestamp cannot be handled by this tool'])
self._try_recipetool_appendfile_fail('/dev/console', self.testfile, ['ERROR: /dev/console cannot be handled by this tool'])
- @testcase(1176)
def test_recipetool_appendfile_alternatives(self):
# Now try with a file we know should be an alternative
# (this is very much a fake example, but one we know is reliably an alternative)
self._try_recipetool_appendfile_fail('/bin/ls', self.testfile, ['ERROR: File /bin/ls is an alternative possibly provided by the following recipes:', 'coreutils', 'busybox'])
- corebase = get_bb_var('COREBASE')
# Need a test file - should be executable
- testfile2 = os.path.join(corebase, 'oe-init-build-env')
+ testfile2 = os.path.join(self.corebase, 'oe-init-build-env')
testfile2name = os.path.basename(testfile2)
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
'\n',
@@ -128,7 +128,6 @@ class RecipetoolTests(RecipetoolBase):
result = runCmd('diff -q %s %s' % (testfile2, copiedfile), ignore_status=True)
self.assertNotEqual(result.status, 0, 'New file should have been copied but was not %s' % result.output)
- @testcase(1178)
def test_recipetool_appendfile_binary(self):
# Try appending a binary file
# /bin/ls can be a symlink to /usr/bin/ls
@@ -137,9 +136,7 @@ class RecipetoolTests(RecipetoolBase):
self.assertIn('WARNING: ', result.output)
self.assertIn('is a binary', result.output)
- @testcase(1173)
def test_recipetool_appendfile_add(self):
- corebase = get_bb_var('COREBASE')
# Try arbitrary file add to a recipe
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
'\n',
@@ -152,7 +149,7 @@ class RecipetoolTests(RecipetoolBase):
self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase', expectedlines, ['testfile'])
# Try adding another file, this time where the source file is executable
# (so we're testing that, plus modifying an existing bbappend)
- testfile2 = os.path.join(corebase, 'oe-init-build-env')
+ testfile2 = os.path.join(self.corebase, 'oe-init-build-env')
testfile2name = os.path.basename(testfile2)
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
'\n',
@@ -167,7 +164,6 @@ class RecipetoolTests(RecipetoolBase):
'}\n']
self._try_recipetool_appendfile('netbase', '/usr/share/scriptname', testfile2, '-r netbase', expectedlines, ['testfile', testfile2name])
- @testcase(1174)
def test_recipetool_appendfile_add_bindir(self):
# Try arbitrary file add to a recipe, this time to a location such that should be installed as executable
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -181,7 +177,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('netbase', '/usr/bin/selftest-recipetool-testbin', self.testfile, '-r netbase', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
- @testcase(1175)
def test_recipetool_appendfile_add_machine(self):
# Try arbitrary file add to a recipe, this time to a location such that should be installed as executable
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -197,7 +192,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase -m mymachine', expectedlines, ['mymachine/testfile'])
self.assertNotIn('WARNING: ', output)
- @testcase(1184)
def test_recipetool_appendfile_orig(self):
# A file that's in SRC_URI and in do_install with the same name
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -205,7 +199,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-orig', self.testfile, '', expectedlines, ['selftest-replaceme-orig'])
self.assertNotIn('WARNING: ', output)
- @testcase(1191)
def test_recipetool_appendfile_todir(self):
# A file that's in SRC_URI and in do_install with destination directory rather than file
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -213,7 +206,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-todir', self.testfile, '', expectedlines, ['selftest-replaceme-todir'])
self.assertNotIn('WARNING: ', output)
- @testcase(1187)
def test_recipetool_appendfile_renamed(self):
# A file that's in SRC_URI with a different name to the destination file
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -221,7 +213,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-renamed', self.testfile, '', expectedlines, ['file1'])
self.assertNotIn('WARNING: ', output)
- @testcase(1190)
def test_recipetool_appendfile_subdir(self):
# A file that's in SRC_URI in a subdir
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -235,7 +226,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
- @testcase(1189)
def test_recipetool_appendfile_src_glob(self):
# A file that's in SRC_URI as a glob
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -249,7 +239,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-src-globfile', self.testfile, '', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
- @testcase(1181)
def test_recipetool_appendfile_inst_glob(self):
# A file that's in do_install as a glob
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -257,7 +246,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-globfile', self.testfile, '', expectedlines, ['selftest-replaceme-inst-globfile'])
self.assertNotIn('WARNING: ', output)
- @testcase(1182)
def test_recipetool_appendfile_inst_todir_glob(self):
# A file that's in do_install as a glob with destination as a directory
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -265,7 +253,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-todir-globfile', self.testfile, '', expectedlines, ['selftest-replaceme-inst-todir-globfile'])
self.assertNotIn('WARNING: ', output)
- @testcase(1185)
def test_recipetool_appendfile_patch(self):
# A file that's added by a patch in SRC_URI
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -284,7 +271,6 @@ class RecipetoolTests(RecipetoolBase):
else:
self.fail('Patch warning not found in output:\n%s' % output)
- @testcase(1188)
def test_recipetool_appendfile_script(self):
# Now, a file that's in SRC_URI but installed by a script (so no mention in do_install)
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -298,7 +284,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-scripted', self.testfile, '', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
- @testcase(1180)
def test_recipetool_appendfile_inst_func(self):
# A file that's installed from a function called by do_install
expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -306,7 +291,6 @@ class RecipetoolTests(RecipetoolBase):
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-func', self.testfile, '', expectedlines, ['selftest-replaceme-inst-func'])
self.assertNotIn('WARNING: ', output)
- @testcase(1186)
def test_recipetool_appendfile_postinstall(self):
# A file that's created by a postinstall script (and explicitly mentioned in it)
# First try without specifying recipe
@@ -322,7 +306,6 @@ class RecipetoolTests(RecipetoolBase):
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-postinst', self.testfile, '-r selftest-recipetool-appendfile', expectedlines, ['testfile'])
- @testcase(1179)
def test_recipetool_appendfile_extlayer(self):
# Try creating a bbappend in a layer that's not in bblayers.conf and has a different structure
exttemplayerdir = os.path.join(self.tempdir, 'extlayer')
@@ -338,7 +321,6 @@ class RecipetoolTests(RecipetoolBase):
'metadata/recipes/recipes-test/selftest-recipetool-appendfile/selftest-recipetool-appendfile/selftest-replaceme-orig']
self.assertEqual(sorted(createdfiles), sorted(expectedfiles))
- @testcase(1192)
def test_recipetool_appendfile_wildcard(self):
def try_appendfile_wc(options):
@@ -363,25 +345,25 @@ class RecipetoolTests(RecipetoolBase):
filename = try_appendfile_wc('-w')
self.assertEqual(filename, recipefn.split('_')[0] + '_%.bbappend')
- @testcase(1193)
def test_recipetool_create(self):
# Try adding a recipe
tempsrc = os.path.join(self.tempdir, 'srctree')
os.makedirs(tempsrc)
- recipefile = os.path.join(self.tempdir, 'logrotate_3.8.7.bb')
- srcuri = 'https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.8.7.tar.gz'
+ recipefile = os.path.join(self.tempdir, 'logrotate_3.12.3.bb')
+ srcuri = 'https://github.com/logrotate/logrotate/releases/download/3.12.3/logrotate-3.12.3.tar.xz'
result = runCmd('recipetool create -o %s %s -x %s' % (recipefile, srcuri, tempsrc))
self.assertTrue(os.path.isfile(recipefile))
checkvars = {}
checkvars['LICENSE'] = 'GPLv2'
- checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=18810669f13b87348459e611d31ab760'
- checkvars['SRC_URI'] = 'https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz'
- checkvars['SRC_URI[md5sum]'] = '99e08503ef24c3e2e3ff74cc5f3be213'
- checkvars['SRC_URI[sha256sum]'] = 'f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00d12b64'
+ checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'
+ checkvars['SRC_URI'] = 'https://github.com/logrotate/logrotate/releases/download/${PV}/logrotate-${PV}.tar.xz'
+ checkvars['SRC_URI[md5sum]'] = 'a560c57fac87c45b2fc17406cdf79288'
+ checkvars['SRC_URI[sha256sum]'] = '2e6a401cac9024db2288297e3be1a8ab60e7401ba8e91225218aaf4a27e82a07'
self._test_recipe_contents(recipefile, checkvars, [])
- @testcase(1194)
def test_recipetool_create_git(self):
+ if 'x11' not in get_bb_var('DISTRO_FEATURES'):
+ self.skipTest('Test requires x11 as distro feature')
# Ensure we have the right data in shlibs/pkgdata
bitbake('libpng pango libx11 libxext jpeg libcheck')
# Try adding a recipe
@@ -401,7 +383,6 @@ class RecipetoolTests(RecipetoolBase):
inherits = ['autotools', 'pkgconfig']
self._test_recipe_contents(recipefile, checkvars, inherits)
- @testcase(1392)
def test_recipetool_create_simple(self):
# Try adding a recipe
temprecipe = os.path.join(self.tempdir, 'recipe')
@@ -424,22 +405,20 @@ class RecipetoolTests(RecipetoolBase):
inherits = ['autotools']
self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits)
- @testcase(1418)
def test_recipetool_create_cmake(self):
- # Try adding a recipe
temprecipe = os.path.join(self.tempdir, 'recipe')
os.makedirs(temprecipe)
- recipefile = os.path.join(temprecipe, 'navit_0.5.0.bb')
- srcuri = 'http://downloads.sourceforge.net/project/navit/v0.5.0/navit-0.5.0.tar.gz'
+ recipefile = os.path.join(temprecipe, 'taglib_1.11.1.bb')
+ srcuri = 'http://taglib.github.io/releases/taglib-1.11.1.tar.gz'
result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
self.assertTrue(os.path.isfile(recipefile))
checkvars = {}
- checkvars['LICENSE'] = set(['Unknown', 'GPLv2', 'LGPLv2'])
- checkvars['SRC_URI'] = 'http://downloads.sourceforge.net/project/navit/v${PV}/navit-${PV}.tar.gz'
- checkvars['SRC_URI[md5sum]'] = '242f398e979a6b8c0f3c802b63435b68'
- checkvars['SRC_URI[sha256sum]'] = '13353481d7fc01a4f64e385dda460b51496366bba0fd2cc85a89a0747910e94d'
- checkvars['DEPENDS'] = set(['freetype', 'zlib', 'openssl', 'glib-2.0', 'virtual/libgl', 'virtual/egl', 'gtk+', 'libpng', 'libsdl', 'freeglut', 'dbus-glib'])
- inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig']
+ checkvars['LICENSE'] = set(['LGPLv2.1', 'MPL-1.1'])
+ checkvars['SRC_URI'] = 'http://taglib.github.io/releases/taglib-${PV}.tar.gz'
+ checkvars['SRC_URI[md5sum]'] = 'cee7be0ccfc892fa433d6c837df9522a'
+ checkvars['SRC_URI[sha256sum]'] = 'b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b'
+ checkvars['DEPENDS'] = set(['boost', 'zlib'])
+ inherits = ['cmake']
self._test_recipe_contents(recipefile, checkvars, inherits)
def test_recipetool_create_github(self):
@@ -447,13 +426,51 @@ class RecipetoolTests(RecipetoolBase):
temprecipe = os.path.join(self.tempdir, 'recipe')
os.makedirs(temprecipe)
recipefile = os.path.join(temprecipe, 'meson_git.bb')
- srcuri = 'https://github.com/mesonbuild/meson'
- result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
+ srcuri = 'https://github.com/mesonbuild/meson;rev=0.32.0'
+ result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri])
self.assertTrue(os.path.isfile(recipefile))
checkvars = {}
checkvars['LICENSE'] = set(['Apache-2.0'])
checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https'
- inherits = ['setuptools']
+ inherits = ['setuptools3']
+ self._test_recipe_contents(recipefile, checkvars, inherits)
+
+ def test_recipetool_create_python3_setuptools(self):
+ # Test creating python3 package from tarball (using setuptools3 class)
+ temprecipe = os.path.join(self.tempdir, 'recipe')
+ os.makedirs(temprecipe)
+ pn = 'python-magic'
+ pv = '0.4.15'
+ recipefile = os.path.join(temprecipe, '%s_%s.bb' % (pn, pv))
+ srcuri = 'https://files.pythonhosted.org/packages/84/30/80932401906eaf787f2e9bd86dc458f1d2e75b064b4c187341f29516945c/python-magic-%s.tar.gz' % pv
+ result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
+ self.assertTrue(os.path.isfile(recipefile))
+ checkvars = {}
+ checkvars['LICENSE'] = set(['MIT'])
+ checkvars['LIC_FILES_CHKSUM'] = 'file://LICENSE;md5=16a934f165e8c3245f241e77d401bb88'
+ checkvars['SRC_URI'] = 'https://files.pythonhosted.org/packages/84/30/80932401906eaf787f2e9bd86dc458f1d2e75b064b4c187341f29516945c/python-magic-${PV}.tar.gz'
+ checkvars['SRC_URI[md5sum]'] = 'e384c95a47218f66c6501cd6dd45ff59'
+ checkvars['SRC_URI[sha256sum]'] = 'f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5'
+ inherits = ['setuptools3']
+ self._test_recipe_contents(recipefile, checkvars, inherits)
+
+ def test_recipetool_create_python3_distutils(self):
+ # Test creating python3 package from tarball (using distutils3 class)
+ temprecipe = os.path.join(self.tempdir, 'recipe')
+ os.makedirs(temprecipe)
+ pn = 'docutils'
+ pv = '0.14'
+ recipefile = os.path.join(temprecipe, '%s_%s.bb' % (pn, pv))
+ srcuri = 'https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-%s.tar.gz' % pv
+ result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
+ self.assertTrue(os.path.isfile(recipefile))
+ checkvars = {}
+ checkvars['LICENSE'] = set(['PSF', '&', 'BSD', 'GPL'])
+ checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING.txt;md5=35a23d42b615470583563132872c97d6'
+ checkvars['SRC_URI'] = 'https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-${PV}.tar.gz'
+ checkvars['SRC_URI[md5sum]'] = 'c53768d63db3873b7d452833553469de'
+ checkvars['SRC_URI[sha256sum]'] = '51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274'
+ inherits = ['distutils3']
self._test_recipe_contents(recipefile, checkvars, inherits)
def test_recipetool_create_github_tarball(self):
@@ -468,7 +485,7 @@ class RecipetoolTests(RecipetoolBase):
checkvars = {}
checkvars['LICENSE'] = set(['Apache-2.0'])
checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz'
- inherits = ['setuptools']
+ inherits = ['setuptools3']
self._test_recipe_contents(recipefile, checkvars, inherits)
def test_recipetool_create_git_http(self):
@@ -485,6 +502,46 @@ class RecipetoolTests(RecipetoolBase):
inherits = ['pkgconfig', 'autotools']
self._test_recipe_contents(recipefile, checkvars, inherits)
+ def _copy_file_with_cleanup(self, srcfile, basedstdir, *paths):
+ dstdir = basedstdir
+ self.assertTrue(os.path.exists(dstdir))
+ for p in paths:
+ dstdir = os.path.join(dstdir, p)
+ if not os.path.exists(dstdir):
+ os.makedirs(dstdir)
+ self.track_for_cleanup(dstdir)
+ dstfile = os.path.join(dstdir, os.path.basename(srcfile))
+ if srcfile != dstfile:
+ shutil.copy(srcfile, dstfile)
+ self.track_for_cleanup(dstfile)
+
+ def test_recipetool_load_plugin(self):
+ """Test that recipetool loads only the first found plugin in BBPATH."""
+
+ recipetool = runCmd("which recipetool")
+ fromname = runCmd("recipetool --quiet pluginfile")
+ srcfile = fromname.output
+ searchpath = self.bbpath.split(':') + [os.path.dirname(recipetool.output)]
+ plugincontent = []
+ with open(srcfile) as fh:
+ plugincontent = fh.readlines()
+ try:
+ self.assertIn('meta-selftest', srcfile, 'wrong bbpath plugin found')
+ for path in searchpath:
+ self._copy_file_with_cleanup(srcfile, path, 'lib', 'recipetool')
+ result = runCmd("recipetool --quiet count")
+ self.assertEqual(result.output, '1')
+ result = runCmd("recipetool --quiet multiloaded")
+ self.assertEqual(result.output, "no")
+ for path in searchpath:
+ result = runCmd("recipetool --quiet bbdir")
+ self.assertEqual(result.output, path)
+ os.unlink(os.path.join(result.output, 'lib', 'recipetool', 'bbpath.py'))
+ finally:
+ with open(srcfile, 'w') as fh:
+ fh.writelines(plugincontent)
+
+
class RecipetoolAppendsrcBase(RecipetoolBase):
def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles):
cmd = 'recipetool appendsrcfile %s %s %s %s %s' % (options, self.templayerdir, testrecipe, newfile, destfile)
@@ -560,27 +617,28 @@ class RecipetoolAppendsrcBase(RecipetoolBase):
self._try_recipetool_appendsrcfiles(testrecipe, newfiles, expectedfiles=expectedfiles, destdir=destdir, options=options)
- src_uri = get_bb_var('SRC_URI', testrecipe).split()
+ bb_vars = get_bb_vars(['SRC_URI', 'FILE', 'FILESEXTRAPATHS'], testrecipe)
+ src_uri = bb_vars['SRC_URI'].split()
for f in expectedfiles:
if destdir:
self.assertIn('file://%s;subdir=%s' % (f, destdir), src_uri)
else:
self.assertIn('file://%s' % f, src_uri)
- recipefile = get_bb_var('FILE', testrecipe)
+ recipefile = bb_vars['FILE']
bbappendfile = self._check_bbappend(testrecipe, recipefile, self.templayerdir)
filesdir = os.path.join(os.path.dirname(bbappendfile), testrecipe)
- filesextrapaths = get_bb_var('FILESEXTRAPATHS', testrecipe).split(':')
+ filesextrapaths = bb_vars['FILESEXTRAPATHS'].split(':')
self.assertIn(filesdir, filesextrapaths)
+
+
class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
- @testcase(1273)
def test_recipetool_appendsrcfile_basic(self):
self._test_appendsrcfile('base-files', 'a-file')
- @testcase(1274)
def test_recipetool_appendsrcfile_basic_wildcard(self):
testrecipe = 'base-files'
self._test_appendsrcfile(testrecipe, 'a-file', options='-w')
@@ -588,30 +646,26 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
bbappendfile = self._check_bbappend(testrecipe, recipefile, self.templayerdir)
self.assertEqual(os.path.basename(bbappendfile), '%s_%%.bbappend' % testrecipe)
- @testcase(1281)
def test_recipetool_appendsrcfile_subdir_basic(self):
self._test_appendsrcfile('base-files', 'a-file', 'tmp')
- @testcase(1282)
def test_recipetool_appendsrcfile_subdir_basic_dirdest(self):
self._test_appendsrcfile('base-files', destdir='tmp')
- @testcase(1280)
def test_recipetool_appendsrcfile_srcdir_basic(self):
testrecipe = 'bash'
- srcdir = get_bb_var('S', testrecipe)
- workdir = get_bb_var('WORKDIR', testrecipe)
+ bb_vars = get_bb_vars(['S', 'WORKDIR'], testrecipe)
+ srcdir = bb_vars['S']
+ workdir = bb_vars['WORKDIR']
subdir = os.path.relpath(srcdir, workdir)
self._test_appendsrcfile(testrecipe, 'a-file', srcdir=subdir)
- @testcase(1275)
def test_recipetool_appendsrcfile_existing_in_src_uri(self):
testrecipe = 'base-files'
filepath = self._get_first_file_uri(testrecipe)
self.assertTrue(filepath, 'Unable to test, no file:// uri found in SRC_URI for %s' % testrecipe)
self._test_appendsrcfile(testrecipe, filepath, has_src_uri=False)
- @testcase(1276)
def test_recipetool_appendsrcfile_existing_in_src_uri_diff_params(self):
testrecipe = 'base-files'
subdir = 'tmp'
@@ -621,19 +675,20 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
output = self._test_appendsrcfile(testrecipe, filepath, subdir, has_src_uri=False)
self.assertTrue(any('with different parameters' in l for l in output))
- @testcase(1277)
def test_recipetool_appendsrcfile_replace_file_srcdir(self):
testrecipe = 'bash'
filepath = 'Makefile.in'
- srcdir = get_bb_var('S', testrecipe)
- workdir = get_bb_var('WORKDIR', testrecipe)
+ bb_vars = get_bb_vars(['S', 'WORKDIR'], testrecipe)
+ srcdir = bb_vars['S']
+ workdir = bb_vars['WORKDIR']
subdir = os.path.relpath(srcdir, workdir)
self._test_appendsrcfile(testrecipe, filepath, srcdir=subdir)
bitbake('%s:do_unpack' % testrecipe)
- self.assertEqual(open(self.testfile, 'r').read(), open(os.path.join(srcdir, filepath), 'r').read())
+ with open(self.testfile, 'r') as testfile:
+ with open(os.path.join(srcdir, filepath), 'r') as makefilein:
+ self.assertEqual(testfile.read(), makefilein.read())
- @testcase(1278)
def test_recipetool_appendsrcfiles_basic(self, destdir=None):
newfiles = [self.testfile]
for i in range(1, 5):
@@ -643,6 +698,5 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
newfiles.append(testfile)
self._test_appendsrcfiles('gcc', newfiles, destdir=destdir, options='-W')
- @testcase(1279)
def test_recipetool_appendsrcfiles_basic_subdir(self):
self.test_recipetool_appendsrcfiles_basic(destdir='testdir')
diff --git a/meta/lib/oeqa/selftest/cases/recipeutils.py b/meta/lib/oeqa/selftest/cases/recipeutils.py
new file mode 100644
index 0000000000..747870383b
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/recipeutils.py
@@ -0,0 +1,140 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+import time
+import logging
+import bb.tinfoil
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, get_test_layer
+
+
+def setUpModule():
+ global tinfoil
+ global metaselftestpath
+ metaselftestpath = get_test_layer()
+ tinfoil = bb.tinfoil.Tinfoil(tracking=True)
+ tinfoil.prepare(config_only=False, quiet=2)
+
+
+def tearDownModule():
+ tinfoil.shutdown()
+
+
+class RecipeUtilsTests(OESelftestTestCase):
+ """ Tests for the recipeutils module functions """
+
+ def test_patch_recipe_varflag(self):
+ import oe.recipeutils
+ rd = tinfoil.parse_recipe('python3-async-test')
+ vals = {'SRC_URI[md5sum]': 'aaaaaa', 'LICENSE': 'something'}
+ patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=metaselftestpath)
+
+ expected_patch = """
+--- a/recipes-devtools/python/python-async-test.inc
++++ b/recipes-devtools/python/python-async-test.inc
+@@ -1,14 +1,14 @@
+ SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
+ HOMEPAGE = "http://github.com/gitpython-developers/async"
+ SECTION = "devel/python"
+-LICENSE = "BSD"
++LICENSE = "something"
+ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
+
+ inherit pypi
+
+ PYPI_PACKAGE = "async"
+
+-SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
++SRC_URI[md5sum] = "aaaaaa"
+ SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
+
+ RDEPENDS_${PN} += "${PYTHON_PN}-threading"
+"""
+ patchlines = []
+ for f in patches:
+ for line in f:
+ patchlines.append(line)
+ self.maxDiff = None
+ self.assertEqual(''.join(patchlines).strip(), expected_patch.strip())
+
+
+ def test_patch_recipe_singleappend(self):
+ import oe.recipeutils
+ rd = tinfoil.parse_recipe('recipeutils-test')
+ val = rd.getVar('SRC_URI', False).split()
+ del val[1]
+ val = ' '.join(val)
+ vals = {'SRC_URI': val}
+ patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=metaselftestpath)
+
+ expected_patch = """
+--- a/recipes-test/recipeutils/recipeutils-test_1.2.bb
++++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb
+@@ -8,6 +8,4 @@
+
+ BBCLASSEXTEND = "native nativesdk"
+
+-SRC_URI += "file://somefile"
+-
+ SRC_URI_append = " file://anotherfile"
+"""
+ patchlines = []
+ for f in patches:
+ for line in f:
+ patchlines.append(line)
+ self.assertEqual(''.join(patchlines).strip(), expected_patch.strip())
+
+
+ def test_patch_recipe_appends(self):
+ import oe.recipeutils
+ rd = tinfoil.parse_recipe('recipeutils-test')
+ val = rd.getVar('SRC_URI', False).split()
+ vals = {'SRC_URI': val[0]}
+ patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=metaselftestpath)
+
+ expected_patch = """
+--- a/recipes-test/recipeutils/recipeutils-test_1.2.bb
++++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb
+@@ -8,6 +8,3 @@
+
+ BBCLASSEXTEND = "native nativesdk"
+
+-SRC_URI += "file://somefile"
+-
+-SRC_URI_append = " file://anotherfile"
+"""
+ patchlines = []
+ for f in patches:
+ for line in f:
+ patchlines.append(line)
+ self.assertEqual(''.join(patchlines).strip(), expected_patch.strip())
+
+
+ def test_validate_pn(self):
+ import oe.recipeutils
+ expected_results = {
+ 'test': '',
+ 'glib-2.0': '',
+ 'gtk+': '',
+ 'forcevariable': 'reserved',
+ 'pn-something': 'reserved',
+ 'test.bb': 'file',
+ 'test_one': 'character',
+ 'test!': 'character',
+ }
+
+ for pn, expected in expected_results.items():
+ result = oe.recipeutils.validate_pn(pn)
+ if expected:
+ self.assertIn(expected, result)
+ else:
+ self.assertEqual(result, '')
+
+ def test_split_var_value(self):
+ import oe.recipeutils
+ res = oe.recipeutils.split_var_value('test.1 test.2 ${@call_function("hi there world", false)} test.4')
+ self.assertEqual(res, ['test.1', 'test.2', '${@call_function("hi there world", false)}', 'test.4'])
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
new file mode 100644
index 0000000000..db538a4f89
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -0,0 +1,202 @@
+#
+# SPDX-License-Identifier: MIT
+#
+# Copyright 2019 by Garmin Ltd. or its subsidiaries
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+import bb.utils
+import functools
+import multiprocessing
+import textwrap
+import json
+import unittest
+import tempfile
+import shutil
+import stat
+import os
+
+MISSING = 'MISSING'
+DIFFERENT = 'DIFFERENT'
+SAME = 'SAME'
+
+@functools.total_ordering
+class CompareResult(object):
+ def __init__(self):
+ self.reference = None
+ self.test = None
+ self.status = 'UNKNOWN'
+
+ def __eq__(self, other):
+ return (self.status, self.test) == (other.status, other.test)
+
+ def __lt__(self, other):
+ return (self.status, self.test) < (other.status, other.test)
+
+class PackageCompareResults(object):
+ def __init__(self):
+ self.total = []
+ self.missing = []
+ self.different = []
+ self.same = []
+
+ def add_result(self, r):
+ self.total.append(r)
+ if r.status == MISSING:
+ self.missing.append(r)
+ elif r.status == DIFFERENT:
+ self.different.append(r)
+ else:
+ self.same.append(r)
+
+ def sort(self):
+ self.total.sort()
+ self.missing.sort()
+ self.different.sort()
+ self.same.sort()
+
+ def __str__(self):
+ return 'same=%i different=%i missing=%i total=%i' % (len(self.same), len(self.different), len(self.missing), len(self.total))
+
+def compare_file(reference, test, diffutils_sysroot):
+ result = CompareResult()
+ result.reference = reference
+ result.test = test
+
+ if not os.path.exists(reference):
+ result.status = MISSING
+ return result
+
+ r = runCmd(['cmp', '--quiet', reference, test], native_sysroot=diffutils_sysroot, ignore_status=True)
+
+ if r.status:
+ result.status = DIFFERENT
+ return result
+
+ result.status = SAME
+ return result
+
+class ReproducibleTests(OESelftestTestCase):
+ package_classes = ['deb', 'ipk']
+ images = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline']
+ save_results = False
+
+ def setUpLocal(self):
+ super().setUpLocal()
+ needed_vars = ['TOPDIR', 'TARGET_PREFIX', 'BB_NUMBER_THREADS']
+ bb_vars = get_bb_vars(needed_vars)
+ for v in needed_vars:
+ setattr(self, v.lower(), bb_vars[v])
+
+ self.extrasresults = {}
+ self.extrasresults.setdefault('reproducible.rawlogs', {})['log'] = ''
+ self.extrasresults.setdefault('reproducible', {}).setdefault('files', {})
+
+ def append_to_log(self, msg):
+ self.extrasresults['reproducible.rawlogs']['log'] += msg
+
+ def compare_packages(self, reference_dir, test_dir, diffutils_sysroot):
+ result = PackageCompareResults()
+
+ old_cwd = os.getcwd()
+ try:
+ file_result = {}
+ os.chdir(test_dir)
+ with multiprocessing.Pool(processes=int(self.bb_number_threads or 0)) as p:
+ for root, dirs, files in os.walk('.'):
+ async_result = []
+ for f in files:
+ reference_path = os.path.join(reference_dir, root, f)
+ test_path = os.path.join(test_dir, root, f)
+ async_result.append(p.apply_async(compare_file, (reference_path, test_path, diffutils_sysroot)))
+
+ for a in async_result:
+ result.add_result(a.get())
+
+ finally:
+ os.chdir(old_cwd)
+
+ result.sort()
+ return result
+
+ def write_package_list(self, package_class, name, packages):
+ self.extrasresults['reproducible']['files'].setdefault(package_class, {})[name] = [
+ {'reference': p.reference, 'test': p.test} for p in packages]
+
+ def copy_file(self, source, dest):
+ bb.utils.mkdirhier(os.path.dirname(dest))
+ shutil.copyfile(source, dest)
+
+ def test_reproducible_builds(self):
+ capture_vars = ['DEPLOY_DIR_' + c.upper() for c in self.package_classes]
+
+ if self.save_results:
+ save_dir = tempfile.mkdtemp(prefix='oe-reproducible-')
+ os.chmod(save_dir, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
+ self.logger.info('Non-reproducible packages will be copied to %s', save_dir)
+
+ # Build native utilities
+ self.write_config('')
+ bitbake("diffutils-native -c addto_recipe_sysroot")
+ diffutils_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "diffutils-native")
+
+ # Reproducible builds should not pull from sstate or mirrors, but
+ # sharing DL_DIR is fine
+ common_config = textwrap.dedent('''\
+ INHERIT += "reproducible_build"
+ PACKAGE_CLASSES = "%s"
+ SSTATE_DIR = "${TMPDIR}/sstate"
+ ''') % (' '.join('package_%s' % c for c in self.package_classes))
+
+ # Perform a build.
+ reproducibleA_tmp = os.path.join(self.topdir, 'reproducibleA', 'tmp')
+ if os.path.exists(reproducibleA_tmp):
+ bb.utils.remove(reproducibleA_tmp, recurse=True)
+
+ self.write_config((textwrap.dedent('''\
+ TMPDIR = "%s"
+ ''') % reproducibleA_tmp) + common_config)
+ vars_A = get_bb_vars(capture_vars)
+ bitbake(' '.join(self.images))
+
+ # Perform another build.
+ reproducibleB_tmp = os.path.join(self.topdir, 'reproducibleB', 'tmp')
+ if os.path.exists(reproducibleB_tmp):
+ bb.utils.remove(reproducibleB_tmp, recurse=True)
+
+ self.write_config((textwrap.dedent('''\
+ SSTATE_MIRROR = ""
+ TMPDIR = "%s"
+ ''') % reproducibleB_tmp) + common_config)
+ vars_B = get_bb_vars(capture_vars)
+ bitbake(' '.join(self.images))
+
+ # NOTE: The temp directories from the reproducible build are purposely
+ # kept after the build so it can be diffed for debugging.
+
+ for c in self.package_classes:
+ with self.subTest(package_class=c):
+ package_class = 'package_' + c
+
+ deploy_A = vars_A['DEPLOY_DIR_' + c.upper()]
+ deploy_B = vars_B['DEPLOY_DIR_' + c.upper()]
+
+ result = self.compare_packages(deploy_A, deploy_B, diffutils_sysroot)
+
+ self.logger.info('Reproducibility summary for %s: %s' % (c, result))
+
+ self.append_to_log('\n'.join("%s: %s" % (r.status, r.test) for r in result.total))
+
+ self.write_package_list(package_class, 'missing', result.missing)
+ self.write_package_list(package_class, 'different', result.different)
+ self.write_package_list(package_class, 'same', result.same)
+
+ if self.save_results:
+ for d in result.different:
+ self.copy_file(d.reference, '/'.join([save_dir, d.reference]))
+ self.copy_file(d.test, '/'.join([save_dir, d.test]))
+
+ if result.missing or result.different:
+ self.fail("The following %s packages are missing or different: %s" %
+ (c, ' '.join(r.test for r in (result.missing + result.different))))
+
diff --git a/meta/lib/oeqa/selftest/cases/resulttooltests.py b/meta/lib/oeqa/selftest/cases/resulttooltests.py
new file mode 100644
index 0000000000..dac5c46801
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/resulttooltests.py
@@ -0,0 +1,98 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import sys
+basepath = os.path.abspath(os.path.dirname(__file__) + '/../../../../../')
+lib_path = basepath + '/scripts/lib'
+sys.path = sys.path + [lib_path]
+from resulttool.report import ResultsTextReport
+from resulttool import regression as regression
+from resulttool import resultutils as resultutils
+from oeqa.selftest.case import OESelftestTestCase
+
+class ResultToolTests(OESelftestTestCase):
+ base_results_data = {'base_result1': {'configuration': {"TEST_TYPE": "runtime",
+ "TESTSERIES": "series1",
+ "IMAGE_BASENAME": "image",
+ "IMAGE_PKGTYPE": "ipk",
+ "DISTRO": "mydistro",
+ "MACHINE": "qemux86"},
+ 'result': {}},
+ 'base_result2': {'configuration': {"TEST_TYPE": "runtime",
+ "TESTSERIES": "series1",
+ "IMAGE_BASENAME": "image",
+ "IMAGE_PKGTYPE": "ipk",
+ "DISTRO": "mydistro",
+ "MACHINE": "qemux86-64"},
+ 'result': {}}}
+ target_results_data = {'target_result1': {'configuration': {"TEST_TYPE": "runtime",
+ "TESTSERIES": "series1",
+ "IMAGE_BASENAME": "image",
+ "IMAGE_PKGTYPE": "ipk",
+ "DISTRO": "mydistro",
+ "MACHINE": "qemux86"},
+ 'result': {}},
+ 'target_result2': {'configuration': {"TEST_TYPE": "runtime",
+ "TESTSERIES": "series1",
+ "IMAGE_BASENAME": "image",
+ "IMAGE_PKGTYPE": "ipk",
+ "DISTRO": "mydistro",
+ "MACHINE": "qemux86"},
+ 'result': {}},
+ 'target_result3': {'configuration': {"TEST_TYPE": "runtime",
+ "TESTSERIES": "series1",
+ "IMAGE_BASENAME": "image",
+ "IMAGE_PKGTYPE": "ipk",
+ "DISTRO": "mydistro",
+ "MACHINE": "qemux86-64"},
+ 'result': {}}}
+
+ def test_report_can_aggregate_test_result(self):
+ result_data = {'result': {'test1': {'status': 'PASSED'},
+ 'test2': {'status': 'PASSED'},
+ 'test3': {'status': 'FAILED'},
+ 'test4': {'status': 'ERROR'},
+ 'test5': {'status': 'SKIPPED'}}}
+ report = ResultsTextReport()
+ result_report = report.get_aggregated_test_result(None, result_data, 'DummyMachine')
+ self.assertTrue(result_report['passed'] == 2, msg="Passed count not correct:%s" % result_report['passed'])
+ self.assertTrue(result_report['failed'] == 2, msg="Failed count not correct:%s" % result_report['failed'])
+ self.assertTrue(result_report['skipped'] == 1, msg="Skipped count not correct:%s" % result_report['skipped'])
+
+ def test_regression_can_get_regression_base_target_pair(self):
+
+ results = {}
+ resultutils.append_resultsdata(results, ResultToolTests.base_results_data)
+ resultutils.append_resultsdata(results, ResultToolTests.target_results_data)
+ self.assertTrue('target_result1' in results['runtime/mydistro/qemux86/image'], msg="Pair not correct:%s" % results)
+ self.assertTrue('target_result3' in results['runtime/mydistro/qemux86-64/image'], msg="Pair not correct:%s" % results)
+
+ def test_regrresion_can_get_regression_result(self):
+ base_result_data = {'result': {'test1': {'status': 'PASSED'},
+ 'test2': {'status': 'PASSED'},
+ 'test3': {'status': 'FAILED'},
+ 'test4': {'status': 'ERROR'},
+ 'test5': {'status': 'SKIPPED'}}}
+ target_result_data = {'result': {'test1': {'status': 'PASSED'},
+ 'test2': {'status': 'FAILED'},
+ 'test3': {'status': 'PASSED'},
+ 'test4': {'status': 'ERROR'},
+ 'test5': {'status': 'SKIPPED'}}}
+ result, text = regression.compare_result(self.logger, "BaseTestRunName", "TargetTestRunName", base_result_data, target_result_data)
+ self.assertTrue(result['test2']['base'] == 'PASSED',
+ msg="regression not correct:%s" % result['test2']['base'])
+ self.assertTrue(result['test2']['target'] == 'FAILED',
+ msg="regression not correct:%s" % result['test2']['target'])
+ self.assertTrue(result['test3']['base'] == 'FAILED',
+ msg="regression not correct:%s" % result['test3']['base'])
+ self.assertTrue(result['test3']['target'] == 'PASSED',
+ msg="regression not correct:%s" % result['test3']['target'])
+
+ def test_merge_can_merged_results(self):
+ results = {}
+ resultutils.append_resultsdata(results, ResultToolTests.base_results_data, configmap=resultutils.flatten_map)
+ resultutils.append_resultsdata(results, ResultToolTests.target_results_data, configmap=resultutils.flatten_map)
+ self.assertEqual(len(results[''].keys()), 5, msg="Flattened results not correct %s" % str(results))
+
diff --git a/meta/lib/oeqa/selftest/cases/runcmd.py b/meta/lib/oeqa/selftest/cases/runcmd.py
new file mode 100644
index 0000000000..3755764ee7
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/runcmd.py
@@ -0,0 +1,121 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd
+from oeqa.utils import CommandError
+
+import subprocess
+import threading
+import time
+import signal
+
+class MemLogger(object):
+ def __init__(self):
+ self.info_msgs = []
+ self.error_msgs = []
+
+ def info(self, msg):
+ self.info_msgs.append(msg)
+
+ def error(self, msg):
+ self.error_msgs.append(msg)
+
+class RunCmdTests(OESelftestTestCase):
+ """ Basic tests for runCmd() utility function """
+
+ # The delta is intentionally smaller than the timeout, to detect cases where
+ # we incorrectly apply the timeout more than once.
+ TIMEOUT = 5
+ DELTA = 3
+
+ def test_result_okay(self):
+ result = runCmd("true")
+ self.assertEqual(result.status, 0)
+
+ def test_result_false(self):
+ result = runCmd("false", ignore_status=True)
+ self.assertEqual(result.status, 1)
+
+ def test_shell(self):
+ # A shell is used for all string commands.
+ result = runCmd("false; true", ignore_status=True)
+ self.assertEqual(result.status, 0)
+
+ def test_no_shell(self):
+ self.assertRaises(FileNotFoundError,
+ runCmd, "false; true", shell=False)
+
+ def test_list_not_found(self):
+ self.assertRaises(FileNotFoundError,
+ runCmd, ["false; true"])
+
+ def test_list_okay(self):
+ result = runCmd(["true"])
+ self.assertEqual(result.status, 0)
+
+ def test_result_assertion(self):
+ self.assertRaisesRegexp(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar",
+ runCmd, "echo foobar >&2; false", shell=True)
+
+ def test_result_exception(self):
+ self.assertRaisesRegexp(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar",
+ runCmd, "echo foobar >&2; false", shell=True, assert_error=False)
+
+ def test_output(self):
+ result = runCmd("echo stdout; echo stderr >&2", shell=True)
+ self.assertEqual("stdout\nstderr", result.output)
+ self.assertEqual("", result.error)
+
+ def test_output_split(self):
+ result = runCmd("echo stdout; echo stderr >&2", shell=True, stderr=subprocess.PIPE)
+ self.assertEqual("stdout", result.output)
+ self.assertEqual("stderr", result.error)
+
+ def test_timeout(self):
+ numthreads = threading.active_count()
+ start = time.time()
+ # Killing a hanging process only works when not using a shell?!
+ result = runCmd(['sleep', '60'], timeout=self.TIMEOUT, ignore_status=True)
+ self.assertEqual(result.status, -signal.SIGTERM)
+ end = time.time()
+ self.assertLess(end - start, self.TIMEOUT + self.DELTA)
+ self.assertEqual(numthreads, threading.active_count())
+
+ def test_timeout_split(self):
+ numthreads = threading.active_count()
+ start = time.time()
+ # Killing a hanging process only works when not using a shell?!
+ result = runCmd(['sleep', '60'], timeout=self.TIMEOUT, ignore_status=True, stderr=subprocess.PIPE)
+ self.assertEqual(result.status, -signal.SIGTERM)
+ end = time.time()
+ self.assertLess(end - start, self.TIMEOUT + self.DELTA)
+ self.assertEqual(numthreads, threading.active_count())
+
+ def test_stdin(self):
+ numthreads = threading.active_count()
+ result = runCmd("cat", data=b"hello world", timeout=self.TIMEOUT)
+ self.assertEqual("hello world", result.output)
+ self.assertEqual(numthreads, threading.active_count())
+
+ def test_stdin_timeout(self):
+ numthreads = threading.active_count()
+ start = time.time()
+ result = runCmd(['sleep', '60'], data=b"hello world", timeout=self.TIMEOUT, ignore_status=True)
+ self.assertEqual(result.status, -signal.SIGTERM)
+ end = time.time()
+ self.assertLess(end - start, self.TIMEOUT + self.DELTA)
+ self.assertEqual(numthreads, threading.active_count())
+
+ def test_log(self):
+ log = MemLogger()
+ result = runCmd("echo stdout; echo stderr >&2", shell=True, output_log=log)
+ self.assertEqual(["Running: echo stdout; echo stderr >&2", "stdout", "stderr"], log.info_msgs)
+ self.assertEqual([], log.error_msgs)
+
+ def test_log_split(self):
+ log = MemLogger()
+ result = runCmd("echo stdout; echo stderr >&2", shell=True, output_log=log, stderr=subprocess.PIPE)
+ self.assertEqual(["Running: echo stdout; echo stderr >&2", "stdout"], log.info_msgs)
+ self.assertEqual(["stderr"], log.error_msgs)
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
new file mode 100644
index 0000000000..7e676bcb41
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -0,0 +1,211 @@
+#
+# Copyright (c) 2017 Wind River Systems, Inc.
+#
+# SPDX-License-Identifier: MIT
+#
+
+import re
+import tempfile
+import time
+import oe.types
+from oeqa.core.decorator import OETestTag
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
+
+class RunqemuTests(OESelftestTestCase):
+ """Runqemu test class"""
+
+ image_is_ready = False
+ deploy_dir_image = ''
+
+ def setUpLocal(self):
+ super(RunqemuTests, self).setUpLocal()
+ self.recipe = 'core-image-minimal'
+ self.machine = 'qemux86-64'
+ self.fstypes = "ext4 iso hddimg wic.vmdk wic.qcow2 wic.vdi"
+ self.cmd_common = "runqemu nographic"
+
+ kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), 'x86_64')
+ if kvm:
+ self.cmd_common += " kvm"
+
+ self.write_config(
+"""
+MACHINE = "%s"
+IMAGE_FSTYPES = "%s"
+# 10 means 1 second
+SYSLINUX_TIMEOUT = "10"
+"""
+% (self.machine, self.fstypes)
+ )
+
+ if not RunqemuTests.image_is_ready:
+ RunqemuTests.deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ bitbake(self.recipe)
+ RunqemuTests.image_is_ready = True
+
+ def test_boot_machine(self):
+ """Test runqemu machine"""
+ cmd = "%s %s" % (self.cmd_common, self.machine)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read()))
+
+ def test_boot_machine_ext4(self):
+ """Test runqemu machine ext4"""
+ cmd = "%s %s ext4" % (self.cmd_common, self.machine)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertIn('rootfs.ext4', f.read(), "Failed: %s" % cmd)
+
+ def test_boot_machine_iso(self):
+ """Test runqemu machine iso"""
+ cmd = "%s %s iso" % (self.cmd_common, self.machine)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertIn('media=cdrom', f.read(), "Failed: %s" % cmd)
+
+ def test_boot_recipe_image(self):
+ """Test runqemu recipe-image"""
+ cmd = "%s %s" % (self.cmd_common, self.recipe)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read()))
+
+
+ def test_boot_recipe_image_vmdk(self):
+ """Test runqemu recipe-image vmdk"""
+ cmd = "%s %s wic.vmdk" % (self.cmd_common, self.recipe)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertIn('format=vmdk', f.read(), "Failed: %s" % cmd)
+
+ def test_boot_recipe_image_vdi(self):
+ """Test runqemu recipe-image vdi"""
+ cmd = "%s %s wic.vdi" % (self.cmd_common, self.recipe)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertIn('format=vdi', f.read(), "Failed: %s" % cmd)
+
+ def test_boot_deploy(self):
+ """Test runqemu deploy_dir_image"""
+ cmd = "%s %s" % (self.cmd_common, self.deploy_dir_image)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read()))
+
+
+ def test_boot_deploy_hddimg(self):
+ """Test runqemu deploy_dir_image hddimg"""
+ cmd = "%s %s hddimg" % (self.cmd_common, self.deploy_dir_image)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertTrue(re.search('file=.*.hddimg', f.read()), "Failed: %s, %s" % (cmd, f.read()))
+
+ def test_boot_machine_slirp(self):
+ """Test runqemu machine slirp"""
+ cmd = "%s slirp %s" % (self.cmd_common, self.machine)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertIn(' -netdev user', f.read(), "Failed: %s" % cmd)
+
+ def test_boot_machine_slirp_qcow2(self):
+ """Test runqemu machine slirp qcow2"""
+ cmd = "%s slirp wic.qcow2 %s" % (self.cmd_common, self.machine)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertIn('format=qcow2', f.read(), "Failed: %s" % cmd)
+
+ def test_boot_qemu_boot(self):
+ """Test runqemu /path/to/image.qemuboot.conf"""
+ qemuboot_conf = "%s-%s.qemuboot.conf" % (self.recipe, self.machine)
+ qemuboot_conf = os.path.join(self.deploy_dir_image, qemuboot_conf)
+ if not os.path.exists(qemuboot_conf):
+ self.skipTest("%s not found" % qemuboot_conf)
+ cmd = "%s %s" % (self.cmd_common, qemuboot_conf)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read()))
+
+ def test_boot_rootfs(self):
+ """Test runqemu /path/to/rootfs.ext4"""
+ rootfs = "%s-%s.ext4" % (self.recipe, self.machine)
+ rootfs = os.path.join(self.deploy_dir_image, rootfs)
+ if not os.path.exists(rootfs):
+ self.skipTest("%s not found" % rootfs)
+ cmd = "%s %s" % (self.cmd_common, rootfs)
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ with open(qemu.qemurunnerlog) as f:
+ self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read()))
+
+
+# This test was designed as a separate class to test that shutdown
+# command will shutdown qemu as expected on each qemu architecture
+# based on the MACHINE configuration inside the config file
+# (eg. local.conf).
+#
+# This was different compared to RunqemuTests, where RunqemuTests was
+# dedicated for MACHINE=qemux86-64 where it test that qemux86-64 will
+# bootup various filesystem types, including live image(iso and hddimg)
+# where live image was not supported on all qemu architecture.
+@OETestTag("machine")
+class QemuTest(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(QemuTest, cls).setUpClass()
+ cls.recipe = 'core-image-minimal'
+ cls.machine = get_bb_var('MACHINE')
+ cls.deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ cls.cmd_common = "runqemu nographic"
+ cls.qemuboot_conf = "%s-%s.qemuboot.conf" % (cls.recipe, cls.machine)
+ cls.qemuboot_conf = os.path.join(cls.deploy_dir_image, cls.qemuboot_conf)
+ bitbake(cls.recipe)
+
+ def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, timeout):
+ qemu.run_serial("shutdown -h now")
+ # Stop thread will stop the LoggingThread instance used for logging
+ # qemu through serial console, stop thread will prevent this code
+ # from facing exception (Console connection closed unexpectedly)
+ # when qemu was shutdown by the above shutdown command
+ qemu.runner.stop_thread()
+ time_track = 0
+ try:
+ while True:
+ is_alive = qemu.check()
+ if not is_alive:
+ return True
+ if time_track > timeout:
+ return False
+ time.sleep(1)
+ time_track += 1
+ except SystemExit:
+ return True
+
+ def test_qemu_can_shutdown(self):
+ self.assertExists(self.qemuboot_conf)
+ cmd = "%s %s" % (self.cmd_common, self.qemuboot_conf)
+ shutdown_timeout = 120
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
+ self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
+
+ # Need to have portmap/rpcbind running to allow this test to work and
+ # current autobuilder setup does not have this.
+ def disabled_test_qemu_can_boot_nfs_and_shutdown(self):
+ self.assertExists(self.qemuboot_conf)
+ bitbake('meta-ide-support')
+ rootfs_tar = "%s-%s.tar.bz2" % (self.recipe, self.machine)
+ rootfs_tar = os.path.join(self.deploy_dir_image, rootfs_tar)
+ self.assertExists(rootfs_tar)
+ tmpdir = tempfile.mkdtemp(prefix='qemu_nfs')
+ tmpdir_nfs = os.path.join(tmpdir, 'nfs')
+ cmd_extract_nfs = 'runqemu-extract-sdk %s %s' % (rootfs_tar, tmpdir_nfs)
+ result = runCmd(cmd_extract_nfs)
+ self.assertEqual(0, result.status, "runqemu-extract-sdk didn't run as expected. %s" % result.output)
+ cmd = "%s nfs %s %s" % (self.cmd_common, self.qemuboot_conf, tmpdir_nfs)
+ shutdown_timeout = 120
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
+ self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
+ runCmd('rm -rf %s' % tmpdir)
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
new file mode 100644
index 0000000000..60cb2e01a6
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -0,0 +1,439 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu
+from oeqa.utils.sshcontrol import SSHControl
+import os
+import re
+import tempfile
+import shutil
+import oe.lsb
+from oeqa.core.decorator.data import skipIfNotQemu
+
+class TestExport(OESelftestTestCase):
+
+ @classmethod
+ def tearDownClass(cls):
+ runCmd("rm -rf /tmp/sdk")
+ super(TestExport, cls).tearDownClass()
+
+ def test_testexport_basic(self):
+ """
+ Summary: Check basic testexport functionality with only ping test enabled.
+ Expected: 1. testexport directory must be created.
+ 2. runexported.py must run without any error/exception.
+ 3. ping test must succeed.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ features = 'INHERIT += "testexport"\n'
+ # These aren't the actual IP addresses but testexport class needs something defined
+ features += 'TEST_SERVER_IP = "192.168.7.1"\n'
+ features += 'TEST_TARGET_IP = "192.168.7.1"\n'
+ features += 'TEST_SUITES = "ping"\n'
+ self.write_config(features)
+
+ # Build tesexport for core-image-minimal
+ bitbake('core-image-minimal')
+ bitbake('-c testexport core-image-minimal')
+
+ testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
+
+ # Verify if TEST_EXPORT_DIR was created
+ isdir = os.path.isdir(testexport_dir)
+ self.assertEqual(True, isdir, 'Failed to create testexport dir: %s' % testexport_dir)
+
+ with runqemu('core-image-minimal') as qemu:
+ # Attempt to run runexported.py to perform ping test
+ test_path = os.path.join(testexport_dir, "oe-test")
+ data_file = os.path.join(testexport_dir, 'data', 'testdata.json')
+ manifest = os.path.join(testexport_dir, 'data', 'manifest')
+ cmd = ("%s runtime --test-data-file %s --packages-manifest %s "
+ "--target-ip %s --server-ip %s --quiet"
+ % (test_path, data_file, manifest, qemu.ip, qemu.server_ip))
+ result = runCmd(cmd)
+ # Verify ping test was succesful
+ self.assertEqual(0, result.status, 'oe-test runtime returned a non 0 status')
+
+ def test_testexport_sdk(self):
+ """
+ Summary: Check sdk functionality for testexport.
+ Expected: 1. testexport directory must be created.
+ 2. SDK tarball must exists.
+ 3. Uncompressing of tarball must succeed.
+ 4. Check if the SDK directory is added to PATH.
+ 5. Run tar from the SDK directory.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ features = 'INHERIT += "testexport"\n'
+ # These aren't the actual IP addresses but testexport class needs something defined
+ features += 'TEST_SERVER_IP = "192.168.7.1"\n'
+ features += 'TEST_TARGET_IP = "192.168.7.1"\n'
+ features += 'TEST_SUITES = "ping"\n'
+ features += 'TEST_EXPORT_SDK_ENABLED = "1"\n'
+ features += 'TEST_EXPORT_SDK_PACKAGES = "nativesdk-tar"\n'
+ self.write_config(features)
+
+ # Build tesexport for core-image-minimal
+ bitbake('core-image-minimal')
+ bitbake('-c testexport core-image-minimal')
+
+ needed_vars = ['TEST_EXPORT_DIR', 'TEST_EXPORT_SDK_DIR', 'TEST_EXPORT_SDK_NAME']
+ bb_vars = get_bb_vars(needed_vars, 'core-image-minimal')
+ testexport_dir = bb_vars['TEST_EXPORT_DIR']
+ sdk_dir = bb_vars['TEST_EXPORT_SDK_DIR']
+ sdk_name = bb_vars['TEST_EXPORT_SDK_NAME']
+
+ # Check for SDK
+ tarball_name = "%s.sh" % sdk_name
+ tarball_path = os.path.join(testexport_dir, sdk_dir, tarball_name)
+ msg = "Couldn't find SDK tarball: %s" % tarball_path
+ self.assertEqual(os.path.isfile(tarball_path), True, msg)
+
+ # Extract SDK and run tar from SDK
+ result = runCmd("%s -y -d /tmp/sdk" % tarball_path)
+ self.assertEqual(0, result.status, "Couldn't extract SDK")
+
+ env_script = result.output.split()[-1]
+ result = runCmd(". %s; which tar" % env_script, shell=True)
+ self.assertEqual(0, result.status, "Couldn't setup SDK environment")
+ is_sdk_tar = True if "/tmp/sdk" in result.output else False
+ self.assertTrue(is_sdk_tar, "Couldn't setup SDK environment")
+
+ tar_sdk = result.output
+ result = runCmd("%s --version" % tar_sdk)
+ self.assertEqual(0, result.status, "Couldn't run tar from SDK")
+
+
+class TestImage(OESelftestTestCase):
+
+ def test_testimage_install(self):
+ """
+ Summary: Check install packages functionality for testimage/testexport.
+ Expected: 1. Import tests from a directory other than meta.
+ 2. Check install/uninstall of socat.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+ if get_bb_var('DISTRO') == 'poky-tiny':
+ self.skipTest('core-image-full-cmdline not buildable for poky-tiny')
+
+ features = 'INHERIT += "testimage"\n'
+ features += 'IMAGE_INSTALL_append = " libssl"\n'
+ features += 'TEST_SUITES = "ping ssh selftest"\n'
+ self.write_config(features)
+
+ # Build core-image-sato and testimage
+ bitbake('core-image-full-cmdline socat')
+ bitbake('-c testimage core-image-full-cmdline')
+
+ def test_testimage_dnf(self):
+ """
+ Summary: Check package feeds functionality for dnf
+ Expected: 1. Check that remote package feeds can be accessed
+ Product: oe-core
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ """
+ if get_bb_var('DISTRO') == 'poky-tiny':
+ self.skipTest('core-image-full-cmdline not buildable for poky-tiny')
+
+ features = 'INHERIT += "testimage"\n'
+ features += 'TEST_SUITES = "ping ssh dnf_runtime dnf.DnfBasicTest.test_dnf_help"\n'
+ # We don't yet know what the server ip and port will be - they will be patched
+ # in at the start of the on-image test
+ features += 'PACKAGE_FEED_URIS = "http://bogus_ip:bogus_port"\n'
+ features += 'EXTRA_IMAGE_FEATURES += "package-management"\n'
+ features += 'PACKAGE_CLASSES = "package_rpm"\n'
+
+ bitbake('gnupg-native -c addto_recipe_sysroot')
+
+ # Enable package feed signing
+ self.gpg_home = tempfile.mkdtemp(prefix="oeqa-feed-sign-")
+ self.track_for_cleanup(self.gpg_home)
+ signing_key_dir = os.path.join(self.testlayer_path, 'files', 'signing')
+ runCmd('gpg --batch --homedir %s --import %s' % (self.gpg_home, os.path.join(signing_key_dir, 'key.secret')), native_sysroot=get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native"))
+ features += 'INHERIT += "sign_package_feed"\n'
+ features += 'PACKAGE_FEED_GPG_NAME = "testuser"\n'
+ features += 'PACKAGE_FEED_GPG_PASSPHRASE_FILE = "%s"\n' % os.path.join(signing_key_dir, 'key.passphrase')
+ features += 'GPG_PATH = "%s"\n' % self.gpg_home
+ self.write_config(features)
+
+ # Build core-image-sato and testimage
+ bitbake('core-image-full-cmdline socat')
+ bitbake('-c testimage core-image-full-cmdline')
+
+ def test_testimage_virgl_gtk_sdl(self):
+ """
+ Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk and SDL frontends
+ Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled
+ 2. Check that kmscube demo runs without crashing.
+ Product: oe-core
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ """
+ if "DISPLAY" not in os.environ:
+ self.skipTest("virgl gtk test must be run inside a X session")
+ distro = oe.lsb.distro_identifier()
+ if distro and distro == 'debian-8':
+ self.skipTest('virgl isn\'t working with Debian 8')
+ if distro and distro == 'centos-7':
+ self.skipTest('virgl isn\'t working with Centos 7')
+ if distro and distro == 'opensuseleap-15.0':
+ self.skipTest('virgl isn\'t working with Opensuse 15.0')
+
+ qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
+ sdl_packageconfig = get_bb_var('PACKAGECONFIG', 'libsdl2-native')
+ features = 'INHERIT += "testimage"\n'
+ if 'gtk+' not in qemu_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n'
+ if 'sdl' not in qemu_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-qemu-system-native = " sdl"\n'
+ if 'virglrenderer' not in qemu_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n'
+ if 'glx' not in qemu_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
+ if 'opengl' not in sdl_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-libsdl2-native = " opengl"\n'
+ features += 'TEST_SUITES = "ping ssh virgl"\n'
+ features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
+ features += 'IMAGE_INSTALL_append = " kmscube"\n'
+ features_gtk = features + 'TEST_RUNQEMUPARAMS = "gtk gl"\n'
+ self.write_config(features_gtk)
+ bitbake('core-image-minimal')
+ bitbake('-c testimage core-image-minimal')
+ features_sdl = features + 'TEST_RUNQEMUPARAMS = "sdl gl"\n'
+ self.write_config(features_sdl)
+ bitbake('core-image-minimal')
+ bitbake('-c testimage core-image-minimal')
+
+ def test_testimage_virgl_headless(self):
+ """
+ Summary: Check host-assisted accelerate OpenGL functionality in qemu with egl-headless frontend
+ Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled
+ 2. Check that kmscube demo runs without crashing.
+ Product: oe-core
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ """
+ import subprocess, os
+ try:
+ content = os.listdir("/dev/dri")
+ if len([i for i in content if i.startswith('render')]) == 0:
+ self.skipTest("No render nodes found in /dev/dri: %s" %(content))
+ except FileNotFoundError:
+ self.skipTest("/dev/dri directory does not exist; no render nodes available on this machine.")
+ try:
+ dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True)
+ except subprocess.CalledProcessError as e:
+ self.skipTest("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
+ qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
+ features = 'INHERIT += "testimage"\n'
+ if 'virglrenderer' not in qemu_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n'
+ if 'glx' not in qemu_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
+ features += 'TEST_SUITES = "ping ssh virgl"\n'
+ features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
+ features += 'IMAGE_INSTALL_append = " kmscube"\n'
+ features += 'TEST_RUNQEMUPARAMS = "egl-headless"\n'
+ self.write_config(features)
+ bitbake('core-image-minimal')
+ bitbake('-c testimage core-image-minimal')
+
+class Postinst(OESelftestTestCase):
+
+ def init_manager_loop(self, init_manager):
+ import oe.path
+
+ vars = get_bb_vars(("IMAGE_ROOTFS", "sysconfdir"), "core-image-minimal")
+ rootfs = vars["IMAGE_ROOTFS"]
+ self.assertIsNotNone(rootfs)
+ sysconfdir = vars["sysconfdir"]
+ self.assertIsNotNone(sysconfdir)
+ # Need to use oe.path here as sysconfdir starts with /
+ hosttestdir = oe.path.join(rootfs, sysconfdir, "postinst-test")
+ targettestdir = os.path.join(sysconfdir, "postinst-test")
+
+ for classes in ("package_rpm", "package_deb", "package_ipk"):
+ with self.subTest(init_manager=init_manager, package_class=classes):
+ features = 'CORE_IMAGE_EXTRA_INSTALL = "postinst-delayed-b"\n'
+ features += 'IMAGE_FEATURES += "package-management empty-root-password"\n'
+ features += 'PACKAGE_CLASSES = "%s"\n' % classes
+ if init_manager == "systemd":
+ features += 'DISTRO_FEATURES_append = " systemd"\n'
+ features += 'VIRTUAL-RUNTIME_init_manager = "systemd"\n'
+ features += 'DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"\n'
+ features += 'VIRTUAL-RUNTIME_initscripts = ""\n'
+ self.write_config(features)
+
+ bitbake('core-image-minimal')
+
+ self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs")),
+ "rootfs state file was not created")
+
+ with runqemu('core-image-minimal') as qemu:
+ # Make the test echo a string and search for that as
+ # run_serial()'s status code is useless.'
+ for filename in ("rootfs", "delayed-a", "delayed-b"):
+ status, output = qemu.run_serial("test -f %s && echo found" % os.path.join(targettestdir, filename))
+ self.assertEqual(output, "found", "%s was not present on boot" % filename)
+
+
+
+ @skipIfNotQemu('qemuall', 'Test only runs in qemu')
+ def test_postinst_rootfs_and_boot_sysvinit(self):
+ """
+ Summary: The purpose of this test case is to verify Post-installation
+ scripts are called when rootfs is created and also test
+ that script can be delayed to run at first boot.
+ Dependencies: NA
+ Steps: 1. Add proper configuration to local.conf file
+ 2. Build a "core-image-minimal" image
+ 3. Verify that file created by postinst_rootfs recipe is
+ present on rootfs dir.
+ 4. Boot the image created on qemu and verify that the file
+ created by postinst_boot recipe is present on image.
+ Expected: The files are successfully created during rootfs and boot
+ time for 3 different package managers: rpm,ipk,deb and
+ for initialization managers: sysvinit.
+
+ """
+ self.init_manager_loop("sysvinit")
+
+
+ @skipIfNotQemu('qemuall', 'Test only runs in qemu')
+ def test_postinst_rootfs_and_boot_systemd(self):
+ """
+ Summary: The purpose of this test case is to verify Post-installation
+ scripts are called when rootfs is created and also test
+ that script can be delayed to run at first boot.
+ Dependencies: NA
+ Steps: 1. Add proper configuration to local.conf file
+ 2. Build a "core-image-minimal" image
+ 3. Verify that file created by postinst_rootfs recipe is
+ present on rootfs dir.
+ 4. Boot the image created on qemu and verify that the file
+ created by postinst_boot recipe is present on image.
+ Expected: The files are successfully created during rootfs and boot
+ time for 3 different package managers: rpm,ipk,deb and
+ for initialization managers: systemd.
+
+ """
+
+ self.init_manager_loop("systemd")
+
+
+ def test_failing_postinst(self):
+ """
+ Summary: The purpose of this test case is to verify that post-installation
+ scripts that contain errors are properly reported.
+ Expected: The scriptlet failure is properly reported.
+ The file that is created after the error in the scriptlet is not present.
+ Product: oe-core
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ """
+
+ import oe.path
+
+ vars = get_bb_vars(("IMAGE_ROOTFS", "sysconfdir"), "core-image-minimal")
+ rootfs = vars["IMAGE_ROOTFS"]
+ self.assertIsNotNone(rootfs)
+ sysconfdir = vars["sysconfdir"]
+ self.assertIsNotNone(sysconfdir)
+ # Need to use oe.path here as sysconfdir starts with /
+ hosttestdir = oe.path.join(rootfs, sysconfdir, "postinst-test")
+
+ for classes in ("package_rpm", "package_deb", "package_ipk"):
+ with self.subTest(package_class=classes):
+ features = 'CORE_IMAGE_EXTRA_INSTALL = "postinst-rootfs-failing"\n'
+ features += 'PACKAGE_CLASSES = "%s"\n' % classes
+ self.write_config(features)
+ bb_result = bitbake('core-image-minimal', ignore_status=True)
+ self.assertGreaterEqual(bb_result.output.find("Postinstall scriptlets of ['postinst-rootfs-failing'] have failed."), 0,
+ "Warning about a failed scriptlet not found in bitbake output: %s" %(bb_result.output))
+
+ self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs-before-failure")),
+ "rootfs-before-failure file was not created")
+ self.assertFalse(os.path.isfile(os.path.join(hosttestdir, "rootfs-after-failure")),
+ "rootfs-after-failure file was created")
+
+class SystemTap(OESelftestTestCase):
+ """
+ Summary: The purpose of this test case is to verify native crosstap
+ works while talking to a target.
+ Expected: The script should successfully connect to the qemu machine
+ and run some systemtap examples on a qemu machine.
+ """
+
+ @classmethod
+ def setUpClass(cls):
+ super(SystemTap, cls).setUpClass()
+ cls.image = "core-image-minimal"
+
+ def default_config(self):
+ return """
+# These aren't the actual IP addresses but testexport class needs something defined
+TEST_SERVER_IP = "192.168.7.1"
+TEST_TARGET_IP = "192.168.7.2"
+
+EXTRA_IMAGE_FEATURES += "tools-profile dbg-pkgs"
+IMAGE_FEATURES_append = " ssh-server-dropbear"
+
+# enables kernel debug symbols
+KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc"
+KERNEL_EXTRA_FEATURES_append = " features/systemtap/systemtap.scc"
+
+# add systemtap run-time into target image if it is not there yet
+IMAGE_INSTALL_append = " systemtap"
+"""
+
+ def test_crosstap_helloworld(self):
+ self.write_config(self.default_config())
+ bitbake('systemtap-native')
+ systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+ bitbake(self.image)
+
+ with runqemu(self.image) as qemu:
+ cmd = "crosstap -r root@192.168.7.2 -s %s/general/helloworld.stp " % systemtap_examples
+ result = runCmd(cmd)
+ self.assertEqual(0, result.status, 'crosstap helloworld returned a non 0 status:%s' % result.output)
+
+ def test_crosstap_pstree(self):
+ self.write_config(self.default_config())
+
+ bitbake('systemtap-native')
+ systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+ bitbake(self.image)
+
+ with runqemu(self.image) as qemu:
+ cmd = "crosstap -r root@192.168.7.2 -s %s/process/pstree.stp" % systemtap_examples
+ result = runCmd(cmd)
+ self.assertEqual(0, result.status, 'crosstap pstree returned a non 0 status:%s' % result.output)
+
+ def test_crosstap_syscalls_by_proc(self):
+ self.write_config(self.default_config())
+
+ bitbake('systemtap-native')
+ systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+ bitbake(self.image)
+
+ with runqemu(self.image) as qemu:
+ cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_proc.stp" % systemtap_examples
+ result = runCmd(cmd)
+ self.assertEqual(0, result.status, 'crosstap syscalls_by_proc returned a non 0 status:%s' % result.output)
+
+ def test_crosstap_syscalls_by_pid(self):
+ self.write_config(self.default_config())
+
+ bitbake('systemtap-native')
+ systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+ bitbake(self.image)
+
+ with runqemu(self.image) as qemu:
+ cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_pid.stp" % systemtap_examples
+ result = runCmd(cmd)
+ self.assertEqual(0, result.status, 'crosstap syscalls_by_pid returned a non 0 status:%s' % result.output)
+
diff --git a/meta/lib/oeqa/selftest/cases/selftest.py b/meta/lib/oeqa/selftest/cases/selftest.py
new file mode 100644
index 0000000000..af080dcf03
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/selftest.py
@@ -0,0 +1,53 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import importlib
+from oeqa.utils.commands import runCmd
+import oeqa.selftest
+from oeqa.selftest.case import OESelftestTestCase
+
+class ExternalLayer(OESelftestTestCase):
+
+ def test_list_imported(self):
+ """
+ Summary: Checks functionality to import tests from other layers.
+ Expected: 1. File "external-layer.py" must be in
+ oeqa.selftest.__path__
+ 2. test_unconditional_pas method must exists
+ in ImportedTests class
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ test_file = "external-layer.py"
+ test_module = "oeqa.selftest.cases.external-layer"
+ method_name = "test_unconditional_pass"
+
+ # Check if "external-layer.py" is in oeqa path
+ found_file = search_test_file(test_file)
+ self.assertTrue(found_file, msg="Can't find %s in the oeqa path" % test_file)
+
+ # Import oeqa.selftest.external-layer module and search for
+ # test_unconditional_pass method of ImportedTests class
+ found_method = search_method(test_module, method_name)
+ self.assertTrue(method_name, msg="Can't find %s method" % method_name)
+
+def search_test_file(file_name):
+ for layer_path in oeqa.selftest.__path__:
+ for _, _, files in os.walk(layer_path):
+ for f in files:
+ if f == file_name:
+ return True
+ return False
+
+def search_method(module, method):
+ modlib = importlib.import_module(module)
+ for var in vars(modlib):
+ klass = vars(modlib)[var]
+ if isinstance(klass, type(OESelftestTestCase)) and issubclass(klass, OESelftestTestCase):
+ for m in dir(klass):
+ if m == method:
+ return True
+ return False
+
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
new file mode 100644
index 0000000000..93b15ae681
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -0,0 +1,224 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, create_temp_layer
+import os
+import oe
+import glob
+import re
+import shutil
+import tempfile
+from contextlib import contextmanager
+from oeqa.utils.ftools import write_file
+
+
+class Signing(OESelftestTestCase):
+
+ gpg_dir = ""
+ pub_key_path = ""
+ secret_key_path = ""
+
+ def setup_gpg(self):
+ bitbake('gnupg-native -c addto_recipe_sysroot')
+
+ self.gpg_dir = tempfile.mkdtemp(prefix="oeqa-signing-")
+ self.track_for_cleanup(self.gpg_dir)
+
+ self.pub_key_path = os.path.join(self.testlayer_path, 'files', 'signing', "key.pub")
+ self.secret_key_path = os.path.join(self.testlayer_path, 'files', 'signing', "key.secret")
+
+ nsysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native")
+
+ runCmd('gpg --agent-program=`which gpg-agent`\|--auto-expand-secmem --batch --homedir %s --import %s %s' % (self.gpg_dir, self.pub_key_path, self.secret_key_path), native_sysroot=nsysroot)
+ return nsysroot + get_bb_var("bindir_native")
+
+
+ @contextmanager
+ def create_new_builddir(self, builddir, newbuilddir):
+ bb.utils.mkdirhier(newbuilddir)
+ oe.path.copytree(builddir + "/conf", newbuilddir + "/conf")
+ oe.path.copytree(builddir + "/cache", newbuilddir + "/cache")
+
+ origenv = os.environ.copy()
+
+ for e in os.environ:
+ if builddir in os.environ[e]:
+ os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
+
+ os.chdir(newbuilddir)
+ try:
+ yield
+ finally:
+ for e in origenv:
+ os.environ[e] = origenv[e]
+ os.chdir(builddir)
+
+ def test_signing_packages(self):
+ """
+ Summary: Test that packages can be signed in the package feed
+ Expected: Package should be signed with the correct key
+ Expected: Images can be created from signed packages
+ Product: oe-core
+ Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ Author: Alexander Kanavin <alex.kanavin@gmail.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+ import oe.packagedata
+
+ self.setup_gpg()
+
+ package_classes = get_bb_var('PACKAGE_CLASSES')
+ if 'package_rpm' not in package_classes:
+ self.skipTest('This test requires RPM Packaging.')
+
+ test_recipe = 'ed'
+
+ feature = 'INHERIT += "sign_rpm"\n'
+ feature += 'RPM_GPG_PASSPHRASE = "test123"\n'
+ feature += 'RPM_GPG_NAME = "testuser"\n'
+ feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
+
+ self.write_config(feature)
+
+ bitbake('-c clean %s' % test_recipe)
+ bitbake('-f -c package_write_rpm %s' % test_recipe)
+
+ self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
+
+ needed_vars = ['PKGDATA_DIR', 'DEPLOY_DIR_RPM', 'PACKAGE_ARCH', 'STAGING_BINDIR_NATIVE']
+ bb_vars = get_bb_vars(needed_vars, test_recipe)
+ pkgdatadir = bb_vars['PKGDATA_DIR']
+ pkgdata = oe.packagedata.read_pkgdatafile(pkgdatadir + "/runtime/ed")
+ if 'PKGE' in pkgdata:
+ pf = pkgdata['PN'] + "-" + pkgdata['PKGE'] + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
+ else:
+ pf = pkgdata['PN'] + "-" + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
+ deploy_dir_rpm = bb_vars['DEPLOY_DIR_RPM']
+ package_arch = bb_vars['PACKAGE_ARCH'].replace('-', '_')
+ staging_bindir_native = bb_vars['STAGING_BINDIR_NATIVE']
+
+ pkg_deploy = os.path.join(deploy_dir_rpm, package_arch, '.'.join((pf, package_arch, 'rpm')))
+
+ # Use a temporary rpmdb
+ rpmdb = tempfile.mkdtemp(prefix='oeqa-rpmdb')
+
+ runCmd('%s/rpmkeys --define "_dbpath %s" --import %s' %
+ (staging_bindir_native, rpmdb, self.pub_key_path))
+
+ ret = runCmd('%s/rpmkeys --define "_dbpath %s" --checksig %s' %
+ (staging_bindir_native, rpmdb, pkg_deploy))
+ # tmp/deploy/rpm/i586/ed-1.9-r0.i586.rpm: rsa sha1 md5 OK
+ self.assertIn('digests signatures OK', ret.output, 'Package signed incorrectly.')
+ shutil.rmtree(rpmdb)
+
+ #Check that an image can be built from signed packages
+ self.add_command_to_tearDown('bitbake -c clean core-image-minimal')
+ bitbake('-c clean core-image-minimal')
+ bitbake('core-image-minimal')
+
+
+ def test_signing_sstate_archive(self):
+ """
+ Summary: Test that sstate archives can be signed
+ Expected: Package should be signed with the correct key
+ Product: oe-core
+ Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ test_recipe = 'ed'
+
+ # Since we need gpg but we can't use gpg-native for sstate signatures, we
+ # build gpg-native in our original builddir then run the tests in a second one.
+ builddir = os.environ.get('BUILDDIR') + "-testsign"
+ sstatedir = os.path.join(builddir, 'test-sstate')
+
+ nsysroot = self.setup_gpg()
+
+ feature = 'SSTATE_SIG_KEY ?= "testuser"\n'
+ feature += 'SSTATE_SIG_PASSPHRASE ?= "test123"\n'
+ feature += 'SSTATE_VERIFY_SIG ?= "1"\n'
+ feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
+ feature += 'SSTATE_DIR = "%s"\n' % sstatedir
+ # Any mirror might have partial sstate without .sig files, triggering failures
+ feature += 'SSTATE_MIRRORS_forcevariable = ""\n'
+
+ self.write_config(feature)
+
+ with self.create_new_builddir(os.environ['BUILDDIR'], builddir):
+
+ os.environ["PATH"] = nsysroot + ":" + os.environ["PATH"]
+ self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
+ self.add_command_to_tearDown('rm -rf %s' % sstatedir)
+ self.add_command_to_tearDown('rm -rf %s' % builddir)
+
+ bitbake('-c clean %s' % test_recipe)
+ bitbake('-c populate_lic %s' % test_recipe)
+
+ recipe_sig = glob.glob(sstatedir + '/*/*:ed:*_populate_lic.tgz.sig')
+ recipe_tgz = glob.glob(sstatedir + '/*/*:ed:*_populate_lic.tgz')
+
+ self.assertEqual(len(recipe_sig), 1, 'Failed to find .sig file.')
+ self.assertEqual(len(recipe_tgz), 1, 'Failed to find .tgz file.')
+
+ ret = runCmd('gpg --homedir %s --verify %s %s' % (self.gpg_dir, recipe_sig[0], recipe_tgz[0]))
+ # gpg: Signature made Thu 22 Oct 2015 01:45:09 PM EEST using RSA key ID 61EEFB30
+ # gpg: Good signature from "testuser (nocomment) <testuser@email.com>"
+ self.assertIn('gpg: Good signature from', ret.output, 'Package signed incorrectly.')
+
+
+class LockedSignatures(OESelftestTestCase):
+
+ def test_locked_signatures(self):
+ """
+ Summary: Test locked signature mechanism
+ Expected: Locked signatures will prevent task to run
+ Product: oe-core
+ Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ import uuid
+
+ test_recipe = 'ed'
+ locked_sigs_file = 'locked-sigs.inc'
+
+ bitbake(test_recipe)
+ # Generate locked sigs include file
+ bitbake('-S none %s' % test_recipe)
+
+ feature = 'require %s\n' % locked_sigs_file
+ feature += 'SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n'
+ self.write_config(feature)
+
+ # Build a locked recipe
+ bitbake(test_recipe)
+
+ templayerdir = tempfile.mkdtemp(prefix='signingqa')
+ create_temp_layer(templayerdir, 'selftestsigning')
+ runCmd('bitbake-layers add-layer %s' % templayerdir)
+
+ # Make a change that should cause the locked task signature to change
+ # Use uuid so hash equivalance server isn't triggered
+ recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend'
+ recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file)
+ feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4()
+
+ os.mkdir(os.path.join(templayerdir, 'recipes-test'))
+ os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe))
+ write_file(recipe_append_path, feature)
+
+ self.add_command_to_tearDown('bitbake-layers remove-layer %s' % templayerdir)
+ self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file))
+ self.add_command_to_tearDown('rm -rf %s' % templayerdir)
+
+ # Build the recipe again
+ ret = bitbake(test_recipe)
+
+ # Verify you get the warning and that the real task *isn't* run (i.e. the locked signature has worked)
+ patt = r'The %s:do_package sig is computed to be \S+, but the sig is locked to \S+ in SIGGEN_LOCKEDSIGS\S+' % test_recipe
+ found_warn = re.search(patt, ret.output)
+
+ self.assertIsNotNone(found_warn, "Didn't find the expected warning message. Output: %s" % ret.output)
diff --git a/meta/lib/oeqa/selftest/cases/sstate.py b/meta/lib/oeqa/selftest/cases/sstate.py
new file mode 100644
index 0000000000..410dec64fc
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/sstate.py
@@ -0,0 +1,67 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import datetime
+import unittest
+import os
+import re
+import shutil
+
+import oeqa.utils.ftools as ftools
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_vars, get_test_layer
+
+
+class SStateBase(OESelftestTestCase):
+
+ def setUpLocal(self):
+ super(SStateBase, self).setUpLocal()
+ self.temp_sstate_location = None
+ needed_vars = ['SSTATE_DIR', 'NATIVELSBSTRING', 'TCLIBC', 'TUNE_ARCH',
+ 'TOPDIR', 'TARGET_VENDOR', 'TARGET_OS']
+ bb_vars = get_bb_vars(needed_vars)
+ self.sstate_path = bb_vars['SSTATE_DIR']
+ self.hostdistro = bb_vars['NATIVELSBSTRING']
+ self.tclibc = bb_vars['TCLIBC']
+ self.tune_arch = bb_vars['TUNE_ARCH']
+ self.topdir = bb_vars['TOPDIR']
+ self.target_vendor = bb_vars['TARGET_VENDOR']
+ self.target_os = bb_vars['TARGET_OS']
+ self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro)
+
+ # Creates a special sstate configuration with the option to add sstate mirrors
+ def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]):
+ self.temp_sstate_location = temp_sstate_location
+
+ if self.temp_sstate_location:
+ temp_sstate_path = os.path.join(self.builddir, "temp_sstate_%s" % datetime.datetime.now().strftime('%Y%m%d%H%M%S'))
+ config_temp_sstate = "SSTATE_DIR = \"%s\"" % temp_sstate_path
+ self.append_config(config_temp_sstate)
+ self.track_for_cleanup(temp_sstate_path)
+ bb_vars = get_bb_vars(['SSTATE_DIR', 'NATIVELSBSTRING'])
+ self.sstate_path = bb_vars['SSTATE_DIR']
+ self.hostdistro = bb_vars['NATIVELSBSTRING']
+ self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro)
+
+ if add_local_mirrors:
+ config_set_sstate_if_not_set = 'SSTATE_MIRRORS ?= ""'
+ self.append_config(config_set_sstate_if_not_set)
+ for local_mirror in add_local_mirrors:
+ self.assertFalse(os.path.join(local_mirror) == os.path.join(self.sstate_path), msg='Cannot add the current sstate path as a sstate mirror')
+ config_sstate_mirror = "SSTATE_MIRRORS += \"file://.* file:///%s/PATH\"" % local_mirror
+ self.append_config(config_sstate_mirror)
+
+ # Returns a list containing sstate files
+ def search_sstate(self, filename_regex, distro_specific=True, distro_nonspecific=True):
+ result = []
+ for root, dirs, files in os.walk(self.sstate_path):
+ if distro_specific and re.search("%s/[a-z0-9]{2}$" % self.hostdistro, root):
+ for f in files:
+ if re.search(filename_regex, f):
+ result.append(f)
+ if distro_nonspecific and re.search("%s/[a-z0-9]{2}$" % self.sstate_path, root):
+ for f in files:
+ if re.search(filename_regex, f):
+ result.append(f)
+ return result
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
new file mode 100644
index 0000000000..6757a0ec68
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -0,0 +1,532 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import shutil
+import glob
+import subprocess
+import tempfile
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer, create_temp_layer
+from oeqa.selftest.cases.sstate import SStateBase
+
+import bb.siggen
+
+class SStateTests(SStateBase):
+ def test_autorev_sstate_works(self):
+ # Test that a git repository which changes is correctly handled by SRCREV = ${AUTOREV}
+ # when PV does not contain SRCPV
+
+ tempdir = tempfile.mkdtemp(prefix='oeqa')
+ self.track_for_cleanup(tempdir)
+ create_temp_layer(tempdir, 'selftestrecipetool')
+ self.add_command_to_tearDown('bitbake-layers remove-layer %s' % tempdir)
+ runCmd('bitbake-layers add-layer %s' % tempdir)
+
+ # Use dbus-wait as a local git repo we can add a commit between two builds in
+ pn = 'dbus-wait'
+ srcrev = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
+ url = 'git://git.yoctoproject.org/dbus-wait'
+ result = runCmd('git clone %s noname' % url, cwd=tempdir)
+ srcdir = os.path.join(tempdir, 'noname')
+ result = runCmd('git reset --hard %s' % srcrev, cwd=srcdir)
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure script in source directory')
+
+ recipefile = os.path.join(tempdir, "recipes-test", "dbus-wait-test", 'dbus-wait-test_git.bb')
+ os.makedirs(os.path.dirname(recipefile))
+ srcuri = 'git://' + srcdir + ';protocol=file'
+ result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri])
+ self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
+
+ with open(recipefile, 'a') as f:
+ f.write('SRCREV = "${AUTOREV}"\n')
+ f.write('PV = "1.0"\n')
+
+ bitbake("dbus-wait-test -c fetch")
+ with open(os.path.join(srcdir, "bar.txt"), "w") as f:
+ f.write("foo")
+ result = runCmd('git add bar.txt; git commit -asm "add bar"', cwd=srcdir)
+ bitbake("dbus-wait-test -c unpack")
+
+
+ # Test sstate files creation and their location
+ def run_test_sstate_creation(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True, should_pass=True):
+ self.config_sstate(temp_sstate_location, [self.sstate_path])
+
+ if self.temp_sstate_location:
+ bitbake(['-cclean'] + targets)
+ else:
+ bitbake(['-ccleansstate'] + targets)
+
+ bitbake(targets)
+ file_tracker = []
+ results = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific)
+ if distro_nonspecific:
+ for r in results:
+ if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo", "_fetch.tgz.siginfo", "_unpack.tgz.siginfo", "_patch.tgz.siginfo")):
+ continue
+ file_tracker.append(r)
+ else:
+ file_tracker = results
+
+ if should_pass:
+ self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
+ else:
+ self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s (found %s)" % (', '.join(map(str, targets)), str(file_tracker)))
+
+ def test_sstate_creation_distro_specific_pass(self):
+ self.run_test_sstate_creation(['binutils-cross-'+ self.tune_arch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
+
+ def test_sstate_creation_distro_specific_fail(self):
+ self.run_test_sstate_creation(['binutils-cross-'+ self.tune_arch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False)
+
+ def test_sstate_creation_distro_nonspecific_pass(self):
+ self.run_test_sstate_creation(['linux-libc-headers'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+
+ def test_sstate_creation_distro_nonspecific_fail(self):
+ self.run_test_sstate_creation(['linux-libc-headers'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
+
+ # Test the sstate files deletion part of the do_cleansstate task
+ def run_test_cleansstate_task(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True):
+ self.config_sstate(temp_sstate_location, [self.sstate_path])
+
+ bitbake(['-ccleansstate'] + targets)
+
+ bitbake(targets)
+ tgz_created = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
+ self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_created)))
+
+ siginfo_created = self.search_sstate('|'.join(map(str, [s + r'.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific)
+ self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s (%s)" % (', '.join(map(str, targets)), str(siginfo_created)))
+
+ bitbake(['-ccleansstate'] + targets)
+ tgz_removed = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
+ self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_removed)))
+
+ def test_cleansstate_task_distro_specific_nonspecific(self):
+ targets = ['binutils-cross-'+ self.tune_arch, 'binutils-native']
+ targets.append('linux-libc-headers')
+ self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
+
+ def test_cleansstate_task_distro_nonspecific(self):
+ self.run_test_cleansstate_task(['linux-libc-headers'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+
+ def test_cleansstate_task_distro_specific(self):
+ targets = ['binutils-cross-'+ self.tune_arch, 'binutils-native']
+ targets.append('linux-libc-headers')
+ self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
+
+
+ # Test rebuilding of distro-specific sstate files
+ def run_test_rebuild_distro_specific_sstate(self, targets, temp_sstate_location=True):
+ self.config_sstate(temp_sstate_location, [self.sstate_path])
+
+ bitbake(['-ccleansstate'] + targets)
+
+ bitbake(targets)
+ results = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True)
+ filtered_results = []
+ for r in results:
+ if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo")):
+ continue
+ filtered_results.append(r)
+ self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results)))
+ file_tracker_1 = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
+ self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
+
+ self.track_for_cleanup(self.distro_specific_sstate + "_old")
+ shutil.copytree(self.distro_specific_sstate, self.distro_specific_sstate + "_old")
+ shutil.rmtree(self.distro_specific_sstate)
+
+ bitbake(['-cclean'] + targets)
+ bitbake(targets)
+ file_tracker_2 = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
+ self.assertTrue(len(file_tracker_2) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
+
+ not_recreated = [x for x in file_tracker_1 if x not in file_tracker_2]
+ self.assertTrue(not_recreated == [], msg="The following sstate files ware not recreated: %s" % ', '.join(map(str, not_recreated)))
+
+ created_once = [x for x in file_tracker_2 if x not in file_tracker_1]
+ self.assertTrue(created_once == [], msg="The following sstate files ware created only in the second run: %s" % ', '.join(map(str, created_once)))
+
+ def test_rebuild_distro_specific_sstate_cross_native_targets(self):
+ self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + self.tune_arch, 'binutils-native'], temp_sstate_location=True)
+
+ def test_rebuild_distro_specific_sstate_cross_target(self):
+ self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + self.tune_arch], temp_sstate_location=True)
+
+ def test_rebuild_distro_specific_sstate_native_target(self):
+ self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
+
+
+ # Test the sstate-cache-management script. Each element in the global_config list is used with the corresponding element in the target_config list
+ # global_config elements are expected to not generate any sstate files that would be removed by sstate-cache-management.sh (such as changing the value of MACHINE)
+ def run_test_sstate_cache_management_script(self, target, global_config=[''], target_config=[''], ignore_patterns=[]):
+ self.assertTrue(global_config)
+ self.assertTrue(target_config)
+ self.assertTrue(len(global_config) == len(target_config), msg='Lists global_config and target_config should have the same number of elements')
+ self.config_sstate(temp_sstate_location=True, add_local_mirrors=[self.sstate_path])
+
+ # If buildhistory is enabled, we need to disable version-going-backwards
+ # QA checks for this test. It may report errors otherwise.
+ self.append_config('ERROR_QA_remove = "version-going-backwards"')
+
+ # For not this only checks if random sstate tasks are handled correctly as a group.
+ # In the future we should add control over what tasks we check for.
+
+ sstate_archs_list = []
+ expected_remaining_sstate = []
+ for idx in range(len(target_config)):
+ self.append_config(global_config[idx])
+ self.append_recipeinc(target, target_config[idx])
+ sstate_arch = get_bb_var('SSTATE_PKGARCH', target)
+ if not sstate_arch in sstate_archs_list:
+ sstate_archs_list.append(sstate_arch)
+ if target_config[idx] == target_config[-1]:
+ target_sstate_before_build = self.search_sstate(target + r'.*?\.tgz$')
+ bitbake("-cclean %s" % target)
+ result = bitbake(target, ignore_status=True)
+ if target_config[idx] == target_config[-1]:
+ target_sstate_after_build = self.search_sstate(target + r'.*?\.tgz$')
+ expected_remaining_sstate += [x for x in target_sstate_after_build if x not in target_sstate_before_build if not any(pattern in x for pattern in ignore_patterns)]
+ self.remove_config(global_config[idx])
+ self.remove_recipeinc(target, target_config[idx])
+ self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output))
+
+ runCmd("sstate-cache-management.sh -y --cache-dir=%s --remove-duplicated --extra-archs=%s" % (self.sstate_path, ','.join(map(str, sstate_archs_list))))
+ actual_remaining_sstate = [x for x in self.search_sstate(target + r'.*?\.tgz$') if not any(pattern in x for pattern in ignore_patterns)]
+
+ actual_not_expected = [x for x in actual_remaining_sstate if x not in expected_remaining_sstate]
+ self.assertFalse(actual_not_expected, msg="Files should have been removed but ware not: %s" % ', '.join(map(str, actual_not_expected)))
+ expected_not_actual = [x for x in expected_remaining_sstate if x not in actual_remaining_sstate]
+ self.assertFalse(expected_not_actual, msg="Extra files ware removed: %s" ', '.join(map(str, expected_not_actual)))
+
+ def test_sstate_cache_management_script_using_pr_1(self):
+ global_config = []
+ target_config = []
+ global_config.append('')
+ target_config.append('PR = "0"')
+ self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+
+ def test_sstate_cache_management_script_using_pr_2(self):
+ global_config = []
+ target_config = []
+ global_config.append('')
+ target_config.append('PR = "0"')
+ global_config.append('')
+ target_config.append('PR = "1"')
+ self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+
+ def test_sstate_cache_management_script_using_pr_3(self):
+ global_config = []
+ target_config = []
+ global_config.append('MACHINE = "qemux86-64"')
+ target_config.append('PR = "0"')
+ global_config.append(global_config[0])
+ target_config.append('PR = "1"')
+ global_config.append('MACHINE = "qemux86"')
+ target_config.append('PR = "1"')
+ self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+
+ def test_sstate_cache_management_script_using_machine(self):
+ global_config = []
+ target_config = []
+ global_config.append('MACHINE = "qemux86-64"')
+ target_config.append('')
+ global_config.append('MACHINE = "qemux86"')
+ target_config.append('')
+ self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+
+ def test_sstate_32_64_same_hash(self):
+ """
+ The sstate checksums for both native and target should not vary whether
+ they're built on a 32 or 64 bit system. Rather than requiring two different
+ build machines and running a builds, override the variables calling uname()
+ manually and check using bitbake -S.
+ """
+
+ self.write_config("""
+MACHINE = "qemux86"
+TMPDIR = "${TOPDIR}/tmp-sstatesamehash"
+TCLIBCAPPEND = ""
+BUILD_ARCH = "x86_64"
+BUILD_OS = "linux"
+SDKMACHINE = "x86_64"
+PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
+ bitbake("core-image-sato -S none")
+ self.write_config("""
+MACHINE = "qemux86"
+TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
+TCLIBCAPPEND = ""
+BUILD_ARCH = "i686"
+BUILD_OS = "linux"
+SDKMACHINE = "i686"
+PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
+ bitbake("core-image-sato -S none")
+
+ def get_files(d):
+ f = []
+ for root, dirs, files in os.walk(d):
+ if "core-image-sato" in root:
+ # SDKMACHINE changing will change
+ # do_rootfs/do_testimage/do_build stamps of images which
+ # is safe to ignore.
+ continue
+ f.extend(os.path.join(root, name) for name in files)
+ return f
+ files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/")
+ files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/")
+ files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash").replace("i686-linux", "x86_64-linux").replace("i686" + self.target_vendor + "-linux", "x86_64" + self.target_vendor + "-linux", ) for x in files2]
+ self.maxDiff = None
+ self.assertCountEqual(files1, files2)
+
+
+ def test_sstate_nativelsbstring_same_hash(self):
+ """
+ The sstate checksums should be independent of whichever NATIVELSBSTRING is
+ detected. Rather than requiring two different build machines and running
+ builds, override the variables manually and check using bitbake -S.
+ """
+
+ self.write_config("""
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
+TCLIBCAPPEND = \"\"
+NATIVELSBSTRING = \"DistroA\"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
+ bitbake("core-image-sato -S none")
+ self.write_config("""
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
+TCLIBCAPPEND = \"\"
+NATIVELSBSTRING = \"DistroB\"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
+ bitbake("core-image-sato -S none")
+
+ def get_files(d):
+ f = []
+ for root, dirs, files in os.walk(d):
+ f.extend(os.path.join(root, name) for name in files)
+ return f
+ files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/")
+ files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/")
+ files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
+ self.maxDiff = None
+ self.assertCountEqual(files1, files2)
+
+ def test_sstate_allarch_samesigs(self):
+ """
+ The sstate checksums of allarch packages should be independent of whichever
+ MACHINE is set. Check this using bitbake -S.
+ Also, rather than duplicate the test, check nativesdk stamps are the same between
+ the two MACHINE values.
+ """
+
+ configA = """
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
+TCLIBCAPPEND = \"\"
+MACHINE = \"qemux86-64\"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+"""
+ configB = """
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
+TCLIBCAPPEND = \"\"
+MACHINE = \"qemuarm\"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+"""
+ self.sstate_allarch_samesigs(configA, configB)
+
+ def test_sstate_nativesdk_samesigs_multilib(self):
+ """
+ check nativesdk stamps are the same between the two MACHINE values.
+ """
+
+ configA = """
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
+TCLIBCAPPEND = \"\"
+MACHINE = \"qemux86-64\"
+require conf/multilib.conf
+MULTILIBS = \"multilib:lib32\"
+DEFAULTTUNE_virtclass-multilib-lib32 = \"x86\"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+"""
+ configB = """
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
+TCLIBCAPPEND = \"\"
+MACHINE = \"qemuarm\"
+require conf/multilib.conf
+MULTILIBS = \"\"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+"""
+ self.sstate_allarch_samesigs(configA, configB)
+
+ def sstate_allarch_samesigs(self, configA, configB):
+
+ self.write_config(configA)
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
+ bitbake("world meta-toolchain -S none")
+ self.write_config(configB)
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
+ bitbake("world meta-toolchain -S none")
+
+ def get_files(d):
+ f = {}
+ for root, dirs, files in os.walk(d):
+ for name in files:
+ if "meta-environment" in root or "cross-canadian" in root:
+ continue
+ if "do_build" not in name:
+ # 1.4.1+gitAUTOINC+302fca9f4c-r0.do_package_write_ipk.sigdata.f3a2a38697da743f0dbed8b56aafcf79
+ (_, task, _, shash) = name.rsplit(".", 3)
+ f[os.path.join(os.path.basename(root), task)] = shash
+ return f
+
+ nativesdkdir = os.path.basename(glob.glob(self.topdir + "/tmp-sstatesamehash/stamps/*-nativesdk*-linux")[0])
+
+ files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/" + nativesdkdir)
+ files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/" + nativesdkdir)
+ self.maxDiff = None
+ self.assertEqual(files1, files2)
+
+ def test_sstate_sametune_samesigs(self):
+ """
+ The sstate checksums of two identical machines (using the same tune) should be the
+ same, apart from changes within the machine specific stamps directory. We use the
+ qemux86copy machine to test this. Also include multilibs in the test.
+ """
+
+ self.write_config("""
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
+TCLIBCAPPEND = \"\"
+MACHINE = \"qemux86\"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
+ bitbake("world meta-toolchain -S none")
+ self.write_config("""
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
+TCLIBCAPPEND = \"\"
+MACHINE = \"qemux86copy\"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
+ bitbake("world meta-toolchain -S none")
+
+ def get_files(d):
+ f = []
+ for root, dirs, files in os.walk(d):
+ for name in files:
+ if "meta-environment" in root or "cross-canadian" in root:
+ continue
+ if "qemux86copy-" in root or "qemux86-" in root:
+ continue
+ if "do_build" not in name and "do_populate_sdk" not in name:
+ f.append(os.path.join(root, name))
+ return f
+ files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps")
+ files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps")
+ files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
+ self.maxDiff = None
+ self.assertCountEqual(files1, files2)
+
+
+ def test_sstate_noop_samesigs(self):
+ """
+ The sstate checksums of two builds with these variables changed or
+ classes inherits should be the same.
+ """
+
+ self.write_config("""
+TMPDIR = "${TOPDIR}/tmp-sstatesamehash"
+TCLIBCAPPEND = ""
+BB_NUMBER_THREADS = "${@oe.utils.cpu_count()}"
+PARALLEL_MAKE = "-j 1"
+DL_DIR = "${TOPDIR}/download1"
+TIME = "111111"
+DATE = "20161111"
+INHERIT_remove = "buildstats-summary buildhistory uninative"
+http_proxy = ""
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
+ self.track_for_cleanup(self.topdir + "/download1")
+ bitbake("world meta-toolchain -S none")
+ self.write_config("""
+TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
+TCLIBCAPPEND = ""
+BB_NUMBER_THREADS = "${@oe.utils.cpu_count()+1}"
+PARALLEL_MAKE = "-j 2"
+DL_DIR = "${TOPDIR}/download2"
+TIME = "222222"
+DATE = "20161212"
+# Always remove uninative as we're changing proxies
+INHERIT_remove = "uninative"
+INHERIT += "buildstats-summary buildhistory"
+http_proxy = "http://example.com/"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+ self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
+ self.track_for_cleanup(self.topdir + "/download2")
+ bitbake("world meta-toolchain -S none")
+
+ def get_files(d):
+ f = {}
+ for root, dirs, files in os.walk(d):
+ for name in files:
+ name, shash = name.rsplit('.', 1)
+ # Extract just the machine and recipe name
+ base = os.sep.join(root.rsplit(os.sep, 2)[-2:] + [name])
+ f[base] = shash
+ return f
+
+ def compare_sigfiles(files, files1, files2, compare=False):
+ for k in files:
+ if k in files1 and k in files2:
+ print("%s differs:" % k)
+ if compare:
+ sigdatafile1 = self.topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k]
+ sigdatafile2 = self.topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]
+ output = bb.siggen.compare_sigfiles(sigdatafile1, sigdatafile2)
+ if output:
+ print('\n'.join(output))
+ elif k in files1 and k not in files2:
+ print("%s in files1" % k)
+ elif k not in files1 and k in files2:
+ print("%s in files2" % k)
+ else:
+ assert "shouldn't reach here"
+
+ files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/")
+ files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/")
+ # Remove items that are identical in both sets
+ for k,v in files1.items() & files2.items():
+ del files1[k]
+ del files2[k]
+ if not files1 and not files2:
+ # No changes, so we're done
+ return
+
+ files = list(files1.keys() | files2.keys())
+ # this is an expensive computation, thus just compare the first 'max_sigfiles_to_compare' k files
+ max_sigfiles_to_compare = 20
+ first, rest = files[:max_sigfiles_to_compare], files[max_sigfiles_to_compare:]
+ compare_sigfiles(first, files1, files2, compare=True)
+ compare_sigfiles(rest, files1, files2, compare=False)
+
+ self.fail("sstate hashes not identical.")
diff --git a/meta/lib/oeqa/selftest/cases/tinfoil.py b/meta/lib/oeqa/selftest/cases/tinfoil.py
new file mode 100644
index 0000000000..42a1b6b4f4
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/tinfoil.py
@@ -0,0 +1,224 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+import time
+import logging
+import bb.tinfoil
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd
+
+class TinfoilTests(OESelftestTestCase):
+ """ Basic tests for the tinfoil API """
+
+ def test_getvar(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(True)
+ machine = tinfoil.config_data.getVar('MACHINE')
+ if not machine:
+ self.fail('Unable to get MACHINE value - returned %s' % machine)
+
+ def test_expand(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(True)
+ expr = '${@os.getpid()}'
+ pid = tinfoil.config_data.expand(expr)
+ if not pid:
+ self.fail('Unable to expand "%s" - returned %s' % (expr, pid))
+
+ def test_getvar_bb_origenv(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(True)
+ origenv = tinfoil.config_data.getVar('BB_ORIGENV', False)
+ if not origenv:
+ self.fail('Unable to get BB_ORIGENV value - returned %s' % origenv)
+ self.assertEqual(origenv.getVar('HOME', False), os.environ['HOME'])
+
+ def test_parse_recipe(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=False, quiet=2)
+ testrecipe = 'mdadm'
+ best = tinfoil.find_best_provider(testrecipe)
+ if not best:
+ self.fail('Unable to find recipe providing %s' % testrecipe)
+ rd = tinfoil.parse_recipe_file(best[3])
+ self.assertEqual(testrecipe, rd.getVar('PN'))
+
+ def test_parse_recipe_copy_expand(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=False, quiet=2)
+ testrecipe = 'mdadm'
+ best = tinfoil.find_best_provider(testrecipe)
+ if not best:
+ self.fail('Unable to find recipe providing %s' % testrecipe)
+ rd = tinfoil.parse_recipe_file(best[3])
+ # Check we can get variable values
+ self.assertEqual(testrecipe, rd.getVar('PN'))
+ # Check that expanding a value that includes a variable reference works
+ self.assertEqual(testrecipe, rd.getVar('BPN'))
+ # Now check that changing the referenced variable's value in a copy gives that
+ # value when expanding
+ localdata = bb.data.createCopy(rd)
+ localdata.setVar('PN', 'hello')
+ self.assertEqual('hello', localdata.getVar('BPN'))
+
+ def test_parse_recipe_initial_datastore(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=False, quiet=2)
+ testrecipe = 'mdadm'
+ best = tinfoil.find_best_provider(testrecipe)
+ if not best:
+ self.fail('Unable to find recipe providing %s' % testrecipe)
+ dcopy = bb.data.createCopy(tinfoil.config_data)
+ dcopy.setVar('MYVARIABLE', 'somevalue')
+ rd = tinfoil.parse_recipe_file(best[3], config_data=dcopy)
+ # Check we can get variable values
+ self.assertEqual('somevalue', rd.getVar('MYVARIABLE'))
+
+ def test_list_recipes(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=False, quiet=2)
+ # Check pkg_pn
+ checkpns = ['tar', 'automake', 'coreutils', 'm4-native', 'nativesdk-gcc']
+ pkg_pn = tinfoil.cooker.recipecaches[''].pkg_pn
+ for pn in checkpns:
+ self.assertIn(pn, pkg_pn)
+ # Check pkg_fn
+ checkfns = {'nativesdk-gcc': '^virtual:nativesdk:.*', 'coreutils': '.*/coreutils_.*.bb'}
+ for fn, pn in tinfoil.cooker.recipecaches[''].pkg_fn.items():
+ if pn in checkpns:
+ if pn in checkfns:
+ self.assertTrue(re.match(checkfns[pn], fn), 'Entry for %s: %s did not match %s' % (pn, fn, checkfns[pn]))
+ checkpns.remove(pn)
+ if checkpns:
+ self.fail('Unable to find pkg_fn entries for: %s' % ', '.join(checkpns))
+
+ def test_wait_event(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=True)
+
+ tinfoil.set_event_mask(['bb.event.FilesMatchingFound', 'bb.command.CommandCompleted'])
+
+ # Need to drain events otherwise events that were masked may still be in the queue
+ while tinfoil.wait_event():
+ pass
+
+ pattern = 'conf'
+ res = tinfoil.run_command('findFilesMatchingInDir', pattern, 'conf/machine')
+ self.assertTrue(res)
+
+ eventreceived = False
+ commandcomplete = False
+ start = time.time()
+ # Wait for 5s in total so we'd detect spurious heartbeat events for example
+ while time.time() - start < 5:
+ event = tinfoil.wait_event(1)
+ if event:
+ if isinstance(event, bb.command.CommandCompleted):
+ commandcomplete = True
+ elif isinstance(event, bb.event.FilesMatchingFound):
+ self.assertEqual(pattern, event._pattern)
+ self.assertIn('qemuarm.conf', event._matches)
+ eventreceived = True
+ elif isinstance(event, logging.LogRecord):
+ continue
+ else:
+ self.fail('Unexpected event: %s' % event)
+
+ self.assertTrue(commandcomplete, 'Timed out waiting for CommandCompleted event from bitbake server')
+ self.assertTrue(eventreceived, 'Did not receive FilesMatchingFound event from bitbake server')
+
+ def test_setvariable_clean(self):
+ # First check that setVariable affects the datastore
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=True)
+ tinfoil.run_command('setVariable', 'TESTVAR', 'specialvalue')
+ self.assertEqual(tinfoil.config_data.getVar('TESTVAR'), 'specialvalue', 'Value set using setVariable is not reflected in client-side getVar()')
+
+ # Now check that the setVariable's effects are no longer present
+ # (this may legitimately break in future if we stop reinitialising
+ # the datastore, in which case we'll have to reconsider use of
+ # setVariable entirely)
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=True)
+ self.assertNotEqual(tinfoil.config_data.getVar('TESTVAR'), 'specialvalue', 'Value set using setVariable is still present!')
+
+ # Now check that setVar on the main datastore works (uses setVariable internally)
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=True)
+ tinfoil.config_data.setVar('TESTVAR', 'specialvalue')
+ value = tinfoil.run_command('getVariable', 'TESTVAR')
+ self.assertEqual(value, 'specialvalue', 'Value set using config_data.setVar() is not reflected in config_data.getVar()')
+
+ def test_datastore_operations(self):
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=True)
+ # Test setVarFlag() / getVarFlag()
+ tinfoil.config_data.setVarFlag('TESTVAR', 'flagname', 'flagval')
+ value = tinfoil.config_data.getVarFlag('TESTVAR', 'flagname')
+ self.assertEqual(value, 'flagval', 'Value set using config_data.setVarFlag() is not reflected in config_data.getVarFlag()')
+ # Test delVarFlag()
+ tinfoil.config_data.setVarFlag('TESTVAR', 'otherflag', 'othervalue')
+ tinfoil.config_data.delVarFlag('TESTVAR', 'flagname')
+ value = tinfoil.config_data.getVarFlag('TESTVAR', 'flagname')
+ self.assertEqual(value, None, 'Varflag deleted using config_data.delVarFlag() is not reflected in config_data.getVarFlag()')
+ value = tinfoil.config_data.getVarFlag('TESTVAR', 'otherflag')
+ self.assertEqual(value, 'othervalue', 'Varflag deleted using config_data.delVarFlag() caused unrelated flag to be removed')
+ # Test delVar()
+ tinfoil.config_data.setVar('TESTVAR', 'varvalue')
+ value = tinfoil.config_data.getVar('TESTVAR')
+ self.assertEqual(value, 'varvalue', 'Value set using config_data.setVar() is not reflected in config_data.getVar()')
+ tinfoil.config_data.delVar('TESTVAR')
+ value = tinfoil.config_data.getVar('TESTVAR')
+ self.assertEqual(value, None, 'Variable deleted using config_data.delVar() appears to still have a value')
+ # Test renameVar()
+ tinfoil.config_data.setVar('TESTVAROLD', 'origvalue')
+ tinfoil.config_data.renameVar('TESTVAROLD', 'TESTVARNEW')
+ value = tinfoil.config_data.getVar('TESTVAROLD')
+ self.assertEqual(value, None, 'Variable renamed using config_data.renameVar() still seems to exist')
+ value = tinfoil.config_data.getVar('TESTVARNEW')
+ self.assertEqual(value, 'origvalue', 'Variable renamed using config_data.renameVar() does not appear with new name')
+ # Test overrides
+ tinfoil.config_data.setVar('TESTVAR', 'original')
+ tinfoil.config_data.setVar('TESTVAR_overrideone', 'one')
+ tinfoil.config_data.setVar('TESTVAR_overridetwo', 'two')
+ tinfoil.config_data.appendVar('OVERRIDES', ':overrideone')
+ value = tinfoil.config_data.getVar('TESTVAR')
+ self.assertEqual(value, 'one', 'Variable overrides not functioning correctly')
+
+ def test_variable_history(self):
+ # Basic test to ensure that variable history works when tracking=True
+ with bb.tinfoil.Tinfoil(tracking=True) as tinfoil:
+ tinfoil.prepare(config_only=False, quiet=2)
+ # Note that _tracking for any datastore we get will be
+ # false here, that's currently expected - so we can't check
+ # for that
+ history = tinfoil.config_data.varhistory.variable('DL_DIR')
+ for entry in history:
+ if entry['file'].endswith('/bitbake.conf'):
+ if entry['op'] in ['set', 'set?']:
+ break
+ else:
+ self.fail('Did not find history entry setting DL_DIR in bitbake.conf. History: %s' % history)
+ # Check it works for recipes as well
+ testrecipe = 'zlib'
+ rd = tinfoil.parse_recipe(testrecipe)
+ history = rd.varhistory.variable('LICENSE')
+ bbfound = -1
+ recipefound = -1
+ for i, entry in enumerate(history):
+ if entry['file'].endswith('/bitbake.conf'):
+ if entry['detail'] == 'INVALID' and entry['op'] in ['set', 'set?']:
+ bbfound = i
+ elif entry['file'].endswith('.bb'):
+ if entry['op'] == 'set':
+ recipefound = i
+ if bbfound == -1:
+ self.fail('Did not find history entry setting LICENSE in bitbake.conf parsing %s recipe. History: %s' % (testrecipe, history))
+ if recipefound == -1:
+ self.fail('Did not find history entry setting LICENSE in %s recipe. History: %s' % (testrecipe, history))
+ if bbfound > recipefound:
+ self.fail('History entry setting LICENSE in %s recipe and in bitbake.conf in wrong order. History: %s' % (testrecipe, history))
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
new file mode 100644
index 0000000000..3c5be2f501
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -0,0 +1,1051 @@
+#
+# Copyright (c) 2015, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# AUTHORS
+# Ed Bartosh <ed.bartosh@linux.intel.com>
+
+"""Test cases for wic."""
+
+import os
+import sys
+import unittest
+
+from glob import glob
+from shutil import rmtree, copy
+from functools import wraps, lru_cache
+from tempfile import NamedTemporaryFile
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu
+
+
+@lru_cache(maxsize=32)
+def get_host_arch(recipe):
+ """A cached call to get_bb_var('HOST_ARCH', <recipe>)"""
+ return get_bb_var('HOST_ARCH', recipe)
+
+
+def only_for_arch(archs, image='core-image-minimal'):
+ """Decorator for wrapping test cases that can be run only for specific target
+ architectures. A list of compatible architectures is passed in `archs`.
+ Current architecture will be determined by parsing bitbake output for
+ `image` recipe.
+ """
+ def wrapper(func):
+ @wraps(func)
+ def wrapped_f(*args, **kwargs):
+ arch = get_host_arch(image)
+ if archs and arch not in archs:
+ raise unittest.SkipTest("Testcase arch dependency not met: %s" % arch)
+ return func(*args, **kwargs)
+ wrapped_f.__name__ = func.__name__
+ return wrapped_f
+ return wrapper
+
+
+class WicTestCase(OESelftestTestCase):
+ """Wic test class."""
+
+ image_is_ready = False
+ wicenv_cache = {}
+
+ def setUpLocal(self):
+ """This code is executed before each test method."""
+ self.resultdir = self.builddir + "/wic-tmp/"
+ super(WicTestCase, self).setUpLocal()
+
+ # Do this here instead of in setUpClass as the base setUp does some
+ # clean up which can result in the native tools built earlier in
+ # setUpClass being unavailable.
+ if not WicTestCase.image_is_ready:
+ if get_bb_var('USE_NLS') == 'yes':
+ bitbake('wic-tools')
+ else:
+ self.skipTest('wic-tools cannot be built due its (intltool|gettext)-native dependency and NLS disable')
+
+ bitbake('core-image-minimal')
+ WicTestCase.image_is_ready = True
+
+ rmtree(self.resultdir, ignore_errors=True)
+
+ def tearDownLocal(self):
+ """Remove resultdir as it may contain images."""
+ rmtree(self.resultdir, ignore_errors=True)
+ super(WicTestCase, self).tearDownLocal()
+
+ def _get_image_env_path(self, image):
+ """Generate and obtain the path to <image>.env"""
+ if image not in WicTestCase.wicenv_cache:
+ self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status)
+ bb_vars = get_bb_vars(['STAGING_DIR', 'MACHINE'], image)
+ stdir = bb_vars['STAGING_DIR']
+ machine = bb_vars['MACHINE']
+ WicTestCase.wicenv_cache[image] = os.path.join(stdir, machine, 'imgdata')
+ return WicTestCase.wicenv_cache[image]
+
+class Wic(WicTestCase):
+
+ def test_version(self):
+ """Test wic --version"""
+ runCmd('wic --version')
+
+ def test_help(self):
+ """Test wic --help and wic -h"""
+ runCmd('wic --help')
+ runCmd('wic -h')
+
+ def test_createhelp(self):
+ """Test wic create --help"""
+ runCmd('wic create --help')
+
+ def test_listhelp(self):
+ """Test wic list --help"""
+ runCmd('wic list --help')
+
+ def test_help_create(self):
+ """Test wic help create"""
+ runCmd('wic help create')
+
+ def test_help_list(self):
+ """Test wic help list"""
+ runCmd('wic help list')
+
+ def test_help_overview(self):
+ """Test wic help overview"""
+ runCmd('wic help overview')
+
+ def test_help_plugins(self):
+ """Test wic help plugins"""
+ runCmd('wic help plugins')
+
+ def test_help_kickstart(self):
+ """Test wic help kickstart"""
+ runCmd('wic help kickstart')
+
+ def test_list_images(self):
+ """Test wic list images"""
+ runCmd('wic list images')
+
+ def test_list_source_plugins(self):
+ """Test wic list source-plugins"""
+ runCmd('wic list source-plugins')
+
+ def test_listed_images_help(self):
+ """Test wic listed images help"""
+ output = runCmd('wic list images').output
+ imagelist = [line.split()[0] for line in output.splitlines()]
+ for image in imagelist:
+ runCmd('wic list %s help' % image)
+
+ def test_unsupported_subcommand(self):
+ """Test unsupported subcommand"""
+ self.assertNotEqual(0, runCmd('wic unsupported', ignore_status=True).status)
+
+ def test_no_command(self):
+ """Test wic without command"""
+ self.assertEqual(1, runCmd('wic', ignore_status=True).status)
+
+ def test_build_image_name(self):
+ """Test wic create wictestdisk --image-name=core-image-minimal"""
+ cmd = "wic create wictestdisk --image-name=core-image-minimal -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_gpt_image(self):
+ """Test creation of core-image-minimal with gpt table and UUID boot"""
+ cmd = "wic create directdisk-gpt --image-name core-image-minimal -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_iso_image(self):
+ """Test creation of hybrid iso image with legacy and EFI boot"""
+ config = 'INITRAMFS_IMAGE = "core-image-minimal-initramfs"\n'\
+ 'MACHINE_FEATURES_append = " efi"\n'\
+ 'DEPENDS_pn-core-image-minimal += "syslinux"\n'
+ self.append_config(config)
+ bitbake('core-image-minimal core-image-minimal-initramfs')
+ self.remove_config(config)
+ cmd = "wic create mkhybridiso --image-name core-image-minimal -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.direct")))
+ self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.iso")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_qemux86_directdisk(self):
+ """Test creation of qemux-86-directdisk image"""
+ cmd = "wic create qemux86-directdisk -e core-image-minimal -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "qemux86-directdisk-*direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_mkefidisk(self):
+ """Test creation of mkefidisk image"""
+ cmd = "wic create mkefidisk -e core-image-minimal -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "mkefidisk-*direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_bootloader_config(self):
+ """Test creation of directdisk-bootloader-config image"""
+ config = 'DEPENDS_pn-core-image-minimal += "syslinux"\n'
+ self.append_config(config)
+ bitbake('core-image-minimal')
+ self.remove_config(config)
+ cmd = "wic create directdisk-bootloader-config -e core-image-minimal -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "directdisk-bootloader-config-*direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_systemd_bootdisk(self):
+ """Test creation of systemd-bootdisk image"""
+ config = 'MACHINE_FEATURES_append = " efi"\n'
+ self.append_config(config)
+ bitbake('core-image-minimal')
+ self.remove_config(config)
+ cmd = "wic create systemd-bootdisk -e core-image-minimal -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "systemd-bootdisk-*direct")))
+
+ def test_sdimage_bootpart(self):
+ """Test creation of sdimage-bootpart image"""
+ cmd = "wic create sdimage-bootpart -e core-image-minimal -o %s" % self.resultdir
+ kimgtype = get_bb_var('KERNEL_IMAGETYPE', 'core-image-minimal')
+ self.write_config('IMAGE_BOOT_FILES = "%s"\n' % kimgtype)
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_default_output_dir(self):
+ """Test default output location"""
+ for fname in glob("directdisk-*.direct"):
+ os.remove(fname)
+ config = 'DEPENDS_pn-core-image-minimal += "syslinux"\n'
+ self.append_config(config)
+ bitbake('core-image-minimal')
+ self.remove_config(config)
+ cmd = "wic create directdisk -e core-image-minimal"
+ runCmd(cmd)
+ self.assertEqual(1, len(glob("directdisk-*.direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_build_artifacts(self):
+ """Test wic create directdisk providing all artifacts."""
+ bb_vars = get_bb_vars(['STAGING_DATADIR', 'RECIPE_SYSROOT_NATIVE'],
+ 'wic-tools')
+ bb_vars.update(get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_ROOTFS'],
+ 'core-image-minimal'))
+ bbvars = {key.lower(): value for key, value in bb_vars.items()}
+ bbvars['resultdir'] = self.resultdir
+ runCmd("wic create directdisk "
+ "-b %(staging_datadir)s "
+ "-k %(deploy_dir_image)s "
+ "-n %(recipe_sysroot_native)s "
+ "-r %(image_rootfs)s "
+ "-o %(resultdir)s" % bbvars)
+ self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
+
+ def test_compress_gzip(self):
+ """Test compressing an image with gzip"""
+ runCmd("wic create wictestdisk "
+ "--image-name core-image-minimal "
+ "-c gzip -o %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct.gz")))
+
+ def test_compress_bzip2(self):
+ """Test compressing an image with bzip2"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-c bzip2 -o %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct.bz2")))
+
+ def test_compress_xz(self):
+ """Test compressing an image with xz"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "--compress-with=xz -o %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct.xz")))
+
+ def test_wrong_compressor(self):
+ """Test how wic breaks if wrong compressor is provided"""
+ self.assertEqual(2, runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-c wrong -o %s" % self.resultdir,
+ ignore_status=True).status)
+
+ def test_debug_short(self):
+ """Test -D option"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-D -o %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
+
+ def test_debug_long(self):
+ """Test --debug option"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "--debug -o %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
+
+ def test_skip_build_check_short(self):
+ """Test -s option"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-s -o %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
+
+ def test_skip_build_check_long(self):
+ """Test --skip-build-check option"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "--skip-build-check "
+ "--outdir %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
+
+ def test_build_rootfs_short(self):
+ """Test -f option"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-f -o %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
+
+ def test_build_rootfs_long(self):
+ """Test --build-rootfs option"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "--build-rootfs "
+ "--outdir %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_rootfs_indirect_recipes(self):
+ """Test usage of rootfs plugin with rootfs recipes"""
+ runCmd("wic create directdisk-multi-rootfs "
+ "--image-name=core-image-minimal "
+ "--rootfs rootfs1=core-image-minimal "
+ "--rootfs rootfs2=core-image-minimal "
+ "--outdir %s" % self.resultdir)
+ self.assertEqual(1, len(glob(self.resultdir + "directdisk-multi-rootfs*.direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_rootfs_artifacts(self):
+ """Test usage of rootfs plugin with rootfs paths"""
+ bb_vars = get_bb_vars(['STAGING_DATADIR', 'RECIPE_SYSROOT_NATIVE'],
+ 'wic-tools')
+ bb_vars.update(get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_ROOTFS'],
+ 'core-image-minimal'))
+ bbvars = {key.lower(): value for key, value in bb_vars.items()}
+ bbvars['wks'] = "directdisk-multi-rootfs"
+ bbvars['resultdir'] = self.resultdir
+ runCmd("wic create %(wks)s "
+ "--bootimg-dir=%(staging_datadir)s "
+ "--kernel-dir=%(deploy_dir_image)s "
+ "--native-sysroot=%(recipe_sysroot_native)s "
+ "--rootfs-dir rootfs1=%(image_rootfs)s "
+ "--rootfs-dir rootfs2=%(image_rootfs)s "
+ "--outdir %(resultdir)s" % bbvars)
+ self.assertEqual(1, len(glob(self.resultdir + "%(wks)s-*.direct" % bbvars)))
+
+ def test_exclude_path(self):
+ """Test --exclude-path wks option."""
+
+ oldpath = os.environ['PATH']
+ os.environ['PATH'] = get_bb_var("PATH", "wic-tools")
+
+ try:
+ wks_file = 'temp.wks'
+ with open(wks_file, 'w') as wks:
+ rootfs_dir = get_bb_var('IMAGE_ROOTFS', 'core-image-minimal')
+ wks.write("""
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path usr
+part /usr --source rootfs --ondisk mmcblk0 --fstype=ext4 --rootfs-dir %s/usr
+part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --rootfs-dir %s/usr"""
+ % (rootfs_dir, rootfs_dir))
+ runCmd("wic create %s -e core-image-minimal -o %s" \
+ % (wks_file, self.resultdir))
+
+ os.remove(wks_file)
+ wicout = glob(self.resultdir + "%s-*direct" % 'temp')
+ self.assertEqual(1, len(wicout))
+
+ wicimg = wicout[0]
+
+ # verify partition size with wic
+ res = runCmd("parted -m %s unit b p 2>/dev/null" % wicimg)
+
+ # parse parted output which looks like this:
+ # BYT;\n
+ # /var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n
+ # 1:0.00MiB:200MiB:200MiB:ext4::;\n
+ partlns = res.output.splitlines()[2:]
+
+ self.assertEqual(3, len(partlns))
+
+ for part in [1, 2, 3]:
+ part_file = os.path.join(self.resultdir, "selftest_img.part%d" % part)
+ partln = partlns[part-1].split(":")
+ self.assertEqual(7, len(partln))
+ start = int(partln[1].rstrip("B")) / 512
+ length = int(partln[3].rstrip("B")) / 512
+ runCmd("dd if=%s of=%s skip=%d count=%d" %
+ (wicimg, part_file, start, length))
+
+ def extract_files(debugfs_output):
+ """
+ extract file names from the output of debugfs -R 'ls -p',
+ which looks like this:
+
+ /2/040755/0/0/.//\n
+ /2/040755/0/0/..//\n
+ /11/040700/0/0/lost+found^M//\n
+ /12/040755/1002/1002/run//\n
+ /13/040755/1002/1002/sys//\n
+ /14/040755/1002/1002/bin//\n
+ /80/040755/1002/1002/var//\n
+ /92/040755/1002/1002/tmp//\n
+ """
+ # NOTE the occasional ^M in file names
+ return [line.split('/')[5].strip() for line in \
+ debugfs_output.strip().split('/\n')]
+
+ # Test partition 1, should contain the normal root directories, except
+ # /usr.
+ res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \
+ os.path.join(self.resultdir, "selftest_img.part1"))
+ files = extract_files(res.output)
+ self.assertIn("etc", files)
+ self.assertNotIn("usr", files)
+
+ # Partition 2, should contain common directories for /usr, not root
+ # directories.
+ res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \
+ os.path.join(self.resultdir, "selftest_img.part2"))
+ files = extract_files(res.output)
+ self.assertNotIn("etc", files)
+ self.assertNotIn("usr", files)
+ self.assertIn("share", files)
+
+ # Partition 3, should contain the same as partition 2, including the bin
+ # directory, but not the files inside it.
+ res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \
+ os.path.join(self.resultdir, "selftest_img.part3"))
+ files = extract_files(res.output)
+ self.assertNotIn("etc", files)
+ self.assertNotIn("usr", files)
+ self.assertIn("share", files)
+ self.assertIn("bin", files)
+ res = runCmd("debugfs -R 'ls -p bin' %s 2>/dev/null" % \
+ os.path.join(self.resultdir, "selftest_img.part3"))
+ files = extract_files(res.output)
+ self.assertIn(".", files)
+ self.assertIn("..", files)
+ self.assertEqual(2, len(files))
+
+ for part in [1, 2, 3]:
+ part_file = os.path.join(self.resultdir, "selftest_img.part%d" % part)
+ os.remove(part_file)
+
+ finally:
+ os.environ['PATH'] = oldpath
+
+ def test_exclude_path_errors(self):
+ """Test --exclude-path wks option error handling."""
+ wks_file = 'temp.wks'
+
+ # Absolute argument.
+ with open(wks_file, 'w') as wks:
+ wks.write("part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path /usr")
+ self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+ % (wks_file, self.resultdir), ignore_status=True).status)
+ os.remove(wks_file)
+
+ # Argument pointing to parent directory.
+ with open(wks_file, 'w') as wks:
+ wks.write("part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path ././..")
+ self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+ % (wks_file, self.resultdir), ignore_status=True).status)
+ os.remove(wks_file)
+
+class Wic2(WicTestCase):
+
+ def test_bmap_short(self):
+ """Test generation of .bmap file -m option"""
+ cmd = "wic create wictestdisk -e core-image-minimal -m -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct")))
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct.bmap")))
+
+ def test_bmap_long(self):
+ """Test generation of .bmap file --bmap option"""
+ cmd = "wic create wictestdisk -e core-image-minimal --bmap -o %s" % self.resultdir
+ runCmd(cmd)
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct")))
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct.bmap")))
+
+ def test_image_env(self):
+ """Test generation of <image>.env files."""
+ image = 'core-image-minimal'
+ imgdatadir = self._get_image_env_path(image)
+
+ bb_vars = get_bb_vars(['IMAGE_BASENAME', 'WICVARS'], image)
+ basename = bb_vars['IMAGE_BASENAME']
+ self.assertEqual(basename, image)
+ path = os.path.join(imgdatadir, basename) + '.env'
+ self.assertTrue(os.path.isfile(path))
+
+ wicvars = set(bb_vars['WICVARS'].split())
+ # filter out optional variables
+ wicvars = wicvars.difference(('DEPLOY_DIR_IMAGE', 'IMAGE_BOOT_FILES',
+ 'INITRD', 'INITRD_LIVE', 'ISODIR','INITRAMFS_IMAGE',
+ 'INITRAMFS_IMAGE_BUNDLE', 'INITRAMFS_LINK_NAME'))
+ with open(path) as envfile:
+ content = dict(line.split("=", 1) for line in envfile)
+ # test if variables used by wic present in the .env file
+ for var in wicvars:
+ self.assertTrue(var in content, "%s is not in .env file" % var)
+ self.assertTrue(content[var])
+
+ def test_image_vars_dir_short(self):
+ """Test image vars directory selection -v option"""
+ image = 'core-image-minimal'
+ imgenvdir = self._get_image_env_path(image)
+ native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
+
+ runCmd("wic create wictestdisk "
+ "--image-name=%s -v %s -n %s -o %s"
+ % (image, imgenvdir, native_sysroot,
+ self.resultdir))
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct")))
+
+ def test_image_vars_dir_long(self):
+ """Test image vars directory selection --vars option"""
+ image = 'core-image-minimal'
+ imgenvdir = self._get_image_env_path(image)
+ native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
+
+ runCmd("wic create wictestdisk "
+ "--image-name=%s "
+ "--vars %s "
+ "--native-sysroot %s "
+ "--outdir %s"
+ % (image, imgenvdir, native_sysroot,
+ self.resultdir))
+ self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct")))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_wic_image_type(self):
+ """Test building wic images by bitbake"""
+ config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\
+ 'MACHINE_FEATURES_append = " efi"\n'
+ self.append_config(config)
+ self.assertEqual(0, bitbake('wic-image-minimal').status)
+ self.remove_config(config)
+
+ bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'MACHINE'])
+ deploy_dir = bb_vars['DEPLOY_DIR_IMAGE']
+ machine = bb_vars['MACHINE']
+ prefix = os.path.join(deploy_dir, 'wic-image-minimal-%s.' % machine)
+ # check if we have result image and manifests symlinks
+ # pointing to existing files
+ for suffix in ('wic', 'manifest'):
+ path = prefix + suffix
+ self.assertTrue(os.path.islink(path))
+ self.assertTrue(os.path.isfile(os.path.realpath(path)))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_qemu(self):
+ """Test wic-image-minimal under qemu"""
+ config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\
+ 'MACHINE_FEATURES_append = " efi"\n'
+ self.append_config(config)
+ self.assertEqual(0, bitbake('wic-image-minimal').status)
+ self.remove_config(config)
+
+ with runqemu('wic-image-minimal', ssh=False) as qemu:
+ cmd = "mount | grep '^/dev/' | cut -f1,3 -d ' ' | egrep -c -e '/dev/sda1 /boot' " \
+ "-e '/dev/root /|/dev/sda2 /' -e '/dev/sda3 /media' -e '/dev/sda4 /mnt'"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '4')
+ cmd = "grep UUID= /etc/fstab"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, 'UUID=2c71ef06-a81d-4735-9d3a-379b69c6bdba\t/media\text4\tdefaults\t0\t0')
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_qemu_efi(self):
+ """Test core-image-minimal efi image under qemu"""
+ config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "mkefidisk.wks"\n'
+ self.append_config(config)
+ self.assertEqual(0, bitbake('core-image-minimal ovmf').status)
+ self.remove_config(config)
+
+ with runqemu('core-image-minimal', ssh=False,
+ runqemuparams='ovmf', image_fstype='wic') as qemu:
+ cmd = "grep sda. /proc/partitions |wc -l"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '3')
+
+ @staticmethod
+ def _make_fixed_size_wks(size):
+ """
+ Create a wks of an image with a single partition. Size of the partition is set
+ using --fixed-size flag. Returns a tuple: (path to wks file, wks image name)
+ """
+ with NamedTemporaryFile("w", suffix=".wks", delete=False) as tempf:
+ wkspath = tempf.name
+ tempf.write("part " \
+ "--source rootfs --ondisk hda --align 4 --fixed-size %d "
+ "--fstype=ext4\n" % size)
+ wksname = os.path.splitext(os.path.basename(wkspath))[0]
+
+ return wkspath, wksname
+
+ def test_fixed_size(self):
+ """
+ Test creation of a simple image with partition size controlled through
+ --fixed-size flag
+ """
+ wkspath, wksname = Wic2._make_fixed_size_wks(200)
+
+ runCmd("wic create %s -e core-image-minimal -o %s" \
+ % (wkspath, self.resultdir))
+ os.remove(wkspath)
+ wicout = glob(self.resultdir + "%s-*direct" % wksname)
+ self.assertEqual(1, len(wicout))
+
+ wicimg = wicout[0]
+
+ native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
+
+ # verify partition size with wic
+ res = runCmd("parted -m %s unit mib p 2>/dev/null" % wicimg,
+ native_sysroot=native_sysroot)
+
+ # parse parted output which looks like this:
+ # BYT;\n
+ # /var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n
+ # 1:0.00MiB:200MiB:200MiB:ext4::;\n
+ partlns = res.output.splitlines()[2:]
+
+ self.assertEqual(1, len(partlns),
+ msg="Partition list '%s'" % res.output)
+ self.assertEqual("1:0.00MiB:200MiB:200MiB:ext4::;", partlns[0],
+ msg="Partition list '%s'" % res.output)
+
+ def test_fixed_size_error(self):
+ """
+ Test creation of a simple image with partition size controlled through
+ --fixed-size flag. The size of partition is intentionally set to 1MiB
+ in order to trigger an error in wic.
+ """
+ wkspath, wksname = Wic2._make_fixed_size_wks(1)
+
+ self.assertEqual(1, runCmd("wic create %s -e core-image-minimal -o %s" \
+ % (wkspath, self.resultdir), ignore_status=True).status)
+ os.remove(wkspath)
+ wicout = glob(self.resultdir + "%s-*direct" % wksname)
+ self.assertEqual(0, len(wicout))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_rawcopy_plugin_qemu(self):
+ """Test rawcopy plugin in qemu"""
+ # build ext4 and wic images
+ for fstype in ("ext4", "wic"):
+ config = 'IMAGE_FSTYPES = "%s"\nWKS_FILE = "test_rawcopy_plugin.wks.in"\n' % fstype
+ self.append_config(config)
+ self.assertEqual(0, bitbake('core-image-minimal').status)
+ self.remove_config(config)
+
+ with runqemu('core-image-minimal', ssh=False, image_fstype='wic') as qemu:
+ cmd = "grep sda. /proc/partitions |wc -l"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '2')
+
+ def test_rawcopy_plugin(self):
+ """Test rawcopy plugin"""
+ img = 'core-image-minimal'
+ machine = get_bb_var('MACHINE', img)
+ with NamedTemporaryFile("w", suffix=".wks") as wks:
+ wks.writelines(['part /boot --active --source bootimg-pcbios\n',
+ 'part / --source rawcopy --sourceparams="file=%s-%s.ext4" --use-uuid\n'\
+ % (img, machine),
+ 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n'])
+ wks.flush()
+ cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
+ runCmd(cmd)
+ wksname = os.path.splitext(os.path.basename(wks.name))[0]
+ out = glob(self.resultdir + "%s-*direct" % wksname)
+ self.assertEqual(1, len(out))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_biosplusefi_plugin_qemu(self):
+ """Test biosplusefi plugin in qemu"""
+ config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n'
+ self.append_config(config)
+ self.assertEqual(0, bitbake('core-image-minimal').status)
+ self.remove_config(config)
+
+ with runqemu('core-image-minimal', ssh=False, image_fstype='wic') as qemu:
+ # Check that we have ONLY two /dev/sda* partitions (/boot and /)
+ cmd = "grep sda. /proc/partitions | wc -l"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '2')
+ # Check that /dev/sda1 is /boot and that either /dev/root OR /dev/sda2 is /
+ cmd = "mount | grep '^/dev/' | cut -f1,3 -d ' ' | egrep -c -e '/dev/sda1 /boot' -e '/dev/root /|/dev/sda2 /'"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '2')
+ # Check that /boot has EFI bootx64.efi (required for EFI)
+ cmd = "ls /boot/EFI/BOOT/bootx64.efi | wc -l"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '1')
+ # Check that "BOOTABLE" flag is set on boot partition (required for PC-Bios)
+ # Trailing "cat" seems to be required; otherwise run_serial() sends back echo of the input command
+ cmd = "fdisk -l /dev/sda | grep /dev/sda1 | awk {print'$2'} | cat"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '*')
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_biosplusefi_plugin(self):
+ """Test biosplusefi plugin"""
+ # Wic generation below may fail depending on the order of the unittests
+ # This is because bootimg-pcbios (that bootimg-biosplusefi uses) generate its MBR inside STAGING_DATADIR directory
+ # which may or may not exists depending on what was built already
+ # If an image hasn't been built yet, directory ${STAGING_DATADIR}/syslinux won't exists and _get_bootimg_dir()
+ # will raise with "Couldn't find correct bootimg_dir"
+ # The easiest way to work-around this issue is to make sure we already built an image here, hence the bitbake call
+ config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n'
+ self.append_config(config)
+ self.assertEqual(0, bitbake('core-image-minimal').status)
+ self.remove_config(config)
+
+ img = 'core-image-minimal'
+ with NamedTemporaryFile("w", suffix=".wks") as wks:
+ wks.writelines(['part /boot --active --source bootimg-biosplusefi --sourceparams="loader=grub-efi"\n',
+ 'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'\
+ 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n'])
+ wks.flush()
+ cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
+ runCmd(cmd)
+ wksname = os.path.splitext(os.path.basename(wks.name))[0]
+ out = glob(self.resultdir + "%s-*.direct" % wksname)
+ self.assertEqual(1, len(out))
+
+ def test_fs_types(self):
+ """Test filesystem types for empty and not empty partitions"""
+ img = 'core-image-minimal'
+ with NamedTemporaryFile("w", suffix=".wks") as wks:
+ wks.writelines(['part ext2 --fstype ext2 --source rootfs\n',
+ 'part btrfs --fstype btrfs --source rootfs --size 40M\n',
+ 'part squash --fstype squashfs --source rootfs\n',
+ 'part swap --fstype swap --size 1M\n',
+ 'part emptyvfat --fstype vfat --size 1M\n',
+ 'part emptymsdos --fstype msdos --size 1M\n',
+ 'part emptyext2 --fstype ext2 --size 1M\n',
+ 'part emptybtrfs --fstype btrfs --size 150M\n'])
+ wks.flush()
+ cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
+ runCmd(cmd)
+ wksname = os.path.splitext(os.path.basename(wks.name))[0]
+ out = glob(self.resultdir + "%s-*direct" % wksname)
+ self.assertEqual(1, len(out))
+
+ def test_kickstart_parser(self):
+ """Test wks parser options"""
+ with NamedTemporaryFile("w", suffix=".wks") as wks:
+ wks.writelines(['part / --fstype ext3 --source rootfs --system-id 0xFF '\
+ '--overhead-factor 1.2 --size 100k\n'])
+ wks.flush()
+ cmd = "wic create %s -e core-image-minimal -o %s" % (wks.name, self.resultdir)
+ runCmd(cmd)
+ wksname = os.path.splitext(os.path.basename(wks.name))[0]
+ out = glob(self.resultdir + "%s-*direct" % wksname)
+ self.assertEqual(1, len(out))
+
+ def test_image_bootpart_globbed(self):
+ """Test globbed sources with image-bootpart plugin"""
+ img = "core-image-minimal"
+ cmd = "wic create sdimage-bootpart -e %s -o %s" % (img, self.resultdir)
+ config = 'IMAGE_BOOT_FILES = "%s*"' % get_bb_var('KERNEL_IMAGETYPE', img)
+ self.append_config(config)
+ runCmd(cmd)
+ self.remove_config(config)
+ self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct")))
+
+ def test_sparse_copy(self):
+ """Test sparse_copy with FIEMAP and SEEK_HOLE filemap APIs"""
+ libpath = os.path.join(get_bb_var('COREBASE'), 'scripts', 'lib', 'wic')
+ sys.path.insert(0, libpath)
+ from filemap import FilemapFiemap, FilemapSeek, sparse_copy, ErrorNotSupp
+ with NamedTemporaryFile("w", suffix=".wic-sparse") as sparse:
+ src_name = sparse.name
+ src_size = 1024 * 10
+ sparse.truncate(src_size)
+ # write one byte to the file
+ with open(src_name, 'r+b') as sfile:
+ sfile.seek(1024 * 4)
+ sfile.write(b'\x00')
+ dest = sparse.name + '.out'
+ # copy src file to dest using different filemap APIs
+ for api in (FilemapFiemap, FilemapSeek, None):
+ if os.path.exists(dest):
+ os.unlink(dest)
+ try:
+ sparse_copy(sparse.name, dest, api=api)
+ except ErrorNotSupp:
+ continue # skip unsupported API
+ dest_stat = os.stat(dest)
+ self.assertEqual(dest_stat.st_size, src_size)
+ # 8 blocks is 4K (physical sector size)
+ self.assertEqual(dest_stat.st_blocks, 8)
+ os.unlink(dest)
+
+ def test_wic_ls(self):
+ """Test listing image content using 'wic ls'"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-D -o %s" % self.resultdir)
+ images = glob(self.resultdir + "wictestdisk-*.direct")
+ self.assertEqual(1, len(images))
+
+ sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+ # list partitions
+ result = runCmd("wic ls %s -n %s" % (images[0], sysroot))
+ self.assertEqual(3, len(result.output.split('\n')))
+
+ # list directory content of the first partition
+ result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
+ self.assertEqual(6, len(result.output.split('\n')))
+
+ def test_wic_cp(self):
+ """Test copy files and directories to the the wic image."""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-D -o %s" % self.resultdir)
+ images = glob(self.resultdir + "wictestdisk-*.direct")
+ self.assertEqual(1, len(images))
+
+ sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+ # list directory content of the first partition
+ result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
+ self.assertEqual(6, len(result.output.split('\n')))
+
+ with NamedTemporaryFile("w", suffix=".wic-cp") as testfile:
+ testfile.write("test")
+
+ # copy file to the partition
+ runCmd("wic cp %s %s:1/ -n %s" % (testfile.name, images[0], sysroot))
+
+ # check if file is there
+ result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
+ self.assertEqual(7, len(result.output.split('\n')))
+ self.assertTrue(os.path.basename(testfile.name) in result.output)
+
+ # prepare directory
+ testdir = os.path.join(self.resultdir, 'wic-test-cp-dir')
+ testsubdir = os.path.join(testdir, 'subdir')
+ os.makedirs(os.path.join(testsubdir))
+ copy(testfile.name, testdir)
+
+ # copy directory to the partition
+ runCmd("wic cp %s %s:1/ -n %s" % (testdir, images[0], sysroot))
+
+ # check if directory is there
+ result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
+ self.assertEqual(8, len(result.output.split('\n')))
+ self.assertTrue(os.path.basename(testdir) in result.output)
+
+ # copy the file from the partition and check if it success
+ dest = '%s-cp' % testfile.name
+ runCmd("wic cp %s:1/%s %s -n %s" % (images[0],
+ os.path.basename(testfile.name), dest, sysroot))
+ self.assertTrue(os.path.exists(dest))
+
+
+ def test_wic_rm(self):
+ """Test removing files and directories from the the wic image."""
+ runCmd("wic create mkefidisk "
+ "--image-name=core-image-minimal "
+ "-D -o %s" % self.resultdir)
+ images = glob(self.resultdir + "mkefidisk-*.direct")
+ self.assertEqual(1, len(images))
+
+ sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+ # list directory content of the first partition
+ result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot))
+ self.assertIn('\nBZIMAGE ', result.output)
+ self.assertIn('\nEFI <DIR> ', result.output)
+
+ # remove file
+ runCmd("wic rm %s:1/bzimage -n %s" % (images[0], sysroot))
+
+ # remove directory
+ runCmd("wic rm %s:1/efi -n %s" % (images[0], sysroot))
+
+ # check if they're removed
+ result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot))
+ self.assertNotIn('\nBZIMAGE ', result.output)
+ self.assertNotIn('\nEFI <DIR> ', result.output)
+
+ def test_mkfs_extraopts(self):
+ """Test wks option --mkfs-extraopts for empty and not empty partitions"""
+ img = 'core-image-minimal'
+ with NamedTemporaryFile("w", suffix=".wks") as wks:
+ wks.writelines(
+ ['part ext2 --fstype ext2 --source rootfs --mkfs-extraopts "-D -F -i 8192"\n',
+ "part btrfs --fstype btrfs --source rootfs --size 40M --mkfs-extraopts='--quiet'\n",
+ 'part squash --fstype squashfs --source rootfs --mkfs-extraopts "-no-sparse -b 4096"\n',
+ 'part emptyvfat --fstype vfat --size 1M --mkfs-extraopts "-S 1024 -s 64"\n',
+ 'part emptymsdos --fstype msdos --size 1M --mkfs-extraopts "-S 1024 -s 64"\n',
+ 'part emptyext2 --fstype ext2 --size 1M --mkfs-extraopts "-D -F -i 8192"\n',
+ 'part emptybtrfs --fstype btrfs --size 100M --mkfs-extraopts "--mixed -K"\n'])
+ wks.flush()
+ cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
+ runCmd(cmd)
+ wksname = os.path.splitext(os.path.basename(wks.name))[0]
+ out = glob(self.resultdir + "%s-*direct" % wksname)
+ self.assertEqual(1, len(out))
+
+ def test_expand_mbr_image(self):
+ """Test wic write --expand command for mbr image"""
+ # build an image
+ config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "directdisk.wks"\n'
+ self.append_config(config)
+ self.assertEqual(0, bitbake('core-image-minimal').status)
+
+ # get path to the image
+ bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'MACHINE'])
+ deploy_dir = bb_vars['DEPLOY_DIR_IMAGE']
+ machine = bb_vars['MACHINE']
+ image_path = os.path.join(deploy_dir, 'core-image-minimal-%s.wic' % machine)
+
+ self.remove_config(config)
+
+ try:
+ # expand image to 1G
+ new_image_path = None
+ with NamedTemporaryFile(mode='wb', suffix='.wic.exp',
+ dir=deploy_dir, delete=False) as sparse:
+ sparse.truncate(1024 ** 3)
+ new_image_path = sparse.name
+
+ sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+ cmd = "wic write -n %s --expand 1:0 %s %s" % (sysroot, image_path, new_image_path)
+ runCmd(cmd)
+
+ # check if partitions are expanded
+ orig = runCmd("wic ls %s -n %s" % (image_path, sysroot))
+ exp = runCmd("wic ls %s -n %s" % (new_image_path, sysroot))
+ orig_sizes = [int(line.split()[3]) for line in orig.output.split('\n')[1:]]
+ exp_sizes = [int(line.split()[3]) for line in exp.output.split('\n')[1:]]
+ self.assertEqual(orig_sizes[0], exp_sizes[0]) # first partition is not resized
+ self.assertTrue(orig_sizes[1] < exp_sizes[1])
+
+ # Check if all free space is partitioned
+ result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path))
+ self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output)
+
+ os.rename(image_path, image_path + '.bak')
+ os.rename(new_image_path, image_path)
+
+ # Check if it boots in qemu
+ with runqemu('core-image-minimal', ssh=False) as qemu:
+ cmd = "ls /etc/"
+ status, output = qemu.run_serial('true')
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ finally:
+ if os.path.exists(new_image_path):
+ os.unlink(new_image_path)
+ if os.path.exists(image_path + '.bak'):
+ os.rename(image_path + '.bak', image_path)
+
+ def test_wic_ls_ext(self):
+ """Test listing content of the ext partition using 'wic ls'"""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-D -o %s" % self.resultdir)
+ images = glob(self.resultdir + "wictestdisk-*.direct")
+ self.assertEqual(1, len(images))
+
+ sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+ # list directory content of the second ext4 partition
+ result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot))
+ self.assertTrue(set(['bin', 'home', 'proc', 'usr', 'var', 'dev', 'lib', 'sbin']).issubset(
+ set(line.split()[-1] for line in result.output.split('\n') if line)))
+
+ def test_wic_cp_ext(self):
+ """Test copy files and directories to the ext partition."""
+ runCmd("wic create wictestdisk "
+ "--image-name=core-image-minimal "
+ "-D -o %s" % self.resultdir)
+ images = glob(self.resultdir + "wictestdisk-*.direct")
+ self.assertEqual(1, len(images))
+
+ sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+ # list directory content of the ext4 partition
+ result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot))
+ dirs = set(line.split()[-1] for line in result.output.split('\n') if line)
+ self.assertTrue(set(['bin', 'home', 'proc', 'usr', 'var', 'dev', 'lib', 'sbin']).issubset(dirs))
+
+ with NamedTemporaryFile("w", suffix=".wic-cp") as testfile:
+ testfile.write("test")
+
+ # copy file to the partition
+ runCmd("wic cp %s %s:2/ -n %s" % (testfile.name, images[0], sysroot))
+
+ # check if file is there
+ result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot))
+ newdirs = set(line.split()[-1] for line in result.output.split('\n') if line)
+ self.assertEqual(newdirs.difference(dirs), set([os.path.basename(testfile.name)]))
+
+ # check if the file to copy is in the partition
+ result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot))
+ self.assertTrue('fstab' in [line.split()[-1] for line in result.output.split('\n') if line])
+
+ # copy file from the partition, replace the temporary file content with it and
+ # check for the file size to validate the copy
+ runCmd("wic cp %s:2/etc/fstab %s -n %s" % (images[0], testfile.name, sysroot))
+ self.assertTrue(os.stat(testfile.name).st_size > 0)
+
+
+ def test_wic_rm_ext(self):
+ """Test removing files from the ext partition."""
+ runCmd("wic create mkefidisk "
+ "--image-name=core-image-minimal "
+ "-D -o %s" % self.resultdir)
+ images = glob(self.resultdir + "mkefidisk-*.direct")
+ self.assertEqual(1, len(images))
+
+ sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+ # list directory content of the /etc directory on ext4 partition
+ result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot))
+ self.assertTrue('fstab' in [line.split()[-1] for line in result.output.split('\n') if line])
+
+ # remove file
+ runCmd("wic rm %s:2/etc/fstab -n %s" % (images[0], sysroot))
+
+ # check if it's removed
+ result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot))
+ self.assertTrue('fstab' not in [line.split()[-1] for line in result.output.split('\n') if line])
+
+ # remove non-empty directory
+ runCmd("wic rm -r %s:2/etc/ -n %s" % (images[0], sysroot))
+
+ # check if it's removed
+ result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot))
+ self.assertTrue('etc' not in [line.split()[-1] for line in result.output.split('\n') if line])
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
new file mode 100644
index 0000000000..c4eb5d614e
--- /dev/null
+++ b/meta/lib/oeqa/selftest/context.py
@@ -0,0 +1,341 @@
+#
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import time
+import glob
+import sys
+import importlib
+import signal
+from shutil import copyfile
+from random import choice
+
+import oeqa
+import oe
+
+from oeqa.core.context import OETestContext, OETestContextExecutor
+from oeqa.core.exception import OEQAPreRun, OEQATestNotFound
+
+from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer
+
+class OESelftestTestContext(OETestContext):
+ def __init__(self, td=None, logger=None, machines=None, config_paths=None):
+ super(OESelftestTestContext, self).__init__(td, logger)
+
+ self.machines = machines
+ self.custommachine = None
+ self.config_paths = config_paths
+
+ def runTests(self, processes=None, machine=None, skips=[]):
+ if machine:
+ self.custommachine = machine
+ if machine == 'random':
+ self.custommachine = choice(self.machines)
+ self.logger.info('Run tests with custom MACHINE set to: %s' % \
+ self.custommachine)
+ return super(OESelftestTestContext, self).runTests(processes, skips)
+
+ def listTests(self, display_type, machine=None):
+ return super(OESelftestTestContext, self).listTests(display_type)
+
+class OESelftestTestContextExecutor(OETestContextExecutor):
+ _context_class = OESelftestTestContext
+ _script_executor = 'oe-selftest'
+
+ name = 'oe-selftest'
+ help = 'oe-selftest test component'
+ description = 'Executes selftest tests'
+
+ def register_commands(self, logger, parser):
+ group = parser.add_mutually_exclusive_group(required=True)
+
+ group.add_argument('-a', '--run-all-tests', default=False,
+ action="store_true", dest="run_all_tests",
+ help='Run all (unhidden) tests')
+ group.add_argument('-R', '--skip-tests', required=False, action='store',
+ nargs='+', dest="skips", default=None,
+ help='Run all (unhidden) tests except the ones specified. Format should be <module>[.<class>[.<test_method>]]')
+ group.add_argument('-r', '--run-tests', required=False, action='store',
+ nargs='+', dest="run_tests", default=None,
+ help='Select what tests to run (modules, classes or test methods). Format should be: <module>.<class>.<test_method>')
+
+ group.add_argument('-m', '--list-modules', required=False,
+ action="store_true", default=False,
+ help='List all available test modules.')
+ group.add_argument('--list-classes', required=False,
+ action="store_true", default=False,
+ help='List all available test classes.')
+ group.add_argument('-l', '--list-tests', required=False,
+ action="store_true", default=False,
+ help='List all available tests.')
+
+ parser.add_argument('-j', '--num-processes', dest='processes', action='store',
+ type=int, help="number of processes to execute in parallel with")
+
+ parser.add_argument('--machine', required=False, choices=['random', 'all'],
+ help='Run tests on different machines (random/all).')
+
+ parser.add_argument('-t', '--select-tag', dest="select_tags",
+ action='append', default=None,
+ help='Filter all (unhidden) tests to any that match any of the specified tag(s).')
+ parser.add_argument('-T', '--exclude-tag', dest="exclude_tags",
+ action='append', default=None,
+ help='Exclude all (unhidden) tests that match any of the specified tag(s). (exclude applies before select)')
+
+ parser.set_defaults(func=self.run)
+
+ def _get_available_machines(self):
+ machines = []
+
+ bbpath = self.tc_kwargs['init']['td']['BBPATH'].split(':')
+
+ for path in bbpath:
+ found_machines = glob.glob(os.path.join(path, 'conf', 'machine', '*.conf'))
+ if found_machines:
+ for i in found_machines:
+ # eg: '/home/<user>/poky/meta-intel/conf/machine/intel-core2-32.conf'
+ machines.append(os.path.splitext(os.path.basename(i))[0])
+
+ return machines
+
+ def _get_cases_paths(self, bbpath):
+ cases_paths = []
+ for layer in bbpath:
+ cases_dir = os.path.join(layer, 'lib', 'oeqa', 'selftest', 'cases')
+ if os.path.isdir(cases_dir):
+ cases_paths.append(cases_dir)
+ return cases_paths
+
+ def _process_args(self, logger, args):
+ args.test_start_time = time.strftime("%Y%m%d%H%M%S")
+ args.test_data_file = None
+ args.CASES_PATHS = None
+
+ bbvars = get_bb_vars()
+ logdir = os.environ.get("BUILDDIR")
+ if 'LOG_DIR' in bbvars:
+ logdir = bbvars['LOG_DIR']
+ bb.utils.mkdirhier(logdir)
+ args.output_log = logdir + '/%s-results-%s.log' % (self.name, args.test_start_time)
+
+ super(OESelftestTestContextExecutor, self)._process_args(logger, args)
+
+ if args.list_modules:
+ args.list_tests = 'module'
+ elif args.list_classes:
+ args.list_tests = 'class'
+ elif args.list_tests:
+ args.list_tests = 'name'
+
+ self.tc_kwargs['init']['td'] = bbvars
+ self.tc_kwargs['init']['machines'] = self._get_available_machines()
+
+ builddir = os.environ.get("BUILDDIR")
+ self.tc_kwargs['init']['config_paths'] = {}
+ self.tc_kwargs['init']['config_paths']['testlayer_path'] = \
+ get_test_layer()
+ self.tc_kwargs['init']['config_paths']['builddir'] = builddir
+ self.tc_kwargs['init']['config_paths']['localconf'] = \
+ os.path.join(builddir, "conf/local.conf")
+ self.tc_kwargs['init']['config_paths']['localconf_backup'] = \
+ os.path.join(builddir, "conf/local.conf.orig")
+ self.tc_kwargs['init']['config_paths']['localconf_class_backup'] = \
+ os.path.join(builddir, "conf/local.conf.bk")
+ self.tc_kwargs['init']['config_paths']['bblayers'] = \
+ os.path.join(builddir, "conf/bblayers.conf")
+ self.tc_kwargs['init']['config_paths']['bblayers_backup'] = \
+ os.path.join(builddir, "conf/bblayers.conf.orig")
+ self.tc_kwargs['init']['config_paths']['bblayers_class_backup'] = \
+ os.path.join(builddir, "conf/bblayers.conf.bk")
+
+ copyfile(self.tc_kwargs['init']['config_paths']['localconf'],
+ self.tc_kwargs['init']['config_paths']['localconf_backup'])
+ copyfile(self.tc_kwargs['init']['config_paths']['bblayers'],
+ self.tc_kwargs['init']['config_paths']['bblayers_backup'])
+
+ def tag_filter(tags):
+ if args.exclude_tags:
+ if any(tag in args.exclude_tags for tag in tags):
+ return True
+ if args.select_tags:
+ if not tags or not any(tag in args.select_tags for tag in tags):
+ return True
+ return False
+
+ if args.select_tags or args.exclude_tags:
+ self.tc_kwargs['load']['tags_filter'] = tag_filter
+
+ self.tc_kwargs['run']['skips'] = args.skips
+ self.tc_kwargs['run']['processes'] = args.processes
+
+ def _pre_run(self):
+ def _check_required_env_variables(vars):
+ for var in vars:
+ if not os.environ.get(var):
+ self.tc.logger.error("%s is not set. Did you forget to source your build environment setup script?" % var)
+ raise OEQAPreRun
+
+ def _check_presence_meta_selftest():
+ builddir = os.environ.get("BUILDDIR")
+ if os.getcwd() != builddir:
+ self.tc.logger.info("Changing cwd to %s" % builddir)
+ os.chdir(builddir)
+
+ if not "meta-selftest" in self.tc.td["BBLAYERS"]:
+ self.tc.logger.warning("meta-selftest layer not found in BBLAYERS, adding it")
+ meta_selftestdir = os.path.join(
+ self.tc.td["BBLAYERS_FETCH_DIR"], 'meta-selftest')
+ if os.path.isdir(meta_selftestdir):
+ runCmd("bitbake-layers add-layer %s" %meta_selftestdir)
+ # reload data is needed because a meta-selftest layer was add
+ self.tc.td = get_bb_vars()
+ self.tc.config_paths['testlayer_path'] = get_test_layer()
+ else:
+ self.tc.logger.error("could not locate meta-selftest in:\n%s" % meta_selftestdir)
+ raise OEQAPreRun
+
+ def _add_layer_libs():
+ bbpath = self.tc.td['BBPATH'].split(':')
+ layer_libdirs = [p for p in (os.path.join(l, 'lib') \
+ for l in bbpath) if os.path.exists(p)]
+ if layer_libdirs:
+ self.tc.logger.info("Adding layer libraries:")
+ for l in layer_libdirs:
+ self.tc.logger.info("\t%s" % l)
+
+ sys.path.extend(layer_libdirs)
+ importlib.reload(oeqa.selftest)
+
+ _check_required_env_variables(["BUILDDIR"])
+ _check_presence_meta_selftest()
+
+ if "buildhistory.bbclass" in self.tc.td["BBINCLUDED"]:
+ self.tc.logger.error("You have buildhistory enabled already and this isn't recommended for selftest, please disable it first.")
+ raise OEQAPreRun
+
+ if "rm_work.bbclass" in self.tc.td["BBINCLUDED"]:
+ self.tc.logger.error("You have rm_work enabled which isn't recommended while running oe-selftest. Please disable it before continuing.")
+ raise OEQAPreRun
+
+ if "PRSERV_HOST" in self.tc.td:
+ self.tc.logger.error("Please unset PRSERV_HOST in order to run oe-selftest")
+ raise OEQAPreRun
+
+ if "SANITY_TESTED_DISTROS" in self.tc.td:
+ self.tc.logger.error("Please unset SANITY_TESTED_DISTROS in order to run oe-selftest")
+ raise OEQAPreRun
+
+ _add_layer_libs()
+
+ self.tc.logger.info("Running bitbake -e to test the configuration is valid/parsable")
+ runCmd("bitbake -e")
+
+ def get_json_result_dir(self, args):
+ json_result_dir = os.path.join(self.tc.td["LOG_DIR"], 'oeqa')
+ if "OEQA_JSON_RESULT_DIR" in self.tc.td:
+ json_result_dir = self.tc.td["OEQA_JSON_RESULT_DIR"]
+
+ return json_result_dir
+
+ def get_configuration(self, args):
+ import platform
+ from oeqa.utils.metadata import metadata_from_bb
+ metadata = metadata_from_bb()
+ configuration = {'TEST_TYPE': 'oeselftest',
+ 'STARTTIME': args.test_start_time,
+ 'MACHINE': self.tc.td["MACHINE"],
+ 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
+ 'HOST_NAME': metadata['hostname'],
+ 'LAYERS': metadata['layers']}
+ return configuration
+
+ def get_result_id(self, configuration):
+ return '%s_%s_%s_%s' % (configuration['TEST_TYPE'], configuration['HOST_DISTRO'], configuration['MACHINE'], configuration['STARTTIME'])
+
+ def _internal_run(self, logger, args):
+ self.module_paths = self._get_cases_paths(
+ self.tc_kwargs['init']['td']['BBPATH'].split(':'))
+
+ self.tc = self._context_class(**self.tc_kwargs['init'])
+ try:
+ self.tc.loadTests(self.module_paths, **self.tc_kwargs['load'])
+ except OEQATestNotFound as ex:
+ logger.error(ex)
+ sys.exit(1)
+
+ if args.list_tests:
+ rc = self.tc.listTests(args.list_tests, **self.tc_kwargs['list'])
+ else:
+ self._pre_run()
+ rc = self.tc.runTests(**self.tc_kwargs['run'])
+ configuration = self.get_configuration(args)
+ rc.logDetails(self.get_json_result_dir(args),
+ configuration,
+ self.get_result_id(configuration))
+ rc.logSummary(self.name)
+
+ return rc
+
+ def _signal_clean_handler(self, signum, frame):
+ sys.exit(1)
+
+ def run(self, logger, args):
+ self._process_args(logger, args)
+
+ signal.signal(signal.SIGTERM, self._signal_clean_handler)
+
+ rc = None
+ try:
+ if args.machine:
+ logger.info('Custom machine mode enabled. MACHINE set to %s' %
+ args.machine)
+
+ if args.machine == 'all':
+ results = []
+ for m in self.tc_kwargs['init']['machines']:
+ self.tc_kwargs['run']['machine'] = m
+ results.append(self._internal_run(logger, args))
+
+ # XXX: the oe-selftest script only needs to know if one
+ # machine run fails
+ for r in results:
+ rc = r
+ if not r.wasSuccessful():
+ break
+
+ else:
+ self.tc_kwargs['run']['machine'] = args.machine
+ return self._internal_run(logger, args)
+
+ else:
+ self.tc_kwargs['run']['machine'] = args.machine
+ rc = self._internal_run(logger, args)
+ finally:
+ config_paths = self.tc_kwargs['init']['config_paths']
+ if os.path.exists(config_paths['localconf_backup']):
+ copyfile(config_paths['localconf_backup'],
+ config_paths['localconf'])
+ os.remove(config_paths['localconf_backup'])
+
+ if os.path.exists(config_paths['bblayers_backup']):
+ copyfile(config_paths['bblayers_backup'],
+ config_paths['bblayers'])
+ os.remove(config_paths['bblayers_backup'])
+
+ if os.path.exists(config_paths['localconf_class_backup']):
+ os.remove(config_paths['localconf_class_backup'])
+ if os.path.exists(config_paths['bblayers_class_backup']):
+ os.remove(config_paths['bblayers_class_backup'])
+
+ output_link = os.path.join(os.path.dirname(args.output_log),
+ "%s-results.log" % self.name)
+ if os.path.lexists(output_link):
+ os.remove(output_link)
+ os.symlink(args.output_log, output_link)
+
+ return rc
+
+_executor_class = OESelftestTestContextExecutor
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
deleted file mode 100644
index e992dcf771..0000000000
--- a/meta/lib/oeqa/selftest/devtool.py
+++ /dev/null
@@ -1,1348 +0,0 @@
-import unittest
-import os
-import logging
-import re
-import shutil
-import tempfile
-import glob
-import fnmatch
-
-import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer, runqemu, get_test_layer
-from oeqa.utils.decorators import testcase
-
-class DevtoolBase(oeSelfTest):
-
- def _test_recipe_contents(self, recipefile, checkvars, checkinherits):
- with open(recipefile, 'r') as f:
- invar = None
- invalue = None
- for line in f:
- var = None
- if invar:
- value = line.strip().strip('"')
- if value.endswith('\\'):
- invalue += ' ' + value[:-1].strip()
- continue
- else:
- invalue += ' ' + value.strip()
- var = invar
- value = invalue
- invar = None
- elif '=' in line:
- splitline = line.split('=', 1)
- var = splitline[0].rstrip()
- value = splitline[1].strip().strip('"')
- if value.endswith('\\'):
- invalue = value[:-1].strip()
- invar = var
- continue
- elif line.startswith('inherit '):
- inherits = line.split()[1:]
-
- if var and var in checkvars:
- needvalue = checkvars.pop(var)
- if needvalue is None:
- self.fail('Variable %s should not appear in recipe')
- if isinstance(needvalue, set):
- value = set(value.split())
- self.assertEqual(value, needvalue, 'values for %s do not match' % var)
-
-
- missingvars = {}
- for var, value in checkvars.items():
- if value is not None:
- missingvars[var] = value
- self.assertEqual(missingvars, {}, 'Some expected variables not found in recipe: %s' % checkvars)
-
- for inherit in checkinherits:
- self.assertIn(inherit, inherits, 'Missing inherit of %s' % inherit)
-
- def _check_bbappend(self, testrecipe, recipefile, appenddir):
- result = runCmd('bitbake-layers show-appends', cwd=self.builddir)
- resultlines = result.output.splitlines()
- inrecipe = False
- bbappends = []
- bbappendfile = None
- for line in resultlines:
- if inrecipe:
- if line.startswith(' '):
- bbappends.append(line.strip())
- else:
- break
- elif line == '%s:' % os.path.basename(recipefile):
- inrecipe = True
- self.assertLessEqual(len(bbappends), 2, '%s recipe is being bbappended by another layer - bbappends found:\n %s' % (testrecipe, '\n '.join(bbappends)))
- for bbappend in bbappends:
- if bbappend.startswith(appenddir):
- bbappendfile = bbappend
- break
- else:
- self.fail('bbappend for recipe %s does not seem to be created in test layer' % testrecipe)
- return bbappendfile
-
- def _create_temp_layer(self, templayerdir, addlayer, templayername, priority=999, recipepathspec='recipes-*/*'):
- create_temp_layer(templayerdir, templayername, priority, recipepathspec)
- if addlayer:
- self.add_command_to_tearDown('bitbake-layers remove-layer %s || true' % templayerdir)
- result = runCmd('bitbake-layers add-layer %s' % templayerdir, cwd=self.builddir)
-
- def _process_ls_output(self, output):
- """
- Convert ls -l output to a format we can reasonably compare from one context
- to another (e.g. from host to target)
- """
- filelist = []
- for line in output.splitlines():
- splitline = line.split()
- if len(splitline) < 8:
- self.fail('_process_ls_output: invalid output line: %s' % line)
- # Remove trailing . on perms
- splitline[0] = splitline[0].rstrip('.')
- # Remove leading . on paths
- splitline[-1] = splitline[-1].lstrip('.')
- # Drop fields we don't want to compare
- del splitline[7]
- del splitline[6]
- del splitline[5]
- del splitline[4]
- del splitline[1]
- filelist.append(' '.join(splitline))
- return filelist
-
-
-class DevtoolTests(DevtoolBase):
-
- def setUp(self):
- """Test case setup function"""
- super(DevtoolTests, self).setUp()
- self.workspacedir = os.path.join(self.builddir, 'workspace')
- self.assertTrue(not os.path.exists(self.workspacedir),
- 'This test cannot be run with a workspace directory '
- 'under the build directory')
-
- def _check_src_repo(self, repo_dir):
- """Check srctree git repository"""
- self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')),
- 'git repository for external source tree not found')
- result = runCmd('git status --porcelain', cwd=repo_dir)
- self.assertEqual(result.output.strip(), "",
- 'Created git repo is not clean')
- result = runCmd('git symbolic-ref HEAD', cwd=repo_dir)
- self.assertEqual(result.output.strip(), "refs/heads/devtool",
- 'Wrong branch in git repo')
-
- def _check_repo_status(self, repo_dir, expected_status):
- """Check the worktree status of a repository"""
- result = runCmd('git status . --porcelain',
- cwd=repo_dir)
- for line in result.output.splitlines():
- for ind, (f_status, fn_re) in enumerate(expected_status):
- if re.match(fn_re, line[3:]):
- if f_status != line[:2]:
- self.fail('Unexpected status in line: %s' % line)
- expected_status.pop(ind)
- break
- else:
- self.fail('Unexpected modified file in line: %s' % line)
- if expected_status:
- self.fail('Missing file changes: %s' % expected_status)
-
- @testcase(1158)
- def test_create_workspace(self):
- # Check preconditions
- result = runCmd('bitbake-layers show-layers')
- self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
- # Try creating a workspace layer with a specific path
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- result = runCmd('devtool create-workspace %s' % tempdir)
- self.assertTrue(os.path.isfile(os.path.join(tempdir, 'conf', 'layer.conf')), msg = "No workspace created. devtool output: %s " % result.output)
- result = runCmd('bitbake-layers show-layers')
- self.assertIn(tempdir, result.output)
- # Try creating a workspace layer with the default path
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool create-workspace')
- self.assertTrue(os.path.isfile(os.path.join(self.workspacedir, 'conf', 'layer.conf')), msg = "No workspace created. devtool output: %s " % result.output)
- result = runCmd('bitbake-layers show-layers')
- self.assertNotIn(tempdir, result.output)
- self.assertIn(self.workspacedir, result.output)
-
- @testcase(1159)
- def test_devtool_add(self):
- # Fetch source
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- url = 'http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2'
- result = runCmd('wget %s' % url, cwd=tempdir)
- result = runCmd('tar xfv pv-1.5.3.tar.bz2', cwd=tempdir)
- srcdir = os.path.join(tempdir, 'pv-1.5.3')
- self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory')
- # Test devtool add
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake -c cleansstate pv')
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool add pv %s' % srcdir)
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn('pv', result.output)
- self.assertIn(srcdir, result.output)
- # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
- bitbake('pv -c cleansstate')
- # Test devtool build
- result = runCmd('devtool build pv')
- installdir = get_bb_var('D', 'pv')
- self.assertTrue(installdir, 'Could not query installdir variable')
- bindir = get_bb_var('bindir', 'pv')
- self.assertTrue(bindir, 'Could not query bindir variable')
- if bindir[0] == '/':
- bindir = bindir[1:]
- self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D')
-
- @testcase(1423)
- def test_devtool_add_git_local(self):
- # Fetch source from a remote URL, but do it outside of devtool
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- pn = 'dbus-wait'
- srcrev = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
- # We choose an https:// git URL here to check rewriting the URL works
- url = 'https://git.yoctoproject.org/git/dbus-wait'
- # Force fetching to "noname" subdir so we verify we're picking up the name from autoconf
- # instead of the directory name
- result = runCmd('git clone %s noname' % url, cwd=tempdir)
- srcdir = os.path.join(tempdir, 'noname')
- result = runCmd('git reset --hard %s' % srcrev, cwd=srcdir)
- self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure script in source directory')
- # Test devtool add
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- # Don't specify a name since we should be able to auto-detect it
- result = runCmd('devtool add %s' % srcdir)
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
- # Check the recipe name is correct
- recipefile = get_bb_var('FILE', pn)
- self.assertIn('%s_git.bb' % pn, recipefile, 'Recipe file incorrectly named')
- self.assertIn(recipefile, result.output)
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(pn, result.output)
- self.assertIn(srcdir, result.output)
- self.assertIn(recipefile, result.output)
- checkvars = {}
- checkvars['LICENSE'] = 'GPLv2'
- checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'
- checkvars['S'] = '${WORKDIR}/git'
- checkvars['PV'] = '0.1+git${SRCPV}'
- checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/dbus-wait;protocol=https'
- checkvars['SRCREV'] = srcrev
- checkvars['DEPENDS'] = set(['dbus'])
- self._test_recipe_contents(recipefile, checkvars, [])
-
- @testcase(1162)
- def test_devtool_add_library(self):
- # We don't have the ability to pick up this dependency automatically yet...
- bitbake('libusb1')
- # Fetch source
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- version = '1.1'
- url = 'https://www.intra2net.com/en/developer/libftdi/download/libftdi1-%s.tar.bz2' % version
- result = runCmd('wget %s' % url, cwd=tempdir)
- result = runCmd('tar xfv libftdi1-%s.tar.bz2' % version, cwd=tempdir)
- srcdir = os.path.join(tempdir, 'libftdi1-%s' % version)
- self.assertTrue(os.path.isfile(os.path.join(srcdir, 'CMakeLists.txt')), 'Unable to find CMakeLists.txt in source directory')
- # Test devtool add (and use -V so we test that too)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool add libftdi %s -V %s' % (srcdir, version))
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn('libftdi', result.output)
- self.assertIn(srcdir, result.output)
- # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
- bitbake('libftdi -c cleansstate')
- # libftdi's python/CMakeLists.txt is a bit broken, so let's just disable it
- # There's also the matter of it installing cmake files to a path we don't
- # normally cover, which triggers the installed-vs-shipped QA test we have
- # within do_package
- recipefile = '%s/recipes/libftdi/libftdi_%s.bb' % (self.workspacedir, version)
- result = runCmd('recipetool setvar %s EXTRA_OECMAKE -- \'-DPYTHON_BINDINGS=OFF -DLIBFTDI_CMAKE_CONFIG_DIR=${datadir}/cmake/Modules\'' % recipefile)
- with open(recipefile, 'a') as f:
- f.write('\nFILES_${PN}-dev += "${datadir}/cmake/Modules"\n')
- # Test devtool build
- result = runCmd('devtool build libftdi')
- staging_libdir = get_bb_var('STAGING_LIBDIR', 'libftdi')
- self.assertTrue(staging_libdir, 'Could not query STAGING_LIBDIR variable')
- self.assertTrue(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), "libftdi binary not found in STAGING_LIBDIR. Output of devtool build libftdi %s" % result.output)
- # Test devtool reset
- stampprefix = get_bb_var('STAMP', 'libftdi')
- result = runCmd('devtool reset libftdi')
- result = runCmd('devtool status')
- self.assertNotIn('libftdi', result.output)
- self.assertTrue(stampprefix, 'Unable to get STAMP value for recipe libftdi')
- matches = glob.glob(stampprefix + '*')
- self.assertFalse(matches, 'Stamp files exist for recipe libftdi that should have been cleaned')
- self.assertFalse(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), 'libftdi binary still found in STAGING_LIBDIR after cleaning')
-
- @testcase(1160)
- def test_devtool_add_fetch(self):
- # Fetch source
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- testver = '0.23'
- url = 'https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%s.tar.gz' % testver
- testrecipe = 'python-markupsafe'
- srcdir = os.path.join(tempdir, testrecipe)
- # Test devtool add
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake -c cleansstate %s' % testrecipe)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url))
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output)
- self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory')
- self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(testrecipe, result.output)
- self.assertIn(srcdir, result.output)
- # Check recipe
- recipefile = get_bb_var('FILE', testrecipe)
- self.assertIn('%s_%s.bb' % (testrecipe, testver), recipefile, 'Recipe file incorrectly named')
- checkvars = {}
- checkvars['S'] = '${WORKDIR}/MarkupSafe-${PV}'
- checkvars['SRC_URI'] = url.replace(testver, '${PV}')
- self._test_recipe_contents(recipefile, checkvars, [])
- # Try with version specified
- result = runCmd('devtool reset -n %s' % testrecipe)
- shutil.rmtree(srcdir)
- fakever = '1.9'
- result = runCmd('devtool add %s %s -f %s -V %s' % (testrecipe, srcdir, url, fakever))
- self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(testrecipe, result.output)
- self.assertIn(srcdir, result.output)
- # Check recipe
- recipefile = get_bb_var('FILE', testrecipe)
- self.assertIn('%s_%s.bb' % (testrecipe, fakever), recipefile, 'Recipe file incorrectly named')
- checkvars = {}
- checkvars['S'] = '${WORKDIR}/MarkupSafe-%s' % testver
- checkvars['SRC_URI'] = url
- self._test_recipe_contents(recipefile, checkvars, [])
-
- @testcase(1161)
- def test_devtool_add_fetch_git(self):
- # Fetch source
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- url = 'git://git.yoctoproject.org/libmatchbox'
- checkrev = '462f0652055d89c648ddd54fd7b03f175c2c6973'
- testrecipe = 'libmatchbox2'
- srcdir = os.path.join(tempdir, testrecipe)
- # Test devtool add
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake -c cleansstate %s' % testrecipe)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool add %s %s -a -f %s' % (testrecipe, srcdir, url))
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created: %s' % result.output)
- self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure.ac in source directory')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(testrecipe, result.output)
- self.assertIn(srcdir, result.output)
- # Check recipe
- recipefile = get_bb_var('FILE', testrecipe)
- self.assertIn('_git.bb', recipefile, 'Recipe file incorrectly named')
- checkvars = {}
- checkvars['S'] = '${WORKDIR}/git'
- checkvars['PV'] = '1.12+git${SRCPV}'
- checkvars['SRC_URI'] = url
- checkvars['SRCREV'] = '${AUTOREV}'
- self._test_recipe_contents(recipefile, checkvars, [])
- # Try with revision and version specified
- result = runCmd('devtool reset -n %s' % testrecipe)
- shutil.rmtree(srcdir)
- url_rev = '%s;rev=%s' % (url, checkrev)
- result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe, srcdir, url_rev))
- self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure.ac in source directory')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(testrecipe, result.output)
- self.assertIn(srcdir, result.output)
- # Check recipe
- recipefile = get_bb_var('FILE', testrecipe)
- self.assertIn('_git.bb', recipefile, 'Recipe file incorrectly named')
- checkvars = {}
- checkvars['S'] = '${WORKDIR}/git'
- checkvars['PV'] = '1.5+git${SRCPV}'
- checkvars['SRC_URI'] = url
- checkvars['SRCREV'] = checkrev
- self._test_recipe_contents(recipefile, checkvars, [])
-
- @testcase(1391)
- def test_devtool_add_fetch_simple(self):
- # Fetch source from a remote URL, auto-detecting name
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- testver = '1.6.0'
- url = 'http://www.ivarch.com/programs/sources/pv-%s.tar.bz2' % testver
- testrecipe = 'pv'
- srcdir = os.path.join(self.workspacedir, 'sources', testrecipe)
- # Test devtool add
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool add %s' % url)
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output)
- self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory')
- self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(testrecipe, result.output)
- self.assertIn(srcdir, result.output)
- # Check recipe
- recipefile = get_bb_var('FILE', testrecipe)
- self.assertIn('%s_%s.bb' % (testrecipe, testver), recipefile, 'Recipe file incorrectly named')
- checkvars = {}
- checkvars['S'] = None
- checkvars['SRC_URI'] = url.replace(testver, '${PV}')
- self._test_recipe_contents(recipefile, checkvars, [])
-
- @testcase(1164)
- def test_devtool_modify(self):
- # Clean up anything in the workdir/sysroot/sstate cache
- bitbake('mdadm -c cleansstate')
- # Try modifying a recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- self.add_command_to_tearDown('bitbake -c clean mdadm')
- result = runCmd('devtool modify mdadm -x %s' % tempdir)
- self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile')), 'Extracted source could not be found')
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
- matches = glob.glob(os.path.join(self.workspacedir, 'appends', 'mdadm_*.bbappend'))
- self.assertTrue(matches, 'bbappend not created %s' % result.output)
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn('mdadm', result.output)
- self.assertIn(tempdir, result.output)
- # Check git repo
- self._check_src_repo(tempdir)
- # Try building
- bitbake('mdadm')
- # Try making (minor) modifications to the source
- result = runCmd("sed -i 's!^\.TH.*!.TH MDADM 8 \"\" v9.999-custom!' %s" % os.path.join(tempdir, 'mdadm.8.in'))
- bitbake('mdadm -c package')
- pkgd = get_bb_var('PKGD', 'mdadm')
- self.assertTrue(pkgd, 'Could not query PKGD variable')
- mandir = get_bb_var('mandir', 'mdadm')
- self.assertTrue(mandir, 'Could not query mandir variable')
- if mandir[0] == '/':
- mandir = mandir[1:]
- with open(os.path.join(pkgd, mandir, 'man8', 'mdadm.8'), 'r') as f:
- for line in f:
- if line.startswith('.TH'):
- self.assertEqual(line.rstrip(), '.TH MDADM 8 "" v9.999-custom', 'man file not modified. man searched file path: %s' % os.path.join(pkgd, mandir, 'man8', 'mdadm.8'))
- # Test devtool reset
- stampprefix = get_bb_var('STAMP', 'mdadm')
- result = runCmd('devtool reset mdadm')
- result = runCmd('devtool status')
- self.assertNotIn('mdadm', result.output)
- self.assertTrue(stampprefix, 'Unable to get STAMP value for recipe mdadm')
- matches = glob.glob(stampprefix + '*')
- self.assertFalse(matches, 'Stamp files exist for recipe mdadm that should have been cleaned')
-
- @testcase(1166)
- def test_devtool_modify_invalid(self):
- # Try modifying some recipes
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
-
- testrecipes = 'perf kernel-devsrc package-index core-image-minimal meta-toolchain packagegroup-core-sdk meta-ide-support'.split()
- # Find actual name of gcc-source since it now includes the version - crude, but good enough for this purpose
- result = runCmd('bitbake-layers show-recipes gcc-source*')
- for line in result.output.splitlines():
- # just match those lines that contain a real target
- m = re.match('(?P<recipe>^[a-zA-Z0-9.-]+)(?P<colon>:$)', line)
- if m:
- testrecipes.append(m.group('recipe'))
- for testrecipe in testrecipes:
- # Check it's a valid recipe
- bitbake('%s -e' % testrecipe)
- # devtool extract should fail
- result = runCmd('devtool extract %s %s' % (testrecipe, os.path.join(tempdir, testrecipe)), ignore_status=True)
- self.assertNotEqual(result.status, 0, 'devtool extract on %s should have failed. devtool output: %s' % (testrecipe, result.output))
- self.assertNotIn('Fetching ', result.output, 'devtool extract on %s should have errored out before trying to fetch' % testrecipe)
- self.assertIn('ERROR: ', result.output, 'devtool extract on %s should have given an ERROR' % testrecipe)
- # devtool modify should fail
- result = runCmd('devtool modify %s -x %s' % (testrecipe, os.path.join(tempdir, testrecipe)), ignore_status=True)
- self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed. devtool output: %s' % (testrecipe, result.output))
- self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe)
-
- @testcase(1365)
- def test_devtool_modify_native(self):
- # Check preconditions
- self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
- # Try modifying some recipes
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
-
- bbclassextended = False
- inheritnative = False
- testrecipes = 'mtools-native apt-native desktop-file-utils-native'.split()
- for testrecipe in testrecipes:
- checkextend = 'native' in (get_bb_var('BBCLASSEXTEND', testrecipe) or '').split()
- if not bbclassextended:
- bbclassextended = checkextend
- if not inheritnative:
- inheritnative = not checkextend
- result = runCmd('devtool modify %s -x %s' % (testrecipe, os.path.join(tempdir, testrecipe)))
- self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool modify output: %s' % result.output)
- result = runCmd('devtool build %s' % testrecipe)
- self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool build output: %s' % result.output)
- result = runCmd('devtool reset %s' % testrecipe)
- self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool reset output: %s' % result.output)
-
- self.assertTrue(bbclassextended, 'None of these recipes are BBCLASSEXTENDed to native - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
- self.assertTrue(inheritnative, 'None of these recipes do "inherit native" - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
-
-
- @testcase(1165)
- def test_devtool_modify_git(self):
- # Check preconditions
- testrecipe = 'mkelfimage'
- src_uri = get_bb_var('SRC_URI', testrecipe)
- self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
- # Clean up anything in the workdir/sysroot/sstate cache
- bitbake('%s -c cleansstate' % testrecipe)
- # Try modifying a recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
- result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile')), 'Extracted source could not be found')
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. devtool output: %s' % result.output)
- matches = glob.glob(os.path.join(self.workspacedir, 'appends', 'mkelfimage_*.bbappend'))
- self.assertTrue(matches, 'bbappend not created')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(testrecipe, result.output)
- self.assertIn(tempdir, result.output)
- # Check git repo
- self._check_src_repo(tempdir)
- # Try building
- bitbake(testrecipe)
-
- @testcase(1167)
- def test_devtool_modify_localfiles(self):
- # Check preconditions
- testrecipe = 'lighttpd'
- src_uri = (get_bb_var('SRC_URI', testrecipe) or '').split()
- foundlocal = False
- for item in src_uri:
- if item.startswith('file://') and '.patch' not in item:
- foundlocal = True
- break
- self.assertTrue(foundlocal, 'This test expects the %s recipe to fetch local files and it seems that it no longer does' % testrecipe)
- # Clean up anything in the workdir/sysroot/sstate cache
- bitbake('%s -c cleansstate' % testrecipe)
- # Try modifying a recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
- result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- self.assertTrue(os.path.exists(os.path.join(tempdir, 'configure.ac')), 'Extracted source could not be found')
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
- matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % testrecipe))
- self.assertTrue(matches, 'bbappend not created')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(testrecipe, result.output)
- self.assertIn(tempdir, result.output)
- # Try building
- bitbake(testrecipe)
-
- @testcase(1378)
- def test_devtool_modify_virtual(self):
- # Try modifying a virtual recipe
- virtrecipe = 'virtual/libx11'
- realrecipe = 'libx11'
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool modify %s -x %s' % (virtrecipe, tempdir))
- self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
- matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % realrecipe))
- self.assertTrue(matches, 'bbappend not created %s' % result.output)
- # Test devtool status
- result = runCmd('devtool status')
- self.assertNotIn(virtrecipe, result.output)
- self.assertIn(realrecipe, result.output)
- # Check git repo
- self._check_src_repo(tempdir)
- # This is probably sufficient
-
-
- @testcase(1169)
- def test_devtool_update_recipe(self):
- # Check preconditions
- testrecipe = 'minicom'
- recipefile = get_bb_var('FILE', testrecipe)
- src_uri = get_bb_var('SRC_URI', testrecipe)
- self.assertNotIn('git://', src_uri, 'This test expects the %s recipe to NOT be a git recipe' % testrecipe)
- self._check_repo_status(os.path.dirname(recipefile), [])
- # First, modify a recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- # (don't bother with cleaning the recipe on teardown, we won't be building it)
- # We don't use -x here so that we test the behaviour of devtool modify without it
- result = runCmd('devtool modify %s %s' % (testrecipe, tempdir))
- # Check git repo
- self._check_src_repo(tempdir)
- # Add a couple of commits
- # FIXME: this only tests adding, need to also test update and remove
- result = runCmd('echo "Additional line" >> README', cwd=tempdir)
- result = runCmd('git commit -a -m "Change the README"', cwd=tempdir)
- result = runCmd('echo "A new file" > devtool-new-file', cwd=tempdir)
- result = runCmd('git add devtool-new-file', cwd=tempdir)
- result = runCmd('git commit -m "Add a new file"', cwd=tempdir)
- self.add_command_to_tearDown('cd %s; rm %s/*.patch; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
- result = runCmd('devtool update-recipe %s' % testrecipe)
- expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
- ('??', '.*/0001-Change-the-README.patch$'),
- ('??', '.*/0002-Add-a-new-file.patch$')]
- self._check_repo_status(os.path.dirname(recipefile), expected_status)
-
- @testcase(1172)
- def test_devtool_update_recipe_git(self):
- # Check preconditions
- testrecipe = 'mtd-utils'
- recipefile = get_bb_var('FILE', testrecipe)
- src_uri = get_bb_var('SRC_URI', testrecipe)
- self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
- patches = []
- for entry in src_uri.split():
- if entry.startswith('file://') and entry.endswith('.patch'):
- patches.append(entry[7:].split(';')[0])
- self.assertGreater(len(patches), 0, 'The %s recipe does not appear to contain any patches, so this test will not be effective' % testrecipe)
- self._check_repo_status(os.path.dirname(recipefile), [])
- # First, modify a recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- # (don't bother with cleaning the recipe on teardown, we won't be building it)
- result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- # Check git repo
- self._check_src_repo(tempdir)
- # Add a couple of commits
- # FIXME: this only tests adding, need to also test update and remove
- result = runCmd('echo "# Additional line" >> Makefile', cwd=tempdir)
- result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempdir)
- result = runCmd('echo "A new file" > devtool-new-file', cwd=tempdir)
- result = runCmd('git add devtool-new-file', cwd=tempdir)
- result = runCmd('git commit -m "Add a new file"', cwd=tempdir)
- self.add_command_to_tearDown('cd %s; rm -rf %s; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
- result = runCmd('devtool update-recipe -m srcrev %s' % testrecipe)
- expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile))] + \
- [(' D', '.*/%s$' % patch) for patch in patches]
- self._check_repo_status(os.path.dirname(recipefile), expected_status)
-
- result = runCmd('git diff %s' % os.path.basename(recipefile), cwd=os.path.dirname(recipefile))
- addlines = ['SRCREV = ".*"', 'SRC_URI = "git://git.infradead.org/mtd-utils.git"']
- srcurilines = src_uri.split()
- srcurilines[0] = 'SRC_URI = "' + srcurilines[0]
- srcurilines.append('"')
- removelines = ['SRCREV = ".*"'] + srcurilines
- for line in result.output.splitlines():
- if line.startswith('+++') or line.startswith('---'):
- continue
- elif line.startswith('+'):
- matched = False
- for item in addlines:
- if re.match(item, line[1:].strip()):
- matched = True
- break
- self.assertTrue(matched, 'Unexpected diff add line: %s' % line)
- elif line.startswith('-'):
- matched = False
- for item in removelines:
- if re.match(item, line[1:].strip()):
- matched = True
- break
- self.assertTrue(matched, 'Unexpected diff remove line: %s' % line)
- # Now try with auto mode
- runCmd('cd %s; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, os.path.basename(recipefile)))
- result = runCmd('devtool update-recipe %s' % testrecipe)
- result = runCmd('git rev-parse --show-toplevel', cwd=os.path.dirname(recipefile))
- topleveldir = result.output.strip()
- relpatchpath = os.path.join(os.path.relpath(os.path.dirname(recipefile), topleveldir), testrecipe)
- expected_status = [(' M', os.path.relpath(recipefile, topleveldir)),
- ('??', '%s/0001-Change-the-Makefile.patch' % relpatchpath),
- ('??', '%s/0002-Add-a-new-file.patch' % relpatchpath)]
- self._check_repo_status(os.path.dirname(recipefile), expected_status)
-
- @testcase(1170)
- def test_devtool_update_recipe_append(self):
- # Check preconditions
- testrecipe = 'mdadm'
- recipefile = get_bb_var('FILE', testrecipe)
- src_uri = get_bb_var('SRC_URI', testrecipe)
- self.assertNotIn('git://', src_uri, 'This test expects the %s recipe to NOT be a git recipe' % testrecipe)
- self._check_repo_status(os.path.dirname(recipefile), [])
- # First, modify a recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- tempsrcdir = os.path.join(tempdir, 'source')
- templayerdir = os.path.join(tempdir, 'layer')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- # (don't bother with cleaning the recipe on teardown, we won't be building it)
- result = runCmd('devtool modify %s -x %s' % (testrecipe, tempsrcdir))
- # Check git repo
- self._check_src_repo(tempsrcdir)
- # Add a commit
- result = runCmd("sed 's!\\(#define VERSION\\W*\"[^\"]*\\)\"!\\1-custom\"!' -i ReadMe.c", cwd=tempsrcdir)
- result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
- self.add_command_to_tearDown('cd %s; rm -f %s/*.patch; git checkout .' % (os.path.dirname(recipefile), testrecipe))
- # Create a temporary layer and add it to bblayers.conf
- self._create_temp_layer(templayerdir, True, 'selftestupdaterecipe')
- # Create the bbappend
- result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
- self.assertNotIn('WARNING:', result.output)
- # Check recipe is still clean
- self._check_repo_status(os.path.dirname(recipefile), [])
- # Check bbappend was created
- splitpath = os.path.dirname(recipefile).split(os.sep)
- appenddir = os.path.join(templayerdir, splitpath[-2], splitpath[-1])
- bbappendfile = self._check_bbappend(testrecipe, recipefile, appenddir)
- patchfile = os.path.join(appenddir, testrecipe, '0001-Add-our-custom-version.patch')
- self.assertTrue(os.path.exists(patchfile), 'Patch file not created')
-
- # Check bbappend contents
- expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
- '\n',
- 'SRC_URI += "file://0001-Add-our-custom-version.patch"\n',
- '\n']
- with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, f.readlines())
-
- # Check we can run it again and bbappend isn't modified
- result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
- with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, f.readlines())
- # Drop new commit and check patch gets deleted
- result = runCmd('git reset HEAD^', cwd=tempsrcdir)
- result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
- self.assertFalse(os.path.exists(patchfile), 'Patch file not deleted')
- expectedlines2 = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
- '\n']
- with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines2, f.readlines())
- # Put commit back and check we can run it if layer isn't in bblayers.conf
- os.remove(bbappendfile)
- result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
- result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
- result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
- self.assertIn('WARNING: Specified layer is not currently enabled in bblayers.conf', result.output)
- self.assertTrue(os.path.exists(patchfile), 'Patch file not created (with disabled layer)')
- with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, f.readlines())
- # Deleting isn't expected to work under these circumstances
-
- @testcase(1171)
- def test_devtool_update_recipe_append_git(self):
- # Check preconditions
- testrecipe = 'mtd-utils'
- recipefile = get_bb_var('FILE', testrecipe)
- src_uri = get_bb_var('SRC_URI', testrecipe)
- self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
- for entry in src_uri.split():
- if entry.startswith('git://'):
- git_uri = entry
- break
- self._check_repo_status(os.path.dirname(recipefile), [])
- # First, modify a recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- tempsrcdir = os.path.join(tempdir, 'source')
- templayerdir = os.path.join(tempdir, 'layer')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- # (don't bother with cleaning the recipe on teardown, we won't be building it)
- result = runCmd('devtool modify %s -x %s' % (testrecipe, tempsrcdir))
- # Check git repo
- self._check_src_repo(tempsrcdir)
- # Add a commit
- result = runCmd('echo "# Additional line" >> Makefile', cwd=tempsrcdir)
- result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir)
- self.add_command_to_tearDown('cd %s; rm -f %s/*.patch; git checkout .' % (os.path.dirname(recipefile), testrecipe))
- # Create a temporary layer
- os.makedirs(os.path.join(templayerdir, 'conf'))
- with open(os.path.join(templayerdir, 'conf', 'layer.conf'), 'w') as f:
- f.write('BBPATH .= ":${LAYERDIR}"\n')
- f.write('BBFILES += "${LAYERDIR}/recipes-*/*/*.bbappend"\n')
- f.write('BBFILE_COLLECTIONS += "oeselftesttemplayer"\n')
- f.write('BBFILE_PATTERN_oeselftesttemplayer = "^${LAYERDIR}/"\n')
- f.write('BBFILE_PRIORITY_oeselftesttemplayer = "999"\n')
- f.write('BBFILE_PATTERN_IGNORE_EMPTY_oeselftesttemplayer = "1"\n')
- self.add_command_to_tearDown('bitbake-layers remove-layer %s || true' % templayerdir)
- result = runCmd('bitbake-layers add-layer %s' % templayerdir, cwd=self.builddir)
- # Create the bbappend
- result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
- self.assertNotIn('WARNING:', result.output)
- # Check recipe is still clean
- self._check_repo_status(os.path.dirname(recipefile), [])
- # Check bbappend was created
- splitpath = os.path.dirname(recipefile).split(os.sep)
- appenddir = os.path.join(templayerdir, splitpath[-2], splitpath[-1])
- bbappendfile = self._check_bbappend(testrecipe, recipefile, appenddir)
- self.assertFalse(os.path.exists(os.path.join(appenddir, testrecipe)), 'Patch directory should not be created')
-
- # Check bbappend contents
- result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
- expectedlines = set(['SRCREV = "%s"\n' % result.output,
- '\n',
- 'SRC_URI = "%s"\n' % git_uri,
- '\n'])
- with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, set(f.readlines()))
-
- # Check we can run it again and bbappend isn't modified
- result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
- with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, set(f.readlines()))
- # Drop new commit and check SRCREV changes
- result = runCmd('git reset HEAD^', cwd=tempsrcdir)
- result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
- self.assertFalse(os.path.exists(os.path.join(appenddir, testrecipe)), 'Patch directory should not be created')
- result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
- expectedlines = set(['SRCREV = "%s"\n' % result.output,
- '\n',
- 'SRC_URI = "%s"\n' % git_uri,
- '\n'])
- with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, set(f.readlines()))
- # Put commit back and check we can run it if layer isn't in bblayers.conf
- os.remove(bbappendfile)
- result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir)
- result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
- result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
- self.assertIn('WARNING: Specified layer is not currently enabled in bblayers.conf', result.output)
- self.assertFalse(os.path.exists(os.path.join(appenddir, testrecipe)), 'Patch directory should not be created')
- result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
- expectedlines = set(['SRCREV = "%s"\n' % result.output,
- '\n',
- 'SRC_URI = "%s"\n' % git_uri,
- '\n'])
- with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, set(f.readlines()))
- # Deleting isn't expected to work under these circumstances
-
- @testcase(1370)
- def test_devtool_update_recipe_local_files(self):
- """Check that local source files are copied over instead of patched"""
- testrecipe = 'makedevs'
- recipefile = get_bb_var('FILE', testrecipe)
- # Setup srctree for modifying the recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- # (don't bother with cleaning the recipe on teardown, we won't be
- # building it)
- result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- # Check git repo
- self._check_src_repo(tempdir)
- # Edit / commit local source
- runCmd('echo "/* Foobar */" >> oe-local-files/makedevs.c', cwd=tempdir)
- runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
- runCmd('echo "Bar" > new-file', cwd=tempdir)
- runCmd('git add new-file', cwd=tempdir)
- runCmd('git commit -m "Add new file"', cwd=tempdir)
- self.add_command_to_tearDown('cd %s; git clean -fd .; git checkout .' %
- os.path.dirname(recipefile))
- runCmd('devtool update-recipe %s' % testrecipe)
- expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
- (' M', '.*/makedevs/makedevs.c$'),
- ('??', '.*/makedevs/new-local$'),
- ('??', '.*/makedevs/0001-Add-new-file.patch$')]
- self._check_repo_status(os.path.dirname(recipefile), expected_status)
-
- @testcase(1371)
- def test_devtool_update_recipe_local_files_2(self):
- """Check local source files support when oe-local-files is in Git"""
- testrecipe = 'lzo'
- recipefile = get_bb_var('FILE', testrecipe)
- # Setup srctree for modifying the recipe
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- # Check git repo
- self._check_src_repo(tempdir)
- # Add oe-local-files to Git
- runCmd('rm oe-local-files/.gitignore', cwd=tempdir)
- runCmd('git add oe-local-files', cwd=tempdir)
- runCmd('git commit -m "Add local sources"', cwd=tempdir)
- # Edit / commit local sources
- runCmd('echo "# Foobar" >> oe-local-files/acinclude.m4', cwd=tempdir)
- runCmd('git commit -am "Edit existing file"', cwd=tempdir)
- runCmd('git rm oe-local-files/run-ptest', cwd=tempdir)
- runCmd('git commit -m"Remove file"', cwd=tempdir)
- runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
- runCmd('git add oe-local-files/new-local', cwd=tempdir)
- runCmd('git commit -m "Add new local file"', cwd=tempdir)
- runCmd('echo "Gar" > new-file', cwd=tempdir)
- runCmd('git add new-file', cwd=tempdir)
- runCmd('git commit -m "Add new file"', cwd=tempdir)
- self.add_command_to_tearDown('cd %s; git clean -fd .; git checkout .' %
- os.path.dirname(recipefile))
- # Checkout unmodified file to working copy -> devtool should still pick
- # the modified version from HEAD
- runCmd('git checkout HEAD^ -- oe-local-files/acinclude.m4', cwd=tempdir)
- runCmd('devtool update-recipe %s' % testrecipe)
- expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
- (' M', '.*/acinclude.m4$'),
- (' D', '.*/run-ptest$'),
- ('??', '.*/new-local$'),
- ('??', '.*/0001-Add-new-file.patch$')]
- self._check_repo_status(os.path.dirname(recipefile), expected_status)
-
- @testcase(1163)
- def test_devtool_extract(self):
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- # Try devtool extract
- self.track_for_cleanup(tempdir)
- self.append_config('PREFERRED_PROVIDER_virtual/make = "remake"')
- result = runCmd('devtool extract remake %s' % tempdir)
- self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
- # devtool extract shouldn't create the workspace
- self.assertFalse(os.path.exists(self.workspacedir))
- self._check_src_repo(tempdir)
-
- @testcase(1379)
- def test_devtool_extract_virtual(self):
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- # Try devtool extract
- self.track_for_cleanup(tempdir)
- result = runCmd('devtool extract virtual/libx11 %s' % tempdir)
- self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
- # devtool extract shouldn't create the workspace
- self.assertFalse(os.path.exists(self.workspacedir))
- self._check_src_repo(tempdir)
-
- @testcase(1168)
- def test_devtool_reset_all(self):
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- testrecipe1 = 'mdadm'
- testrecipe2 = 'cronie'
- result = runCmd('devtool modify -x %s %s' % (testrecipe1, os.path.join(tempdir, testrecipe1)))
- result = runCmd('devtool modify -x %s %s' % (testrecipe2, os.path.join(tempdir, testrecipe2)))
- result = runCmd('devtool build %s' % testrecipe1)
- result = runCmd('devtool build %s' % testrecipe2)
- stampprefix1 = get_bb_var('STAMP', testrecipe1)
- self.assertTrue(stampprefix1, 'Unable to get STAMP value for recipe %s' % testrecipe1)
- stampprefix2 = get_bb_var('STAMP', testrecipe2)
- self.assertTrue(stampprefix2, 'Unable to get STAMP value for recipe %s' % testrecipe2)
- result = runCmd('devtool reset -a')
- self.assertIn(testrecipe1, result.output)
- self.assertIn(testrecipe2, result.output)
- result = runCmd('devtool status')
- self.assertNotIn(testrecipe1, result.output)
- self.assertNotIn(testrecipe2, result.output)
- matches1 = glob.glob(stampprefix1 + '*')
- self.assertFalse(matches1, 'Stamp files exist for recipe %s that should have been cleaned' % testrecipe1)
- matches2 = glob.glob(stampprefix2 + '*')
- self.assertFalse(matches2, 'Stamp files exist for recipe %s that should have been cleaned' % testrecipe2)
-
- @testcase(1272)
- def test_devtool_deploy_target(self):
- # NOTE: Whilst this test would seemingly be better placed as a runtime test,
- # unfortunately the runtime tests run under bitbake and you can't run
- # devtool within bitbake (since devtool needs to run bitbake itself).
- # Additionally we are testing build-time functionality as well, so
- # really this has to be done as an oe-selftest test.
- #
- # Check preconditions
- machine = get_bb_var('MACHINE')
- if not machine.startswith('qemu'):
- self.skipTest('This test only works with qemu machines')
- if not os.path.exists('/etc/runqemu-nosudo'):
- self.skipTest('You must set up tap devices with scripts/runqemu-gen-tapdevs before running this test')
- result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ip tuntap show', ignore_status=True)
- if result.status != 0:
- result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ifconfig -a', ignore_status=True)
- if result.status != 0:
- self.skipTest('Failed to determine if tap devices exist with ifconfig or ip: %s' % result.output)
- for line in result.output.splitlines():
- if line.startswith('tap'):
- break
- else:
- self.skipTest('No tap devices found - you must set up tap devices with scripts/runqemu-gen-tapdevs before running this test')
- self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
- # Definitions
- testrecipe = 'mdadm'
- testfile = '/sbin/mdadm'
- testimage = 'oe-selftest-image'
- testcommand = '/sbin/mdadm --help'
- # Build an image to run
- bitbake("%s qemu-native qemu-helper-native" % testimage)
- deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
- self.add_command_to_tearDown('bitbake -c clean %s' % testimage)
- self.add_command_to_tearDown('rm -f %s/%s*' % (deploy_dir_image, testimage))
- # Clean recipe so the first deploy will fail
- bitbake("%s -c clean" % testrecipe)
- # Try devtool modify
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
- result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- # Test that deploy-target at this point fails (properly)
- result = runCmd('devtool deploy-target -n %s root@localhost' % testrecipe, ignore_status=True)
- self.assertNotEqual(result.output, 0, 'devtool deploy-target should have failed, output: %s' % result.output)
- self.assertNotIn(result.output, 'Traceback', 'devtool deploy-target should have failed with a proper error not a traceback, output: %s' % result.output)
- result = runCmd('devtool build %s' % testrecipe)
- # First try a dry-run of deploy-target
- result = runCmd('devtool deploy-target -n %s root@localhost' % testrecipe)
- self.assertIn(' %s' % testfile, result.output)
- # Boot the image
- with runqemu(testimage) as qemu:
- # Now really test deploy-target
- result = runCmd('devtool deploy-target -c %s root@%s' % (testrecipe, qemu.ip))
- # Run a test command to see if it was installed properly
- sshargs = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
- result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand))
- # Check if it deployed all of the files with the right ownership/perms
- # First look on the host - need to do this under pseudo to get the correct ownership/perms
- installdir = get_bb_var('D', testrecipe)
- fakerootenv = get_bb_var('FAKEROOTENV', testrecipe)
- fakerootcmd = get_bb_var('FAKEROOTCMD', testrecipe)
- result = runCmd('%s %s find . -type f -exec ls -l {} \;' % (fakerootenv, fakerootcmd), cwd=installdir)
- filelist1 = self._process_ls_output(result.output)
-
- # Now look on the target
- tempdir2 = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir2)
- tmpfilelist = os.path.join(tempdir2, 'files.txt')
- with open(tmpfilelist, 'w') as f:
- for line in filelist1:
- splitline = line.split()
- f.write(splitline[-1] + '\n')
- result = runCmd('cat %s | ssh -q %s root@%s \'xargs ls -l\'' % (tmpfilelist, sshargs, qemu.ip))
- filelist2 = self._process_ls_output(result.output)
- filelist1.sort(key=lambda item: item.split()[-1])
- filelist2.sort(key=lambda item: item.split()[-1])
- self.assertEqual(filelist1, filelist2)
- # Test undeploy-target
- result = runCmd('devtool undeploy-target -c %s root@%s' % (testrecipe, qemu.ip))
- result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand), ignore_status=True)
- self.assertNotEqual(result, 0, 'undeploy-target did not remove command as it should have')
-
- @testcase(1366)
- def test_devtool_build_image(self):
- """Test devtool build-image plugin"""
- # Check preconditions
- self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
- image = 'core-image-minimal'
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- self.add_command_to_tearDown('bitbake -c clean %s' % image)
- bitbake('%s -c clean' % image)
- # Add target and native recipes to workspace
- recipes = ['mdadm', 'parted-native']
- for recipe in recipes:
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.add_command_to_tearDown('bitbake -c clean %s' % recipe)
- runCmd('devtool modify %s -x %s' % (recipe, tempdir))
- # Try to build image
- result = runCmd('devtool build-image %s' % image)
- self.assertNotEqual(result, 0, 'devtool build-image failed')
- # Check if image contains expected packages
- deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
- image_link_name = get_bb_var('IMAGE_LINK_NAME', image)
- reqpkgs = [item for item in recipes if not item.endswith('-native')]
- with open(os.path.join(deploy_dir_image, image_link_name + '.manifest'), 'r') as f:
- for line in f:
- splitval = line.split()
- if splitval:
- pkg = splitval[0]
- if pkg in reqpkgs:
- reqpkgs.remove(pkg)
- if reqpkgs:
- self.fail('The following packages were not present in the image as expected: %s' % ', '.join(reqpkgs))
-
- @testcase(1367)
- def test_devtool_upgrade(self):
- # Check preconditions
- self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- # Check parameters
- result = runCmd('devtool upgrade -h')
- for param in 'recipename srctree --version -V --branch -b --keep-temp --no-patch'.split():
- self.assertIn(param, result.output)
- # For the moment, we are using a real recipe.
- recipe = 'devtool-upgrade-test1'
- version = '1.6.0'
- oldrecipefile = get_bb_var('FILE', recipe)
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- # Check that recipe is not already under devtool control
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output)
- # Check upgrade. Code does not check if new PV is older or newer that current PV, so, it may be that
- # we are downgrading instead of upgrading.
- result = runCmd('devtool upgrade %s %s -V %s' % (recipe, tempdir, version))
- # Check if srctree at least is populated
- self.assertTrue(len(os.listdir(tempdir)) > 0, 'srctree (%s) should be populated with new (%s) source code' % (tempdir, version))
- # Check new recipe subdirectory is present
- self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe, '%s-%s' % (recipe, version))), 'Recipe folder should exist')
- # Check new recipe file is present
- newrecipefile = os.path.join(self.workspacedir, 'recipes', recipe, '%s_%s.bb' % (recipe, version))
- self.assertTrue(os.path.exists(newrecipefile), 'Recipe file should exist after upgrade')
- # Check devtool status and make sure recipe is present
- result = runCmd('devtool status')
- self.assertIn(recipe, result.output)
- self.assertIn(tempdir, result.output)
- # Check recipe got changed as expected
- with open(oldrecipefile + '.upgraded', 'r') as f:
- desiredlines = f.readlines()
- with open(newrecipefile, 'r') as f:
- newlines = f.readlines()
- self.assertEqual(desiredlines, newlines)
- # Check devtool reset recipe
- result = runCmd('devtool reset %s -n' % recipe)
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output)
- self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after resetting')
-
- @testcase(1433)
- def test_devtool_upgrade_git(self):
- # Check preconditions
- self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- recipe = 'devtool-upgrade-test2'
- commit = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
- oldrecipefile = get_bb_var('FILE', recipe)
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- # Check that recipe is not already under devtool control
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output)
- # Check upgrade
- result = runCmd('devtool upgrade %s %s -S %s' % (recipe, tempdir, commit))
- # Check if srctree at least is populated
- self.assertTrue(len(os.listdir(tempdir)) > 0, 'srctree (%s) should be populated with new (%s) source code' % (tempdir, commit))
- # Check new recipe file is present
- newrecipefile = os.path.join(self.workspacedir, 'recipes', recipe, os.path.basename(oldrecipefile))
- self.assertTrue(os.path.exists(newrecipefile), 'Recipe file should exist after upgrade')
- # Check devtool status and make sure recipe is present
- result = runCmd('devtool status')
- self.assertIn(recipe, result.output)
- self.assertIn(tempdir, result.output)
- # Check recipe got changed as expected
- with open(oldrecipefile + '.upgraded', 'r') as f:
- desiredlines = f.readlines()
- with open(newrecipefile, 'r') as f:
- newlines = f.readlines()
- self.assertEqual(desiredlines, newlines)
- # Check devtool reset recipe
- result = runCmd('devtool reset %s -n' % recipe)
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output)
- self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after resetting')
-
- @testcase(1352)
- def test_devtool_layer_plugins(self):
- """Test that devtool can use plugins from other layers.
-
- This test executes the selftest-reverse command from meta-selftest."""
-
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
-
- s = "Microsoft Made No Profit From Anyone's Zunes Yo"
- result = runCmd("devtool --quiet selftest-reverse \"%s\"" % s)
- self.assertEqual(result.output, s[::-1])
-
- def _setup_test_devtool_finish_upgrade(self):
- # Check preconditions
- self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
- self.track_for_cleanup(self.workspacedir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- # Use a "real" recipe from meta-selftest
- recipe = 'devtool-upgrade-test1'
- oldversion = '1.5.3'
- newversion = '1.6.0'
- oldrecipefile = get_bb_var('FILE', recipe)
- recipedir = os.path.dirname(oldrecipefile)
- result = runCmd('git status --porcelain .', cwd=recipedir)
- if result.output.strip():
- self.fail('Recipe directory for %s contains uncommitted changes' % recipe)
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- # Check that recipe is not already under devtool control
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output)
- # Do the upgrade
- result = runCmd('devtool upgrade %s %s -V %s' % (recipe, tempdir, newversion))
- # Check devtool status and make sure recipe is present
- result = runCmd('devtool status')
- self.assertIn(recipe, result.output)
- self.assertIn(tempdir, result.output)
- # Make a change to the source
- result = runCmd('sed -i \'/^#include "pv.h"/a \\/* Here is a new comment *\\/\' src/pv/number.c', cwd=tempdir)
- result = runCmd('git status --porcelain', cwd=tempdir)
- self.assertIn('M src/pv/number.c', result.output)
- result = runCmd('git commit src/pv/number.c -m "Add a comment to the code"', cwd=tempdir)
- # Check if patch is there
- recipedir = os.path.dirname(oldrecipefile)
- olddir = os.path.join(recipedir, recipe + '-' + oldversion)
- patchfn = '0001-Add-a-note-line-to-the-quick-reference.patch'
- self.assertTrue(os.path.exists(os.path.join(olddir, patchfn)), 'Original patch file does not exist')
- return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn
-
- def test_devtool_finish_upgrade_origlayer(self):
- recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade()
- # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
- self.assertIn('/meta-selftest/', recipedir)
- # Try finish to the original layer
- self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
- result = runCmd('devtool finish %s meta-selftest' % recipe)
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
- self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after finish')
- self.assertFalse(os.path.exists(oldrecipefile), 'Old recipe file should have been deleted but wasn\'t')
- self.assertFalse(os.path.exists(os.path.join(olddir, patchfn)), 'Old patch file should have been deleted but wasn\'t')
- newrecipefile = os.path.join(recipedir, '%s_%s.bb' % (recipe, newversion))
- newdir = os.path.join(recipedir, recipe + '-' + newversion)
- self.assertTrue(os.path.exists(newrecipefile), 'New recipe file should have been copied into existing layer but wasn\'t')
- self.assertTrue(os.path.exists(os.path.join(newdir, patchfn)), 'Patch file should have been copied into new directory but wasn\'t')
- self.assertTrue(os.path.exists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch')), 'New patch file should have been created but wasn\'t')
-
- def test_devtool_finish_upgrade_otherlayer(self):
- recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade()
- # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
- self.assertIn('/meta-selftest/', recipedir)
- # Try finish to a different layer - should create a bbappend
- # This cleanup isn't strictly necessary but do it anyway just in case it goes wrong and writes to here
- self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
- oe_core_dir = os.path.join(get_bb_var('COREBASE'), 'meta')
- newrecipedir = os.path.join(oe_core_dir, 'recipes-test', 'devtool')
- newrecipefile = os.path.join(newrecipedir, '%s_%s.bb' % (recipe, newversion))
- self.track_for_cleanup(newrecipedir)
- result = runCmd('devtool finish %s oe-core' % recipe)
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
- self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after finish')
- self.assertTrue(os.path.exists(oldrecipefile), 'Old recipe file should not have been deleted')
- self.assertTrue(os.path.exists(os.path.join(olddir, patchfn)), 'Old patch file should not have been deleted')
- newdir = os.path.join(newrecipedir, recipe + '-' + newversion)
- self.assertTrue(os.path.exists(newrecipefile), 'New recipe file should have been copied into existing layer but wasn\'t')
- self.assertTrue(os.path.exists(os.path.join(newdir, patchfn)), 'Patch file should have been copied into new directory but wasn\'t')
- self.assertTrue(os.path.exists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch')), 'New patch file should have been created but wasn\'t')
-
- def _setup_test_devtool_finish_modify(self):
- # Check preconditions
- self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
- # Try modifying a recipe
- self.track_for_cleanup(self.workspacedir)
- recipe = 'mdadm'
- oldrecipefile = get_bb_var('FILE', recipe)
- recipedir = os.path.dirname(oldrecipefile)
- result = runCmd('git status --porcelain .', cwd=recipedir)
- if result.output.strip():
- self.fail('Recipe directory for %s contains uncommitted changes' % recipe)
- tempdir = tempfile.mkdtemp(prefix='devtoolqa')
- self.track_for_cleanup(tempdir)
- self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool modify %s %s' % (recipe, tempdir))
- self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile')), 'Extracted source could not be found')
- # Test devtool status
- result = runCmd('devtool status')
- self.assertIn(recipe, result.output)
- self.assertIn(tempdir, result.output)
- # Make a change to the source
- result = runCmd('sed -i \'/^#include "mdadm.h"/a \\/* Here is a new comment *\\/\' maps.c', cwd=tempdir)
- result = runCmd('git status --porcelain', cwd=tempdir)
- self.assertIn('M maps.c', result.output)
- result = runCmd('git commit maps.c -m "Add a comment to the code"', cwd=tempdir)
- for entry in os.listdir(recipedir):
- filesdir = os.path.join(recipedir, entry)
- if os.path.isdir(filesdir):
- break
- else:
- self.fail('Unable to find recipe files directory for %s' % recipe)
- return recipe, oldrecipefile, recipedir, filesdir
-
- def test_devtool_finish_modify_origlayer(self):
- recipe, oldrecipefile, recipedir, filesdir = self._setup_test_devtool_finish_modify()
- # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
- self.assertIn('/meta/', recipedir)
- # Try finish to the original layer
- self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
- result = runCmd('devtool finish %s meta' % recipe)
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
- self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after finish')
- expected_status = [(' M', '.*/%s$' % os.path.basename(oldrecipefile)),
- ('??', '.*/.*-Add-a-comment-to-the-code.patch$')]
- self._check_repo_status(recipedir, expected_status)
-
- def test_devtool_finish_modify_otherlayer(self):
- recipe, oldrecipefile, recipedir, filesdir = self._setup_test_devtool_finish_modify()
- # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
- self.assertIn('/meta/', recipedir)
- relpth = os.path.relpath(recipedir, os.path.join(get_bb_var('COREBASE'), 'meta'))
- appenddir = os.path.join(get_test_layer(), relpth)
- self.track_for_cleanup(appenddir)
- # Try finish to the original layer
- self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
- result = runCmd('devtool finish %s meta-selftest' % recipe)
- result = runCmd('devtool status')
- self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
- self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after finish')
- result = runCmd('git status --porcelain .', cwd=recipedir)
- if result.output.strip():
- self.fail('Recipe directory for %s contains the following unexpected changes after finish:\n%s' % (recipe, result.output.strip()))
- recipefn = os.path.splitext(os.path.basename(oldrecipefile))[0]
- recipefn = recipefn.split('_')[0] + '_%'
- appendfile = os.path.join(appenddir, recipefn + '.bbappend')
- self.assertTrue(os.path.exists(appendfile), 'bbappend %s should have been created but wasn\'t' % appendfile)
- newdir = os.path.join(appenddir, recipe)
- files = os.listdir(newdir)
- foundpatch = None
- for fn in files:
- if fnmatch.fnmatch(fn, '*-Add-a-comment-to-the-code.patch'):
- foundpatch = fn
- if not foundpatch:
- self.fail('No patch file created next to bbappend')
- files.remove(foundpatch)
- if files:
- self.fail('Unexpected file(s) copied next to bbappend: %s' % ', '.join(files))
diff --git a/meta/lib/oeqa/selftest/eSDK.py b/meta/lib/oeqa/selftest/eSDK.py
deleted file mode 100644
index 9d5c680948..0000000000
--- a/meta/lib/oeqa/selftest/eSDK.py
+++ /dev/null
@@ -1,103 +0,0 @@
-import unittest
-import tempfile
-import shutil
-import os
-import glob
-import logging
-import subprocess
-import oeqa.utils.ftools as ftools
-from oeqa.utils.decorators import testcase
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
-from oeqa.utils.httpserver import HTTPService
-
-class oeSDKExtSelfTest(oeSelfTest):
- """
- # Bugzilla Test Plan: 6033
- # This code is planned to be part of the automation for eSDK containig
- # Install libraries and headers, image generation binary feeds.
- """
-
- @staticmethod
- def get_esdk_environment(env_eSDK, tmpdir_eSDKQA):
- # XXX: at this time use the first env need to investigate
- # what environment load oe-selftest, i586, x86_64
- pattern = os.path.join(tmpdir_eSDKQA, 'environment-setup-*')
- return glob.glob(pattern)[0]
-
- @staticmethod
- def run_esdk_cmd(env_eSDK, tmpdir_eSDKQA, cmd, postconfig=None, **options):
- if postconfig:
- esdk_conf_file = os.path.join(tmpdir_eSDKQA, 'conf', 'local.conf')
- with open(esdk_conf_file, 'a+') as f:
- f.write(postconfig)
- if not options:
- options = {}
- if not 'shell' in options:
- options['shell'] = True
-
- runCmd("cd %s; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
-
- @staticmethod
- def generate_eSDK(image):
- pn_task = '%s -c populate_sdk_ext' % image
- bitbake(pn_task)
-
- @staticmethod
- def get_eSDK_toolchain(image):
- pn_task = '%s -c populate_sdk_ext' % image
-
- sdk_deploy = get_bb_var('SDK_DEPLOY', pn_task)
- toolchain_name = get_bb_var('TOOLCHAINEXT_OUTPUTNAME', pn_task)
- return os.path.join(sdk_deploy, toolchain_name + '.sh')
-
-
- @classmethod
- def setUpClass(cls):
- # Start to serve sstate dir
- sstate_dir = os.path.join(os.environ['BUILDDIR'], 'sstate-cache')
- cls.http_service = HTTPService(sstate_dir)
- cls.http_service.start()
-
- http_url = "127.0.0.1:%d" % cls.http_service.port
-
- image = 'core-image-minimal'
-
- cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA')
- oeSDKExtSelfTest.generate_eSDK(image)
-
- # Install eSDK
- ext_sdk_path = oeSDKExtSelfTest.get_eSDK_toolchain(image)
- runCmd("%s -y -d \"%s\"" % (ext_sdk_path, cls.tmpdir_eSDKQA))
-
- cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA)
-
- # Configure eSDK to use sstate mirror from poky
- sstate_config="""
-SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
-SSTATE_MIRRORS = "file://.* http://%s/PATH"
- """ % http_url
- with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f:
- f.write(sstate_config)
-
-
- @classmethod
- def tearDownClass(cls):
- shutil.rmtree(cls.tmpdir_eSDKQA)
- cls.http_service.stop()
-
- @testcase (1471)
- def test_install_libraries_headers(self):
- pn_sstate = 'bc'
- bitbake(pn_sstate)
- cmd = "devtool sdk-install %s " % pn_sstate
- oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
-
- @testcase(1472)
- def test_image_generation_binary_feeds(self):
- image = 'core-image-minimal'
- cmd = "devtool build-image %s" % image
- oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py
deleted file mode 100644
index d015c49087..0000000000
--- a/meta/lib/oeqa/selftest/imagefeatures.py
+++ /dev/null
@@ -1,127 +0,0 @@
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
-from oeqa.utils.decorators import testcase
-from oeqa.utils.sshcontrol import SSHControl
-import os
-import sys
-import logging
-
-class ImageFeatures(oeSelfTest):
-
- test_user = 'tester'
- root_user = 'root'
-
- @testcase(1107)
- def test_non_root_user_can_connect_via_ssh_without_password(self):
- """
- Summary: Check if non root user can connect via ssh without password
- Expected: 1. Connection to the image via ssh using root user without providing a password should be allowed.
- 2. Connection to the image via ssh using tester user without providing a password should be allowed.
- Product: oe-core
- Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n'
- features += 'INHERIT += "extrausers"\n'
- features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
- self.write_config(features)
-
- # Build a core-image-minimal
- bitbake('core-image-minimal')
-
- with runqemu("core-image-minimal") as qemu:
- # Attempt to ssh with each user into qemu with empty password
- for user in [self.root_user, self.test_user]:
- ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
- status, output = ssh.run("true")
- self.assertEqual(status, 0, 'ssh to user %s failed with %s' % (user, output))
-
- @testcase(1115)
- def test_all_users_can_connect_via_ssh_without_password(self):
- """
- Summary: Check if all users can connect via ssh without password
- Expected: 1. Connection to the image via ssh using root user without providing a password should NOT be allowed.
- 2. Connection to the image via ssh using tester user without providing a password should be allowed.
- Product: oe-core
- Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n'
- features += 'INHERIT += "extrausers"\n'
- features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
- self.write_config(features)
-
- # Build a core-image-minimal
- bitbake('core-image-minimal')
-
- with runqemu("core-image-minimal") as qemu:
- # Attempt to ssh with each user into qemu with empty password
- for user in [self.root_user, self.test_user]:
- ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
- status, output = ssh.run("true")
- if user == 'root':
- self.assertNotEqual(status, 0, 'ssh to user root was allowed when it should not have been')
- else:
- self.assertEqual(status, 0, 'ssh to user tester failed with %s' % output)
-
-
- @testcase(1116)
- def test_clutter_image_can_be_built(self):
- """
- Summary: Check if clutter image can be built
- Expected: 1. core-image-clutter can be built
- Product: oe-core
- Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- # Build a core-image-clutter
- bitbake('core-image-clutter')
-
- @testcase(1117)
- def test_wayland_support_in_image(self):
- """
- Summary: Check Wayland support in image
- Expected: 1. Wayland image can be build
- 2. Wayland feature can be installed
- Product: oe-core
- Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- features = 'DISTRO_FEATURES_append = " wayland"\n'
- features += 'CORE_IMAGE_EXTRA_INSTALL += "wayland weston"'
- self.write_config(features)
-
- # Build a core-image-weston
- bitbake('core-image-weston')
-
- def test_bmap(self):
- """
- Summary: Check bmap support
- Expected: 1. core-image-minimal can be build with bmap support
- 2. core-image-minimal is sparse
- Product: oe-core
- Author: Ed Bartosh <ed.bartosh@linux.intel.com>
- """
-
- features = 'IMAGE_FSTYPES += " ext4 ext4.bmap"'
- self.write_config(features)
-
- image_name = 'core-image-minimal'
- bitbake(image_name)
-
- deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
- link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
- image_path = os.path.join(deploy_dir_image, "%s.ext4" % link_name)
- bmap_path = "%s.bmap" % image_path
-
- # check if result image and bmap file are in deploy directory
- self.assertTrue(os.path.exists(image_path))
- self.assertTrue(os.path.exists(bmap_path))
-
- # check if result image is sparse
- image_stat = os.stat(image_path)
- self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)
diff --git a/meta/lib/oeqa/selftest/lic-checksum.py b/meta/lib/oeqa/selftest/lic-checksum.py
deleted file mode 100644
index 2e81373ae4..0000000000
--- a/meta/lib/oeqa/selftest/lic-checksum.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import os
-import tempfile
-
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import bitbake
-from oeqa.utils import CommandError
-from oeqa.utils.decorators import testcase
-
-class LicenseTests(oeSelfTest):
-
- # Verify that changing a license file that has an absolute path causes
- # the license qa to fail due to a mismatched md5sum.
- @testcase(1197)
- def test_nonmatching_checksum(self):
- bitbake_cmd = '-c populate_lic emptytest'
- error_msg = 'emptytest: The new md5 checksum is 8d777f385d3dfec8815d20f7496026dc'
-
- lic_file, lic_path = tempfile.mkstemp()
- os.close(lic_file)
- self.track_for_cleanup(lic_path)
-
- self.write_recipeinc('emptytest', """
-INHIBIT_DEFAULT_DEPS = "1"
-LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"
-SRC_URI = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"
-""" % (lic_path, lic_path))
- result = bitbake(bitbake_cmd)
-
- with open(lic_path, "w") as f:
- f.write("data")
-
- self.write_config("INHERIT_remove = \"report-error\"")
- result = bitbake(bitbake_cmd, ignore_status=True)
- if error_msg not in result.output:
- raise AssertionError(result.output)
diff --git a/meta/lib/oeqa/selftest/oescripts.py b/meta/lib/oeqa/selftest/oescripts.py
deleted file mode 100644
index 31cd50809c..0000000000
--- a/meta/lib/oeqa/selftest/oescripts.py
+++ /dev/null
@@ -1,54 +0,0 @@
-import datetime
-import unittest
-import os
-import re
-import shutil
-
-import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
-from oeqa.selftest.buildhistory import BuildhistoryBase
-from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
-from oeqa.utils.decorators import testcase
-
-class TestScripts(oeSelfTest):
-
- @testcase(300)
- def test_cleanup_workdir(self):
- path = os.path.dirname(get_bb_var('WORKDIR', 'gzip'))
- old_version_recipe = os.path.join(get_bb_var('COREBASE'), 'meta/recipes-extended/gzip/gzip_1.3.12.bb')
- old_version = '1.3.12'
- bitbake("-ccleansstate gzip")
- bitbake("-ccleansstate -b %s" % old_version_recipe)
- if os.path.exists(get_bb_var('WORKDIR', "-b %s" % old_version_recipe)):
- shutil.rmtree(get_bb_var('WORKDIR', "-b %s" % old_version_recipe))
- if os.path.exists(get_bb_var('WORKDIR', 'gzip')):
- shutil.rmtree(get_bb_var('WORKDIR', 'gzip'))
-
- if os.path.exists(path):
- initial_contents = os.listdir(path)
- else:
- initial_contents = []
-
- bitbake('gzip')
- intermediary_contents = os.listdir(path)
- bitbake("-b %s" % old_version_recipe)
- runCmd('cleanup-workdir')
- remaining_contents = os.listdir(path)
-
- expected_contents = [x for x in intermediary_contents if x not in initial_contents]
- remaining_not_expected = [x for x in remaining_contents if x not in expected_contents]
- self.assertFalse(remaining_not_expected, msg="Not all necessary content has been deleted from %s: %s" % (path, ', '.join(map(str, remaining_not_expected))))
- expected_not_remaining = [x for x in expected_contents if x not in remaining_contents]
- self.assertFalse(expected_not_remaining, msg="The script removed extra contents from %s: %s" % (path, ', '.join(map(str, expected_not_remaining))))
-
-class BuildhistoryDiffTests(BuildhistoryBase):
-
- @testcase(295)
- def test_buildhistory_diff(self):
- self.add_command_to_tearDown('cleanup-workdir')
- target = 'xcursor-transparent-theme'
- self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
- self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True)
- result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR'))
- expected_output = 'PR changed from "r1" to "r0"'
- self.assertTrue(expected_output in result.output, msg="Did not find expected output: %s" % result.output)
diff --git a/meta/lib/oeqa/selftest/runtime-test.py b/meta/lib/oeqa/selftest/runtime-test.py
deleted file mode 100644
index c2d5b45a4b..0000000000
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ /dev/null
@@ -1,105 +0,0 @@
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
-from oeqa.utils.decorators import testcase
-import os
-
-class TestExport(oeSelfTest):
-
- def test_testexport_basic(self):
- """
- Summary: Check basic testexport functionality with only ping test enabled.
- Expected: 1. testexport directory must be created.
- 2. runexported.py must run without any error/exception.
- 3. ping test must succeed.
- Product: oe-core
- Author: Mariano Lopez <mariano.lopez@intel.com>
- """
-
- features = 'INHERIT += "testexport"\n'
- # These aren't the actual IP addresses but testexport class needs something defined
- features += 'TEST_SERVER_IP = "192.168.7.1"\n'
- features += 'TEST_TARGET_IP = "192.168.7.1"\n'
- features += 'TEST_SUITES = "ping"\n'
- self.write_config(features)
-
- # Build tesexport for core-image-minimal
- bitbake('core-image-minimal')
- bitbake('-c testexport core-image-minimal')
-
- # Verify if TEST_EXPORT_DIR was created
- testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
- isdir = os.path.isdir(testexport_dir)
- self.assertEqual(True, isdir, 'Failed to create testexport dir: %s' % testexport_dir)
-
- with runqemu('core-image-minimal') as qemu:
- # Attempt to run runexported.py to perform ping test
- runexported_path = os.path.join(testexport_dir, "runexported.py")
- testdata_path = os.path.join(testexport_dir, "testdata.json")
- cmd = "%s -t %s -s %s %s" % (runexported_path, qemu.ip, qemu.server_ip, testdata_path)
- result = runCmd(cmd)
- self.assertEqual(0, result.status, 'runexported.py returned a non 0 status')
-
- # Verify ping test was succesful
- failure = True if 'FAIL' in result.output else False
- self.assertNotEqual(True, failure, 'ping test failed')
-
- def test_testexport_sdk(self):
- """
- Summary: Check sdk functionality for testexport.
- Expected: 1. testexport directory must be created.
- 2. SDK tarball must exists.
- 3. Uncompressing of tarball must succeed.
- 4. Check if the SDK directory is added to PATH.
- 5. Run tar from the SDK directory.
- Product: oe-core
- Author: Mariano Lopez <mariano.lopez@intel.com>
- """
-
- features = 'INHERIT += "testexport"\n'
- # These aren't the actual IP addresses but testexport class needs something defined
- features += 'TEST_SERVER_IP = "192.168.7.1"\n'
- features += 'TEST_TARGET_IP = "192.168.7.1"\n'
- features += 'TEST_SUITES = "ping"\n'
- features += 'TEST_SUITES_TAGS = "selftest_sdk"\n'
- features += 'TEST_EXPORT_SDK_ENABLED = "1"\n'
- features += 'TEST_EXPORT_SDK_PACKAGES = "nativesdk-tar"\n'
- self.write_config(features)
-
- # Build tesexport for core-image-minimal
- bitbake('core-image-minimal')
- bitbake('-c testexport core-image-minimal')
-
- # Check for SDK
- testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
- sdk_dir = get_bb_var('TEST_EXPORT_SDK_DIR', 'core-image-minimal')
- tarball_name = "%s.sh" % get_bb_var('TEST_EXPORT_SDK_NAME', 'core-image-minimal')
- tarball_path = os.path.join(testexport_dir, sdk_dir, tarball_name)
- self.assertEqual(os.path.isfile(tarball_path), True, "Couldn't find SDK tarball: %s" % tarball_path)
-
- # Run runexported.py
- runexported_path = os.path.join(testexport_dir, "runexported.py")
- testdata_path = os.path.join(testexport_dir, "testdata.json")
- cmd = "%s %s" % (runexported_path, testdata_path)
- result = runCmd(cmd)
- self.assertEqual(0, result.status, 'runexported.py returned a non 0 status')
-
-
-class TestImage(oeSelfTest):
-
- def test_testimage_install(self):
- """
- Summary: Check install packages functionality for testimage/testexport.
- Expected: 1. Import tests from a directory other than meta.
- 2. Check install/unistall of socat.
- Product: oe-core
- Author: Mariano Lopez <mariano.lopez@intel.com>
- """
-
- features = 'INHERIT += "testimage"\n'
- features += 'TEST_SUITES = "ping ssh selftest"\n'
- features += 'TEST_SUITES_TAGS = "selftest_package_install"\n'
- self.write_config(features)
-
- # Build core-image-sato and testimage
- bitbake('core-image-full-cmdline socat')
- bitbake('-c testimage core-image-full-cmdline')
diff --git a/meta/lib/oeqa/selftest/signing.py b/meta/lib/oeqa/selftest/signing.py
deleted file mode 100644
index 4c12d6d940..0000000000
--- a/meta/lib/oeqa/selftest/signing.py
+++ /dev/null
@@ -1,178 +0,0 @@
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
-import os
-import glob
-import re
-import shutil
-import tempfile
-from oeqa.utils.decorators import testcase
-from oeqa.utils.ftools import write_file
-
-
-class Signing(oeSelfTest):
-
- gpg_dir = ""
- pub_key_path = ""
- secret_key_path = ""
-
- @classmethod
- def setUpClass(cls):
- # Check that we can find the gpg binary and fail early if we can't
- if not shutil.which("gpg"):
- raise AssertionError("This test needs GnuPG")
-
- cls.gpg_home_dir = tempfile.TemporaryDirectory(prefix="oeqa-signing-")
- cls.gpg_dir = cls.gpg_home_dir.name
-
- cls.pub_key_path = os.path.join(cls.testlayer_path, 'files', 'signing', "key.pub")
- cls.secret_key_path = os.path.join(cls.testlayer_path, 'files', 'signing', "key.secret")
-
- runCmd('gpg --homedir %s --import %s %s' % (cls.gpg_dir, cls.pub_key_path, cls.secret_key_path))
-
- @testcase(1362)
- def test_signing_packages(self):
- """
- Summary: Test that packages can be signed in the package feed
- Expected: Package should be signed with the correct key
- Product: oe-core
- Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
- import oe.packagedata
-
- package_classes = get_bb_var('PACKAGE_CLASSES')
- if 'package_rpm' not in package_classes:
- self.skipTest('This test requires RPM Packaging.')
-
- test_recipe = 'ed'
-
- feature = 'INHERIT += "sign_rpm"\n'
- feature += 'RPM_GPG_PASSPHRASE = "test123"\n'
- feature += 'RPM_GPG_NAME = "testuser"\n'
- feature += 'RPM_GPG_PUBKEY = "%s"\n' % self.pub_key_path
- feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
-
- self.write_config(feature)
-
- bitbake('-c cleansstate %s' % test_recipe)
- bitbake(test_recipe)
- self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
-
- pkgdatadir = get_bb_var('PKGDATA_DIR', test_recipe)
- pkgdata = oe.packagedata.read_pkgdatafile(pkgdatadir + "/runtime/ed")
- if 'PKGE' in pkgdata:
- pf = pkgdata['PN'] + "-" + pkgdata['PKGE'] + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
- else:
- pf = pkgdata['PN'] + "-" + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
- deploy_dir_rpm = get_bb_var('DEPLOY_DIR_RPM', test_recipe)
- package_arch = get_bb_var('PACKAGE_ARCH', test_recipe).replace('-', '_')
- staging_bindir_native = get_bb_var('STAGING_BINDIR_NATIVE')
-
- pkg_deploy = os.path.join(deploy_dir_rpm, package_arch, '.'.join((pf, package_arch, 'rpm')))
-
- # Use a temporary rpmdb
- rpmdb = tempfile.mkdtemp(prefix='oeqa-rpmdb')
-
- runCmd('%s/rpm --define "_dbpath %s" --import %s' %
- (staging_bindir_native, rpmdb, self.pub_key_path))
-
- ret = runCmd('%s/rpm --define "_dbpath %s" --checksig %s' %
- (staging_bindir_native, rpmdb, pkg_deploy))
- # tmp/deploy/rpm/i586/ed-1.9-r0.i586.rpm: rsa sha1 md5 OK
- self.assertIn('rsa sha1 md5 OK', ret.output, 'Package signed incorrectly.')
- shutil.rmtree(rpmdb)
-
- @testcase(1382)
- def test_signing_sstate_archive(self):
- """
- Summary: Test that sstate archives can be signed
- Expected: Package should be signed with the correct key
- Product: oe-core
- Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- test_recipe = 'ed'
-
- builddir = os.environ.get('BUILDDIR')
- sstatedir = os.path.join(builddir, 'test-sstate')
-
- self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
- self.add_command_to_tearDown('bitbake -c cleansstate %s' % test_recipe)
- self.add_command_to_tearDown('rm -rf %s' % sstatedir)
-
- # Determine the pub key signature
- ret = runCmd('gpg --homedir %s --list-keys' % self.gpg_dir)
- pub_key = re.search(r'^pub\s+\S+/(\S+)\s+', ret.output, re.M)
- self.assertIsNotNone(pub_key, 'Failed to determine the public key signature.')
- pub_key = pub_key.group(1)
-
- feature = 'SSTATE_SIG_KEY ?= "%s"\n' % pub_key
- feature += 'SSTATE_SIG_PASSPHRASE ?= "test123"\n'
- feature += 'SSTATE_VERIFY_SIG ?= "1"\n'
- feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
- feature += 'SSTATE_DIR = "%s"\n' % sstatedir
-
- self.write_config(feature)
-
- bitbake('-c cleansstate %s' % test_recipe)
- bitbake(test_recipe)
-
- recipe_sig = glob.glob(sstatedir + '/*/*:ed:*_package.tgz.sig')
- recipe_tgz = glob.glob(sstatedir + '/*/*:ed:*_package.tgz')
-
- self.assertEqual(len(recipe_sig), 1, 'Failed to find .sig file.')
- self.assertEqual(len(recipe_tgz), 1, 'Failed to find .tgz file.')
-
- ret = runCmd('gpg --homedir %s --verify %s %s' % (self.gpg_dir, recipe_sig[0], recipe_tgz[0]))
- # gpg: Signature made Thu 22 Oct 2015 01:45:09 PM EEST using RSA key ID 61EEFB30
- # gpg: Good signature from "testuser (nocomment) <testuser@email.com>"
- self.assertIn('gpg: Good signature from', ret.output, 'Package signed incorrectly.')
-
-
-class LockedSignatures(oeSelfTest):
-
- @testcase(1420)
- def test_locked_signatures(self):
- """
- Summary: Test locked signature mechanism
- Expected: Locked signatures will prevent task to run
- Product: oe-core
- Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- test_recipe = 'ed'
- locked_sigs_file = 'locked-sigs.inc'
-
- self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file))
-
- bitbake(test_recipe)
- # Generate locked sigs include file
- bitbake('-S none %s' % test_recipe)
-
- feature = 'require %s\n' % locked_sigs_file
- feature += 'SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n'
- self.write_config(feature)
-
- # Build a locked recipe
- bitbake(test_recipe)
-
- # Make a change that should cause the locked task signature to change
- recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend'
- recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', test_recipe, recipe_append_file)
- feature = 'SUMMARY += "test locked signature"\n'
-
- os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', test_recipe))
- write_file(recipe_append_path, feature)
-
- self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test', test_recipe))
-
- # Build the recipe again
- ret = bitbake(test_recipe)
-
- # Verify you get the warning and that the real task *isn't* run (i.e. the locked signature has worked)
- patt = r'WARNING: The %s:do_package sig is computed to be \S+, but the sig is locked to \S+ in SIGGEN_LOCKEDSIGS\S+' % test_recipe
- found_warn = re.search(patt, ret.output)
-
- self.assertIsNotNone(found_warn, "Didn't find the expected warning message. Output: %s" % ret.output)
diff --git a/meta/lib/oeqa/selftest/sstate.py b/meta/lib/oeqa/selftest/sstate.py
deleted file mode 100644
index 5989724432..0000000000
--- a/meta/lib/oeqa/selftest/sstate.py
+++ /dev/null
@@ -1,53 +0,0 @@
-import datetime
-import unittest
-import os
-import re
-import shutil
-
-import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
-
-
-class SStateBase(oeSelfTest):
-
- def setUpLocal(self):
- self.temp_sstate_location = None
- self.sstate_path = get_bb_var('SSTATE_DIR')
- self.distro = get_bb_var('NATIVELSBSTRING')
- self.distro_specific_sstate = os.path.join(self.sstate_path, self.distro)
-
- # Creates a special sstate configuration with the option to add sstate mirrors
- def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]):
- self.temp_sstate_location = temp_sstate_location
-
- if self.temp_sstate_location:
- temp_sstate_path = os.path.join(self.builddir, "temp_sstate_%s" % datetime.datetime.now().strftime('%Y%m%d%H%M%S'))
- config_temp_sstate = "SSTATE_DIR = \"%s\"" % temp_sstate_path
- self.append_config(config_temp_sstate)
- self.track_for_cleanup(temp_sstate_path)
- self.sstate_path = get_bb_var('SSTATE_DIR')
- self.distro = get_bb_var('NATIVELSBSTRING')
- self.distro_specific_sstate = os.path.join(self.sstate_path, self.distro)
-
- if add_local_mirrors:
- config_set_sstate_if_not_set = 'SSTATE_MIRRORS ?= ""'
- self.append_config(config_set_sstate_if_not_set)
- for local_mirror in add_local_mirrors:
- self.assertFalse(os.path.join(local_mirror) == os.path.join(self.sstate_path), msg='Cannot add the current sstate path as a sstate mirror')
- config_sstate_mirror = "SSTATE_MIRRORS += \"file://.* file:///%s/PATH\"" % local_mirror
- self.append_config(config_sstate_mirror)
-
- # Returns a list containing sstate files
- def search_sstate(self, filename_regex, distro_specific=True, distro_nonspecific=True):
- result = []
- for root, dirs, files in os.walk(self.sstate_path):
- if distro_specific and re.search("%s/[a-z0-9]{2}$" % self.distro, root):
- for f in files:
- if re.search(filename_regex, f):
- result.append(f)
- if distro_nonspecific and re.search("%s/[a-z0-9]{2}$" % self.sstate_path, root):
- for f in files:
- if re.search(filename_regex, f):
- result.append(f)
- return result
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
deleted file mode 100644
index a353f67e86..0000000000
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ /dev/null
@@ -1,469 +0,0 @@
-import datetime
-import unittest
-import os
-import re
-import shutil
-import glob
-import subprocess
-
-import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
-from oeqa.selftest.sstate import SStateBase
-from oeqa.utils.decorators import testcase
-
-class SStateTests(SStateBase):
-
- # Test sstate files creation and their location
- def run_test_sstate_creation(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True, should_pass=True):
- self.config_sstate(temp_sstate_location)
-
- if self.temp_sstate_location:
- bitbake(['-cclean'] + targets)
- else:
- bitbake(['-ccleansstate'] + targets)
-
- bitbake(targets)
- file_tracker = []
- results = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific)
- if distro_nonspecific:
- for r in results:
- if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo", "_fetch.tgz.siginfo", "_unpack.tgz.siginfo", "_patch.tgz.siginfo")):
- continue
- file_tracker.append(r)
- else:
- file_tracker = results
-
- if should_pass:
- self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
- else:
- self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s (found %s)" % (', '.join(map(str, targets)), str(file_tracker)))
-
- @testcase(975)
- def test_sstate_creation_distro_specific_pass(self):
- targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
-
- @testcase(1374)
- def test_sstate_creation_distro_specific_fail(self):
- targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False)
-
- @testcase(976)
- def test_sstate_creation_distro_nonspecific_pass(self):
- self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
-
- @testcase(1375)
- def test_sstate_creation_distro_nonspecific_fail(self):
- self.run_test_sstate_creation(['glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
-
-
- # Test the sstate files deletion part of the do_cleansstate task
- def run_test_cleansstate_task(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True):
- self.config_sstate(temp_sstate_location)
-
- bitbake(['-ccleansstate'] + targets)
-
- bitbake(targets)
- tgz_created = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
- self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_created)))
-
- siginfo_created = self.search_sstate('|'.join(map(str, [s + '.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific)
- self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s (%s)" % (', '.join(map(str, targets)), str(siginfo_created)))
-
- bitbake(['-ccleansstate'] + targets)
- tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
- self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_removed)))
-
- @testcase(977)
- def test_cleansstate_task_distro_specific_nonspecific(self):
- targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
-
- @testcase(1376)
- def test_cleansstate_task_distro_nonspecific(self):
- self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
-
- @testcase(1377)
- def test_cleansstate_task_distro_specific(self):
- targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
-
-
- # Test rebuilding of distro-specific sstate files
- def run_test_rebuild_distro_specific_sstate(self, targets, temp_sstate_location=True):
- self.config_sstate(temp_sstate_location)
-
- bitbake(['-ccleansstate'] + targets)
-
- bitbake(targets)
- results = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True)
- filtered_results = []
- for r in results:
- if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo")):
- continue
- filtered_results.append(r)
- self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results)))
- file_tracker_1 = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
- self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
-
- self.track_for_cleanup(self.distro_specific_sstate + "_old")
- shutil.copytree(self.distro_specific_sstate, self.distro_specific_sstate + "_old")
- shutil.rmtree(self.distro_specific_sstate)
-
- bitbake(['-cclean'] + targets)
- bitbake(targets)
- file_tracker_2 = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
- self.assertTrue(len(file_tracker_2) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
-
- not_recreated = [x for x in file_tracker_1 if x not in file_tracker_2]
- self.assertTrue(not_recreated == [], msg="The following sstate files ware not recreated: %s" % ', '.join(map(str, not_recreated)))
-
- created_once = [x for x in file_tracker_2 if x not in file_tracker_1]
- self.assertTrue(created_once == [], msg="The following sstate files ware created only in the second run: %s" % ', '.join(map(str, created_once)))
-
- @testcase(175)
- def test_rebuild_distro_specific_sstate_cross_native_targets(self):
- targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch, 'binutils-native'], temp_sstate_location=True)
-
- @testcase(1372)
- def test_rebuild_distro_specific_sstate_cross_target(self):
- targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch], temp_sstate_location=True)
-
- @testcase(1373)
- def test_rebuild_distro_specific_sstate_native_target(self):
- self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
-
-
- # Test the sstate-cache-management script. Each element in the global_config list is used with the corresponding element in the target_config list
- # global_config elements are expected to not generate any sstate files that would be removed by sstate-cache-management.sh (such as changing the value of MACHINE)
- def run_test_sstate_cache_management_script(self, target, global_config=[''], target_config=[''], ignore_patterns=[]):
- self.assertTrue(global_config)
- self.assertTrue(target_config)
- self.assertTrue(len(global_config) == len(target_config), msg='Lists global_config and target_config should have the same number of elements')
- self.config_sstate(temp_sstate_location=True, add_local_mirrors=[self.sstate_path])
-
- # If buildhistory is enabled, we need to disable version-going-backwards QA checks for this test. It may report errors otherwise.
- if ('buildhistory' in get_bb_var('USER_CLASSES')) or ('buildhistory' in get_bb_var('INHERIT')):
- remove_errors_config = 'ERROR_QA_remove = "version-going-backwards"'
- self.append_config(remove_errors_config)
-
- # For not this only checks if random sstate tasks are handled correctly as a group.
- # In the future we should add control over what tasks we check for.
-
- sstate_archs_list = []
- expected_remaining_sstate = []
- for idx in range(len(target_config)):
- self.append_config(global_config[idx])
- self.append_recipeinc(target, target_config[idx])
- sstate_arch = get_bb_var('SSTATE_PKGARCH', target)
- if not sstate_arch in sstate_archs_list:
- sstate_archs_list.append(sstate_arch)
- if target_config[idx] == target_config[-1]:
- target_sstate_before_build = self.search_sstate(target + '.*?\.tgz$')
- bitbake("-cclean %s" % target)
- result = bitbake(target, ignore_status=True)
- if target_config[idx] == target_config[-1]:
- target_sstate_after_build = self.search_sstate(target + '.*?\.tgz$')
- expected_remaining_sstate += [x for x in target_sstate_after_build if x not in target_sstate_before_build if not any(pattern in x for pattern in ignore_patterns)]
- self.remove_config(global_config[idx])
- self.remove_recipeinc(target, target_config[idx])
- self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output))
-
- runCmd("sstate-cache-management.sh -y --cache-dir=%s --remove-duplicated --extra-archs=%s" % (self.sstate_path, ','.join(map(str, sstate_archs_list))))
- actual_remaining_sstate = [x for x in self.search_sstate(target + '.*?\.tgz$') if not any(pattern in x for pattern in ignore_patterns)]
-
- actual_not_expected = [x for x in actual_remaining_sstate if x not in expected_remaining_sstate]
- self.assertFalse(actual_not_expected, msg="Files should have been removed but ware not: %s" % ', '.join(map(str, actual_not_expected)))
- expected_not_actual = [x for x in expected_remaining_sstate if x not in actual_remaining_sstate]
- self.assertFalse(expected_not_actual, msg="Extra files ware removed: %s" ', '.join(map(str, expected_not_actual)))
-
- @testcase(973)
- def test_sstate_cache_management_script_using_pr_1(self):
- global_config = []
- target_config = []
- global_config.append('')
- target_config.append('PR = "0"')
- self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
-
- @testcase(978)
- def test_sstate_cache_management_script_using_pr_2(self):
- global_config = []
- target_config = []
- global_config.append('')
- target_config.append('PR = "0"')
- global_config.append('')
- target_config.append('PR = "1"')
- self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
-
- @testcase(979)
- def test_sstate_cache_management_script_using_pr_3(self):
- global_config = []
- target_config = []
- global_config.append('MACHINE = "qemux86-64"')
- target_config.append('PR = "0"')
- global_config.append(global_config[0])
- target_config.append('PR = "1"')
- global_config.append('MACHINE = "qemux86"')
- target_config.append('PR = "1"')
- self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
-
- @testcase(974)
- def test_sstate_cache_management_script_using_machine(self):
- global_config = []
- target_config = []
- global_config.append('MACHINE = "qemux86-64"')
- target_config.append('')
- global_config.append('MACHINE = "qemux86"')
- target_config.append('')
- self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
-
- @testcase(1270)
- def test_sstate_32_64_same_hash(self):
- """
- The sstate checksums for both native and target should not vary whether
- they're built on a 32 or 64 bit system. Rather than requiring two different
- build machines and running a builds, override the variables calling uname()
- manually and check using bitbake -S.
- """
-
- topdir = get_bb_var('TOPDIR')
- targetvendor = get_bb_var('TARGET_VENDOR')
- self.write_config("""
-MACHINE = "qemux86"
-TMPDIR = "${TOPDIR}/tmp-sstatesamehash"
-BUILD_ARCH = "x86_64"
-BUILD_OS = "linux"
-SDKMACHINE = "x86_64"
-PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
- bitbake("core-image-sato -S none")
- self.write_config("""
-MACHINE = "qemux86"
-TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
-BUILD_ARCH = "i686"
-BUILD_OS = "linux"
-SDKMACHINE = "i686"
-PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
- bitbake("core-image-sato -S none")
-
- def get_files(d):
- f = []
- for root, dirs, files in os.walk(d):
- if "core-image-sato" in root:
- # SDKMACHINE changing will change
- # do_rootfs/do_testimage/do_build stamps of images which
- # is safe to ignore.
- continue
- f.extend(os.path.join(root, name) for name in files)
- return f
- files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/")
- files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
- files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash").replace("i686-linux", "x86_64-linux").replace("i686" + targetvendor + "-linux", "x86_64" + targetvendor + "-linux", ) for x in files2]
- self.maxDiff = None
- self.assertCountEqual(files1, files2)
-
-
- @testcase(1271)
- def test_sstate_nativelsbstring_same_hash(self):
- """
- The sstate checksums should be independent of whichever NATIVELSBSTRING is
- detected. Rather than requiring two different build machines and running
- builds, override the variables manually and check using bitbake -S.
- """
-
- topdir = get_bb_var('TOPDIR')
- self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
-NATIVELSBSTRING = \"DistroA\"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
- bitbake("core-image-sato -S none")
- self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
-NATIVELSBSTRING = \"DistroB\"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
- bitbake("core-image-sato -S none")
-
- def get_files(d):
- f = []
- for root, dirs, files in os.walk(d):
- f.extend(os.path.join(root, name) for name in files)
- return f
- files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/")
- files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
- files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
- self.maxDiff = None
- self.assertCountEqual(files1, files2)
-
- @testcase(1368)
- def test_sstate_allarch_samesigs(self):
- """
- The sstate checksums of allarch packages should be independent of whichever
- MACHINE is set. Check this using bitbake -S.
- Also, rather than duplicate the test, check nativesdk stamps are the same between
- the two MACHINE values.
- """
-
- topdir = get_bb_var('TOPDIR')
- targetos = get_bb_var('TARGET_OS')
- targetvendor = get_bb_var('TARGET_VENDOR')
- self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
-MACHINE = \"qemux86\"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
- bitbake("world meta-toolchain -S none")
- self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
-MACHINE = \"qemuarm\"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
- bitbake("world meta-toolchain -S none")
-
- def get_files(d):
- f = {}
- for root, dirs, files in os.walk(d):
- for name in files:
- if "meta-environment" in root or "cross-canadian" in root:
- continue
- if "do_build" not in name:
- # 1.4.1+gitAUTOINC+302fca9f4c-r0.do_package_write_ipk.sigdata.f3a2a38697da743f0dbed8b56aafcf79
- (_, task, _, shash) = name.rsplit(".", 3)
- f[os.path.join(os.path.basename(root), task)] = shash
- return f
- files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/all" + targetvendor + "-" + targetos)
- files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/all" + targetvendor + "-" + targetos)
- self.maxDiff = None
- self.assertEqual(files1, files2)
-
- nativesdkdir = os.path.basename(glob.glob(topdir + "/tmp-sstatesamehash/stamps/*-nativesdk*-linux")[0])
-
- files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/" + nativesdkdir)
- files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/" + nativesdkdir)
- self.maxDiff = None
- self.assertEqual(files1, files2)
-
- @testcase(1369)
- def test_sstate_sametune_samesigs(self):
- """
- The sstate checksums of two identical machines (using the same tune) should be the
- same, apart from changes within the machine specific stamps directory. We use the
- qemux86copy machine to test this. Also include multilibs in the test.
- """
-
- topdir = get_bb_var('TOPDIR')
- targetos = get_bb_var('TARGET_OS')
- targetvendor = get_bb_var('TARGET_VENDOR')
- self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
-MACHINE = \"qemux86\"
-require conf/multilib.conf
-MULTILIBS = "multilib:lib32"
-DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
- bitbake("world meta-toolchain -S none")
- self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
-MACHINE = \"qemux86copy\"
-require conf/multilib.conf
-MULTILIBS = "multilib:lib32"
-DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
- bitbake("world meta-toolchain -S none")
-
- def get_files(d):
- f = []
- for root, dirs, files in os.walk(d):
- for name in files:
- if "meta-environment" in root or "cross-canadian" in root:
- continue
- if "qemux86copy-" in root or "qemux86-" in root:
- continue
- if "do_build" not in name and "do_populate_sdk" not in name:
- f.append(os.path.join(root, name))
- return f
- files1 = get_files(topdir + "/tmp-sstatesamehash/stamps")
- files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps")
- files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
- self.maxDiff = None
- self.assertCountEqual(files1, files2)
-
-
- def test_sstate_noop_samesigs(self):
- """
- The sstate checksums of two builds with these variables changed or
- classes inherits should be the same.
- """
-
- topdir = get_bb_var('TOPDIR')
- targetvendor = get_bb_var('TARGET_VENDOR')
- self.write_config("""
-TMPDIR = "${TOPDIR}/tmp-sstatesamehash"
-BB_NUMBER_THREADS = "1"
-PARALLEL_MAKE = "-j 1"
-DL_DIR = "${TOPDIR}/download1"
-TIME = "111111"
-DATE = "20161111"
-INHERIT_remove = "buildstats-summary buildhistory uninative"
-http_proxy = ""
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
- self.track_for_cleanup(topdir + "/download1")
- bitbake("world meta-toolchain -S none")
- self.write_config("""
-TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
-BB_NUMBER_THREADS = "2"
-PARALLEL_MAKE = "-j 2"
-DL_DIR = "${TOPDIR}/download2"
-TIME = "222222"
-DATE = "20161212"
-# Always remove uninative as we're changing proxies
-INHERIT_remove = "uninative"
-INHERIT += "buildstats-summary buildhistory"
-http_proxy = "http://example.com/"
-""")
- self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
- self.track_for_cleanup(topdir + "/download2")
- bitbake("world meta-toolchain -S none")
-
- def get_files(d):
- f = {}
- for root, dirs, files in os.walk(d):
- for name in files:
- name, shash = name.rsplit('.', 1)
- # Extract just the machine and recipe name
- base = os.sep.join(root.rsplit(os.sep, 2)[-2:] + [name])
- f[base] = shash
- return f
- files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/")
- files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
- # Remove items that are identical in both sets
- for k,v in files1.items() & files2.items():
- del files1[k]
- del files2[k]
- if not files1 and not files2:
- # No changes, so we're done
- return
-
- for k in files1.keys() | files2.keys():
- if k in files1 and k in files2:
- print("%s differs:" % k)
- print(subprocess.check_output(("bitbake-diffsigs",
- topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k],
- topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k])))
- elif k in files1 and k not in files2:
- print("%s in files1" % k)
- elif k not in files1 and k in files2:
- print("%s in files2" % k)
- else:
- assert "shouldn't reach here"
- self.fail("sstate hashes not identical.")
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
deleted file mode 100644
index e550785fcf..0000000000
--- a/meta/lib/oeqa/selftest/wic.py
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2015, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# AUTHORS
-# Ed Bartosh <ed.bartosh@linux.intel.com>
-
-"""Test cases for wic."""
-
-import os
-
-from glob import glob
-from shutil import rmtree
-
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
-from oeqa.utils.decorators import testcase
-
-
-class Wic(oeSelfTest):
- """Wic test class."""
-
- resultdir = "/var/tmp/wic/build/"
- image_is_ready = False
-
- def setUpLocal(self):
- """This code is executed before each test method."""
- self.write_config('IMAGE_FSTYPES += " hddimg"\n'
- 'MACHINE_FEATURES_append = " efi"\n')
-
- # Do this here instead of in setUpClass as the base setUp does some
- # clean up which can result in the native tools built earlier in
- # setUpClass being unavailable.
- if not Wic.image_is_ready:
- bitbake('syslinux syslinux-native parted-native gptfdisk-native '
- 'dosfstools-native mtools-native bmap-tools-native')
- bitbake('core-image-minimal')
- Wic.image_is_ready = True
-
- rmtree(self.resultdir, ignore_errors=True)
-
- @testcase(1208)
- def test_help(self):
- """Test wic --help"""
- self.assertEqual(0, runCmd('wic --help').status)
-
- @testcase(1209)
- def test_createhelp(self):
- """Test wic create --help"""
- self.assertEqual(0, runCmd('wic create --help').status)
-
- @testcase(1210)
- def test_listhelp(self):
- """Test wic list --help"""
- self.assertEqual(0, runCmd('wic list --help').status)
-
- @testcase(1211)
- def test_build_image_name(self):
- """Test wic create directdisk --image-name core-image-minimal"""
- self.assertEqual(0, runCmd("wic create directdisk "
- "--image-name core-image-minimal").status)
- self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
-
- @testcase(1212)
- def test_build_artifacts(self):
- """Test wic create directdisk providing all artifacts."""
- bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
- for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
- 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
- status = runCmd("wic create directdisk "
- "-b %(staging_datadir)s "
- "-k %(deploy_dir_image)s "
- "-n %(staging_dir_native)s "
- "-r %(image_rootfs)s" % bbvars).status
- self.assertEqual(0, status)
- self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
-
- @testcase(1157)
- def test_gpt_image(self):
- """Test creation of core-image-minimal with gpt table and UUID boot"""
- self.assertEqual(0, runCmd("wic create directdisk-gpt "
- "--image-name core-image-minimal").status)
- self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
-
- @testcase(1213)
- def test_unsupported_subcommand(self):
- """Test unsupported subcommand"""
- self.assertEqual(1, runCmd('wic unsupported',
- ignore_status=True).status)
-
- @testcase(1214)
- def test_no_command(self):
- """Test wic without command"""
- self.assertEqual(1, runCmd('wic', ignore_status=True).status)
-
- @testcase(1215)
- def test_help_overview(self):
- """Test wic help overview"""
- self.assertEqual(0, runCmd('wic help overview').status)
-
- @testcase(1216)
- def test_help_plugins(self):
- """Test wic help plugins"""
- self.assertEqual(0, runCmd('wic help plugins').status)
-
- @testcase(1217)
- def test_help_kickstart(self):
- """Test wic help kickstart"""
- self.assertEqual(0, runCmd('wic help kickstart').status)
-
- @testcase(1264)
- def test_compress_gzip(self):
- """Test compressing an image with gzip"""
- self.assertEqual(0, runCmd("wic create directdisk "
- "--image-name core-image-minimal "
- "-c gzip").status)
- self.assertEqual(1, len(glob(self.resultdir + \
- "directdisk-*.direct.gz")))
-
- @testcase(1265)
- def test_compress_bzip2(self):
- """Test compressing an image with bzip2"""
- self.assertEqual(0, runCmd("wic create directdisk "
- "--image-name core-image-minimal "
- "-c bzip2").status)
- self.assertEqual(1, len(glob(self.resultdir + \
- "directdisk-*.direct.bz2")))
-
- @testcase(1266)
- def test_compress_xz(self):
- """Test compressing an image with xz"""
- self.assertEqual(0, runCmd("wic create directdisk "
- "--image-name core-image-minimal "
- "-c xz").status)
- self.assertEqual(1, len(glob(self.resultdir + \
- "directdisk-*.direct.xz")))
-
- @testcase(1267)
- def test_wrong_compressor(self):
- """Test how wic breaks if wrong compressor is provided"""
- self.assertEqual(2, runCmd("wic create directdisk "
- "--image-name core-image-minimal "
- "-c wrong", ignore_status=True).status)
-
- @testcase(1268)
- def test_rootfs_indirect_recipes(self):
- """Test usage of rootfs plugin with rootfs recipes"""
- wks = "directdisk-multi-rootfs"
- self.assertEqual(0, runCmd("wic create %s "
- "--image-name core-image-minimal "
- "--rootfs rootfs1=core-image-minimal "
- "--rootfs rootfs2=core-image-minimal" \
- % wks).status)
- self.assertEqual(1, len(glob(self.resultdir + "%s*.direct" % wks)))
-
- @testcase(1269)
- def test_rootfs_artifacts(self):
- """Test usage of rootfs plugin with rootfs paths"""
- bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
- for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
- 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
- bbvars['wks'] = "directdisk-multi-rootfs"
- status = runCmd("wic create %(wks)s "
- "-b %(staging_datadir)s "
- "-k %(deploy_dir_image)s "
- "-n %(staging_dir_native)s "
- "--rootfs-dir rootfs1=%(image_rootfs)s "
- "--rootfs-dir rootfs2=%(image_rootfs)s" \
- % bbvars).status
- self.assertEqual(0, status)
- self.assertEqual(1, len(glob(self.resultdir + \
- "%(wks)s-*.direct" % bbvars)))
-
- @testcase(1346)
- def test_iso_image(self):
- """Test creation of hybrid iso image with legacy and EFI boot"""
- self.assertEqual(0, runCmd("wic create mkhybridiso "
- "--image-name core-image-minimal").status)
- self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.direct")))
- self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.iso")))
-
- @testcase(1347)
- def test_image_env(self):
- """Test generation of <image>.env files."""
- image = 'core-image-minimal'
- self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status)
- stdir = get_bb_var('STAGING_DIR_TARGET', image)
- imgdatadir = os.path.join(stdir, 'imgdata')
-
- basename = get_bb_var('IMAGE_BASENAME', image)
- self.assertEqual(basename, image)
- path = os.path.join(imgdatadir, basename) + '.env'
- self.assertTrue(os.path.isfile(path))
-
- wicvars = set(get_bb_var('WICVARS', image).split())
- # filter out optional variables
- wicvars = wicvars.difference(('HDDDIR', 'IMAGE_BOOT_FILES',
- 'INITRD', 'ISODIR'))
- with open(path) as envfile:
- content = dict(line.split("=", 1) for line in envfile)
- # test if variables used by wic present in the .env file
- for var in wicvars:
- self.assertTrue(var in content, "%s is not in .env file" % var)
- self.assertTrue(content[var])
-
- @testcase(1351)
- def test_wic_image_type(self):
- """Test building wic images by bitbake"""
- self.assertEqual(0, bitbake('wic-image-minimal').status)
-
- deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE')
- machine = get_bb_var('MACHINE')
- prefix = os.path.join(deploy_dir, 'wic-image-minimal-%s.' % machine)
- # check if we have result image and manifests symlinks
- # pointing to existing files
- for suffix in ('wic', 'manifest'):
- path = prefix + suffix
- self.assertTrue(os.path.islink(path))
- self.assertTrue(os.path.isfile(os.path.realpath(path)))
-
- @testcase(1348)
- def test_qemux86_directdisk(self):
- """Test creation of qemux-86-directdisk image"""
- image = "qemux86-directdisk"
- self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
- % image).status)
- self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
-
- @testcase(1349)
- def test_mkgummidisk(self):
- """Test creation of mkgummidisk image"""
- image = "mkgummidisk"
- self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
- % image).status)
- self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
-
- @testcase(1350)
- def test_mkefidisk(self):
- """Test creation of mkefidisk image"""
- image = "mkefidisk"
- self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
- % image).status)
- self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
-
- @testcase(1385)
- def test_directdisk_bootloader_config(self):
- """Test creation of directdisk-bootloader-config image"""
- image = "directdisk-bootloader-config"
- self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
- % image).status)
- self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
-
- @testcase(1422)
- def test_qemu(self):
- """Test wic-image-minimal under qemu"""
- self.assertEqual(0, bitbake('wic-image-minimal').status)
-
- with runqemu('wic-image-minimal', ssh=False) as qemu:
- command = "mount |grep '^/dev/' | cut -f1,3 -d ' '"
- status, output = qemu.run_serial(command)
- self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
- self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
-
- def test_bmap(self):
- """Test generation of .bmap file"""
- image = "directdisk"
- status = runCmd("wic create %s -e core-image-minimal --bmap" % image).status
- self.assertEqual(0, status)
- self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
- self.assertEqual(1, len(glob(self.resultdir + "%s-*direct.bmap" % image)))
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 24669f461d..0b2915d5cc 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -1,6 +1,8 @@
+#
# Copyright (C) 2013 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# This module is used by testimage.bbclass for setting up and controlling a target machine.
@@ -18,42 +20,18 @@ from oeqa.utils.dump import TargetDumper
from oeqa.controllers.testtargetloader import TestTargetLoader
from abc import ABCMeta, abstractmethod
-def get_target_controller(d):
- testtarget = d.getVar("TEST_TARGET", True)
- # old, simple names
- if testtarget == "qemu":
- return QemuTarget(d)
- elif testtarget == "simpleremote":
- return SimpleRemoteTarget(d)
- else:
- # use the class name
- try:
- # is it a core class defined here?
- controller = getattr(sys.modules[__name__], testtarget)
- except AttributeError:
- # nope, perhaps a layer defined one
- try:
- bbpath = d.getVar("BBPATH", True).split(':')
- testtargetloader = TestTargetLoader()
- controller = testtargetloader.get_controller_module(testtarget, bbpath)
- except ImportError as e:
- bb.fatal("Failed to import {0} from available controller modules:\n{1}".format(testtarget,traceback.format_exc()))
- except AttributeError as e:
- bb.fatal("Invalid TEST_TARGET - " + str(e))
- return controller(d)
-
-
class BaseTarget(object, metaclass=ABCMeta):
supported_image_fstypes = []
- def __init__(self, d):
+ def __init__(self, d, logger):
self.connection = None
self.ip = None
self.server_ip = None
- self.datetime = d.getVar('DATETIME', True)
- self.testdir = d.getVar("TEST_LOG_DIR", True)
- self.pn = d.getVar("PN", True)
+ self.datetime = d.getVar('DATETIME')
+ self.testdir = d.getVar("TEST_LOG_DIR")
+ self.pn = d.getVar("PN")
+ self.logger = logger
@abstractmethod
def deploy(self):
@@ -63,7 +41,7 @@ class BaseTarget(object, metaclass=ABCMeta):
if os.path.islink(sshloglink):
os.unlink(sshloglink)
os.symlink(self.sshlog, sshloglink)
- bb.note("SSH log file: %s" % self.sshlog)
+ self.logger.info("SSH log file: %s" % self.sshlog)
@abstractmethod
def start(self, params=None, ssh=True, extra_bootparams=None):
@@ -80,7 +58,7 @@ class BaseTarget(object, metaclass=ABCMeta):
@classmethod
def match_image_fstype(self, d, image_fstypes=None):
if not image_fstypes:
- image_fstypes = d.getVar('IMAGE_FSTYPES', True).split(' ')
+ image_fstypes = d.getVar('IMAGE_FSTYPES').split(' ')
possible_image_fstypes = [fstype for fstype in self.supported_image_fstypes if fstype in image_fstypes]
if possible_image_fstypes:
return possible_image_fstypes[0]
@@ -113,54 +91,60 @@ class QemuTarget(BaseTarget):
supported_image_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
- def __init__(self, d):
+ def __init__(self, d, logger, image_fstype=None):
+
+ import oe.types
- super(QemuTarget, self).__init__(d)
+ super(QemuTarget, self).__init__(d, logger)
- self.image_fstype = self.get_image_fstype(d)
+ self.rootfs = ''
+ self.kernel = ''
+ self.image_fstype = ''
+
+ if d.getVar('FIND_ROOTFS') == '1':
+ self.image_fstype = image_fstype or self.get_image_fstype(d)
+ self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("IMAGE_LINK_NAME") + '.' + self.image_fstype)
+ self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime)
- self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
- self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
- dump_target_cmds = d.getVar("testimage_dump_target", True)
- dump_host_cmds = d.getVar("testimage_dump_host", True)
- dump_dir = d.getVar("TESTIMAGE_DUMP_DIR", True)
- if d.getVar("QEMU_USE_KVM", False) is not None \
- and d.getVar("QEMU_USE_KVM", False) == "True" \
- and "x86" in d.getVar("MACHINE", True):
- use_kvm = True
- else:
- use_kvm = False
+ dump_target_cmds = d.getVar("testimage_dump_target")
+ dump_host_cmds = d.getVar("testimage_dump_host")
+ dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
+ if not dump_dir:
+ dump_dir = os.path.join(d.getVar('LOG_DIR'), 'runtime-hostdump')
+ use_kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
# Log QemuRunner log output to a file
import oe.path
bb.utils.mkdirhier(self.testdir)
self.qemurunnerlog = os.path.join(self.testdir, 'qemurunner_log.%s' % self.datetime)
- logger = logging.getLogger('BitBake.QemuRunner')
loggerhandler = logging.FileHandler(self.qemurunnerlog)
loggerhandler.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
- logger.addHandler(loggerhandler)
+ self.logger.addHandler(loggerhandler)
oe.path.symlink(os.path.basename(self.qemurunnerlog), os.path.join(self.testdir, 'qemurunner_log'), force=True)
- if d.getVar("DISTRO", True) == "poky-tiny":
- self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True),
+ if d.getVar("DISTRO") == "poky-tiny":
+ self.runner = QemuTinyRunner(machine=d.getVar("MACHINE"),
rootfs=self.rootfs,
- tmpdir = d.getVar("TMPDIR", True),
- deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True),
- display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True),
+ tmpdir = d.getVar("TMPDIR"),
+ deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE"),
+ display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY"),
logfile = self.qemulog,
kernel = self.kernel,
- boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)))
+ boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT")),
+ logger = logger)
else:
- self.runner = QemuRunner(machine=d.getVar("MACHINE", True),
+ self.runner = QemuRunner(machine=d.getVar("MACHINE"),
rootfs=self.rootfs,
- tmpdir = d.getVar("TMPDIR", True),
- deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True),
- display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True),
+ tmpdir = d.getVar("TMPDIR"),
+ deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE"),
+ display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY"),
logfile = self.qemulog,
- boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)),
+ boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT")),
use_kvm = use_kvm,
dump_dir = dump_dir,
- dump_host_cmds = d.getVar("testimage_dump_host", True))
+ dump_host_cmds = d.getVar("testimage_dump_host"),
+ logger = logger,
+ serial_ports = len(d.getVar("SERIAL_CONSOLES").split()))
self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner)
@@ -172,12 +156,17 @@ class QemuTarget(BaseTarget):
os.unlink(qemuloglink)
os.symlink(self.qemulog, qemuloglink)
- bb.note("rootfs file: %s" % self.rootfs)
- bb.note("Qemu log file: %s" % self.qemulog)
+ self.logger.info("rootfs file: %s" % self.rootfs)
+ self.logger.info("Qemu log file: %s" % self.qemulog)
super(QemuTarget, self).deploy()
- def start(self, params=None, ssh=True, extra_bootparams=None):
- if self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams):
+ def start(self, params=None, ssh=True, extra_bootparams='', runqemuparams='', launch_cmd='', discard_writes=True):
+ if launch_cmd:
+ start = self.runner.launch(get_ip=ssh, launch_cmd=launch_cmd, qemuparams=params)
+ else:
+ start = self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams, discard_writes=discard_writes)
+
+ if start:
if ssh:
self.ip = self.runner.ip
self.server_ip = self.runner.server_ip
@@ -187,7 +176,7 @@ class QemuTarget(BaseTarget):
if os.path.exists(self.qemulog):
with open(self.qemulog, 'r') as f:
bb.error("Qemu log output from %s:\n%s" % (self.qemulog, f.read()))
- raise bb.build.FuncFailed("%s - FAILED to start qemu - check the task log and the boot log" % self.pn)
+ raise RuntimeError("%s - FAILED to start qemu - check the task log and the boot log" % self.pn)
def check(self):
return self.runner.is_alive()
@@ -204,30 +193,30 @@ class QemuTarget(BaseTarget):
self.server_ip = self.runner.server_ip
self.connection = SSHControl(ip=self.ip, logfile=self.sshlog)
else:
- raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn)
+ raise RuntimError("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn)
- def run_serial(self, command):
- return self.runner.run_serial(command)
+ def run_serial(self, command, timeout=60):
+ return self.runner.run_serial(command, timeout=timeout)
class SimpleRemoteTarget(BaseTarget):
def __init__(self, d):
super(SimpleRemoteTarget, self).__init__(d)
- addr = d.getVar("TEST_TARGET_IP", True) or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.')
+ addr = d.getVar("TEST_TARGET_IP") or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.')
self.ip = addr.split(":")[0]
try:
self.port = addr.split(":")[1]
except IndexError:
self.port = None
- bb.note("Target IP: %s" % self.ip)
- self.server_ip = d.getVar("TEST_SERVER_IP", True)
+ self.logger.info("Target IP: %s" % self.ip)
+ self.server_ip = d.getVar("TEST_SERVER_IP")
if not self.server_ip:
try:
self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1]
except Exception as e:
bb.fatal("Failed to determine the host IP address (alternatively you can set TEST_SERVER_IP with the IP address of this machine): %s" % e)
- bb.note("Server IP: %s" % self.server_ip)
+ self.logger.info("Server IP: %s" % self.server_ip)
def deploy(self):
super(SimpleRemoteTarget, self).deploy()
diff --git a/meta/lib/oeqa/utils/__init__.py b/meta/lib/oeqa/utils/__init__.py
index 8f706f3637..70fbe7b552 100644
--- a/meta/lib/oeqa/utils/__init__.py
+++ b/meta/lib/oeqa/utils/__init__.py
@@ -1,8 +1,10 @@
+#
+# SPDX-License-Identifier: MIT
+#
# Enable other layers to have modules in the same named directory
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
-
# Borrowed from CalledProcessError
class CommandError(Exception):
@@ -36,3 +38,69 @@ def avoid_paths_in_environ(paths):
new_path = new_path[:-1]
return new_path
+
+def make_logger_bitbake_compatible(logger):
+ import logging
+
+ """
+ Bitbake logger redifines debug() in order to
+ set a level within debug, this breaks compatibility
+ with vainilla logging, so we neeed to redifine debug()
+ method again also add info() method with INFO + 1 level.
+ """
+ def _bitbake_log_debug(*args, **kwargs):
+ lvl = logging.DEBUG
+
+ if isinstance(args[0], int):
+ lvl = args[0]
+ msg = args[1]
+ args = args[2:]
+ else:
+ msg = args[0]
+ args = args[1:]
+
+ logger.log(lvl, msg, *args, **kwargs)
+
+ def _bitbake_log_info(msg, *args, **kwargs):
+ logger.log(logging.INFO + 1, msg, *args, **kwargs)
+
+ logger.debug = _bitbake_log_debug
+ logger.info = _bitbake_log_info
+
+ return logger
+
+def load_test_components(logger, executor):
+ import sys
+ import os
+ import importlib
+
+ from oeqa.core.context import OETestContextExecutor
+
+ components = {}
+
+ for path in sys.path:
+ base_dir = os.path.join(path, 'oeqa')
+ if os.path.exists(base_dir) and os.path.isdir(base_dir):
+ for file in os.listdir(base_dir):
+ comp_name = file
+ comp_context = os.path.join(base_dir, file, 'context.py')
+ if os.path.exists(comp_context):
+ comp_plugin = importlib.import_module('oeqa.%s.%s' % \
+ (comp_name, 'context'))
+ try:
+ if not issubclass(comp_plugin._executor_class,
+ OETestContextExecutor):
+ raise TypeError("Component %s in %s, _executor_class "\
+ "isn't derived from OETestContextExecutor."\
+ % (comp_name, comp_context))
+
+ if comp_plugin._executor_class._script_executor \
+ != executor:
+ continue
+
+ components[comp_name] = comp_plugin._executor_class()
+ except AttributeError:
+ raise AttributeError("Component %s in %s don't have "\
+ "_executor_class defined." % (comp_name, comp_context))
+
+ return components
diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py
new file mode 100644
index 0000000000..e6d80cc8dc
--- /dev/null
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+# Provides a class for automating build tests for projects
+
+import os
+import re
+import subprocess
+import shutil
+import tempfile
+
+from abc import ABCMeta, abstractmethod
+
+class BuildProject(metaclass=ABCMeta):
+ def __init__(self, uri, foldername=None, tmpdir=None, dl_dir=None):
+ self.uri = uri
+ self.archive = os.path.basename(uri)
+ if not tmpdir:
+ self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-')
+ tmpdir = self.tempdirobj.name
+ self.localarchive = os.path.join(tmpdir, self.archive)
+ self.dl_dir = dl_dir
+ if foldername:
+ self.fname = foldername
+ else:
+ self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive)
+ self.needclean = False
+
+ # Download self.archive to self.localarchive
+ def _download_archive(self):
+
+ self.needclean = True
+ if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, self.archive)):
+ shutil.copyfile(os.path.join(self.dl_dir, self.archive), self.localarchive)
+ return
+
+ cmd = "wget -O %s %s" % (self.localarchive, self.uri)
+ subprocess.check_output(cmd, shell=True)
+
+ # This method should provide a way to run a command in the desired environment.
+ @abstractmethod
+ def _run(self, cmd):
+ pass
+
+ # The timeout parameter of target.run is set to 0 to make the ssh command
+ # run with no timeout.
+ def run_configure(self, configure_args='', extra_cmds=''):
+ return self._run('cd %s; gnu-configize; %s ./configure %s' % (self.targetdir, extra_cmds, configure_args))
+
+ def run_make(self, make_args=''):
+ return self._run('cd %s; make %s' % (self.targetdir, make_args))
+
+ def run_install(self, install_args=''):
+ return self._run('cd %s; make install %s' % (self.targetdir, install_args))
+
+ def clean(self):
+ if not self.needclean:
+ return
+ self._run('rm -rf %s' % self.targetdir)
+ subprocess.check_call('rm -f %s' % self.localarchive, shell=True)
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 5cd0f7477b..dc1e286dac 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -1,6 +1,8 @@
+#
# Copyright (c) 2013-2014 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# DESCRIPTION
# This module is mainly used by scripts/oe-selftest and modules under meta/oeqa/selftest
@@ -13,6 +15,7 @@ import sys
import signal
import subprocess
import threading
+import time
import logging
from oeqa.utils import CommandError
from oeqa.utils import ftools
@@ -25,7 +28,7 @@ except ImportError:
pass
class Command(object):
- def __init__(self, command, bg=False, timeout=None, data=None, **options):
+ def __init__(self, command, bg=False, timeout=None, data=None, output_log=None, **options):
self.defaultopts = {
"stdout": subprocess.PIPE,
@@ -48,41 +51,106 @@ class Command(object):
self.options.update(options)
self.status = None
+ # We collect chunks of output before joining them at the end.
+ self._output_chunks = []
+ self._error_chunks = []
self.output = None
self.error = None
- self.thread = None
+ self.threads = []
+ self.output_log = output_log
self.log = logging.getLogger("utils.commands")
def run(self):
self.process = subprocess.Popen(self.cmd, **self.options)
- def commThread():
- self.output, self.error = self.process.communicate(self.data)
-
- self.thread = threading.Thread(target=commThread)
- self.thread.start()
+ def readThread(output, stream, logfunc):
+ if logfunc:
+ for line in stream:
+ output.append(line)
+ logfunc(line.decode("utf-8", errors='replace').rstrip())
+ else:
+ output.append(stream.read())
+
+ def readStderrThread():
+ readThread(self._error_chunks, self.process.stderr, self.output_log.error if self.output_log else None)
+
+ def readStdoutThread():
+ readThread(self._output_chunks, self.process.stdout, self.output_log.info if self.output_log else None)
+
+ def writeThread():
+ try:
+ self.process.stdin.write(self.data)
+ self.process.stdin.close()
+ except OSError as ex:
+ # It's not an error when the command does not consume all
+ # of our data. subprocess.communicate() also ignores that.
+ if ex.errno != EPIPE:
+ raise
+
+ # We write in a separate thread because then we can read
+ # without worrying about deadlocks. The additional thread is
+ # expected to terminate by itself and we mark it as a daemon,
+ # so even it should happen to not terminate for whatever
+ # reason, the main process will still exit, which will then
+ # kill the write thread.
+ if self.data:
+ threading.Thread(target=writeThread, daemon=True).start()
+ if self.process.stderr:
+ thread = threading.Thread(target=readStderrThread)
+ thread.start()
+ self.threads.append(thread)
+ if self.output_log:
+ self.output_log.info('Running: %s' % self.cmd)
+ thread = threading.Thread(target=readStdoutThread)
+ thread.start()
+ self.threads.append(thread)
self.log.debug("Running command '%s'" % self.cmd)
if not self.bg:
- self.thread.join(self.timeout)
+ if self.timeout is None:
+ for thread in self.threads:
+ thread.join()
+ else:
+ deadline = time.time() + self.timeout
+ for thread in self.threads:
+ timeout = deadline - time.time()
+ if timeout < 0:
+ timeout = 0
+ thread.join(timeout)
self.stop()
def stop(self):
- if self.thread.isAlive():
- self.process.terminate()
+ for thread in self.threads:
+ if thread.isAlive():
+ self.process.terminate()
# let's give it more time to terminate gracefully before killing it
- self.thread.join(5)
- if self.thread.isAlive():
+ thread.join(5)
+ if thread.isAlive():
self.process.kill()
- self.thread.join()
+ thread.join()
- if not self.output:
- self.output = ""
- else:
- self.output = self.output.decode("utf-8", errors='replace').rstrip()
- self.status = self.process.poll()
+ def finalize_output(data):
+ if not data:
+ data = ""
+ else:
+ data = b"".join(data)
+ data = data.decode("utf-8", errors='replace').rstrip()
+ return data
+
+ self.output = finalize_output(self._output_chunks)
+ self._output_chunks = None
+ # self.error used to be a byte string earlier, probably unintentionally.
+ # Now it is a normal string, just like self.output.
+ self.error = finalize_output(self._error_chunks)
+ self._error_chunks = None
+ # At this point we know that the process has closed stdout/stderr, so
+ # it is safe and necessary to wait for the actual process completion.
+ self.status = self.process.wait()
+ self.process.stdout.close()
+ if self.process.stderr:
+ self.process.stderr.close()
self.log.debug("Command '%s' returned %d as exit code." % (self.cmd, self.status))
# logging the complete output is insane
@@ -97,10 +165,21 @@ class Result(object):
pass
-def runCmd(command, ignore_status=False, timeout=None, assert_error=True, **options):
+def runCmd(command, ignore_status=False, timeout=None, assert_error=True,
+ native_sysroot=None, limit_exc_output=0, output_log=None, **options):
result = Result()
- cmd = Command(command, timeout=timeout, **options)
+ if native_sysroot:
+ extra_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \
+ (native_sysroot, native_sysroot, native_sysroot)
+ extra_libpaths = "%s/lib:%s/usr/lib" % \
+ (native_sysroot, native_sysroot)
+ nenv = dict(options.get('env', os.environ))
+ nenv['PATH'] = extra_paths + ':' + nenv.get('PATH', '')
+ nenv['LD_LIBRARY_PATH'] = extra_libpaths + ':' + nenv.get('LD_LIBRARY_PATH', '')
+ options['env'] = nenv
+
+ cmd = Command(command, timeout=timeout, output_log=output_log, **options)
cmd.run()
result.command = command
@@ -110,15 +189,21 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, **opti
result.pid = cmd.process.pid
if result.status and not ignore_status:
+ exc_output = result.output
+ if limit_exc_output > 0:
+ split = result.output.splitlines()
+ if len(split) > limit_exc_output:
+ exc_output = "\n... (last %d lines of output)\n" % limit_exc_output + \
+ '\n'.join(split[-limit_exc_output:])
if assert_error:
- raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, result.output))
+ raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output))
else:
- raise CommandError(result.status, command, result.output)
+ raise CommandError(result.status, command, exc_output)
return result
-def bitbake(command, ignore_status=False, timeout=None, postconfig=None, **options):
+def bitbake(command, ignore_status=False, timeout=None, postconfig=None, output_log=None, **options):
if postconfig:
postconfig_file = os.path.join(os.environ.get('BUILDDIR'), 'oeqa-post.conf')
@@ -133,7 +218,7 @@ def bitbake(command, ignore_status=False, timeout=None, postconfig=None, **optio
cmd = [ "bitbake" ] + [a for a in (command + extra_args.split(" ")) if a not in [""]]
try:
- return runCmd(cmd, ignore_status, timeout, **options)
+ return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)
finally:
if postconfig:
os.remove(postconfig_file)
@@ -149,7 +234,9 @@ def get_bb_vars(variables=None, target=None, postconfig=None):
"""Get values of multiple bitbake variables"""
bbenv = get_bb_env(target, postconfig=postconfig)
- var_re = re.compile(r'^(export )?(?P<var>\w+)="(?P<value>.*)"$')
+ if variables is not None:
+ variables = list(variables)
+ var_re = re.compile(r'^(export )?(?P<var>\w+(_.*)?)="(?P<value>.*)"$')
unset_re = re.compile(r'^unset (?P<var>\w+)$')
lastline = None
values = {}
@@ -206,60 +293,64 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec=
f.write('BBFILE_PATTERN_%s = "^${LAYERDIR}/"\n' % templayername)
f.write('BBFILE_PRIORITY_%s = "%d"\n' % (templayername, priority))
f.write('BBFILE_PATTERN_IGNORE_EMPTY_%s = "1"\n' % templayername)
-
+ f.write('LAYERSERIES_COMPAT_%s = "${LAYERSERIES_COMPAT_core}"\n' % templayername)
@contextlib.contextmanager
-def runqemu(pn, ssh=True):
+def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True):
+ """
+ launch_cmd means directly run the command, don't need set rootfs or env vars.
+ """
import bb.tinfoil
import bb.build
+ # Need a non-'BitBake' logger to capture the runner output
+ targetlogger = logging.getLogger('TargetRunner')
+ targetlogger.setLevel(logging.DEBUG)
+ handler = logging.StreamHandler(sys.stdout)
+ targetlogger.addHandler(handler)
+
tinfoil = bb.tinfoil.Tinfoil()
- tinfoil.prepare(False)
+ tinfoil.prepare(config_only=False, quiet=True)
try:
tinfoil.logger.setLevel(logging.WARNING)
import oeqa.targetcontrol
tinfoil.config_data.setVar("TEST_LOG_DIR", "${WORKDIR}/testimage")
tinfoil.config_data.setVar("TEST_QEMUBOOT_TIMEOUT", "1000")
- import oe.recipeutils
- recipefile = oe.recipeutils.pn_to_recipe(tinfoil.cooker, pn)
- recipedata = oe.recipeutils.parse_recipe(tinfoil.cooker, recipefile, [])
-
- # The QemuRunner log is saved out, but we need to ensure it is at the right
- # log level (and then ensure that since it's a child of the BitBake logger,
- # we disable propagation so we don't then see the log events on the console)
- logger = logging.getLogger('BitBake.QemuRunner')
- logger.setLevel(logging.DEBUG)
- logger.propagate = False
- logdir = recipedata.getVar("TEST_LOG_DIR", True)
-
- qemu = oeqa.targetcontrol.QemuTarget(recipedata)
+ # Tell QemuTarget() whether need find rootfs/kernel or not
+ if launch_cmd:
+ tinfoil.config_data.setVar("FIND_ROOTFS", '0')
+ else:
+ tinfoil.config_data.setVar("FIND_ROOTFS", '1')
+
+ recipedata = tinfoil.parse_recipe(pn)
+ for key, value in overrides.items():
+ recipedata.setVar(key, value)
+
+ logdir = recipedata.getVar("TEST_LOG_DIR")
+
+ qemu = oeqa.targetcontrol.QemuTarget(recipedata, targetlogger, image_fstype)
finally:
# We need to shut down tinfoil early here in case we actually want
# to run tinfoil-using utilities with the running QEMU instance.
# Luckily QemuTarget doesn't need it after the constructor.
tinfoil.shutdown()
- # Setup bitbake logger as console handler is removed by tinfoil.shutdown
- bblogger = logging.getLogger('BitBake')
- bblogger.setLevel(logging.INFO)
- console = logging.StreamHandler(sys.stdout)
- bbformat = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
- if sys.stdout.isatty():
- bbformat.enable_color()
- console.setFormatter(bbformat)
- bblogger.addHandler(console)
-
try:
qemu.deploy()
try:
- qemu.start(ssh=ssh)
- except bb.build.FuncFailed:
- raise Exception('Failed to start QEMU - see the logs in %s' % logdir)
+ qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes)
+ except Exception as e:
+ msg = str(e) + '\nFailed to start QEMU - see the logs in %s' % logdir
+ if os.path.exists(qemu.qemurunnerlog):
+ with open(qemu.qemurunnerlog, 'r') as f:
+ msg = msg + "Qemurunner log output from %s:\n%s" % (qemu.qemurunnerlog, f.read())
+ raise Exception(msg)
yield qemu
finally:
+ targetlogger.removeHandler(handler)
try:
qemu.stop()
except:
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 25f9c54e6b..aabf4110cb 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -1,6 +1,8 @@
+#
# Copyright (C) 2013 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# Some custom decorators that can be used by unittests
# Most useful is skipUnlessPassed which can be used for
@@ -172,18 +174,19 @@ def LogResults(original_class):
#check status of tests and record it
+ tcid = self.id()
for (name, msg) in result.errors:
- if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]):
+ if tcid == name.id():
local_log.results("Testcase "+str(test_case)+": ERROR")
local_log.results("Testcase "+str(test_case)+":\n"+msg)
passed = False
for (name, msg) in result.failures:
- if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]):
+ if tcid == name.id():
local_log.results("Testcase "+str(test_case)+": FAILED")
local_log.results("Testcase "+str(test_case)+":\n"+msg)
passed = False
for (name, msg) in result.skipped:
- if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]):
+ if tcid == name.id():
local_log.results("Testcase "+str(test_case)+": SKIPPED")
passed = False
if passed:
diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py
index 71422a9aea..09a44329e0 100644
--- a/meta/lib/oeqa/utils/dump.py
+++ b/meta/lib/oeqa/utils/dump.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
import os
import sys
import errno
@@ -5,12 +9,6 @@ import datetime
import itertools
from .commands import runCmd
-def get_host_dumper(d):
- cmds = d.getVar("testimage_dump_host", True)
- parent_dir = d.getVar("TESTIMAGE_DUMP_DIR", True)
- return HostDumper(cmds, parent_dir)
-
-
class BaseDumper(object):
""" Base class to dump commands from host/target """
@@ -18,7 +16,7 @@ class BaseDumper(object):
self.cmds = []
# Some testing doesn't inherit testimage, so it is needed
# to set some defaults.
- self.parent_dir = parent_dir or "/tmp/oe-saved-tests"
+ self.parent_dir = parent_dir
dft_cmds = """ top -bn1
iostat -x -z -N -d -p ALL 20 2
ps -ef
@@ -73,17 +71,19 @@ class HostDumper(BaseDumper):
def dump_host(self, dump_dir=""):
if dump_dir:
self.dump_dir = dump_dir
+ env = os.environ.copy()
+ env['PATH'] = '/usr/sbin:/sbin:/usr/bin:/bin'
+ env['COLUMNS'] = '9999'
for cmd in self.cmds:
- result = runCmd(cmd, ignore_status=True)
+ result = runCmd(cmd, ignore_status=True, env=env)
self._write_dump(cmd.split()[0], result.output)
-
class TargetDumper(BaseDumper):
""" Class to get dumps from target, it only works with QemuRunner """
- def __init__(self, cmds, parent_dir, qemurunner):
+ def __init__(self, cmds, parent_dir, runner):
super(TargetDumper, self).__init__(cmds, parent_dir)
- self.runner = qemurunner
+ self.runner = runner
def dump_target(self, dump_dir=""):
if dump_dir:
diff --git a/meta/lib/oeqa/utils/ftools.py b/meta/lib/oeqa/utils/ftools.py
index a7233d4ca6..3093419cc7 100644
--- a/meta/lib/oeqa/utils/ftools.py
+++ b/meta/lib/oeqa/utils/ftools.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
import os
import re
import errno
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py
index ae85d27663..ea35a766eb 100644
--- a/meta/lib/oeqa/utils/git.py
+++ b/meta/lib/oeqa/utils/git.py
@@ -1,7 +1,7 @@
#
# Copyright (C) 2016 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
#
"""Git repository interactions"""
import os
@@ -16,8 +16,17 @@ class GitError(Exception):
class GitRepo(object):
"""Class representing a Git repository clone"""
def __init__(self, path, is_topdir=False):
- self.top_dir = self._run_git_cmd_at(['rev-parse', '--show-toplevel'],
- path)
+ git_dir = self._run_git_cmd_at(['rev-parse', '--git-dir'], path)
+ git_dir = git_dir if os.path.isabs(git_dir) else os.path.join(path, git_dir)
+ self.git_dir = os.path.realpath(git_dir)
+
+ if self._run_git_cmd_at(['rev-parse', '--is-bare-repository'], path) == 'true':
+ self.bare = True
+ self.top_dir = self.git_dir
+ else:
+ self.bare = False
+ self.top_dir = self._run_git_cmd_at(['rev-parse', '--show-toplevel'],
+ path)
realpath = os.path.realpath(path)
if is_topdir and realpath != self.top_dir:
raise GitError("{} is not a Git top directory".format(realpath))
@@ -36,9 +45,12 @@ class GitRepo(object):
return ret.output.strip()
@staticmethod
- def init(path):
+ def init(path, bare=False):
"""Initialize a new Git repository"""
- GitRepo._run_git_cmd_at('init', cwd=path)
+ cmd = ['init']
+ if bare:
+ cmd.append('--bare')
+ GitRepo._run_git_cmd_at(cmd, cwd=path)
return GitRepo(path, is_topdir=True)
def run_cmd(self, git_args, env_update=None):
@@ -52,7 +64,7 @@ class GitRepo(object):
def rev_parse(self, revision):
"""Do git rev-parse"""
try:
- return self.run_cmd(['rev-parse', revision])
+ return self.run_cmd(['rev-parse', '--verify', revision])
except GitError:
# Revision does not exist
return None
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
new file mode 100644
index 0000000000..6e8040eb5c
--- /dev/null
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -0,0 +1,237 @@
+#
+# Helper functions for committing data to git and pushing upstream
+#
+# Copyright (c) 2017, Intel Corporation.
+# Copyright (c) 2019, Linux Foundation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os
+import re
+import sys
+from operator import attrgetter
+from collections import namedtuple
+from oeqa.utils.git import GitRepo, GitError
+
+class ArchiveError(Exception):
+ """Internal error handling of this script"""
+
+def format_str(string, fields):
+ """Format string using the given fields (dict)"""
+ try:
+ return string.format(**fields)
+ except KeyError as err:
+ raise ArchiveError("Unable to expand string '{}': unknown field {} "
+ "(valid fields are: {})".format(
+ string, err, ', '.join(sorted(fields.keys()))))
+
+
+def init_git_repo(path, no_create, bare, log):
+ """Initialize local Git repository"""
+ path = os.path.abspath(path)
+ if os.path.isfile(path):
+ raise ArchiveError("Invalid Git repo at {}: path exists but is not a "
+ "directory".format(path))
+ if not os.path.isdir(path) or not os.listdir(path):
+ if no_create:
+ raise ArchiveError("No git repo at {}, refusing to create "
+ "one".format(path))
+ if not os.path.isdir(path):
+ try:
+ os.mkdir(path)
+ except (FileNotFoundError, PermissionError) as err:
+ raise ArchiveError("Failed to mkdir {}: {}".format(path, err))
+ if not os.listdir(path):
+ log.info("Initializing a new Git repo at %s", path)
+ repo = GitRepo.init(path, bare)
+ try:
+ repo = GitRepo(path, is_topdir=True)
+ except GitError:
+ raise ArchiveError("Non-empty directory that is not a Git repository "
+ "at {}\nPlease specify an existing Git repository, "
+ "an empty directory or a non-existing directory "
+ "path.".format(path))
+ return repo
+
+
+def git_commit_data(repo, data_dir, branch, message, exclude, notes, log):
+ """Commit data into a Git repository"""
+ log.info("Committing data into to branch %s", branch)
+ tmp_index = os.path.join(repo.git_dir, 'index.oe-git-archive')
+ try:
+ # Create new tree object from the data
+ env_update = {'GIT_INDEX_FILE': tmp_index,
+ 'GIT_WORK_TREE': os.path.abspath(data_dir)}
+ repo.run_cmd('add .', env_update)
+
+ # Remove files that are excluded
+ if exclude:
+ repo.run_cmd(['rm', '--cached'] + [f for f in exclude], env_update)
+
+ tree = repo.run_cmd('write-tree', env_update)
+
+ # Create new commit object from the tree
+ parent = repo.rev_parse(branch)
+ if not parent:
+ parent = repo.rev_parse("origin/" + branch)
+ git_cmd = ['commit-tree', tree, '-m', message]
+ if parent:
+ git_cmd += ['-p', parent]
+ commit = repo.run_cmd(git_cmd, env_update)
+
+ # Create git notes
+ for ref, filename in notes:
+ ref = ref.format(branch_name=branch)
+ repo.run_cmd(['notes', '--ref', ref, 'add',
+ '-F', os.path.abspath(filename), commit])
+
+ # Update branch head
+ git_cmd = ['update-ref', 'refs/heads/' + branch, commit]
+ repo.run_cmd(git_cmd)
+
+ # Update current HEAD, if we're on branch 'branch'
+ if not repo.bare and repo.get_current_branch() == branch:
+ log.info("Updating %s HEAD to latest commit", repo.top_dir)
+ repo.run_cmd('reset --hard')
+
+ return commit
+ finally:
+ if os.path.exists(tmp_index):
+ os.unlink(tmp_index)
+
+
+def expand_tag_strings(repo, name_pattern, msg_subj_pattern, msg_body_pattern,
+ keywords):
+ """Generate tag name and message, with support for running id number"""
+ keyws = keywords.copy()
+ # Tag number is handled specially: if not defined, we autoincrement it
+ if 'tag_number' not in keyws:
+ # Fill in all other fields than 'tag_number'
+ keyws['tag_number'] = '{tag_number}'
+ tag_re = format_str(name_pattern, keyws)
+ # Replace parentheses for proper regex matching
+ tag_re = tag_re.replace('(', '\(').replace(')', '\)') + '$'
+ # Inject regex group pattern for 'tag_number'
+ tag_re = tag_re.format(tag_number='(?P<tag_number>[0-9]{1,5})')
+
+ keyws['tag_number'] = 0
+ for existing_tag in repo.run_cmd('tag').splitlines():
+ match = re.match(tag_re, existing_tag)
+
+ if match and int(match.group('tag_number')) >= keyws['tag_number']:
+ keyws['tag_number'] = int(match.group('tag_number')) + 1
+
+ tag_name = format_str(name_pattern, keyws)
+ msg_subj= format_str(msg_subj_pattern.strip(), keyws)
+ msg_body = format_str(msg_body_pattern, keyws)
+ return tag_name, msg_subj + '\n\n' + msg_body
+
+def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_msg_body, branch_name, no_tag, tagname, tag_msg_subject, tag_msg_body, exclude, notes, push, keywords, log):
+
+ if not os.path.isdir(data_dir):
+ raise ArchiveError("Not a directory: {}".format(data_dir))
+
+ data_repo = init_git_repo(git_dir, no_create, bare, log)
+
+ # Expand strings early in order to avoid getting into inconsistent
+ # state (e.g. no tag even if data was committed)
+ commit_msg = format_str(commit_msg_subject.strip(), keywords)
+ commit_msg += '\n\n' + format_str(commit_msg_body, keywords)
+ branch_name = format_str(branch_name, keywords)
+ tag_name = None
+ if not no_tag and tagname:
+ tag_name, tag_msg = expand_tag_strings(data_repo, tagname,
+ tag_msg_subject,
+ tag_msg_body, keywords)
+
+ # Commit data
+ commit = git_commit_data(data_repo, data_dir, branch_name,
+ commit_msg, exclude, notes, log)
+
+ # Create tag
+ if tag_name:
+ log.info("Creating tag %s", tag_name)
+ data_repo.run_cmd(['tag', '-a', '-m', tag_msg, tag_name, commit])
+
+ # Push data to remote
+ if push:
+ cmd = ['push', '--tags']
+ # If no remote is given we push with the default settings from
+ # gitconfig
+ if push is not True:
+ notes_refs = ['refs/notes/' + ref.format(branch_name=branch_name)
+ for ref, _ in notes]
+ cmd.extend([push, branch_name] + notes_refs)
+ log.info("Pushing data to remote")
+ data_repo.run_cmd(cmd)
+
+# Container class for tester revisions
+TestedRev = namedtuple('TestedRev', 'commit commit_number tags')
+
+def get_test_runs(log, repo, tag_name, **kwargs):
+ """Get a sorted list of test runs, matching given pattern"""
+ # First, get field names from the tag name pattern
+ field_names = [m.group(1) for m in re.finditer(r'{(\w+)}', tag_name)]
+ undef_fields = [f for f in field_names if f not in kwargs.keys()]
+
+ # Fields for formatting tag name pattern
+ str_fields = dict([(f, '*') for f in field_names])
+ str_fields.update(kwargs)
+
+ # Get a list of all matching tags
+ tag_pattern = tag_name.format(**str_fields)
+ tags = repo.run_cmd(['tag', '-l', tag_pattern]).splitlines()
+ log.debug("Found %d tags matching pattern '%s'", len(tags), tag_pattern)
+
+ # Parse undefined fields from tag names
+ str_fields = dict([(f, r'(?P<{}>[\w\-.()]+)'.format(f)) for f in field_names])
+ str_fields['branch'] = r'(?P<branch>[\w\-.()/]+)'
+ str_fields['commit'] = '(?P<commit>[0-9a-f]{7,40})'
+ str_fields['commit_number'] = '(?P<commit_number>[0-9]{1,7})'
+ str_fields['tag_number'] = '(?P<tag_number>[0-9]{1,5})'
+ # escape parenthesis in fields in order to not messa up the regexp
+ fixed_fields = dict([(k, v.replace('(', r'\(').replace(')', r'\)')) for k, v in kwargs.items()])
+ str_fields.update(fixed_fields)
+ tag_re = re.compile(tag_name.format(**str_fields))
+
+ # Parse fields from tags
+ revs = []
+ for tag in tags:
+ m = tag_re.match(tag)
+ groups = m.groupdict()
+ revs.append([groups[f] for f in undef_fields] + [tag])
+
+ # Return field names and a sorted list of revs
+ return undef_fields, sorted(revs)
+
+def get_test_revs(log, repo, tag_name, **kwargs):
+ """Get list of all tested revisions"""
+ fields, runs = get_test_runs(log, repo, tag_name, **kwargs)
+
+ revs = {}
+ commit_i = fields.index('commit')
+ commit_num_i = fields.index('commit_number')
+ for run in runs:
+ commit = run[commit_i]
+ commit_num = run[commit_num_i]
+ tag = run[-1]
+ if not commit in revs:
+ revs[commit] = TestedRev(commit, commit_num, [tag])
+ else:
+ assert commit_num == revs[commit].commit_number, "Commit numbers do not match"
+ revs[commit].tags.append(tag)
+
+ # Return in sorted table
+ revs = sorted(revs.values(), key=attrgetter('commit_number'))
+ log.debug("Found %d tested revisions:\n %s", len(revs),
+ "\n ".join(['{} ({})'.format(rev.commit_number, rev.commit) for rev in revs]))
+ return revs
+
+def rev_find(revs, attr, val):
+ """Search from a list of TestedRev"""
+ for i, rev in enumerate(revs):
+ if getattr(rev, attr) == val:
+ return i
+ raise ValueError("Unable to find '{}' value '{}'".format(attr, val))
+
diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py
index 7d12331453..58d3c3b3f8 100644
--- a/meta/lib/oeqa/utils/httpserver.py
+++ b/meta/lib/oeqa/utils/httpserver.py
@@ -1,13 +1,17 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
import http.server
import multiprocessing
import os
+import traceback
+import signal
from socketserver import ThreadingMixIn
class HTTPServer(ThreadingMixIn, http.server.HTTPServer):
- def server_start(self, root_dir):
- import signal
- signal.signal(signal.SIGTERM, signal.SIG_DFL)
+ def server_start(self, root_dir, logger):
os.chdir(root_dir)
self.serve_forever()
@@ -18,19 +22,40 @@ class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
class HTTPService(object):
- def __init__(self, root_dir, host=''):
+ def __init__(self, root_dir, host='', port=0, logger=None):
self.root_dir = root_dir
self.host = host
- self.port = 0
+ self.port = port
+ self.logger = logger
def start(self):
+ if not os.path.exists(self.root_dir):
+ self.logger.info("Not starting HTTPService for directory %s which doesn't exist" % (self.root_dir))
+ return
+
self.server = HTTPServer((self.host, self.port), HTTPRequestHandler)
if self.port == 0:
self.port = self.server.server_port
- self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir])
+ self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir, self.logger])
+
+ # The signal handler from testimage.bbclass can cause deadlocks here
+ # if the HTTPServer is terminated before it can restore the standard
+ #signal behaviour
+ orig = signal.getsignal(signal.SIGTERM)
+ signal.signal(signal.SIGTERM, signal.SIG_DFL)
self.process.start()
+ signal.signal(signal.SIGTERM, orig)
+
+ if self.logger:
+ self.logger.info("Started HTTPService on %s:%s" % (self.host, self.port))
+
def stop(self):
- self.server.server_close()
- self.process.terminate()
- self.process.join()
+ if hasattr(self, "server"):
+ self.server.server_close()
+ if hasattr(self, "process"):
+ self.process.terminate()
+ self.process.join()
+ if self.logger:
+ self.logger.info("Stopped HTTPService on %s:%s" % (self.host, self.port))
+
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index b377dcd271..7313df8ec3 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -1,125 +1,152 @@
-#!/usr/bin/env python
+#
+# SPDX-License-Identifier: MIT
+#
import sys
import os
import re
-from . import ftools
-
# A parser that can be used to identify weather a line is a test result or a section statement.
-class Lparser(object):
-
- def __init__(self, test_0_pass_regex, test_0_fail_regex, section_0_begin_regex=None, section_0_end_regex=None, **kwargs):
- # Initialize the arguments dictionary
- if kwargs:
- self.args = kwargs
- else:
- self.args = {}
-
- # Add the default args to the dictionary
- self.args['test_0_pass_regex'] = test_0_pass_regex
- self.args['test_0_fail_regex'] = test_0_fail_regex
- if section_0_begin_regex:
- self.args['section_0_begin_regex'] = section_0_begin_regex
- if section_0_end_regex:
- self.args['section_0_end_regex'] = section_0_end_regex
-
- self.test_possible_status = ['pass', 'fail', 'error']
- self.section_possible_status = ['begin', 'end']
-
- self.initialized = False
-
-
- # Initialize the parser with the current configuration
- def init(self):
-
- # extra arguments can be added by the user to define new test and section categories. They must follow a pre-defined pattern: <type>_<category_name>_<status>_regex
- self.test_argument_pattern = "^test_(.+?)_(%s)_regex" % '|'.join(map(str, self.test_possible_status))
- self.section_argument_pattern = "^section_(.+?)_(%s)_regex" % '|'.join(map(str, self.section_possible_status))
-
- # Initialize the test and section regex dictionaries
- self.test_regex = {}
- self.section_regex ={}
-
- for arg, value in self.args.items():
- if not value:
- raise Exception('The value of provided argument %s is %s. Should have a valid value.' % (key, value))
- is_test = re.search(self.test_argument_pattern, arg)
- is_section = re.search(self.section_argument_pattern, arg)
- if is_test:
- if not is_test.group(1) in self.test_regex:
- self.test_regex[is_test.group(1)] = {}
- self.test_regex[is_test.group(1)][is_test.group(2)] = re.compile(value)
- elif is_section:
- if not is_section.group(1) in self.section_regex:
- self.section_regex[is_section.group(1)] = {}
- self.section_regex[is_section.group(1)][is_section.group(2)] = re.compile(value)
- else:
- # TODO: Make these call a traceback instead of a simple exception..
- raise Exception("The provided argument name does not correspond to any valid type. Please give one of the following types:\nfor tests: %s\nfor sections: %s" % (self.test_argument_pattern, self.section_argument_pattern))
-
- self.initialized = True
-
- # Parse a line and return a tuple containing the type of result (test/section) and its category, status and name
- def parse_line(self, line):
- if not self.initialized:
- raise Exception("The parser is not initialized..")
-
- for test_category, test_status_list in self.test_regex.items():
- for test_status, status_regex in test_status_list.items():
- test_name = status_regex.search(line)
- if test_name:
- return ['test', test_category, test_status, test_name.group(1)]
-
- for section_category, section_status_list in self.section_regex.items():
- for section_status, status_regex in section_status_list.items():
- section_name = status_regex.search(line)
- if section_name:
- return ['section', section_category, section_status, section_name.group(1)]
- return None
-
-
-class Result(object):
-
+class PtestParser(object):
def __init__(self):
- self.result_dict = {}
-
- def store(self, section, test, status):
- if not section in self.result_dict:
- self.result_dict[section] = []
-
- self.result_dict[section].append((test, status))
-
- # sort tests by the test name(the first element of the tuple), for each section. This can be helpful when using git to diff for changes by making sure they are always in the same order.
- def sort_tests(self):
- for package in self.result_dict:
- sorted_results = sorted(self.result_dict[package], key=lambda tup: tup[0])
- self.result_dict[package] = sorted_results
+ self.results = {}
+ self.sections = {}
+
+ def parse(self, logfile):
+ test_regex = {}
+ test_regex['PASSED'] = re.compile(r"^PASS:(.+)")
+ test_regex['FAILED'] = re.compile(r"^FAIL:([^(]+)")
+ test_regex['SKIPPED'] = re.compile(r"^SKIP:(.+)")
+
+ section_regex = {}
+ section_regex['begin'] = re.compile(r"^BEGIN: .*/(.+)/ptest")
+ section_regex['end'] = re.compile(r"^END: .*/(.+)/ptest")
+ section_regex['duration'] = re.compile(r"^DURATION: (.+)")
+ section_regex['exitcode'] = re.compile(r"^ERROR: Exit status is (.+)")
+ section_regex['timeout'] = re.compile(r"^TIMEOUT: .*/(.+)/ptest")
+
+ def newsection():
+ return { 'name': "No-section", 'log': "" }
+
+ current_section = newsection()
+
+ with open(logfile, errors='replace') as f:
+ for line in f:
+ result = section_regex['begin'].search(line)
+ if result:
+ current_section['name'] = result.group(1)
+ continue
+
+ result = section_regex['end'].search(line)
+ if result:
+ if current_section['name'] != result.group(1):
+ bb.warn("Ptest END log section mismatch %s vs. %s" % (current_section['name'], result.group(1)))
+ if current_section['name'] in self.sections:
+ bb.warn("Ptest duplicate section for %s" % (current_section['name']))
+ self.sections[current_section['name']] = current_section
+ del self.sections[current_section['name']]['name']
+ current_section = newsection()
+ continue
+
+ result = section_regex['timeout'].search(line)
+ if result:
+ if current_section['name'] != result.group(1):
+ bb.warn("Ptest TIMEOUT log section mismatch %s vs. %s" % (current_section['name'], result.group(1)))
+ current_section['timeout'] = True
+ continue
+
+ for t in ['duration', 'exitcode']:
+ result = section_regex[t].search(line)
+ if result:
+ current_section[t] = result.group(1)
+ continue
+
+ current_section['log'] = current_section['log'] + line
+
+ for t in test_regex:
+ result = test_regex[t].search(line)
+ if result:
+ if current_section['name'] not in self.results:
+ self.results[current_section['name']] = {}
+ self.results[current_section['name']][result.group(1).strip()] = t
+
+ return self.results, self.sections
# Log the results as files. The file name is the section name and the contents are the tests in that section.
- def log_as_files(self, target_dir, test_status):
- status_regex = re.compile('|'.join(map(str, test_status)))
- if not type(test_status) == type([]):
- raise Exception("test_status should be a list. Got " + str(test_status) + " instead.")
+ def results_as_files(self, target_dir):
if not os.path.exists(target_dir):
raise Exception("Target directory does not exist: %s" % target_dir)
- for section, test_results in self.result_dict.items():
- prefix = ''
- for x in test_status:
- prefix +=x+'.'
- if (section != ''):
- prefix += section
+ for section in self.results:
+ prefix = 'No-section'
+ if section:
+ prefix = section
section_file = os.path.join(target_dir, prefix)
# purge the file contents if it exists
- open(section_file, 'w').close()
- for test_result in test_results:
- (test_name, status) = test_result
- # we log only the tests with status in the test_status list
- match_status = status_regex.search(status)
- if match_status:
- ftools.append_file(section_file, status + ": " + test_name)
-
- # Not yet implemented!
- def log_to_lava(self):
- pass
+ with open(section_file, 'w') as f:
+ for test_name in sorted(self.results[section]):
+ status = self.results[section][test_name]
+ f.write(status + ": " + test_name + "\n")
+
+
+# ltp log parsing
+class LtpParser(object):
+ def __init__(self):
+ self.results = {}
+ self.section = {'duration': "", 'log': ""}
+
+ def parse(self, logfile):
+ test_regex = {}
+ test_regex['PASSED'] = re.compile(r"PASS")
+ test_regex['FAILED'] = re.compile(r"FAIL")
+ test_regex['SKIPPED'] = re.compile(r"SKIP")
+
+ with open(logfile, errors='replace') as f:
+ for line in f:
+ for t in test_regex:
+ result = test_regex[t].search(line)
+ if result:
+ self.results[line.split()[0].strip()] = t
+
+ for test in self.results:
+ result = self.results[test]
+ self.section['log'] = self.section['log'] + ("%s: %s\n" % (result.strip()[:-2], test.strip()))
+
+ return self.results, self.section
+
+
+# ltp Compliance log parsing
+class LtpComplianceParser(object):
+ def __init__(self):
+ self.results = {}
+ self.section = {'duration': "", 'log': ""}
+
+ def parse(self, logfile):
+ test_regex = {}
+ test_regex['PASSED'] = re.compile(r"^PASS")
+ test_regex['FAILED'] = re.compile(r"^FAIL")
+ test_regex['SKIPPED'] = re.compile(r"(?:UNTESTED)|(?:UNSUPPORTED)")
+
+ section_regex = {}
+ section_regex['test'] = re.compile(r"^Testing")
+
+ with open(logfile, errors='replace') as f:
+ for line in f:
+ result = section_regex['test'].search(line)
+ if result:
+ self.name = ""
+ self.name = line.split()[1].strip()
+ self.results[self.name] = "PASSED"
+ failed = 0
+
+ failed_result = test_regex['FAILED'].search(line)
+ if failed_result:
+ failed = line.split()[1].strip()
+ if int(failed) > 0:
+ self.results[self.name] = "FAILED"
+
+ for test in self.results:
+ result = self.results[test]
+ self.section['log'] = self.section['log'] + ("%s: %s\n" % (result.strip()[:-2], test.strip()))
+
+ return self.results, self.section
diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
new file mode 100644
index 0000000000..8013aa684d
--- /dev/null
+++ b/meta/lib/oeqa/utils/metadata.py
@@ -0,0 +1,124 @@
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+# Functions to get metadata from the testing host used
+# for analytics of test results.
+
+from collections import OrderedDict
+from collections.abc import MutableMapping
+from xml.dom.minidom import parseString
+from xml.etree.ElementTree import Element, tostring
+
+from oe.lsb import get_os_release
+from oeqa.utils.commands import runCmd, get_bb_vars
+
+
+def metadata_from_bb():
+ """ Returns test's metadata as OrderedDict.
+
+ Data will be gathered using bitbake -e thanks to get_bb_vars.
+ """
+ metadata_config_vars = ('MACHINE', 'BB_NUMBER_THREADS', 'PARALLEL_MAKE')
+
+ info_dict = OrderedDict()
+ hostname = runCmd('hostname')
+ info_dict['hostname'] = hostname.output
+ data_dict = get_bb_vars()
+
+ # Distro information
+ info_dict['distro'] = {'id': data_dict['DISTRO'],
+ 'version_id': data_dict['DISTRO_VERSION'],
+ 'pretty_name': '%s %s' % (data_dict['DISTRO'], data_dict['DISTRO_VERSION'])}
+
+ # Host distro information
+ os_release = get_os_release()
+ if os_release:
+ info_dict['host_distro'] = OrderedDict()
+ for key in ('ID', 'VERSION_ID', 'PRETTY_NAME'):
+ if key in os_release:
+ info_dict['host_distro'][key.lower()] = os_release[key]
+
+ info_dict['layers'] = get_layers(data_dict['BBLAYERS'])
+ info_dict['bitbake'] = git_rev_info(os.path.dirname(bb.__file__))
+
+ info_dict['config'] = OrderedDict()
+ for var in sorted(metadata_config_vars):
+ info_dict['config'][var] = data_dict[var]
+ return info_dict
+
+def metadata_from_data_store(d):
+ """ Returns test's metadata as OrderedDict.
+
+ Data will be collected from the provided data store.
+ """
+ # TODO: Getting metadata from the data store would
+ # be useful when running within bitbake.
+ pass
+
+def git_rev_info(path):
+ """Get git revision information as a dict"""
+ info = OrderedDict()
+
+ try:
+ from git import Repo, InvalidGitRepositoryError, NoSuchPathError
+ except ImportError:
+ import subprocess
+ try:
+ info['branch'] = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"], cwd=path).decode('utf-8').strip()
+ except subprocess.CalledProcessError:
+ pass
+ try:
+ info['commit'] = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=path).decode('utf-8').strip()
+ except subprocess.CalledProcessError:
+ pass
+ try:
+ info['commit_count'] = int(subprocess.check_output(["git", "rev-list", "--count", "HEAD"], cwd=path).decode('utf-8').strip())
+ except subprocess.CalledProcessError:
+ pass
+ return info
+ try:
+ repo = Repo(path, search_parent_directories=True)
+ except (InvalidGitRepositoryError, NoSuchPathError):
+ return info
+ info['commit'] = repo.head.commit.hexsha
+ info['commit_count'] = repo.head.commit.count()
+ try:
+ info['branch'] = repo.active_branch.name
+ except TypeError:
+ info['branch'] = '(nobranch)'
+ return info
+
+def get_layers(layers):
+ """Returns layer information in dict format"""
+ layer_dict = OrderedDict()
+ for layer in layers.split():
+ layer_name = os.path.basename(layer)
+ layer_dict[layer_name] = git_rev_info(layer)
+ return layer_dict
+
+def write_metadata_file(file_path, metadata):
+ """ Writes metadata to a XML file in directory. """
+
+ xml = dict_to_XML('metadata', metadata)
+ xml_doc = parseString(tostring(xml).decode('UTF-8'))
+ with open(file_path, 'w') as f:
+ f.write(xml_doc.toprettyxml())
+
+def dict_to_XML(tag, dictionary, **kwargs):
+ """ Return XML element converting dicts recursively. """
+
+ elem = Element(tag, **kwargs)
+ for key, val in dictionary.items():
+ if tag == 'layers':
+ child = (dict_to_XML('layer', val, name=key))
+ elif isinstance(val, MutableMapping):
+ child = (dict_to_XML(key, val))
+ else:
+ if tag == 'config':
+ child = Element('variable', name=key)
+ else:
+ child = Element(key)
+ child.text = str(val)
+ elem.append(child)
+ return elem
diff --git a/meta/lib/oeqa/utils/network.py b/meta/lib/oeqa/utils/network.py
index 2768f6c5db..59d01723a1 100644
--- a/meta/lib/oeqa/utils/network.py
+++ b/meta/lib/oeqa/utils/network.py
@@ -1,7 +1,11 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
import socket
-def get_free_port():
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+def get_free_port(udp = False):
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM if not udp else socket.SOCK_DGRAM)
s.bind(('', 0))
addr = s.getsockname()
s.close()
diff --git a/meta/lib/oeqa/utils/nfs.py b/meta/lib/oeqa/utils/nfs.py
new file mode 100644
index 0000000000..a37686c914
--- /dev/null
+++ b/meta/lib/oeqa/utils/nfs.py
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: MIT
+import os
+import sys
+import tempfile
+import contextlib
+import socket
+from oeqa.utils.commands import bitbake, get_bb_var, Command
+from oeqa.utils.network import get_free_port
+
+@contextlib.contextmanager
+def unfs_server(directory, logger = None):
+ unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native")
+ if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")):
+ # build native tool
+ bitbake("unfs3-native -c addto_recipe_sysroot")
+
+ exports = None
+ cmd = None
+ try:
+ # create the exports file
+ with tempfile.NamedTemporaryFile(delete = False) as exports:
+ exports.write("{0} (rw,no_root_squash,no_all_squash,insecure)\n".format(directory).encode())
+
+ # find some ports for the server
+ nfsport, mountport = get_free_port(udp = True), get_free_port(udp = True)
+
+ nenv = dict(os.environ)
+ nenv['PATH'] = "{0}/sbin:{0}/usr/sbin:{0}/usr/bin:".format(unfs_sysroot) + nenv.get('PATH', '')
+ cmd = Command(["unfsd", "-d", "-p", "-N", "-e", exports.name, "-n", str(nfsport), "-m", str(mountport)],
+ bg = True, env = nenv, output_log = logger)
+ cmd.run()
+ yield nfsport, mountport
+ finally:
+ if cmd is not None:
+ cmd.stop()
+ if exports is not None:
+ # clean up exports file
+ os.unlink(exports.name)
+
diff --git a/meta/lib/oeqa/utils/package_manager.py b/meta/lib/oeqa/utils/package_manager.py
index 099ecc9728..2d358f7172 100644
--- a/meta/lib/oeqa/utils/package_manager.py
+++ b/meta/lib/oeqa/utils/package_manager.py
@@ -1,29 +1,217 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import json
+import shutil
+
+from oeqa.core.utils.test import getCaseFile, getCaseMethod
+
def get_package_manager(d, root_path):
"""
Returns an OE package manager that can install packages in root_path.
"""
from oe.package_manager import RpmPM, OpkgPM, DpkgPM
- pkg_class = d.getVar("IMAGE_PKGTYPE", True)
+ pkg_class = d.getVar("IMAGE_PKGTYPE")
if pkg_class == "rpm":
pm = RpmPM(d,
root_path,
- d.getVar('TARGET_VENDOR', True))
+ d.getVar('TARGET_VENDOR'),
+ filterbydependencies=False)
pm.create_configs()
elif pkg_class == "ipk":
pm = OpkgPM(d,
root_path,
- d.getVar("IPKGCONF_TARGET", True),
- d.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True))
+ d.getVar("IPKGCONF_TARGET"),
+ d.getVar("ALL_MULTILIB_PACKAGE_ARCHS"),
+ filterbydependencies=False)
elif pkg_class == "deb":
pm = DpkgPM(d,
root_path,
- d.getVar('PACKAGE_ARCHS', True),
- d.getVar('DPKG_ARCH', True))
+ d.getVar('PACKAGE_ARCHS'),
+ d.getVar('DPKG_ARCH'),
+ filterbydependencies=False)
pm.write_index()
pm.update()
return pm
+
+def find_packages_to_extract(test_suite):
+ """
+ Returns packages to extract required by runtime tests.
+ """
+ from oeqa.core.utils.test import getSuiteCasesFiles
+
+ needed_packages = {}
+ files = getSuiteCasesFiles(test_suite)
+
+ for f in set(files):
+ json_file = _get_json_file(f)
+ if json_file:
+ needed_packages.update(_get_needed_packages(json_file))
+
+ return needed_packages
+
+def _get_json_file(module_path):
+ """
+ Returns the path of the JSON file for a module, empty if doesn't exitst.
+ """
+
+ json_file = '%s.json' % module_path.rsplit('.', 1)[0]
+ if os.path.isfile(module_path) and os.path.isfile(json_file):
+ return json_file
+ else:
+ return ''
+
+def _get_needed_packages(json_file, test=None):
+ """
+ Returns a dict with needed packages based on a JSON file.
+
+ If a test is specified it will return the dict just for that test.
+ """
+ needed_packages = {}
+
+ with open(json_file) as f:
+ test_packages = json.load(f)
+ for key,value in test_packages.items():
+ needed_packages[key] = value
+
+ if test:
+ if test in needed_packages:
+ needed_packages = needed_packages[test]
+ else:
+ needed_packages = {}
+
+ return needed_packages
+
+def extract_packages(d, needed_packages):
+ """
+ Extract packages that will be needed during runtime.
+ """
+
+ import bb
+ import oe.path
+
+ extracted_path = d.getVar('TEST_EXTRACTED_DIR')
+
+ for key,value in needed_packages.items():
+ packages = ()
+ if isinstance(value, dict):
+ packages = (value, )
+ elif isinstance(value, list):
+ packages = value
+ else:
+ bb.fatal('Failed to process needed packages for %s; '
+ 'Value must be a dict or list' % key)
+
+ for package in packages:
+ pkg = package['pkg']
+ rm = package.get('rm', False)
+ extract = package.get('extract', True)
+
+ if extract:
+ #logger.debug(1, 'Extracting %s' % pkg)
+ dst_dir = os.path.join(extracted_path, pkg)
+ # Same package used for more than one test,
+ # don't need to extract again.
+ if os.path.exists(dst_dir):
+ continue
+
+ # Extract package and copy it to TEST_EXTRACTED_DIR
+ pkg_dir = _extract_in_tmpdir(d, pkg)
+ oe.path.copytree(pkg_dir, dst_dir)
+ shutil.rmtree(pkg_dir)
+
+ else:
+ #logger.debug(1, 'Copying %s' % pkg)
+ _copy_package(d, pkg)
+
+def _extract_in_tmpdir(d, pkg):
+ """"
+ Returns path to a temp directory where the package was
+ extracted without dependencies.
+ """
+
+ from oeqa.utils.package_manager import get_package_manager
+
+ pkg_path = os.path.join(d.getVar('TEST_INSTALL_TMP_DIR'), pkg)
+ pm = get_package_manager(d, pkg_path)
+ extract_dir = pm.extract(pkg)
+ shutil.rmtree(pkg_path)
+
+ return extract_dir
+
+def _copy_package(d, pkg):
+ """
+ Copy the RPM, DEB or IPK package to dst_dir
+ """
+
+ from oeqa.utils.package_manager import get_package_manager
+
+ pkg_path = os.path.join(d.getVar('TEST_INSTALL_TMP_DIR'), pkg)
+ dst_dir = d.getVar('TEST_PACKAGED_DIR')
+ pm = get_package_manager(d, pkg_path)
+ pkg_info = pm.package_info(pkg)
+ file_path = pkg_info[pkg]['filepath']
+ shutil.copy2(file_path, dst_dir)
+ shutil.rmtree(pkg_path)
+
+def install_package(test_case):
+ """
+ Installs package in DUT if required.
+ """
+ needed_packages = test_needs_package(test_case)
+ if needed_packages:
+ _install_uninstall_packages(needed_packages, test_case, True)
+
+def uninstall_package(test_case):
+ """
+ Uninstalls package in DUT if required.
+ """
+ needed_packages = test_needs_package(test_case)
+ if needed_packages:
+ _install_uninstall_packages(needed_packages, test_case, False)
+
+def test_needs_package(test_case):
+ """
+ Checks if a test case requires to install/uninstall packages.
+ """
+ test_file = getCaseFile(test_case)
+ json_file = _get_json_file(test_file)
+
+ if json_file:
+ test_method = getCaseMethod(test_case)
+ needed_packages = _get_needed_packages(json_file, test_method)
+ if needed_packages:
+ return needed_packages
+
+ return None
+
+def _install_uninstall_packages(needed_packages, test_case, install=True):
+ """
+ Install/Uninstall packages in the DUT without using a package manager
+ """
+
+ if isinstance(needed_packages, dict):
+ packages = [needed_packages]
+ elif isinstance(needed_packages, list):
+ packages = needed_packages
+
+ for package in packages:
+ pkg = package['pkg']
+ rm = package.get('rm', False)
+ extract = package.get('extract', True)
+ src_dir = os.path.join(test_case.tc.extract_dir, pkg)
+
+ # Install package
+ if install and extract:
+ test_case.tc.target.copyDirTo(src_dir, '/')
+
+ # Uninstall package
+ elif not install and rm:
+ test_case.tc.target.deleteDirStructure(src_dir, '/')
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 1f98682f75..2cada35d48 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -1,12 +1,15 @@
+#
# Copyright (C) 2013 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# This module provides a class for starting qemu images using runqemu.
# It's used by testimage.bbclass.
import subprocess
import os
+import sys
import time
import signal
import re
@@ -16,10 +19,8 @@ import errno
import string
import threading
import codecs
-from oeqa.utils.dump import HostDumper
-
import logging
-logger = logging.getLogger("BitBake.QemuRunner")
+from oeqa.utils.dump import HostDumper
# Get Unicode non printable control chars
control_range = list(range(0,32))+list(range(127,160))
@@ -29,16 +30,19 @@ re_control_char = re.compile('[%s]' % re.escape("".join(control_chars)))
class QemuRunner:
- def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds, use_kvm):
+ def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds,
+ use_kvm, logger, use_slirp=False, serial_ports=2):
# Popen object for runqemu
self.runqemu = None
# pid of the qemu process that runqemu will start
self.qemupid = None
- # target ip - from the command line
+ # target ip - from the command line or runqemu output
self.ip = None
# host ip - where qemu is running
self.server_ip = None
+ # target ip netmask
+ self.netmask = None
self.machine = machine
self.rootfs = rootfs
@@ -50,9 +54,16 @@ class QemuRunner:
self.logged = False
self.thread = None
self.use_kvm = use_kvm
+ self.use_slirp = use_slirp
+ self.serial_ports = serial_ports
+ self.msg = ''
- self.runqemutime = 60
+ self.runqemutime = 120
+ self.qemu_pidfile = 'pidfile_'+str(os.getpid())
self.host_dumper = HostDumper(dump_host_cmds, dump_dir)
+ self.monitorpipe = None
+
+ self.logger = logger
def create_socket(self):
try:
@@ -61,7 +72,7 @@ class QemuRunner:
sock.bind(("127.0.0.1",0))
sock.listen(2)
port = sock.getsockname()[1]
- logger.info("Created listening socket for qemu serial console on: 127.0.0.1:%s" % port)
+ self.logger.debug("Created listening socket for qemu serial console on: 127.0.0.1:%s" % port)
return (sock, port)
except socket.error:
@@ -72,8 +83,9 @@ class QemuRunner:
if self.logfile:
# It is needed to sanitize the data received from qemu
# because is possible to have control characters
- msg = msg.decode("utf-8")
+ msg = msg.decode("utf-8", errors='ignore')
msg = re_control_char.sub('', msg)
+ self.msg += msg
with codecs.open(self.logfile, "a", encoding="utf-8") as f:
f.write("%s" % msg)
@@ -87,67 +99,84 @@ class QemuRunner:
def handleSIGCHLD(self, signum, frame):
if self.runqemu and self.runqemu.poll():
if self.runqemu.returncode:
- logger.info('runqemu exited with code %d' % self.runqemu.returncode)
- logger.info("Output from runqemu:\n%s" % self.getOutput(self.runqemu.stdout))
+ self.logger.error('runqemu exited with code %d' % self.runqemu.returncode)
+ self.logger.error('Output from runqemu:\n%s' % self.getOutput(self.runqemu.stdout))
self.stop()
self._dump_host()
raise SystemExit
- def start(self, qemuparams = None, get_ip = True, extra_bootparams = None):
+ def start(self, qemuparams = None, get_ip = True, extra_bootparams = None, runqemuparams='', launch_cmd=None, discard_writes=True):
+ env = os.environ.copy()
if self.display:
- os.environ["DISPLAY"] = self.display
+ env["DISPLAY"] = self.display
# Set this flag so that Qemu doesn't do any grabs as SDL grabs
# interact badly with screensavers.
- os.environ["QEMU_DONT_GRAB"] = "1"
+ env["QEMU_DONT_GRAB"] = "1"
if not os.path.exists(self.rootfs):
- logger.error("Invalid rootfs %s" % self.rootfs)
+ self.logger.error("Invalid rootfs %s" % self.rootfs)
return False
if not os.path.exists(self.tmpdir):
- logger.error("Invalid TMPDIR path %s" % self.tmpdir)
+ self.logger.error("Invalid TMPDIR path %s" % self.tmpdir)
return False
else:
- os.environ["OE_TMPDIR"] = self.tmpdir
+ env["OE_TMPDIR"] = self.tmpdir
if not os.path.exists(self.deploy_dir_image):
- logger.error("Invalid DEPLOY_DIR_IMAGE path %s" % self.deploy_dir_image)
+ self.logger.error("Invalid DEPLOY_DIR_IMAGE path %s" % self.deploy_dir_image)
return False
else:
- os.environ["DEPLOY_DIR_IMAGE"] = self.deploy_dir_image
+ env["DEPLOY_DIR_IMAGE"] = self.deploy_dir_image
+ if not launch_cmd:
+ launch_cmd = 'runqemu %s' % ('snapshot' if discard_writes else '')
+ if self.use_kvm:
+ self.logger.debug('Using kvm for runqemu')
+ launch_cmd += ' kvm'
+ else:
+ self.logger.debug('Not using kvm for runqemu')
+ if not self.display:
+ launch_cmd += ' nographic'
+ if self.use_slirp:
+ launch_cmd += ' slirp'
+ launch_cmd += ' %s %s %s' % (runqemuparams, self.machine, self.rootfs)
+
+ return self.launch(launch_cmd, qemuparams=qemuparams, get_ip=get_ip, extra_bootparams=extra_bootparams, env=env)
+
+ def launch(self, launch_cmd, get_ip = True, qemuparams = None, extra_bootparams = None, env = None):
try:
- threadsock, threadport = self.create_socket()
+ if self.serial_ports >= 2:
+ self.threadsock, threadport = self.create_socket()
self.server_socket, self.serverport = self.create_socket()
except socket.error as msg:
- logger.error("Failed to create listening socket: %s" % msg[1])
+ self.logger.error("Failed to create listening socket: %s" % msg[1])
return False
-
bootparams = 'console=tty1 console=ttyS0,115200n8 printk.time=1'
if extra_bootparams:
bootparams = bootparams + ' ' + extra_bootparams
- self.qemuparams = 'bootparams="{0}" qemuparams="-serial tcp:127.0.0.1:{1}"'.format(bootparams, threadport)
- if not self.display:
- self.qemuparams = 'nographic ' + self.qemuparams
+ # Ask QEMU to store the QEMU process PID in file, this way we don't have to parse running processes
+ # and analyze descendents in order to determine it.
+ if os.path.exists(self.qemu_pidfile):
+ os.remove(self.qemu_pidfile)
+ self.qemuparams = 'bootparams="{0}" qemuparams="-pidfile {1}"'.format(bootparams, self.qemu_pidfile)
if qemuparams:
self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"'
+ if self.serial_ports >= 2:
+ launch_cmd += ' tcpserial=%s:%s %s' % (threadport, self.serverport, self.qemuparams)
+ else:
+ launch_cmd += ' tcpserial=%s %s' % (self.serverport, self.qemuparams)
+
self.origchldhandler = signal.getsignal(signal.SIGCHLD)
signal.signal(signal.SIGCHLD, self.handleSIGCHLD)
- launch_cmd = 'runqemu snapshot '
- if self.use_kvm:
- logger.info('Using kvm for runqemu')
- launch_cmd += 'kvm '
- else:
- logger.info('Not using kvm for runqemu')
- launch_cmd += 'tcpserial=%s %s %s %s' % (self.serverport, self.machine, self.rootfs, self.qemuparams)
- logger.info('launchcmd=%s'%(launch_cmd))
+ self.logger.debug('launchcmd=%s'%(launch_cmd))
# FIXME: We pass in stdin=subprocess.PIPE here to work around stty
# blocking at the end of the runqemu script when using this within
# oe-selftest (this makes stty error out immediately). There ought
# to be a proper fix but this will suffice for now.
- self.runqemu = subprocess.Popen(launch_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, preexec_fn=os.setpgrp)
+ self.runqemu = subprocess.Popen(launch_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, preexec_fn=os.setpgrp, env=env)
output = self.runqemu.stdout
#
@@ -176,130 +205,183 @@ class QemuRunner:
os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
sys.exit(0)
- logger.info("runqemu started, pid is %s" % self.runqemu.pid)
- logger.info("waiting at most %s seconds for qemu pid" % self.runqemutime)
+ self.logger.debug("runqemu started, pid is %s" % self.runqemu.pid)
+ self.logger.debug("waiting at most %s seconds for qemu pid (%s)" %
+ (self.runqemutime, time.strftime("%D %H:%M:%S")))
endtime = time.time() + self.runqemutime
while not self.is_alive() and time.time() < endtime:
if self.runqemu.poll():
if self.runqemu.returncode:
# No point waiting any longer
- logger.info('runqemu exited with code %d' % self.runqemu.returncode)
+ self.logger.warning('runqemu exited with code %d' % self.runqemu.returncode)
self._dump_host()
+ self.logger.warning("Output from runqemu:\n%s" % self.getOutput(output))
self.stop()
- logger.info("Output from runqemu:\n%s" % self.getOutput(output))
return False
- time.sleep(1)
-
- if self.is_alive():
- logger.info("qemu started - qemu procces pid is %s" % self.qemupid)
- if get_ip:
- cmdline = ''
- with open('/proc/%s/cmdline' % self.qemupid) as p:
- cmdline = p.read()
- # It is needed to sanitize the data received
- # because is possible to have control characters
- cmdline = re_control_char.sub('', cmdline)
- try:
- ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
- if not ips or len(ips) != 3:
- raise ValueError
- else:
- self.ip = ips[0]
- self.server_ip = ips[1]
- except (IndexError, ValueError):
- logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used:\n%s\nand output from runqemu:\n%s" % (cmdline, self.getOutput(output)))
+ time.sleep(0.5)
+
+ if not self.is_alive():
+ self.logger.error("Qemu pid didn't appear in %s seconds (%s)" %
+ (self.runqemutime, time.strftime("%D %H:%M:%S")))
+ # Dump all processes to help us to figure out what is going on...
+ ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command '], stdout=subprocess.PIPE).communicate()[0]
+ processes = ps.decode("utf-8")
+ self.logger.debug("Running processes:\n%s" % processes)
+ self._dump_host()
+ op = self.getOutput(output)
+ self.stop()
+ if op:
+ self.logger.error("Output from runqemu:\n%s" % op)
+ else:
+ self.logger.error("No output from runqemu.\n")
+ return False
+
+ # We are alive: qemu is running
+ out = self.getOutput(output)
+ netconf = False # network configuration is not required by default
+ self.logger.debug("qemu started in %s seconds - qemu procces pid is %s (%s)" %
+ (time.time() - (endtime - self.runqemutime),
+ self.qemupid, time.strftime("%D %H:%M:%S")))
+ cmdline = ''
+ if get_ip:
+ with open('/proc/%s/cmdline' % self.qemupid) as p:
+ cmdline = p.read()
+ # It is needed to sanitize the data received
+ # because is possible to have control characters
+ cmdline = re_control_char.sub(' ', cmdline)
+ try:
+ if self.use_slirp:
+ tcp_ports = cmdline.split("hostfwd=tcp::")[1]
+ host_port = tcp_ports[:tcp_ports.find('-')]
+ self.ip = "localhost:%s" % host_port
+ else:
+ ips = re.findall(r"((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
+ self.ip = ips[0]
+ self.server_ip = ips[1]
+ self.logger.debug("qemu cmdline used:\n{}".format(cmdline))
+ except (IndexError, ValueError):
+ # Try to get network configuration from runqemu output
+ match = re.match(r'.*Network configuration: ([0-9.]+)::([0-9.]+):([0-9.]+)$.*',
+ out, re.MULTILINE|re.DOTALL)
+ if match:
+ self.ip, self.server_ip, self.netmask = match.groups()
+ # network configuration is required as we couldn't get it
+ # from the runqemu command line, so qemu doesn't run kernel
+ # and guest networking is not configured
+ netconf = True
+ else:
+ self.logger.error("Couldn't get ip from qemu command line and runqemu output! "
+ "Here is the qemu command line used:\n%s\n"
+ "and output from runqemu:\n%s" % (cmdline, out))
self._dump_host()
self.stop()
return False
- logger.info("qemu cmdline used:\n{}".format(cmdline))
- logger.info("Target IP: %s" % self.ip)
- logger.info("Server IP: %s" % self.server_ip)
- self.thread = LoggingThread(self.log, threadsock, logger)
+ self.logger.debug("Target IP: %s" % self.ip)
+ self.logger.debug("Server IP: %s" % self.server_ip)
+
+ if self.serial_ports >= 2:
+ self.thread = LoggingThread(self.log, self.threadsock, self.logger)
self.thread.start()
if not self.thread.connection_established.wait(self.boottime):
- logger.error("Didn't receive a console connection from qemu. "
+ self.logger.error("Didn't receive a console connection from qemu. "
"Here is the qemu command line used:\n%s\nand "
- "output from runqemu:\n%s" % (cmdline,
- self.getOutput(output)))
+ "output from runqemu:\n%s" % (cmdline, out))
self.stop_thread()
return False
- logger.info("Output from runqemu:\n%s", self.getOutput(output))
- logger.info("Waiting at most %d seconds for login banner" % self.boottime)
- endtime = time.time() + self.boottime
- socklist = [self.server_socket]
- reachedlogin = False
- stopread = False
- qemusock = None
- bootlog = ''
- data = b''
- while time.time() < endtime and not stopread:
- sread, swrite, serror = select.select(socklist, [], [], 5)
- for sock in sread:
- if sock is self.server_socket:
- qemusock, addr = self.server_socket.accept()
- qemusock.setblocking(0)
- socklist.append(qemusock)
- socklist.remove(self.server_socket)
- logger.info("Connection from %s:%s" % addr)
- else:
- data = data + sock.recv(1024)
- if data:
- try:
- data = data.decode("utf-8", errors="surrogateescape")
- bootlog += data
- data = b''
- if re.search(".* login:", bootlog):
- self.server_socket = qemusock
- stopread = True
- reachedlogin = True
- logger.info("Reached login banner")
- except UnicodeDecodeError:
- continue
- else:
- socklist.remove(sock)
- sock.close()
- stopread = True
-
- if not reachedlogin:
- logger.info("Target didn't reached login boot in %d seconds" % self.boottime)
- lines = "\n".join(bootlog.splitlines()[-25:])
- logger.info("Last 25 lines of text:\n%s" % lines)
- logger.info("Check full boot log: %s" % self.logfile)
- self._dump_host()
- self.stop()
- return False
-
- # If we are not able to login the tests can continue
+ self.logger.debug("Output from runqemu:\n%s", out)
+ self.logger.debug("Waiting at most %d seconds for login banner (%s)" %
+ (self.boottime, time.strftime("%D %H:%M:%S")))
+ endtime = time.time() + self.boottime
+ socklist = [self.server_socket]
+ reachedlogin = False
+ stopread = False
+ qemusock = None
+ bootlog = b''
+ data = b''
+ while time.time() < endtime and not stopread:
try:
- (status, output) = self.run_serial("root\n", raw=True)
- if re.search("root@[a-zA-Z0-9\-]+:~#", output):
- self.logged = True
- logger.info("Logged as root in serial console")
+ sread, swrite, serror = select.select(socklist, [], [], 5)
+ except InterruptedError:
+ continue
+ for sock in sread:
+ if sock is self.server_socket:
+ qemusock, addr = self.server_socket.accept()
+ qemusock.setblocking(0)
+ socklist.append(qemusock)
+ socklist.remove(self.server_socket)
+ self.logger.debug("Connection from %s:%s" % addr)
else:
- logger.info("Couldn't login into serial console"
- " as root using blank password")
- except:
- logger.info("Serial console failed while trying to login")
-
- else:
- logger.info("Qemu pid didn't appeared in %s seconds" % self.runqemutime)
+ data = data + sock.recv(1024)
+ if data:
+ bootlog += data
+ if self.serial_ports < 2:
+ # this socket has mixed console/kernel data, log it to logfile
+ self.log(data)
+
+ data = b''
+ if b' login:' in bootlog:
+ self.server_socket = qemusock
+ stopread = True
+ reachedlogin = True
+ self.logger.debug("Reached login banner in %s seconds (%s)" %
+ (time.time() - (endtime - self.boottime),
+ time.strftime("%D %H:%M:%S")))
+ else:
+ # no need to check if reachedlogin unless we support multiple connections
+ self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" %
+ time.strftime("%D %H:%M:%S"))
+ socklist.remove(sock)
+ sock.close()
+ stopread = True
+
+
+ if not reachedlogin:
+ if time.time() >= endtime:
+ self.logger.warning("Target didn't reach login banner in %d seconds (%s)" %
+ (self.boottime, time.strftime("%D %H:%M:%S")))
+ tail = lambda l: "\n".join(l.splitlines()[-25:])
+ bootlog = bootlog.decode("utf-8")
+ # in case bootlog is empty, use tail qemu log store at self.msg
+ lines = tail(bootlog if bootlog else self.msg)
+ self.logger.warning("Last 25 lines of text:\n%s" % lines)
+ self.logger.warning("Check full boot log: %s" % self.logfile)
self._dump_host()
self.stop()
- logger.info("Output from runqemu:\n%s" % self.getOutput(output))
return False
- return self.is_alive()
+ # If we are not able to login the tests can continue
+ try:
+ (status, output) = self.run_serial("root\n", raw=True)
+ if re.search(r"root@[a-zA-Z0-9\-]+:~#", output):
+ self.logged = True
+ self.logger.debug("Logged as root in serial console")
+ if netconf:
+ # configure guest networking
+ cmd = "ifconfig eth0 %s netmask %s up\n" % (self.ip, self.netmask)
+ output = self.run_serial(cmd, raw=True)[1]
+ if re.search(r"root@[a-zA-Z0-9\-]+:~#", output):
+ self.logger.debug("configured ip address %s", self.ip)
+ else:
+ self.logger.debug("Couldn't configure guest networking")
+ else:
+ self.logger.warning("Couldn't login into serial console"
+ " as root using blank password")
+ self.logger.warning("The output:\n%s" % output)
+ except:
+ self.logger.warning("Serial console failed while trying to login")
+ return True
def stop(self):
- self.stop_thread()
if hasattr(self, "origchldhandler"):
signal.signal(signal.SIGCHLD, self.origchldhandler)
+ self.stop_thread()
+ self.stop_qemu_system()
if self.runqemu:
if hasattr(self, "monitorpid"):
os.kill(self.monitorpid, signal.SIGKILL)
- logger.info("Sending SIGTERM to runqemu")
+ self.logger.debug("Sending SIGTERM to runqemu")
try:
os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
except OSError as e:
@@ -309,14 +391,32 @@ class QemuRunner:
while self.runqemu.poll() is None and time.time() < endtime:
time.sleep(1)
if self.runqemu.poll() is None:
- logger.info("Sending SIGKILL to runqemu")
+ self.logger.debug("Sending SIGKILL to runqemu")
os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL)
+ self.runqemu.stdin.close()
+ self.runqemu.stdout.close()
self.runqemu = None
+
if hasattr(self, 'server_socket') and self.server_socket:
self.server_socket.close()
self.server_socket = None
+ if hasattr(self, 'threadsock') and self.threadsock:
+ self.threadsock.close()
+ self.threadsock = None
self.qemupid = None
self.ip = None
+ if os.path.exists(self.qemu_pidfile):
+ os.remove(self.qemu_pidfile)
+ if self.monitorpipe:
+ self.monitorpipe.close()
+
+ def stop_qemu_system(self):
+ if self.qemupid:
+ try:
+ # qemu-system behaves well and a SIGTERM is enough
+ os.kill(self.qemupid, signal.SIGTERM)
+ except ProcessLookupError as e:
+ self.logger.warning('qemu-system ended unexpectedly')
def stop_thread(self):
if self.thread and self.thread.is_alive():
@@ -324,7 +424,7 @@ class QemuRunner:
self.thread.join()
def restart(self, qemuparams = None):
- logger.info("Restarting qemu process")
+ self.logger.warning("Restarting qemu process")
if self.runqemu.poll() is None:
self.stop()
if self.start(qemuparams):
@@ -332,59 +432,26 @@ class QemuRunner:
return False
def is_alive(self):
- if not self.runqemu:
+ if not self.runqemu or self.runqemu.poll() is not None:
return False
- qemu_child = self.find_child(str(self.runqemu.pid))
- if qemu_child:
- self.qemupid = qemu_child[0]
- if os.path.exists("/proc/" + str(self.qemupid)):
- return True
+ if os.path.isfile(self.qemu_pidfile):
+ # when handling pidfile, qemu creates the file, stat it, lock it and then write to it
+ # so it's possible that the file has been created but the content is empty
+ pidfile_timeout = time.time() + 3
+ while time.time() < pidfile_timeout:
+ with open(self.qemu_pidfile, 'r') as f:
+ qemu_pid = f.read().strip()
+ # file created but not yet written contents
+ if not qemu_pid:
+ time.sleep(0.5)
+ continue
+ else:
+ if os.path.exists("/proc/" + qemu_pid):
+ self.qemupid = int(qemu_pid)
+ return True
return False
- def find_child(self,parent_pid):
- #
- # Walk the process tree from the process specified looking for a qemu-system. Return its [pid'cmd]
- #
- ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command'], stdout=subprocess.PIPE).communicate()[0]
- processes = ps.decode("utf-8").split('\n')
- nfields = len(processes[0].split()) - 1
- pids = {}
- commands = {}
- for row in processes[1:]:
- data = row.split(None, nfields)
- if len(data) != 3:
- continue
- if data[1] not in pids:
- pids[data[1]] = []
-
- pids[data[1]].append(data[0])
- commands[data[0]] = data[2]
-
- if parent_pid not in pids:
- return []
-
- parents = []
- newparents = pids[parent_pid]
- while newparents:
- next = []
- for p in newparents:
- if p in pids:
- for n in pids[p]:
- if n not in parents and n not in next:
- next.append(n)
- if p not in parents:
- parents.append(p)
- newparents = next
- #print("Children matching %s:" % str(parents))
- for p in parents:
- # Need to be careful here since runqemu runs "ldd qemu-system-xxxx"
- # Also, old versions of ldd (2.11) run "LD_XXXX qemu-system-xxxx"
- basecmd = commands[p].split()[0]
- basecmd = os.path.basename(basecmd)
- if "qemu-system" in basecmd and "-serial tcp" in commands[p]:
- return [int(p),commands[p]]
-
- def run_serial(self, command, raw=False):
+ def run_serial(self, command, raw=False, timeout=60):
# We assume target system have echo to get command status
if not raw:
command = "%s; echo $?\n" % command
@@ -392,20 +459,26 @@ class QemuRunner:
data = ''
status = 0
self.server_socket.sendall(command.encode('utf-8'))
- keepreading = True
- while keepreading:
- sread, _, _ = select.select([self.server_socket],[],[],5)
+ start = time.time()
+ end = start + timeout
+ while True:
+ now = time.time()
+ if now >= end:
+ data += "<<< run_serial(): command timed out after %d seconds without output >>>\r\n\r\n" % timeout
+ break
+ try:
+ sread, _, _ = select.select([self.server_socket],[],[], end - now)
+ except InterruptedError:
+ continue
if sread:
answer = self.server_socket.recv(1024)
if answer:
data += answer.decode('utf-8')
# Search the prompt to stop
- if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):
- keepreading = False
+ if re.search(r"[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):
+ break
else:
raise Exception("No data on serial console socket")
- else:
- keepreading = False
if data:
if raw:
@@ -427,7 +500,7 @@ class QemuRunner:
def _dump_host(self):
self.host_dumper.create_dir("qemu")
- logger.warn("Qemu ended unexpectedly, dump data from host"
+ self.logger.warning("Qemu ended unexpectedly, dump data from host"
" is in %s" % self.host_dumper.dump_dir)
self.host_dumper.dump_host()
@@ -456,17 +529,17 @@ class LoggingThread(threading.Thread):
self.teardown()
def run(self):
- self.logger.info("Starting logging thread")
+ self.logger.debug("Starting logging thread")
self.readpipe, self.writepipe = os.pipe()
threading.Thread.run(self)
def stop(self):
- self.logger.info("Stopping logging thread")
+ self.logger.debug("Stopping logging thread")
if self.running:
os.write(self.writepipe, bytes("stop", "utf-8"))
def teardown(self):
- self.logger.info("Tearing down logging thread")
+ self.logger.debug("Tearing down logging thread")
self.close_socket(self.serversock)
if self.readsock is not None:
@@ -484,7 +557,7 @@ class LoggingThread(threading.Thread):
breakout = False
self.running = True
- self.logger.info("Starting thread event loop")
+ self.logger.debug("Starting thread event loop")
while not breakout:
events = poll.poll()
for event in events:
@@ -494,19 +567,19 @@ class LoggingThread(threading.Thread):
# Event to stop the thread
if self.readpipe == event[0]:
- self.logger.info("Stop event received")
+ self.logger.debug("Stop event received")
breakout = True
break
# A connection request was received
elif self.serversock.fileno() == event[0]:
- self.logger.info("Connection request received")
+ self.logger.debug("Connection request received")
self.readsock, _ = self.serversock.accept()
self.readsock.setblocking(0)
poll.unregister(self.serversock.fileno())
poll.register(self.readsock.fileno(), event_read_mask)
- self.logger.info("Setting connection established event")
+ self.logger.debug("Setting connection established event")
self.connection_established.set()
# Actual data to be logged
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py
index d554f0dbcd..364005bd2d 100644
--- a/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -1,6 +1,8 @@
+#
# Copyright (C) 2015 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# This module provides a class for starting qemu images of poky tiny.
# It's used by testimage.bbclass.
@@ -17,7 +19,7 @@ from .qemurunner import QemuRunner
class QemuTinyRunner(QemuRunner):
- def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, kernel, boottime):
+ def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, kernel, boottime, logger):
# Popen object for runqemu
self.runqemu = None
@@ -40,6 +42,7 @@ class QemuTinyRunner(QemuRunner):
self.socketfile = "console.sock"
self.server_socket = None
self.kernel = kernel
+ self.logger = logger
def create_socket(self):
@@ -60,7 +63,7 @@ class QemuTinyRunner(QemuRunner):
with open(self.logfile, "a") as f:
f.write("%s" % msg)
- def start(self, qemuparams = None, ssh=True, extra_bootparams=None):
+ def start(self, qemuparams = None, ssh=True, extra_bootparams=None, runqemuparams='', discard_writes=True):
if self.display:
os.environ["DISPLAY"] = self.display
@@ -107,14 +110,17 @@ class QemuTinyRunner(QemuRunner):
return self.is_alive()
- def run_serial(self, command):
+ def run_serial(self, command, timeout=60):
self.server_socket.sendall(command+'\n')
data = ''
status = 0
stopread = False
- endtime = time.time()+5
+ endtime = time.time()+timeout
while time.time()<endtime and not stopread:
- sread, _, _ = select.select([self.server_socket],[],[],5)
+ try:
+ sread, _, _ = select.select([self.server_socket],[],[],1)
+ except InterruptedError:
+ continue
for sock in sread:
answer = sock.recv(1024)
if answer:
@@ -124,6 +130,8 @@ class QemuTinyRunner(QemuRunner):
stopread = True
if not data:
status = 1
+ if not stopread:
+ data += "<<< run_serial(): command timed out after %d seconds without output >>>\r\n\r\n" % timeout
return (status, str(data))
def find_child(self,parent_pid):
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index da485ee408..49a07264c6 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -1,7 +1,8 @@
-# -*- coding: utf-8 -*-
+#
# Copyright (C) 2013 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# Provides a class for setting up ssh connections,
# running commands and copying files to/from a target.
@@ -52,17 +53,19 @@ class SSHProcess(object):
endtime = self.starttime + timeout
eof = False
while time.time() < endtime and not eof:
- if select.select([self.process.stdout], [], [], 5)[0] != []:
- data = os.read(self.process.stdout.fileno(), 1024)
- if not data:
- self.process.stdout.close()
- eof = True
- else:
- data = data.decode("utf-8")
- output += data
- self.log(data)
- endtime = time.time() + timeout
-
+ try:
+ if select.select([self.process.stdout], [], [], 5)[0] != []:
+ data = os.read(self.process.stdout.fileno(), 1024)
+ if not data:
+ self.process.stdout.close()
+ eof = True
+ else:
+ data = data.decode("utf-8")
+ output += data
+ self.log(data)
+ endtime = time.time() + timeout
+ except InterruptedError:
+ continue
# process hasn't returned yet
if not eof:
@@ -148,12 +151,9 @@ class SSHControl(object):
def copy_to(self, localpath, remotepath):
if os.path.islink(localpath):
- link = os.readlink(localpath)
- dst_dir, dst_base = os.path.split(remotepath)
- return self.run("cd %s; ln -s %s %s" % (dst_dir, link, dst_base))
- else:
- command = self.scp + [localpath, '%s@%s:%s' % (self.user, self.ip, remotepath)]
- return self._internal_run(command, ignore_status=False)
+ localpath = os.path.dirname(localpath) + "/" + os.readlink(localpath)
+ command = self.scp + [localpath, '%s@%s:%s' % (self.user, self.ip, remotepath)]
+ return self._internal_run(command, ignore_status=False)
def copy_from(self, remotepath, localpath):
command = self.scp + ['%s@%s:%s' % (self.user, self.ip, remotepath), localpath]
diff --git a/meta/lib/oeqa/utils/subprocesstweak.py b/meta/lib/oeqa/utils/subprocesstweak.py
new file mode 100644
index 0000000000..b47975a4bc
--- /dev/null
+++ b/meta/lib/oeqa/utils/subprocesstweak.py
@@ -0,0 +1,22 @@
+#
+# SPDX-License-Identifier: MIT
+#
+import subprocess
+
+class OETestCalledProcessError(subprocess.CalledProcessError):
+ def __str__(self):
+ def strify(o):
+ if isinstance(o, bytes):
+ return o.decode("utf-8", errors="replace")
+ else:
+ return o
+
+ s = "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode)
+ if hasattr(self, "output") and self.output:
+ s = s + "\nStandard Output: " + strify(self.output)
+ if hasattr(self, "stderr") and self.stderr:
+ s = s + "\nStandard Error: " + strify(self.stderr)
+ return s
+
+def errors_have_output():
+ subprocess.CalledProcessError = OETestCalledProcessError
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index 59593f5ef3..1055810ca3 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ b/meta/lib/oeqa/utils/targetbuild.py
@@ -1,6 +1,8 @@
+#
# Copyright (C) 2013 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# Provides a class for automating build tests for projects
@@ -8,15 +10,21 @@ import os
import re
import bb.utils
import subprocess
+import tempfile
from abc import ABCMeta, abstractmethod
class BuildProject(metaclass=ABCMeta):
- def __init__(self, d, uri, foldername=None, tmpdir="/tmp/"):
+ def __init__(self, d, uri, foldername=None, tmpdir=None):
self.d = d
self.uri = uri
self.archive = os.path.basename(uri)
- self.localarchive = os.path.join(tmpdir,self.archive)
+ if not tmpdir:
+ tmpdir = self.d.getVar('WORKDIR')
+ if not tmpdir:
+ self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-')
+ tmpdir = self.tempdirobj.name
+ self.localarchive = os.path.join(tmpdir, self.archive)
if foldername:
self.fname = foldername
else:
@@ -24,8 +32,7 @@ class BuildProject(metaclass=ABCMeta):
# Download self.archive to self.localarchive
def _download_archive(self):
-
- dl_dir = self.d.getVar("DL_DIR", True)
+ dl_dir = self.d.getVar("DL_DIR")
if dl_dir and os.path.exists(os.path.join(dl_dir, self.archive)):
bb.utils.copyfile(os.path.join(dl_dir, self.archive), self.localarchive)
return
@@ -40,12 +47,12 @@ class BuildProject(metaclass=ABCMeta):
cmd = ''
for var in exportvars:
- val = self.d.getVar(var, True)
+ val = self.d.getVar(var)
if val:
cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
cmd = cmd + "wget -O %s %s" % (self.localarchive, self.uri)
- subprocess.check_call(cmd, shell=True)
+ subprocess.check_output(cmd, shell=True)
# This method should provide a way to run a command in the desired environment.
@abstractmethod
@@ -65,7 +72,7 @@ class BuildProject(metaclass=ABCMeta):
def clean(self):
self._run('rm -rf %s' % self.targetdir)
- subprocess.call('rm -f %s' % self.localarchive, shell=True)
+ subprocess.check_call('rm -f %s' % self.localarchive, shell=True)
pass
class TargetBuildProject(BuildProject):
@@ -73,7 +80,7 @@ class TargetBuildProject(BuildProject):
def __init__(self, target, d, uri, foldername=None):
self.target = target
self.targetdir = "~/"
- BuildProject.__init__(self, d, uri, foldername, tmpdir="/tmp")
+ BuildProject.__init__(self, d, uri, foldername)
def download_archive(self):
@@ -103,8 +110,8 @@ class SDKBuildProject(BuildProject):
self.testdir = testpath
self.targetdir = testpath
bb.utils.mkdirhier(testpath)
- self.datetime = d.getVar('DATETIME', True)
- self.testlogdir = d.getVar("TEST_LOG_DIR", True)
+ self.datetime = d.getVar('DATETIME')
+ self.testlogdir = d.getVar("TEST_LOG_DIR")
bb.utils.mkdirhier(self.testlogdir)
self.logfile = os.path.join(self.testlogdir, "sdk_target_log.%s" % self.datetime)
BuildProject.__init__(self, d, uri, foldername, tmpdir=testpath)
@@ -114,7 +121,7 @@ class SDKBuildProject(BuildProject):
self._download_archive()
cmd = 'tar xf %s%s -C %s' % (self.targetdir, self.archive, self.targetdir)
- subprocess.check_call(cmd, shell=True)
+ subprocess.check_output(cmd, shell=True)
#Change targetdir to project folder
self.targetdir = os.path.join(self.targetdir, self.fname)
@@ -132,4 +139,4 @@ class SDKBuildProject(BuildProject):
def _run(self, cmd):
self.log("Running . %s; " % self.sdkenv + cmd)
- return subprocess.call(". %s; " % self.sdkenv + cmd, shell=True)
+ return subprocess.check_call(". %s; " % self.sdkenv + cmd, shell=True)
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
index 57be2ca449..e89d130a9c 100644
--- a/meta/lib/oeqa/utils/testexport.py
+++ b/meta/lib/oeqa/utils/testexport.py
@@ -1,6 +1,8 @@
+#
# Copyright (C) 2015 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
# Provides functions to help with exporting binaries obtained from built targets
@@ -72,9 +74,9 @@ def process_binaries(d, params):
return extract_bin_command
if determine_if_poky_env(): # machine with poky environment
- exportpath = d.getVar("TEST_EXPORT_DIR", True) if export_env else d.getVar("DEPLOY_DIR", True)
- rpm_deploy_dir = d.getVar("DEPLOY_DIR_RPM", True)
- arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(rpm_deploy_dir))
+ exportpath = d.getVar("TEST_EXPORT_DIR") if export_env else d.getVar("DEPLOY_DIR")
+ rpm_deploy_dir = d.getVar("DEPLOY_DIR_RPM")
+ arch = get_dest_folder(d.getVar("TUNE_FEATURES"), os.listdir(rpm_deploy_dir))
arch_rpm_dir = os.path.join(rpm_deploy_dir, arch)
extracted_bin_dir = os.path.join(exportpath,"binaries", arch, "extracted_binaries")
packaged_bin_dir = os.path.join(exportpath,"binaries", arch, "packaged_binaries")
@@ -92,7 +94,7 @@ def process_binaries(d, params):
return ""
for item in native_rpm_file_list:# will copy all versions of package. Used version will be selected on remote machine
bb.plain("Copying native package file: %s" % item)
- sh.copy(os.path.join(rpm_deploy_dir, native_rpm_dir, item), os.path.join(d.getVar("TEST_EXPORT_DIR", True), "binaries", "native"))
+ sh.copy(os.path.join(rpm_deploy_dir, native_rpm_dir, item), os.path.join(d.getVar("TEST_EXPORT_DIR"), "binaries", "native"))
else: # nothing to do here; running tests under bitbake, so we asume native binaries are in sysroots dir.
if param_list[1] or param_list[4]:
bb.warn("Native binary %s %s%s. Running tests under bitbake environment. Version can't be checked except when the test itself does it"
@@ -148,7 +150,7 @@ def process_binaries(d, params):
else: # this is for target device
if param_list[2] == "rpm":
return "No need to extract, this is an .rpm file"
- arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(binaries_path))
+ arch = get_dest_folder(d.getVar("TUNE_FEATURES"), os.listdir(binaries_path))
extracted_bin_path = os.path.join(binaries_path, arch, "extracted_binaries")
extracted_bin_list = [item for item in os.listdir(extracted_bin_path)]
packaged_bin_path = os.path.join(binaries_path, arch, "packaged_binaries")
@@ -206,9 +208,9 @@ def send_bin_to_DUT(d,params):
from oeqa.oetest import oeRuntimeTest
param_list = params
cleanup_list = list()
- bins_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True), "binaries") if determine_if_poky_env() \
+ bins_dir = os.path.join(d.getVar("TEST_EXPORT_DIR"), "binaries") if determine_if_poky_env() \
else os.getenv("bin_dir")
- arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(bins_dir))
+ arch = get_dest_folder(d.getVar("TUNE_FEATURES"), os.listdir(bins_dir))
arch_rpms_dir = os.path.join(bins_dir, arch, "packaged_binaries")
extracted_bin_dir = os.path.join(bins_dir, arch, "extracted_binaries", param_list[0])
diff --git a/meta/lib/rootfspostcommands.py b/meta/lib/rootfspostcommands.py
new file mode 100644
index 0000000000..fdb9f5b850
--- /dev/null
+++ b/meta/lib/rootfspostcommands.py
@@ -0,0 +1,60 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os
+
+def sort_file(filename, mapping):
+ """
+ Sorts a passwd or group file based on the numeric ID in the third column.
+ If a mapping is given, the name from the first column is mapped via that
+ dictionary instead (necessary for /etc/shadow and /etc/gshadow). If not,
+ a new mapping is created on the fly and returned.
+ """
+ new_mapping = {}
+ with open(filename, 'rb+') as f:
+ lines = f.readlines()
+ # No explicit error checking for the sake of simplicity. /etc
+ # files are assumed to be well-formed, causing exceptions if
+ # not.
+ for line in lines:
+ entries = line.split(b':')
+ name = entries[0]
+ if mapping is None:
+ id = int(entries[2])
+ else:
+ id = mapping[name]
+ new_mapping[name] = id
+ # Sort by numeric id first, with entire line as secondary key
+ # (just in case that there is more than one entry for the same id).
+ lines.sort(key=lambda line: (new_mapping[line.split(b':')[0]], line))
+ # We overwrite the entire file, i.e. no truncate() necessary.
+ f.seek(0)
+ f.write(b''.join(lines))
+ return new_mapping
+
+def remove_backup(filename):
+ """
+ Removes the backup file for files like /etc/passwd.
+ """
+ backup_filename = filename + '-'
+ if os.path.exists(backup_filename):
+ os.unlink(backup_filename)
+
+def sort_passwd(sysconfdir):
+ """
+ Sorts passwd and group files in a rootfs /etc directory by ID.
+ Backup files are sometimes are inconsistent and then cannot be
+ sorted (YOCTO #11043), and more importantly, are not needed in
+ the initial rootfs, so they get deleted.
+ """
+ for main, shadow in (('passwd', 'shadow'),
+ ('group', 'gshadow')):
+ filename = os.path.join(sysconfdir, main)
+ remove_backup(filename)
+ if os.path.exists(filename):
+ mapping = sort_file(filename, None)
+ filename = os.path.join(sysconfdir, shadow)
+ remove_backup(filename)
+ if os.path.exists(filename):
+ sort_file(filename, mapping)
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc
index 12ec19bbb0..1e43e7a9db 100644
--- a/meta/recipes-bsp/acpid/acpid.inc
+++ b/meta/recipes-bsp/acpid/acpid.inc
@@ -1,4 +1,10 @@
SUMMARY = "A daemon for delivering ACPI events"
+DESCRIPTION = "ACPID is a completely flexible, totally extensible daemon for \
+delivering ACPI events. It listens on netlink interface (or on the \
+deprecated file /proc/acpi/event), and when an event occurs, executes programs \
+to handle the event. The programs it executes are configured through a set of \
+configuration files, which can be dropped into place by packages or by the \
+admin."
HOMEPAGE = "http://sourceforge.net/projects/acpid2"
BUGTRACKER = "http://sourceforge.net/p/acpid2/tickets/?source=navbar"
SECTION = "base"
@@ -9,6 +15,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
file://acpid.service \
"
+CVE_PRODUCT = "acpid2"
+
inherit autotools update-rc.d systemd
INITSCRIPT_NAME = "acpid"
diff --git a/meta/recipes-bsp/acpid/acpid_2.0.27.bb b/meta/recipes-bsp/acpid/acpid_2.0.27.bb
deleted file mode 100644
index 509fcfe9af..0000000000
--- a/meta/recipes-bsp/acpid/acpid_2.0.27.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require acpid.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
- file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
-
-SRC_URI[md5sum] = "e41bdf628e122edb4342fca432ea7db9"
-SRC_URI[sha256sum] = "820c223e53cc11d9d7229fb1ffc2c2205f1054082c80f83f5a4ec4df16d3a616"
diff --git a/meta/recipes-bsp/acpid/acpid_2.0.32.bb b/meta/recipes-bsp/acpid/acpid_2.0.32.bb
new file mode 100644
index 0000000000..227e4a4675
--- /dev/null
+++ b/meta/recipes-bsp/acpid/acpid_2.0.32.bb
@@ -0,0 +1,7 @@
+require acpid.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+ file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
+
+SRC_URI[md5sum] = "248995264b9d1cd8bdb923d5b190fd44"
+SRC_URI[sha256sum] = "f2d2d30b3edc3234bd82f6f7186699a6aa3c85c8d20bc4e30e9b3c68a1ed157e"
diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb
index d0f7bb3305..0670556999 100644
--- a/meta/recipes-bsp/alsa-state/alsa-state.bb
+++ b/meta/recipes-bsp/alsa-state/alsa-state.bb
@@ -5,6 +5,7 @@
# Filename: alsa-state.bb
SUMMARY = "Alsa scenario files to enable alsa state restoration"
+HOMEPAGE = "http://www.alsa-project.org/"
DESCRIPTION = "Alsa Scenario Files - an init script and state files to restore \
sound state at system boot and save it at system shut down."
LICENSE = "MIT"
diff --git a/meta/recipes-bsp/apmd/apmd/legacy.patch b/meta/recipes-bsp/apmd/apmd/legacy.patch
index 5db895e8fe..8871311805 100644
--- a/meta/recipes-bsp/apmd/apmd/legacy.patch
+++ b/meta/recipes-bsp/apmd/apmd/legacy.patch
@@ -7,7 +7,7 @@ This patch is taken from
ftp://ftp.debian.org/debian/pool/main/a/apmd/apmd_3.2.2-15.debian.tar.xz
Upstream-Status: Inappropriate [upstream is dead]
-Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
Makefile | 2 +-
diff --git a/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb b/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb
deleted file mode 100644
index c2a02aadbb..0000000000
--- a/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "eeePC specific ACPI scripts"
-HOMEPAGE = "http://alioth.debian.org/projects/debian-eeepc/"
-SECTION = "base"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=77ef83ab5f4af938a93edb61f7b74f2c"
-
-SRCREV = "9d4cdedca25b396405f8587f9c4fbf8229e041c2"
-PV = "1.1.12+git${SRCPV}"
-
-SRC_URI = "git://git.debian.org/git/debian-eeepc/eeepc-acpi-scripts.git \
- file://remove-doc-check.patch \
- file://powerbtn.patch \
- file://policy-funcs "
-
-S = "${WORKDIR}/git"
-
-FILES_${PN} = "${datadir}/acpi-support/ \
- ${datadir}/eeepc-acpi-scripts \
- ${sysconfdir}/default/ \
- ${sysconfdir}/acpi/"
-
-do_install () {
- install -d ${D}${sysconfdir}/default/
- install -d ${D}${sysconfdir}/acpi/actions/
- install -d ${D}${sysconfdir}/acpi/events/
- install -d ${D}${sysconfdir}/acpi/lib/udev/rules.d
- install -d ${D}${datadir}/eeepc-acpi-scripts/
- install -d ${D}${datadir}/acpi-support/
- install -m 644 ${S}/events/* ${D}${sysconfdir}/acpi/events/
- install -m 644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/acpi/lib/udev/rules.d/
- install ${S}/actions/* ${D}${sysconfdir}/acpi/actions/
- install -m 0644 ${S}/acpilib/functions.sh ${D}${datadir}/eeepc-acpi-scripts/
- install -m 0644 ${WORKDIR}/policy-funcs ${D}${datadir}/acpi-support/
- install -m 0644 ${S}/debian/eeepc-acpi-scripts.default* ${D}${sysconfdir}/default/
-}
-
-RDEPENDS_${PN} = "pm-utils"
-
diff --git a/meta/recipes-bsp/eee-acpi-scripts/files/policy-funcs b/meta/recipes-bsp/eee-acpi-scripts/files/policy-funcs
deleted file mode 100644
index fd099df0d8..0000000000
--- a/meta/recipes-bsp/eee-acpi-scripts/files/policy-funcs
+++ /dev/null
@@ -1,8 +0,0 @@
-CheckPolicy() {
- if pidof gnome-power-manager kpowersave > /dev/null ||
- (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded kded loadedModules | grep -q klaptopdaemon) ; then
- echo 0;
- else
- echo 1;
- fi
-}
diff --git a/meta/recipes-bsp/eee-acpi-scripts/files/powerbtn.patch b/meta/recipes-bsp/eee-acpi-scripts/files/powerbtn.patch
deleted file mode 100644
index 403e5569b8..0000000000
--- a/meta/recipes-bsp/eee-acpi-scripts/files/powerbtn.patch
+++ /dev/null
@@ -1,22 +0,0 @@
----
- actions/power.sh | 3 +++
- events/powerbtn | 2 ++
- 2 files changed, 5 insertions(+)
-
-Upstream-Status: Inappropriate [enable feature]
-
-Index: git/events/powerbtn
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/events/powerbtn 2008-10-08 17:43:35.000000000 +0200
-@@ -0,0 +1,2 @@
-+event=button/power PWRF
-+action=/etc/acpi/actions/power.sh
-Index: git/actions/power.sh
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/actions/power.sh 2008-10-08 17:45:26.000000000 +0200
-@@ -0,0 +1,3 @@
-+#!/bin/sh
-+
-+/sbin/shutdown -h now "Power button pressed"
diff --git a/meta/recipes-bsp/eee-acpi-scripts/files/remove-doc-check.patch b/meta/recipes-bsp/eee-acpi-scripts/files/remove-doc-check.patch
deleted file mode 100644
index efb3dca7ac..0000000000
--- a/meta/recipes-bsp/eee-acpi-scripts/files/remove-doc-check.patch
+++ /dev/null
@@ -1,60 +0,0 @@
----
- actions/hotkey.sh | 3 ---
- actions/suspend.sh | 3 ---
- actions/vga-toggle.sh | 3 ---
- actions/volume.sh | 3 ---
- 4 files changed, 12 deletions(-)
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: git/eeepc-acpi-scripts/volume.sh
-===================================================================
---- git.orig/eeepc-acpi-scripts/volume.sh 2011-11-29 19:21:55.000000000 +0800
-+++ git/eeepc-acpi-scripts/volume.sh 2011-11-29 19:41:36.000000000 +0800
-@@ -3,12 +3,10 @@
- [ -d /sys/devices/platform/eeepc ] || [ -d /sys/devices/platform/eeepc-wmi ] || exit 0
- # Volume controls
-
--# do nothing if package is removed
- PKG=eeepc-acpi-scripts
- PKG_DIR=/usr/share/acpi-support/$PKG
- FUNC_LIB=$PKG_DIR/lib/functions.sh
- DEFAULT=/etc/default/$PKG
--[ -e "$FUNC_LIB" ] || exit 0
-
- . $FUNC_LIB
- . $PKG_DIR/lib/sound.sh
-Index: git/eeepc-acpi-scripts/hotkey.sh
-===================================================================
---- git.orig/eeepc-acpi-scripts/hotkey.sh 2011-11-29 19:21:55.000000000 +0800
-+++ git/eeepc-acpi-scripts/hotkey.sh 2011-11-29 19:39:51.000000000 +0800
-@@ -1,12 +1,10 @@
- #!/bin/sh
-
- [ -d /sys/devices/platform/eeepc ] || [ -d /sys/devices/platform/eeepc-wmi ] || exit 0
--# do nothing if package is removed
- PKG=eeepc-acpi-scripts
- PKG_DIR=/usr/share/acpi-support/$PKG
- FUNC_LIB=$PKG_DIR/lib/functions.sh
- DEFAULT=/etc/default/$PKG
--[ -e "$FUNC_LIB" ] || exit 0
-
- case $(runlevel) in
- *0|*6)
-Index: git/eeepc-acpi-scripts/vga-toggle.sh
-===================================================================
---- git.orig/eeepc-acpi-scripts/vga-toggle.sh 2011-11-29 19:21:55.000000000 +0800
-+++ git/eeepc-acpi-scripts/vga-toggle.sh 2011-11-29 19:40:24.000000000 +0800
-@@ -1,12 +1,10 @@
- #!/bin/sh
-
- [ -d /sys/devices/platform/eeepc ] || [ -d /sys/devices/platform/eeepc-wmi ] || exit 0
--# do nothing if package is removed
- PKG=eeepc-acpi-scripts
- PKG_DIR=/usr/share/acpi-support/$PKG
- FUNC_LIB=$PKG_DIR/lib/functions.sh
- DEFAULT=/etc/default/$PKG
--[ -e "$FUNC_LIB" ] || exit 0
-
- if [ -e "$DEFAULT" ]; then . "$DEFAULT"; fi
- . $FUNC_LIB
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch
new file mode 100644
index 0000000000..42f3a8182d
--- /dev/null
+++ b/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch
@@ -0,0 +1,31 @@
+From 99b578501643377e0b1994b2a068b790d189d5ad Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Wed, 13 Jun 2018 09:41:01 -0400
+Subject: [PATCH] remove extra decl
+
+Signed-off-by: Peter Jones <pjones@redhat.com>
+
+Upstream-Status: Backport [git://github.com/rhinstaller/efibootmgr.git]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ src/efibootmgr.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/efibootmgr.c b/src/efibootmgr.c
+index de38f01..4e1a680 100644
+--- a/src/efibootmgr.c
++++ b/src/efibootmgr.c
+@@ -1536,9 +1536,6 @@ parse_opts(int argc, char **argv)
+ "invalid numeric value %s\n",
+ optarg);
+ }
+- /* XXX efivar-36 accidentally doesn't have a public
+- * header for this */
+- extern int efi_set_verbose(int verbosity, FILE *errlog);
+ efi_set_verbose(opts.verbose - 2, stderr);
+ break;
+ case 'V':
+--
+2.7.4
+
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch
new file mode 100644
index 0000000000..9525ed8c54
--- /dev/null
+++ b/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch
@@ -0,0 +1,83 @@
+From 97668ae0bce776a36ea2001dea63d376be8274ac Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Wed, 6 Mar 2019 13:08:33 -0500
+Subject: [PATCH] Make sure PKGS= is propogated into the submake for "make
+ deps"
+
+When we're doing make deps with "$(CC) -MF", gcc and clang have different
+behavior, both broken in different ways, which we're hitting because of a
+missing -I argument for libefivar's includes. On clang, when a header can't
+be found, it emits a rule with the header as a prerequisite without a path,
+such as efivar.h here:
+
+efibootmgr.o: efibootmgr.c fix_coverity.h efivar.h efiboot.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
+ error.h
+
+Then the build that utilizes that rule will fail to find the
+prerequisite and tell you something like:
+
+make[1]: *** No rule to make target 'efivar.h', needed by 'efibootmgr.o'. Stop.
+make[1]: Leaving directory '/home/pjones/devel/github.com/efibootmgr/master/src'
+
+With gcc, when a header can't be found, it emits a rule without that header
+as a prerequisite, as such (again with efivar.h):
+
+efibootmgr.o: efibootmgr.c fix_coverity.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
+ error.h
+
+And then your build will fail if you haven't adjusted CFLAGS to tell it
+where to find the header.
+
+Both of these would be better just erroring, but at least gcc's doesn't
+insert a *wrong* dependency.
+
+This patch adds "PKGS=efivar efibootmgr popt" for all deps under src/.
+Technically that's overkill, as efibootmgr itself doesn't need popt, but it
+doesn't hurt anything to have the extra part there. The resulting
+.efibootmgr.d file has the prerequisites expressed correctly:
+
+efibootmgr.o: efibootmgr.c fix_coverity.h /usr/include/efivar/efivar.h \
+ /usr/include/efivar/efiboot.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
+ error.h
+
+This fixes the issue described in github PR #96
+
+Signed-off-by: Peter Jones <pjones@redhat.com>
+Upstream-Status: Backport [https://github.com/rhboot/efibootmgr/commit/97668ae0bce776a36ea2001dea63d376be8274ac]
+---
+ src/Makefile | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 258bac1..32fa188 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -31,8 +31,13 @@ efibootdump : PKGS=efivar efiboot popt
+ efibootnext : $(call objects-of,$(EFIBOOTNEXT_SOURCES))
+ efibootnext : PKGS=efivar efiboot popt
+
++deps : PKGS=efivar efiboot popt
+ deps : $(ALL_SOURCES)
+- $(MAKE) -f $(TOPDIR)/Make.deps deps SOURCES="$(ALL_SOURCES)" SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)"
++ $(MAKE) -f $(TOPDIR)/Make.deps \
++ SOURCES="$(ALL_SOURCES)" \
++ SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" \
++ PKGS="$(PKGS)" \
++ deps
+
+ clean :
+ @rm -rfv *.o *.a *.so $(TARGETS)
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb b/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
new file mode 100644
index 0000000000..5d6f200a73
--- /dev/null
+++ b/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "Linux user-space application to modify the EFI Boot Manager."
+SUMMARY = "EFI Boot Manager"
+HOMEPAGE = "https://github.com/rhboot/efibootmgr"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "efivar popt"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \
+ file://0001-remove-extra-decl.patch \
+ file://97668ae0bce776a36ea2001dea63d376be8274ac.patch \
+ "
+SRCREV = "e067160ecef8208e1944002e5d50b275733211fb"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+# The directory under the ESP that the default bootloader is found in. When
+# wic uses a subdirectory, this should use the same one too.
+EFIDIR ?= "/"
+
+EXTRA_OEMAKE += "'EFIDIR=${EFIDIR}'"
+
+CFLAGS += " -Wno-error"
+
+do_install () {
+ oe_runmake install DESTDIR="${D}"
+}
+
+CLEANBROKEN = "1"
diff --git a/meta/recipes-bsp/efivar/efivar/no-werror.patch b/meta/recipes-bsp/efivar/efivar/no-werror.patch
new file mode 100644
index 0000000000..50a0b1023a
--- /dev/null
+++ b/meta/recipes-bsp/efivar/efivar/no-werror.patch
@@ -0,0 +1,18 @@
+Don't use -Werror because newer compilers introduce newer warnings.
+
+Upstream-Status: Inappropriate [https://github.com/rhboot/efivar/issues/131]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gcc.specs b/gcc.specs
+index 45d43d1..1baf11a 100644
+--- a/gcc.specs
++++ b/gcc.specs
+@@ -2,7 +2,7 @@
+ + -D_GNU_SOURCE
+
+ *efivar_cpp_options:
+- -Werror -Wall -std=gnu11 -Wextra
++ -Wall -std=gnu11 -Wextra
+
+ *cpp_options:
+ + %(efivar_cpp_options)
diff --git a/meta/recipes-bsp/efivar/efivar_37.bb b/meta/recipes-bsp/efivar/efivar_37.bb
new file mode 100644
index 0000000000..9b95721a4e
--- /dev/null
+++ b/meta/recipes-bsp/efivar/efivar_37.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Tools to manipulate UEFI variables"
+DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility"
+HOMEPAGE = "https://github.com/rhboot/efivar"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+SRC_URI = "git://github.com/rhinstaller/efivar.git \
+ file://no-werror.patch"
+SRCREV = "c1d6b10e1ed4ba2be07f385eae5bceb694478a10"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+export CCLD_FOR_BUILD = "${BUILD_CCLD}"
+
+# Upstream uses --add-needed in gcc.specs which gold doesn't support, so
+# enforce BFD.
+LDFLAGS += "-fuse-ld=bfd"
+
+do_compile_prepend() {
+ # Remove when https://github.com/rhboot/efivar/issues/130 is fixed
+ oe_runmake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ LDFLAGS="${BUILD_LDFLAGS}" \
+ -C src makeguids
+}
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}
+
+BBCLASSEXTEND = "native"
+
+RRECOMMENDS_${PN}_class-target = "kernel-module-efivarfs"
+
+CLEANBROKEN = "1"
diff --git a/meta/recipes-bsp/formfactor/formfactor_0.0.bb b/meta/recipes-bsp/formfactor/formfactor_0.0.bb
index 5c30bd510d..ea1fa4c754 100644
--- a/meta/recipes-bsp/formfactor/formfactor_0.0.bb
+++ b/meta/recipes-bsp/formfactor/formfactor_0.0.bb
@@ -1,8 +1,10 @@
SUMMARY = "Device formfactor information"
+DESCRIPTION = "A formfactor configuration file provides information about the \
+target hardware for which the image is being built and information that the \
+build system cannot obtain from other sources such as the kernel."
SECTION = "base"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PR = "r45"
SRC_URI = "file://config file://machconfig"
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/aarch64-initplat.c-fix-const-qualifier.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/aarch64-initplat.c-fix-const-qualifier.patch
deleted file mode 100644
index 965f074ebe..0000000000
--- a/meta/recipes-bsp/gnu-efi/gnu-efi/aarch64-initplat.c-fix-const-qualifier.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From dc83b84dc8b4e71efce47143497aac6c126065cf Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 18 Jul 2016 08:40:29 -0700
-Subject: [PATCH] lib/aarch64/initplat.c: fix const qualifier
-
-Fixed:
-initplat.c:44:35: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
- unsigned char *p = dest, *q = src;
- ^~~
-cc1: all warnings being treated as errors
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- lib/aarch64/initplat.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/aarch64/initplat.c b/lib/aarch64/initplat.c
-index 2ac03a7..aae7beb 100644
---- a/lib/aarch64/initplat.c
-+++ b/lib/aarch64/initplat.c
-@@ -41,7 +41,8 @@ void *memset(void *s, int c, __SIZE_TYPE__ n)
-
- void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n)
- {
-- unsigned char *p = dest, *q = src;
-+ unsigned char *p = dest;
-+ const unsigned char *q = src;
-
- while (n--)
- *p++ = *q++;
---
-2.9.0
-
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch
deleted file mode 100644
index 0ce6d7b0cb..0000000000
--- a/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-don't break with old compilers and -DGNU_EFI_USE_MS_ABI
-It's entirely legitimate to request GNU_EFI_USE_MS_ABI even if the current
-compiler doesn't support it, and gnu-efi should transparently fall back to
-using legacy techniques to set the calling convention. We don't get type
-checking, but at least it will still compile.
-
-Author: Steve Langasek <steve.langasek@ubuntu.com>
-Upstream-Status: Pending
-Index: gnu-efi-3.0.3/inc/x86_64/efibind.h
-===================================================================
---- gnu-efi-3.0.3.orig/inc/x86_64/efibind.h
-+++ gnu-efi-3.0.3/inc/x86_64/efibind.h
-@@ -25,8 +25,6 @@ Revision History
- #if defined(GNU_EFI_USE_MS_ABI)
- #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
- #define HAVE_USE_MS_ABI 1
-- #else
-- #error Compiler is too old for GNU_EFI_USE_MS_ABI
- #endif
- #endif
-
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch
new file mode 100644
index 0000000000..c6d660095e
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch
@@ -0,0 +1,24 @@
+Fix building with CLANG-9.0.0
+
+Fixes
+clang-9: error: unknown argument: '-maccumulate-outgoing-args'
+
+Upstream-Status: Submitted [https://sourceforge.net/p/gnu-efi/patches/70/]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -110,10 +110,10 @@
+ || ( [ $(GCCVERSION) -eq "4" ] \
+ && [ $(GCCMINOR) -ge "7" ] ) ) \
+ && echo 1)
+- ifeq ($(GCCNEWENOUGH),1)
+- CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
+- else ifeq ($(USING_CLANG),clang)
++ ifeq ($(USING_CLANG),clang)
+ CPPFLAGS += -DGNU_EFI_USE_MS_ABI --std=c11
++ else ifeq ($(GCCNEWENOUGH),1)
++ CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
+ endif
+
+ CFLAGS += -mno-red-zone
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch
index 1b2ae1ef06..dc00b8fa4d 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch
@@ -1,7 +1,7 @@
-From 0daa354a16aa3cade56ed423d0f8a04cf1c22f9d Mon Sep 17 00:00:00 2001
+From 3ec8c2a70304eabd5760937a4ec3fbc4068a77ed Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Thu, 23 Apr 2015 01:49:31 -0700
-Subject: [PATCH] lib/Makefile: fix parallel issue
+Subject: [PATCH 2/3] lib/Makefile: fix parallel issue
Fixed:
Assembler messages:
@@ -17,22 +17,22 @@ Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- lib/Makefile | 2 ++
+ lib/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/Makefile b/lib/Makefile
-index dc4b94a..f64d1ed 100644
+index 048751a..ed39bbb 100644
--- a/lib/Makefile
+++ b/lib/Makefile
-@@ -73,6 +73,8 @@ all: libsubdirs libefi.a
+@@ -74,6 +74,8 @@ all: libsubdirs libefi.a
libsubdirs:
for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
+$(OBJS): libsubdirs
+
libefi.a: $(OBJS)
- $(AR) rv $@ $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
--
-1.7.9.5
+2.7.4
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch
index e5b47c197a..8a0138bbe5 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch
@@ -1,4 +1,7 @@
-Fix parallel make failure for archives
+From 48b2cdbcd761105e8ebad412fcbf23db1ac4ef7c Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw@linux.intel.com>
+Date: Sun, 9 Mar 2014 15:22:15 +0200
+Subject: [PATCH 1/3] Fix parallel make failure for archives
Upstream-Status: Pending
@@ -12,37 +15,24 @@ for details.
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
----
----
- gnuefi/Makefile | 3 ++-
- lib/Makefile | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
+[Rebased for 3.0.6]
+Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
+[Rebased for 3.0.8]
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-Index: gnu-efi-3.0/lib/Makefile
-===================================================================
---- gnu-efi-3.0.orig/lib/Makefile
-+++ gnu-efi-3.0/lib/Makefile
-@@ -66,7 +66,8 @@ all: libsubdirs libefi.a
- libsubdirs:
+diff --git a/lib/Makefile b/lib/Makefile
+index 0e6410d..048751a 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -75,7 +75,7 @@ libsubdirs:
for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
--libefi.a: $(patsubst %,libefi.a(%),$(OBJS))
-+libefi.a: $(OBJS)
-+ $(AR) rv $@ $(OBJS)
+ libefi.a: $(OBJS)
+- $(AR) $(ARFLAGS) $@ $^
++ $(AR) $(ARFLAGS) $@ $(OBJS)
clean:
rm -f libefi.a *~ $(OBJS) */*.o
-Index: gnu-efi-3.0/gnuefi/Makefile
-===================================================================
---- gnu-efi-3.0.orig/gnuefi/Makefile
-+++ gnu-efi-3.0/gnuefi/Makefile
-@@ -51,7 +51,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a
-
- all: $(TARGETS)
-
--libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
-+libgnuefi.a: $(OBJS)
-+ $(AR) rv $@ $(OBJS)
-
- clean:
- rm -f $(TARGETS) *~ *.o $(OBJS)
+--
+2.7.4
+
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.11.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.11.bb
new file mode 100644
index 0000000000..9954d7f57a
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.11.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Libraries for producing EFI binaries"
+HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
+SECTION = "devel"
+LICENSE = "GPLv2+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
+ file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
+ file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \
+ file://inc/efishellparm.h;beginline=4;endline=11;md5=468b1231b05bbc84bae3a0d5774e3bb5 \
+ file://lib/arm/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
+ file://lib/arm/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
+ file://lib/aarch64/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
+ file://lib/aarch64/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
+ file://parallel-make-archives.patch \
+ file://lib-Makefile-fix-parallel-issue.patch \
+ file://gnu-efi-3.0.9-fix-clang-build.patch \
+ "
+
+SRC_URI[md5sum] = "21148bbcccec385a9bfdf5f678959577"
+SRC_URI[sha256sum] = "f28da792a2532e91e18e0101468811739a22cde9eee5eacfd0efb9bf3a61d6b9"
+
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
+COMPATIBLE_HOST_armv4 = 'null'
+
+do_configure_linux-gnux32_prepend() {
+ cp ${STAGING_INCDIR}/gnu/stubs-x32.h ${STAGING_INCDIR}/gnu/stubs-64.h
+ cp ${STAGING_INCDIR}/bits/long-double-32.h ${STAGING_INCDIR}/bits/long-double-64.h
+}
+
+def gnu_efi_arch(d):
+ import re
+ tarch = d.getVar("TARGET_ARCH")
+ if re.match("i[3456789]86", tarch):
+ return "ia32"
+ return tarch
+
+EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
+ 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \
+ "
+
+# gnu-efi's Makefile treats prefix as toolchain prefix, so don't
+# export it.
+prefix[unexport] = "1"
+
+do_install() {
+ oe_runmake install INSTALLROOT="${D}"
+}
+
+FILES_${PN} += "${libdir}/*.lds"
+
+# 64-bit binaries are expected for EFI when targeting X32
+INSANE_SKIP_${PN}-dev_append_linux-gnux32 = " arch"
+INSANE_SKIP_${PN}-dev_append_linux-muslx32 = " arch"
+
+BBCLASSEXTEND = "native"
+
+# It doesn't support sse, its make.defaults sets:
+# CFLAGS += -mno-mmx -mno-sse
+# So also remove -mfpmath=sse from TUNE_CCARGS
+TUNE_CCARGS_remove = "-mfpmath=sse"
+
+python () {
+ ccargs = d.getVar('TUNE_CCARGS').split()
+ if '-mx32' in ccargs:
+ # use x86_64 EFI ABI
+ ccargs.remove('-mx32')
+ ccargs.append('-m64')
+ d.setVar('TUNE_CCARGS', ' '.join(ccargs))
+}
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
deleted file mode 100644
index e0d8ee76dd..0000000000
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Libraries for producing EFI binaries"
-HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
-SECTION = "devel"
-LICENSE = "GPLv2+ | BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
- file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
- file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \
- file://inc/efishellparm.h;beginline=4;endline=11;md5=468b1231b05bbc84bae3a0d5774e3bb5 \
- file://lib/arm/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
- file://lib/arm/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
- file://lib/aarch64/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
- file://lib/aarch64/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
- "
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
- file://parallel-make-archives.patch \
- file://lib-Makefile-fix-parallel-issue.patch \
- file://gcc46-compatibility.patch \
- file://aarch64-initplat.c-fix-const-qualifier.patch \
- "
-
-SRC_URI[md5sum] = "612e0f327f31c4b8468ef55f4eeb9649"
-SRC_URI[sha256sum] = "51a00428c3ccb96db24089ed8394843c4f83cf8f42c6a4dfddb4b7c23f2bf8af"
-
-COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
-COMPATIBLE_HOST_armv4 = 'null'
-
-def gnu_efi_arch(d):
- import re
- tarch = d.getVar("TARGET_ARCH", True)
- if re.match("i[3456789]86", tarch):
- return "ia32"
- return tarch
-
-EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
- 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \
- "
-
-# gnu-efi's Makefile treats prefix as toolchain prefix, so don't
-# export it.
-prefix[unexport] = "1"
-
-do_install() {
- oe_runmake install INSTALLROOT="${D}"
-}
-
-FILES_${PN} += "${libdir}/*.lds"
-
-BBCLASSEXTEND = "native"
-
-# It doesn't support sse, its make.defaults sets:
-# CFLAGS += -mno-mmx -mno-sse
-# So also remove -mfpmath=sse from TUNE_CCARGS
-TUNE_CCARGS_remove = "-mfpmath=sse"
diff --git a/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch b/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
index ce3238f3a1..6b73878cc0 100644
--- a/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
+++ b/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
@@ -1,4 +1,4 @@
-From fb7b827a56b1f92f882d0f5ef130acc968b23293 Mon Sep 17 00:00:00 2001
+From 96d9aa55d29b24e2490d5647a9efc66940fc400f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 Jan 2016 19:17:31 +0000
Subject: [PATCH] Disable -mfpmath=sse as well when SSE is disabled
@@ -22,17 +22,17 @@ cc1: all warnings being treated as errors
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
+Upstream-Status: Pending
+---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 26d2f33..9ce56de 100644
+index 7656f24..0868ea9 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -783,7 +783,7 @@ fi
+@@ -824,7 +824,7 @@ fi
if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
# Some toolchains enable these features by default, but they need
# registers that aren't set up properly in GRUB.
@@ -41,6 +41,3 @@ index 26d2f33..9ce56de 100644
fi
# GRUB doesn't use float or doubles at all. Yet some toolchains may decide
---
-2.7.0
-
diff --git a/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
deleted file mode 100644
index 65ddcaf128..0000000000
--- a/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Accepted
-CVE: CVE-2015-8370
-Signed-off-by: Awais Belal <awais_belal@mentor.com>
-
-From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
-From: Hector Marco-Gisbert <hecmargi@upv.es>
-Date: Wed, 16 Dec 2015 04:57:18 +0000
-Subject: Fix security issue when reading username and password
-
-This patch fixes two integer underflows at:
- * grub-core/lib/crypto.c
- * grub-core/normal/auth.c
-
-CVE-2015-8370
-
-Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
-Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
-Also-By: Andrey Borzenkov <arvidjaar@gmail.com>
----
-diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
-index 010e550..683a8aa 100644
---- a/grub-core/lib/crypto.c
-+++ b/grub-core/lib/crypto.c
-@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned buf_size)
-
- if (key == '\b')
- {
-- cur_len--;
-+ if (cur_len)
-+ cur_len--;
- continue;
- }
-
-diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
-index c6bd96e..8615c48 100644
---- a/grub-core/normal/auth.c
-+++ b/grub-core/normal/auth.c
-@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned buf_size)
-
- if (key == '\b')
- {
-- cur_len--;
-- grub_printf ("\b");
-+ if (cur_len)
-+ {
-+ cur_len--;
-+ grub_printf ("\b");
-+ }
- continue;
- }
-
---
-cgit v0.9.0.2
diff --git a/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch b/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
deleted file mode 100644
index 9eabce977b..0000000000
--- a/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 3bac4caa2bc64db313aaee54fffb90383e118517 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda@posteo.de>
-Date: Thu, 22 Jan 2015 19:54:36 +0100
-Subject: [PATCH] Remove direct _llseek code and require long filesystem libc.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Backport
- configure.ac | 8 ++++++++
- grub-core/osdep/unix/hostdisk.c | 24 ------------------------
- 4 files changed, 13 insertions(+), 24 deletions(-)
-
-Index: grub-2.00/configure.ac
-===================================================================
---- grub-2.00.orig/configure.ac
-+++ grub-2.00/configure.ac
-@@ -306,6 +306,14 @@ if test x$grub_cv_apple_cc = xyes ; then
- HOST_LDFLAGS="$HOST_LDFLAGS -Wl,-allow_stack_execute"
- fi
-
-+case "$host_os" in
-+ cygwin | windows* | mingw32* | aros*)
-+ ;;
-+ *)
-+ AC_CHECK_SIZEOF(off_t)
-+ test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
-+esac
-+
- if test x$USE_NLS = xno; then
- HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
- fi
-Index: grub-2.00/grub-core/kern/emu/hostdisk.c
-===================================================================
---- grub-2.00.orig/grub-core/kern/emu/hostdisk.c
-+++ grub-2.00/grub-core/kern/emu/hostdisk.c
-@@ -44,11 +44,6 @@
- #ifdef __linux__
- # include <sys/ioctl.h> /* ioctl */
- # include <sys/mount.h>
--# if !defined(__GLIBC__) || \
-- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
--/* Maybe libc doesn't have large file support. */
--# include <linux/unistd.h> /* _llseek */
--# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
- # ifndef BLKFLSBUF
- # define BLKFLSBUF _IO (0x12,97) /* flush buffer cache */
- # endif /* ! BLKFLSBUF */
-@@ -761,25 +756,6 @@ linux_find_partition (char *dev, grub_di
- }
- #endif /* __linux__ */
-
--#if defined(__linux__) && (!defined(__GLIBC__) || \
-- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
-- /* Maybe libc doesn't have large file support. */
--grub_err_t
--grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
--{
-- loff_t offset, result;
-- static int _llseek (uint filedes, ulong hi, ulong lo,
-- loff_t *res, uint wh);
-- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
-- loff_t *, res, uint, wh);
--
-- offset = (loff_t) off;
-- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
-- return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"),
-- name, strerror (errno));
-- return GRUB_ERR_NONE;
--}
--#else
- grub_err_t
- grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
- {
-@@ -790,7 +766,6 @@ grub_util_fd_seek (int fd, const char *n
- name, strerror (errno));
- return 0;
- }
--#endif
-
- static void
- flush_initial_buffer (const char *os_dev __attribute__ ((unused)))
diff --git a/meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index 67dc115491..0000000000
--- a/meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: grub-2.00/grub-core/gnulib/Makefile.am
-===================================================================
---- grub-2.00.orig/grub-core/gnulib/Makefile.am
-+++ grub-2.00/grub-core/gnulib/Makefile.am
-@@ -410,7 +410,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
diff --git a/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch b/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch
deleted file mode 100644
index 6ec2363ae3..0000000000
--- a/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From f30c692c1f9ef0e93bee2b408a24baa017f1ca9d Mon Sep 17 00:00:00 2001
-From: Vladimir Serbinenko <phcoder@gmail.com>
-Date: Thu, 7 Nov 2013 01:01:47 +0100
-Subject: [PATCH] * grub-core/gettext/gettext.c (main_context),
- (secondary_context): Define after defining type and not before.
-
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport
-
- ChangeLog | 5 +++++
- grub-core/gettext/gettext.c | 4 ++--
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
-index df73570..4880cef 100644
---- a/grub-core/gettext/gettext.c
-+++ b/grub-core/gettext/gettext.c
-@@ -34,8 +34,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
- http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html .
- */
-
--static struct grub_gettext_context main_context, secondary_context;
--
- static const char *(*grub_gettext_original) (const char *s);
-
- struct grub_gettext_msg
-@@ -69,6 +67,8 @@ struct grub_gettext_context
- struct grub_gettext_msg *grub_gettext_msg_list;
- };
-
-+static struct grub_gettext_context main_context, secondary_context;
-+
- #define MO_MAGIC_NUMBER 0x950412de
-
- static grub_err_t
---
-1.9.1
-
diff --git a/meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch b/meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
index d5bfaa177a..69b04aa56f 100644
--- a/meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
+++ b/meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
@@ -1,4 +1,4 @@
-From b512c77222a8b133d7dd71a0dcef081a921d97d4 Mon Sep 17 00:00:00 2001
+From 8f47ed4aaefba087b6ca76e59c9f832b6a0702bc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 Jan 2016 19:28:00 +0000
Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name
@@ -11,18 +11,19 @@ to util/grub.d/20_linux_xen.in to keep compatibility.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
+
Upstream-Status: Inappropriate [OE specific]
+---
util/grub.d/10_linux.in | 6 +++---
util/grub.d/20_linux_xen.in | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index 859b608..946be5d 100644
+index 4532266..cba2617 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
-@@ -148,12 +148,12 @@ machine=`uname -m`
+@@ -164,12 +164,12 @@ machine=`uname -m`
case "x$machine" in
xi?86 | xx86_64)
list=
@@ -39,10 +40,10 @@ index 859b608..946be5d 100644
done ;;
esac
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
-index f532fb9..1994244 100644
+index 96179ea..98d16ae 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
-@@ -138,7 +138,7 @@ EOF
+@@ -154,7 +154,7 @@ EOF
}
linux_list=
@@ -51,6 +52,3 @@ index f532fb9..1994244 100644
if grub_file_is_not_garbage "$i"; then
basename=$(basename $i)
version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
---
-2.7.0
-
diff --git a/meta/recipes-bsp/grub/files/0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch b/meta/recipes-bsp/grub/files/0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch
deleted file mode 100644
index 255e3eb7d6..0000000000
--- a/meta/recipes-bsp/grub/files/0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Backport
-
-Original commit: http://git.savannah.gnu.org/cgit/grub.git/commit/grub-core/net/bootp.c?id=f06c2172c0b32052f22e37523445cf8e7affaea3
-
-From 149d2a14f4723778ced23f439487201ccbf1a2c9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 23 Apr 2015 07:03:34 +0000
-Subject: [PATCH] parse_dhcp_vendor: Add missing const qualifiers.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- grub-core/net/bootp.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
-index bc07d53..44131ed 100644
---- a/grub-core/net/bootp.c
-+++ b/grub-core/net/bootp.c
-@@ -52,9 +52,9 @@ set_env_limn_ro (const char *intername, const char *suffix,
- }
-
- static void
--parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
-+parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask)
- {
-- grub_uint8_t *ptr, *ptr0;
-+ const grub_uint8_t *ptr, *ptr0;
-
- ptr = ptr0 = vend;
-
---
-2.1.4
-
diff --git a/meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch b/meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
index fc5aa4e313..faa7fde232 100644
--- a/meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch
+++ b/meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
@@ -1,4 +1,4 @@
-From ff8f68cc48fd3c30d55e1d570d51f2e0952c968e Mon Sep 17 00:00:00 2001
+From 72c30928d3d461e0e2d20c5ff33bd96b6991d585 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Sat, 25 Jan 2014 23:49:44 -0500
Subject: [PATCH] autogen.sh: exclude .pc from po/POTFILES.in
@@ -12,23 +12,24 @@ try to read it.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
- autogen.sh | 2 +-
+ autogen.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autogen.sh b/autogen.sh
-index 7424428..843619e 100755
+index ef43270..a7067a7 100755
--- a/autogen.sh
+++ b/autogen.sh
-@@ -5,7 +5,7 @@ set -e
+@@ -13,7 +13,7 @@ fi
export LC_COLLATE=C
unset LC_ALL
--find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in
-+find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -path './.pc/*' | sort > po/POTFILES.in
+-find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -ipath './gnulib/*' ! -iname './grub-core/lib/gnulib/*' |sort > po/POTFILES.in
++find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -ipath './gnulib/*' ! -iname './grub-core/lib/gnulib/*' ! -path './.pc/*' |sort > po/POTFILES.in
find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
echo "Importing unicode..."
--
-1.7.10.4
+2.7.4
diff --git a/meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch b/meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch
deleted file mode 100644
index 0eece082f8..0000000000
--- a/meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Disable liblzma if --enable-liblzma=no
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -1029,10 +1029,20 @@ fi
-
- AC_SUBST([LIBGEOM])
-
--AC_CHECK_LIB([lzma], [lzma_code],
-- [LIBLZMA="-llzma"
-- AC_DEFINE([HAVE_LIBLZMA], [1],
-- [Define to 1 if you have the LZMA library.])],)
-+AC_ARG_ENABLE([liblzma],
-+ [AS_HELP_STRING([--enable-liblzma],
-+ [enable liblzma integration (default=guessed)])])
-+if test x"$enable_liblzma" = xno ; then
-+ liblzma_excuse="explicitly disabled"
-+fi
-+
-+if test x"$liblzma_excuse" = x ; then
-+ AC_CHECK_LIB([lzma], [lzma_code],
-+ [LIBLZMA="-llzma"
-+ AC_DEFINE([HAVE_LIBLZMA], [1],
-+ [Define to 1 if you have the LZMA library.])],)
-+fi
-+
- AC_SUBST([LIBLZMA])
-
- AC_ARG_ENABLE([libzfs],
diff --git a/meta/recipes-bsp/grub/files/fix-endianness-problem.patch b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
deleted file mode 100644
index 079992afba..0000000000
--- a/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-grub-core/net/tftp.c: fix endianness problem.
-
- * grub-core/net/tftp.c (ack): Fix endianness problem.
- (tftp_receive): Likewise.
- Reported by: Michael Davidsaver.
-
-Upstream-Status: Backport
-
-diff --git a/ChangeLog b/ChangeLog
-index 81bdae9..c2f42d5 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,9 @@
-+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
-+
-+ * grub-core/net/tftp.c (ack): Fix endianness problem.
-+ (tftp_receive): Likewise.
-+ Reported by: Michael Davidsaver.
-+
- 2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
-
- * configure.ac: Bump version to 2.00.
-diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
-index 9c70efb..d0f39ea 100644
---- a/grub-core/net/tftp.c
-+++ b/grub-core/net/tftp.c
-@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
-
- tftph_ack = (struct tftphdr *) nb_ack.data;
- tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
-- tftph_ack->u.ack.block = block;
-+ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
-
- err = grub_net_send_udp_packet (data->sock, &nb_ack);
- if (err)
-@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
- grub_priority_queue_pop (data->pq);
-
- if (file->device->net->packs.count < 50)
-- err = ack (data, tftph->u.data.block);
-+ err = ack (data, data->block + 1);
- else
- {
- file->device->net->stall = 1;
diff --git a/meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch b/meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch
deleted file mode 100644
index 61ae2f5372..0000000000
--- a/meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Backport
-
-This fixes compilation issues when using flex-2.5.37. It was taken from upstream.
-
-Original author is: Vladimir Serbinenko <phcoder@gmail.com>
-
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-
-Index: grub-2.00/grub-core/script/yylex.l
-===================================================================
---- grub-2.00.orig/grub-core/script/yylex.l 2012-06-08 23:24:15.000000000 +0300
-+++ grub-2.00/grub-core/script/yylex.l 2013-07-31 14:34:40.708100982 +0300
-@@ -29,6 +29,8 @@
- #pragma GCC diagnostic ignored "-Wmissing-prototypes"
- #pragma GCC diagnostic ignored "-Wmissing-declarations"
- #pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
-+#pragma GCC diagnostic ignored "-Wunused-function"
-+#pragma GCC diagnostic ignored "-Wsign-compare"
-
- #define yyfree grub_lexer_yyfree
- #define yyalloc grub_lexer_yyalloc
diff --git a/meta/recipes-bsp/grub/files/fix-texinfo.patch b/meta/recipes-bsp/grub/files/fix-texinfo.patch
deleted file mode 100644
index b911d7370b..0000000000
--- a/meta/recipes-bsp/grub/files/fix-texinfo.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-The tarball has a texi file that doesn't parse with current texinfo, so if it's
-being re-generated the build will fail. Take a patch from upstream to fix the
-texi.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From d4c4b8e1a085f92afcec36f6e590c6dfc51d0a1c Mon Sep 17 00:00:00 2001
-From: Bryan Hundven <bryanhundven@gmail.com>
-Date: Mon, 08 Apr 2013 13:23:07 +0000
-Subject: * docs/grub-dev.texi: Move @itemize after @subsection to satisfy
-
- texinfo-5.1.
----
-(limited to 'docs/grub-dev.texi')
-
-diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
-index a4a3820..f74c966 100644
---- a/docs/grub-dev.texi
-+++ b/docs/grub-dev.texi
-@@ -1394,8 +1394,8 @@ grub_video_blit_glyph (&glyph, color, 0, 0);
-
- @node Bitmap API
- @section Bitmap API
--@itemize
- @subsection grub_video_bitmap_create
-+@itemize
- @item Prototype:
- @example
- grub_err_t grub_video_bitmap_create (struct grub_video_bitmap **bitmap, unsigned int width, unsigned int height, enum grub_video_blit_format blit_format)
---
-cgit v0.9.0.2
diff --git a/meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch b/meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch
deleted file mode 100644
index eb8916cb72..0000000000
--- a/meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 7ab576a7c61406b7e63739d1b11017ae336b9008 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 3 Mar 2014 03:34:48 -0500
-Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name
-
-Our kernel's name is bzImage, we need add it to grub.d/10_linux.in so
-that the grub-mkconfig and grub-install can work correctly.
-
-We only need add the bzImage to util/grub.d/10_linux.in, but also add it
-to util/grub.d/20_linux_xen.in to keep compatibility.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- util/grub.d/10_linux.in | 4 ++--
- util/grub.d/20_linux_xen.in | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index 14402e8..c58f417 100644
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -153,11 +153,11 @@ EOF
- machine=`uname -m`
- case "x$machine" in
- xi?86 | xx86_64)
-- list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
-+ list=`for i in /boot/bzImage-* /bzImage-* /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
- done` ;;
- *)
-- list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
-+ list=`for i in /boot/bzImage-* /boot/vmlinuz-* /boot/vmlinux-* /bzImage-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
- done` ;;
- esac
-diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
-index 1d94502..b2decf3 100644
---- a/util/grub.d/20_linux_xen.in
-+++ b/util/grub.d/20_linux_xen.in
-@@ -138,7 +138,7 @@ EOF
- EOF
- }
-
--linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
-+linux_list=`for i in /boot/bzImage[xz]-* /bzImage[xz]-* /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
- if grub_file_is_not_garbage "$i"; then
- basename=$(basename $i)
- version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
---
-1.7.10.4
-
diff --git a/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch b/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch
deleted file mode 100644
index 1ff3c1ca09..0000000000
--- a/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Pending
-
-
-This patch avoids this configure failure
-
-configure:20306: checking whether `ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow' generates calls to `__enable_execute_stack()'
-configure:20320: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387 -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -falign-loops=1 -S conftest.c
-conftest.c:308:6: error: no previous prototype for 'g' [-Werror=missing-prototypes]
-cc1: all warnings being treated as errors
-configure:20323: $? = 1
-configure:20327: error: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow failed to produce assembly code
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/04/13
-
-Index: grub-2.00/acinclude.m4
-===================================================================
---- grub-2.00.orig/acinclude.m4
-+++ grub-2.00/acinclude.m4
-@@ -317,6 +317,7 @@ dnl Check if the C compiler generates ca
- AC_DEFUN([grub_CHECK_ENABLE_EXECUTE_STACK],[
- AC_MSG_CHECKING([whether `$CC' generates calls to `__enable_execute_stack()'])
- AC_LANG_CONFTEST([AC_LANG_SOURCE([[
-+void g (int);
- void f (int (*p) (void));
- void g (int i)
- {
diff --git a/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch b/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch
deleted file mode 100644
index dd30d94b75..0000000000
--- a/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: pending
-
-This patch fixes this configure issue for grub when -mfpmath=sse is in the gcc parameters.
-
-configure:20574: i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/usr/local/dev/yocto/grubtest2/build/tmp/sysroots/emenlow -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100 -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
-conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror]
-cc1: all warnings being treated as errors
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/04/13
-
-Index: grub-1.99/configure.ac
-===================================================================
---- grub-1.99.orig/configure.ac
-+++ grub-1.99/configure.ac
-@@ -378,7 +378,7 @@ if test "x$target_cpu" = xi386; then
-
- # Some toolchains enable these features by default, but they need
- # registers that aren't set up properly in GRUB.
-- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
-+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387"
- fi
-
- # By default, GCC 4.4 generates .eh_frame sections containing unwind
diff --git a/meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch b/meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch
deleted file mode 100644
index 4588fca4ba..0000000000
--- a/meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-Allow a compilation without -mcmodel=large
-
-It's provided by Vladimir Serbinenko, and he will commit
-it upstream so it should be backport patch.
-
-Upstream-Status: Backport
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
-
---
-diff --git a/configure.ac b/configure.ac
-index 9f8fb8a..2c5e6ed 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -723,9 +723,7 @@ if test "$target_cpu" = x86_64; then
- [grub_cv_cc_mcmodel=yes],
- [grub_cv_cc_mcmodel=no])
- ])
-- if test "x$grub_cv_cc_mcmodel" = xno; then
-- AC_MSG_ERROR([-mcmodel=large not supported. Upgrade your gcc.])
-- else
-+ if test "x$grub_cv_cc_mcmodel" = xyes; then
- TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
- fi
- fi
-diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
-index 1409b5d..6e9dace 100644
---- a/grub-core/kern/efi/mm.c
-+++ b/grub-core/kern/efi/mm.c
-@@ -32,6 +32,12 @@
- #define BYTES_TO_PAGES(bytes) (((bytes) + 0xfff) >> 12)
- #define PAGES_TO_BYTES(pages) ((pages) << 12)
-
-+#if defined (__code_model_large__) || !defined (__x86_64__)
-+#define MAX_USABLE_ADDRESS 0xffffffff
-+#else
-+#define MAX_USABLE_ADDRESS 0x7fffffff
-+#endif
-+
- /* The size of a memory map obtained from the firmware. This must be
- a multiplier of 4KB. */
- #define MEMORY_MAP_SIZE 0x3000
-@@ -58,7 +64,7 @@ grub_efi_allocate_pages (grub_efi_physical_address_t address,
-
- #if 1
- /* Limit the memory access to less than 4GB for 32-bit platforms. */
-- if (address > 0xffffffff)
-+ if (address > MAX_USABLE_ADDRESS)
- return 0;
- #endif
-
-@@ -66,7 +72,7 @@ grub_efi_allocate_pages (grub_efi_physical_address_t address,
- if (address == 0)
- {
- type = GRUB_EFI_ALLOCATE_MAX_ADDRESS;
-- address = 0xffffffff;
-+ address = MAX_USABLE_ADDRESS;
- }
- else
- type = GRUB_EFI_ALLOCATE_ADDRESS;
-@@ -86,7 +92,7 @@ grub_efi_allocate_pages (grub_efi_physical_address_t address,
- {
- /* Uggh, the address 0 was allocated... This is too annoying,
- so reallocate another one. */
-- address = 0xffffffff;
-+ address = MAX_USABLE_ADDRESS;
- status = efi_call_4 (b->allocate_pages, type, GRUB_EFI_LOADER_DATA, pages, &address);
- grub_efi_free_pages (0, pages);
- if (status != GRUB_EFI_SUCCESS)
-@@ -319,7 +325,7 @@ filter_memory_map (grub_efi_memory_descriptor_t *memory_map,
- {
- if (desc->type == GRUB_EFI_CONVENTIONAL_MEMORY
- #if 1
-- && desc->physical_start <= 0xffffffff
-+ && desc->physical_start <= MAX_USABLE_ADDRESS
- #endif
- && desc->physical_start + PAGES_TO_BYTES (desc->num_pages) > 0x100000
- && desc->num_pages != 0)
-@@ -337,9 +343,9 @@ filter_memory_map (grub_efi_memory_descriptor_t *memory_map,
- #if 1
- if (BYTES_TO_PAGES (filtered_desc->physical_start)
- + filtered_desc->num_pages
-- > BYTES_TO_PAGES (0x100000000LL))
-+ > BYTES_TO_PAGES (MAX_USABLE_ADDRESS+1LL))
- filtered_desc->num_pages
-- = (BYTES_TO_PAGES (0x100000000LL)
-+ = (BYTES_TO_PAGES (MAX_USABLE_ADDRESS+1LL)
- - BYTES_TO_PAGES (filtered_desc->physical_start));
- #endif
-
-diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
-index 65f09ef..17c1215 100644
---- a/grub-core/kern/x86_64/dl.c
-+++ b/grub-core/kern/x86_64/dl.c
-@@ -100,14 +100,32 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
- break;
-
- case R_X86_64_PC32:
-- *addr32 += rel->r_addend + sym->st_value -
-- (Elf64_Xword) seg->addr - rel->r_offset;
-+ {
-+ grub_int64_t value;
-+ value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -
-+ (Elf64_Xword) seg->addr - rel->r_offset;
-+ if (value != (grub_int32_t) value)
-+ return grub_error (GRUB_ERR_BAD_MODULE, "relocation out of range");
-+ *addr32 = value;
-+ }
- break;
-
- case R_X86_64_32:
-+ {
-+ grub_uint64_t value = *addr32 + rel->r_addend + sym->st_value;
-+ if (value != (grub_uint32_t) value)
-+ return grub_error (GRUB_ERR_BAD_MODULE, "relocation out of range");
-+ *addr32 = value;
-+ }
-+ break;
- case R_X86_64_32S:
-- *addr32 += rel->r_addend + sym->st_value;
-- break;
-+ {
-+ grub_int64_t value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value;
-+ if (value != (grub_int32_t) value)
-+ return grub_error (GRUB_ERR_BAD_MODULE, "relocation out of range");
-+ *addr32 = value;
-+ }
-+ break;
-
- default:
- return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
diff --git a/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch b/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch
deleted file mode 100644
index 4f12628a4b..0000000000
--- a/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From eb6368e65f6988eebad26cebdec057f797bceb40 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 9 Sep 2014 00:02:30 -0700
-Subject: [PATCH] Fix build with glibc 2.20
-
-* grub-core/kern/emu/hostfs.c: squahes below warning
- warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
-
-Upstream-Status: Submitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- grub-core/kern/emu/hostfs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c
-index 3cb089c..a51ee32 100644
---- a/grub-core/kern/emu/hostfs.c
-+++ b/grub-core/kern/emu/hostfs.c
-@@ -16,7 +16,7 @@
- * You should have received a copy of the GNU General Public License
- * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
- */
--#define _BSD_SOURCE
-+#define _DEFAULT_SOURCE
- #include <grub/fs.h>
- #include <grub/file.h>
- #include <grub/disk.h>
---
-1.7.9.5
-
diff --git a/meta/recipes-bsp/grub/files/grub-install.in.patch b/meta/recipes-bsp/grub/files/grub-install.in.patch
deleted file mode 100644
index 326951df44..0000000000
--- a/meta/recipes-bsp/grub/files/grub-install.in.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Our use of grub-install doesn't require the -x option, so we should be
-be able make use of grep versions that don't support it.
-
-Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-
-Index: grub-1.99/util/grub-install.in
-===================================================================
---- grub-1.99.orig/util/grub-install.in 2011-09-09 22:37:20.093906679 -0500
-+++ grub-1.99/util/grub-install.in 2011-09-09 22:37:30.854737882 -0500
-@@ -510,7 +510,7 @@
-
- if [ "x${devabstraction_module}" = "x" ] ; then
- if [ x"${install_device}" != x ]; then
-- if echo "${install_device}" | grep -qx "(.*)" ; then
-+ if echo "${install_device}" | grep -q "(.*)" ; then
- install_drive="${install_device}"
- else
- install_drive="`"$grub_probe" --device-map="${device_map}" --target=drive --device "${install_device}"`" || exit 1
diff --git a/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch b/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
index 935c472cf8..26890261b7 100644
--- a/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
+++ b/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
@@ -1,13 +1,14 @@
-From 7461a3de38b66edbe2f5593f9bdab9f2704d32bc Mon Sep 17 00:00:00 2001
+From 917133acc701dbc4636165d3b08d15dc5829a06f Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Wed, 17 Aug 2016 04:06:34 -0400
Subject: [PATCH] grub module explicitly keeps symbole .module_license
While using oe-core toolchain to strip grub module 'all_video.mod',
it stripped symbol table:
---------------
-root@localhost:~# objdump -t all_video.mod
+---------------
+root@localhost:~# objdump -t all_video.mod
+
all_video.mod: file format elf64-x86-64
SYMBOL TABLE:
@@ -44,18 +45,15 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
-index 76df0bb..39a9cfc 100644
+index 1250589..dd14308 100644
--- a/grub-core/genmod.sh.in
+++ b/grub-core/genmod.sh.in
-@@ -59,7 +59,7 @@ if test x@TARGET_APPLE_CC@ != x1; then
+@@ -56,7 +56,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; then
if test x@platform@ != xemu; then
- @STRIP@ --strip-unneeded \
+ @TARGET_STRIP@ --strip-unneeded \
-K grub_mod_init -K grub_mod_fini \
- -K _grub_mod_init -K _grub_mod_fini \
+ -K _grub_mod_init -K _grub_mod_fini -K .module_license \
-R .note.gnu.gold-version -R .note.GNU-stack \
- -R .note -R .comment $tmpfile || exit 1
- fi
---
-2.8.1
-
+ -R .gnu.build.attributes \
+ -R .rel.gnu.build.attributes \
diff --git a/meta/recipes-bsp/grub/files/grub-no-unused-result.patch b/meta/recipes-bsp/grub/files/grub-no-unused-result.patch
deleted file mode 100644
index 4cbd0838d1..0000000000
--- a/meta/recipes-bsp/grub/files/grub-no-unused-result.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Signed-off-by: Radu Moisan <radu.moisan@intel.com>
-Upstream-Status: Pending
-
-I had an error because of an unused return value for read().
-I added -Wno-unused-result.
-
-Index: grub-2.00/configure.ac
-===================================================================
---- grub-2.00.orig/configure.ac 2012-08-13 16:32:33.000000000 +0300
-+++ grub-2.00/configure.ac 2012-08-13 16:38:22.000000000 +0300
-@@ -394,7 +394,7 @@
- LIBS=""
-
- # debug flags.
--WARN_FLAGS="-Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign"
-+WARN_FLAGS="-Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wno-unused-result -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign"
- HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS"
- TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
- TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
diff --git a/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch b/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch
deleted file mode 100644
index d114f4847b..0000000000
--- a/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 8fbb150a56966edde4dc07b8d01be5eb149b65ab Mon Sep 17 00:00:00 2001
-From: Colin Watson <cjwatson@ubuntu.com>
-Date: Sun, 20 Jan 2013 23:03:35 +0000
-Subject: [PATCH 1/1] * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't
- add the initrd size to addr_min, since the initrd will be allocated after
- this address.
-
-commit 6a0debbd9167e8f79cdef5497a73d23e580c0cd4 upstream
-
-Upstream-Status: Backport
-
-Signed-off-by: Shan Hai <shan.hai@windriver.com>
----
- ChangeLog | 6 ++++++
- grub-core/loader/i386/linux.c | 3 +--
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index c2f42d5..40cb508 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,9 @@
-+2013-01-20 Colin Watson <cjwatson@ubuntu.com>
-+
-+ * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the
-+ initrd size to addr_min, since the initrd will be allocated after
-+ this address.
-+
- 2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
-
- * grub-core/net/tftp.c (ack): Fix endianness problem.
-diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
-index 62087cf..e2425c8 100644
---- a/grub-core/loader/i386/linux.c
-+++ b/grub-core/loader/i386/linux.c
-@@ -1098,8 +1098,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
- worse than that of Linux 2.3.xx, so avoid the last 64kb. */
- addr_max -= 0x10000;
-
-- addr_min = (grub_addr_t) prot_mode_target + prot_init_space
-- + page_align (size);
-+ addr_min = (grub_addr_t) prot_mode_target + prot_init_space;
-
- /* Put the initrd as high as possible, 4KiB aligned. */
- addr = (addr_max - size) & ~0xFFF;
---
-1.8.5.2.233.g932f7e4
-
diff --git a/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
deleted file mode 100644
index 5168d3ca56..0000000000
--- a/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Subject: [PATCH] grub2: remove grub-sparc64-setup from x86 builds
-
-* remove the grub-sparc64-setup files from the x86 builds.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- Makefile.util.def | 18 ------------------
- 1 file changed, 18 deletions(-)
-
-diff --git a/Makefile.util.def b/Makefile.util.def
-index b80187c..a670cf2 100644
---- a/Makefile.util.def
-+++ b/Makefile.util.def
-@@ -321,24 +321,6 @@ program = {
- };
-
- program = {
-- name = grub-sparc64-setup;
-- installdir = sbin;
-- mansection = 8;
-- common = util/grub-setup.c;
-- common = util/lvm.c;
-- common = grub-core/kern/emu/argp_common.c;
-- common = grub-core/lib/reed_solomon.c;
-- common = util/ieee1275/ofpath.c;
--
-- ldadd = libgrubmods.a;
-- ldadd = libgrubkern.a;
-- ldadd = libgrubgcry.a;
-- ldadd = grub-core/gnulib/libgnu.a;
-- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
-- cppflags = '-DGRUB_SETUP_SPARC64=1';
--};
--
--program = {
- name = grub-ofpathname;
- installdir = sbin;
- mansection = 8;
---
-2.8.1
-
diff --git a/meta/recipes-bsp/grub/files/remove-gets.patch b/meta/recipes-bsp/grub/files/remove-gets.patch
deleted file mode 100644
index 463f7847ad..0000000000
--- a/meta/recipes-bsp/grub/files/remove-gets.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: grub-1.99/grub-core/gnulib/stdio.in.h
-===================================================================
---- grub-1.99.orig/grub-core/gnulib/stdio.in.h 2010-12-01 06:45:43.000000000 -0800
-+++ grub-1.99/grub-core/gnulib/stdio.in.h 2012-07-04 12:25:02.057099107 -0700
-@@ -140,8 +140,10 @@
- /* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
-+#if defined gets
- #undef gets
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+#endif
-
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
diff --git a/meta/recipes-bsp/grub/grub-0.97/autohell.patch b/meta/recipes-bsp/grub/grub-0.97/autohell.patch
deleted file mode 100644
index d66207ae6c..0000000000
--- a/meta/recipes-bsp/grub/grub-0.97/autohell.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: grub-0.97/configure.ac
-===================================================================
---- grub-0.97.orig/configure.ac 2008-09-12 17:39:52.000000000 +0200
-+++ grub-0.97/configure.ac 2008-09-12 17:40:21.000000000 +0200
-@@ -60,8 +60,8 @@ AC_PROG_CC
- _AM_DEPENDENCIES(CC)
-
- dnl Because recent automake complains about AS, set it here.
--CCAS="$CC"
--AC_SUBST(CCAS)
-+AM_PROG_AS
-+AC_SUBST(AS)
-
- AC_ARG_WITH(binutils,
- [ --with-binutils=DIR search the directory DIR to find binutils])
diff --git a/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch b/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch
deleted file mode 100644
index d225d13dce..0000000000
--- a/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Upstream-Status: Inappropriate [No Longer Maintained]
-
-diff -Naur grub-0.97-800/stage2/fsys_ext2fs.c grub-0.97-810/stage2/fsys_ext2fs.c
---- grub-0.97-800/stage2/fsys_ext2fs.c 2008-07-21 00:40:21.668879475 -0600
-+++ grub-0.97-810/stage2/fsys_ext2fs.c 2008-07-21 01:01:11.063953773 -0600
-@@ -79,7 +79,52 @@
- __u32 s_rev_level; /* Revision level */
- __u16 s_def_resuid; /* Default uid for reserved blocks */
- __u16 s_def_resgid; /* Default gid for reserved blocks */
-- __u32 s_reserved[235]; /* Padding to the end of the block */
-+ /*
-+ * These fields are for EXT2_DYNAMIC_REV superblocks only.
-+ *
-+ * Note: the difference between the compatible feature set and
-+ * the incompatible feature set is that if there is a bit set
-+ * in the incompatible feature set that the kernel doesn't
-+ * know about, it should refuse to mount the filesystem.
-+ *
-+ * e2fsck's requirements are more strict; if it doesn't know
-+ * about a feature in either the compatible or incompatible
-+ * feature set, it must abort and not try to meddle with
-+ * things it doesn't understand...
-+ */
-+ __u32 s_first_ino; /* First non-reserved inode */
-+ __u16 s_inode_size; /* size of inode structure */
-+ __u16 s_block_group_nr; /* block group # of this superblock */
-+ __u32 s_feature_compat; /* compatible feature set */
-+ __u32 s_feature_incompat; /* incompatible feature set */
-+ __u32 s_feature_ro_compat; /* readonly-compatible feature set */
-+ __u8 s_uuid[16]; /* 128-bit uuid for volume */
-+ char s_volume_name[16]; /* volume name */
-+ char s_last_mounted[64]; /* directory where last mounted */
-+ __u32 s_algorithm_usage_bitmap; /* For compression */
-+ /*
-+ * Performance hints. Directory preallocation should only
-+ * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
-+ */
-+ __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
-+ __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
-+ __u16 s_reserved_gdt_blocks;/* Per group table for online growth */
-+ /*
-+ * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
-+ */
-+ __u8 s_journal_uuid[16]; /* uuid of journal superblock */
-+ __u32 s_journal_inum; /* inode number of journal file */
-+ __u32 s_journal_dev; /* device number of journal file */
-+ __u32 s_last_orphan; /* start of list of inodes to delete */
-+ __u32 s_hash_seed[4]; /* HTREE hash seed */
-+ __u8 s_def_hash_version; /* Default hash version to use */
-+ __u8 s_jnl_backup_type; /* Default type of journal backup */
-+ __u16 s_reserved_word_pad;
-+ __u32 s_default_mount_opts;
-+ __u32 s_first_meta_bg; /* First metablock group */
-+ __u32 s_mkfs_time; /* When the filesystem was created */
-+ __u32 s_jnl_blocks[17]; /* Backup of the journal inode */
-+ __u32 s_reserved[172]; /* Padding to the end of the block */
- };
-
- struct ext2_group_desc
-@@ -218,6 +263,14 @@
- #define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
- #define EXT2_ADDR_PER_BLOCK_BITS(s) (log2(EXT2_ADDR_PER_BLOCK(s)))
-
-+#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
-+#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
-+#define EXT2_GOOD_OLD_INODE_SIZE 128
-+#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
-+ EXT2_GOOD_OLD_INODE_SIZE : \
-+ (s)->s_inode_size)
-+#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
-+
- /* linux/ext2_fs.h */
- #define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
- /* kind of from ext2/super.c */
-@@ -553,7 +606,7 @@
- gdp = GROUP_DESC;
- ino_blk = gdp[desc].bg_inode_table +
- (((current_ino - 1) % (SUPERBLOCK->s_inodes_per_group))
-- >> log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
-+ >> log2 (EXT2_INODES_PER_BLOCK (SUPERBLOCK)));
- #ifdef E2DEBUG
- printf ("inode table fsblock=%d\n", ino_blk);
- #endif /* E2DEBUG */
-@@ -565,13 +618,12 @@
- /* reset indirect blocks! */
- mapblock2 = mapblock1 = -1;
-
-- raw_inode = INODE +
-- ((current_ino - 1)
-- & (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode) - 1));
-+ raw_inode = (struct ext2_inode *)((char *)INODE +
-+ ((current_ino - 1) & (EXT2_INODES_PER_BLOCK (SUPERBLOCK) - 1)) *
-+ EXT2_INODE_SIZE (SUPERBLOCK));
- #ifdef E2DEBUG
- printf ("ipb=%d, sizeof(inode)=%d\n",
-- (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)),
-- sizeof (struct ext2_inode));
-+ EXT2_INODES_PER_BLOCK (SUPERBLOCK), EXT2_INODE_SIZE (SUPERBLOCK));
- printf ("inode=%x, raw_inode=%x\n", INODE, raw_inode);
- printf ("offset into inode table block=%d\n", (int) raw_inode - (int) INODE);
- for (i = (unsigned char *) INODE; i <= (unsigned char *) raw_inode;
diff --git a/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch b/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch
deleted file mode 100644
index 0cf7dc96d7..0000000000
--- a/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-Upstream-Status: Inappropriate
-
-Subject: [PATCH] grub: fix for automake-1.12
-
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| stage1/Makefile.am:2: error: 'pkglibdir' is not a legitimate directory for 'DATA'
-| stage2/Makefile.am:35: error: 'pkglibdir' is not a legitimate directory for 'DATA'
-| stage2/Makefile.am:46: error: 'pkglibdir' is not a legitimate directory for 'DATA'
-| autoreconf: automake failed with exit status: 1
-| ERROR: autoreconf execution failed.
-
-The upstream status is marked as 'Inappropriate' because this problem is not uncommon,
-it has been there for a long time and no change in upstream.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
-Index: grub-0.97/stage1/Makefile.am
-===================================================================
---- a/stage1/Makefile.am
-+++ b/stage1/Makefile.am
-@@ -1,7 +1,7 @@
--pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
--nodist_pkglib_DATA = stage1
-+pkgdatadir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
-+nodist_pkgdata_DATA = stage1
-
--CLEANFILES = $(nodist_pkglib_DATA)
-+CLEANFILES = $(nodist_pkgdata_DATA)
-
- # We can't use builtins or standard includes.
- AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
-Index: grub-0.97/stage2/Makefile.am
-===================================================================
---- a/stage2/Makefile.am
-+++ b/stage2/Makefile.am
-@@ -27,12 +27,12 @@ libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
- -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
-
- # Stage 2 and Stage 1.5's.
--pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
-+pkgdatadir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
-
- EXTRA_PROGRAMS = nbloader.exec pxeloader.exec diskless.exec
-
- if DISKLESS_SUPPORT
--pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
-+pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
- ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
- reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 \
- nbgrub pxegrub
-@@ -43,7 +43,7 @@ noinst_PROGRAMS = pre_stage2.exec start.exec start_eltorito.exec \
- reiserfs_stage1_5.exec ufs2_stage1_5.exec vstafs_stage1_5.exec \
- xfs_stage1_5.exec nbloader.exec pxeloader.exec diskless.exec
- else
--pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
-+pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
- ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
- reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5
- noinst_DATA = pre_stage2 start start_eltorito
-@@ -105,7 +105,7 @@ else
- BUILT_SOURCES = stage2_size.h
- endif
-
--CLEANFILES = $(pkglib_DATA) $(noinst_DATA) $(BUILT_SOURCES)
-+CLEANFILES = $(pkgdata_DATA) $(noinst_DATA) $(BUILT_SOURCES)
-
- stage2_size.h: pre_stage2
- -rm -f stage2_size.h
---
-1.7.9.5
-
diff --git a/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch b/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch
deleted file mode 100644
index 70037e47c7..0000000000
--- a/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Inappropriate [disable feature]
-
-After the commit "tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm",
-we got bug 1099 (http://bugzilla.yoctoproject.org/show_bug.cgi?id=1099):
-
-Running "install --stage2=/ssd/boot/grub/stage2 /boot/grub/stage1(hd0)
- /boot/grub/stage2 p /boot/grub/menu list" failed
-Error 6: Mismatched or corrupt version of stage1/stage2
-
-This turned out to be a gcc's bug. See
-https://bugs.gentoo.org/show_bug.cgi?id=360513
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333
-
-Upstream gcc seems uninterested in the bug, so at present we can disable the
-option as a workaround. Thanks Ryan Hill for the investigation and the
-workaround patch.
-
-Dexuan Cui <dexuan.cui@intel.com>
-Wed Jun 29 20:21:39 CST 2011
-
---- grub-0.97/stage2/Makefile.am.orig
-+++ grub-0.97/stage2/Makefile.am
-@@ -79,7 +79,7 @@
- HERCULES_FLAGS =
- endif
-
--STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
-+STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin -nostdinc \
- $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
-
- STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
diff --git a/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch b/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch
deleted file mode 100644
index bd8e0a89fc..0000000000
--- a/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-
-This patch is from ubuntu:
- * objcopy-absolute.diff (update): Remove .note, .comment, and
- .note.gnu.build-id sections from images (LP: #444703).
-
-Upstream-Status: Inappropriate [no longer maintained]
-
-Index: b/acinclude.m4
-===================================================================
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -61,7 +61,7 @@
- else
- AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
- fi
-- if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then :
-+ if AC_TRY_COMMAND([${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then :
- else
- AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files])
- fi
-Index: b/stage1/Makefile.am
-===================================================================
---- a/stage1/Makefile.am
-+++ b/stage1/Makefile.am
-@@ -12,4 +12,4 @@
-
- SUFFIXES = .exec
- .exec:
-- $(OBJCOPY) -O binary $< $@
-+ $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@
-Index: b/stage2/Makefile.am
-===================================================================
---- a/stage2/Makefile.am
-+++ b/stage2/Makefile.am
-@@ -293,4 +293,4 @@
- # General rule for making a raw binary.
- SUFFIXES = .exec
- .exec:
-- $(OBJCOPY) -O binary $< $@
-+ $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@
diff --git a/meta/recipes-bsp/grub/grub-bootconf_1.00.bb b/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
new file mode 100644
index 0000000000..572580313b
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
@@ -0,0 +1,32 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic grub.cfg for use in EFI systems"
+DESCRIPTION = "Grub might require different configuration file for \
+different machines."
+HOMEPAGE = "https://www.gnu.org/software/grub/manual/grub/grub.html#Configuration"
+
+RPROVIDES_${PN} += "virtual/grub-bootconf"
+
+inherit grub-efi-cfg
+
+require conf/image-uefi.conf
+
+S = "${WORKDIR}"
+
+GRUB_CFG = "${S}/grub-bootconf"
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+
+python do_configure() {
+ bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND ROOT"
+
+do_install() {
+ install -d ${D}${EFI_FILES_PATH}
+ install grub-bootconf ${D}${EFI_FILES_PATH}/grub.cfg
+}
+
+FILES_${PN} = "${EFI_FILES_PATH}/grub.cfg"
diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb
deleted file mode 100644
index 5a0dc954a3..0000000000
--- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-require grub2.inc
-
-DEPENDS_class-target = "grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype"
-PR = "r3"
-
-SRC_URI += " \
- file://cfg \
- "
-
-S = "${WORKDIR}/grub-${PV}"
-
-# Determine the target arch for the grub modules
-python __anonymous () {
- import re
- target = d.getVar('TARGET_ARCH', True)
- if target == "x86_64":
- grubtarget = 'x86_64'
- grubimage = "bootx64.efi"
- elif re.match('i.86', target):
- grubtarget = 'i386'
- grubimage = "bootia32.efi"
- else:
- raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target)
- d.setVar("GRUB_TARGET", grubtarget)
- d.setVar("GRUB_IMAGE", grubimage)
-}
-
-inherit deploy
-
-CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
-EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
- --enable-efiemu=no --program-prefix='' \
- --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
-
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
-
-# ldm.c:114:7: error: trampoline generated for nested function 'hook' [-Werror=trampolines]
-# and many other places in the grub code when compiled with some native gcc compilers (specifically, gentoo)
-CFLAGS_append_class-native = " -Wno-error=trampolines"
-
-do_install_class-native() {
- install -d ${D}${bindir}
- install -m 755 grub-mkimage ${D}${bindir}
-}
-
-GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
-
-do_deploy() {
- # Search for the grub.cfg on the local boot media by using the
- # built in cfg file provided via this recipe
- grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
- -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
- ${GRUB_BUILDIN}
- install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
-}
-
-do_deploy_class-native() {
- :
-}
-
-addtask deploy after do_install before do_build
-
-FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
- ${datadir}/grub \
- "
-
-BBCLASSEXTEND = "native"
-
diff --git a/meta/recipes-bsp/grub/grub-efi_2.04.bb b/meta/recipes-bsp/grub/grub-efi_2.04.bb
new file mode 100644
index 0000000000..b9d6225d27
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-efi_2.04.bb
@@ -0,0 +1,109 @@
+require grub2.inc
+
+require conf/image-uefi.conf
+
+GRUBPLATFORM = "efi"
+
+DEPENDS_append_class-target = " grub-efi-native"
+RDEPENDS_${PN}_class-target = "grub-common virtual/grub-bootconf"
+
+SRC_URI += " \
+ file://cfg \
+ "
+
+S = "${WORKDIR}/grub-${PV}"
+
+# Determine the target arch for the grub modules
+python __anonymous () {
+ import re
+ target = d.getVar('TARGET_ARCH')
+ prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
+ if target == "x86_64":
+ grubtarget = 'x86_64'
+ elif re.match('i.86', target):
+ grubtarget = 'i386'
+ elif re.match('aarch64', target):
+ grubtarget = 'arm64'
+ elif re.match('arm', target):
+ grubtarget = 'arm'
+ else:
+ raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target)
+ grubimage = prefix + d.getVar("EFI_BOOT_IMAGE")
+ d.setVar("GRUB_TARGET", grubtarget)
+ d.setVar("GRUB_IMAGE", grubimage)
+ prefix = "grub-efi-" if prefix == "" else ""
+ d.setVar("GRUB_IMAGE_PREFIX", prefix)
+}
+
+inherit deploy
+
+CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
+EXTRA_OECONF += "--enable-efiemu=no"
+
+do_mkimage() {
+ cd ${B}
+ # Search for the grub.cfg on the local boot media by using the
+ # built in cfg file provided via this recipe
+ grub-mkimage -c ../cfg -p ${EFIDIR} -d ./grub-core/ \
+ -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
+ ${GRUB_BUILDIN}
+}
+
+addtask mkimage before do_install after do_compile
+
+do_mkimage_class-native() {
+ :
+}
+
+do_install_append_class-target() {
+ install -d ${D}${EFI_FILES_PATH}
+ install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE}
+}
+
+do_install_class-native() {
+ install -d ${D}${bindir}
+ install -m 755 grub-mkimage ${D}${bindir}
+ install -m 755 grub-editenv ${D}${bindir}
+}
+
+do_install_class-target() {
+ oe_runmake 'DESTDIR=${D}' -C grub-core install
+
+ # Remove build host references...
+ find "${D}" -name modinfo.sh -type f -exec \
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ {} +
+}
+
+do_install_append_aarch64() {
+ rm -rf ${D}/${prefix}/
+}
+
+GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \
+ efi_gop iso9660 configfile search loadenv test"
+
+do_deploy() {
+ install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
+}
+
+do_deploy_class-native() {
+ :
+}
+
+addtask deploy after do_install before do_build
+
+FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
+ ${datadir}/grub \
+ ${EFI_FILES_PATH}/${GRUB_IMAGE} \
+ "
+
+FILES_${PN}_remove_aarch64 = "${libdir}/grub/${GRUB_TARGET}-efi"
+
+# 64-bit binaries are expected for the bootloader with an x32 userland
+INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
+INSANE_SKIP_${PN}-dbg_append_linux-gnux32 = " arch"
+INSANE_SKIP_${PN}_append_linux-muslx32 = " arch"
+INSANE_SKIP_${PN}-dbg_append_linux-muslx32 = " arch"
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index b10f633aae..b3291cb4b8 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -11,41 +11,42 @@ SECTION = "bootloaders"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
+ file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
+ file://autogen.sh-exclude-pc.patch \
file://grub-module-explicitly-keeps-symbole-.module_license.patch \
- file://grub-2.00-fpmath-sse-387-fix.patch \
- file://check-if-liblzma-is-disabled.patch \
- file://fix-issue-with-flex-2.5.37.patch \
- file://grub-2.00-add-oe-kernel.patch \
- file://grub-install.in.patch \
- file://remove-gets.patch \
- file://fix-endianness-problem.patch \
- file://grub2-remove-sparc64-setup-from-x86-builds.patch \
- file://grub-2.00-fix-enable_execute_stack-check.patch \
- file://grub-no-unused-result.patch \
- file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
- file://grub-efi-fix-with-glibc-2.20.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
- file://grub2-fix-initrd-size-bug.patch \
- file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
- file://0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch \
- file://fix-texinfo.patch \
- file://0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch \
- "
-
-DEPENDS = "flex-native bison-native autogen-native"
-
-SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
-SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
-
-inherit autotools gettext texinfo
+ file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
+"
+SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934"
+SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea"
+
+DEPENDS = "flex-native bison-native gettext-native"
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
+COMPATIBLE_HOST_armv7a = 'null'
+COMPATIBLE_HOST_armv7ve = 'null'
+
+# configure.ac has code to set this automagically from the target tuple
+# but the OE freeform one (core2-foo-bar-linux) don't work with that.
+
+GRUBPLATFORM_arm = "efi"
+GRUBPLATFORM_aarch64 = "efi"
+GRUBPLATFORM ??= "pc"
+
+inherit autotools gettext texinfo pkgconfig
+
+EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
+ --disable-grub-mkfont \
+ --program-prefix="" \
+ --enable-liblzma=no \
+ --enable-libzfs=no \
+ --enable-largefile \
+ --disable-werror \
+"
PACKAGECONFIG ??= ""
PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
-PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2"
+PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
@@ -56,15 +57,14 @@ BUILD_CFLAGS = ""
BUILD_CXXFLAGS = ""
BUILD_LDFLAGS = ""
+export PYTHON = "python3"
+
do_configure_prepend() {
- # The grub2 configure script uses variables such as TARGET_CFLAGS etc
- # for its own purposes. Remove the OE versions from the environment to
- # avoid conflicts.
- unset TARGET_CPPFLAGS TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS
- ( cd ${S}
- ${S}/autogen.sh )
+ cd ${S}
+ FROM_BOOTSTRAP=1 ${S}/autogen.sh
+ cd ${B}
}
-# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
-# conflicted, remove it since no one uses it.
-SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-bsp/grub/grub_0.97.bb b/meta/recipes-bsp/grub/grub_0.97.bb
deleted file mode 100644
index 997a045b2e..0000000000
--- a/meta/recipes-bsp/grub/grub_0.97.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "GRUB is the GRand Unified Bootloader"
-DESCRIPTION = "GRUB is a GPLed bootloader intended to unify bootloading across x86 \
-operating systems. In addition to loading the Linux kernel, it implements the Multiboot \
-standard, which allows for flexible loading of multiple boot images."
-HOMEPAGE = "http://www.gnu.org/software/grub/"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \
- file://grub/main.c;beginline=3;endline=9;md5=22a5f28d2130fff9f2a17ed54be90ed6"
-
-RDEPENDS_${PN} = "diffutils"
-PR = "r6"
-
-SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \
- file://no-reorder-functions.patch \
- file://autohell.patch \
- file://grub_fix_for_automake-1.12.patch \
- file://objcopy-absolute.patch \
- file://grub-support-256byte-inode.patch \
-"
-
-SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884"
-SRC_URI[sha256sum] = "4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b"
-
-inherit autotools texinfo
-
-COMPATIBLE_HOST = "i.86.*-linux"
-
-EXTRA_OECONF = "--without-curses"
-
-do_install_append_vmware() {
- mkdir -p ${D}/boot/
- ln -sf ../usr/lib/grub/{$TARGET_ARCH}{$TARGET_VENDOR}/ ${D}/boot/grub
-}
diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.00.bb
deleted file mode 100644
index 07e1d101b3..0000000000
--- a/meta/recipes-bsp/grub/grub_2.00.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require grub2.inc
-
-RDEPENDS_${PN} = "diffutils freetype grub-editenv"
-PR = "r1"
-
-EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
- --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
-
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
-
-PACKAGES =+ "grub-editenv"
-
-FILES_grub-editenv = "${bindir}/grub-editenv"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/grub.d
-}
-
-INSANE_SKIP_${PN} = "arch"
-INSANE_SKIP_${PN}-dbg = "arch"
diff --git a/meta/recipes-bsp/grub/grub_2.04.bb b/meta/recipes-bsp/grub/grub_2.04.bb
new file mode 100644
index 0000000000..9232ea8120
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub_2.04.bb
@@ -0,0 +1,33 @@
+require grub2.inc
+
+RDEPENDS_${PN}-common += "${PN}-editenv"
+RDEPENDS_${PN} += "${PN}-common"
+
+RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
+
+PACKAGES =+ "${PN}-editenv ${PN}-common"
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-common = " \
+ ${bindir} \
+ ${sysconfdir} \
+ ${sbindir} \
+ ${datadir}/grub \
+"
+
+FILES_${PN}-common_append_aarch64 = " \
+ ${libdir}/${BPN} \
+"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/grub.d
+ # Remove build host references...
+ find "${D}" -name modinfo.sh -type f -exec \
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ {} +
+}
+
+INSANE_SKIP_${PN} = "arch"
+INSANE_SKIP_${PN}-dbg = "arch"
diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
deleted file mode 100644
index 493b6956ee..0000000000
--- a/meta/recipes-bsp/grub/grub_git.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-require grub2.inc
-
-DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_arm = "1"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:"
-
-PV = "2.00+${SRCPV}"
-SRCREV = "7a5b301e3adb8e054288518a325135a1883c1c6c"
-SRC_URI = "git://git.savannah.gnu.org/grub.git \
- file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
- file://autogen.sh-exclude-pc.patch \
- file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
- "
-
-S = "${WORKDIR}/git"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
-COMPATIBLE_HOST_armv7a = 'null'
-
-inherit autotools gettext texinfo
-
-# configure.ac has code to set this automagically from the target tuple
-# but the OE freeform one (core2-foo-bar-linux) don't work with that.
-
-GRUBPLATFORM_arm = "uboot"
-GRUBPLATFORM_aarch64 = "efi"
-GRUBPLATFORM ??= "pc"
-
-EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \
- --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
-
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/grub.d
- rm -rf ${D}${libdir}/charset.alias
-}
-
-# debugedit chokes on bare metal binaries
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-
-RDEPENDS_${PN} = "diffutils freetype"
-
-INSANE_SKIP_${PN} = "arch"
-INSANE_SKIP_${PN}-dbg = "arch"
diff --git a/meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch b/meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch
deleted file mode 100644
index fa50bc4a6e..0000000000
--- a/meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 55957faf1272c8f5f304909faeebf647a78e3701 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Sep 2015 07:19:45 +0000
-Subject: [PATCH] console: Fix C syntax errors for function declaration
-
-To address this, the semicolons after the function parameters should be
-replaced by commas, and the last one should be omitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/efi/console.c | 26 +++++++++++++-------------
- 1 file changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/src/efi/console.c b/src/efi/console.c
-index 6206c80..66aa88f 100644
---- a/src/efi/console.c
-+++ b/src/efi/console.c
-@@ -27,8 +27,8 @@
- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
-
- typedef EFI_STATUS (EFIAPI *EFI_INPUT_RESET_EX)(
-- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
-- BOOLEAN ExtendedVerification;
-+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
-+ BOOLEAN ExtendedVerification
- );
-
- typedef UINT8 EFI_KEY_TOGGLE_STATE;
-@@ -44,29 +44,29 @@ typedef struct {
- } EFI_KEY_DATA;
-
- typedef EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY_EX)(
-- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
-- EFI_KEY_DATA *KeyData;
-+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
-+ EFI_KEY_DATA *KeyData
- );
-
- typedef EFI_STATUS (EFIAPI *EFI_SET_STATE)(
-- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
-- EFI_KEY_TOGGLE_STATE *KeyToggleState;
-+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
-+ EFI_KEY_TOGGLE_STATE *KeyToggleState
- );
-
- typedef EFI_STATUS (EFIAPI *EFI_KEY_NOTIFY_FUNCTION)(
-- EFI_KEY_DATA *KeyData;
-+ EFI_KEY_DATA *KeyData
- );
-
- typedef EFI_STATUS (EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY)(
-- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
-- EFI_KEY_DATA KeyData;
-- EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction;
-- VOID **NotifyHandle;
-+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
-+ EFI_KEY_DATA KeyData,
-+ EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
-+ VOID **NotifyHandle
- );
-
- typedef EFI_STATUS (EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
-- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
-- VOID *NotificationHandle;
-+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
-+ VOID *NotificationHandle
- );
-
- typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
---
-2.5.1
-
diff --git a/meta/recipes-bsp/gummiboot/gummiboot/fix-objcopy.patch b/meta/recipes-bsp/gummiboot/gummiboot/fix-objcopy.patch
deleted file mode 100644
index 49f55930df..0000000000
--- a/meta/recipes-bsp/gummiboot/gummiboot/fix-objcopy.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 0f7f9e3bb1d0e1b93f3ad8a1d5d7bdd3fbf27494 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 27 Mar 2014 07:20:33 +0000
-Subject: [PATCH] Makefile.am: use objcopy from the env
-
-It uses the "objcopy" directly, which is not suitable for cross compile.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- Makefile.am | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-Index: git/Makefile.am
-===================================================================
---- git.orig/Makefile.am
-+++ git/Makefile.am
-@@ -19,6 +19,8 @@
- ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
- AM_MAKEFLAGS = --no-print-directory
-
-+OBJCOPY ?= objcopy
-+
- gummibootlibdir = $(prefix)/lib/gummiboot
-
- AM_CPPFLAGS = -include config.h
-@@ -148,7 +150,7 @@ $(gummiboot_solib): $(gummiboot_objects)
- .DELETE_ON_ERROR: $(gummboot_solib)
-
- $(gummiboot): $(gummiboot_solib)
-- $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
-+ $(AM_V_GEN) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
- -j .dynsym -j .rel -j .rela -j .reloc \
- --target=efi-app-$(ARCH) $< $@
-
-@@ -183,7 +185,7 @@ $(stub_solib): $(stub_objects)
- .DELETE_ON_ERROR: $(gummboot_solib)
-
- $(stub): $(stub_solib)
-- $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
-+ $(AM_V_GEN) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
- -j .dynsym -j .rel -j .rela -j .reloc \
- --target=efi-app-$(ARCH) $< $@
-
diff --git a/meta/recipes-bsp/gummiboot/gummiboot_git.bb b/meta/recipes-bsp/gummiboot/gummiboot_git.bb
deleted file mode 100644
index 376ab542dd..0000000000
--- a/meta/recipes-bsp/gummiboot/gummiboot_git.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Gummiboot is a simple UEFI boot manager which executes configured EFI images."
-HOMEPAGE = "http://freedesktop.org/wiki/Software/gummiboot"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "gnu-efi util-linux"
-
-inherit autotools pkgconfig
-inherit deploy
-
-PV = "48+git${SRCPV}"
-SRCREV = "2bcd919c681c952eb867ef1bdb458f1bc49c2d55"
-SRC_URI = "git://anongit.freedesktop.org/gummiboot \
- file://fix-objcopy.patch \
- file://0001-console-Fix-C-syntax-errors-for-function-declaration.patch \
- "
-
-# Note: Add COMPATIBLE_HOST here is only because it depends on gnu-efi
-# which has set the COMPATIBLE_HOST, the gummiboot itself may work on
-# more hosts.
-COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \
- --with-efi-ldsdir=${STAGING_LIBDIR} \
- --with-efi-libdir=${STAGING_LIBDIR}"
-
-EXTRA_OEMAKE += "gummibootlibdir=${libdir}/gummiboot"
-
-TUNE_CCARGS_remove = "-mfpmath=sse"
-
-do_deploy () {
- install ${B}/gummiboot*.efi ${DEPLOYDIR}
-}
-addtask deploy before do_build after do_compile
diff --git a/meta/recipes-bsp/hostap/files/COPYING.patch b/meta/recipes-bsp/hostap/files/COPYING.patch
deleted file mode 100644
index 05c70c92e5..0000000000
--- a/meta/recipes-bsp/hostap/files/COPYING.patch
+++ /dev/null
@@ -1,346 +0,0 @@
-Upstream-Status: Inappropriate [other]
-
-diff -ruN hostap-conf-1.0-orig/COPYING hostap-conf-1.0/COPYING
---- hostap-conf-1.0-orig/COPYING 1970-01-01 08:00:00.000000000 +0800
-+++ hostap-conf-1.0/COPYING 2010-12-09 16:36:48.000000000 +0800
-@@ -0,0 +1,340 @@
-+ GNU GENERAL PUBLIC LICENSE
-+ Version 2, June 1991
-+
-+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ Everyone is permitted to copy and distribute verbatim copies
-+ of this license document, but changing it is not allowed.
-+
-+ Preamble
-+
-+ The licenses for most software are designed to take away your
-+freedom to share and change it. By contrast, the GNU General Public
-+License is intended to guarantee your freedom to share and change free
-+software--to make sure the software is free for all its users. This
-+General Public License applies to most of the Free Software
-+Foundation's software and to any other program whose authors commit to
-+using it. (Some other Free Software Foundation software is covered by
-+the GNU Library General Public License instead.) You can apply it to
-+your programs, too.
-+
-+ When we speak of free software, we are referring to freedom, not
-+price. Our General Public Licenses are designed to make sure that you
-+have the freedom to distribute copies of free software (and charge for
-+this service if you wish), that you receive source code or can get it
-+if you want it, that you can change the software or use pieces of it
-+in new free programs; and that you know you can do these things.
-+
-+ To protect your rights, we need to make restrictions that forbid
-+anyone to deny you these rights or to ask you to surrender the rights.
-+These restrictions translate to certain responsibilities for you if you
-+distribute copies of the software, or if you modify it.
-+
-+ For example, if you distribute copies of such a program, whether
-+gratis or for a fee, you must give the recipients all the rights that
-+you have. You must make sure that they, too, receive or can get the
-+source code. And you must show them these terms so they know their
-+rights.
-+
-+ We protect your rights with two steps: (1) copyright the software, and
-+(2) offer you this license which gives you legal permission to copy,
-+distribute and/or modify the software.
-+
-+ Also, for each author's protection and ours, we want to make certain
-+that everyone understands that there is no warranty for this free
-+software. If the software is modified by someone else and passed on, we
-+want its recipients to know that what they have is not the original, so
-+that any problems introduced by others will not reflect on the original
-+authors' reputations.
-+
-+ Finally, any free program is threatened constantly by software
-+patents. We wish to avoid the danger that redistributors of a free
-+program will individually obtain patent licenses, in effect making the
-+program proprietary. To prevent this, we have made it clear that any
-+patent must be licensed for everyone's free use or not licensed at all.
-+
-+ The precise terms and conditions for copying, distribution and
-+modification follow.
-+
-+ GNU GENERAL PUBLIC LICENSE
-+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-+
-+ 0. This License applies to any program or other work which contains
-+a notice placed by the copyright holder saying it may be distributed
-+under the terms of this General Public License. The "Program", below,
-+refers to any such program or work, and a "work based on the Program"
-+means either the Program or any derivative work under copyright law:
-+that is to say, a work containing the Program or a portion of it,
-+either verbatim or with modifications and/or translated into another
-+language. (Hereinafter, translation is included without limitation in
-+the term "modification".) Each licensee is addressed as "you".
-+
-+Activities other than copying, distribution and modification are not
-+covered by this License; they are outside its scope. The act of
-+running the Program is not restricted, and the output from the Program
-+is covered only if its contents constitute a work based on the
-+Program (independent of having been made by running the Program).
-+Whether that is true depends on what the Program does.
-+
-+ 1. You may copy and distribute verbatim copies of the Program's
-+source code as you receive it, in any medium, provided that you
-+conspicuously and appropriately publish on each copy an appropriate
-+copyright notice and disclaimer of warranty; keep intact all the
-+notices that refer to this License and to the absence of any warranty;
-+and give any other recipients of the Program a copy of this License
-+along with the Program.
-+
-+You may charge a fee for the physical act of transferring a copy, and
-+you may at your option offer warranty protection in exchange for a fee.
-+
-+ 2. You may modify your copy or copies of the Program or any portion
-+of it, thus forming a work based on the Program, and copy and
-+distribute such modifications or work under the terms of Section 1
-+above, provided that you also meet all of these conditions:
-+
-+ a) You must cause the modified files to carry prominent notices
-+ stating that you changed the files and the date of any change.
-+
-+ b) You must cause any work that you distribute or publish, that in
-+ whole or in part contains or is derived from the Program or any
-+ part thereof, to be licensed as a whole at no charge to all third
-+ parties under the terms of this License.
-+
-+ c) If the modified program normally reads commands interactively
-+ when run, you must cause it, when started running for such
-+ interactive use in the most ordinary way, to print or display an
-+ announcement including an appropriate copyright notice and a
-+ notice that there is no warranty (or else, saying that you provide
-+ a warranty) and that users may redistribute the program under
-+ these conditions, and telling the user how to view a copy of this
-+ License. (Exception: if the Program itself is interactive but
-+ does not normally print such an announcement, your work based on
-+ the Program is not required to print an announcement.)
-+
-+These requirements apply to the modified work as a whole. If
-+identifiable sections of that work are not derived from the Program,
-+and can be reasonably considered independent and separate works in
-+themselves, then this License, and its terms, do not apply to those
-+sections when you distribute them as separate works. But when you
-+distribute the same sections as part of a whole which is a work based
-+on the Program, the distribution of the whole must be on the terms of
-+this License, whose permissions for other licensees extend to the
-+entire whole, and thus to each and every part regardless of who wrote it.
-+
-+Thus, it is not the intent of this section to claim rights or contest
-+your rights to work written entirely by you; rather, the intent is to
-+exercise the right to control the distribution of derivative or
-+collective works based on the Program.
-+
-+In addition, mere aggregation of another work not based on the Program
-+with the Program (or with a work based on the Program) on a volume of
-+a storage or distribution medium does not bring the other work under
-+the scope of this License.
-+
-+ 3. You may copy and distribute the Program (or a work based on it,
-+under Section 2) in object code or executable form under the terms of
-+Sections 1 and 2 above provided that you also do one of the following:
-+
-+ a) Accompany it with the complete corresponding machine-readable
-+ source code, which must be distributed under the terms of Sections
-+ 1 and 2 above on a medium customarily used for software interchange; or,
-+
-+ b) Accompany it with a written offer, valid for at least three
-+ years, to give any third party, for a charge no more than your
-+ cost of physically performing source distribution, a complete
-+ machine-readable copy of the corresponding source code, to be
-+ distributed under the terms of Sections 1 and 2 above on a medium
-+ customarily used for software interchange; or,
-+
-+ c) Accompany it with the information you received as to the offer
-+ to distribute corresponding source code. (This alternative is
-+ allowed only for noncommercial distribution and only if you
-+ received the program in object code or executable form with such
-+ an offer, in accord with Subsection b above.)
-+
-+The source code for a work means the preferred form of the work for
-+making modifications to it. For an executable work, complete source
-+code means all the source code for all modules it contains, plus any
-+associated interface definition files, plus the scripts used to
-+control compilation and installation of the executable. However, as a
-+special exception, the source code distributed need not include
-+anything that is normally distributed (in either source or binary
-+form) with the major components (compiler, kernel, and so on) of the
-+operating system on which the executable runs, unless that component
-+itself accompanies the executable.
-+
-+If distribution of executable or object code is made by offering
-+access to copy from a designated place, then offering equivalent
-+access to copy the source code from the same place counts as
-+distribution of the source code, even though third parties are not
-+compelled to copy the source along with the object code.
-+
-+ 4. You may not copy, modify, sublicense, or distribute the Program
-+except as expressly provided under this License. Any attempt
-+otherwise to copy, modify, sublicense or distribute the Program is
-+void, and will automatically terminate your rights under this License.
-+However, parties who have received copies, or rights, from you under
-+this License will not have their licenses terminated so long as such
-+parties remain in full compliance.
-+
-+ 5. You are not required to accept this License, since you have not
-+signed it. However, nothing else grants you permission to modify or
-+distribute the Program or its derivative works. These actions are
-+prohibited by law if you do not accept this License. Therefore, by
-+modifying or distributing the Program (or any work based on the
-+Program), you indicate your acceptance of this License to do so, and
-+all its terms and conditions for copying, distributing or modifying
-+the Program or works based on it.
-+
-+ 6. Each time you redistribute the Program (or any work based on the
-+Program), the recipient automatically receives a license from the
-+original licensor to copy, distribute or modify the Program subject to
-+these terms and conditions. You may not impose any further
-+restrictions on the recipients' exercise of the rights granted herein.
-+You are not responsible for enforcing compliance by third parties to
-+this License.
-+
-+ 7. If, as a consequence of a court judgment or allegation of patent
-+infringement or for any other reason (not limited to patent issues),
-+conditions are imposed on you (whether by court order, agreement or
-+otherwise) that contradict the conditions of this License, they do not
-+excuse you from the conditions of this License. If you cannot
-+distribute so as to satisfy simultaneously your obligations under this
-+License and any other pertinent obligations, then as a consequence you
-+may not distribute the Program at all. For example, if a patent
-+license would not permit royalty-free redistribution of the Program by
-+all those who receive copies directly or indirectly through you, then
-+the only way you could satisfy both it and this License would be to
-+refrain entirely from distribution of the Program.
-+
-+If any portion of this section is held invalid or unenforceable under
-+any particular circumstance, the balance of the section is intended to
-+apply and the section as a whole is intended to apply in other
-+circumstances.
-+
-+It is not the purpose of this section to induce you to infringe any
-+patents or other property right claims or to contest validity of any
-+such claims; this section has the sole purpose of protecting the
-+integrity of the free software distribution system, which is
-+implemented by public license practices. Many people have made
-+generous contributions to the wide range of software distributed
-+through that system in reliance on consistent application of that
-+system; it is up to the author/donor to decide if he or she is willing
-+to distribute software through any other system and a licensee cannot
-+impose that choice.
-+
-+This section is intended to make thoroughly clear what is believed to
-+be a consequence of the rest of this License.
-+
-+ 8. If the distribution and/or use of the Program is restricted in
-+certain countries either by patents or by copyrighted interfaces, the
-+original copyright holder who places the Program under this License
-+may add an explicit geographical distribution limitation excluding
-+those countries, so that distribution is permitted only in or among
-+countries not thus excluded. In such case, this License incorporates
-+the limitation as if written in the body of this License.
-+
-+ 9. The Free Software Foundation may publish revised and/or new versions
-+of the General Public License from time to time. Such new versions will
-+be similar in spirit to the present version, but may differ in detail to
-+address new problems or concerns.
-+
-+Each version is given a distinguishing version number. If the Program
-+specifies a version number of this License which applies to it and "any
-+later version", you have the option of following the terms and conditions
-+either of that version or of any later version published by the Free
-+Software Foundation. If the Program does not specify a version number of
-+this License, you may choose any version ever published by the Free Software
-+Foundation.
-+
-+ 10. If you wish to incorporate parts of the Program into other free
-+programs whose distribution conditions are different, write to the author
-+to ask for permission. For software which is copyrighted by the Free
-+Software Foundation, write to the Free Software Foundation; we sometimes
-+make exceptions for this. Our decision will be guided by the two goals
-+of preserving the free status of all derivatives of our free software and
-+of promoting the sharing and reuse of software generally.
-+
-+ NO WARRANTY
-+
-+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-+REPAIR OR CORRECTION.
-+
-+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-+POSSIBILITY OF SUCH DAMAGES.
-+
-+ END OF TERMS AND CONDITIONS
-+
-+ How to Apply These Terms to Your New Programs
-+
-+ If you develop a new program, and you want it to be of the greatest
-+possible use to the public, the best way to achieve this is to make it
-+free software which everyone can redistribute and change under these terms.
-+
-+ To do so, attach the following notices to the program. It is safest
-+to attach them to the start of each source file to most effectively
-+convey the exclusion of warranty; and each file should have at least
-+the "copyright" line and a pointer to where the full notice is found.
-+
-+ <one line to give the program's name and a brief idea of what it does.>
-+ Copyright (C) <year> <name of author>
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+
-+
-+Also add information on how to contact you by electronic and paper mail.
-+
-+If the program is interactive, make it output a short notice like this
-+when it starts in an interactive mode:
-+
-+ Gnomovision version 69, Copyright (C) year name of author
-+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-+ This is free software, and you are welcome to redistribute it
-+ under certain conditions; type `show c' for details.
-+
-+The hypothetical commands `show w' and `show c' should show the appropriate
-+parts of the General Public License. Of course, the commands you use may
-+be called something other than `show w' and `show c'; they could even be
-+mouse-clicks or menu items--whatever suits your program.
-+
-+You should also get your employer (if you work as a programmer) or your
-+school, if any, to sign a "copyright disclaimer" for the program, if
-+necessary. Here is a sample; alter the names:
-+
-+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
-+
-+ <signature of Ty Coon>, 1 April 1989
-+ Ty Coon, President of Vice
-+
-+This General Public License does not permit incorporating your program into
-+proprietary programs. If your program is a subroutine library, you may
-+consider it more useful to permit linking proprietary applications with the
-+library. If this is what you want to do, use the GNU Library General
-+Public License instead of this License.
diff --git a/meta/recipes-bsp/hostap/files/hostap-fw-load.patch b/meta/recipes-bsp/hostap/files/hostap-fw-load.patch
deleted file mode 100644
index 050bdc113c..0000000000
--- a/meta/recipes-bsp/hostap/files/hostap-fw-load.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
-Upstream-Status: Inappropriate [configuration]
-
---- hostap-utils-0.2.4/hostap_fw_load~hostap-fw-load
-+++ hostap-utils-0.2.4/hostap_fw_load
-@@ -6,9 +6,9 @@
- # Firmware images for the card
- # TODO: could try to select correct firmware type automatically
-
--PRI=/etc/pcmcia/PM010102.HEX
--STA=/etc/pcmcia/RF010802.HEX
--PRISM2_SREC=/usr/local/bin/prism2_srec
-+PRI=/etc/pcmcia/pm010102.hex
-+STA=/etc/pcmcia/rf010804.hex
-+PRISM2_SREC=/usr/sbin/prism2_srec
-
- set -e
-
diff --git a/meta/recipes-bsp/hostap/files/hostap_cs.conf b/meta/recipes-bsp/hostap/files/hostap_cs.conf
deleted file mode 100644
index 8dda82aad3..0000000000
--- a/meta/recipes-bsp/hostap/files/hostap_cs.conf
+++ /dev/null
@@ -1,193 +0,0 @@
-module "hostap_cs" opts "channel=3 iw_mode=2 essid=any ignore_cis_vcc=1"
-
-card "Actiontec 802CI2"
- manfid 0x1668, 0x0101
- bind "hostap_cs"
-
-card "AirWay 802.11 Adapter (PCMCIA)"
- #version "AirWay", "802.11 Adapter (PCMCIA)"
- manfid 0x0261, 0x0002
- bind "hostap_cs"
-
-card "Asus SpaceLink WL110"
- manfid 0x02aa,0x0002
- bind "hostap_cs"
-
-## handhelds.org bug 964
-card "Belkin F5D6060 Ethernet"
- #version "PCMCIA", "11M WLAN Card v2.5", "ISL37300P", "RevA"
- manfid 0x0274, 0x1612
- bind "hostap_cs"
-
-card "Compaq 11Mbps Wireless PC Card"
- manfid 0x028a, 0x0002
- bind "hostap_cs"
-
-card "Compaq WL100 11 Mbps Wireless Adapter"
- manfid 0x0138, 0x0002
- bind "hostap_cs"
-
-card "Compaq HNW-100 11 Mbps Wireless Adapter"
- manfid 0x028a, 0x0002
- bind "hostap_cs"
-
-card "D-Link DWL-650"
- version "D", "Link DWL-650 11Mbps WLAN Card"
- bind "hostap_cs"
-
-card "D-Link DRC-650"
- version "D", "Link DRC-650 11Mbps WLAN Card"
- bind "hostap_cs"
-
-card "D-Link DCF660"
- manfid 0xd601, 0x0005
- bind "hostap_cs"
-
-card "Farallon SkyLINE"
- version "INTERSIL", "HFA384x/IEEE"
- bind "hostap_cs"
-
-card "HyperLink Wireless PC Card 11Mbps"
- version "HyperLink", "Wireless PC Card 11Mbps"
- bind "hostap_cs"
-
-# card "Intersil PRISM2 11 Mbps Wireless Adapter"
-# manfid 0x0156, 0x0002
-# bind "hostap_cs"
-
-card "LA4111 Spectrum24 Wireless LAN PC Card"
- version "Symbol Technologies"
- bind "hostap_cs"
-
-card "Linksys WPC11 11Mbps 802.11b WLAN Card"
- version "Instant Wireless ", " Network PC CARD", "Version 01.02"
- bind "hostap_cs"
-
-card "Linksys WCF11 11Mbps 802.11b WLAN Card"
- manfid 0x0274, 0x3301
- bind "hostap_cs"
-
-## handhelds.org bug #790
-card "Linksys Wireless CompactFlash Card WCF12"
- manfid 0x028a, 0x0673
- bind "hostap_cs"
-
-card "Linksys WLAN CF Card"
- manfid 0x0274, 0x3301
- bind "hostap_cs"
-
-card "NETGEAR MA701 Wireless CF Card"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "Nortel Networks eMobility 802.11 Wireless Adapter"
- manfid 0x01eb, 0x080a
- bind "hostap_cs"
-
-card "PLANEX GeoWave GW-CF110"
- version "PLANEX", "GeoWave/GW-CF110"
- bind "hostap_cs"
-
-card "PROXIM LAN PC CARD HARMONY 80211B"
- version "PROXIM", "LAN PC CARD HARMONY 80211B"
- bind "hostap_cs"
-
-card "Proxim RangeLAN/DS"
- version "PROXIM","RangeLAN-DS/LAN PC CARD"
- manfid 0x0126, 0x8000
- bind "hostap_cs"
-
-card "Safeway 802.11b Wireless Adapter"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "SAMSUNG 11Mbps WLAN Card"
- version "SAMSUNG", "11Mbps WLAN Card"
- bind "hostap_cs"
-
-# needs firmware upload via hostap_fw_load
-card "SanDisk ConnectPlus OEM (0MB)"
- manfid 0xd601, 0x0010
- bind "hostap_cs"
-
-# needs special activation (>=hostap 0.3.2 only) plus firmware upload
-card "SanDisk ConnectPlus w/ Memory"
- version "SanDisk", "ConnectPlus"
- manfid 0xd601, 0x0101
- bind "hostap_cs" to 0
-# bind "ide-cs" to 1
-
-card "Senao/Origo 80211b WLAN Card"
- manfid 0x000b,0x7100
- bind "hostap_cs"
-
-card "Sitecom WL-007 WLAN CF Card"
- manfid 0xd601, 0x0004
- bind "hostap_cs"
-
-card "SMC2632 802.11 (prism2) Card"
- version "SMC", "SMC2632W", "Version 01.02", ""
- bind "hostap_cs"
-
-card "SpeedStream SS1021 Wireless Adapter"
- #version "Siemens", "SpeedStream Wireless PCMCIA"
- manfid 0x02ac, 0x0002
- bind "hostap_cs"
-
-card "ZCOMAX AirRunner/XI-300"
- #version "ZCOMAX", "AirRunner/XI-300"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "Zonet ZCF1100"
- manfid 0x000b, 0x7100
- bind "hostap_cs"
-
-card "Wireless LAN Adapter Version 01.02"
- version "Wireless", "LAN Adapter", "Version 01.02"
-# manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Ambicom WL1100C 11Mbs Card 802.11b"
- version "AmbiCom", "WL1100C 802.11b CF-Card", "2.2"
- manfid 0xd601,0x0002
- bind "hostap_cs"
-
-card "Ambicom WL1100C 11Mbs Card 802.11b"
- manfid 0xd601,0x0002
- bind "hostap_cs"
-
-card "Sandisk Connect SDWCFB-000"
- manfid 0xd601,0x0005
- bind "hostap_cs"
-
-# Cards with Intersil firmware (Prism chipset)
-
-card "Linksys WPC11 11Mbps 802.11b WLAN Card"
- version "The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", "RevA"
- bind "hostap_cs"
-
-card "Linksys CompactFlash Wireless Card"
- version "Linksys", "Wireless CompactFlash Card"
- bind "hostap_cs"
-
-card "ACTIONTEC PRISM Wireless LAN PC Card"
- version "ACTIONTEC", "PRISM Wireless LAN PC Card"
- bind "hostap_cs"
-
-card "Linksys WPC11 Version 3"
- manfid 0x0274,0x1613
- bind "hostap_cs"
-
-card "BENQ AWL100"
- version "BENQ", "AWL100 PCMCIA ADAPTER"
- bind "hostap_cs"
-
-card "Pretec WLAN"
- version "Pretec", "CompactWLAN Card 802.11b", "2.5"
- manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "TrendNet TEW PC16"
- manfid 0x0274, 0x1601
- bind "hostap_cs"
diff --git a/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream b/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream
deleted file mode 100644
index 5b7385a7cb..0000000000
--- a/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream
+++ /dev/null
@@ -1,191 +0,0 @@
-device "hostap_cs"
- class "network" module "hostap", "hostap_cs"
-
-card "Intersil PRISM2 Reference Design 11Mb/s WLAN Card"
- version "INTERSIL", "HFA384x/IEEE"
- bind "hostap_cs"
-
-card "Compaq WL100 11Mb/s WLAN Card"
- manfid 0x0138, 0x0002
- bind "hostap_cs"
-
-card "Compaq WL200"
- version "Compaq", "WL200_11Mbps_Wireless_PCI_Card"
- bind "hostap_cs"
-
-card "EMTAC A2424i 11Mbps WLAN Card"
- manfid 0xc250, 0x0002
-# cis "cis/Emtac.dat"
- bind "hostap_cs"
-
-card "Linksys WPC11 11Mbps WLAN Card"
- version "Instant Wireless ", " Network PC CARD", "Version 01.02"
- bind "hostap_cs"
-
-card "Linksys WPC11 Ver 2.5 11Mbps WLAN Card"
- manfid 0x0274, 0x1612
- bind "hostap_cs"
-
-card "Linksys WPC11 Ver 3 11Mbps WLAN Card"
- manfid 0x0274, 0x1613
- bind "hostap_cs"
-
-card "Linksys WCF12 Wireless CompactFlash Card"
- version "Linksys", "Wireless CompactFlash Card"
- bind "hostap_cs"
-
-card "D-Link DWL-650 11Mbps WLAN Card"
- version "D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02"
- bind "hostap_cs"
-
-card "D-Link DRC-650 11Mbps WLAN Card"
-# version "D", "Link DRC-650 11Mbps WLAN Card", "Version 01.02"
- manfid 0x028a, 0x0002
- bind "hostap_cs"
-
-card "ZoomAir 4100 11Mb/s WLAN Card"
- version "ZoomAir 11Mbps High", "Rate wireless Networking"
- bind "hostap_cs"
-
-card "Addtron AWP-100 11Mbps WLAN Card"
- version "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02"
- bind "hostap_cs"
-
-card "Samsung SWL2000-N 11Mb/s WLAN Card"
- manfid 0x0250, 0x0002
- bind "hostap_cs"
-
-card "SMC 2632W 11Mbps WLAN Card"
- version "SMC", "SMC2632W", "Version 01.02"
- bind "hostap_cs"
-
-card "BroMax Freeport 11Mbps WLAN Card"
- version "Intersil", "PRISM 2_5 PCMCIA ADAPTER", "ISL37300P", "Eval-RevA"
- bind "hostap_cs"
-
-card "Z-Com XI300 11Mb/s WLAN Card"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "Zcomax XI-325H 200mW"
-# version " ", "IEEE 802.11 Wireless LAN/PC Card"
- manfid 0xd601, 0x0005
- bind "hostap_cs"
-
-card "3Com AirConnect PCI 777A"
- manfid 0x0101, 0x0777
- bind "hostap_cs"
-
-card "U.S. Robotics IEEE 802.11b PC-CARD"
- version "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02"
-# manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Longshine LCR-8531 11Mbps WLAN PCMCIA CARD"
- version "OEM", "PRISM2 IEEE 802.11 PC-Card", "Version 01.02"
-# manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Philips 802.11b WLAN PCMCIA"
- manfid 0x000b, 0x7300
- bind "hostap_cs"
-
-card "Proxim RangeLAN"
-# version "PROXIM", "RangeLAN-DS/LAN PC CARD"
- manfid 0x0126, 0x8000
- bind "hostap_cs"
-
-card "Buffalo WLI-CF-S11G"
- version "BUFFALO", "WLI-CF-S11G"
-# manfid 0x026f, 0x030b
- bind "hostap_cs"
-
-card "Level-One WPC-0100"
- version "Digital Data Communications", "WPC-0100", "Version 00.00"
- manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Belkin 802.11b WLAN PCMCIA"
- version "Belkin", "11Mbps Wireless Notebook Network Adapter", "Version 01.02"
- manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Senao SL-2011CD/SL-2011CDPLUS"
- version "INTERSIL", "HFA384x/IEEE", "Version 01.02"
- manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Fulbond Airbond XI-300B"
- version " ", "IEEE 802.11 Wireless LAN/PC Card"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "Netgear MA401"
- version "NETGEAR MA401 Wireless PC", "Card", "Version 01.00"
-# manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "D-Link DWL-650 Rev. P1"
- version "D-Link", "DWL-650 Wireless PC Card RevP", "ISL37101P-10", "A3"
-# manfid 0x000b, 0x7110
- bind "hostap_cs"
-
-card "SonicWALL Long Range Wireless Card"
- version "SonicWALL", "Long Range Wireless Card", "ISL37100P", "1.0"
- manfid 0x000b, 0x7100
- bind "hostap_cs"
-
-card "Senao NL-2011CD PLUS Ext2 Mercury"
- version "WLAN", "11Mbps_PC-Card_3.0", "ISL37100P", "Eval-RevA"
- manfid 0x000b, 0x7100
- bind "hostap_cs"
-
-card "Airvast WL100"
- version "AIRVAST", "IEEE 802.11b Wireless PCMCIA Card", "HFA3863"
- manfid 0x50c2, 0x0001
- bind "hostap_cs"
-
-card "Microsoft Wireless Notebook Adapter MN-520 1.0.3"
- version "Microsoft", "Wireless Notebook Adapter MN-520", "", "1.0.3"
- manfid 0x02d2, 0x0001
- bind "hostap_cs"
-
-card "NETGEAR MA401RA"
- version "NETGEAR MA401RA Wireless PC", "Card", "ISL37300P", "Eval-RevA"
- manfid 0x000b, 0x7300
- bind "hostap_cs"
-
-card "Allied Telesyn AT-WCL452"
- version "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio", "Ver. 1.00"
- manfid 0xc00f, 0x0000
- bind "hostap_cs"
-
-card "corega WL PCCL-11"
- version "corega", "WL PCCL-11", "ISL37300P", "RevA"
- manfid 0xc00f, 0x0000
- bind "hostap_cs"
-
-card "SanDisk ConnectPlus"
- version "SanDisk", "ConnectPlus"
- manfid 0xd601, 0x0101
- bind "hostap_cs" to 0
- bind "ide-cs" to 1
-
-card "ASUS WL-100 8011b WLAN PC Card"
- version "ASUS", "802_11b_PC_CARD_25", "Version 01.00"
- manfid 0x02aa, 0x0002
- bind "hostap_cs"
-
-card "ZyXel Zyair B-101 802.11b WLAN card"
- version " ", "IEEE 802.11 Wireless LAN/PC Card"
- manfid 0xd601, 0x0010
- bind "hostap_cs"
-
-card "WLAN PRISM PCMCIA CARD 37300P RevB6"
- version "WLAN", "PRISM PCMCIA CARD", "37300P", "Revision B6"
- manfid 0x50c2, 0x7300
- bind "hostap_cs"
-
-
-# Optional configuration parameters for hostap_cs.o
-# module "hostap_cs" opts "channel=3 iw_mode=3 essid=test ignore_cis_vcc=0"
diff --git a/meta/recipes-bsp/hostap/files/hostap_cs.modalias b/meta/recipes-bsp/hostap/files/hostap_cs.modalias
deleted file mode 100644
index 2848351510..0000000000
--- a/meta/recipes-bsp/hostap/files/hostap_cs.modalias
+++ /dev/null
@@ -1,28 +0,0 @@
-# product info: "Pretec", "CompactWLAN Card 802.11b", "2.5"
-alias pcmcia:m0156c0002f06fn00pfn00pa1CADD3E5pbE697636Cpc7A5BFCF1pd00000000 hostap_cs
-
-# manufacturer ID which exist in orinoco_cs AND in hostap_cs
-alias pcmcia:m000Bc7100f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m000Bc7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0126c8000f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0138c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0250c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0274c1612f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0274c1613f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m028Ac0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m02AAc0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m50C2c7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:mD601c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:mD601c0005f06fn00pfn00pa*pb*pc*pd* hostap_cs
-
-# product info: "Linksys", "Wireless CompactFlash Card", "", ""
-alias pcmcia:m028Ac0673f06fn00pfn00pa0733CC81pb0C52F395pc00000000pd00000000 hostap_cs
-
-# product info:"PLANEX COMMUNICATION INC","PLANEX GW-CF11X Wireless CF Card", "", ""
-alias pcmcia:mD601c0010f06fn00pfn00pa4703CF68pbFAD7318Dpc00000000pd00000000 hostap_cs
-
-# 0x0156, 0x0002 and "Version 01.02" only appear for Prism based cards.
-alias pcmcia:m0156c0002f06fn00pfn00pa*pb*pc4B74BAA0pd00000000 hostap_cs
-
-# "BUFFALO", "WLI-CF-S11G", "", ""
-alias pcmcia:m026Fc030Bf06fn00pfn00pa2DECECE3pb82067C18pc00000000pd00000000 hostap_cs
diff --git a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
deleted file mode 100644
index e1d4c5477c..0000000000
--- a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Configuration files for HostAP (wifi) driver"
-DESCRIPTION = "PCMCIA-cs configuration files for wireless LAN cards based on Intersil's Prism2/2.5/3 chipset."
-SECTION = "kernel/modules"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-PR = "r15"
-
-SRC_URI = "file://hostap_cs.modalias \
- file://COPYING.patch"
-
-inherit allarch
-
-S = "${WORKDIR}"
-
-do_compile() {
-}
-
-do_install() {
- install -d ${D}${sysconfdir}/modprobe.d
-
- install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modprobe.d/hostap_cs.conf
-}
-
diff --git a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
deleted file mode 100644
index b44dca3ec8..0000000000
--- a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 742fb110d9841a04b3ced256b0bf80ff304dcaff Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 31 Aug 2015 05:45:08 +0000
-Subject: [PATCH] Define _u32/__s32/__u16/__s16/__u8 in terms of c99 types
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- wireless_copy.h | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/wireless_copy.h b/wireless_copy.h
-index 8208258..1171a35 100644
---- a/wireless_copy.h
-+++ b/wireless_copy.h
-@@ -86,11 +86,11 @@
- #else
- #include <sys/types.h>
- #include <net/if.h>
--typedef __uint32_t __u32;
--typedef __int32_t __s32;
--typedef __uint16_t __u16;
--typedef __int16_t __s16;
--typedef __uint8_t __u8;
-+typedef u_int32_t __u32;
-+typedef int32_t __s32;
-+typedef u_int16_t __u16;
-+typedef int16_t __s16;
-+typedef u_int8_t __u8;
- #ifndef __user
- #define __user
- #endif /* __user */
---
-2.5.1
-
diff --git a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
deleted file mode 100644
index 3e99d0d92e..0000000000
--- a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Obey LDFLAGS
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
-
---- hostap-utils-0.4.7.orig/Makefile
-+++ hostap-utils-0.4.7/Makefile
-@@ -14,17 +14,17 @@ prism2_srec.o: prism2_srec.c util.h
- hostap_crypt_conf: hostap_crypt_conf.c
-
- hostap_diag: hostap_diag.o util.o
-- $(CC) -o hostap_diag $(CFLAGS) hostap_diag.o util.o
-+ $(CC) -o hostap_diag $(CFLAGS) $(LDFLAGS) hostap_diag.o util.o
-
- hostap_diag.o: hostap_diag.c util.h
-
- util.o: util.c util.h
-
- hostap_io_debug: hostap_io_debug.c
-- $(CC) -o hostap_io_debug $(CFLAGS) hostap_io_debug.c
-+ $(CC) -o hostap_io_debug $(CFLAGS) $(LDFLAGS) hostap_io_debug.c
-
- hostap_rid: hostap_rid.o util.o
-- $(CC) -o hostap_rid $(CFLAGS) hostap_rid.o util.o
-+ $(CC) -o hostap_rid $(CFLAGS) $(LDFLAGS) hostap_rid.o util.o
-
- hostap_rid.o: hostap_rid.c util.h
diff --git a/meta/recipes-bsp/hostap/hostap-utils.inc b/meta/recipes-bsp/hostap/hostap-utils.inc
deleted file mode 100644
index 140321d0c2..0000000000
--- a/meta/recipes-bsp/hostap/hostap-utils.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "User mode helpers for the hostap driver"
-DESCRIPTION = "The hostap driver supports Host AP mode, it allows for IEEE 802.11 \
-management functions on the host computer and allows the system to act as an access point."
-HOMEPAGE = "http://hostap.epitest.fi"
-BUGTRACKER = "http://hostap.epitest.fi/bugz/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://util.c;beginline=1;endline=9;md5=d3b9280851302e5ba34e5fb717489b6d"
-SECTION = "kernel/userland"
-PR = "r4"
-
-SRC_URI = "http://hostap.epitest.fi/releases/hostap-utils-${PV}.tar.gz \
- file://hostap-fw-load.patch \
- file://0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch \
-"
-S = "${WORKDIR}/hostap-utils-${PV}"
-
-BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
- hostap_rid prism2_param prism2_srec split_combined_hex"
-
-do_install() {
- install -d ${D}${sbindir}/
- for f in ${BINARIES}
- do
- install -m 0755 $f ${D}${sbindir}/
- done
-}
-
diff --git a/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb b/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
deleted file mode 100644
index be5481f6f7..0000000000
--- a/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require hostap-utils.inc
-
-SRC_URI += "file://ldflags.patch"
-SRC_URI[md5sum] = "afe041581b8f01666e353bec20917c85"
-SRC_URI[sha256sum] = "c6f598d8e356c1620fa009eca0a700bf1105e16817eefd77d891994261009355"
diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
index 5793a76529..24b13f920f 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -37,7 +37,7 @@ do_install () {
fi
}
-DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
pkg_postinst_${PN} () {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
if [ -n "$D" ]; then
diff --git a/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch b/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
index 86a16c262f..06f20e5a78 100644
--- a/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
+++ b/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
@@ -3,9 +3,10 @@ Upstream-Status: Pending
Fix libacpi for x32
libacpi doesn't use base_libdir for install. This patch adds
- base_libdir support so that x32 libraries are installed properly.
+ libdir support so that x32 libraries are installed properly.
Patch Received from: H.J. Lu <hjl.tools@gmail.com>
+Updated by: Ricardo Salveti <ricardo@opensourcefoundries.com> 2018/02/03
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
@@ -13,18 +14,7 @@ Index: libacpi-0.2/Makefile
===================================================================
--- libacpi-0.2.orig/Makefile
+++ libacpi-0.2/Makefile
-@@ -8,6 +8,10 @@ SRC_test = test-libacpi.c libacpi.c list
- OBJ = ${SRC:.c=.o}
- OBJ_test = ${SRC_test:.c=.o}
-
-+ifndef base_libdir
-+base_libdir=/lib
-+endif
-+
- all: options libacpi.a libacpi.so test-libacpi
-
- options:
-@@ -42,13 +46,13 @@ install: all
+@@ -42,13 +42,13 @@ install: all
@mkdir -p ${DESTDIR}${PREFIX}/include
@cp -f libacpi.h ${DESTDIR}${PREFIX}/include
@chmod 644 ${DESTDIR}${PREFIX}/include/libacpi.h
@@ -35,13 +25,13 @@ Index: libacpi-0.2/Makefile
- @cp -f ${SONAME} ${DESTDIR}${PREFIX}/lib/
- @chmod 644 ${DESTDIR}${PREFIX}/lib/${SONAME}
- @ln -s ${SONAME} ${DESTDIR}${PREFIX}/lib/libacpi.so
-+ @echo installing library to ${DESTDIR}${PREFIX}${base_libdir}
-+ @mkdir -p ${DESTDIR}${PREFIX}${base_libdir}
-+ @cp -f libacpi.a ${DESTDIR}${PREFIX}${base_libdir}
-+ @chmod 644 ${DESTDIR}${PREFIX}${base_libdir}/libacpi.a
-+ @cp -f ${SONAME} ${DESTDIR}${PREFIX}${base_libdir}/
-+ @chmod 644 ${DESTDIR}${PREFIX}${base_libdir}/${SONAME}
-+ @ln -s ${SONAME} ${DESTDIR}${PREFIX}${base_libdir}/libacpi.so
++ @echo installing library to ${DESTDIR}${LIBDIR}
++ @mkdir -p ${DESTDIR}${LIBDIR}
++ @cp -f libacpi.a ${DESTDIR}${LIBDIR}
++ @chmod 644 ${DESTDIR}${LIBDIR}/libacpi.a
++ @cp -f ${SONAME} ${DESTDIR}${LIBDIR}/
++ @chmod 644 ${DESTDIR}${LIBDIR}/${SONAME}
++ @ln -s ${SONAME} ${DESTDIR}${LIBDIR}/libacpi.so
@echo installing test-libacpi to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f test-libacpi ${DESTDIR}${PREFIX}/bin
diff --git a/meta/recipes-bsp/libacpi/libacpi_0.2.bb b/meta/recipes-bsp/libacpi/libacpi_0.2.bb
index 6dc66ea25f..5e7f7fa8e0 100644
--- a/meta/recipes-bsp/libacpi/libacpi_0.2.bb
+++ b/meta/recipes-bsp/libacpi/libacpi_0.2.bb
@@ -28,5 +28,5 @@ EXTRA_OEMAKE = '-e MAKEFLAGS= STRIP="echo"'
TARGET_CC_ARCH += "${LDFLAGS}"
do_install() {
- oe_runmake install DESTDIR=${D} PREFIX=${exec_prefix}
+ oe_runmake install DESTDIR=${D} PREFIX=${exec_prefix} LIBDIR=${libdir}
}
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/acdefine.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/acdefine.patch
deleted file mode 100644
index 682cf416e2..0000000000
--- a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/acdefine.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Add a description to the AC_DEFINE for LOCALEDIR so that it appears in config.h
-and silences a fatal warning.
-
-Upstream-Status:Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.in b/configure.in
-index c10460c..aa20263 100644
---- a/configure.in
-+++ b/configure.in
-@@ -258,7 +258,7 @@ AC_SUBST(LIBS)
-
- AM_GNU_GETTEXT
-
--AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
-+AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME",[locale directory])
-
- AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile m4/Makefile \
- man/Makefile po/Makefile.in src/Makefile debian/rules Specfile systype \
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch
new file mode 100644
index 0000000000..33af38b4a8
--- /dev/null
+++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch
@@ -0,0 +1,5749 @@
+Update autotools infrastructure (including gettext) to modern versions.
+
+Upstream-Status: Pending
+Signed-off-by: Phil Blundell <pb@pbcl.net>
+
+diff -uprN clean/lrzsz-0.12.20/configure.in lrzsz-0.12.20/configure.in
+--- clean/lrzsz-0.12.20/configure.in 1998-12-30 07:50:07.000000000 +0000
++++ lrzsz-0.12.20/configure.in 2019-11-25 16:22:37.000000000 +0000
+@@ -92,7 +92,6 @@ AC_PROG_RANLIB
+ AC_ISC_POSIX
+ AC_AIX
+ AC_MINIX
+-AM_C_PROTOTYPES
+ AC_C_CONST
+ AC_C_INLINE
+
+@@ -253,18 +252,13 @@ ihave$lookup_facility
+ fi
+
+
+-AC_SUBST(CFLAGS)
+-AC_SUBST(LDFLAGS)
+ AC_SUBST(LIBS)
+
+-AM_GNU_GETTEXT
++AM_GNU_GETTEXT([external])
+
+-AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
+-AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+-
+-AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \
++AC_OUTPUT([Makefile lib/Makefile testsuite/Makefile \
+ man/Makefile po/Makefile.in src/Makefile debian/rules Specfile systype \
+ src/lrzszbug],
+-[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile;
++[
+ chmod +x debian/rules;
+ test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
+diff -uprN clean/lrzsz-0.12.20/intl/bindtextdom.c lrzsz-0.12.20/intl/bindtextdom.c
+--- clean/lrzsz-0.12.20/intl/bindtextdom.c 1998-04-26 14:22:36.000000000 +0100
++++ lrzsz-0.12.20/intl/bindtextdom.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,199 +0,0 @@
+-/* Implementation of the bindtextdomain(3) function
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#if defined STDC_HEADERS || defined _LIBC
+-# include <stdlib.h>
+-#else
+-# ifdef HAVE_MALLOC_H
+-# include <malloc.h>
+-# else
+-void free ();
+-# endif
+-#endif
+-
+-#if defined HAVE_STRING_H || defined _LIBC
+-# include <string.h>
+-#else
+-# include <strings.h>
+-# ifndef memcpy
+-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+-# endif
+-#endif
+-
+-#ifdef _LIBC
+-# include <libintl.h>
+-#else
+-# include "libgettext.h"
+-#endif
+-#include "gettext.h"
+-#include "gettextP.h"
+-
+-/* @@ end of prolog @@ */
+-
+-/* Contains the default location of the message catalogs. */
+-extern const char _nl_default_dirname[];
+-
+-/* List with bindings of specific domains. */
+-extern struct binding *_nl_domain_bindings;
+-
+-
+-/* Names for the libintl functions are a problem. They must not clash
+- with existing names and they should follow ANSI C. But this source
+- code is also used in GNU C Library where the names have a __
+- prefix. So we have to make a difference here. */
+-#ifdef _LIBC
+-# define BINDTEXTDOMAIN __bindtextdomain
+-# define strdup(str) __strdup (str)
+-#else
+-# define BINDTEXTDOMAIN bindtextdomain__
+-#endif
+-
+-/* Specify that the DOMAINNAME message catalog will be found
+- in DIRNAME rather than in the system locale data base. */
+-char *
+-BINDTEXTDOMAIN (domainname, dirname)
+- const char *domainname;
+- const char *dirname;
+-{
+- struct binding *binding;
+-
+- /* Some sanity checks. */
+- if (domainname == NULL || domainname[0] == '\0')
+- return NULL;
+-
+- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+- {
+- int compare = strcmp (domainname, binding->domainname);
+- if (compare == 0)
+- /* We found it! */
+- break;
+- if (compare < 0)
+- {
+- /* It is not in the list. */
+- binding = NULL;
+- break;
+- }
+- }
+-
+- if (dirname == NULL)
+- /* The current binding has be to returned. */
+- return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
+-
+- if (binding != NULL)
+- {
+- /* The domain is already bound. If the new value and the old
+- one are equal we simply do nothing. Otherwise replace the
+- old binding. */
+- if (strcmp (dirname, binding->dirname) != 0)
+- {
+- char *new_dirname;
+-
+- if (strcmp (dirname, _nl_default_dirname) == 0)
+- new_dirname = (char *) _nl_default_dirname;
+- else
+- {
+-#if defined _LIBC || defined HAVE_STRDUP
+- new_dirname = strdup (dirname);
+- if (new_dirname == NULL)
+- return NULL;
+-#else
+- size_t len = strlen (dirname) + 1;
+- new_dirname = (char *) malloc (len);
+- if (new_dirname == NULL)
+- return NULL;
+-
+- memcpy (new_dirname, dirname, len);
+-#endif
+- }
+-
+- if (binding->dirname != _nl_default_dirname)
+- free (binding->dirname);
+-
+- binding->dirname = new_dirname;
+- }
+- }
+- else
+- {
+- /* We have to create a new binding. */
+- size_t len;
+- struct binding *new_binding =
+- (struct binding *) malloc (sizeof (*new_binding));
+-
+- if (new_binding == NULL)
+- return NULL;
+-
+-#if defined _LIBC || defined HAVE_STRDUP
+- new_binding->domainname = strdup (domainname);
+- if (new_binding->domainname == NULL)
+- return NULL;
+-#else
+- len = strlen (domainname) + 1;
+- new_binding->domainname = (char *) malloc (len);
+- if (new_binding->domainname == NULL)
+- return NULL;
+- memcpy (new_binding->domainname, domainname, len);
+-#endif
+-
+- if (strcmp (dirname, _nl_default_dirname) == 0)
+- new_binding->dirname = (char *) _nl_default_dirname;
+- else
+- {
+-#if defined _LIBC || defined HAVE_STRDUP
+- new_binding->dirname = strdup (dirname);
+- if (new_binding->dirname == NULL)
+- return NULL;
+-#else
+- len = strlen (dirname) + 1;
+- new_binding->dirname = (char *) malloc (len);
+- if (new_binding->dirname == NULL)
+- return NULL;
+- memcpy (new_binding->dirname, dirname, len);
+-#endif
+- }
+-
+- /* Now enqueue it. */
+- if (_nl_domain_bindings == NULL
+- || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
+- {
+- new_binding->next = _nl_domain_bindings;
+- _nl_domain_bindings = new_binding;
+- }
+- else
+- {
+- binding = _nl_domain_bindings;
+- while (binding->next != NULL
+- && strcmp (domainname, binding->next->domainname) > 0)
+- binding = binding->next;
+-
+- new_binding->next = binding->next;
+- binding->next = new_binding;
+- }
+-
+- binding = new_binding;
+- }
+-
+- return binding->dirname;
+-}
+-
+-#ifdef _LIBC
+-/* Alias for function name in GNU C Library. */
+-weak_alias (__bindtextdomain, bindtextdomain);
+-#endif
+diff -uprN clean/lrzsz-0.12.20/intl/cat-compat.c lrzsz-0.12.20/intl/cat-compat.c
+--- clean/lrzsz-0.12.20/intl/cat-compat.c 1998-04-26 14:22:37.000000000 +0100
++++ lrzsz-0.12.20/intl/cat-compat.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,262 +0,0 @@
+-/* Compatibility code for gettext-using-catgets interface.
+- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include <stdio.h>
+-
+-#ifdef STDC_HEADERS
+-# include <stdlib.h>
+-# include <string.h>
+-#else
+-char *getenv ();
+-# ifdef HAVE_MALLOC_H
+-# include <malloc.h>
+-# endif
+-#endif
+-
+-#ifdef HAVE_NL_TYPES_H
+-# include <nl_types.h>
+-#endif
+-
+-#include "libgettext.h"
+-
+-/* @@ end of prolog @@ */
+-
+-/* XPG3 defines the result of `setlocale (category, NULL)' as:
+- ``Directs `setlocale()' to query `category' and return the current
+- setting of `local'.''
+- However it does not specify the exact format. And even worse: POSIX
+- defines this not at all. So we can use this feature only on selected
+- system (e.g. those using GNU C Library). */
+-#ifdef _LIBC
+-# define HAVE_LOCALE_NULL
+-#endif
+-
+-/* The catalog descriptor. */
+-static nl_catd catalog = (nl_catd) -1;
+-
+-/* Name of the default catalog. */
+-static const char default_catalog_name[] = "messages";
+-
+-/* Name of currently used catalog. */
+-static const char *catalog_name = default_catalog_name;
+-
+-/* Get ID for given string. If not found return -1. */
+-static int msg_to_cat_id PARAMS ((const char *msg));
+-
+-/* Substitution for systems lacking this function in their C library. */
+-#if !_LIBC && !HAVE_STPCPY
+-static char *stpcpy PARAMS ((char *dest, const char *src));
+-#endif
+-
+-
+-/* Set currently used domain/catalog. */
+-char *
+-textdomain (domainname)
+- const char *domainname;
+-{
+- nl_catd new_catalog;
+- char *new_name;
+- size_t new_name_len;
+- char *lang;
+-
+-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
+- && defined HAVE_LOCALE_NULL
+- lang = setlocale (LC_MESSAGES, NULL);
+-#else
+- lang = getenv ("LC_ALL");
+- if (lang == NULL || lang[0] == '\0')
+- {
+- lang = getenv ("LC_MESSAGES");
+- if (lang == NULL || lang[0] == '\0')
+- lang = getenv ("LANG");
+- }
+-#endif
+- if (lang == NULL || lang[0] == '\0')
+- lang = "C";
+-
+- /* See whether name of currently used domain is asked. */
+- if (domainname == NULL)
+- return (char *) catalog_name;
+-
+- if (domainname[0] == '\0')
+- domainname = default_catalog_name;
+-
+- /* Compute length of added path element. */
+- new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
+- + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
+- + sizeof (".cat");
+-
+- new_name = (char *) malloc (new_name_len);
+- if (new_name == NULL)
+- return NULL;
+-
+- strcpy (new_name, PACKAGE);
+- new_catalog = catopen (new_name, 0);
+-
+- if (new_catalog == (nl_catd) -1)
+- {
+- /* NLSPATH search didn't work, try absolute path */
+- sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
+- PACKAGE);
+- new_catalog = catopen (new_name, 0);
+-
+- if (new_catalog == (nl_catd) -1)
+- {
+- free (new_name);
+- return (char *) catalog_name;
+- }
+- }
+-
+- /* Close old catalog. */
+- if (catalog != (nl_catd) -1)
+- catclose (catalog);
+- if (catalog_name != default_catalog_name)
+- free ((char *) catalog_name);
+-
+- catalog = new_catalog;
+- catalog_name = new_name;
+-
+- return (char *) catalog_name;
+-}
+-
+-char *
+-bindtextdomain (domainname, dirname)
+- const char *domainname;
+- const char *dirname;
+-{
+-#if HAVE_SETENV || HAVE_PUTENV
+- char *old_val, *new_val, *cp;
+- size_t new_val_len;
+-
+- /* This does not make much sense here but to be compatible do it. */
+- if (domainname == NULL)
+- return NULL;
+-
+- /* Compute length of added path element. If we use setenv we don't need
+- the first byts for NLSPATH=, but why complicate the code for this
+- peanuts. */
+- new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
+- + sizeof ("/%L/LC_MESSAGES/%N.cat");
+-
+- old_val = getenv ("NLSPATH");
+- if (old_val == NULL || old_val[0] == '\0')
+- {
+- old_val = NULL;
+- new_val_len += 1 + sizeof (LOCALEDIR) - 1
+- + sizeof ("/%L/LC_MESSAGES/%N.cat");
+- }
+- else
+- new_val_len += strlen (old_val);
+-
+- new_val = (char *) malloc (new_val_len);
+- if (new_val == NULL)
+- return NULL;
+-
+-# if HAVE_SETENV
+- cp = new_val;
+-# else
+- cp = stpcpy (new_val, "NLSPATH=");
+-# endif
+-
+- cp = stpcpy (cp, dirname);
+- cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
+-
+- if (old_val == NULL)
+- {
+-# if __STDC__
+- stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
+-# else
+-
+- cp = stpcpy (cp, LOCALEDIR);
+- stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
+-# endif
+- }
+- else
+- stpcpy (cp, old_val);
+-
+-# if HAVE_SETENV
+- setenv ("NLSPATH", new_val, 1);
+- free (new_val);
+-# else
+- putenv (new_val);
+- /* Do *not* free the environment entry we just entered. It is used
+- from now on. */
+-# endif
+-
+-#endif
+-
+- return (char *) domainname;
+-}
+-
+-#undef gettext
+-char *
+-gettext (msg)
+- const char *msg;
+-{
+- int msgid;
+-
+- if (msg == NULL || catalog == (nl_catd) -1)
+- return (char *) msg;
+-
+- /* Get the message from the catalog. We always use set number 1.
+- The message ID is computed by the function `msg_to_cat_id'
+- which works on the table generated by `po-to-tbl'. */
+- msgid = msg_to_cat_id (msg);
+- if (msgid == -1)
+- return (char *) msg;
+-
+- return catgets (catalog, 1, msgid, (char *) msg);
+-}
+-
+-/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
+- for the one equal to msg. If it is found return the ID. In case when
+- the string is not found return -1. */
+-static int
+-msg_to_cat_id (msg)
+- const char *msg;
+-{
+- int cnt;
+-
+- for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
+- if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
+- return _msg_tbl[cnt]._msg_number;
+-
+- return -1;
+-}
+-
+-
+-/* @@ begin of epilog @@ */
+-
+-/* We don't want libintl.a to depend on any other library. So we
+- avoid the non-standard function stpcpy. In GNU C Library this
+- function is available, though. Also allow the symbol HAVE_STPCPY
+- to be defined. */
+-#if !_LIBC && !HAVE_STPCPY
+-static char *
+-stpcpy (dest, src)
+- char *dest;
+- const char *src;
+-{
+- while ((*dest++ = *src++) != '\0')
+- /* Do nothing. */ ;
+- return dest - 1;
+-}
+-#endif
+diff -uprN clean/lrzsz-0.12.20/intl/ChangeLog lrzsz-0.12.20/intl/ChangeLog
+--- clean/lrzsz-0.12.20/intl/ChangeLog 1998-04-26 14:22:35.000000000 +0100
++++ lrzsz-0.12.20/intl/ChangeLog 1970-01-01 01:00:00.000000000 +0100
+@@ -1,1022 +0,0 @@
+-1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com>
+-
+- * intlh.inst.in: Reformat copyright.
+-
+-1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com>
+-
+- * dcgettext.c (DCGETTEXT): Remove wrong comment.
+-
+-1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
+-
+- * Makefile.in (install-data): Don't change directory to install.
+-
+-1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com>
+-
+- * cat-compat.c: Fix copyright.
+-
+- * localealias.c: Don't define strchr unless !HAVE_STRCHR.
+-
+- * loadmsgcat.c: Update copyright. Fix typos.
+-
+- * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
+- (_nl_make_l10nflist): Handle sponsor and revision correctly.
+-
+- * gettext.c: Update copyright.
+- * gettext.h: Likewise.
+- * hash-string.h: Likewise.
+-
+- * finddomain.c: Remoave dead code. Define strchr only if
+- !HAVE_STRCHR.
+-
+- * explodename.c: Include <sys/types.h>.
+-
+- * explodename.c: Reformat copyright text.
+- (_nl_explode_name): Fix typo.
+-
+- * dcgettext.c: Define and use __set_errno.
+- (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
+- not defined.
+-
+- * bindtextdom.c: Pretty printing.
+-
+-1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com>
+-
+- * dcgettext.c (guess_category_value): Don't depend on
+- HAVE_LC_MESSAGES. We don't need the macro here.
+- Patch by Bruno Haible <haible@ilog.fr>.
+-
+- * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
+- macro. Instead use HAVE_LOCALE_NULL and define it when using
+- glibc, as in dcgettext.c.
+- Patch by Bruno Haible <haible@ilog.fr>.
+-
+- * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
+- Pinard.
+-
+-Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com>
+-
+- * Makefile.in: Implement handling of libtool.
+-
+- * gettextP.h: Change data structures for use of generic lowlevel
+- i18n file handling.
+-
+-Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * textdomain.c: Put parentheses around arguments of memcpy macro
+- definition.
+- * localealias.c: Likewise.
+- * l10nflist.c: Likewise.
+- * finddomain.c: Likewise.
+- * bindtextdom.c: Likewise.
+- Reported by Thomas Esken.
+-
+-Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * textdomain.c: Move definition of `memcpy` macro to right
+- position.
+-
+-Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
+- bcopy if not already defined. Reported by Thomas Esken.
+- * bindtextdom.c: Likewise.
+- * l10nflist.c: Likewise.
+- * localealias.c: Likewise.
+- * textdomain.c: Likewise.
+-
+-Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * Makefile.in (libdir): Change to use exec_prefix instead of
+- prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>.
+-
+-Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
+- so don't prepend uppercase `ISO' for only numeric arg.
+-
+-Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
+- definition of _GNU_SOURCE. Patch by Roland McGrath.
+-
+- * Makefile.in (uninstall): Fix another bug with `for' loop and
+- empty arguments. Patch by Jim Meyering. Correct name os
+- uninstalled files: no intl- prefix anymore.
+-
+- * Makefile.in (install-data): Again work around shells which
+- cannot handle mpty for list. Reported by Jim Meyering.
+-
+-Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * Makefile.in (install): Split goal. Now depend on install-exec
+- and install-data.
+- (install-exec, install-data): New goals. Created from former
+- install goal.
+- Reported by Karl Berry.
+-
+-Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * Makefile.in (MKINSTALLDIRS): New variable. Path to
+- mkinstalldirs script.
+- (install): use MKINSTALLDIRS variable or if the script is not present
+- try to find it in the $top_scrdir).
+-
+-Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * l10nflist.c: Linux libc *partly* includes the argz_* functions.
+- Grr. Work around by renaming the static version and use macros
+- for renaming.
+-
+-Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * l10nflist.c: Correct presence test macros of __argz_* functions.
+-
+- * l10nflist.c: Include <argz.h> based on test of it instead when
+- __argz_* functions are available.
+- Reported by Andreas Schwab.
+-
+-Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * explodename.c, l10nflist.c: Define NULL for dumb systems.
+-
+-Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
+- result to __result to prevent name clash.
+-
+- * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
+- get prototype for stpcpy and strcasecmp.
+-
+- * intlh.inst.in, libgettext.h: Move declaration of
+- `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
+- from gcc's -Wnested-extern option.
+-
+-Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * Makefile.in (install): Remove comment.
+-
+-Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * Makefile.in (install): Work around for another Buglix stupidity.
+- Always use an `else' close for `if's. Reported by Nelson Beebe.
+-
+- * Makefile.in (intlh.inst): Correct typo in phony rule.
+- Reported by Nelson Beebe.
+-
+-Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * dcgettext.c (read_alias_file): Rename variable alloca_list to
+- block_list as the macro calls assume.
+- Patch by Eric Backus.
+-
+- * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
+- malloc.
+- (read_alias_file): Rename varriabe alloca_list to block_list as the
+- macro calls assume.
+- Patch by Eric Backus.
+-
+- * l10nflist.c: Correct conditional for <argz.h> inclusion.
+- Reported by Roland McGrath.
+-
+- * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
+- all-@USE_NLS@.
+-
+- * Makefile.in (install): intlh.inst comes from local dir, not
+- $(srcdir).
+-
+- * Makefile.in (intlh.inst): Special handling of this goal. If
+- used in gettext, this is really a rul to construct this file. If
+- used in any other package it is defined as a .PHONY rule with
+- empty body.
+-
+- * finddomain.c: Extract locale file information handling into
+- l10nfile.c. Rename local stpcpy__ function to stpcpy.
+-
+- * dcgettext.c (stpcpy): Add local definition.
+-
+- * l10nflist.c: Solve some portability problems. Patches partly by
+- Thomas Esken. Add local definition of stpcpy.
+-
+-Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * intlh.inst.in: Don't depend including <locale.h> on
+- HAVE_LOCALE_H. Instead configure must rewrite this fiile
+- depending on the result of the configure run.
+-
+- * Makefile.in (install): libintl.inst is now called intlh.inst.
+- Add rules for updating intlh.inst from intlh.inst.in.
+-
+- * libintl.inst: Renamed to intlh.inst.in.
+-
+- * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
+- because gcc has __buitlin_alloca.
+- Reported by Roland McGrath.
+-
+-Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * Makefile.in (installcheck): New goal to fulfill needs of
+- automake's distcheck.
+-
+- * Makefile.in (install): Reorder commands so that VERSION is
+- found.
+-
+- * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
+- @datadir@/gettext.
+- (COMSRCS): Add l10nfile.c.
+- (OBJECTS): Add l10nfile.o.
+- (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
+- (DISTFILE.gettext): Remove $(DISTFILES.common).
+- (all-gettext): Remove goal.
+- (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
+- package but gettext itself should install libintl.h + headers.
+- (dist): Extend goal to work for gettext, too.
+- (dist-gettext): Remove goal.
+-
+- * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
+-
+-Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
+- find_l10nfile.
+-
+-Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com>
+-
+- * l10nflist.c (__argz_next): Add definition.
+-
+- * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
+- code. Use new l10nfile handling.
+-
+- * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
+- alloca code.
+-
+- * l10nflist.c: Initial revision.
+-
+-Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (all-gettext): New goal. Same as all-yes.
+-
+-Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de>
+-
+- * Makefile.in (gettextsrcdir): Define using @datadir@.
+-
+-Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
+-
+-Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
+- with external declaration.
+-
+-Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (all-no): Rename from all_no.
+-
+-Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware>
+-
+- * gettextP.h [loaded_domain]: Array `successor' must now contain up
+- to 63 elements (because of codeset name normalization).
+-
+- * finddomain.c: Implement codeset name normalization.
+-
+-Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (all): Define to `all-@USE_NLS@'.
+- (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
+- is former all.
+-
+-Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com>
+-
+- * localealias.c (alias_compare): Increment string pointers in loop
+- of strcasecmp replacement.
+-
+-Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (install-src): Who commented this goal out ? :-)
+-
+-Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware>
+-
+- * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
+- should not effect it because a missing catalog is no error.
+- Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
+-
+-Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (Makefile): Explicitly use $(SHELL) for running
+- shell scripts.
+-
+-Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+-
+- * Makefile.in (install-src): Only install library and header when
+- we use the own implementation. Don't do it when using the
+- system's gettext or catgets functions.
+-
+- * dcgettext.c (find_msg): Must not swap domain->hash_size here.
+-
+-Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware>
+-
+- * localealias.c, libintl.inst, libgettext.h, hash-string.h,
+- gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
+- Use PARAMS instead of __P. Suggested by Roland McGrath.
+-
+-Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu>
+-
+- * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
+- !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
+-
+-Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (install-src):
+- Install libintl.inst instead of libintl.h.install.
+-
+-Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
+-
+- * cat-compat.c (textdomain):
+- Reverse order in which files are tried you load. First
+- try local file, when this failed absolute path.
+-
+-Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
+-
+- * cat-compat.c (bindtextdomain): Add missing { }.
+-
+-Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
+-
+- * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
+-
+- * Makefile.in:
+- Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
+-
+-Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
+-
+- * hash-string.h: Capitalize arguments of macros.
+-
+-Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (DISTFILES): Prevent files names longer than 13
+- characters. libintl.h.glibc->libintl.glibc,
+- libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
+-
+-Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
+-
+- * dcgettext.c: Fix bug in preprocessor conditionals.
+-
+-Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
+-
+- * libgettext.h: Solaris cc does not understand
+- #if !SYMBOL1 && !SYMBOL2. Sad but true.
+-
+-Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
+-
+- * hash-string.h (hash_string):
+- Fix for machine with >32 bit `unsigned long's.
+-
+- * dcgettext.c (DCGETTEXT):
+- Fix horrible bug in loop for alternative translation.
+-
+-Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
+-
+- * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
+- Some further simplifications in message number generation.
+-
+-Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
+-
+- * libintl.h.glibc: Use __const instead of const in prototypes.
+-
+- * Makefile.in (install-src):
+- Install libintl.h.install instead of libintl.h. This
+- is a stripped-down version. Suggested by Peter Miller.
+-
+- * libintl.h.install, libintl.h.glibc: Initial revision.
+-
+- * localealias.c (_nl_expand_alias, read_alias_file):
+- Protect prototypes in type casts by __P.
+-
+-Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
+-
+- * hash-string.h: Correct prototype for hash_string.
+-
+-Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
+-
+- * hash-string.h (hash_string): Add prototype.
+-
+- * gettextP.h: Fix copyright.
+- (SWAP): Add prototype.
+-
+-Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
+-
+- * localealias.c (read_alias_file): Forgot sizeof.
+- Avoid calling *printf function. This introduces a big overhead.
+- Patch by Roland McGrath.
+-
+-Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
+-
+- * finddomain.c (stpcpy):
+- Define substitution function local. The macro was to flaky.
+-
+- * cat-compat.c: Fix typo.
+-
+- * xopen-msg.sed, linux-msg.sed:
+- While bringing message number to right place only accept digits.
+-
+- * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
+- leading 0s we don't need to remove them. Reported by Marcus
+- Daniels.
+-
+- * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
+- dependency. Reported by Marcus Daniels.
+-
+- * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
+- Generally cleanup using #if instead of #ifndef.
+-
+- * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
+-
+-Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (install-src): Don't install libintl.h and libintl.a
+- if we use an available gettext implementation.
+-
+-Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
+-
+- * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
+- by Franc,ois Pinard.
+-
+- * libgettext.h: Use #if instead of #ifdef/#ifndef.
+-
+- * finddomain.c:
+- Comments describing what has to be done should start with FIXME.
+-
+-Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
+- DISTFILES.common names the files common to both dist goals.
+- DISTFILES.gettext are the files only distributed in GNU gettext.
+-
+-Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
+-
+- * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
+- This was necessary since a change in _nl_find_msg several weeks
+- ago. I really don't know this is still not fixed.
+-
+-Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
+-
+- * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
+- might mark a special condition.
+-
+- * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
+-
+- * Makefile.in (dist): Suppress error message when ln failed.
+- Get files from $(srcdir) explicitly.
+-
+- * libgettext.h (gettext_const): Rename to gettext_noop.
+-
+-Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c (make_entry_rec):
+- Protect against wrong locale names by testing mask.
+-
+- * libgettext.h (gettext_const): Add macro definition.
+- Capitalize macro arguments.
+-
+-Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c (_nl_find_domain):
+- Test for pointer != NULL before accessing value.
+- Reported by Tom Tromey.
+-
+- * gettext.c (NULL):
+- Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
+-
+-Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
+-
+- * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
+-
+-Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
+-
+- * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
+-
+- * localealias.c (alias_compare):
+- Peter Miller reported that tolower in some systems is
+- even dumber than I thought. Protect call by `isupper'.
+-
+-Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (libdir, includedir): New variables.
+- (install-src): Install libintl.a and libintl.h in correct dirs.
+-
+-Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
+-
+- * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
+-
+- * localealias.c:
+- Fix typo and superflous test. Reported by Christian von Roques.
+-
+-Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c (_nl_find_domain):
+- Correct some remainder from the pre-CEN syntax. Now
+- we don't have a constant number of successors anymore.
+-
+-Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (DISTFILES): Add libintl.h.glibc.
+-
+- * Makefile.in (dist-libc): Add goal for packing sources for glibc.
+- (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
+-
+- * loadmsgcat.c: Forget to continue #if line.
+-
+- * localealias.c:
+- [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
+- space clean.
+-
+- * dcgettext.c, finddomain.c: Better comment to last change.
+-
+- * loadmsgcat.c:
+- [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
+- __fstat, __open, __close, __read, __mmap, and __munmap resp
+- to keep ANSI C name space clean.
+-
+- * finddomain.c:
+- [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
+-
+- * dcgettext.c:
+- [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
+- keep ANSI C name space clean.
+-
+- * libgettext.h:
+- Include sys/types.h for those old SysV systems out there.
+- Reported by Francesco Potorti`.
+-
+- * loadmsgcat.c (use_mmap): Define if compiled for glibc.
+-
+- * bindtextdom.c: Include all those standard headers
+- unconditionally if _LIBC is defined.
+-
+- * finddomain.c: Fix 2 times defiend -> defined.
+-
+- * textdomain.c: Include libintl.h instead of libgettext.h when
+- compiling for glibc. Include all those standard headers
+- unconditionally if _LIBC is defined.
+-
+- * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
+-
+- * gettext.c:
+- Include libintl.h instead of libgettext.h when compiling for glibc.
+- Get NULL from stddef.h if we compile for glibc.
+-
+- * finddomain.c: Include libintl.h instead of libgettext.h when
+- compiling for glibc. Include all those standard headers
+- unconditionally if _LIBC is defined.
+-
+- * dcgettext.c: Include all those standard headers unconditionally
+- if _LIBC is defined.
+-
+- * dgettext.c: If compiled in glibc include libintl.h instead of
+- libgettext.h.
+- (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
+-
+- * dcgettext.c: If compiled in glibc include libintl.h instead of
+- libgettext.h.
+- (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
+-
+- * bindtextdom.c:
+- If compiled in glibc include libintl.h instead of libgettext.h.
+-
+-Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
+-
+- * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
+- Reported by Marcus Daniels.
+-
+- * cat-compat.c (bindtextdomain):
+- String used in putenv must not be recycled.
+- Reported by Marcus Daniels.
+-
+- * libgettext.h (__USE_GNU_GETTEXT):
+- Additional symbol to signal that we use GNU gettext
+- library.
+-
+- * cat-compat.c (bindtextdomain):
+- Fix bug with the strange stpcpy replacement.
+- Reported by Nelson Beebe.
+-
+-Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
+-
+- * cat-compat.c: Include <string.h> for stpcpy prototype.
+-
+- * localealias.c (read_alias_file):
+- While expand strdup code temporary variable `cp' hided
+- higher level variable with same name. Rename to `tp'.
+-
+- * textdomain.c (textdomain):
+- Avoid warning by using temporary variable in strdup code.
+-
+- * finddomain.c (_nl_find_domain): Remove unused variable `application'.
+-
+-Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
+-
+- * localealias.c (alias_compare):
+- Use strcasecmp() only if available. Else use
+- implementation in place.
+-
+- * intl-compat.c:
+- Wrapper functions now call *__ functions instead of __*.
+-
+- * libgettext.h: Declare prototypes for *__ functions instead for __*.
+-
+- * cat-compat.c, loadmsgcat.c:
+- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+- of the standard libc and so prevent libintl.a from being used
+- standalone.
+-
+- * bindtextdom.c:
+- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+- of the standard libc and so prevent libintl.a from being used
+- standalone.
+- Rename to bindtextdomain__ if not used in GNU C Library.
+-
+- * dgettext.c:
+- Rename function to dgettext__ if not used in GNU C Library.
+-
+- * gettext.c:
+- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+- of the standard libc and so prevent libintl.a from being used
+- standalone.
+- Functions now called gettext__ if not used in GNU C Library.
+-
+- * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
+- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+- of the standard libc and so prevent libintl.a from being used
+- standalone.
+-
+-Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c: Correct some bugs in handling of CEN standard
+- locale definitions.
+-
+-Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c: Implement CEN syntax.
+-
+- * gettextP.h (loaded_domain): Extend number of successors to 31.
+-
+-Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (aliaspath): Remove path to X11 locale dir.
+-
+- * Makefile.in: Make install-src depend on install. This helps
+- gettext to install the sources and other packages can use the
+- install goal.
+-
+-Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (uninstall): Remove stuff installed by install-src.
+-
+-Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
+-
+- * VERSION.in: Initial revision.
+-
+- * Makefile.in (DISTFILES):
+- Add VERSION file. This is not necessary for gettext, but
+- for other packages using this library.
+-
+-Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
+-
+- * gettextP.h (_nl_find_domain):
+- New prototype after changing search strategy.
+-
+- * finddomain.c (_nl_find_domain):
+- We now try only to find a specified catalog. Fall back to other
+- catalogs listed in the locale list is now done in __dcgettext.
+-
+- * dcgettext.c (__dcgettext):
+- Now we provide message fall back even to different languages.
+- I.e. if a message is not available in one language all the other
+- in the locale list a tried. Formerly fall back was only possible
+- within one language. Implemented by moving one loop from
+- _nl_find_domain to here.
+-
+-Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (gettextsrcdir):
+- Directory where source of GNU gettext library are made
+- available.
+- (INSTALL, INSTALL_DATA): Programs used for installing sources.
+- (gettext-src): New. Rule to install GNU gettext sources for use in
+- gettextize shell script.
+-
+-Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
+-
+- * loadmsgcat.c (_nl_load_domain):
+- Use mmap for loading only when munmap function is
+- also available.
+-
+- * Makefile.in (install): Depend on `all' goal.
+-
+-Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
+-
+- * localealias.c (read_alias_file):
+- Do not overwrite '\n' when terminating alias value string.
+-
+- * localealias.c (read_alias_file):
+- Handle long lines. Ignore the rest not fitting in
+- the buffer after the initial `fgets' call.
+-
+-Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
+-
+- * gettextP.h (_nl_load_domain):
+- Add prototype, replacing prototype for _nl_load_msg_cat.
+-
+- * finddomain.c (_nl_find_domain):
+- Remove unneeded variable filename and filename_len.
+- (expand_alias): Remove prototype because functions does not
+- exist anymore.
+-
+- * localealias.c (read_alias_file):
+- Change type of fname_len parameter to int.
+- (xmalloc): Add prototype.
+-
+- * loadmsgcat.c: Better prototypes for xmalloc.
+-
+-Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c (_nl_find_domain):
+- Allow alias name to be constructed from the four components.
+-
+- * Makefile.in (aliaspath): New variable. Set to preliminary value.
+- (SOURCES): Add localealias.c.
+- (OBJECTS): Add localealias.o.
+-
+- * gettextP.h: Add prototype for _nl_expand_alias.
+-
+- * finddomain.c: Aliasing handled in intl/localealias.c.
+-
+- * localealias.c: Aliasing for locale names.
+-
+- * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
+-
+-Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
+-
+- * cat-compat.c (bindtextdomain):
+- Correct implementation. dirname parameter was not used.
+- Reported by Marcus Daniels.
+-
+- * gettextP.h (loaded_domain):
+- New fields `successor' and `decided' for oo, lazy
+- message handling implementation.
+-
+- * dcgettext.c:
+- Adopt for oo, lazy message handliing.
+- Now we can inherit translations from less specific locales.
+- (find_msg): New function.
+-
+- * loadmsgcat.c, finddomain.c:
+- Complete rewrite. Implement oo, lazy message handling :-).
+- We now have an additional environment variable `LANGUAGE' with
+- a higher priority than LC_ALL for the LC_MESSAGE locale.
+- Here we can set a colon separated list of specifications each
+- of the form `language[_territory[.codeset]][@modifier]'.
+-
+-Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c (unistd.h):
+- Include to get _PC_PATH_MAX defined on system having it.
+-
+-Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
+-
+- * finddomain.c (stpcpy): Include prototype.
+-
+- * Makefile.in (dist): Remove `copying instead' message.
+-
+-Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (ID, TAGS): Do not use $^.
+-
+-Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (TAGS, ID): Use $^ as command argument.
+- (TAGS): Give etags -o option t write to current directory,
+- not $(srcdir).
+- (ID): Use $(srcdir) instead os $(top_srcdir)/src.
+- (distclean): Remove ID.
+-
+-Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (gnulocaledir):
+- New variable, always using share/ for data directory.
+- (DEFS): Add GNULOCALEDIR, used in finddomain.c.
+-
+- * finddomain.c (_nl_default_dirname):
+- Set to GNULOCALEDIR, because it always has to point
+- to the directory where GNU gettext Library writes it to.
+-
+- * intl-compat.c (textdomain, bindtextdomain):
+- Undefine macros before function definition.
+-
+-Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
+-
+- * libgettext.h (_LIBINTL_H):
+- Protect definition in case where this file is included as
+- libgettext.h on Solaris machines. Add comment about this.
+-
+-Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
+-
+- * intl-compat.c (textdomain): Correct typo.
+-
+-Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
+-
+- * dcgettext.c (dcgettext): Function now called __dcgettext.
+-
+- * dgettext.c (dgettext): Now called __dgettext and calls
+- __dcgettext.
+-
+- * gettext.c (gettext):
+- Function now called __gettext and calls __dgettext.
+-
+- * textdomain.c (textdomain): Function now called __textdomain.
+-
+- * bindtextdom.c (bindtextdomain): Function now called
+- __bindtextdomain.
+-
+- * intl-compat.c: Initial revision.
+-
+- * Makefile.in (SOURCES): Add intl-compat.c.
+- (OBJECTS): We always compile the GNU gettext library functions.
+- OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
+- and intl-compat.o.
+- (GETTOBJS): Contains now only intl-compat.o.
+-
+- * libgettext.h:
+- Re-include protection matches dualistic character of libgettext.h.
+- For all functions in GNU gettext library define __ counter part.
+-
+- * finddomain.c (strchr): Define as index if not found in C library.
+- (_nl_find_domain): For relative paths paste / in between.
+-
+-Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
+-
+- * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
+-
+- * xopen-msg.sed: Fix bug with `msgstr ""' lines.
+- A little bit better comments.
+-
+-Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in:
+- po-mode.el, makelinks, combine-sh are now found in ../misc.
+-
+- * po-mode.el, makelinks, combine-sh, elisp-comp:
+- Moved to ../misc/.
+-
+- * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
+-
+-Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (INSTALL, INSTALL_DATA): New variables.
+- (install-data, uninstall): Install/uninstall .elc file.
+-
+- * po-mode.el (Installation comment):
+- Add .pox as possible extension of .po files.
+-
+-Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
+-
+- * elisp-comp: Complete new version by Franc,ois: This does not
+- fail when not compiling in the source directory.
+-
+-Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (../po/cat-id-tbl.o):
+- Use $(MAKE) instead of make for recursive make.
+-
+- * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
+- (install-exec): Add missing dummy goal.
+- (install-data, uninstall): @ in multi-line shell command at
+- beginning, not in front of echo. Reported by Eric Backus.
+-
+-Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (DISTFILES):
+- Rename libgettext.perl to gettext.perl to fit in 14 chars
+- file systems.
+-
+- * gettext.perl:
+- Rename to gettext.perl to fit in 14 chars file systems.
+-
+-Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
+-
+- * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
+-
+-Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
+-
+- * po2tbl.sed.in: Pretty printing.
+-
+- * linux-msg.sed, xopen-msg.sed:
+- Correct bugs with handling substitute flags in branches.
+-
+- * hash-string.h (hash_string):
+- Old K&R compilers don't under stand `unsigned char'.
+-
+- * gettext.h (nls_uint32):
+- Some old K&R compilers (eg HP) don't understand `unsigned int'.
+-
+- * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
+-
+-Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (ELCFILES): New variable.
+- (DISTFILES): Add elisp-comp.
+- Add implicit rule for .el -> .elc compilation.
+- (install-data): install $ELCFILES
+- (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
+-
+- * elisp-comp: Initial revision
+-
+-Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in:
+- cat-id-tbl.c is now found in po/. This enables us to use an identical
+- intl/ directory in all packages.
+-
+- * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
+-
+- * textdomain.c: fix typo (#if def -> #if defined)
+-
+-Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in (stamp-cat-id): use top_srcdir to address source files
+- (DISTFILES,distclean): move tupdate.perl to src/
+-
+- * po-to-tbl.sed.in:
+- add additional jump to clear change flag to recognize multiline strings
+-
+-Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
+-
+- * textdomain.c: Protect inclusion of stdlib.h and string.h.
+-
+- * loadmsgcat.c: Protect inclusion of stdlib.h.
+-
+- * libgettext.h: Protect inclusion of locale.h.
+- Allow use in C++ programs.
+- Define NULL is not happened already.
+-
+- * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
+- po-to-tbl.sed.
+- (distclean): remove po-to-tbl.sed and tupdate.perl.
+-
+- * tupdate.perl.in: Substitute Perl path even in exec line.
+- Don't include entries without translation from old .po file.
+-
+-Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
+-
+- * tupdate.perl.in: use "Updated: " in msgid "".
+-
+- * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
+- Define getenv if !__STDC__.
+-
+- * bindtextdom.c: Protect stdlib.h and string.h inclusion.
+- Define free if !__STDC__.
+-
+- * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
+- Define free if !__STDC__.
+-
+- * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
+-
+-Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
+-
+- * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
+- Remove unneeded $(srcdir) from Makefile.in dependency.
+-
+- * makelinks: Add copyright and short description.
+-
+- * po-mode.el: Last version for 0.7.
+-
+- * tupdate.perl.in: Fix die message.
+-
+- * dcgettext.c: Protect include of string.h.
+-
+- * gettext.c: Protect include of stdlib.h and further tries to get NULL.
+-
+- * finddomain.c: Some corrections in includes.
+-
+- * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
+-
+- * po-to-tbl.sed: Adopt for new .po file format.
+-
+- * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
+-
+-Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
+-
+- * tupdate.perl.in: Complete rewrite for new .po file format.
+-
+-Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
+-
+- * First official release. This directory contains all the code
+- needed to internationalize own packages. It provides functions
+- which allow to use the X/Open catgets function with an interface
+- like the Uniforum gettext function. For system which does not
+- have neither of those a complete implementation is provided.
+diff -uprN clean/lrzsz-0.12.20/intl/dcgettext.c lrzsz-0.12.20/intl/dcgettext.c
+--- clean/lrzsz-0.12.20/intl/dcgettext.c 1998-04-26 14:22:36.000000000 +0100
++++ lrzsz-0.12.20/intl/dcgettext.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,593 +0,0 @@
+-/* Implementation of the dcgettext(3) function
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include <sys/types.h>
+-
+-#ifdef __GNUC__
+-# define alloca __builtin_alloca
+-# define HAVE_ALLOCA 1
+-#else
+-# if defined HAVE_ALLOCA_H || defined _LIBC
+-# include <alloca.h>
+-# else
+-# ifdef _AIX
+- #pragma alloca
+-# else
+-# ifndef alloca
+-char *alloca ();
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#include <errno.h>
+-#ifndef errno
+-extern int errno;
+-#endif
+-#ifndef __set_errno
+-# define __set_errno(val) errno = (val)
+-#endif
+-
+-#if defined STDC_HEADERS || defined _LIBC
+-# include <stdlib.h>
+-#else
+-char *getenv ();
+-# ifdef HAVE_MALLOC_H
+-# include <malloc.h>
+-# else
+-void free ();
+-# endif
+-#endif
+-
+-#if defined HAVE_STRING_H || defined _LIBC
+-# ifndef _GNU_SOURCE
+-# define _GNU_SOURCE 1
+-# endif
+-# include <string.h>
+-#else
+-# include <strings.h>
+-#endif
+-#if !HAVE_STRCHR && !defined _LIBC
+-# ifndef strchr
+-# define strchr index
+-# endif
+-#endif
+-
+-#if defined HAVE_UNISTD_H || defined _LIBC
+-# include <unistd.h>
+-#endif
+-
+-#include "gettext.h"
+-#include "gettextP.h"
+-#ifdef _LIBC
+-# include <libintl.h>
+-#else
+-# include "libgettext.h"
+-#endif
+-#include "hash-string.h"
+-
+-/* @@ end of prolog @@ */
+-
+-#ifdef _LIBC
+-/* Rename the non ANSI C functions. This is required by the standard
+- because some ANSI C functions will require linking with this object
+- file and the name space must not be polluted. */
+-# define getcwd __getcwd
+-# define stpcpy __stpcpy
+-#else
+-# if !defined HAVE_GETCWD
+-char *getwd ();
+-# define getcwd(buf, max) getwd (buf)
+-# else
+-char *getcwd ();
+-# endif
+-# ifndef HAVE_STPCPY
+-static char *stpcpy PARAMS ((char *dest, const char *src));
+-# endif
+-#endif
+-
+-/* Amount to increase buffer size by in each try. */
+-#define PATH_INCR 32
+-
+-/* The following is from pathmax.h. */
+-/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
+- PATH_MAX but might cause redefinition warnings when sys/param.h is
+- later included (as on MORE/BSD 4.3). */
+-#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
+-# include <limits.h>
+-#endif
+-
+-#ifndef _POSIX_PATH_MAX
+-# define _POSIX_PATH_MAX 255
+-#endif
+-
+-#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
+-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+-#endif
+-
+-/* Don't include sys/param.h if it already has been. */
+-#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
+-# include <sys/param.h>
+-#endif
+-
+-#if !defined(PATH_MAX) && defined(MAXPATHLEN)
+-# define PATH_MAX MAXPATHLEN
+-#endif
+-
+-#ifndef PATH_MAX
+-# define PATH_MAX _POSIX_PATH_MAX
+-#endif
+-
+-/* XPG3 defines the result of `setlocale (category, NULL)' as:
+- ``Directs `setlocale()' to query `category' and return the current
+- setting of `local'.''
+- However it does not specify the exact format. And even worse: POSIX
+- defines this not at all. So we can use this feature only on selected
+- system (e.g. those using GNU C Library). */
+-#ifdef _LIBC
+-# define HAVE_LOCALE_NULL
+-#endif
+-
+-/* Name of the default domain used for gettext(3) prior any call to
+- textdomain(3). The default value for this is "messages". */
+-const char _nl_default_default_domain[] = "messages";
+-
+-/* Value used as the default domain for gettext(3). */
+-const char *_nl_current_default_domain = _nl_default_default_domain;
+-
+-/* Contains the default location of the message catalogs. */
+-const char _nl_default_dirname[] = GNULOCALEDIR;
+-
+-/* List with bindings of specific domains created by bindtextdomain()
+- calls. */
+-struct binding *_nl_domain_bindings;
+-
+-/* Prototypes for local functions. */
+-static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
+- const char *msgid));
+-static const char *category_to_name PARAMS ((int category));
+-static const char *guess_category_value PARAMS ((int category,
+- const char *categoryname));
+-
+-
+-/* For those loosing systems which don't have `alloca' we have to add
+- some additional code emulating it. */
+-#ifdef HAVE_ALLOCA
+-/* Nothing has to be done. */
+-# define ADD_BLOCK(list, address) /* nothing */
+-# define FREE_BLOCKS(list) /* nothing */
+-#else
+-struct block_list
+-{
+- void *address;
+- struct block_list *next;
+-};
+-# define ADD_BLOCK(list, addr) \
+- do { \
+- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
+- /* If we cannot get a free block we cannot add the new element to \
+- the list. */ \
+- if (newp != NULL) { \
+- newp->address = (addr); \
+- newp->next = (list); \
+- (list) = newp; \
+- } \
+- } while (0)
+-# define FREE_BLOCKS(list) \
+- do { \
+- while (list != NULL) { \
+- struct block_list *old = list; \
+- list = list->next; \
+- free (old); \
+- } \
+- } while (0)
+-# undef alloca
+-# define alloca(size) (malloc (size))
+-#endif /* have alloca */
+-
+-
+-/* Names for the libintl functions are a problem. They must not clash
+- with existing names and they should follow ANSI C. But this source
+- code is also used in GNU C Library where the names have a __
+- prefix. So we have to make a difference here. */
+-#ifdef _LIBC
+-# define DCGETTEXT __dcgettext
+-#else
+-# define DCGETTEXT dcgettext__
+-#endif
+-
+-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+- locale. */
+-char *
+-DCGETTEXT (domainname, msgid, category)
+- const char *domainname;
+- const char *msgid;
+- int category;
+-{
+-#ifndef HAVE_ALLOCA
+- struct block_list *block_list = NULL;
+-#endif
+- struct loaded_l10nfile *domain;
+- struct binding *binding;
+- const char *categoryname;
+- const char *categoryvalue;
+- char *dirname, *xdomainname;
+- char *single_locale;
+- char *retval;
+- int saved_errno = errno;
+-
+- /* If no real MSGID is given return NULL. */
+- if (msgid == NULL)
+- return NULL;
+-
+- /* If DOMAINNAME is NULL, we are interested in the default domain. If
+- CATEGORY is not LC_MESSAGES this might not make much sense but the
+- defintion left this undefined. */
+- if (domainname == NULL)
+- domainname = _nl_current_default_domain;
+-
+- /* First find matching binding. */
+- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+- {
+- int compare = strcmp (domainname, binding->domainname);
+- if (compare == 0)
+- /* We found it! */
+- break;
+- if (compare < 0)
+- {
+- /* It is not in the list. */
+- binding = NULL;
+- break;
+- }
+- }
+-
+- if (binding == NULL)
+- dirname = (char *) _nl_default_dirname;
+- else if (binding->dirname[0] == '/')
+- dirname = binding->dirname;
+- else
+- {
+- /* We have a relative path. Make it absolute now. */
+- size_t dirname_len = strlen (binding->dirname) + 1;
+- size_t path_max;
+- char *ret;
+-
+- path_max = (unsigned) PATH_MAX;
+- path_max += 2; /* The getcwd docs say to do this. */
+-
+- dirname = (char *) alloca (path_max + dirname_len);
+- ADD_BLOCK (block_list, dirname);
+-
+- __set_errno (0);
+- while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
+- {
+- path_max += PATH_INCR;
+- dirname = (char *) alloca (path_max + dirname_len);
+- ADD_BLOCK (block_list, dirname);
+- __set_errno (0);
+- }
+-
+- if (ret == NULL)
+- {
+- /* We cannot get the current working directory. Don't signal an
+- error but simply return the default string. */
+- FREE_BLOCKS (block_list);
+- __set_errno (saved_errno);
+- return (char *) msgid;
+- }
+-
+- stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
+- }
+-
+- /* Now determine the symbolic name of CATEGORY and its value. */
+- categoryname = category_to_name (category);
+- categoryvalue = guess_category_value (category, categoryname);
+-
+- xdomainname = (char *) alloca (strlen (categoryname)
+- + strlen (domainname) + 5);
+- ADD_BLOCK (block_list, xdomainname);
+-
+- stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+- domainname),
+- ".mo");
+-
+- /* Creating working area. */
+- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
+- ADD_BLOCK (block_list, single_locale);
+-
+-
+- /* Search for the given string. This is a loop because we perhaps
+- got an ordered list of languages to consider for th translation. */
+- while (1)
+- {
+- /* Make CATEGORYVALUE point to the next element of the list. */
+- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
+- ++categoryvalue;
+- if (categoryvalue[0] == '\0')
+- {
+- /* The whole contents of CATEGORYVALUE has been searched but
+- no valid entry has been found. We solve this situation
+- by implicitly appending a "C" entry, i.e. no translation
+- will take place. */
+- single_locale[0] = 'C';
+- single_locale[1] = '\0';
+- }
+- else
+- {
+- char *cp = single_locale;
+- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
+- *cp++ = *categoryvalue++;
+- *cp = '\0';
+- }
+-
+- /* If the current locale value is C (or POSIX) we don't load a
+- domain. Return the MSGID. */
+- if (strcmp (single_locale, "C") == 0
+- || strcmp (single_locale, "POSIX") == 0)
+- {
+- FREE_BLOCKS (block_list);
+- __set_errno (saved_errno);
+- return (char *) msgid;
+- }
+-
+-
+- /* Find structure describing the message catalog matching the
+- DOMAINNAME and CATEGORY. */
+- domain = _nl_find_domain (dirname, single_locale, xdomainname);
+-
+- if (domain != NULL)
+- {
+- retval = find_msg (domain, msgid);
+-
+- if (retval == NULL)
+- {
+- int cnt;
+-
+- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
+- {
+- retval = find_msg (domain->successor[cnt], msgid);
+-
+- if (retval != NULL)
+- break;
+- }
+- }
+-
+- if (retval != NULL)
+- {
+- FREE_BLOCKS (block_list);
+- __set_errno (saved_errno);
+- return retval;
+- }
+- }
+- }
+- /* NOTREACHED */
+-}
+-
+-#ifdef _LIBC
+-/* Alias for function name in GNU C Library. */
+-weak_alias (__dcgettext, dcgettext);
+-#endif
+-
+-
+-static char *
+-find_msg (domain_file, msgid)
+- struct loaded_l10nfile *domain_file;
+- const char *msgid;
+-{
+- size_t top, act, bottom;
+- struct loaded_domain *domain;
+-
+- if (domain_file->decided == 0)
+- _nl_load_domain (domain_file);
+-
+- if (domain_file->data == NULL)
+- return NULL;
+-
+- domain = (struct loaded_domain *) domain_file->data;
+-
+- /* Locate the MSGID and its translation. */
+- if (domain->hash_size > 2 && domain->hash_tab != NULL)
+- {
+- /* Use the hashing table. */
+- nls_uint32 len = strlen (msgid);
+- nls_uint32 hash_val = hash_string (msgid);
+- nls_uint32 idx = hash_val % domain->hash_size;
+- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+- nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
+-
+- if (nstr == 0)
+- /* Hash table entry is empty. */
+- return NULL;
+-
+- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
+- && strcmp (msgid,
+- domain->data + W (domain->must_swap,
+- domain->orig_tab[nstr - 1].offset)) == 0)
+- return (char *) domain->data + W (domain->must_swap,
+- domain->trans_tab[nstr - 1].offset);
+-
+- while (1)
+- {
+- if (idx >= domain->hash_size - incr)
+- idx -= domain->hash_size - incr;
+- else
+- idx += incr;
+-
+- nstr = W (domain->must_swap, domain->hash_tab[idx]);
+- if (nstr == 0)
+- /* Hash table entry is empty. */
+- return NULL;
+-
+- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
+- && strcmp (msgid,
+- domain->data + W (domain->must_swap,
+- domain->orig_tab[nstr - 1].offset))
+- == 0)
+- return (char *) domain->data
+- + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
+- }
+- /* NOTREACHED */
+- }
+-
+- /* Now we try the default method: binary search in the sorted
+- array of messages. */
+- bottom = 0;
+- top = domain->nstrings;
+- while (bottom < top)
+- {
+- int cmp_val;
+-
+- act = (bottom + top) / 2;
+- cmp_val = strcmp (msgid, domain->data
+- + W (domain->must_swap,
+- domain->orig_tab[act].offset));
+- if (cmp_val < 0)
+- top = act;
+- else if (cmp_val > 0)
+- bottom = act + 1;
+- else
+- break;
+- }
+-
+- /* If an translation is found return this. */
+- return bottom >= top ? NULL : (char *) domain->data
+- + W (domain->must_swap,
+- domain->trans_tab[act].offset);
+-}
+-
+-
+-/* Return string representation of locale CATEGORY. */
+-static const char *
+-category_to_name (category)
+- int category;
+-{
+- const char *retval;
+-
+- switch (category)
+- {
+-#ifdef LC_COLLATE
+- case LC_COLLATE:
+- retval = "LC_COLLATE";
+- break;
+-#endif
+-#ifdef LC_CTYPE
+- case LC_CTYPE:
+- retval = "LC_CTYPE";
+- break;
+-#endif
+-#ifdef LC_MONETARY
+- case LC_MONETARY:
+- retval = "LC_MONETARY";
+- break;
+-#endif
+-#ifdef LC_NUMERIC
+- case LC_NUMERIC:
+- retval = "LC_NUMERIC";
+- break;
+-#endif
+-#ifdef LC_TIME
+- case LC_TIME:
+- retval = "LC_TIME";
+- break;
+-#endif
+-#ifdef LC_MESSAGES
+- case LC_MESSAGES:
+- retval = "LC_MESSAGES";
+- break;
+-#endif
+-#ifdef LC_RESPONSE
+- case LC_RESPONSE:
+- retval = "LC_RESPONSE";
+- break;
+-#endif
+-#ifdef LC_ALL
+- case LC_ALL:
+- /* This might not make sense but is perhaps better than any other
+- value. */
+- retval = "LC_ALL";
+- break;
+-#endif
+- default:
+- /* If you have a better idea for a default value let me know. */
+- retval = "LC_XXX";
+- }
+-
+- return retval;
+-}
+-
+-/* Guess value of current locale from value of the environment variables. */
+-static const char *
+-guess_category_value (category, categoryname)
+- int category;
+- const char *categoryname;
+-{
+- const char *retval;
+-
+- /* The highest priority value is the `LANGUAGE' environment
+- variable. This is a GNU extension. */
+- retval = getenv ("LANGUAGE");
+- if (retval != NULL && retval[0] != '\0')
+- return retval;
+-
+- /* `LANGUAGE' is not set. So we have to proceed with the POSIX
+- methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
+- systems this can be done by the `setlocale' function itself. */
+-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+- return setlocale (category, NULL);
+-#else
+- /* Setting of LC_ALL overwrites all other. */
+- retval = getenv ("LC_ALL");
+- if (retval != NULL && retval[0] != '\0')
+- return retval;
+-
+- /* Next comes the name of the desired category. */
+- retval = getenv (categoryname);
+- if (retval != NULL && retval[0] != '\0')
+- return retval;
+-
+- /* Last possibility is the LANG environment variable. */
+- retval = getenv ("LANG");
+- if (retval != NULL && retval[0] != '\0')
+- return retval;
+-
+- /* We use C as the default domain. POSIX says this is implementation
+- defined. */
+- return "C";
+-#endif
+-}
+-
+-/* @@ begin of epilog @@ */
+-
+-/* We don't want libintl.a to depend on any other library. So we
+- avoid the non-standard function stpcpy. In GNU C Library this
+- function is available, though. Also allow the symbol HAVE_STPCPY
+- to be defined. */
+-#if !_LIBC && !HAVE_STPCPY
+-static char *
+-stpcpy (dest, src)
+- char *dest;
+- const char *src;
+-{
+- while ((*dest++ = *src++) != '\0')
+- /* Do nothing. */ ;
+- return dest - 1;
+-}
+-#endif
+diff -uprN clean/lrzsz-0.12.20/intl/dgettext.c lrzsz-0.12.20/intl/dgettext.c
+--- clean/lrzsz-0.12.20/intl/dgettext.c 1998-04-26 14:20:52.000000000 +0100
++++ lrzsz-0.12.20/intl/dgettext.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,59 +0,0 @@
+-/* dgettext.c -- implementation of the dgettext(3) function
+- Copyright (C) 1995 Software Foundation, Inc.
+-
+-This program is free software; you can redistribute it and/or modify
+-it under the terms of the GNU General Public License as published by
+-the Free Software Foundation; either version 2, or (at your option)
+-any later version.
+-
+-This program is distributed in the hope that it will be useful,
+-but WITHOUT ANY WARRANTY; without even the implied warranty of
+-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-GNU General Public License for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with this program; if not, write to the Free Software
+-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#if defined HAVE_LOCALE_H || defined _LIBC
+-# include <locale.h>
+-#endif
+-
+-#ifdef _LIBC
+-# include <libintl.h>
+-#else
+-# include "libgettext.h"
+-#endif
+-
+-/* @@ end of prolog @@ */
+-
+-/* Names for the libintl functions are a problem. They must not clash
+- with existing names and they should follow ANSI C. But this source
+- code is also used in GNU C Library where the names have a __
+- prefix. So we have to make a difference here. */
+-#ifdef _LIBC
+-# define DGETTEXT __dgettext
+-# define DCGETTEXT __dcgettext
+-#else
+-# define DGETTEXT dgettext__
+-# define DCGETTEXT dcgettext__
+-#endif
+-
+-/* Look up MSGID in the DOMAINNAME message catalog of the current
+- LC_MESSAGES locale. */
+-char *
+-DGETTEXT (domainname, msgid)
+- const char *domainname;
+- const char *msgid;
+-{
+- return DCGETTEXT (domainname, msgid, LC_MESSAGES);
+-}
+-
+-#ifdef _LIBC
+-/* Alias for function name in GNU C Library. */
+-weak_alias (__dgettext, dgettext);
+-#endif
+diff -uprN clean/lrzsz-0.12.20/intl/explodename.c lrzsz-0.12.20/intl/explodename.c
+--- clean/lrzsz-0.12.20/intl/explodename.c 1998-04-26 14:22:37.000000000 +0100
++++ lrzsz-0.12.20/intl/explodename.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,181 +0,0 @@
+-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include <stdlib.h>
+-#include <string.h>
+-#include <sys/types.h>
+-
+-#include "loadinfo.h"
+-
+-/* On some strange systems still no definition of NULL is found. Sigh! */
+-#ifndef NULL
+-# if defined __STDC__ && __STDC__
+-# define NULL ((void *) 0)
+-# else
+-# define NULL 0
+-# endif
+-#endif
+-
+-/* @@ end of prolog @@ */
+-
+-int
+-_nl_explode_name (name, language, modifier, territory, codeset,
+- normalized_codeset, special, sponsor, revision)
+- char *name;
+- const char **language;
+- const char **modifier;
+- const char **territory;
+- const char **codeset;
+- const char **normalized_codeset;
+- const char **special;
+- const char **sponsor;
+- const char **revision;
+-{
+- enum { undecided, xpg, cen } syntax;
+- char *cp;
+- int mask;
+-
+- *modifier = NULL;
+- *territory = NULL;
+- *codeset = NULL;
+- *normalized_codeset = NULL;
+- *special = NULL;
+- *sponsor = NULL;
+- *revision = NULL;
+-
+- /* Now we determine the single parts of the locale name. First
+- look for the language. Termination symbols are `_' and `@' if
+- we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+- mask = 0;
+- syntax = undecided;
+- *language = cp = name;
+- while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
+- && cp[0] != '+' && cp[0] != ',')
+- ++cp;
+-
+- if (*language == cp)
+- /* This does not make sense: language has to be specified. Use
+- this entry as it is without exploding. Perhaps it is an alias. */
+- cp = strchr (*language, '\0');
+- else if (cp[0] == '_')
+- {
+- /* Next is the territory. */
+- cp[0] = '\0';
+- *territory = ++cp;
+-
+- while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
+- && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
+- ++cp;
+-
+- mask |= TERRITORY;
+-
+- if (cp[0] == '.')
+- {
+- /* Next is the codeset. */
+- syntax = xpg;
+- cp[0] = '\0';
+- *codeset = ++cp;
+-
+- while (cp[0] != '\0' && cp[0] != '@')
+- ++cp;
+-
+- mask |= XPG_CODESET;
+-
+- if (*codeset != cp && (*codeset)[0] != '\0')
+- {
+- *normalized_codeset = _nl_normalize_codeset (*codeset,
+- cp - *codeset);
+- if (strcmp (*codeset, *normalized_codeset) == 0)
+- free ((char *) *normalized_codeset);
+- else
+- mask |= XPG_NORM_CODESET;
+- }
+- }
+- }
+-
+- if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
+- {
+- /* Next is the modifier. */
+- syntax = cp[0] == '@' ? xpg : cen;
+- cp[0] = '\0';
+- *modifier = ++cp;
+-
+- while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
+- && cp[0] != ',' && cp[0] != '_')
+- ++cp;
+-
+- mask |= XPG_MODIFIER | CEN_AUDIENCE;
+- }
+-
+- if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
+- {
+- syntax = cen;
+-
+- if (cp[0] == '+')
+- {
+- /* Next is special application (CEN syntax). */
+- cp[0] = '\0';
+- *special = ++cp;
+-
+- while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
+- ++cp;
+-
+- mask |= CEN_SPECIAL;
+- }
+-
+- if (cp[0] == ',')
+- {
+- /* Next is sponsor (CEN syntax). */
+- cp[0] = '\0';
+- *sponsor = ++cp;
+-
+- while (cp[0] != '\0' && cp[0] != '_')
+- ++cp;
+-
+- mask |= CEN_SPONSOR;
+- }
+-
+- if (cp[0] == '_')
+- {
+- /* Next is revision (CEN syntax). */
+- cp[0] = '\0';
+- *revision = ++cp;
+-
+- mask |= CEN_REVISION;
+- }
+- }
+-
+- /* For CEN syntax values it might be important to have the
+- separator character in the file name, not for XPG syntax. */
+- if (syntax == xpg)
+- {
+- if (*territory != NULL && (*territory)[0] == '\0')
+- mask &= ~TERRITORY;
+-
+- if (*codeset != NULL && (*codeset)[0] == '\0')
+- mask &= ~XPG_CODESET;
+-
+- if (*modifier != NULL && (*modifier)[0] == '\0')
+- mask &= ~XPG_MODIFIER;
+- }
+-
+- return mask;
+-}
+diff -uprN clean/lrzsz-0.12.20/intl/finddomain.c lrzsz-0.12.20/intl/finddomain.c
+--- clean/lrzsz-0.12.20/intl/finddomain.c 1998-04-26 14:22:36.000000000 +0100
++++ lrzsz-0.12.20/intl/finddomain.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,189 +0,0 @@
+-/* Handle list of needed message catalogs
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include <ctype.h>
+-#include <errno.h>
+-#include <stdio.h>
+-#include <sys/types.h>
+-
+-#if defined STDC_HEADERS || defined _LIBC
+-# include <stdlib.h>
+-#else
+-# ifdef HAVE_MALLOC_H
+-# include <malloc.h>
+-# else
+-void free ();
+-# endif
+-#endif
+-
+-#if defined HAVE_STRING_H || defined _LIBC
+-# include <string.h>
+-#else
+-# include <strings.h>
+-# ifndef memcpy
+-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+-# endif
+-#endif
+-#if !HAVE_STRCHR && !defined _LIBC
+-# ifndef strchr
+-# define strchr index
+-# endif
+-#endif
+-
+-#if defined HAVE_UNISTD_H || defined _LIBC
+-# include <unistd.h>
+-#endif
+-
+-#include "gettext.h"
+-#include "gettextP.h"
+-#ifdef _LIBC
+-# include <libintl.h>
+-#else
+-# include "libgettext.h"
+-#endif
+-
+-/* @@ end of prolog @@ */
+-/* List of already loaded domains. */
+-static struct loaded_l10nfile *_nl_loaded_domains;
+-
+-
+-/* Return a data structure describing the message catalog described by
+- the DOMAINNAME and CATEGORY parameters with respect to the currently
+- established bindings. */
+-struct loaded_l10nfile *
+-_nl_find_domain (dirname, locale, domainname)
+- const char *dirname;
+- char *locale;
+- const char *domainname;
+-{
+- struct loaded_l10nfile *retval;
+- const char *language;
+- const char *modifier;
+- const char *territory;
+- const char *codeset;
+- const char *normalized_codeset;
+- const char *special;
+- const char *sponsor;
+- const char *revision;
+- const char *alias_value;
+- int mask;
+-
+- /* LOCALE can consist of up to four recognized parts for the XPG syntax:
+-
+- language[_territory[.codeset]][@modifier]
+-
+- and six parts for the CEN syntax:
+-
+- language[_territory][+audience][+special][,[sponsor][_revision]]
+-
+- Beside the first all of them are allowed to be missing. If the
+- full specified locale is not found, the less specific one are
+- looked for. The various part will be stripped of according to
+- the following order:
+- (1) revision
+- (2) sponsor
+- (3) special
+- (4) codeset
+- (5) normalized codeset
+- (6) territory
+- (7) audience/modifier
+- */
+-
+- /* If we have already tested for this locale entry there has to
+- be one data set in the list of loaded domains. */
+- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+- strlen (dirname) + 1, 0, locale, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, domainname, 0);
+- if (retval != NULL)
+- {
+- /* We know something about this locale. */
+- int cnt;
+-
+- if (retval->decided == 0)
+- _nl_load_domain (retval);
+-
+- if (retval->data != NULL)
+- return retval;
+-
+- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+- {
+- if (retval->successor[cnt]->decided == 0)
+- _nl_load_domain (retval->successor[cnt]);
+-
+- if (retval->successor[cnt]->data != NULL)
+- break;
+- }
+- return cnt >= 0 ? retval : NULL;
+- /* NOTREACHED */
+- }
+-
+- /* See whether the locale value is an alias. If yes its value
+- *overwrites* the alias name. No test for the original value is
+- done. */
+- alias_value = _nl_expand_alias (locale);
+- if (alias_value != NULL)
+- {
+- size_t len = strlen (alias_value) + 1;
+- locale = (char *) malloc (len);
+- if (locale == NULL)
+- return NULL;
+-
+- memcpy (locale, alias_value, len);
+- }
+-
+- /* Now we determine the single parts of the locale name. First
+- look for the language. Termination symbols are `_' and `@' if
+- we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+- mask = _nl_explode_name (locale, &language, &modifier, &territory,
+- &codeset, &normalized_codeset, &special,
+- &sponsor, &revision);
+-
+- /* Create all possible locale entries which might be interested in
+- generalization. */
+- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+- strlen (dirname) + 1, mask, language, territory,
+- codeset, normalized_codeset, modifier, special,
+- sponsor, revision, domainname, 1);
+- if (retval == NULL)
+- /* This means we are out of core. */
+- return NULL;
+-
+- if (retval->decided == 0)
+- _nl_load_domain (retval);
+- if (retval->data == NULL)
+- {
+- int cnt;
+- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+- {
+- if (retval->successor[cnt]->decided == 0)
+- _nl_load_domain (retval->successor[cnt]);
+- if (retval->successor[cnt]->data != NULL)
+- break;
+- }
+- }
+-
+- /* The room for an alias was dynamically allocated. Free it now. */
+- if (alias_value != NULL)
+- free (locale);
+-
+- return retval;
+-}
+diff -uprN clean/lrzsz-0.12.20/intl/gettext.c lrzsz-0.12.20/intl/gettext.c
+--- clean/lrzsz-0.12.20/intl/gettext.c 1998-04-26 14:22:36.000000000 +0100
++++ lrzsz-0.12.20/intl/gettext.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,70 +0,0 @@
+-/* Implementation of gettext(3) function
+- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#ifdef _LIBC
+-# define __need_NULL
+-# include <stddef.h>
+-#else
+-# ifdef STDC_HEADERS
+-# include <stdlib.h> /* Just for NULL. */
+-# else
+-# ifdef HAVE_STRING_H
+-# include <string.h>
+-# else
+-# define NULL ((void *) 0)
+-# endif
+-# endif
+-#endif
+-
+-#ifdef _LIBC
+-# include <libintl.h>
+-#else
+-# include "libgettext.h"
+-#endif
+-
+-/* @@ end of prolog @@ */
+-
+-/* Names for the libintl functions are a problem. They must not clash
+- with existing names and they should follow ANSI C. But this source
+- code is also used in GNU C Library where the names have a __
+- prefix. So we have to make a difference here. */
+-#ifdef _LIBC
+-# define GETTEXT __gettext
+-# define DGETTEXT __dgettext
+-#else
+-# define GETTEXT gettext__
+-# define DGETTEXT dgettext__
+-#endif
+-
+-/* Look up MSGID in the current default message catalog for the current
+- LC_MESSAGES locale. If not found, returns MSGID itself (the default
+- text). */
+-char *
+-GETTEXT (msgid)
+- const char *msgid;
+-{
+- return DGETTEXT (NULL, msgid);
+-}
+-
+-#ifdef _LIBC
+-/* Alias for function name in GNU C Library. */
+-weak_alias (__gettext, gettext);
+-#endif
+diff -uprN clean/lrzsz-0.12.20/intl/gettext.h lrzsz-0.12.20/intl/gettext.h
+--- clean/lrzsz-0.12.20/intl/gettext.h 1998-04-26 14:22:35.000000000 +0100
++++ lrzsz-0.12.20/intl/gettext.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,105 +0,0 @@
+-/* Internal header for GNU gettext internationalization functions
+- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public
+- License along with the GNU C Library; see the file COPYING.LIB. If not,
+- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+- Boston, MA 02111-1307, USA. */
+-
+-#ifndef _GETTEXT_H
+-#define _GETTEXT_H 1
+-
+-#include <stdio.h>
+-
+-#if HAVE_LIMITS_H || _LIBC
+-# include <limits.h>
+-#endif
+-
+-/* @@ end of prolog @@ */
+-
+-/* The magic number of the GNU message catalog format. */
+-#define _MAGIC 0x950412de
+-#define _MAGIC_SWAPPED 0xde120495
+-
+-/* Revision number of the currently used .mo (binary) file format. */
+-#define MO_REVISION_NUMBER 0
+-
+-/* The following contortions are an attempt to use the C preprocessor
+- to determine an unsigned integral type that is 32 bits wide. An
+- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+- doing that would require that the configure script compile and *run*
+- the resulting executable. Locally running cross-compiled executables
+- is usually not possible. */
+-
+-#if __STDC__
+-# define UINT_MAX_32_BITS 4294967295U
+-#else
+-# define UINT_MAX_32_BITS 0xFFFFFFFF
+-#endif
+-
+-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+- This should be valid for all systems GNU cares about because
+- that doesn't include 16-bit systems, and only modern systems
+- (that certainly have <limits.h>) have 64+-bit integral types. */
+-
+-#ifndef UINT_MAX
+-# define UINT_MAX UINT_MAX_32_BITS
+-#endif
+-
+-#if UINT_MAX == UINT_MAX_32_BITS
+-typedef unsigned nls_uint32;
+-#else
+-# if USHRT_MAX == UINT_MAX_32_BITS
+-typedef unsigned short nls_uint32;
+-# else
+-# if ULONG_MAX == UINT_MAX_32_BITS
+-typedef unsigned long nls_uint32;
+-# else
+- /* The following line is intended to throw an error. Using #error is
+- not portable enough. */
+- "Cannot determine unsigned 32-bit data type."
+-# endif
+-# endif
+-#endif
+-
+-
+-/* Header for binary .mo file format. */
+-struct mo_file_header
+-{
+- /* The magic number. */
+- nls_uint32 magic;
+- /* The revision number of the file format. */
+- nls_uint32 revision;
+- /* The number of strings pairs. */
+- nls_uint32 nstrings;
+- /* Offset of table with start offsets of original strings. */
+- nls_uint32 orig_tab_offset;
+- /* Offset of table with start offsets of translation strings. */
+- nls_uint32 trans_tab_offset;
+- /* Size of hashing table. */
+- nls_uint32 hash_tab_size;
+- /* Offset of first hashing entry. */
+- nls_uint32 hash_tab_offset;
+-};
+-
+-struct string_desc
+-{
+- /* Length of addressed string. */
+- nls_uint32 length;
+- /* Offset of string in file. */
+- nls_uint32 offset;
+-};
+-
+-/* @@ begin of epilog @@ */
+-
+-#endif /* gettext.h */
+diff -uprN clean/lrzsz-0.12.20/intl/gettextP.h lrzsz-0.12.20/intl/gettextP.h
+--- clean/lrzsz-0.12.20/intl/gettextP.h 1998-04-26 14:22:35.000000000 +0100
++++ lrzsz-0.12.20/intl/gettextP.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,73 +0,0 @@
+-/* Header describing internals of gettext library
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifndef _GETTEXTP_H
+-#define _GETTEXTP_H
+-
+-#include "loadinfo.h"
+-
+-/* @@ end of prolog @@ */
+-
+-#ifndef PARAMS
+-# if __STDC__
+-# define PARAMS(args) args
+-# else
+-# define PARAMS(args) ()
+-# endif
+-#endif
+-
+-#ifndef W
+-# define W(flag, data) ((flag) ? SWAP (data) : (data))
+-#endif
+-
+-
+-static nls_uint32 SWAP PARAMS ((nls_uint32 i));
+-
+-static inline nls_uint32
+-SWAP (i)
+- nls_uint32 i;
+-{
+- return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+-}
+-
+-
+-struct loaded_domain
+-{
+- const char *data;
+- int must_swap;
+- nls_uint32 nstrings;
+- struct string_desc *orig_tab;
+- struct string_desc *trans_tab;
+- nls_uint32 hash_size;
+- nls_uint32 *hash_tab;
+-};
+-
+-struct binding
+-{
+- struct binding *next;
+- char *domainname;
+- char *dirname;
+-};
+-
+-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
+- char *__locale,
+- const char *__domainname));
+-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain));
+-
+-/* @@ begin of epilog @@ */
+-
+-#endif /* gettextP.h */
+diff -uprN clean/lrzsz-0.12.20/intl/hash-string.h lrzsz-0.12.20/intl/hash-string.h
+--- clean/lrzsz-0.12.20/intl/hash-string.h 1998-04-26 14:22:36.000000000 +0100
++++ lrzsz-0.12.20/intl/hash-string.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,63 +0,0 @@
+-/* Implements a string hashing function.
+- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public
+- License along with the GNU C Library; see the file COPYING.LIB. If not,
+- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+- Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_VALUES_H
+-# include <values.h>
+-#endif
+-
+-/* @@ end of prolog @@ */
+-
+-#ifndef PARAMS
+-# if __STDC__
+-# define PARAMS(Args) Args
+-# else
+-# define PARAMS(Args) ()
+-# endif
+-#endif
+-
+-/* We assume to have `unsigned long int' value with at least 32 bits. */
+-#define HASHWORDBITS 32
+-
+-
+-/* Defines the so called `hashpjw' function by P.J. Weinberger
+- [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
+- 1986, 1987 Bell Telephone Laboratories, Inc.] */
+-static unsigned long hash_string PARAMS ((const char *__str_param));
+-
+-static inline unsigned long
+-hash_string (str_param)
+- const char *str_param;
+-{
+- unsigned long int hval, g;
+- const char *str = str_param;
+-
+- /* Compute the hash value for the given string. */
+- hval = 0;
+- while (*str != '\0')
+- {
+- hval <<= 4;
+- hval += (unsigned long) *str++;
+- g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
+- if (g != 0)
+- {
+- hval ^= g >> (HASHWORDBITS - 8);
+- hval ^= g;
+- }
+- }
+- return hval;
+-}
+diff -uprN clean/lrzsz-0.12.20/intl/intl-compat.c lrzsz-0.12.20/intl/intl-compat.c
+--- clean/lrzsz-0.12.20/intl/intl-compat.c 1998-04-26 14:20:52.000000000 +0100
++++ lrzsz-0.12.20/intl/intl-compat.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,76 +0,0 @@
+-/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
+- Library.
+- Copyright (C) 1995 Software Foundation, Inc.
+-
+-This program is free software; you can redistribute it and/or modify
+-it under the terms of the GNU General Public License as published by
+-the Free Software Foundation; either version 2, or (at your option)
+-any later version.
+-
+-This program is distributed in the hope that it will be useful,
+-but WITHOUT ANY WARRANTY; without even the implied warranty of
+-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-GNU General Public License for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with this program; if not, write to the Free Software
+-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include "libgettext.h"
+-
+-/* @@ end of prolog @@ */
+-
+-
+-#undef gettext
+-#undef dgettext
+-#undef dcgettext
+-#undef textdomain
+-#undef bindtextdomain
+-
+-
+-char *
+-bindtextdomain (domainname, dirname)
+- const char *domainname;
+- const char *dirname;
+-{
+- return bindtextdomain__ (domainname, dirname);
+-}
+-
+-
+-char *
+-dcgettext (domainname, msgid, category)
+- const char *domainname;
+- const char *msgid;
+- int category;
+-{
+- return dcgettext__ (domainname, msgid, category);
+-}
+-
+-
+-char *
+-dgettext (domainname, msgid)
+- const char *domainname;
+- const char *msgid;
+-{
+- return dgettext__ (domainname, msgid);
+-}
+-
+-
+-char *
+-gettext (msgid)
+- const char *msgid;
+-{
+- return gettext__ (msgid);
+-}
+-
+-
+-char *
+-textdomain (domainname)
+- const char *domainname;
+-{
+- return textdomain__ (domainname);
+-}
+diff -uprN clean/lrzsz-0.12.20/intl/l10nflist.c lrzsz-0.12.20/intl/l10nflist.c
+--- clean/lrzsz-0.12.20/intl/l10nflist.c 1998-04-26 14:22:37.000000000 +0100
++++ lrzsz-0.12.20/intl/l10nflist.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,409 +0,0 @@
+-/* Handle list of needed message catalogs
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-
+-#if defined HAVE_STRING_H || defined _LIBC
+-# ifndef _GNU_SOURCE
+-# define _GNU_SOURCE 1
+-# endif
+-# include <string.h>
+-#else
+-# include <strings.h>
+-# ifndef memcpy
+-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+-# endif
+-#endif
+-#if !HAVE_STRCHR && !defined _LIBC
+-# ifndef strchr
+-# define strchr index
+-# endif
+-#endif
+-
+-#if defined _LIBC || defined HAVE_ARGZ_H
+-# include <argz.h>
+-#endif
+-#include <ctype.h>
+-#include <sys/types.h>
+-
+-#if defined STDC_HEADERS || defined _LIBC
+-# include <stdlib.h>
+-#endif
+-
+-#include "loadinfo.h"
+-
+-/* On some strange systems still no definition of NULL is found. Sigh! */
+-#ifndef NULL
+-# if defined __STDC__ && __STDC__
+-# define NULL ((void *) 0)
+-# else
+-# define NULL 0
+-# endif
+-#endif
+-
+-/* @@ end of prolog @@ */
+-
+-#ifdef _LIBC
+-/* Rename the non ANSI C functions. This is required by the standard
+- because some ANSI C functions will require linking with this object
+- file and the name space must not be polluted. */
+-# define stpcpy(dest, src) __stpcpy(dest, src)
+-#else
+-# ifndef HAVE_STPCPY
+-static char *stpcpy PARAMS ((char *dest, const char *src));
+-# endif
+-#endif
+-
+-/* Define function which are usually not available. */
+-
+-#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
+-/* Returns the number of strings in ARGZ. */
+-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
+-
+-static size_t
+-argz_count__ (argz, len)
+- const char *argz;
+- size_t len;
+-{
+- size_t count = 0;
+- while (len > 0)
+- {
+- size_t part_len = strlen (argz);
+- argz += part_len + 1;
+- len -= part_len + 1;
+- count++;
+- }
+- return count;
+-}
+-# undef __argz_count
+-# define __argz_count(argz, len) argz_count__ (argz, len)
+-#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
+-
+-#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
+-/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+- except the last into the character SEP. */
+-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
+-
+-static void
+-argz_stringify__ (argz, len, sep)
+- char *argz;
+- size_t len;
+- int sep;
+-{
+- while (len > 0)
+- {
+- size_t part_len = strlen (argz);
+- argz += part_len;
+- len -= part_len + 1;
+- if (len > 0)
+- *argz++ = sep;
+- }
+-}
+-# undef __argz_stringify
+-# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+-#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+-
+-#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
+- const char *entry));
+-
+-static char *
+-argz_next__ (argz, argz_len, entry)
+- char *argz;
+- size_t argz_len;
+- const char *entry;
+-{
+- if (entry)
+- {
+- if (entry < argz + argz_len)
+- entry = strchr (entry, '\0') + 1;
+-
+- return entry >= argz + argz_len ? NULL : (char *) entry;
+- }
+- else
+- if (argz_len > 0)
+- return argz;
+- else
+- return 0;
+-}
+-# undef __argz_next
+-# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
+-#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
+-
+-
+-/* Return number of bits set in X. */
+-static int pop PARAMS ((int x));
+-
+-static inline int
+-pop (x)
+- int x;
+-{
+- /* We assume that no more than 16 bits are used. */
+- x = ((x & ~0x5555) >> 1) + (x & 0x5555);
+- x = ((x & ~0x3333) >> 2) + (x & 0x3333);
+- x = ((x >> 4) + x) & 0x0f0f;
+- x = ((x >> 8) + x) & 0xff;
+-
+- return x;
+-}
+-
+-
+-struct loaded_l10nfile *
+-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
+- territory, codeset, normalized_codeset, modifier, special,
+- sponsor, revision, filename, do_allocate)
+- struct loaded_l10nfile **l10nfile_list;
+- const char *dirlist;
+- size_t dirlist_len;
+- int mask;
+- const char *language;
+- const char *territory;
+- const char *codeset;
+- const char *normalized_codeset;
+- const char *modifier;
+- const char *special;
+- const char *sponsor;
+- const char *revision;
+- const char *filename;
+- int do_allocate;
+-{
+- char *abs_filename;
+- struct loaded_l10nfile *last = NULL;
+- struct loaded_l10nfile *retval;
+- char *cp;
+- size_t entries;
+- int cnt;
+-
+- /* Allocate room for the full file name. */
+- abs_filename = (char *) malloc (dirlist_len
+- + strlen (language)
+- + ((mask & TERRITORY) != 0
+- ? strlen (territory) + 1 : 0)
+- + ((mask & XPG_CODESET) != 0
+- ? strlen (codeset) + 1 : 0)
+- + ((mask & XPG_NORM_CODESET) != 0
+- ? strlen (normalized_codeset) + 1 : 0)
+- + (((mask & XPG_MODIFIER) != 0
+- || (mask & CEN_AUDIENCE) != 0)
+- ? strlen (modifier) + 1 : 0)
+- + ((mask & CEN_SPECIAL) != 0
+- ? strlen (special) + 1 : 0)
+- + (((mask & CEN_SPONSOR) != 0
+- || (mask & CEN_REVISION) != 0)
+- ? (1 + ((mask & CEN_SPONSOR) != 0
+- ? strlen (sponsor) + 1 : 0)
+- + ((mask & CEN_REVISION) != 0
+- ? strlen (revision) + 1 : 0)) : 0)
+- + 1 + strlen (filename) + 1);
+-
+- if (abs_filename == NULL)
+- return NULL;
+-
+- retval = NULL;
+- last = NULL;
+-
+- /* Construct file name. */
+- memcpy (abs_filename, dirlist, dirlist_len);
+- __argz_stringify (abs_filename, dirlist_len, ':');
+- cp = abs_filename + (dirlist_len - 1);
+- *cp++ = '/';
+- cp = stpcpy (cp, language);
+-
+- if ((mask & TERRITORY) != 0)
+- {
+- *cp++ = '_';
+- cp = stpcpy (cp, territory);
+- }
+- if ((mask & XPG_CODESET) != 0)
+- {
+- *cp++ = '.';
+- cp = stpcpy (cp, codeset);
+- }
+- if ((mask & XPG_NORM_CODESET) != 0)
+- {
+- *cp++ = '.';
+- cp = stpcpy (cp, normalized_codeset);
+- }
+- if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
+- {
+- /* This component can be part of both syntaces but has different
+- leading characters. For CEN we use `+', else `@'. */
+- *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
+- cp = stpcpy (cp, modifier);
+- }
+- if ((mask & CEN_SPECIAL) != 0)
+- {
+- *cp++ = '+';
+- cp = stpcpy (cp, special);
+- }
+- if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
+- {
+- *cp++ = ',';
+- if ((mask & CEN_SPONSOR) != 0)
+- cp = stpcpy (cp, sponsor);
+- if ((mask & CEN_REVISION) != 0)
+- {
+- *cp++ = '_';
+- cp = stpcpy (cp, revision);
+- }
+- }
+-
+- *cp++ = '/';
+- stpcpy (cp, filename);
+-
+- /* Look in list of already loaded domains whether it is already
+- available. */
+- last = NULL;
+- for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
+- if (retval->filename != NULL)
+- {
+- int compare = strcmp (retval->filename, abs_filename);
+- if (compare == 0)
+- /* We found it! */
+- break;
+- if (compare < 0)
+- {
+- /* It's not in the list. */
+- retval = NULL;
+- break;
+- }
+-
+- last = retval;
+- }
+-
+- if (retval != NULL || do_allocate == 0)
+- {
+- free (abs_filename);
+- return retval;
+- }
+-
+- retval = (struct loaded_l10nfile *)
+- malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
+- * (1 << pop (mask))
+- * sizeof (struct loaded_l10nfile *)));
+- if (retval == NULL)
+- return NULL;
+-
+- retval->filename = abs_filename;
+- retval->decided = (__argz_count (dirlist, dirlist_len) != 1
+- || ((mask & XPG_CODESET) != 0
+- && (mask & XPG_NORM_CODESET) != 0));
+- retval->data = NULL;
+-
+- if (last == NULL)
+- {
+- retval->next = *l10nfile_list;
+- *l10nfile_list = retval;
+- }
+- else
+- {
+- retval->next = last->next;
+- last->next = retval;
+- }
+-
+- entries = 0;
+- /* If the DIRLIST is a real list the RETVAL entry corresponds not to
+- a real file. So we have to use the DIRLIST separation mechanism
+- of the inner loop. */
+- cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
+- for (; cnt >= 0; --cnt)
+- if ((cnt & ~mask) == 0
+- && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+- && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+- {
+- /* Iterate over all elements of the DIRLIST. */
+- char *dir = NULL;
+-
+- while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
+- != NULL)
+- retval->successor[entries++]
+- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
+- language, territory, codeset,
+- normalized_codeset, modifier, special,
+- sponsor, revision, filename, 1);
+- }
+- retval->successor[entries] = NULL;
+-
+- return retval;
+-}
+-
+-/* Normalize codeset name. There is no standard for the codeset
+- names. Normalization allows the user to use any of the common
+- names. */
+-const char *
+-_nl_normalize_codeset (codeset, name_len)
+- const char *codeset;
+- size_t name_len;
+-{
+- int len = 0;
+- int only_digit = 1;
+- char *retval;
+- char *wp;
+- size_t cnt;
+-
+- for (cnt = 0; cnt < name_len; ++cnt)
+- if (isalnum (codeset[cnt]))
+- {
+- ++len;
+-
+- if (isalpha (codeset[cnt]))
+- only_digit = 0;
+- }
+-
+- retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
+-
+- if (retval != NULL)
+- {
+- if (only_digit)
+- wp = stpcpy (retval, "iso");
+- else
+- wp = retval;
+-
+- for (cnt = 0; cnt < name_len; ++cnt)
+- if (isalpha (codeset[cnt]))
+- *wp++ = tolower (codeset[cnt]);
+- else if (isdigit (codeset[cnt]))
+- *wp++ = codeset[cnt];
+-
+- *wp = '\0';
+- }
+-
+- return (const char *) retval;
+-}
+-
+-
+-/* @@ begin of epilog @@ */
+-
+-/* We don't want libintl.a to depend on any other library. So we
+- avoid the non-standard function stpcpy. In GNU C Library this
+- function is available, though. Also allow the symbol HAVE_STPCPY
+- to be defined. */
+-#if !_LIBC && !HAVE_STPCPY
+-static char *
+-stpcpy (dest, src)
+- char *dest;
+- const char *src;
+-{
+- while ((*dest++ = *src++) != '\0')
+- /* Do nothing. */ ;
+- return dest - 1;
+-}
+-#endif
+diff -uprN clean/lrzsz-0.12.20/intl/libgettext.h lrzsz-0.12.20/intl/libgettext.h
+--- clean/lrzsz-0.12.20/intl/libgettext.h 1998-04-26 14:22:36.000000000 +0100
++++ lrzsz-0.12.20/intl/libgettext.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,182 +0,0 @@
+-/* Message catalogs for internationalization.
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-/* Because on some systems (e.g. Solaris) we sometimes have to include
+- the systems libintl.h as well as this file we have more complex
+- include protection above. But the systems header might perhaps also
+- define _LIBINTL_H and therefore we have to protect the definition here. */
+-
+-#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H)
+-#if !defined (_LIBINTL_H)
+-# define _LIBINTL_H 1
+-#endif
+-#define _LIBGETTEXT_H 1
+-
+-/* We define an additional symbol to signal that we use the GNU
+- implementation of gettext. */
+-#define __USE_GNU_GETTEXT 1
+-
+-#include <sys/types.h>
+-
+-#if HAVE_LOCALE_H
+-# include <locale.h>
+-#endif
+-
+-
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+-/* @@ end of prolog @@ */
+-
+-#ifndef PARAMS
+-# if __STDC__
+-# define PARAMS(args) args
+-# else
+-# define PARAMS(args) ()
+-# endif
+-#endif
+-
+-#ifndef NULL
+-# if !defined __cplusplus || defined __GNUC__
+-# define NULL ((void *) 0)
+-# else
+-# define NULL (0)
+-# endif
+-#endif
+-
+-#if !HAVE_LC_MESSAGES
+-/* This value determines the behaviour of the gettext() and dgettext()
+- function. But some system does not have this defined. Define it
+- to a default value. */
+-# define LC_MESSAGES (-1)
+-#endif
+-
+-
+-/* Declarations for gettext-using-catgets interface. Derived from
+- Jim Meyering's libintl.h. */
+-struct _msg_ent
+-{
+- const char *_msg;
+- int _msg_number;
+-};
+-
+-
+-#if HAVE_CATGETS
+-/* These two variables are defined in the automatically by po-to-tbl.sed
+- generated file `cat-id-tbl.c'. */
+-extern const struct _msg_ent _msg_tbl[];
+-extern int _msg_tbl_length;
+-#endif
+-
+-
+-/* For automatical extraction of messages sometimes no real
+- translation is needed. Instead the string itself is the result. */
+-#define gettext_noop(Str) (Str)
+-
+-/* Look up MSGID in the current default message catalog for the current
+- LC_MESSAGES locale. If not found, returns MSGID itself (the default
+- text). */
+-extern char *gettext PARAMS ((const char *__msgid));
+-extern char *gettext__ PARAMS ((const char *__msgid));
+-
+-/* Look up MSGID in the DOMAINNAME message catalog for the current
+- LC_MESSAGES locale. */
+-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
+-extern char *dgettext__ PARAMS ((const char *__domainname,
+- const char *__msgid));
+-
+-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+- locale. */
+-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
+- int __category));
+-extern char *dcgettext__ PARAMS ((const char *__domainname,
+- const char *__msgid, int __category));
+-
+-
+-/* Set the current default message catalog to DOMAINNAME.
+- If DOMAINNAME is null, return the current default.
+- If DOMAINNAME is "", reset to the default of "messages". */
+-extern char *textdomain PARAMS ((const char *__domainname));
+-extern char *textdomain__ PARAMS ((const char *__domainname));
+-
+-/* Specify that the DOMAINNAME message catalog will be found
+- in DIRNAME rather than in the system locale data base. */
+-extern char *bindtextdomain PARAMS ((const char *__domainname,
+- const char *__dirname));
+-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
+- const char *__dirname));
+-
+-#if ENABLE_NLS
+-
+-/* Solaris 2.3 has the gettext function but dcgettext is missing.
+- So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
+- has dcgettext. */
+-# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
+-
+-# define gettext(Msgid) \
+- dgettext (NULL, Msgid)
+-
+-# define dgettext(Domainname, Msgid) \
+- dcgettext (Domainname, Msgid, LC_MESSAGES)
+-
+-# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+-/* This global variable is defined in loadmsgcat.c. We need a sign,
+- whether a new catalog was loaded, which can be associated with all
+- translations. */
+-extern int _nl_msg_cat_cntr;
+-
+-# define dcgettext(Domainname, Msgid, Category) \
+- (__extension__ \
+- ({ \
+- char *__result; \
+- if (__builtin_constant_p (Msgid)) \
+- { \
+- static char *__translation__; \
+- static int __catalog_counter__; \
+- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
+- { \
+- __translation__ = \
+- dcgettext__ (Domainname, Msgid, Category); \
+- __catalog_counter__ = _nl_msg_cat_cntr; \
+- } \
+- __result = __translation__; \
+- } \
+- else \
+- __result = dcgettext__ (Domainname, Msgid, Category); \
+- __result; \
+- }))
+-# endif
+-# endif
+-
+-#else
+-
+-# define gettext(Msgid) (Msgid)
+-# define dgettext(Domainname, Msgid) (Msgid)
+-# define dcgettext(Domainname, Msgid, Category) (Msgid)
+-# define textdomain(Domainname) while (0) /* nothing */
+-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
+-
+-#endif
+-
+-/* @@ begin of epilog @@ */
+-
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-#endif
+diff -uprN clean/lrzsz-0.12.20/intl/linux-msg.sed lrzsz-0.12.20/intl/linux-msg.sed
+--- clean/lrzsz-0.12.20/intl/linux-msg.sed 1998-04-26 14:20:52.000000000 +0100
++++ lrzsz-0.12.20/intl/linux-msg.sed 1970-01-01 01:00:00.000000000 +0100
+@@ -1,100 +0,0 @@
+-# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
+-# Copyright (C) 1995 Free Software Foundation, Inc.
+-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+-#
+-# This program is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2, or (at your option)
+-# any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+-#
+-#
+-# The first directive in the .msg should be the definition of the
+-# message set number. We use always set number 1.
+-#
+-1 {
+- i\
+-$set 1 # Automatically created by po2msg.sed
+- h
+- s/.*/0/
+- x
+-}
+-#
+-# Mitch's old catalog format does not allow comments.
+-#
+-# We copy the original message as a comment into the .msg file.
+-#
+-/^msgid/ {
+- s/msgid[ ]*"//
+-#
+-# This does not work now with the new format.
+-# /"$/! {
+-# s/\\$//
+-# s/$/ ... (more lines following)"/
+-# }
+- x
+-# The following nice solution is by
+-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+- td
+-# Increment a decimal number in pattern space.
+-# First hide trailing `9' digits.
+- :d
+- s/9\(_*\)$/_\1/
+- td
+-# Assure at least one digit is available.
+- s/^\(_*\)$/0\1/
+-# Increment the last digit.
+- s/8\(_*\)$/9\1/
+- s/7\(_*\)$/8\1/
+- s/6\(_*\)$/7\1/
+- s/5\(_*\)$/6\1/
+- s/4\(_*\)$/5\1/
+- s/3\(_*\)$/4\1/
+- s/2\(_*\)$/3\1/
+- s/1\(_*\)$/2\1/
+- s/0\(_*\)$/1\1/
+-# Convert the hidden `9' digits to `0's.
+- s/_/0/g
+- x
+- G
+- s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
+-}
+-#
+-# The .msg file contains, other then the .po file, only the translations
+-# but each given a unique ID. Starting from 1 and incrementing by 1 for
+-# each message we assign them to the messages.
+-# It is important that the .po file used to generate the cat-id-tbl.c file
+-# (with po-to-tbl) is the same as the one used here. (At least the order
+-# of declarations must not be changed.)
+-#
+-/^msgstr/ {
+- s/msgstr[ ]*"\(.*\)"/# \1/
+-# Clear substitution flag.
+- tb
+-# Append the next line.
+- :b
+- N
+-# Look whether second part is continuation line.
+- s/\(.*\n\)"\(.*\)"/\1\2/
+-# Yes, then branch.
+- ta
+- P
+- D
+-# Note that D includes a jump to the start!!
+-# We found a continuation line. But before printing insert '\'.
+- :a
+- s/\(.*\)\(\n.*\)/\1\\\2/
+- P
+-# We cannot use D here.
+- s/.*\n\(.*\)/\1/
+- tb
+-}
+-d
+diff -uprN clean/lrzsz-0.12.20/intl/loadinfo.h lrzsz-0.12.20/intl/loadinfo.h
+--- clean/lrzsz-0.12.20/intl/loadinfo.h 1998-04-26 14:20:52.000000000 +0100
++++ lrzsz-0.12.20/intl/loadinfo.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,58 +0,0 @@
+-#ifndef PARAMS
+-# if __STDC__
+-# define PARAMS(args) args
+-# else
+-# define PARAMS(args) ()
+-# endif
+-#endif
+-
+-/* Encoding of locale name parts. */
+-#define CEN_REVISION 1
+-#define CEN_SPONSOR 2
+-#define CEN_SPECIAL 4
+-#define XPG_NORM_CODESET 8
+-#define XPG_CODESET 16
+-#define TERRITORY 32
+-#define CEN_AUDIENCE 64
+-#define XPG_MODIFIER 128
+-
+-#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
+-#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
+-
+-
+-struct loaded_l10nfile
+-{
+- const char *filename;
+- int decided;
+-
+- const void *data;
+-
+- struct loaded_l10nfile *next;
+- struct loaded_l10nfile *successor[1];
+-};
+-
+-
+-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
+- size_t name_len));
+-
+-extern struct loaded_l10nfile *
+-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
+- const char *dirlist, size_t dirlist_len, int mask,
+- const char *language, const char *territory,
+- const char *codeset,
+- const char *normalized_codeset,
+- const char *modifier, const char *special,
+- const char *sponsor, const char *revision,
+- const char *filename, int do_allocate));
+-
+-
+-extern const char *_nl_expand_alias PARAMS ((const char *name));
+-
+-extern int _nl_explode_name PARAMS ((char *name, const char **language,
+- const char **modifier,
+- const char **territory,
+- const char **codeset,
+- const char **normalized_codeset,
+- const char **special,
+- const char **sponsor,
+- const char **revision));
+diff -uprN clean/lrzsz-0.12.20/intl/loadmsgcat.c lrzsz-0.12.20/intl/loadmsgcat.c
+--- clean/lrzsz-0.12.20/intl/loadmsgcat.c 1998-04-26 14:22:37.000000000 +0100
++++ lrzsz-0.12.20/intl/loadmsgcat.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,199 +0,0 @@
+-/* Load needed message catalogs
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include <fcntl.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-
+-#if defined STDC_HEADERS || defined _LIBC
+-# include <stdlib.h>
+-#endif
+-
+-#if defined HAVE_UNISTD_H || defined _LIBC
+-# include <unistd.h>
+-#endif
+-
+-#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
+-# include <sys/mman.h>
+-#endif
+-
+-#include "gettext.h"
+-#include "gettextP.h"
+-
+-/* @@ end of prolog @@ */
+-
+-#ifdef _LIBC
+-/* Rename the non ISO C functions. This is required by the standard
+- because some ISO C functions will require linking with this object
+- file and the name space must not be polluted. */
+-# define fstat __fstat
+-# define open __open
+-# define close __close
+-# define read __read
+-# define mmap __mmap
+-# define munmap __munmap
+-#endif
+-
+-/* We need a sign, whether a new catalog was loaded, which can be associated
+- with all translations. This is important if the translations are
+- cached by one of GCC's features. */
+-int _nl_msg_cat_cntr = 0;
+-
+-
+-/* Load the message catalogs specified by FILENAME. If it is no valid
+- message catalog do nothing. */
+-void
+-_nl_load_domain (domain_file)
+- struct loaded_l10nfile *domain_file;
+-{
+- int fd;
+- struct stat st;
+- struct mo_file_header *data = (struct mo_file_header *) -1;
+-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+- || defined _LIBC
+- int use_mmap = 0;
+-#endif
+- struct loaded_domain *domain;
+-
+- domain_file->decided = 1;
+- domain_file->data = NULL;
+-
+- /* If the record does not represent a valid locale the FILENAME
+- might be NULL. This can happen when according to the given
+- specification the locale file name is different for XPG and CEN
+- syntax. */
+- if (domain_file->filename == NULL)
+- return;
+-
+- /* Try to open the addressed file. */
+- fd = open (domain_file->filename, O_RDONLY);
+- if (fd == -1)
+- return;
+-
+- /* We must know about the size of the file. */
+- if (fstat (fd, &st) != 0
+- && st.st_size < (off_t) sizeof (struct mo_file_header))
+- {
+- /* Something went wrong. */
+- close (fd);
+- return;
+- }
+-
+-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+- || defined _LIBC
+- /* Now we are ready to load the file. If mmap() is available we try
+- this first. If not available or it failed we try to load it. */
+- data = (struct mo_file_header *) mmap (NULL, st.st_size, PROT_READ,
+- MAP_PRIVATE, fd, 0);
+-
+- if (data != (struct mo_file_header *) -1)
+- {
+- /* mmap() call was successful. */
+- close (fd);
+- use_mmap = 1;
+- }
+-#endif
+-
+- /* If the data is not yet available (i.e. mmap'ed) we try to load
+- it manually. */
+- if (data == (struct mo_file_header *) -1)
+- {
+- off_t to_read;
+- char *read_ptr;
+-
+- data = (struct mo_file_header *) malloc (st.st_size);
+- if (data == NULL)
+- return;
+-
+- to_read = st.st_size;
+- read_ptr = (char *) data;
+- do
+- {
+- long int nb = (long int) read (fd, read_ptr, to_read);
+- if (nb == -1)
+- {
+- close (fd);
+- return;
+- }
+-
+- read_ptr += nb;
+- to_read -= nb;
+- }
+- while (to_read > 0);
+-
+- close (fd);
+- }
+-
+- /* Using the magic number we can test whether it really is a message
+- catalog file. */
+- if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
+- {
+- /* The magic number is wrong: not a message catalog file. */
+-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+- || defined _LIBC
+- if (use_mmap)
+- munmap ((caddr_t) data, st.st_size);
+- else
+-#endif
+- free (data);
+- return;
+- }
+-
+- domain_file->data
+- = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+- if (domain_file->data == NULL)
+- return;
+-
+- domain = (struct loaded_domain *) domain_file->data;
+- domain->data = (char *) data;
+- domain->must_swap = data->magic != _MAGIC;
+-
+- /* Fill in the information about the available tables. */
+- switch (W (domain->must_swap, data->revision))
+- {
+- case 0:
+- domain->nstrings = W (domain->must_swap, data->nstrings);
+- domain->orig_tab = (struct string_desc *)
+- ((char *) data + W (domain->must_swap, data->orig_tab_offset));
+- domain->trans_tab = (struct string_desc *)
+- ((char *) data + W (domain->must_swap, data->trans_tab_offset));
+- domain->hash_size = W (domain->must_swap, data->hash_tab_size);
+- domain->hash_tab = (nls_uint32 *)
+- ((char *) data + W (domain->must_swap, data->hash_tab_offset));
+- break;
+- default:
+- /* This is an illegal revision. */
+-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+- || defined _LIBC
+- if (use_mmap)
+- munmap ((caddr_t) data, st.st_size);
+- else
+-#endif
+- free (data);
+- free (domain);
+- domain_file->data = NULL;
+- return;
+- }
+-
+- /* Show that one domain is changed. This might make some cached
+- translations invalid. */
+- ++_nl_msg_cat_cntr;
+-}
+diff -uprN clean/lrzsz-0.12.20/intl/localealias.c lrzsz-0.12.20/intl/localealias.c
+--- clean/lrzsz-0.12.20/intl/localealias.c 1998-04-26 14:22:37.000000000 +0100
++++ lrzsz-0.12.20/intl/localealias.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,378 +0,0 @@
+-/* Handle aliases for locale names
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include <ctype.h>
+-#include <stdio.h>
+-#include <sys/types.h>
+-
+-#ifdef __GNUC__
+-# define alloca __builtin_alloca
+-# define HAVE_ALLOCA 1
+-#else
+-# if defined HAVE_ALLOCA_H || defined _LIBC
+-# include <alloca.h>
+-# else
+-# ifdef _AIX
+- #pragma alloca
+-# else
+-# ifndef alloca
+-char *alloca ();
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#if defined STDC_HEADERS || defined _LIBC
+-# include <stdlib.h>
+-#else
+-char *getenv ();
+-# ifdef HAVE_MALLOC_H
+-# include <malloc.h>
+-# else
+-void free ();
+-# endif
+-#endif
+-
+-#if defined HAVE_STRING_H || defined _LIBC
+-# ifndef _GNU_SOURCE
+-# define _GNU_SOURCE 1
+-# endif
+-# include <string.h>
+-#else
+-# include <strings.h>
+-# ifndef memcpy
+-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+-# endif
+-#endif
+-#if !HAVE_STRCHR && !defined _LIBC
+-# ifndef strchr
+-# define strchr index
+-# endif
+-#endif
+-
+-#include "gettext.h"
+-#include "gettextP.h"
+-
+-/* @@ end of prolog @@ */
+-
+-#ifdef _LIBC
+-/* Rename the non ANSI C functions. This is required by the standard
+- because some ANSI C functions will require linking with this object
+- file and the name space must not be polluted. */
+-# define strcasecmp __strcasecmp
+-#endif
+-
+-
+-/* For those loosing systems which don't have `alloca' we have to add
+- some additional code emulating it. */
+-#ifdef HAVE_ALLOCA
+-/* Nothing has to be done. */
+-# define ADD_BLOCK(list, address) /* nothing */
+-# define FREE_BLOCKS(list) /* nothing */
+-#else
+-struct block_list
+-{
+- void *address;
+- struct block_list *next;
+-};
+-# define ADD_BLOCK(list, addr) \
+- do { \
+- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
+- /* If we cannot get a free block we cannot add the new element to \
+- the list. */ \
+- if (newp != NULL) { \
+- newp->address = (addr); \
+- newp->next = (list); \
+- (list) = newp; \
+- } \
+- } while (0)
+-# define FREE_BLOCKS(list) \
+- do { \
+- while (list != NULL) { \
+- struct block_list *old = list; \
+- list = list->next; \
+- free (old); \
+- } \
+- } while (0)
+-# undef alloca
+-# define alloca(size) (malloc (size))
+-#endif /* have alloca */
+-
+-
+-struct alias_map
+-{
+- const char *alias;
+- const char *value;
+-};
+-
+-
+-static struct alias_map *map;
+-static size_t nmap = 0;
+-static size_t maxmap = 0;
+-
+-
+-/* Prototypes for local functions. */
+-static size_t read_alias_file PARAMS ((const char *fname, int fname_len));
+-static void extend_alias_table PARAMS ((void));
+-static int alias_compare PARAMS ((const struct alias_map *map1,
+- const struct alias_map *map2));
+-
+-
+-const char *
+-_nl_expand_alias (name)
+- const char *name;
+-{
+- static const char *locale_alias_path = LOCALE_ALIAS_PATH;
+- struct alias_map *retval;
+- size_t added;
+-
+- do
+- {
+- struct alias_map item;
+-
+- item.alias = name;
+-
+- if (nmap > 0)
+- retval = (struct alias_map *) bsearch (&item, map, nmap,
+- sizeof (struct alias_map),
+- (int (*) PARAMS ((const void *,
+- const void *))
+- ) alias_compare);
+- else
+- retval = NULL;
+-
+- /* We really found an alias. Return the value. */
+- if (retval != NULL)
+- return retval->value;
+-
+- /* Perhaps we can find another alias file. */
+- added = 0;
+- while (added == 0 && locale_alias_path[0] != '\0')
+- {
+- const char *start;
+-
+- while (locale_alias_path[0] == ':')
+- ++locale_alias_path;
+- start = locale_alias_path;
+-
+- while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
+- ++locale_alias_path;
+-
+- if (start < locale_alias_path)
+- added = read_alias_file (start, locale_alias_path - start);
+- }
+- }
+- while (added != 0);
+-
+- return NULL;
+-}
+-
+-
+-static size_t
+-read_alias_file (fname, fname_len)
+- const char *fname;
+- int fname_len;
+-{
+-#ifndef HAVE_ALLOCA
+- struct block_list *block_list = NULL;
+-#endif
+- FILE *fp;
+- char *full_fname;
+- size_t added;
+- static const char aliasfile[] = "/locale.alias";
+-
+- full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+- ADD_BLOCK (block_list, full_fname);
+- memcpy (full_fname, fname, fname_len);
+- memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+-
+- fp = fopen (full_fname, "r");
+- if (fp == NULL)
+- {
+- FREE_BLOCKS (block_list);
+- return 0;
+- }
+-
+- added = 0;
+- while (!feof (fp))
+- {
+- /* It is a reasonable approach to use a fix buffer here because
+- a) we are only interested in the first two fields
+- b) these fields must be usable as file names and so must not
+- be that long
+- */
+- char buf[BUFSIZ];
+- char *alias;
+- char *value;
+- char *cp;
+-
+- if (fgets (buf, BUFSIZ, fp) == NULL)
+- /* EOF reached. */
+- break;
+-
+- cp = buf;
+- /* Ignore leading white space. */
+- while (isspace (cp[0]))
+- ++cp;
+-
+- /* A leading '#' signals a comment line. */
+- if (cp[0] != '\0' && cp[0] != '#')
+- {
+- alias = cp++;
+- while (cp[0] != '\0' && !isspace (cp[0]))
+- ++cp;
+- /* Terminate alias name. */
+- if (cp[0] != '\0')
+- *cp++ = '\0';
+-
+- /* Now look for the beginning of the value. */
+- while (isspace (cp[0]))
+- ++cp;
+-
+- if (cp[0] != '\0')
+- {
+- char *tp;
+- size_t len;
+-
+- value = cp++;
+- while (cp[0] != '\0' && !isspace (cp[0]))
+- ++cp;
+- /* Terminate value. */
+- if (cp[0] == '\n')
+- {
+- /* This has to be done to make the following test
+- for the end of line possible. We are looking for
+- the terminating '\n' which do not overwrite here. */
+- *cp++ = '\0';
+- *cp = '\n';
+- }
+- else if (cp[0] != '\0')
+- *cp++ = '\0';
+-
+- if (nmap >= maxmap)
+- extend_alias_table ();
+-
+- /* We cannot depend on strdup available in the libc. Sigh! */
+- len = strlen (alias) + 1;
+- tp = (char *) malloc (len);
+- if (tp == NULL)
+- {
+- FREE_BLOCKS (block_list);
+- return added;
+- }
+- memcpy (tp, alias, len);
+- map[nmap].alias = tp;
+-
+- len = strlen (value) + 1;
+- tp = (char *) malloc (len);
+- if (tp == NULL)
+- {
+- FREE_BLOCKS (block_list);
+- return added;
+- }
+- memcpy (tp, value, len);
+- map[nmap].value = tp;
+-
+- ++nmap;
+- ++added;
+- }
+- }
+-
+- /* Possibly not the whole line fits into the buffer. Ignore
+- the rest of the line. */
+- while (strchr (cp, '\n') == NULL)
+- {
+- cp = buf;
+- if (fgets (buf, BUFSIZ, fp) == NULL)
+- /* Make sure the inner loop will be left. The outer loop
+- will exit at the `feof' test. */
+- *cp = '\n';
+- }
+- }
+-
+- /* Should we test for ferror()? I think we have to silently ignore
+- errors. --drepper */
+- fclose (fp);
+-
+- if (added > 0)
+- qsort (map, nmap, sizeof (struct alias_map),
+- (int (*) PARAMS ((const void *, const void *))) alias_compare);
+-
+- FREE_BLOCKS (block_list);
+- return added;
+-}
+-
+-
+-static void
+-extend_alias_table ()
+-{
+- size_t new_size;
+- struct alias_map *new_map;
+-
+- new_size = maxmap == 0 ? 100 : 2 * maxmap;
+- new_map = (struct alias_map *) malloc (new_size
+- * sizeof (struct alias_map));
+- if (new_map == NULL)
+- /* Simply don't extend: we don't have any more core. */
+- return;
+-
+- memcpy (new_map, map, nmap * sizeof (struct alias_map));
+-
+- if (maxmap != 0)
+- free (map);
+-
+- map = new_map;
+- maxmap = new_size;
+-}
+-
+-
+-static int
+-alias_compare (map1, map2)
+- const struct alias_map *map1;
+- const struct alias_map *map2;
+-{
+-#if defined _LIBC || defined HAVE_STRCASECMP
+- return strcasecmp (map1->alias, map2->alias);
+-#else
+- const unsigned char *p1 = (const unsigned char *) map1->alias;
+- const unsigned char *p2 = (const unsigned char *) map2->alias;
+- unsigned char c1, c2;
+-
+- if (p1 == p2)
+- return 0;
+-
+- do
+- {
+- /* I know this seems to be odd but the tolower() function in
+- some systems libc cannot handle nonalpha characters. */
+- c1 = isupper (*p1) ? tolower (*p1) : *p1;
+- c2 = isupper (*p2) ? tolower (*p2) : *p2;
+- if (c1 == '\0')
+- break;
+- ++p1;
+- ++p2;
+- }
+- while (c1 == c2);
+-
+- return c1 - c2;
+-#endif
+-}
+diff -uprN clean/lrzsz-0.12.20/intl/Makefile.in lrzsz-0.12.20/intl/Makefile.in
+--- clean/lrzsz-0.12.20/intl/Makefile.in 1998-04-26 14:22:35.000000000 +0100
++++ lrzsz-0.12.20/intl/Makefile.in 1970-01-01 01:00:00.000000000 +0100
+@@ -1,214 +0,0 @@
+-# Makefile for directory with message catalog handling in GNU NLS Utilities.
+-# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+-#
+-# This program is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2, or (at your option)
+-# any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+-
+-PACKAGE = @PACKAGE@
+-VERSION = @VERSION@
+-
+-SHELL = /bin/sh
+-
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+-top_builddir = ..
+-VPATH = @srcdir@
+-
+-prefix = @prefix@
+-exec_prefix = @exec_prefix@
+-transform = @program_transform_name@
+-libdir = $(exec_prefix)/lib
+-includedir = $(prefix)/include
+-datadir = $(prefix)/@DATADIRNAME@
+-localedir = $(datadir)/locale
+-gnulocaledir = $(prefix)/share/locale
+-gettextsrcdir = @datadir@/gettext/intl
+-aliaspath = $(localedir):.
+-subdir = intl
+-
+-INSTALL = @INSTALL@
+-INSTALL_DATA = @INSTALL_DATA@
+-MKINSTALLDIRS = @MKINSTALLDIRS@
+-
+-l = @l@
+-
+-AR = ar
+-CC = @CC@
+-LIBTOOL = @LIBTOOL@
+-RANLIB = @RANLIB@
+-
+-DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
+--DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
+-CPPFLAGS = @CPPFLAGS@
+-CFLAGS = @CFLAGS@
+-LDFLAGS = @LDFLAGS@
+-
+-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+-
+-HEADERS = $(COMHDRS) libgettext.h loadinfo.h
+-COMHDRS = gettext.h gettextP.h hash-string.h
+-SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
+-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
+-finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
+-explodename.c
+-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
+-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
+-explodename.$lo
+-CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
+-GETTOBJS = intl-compat.$lo
+-DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
+-xopen-msg.sed $(HEADERS) $(SOURCES)
+-DISTFILES.normal = VERSION
+-DISTFILES.gettext = libintl.glibc intlh.inst.in
+-
+-.SUFFIXES:
+-.SUFFIXES: .c .o .lo
+-.c.o:
+- $(COMPILE) $<
+-.c.lo:
+- $(LIBTOOL) --mode=compile $(COMPILE) $<
+-
+-INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
+-
+-all: all-@USE_INCLUDED_LIBINTL@
+-
+-all-yes: libintl.$la intlh.inst
+-all-no:
+-
+-libintl.a: $(OBJECTS)
+- rm -f $@
+- $(AR) cru $@ $(OBJECTS)
+- $(RANLIB) $@
+-
+-libintl.la: $(OBJECTS)
+- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
+- -version-info 1:0 -rpath $(libdir)
+-
+-../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
+- cd ../po && $(MAKE) cat-id-tbl.$lo
+-
+-check: all
+-
+-# This installation goal is only used in GNU gettext. Packages which
+-# only use the library should use install instead.
+-
+-# We must not install the libintl.h/libintl.a files if we are on a
+-# system which has the gettext() function in its C library or in a
+-# separate library or use the catgets interface. A special case is
+-# where configure found a previously installed GNU gettext library.
+-# If you want to use the one which comes with this version of the
+-# package, you have to use `configure --with-included-gettext'.
+-install: install-exec install-data
+-install-exec: all
+- if test "$(PACKAGE)" = "gettext" \
+- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+- if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(libdir) $(includedir); \
+- else \
+- $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
+- fi; \
+- $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
+- $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
+- else \
+- : ; \
+- fi
+-install-data: all
+- if test "$(PACKAGE)" = "gettext"; then \
+- if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
+- else \
+- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+- fi; \
+- $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
+- dists="$(DISTFILES.common)"; \
+- for file in $$dists; do \
+- $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
+- done; \
+- else \
+- : ; \
+- fi
+-
+-# Define this as empty until I found a useful application.
+-installcheck:
+-
+-uninstall:
+- dists="$(DISTFILES.common)"; \
+- for file in $$dists; do \
+- rm -f $(gettextsrcdir)/$$file; \
+- done
+-
+-info dvi:
+-
+-$(OBJECTS): ../config.h libgettext.h
+-bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
+-dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
+-
+-tags: TAGS
+-
+-TAGS: $(HEADERS) $(SOURCES)
+- here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+-
+-id: ID
+-
+-ID: $(HEADERS) $(SOURCES)
+- here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+-
+-
+-mostlyclean:
+- rm -f *.a *.o *.lo core core.*
+-
+-clean: mostlyclean
+-
+-distclean: clean
+- rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
+-
+-maintainer-clean: distclean
+- @echo "This command is intended for maintainers to use;"
+- @echo "it deletes files that may require special tools to rebuild."
+-
+-
+-# GNU gettext needs not contain the file `VERSION' but contains some
+-# other files which should not be distributed in other packages.
+-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+-dist distdir: Makefile $(DISTFILES)
+- if test "$(PACKAGE)" = gettext; then \
+- additional="$(DISTFILES.gettext)"; \
+- else \
+- additional="$(DISTFILES.normal)"; \
+- fi; \
+- for file in $(DISTFILES.common) $$additional; do \
+- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+- || cp -p $(srcdir)/$$file $(distdir); \
+- done
+-
+-dist-libc:
+- tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
+-
+-Makefile: Makefile.in ../config.status
+- cd .. \
+- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+-
+-# The dependency for intlh.inst is different in gettext and all other
+-# packages. Because we cannot you GNU make features we have to solve
+-# the problem while rewriting Makefile.in.
+-@GT_YES@intlh.inst: intlh.inst.in ../config.status
+-@GT_YES@ cd .. \
+-@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
+-@GT_YES@ $(SHELL) ./config.status
+-@GT_NO@.PHONY: intlh.inst
+-@GT_NO@intlh.inst:
+-
+-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+-# Otherwise a system limit (for SysV at least) may be exceeded.
+-.NOEXPORT:
+diff -uprN clean/lrzsz-0.12.20/intl/po2tbl.sed.in lrzsz-0.12.20/intl/po2tbl.sed.in
+--- clean/lrzsz-0.12.20/intl/po2tbl.sed.in 1998-04-26 14:20:52.000000000 +0100
++++ lrzsz-0.12.20/intl/po2tbl.sed.in 1970-01-01 01:00:00.000000000 +0100
+@@ -1,102 +0,0 @@
+-# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
+-# Copyright (C) 1995 Free Software Foundation, Inc.
+-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+-#
+-# This program is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2, or (at your option)
+-# any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+-#
+-1 {
+- i\
+-/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
+-\
+-#if HAVE_CONFIG_H\
+-# include <config.h>\
+-#endif\
+-\
+-#include "libgettext.h"\
+-\
+-const struct _msg_ent _msg_tbl[] = {
+- h
+- s/.*/0/
+- x
+-}
+-#
+-# Write msgid entries in C array form.
+-#
+-/^msgid/ {
+- s/msgid[ ]*\(".*"\)/ {\1/
+- tb
+-# Append the next line
+- :b
+- N
+-# Look whether second part is continuation line.
+- s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
+-# Yes, then branch.
+- ta
+-# Because we assume that the input file correctly formed the line
+-# just read cannot be again be a msgid line. So it's safe to ignore
+-# it.
+- s/\(.*\)\n.*/\1/
+- bc
+-# We found a continuation line. But before printing insert '\'.
+- :a
+- s/\(.*\)\(\n.*\)/\1\\\2/
+- P
+-# We cannot use D here.
+- s/.*\n\(.*\)/\1/
+-# Some buggy seds do not clear the `successful substitution since last ``t'''
+-# flag on `N', so we do a `t' here to clear it.
+- tb
+-# Not reached
+- :c
+- x
+-# The following nice solution is by
+-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+- td
+-# Increment a decimal number in pattern space.
+-# First hide trailing `9' digits.
+- :d
+- s/9\(_*\)$/_\1/
+- td
+-# Assure at least one digit is available.
+- s/^\(_*\)$/0\1/
+-# Increment the last digit.
+- s/8\(_*\)$/9\1/
+- s/7\(_*\)$/8\1/
+- s/6\(_*\)$/7\1/
+- s/5\(_*\)$/6\1/
+- s/4\(_*\)$/5\1/
+- s/3\(_*\)$/4\1/
+- s/2\(_*\)$/3\1/
+- s/1\(_*\)$/2\1/
+- s/0\(_*\)$/1\1/
+-# Convert the hidden `9' digits to `0's.
+- s/_/0/g
+- x
+- G
+- s/\(.*\)\n\([0-9]*\)/\1, \2},/
+- s/\(.*\)"$/\1/
+- p
+-}
+-#
+-# Last line.
+-#
+-$ {
+- i\
+-};\
+-
+- g
+- s/0*\(.*\)/int _msg_tbl_length = \1;/p
+-}
+-d
+diff -uprN clean/lrzsz-0.12.20/intl/textdomain.c lrzsz-0.12.20/intl/textdomain.c
+--- clean/lrzsz-0.12.20/intl/textdomain.c 1998-04-26 14:22:37.000000000 +0100
++++ lrzsz-0.12.20/intl/textdomain.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,106 +0,0 @@
+-/* Implementation of the textdomain(3) function
+- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#if defined STDC_HEADERS || defined _LIBC
+-# include <stdlib.h>
+-#endif
+-
+-#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
+-# include <string.h>
+-#else
+-# include <strings.h>
+-# ifndef memcpy
+-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+-# endif
+-#endif
+-
+-#ifdef _LIBC
+-# include <libintl.h>
+-#else
+-# include "libgettext.h"
+-#endif
+-
+-/* @@ end of prolog @@ */
+-
+-/* Name of the default text domain. */
+-extern const char _nl_default_default_domain[];
+-
+-/* Default text domain in which entries for gettext(3) are to be found. */
+-extern const char *_nl_current_default_domain;
+-
+-
+-/* Names for the libintl functions are a problem. They must not clash
+- with existing names and they should follow ANSI C. But this source
+- code is also used in GNU C Library where the names have a __
+- prefix. So we have to make a difference here. */
+-#ifdef _LIBC
+-# define TEXTDOMAIN __textdomain
+-# define strdup(str) __strdup (str)
+-#else
+-# define TEXTDOMAIN textdomain__
+-#endif
+-
+-/* Set the current default message catalog to DOMAINNAME.
+- If DOMAINNAME is null, return the current default.
+- If DOMAINNAME is "", reset to the default of "messages". */
+-char *
+-TEXTDOMAIN (domainname)
+- const char *domainname;
+-{
+- char *old;
+-
+- /* A NULL pointer requests the current setting. */
+- if (domainname == NULL)
+- return (char *) _nl_current_default_domain;
+-
+- old = (char *) _nl_current_default_domain;
+-
+- /* If domain name is the null string set to default domain "messages". */
+- if (domainname[0] == '\0'
+- || strcmp (domainname, _nl_default_default_domain) == 0)
+- _nl_current_default_domain = _nl_default_default_domain;
+- else
+- {
+- /* If the following malloc fails `_nl_current_default_domain'
+- will be NULL. This value will be returned and so signals we
+- are out of core. */
+-#if defined _LIBC || defined HAVE_STRDUP
+- _nl_current_default_domain = strdup (domainname);
+-#else
+- size_t len = strlen (domainname) + 1;
+- char *cp = (char *) malloc (len);
+- if (cp != NULL)
+- memcpy (cp, domainname, len);
+- _nl_current_default_domain = cp;
+-#endif
+- }
+-
+- if (old != _nl_default_default_domain)
+- free (old);
+-
+- return (char *) _nl_current_default_domain;
+-}
+-
+-#ifdef _LIBC
+-/* Alias for function name in GNU C Library. */
+-weak_alias (__textdomain, textdomain);
+-#endif
+diff -uprN clean/lrzsz-0.12.20/intl/VERSION lrzsz-0.12.20/intl/VERSION
+--- clean/lrzsz-0.12.20/intl/VERSION 1998-04-26 14:22:37.000000000 +0100
++++ lrzsz-0.12.20/intl/VERSION 1970-01-01 01:00:00.000000000 +0100
+@@ -1 +0,0 @@
+-GNU gettext library from gettext-0.10.32
+diff -uprN clean/lrzsz-0.12.20/intl/xopen-msg.sed lrzsz-0.12.20/intl/xopen-msg.sed
+--- clean/lrzsz-0.12.20/intl/xopen-msg.sed 1998-04-26 14:20:52.000000000 +0100
++++ lrzsz-0.12.20/intl/xopen-msg.sed 1970-01-01 01:00:00.000000000 +0100
+@@ -1,104 +0,0 @@
+-# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
+-# Copyright (C) 1995 Free Software Foundation, Inc.
+-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+-#
+-# This program is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2, or (at your option)
+-# any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+-#
+-#
+-# The first directive in the .msg should be the definition of the
+-# message set number. We use always set number 1.
+-#
+-1 {
+- i\
+-$set 1 # Automatically created by po2msg.sed
+- h
+- s/.*/0/
+- x
+-}
+-#
+-# We copy all comments into the .msg file. Perhaps they can help.
+-#
+-/^#/ s/^#[ ]*/$ /p
+-#
+-# We copy the original message as a comment into the .msg file.
+-#
+-/^msgid/ {
+-# Does not work now
+-# /"$/! {
+-# s/\\$//
+-# s/$/ ... (more lines following)"/
+-# }
+- s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
+- p
+-}
+-#
+-# The .msg file contains, other then the .po file, only the translations
+-# but each given a unique ID. Starting from 1 and incrementing by 1 for
+-# each message we assign them to the messages.
+-# It is important that the .po file used to generate the cat-id-tbl.c file
+-# (with po-to-tbl) is the same as the one used here. (At least the order
+-# of declarations must not be changed.)
+-#
+-/^msgstr/ {
+- s/msgstr[ ]*"\(.*\)"/\1/
+- x
+-# The following nice solution is by
+-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+- td
+-# Increment a decimal number in pattern space.
+-# First hide trailing `9' digits.
+- :d
+- s/9\(_*\)$/_\1/
+- td
+-# Assure at least one digit is available.
+- s/^\(_*\)$/0\1/
+-# Increment the last digit.
+- s/8\(_*\)$/9\1/
+- s/7\(_*\)$/8\1/
+- s/6\(_*\)$/7\1/
+- s/5\(_*\)$/6\1/
+- s/4\(_*\)$/5\1/
+- s/3\(_*\)$/4\1/
+- s/2\(_*\)$/3\1/
+- s/1\(_*\)$/2\1/
+- s/0\(_*\)$/1\1/
+-# Convert the hidden `9' digits to `0's.
+- s/_/0/g
+- x
+-# Bring the line in the format `<number> <message>'
+- G
+- s/^[^\n]*$/& /
+- s/\(.*\)\n\([0-9]*\)/\2 \1/
+-# Clear flag from last substitution.
+- tb
+-# Append the next line.
+- :b
+- N
+-# Look whether second part is a continuation line.
+- s/\(.*\n\)"\(.*\)"/\1\2/
+-# Yes, then branch.
+- ta
+- P
+- D
+-# Note that `D' includes a jump to the start!!
+-# We found a continuation line. But before printing insert '\'.
+- :a
+- s/\(.*\)\(\n.*\)/\1\\\2/
+- P
+-# We cannot use the sed command `D' here
+- s/.*\n\(.*\)/\1/
+- tb
+-}
+-d
+diff -uprN clean/lrzsz-0.12.20/lib/Makefile.am lrzsz-0.12.20/lib/Makefile.am
+--- clean/lrzsz-0.12.20/lib/Makefile.am 1998-12-27 16:25:26.000000000 +0000
++++ lrzsz-0.12.20/lib/Makefile.am 2019-11-25 16:22:34.000000000 +0000
+@@ -1,6 +1,4 @@
+ noinst_LIBRARIES=libzmodem.a
+-CFLAGS=@CFLAGS@
+-AUTOMAKE_OPTIONS=ansi2knr
+
+ EXTRA_DIST = alloca.c ansi2knr.1 ansi2knr.c \
+ getopt.c getopt1.c mkdir.c mktime.c \
+diff -uprN clean/lrzsz-0.12.20/Makefile.am lrzsz-0.12.20/Makefile.am
+--- clean/lrzsz-0.12.20/Makefile.am 1998-12-30 11:19:40.000000000 +0000
++++ lrzsz-0.12.20/Makefile.am 2019-11-26 11:47:29.000000000 +0000
+@@ -1,5 +1,5 @@
+-SUBDIRS = lib intl src po man testsuite
+-EXTRA_DIST = check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
++SUBDIRS = lib src po man testsuite
++EXTRA_DIST = config.rpath m4/ChangeLog check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
+ README.gettext rpmrc buildrpm systype.in fastcheck.sh README.tests \
+ beos-runpiped.c fastcheck.beos
+ noinst_SCRIPTS=systype
+@@ -7,7 +7,6 @@ PR=@PACKAGE@-@VERSION@
+ CLEAN_FILES=fastcheck.done
+
+ dist-hook:
+- mkdir $(distdir)/debian
+ cp -fa $(srcdir)/debian/changelog $(distdir)/debian/
+ cp -fa $(srcdir)/debian/control $(distdir)/debian/
+ cp -fa $(srcdir)/debian/copyright $(distdir)/debian/
+@@ -83,3 +82,5 @@ cvs-dist:
+ rpm: $(PR).tar.gz Specfile
+ $(srcdir)/buildrpm $(srcdir)
+
++
++ACLOCAL_AMFLAGS = -I m4
+diff -uprN clean/lrzsz-0.12.20/po/cat-id-tbl.c lrzsz-0.12.20/po/cat-id-tbl.c
+--- clean/lrzsz-0.12.20/po/cat-id-tbl.c 1998-12-29 09:24:24.000000000 +0000
++++ lrzsz-0.12.20/po/cat-id-tbl.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,234 +0,0 @@
+-/* Automatically generated by po2tbl.sed from lrzsz.pot. */
+-
+-#if HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include "libgettext.h"
+-
+-const struct _msg_ent _msg_tbl[] = {
+- {"", 1},
+- {"io_mode(,2) in rbsb.c not implemented\n", 2},
+- {"caught signal %d; exiting", 3},
+- {"command tries", 4},
+- {"packetlength", 5},
+- {"packetlength out of range 24..%ld", 6},
+- {"framelength", 7},
+- {"framelength out of range 32..%ld", 8},
+- {"min_bps", 9},
+- {"min_bps must be >= 0", 10},
+- {"min_bps_time", 11},
+- {"min_bps_time must be > 1", 12},
+- {"hour to large (0..23)", 13},
+- {"unparsable stop time\n", 14},
+- {"minute to large (0..59)", 15},
+- {"stop time to small", 16},
+- {"stop-at", 17},
+- {"timeout", 18},
+- {"timeout out of range 10..1000", 19},
+- {"security violation: can't do that under restricted shell\n", 20},
+- {"window size", 21},
+- {"cannot turnoff syslog", 22},
+- {"startup delay", 23},
+- {"out of memory", 24},
+- {"this program was never intended to be used setuid\n", 25},
+- {"need at least one file to send", 26},
+- {"Can't send command in restricted mode\n", 27},
+- {"hostname too long\n", 28},
+- {"illegal server address\n", 29},
+- {"can read only one file from stdin", 30},
+- {"Transfer incomplete\n", 31},
+- {"Transfer complete\n", 32},
+- {"send_pseudo %s: cannot open tmpfile %s: %s", 33},
+- {"send_pseudo %s: cannot lstat tmpfile %s: %s", 34},
+- {"send_pseudo %s: avoiding symlink trap", 35},
+- {"send_pseudo %s: cannot write to tmpfile %s: %s", 36},
+- {"send_pseudo %s: failed", 37},
+- {"send_pseudo %s: ok", 38},
+- {"tcp protocol init failed\n", 39},
+- {"Answering TIMESYNC at %s", 40},
+- {"timezone", 41},
+- {"timezone unknown", 42},
+- {"Can't open any requested files.", 43},
+- {"security violation: not allowed to upload from %s", 44},
+- {"cannot open %s", 45},
+- {"is not a file: %s", 46},
+- {"%s/%s: error occured", 47},
+- {"skipped: %s", 48},
+- {"%s/%s: skipped", 49},
+- {"Bytes Sent:%7ld BPS:%-8ld \n", 50},
+- {"Sending %s, %ld blocks: ", 51},
+- {"Give your local XMODEM receive command now.", 52},
+- {"Sending: %s\n", 53},
+- {"Timeout on pathname", 54},
+- {"Receiver Cancelled", 55},
+- {"No ACK on EOT", 56},
+- {"Xmodem sectors/kbytes sent: %3d/%2dk", 57},
+- {"Ymodem sectors/kbytes sent: %3d/%2dk", 58},
+- {"Cancelled", 59},
+- {"Timeout on sector ACK", 60},
+- {"NAK on sector", 61},
+- {"Got burst for sector ACK", 62},
+- {"Got %02x for sector ACK", 63},
+- {"Retry Count Exceeded", 64},
+- {"Try `%s --help' for more information.\n", 65},
+- {"%s version %s\n", 66},
+- {"Usage: %s [options] file ...\n", 67},
+- {" or: %s [options] -{c|i} COMMAND\n", 68},
+- {"Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n", 69},
+- {"\
+- (X) = option applies to XMODEM only\n\
+- (Y) = option applies to YMODEM only\n\
+- (Z) = option applies to ZMODEM only\n", 70},
+- {"\
+- -+, --append append to existing destination file (Z)\n\
+- -2, --twostop use 2 stop bits\n\
+- -4, --try-4k go up to 4K blocksize\n\
+- --start-4k start with 4K blocksize (doesn't try 8)\n\
+- -8, --try-8k go up to 8K blocksize\n\
+- --start-8k start with 8K blocksize\n\
+- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
+- -b, --binary binary transfer\n\
+- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
+- -c, --command COMMAND execute remote command COMMAND (Z)\n\
+- -C, --command-tries N try N times to execute a command (Z)\n\
+- -d, --dot-to-slash change '.' to '/' in pathnames (Y/Z)\n\
+- --delay-startup N sleep N seconds before doing anything\n\
+- -e, --escape escape all control characters (Z)\n\
+- -E, --rename force receiver to rename files it already has\n\
+- -f, --full-path send full pathname (Y/Z)\n\
+- -i, --immediate-command CMD send remote CMD, return immediately (Z)\n\
+- -h, --help print this usage message\n\
+- -k, --1k send 1024 byte packets (X)\n\
+- -L, --packetlen N limit subpacket length to N bytes (Z)\n\
+- -l, --framelen N limit frame length to N bytes (l>=L) (Z)\n\
+- -m, --min-bps N stop transmission if BPS below N\n\
+- -M, --min-bps-time N for at least N seconds (default: 120)\n", 71},
+- {"\
+- -n, --newer send file if source newer (Z)\n\
+- -N, --newer-or-longer send file if source newer or longer (Z)\n\
+- -o, --16-bit-crc use 16 bit CRC instead of 32 bit CRC (Z)\n\
+- -O, --disable-timeouts disable timeout code, wait forever\n\
+- -p, --protect protect existing destination file (Z)\n\
+- -r, --resume resume interrupted file transfer (Z)\n\
+- -R, --restricted restricted, more secure mode\n\
+- -q, --quiet quiet (no progress reports)\n\
+- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
+- --tcp build a TCP connection to transmit files\n\
+- --tcp-server open socket, wait for connection\n\
+- -u, --unlink unlink file after transmission\n\
+- -U, --unrestrict turn off restricted mode (if allowed to)\n\
+- -v, --verbose be verbose, provide debugging information\n\
+- -w, --windowsize N Window is N bytes (Z)\n\
+- -X, --xmodem use XMODEM protocol\n\
+- -y, --overwrite overwrite existing files\n\
+- -Y, --overwrite-or-skip overwrite existing files, else skip\n\
+- --ymodem use YMODEM protocol\n\
+- -Z, --zmodem use ZMODEM protocol\n\
+-\n\
+-short options use the same arguments as the long ones\n", 72},
+- {"got ZRQINIT", 73},
+- {"got ZCAN", 74},
+- {"blklen now %d\n", 75},
+- {"zsendfdata: bps rate %ld below min %ld", 76},
+- {"zsendfdata: reached stop time", 77},
+- {"Bytes Sent:%7ld/%7ld BPS:%-8ld ETA %02d:%02d ", 78},
+- {"calc_blklen: reduced to %d due to error\n", 79},
+- {"calc_blklen: returned old value %d due to low bpe diff\n", 80},
+- {"calc_blklen: old %ld, new %ld, d %ld\n", 81},
+- {"calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n", 82},
+- {"calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n", 83},
+- {"calc_blklen: returned %d as best\n", 84},
+- {"\
+-\n\
+-countem: Total %d %ld\n", 85},
+- {"Bad escape sequence %x", 86},
+- {"Sender Canceled", 87},
+- {"TIMEOUT", 88},
+- {"Bad data subpacket", 89},
+- {"Data subpacket too long", 90},
+- {"Garbage count exceeded", 91},
+- {"Got %s", 92},
+- {"Retry %d: ", 93},
+- {"don't have settimeofday, will not set time\n", 94},
+- {"not running as root (this is good!), can not set time\n", 95},
+- {"bytes_per_error", 96},
+- {"bytes-per-error should be >100", 97},
+- {"O_SYNC not supported by the kernel", 98},
+- {"garbage on commandline", 99},
+- {"Usage: %s [options] [filename.if.xmodem]\n", 100},
+- {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 101},
+- {"\
+- -+, --append append to existing files\n\
+- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
+- -b, --binary binary transfer\n\
+- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
+- -c, --with-crc Use 16 bit CRC (X)\n\
+- -C, --allow-remote-commands allow execution of remote commands (Z)\n\
+- -D, --null write all received data to /dev/null\n\
+- --delay-startup N sleep N seconds before doing anything\n\
+- -e, --escape Escape control characters (Z)\n\
+- -E, --rename rename any files already existing\n\
+- --errors N generate CRC error every N bytes (debugging)\n\
+- -h, --help Help, print this usage message\n\
+- -m, --min-bps N stop transmission if BPS below N\n\
+- -M, --min-bps-time N for at least N seconds (default: 120)\n\
+- -O, --disable-timeouts disable timeout code, wait forever for data\n\
+- --o-sync open output file(s) in synchronous write mode\n\
+- -p, --protect protect existing files\n\
+- -q, --quiet quiet, no progress reports\n\
+- -r, --resume try to resume interrupted file transfer (Z)\n\
+- -R, --restricted restricted, more secure mode\n\
+- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
+- -S, --timesync request remote time (twice: set local time)\n\
+- --syslog[=off] turn syslog on or off, if possible\n\
+- -t, --timeout N set timeout to N tenths of a second\n\
+- -u, --keep-uppercase keep upper case filenames\n\
+- -U, --unrestrict disable restricted mode (if allowed to)\n\
+- -v, --verbose be verbose, provide debugging information\n\
+- -w, --windowsize N Window is N bytes (Z)\n\
+- -X --xmodem use XMODEM protocol\n\
+- -y, --overwrite Yes, clobber existing file if any\n\
+- --ymodem use YMODEM protocol\n\
+- -Z, --zmodem use ZMODEM protocol\n\
+-\n\
+-short options use the same arguments as the long ones\n", 102},
+- {"%s waiting to receive.", 103},
+- {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 104},
+- {"%s: ready to receive %s", 105},
+- {"\rBytes received: %7ld BPS:%-6ld \r\n", 106},
+- {"\
+-\r\n\
+-%s: %s removed.\r\n", 107},
+- {"Pathname fetch returned EOT", 108},
+- {"Received dup Sector", 109},
+- {"Sync Error", 110},
+- {"CRC", 111},
+- {"Checksum", 112},
+- {"Sector number garbled", 113},
+- {"Sender Cancelled", 114},
+- {"Got 0%o sector header", 115},
+- {"file name ends with a /, skipped: %s\n", 116},
+- {"zmanag=%d, Lzmanag=%d\n", 117},
+- {"zconv=%d\n", 118},
+- {"file exists, skipped: %s\n", 119},
+- {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 120},
+- {"TIMESYNC: cannot set time: %s\n", 121},
+- {"cannot tmpfile() for tcp protocol synchronization", 122},
+- {"Topipe", 123},
+- {"Receiving: %s\n", 124},
+- {"Blocks received: %d", 125},
+- {"%s: %s exists\n", 126},
+- {"%s:\tSecurity Violation", 127},
+- {"remote command execution requested", 128},
+- {"not executed", 129},
+- {"got ZRINIT", 130},
+- {"Skipped", 131},
+- {"rzfile: bps rate %ld below min %ld", 132},
+- {"rzfile: reached stop time", 133},
+- {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 134},
+- {"fgets for tcp protocol synchronization failed: ", 135},
+- {"file close error", 136},
+-};
+-
+-int _msg_tbl_length = 136;
+Binary files clean/lrzsz-0.12.20/po/de.gmo and lrzsz-0.12.20/po/de.gmo differ
+diff -uprN clean/lrzsz-0.12.20/po/de.po lrzsz-0.12.20/po/de.po
+--- clean/lrzsz-0.12.20/po/de.po 1998-12-30 16:31:46.000000000 +0000
++++ lrzsz-0.12.20/po/de.po 2019-11-26 11:42:07.000000000 +0000
+@@ -6,10 +6,12 @@
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: PACKAGE VERSION\n"
+-"POT-Creation-Date: 1998-12-30 08:49+0100\n"
++"Report-Msgid-Bugs-To: \n"
++"POT-Creation-Date: 2019-11-26 11:39+0000\n"
+ "PO-Revision-Date: 1997-06-01 19:00+0200\n"
+ "Last-Translator: FULL NAME <uwe@ohse.de>\n"
+ "Language-Team: none. try <uwe@ohse.de>\n"
++"Language: de\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=iso-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+@@ -18,7 +20,7 @@ msgstr ""
+ msgid "io_mode(,2) in rbsb.c not implemented\n"
+ msgstr "io_mode(2) in rbsb.c nicht implementiert\n"
+
+-#: src/lrz.c:201 src/lsz.c:230
++#: src/lsz.c:230 src/lrz.c:201
+ #, c-format
+ msgid "caught signal %d; exiting"
+ msgstr "erhielt Signal %d; Programmabbruch"
+@@ -45,7 +47,7 @@ msgstr "Framelänge"
+ msgid "framelength out of range 32..%ld"
+ msgstr "Argument der Option l außerhalb des Bereichs 32..%ld"
+
+-#: src/lrz.c:323 src/lsz.c:450
++#: src/lsz.c:450 src/lrz.c:323
+ msgid "min_bps"
+ msgstr "minimale BPS-Rate"
+
+@@ -53,65 +55,65 @@ msgstr "minimale BPS-Rate"
+ msgid "min_bps must be >= 0"
+ msgstr "minimale BPS-Rate muß >= 0 sein"
+
+-#: src/lrz.c:329 src/lsz.c:458
++#: src/lsz.c:458 src/lrz.c:329
+ msgid "min_bps_time"
+ msgstr ""
+
+-#: src/lrz.c:331 src/lsz.c:460
++#: src/lsz.c:460 src/lrz.c:331
+ msgid "min_bps_time must be > 1"
+ msgstr "Zeitfenster für minimale BPS-Rate muß > 1 Sekunde sein"
+
+-#: src/lrz.c:347 src/lsz.c:484
++#: src/lsz.c:484 src/lrz.c:347
+ msgid "hour to large (0..23)"
+ msgstr "Stunde zu gross (0..23)"
+
+-#: src/lrz.c:349 src/lsz.c:486
++#: src/lsz.c:486 src/lrz.c:349
+ msgid "unparsable stop time\n"
+ msgstr "unparsbare Endzeit\n"
+
+-#: src/lrz.c:353 src/lsz.c:490
++#: src/lsz.c:490 src/lrz.c:353
+ msgid "minute to large (0..59)"
+ msgstr "Minute zu groß (0..59)"
+
+-#: src/lrz.c:363 src/lrz.c:370 src/lsz.c:500 src/lsz.c:507
++#: src/lsz.c:500 src/lsz.c:507 src/lrz.c:363 src/lrz.c:370
+ msgid "stop time to small"
+ msgstr "Stopzeit zu kurz"
+
+-#: src/lrz.c:368 src/lsz.c:505
++#: src/lsz.c:505 src/lrz.c:368
+ msgid "stop-at"
+ msgstr ""
+
+-#: src/lrz.c:399 src/lsz.c:516
++#: src/lsz.c:516 src/lrz.c:399
+ msgid "timeout"
+ msgstr "Timeout"
+
+-#: src/lrz.c:401 src/lsz.c:518
++#: src/lsz.c:518 src/lrz.c:401
+ msgid "timeout out of range 10..1000"
+ msgstr "Argument der Option t außerhalb des Bereichs 10..1000"
+
+-#: src/lrz.c:417 src/lsz.c:526
++#: src/lsz.c:526 src/lrz.c:417
+ msgid "security violation: can't do that under restricted shell\n"
+ msgstr "Sicherheitsverstoß: Ausführung unter eingeschränkter Shell verboten\n"
+
+-#: src/lrz.c:407 src/lsz.c:533
++#: src/lsz.c:533 src/lrz.c:407
+ msgid "window size"
+ msgstr "Fenstergröße"
+
+-#: src/lrz.c:432 src/lrz.c:439 src/lsz.c:556 src/lsz.c:563
++#: src/lsz.c:556 src/lsz.c:563 src/lrz.c:432 src/lrz.c:439
+ msgid "cannot turnoff syslog"
+ msgstr "kann syslogging nicht abschalten"
+
+-#: src/lrz.c:454 src/lsz.c:571
++#: src/lsz.c:571 src/lrz.c:454
+ msgid "startup delay"
+ msgstr "Startverzögerung"
+
++#: src/lsz.c:583 src/lsz.c:692 src/lsz.c:831 src/lsz.c:1080 src/zreadline.c:127
+ #: src/lrz.c:470 src/lrz.c:755 src/lrz.c:1117 src/lrz.c:1243 src/lrz.c:1300
+-#: src/lrz.c:1317 src/lrz.c:1332 src/lrz.c:1431 src/lsz.c:583 src/lsz.c:692
+-#: src/lsz.c:831 src/lsz.c:1080 src/zreadline.c:127
++#: src/lrz.c:1317 src/lrz.c:1332 src/lrz.c:1431
+ msgid "out of memory"
+ msgstr "Kein Speicher mehr frei"
+
+-#: src/lrz.c:480 src/lsz.c:595
++#: src/lsz.c:595 src/lrz.c:480
+ msgid "this program was never intended to be used setuid\n"
+ msgstr "dieses Programm darf nicht setuid laufen\n"
+
+@@ -120,14 +122,15 @@ msgid "need at least one file to send"
+ msgstr "es muß mindestens ein Name einer zu sendenden Datei angegeben werden"
+
+ #: src/lsz.c:628
++#, c-format
+ msgid "Can't send command in restricted mode\n"
+ msgstr "Im eingeschränkten Modus ist das Senden von Kommandos verboten\n"
+
+-#: src/lrz.c:524 src/lsz.c:655
++#: src/lsz.c:655 src/lrz.c:524
+ msgid "hostname too long\n"
+ msgstr "Hostname zu lang\n"
+
+-#: src/lrz.c:539 src/lsz.c:670
++#: src/lsz.c:670 src/lrz.c:539
+ msgid "illegal server address\n"
+ msgstr "Illegale Serveraddresse\n"
+
+@@ -135,11 +138,11 @@ msgstr "Illegale Serveraddresse\n"
+ msgid "can read only one file from stdin"
+ msgstr "kann nur eine Datei von der Standardeingabe lesen"
+
+-#: src/lrz.c:571 src/lsz.c:806
++#: src/lsz.c:806 src/lrz.c:571
+ msgid "Transfer incomplete\n"
+ msgstr "Übertragung nicht abgeschlossen\n"
+
+-#: src/lrz.c:573 src/lsz.c:808
++#: src/lsz.c:808 src/lrz.c:573
+ msgid "Transfer complete\n"
+ msgstr "Übertragung abgeschlossen\n"
+
+@@ -197,9 +200,9 @@ msgstr "Kann keine der angeforderten Dat
+ #: src/lsz.c:1028
+ #, c-format
+ msgid "security violation: not allowed to upload from %s"
+-msgstr "Sicherheitsverstoß: Ausführung unter eingeschränkter Shell verboten"
++msgstr "Sicherheitsverstoß: Ausführung unter %s verboten"
+
+-#: src/lrz.c:1392 src/lsz.c:1046
++#: src/lsz.c:1046 src/lrz.c:1392
+ #, c-format
+ msgid "cannot open %s"
+ msgstr "kann %s nicht öffnen"
+@@ -290,12 +293,12 @@ msgstr "Erhielt %02x als Sektorbestätigu
+ msgid "Retry Count Exceeded"
+ msgstr "Maximale Wiederholungsanzahl überschritten"
+
+-#: src/lrz.c:593 src/lsz.c:1521
++#: src/lsz.c:1521 src/lrz.c:593
+ #, c-format
+ msgid "Try `%s --help' for more information.\n"
+ msgstr "`%s --help' gibt weitere Informationen.\n"
+
+-#: src/lrz.c:598 src/lsz.c:1526
++#: src/lsz.c:1526 src/lrz.c:598
+ #, c-format
+ msgid "%s version %s\n"
+ msgstr "%s Version %s\n"
+@@ -315,7 +318,7 @@ msgid "Send file(s) with ZMODEM/YMODEM/X
+ msgstr "Dateien mit ZMODEM/YMODEM/XMODEM übertragen\n"
+
+ # src/lrz.c:475 src/lsz.c:1330 xx
+-#: src/lrz.c:604 src/lsz.c:1534
++#: src/lsz.c:1534 src/lrz.c:604
+ msgid ""
+ " (X) = option applies to XMODEM only\n"
+ " (Y) = option applies to YMODEM only\n"
+@@ -431,7 +434,7 @@ msgstr ""
+ msgid "got ZRQINIT"
+ msgstr "erhielt ZRQINIT"
+
+-#: src/lrz.c:1074 src/lrz.c:1787 src/lsz.c:1792
++#: src/lsz.c:1792 src/lrz.c:1074 src/lrz.c:1787
+ msgid "got ZCAN"
+ msgstr "erhielt ZCAN"
+
+@@ -472,7 +475,7 @@ msgstr "calc_blklen: alt %ld, neu %ld, D
+ #: src/lsz.c:2272
+ #, c-format
+ msgid "calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n"
+-msgstr "calc_blklen: kalkuliere gesamt_bytes=%ld, bpe=%le, ec=%ld\n"
++msgstr "calc_blklen: kalkuliere gesamt_bytes=%ld, bpe=%ld, ec=%ld\n"
+
+ #: src/lsz.c:2283
+ #, c-format
+@@ -493,6 +496,10 @@ msgstr ""
+ "\n"
+ "countem: Gesamt %d %ld\n"
+
++#: src/zm.c:91
++msgid "Bad CRC"
++msgstr ""
++
+ #: src/zm.c:244
+ #, c-format
+ msgid "Bad escape sequence %x"
+@@ -502,7 +509,7 @@ msgstr "Falsche Escapesequenz %x"
+ msgid "Sender Canceled"
+ msgstr "Sender brach ab"
+
+-#: src/lrz.c:997 src/zm.c:585 src/zm.c:644
++#: src/zm.c:585 src/zm.c:644 src/lrz.c:997
+ msgid "TIMEOUT"
+ msgstr "TIMEOUT"
+
+@@ -772,13 +779,11 @@ msgstr "Erhielt unerwartetes ZRINIT"
+ msgid "Skipped"
+ msgstr "Übersprungen"
+
+-#. too bad
+ #: src/lrz.c:2064
+ #, c-format
+ msgid "rzfile: bps rate %ld below min %ld"
+ msgstr "rzfile: BPS-Rate %ld unter Minimum %ld"
+
+-#. too bad
+ #: src/lrz.c:2079
+ msgid "rzfile: reached stop time"
+ msgstr "rzfile: Abbruchzeit erreicht"
+diff -uprN clean/lrzsz-0.12.20/po/lrzsz.pot lrzsz-0.12.20/po/lrzsz.pot
+--- clean/lrzsz-0.12.20/po/lrzsz.pot 1998-12-30 07:50:00.000000000 +0000
++++ lrzsz-0.12.20/po/lrzsz.pot 2019-11-26 11:39:12.000000000 +0000
+@@ -1,24 +1,27 @@
+ # SOME DESCRIPTIVE TITLE.
+ # Copyright (C) YEAR Free Software Foundation, Inc.
++# This file is distributed under the same license as the lrzsz package.
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+ #
+ #, fuzzy
+ msgid ""
+ msgstr ""
+-"Project-Id-Version: PACKAGE VERSION\n"
+-"POT-Creation-Date: 1998-12-30 08:49+0100\n"
++"Project-Id-Version: lrzsz 0.12.20\n"
++"Report-Msgid-Bugs-To: \n"
++"POT-Creation-Date: 2019-11-26 11:39+0000\n"
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+ "Language-Team: LANGUAGE <LL@li.org>\n"
++"Language: \n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=CHARSET\n"
+-"Content-Transfer-Encoding: ENCODING\n"
++"Content-Transfer-Encoding: 8bit\n"
+
+ #: src/lsz.c:228
+ msgid "io_mode(,2) in rbsb.c not implemented\n"
+ msgstr ""
+
+-#: src/lrz.c:201 src/lsz.c:230
++#: src/lsz.c:230 src/lrz.c:201
+ #, c-format
+ msgid "caught signal %d; exiting"
+ msgstr ""
+@@ -45,7 +48,7 @@ msgstr ""
+ msgid "framelength out of range 32..%ld"
+ msgstr ""
+
+-#: src/lrz.c:323 src/lsz.c:450
++#: src/lsz.c:450 src/lrz.c:323
+ msgid "min_bps"
+ msgstr ""
+
+@@ -53,65 +56,65 @@ msgstr ""
+ msgid "min_bps must be >= 0"
+ msgstr ""
+
+-#: src/lrz.c:329 src/lsz.c:458
++#: src/lsz.c:458 src/lrz.c:329
+ msgid "min_bps_time"
+ msgstr ""
+
+-#: src/lrz.c:331 src/lsz.c:460
++#: src/lsz.c:460 src/lrz.c:331
+ msgid "min_bps_time must be > 1"
+ msgstr ""
+
+-#: src/lrz.c:347 src/lsz.c:484
++#: src/lsz.c:484 src/lrz.c:347
+ msgid "hour to large (0..23)"
+ msgstr ""
+
+-#: src/lrz.c:349 src/lsz.c:486
++#: src/lsz.c:486 src/lrz.c:349
+ msgid "unparsable stop time\n"
+ msgstr ""
+
+-#: src/lrz.c:353 src/lsz.c:490
++#: src/lsz.c:490 src/lrz.c:353
+ msgid "minute to large (0..59)"
+ msgstr ""
+
+-#: src/lrz.c:363 src/lrz.c:370 src/lsz.c:500 src/lsz.c:507
++#: src/lsz.c:500 src/lsz.c:507 src/lrz.c:363 src/lrz.c:370
+ msgid "stop time to small"
+ msgstr ""
+
+-#: src/lrz.c:368 src/lsz.c:505
++#: src/lsz.c:505 src/lrz.c:368
+ msgid "stop-at"
+ msgstr ""
+
+-#: src/lrz.c:399 src/lsz.c:516
++#: src/lsz.c:516 src/lrz.c:399
+ msgid "timeout"
+ msgstr ""
+
+-#: src/lrz.c:401 src/lsz.c:518
++#: src/lsz.c:518 src/lrz.c:401
+ msgid "timeout out of range 10..1000"
+ msgstr ""
+
+-#: src/lrz.c:417 src/lsz.c:526
++#: src/lsz.c:526 src/lrz.c:417
+ msgid "security violation: can't do that under restricted shell\n"
+ msgstr ""
+
+-#: src/lrz.c:407 src/lsz.c:533
++#: src/lsz.c:533 src/lrz.c:407
+ msgid "window size"
+ msgstr ""
+
+-#: src/lrz.c:432 src/lrz.c:439 src/lsz.c:556 src/lsz.c:563
++#: src/lsz.c:556 src/lsz.c:563 src/lrz.c:432 src/lrz.c:439
+ msgid "cannot turnoff syslog"
+ msgstr ""
+
+-#: src/lrz.c:454 src/lsz.c:571
++#: src/lsz.c:571 src/lrz.c:454
+ msgid "startup delay"
+ msgstr ""
+
++#: src/lsz.c:583 src/lsz.c:692 src/lsz.c:831 src/lsz.c:1080 src/zreadline.c:127
+ #: src/lrz.c:470 src/lrz.c:755 src/lrz.c:1117 src/lrz.c:1243 src/lrz.c:1300
+-#: src/lrz.c:1317 src/lrz.c:1332 src/lrz.c:1431 src/lsz.c:583 src/lsz.c:692
+-#: src/lsz.c:831 src/lsz.c:1080 src/zreadline.c:127
++#: src/lrz.c:1317 src/lrz.c:1332 src/lrz.c:1431
+ msgid "out of memory"
+ msgstr ""
+
+-#: src/lrz.c:480 src/lsz.c:595
++#: src/lsz.c:595 src/lrz.c:480
+ msgid "this program was never intended to be used setuid\n"
+ msgstr ""
+
+@@ -120,14 +123,15 @@ msgid "need at least one file to send"
+ msgstr ""
+
+ #: src/lsz.c:628
++#, c-format
+ msgid "Can't send command in restricted mode\n"
+ msgstr ""
+
+-#: src/lrz.c:524 src/lsz.c:655
++#: src/lsz.c:655 src/lrz.c:524
+ msgid "hostname too long\n"
+ msgstr ""
+
+-#: src/lrz.c:539 src/lsz.c:670
++#: src/lsz.c:670 src/lrz.c:539
+ msgid "illegal server address\n"
+ msgstr ""
+
+@@ -135,11 +139,11 @@ msgstr ""
+ msgid "can read only one file from stdin"
+ msgstr ""
+
+-#: src/lrz.c:571 src/lsz.c:806
++#: src/lsz.c:806 src/lrz.c:571
+ msgid "Transfer incomplete\n"
+ msgstr ""
+
+-#: src/lrz.c:573 src/lsz.c:808
++#: src/lsz.c:808 src/lrz.c:573
+ msgid "Transfer complete\n"
+ msgstr ""
+
+@@ -199,7 +203,7 @@ msgstr ""
+ msgid "security violation: not allowed to upload from %s"
+ msgstr ""
+
+-#: src/lrz.c:1392 src/lsz.c:1046
++#: src/lsz.c:1046 src/lrz.c:1392
+ #, c-format
+ msgid "cannot open %s"
+ msgstr ""
+@@ -290,12 +294,12 @@ msgstr ""
+ msgid "Retry Count Exceeded"
+ msgstr ""
+
+-#: src/lrz.c:593 src/lsz.c:1521
++#: src/lsz.c:1521 src/lrz.c:593
+ #, c-format
+ msgid "Try `%s --help' for more information.\n"
+ msgstr ""
+
+-#: src/lrz.c:598 src/lsz.c:1526
++#: src/lsz.c:1526 src/lrz.c:598
+ #, c-format
+ msgid "%s version %s\n"
+ msgstr ""
+@@ -314,7 +318,7 @@ msgstr ""
+ msgid "Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n"
+ msgstr ""
+
+-#: src/lrz.c:604 src/lsz.c:1534
++#: src/lsz.c:1534 src/lrz.c:604
+ msgid ""
+ " (X) = option applies to XMODEM only\n"
+ " (Y) = option applies to YMODEM only\n"
+@@ -378,7 +382,7 @@ msgstr ""
+ msgid "got ZRQINIT"
+ msgstr ""
+
+-#: src/lrz.c:1074 src/lrz.c:1787 src/lsz.c:1792
++#: src/lsz.c:1792 src/lrz.c:1074 src/lrz.c:1787
+ msgid "got ZCAN"
+ msgstr ""
+
+@@ -438,6 +442,10 @@ msgid ""
+ "countem: Total %d %ld\n"
+ msgstr ""
+
++#: src/zm.c:91
++msgid "Bad CRC"
++msgstr ""
++
+ #: src/zm.c:244
+ #, c-format
+ msgid "Bad escape sequence %x"
+@@ -447,7 +455,7 @@ msgstr ""
+ msgid "Sender Canceled"
+ msgstr ""
+
+-#: src/lrz.c:997 src/zm.c:585 src/zm.c:644
++#: src/zm.c:585 src/zm.c:644 src/lrz.c:997
+ msgid "TIMEOUT"
+ msgstr ""
+
+@@ -678,13 +686,11 @@ msgstr ""
+ msgid "Skipped"
+ msgstr ""
+
+-#. too bad
+ #: src/lrz.c:2064
+ #, c-format
+ msgid "rzfile: bps rate %ld below min %ld"
+ msgstr ""
+
+-#. too bad
+ #: src/lrz.c:2079
+ msgid "rzfile: reached stop time"
+ msgstr ""
+diff -uprN clean/lrzsz-0.12.20/po/Makevars lrzsz-0.12.20/po/Makevars
+--- clean/lrzsz-0.12.20/po/Makevars 1970-01-01 01:00:00.000000000 +0100
++++ lrzsz-0.12.20/po/Makevars 2019-11-25 18:09:52.000000000 +0000
+@@ -0,0 +1,78 @@
++# Makefile variables for PO directory in any package using GNU gettext.
++
++# Usually the message domain is the same as the package name.
++DOMAIN = $(PACKAGE)
++
++# These two variables depend on the location of this directory.
++subdir = po
++top_builddir = ..
++
++# These options get passed to xgettext.
++XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
++
++# This is the copyright holder that gets inserted into the header of the
++# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
++# package. (Note that the msgstr strings, extracted from the package's
++# sources, belong to the copyright holder of the package.) Translators are
++# expected to transfer the copyright for their translations to this person
++# or entity, or to disclaim their copyright. The empty string stands for
++# the public domain; in this case the translators are expected to disclaim
++# their copyright.
++COPYRIGHT_HOLDER = Free Software Foundation, Inc.
++
++# This tells whether or not to prepend "GNU " prefix to the package
++# name that gets inserted into the header of the $(DOMAIN).pot file.
++# Possible values are "yes", "no", or empty. If it is empty, try to
++# detect it automatically by scanning the files in $(top_srcdir) for
++# "GNU packagename" string.
++PACKAGE_GNU =
++
++# This is the email address or URL to which the translators shall report
++# bugs in the untranslated strings:
++# - Strings which are not entire sentences, see the maintainer guidelines
++# in the GNU gettext documentation, section 'Preparing Strings'.
++# - Strings which use unclear terms or require additional context to be
++# understood.
++# - Strings which make invalid assumptions about notation of date, time or
++# money.
++# - Pluralisation problems.
++# - Incorrect English spelling.
++# - Incorrect formatting.
++# It can be your email address, or a mailing list address where translators
++# can write to without being subscribed, or the URL of a web page through
++# which the translators can contact you.
++MSGID_BUGS_ADDRESS =
++
++# This is the list of locale categories, beyond LC_MESSAGES, for which the
++# message catalogs shall be used. It is usually empty.
++EXTRA_LOCALE_CATEGORIES =
++
++# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
++# context. Possible values are "yes" and "no". Set this to yes if the
++# package uses functions taking also a message context, like pgettext(), or
++# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
++USE_MSGCTXT = no
++
++# These options get passed to msgmerge.
++# Useful options are in particular:
++# --previous to keep previous msgids of translated messages,
++# --quiet to reduce the verbosity.
++MSGMERGE_OPTIONS =
++
++# These options get passed to msginit.
++# If you want to disable line wrapping when writing PO files, add
++# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
++# MSGINIT_OPTIONS.
++MSGINIT_OPTIONS =
++
++# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
++# has changed. Possible values are "yes" and "no". Set this to no if
++# the POT file is checked in the repository and the version control
++# program ignores timestamps.
++PO_DEPENDS_ON_POT = yes
++
++# This tells whether or not to forcibly update $(DOMAIN).pot and
++# regenerate PO files on "make dist". Possible values are "yes" and
++# "no". Set this to no if the POT file and PO files are maintained
++# externally.
++DIST_DEPENDS_ON_UPDATE_PO = yes
+diff -uprN clean/lrzsz-0.12.20/po/stamp-cat-id lrzsz-0.12.20/po/stamp-cat-id
+--- clean/lrzsz-0.12.20/po/stamp-cat-id 1998-12-30 07:50:01.000000000 +0000
++++ lrzsz-0.12.20/po/stamp-cat-id 1970-01-01 01:00:00.000000000 +0100
+@@ -1 +0,0 @@
+-timestamp
+diff -uprN clean/lrzsz-0.12.20/po/stamp-po lrzsz-0.12.20/po/stamp-po
+--- clean/lrzsz-0.12.20/po/stamp-po 1970-01-01 01:00:00.000000000 +0100
++++ lrzsz-0.12.20/po/stamp-po 2019-11-26 11:42:09.000000000 +0000
+@@ -0,0 +1 @@
++timestamp
+diff -uprN clean/lrzsz-0.12.20/src/Makefile.am lrzsz-0.12.20/src/Makefile.am
+--- clean/lrzsz-0.12.20/src/Makefile.am 1998-12-28 08:38:47.000000000 +0000
++++ lrzsz-0.12.20/src/Makefile.am 2019-11-25 16:22:49.000000000 +0000
+@@ -2,13 +2,11 @@ bin_PROGRAMS=lrz lsz
+ lrz_SOURCES=lrz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
+ lsz_SOURCES=lsz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
+ noinst_HEADERS = timing.h zglobal.h zmodem.h
+-datadir = $(prefix)/@DATADIRNAME@
++datadir = $(prefix)/share
+ localedir = $(datadir)/locale
+-CFLAGS=@CFLAGS@
+ DISTCLEAN_FILES=lrzszbug
+
+-LDADD = ../lib/libzmodem.a @INTLLIBS@
+-AUTOMAKE_OPTIONS=ansi2knr
++LDADD = ../lib/libzmodem.a @LIBINTL@
+ EXTRA_DIST = ansi2knr.1 ansi2knr.c lrzszbug.in
+ INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl -I$(top_srcdir)/lib
+ #DEFS = -DLOCALEDIR=\"$(localedir)\" -DOS=\"@host_os@\" -DCPU=\"@host_cpu@\"
+diff -uprN clean/lrzsz-0.12.20/src/zglobal.h lrzsz-0.12.20/src/zglobal.h
+--- clean/lrzsz-0.12.20/src/zglobal.h 1998-12-29 12:34:59.000000000 +0000
++++ lrzsz-0.12.20/src/zglobal.h 2019-11-25 16:32:42.000000000 +0000
+@@ -180,9 +180,6 @@ struct termios;
+ #if HAVE_LOCALE_H
+ # include <locale.h>
+ #endif
+-#if !HAVE_SETLOCALE
+-# define setlocale(Category, Locale) /* empty */
+-#endif
+
+ #if ENABLE_NLS
+ # include <libintl.h>
+diff -uprN clean/lrzsz-0.12.20/stamp-h.in lrzsz-0.12.20/stamp-h.in
+--- clean/lrzsz-0.12.20/stamp-h.in 1998-12-30 07:51:07.000000000 +0000
++++ lrzsz-0.12.20/stamp-h.in 1970-01-01 01:00:00.000000000 +0100
+@@ -1 +0,0 @@
+-timestamp
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/cve-2018-10195.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/cve-2018-10195.patch
new file mode 100644
index 0000000000..dea298634f
--- /dev/null
+++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/cve-2018-10195.patch
@@ -0,0 +1,28 @@
+Integer overflow in src/zm.c:zsdata() causes crash in sz and can leak information to receiver.
+
+Patch taken from Fedora.
+
+CVE: CVE-2018-10195
+Upstream-Status: Inappropriate (dead upstream)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff -urN lrzsz-0.12.20/src/zm.c lrzsz-0.12.20.new/src/zm.c
+--- lrzsz-0.12.20/src/zm.c Tue Dec 29 09:48:38 1998
++++ lrzsz-0.12.20.new/src/zm.c Tue Oct 8 12:46:58 2002
+@@ -431,10 +431,12 @@
+ VPRINTF(3,("zsdata: %lu %s", (unsigned long) length,
+ Zendnames[(frameend-ZCRCE)&3]));
+ crc = 0;
+- do {
+- zsendline(*buf); crc = updcrc((0377 & *buf), crc);
+- buf++;
+- } while (--length>0);
++
++ for( ; length; length--) {
++ zsendline(*buf); crc = updcrc((0377 & *buf), crc);
++ buf++;
++ }
++
+ xsendline(ZDLE); xsendline(frameend);
+ crc = updcrc(frameend, crc);
+ \ No newline at end of file
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/gettext.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/gettext.patch
deleted file mode 100644
index 1a24a1f05e..0000000000
--- a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/gettext.patch
+++ /dev/null
@@ -1,21884 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
---- lrzsz-0.12.20.safe/ABOUT-NLS 1998-04-26 09:22:30.000000000 -0400
-+++ lrzsz-0.12.20/ABOUT-NLS 2004-09-12 14:40:34.323752952 -0400
-@@ -1,14 +1,14 @@
- Notes on the Free Translation Project
- *************************************
-
-- Free software is going international! The Free Translation Project
--is a way to get maintainers of free software, translators, and users all
-+Free software is going international! The Free Translation Project is
-+a way to get maintainers of free software, translators, and users all
- together, so that will gradually become able to speak many languages.
- A few packages already provide translations for their messages.
-
- If you found this `ABOUT-NLS' file inside a distribution, you may
- assume that the distributed package does use GNU `gettext' internally,
--itself available at your nearest GNU archive site. But you do *not*
-+itself available at your nearest GNU archive site. But you do _not_
- need to install GNU `gettext' prior to configuring, installing or using
- this package with messages translated.
-
-@@ -22,10 +22,10 @@
- `gettext' which is used. The information can be found in the
- `intl/VERSION' file, in internationalized packages.
-
--One advise in advance
--=====================
-+Quick configuration advice
-+==========================
-
-- If you want to exploit the full power of internationalization, you
-+If you want to exploit the full power of internationalization, you
- should configure it using
-
- ./configure --with-included-gettext
-@@ -34,42 +34,40 @@
- package, despite the existence of internationalizing capabilities in the
- operating system where this package is being installed. So far, only
- the `gettext' implementation in the GNU C library version 2 provides as
--many features (such as locale alias or message inheritance) as the
--implementation here. It is also not possible to offer this additional
--functionality on top of a `catgets' implementation. Future versions of
--GNU `gettext' will very likely convey even more functionality. So it
--might be a good idea to change to GNU `gettext' as soon as possible.
-+many features (such as locale alias, message inheritance, automatic
-+charset conversion or plural form handling) as the implementation here.
-+It is also not possible to offer this additional functionality on top
-+of a `catgets' implementation. Future versions of GNU `gettext' will
-+very likely convey even more functionality. So it might be a good idea
-+to change to GNU `gettext' as soon as possible.
-
-- So you need not provide this option if you are using GNU libc 2 or
-+ So you need _not_ provide this option if you are using GNU libc 2 or
- you have installed a recent copy of the GNU gettext package with the
- included `libintl'.
-
- INSTALL Matters
- ===============
-
-- Some packages are "localizable" when properly installed; the
--programs they contain can be made to speak your own native language.
--Most such packages use GNU `gettext'. Other packages have their own
--ways to internationalization, predating GNU `gettext'.
-+Some packages are "localizable" when properly installed; the programs
-+they contain can be made to speak your own native language. Most such
-+packages use GNU `gettext'. Other packages have their own ways to
-+internationalization, predating GNU `gettext'.
-
- By default, this package will be installed to allow translation of
--messages. It will automatically detect whether the system provides
--usable `catgets' (if using this is selected by the installer) or
--`gettext' functions. If neither is available, the GNU `gettext' own
-+messages. It will automatically detect whether the system already
-+provides the GNU `gettext' functions. If not, the GNU `gettext' own
- library will be used. This library is wholly contained within this
- package, usually in the `intl/' subdirectory, so prior installation of
--the GNU `gettext' package is *not* required. Installers may use
-+the GNU `gettext' package is _not_ required. Installers may use
- special options at configuration time for changing the default
- behaviour. The commands:
-
- ./configure --with-included-gettext
-- ./configure --with-catgets
- ./configure --disable-nls
-
--will respectively bypass any pre-existing `catgets' or `gettext' to use
--the internationalizing routines provided within this package, enable
--the use of the `catgets' functions (if found on the locale system), or
--else, *totally* disable translation of messages.
-+will respectively bypass any pre-existing `gettext' to use the
-+internationalizing routines provided within this package, or else,
-+_totally_ disable translation of messages.
-
- When you already have GNU `gettext' installed on your system and run
- configure without an option for your new package, `configure' will
-@@ -83,18 +81,10 @@
-
- to prevent auto-detection.
-
-- By default the configuration process will not test for the `catgets'
--function and therefore they will not be used. The reasons are already
--given above: the emulation on top of `catgets' cannot provide all the
--extensions provided by the GNU `gettext' library. If you nevertheless
--want to use the `catgets' functions use
--
-- ./configure --with-catgets
--
--to enable the test for `catgets' (this causes no harm if `catgets' is
--not available on your system). If you really select this option we
--would like to hear about the reasons because we cannot think of any
--good one ourself.
-+ The configuration process will not test for the `catgets' function
-+and therefore it will not be used. The reason is that even an
-+emulation of `gettext' on top of `catgets' could not provide all the
-+extensions of the GNU `gettext' library.
-
- Internationalized packages have usually many `po/LL.po' files, where
- LL gives an ISO 639 two-letter code identifying the language. Unless
-@@ -108,57 +98,73 @@
- Using This Package
- ==================
-
-- As a user, if your language has been installed for this package, you
-+As a user, if your language has been installed for this package, you
- only have to set the `LANG' environment variable to the appropriate
--ISO 639 `LL' two-letter code prior to using the programs in the
--package. For example, let's suppose that you speak German. At the
--shell prompt, merely execute `setenv LANG de' (in `csh'),
--`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
--can be done from your `.login' or `.profile' file, once and for all.
-+`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
-+and `CC' is an ISO 3166 two-letter country code. For example, let's
-+suppose that you speak German and live in Germany. At the shell
-+prompt, merely execute `setenv LANG de_DE' (in `csh'),
-+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
-+This can be done from your `.login' or `.profile' file, once and for
-+all.
-
-- An operating system might already offer message localization for
--many of its programs, while other programs have been installed locally
--with the full capabilities of GNU `gettext'. Just using `gettext'
--extended syntax for `LANG' would break proper localization of already
--available operating system programs. In this case, users should set
--both `LANGUAGE' and `LANG' variables in their environment, as programs
--using GNU `gettext' give preference to `LANGUAGE'. For example, some
--Swedish users would rather read translations in German than English for
--when Swedish is not available. This is easily accomplished by setting
--`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
-+ You might think that the country code specification is redundant.
-+But in fact, some languages have dialects in different countries. For
-+example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
-+country code serves to distinguish the dialects.
-+
-+ The locale naming convention of `LL_CC', with `LL' denoting the
-+language and `CC' denoting the country, is the one use on systems based
-+on GNU libc. On other systems, some variations of this scheme are
-+used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
-+locales supported by your system for your country by running the command
-+`locale -a | grep '^LL''.
-+
-+ Not all programs have translations for all languages. By default, an
-+English message is shown in place of a nonexistent translation. If you
-+understand other languages, you can set up a priority list of languages.
-+This is done through a different environment variable, called
-+`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
-+for the purpose of message handling, but you still need to have `LANG'
-+set to the primary language; this is required by other parts of the
-+system libraries. For example, some Swedish users who would rather
-+read translations in German than English for when Swedish is not
-+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
-+
-+ Special advice for Norwegian users: The language code for Norwegian
-+bokma*l changed from `no' to `nb' recently (in 2003). During the
-+transition period, while some message catalogs for this language are
-+installed under `nb' and some older ones under `no', it's recommended
-+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
-+older translations are used.
-+
-+ In the `LANGUAGE' environment variable, but not in the `LANG'
-+environment variable, `LL_CC' combinations can be abbreviated as `LL'
-+to denote the language's main dialect. For example, `de' is equivalent
-+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
-+(Portuguese as spoken in Portugal) in this context.
-
- Translating Teams
- =================
-
-- For the Free Translation Project to be a success, we need interested
-+For the Free Translation Project to be a success, we need interested
- people who like their own language and write it well, and who are also
- able to synergize with other translators speaking the same language.
--Each translation team has its own mailing list, courtesy of Linux
--International. You may reach your translation team at the address
--`LL@li.org', replacing LL by the two-letter ISO 639 code for your
--language. Language codes are *not* the same as the country codes given
--in ISO 3166. The following translation teams exist, as of August 1997:
--
-- Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
-- Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
-- `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
-- Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
-- `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
-- Swedish `sv', and Turkish `tr'.
--
--For example, you may reach the Chinese translation team by writing to
--`zh@li.org'.
-+Each translation team has its own mailing list. The up-to-date list of
-+teams can be found at the Free Translation Project's homepage,
-+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
-+area.
-
-- If you'd like to volunteer to *work* at translating messages, you
-+ If you'd like to volunteer to _work_ at translating messages, you
- should become a member of the translating team for your own language.
--The subscribing address is *not* the same as the list itself, it has
-+The subscribing address is _not_ the same as the list itself, it has
- `-request' appended. For example, speakers of Swedish can send a
- message to `sv-request@li.org', having this message body:
-
- subscribe
-
- Keep in mind that team members are expected to participate
--*actively* in translations, or at solving translational difficulties,
-+_actively_ in translations, or at solving translational difficulties,
- rather than merely lurking around. If your team does not exist yet and
- you want to start one, or if you are unsure about what to do or how to
- get started, please write to `translation@iro.umontreal.ca' to reach the
-@@ -171,43 +177,559 @@
- Available Packages
- ==================
-
-- Languages are not equally supported in all packages. The following
--matrix shows the current state of internationalization, as of August
--1997. The matrix shows, in regard of each package, for which languages
--PO files have been submitted to translation coordination.
-+Languages are not equally supported in all packages. The following
-+matrix shows the current state of internationalization, as of January
-+2004. The matrix shows, in regard of each package, for which languages
-+PO files have been submitted to translation coordination, with a
-+translation percentage of at least 50%.
-
-- Ready PO files cs da de en es fi fr it ja ko nl no pl pt sl sv
-- .-------------------------------------------------.
-- bash | [] [] [] | 3
-- bison | [] [] [] | 3
-- clisp | [] [] [] [] | 4
-- cpio | [] [] [] [] [] | 5
-- diffutils | [] [] [] [] [] | 5
-- enscript | [] [] [] [] [] [] | 6
-- fileutils | [] [] [] [] [] [] [] [] [] [] | 10
-- findutils | [] [] [] [] [] [] [] [] | 8
-- flex | [] [] [] [] | 4
-- gcal | [] [] [] [] [] | 5
-- gettext | [] [] [] [] [] [] [] [] [] [] | 11
-- grep | [] [] [] [] [] [] [] [] [] | 9
-- hello | [] [] [] [] [] [] [] [] [] [] | 10
-- id-utils | [] [] [] | 3
-- indent | [] [] [] [] | 4
-- libc | [] [] [] [] [] [] [] | 7
-- m4 | [] [] [] [] [] | 5
-- make | [] [] [] [] [] [] | 6
-- music | [] [] | 2
-- ptx | [] [] [] [] [] [] [] [] | 8
-- recode | [] [] [] [] [] [] [] [] [] | 9
-- sh-utils | [] [] [] [] [] [] [] | 7
-- sharutils | [] [] [] [] [] | 5
-- tar | [] [] [] [] [] [] [] [] [] [] | 10
-- texinfo | [] | 1
-- textutils | [] [] [] [] [] [] [] [] [] | 9
-- wdiff | [] [] [] [] [] [] [] [] | 8
-- `-------------------------------------------------'
-- 16 languages cs da de en es fi fr it ja ko nl no pl pt sl sv
-- 27 packages 3 2 24 1 17 1 26 2 1 11 20 9 19 7 7 17 167
-+ Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
-+ +----------------------------------------------------+
-+ a2ps | [] [] [] [] |
-+ aegis | () |
-+ ant-phone | () |
-+ anubis | |
-+ ap-utils | |
-+ aspell | [] |
-+ bash | [] [] [] [] |
-+ batchelor | |
-+ bfd | [] [] |
-+ binutils | [] [] |
-+ bison | [] [] [] |
-+ bluez-pin | [] [] [] |
-+ clisp | |
-+ clisp | [] [] [] |
-+ console-tools | [] [] |
-+ coreutils | [] [] [] [] |
-+ cpio | [] [] [] |
-+ darkstat | [] () [] |
-+ diffutils | [] [] [] [] [] [] [] |
-+ e2fsprogs | [] [] [] |
-+ enscript | [] [] [] [] |
-+ error | [] [] [] [] [] |
-+ fetchmail | [] () [] [] [] [] |
-+ fileutils | [] [] [] |
-+ findutils | [] [] [] [] [] [] [] |
-+ flex | [] [] [] [] |
-+ fslint | |
-+ gas | [] |
-+ gawk | [] [] [] [] |
-+ gbiff | [] |
-+ gcal | [] |
-+ gcc | [] [] |
-+ gettext | [] [] [] [] [] |
-+ gettext-examples | [] [] [] [] |
-+ gettext-runtime | [] [] [] [] [] |
-+ gettext-tools | [] [] [] |
-+ gimp-print | [] [] [] [] [] |
-+ gliv | |
-+ glunarclock | [] [] |
-+ gnubiff | [] |
-+ gnucash | [] () [] [] |
-+ gnucash-glossary | [] () [] |
-+ gnupg | [] () [] [] [] [] |
-+ gpe-aerial | [] |
-+ gpe-beam | [] [] |
-+ gpe-calendar | [] [] |
-+ gpe-clock | [] [] |
-+ gpe-conf | [] [] |
-+ gpe-contacts | [] [] |
-+ gpe-edit | [] |
-+ gpe-go | [] |
-+ gpe-login | [] [] |
-+ gpe-ownerinfo | [] [] |
-+ gpe-sketchbook | [] [] |
-+ gpe-su | [] [] |
-+ gpe-taskmanager | [] [] |
-+ gpe-timesheet | [] |
-+ gpe-today | [] [] |
-+ gpe-todo | [] [] |
-+ gphoto2 | [] [] [] [] |
-+ gprof | [] [] [] |
-+ gpsdrive | () () () |
-+ gramadoir | [] |
-+ grep | [] [] [] [] [] [] |
-+ gretl | [] |
-+ gtick | [] () |
-+ hello | [] [] [] [] [] [] |
-+ id-utils | [] [] |
-+ indent | [] [] [] [] |
-+ iso_3166 | [] [] [] [] [] [] [] [] [] [] |
-+ iso_3166_1 | [] [] [] [] [] [] |
-+ iso_3166_2 | |
-+ iso_3166_3 | [] |
-+ iso_4217 | [] [] [] [] |
-+ iso_639 | |
-+ jpilot | [] [] [] |
-+ jtag | |
-+ jwhois | [] |
-+ kbd | [] [] [] [] [] |
-+ latrine | () |
-+ ld | [] [] |
-+ libc | [] [] [] [] [] [] |
-+ libgpewidget | [] [] |
-+ libiconv | [] [] [] [] [] |
-+ lifelines | [] () |
-+ lilypond | [] |
-+ lingoteach | |
-+ lingoteach_lessons | () () |
-+ lynx | [] [] [] [] |
-+ m4 | [] [] [] [] |
-+ mailutils | [] [] |
-+ make | [] [] [] |
-+ man-db | [] () [] [] () |
-+ minicom | [] [] [] |
-+ mysecretdiary | [] [] [] |
-+ nano | [] () [] [] [] |
-+ nano_1_0 | [] () [] [] [] |
-+ opcodes | [] |
-+ parted | [] [] [] [] [] |
-+ ptx | [] [] [] [] [] |
-+ python | |
-+ radius | [] |
-+ recode | [] [] [] [] [] [] [] |
-+ rpm | [] [] |
-+ screem | |
-+ scrollkeeper | [] [] [] [] [] [] |
-+ sed | [] [] [] [] [] [] |
-+ sh-utils | [] [] [] |
-+ shared-mime-info | |
-+ sharutils | [] [] [] [] [] [] |
-+ silky | () |
-+ skencil | [] () [] |
-+ sketch | [] () [] |
-+ soundtracker | [] [] [] |
-+ sp | [] |
-+ tar | [] [] [] [] |
-+ texinfo | [] [] [] |
-+ textutils | [] [] [] [] |
-+ tin | () () |
-+ tp-robot | |
-+ tuxpaint | [] [] [] [] [] [] [] |
-+ unicode-han-tra... | |
-+ unicode-transla... | |
-+ util-linux | [] [] [] [] [] |
-+ vorbis-tools | [] [] [] [] |
-+ wastesedge | () |
-+ wdiff | [] [] [] [] |
-+ wget | [] [] [] [] [] [] |
-+ xchat | [] [] [] [] |
-+ xfree86_xkb_xml | [] [] |
-+ xpad | [] |
-+ +----------------------------------------------------+
-+ af am ar az be bg bs ca cs da de el en en_GB eo es
-+ 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
-+
-+ et eu fa fi fr ga gl he hr hu id is it ja ko lg
-+ +-------------------------------------------------+
-+ a2ps | [] [] [] () () |
-+ aegis | |
-+ ant-phone | [] |
-+ anubis | [] |
-+ ap-utils | [] |
-+ aspell | [] [] |
-+ bash | [] [] |
-+ batchelor | [] [] |
-+ bfd | [] |
-+ binutils | [] [] |
-+ bison | [] [] [] [] |
-+ bluez-pin | [] [] [] [] [] |
-+ clisp | |
-+ clisp | [] |
-+ console-tools | |
-+ coreutils | [] [] [] [] [] [] |
-+ cpio | [] [] [] [] |
-+ darkstat | () [] [] [] |
-+ diffutils | [] [] [] [] [] [] [] |
-+ e2fsprogs | |
-+ enscript | [] [] |
-+ error | [] [] [] [] |
-+ fetchmail | [] |
-+ fileutils | [] [] [] [] [] [] |
-+ findutils | [] [] [] [] [] [] [] [] [] [] [] |
-+ flex | [] [] [] |
-+ fslint | [] |
-+ gas | [] |
-+ gawk | [] [] [] |
-+ gbiff | [] |
-+ gcal | [] |
-+ gcc | [] |
-+ gettext | [] [] [] |
-+ gettext-examples | [] [] |
-+ gettext-runtime | [] [] [] [] [] |
-+ gettext-tools | [] [] [] |
-+ gimp-print | [] [] |
-+ gliv | () |
-+ glunarclock | [] [] [] [] |
-+ gnubiff | [] |
-+ gnucash | () [] |
-+ gnucash-glossary | [] |
-+ gnupg | [] [] [] [] [] [] [] |
-+ gpe-aerial | [] |
-+ gpe-beam | [] |
-+ gpe-calendar | [] [] [] |
-+ gpe-clock | [] |
-+ gpe-conf | [] |
-+ gpe-contacts | [] [] |
-+ gpe-edit | [] [] |
-+ gpe-go | [] |
-+ gpe-login | [] [] |
-+ gpe-ownerinfo | [] [] [] |
-+ gpe-sketchbook | [] |
-+ gpe-su | [] |
-+ gpe-taskmanager | [] |
-+ gpe-timesheet | [] [] [] |
-+ gpe-today | [] [] |
-+ gpe-todo | [] [] |
-+ gphoto2 | [] [] [] |
-+ gprof | [] [] |
-+ gpsdrive | () () () |
-+ gramadoir | [] [] |
-+ grep | [] [] [] [] [] [] [] [] [] [] [] |
-+ gretl | [] [] |
-+ gtick | [] [] [] |
-+ hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
-+ id-utils | [] [] [] [] |
-+ indent | [] [] [] [] [] [] [] [] [] |
-+ iso_3166 | [] [] [] [] [] [] [] |
-+ iso_3166_1 | [] [] [] [] [] |
-+ iso_3166_2 | |
-+ iso_3166_3 | |
-+ iso_4217 | [] [] [] [] [] [] |
-+ iso_639 | |
-+ jpilot | [] () |
-+ jtag | [] |
-+ jwhois | [] [] [] [] |
-+ kbd | [] |
-+ latrine | [] |
-+ ld | [] |
-+ libc | [] [] [] [] [] [] |
-+ libgpewidget | [] [] [] [] |
-+ libiconv | [] [] [] [] [] [] [] [] [] |
-+ lifelines | () |
-+ lilypond | [] |
-+ lingoteach | [] [] |
-+ lingoteach_lessons | |
-+ lynx | [] [] [] [] |
-+ m4 | [] [] [] [] |
-+ mailutils | |
-+ make | [] [] [] [] [] [] |
-+ man-db | () () |
-+ minicom | [] [] [] [] |
-+ mysecretdiary | [] [] |
-+ nano | [] [] [] [] |
-+ nano_1_0 | [] [] [] [] |
-+ opcodes | [] |
-+ parted | [] [] [] |
-+ ptx | [] [] [] [] [] [] [] |
-+ python | |
-+ radius | [] |
-+ recode | [] [] [] [] [] [] |
-+ rpm | [] [] |
-+ screem | |
-+ scrollkeeper | [] |
-+ sed | [] [] [] [] [] [] [] [] [] |
-+ sh-utils | [] [] [] [] [] [] [] |
-+ shared-mime-info | [] [] [] |
-+ sharutils | [] [] [] [] [] |
-+ silky | () [] () () |
-+ skencil | [] |
-+ sketch | [] |
-+ soundtracker | [] [] |
-+ sp | [] () |
-+ tar | [] [] [] [] [] [] [] [] [] |
-+ texinfo | [] [] [] [] |
-+ textutils | [] [] [] [] [] [] |
-+ tin | [] () |
-+ tp-robot | [] |
-+ tuxpaint | [] [] [] [] [] [] [] [] [] |
-+ unicode-han-tra... | |
-+ unicode-transla... | [] [] |
-+ util-linux | [] [] [] [] () [] |
-+ vorbis-tools | [] |
-+ wastesedge | () |
-+ wdiff | [] [] [] [] [] [] |
-+ wget | [] [] [] [] [] [] [] |
-+ xchat | [] [] [] |
-+ xfree86_xkb_xml | [] [] |
-+ xpad | [] [] |
-+ +-------------------------------------------------+
-+ et eu fa fi fr ga gl he hr hu id is it ja ko lg
-+ 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
-+
-+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
-+ +-----------------------------------------------------+
-+ a2ps | [] [] () () [] [] [] |
-+ aegis | () () () |
-+ ant-phone | [] [] |
-+ anubis | [] [] [] [] [] [] |
-+ ap-utils | [] () [] |
-+ aspell | [] |
-+ bash | [] [] [] |
-+ batchelor | [] |
-+ bfd | [] |
-+ binutils | [] |
-+ bison | [] [] [] [] [] |
-+ bluez-pin | [] [] [] |
-+ clisp | |
-+ clisp | [] |
-+ console-tools | [] |
-+ coreutils | [] [] |
-+ cpio | [] [] [] [] [] |
-+ darkstat | [] [] [] [] |
-+ diffutils | [] [] [] [] [] [] |
-+ e2fsprogs | [] |
-+ enscript | [] [] [] [] |
-+ error | [] [] [] |
-+ fetchmail | [] [] () [] |
-+ fileutils | [] [] [] |
-+ findutils | [] [] [] [] [] |
-+ flex | [] [] [] [] |
-+ fslint | [] [] |
-+ gas | |
-+ gawk | [] [] [] |
-+ gbiff | [] [] |
-+ gcal | |
-+ gcc | |
-+ gettext | [] [] [] |
-+ gettext-examples | [] [] [] |
-+ gettext-runtime | [] [] [] [] |
-+ gettext-tools | [] [] |
-+ gimp-print | [] |
-+ gliv | [] [] [] |
-+ glunarclock | [] [] [] [] |
-+ gnubiff | [] |
-+ gnucash | [] [] () [] |
-+ gnucash-glossary | [] [] |
-+ gnupg | [] |
-+ gpe-aerial | [] [] [] [] |
-+ gpe-beam | [] [] [] [] |
-+ gpe-calendar | [] [] [] [] |
-+ gpe-clock | [] [] [] [] |
-+ gpe-conf | [] [] [] [] |
-+ gpe-contacts | [] [] [] [] |
-+ gpe-edit | [] [] [] [] |
-+ gpe-go | [] [] [] |
-+ gpe-login | [] [] [] [] |
-+ gpe-ownerinfo | [] [] [] [] |
-+ gpe-sketchbook | [] [] [] [] |
-+ gpe-su | [] [] [] [] |
-+ gpe-taskmanager | [] [] [] [] |
-+ gpe-timesheet | [] [] [] [] |
-+ gpe-today | [] [] [] [] |
-+ gpe-todo | [] [] [] [] |
-+ gphoto2 | [] |
-+ gprof | [] [] |
-+ gpsdrive | () () [] |
-+ gramadoir | () [] |
-+ grep | [] [] [] [] [] |
-+ gretl | |
-+ gtick | [] [] [] |
-+ hello | [] [] [] [] [] [] [] [] [] [] |
-+ id-utils | [] [] [] [] |
-+ indent | [] [] [] [] |
-+ iso_3166 | [] [] [] |
-+ iso_3166_1 | [] [] |
-+ iso_3166_2 | |
-+ iso_3166_3 | [] |
-+ iso_4217 | [] [] [] [] [] [] [] [] |
-+ iso_639 | [] |
-+ jpilot | () () |
-+ jtag | |
-+ jwhois | [] [] [] [] () |
-+ kbd | [] [] [] |
-+ latrine | [] |
-+ ld | |
-+ libc | [] [] [] [] |
-+ libgpewidget | [] [] [] |
-+ libiconv | [] [] [] [] [] |
-+ lifelines | |
-+ lilypond | |
-+ lingoteach | |
-+ lingoteach_lessons | |
-+ lynx | [] [] [] |
-+ m4 | [] [] [] [] [] |
-+ mailutils | [] [] [] |
-+ make | [] [] [] [] |
-+ man-db | [] |
-+ minicom | [] [] [] [] |
-+ mysecretdiary | [] [] [] |
-+ nano | [] [] [] [] [] |
-+ nano_1_0 | [] [] [] [] [] [] |
-+ opcodes | [] [] |
-+ parted | [] [] [] [] |
-+ ptx | [] [] [] [] [] [] [] [] |
-+ python | |
-+ radius | [] [] |
-+ recode | [] [] [] [] |
-+ rpm | [] [] [] |
-+ screem | |
-+ scrollkeeper | [] [] [] [] [] |
-+ sed | [] [] [] |
-+ sh-utils | [] [] |
-+ shared-mime-info | [] [] |
-+ sharutils | [] [] |
-+ silky | () |
-+ skencil | [] [] |
-+ sketch | [] [] |
-+ soundtracker | |
-+ sp | |
-+ tar | [] [] [] [] [] [] |
-+ texinfo | [] [] [] [] |
-+ textutils | [] [] |
-+ tin | |
-+ tp-robot | [] |
-+ tuxpaint | [] [] [] [] [] [] [] [] |
-+ unicode-han-tra... | |
-+ unicode-transla... | |
-+ util-linux | [] [] [] |
-+ vorbis-tools | [] [] [] |
-+ wastesedge | |
-+ wdiff | [] [] [] [] [] |
-+ wget | [] [] [] |
-+ xchat | [] [] [] |
-+ xfree86_xkb_xml | [] [] |
-+ xpad | [] [] |
-+ +-----------------------------------------------------+
-+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
-+ 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
-+
-+ sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
-+ +-----------------------------------------------------+
-+ a2ps | [] [] [] [] | 16
-+ aegis | | 0
-+ ant-phone | | 3
-+ anubis | [] [] | 9
-+ ap-utils | () | 3
-+ aspell | | 4
-+ bash | | 9
-+ batchelor | | 3
-+ bfd | [] [] | 6
-+ binutils | [] [] [] | 8
-+ bison | [] [] | 14
-+ bluez-pin | [] [] [] | 14
-+ clisp | | 0
-+ clisp | | 5
-+ console-tools | | 3
-+ coreutils | [] [] [] [] | 16
-+ cpio | [] [] | 14
-+ darkstat | [] [] [] () () | 12
-+ diffutils | [] [] [] | 23
-+ e2fsprogs | [] [] | 6
-+ enscript | [] [] | 12
-+ error | [] [] [] | 15
-+ fetchmail | [] [] | 11
-+ fileutils | [] [] [] [] [] | 17
-+ findutils | [] [] [] [] [] [] | 29
-+ flex | [] [] | 13
-+ fslint | | 3
-+ gas | [] | 3
-+ gawk | [] [] | 12
-+ gbiff | | 4
-+ gcal | [] [] | 4
-+ gcc | [] | 4
-+ gettext | [] [] [] [] [] | 16
-+ gettext-examples | [] [] [] [] [] | 14
-+ gettext-runtime | [] [] [] [] [] [] [] [] | 22
-+ gettext-tools | [] [] [] [] [] [] | 14
-+ gimp-print | [] [] | 10
-+ gliv | | 3
-+ glunarclock | [] [] [] | 13
-+ gnubiff | | 3
-+ gnucash | [] [] | 9
-+ gnucash-glossary | [] [] [] | 8
-+ gnupg | [] [] [] [] | 17
-+ gpe-aerial | [] | 7
-+ gpe-beam | [] | 8
-+ gpe-calendar | [] [] [] [] | 13
-+ gpe-clock | [] [] [] | 10
-+ gpe-conf | [] [] | 9
-+ gpe-contacts | [] [] [] | 11
-+ gpe-edit | [] [] [] [] [] | 12
-+ gpe-go | | 5
-+ gpe-login | [] [] [] [] [] | 13
-+ gpe-ownerinfo | [] [] [] [] | 13
-+ gpe-sketchbook | [] [] | 9
-+ gpe-su | [] [] [] | 10
-+ gpe-taskmanager | [] [] [] | 10
-+ gpe-timesheet | [] [] [] [] | 12
-+ gpe-today | [] [] [] [] [] | 13
-+ gpe-todo | [] [] [] [] | 12
-+ gphoto2 | [] [] [] | 11
-+ gprof | [] [] | 9
-+ gpsdrive | [] [] | 3
-+ gramadoir | [] | 5
-+ grep | [] [] [] [] | 26
-+ gretl | | 3
-+ gtick | | 7
-+ hello | [] [] [] [] [] | 34
-+ id-utils | [] [] | 12
-+ indent | [] [] [] [] | 21
-+ iso_3166 | [] [] [] [] [] [] [] | 27
-+ iso_3166_1 | [] [] [] | 16
-+ iso_3166_2 | | 0
-+ iso_3166_3 | | 2
-+ iso_4217 | [] [] [] [] [] [] | 24
-+ iso_639 | | 1
-+ jpilot | [] [] [] [] [] | 9
-+ jtag | [] | 2
-+ jwhois | () [] [] | 11
-+ kbd | [] [] | 11
-+ latrine | | 2
-+ ld | [] [] | 5
-+ libc | [] [] [] [] | 20
-+ libgpewidget | [] [] [] [] | 13
-+ libiconv | [] [] [] [] [] [] [] [] | 27
-+ lifelines | [] | 2
-+ lilypond | [] | 3
-+ lingoteach | | 2
-+ lingoteach_lessons | () | 0
-+ lynx | [] [] [] | 14
-+ m4 | [] [] | 15
-+ mailutils | | 5
-+ make | [] [] [] | 16
-+ man-db | [] | 5
-+ minicom | | 11
-+ mysecretdiary | [] [] | 10
-+ nano | [] [] [] [] | 17
-+ nano_1_0 | [] [] [] | 17
-+ opcodes | [] [] | 6
-+ parted | [] [] [] | 15
-+ ptx | [] [] | 22
-+ python | | 0
-+ radius | | 4
-+ recode | [] [] [] | 20
-+ rpm | [] [] | 9
-+ screem | [] [] | 2
-+ scrollkeeper | [] [] [] | 15
-+ sed | [] [] [] [] [] [] | 24
-+ sh-utils | [] [] | 14
-+ shared-mime-info | [] [] | 7
-+ sharutils | [] [] [] [] | 17
-+ silky | () | 3
-+ skencil | [] | 6
-+ sketch | [] | 6
-+ soundtracker | [] [] | 7
-+ sp | [] | 3
-+ tar | [] [] [] [] [] | 24
-+ texinfo | [] [] [] | 14
-+ textutils | [] [] [] [] | 16
-+ tin | | 1
-+ tp-robot | | 2
-+ tuxpaint | [] [] [] [] [] | 29
-+ unicode-han-tra... | | 0
-+ unicode-transla... | | 2
-+ util-linux | [] [] | 15
-+ vorbis-tools | | 8
-+ wastesedge | | 0
-+ wdiff | [] [] [] | 18
-+ wget | [] [] [] [] [] [] [] [] | 24
-+ xchat | [] [] [] [] [] | 15
-+ xfree86_xkb_xml | [] [] [] [] [] | 11
-+ xpad | | 5
-+ +-----------------------------------------------------+
-+ 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
-+ 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
-
- Some counters in the preceding matrix are higher than the number of
- visible blocks let us expect. This is because a few extra PO files are
-@@ -220,6 +742,27 @@
- lag between the mere existence a PO file and its wide availability in a
- distribution.
-
-- If August 1997 seems to be old, you may fetch a more recent copy of
--this `ABOUT-NLS' file on most GNU archive sites.
-+ If January 2004 seems to be old, you may fetch a more recent copy of
-+this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
-+matrix with full percentage details can be found at
-+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
-+
-+Using `gettext' in new packages
-+===============================
-+
-+If you are writing a freely available program and want to
-+internationalize it you are welcome to use GNU `gettext' in your
-+package. Of course you have to respect the GNU Library General Public
-+License which covers the use of the GNU `gettext' library. This means
-+in particular that even non-free programs can use `libintl' as a shared
-+library, whereas only free software can use `libintl' as a static
-+library or use modified versions of `libintl'.
-+
-+ Once the sources are changed appropriately and the setup can handle
-+the use of `gettext' the only thing missing are the translations. The
-+Free Translation Project is also available for packages which are not
-+developed inside the GNU project. Therefore the information given above
-+applies also for every other Free Software Project. Contact
-+`translation@iro.umontreal.ca' to make the `.pot' files available to
-+the translation teams.
-
---- lrzsz-0.12.20.safe/ChangeLog 1998-12-29 17:49:56.000000000 -0500
-+++ lrzsz-0.12.20/ChangeLog 2004-09-12 14:40:35.846521456 -0400
-@@ -1,3 +1,11 @@
-+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
-+
-+ * Makefile.am (ACLOCAL_AMFLAGS): New variable.
-+ (EXTRA_DIST): Add config.rpath.
-+ * configure.in (AC_OUTPUT): Add m4/Makefile.
-+ (AC_OUTPUT): Remove command that created po/Makefile.
-+ (AC_LINK_FILES): Remove invocation.
-+
- 1998-12-29 Uwe Ohse <uwe@ohse.de>
-
- * src/lrz.c: removed stpcpy call.
---- lrzsz-0.12.20.safe/config.rpath 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/config.rpath 2004-09-12 14:40:34.329752040 -0400
-@@ -0,0 +1,548 @@
-+#! /bin/sh
-+# Output a system dependent set of variables, describing how to set the
-+# run time search path of shared libraries in an executable.
-+#
-+# Copyright 1996-2003 Free Software Foundation, Inc.
-+# Taken from GNU libtool, 2001
-+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+#
-+# As a special exception to the GNU General Public License, if you
-+# distribute this file as part of a program that contains a
-+# configuration script generated by Autoconf, you may include it under
-+# the same distribution terms that you use for the rest of that program.
-+#
-+# The first argument passed to this file is the canonical host specification,
-+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-+# or
-+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
-+# should be set by the caller.
-+#
-+# The set of defined variables is at the end of this script.
-+
-+# Known limitations:
-+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
-+# than 256 bytes, otherwise the compiler driver will dump core. The only
-+# known workaround is to choose shorter directory names for the build
-+# directory and/or the installation directory.
-+
-+# All known linkers require a `.a' archive for static linking (except M$VC,
-+# which needs '.lib').
-+libext=a
-+shrext=.so
-+
-+host="$1"
-+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-+
-+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
-+
-+wl=
-+if test "$GCC" = yes; then
-+ wl='-Wl,'
-+else
-+ case "$host_os" in
-+ aix*)
-+ wl='-Wl,'
-+ ;;
-+ mingw* | pw32* | os2*)
-+ ;;
-+ hpux9* | hpux10* | hpux11*)
-+ wl='-Wl,'
-+ ;;
-+ irix5* | irix6* | nonstopux*)
-+ wl='-Wl,'
-+ ;;
-+ newsos6)
-+ ;;
-+ linux*)
-+ case $CC in
-+ icc|ecc)
-+ wl='-Wl,'
-+ ;;
-+ ccc)
-+ wl='-Wl,'
-+ ;;
-+ esac
-+ ;;
-+ osf3* | osf4* | osf5*)
-+ wl='-Wl,'
-+ ;;
-+ sco3.2v5*)
-+ ;;
-+ solaris*)
-+ wl='-Wl,'
-+ ;;
-+ sunos4*)
-+ wl='-Qoption ld '
-+ ;;
-+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-+ wl='-Wl,'
-+ ;;
-+ sysv4*MP*)
-+ ;;
-+ uts4*)
-+ ;;
-+ esac
-+fi
-+
-+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
-+
-+hardcode_libdir_flag_spec=
-+hardcode_libdir_separator=
-+hardcode_direct=no
-+hardcode_minus_L=no
-+
-+case "$host_os" in
-+ cygwin* | mingw* | pw32*)
-+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
-+ # When not using gcc, we currently assume that we are using
-+ # Microsoft Visual C++.
-+ if test "$GCC" != yes; then
-+ with_gnu_ld=no
-+ fi
-+ ;;
-+ openbsd*)
-+ with_gnu_ld=no
-+ ;;
-+esac
-+
-+ld_shlibs=yes
-+if test "$with_gnu_ld" = yes; then
-+ case "$host_os" in
-+ aix3* | aix4* | aix5*)
-+ # On AIX/PPC, the GNU linker is very broken
-+ if test "$host_cpu" != ia64; then
-+ ld_shlibs=no
-+ fi
-+ ;;
-+ amigaos*)
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ hardcode_minus_L=yes
-+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-+ # that the semantics of dynamic libraries on AmigaOS, at least up
-+ # to version 4, is to share data among multiple programs linked
-+ # with the same dynamic library. Since this doesn't match the
-+ # behavior of shared libraries on other platforms, we can use
-+ # them.
-+ ld_shlibs=no
-+ ;;
-+ beos*)
-+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-+ :
-+ else
-+ ld_shlibs=no
-+ fi
-+ ;;
-+ cygwin* | mingw* | pw32*)
-+ # hardcode_libdir_flag_spec is actually meaningless, as there is
-+ # no search path for DLLs.
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-+ :
-+ else
-+ ld_shlibs=no
-+ fi
-+ ;;
-+ netbsd*)
-+ ;;
-+ solaris* | sysv5*)
-+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-+ ld_shlibs=no
-+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-+ :
-+ else
-+ ld_shlibs=no
-+ fi
-+ ;;
-+ sunos4*)
-+ hardcode_direct=yes
-+ ;;
-+ *)
-+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-+ :
-+ else
-+ ld_shlibs=no
-+ fi
-+ ;;
-+ esac
-+ if test "$ld_shlibs" = yes; then
-+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
-+ # option of GNU ld is called -rpath, not --rpath.
-+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-+ fi
-+else
-+ case "$host_os" in
-+ aix3*)
-+ # Note: this linker hardcodes the directories in LIBPATH if there
-+ # are no directories specified by -L.
-+ hardcode_minus_L=yes
-+ if test "$GCC" = yes; then
-+ # Neither direct hardcoding nor static linking is supported with a
-+ # broken collect2.
-+ hardcode_direct=unsupported
-+ fi
-+ ;;
-+ aix4* | aix5*)
-+ if test "$host_cpu" = ia64; then
-+ # On IA64, the linker does run time linking by default, so we don't
-+ # have to do anything special.
-+ aix_use_runtimelinking=no
-+ else
-+ aix_use_runtimelinking=no
-+ # Test if we are trying to use run time linking or normal
-+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-+ # need to do runtime linking.
-+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-+ for ld_flag in $LDFLAGS; do
-+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-+ aix_use_runtimelinking=yes
-+ break
-+ fi
-+ done
-+ esac
-+ fi
-+ hardcode_direct=yes
-+ hardcode_libdir_separator=':'
-+ if test "$GCC" = yes; then
-+ case $host_os in aix4.[012]|aix4.[012].*)
-+ collect2name=`${CC} -print-prog-name=collect2`
-+ if test -f "$collect2name" && \
-+ strings "$collect2name" | grep resolve_lib_name >/dev/null
-+ then
-+ # We have reworked collect2
-+ hardcode_direct=yes
-+ else
-+ # We have old collect2
-+ hardcode_direct=unsupported
-+ hardcode_minus_L=yes
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ hardcode_libdir_separator=
-+ fi
-+ esac
-+ fi
-+ # Begin _LT_AC_SYS_LIBPATH_AIX.
-+ echo 'int main () { return 0; }' > conftest.c
-+ ${CC} ${LDFLAGS} conftest.c -o conftest
-+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-+}'`
-+ if test -z "$aix_libpath"; then
-+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-+}'`
-+ fi
-+ if test -z "$aix_libpath"; then
-+ aix_libpath="/usr/lib:/lib"
-+ fi
-+ rm -f conftest.c conftest
-+ # End _LT_AC_SYS_LIBPATH_AIX.
-+ if test "$aix_use_runtimelinking" = yes; then
-+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-+ else
-+ if test "$host_cpu" = ia64; then
-+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-+ else
-+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-+ fi
-+ fi
-+ ;;
-+ amigaos*)
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ hardcode_minus_L=yes
-+ # see comment about different semantics on the GNU ld section
-+ ld_shlibs=no
-+ ;;
-+ bsdi4*)
-+ ;;
-+ cygwin* | mingw* | pw32*)
-+ # When not using gcc, we currently assume that we are using
-+ # Microsoft Visual C++.
-+ # hardcode_libdir_flag_spec is actually meaningless, as there is
-+ # no search path for DLLs.
-+ hardcode_libdir_flag_spec=' '
-+ libext=lib
-+ ;;
-+ darwin* | rhapsody*)
-+ if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
-+ hardcode_direct=no
-+ fi
-+ ;;
-+ dgux*)
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ ;;
-+ freebsd1*)
-+ ld_shlibs=no
-+ ;;
-+ freebsd2.2*)
-+ hardcode_libdir_flag_spec='-R$libdir'
-+ hardcode_direct=yes
-+ ;;
-+ freebsd2*)
-+ hardcode_direct=yes
-+ hardcode_minus_L=yes
-+ ;;
-+ freebsd*)
-+ hardcode_libdir_flag_spec='-R$libdir'
-+ hardcode_direct=yes
-+ ;;
-+ hpux9*)
-+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-+ hardcode_libdir_separator=:
-+ hardcode_direct=yes
-+ # hardcode_minus_L: Not really in the search PATH,
-+ # but as the default location of the library.
-+ hardcode_minus_L=yes
-+ ;;
-+ hpux10* | hpux11*)
-+ if test "$with_gnu_ld" = no; then
-+ case "$host_cpu" in
-+ hppa*64*)
-+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-+ hardcode_libdir_separator=:
-+ hardcode_direct=no
-+ ;;
-+ ia64*)
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ hardcode_direct=no
-+ # hardcode_minus_L: Not really in the search PATH,
-+ # but as the default location of the library.
-+ hardcode_minus_L=yes
-+ ;;
-+ *)
-+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-+ hardcode_libdir_separator=:
-+ hardcode_direct=yes
-+ # hardcode_minus_L: Not really in the search PATH,
-+ # but as the default location of the library.
-+ hardcode_minus_L=yes
-+ ;;
-+ esac
-+ fi
-+ ;;
-+ irix5* | irix6* | nonstopux*)
-+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-+ hardcode_libdir_separator=:
-+ ;;
-+ netbsd*)
-+ hardcode_libdir_flag_spec='-R$libdir'
-+ hardcode_direct=yes
-+ ;;
-+ newsos6)
-+ hardcode_direct=yes
-+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-+ hardcode_libdir_separator=:
-+ ;;
-+ openbsd*)
-+ hardcode_direct=yes
-+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-+ else
-+ case "$host_os" in
-+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-+ hardcode_libdir_flag_spec='-R$libdir'
-+ ;;
-+ *)
-+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-+ ;;
-+ esac
-+ fi
-+ ;;
-+ os2*)
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ hardcode_minus_L=yes
-+ ;;
-+ osf3*)
-+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-+ hardcode_libdir_separator=:
-+ ;;
-+ osf4* | osf5*)
-+ if test "$GCC" = yes; then
-+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-+ else
-+ # Both cc and cxx compiler support -rpath directly
-+ hardcode_libdir_flag_spec='-rpath $libdir'
-+ fi
-+ hardcode_libdir_separator=:
-+ ;;
-+ sco3.2v5*)
-+ ;;
-+ solaris*)
-+ hardcode_libdir_flag_spec='-R$libdir'
-+ ;;
-+ sunos4*)
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ hardcode_direct=yes
-+ hardcode_minus_L=yes
-+ ;;
-+ sysv4)
-+ case $host_vendor in
-+ sni)
-+ hardcode_direct=yes # is this really true???
-+ ;;
-+ siemens)
-+ hardcode_direct=no
-+ ;;
-+ motorola)
-+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-+ ;;
-+ esac
-+ ;;
-+ sysv4.3*)
-+ ;;
-+ sysv4*MP*)
-+ if test -d /usr/nec; then
-+ ld_shlibs=yes
-+ fi
-+ ;;
-+ sysv4.2uw2*)
-+ hardcode_direct=yes
-+ hardcode_minus_L=no
-+ ;;
-+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
-+ ;;
-+ sysv5*)
-+ hardcode_libdir_flag_spec=
-+ ;;
-+ uts4*)
-+ hardcode_libdir_flag_spec='-L$libdir'
-+ ;;
-+ *)
-+ ld_shlibs=no
-+ ;;
-+ esac
-+fi
-+
-+# Check dynamic linker characteristics
-+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
-+libname_spec='lib$name'
-+case "$host_os" in
-+ aix3*)
-+ ;;
-+ aix4* | aix5*)
-+ ;;
-+ amigaos*)
-+ ;;
-+ beos*)
-+ ;;
-+ bsdi4*)
-+ ;;
-+ cygwin* | mingw* | pw32*)
-+ shrext=.dll
-+ ;;
-+ darwin* | rhapsody*)
-+ shrext=.dylib
-+ ;;
-+ dgux*)
-+ ;;
-+ freebsd1*)
-+ ;;
-+ freebsd*)
-+ ;;
-+ gnu*)
-+ ;;
-+ hpux9* | hpux10* | hpux11*)
-+ case "$host_cpu" in
-+ ia64*)
-+ shrext=.so
-+ ;;
-+ hppa*64*)
-+ shrext=.sl
-+ ;;
-+ *)
-+ shrext=.sl
-+ ;;
-+ esac
-+ ;;
-+ irix5* | irix6* | nonstopux*)
-+ case "$host_os" in
-+ irix5* | nonstopux*)
-+ libsuff= shlibsuff=
-+ ;;
-+ *)
-+ case $LD in
-+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
-+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
-+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
-+ *) libsuff= shlibsuff= ;;
-+ esac
-+ ;;
-+ esac
-+ ;;
-+ linux*oldld* | linux*aout* | linux*coff*)
-+ ;;
-+ linux*)
-+ ;;
-+ netbsd*)
-+ ;;
-+ newsos6)
-+ ;;
-+ nto-qnx)
-+ ;;
-+ openbsd*)
-+ ;;
-+ os2*)
-+ libname_spec='$name'
-+ shrext=.dll
-+ ;;
-+ osf3* | osf4* | osf5*)
-+ ;;
-+ sco3.2v5*)
-+ ;;
-+ solaris*)
-+ ;;
-+ sunos4*)
-+ ;;
-+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-+ ;;
-+ sysv4*MP*)
-+ ;;
-+ uts4*)
-+ ;;
-+esac
-+
-+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
-+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-+
-+sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-+
-+# How to pass a linker flag through the compiler.
-+wl="$escaped_wl"
-+
-+# Static library suffix (normally "a").
-+libext="$libext"
-+
-+# Shared library suffix (normally "so").
-+shlibext="$shlibext"
-+
-+# Flag to hardcode \$libdir into a binary during linking.
-+# This must work even if \$libdir does not exist.
-+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
-+
-+# Whether we need a single -rpath flag with a separated argument.
-+hardcode_libdir_separator="$hardcode_libdir_separator"
-+
-+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-+# resulting binary.
-+hardcode_direct="$hardcode_direct"
-+
-+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-+# resulting binary.
-+hardcode_minus_L="$hardcode_minus_L"
-+
-+EOF
---- lrzsz-0.12.20.safe/configure.in 2004-09-12 14:39:55.161706488 -0400
-+++ lrzsz-0.12.20/configure.in 2004-09-12 14:40:35.816526016 -0400
-@@ -260,11 +260,10 @@
- AM_GNU_GETTEXT
-
- AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
--AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
-
--AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \
-+AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile m4/Makefile \
- man/Makefile po/Makefile.in src/Makefile debian/rules Specfile systype \
- src/lrzszbug],
--[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile;
-+[
- chmod +x debian/rules;
- test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
---- lrzsz-0.12.20.safe/intl/bindtextdom.c 1998-04-26 09:22:36.000000000 -0400
-+++ lrzsz-0.12.20/intl/bindtextdom.c 2004-09-12 14:40:34.343749912 -0400
-@@ -1,59 +1,75 @@
- /* Implementation of the bindtextdomain(3) function
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
--#if defined STDC_HEADERS || defined _LIBC
--# include <stdlib.h>
--#else
--# ifdef HAVE_MALLOC_H
--# include <malloc.h>
--# else
--void free ();
--# endif
--#endif
-+#include <stddef.h>
-+#include <stdlib.h>
-+#include <string.h>
-
--#if defined HAVE_STRING_H || defined _LIBC
--# include <string.h>
-+#ifdef _LIBC
-+# include <libintl.h>
- #else
--# include <strings.h>
--# ifndef memcpy
--# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
--# endif
-+# include "libgnuintl.h"
- #endif
-+#include "gettextP.h"
-
- #ifdef _LIBC
--# include <libintl.h>
-+/* We have to handle multi-threaded applications. */
-+# include <bits/libc-lock.h>
- #else
--# include "libgettext.h"
-+/* Provide dummy implementation if this is outside glibc. */
-+# define __libc_rwlock_define(CLASS, NAME)
-+# define __libc_rwlock_wrlock(NAME)
-+# define __libc_rwlock_unlock(NAME)
-+#endif
-+
-+/* The internal variables in the standalone libintl.a must have different
-+ names than the internal variables in GNU libc, otherwise programs
-+ using libintl.a cannot be linked statically. */
-+#if !defined _LIBC
-+# define _nl_default_dirname libintl_nl_default_dirname
-+# define _nl_domain_bindings libintl_nl_domain_bindings
-+#endif
-+
-+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
-+#ifndef offsetof
-+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
- #endif
--#include "gettext.h"
--#include "gettextP.h"
-
- /* @@ end of prolog @@ */
-
- /* Contains the default location of the message catalogs. */
- extern const char _nl_default_dirname[];
-+#ifdef _LIBC
-+extern const char _nl_default_dirname_internal[] attribute_hidden;
-+#else
-+# define INTUSE(name) name
-+#endif
-
- /* List with bindings of specific domains. */
- extern struct binding *_nl_domain_bindings;
-
-+/* Lock variable to protect the global data in the gettext implementation. */
-+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
-+
-
- /* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
-@@ -61,23 +77,41 @@
- prefix. So we have to make a difference here. */
- #ifdef _LIBC
- # define BINDTEXTDOMAIN __bindtextdomain
--# define strdup(str) __strdup (str)
-+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
-+# ifndef strdup
-+# define strdup(str) __strdup (str)
-+# endif
- #else
--# define BINDTEXTDOMAIN bindtextdomain__
-+# define BINDTEXTDOMAIN libintl_bindtextdomain
-+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
- #endif
-
--/* Specify that the DOMAINNAME message catalog will be found
-- in DIRNAME rather than in the system locale data base. */
--char *
--BINDTEXTDOMAIN (domainname, dirname)
-- const char *domainname;
-- const char *dirname;
-+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
-+ to be used for the DOMAINNAME message catalog.
-+ If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
-+ modified, only the current value is returned.
-+ If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
-+ modified nor returned. */
-+static void
-+set_binding_values (const char *domainname,
-+ const char **dirnamep, const char **codesetp)
- {
- struct binding *binding;
-+ int modified;
-
- /* Some sanity checks. */
- if (domainname == NULL || domainname[0] == '\0')
-- return NULL;
-+ {
-+ if (dirnamep)
-+ *dirnamep = NULL;
-+ if (codesetp)
-+ *codesetp = NULL;
-+ return;
-+ }
-+
-+ __libc_rwlock_wrlock (_nl_state_lock);
-+
-+ modified = 0;
-
- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
- {
-@@ -93,81 +127,173 @@
- }
- }
-
-- if (dirname == NULL)
-- /* The current binding has be to returned. */
-- return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
--
- if (binding != NULL)
- {
-- /* The domain is already bound. If the new value and the old
-- one are equal we simply do nothing. Otherwise replace the
-- old binding. */
-- if (strcmp (dirname, binding->dirname) != 0)
-+ if (dirnamep)
- {
-- char *new_dirname;
-+ const char *dirname = *dirnamep;
-
-- if (strcmp (dirname, _nl_default_dirname) == 0)
-- new_dirname = (char *) _nl_default_dirname;
-+ if (dirname == NULL)
-+ /* The current binding has be to returned. */
-+ *dirnamep = binding->dirname;
- else
- {
-+ /* The domain is already bound. If the new value and the old
-+ one are equal we simply do nothing. Otherwise replace the
-+ old binding. */
-+ char *result = binding->dirname;
-+ if (strcmp (dirname, result) != 0)
-+ {
-+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
-+ result = (char *) INTUSE(_nl_default_dirname);
-+ else
-+ {
- #if defined _LIBC || defined HAVE_STRDUP
-- new_dirname = strdup (dirname);
-- if (new_dirname == NULL)
-- return NULL;
-+ result = strdup (dirname);
- #else
-- size_t len = strlen (dirname) + 1;
-- new_dirname = (char *) malloc (len);
-- if (new_dirname == NULL)
-- return NULL;
--
-- memcpy (new_dirname, dirname, len);
-+ size_t len = strlen (dirname) + 1;
-+ result = (char *) malloc (len);
-+ if (__builtin_expect (result != NULL, 1))
-+ memcpy (result, dirname, len);
- #endif
-+ }
-+
-+ if (__builtin_expect (result != NULL, 1))
-+ {
-+ if (binding->dirname != INTUSE(_nl_default_dirname))
-+ free (binding->dirname);
-+
-+ binding->dirname = result;
-+ modified = 1;
-+ }
-+ }
-+ *dirnamep = result;
- }
-+ }
-
-- if (binding->dirname != _nl_default_dirname)
-- free (binding->dirname);
-+ if (codesetp)
-+ {
-+ const char *codeset = *codesetp;
-
-- binding->dirname = new_dirname;
-+ if (codeset == NULL)
-+ /* The current binding has be to returned. */
-+ *codesetp = binding->codeset;
-+ else
-+ {
-+ /* The domain is already bound. If the new value and the old
-+ one are equal we simply do nothing. Otherwise replace the
-+ old binding. */
-+ char *result = binding->codeset;
-+ if (result == NULL || strcmp (codeset, result) != 0)
-+ {
-+#if defined _LIBC || defined HAVE_STRDUP
-+ result = strdup (codeset);
-+#else
-+ size_t len = strlen (codeset) + 1;
-+ result = (char *) malloc (len);
-+ if (__builtin_expect (result != NULL, 1))
-+ memcpy (result, codeset, len);
-+#endif
-+
-+ if (__builtin_expect (result != NULL, 1))
-+ {
-+ if (binding->codeset != NULL)
-+ free (binding->codeset);
-+
-+ binding->codeset = result;
-+ binding->codeset_cntr++;
-+ modified = 1;
-+ }
-+ }
-+ *codesetp = result;
-+ }
- }
- }
-+ else if ((dirnamep == NULL || *dirnamep == NULL)
-+ && (codesetp == NULL || *codesetp == NULL))
-+ {
-+ /* Simply return the default values. */
-+ if (dirnamep)
-+ *dirnamep = INTUSE(_nl_default_dirname);
-+ if (codesetp)
-+ *codesetp = NULL;
-+ }
- else
- {
- /* We have to create a new binding. */
-- size_t len;
-+ size_t len = strlen (domainname) + 1;
- struct binding *new_binding =
-- (struct binding *) malloc (sizeof (*new_binding));
-+ (struct binding *) malloc (offsetof (struct binding, domainname) + len);
-
-- if (new_binding == NULL)
-- return NULL;
-+ if (__builtin_expect (new_binding == NULL, 0))
-+ goto failed;
-
-+ memcpy (new_binding->domainname, domainname, len);
-+
-+ if (dirnamep)
-+ {
-+ const char *dirname = *dirnamep;
-+
-+ if (dirname == NULL)
-+ /* The default value. */
-+ dirname = INTUSE(_nl_default_dirname);
-+ else
-+ {
-+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
-+ dirname = INTUSE(_nl_default_dirname);
-+ else
-+ {
-+ char *result;
- #if defined _LIBC || defined HAVE_STRDUP
-- new_binding->domainname = strdup (domainname);
-- if (new_binding->domainname == NULL)
-- return NULL;
-+ result = strdup (dirname);
-+ if (__builtin_expect (result == NULL, 0))
-+ goto failed_dirname;
- #else
-- len = strlen (domainname) + 1;
-- new_binding->domainname = (char *) malloc (len);
-- if (new_binding->domainname == NULL)
-- return NULL;
-- memcpy (new_binding->domainname, domainname, len);
-+ size_t len = strlen (dirname) + 1;
-+ result = (char *) malloc (len);
-+ if (__builtin_expect (result == NULL, 0))
-+ goto failed_dirname;
-+ memcpy (result, dirname, len);
- #endif
--
-- if (strcmp (dirname, _nl_default_dirname) == 0)
-- new_binding->dirname = (char *) _nl_default_dirname;
-+ dirname = result;
-+ }
-+ }
-+ *dirnamep = dirname;
-+ new_binding->dirname = (char *) dirname;
-+ }
- else
-+ /* The default value. */
-+ new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
-+
-+ new_binding->codeset_cntr = 0;
-+
-+ if (codesetp)
- {
-+ const char *codeset = *codesetp;
-+
-+ if (codeset != NULL)
-+ {
-+ char *result;
-+
- #if defined _LIBC || defined HAVE_STRDUP
-- new_binding->dirname = strdup (dirname);
-- if (new_binding->dirname == NULL)
-- return NULL;
-+ result = strdup (codeset);
-+ if (__builtin_expect (result == NULL, 0))
-+ goto failed_codeset;
- #else
-- len = strlen (dirname) + 1;
-- new_binding->dirname = (char *) malloc (len);
-- if (new_binding->dirname == NULL)
-- return NULL;
-- memcpy (new_binding->dirname, dirname, len);
-+ size_t len = strlen (codeset) + 1;
-+ result = (char *) malloc (len);
-+ if (__builtin_expect (result == NULL, 0))
-+ goto failed_codeset;
-+ memcpy (result, codeset, len);
- #endif
-+ codeset = result;
-+ new_binding->codeset_cntr++;
-+ }
-+ *codesetp = codeset;
-+ new_binding->codeset = (char *) codeset;
- }
-+ else
-+ new_binding->codeset = NULL;
-
- /* Now enqueue it. */
- if (_nl_domain_bindings == NULL
-@@ -187,13 +313,51 @@
- binding->next = new_binding;
- }
-
-- binding = new_binding;
-+ modified = 1;
-+
-+ /* Here we deal with memory allocation failures. */
-+ if (0)
-+ {
-+ failed_codeset:
-+ if (new_binding->dirname != INTUSE(_nl_default_dirname))
-+ free (new_binding->dirname);
-+ failed_dirname:
-+ free (new_binding);
-+ failed:
-+ if (dirnamep)
-+ *dirnamep = NULL;
-+ if (codesetp)
-+ *codesetp = NULL;
-+ }
- }
-
-- return binding->dirname;
-+ /* If we modified any binding, we flush the caches. */
-+ if (modified)
-+ ++_nl_msg_cat_cntr;
-+
-+ __libc_rwlock_unlock (_nl_state_lock);
-+}
-+
-+/* Specify that the DOMAINNAME message catalog will be found
-+ in DIRNAME rather than in the system locale data base. */
-+char *
-+BINDTEXTDOMAIN (const char *domainname, const char *dirname)
-+{
-+ set_binding_values (domainname, &dirname, NULL);
-+ return (char *) dirname;
-+}
-+
-+/* Specify the character encoding in which the messages from the
-+ DOMAINNAME message catalog will be returned. */
-+char *
-+BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
-+{
-+ set_binding_values (domainname, NULL, &codeset);
-+ return (char *) codeset;
- }
-
- #ifdef _LIBC
--/* Alias for function name in GNU C Library. */
-+/* Aliases for function names in GNU C Library. */
- weak_alias (__bindtextdomain, bindtextdomain);
-+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
- #endif
---- lrzsz-0.12.20.safe/intl/cat-compat.c 1998-04-26 09:22:37.000000000 -0400
-+++ lrzsz-0.12.20/intl/cat-compat.c 1969-12-31 19:00:00.000000000 -0500
-@@ -1,262 +0,0 @@
--/* Compatibility code for gettext-using-catgets interface.
-- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <stdio.h>
--
--#ifdef STDC_HEADERS
--# include <stdlib.h>
--# include <string.h>
--#else
--char *getenv ();
--# ifdef HAVE_MALLOC_H
--# include <malloc.h>
--# endif
--#endif
--
--#ifdef HAVE_NL_TYPES_H
--# include <nl_types.h>
--#endif
--
--#include "libgettext.h"
--
--/* @@ end of prolog @@ */
--
--/* XPG3 defines the result of `setlocale (category, NULL)' as:
-- ``Directs `setlocale()' to query `category' and return the current
-- setting of `local'.''
-- However it does not specify the exact format. And even worse: POSIX
-- defines this not at all. So we can use this feature only on selected
-- system (e.g. those using GNU C Library). */
--#ifdef _LIBC
--# define HAVE_LOCALE_NULL
--#endif
--
--/* The catalog descriptor. */
--static nl_catd catalog = (nl_catd) -1;
--
--/* Name of the default catalog. */
--static const char default_catalog_name[] = "messages";
--
--/* Name of currently used catalog. */
--static const char *catalog_name = default_catalog_name;
--
--/* Get ID for given string. If not found return -1. */
--static int msg_to_cat_id PARAMS ((const char *msg));
--
--/* Substitution for systems lacking this function in their C library. */
--#if !_LIBC && !HAVE_STPCPY
--static char *stpcpy PARAMS ((char *dest, const char *src));
--#endif
--
--
--/* Set currently used domain/catalog. */
--char *
--textdomain (domainname)
-- const char *domainname;
--{
-- nl_catd new_catalog;
-- char *new_name;
-- size_t new_name_len;
-- char *lang;
--
--#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
-- && defined HAVE_LOCALE_NULL
-- lang = setlocale (LC_MESSAGES, NULL);
--#else
-- lang = getenv ("LC_ALL");
-- if (lang == NULL || lang[0] == '\0')
-- {
-- lang = getenv ("LC_MESSAGES");
-- if (lang == NULL || lang[0] == '\0')
-- lang = getenv ("LANG");
-- }
--#endif
-- if (lang == NULL || lang[0] == '\0')
-- lang = "C";
--
-- /* See whether name of currently used domain is asked. */
-- if (domainname == NULL)
-- return (char *) catalog_name;
--
-- if (domainname[0] == '\0')
-- domainname = default_catalog_name;
--
-- /* Compute length of added path element. */
-- new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
-- + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
-- + sizeof (".cat");
--
-- new_name = (char *) malloc (new_name_len);
-- if (new_name == NULL)
-- return NULL;
--
-- strcpy (new_name, PACKAGE);
-- new_catalog = catopen (new_name, 0);
--
-- if (new_catalog == (nl_catd) -1)
-- {
-- /* NLSPATH search didn't work, try absolute path */
-- sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
-- PACKAGE);
-- new_catalog = catopen (new_name, 0);
--
-- if (new_catalog == (nl_catd) -1)
-- {
-- free (new_name);
-- return (char *) catalog_name;
-- }
-- }
--
-- /* Close old catalog. */
-- if (catalog != (nl_catd) -1)
-- catclose (catalog);
-- if (catalog_name != default_catalog_name)
-- free ((char *) catalog_name);
--
-- catalog = new_catalog;
-- catalog_name = new_name;
--
-- return (char *) catalog_name;
--}
--
--char *
--bindtextdomain (domainname, dirname)
-- const char *domainname;
-- const char *dirname;
--{
--#if HAVE_SETENV || HAVE_PUTENV
-- char *old_val, *new_val, *cp;
-- size_t new_val_len;
--
-- /* This does not make much sense here but to be compatible do it. */
-- if (domainname == NULL)
-- return NULL;
--
-- /* Compute length of added path element. If we use setenv we don't need
-- the first byts for NLSPATH=, but why complicate the code for this
-- peanuts. */
-- new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
-- + sizeof ("/%L/LC_MESSAGES/%N.cat");
--
-- old_val = getenv ("NLSPATH");
-- if (old_val == NULL || old_val[0] == '\0')
-- {
-- old_val = NULL;
-- new_val_len += 1 + sizeof (LOCALEDIR) - 1
-- + sizeof ("/%L/LC_MESSAGES/%N.cat");
-- }
-- else
-- new_val_len += strlen (old_val);
--
-- new_val = (char *) malloc (new_val_len);
-- if (new_val == NULL)
-- return NULL;
--
--# if HAVE_SETENV
-- cp = new_val;
--# else
-- cp = stpcpy (new_val, "NLSPATH=");
--# endif
--
-- cp = stpcpy (cp, dirname);
-- cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
--
-- if (old_val == NULL)
-- {
--# if __STDC__
-- stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
--# else
--
-- cp = stpcpy (cp, LOCALEDIR);
-- stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
--# endif
-- }
-- else
-- stpcpy (cp, old_val);
--
--# if HAVE_SETENV
-- setenv ("NLSPATH", new_val, 1);
-- free (new_val);
--# else
-- putenv (new_val);
-- /* Do *not* free the environment entry we just entered. It is used
-- from now on. */
--# endif
--
--#endif
--
-- return (char *) domainname;
--}
--
--#undef gettext
--char *
--gettext (msg)
-- const char *msg;
--{
-- int msgid;
--
-- if (msg == NULL || catalog == (nl_catd) -1)
-- return (char *) msg;
--
-- /* Get the message from the catalog. We always use set number 1.
-- The message ID is computed by the function `msg_to_cat_id'
-- which works on the table generated by `po-to-tbl'. */
-- msgid = msg_to_cat_id (msg);
-- if (msgid == -1)
-- return (char *) msg;
--
-- return catgets (catalog, 1, msgid, (char *) msg);
--}
--
--/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
-- for the one equal to msg. If it is found return the ID. In case when
-- the string is not found return -1. */
--static int
--msg_to_cat_id (msg)
-- const char *msg;
--{
-- int cnt;
--
-- for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
-- if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
-- return _msg_tbl[cnt]._msg_number;
--
-- return -1;
--}
--
--
--/* @@ begin of epilog @@ */
--
--/* We don't want libintl.a to depend on any other library. So we
-- avoid the non-standard function stpcpy. In GNU C Library this
-- function is available, though. Also allow the symbol HAVE_STPCPY
-- to be defined. */
--#if !_LIBC && !HAVE_STPCPY
--static char *
--stpcpy (dest, src)
-- char *dest;
-- const char *src;
--{
-- while ((*dest++ = *src++) != '\0')
-- /* Do nothing. */ ;
-- return dest - 1;
--}
--#endif
---- lrzsz-0.12.20.safe/intl/ChangeLog 1998-04-26 09:22:35.000000000 -0400
-+++ lrzsz-0.12.20/intl/ChangeLog 2004-09-12 14:40:34.349749000 -0400
-@@ -1,1022 +1,4 @@
--1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com>
--
-- * intlh.inst.in: Reformat copyright.
--
--1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com>
--
-- * dcgettext.c (DCGETTEXT): Remove wrong comment.
--
--1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
--
-- * Makefile.in (install-data): Don't change directory to install.
--
--1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com>
--
-- * cat-compat.c: Fix copyright.
--
-- * localealias.c: Don't define strchr unless !HAVE_STRCHR.
--
-- * loadmsgcat.c: Update copyright. Fix typos.
--
-- * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
-- (_nl_make_l10nflist): Handle sponsor and revision correctly.
--
-- * gettext.c: Update copyright.
-- * gettext.h: Likewise.
-- * hash-string.h: Likewise.
--
-- * finddomain.c: Remoave dead code. Define strchr only if
-- !HAVE_STRCHR.
--
-- * explodename.c: Include <sys/types.h>.
--
-- * explodename.c: Reformat copyright text.
-- (_nl_explode_name): Fix typo.
--
-- * dcgettext.c: Define and use __set_errno.
-- (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
-- not defined.
--
-- * bindtextdom.c: Pretty printing.
--
--1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com>
--
-- * dcgettext.c (guess_category_value): Don't depend on
-- HAVE_LC_MESSAGES. We don't need the macro here.
-- Patch by Bruno Haible <haible@ilog.fr>.
--
-- * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
-- macro. Instead use HAVE_LOCALE_NULL and define it when using
-- glibc, as in dcgettext.c.
-- Patch by Bruno Haible <haible@ilog.fr>.
--
-- * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
-- Pinard.
--
--Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com>
--
-- * Makefile.in: Implement handling of libtool.
--
-- * gettextP.h: Change data structures for use of generic lowlevel
-- i18n file handling.
--
--Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * textdomain.c: Put parentheses around arguments of memcpy macro
-- definition.
-- * localealias.c: Likewise.
-- * l10nflist.c: Likewise.
-- * finddomain.c: Likewise.
-- * bindtextdom.c: Likewise.
-- Reported by Thomas Esken.
--
--Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * textdomain.c: Move definition of `memcpy` macro to right
-- position.
--
--Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
-- bcopy if not already defined. Reported by Thomas Esken.
-- * bindtextdom.c: Likewise.
-- * l10nflist.c: Likewise.
-- * localealias.c: Likewise.
-- * textdomain.c: Likewise.
--
--Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * Makefile.in (libdir): Change to use exec_prefix instead of
-- prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>.
--
--Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
-- so don't prepend uppercase `ISO' for only numeric arg.
--
--Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
-- definition of _GNU_SOURCE. Patch by Roland McGrath.
--
-- * Makefile.in (uninstall): Fix another bug with `for' loop and
-- empty arguments. Patch by Jim Meyering. Correct name os
-- uninstalled files: no intl- prefix anymore.
--
-- * Makefile.in (install-data): Again work around shells which
-- cannot handle mpty for list. Reported by Jim Meyering.
--
--Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * Makefile.in (install): Split goal. Now depend on install-exec
-- and install-data.
-- (install-exec, install-data): New goals. Created from former
-- install goal.
-- Reported by Karl Berry.
--
--Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * Makefile.in (MKINSTALLDIRS): New variable. Path to
-- mkinstalldirs script.
-- (install): use MKINSTALLDIRS variable or if the script is not present
-- try to find it in the $top_scrdir).
--
--Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * l10nflist.c: Linux libc *partly* includes the argz_* functions.
-- Grr. Work around by renaming the static version and use macros
-- for renaming.
--
--Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * l10nflist.c: Correct presence test macros of __argz_* functions.
--
-- * l10nflist.c: Include <argz.h> based on test of it instead when
-- __argz_* functions are available.
-- Reported by Andreas Schwab.
--
--Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * explodename.c, l10nflist.c: Define NULL for dumb systems.
--
--Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
-- result to __result to prevent name clash.
--
-- * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
-- get prototype for stpcpy and strcasecmp.
--
-- * intlh.inst.in, libgettext.h: Move declaration of
-- `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
-- from gcc's -Wnested-extern option.
--
--Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * Makefile.in (install): Remove comment.
--
--Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * Makefile.in (install): Work around for another Buglix stupidity.
-- Always use an `else' close for `if's. Reported by Nelson Beebe.
--
-- * Makefile.in (intlh.inst): Correct typo in phony rule.
-- Reported by Nelson Beebe.
--
--Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * dcgettext.c (read_alias_file): Rename variable alloca_list to
-- block_list as the macro calls assume.
-- Patch by Eric Backus.
--
-- * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
-- malloc.
-- (read_alias_file): Rename varriabe alloca_list to block_list as the
-- macro calls assume.
-- Patch by Eric Backus.
--
-- * l10nflist.c: Correct conditional for <argz.h> inclusion.
-- Reported by Roland McGrath.
--
-- * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
-- all-@USE_NLS@.
--
-- * Makefile.in (install): intlh.inst comes from local dir, not
-- $(srcdir).
--
-- * Makefile.in (intlh.inst): Special handling of this goal. If
-- used in gettext, this is really a rul to construct this file. If
-- used in any other package it is defined as a .PHONY rule with
-- empty body.
--
-- * finddomain.c: Extract locale file information handling into
-- l10nfile.c. Rename local stpcpy__ function to stpcpy.
--
-- * dcgettext.c (stpcpy): Add local definition.
--
-- * l10nflist.c: Solve some portability problems. Patches partly by
-- Thomas Esken. Add local definition of stpcpy.
--
--Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * intlh.inst.in: Don't depend including <locale.h> on
-- HAVE_LOCALE_H. Instead configure must rewrite this fiile
-- depending on the result of the configure run.
--
-- * Makefile.in (install): libintl.inst is now called intlh.inst.
-- Add rules for updating intlh.inst from intlh.inst.in.
--
-- * libintl.inst: Renamed to intlh.inst.in.
--
-- * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
-- because gcc has __buitlin_alloca.
-- Reported by Roland McGrath.
--
--Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * Makefile.in (installcheck): New goal to fulfill needs of
-- automake's distcheck.
--
-- * Makefile.in (install): Reorder commands so that VERSION is
-- found.
--
-- * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
-- @datadir@/gettext.
-- (COMSRCS): Add l10nfile.c.
-- (OBJECTS): Add l10nfile.o.
-- (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
-- (DISTFILE.gettext): Remove $(DISTFILES.common).
-- (all-gettext): Remove goal.
-- (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
-- package but gettext itself should install libintl.h + headers.
-- (dist): Extend goal to work for gettext, too.
-- (dist-gettext): Remove goal.
--
-- * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
--
--Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
-- find_l10nfile.
--
--Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com>
--
-- * l10nflist.c (__argz_next): Add definition.
--
-- * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
-- code. Use new l10nfile handling.
--
-- * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
-- alloca code.
--
-- * l10nflist.c: Initial revision.
--
--Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (all-gettext): New goal. Same as all-yes.
--
--Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de>
--
-- * Makefile.in (gettextsrcdir): Define using @datadir@.
--
--Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
--
--Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
-- with external declaration.
--
--Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (all-no): Rename from all_no.
--
--Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware>
--
-- * gettextP.h [loaded_domain]: Array `successor' must now contain up
-- to 63 elements (because of codeset name normalization).
--
-- * finddomain.c: Implement codeset name normalization.
--
--Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (all): Define to `all-@USE_NLS@'.
-- (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
-- is former all.
--
--Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com>
--
-- * localealias.c (alias_compare): Increment string pointers in loop
-- of strcasecmp replacement.
--
--Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (install-src): Who commented this goal out ? :-)
--
--Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware>
--
-- * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
-- should not effect it because a missing catalog is no error.
-- Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
--
--Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (Makefile): Explicitly use $(SHELL) for running
-- shell scripts.
--
--Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
--
-- * Makefile.in (install-src): Only install library and header when
-- we use the own implementation. Don't do it when using the
-- system's gettext or catgets functions.
--
-- * dcgettext.c (find_msg): Must not swap domain->hash_size here.
--
--Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware>
--
-- * localealias.c, libintl.inst, libgettext.h, hash-string.h,
-- gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
-- Use PARAMS instead of __P. Suggested by Roland McGrath.
--
--Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu>
--
-- * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
-- !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
--
--Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (install-src):
-- Install libintl.inst instead of libintl.h.install.
--
--Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
--
-- * cat-compat.c (textdomain):
-- Reverse order in which files are tried you load. First
-- try local file, when this failed absolute path.
--
--Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
--
-- * cat-compat.c (bindtextdomain): Add missing { }.
--
--Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
--
-- * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
--
-- * Makefile.in:
-- Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
--
--Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
--
-- * hash-string.h: Capitalize arguments of macros.
--
--Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (DISTFILES): Prevent files names longer than 13
-- characters. libintl.h.glibc->libintl.glibc,
-- libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
--
--Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
--
-- * dcgettext.c: Fix bug in preprocessor conditionals.
--
--Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
--
-- * libgettext.h: Solaris cc does not understand
-- #if !SYMBOL1 && !SYMBOL2. Sad but true.
--
--Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
--
-- * hash-string.h (hash_string):
-- Fix for machine with >32 bit `unsigned long's.
--
-- * dcgettext.c (DCGETTEXT):
-- Fix horrible bug in loop for alternative translation.
--
--Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
--
-- * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
-- Some further simplifications in message number generation.
--
--Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
--
-- * libintl.h.glibc: Use __const instead of const in prototypes.
--
-- * Makefile.in (install-src):
-- Install libintl.h.install instead of libintl.h. This
-- is a stripped-down version. Suggested by Peter Miller.
--
-- * libintl.h.install, libintl.h.glibc: Initial revision.
--
-- * localealias.c (_nl_expand_alias, read_alias_file):
-- Protect prototypes in type casts by __P.
--
--Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
--
-- * hash-string.h: Correct prototype for hash_string.
--
--Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
--
-- * hash-string.h (hash_string): Add prototype.
--
-- * gettextP.h: Fix copyright.
-- (SWAP): Add prototype.
--
--Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
--
-- * localealias.c (read_alias_file): Forgot sizeof.
-- Avoid calling *printf function. This introduces a big overhead.
-- Patch by Roland McGrath.
--
--Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
--
-- * finddomain.c (stpcpy):
-- Define substitution function local. The macro was to flaky.
--
-- * cat-compat.c: Fix typo.
--
-- * xopen-msg.sed, linux-msg.sed:
-- While bringing message number to right place only accept digits.
--
-- * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
-- leading 0s we don't need to remove them. Reported by Marcus
-- Daniels.
--
-- * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
-- dependency. Reported by Marcus Daniels.
--
-- * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
-- Generally cleanup using #if instead of #ifndef.
--
-- * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
--
--Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (install-src): Don't install libintl.h and libintl.a
-- if we use an available gettext implementation.
--
--Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
--
-- * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
-- by Franc,ois Pinard.
--
-- * libgettext.h: Use #if instead of #ifdef/#ifndef.
--
-- * finddomain.c:
-- Comments describing what has to be done should start with FIXME.
--
--Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
-- DISTFILES.common names the files common to both dist goals.
-- DISTFILES.gettext are the files only distributed in GNU gettext.
--
--Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
--
-- * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
-- This was necessary since a change in _nl_find_msg several weeks
-- ago. I really don't know this is still not fixed.
--
--Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
--
-- * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
-- might mark a special condition.
--
-- * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
--
-- * Makefile.in (dist): Suppress error message when ln failed.
-- Get files from $(srcdir) explicitly.
--
-- * libgettext.h (gettext_const): Rename to gettext_noop.
--
--Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c (make_entry_rec):
-- Protect against wrong locale names by testing mask.
--
-- * libgettext.h (gettext_const): Add macro definition.
-- Capitalize macro arguments.
--
--Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c (_nl_find_domain):
-- Test for pointer != NULL before accessing value.
-- Reported by Tom Tromey.
--
-- * gettext.c (NULL):
-- Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
--
--Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
--
-- * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
--
--Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
--
-- * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
--
-- * localealias.c (alias_compare):
-- Peter Miller reported that tolower in some systems is
-- even dumber than I thought. Protect call by `isupper'.
--
--Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (libdir, includedir): New variables.
-- (install-src): Install libintl.a and libintl.h in correct dirs.
--
--Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
--
-- * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
--
-- * localealias.c:
-- Fix typo and superflous test. Reported by Christian von Roques.
--
--Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c (_nl_find_domain):
-- Correct some remainder from the pre-CEN syntax. Now
-- we don't have a constant number of successors anymore.
--
--Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (DISTFILES): Add libintl.h.glibc.
--
-- * Makefile.in (dist-libc): Add goal for packing sources for glibc.
-- (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
--
-- * loadmsgcat.c: Forget to continue #if line.
--
-- * localealias.c:
-- [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
-- space clean.
--
-- * dcgettext.c, finddomain.c: Better comment to last change.
--
-- * loadmsgcat.c:
-- [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
-- __fstat, __open, __close, __read, __mmap, and __munmap resp
-- to keep ANSI C name space clean.
--
-- * finddomain.c:
-- [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
--
-- * dcgettext.c:
-- [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
-- keep ANSI C name space clean.
--
-- * libgettext.h:
-- Include sys/types.h for those old SysV systems out there.
-- Reported by Francesco Potorti`.
--
-- * loadmsgcat.c (use_mmap): Define if compiled for glibc.
--
-- * bindtextdom.c: Include all those standard headers
-- unconditionally if _LIBC is defined.
--
-- * finddomain.c: Fix 2 times defiend -> defined.
--
-- * textdomain.c: Include libintl.h instead of libgettext.h when
-- compiling for glibc. Include all those standard headers
-- unconditionally if _LIBC is defined.
--
-- * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
--
-- * gettext.c:
-- Include libintl.h instead of libgettext.h when compiling for glibc.
-- Get NULL from stddef.h if we compile for glibc.
--
-- * finddomain.c: Include libintl.h instead of libgettext.h when
-- compiling for glibc. Include all those standard headers
-- unconditionally if _LIBC is defined.
--
-- * dcgettext.c: Include all those standard headers unconditionally
-- if _LIBC is defined.
--
-- * dgettext.c: If compiled in glibc include libintl.h instead of
-- libgettext.h.
-- (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
--
-- * dcgettext.c: If compiled in glibc include libintl.h instead of
-- libgettext.h.
-- (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
--
-- * bindtextdom.c:
-- If compiled in glibc include libintl.h instead of libgettext.h.
--
--Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
--
-- * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
-- Reported by Marcus Daniels.
--
-- * cat-compat.c (bindtextdomain):
-- String used in putenv must not be recycled.
-- Reported by Marcus Daniels.
--
-- * libgettext.h (__USE_GNU_GETTEXT):
-- Additional symbol to signal that we use GNU gettext
-- library.
--
-- * cat-compat.c (bindtextdomain):
-- Fix bug with the strange stpcpy replacement.
-- Reported by Nelson Beebe.
--
--Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
--
-- * cat-compat.c: Include <string.h> for stpcpy prototype.
--
-- * localealias.c (read_alias_file):
-- While expand strdup code temporary variable `cp' hided
-- higher level variable with same name. Rename to `tp'.
--
-- * textdomain.c (textdomain):
-- Avoid warning by using temporary variable in strdup code.
--
-- * finddomain.c (_nl_find_domain): Remove unused variable `application'.
--
--Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
--
-- * localealias.c (alias_compare):
-- Use strcasecmp() only if available. Else use
-- implementation in place.
--
-- * intl-compat.c:
-- Wrapper functions now call *__ functions instead of __*.
--
-- * libgettext.h: Declare prototypes for *__ functions instead for __*.
--
-- * cat-compat.c, loadmsgcat.c:
-- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
-- of the standard libc and so prevent libintl.a from being used
-- standalone.
--
-- * bindtextdom.c:
-- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
-- of the standard libc and so prevent libintl.a from being used
-- standalone.
-- Rename to bindtextdomain__ if not used in GNU C Library.
--
-- * dgettext.c:
-- Rename function to dgettext__ if not used in GNU C Library.
--
-- * gettext.c:
-- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
-- of the standard libc and so prevent libintl.a from being used
-- standalone.
-- Functions now called gettext__ if not used in GNU C Library.
--
-- * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
-- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
-- of the standard libc and so prevent libintl.a from being used
-- standalone.
--
--Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c: Correct some bugs in handling of CEN standard
-- locale definitions.
--
--Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c: Implement CEN syntax.
--
-- * gettextP.h (loaded_domain): Extend number of successors to 31.
--
--Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (aliaspath): Remove path to X11 locale dir.
--
-- * Makefile.in: Make install-src depend on install. This helps
-- gettext to install the sources and other packages can use the
-- install goal.
--
--Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (uninstall): Remove stuff installed by install-src.
--
--Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
--
-- * VERSION.in: Initial revision.
--
-- * Makefile.in (DISTFILES):
-- Add VERSION file. This is not necessary for gettext, but
-- for other packages using this library.
--
--Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
--
-- * gettextP.h (_nl_find_domain):
-- New prototype after changing search strategy.
--
-- * finddomain.c (_nl_find_domain):
-- We now try only to find a specified catalog. Fall back to other
-- catalogs listed in the locale list is now done in __dcgettext.
--
-- * dcgettext.c (__dcgettext):
-- Now we provide message fall back even to different languages.
-- I.e. if a message is not available in one language all the other
-- in the locale list a tried. Formerly fall back was only possible
-- within one language. Implemented by moving one loop from
-- _nl_find_domain to here.
--
--Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (gettextsrcdir):
-- Directory where source of GNU gettext library are made
-- available.
-- (INSTALL, INSTALL_DATA): Programs used for installing sources.
-- (gettext-src): New. Rule to install GNU gettext sources for use in
-- gettextize shell script.
--
--Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
--
-- * loadmsgcat.c (_nl_load_domain):
-- Use mmap for loading only when munmap function is
-- also available.
--
-- * Makefile.in (install): Depend on `all' goal.
--
--Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
--
-- * localealias.c (read_alias_file):
-- Do not overwrite '\n' when terminating alias value string.
--
-- * localealias.c (read_alias_file):
-- Handle long lines. Ignore the rest not fitting in
-- the buffer after the initial `fgets' call.
--
--Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
--
-- * gettextP.h (_nl_load_domain):
-- Add prototype, replacing prototype for _nl_load_msg_cat.
--
-- * finddomain.c (_nl_find_domain):
-- Remove unneeded variable filename and filename_len.
-- (expand_alias): Remove prototype because functions does not
-- exist anymore.
--
-- * localealias.c (read_alias_file):
-- Change type of fname_len parameter to int.
-- (xmalloc): Add prototype.
--
-- * loadmsgcat.c: Better prototypes for xmalloc.
--
--Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c (_nl_find_domain):
-- Allow alias name to be constructed from the four components.
--
-- * Makefile.in (aliaspath): New variable. Set to preliminary value.
-- (SOURCES): Add localealias.c.
-- (OBJECTS): Add localealias.o.
--
-- * gettextP.h: Add prototype for _nl_expand_alias.
--
-- * finddomain.c: Aliasing handled in intl/localealias.c.
--
-- * localealias.c: Aliasing for locale names.
--
-- * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
--
--Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
--
-- * cat-compat.c (bindtextdomain):
-- Correct implementation. dirname parameter was not used.
-- Reported by Marcus Daniels.
--
-- * gettextP.h (loaded_domain):
-- New fields `successor' and `decided' for oo, lazy
-- message handling implementation.
--
-- * dcgettext.c:
-- Adopt for oo, lazy message handliing.
-- Now we can inherit translations from less specific locales.
-- (find_msg): New function.
--
-- * loadmsgcat.c, finddomain.c:
-- Complete rewrite. Implement oo, lazy message handling :-).
-- We now have an additional environment variable `LANGUAGE' with
-- a higher priority than LC_ALL for the LC_MESSAGE locale.
-- Here we can set a colon separated list of specifications each
-- of the form `language[_territory[.codeset]][@modifier]'.
--
--Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c (unistd.h):
-- Include to get _PC_PATH_MAX defined on system having it.
--
--Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
--
-- * finddomain.c (stpcpy): Include prototype.
--
-- * Makefile.in (dist): Remove `copying instead' message.
--
--Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (ID, TAGS): Do not use $^.
--
--Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (TAGS, ID): Use $^ as command argument.
-- (TAGS): Give etags -o option t write to current directory,
-- not $(srcdir).
-- (ID): Use $(srcdir) instead os $(top_srcdir)/src.
-- (distclean): Remove ID.
--
--Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (gnulocaledir):
-- New variable, always using share/ for data directory.
-- (DEFS): Add GNULOCALEDIR, used in finddomain.c.
--
-- * finddomain.c (_nl_default_dirname):
-- Set to GNULOCALEDIR, because it always has to point
-- to the directory where GNU gettext Library writes it to.
--
-- * intl-compat.c (textdomain, bindtextdomain):
-- Undefine macros before function definition.
--
--Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
--
-- * libgettext.h (_LIBINTL_H):
-- Protect definition in case where this file is included as
-- libgettext.h on Solaris machines. Add comment about this.
--
--Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
--
-- * intl-compat.c (textdomain): Correct typo.
--
--Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
--
-- * dcgettext.c (dcgettext): Function now called __dcgettext.
--
-- * dgettext.c (dgettext): Now called __dgettext and calls
-- __dcgettext.
--
-- * gettext.c (gettext):
-- Function now called __gettext and calls __dgettext.
--
-- * textdomain.c (textdomain): Function now called __textdomain.
--
-- * bindtextdom.c (bindtextdomain): Function now called
-- __bindtextdomain.
--
-- * intl-compat.c: Initial revision.
--
-- * Makefile.in (SOURCES): Add intl-compat.c.
-- (OBJECTS): We always compile the GNU gettext library functions.
-- OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
-- and intl-compat.o.
-- (GETTOBJS): Contains now only intl-compat.o.
--
-- * libgettext.h:
-- Re-include protection matches dualistic character of libgettext.h.
-- For all functions in GNU gettext library define __ counter part.
--
-- * finddomain.c (strchr): Define as index if not found in C library.
-- (_nl_find_domain): For relative paths paste / in between.
--
--Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
--
-- * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
--
-- * xopen-msg.sed: Fix bug with `msgstr ""' lines.
-- A little bit better comments.
--
--Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in:
-- po-mode.el, makelinks, combine-sh are now found in ../misc.
--
-- * po-mode.el, makelinks, combine-sh, elisp-comp:
-- Moved to ../misc/.
--
-- * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
--
--Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (INSTALL, INSTALL_DATA): New variables.
-- (install-data, uninstall): Install/uninstall .elc file.
--
-- * po-mode.el (Installation comment):
-- Add .pox as possible extension of .po files.
--
--Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
--
-- * elisp-comp: Complete new version by Franc,ois: This does not
-- fail when not compiling in the source directory.
--
--Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (../po/cat-id-tbl.o):
-- Use $(MAKE) instead of make for recursive make.
--
-- * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
-- (install-exec): Add missing dummy goal.
-- (install-data, uninstall): @ in multi-line shell command at
-- beginning, not in front of echo. Reported by Eric Backus.
--
--Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (DISTFILES):
-- Rename libgettext.perl to gettext.perl to fit in 14 chars
-- file systems.
--
-- * gettext.perl:
-- Rename to gettext.perl to fit in 14 chars file systems.
--
--Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
--
-- * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
--
--Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
--
-- * po2tbl.sed.in: Pretty printing.
--
-- * linux-msg.sed, xopen-msg.sed:
-- Correct bugs with handling substitute flags in branches.
--
-- * hash-string.h (hash_string):
-- Old K&R compilers don't under stand `unsigned char'.
--
-- * gettext.h (nls_uint32):
-- Some old K&R compilers (eg HP) don't understand `unsigned int'.
--
-- * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
--
--Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (ELCFILES): New variable.
-- (DISTFILES): Add elisp-comp.
-- Add implicit rule for .el -> .elc compilation.
-- (install-data): install $ELCFILES
-- (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
--
-- * elisp-comp: Initial revision
--
--Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in:
-- cat-id-tbl.c is now found in po/. This enables us to use an identical
-- intl/ directory in all packages.
--
-- * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
--
-- * textdomain.c: fix typo (#if def -> #if defined)
--
--Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in (stamp-cat-id): use top_srcdir to address source files
-- (DISTFILES,distclean): move tupdate.perl to src/
--
-- * po-to-tbl.sed.in:
-- add additional jump to clear change flag to recognize multiline strings
--
--Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
--
-- * textdomain.c: Protect inclusion of stdlib.h and string.h.
--
-- * loadmsgcat.c: Protect inclusion of stdlib.h.
--
-- * libgettext.h: Protect inclusion of locale.h.
-- Allow use in C++ programs.
-- Define NULL is not happened already.
--
-- * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
-- po-to-tbl.sed.
-- (distclean): remove po-to-tbl.sed and tupdate.perl.
--
-- * tupdate.perl.in: Substitute Perl path even in exec line.
-- Don't include entries without translation from old .po file.
--
--Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
--
-- * tupdate.perl.in: use "Updated: " in msgid "".
--
-- * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
-- Define getenv if !__STDC__.
--
-- * bindtextdom.c: Protect stdlib.h and string.h inclusion.
-- Define free if !__STDC__.
--
-- * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
-- Define free if !__STDC__.
--
-- * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
--
--Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
--
-- * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
-- Remove unneeded $(srcdir) from Makefile.in dependency.
--
-- * makelinks: Add copyright and short description.
--
-- * po-mode.el: Last version for 0.7.
--
-- * tupdate.perl.in: Fix die message.
--
-- * dcgettext.c: Protect include of string.h.
--
-- * gettext.c: Protect include of stdlib.h and further tries to get NULL.
--
-- * finddomain.c: Some corrections in includes.
--
-- * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
--
-- * po-to-tbl.sed: Adopt for new .po file format.
--
-- * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
--
--Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
--
-- * tupdate.perl.in: Complete rewrite for new .po file format.
-+2004-01-29 GNU <bug-gnu-gettext@gnu.org>
-
--Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
-+ * Version 0.14.1 released.
-
-- * First official release. This directory contains all the code
-- needed to internationalize own packages. It provides functions
-- which allow to use the X/Open catgets function with an interface
-- like the Uniforum gettext function. For system which does not
-- have neither of those a complete implementation is provided.
---- lrzsz-0.12.20.safe/intl/config.charset 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/config.charset 2004-09-12 14:40:34.354748240 -0400
-@@ -0,0 +1,608 @@
-+#! /bin/sh
-+# Output a system dependent table of character encoding aliases.
-+#
-+# Copyright (C) 2000-2004 Free Software Foundation, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU Library General Public License as published
-+# by the Free Software Foundation; either version 2, or (at your option)
-+# any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# Library General Public License for more details.
-+#
-+# You should have received a copy of the GNU Library General Public
-+# License along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+# USA.
-+#
-+# The table consists of lines of the form
-+# ALIAS CANONICAL
-+#
-+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
-+# ALIAS is compared in a case sensitive way.
-+#
-+# CANONICAL is the GNU canonical name for this character encoding.
-+# It must be an encoding supported by libiconv. Support by GNU libc is
-+# also desirable. CANONICAL is case insensitive. Usually an upper case
-+# MIME charset name is preferred.
-+# The current list of GNU canonical charset names is as follows.
-+#
-+# name MIME? used by which systems
-+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin
-+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin
-+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin
-+# ISO-8859-3 Y glibc solaris
-+# ISO-8859-4 Y osf solaris freebsd darwin
-+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
-+# ISO-8859-6 Y glibc aix hpux solaris
-+# ISO-8859-7 Y glibc aix hpux irix osf solaris
-+# ISO-8859-8 Y glibc aix hpux osf solaris
-+# ISO-8859-9 Y glibc aix hpux irix osf solaris
-+# ISO-8859-13 glibc
-+# ISO-8859-14 glibc
-+# ISO-8859-15 glibc aix osf solaris freebsd
-+# KOI8-R Y glibc solaris freebsd darwin
-+# KOI8-U Y glibc freebsd darwin
-+# KOI8-T glibc
-+# CP437 dos
-+# CP775 dos
-+# CP850 aix osf dos
-+# CP852 dos
-+# CP855 dos
-+# CP856 aix
-+# CP857 dos
-+# CP861 dos
-+# CP862 dos
-+# CP864 dos
-+# CP865 dos
-+# CP866 freebsd darwin dos
-+# CP869 dos
-+# CP874 woe32 dos
-+# CP922 aix
-+# CP932 aix woe32 dos
-+# CP943 aix
-+# CP949 osf woe32 dos
-+# CP950 woe32 dos
-+# CP1046 aix
-+# CP1124 aix
-+# CP1125 dos
-+# CP1129 aix
-+# CP1250 woe32
-+# CP1251 glibc solaris darwin woe32
-+# CP1252 aix woe32
-+# CP1253 woe32
-+# CP1254 woe32
-+# CP1255 glibc woe32
-+# CP1256 woe32
-+# CP1257 woe32
-+# GB2312 Y glibc aix hpux irix solaris freebsd darwin
-+# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin
-+# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin
-+# EUC-TW glibc aix hpux irix osf solaris
-+# BIG5 Y glibc aix hpux osf solaris freebsd darwin
-+# BIG5-HKSCS glibc solaris
-+# GBK glibc aix osf solaris woe32 dos
-+# GB18030 glibc solaris
-+# SHIFT_JIS Y hpux osf solaris freebsd darwin
-+# JOHAB glibc solaris woe32
-+# TIS-620 glibc aix hpux osf solaris
-+# VISCII Y glibc
-+# TCVN5712-1 glibc
-+# GEORGIAN-PS glibc
-+# HP-ROMAN8 hpux
-+# HP-ARABIC8 hpux
-+# HP-GREEK8 hpux
-+# HP-HEBREW8 hpux
-+# HP-TURKISH8 hpux
-+# HP-KANA8 hpux
-+# DEC-KANJI osf
-+# DEC-HANYU osf
-+# UTF-8 Y glibc aix hpux osf solaris
-+#
-+# Note: Names which are not marked as being a MIME name should not be used in
-+# Internet protocols for information interchange (mail, news, etc.).
-+#
-+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
-+# must understand both names and treat them as equivalent.
-+#
-+# The first argument passed to this file is the canonical host specification,
-+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-+# or
-+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-+
-+host="$1"
-+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
-+echo "# This file contains a table of character encoding aliases,"
-+echo "# suitable for operating system '${os}'."
-+echo "# It was automatically generated from config.charset."
-+# List of references, updated during installation:
-+echo "# Packages using this file: "
-+case "$os" in
-+ linux-gnulibc1*)
-+ # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
-+ # localcharset.c falls back to using the full locale name
-+ # from the environment variables.
-+ echo "C ASCII"
-+ echo "POSIX ASCII"
-+ for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
-+ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
-+ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
-+ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
-+ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
-+ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
-+ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
-+ sv_FI sv_SE; do
-+ echo "$l ISO-8859-1"
-+ echo "$l.iso-8859-1 ISO-8859-1"
-+ echo "$l.iso-8859-15 ISO-8859-15"
-+ echo "$l.iso-8859-15@euro ISO-8859-15"
-+ echo "$l@euro ISO-8859-15"
-+ echo "$l.cp-437 CP437"
-+ echo "$l.cp-850 CP850"
-+ echo "$l.cp-1252 CP1252"
-+ echo "$l.cp-1252@euro CP1252"
-+ #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
-+ echo "$l.utf-8 UTF-8"
-+ echo "$l.utf-8@euro UTF-8"
-+ done
-+ for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
-+ sl_SI sr sr_CS sr_YU; do
-+ echo "$l ISO-8859-2"
-+ echo "$l.iso-8859-2 ISO-8859-2"
-+ echo "$l.cp-852 CP852"
-+ echo "$l.cp-1250 CP1250"
-+ echo "$l.utf-8 UTF-8"
-+ done
-+ for l in mk mk_MK ru ru_RU; do
-+ echo "$l ISO-8859-5"
-+ echo "$l.iso-8859-5 ISO-8859-5"
-+ echo "$l.koi8-r KOI8-R"
-+ echo "$l.cp-866 CP866"
-+ echo "$l.cp-1251 CP1251"
-+ echo "$l.utf-8 UTF-8"
-+ done
-+ for l in ar ar_SA; do
-+ echo "$l ISO-8859-6"
-+ echo "$l.iso-8859-6 ISO-8859-6"
-+ echo "$l.cp-864 CP864"
-+ #echo "$l.cp-868 CP868" # not a commonly used encoding
-+ echo "$l.cp-1256 CP1256"
-+ echo "$l.utf-8 UTF-8"
-+ done
-+ for l in el el_GR gr gr_GR; do
-+ echo "$l ISO-8859-7"
-+ echo "$l.iso-8859-7 ISO-8859-7"
-+ echo "$l.cp-869 CP869"
-+ echo "$l.cp-1253 CP1253"
-+ echo "$l.cp-1253@euro CP1253"
-+ echo "$l.utf-8 UTF-8"
-+ echo "$l.utf-8@euro UTF-8"
-+ done
-+ for l in he he_IL iw iw_IL; do
-+ echo "$l ISO-8859-8"
-+ echo "$l.iso-8859-8 ISO-8859-8"
-+ echo "$l.cp-862 CP862"
-+ echo "$l.cp-1255 CP1255"
-+ echo "$l.utf-8 UTF-8"
-+ done
-+ for l in tr tr_TR; do
-+ echo "$l ISO-8859-9"
-+ echo "$l.iso-8859-9 ISO-8859-9"
-+ echo "$l.cp-857 CP857"
-+ echo "$l.cp-1254 CP1254"
-+ echo "$l.utf-8 UTF-8"
-+ done
-+ for l in lt lt_LT lv lv_LV; do
-+ #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
-+ echo "$l ISO-8859-13"
-+ done
-+ for l in ru_UA uk uk_UA; do
-+ echo "$l KOI8-U"
-+ done
-+ for l in zh zh_CN; do
-+ #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
-+ echo "$l GB2312"
-+ done
-+ for l in ja ja_JP ja_JP.EUC; do
-+ echo "$l EUC-JP"
-+ done
-+ for l in ko ko_KR; do
-+ echo "$l EUC-KR"
-+ done
-+ for l in th th_TH; do
-+ echo "$l TIS-620"
-+ done
-+ for l in fa fa_IR; do
-+ #echo "$l ISIRI-3342" # a broken encoding
-+ echo "$l.utf-8 UTF-8"
-+ done
-+ ;;
-+ linux* | *-gnu*)
-+ # With glibc-2.1 or newer, we don't need any canonicalization,
-+ # because glibc has iconv and both glibc and libiconv support all
-+ # GNU canonical names directly. Therefore, the Makefile does not
-+ # need to install the alias file at all.
-+ # The following applies only to glibc-2.0.x and older libcs.
-+ echo "ISO_646.IRV:1983 ASCII"
-+ ;;
-+ aix*)
-+ echo "ISO8859-1 ISO-8859-1"
-+ echo "ISO8859-2 ISO-8859-2"
-+ echo "ISO8859-5 ISO-8859-5"
-+ echo "ISO8859-6 ISO-8859-6"
-+ echo "ISO8859-7 ISO-8859-7"
-+ echo "ISO8859-8 ISO-8859-8"
-+ echo "ISO8859-9 ISO-8859-9"
-+ echo "ISO8859-15 ISO-8859-15"
-+ echo "IBM-850 CP850"
-+ echo "IBM-856 CP856"
-+ echo "IBM-921 ISO-8859-13"
-+ echo "IBM-922 CP922"
-+ echo "IBM-932 CP932"
-+ echo "IBM-943 CP943"
-+ echo "IBM-1046 CP1046"
-+ echo "IBM-1124 CP1124"
-+ echo "IBM-1129 CP1129"
-+ echo "IBM-1252 CP1252"
-+ echo "IBM-eucCN GB2312"
-+ echo "IBM-eucJP EUC-JP"
-+ echo "IBM-eucKR EUC-KR"
-+ echo "IBM-eucTW EUC-TW"
-+ echo "big5 BIG5"
-+ echo "GBK GBK"
-+ echo "TIS-620 TIS-620"
-+ echo "UTF-8 UTF-8"
-+ ;;
-+ hpux*)
-+ echo "iso88591 ISO-8859-1"
-+ echo "iso88592 ISO-8859-2"
-+ echo "iso88595 ISO-8859-5"
-+ echo "iso88596 ISO-8859-6"
-+ echo "iso88597 ISO-8859-7"
-+ echo "iso88598 ISO-8859-8"
-+ echo "iso88599 ISO-8859-9"
-+ echo "iso885915 ISO-8859-15"
-+ echo "roman8 HP-ROMAN8"
-+ echo "arabic8 HP-ARABIC8"
-+ echo "greek8 HP-GREEK8"
-+ echo "hebrew8 HP-HEBREW8"
-+ echo "turkish8 HP-TURKISH8"
-+ echo "kana8 HP-KANA8"
-+ echo "tis620 TIS-620"
-+ echo "big5 BIG5"
-+ echo "eucJP EUC-JP"
-+ echo "eucKR EUC-KR"
-+ echo "eucTW EUC-TW"
-+ echo "hp15CN GB2312"
-+ #echo "ccdc ?" # what is this?
-+ echo "SJIS SHIFT_JIS"
-+ echo "utf8 UTF-8"
-+ ;;
-+ irix*)
-+ echo "ISO8859-1 ISO-8859-1"
-+ echo "ISO8859-2 ISO-8859-2"
-+ echo "ISO8859-5 ISO-8859-5"
-+ echo "ISO8859-7 ISO-8859-7"
-+ echo "ISO8859-9 ISO-8859-9"
-+ echo "eucCN GB2312"
-+ echo "eucJP EUC-JP"
-+ echo "eucKR EUC-KR"
-+ echo "eucTW EUC-TW"
-+ ;;
-+ osf*)
-+ echo "ISO8859-1 ISO-8859-1"
-+ echo "ISO8859-2 ISO-8859-2"
-+ echo "ISO8859-4 ISO-8859-4"
-+ echo "ISO8859-5 ISO-8859-5"
-+ echo "ISO8859-7 ISO-8859-7"
-+ echo "ISO8859-8 ISO-8859-8"
-+ echo "ISO8859-9 ISO-8859-9"
-+ echo "ISO8859-15 ISO-8859-15"
-+ echo "cp850 CP850"
-+ echo "big5 BIG5"
-+ echo "dechanyu DEC-HANYU"
-+ echo "dechanzi GB2312"
-+ echo "deckanji DEC-KANJI"
-+ echo "deckorean EUC-KR"
-+ echo "eucJP EUC-JP"
-+ echo "eucKR EUC-KR"
-+ echo "eucTW EUC-TW"
-+ echo "GBK GBK"
-+ echo "KSC5601 CP949"
-+ echo "sdeckanji EUC-JP"
-+ echo "SJIS SHIFT_JIS"
-+ echo "TACTIS TIS-620"
-+ echo "UTF-8 UTF-8"
-+ ;;
-+ solaris*)
-+ echo "646 ASCII"
-+ echo "ISO8859-1 ISO-8859-1"
-+ echo "ISO8859-2 ISO-8859-2"
-+ echo "ISO8859-3 ISO-8859-3"
-+ echo "ISO8859-4 ISO-8859-4"
-+ echo "ISO8859-5 ISO-8859-5"
-+ echo "ISO8859-6 ISO-8859-6"
-+ echo "ISO8859-7 ISO-8859-7"
-+ echo "ISO8859-8 ISO-8859-8"
-+ echo "ISO8859-9 ISO-8859-9"
-+ echo "ISO8859-15 ISO-8859-15"
-+ echo "koi8-r KOI8-R"
-+ echo "ansi-1251 CP1251"
-+ echo "BIG5 BIG5"
-+ echo "Big5-HKSCS BIG5-HKSCS"
-+ echo "gb2312 GB2312"
-+ echo "GBK GBK"
-+ echo "GB18030 GB18030"
-+ echo "cns11643 EUC-TW"
-+ echo "5601 EUC-KR"
-+ echo "ko_KR.johap92 JOHAB"
-+ echo "eucJP EUC-JP"
-+ echo "PCK SHIFT_JIS"
-+ echo "TIS620.2533 TIS-620"
-+ #echo "sun_eu_greek ?" # what is this?
-+ echo "UTF-8 UTF-8"
-+ ;;
-+ freebsd* | os2*)
-+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
-+ # localcharset.c falls back to using the full locale name
-+ # from the environment variables.
-+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
-+ # reuse FreeBSD's locale data for OS/2.
-+ echo "C ASCII"
-+ echo "US-ASCII ASCII"
-+ for l in la_LN lt_LN; do
-+ echo "$l.ASCII ASCII"
-+ done
-+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
-+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
-+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
-+ echo "$l.ISO_8859-1 ISO-8859-1"
-+ echo "$l.DIS_8859-15 ISO-8859-15"
-+ done
-+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
-+ echo "$l.ISO_8859-2 ISO-8859-2"
-+ done
-+ for l in la_LN lt_LT; do
-+ echo "$l.ISO_8859-4 ISO-8859-4"
-+ done
-+ for l in ru_RU ru_SU; do
-+ echo "$l.KOI8-R KOI8-R"
-+ echo "$l.ISO_8859-5 ISO-8859-5"
-+ echo "$l.CP866 CP866"
-+ done
-+ echo "uk_UA.KOI8-U KOI8-U"
-+ echo "zh_TW.BIG5 BIG5"
-+ echo "zh_TW.Big5 BIG5"
-+ echo "zh_CN.EUC GB2312"
-+ echo "ja_JP.EUC EUC-JP"
-+ echo "ja_JP.SJIS SHIFT_JIS"
-+ echo "ja_JP.Shift_JIS SHIFT_JIS"
-+ echo "ko_KR.EUC EUC-KR"
-+ ;;
-+ netbsd*)
-+ echo "646 ASCII"
-+ echo "ISO8859-1 ISO-8859-1"
-+ echo "ISO8859-2 ISO-8859-2"
-+ echo "ISO8859-4 ISO-8859-4"
-+ echo "ISO8859-5 ISO-8859-5"
-+ echo "ISO8859-15 ISO-8859-15"
-+ echo "eucCN GB2312"
-+ echo "eucJP EUC-JP"
-+ echo "eucKR EUC-KR"
-+ echo "eucTW EUC-TW"
-+ echo "BIG5 BIG5"
-+ echo "SJIS SHIFT_JIS"
-+ ;;
-+ darwin*)
-+ # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
-+ # localcharset.c falls back to using the full locale name
-+ # from the environment variables.
-+ echo "C ASCII"
-+ for l in en_AU en_CA en_GB en_US la_LN; do
-+ echo "$l.US-ASCII ASCII"
-+ done
-+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
-+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
-+ nl_NL no_NO pt_PT sv_SE; do
-+ echo "$l ISO-8859-1"
-+ echo "$l.ISO8859-1 ISO-8859-1"
-+ echo "$l.ISO8859-15 ISO-8859-15"
-+ done
-+ for l in la_LN; do
-+ echo "$l.ISO8859-1 ISO-8859-1"
-+ echo "$l.ISO8859-15 ISO-8859-15"
-+ done
-+ for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
-+ echo "$l.ISO8859-2 ISO-8859-2"
-+ done
-+ for l in la_LN lt_LT; do
-+ echo "$l.ISO8859-4 ISO-8859-4"
-+ done
-+ for l in ru_RU; do
-+ echo "$l.KOI8-R KOI8-R"
-+ echo "$l.ISO8859-5 ISO-8859-5"
-+ echo "$l.CP866 CP866"
-+ done
-+ for l in bg_BG; do
-+ echo "$l.CP1251 CP1251"
-+ done
-+ echo "uk_UA.KOI8-U KOI8-U"
-+ echo "zh_TW.BIG5 BIG5"
-+ echo "zh_TW.Big5 BIG5"
-+ echo "zh_CN.EUC GB2312"
-+ echo "ja_JP.EUC EUC-JP"
-+ echo "ja_JP.SJIS SHIFT_JIS"
-+ echo "ko_KR.EUC EUC-KR"
-+ ;;
-+ beos*)
-+ # BeOS has a single locale, and it has UTF-8 encoding.
-+ echo "* UTF-8"
-+ ;;
-+ msdosdjgpp*)
-+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
-+ # localcharset.c falls back to using the full locale name
-+ # from the environment variables.
-+ echo "#"
-+ echo "# The encodings given here may not all be correct."
-+ echo "# If you find that the encoding given for your language and"
-+ echo "# country is not the one your DOS machine actually uses, just"
-+ echo "# correct it in this file, and send a mail to"
-+ echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
-+ echo "# and Bruno Haible <bruno@clisp.org>."
-+ echo "#"
-+ echo "C ASCII"
-+ # ISO-8859-1 languages
-+ echo "ca CP850"
-+ echo "ca_ES CP850"
-+ echo "da CP865" # not CP850 ??
-+ echo "da_DK CP865" # not CP850 ??
-+ echo "de CP850"
-+ echo "de_AT CP850"
-+ echo "de_CH CP850"
-+ echo "de_DE CP850"
-+ echo "en CP850"
-+ echo "en_AU CP850" # not CP437 ??
-+ echo "en_CA CP850"
-+ echo "en_GB CP850"
-+ echo "en_NZ CP437"
-+ echo "en_US CP437"
-+ echo "en_ZA CP850" # not CP437 ??
-+ echo "es CP850"
-+ echo "es_AR CP850"
-+ echo "es_BO CP850"
-+ echo "es_CL CP850"
-+ echo "es_CO CP850"
-+ echo "es_CR CP850"
-+ echo "es_CU CP850"
-+ echo "es_DO CP850"
-+ echo "es_EC CP850"
-+ echo "es_ES CP850"
-+ echo "es_GT CP850"
-+ echo "es_HN CP850"
-+ echo "es_MX CP850"
-+ echo "es_NI CP850"
-+ echo "es_PA CP850"
-+ echo "es_PY CP850"
-+ echo "es_PE CP850"
-+ echo "es_SV CP850"
-+ echo "es_UY CP850"
-+ echo "es_VE CP850"
-+ echo "et CP850"
-+ echo "et_EE CP850"
-+ echo "eu CP850"
-+ echo "eu_ES CP850"
-+ echo "fi CP850"
-+ echo "fi_FI CP850"
-+ echo "fr CP850"
-+ echo "fr_BE CP850"
-+ echo "fr_CA CP850"
-+ echo "fr_CH CP850"
-+ echo "fr_FR CP850"
-+ echo "ga CP850"
-+ echo "ga_IE CP850"
-+ echo "gd CP850"
-+ echo "gd_GB CP850"
-+ echo "gl CP850"
-+ echo "gl_ES CP850"
-+ echo "id CP850" # not CP437 ??
-+ echo "id_ID CP850" # not CP437 ??
-+ echo "is CP861" # not CP850 ??
-+ echo "is_IS CP861" # not CP850 ??
-+ echo "it CP850"
-+ echo "it_CH CP850"
-+ echo "it_IT CP850"
-+ echo "lt CP775"
-+ echo "lt_LT CP775"
-+ echo "lv CP775"
-+ echo "lv_LV CP775"
-+ echo "nb CP865" # not CP850 ??
-+ echo "nb_NO CP865" # not CP850 ??
-+ echo "nl CP850"
-+ echo "nl_BE CP850"
-+ echo "nl_NL CP850"
-+ echo "nn CP865" # not CP850 ??
-+ echo "nn_NO CP865" # not CP850 ??
-+ echo "no CP865" # not CP850 ??
-+ echo "no_NO CP865" # not CP850 ??
-+ echo "pt CP850"
-+ echo "pt_BR CP850"
-+ echo "pt_PT CP850"
-+ echo "sv CP850"
-+ echo "sv_SE CP850"
-+ # ISO-8859-2 languages
-+ echo "cs CP852"
-+ echo "cs_CZ CP852"
-+ echo "hr CP852"
-+ echo "hr_HR CP852"
-+ echo "hu CP852"
-+ echo "hu_HU CP852"
-+ echo "pl CP852"
-+ echo "pl_PL CP852"
-+ echo "ro CP852"
-+ echo "ro_RO CP852"
-+ echo "sk CP852"
-+ echo "sk_SK CP852"
-+ echo "sl CP852"
-+ echo "sl_SI CP852"
-+ echo "sq CP852"
-+ echo "sq_AL CP852"
-+ echo "sr CP852" # CP852 or CP866 or CP855 ??
-+ echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
-+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
-+ # ISO-8859-3 languages
-+ echo "mt CP850"
-+ echo "mt_MT CP850"
-+ # ISO-8859-5 languages
-+ echo "be CP866"
-+ echo "be_BE CP866"
-+ echo "bg CP866" # not CP855 ??
-+ echo "bg_BG CP866" # not CP855 ??
-+ echo "mk CP866" # not CP855 ??
-+ echo "mk_MK CP866" # not CP855 ??
-+ echo "ru CP866"
-+ echo "ru_RU CP866"
-+ echo "uk CP1125"
-+ echo "uk_UA CP1125"
-+ # ISO-8859-6 languages
-+ echo "ar CP864"
-+ echo "ar_AE CP864"
-+ echo "ar_DZ CP864"
-+ echo "ar_EG CP864"
-+ echo "ar_IQ CP864"
-+ echo "ar_IR CP864"
-+ echo "ar_JO CP864"
-+ echo "ar_KW CP864"
-+ echo "ar_MA CP864"
-+ echo "ar_OM CP864"
-+ echo "ar_QA CP864"
-+ echo "ar_SA CP864"
-+ echo "ar_SY CP864"
-+ # ISO-8859-7 languages
-+ echo "el CP869"
-+ echo "el_GR CP869"
-+ # ISO-8859-8 languages
-+ echo "he CP862"
-+ echo "he_IL CP862"
-+ # ISO-8859-9 languages
-+ echo "tr CP857"
-+ echo "tr_TR CP857"
-+ # Japanese
-+ echo "ja CP932"
-+ echo "ja_JP CP932"
-+ # Chinese
-+ echo "zh_CN GBK"
-+ echo "zh_TW CP950" # not CP938 ??
-+ # Korean
-+ echo "kr CP949" # not CP934 ??
-+ echo "kr_KR CP949" # not CP934 ??
-+ # Thai
-+ echo "th CP874"
-+ echo "th_TH CP874"
-+ # Other
-+ echo "eo CP850"
-+ echo "eo_EO CP850"
-+ ;;
-+esac
---- lrzsz-0.12.20.safe/intl/dcgettext.c 1998-04-26 09:22:36.000000000 -0400
-+++ lrzsz-0.12.20/intl/dcgettext.c 2004-09-12 14:40:34.359747480 -0400
-@@ -1,593 +1,56 @@
--/* Implementation of the dcgettext(3) function
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-+/* Implementation of the dcgettext(3) function.
-+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
--#include <sys/types.h>
--
--#ifdef __GNUC__
--# define alloca __builtin_alloca
--# define HAVE_ALLOCA 1
--#else
--# if defined HAVE_ALLOCA_H || defined _LIBC
--# include <alloca.h>
--# else
--# ifdef _AIX
-- #pragma alloca
--# else
--# ifndef alloca
--char *alloca ();
--# endif
--# endif
--# endif
--#endif
--
--#include <errno.h>
--#ifndef errno
--extern int errno;
--#endif
--#ifndef __set_errno
--# define __set_errno(val) errno = (val)
--#endif
--
--#if defined STDC_HEADERS || defined _LIBC
--# include <stdlib.h>
--#else
--char *getenv ();
--# ifdef HAVE_MALLOC_H
--# include <malloc.h>
--# else
--void free ();
--# endif
--#endif
--
--#if defined HAVE_STRING_H || defined _LIBC
--# ifndef _GNU_SOURCE
--# define _GNU_SOURCE 1
--# endif
--# include <string.h>
--#else
--# include <strings.h>
--#endif
--#if !HAVE_STRCHR && !defined _LIBC
--# ifndef strchr
--# define strchr index
--# endif
--#endif
--
--#if defined HAVE_UNISTD_H || defined _LIBC
--# include <unistd.h>
--#endif
--
--#include "gettext.h"
- #include "gettextP.h"
- #ifdef _LIBC
- # include <libintl.h>
- #else
--# include "libgettext.h"
-+# include "libgnuintl.h"
- #endif
--#include "hash-string.h"
-
- /* @@ end of prolog @@ */
-
--#ifdef _LIBC
--/* Rename the non ANSI C functions. This is required by the standard
-- because some ANSI C functions will require linking with this object
-- file and the name space must not be polluted. */
--# define getcwd __getcwd
--# define stpcpy __stpcpy
--#else
--# if !defined HAVE_GETCWD
--char *getwd ();
--# define getcwd(buf, max) getwd (buf)
--# else
--char *getcwd ();
--# endif
--# ifndef HAVE_STPCPY
--static char *stpcpy PARAMS ((char *dest, const char *src));
--# endif
--#endif
--
--/* Amount to increase buffer size by in each try. */
--#define PATH_INCR 32
--
--/* The following is from pathmax.h. */
--/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
-- PATH_MAX but might cause redefinition warnings when sys/param.h is
-- later included (as on MORE/BSD 4.3). */
--#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
--# include <limits.h>
--#endif
--
--#ifndef _POSIX_PATH_MAX
--# define _POSIX_PATH_MAX 255
--#endif
--
--#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
--# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
--#endif
--
--/* Don't include sys/param.h if it already has been. */
--#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
--# include <sys/param.h>
--#endif
--
--#if !defined(PATH_MAX) && defined(MAXPATHLEN)
--# define PATH_MAX MAXPATHLEN
--#endif
--
--#ifndef PATH_MAX
--# define PATH_MAX _POSIX_PATH_MAX
--#endif
--
--/* XPG3 defines the result of `setlocale (category, NULL)' as:
-- ``Directs `setlocale()' to query `category' and return the current
-- setting of `local'.''
-- However it does not specify the exact format. And even worse: POSIX
-- defines this not at all. So we can use this feature only on selected
-- system (e.g. those using GNU C Library). */
--#ifdef _LIBC
--# define HAVE_LOCALE_NULL
--#endif
--
--/* Name of the default domain used for gettext(3) prior any call to
-- textdomain(3). The default value for this is "messages". */
--const char _nl_default_default_domain[] = "messages";
--
--/* Value used as the default domain for gettext(3). */
--const char *_nl_current_default_domain = _nl_default_default_domain;
--
--/* Contains the default location of the message catalogs. */
--const char _nl_default_dirname[] = GNULOCALEDIR;
--
--/* List with bindings of specific domains created by bindtextdomain()
-- calls. */
--struct binding *_nl_domain_bindings;
--
--/* Prototypes for local functions. */
--static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
-- const char *msgid));
--static const char *category_to_name PARAMS ((int category));
--static const char *guess_category_value PARAMS ((int category,
-- const char *categoryname));
--
--
--/* For those loosing systems which don't have `alloca' we have to add
-- some additional code emulating it. */
--#ifdef HAVE_ALLOCA
--/* Nothing has to be done. */
--# define ADD_BLOCK(list, address) /* nothing */
--# define FREE_BLOCKS(list) /* nothing */
--#else
--struct block_list
--{
-- void *address;
-- struct block_list *next;
--};
--# define ADD_BLOCK(list, addr) \
-- do { \
-- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
-- /* If we cannot get a free block we cannot add the new element to \
-- the list. */ \
-- if (newp != NULL) { \
-- newp->address = (addr); \
-- newp->next = (list); \
-- (list) = newp; \
-- } \
-- } while (0)
--# define FREE_BLOCKS(list) \
-- do { \
-- while (list != NULL) { \
-- struct block_list *old = list; \
-- list = list->next; \
-- free (old); \
-- } \
-- } while (0)
--# undef alloca
--# define alloca(size) (malloc (size))
--#endif /* have alloca */
--
--
- /* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
- #ifdef _LIBC
- # define DCGETTEXT __dcgettext
-+# define DCIGETTEXT __dcigettext
- #else
--# define DCGETTEXT dcgettext__
-+# define DCGETTEXT libintl_dcgettext
-+# define DCIGETTEXT libintl_dcigettext
- #endif
-
- /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
- char *
--DCGETTEXT (domainname, msgid, category)
-- const char *domainname;
-- const char *msgid;
-- int category;
-+DCGETTEXT (const char *domainname, const char *msgid, int category)
- {
--#ifndef HAVE_ALLOCA
-- struct block_list *block_list = NULL;
--#endif
-- struct loaded_l10nfile *domain;
-- struct binding *binding;
-- const char *categoryname;
-- const char *categoryvalue;
-- char *dirname, *xdomainname;
-- char *single_locale;
-- char *retval;
-- int saved_errno = errno;
--
-- /* If no real MSGID is given return NULL. */
-- if (msgid == NULL)
-- return NULL;
--
-- /* If DOMAINNAME is NULL, we are interested in the default domain. If
-- CATEGORY is not LC_MESSAGES this might not make much sense but the
-- defintion left this undefined. */
-- if (domainname == NULL)
-- domainname = _nl_current_default_domain;
--
-- /* First find matching binding. */
-- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
-- {
-- int compare = strcmp (domainname, binding->domainname);
-- if (compare == 0)
-- /* We found it! */
-- break;
-- if (compare < 0)
-- {
-- /* It is not in the list. */
-- binding = NULL;
-- break;
-- }
-- }
--
-- if (binding == NULL)
-- dirname = (char *) _nl_default_dirname;
-- else if (binding->dirname[0] == '/')
-- dirname = binding->dirname;
-- else
-- {
-- /* We have a relative path. Make it absolute now. */
-- size_t dirname_len = strlen (binding->dirname) + 1;
-- size_t path_max;
-- char *ret;
--
-- path_max = (unsigned) PATH_MAX;
-- path_max += 2; /* The getcwd docs say to do this. */
--
-- dirname = (char *) alloca (path_max + dirname_len);
-- ADD_BLOCK (block_list, dirname);
--
-- __set_errno (0);
-- while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
-- {
-- path_max += PATH_INCR;
-- dirname = (char *) alloca (path_max + dirname_len);
-- ADD_BLOCK (block_list, dirname);
-- __set_errno (0);
-- }
--
-- if (ret == NULL)
-- {
-- /* We cannot get the current working directory. Don't signal an
-- error but simply return the default string. */
-- FREE_BLOCKS (block_list);
-- __set_errno (saved_errno);
-- return (char *) msgid;
-- }
--
-- stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
-- }
--
-- /* Now determine the symbolic name of CATEGORY and its value. */
-- categoryname = category_to_name (category);
-- categoryvalue = guess_category_value (category, categoryname);
--
-- xdomainname = (char *) alloca (strlen (categoryname)
-- + strlen (domainname) + 5);
-- ADD_BLOCK (block_list, xdomainname);
--
-- stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
-- domainname),
-- ".mo");
--
-- /* Creating working area. */
-- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
-- ADD_BLOCK (block_list, single_locale);
--
--
-- /* Search for the given string. This is a loop because we perhaps
-- got an ordered list of languages to consider for th translation. */
-- while (1)
-- {
-- /* Make CATEGORYVALUE point to the next element of the list. */
-- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
-- ++categoryvalue;
-- if (categoryvalue[0] == '\0')
-- {
-- /* The whole contents of CATEGORYVALUE has been searched but
-- no valid entry has been found. We solve this situation
-- by implicitly appending a "C" entry, i.e. no translation
-- will take place. */
-- single_locale[0] = 'C';
-- single_locale[1] = '\0';
-- }
-- else
-- {
-- char *cp = single_locale;
-- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
-- *cp++ = *categoryvalue++;
-- *cp = '\0';
-- }
--
-- /* If the current locale value is C (or POSIX) we don't load a
-- domain. Return the MSGID. */
-- if (strcmp (single_locale, "C") == 0
-- || strcmp (single_locale, "POSIX") == 0)
-- {
-- FREE_BLOCKS (block_list);
-- __set_errno (saved_errno);
-- return (char *) msgid;
-- }
--
--
-- /* Find structure describing the message catalog matching the
-- DOMAINNAME and CATEGORY. */
-- domain = _nl_find_domain (dirname, single_locale, xdomainname);
--
-- if (domain != NULL)
-- {
-- retval = find_msg (domain, msgid);
--
-- if (retval == NULL)
-- {
-- int cnt;
--
-- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
-- {
-- retval = find_msg (domain->successor[cnt], msgid);
--
-- if (retval != NULL)
-- break;
-- }
-- }
--
-- if (retval != NULL)
-- {
-- FREE_BLOCKS (block_list);
-- __set_errno (saved_errno);
-- return retval;
-- }
-- }
-- }
-- /* NOTREACHED */
-+ return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
- }
-
- #ifdef _LIBC
- /* Alias for function name in GNU C Library. */
-+INTDEF(__dcgettext)
- weak_alias (__dcgettext, dcgettext);
- #endif
--
--
--static char *
--find_msg (domain_file, msgid)
-- struct loaded_l10nfile *domain_file;
-- const char *msgid;
--{
-- size_t top, act, bottom;
-- struct loaded_domain *domain;
--
-- if (domain_file->decided == 0)
-- _nl_load_domain (domain_file);
--
-- if (domain_file->data == NULL)
-- return NULL;
--
-- domain = (struct loaded_domain *) domain_file->data;
--
-- /* Locate the MSGID and its translation. */
-- if (domain->hash_size > 2 && domain->hash_tab != NULL)
-- {
-- /* Use the hashing table. */
-- nls_uint32 len = strlen (msgid);
-- nls_uint32 hash_val = hash_string (msgid);
-- nls_uint32 idx = hash_val % domain->hash_size;
-- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
-- nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
--
-- if (nstr == 0)
-- /* Hash table entry is empty. */
-- return NULL;
--
-- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
-- && strcmp (msgid,
-- domain->data + W (domain->must_swap,
-- domain->orig_tab[nstr - 1].offset)) == 0)
-- return (char *) domain->data + W (domain->must_swap,
-- domain->trans_tab[nstr - 1].offset);
--
-- while (1)
-- {
-- if (idx >= domain->hash_size - incr)
-- idx -= domain->hash_size - incr;
-- else
-- idx += incr;
--
-- nstr = W (domain->must_swap, domain->hash_tab[idx]);
-- if (nstr == 0)
-- /* Hash table entry is empty. */
-- return NULL;
--
-- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
-- && strcmp (msgid,
-- domain->data + W (domain->must_swap,
-- domain->orig_tab[nstr - 1].offset))
-- == 0)
-- return (char *) domain->data
-- + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
-- }
-- /* NOTREACHED */
-- }
--
-- /* Now we try the default method: binary search in the sorted
-- array of messages. */
-- bottom = 0;
-- top = domain->nstrings;
-- while (bottom < top)
-- {
-- int cmp_val;
--
-- act = (bottom + top) / 2;
-- cmp_val = strcmp (msgid, domain->data
-- + W (domain->must_swap,
-- domain->orig_tab[act].offset));
-- if (cmp_val < 0)
-- top = act;
-- else if (cmp_val > 0)
-- bottom = act + 1;
-- else
-- break;
-- }
--
-- /* If an translation is found return this. */
-- return bottom >= top ? NULL : (char *) domain->data
-- + W (domain->must_swap,
-- domain->trans_tab[act].offset);
--}
--
--
--/* Return string representation of locale CATEGORY. */
--static const char *
--category_to_name (category)
-- int category;
--{
-- const char *retval;
--
-- switch (category)
-- {
--#ifdef LC_COLLATE
-- case LC_COLLATE:
-- retval = "LC_COLLATE";
-- break;
--#endif
--#ifdef LC_CTYPE
-- case LC_CTYPE:
-- retval = "LC_CTYPE";
-- break;
--#endif
--#ifdef LC_MONETARY
-- case LC_MONETARY:
-- retval = "LC_MONETARY";
-- break;
--#endif
--#ifdef LC_NUMERIC
-- case LC_NUMERIC:
-- retval = "LC_NUMERIC";
-- break;
--#endif
--#ifdef LC_TIME
-- case LC_TIME:
-- retval = "LC_TIME";
-- break;
--#endif
--#ifdef LC_MESSAGES
-- case LC_MESSAGES:
-- retval = "LC_MESSAGES";
-- break;
--#endif
--#ifdef LC_RESPONSE
-- case LC_RESPONSE:
-- retval = "LC_RESPONSE";
-- break;
--#endif
--#ifdef LC_ALL
-- case LC_ALL:
-- /* This might not make sense but is perhaps better than any other
-- value. */
-- retval = "LC_ALL";
-- break;
--#endif
-- default:
-- /* If you have a better idea for a default value let me know. */
-- retval = "LC_XXX";
-- }
--
-- return retval;
--}
--
--/* Guess value of current locale from value of the environment variables. */
--static const char *
--guess_category_value (category, categoryname)
-- int category;
-- const char *categoryname;
--{
-- const char *retval;
--
-- /* The highest priority value is the `LANGUAGE' environment
-- variable. This is a GNU extension. */
-- retval = getenv ("LANGUAGE");
-- if (retval != NULL && retval[0] != '\0')
-- return retval;
--
-- /* `LANGUAGE' is not set. So we have to proceed with the POSIX
-- methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
-- systems this can be done by the `setlocale' function itself. */
--#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
-- return setlocale (category, NULL);
--#else
-- /* Setting of LC_ALL overwrites all other. */
-- retval = getenv ("LC_ALL");
-- if (retval != NULL && retval[0] != '\0')
-- return retval;
--
-- /* Next comes the name of the desired category. */
-- retval = getenv (categoryname);
-- if (retval != NULL && retval[0] != '\0')
-- return retval;
--
-- /* Last possibility is the LANG environment variable. */
-- retval = getenv ("LANG");
-- if (retval != NULL && retval[0] != '\0')
-- return retval;
--
-- /* We use C as the default domain. POSIX says this is implementation
-- defined. */
-- return "C";
--#endif
--}
--
--/* @@ begin of epilog @@ */
--
--/* We don't want libintl.a to depend on any other library. So we
-- avoid the non-standard function stpcpy. In GNU C Library this
-- function is available, though. Also allow the symbol HAVE_STPCPY
-- to be defined. */
--#if !_LIBC && !HAVE_STPCPY
--static char *
--stpcpy (dest, src)
-- char *dest;
-- const char *src;
--{
-- while ((*dest++ = *src++) != '\0')
-- /* Do nothing. */ ;
-- return dest - 1;
--}
--#endif
---- lrzsz-0.12.20.safe/intl/dcigettext.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/dcigettext.c 2004-09-12 14:40:34.369745960 -0400
-@@ -0,0 +1,1219 @@
-+/* Implementation of the internal dcigettext function.
-+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
-+ This must come before <config.h> because <config.h> may include
-+ <features.h>, and once <features.h> has been included, it's too late. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <sys/types.h>
-+
-+#ifdef __GNUC__
-+# define alloca __builtin_alloca
-+# define HAVE_ALLOCA 1
-+#else
-+# ifdef _MSC_VER
-+# include <malloc.h>
-+# define alloca _alloca
-+# else
-+# if defined HAVE_ALLOCA_H || defined _LIBC
-+# include <alloca.h>
-+# else
-+# ifdef _AIX
-+ #pragma alloca
-+# else
-+# ifndef alloca
-+char *alloca ();
-+# endif
-+# endif
-+# endif
-+# endif
-+#endif
-+
-+#include <errno.h>
-+#ifndef errno
-+extern int errno;
-+#endif
-+#ifndef __set_errno
-+# define __set_errno(val) errno = (val)
-+#endif
-+
-+#include <stddef.h>
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#if defined HAVE_UNISTD_H || defined _LIBC
-+# include <unistd.h>
-+#endif
-+
-+#include <locale.h>
-+
-+#ifdef _LIBC
-+ /* Guess whether integer division by zero raises signal SIGFPE.
-+ Set to 1 only if you know for sure. In case of doubt, set to 0. */
-+# if defined __alpha__ || defined __arm__ || defined __i386__ \
-+ || defined __m68k__ || defined __s390__
-+# define INTDIV0_RAISES_SIGFPE 1
-+# else
-+# define INTDIV0_RAISES_SIGFPE 0
-+# endif
-+#endif
-+#if !INTDIV0_RAISES_SIGFPE
-+# include <signal.h>
-+#endif
-+
-+#if defined HAVE_SYS_PARAM_H || defined _LIBC
-+# include <sys/param.h>
-+#endif
-+
-+#include "gettextP.h"
-+#include "plural-exp.h"
-+#ifdef _LIBC
-+# include <libintl.h>
-+#else
-+# include "libgnuintl.h"
-+#endif
-+#include "hash-string.h"
-+
-+/* Thread safetyness. */
-+#ifdef _LIBC
-+# include <bits/libc-lock.h>
-+#else
-+/* Provide dummy implementation if this is outside glibc. */
-+# define __libc_lock_define_initialized(CLASS, NAME)
-+# define __libc_lock_lock(NAME)
-+# define __libc_lock_unlock(NAME)
-+# define __libc_rwlock_define_initialized(CLASS, NAME)
-+# define __libc_rwlock_rdlock(NAME)
-+# define __libc_rwlock_unlock(NAME)
-+#endif
-+
-+/* Alignment of types. */
-+#if defined __GNUC__ && __GNUC__ >= 2
-+# define alignof(TYPE) __alignof__ (TYPE)
-+#else
-+# define alignof(TYPE) \
-+ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
-+#endif
-+
-+/* The internal variables in the standalone libintl.a must have different
-+ names than the internal variables in GNU libc, otherwise programs
-+ using libintl.a cannot be linked statically. */
-+#if !defined _LIBC
-+# define _nl_default_default_domain libintl_nl_default_default_domain
-+# define _nl_current_default_domain libintl_nl_current_default_domain
-+# define _nl_default_dirname libintl_nl_default_dirname
-+# define _nl_domain_bindings libintl_nl_domain_bindings
-+#endif
-+
-+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
-+#ifndef offsetof
-+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
-+#endif
-+
-+/* @@ end of prolog @@ */
-+
-+#ifdef _LIBC
-+/* Rename the non ANSI C functions. This is required by the standard
-+ because some ANSI C functions will require linking with this object
-+ file and the name space must not be polluted. */
-+# define getcwd __getcwd
-+# ifndef stpcpy
-+# define stpcpy __stpcpy
-+# endif
-+# define tfind __tfind
-+#else
-+# if !defined HAVE_GETCWD
-+char *getwd ();
-+# define getcwd(buf, max) getwd (buf)
-+# else
-+# if VMS
-+# define getcwd(buf, max) (getcwd) (buf, max, 0)
-+# else
-+char *getcwd ();
-+# endif
-+# endif
-+# ifndef HAVE_STPCPY
-+static char *stpcpy (char *dest, const char *src);
-+# endif
-+# ifndef HAVE_MEMPCPY
-+static void *mempcpy (void *dest, const void *src, size_t n);
-+# endif
-+#endif
-+
-+/* Amount to increase buffer size by in each try. */
-+#define PATH_INCR 32
-+
-+/* The following is from pathmax.h. */
-+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
-+ PATH_MAX but might cause redefinition warnings when sys/param.h is
-+ later included (as on MORE/BSD 4.3). */
-+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
-+# include <limits.h>
-+#endif
-+
-+#ifndef _POSIX_PATH_MAX
-+# define _POSIX_PATH_MAX 255
-+#endif
-+
-+#if !defined PATH_MAX && defined _PC_PATH_MAX
-+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
-+#endif
-+
-+/* Don't include sys/param.h if it already has been. */
-+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
-+# include <sys/param.h>
-+#endif
-+
-+#if !defined PATH_MAX && defined MAXPATHLEN
-+# define PATH_MAX MAXPATHLEN
-+#endif
-+
-+#ifndef PATH_MAX
-+# define PATH_MAX _POSIX_PATH_MAX
-+#endif
-+
-+/* Pathname support.
-+ ISSLASH(C) tests whether C is a directory separator character.
-+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
-+ it may be concatenated to a directory pathname.
-+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
-+ */
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
-+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-+# define HAS_DEVICE(P) \
-+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-+ && (P)[1] == ':')
-+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
-+# define IS_PATH_WITH_DIR(P) \
-+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
-+#else
-+ /* Unix */
-+# define ISSLASH(C) ((C) == '/')
-+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
-+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
-+#endif
-+
-+/* This is the type used for the search tree where known translations
-+ are stored. */
-+struct known_translation_t
-+{
-+ /* Domain in which to search. */
-+ char *domainname;
-+
-+ /* The category. */
-+ int category;
-+
-+ /* State of the catalog counter at the point the string was found. */
-+ int counter;
-+
-+ /* Catalog where the string was found. */
-+ struct loaded_l10nfile *domain;
-+
-+ /* And finally the translation. */
-+ const char *translation;
-+ size_t translation_length;
-+
-+ /* Pointer to the string in question. */
-+ char msgid[ZERO];
-+};
-+
-+/* Root of the search tree with known translations. We can use this
-+ only if the system provides the `tsearch' function family. */
-+#if defined HAVE_TSEARCH || defined _LIBC
-+# include <search.h>
-+
-+static void *root;
-+
-+# ifdef _LIBC
-+# define tsearch __tsearch
-+# endif
-+
-+/* Function to compare two entries in the table of known translations. */
-+static int
-+transcmp (const void *p1, const void *p2)
-+{
-+ const struct known_translation_t *s1;
-+ const struct known_translation_t *s2;
-+ int result;
-+
-+ s1 = (const struct known_translation_t *) p1;
-+ s2 = (const struct known_translation_t *) p2;
-+
-+ result = strcmp (s1->msgid, s2->msgid);
-+ if (result == 0)
-+ {
-+ result = strcmp (s1->domainname, s2->domainname);
-+ if (result == 0)
-+ /* We compare the category last (though this is the cheapest
-+ operation) since it is hopefully always the same (namely
-+ LC_MESSAGES). */
-+ result = s1->category - s2->category;
-+ }
-+
-+ return result;
-+}
-+#endif
-+
-+#ifndef INTVARDEF
-+# define INTVARDEF(name)
-+#endif
-+#ifndef INTUSE
-+# define INTUSE(name) name
-+#endif
-+
-+/* Name of the default domain used for gettext(3) prior any call to
-+ textdomain(3). The default value for this is "messages". */
-+const char _nl_default_default_domain[] attribute_hidden = "messages";
-+
-+/* Value used as the default domain for gettext(3). */
-+const char *_nl_current_default_domain attribute_hidden
-+ = _nl_default_default_domain;
-+
-+/* Contains the default location of the message catalogs. */
-+#if defined __EMX__
-+extern const char _nl_default_dirname[];
-+#else
-+const char _nl_default_dirname[] = LOCALEDIR;
-+INTVARDEF (_nl_default_dirname)
-+#endif
-+
-+/* List with bindings of specific domains created by bindtextdomain()
-+ calls. */
-+struct binding *_nl_domain_bindings;
-+
-+/* Prototypes for local functions. */
-+static char *plural_lookup (struct loaded_l10nfile *domain,
-+ unsigned long int n,
-+ const char *translation, size_t translation_len)
-+ internal_function;
-+static const char *guess_category_value (int category,
-+ const char *categoryname)
-+ internal_function;
-+#ifdef _LIBC
-+# include "../locale/localeinfo.h"
-+# define category_to_name(category) _nl_category_names[category]
-+#else
-+static const char *category_to_name (int category) internal_function;
-+#endif
-+
-+
-+/* For those loosing systems which don't have `alloca' we have to add
-+ some additional code emulating it. */
-+#ifdef HAVE_ALLOCA
-+/* Nothing has to be done. */
-+# define freea(p) /* nothing */
-+# define ADD_BLOCK(list, address) /* nothing */
-+# define FREE_BLOCKS(list) /* nothing */
-+#else
-+struct block_list
-+{
-+ void *address;
-+ struct block_list *next;
-+};
-+# define ADD_BLOCK(list, addr) \
-+ do { \
-+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
-+ /* If we cannot get a free block we cannot add the new element to \
-+ the list. */ \
-+ if (newp != NULL) { \
-+ newp->address = (addr); \
-+ newp->next = (list); \
-+ (list) = newp; \
-+ } \
-+ } while (0)
-+# define FREE_BLOCKS(list) \
-+ do { \
-+ while (list != NULL) { \
-+ struct block_list *old = list; \
-+ list = list->next; \
-+ free (old->address); \
-+ free (old); \
-+ } \
-+ } while (0)
-+# undef alloca
-+# define alloca(size) (malloc (size))
-+# define freea(p) free (p)
-+#endif /* have alloca */
-+
-+
-+#ifdef _LIBC
-+/* List of blocks allocated for translations. */
-+typedef struct transmem_list
-+{
-+ struct transmem_list *next;
-+ char data[ZERO];
-+} transmem_block_t;
-+static struct transmem_list *transmem_list;
-+#else
-+typedef unsigned char transmem_block_t;
-+#endif
-+
-+
-+/* Names for the libintl functions are a problem. They must not clash
-+ with existing names and they should follow ANSI C. But this source
-+ code is also used in GNU C Library where the names have a __
-+ prefix. So we have to make a difference here. */
-+#ifdef _LIBC
-+# define DCIGETTEXT __dcigettext
-+#else
-+# define DCIGETTEXT libintl_dcigettext
-+#endif
-+
-+/* Lock variable to protect the global data in the gettext implementation. */
-+#ifdef _LIBC
-+__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
-+#endif
-+
-+/* Checking whether the binaries runs SUID must be done and glibc provides
-+ easier methods therefore we make a difference here. */
-+#ifdef _LIBC
-+# define ENABLE_SECURE __libc_enable_secure
-+# define DETERMINE_SECURE
-+#else
-+# ifndef HAVE_GETUID
-+# define getuid() 0
-+# endif
-+# ifndef HAVE_GETGID
-+# define getgid() 0
-+# endif
-+# ifndef HAVE_GETEUID
-+# define geteuid() getuid()
-+# endif
-+# ifndef HAVE_GETEGID
-+# define getegid() getgid()
-+# endif
-+static int enable_secure;
-+# define ENABLE_SECURE (enable_secure == 1)
-+# define DETERMINE_SECURE \
-+ if (enable_secure == 0) \
-+ { \
-+ if (getuid () != geteuid () || getgid () != getegid ()) \
-+ enable_secure = 1; \
-+ else \
-+ enable_secure = -1; \
-+ }
-+#endif
-+
-+/* Get the function to evaluate the plural expression. */
-+#include "eval-plural.h"
-+
-+/* Look up MSGID in the DOMAINNAME message catalog for the current
-+ CATEGORY locale and, if PLURAL is nonzero, search over string
-+ depending on the plural form determined by N. */
-+char *
-+DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
-+ int plural, unsigned long int n, int category)
-+{
-+#ifndef HAVE_ALLOCA
-+ struct block_list *block_list = NULL;
-+#endif
-+ struct loaded_l10nfile *domain;
-+ struct binding *binding;
-+ const char *categoryname;
-+ const char *categoryvalue;
-+ char *dirname, *xdomainname;
-+ char *single_locale;
-+ char *retval;
-+ size_t retlen;
-+ int saved_errno;
-+#if defined HAVE_TSEARCH || defined _LIBC
-+ struct known_translation_t *search;
-+ struct known_translation_t **foundp = NULL;
-+ size_t msgid_len;
-+#endif
-+ size_t domainname_len;
-+
-+ /* If no real MSGID is given return NULL. */
-+ if (msgid1 == NULL)
-+ return NULL;
-+
-+#ifdef _LIBC
-+ if (category < 0 || category >= __LC_LAST || category == LC_ALL)
-+ /* Bogus. */
-+ return (plural == 0
-+ ? (char *) msgid1
-+ /* Use the Germanic plural rule. */
-+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
-+#endif
-+
-+ __libc_rwlock_rdlock (_nl_state_lock);
-+
-+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
-+ CATEGORY is not LC_MESSAGES this might not make much sense but the
-+ definition left this undefined. */
-+ if (domainname == NULL)
-+ domainname = _nl_current_default_domain;
-+
-+ /* OS/2 specific: backward compatibility with older libintl versions */
-+#ifdef LC_MESSAGES_COMPAT
-+ if (category == LC_MESSAGES_COMPAT)
-+ category = LC_MESSAGES;
-+#endif
-+
-+#if defined HAVE_TSEARCH || defined _LIBC
-+ msgid_len = strlen (msgid1) + 1;
-+
-+ /* Try to find the translation among those which we found at
-+ some time. */
-+ search = (struct known_translation_t *)
-+ alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
-+ memcpy (search->msgid, msgid1, msgid_len);
-+ search->domainname = (char *) domainname;
-+ search->category = category;
-+
-+ foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
-+ freea (search);
-+ if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
-+ {
-+ /* Now deal with plural. */
-+ if (plural)
-+ retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
-+ (*foundp)->translation_length);
-+ else
-+ retval = (char *) (*foundp)->translation;
-+
-+ __libc_rwlock_unlock (_nl_state_lock);
-+ return retval;
-+ }
-+#endif
-+
-+ /* Preserve the `errno' value. */
-+ saved_errno = errno;
-+
-+ /* See whether this is a SUID binary or not. */
-+ DETERMINE_SECURE;
-+
-+ /* First find matching binding. */
-+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
-+ {
-+ int compare = strcmp (domainname, binding->domainname);
-+ if (compare == 0)
-+ /* We found it! */
-+ break;
-+ if (compare < 0)
-+ {
-+ /* It is not in the list. */
-+ binding = NULL;
-+ break;
-+ }
-+ }
-+
-+ if (binding == NULL)
-+ dirname = (char *) INTUSE(_nl_default_dirname);
-+ else if (IS_ABSOLUTE_PATH (binding->dirname))
-+ dirname = binding->dirname;
-+ else
-+ {
-+ /* We have a relative path. Make it absolute now. */
-+ size_t dirname_len = strlen (binding->dirname) + 1;
-+ size_t path_max;
-+ char *ret;
-+
-+ path_max = (unsigned int) PATH_MAX;
-+ path_max += 2; /* The getcwd docs say to do this. */
-+
-+ for (;;)
-+ {
-+ dirname = (char *) alloca (path_max + dirname_len);
-+ ADD_BLOCK (block_list, dirname);
-+
-+ __set_errno (0);
-+ ret = getcwd (dirname, path_max);
-+ if (ret != NULL || errno != ERANGE)
-+ break;
-+
-+ path_max += path_max / 2;
-+ path_max += PATH_INCR;
-+ }
-+
-+ if (ret == NULL)
-+ /* We cannot get the current working directory. Don't signal an
-+ error but simply return the default string. */
-+ goto return_untranslated;
-+
-+ stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
-+ }
-+
-+ /* Now determine the symbolic name of CATEGORY and its value. */
-+ categoryname = category_to_name (category);
-+ categoryvalue = guess_category_value (category, categoryname);
-+
-+ domainname_len = strlen (domainname);
-+ xdomainname = (char *) alloca (strlen (categoryname)
-+ + domainname_len + 5);
-+ ADD_BLOCK (block_list, xdomainname);
-+
-+ stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
-+ domainname, domainname_len),
-+ ".mo");
-+
-+ /* Creating working area. */
-+ single_locale = (char *) alloca (strlen (categoryvalue) + 1);
-+ ADD_BLOCK (block_list, single_locale);
-+
-+
-+ /* Search for the given string. This is a loop because we perhaps
-+ got an ordered list of languages to consider for the translation. */
-+ while (1)
-+ {
-+ /* Make CATEGORYVALUE point to the next element of the list. */
-+ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
-+ ++categoryvalue;
-+ if (categoryvalue[0] == '\0')
-+ {
-+ /* The whole contents of CATEGORYVALUE has been searched but
-+ no valid entry has been found. We solve this situation
-+ by implicitly appending a "C" entry, i.e. no translation
-+ will take place. */
-+ single_locale[0] = 'C';
-+ single_locale[1] = '\0';
-+ }
-+ else
-+ {
-+ char *cp = single_locale;
-+ while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
-+ *cp++ = *categoryvalue++;
-+ *cp = '\0';
-+
-+ /* When this is a SUID binary we must not allow accessing files
-+ outside the dedicated directories. */
-+ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
-+ /* Ingore this entry. */
-+ continue;
-+ }
-+
-+ /* If the current locale value is C (or POSIX) we don't load a
-+ domain. Return the MSGID. */
-+ if (strcmp (single_locale, "C") == 0
-+ || strcmp (single_locale, "POSIX") == 0)
-+ break;
-+
-+ /* Find structure describing the message catalog matching the
-+ DOMAINNAME and CATEGORY. */
-+ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
-+
-+ if (domain != NULL)
-+ {
-+ retval = _nl_find_msg (domain, binding, msgid1, &retlen);
-+
-+ if (retval == NULL)
-+ {
-+ int cnt;
-+
-+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
-+ {
-+ retval = _nl_find_msg (domain->successor[cnt], binding,
-+ msgid1, &retlen);
-+
-+ if (retval != NULL)
-+ {
-+ domain = domain->successor[cnt];
-+ break;
-+ }
-+ }
-+ }
-+
-+ if (retval != NULL)
-+ {
-+ /* Found the translation of MSGID1 in domain DOMAIN:
-+ starting at RETVAL, RETLEN bytes. */
-+ FREE_BLOCKS (block_list);
-+#if defined HAVE_TSEARCH || defined _LIBC
-+ if (foundp == NULL)
-+ {
-+ /* Create a new entry and add it to the search tree. */
-+ struct known_translation_t *newp;
-+
-+ newp = (struct known_translation_t *)
-+ malloc (offsetof (struct known_translation_t, msgid)
-+ + msgid_len + domainname_len + 1);
-+ if (newp != NULL)
-+ {
-+ newp->domainname =
-+ mempcpy (newp->msgid, msgid1, msgid_len);
-+ memcpy (newp->domainname, domainname, domainname_len + 1);
-+ newp->category = category;
-+ newp->counter = _nl_msg_cat_cntr;
-+ newp->domain = domain;
-+ newp->translation = retval;
-+ newp->translation_length = retlen;
-+
-+ /* Insert the entry in the search tree. */
-+ foundp = (struct known_translation_t **)
-+ tsearch (newp, &root, transcmp);
-+ if (foundp == NULL
-+ || __builtin_expect (*foundp != newp, 0))
-+ /* The insert failed. */
-+ free (newp);
-+ }
-+ }
-+ else
-+ {
-+ /* We can update the existing entry. */
-+ (*foundp)->counter = _nl_msg_cat_cntr;
-+ (*foundp)->domain = domain;
-+ (*foundp)->translation = retval;
-+ (*foundp)->translation_length = retlen;
-+ }
-+#endif
-+ __set_errno (saved_errno);
-+
-+ /* Now deal with plural. */
-+ if (plural)
-+ retval = plural_lookup (domain, n, retval, retlen);
-+
-+ __libc_rwlock_unlock (_nl_state_lock);
-+ return retval;
-+ }
-+ }
-+ }
-+
-+ return_untranslated:
-+ /* Return the untranslated MSGID. */
-+ FREE_BLOCKS (block_list);
-+ __libc_rwlock_unlock (_nl_state_lock);
-+#ifndef _LIBC
-+ if (!ENABLE_SECURE)
-+ {
-+ extern void _nl_log_untranslated (const char *logfilename,
-+ const char *domainname,
-+ const char *msgid1, const char *msgid2,
-+ int plural);
-+ const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
-+
-+ if (logfilename != NULL && logfilename[0] != '\0')
-+ _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
-+ }
-+#endif
-+ __set_errno (saved_errno);
-+ return (plural == 0
-+ ? (char *) msgid1
-+ /* Use the Germanic plural rule. */
-+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
-+}
-+
-+
-+char *
-+internal_function
-+_nl_find_msg (struct loaded_l10nfile *domain_file,
-+ struct binding *domainbinding, const char *msgid,
-+ size_t *lengthp)
-+{
-+ struct loaded_domain *domain;
-+ nls_uint32 nstrings;
-+ size_t act;
-+ char *result;
-+ size_t resultlen;
-+
-+ if (domain_file->decided == 0)
-+ _nl_load_domain (domain_file, domainbinding);
-+
-+ if (domain_file->data == NULL)
-+ return NULL;
-+
-+ domain = (struct loaded_domain *) domain_file->data;
-+
-+ nstrings = domain->nstrings;
-+
-+ /* Locate the MSGID and its translation. */
-+ if (domain->hash_tab != NULL)
-+ {
-+ /* Use the hashing table. */
-+ nls_uint32 len = strlen (msgid);
-+ nls_uint32 hash_val = hash_string (msgid);
-+ nls_uint32 idx = hash_val % domain->hash_size;
-+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
-+
-+ while (1)
-+ {
-+ nls_uint32 nstr =
-+ W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
-+
-+ if (nstr == 0)
-+ /* Hash table entry is empty. */
-+ return NULL;
-+
-+ nstr--;
-+
-+ /* Compare msgid with the original string at index nstr.
-+ We compare the lengths with >=, not ==, because plural entries
-+ are represented by strings with an embedded NUL. */
-+ if (nstr < nstrings
-+ ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
-+ && (strcmp (msgid,
-+ domain->data + W (domain->must_swap,
-+ domain->orig_tab[nstr].offset))
-+ == 0)
-+ : domain->orig_sysdep_tab[nstr - nstrings].length > len
-+ && (strcmp (msgid,
-+ domain->orig_sysdep_tab[nstr - nstrings].pointer)
-+ == 0))
-+ {
-+ act = nstr;
-+ goto found;
-+ }
-+
-+ if (idx >= domain->hash_size - incr)
-+ idx -= domain->hash_size - incr;
-+ else
-+ idx += incr;
-+ }
-+ /* NOTREACHED */
-+ }
-+ else
-+ {
-+ /* Try the default method: binary search in the sorted array of
-+ messages. */
-+ size_t top, bottom;
-+
-+ bottom = 0;
-+ top = nstrings;
-+ while (bottom < top)
-+ {
-+ int cmp_val;
-+
-+ act = (bottom + top) / 2;
-+ cmp_val = strcmp (msgid, (domain->data
-+ + W (domain->must_swap,
-+ domain->orig_tab[act].offset)));
-+ if (cmp_val < 0)
-+ top = act;
-+ else if (cmp_val > 0)
-+ bottom = act + 1;
-+ else
-+ goto found;
-+ }
-+ /* No translation was found. */
-+ return NULL;
-+ }
-+
-+ found:
-+ /* The translation was found at index ACT. If we have to convert the
-+ string to use a different character set, this is the time. */
-+ if (act < nstrings)
-+ {
-+ result = (char *)
-+ (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
-+ resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
-+ }
-+ else
-+ {
-+ result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
-+ resultlen = domain->trans_sysdep_tab[act - nstrings].length;
-+ }
-+
-+#if defined _LIBC || HAVE_ICONV
-+ if (domain->codeset_cntr
-+ != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
-+ {
-+ /* The domain's codeset has changed through bind_textdomain_codeset()
-+ since the message catalog was initialized or last accessed. We
-+ have to reinitialize the converter. */
-+ _nl_free_domain_conv (domain);
-+ _nl_init_domain_conv (domain_file, domain, domainbinding);
-+ }
-+
-+ if (
-+# ifdef _LIBC
-+ domain->conv != (__gconv_t) -1
-+# else
-+# if HAVE_ICONV
-+ domain->conv != (iconv_t) -1
-+# endif
-+# endif
-+ )
-+ {
-+ /* We are supposed to do a conversion. First allocate an
-+ appropriate table with the same structure as the table
-+ of translations in the file, where we can put the pointers
-+ to the converted strings in.
-+ There is a slight complication with plural entries. They
-+ are represented by consecutive NUL terminated strings. We
-+ handle this case by converting RESULTLEN bytes, including
-+ NULs. */
-+
-+ if (domain->conv_tab == NULL
-+ && ((domain->conv_tab =
-+ (char **) calloc (nstrings + domain->n_sysdep_strings,
-+ sizeof (char *)))
-+ == NULL))
-+ /* Mark that we didn't succeed allocating a table. */
-+ domain->conv_tab = (char **) -1;
-+
-+ if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
-+ /* Nothing we can do, no more memory. */
-+ goto converted;
-+
-+ if (domain->conv_tab[act] == NULL)
-+ {
-+ /* We haven't used this string so far, so it is not
-+ translated yet. Do this now. */
-+ /* We use a bit more efficient memory handling.
-+ We allocate always larger blocks which get used over
-+ time. This is faster than many small allocations. */
-+ __libc_lock_define_initialized (static, lock)
-+# define INITIAL_BLOCK_SIZE 4080
-+ static unsigned char *freemem;
-+ static size_t freemem_size;
-+
-+ const unsigned char *inbuf;
-+ unsigned char *outbuf;
-+ int malloc_count;
-+# ifndef _LIBC
-+ transmem_block_t *transmem_list = NULL;
-+# endif
-+
-+ __libc_lock_lock (lock);
-+
-+ inbuf = (const unsigned char *) result;
-+ outbuf = freemem + sizeof (size_t);
-+
-+ malloc_count = 0;
-+ while (1)
-+ {
-+ transmem_block_t *newmem;
-+# ifdef _LIBC
-+ size_t non_reversible;
-+ int res;
-+
-+ if (freemem_size < sizeof (size_t))
-+ goto resize_freemem;
-+
-+ res = __gconv (domain->conv,
-+ &inbuf, inbuf + resultlen,
-+ &outbuf,
-+ outbuf + freemem_size - sizeof (size_t),
-+ &non_reversible);
-+
-+ if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
-+ break;
-+
-+ if (res != __GCONV_FULL_OUTPUT)
-+ {
-+ __libc_lock_unlock (lock);
-+ goto converted;
-+ }
-+
-+ inbuf = result;
-+# else
-+# if HAVE_ICONV
-+ const char *inptr = (const char *) inbuf;
-+ size_t inleft = resultlen;
-+ char *outptr = (char *) outbuf;
-+ size_t outleft;
-+
-+ if (freemem_size < sizeof (size_t))
-+ goto resize_freemem;
-+
-+ outleft = freemem_size - sizeof (size_t);
-+ if (iconv (domain->conv,
-+ (ICONV_CONST char **) &inptr, &inleft,
-+ &outptr, &outleft)
-+ != (size_t) (-1))
-+ {
-+ outbuf = (unsigned char *) outptr;
-+ break;
-+ }
-+ if (errno != E2BIG)
-+ {
-+ __libc_lock_unlock (lock);
-+ goto converted;
-+ }
-+# endif
-+# endif
-+
-+ resize_freemem:
-+ /* We must allocate a new buffer or resize the old one. */
-+ if (malloc_count > 0)
-+ {
-+ ++malloc_count;
-+ freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
-+ newmem = (transmem_block_t *) realloc (transmem_list,
-+ freemem_size);
-+# ifdef _LIBC
-+ if (newmem != NULL)
-+ transmem_list = transmem_list->next;
-+ else
-+ {
-+ struct transmem_list *old = transmem_list;
-+
-+ transmem_list = transmem_list->next;
-+ free (old);
-+ }
-+# endif
-+ }
-+ else
-+ {
-+ malloc_count = 1;
-+ freemem_size = INITIAL_BLOCK_SIZE;
-+ newmem = (transmem_block_t *) malloc (freemem_size);
-+ }
-+ if (__builtin_expect (newmem == NULL, 0))
-+ {
-+ freemem = NULL;
-+ freemem_size = 0;
-+ __libc_lock_unlock (lock);
-+ goto converted;
-+ }
-+
-+# ifdef _LIBC
-+ /* Add the block to the list of blocks we have to free
-+ at some point. */
-+ newmem->next = transmem_list;
-+ transmem_list = newmem;
-+
-+ freemem = newmem->data;
-+ freemem_size -= offsetof (struct transmem_list, data);
-+# else
-+ transmem_list = newmem;
-+ freemem = newmem;
-+# endif
-+
-+ outbuf = freemem + sizeof (size_t);
-+ }
-+
-+ /* We have now in our buffer a converted string. Put this
-+ into the table of conversions. */
-+ *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
-+ domain->conv_tab[act] = (char *) freemem;
-+ /* Shrink freemem, but keep it aligned. */
-+ freemem_size -= outbuf - freemem;
-+ freemem = outbuf;
-+ freemem += freemem_size & (alignof (size_t) - 1);
-+ freemem_size = freemem_size & ~ (alignof (size_t) - 1);
-+
-+ __libc_lock_unlock (lock);
-+ }
-+
-+ /* Now domain->conv_tab[act] contains the translation of all
-+ the plural variants. */
-+ result = domain->conv_tab[act] + sizeof (size_t);
-+ resultlen = *(size_t *) domain->conv_tab[act];
-+ }
-+
-+ converted:
-+ /* The result string is converted. */
-+
-+#endif /* _LIBC || HAVE_ICONV */
-+
-+ *lengthp = resultlen;
-+ return result;
-+}
-+
-+
-+/* Look up a plural variant. */
-+static char *
-+internal_function
-+plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
-+ const char *translation, size_t translation_len)
-+{
-+ struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
-+ unsigned long int index;
-+ const char *p;
-+
-+ index = plural_eval (domaindata->plural, n);
-+ if (index >= domaindata->nplurals)
-+ /* This should never happen. It means the plural expression and the
-+ given maximum value do not match. */
-+ index = 0;
-+
-+ /* Skip INDEX strings at TRANSLATION. */
-+ p = translation;
-+ while (index-- > 0)
-+ {
-+#ifdef _LIBC
-+ p = __rawmemchr (p, '\0');
-+#else
-+ p = strchr (p, '\0');
-+#endif
-+ /* And skip over the NUL byte. */
-+ p++;
-+
-+ if (p >= translation + translation_len)
-+ /* This should never happen. It means the plural expression
-+ evaluated to a value larger than the number of variants
-+ available for MSGID1. */
-+ return (char *) translation;
-+ }
-+ return (char *) p;
-+}
-+
-+#ifndef _LIBC
-+/* Return string representation of locale CATEGORY. */
-+static const char *
-+internal_function
-+category_to_name (int category)
-+{
-+ const char *retval;
-+
-+ switch (category)
-+ {
-+#ifdef LC_COLLATE
-+ case LC_COLLATE:
-+ retval = "LC_COLLATE";
-+ break;
-+#endif
-+#ifdef LC_CTYPE
-+ case LC_CTYPE:
-+ retval = "LC_CTYPE";
-+ break;
-+#endif
-+#ifdef LC_MONETARY
-+ case LC_MONETARY:
-+ retval = "LC_MONETARY";
-+ break;
-+#endif
-+#ifdef LC_NUMERIC
-+ case LC_NUMERIC:
-+ retval = "LC_NUMERIC";
-+ break;
-+#endif
-+#ifdef LC_TIME
-+ case LC_TIME:
-+ retval = "LC_TIME";
-+ break;
-+#endif
-+#ifdef LC_MESSAGES
-+ case LC_MESSAGES:
-+ retval = "LC_MESSAGES";
-+ break;
-+#endif
-+#ifdef LC_RESPONSE
-+ case LC_RESPONSE:
-+ retval = "LC_RESPONSE";
-+ break;
-+#endif
-+#ifdef LC_ALL
-+ case LC_ALL:
-+ /* This might not make sense but is perhaps better than any other
-+ value. */
-+ retval = "LC_ALL";
-+ break;
-+#endif
-+ default:
-+ /* If you have a better idea for a default value let me know. */
-+ retval = "LC_XXX";
-+ }
-+
-+ return retval;
-+}
-+#endif
-+
-+/* Guess value of current locale from value of the environment variables. */
-+static const char *
-+internal_function
-+guess_category_value (int category, const char *categoryname)
-+{
-+ const char *language;
-+ const char *retval;
-+
-+ /* The highest priority value is the `LANGUAGE' environment
-+ variable. But we don't use the value if the currently selected
-+ locale is the C locale. This is a GNU extension. */
-+ language = getenv ("LANGUAGE");
-+ if (language != NULL && language[0] == '\0')
-+ language = NULL;
-+
-+ /* We have to proceed with the POSIX methods of looking to `LC_ALL',
-+ `LC_xxx', and `LANG'. On some systems this can be done by the
-+ `setlocale' function itself. */
-+#ifdef _LIBC
-+ retval = __current_locale_name (category);
-+#else
-+ retval = _nl_locale_name (category, categoryname);
-+#endif
-+
-+ /* Ignore LANGUAGE if the locale is set to "C" because
-+ 1. "C" locale usually uses the ASCII encoding, and most international
-+ messages use non-ASCII characters. These characters get displayed
-+ as question marks (if using glibc's iconv()) or as invalid 8-bit
-+ characters (because other iconv()s refuse to convert most non-ASCII
-+ characters to ASCII). In any case, the output is ugly.
-+ 2. The precise output of some programs in the "C" locale is specified
-+ by POSIX and should not depend on environment variables like
-+ "LANGUAGE". We allow such programs to use gettext(). */
-+ return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
-+}
-+
-+/* @@ begin of epilog @@ */
-+
-+/* We don't want libintl.a to depend on any other library. So we
-+ avoid the non-standard function stpcpy. In GNU C Library this
-+ function is available, though. Also allow the symbol HAVE_STPCPY
-+ to be defined. */
-+#if !_LIBC && !HAVE_STPCPY
-+static char *
-+stpcpy (char *dest, const char *src)
-+{
-+ while ((*dest++ = *src++) != '\0')
-+ /* Do nothing. */ ;
-+ return dest - 1;
-+}
-+#endif
-+
-+#if !_LIBC && !HAVE_MEMPCPY
-+static void *
-+mempcpy (void *dest, const void *src, size_t n)
-+{
-+ return (void *) ((char *) memcpy (dest, src, n) + n);
-+}
-+#endif
-+
-+
-+#ifdef _LIBC
-+/* If we want to free all resources we have to do some work at
-+ program's end. */
-+libc_freeres_fn (free_mem)
-+{
-+ void *old;
-+
-+ while (_nl_domain_bindings != NULL)
-+ {
-+ struct binding *oldp = _nl_domain_bindings;
-+ _nl_domain_bindings = _nl_domain_bindings->next;
-+ if (oldp->dirname != INTUSE(_nl_default_dirname))
-+ /* Yes, this is a pointer comparison. */
-+ free (oldp->dirname);
-+ free (oldp->codeset);
-+ free (oldp);
-+ }
-+
-+ if (_nl_current_default_domain != _nl_default_default_domain)
-+ /* Yes, again a pointer comparison. */
-+ free ((char *) _nl_current_default_domain);
-+
-+ /* Remove the search tree with the known translations. */
-+ __tdestroy (root, free);
-+ root = NULL;
-+
-+ while (transmem_list != NULL)
-+ {
-+ old = transmem_list;
-+ transmem_list = transmem_list->next;
-+ free (old);
-+ }
-+}
-+#endif
---- lrzsz-0.12.20.safe/intl/dcngettext.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/dcngettext.c 2004-09-12 14:40:34.375745048 -0400
-@@ -0,0 +1,57 @@
-+/* Implementation of the dcngettext(3) function.
-+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include "gettextP.h"
-+#ifdef _LIBC
-+# include <libintl.h>
-+#else
-+# include "libgnuintl.h"
-+#endif
-+
-+/* @@ end of prolog @@ */
-+
-+/* Names for the libintl functions are a problem. They must not clash
-+ with existing names and they should follow ANSI C. But this source
-+ code is also used in GNU C Library where the names have a __
-+ prefix. So we have to make a difference here. */
-+#ifdef _LIBC
-+# define DCNGETTEXT __dcngettext
-+# define DCIGETTEXT __dcigettext
-+#else
-+# define DCNGETTEXT libintl_dcngettext
-+# define DCIGETTEXT libintl_dcigettext
-+#endif
-+
-+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
-+ locale. */
-+char *
-+DCNGETTEXT (const char *domainname,
-+ const char *msgid1, const char *msgid2, unsigned long int n,
-+ int category)
-+{
-+ return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
-+}
-+
-+#ifdef _LIBC
-+/* Alias for function name in GNU C Library. */
-+weak_alias (__dcngettext, dcngettext);
-+#endif
---- lrzsz-0.12.20.safe/intl/dgettext.c 1998-04-26 09:20:52.000000000 -0400
-+++ lrzsz-0.12.20/intl/dgettext.c 2004-09-12 14:40:34.380744288 -0400
-@@ -1,32 +1,33 @@
--/* dgettext.c -- implementation of the dgettext(3) function
-- Copyright (C) 1995 Software Foundation, Inc.
-+/* Implementation of the dgettext(3) function.
-+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
-
--This program is free software; you can redistribute it and/or modify
--it under the terms of the GNU General Public License as published by
--the Free Software Foundation; either version 2, or (at your option)
--any later version.
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--GNU General Public License for more details.
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
--You should have received a copy of the GNU General Public License
--along with this program; if not, write to the Free Software
--Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
--#if defined HAVE_LOCALE_H || defined _LIBC
--# include <locale.h>
--#endif
-+#include "gettextP.h"
-+
-+#include <locale.h>
-
- #ifdef _LIBC
- # include <libintl.h>
- #else
--# include "libgettext.h"
-+# include "libgnuintl.h"
- #endif
-
- /* @@ end of prolog @@ */
-@@ -37,18 +38,16 @@
- prefix. So we have to make a difference here. */
- #ifdef _LIBC
- # define DGETTEXT __dgettext
--# define DCGETTEXT __dcgettext
-+# define DCGETTEXT INTUSE(__dcgettext)
- #else
--# define DGETTEXT dgettext__
--# define DCGETTEXT dcgettext__
-+# define DGETTEXT libintl_dgettext
-+# define DCGETTEXT libintl_dcgettext
- #endif
-
- /* Look up MSGID in the DOMAINNAME message catalog of the current
- LC_MESSAGES locale. */
- char *
--DGETTEXT (domainname, msgid)
-- const char *domainname;
-- const char *msgid;
-+DGETTEXT (const char *domainname, const char *msgid)
- {
- return DCGETTEXT (domainname, msgid, LC_MESSAGES);
- }
---- lrzsz-0.12.20.safe/intl/dngettext.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/dngettext.c 2004-09-12 14:40:34.385743528 -0400
-@@ -0,0 +1,59 @@
-+/* Implementation of the dngettext(3) function.
-+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include "gettextP.h"
-+
-+#include <locale.h>
-+
-+#ifdef _LIBC
-+# include <libintl.h>
-+#else
-+# include "libgnuintl.h"
-+#endif
-+
-+/* @@ end of prolog @@ */
-+
-+/* Names for the libintl functions are a problem. They must not clash
-+ with existing names and they should follow ANSI C. But this source
-+ code is also used in GNU C Library where the names have a __
-+ prefix. So we have to make a difference here. */
-+#ifdef _LIBC
-+# define DNGETTEXT __dngettext
-+# define DCNGETTEXT __dcngettext
-+#else
-+# define DNGETTEXT libintl_dngettext
-+# define DCNGETTEXT libintl_dcngettext
-+#endif
-+
-+/* Look up MSGID in the DOMAINNAME message catalog of the current
-+ LC_MESSAGES locale and skip message according to the plural form. */
-+char *
-+DNGETTEXT (const char *domainname,
-+ const char *msgid1, const char *msgid2, unsigned long int n)
-+{
-+ return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
-+}
-+
-+#ifdef _LIBC
-+/* Alias for function name in GNU C Library. */
-+weak_alias (__dngettext, dngettext);
-+#endif
---- lrzsz-0.12.20.safe/intl/eval-plural.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/eval-plural.h 2004-09-12 14:40:34.390742768 -0400
-@@ -0,0 +1,108 @@
-+/* Plural expression evaluation.
-+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef STATIC
-+#define STATIC static
-+#endif
-+
-+/* Evaluate the plural expression and return an index value. */
-+STATIC
-+unsigned long int
-+internal_function
-+plural_eval (struct expression *pexp, unsigned long int n)
-+{
-+ switch (pexp->nargs)
-+ {
-+ case 0:
-+ switch (pexp->operation)
-+ {
-+ case var:
-+ return n;
-+ case num:
-+ return pexp->val.num;
-+ default:
-+ break;
-+ }
-+ /* NOTREACHED */
-+ break;
-+ case 1:
-+ {
-+ /* pexp->operation must be lnot. */
-+ unsigned long int arg = plural_eval (pexp->val.args[0], n);
-+ return ! arg;
-+ }
-+ case 2:
-+ {
-+ unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
-+ if (pexp->operation == lor)
-+ return leftarg || plural_eval (pexp->val.args[1], n);
-+ else if (pexp->operation == land)
-+ return leftarg && plural_eval (pexp->val.args[1], n);
-+ else
-+ {
-+ unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
-+
-+ switch (pexp->operation)
-+ {
-+ case mult:
-+ return leftarg * rightarg;
-+ case divide:
-+#if !INTDIV0_RAISES_SIGFPE
-+ if (rightarg == 0)
-+ raise (SIGFPE);
-+#endif
-+ return leftarg / rightarg;
-+ case module:
-+#if !INTDIV0_RAISES_SIGFPE
-+ if (rightarg == 0)
-+ raise (SIGFPE);
-+#endif
-+ return leftarg % rightarg;
-+ case plus:
-+ return leftarg + rightarg;
-+ case minus:
-+ return leftarg - rightarg;
-+ case less_than:
-+ return leftarg < rightarg;
-+ case greater_than:
-+ return leftarg > rightarg;
-+ case less_or_equal:
-+ return leftarg <= rightarg;
-+ case greater_or_equal:
-+ return leftarg >= rightarg;
-+ case equal:
-+ return leftarg == rightarg;
-+ case not_equal:
-+ return leftarg != rightarg;
-+ default:
-+ break;
-+ }
-+ }
-+ /* NOTREACHED */
-+ break;
-+ }
-+ case 3:
-+ {
-+ /* pexp->operation must be qmop. */
-+ unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
-+ return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
-+ }
-+ }
-+ /* NOTREACHED */
-+ return 0;
-+}
---- lrzsz-0.12.20.safe/intl/explodename.c 1998-04-26 09:22:37.000000000 -0400
-+++ lrzsz-0.12.20/intl/explodename.c 2004-09-12 14:40:34.395742008 -0400
-@@ -1,19 +1,20 @@
--/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-+/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
-@@ -36,18 +37,23 @@
-
- /* @@ end of prolog @@ */
-
-+char *
-+_nl_find_language (const char *name)
-+{
-+ while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
-+ && name[0] != '+' && name[0] != ',')
-+ ++name;
-+
-+ return (char *) name;
-+}
-+
-+
- int
--_nl_explode_name (name, language, modifier, territory, codeset,
-- normalized_codeset, special, sponsor, revision)
-- char *name;
-- const char **language;
-- const char **modifier;
-- const char **territory;
-- const char **codeset;
-- const char **normalized_codeset;
-- const char **special;
-- const char **sponsor;
-- const char **revision;
-+_nl_explode_name (char *name,
-+ const char **language, const char **modifier,
-+ const char **territory, const char **codeset,
-+ const char **normalized_codeset, const char **special,
-+ const char **sponsor, const char **revision)
- {
- enum { undecided, xpg, cen } syntax;
- char *cp;
-@@ -67,9 +73,7 @@
- mask = 0;
- syntax = undecided;
- *language = cp = name;
-- while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
-- && cp[0] != '+' && cp[0] != ',')
-- ++cp;
-+ cp = _nl_find_language (*language);
-
- if (*language == cp)
- /* This does not make sense: language has to be specified. Use
---- lrzsz-0.12.20.safe/intl/finddomain.c 1998-04-26 09:22:36.000000000 -0400
-+++ lrzsz-0.12.20/intl/finddomain.c 2004-09-12 14:40:34.415738968 -0400
-@@ -1,64 +1,40 @@
- /* Handle list of needed message catalogs
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
-+ Written by Ulrich Drepper <drepper@gnu.org>, 1995.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
--#include <ctype.h>
--#include <errno.h>
- #include <stdio.h>
- #include <sys/types.h>
--
--#if defined STDC_HEADERS || defined _LIBC
--# include <stdlib.h>
--#else
--# ifdef HAVE_MALLOC_H
--# include <malloc.h>
--# else
--void free ();
--# endif
--#endif
--
--#if defined HAVE_STRING_H || defined _LIBC
--# include <string.h>
--#else
--# include <strings.h>
--# ifndef memcpy
--# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
--# endif
--#endif
--#if !HAVE_STRCHR && !defined _LIBC
--# ifndef strchr
--# define strchr index
--# endif
--#endif
-+#include <stdlib.h>
-+#include <string.h>
-
- #if defined HAVE_UNISTD_H || defined _LIBC
- # include <unistd.h>
- #endif
-
--#include "gettext.h"
- #include "gettextP.h"
- #ifdef _LIBC
- # include <libintl.h>
- #else
--# include "libgettext.h"
-+# include "libgnuintl.h"
- #endif
-
- /* @@ end of prolog @@ */
-@@ -70,10 +46,9 @@
- the DOMAINNAME and CATEGORY parameters with respect to the currently
- established bindings. */
- struct loaded_l10nfile *
--_nl_find_domain (dirname, locale, domainname)
-- const char *dirname;
-- char *locale;
-- const char *domainname;
-+internal_function
-+_nl_find_domain (const char *dirname, char *locale,
-+ const char *domainname, struct binding *domainbinding)
- {
- struct loaded_l10nfile *retval;
- const char *language;
-@@ -95,9 +70,9 @@
-
- language[_territory][+audience][+special][,[sponsor][_revision]]
-
-- Beside the first all of them are allowed to be missing. If the
-- full specified locale is not found, the less specific one are
-- looked for. The various part will be stripped of according to
-+ Beside the first part all of them are allowed to be missing. If
-+ the full specified locale is not found, the less specific one are
-+ looked for. The various parts will be stripped off according to
- the following order:
- (1) revision
- (2) sponsor
-@@ -119,7 +94,7 @@
- int cnt;
-
- if (retval->decided == 0)
-- _nl_load_domain (retval);
-+ _nl_load_domain (retval, domainbinding);
-
- if (retval->data != NULL)
- return retval;
-@@ -127,7 +102,7 @@
- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
- {
- if (retval->successor[cnt]->decided == 0)
-- _nl_load_domain (retval->successor[cnt]);
-+ _nl_load_domain (retval->successor[cnt], domainbinding);
-
- if (retval->successor[cnt]->data != NULL)
- break;
-@@ -142,12 +117,18 @@
- alias_value = _nl_expand_alias (locale);
- if (alias_value != NULL)
- {
-+#if defined _LIBC || defined HAVE_STRDUP
-+ locale = strdup (alias_value);
-+ if (locale == NULL)
-+ return NULL;
-+#else
- size_t len = strlen (alias_value) + 1;
- locale = (char *) malloc (len);
- if (locale == NULL)
- return NULL;
-
- memcpy (locale, alias_value, len);
-+#endif
- }
-
- /* Now we determine the single parts of the locale name. First
-@@ -168,14 +149,14 @@
- return NULL;
-
- if (retval->decided == 0)
-- _nl_load_domain (retval);
-+ _nl_load_domain (retval, domainbinding);
- if (retval->data == NULL)
- {
- int cnt;
- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
- {
- if (retval->successor[cnt]->decided == 0)
-- _nl_load_domain (retval->successor[cnt]);
-+ _nl_load_domain (retval->successor[cnt], domainbinding);
- if (retval->successor[cnt]->data != NULL)
- break;
- }
-@@ -185,5 +166,27 @@
- if (alias_value != NULL)
- free (locale);
-
-+ /* The space for normalized_codeset is dynamically allocated. Free it. */
-+ if (mask & XPG_NORM_CODESET)
-+ free ((void *) normalized_codeset);
-+
- return retval;
- }
-+
-+
-+#ifdef _LIBC
-+libc_freeres_fn (free_mem)
-+{
-+ struct loaded_l10nfile *runp = _nl_loaded_domains;
-+
-+ while (runp != NULL)
-+ {
-+ struct loaded_l10nfile *here = runp;
-+ if (runp->data != NULL)
-+ _nl_unload_domain ((struct loaded_domain *) runp->data);
-+ runp = runp->next;
-+ free ((char *) here->filename);
-+ free (here);
-+ }
-+}
-+#endif
---- lrzsz-0.12.20.safe/intl/gettext.c 1998-04-26 09:22:36.000000000 -0400
-+++ lrzsz-0.12.20/intl/gettext.c 2004-09-12 14:40:34.420738208 -0400
-@@ -1,19 +1,20 @@
--/* Implementation of gettext(3) function
-- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-+/* Implementation of gettext(3) function.
-+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
-@@ -23,21 +24,14 @@
- # define __need_NULL
- # include <stddef.h>
- #else
--# ifdef STDC_HEADERS
--# include <stdlib.h> /* Just for NULL. */
--# else
--# ifdef HAVE_STRING_H
--# include <string.h>
--# else
--# define NULL ((void *) 0)
--# endif
--# endif
-+# include <stdlib.h> /* Just for NULL. */
- #endif
-
-+#include "gettextP.h"
- #ifdef _LIBC
- # include <libintl.h>
- #else
--# include "libgettext.h"
-+# include "libgnuintl.h"
- #endif
-
- /* @@ end of prolog @@ */
-@@ -48,20 +42,19 @@
- prefix. So we have to make a difference here. */
- #ifdef _LIBC
- # define GETTEXT __gettext
--# define DGETTEXT __dgettext
-+# define DCGETTEXT INTUSE(__dcgettext)
- #else
--# define GETTEXT gettext__
--# define DGETTEXT dgettext__
-+# define GETTEXT libintl_gettext
-+# define DCGETTEXT libintl_dcgettext
- #endif
-
- /* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
- char *
--GETTEXT (msgid)
-- const char *msgid;
-+GETTEXT (const char *msgid)
- {
-- return DGETTEXT (NULL, msgid);
-+ return DCGETTEXT (NULL, msgid, LC_MESSAGES);
- }
-
- #ifdef _LIBC
---- lrzsz-0.12.20.safe/intl/gettext.h 1998-04-26 09:22:35.000000000 -0400
-+++ lrzsz-0.12.20/intl/gettext.h 1969-12-31 19:00:00.000000000 -0500
-@@ -1,105 +0,0 @@
--/* Internal header for GNU gettext internationalization functions
-- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with the GNU C Library; see the file COPYING.LIB. If not,
-- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- Boston, MA 02111-1307, USA. */
--
--#ifndef _GETTEXT_H
--#define _GETTEXT_H 1
--
--#include <stdio.h>
--
--#if HAVE_LIMITS_H || _LIBC
--# include <limits.h>
--#endif
--
--/* @@ end of prolog @@ */
--
--/* The magic number of the GNU message catalog format. */
--#define _MAGIC 0x950412de
--#define _MAGIC_SWAPPED 0xde120495
--
--/* Revision number of the currently used .mo (binary) file format. */
--#define MO_REVISION_NUMBER 0
--
--/* The following contortions are an attempt to use the C preprocessor
-- to determine an unsigned integral type that is 32 bits wide. An
-- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
-- doing that would require that the configure script compile and *run*
-- the resulting executable. Locally running cross-compiled executables
-- is usually not possible. */
--
--#if __STDC__
--# define UINT_MAX_32_BITS 4294967295U
--#else
--# define UINT_MAX_32_BITS 0xFFFFFFFF
--#endif
--
--/* If UINT_MAX isn't defined, assume it's a 32-bit type.
-- This should be valid for all systems GNU cares about because
-- that doesn't include 16-bit systems, and only modern systems
-- (that certainly have <limits.h>) have 64+-bit integral types. */
--
--#ifndef UINT_MAX
--# define UINT_MAX UINT_MAX_32_BITS
--#endif
--
--#if UINT_MAX == UINT_MAX_32_BITS
--typedef unsigned nls_uint32;
--#else
--# if USHRT_MAX == UINT_MAX_32_BITS
--typedef unsigned short nls_uint32;
--# else
--# if ULONG_MAX == UINT_MAX_32_BITS
--typedef unsigned long nls_uint32;
--# else
-- /* The following line is intended to throw an error. Using #error is
-- not portable enough. */
-- "Cannot determine unsigned 32-bit data type."
--# endif
--# endif
--#endif
--
--
--/* Header for binary .mo file format. */
--struct mo_file_header
--{
-- /* The magic number. */
-- nls_uint32 magic;
-- /* The revision number of the file format. */
-- nls_uint32 revision;
-- /* The number of strings pairs. */
-- nls_uint32 nstrings;
-- /* Offset of table with start offsets of original strings. */
-- nls_uint32 orig_tab_offset;
-- /* Offset of table with start offsets of translation strings. */
-- nls_uint32 trans_tab_offset;
-- /* Size of hashing table. */
-- nls_uint32 hash_tab_size;
-- /* Offset of first hashing entry. */
-- nls_uint32 hash_tab_offset;
--};
--
--struct string_desc
--{
-- /* Length of addressed string. */
-- nls_uint32 length;
-- /* Offset of string in file. */
-- nls_uint32 offset;
--};
--
--/* @@ begin of epilog @@ */
--
--#endif /* gettext.h */
---- lrzsz-0.12.20.safe/intl/gettextP.h 1998-04-26 09:22:35.000000000 -0400
-+++ lrzsz-0.12.20/intl/gettextP.h 2004-09-12 14:40:34.426737296 -0400
-@@ -1,33 +1,53 @@
--/* Header describing internals of gettext library
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-+/* Header describing internals of libintl library.
-+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
-+ Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifndef _GETTEXTP_H
- #define _GETTEXTP_H
-
-+#include <stddef.h> /* Get size_t. */
-+
-+#ifdef _LIBC
-+# include "../iconv/gconv_int.h"
-+#else
-+# if HAVE_ICONV
-+# include <iconv.h>
-+# endif
-+#endif
-+
- #include "loadinfo.h"
-
-+#include "gmo.h" /* Get nls_uint32. */
-+
- /* @@ end of prolog @@ */
-
--#ifndef PARAMS
--# if __STDC__
--# define PARAMS(args) args
--# else
--# define PARAMS(args) ()
--# endif
-+#ifndef internal_function
-+# define internal_function
-+#endif
-+
-+#ifndef attribute_hidden
-+# define attribute_hidden
-+#endif
-+
-+/* Tell the compiler when a conditional or integer expression is
-+ almost always true or almost always false. */
-+#ifndef HAVE_BUILTIN_EXPECT
-+# define __builtin_expect(expr, val) (expr)
- #endif
-
- #ifndef W
-@@ -35,38 +55,160 @@
- #endif
-
-
--static nls_uint32 SWAP PARAMS ((nls_uint32 i));
--
-+#ifdef _LIBC
-+# include <byteswap.h>
-+# define SWAP(i) bswap_32 (i)
-+#else
- static inline nls_uint32
- SWAP (i)
- nls_uint32 i;
- {
- return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
- }
-+#endif
-+
-
-+/* In-memory representation of system dependent string. */
-+struct sysdep_string_desc
-+{
-+ /* Length of addressed string, including the trailing NUL. */
-+ size_t length;
-+ /* Pointer to addressed string. */
-+ const char *pointer;
-+};
-
-+/* The representation of an opened message catalog. */
- struct loaded_domain
- {
-+ /* Pointer to memory containing the .mo file. */
- const char *data;
-+ /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
-+ int use_mmap;
-+ /* Size of mmap()ed memory. */
-+ size_t mmap_size;
-+ /* 1 if the .mo file uses a different endianness than this machine. */
- int must_swap;
-+ /* Pointer to additional malloc()ed memory. */
-+ void *malloced;
-+
-+ /* Number of static strings pairs. */
- nls_uint32 nstrings;
-- struct string_desc *orig_tab;
-- struct string_desc *trans_tab;
-+ /* Pointer to descriptors of original strings in the file. */
-+ const struct string_desc *orig_tab;
-+ /* Pointer to descriptors of translated strings in the file. */
-+ const struct string_desc *trans_tab;
-+
-+ /* Number of system dependent strings pairs. */
-+ nls_uint32 n_sysdep_strings;
-+ /* Pointer to descriptors of original sysdep strings. */
-+ const struct sysdep_string_desc *orig_sysdep_tab;
-+ /* Pointer to descriptors of translated sysdep strings. */
-+ const struct sysdep_string_desc *trans_sysdep_tab;
-+
-+ /* Size of hash table. */
- nls_uint32 hash_size;
-- nls_uint32 *hash_tab;
-+ /* Pointer to hash table. */
-+ const nls_uint32 *hash_tab;
-+ /* 1 if the hash table uses a different endianness than this machine. */
-+ int must_swap_hash_tab;
-+
-+ int codeset_cntr;
-+#ifdef _LIBC
-+ __gconv_t conv;
-+#else
-+# if HAVE_ICONV
-+ iconv_t conv;
-+# endif
-+#endif
-+ char **conv_tab;
-+
-+ struct expression *plural;
-+ unsigned long int nplurals;
- };
-
-+/* We want to allocate a string at the end of the struct. But ISO C
-+ doesn't allow zero sized arrays. */
-+#ifdef __GNUC__
-+# define ZERO 0
-+#else
-+# define ZERO 1
-+#endif
-+
-+/* A set of settings bound to a message domain. Used to store settings
-+ from bindtextdomain() and bind_textdomain_codeset(). */
- struct binding
- {
- struct binding *next;
-- char *domainname;
- char *dirname;
-+ int codeset_cntr; /* Incremented each time codeset changes. */
-+ char *codeset;
-+ char domainname[ZERO];
- };
-
--struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
-- char *__locale,
-- const char *__domainname));
--void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain));
-+/* A counter which is incremented each time some previous translations
-+ become invalid.
-+ This variable is part of the external ABI of the GNU libintl. */
-+extern int _nl_msg_cat_cntr;
-+
-+#ifndef _LIBC
-+const char *_nl_locale_name (int category, const char *categoryname);
-+#endif
-+
-+struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale,
-+ const char *__domainname,
-+ struct binding *__domainbinding)
-+ internal_function;
-+void _nl_load_domain (struct loaded_l10nfile *__domain,
-+ struct binding *__domainbinding)
-+ internal_function;
-+void _nl_unload_domain (struct loaded_domain *__domain)
-+ internal_function;
-+const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file,
-+ struct loaded_domain *__domain,
-+ struct binding *__domainbinding)
-+ internal_function;
-+void _nl_free_domain_conv (struct loaded_domain *__domain)
-+ internal_function;
-+
-+char *_nl_find_msg (struct loaded_l10nfile *domain_file,
-+ struct binding *domainbinding, const char *msgid,
-+ size_t *lengthp)
-+ internal_function;
-+
-+#ifdef _LIBC
-+extern char *__gettext (const char *__msgid);
-+extern char *__dgettext (const char *__domainname, const char *__msgid);
-+extern char *__dcgettext (const char *__domainname, const char *__msgid,
-+ int __category);
-+extern char *__ngettext (const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n);
-+extern char *__dngettext (const char *__domainname,
-+ const char *__msgid1, const char *__msgid2,
-+ unsigned long int n);
-+extern char *__dcngettext (const char *__domainname,
-+ const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n, int __category);
-+extern char *__dcigettext (const char *__domainname,
-+ const char *__msgid1, const char *__msgid2,
-+ int __plural, unsigned long int __n,
-+ int __category);
-+extern char *__textdomain (const char *__domainname);
-+extern char *__bindtextdomain (const char *__domainname,
-+ const char *__dirname);
-+extern char *__bind_textdomain_codeset (const char *__domainname,
-+ const char *__codeset);
-+#else
-+/* Declare the exported libintl_* functions, in a way that allows us to
-+ call them under their real name. */
-+# undef _INTL_REDIRECT_INLINE
-+# undef _INTL_REDIRECT_MACROS
-+# define _INTL_REDIRECT_MACROS
-+# include "libgnuintl.h"
-+extern char *libintl_dcigettext (const char *__domainname,
-+ const char *__msgid1, const char *__msgid2,
-+ int __plural, unsigned long int __n,
-+ int __category);
-+#endif
-
- /* @@ begin of epilog @@ */
-
---- lrzsz-0.12.20.safe/intl/gmo.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/gmo.h 2004-09-12 14:40:34.431736536 -0400
-@@ -0,0 +1,149 @@
-+/* Description of GNU message catalog format: general file layout.
-+ Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _GETTEXT_H
-+#define _GETTEXT_H 1
-+
-+#include <limits.h>
-+
-+/* @@ end of prolog @@ */
-+
-+/* The magic number of the GNU message catalog format. */
-+#define _MAGIC 0x950412de
-+#define _MAGIC_SWAPPED 0xde120495
-+
-+/* Revision number of the currently used .mo (binary) file format. */
-+#define MO_REVISION_NUMBER 0
-+#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
-+
-+/* The following contortions are an attempt to use the C preprocessor
-+ to determine an unsigned integral type that is 32 bits wide. An
-+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
-+ as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
-+ when cross-compiling. */
-+
-+#if __STDC__
-+# define UINT_MAX_32_BITS 4294967295U
-+#else
-+# define UINT_MAX_32_BITS 0xFFFFFFFF
-+#endif
-+
-+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
-+ This should be valid for all systems GNU cares about because
-+ that doesn't include 16-bit systems, and only modern systems
-+ (that certainly have <limits.h>) have 64+-bit integral types. */
-+
-+#ifndef UINT_MAX
-+# define UINT_MAX UINT_MAX_32_BITS
-+#endif
-+
-+#if UINT_MAX == UINT_MAX_32_BITS
-+typedef unsigned nls_uint32;
-+#else
-+# if USHRT_MAX == UINT_MAX_32_BITS
-+typedef unsigned short nls_uint32;
-+# else
-+# if ULONG_MAX == UINT_MAX_32_BITS
-+typedef unsigned long nls_uint32;
-+# else
-+ /* The following line is intended to throw an error. Using #error is
-+ not portable enough. */
-+ "Cannot determine unsigned 32-bit data type."
-+# endif
-+# endif
-+#endif
-+
-+
-+/* Header for binary .mo file format. */
-+struct mo_file_header
-+{
-+ /* The magic number. */
-+ nls_uint32 magic;
-+ /* The revision number of the file format. */
-+ nls_uint32 revision;
-+
-+ /* The following are only used in .mo files with major revision 0 or 1. */
-+
-+ /* The number of strings pairs. */
-+ nls_uint32 nstrings;
-+ /* Offset of table with start offsets of original strings. */
-+ nls_uint32 orig_tab_offset;
-+ /* Offset of table with start offsets of translated strings. */
-+ nls_uint32 trans_tab_offset;
-+ /* Size of hash table. */
-+ nls_uint32 hash_tab_size;
-+ /* Offset of first hash table entry. */
-+ nls_uint32 hash_tab_offset;
-+
-+ /* The following are only used in .mo files with minor revision >= 1. */
-+
-+ /* The number of system dependent segments. */
-+ nls_uint32 n_sysdep_segments;
-+ /* Offset of table describing system dependent segments. */
-+ nls_uint32 sysdep_segments_offset;
-+ /* The number of system dependent strings pairs. */
-+ nls_uint32 n_sysdep_strings;
-+ /* Offset of table with start offsets of original sysdep strings. */
-+ nls_uint32 orig_sysdep_tab_offset;
-+ /* Offset of table with start offsets of translated sysdep strings. */
-+ nls_uint32 trans_sysdep_tab_offset;
-+};
-+
-+/* Descriptor for static string contained in the binary .mo file. */
-+struct string_desc
-+{
-+ /* Length of addressed string, not including the trailing NUL. */
-+ nls_uint32 length;
-+ /* Offset of string in file. */
-+ nls_uint32 offset;
-+};
-+
-+/* The following are only used in .mo files with minor revision >= 1. */
-+
-+/* Descriptor for system dependent string segment. */
-+struct sysdep_segment
-+{
-+ /* Length of addressed string, including the trailing NUL. */
-+ nls_uint32 length;
-+ /* Offset of string in file. */
-+ nls_uint32 offset;
-+};
-+
-+/* Descriptor for system dependent string. */
-+struct sysdep_string
-+{
-+ /* Offset of static string segments in file. */
-+ nls_uint32 offset;
-+ /* Alternating sequence of static and system dependent segments.
-+ The last segment is a static segment, including the trailing NUL. */
-+ struct segment_pair
-+ {
-+ /* Size of static segment. */
-+ nls_uint32 segsize;
-+ /* Reference to system dependent string segment, or ~0 at the end. */
-+ nls_uint32 sysdepref;
-+ } segments[1];
-+};
-+
-+/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
-+ regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
-+#define SEGMENTS_END ((nls_uint32) ~0)
-+
-+/* @@ begin of epilog @@ */
-+
-+#endif /* gettext.h */
---- lrzsz-0.12.20.safe/intl/hash-string.h 1998-04-26 09:22:36.000000000 -0400
-+++ lrzsz-0.12.20/intl/hash-string.h 2004-09-12 14:40:34.436735776 -0400
-@@ -1,35 +1,23 @@
--/* Implements a string hashing function.
-- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-+/* Description of GNU message catalog format: string hashing function.
-+ Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
-- License along with the GNU C Library; see the file COPYING.LIB. If not,
-- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- Boston, MA 02111-1307, USA. */
--
--#ifdef HAVE_VALUES_H
--# include <values.h>
--#endif
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- /* @@ end of prolog @@ */
-
--#ifndef PARAMS
--# if __STDC__
--# define PARAMS(Args) Args
--# else
--# define PARAMS(Args) ()
--# endif
--#endif
--
- /* We assume to have `unsigned long int' value with at least 32 bits. */
- #define HASHWORDBITS 32
-
-@@ -37,11 +25,8 @@
- /* Defines the so called `hashpjw' function by P.J. Weinberger
- [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
- 1986, 1987 Bell Telephone Laboratories, Inc.] */
--static unsigned long hash_string PARAMS ((const char *__str_param));
--
--static inline unsigned long
--hash_string (str_param)
-- const char *str_param;
-+static inline unsigned long int
-+hash_string (const char *str_param)
- {
- unsigned long int hval, g;
- const char *str = str_param;
-@@ -51,8 +36,8 @@
- while (*str != '\0')
- {
- hval <<= 4;
-- hval += (unsigned long) *str++;
-- g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
-+ hval += (unsigned char) *str++;
-+ g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
- if (g != 0)
- {
- hval ^= g >> (HASHWORDBITS - 8);
---- lrzsz-0.12.20.safe/intl/intl-compat.c 1998-04-26 09:20:52.000000000 -0400
-+++ lrzsz-0.12.20/intl/intl-compat.c 2004-09-12 14:40:34.441735016 -0400
-@@ -1,76 +1,131 @@
- /* intl-compat.c - Stub functions to call gettext functions from GNU gettext
- Library.
-- Copyright (C) 1995 Software Foundation, Inc.
-+ Copyright (C) 1995, 2000-2003 Software Foundation, Inc.
-
--This program is free software; you can redistribute it and/or modify
--it under the terms of the GNU General Public License as published by
--the Free Software Foundation; either version 2, or (at your option)
--any later version.
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--GNU General Public License for more details.
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
--You should have received a copy of the GNU General Public License
--along with this program; if not, write to the Free Software
--Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
--#include "libgettext.h"
-+#include "gettextP.h"
-
- /* @@ end of prolog @@ */
-
-+/* This file redirects the gettext functions (without prefix) to those
-+ defined in the included GNU libintl library (with "libintl_" prefix).
-+ It is compiled into libintl in order to make the AM_GNU_GETTEXT test
-+ of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
-+ has the redirections primarily in the <libintl.h> include file.
-+ It is also compiled into libgnuintl so that libgnuintl.so can be used
-+ as LD_PRELOADable library on glibc systems, to provide the extra
-+ features that the functions in the libc don't have (namely, logging). */
-+
-
- #undef gettext
- #undef dgettext
- #undef dcgettext
-+#undef ngettext
-+#undef dngettext
-+#undef dcngettext
- #undef textdomain
- #undef bindtextdomain
-+#undef bind_textdomain_codeset
-+
-+
-+/* When building a DLL, we must export some functions. Note that because
-+ the functions are only defined for binary backward compatibility, we
-+ don't need to use __declspec(dllimport) in any case. */
-+#if defined _MSC_VER && BUILDING_DLL
-+# define DLL_EXPORTED __declspec(dllexport)
-+#else
-+# define DLL_EXPORTED
-+#endif
-
-
-+DLL_EXPORTED
- char *
--bindtextdomain (domainname, dirname)
-- const char *domainname;
-- const char *dirname;
-+gettext (const char *msgid)
- {
-- return bindtextdomain__ (domainname, dirname);
-+ return libintl_gettext (msgid);
- }
-
-
-+DLL_EXPORTED
- char *
--dcgettext (domainname, msgid, category)
-- const char *domainname;
-- const char *msgid;
-- int category;
-+dgettext (const char *domainname, const char *msgid)
- {
-- return dcgettext__ (domainname, msgid, category);
-+ return libintl_dgettext (domainname, msgid);
- }
-
-
-+DLL_EXPORTED
- char *
--dgettext (domainname, msgid)
-- const char *domainname;
-- const char *msgid;
-+dcgettext (const char *domainname, const char *msgid, int category)
- {
-- return dgettext__ (domainname, msgid);
-+ return libintl_dcgettext (domainname, msgid, category);
- }
-
-
-+DLL_EXPORTED
- char *
--gettext (msgid)
-- const char *msgid;
-+ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
- {
-- return gettext__ (msgid);
-+ return libintl_ngettext (msgid1, msgid2, n);
- }
-
-
-+DLL_EXPORTED
- char *
--textdomain (domainname)
-- const char *domainname;
-+dngettext (const char *domainname,
-+ const char *msgid1, const char *msgid2, unsigned long int n)
- {
-- return textdomain__ (domainname);
-+ return libintl_dngettext (domainname, msgid1, msgid2, n);
-+}
-+
-+
-+DLL_EXPORTED
-+char *
-+dcngettext (const char *domainname,
-+ const char *msgid1, const char *msgid2, unsigned long int n,
-+ int category)
-+{
-+ return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
-+}
-+
-+
-+DLL_EXPORTED
-+char *
-+textdomain (const char *domainname)
-+{
-+ return libintl_textdomain (domainname);
-+}
-+
-+
-+DLL_EXPORTED
-+char *
-+bindtextdomain (const char *domainname, const char *dirname)
-+{
-+ return libintl_bindtextdomain (domainname, dirname);
-+}
-+
-+
-+DLL_EXPORTED
-+char *
-+bind_textdomain_codeset (const char *domainname, const char *codeset)
-+{
-+ return libintl_bind_textdomain_codeset (domainname, codeset);
- }
---- lrzsz-0.12.20.safe/intl/l10nflist.c 1998-04-26 09:22:37.000000000 -0400
-+++ lrzsz-0.12.20/intl/l10nflist.c 2004-09-12 14:40:34.457732584 -0400
-@@ -1,52 +1,40 @@
--/* Handle list of needed message catalogs
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-+/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
-+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
-+ This must come before <config.h> because <config.h> may include
-+ <features.h>, and once <features.h> has been included, it's too late. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
--
--#if defined HAVE_STRING_H || defined _LIBC
--# ifndef _GNU_SOURCE
--# define _GNU_SOURCE 1
--# endif
--# include <string.h>
--#else
--# include <strings.h>
--# ifndef memcpy
--# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
--# endif
--#endif
--#if !HAVE_STRCHR && !defined _LIBC
--# ifndef strchr
--# define strchr index
--# endif
--#endif
-+#include <string.h>
-
- #if defined _LIBC || defined HAVE_ARGZ_H
- # include <argz.h>
- #endif
- #include <ctype.h>
- #include <sys/types.h>
--
--#if defined STDC_HEADERS || defined _LIBC
--# include <stdlib.h>
--#endif
-+#include <stdlib.h>
-
- #include "loadinfo.h"
-
-@@ -65,23 +53,39 @@
- /* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
--# define stpcpy(dest, src) __stpcpy(dest, src)
-+# ifndef stpcpy
-+# define stpcpy(dest, src) __stpcpy(dest, src)
-+# endif
- #else
- # ifndef HAVE_STPCPY
--static char *stpcpy PARAMS ((char *dest, const char *src));
-+static char *stpcpy (char *dest, const char *src);
- # endif
- #endif
-
-+/* Pathname support.
-+ ISSLASH(C) tests whether C is a directory separator character.
-+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
-+ it may be concatenated to a directory pathname.
-+ */
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
-+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-+# define HAS_DEVICE(P) \
-+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-+ && (P)[1] == ':')
-+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
-+#else
-+ /* Unix */
-+# define ISSLASH(C) ((C) == '/')
-+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
-+#endif
-+
- /* Define function which are usually not available. */
-
- #if !defined _LIBC && !defined HAVE___ARGZ_COUNT
- /* Returns the number of strings in ARGZ. */
--static size_t argz_count__ PARAMS ((const char *argz, size_t len));
--
- static size_t
--argz_count__ (argz, len)
-- const char *argz;
-- size_t len;
-+argz_count__ (const char *argz, size_t len)
- {
- size_t count = 0;
- while (len > 0)
-@@ -95,18 +99,17 @@
- }
- # undef __argz_count
- # define __argz_count(argz, len) argz_count__ (argz, len)
-+#else
-+# ifdef _LIBC
-+# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
-+# endif
- #endif /* !_LIBC && !HAVE___ARGZ_COUNT */
-
- #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
- /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
- except the last into the character SEP. */
--static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
--
- static void
--argz_stringify__ (argz, len, sep)
-- char *argz;
-- size_t len;
-- int sep;
-+argz_stringify__ (char *argz, size_t len, int sep)
- {
- while (len > 0)
- {
-@@ -119,17 +122,16 @@
- }
- # undef __argz_stringify
- # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
-+#else
-+# ifdef _LIBC
-+# define __argz_stringify(argz, len, sep) \
-+ INTUSE(__argz_stringify) (argz, len, sep)
-+# endif
- #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
-
- #if !defined _LIBC && !defined HAVE___ARGZ_NEXT
--static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
-- const char *entry));
--
- static char *
--argz_next__ (argz, argz_len, entry)
-- char *argz;
-- size_t argz_len;
-- const char *entry;
-+argz_next__ (char *argz, size_t argz_len, const char *entry)
- {
- if (entry)
- {
-@@ -150,11 +152,8 @@
-
-
- /* Return number of bits set in X. */
--static int pop PARAMS ((int x));
--
- static inline int
--pop (x)
-- int x;
-+pop (int x)
- {
- /* We assume that no more than 16 bits are used. */
- x = ((x & ~0x5555) >> 1) + (x & 0x5555);
-@@ -167,31 +166,27 @@
-
-
- struct loaded_l10nfile *
--_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
-- territory, codeset, normalized_codeset, modifier, special,
-- sponsor, revision, filename, do_allocate)
-- struct loaded_l10nfile **l10nfile_list;
-- const char *dirlist;
-- size_t dirlist_len;
-- int mask;
-- const char *language;
-- const char *territory;
-- const char *codeset;
-- const char *normalized_codeset;
-- const char *modifier;
-- const char *special;
-- const char *sponsor;
-- const char *revision;
-- const char *filename;
-- int do_allocate;
-+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
-+ const char *dirlist, size_t dirlist_len,
-+ int mask, const char *language, const char *territory,
-+ const char *codeset, const char *normalized_codeset,
-+ const char *modifier, const char *special,
-+ const char *sponsor, const char *revision,
-+ const char *filename, int do_allocate)
- {
- char *abs_filename;
-- struct loaded_l10nfile *last = NULL;
-+ struct loaded_l10nfile **lastp;
- struct loaded_l10nfile *retval;
- char *cp;
-+ size_t dirlist_count;
- size_t entries;
- int cnt;
-
-+ /* If LANGUAGE contains an absolute directory specification, we ignore
-+ DIRLIST. */
-+ if (IS_ABSOLUTE_PATH (language))
-+ dirlist_len = 0;
-+
- /* Allocate room for the full file name. */
- abs_filename = (char *) malloc (dirlist_len
- + strlen (language)
-@@ -209,7 +204,7 @@
- + (((mask & CEN_SPONSOR) != 0
- || (mask & CEN_REVISION) != 0)
- ? (1 + ((mask & CEN_SPONSOR) != 0
-- ? strlen (sponsor) + 1 : 0)
-+ ? strlen (sponsor) : 0)
- + ((mask & CEN_REVISION) != 0
- ? strlen (revision) + 1 : 0)) : 0)
- + 1 + strlen (filename) + 1);
-@@ -217,14 +212,16 @@
- if (abs_filename == NULL)
- return NULL;
-
-- retval = NULL;
-- last = NULL;
--
- /* Construct file name. */
-- memcpy (abs_filename, dirlist, dirlist_len);
-- __argz_stringify (abs_filename, dirlist_len, ':');
-- cp = abs_filename + (dirlist_len - 1);
-- *cp++ = '/';
-+ cp = abs_filename;
-+ if (dirlist_len > 0)
-+ {
-+ memcpy (cp, dirlist, dirlist_len);
-+ __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
-+ cp += dirlist_len;
-+ cp[-1] = '/';
-+ }
-+
- cp = stpcpy (cp, language);
-
- if ((mask & TERRITORY) != 0)
-@@ -271,7 +268,7 @@
-
- /* Look in list of already loaded domains whether it is already
- available. */
-- last = NULL;
-+ lastp = l10nfile_list;
- for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
- if (retval->filename != NULL)
- {
-@@ -286,7 +283,7 @@
- break;
- }
-
-- last = retval;
-+ lastp = &retval->next;
- }
-
- if (retval != NULL || do_allocate == 0)
-@@ -295,48 +292,66 @@
- return retval;
- }
-
-- retval = (struct loaded_l10nfile *)
-- malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
-- * (1 << pop (mask))
-- * sizeof (struct loaded_l10nfile *)));
-+ dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
-+
-+ /* Allocate a new loaded_l10nfile. */
-+ retval =
-+ (struct loaded_l10nfile *)
-+ malloc (sizeof (*retval)
-+ + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
-+ * sizeof (struct loaded_l10nfile *)));
- if (retval == NULL)
- return NULL;
-
- retval->filename = abs_filename;
-- retval->decided = (__argz_count (dirlist, dirlist_len) != 1
-+
-+ /* We set retval->data to NULL here; it is filled in later.
-+ Setting retval->decided to 1 here means that retval does not
-+ correspond to a real file (dirlist_count > 1) or is not worth
-+ looking up (if an unnormalized codeset was specified). */
-+ retval->decided = (dirlist_count > 1
- || ((mask & XPG_CODESET) != 0
- && (mask & XPG_NORM_CODESET) != 0));
- retval->data = NULL;
-
-- if (last == NULL)
-- {
-- retval->next = *l10nfile_list;
-- *l10nfile_list = retval;
-- }
-- else
-- {
-- retval->next = last->next;
-- last->next = retval;
-- }
-+ retval->next = *lastp;
-+ *lastp = retval;
-
- entries = 0;
-- /* If the DIRLIST is a real list the RETVAL entry corresponds not to
-- a real file. So we have to use the DIRLIST separation mechanism
-- of the inner loop. */
-- cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
-- for (; cnt >= 0; --cnt)
-+ /* Recurse to fill the inheritance list of RETVAL.
-+ If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
-+ entry does not correspond to a real file; retval->filename contains
-+ colons. In this case we loop across all elements of DIRLIST and
-+ across all bit patterns dominated by MASK.
-+ If the DIRLIST is a single directory or entirely redundant (i.e.
-+ DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
-+ MASK, excluding MASK itself.
-+ In either case, we loop down from MASK to 0. This has the effect
-+ that the extra bits in the locale name are dropped in this order:
-+ first the modifier, then the territory, then the codeset, then the
-+ normalized_codeset. */
-+ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
- if ((cnt & ~mask) == 0
- && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
- && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
- {
-- /* Iterate over all elements of the DIRLIST. */
-- char *dir = NULL;
-+ if (dirlist_count > 1)
-+ {
-+ /* Iterate over all elements of the DIRLIST. */
-+ char *dir = NULL;
-
-- while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
-- != NULL)
-+ while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
-+ != NULL)
-+ retval->successor[entries++]
-+ = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
-+ cnt, language, territory, codeset,
-+ normalized_codeset, modifier, special,
-+ sponsor, revision, filename, 1);
-+ }
-+ else
- retval->successor[entries++]
-- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
-- language, territory, codeset,
-+ = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
-+ cnt, language, territory, codeset,
- normalized_codeset, modifier, special,
- sponsor, revision, filename, 1);
- }
-@@ -347,11 +362,10 @@
-
- /* Normalize codeset name. There is no standard for the codeset
- names. Normalization allows the user to use any of the common
-- names. */
-+ names. The return value is dynamically allocated and has to be
-+ freed by the caller. */
- const char *
--_nl_normalize_codeset (codeset, name_len)
-- const char *codeset;
-- size_t name_len;
-+_nl_normalize_codeset (const char *codeset, size_t name_len)
- {
- int len = 0;
- int only_digit = 1;
-@@ -360,11 +374,11 @@
- size_t cnt;
-
- for (cnt = 0; cnt < name_len; ++cnt)
-- if (isalnum (codeset[cnt]))
-+ if (isalnum ((unsigned char) codeset[cnt]))
- {
- ++len;
-
-- if (isalpha (codeset[cnt]))
-+ if (isalpha ((unsigned char) codeset[cnt]))
- only_digit = 0;
- }
-
-@@ -378,9 +392,9 @@
- wp = retval;
-
- for (cnt = 0; cnt < name_len; ++cnt)
-- if (isalpha (codeset[cnt]))
-- *wp++ = tolower (codeset[cnt]);
-- else if (isdigit (codeset[cnt]))
-+ if (isalpha ((unsigned char) codeset[cnt]))
-+ *wp++ = tolower ((unsigned char) codeset[cnt]);
-+ else if (isdigit ((unsigned char) codeset[cnt]))
- *wp++ = codeset[cnt];
-
- *wp = '\0';
-@@ -398,9 +412,7 @@
- to be defined. */
- #if !_LIBC && !HAVE_STPCPY
- static char *
--stpcpy (dest, src)
-- char *dest;
-- const char *src;
-+stpcpy (char *dest, const char *src)
- {
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
---- lrzsz-0.12.20.safe/intl/libgettext.h 1998-04-26 09:22:36.000000000 -0400
-+++ lrzsz-0.12.20/intl/libgettext.h 1969-12-31 19:00:00.000000000 -0500
-@@ -1,182 +0,0 @@
--/* Message catalogs for internationalization.
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
--
--/* Because on some systems (e.g. Solaris) we sometimes have to include
-- the systems libintl.h as well as this file we have more complex
-- include protection above. But the systems header might perhaps also
-- define _LIBINTL_H and therefore we have to protect the definition here. */
--
--#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H)
--#if !defined (_LIBINTL_H)
--# define _LIBINTL_H 1
--#endif
--#define _LIBGETTEXT_H 1
--
--/* We define an additional symbol to signal that we use the GNU
-- implementation of gettext. */
--#define __USE_GNU_GETTEXT 1
--
--#include <sys/types.h>
--
--#if HAVE_LOCALE_H
--# include <locale.h>
--#endif
--
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--/* @@ end of prolog @@ */
--
--#ifndef PARAMS
--# if __STDC__
--# define PARAMS(args) args
--# else
--# define PARAMS(args) ()
--# endif
--#endif
--
--#ifndef NULL
--# if !defined __cplusplus || defined __GNUC__
--# define NULL ((void *) 0)
--# else
--# define NULL (0)
--# endif
--#endif
--
--#if !HAVE_LC_MESSAGES
--/* This value determines the behaviour of the gettext() and dgettext()
-- function. But some system does not have this defined. Define it
-- to a default value. */
--# define LC_MESSAGES (-1)
--#endif
--
--
--/* Declarations for gettext-using-catgets interface. Derived from
-- Jim Meyering's libintl.h. */
--struct _msg_ent
--{
-- const char *_msg;
-- int _msg_number;
--};
--
--
--#if HAVE_CATGETS
--/* These two variables are defined in the automatically by po-to-tbl.sed
-- generated file `cat-id-tbl.c'. */
--extern const struct _msg_ent _msg_tbl[];
--extern int _msg_tbl_length;
--#endif
--
--
--/* For automatical extraction of messages sometimes no real
-- translation is needed. Instead the string itself is the result. */
--#define gettext_noop(Str) (Str)
--
--/* Look up MSGID in the current default message catalog for the current
-- LC_MESSAGES locale. If not found, returns MSGID itself (the default
-- text). */
--extern char *gettext PARAMS ((const char *__msgid));
--extern char *gettext__ PARAMS ((const char *__msgid));
--
--/* Look up MSGID in the DOMAINNAME message catalog for the current
-- LC_MESSAGES locale. */
--extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
--extern char *dgettext__ PARAMS ((const char *__domainname,
-- const char *__msgid));
--
--/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
-- locale. */
--extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
-- int __category));
--extern char *dcgettext__ PARAMS ((const char *__domainname,
-- const char *__msgid, int __category));
--
--
--/* Set the current default message catalog to DOMAINNAME.
-- If DOMAINNAME is null, return the current default.
-- If DOMAINNAME is "", reset to the default of "messages". */
--extern char *textdomain PARAMS ((const char *__domainname));
--extern char *textdomain__ PARAMS ((const char *__domainname));
--
--/* Specify that the DOMAINNAME message catalog will be found
-- in DIRNAME rather than in the system locale data base. */
--extern char *bindtextdomain PARAMS ((const char *__domainname,
-- const char *__dirname));
--extern char *bindtextdomain__ PARAMS ((const char *__domainname,
-- const char *__dirname));
--
--#if ENABLE_NLS
--
--/* Solaris 2.3 has the gettext function but dcgettext is missing.
-- So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
-- has dcgettext. */
--# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
--
--# define gettext(Msgid) \
-- dgettext (NULL, Msgid)
--
--# define dgettext(Domainname, Msgid) \
-- dcgettext (Domainname, Msgid, LC_MESSAGES)
--
--# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
--/* This global variable is defined in loadmsgcat.c. We need a sign,
-- whether a new catalog was loaded, which can be associated with all
-- translations. */
--extern int _nl_msg_cat_cntr;
--
--# define dcgettext(Domainname, Msgid, Category) \
-- (__extension__ \
-- ({ \
-- char *__result; \
-- if (__builtin_constant_p (Msgid)) \
-- { \
-- static char *__translation__; \
-- static int __catalog_counter__; \
-- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
-- { \
-- __translation__ = \
-- dcgettext__ (Domainname, Msgid, Category); \
-- __catalog_counter__ = _nl_msg_cat_cntr; \
-- } \
-- __result = __translation__; \
-- } \
-- else \
-- __result = dcgettext__ (Domainname, Msgid, Category); \
-- __result; \
-- }))
--# endif
--# endif
--
--#else
--
--# define gettext(Msgid) (Msgid)
--# define dgettext(Domainname, Msgid) (Msgid)
--# define dcgettext(Domainname, Msgid, Category) (Msgid)
--# define textdomain(Domainname) while (0) /* nothing */
--# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
--
--#endif
--
--/* @@ begin of epilog @@ */
--
--#ifdef __cplusplus
--}
--#endif
--
--#endif
---- lrzsz-0.12.20.safe/intl/libgnuintl.h.in 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/libgnuintl.h.in 2004-09-12 14:40:34.462731824 -0400
-@@ -0,0 +1,383 @@
-+/* Message catalogs for internationalization.
-+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _LIBINTL_H
-+#define _LIBINTL_H 1
-+
-+#include <locale.h>
-+
-+/* The LC_MESSAGES locale category is the category used by the functions
-+ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
-+ On systems that don't define it, use an arbitrary value instead.
-+ On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
-+ then includes <libintl.h> (i.e. this file!) and then only defines
-+ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
-+ in this case. */
-+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
-+# define LC_MESSAGES 1729
-+#endif
-+
-+/* We define an additional symbol to signal that we use the GNU
-+ implementation of gettext. */
-+#define __USE_GNU_GETTEXT 1
-+
-+/* Provide information about the supported file formats. Returns the
-+ maximum minor revision number supported for a given major revision. */
-+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
-+ ((major) == 0 ? 1 : -1)
-+
-+/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
-+ precedence over _conio_gettext. */
-+#ifdef __DJGPP__
-+# undef gettext
-+#endif
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+
-+/* We redirect the functions to those prefixed with "libintl_". This is
-+ necessary, because some systems define gettext/textdomain/... in the C
-+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
-+ If we used the unprefixed names, there would be cases where the
-+ definition in the C library would override the one in the libintl.so
-+ shared library. Recall that on ELF systems, the symbols are looked
-+ up in the following order:
-+ 1. in the executable,
-+ 2. in the shared libraries specified on the link command line, in order,
-+ 3. in the dependencies of the shared libraries specified on the link
-+ command line,
-+ 4. in the dlopen()ed shared libraries, in the order in which they were
-+ dlopen()ed.
-+ The definition in the C library would override the one in libintl.so if
-+ either
-+ * -lc is given on the link command line and -lintl isn't, or
-+ * -lc is given on the link command line before -lintl, or
-+ * libintl.so is a dependency of a dlopen()ed shared library but not
-+ linked to the executable at link time.
-+ Since Solaris gettext() behaves differently than GNU gettext(), this
-+ would be unacceptable.
-+
-+ The redirection happens by default through macros in C, so that &gettext
-+ is independent of the compilation unit, but through inline functions in
-+ C++, in order not to interfere with the name mangling of class fields or
-+ class methods called 'gettext'. */
-+
-+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
-+ If he doesn't, we choose the method. A third possible method is
-+ _INTL_REDIRECT_ASM, supported only by GCC. */
-+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
-+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
-+# define _INTL_REDIRECT_ASM
-+# else
-+# ifdef __cplusplus
-+# define _INTL_REDIRECT_INLINE
-+# else
-+# define _INTL_REDIRECT_MACROS
-+# endif
-+# endif
-+#endif
-+/* Auxiliary macros. */
-+#ifdef _INTL_REDIRECT_ASM
-+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
-+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
-+# define _INTL_STRINGIFY(prefix) #prefix
-+#else
-+# define _INTL_ASM(cname)
-+#endif
-+
-+/* Look up MSGID in the current default message catalog for the current
-+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
-+ text). */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_gettext (const char *__msgid);
-+static inline char *gettext (const char *__msgid)
-+{
-+ return libintl_gettext (__msgid);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define gettext libintl_gettext
-+#endif
-+extern char *gettext (const char *__msgid)
-+ _INTL_ASM (libintl_gettext);
-+#endif
-+
-+/* Look up MSGID in the DOMAINNAME message catalog for the current
-+ LC_MESSAGES locale. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
-+static inline char *dgettext (const char *__domainname, const char *__msgid)
-+{
-+ return libintl_dgettext (__domainname, __msgid);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define dgettext libintl_dgettext
-+#endif
-+extern char *dgettext (const char *__domainname, const char *__msgid)
-+ _INTL_ASM (libintl_dgettext);
-+#endif
-+
-+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
-+ locale. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
-+ int __category);
-+static inline char *dcgettext (const char *__domainname, const char *__msgid,
-+ int __category)
-+{
-+ return libintl_dcgettext (__domainname, __msgid, __category);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define dcgettext libintl_dcgettext
-+#endif
-+extern char *dcgettext (const char *__domainname, const char *__msgid,
-+ int __category)
-+ _INTL_ASM (libintl_dcgettext);
-+#endif
-+
-+
-+/* Similar to `gettext' but select the plural form corresponding to the
-+ number N. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n);
-+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n)
-+{
-+ return libintl_ngettext (__msgid1, __msgid2, __n);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define ngettext libintl_ngettext
-+#endif
-+extern char *ngettext (const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n)
-+ _INTL_ASM (libintl_ngettext);
-+#endif
-+
-+/* Similar to `dgettext' but select the plural form corresponding to the
-+ number N. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
-+ const char *__msgid2, unsigned long int __n);
-+static inline char *dngettext (const char *__domainname, const char *__msgid1,
-+ const char *__msgid2, unsigned long int __n)
-+{
-+ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define dngettext libintl_dngettext
-+#endif
-+extern char *dngettext (const char *__domainname,
-+ const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n)
-+ _INTL_ASM (libintl_dngettext);
-+#endif
-+
-+/* Similar to `dcgettext' but select the plural form corresponding to the
-+ number N. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_dcngettext (const char *__domainname,
-+ const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n, int __category);
-+static inline char *dcngettext (const char *__domainname,
-+ const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n, int __category)
-+{
-+ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define dcngettext libintl_dcngettext
-+#endif
-+extern char *dcngettext (const char *__domainname,
-+ const char *__msgid1, const char *__msgid2,
-+ unsigned long int __n, int __category)
-+ _INTL_ASM (libintl_dcngettext);
-+#endif
-+
-+
-+/* Set the current default message catalog to DOMAINNAME.
-+ If DOMAINNAME is null, return the current default.
-+ If DOMAINNAME is "", reset to the default of "messages". */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_textdomain (const char *__domainname);
-+static inline char *textdomain (const char *__domainname)
-+{
-+ return libintl_textdomain (__domainname);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define textdomain libintl_textdomain
-+#endif
-+extern char *textdomain (const char *__domainname)
-+ _INTL_ASM (libintl_textdomain);
-+#endif
-+
-+/* Specify that the DOMAINNAME message catalog will be found
-+ in DIRNAME rather than in the system locale data base. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_bindtextdomain (const char *__domainname,
-+ const char *__dirname);
-+static inline char *bindtextdomain (const char *__domainname,
-+ const char *__dirname)
-+{
-+ return libintl_bindtextdomain (__domainname, __dirname);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define bindtextdomain libintl_bindtextdomain
-+#endif
-+extern char *bindtextdomain (const char *__domainname, const char *__dirname)
-+ _INTL_ASM (libintl_bindtextdomain);
-+#endif
-+
-+/* Specify the character encoding in which the messages from the
-+ DOMAINNAME message catalog will be returned. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
-+ const char *__codeset);
-+static inline char *bind_textdomain_codeset (const char *__domainname,
-+ const char *__codeset)
-+{
-+ return libintl_bind_textdomain_codeset (__domainname, __codeset);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
-+#endif
-+extern char *bind_textdomain_codeset (const char *__domainname,
-+ const char *__codeset)
-+ _INTL_ASM (libintl_bind_textdomain_codeset);
-+#endif
-+
-+
-+/* Support for format strings with positions in *printf(), following the
-+ POSIX/XSI specification.
-+ Note: These replacements for the *printf() functions are visible only
-+ in source files that #include <libintl.h> or #include "gettext.h".
-+ Packages that use *printf() in source files that don't refer to _()
-+ or gettext() but for which the format string could be the return value
-+ of _() or gettext() need to add this #include. Oh well. */
-+
-+#if !@HAVE_POSIX_PRINTF@
-+
-+#include <stdio.h>
-+#include <stddef.h>
-+
-+/* Get va_list. */
-+#if __STDC__ || defined __cplusplus || defined _MSC_VER
-+# include <stdarg.h>
-+#else
-+# include <varargs.h>
-+#endif
-+
-+#undef fprintf
-+#define fprintf libintl_fprintf
-+extern int fprintf (FILE *, const char *, ...);
-+#undef vfprintf
-+#define vfprintf libintl_vfprintf
-+extern int vfprintf (FILE *, const char *, va_list);
-+
-+#undef printf
-+#define printf libintl_printf
-+extern int printf (const char *, ...);
-+#undef vprintf
-+#define vprintf libintl_vprintf
-+extern int vprintf (const char *, va_list);
-+
-+#undef sprintf
-+#define sprintf libintl_sprintf
-+extern int sprintf (char *, const char *, ...);
-+#undef vsprintf
-+#define vsprintf libintl_vsprintf
-+extern int vsprintf (char *, const char *, va_list);
-+
-+#if @HAVE_SNPRINTF@
-+
-+#undef snprintf
-+#define snprintf libintl_snprintf
-+extern int snprintf (char *, size_t, const char *, ...);
-+#undef vsnprintf
-+#define vsnprintf libintl_vsnprintf
-+extern int vsnprintf (char *, size_t, const char *, va_list);
-+
-+#endif
-+
-+#if @HAVE_ASPRINTF@
-+
-+#undef asprintf
-+#define asprintf libintl_asprintf
-+extern int asprintf (char **, const char *, ...);
-+#undef vasprintf
-+#define vasprintf libintl_vasprintf
-+extern int vasprintf (char **, const char *, va_list);
-+
-+#endif
-+
-+#if @HAVE_WPRINTF@
-+
-+#undef fwprintf
-+#define fwprintf libintl_fwprintf
-+extern int fwprintf (FILE *, const wchar_t *, ...);
-+#undef vfwprintf
-+#define vfwprintf libintl_vfwprintf
-+extern int vfwprintf (FILE *, const wchar_t *, va_list);
-+
-+#undef wprintf
-+#define wprintf libintl_wprintf
-+extern int wprintf (const wchar_t *, ...);
-+#undef vwprintf
-+#define vwprintf libintl_vwprintf
-+extern int vwprintf (const wchar_t *, va_list);
-+
-+#undef swprintf
-+#define swprintf libintl_swprintf
-+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
-+#undef vswprintf
-+#define vswprintf libintl_vswprintf
-+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
-+
-+#endif
-+
-+#endif
-+
-+
-+/* Support for relocatable packages. */
-+
-+/* Sets the original and the current installation prefix of the package.
-+ Relocation simply replaces a pathname starting with the original prefix
-+ by the corresponding pathname with the current prefix instead. Both
-+ prefixes should be directory names without trailing slash (i.e. use ""
-+ instead of "/"). */
-+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
-+extern void
-+ libintl_set_relocation_prefix (const char *orig_prefix,
-+ const char *curr_prefix);
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* libintl.h */
---- lrzsz-0.12.20.safe/intl/linux-msg.sed 1998-04-26 09:20:52.000000000 -0400
-+++ lrzsz-0.12.20/intl/linux-msg.sed 1969-12-31 19:00:00.000000000 -0500
-@@ -1,100 +0,0 @@
--# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
--# Copyright (C) 1995 Free Software Foundation, Inc.
--# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
--#
--# This program is free software; you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation; either version 2, or (at your option)
--# any later version.
--#
--# This program is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--# GNU General Public License for more details.
--#
--# You should have received a copy of the GNU General Public License
--# along with this program; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--#
--#
--# The first directive in the .msg should be the definition of the
--# message set number. We use always set number 1.
--#
--1 {
-- i\
--$set 1 # Automatically created by po2msg.sed
-- h
-- s/.*/0/
-- x
--}
--#
--# Mitch's old catalog format does not allow comments.
--#
--# We copy the original message as a comment into the .msg file.
--#
--/^msgid/ {
-- s/msgid[ ]*"//
--#
--# This does not work now with the new format.
--# /"$/! {
--# s/\\$//
--# s/$/ ... (more lines following)"/
--# }
-- x
--# The following nice solution is by
--# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
-- td
--# Increment a decimal number in pattern space.
--# First hide trailing `9' digits.
-- :d
-- s/9\(_*\)$/_\1/
-- td
--# Assure at least one digit is available.
-- s/^\(_*\)$/0\1/
--# Increment the last digit.
-- s/8\(_*\)$/9\1/
-- s/7\(_*\)$/8\1/
-- s/6\(_*\)$/7\1/
-- s/5\(_*\)$/6\1/
-- s/4\(_*\)$/5\1/
-- s/3\(_*\)$/4\1/
-- s/2\(_*\)$/3\1/
-- s/1\(_*\)$/2\1/
-- s/0\(_*\)$/1\1/
--# Convert the hidden `9' digits to `0's.
-- s/_/0/g
-- x
-- G
-- s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
--}
--#
--# The .msg file contains, other then the .po file, only the translations
--# but each given a unique ID. Starting from 1 and incrementing by 1 for
--# each message we assign them to the messages.
--# It is important that the .po file used to generate the cat-id-tbl.c file
--# (with po-to-tbl) is the same as the one used here. (At least the order
--# of declarations must not be changed.)
--#
--/^msgstr/ {
-- s/msgstr[ ]*"\(.*\)"/# \1/
--# Clear substitution flag.
-- tb
--# Append the next line.
-- :b
-- N
--# Look whether second part is continuation line.
-- s/\(.*\n\)"\(.*\)"/\1\2/
--# Yes, then branch.
-- ta
-- P
-- D
--# Note that D includes a jump to the start!!
--# We found a continuation line. But before printing insert '\'.
-- :a
-- s/\(.*\)\(\n.*\)/\1\\\2/
-- P
--# We cannot use D here.
-- s/.*\n\(.*\)/\1/
-- tb
--}
--d
---- lrzsz-0.12.20.safe/intl/loadinfo.h 1998-04-26 09:20:52.000000000 -0400
-+++ lrzsz-0.12.20/intl/loadinfo.h 2004-09-12 14:40:34.468730912 -0400
-@@ -1,9 +1,54 @@
--#ifndef PARAMS
--# if __STDC__
--# define PARAMS(args) args
--# else
--# define PARAMS(args) ()
--# endif
-+/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _LOADINFO_H
-+#define _LOADINFO_H 1
-+
-+/* Declarations of locale dependent catalog lookup functions.
-+ Implemented in
-+
-+ localealias.c Possibly replace a locale name by another.
-+ explodename.c Split a locale name into its various fields.
-+ l10nflist.c Generate a list of filenames of possible message catalogs.
-+ finddomain.c Find and open the relevant message catalogs.
-+
-+ The main function _nl_find_domain() in finddomain.c is declared
-+ in gettextP.h.
-+ */
-+
-+#ifndef internal_function
-+# define internal_function
-+#endif
-+
-+/* Tell the compiler when a conditional or integer expression is
-+ almost always true or almost always false. */
-+#ifndef HAVE_BUILTIN_EXPECT
-+# define __builtin_expect(expr, val) (expr)
-+#endif
-+
-+/* Separator in PATH like lists of pathnames. */
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
-+# define PATH_SEPARATOR ';'
-+#else
-+ /* Unix */
-+# define PATH_SEPARATOR ':'
- #endif
-
- /* Encoding of locale name parts. */
-@@ -32,27 +77,69 @@
- };
-
-
--extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
-- size_t name_len));
-+/* Normalize codeset name. There is no standard for the codeset
-+ names. Normalization allows the user to use any of the common
-+ names. The return value is dynamically allocated and has to be
-+ freed by the caller. */
-+extern const char *_nl_normalize_codeset (const char *codeset,
-+ size_t name_len);
-
-+/* Lookup a locale dependent file.
-+ *L10NFILE_LIST denotes a pool of lookup results of locale dependent
-+ files of the same kind, sorted in decreasing order of ->filename.
-+ DIRLIST and DIRLIST_LEN are an argz list of directories in which to
-+ look, containing at least one directory (i.e. DIRLIST_LEN > 0).
-+ MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
-+ SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
-+ produced by _nl_explode_name(). FILENAME is the filename suffix.
-+ The return value is the lookup result, either found in *L10NFILE_LIST,
-+ or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
-+ If the return value is non-NULL, it is added to *L10NFILE_LIST, and
-+ its ->next field denotes the chaining inside *L10NFILE_LIST, and
-+ furthermore its ->successor[] field contains a list of other lookup
-+ results from which this lookup result inherits. */
- extern struct loaded_l10nfile *
--_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
-- const char *dirlist, size_t dirlist_len, int mask,
-- const char *language, const char *territory,
-- const char *codeset,
-- const char *normalized_codeset,
-- const char *modifier, const char *special,
-- const char *sponsor, const char *revision,
-- const char *filename, int do_allocate));
-+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
-+ const char *dirlist, size_t dirlist_len, int mask,
-+ const char *language, const char *territory,
-+ const char *codeset, const char *normalized_codeset,
-+ const char *modifier, const char *special,
-+ const char *sponsor, const char *revision,
-+ const char *filename, int do_allocate);
-
-+/* Lookup the real locale name for a locale alias NAME, or NULL if
-+ NAME is not a locale alias (but possibly a real locale name).
-+ The return value is statically allocated and must not be freed. */
-+extern const char *_nl_expand_alias (const char *name);
-
--extern const char *_nl_expand_alias PARAMS ((const char *name));
-+/* Split a locale name NAME into its pieces: language, modifier,
-+ territory, codeset, special, sponsor, revision.
-+ NAME gets destructively modified: NUL bytes are inserted here and
-+ there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
-+ *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
-+ pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
-+ gets assigned the expanded *CODESET, if it is different from *CODESET;
-+ this one is dynamically allocated and has to be freed by the caller.
-+ The return value is a bitmask, where each bit corresponds to one
-+ filled-in value:
-+ XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
-+ TERRITORY for *TERRITORY,
-+ XPG_CODESET for *CODESET,
-+ XPG_NORM_CODESET for *NORMALIZED_CODESET,
-+ CEN_SPECIAL for *SPECIAL,
-+ CEN_SPONSOR for *SPONSOR,
-+ CEN_REVISION for *REVISION.
-+ */
-+extern int _nl_explode_name (char *name, const char **language,
-+ const char **modifier, const char **territory,
-+ const char **codeset,
-+ const char **normalized_codeset,
-+ const char **special, const char **sponsor,
-+ const char **revision);
-
--extern int _nl_explode_name PARAMS ((char *name, const char **language,
-- const char **modifier,
-- const char **territory,
-- const char **codeset,
-- const char **normalized_codeset,
-- const char **special,
-- const char **sponsor,
-- const char **revision));
-+/* Split a locale name NAME into a leading language part and all the
-+ rest. Return a pointer to the first character after the language,
-+ i.e. to the first byte of the rest. */
-+extern char *_nl_find_language (const char *name);
-+
-+#endif /* loadinfo.h */
---- lrzsz-0.12.20.safe/intl/loadmsgcat.c 1998-04-26 09:22:37.000000000 -0400
-+++ lrzsz-0.12.20/intl/loadmsgcat.c 2004-09-12 14:40:34.473730152 -0400
-@@ -1,42 +1,455 @@
--/* Load needed message catalogs
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-+/* Load needed message catalogs.
-+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
-+ This must come before <config.h> because <config.h> may include
-+ <features.h>, and once <features.h> has been included, it's too late. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
-+#include <ctype.h>
-+#include <errno.h>
- #include <fcntl.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-
--#if defined STDC_HEADERS || defined _LIBC
--# include <stdlib.h>
-+#ifdef __GNUC__
-+# undef alloca
-+# define alloca __builtin_alloca
-+# define HAVE_ALLOCA 1
-+#else
-+# ifdef _MSC_VER
-+# include <malloc.h>
-+# define alloca _alloca
-+# else
-+# if defined HAVE_ALLOCA_H || defined _LIBC
-+# include <alloca.h>
-+# else
-+# ifdef _AIX
-+ #pragma alloca
-+# else
-+# ifndef alloca
-+char *alloca ();
-+# endif
-+# endif
-+# endif
-+# endif
- #endif
-
-+#include <stdlib.h>
-+#include <string.h>
-+
- #if defined HAVE_UNISTD_H || defined _LIBC
- # include <unistd.h>
- #endif
-
--#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
-+#ifdef _LIBC
-+# include <langinfo.h>
-+# include <locale.h>
-+#endif
-+
-+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
-+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
- # include <sys/mman.h>
-+# undef HAVE_MMAP
-+# define HAVE_MMAP 1
-+#else
-+# undef HAVE_MMAP
- #endif
-
--#include "gettext.h"
-+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
-+# include <stdint.h>
-+#endif
-+#if defined HAVE_INTTYPES_H || defined _LIBC
-+# include <inttypes.h>
-+#endif
-+
-+#include "gmo.h"
- #include "gettextP.h"
-+#include "hash-string.h"
-+#include "plural-exp.h"
-+
-+#ifdef _LIBC
-+# include "../locale/localeinfo.h"
-+#endif
-+
-+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
-+ Note that our fallback values need not be literal strings, because we don't
-+ use them with preprocessor string concatenation. */
-+#if !defined PRId8 || PRI_MACROS_BROKEN
-+# undef PRId8
-+# define PRId8 "d"
-+#endif
-+#if !defined PRIi8 || PRI_MACROS_BROKEN
-+# undef PRIi8
-+# define PRIi8 "i"
-+#endif
-+#if !defined PRIo8 || PRI_MACROS_BROKEN
-+# undef PRIo8
-+# define PRIo8 "o"
-+#endif
-+#if !defined PRIu8 || PRI_MACROS_BROKEN
-+# undef PRIu8
-+# define PRIu8 "u"
-+#endif
-+#if !defined PRIx8 || PRI_MACROS_BROKEN
-+# undef PRIx8
-+# define PRIx8 "x"
-+#endif
-+#if !defined PRIX8 || PRI_MACROS_BROKEN
-+# undef PRIX8
-+# define PRIX8 "X"
-+#endif
-+#if !defined PRId16 || PRI_MACROS_BROKEN
-+# undef PRId16
-+# define PRId16 "d"
-+#endif
-+#if !defined PRIi16 || PRI_MACROS_BROKEN
-+# undef PRIi16
-+# define PRIi16 "i"
-+#endif
-+#if !defined PRIo16 || PRI_MACROS_BROKEN
-+# undef PRIo16
-+# define PRIo16 "o"
-+#endif
-+#if !defined PRIu16 || PRI_MACROS_BROKEN
-+# undef PRIu16
-+# define PRIu16 "u"
-+#endif
-+#if !defined PRIx16 || PRI_MACROS_BROKEN
-+# undef PRIx16
-+# define PRIx16 "x"
-+#endif
-+#if !defined PRIX16 || PRI_MACROS_BROKEN
-+# undef PRIX16
-+# define PRIX16 "X"
-+#endif
-+#if !defined PRId32 || PRI_MACROS_BROKEN
-+# undef PRId32
-+# define PRId32 "d"
-+#endif
-+#if !defined PRIi32 || PRI_MACROS_BROKEN
-+# undef PRIi32
-+# define PRIi32 "i"
-+#endif
-+#if !defined PRIo32 || PRI_MACROS_BROKEN
-+# undef PRIo32
-+# define PRIo32 "o"
-+#endif
-+#if !defined PRIu32 || PRI_MACROS_BROKEN
-+# undef PRIu32
-+# define PRIu32 "u"
-+#endif
-+#if !defined PRIx32 || PRI_MACROS_BROKEN
-+# undef PRIx32
-+# define PRIx32 "x"
-+#endif
-+#if !defined PRIX32 || PRI_MACROS_BROKEN
-+# undef PRIX32
-+# define PRIX32 "X"
-+#endif
-+#if !defined PRId64 || PRI_MACROS_BROKEN
-+# undef PRId64
-+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
-+#endif
-+#if !defined PRIi64 || PRI_MACROS_BROKEN
-+# undef PRIi64
-+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
-+#endif
-+#if !defined PRIo64 || PRI_MACROS_BROKEN
-+# undef PRIo64
-+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
-+#endif
-+#if !defined PRIu64 || PRI_MACROS_BROKEN
-+# undef PRIu64
-+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
-+#endif
-+#if !defined PRIx64 || PRI_MACROS_BROKEN
-+# undef PRIx64
-+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
-+#endif
-+#if !defined PRIX64 || PRI_MACROS_BROKEN
-+# undef PRIX64
-+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
-+#endif
-+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
-+# undef PRIdLEAST8
-+# define PRIdLEAST8 "d"
-+#endif
-+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
-+# undef PRIiLEAST8
-+# define PRIiLEAST8 "i"
-+#endif
-+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
-+# undef PRIoLEAST8
-+# define PRIoLEAST8 "o"
-+#endif
-+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
-+# undef PRIuLEAST8
-+# define PRIuLEAST8 "u"
-+#endif
-+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
-+# undef PRIxLEAST8
-+# define PRIxLEAST8 "x"
-+#endif
-+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
-+# undef PRIXLEAST8
-+# define PRIXLEAST8 "X"
-+#endif
-+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
-+# undef PRIdLEAST16
-+# define PRIdLEAST16 "d"
-+#endif
-+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
-+# undef PRIiLEAST16
-+# define PRIiLEAST16 "i"
-+#endif
-+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
-+# undef PRIoLEAST16
-+# define PRIoLEAST16 "o"
-+#endif
-+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
-+# undef PRIuLEAST16
-+# define PRIuLEAST16 "u"
-+#endif
-+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
-+# undef PRIxLEAST16
-+# define PRIxLEAST16 "x"
-+#endif
-+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
-+# undef PRIXLEAST16
-+# define PRIXLEAST16 "X"
-+#endif
-+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
-+# undef PRIdLEAST32
-+# define PRIdLEAST32 "d"
-+#endif
-+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
-+# undef PRIiLEAST32
-+# define PRIiLEAST32 "i"
-+#endif
-+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
-+# undef PRIoLEAST32
-+# define PRIoLEAST32 "o"
-+#endif
-+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
-+# undef PRIuLEAST32
-+# define PRIuLEAST32 "u"
-+#endif
-+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
-+# undef PRIxLEAST32
-+# define PRIxLEAST32 "x"
-+#endif
-+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
-+# undef PRIXLEAST32
-+# define PRIXLEAST32 "X"
-+#endif
-+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
-+# undef PRIdLEAST64
-+# define PRIdLEAST64 PRId64
-+#endif
-+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
-+# undef PRIiLEAST64
-+# define PRIiLEAST64 PRIi64
-+#endif
-+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
-+# undef PRIoLEAST64
-+# define PRIoLEAST64 PRIo64
-+#endif
-+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
-+# undef PRIuLEAST64
-+# define PRIuLEAST64 PRIu64
-+#endif
-+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
-+# undef PRIxLEAST64
-+# define PRIxLEAST64 PRIx64
-+#endif
-+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
-+# undef PRIXLEAST64
-+# define PRIXLEAST64 PRIX64
-+#endif
-+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
-+# undef PRIdFAST8
-+# define PRIdFAST8 "d"
-+#endif
-+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
-+# undef PRIiFAST8
-+# define PRIiFAST8 "i"
-+#endif
-+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
-+# undef PRIoFAST8
-+# define PRIoFAST8 "o"
-+#endif
-+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
-+# undef PRIuFAST8
-+# define PRIuFAST8 "u"
-+#endif
-+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
-+# undef PRIxFAST8
-+# define PRIxFAST8 "x"
-+#endif
-+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
-+# undef PRIXFAST8
-+# define PRIXFAST8 "X"
-+#endif
-+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
-+# undef PRIdFAST16
-+# define PRIdFAST16 "d"
-+#endif
-+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
-+# undef PRIiFAST16
-+# define PRIiFAST16 "i"
-+#endif
-+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
-+# undef PRIoFAST16
-+# define PRIoFAST16 "o"
-+#endif
-+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
-+# undef PRIuFAST16
-+# define PRIuFAST16 "u"
-+#endif
-+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
-+# undef PRIxFAST16
-+# define PRIxFAST16 "x"
-+#endif
-+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
-+# undef PRIXFAST16
-+# define PRIXFAST16 "X"
-+#endif
-+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
-+# undef PRIdFAST32
-+# define PRIdFAST32 "d"
-+#endif
-+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
-+# undef PRIiFAST32
-+# define PRIiFAST32 "i"
-+#endif
-+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
-+# undef PRIoFAST32
-+# define PRIoFAST32 "o"
-+#endif
-+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
-+# undef PRIuFAST32
-+# define PRIuFAST32 "u"
-+#endif
-+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
-+# undef PRIxFAST32
-+# define PRIxFAST32 "x"
-+#endif
-+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
-+# undef PRIXFAST32
-+# define PRIXFAST32 "X"
-+#endif
-+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
-+# undef PRIdFAST64
-+# define PRIdFAST64 PRId64
-+#endif
-+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
-+# undef PRIiFAST64
-+# define PRIiFAST64 PRIi64
-+#endif
-+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
-+# undef PRIoFAST64
-+# define PRIoFAST64 PRIo64
-+#endif
-+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
-+# undef PRIuFAST64
-+# define PRIuFAST64 PRIu64
-+#endif
-+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
-+# undef PRIxFAST64
-+# define PRIxFAST64 PRIx64
-+#endif
-+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
-+# undef PRIXFAST64
-+# define PRIXFAST64 PRIX64
-+#endif
-+#if !defined PRIdMAX || PRI_MACROS_BROKEN
-+# undef PRIdMAX
-+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
-+#endif
-+#if !defined PRIiMAX || PRI_MACROS_BROKEN
-+# undef PRIiMAX
-+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
-+#endif
-+#if !defined PRIoMAX || PRI_MACROS_BROKEN
-+# undef PRIoMAX
-+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
-+#endif
-+#if !defined PRIuMAX || PRI_MACROS_BROKEN
-+# undef PRIuMAX
-+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
-+#endif
-+#if !defined PRIxMAX || PRI_MACROS_BROKEN
-+# undef PRIxMAX
-+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
-+#endif
-+#if !defined PRIXMAX || PRI_MACROS_BROKEN
-+# undef PRIXMAX
-+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
-+#endif
-+#if !defined PRIdPTR || PRI_MACROS_BROKEN
-+# undef PRIdPTR
-+# define PRIdPTR \
-+ (sizeof (void *) == sizeof (long) ? "ld" : \
-+ sizeof (void *) == sizeof (int) ? "d" : \
-+ "lld")
-+#endif
-+#if !defined PRIiPTR || PRI_MACROS_BROKEN
-+# undef PRIiPTR
-+# define PRIiPTR \
-+ (sizeof (void *) == sizeof (long) ? "li" : \
-+ sizeof (void *) == sizeof (int) ? "i" : \
-+ "lli")
-+#endif
-+#if !defined PRIoPTR || PRI_MACROS_BROKEN
-+# undef PRIoPTR
-+# define PRIoPTR \
-+ (sizeof (void *) == sizeof (long) ? "lo" : \
-+ sizeof (void *) == sizeof (int) ? "o" : \
-+ "llo")
-+#endif
-+#if !defined PRIuPTR || PRI_MACROS_BROKEN
-+# undef PRIuPTR
-+# define PRIuPTR \
-+ (sizeof (void *) == sizeof (long) ? "lu" : \
-+ sizeof (void *) == sizeof (int) ? "u" : \
-+ "llu")
-+#endif
-+#if !defined PRIxPTR || PRI_MACROS_BROKEN
-+# undef PRIxPTR
-+# define PRIxPTR \
-+ (sizeof (void *) == sizeof (long) ? "lx" : \
-+ sizeof (void *) == sizeof (int) ? "x" : \
-+ "llx")
-+#endif
-+#if !defined PRIXPTR || PRI_MACROS_BROKEN
-+# undef PRIXPTR
-+# define PRIXPTR \
-+ (sizeof (void *) == sizeof (long) ? "lX" : \
-+ sizeof (void *) == sizeof (int) ? "X" : \
-+ "llX")
-+#endif
-
- /* @@ end of prolog @@ */
-
-@@ -44,7 +457,6 @@
- /* Rename the non ISO C functions. This is required by the standard
- because some ISO C functions will require linking with this object
- file and the name space must not be polluted. */
--# define fstat __fstat
- # define open __open
- # define close __close
- # define read __read
-@@ -52,30 +464,471 @@
- # define munmap __munmap
- #endif
-
-+/* For those losing systems which don't have `alloca' we have to add
-+ some additional code emulating it. */
-+#ifdef HAVE_ALLOCA
-+# define freea(p) /* nothing */
-+#else
-+# define alloca(n) malloc (n)
-+# define freea(p) free (p)
-+#endif
-+
-+/* For systems that distinguish between text and binary I/O.
-+ O_BINARY is usually declared in <fcntl.h>. */
-+#if !defined O_BINARY && defined _O_BINARY
-+ /* For MSC-compatible compilers. */
-+# define O_BINARY _O_BINARY
-+# define O_TEXT _O_TEXT
-+#endif
-+#ifdef __BEOS__
-+ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
-+# undef O_BINARY
-+# undef O_TEXT
-+#endif
-+/* On reasonable systems, binary I/O is the default. */
-+#ifndef O_BINARY
-+# define O_BINARY 0
-+#endif
-+
-+
- /* We need a sign, whether a new catalog was loaded, which can be associated
- with all translations. This is important if the translations are
- cached by one of GCC's features. */
--int _nl_msg_cat_cntr = 0;
-+int _nl_msg_cat_cntr;
-
-
-+/* Expand a system dependent string segment. Return NULL if unsupported. */
-+static const char *
-+get_sysdep_segment_value (const char *name)
-+{
-+ /* Test for an ISO C 99 section 7.8.1 format string directive.
-+ Syntax:
-+ P R I { d | i | o | u | x | X }
-+ { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */
-+ /* We don't use a table of 14 times 6 'const char *' strings here, because
-+ data relocations cost startup time. */
-+ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
-+ {
-+ if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
-+ || name[3] == 'x' || name[3] == 'X')
-+ {
-+ if (name[4] == '8' && name[5] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRId8;
-+ if (name[3] == 'i')
-+ return PRIi8;
-+ if (name[3] == 'o')
-+ return PRIo8;
-+ if (name[3] == 'u')
-+ return PRIu8;
-+ if (name[3] == 'x')
-+ return PRIx8;
-+ if (name[3] == 'X')
-+ return PRIX8;
-+ abort ();
-+ }
-+ if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRId16;
-+ if (name[3] == 'i')
-+ return PRIi16;
-+ if (name[3] == 'o')
-+ return PRIo16;
-+ if (name[3] == 'u')
-+ return PRIu16;
-+ if (name[3] == 'x')
-+ return PRIx16;
-+ if (name[3] == 'X')
-+ return PRIX16;
-+ abort ();
-+ }
-+ if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRId32;
-+ if (name[3] == 'i')
-+ return PRIi32;
-+ if (name[3] == 'o')
-+ return PRIo32;
-+ if (name[3] == 'u')
-+ return PRIu32;
-+ if (name[3] == 'x')
-+ return PRIx32;
-+ if (name[3] == 'X')
-+ return PRIX32;
-+ abort ();
-+ }
-+ if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRId64;
-+ if (name[3] == 'i')
-+ return PRIi64;
-+ if (name[3] == 'o')
-+ return PRIo64;
-+ if (name[3] == 'u')
-+ return PRIu64;
-+ if (name[3] == 'x')
-+ return PRIx64;
-+ if (name[3] == 'X')
-+ return PRIX64;
-+ abort ();
-+ }
-+ if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
-+ && name[7] == 'S' && name[8] == 'T')
-+ {
-+ if (name[9] == '8' && name[10] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdLEAST8;
-+ if (name[3] == 'i')
-+ return PRIiLEAST8;
-+ if (name[3] == 'o')
-+ return PRIoLEAST8;
-+ if (name[3] == 'u')
-+ return PRIuLEAST8;
-+ if (name[3] == 'x')
-+ return PRIxLEAST8;
-+ if (name[3] == 'X')
-+ return PRIXLEAST8;
-+ abort ();
-+ }
-+ if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdLEAST16;
-+ if (name[3] == 'i')
-+ return PRIiLEAST16;
-+ if (name[3] == 'o')
-+ return PRIoLEAST16;
-+ if (name[3] == 'u')
-+ return PRIuLEAST16;
-+ if (name[3] == 'x')
-+ return PRIxLEAST16;
-+ if (name[3] == 'X')
-+ return PRIXLEAST16;
-+ abort ();
-+ }
-+ if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdLEAST32;
-+ if (name[3] == 'i')
-+ return PRIiLEAST32;
-+ if (name[3] == 'o')
-+ return PRIoLEAST32;
-+ if (name[3] == 'u')
-+ return PRIuLEAST32;
-+ if (name[3] == 'x')
-+ return PRIxLEAST32;
-+ if (name[3] == 'X')
-+ return PRIXLEAST32;
-+ abort ();
-+ }
-+ if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdLEAST64;
-+ if (name[3] == 'i')
-+ return PRIiLEAST64;
-+ if (name[3] == 'o')
-+ return PRIoLEAST64;
-+ if (name[3] == 'u')
-+ return PRIuLEAST64;
-+ if (name[3] == 'x')
-+ return PRIxLEAST64;
-+ if (name[3] == 'X')
-+ return PRIXLEAST64;
-+ abort ();
-+ }
-+ }
-+ if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
-+ && name[7] == 'T')
-+ {
-+ if (name[8] == '8' && name[9] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdFAST8;
-+ if (name[3] == 'i')
-+ return PRIiFAST8;
-+ if (name[3] == 'o')
-+ return PRIoFAST8;
-+ if (name[3] == 'u')
-+ return PRIuFAST8;
-+ if (name[3] == 'x')
-+ return PRIxFAST8;
-+ if (name[3] == 'X')
-+ return PRIXFAST8;
-+ abort ();
-+ }
-+ if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdFAST16;
-+ if (name[3] == 'i')
-+ return PRIiFAST16;
-+ if (name[3] == 'o')
-+ return PRIoFAST16;
-+ if (name[3] == 'u')
-+ return PRIuFAST16;
-+ if (name[3] == 'x')
-+ return PRIxFAST16;
-+ if (name[3] == 'X')
-+ return PRIXFAST16;
-+ abort ();
-+ }
-+ if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdFAST32;
-+ if (name[3] == 'i')
-+ return PRIiFAST32;
-+ if (name[3] == 'o')
-+ return PRIoFAST32;
-+ if (name[3] == 'u')
-+ return PRIuFAST32;
-+ if (name[3] == 'x')
-+ return PRIxFAST32;
-+ if (name[3] == 'X')
-+ return PRIXFAST32;
-+ abort ();
-+ }
-+ if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdFAST64;
-+ if (name[3] == 'i')
-+ return PRIiFAST64;
-+ if (name[3] == 'o')
-+ return PRIoFAST64;
-+ if (name[3] == 'u')
-+ return PRIuFAST64;
-+ if (name[3] == 'x')
-+ return PRIxFAST64;
-+ if (name[3] == 'X')
-+ return PRIXFAST64;
-+ abort ();
-+ }
-+ }
-+ if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
-+ && name[7] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdMAX;
-+ if (name[3] == 'i')
-+ return PRIiMAX;
-+ if (name[3] == 'o')
-+ return PRIoMAX;
-+ if (name[3] == 'u')
-+ return PRIuMAX;
-+ if (name[3] == 'x')
-+ return PRIxMAX;
-+ if (name[3] == 'X')
-+ return PRIXMAX;
-+ abort ();
-+ }
-+ if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
-+ && name[7] == '\0')
-+ {
-+ if (name[3] == 'd')
-+ return PRIdPTR;
-+ if (name[3] == 'i')
-+ return PRIiPTR;
-+ if (name[3] == 'o')
-+ return PRIoPTR;
-+ if (name[3] == 'u')
-+ return PRIuPTR;
-+ if (name[3] == 'x')
-+ return PRIxPTR;
-+ if (name[3] == 'X')
-+ return PRIXPTR;
-+ abort ();
-+ }
-+ }
-+ }
-+ /* Test for a glibc specific printf() format directive flag. */
-+ if (name[0] == 'I' && name[1] == '\0')
-+ {
-+#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
-+ /* The 'I' flag, in numeric format directives, replaces ASCII digits
-+ with the 'outdigits' defined in the LC_CTYPE locale facet. This is
-+ used for Farsi (Persian) and maybe Arabic. */
-+ return "I";
-+#else
-+ return "";
-+#endif
-+ }
-+ /* Other system dependent strings are not valid. */
-+ return NULL;
-+}
-+
-+/* Initialize the codeset dependent parts of an opened message catalog.
-+ Return the header entry. */
-+const char *
-+internal_function
-+_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
-+ struct loaded_domain *domain,
-+ struct binding *domainbinding)
-+{
-+ /* Find out about the character set the file is encoded with.
-+ This can be found (in textual form) in the entry "". If this
-+ entry does not exist or if this does not contain the `charset='
-+ information, we will assume the charset matches the one the
-+ current locale and we don't have to perform any conversion. */
-+ char *nullentry;
-+ size_t nullentrylen;
-+
-+ /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
-+ domain->codeset_cntr =
-+ (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
-+#ifdef _LIBC
-+ domain->conv = (__gconv_t) -1;
-+#else
-+# if HAVE_ICONV
-+ domain->conv = (iconv_t) -1;
-+# endif
-+#endif
-+ domain->conv_tab = NULL;
-+
-+ /* Get the header entry. */
-+ nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
-+
-+ if (nullentry != NULL)
-+ {
-+#if defined _LIBC || HAVE_ICONV
-+ const char *charsetstr;
-+
-+ charsetstr = strstr (nullentry, "charset=");
-+ if (charsetstr != NULL)
-+ {
-+ size_t len;
-+ char *charset;
-+ const char *outcharset;
-+
-+ charsetstr += strlen ("charset=");
-+ len = strcspn (charsetstr, " \t\n");
-+
-+ charset = (char *) alloca (len + 1);
-+# if defined _LIBC || HAVE_MEMPCPY
-+ *((char *) mempcpy (charset, charsetstr, len)) = '\0';
-+# else
-+ memcpy (charset, charsetstr, len);
-+ charset[len] = '\0';
-+# endif
-+
-+ /* The output charset should normally be determined by the
-+ locale. But sometimes the locale is not used or not correctly
-+ set up, so we provide a possibility for the user to override
-+ this. Moreover, the value specified through
-+ bind_textdomain_codeset overrides both. */
-+ if (domainbinding != NULL && domainbinding->codeset != NULL)
-+ outcharset = domainbinding->codeset;
-+ else
-+ {
-+ outcharset = getenv ("OUTPUT_CHARSET");
-+ if (outcharset == NULL || outcharset[0] == '\0')
-+ {
-+# ifdef _LIBC
-+ outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
-+# else
-+# if HAVE_ICONV
-+ extern const char *locale_charset (void);
-+ outcharset = locale_charset ();
-+# endif
-+# endif
-+ }
-+ }
-+
-+# ifdef _LIBC
-+ /* We always want to use transliteration. */
-+ outcharset = norm_add_slashes (outcharset, "TRANSLIT");
-+ charset = norm_add_slashes (charset, NULL);
-+ if (__gconv_open (outcharset, charset, &domain->conv,
-+ GCONV_AVOID_NOCONV)
-+ != __GCONV_OK)
-+ domain->conv = (__gconv_t) -1;
-+# else
-+# if HAVE_ICONV
-+ /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
-+ we want to use transliteration. */
-+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
-+ || _LIBICONV_VERSION >= 0x0105
-+ if (strchr (outcharset, '/') == NULL)
-+ {
-+ char *tmp;
-+
-+ len = strlen (outcharset);
-+ tmp = (char *) alloca (len + 10 + 1);
-+ memcpy (tmp, outcharset, len);
-+ memcpy (tmp + len, "//TRANSLIT", 10 + 1);
-+ outcharset = tmp;
-+
-+ domain->conv = iconv_open (outcharset, charset);
-+
-+ freea (outcharset);
-+ }
-+ else
-+# endif
-+ domain->conv = iconv_open (outcharset, charset);
-+# endif
-+# endif
-+
-+ freea (charset);
-+ }
-+#endif /* _LIBC || HAVE_ICONV */
-+ }
-+
-+ return nullentry;
-+}
-+
-+/* Frees the codeset dependent parts of an opened message catalog. */
-+void
-+internal_function
-+_nl_free_domain_conv (struct loaded_domain *domain)
-+{
-+ if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
-+ free (domain->conv_tab);
-+
-+#ifdef _LIBC
-+ if (domain->conv != (__gconv_t) -1)
-+ __gconv_close (domain->conv);
-+#else
-+# if HAVE_ICONV
-+ if (domain->conv != (iconv_t) -1)
-+ iconv_close (domain->conv);
-+# endif
-+#endif
-+}
-+
- /* Load the message catalogs specified by FILENAME. If it is no valid
- message catalog do nothing. */
- void
--_nl_load_domain (domain_file)
-- struct loaded_l10nfile *domain_file;
-+internal_function
-+_nl_load_domain (struct loaded_l10nfile *domain_file,
-+ struct binding *domainbinding)
- {
- int fd;
-+ size_t size;
-+#ifdef _LIBC
-+ struct stat64 st;
-+#else
- struct stat st;
-+#endif
- struct mo_file_header *data = (struct mo_file_header *) -1;
--#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
-- || defined _LIBC
- int use_mmap = 0;
--#endif
- struct loaded_domain *domain;
-+ int revision;
-+ const char *nullentry;
-
- domain_file->decided = 1;
- domain_file->data = NULL;
-
-+ /* Note that it would be useless to store domainbinding in domain_file
-+ because domainbinding might be == NULL now but != NULL later (after
-+ a call to bind_textdomain_codeset). */
-+
- /* If the record does not represent a valid locale the FILENAME
- might be NULL. This can happen when according to the given
- specification the locale file name is different for XPG and CEN
-@@ -84,27 +937,32 @@
- return;
-
- /* Try to open the addressed file. */
-- fd = open (domain_file->filename, O_RDONLY);
-+ fd = open (domain_file->filename, O_RDONLY | O_BINARY);
- if (fd == -1)
- return;
-
- /* We must know about the size of the file. */
-- if (fstat (fd, &st) != 0
-- && st.st_size < (off_t) sizeof (struct mo_file_header))
-+ if (
-+#ifdef _LIBC
-+ __builtin_expect (fstat64 (fd, &st) != 0, 0)
-+#else
-+ __builtin_expect (fstat (fd, &st) != 0, 0)
-+#endif
-+ || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
-+ || __builtin_expect (size < sizeof (struct mo_file_header), 0))
- {
- /* Something went wrong. */
- close (fd);
- return;
- }
-
--#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
-- || defined _LIBC
-+#ifdef HAVE_MMAP
- /* Now we are ready to load the file. If mmap() is available we try
- this first. If not available or it failed we try to load it. */
-- data = (struct mo_file_header *) mmap (NULL, st.st_size, PROT_READ,
-+ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
- MAP_PRIVATE, fd, 0);
-
-- if (data != (struct mo_file_header *) -1)
-+ if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
- {
- /* mmap() call was successful. */
- close (fd);
-@@ -116,24 +974,27 @@
- it manually. */
- if (data == (struct mo_file_header *) -1)
- {
-- off_t to_read;
-+ size_t to_read;
- char *read_ptr;
-
-- data = (struct mo_file_header *) malloc (st.st_size);
-+ data = (struct mo_file_header *) malloc (size);
- if (data == NULL)
- return;
-
-- to_read = st.st_size;
-+ to_read = size;
- read_ptr = (char *) data;
- do
- {
- long int nb = (long int) read (fd, read_ptr, to_read);
-- if (nb == -1)
-+ if (nb <= 0)
- {
-+#ifdef EINTR
-+ if (nb == -1 && errno == EINTR)
-+ continue;
-+#endif
- close (fd);
- return;
- }
--
- read_ptr += nb;
- to_read -= nb;
- }
-@@ -144,47 +1005,378 @@
-
- /* Using the magic number we can test whether it really is a message
- catalog file. */
-- if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
-+ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
-+ 0))
- {
- /* The magic number is wrong: not a message catalog file. */
--#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
-- || defined _LIBC
-+#ifdef HAVE_MMAP
- if (use_mmap)
-- munmap ((caddr_t) data, st.st_size);
-+ munmap ((caddr_t) data, size);
- else
- #endif
- free (data);
- return;
- }
-
-- domain_file->data
-- = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
-- if (domain_file->data == NULL)
-+ domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
-+ if (domain == NULL)
- return;
-+ domain_file->data = domain;
-
-- domain = (struct loaded_domain *) domain_file->data;
- domain->data = (char *) data;
-+ domain->use_mmap = use_mmap;
-+ domain->mmap_size = size;
- domain->must_swap = data->magic != _MAGIC;
-+ domain->malloced = NULL;
-
- /* Fill in the information about the available tables. */
-- switch (W (domain->must_swap, data->revision))
-+ revision = W (domain->must_swap, data->revision);
-+ /* We support only the major revisions 0 and 1. */
-+ switch (revision >> 16)
- {
- case 0:
-+ case 1:
- domain->nstrings = W (domain->must_swap, data->nstrings);
-- domain->orig_tab = (struct string_desc *)
-+ domain->orig_tab = (const struct string_desc *)
- ((char *) data + W (domain->must_swap, data->orig_tab_offset));
-- domain->trans_tab = (struct string_desc *)
-+ domain->trans_tab = (const struct string_desc *)
- ((char *) data + W (domain->must_swap, data->trans_tab_offset));
- domain->hash_size = W (domain->must_swap, data->hash_tab_size);
-- domain->hash_tab = (nls_uint32 *)
-- ((char *) data + W (domain->must_swap, data->hash_tab_offset));
-+ domain->hash_tab =
-+ (domain->hash_size > 2
-+ ? (const nls_uint32 *)
-+ ((char *) data + W (domain->must_swap, data->hash_tab_offset))
-+ : NULL);
-+ domain->must_swap_hash_tab = domain->must_swap;
-+
-+ /* Now dispatch on the minor revision. */
-+ switch (revision & 0xffff)
-+ {
-+ case 0:
-+ domain->n_sysdep_strings = 0;
-+ domain->orig_sysdep_tab = NULL;
-+ domain->trans_sysdep_tab = NULL;
-+ break;
-+ case 1:
-+ default:
-+ {
-+ nls_uint32 n_sysdep_strings;
-+
-+ if (domain->hash_tab == NULL)
-+ /* This is invalid. These minor revisions need a hash table. */
-+ goto invalid;
-+
-+ n_sysdep_strings =
-+ W (domain->must_swap, data->n_sysdep_strings);
-+ if (n_sysdep_strings > 0)
-+ {
-+ nls_uint32 n_sysdep_segments;
-+ const struct sysdep_segment *sysdep_segments;
-+ const char **sysdep_segment_values;
-+ const nls_uint32 *orig_sysdep_tab;
-+ const nls_uint32 *trans_sysdep_tab;
-+ nls_uint32 n_inmem_sysdep_strings;
-+ size_t memneed;
-+ char *mem;
-+ struct sysdep_string_desc *inmem_orig_sysdep_tab;
-+ struct sysdep_string_desc *inmem_trans_sysdep_tab;
-+ nls_uint32 *inmem_hash_tab;
-+ unsigned int i, j;
-+
-+ /* Get the values of the system dependent segments. */
-+ n_sysdep_segments =
-+ W (domain->must_swap, data->n_sysdep_segments);
-+ sysdep_segments = (const struct sysdep_segment *)
-+ ((char *) data
-+ + W (domain->must_swap, data->sysdep_segments_offset));
-+ sysdep_segment_values =
-+ alloca (n_sysdep_segments * sizeof (const char *));
-+ for (i = 0; i < n_sysdep_segments; i++)
-+ {
-+ const char *name =
-+ (char *) data
-+ + W (domain->must_swap, sysdep_segments[i].offset);
-+ nls_uint32 namelen =
-+ W (domain->must_swap, sysdep_segments[i].length);
-+
-+ if (!(namelen > 0 && name[namelen - 1] == '\0'))
-+ {
-+ freea (sysdep_segment_values);
-+ goto invalid;
-+ }
-+
-+ sysdep_segment_values[i] = get_sysdep_segment_value (name);
-+ }
-+
-+ orig_sysdep_tab = (const nls_uint32 *)
-+ ((char *) data
-+ + W (domain->must_swap, data->orig_sysdep_tab_offset));
-+ trans_sysdep_tab = (const nls_uint32 *)
-+ ((char *) data
-+ + W (domain->must_swap, data->trans_sysdep_tab_offset));
-+
-+ /* Compute the amount of additional memory needed for the
-+ system dependent strings and the augmented hash table.
-+ At the same time, also drop string pairs which refer to
-+ an undefined system dependent segment. */
-+ n_inmem_sysdep_strings = 0;
-+ memneed = domain->hash_size * sizeof (nls_uint32);
-+ for (i = 0; i < n_sysdep_strings; i++)
-+ {
-+ int valid = 1;
-+ size_t needs[2];
-+
-+ for (j = 0; j < 2; j++)
-+ {
-+ const struct sysdep_string *sysdep_string =
-+ (const struct sysdep_string *)
-+ ((char *) data
-+ + W (domain->must_swap,
-+ j == 0
-+ ? orig_sysdep_tab[i]
-+ : trans_sysdep_tab[i]));
-+ size_t need = 0;
-+ const struct segment_pair *p = sysdep_string->segments;
-+
-+ if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
-+ for (p = sysdep_string->segments;; p++)
-+ {
-+ nls_uint32 sysdepref;
-+
-+ need += W (domain->must_swap, p->segsize);
-+
-+ sysdepref = W (domain->must_swap, p->sysdepref);
-+ if (sysdepref == SEGMENTS_END)
-+ break;
-+
-+ if (sysdepref >= n_sysdep_segments)
-+ {
-+ /* Invalid. */
-+ freea (sysdep_segment_values);
-+ goto invalid;
-+ }
-+
-+ if (sysdep_segment_values[sysdepref] == NULL)
-+ {
-+ /* This particular string pair is invalid. */
-+ valid = 0;
-+ break;
-+ }
-+
-+ need += strlen (sysdep_segment_values[sysdepref]);
-+ }
-+
-+ needs[j] = need;
-+ if (!valid)
-+ break;
-+ }
-+
-+ if (valid)
-+ {
-+ n_inmem_sysdep_strings++;
-+ memneed += needs[0] + needs[1];
-+ }
-+ }
-+ memneed += 2 * n_inmem_sysdep_strings
-+ * sizeof (struct sysdep_string_desc);
-+
-+ if (n_inmem_sysdep_strings > 0)
-+ {
-+ unsigned int k;
-+
-+ /* Allocate additional memory. */
-+ mem = (char *) malloc (memneed);
-+ if (mem == NULL)
-+ goto invalid;
-+
-+ domain->malloced = mem;
-+ inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
-+ mem += n_inmem_sysdep_strings
-+ * sizeof (struct sysdep_string_desc);
-+ inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
-+ mem += n_inmem_sysdep_strings
-+ * sizeof (struct sysdep_string_desc);
-+ inmem_hash_tab = (nls_uint32 *) mem;
-+ mem += domain->hash_size * sizeof (nls_uint32);
-+
-+ /* Compute the system dependent strings. */
-+ k = 0;
-+ for (i = 0; i < n_sysdep_strings; i++)
-+ {
-+ int valid = 1;
-+
-+ for (j = 0; j < 2; j++)
-+ {
-+ const struct sysdep_string *sysdep_string =
-+ (const struct sysdep_string *)
-+ ((char *) data
-+ + W (domain->must_swap,
-+ j == 0
-+ ? orig_sysdep_tab[i]
-+ : trans_sysdep_tab[i]));
-+ const struct segment_pair *p =
-+ sysdep_string->segments;
-+
-+ if (W (domain->must_swap, p->sysdepref)
-+ != SEGMENTS_END)
-+ for (p = sysdep_string->segments;; p++)
-+ {
-+ nls_uint32 sysdepref;
-+
-+ sysdepref =
-+ W (domain->must_swap, p->sysdepref);
-+ if (sysdepref == SEGMENTS_END)
-+ break;
-+
-+ if (sysdep_segment_values[sysdepref] == NULL)
-+ {
-+ /* This particular string pair is
-+ invalid. */
-+ valid = 0;
-+ break;
-+ }
-+ }
-+
-+ if (!valid)
-+ break;
-+ }
-+
-+ if (valid)
-+ {
-+ for (j = 0; j < 2; j++)
-+ {
-+ const struct sysdep_string *sysdep_string =
-+ (const struct sysdep_string *)
-+ ((char *) data
-+ + W (domain->must_swap,
-+ j == 0
-+ ? orig_sysdep_tab[i]
-+ : trans_sysdep_tab[i]));
-+ const char *static_segments =
-+ (char *) data
-+ + W (domain->must_swap, sysdep_string->offset);
-+ const struct segment_pair *p =
-+ sysdep_string->segments;
-+
-+ /* Concatenate the segments, and fill
-+ inmem_orig_sysdep_tab[k] (for j == 0) and
-+ inmem_trans_sysdep_tab[k] (for j == 1). */
-+
-+ struct sysdep_string_desc *inmem_tab_entry =
-+ (j == 0
-+ ? inmem_orig_sysdep_tab
-+ : inmem_trans_sysdep_tab)
-+ + k;
-+
-+ if (W (domain->must_swap, p->sysdepref)
-+ == SEGMENTS_END)
-+ {
-+ /* Only one static segment. */
-+ inmem_tab_entry->length =
-+ W (domain->must_swap, p->segsize);
-+ inmem_tab_entry->pointer = static_segments;
-+ }
-+ else
-+ {
-+ inmem_tab_entry->pointer = mem;
-+
-+ for (p = sysdep_string->segments;; p++)
-+ {
-+ nls_uint32 segsize =
-+ W (domain->must_swap, p->segsize);
-+ nls_uint32 sysdepref =
-+ W (domain->must_swap, p->sysdepref);
-+ size_t n;
-+
-+ if (segsize > 0)
-+ {
-+ memcpy (mem, static_segments, segsize);
-+ mem += segsize;
-+ static_segments += segsize;
-+ }
-+
-+ if (sysdepref == SEGMENTS_END)
-+ break;
-+
-+ n = strlen (sysdep_segment_values[sysdepref]);
-+ memcpy (mem, sysdep_segment_values[sysdepref], n);
-+ mem += n;
-+ }
-+
-+ inmem_tab_entry->length =
-+ mem - inmem_tab_entry->pointer;
-+ }
-+ }
-+
-+ k++;
-+ }
-+ }
-+ if (k != n_inmem_sysdep_strings)
-+ abort ();
-+
-+ /* Compute the augmented hash table. */
-+ for (i = 0; i < domain->hash_size; i++)
-+ inmem_hash_tab[i] =
-+ W (domain->must_swap_hash_tab, domain->hash_tab[i]);
-+ for (i = 0; i < n_inmem_sysdep_strings; i++)
-+ {
-+ const char *msgid = inmem_orig_sysdep_tab[i].pointer;
-+ nls_uint32 hash_val = hash_string (msgid);
-+ nls_uint32 idx = hash_val % domain->hash_size;
-+ nls_uint32 incr =
-+ 1 + (hash_val % (domain->hash_size - 2));
-+
-+ for (;;)
-+ {
-+ if (inmem_hash_tab[idx] == 0)
-+ {
-+ /* Hash table entry is empty. Use it. */
-+ inmem_hash_tab[idx] = 1 + domain->nstrings + i;
-+ break;
-+ }
-+
-+ if (idx >= domain->hash_size - incr)
-+ idx -= domain->hash_size - incr;
-+ else
-+ idx += incr;
-+ }
-+ }
-+
-+ domain->n_sysdep_strings = n_inmem_sysdep_strings;
-+ domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
-+ domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
-+
-+ domain->hash_tab = inmem_hash_tab;
-+ domain->must_swap_hash_tab = 0;
-+ }
-+ else
-+ {
-+ domain->n_sysdep_strings = 0;
-+ domain->orig_sysdep_tab = NULL;
-+ domain->trans_sysdep_tab = NULL;
-+ }
-+
-+ freea (sysdep_segment_values);
-+ }
-+ else
-+ {
-+ domain->n_sysdep_strings = 0;
-+ domain->orig_sysdep_tab = NULL;
-+ domain->trans_sysdep_tab = NULL;
-+ }
-+ }
-+ break;
-+ }
- break;
- default:
-- /* This is an illegal revision. */
--#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
-- || defined _LIBC
-+ /* This is an invalid revision. */
-+ invalid:
-+ /* This is an invalid .mo file. */
-+ if (domain->malloced)
-+ free (domain->malloced);
-+#ifdef HAVE_MMAP
- if (use_mmap)
-- munmap ((caddr_t) data, st.st_size);
-+ munmap ((caddr_t) data, size);
- else
- #endif
- free (data);
-@@ -193,7 +1385,36 @@
- return;
- }
-
-- /* Show that one domain is changed. This might make some cached
-- translations invalid. */
-- ++_nl_msg_cat_cntr;
-+ /* Now initialize the character set converter from the character set
-+ the file is encoded with (found in the header entry) to the domain's
-+ specified character set or the locale's character set. */
-+ nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
-+
-+ /* Also look for a plural specification. */
-+ EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
- }
-+
-+
-+#ifdef _LIBC
-+void
-+internal_function
-+_nl_unload_domain (struct loaded_domain *domain)
-+{
-+ if (domain->plural != &__gettext_germanic_plural)
-+ __gettext_free_exp (domain->plural);
-+
-+ _nl_free_domain_conv (domain);
-+
-+ if (domain->malloced)
-+ free (domain->malloced);
-+
-+# ifdef _POSIX_MAPPED_FILES
-+ if (domain->use_mmap)
-+ munmap ((caddr_t) domain->data, domain->mmap_size);
-+ else
-+# endif /* _POSIX_MAPPED_FILES */
-+ free ((void *) domain->data);
-+
-+ free (domain);
-+}
-+#endif
---- lrzsz-0.12.20.safe/intl/localcharset.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/localcharset.c 2004-09-12 14:40:34.478729392 -0400
-@@ -0,0 +1,398 @@
-+/* Determine a canonical name for the current locale's character encoding.
-+
-+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* Written by Bruno Haible <bruno@clisp.org>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+/* Specification. */
-+#include "localcharset.h"
-+
-+#if HAVE_STDDEF_H
-+# include <stddef.h>
-+#endif
-+
-+#include <stdio.h>
-+#if HAVE_STRING_H
-+# include <string.h>
-+#else
-+# include <strings.h>
-+#endif
-+#if HAVE_STDLIB_H
-+# include <stdlib.h>
-+#endif
-+
-+#if defined _WIN32 || defined __WIN32__
-+# undef WIN32 /* avoid warning on mingw32 */
-+# define WIN32
-+#endif
-+
-+#if defined __EMX__
-+/* Assume EMX program runs on OS/2, even if compiled under DOS. */
-+# define OS2
-+#endif
-+
-+#if !defined WIN32
-+# if HAVE_LANGINFO_CODESET
-+# include <langinfo.h>
-+# else
-+# if HAVE_SETLOCALE
-+# include <locale.h>
-+# endif
-+# endif
-+#elif defined WIN32
-+# define WIN32_LEAN_AND_MEAN
-+# include <windows.h>
-+#endif
-+#if defined OS2
-+# define INCL_DOS
-+# include <os2.h>
-+#endif
-+
-+#if ENABLE_RELOCATABLE
-+# include "relocatable.h"
-+#else
-+# define relocate(pathname) (pathname)
-+#endif
-+
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
-+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-+#endif
-+
-+#ifndef DIRECTORY_SEPARATOR
-+# define DIRECTORY_SEPARATOR '/'
-+#endif
-+
-+#ifndef ISSLASH
-+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
-+#endif
-+
-+#if HAVE_DECL_GETC_UNLOCKED
-+# undef getc
-+# define getc getc_unlocked
-+#endif
-+
-+/* The following static variable is declared 'volatile' to avoid a
-+ possible multithread problem in the function get_charset_aliases. If we
-+ are running in a threaded environment, and if two threads initialize
-+ 'charset_aliases' simultaneously, both will produce the same value,
-+ and everything will be ok if the two assignments to 'charset_aliases'
-+ are atomic. But I don't know what will happen if the two assignments mix. */
-+#if __STDC__ != 1
-+# define volatile /* empty */
-+#endif
-+/* Pointer to the contents of the charset.alias file, if it has already been
-+ read, else NULL. Its format is:
-+ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
-+static const char * volatile charset_aliases;
-+
-+/* Return a pointer to the contents of the charset.alias file. */
-+static const char *
-+get_charset_aliases ()
-+{
-+ const char *cp;
-+
-+ cp = charset_aliases;
-+ if (cp == NULL)
-+ {
-+#if !(defined VMS || defined WIN32)
-+ FILE *fp;
-+ const char *dir = relocate (LIBDIR);
-+ const char *base = "charset.alias";
-+ char *file_name;
-+
-+ /* Concatenate dir and base into freshly allocated file_name. */
-+ {
-+ size_t dir_len = strlen (dir);
-+ size_t base_len = strlen (base);
-+ int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
-+ file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
-+ if (file_name != NULL)
-+ {
-+ memcpy (file_name, dir, dir_len);
-+ if (add_slash)
-+ file_name[dir_len] = DIRECTORY_SEPARATOR;
-+ memcpy (file_name + dir_len + add_slash, base, base_len + 1);
-+ }
-+ }
-+
-+ if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
-+ /* Out of memory or file not found, treat it as empty. */
-+ cp = "";
-+ else
-+ {
-+ /* Parse the file's contents. */
-+ int c;
-+ char buf1[50+1];
-+ char buf2[50+1];
-+ char *res_ptr = NULL;
-+ size_t res_size = 0;
-+ size_t l1, l2;
-+
-+ for (;;)
-+ {
-+ c = getc (fp);
-+ if (c == EOF)
-+ break;
-+ if (c == '\n' || c == ' ' || c == '\t')
-+ continue;
-+ if (c == '#')
-+ {
-+ /* Skip comment, to end of line. */
-+ do
-+ c = getc (fp);
-+ while (!(c == EOF || c == '\n'));
-+ if (c == EOF)
-+ break;
-+ continue;
-+ }
-+ ungetc (c, fp);
-+ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
-+ break;
-+ l1 = strlen (buf1);
-+ l2 = strlen (buf2);
-+ if (res_size == 0)
-+ {
-+ res_size = l1 + 1 + l2 + 1;
-+ res_ptr = (char *) malloc (res_size + 1);
-+ }
-+ else
-+ {
-+ res_size += l1 + 1 + l2 + 1;
-+ res_ptr = (char *) realloc (res_ptr, res_size + 1);
-+ }
-+ if (res_ptr == NULL)
-+ {
-+ /* Out of memory. */
-+ res_size = 0;
-+ break;
-+ }
-+ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
-+ strcpy (res_ptr + res_size - (l2 + 1), buf2);
-+ }
-+ fclose (fp);
-+ if (res_size == 0)
-+ cp = "";
-+ else
-+ {
-+ *(res_ptr + res_size) = '\0';
-+ cp = res_ptr;
-+ }
-+ }
-+
-+ if (file_name != NULL)
-+ free (file_name);
-+
-+#else
-+
-+# if defined VMS
-+ /* To avoid the troubles of an extra file charset.alias_vms in the
-+ sources of many GNU packages, simply inline the aliases here. */
-+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
-+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
-+ section 10.7 "Handling Different Character Sets". */
-+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
-+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
-+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
-+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
-+ "ISO8859-8" "\0" "ISO-8859-8" "\0"
-+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
-+ /* Japanese */
-+ "eucJP" "\0" "EUC-JP" "\0"
-+ "SJIS" "\0" "SHIFT_JIS" "\0"
-+ "DECKANJI" "\0" "DEC-KANJI" "\0"
-+ "SDECKANJI" "\0" "EUC-JP" "\0"
-+ /* Chinese */
-+ "eucTW" "\0" "EUC-TW" "\0"
-+ "DECHANYU" "\0" "DEC-HANYU" "\0"
-+ "DECHANZI" "\0" "GB2312" "\0"
-+ /* Korean */
-+ "DECKOREAN" "\0" "EUC-KR" "\0";
-+# endif
-+
-+# if defined WIN32
-+ /* To avoid the troubles of installing a separate file in the same
-+ directory as the DLL and of retrieving the DLL's directory at
-+ runtime, simply inline the aliases here. */
-+
-+ cp = "CP936" "\0" "GBK" "\0"
-+ "CP1361" "\0" "JOHAB" "\0"
-+ "CP20127" "\0" "ASCII" "\0"
-+ "CP20866" "\0" "KOI8-R" "\0"
-+ "CP21866" "\0" "KOI8-RU" "\0"
-+ "CP28591" "\0" "ISO-8859-1" "\0"
-+ "CP28592" "\0" "ISO-8859-2" "\0"
-+ "CP28593" "\0" "ISO-8859-3" "\0"
-+ "CP28594" "\0" "ISO-8859-4" "\0"
-+ "CP28595" "\0" "ISO-8859-5" "\0"
-+ "CP28596" "\0" "ISO-8859-6" "\0"
-+ "CP28597" "\0" "ISO-8859-7" "\0"
-+ "CP28598" "\0" "ISO-8859-8" "\0"
-+ "CP28599" "\0" "ISO-8859-9" "\0"
-+ "CP28605" "\0" "ISO-8859-15" "\0";
-+# endif
-+#endif
-+
-+ charset_aliases = cp;
-+ }
-+
-+ return cp;
-+}
-+
-+/* Determine the current locale's character encoding, and canonicalize it
-+ into one of the canonical names listed in config.charset.
-+ The result must not be freed; it is statically allocated.
-+ If the canonical name cannot be determined, the result is a non-canonical
-+ name. */
-+
-+#ifdef STATIC
-+STATIC
-+#endif
-+const char *
-+locale_charset ()
-+{
-+ const char *codeset;
-+ const char *aliases;
-+
-+#if !(defined WIN32 || defined OS2)
-+
-+# if HAVE_LANGINFO_CODESET
-+
-+ /* Most systems support nl_langinfo (CODESET) nowadays. */
-+ codeset = nl_langinfo (CODESET);
-+
-+# else
-+
-+ /* On old systems which lack it, use setlocale or getenv. */
-+ const char *locale = NULL;
-+
-+ /* But most old systems don't have a complete set of locales. Some
-+ (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
-+ use setlocale here; it would return "C" when it doesn't support the
-+ locale name the user has set. */
-+# if HAVE_SETLOCALE && 0
-+ locale = setlocale (LC_CTYPE, NULL);
-+# endif
-+ if (locale == NULL || locale[0] == '\0')
-+ {
-+ locale = getenv ("LC_ALL");
-+ if (locale == NULL || locale[0] == '\0')
-+ {
-+ locale = getenv ("LC_CTYPE");
-+ if (locale == NULL || locale[0] == '\0')
-+ locale = getenv ("LANG");
-+ }
-+ }
-+
-+ /* On some old systems, one used to set locale = "iso8859_1". On others,
-+ you set it to "language_COUNTRY.charset". In any case, we resolve it
-+ through the charset.alias file. */
-+ codeset = locale;
-+
-+# endif
-+
-+#elif defined WIN32
-+
-+ static char buf[2 + 10 + 1];
-+
-+ /* Woe32 has a function returning the locale's codepage as a number. */
-+ sprintf (buf, "CP%u", GetACP ());
-+ codeset = buf;
-+
-+#elif defined OS2
-+
-+ const char *locale;
-+ static char buf[2 + 10 + 1];
-+ ULONG cp[3];
-+ ULONG cplen;
-+
-+ /* Allow user to override the codeset, as set in the operating system,
-+ with standard language environment variables. */
-+ locale = getenv ("LC_ALL");
-+ if (locale == NULL || locale[0] == '\0')
-+ {
-+ locale = getenv ("LC_CTYPE");
-+ if (locale == NULL || locale[0] == '\0')
-+ locale = getenv ("LANG");
-+ }
-+ if (locale != NULL && locale[0] != '\0')
-+ {
-+ /* If the locale name contains an encoding after the dot, return it. */
-+ const char *dot = strchr (locale, '.');
-+
-+ if (dot != NULL)
-+ {
-+ const char *modifier;
-+
-+ dot++;
-+ /* Look for the possible @... trailer and remove it, if any. */
-+ modifier = strchr (dot, '@');
-+ if (modifier == NULL)
-+ return dot;
-+ if (modifier - dot < sizeof (buf))
-+ {
-+ memcpy (buf, dot, modifier - dot);
-+ buf [modifier - dot] = '\0';
-+ return buf;
-+ }
-+ }
-+
-+ /* Resolve through the charset.alias file. */
-+ codeset = locale;
-+ }
-+ else
-+ {
-+ /* OS/2 has a function returning the locale's codepage as a number. */
-+ if (DosQueryCp (sizeof (cp), cp, &cplen))
-+ codeset = "";
-+ else
-+ {
-+ sprintf (buf, "CP%u", cp[0]);
-+ codeset = buf;
-+ }
-+ }
-+
-+#endif
-+
-+ if (codeset == NULL)
-+ /* The canonical name cannot be determined. */
-+ codeset = "";
-+
-+ /* Resolve alias. */
-+ for (aliases = get_charset_aliases ();
-+ *aliases != '\0';
-+ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
-+ if (strcmp (codeset, aliases) == 0
-+ || (aliases[0] == '*' && aliases[1] == '\0'))
-+ {
-+ codeset = aliases + strlen (aliases) + 1;
-+ break;
-+ }
-+
-+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
-+ the empty string as denoting "the locale's character encoding",
-+ thus GNU libiconv would call this function a second time. */
-+ if (codeset[0] == '\0')
-+ codeset = "ASCII";
-+
-+ return codeset;
-+}
---- lrzsz-0.12.20.safe/intl/localcharset.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/localcharset.h 2004-09-12 14:40:34.483728632 -0400
-@@ -0,0 +1,42 @@
-+/* Determine a canonical name for the current locale's character encoding.
-+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
-+ This file is part of the GNU CHARSET Library.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _LOCALCHARSET_H
-+#define _LOCALCHARSET_H
-+
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+
-+/* Determine the current locale's character encoding, and canonicalize it
-+ into one of the canonical names listed in config.charset.
-+ The result must not be freed; it is statically allocated.
-+ If the canonical name cannot be determined, the result is a non-canonical
-+ name. */
-+extern const char * locale_charset (void);
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+
-+#endif /* _LOCALCHARSET_H */
---- lrzsz-0.12.20.safe/intl/locale.alias 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/locale.alias 2004-09-12 14:40:34.499726200 -0400
-@@ -0,0 +1,78 @@
-+# Locale name alias data base.
-+# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU Library General Public License as published
-+# by the Free Software Foundation; either version 2, or (at your option)
-+# any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# Library General Public License for more details.
-+#
-+# You should have received a copy of the GNU Library General Public
-+# License along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+# USA.
-+
-+# The format of this file is the same as for the corresponding file of
-+# the X Window System, which normally can be found in
-+# /usr/lib/X11/locale/locale.alias
-+# A single line contains two fields: an alias and a substitution value.
-+# All entries are case independent.
-+
-+# Note: This file is far from being complete. If you have a value for
-+# your own site which you think might be useful for others too, share
-+# it with the rest of us. Send it using the `glibcbug' script to
-+# bugs@gnu.org.
-+
-+# Packages using this file:
-+
-+bokmal nb_NO.ISO-8859-1
-+bokmål nb_NO.ISO-8859-1
-+catalan ca_ES.ISO-8859-1
-+croatian hr_HR.ISO-8859-2
-+czech cs_CZ.ISO-8859-2
-+danish da_DK.ISO-8859-1
-+dansk da_DK.ISO-8859-1
-+deutsch de_DE.ISO-8859-1
-+dutch nl_NL.ISO-8859-1
-+eesti et_EE.ISO-8859-1
-+estonian et_EE.ISO-8859-1
-+finnish fi_FI.ISO-8859-1
-+français fr_FR.ISO-8859-1
-+french fr_FR.ISO-8859-1
-+galego gl_ES.ISO-8859-1
-+galician gl_ES.ISO-8859-1
-+german de_DE.ISO-8859-1
-+greek el_GR.ISO-8859-7
-+hebrew he_IL.ISO-8859-8
-+hrvatski hr_HR.ISO-8859-2
-+hungarian hu_HU.ISO-8859-2
-+icelandic is_IS.ISO-8859-1
-+italian it_IT.ISO-8859-1
-+japanese ja_JP.eucJP
-+japanese.euc ja_JP.eucJP
-+ja_JP ja_JP.eucJP
-+ja_JP.ujis ja_JP.eucJP
-+japanese.sjis ja_JP.SJIS
-+korean ko_KR.eucKR
-+korean.euc ko_KR.eucKR
-+ko_KR ko_KR.eucKR
-+lithuanian lt_LT.ISO-8859-13
-+no_NO nb_NO.ISO-8859-1
-+no_NO.ISO-8859-1 nb_NO.ISO-8859-1
-+norwegian nb_NO.ISO-8859-1
-+nynorsk nn_NO.ISO-8859-1
-+polish pl_PL.ISO-8859-2
-+portuguese pt_PT.ISO-8859-1
-+romanian ro_RO.ISO-8859-2
-+russian ru_RU.ISO-8859-5
-+slovak sk_SK.ISO-8859-2
-+slovene sl_SI.ISO-8859-2
-+slovenian sl_SI.ISO-8859-2
-+spanish es_ES.ISO-8859-1
-+swedish sv_SE.ISO-8859-1
-+thai th_TH.TIS-620
-+turkish tr_TR.ISO-8859-9
---- lrzsz-0.12.20.safe/intl/localealias.c 1998-04-26 09:22:37.000000000 -0400
-+++ lrzsz-0.12.20/intl/localealias.c 2004-09-12 14:40:34.505725288 -0400
-@@ -1,20 +1,27 @@
--/* Handle aliases for locale names
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-+/* Handle aliases for locale names.
-+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
-+ This must come before <config.h> because <config.h> may include
-+ <features.h>, and once <features.h> has been included, it's too late. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
-@@ -22,56 +29,45 @@
-
- #include <ctype.h>
- #include <stdio.h>
-+#if defined _LIBC || defined HAVE___FSETLOCKING
-+# include <stdio_ext.h>
-+#endif
- #include <sys/types.h>
-
- #ifdef __GNUC__
-+# undef alloca
- # define alloca __builtin_alloca
- # define HAVE_ALLOCA 1
- #else
--# if defined HAVE_ALLOCA_H || defined _LIBC
--# include <alloca.h>
-+# ifdef _MSC_VER
-+# include <malloc.h>
-+# define alloca _alloca
- # else
--# ifdef _AIX
-- #pragma alloca
-+# if defined HAVE_ALLOCA_H || defined _LIBC
-+# include <alloca.h>
- # else
--# ifndef alloca
-+# ifdef _AIX
-+ #pragma alloca
-+# else
-+# ifndef alloca
- char *alloca ();
-+# endif
- # endif
- # endif
- # endif
- #endif
-
--#if defined STDC_HEADERS || defined _LIBC
--# include <stdlib.h>
--#else
--char *getenv ();
--# ifdef HAVE_MALLOC_H
--# include <malloc.h>
--# else
--void free ();
--# endif
--#endif
-+#include <stdlib.h>
-+#include <string.h>
-
--#if defined HAVE_STRING_H || defined _LIBC
--# ifndef _GNU_SOURCE
--# define _GNU_SOURCE 1
--# endif
--# include <string.h>
-+#include "gettextP.h"
-+
-+#if ENABLE_RELOCATABLE
-+# include "relocatable.h"
- #else
--# include <strings.h>
--# ifndef memcpy
--# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
--# endif
--#endif
--#if !HAVE_STRCHR && !defined _LIBC
--# ifndef strchr
--# define strchr index
--# endif
-+# define relocate(pathname) (pathname)
- #endif
-
--#include "gettext.h"
--#include "gettextP.h"
--
- /* @@ end of prolog @@ */
-
- #ifdef _LIBC
-@@ -79,43 +75,49 @@
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
- # define strcasecmp __strcasecmp
-+
-+# ifndef mempcpy
-+# define mempcpy __mempcpy
-+# endif
-+# define HAVE_MEMPCPY 1
-+# define HAVE___FSETLOCKING 1
-+
-+/* We need locking here since we can be called from different places. */
-+# include <bits/libc-lock.h>
-+
-+__libc_lock_define_initialized (static, lock);
-+#endif
-+
-+#ifndef internal_function
-+# define internal_function
- #endif
-
-+/* Some optimizations for glibc. */
-+#ifdef _LIBC
-+# define FEOF(fp) feof_unlocked (fp)
-+# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
-+#else
-+# define FEOF(fp) feof (fp)
-+# define FGETS(buf, n, fp) fgets (buf, n, fp)
-+#endif
-
--/* For those loosing systems which don't have `alloca' we have to add
-+/* For those losing systems which don't have `alloca' we have to add
- some additional code emulating it. */
- #ifdef HAVE_ALLOCA
--/* Nothing has to be done. */
--# define ADD_BLOCK(list, address) /* nothing */
--# define FREE_BLOCKS(list) /* nothing */
-+# define freea(p) /* nothing */
- #else
--struct block_list
--{
-- void *address;
-- struct block_list *next;
--};
--# define ADD_BLOCK(list, addr) \
-- do { \
-- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
-- /* If we cannot get a free block we cannot add the new element to \
-- the list. */ \
-- if (newp != NULL) { \
-- newp->address = (addr); \
-- newp->next = (list); \
-- (list) = newp; \
-- } \
-- } while (0)
--# define FREE_BLOCKS(list) \
-- do { \
-- while (list != NULL) { \
-- struct block_list *old = list; \
-- list = list->next; \
-- free (old); \
-- } \
-- } while (0)
--# undef alloca
--# define alloca(size) (malloc (size))
--#endif /* have alloca */
-+# define alloca(n) malloc (n)
-+# define freea(p) free (p)
-+#endif
-+
-+#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
-+# undef fgets
-+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
-+#endif
-+#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
-+# undef feof
-+# define feof(s) feof_unlocked (s)
-+#endif
-
-
- struct alias_map
-@@ -125,26 +127,41 @@
- };
-
-
--static struct alias_map *map;
--static size_t nmap = 0;
--static size_t maxmap = 0;
-+#ifndef _LIBC
-+# define libc_freeres_ptr(decl) decl
-+#endif
-+
-+libc_freeres_ptr (static char *string_space);
-+static size_t string_space_act;
-+static size_t string_space_max;
-+libc_freeres_ptr (static struct alias_map *map);
-+static size_t nmap;
-+static size_t maxmap;
-
-
- /* Prototypes for local functions. */
--static size_t read_alias_file PARAMS ((const char *fname, int fname_len));
--static void extend_alias_table PARAMS ((void));
--static int alias_compare PARAMS ((const struct alias_map *map1,
-- const struct alias_map *map2));
-+static size_t read_alias_file (const char *fname, int fname_len)
-+ internal_function;
-+static int extend_alias_table (void);
-+static int alias_compare (const struct alias_map *map1,
-+ const struct alias_map *map2);
-
-
- const char *
--_nl_expand_alias (name)
-- const char *name;
-+_nl_expand_alias (const char *name)
- {
-- static const char *locale_alias_path = LOCALE_ALIAS_PATH;
-+ static const char *locale_alias_path;
- struct alias_map *retval;
-+ const char *result = NULL;
- size_t added;
-
-+#ifdef _LIBC
-+ __libc_lock_lock (lock);
-+#endif
-+
-+ if (locale_alias_path == NULL)
-+ locale_alias_path = LOCALE_ALIAS_PATH;
-+
- do
- {
- struct alias_map item;
-@@ -154,15 +171,18 @@
- if (nmap > 0)
- retval = (struct alias_map *) bsearch (&item, map, nmap,
- sizeof (struct alias_map),
-- (int (*) PARAMS ((const void *,
-- const void *))
-+ (int (*) (const void *,
-+ const void *)
- ) alias_compare);
- else
- retval = NULL;
-
- /* We really found an alias. Return the value. */
- if (retval != NULL)
-- return retval->value;
-+ {
-+ result = retval->value;
-+ break;
-+ }
-
- /* Perhaps we can find another alias file. */
- added = 0;
-@@ -170,11 +190,12 @@
- {
- const char *start;
-
-- while (locale_alias_path[0] == ':')
-+ while (locale_alias_path[0] == PATH_SEPARATOR)
- ++locale_alias_path;
- start = locale_alias_path;
-
-- while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
-+ while (locale_alias_path[0] != '\0'
-+ && locale_alias_path[0] != PATH_SEPARATOR)
- ++locale_alias_path;
-
- if (start < locale_alias_path)
-@@ -183,78 +204,87 @@
- }
- while (added != 0);
-
-- return NULL;
-+#ifdef _LIBC
-+ __libc_lock_unlock (lock);
-+#endif
-+
-+ return result;
- }
-
-
- static size_t
--read_alias_file (fname, fname_len)
-- const char *fname;
-- int fname_len;
-+internal_function
-+read_alias_file (const char *fname, int fname_len)
- {
--#ifndef HAVE_ALLOCA
-- struct block_list *block_list = NULL;
--#endif
- FILE *fp;
- char *full_fname;
- size_t added;
- static const char aliasfile[] = "/locale.alias";
-
- full_fname = (char *) alloca (fname_len + sizeof aliasfile);
-- ADD_BLOCK (block_list, full_fname);
-+#ifdef HAVE_MEMPCPY
-+ mempcpy (mempcpy (full_fname, fname, fname_len),
-+ aliasfile, sizeof aliasfile);
-+#else
- memcpy (full_fname, fname, fname_len);
- memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
-+#endif
-
-- fp = fopen (full_fname, "r");
-+ fp = fopen (relocate (full_fname), "r");
-+ freea (full_fname);
- if (fp == NULL)
-- {
-- FREE_BLOCKS (block_list);
-- return 0;
-- }
-+ return 0;
-+
-+#ifdef HAVE___FSETLOCKING
-+ /* No threads present. */
-+ __fsetlocking (fp, FSETLOCKING_BYCALLER);
-+#endif
-
- added = 0;
-- while (!feof (fp))
-+ while (!FEOF (fp))
- {
- /* It is a reasonable approach to use a fix buffer here because
- a) we are only interested in the first two fields
- b) these fields must be usable as file names and so must not
- be that long
-- */
-- char buf[BUFSIZ];
-+ We avoid a multi-kilobyte buffer here since this would use up
-+ stack space which we might not have if the program ran out of
-+ memory. */
-+ char buf[400];
- char *alias;
- char *value;
- char *cp;
-
-- if (fgets (buf, BUFSIZ, fp) == NULL)
-+ if (FGETS (buf, sizeof buf, fp) == NULL)
- /* EOF reached. */
- break;
-
- cp = buf;
- /* Ignore leading white space. */
-- while (isspace (cp[0]))
-+ while (isspace ((unsigned char) cp[0]))
- ++cp;
-
- /* A leading '#' signals a comment line. */
- if (cp[0] != '\0' && cp[0] != '#')
- {
- alias = cp++;
-- while (cp[0] != '\0' && !isspace (cp[0]))
-+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
- ++cp;
- /* Terminate alias name. */
- if (cp[0] != '\0')
- *cp++ = '\0';
-
- /* Now look for the beginning of the value. */
-- while (isspace (cp[0]))
-+ while (isspace ((unsigned char) cp[0]))
- ++cp;
-
- if (cp[0] != '\0')
- {
-- char *tp;
-- size_t len;
-+ size_t alias_len;
-+ size_t value_len;
-
- value = cp++;
-- while (cp[0] != '\0' && !isspace (cp[0]))
-+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
- ++cp;
- /* Terminate value. */
- if (cp[0] == '\n')
-@@ -269,28 +299,44 @@
- *cp++ = '\0';
-
- if (nmap >= maxmap)
-- extend_alias_table ();
--
-- /* We cannot depend on strdup available in the libc. Sigh! */
-- len = strlen (alias) + 1;
-- tp = (char *) malloc (len);
-- if (tp == NULL)
-- {
-- FREE_BLOCKS (block_list);
-+ if (__builtin_expect (extend_alias_table (), 0))
- return added;
-- }
-- memcpy (tp, alias, len);
-- map[nmap].alias = tp;
-
-- len = strlen (value) + 1;
-- tp = (char *) malloc (len);
-- if (tp == NULL)
-+ alias_len = strlen (alias) + 1;
-+ value_len = strlen (value) + 1;
-+
-+ if (string_space_act + alias_len + value_len > string_space_max)
- {
-- FREE_BLOCKS (block_list);
-- return added;
-+ /* Increase size of memory pool. */
-+ size_t new_size = (string_space_max
-+ + (alias_len + value_len > 1024
-+ ? alias_len + value_len : 1024));
-+ char *new_pool = (char *) realloc (string_space, new_size);
-+ if (new_pool == NULL)
-+ return added;
-+
-+ if (__builtin_expect (string_space != new_pool, 0))
-+ {
-+ size_t i;
-+
-+ for (i = 0; i < nmap; i++)
-+ {
-+ map[i].alias += new_pool - string_space;
-+ map[i].value += new_pool - string_space;
-+ }
-+ }
-+
-+ string_space = new_pool;
-+ string_space_max = new_size;
- }
-- memcpy (tp, value, len);
-- map[nmap].value = tp;
-+
-+ map[nmap].alias = memcpy (&string_space[string_space_act],
-+ alias, alias_len);
-+ string_space_act += alias_len;
-+
-+ map[nmap].value = memcpy (&string_space[string_space_act],
-+ value, value_len);
-+ string_space_act += value_len;
-
- ++nmap;
- ++added;
-@@ -299,14 +345,11 @@
-
- /* Possibly not the whole line fits into the buffer. Ignore
- the rest of the line. */
-- while (strchr (cp, '\n') == NULL)
-- {
-- cp = buf;
-- if (fgets (buf, BUFSIZ, fp) == NULL)
-- /* Make sure the inner loop will be left. The outer loop
-- will exit at the `feof' test. */
-- *cp = '\n';
-- }
-+ while (strchr (buf, '\n') == NULL)
-+ if (FGETS (buf, sizeof buf, fp) == NULL)
-+ /* Make sure the inner loop will be left. The outer loop
-+ will exit at the `feof' test. */
-+ break;
- }
-
- /* Should we test for ferror()? I think we have to silently ignore
-@@ -315,40 +358,33 @@
-
- if (added > 0)
- qsort (map, nmap, sizeof (struct alias_map),
-- (int (*) PARAMS ((const void *, const void *))) alias_compare);
-+ (int (*) (const void *, const void *)) alias_compare);
-
-- FREE_BLOCKS (block_list);
- return added;
- }
-
-
--static void
-+static int
- extend_alias_table ()
- {
- size_t new_size;
- struct alias_map *new_map;
-
- new_size = maxmap == 0 ? 100 : 2 * maxmap;
-- new_map = (struct alias_map *) malloc (new_size
-- * sizeof (struct alias_map));
-+ new_map = (struct alias_map *) realloc (map, (new_size
-+ * sizeof (struct alias_map)));
- if (new_map == NULL)
- /* Simply don't extend: we don't have any more core. */
-- return;
--
-- memcpy (new_map, map, nmap * sizeof (struct alias_map));
--
-- if (maxmap != 0)
-- free (map);
-+ return -1;
-
- map = new_map;
- maxmap = new_size;
-+ return 0;
- }
-
-
- static int
--alias_compare (map1, map2)
-- const struct alias_map *map1;
-- const struct alias_map *map2;
-+alias_compare (const struct alias_map *map1, const struct alias_map *map2)
- {
- #if defined _LIBC || defined HAVE_STRCASECMP
- return strcasecmp (map1->alias, map2->alias);
---- lrzsz-0.12.20.safe/intl/localename.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/localename.c 2004-09-12 14:40:34.510724528 -0400
-@@ -0,0 +1,1142 @@
-+/* Determine the current selected locale.
-+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
-+/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <stdlib.h>
-+#include <locale.h>
-+
-+#if defined _WIN32 || defined __WIN32__
-+# undef WIN32 /* avoid warning on mingw32 */
-+# define WIN32
-+#endif
-+
-+#ifdef WIN32
-+# define WIN32_LEAN_AND_MEAN
-+# include <windows.h>
-+/* List of language codes, sorted by value:
-+ 0x01 LANG_ARABIC
-+ 0x02 LANG_BULGARIAN
-+ 0x03 LANG_CATALAN
-+ 0x04 LANG_CHINESE
-+ 0x05 LANG_CZECH
-+ 0x06 LANG_DANISH
-+ 0x07 LANG_GERMAN
-+ 0x08 LANG_GREEK
-+ 0x09 LANG_ENGLISH
-+ 0x0a LANG_SPANISH
-+ 0x0b LANG_FINNISH
-+ 0x0c LANG_FRENCH
-+ 0x0d LANG_HEBREW
-+ 0x0e LANG_HUNGARIAN
-+ 0x0f LANG_ICELANDIC
-+ 0x10 LANG_ITALIAN
-+ 0x11 LANG_JAPANESE
-+ 0x12 LANG_KOREAN
-+ 0x13 LANG_DUTCH
-+ 0x14 LANG_NORWEGIAN
-+ 0x15 LANG_POLISH
-+ 0x16 LANG_PORTUGUESE
-+ 0x17 LANG_RHAETO_ROMANCE
-+ 0x18 LANG_ROMANIAN
-+ 0x19 LANG_RUSSIAN
-+ 0x1a LANG_CROATIAN == LANG_SERBIAN
-+ 0x1b LANG_SLOVAK
-+ 0x1c LANG_ALBANIAN
-+ 0x1d LANG_SWEDISH
-+ 0x1e LANG_THAI
-+ 0x1f LANG_TURKISH
-+ 0x20 LANG_URDU
-+ 0x21 LANG_INDONESIAN
-+ 0x22 LANG_UKRAINIAN
-+ 0x23 LANG_BELARUSIAN
-+ 0x24 LANG_SLOVENIAN
-+ 0x25 LANG_ESTONIAN
-+ 0x26 LANG_LATVIAN
-+ 0x27 LANG_LITHUANIAN
-+ 0x28 LANG_TAJIK
-+ 0x29 LANG_FARSI
-+ 0x2a LANG_VIETNAMESE
-+ 0x2b LANG_ARMENIAN
-+ 0x2c LANG_AZERI
-+ 0x2d LANG_BASQUE
-+ 0x2e LANG_SORBIAN
-+ 0x2f LANG_MACEDONIAN
-+ 0x30 LANG_SUTU
-+ 0x31 LANG_TSONGA
-+ 0x32 LANG_TSWANA
-+ 0x33 LANG_VENDA
-+ 0x34 LANG_XHOSA
-+ 0x35 LANG_ZULU
-+ 0x36 LANG_AFRIKAANS
-+ 0x37 LANG_GEORGIAN
-+ 0x38 LANG_FAEROESE
-+ 0x39 LANG_HINDI
-+ 0x3a LANG_MALTESE
-+ 0x3b LANG_SAAMI
-+ 0x3c LANG_GAELIC
-+ 0x3d LANG_YIDDISH
-+ 0x3e LANG_MALAY
-+ 0x3f LANG_KAZAK
-+ 0x40 LANG_KYRGYZ
-+ 0x41 LANG_SWAHILI
-+ 0x42 LANG_TURKMEN
-+ 0x43 LANG_UZBEK
-+ 0x44 LANG_TATAR
-+ 0x45 LANG_BENGALI
-+ 0x46 LANG_PUNJABI
-+ 0x47 LANG_GUJARATI
-+ 0x48 LANG_ORIYA
-+ 0x49 LANG_TAMIL
-+ 0x4a LANG_TELUGU
-+ 0x4b LANG_KANNADA
-+ 0x4c LANG_MALAYALAM
-+ 0x4d LANG_ASSAMESE
-+ 0x4e LANG_MARATHI
-+ 0x4f LANG_SANSKRIT
-+ 0x50 LANG_MONGOLIAN
-+ 0x51 LANG_TIBETAN
-+ 0x52 LANG_WELSH
-+ 0x53 LANG_CAMBODIAN
-+ 0x54 LANG_LAO
-+ 0x55 LANG_BURMESE
-+ 0x56 LANG_GALICIAN
-+ 0x57 LANG_KONKANI
-+ 0x58 LANG_MANIPURI
-+ 0x59 LANG_SINDHI
-+ 0x5a LANG_SYRIAC
-+ 0x5b LANG_SINHALESE
-+ 0x5c LANG_CHEROKEE
-+ 0x5d LANG_INUKTITUT
-+ 0x5e LANG_AMHARIC
-+ 0x5f LANG_TAMAZIGHT
-+ 0x60 LANG_KASHMIRI
-+ 0x61 LANG_NEPALI
-+ 0x62 LANG_FRISIAN
-+ 0x63 LANG_PASHTO
-+ 0x64 LANG_TAGALOG
-+ 0x65 LANG_DIVEHI
-+ 0x66 LANG_EDO
-+ 0x67 LANG_FULFULDE
-+ 0x68 LANG_HAUSA
-+ 0x69 LANG_IBIBIO
-+ 0x6a LANG_YORUBA
-+ 0x70 LANG_IGBO
-+ 0x71 LANG_KANURI
-+ 0x72 LANG_OROMO
-+ 0x73 LANG_TIGRINYA
-+ 0x74 LANG_GUARANI
-+ 0x75 LANG_HAWAIIAN
-+ 0x76 LANG_LATIN
-+ 0x77 LANG_SOMALI
-+ 0x78 LANG_YI
-+ 0x79 LANG_PAPIAMENTU
-+*/
-+/* Mingw headers don't have latest language and sublanguage codes. */
-+# ifndef LANG_AFRIKAANS
-+# define LANG_AFRIKAANS 0x36
-+# endif
-+# ifndef LANG_ALBANIAN
-+# define LANG_ALBANIAN 0x1c
-+# endif
-+# ifndef LANG_AMHARIC
-+# define LANG_AMHARIC 0x5e
-+# endif
-+# ifndef LANG_ARABIC
-+# define LANG_ARABIC 0x01
-+# endif
-+# ifndef LANG_ARMENIAN
-+# define LANG_ARMENIAN 0x2b
-+# endif
-+# ifndef LANG_ASSAMESE
-+# define LANG_ASSAMESE 0x4d
-+# endif
-+# ifndef LANG_AZERI
-+# define LANG_AZERI 0x2c
-+# endif
-+# ifndef LANG_BASQUE
-+# define LANG_BASQUE 0x2d
-+# endif
-+# ifndef LANG_BELARUSIAN
-+# define LANG_BELARUSIAN 0x23
-+# endif
-+# ifndef LANG_BENGALI
-+# define LANG_BENGALI 0x45
-+# endif
-+# ifndef LANG_BURMESE
-+# define LANG_BURMESE 0x55
-+# endif
-+# ifndef LANG_CAMBODIAN
-+# define LANG_CAMBODIAN 0x53
-+# endif
-+# ifndef LANG_CATALAN
-+# define LANG_CATALAN 0x03
-+# endif
-+# ifndef LANG_CHEROKEE
-+# define LANG_CHEROKEE 0x5c
-+# endif
-+# ifndef LANG_DIVEHI
-+# define LANG_DIVEHI 0x65
-+# endif
-+# ifndef LANG_EDO
-+# define LANG_EDO 0x66
-+# endif
-+# ifndef LANG_ESTONIAN
-+# define LANG_ESTONIAN 0x25
-+# endif
-+# ifndef LANG_FAEROESE
-+# define LANG_FAEROESE 0x38
-+# endif
-+# ifndef LANG_FARSI
-+# define LANG_FARSI 0x29
-+# endif
-+# ifndef LANG_FRISIAN
-+# define LANG_FRISIAN 0x62
-+# endif
-+# ifndef LANG_FULFULDE
-+# define LANG_FULFULDE 0x67
-+# endif
-+# ifndef LANG_GAELIC
-+# define LANG_GAELIC 0x3c
-+# endif
-+# ifndef LANG_GALICIAN
-+# define LANG_GALICIAN 0x56
-+# endif
-+# ifndef LANG_GEORGIAN
-+# define LANG_GEORGIAN 0x37
-+# endif
-+# ifndef LANG_GUARANI
-+# define LANG_GUARANI 0x74
-+# endif
-+# ifndef LANG_GUJARATI
-+# define LANG_GUJARATI 0x47
-+# endif
-+# ifndef LANG_HAUSA
-+# define LANG_HAUSA 0x68
-+# endif
-+# ifndef LANG_HAWAIIAN
-+# define LANG_HAWAIIAN 0x75
-+# endif
-+# ifndef LANG_HEBREW
-+# define LANG_HEBREW 0x0d
-+# endif
-+# ifndef LANG_HINDI
-+# define LANG_HINDI 0x39
-+# endif
-+# ifndef LANG_IBIBIO
-+# define LANG_IBIBIO 0x69
-+# endif
-+# ifndef LANG_IGBO
-+# define LANG_IGBO 0x70
-+# endif
-+# ifndef LANG_INDONESIAN
-+# define LANG_INDONESIAN 0x21
-+# endif
-+# ifndef LANG_INUKTITUT
-+# define LANG_INUKTITUT 0x5d
-+# endif
-+# ifndef LANG_KANNADA
-+# define LANG_KANNADA 0x4b
-+# endif
-+# ifndef LANG_KANURI
-+# define LANG_KANURI 0x71
-+# endif
-+# ifndef LANG_KASHMIRI
-+# define LANG_KASHMIRI 0x60
-+# endif
-+# ifndef LANG_KAZAK
-+# define LANG_KAZAK 0x3f
-+# endif
-+# ifndef LANG_KONKANI
-+# define LANG_KONKANI 0x57
-+# endif
-+# ifndef LANG_KYRGYZ
-+# define LANG_KYRGYZ 0x40
-+# endif
-+# ifndef LANG_LAO
-+# define LANG_LAO 0x54
-+# endif
-+# ifndef LANG_LATIN
-+# define LANG_LATIN 0x76
-+# endif
-+# ifndef LANG_LATVIAN
-+# define LANG_LATVIAN 0x26
-+# endif
-+# ifndef LANG_LITHUANIAN
-+# define LANG_LITHUANIAN 0x27
-+# endif
-+# ifndef LANG_MACEDONIAN
-+# define LANG_MACEDONIAN 0x2f
-+# endif
-+# ifndef LANG_MALAY
-+# define LANG_MALAY 0x3e
-+# endif
-+# ifndef LANG_MALAYALAM
-+# define LANG_MALAYALAM 0x4c
-+# endif
-+# ifndef LANG_MALTESE
-+# define LANG_MALTESE 0x3a
-+# endif
-+# ifndef LANG_MANIPURI
-+# define LANG_MANIPURI 0x58
-+# endif
-+# ifndef LANG_MARATHI
-+# define LANG_MARATHI 0x4e
-+# endif
-+# ifndef LANG_MONGOLIAN
-+# define LANG_MONGOLIAN 0x50
-+# endif
-+# ifndef LANG_NEPALI
-+# define LANG_NEPALI 0x61
-+# endif
-+# ifndef LANG_ORIYA
-+# define LANG_ORIYA 0x48
-+# endif
-+# ifndef LANG_OROMO
-+# define LANG_OROMO 0x72
-+# endif
-+# ifndef LANG_PAPIAMENTU
-+# define LANG_PAPIAMENTU 0x79
-+# endif
-+# ifndef LANG_PASHTO
-+# define LANG_PASHTO 0x63
-+# endif
-+# ifndef LANG_PUNJABI
-+# define LANG_PUNJABI 0x46
-+# endif
-+# ifndef LANG_RHAETO_ROMANCE
-+# define LANG_RHAETO_ROMANCE 0x17
-+# endif
-+# ifndef LANG_SAAMI
-+# define LANG_SAAMI 0x3b
-+# endif
-+# ifndef LANG_SANSKRIT
-+# define LANG_SANSKRIT 0x4f
-+# endif
-+# ifndef LANG_SERBIAN
-+# define LANG_SERBIAN 0x1a
-+# endif
-+# ifndef LANG_SINDHI
-+# define LANG_SINDHI 0x59
-+# endif
-+# ifndef LANG_SINHALESE
-+# define LANG_SINHALESE 0x5b
-+# endif
-+# ifndef LANG_SLOVAK
-+# define LANG_SLOVAK 0x1b
-+# endif
-+# ifndef LANG_SOMALI
-+# define LANG_SOMALI 0x77
-+# endif
-+# ifndef LANG_SORBIAN
-+# define LANG_SORBIAN 0x2e
-+# endif
-+# ifndef LANG_SUTU
-+# define LANG_SUTU 0x30
-+# endif
-+# ifndef LANG_SWAHILI
-+# define LANG_SWAHILI 0x41
-+# endif
-+# ifndef LANG_SYRIAC
-+# define LANG_SYRIAC 0x5a
-+# endif
-+# ifndef LANG_TAGALOG
-+# define LANG_TAGALOG 0x64
-+# endif
-+# ifndef LANG_TAJIK
-+# define LANG_TAJIK 0x28
-+# endif
-+# ifndef LANG_TAMAZIGHT
-+# define LANG_TAMAZIGHT 0x5f
-+# endif
-+# ifndef LANG_TAMIL
-+# define LANG_TAMIL 0x49
-+# endif
-+# ifndef LANG_TATAR
-+# define LANG_TATAR 0x44
-+# endif
-+# ifndef LANG_TELUGU
-+# define LANG_TELUGU 0x4a
-+# endif
-+# ifndef LANG_THAI
-+# define LANG_THAI 0x1e
-+# endif
-+# ifndef LANG_TIBETAN
-+# define LANG_TIBETAN 0x51
-+# endif
-+# ifndef LANG_TIGRINYA
-+# define LANG_TIGRINYA 0x73
-+# endif
-+# ifndef LANG_TSONGA
-+# define LANG_TSONGA 0x31
-+# endif
-+# ifndef LANG_TSWANA
-+# define LANG_TSWANA 0x32
-+# endif
-+# ifndef LANG_TURKMEN
-+# define LANG_TURKMEN 0x42
-+# endif
-+# ifndef LANG_UKRAINIAN
-+# define LANG_UKRAINIAN 0x22
-+# endif
-+# ifndef LANG_URDU
-+# define LANG_URDU 0x20
-+# endif
-+# ifndef LANG_UZBEK
-+# define LANG_UZBEK 0x43
-+# endif
-+# ifndef LANG_VENDA
-+# define LANG_VENDA 0x33
-+# endif
-+# ifndef LANG_VIETNAMESE
-+# define LANG_VIETNAMESE 0x2a
-+# endif
-+# ifndef LANG_WELSH
-+# define LANG_WELSH 0x52
-+# endif
-+# ifndef LANG_XHOSA
-+# define LANG_XHOSA 0x34
-+# endif
-+# ifndef LANG_YI
-+# define LANG_YI 0x78
-+# endif
-+# ifndef LANG_YIDDISH
-+# define LANG_YIDDISH 0x3d
-+# endif
-+# ifndef LANG_YORUBA
-+# define LANG_YORUBA 0x6a
-+# endif
-+# ifndef LANG_ZULU
-+# define LANG_ZULU 0x35
-+# endif
-+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
-+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
-+# endif
-+# ifndef SUBLANG_ARABIC_IRAQ
-+# define SUBLANG_ARABIC_IRAQ 0x02
-+# endif
-+# ifndef SUBLANG_ARABIC_EGYPT
-+# define SUBLANG_ARABIC_EGYPT 0x03
-+# endif
-+# ifndef SUBLANG_ARABIC_LIBYA
-+# define SUBLANG_ARABIC_LIBYA 0x04
-+# endif
-+# ifndef SUBLANG_ARABIC_ALGERIA
-+# define SUBLANG_ARABIC_ALGERIA 0x05
-+# endif
-+# ifndef SUBLANG_ARABIC_MOROCCO
-+# define SUBLANG_ARABIC_MOROCCO 0x06
-+# endif
-+# ifndef SUBLANG_ARABIC_TUNISIA
-+# define SUBLANG_ARABIC_TUNISIA 0x07
-+# endif
-+# ifndef SUBLANG_ARABIC_OMAN
-+# define SUBLANG_ARABIC_OMAN 0x08
-+# endif
-+# ifndef SUBLANG_ARABIC_YEMEN
-+# define SUBLANG_ARABIC_YEMEN 0x09
-+# endif
-+# ifndef SUBLANG_ARABIC_SYRIA
-+# define SUBLANG_ARABIC_SYRIA 0x0a
-+# endif
-+# ifndef SUBLANG_ARABIC_JORDAN
-+# define SUBLANG_ARABIC_JORDAN 0x0b
-+# endif
-+# ifndef SUBLANG_ARABIC_LEBANON
-+# define SUBLANG_ARABIC_LEBANON 0x0c
-+# endif
-+# ifndef SUBLANG_ARABIC_KUWAIT
-+# define SUBLANG_ARABIC_KUWAIT 0x0d
-+# endif
-+# ifndef SUBLANG_ARABIC_UAE
-+# define SUBLANG_ARABIC_UAE 0x0e
-+# endif
-+# ifndef SUBLANG_ARABIC_BAHRAIN
-+# define SUBLANG_ARABIC_BAHRAIN 0x0f
-+# endif
-+# ifndef SUBLANG_ARABIC_QATAR
-+# define SUBLANG_ARABIC_QATAR 0x10
-+# endif
-+# ifndef SUBLANG_AZERI_LATIN
-+# define SUBLANG_AZERI_LATIN 0x01
-+# endif
-+# ifndef SUBLANG_AZERI_CYRILLIC
-+# define SUBLANG_AZERI_CYRILLIC 0x02
-+# endif
-+# ifndef SUBLANG_BENGALI_INDIA
-+# define SUBLANG_BENGALI_INDIA 0x00
-+# endif
-+# ifndef SUBLANG_BENGALI_BANGLADESH
-+# define SUBLANG_BENGALI_BANGLADESH 0x01
-+# endif
-+# ifndef SUBLANG_CHINESE_MACAU
-+# define SUBLANG_CHINESE_MACAU 0x05
-+# endif
-+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
-+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
-+# endif
-+# ifndef SUBLANG_ENGLISH_JAMAICA
-+# define SUBLANG_ENGLISH_JAMAICA 0x08
-+# endif
-+# ifndef SUBLANG_ENGLISH_CARIBBEAN
-+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
-+# endif
-+# ifndef SUBLANG_ENGLISH_BELIZE
-+# define SUBLANG_ENGLISH_BELIZE 0x0a
-+# endif
-+# ifndef SUBLANG_ENGLISH_TRINIDAD
-+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
-+# endif
-+# ifndef SUBLANG_ENGLISH_ZIMBABWE
-+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
-+# endif
-+# ifndef SUBLANG_ENGLISH_PHILIPPINES
-+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
-+# endif
-+# ifndef SUBLANG_ENGLISH_INDONESIA
-+# define SUBLANG_ENGLISH_INDONESIA 0x0e
-+# endif
-+# ifndef SUBLANG_ENGLISH_HONGKONG
-+# define SUBLANG_ENGLISH_HONGKONG 0x0f
-+# endif
-+# ifndef SUBLANG_ENGLISH_INDIA
-+# define SUBLANG_ENGLISH_INDIA 0x10
-+# endif
-+# ifndef SUBLANG_ENGLISH_MALAYSIA
-+# define SUBLANG_ENGLISH_MALAYSIA 0x11
-+# endif
-+# ifndef SUBLANG_ENGLISH_SINGAPORE
-+# define SUBLANG_ENGLISH_SINGAPORE 0x12
-+# endif
-+# ifndef SUBLANG_FRENCH_LUXEMBOURG
-+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
-+# endif
-+# ifndef SUBLANG_FRENCH_MONACO
-+# define SUBLANG_FRENCH_MONACO 0x06
-+# endif
-+# ifndef SUBLANG_FRENCH_WESTINDIES
-+# define SUBLANG_FRENCH_WESTINDIES 0x07
-+# endif
-+# ifndef SUBLANG_FRENCH_REUNION
-+# define SUBLANG_FRENCH_REUNION 0x08
-+# endif
-+# ifndef SUBLANG_FRENCH_CONGO
-+# define SUBLANG_FRENCH_CONGO 0x09
-+# endif
-+# ifndef SUBLANG_FRENCH_SENEGAL
-+# define SUBLANG_FRENCH_SENEGAL 0x0a
-+# endif
-+# ifndef SUBLANG_FRENCH_CAMEROON
-+# define SUBLANG_FRENCH_CAMEROON 0x0b
-+# endif
-+# ifndef SUBLANG_FRENCH_COTEDIVOIRE
-+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
-+# endif
-+# ifndef SUBLANG_FRENCH_MALI
-+# define SUBLANG_FRENCH_MALI 0x0d
-+# endif
-+# ifndef SUBLANG_FRENCH_MOROCCO
-+# define SUBLANG_FRENCH_MOROCCO 0x0e
-+# endif
-+# ifndef SUBLANG_FRENCH_HAITI
-+# define SUBLANG_FRENCH_HAITI 0x0f
-+# endif
-+# ifndef SUBLANG_GERMAN_LUXEMBOURG
-+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
-+# endif
-+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
-+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
-+# endif
-+# ifndef SUBLANG_KASHMIRI_INDIA
-+# define SUBLANG_KASHMIRI_INDIA 0x02
-+# endif
-+# ifndef SUBLANG_MALAY_MALAYSIA
-+# define SUBLANG_MALAY_MALAYSIA 0x01
-+# endif
-+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
-+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
-+# endif
-+# ifndef SUBLANG_NEPALI_INDIA
-+# define SUBLANG_NEPALI_INDIA 0x02
-+# endif
-+# ifndef SUBLANG_PUNJABI_INDIA
-+# define SUBLANG_PUNJABI_INDIA 0x00
-+# endif
-+# ifndef SUBLANG_PUNJABI_PAKISTAN
-+# define SUBLANG_PUNJABI_PAKISTAN 0x01
-+# endif
-+# ifndef SUBLANG_ROMANIAN_ROMANIA
-+# define SUBLANG_ROMANIAN_ROMANIA 0x00
-+# endif
-+# ifndef SUBLANG_ROMANIAN_MOLDOVA
-+# define SUBLANG_ROMANIAN_MOLDOVA 0x01
-+# endif
-+# ifndef SUBLANG_SERBIAN_LATIN
-+# define SUBLANG_SERBIAN_LATIN 0x02
-+# endif
-+# ifndef SUBLANG_SERBIAN_CYRILLIC
-+# define SUBLANG_SERBIAN_CYRILLIC 0x03
-+# endif
-+# ifndef SUBLANG_SINDHI_INDIA
-+# define SUBLANG_SINDHI_INDIA 0x00
-+# endif
-+# ifndef SUBLANG_SINDHI_PAKISTAN
-+# define SUBLANG_SINDHI_PAKISTAN 0x01
-+# endif
-+# ifndef SUBLANG_SPANISH_GUATEMALA
-+# define SUBLANG_SPANISH_GUATEMALA 0x04
-+# endif
-+# ifndef SUBLANG_SPANISH_COSTA_RICA
-+# define SUBLANG_SPANISH_COSTA_RICA 0x05
-+# endif
-+# ifndef SUBLANG_SPANISH_PANAMA
-+# define SUBLANG_SPANISH_PANAMA 0x06
-+# endif
-+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
-+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
-+# endif
-+# ifndef SUBLANG_SPANISH_VENEZUELA
-+# define SUBLANG_SPANISH_VENEZUELA 0x08
-+# endif
-+# ifndef SUBLANG_SPANISH_COLOMBIA
-+# define SUBLANG_SPANISH_COLOMBIA 0x09
-+# endif
-+# ifndef SUBLANG_SPANISH_PERU
-+# define SUBLANG_SPANISH_PERU 0x0a
-+# endif
-+# ifndef SUBLANG_SPANISH_ARGENTINA
-+# define SUBLANG_SPANISH_ARGENTINA 0x0b
-+# endif
-+# ifndef SUBLANG_SPANISH_ECUADOR
-+# define SUBLANG_SPANISH_ECUADOR 0x0c
-+# endif
-+# ifndef SUBLANG_SPANISH_CHILE
-+# define SUBLANG_SPANISH_CHILE 0x0d
-+# endif
-+# ifndef SUBLANG_SPANISH_URUGUAY
-+# define SUBLANG_SPANISH_URUGUAY 0x0e
-+# endif
-+# ifndef SUBLANG_SPANISH_PARAGUAY
-+# define SUBLANG_SPANISH_PARAGUAY 0x0f
-+# endif
-+# ifndef SUBLANG_SPANISH_BOLIVIA
-+# define SUBLANG_SPANISH_BOLIVIA 0x10
-+# endif
-+# ifndef SUBLANG_SPANISH_EL_SALVADOR
-+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
-+# endif
-+# ifndef SUBLANG_SPANISH_HONDURAS
-+# define SUBLANG_SPANISH_HONDURAS 0x12
-+# endif
-+# ifndef SUBLANG_SPANISH_NICARAGUA
-+# define SUBLANG_SPANISH_NICARAGUA 0x13
-+# endif
-+# ifndef SUBLANG_SPANISH_PUERTO_RICO
-+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
-+# endif
-+# ifndef SUBLANG_SWEDISH_FINLAND
-+# define SUBLANG_SWEDISH_FINLAND 0x02
-+# endif
-+# ifndef SUBLANG_TAMAZIGHT_ARABIC
-+# define SUBLANG_TAMAZIGHT_ARABIC 0x01
-+# endif
-+# ifndef SUBLANG_TAMAZIGHT_LATIN
-+# define SUBLANG_TAMAZIGHT_LATIN 0x02
-+# endif
-+# ifndef SUBLANG_TIGRINYA_ETHIOPIA
-+# define SUBLANG_TIGRINYA_ETHIOPIA 0x00
-+# endif
-+# ifndef SUBLANG_TIGRINYA_ERITREA
-+# define SUBLANG_TIGRINYA_ERITREA 0x01
-+# endif
-+# ifndef SUBLANG_URDU_PAKISTAN
-+# define SUBLANG_URDU_PAKISTAN 0x01
-+# endif
-+# ifndef SUBLANG_URDU_INDIA
-+# define SUBLANG_URDU_INDIA 0x02
-+# endif
-+# ifndef SUBLANG_UZBEK_LATIN
-+# define SUBLANG_UZBEK_LATIN 0x01
-+# endif
-+# ifndef SUBLANG_UZBEK_CYRILLIC
-+# define SUBLANG_UZBEK_CYRILLIC 0x02
-+# endif
-+#endif
-+
-+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
-+ "Directs 'setlocale()' to query 'category' and return the current
-+ setting of 'local'."
-+ However it does not specify the exact format. Neither do SUSV2 and
-+ ISO C 99. So we can use this feature only on selected systems (e.g.
-+ those using GNU C Library). */
-+#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
-+# define HAVE_LOCALE_NULL
-+#endif
-+
-+/* Determine the current locale's name, and canonicalize it into XPG syntax
-+ language[_territory[.codeset]][@modifier]
-+ The codeset part in the result is not reliable; the locale_charset()
-+ should be used for codeset information instead.
-+ The result must not be freed; it is statically allocated. */
-+
-+const char *
-+_nl_locale_name (int category, const char *categoryname)
-+{
-+ const char *retval;
-+
-+#ifndef WIN32
-+
-+ /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
-+ On some systems this can be done by the 'setlocale' function itself. */
-+# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
-+ retval = setlocale (category, NULL);
-+# else
-+ /* Setting of LC_ALL overwrites all other. */
-+ retval = getenv ("LC_ALL");
-+ if (retval == NULL || retval[0] == '\0')
-+ {
-+ /* Next comes the name of the desired category. */
-+ retval = getenv (categoryname);
-+ if (retval == NULL || retval[0] == '\0')
-+ {
-+ /* Last possibility is the LANG environment variable. */
-+ retval = getenv ("LANG");
-+ if (retval == NULL || retval[0] == '\0')
-+ /* We use C as the default domain. POSIX says this is
-+ implementation defined. */
-+ retval = "C";
-+ }
-+ }
-+# endif
-+
-+ return retval;
-+
-+#else /* WIN32 */
-+
-+ /* Return an XPG style locale name language[_territory][@modifier].
-+ Don't even bother determining the codeset; it's not useful in this
-+ context, because message catalogs are not specific to a single
-+ codeset. */
-+
-+ LCID lcid;
-+ LANGID langid;
-+ int primary, sub;
-+
-+ /* Let the user override the system settings through environment
-+ variables, as on POSIX systems. */
-+ retval = getenv ("LC_ALL");
-+ if (retval != NULL && retval[0] != '\0')
-+ return retval;
-+ retval = getenv (categoryname);
-+ if (retval != NULL && retval[0] != '\0')
-+ return retval;
-+ retval = getenv ("LANG");
-+ if (retval != NULL && retval[0] != '\0')
-+ return retval;
-+
-+ /* Use native Win32 API locale ID. */
-+ lcid = GetThreadLocale ();
-+
-+ /* Strip off the sorting rules, keep only the language part. */
-+ langid = LANGIDFROMLCID (lcid);
-+
-+ /* Split into language and territory part. */
-+ primary = PRIMARYLANGID (langid);
-+ sub = SUBLANGID (langid);
-+
-+ /* Dispatch on language.
-+ See also http://www.unicode.org/unicode/onlinedat/languages.html .
-+ For details about languages, see http://www.ethnologue.com/ . */
-+ switch (primary)
-+ {
-+ case LANG_AFRIKAANS: return "af_ZA";
-+ case LANG_ALBANIAN: return "sq_AL";
-+ case LANG_AMHARIC: return "am_ET";
-+ case LANG_ARABIC:
-+ switch (sub)
-+ {
-+ case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
-+ case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
-+ case SUBLANG_ARABIC_EGYPT: return "ar_EG";
-+ case SUBLANG_ARABIC_LIBYA: return "ar_LY";
-+ case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
-+ case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
-+ case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
-+ case SUBLANG_ARABIC_OMAN: return "ar_OM";
-+ case SUBLANG_ARABIC_YEMEN: return "ar_YE";
-+ case SUBLANG_ARABIC_SYRIA: return "ar_SY";
-+ case SUBLANG_ARABIC_JORDAN: return "ar_JO";
-+ case SUBLANG_ARABIC_LEBANON: return "ar_LB";
-+ case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
-+ case SUBLANG_ARABIC_UAE: return "ar_AE";
-+ case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
-+ case SUBLANG_ARABIC_QATAR: return "ar_QA";
-+ }
-+ return "ar";
-+ case LANG_ARMENIAN: return "hy_AM";
-+ case LANG_ASSAMESE: return "as_IN";
-+ case LANG_AZERI:
-+ switch (sub)
-+ {
-+ /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
-+ case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
-+ case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
-+ }
-+ return "az";
-+ case LANG_BASQUE:
-+ return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
-+ case LANG_BELARUSIAN: return "be_BY";
-+ case LANG_BENGALI:
-+ switch (sub)
-+ {
-+ case SUBLANG_BENGALI_INDIA: return "bn_IN";
-+ case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
-+ }
-+ return "bn";
-+ case LANG_BULGARIAN: return "bg_BG";
-+ case LANG_BURMESE: return "my_MM";
-+ case LANG_CAMBODIAN: return "km_KH";
-+ case LANG_CATALAN: return "ca_ES";
-+ case LANG_CHEROKEE: return "chr_US";
-+ case LANG_CHINESE:
-+ switch (sub)
-+ {
-+ case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
-+ case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
-+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
-+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
-+ case SUBLANG_CHINESE_MACAU: return "zh_MO";
-+ }
-+ return "zh";
-+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
-+ * What used to be called Serbo-Croatian
-+ * should really now be two separate
-+ * languages because of political reasons.
-+ * (Says tml, who knows nothing about Serbian
-+ * or Croatian.)
-+ * (I can feel those flames coming already.)
-+ */
-+ switch (sub)
-+ {
-+ case SUBLANG_DEFAULT: return "hr_HR";
-+ case SUBLANG_SERBIAN_LATIN: return "sr_CS";
-+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
-+ }
-+ return "hr";
-+ case LANG_CZECH: return "cs_CZ";
-+ case LANG_DANISH: return "da_DK";
-+ case LANG_DIVEHI: return "dv_MV";
-+ case LANG_DUTCH:
-+ switch (sub)
-+ {
-+ case SUBLANG_DUTCH: return "nl_NL";
-+ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
-+ }
-+ return "nl";
-+ case LANG_EDO: return "bin_NG";
-+ case LANG_ENGLISH:
-+ switch (sub)
-+ {
-+ /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
-+ * English was the language spoken in England.
-+ * Oh well.
-+ */
-+ case SUBLANG_ENGLISH_US: return "en_US";
-+ case SUBLANG_ENGLISH_UK: return "en_GB";
-+ case SUBLANG_ENGLISH_AUS: return "en_AU";
-+ case SUBLANG_ENGLISH_CAN: return "en_CA";
-+ case SUBLANG_ENGLISH_NZ: return "en_NZ";
-+ case SUBLANG_ENGLISH_EIRE: return "en_IE";
-+ case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
-+ case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
-+ case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
-+ case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
-+ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
-+ case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
-+ case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
-+ case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
-+ case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
-+ case SUBLANG_ENGLISH_INDIA: return "en_IN";
-+ case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
-+ case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
-+ }
-+ return "en";
-+ case LANG_ESTONIAN: return "et_EE";
-+ case LANG_FAEROESE: return "fo_FO";
-+ case LANG_FARSI: return "fa_IR";
-+ case LANG_FINNISH: return "fi_FI";
-+ case LANG_FRENCH:
-+ switch (sub)
-+ {
-+ case SUBLANG_FRENCH: return "fr_FR";
-+ case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
-+ case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
-+ case SUBLANG_FRENCH_SWISS: return "fr_CH";
-+ case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
-+ case SUBLANG_FRENCH_MONACO: return "fr_MC";
-+ case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
-+ case SUBLANG_FRENCH_REUNION: return "fr_RE";
-+ case SUBLANG_FRENCH_CONGO: return "fr_CG";
-+ case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
-+ case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
-+ case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
-+ case SUBLANG_FRENCH_MALI: return "fr_ML";
-+ case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
-+ case SUBLANG_FRENCH_HAITI: return "fr_HT";
-+ }
-+ return "fr";
-+ case LANG_FRISIAN: return "fy_NL";
-+ case LANG_FULFULDE:
-+ /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
-+ return "ff_NG";
-+ case LANG_GAELIC:
-+ switch (sub)
-+ {
-+ case 0x01: /* SCOTTISH */ return "gd_GB";
-+ case 0x02: /* IRISH */ return "ga_IE";
-+ }
-+ return "C";
-+ case LANG_GALICIAN: return "gl_ES";
-+ case LANG_GEORGIAN: return "ka_GE";
-+ case LANG_GERMAN:
-+ switch (sub)
-+ {
-+ case SUBLANG_GERMAN: return "de_DE";
-+ case SUBLANG_GERMAN_SWISS: return "de_CH";
-+ case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
-+ case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
-+ case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
-+ }
-+ return "de";
-+ case LANG_GREEK: return "el_GR";
-+ case LANG_GUARANI: return "gn_PY";
-+ case LANG_GUJARATI: return "gu_IN";
-+ case LANG_HAUSA: return "ha_NG";
-+ case LANG_HAWAIIAN:
-+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
-+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */
-+ return "cpe_US";
-+ case LANG_HEBREW: return "he_IL";
-+ case LANG_HINDI: return "hi_IN";
-+ case LANG_HUNGARIAN: return "hu_HU";
-+ case LANG_IBIBIO: return "nic_NG";
-+ case LANG_ICELANDIC: return "is_IS";
-+ case LANG_IGBO: return "ig_NG";
-+ case LANG_INDONESIAN: return "id_ID";
-+ case LANG_INUKTITUT: return "iu_CA";
-+ case LANG_ITALIAN:
-+ switch (sub)
-+ {
-+ case SUBLANG_ITALIAN: return "it_IT";
-+ case SUBLANG_ITALIAN_SWISS: return "it_CH";
-+ }
-+ return "it";
-+ case LANG_JAPANESE: return "ja_JP";
-+ case LANG_KANNADA: return "kn_IN";
-+ case LANG_KANURI: return "kr_NG";
-+ case LANG_KASHMIRI:
-+ switch (sub)
-+ {
-+ case SUBLANG_DEFAULT: return "ks_PK";
-+ case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
-+ }
-+ return "ks";
-+ case LANG_KAZAK: return "kk_KZ";
-+ case LANG_KONKANI:
-+ /* FIXME: Adjust this when such locales appear on Unix. */
-+ return "kok_IN";
-+ case LANG_KOREAN: return "ko_KR";
-+ case LANG_KYRGYZ: return "ky_KG";
-+ case LANG_LAO: return "lo_LA";
-+ case LANG_LATIN: return "la_VA";
-+ case LANG_LATVIAN: return "lv_LV";
-+ case LANG_LITHUANIAN: return "lt_LT";
-+ case LANG_MACEDONIAN: return "mk_MK";
-+ case LANG_MALAY:
-+ switch (sub)
-+ {
-+ case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
-+ case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
-+ }
-+ return "ms";
-+ case LANG_MALAYALAM: return "ml_IN";
-+ case LANG_MALTESE: return "mt_MT";
-+ case LANG_MANIPURI:
-+ /* FIXME: Adjust this when such locales appear on Unix. */
-+ return "mni_IN";
-+ case LANG_MARATHI: return "mr_IN";
-+ case LANG_MONGOLIAN:
-+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
-+ case LANG_NEPALI:
-+ switch (sub)
-+ {
-+ case SUBLANG_DEFAULT: return "ne_NP";
-+ case SUBLANG_NEPALI_INDIA: return "ne_IN";
-+ }
-+ return "ne";
-+ case LANG_NORWEGIAN:
-+ switch (sub)
-+ {
-+ case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
-+ case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
-+ }
-+ return "no";
-+ case LANG_ORIYA: return "or_IN";
-+ case LANG_OROMO: return "om_ET";
-+ case LANG_PAPIAMENTU: return "pap_AN";
-+ case LANG_PASHTO:
-+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
-+ case LANG_POLISH: return "pl_PL";
-+ case LANG_PORTUGUESE:
-+ switch (sub)
-+ {
-+ case SUBLANG_PORTUGUESE: return "pt_PT";
-+ /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
-+ Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
-+ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
-+ }
-+ return "pt";
-+ case LANG_PUNJABI:
-+ switch (sub)
-+ {
-+ case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
-+ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
-+ }
-+ return "pa";
-+ case LANG_RHAETO_ROMANCE: return "rm_CH";
-+ case LANG_ROMANIAN:
-+ switch (sub)
-+ {
-+ case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
-+ case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
-+ }
-+ return "ro";
-+ case LANG_RUSSIAN:
-+ return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
-+ case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
-+ case LANG_SANSKRIT: return "sa_IN";
-+ case LANG_SINDHI:
-+ switch (sub)
-+ {
-+ case SUBLANG_SINDHI_INDIA: return "sd_IN";
-+ case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
-+ }
-+ return "sd";
-+ case LANG_SINHALESE: return "si_LK";
-+ case LANG_SLOVAK: return "sk_SK";
-+ case LANG_SLOVENIAN: return "sl_SI";
-+ case LANG_SOMALI: return "so_SO";
-+ case LANG_SORBIAN:
-+ /* FIXME: Adjust this when such locales appear on Unix. */
-+ return "wen_DE";
-+ case LANG_SPANISH:
-+ switch (sub)
-+ {
-+ case SUBLANG_SPANISH: return "es_ES";
-+ case SUBLANG_SPANISH_MEXICAN: return "es_MX";
-+ case SUBLANG_SPANISH_MODERN:
-+ return "es_ES@modern"; /* not seen on Unix */
-+ case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
-+ case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
-+ case SUBLANG_SPANISH_PANAMA: return "es_PA";
-+ case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
-+ case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
-+ case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
-+ case SUBLANG_SPANISH_PERU: return "es_PE";
-+ case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
-+ case SUBLANG_SPANISH_ECUADOR: return "es_EC";
-+ case SUBLANG_SPANISH_CHILE: return "es_CL";
-+ case SUBLANG_SPANISH_URUGUAY: return "es_UY";
-+ case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
-+ case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
-+ case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
-+ case SUBLANG_SPANISH_HONDURAS: return "es_HN";
-+ case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
-+ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
-+ }
-+ return "es";
-+ case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
-+ case LANG_SWAHILI: return "sw_KE";
-+ case LANG_SWEDISH:
-+ switch (sub)
-+ {
-+ case SUBLANG_DEFAULT: return "sv_SE";
-+ case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
-+ }
-+ return "sv";
-+ case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
-+ case LANG_TAGALOG: return "tl_PH";
-+ case LANG_TAJIK: return "tg_TJ";
-+ case LANG_TAMAZIGHT:
-+ switch (sub)
-+ {
-+ /* FIXME: Adjust this when Tamazight locales appear on Unix. */
-+ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
-+ case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin";
-+ }
-+ return "ber_MA";
-+ case LANG_TAMIL:
-+ return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
-+ case LANG_TATAR: return "tt_RU";
-+ case LANG_TELUGU: return "te_IN";
-+ case LANG_THAI: return "th_TH";
-+ case LANG_TIBETAN: return "bo_CN";
-+ case LANG_TIGRINYA:
-+ switch (sub)
-+ {
-+ case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
-+ case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
-+ }
-+ return "ti";
-+ case LANG_TSONGA: return "ts_ZA";
-+ case LANG_TSWANA: return "tn_BW";
-+ case LANG_TURKISH: return "tr_TR";
-+ case LANG_TURKMEN: return "tk_TM";
-+ case LANG_UKRAINIAN: return "uk_UA";
-+ case LANG_URDU:
-+ switch (sub)
-+ {
-+ case SUBLANG_URDU_PAKISTAN: return "ur_PK";
-+ case SUBLANG_URDU_INDIA: return "ur_IN";
-+ }
-+ return "ur";
-+ case LANG_UZBEK:
-+ switch (sub)
-+ {
-+ case SUBLANG_UZBEK_LATIN: return "uz_UZ";
-+ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
-+ }
-+ return "uz";
-+ case LANG_VENDA: return "ve_ZA";
-+ case LANG_VIETNAMESE: return "vi_VN";
-+ case LANG_WELSH: return "cy_GB";
-+ case LANG_XHOSA: return "xh_ZA";
-+ case LANG_YI: return "sit_CN";
-+ case LANG_YIDDISH: return "yi_IL";
-+ case LANG_YORUBA: return "yo_NG";
-+ case LANG_ZULU: return "zu_ZA";
-+ default: return "C";
-+ }
-+
-+#endif
-+}
---- lrzsz-0.12.20.safe/intl/log.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/log.c 2004-09-12 14:40:34.515723768 -0400
-@@ -0,0 +1,98 @@
-+/* Log file output.
-+ Copyright (C) 2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* Written by Bruno Haible <bruno@clisp.org>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+
-+/* Print an ASCII string with quotes and escape sequences where needed. */
-+static void
-+print_escaped (FILE *stream, const char *str)
-+{
-+ putc ('"', stream);
-+ for (; *str != '\0'; str++)
-+ if (*str == '\n')
-+ {
-+ fputs ("\\n\"", stream);
-+ if (str[1] == '\0')
-+ return;
-+ fputs ("\n\"", stream);
-+ }
-+ else
-+ {
-+ if (*str == '"' || *str == '\\')
-+ putc ('\\', stream);
-+ putc (*str, stream);
-+ }
-+ putc ('"', stream);
-+}
-+
-+/* Add to the log file an entry denoting a failed translation. */
-+void
-+_nl_log_untranslated (const char *logfilename, const char *domainname,
-+ const char *msgid1, const char *msgid2, int plural)
-+{
-+ static char *last_logfilename = NULL;
-+ static FILE *last_logfile = NULL;
-+ FILE *logfile;
-+
-+ /* Can we reuse the last opened logfile? */
-+ if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
-+ {
-+ /* Close the last used logfile. */
-+ if (last_logfilename != NULL)
-+ {
-+ if (last_logfile != NULL)
-+ {
-+ fclose (last_logfile);
-+ last_logfile = NULL;
-+ }
-+ free (last_logfilename);
-+ last_logfilename = NULL;
-+ }
-+ /* Open the logfile. */
-+ last_logfilename = (char *) malloc (strlen (logfilename) + 1);
-+ if (last_logfilename == NULL)
-+ return;
-+ strcpy (last_logfilename, logfilename);
-+ last_logfile = fopen (logfilename, "a");
-+ if (last_logfile == NULL)
-+ return;
-+ }
-+ logfile = last_logfile;
-+
-+ fprintf (logfile, "domain ");
-+ print_escaped (logfile, domainname);
-+ fprintf (logfile, "\nmsgid ");
-+ print_escaped (logfile, msgid1);
-+ if (plural)
-+ {
-+ fprintf (logfile, "\nmsgid_plural ");
-+ print_escaped (logfile, msgid2);
-+ fprintf (logfile, "\nmsgstr[0] \"\"\n");
-+ }
-+ else
-+ fprintf (logfile, "\nmsgstr \"\"\n");
-+ putc ('\n', logfile);
-+}
---- lrzsz-0.12.20.safe/intl/Makefile.in 1998-04-26 09:22:35.000000000 -0400
-+++ lrzsz-0.12.20/intl/Makefile.in 2004-09-12 14:40:34.521722856 -0400
-@@ -1,19 +1,20 @@
--# Makefile for directory with message catalog handling in GNU NLS Utilities.
--# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-+# Makefile for directory with message catalog handling library of GNU gettext
-+# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
- #
--# This program is free software; you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation; either version 2, or (at your option)
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU Library General Public License as published
-+# by the Free Software Foundation; either version 2, or (at your option)
- # any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--# GNU General Public License for more details.
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# Library General Public License for more details.
- #
--# You should have received a copy of the GNU General Public License
--# along with this program; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+# You should have received a copy of the GNU Library General Public
-+# License along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+# USA.
-
- PACKAGE = @PACKAGE@
- VERSION = @VERSION@
-@@ -23,118 +24,341 @@
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
- top_builddir = ..
--VPATH = @srcdir@
-+#VPATH = $(srcdir)
-
- prefix = @prefix@
- exec_prefix = @exec_prefix@
- transform = @program_transform_name@
--libdir = $(exec_prefix)/lib
--includedir = $(prefix)/include
--datadir = $(prefix)/@DATADIRNAME@
-+libdir = @libdir@
-+includedir = @includedir@
-+datadir = @datadir@
- localedir = $(datadir)/locale
--gnulocaledir = $(prefix)/share/locale
--gettextsrcdir = @datadir@/gettext/intl
--aliaspath = $(localedir):.
-+gettextsrcdir = $(datadir)/gettext/intl
-+aliaspath = $(localedir)
- subdir = intl
-
- INSTALL = @INSTALL@
- INSTALL_DATA = @INSTALL_DATA@
- MKINSTALLDIRS = @MKINSTALLDIRS@
-+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
-
--l = @l@
-+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
-
- AR = ar
- CC = @CC@
- LIBTOOL = @LIBTOOL@
- RANLIB = @RANLIB@
-+YACC = @INTLBISON@ -y -d
-+YFLAGS = --name-prefix=__gettext
-
--DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
---DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
-+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
-+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
-+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
-+-Dset_relocation_prefix=libintl_set_relocation_prefix \
-+-Drelocate=libintl_relocate \
-+-DDEPENDS_ON_LIBICONV=1 @DEFS@
- CPPFLAGS = @CPPFLAGS@
- CFLAGS = @CFLAGS@
- LDFLAGS = @LDFLAGS@
-+LIBS = @LIBS@
-
- COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
-
--HEADERS = $(COMHDRS) libgettext.h loadinfo.h
--COMHDRS = gettext.h gettextP.h hash-string.h
--SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
--COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
--finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
--explodename.c
--OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
--finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
--explodename.$lo
--CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
--GETTOBJS = intl-compat.$lo
--DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
--xopen-msg.sed $(HEADERS) $(SOURCES)
-+HEADERS = \
-+ gmo.h \
-+ gettextP.h \
-+ hash-string.h \
-+ loadinfo.h \
-+ plural-exp.h \
-+ eval-plural.h \
-+ localcharset.h \
-+ relocatable.h \
-+ xsize.h \
-+ printf-args.h printf-args.c \
-+ printf-parse.h wprintf-parse.h printf-parse.c \
-+ vasnprintf.h vasnwprintf.h vasnprintf.c \
-+ os2compat.h \
-+ libgnuintl.h.in
-+SOURCES = \
-+ bindtextdom.c \
-+ dcgettext.c \
-+ dgettext.c \
-+ gettext.c \
-+ finddomain.c \
-+ loadmsgcat.c \
-+ localealias.c \
-+ textdomain.c \
-+ l10nflist.c \
-+ explodename.c \
-+ dcigettext.c \
-+ dcngettext.c \
-+ dngettext.c \
-+ ngettext.c \
-+ plural.y \
-+ plural-exp.c \
-+ localcharset.c \
-+ relocatable.c \
-+ localename.c \
-+ log.c \
-+ printf.c \
-+ osdep.c \
-+ os2compat.c \
-+ intl-compat.c
-+OBJECTS = \
-+ bindtextdom.$lo \
-+ dcgettext.$lo \
-+ dgettext.$lo \
-+ gettext.$lo \
-+ finddomain.$lo \
-+ loadmsgcat.$lo \
-+ localealias.$lo \
-+ textdomain.$lo \
-+ l10nflist.$lo \
-+ explodename.$lo \
-+ dcigettext.$lo \
-+ dcngettext.$lo \
-+ dngettext.$lo \
-+ ngettext.$lo \
-+ plural.$lo \
-+ plural-exp.$lo \
-+ localcharset.$lo \
-+ relocatable.$lo \
-+ localename.$lo \
-+ log.$lo \
-+ printf.$lo \
-+ osdep.$lo \
-+ intl-compat.$lo
-+DISTFILES.common = Makefile.in \
-+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
-+DISTFILES.generated = plural.c
- DISTFILES.normal = VERSION
--DISTFILES.gettext = libintl.glibc intlh.inst.in
-+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
-+libgnuintl.h_vms Makefile.vms \
-+libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
-+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
-+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
-+
-+all: all-@USE_INCLUDED_LIBINTL@
-+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
-+all-no: all-no-@BUILD_INCLUDED_LIBINTL@
-+all-no-yes: libgnuintl.$la
-+all-no-no:
-+
-+libintl.a libgnuintl.a: $(OBJECTS)
-+ rm -f $@
-+ $(AR) cru $@ $(OBJECTS)
-+ $(RANLIB) $@
-+
-+libintl.la libgnuintl.la: $(OBJECTS)
-+ $(LIBTOOL) --mode=link \
-+ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
-+ $(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \
-+ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-+ -rpath $(libdir) \
-+ -no-undefined
-+
-+# Libtool's library version information for libintl.
-+# Before making a gettext release, the gettext maintainer must change this
-+# according to the libtool documentation, section "Library interface versions".
-+# Maintainers of other packages that include the intl directory must *not*
-+# change these values.
-+LTV_CURRENT=7
-+LTV_REVISION=0
-+LTV_AGE=4
-
- .SUFFIXES:
--.SUFFIXES: .c .o .lo
-+.SUFFIXES: .c .y .o .lo .sin .sed
-+
- .c.o:
- $(COMPILE) $<
--.c.lo:
-- $(LIBTOOL) --mode=compile $(COMPILE) $<
-
--INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
-+.y.c:
-+ $(YACC) $(YFLAGS) --output $@ $<
-+ rm -f $*.h
-
--all: all-@USE_INCLUDED_LIBINTL@
-+bindtextdom.lo: $(srcdir)/bindtextdom.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
-+dcgettext.lo: $(srcdir)/dcgettext.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
-+dgettext.lo: $(srcdir)/dgettext.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
-+gettext.lo: $(srcdir)/gettext.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
-+finddomain.lo: $(srcdir)/finddomain.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
-+loadmsgcat.lo: $(srcdir)/loadmsgcat.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
-+localealias.lo: $(srcdir)/localealias.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
-+textdomain.lo: $(srcdir)/textdomain.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
-+l10nflist.lo: $(srcdir)/l10nflist.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
-+explodename.lo: $(srcdir)/explodename.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
-+dcigettext.lo: $(srcdir)/dcigettext.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
-+dcngettext.lo: $(srcdir)/dcngettext.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
-+dngettext.lo: $(srcdir)/dngettext.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
-+ngettext.lo: $(srcdir)/ngettext.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
-+plural.lo: $(srcdir)/plural.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
-+plural-exp.lo: $(srcdir)/plural-exp.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
-+localcharset.lo: $(srcdir)/localcharset.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
-+relocatable.lo: $(srcdir)/relocatable.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
-+localename.lo: $(srcdir)/localename.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
-+log.lo: $(srcdir)/log.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
-+printf.lo: $(srcdir)/printf.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
-+osdep.lo: $(srcdir)/osdep.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
-+intl-compat.lo: $(srcdir)/intl-compat.c
-+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
-
--all-yes: libintl.$la intlh.inst
--all-no:
-+ref-add.sed: $(srcdir)/ref-add.sin
-+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
-+ mv t-ref-add.sed ref-add.sed
-+ref-del.sed: $(srcdir)/ref-del.sin
-+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
-+ mv t-ref-del.sed ref-del.sed
-
--libintl.a: $(OBJECTS)
-- rm -f $@
-- $(AR) cru $@ $(OBJECTS)
-- $(RANLIB) $@
-+INCLUDES = -I. -I$(srcdir) -I..
-
--libintl.la: $(OBJECTS)
-- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
-- -version-info 1:0 -rpath $(libdir)
-+libgnuintl.h: $(srcdir)/libgnuintl.h.in
-+ sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
-+ -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
-+ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
-+ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
-+ < $(srcdir)/libgnuintl.h.in > libgnuintl.h
-
--../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
-- cd ../po && $(MAKE) cat-id-tbl.$lo
-+libintl.h: libgnuintl.h
-+ cp libgnuintl.h libintl.h
-
--check: all
-+charset.alias: $(srcdir)/config.charset
-+ $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
-+ mv t-$@ $@
-
--# This installation goal is only used in GNU gettext. Packages which
--# only use the library should use install instead.
-+check: all
-
- # We must not install the libintl.h/libintl.a files if we are on a
--# system which has the gettext() function in its C library or in a
--# separate library or use the catgets interface. A special case is
--# where configure found a previously installed GNU gettext library.
-+# system which has the GNU gettext() function in its C library or in a
-+# separate library.
- # If you want to use the one which comes with this version of the
- # package, you have to use `configure --with-included-gettext'.
- install: install-exec install-data
- install-exec: all
-- if test "$(PACKAGE)" = "gettext" \
-- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
-- if test -r $(MKINSTALLDIRS); then \
-- $(MKINSTALLDIRS) $(libdir) $(includedir); \
-- else \
-- $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
-+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
-+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
-+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
-+ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
-+ $(LIBTOOL) --mode=install \
-+ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
-+ if test "@RELOCATABLE@" = yes; then \
-+ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
-+ if test -n "$$dependencies"; then \
-+ rm -f $(DESTDIR)$(libdir)/libintl.la; \
-+ fi; \
- fi; \
-- $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
-- $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
- else \
- : ; \
- fi
--install-data: all
-- if test "$(PACKAGE)" = "gettext"; then \
-- if test -r $(MKINSTALLDIRS); then \
-- $(MKINSTALLDIRS) $(gettextsrcdir); \
-+ if test "$(PACKAGE)" = "gettext-tools" \
-+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
-+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
-+ $(LIBTOOL) --mode=install \
-+ $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
-+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
-+ $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
-+ $(LIBTOOL) --mode=uninstall \
-+ rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
-+ else \
-+ : ; \
-+ fi
-+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
-+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
-+ dest=$(DESTDIR)$(libdir)/charset.alias; \
-+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
-+ orig=$(DESTDIR)$(libdir)/charset.alias; \
-+ sed -f ref-add.sed $$orig > $$temp; \
-+ $(INSTALL_DATA) $$temp $$dest; \
-+ rm -f $$temp; \
- else \
-- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
-+ if test @GLIBC21@ = no; then \
-+ orig=charset.alias; \
-+ sed -f ref-add.sed $$orig > $$temp; \
-+ $(INSTALL_DATA) $$temp $$dest; \
-+ rm -f $$temp; \
-+ fi; \
- fi; \
-- $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
-- dists="$(DISTFILES.common)"; \
-+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
-+ test -f $(DESTDIR)$(localedir)/locale.alias \
-+ && orig=$(DESTDIR)$(localedir)/locale.alias \
-+ || orig=$(srcdir)/locale.alias; \
-+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
-+ dest=$(DESTDIR)$(localedir)/locale.alias; \
-+ sed -f ref-add.sed $$orig > $$temp; \
-+ $(INSTALL_DATA) $$temp $$dest; \
-+ rm -f $$temp; \
-+ else \
-+ : ; \
-+ fi
-+install-data: all
-+ if test "$(PACKAGE)" = "gettext-tools"; then \
-+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
-+ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
-+ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
-+ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
- for file in $$dists; do \
-- $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
-+ $(INSTALL_DATA) $(srcdir)/$$file \
-+ $(DESTDIR)$(gettextsrcdir)/$$file; \
- done; \
-+ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
-+ dists="$(DISTFILES.generated)"; \
-+ for file in $$dists; do \
-+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
-+ $(INSTALL_DATA) $$dir/$$file \
-+ $(DESTDIR)$(gettextsrcdir)/$$file; \
-+ done; \
-+ dists="$(DISTFILES.obsolete)"; \
-+ for file in $$dists; do \
-+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
-+ done; \
-+ else \
-+ : ; \
-+ fi
-+
-+install-strip: install
-+
-+installdirs:
-+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
-+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
-+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
-+ else \
-+ : ; \
-+ fi
-+ if test "$(PACKAGE)" = "gettext-tools" \
-+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
-+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
-+ else \
-+ : ; \
-+ fi
-+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
-+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
-+ else \
-+ : ; \
-+ fi
-+ if test "$(PACKAGE)" = "gettext-tools"; then \
-+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
- else \
- : ; \
- fi
-@@ -143,22 +367,76 @@
- installcheck:
-
- uninstall:
-- dists="$(DISTFILES.common)"; \
-- for file in $$dists; do \
-- rm -f $(gettextsrcdir)/$$file; \
-- done
-+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
-+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
-+ rm -f $(DESTDIR)$(includedir)/libintl.h; \
-+ $(LIBTOOL) --mode=uninstall \
-+ rm -f $(DESTDIR)$(libdir)/libintl.$la; \
-+ else \
-+ : ; \
-+ fi
-+ if test "$(PACKAGE)" = "gettext-tools" \
-+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
-+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
-+ else \
-+ : ; \
-+ fi
-+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
-+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
-+ dest=$(DESTDIR)$(libdir)/charset.alias; \
-+ sed -f ref-del.sed $$dest > $$temp; \
-+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
-+ rm -f $$dest; \
-+ else \
-+ $(INSTALL_DATA) $$temp $$dest; \
-+ fi; \
-+ rm -f $$temp; \
-+ fi; \
-+ if test -f $(DESTDIR)$(localedir)/locale.alias; then \
-+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
-+ dest=$(DESTDIR)$(localedir)/locale.alias; \
-+ sed -f ref-del.sed $$dest > $$temp; \
-+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
-+ rm -f $$dest; \
-+ else \
-+ $(INSTALL_DATA) $$temp $$dest; \
-+ fi; \
-+ rm -f $$temp; \
-+ fi; \
-+ else \
-+ : ; \
-+ fi
-+ if test "$(PACKAGE)" = "gettext-tools"; then \
-+ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
-+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
-+ done; \
-+ else \
-+ : ; \
-+ fi
-
--info dvi:
-+info dvi ps pdf html:
-
--$(OBJECTS): ../config.h libgettext.h
--bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
--dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
-+$(OBJECTS): ../config.h libgnuintl.h
-+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
-+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
-+explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
-+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
-+dcigettext.$lo: $(srcdir)/eval-plural.h
-+localcharset.$lo: $(srcdir)/localcharset.h
-+localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
-+printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c
-
- tags: TAGS
-
- TAGS: $(HEADERS) $(SOURCES)
- here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
-
-+ctags: CTAGS
-+
-+CTAGS: $(HEADERS) $(SOURCES)
-+ here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
-+
- id: ID
-
- ID: $(HEADERS) $(SOURCES)
-@@ -166,12 +444,19 @@
-
-
- mostlyclean:
-- rm -f *.a *.o *.lo core core.*
-+ rm -f *.a *.la *.o *.obj *.lo core core.*
-+ rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
-+ rm -f -r .libs _libs
-
- clean: mostlyclean
-
- distclean: clean
-- rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
-+ rm -f Makefile ID TAGS
-+ if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
-+ rm -f ChangeLog.inst $(DISTFILES.normal); \
-+ else \
-+ : ; \
-+ fi
-
- maintainer-clean: distclean
- @echo "This command is intended for maintainers to use;"
-@@ -181,33 +466,27 @@
- # GNU gettext needs not contain the file `VERSION' but contains some
- # other files which should not be distributed in other packages.
- distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
--dist distdir: Makefile $(DISTFILES)
-- if test "$(PACKAGE)" = gettext; then \
-- additional="$(DISTFILES.gettext)"; \
-+dist distdir: Makefile
-+ if test "$(PACKAGE)" = "gettext-tools"; then \
-+ : ; \
- else \
-- additional="$(DISTFILES.normal)"; \
-- fi; \
-- for file in $(DISTFILES.common) $$additional; do \
-- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
-- || cp -p $(srcdir)/$$file $(distdir); \
-- done
--
--dist-libc:
-- tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
--
--Makefile: Makefile.in ../config.status
-- cd .. \
-- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-+ if test "$(PACKAGE)" = "gettext-runtime"; then \
-+ additional="$(DISTFILES.gettext)"; \
-+ else \
-+ additional="$(DISTFILES.normal)"; \
-+ fi; \
-+ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
-+ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
-+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
-+ cp -p $$dir/$$file $(distdir); \
-+ done; \
-+ fi
-
--# The dependency for intlh.inst is different in gettext and all other
--# packages. Because we cannot you GNU make features we have to solve
--# the problem while rewriting Makefile.in.
--@GT_YES@intlh.inst: intlh.inst.in ../config.status
--@GT_YES@ cd .. \
--@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
--@GT_YES@ $(SHELL) ./config.status
--@GT_NO@.PHONY: intlh.inst
--@GT_NO@intlh.inst:
-+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-+ cd $(top_builddir) && $(SHELL) ./config.status
-+# This would be more efficient, but doesn't work any more with autoconf-2.57,
-+# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
-+# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
- # Tell versions [3.59,3.63) of GNU make not to export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
---- lrzsz-0.12.20.safe/intl/ngettext.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/ngettext.c 2004-09-12 14:40:34.533721032 -0400
-@@ -0,0 +1,65 @@
-+/* Implementation of ngettext(3) function.
-+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#ifdef _LIBC
-+# define __need_NULL
-+# include <stddef.h>
-+#else
-+# include <stdlib.h> /* Just for NULL. */
-+#endif
-+
-+#include "gettextP.h"
-+#ifdef _LIBC
-+# include <libintl.h>
-+#else
-+# include "libgnuintl.h"
-+#endif
-+
-+#include <locale.h>
-+
-+/* @@ end of prolog @@ */
-+
-+/* Names for the libintl functions are a problem. They must not clash
-+ with existing names and they should follow ANSI C. But this source
-+ code is also used in GNU C Library where the names have a __
-+ prefix. So we have to make a difference here. */
-+#ifdef _LIBC
-+# define NGETTEXT __ngettext
-+# define DCNGETTEXT __dcngettext
-+#else
-+# define NGETTEXT libintl_ngettext
-+# define DCNGETTEXT libintl_dcngettext
-+#endif
-+
-+/* Look up MSGID in the current default message catalog for the current
-+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
-+ text). */
-+char *
-+NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n)
-+{
-+ return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
-+}
-+
-+#ifdef _LIBC
-+/* Alias for function name in GNU C Library. */
-+weak_alias (__ngettext, ngettext);
-+#endif
---- lrzsz-0.12.20.safe/intl/os2compat.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/os2compat.c 2004-09-12 14:40:34.539720120 -0400
-@@ -0,0 +1,98 @@
-+/* OS/2 compatibility functions.
-+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#define OS2_AWARE
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+#include <stdlib.h>
-+#include <string.h>
-+#include <sys/param.h>
-+
-+/* A version of getenv() that works from DLLs */
-+extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
-+
-+char *
-+_nl_getenv (const char *name)
-+{
-+ unsigned char *value;
-+ if (DosScanEnv (name, &value))
-+ return NULL;
-+ else
-+ return value;
-+}
-+
-+/* A fixed size buffer. */
-+char libintl_nl_default_dirname[MAXPATHLEN+1];
-+
-+char *_nlos2_libdir = NULL;
-+char *_nlos2_localealiaspath = NULL;
-+char *_nlos2_localedir = NULL;
-+
-+static __attribute__((constructor)) void
-+nlos2_initialize ()
-+{
-+ char *root = getenv ("UNIXROOT");
-+ char *gnulocaledir = getenv ("GNULOCALEDIR");
-+
-+ _nlos2_libdir = gnulocaledir;
-+ if (!_nlos2_libdir)
-+ {
-+ if (root)
-+ {
-+ size_t sl = strlen (root);
-+ _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
-+ memcpy (_nlos2_libdir, root, sl);
-+ memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
-+ }
-+ else
-+ _nlos2_libdir = LIBDIR;
-+ }
-+
-+ _nlos2_localealiaspath = gnulocaledir;
-+ if (!_nlos2_localealiaspath)
-+ {
-+ if (root)
-+ {
-+ size_t sl = strlen (root);
-+ _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
-+ memcpy (_nlos2_localealiaspath, root, sl);
-+ memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
-+ }
-+ else
-+ _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
-+ }
-+
-+ _nlos2_localedir = gnulocaledir;
-+ if (!_nlos2_localedir)
-+ {
-+ if (root)
-+ {
-+ size_t sl = strlen (root);
-+ _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
-+ memcpy (_nlos2_localedir, root, sl);
-+ memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
-+ }
-+ else
-+ _nlos2_localedir = LOCALEDIR;
-+ }
-+
-+ if (strlen (_nlos2_localedir) <= MAXPATHLEN)
-+ strcpy (libintl_nl_default_dirname, _nlos2_localedir);
-+}
---- lrzsz-0.12.20.safe/intl/os2compat.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/os2compat.h 2004-09-12 14:40:34.544719360 -0400
-@@ -0,0 +1,46 @@
-+/* OS/2 compatibility defines.
-+ This file is intended to be included from config.h
-+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* When included from os2compat.h we need all the original definitions */
-+#ifndef OS2_AWARE
-+
-+#undef LIBDIR
-+#define LIBDIR _nlos2_libdir
-+extern char *_nlos2_libdir;
-+
-+#undef LOCALEDIR
-+#define LOCALEDIR _nlos2_localedir
-+extern char *_nlos2_localedir;
-+
-+#undef LOCALE_ALIAS_PATH
-+#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
-+extern char *_nlos2_localealiaspath;
-+
-+#endif
-+
-+#undef HAVE_STRCASECMP
-+#define HAVE_STRCASECMP 1
-+#define strcasecmp stricmp
-+#define strncasecmp strnicmp
-+
-+/* We have our own getenv() which works even if library is compiled as DLL */
-+#define getenv _nl_getenv
-+
-+/* Older versions of gettext used -1 as the value of LC_MESSAGES */
-+#define LC_MESSAGES_COMPAT (-1)
---- lrzsz-0.12.20.safe/intl/osdep.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/osdep.c 2004-09-12 14:40:34.550718448 -0400
-@@ -0,0 +1,24 @@
-+/* OS dependent parts of libintl.
-+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#if defined __EMX__
-+# include "os2compat.c"
-+#else
-+/* Avoid AIX compiler warning. */
-+typedef int dummy;
-+#endif
---- lrzsz-0.12.20.safe/intl/plural.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/plural.c 2004-09-12 14:40:36.571411256 -0400
-@@ -0,0 +1,1490 @@
-+/* A Bison parser, made from plural.y
-+ by GNU bison 1.35. */
-+
-+#define YYBISON 1 /* Identify Bison output. */
-+
-+#define yyparse __gettextparse
-+#define yylex __gettextlex
-+#define yyerror __gettexterror
-+#define yylval __gettextlval
-+#define yychar __gettextchar
-+#define yydebug __gettextdebug
-+#define yynerrs __gettextnerrs
-+# define EQUOP2 257
-+# define CMPOP2 258
-+# define ADDOP2 259
-+# define MULOP2 260
-+# define NUMBER 261
-+
-+#line 1 "plural.y"
-+
-+/* Expression parsing for plural form selection.
-+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
-+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* The bison generated parser uses alloca. AIX 3 forces us to put this
-+ declaration at the beginning of the file. The declaration in bison's
-+ skeleton file comes too late. This must come before <config.h>
-+ because <config.h> may include arbitrary system headers. */
-+#if defined _AIX && !defined __GNUC__
-+ #pragma alloca
-+#endif
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <stddef.h>
-+#include <stdlib.h>
-+#include "plural-exp.h"
-+
-+/* The main function generated by the parser is called __gettextparse,
-+ but we want it to be called PLURAL_PARSE. */
-+#ifndef _LIBC
-+# define __gettextparse PLURAL_PARSE
-+#endif
-+
-+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
-+#define YYPARSE_PARAM arg
-+
-+#line 49 "plural.y"
-+#ifndef YYSTYPE
-+typedef union {
-+ unsigned long int num;
-+ enum operator op;
-+ struct expression *exp;
-+} yystype;
-+# define YYSTYPE yystype
-+# define YYSTYPE_IS_TRIVIAL 1
-+#endif
-+#line 55 "plural.y"
-+
-+/* Prototypes for local functions. */
-+static int yylex (YYSTYPE *lval, const char **pexp);
-+static void yyerror (const char *str);
-+
-+/* Allocation of expressions. */
-+
-+static struct expression *
-+new_exp (int nargs, enum operator op, struct expression * const *args)
-+{
-+ int i;
-+ struct expression *newp;
-+
-+ /* If any of the argument could not be malloc'ed, just return NULL. */
-+ for (i = nargs - 1; i >= 0; i--)
-+ if (args[i] == NULL)
-+ goto fail;
-+
-+ /* Allocate a new expression. */
-+ newp = (struct expression *) malloc (sizeof (*newp));
-+ if (newp != NULL)
-+ {
-+ newp->nargs = nargs;
-+ newp->operation = op;
-+ for (i = nargs - 1; i >= 0; i--)
-+ newp->val.args[i] = args[i];
-+ return newp;
-+ }
-+
-+ fail:
-+ for (i = nargs - 1; i >= 0; i--)
-+ FREE_EXPRESSION (args[i]);
-+
-+ return NULL;
-+}
-+
-+static inline struct expression *
-+new_exp_0 (enum operator op)
-+{
-+ return new_exp (0, op, NULL);
-+}
-+
-+static inline struct expression *
-+new_exp_1 (enum operator op, struct expression *right)
-+{
-+ struct expression *args[1];
-+
-+ args[0] = right;
-+ return new_exp (1, op, args);
-+}
-+
-+static struct expression *
-+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
-+{
-+ struct expression *args[2];
-+
-+ args[0] = left;
-+ args[1] = right;
-+ return new_exp (2, op, args);
-+}
-+
-+static inline struct expression *
-+new_exp_3 (enum operator op, struct expression *bexp,
-+ struct expression *tbranch, struct expression *fbranch)
-+{
-+ struct expression *args[3];
-+
-+ args[0] = bexp;
-+ args[1] = tbranch;
-+ args[2] = fbranch;
-+ return new_exp (3, op, args);
-+}
-+
-+#ifndef YYDEBUG
-+# define YYDEBUG 0
-+#endif
-+
-+
-+
-+#define YYFINAL 27
-+#define YYFLAG -32768
-+#define YYNTBASE 16
-+
-+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
-+#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
-+
-+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
-+static const char yytranslate[] =
-+{
-+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
-+ 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
-+ 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-+ 2, 2, 2, 2, 2, 2, 1, 6, 7, 8,
-+ 9, 11
-+};
-+
-+#if YYDEBUG
-+static const short yyprhs[] =
-+{
-+ 0, 0, 2, 8, 12, 16, 20, 24, 28, 32,
-+ 35, 37, 39
-+};
-+static const short yyrhs[] =
-+{
-+ 17, 0, 17, 3, 17, 12, 17, 0, 17, 4,
-+ 17, 0, 17, 5, 17, 0, 17, 6, 17, 0,
-+ 17, 7, 17, 0, 17, 8, 17, 0, 17, 9,
-+ 17, 0, 10, 17, 0, 13, 0, 11, 0, 14,
-+ 17, 15, 0
-+};
-+
-+#endif
-+
-+#if YYDEBUG
-+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-+static const short yyrline[] =
-+{
-+ 0, 150, 158, 162, 166, 170, 174, 178, 182, 186,
-+ 190, 194, 199
-+};
-+#endif
-+
-+
-+#if (YYDEBUG) || defined YYERROR_VERBOSE
-+
-+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
-+static const char *const yytname[] =
-+{
-+ "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
-+ "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
-+ "start", "exp", 0
-+};
-+#endif
-+
-+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-+static const short yyr1[] =
-+{
-+ 0, 16, 17, 17, 17, 17, 17, 17, 17, 17,
-+ 17, 17, 17
-+};
-+
-+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-+static const short yyr2[] =
-+{
-+ 0, 1, 5, 3, 3, 3, 3, 3, 3, 2,
-+ 1, 1, 3
-+};
-+
-+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
-+ doesn't specify something else to do. Zero means the default is an
-+ error. */
-+static const short yydefact[] =
-+{
-+ 0, 0, 11, 10, 0, 1, 9, 0, 0, 0,
-+ 0, 0, 0, 0, 0, 12, 0, 3, 4, 5,
-+ 6, 7, 8, 0, 2, 0, 0, 0
-+};
-+
-+static const short yydefgoto[] =
-+{
-+ 25, 5
-+};
-+
-+static const short yypact[] =
-+{
-+ -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9,
-+ -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16,
-+ 26, -3,-32768, -9, 34, 21, 53,-32768
-+};
-+
-+static const short yypgoto[] =
-+{
-+ -32768, -1
-+};
-+
-+
-+#define YYLAST 53
-+
-+
-+static const short yytable[] =
-+{
-+ 6, 1, 2, 7, 3, 4, 14, 16, 17, 18,
-+ 19, 20, 21, 22, 8, 9, 10, 11, 12, 13,
-+ 14, 26, 24, 12, 13, 14, 15, 8, 9, 10,
-+ 11, 12, 13, 14, 13, 14, 23, 8, 9, 10,
-+ 11, 12, 13, 14, 10, 11, 12, 13, 14, 11,
-+ 12, 13, 14, 27
-+};
-+
-+static const short yycheck[] =
-+{
-+ 1, 10, 11, 4, 13, 14, 9, 8, 9, 10,
-+ 11, 12, 13, 14, 3, 4, 5, 6, 7, 8,
-+ 9, 0, 23, 7, 8, 9, 15, 3, 4, 5,
-+ 6, 7, 8, 9, 8, 9, 12, 3, 4, 5,
-+ 6, 7, 8, 9, 5, 6, 7, 8, 9, 6,
-+ 7, 8, 9, 0
-+};
-+#define YYPURE 1
-+
-+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-+#line 3 "/usr/local/share/bison/bison.simple"
-+
-+/* Skeleton output parser for bison,
-+
-+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
-+ Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330,
-+ Boston, MA 02111-1307, USA. */
-+
-+/* As a special exception, when this file is copied by Bison into a
-+ Bison output file, you may use that output file without restriction.
-+ This special exception was added by the Free Software Foundation
-+ in version 1.24 of Bison. */
-+
-+/* This is the parser code that is written into each bison parser when
-+ the %semantic_parser declaration is not specified in the grammar.
-+ It was written by Richard Stallman by simplifying the hairy parser
-+ used when %semantic_parser is specified. */
-+
-+/* All symbols defined below should begin with yy or YY, to avoid
-+ infringing on user name space. This should be done even for local
-+ variables, as they might otherwise be expanded by user macros.
-+ There are some unavoidable exceptions within include files to
-+ define necessary library symbols; they are noted "INFRINGES ON
-+ USER NAME SPACE" below. */
-+
-+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
-+
-+/* The parser invokes alloca or malloc; define the necessary symbols. */
-+
-+# if YYSTACK_USE_ALLOCA
-+# define YYSTACK_ALLOC alloca
-+# else
-+# ifndef YYSTACK_USE_ALLOCA
-+# if defined (alloca) || defined (_ALLOCA_H)
-+# define YYSTACK_ALLOC alloca
-+# else
-+# ifdef __GNUC__
-+# define YYSTACK_ALLOC __builtin_alloca
-+# endif
-+# endif
-+# endif
-+# endif
-+
-+# ifdef YYSTACK_ALLOC
-+ /* Pacify GCC's `empty if-body' warning. */
-+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-+# else
-+# if defined (__STDC__) || defined (__cplusplus)
-+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-+# define YYSIZE_T size_t
-+# endif
-+# define YYSTACK_ALLOC malloc
-+# define YYSTACK_FREE free
-+# endif
-+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
-+
-+
-+#if (! defined (yyoverflow) \
-+ && (! defined (__cplusplus) \
-+ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-+
-+/* A type that is properly aligned for any stack member. */
-+union yyalloc
-+{
-+ short yyss;
-+ YYSTYPE yyvs;
-+# if YYLSP_NEEDED
-+ YYLTYPE yyls;
-+# endif
-+};
-+
-+/* The size of the maximum gap between one aligned stack and the next. */
-+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
-+
-+/* The size of an array large to enough to hold all stacks, each with
-+ N elements. */
-+# if YYLSP_NEEDED
-+# define YYSTACK_BYTES(N) \
-+ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
-+ + 2 * YYSTACK_GAP_MAX)
-+# else
-+# define YYSTACK_BYTES(N) \
-+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
-+ + YYSTACK_GAP_MAX)
-+# endif
-+
-+/* Copy COUNT objects from FROM to TO. The source and destination do
-+ not overlap. */
-+# ifndef YYCOPY
-+# if 1 < __GNUC__
-+# define YYCOPY(To, From, Count) \
-+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-+# else
-+# define YYCOPY(To, From, Count) \
-+ do \
-+ { \
-+ register YYSIZE_T yyi; \
-+ for (yyi = 0; yyi < (Count); yyi++) \
-+ (To)[yyi] = (From)[yyi]; \
-+ } \
-+ while (0)
-+# endif
-+# endif
-+
-+/* Relocate STACK from its old location to the new one. The
-+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
-+ elements in the stack, and YYPTR gives the new location of the
-+ stack. Advance YYPTR to a properly aligned location for the next
-+ stack. */
-+# define YYSTACK_RELOCATE(Stack) \
-+ do \
-+ { \
-+ YYSIZE_T yynewbytes; \
-+ YYCOPY (&yyptr->Stack, Stack, yysize); \
-+ Stack = &yyptr->Stack; \
-+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
-+ yyptr += yynewbytes / sizeof (*yyptr); \
-+ } \
-+ while (0)
-+
-+#endif
-+
-+
-+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-+# define YYSIZE_T __SIZE_TYPE__
-+#endif
-+#if ! defined (YYSIZE_T) && defined (size_t)
-+# define YYSIZE_T size_t
-+#endif
-+#if ! defined (YYSIZE_T)
-+# if defined (__STDC__) || defined (__cplusplus)
-+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-+# define YYSIZE_T size_t
-+# endif
-+#endif
-+#if ! defined (YYSIZE_T)
-+# define YYSIZE_T unsigned int
-+#endif
-+
-+#define yyerrok (yyerrstatus = 0)
-+#define yyclearin (yychar = YYEMPTY)
-+#define YYEMPTY -2
-+#define YYEOF 0
-+#define YYACCEPT goto yyacceptlab
-+#define YYABORT goto yyabortlab
-+#define YYERROR goto yyerrlab1
-+/* Like YYERROR except do call yyerror. This remains here temporarily
-+ to ease the transition to the new meaning of YYERROR, for GCC.
-+ Once GCC version 2 has supplanted version 1, this can go. */
-+#define YYFAIL goto yyerrlab
-+#define YYRECOVERING() (!!yyerrstatus)
-+#define YYBACKUP(Token, Value) \
-+do \
-+ if (yychar == YYEMPTY && yylen == 1) \
-+ { \
-+ yychar = (Token); \
-+ yylval = (Value); \
-+ yychar1 = YYTRANSLATE (yychar); \
-+ YYPOPSTACK; \
-+ goto yybackup; \
-+ } \
-+ else \
-+ { \
-+ yyerror ("syntax error: cannot back up"); \
-+ YYERROR; \
-+ } \
-+while (0)
-+
-+#define YYTERROR 1
-+#define YYERRCODE 256
-+
-+
-+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
-+ are run).
-+
-+ When YYLLOC_DEFAULT is run, CURRENT is set the location of the
-+ first token. By default, to implement support for ranges, extend
-+ its range to the last symbol. */
-+
-+#ifndef YYLLOC_DEFAULT
-+# define YYLLOC_DEFAULT(Current, Rhs, N) \
-+ Current.last_line = Rhs[N].last_line; \
-+ Current.last_column = Rhs[N].last_column;
-+#endif
-+
-+
-+/* YYLEX -- calling `yylex' with the right arguments. */
-+
-+#if YYPURE
-+# if YYLSP_NEEDED
-+# ifdef YYLEX_PARAM
-+# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
-+# else
-+# define YYLEX yylex (&yylval, &yylloc)
-+# endif
-+# else /* !YYLSP_NEEDED */
-+# ifdef YYLEX_PARAM
-+# define YYLEX yylex (&yylval, YYLEX_PARAM)
-+# else
-+# define YYLEX yylex (&yylval)
-+# endif
-+# endif /* !YYLSP_NEEDED */
-+#else /* !YYPURE */
-+# define YYLEX yylex ()
-+#endif /* !YYPURE */
-+
-+
-+/* Enable debugging if requested. */
-+#if YYDEBUG
-+
-+# ifndef YYFPRINTF
-+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-+# define YYFPRINTF fprintf
-+# endif
-+
-+# define YYDPRINTF(Args) \
-+do { \
-+ if (yydebug) \
-+ YYFPRINTF Args; \
-+} while (0)
-+/* Nonzero means print parse trace. It is left uninitialized so that
-+ multiple parsers can coexist. */
-+int yydebug;
-+#else /* !YYDEBUG */
-+# define YYDPRINTF(Args)
-+#endif /* !YYDEBUG */
-+
-+/* YYINITDEPTH -- initial size of the parser's stacks. */
-+#ifndef YYINITDEPTH
-+# define YYINITDEPTH 200
-+#endif
-+
-+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-+ if the built-in stack extension method is used).
-+
-+ Do not make this value too large; the results are undefined if
-+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
-+ evaluated with infinite-precision integer arithmetic. */
-+
-+#if YYMAXDEPTH == 0
-+# undef YYMAXDEPTH
-+#endif
-+
-+#ifndef YYMAXDEPTH
-+# define YYMAXDEPTH 10000
-+#endif
-+
-+#ifdef YYERROR_VERBOSE
-+
-+# ifndef yystrlen
-+# if defined (__GLIBC__) && defined (_STRING_H)
-+# define yystrlen strlen
-+# else
-+/* Return the length of YYSTR. */
-+static YYSIZE_T
-+# if defined (__STDC__) || defined (__cplusplus)
-+yystrlen (const char *yystr)
-+# else
-+yystrlen (yystr)
-+ const char *yystr;
-+# endif
-+{
-+ register const char *yys = yystr;
-+
-+ while (*yys++ != '\0')
-+ continue;
-+
-+ return yys - yystr - 1;
-+}
-+# endif
-+# endif
-+
-+# ifndef yystpcpy
-+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
-+# define yystpcpy stpcpy
-+# else
-+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-+ YYDEST. */
-+static char *
-+# if defined (__STDC__) || defined (__cplusplus)
-+yystpcpy (char *yydest, const char *yysrc)
-+# else
-+yystpcpy (yydest, yysrc)
-+ char *yydest;
-+ const char *yysrc;
-+# endif
-+{
-+ register char *yyd = yydest;
-+ register const char *yys = yysrc;
-+
-+ while ((*yyd++ = *yys++) != '\0')
-+ continue;
-+
-+ return yyd - 1;
-+}
-+# endif
-+# endif
-+#endif
-+
-+#line 315 "/usr/local/share/bison/bison.simple"
-+
-+
-+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
-+ into yyparse. The argument should have type void *.
-+ It should actually point to an object.
-+ Grammar actions can access the variable by casting it
-+ to the proper pointer type. */
-+
-+#ifdef YYPARSE_PARAM
-+# if defined (__STDC__) || defined (__cplusplus)
-+# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-+# define YYPARSE_PARAM_DECL
-+# else
-+# define YYPARSE_PARAM_ARG YYPARSE_PARAM
-+# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-+# endif
-+#else /* !YYPARSE_PARAM */
-+# define YYPARSE_PARAM_ARG
-+# define YYPARSE_PARAM_DECL
-+#endif /* !YYPARSE_PARAM */
-+
-+/* Prevent warning if -Wstrict-prototypes. */
-+#ifdef __GNUC__
-+# ifdef YYPARSE_PARAM
-+int yyparse (void *);
-+# else
-+int yyparse (void);
-+# endif
-+#endif
-+
-+/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
-+ variables are global, or local to YYPARSE. */
-+
-+#define YY_DECL_NON_LSP_VARIABLES \
-+/* The lookahead symbol. */ \
-+int yychar; \
-+ \
-+/* The semantic value of the lookahead symbol. */ \
-+YYSTYPE yylval; \
-+ \
-+/* Number of parse errors so far. */ \
-+int yynerrs;
-+
-+#if YYLSP_NEEDED
-+# define YY_DECL_VARIABLES \
-+YY_DECL_NON_LSP_VARIABLES \
-+ \
-+/* Location data for the lookahead symbol. */ \
-+YYLTYPE yylloc;
-+#else
-+# define YY_DECL_VARIABLES \
-+YY_DECL_NON_LSP_VARIABLES
-+#endif
-+
-+
-+/* If nonreentrant, generate the variables here. */
-+
-+#if !YYPURE
-+YY_DECL_VARIABLES
-+#endif /* !YYPURE */
-+
-+int
-+yyparse (YYPARSE_PARAM_ARG)
-+ YYPARSE_PARAM_DECL
-+{
-+ /* If reentrant, generate the variables here. */
-+#if YYPURE
-+ YY_DECL_VARIABLES
-+#endif /* !YYPURE */
-+
-+ register int yystate;
-+ register int yyn;
-+ int yyresult;
-+ /* Number of tokens to shift before error messages enabled. */
-+ int yyerrstatus;
-+ /* Lookahead token as an internal (translated) token number. */
-+ int yychar1 = 0;
-+
-+ /* Three stacks and their tools:
-+ `yyss': related to states,
-+ `yyvs': related to semantic values,
-+ `yyls': related to locations.
-+
-+ Refer to the stacks thru separate pointers, to allow yyoverflow
-+ to reallocate them elsewhere. */
-+
-+ /* The state stack. */
-+ short yyssa[YYINITDEPTH];
-+ short *yyss = yyssa;
-+ register short *yyssp;
-+
-+ /* The semantic value stack. */
-+ YYSTYPE yyvsa[YYINITDEPTH];
-+ YYSTYPE *yyvs = yyvsa;
-+ register YYSTYPE *yyvsp;
-+
-+#if YYLSP_NEEDED
-+ /* The location stack. */
-+ YYLTYPE yylsa[YYINITDEPTH];
-+ YYLTYPE *yyls = yylsa;
-+ YYLTYPE *yylsp;
-+#endif
-+
-+#if YYLSP_NEEDED
-+# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-+#else
-+# define YYPOPSTACK (yyvsp--, yyssp--)
-+#endif
-+
-+ YYSIZE_T yystacksize = YYINITDEPTH;
-+
-+
-+ /* The variables used to return semantic value and location from the
-+ action routines. */
-+ YYSTYPE yyval;
-+#if YYLSP_NEEDED
-+ YYLTYPE yyloc;
-+#endif
-+
-+ /* When reducing, the number of symbols on the RHS of the reduced
-+ rule. */
-+ int yylen;
-+
-+ YYDPRINTF ((stderr, "Starting parse\n"));
-+
-+ yystate = 0;
-+ yyerrstatus = 0;
-+ yynerrs = 0;
-+ yychar = YYEMPTY; /* Cause a token to be read. */
-+
-+ /* Initialize stack pointers.
-+ Waste one element of value and location stack
-+ so that they stay on the same level as the state stack.
-+ The wasted elements are never initialized. */
-+
-+ yyssp = yyss;
-+ yyvsp = yyvs;
-+#if YYLSP_NEEDED
-+ yylsp = yyls;
-+#endif
-+ goto yysetstate;
-+
-+/*------------------------------------------------------------.
-+| yynewstate -- Push a new state, which is found in yystate. |
-+`------------------------------------------------------------*/
-+ yynewstate:
-+ /* In all cases, when you get here, the value and location stacks
-+ have just been pushed. so pushing a state here evens the stacks.
-+ */
-+ yyssp++;
-+
-+ yysetstate:
-+ *yyssp = yystate;
-+
-+ if (yyssp >= yyss + yystacksize - 1)
-+ {
-+ /* Get the current used size of the three stacks, in elements. */
-+ YYSIZE_T yysize = yyssp - yyss + 1;
-+
-+#ifdef yyoverflow
-+ {
-+ /* Give user a chance to reallocate the stack. Use copies of
-+ these so that the &'s don't force the real ones into
-+ memory. */
-+ YYSTYPE *yyvs1 = yyvs;
-+ short *yyss1 = yyss;
-+
-+ /* Each stack pointer address is followed by the size of the
-+ data in use in that stack, in bytes. */
-+# if YYLSP_NEEDED
-+ YYLTYPE *yyls1 = yyls;
-+ /* This used to be a conditional around just the two extra args,
-+ but that might be undefined if yyoverflow is a macro. */
-+ yyoverflow ("parser stack overflow",
-+ &yyss1, yysize * sizeof (*yyssp),
-+ &yyvs1, yysize * sizeof (*yyvsp),
-+ &yyls1, yysize * sizeof (*yylsp),
-+ &yystacksize);
-+ yyls = yyls1;
-+# else
-+ yyoverflow ("parser stack overflow",
-+ &yyss1, yysize * sizeof (*yyssp),
-+ &yyvs1, yysize * sizeof (*yyvsp),
-+ &yystacksize);
-+# endif
-+ yyss = yyss1;
-+ yyvs = yyvs1;
-+ }
-+#else /* no yyoverflow */
-+# ifndef YYSTACK_RELOCATE
-+ goto yyoverflowlab;
-+# else
-+ /* Extend the stack our own way. */
-+ if (yystacksize >= YYMAXDEPTH)
-+ goto yyoverflowlab;
-+ yystacksize *= 2;
-+ if (yystacksize > YYMAXDEPTH)
-+ yystacksize = YYMAXDEPTH;
-+
-+ {
-+ short *yyss1 = yyss;
-+ union yyalloc *yyptr =
-+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-+ if (! yyptr)
-+ goto yyoverflowlab;
-+ YYSTACK_RELOCATE (yyss);
-+ YYSTACK_RELOCATE (yyvs);
-+# if YYLSP_NEEDED
-+ YYSTACK_RELOCATE (yyls);
-+# endif
-+# undef YYSTACK_RELOCATE
-+ if (yyss1 != yyssa)
-+ YYSTACK_FREE (yyss1);
-+ }
-+# endif
-+#endif /* no yyoverflow */
-+
-+ yyssp = yyss + yysize - 1;
-+ yyvsp = yyvs + yysize - 1;
-+#if YYLSP_NEEDED
-+ yylsp = yyls + yysize - 1;
-+#endif
-+
-+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-+ (unsigned long int) yystacksize));
-+
-+ if (yyssp >= yyss + yystacksize - 1)
-+ YYABORT;
-+ }
-+
-+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-+
-+ goto yybackup;
-+
-+
-+/*-----------.
-+| yybackup. |
-+`-----------*/
-+yybackup:
-+
-+/* Do appropriate processing given the current state. */
-+/* Read a lookahead token if we need one and don't already have one. */
-+/* yyresume: */
-+
-+ /* First try to decide what to do without reference to lookahead token. */
-+
-+ yyn = yypact[yystate];
-+ if (yyn == YYFLAG)
-+ goto yydefault;
-+
-+ /* Not known => get a lookahead token if don't already have one. */
-+
-+ /* yychar is either YYEMPTY or YYEOF
-+ or a valid token in external form. */
-+
-+ if (yychar == YYEMPTY)
-+ {
-+ YYDPRINTF ((stderr, "Reading a token: "));
-+ yychar = YYLEX;
-+ }
-+
-+ /* Convert token to internal form (in yychar1) for indexing tables with */
-+
-+ if (yychar <= 0) /* This means end of input. */
-+ {
-+ yychar1 = 0;
-+ yychar = YYEOF; /* Don't call YYLEX any more */
-+
-+ YYDPRINTF ((stderr, "Now at end of input.\n"));
-+ }
-+ else
-+ {
-+ yychar1 = YYTRANSLATE (yychar);
-+
-+#if YYDEBUG
-+ /* We have to keep this `#if YYDEBUG', since we use variables
-+ which are defined only if `YYDEBUG' is set. */
-+ if (yydebug)
-+ {
-+ YYFPRINTF (stderr, "Next token is %d (%s",
-+ yychar, yytname[yychar1]);
-+ /* Give the individual parser a way to print the precise
-+ meaning of a token, for further debugging info. */
-+# ifdef YYPRINT
-+ YYPRINT (stderr, yychar, yylval);
-+# endif
-+ YYFPRINTF (stderr, ")\n");
-+ }
-+#endif
-+ }
-+
-+ yyn += yychar1;
-+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
-+ goto yydefault;
-+
-+ yyn = yytable[yyn];
-+
-+ /* yyn is what to do for this token type in this state.
-+ Negative => reduce, -yyn is rule number.
-+ Positive => shift, yyn is new state.
-+ New state is final state => don't bother to shift,
-+ just return success.
-+ 0, or most negative number => error. */
-+
-+ if (yyn < 0)
-+ {
-+ if (yyn == YYFLAG)
-+ goto yyerrlab;
-+ yyn = -yyn;
-+ goto yyreduce;
-+ }
-+ else if (yyn == 0)
-+ goto yyerrlab;
-+
-+ if (yyn == YYFINAL)
-+ YYACCEPT;
-+
-+ /* Shift the lookahead token. */
-+ YYDPRINTF ((stderr, "Shifting token %d (%s), ",
-+ yychar, yytname[yychar1]));
-+
-+ /* Discard the token being shifted unless it is eof. */
-+ if (yychar != YYEOF)
-+ yychar = YYEMPTY;
-+
-+ *++yyvsp = yylval;
-+#if YYLSP_NEEDED
-+ *++yylsp = yylloc;
-+#endif
-+
-+ /* Count tokens shifted since error; after three, turn off error
-+ status. */
-+ if (yyerrstatus)
-+ yyerrstatus--;
-+
-+ yystate = yyn;
-+ goto yynewstate;
-+
-+
-+/*-----------------------------------------------------------.
-+| yydefault -- do the default action for the current state. |
-+`-----------------------------------------------------------*/
-+yydefault:
-+ yyn = yydefact[yystate];
-+ if (yyn == 0)
-+ goto yyerrlab;
-+ goto yyreduce;
-+
-+
-+/*-----------------------------.
-+| yyreduce -- Do a reduction. |
-+`-----------------------------*/
-+yyreduce:
-+ /* yyn is the number of a rule to reduce with. */
-+ yylen = yyr2[yyn];
-+
-+ /* If YYLEN is nonzero, implement the default value of the action:
-+ `$$ = $1'.
-+
-+ Otherwise, the following line sets YYVAL to the semantic value of
-+ the lookahead token. This behavior is undocumented and Bison
-+ users should not rely upon it. Assigning to YYVAL
-+ unconditionally makes the parser a bit smaller, and it avoids a
-+ GCC warning that YYVAL may be used uninitialized. */
-+ yyval = yyvsp[1-yylen];
-+
-+#if YYLSP_NEEDED
-+ /* Similarly for the default location. Let the user run additional
-+ commands if for instance locations are ranges. */
-+ yyloc = yylsp[1-yylen];
-+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-+#endif
-+
-+#if YYDEBUG
-+ /* We have to keep this `#if YYDEBUG', since we use variables which
-+ are defined only if `YYDEBUG' is set. */
-+ if (yydebug)
-+ {
-+ int yyi;
-+
-+ YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
-+ yyn, yyrline[yyn]);
-+
-+ /* Print the symbols being reduced, and their result. */
-+ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
-+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
-+ YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
-+ }
-+#endif
-+
-+ switch (yyn) {
-+
-+case 1:
-+#line 151 "plural.y"
-+{
-+ if (yyvsp[0].exp == NULL)
-+ YYABORT;
-+ ((struct parse_args *) arg)->res = yyvsp[0].exp;
-+ }
-+ break;
-+case 2:
-+#line 159 "plural.y"
-+{
-+ yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
-+ }
-+ break;
-+case 3:
-+#line 163 "plural.y"
-+{
-+ yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
-+ }
-+ break;
-+case 4:
-+#line 167 "plural.y"
-+{
-+ yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
-+ }
-+ break;
-+case 5:
-+#line 171 "plural.y"
-+{
-+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
-+ }
-+ break;
-+case 6:
-+#line 175 "plural.y"
-+{
-+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
-+ }
-+ break;
-+case 7:
-+#line 179 "plural.y"
-+{
-+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
-+ }
-+ break;
-+case 8:
-+#line 183 "plural.y"
-+{
-+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
-+ }
-+ break;
-+case 9:
-+#line 187 "plural.y"
-+{
-+ yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
-+ }
-+ break;
-+case 10:
-+#line 191 "plural.y"
-+{
-+ yyval.exp = new_exp_0 (var);
-+ }
-+ break;
-+case 11:
-+#line 195 "plural.y"
-+{
-+ if ((yyval.exp = new_exp_0 (num)) != NULL)
-+ yyval.exp->val.num = yyvsp[0].num;
-+ }
-+ break;
-+case 12:
-+#line 200 "plural.y"
-+{
-+ yyval.exp = yyvsp[-1].exp;
-+ }
-+ break;
-+}
-+
-+#line 705 "/usr/local/share/bison/bison.simple"
-+
-+
-+ yyvsp -= yylen;
-+ yyssp -= yylen;
-+#if YYLSP_NEEDED
-+ yylsp -= yylen;
-+#endif
-+
-+#if YYDEBUG
-+ if (yydebug)
-+ {
-+ short *yyssp1 = yyss - 1;
-+ YYFPRINTF (stderr, "state stack now");
-+ while (yyssp1 != yyssp)
-+ YYFPRINTF (stderr, " %d", *++yyssp1);
-+ YYFPRINTF (stderr, "\n");
-+ }
-+#endif
-+
-+ *++yyvsp = yyval;
-+#if YYLSP_NEEDED
-+ *++yylsp = yyloc;
-+#endif
-+
-+ /* Now `shift' the result of the reduction. Determine what state
-+ that goes to, based on the state we popped back to and the rule
-+ number reduced by. */
-+
-+ yyn = yyr1[yyn];
-+
-+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
-+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-+ yystate = yytable[yystate];
-+ else
-+ yystate = yydefgoto[yyn - YYNTBASE];
-+
-+ goto yynewstate;
-+
-+
-+/*------------------------------------.
-+| yyerrlab -- here on detecting error |
-+`------------------------------------*/
-+yyerrlab:
-+ /* If not already recovering from an error, report this error. */
-+ if (!yyerrstatus)
-+ {
-+ ++yynerrs;
-+
-+#ifdef YYERROR_VERBOSE
-+ yyn = yypact[yystate];
-+
-+ if (yyn > YYFLAG && yyn < YYLAST)
-+ {
-+ YYSIZE_T yysize = 0;
-+ char *yymsg;
-+ int yyx, yycount;
-+
-+ yycount = 0;
-+ /* Start YYX at -YYN if negative to avoid negative indexes in
-+ YYCHECK. */
-+ for (yyx = yyn < 0 ? -yyn : 0;
-+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
-+ if (yycheck[yyx + yyn] == yyx)
-+ yysize += yystrlen (yytname[yyx]) + 15, yycount++;
-+ yysize += yystrlen ("parse error, unexpected ") + 1;
-+ yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
-+ yymsg = (char *) YYSTACK_ALLOC (yysize);
-+ if (yymsg != 0)
-+ {
-+ char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
-+ yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
-+
-+ if (yycount < 5)
-+ {
-+ yycount = 0;
-+ for (yyx = yyn < 0 ? -yyn : 0;
-+ yyx < (int) (sizeof (yytname) / sizeof (char *));
-+ yyx++)
-+ if (yycheck[yyx + yyn] == yyx)
-+ {
-+ const char *yyq = ! yycount ? ", expecting " : " or ";
-+ yyp = yystpcpy (yyp, yyq);
-+ yyp = yystpcpy (yyp, yytname[yyx]);
-+ yycount++;
-+ }
-+ }
-+ yyerror (yymsg);
-+ YYSTACK_FREE (yymsg);
-+ }
-+ else
-+ yyerror ("parse error; also virtual memory exhausted");
-+ }
-+ else
-+#endif /* defined (YYERROR_VERBOSE) */
-+ yyerror ("parse error");
-+ }
-+ goto yyerrlab1;
-+
-+
-+/*--------------------------------------------------.
-+| yyerrlab1 -- error raised explicitly by an action |
-+`--------------------------------------------------*/
-+yyerrlab1:
-+ if (yyerrstatus == 3)
-+ {
-+ /* If just tried and failed to reuse lookahead token after an
-+ error, discard it. */
-+
-+ /* return failure if at end of input */
-+ if (yychar == YYEOF)
-+ YYABORT;
-+ YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
-+ yychar, yytname[yychar1]));
-+ yychar = YYEMPTY;
-+ }
-+
-+ /* Else will try to reuse lookahead token after shifting the error
-+ token. */
-+
-+ yyerrstatus = 3; /* Each real token shifted decrements this */
-+
-+ goto yyerrhandle;
-+
-+
-+/*-------------------------------------------------------------------.
-+| yyerrdefault -- current state does not do anything special for the |
-+| error token. |
-+`-------------------------------------------------------------------*/
-+yyerrdefault:
-+#if 0
-+ /* This is wrong; only states that explicitly want error tokens
-+ should shift them. */
-+
-+ /* If its default is to accept any token, ok. Otherwise pop it. */
-+ yyn = yydefact[yystate];
-+ if (yyn)
-+ goto yydefault;
-+#endif
-+
-+
-+/*---------------------------------------------------------------.
-+| yyerrpop -- pop the current state because it cannot handle the |
-+| error token |
-+`---------------------------------------------------------------*/
-+yyerrpop:
-+ if (yyssp == yyss)
-+ YYABORT;
-+ yyvsp--;
-+ yystate = *--yyssp;
-+#if YYLSP_NEEDED
-+ yylsp--;
-+#endif
-+
-+#if YYDEBUG
-+ if (yydebug)
-+ {
-+ short *yyssp1 = yyss - 1;
-+ YYFPRINTF (stderr, "Error: state stack now");
-+ while (yyssp1 != yyssp)
-+ YYFPRINTF (stderr, " %d", *++yyssp1);
-+ YYFPRINTF (stderr, "\n");
-+ }
-+#endif
-+
-+/*--------------.
-+| yyerrhandle. |
-+`--------------*/
-+yyerrhandle:
-+ yyn = yypact[yystate];
-+ if (yyn == YYFLAG)
-+ goto yyerrdefault;
-+
-+ yyn += YYTERROR;
-+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
-+ goto yyerrdefault;
-+
-+ yyn = yytable[yyn];
-+ if (yyn < 0)
-+ {
-+ if (yyn == YYFLAG)
-+ goto yyerrpop;
-+ yyn = -yyn;
-+ goto yyreduce;
-+ }
-+ else if (yyn == 0)
-+ goto yyerrpop;
-+
-+ if (yyn == YYFINAL)
-+ YYACCEPT;
-+
-+ YYDPRINTF ((stderr, "Shifting error token, "));
-+
-+ *++yyvsp = yylval;
-+#if YYLSP_NEEDED
-+ *++yylsp = yylloc;
-+#endif
-+
-+ yystate = yyn;
-+ goto yynewstate;
-+
-+
-+/*-------------------------------------.
-+| yyacceptlab -- YYACCEPT comes here. |
-+`-------------------------------------*/
-+yyacceptlab:
-+ yyresult = 0;
-+ goto yyreturn;
-+
-+/*-----------------------------------.
-+| yyabortlab -- YYABORT comes here. |
-+`-----------------------------------*/
-+yyabortlab:
-+ yyresult = 1;
-+ goto yyreturn;
-+
-+/*---------------------------------------------.
-+| yyoverflowab -- parser overflow comes here. |
-+`---------------------------------------------*/
-+yyoverflowlab:
-+ yyerror ("parser stack overflow");
-+ yyresult = 2;
-+ /* Fall through. */
-+
-+yyreturn:
-+#ifndef yyoverflow
-+ if (yyss != yyssa)
-+ YYSTACK_FREE (yyss);
-+#endif
-+ return yyresult;
-+}
-+#line 205 "plural.y"
-+
-+
-+void
-+internal_function
-+FREE_EXPRESSION (struct expression *exp)
-+{
-+ if (exp == NULL)
-+ return;
-+
-+ /* Handle the recursive case. */
-+ switch (exp->nargs)
-+ {
-+ case 3:
-+ FREE_EXPRESSION (exp->val.args[2]);
-+ /* FALLTHROUGH */
-+ case 2:
-+ FREE_EXPRESSION (exp->val.args[1]);
-+ /* FALLTHROUGH */
-+ case 1:
-+ FREE_EXPRESSION (exp->val.args[0]);
-+ /* FALLTHROUGH */
-+ default:
-+ break;
-+ }
-+
-+ free (exp);
-+}
-+
-+
-+static int
-+yylex (YYSTYPE *lval, const char **pexp)
-+{
-+ const char *exp = *pexp;
-+ int result;
-+
-+ while (1)
-+ {
-+ if (exp[0] == '\0')
-+ {
-+ *pexp = exp;
-+ return YYEOF;
-+ }
-+
-+ if (exp[0] != ' ' && exp[0] != '\t')
-+ break;
-+
-+ ++exp;
-+ }
-+
-+ result = *exp++;
-+ switch (result)
-+ {
-+ case '0': case '1': case '2': case '3': case '4':
-+ case '5': case '6': case '7': case '8': case '9':
-+ {
-+ unsigned long int n = result - '0';
-+ while (exp[0] >= '0' && exp[0] <= '9')
-+ {
-+ n *= 10;
-+ n += exp[0] - '0';
-+ ++exp;
-+ }
-+ lval->num = n;
-+ result = NUMBER;
-+ }
-+ break;
-+
-+ case '=':
-+ if (exp[0] == '=')
-+ {
-+ ++exp;
-+ lval->op = equal;
-+ result = EQUOP2;
-+ }
-+ else
-+ result = YYERRCODE;
-+ break;
-+
-+ case '!':
-+ if (exp[0] == '=')
-+ {
-+ ++exp;
-+ lval->op = not_equal;
-+ result = EQUOP2;
-+ }
-+ break;
-+
-+ case '&':
-+ case '|':
-+ if (exp[0] == result)
-+ ++exp;
-+ else
-+ result = YYERRCODE;
-+ break;
-+
-+ case '<':
-+ if (exp[0] == '=')
-+ {
-+ ++exp;
-+ lval->op = less_or_equal;
-+ }
-+ else
-+ lval->op = less_than;
-+ result = CMPOP2;
-+ break;
-+
-+ case '>':
-+ if (exp[0] == '=')
-+ {
-+ ++exp;
-+ lval->op = greater_or_equal;
-+ }
-+ else
-+ lval->op = greater_than;
-+ result = CMPOP2;
-+ break;
-+
-+ case '*':
-+ lval->op = mult;
-+ result = MULOP2;
-+ break;
-+
-+ case '/':
-+ lval->op = divide;
-+ result = MULOP2;
-+ break;
-+
-+ case '%':
-+ lval->op = module;
-+ result = MULOP2;
-+ break;
-+
-+ case '+':
-+ lval->op = plus;
-+ result = ADDOP2;
-+ break;
-+
-+ case '-':
-+ lval->op = minus;
-+ result = ADDOP2;
-+ break;
-+
-+ case 'n':
-+ case '?':
-+ case ':':
-+ case '(':
-+ case ')':
-+ /* Nothing, just return the character. */
-+ break;
-+
-+ case ';':
-+ case '\n':
-+ case '\0':
-+ /* Be safe and let the user call this function again. */
-+ --exp;
-+ result = YYEOF;
-+ break;
-+
-+ default:
-+ result = YYERRCODE;
-+#if YYDEBUG != 0
-+ --exp;
-+#endif
-+ break;
-+ }
-+
-+ *pexp = exp;
-+
-+ return result;
-+}
-+
-+
-+static void
-+yyerror (const char *str)
-+{
-+ /* Do nothing. We don't print error messages here. */
-+}
---- lrzsz-0.12.20.safe/intl/plural-exp.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/plural-exp.c 2004-09-12 14:40:34.578714192 -0400
-@@ -0,0 +1,154 @@
-+/* Expression parsing for plural form selection.
-+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
-+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <ctype.h>
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#include "plural-exp.h"
-+
-+#if (defined __GNUC__ && !defined __APPLE_CC__) \
-+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
-+
-+/* These structs are the constant expression for the germanic plural
-+ form determination. It represents the expression "n != 1". */
-+static const struct expression plvar =
-+{
-+ .nargs = 0,
-+ .operation = var,
-+};
-+static const struct expression plone =
-+{
-+ .nargs = 0,
-+ .operation = num,
-+ .val =
-+ {
-+ .num = 1
-+ }
-+};
-+struct expression GERMANIC_PLURAL =
-+{
-+ .nargs = 2,
-+ .operation = not_equal,
-+ .val =
-+ {
-+ .args =
-+ {
-+ [0] = (struct expression *) &plvar,
-+ [1] = (struct expression *) &plone
-+ }
-+ }
-+};
-+
-+# define INIT_GERMANIC_PLURAL()
-+
-+#else
-+
-+/* For compilers without support for ISO C 99 struct/union initializers:
-+ Initialization at run-time. */
-+
-+static struct expression plvar;
-+static struct expression plone;
-+struct expression GERMANIC_PLURAL;
-+
-+static void
-+init_germanic_plural ()
-+{
-+ if (plone.val.num == 0)
-+ {
-+ plvar.nargs = 0;
-+ plvar.operation = var;
-+
-+ plone.nargs = 0;
-+ plone.operation = num;
-+ plone.val.num = 1;
-+
-+ GERMANIC_PLURAL.nargs = 2;
-+ GERMANIC_PLURAL.operation = not_equal;
-+ GERMANIC_PLURAL.val.args[0] = &plvar;
-+ GERMANIC_PLURAL.val.args[1] = &plone;
-+ }
-+}
-+
-+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
-+
-+#endif
-+
-+void
-+internal_function
-+EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp,
-+ unsigned long int *npluralsp)
-+{
-+ if (nullentry != NULL)
-+ {
-+ const char *plural;
-+ const char *nplurals;
-+
-+ plural = strstr (nullentry, "plural=");
-+ nplurals = strstr (nullentry, "nplurals=");
-+ if (plural == NULL || nplurals == NULL)
-+ goto no_plural;
-+ else
-+ {
-+ char *endp;
-+ unsigned long int n;
-+ struct parse_args args;
-+
-+ /* First get the number. */
-+ nplurals += 9;
-+ while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
-+ ++nplurals;
-+ if (!(*nplurals >= '0' && *nplurals <= '9'))
-+ goto no_plural;
-+#if defined HAVE_STRTOUL || defined _LIBC
-+ n = strtoul (nplurals, &endp, 10);
-+#else
-+ for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
-+ n = n * 10 + (*endp - '0');
-+#endif
-+ if (nplurals == endp)
-+ goto no_plural;
-+ *npluralsp = n;
-+
-+ /* Due to the restrictions bison imposes onto the interface of the
-+ scanner function we have to put the input string and the result
-+ passed up from the parser into the same structure which address
-+ is passed down to the parser. */
-+ plural += 7;
-+ args.cp = plural;
-+ if (PLURAL_PARSE (&args) != 0)
-+ goto no_plural;
-+ *pluralp = args.res;
-+ }
-+ }
-+ else
-+ {
-+ /* By default we are using the Germanic form: singular form only
-+ for `one', the plural form otherwise. Yes, this is also what
-+ English is using since English is a Germanic language. */
-+ no_plural:
-+ INIT_GERMANIC_PLURAL ();
-+ *pluralp = &GERMANIC_PLURAL;
-+ *npluralsp = 2;
-+ }
-+}
---- lrzsz-0.12.20.safe/intl/plural-exp.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/plural-exp.h 2004-09-12 14:40:34.584713280 -0400
-@@ -0,0 +1,118 @@
-+/* Expression parsing and evaluation for plural form selection.
-+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
-+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _PLURAL_EXP_H
-+#define _PLURAL_EXP_H
-+
-+#ifndef internal_function
-+# define internal_function
-+#endif
-+
-+#ifndef attribute_hidden
-+# define attribute_hidden
-+#endif
-+
-+
-+/* This is the representation of the expressions to determine the
-+ plural form. */
-+struct expression
-+{
-+ int nargs; /* Number of arguments. */
-+ enum operator
-+ {
-+ /* Without arguments: */
-+ var, /* The variable "n". */
-+ num, /* Decimal number. */
-+ /* Unary operators: */
-+ lnot, /* Logical NOT. */
-+ /* Binary operators: */
-+ mult, /* Multiplication. */
-+ divide, /* Division. */
-+ module, /* Modulo operation. */
-+ plus, /* Addition. */
-+ minus, /* Subtraction. */
-+ less_than, /* Comparison. */
-+ greater_than, /* Comparison. */
-+ less_or_equal, /* Comparison. */
-+ greater_or_equal, /* Comparison. */
-+ equal, /* Comparison for equality. */
-+ not_equal, /* Comparison for inequality. */
-+ land, /* Logical AND. */
-+ lor, /* Logical OR. */
-+ /* Ternary operators: */
-+ qmop /* Question mark operator. */
-+ } operation;
-+ union
-+ {
-+ unsigned long int num; /* Number value for `num'. */
-+ struct expression *args[3]; /* Up to three arguments. */
-+ } val;
-+};
-+
-+/* This is the data structure to pass information to the parser and get
-+ the result in a thread-safe way. */
-+struct parse_args
-+{
-+ const char *cp;
-+ struct expression *res;
-+};
-+
-+
-+/* Names for the libintl functions are a problem. This source code is used
-+ 1. in the GNU C Library library,
-+ 2. in the GNU libintl library,
-+ 3. in the GNU gettext tools.
-+ The function names in each situation must be different, to allow for
-+ binary incompatible changes in 'struct expression'. Furthermore,
-+ 1. in the GNU C Library library, the names have a __ prefix,
-+ 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
-+ must follow ANSI C and not start with __.
-+ So we have to distinguish the three cases. */
-+#ifdef _LIBC
-+# define FREE_EXPRESSION __gettext_free_exp
-+# define PLURAL_PARSE __gettextparse
-+# define GERMANIC_PLURAL __gettext_germanic_plural
-+# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
-+#elif defined (IN_LIBINTL)
-+# define FREE_EXPRESSION libintl_gettext_free_exp
-+# define PLURAL_PARSE libintl_gettextparse
-+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
-+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
-+#else
-+# define FREE_EXPRESSION free_plural_expression
-+# define PLURAL_PARSE parse_plural_expression
-+# define GERMANIC_PLURAL germanic_plural
-+# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
-+#endif
-+
-+extern void FREE_EXPRESSION (struct expression *exp)
-+ internal_function;
-+extern int PLURAL_PARSE (void *arg);
-+extern struct expression GERMANIC_PLURAL attribute_hidden;
-+extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
-+ struct expression **pluralp,
-+ unsigned long int *npluralsp)
-+ internal_function;
-+
-+#if !defined (_LIBC) && !defined (IN_LIBINTL)
-+extern unsigned long int plural_eval (struct expression *pexp,
-+ unsigned long int n);
-+#endif
-+
-+#endif /* _PLURAL_EXP_H */
---- lrzsz-0.12.20.safe/intl/plural.y 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/plural.y 2004-09-12 14:40:34.589712520 -0400
-@@ -0,0 +1,381 @@
-+%{
-+/* Expression parsing for plural form selection.
-+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
-+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* The bison generated parser uses alloca. AIX 3 forces us to put this
-+ declaration at the beginning of the file. The declaration in bison's
-+ skeleton file comes too late. This must come before <config.h>
-+ because <config.h> may include arbitrary system headers. */
-+#if defined _AIX && !defined __GNUC__
-+ #pragma alloca
-+#endif
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <stddef.h>
-+#include <stdlib.h>
-+#include "plural-exp.h"
-+
-+/* The main function generated by the parser is called __gettextparse,
-+ but we want it to be called PLURAL_PARSE. */
-+#ifndef _LIBC
-+# define __gettextparse PLURAL_PARSE
-+#endif
-+
-+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
-+#define YYPARSE_PARAM arg
-+%}
-+%pure_parser
-+%expect 7
-+
-+%union {
-+ unsigned long int num;
-+ enum operator op;
-+ struct expression *exp;
-+}
-+
-+%{
-+/* Prototypes for local functions. */
-+static int yylex (YYSTYPE *lval, const char **pexp);
-+static void yyerror (const char *str);
-+
-+/* Allocation of expressions. */
-+
-+static struct expression *
-+new_exp (int nargs, enum operator op, struct expression * const *args)
-+{
-+ int i;
-+ struct expression *newp;
-+
-+ /* If any of the argument could not be malloc'ed, just return NULL. */
-+ for (i = nargs - 1; i >= 0; i--)
-+ if (args[i] == NULL)
-+ goto fail;
-+
-+ /* Allocate a new expression. */
-+ newp = (struct expression *) malloc (sizeof (*newp));
-+ if (newp != NULL)
-+ {
-+ newp->nargs = nargs;
-+ newp->operation = op;
-+ for (i = nargs - 1; i >= 0; i--)
-+ newp->val.args[i] = args[i];
-+ return newp;
-+ }
-+
-+ fail:
-+ for (i = nargs - 1; i >= 0; i--)
-+ FREE_EXPRESSION (args[i]);
-+
-+ return NULL;
-+}
-+
-+static inline struct expression *
-+new_exp_0 (enum operator op)
-+{
-+ return new_exp (0, op, NULL);
-+}
-+
-+static inline struct expression *
-+new_exp_1 (enum operator op, struct expression *right)
-+{
-+ struct expression *args[1];
-+
-+ args[0] = right;
-+ return new_exp (1, op, args);
-+}
-+
-+static struct expression *
-+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
-+{
-+ struct expression *args[2];
-+
-+ args[0] = left;
-+ args[1] = right;
-+ return new_exp (2, op, args);
-+}
-+
-+static inline struct expression *
-+new_exp_3 (enum operator op, struct expression *bexp,
-+ struct expression *tbranch, struct expression *fbranch)
-+{
-+ struct expression *args[3];
-+
-+ args[0] = bexp;
-+ args[1] = tbranch;
-+ args[2] = fbranch;
-+ return new_exp (3, op, args);
-+}
-+
-+%}
-+
-+/* This declares that all operators have the same associativity and the
-+ precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
-+ There is no unary minus and no bitwise operators.
-+ Operators with the same syntactic behaviour have been merged into a single
-+ token, to save space in the array generated by bison. */
-+%right '?' /* ? */
-+%left '|' /* || */
-+%left '&' /* && */
-+%left EQUOP2 /* == != */
-+%left CMPOP2 /* < > <= >= */
-+%left ADDOP2 /* + - */
-+%left MULOP2 /* * / % */
-+%right '!' /* ! */
-+
-+%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
-+%token <num> NUMBER
-+%type <exp> exp
-+
-+%%
-+
-+start: exp
-+ {
-+ if ($1 == NULL)
-+ YYABORT;
-+ ((struct parse_args *) arg)->res = $1;
-+ }
-+ ;
-+
-+exp: exp '?' exp ':' exp
-+ {
-+ $$ = new_exp_3 (qmop, $1, $3, $5);
-+ }
-+ | exp '|' exp
-+ {
-+ $$ = new_exp_2 (lor, $1, $3);
-+ }
-+ | exp '&' exp
-+ {
-+ $$ = new_exp_2 (land, $1, $3);
-+ }
-+ | exp EQUOP2 exp
-+ {
-+ $$ = new_exp_2 ($2, $1, $3);
-+ }
-+ | exp CMPOP2 exp
-+ {
-+ $$ = new_exp_2 ($2, $1, $3);
-+ }
-+ | exp ADDOP2 exp
-+ {
-+ $$ = new_exp_2 ($2, $1, $3);
-+ }
-+ | exp MULOP2 exp
-+ {
-+ $$ = new_exp_2 ($2, $1, $3);
-+ }
-+ | '!' exp
-+ {
-+ $$ = new_exp_1 (lnot, $2);
-+ }
-+ | 'n'
-+ {
-+ $$ = new_exp_0 (var);
-+ }
-+ | NUMBER
-+ {
-+ if (($$ = new_exp_0 (num)) != NULL)
-+ $$->val.num = $1;
-+ }
-+ | '(' exp ')'
-+ {
-+ $$ = $2;
-+ }
-+ ;
-+
-+%%
-+
-+void
-+internal_function
-+FREE_EXPRESSION (struct expression *exp)
-+{
-+ if (exp == NULL)
-+ return;
-+
-+ /* Handle the recursive case. */
-+ switch (exp->nargs)
-+ {
-+ case 3:
-+ FREE_EXPRESSION (exp->val.args[2]);
-+ /* FALLTHROUGH */
-+ case 2:
-+ FREE_EXPRESSION (exp->val.args[1]);
-+ /* FALLTHROUGH */
-+ case 1:
-+ FREE_EXPRESSION (exp->val.args[0]);
-+ /* FALLTHROUGH */
-+ default:
-+ break;
-+ }
-+
-+ free (exp);
-+}
-+
-+
-+static int
-+yylex (YYSTYPE *lval, const char **pexp)
-+{
-+ const char *exp = *pexp;
-+ int result;
-+
-+ while (1)
-+ {
-+ if (exp[0] == '\0')
-+ {
-+ *pexp = exp;
-+ return YYEOF;
-+ }
-+
-+ if (exp[0] != ' ' && exp[0] != '\t')
-+ break;
-+
-+ ++exp;
-+ }
-+
-+ result = *exp++;
-+ switch (result)
-+ {
-+ case '0': case '1': case '2': case '3': case '4':
-+ case '5': case '6': case '7': case '8': case '9':
-+ {
-+ unsigned long int n = result - '0';
-+ while (exp[0] >= '0' && exp[0] <= '9')
-+ {
-+ n *= 10;
-+ n += exp[0] - '0';
-+ ++exp;
-+ }
-+ lval->num = n;
-+ result = NUMBER;
-+ }
-+ break;
-+
-+ case '=':
-+ if (exp[0] == '=')
-+ {
-+ ++exp;
-+ lval->op = equal;
-+ result = EQUOP2;
-+ }
-+ else
-+ result = YYERRCODE;
-+ break;
-+
-+ case '!':
-+ if (exp[0] == '=')
-+ {
-+ ++exp;
-+ lval->op = not_equal;
-+ result = EQUOP2;
-+ }
-+ break;
-+
-+ case '&':
-+ case '|':
-+ if (exp[0] == result)
-+ ++exp;
-+ else
-+ result = YYERRCODE;
-+ break;
-+
-+ case '<':
-+ if (exp[0] == '=')
-+ {
-+ ++exp;
-+ lval->op = less_or_equal;
-+ }
-+ else
-+ lval->op = less_than;
-+ result = CMPOP2;
-+ break;
-+
-+ case '>':
-+ if (exp[0] == '=')
-+ {
-+ ++exp;
-+ lval->op = greater_or_equal;
-+ }
-+ else
-+ lval->op = greater_than;
-+ result = CMPOP2;
-+ break;
-+
-+ case '*':
-+ lval->op = mult;
-+ result = MULOP2;
-+ break;
-+
-+ case '/':
-+ lval->op = divide;
-+ result = MULOP2;
-+ break;
-+
-+ case '%':
-+ lval->op = module;
-+ result = MULOP2;
-+ break;
-+
-+ case '+':
-+ lval->op = plus;
-+ result = ADDOP2;
-+ break;
-+
-+ case '-':
-+ lval->op = minus;
-+ result = ADDOP2;
-+ break;
-+
-+ case 'n':
-+ case '?':
-+ case ':':
-+ case '(':
-+ case ')':
-+ /* Nothing, just return the character. */
-+ break;
-+
-+ case ';':
-+ case '\n':
-+ case '\0':
-+ /* Be safe and let the user call this function again. */
-+ --exp;
-+ result = YYEOF;
-+ break;
-+
-+ default:
-+ result = YYERRCODE;
-+#if YYDEBUG != 0
-+ --exp;
-+#endif
-+ break;
-+ }
-+
-+ *pexp = exp;
-+
-+ return result;
-+}
-+
-+
-+static void
-+yyerror (const char *str)
-+{
-+ /* Do nothing. We don't print error messages here. */
-+}
---- lrzsz-0.12.20.safe/intl/po2tbl.sed.in 1998-04-26 09:20:52.000000000 -0400
-+++ lrzsz-0.12.20/intl/po2tbl.sed.in 1969-12-31 19:00:00.000000000 -0500
-@@ -1,102 +0,0 @@
--# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
--# Copyright (C) 1995 Free Software Foundation, Inc.
--# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
--#
--# This program is free software; you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation; either version 2, or (at your option)
--# any later version.
--#
--# This program is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--# GNU General Public License for more details.
--#
--# You should have received a copy of the GNU General Public License
--# along with this program; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--#
--1 {
-- i\
--/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
--\
--#if HAVE_CONFIG_H\
--# include <config.h>\
--#endif\
--\
--#include "libgettext.h"\
--\
--const struct _msg_ent _msg_tbl[] = {
-- h
-- s/.*/0/
-- x
--}
--#
--# Write msgid entries in C array form.
--#
--/^msgid/ {
-- s/msgid[ ]*\(".*"\)/ {\1/
-- tb
--# Append the next line
-- :b
-- N
--# Look whether second part is continuation line.
-- s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
--# Yes, then branch.
-- ta
--# Because we assume that the input file correctly formed the line
--# just read cannot be again be a msgid line. So it's safe to ignore
--# it.
-- s/\(.*\)\n.*/\1/
-- bc
--# We found a continuation line. But before printing insert '\'.
-- :a
-- s/\(.*\)\(\n.*\)/\1\\\2/
-- P
--# We cannot use D here.
-- s/.*\n\(.*\)/\1/
--# Some buggy seds do not clear the `successful substitution since last ``t'''
--# flag on `N', so we do a `t' here to clear it.
-- tb
--# Not reached
-- :c
-- x
--# The following nice solution is by
--# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
-- td
--# Increment a decimal number in pattern space.
--# First hide trailing `9' digits.
-- :d
-- s/9\(_*\)$/_\1/
-- td
--# Assure at least one digit is available.
-- s/^\(_*\)$/0\1/
--# Increment the last digit.
-- s/8\(_*\)$/9\1/
-- s/7\(_*\)$/8\1/
-- s/6\(_*\)$/7\1/
-- s/5\(_*\)$/6\1/
-- s/4\(_*\)$/5\1/
-- s/3\(_*\)$/4\1/
-- s/2\(_*\)$/3\1/
-- s/1\(_*\)$/2\1/
-- s/0\(_*\)$/1\1/
--# Convert the hidden `9' digits to `0's.
-- s/_/0/g
-- x
-- G
-- s/\(.*\)\n\([0-9]*\)/\1, \2},/
-- s/\(.*\)"$/\1/
-- p
--}
--#
--# Last line.
--#
--$ {
-- i\
--};\
--
-- g
-- s/0*\(.*\)/int _msg_tbl_length = \1;/p
--}
--d
---- lrzsz-0.12.20.safe/intl/printf-args.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/printf-args.c 2004-09-12 14:40:34.595711608 -0400
-@@ -0,0 +1,119 @@
-+/* Decomposed printf argument list.
-+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+/* Specification. */
-+#include "printf-args.h"
-+
-+#ifdef STATIC
-+STATIC
-+#endif
-+int
-+printf_fetchargs (va_list args, arguments *a)
-+{
-+ size_t i;
-+ argument *ap;
-+
-+ for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
-+ switch (ap->type)
-+ {
-+ case TYPE_SCHAR:
-+ ap->a.a_schar = va_arg (args, /*signed char*/ int);
-+ break;
-+ case TYPE_UCHAR:
-+ ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
-+ break;
-+ case TYPE_SHORT:
-+ ap->a.a_short = va_arg (args, /*short*/ int);
-+ break;
-+ case TYPE_USHORT:
-+ ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
-+ break;
-+ case TYPE_INT:
-+ ap->a.a_int = va_arg (args, int);
-+ break;
-+ case TYPE_UINT:
-+ ap->a.a_uint = va_arg (args, unsigned int);
-+ break;
-+ case TYPE_LONGINT:
-+ ap->a.a_longint = va_arg (args, long int);
-+ break;
-+ case TYPE_ULONGINT:
-+ ap->a.a_ulongint = va_arg (args, unsigned long int);
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ case TYPE_LONGLONGINT:
-+ ap->a.a_longlongint = va_arg (args, long long int);
-+ break;
-+ case TYPE_ULONGLONGINT:
-+ ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
-+ break;
-+#endif
-+ case TYPE_DOUBLE:
-+ ap->a.a_double = va_arg (args, double);
-+ break;
-+#ifdef HAVE_LONG_DOUBLE
-+ case TYPE_LONGDOUBLE:
-+ ap->a.a_longdouble = va_arg (args, long double);
-+ break;
-+#endif
-+ case TYPE_CHAR:
-+ ap->a.a_char = va_arg (args, int);
-+ break;
-+#ifdef HAVE_WINT_T
-+ case TYPE_WIDE_CHAR:
-+ ap->a.a_wide_char = va_arg (args, wint_t);
-+ break;
-+#endif
-+ case TYPE_STRING:
-+ ap->a.a_string = va_arg (args, const char *);
-+ break;
-+#ifdef HAVE_WCHAR_T
-+ case TYPE_WIDE_STRING:
-+ ap->a.a_wide_string = va_arg (args, const wchar_t *);
-+ break;
-+#endif
-+ case TYPE_POINTER:
-+ ap->a.a_pointer = va_arg (args, void *);
-+ break;
-+ case TYPE_COUNT_SCHAR_POINTER:
-+ ap->a.a_count_schar_pointer = va_arg (args, signed char *);
-+ break;
-+ case TYPE_COUNT_SHORT_POINTER:
-+ ap->a.a_count_short_pointer = va_arg (args, short *);
-+ break;
-+ case TYPE_COUNT_INT_POINTER:
-+ ap->a.a_count_int_pointer = va_arg (args, int *);
-+ break;
-+ case TYPE_COUNT_LONGINT_POINTER:
-+ ap->a.a_count_longint_pointer = va_arg (args, long int *);
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ case TYPE_COUNT_LONGLONGINT_POINTER:
-+ ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
-+ break;
-+#endif
-+ default:
-+ /* Unknown type. */
-+ return -1;
-+ }
-+ return 0;
-+}
---- lrzsz-0.12.20.safe/intl/printf-args.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/printf-args.h 2004-09-12 14:40:34.601710696 -0400
-@@ -0,0 +1,137 @@
-+/* Decomposed printf argument list.
-+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _PRINTF_ARGS_H
-+#define _PRINTF_ARGS_H
-+
-+/* Get size_t. */
-+#include <stddef.h>
-+
-+/* Get wchar_t. */
-+#ifdef HAVE_WCHAR_T
-+# include <stddef.h>
-+#endif
-+
-+/* Get wint_t. */
-+#ifdef HAVE_WINT_T
-+# include <wchar.h>
-+#endif
-+
-+/* Get va_list. */
-+#include <stdarg.h>
-+
-+
-+/* Argument types */
-+typedef enum
-+{
-+ TYPE_NONE,
-+ TYPE_SCHAR,
-+ TYPE_UCHAR,
-+ TYPE_SHORT,
-+ TYPE_USHORT,
-+ TYPE_INT,
-+ TYPE_UINT,
-+ TYPE_LONGINT,
-+ TYPE_ULONGINT,
-+#ifdef HAVE_LONG_LONG
-+ TYPE_LONGLONGINT,
-+ TYPE_ULONGLONGINT,
-+#endif
-+ TYPE_DOUBLE,
-+#ifdef HAVE_LONG_DOUBLE
-+ TYPE_LONGDOUBLE,
-+#endif
-+ TYPE_CHAR,
-+#ifdef HAVE_WINT_T
-+ TYPE_WIDE_CHAR,
-+#endif
-+ TYPE_STRING,
-+#ifdef HAVE_WCHAR_T
-+ TYPE_WIDE_STRING,
-+#endif
-+ TYPE_POINTER,
-+ TYPE_COUNT_SCHAR_POINTER,
-+ TYPE_COUNT_SHORT_POINTER,
-+ TYPE_COUNT_INT_POINTER,
-+ TYPE_COUNT_LONGINT_POINTER
-+#ifdef HAVE_LONG_LONG
-+, TYPE_COUNT_LONGLONGINT_POINTER
-+#endif
-+} arg_type;
-+
-+/* Polymorphic argument */
-+typedef struct
-+{
-+ arg_type type;
-+ union
-+ {
-+ signed char a_schar;
-+ unsigned char a_uchar;
-+ short a_short;
-+ unsigned short a_ushort;
-+ int a_int;
-+ unsigned int a_uint;
-+ long int a_longint;
-+ unsigned long int a_ulongint;
-+#ifdef HAVE_LONG_LONG
-+ long long int a_longlongint;
-+ unsigned long long int a_ulonglongint;
-+#endif
-+ float a_float;
-+ double a_double;
-+#ifdef HAVE_LONG_DOUBLE
-+ long double a_longdouble;
-+#endif
-+ int a_char;
-+#ifdef HAVE_WINT_T
-+ wint_t a_wide_char;
-+#endif
-+ const char* a_string;
-+#ifdef HAVE_WCHAR_T
-+ const wchar_t* a_wide_string;
-+#endif
-+ void* a_pointer;
-+ signed char * a_count_schar_pointer;
-+ short * a_count_short_pointer;
-+ int * a_count_int_pointer;
-+ long int * a_count_longint_pointer;
-+#ifdef HAVE_LONG_LONG
-+ long long int * a_count_longlongint_pointer;
-+#endif
-+ }
-+ a;
-+}
-+argument;
-+
-+typedef struct
-+{
-+ size_t count;
-+ argument *arg;
-+}
-+arguments;
-+
-+
-+/* Fetch the arguments, putting them into a. */
-+#ifdef STATIC
-+STATIC
-+#else
-+extern
-+#endif
-+int printf_fetchargs (va_list args, arguments *a);
-+
-+#endif /* _PRINTF_ARGS_H */
---- lrzsz-0.12.20.safe/intl/printf.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/printf.c 2004-09-12 14:40:34.607709784 -0400
-@@ -0,0 +1,371 @@
-+/* Formatted output to strings, using POSIX/XSI format strings with positions.
-+ Copyright (C) 2003 Free Software Foundation, Inc.
-+ Written by Bruno Haible <bruno@clisp.org>, 2003.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#ifdef __GNUC__
-+# define alloca __builtin_alloca
-+# define HAVE_ALLOCA 1
-+#else
-+# ifdef _MSC_VER
-+# include <malloc.h>
-+# define alloca _alloca
-+# else
-+# if defined HAVE_ALLOCA_H || defined _LIBC
-+# include <alloca.h>
-+# else
-+# ifdef _AIX
-+ #pragma alloca
-+# else
-+# ifndef alloca
-+char *alloca ();
-+# endif
-+# endif
-+# endif
-+# endif
-+#endif
-+
-+#include <stdio.h>
-+
-+#if !HAVE_POSIX_PRINTF
-+
-+#include <stdlib.h>
-+#include <string.h>
-+
-+/* When building a DLL, we must export some functions. Note that because
-+ the functions are only defined for binary backward compatibility, we
-+ don't need to use __declspec(dllimport) in any case. */
-+#if defined _MSC_VER && BUILDING_DLL
-+# define DLL_EXPORTED __declspec(dllexport)
-+#else
-+# define DLL_EXPORTED
-+#endif
-+
-+#define STATIC static
-+
-+/* Define auxiliary functions declared in "printf-args.h". */
-+#include "printf-args.c"
-+
-+/* Define auxiliary functions declared in "printf-parse.h". */
-+#include "printf-parse.c"
-+
-+/* Define functions declared in "vasnprintf.h". */
-+#define vasnprintf libintl_vasnprintf
-+#include "vasnprintf.c"
-+#if 0 /* not needed */
-+#define asnprintf libintl_asnprintf
-+#include "asnprintf.c"
-+#endif
-+
-+DLL_EXPORTED
-+int
-+libintl_vfprintf (FILE *stream, const char *format, va_list args)
-+{
-+ if (strchr (format, '$') == NULL)
-+ return vfprintf (stream, format, args);
-+ else
-+ {
-+ size_t length;
-+ char *result = libintl_vasnprintf (NULL, &length, format, args);
-+ int retval = -1;
-+ if (result != NULL)
-+ {
-+ if (fwrite (result, 1, length, stream) == length)
-+ retval = length;
-+ free (result);
-+ }
-+ return retval;
-+ }
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_fprintf (FILE *stream, const char *format, ...)
-+{
-+ va_list args;
-+ int retval;
-+
-+ va_start (args, format);
-+ retval = libintl_vfprintf (stream, format, args);
-+ va_end (args);
-+ return retval;
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_vprintf (const char *format, va_list args)
-+{
-+ return libintl_vfprintf (stdout, format, args);
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_printf (const char *format, ...)
-+{
-+ va_list args;
-+ int retval;
-+
-+ va_start (args, format);
-+ retval = libintl_vprintf (format, args);
-+ va_end (args);
-+ return retval;
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_vsprintf (char *resultbuf, const char *format, va_list args)
-+{
-+ if (strchr (format, '$') == NULL)
-+ return vsprintf (resultbuf, format, args);
-+ else
-+ {
-+ size_t length = (size_t) ~0 / (4 * sizeof (char));
-+ char *result = libintl_vasnprintf (resultbuf, &length, format, args);
-+ if (result != resultbuf)
-+ {
-+ free (result);
-+ return -1;
-+ }
-+ else
-+ return length;
-+ }
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_sprintf (char *resultbuf, const char *format, ...)
-+{
-+ va_list args;
-+ int retval;
-+
-+ va_start (args, format);
-+ retval = libintl_vsprintf (resultbuf, format, args);
-+ va_end (args);
-+ return retval;
-+}
-+
-+#if HAVE_SNPRINTF
-+
-+# if HAVE_DECL__SNPRINTF
-+ /* Windows. */
-+# define system_vsnprintf _vsnprintf
-+# else
-+ /* Unix. */
-+# define system_vsnprintf vsnprintf
-+# endif
-+
-+DLL_EXPORTED
-+int
-+libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args)
-+{
-+ if (strchr (format, '$') == NULL)
-+ return system_vsnprintf (resultbuf, length, format, args);
-+ else
-+ {
-+ size_t maxlength = length;
-+ char *result = libintl_vasnprintf (resultbuf, &length, format, args);
-+ if (result != resultbuf)
-+ {
-+ if (maxlength > 0)
-+ {
-+ if (length < maxlength)
-+ abort ();
-+ memcpy (resultbuf, result, maxlength - 1);
-+ resultbuf[maxlength - 1] = '\0';
-+ }
-+ free (result);
-+ return -1;
-+ }
-+ else
-+ return length;
-+ }
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_snprintf (char *resultbuf, size_t length, const char *format, ...)
-+{
-+ va_list args;
-+ int retval;
-+
-+ va_start (args, format);
-+ retval = libintl_vsnprintf (resultbuf, length, format, args);
-+ va_end (args);
-+ return retval;
-+}
-+
-+#endif
-+
-+#if HAVE_ASPRINTF
-+
-+DLL_EXPORTED
-+int
-+libintl_vasprintf (char **resultp, const char *format, va_list args)
-+{
-+ size_t length;
-+ char *result = libintl_vasnprintf (NULL, &length, format, args);
-+ if (result == NULL)
-+ return -1;
-+ *resultp = result;
-+ return length;
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_asprintf (char **resultp, const char *format, ...)
-+{
-+ va_list args;
-+ int retval;
-+
-+ va_start (args, format);
-+ retval = libintl_vasprintf (resultp, format, args);
-+ va_end (args);
-+ return retval;
-+}
-+
-+#endif
-+
-+#if HAVE_FWPRINTF
-+
-+#include <wchar.h>
-+
-+#define WIDE_CHAR_VERSION 1
-+
-+/* Define auxiliary functions declared in "wprintf-parse.h". */
-+#include "printf-parse.c"
-+
-+/* Define functions declared in "vasnprintf.h". */
-+#define vasnwprintf libintl_vasnwprintf
-+#include "vasnprintf.c"
-+#if 0 /* not needed */
-+#define asnwprintf libintl_asnwprintf
-+#include "asnprintf.c"
-+#endif
-+
-+# if HAVE_DECL__SNWPRINTF
-+ /* Windows. */
-+# define system_vswprintf _vsnwprintf
-+# else
-+ /* Unix. */
-+# define system_vswprintf vswprintf
-+# endif
-+
-+DLL_EXPORTED
-+int
-+libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args)
-+{
-+ if (wcschr (format, '$') == NULL)
-+ return vfwprintf (stream, format, args);
-+ else
-+ {
-+ size_t length;
-+ wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args);
-+ int retval = -1;
-+ if (result != NULL)
-+ {
-+ size_t i;
-+ for (i = 0; i < length; i++)
-+ if (fputwc (result[i], stream) == WEOF)
-+ break;
-+ if (i == length)
-+ retval = length;
-+ free (result);
-+ }
-+ return retval;
-+ }
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_fwprintf (FILE *stream, const wchar_t *format, ...)
-+{
-+ va_list args;
-+ int retval;
-+
-+ va_start (args, format);
-+ retval = libintl_vfwprintf (stream, format, args);
-+ va_end (args);
-+ return retval;
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_vwprintf (const wchar_t *format, va_list args)
-+{
-+ return libintl_vfwprintf (stdout, format, args);
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_wprintf (const wchar_t *format, ...)
-+{
-+ va_list args;
-+ int retval;
-+
-+ va_start (args, format);
-+ retval = libintl_vwprintf (format, args);
-+ va_end (args);
-+ return retval;
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args)
-+{
-+ if (wcschr (format, '$') == NULL)
-+ return system_vswprintf (resultbuf, length, format, args);
-+ else
-+ {
-+ size_t maxlength = length;
-+ wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args);
-+ if (result != resultbuf)
-+ {
-+ if (maxlength > 0)
-+ {
-+ if (length < maxlength)
-+ abort ();
-+ memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t));
-+ resultbuf[maxlength - 1] = 0;
-+ }
-+ free (result);
-+ return -1;
-+ }
-+ else
-+ return length;
-+ }
-+}
-+
-+DLL_EXPORTED
-+int
-+libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...)
-+{
-+ va_list args;
-+ int retval;
-+
-+ va_start (args, format);
-+ retval = libintl_vswprintf (resultbuf, length, format, args);
-+ va_end (args);
-+ return retval;
-+}
-+
-+#endif
-+
-+#endif
---- lrzsz-0.12.20.safe/intl/printf-parse.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/printf-parse.c 2004-09-12 14:40:34.622707504 -0400
-@@ -0,0 +1,537 @@
-+/* Formatted output to strings.
-+ Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+/* Specification. */
-+#if WIDE_CHAR_VERSION
-+# include "wprintf-parse.h"
-+#else
-+# include "printf-parse.h"
-+#endif
-+
-+/* Get size_t, NULL. */
-+#include <stddef.h>
-+
-+/* Get intmax_t. */
-+#if HAVE_STDINT_H_WITH_UINTMAX
-+# include <stdint.h>
-+#endif
-+#if HAVE_INTTYPES_H_WITH_UINTMAX
-+# include <inttypes.h>
-+#endif
-+
-+/* malloc(), realloc(), free(). */
-+#include <stdlib.h>
-+
-+/* Checked size_t computations. */
-+#include "xsize.h"
-+
-+#if WIDE_CHAR_VERSION
-+# define PRINTF_PARSE wprintf_parse
-+# define CHAR_T wchar_t
-+# define DIRECTIVE wchar_t_directive
-+# define DIRECTIVES wchar_t_directives
-+#else
-+# define PRINTF_PARSE printf_parse
-+# define CHAR_T char
-+# define DIRECTIVE char_directive
-+# define DIRECTIVES char_directives
-+#endif
-+
-+#ifdef STATIC
-+STATIC
-+#endif
-+int
-+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
-+{
-+ const CHAR_T *cp = format; /* pointer into format */
-+ size_t arg_posn = 0; /* number of regular arguments consumed */
-+ size_t d_allocated; /* allocated elements of d->dir */
-+ size_t a_allocated; /* allocated elements of a->arg */
-+ size_t max_width_length = 0;
-+ size_t max_precision_length = 0;
-+
-+ d->count = 0;
-+ d_allocated = 1;
-+ d->dir = malloc (d_allocated * sizeof (DIRECTIVE));
-+ if (d->dir == NULL)
-+ /* Out of memory. */
-+ return -1;
-+
-+ a->count = 0;
-+ a_allocated = 0;
-+ a->arg = NULL;
-+
-+#define REGISTER_ARG(_index_,_type_) \
-+ { \
-+ size_t n = (_index_); \
-+ if (n >= a_allocated) \
-+ { \
-+ size_t memory_size; \
-+ argument *memory; \
-+ \
-+ a_allocated = xtimes (a_allocated, 2); \
-+ if (a_allocated <= n) \
-+ a_allocated = xsum (n, 1); \
-+ memory_size = xtimes (a_allocated, sizeof (argument)); \
-+ if (size_overflow_p (memory_size)) \
-+ /* Overflow, would lead to out of memory. */ \
-+ goto error; \
-+ memory = (a->arg \
-+ ? realloc (a->arg, memory_size) \
-+ : malloc (memory_size)); \
-+ if (memory == NULL) \
-+ /* Out of memory. */ \
-+ goto error; \
-+ a->arg = memory; \
-+ } \
-+ while (a->count <= n) \
-+ a->arg[a->count++].type = TYPE_NONE; \
-+ if (a->arg[n].type == TYPE_NONE) \
-+ a->arg[n].type = (_type_); \
-+ else if (a->arg[n].type != (_type_)) \
-+ /* Ambiguous type for positional argument. */ \
-+ goto error; \
-+ }
-+
-+ while (*cp != '\0')
-+ {
-+ CHAR_T c = *cp++;
-+ if (c == '%')
-+ {
-+ size_t arg_index = ARG_NONE;
-+ DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
-+
-+ /* Initialize the next directive. */
-+ dp->dir_start = cp - 1;
-+ dp->flags = 0;
-+ dp->width_start = NULL;
-+ dp->width_end = NULL;
-+ dp->width_arg_index = ARG_NONE;
-+ dp->precision_start = NULL;
-+ dp->precision_end = NULL;
-+ dp->precision_arg_index = ARG_NONE;
-+ dp->arg_index = ARG_NONE;
-+
-+ /* Test for positional argument. */
-+ if (*cp >= '0' && *cp <= '9')
-+ {
-+ const CHAR_T *np;
-+
-+ for (np = cp; *np >= '0' && *np <= '9'; np++)
-+ ;
-+ if (*np == '$')
-+ {
-+ size_t n = 0;
-+
-+ for (np = cp; *np >= '0' && *np <= '9'; np++)
-+ n = xsum (xtimes (n, 10), *np - '0');
-+ if (n == 0)
-+ /* Positional argument 0. */
-+ goto error;
-+ if (size_overflow_p (n))
-+ /* n too large, would lead to out of memory later. */
-+ goto error;
-+ arg_index = n - 1;
-+ cp = np + 1;
-+ }
-+ }
-+
-+ /* Read the flags. */
-+ for (;;)
-+ {
-+ if (*cp == '\'')
-+ {
-+ dp->flags |= FLAG_GROUP;
-+ cp++;
-+ }
-+ else if (*cp == '-')
-+ {
-+ dp->flags |= FLAG_LEFT;
-+ cp++;
-+ }
-+ else if (*cp == '+')
-+ {
-+ dp->flags |= FLAG_SHOWSIGN;
-+ cp++;
-+ }
-+ else if (*cp == ' ')
-+ {
-+ dp->flags |= FLAG_SPACE;
-+ cp++;
-+ }
-+ else if (*cp == '#')
-+ {
-+ dp->flags |= FLAG_ALT;
-+ cp++;
-+ }
-+ else if (*cp == '0')
-+ {
-+ dp->flags |= FLAG_ZERO;
-+ cp++;
-+ }
-+ else
-+ break;
-+ }
-+
-+ /* Parse the field width. */
-+ if (*cp == '*')
-+ {
-+ dp->width_start = cp;
-+ cp++;
-+ dp->width_end = cp;
-+ if (max_width_length < 1)
-+ max_width_length = 1;
-+
-+ /* Test for positional argument. */
-+ if (*cp >= '0' && *cp <= '9')
-+ {
-+ const CHAR_T *np;
-+
-+ for (np = cp; *np >= '0' && *np <= '9'; np++)
-+ ;
-+ if (*np == '$')
-+ {
-+ size_t n = 0;
-+
-+ for (np = cp; *np >= '0' && *np <= '9'; np++)
-+ n = xsum (xtimes (n, 10), *np - '0');
-+ if (n == 0)
-+ /* Positional argument 0. */
-+ goto error;
-+ if (size_overflow_p (n))
-+ /* n too large, would lead to out of memory later. */
-+ goto error;
-+ dp->width_arg_index = n - 1;
-+ cp = np + 1;
-+ }
-+ }
-+ if (dp->width_arg_index == ARG_NONE)
-+ {
-+ dp->width_arg_index = arg_posn++;
-+ if (dp->width_arg_index == ARG_NONE)
-+ /* arg_posn wrapped around. */
-+ goto error;
-+ }
-+ REGISTER_ARG (dp->width_arg_index, TYPE_INT);
-+ }
-+ else if (*cp >= '0' && *cp <= '9')
-+ {
-+ size_t width_length;
-+
-+ dp->width_start = cp;
-+ for (; *cp >= '0' && *cp <= '9'; cp++)
-+ ;
-+ dp->width_end = cp;
-+ width_length = dp->width_end - dp->width_start;
-+ if (max_width_length < width_length)
-+ max_width_length = width_length;
-+ }
-+
-+ /* Parse the precision. */
-+ if (*cp == '.')
-+ {
-+ cp++;
-+ if (*cp == '*')
-+ {
-+ dp->precision_start = cp - 1;
-+ cp++;
-+ dp->precision_end = cp;
-+ if (max_precision_length < 2)
-+ max_precision_length = 2;
-+
-+ /* Test for positional argument. */
-+ if (*cp >= '0' && *cp <= '9')
-+ {
-+ const CHAR_T *np;
-+
-+ for (np = cp; *np >= '0' && *np <= '9'; np++)
-+ ;
-+ if (*np == '$')
-+ {
-+ size_t n = 0;
-+
-+ for (np = cp; *np >= '0' && *np <= '9'; np++)
-+ n = xsum (xtimes (n, 10), *np - '0');
-+ if (n == 0)
-+ /* Positional argument 0. */
-+ goto error;
-+ if (size_overflow_p (n))
-+ /* n too large, would lead to out of memory
-+ later. */
-+ goto error;
-+ dp->precision_arg_index = n - 1;
-+ cp = np + 1;
-+ }
-+ }
-+ if (dp->precision_arg_index == ARG_NONE)
-+ {
-+ dp->precision_arg_index = arg_posn++;
-+ if (dp->precision_arg_index == ARG_NONE)
-+ /* arg_posn wrapped around. */
-+ goto error;
-+ }
-+ REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
-+ }
-+ else
-+ {
-+ size_t precision_length;
-+
-+ dp->precision_start = cp - 1;
-+ for (; *cp >= '0' && *cp <= '9'; cp++)
-+ ;
-+ dp->precision_end = cp;
-+ precision_length = dp->precision_end - dp->precision_start;
-+ if (max_precision_length < precision_length)
-+ max_precision_length = precision_length;
-+ }
-+ }
-+
-+ {
-+ arg_type type;
-+
-+ /* Parse argument type/size specifiers. */
-+ {
-+ int flags = 0;
-+
-+ for (;;)
-+ {
-+ if (*cp == 'h')
-+ {
-+ flags |= (1 << (flags & 1));
-+ cp++;
-+ }
-+ else if (*cp == 'L')
-+ {
-+ flags |= 4;
-+ cp++;
-+ }
-+ else if (*cp == 'l')
-+ {
-+ flags += 8;
-+ cp++;
-+ }
-+#ifdef HAVE_INTMAX_T
-+ else if (*cp == 'j')
-+ {
-+ if (sizeof (intmax_t) > sizeof (long))
-+ {
-+ /* intmax_t = long long */
-+ flags += 16;
-+ }
-+ else if (sizeof (intmax_t) > sizeof (int))
-+ {
-+ /* intmax_t = long */
-+ flags += 8;
-+ }
-+ cp++;
-+ }
-+#endif
-+ else if (*cp == 'z' || *cp == 'Z')
-+ {
-+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
-+ because the warning facility in gcc-2.95.2 understands
-+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
-+ if (sizeof (size_t) > sizeof (long))
-+ {
-+ /* size_t = long long */
-+ flags += 16;
-+ }
-+ else if (sizeof (size_t) > sizeof (int))
-+ {
-+ /* size_t = long */
-+ flags += 8;
-+ }
-+ cp++;
-+ }
-+ else if (*cp == 't')
-+ {
-+ if (sizeof (ptrdiff_t) > sizeof (long))
-+ {
-+ /* ptrdiff_t = long long */
-+ flags += 16;
-+ }
-+ else if (sizeof (ptrdiff_t) > sizeof (int))
-+ {
-+ /* ptrdiff_t = long */
-+ flags += 8;
-+ }
-+ cp++;
-+ }
-+ else
-+ break;
-+ }
-+
-+ /* Read the conversion character. */
-+ c = *cp++;
-+ switch (c)
-+ {
-+ case 'd': case 'i':
-+#ifdef HAVE_LONG_LONG
-+ if (flags >= 16 || (flags & 4))
-+ type = TYPE_LONGLONGINT;
-+ else
-+#endif
-+ if (flags >= 8)
-+ type = TYPE_LONGINT;
-+ else if (flags & 2)
-+ type = TYPE_SCHAR;
-+ else if (flags & 1)
-+ type = TYPE_SHORT;
-+ else
-+ type = TYPE_INT;
-+ break;
-+ case 'o': case 'u': case 'x': case 'X':
-+#ifdef HAVE_LONG_LONG
-+ if (flags >= 16 || (flags & 4))
-+ type = TYPE_ULONGLONGINT;
-+ else
-+#endif
-+ if (flags >= 8)
-+ type = TYPE_ULONGINT;
-+ else if (flags & 2)
-+ type = TYPE_UCHAR;
-+ else if (flags & 1)
-+ type = TYPE_USHORT;
-+ else
-+ type = TYPE_UINT;
-+ break;
-+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
-+ case 'a': case 'A':
-+#ifdef HAVE_LONG_DOUBLE
-+ if (flags >= 16 || (flags & 4))
-+ type = TYPE_LONGDOUBLE;
-+ else
-+#endif
-+ type = TYPE_DOUBLE;
-+ break;
-+ case 'c':
-+ if (flags >= 8)
-+#ifdef HAVE_WINT_T
-+ type = TYPE_WIDE_CHAR;
-+#else
-+ goto error;
-+#endif
-+ else
-+ type = TYPE_CHAR;
-+ break;
-+#ifdef HAVE_WINT_T
-+ case 'C':
-+ type = TYPE_WIDE_CHAR;
-+ c = 'c';
-+ break;
-+#endif
-+ case 's':
-+ if (flags >= 8)
-+#ifdef HAVE_WCHAR_T
-+ type = TYPE_WIDE_STRING;
-+#else
-+ goto error;
-+#endif
-+ else
-+ type = TYPE_STRING;
-+ break;
-+#ifdef HAVE_WCHAR_T
-+ case 'S':
-+ type = TYPE_WIDE_STRING;
-+ c = 's';
-+ break;
-+#endif
-+ case 'p':
-+ type = TYPE_POINTER;
-+ break;
-+ case 'n':
-+#ifdef HAVE_LONG_LONG
-+ if (flags >= 16 || (flags & 4))
-+ type = TYPE_COUNT_LONGLONGINT_POINTER;
-+ else
-+#endif
-+ if (flags >= 8)
-+ type = TYPE_COUNT_LONGINT_POINTER;
-+ else if (flags & 2)
-+ type = TYPE_COUNT_SCHAR_POINTER;
-+ else if (flags & 1)
-+ type = TYPE_COUNT_SHORT_POINTER;
-+ else
-+ type = TYPE_COUNT_INT_POINTER;
-+ break;
-+ case '%':
-+ type = TYPE_NONE;
-+ break;
-+ default:
-+ /* Unknown conversion character. */
-+ goto error;
-+ }
-+ }
-+
-+ if (type != TYPE_NONE)
-+ {
-+ dp->arg_index = arg_index;
-+ if (dp->arg_index == ARG_NONE)
-+ {
-+ dp->arg_index = arg_posn++;
-+ if (dp->arg_index == ARG_NONE)
-+ /* arg_posn wrapped around. */
-+ goto error;
-+ }
-+ REGISTER_ARG (dp->arg_index, type);
-+ }
-+ dp->conversion = c;
-+ dp->dir_end = cp;
-+ }
-+
-+ d->count++;
-+ if (d->count >= d_allocated)
-+ {
-+ size_t memory_size;
-+ DIRECTIVE *memory;
-+
-+ d_allocated = xtimes (d_allocated, 2);
-+ memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
-+ if (size_overflow_p (memory_size))
-+ /* Overflow, would lead to out of memory. */
-+ goto error;
-+ memory = realloc (d->dir, memory_size);
-+ if (memory == NULL)
-+ /* Out of memory. */
-+ goto error;
-+ d->dir = memory;
-+ }
-+ }
-+ }
-+ d->dir[d->count].dir_start = cp;
-+
-+ d->max_width_length = max_width_length;
-+ d->max_precision_length = max_precision_length;
-+ return 0;
-+
-+error:
-+ if (a->arg)
-+ free (a->arg);
-+ if (d->dir)
-+ free (d->dir);
-+ return -1;
-+}
-+
-+#undef DIRECTIVES
-+#undef DIRECTIVE
-+#undef CHAR_T
-+#undef PRINTF_PARSE
---- lrzsz-0.12.20.safe/intl/printf-parse.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/printf-parse.h 2004-09-12 14:40:34.628706592 -0400
-@@ -0,0 +1,75 @@
-+/* Parse printf format string.
-+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _PRINTF_PARSE_H
-+#define _PRINTF_PARSE_H
-+
-+#include "printf-args.h"
-+
-+
-+/* Flags */
-+#define FLAG_GROUP 1 /* ' flag */
-+#define FLAG_LEFT 2 /* - flag */
-+#define FLAG_SHOWSIGN 4 /* + flag */
-+#define FLAG_SPACE 8 /* space flag */
-+#define FLAG_ALT 16 /* # flag */
-+#define FLAG_ZERO 32
-+
-+/* arg_index value indicating that no argument is consumed. */
-+#define ARG_NONE (~(size_t)0)
-+
-+/* A parsed directive. */
-+typedef struct
-+{
-+ const char* dir_start;
-+ const char* dir_end;
-+ int flags;
-+ const char* width_start;
-+ const char* width_end;
-+ size_t width_arg_index;
-+ const char* precision_start;
-+ const char* precision_end;
-+ size_t precision_arg_index;
-+ char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
-+ size_t arg_index;
-+}
-+char_directive;
-+
-+/* A parsed format string. */
-+typedef struct
-+{
-+ size_t count;
-+ char_directive *dir;
-+ size_t max_width_length;
-+ size_t max_precision_length;
-+}
-+char_directives;
-+
-+
-+/* Parses the format string. Fills in the number N of directives, and fills
-+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
-+ to the end of the format string. Also fills in the arg_type fields of the
-+ arguments and the needed count of arguments. */
-+#ifdef STATIC
-+STATIC
-+#else
-+extern
-+#endif
-+int printf_parse (const char *format, char_directives *d, arguments *a);
-+
-+#endif /* _PRINTF_PARSE_H */
---- lrzsz-0.12.20.safe/intl/ref-add.sin 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/ref-add.sin 2004-09-12 14:40:34.633705832 -0400
-@@ -0,0 +1,31 @@
-+# Add this package to a list of references stored in a text file.
-+#
-+# Copyright (C) 2000 Free Software Foundation, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU Library General Public License as published
-+# by the Free Software Foundation; either version 2, or (at your option)
-+# any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# Library General Public License for more details.
-+#
-+# You should have received a copy of the GNU Library General Public
-+# License along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+# USA.
-+#
-+# Written by Bruno Haible <haible@clisp.cons.org>.
-+#
-+/^# Packages using this file: / {
-+ s/# Packages using this file://
-+ ta
-+ :a
-+ s/ @PACKAGE@ / @PACKAGE@ /
-+ tb
-+ s/ $/ @PACKAGE@ /
-+ :b
-+ s/^/# Packages using this file:/
-+}
---- lrzsz-0.12.20.safe/intl/ref-del.sin 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/ref-del.sin 2004-09-12 14:40:34.638705072 -0400
-@@ -0,0 +1,26 @@
-+# Remove this package from a list of references stored in a text file.
-+#
-+# Copyright (C) 2000 Free Software Foundation, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU Library General Public License as published
-+# by the Free Software Foundation; either version 2, or (at your option)
-+# any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# Library General Public License for more details.
-+#
-+# You should have received a copy of the GNU Library General Public
-+# License along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+# USA.
-+#
-+# Written by Bruno Haible <haible@clisp.cons.org>.
-+#
-+/^# Packages using this file: / {
-+ s/# Packages using this file://
-+ s/ @PACKAGE@ / /
-+ s/^/# Packages using this file:/
-+}
---- lrzsz-0.12.20.safe/intl/relocatable.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/relocatable.c 2004-09-12 14:40:34.644704160 -0400
-@@ -0,0 +1,449 @@
-+/* Provide relocatable packages.
-+ Copyright (C) 2003 Free Software Foundation, Inc.
-+ Written by Bruno Haible <bruno@clisp.org>, 2003.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+
-+/* Tell glibc's <stdio.h> to provide a prototype for getline().
-+ This must come before <config.h> because <config.h> may include
-+ <features.h>, and once <features.h> has been included, it's too late. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-+
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
-+/* Specification. */
-+#include "relocatable.h"
-+
-+#if ENABLE_RELOCATABLE
-+
-+#include <stddef.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#ifdef NO_XMALLOC
-+# define xmalloc malloc
-+#else
-+# include "xalloc.h"
-+#endif
-+
-+#if defined _WIN32 || defined __WIN32__
-+# define WIN32_LEAN_AND_MEAN
-+# include <windows.h>
-+#endif
-+
-+#if DEPENDS_ON_LIBCHARSET
-+# include <libcharset.h>
-+#endif
-+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
-+# include <iconv.h>
-+#endif
-+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
-+# include <libintl.h>
-+#endif
-+
-+/* Faked cheap 'bool'. */
-+#undef bool
-+#undef false
-+#undef true
-+#define bool int
-+#define false 0
-+#define true 1
-+
-+/* Pathname support.
-+ ISSLASH(C) tests whether C is a directory separator character.
-+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
-+ */
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
-+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-+# define HAS_DEVICE(P) \
-+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-+ && (P)[1] == ':')
-+# define IS_PATH_WITH_DIR(P) \
-+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
-+# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
-+#else
-+ /* Unix */
-+# define ISSLASH(C) ((C) == '/')
-+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
-+# define FILESYSTEM_PREFIX_LEN(P) 0
-+#endif
-+
-+/* Original installation prefix. */
-+static char *orig_prefix;
-+static size_t orig_prefix_len;
-+/* Current installation prefix. */
-+static char *curr_prefix;
-+static size_t curr_prefix_len;
-+/* These prefixes do not end in a slash. Anything that will be concatenated
-+ to them must start with a slash. */
-+
-+/* Sets the original and the current installation prefix of this module.
-+ Relocation simply replaces a pathname starting with the original prefix
-+ by the corresponding pathname with the current prefix instead. Both
-+ prefixes should be directory names without trailing slash (i.e. use ""
-+ instead of "/"). */
-+static void
-+set_this_relocation_prefix (const char *orig_prefix_arg,
-+ const char *curr_prefix_arg)
-+{
-+ if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
-+ /* Optimization: if orig_prefix and curr_prefix are equal, the
-+ relocation is a nop. */
-+ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
-+ {
-+ /* Duplicate the argument strings. */
-+ char *memory;
-+
-+ orig_prefix_len = strlen (orig_prefix_arg);
-+ curr_prefix_len = strlen (curr_prefix_arg);
-+ memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
-+#ifdef NO_XMALLOC
-+ if (memory != NULL)
-+#endif
-+ {
-+ memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
-+ orig_prefix = memory;
-+ memory += orig_prefix_len + 1;
-+ memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
-+ curr_prefix = memory;
-+ return;
-+ }
-+ }
-+ orig_prefix = NULL;
-+ curr_prefix = NULL;
-+ /* Don't worry about wasted memory here - this function is usually only
-+ called once. */
-+}
-+
-+/* Sets the original and the current installation prefix of the package.
-+ Relocation simply replaces a pathname starting with the original prefix
-+ by the corresponding pathname with the current prefix instead. Both
-+ prefixes should be directory names without trailing slash (i.e. use ""
-+ instead of "/"). */
-+void
-+set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
-+{
-+ set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
-+
-+ /* Now notify all dependent libraries. */
-+#if DEPENDS_ON_LIBCHARSET
-+ libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
-+#endif
-+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
-+ libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
-+#endif
-+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
-+ libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
-+#endif
-+}
-+
-+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
-+
-+/* Convenience function:
-+ Computes the current installation prefix, based on the original
-+ installation prefix, the original installation directory of a particular
-+ file, and the current pathname of this file. Returns NULL upon failure. */
-+#ifdef IN_LIBRARY
-+#define compute_curr_prefix local_compute_curr_prefix
-+static
-+#endif
-+const char *
-+compute_curr_prefix (const char *orig_installprefix,
-+ const char *orig_installdir,
-+ const char *curr_pathname)
-+{
-+ const char *curr_installdir;
-+ const char *rel_installdir;
-+
-+ if (curr_pathname == NULL)
-+ return NULL;
-+
-+ /* Determine the relative installation directory, relative to the prefix.
-+ This is simply the difference between orig_installprefix and
-+ orig_installdir. */
-+ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
-+ != 0)
-+ /* Shouldn't happen - nothing should be installed outside $(prefix). */
-+ return NULL;
-+ rel_installdir = orig_installdir + strlen (orig_installprefix);
-+
-+ /* Determine the current installation directory. */
-+ {
-+ const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname);
-+ const char *p = curr_pathname + strlen (curr_pathname);
-+ char *q;
-+
-+ while (p > p_base)
-+ {
-+ p--;
-+ if (ISSLASH (*p))
-+ break;
-+ }
-+
-+ q = (char *) xmalloc (p - curr_pathname + 1);
-+#ifdef NO_XMALLOC
-+ if (q == NULL)
-+ return NULL;
-+#endif
-+ memcpy (q, curr_pathname, p - curr_pathname);
-+ q[p - curr_pathname] = '\0';
-+ curr_installdir = q;
-+ }
-+
-+ /* Compute the current installation prefix by removing the trailing
-+ rel_installdir from it. */
-+ {
-+ const char *rp = rel_installdir + strlen (rel_installdir);
-+ const char *cp = curr_installdir + strlen (curr_installdir);
-+ const char *cp_base =
-+ curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir);
-+
-+ while (rp > rel_installdir && cp > cp_base)
-+ {
-+ bool same = false;
-+ const char *rpi = rp;
-+ const char *cpi = cp;
-+
-+ while (rpi > rel_installdir && cpi > cp_base)
-+ {
-+ rpi--;
-+ cpi--;
-+ if (ISSLASH (*rpi) || ISSLASH (*cpi))
-+ {
-+ if (ISSLASH (*rpi) && ISSLASH (*cpi))
-+ same = true;
-+ break;
-+ }
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS - case insignificant filesystem */
-+ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
-+ != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
-+ break;
-+#else
-+ if (*rpi != *cpi)
-+ break;
-+#endif
-+ }
-+ if (!same)
-+ break;
-+ /* The last pathname component was the same. opi and cpi now point
-+ to the slash before it. */
-+ rp = rpi;
-+ cp = cpi;
-+ }
-+
-+ if (rp > rel_installdir)
-+ /* Unexpected: The curr_installdir does not end with rel_installdir. */
-+ return NULL;
-+
-+ {
-+ size_t curr_prefix_len = cp - curr_installdir;
-+ char *curr_prefix;
-+
-+ curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
-+#ifdef NO_XMALLOC
-+ if (curr_prefix == NULL)
-+ return NULL;
-+#endif
-+ memcpy (curr_prefix, curr_installdir, curr_prefix_len);
-+ curr_prefix[curr_prefix_len] = '\0';
-+
-+ return curr_prefix;
-+ }
-+ }
-+}
-+
-+#endif /* !IN_LIBRARY || PIC */
-+
-+#if defined PIC && defined INSTALLDIR
-+
-+/* Full pathname of shared library, or NULL. */
-+static char *shared_library_fullname;
-+
-+#if defined _WIN32 || defined __WIN32__
-+
-+/* Determine the full pathname of the shared library when it is loaded. */
-+
-+BOOL WINAPI
-+DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
-+{
-+ (void) reserved;
-+
-+ if (event == DLL_PROCESS_ATTACH)
-+ {
-+ /* The DLL is being loaded into an application's address range. */
-+ static char location[MAX_PATH];
-+
-+ if (!GetModuleFileName (module_handle, location, sizeof (location)))
-+ /* Shouldn't happen. */
-+ return FALSE;
-+
-+ if (!IS_PATH_WITH_DIR (location))
-+ /* Shouldn't happen. */
-+ return FALSE;
-+
-+ shared_library_fullname = strdup (location);
-+ }
-+
-+ return TRUE;
-+}
-+
-+#else /* Unix */
-+
-+static void
-+find_shared_library_fullname ()
-+{
-+#if defined __linux__ && __GLIBC__ >= 2
-+ /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
-+ FILE *fp;
-+
-+ /* Open the current process' maps file. It describes one VMA per line. */
-+ fp = fopen ("/proc/self/maps", "r");
-+ if (fp)
-+ {
-+ unsigned long address = (unsigned long) &find_shared_library_fullname;
-+ for (;;)
-+ {
-+ unsigned long start, end;
-+ int c;
-+
-+ if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
-+ break;
-+ if (address >= start && address <= end - 1)
-+ {
-+ /* Found it. Now see if this line contains a filename. */
-+ while (c = getc (fp), c != EOF && c != '\n' && c != '/')
-+ continue;
-+ if (c == '/')
-+ {
-+ size_t size;
-+ int len;
-+
-+ ungetc (c, fp);
-+ shared_library_fullname = NULL; size = 0;
-+ len = getline (&shared_library_fullname, &size, fp);
-+ if (len >= 0)
-+ {
-+ /* Success: filled shared_library_fullname. */
-+ if (len > 0 && shared_library_fullname[len - 1] == '\n')
-+ shared_library_fullname[len - 1] = '\0';
-+ }
-+ }
-+ break;
-+ }
-+ while (c = getc (fp), c != EOF && c != '\n')
-+ continue;
-+ }
-+ fclose (fp);
-+ }
-+#endif
-+}
-+
-+#endif /* WIN32 / Unix */
-+
-+/* Return the full pathname of the current shared library.
-+ Return NULL if unknown.
-+ Guaranteed to work only on Linux and Woe32. */
-+static char *
-+get_shared_library_fullname ()
-+{
-+#if !(defined _WIN32 || defined __WIN32__)
-+ static bool tried_find_shared_library_fullname;
-+ if (!tried_find_shared_library_fullname)
-+ {
-+ find_shared_library_fullname ();
-+ tried_find_shared_library_fullname = true;
-+ }
-+#endif
-+ return shared_library_fullname;
-+}
-+
-+#endif /* PIC */
-+
-+/* Returns the pathname, relocated according to the current installation
-+ directory. */
-+const char *
-+relocate (const char *pathname)
-+{
-+#if defined PIC && defined INSTALLDIR
-+ static int initialized;
-+
-+ /* Initialization code for a shared library. */
-+ if (!initialized)
-+ {
-+ /* At this point, orig_prefix and curr_prefix likely have already been
-+ set through the main program's set_program_name_and_installdir
-+ function. This is sufficient in the case that the library has
-+ initially been installed in the same orig_prefix. But we can do
-+ better, to also cover the cases that 1. it has been installed
-+ in a different prefix before being moved to orig_prefix and (later)
-+ to curr_prefix, 2. unlike the program, it has not moved away from
-+ orig_prefix. */
-+ const char *orig_installprefix = INSTALLPREFIX;
-+ const char *orig_installdir = INSTALLDIR;
-+ const char *curr_prefix_better;
-+
-+ curr_prefix_better =
-+ compute_curr_prefix (orig_installprefix, orig_installdir,
-+ get_shared_library_fullname ());
-+ if (curr_prefix_better == NULL)
-+ curr_prefix_better = curr_prefix;
-+
-+ set_relocation_prefix (orig_installprefix, curr_prefix_better);
-+
-+ initialized = 1;
-+ }
-+#endif
-+
-+ /* Note: It is not necessary to perform case insensitive comparison here,
-+ even for DOS-like filesystems, because the pathname argument was
-+ typically created from the same Makefile variable as orig_prefix came
-+ from. */
-+ if (orig_prefix != NULL && curr_prefix != NULL
-+ && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
-+ {
-+ if (pathname[orig_prefix_len] == '\0')
-+ /* pathname equals orig_prefix. */
-+ return curr_prefix;
-+ if (ISSLASH (pathname[orig_prefix_len]))
-+ {
-+ /* pathname starts with orig_prefix. */
-+ const char *pathname_tail = &pathname[orig_prefix_len];
-+ char *result =
-+ (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
-+
-+#ifdef NO_XMALLOC
-+ if (result != NULL)
-+#endif
-+ {
-+ memcpy (result, curr_prefix, curr_prefix_len);
-+ strcpy (result + curr_prefix_len, pathname_tail);
-+ return result;
-+ }
-+ }
-+ }
-+ /* Nothing to relocate. */
-+ return pathname;
-+}
-+
-+#endif
---- lrzsz-0.12.20.safe/intl/relocatable.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/relocatable.h 2004-09-12 14:40:34.651703096 -0400
-@@ -0,0 +1,77 @@
-+/* Provide relocatable packages.
-+ Copyright (C) 2003 Free Software Foundation, Inc.
-+ Written by Bruno Haible <bruno@clisp.org>, 2003.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _RELOCATABLE_H
-+#define _RELOCATABLE_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+
-+/* This can be enabled through the configure --enable-relocatable option. */
-+#if ENABLE_RELOCATABLE
-+
-+/* When building a DLL, we must export some functions. Note that because
-+ this is a private .h file, we don't need to use __declspec(dllimport)
-+ in any case. */
-+#if defined _MSC_VER && BUILDING_DLL
-+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
-+#else
-+# define RELOCATABLE_DLL_EXPORTED
-+#endif
-+
-+/* Sets the original and the current installation prefix of the package.
-+ Relocation simply replaces a pathname starting with the original prefix
-+ by the corresponding pathname with the current prefix instead. Both
-+ prefixes should be directory names without trailing slash (i.e. use ""
-+ instead of "/"). */
-+extern RELOCATABLE_DLL_EXPORTED void
-+ set_relocation_prefix (const char *orig_prefix,
-+ const char *curr_prefix);
-+
-+/* Returns the pathname, relocated according to the current installation
-+ directory. */
-+extern const char * relocate (const char *pathname);
-+
-+/* Memory management: relocate() leaks memory, because it has to construct
-+ a fresh pathname. If this is a problem because your program calls
-+ relocate() frequently, think about caching the result. */
-+
-+/* Convenience function:
-+ Computes the current installation prefix, based on the original
-+ installation prefix, the original installation directory of a particular
-+ file, and the current pathname of this file. Returns NULL upon failure. */
-+extern const char * compute_curr_prefix (const char *orig_installprefix,
-+ const char *orig_installdir,
-+ const char *curr_pathname);
-+
-+#else
-+
-+/* By default, we use the hardwired pathnames. */
-+#define relocate(pathname) (pathname)
-+
-+#endif
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* _RELOCATABLE_H */
---- lrzsz-0.12.20.safe/intl/textdomain.c 1998-04-26 09:22:37.000000000 -0400
-+++ lrzsz-0.12.20/intl/textdomain.c 2004-09-12 14:40:34.656702336 -0400
-@@ -1,51 +1,60 @@
--/* Implementation of the textdomain(3) function
-- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-+/* Implementation of the textdomain(3) function.
-+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
-
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
--#if defined STDC_HEADERS || defined _LIBC
--# include <stdlib.h>
--#endif
-+#include <stdlib.h>
-+#include <string.h>
-
--#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
--# include <string.h>
-+#ifdef _LIBC
-+# include <libintl.h>
- #else
--# include <strings.h>
--# ifndef memcpy
--# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
--# endif
-+# include "libgnuintl.h"
- #endif
-+#include "gettextP.h"
-
- #ifdef _LIBC
--# include <libintl.h>
-+/* We have to handle multi-threaded applications. */
-+# include <bits/libc-lock.h>
- #else
--# include "libgettext.h"
-+/* Provide dummy implementation if this is outside glibc. */
-+# define __libc_rwlock_define(CLASS, NAME)
-+# define __libc_rwlock_wrlock(NAME)
-+# define __libc_rwlock_unlock(NAME)
-+#endif
-+
-+/* The internal variables in the standalone libintl.a must have different
-+ names than the internal variables in GNU libc, otherwise programs
-+ using libintl.a cannot be linked statically. */
-+#if !defined _LIBC
-+# define _nl_default_default_domain libintl_nl_default_default_domain
-+# define _nl_current_default_domain libintl_nl_current_default_domain
- #endif
-
- /* @@ end of prolog @@ */
-
- /* Name of the default text domain. */
--extern const char _nl_default_default_domain[];
-+extern const char _nl_default_default_domain[] attribute_hidden;
-
- /* Default text domain in which entries for gettext(3) are to be found. */
--extern const char *_nl_current_default_domain;
-+extern const char *_nl_current_default_domain attribute_hidden;
-
-
- /* Names for the libintl functions are a problem. They must not clash
-@@ -54,50 +63,76 @@
- prefix. So we have to make a difference here. */
- #ifdef _LIBC
- # define TEXTDOMAIN __textdomain
--# define strdup(str) __strdup (str)
-+# ifndef strdup
-+# define strdup(str) __strdup (str)
-+# endif
- #else
--# define TEXTDOMAIN textdomain__
-+# define TEXTDOMAIN libintl_textdomain
- #endif
-
-+/* Lock variable to protect the global data in the gettext implementation. */
-+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
-+
- /* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
- char *
--TEXTDOMAIN (domainname)
-- const char *domainname;
-+TEXTDOMAIN (const char *domainname)
- {
-- char *old;
-+ char *new_domain;
-+ char *old_domain;
-
- /* A NULL pointer requests the current setting. */
- if (domainname == NULL)
- return (char *) _nl_current_default_domain;
-
-- old = (char *) _nl_current_default_domain;
-+ __libc_rwlock_wrlock (_nl_state_lock);
-+
-+ old_domain = (char *) _nl_current_default_domain;
-
- /* If domain name is the null string set to default domain "messages". */
- if (domainname[0] == '\0'
- || strcmp (domainname, _nl_default_default_domain) == 0)
-- _nl_current_default_domain = _nl_default_default_domain;
-+ {
-+ _nl_current_default_domain = _nl_default_default_domain;
-+ new_domain = (char *) _nl_current_default_domain;
-+ }
-+ else if (strcmp (domainname, old_domain) == 0)
-+ /* This can happen and people will use it to signal that some
-+ environment variable changed. */
-+ new_domain = old_domain;
- else
- {
- /* If the following malloc fails `_nl_current_default_domain'
- will be NULL. This value will be returned and so signals we
- are out of core. */
- #if defined _LIBC || defined HAVE_STRDUP
-- _nl_current_default_domain = strdup (domainname);
-+ new_domain = strdup (domainname);
- #else
- size_t len = strlen (domainname) + 1;
-- char *cp = (char *) malloc (len);
-- if (cp != NULL)
-- memcpy (cp, domainname, len);
-- _nl_current_default_domain = cp;
-+ new_domain = (char *) malloc (len);
-+ if (new_domain != NULL)
-+ memcpy (new_domain, domainname, len);
- #endif
-+
-+ if (new_domain != NULL)
-+ _nl_current_default_domain = new_domain;
- }
-
-- if (old != _nl_default_default_domain)
-- free (old);
-+ /* We use this possibility to signal a change of the loaded catalogs
-+ since this is most likely the case and there is no other easy we
-+ to do it. Do it only when the call was successful. */
-+ if (new_domain != NULL)
-+ {
-+ ++_nl_msg_cat_cntr;
-
-- return (char *) _nl_current_default_domain;
-+ if (old_domain != new_domain && old_domain != _nl_default_default_domain)
-+ free (old_domain);
-+ }
-+
-+ __libc_rwlock_unlock (_nl_state_lock);
-+
-+ return new_domain;
- }
-
- #ifdef _LIBC
---- lrzsz-0.12.20.safe/intl/vasnprintf.c 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/vasnprintf.c 2004-09-12 14:40:34.662701424 -0400
-@@ -0,0 +1,887 @@
-+/* vsprintf with automatic memory allocation.
-+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
-+ This must come before <config.h> because <config.h> may include
-+ <features.h>, and once <features.h> has been included, it's too late. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+#ifndef IN_LIBINTL
-+# include <alloca.h>
-+#endif
-+
-+/* Specification. */
-+#if WIDE_CHAR_VERSION
-+# include "vasnwprintf.h"
-+#else
-+# include "vasnprintf.h"
-+#endif
-+
-+#include <stdio.h> /* snprintf(), sprintf() */
-+#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
-+#include <string.h> /* memcpy(), strlen() */
-+#include <errno.h> /* errno */
-+#include <limits.h> /* CHAR_BIT */
-+#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
-+#if WIDE_CHAR_VERSION
-+# include "wprintf-parse.h"
-+#else
-+# include "printf-parse.h"
-+#endif
-+
-+/* Checked size_t computations. */
-+#include "xsize.h"
-+
-+#ifdef HAVE_WCHAR_T
-+# ifdef HAVE_WCSLEN
-+# define local_wcslen wcslen
-+# else
-+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
-+ a dependency towards this library, here is a local substitute.
-+ Define this substitute only once, even if this file is included
-+ twice in the same compilation unit. */
-+# ifndef local_wcslen_defined
-+# define local_wcslen_defined 1
-+static size_t
-+local_wcslen (const wchar_t *s)
-+{
-+ const wchar_t *ptr;
-+
-+ for (ptr = s; *ptr != (wchar_t) 0; ptr++)
-+ ;
-+ return ptr - s;
-+}
-+# endif
-+# endif
-+#endif
-+
-+#if WIDE_CHAR_VERSION
-+# define VASNPRINTF vasnwprintf
-+# define CHAR_T wchar_t
-+# define DIRECTIVE wchar_t_directive
-+# define DIRECTIVES wchar_t_directives
-+# define PRINTF_PARSE wprintf_parse
-+# define USE_SNPRINTF 1
-+# if HAVE_DECL__SNWPRINTF
-+ /* On Windows, the function swprintf() has a different signature than
-+ on Unix; we use the _snwprintf() function instead. */
-+# define SNPRINTF _snwprintf
-+# else
-+ /* Unix. */
-+# define SNPRINTF swprintf
-+# endif
-+#else
-+# define VASNPRINTF vasnprintf
-+# define CHAR_T char
-+# define DIRECTIVE char_directive
-+# define DIRECTIVES char_directives
-+# define PRINTF_PARSE printf_parse
-+# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
-+# if HAVE_DECL__SNPRINTF
-+ /* Windows. */
-+# define SNPRINTF _snprintf
-+# else
-+ /* Unix. */
-+# define SNPRINTF snprintf
-+# endif
-+#endif
-+
-+CHAR_T *
-+VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
-+{
-+ DIRECTIVES d;
-+ arguments a;
-+
-+ if (PRINTF_PARSE (format, &d, &a) < 0)
-+ {
-+ errno = EINVAL;
-+ return NULL;
-+ }
-+
-+#define CLEANUP() \
-+ free (d.dir); \
-+ if (a.arg) \
-+ free (a.arg);
-+
-+ if (printf_fetchargs (args, &a) < 0)
-+ {
-+ CLEANUP ();
-+ errno = EINVAL;
-+ return NULL;
-+ }
-+
-+ {
-+ size_t buf_neededlength;
-+ CHAR_T *buf;
-+ CHAR_T *buf_malloced;
-+ const CHAR_T *cp;
-+ size_t i;
-+ DIRECTIVE *dp;
-+ /* Output string accumulator. */
-+ CHAR_T *result;
-+ size_t allocated;
-+ size_t length;
-+
-+ /* Allocate a small buffer that will hold a directive passed to
-+ sprintf or snprintf. */
-+ buf_neededlength =
-+ xsum4 (7, d.max_width_length, d.max_precision_length, 6);
-+#if HAVE_ALLOCA
-+ if (buf_neededlength < 4000 / sizeof (CHAR_T))
-+ {
-+ buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
-+ buf_malloced = NULL;
-+ }
-+ else
-+#endif
-+ {
-+ size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
-+ if (size_overflow_p (buf_memsize))
-+ goto out_of_memory_1;
-+ buf = (CHAR_T *) malloc (buf_memsize);
-+ if (buf == NULL)
-+ goto out_of_memory_1;
-+ buf_malloced = buf;
-+ }
-+
-+ if (resultbuf != NULL)
-+ {
-+ result = resultbuf;
-+ allocated = *lengthp;
-+ }
-+ else
-+ {
-+ result = NULL;
-+ allocated = 0;
-+ }
-+ length = 0;
-+ /* Invariants:
-+ result is either == resultbuf or == NULL or malloc-allocated.
-+ If length > 0, then result != NULL. */
-+
-+ /* Ensures that allocated >= needed. Aborts through a jump to
-+ out_of_memory if needed is SIZE_MAX or otherwise too big. */
-+#define ENSURE_ALLOCATION(needed) \
-+ if ((needed) > allocated) \
-+ { \
-+ size_t memory_size; \
-+ CHAR_T *memory; \
-+ \
-+ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \
-+ if ((needed) > allocated) \
-+ allocated = (needed); \
-+ memory_size = xtimes (allocated, sizeof (CHAR_T)); \
-+ if (size_overflow_p (memory_size)) \
-+ goto out_of_memory; \
-+ if (result == resultbuf || result == NULL) \
-+ memory = (CHAR_T *) malloc (memory_size); \
-+ else \
-+ memory = (CHAR_T *) realloc (result, memory_size); \
-+ if (memory == NULL) \
-+ goto out_of_memory; \
-+ if (result == resultbuf && length > 0) \
-+ memcpy (memory, result, length * sizeof (CHAR_T)); \
-+ result = memory; \
-+ }
-+
-+ for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
-+ {
-+ if (cp != dp->dir_start)
-+ {
-+ size_t n = dp->dir_start - cp;
-+ size_t augmented_length = xsum (length, n);
-+
-+ ENSURE_ALLOCATION (augmented_length);
-+ memcpy (result + length, cp, n * sizeof (CHAR_T));
-+ length = augmented_length;
-+ }
-+ if (i == d.count)
-+ break;
-+
-+ /* Execute a single directive. */
-+ if (dp->conversion == '%')
-+ {
-+ size_t augmented_length;
-+
-+ if (!(dp->arg_index == ARG_NONE))
-+ abort ();
-+ augmented_length = xsum (length, 1);
-+ ENSURE_ALLOCATION (augmented_length);
-+ result[length] = '%';
-+ length = augmented_length;
-+ }
-+ else
-+ {
-+ if (!(dp->arg_index != ARG_NONE))
-+ abort ();
-+
-+ if (dp->conversion == 'n')
-+ {
-+ switch (a.arg[dp->arg_index].type)
-+ {
-+ case TYPE_COUNT_SCHAR_POINTER:
-+ *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
-+ break;
-+ case TYPE_COUNT_SHORT_POINTER:
-+ *a.arg[dp->arg_index].a.a_count_short_pointer = length;
-+ break;
-+ case TYPE_COUNT_INT_POINTER:
-+ *a.arg[dp->arg_index].a.a_count_int_pointer = length;
-+ break;
-+ case TYPE_COUNT_LONGINT_POINTER:
-+ *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ case TYPE_COUNT_LONGLONGINT_POINTER:
-+ *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
-+ break;
-+#endif
-+ default:
-+ abort ();
-+ }
-+ }
-+ else
-+ {
-+ arg_type type = a.arg[dp->arg_index].type;
-+ CHAR_T *p;
-+ unsigned int prefix_count;
-+ int prefixes[2];
-+#if !USE_SNPRINTF
-+ size_t tmp_length;
-+ CHAR_T tmpbuf[700];
-+ CHAR_T *tmp;
-+
-+ /* Allocate a temporary buffer of sufficient size for calling
-+ sprintf. */
-+ {
-+ size_t width;
-+ size_t precision;
-+
-+ width = 0;
-+ if (dp->width_start != dp->width_end)
-+ {
-+ if (dp->width_arg_index != ARG_NONE)
-+ {
-+ int arg;
-+
-+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
-+ abort ();
-+ arg = a.arg[dp->width_arg_index].a.a_int;
-+ width = (arg < 0 ? (unsigned int) (-arg) : arg);
-+ }
-+ else
-+ {
-+ const CHAR_T *digitp = dp->width_start;
-+
-+ do
-+ width = xsum (xtimes (width, 10), *digitp++ - '0');
-+ while (digitp != dp->width_end);
-+ }
-+ }
-+
-+ precision = 6;
-+ if (dp->precision_start != dp->precision_end)
-+ {
-+ if (dp->precision_arg_index != ARG_NONE)
-+ {
-+ int arg;
-+
-+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
-+ abort ();
-+ arg = a.arg[dp->precision_arg_index].a.a_int;
-+ precision = (arg < 0 ? 0 : arg);
-+ }
-+ else
-+ {
-+ const CHAR_T *digitp = dp->precision_start + 1;
-+
-+ precision = 0;
-+ do
-+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
-+ while (digitp != dp->precision_end);
-+ }
-+ }
-+
-+ switch (dp->conversion)
-+ {
-+
-+ case 'd': case 'i': case 'u':
-+# ifdef HAVE_LONG_LONG
-+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
-+ * 0.30103 /* binary -> decimal */
-+ * 2 /* estimate for FLAG_GROUP */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 1; /* account for leading sign */
-+ else
-+# endif
-+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
-+ * 0.30103 /* binary -> decimal */
-+ * 2 /* estimate for FLAG_GROUP */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 1; /* account for leading sign */
-+ else
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
-+ * 0.30103 /* binary -> decimal */
-+ * 2 /* estimate for FLAG_GROUP */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 1; /* account for leading sign */
-+ break;
-+
-+ case 'o':
-+# ifdef HAVE_LONG_LONG
-+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
-+ * 0.333334 /* binary -> octal */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 1; /* account for leading sign */
-+ else
-+# endif
-+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
-+ * 0.333334 /* binary -> octal */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 1; /* account for leading sign */
-+ else
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
-+ * 0.333334 /* binary -> octal */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 1; /* account for leading sign */
-+ break;
-+
-+ case 'x': case 'X':
-+# ifdef HAVE_LONG_LONG
-+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
-+ * 0.25 /* binary -> hexadecimal */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 2; /* account for leading sign or alternate form */
-+ else
-+# endif
-+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
-+ * 0.25 /* binary -> hexadecimal */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 2; /* account for leading sign or alternate form */
-+ else
-+ tmp_length =
-+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
-+ * 0.25 /* binary -> hexadecimal */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 2; /* account for leading sign or alternate form */
-+ break;
-+
-+ case 'f': case 'F':
-+# ifdef HAVE_LONG_DOUBLE
-+ if (type == TYPE_LONGDOUBLE)
-+ tmp_length =
-+ (unsigned int) (LDBL_MAX_EXP
-+ * 0.30103 /* binary -> decimal */
-+ * 2 /* estimate for FLAG_GROUP */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 10; /* sign, decimal point etc. */
-+ else
-+# endif
-+ tmp_length =
-+ (unsigned int) (DBL_MAX_EXP
-+ * 0.30103 /* binary -> decimal */
-+ * 2 /* estimate for FLAG_GROUP */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 10; /* sign, decimal point etc. */
-+ tmp_length = xsum (tmp_length, precision);
-+ break;
-+
-+ case 'e': case 'E': case 'g': case 'G':
-+ case 'a': case 'A':
-+ tmp_length =
-+ 12; /* sign, decimal point, exponent etc. */
-+ tmp_length = xsum (tmp_length, precision);
-+ break;
-+
-+ case 'c':
-+# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION
-+ if (type == TYPE_WIDE_CHAR)
-+ tmp_length = MB_CUR_MAX;
-+ else
-+# endif
-+ tmp_length = 1;
-+ break;
-+
-+ case 's':
-+# ifdef HAVE_WCHAR_T
-+ if (type == TYPE_WIDE_STRING)
-+ {
-+ tmp_length =
-+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
-+
-+# if !WIDE_CHAR_VERSION
-+ tmp_length = xtimes (tmp_length, MB_CUR_MAX);
-+# endif
-+ }
-+ else
-+# endif
-+ tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
-+ break;
-+
-+ case 'p':
-+ tmp_length =
-+ (unsigned int) (sizeof (void *) * CHAR_BIT
-+ * 0.25 /* binary -> hexadecimal */
-+ )
-+ + 1 /* turn floor into ceil */
-+ + 2; /* account for leading 0x */
-+ break;
-+
-+ default:
-+ abort ();
-+ }
-+
-+ if (tmp_length < width)
-+ tmp_length = width;
-+
-+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
-+ }
-+
-+ if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
-+ tmp = tmpbuf;
-+ else
-+ {
-+ size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
-+
-+ if (size_overflow_p (tmp_memsize))
-+ /* Overflow, would lead to out of memory. */
-+ goto out_of_memory;
-+ tmp = (CHAR_T *) malloc (tmp_memsize);
-+ if (tmp == NULL)
-+ /* Out of memory. */
-+ goto out_of_memory;
-+ }
-+#endif
-+
-+ /* Construct the format string for calling snprintf or
-+ sprintf. */
-+ p = buf;
-+ *p++ = '%';
-+ if (dp->flags & FLAG_GROUP)
-+ *p++ = '\'';
-+ if (dp->flags & FLAG_LEFT)
-+ *p++ = '-';
-+ if (dp->flags & FLAG_SHOWSIGN)
-+ *p++ = '+';
-+ if (dp->flags & FLAG_SPACE)
-+ *p++ = ' ';
-+ if (dp->flags & FLAG_ALT)
-+ *p++ = '#';
-+ if (dp->flags & FLAG_ZERO)
-+ *p++ = '0';
-+ if (dp->width_start != dp->width_end)
-+ {
-+ size_t n = dp->width_end - dp->width_start;
-+ memcpy (p, dp->width_start, n * sizeof (CHAR_T));
-+ p += n;
-+ }
-+ if (dp->precision_start != dp->precision_end)
-+ {
-+ size_t n = dp->precision_end - dp->precision_start;
-+ memcpy (p, dp->precision_start, n * sizeof (CHAR_T));
-+ p += n;
-+ }
-+
-+ switch (type)
-+ {
-+#ifdef HAVE_LONG_LONG
-+ case TYPE_LONGLONGINT:
-+ case TYPE_ULONGLONGINT:
-+ *p++ = 'l';
-+ /*FALLTHROUGH*/
-+#endif
-+ case TYPE_LONGINT:
-+ case TYPE_ULONGINT:
-+#ifdef HAVE_WINT_T
-+ case TYPE_WIDE_CHAR:
-+#endif
-+#ifdef HAVE_WCHAR_T
-+ case TYPE_WIDE_STRING:
-+#endif
-+ *p++ = 'l';
-+ break;
-+#ifdef HAVE_LONG_DOUBLE
-+ case TYPE_LONGDOUBLE:
-+ *p++ = 'L';
-+ break;
-+#endif
-+ default:
-+ break;
-+ }
-+ *p = dp->conversion;
-+#if USE_SNPRINTF
-+ p[1] = '%';
-+ p[2] = 'n';
-+ p[3] = '\0';
-+#else
-+ p[1] = '\0';
-+#endif
-+
-+ /* Construct the arguments for calling snprintf or sprintf. */
-+ prefix_count = 0;
-+ if (dp->width_arg_index != ARG_NONE)
-+ {
-+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
-+ abort ();
-+ prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
-+ }
-+ if (dp->precision_arg_index != ARG_NONE)
-+ {
-+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
-+ abort ();
-+ prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
-+ }
-+
-+#if USE_SNPRINTF
-+ /* Prepare checking whether snprintf returns the count
-+ via %n. */
-+ ENSURE_ALLOCATION (xsum (length, 1));
-+ result[length] = '\0';
-+#endif
-+
-+ for (;;)
-+ {
-+ size_t maxlen;
-+ int count;
-+ int retcount;
-+
-+ maxlen = allocated - length;
-+ count = -1;
-+ retcount = 0;
-+
-+#if USE_SNPRINTF
-+# define SNPRINTF_BUF(arg) \
-+ switch (prefix_count) \
-+ { \
-+ case 0: \
-+ retcount = SNPRINTF (result + length, maxlen, buf, \
-+ arg, &count); \
-+ break; \
-+ case 1: \
-+ retcount = SNPRINTF (result + length, maxlen, buf, \
-+ prefixes[0], arg, &count); \
-+ break; \
-+ case 2: \
-+ retcount = SNPRINTF (result + length, maxlen, buf, \
-+ prefixes[0], prefixes[1], arg, \
-+ &count); \
-+ break; \
-+ default: \
-+ abort (); \
-+ }
-+#else
-+# define SNPRINTF_BUF(arg) \
-+ switch (prefix_count) \
-+ { \
-+ case 0: \
-+ count = sprintf (tmp, buf, arg); \
-+ break; \
-+ case 1: \
-+ count = sprintf (tmp, buf, prefixes[0], arg); \
-+ break; \
-+ case 2: \
-+ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
-+ arg); \
-+ break; \
-+ default: \
-+ abort (); \
-+ }
-+#endif
-+
-+ switch (type)
-+ {
-+ case TYPE_SCHAR:
-+ {
-+ int arg = a.arg[dp->arg_index].a.a_schar;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ case TYPE_UCHAR:
-+ {
-+ unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ case TYPE_SHORT:
-+ {
-+ int arg = a.arg[dp->arg_index].a.a_short;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ case TYPE_USHORT:
-+ {
-+ unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ case TYPE_INT:
-+ {
-+ int arg = a.arg[dp->arg_index].a.a_int;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ case TYPE_UINT:
-+ {
-+ unsigned int arg = a.arg[dp->arg_index].a.a_uint;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ case TYPE_LONGINT:
-+ {
-+ long int arg = a.arg[dp->arg_index].a.a_longint;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ case TYPE_ULONGINT:
-+ {
-+ unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ case TYPE_LONGLONGINT:
-+ {
-+ long long int arg = a.arg[dp->arg_index].a.a_longlongint;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ case TYPE_ULONGLONGINT:
-+ {
-+ unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+#endif
-+ case TYPE_DOUBLE:
-+ {
-+ double arg = a.arg[dp->arg_index].a.a_double;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+#ifdef HAVE_LONG_DOUBLE
-+ case TYPE_LONGDOUBLE:
-+ {
-+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+#endif
-+ case TYPE_CHAR:
-+ {
-+ int arg = a.arg[dp->arg_index].a.a_char;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+#ifdef HAVE_WINT_T
-+ case TYPE_WIDE_CHAR:
-+ {
-+ wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+#endif
-+ case TYPE_STRING:
-+ {
-+ const char *arg = a.arg[dp->arg_index].a.a_string;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+#ifdef HAVE_WCHAR_T
-+ case TYPE_WIDE_STRING:
-+ {
-+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+#endif
-+ case TYPE_POINTER:
-+ {
-+ void *arg = a.arg[dp->arg_index].a.a_pointer;
-+ SNPRINTF_BUF (arg);
-+ }
-+ break;
-+ default:
-+ abort ();
-+ }
-+
-+#if USE_SNPRINTF
-+ /* Portability: Not all implementations of snprintf()
-+ are ISO C 99 compliant. Determine the number of
-+ bytes that snprintf() has produced or would have
-+ produced. */
-+ if (count >= 0)
-+ {
-+ /* Verify that snprintf() has NUL-terminated its
-+ result. */
-+ if (count < maxlen && result[length + count] != '\0')
-+ abort ();
-+ /* Portability hack. */
-+ if (retcount > count)
-+ count = retcount;
-+ }
-+ else
-+ {
-+ /* snprintf() doesn't understand the '%n'
-+ directive. */
-+ if (p[1] != '\0')
-+ {
-+ /* Don't use the '%n' directive; instead, look
-+ at the snprintf() return value. */
-+ p[1] = '\0';
-+ continue;
-+ }
-+ else
-+ {
-+ /* Look at the snprintf() return value. */
-+ if (retcount < 0)
-+ {
-+ /* HP-UX 10.20 snprintf() is doubly deficient:
-+ It doesn't understand the '%n' directive,
-+ *and* it returns -1 (rather than the length
-+ that would have been required) when the
-+ buffer is too small. */
-+ size_t bigger_need =
-+ xsum (xtimes (allocated, 2), 12);
-+ ENSURE_ALLOCATION (bigger_need);
-+ continue;
-+ }
-+ else
-+ count = retcount;
-+ }
-+ }
-+#endif
-+
-+ /* Attempt to handle failure. */
-+ if (count < 0)
-+ {
-+ if (!(result == resultbuf || result == NULL))
-+ free (result);
-+ if (buf_malloced != NULL)
-+ free (buf_malloced);
-+ CLEANUP ();
-+ errno = EINVAL;
-+ return NULL;
-+ }
-+
-+#if !USE_SNPRINTF
-+ if (count >= tmp_length)
-+ /* tmp_length was incorrectly calculated - fix the
-+ code above! */
-+ abort ();
-+#endif
-+
-+ /* Make room for the result. */
-+ if (count >= maxlen)
-+ {
-+ /* Need at least count bytes. But allocate
-+ proportionally, to avoid looping eternally if
-+ snprintf() reports a too small count. */
-+ size_t n =
-+ xmax (xsum (length, count), xtimes (allocated, 2));
-+
-+ ENSURE_ALLOCATION (n);
-+#if USE_SNPRINTF
-+ continue;
-+#endif
-+ }
-+
-+#if USE_SNPRINTF
-+ /* The snprintf() result did fit. */
-+#else
-+ /* Append the sprintf() result. */
-+ memcpy (result + length, tmp, count * sizeof (CHAR_T));
-+ if (tmp != tmpbuf)
-+ free (tmp);
-+#endif
-+
-+ length += count;
-+ break;
-+ }
-+ }
-+ }
-+ }
-+
-+ /* Add the final NUL. */
-+ ENSURE_ALLOCATION (xsum (length, 1));
-+ result[length] = '\0';
-+
-+ if (result != resultbuf && length + 1 < allocated)
-+ {
-+ /* Shrink the allocated memory if possible. */
-+ CHAR_T *memory;
-+
-+ memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T));
-+ if (memory != NULL)
-+ result = memory;
-+ }
-+
-+ if (buf_malloced != NULL)
-+ free (buf_malloced);
-+ CLEANUP ();
-+ *lengthp = length;
-+ return result;
-+
-+ out_of_memory:
-+ if (!(result == resultbuf || result == NULL))
-+ free (result);
-+ if (buf_malloced != NULL)
-+ free (buf_malloced);
-+ out_of_memory_1:
-+ CLEANUP ();
-+ errno = ENOMEM;
-+ return NULL;
-+ }
-+}
-+
-+#undef SNPRINTF
-+#undef USE_SNPRINTF
-+#undef PRINTF_PARSE
-+#undef DIRECTIVES
-+#undef DIRECTIVE
-+#undef CHAR_T
-+#undef VASNPRINTF
---- lrzsz-0.12.20.safe/intl/vasnprintf.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/vasnprintf.h 2004-09-12 14:40:34.667700664 -0400
-@@ -0,0 +1,61 @@
-+/* vsprintf with automatic memory allocation.
-+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _VASNPRINTF_H
-+#define _VASNPRINTF_H
-+
-+/* Get va_list. */
-+#include <stdarg.h>
-+
-+/* Get size_t. */
-+#include <stddef.h>
-+
-+#ifndef __attribute__
-+/* This feature is available in gcc versions 2.5 and later. */
-+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
-+# define __attribute__(Spec) /* empty */
-+# endif
-+/* The __-protected variants of `format' and `printf' attributes
-+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
-+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-+# define __format__ format
-+# define __printf__ printf
-+# endif
-+#endif
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/* Write formatted output to a string dynamically allocated with malloc().
-+ You can pass a preallocated buffer for the result in RESULTBUF and its
-+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
-+ If successful, return the address of the string (this may be = RESULTBUF
-+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
-+ number of resulting bytes, excluding the trailing NUL. Upon error, set
-+ errno and return NULL. */
-+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
-+ __attribute__ ((__format__ (__printf__, 3, 4)));
-+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
-+ __attribute__ ((__format__ (__printf__, 3, 0)));
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* _VASNPRINTF_H */
---- lrzsz-0.12.20.safe/intl/vasnwprintf.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/vasnwprintf.h 2004-09-12 14:40:34.673699752 -0400
-@@ -0,0 +1,46 @@
-+/* vswprintf with automatic memory allocation.
-+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _VASNWPRINTF_H
-+#define _VASNWPRINTF_H
-+
-+/* Get va_list. */
-+#include <stdarg.h>
-+
-+/* Get wchar_t, size_t. */
-+#include <stddef.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/* Write formatted output to a string dynamically allocated with malloc().
-+ You can pass a preallocated buffer for the result in RESULTBUF and its
-+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
-+ If successful, return the address of the string (this may be = RESULTBUF
-+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
-+ number of resulting bytes, excluding the trailing NUL. Upon error, set
-+ errno and return NULL. */
-+extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...);
-+extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* _VASNWPRINTF_H */
---- lrzsz-0.12.20.safe/intl/VERSION 1998-04-26 09:22:37.000000000 -0400
-+++ lrzsz-0.12.20/intl/VERSION 2004-09-12 14:40:34.679698840 -0400
-@@ -1 +1 @@
--GNU gettext library from gettext-0.10.32
-+GNU gettext library from gettext-0.14.1
---- lrzsz-0.12.20.safe/intl/wprintf-parse.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/wprintf-parse.h 2004-09-12 14:40:34.695696408 -0400
-@@ -0,0 +1,75 @@
-+/* Parse printf format string.
-+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _WPRINTF_PARSE_H
-+#define _WPRINTF_PARSE_H
-+
-+#include "printf-args.h"
-+
-+
-+/* Flags */
-+#define FLAG_GROUP 1 /* ' flag */
-+#define FLAG_LEFT 2 /* - flag */
-+#define FLAG_SHOWSIGN 4 /* + flag */
-+#define FLAG_SPACE 8 /* space flag */
-+#define FLAG_ALT 16 /* # flag */
-+#define FLAG_ZERO 32
-+
-+/* arg_index value indicating that no argument is consumed. */
-+#define ARG_NONE (~(size_t)0)
-+
-+/* A parsed directive. */
-+typedef struct
-+{
-+ const wchar_t* dir_start;
-+ const wchar_t* dir_end;
-+ int flags;
-+ const wchar_t* width_start;
-+ const wchar_t* width_end;
-+ size_t width_arg_index;
-+ const wchar_t* precision_start;
-+ const wchar_t* precision_end;
-+ size_t precision_arg_index;
-+ wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
-+ size_t arg_index;
-+}
-+wchar_t_directive;
-+
-+/* A parsed format string. */
-+typedef struct
-+{
-+ size_t count;
-+ wchar_t_directive *dir;
-+ size_t max_width_length;
-+ size_t max_precision_length;
-+}
-+wchar_t_directives;
-+
-+
-+/* Parses the format string. Fills in the number N of directives, and fills
-+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
-+ to the end of the format string. Also fills in the arg_type fields of the
-+ arguments and the needed count of arguments. */
-+#ifdef STATIC
-+STATIC
-+#else
-+extern
-+#endif
-+int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a);
-+
-+#endif /* _WPRINTF_PARSE_H */
---- lrzsz-0.12.20.safe/intl/xopen-msg.sed 1998-04-26 09:20:52.000000000 -0400
-+++ lrzsz-0.12.20/intl/xopen-msg.sed 1969-12-31 19:00:00.000000000 -0500
-@@ -1,104 +0,0 @@
--# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
--# Copyright (C) 1995 Free Software Foundation, Inc.
--# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
--#
--# This program is free software; you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation; either version 2, or (at your option)
--# any later version.
--#
--# This program is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--# GNU General Public License for more details.
--#
--# You should have received a copy of the GNU General Public License
--# along with this program; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--#
--#
--# The first directive in the .msg should be the definition of the
--# message set number. We use always set number 1.
--#
--1 {
-- i\
--$set 1 # Automatically created by po2msg.sed
-- h
-- s/.*/0/
-- x
--}
--#
--# We copy all comments into the .msg file. Perhaps they can help.
--#
--/^#/ s/^#[ ]*/$ /p
--#
--# We copy the original message as a comment into the .msg file.
--#
--/^msgid/ {
--# Does not work now
--# /"$/! {
--# s/\\$//
--# s/$/ ... (more lines following)"/
--# }
-- s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
-- p
--}
--#
--# The .msg file contains, other then the .po file, only the translations
--# but each given a unique ID. Starting from 1 and incrementing by 1 for
--# each message we assign them to the messages.
--# It is important that the .po file used to generate the cat-id-tbl.c file
--# (with po-to-tbl) is the same as the one used here. (At least the order
--# of declarations must not be changed.)
--#
--/^msgstr/ {
-- s/msgstr[ ]*"\(.*\)"/\1/
-- x
--# The following nice solution is by
--# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
-- td
--# Increment a decimal number in pattern space.
--# First hide trailing `9' digits.
-- :d
-- s/9\(_*\)$/_\1/
-- td
--# Assure at least one digit is available.
-- s/^\(_*\)$/0\1/
--# Increment the last digit.
-- s/8\(_*\)$/9\1/
-- s/7\(_*\)$/8\1/
-- s/6\(_*\)$/7\1/
-- s/5\(_*\)$/6\1/
-- s/4\(_*\)$/5\1/
-- s/3\(_*\)$/4\1/
-- s/2\(_*\)$/3\1/
-- s/1\(_*\)$/2\1/
-- s/0\(_*\)$/1\1/
--# Convert the hidden `9' digits to `0's.
-- s/_/0/g
-- x
--# Bring the line in the format `<number> <message>'
-- G
-- s/^[^\n]*$/& /
-- s/\(.*\)\n\([0-9]*\)/\2 \1/
--# Clear flag from last substitution.
-- tb
--# Append the next line.
-- :b
-- N
--# Look whether second part is a continuation line.
-- s/\(.*\n\)"\(.*\)"/\1\2/
--# Yes, then branch.
-- ta
-- P
-- D
--# Note that `D' includes a jump to the start!!
--# We found a continuation line. But before printing insert '\'.
-- :a
-- s/\(.*\)\(\n.*\)/\1\\\2/
-- P
--# We cannot use the sed command `D' here
-- s/.*\n\(.*\)/\1/
-- tb
--}
--d
---- lrzsz-0.12.20.safe/intl/xsize.h 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/intl/xsize.h 2004-09-12 14:40:34.700695648 -0400
-@@ -0,0 +1,109 @@
-+/* xsize.h -- Checked size_t computations.
-+
-+ Copyright (C) 2003 Free Software Foundation, Inc.
-+
-+ This program is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published
-+ by the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+ USA. */
-+
-+#ifndef _XSIZE_H
-+#define _XSIZE_H
-+
-+/* Get size_t. */
-+#include <stddef.h>
-+
-+/* Get SIZE_MAX. */
-+#include <limits.h>
-+#if HAVE_STDINT_H
-+# include <stdint.h>
-+#endif
-+
-+/* The size of memory objects is often computed through expressions of
-+ type size_t. Example:
-+ void* p = malloc (header_size + n * element_size).
-+ These computations can lead to overflow. When this happens, malloc()
-+ returns a piece of memory that is way too small, and the program then
-+ crashes while attempting to fill the memory.
-+ To avoid this, the functions and macros in this file check for overflow.
-+ The convention is that SIZE_MAX represents overflow.
-+ malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
-+ implementation that uses mmap --, it's recommended to use size_overflow_p()
-+ or size_in_bounds_p() before invoking malloc().
-+ The example thus becomes:
-+ size_t size = xsum (header_size, xtimes (n, element_size));
-+ void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
-+*/
-+
-+/* Convert an arbitrary value >= 0 to type size_t. */
-+#define xcast_size_t(N) \
-+ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
-+
-+/* Sum of two sizes, with overflow check. */
-+static inline size_t
-+#if __GNUC__ >= 3
-+__attribute__ ((__pure__))
-+#endif
-+xsum (size_t size1, size_t size2)
-+{
-+ size_t sum = size1 + size2;
-+ return (sum >= size1 ? sum : SIZE_MAX);
-+}
-+
-+/* Sum of three sizes, with overflow check. */
-+static inline size_t
-+#if __GNUC__ >= 3
-+__attribute__ ((__pure__))
-+#endif
-+xsum3 (size_t size1, size_t size2, size_t size3)
-+{
-+ return xsum (xsum (size1, size2), size3);
-+}
-+
-+/* Sum of four sizes, with overflow check. */
-+static inline size_t
-+#if __GNUC__ >= 3
-+__attribute__ ((__pure__))
-+#endif
-+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
-+{
-+ return xsum (xsum (xsum (size1, size2), size3), size4);
-+}
-+
-+/* Maximum of two sizes, with overflow check. */
-+static inline size_t
-+#if __GNUC__ >= 3
-+__attribute__ ((__pure__))
-+#endif
-+xmax (size_t size1, size_t size2)
-+{
-+ /* No explicit check is needed here, because for any n:
-+ max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
-+ return (size1 >= size2 ? size1 : size2);
-+}
-+
-+/* Multiplication of a count with an element size, with overflow check.
-+ The count must be >= 0 and the element size must be > 0.
-+ This is a macro, not an inline function, so that it works correctly even
-+ when N is of a wider tupe and N > SIZE_MAX. */
-+#define xtimes(N, ELSIZE) \
-+ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
-+
-+/* Check for overflow. */
-+#define size_overflow_p(SIZE) \
-+ ((SIZE) == SIZE_MAX)
-+/* Check against overflow. */
-+#define size_in_bounds_p(SIZE) \
-+ ((SIZE) != SIZE_MAX)
-+
-+#endif /* _XSIZE_H */
---- lrzsz-0.12.20.safe/m4/ChangeLog 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/ChangeLog 2004-09-12 14:40:35.054641840 -0400
-@@ -0,0 +1,32 @@
-+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
-+
-+ * codeset.m4: New file, from gettext-0.14.1.
-+ * gettext.m4: New file, from gettext-0.14.1.
-+ * glibc21.m4: New file, from gettext-0.14.1.
-+ * iconv.m4: New file, from gettext-0.14.1.
-+ * intdiv0.m4: New file, from gettext-0.14.1.
-+ * intmax.m4: New file, from gettext-0.14.1.
-+ * inttypes.m4: New file, from gettext-0.14.1.
-+ * inttypes_h.m4: New file, from gettext-0.14.1.
-+ * inttypes-pri.m4: New file, from gettext-0.14.1.
-+ * isc-posix.m4: New file, from gettext-0.14.1.
-+ * lcmessage.m4: New file, from gettext-0.14.1.
-+ * lib-ld.m4: New file, from gettext-0.14.1.
-+ * lib-link.m4: New file, from gettext-0.14.1.
-+ * lib-prefix.m4: New file, from gettext-0.14.1.
-+ * longdouble.m4: New file, from gettext-0.14.1.
-+ * longlong.m4: New file, from gettext-0.14.1.
-+ * nls.m4: New file, from gettext-0.14.1.
-+ * po.m4: New file, from gettext-0.14.1.
-+ * printf-posix.m4: New file, from gettext-0.14.1.
-+ * progtest.m4: New file, from gettext-0.14.1.
-+ * signed.m4: New file, from gettext-0.14.1.
-+ * size_max.m4: New file, from gettext-0.14.1.
-+ * stdint_h.m4: New file, from gettext-0.14.1.
-+ * uintmax_t.m4: New file, from gettext-0.14.1.
-+ * ulonglong.m4: New file, from gettext-0.14.1.
-+ * wchar_t.m4: New file, from gettext-0.14.1.
-+ * wint_t.m4: New file, from gettext-0.14.1.
-+ * xsize.m4: New file, from gettext-0.14.1.
-+ * Makefile.am: New file.
-+
---- lrzsz-0.12.20.safe/m4/codeset.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/codeset.m4 2004-09-12 14:40:34.820677408 -0400
-@@ -0,0 +1,23 @@
-+# codeset.m4 serial AM1 (gettext-0.10.40)
-+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([AM_LANGINFO_CODESET],
-+[
-+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
-+ [AC_TRY_LINK([#include <langinfo.h>],
-+ [char* cs = nl_langinfo(CODESET);],
-+ am_cv_langinfo_codeset=yes,
-+ am_cv_langinfo_codeset=no)
-+ ])
-+ if test $am_cv_langinfo_codeset = yes; then
-+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
-+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/gettext.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/gettext.m4 2004-09-12 14:40:34.826676496 -0400
-@@ -0,0 +1,487 @@
-+# gettext.m4 serial 28 (gettext-0.13)
-+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-+
-+dnl Macro to add for using GNU gettext.
-+
-+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
-+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
-+dnl default (if it is not specified or empty) is 'no-libtool'.
-+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
-+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
-+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
-+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
-+dnl depending on --{enable,disable}-{shared,static} and on the presence of
-+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
-+dnl $(top_builddir)/intl/libintl.a will be created.
-+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
-+dnl implementations (in libc or libintl) without the ngettext() function
-+dnl will be ignored. If NEEDSYMBOL is specified and is
-+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
-+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
-+dnl INTLDIR is used to find the intl libraries. If empty,
-+dnl the value `$(top_builddir)/intl/' is used.
-+dnl
-+dnl The result of the configuration is one of three cases:
-+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
-+dnl and used.
-+dnl Catalog format: GNU --> install in $(datadir)
-+dnl Catalog extension: .mo after installation, .gmo in source tree
-+dnl 2) GNU gettext has been found in the system's C library.
-+dnl Catalog format: GNU --> install in $(datadir)
-+dnl Catalog extension: .mo after installation, .gmo in source tree
-+dnl 3) No internationalization, always use English msgid.
-+dnl Catalog format: none
-+dnl Catalog extension: none
-+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
-+dnl The use of .gmo is historical (it was needed to avoid overwriting the
-+dnl GNU format catalogs when building on a platform with an X/Open gettext),
-+dnl but we keep it in order not to force irrelevant filename changes on the
-+dnl maintainers.
-+dnl
-+AC_DEFUN([AM_GNU_GETTEXT],
-+[
-+ dnl Argument checking.
-+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
-+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
-+])])])])])
-+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
-+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
-+])])])])
-+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
-+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
-+
-+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
-+ ifelse(gt_included_intl, yes, [
-+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
-+ ])
-+
-+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
-+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-+ AC_REQUIRE([AC_LIB_RPATH])
-+
-+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
-+ dnl Ideally we would do this search only after the
-+ dnl if test "$USE_NLS" = "yes"; then
-+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
-+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
-+ dnl the configure script would need to contain the same shell code
-+ dnl again, outside any 'if'. There are two solutions:
-+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
-+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
-+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
-+ dnl documented, we avoid it.
-+ ifelse(gt_included_intl, yes, , [
-+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-+ ])
-+
-+ dnl Set USE_NLS.
-+ AM_NLS
-+
-+ ifelse(gt_included_intl, yes, [
-+ BUILD_INCLUDED_LIBINTL=no
-+ USE_INCLUDED_LIBINTL=no
-+ ])
-+ LIBINTL=
-+ LTLIBINTL=
-+ POSUB=
-+
-+ dnl If we use NLS figure out what method
-+ if test "$USE_NLS" = "yes"; then
-+ gt_use_preinstalled_gnugettext=no
-+ ifelse(gt_included_intl, yes, [
-+ AC_MSG_CHECKING([whether included gettext is requested])
-+ AC_ARG_WITH(included-gettext,
-+ [ --with-included-gettext use the GNU gettext library included here],
-+ nls_cv_force_use_gnu_gettext=$withval,
-+ nls_cv_force_use_gnu_gettext=no)
-+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-+
-+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-+ ])
-+ dnl User does not insist on using GNU NLS library. Figure out what
-+ dnl to use. If GNU gettext is available we use this. Else we have
-+ dnl to fall back to GNU NLS library.
-+
-+ dnl Add a version number to the cache macros.
-+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
-+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
-+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
-+
-+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
-+ [AC_TRY_LINK([#include <libintl.h>
-+]ifelse([$2], [need-formatstring-macros],
-+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-+#endif
-+changequote(,)dnl
-+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-+changequote([,])dnl
-+], [])[extern int _nl_msg_cat_cntr;
-+extern int *_nl_domain_bindings;],
-+ [bindtextdomain ("", "");
-+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
-+ gt_cv_func_gnugettext_libc=yes,
-+ gt_cv_func_gnugettext_libc=no)])
-+
-+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
-+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
-+ ifelse(gt_included_intl, yes, , [
-+ AM_ICONV_LINK
-+ ])
-+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
-+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
-+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
-+ dnl even if libiconv doesn't exist.
-+ AC_LIB_LINKFLAGS_BODY([intl])
-+ AC_CACHE_CHECK([for GNU gettext in libintl],
-+ gt_cv_func_gnugettext_libintl,
-+ [gt_save_CPPFLAGS="$CPPFLAGS"
-+ CPPFLAGS="$CPPFLAGS $INCINTL"
-+ gt_save_LIBS="$LIBS"
-+ LIBS="$LIBS $LIBINTL"
-+ dnl Now see whether libintl exists and does not depend on libiconv.
-+ AC_TRY_LINK([#include <libintl.h>
-+]ifelse([$2], [need-formatstring-macros],
-+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-+#endif
-+changequote(,)dnl
-+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-+changequote([,])dnl
-+], [])[extern int _nl_msg_cat_cntr;
-+extern
-+#ifdef __cplusplus
-+"C"
-+#endif
-+const char *_nl_expand_alias ();],
-+ [bindtextdomain ("", "");
-+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
-+ gt_cv_func_gnugettext_libintl=yes,
-+ gt_cv_func_gnugettext_libintl=no)
-+ dnl Now see whether libintl exists and depends on libiconv.
-+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
-+ LIBS="$LIBS $LIBICONV"
-+ AC_TRY_LINK([#include <libintl.h>
-+]ifelse([$2], [need-formatstring-macros],
-+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-+#endif
-+changequote(,)dnl
-+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-+changequote([,])dnl
-+], [])[extern int _nl_msg_cat_cntr;
-+extern
-+#ifdef __cplusplus
-+"C"
-+#endif
-+const char *_nl_expand_alias ();],
-+ [bindtextdomain ("", "");
-+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
-+ [LIBINTL="$LIBINTL $LIBICONV"
-+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
-+ gt_cv_func_gnugettext_libintl=yes
-+ ])
-+ fi
-+ CPPFLAGS="$gt_save_CPPFLAGS"
-+ LIBS="$gt_save_LIBS"])
-+ fi
-+
-+ dnl If an already present or preinstalled GNU gettext() is found,
-+ dnl use it. But if this macro is used in GNU gettext, and GNU
-+ dnl gettext is already preinstalled in libintl, we update this
-+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
-+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
-+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
-+ && test "$PACKAGE" != gettext-runtime \
-+ && test "$PACKAGE" != gettext-tools; }; then
-+ gt_use_preinstalled_gnugettext=yes
-+ else
-+ dnl Reset the values set by searching for libintl.
-+ LIBINTL=
-+ LTLIBINTL=
-+ INCINTL=
-+ fi
-+
-+ ifelse(gt_included_intl, yes, [
-+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
-+ dnl GNU gettext is not found in the C library.
-+ dnl Fall back on included GNU gettext library.
-+ nls_cv_use_gnu_gettext=yes
-+ fi
-+ fi
-+
-+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
-+ dnl Mark actions used to generate GNU NLS library.
-+ BUILD_INCLUDED_LIBINTL=yes
-+ USE_INCLUDED_LIBINTL=yes
-+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
-+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
-+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
-+ fi
-+
-+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
-+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
-+ dnl Mark actions to use GNU gettext tools.
-+ CATOBJEXT=.gmo
-+ fi
-+ ])
-+
-+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
-+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
-+ AC_DEFINE(ENABLE_NLS, 1,
-+ [Define to 1 if translation of program messages to the user's native language
-+ is requested.])
-+ else
-+ USE_NLS=no
-+ fi
-+ fi
-+
-+ AC_MSG_CHECKING([whether to use NLS])
-+ AC_MSG_RESULT([$USE_NLS])
-+ if test "$USE_NLS" = "yes"; then
-+ AC_MSG_CHECKING([where the gettext function comes from])
-+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
-+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
-+ gt_source="external libintl"
-+ else
-+ gt_source="libc"
-+ fi
-+ else
-+ gt_source="included intl directory"
-+ fi
-+ AC_MSG_RESULT([$gt_source])
-+ fi
-+
-+ if test "$USE_NLS" = "yes"; then
-+
-+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
-+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
-+ AC_MSG_CHECKING([how to link with libintl])
-+ AC_MSG_RESULT([$LIBINTL])
-+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
-+ fi
-+
-+ dnl For backward compatibility. Some packages may be using this.
-+ AC_DEFINE(HAVE_GETTEXT, 1,
-+ [Define if the GNU gettext() function is already present or preinstalled.])
-+ AC_DEFINE(HAVE_DCGETTEXT, 1,
-+ [Define if the GNU dcgettext() function is already present or preinstalled.])
-+ fi
-+
-+ dnl We need to process the po/ directory.
-+ POSUB=po
-+ fi
-+
-+ ifelse(gt_included_intl, yes, [
-+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
-+ dnl to 'yes' because some of the testsuite requires it.
-+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
-+ BUILD_INCLUDED_LIBINTL=yes
-+ fi
-+
-+ dnl Make all variables we use known to autoconf.
-+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
-+ AC_SUBST(USE_INCLUDED_LIBINTL)
-+ AC_SUBST(CATOBJEXT)
-+
-+ dnl For backward compatibility. Some configure.ins may be using this.
-+ nls_cv_header_intl=
-+ nls_cv_header_libgt=
-+
-+ dnl For backward compatibility. Some Makefiles may be using this.
-+ DATADIRNAME=share
-+ AC_SUBST(DATADIRNAME)
-+
-+ dnl For backward compatibility. Some Makefiles may be using this.
-+ INSTOBJEXT=.mo
-+ AC_SUBST(INSTOBJEXT)
-+
-+ dnl For backward compatibility. Some Makefiles may be using this.
-+ GENCAT=gencat
-+ AC_SUBST(GENCAT)
-+
-+ dnl For backward compatibility. Some Makefiles may be using this.
-+ if test "$USE_INCLUDED_LIBINTL" = yes; then
-+ INTLOBJS="\$(GETTOBJS)"
-+ fi
-+ AC_SUBST(INTLOBJS)
-+
-+ dnl Enable libtool support if the surrounding package wishes it.
-+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
-+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
-+ ])
-+
-+ dnl For backward compatibility. Some Makefiles may be using this.
-+ INTLLIBS="$LIBINTL"
-+ AC_SUBST(INTLLIBS)
-+
-+ dnl Make all documented variables known to autoconf.
-+ AC_SUBST(LIBINTL)
-+ AC_SUBST(LTLIBINTL)
-+ AC_SUBST(POSUB)
-+])
-+
-+
-+dnl Checks for all prerequisites of the intl subdirectory,
-+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
-+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
-+AC_DEFUN([AM_INTL_SUBDIR],
-+[
-+ AC_REQUIRE([AC_PROG_INSTALL])dnl
-+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
-+ AC_REQUIRE([AC_PROG_CC])dnl
-+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+ AC_REQUIRE([AC_PROG_RANLIB])dnl
-+ AC_REQUIRE([AC_ISC_POSIX])dnl
-+ AC_REQUIRE([AC_HEADER_STDC])dnl
-+ AC_REQUIRE([AC_C_CONST])dnl
-+ AC_REQUIRE([bh_C_SIGNED])dnl
-+ AC_REQUIRE([AC_C_INLINE])dnl
-+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
-+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-+ AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
-+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
-+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
-+ AC_REQUIRE([gt_TYPE_WINT_T])dnl
-+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+ AC_REQUIRE([gt_TYPE_INTMAX_T])
-+ AC_REQUIRE([gt_PRINTF_POSIX])
-+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-+ AC_REQUIRE([AC_FUNC_MMAP])dnl
-+ AC_REQUIRE([jm_GLIBC21])dnl
-+ AC_REQUIRE([gt_INTDIV0])dnl
-+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
-+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
-+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
-+ AC_REQUIRE([gl_XSIZE])dnl
-+
-+ AC_CHECK_TYPE([ptrdiff_t], ,
-+ [AC_DEFINE([ptrdiff_t], [long],
-+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
-+ ])
-+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
-+stdlib.h string.h unistd.h sys/param.h])
-+ AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
-+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
-+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
-+__fsetlocking])
-+
-+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
-+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
-+ gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
-+ gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
-+
-+ dnl Use the *_unlocked functions only if they are declared.
-+ dnl (because some of them were defined without being declared in Solaris
-+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
-+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
-+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
-+ gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
-+ gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
-+ gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
-+
-+ case $gt_cv_func_printf_posix in
-+ *yes) HAVE_POSIX_PRINTF=1 ;;
-+ *) HAVE_POSIX_PRINTF=0 ;;
-+ esac
-+ AC_SUBST([HAVE_POSIX_PRINTF])
-+ if test "$ac_cv_func_asprintf" = yes; then
-+ HAVE_ASPRINTF=1
-+ else
-+ HAVE_ASPRINTF=0
-+ fi
-+ AC_SUBST([HAVE_ASPRINTF])
-+ if test "$ac_cv_func_snprintf" = yes; then
-+ HAVE_SNPRINTF=1
-+ else
-+ HAVE_SNPRINTF=0
-+ fi
-+ AC_SUBST([HAVE_SNPRINTF])
-+ if test "$ac_cv_func_wprintf" = yes; then
-+ HAVE_WPRINTF=1
-+ else
-+ HAVE_WPRINTF=0
-+ fi
-+ AC_SUBST([HAVE_WPRINTF])
-+
-+ AM_ICONV
-+ AM_LANGINFO_CODESET
-+ if test $ac_cv_header_locale_h = yes; then
-+ AM_LC_MESSAGES
-+ fi
-+
-+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
-+ dnl because plural.y uses bison specific features. It requires at least
-+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
-+ dnl compile.
-+ dnl bison is only needed for the maintainer (who touches plural.y). But in
-+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
-+ dnl the rule in general Makefile. Now, some people carelessly touch the
-+ dnl files or have a broken "make" program, hence the plural.c rule will
-+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
-+ dnl present or too old.
-+ AC_CHECK_PROGS([INTLBISON], [bison])
-+ if test -z "$INTLBISON"; then
-+ ac_verc_fail=yes
-+ else
-+ dnl Found it, now check the version.
-+ AC_MSG_CHECKING([version of bison])
-+changequote(<<,>>)dnl
-+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
-+ case $ac_prog_version in
-+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
-+changequote([,])dnl
-+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
-+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-+ esac
-+ AC_MSG_RESULT([$ac_prog_version])
-+ fi
-+ if test $ac_verc_fail = yes; then
-+ INTLBISON=:
-+ fi
-+])
-+
-+
-+dnl gt_CHECK_DECL(FUNC, INCLUDES)
-+dnl Check whether a function is declared.
-+AC_DEFUN([gt_CHECK_DECL],
-+[
-+ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
-+ [AC_TRY_COMPILE([$2], [
-+#ifndef $1
-+ char *p = (char *) $1;
-+#endif
-+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
-+ if test $ac_cv_have_decl_$1 = yes; then
-+ gt_value=1
-+ else
-+ gt_value=0
-+ fi
-+ AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
-+ [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
-+])
-+
-+
-+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
-+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
---- lrzsz-0.12.20.safe/m4/glibc21.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/glibc21.m4 2004-09-12 14:40:34.833675432 -0400
-@@ -0,0 +1,32 @@
-+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
-+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# Test for the GNU C Library, version 2.1 or newer.
-+# From Bruno Haible.
-+
-+AC_DEFUN([jm_GLIBC21],
-+ [
-+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
-+ ac_cv_gnu_library_2_1,
-+ [AC_EGREP_CPP([Lucky GNU user],
-+ [
-+#include <features.h>
-+#ifdef __GNU_LIBRARY__
-+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
-+ Lucky GNU user
-+ #endif
-+#endif
-+ ],
-+ ac_cv_gnu_library_2_1=yes,
-+ ac_cv_gnu_library_2_1=no)
-+ ]
-+ )
-+ AC_SUBST(GLIBC21)
-+ GLIBC21="$ac_cv_gnu_library_2_1"
-+ ]
-+)
---- lrzsz-0.12.20.safe/m4/iconv.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/iconv.m4 2004-09-12 14:40:34.839674520 -0400
-@@ -0,0 +1,103 @@
-+# iconv.m4 serial AM4 (gettext-0.11.3)
-+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
-+[
-+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
-+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-+ AC_REQUIRE([AC_LIB_RPATH])
-+
-+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
-+ dnl accordingly.
-+ AC_LIB_LINKFLAGS_BODY([iconv])
-+])
-+
-+AC_DEFUN([AM_ICONV_LINK],
-+[
-+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
-+ dnl those with the standalone portable GNU libiconv installed).
-+
-+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
-+ dnl accordingly.
-+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-+
-+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
-+ dnl because if the user has installed libiconv and not disabled its use
-+ dnl via --without-libiconv-prefix, he wants to use it. The first
-+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
-+ am_save_CPPFLAGS="$CPPFLAGS"
-+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-+
-+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
-+ am_cv_func_iconv="no, consider installing GNU libiconv"
-+ am_cv_lib_iconv=no
-+ AC_TRY_LINK([#include <stdlib.h>
-+#include <iconv.h>],
-+ [iconv_t cd = iconv_open("","");
-+ iconv(cd,NULL,NULL,NULL,NULL);
-+ iconv_close(cd);],
-+ am_cv_func_iconv=yes)
-+ if test "$am_cv_func_iconv" != yes; then
-+ am_save_LIBS="$LIBS"
-+ LIBS="$LIBS $LIBICONV"
-+ AC_TRY_LINK([#include <stdlib.h>
-+#include <iconv.h>],
-+ [iconv_t cd = iconv_open("","");
-+ iconv(cd,NULL,NULL,NULL,NULL);
-+ iconv_close(cd);],
-+ am_cv_lib_iconv=yes
-+ am_cv_func_iconv=yes)
-+ LIBS="$am_save_LIBS"
-+ fi
-+ ])
-+ if test "$am_cv_func_iconv" = yes; then
-+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
-+ fi
-+ if test "$am_cv_lib_iconv" = yes; then
-+ AC_MSG_CHECKING([how to link with libiconv])
-+ AC_MSG_RESULT([$LIBICONV])
-+ else
-+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
-+ dnl either.
-+ CPPFLAGS="$am_save_CPPFLAGS"
-+ LIBICONV=
-+ LTLIBICONV=
-+ fi
-+ AC_SUBST(LIBICONV)
-+ AC_SUBST(LTLIBICONV)
-+])
-+
-+AC_DEFUN([AM_ICONV],
-+[
-+ AM_ICONV_LINK
-+ if test "$am_cv_func_iconv" = yes; then
-+ AC_MSG_CHECKING([for iconv declaration])
-+ AC_CACHE_VAL(am_cv_proto_iconv, [
-+ AC_TRY_COMPILE([
-+#include <stdlib.h>
-+#include <iconv.h>
-+extern
-+#ifdef __cplusplus
-+"C"
-+#endif
-+#if defined(__STDC__) || defined(__cplusplus)
-+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-+#else
-+size_t iconv();
-+#endif
-+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
-+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
-+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-+ AC_MSG_RESULT([$]{ac_t:-
-+ }[$]am_cv_proto_iconv)
-+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
-+ [Define as const if the declaration of iconv() needs const.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/intdiv0.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/intdiv0.m4 2004-09-12 14:40:34.845673608 -0400
-@@ -0,0 +1,72 @@
-+# intdiv0.m4 serial 1 (gettext-0.11.3)
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([gt_INTDIV0],
-+[
-+ AC_REQUIRE([AC_PROG_CC])dnl
-+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+
-+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
-+ gt_cv_int_divbyzero_sigfpe,
-+ [
-+ AC_TRY_RUN([
-+#include <stdlib.h>
-+#include <signal.h>
-+
-+static void
-+#ifdef __cplusplus
-+sigfpe_handler (int sig)
-+#else
-+sigfpe_handler (sig) int sig;
-+#endif
-+{
-+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
-+ exit (sig != SIGFPE);
-+}
-+
-+int x = 1;
-+int y = 0;
-+int z;
-+int nan;
-+
-+int main ()
-+{
-+ signal (SIGFPE, sigfpe_handler);
-+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
-+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
-+ signal (SIGTRAP, sigfpe_handler);
-+#endif
-+/* Linux/SPARC yields signal SIGILL. */
-+#if defined (__sparc__) && defined (__linux__)
-+ signal (SIGILL, sigfpe_handler);
-+#endif
-+
-+ z = x / y;
-+ nan = y / y;
-+ exit (1);
-+}
-+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
-+ [
-+ # Guess based on the CPU.
-+ case "$host_cpu" in
-+ alpha* | i[34567]86 | m68k | s390*)
-+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
-+ *)
-+ gt_cv_int_divbyzero_sigfpe="guessing no";;
-+ esac
-+ ])
-+ ])
-+ case "$gt_cv_int_divbyzero_sigfpe" in
-+ *yes) value=1;;
-+ *) value=0;;
-+ esac
-+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
-+ [Define if integer division by zero raises signal SIGFPE.])
-+])
---- lrzsz-0.12.20.safe/m4/intmax.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/intmax.m4 2004-09-12 14:40:34.855672088 -0400
-@@ -0,0 +1,32 @@
-+# intmax.m4 serial 1 (gettext-0.12)
-+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
-+dnl find a replacement if it is lacking.
-+
-+AC_DEFUN([gt_TYPE_INTMAX_T],
-+[
-+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+ AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
-+ [AC_TRY_COMPILE([
-+#include <stddef.h>
-+#include <stdlib.h>
-+#if HAVE_STDINT_H_WITH_UINTMAX
-+#include <stdint.h>
-+#endif
-+#if HAVE_INTTYPES_H_WITH_UINTMAX
-+#include <inttypes.h>
-+#endif
-+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
-+ if test $gt_cv_c_intmax_t = yes; then
-+ AC_DEFINE(HAVE_INTMAX_T, 1,
-+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/inttypes_h.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/inttypes_h.m4 2004-09-12 14:40:34.868670112 -0400
-@@ -0,0 +1,28 @@
-+# inttypes_h.m4 serial 5 (gettext-0.12)
-+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
-+# doesn't clash with <sys/types.h>, and declares uintmax_t.
-+
-+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
-+[
-+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
-+ [AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <inttypes.h>],
-+ [uintmax_t i = (uintmax_t) -1;],
-+ jm_ac_cv_header_inttypes_h=yes,
-+ jm_ac_cv_header_inttypes_h=no)])
-+ if test $jm_ac_cv_header_inttypes_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
-+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
-+ and declares uintmax_t. ])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/inttypes.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/inttypes.m4 2004-09-12 14:40:34.861671176 -0400
-@@ -0,0 +1,27 @@
-+# inttypes.m4 serial 1 (gettext-0.11.4)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
-+# <sys/types.h>.
-+
-+AC_DEFUN([gt_HEADER_INTTYPES_H],
-+[
-+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
-+ [
-+ AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <inttypes.h>],
-+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
-+ ])
-+ if test $gt_cv_header_inttypes_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
-+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/inttypes-pri.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/inttypes-pri.m4 2004-09-12 14:40:34.874669200 -0400
-@@ -0,0 +1,32 @@
-+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
-+# macros to non-string values. This is the case on AIX 4.3.3.
-+
-+AC_DEFUN([gt_INTTYPES_PRI],
-+[
-+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
-+ if test $gt_cv_header_inttypes_h = yes; then
-+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
-+ gt_cv_inttypes_pri_broken,
-+ [
-+ AC_TRY_COMPILE([#include <inttypes.h>
-+#ifdef PRId32
-+char *p = PRId32;
-+#endif
-+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
-+ ])
-+ fi
-+ if test "$gt_cv_inttypes_pri_broken" = yes; then
-+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
-+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/isc-posix.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/isc-posix.m4 2004-09-12 14:40:34.885667528 -0400
-@@ -0,0 +1,26 @@
-+# isc-posix.m4 serial 2 (gettext-0.11.2)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
-+
-+# This test replaces the one in autoconf.
-+# Currently this macro should have the same name as the autoconf macro
-+# because gettext's gettext.m4 (distributed in the automake package)
-+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-+# give these diagnostics:
-+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-+
-+undefine([AC_ISC_POSIX])
-+
-+AC_DEFUN([AC_ISC_POSIX],
-+ [
-+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
-+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
-+ ]
-+)
---- lrzsz-0.12.20.safe/m4/lcmessage.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/lcmessage.m4 2004-09-12 14:40:34.902664944 -0400
-@@ -0,0 +1,32 @@
-+# lcmessage.m4 serial 3 (gettext-0.11.3)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
-+
-+# Check whether LC_MESSAGES is available in <locale.h>.
-+
-+AC_DEFUN([AM_LC_MESSAGES],
-+[
-+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-+ if test $am_cv_val_LC_MESSAGES = yes; then
-+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
-+ [Define if your <locale.h> file defines LC_MESSAGES.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/lib-ld.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/lib-ld.m4 2004-09-12 14:40:34.908664032 -0400
-@@ -0,0 +1,112 @@
-+# lib-ld.m4 serial 3 (gettext-0.13)
-+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl Subroutines of libtool.m4,
-+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-+dnl with libtool.m4.
-+
-+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-+AC_DEFUN([AC_LIB_PROG_LD_GNU],
-+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-+case `$LD -v 2>&1 </dev/null` in
-+*GNU* | *'with BFD'*)
-+ acl_cv_prog_gnu_ld=yes ;;
-+*)
-+ acl_cv_prog_gnu_ld=no ;;
-+esac])
-+with_gnu_ld=$acl_cv_prog_gnu_ld
-+])
-+
-+dnl From libtool-1.4. Sets the variable LD.
-+AC_DEFUN([AC_LIB_PROG_LD],
-+[AC_ARG_WITH(gnu-ld,
-+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-+AC_REQUIRE([AC_PROG_CC])dnl
-+AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+# Prepare PATH_SEPARATOR.
-+# The user is always right.
-+if test "${PATH_SEPARATOR+set}" != set; then
-+ echo "#! /bin/sh" >conf$$.sh
-+ echo "exit 0" >>conf$$.sh
-+ chmod +x conf$$.sh
-+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-+ PATH_SEPARATOR=';'
-+ else
-+ PATH_SEPARATOR=:
-+ fi
-+ rm -f conf$$.sh
-+fi
-+ac_prog=ld
-+if test "$GCC" = yes; then
-+ # Check if gcc -print-prog-name=ld gives a path.
-+ AC_MSG_CHECKING([for ld used by GCC])
-+ case $host in
-+ *-*-mingw*)
-+ # gcc leaves a trailing carriage return which upsets mingw
-+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-+ *)
-+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-+ esac
-+ case $ac_prog in
-+ # Accept absolute paths.
-+ [[\\/]* | [A-Za-z]:[\\/]*)]
-+ [re_direlt='/[^/][^/]*/\.\./']
-+ # Canonicalize the path of ld
-+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-+ done
-+ test -z "$LD" && LD="$ac_prog"
-+ ;;
-+ "")
-+ # If it fails, then pretend we aren't using GCC.
-+ ac_prog=ld
-+ ;;
-+ *)
-+ # If it is relative, then search for the first ld in PATH.
-+ with_gnu_ld=unknown
-+ ;;
-+ esac
-+elif test "$with_gnu_ld" = yes; then
-+ AC_MSG_CHECKING([for GNU ld])
-+else
-+ AC_MSG_CHECKING([for non-GNU ld])
-+fi
-+AC_CACHE_VAL(acl_cv_path_LD,
-+[if test -z "$LD"; then
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-+ for ac_dir in $PATH; do
-+ test -z "$ac_dir" && ac_dir=.
-+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-+ acl_cv_path_LD="$ac_dir/$ac_prog"
-+ # Check to see if the program is GNU ld. I'd rather use --version,
-+ # but apparently some GNU ld's only accept -v.
-+ # Break only if it was the GNU/non-GNU ld that we prefer.
-+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-+ *GNU* | *'with BFD'*)
-+ test "$with_gnu_ld" != no && break ;;
-+ *)
-+ test "$with_gnu_ld" != yes && break ;;
-+ esac
-+ fi
-+ done
-+ IFS="$ac_save_ifs"
-+else
-+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
-+fi])
-+LD="$acl_cv_path_LD"
-+if test -n "$LD"; then
-+ AC_MSG_RESULT($LD)
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-+AC_LIB_PROG_LD_GNU
-+])
---- lrzsz-0.12.20.safe/m4/lib-link.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/lib-link.m4 2004-09-12 14:40:34.914663120 -0400
-@@ -0,0 +1,551 @@
-+# lib-link.m4 serial 4 (gettext-0.12)
-+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-+dnl the libraries corresponding to explicit and implicit dependencies.
-+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-+dnl augments the CPPFLAGS variable.
-+AC_DEFUN([AC_LIB_LINKFLAGS],
-+[
-+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-+ AC_REQUIRE([AC_LIB_RPATH])
-+ define([Name],[translit([$1],[./-], [___])])
-+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
-+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
-+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
-+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
-+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
-+ ])
-+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
-+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
-+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
-+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-+ AC_SUBST([LIB]NAME)
-+ AC_SUBST([LTLIB]NAME)
-+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
-+ dnl results of this search when this library appears as a dependency.
-+ HAVE_LIB[]NAME=yes
-+ undefine([Name])
-+ undefine([NAME])
-+])
-+
-+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-+dnl searches for libname and the libraries corresponding to explicit and
-+dnl implicit dependencies, together with the specified include files and
-+dnl the ability to compile and link the specified testcode. If found, it
-+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-+[
-+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-+ AC_REQUIRE([AC_LIB_RPATH])
-+ define([Name],[translit([$1],[./-], [___])])
-+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-+
-+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
-+ dnl accordingly.
-+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
-+
-+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
-+ dnl because if the user has installed lib[]Name and not disabled its use
-+ dnl via --without-lib[]Name-prefix, he wants to use it.
-+ ac_save_CPPFLAGS="$CPPFLAGS"
-+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-+
-+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
-+ ac_save_LIBS="$LIBS"
-+ LIBS="$LIBS $LIB[]NAME"
-+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
-+ LIBS="$ac_save_LIBS"
-+ ])
-+ if test "$ac_cv_lib[]Name" = yes; then
-+ HAVE_LIB[]NAME=yes
-+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
-+ AC_MSG_CHECKING([how to link with lib[]$1])
-+ AC_MSG_RESULT([$LIB[]NAME])
-+ else
-+ HAVE_LIB[]NAME=no
-+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
-+ dnl $INC[]NAME either.
-+ CPPFLAGS="$ac_save_CPPFLAGS"
-+ LIB[]NAME=
-+ LTLIB[]NAME=
-+ fi
-+ AC_SUBST([HAVE_LIB]NAME)
-+ AC_SUBST([LIB]NAME)
-+ AC_SUBST([LTLIB]NAME)
-+ undefine([Name])
-+ undefine([NAME])
-+])
-+
-+dnl Determine the platform dependent parameters needed to use rpath:
-+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-+dnl hardcode_direct, hardcode_minus_L.
-+AC_DEFUN([AC_LIB_RPATH],
-+[
-+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
-+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
-+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
-+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
-+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-+ . ./conftest.sh
-+ rm -f ./conftest.sh
-+ acl_cv_rpath=done
-+ ])
-+ wl="$acl_cv_wl"
-+ libext="$acl_cv_libext"
-+ shlibext="$acl_cv_shlibext"
-+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-+ hardcode_direct="$acl_cv_hardcode_direct"
-+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
-+ dnl Determine whether the user wants rpath handling at all.
-+ AC_ARG_ENABLE(rpath,
-+ [ --disable-rpath do not hardcode runtime library paths],
-+ :, enable_rpath=yes)
-+])
-+
-+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-+dnl the libraries corresponding to explicit and implicit dependencies.
-+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-+[
-+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-+ dnl By default, look in $includedir and $libdir.
-+ use_additional=yes
-+ AC_LIB_WITH_FINAL_PREFIX([
-+ eval additional_includedir=\"$includedir\"
-+ eval additional_libdir=\"$libdir\"
-+ ])
-+ AC_LIB_ARG_WITH([lib$1-prefix],
-+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
-+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-+[
-+ if test "X$withval" = "Xno"; then
-+ use_additional=no
-+ else
-+ if test "X$withval" = "X"; then
-+ AC_LIB_WITH_FINAL_PREFIX([
-+ eval additional_includedir=\"$includedir\"
-+ eval additional_libdir=\"$libdir\"
-+ ])
-+ else
-+ additional_includedir="$withval/include"
-+ additional_libdir="$withval/lib"
-+ fi
-+ fi
-+])
-+ dnl Search the library and its dependencies in $additional_libdir and
-+ dnl $LDFLAGS. Using breadth-first-seach.
-+ LIB[]NAME=
-+ LTLIB[]NAME=
-+ INC[]NAME=
-+ rpathdirs=
-+ ltrpathdirs=
-+ names_already_handled=
-+ names_next_round='$1 $2'
-+ while test -n "$names_next_round"; do
-+ names_this_round="$names_next_round"
-+ names_next_round=
-+ for name in $names_this_round; do
-+ already_handled=
-+ for n in $names_already_handled; do
-+ if test "$n" = "$name"; then
-+ already_handled=yes
-+ break
-+ fi
-+ done
-+ if test -z "$already_handled"; then
-+ names_already_handled="$names_already_handled $name"
-+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
-+ dnl or AC_LIB_HAVE_LINKFLAGS call.
-+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-+ eval value=\"\$HAVE_LIB$uppername\"
-+ if test -n "$value"; then
-+ if test "$value" = yes; then
-+ eval value=\"\$LIB$uppername\"
-+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
-+ eval value=\"\$LTLIB$uppername\"
-+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
-+ else
-+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
-+ dnl that this library doesn't exist. So just drop it.
-+ :
-+ fi
-+ else
-+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
-+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
-+ found_dir=
-+ found_la=
-+ found_so=
-+ found_a=
-+ if test $use_additional = yes; then
-+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
-+ found_dir="$additional_libdir"
-+ found_so="$additional_libdir/lib$name.$shlibext"
-+ if test -f "$additional_libdir/lib$name.la"; then
-+ found_la="$additional_libdir/lib$name.la"
-+ fi
-+ else
-+ if test -f "$additional_libdir/lib$name.$libext"; then
-+ found_dir="$additional_libdir"
-+ found_a="$additional_libdir/lib$name.$libext"
-+ if test -f "$additional_libdir/lib$name.la"; then
-+ found_la="$additional_libdir/lib$name.la"
-+ fi
-+ fi
-+ fi
-+ fi
-+ if test "X$found_dir" = "X"; then
-+ for x in $LDFLAGS $LTLIB[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ case "$x" in
-+ -L*)
-+ dir=`echo "X$x" | sed -e 's/^X-L//'`
-+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
-+ found_dir="$dir"
-+ found_so="$dir/lib$name.$shlibext"
-+ if test -f "$dir/lib$name.la"; then
-+ found_la="$dir/lib$name.la"
-+ fi
-+ else
-+ if test -f "$dir/lib$name.$libext"; then
-+ found_dir="$dir"
-+ found_a="$dir/lib$name.$libext"
-+ if test -f "$dir/lib$name.la"; then
-+ found_la="$dir/lib$name.la"
-+ fi
-+ fi
-+ fi
-+ ;;
-+ esac
-+ if test "X$found_dir" != "X"; then
-+ break
-+ fi
-+ done
-+ fi
-+ if test "X$found_dir" != "X"; then
-+ dnl Found the library.
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
-+ if test "X$found_so" != "X"; then
-+ dnl Linking with a shared library. We attempt to hardcode its
-+ dnl directory into the executable's runpath, unless it's the
-+ dnl standard /usr/lib.
-+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
-+ dnl No hardcoding is needed.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-+ else
-+ dnl Use an explicit option to hardcode DIR into the resulting
-+ dnl binary.
-+ dnl Potentially add DIR to ltrpathdirs.
-+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-+ haveit=
-+ for x in $ltrpathdirs; do
-+ if test "X$x" = "X$found_dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ ltrpathdirs="$ltrpathdirs $found_dir"
-+ fi
-+ dnl The hardcoding into $LIBNAME is system dependent.
-+ if test "$hardcode_direct" = yes; then
-+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
-+ dnl resulting binary.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-+ else
-+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-+ dnl Use an explicit option to hardcode DIR into the resulting
-+ dnl binary.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-+ dnl Potentially add DIR to rpathdirs.
-+ dnl The rpathdirs will be appended to $LIBNAME at the end.
-+ haveit=
-+ for x in $rpathdirs; do
-+ if test "X$x" = "X$found_dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ rpathdirs="$rpathdirs $found_dir"
-+ fi
-+ else
-+ dnl Rely on "-L$found_dir".
-+ dnl But don't add it if it's already contained in the LDFLAGS
-+ dnl or the already constructed $LIBNAME
-+ haveit=
-+ for x in $LDFLAGS $LIB[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-L$found_dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
-+ fi
-+ if test "$hardcode_minus_L" != no; then
-+ dnl FIXME: Not sure whether we should use
-+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-+ dnl here.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-+ else
-+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
-+ dnl here, because this doesn't fit in flags passed to the
-+ dnl compiler. So give up. No hardcoding. This affects only
-+ dnl very old systems.
-+ dnl FIXME: Not sure whether we should use
-+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-+ dnl here.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-+ fi
-+ fi
-+ fi
-+ fi
-+ else
-+ if test "X$found_a" != "X"; then
-+ dnl Linking with a static library.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
-+ else
-+ dnl We shouldn't come here, but anyway it's good to have a
-+ dnl fallback.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
-+ fi
-+ fi
-+ dnl Assume the include files are nearby.
-+ additional_includedir=
-+ case "$found_dir" in
-+ */lib | */lib/)
-+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
-+ additional_includedir="$basedir/include"
-+ ;;
-+ esac
-+ if test "X$additional_includedir" != "X"; then
-+ dnl Potentially add $additional_includedir to $INCNAME.
-+ dnl But don't add it
-+ dnl 1. if it's the standard /usr/include,
-+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
-+ dnl 3. if it's already present in $CPPFLAGS or the already
-+ dnl constructed $INCNAME,
-+ dnl 4. if it doesn't exist as a directory.
-+ if test "X$additional_includedir" != "X/usr/include"; then
-+ haveit=
-+ if test "X$additional_includedir" = "X/usr/local/include"; then
-+ if test -n "$GCC"; then
-+ case $host_os in
-+ linux*) haveit=yes;;
-+ esac
-+ fi
-+ fi
-+ if test -z "$haveit"; then
-+ for x in $CPPFLAGS $INC[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-I$additional_includedir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test -d "$additional_includedir"; then
-+ dnl Really add $additional_includedir to $INCNAME.
-+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
-+ fi
-+ fi
-+ fi
-+ fi
-+ fi
-+ dnl Look for dependencies.
-+ if test -n "$found_la"; then
-+ dnl Read the .la file. It defines the variables
-+ dnl dlname, library_names, old_library, dependency_libs, current,
-+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
-+ save_libdir="$libdir"
-+ case "$found_la" in
-+ */* | *\\*) . "$found_la" ;;
-+ *) . "./$found_la" ;;
-+ esac
-+ libdir="$save_libdir"
-+ dnl We use only dependency_libs.
-+ for dep in $dependency_libs; do
-+ case "$dep" in
-+ -L*)
-+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
-+ dnl But don't add it
-+ dnl 1. if it's the standard /usr/lib,
-+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
-+ dnl 3. if it's already present in $LDFLAGS or the already
-+ dnl constructed $LIBNAME,
-+ dnl 4. if it doesn't exist as a directory.
-+ if test "X$additional_libdir" != "X/usr/lib"; then
-+ haveit=
-+ if test "X$additional_libdir" = "X/usr/local/lib"; then
-+ if test -n "$GCC"; then
-+ case $host_os in
-+ linux*) haveit=yes;;
-+ esac
-+ fi
-+ fi
-+ if test -z "$haveit"; then
-+ haveit=
-+ for x in $LDFLAGS $LIB[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-L$additional_libdir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test -d "$additional_libdir"; then
-+ dnl Really add $additional_libdir to $LIBNAME.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
-+ fi
-+ fi
-+ haveit=
-+ for x in $LDFLAGS $LTLIB[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-L$additional_libdir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test -d "$additional_libdir"; then
-+ dnl Really add $additional_libdir to $LTLIBNAME.
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
-+ fi
-+ fi
-+ fi
-+ fi
-+ ;;
-+ -R*)
-+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
-+ if test "$enable_rpath" != no; then
-+ dnl Potentially add DIR to rpathdirs.
-+ dnl The rpathdirs will be appended to $LIBNAME at the end.
-+ haveit=
-+ for x in $rpathdirs; do
-+ if test "X$x" = "X$dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ rpathdirs="$rpathdirs $dir"
-+ fi
-+ dnl Potentially add DIR to ltrpathdirs.
-+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-+ haveit=
-+ for x in $ltrpathdirs; do
-+ if test "X$x" = "X$dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ ltrpathdirs="$ltrpathdirs $dir"
-+ fi
-+ fi
-+ ;;
-+ -l*)
-+ dnl Handle this in the next round.
-+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-+ ;;
-+ *.la)
-+ dnl Handle this in the next round. Throw away the .la's
-+ dnl directory; it is already contained in a preceding -L
-+ dnl option.
-+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-+ ;;
-+ *)
-+ dnl Most likely an immediate library name.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
-+ ;;
-+ esac
-+ done
-+ fi
-+ else
-+ dnl Didn't find the library; assume it is in the system directories
-+ dnl known to the linker and runtime loader. (All the system
-+ dnl directories known to the linker should also be known to the
-+ dnl runtime loader, otherwise the system is severely misconfigured.)
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
-+ fi
-+ fi
-+ fi
-+ done
-+ done
-+ if test "X$rpathdirs" != "X"; then
-+ if test -n "$hardcode_libdir_separator"; then
-+ dnl Weird platform: only the last -rpath option counts, the user must
-+ dnl pass all path elements in one option. We can arrange that for a
-+ dnl single library, but not when more than one $LIBNAMEs are used.
-+ alldirs=
-+ for found_dir in $rpathdirs; do
-+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
-+ done
-+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
-+ acl_save_libdir="$libdir"
-+ libdir="$alldirs"
-+ eval flag=\"$hardcode_libdir_flag_spec\"
-+ libdir="$acl_save_libdir"
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-+ else
-+ dnl The -rpath options are cumulative.
-+ for found_dir in $rpathdirs; do
-+ acl_save_libdir="$libdir"
-+ libdir="$found_dir"
-+ eval flag=\"$hardcode_libdir_flag_spec\"
-+ libdir="$acl_save_libdir"
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-+ done
-+ fi
-+ fi
-+ if test "X$ltrpathdirs" != "X"; then
-+ dnl When using libtool, the option that works for both libraries and
-+ dnl executables is -R. The -R options are cumulative.
-+ for found_dir in $ltrpathdirs; do
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
-+ done
-+ fi
-+])
-+
-+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-+dnl unless already present in VAR.
-+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-+dnl contains two or three consecutive elements that belong together.
-+AC_DEFUN([AC_LIB_APPENDTOVAR],
-+[
-+ for element in [$2]; do
-+ haveit=
-+ for x in $[$1]; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X$element"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ [$1]="${[$1]}${[$1]:+ }$element"
-+ fi
-+ done
-+])
---- lrzsz-0.12.20.safe/m4/lib-prefix.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/lib-prefix.m4 2004-09-12 14:40:34.921662056 -0400
-@@ -0,0 +1,155 @@
-+# lib-prefix.m4 serial 3 (gettext-0.13)
-+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-+dnl require excessive bracketing.
-+ifdef([AC_HELP_STRING],
-+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-+
-+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-+dnl to access previously installed libraries. The basic assumption is that
-+dnl a user will want packages to use other packages he previously installed
-+dnl with the same --prefix option.
-+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-+dnl libraries, but is otherwise very convenient.
-+AC_DEFUN([AC_LIB_PREFIX],
-+[
-+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
-+ AC_REQUIRE([AC_PROG_CC])
-+ AC_REQUIRE([AC_CANONICAL_HOST])
-+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-+ dnl By default, look in $includedir and $libdir.
-+ use_additional=yes
-+ AC_LIB_WITH_FINAL_PREFIX([
-+ eval additional_includedir=\"$includedir\"
-+ eval additional_libdir=\"$libdir\"
-+ ])
-+ AC_LIB_ARG_WITH([lib-prefix],
-+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
-+ --without-lib-prefix don't search for libraries in includedir and libdir],
-+[
-+ if test "X$withval" = "Xno"; then
-+ use_additional=no
-+ else
-+ if test "X$withval" = "X"; then
-+ AC_LIB_WITH_FINAL_PREFIX([
-+ eval additional_includedir=\"$includedir\"
-+ eval additional_libdir=\"$libdir\"
-+ ])
-+ else
-+ additional_includedir="$withval/include"
-+ additional_libdir="$withval/lib"
-+ fi
-+ fi
-+])
-+ if test $use_additional = yes; then
-+ dnl Potentially add $additional_includedir to $CPPFLAGS.
-+ dnl But don't add it
-+ dnl 1. if it's the standard /usr/include,
-+ dnl 2. if it's already present in $CPPFLAGS,
-+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
-+ dnl 4. if it doesn't exist as a directory.
-+ if test "X$additional_includedir" != "X/usr/include"; then
-+ haveit=
-+ for x in $CPPFLAGS; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-I$additional_includedir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test "X$additional_includedir" = "X/usr/local/include"; then
-+ if test -n "$GCC"; then
-+ case $host_os in
-+ linux*) haveit=yes;;
-+ esac
-+ fi
-+ fi
-+ if test -z "$haveit"; then
-+ if test -d "$additional_includedir"; then
-+ dnl Really add $additional_includedir to $CPPFLAGS.
-+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
-+ fi
-+ fi
-+ fi
-+ fi
-+ dnl Potentially add $additional_libdir to $LDFLAGS.
-+ dnl But don't add it
-+ dnl 1. if it's the standard /usr/lib,
-+ dnl 2. if it's already present in $LDFLAGS,
-+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
-+ dnl 4. if it doesn't exist as a directory.
-+ if test "X$additional_libdir" != "X/usr/lib"; then
-+ haveit=
-+ for x in $LDFLAGS; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-L$additional_libdir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test "X$additional_libdir" = "X/usr/local/lib"; then
-+ if test -n "$GCC"; then
-+ case $host_os in
-+ linux*) haveit=yes;;
-+ esac
-+ fi
-+ fi
-+ if test -z "$haveit"; then
-+ if test -d "$additional_libdir"; then
-+ dnl Really add $additional_libdir to $LDFLAGS.
-+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
-+ fi
-+ fi
-+ fi
-+ fi
-+ fi
-+])
-+
-+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-+dnl acl_final_exec_prefix, containing the values to which $prefix and
-+dnl $exec_prefix will expand at the end of the configure script.
-+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-+[
-+ dnl Unfortunately, prefix and exec_prefix get only finally determined
-+ dnl at the end of configure.
-+ if test "X$prefix" = "XNONE"; then
-+ acl_final_prefix="$ac_default_prefix"
-+ else
-+ acl_final_prefix="$prefix"
-+ fi
-+ if test "X$exec_prefix" = "XNONE"; then
-+ acl_final_exec_prefix='${prefix}'
-+ else
-+ acl_final_exec_prefix="$exec_prefix"
-+ fi
-+ acl_save_prefix="$prefix"
-+ prefix="$acl_final_prefix"
-+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-+ prefix="$acl_save_prefix"
-+])
-+
-+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-+dnl variables prefix and exec_prefix bound to the values they will have
-+dnl at the end of the configure script.
-+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-+[
-+ acl_save_prefix="$prefix"
-+ prefix="$acl_final_prefix"
-+ acl_save_exec_prefix="$exec_prefix"
-+ exec_prefix="$acl_final_exec_prefix"
-+ $1
-+ exec_prefix="$acl_save_exec_prefix"
-+ prefix="$acl_save_prefix"
-+])
---- lrzsz-0.12.20.safe/m4/longdouble.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/longdouble.m4 2004-09-12 14:40:34.942658864 -0400
-@@ -0,0 +1,30 @@
-+# longdouble.m4 serial 1 (gettext-0.12)
-+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+dnl Test whether the compiler supports the 'long double' type.
-+dnl Prerequisite: AC_PROG_CC
-+
-+AC_DEFUN([gt_TYPE_LONGDOUBLE],
-+[
-+ AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
-+ [if test "$GCC" = yes; then
-+ gt_cv_c_long_double=yes
-+ else
-+ AC_TRY_COMPILE([
-+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */
-+ long double foo = 0.0;
-+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
-+ int array [2*(sizeof(long double) >= sizeof(double)) - 1];
-+ ], ,
-+ gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
-+ fi])
-+ if test $gt_cv_c_long_double = yes; then
-+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/longlong.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/longlong.m4 2004-09-12 14:40:34.949657800 -0400
-@@ -0,0 +1,25 @@
-+# longlong.m4 serial 4
-+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+# Define HAVE_LONG_LONG if 'long long' works.
-+
-+AC_DEFUN([jm_AC_TYPE_LONG_LONG],
-+[
-+ AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
-+ [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
-+ [long long llmax = (long long) -1;
-+ return ll << i | ll >> i | llmax / ll | llmax % ll;],
-+ ac_cv_type_long_long=yes,
-+ ac_cv_type_long_long=no)])
-+ if test $ac_cv_type_long_long = yes; then
-+ AC_DEFINE(HAVE_LONG_LONG, 1,
-+ [Define if you have the 'long long' type.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/Makefile.am 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/Makefile.am 2004-09-12 14:40:35.048642752 -0400
-@@ -0,0 +1 @@
-+EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4
---- lrzsz-0.12.20.safe/m4/nls.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/nls.m4 2004-09-12 14:40:34.955656888 -0400
-@@ -0,0 +1,49 @@
-+# nls.m4 serial 1 (gettext-0.12)
-+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-+
-+AC_DEFUN([AM_NLS],
-+[
-+ AC_MSG_CHECKING([whether NLS is requested])
-+ dnl Default is enabled NLS
-+ AC_ARG_ENABLE(nls,
-+ [ --disable-nls do not use Native Language Support],
-+ USE_NLS=$enableval, USE_NLS=yes)
-+ AC_MSG_RESULT($USE_NLS)
-+ AC_SUBST(USE_NLS)
-+])
-+
-+AC_DEFUN([AM_MKINSTALLDIRS],
-+[
-+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
-+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
-+ dnl Try to locate it.
-+ MKINSTALLDIRS=
-+ if test -n "$ac_aux_dir"; then
-+ case "$ac_aux_dir" in
-+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
-+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
-+ esac
-+ fi
-+ if test -z "$MKINSTALLDIRS"; then
-+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-+ fi
-+ AC_SUBST(MKINSTALLDIRS)
-+])
---- lrzsz-0.12.20.safe/m4/po.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/po.m4 2004-09-12 14:40:34.961655976 -0400
-@@ -0,0 +1,426 @@
-+# po.m4 serial 3 (gettext-0.14)
-+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-+
-+dnl Checks for all prerequisites of the po subdirectory.
-+AC_DEFUN([AM_PO_SUBDIRS],
-+[
-+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-+ AC_REQUIRE([AC_PROG_INSTALL])dnl
-+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
-+ AC_REQUIRE([AM_NLS])dnl
-+
-+ dnl Perform the following tests also if --disable-nls has been given,
-+ dnl because they are needed for "make dist" to work.
-+
-+ dnl Search for GNU msgfmt in the PATH.
-+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
-+ dnl The second test excludes FreeBSD msgfmt.
-+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
-+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-+ :)
-+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-+
-+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
-+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
-+ dnl The second test excludes FreeBSD xgettext.
-+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
-+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-+ :)
-+ dnl Remove leftover from FreeBSD xgettext call.
-+ rm -f messages.po
-+
-+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
-+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
-+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
-+
-+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
-+ dnl Test whether we really found GNU msgfmt.
-+ if test "$GMSGFMT" != ":"; then
-+ dnl If it is no GNU msgfmt we define it as : so that the
-+ dnl Makefiles still can work.
-+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
-+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
-+ : ;
-+ else
-+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
-+ AC_MSG_RESULT(
-+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
-+ GMSGFMT=":"
-+ fi
-+ fi
-+
-+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
-+ dnl Test whether we really found GNU xgettext.
-+ if test "$XGETTEXT" != ":"; then
-+ dnl If it is no GNU xgettext we define it as : so that the
-+ dnl Makefiles still can work.
-+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
-+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
-+ : ;
-+ else
-+ AC_MSG_RESULT(
-+ [found xgettext program is not GNU xgettext; ignore it])
-+ XGETTEXT=":"
-+ fi
-+ dnl Remove leftover from FreeBSD xgettext call.
-+ rm -f messages.po
-+ fi
-+
-+ AC_OUTPUT_COMMANDS([
-+ for ac_file in $CONFIG_FILES; do
-+ # Support "outfile[:infile[:infile...]]"
-+ case "$ac_file" in
-+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-+ esac
-+ # PO directories have a Makefile.in generated from Makefile.in.in.
-+ case "$ac_file" in */Makefile.in)
-+ # Adjust a relative srcdir.
-+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
-+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
-+ # In autoconf-2.13 it is called $ac_given_srcdir.
-+ # In autoconf-2.50 it is called $srcdir.
-+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
-+ case "$ac_given_srcdir" in
-+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
-+ /*) top_srcdir="$ac_given_srcdir" ;;
-+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
-+ esac
-+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
-+ rm -f "$ac_dir/POTFILES"
-+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
-+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
-+ POMAKEFILEDEPS="POTFILES.in"
-+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
-+ # on $ac_dir but don't depend on user-specified configuration
-+ # parameters.
-+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
-+ # The LINGUAS file contains the set of available languages.
-+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
-+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
-+ fi
-+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-+ # Hide the ALL_LINGUAS assigment from automake.
-+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
-+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
-+ else
-+ # The set of available languages was given in configure.in.
-+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
-+ fi
-+ # Compute POFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
-+ # Compute UPDATEPOFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
-+ # Compute DUMMYPOFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
-+ # Compute GMOFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
-+ case "$ac_given_srcdir" in
-+ .) srcdirpre= ;;
-+ *) srcdirpre='$(srcdir)/' ;;
-+ esac
-+ POFILES=
-+ UPDATEPOFILES=
-+ DUMMYPOFILES=
-+ GMOFILES=
-+ for lang in $ALL_LINGUAS; do
-+ POFILES="$POFILES $srcdirpre$lang.po"
-+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
-+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
-+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
-+ done
-+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
-+ # environment variable.
-+ INST_LINGUAS=
-+ if test -n "$ALL_LINGUAS"; then
-+ for presentlang in $ALL_LINGUAS; do
-+ useit=no
-+ if test "%UNSET%" != "$LINGUAS"; then
-+ desiredlanguages="$LINGUAS"
-+ else
-+ desiredlanguages="$ALL_LINGUAS"
-+ fi
-+ for desiredlang in $desiredlanguages; do
-+ # Use the presentlang catalog if desiredlang is
-+ # a. equal to presentlang, or
-+ # b. a variant of presentlang (because in this case,
-+ # presentlang can be used as a fallback for messages
-+ # which are not translated in the desiredlang catalog).
-+ case "$desiredlang" in
-+ "$presentlang"*) useit=yes;;
-+ esac
-+ done
-+ if test $useit = yes; then
-+ INST_LINGUAS="$INST_LINGUAS $presentlang"
-+ fi
-+ done
-+ fi
-+ CATALOGS=
-+ if test -n "$INST_LINGUAS"; then
-+ for lang in $INST_LINGUAS; do
-+ CATALOGS="$CATALOGS $lang.gmo"
-+ done
-+ fi
-+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
-+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
-+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
-+ if test -f "$f"; then
-+ case "$f" in
-+ *.orig | *.bak | *~) ;;
-+ *) cat "$f" >> "$ac_dir/Makefile" ;;
-+ esac
-+ fi
-+ done
-+ fi
-+ ;;
-+ esac
-+ done],
-+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
-+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
-+ # from automake.
-+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
-+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
-+ LINGUAS="${LINGUAS-%UNSET%}"
-+ ])
-+])
-+
-+dnl Postprocesses a Makefile in a directory containing PO files.
-+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
-+[
-+ # When this code is run, in config.status, two variables have already been
-+ # set:
-+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
-+ # - LINGUAS is the value of the environment variable LINGUAS at configure
-+ # time.
-+
-+changequote(,)dnl
-+ # Adjust a relative srcdir.
-+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
-+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
-+ # In autoconf-2.13 it is called $ac_given_srcdir.
-+ # In autoconf-2.50 it is called $srcdir.
-+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
-+ case "$ac_given_srcdir" in
-+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
-+ /*) top_srcdir="$ac_given_srcdir" ;;
-+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
-+ esac
-+
-+ # Find a way to echo strings without interpreting backslash.
-+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
-+ gt_echo='echo'
-+ else
-+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
-+ gt_echo='printf %s\n'
-+ else
-+ echo_func () {
-+ cat <<EOT
-+$*
-+EOT
-+ }
-+ gt_echo='echo_func'
-+ fi
-+ fi
-+
-+ # A sed script that extracts the value of VARIABLE from a Makefile.
-+ sed_x_variable='
-+# Test if the hold space is empty.
-+x
-+s/P/P/
-+x
-+ta
-+# Yes it was empty. Look if we have the expected variable definition.
-+/^[ ]*VARIABLE[ ]*=/{
-+ # Seen the first line of the variable definition.
-+ s/^[ ]*VARIABLE[ ]*=//
-+ ba
-+}
-+bd
-+:a
-+# Here we are processing a line from the variable definition.
-+# Remove comment, more precisely replace it with a space.
-+s/#.*$/ /
-+# See if the line ends in a backslash.
-+tb
-+:b
-+s/\\$//
-+# Print the line, without the trailing backslash.
-+p
-+tc
-+# There was no trailing backslash. The end of the variable definition is
-+# reached. Clear the hold space.
-+s/^.*$//
-+x
-+bd
-+:c
-+# A trailing backslash means that the variable definition continues in the
-+# next line. Put a nonempty string into the hold space to indicate this.
-+s/^.*$/P/
-+x
-+:d
-+'
-+changequote([,])dnl
-+
-+ # Set POTFILES to the value of the Makefile variable POTFILES.
-+ sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
-+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
-+ # Compute POTFILES_DEPS as
-+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
-+ POTFILES_DEPS=
-+ for file in $POTFILES; do
-+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
-+ done
-+ POMAKEFILEDEPS=""
-+
-+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
-+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
-+ fi
-+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
-+ # The LINGUAS file contains the set of available languages.
-+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
-+ else
-+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
-+ sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
-+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
-+ fi
-+ # Hide the ALL_LINGUAS assigment from automake.
-+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
-+ # Compute POFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
-+ # Compute UPDATEPOFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
-+ # Compute DUMMYPOFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
-+ # Compute GMOFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
-+ # Compute PROPERTIESFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
-+ # Compute CLASSFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
-+ # Compute QMFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
-+ # Compute MSGFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
-+ # Compute RESOURCESDLLFILES
-+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
-+ case "$ac_given_srcdir" in
-+ .) srcdirpre= ;;
-+ *) srcdirpre='$(srcdir)/' ;;
-+ esac
-+ POFILES=
-+ UPDATEPOFILES=
-+ DUMMYPOFILES=
-+ GMOFILES=
-+ PROPERTIESFILES=
-+ CLASSFILES=
-+ QMFILES=
-+ MSGFILES=
-+ RESOURCESDLLFILES=
-+ for lang in $ALL_LINGUAS; do
-+ POFILES="$POFILES $srcdirpre$lang.po"
-+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
-+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
-+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
-+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
-+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
-+ QMFILES="$QMFILES $srcdirpre$lang.qm"
-+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
-+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
-+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
-+ done
-+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
-+ # environment variable.
-+ INST_LINGUAS=
-+ if test -n "$ALL_LINGUAS"; then
-+ for presentlang in $ALL_LINGUAS; do
-+ useit=no
-+ if test "%UNSET%" != "$LINGUAS"; then
-+ desiredlanguages="$LINGUAS"
-+ else
-+ desiredlanguages="$ALL_LINGUAS"
-+ fi
-+ for desiredlang in $desiredlanguages; do
-+ # Use the presentlang catalog if desiredlang is
-+ # a. equal to presentlang, or
-+ # b. a variant of presentlang (because in this case,
-+ # presentlang can be used as a fallback for messages
-+ # which are not translated in the desiredlang catalog).
-+ case "$desiredlang" in
-+ "$presentlang"*) useit=yes;;
-+ esac
-+ done
-+ if test $useit = yes; then
-+ INST_LINGUAS="$INST_LINGUAS $presentlang"
-+ fi
-+ done
-+ fi
-+ CATALOGS=
-+ JAVACATALOGS=
-+ QTCATALOGS=
-+ TCLCATALOGS=
-+ CSHARPCATALOGS=
-+ if test -n "$INST_LINGUAS"; then
-+ for lang in $INST_LINGUAS; do
-+ CATALOGS="$CATALOGS $lang.gmo"
-+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
-+ QTCATALOGS="$QTCATALOGS $lang.qm"
-+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
-+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
-+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
-+ done
-+ fi
-+
-+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
-+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
-+ # Add dependencies that cannot be formulated as a simple suffix rule.
-+ for lang in $ALL_LINGUAS; do
-+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-+ cat >> "$ac_file.tmp" <<EOF
-+$frobbedlang.msg: $lang.po
-+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
-+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-+EOF
-+ done
-+ fi
-+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
-+ # Add dependencies that cannot be formulated as a simple suffix rule.
-+ for lang in $ALL_LINGUAS; do
-+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
-+ cat >> "$ac_file.tmp" <<EOF
-+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
-+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
-+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-+EOF
-+ done
-+ fi
-+ if test -n "$POMAKEFILEDEPS"; then
-+ cat >> "$ac_file.tmp" <<EOF
-+Makefile: $POMAKEFILEDEPS
-+EOF
-+ fi
-+ mv "$ac_file.tmp" "$ac_file"
-+])
---- lrzsz-0.12.20.safe/m4/printf-posix.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/printf-posix.m4 2004-09-12 14:40:34.974654000 -0400
-@@ -0,0 +1,46 @@
-+# printf-posix.m4 serial 2 (gettext-0.13.1)
-+dnl Copyright (C) 2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+dnl Test whether the printf() function supports POSIX/XSI format strings with
-+dnl positions.
-+
-+AC_DEFUN([gt_PRINTF_POSIX],
-+[
-+ AC_REQUIRE([AC_PROG_CC])
-+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
-+ gt_cv_func_printf_posix,
-+ [
-+ AC_TRY_RUN([
-+#include <stdio.h>
-+#include <string.h>
-+/* The string "%2$d %1$d", with dollar characters protected from the shell's
-+ dollar expansion (possibly an autoconf bug). */
-+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
-+static char buf[100];
-+int main ()
-+{
-+ sprintf (buf, format, 33, 55);
-+ return (strcmp (buf, "55 33") != 0);
-+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
-+ [
-+ AC_EGREP_CPP(notposix, [
-+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
-+ notposix
-+#endif
-+ ], gt_cv_func_printf_posix="guessing no",
-+ gt_cv_func_printf_posix="guessing yes")
-+ ])
-+ ])
-+ case $gt_cv_func_printf_posix in
-+ *yes)
-+ AC_DEFINE(HAVE_POSIX_PRINTF, 1,
-+ [Define if your printf() function supports format strings with positions.])
-+ ;;
-+ esac
-+])
---- lrzsz-0.12.20.safe/m4/progtest.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/progtest.m4 2004-09-12 14:40:34.990651568 -0400
-@@ -0,0 +1,91 @@
-+# progtest.m4 serial 3 (gettext-0.12)
-+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
-+
-+# Search path for a program which passes the given test.
-+
-+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
-+[
-+# Prepare PATH_SEPARATOR.
-+# The user is always right.
-+if test "${PATH_SEPARATOR+set}" != set; then
-+ echo "#! /bin/sh" >conf$$.sh
-+ echo "exit 0" >>conf$$.sh
-+ chmod +x conf$$.sh
-+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-+ PATH_SEPARATOR=';'
-+ else
-+ PATH_SEPARATOR=:
-+ fi
-+ rm -f conf$$.sh
-+fi
-+
-+# Find out how to test for executable files. Don't use a zero-byte file,
-+# as systems may use methods other than mode bits to determine executability.
-+cat >conf$$.file <<_ASEOF
-+#! /bin/sh
-+exit 0
-+_ASEOF
-+chmod +x conf$$.file
-+if test -x conf$$.file >/dev/null 2>&1; then
-+ ac_executable_p="test -x"
-+else
-+ ac_executable_p="test -f"
-+fi
-+rm -f conf$$.file
-+
-+# Extract the first word of "$2", so it can be a program name with args.
-+set dummy $2; ac_word=[$]2
-+AC_MSG_CHECKING([for $ac_word])
-+AC_CACHE_VAL(ac_cv_path_$1,
-+[case "[$]$1" in
-+ [[\\/]]* | ?:[[\\/]]*)
-+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-+ ;;
-+ *)
-+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
-+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
-+ IFS="$ac_save_IFS"
-+ test -z "$ac_dir" && ac_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
-+ if [$3]; then
-+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
-+ break 2
-+ fi
-+ fi
-+ done
-+ done
-+ IFS="$ac_save_IFS"
-+dnl If no 4th arg is given, leave the cache variable unset,
-+dnl so AC_PATH_PROGS will keep looking.
-+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-+])dnl
-+ ;;
-+esac])dnl
-+$1="$ac_cv_path_$1"
-+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
-+ AC_MSG_RESULT([$]$1)
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+AC_SUBST($1)dnl
-+])
---- lrzsz-0.12.20.safe/m4/signed.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/signed.m4 2004-09-12 14:40:34.996650656 -0400
-@@ -0,0 +1,19 @@
-+# signed.m4 serial 1 (gettext-0.10.40)
-+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([bh_C_SIGNED],
-+[
-+ AC_CACHE_CHECK([for signed], bh_cv_c_signed,
-+ [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
-+ if test $bh_cv_c_signed = no; then
-+ AC_DEFINE(signed, ,
-+ [Define to empty if the C compiler doesn't support this keyword.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/size_max.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/size_max.m4 2004-09-12 14:40:35.003649592 -0400
-@@ -0,0 +1,61 @@
-+# size_max.m4 serial 2
-+dnl Copyright (C) 2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([gl_SIZE_MAX],
-+[
-+ AC_CHECK_HEADERS(stdint.h)
-+ dnl First test whether the system already has SIZE_MAX.
-+ AC_MSG_CHECKING([for SIZE_MAX])
-+ result=
-+ AC_EGREP_CPP([Found it], [
-+#include <limits.h>
-+#if HAVE_STDINT_H
-+#include <stdint.h>
-+#endif
-+#ifdef SIZE_MAX
-+Found it
-+#endif
-+], result=yes)
-+ if test -z "$result"; then
-+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
-+ dnl than the type 'unsigned long'.
-+ dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
-+ dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
-+ _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
-+ [#include <stddef.h>], result=?)
-+ _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
-+ [#include <stddef.h>], result=?)
-+ _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
-+ [#include <stddef.h>], result=?)
-+ if test "$fits_in_uint" = 1; then
-+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
-+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
-+ AC_TRY_COMPILE([#include <stddef.h>
-+ extern size_t foo;
-+ extern unsigned long foo;
-+ ], [], fits_in_uint=0)
-+ fi
-+ if test -z "$result"; then
-+ if test "$fits_in_uint" = 1; then
-+ result="$res_hi$res_lo"U
-+ else
-+ result="$res_hi$res_lo"UL
-+ fi
-+ else
-+ dnl Shouldn't happen, but who knows...
-+ result='~(size_t)0'
-+ fi
-+ fi
-+ AC_MSG_RESULT([$result])
-+ if test "$result" != yes; then
-+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
-+ [Define as the maximum value of type 'size_t', if the system doesn't define it.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/stdint_h.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/stdint_h.m4 2004-09-12 14:40:35.009648680 -0400
-@@ -0,0 +1,28 @@
-+# stdint_h.m4 serial 3 (gettext-0.12)
-+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
-+# doesn't clash with <sys/types.h>, and declares uintmax_t.
-+
-+AC_DEFUN([jm_AC_HEADER_STDINT_H],
-+[
-+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
-+ [AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <stdint.h>],
-+ [uintmax_t i = (uintmax_t) -1;],
-+ jm_ac_cv_header_stdint_h=yes,
-+ jm_ac_cv_header_stdint_h=no)])
-+ if test $jm_ac_cv_header_stdint_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
-+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
-+ and declares uintmax_t. ])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/uintmax_t.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/uintmax_t.m4 2004-09-12 14:40:35.021646856 -0400
-@@ -0,0 +1,32 @@
-+# uintmax_t.m4 serial 7 (gettext-0.12)
-+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_PREREQ(2.13)
-+
-+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
-+# if it is not already defined in <stdint.h> or <inttypes.h>.
-+
-+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
-+[
-+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
-+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
-+ test $ac_cv_type_unsigned_long_long = yes \
-+ && ac_type='unsigned long long' \
-+ || ac_type='unsigned long'
-+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
-+ [Define to unsigned long or unsigned long long
-+ if <stdint.h> and <inttypes.h> don't define.])
-+ else
-+ AC_DEFINE(HAVE_UINTMAX_T, 1,
-+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/ulonglong.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/ulonglong.m4 2004-09-12 14:40:35.028645792 -0400
-@@ -0,0 +1,25 @@
-+# ulonglong.m4 serial 3
-+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
-+
-+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
-+[
-+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
-+ [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
-+ [unsigned long long ullmax = (unsigned long long) -1;
-+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
-+ ac_cv_type_unsigned_long_long=yes,
-+ ac_cv_type_unsigned_long_long=no)])
-+ if test $ac_cv_type_unsigned_long_long = yes; then
-+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
-+ [Define if you have the 'unsigned long long' type.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/wchar_t.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/wchar_t.m4 2004-09-12 14:40:35.034644880 -0400
-@@ -0,0 +1,22 @@
-+# wchar_t.m4 serial 1 (gettext-0.12)
-+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+dnl Test whether <stddef.h> has the 'wchar_t' type.
-+dnl Prerequisite: AC_PROG_CC
-+
-+AC_DEFUN([gt_TYPE_WCHAR_T],
-+[
-+ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
-+ [AC_TRY_COMPILE([#include <stddef.h>
-+ wchar_t foo = (wchar_t)'\0';], ,
-+ gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
-+ if test $gt_cv_c_wchar_t = yes; then
-+ AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/wint_t.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/wint_t.m4 2004-09-12 14:40:35.040643968 -0400
-@@ -0,0 +1,22 @@
-+# wint_t.m4 serial 1 (gettext-0.12)
-+dnl Copyright (C) 2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+dnl Test whether <wchar.h> has the 'wint_t' type.
-+dnl Prerequisite: AC_PROG_CC
-+
-+AC_DEFUN([gt_TYPE_WINT_T],
-+[
-+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
-+ [AC_TRY_COMPILE([#include <wchar.h>
-+ wint_t foo = (wchar_t)'\0';], ,
-+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
-+ if test $gt_cv_c_wint_t = yes; then
-+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
-+ fi
-+])
---- lrzsz-0.12.20.safe/m4/xsize.m4 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/m4/xsize.m4 2004-09-12 14:40:35.047642904 -0400
-@@ -0,0 +1,14 @@
-+# xsize.m4 serial 2
-+dnl Copyright (C) 2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+AC_DEFUN([gl_XSIZE],
-+[
-+ dnl Prerequisites of lib/xsize.h.
-+ AC_REQUIRE([gl_SIZE_MAX])
-+ AC_CHECK_HEADERS(stdint.h)
-+])
---- lrzsz-0.12.20.safe/Makefile.am 1998-12-30 06:19:40.000000000 -0500
-+++ lrzsz-0.12.20/Makefile.am 2004-09-12 14:40:35.121631656 -0400
-@@ -1,5 +1,5 @@
- SUBDIRS = lib intl src po man testsuite
--EXTRA_DIST = check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
-+EXTRA_DIST = config.rpath check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
- README.gettext rpmrc buildrpm systype.in fastcheck.sh README.tests \
- beos-runpiped.c fastcheck.beos
- noinst_SCRIPTS=systype
-@@ -83,3 +83,5 @@
- rpm: $(PR).tar.gz Specfile
- $(srcdir)/buildrpm $(srcdir)
-
-+
-+ACLOCAL_AMFLAGS = -I m4
---- lrzsz-0.12.20.safe/Makefile.in 1998-12-30 11:31:40.000000000 -0500
-+++ lrzsz-0.12.20/Makefile.in 2004-09-12 14:40:35.109633480 -0400
-@@ -125,7 +125,7 @@
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
- $(ACLOCAL_M4): configure.in acinclude.m4
-- cd $(srcdir) && $(ACLOCAL)
-+ cd $(srcdir) && $(ACLOCAL) -I m4
-
- config.status: $(srcdir)/configure
- $(SHELL) ./config.status --recheck
---- lrzsz-0.12.20.safe/mkinstalldirs 1998-04-26 09:20:52.000000000 -0400
-+++ lrzsz-0.12.20/mkinstalldirs 2004-09-12 14:40:34.337750824 -0400
-@@ -1,34 +1,150 @@
- #! /bin/sh
- # mkinstalldirs --- make directory hierarchy
--# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-+
-+scriptversion=2004-02-15.20
-+
-+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
- # Created: 1993-05-16
--# Last modified: 1995-03-05
--# Public domain
-+# Public domain.
-+#
-+# This file is maintained in Automake, please report
-+# bugs to <bug-automake@gnu.org> or send patches to
-+# <automake-patches@gnu.org>.
-
- errstatus=0
-+dirmode=""
-
--for file in ${1+"$@"} ; do
-- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-- shift
-+usage="\
-+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-- pathcomp=
-- for d in ${1+"$@"} ; do
-- pathcomp="$pathcomp$d"
-- case "$pathcomp" in
-- -* ) pathcomp=./$pathcomp ;;
-- esac
-+Create each directory DIR (with mode MODE, if specified), including all
-+leading file name components.
-
-- if test ! -d "$pathcomp"; then
-- echo "mkdir $pathcomp" 1>&2
-- mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
-- fi
-+Report bugs to <bug-automake@gnu.org>."
-
-- if test ! -d "$pathcomp"; then
-+# process command line arguments
-+while test $# -gt 0 ; do
-+ case $1 in
-+ -h | --help | --h*) # -h for help
-+ echo "$usage"
-+ exit 0
-+ ;;
-+ -m) # -m PERM arg
-+ shift
-+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-+ dirmode=$1
-+ shift
-+ ;;
-+ --version)
-+ echo "$0 $scriptversion"
-+ exit 0
-+ ;;
-+ --) # stop option processing
-+ shift
-+ break
-+ ;;
-+ -*) # unknown option
-+ echo "$usage" 1>&2
-+ exit 1
-+ ;;
-+ *) # first non-opt arg
-+ break
-+ ;;
-+ esac
-+done
-+
-+for file
-+do
-+ if test -d "$file"; then
-+ shift
-+ else
-+ break
-+ fi
-+done
-+
-+case $# in
-+ 0) exit 0 ;;
-+esac
-+
-+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
-+# mkdir -p a/c at the same time, both will detect that a is missing,
-+# one will create a, then the other will try to create a and die with
-+# a "File exists" error. This is a problem when calling mkinstalldirs
-+# from a parallel make. We use --version in the probe to restrict
-+# ourselves to GNU mkdir, which is thread-safe.
-+case $dirmode in
-+ '')
-+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-+ echo "mkdir -p -- $*"
-+ exec mkdir -p -- "$@"
-+ else
-+ # On NextStep and OpenStep, the `mkdir' command does not
-+ # recognize any option. It will interpret all options as
-+ # directories to create, and then abort because `.' already
-+ # exists.
-+ test -d ./-p && rmdir ./-p
-+ test -d ./--version && rmdir ./--version
-+ fi
-+ ;;
-+ *)
-+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
-+ test ! -d ./--version; then
-+ echo "mkdir -m $dirmode -p -- $*"
-+ exec mkdir -m "$dirmode" -p -- "$@"
-+ else
-+ # Clean up after NextStep and OpenStep mkdir.
-+ for d in ./-m ./-p ./--version "./$dirmode";
-+ do
-+ test -d $d && rmdir $d
-+ done
-+ fi
-+ ;;
-+esac
-+
-+for file
-+do
-+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-+ shift
-+
-+ pathcomp=
-+ for d
-+ do
-+ pathcomp="$pathcomp$d"
-+ case $pathcomp in
-+ -*) pathcomp=./$pathcomp ;;
-+ esac
-+
-+ if test ! -d "$pathcomp"; then
-+ echo "mkdir $pathcomp"
-+
-+ mkdir "$pathcomp" || lasterr=$?
-+
-+ if test ! -d "$pathcomp"; then
- errstatus=$lasterr
-- fi
-+ else
-+ if test ! -z "$dirmode"; then
-+ echo "chmod $dirmode $pathcomp"
-+ lasterr=""
-+ chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-- pathcomp="$pathcomp/"
-- done
-+ if test ! -z "$lasterr"; then
-+ errstatus=$lasterr
-+ fi
-+ fi
-+ fi
-+ fi
-+
-+ pathcomp="$pathcomp/"
-+ done
- done
-
- exit $errstatus
-+
-+# Local Variables:
-+# mode: shell-script
-+# sh-indentation: 2
-+# eval: (add-hook 'write-file-hooks 'time-stamp)
-+# time-stamp-start: "scriptversion="
-+# time-stamp-format: "%:y-%02m-%02d.%02H"
-+# time-stamp-end: "$"
-+# End:
---- lrzsz-0.12.20.safe/po/boldquot.sed 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/po/boldquot.sed 2004-09-12 14:40:34.723692152 -0400
-@@ -0,0 +1,10 @@
-+s/"\([^"]*\)"/“\1â€/g
-+s/`\([^`']*\)'/‘\1’/g
-+s/ '\([^`']*\)' / ‘\1’ /g
-+s/ '\([^`']*\)'$/ ‘\1’/g
-+s/^'\([^`']*\)' /‘\1’ /g
-+s/“â€/""/g
-+s/“/“/g
-+s/â€/â€/g
-+s/‘/‘/g
-+s/’/’/g
---- lrzsz-0.12.20.safe/po/cat-id-tbl.c 1998-12-29 04:24:24.000000000 -0500
-+++ lrzsz-0.12.20/po/cat-id-tbl.c 1969-12-31 19:00:00.000000000 -0500
-@@ -1,234 +0,0 @@
--/* Automatically generated by po2tbl.sed from lrzsz.pot. */
--
--#if HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include "libgettext.h"
--
--const struct _msg_ent _msg_tbl[] = {
-- {"", 1},
-- {"io_mode(,2) in rbsb.c not implemented\n", 2},
-- {"caught signal %d; exiting", 3},
-- {"command tries", 4},
-- {"packetlength", 5},
-- {"packetlength out of range 24..%ld", 6},
-- {"framelength", 7},
-- {"framelength out of range 32..%ld", 8},
-- {"min_bps", 9},
-- {"min_bps must be >= 0", 10},
-- {"min_bps_time", 11},
-- {"min_bps_time must be > 1", 12},
-- {"hour to large (0..23)", 13},
-- {"unparsable stop time\n", 14},
-- {"minute to large (0..59)", 15},
-- {"stop time to small", 16},
-- {"stop-at", 17},
-- {"timeout", 18},
-- {"timeout out of range 10..1000", 19},
-- {"security violation: can't do that under restricted shell\n", 20},
-- {"window size", 21},
-- {"cannot turnoff syslog", 22},
-- {"startup delay", 23},
-- {"out of memory", 24},
-- {"this program was never intended to be used setuid\n", 25},
-- {"need at least one file to send", 26},
-- {"Can't send command in restricted mode\n", 27},
-- {"hostname too long\n", 28},
-- {"illegal server address\n", 29},
-- {"can read only one file from stdin", 30},
-- {"Transfer incomplete\n", 31},
-- {"Transfer complete\n", 32},
-- {"send_pseudo %s: cannot open tmpfile %s: %s", 33},
-- {"send_pseudo %s: cannot lstat tmpfile %s: %s", 34},
-- {"send_pseudo %s: avoiding symlink trap", 35},
-- {"send_pseudo %s: cannot write to tmpfile %s: %s", 36},
-- {"send_pseudo %s: failed", 37},
-- {"send_pseudo %s: ok", 38},
-- {"tcp protocol init failed\n", 39},
-- {"Answering TIMESYNC at %s", 40},
-- {"timezone", 41},
-- {"timezone unknown", 42},
-- {"Can't open any requested files.", 43},
-- {"security violation: not allowed to upload from %s", 44},
-- {"cannot open %s", 45},
-- {"is not a file: %s", 46},
-- {"%s/%s: error occured", 47},
-- {"skipped: %s", 48},
-- {"%s/%s: skipped", 49},
-- {"Bytes Sent:%7ld BPS:%-8ld \n", 50},
-- {"Sending %s, %ld blocks: ", 51},
-- {"Give your local XMODEM receive command now.", 52},
-- {"Sending: %s\n", 53},
-- {"Timeout on pathname", 54},
-- {"Receiver Cancelled", 55},
-- {"No ACK on EOT", 56},
-- {"Xmodem sectors/kbytes sent: %3d/%2dk", 57},
-- {"Ymodem sectors/kbytes sent: %3d/%2dk", 58},
-- {"Cancelled", 59},
-- {"Timeout on sector ACK", 60},
-- {"NAK on sector", 61},
-- {"Got burst for sector ACK", 62},
-- {"Got %02x for sector ACK", 63},
-- {"Retry Count Exceeded", 64},
-- {"Try `%s --help' for more information.\n", 65},
-- {"%s version %s\n", 66},
-- {"Usage: %s [options] file ...\n", 67},
-- {" or: %s [options] -{c|i} COMMAND\n", 68},
-- {"Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n", 69},
-- {"\
-- (X) = option applies to XMODEM only\n\
-- (Y) = option applies to YMODEM only\n\
-- (Z) = option applies to ZMODEM only\n", 70},
-- {"\
-- -+, --append append to existing destination file (Z)\n\
-- -2, --twostop use 2 stop bits\n\
-- -4, --try-4k go up to 4K blocksize\n\
-- --start-4k start with 4K blocksize (doesn't try 8)\n\
-- -8, --try-8k go up to 8K blocksize\n\
-- --start-8k start with 8K blocksize\n\
-- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
-- -b, --binary binary transfer\n\
-- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
-- -c, --command COMMAND execute remote command COMMAND (Z)\n\
-- -C, --command-tries N try N times to execute a command (Z)\n\
-- -d, --dot-to-slash change '.' to '/' in pathnames (Y/Z)\n\
-- --delay-startup N sleep N seconds before doing anything\n\
-- -e, --escape escape all control characters (Z)\n\
-- -E, --rename force receiver to rename files it already has\n\
-- -f, --full-path send full pathname (Y/Z)\n\
-- -i, --immediate-command CMD send remote CMD, return immediately (Z)\n\
-- -h, --help print this usage message\n\
-- -k, --1k send 1024 byte packets (X)\n\
-- -L, --packetlen N limit subpacket length to N bytes (Z)\n\
-- -l, --framelen N limit frame length to N bytes (l>=L) (Z)\n\
-- -m, --min-bps N stop transmission if BPS below N\n\
-- -M, --min-bps-time N for at least N seconds (default: 120)\n", 71},
-- {"\
-- -n, --newer send file if source newer (Z)\n\
-- -N, --newer-or-longer send file if source newer or longer (Z)\n\
-- -o, --16-bit-crc use 16 bit CRC instead of 32 bit CRC (Z)\n\
-- -O, --disable-timeouts disable timeout code, wait forever\n\
-- -p, --protect protect existing destination file (Z)\n\
-- -r, --resume resume interrupted file transfer (Z)\n\
-- -R, --restricted restricted, more secure mode\n\
-- -q, --quiet quiet (no progress reports)\n\
-- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
-- --tcp build a TCP connection to transmit files\n\
-- --tcp-server open socket, wait for connection\n\
-- -u, --unlink unlink file after transmission\n\
-- -U, --unrestrict turn off restricted mode (if allowed to)\n\
-- -v, --verbose be verbose, provide debugging information\n\
-- -w, --windowsize N Window is N bytes (Z)\n\
-- -X, --xmodem use XMODEM protocol\n\
-- -y, --overwrite overwrite existing files\n\
-- -Y, --overwrite-or-skip overwrite existing files, else skip\n\
-- --ymodem use YMODEM protocol\n\
-- -Z, --zmodem use ZMODEM protocol\n\
--\n\
--short options use the same arguments as the long ones\n", 72},
-- {"got ZRQINIT", 73},
-- {"got ZCAN", 74},
-- {"blklen now %d\n", 75},
-- {"zsendfdata: bps rate %ld below min %ld", 76},
-- {"zsendfdata: reached stop time", 77},
-- {"Bytes Sent:%7ld/%7ld BPS:%-8ld ETA %02d:%02d ", 78},
-- {"calc_blklen: reduced to %d due to error\n", 79},
-- {"calc_blklen: returned old value %d due to low bpe diff\n", 80},
-- {"calc_blklen: old %ld, new %ld, d %ld\n", 81},
-- {"calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n", 82},
-- {"calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n", 83},
-- {"calc_blklen: returned %d as best\n", 84},
-- {"\
--\n\
--countem: Total %d %ld\n", 85},
-- {"Bad escape sequence %x", 86},
-- {"Sender Canceled", 87},
-- {"TIMEOUT", 88},
-- {"Bad data subpacket", 89},
-- {"Data subpacket too long", 90},
-- {"Garbage count exceeded", 91},
-- {"Got %s", 92},
-- {"Retry %d: ", 93},
-- {"don't have settimeofday, will not set time\n", 94},
-- {"not running as root (this is good!), can not set time\n", 95},
-- {"bytes_per_error", 96},
-- {"bytes-per-error should be >100", 97},
-- {"O_SYNC not supported by the kernel", 98},
-- {"garbage on commandline", 99},
-- {"Usage: %s [options] [filename.if.xmodem]\n", 100},
-- {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 101},
-- {"\
-- -+, --append append to existing files\n\
-- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
-- -b, --binary binary transfer\n\
-- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
-- -c, --with-crc Use 16 bit CRC (X)\n\
-- -C, --allow-remote-commands allow execution of remote commands (Z)\n\
-- -D, --null write all received data to /dev/null\n\
-- --delay-startup N sleep N seconds before doing anything\n\
-- -e, --escape Escape control characters (Z)\n\
-- -E, --rename rename any files already existing\n\
-- --errors N generate CRC error every N bytes (debugging)\n\
-- -h, --help Help, print this usage message\n\
-- -m, --min-bps N stop transmission if BPS below N\n\
-- -M, --min-bps-time N for at least N seconds (default: 120)\n\
-- -O, --disable-timeouts disable timeout code, wait forever for data\n\
-- --o-sync open output file(s) in synchronous write mode\n\
-- -p, --protect protect existing files\n\
-- -q, --quiet quiet, no progress reports\n\
-- -r, --resume try to resume interrupted file transfer (Z)\n\
-- -R, --restricted restricted, more secure mode\n\
-- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
-- -S, --timesync request remote time (twice: set local time)\n\
-- --syslog[=off] turn syslog on or off, if possible\n\
-- -t, --timeout N set timeout to N tenths of a second\n\
-- -u, --keep-uppercase keep upper case filenames\n\
-- -U, --unrestrict disable restricted mode (if allowed to)\n\
-- -v, --verbose be verbose, provide debugging information\n\
-- -w, --windowsize N Window is N bytes (Z)\n\
-- -X --xmodem use XMODEM protocol\n\
-- -y, --overwrite Yes, clobber existing file if any\n\
-- --ymodem use YMODEM protocol\n\
-- -Z, --zmodem use ZMODEM protocol\n\
--\n\
--short options use the same arguments as the long ones\n", 102},
-- {"%s waiting to receive.", 103},
-- {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 104},
-- {"%s: ready to receive %s", 105},
-- {"\rBytes received: %7ld BPS:%-6ld \r\n", 106},
-- {"\
--\r\n\
--%s: %s removed.\r\n", 107},
-- {"Pathname fetch returned EOT", 108},
-- {"Received dup Sector", 109},
-- {"Sync Error", 110},
-- {"CRC", 111},
-- {"Checksum", 112},
-- {"Sector number garbled", 113},
-- {"Sender Cancelled", 114},
-- {"Got 0%o sector header", 115},
-- {"file name ends with a /, skipped: %s\n", 116},
-- {"zmanag=%d, Lzmanag=%d\n", 117},
-- {"zconv=%d\n", 118},
-- {"file exists, skipped: %s\n", 119},
-- {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 120},
-- {"TIMESYNC: cannot set time: %s\n", 121},
-- {"cannot tmpfile() for tcp protocol synchronization", 122},
-- {"Topipe", 123},
-- {"Receiving: %s\n", 124},
-- {"Blocks received: %d", 125},
-- {"%s: %s exists\n", 126},
-- {"%s:\tSecurity Violation", 127},
-- {"remote command execution requested", 128},
-- {"not executed", 129},
-- {"got ZRINIT", 130},
-- {"Skipped", 131},
-- {"rzfile: bps rate %ld below min %ld", 132},
-- {"rzfile: reached stop time", 133},
-- {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 134},
-- {"fgets for tcp protocol synchronization failed: ", 135},
-- {"file close error", 136},
--};
--
--int _msg_tbl_length = 136;
---- lrzsz-0.12.20.safe/po/ChangeLog 1998-04-26 09:20:52.000000000 -0400
-+++ lrzsz-0.12.20/po/ChangeLog 2004-09-12 14:40:34.793681512 -0400
-@@ -1,3 +1,15 @@
-+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
-+
-+ * boldquot.sed: New file, from gettext-0.14.1.
-+ * en@boldquot.header: New file, from gettext-0.14.1.
-+ * en@quot.header: New file, from gettext-0.14.1.
-+ * insert-header.sin: New file, from gettext-0.14.1.
-+ * quot.sed: New file, from gettext-0.14.1.
-+ * remove-potcdate.sin: New file, from gettext-0.14.1.
-+ * Rules-quot: New file, from gettext-0.14.1.
-+ * cat-id-tbl.c: Remove file.
-+ * stamp-cat-id: Remove file.
-+
- /* Automatically generated by po2tbl.sed from lrzsz.pot. */
-
- #if HAVE_CONFIG_H
---- lrzsz-0.12.20.safe/po/en@boldquot.header 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/po/en@boldquot.header 2004-09-12 14:40:34.731690936 -0400
-@@ -0,0 +1,25 @@
-+# All this catalog "translates" are quotation characters.
-+# The msgids must be ASCII and therefore cannot contain real quotation
-+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
-+# and double quote (0x22). These substitutes look strange; see
-+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
-+#
-+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
-+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
-+# It also translates pairs of apostrophe (0x27) to
-+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
-+# and pairs of quotation mark (0x22) to
-+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
-+#
-+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
-+# When output to an ISO-8859-1 terminal, the single quotation marks are
-+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
-+# grave/acute accent (by libiconv), and the double quotation marks are
-+# transliterated to 0x22.
-+# When output to an ASCII terminal, the single quotation marks are
-+# transliterated to apostrophes, and the double quotation marks are
-+# transliterated to 0x22.
-+#
-+# This catalog furthermore displays the text between the quotation marks in
-+# bold face, assuming the VT100/XTerm escape sequences.
-+#
---- lrzsz-0.12.20.safe/po/en@quot.header 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/po/en@quot.header 2004-09-12 14:40:34.737690024 -0400
-@@ -0,0 +1,22 @@
-+# All this catalog "translates" are quotation characters.
-+# The msgids must be ASCII and therefore cannot contain real quotation
-+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
-+# and double quote (0x22). These substitutes look strange; see
-+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
-+#
-+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
-+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
-+# It also translates pairs of apostrophe (0x27) to
-+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
-+# and pairs of quotation mark (0x22) to
-+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
-+#
-+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
-+# When output to an ISO-8859-1 terminal, the single quotation marks are
-+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
-+# grave/acute accent (by libiconv), and the double quotation marks are
-+# transliterated to 0x22.
-+# When output to an ASCII terminal, the single quotation marks are
-+# transliterated to apostrophes, and the double quotation marks are
-+# transliterated to 0x22.
-+#
---- lrzsz-0.12.20.safe/po/insert-header.sin 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/po/insert-header.sin 2004-09-12 14:40:34.743689112 -0400
-@@ -0,0 +1,23 @@
-+# Sed script that inserts the file called HEADER before the header entry.
-+#
-+# At each occurrence of a line starting with "msgid ", we execute the following
-+# commands. At the first occurrence, insert the file. At the following
-+# occurrences, do nothing. The distinction between the first and the following
-+# occurrences is achieved by looking at the hold space.
-+/^msgid /{
-+x
-+# Test if the hold space is empty.
-+s/m/m/
-+ta
-+# Yes it was empty. First occurrence. Read the file.
-+r HEADER
-+# Output the file's contents by reading the next line. But don't lose the
-+# current line while doing this.
-+g
-+N
-+bb
-+:a
-+# The hold space was nonempty. Following occurrences. Do nothing.
-+x
-+:b
-+}
---- lrzsz-0.12.20.safe/po/Makevars 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/po/Makevars 2004-09-12 14:40:34.748688352 -0400
-@@ -0,0 +1,41 @@
-+# Makefile variables for PO directory in any package using GNU gettext.
-+
-+# Usually the message domain is the same as the package name.
-+DOMAIN = $(PACKAGE)
-+
-+# These two variables depend on the location of this directory.
-+subdir = po
-+top_builddir = ..
-+
-+# These options get passed to xgettext.
-+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
-+
-+# This is the copyright holder that gets inserted into the header of the
-+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
-+# package. (Note that the msgstr strings, extracted from the package's
-+# sources, belong to the copyright holder of the package.) Translators are
-+# expected to transfer the copyright for their translations to this person
-+# or entity, or to disclaim their copyright. The empty string stands for
-+# the public domain; in this case the translators are expected to disclaim
-+# their copyright.
-+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
-+
-+# This is the email address or URL to which the translators shall report
-+# bugs in the untranslated strings:
-+# - Strings which are not entire sentences, see the maintainer guidelines
-+# in the GNU gettext documentation, section 'Preparing Strings'.
-+# - Strings which use unclear terms or require additional context to be
-+# understood.
-+# - Strings which make invalid assumptions about notation of date, time or
-+# money.
-+# - Pluralisation problems.
-+# - Incorrect English spelling.
-+# - Incorrect formatting.
-+# It can be your email address, or a mailing list address where translators
-+# can write to without being subscribed, or the URL of a web page through
-+# which the translators can contact you.
-+MSGID_BUGS_ADDRESS =
-+
-+# This is the list of locale categories, beyond LC_MESSAGES, for which the
-+# message catalogs shall be used. It is usually empty.
-+EXTRA_LOCALE_CATEGORIES =
---- lrzsz-0.12.20.safe/po/quot.sed 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/po/quot.sed 2004-09-12 14:40:34.754687440 -0400
-@@ -0,0 +1,6 @@
-+s/"\([^"]*\)"/“\1â€/g
-+s/`\([^`']*\)'/‘\1’/g
-+s/ '\([^`']*\)' / ‘\1’ /g
-+s/ '\([^`']*\)'$/ ‘\1’/g
-+s/^'\([^`']*\)' /‘\1’ /g
-+s/“â€/""/g
---- lrzsz-0.12.20.safe/po/remove-potcdate.sin 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/po/remove-potcdate.sin 2004-09-12 14:40:34.762686224 -0400
-@@ -0,0 +1,19 @@
-+# Sed script that remove the POT-Creation-Date line in the header entry
-+# from a POT file.
-+#
-+# The distinction between the first and the following occurrences of the
-+# pattern is achieved by looking at the hold space.
-+/^"POT-Creation-Date: .*"$/{
-+x
-+# Test if the hold space is empty.
-+s/P/P/
-+ta
-+# Yes it was empty. First occurrence. Remove the line.
-+g
-+d
-+bb
-+:a
-+# The hold space was nonempty. Following occurrences. Do nothing.
-+x
-+:b
-+}
---- lrzsz-0.12.20.safe/po/Rules-quot 1969-12-31 19:00:00.000000000 -0500
-+++ lrzsz-0.12.20/po/Rules-quot 2004-09-12 14:40:34.778683792 -0400
-@@ -0,0 +1,47 @@
-+# Special Makefile rules for English message catalogs with quotation marks.
-+
-+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
-+
-+.SUFFIXES: .insert-header .po-update-en
-+
-+en@quot.po-create:
-+ $(MAKE) en@quot.po-update
-+en@boldquot.po-create:
-+ $(MAKE) en@boldquot.po-update
-+
-+en@quot.po-update: en@quot.po-update-en
-+en@boldquot.po-update: en@boldquot.po-update-en
-+
-+.insert-header.po-update-en:
-+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
-+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
-+ tmpdir=`pwd`; \
-+ echo "$$lang:"; \
-+ ll=`echo $$lang | sed -e 's/@.*//'`; \
-+ LC_ALL=C; export LC_ALL; \
-+ cd $(srcdir); \
-+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
-+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
-+ rm -f $$tmpdir/$$lang.new.po; \
-+ else \
-+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
-+ :; \
-+ else \
-+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
-+ exit 1; \
-+ fi; \
-+ fi; \
-+ else \
-+ echo "creation of $$lang.po failed!" 1>&2; \
-+ rm -f $$tmpdir/$$lang.new.po; \
-+ fi
-+
-+en@quot.insert-header: insert-header.sin
-+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
-+
-+en@boldquot.insert-header: insert-header.sin
-+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
-+
-+mostlyclean: mostlyclean-quot
-+mostlyclean-quot:
-+ rm -f *.insert-header
---- lrzsz-0.12.20.safe/po/stamp-cat-id 1998-12-30 02:50:01.000000000 -0500
-+++ lrzsz-0.12.20/po/stamp-cat-id 1969-12-31 19:00:00.000000000 -0500
-@@ -1 +0,0 @@
--timestamp
---- lrzsz-0.12.20.safe/src/Makefile.am 1998-12-28 03:38:47.000000000 -0500
-+++ lrzsz-0.12.20/src/Makefile.am 2004-09-12 14:40:53.665812512 -0400
-@@ -2,12 +2,12 @@
- lrz_SOURCES=lrz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
- lsz_SOURCES=lsz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
- noinst_HEADERS = timing.h zglobal.h zmodem.h
--datadir = $(prefix)/@DATADIRNAME@
-+datadir = $(prefix)/share
- localedir = $(datadir)/locale
- CFLAGS=@CFLAGS@
- DISTCLEAN_FILES=lrzszbug
-
--LDADD = ../lib/libzmodem.a @INTLLIBS@
-+LDADD = ../lib/libzmodem.a @LIBINTL@
- AUTOMAKE_OPTIONS=ansi2knr
- EXTRA_DIST = ansi2knr.1 ansi2knr.c lrzszbug.in
- INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl -I$(top_srcdir)/lib
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/include.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/include.patch
new file mode 100644
index 0000000000..5fcb3aa92b
--- /dev/null
+++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/include.patch
@@ -0,0 +1,25 @@
+Implicit declaration compile warning fixes from Debian
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Upstream-Status: Inappropriate [upstream is dead]
+
+--- lrzsz-0.12.21.orig/lib/long-options.c
++++ lrzsz-0.12.21/lib/long-options.c
+@@ -22,6 +22,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <getopt.h>
+ #include "long-options.h"
+
+--- lrzsz-0.12.21.orig/src/lsyslog.c
++++ lrzsz-0.12.21/src/lsyslog.c
+@@ -22,6 +22,7 @@
+ #ifdef ENABLE_SYSLOG
+ #include "zglobal.h"
+ #include <pwd.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #endif
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch
deleted file mode 100644
index 682f1c9c8d..0000000000
--- a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Upstream-Status: Pending
-
-This patch fixes following issue with automake 1.12
-
-| configure.in:95: error: automatic de-ANSI-fication support has been removed
-...
-| lib/Makefile.am:3: error: automatic de-ANSI-fication support has been removed
-| lib/Makefile.am: installing './depcomp'
-| src/Makefile.am:11: error: automatic de-ANSI-fication support has been removed
-
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/03
-
-Index: lrzsz-0.12.20/configure.in
-===================================================================
---- lrzsz-0.12.20.orig/configure.in
-+++ lrzsz-0.12.20/configure.in
-@@ -92,7 +92,6 @@ AC_PROG_RANLIB
- AC_ISC_POSIX
- AC_AIX
- AC_MINIX
--AM_C_PROTOTYPES
- AC_C_CONST
- AC_C_INLINE
-
-Index: lrzsz-0.12.20/lib/Makefile.am
-===================================================================
---- lrzsz-0.12.20.orig/lib/Makefile.am
-+++ lrzsz-0.12.20/lib/Makefile.am
-@@ -1,6 +1,5 @@
- noinst_LIBRARIES=libzmodem.a
- CFLAGS=@CFLAGS@
--AUTOMAKE_OPTIONS=ansi2knr
-
- EXTRA_DIST = alloca.c ansi2knr.1 ansi2knr.c \
- getopt.c getopt1.c mkdir.c mktime.c \
-Index: lrzsz-0.12.20/src/Makefile.am
-===================================================================
---- lrzsz-0.12.20.orig/src/Makefile.am
-+++ lrzsz-0.12.20/src/Makefile.am
-@@ -8,7 +8,6 @@ CFLAGS=@CFLAGS@
- DISTCLEAN_FILES=lrzszbug
-
- LDADD = ../lib/libzmodem.a @LIBINTL@
--AUTOMAKE_OPTIONS=ansi2knr
- EXTRA_DIST = ansi2knr.1 ansi2knr.c lrzszbug.in
- INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl -I$(top_srcdir)/lib
- #DEFS = -DLOCALEDIR=\"$(localedir)\" -DOS=\"@host_os@\" -DCPU=\"@host_cpu@\"
diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
index 4b349be32f..4129237c59 100644
--- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
+++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
@@ -13,12 +13,12 @@ DEPENDS = ""
PR = "r6"
SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \
+ file://autotools-update.patch \
file://autotools.patch \
file://makefile.patch \
- file://gettext.patch \
- file://acdefine.patch \
- file://lrzsz_fix_for_automake-1.12.patch \
file://lrzsz-check-locale.h.patch \
+ file://cve-2018-10195.patch \
+ file://include.patch \
"
SRC_URI[md5sum] = "b5ce6a74abc9b9eb2af94dffdfd372a4"
diff --git a/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch b/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch
new file mode 100644
index 0000000000..9c2d0eb479
--- /dev/null
+++ b/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch
@@ -0,0 +1,38 @@
+From f5871e1f3650d6c8a032928cb5d8ca00c275c377 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Fri, 15 Feb 2019 14:57:41 -0800
+Subject: [PATCH] Makefile: Don't specify mabi or march
+
+To avoid
+ can't link double-float modules with soft-float modules
+errors when building 32-bit openSBI don't specify mabi or march.
+
+Upstream-Status: Inappropriate [Fixes a 32-bit Yocto flow bug]
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+---
+ Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index ae68f55..10851fc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -145,7 +145,6 @@ GENFLAGS += $(firmware-genflags-y)
+ CFLAGS = -g -Wall -Werror -nostdlib -fno-strict-aliasing -O2
+ CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
+ CFLAGS += -mno-save-restore -mstrict-align
+-CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
+ CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
+ CFLAGS += $(GENFLAGS)
+ CFLAGS += $(platform-cflags-y)
+@@ -158,7 +157,6 @@ CPPFLAGS += $(firmware-cppflags-y)
+ ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__
+ ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
+ ASFLAGS += -mno-save-restore -mstrict-align
+-ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
+ ASFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
+ ASFLAGS += $(GENFLAGS)
+ ASFLAGS += $(platform-asflags-y)
+--
+2.20.1
+
diff --git a/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
new file mode 100644
index 0000000000..b9714a7acb
--- /dev/null
+++ b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
@@ -0,0 +1,39 @@
+def riscv_get_extra_oemake_image(d):
+ sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
+ deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
+
+ if sbi_payload is None:
+ return ""
+
+ return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload
+
+def riscv_get_extra_oemake_fdt(d):
+ sbi_fdt_payload = d.getVar('RISCV_SBI_FDT')
+ deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
+
+ if sbi_fdt_payload is None:
+ return ""
+
+ return "FW_PAYLOAD_FDT_PATH=" + deploy_dir + "/" + sbi_fdt_payload
+
+def riscv_get_do_compile_depends(d):
+ sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
+ sbi_fdt_payload = d.getVar('RISCV_SBI_FDT')
+
+ if sbi_payload is None:
+ return ""
+
+ if 'linux' in sbi_payload or 'Image' in sbi_payload:
+ return "virtual/kernel:do_deploy"
+ if 'u-boot.bin' in sbi_payload:
+ # If we want U-Boot and a FDT then we need to depend on U-Boot and
+ # the kernel
+ if sbi_fdt_payload is not None:
+ return "virtual/bootloader:do_deploy virtual/kernel:do_deploy"
+ else:
+ return "virtual/bootloader:do_deploy"
+ # If we want a custom FDT then we need to depend on the kernel
+ if sbi_fdt_payload is not None:
+ return "virtual/kernel:do_deploy"
+
+ return ""
diff --git a/meta/recipes-bsp/opensbi/opensbi_0.5.bb b/meta/recipes-bsp/opensbi/opensbi_0.5.bb
new file mode 100644
index 0000000000..759bbbfdaa
--- /dev/null
+++ b/meta/recipes-bsp/opensbi/opensbi_0.5.bb
@@ -0,0 +1,53 @@
+SUMMARY = "RISC-V Open Source Supervisor Binary Interface (OpenSBI)"
+DESCRIPTION = "OpenSBI aims to provide an open-source and extensible implementation of the RISC-V SBI specification for a platform specific firmware (M-mode) and a general purpose OS, hypervisor or bootloader (S-mode or HS-mode). OpenSBI implementation can be easily extended by RISC-V platform or System-on-Chip vendors to fit a particular hadware configuration."
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5"
+DEPENDS += "dtc-native"
+
+require opensbi-payloads.inc
+
+inherit autotools-brokensep deploy
+
+SRCREV = "be92da280d87c38a2e0adc5d3f43bab7b5468f09"
+SRC_URI = "git://github.com/riscv/opensbi.git \
+ file://0001-Makefile-Don-t-specify-mabi-or-march.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+SRC_URI[md5sum] = "621f38d8205ef5fb185e4055025e73df"
+SRC_URI[sha256sum] = "07f18b73abf3b85aabe5bead19a923716c100d30eb58033459f39c3a224be300"
+
+EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D}"
+# If RISCV_SBI_PAYLOAD is set then include it as a payload
+EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)} ${@riscv_get_extra_oemake_fdt(d)}"
+
+# Required if specifying a custom payload
+do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
+
+do_install_append() {
+ # In the future these might be required as a dependency for other packages.
+ # At the moment just delete them to avoid warnings
+ rm -r ${D}/include
+ rm -r ${D}/platform/${RISCV_SBI_PLAT}/lib
+ rm -r ${D}/platform/${RISCV_SBI_PLAT}/firmware/payloads
+ rm -r ${D}/lib
+}
+
+do_deploy () {
+ install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/
+ install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/
+ install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/
+}
+
+addtask deploy before do_build after do_install
+
+FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
+FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
+FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
+
+
+COMPATIBLE_HOST = "(riscv64|riscv32).*"
+INHIBIT_PACKAGE_STRIP = "1"
+
+SECURITY_CFLAGS = ""
diff --git a/meta/recipes-bsp/pciutils/pciutils/configure.patch b/meta/recipes-bsp/pciutils/pciutils/configure.patch
index 66c9f91630..a7e445733a 100644
--- a/meta/recipes-bsp/pciutils/pciutils/configure.patch
+++ b/meta/recipes-bsp/pciutils/pciutils/configure.patch
@@ -1,47 +1,37 @@
-Upstream-Status: Inappropriate [embedded specific]
+This patch:
+* ensures we link correctly
+* allows us to optionally pass target information to configure rather than using uname
+* select linux as the platform in most cases we care about
+
+This is a merge of various tweaks to allow us to build pciutils including
+work from:
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
----
+7/30/2010 - Qing He <qing.he@intel.com>
+1/22/2012 - Shane Wang <shane.wang@intel.com>
+Ionut Radu <ionutx.radu@intel.com>
+2017/6/15 - RP - Cleanups and merging patches
-7/30/2010 - rebased to 3.1.5 by Qing He <qing.he@intel.com>
-1/22/2012 - rebased to 3.1.9 by Shane Wang <shane.wang@intel.com>
+Upstream-Status: Inappropriate [embedded specific]
-diff -r af2b10cc3c14 Makefile
---- a/Makefile Sun Jan 22 18:36:34 2012 +0800
-+++ b/Makefile Sun Jan 22 18:38:54 2012 +0800
-@@ -37,7 +37,6 @@
- # Commands
- INSTALL=install
- DIRINSTALL=install -d
--STRIP=-s
- CC=$(CROSS_COMPILE)gcc
- AR=$(CROSS_COMPILE)ar
- RANLIB=$(CROSS_COMPILE)ranlib
-@@ -86,7 +85,7 @@
+Index: pciutils-3.5.6/Makefile
+===================================================================
+--- pciutils-3.5.6.orig/Makefile
++++ pciutils-3.5.6/Makefile
+@@ -96,7 +96,7 @@ example: example.o lib/$(PCILIB)
example.o: example.c $(PCIINC)
%: %.o
- $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@
-+ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) -o $@
++ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@
%.8 %.7: %.man
M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#"
-@@ -101,7 +100,7 @@
- install: all
- # -c is ignored on Linux, but required on FreeBSD
- $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7
-- $(INSTALL) -c -m 755 $(STRIP) lspci setpci $(DESTDIR)$(SBINDIR)
-+ $(INSTALL) -c -m 755 lspci setpci $(DESTDIR)$(SBINDIR)
- $(INSTALL) -c -m 755 update-pciids $(DESTDIR)$(SBINDIR)
- $(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR)
- $(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8
-diff -r af2b10cc3c14 lib/configure
---- a/lib/configure Sun Jan 22 18:36:34 2012 +0800
-+++ b/lib/configure Sun Jan 22 18:38:54 2012 +0800
-@@ -14,6 +14,10 @@
- fi
+Index: pciutils-3.5.6/lib/configure
+===================================================================
+--- pciutils-3.5.6.orig/lib/configure
++++ pciutils-3.5.6/lib/configure
+@@ -9,6 +9,10 @@ echo_n() {
+ printf '%s' "$*"
}
+VERSION=$1
@@ -51,7 +41,7 @@ diff -r af2b10cc3c14 lib/configure
if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then
echo >&2 "Please run the configure script from the top-level Makefile"
exit 1
-@@ -21,8 +25,8 @@
+@@ -16,8 +20,8 @@ fi
echo_n "Configuring libpci for your system..."
if [ -z "$HOST" ] ; then
@@ -62,7 +52,7 @@ diff -r af2b10cc3c14 lib/configure
realsys="$sys"
if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ]
then
-@@ -30,7 +34,7 @@
+@@ -25,7 +29,7 @@ if [ -z "$HOST" ] ; then
proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`
else
@@ -71,7 +61,7 @@ diff -r af2b10cc3c14 lib/configure
fi
if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ]
then
-@@ -40,7 +44,7 @@
+@@ -35,7 +39,7 @@ if [ -z "$HOST" ] ; then
then
sys=cygwin
fi
@@ -80,24 +70,11 @@ diff -r af2b10cc3c14 lib/configure
fi
[ -n "$RELEASE" ] && rel="${RELEASE}"
# CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
-@@ -49,6 +53,21 @@
+@@ -44,6 +48,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^
sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo " $host $rel $cpu $sys"
-+if [ "$host" = "linux--gnueabi" ]
-+then
-+ sys=linux
-+fi
-+
-+if [ "$host" = "linux--uclibc" ]
-+then
-+ sys=linux
-+fi
-+
-+if [ "$host" = "linux--uclibceabi" ]
-+then
-+ sys=linux
-+fi
++{ echo "$host" | grep linux; } && sys=linux
+
c=config.h
m=config.mk
diff --git a/meta/recipes-bsp/pciutils/pciutils/guess-fix.patch b/meta/recipes-bsp/pciutils/pciutils/guess-fix.patch
deleted file mode 100644
index 540b4a0d13..0000000000
--- a/meta/recipes-bsp/pciutils/pciutils/guess-fix.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-the original guess algorithm is broken for many archs
-for example, the following two would break:
- arm-linux-gnueabi --> sys=gnueabi
- x86_64-unknown-pc-linux-gnu --> sys = pc-linux-gnu
-
-use a simpler scheme here and hope it works for all the cases
-
-Upstream-Status: Pending
-
-7/30/2010 - created by Qing He <qing.he@intel.com>
-
-diff --git a/lib/configure b/lib/configure
-index 4318b05..84f6acb 100755
---- a/lib/configure
-+++ b/lib/configure
-@@ -53,20 +53,7 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- echo " $host $rel $cpu $sys"
-
--if [ "$host" = "linux--gnueabi" ]
--then
-- sys=linux
--fi
--
--if [ "$host" = "linux--uclibc" ]
--then
-- sys=linux
--fi
--
--if [ "$host" = "linux--uclibceabi" ]
--then
-- sys=linux
--fi
-+{ echo "$host" | grep linux; } && sys=linux
-
- c=config.h
- m=config.mk
diff --git a/meta/recipes-bsp/pciutils/pciutils/makefile.patch b/meta/recipes-bsp/pciutils/pciutils/makefile.patch
deleted file mode 100644
index c3fbc6f9b1..0000000000
--- a/meta/recipes-bsp/pciutils/pciutils/makefile.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Ionut Radu <ionutx.radu@intel.com>
-
-Index: pciutils-3.2.0/Makefile
-===================================================================
---- pciutils-3.2.0.orig/Makefile
-+++ pciutils-3.2.0/Makefile
-@@ -35,7 +35,7 @@ SHAREDIR=$(PREFIX)/share
- IDSDIR=$(SHAREDIR)
- MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
- INCDIR=$(PREFIX)/include
--LIBDIR=$(PREFIX)/lib
-+LIBDIR=$(libdir)
- PKGCFDIR=$(LIBDIR)/pkgconfig
-
- # Commands
-@@ -94,7 +94,7 @@ example: example.o lib/$(PCILIB_DEV)
- example.o: example.c $(PCIINC)
-
- %: %.o
-- $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) -o $@
-+ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@
-
- %.8 %.7: %.man
- M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#"
diff --git a/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb b/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb
deleted file mode 100644
index d32b119424..0000000000
--- a/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "PCI utilities"
-DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
-to PCI bus configuration space and several utilities based on this library.'
-HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "zlib kmod"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
- file://configure.patch \
- file://guess-fix.patch \
- file://makefile.patch"
-
-SRC_URI[md5sum] = "0879a8f7ac51f4e874cfc6b3521a13cc"
-SRC_URI[sha256sum] = "2bf3a4605a562fb6b8b7673bff85a474a5cf383ed7e4bd8886b4f0939013d42f"
-
-inherit multilib_header
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
-PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
-
-PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
-
-# see configure.patch
-do_configure () {
- (
- cd lib && \
- # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
- # so we put it before ./configure
- ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
- )
-}
-
-export PREFIX = "${prefix}"
-export SBINDIR = "${sbindir}"
-export SHAREDIR = "${datadir}"
-export MANDIR = "${mandir}"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
-
-# The configure script breaks if the HOST variable is set
-HOST[unexport] = "1"
-
-do_install () {
- oe_runmake DESTDIR=${D} install install-lib
-
- install -d ${D}${bindir}
- ln -s ../sbin/lspci ${D}${bindir}/lspci
-
- oe_multilib_header pci/config.h
-}
-
-PACKAGES =+ "${PN}-ids libpci"
-FILES_${PN}-ids = "${datadir}/pci.ids*"
-FILES_libpci = "${libdir}/libpci.so.*"
-SUMMARY_${PN}-ids = "PCI utilities - device ID database"
-DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
-RDEPENDS_${PN} += "${PN}-ids"
diff --git a/meta/recipes-bsp/pciutils/pciutils_3.6.2.bb b/meta/recipes-bsp/pciutils/pciutils_3.6.2.bb
new file mode 100644
index 0000000000..413421cd8a
--- /dev/null
+++ b/meta/recipes-bsp/pciutils/pciutils_3.6.2.bb
@@ -0,0 +1,60 @@
+SUMMARY = "PCI utilities"
+DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
+to PCI bus configuration space and several utilities based on this library.'
+HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+DEPENDS = "zlib kmod"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
+ file://configure.patch"
+
+SRC_URI[md5sum] = "77963796d1be4f451b83e6da28ba4f82"
+SRC_URI[sha256sum] = "db452ec986edefd88af0d222d22f6102f8030a8633fdfe846c3ae4bde9bb93f3"
+
+inherit multilib_header pkgconfig
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
+PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
+
+PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
+
+# see configure.patch
+do_configure () {
+ (
+ cd lib && \
+ # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
+ # so we put it before ./configure
+ ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
+ )
+}
+
+export PREFIX = "${prefix}"
+export SBINDIR = "${sbindir}"
+export SHAREDIR = "${datadir}"
+export MANDIR = "${mandir}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
+
+ASNEEDED = ""
+
+# The configure script breaks if the HOST variable is set
+HOST[unexport] = "1"
+
+do_install () {
+ oe_runmake DESTDIR=${D} install install-lib
+
+ install -d ${D}${bindir}
+ ln -s ../sbin/lspci ${D}${bindir}/lspci
+
+ oe_multilib_header pci/config.h
+}
+
+PACKAGES =+ "${PN}-ids libpci"
+FILES_${PN}-ids = "${datadir}/pci.ids*"
+FILES_libpci = "${libdir}/libpci.so.*"
+SUMMARY_${PN}-ids = "PCI utilities - device ID database"
+DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
+RDEPENDS_${PN} += "${PN}-ids"
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch b/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
deleted file mode 100644
index d4c2bed15c..0000000000
--- a/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Include sys/types.h for u_long definition
-
-Fix errors like
-In file included from src/lex_config.l:34:0:
-src/yacc_config.y:45:5: error: unknown type name 'u_long'
- u_long num;
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: pcmciautils-018/src/lex_config.l
-===================================================================
---- pcmciautils-018.orig/src/lex_config.l
-+++ pcmciautils-018/src/lex_config.l
-@@ -22,6 +22,7 @@
- #include <unistd.h>
- #include <string.h>
- #include <syslog.h>
-+#include <sys/types.h>
-
- #ifdef HAS_WORDEXP
- #include <wordexp.h>
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_fix.patch b/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_fix.patch
deleted file mode 100644
index 7b0ce21194..0000000000
--- a/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_fix.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Hardcoded paths are bad...
-This lets us use the install from OE's native sysroot
-rebase the patch to 018, removing hardcoded path for true
-as well. Removing of -D in install invocation is a little
-questionable, is it some GNU extention?
-
--Khem Raj <raj.khem@gmail.com>
-
-Index: pcmciautils-018/Makefile
-===================================================================
---- pcmciautils-018.orig/Makefile
-+++ pcmciautils-018/Makefile
-@@ -76,7 +76,7 @@ sbindir = ${exec_prefix}/sbin
- mandir = ${prefix}/usr/share/man
- udevdir = ${prefix}/lib/udev
-
--INSTALL = /usr/bin/install -c
-+INSTALL = install -c
- INSTALL_PROGRAM = ${INSTALL}
- INSTALL_DATA = ${INSTALL} -m 644
- INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-@@ -180,7 +180,7 @@ endif
- # if DEBUG is enabled, then we do not strip or optimize
- ifeq ($(strip $(DEBUG)),true)
- CFLAGS += -O1 -g -DDEBUG -D_GNU_SOURCE
-- STRIPCMD = /bin/true -Since_we_are_debugging
-+ STRIPCMD = true -Since_we_are_debugging
- else
- CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
- STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
-@@ -273,30 +273,32 @@ clean:
-
- install-hotplug:
- $(INSTALL) -d $(DESTDIR)$(hotplugdir)
-- $(INSTALL_PROGRAM) -D hotplug/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.agent
-- $(INSTALL_PROGRAM) -D hotplug/pcmcia.rc $(DESTDIR)$(hotplugdir)/pcmcia.rc
-+ $(INSTALL_PROGRAM) hotplug/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.agent
-+ $(INSTALL_PROGRAM) hotplug/pcmcia.rc $(DESTDIR)$(hotplugdir)/pcmcia.rc
-
- uninstall-hotplug:
- - rm -f $(DESTDIR)$(hotplugdir)/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.rc
-
- install-socket-hotplug:
-- $(INSTALL_PROGRAM) -D hotplug/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent
-- $(INSTALL_PROGRAM) -D hotplug/pcmcia_socket.rc $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc
-+ $(INSTALL_PROGRAM) hotplug/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent
-+ $(INSTALL_PROGRAM) hotplug/pcmcia_socket.rc $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc
-
- uninstall-socket-hotplug:
- - rm -f $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc
-
- install-socket-tools:
-- $(INSTALL_PROGRAM) -D $(PCMCIA_SOCKET_STARTUP) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP)
-+ $(INSTALL) -d $(DESTDIR)$(udevhelperdir)
-+ $(INSTALL_PROGRAM) $(PCMCIA_SOCKET_STARTUP) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP)
-
- uninstall-socket-tools:
- - rm -f $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP)
-
- install-tools:
- $(INSTALL) -d $(DESTDIR)$(sbindir)
-- $(INSTALL_PROGRAM) -D $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(PCCARDCTL)
-+ $(INSTALL) -d $(DESTDIR)$(udevhelperdir)
-+ $(INSTALL_PROGRAM) $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(PCCARDCTL)
- $(SYMLINK) $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(LSPCMCIA)
-- $(INSTALL_PROGRAM) -D $(PCMCIA_CHECK_BROKEN_CIS) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_CHECK_BROKEN_CIS)
-+ $(INSTALL_PROGRAM) $(PCMCIA_CHECK_BROKEN_CIS) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_CHECK_BROKEN_CIS)
-
- uninstall-tools:
- - rm -f $(DESTDIR)$(sbindir)/$(PCCARDCTL)
-@@ -305,22 +307,24 @@ uninstall-tools:
-
- install-config:
- $(INSTALL) -d $(DESTDIR)$(pcmciaconfdir)
-- $(INSTALL_DATA) -D config/config.opts $(DESTDIR)$(pcmciaconfdir)/config.opts
-+ $(INSTALL_DATA) config/config.opts $(DESTDIR)$(pcmciaconfdir)/config.opts
- if [ -f config/config.opts.$(ARCH) ]; then \
-- $(INSTALL_DATA) -D config/config.opts.$(ARCH) $(DESTDIR)$(pcmciaconfdir)/config.opts; \
-+ $(INSTALL_DATA) config/config.opts.$(ARCH) $(DESTDIR)$(pcmciaconfdir)/config.opts; \
- fi
-
- uninstall-config:
- # - rm -f $(DESTDIR)$(pcmciaconfdir)/config.opts
-
- install-udev:
-- $(INSTALL_DATA) -D $(UDEV_RULES_FILE) $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules
-+ $(INSTALL) -d $(DESTDIR)$(udevrulesdir)
-+ $(INSTALL_DATA) $(UDEV_RULES_FILE) $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules
-
- uninstall-udev:
- - rm -f $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules
-
- install-man:
-- $(INSTALL_DATA) -D man/man8/pccardctl.8 $(DESTDIR)$(mandir)/man8/pccardctl.8
-+ $(INSTALL) -d $(DESTDIR)$(mandir)/man8
-+ $(INSTALL_DATA) man/man8/pccardctl.8 $(DESTDIR)$(mandir)/man8/pccardctl.8
- $(SYMLINK) pccardctl.8 $(DESTDIR)$(mandir)/man8/lspcmcia.8
-
- uninstall-man:
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch b/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
deleted file mode 100644
index f5a518ff73..0000000000
--- a/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-"make src/lex_config.o"
-
-results in:
-
-src/lex_config.l:35:25: fatal error: yacc_config.h: No such file or directory
-
-so add missing dependency through a missing rule. Also remove a rule which
-doesn't appear to do anything.
-
-RP
-2016/1/31
-
-Upstream-Status: Pending
-
-Index: pcmciautils-018/Makefile
-===================================================================
---- pcmciautils-018.orig/Makefile
-+++ pcmciautils-018/Makefile
-@@ -249,6 +249,9 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
- yacc_config.o lex_config.o: %.o: %.c src/yacc_config.h
- $(CC) -c -MD -O -pipe $(CPPFLAGS) $<
-
-+src/lex_config.o : src/lex_config.c src/yacc_config.h
-+ $(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
-+
- debugtools: ccdv $(CBDUMP) $(CISDUMP)
-
- $(CBDUMP): $(LIBC) debug/cbdump.o
-Index: pcmciautils-018/Makefile
-===================================================================
---- pcmciautils-018.orig/Makefile
-+++ pcmciautils-018/Makefile
-@@ -246,8 +246,8 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
- $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) src/startup.o src/yacc_config.o src/lex_config.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(QUIET) $(STRIPCMD) $@
-
--yacc_config.o lex_config.o: %.o: %.c
-- $(CC) -c -MD -O -pipe $(CPPFLAGS) $<
-+src/lex_config.o : src/lex_config.c src/yacc_config.h ccdv
-+ $(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
-
- debugtools: ccdv $(CBDUMP) $(CISDUMP)
-
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils.inc b/meta/recipes-bsp/pcmciautils/pcmciautils.inc
deleted file mode 100644
index 581bff417b..0000000000
--- a/meta/recipes-bsp/pcmciautils/pcmciautils.inc
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Linux kernel userland utilities for the PCMCIA subsystem"
-HOMEPAGE = "https://www.kernel.org/pub/linux/utils/kernel/pcmcia/"
-SECTION = "kernel/userland"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "udev sysfsutils flex-native"
-RDEPENDS_${PN} = "udev module-init-tools"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/pcmcia/${BP}.tar.xz"
-
-S = "${WORKDIR}/pcmciautils-${PV}"
-
-export HOSTCC = "${BUILD_CC}"
-export etcdir = "${sysconfdir}"
-export sbindir = "${base_sbindir}"
-export pcmciaconfdir = "${sysconfdir}/pcmcia"
-export udevdir = "`pkg-config --variable=udevdir udev`"
-export udevrulesdir = "`pkg-config --variable=udevdir udev`/rules.d"
-export UDEV = "1"
-LD = "${CC}"
-CFLAGS =+ "-I${S}/src"
-CFLAGS =+ "-DPCMCIAUTILS_VERSION=\\"${PV}\\""
-
-EXTRA_OEMAKE = "-e 'STRIP=echo' 'LIB_OBJS=-lc -lsysfs' 'LEX=flex'"
-
-do_install () {
- oe_runmake 'DESTDIR=${D}' install
-}
-
-CONFFILES_${PN} += "${sysconfdir}/pcmcia/config.opts"
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb b/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
deleted file mode 100644
index bf0f58a7cc..0000000000
--- a/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require pcmciautils.inc
-
-SRC_URI += "file://makefile_fix.patch \
- file://makefile_race.patch \
- file://lex_sys_types.patch \
-"
-
-SRC_URI[md5sum] = "885431c3cefb76ffdad8cb985134e996"
-SRC_URI[sha256sum] = "57c27be8f04ef4d535bcfa988567316cc57659fe69068327486dab53791e6558"
-
-PR = "r1"
diff --git a/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb b/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
index 27cb3dbe8d..cac09101c4 100644
--- a/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
+++ b/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
@@ -13,7 +13,9 @@ SRC_URI = "http://pm-utils.freedesktop.org/releases/pm-utils-${PV}.tar.gz"
SRC_URI[md5sum] = "1742a556089c36c3a89eb1b957da5a60"
SRC_URI[sha256sum] = "8ed899032866d88b2933a1d34cc75e8ae42dcde20e1cc21836baaae3d4370c0b"
-inherit pkgconfig autotools
+inherit pkgconfig autotools manpages
+
+PACKAGECONFIG[manpages] = "--enable-doc, --disable-doc, libxslt-native xmlto-native"
RDEPENDS_${PN} = "grep bash"
diff --git a/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
deleted file mode 100644
index 103d2861e8..0000000000
--- a/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 9dcd2c80347493f73800d8c1cb539f1daef14394 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Tue, 26 Jul 2016 03:54:42 -0400
-Subject: [PATCH] use lnr wrapper instead of looking for --relative option for ln
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- Makefile.am | 6 +++---
- configure.ac | 2 --
- 2 files changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 305099a..f08d023 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -247,7 +247,7 @@ define move-to-rootlibdir
- $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
- so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
- rm -f $(DESTDIR)$(libdir)/$$libname && \
-- $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
-+ lnr $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
- mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
- fi
- endef
-@@ -321,7 +321,7 @@ define install-relative-aliases
- while [ -n "$$1" ]; do \
- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
- rm -f $(DESTDIR)$$dir/$$2 && \
-- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
-+ lnr $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
- shift 2 || exit $$?; \
- done
- endef
-@@ -2906,7 +2906,7 @@ systemd_dbus1_generator_LDADD = \
- dbus1-generator-install-hook:
- $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
- $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
-- $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
-+ $(AM_V_LN)lnr $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
-
- dbus1-generator-uninstall-hook:
- rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
-diff --git a/configure.ac b/configure.ac
-index 329861a..52c6e3d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
- AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
- AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
-
--AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
--
- M4_DEFINES=
-
- AC_CHECK_TOOL(OBJCOPY, objcopy)
---
-2.8.1
-
diff --git a/meta/recipes-bsp/systemd-boot/systemd-boot.bb b/meta/recipes-bsp/systemd-boot/systemd-boot.bb
deleted file mode 100644
index 5b1164ec9b..0000000000
--- a/meta/recipes-bsp/systemd-boot/systemd-boot.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require recipes-core/systemd/systemd.inc
-
-DEPENDS = "intltool-native libcap util-linux gnu-efi"
-
-SRC_URI += "file://0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch"
-
-inherit autotools pkgconfig gettext
-inherit deploy
-
-EXTRA_OECONF = " --enable-gnuefi \
- --with-efi-includedir=${STAGING_INCDIR} \
- --with-efi-ldsdir=${STAGING_LIBDIR} \
- --with-efi-libdir=${STAGING_LIBDIR} \
- --disable-manpages \
- "
-
-# Imported from gummiboot recipe
-TUNE_CCARGS_remove = "-mfpmath=sse"
-COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
-
-do_compile() {
- SYSTEMD_BOOT_EFI_ARCH="ia32"
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- SYSTEMD_BOOT_EFI_ARCH="x64"
- fi
-
- oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
-}
-
-do_install() {
- # Bypass systemd installation with a NOP
- :
-}
-
-do_deploy () {
- install ${B}/systemd-boot*.efi ${DEPLOYDIR}
-}
-addtask deploy before do_build after do_compile
diff --git a/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch b/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch
new file mode 100644
index 0000000000..b9118164df
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch
@@ -0,0 +1,31 @@
+From 0565a080d153d5baaaacfeb5045a832e126f4f9e Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Mon, 14 Oct 2019 17:37:30 -0700
+Subject: [PATCH] include/env.h: Ensure ulong is defined
+
+To fix these failures when building with musl:
+ include/env.h:166:1: error: unknown type name 'ulong'; did you mean 'long'?
+ensure that ulong is defined.
+
+Upstream-Status: Pending
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+---
+ include/env.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/env.h b/include/env.h
+index b72239f6a5..5ca49a3456 100644
+--- a/include/env.h
++++ b/include/env.h
+@@ -13,6 +13,8 @@
+ #include <stdbool.h>
+ #include <linux/types.h>
+
++typedef unsigned long ulong;
++
+ struct environment_s;
+
+ /* Value for environment validity */
+--
+2.23.0
+
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
new file mode 100644
index 0000000000..a0f9c41469
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
@@ -0,0 +1,23 @@
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+DESCRIPTION = "U-Boot, a boot loader for Embedded boards based on PowerPC, \
+ARM, MIPS and several other processors, which can be installed in a boot \
+ROM and used to initialize and test the hardware or to download and run \
+application code."
+SECTION = "bootloaders"
+DEPENDS += "flex-native bison-native"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"
+PE = "1"
+
+# Drop this line when updating to 2020.01 final
+PV = "2020.01~rc3"
+
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "d4a31e8ee5592072d8d5208b3e950cba2d89b6bd"
+
+SRC_URI = "git://git.denx.de/u-boot.git \
+ "
+
+S = "${WORKDIR}/git"
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
deleted file mode 100644
index 79f1548ef0..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-SECTION = "bootloader"
-DEPENDS = "mtd-utils"
-
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
-INSANE_SKIP_${PN} = "already-stripped"
-EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
-EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
-
-inherit uboot-config
-
-do_compile () {
- oe_runmake ${UBOOT_MACHINE}
- oe_runmake env
-}
-
-do_install () {
- install -d ${D}${base_sbindir}
- install -d ${D}${sysconfdir}
- install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
- install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
- install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
-}
-
-do_install_class-cross () {
- install -d ${D}${bindir_cross}
- install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
- install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
-}
-
-SYSROOT_DIRS_append_class-cross = " ${bindir_cross}"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-BBCLASSEXTEND = "cross"
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb
new file mode 100644
index 0000000000..7de91ffbd7
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb
@@ -0,0 +1,36 @@
+require u-boot-common.inc
+
+SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
+DEPENDS += "mtd-utils"
+
+SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch"
+
+INSANE_SKIP_${PN} = "already-stripped"
+EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
+EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
+
+inherit uboot-config
+
+do_compile () {
+ oe_runmake -C ${S} ${UBOOT_MACHINE} O=${B}
+ oe_runmake -C ${S} envtools O=${B}
+}
+
+do_install () {
+ install -d ${D}${base_sbindir}
+ install -d ${D}${sysconfdir}
+ install -m 755 ${B}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
+ install -m 755 ${B}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
+ install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
+}
+
+do_install_class-cross () {
+ install -d ${D}${bindir_cross}
+ install -m 755 ${B}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
+ install -m 755 ${B}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
+}
+
+SYSROOT_DIRS_append_class-cross = " ${bindir_cross}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+BBCLASSEXTEND = "cross"
diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
deleted file mode 100644
index d5921a0443..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "U-Boot bootloader image creation tool"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-SECTION = "bootloader"
-
-DEPENDS = "openssl"
-
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
-
-do_compile () {
- oe_runmake sandbox_defconfig
- oe_runmake cross_tools NO_SDL=1
-}
-
-do_install () {
- install -d ${D}${bindir}
- install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
- ln -sf uboot-mkimage ${D}${bindir}/mkimage
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb
new file mode 100644
index 0000000000..bede984ef7
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb
@@ -0,0 +1,67 @@
+require u-boot-common.inc
+
+SUMMARY = "U-Boot bootloader tools"
+DEPENDS += "openssl"
+
+PROVIDES = "${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage"
+PROVIDES_class-native = "u-boot-mkimage-native u-boot-mkenvimage-native"
+
+PACKAGES += "${PN}-mkimage ${PN}-mkenvimage"
+
+# Required for backward compatibility with "u-boot-mkimage-xxx.bb"
+RPROVIDES_${PN}-mkimage = "u-boot-mkimage"
+RREPLACES_${PN}-mkimage = "u-boot-mkimage"
+RCONFLICTS_${PN}-mkimage = "u-boot-mkimage"
+
+EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+
+SED_CONFIG_EFI = '-e "s/CONFIG_EFI_LOADER=.*/# CONFIG_EFI_LOADER is not set/"'
+SED_CONFIG_EFI_x86 = ''
+SED_CONFIG_EFI_x86-64 = ''
+SED_CONFIG_EFI_arm = ''
+SED_CONFIG_EFI_armeb = ''
+SED_CONFIG_EFI_aarch64 = ''
+
+do_compile () {
+ oe_runmake sandbox_defconfig
+
+ # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
+ # generating it requires bin2header tool, which for target build
+ # is built with target tools and thus cannot be executed on host.
+ sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} .config
+
+ oe_runmake cross_tools NO_SDL=1
+}
+
+do_install () {
+ install -d ${D}${bindir}
+
+ # mkimage
+ install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
+ ln -sf uboot-mkimage ${D}${bindir}/mkimage
+
+ # mkenvimage
+ install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage
+ ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage
+
+ # dumpimage
+ install -m 0755 tools/dumpimage ${D}${bindir}/uboot-dumpimage
+ ln -sf uboot-dumpimage ${D}${bindir}/dumpimage
+
+ # fit_check_sign
+ install -m 0755 tools/fit_check_sign ${D}${bindir}/uboot-fit_check_sign
+ ln -sf uboot-fit_check_sign ${D}${bindir}/fit_check_sign
+}
+
+ALLOW_EMPTY_${PN} = "1"
+FILES_${PN} = ""
+FILES_${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign"
+FILES_${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage"
+
+RDEPENDS_${PN}-mkimage += "dtc"
+RDEPENDS_${PN} += "${PN}-mkimage ${PN}-mkenvimage"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 2a94d266bd..55d8b47870 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -1,22 +1,19 @@
SUMMARY = "Universal Boot Loader for embedded devices"
-HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
-SECTION = "bootloaders"
PROVIDES = "virtual/bootloader"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-inherit uboot-config uboot-sign deploy
+DEPENDS += "kern-tools-native"
+
+inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native
+
+DEPENDS += "swig-native"
EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
+EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
PACKAGECONFIG ??= "openssl"
# u-boot will compile its own tools during the build, with specific
@@ -50,7 +47,7 @@ UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
# deploy directory. For those versions they can set the following variables
# to allow packaging the SPL.
SPL_BINARY ?= ""
-SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY", True))}"
+SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
@@ -65,8 +62,36 @@ UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
+# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf
+# to find EXTLINUX conf file.
+UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux"
+UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf"
+UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}"
+
+# returns all the elements from the src uri that are .cfg files
+def find_cfgs(d):
+ sources=src_patches(d, True)
+ sources_list=[]
+ for s in sources:
+ if s.endswith('.cfg'):
+ sources_list.append(s)
+
+ return sources_list
+
+do_configure () {
+ if [ -z "${UBOOT_CONFIG}" ]; then
+ if [ -n "${UBOOT_MACHINE}" ]; then
+ oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
+ else
+ oe_runmake -C ${S} O=${B} oldconfig
+ fi
+ merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
+ cml1_do_configure
+ fi
+}
+
do_compile () {
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
fi
@@ -104,7 +129,6 @@ do_compile () {
done
unset i
else
- oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
fi
@@ -192,9 +216,15 @@ do_install () {
install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE}
ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY}
fi
+
+ if [ "${UBOOT_EXTLINUX}" = "1" ]
+ then
+ install -Dm 0644 ${UBOOT_EXTLINUX_CONFIG} ${D}/${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME}
+ fi
+
}
-FILES_${PN} = "/boot ${sysconfdir}"
+FILES_${PN} = "/boot ${sysconfdir} ${datadir}"
do_deploy () {
if [ -n "${UBOOT_CONFIG}" ]
@@ -224,7 +254,7 @@ do_deploy () {
rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
- fi
+ fi
if [ -n "${UBOOT_ELF}" ]
then
@@ -256,32 +286,32 @@ do_deploy () {
if [ -n "${SPL_BINARY}" ]
then
- if [ -n "${UBOOT_CONFIG}" ]
- then
- for config in ${UBOOT_MACHINE}; do
- i=$(expr $i + 1);
- for type in ${UBOOT_CONFIG}; do
- j=$(expr $j + 1);
- if [ $j -eq $i ]
- then
- install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
- rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
- fi
- done
- unset j
- done
- unset i
- else
- install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
- rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}
- ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
- ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
- fi
- fi
+ if [ -n "${UBOOT_CONFIG}" ]
+ then
+ for config in ${UBOOT_MACHINE}; do
+ i=$(expr $i + 1);
+ for type in ${UBOOT_CONFIG}; do
+ j=$(expr $j + 1);
+ if [ $j -eq $i ]
+ then
+ install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
+ rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+ ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}
+ ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}
+ ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+ ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
+ fi
+ done
+ unset j
+ done
+ unset i
+ else
+ install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
+ rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}
+ ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
+ ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
+ fi
+ fi
if [ -n "${UBOOT_ENV}" ]
@@ -291,6 +321,13 @@ do_deploy () {
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
fi
+
+ if [ "${UBOOT_EXTLINUX}" = "1" ]
+ then
+ install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_SYMLINK}
+ ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}
+ ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}
+ fi
}
addtask deploy before do_build after do_compile
diff --git a/meta/recipes-bsp/u-boot/u-boot_2016.03.bb b/meta/recipes-bsp/u-boot/u-boot_2016.03.bb
deleted file mode 100644
index 836b0ce03e..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot_2016.03.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require u-boot.inc
-
-DEPENDS += "dtc-native"
-
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
diff --git a/meta/recipes-bsp/u-boot/u-boot_2020.01.bb b/meta/recipes-bsp/u-boot/u-boot_2020.01.bb
new file mode 100644
index 0000000000..02d67c0db2
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot_2020.01.bb
@@ -0,0 +1,4 @@
+require u-boot-common.inc
+require u-boot.inc
+
+DEPENDS += "bc-native dtc-native"
diff --git a/meta/recipes-bsp/usbinit/usbinit.bb b/meta/recipes-bsp/usbinit/usbinit.bb
index aba44b4068..ef98f0bf62 100644
--- a/meta/recipes-bsp/usbinit/usbinit.bb
+++ b/meta/recipes-bsp/usbinit/usbinit.bb
@@ -1,4 +1,8 @@
SUMMARY = "Initscript for enabling USB gadget Ethernet"
+DESCRIPTION = "This module allows ethernet emulation over USB, allowing for \
+all sorts of nifty things like SSH and NFS in one go plus charging over the \
+same wire, at higher speeds than most Wifi connections."
+HOMEPAGE = "http://linux-sunxi.org/USB_Gadget/Ethernet"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
diff --git a/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch b/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
deleted file mode 100644
index 0efdc59fc6..0000000000
--- a/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Fix NULL pointer crash.
-
-Before use usbbuslist, we should check if it is valid.
-
-Upstream-Status: Pending
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- lsusb-t.c | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/lsusb-t.c b/lsusb-t.c
-index f604155..583a46a 100644
---- a/lsusb-t.c
-+++ b/lsusb-t.c
-@@ -643,6 +643,10 @@ static void sort_busses(void)
- /* need to reverse sort bus numbers */
- struct usbbusnode *t, *p, **pp;
- int swapped;
-+
-+ if (!usbbuslist)
-+ return;
-+
- do {
- p = usbbuslist;
- pp = &usbbuslist;
---
-1.7.4.1
-
diff --git a/meta/recipes-bsp/usbutils/usbutils/iconv.patch b/meta/recipes-bsp/usbutils/usbutils/iconv.patch
deleted file mode 100644
index 6455567174..0000000000
--- a/meta/recipes-bsp/usbutils/usbutils/iconv.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-This patch adds support for detecting iconv support using autotools
-uclibc does not have iconv implementation inside libc like glibc, therefore
-the existing checks were not sufficient, it worked for glibc but not for
-uclibc. The new patch portably detects the iconv support and adds the
-libiconv to linker cmdline
-
-This patch should be submitted upstream too
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: usbutils-008/configure.ac
-===================================================================
---- usbutils-008.orig/configure.ac
-+++ usbutils-008/configure.ac
-@@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
- AC_SYS_LARGEFILE
-
- AC_CHECK_HEADERS([byteswap.h])
--AC_CHECK_FUNCS([nl_langinfo iconv])
-+
-+AM_GNU_GETTEXT
-+AM_ICONV
-
- PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)
-
-Index: usbutils-008/Makefile.am
-===================================================================
---- usbutils-008.orig/Makefile.am
-+++ usbutils-008/Makefile.am
-@@ -29,7 +29,8 @@ lsusb_CPPFLAGS = \
-
- lsusb_LDADD = \
- $(LIBUSB_LIBS) \
-- $(UDEV_LIBS)
-+ $(UDEV_LIBS) \
-+ $(LIBICONV)
-
- man_MANS = \
- lsusb.8 \
diff --git a/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch b/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch
deleted file mode 100644
index a6b241f854..0000000000
--- a/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 333d5fbbc03481f1aa222bd68c2609db168ae3e0 Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Thu, 26 Jul 2012 10:37:32 +0100
-Subject: [PATCH] usb-devices: avoid dependency on bash
-
-By virtue of having #!/bin/bash this script declared that it requires
-bash, however manual examination, checkbashisms and tests with dash
-and busybox show that it doesn't contain any bashisms, so change the
-header to avoid the dependency.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- usb-devices | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/usb-devices b/usb-devices
-index b2052e2..14a5358 100755
---- a/usb-devices
-+++ b/usb-devices
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- # Copyright: 2009 Greg Kroah-Hartman <greg@kroah.com>
- # 2009 Randy Dunlap <rdunlap@xenotime.net>
---
-1.7.9.5
-
diff --git a/meta/recipes-bsp/usbutils/usbutils_008.bb b/meta/recipes-bsp/usbutils/usbutils_008.bb
deleted file mode 100644
index 75312c3aa2..0000000000
--- a/meta/recipes-bsp/usbutils/usbutils_008.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Host side USB console utilities"
-DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
-HOMEPAGE = "http://www.linux-usb.org"
-SECTION = "base"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-DEPENDS = "libusb zlib virtual/libiconv udev"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
- file://usb-devices-avoid-dependency-on-bash.patch \
- file://Fix-NULL-pointer-crash.patch \
- file://iconv.patch \
- "
-
-SRC_URI[md5sum] = "cb20148c2e784577e924a7b4c560c8fb"
-SRC_URI[sha256sum] = "6d5f16c2961df37e22e492c736a3e162a8fde24480f23a40d85f79af80d3fe95"
-
-inherit autotools gettext pkgconfig distro_features_check
-
-FILES_${PN}-dev += "${datadir}/pkgconfig"
-
-RDEPENDS_${PN} = "libudev"
-RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
diff --git a/meta/recipes-bsp/usbutils/usbutils_012.bb b/meta/recipes-bsp/usbutils/usbutils_012.bb
new file mode 100644
index 0000000000..b670fa4ab6
--- /dev/null
+++ b/meta/recipes-bsp/usbutils/usbutils_012.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Host side USB console utilities"
+DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
+HOMEPAGE = "http://www.linux-usb.org"
+SECTION = "base"
+
+LICENSE = "GPLv2+ & (GPLv2 | GPLv3)"
+# License files went missing in 010, when 011 is released add LICENSES/* back
+LIC_FILES_CHKSUM = "file://lsusb.c;endline=1;md5=7d4861d978ff5ba7cb2b319ed1d4afe3 \
+ file://lsusb.py.in;beginline=2;endline=2;md5=194d6a0226bf90f4f683e8968878b6cd"
+
+DEPENDS = "libusb1 virtual/libiconv udev"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
+ "
+SRC_URI[md5sum] = "7484445cbcf04b3eacac892fe58f8d9f"
+SRC_URI[sha256sum] = "ae2e10aad530d95839b6f4d46cd41715eae6f0f1789310d793e9be21b3e7ae20"
+
+inherit autotools pkgconfig features_check update-alternatives
+
+ALTERNATIVE_${PN} = "lsusb"
+ALTERNATIVE_PRIORITY = "100"
+
+# The binaries are mostly GPLv2+ apart from lsusb.py which is GPLv2 or v3.
+LICENSE_${PN} = "GPLv2+"
+LICENSE_${PN}-python = "GPLv2 | GPLv3"
+
+RRECOMMENDS_${PN} = "udev-hwdb"
+
+PACKAGE_BEFORE_PN =+ "${PN}-python"
+FILES_${PN}-python += "${bindir}/lsusb.py"
+RDEPENDS_${PN}-python = "python3-core"
diff --git a/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch b/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch
new file mode 100644
index 0000000000..15f70a59aa
--- /dev/null
+++ b/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch
@@ -0,0 +1,34 @@
+From 8eda59654fd31416164c78f6068715b01767ed4e Mon Sep 17 00:00:00 2001
+From: Serhey Popovych <serhe.popovych@gmail.com>
+Date: Wed, 31 Oct 2018 07:31:47 -0400
+Subject: v86d: Support for cross compilation
+
+It is common to build on one system for another (e.g. on IBM Power
+machine for Intel x86) where HOST_ARCH (uname -m) != TARGET_ARCH.
+
+Take TARGET_ARCH from environment if it is given, otherwise fall back
+to `uname -m`.
+
+Upstream-Status: Pending
+Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
+---
+ configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index cbbd6b3..046aa99 100755
+--- a/configure
++++ b/configure
+@@ -23,7 +23,8 @@ copt_x86emu_type="bool"
+ copt_x86emu_def=auto
+ copt_x86emu_test()
+ {
+- local m=`uname -m`
++ local m="${TARGET_ARCH:-$(uname -m)}"
++
+ if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then
+ echo "n";
+ elif [ "$m" = "x86_64" ]; then
+--
+1.8.3.1
+
diff --git a/meta/recipes-bsp/v86d/v86d/aarch64-host.patch b/meta/recipes-bsp/v86d/v86d/aarch64-host.patch
deleted file mode 100644
index 701fed7b5d..0000000000
--- a/meta/recipes-bsp/v86d/v86d/aarch64-host.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Accept aarch64 as valid build host
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: v86d-0.1.10/configure
-===================================================================
---- v86d-0.1.10.orig/configure
-+++ v86d-0.1.10/configure
-@@ -26,7 +26,7 @@ copt_x86emu_test()
- local m=`uname -m`
- if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then
- echo "n";
-- elif [ "$m" = "x86_64" ]; then
-+ elif [ "$m" = "x86_64" -o "$m" = "aarch64" ]; then
- echo "y";
- else
- echo "It looks like your architecture '$m' isn't supported by this version of v86d." >&2
diff --git a/meta/recipes-bsp/v86d/v86d/fbsetup b/meta/recipes-bsp/v86d/v86d/fbsetup
deleted file mode 100755
index 2a409cc529..0000000000
--- a/meta/recipes-bsp/v86d/v86d/fbsetup
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-/sbin/modprobe uvesafb
diff --git a/meta/recipes-bsp/v86d/v86d/uvesafb.conf b/meta/recipes-bsp/v86d/v86d/uvesafb.conf
deleted file mode 100644
index 43789755d3..0000000000
--- a/meta/recipes-bsp/v86d/v86d/uvesafb.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Load uvesafb.ko at boot
-uvesafb
diff --git a/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
index 1046d63410..84e27d2007 100644
--- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -9,25 +9,20 @@ DEPENDS = "virtual/kernel"
RRECOMMENDS_${PN} = "kernel-module-uvesafb"
PR = "r2"
-SRC_URI = "http://distfiles.gentoo.org/distfiles/${BP}.tar.bz2 \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20110427T035506Z/pool/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://Update-x86emu-from-X.org.patch \
- file://fbsetup \
- file://uvesafb.conf \
file://ar-from-env.patch \
- file://aarch64-host.patch \
+ file://Support-for-cross-compilation.patch \
"
-SRC_URI[md5sum] = "51c792ba7b874ad8c43f0d3da4cfabe0"
-SRC_URI[sha256sum] = "634964ae18ef68c8493add2ce150e3b4502badeb0d9194b4bd81241d25e6735c"
+SRC_URI[md5sum] = "889686ec8424468fe0d205742e77a4c2"
+SRC_URI[sha256sum] = "93575c82e4307d8c4c370ec6b767f5cf87e527b2378146d652a6d8e25d5bdbc5"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
-INITSCRIPT_NAME = "fbsetup"
-INITSCRIPT_PARAMS = "start 0 S ."
-
do_configure () {
- ./configure --with-x86emu
+ TARGET_ARCH="${TARGET_ARCH}" ./configure --with-x86emu
}
do_compile () {
@@ -37,35 +32,4 @@ do_compile () {
do_install () {
install -d ${D}${base_sbindir}
install v86d ${D}${base_sbindir}/
-
- # Only install fbsetup script if 'sysvinit' is in DISTRO_FEATURES
- if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
- install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/fbsetup ${D}${sysconfdir}/init.d/fbsetup
- fi
-
- # Install systemd related configuration file
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${sysconfdir}/modules-load.d
- install -m 0644 ${WORKDIR}/uvesafb.conf ${D}${sysconfdir}/modules-load.d
- fi
-}
-
-# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
-# manually to avoid unnecessary postinst/preinst generated.
-python __anonymous() {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-inherit update-rc.d
-
-DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
-pkg_postinst_${PN} () {
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
- if [ -n "$D" ]; then
- OPTS="--root=$D"
- fi
- systemctl $OPTS mask fbsetup.service
- fi
}
diff --git a/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb b/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
deleted file mode 100644
index ac364618e4..0000000000
--- a/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
+++ /dev/null
@@ -1,64 +0,0 @@
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
- file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
- file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
- file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
-
-require avahi.inc
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-SRC_URI += "file://0001-configure.ac-install-GtkBuilder-interface-files-for-.patch"
-SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
-SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
-
-DEPENDS += "avahi"
-
-AVAHI_GTK = "gtk3"
-
-S = "${WORKDIR}/avahi-${PV}"
-
-PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc avahi-discover"
-
-FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
-FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
-FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
-
-FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
-
-FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
- ${datadir}/avahi/interfaces/avahi-discover.ui \
- ${bindir}/avahi-discover-standalone \
- "
-
-do_install_append () {
- rm ${D}${sysconfdir} -rf
- rm ${D}${base_libdir} -rf
- rm ${D}${systemd_unitdir} -rf
- # The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
- # but not ${base_libdir} here. And the /lib may not exist
- # whithout systemd.
- [ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
- rm ${D}${bindir}/avahi-b*
- rm ${D}${bindir}/avahi-p*
- rm ${D}${bindir}/avahi-r*
- rm ${D}${bindir}/avahi-s*
- rm ${D}${includedir}/avahi-c* -rf
- rm ${D}${includedir}/avahi-g* -rf
- rm ${D}${libdir}/libavahi-c*
- rm ${D}${libdir}/libavahi-g*
- rm ${D}${libdir}/pkgconfig/avahi-c*
- rm ${D}${libdir}/pkgconfig/avahi-g*
- rm ${D}${sbindir} -rf
- rm ${D}${datadir}/avahi/a*
- rm ${D}${datadir}/avahi/s*
- rm ${D}${datadir}/locale/ -rf
- rm ${D}${datadir}/dbus* -rf
- rm ${D}${mandir}/man1/a*
- rm ${D}${mandir}/man5 -rf
- rm ${D}${mandir}/man8 -rf
- rm ${D}${libdir}/girepository-1.0/ -rf
- rm ${D}${datadir}/gir-1.0/ -rf
-}
-
diff --git a/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb b/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb
new file mode 100644
index 0000000000..1510a0ef4f
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb
@@ -0,0 +1,54 @@
+require avahi.inc
+
+inherit features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+DEPENDS += "avahi"
+
+AVAHI_GTK = "gtk3"
+
+S = "${WORKDIR}/avahi-${PV}"
+
+PACKAGES += "${PN}-utils avahi-discover"
+
+FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
+FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
+FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
+ ${datadir}/avahi/interfaces/avahi-discover.ui \
+ ${bindir}/avahi-discover-standalone \
+ "
+
+do_install_append () {
+ rm ${D}${sysconfdir} -rf
+ if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
+ if [ "${nonarch_base_libdir}" != "${base_libdir}" ];then
+ rm ${D}${nonarch_base_libdir} -rf
+ fi
+ else
+ rm ${D}${base_libdir} -rf
+ fi
+ rm ${D}${systemd_unitdir} -rf
+ # The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
+ # but not ${base_libdir} here. And the /lib may not exist
+ # whithout systemd.
+ [ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
+ rm ${D}${bindir}/avahi-b*
+ rm ${D}${bindir}/avahi-p*
+ rm ${D}${bindir}/avahi-r*
+ rm ${D}${bindir}/avahi-s*
+ rm ${D}${includedir}/avahi-c* -rf
+ rm ${D}${includedir}/avahi-g* -rf
+ rm ${D}${libdir}/libavahi-c*
+ rm ${D}${libdir}/libavahi-g*
+ rm ${D}${libdir}/pkgconfig/avahi-c*
+ rm ${D}${libdir}/pkgconfig/avahi-g*
+ rm ${D}${sbindir} -rf
+ rm ${D}${datadir}/avahi/a*
+ rm ${D}${datadir}/locale/ -rf
+ rm ${D}${datadir}/dbus* -rf
+ rm ${D}${mandir}/man1/a*
+ rm ${D}${mandir}/man5 -rf
+ rm ${D}${mandir}/man8 -rf
+ rm ${D}${libdir}/girepository-1.0/ -rf
+ rm ${D}${datadir}/gir-1.0/ -rf
+}
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 234646d291..94fe6a16b6 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -13,37 +13,32 @@ SECTION = "network"
# major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and
# python scripts are under GPLv2+
LICENSE = "GPLv2+ & LGPLv2.1+"
-
-DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
+ file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
+ file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
+ file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \
- file://00avahi-autoipd \
- file://99avahi-autoipd \
- file://initscript.patch \
- "
+ file://fix-CVE-2017-6519.patch \
+ "
+
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
+SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6"
+SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804"
+
+DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native"
-# For gtk related PACKAGECONFIGs: gtk, gtk3 and pygtk
+# For gtk related PACKAGECONFIGs: gtk, gtk3
AVAHI_GTK ?= ""
PACKAGECONFIG ??= "dbus ${AVAHI_GTK}"
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
-PACKAGECONFIG[pygtk] = "--enable-pygtk,--disable-pygtk,"
-
-USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
-USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
- --no-create-home --shell /bin/false \
- --user-group avahi"
-
-USERADD_PARAM_avahi-autoipd = "--system --home /var/run/avahi-autoipd \
- --no-create-home --shell /bin/false \
- --user-group \
- -c \"Avahi autoip daemon\" \
- avahi-autoipd"
+PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus"
-inherit autotools pkgconfig update-rc.d gettext useradd gobject-introspection
+inherit autotools pkgconfig gettext gobject-introspection
EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
--disable-stack-protector \
@@ -54,7 +49,7 @@ EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
--disable-qt4 \
--disable-python \
--disable-doxygen-doc \
- --disable-manpages \
+ --enable-manpages \
${EXTRA_OECONF_SYSVINIT} \
${EXTRA_OECONF_SYSTEMD} \
"
@@ -63,10 +58,6 @@ EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
-
-LDFLAGS_append_libc-uclibc = " -lintl"
-LDFLAGS_append_uclinux-uclibc = " -lintl"
-
do_configure_prepend() {
sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i ${S}/configure.ac
@@ -78,88 +69,18 @@ do_compile_prepend() {
export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
}
-PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
-
-# As avahi doesn't put any files into PN, clear the files list to avoid problems
-# if extra libraries appear.
-FILES_${PN} = ""
-FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
- ${sysconfdir}/avahi/avahi-autoipd.action \
- ${sysconfdir}/dhcp/*/avahi-autoipd \
- ${sysconfdir}/udhcpc.d/00avahi-autoipd \
- ${sysconfdir}/udhcpc.d/99avahi-autoipd"
-FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
-FILES_libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib"
-FILES_avahi-daemon = "${sbindir}/avahi-daemon \
- ${sysconfdir}/avahi/avahi-daemon.conf \
- ${sysconfdir}/avahi/hosts \
- ${sysconfdir}/avahi/services \
- ${sysconfdir}/dbus-1 \
- ${sysconfdir}/init.d/avahi-daemon \
- ${datadir}/avahi/introspection/*.introspect \
- ${datadir}/avahi/avahi-service.dtd \
- ${datadir}/avahi/service-types \
- ${datadir}/dbus-1/system-services"
-FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
-FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
-FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
- ${sysconfdir}/avahi/avahi-dnsconfd.action \
- ${sysconfdir}/init.d/avahi-dnsconfd"
-FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
-FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib"
-FILES_avahi-utils = "${bindir}/avahi-*"
-
-RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV}) libavahi-client (= ${EXTENDPKGV})"
-
-# uclibc has no nss
-RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
-RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev"
-RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev"
-
-RRECOMMENDS_avahi-dev[nodeprrecs] = "1"
-
-CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
-
-INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
-INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
-INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
-INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
-INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
-
do_install() {
autotools_do_install
-
- # don't install /var/run when populating rootfs. Do it through volatile
- # /var/run of current version is empty, so just remove it.
- # if /var/run become non-empty in the future, need to install it via volatile
- rm -rf ${D}${localstatedir}/run
- rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
+ rm -rf ${D}/run
rm -rf ${D}${datadir}/dbus-1/interfaces
test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
rm -rf ${D}${libdir}/avahi
-
- install -d ${D}${sysconfdir}/udhcpc.d
- install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
- install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
}
-# At the time the postinst runs, dbus might not be setup so only restart if running
-# Don't exit early, because update-rc.d needs to run subsequently.
+PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}"
-pkg_postinst_avahi-daemon () {
-if [ -z "$D" ]; then
- killall -q -HUP dbus-daemon || true
-fi
-}
+FILES_libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*"
-pkg_postrm_avahi-daemon () {
- deluser avahi || true
- delgroup avahi || true
-}
-
-pkg_postrm_avahi-autoipd () {
- deluser avahi-autoipd || true
- delgroup avahi-autoipd || true
-}
+RPROVIDES_libavahi-compat-libdnssd = "libdns-sd"
diff --git a/meta/recipes-connectivity/avahi/avahi_0.6.32.bb b/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
deleted file mode 100644
index bfa63044ea..0000000000
--- a/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require avahi.inc
-
-inherit systemd
-
-SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
-SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
-SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
- file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
- file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
- file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
-
-SRC_URI += "file://avahi-fix-resource-unavaiable.patch"
-
-SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
-SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
-
-DEPENDS += "intltool-native"
-
-PACKAGES =+ "libavahi-gobject"
diff --git a/meta/recipes-connectivity/avahi/avahi_0.7.bb b/meta/recipes-connectivity/avahi/avahi_0.7.bb
new file mode 100644
index 0000000000..2e04d304c7
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi_0.7.bb
@@ -0,0 +1,81 @@
+require avahi.inc
+
+SRC_URI += "file://00avahi-autoipd \
+ file://99avahi-autoipd \
+ file://initscript.patch \
+ file://0001-Fix-opening-etc-resolv.conf-error.patch \
+ "
+
+inherit update-rc.d systemd useradd
+
+PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils"
+
+# As avahi doesn't put any files into PN, clear the files list to avoid problems
+# if extra libraries appear.
+FILES_${PN} = ""
+FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
+ ${sysconfdir}/avahi/avahi-autoipd.action \
+ ${sysconfdir}/dhcp/*/avahi-autoipd \
+ ${sysconfdir}/udhcpc.d/00avahi-autoipd \
+ ${sysconfdir}/udhcpc.d/99avahi-autoipd"
+FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
+FILES_libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib"
+FILES_avahi-daemon = "${sbindir}/avahi-daemon \
+ ${sysconfdir}/avahi/avahi-daemon.conf \
+ ${sysconfdir}/avahi/hosts \
+ ${sysconfdir}/avahi/services \
+ ${sysconfdir}/dbus-1 \
+ ${sysconfdir}/init.d/avahi-daemon \
+ ${datadir}/avahi/introspection/*.introspect \
+ ${datadir}/avahi/avahi-service.dtd \
+ ${datadir}/avahi/service-types \
+ ${datadir}/dbus-1/system-services"
+FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
+FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
+ ${sysconfdir}/avahi/avahi-dnsconfd.action \
+ ${sysconfdir}/init.d/avahi-dnsconfd"
+FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
+FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib"
+FILES_avahi-utils = "${bindir}/avahi-*"
+
+RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})"
+RDEPENDS_${PN}-dev += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}"
+
+RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
+
+CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
+
+USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
+USERADD_PARAM_avahi-daemon = "--system --home /run/avahi-daemon \
+ --no-create-home --shell /bin/false \
+ --user-group avahi"
+
+USERADD_PARAM_avahi-autoipd = "--system --home /run/avahi-autoipd \
+ --no-create-home --shell /bin/false \
+ --user-group \
+ -c \"Avahi autoip daemon\" \
+ avahi-autoipd"
+
+INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
+INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
+INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
+INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
+INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
+
+SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
+SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
+SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/udhcpc.d
+ install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
+ install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
+}
+
+# At the time the postinst runs, dbus might not be setup so only restart if running
+# Don't exit early, because update-rc.d needs to run subsequently.
+pkg_postinst_avahi-daemon () {
+if [ -z "$D" ]; then
+ killall -q -HUP dbus-daemon || true
+fi
+}
diff --git a/meta/recipes-connectivity/avahi/files/0001-Fix-opening-etc-resolv.conf-error.patch b/meta/recipes-connectivity/avahi/files/0001-Fix-opening-etc-resolv.conf-error.patch
new file mode 100644
index 0000000000..cb8b83fd23
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/0001-Fix-opening-etc-resolv.conf-error.patch
@@ -0,0 +1,45 @@
+From 78967814f5c37ed67f4cf64d70c9f76a03ee89bc Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 20 Jun 2018 13:57:35 +0800
+Subject: [PATCH] Fix opening /etc/resolv.conf error
+
+Fix to start avahi-daemon after systemd-resolved.service. This is because
+/etc/resolv.conf is a link to /etc/resolv-conf.systemd which in turn is
+a symlink to /run/systemd/resolve/resolv.conf. And /run/systemd/resolve/resolv.conf
+is created by systemd-resolved.service by default in current OE's systemd
+based systems.
+
+This fixes errro like below.
+
+ Failed to open /etc/resolv.conf: Invalid argument
+
+In fact, handling of /etc/resolv.conf is quite distro specific. So this patch
+is marked as OE specific.
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+When connman installed to image, /etc/resolv.conf is link to
+/etc/resolv-conf.connman. So launch avahi-daemon after connman too.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ avahi-daemon/avahi-daemon.service.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/avahi-daemon/avahi-daemon.service.in b/avahi-daemon/avahi-daemon.service.in
+index 548c834..63e28e4 100644
+--- a/avahi-daemon/avahi-daemon.service.in
++++ b/avahi-daemon/avahi-daemon.service.in
+@@ -18,6 +18,7 @@
+ [Unit]
+ Description=Avahi mDNS/DNS-SD Stack
+ Requires=avahi-daemon.socket
++After=systemd-resolved.service connman.service
+
+ [Service]
+ Type=dbus
+--
+2.11.0
+
diff --git a/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch b/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch
deleted file mode 100644
index 8ccef08dfc..0000000000
--- a/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From a59f13fab31a6e25bb03b2c2bc3aea576f857b6c Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sun, 12 Jun 2016 18:32:49 +0300
-Subject: [PATCH] configure.ac: install GtkBuilder interface files for GTK+3
- too
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index aebb716..48bdf63 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -965,7 +965,7 @@ AC_SUBST(avahi_socket)
- #
- # Avahi interfaces dir
- #
--if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
-+if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes"; then
- interfacesdir="${datadir}/${PACKAGE}/interfaces/"
- AC_SUBST(interfacesdir)
- fi
---
-2.1.4
-
diff --git a/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch b/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch
deleted file mode 100644
index 5a2fd75f55..0000000000
--- a/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Backport
-
-Backport from:
-https://github.com/experimental-platform/platform-hostname-avahi/pull/9
-
-It sometimes fails to run avahi with error: "Could not receive return value
-from daemon process". It has same root cause with
-https://github.com/lxc/lxc/issues/25.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From 5150983102ad5ad43f0dae203cb332c168eb5a71 Mon Sep 17 00:00:00 2001
-From: Hinnerk Haardt <haardt@information-control.de>
-Date: Thu, 17 Dec 2015 11:52:19 +0100
-Subject: [PATCH] Fix `chroot.c: fork() failed: Resource temporarily
- unavailable` as per https://github.com/lxc/lxc/issues/25.
-
----
- avahi-daemon/avahi-daemon.conf | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/avahi-daemon/avahi-daemon.conf b/avahi-daemon/avahi-daemon.conf
-index 95166f8..3d5b7a6 100644
---- a/avahi-daemon/avahi-daemon.conf
-+++ b/avahi-daemon/avahi-daemon.conf
-@@ -65,4 +65,3 @@ rlimit-data=4194304
- rlimit-fsize=0
- rlimit-nofile=768
- rlimit-stack=4194304
--rlimit-nproc=3
diff --git a/meta/recipes-connectivity/avahi/files/fix-CVE-2017-6519.patch b/meta/recipes-connectivity/avahi/files/fix-CVE-2017-6519.patch
new file mode 100644
index 0000000000..7461fe193d
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/fix-CVE-2017-6519.patch
@@ -0,0 +1,48 @@
+Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/e111def]
+
+CVE: CVE-2017-6519
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From e111def44a7df4624a4aa3f85fe98054bffb6b4f Mon Sep 17 00:00:00 2001
+From: Trent Lloyd <trent@lloyd.id.au>
+Date: Sat, 22 Dec 2018 09:06:07 +0800
+Subject: [PATCH] Drop legacy unicast queries from address not on local link
+
+When handling legacy unicast queries, ensure that the source IP is
+inside a subnet on the local link, otherwise drop the packet.
+
+Fixes #145
+Fixes #203
+CVE-2017-6519
+CVE-2018-1000845
+---
+ avahi-core/server.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/avahi-core/server.c b/avahi-core/server.c
+index a2cb19a8..a2580e38 100644
+--- a/avahi-core/server.c
++++ b/avahi-core/server.c
+@@ -930,6 +930,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
+
+ if (avahi_dns_packet_is_query(p)) {
+ int legacy_unicast = 0;
++ char t[AVAHI_ADDRESS_STR_MAX];
+
+ /* For queries EDNS0 might allow ARCOUNT != 0. We ignore the
+ * AR section completely here, so far. Until the day we add
+@@ -947,6 +948,13 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
+ legacy_unicast = 1;
+ }
+
++ if (!is_mdns_mcast_address(dst_address) &&
++ !avahi_interface_address_on_link(i, src_address)) {
++
++ avahi_log_debug("Received non-local unicast query from host %s on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), i->hardware->name, i->protocol);
++ return;
++ }
++
+ if (legacy_unicast)
+ reflect_legacy_unicast_query_packet(s, p, i, src_address, port);
+
diff --git a/meta/recipes-connectivity/avahi/files/initscript.patch b/meta/recipes-connectivity/avahi/files/initscript.patch
index 193889eb5c..c856c3df04 100644
--- a/meta/recipes-connectivity/avahi/files/initscript.patch
+++ b/meta/recipes-connectivity/avahi/files/initscript.patch
@@ -1,10 +1,10 @@
Upstream-Status: Pending
-diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
-index 30a2c2f..b5848a8 100755
---- a/initscript/debian/avahi-daemon.in
-+++ b/initscript/debian/avahi-daemon.in
-@@ -1,2 +1,14 @@
+Index: avahi-0.7/initscript/debian/avahi-daemon.in
+===================================================================
+--- avahi-0.7.orig/initscript/debian/avahi-daemon.in
++++ avahi-0.7/initscript/debian/avahi-daemon.in
+@@ -1,5 +1,17 @@
#!/bin/sh
-
+### BEGIN INIT INFO
@@ -20,11 +20,14 @@ index 30a2c2f..b5848a8 100755
+# automatically
+### END INIT INFO
+#
-diff --git a/initscript/debian/avahi-dnsconfd.in b/initscript/debian/avahi-dnsconfd.in
-index ac34804..f95c340 100755
---- a/initscript/debian/avahi-dnsconfd.in
-+++ b/initscript/debian/avahi-dnsconfd.in
-@@ -1,1 +1,14 @@
+ # This file is part of avahi.
+ #
+ # avahi is free software; you can redistribute it and/or modify it
+Index: avahi-0.7/initscript/debian/avahi-dnsconfd.in
+===================================================================
+--- avahi-0.7.orig/initscript/debian/avahi-dnsconfd.in
++++ avahi-0.7/initscript/debian/avahi-dnsconfd.in
+@@ -1,4 +1,17 @@
#!/bin/sh
+### BEGIN INIT INFO
+# Provides: avahi-dnsconfd
@@ -39,3 +42,6 @@ index ac34804..f95c340 100755
+# automatically
+### END INIT INFO
+#
+
+ # This file is part of avahi.
+ #
diff --git a/meta/recipes-connectivity/bind/bind/0001-avoid-start-failure-with-bind-user.patch b/meta/recipes-connectivity/bind/bind/0001-avoid-start-failure-with-bind-user.patch
new file mode 100644
index 0000000000..8db96ec049
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/0001-avoid-start-failure-with-bind-user.patch
@@ -0,0 +1,27 @@
+From 31dde3562f287429eea94b77250d184818b49063 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 15 Oct 2018 16:55:09 +0800
+Subject: [PATCH] avoid start failure with bind user
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ init.d | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/init.d b/init.d
+index b2eec60..6e03936 100644
+--- a/init.d
++++ b/init.d
+@@ -57,6 +57,7 @@ case "$1" in
+ modprobe capability >/dev/null 2>&1 || true
+ if [ ! -f /etc/bind/rndc.key ]; then
+ /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
++ chown root:bind /etc/bind/rndc.key >/dev/null 2>&1 || true
+ chmod 0640 /etc/bind/rndc.key
+ fi
+ if [ -f /var/run/named/named.pid ]; then
+--
+2.7.4
+
diff --git a/meta/recipes-connectivity/bind/bind/0001-build-use-pkg-config-to-find-libxml2.patch b/meta/recipes-connectivity/bind/bind/0001-build-use-pkg-config-to-find-libxml2.patch
deleted file mode 100644
index 805cbb3315..0000000000
--- a/meta/recipes-connectivity/bind/bind/0001-build-use-pkg-config-to-find-libxml2.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-xml2-config is disabled, so change the configure script to use pkgconfig to find
-libxml2.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-Update context for version 9.10.3-P2.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- configure.in | 23 +++--------------------
- 1 file changed, 3 insertions(+), 20 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 0db826d..75819eb 100644
---- a/configure.in
-+++ b/configure.in
-@@ -2107,26 +2107,9 @@ case "$use_libxml2" in
- DST_LIBXML2_INC=""
- ;;
- auto|yes)
-- case X`(xml2-config --version) 2>/dev/null` in
-- X2.[[6789]].*)
-- libxml2_libs=`xml2-config --libs`
-- libxml2_cflags=`xml2-config --cflags`
-- ;;
-- *)
-- if test "$use_libxml2" = "yes" ; then
-- AC_MSG_RESULT(no)
-- AC_MSG_ERROR(required libxml2 version not available)
-- else
-- libxml2_libs=
-- libxml2_cflags=
-- fi
-- ;;
-- esac
-- ;;
-- *)
-- if test -f "$use_libxml2/bin/xml2-config" ; then
-- libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
-- libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
-+ if pkg-config --exists libxml-2.0 ; then
-+ libxml2_libs=`pkg-config libxml-2.0 --libs`
-+ libxml2_cflags=`pkg-config libxml-2.0 --cflags`
- fi
- ;;
- esac
---
-2.1.4
-
diff --git a/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch b/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
new file mode 100644
index 0000000000..9d31b98080
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
@@ -0,0 +1,30 @@
+From 2325a92f1896a2a7f586611686801b41fbc91b50 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 27 Aug 2018 15:00:51 +0800
+Subject: [PATCH] configure.in: remove useless `-L$use_openssl/lib'
+
+Since `--with-openssl=${STAGING_DIR_HOST}${prefix}' is used in bind recipe,
+the `-L$use_openssl/lib' has a hardcoded suffix, removing it is harmless
+and helpful for clean up host build path in isc-config.sh
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e85a5c6..2bbfc58 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1631,7 +1631,7 @@ If you don't want OpenSSL, use --without-openssl])
+ fi
+ ;;
+ *)
+- DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
++ DST_OPENSSL_LIBS="-lcrypto"
+ ;;
+ esac
+ fi
diff --git a/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch b/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
deleted file mode 100644
index 1215093716..0000000000
--- a/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream-Status: Pending
-
-Subject: gen.c: extend DIRNAMESIZE from 256 to 512
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- lib/dns/gen.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/dns/gen.c b/lib/dns/gen.c
-index 7a7dafb..51a0435 100644
---- a/lib/dns/gen.c
-+++ b/lib/dns/gen.c
-@@ -148,7 +148,7 @@ static const char copyright[] =
- #define TYPECLASSBUF (TYPECLASSLEN + 1)
- #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d"
- #define ATTRIBUTESIZE 256
--#define DIRNAMESIZE 256
-+#define DIRNAMESIZE 512
-
- static struct cc {
- struct cc *next;
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch b/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
deleted file mode 100644
index 1ed858cd3f..0000000000
--- a/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 5bc3167a8b714ec0c4a3f1c7f3b9411296ec0a23 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 16 Sep 2015 20:23:47 -0700
-Subject: [PATCH] lib/dns/gen.c: fix too long error
-
-The 512 is a little short when build in deep dir, and cause "too long"
-error, use PATH_MAX if defined.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- lib/dns/gen.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/lib/dns/gen.c b/lib/dns/gen.c
-index 51a0435..3d7214f 100644
---- a/lib/dns/gen.c
-+++ b/lib/dns/gen.c
-@@ -148,7 +148,11 @@ static const char copyright[] =
- #define TYPECLASSBUF (TYPECLASSLEN + 1)
- #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d"
- #define ATTRIBUTESIZE 256
-+#ifdef PATH_MAX
-+#define DIRNAMESIZE PATH_MAX
-+#else
- #define DIRNAMESIZE 512
-+#endif
-
- static struct cc {
- struct cc *next;
---
-1.7.9.5
-
diff --git a/meta/recipes-connectivity/bind/bind/0001-named-lwresd-V-and-start-log-hide-build-options.patch b/meta/recipes-connectivity/bind/bind/0001-named-lwresd-V-and-start-log-hide-build-options.patch
new file mode 100644
index 0000000000..75908aa638
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/0001-named-lwresd-V-and-start-log-hide-build-options.patch
@@ -0,0 +1,34 @@
+From a3af4a405baf5ff582e82aaba392dd9667d94bdc Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 27 Aug 2018 21:24:20 +0800
+Subject: [PATCH] `named/lwresd -V' and start log hide build options
+
+The build options expose build path directories, so hide them.
+[snip]
+$ named -V
+|built by make with *** (options are hidden)
+[snip]
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ bin/named/include/named/globals.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h
+index ba3457e..7741da7 100644
+--- a/bin/named/include/named/globals.h
++++ b/bin/named/include/named/globals.h
+@@ -68,7 +68,7 @@ EXTERN const char * ns_g_version INIT(VERSION);
+ EXTERN const char * ns_g_product INIT(PRODUCT);
+ EXTERN const char * ns_g_description INIT(DESCRIPTION);
+ EXTERN const char * ns_g_srcid INIT(SRCID);
+-EXTERN const char * ns_g_configargs INIT(CONFIGARGS);
++EXTERN const char * ns_g_configargs INIT("*** (options are hidden)");
+ EXTERN const char * ns_g_builder INIT(BUILDER);
+ EXTERN in_port_t ns_g_port INIT(0);
+ EXTERN isc_dscp_t ns_g_dscp INIT(-1);
+--
+2.7.4
+
diff --git a/meta/recipes-connectivity/bind/bind/CVE-2016-1285.patch b/meta/recipes-connectivity/bind/bind/CVE-2016-1285.patch
deleted file mode 100644
index 2149bd180d..0000000000
--- a/meta/recipes-connectivity/bind/bind/CVE-2016-1285.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From 70037e040e587329cec82123e12b9f4f7c945f67 Mon Sep 17 00:00:00 2001
-From: Mark Andrews <marka@isc.org>
-Date: Thu, 18 Feb 2016 12:11:27 +1100
-Subject: [PATCH] 4318. [security] Malformed control messages can
- trigger assertions in named and rndc. (CVE-2016-1285)
- [RT #41666]
-
-(cherry picked from commit a2b15b3305acd52179e6f3dc7d073b07fbc40b8e)
-
-CVE: CVE-2016-1285
-Upstream-Status: Backport
-[Removed doc/arm/notes.xml changes from upstream patch]
-
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
- CHANGES | 3 +++
- bin/named/control.c | 2 +-
- bin/named/controlconf.c | 2 +-
- bin/rndc/rndc.c | 8 ++++----
- doc/arm/notes.xml | 11 +++++++++++
- lib/isccc/cc.c | 14 +++++++-------
- 6 files changed, 27 insertions(+), 13 deletions(-)
-
-diff --git a/CHANGES b/CHANGES
-index b9bd9ef..2c727d5 100644
---- a/CHANGES
-+++ b/CHANGES
-@@ -1,3 +1,6 @@
-+4318. [security] Malformed control messages can trigger assertions
-+ in named and rndc. (CVE-2016-1285) [RT #41666]
-+
- --- 9.10.3-P3 released ---
-
- 4288. [bug] Fixed a regression in resolver.c:possibly_mark()
-diff --git a/bin/named/control.c b/bin/named/control.c
-index 8554335..81340ca 100644
---- a/bin/named/control.c
-+++ b/bin/named/control.c
-@@ -69,7 +69,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
- #endif
-
- data = isccc_alist_lookup(message, "_data");
-- if (data == NULL) {
-+ if (!isccc_alist_alistp(data)) {
- /*
- * No data section.
- */
-diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c
-index 765afdd..a39ab8b 100644
---- a/bin/named/controlconf.c
-+++ b/bin/named/controlconf.c
-@@ -402,7 +402,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
- * Limit exposure to replay attacks.
- */
- _ctrl = isccc_alist_lookup(request, "_ctrl");
-- if (_ctrl == NULL) {
-+ if (!isccc_alist_alistp(_ctrl)) {
- log_invalid(&conn->ccmsg, ISC_R_FAILURE);
- goto cleanup_request;
- }
-diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c
-index cb17050..b6e05c8 100644
---- a/bin/rndc/rndc.c
-+++ b/bin/rndc/rndc.c
-@@ -255,8 +255,8 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
- isccc_cc_fromwire(&source, &response, algorithm, &secret));
-
- data = isccc_alist_lookup(response, "_data");
-- if (data == NULL)
-- fatal("no data section in response");
-+ if (!isccc_alist_alistp(data))
-+ fatal("bad or missing data section in response");
- result = isccc_cc_lookupstring(data, "err", &errormsg);
- if (result == ISC_R_SUCCESS) {
- failed = ISC_TRUE;
-@@ -321,8 +321,8 @@ rndc_recvnonce(isc_task_t *task, isc_event_t *event) {
- isccc_cc_fromwire(&source, &response, algorithm, &secret));
-
- _ctrl = isccc_alist_lookup(response, "_ctrl");
-- if (_ctrl == NULL)
-- fatal("_ctrl section missing");
-+ if (!isccc_alist_alistp(_ctrl))
-+ fatal("bad or missing ctrl section in response");
- nonce = 0;
- if (isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS)
- nonce = 0;
-diff --git a/lib/isccc/cc.c b/lib/isccc/cc.c
-index 47a3b74..2bb961e 100644
---- a/lib/isccc/cc.c
-+++ b/lib/isccc/cc.c
-@@ -403,13 +403,13 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length,
- * Extract digest.
- */
- _auth = isccc_alist_lookup(alist, "_auth");
-- if (_auth == NULL)
-+ if (!isccc_alist_alistp(_auth))
- return (ISC_R_FAILURE);
- if (algorithm == ISCCC_ALG_HMACMD5)
- hmac = isccc_alist_lookup(_auth, "hmd5");
- else
- hmac = isccc_alist_lookup(_auth, "hsha");
-- if (hmac == NULL)
-+ if (!isccc_sexpr_binaryp(hmac))
- return (ISC_R_FAILURE);
- /*
- * Compute digest.
-@@ -728,7 +728,7 @@ isccc_cc_createack(isccc_sexpr_t *message, isc_boolean_t ok,
- REQUIRE(ackp != NULL && *ackp == NULL);
-
- _ctrl = isccc_alist_lookup(message, "_ctrl");
-- if (_ctrl == NULL ||
-+ if (!isccc_alist_alistp(_ctrl) ||
- isccc_cc_lookupuint32(_ctrl, "_ser", &serial) != ISC_R_SUCCESS ||
- isccc_cc_lookupuint32(_ctrl, "_tim", &t) != ISC_R_SUCCESS)
- return (ISC_R_FAILURE);
-@@ -773,7 +773,7 @@ isccc_cc_isack(isccc_sexpr_t *message)
- isccc_sexpr_t *_ctrl;
-
- _ctrl = isccc_alist_lookup(message, "_ctrl");
-- if (_ctrl == NULL)
-+ if (!isccc_alist_alistp(_ctrl))
- return (ISC_FALSE);
- if (isccc_cc_lookupstring(_ctrl, "_ack", NULL) == ISC_R_SUCCESS)
- return (ISC_TRUE);
-@@ -786,7 +786,7 @@ isccc_cc_isreply(isccc_sexpr_t *message)
- isccc_sexpr_t *_ctrl;
-
- _ctrl = isccc_alist_lookup(message, "_ctrl");
-- if (_ctrl == NULL)
-+ if (!isccc_alist_alistp(_ctrl))
- return (ISC_FALSE);
- if (isccc_cc_lookupstring(_ctrl, "_rpl", NULL) == ISC_R_SUCCESS)
- return (ISC_TRUE);
-@@ -806,7 +806,7 @@ isccc_cc_createresponse(isccc_sexpr_t *message, isccc_time_t now,
-
- _ctrl = isccc_alist_lookup(message, "_ctrl");
- _data = isccc_alist_lookup(message, "_data");
-- if (_ctrl == NULL || _data == NULL ||
-+ if (!isccc_alist_alistp(_ctrl) || !isccc_alist_alistp(_data) ||
- isccc_cc_lookupuint32(_ctrl, "_ser", &serial) != ISC_R_SUCCESS ||
- isccc_cc_lookupstring(_data, "type", &type) != ISC_R_SUCCESS)
- return (ISC_R_FAILURE);
-@@ -995,7 +995,7 @@ isccc_cc_checkdup(isccc_symtab_t *symtab, isccc_sexpr_t *message,
- isccc_sexpr_t *_ctrl;
-
- _ctrl = isccc_alist_lookup(message, "_ctrl");
-- if (_ctrl == NULL ||
-+ if (!isccc_alist_alistp(_ctrl) ||
- isccc_cc_lookupstring(_ctrl, "_ser", &_ser) != ISC_R_SUCCESS ||
- isccc_cc_lookupstring(_ctrl, "_tim", &_tim) != ISC_R_SUCCESS)
- return (ISC_R_FAILURE);
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/bind/bind/CVE-2016-1286_1.patch b/meta/recipes-connectivity/bind/bind/CVE-2016-1286_1.patch
deleted file mode 100644
index ae5cc48d9c..0000000000
--- a/meta/recipes-connectivity/bind/bind/CVE-2016-1286_1.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From a3d327bf1ceaaeabb20223d8de85166e940b9f12 Mon Sep 17 00:00:00 2001
-From: Mukund Sivaraman <muks@isc.org>
-Date: Mon, 22 Feb 2016 12:22:43 +0530
-Subject: [PATCH] Fix resolver assertion failure due to improper DNAME handling
- (CVE-2016-1286) (#41753)
-
-(cherry picked from commit 5995fec51cc8bb7e53804e4936e60aa1537f3673)
-
-CVE: CVE-2016-1286
-Upstream-Status: Backport
-
-[Removed doc/arm/notes.xml changes from upstream patch.]
-
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
-diff -ruN a/CHANGES b/CHANGES
---- a/CHANGES 2016-04-13 07:28:44.940873629 +0200
-+++ b/CHANGES 2016-04-13 07:38:38.923167851 +0200
-@@ -1,3 +1,7 @@
-+4319. [security] Fix resolver assertion failure due to improper
-+ DNAME handling when parsing fetch reply messages.
-+ (CVE-2016-1286) [RT #41753]
-+
- 4318. [security] Malformed control messages can trigger assertions
- in named and rndc. (CVE-2016-1285) [RT #41666]
-
-diff -ruN a/lib/dns/resolver.c b/lib/dns/resolver.c
---- a/lib/dns/resolver.c 2016-04-13 07:28:43.088953790 +0200
-+++ b/lib/dns/resolver.c 2016-04-13 07:38:20.411968925 +0200
-@@ -6967,21 +6967,26 @@
- isc_boolean_t found_dname = ISC_FALSE;
- dns_name_t *dname_name;
-
-+ /*
-+ * Only pass DNAME or RRSIG(DNAME).
-+ */
-+ if (rdataset->type != dns_rdatatype_dname &&
-+ (rdataset->type != dns_rdatatype_rrsig ||
-+ rdataset->covers != dns_rdatatype_dname))
-+ continue;
-+
-+ /*
-+ * If we're not chaining, then the DNAME and
-+ * its signature should not be external.
-+ */
-+ if (!chaining && external) {
-+ log_formerr(fctx, "external DNAME");
-+ return (DNS_R_FORMERR);
-+ }
-+
- found = ISC_FALSE;
- aflag = 0;
- if (rdataset->type == dns_rdatatype_dname) {
-- /*
-- * We're looking for something else,
-- * but we found a DNAME.
-- *
-- * If we're not chaining, then the
-- * DNAME should not be external.
-- */
-- if (!chaining && external) {
-- log_formerr(fctx,
-- "external DNAME");
-- return (DNS_R_FORMERR);
-- }
- found = ISC_TRUE;
- want_chaining = ISC_TRUE;
- POST(want_chaining);
-@@ -7010,9 +7015,7 @@
- &fctx->domain)) {
- return (DNS_R_SERVFAIL);
- }
-- } else if (rdataset->type == dns_rdatatype_rrsig
-- && rdataset->covers ==
-- dns_rdatatype_dname) {
-+ } else {
- /*
- * We've found a signature that
- * covers the DNAME.
diff --git a/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch b/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch
deleted file mode 100644
index 5f5cb0d340..0000000000
--- a/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch
+++ /dev/null
@@ -1,317 +0,0 @@
-From 7602be276a73a6eb5431c5acd9718e68a55e8b61 Mon Sep 17 00:00:00 2001
-From: Mark Andrews <marka@isc.org>
-Date: Mon, 29 Feb 2016 07:16:48 +1100
-Subject: [PATCH] Part 2 of: 4319. [security] Fix resolver assertion
- failure due to improper DNAME handling when parsing
- fetch reply messages. (CVE-2016-1286) [RT #41753]
-
-CVE: CVE-2016-1286
-Upstream-Status: Backport
-
-(cherry picked from commit 2de89ee9de8c8da9dc153a754b02dcdbb7fe2374)
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
- lib/dns/resolver.c | 192 ++++++++++++++++++++++++++---------------------------
- 1 file changed, 93 insertions(+), 99 deletions(-)
-
-diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
-index 70aba87..41e9df4 100644
---- a/lib/dns/resolver.c
-+++ b/lib/dns/resolver.c
-@@ -6074,14 +6074,11 @@ cname_target(dns_rdataset_t *rdataset, dns_name_t *tname) {
- }
-
- static inline isc_result_t
--dname_target(fetchctx_t *fctx, dns_rdataset_t *rdataset, dns_name_t *qname,
-- dns_name_t *oname, dns_fixedname_t *fixeddname)
-+dname_target(dns_rdataset_t *rdataset, dns_name_t *qname,
-+ unsigned int nlabels, dns_fixedname_t *fixeddname)
- {
- isc_result_t result;
- dns_rdata_t rdata = DNS_RDATA_INIT;
-- unsigned int nlabels;
-- int order;
-- dns_namereln_t namereln;
- dns_rdata_dname_t dname;
- dns_fixedname_t prefix;
-
-@@ -6096,21 +6093,6 @@ dname_target(fetchctx_t *fctx, dns_rdataset_t *rdataset, dns_name_t *qname,
- if (result != ISC_R_SUCCESS)
- return (result);
-
-- /*
-- * Get the prefix of qname.
-- */
-- namereln = dns_name_fullcompare(qname, oname, &order, &nlabels);
-- if (namereln != dns_namereln_subdomain) {
-- char qbuf[DNS_NAME_FORMATSIZE];
-- char obuf[DNS_NAME_FORMATSIZE];
--
-- dns_rdata_freestruct(&dname);
-- dns_name_format(qname, qbuf, sizeof(qbuf));
-- dns_name_format(oname, obuf, sizeof(obuf));
-- log_formerr(fctx, "unrelated DNAME in answer: "
-- "%s is not in %s", qbuf, obuf);
-- return (DNS_R_FORMERR);
-- }
- dns_fixedname_init(&prefix);
- dns_name_split(qname, nlabels, dns_fixedname_name(&prefix), NULL);
- dns_fixedname_init(fixeddname);
-@@ -6736,13 +6718,13 @@ static isc_result_t
- answer_response(fetchctx_t *fctx) {
- isc_result_t result;
- dns_message_t *message;
-- dns_name_t *name, *qname, tname, *ns_name;
-+ dns_name_t *name, *dname, *qname, tname, *ns_name;
- dns_rdataset_t *rdataset, *ns_rdataset;
- isc_boolean_t done, external, chaining, aa, found, want_chaining;
- isc_boolean_t have_answer, found_cname, found_type, wanted_chaining;
- unsigned int aflag;
- dns_rdatatype_t type;
-- dns_fixedname_t dname, fqname;
-+ dns_fixedname_t fdname, fqname;
- dns_view_t *view;
-
- FCTXTRACE("answer_response");
-@@ -6770,10 +6752,15 @@ answer_response(fetchctx_t *fctx) {
- view = fctx->res->view;
- result = dns_message_firstname(message, DNS_SECTION_ANSWER);
- while (!done && result == ISC_R_SUCCESS) {
-+ dns_namereln_t namereln;
-+ int order;
-+ unsigned int nlabels;
-+
- name = NULL;
- dns_message_currentname(message, DNS_SECTION_ANSWER, &name);
- external = ISC_TF(!dns_name_issubdomain(name, &fctx->domain));
-- if (dns_name_equal(name, qname)) {
-+ namereln = dns_name_fullcompare(qname, name, &order, &nlabels);
-+ if (namereln == dns_namereln_equal) {
- wanted_chaining = ISC_FALSE;
- for (rdataset = ISC_LIST_HEAD(name->list);
- rdataset != NULL;
-@@ -6898,10 +6885,11 @@ answer_response(fetchctx_t *fctx) {
- */
- INSIST(!external);
- if (aflag ==
-- DNS_RDATASETATTR_ANSWER)
-+ DNS_RDATASETATTR_ANSWER) {
- have_answer = ISC_TRUE;
-- name->attributes |=
-- DNS_NAMEATTR_ANSWER;
-+ name->attributes |=
-+ DNS_NAMEATTR_ANSWER;
-+ }
- rdataset->attributes |= aflag;
- if (aa)
- rdataset->trust =
-@@ -6956,6 +6944,8 @@ answer_response(fetchctx_t *fctx) {
- if (wanted_chaining)
- chaining = ISC_TRUE;
- } else {
-+ dns_rdataset_t *dnameset = NULL;
-+
- /*
- * Look for a DNAME (or its SIG). Anything else is
- * ignored.
-@@ -6963,10 +6953,8 @@ answer_response(fetchctx_t *fctx) {
- wanted_chaining = ISC_FALSE;
- for (rdataset = ISC_LIST_HEAD(name->list);
- rdataset != NULL;
-- rdataset = ISC_LIST_NEXT(rdataset, link)) {
-- isc_boolean_t found_dname = ISC_FALSE;
-- dns_name_t *dname_name;
--
-+ rdataset = ISC_LIST_NEXT(rdataset, link))
-+ {
- /*
- * Only pass DNAME or RRSIG(DNAME).
- */
-@@ -6980,20 +6968,41 @@ answer_response(fetchctx_t *fctx) {
- * its signature should not be external.
- */
- if (!chaining && external) {
-- log_formerr(fctx, "external DNAME");
-+ char qbuf[DNS_NAME_FORMATSIZE];
-+ char obuf[DNS_NAME_FORMATSIZE];
-+
-+ dns_name_format(name, qbuf,
-+ sizeof(qbuf));
-+ dns_name_format(&fctx->domain, obuf,
-+ sizeof(obuf));
-+ log_formerr(fctx, "external DNAME or "
-+ "RRSIG covering DNAME "
-+ "in answer: %s is "
-+ "not in %s", qbuf, obuf);
-+ return (DNS_R_FORMERR);
-+ }
-+
-+ if (namereln != dns_namereln_subdomain) {
-+ char qbuf[DNS_NAME_FORMATSIZE];
-+ char obuf[DNS_NAME_FORMATSIZE];
-+
-+ dns_name_format(qname, qbuf,
-+ sizeof(qbuf));
-+ dns_name_format(name, obuf,
-+ sizeof(obuf));
-+ log_formerr(fctx, "unrelated DNAME "
-+ "in answer: %s is "
-+ "not in %s", qbuf, obuf);
- return (DNS_R_FORMERR);
- }
-
-- found = ISC_FALSE;
- aflag = 0;
- if (rdataset->type == dns_rdatatype_dname) {
-- found = ISC_TRUE;
- want_chaining = ISC_TRUE;
- POST(want_chaining);
- aflag = DNS_RDATASETATTR_ANSWER;
-- result = dname_target(fctx, rdataset,
-- qname, name,
-- &dname);
-+ result = dname_target(rdataset, qname,
-+ nlabels, &fdname);
- if (result == ISC_R_NOSPACE) {
- /*
- * We can't construct the
-@@ -7005,14 +7014,12 @@ answer_response(fetchctx_t *fctx) {
- } else if (result != ISC_R_SUCCESS)
- return (result);
- else
-- found_dname = ISC_TRUE;
-+ dnameset = rdataset;
-
-- dname_name = dns_fixedname_name(&dname);
-+ dname = dns_fixedname_name(&fdname);
- if (!is_answertarget_allowed(view,
-- qname,
-- rdataset->type,
-- dname_name,
-- &fctx->domain)) {
-+ qname, rdataset->type,
-+ dname, &fctx->domain)) {
- return (DNS_R_SERVFAIL);
- }
- } else {
-@@ -7020,73 +7027,60 @@ answer_response(fetchctx_t *fctx) {
- * We've found a signature that
- * covers the DNAME.
- */
-- found = ISC_TRUE;
- aflag = DNS_RDATASETATTR_ANSWERSIG;
- }
-
-- if (found) {
-+ /*
-+ * We've found an answer to our
-+ * question.
-+ */
-+ name->attributes |= DNS_NAMEATTR_CACHE;
-+ rdataset->attributes |= DNS_RDATASETATTR_CACHE;
-+ rdataset->trust = dns_trust_answer;
-+ if (!chaining) {
- /*
-- * We've found an answer to our
-- * question.
-+ * This data is "the" answer to
-+ * our question only if we're
-+ * not chaining.
- */
-- name->attributes |=
-- DNS_NAMEATTR_CACHE;
-- rdataset->attributes |=
-- DNS_RDATASETATTR_CACHE;
-- rdataset->trust = dns_trust_answer;
-- if (!chaining) {
-- /*
-- * This data is "the" answer
-- * to our question only if
-- * we're not chaining.
-- */
-- INSIST(!external);
-- if (aflag ==
-- DNS_RDATASETATTR_ANSWER)
-- have_answer = ISC_TRUE;
-+ INSIST(!external);
-+ if (aflag == DNS_RDATASETATTR_ANSWER) {
-+ have_answer = ISC_TRUE;
- name->attributes |=
- DNS_NAMEATTR_ANSWER;
-- rdataset->attributes |= aflag;
-- if (aa)
-- rdataset->trust =
-- dns_trust_authanswer;
-- } else if (external) {
-- rdataset->attributes |=
-- DNS_RDATASETATTR_EXTERNAL;
-- }
--
-- /*
-- * DNAME chaining.
-- */
-- if (found_dname) {
-- /*
-- * Copy the dname into the
-- * qname fixed name.
-- *
-- * Although we check for
-- * failure of the copy
-- * operation, in practice it
-- * should never fail since
-- * we already know that the
-- * result fits in a fixedname.
-- */
-- dns_fixedname_init(&fqname);
-- result = dns_name_copy(
-- dns_fixedname_name(&dname),
-- dns_fixedname_name(&fqname),
-- NULL);
-- if (result != ISC_R_SUCCESS)
-- return (result);
-- wanted_chaining = ISC_TRUE;
-- name->attributes |=
-- DNS_NAMEATTR_CHAINING;
-- rdataset->attributes |=
-- DNS_RDATASETATTR_CHAINING;
-- qname = dns_fixedname_name(
-- &fqname);
- }
-+ rdataset->attributes |= aflag;
-+ if (aa)
-+ rdataset->trust =
-+ dns_trust_authanswer;
-+ } else if (external) {
-+ rdataset->attributes |=
-+ DNS_RDATASETATTR_EXTERNAL;
- }
- }
-+
-+ /*
-+ * DNAME chaining.
-+ */
-+ if (dnameset != NULL) {
-+ /*
-+ * Copy the dname into the qname fixed name.
-+ *
-+ * Although we check for failure of the copy
-+ * operation, in practice it should never fail
-+ * since we already know that the result fits
-+ * in a fixedname.
-+ */
-+ dns_fixedname_init(&fqname);
-+ qname = dns_fixedname_name(&fqname);
-+ result = dns_name_copy(dname, qname, NULL);
-+ if (result != ISC_R_SUCCESS)
-+ return (result);
-+ wanted_chaining = ISC_TRUE;
-+ name->attributes |= DNS_NAMEATTR_CHAINING;
-+ dnameset->attributes |=
-+ DNS_RDATASETATTR_CHAINING;
-+ }
- if (wanted_chaining)
- chaining = ISC_TRUE;
- }
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/bind/bind/CVE-2016-2088.patch b/meta/recipes-connectivity/bind/bind/CVE-2016-2088.patch
deleted file mode 100644
index 1b84d46b78..0000000000
--- a/meta/recipes-connectivity/bind/bind/CVE-2016-2088.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-CVE-2016-2088
-
-Backport commit d7ff9a1c41bf0ba9773cb3adb08b48b9fd57c956 from the
-v9_10_3_patch branch.
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2088
-https://kb.isc.org/article/AA-01351
-
-CVE: CVE-2016-2088
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-
-Original commit message from Mark Andrews <marka@isc.org> below:
-
-4322. [security] Duplicate EDNS COOKIE options in a response could
- trigger an assertion failure. (CVE-2016-2088)
- [RT #41809]
-
-(cherry picked from commit 455c0848f80a8acda27aad1466c72987cafaa029)
-(cherry picked from commit 7cd300abd6ee8b8ee8730593daf742ba53f90bc3)
----
- CHANGES | 4 ++++
- bin/dig/dighost.c | 9 +++++++++
- bin/named/client.c | 33 +++++++++++++++++++++++----------
- doc/arm/notes.xml | 7 +++++++
- lib/dns/resolver.c | 14 +++++++++++++-
- 5 files changed, 56 insertions(+), 11 deletions(-)
-
-diff --git a/CHANGES b/CHANGES
-index c5b5d2b..d2e3360 100644
---- a/CHANGES
-+++ b/CHANGES
-@@ -1,3 +1,7 @@
-+4322. [security] Duplicate EDNS COOKIE options in a response could
-+ trigger an assertion failure. (CVE-2016-2088)
-+ [RT #41809]
-+
- 4319. [security] Fix resolver assertion failure due to improper
- DNAME handling when parsing fetch reply messages.
- (CVE-2016-1286) [RT #41753]
-diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c
-index ca82f8e..340904f 100644
---- a/bin/dig/dighost.c
-+++ b/bin/dig/dighost.c
-@@ -3458,6 +3458,7 @@ process_opt(dig_lookup_t *l, dns_message_t *msg) {
- isc_buffer_t optbuf;
- isc_uint16_t optcode, optlen;
- dns_rdataset_t *opt = msg->opt;
-+ isc_boolean_t seen_cookie = ISC_FALSE;
-
- result = dns_rdataset_first(opt);
- if (result == ISC_R_SUCCESS) {
-@@ -3470,7 +3471,15 @@ process_opt(dig_lookup_t *l, dns_message_t *msg) {
- optlen = isc_buffer_getuint16(&optbuf);
- switch (optcode) {
- case DNS_OPT_COOKIE:
-+ /*
-+ * Only process the first cookie option.
-+ */
-+ if (seen_cookie) {
-+ isc_buffer_forward(&optbuf, optlen);
-+ break;
-+ }
- process_sit(l, msg, &optbuf, optlen);
-+ seen_cookie = ISC_TRUE;
- break;
- default:
- isc_buffer_forward(&optbuf, optlen);
-diff --git a/bin/named/client.c b/bin/named/client.c
-index 683305c..0d7331a 100644
---- a/bin/named/client.c
-+++ b/bin/named/client.c
-@@ -120,7 +120,10 @@
- */
- #endif
-
--#define SIT_SIZE 24U /* 8 + 4 + 4 + 8 */
-+#define COOKIE_SIZE 24U /* 8 + 4 + 4 + 8 */
-+
-+#define WANTNSID(x) (((x)->attributes & NS_CLIENTATTR_WANTNSID) != 0)
-+#define WANTEXPIRE(x) (((x)->attributes & NS_CLIENTATTR_WANTEXPIRE) != 0)
-
- /*% nameserver client manager structure */
- struct ns_clientmgr {
-@@ -1395,7 +1398,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
- {
- char nsid[BUFSIZ], *nsidp;
- #ifdef ISC_PLATFORM_USESIT
-- unsigned char sit[SIT_SIZE];
-+ unsigned char sit[COOKIE_SIZE];
- #endif
- isc_result_t result;
- dns_view_t *view;
-@@ -1420,7 +1423,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
- flags = client->extflags & DNS_MESSAGEEXTFLAG_REPLYPRESERVE;
-
- /* Set EDNS options if applicable */
-- if ((client->attributes & NS_CLIENTATTR_WANTNSID) != 0 &&
-+ if (WANTNSID(client) &&
- (ns_g_server->server_id != NULL ||
- ns_g_server->server_usehostname)) {
- if (ns_g_server->server_usehostname) {
-@@ -1453,7 +1456,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
-
- INSIST(count < DNS_EDNSOPTIONS);
- ednsopts[count].code = DNS_OPT_COOKIE;
-- ednsopts[count].length = SIT_SIZE;
-+ ednsopts[count].length = COOKIE_SIZE;
- ednsopts[count].value = sit;
- count++;
- }
-@@ -1661,19 +1664,26 @@ compute_sit(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
-
- static void
- process_sit(ns_client_t *client, isc_buffer_t *buf, size_t optlen) {
-- unsigned char dbuf[SIT_SIZE];
-+ unsigned char dbuf[COOKIE_SIZE];
- unsigned char *old;
- isc_stdtime_t now;
- isc_uint32_t when;
- isc_uint32_t nonce;
- isc_buffer_t db;
-
-+ /*
-+ * If we have already seen a ECS option skip this ECS option.
-+ */
-+ if ((client->attributes & NS_CLIENTATTR_WANTSIT) != 0) {
-+ isc_buffer_forward(buf, optlen);
-+ return;
-+ }
- client->attributes |= NS_CLIENTATTR_WANTSIT;
-
- isc_stats_increment(ns_g_server->nsstats,
- dns_nsstatscounter_sitopt);
-
-- if (optlen != SIT_SIZE) {
-+ if (optlen != COOKIE_SIZE) {
- /*
- * Not our token.
- */
-@@ -1717,14 +1727,13 @@ process_sit(ns_client_t *client, isc_buffer_t *buf, size_t optlen) {
- isc_buffer_init(&db, dbuf, sizeof(dbuf));
- compute_sit(client, when, nonce, &db);
-
-- if (!isc_safe_memequal(old, dbuf, SIT_SIZE)) {
-+ if (!isc_safe_memequal(old, dbuf, COOKIE_SIZE)) {
- isc_stats_increment(ns_g_server->nsstats,
- dns_nsstatscounter_sitnomatch);
- return;
- }
- isc_stats_increment(ns_g_server->nsstats,
- dns_nsstatscounter_sitmatch);
--
- client->attributes |= NS_CLIENTATTR_HAVESIT;
- }
- #endif
-@@ -1783,7 +1792,9 @@ process_opt(ns_client_t *client, dns_rdataset_t *opt) {
- optlen = isc_buffer_getuint16(&optbuf);
- switch (optcode) {
- case DNS_OPT_NSID:
-- isc_stats_increment(ns_g_server->nsstats,
-+ if (!WANTNSID(client))
-+ isc_stats_increment(
-+ ns_g_server->nsstats,
- dns_nsstatscounter_nsidopt);
- client->attributes |= NS_CLIENTATTR_WANTNSID;
- isc_buffer_forward(&optbuf, optlen);
-@@ -1794,7 +1805,9 @@ process_opt(ns_client_t *client, dns_rdataset_t *opt) {
- break;
- #endif
- case DNS_OPT_EXPIRE:
-- isc_stats_increment(ns_g_server->nsstats,
-+ if (!WANTEXPIRE(client))
-+ isc_stats_increment(
-+ ns_g_server->nsstats,
- dns_nsstatscounter_expireopt);
- client->attributes |= NS_CLIENTATTR_WANTEXPIRE;
- isc_buffer_forward(&optbuf, optlen);
-diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml
-index ebf4f55..095eb5b 100644
---- a/doc/arm/notes.xml
-+++ b/doc/arm/notes.xml
-@@ -51,6 +51,13 @@
- <title>Security Fixes</title>
- <itemizedlist>
- <listitem>
-+ <para>
-+ Duplicate EDNS COOKIE options in a response could trigger
-+ an assertion failure. This flaw is disclosed in CVE-2016-2088.
-+ [RT #41809]
-+ </para>
-+ </listitem>
-+ <listitem>
- <para>
- Specific APL data could trigger an INSIST. This flaw
- was discovered by Brian Mitchell and is disclosed in
-diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
-index a797e3f..ba1ae23 100644
---- a/lib/dns/resolver.c
-+++ b/lib/dns/resolver.c
-@@ -7502,7 +7502,9 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
- unsigned char *sit;
- dns_adbaddrinfo_t *addrinfo;
- unsigned char cookie[8];
-+ isc_boolean_t seen_cookie = ISC_FALSE;
- #endif
-+ isc_boolean_t seen_nsid = ISC_FALSE;
-
- result = dns_rdataset_first(opt);
- if (result == ISC_R_SUCCESS) {
-@@ -7516,14 +7518,23 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
- INSIST(optlen <= isc_buffer_remaininglength(&optbuf));
- switch (optcode) {
- case DNS_OPT_NSID:
-- if (query->options & DNS_FETCHOPT_WANTNSID)
-+ if (!seen_nsid &&
-+ query->options & DNS_FETCHOPT_WANTNSID)
- log_nsid(&optbuf, optlen, query,
- ISC_LOG_DEBUG(3),
- query->fctx->res->mctx);
- isc_buffer_forward(&optbuf, optlen);
-+ seen_nsid = ISC_TRUE;
- break;
- #ifdef ISC_PLATFORM_USESIT
- case DNS_OPT_COOKIE:
-+ /*
-+ * Only process the first cookie option.
-+ */
-+ if (seen_cookie) {
-+ isc_buffer_forward(&optbuf, optlen);
-+ break;
-+ }
- sit = isc_buffer_current(&optbuf);
- compute_cc(query, cookie, sizeof(cookie));
- INSIST(query->fctx->rmessage->sitbad == 0 &&
-@@ -7541,6 +7552,7 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
- isc_buffer_forward(&optbuf, optlen);
- inc_stats(query->fctx->res,
- dns_resstatscounter_sitin);
-+ seen_cookie = ISC_TRUE;
- break;
- #endif
- default:
---
-2.1.4
-
diff --git a/meta/recipes-connectivity/bind/bind/bind-confgen-build-unix.o-once.patch b/meta/recipes-connectivity/bind/bind/bind-confgen-build-unix.o-once.patch
deleted file mode 100644
index 096d5d84fc..0000000000
--- a/meta/recipes-connectivity/bind/bind/bind-confgen-build-unix.o-once.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 9b40619ff6fddfef2758ba797789f8487f412df3 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 16 Feb 2015 00:50:01 -0800
-Subject: [PATCH] confgen: don't build unix.o twice
-
-Fixed:
-unix/os.o: file not recognized: File truncated
-collect2: error: ld returned 1 exit status
-
-This is because os.o was built twice:
-* The implicity rule (depends on unix/os.o)
-* The "make all" in unix subdir (depends on unix/os.o)
-
-Depend on subdirs which is unix only rather than unix/os.o will fix the
-problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- bin/confgen/Makefile.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/bin/confgen/Makefile.in b/bin/confgen/Makefile.in
-index 8b3e5aa..4868a24 100644
---- a/bin/confgen/Makefile.in
-+++ b/bin/confgen/Makefile.in
-@@ -74,11 +74,11 @@ rndc-confgen.@O@: rndc-confgen.c
- ddns-confgen.@O@: ddns-confgen.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c ${srcdir}/ddns-confgen.c
-
--rndc-confgen@EXEEXT@: rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS} ${CONFDEPLIBS}
-+rndc-confgen@EXEEXT@: rndc-confgen.@O@ util.@O@ keygen.@O@ ${CONFDEPLIBS} $(SUBDIRS)
- export BASEOBJS="rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
- ${FINALBUILDCMD}
-
--ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS} ${CONFDEPLIBS}
-+ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${CONFDEPLIBS} $(SUBDIRS)
- export BASEOBJS="ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
- ${FINALBUILDCMD}
-
---
-1.7.9.5
-
diff --git a/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
index 13df3bb0e9..84559e5f37 100644
--- a/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
+++ b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
@@ -1,4 +1,4 @@
-From 9473d29843579802e96b0293a3e953fed93de82c Mon Sep 17 00:00:00 2001
+From edda20fb5a6e88548f85e39d34d6c074306e15bc Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Tue, 9 Jun 2015 11:22:00 -0400
Subject: [PATCH] bind: ensure searching for json headers searches sysroot
@@ -27,15 +27,16 @@ to make use of the combination some day.
Upstream-Status: Inappropriate [OE Specific]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+
---
- configure.in | 2 +-
+ configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/configure.in b/configure.in
-index c9ef3a601343..17a1f613e9ac 100644
---- a/configure.in
-+++ b/configure.in
-@@ -2139,7 +2139,7 @@ case "$use_libjson" in
+diff --git a/configure.ac b/configure.ac
+index 17392fd..e85a5c6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2449,7 +2449,7 @@ case "$use_libjson" in
libjson_libs=""
;;
auto|yes)
@@ -44,6 +45,3 @@ index c9ef3a601343..17a1f613e9ac 100644
do
if test -f "${d}/include/json/json.h"
then
---
-2.4.2
-
diff --git a/meta/recipes-connectivity/bind/bind/dont-test-on-host.patch b/meta/recipes-connectivity/bind/bind/dont-test-on-host.patch
deleted file mode 100644
index b02ecb1061..0000000000
--- a/meta/recipes-connectivity/bind/bind/dont-test-on-host.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: bind-9.9.5/bin/Makefile.in
-===================================================================
---- bind-9.9.5.orig/bin/Makefile.in
-+++ bind-9.9.5/bin/Makefile.in
-@@ -19,7 +19,7 @@ srcdir = @srcdir@
- VPATH = @srcdir@
- top_srcdir = @top_srcdir@
-
--SUBDIRS = named rndc dig delv dnssec tools tests nsupdate \
-+SUBDIRS = named rndc dig delv dnssec tools nsupdate \
- check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@
- TARGETS =
-
diff --git a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
index db201270fa..ef915c0ae5 100644
--- a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
+++ b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
@@ -3,5 +3,6 @@
if [ ! -s /etc/bind/rndc.key ]; then
echo -n "Generating /etc/bind/rndc.key:"
/usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
+ chown root:bind /etc/bind/rndc.key
chmod 0640 /etc/bind/rndc.key
fi
diff --git a/meta/recipes-connectivity/bind/bind/mips1-not-support-opcode.diff b/meta/recipes-connectivity/bind/bind/mips1-not-support-opcode.diff
deleted file mode 100644
index 2930796b6a..0000000000
--- a/meta/recipes-connectivity/bind/bind/mips1-not-support-opcode.diff
+++ /dev/null
@@ -1,104 +0,0 @@
-bind: port a patch to fix a build failure
-
-mips1 does not support ll and sc instructions, and lead to below error, now
-we port a patch from debian to fix it
-[http://security.debian.org/debian-security/pool/updates/main/b/bind9/bind9_9.8.4.dfsg.P1-6+nmu2+deb7u1.diff.gz]
-
-| {standard input}: Assembler messages:
-| {standard input}:47: Error: Opcode not supported on this processor: mips1 (mips1) `ll $3,0($6)'
-| {standard input}:50: Error: Opcode not supported on this processor: mips1 (mips1) `sc $3,0($6)'
-
-Upstream-Status: Pending
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-
---- bind9-9.8.4.dfsg.P1.orig/lib/isc/mips/include/isc/atomic.h
-+++ bind9-9.8.4.dfsg.P1/lib/isc/mips/include/isc/atomic.h
-@@ -31,18 +31,20 @@
- isc_atomic_xadd(isc_int32_t *p, int val) {
- isc_int32_t orig;
-
-- /* add is a cheat, since MIPS has no mov instruction */
-- __asm__ volatile (
-- "1:"
-- "ll $3, %1\n"
-- "add %0, $0, $3\n"
-- "add $3, $3, %2\n"
-- "sc $3, %1\n"
-- "beq $3, 0, 1b"
-- : "=&r"(orig)
-- : "m"(*p), "r"(val)
-- : "memory", "$3"
-- );
-+ __asm__ __volatile__ (
-+ " .set push \n"
-+ " .set mips2 \n"
-+ " .set noreorder \n"
-+ " .set noat \n"
-+ "1: ll $1, %1 \n"
-+ " addu %0, $1, %2 \n"
-+ " sc %0, %1 \n"
-+ " beqz %0, 1b \n"
-+ " move %0, $1 \n"
-+ " .set pop \n"
-+ : "=&r" (orig), "+R" (*p)
-+ : "r" (val)
-+ : "memory");
-
- return (orig);
- }
-@@ -52,16 +54,7 @@
- */
- static inline void
- isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
-- __asm__ volatile (
-- "1:"
-- "ll $3, %0\n"
-- "add $3, $0, %1\n"
-- "sc $3, %0\n"
-- "beq $3, 0, 1b"
-- :
-- : "m"(*p), "r"(val)
-- : "memory", "$3"
-- );
-+ *p = val;
- }
-
- /*
-@@ -72,20 +65,23 @@
- static inline isc_int32_t
- isc_atomic_cmpxchg(isc_int32_t *p, int cmpval, int val) {
- isc_int32_t orig;
-+ isc_int32_t tmp;
-
-- __asm__ volatile(
-- "1:"
-- "ll $3, %1\n"
-- "add %0, $0, $3\n"
-- "bne $3, %2, 2f\n"
-- "add $3, $0, %3\n"
-- "sc $3, %1\n"
-- "beq $3, 0, 1b\n"
-- "2:"
-- : "=&r"(orig)
-- : "m"(*p), "r"(cmpval), "r"(val)
-- : "memory", "$3"
-- );
-+ __asm__ __volatile__ (
-+ " .set push \n"
-+ " .set mips2 \n"
-+ " .set noreorder \n"
-+ " .set noat \n"
-+ "1: ll $1, %1 \n"
-+ " bne $1, %3, 2f \n"
-+ " move %2, %4 \n"
-+ " sc %2, %1 \n"
-+ " beqz %2, 1b \n"
-+ "2: move %0, $1 \n"
-+ " .set pop \n"
-+ : "=&r"(orig), "+R" (*p), "=r" (tmp)
-+ : "r"(cmpval), "r"(val)
-+ : "memory");
-
- return (orig);
- }
diff --git a/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb b/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
deleted file mode 100644
index a99f0dd854..0000000000
--- a/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
+++ /dev/null
@@ -1,109 +0,0 @@
-SUMMARY = "ISC Internet Domain Name Server"
-HOMEPAGE = "http://www.isc.org/sw/bind/"
-SECTION = "console/network"
-
-LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=0a95f52a0ab6c5f52dedc9a45e7abb3f"
-
-DEPENDS = "openssl libcap"
-
-SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
- file://conf.patch \
- file://make-etc-initd-bind-stop-work.patch \
- file://mips1-not-support-opcode.diff \
- file://dont-test-on-host.patch \
- file://generate-rndc-key.sh \
- file://named.service \
- file://bind9 \
- file://init.d-add-support-for-read-only-rootfs.patch \
- file://bind-confgen-build-unix.o-once.patch \
- file://0001-build-use-pkg-config-to-find-libxml2.patch \
- file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
- file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
- file://0001-lib-dns-gen.c-fix-too-long-error.patch \
- file://CVE-2016-1285.patch \
- file://CVE-2016-1286_1.patch \
- file://CVE-2016-1286_2.patch \
- file://CVE-2016-2088.patch \
- "
-
-SRC_URI[md5sum] = "bcf7e772b616f7259420a3edc5df350a"
-SRC_URI[sha256sum] = "690810d1fbb72afa629e74638d19cd44e28d2b2e5eb63f55c705ad85d1a4cb83"
-
-ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
-EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
- --disable-devpoll --disable-epoll --with-gost=no \
- --with-gssapi=no --with-ecdsa=yes \
- --sysconfdir=${sysconfdir}/bind \
- --with-openssl=${STAGING_LIBDIR}/.. \
- "
-inherit autotools update-rc.d systemd useradd pkgconfig
-
-# PACKAGECONFIGs readline and libedit should NOT be set at same time
-PACKAGECONFIG ?= "readline"
-PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
-PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
-PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
- --user-group bind"
-
-INITSCRIPT_NAME = "bind"
-INITSCRIPT_PARAMS = "defaults"
-
-SYSTEMD_SERVICE_${PN} = "named.service"
-
-PARALLEL_MAKE = ""
-
-RDEPENDS_${PN} = "python3-core"
-RDEPENDS_${PN}-dev = ""
-
-PACKAGE_BEFORE_PN += "${PN}-utils"
-FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
-FILES_${PN}-dev += "${bindir}/isc-config.h"
-FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
-
-do_install_prepend() {
- # clean host path in isc-config.sh before the hardlink created
- # by "make install":
- # bind9-config -> isc-config.sh
- sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
-}
-
-do_install_append() {
- rm "${D}${bindir}/nslookup"
- rm "${D}${mandir}/man1/nslookup.1"
- rmdir "${D}${localstatedir}/run"
- rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
- install -d -o bind "${D}${localstatedir}/cache/bind"
- install -d "${D}${sysconfdir}/bind"
- install -d "${D}${sysconfdir}/init.d"
- install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
- install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
- sed -i -e '1s,#!.*python,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
-
- # Install systemd related files
- install -d ${D}${sbindir}
- install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SBINDIR@,${sbindir},g' \
- ${D}${systemd_unitdir}/system/named.service
-
- install -d ${D}${sysconfdir}/default
- install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
-}
-
-CONFFILES_${PN} = " \
- ${sysconfdir}/bind/named.conf \
- ${sysconfdir}/bind/named.conf.local \
- ${sysconfdir}/bind/named.conf.options \
- ${sysconfdir}/bind/db.0 \
- ${sysconfdir}/bind/db.127 \
- ${sysconfdir}/bind/db.empty \
- ${sysconfdir}/bind/db.local \
- ${sysconfdir}/bind/db.root \
- "
-
diff --git a/meta/recipes-connectivity/bind/bind_9.11.13.bb b/meta/recipes-connectivity/bind/bind_9.11.13.bb
new file mode 100644
index 0000000000..338d6c717a
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind_9.11.13.bb
@@ -0,0 +1,139 @@
+SUMMARY = "ISC Internet Domain Name Server"
+HOMEPAGE = "http://www.isc.org/sw/bind/"
+SECTION = "console/network"
+
+LICENSE = "ISC & BSD"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8f17f64e47e83b60cd920a1e4b54419e"
+
+DEPENDS = "openssl libcap zlib"
+
+SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
+ file://conf.patch \
+ file://named.service \
+ file://bind9 \
+ file://generate-rndc-key.sh \
+ file://make-etc-initd-bind-stop-work.patch \
+ file://init.d-add-support-for-read-only-rootfs.patch \
+ file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
+ file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \
+ file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
+ file://0001-avoid-start-failure-with-bind-user.patch \
+ "
+
+SRC_URI[md5sum] = "17de0d024ab1eac377f1c2854dc25057"
+SRC_URI[sha256sum] = "fd3f3cc9fcfcdaa752db35eb24598afa1fdcc2509d3227fc90a8631b7b400f7d"
+
+UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
+# stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4
+UPSTREAM_CHECK_REGEX = "(?P<pver>9.(11|16|20|24|28)(\.\d+)+(-P\d+)*)/"
+
+# BIND >= 9.11.2 need dhcpd >= 4.4.0,
+# don't report it here since dhcpd is already recent enough.
+CVE_CHECK_WHITELIST += "CVE-2019-6470"
+
+inherit autotools update-rc.d systemd useradd pkgconfig multilib_script
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/bind9-config ${PN}:${bindir}/isc-config.sh"
+
+# PACKAGECONFIGs readline and libedit should NOT be set at same time
+PACKAGECONFIG ?= "readline"
+PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2"
+PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
+PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
+PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
+PACKAGECONFIG[python3] = "--with-python=yes --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native,"
+
+ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
+EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
+ --disable-devpoll --enable-epoll --with-gost=no \
+ --with-gssapi=no --with-ecdsa=yes --with-eddsa=no \
+ --with-lmdb=no \
+ --sysconfdir=${sysconfdir}/bind \
+ --with-openssl=${STAGING_DIR_HOST}${prefix} \
+ "
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)}
+
+# dhcp needs .la so keep them
+REMOVE_LIBTOOL_LA = "0"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
+ --user-group bind"
+
+INITSCRIPT_NAME = "bind"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "named.service"
+
+do_install_prepend() {
+ # clean host path in isc-config.sh before the hardlink created
+ # by "make install":
+ # bind9-config -> isc-config.sh
+ sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
+}
+
+do_install_append() {
+
+ rmdir "${D}${localstatedir}/run"
+ rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+ install -d -o bind "${D}${localstatedir}/cache/bind"
+ install -d "${D}${sysconfdir}/bind"
+ install -d "${D}${sysconfdir}/init.d"
+ install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
+ install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
+ if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
+ sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \
+ ${D}${sbindir}/dnssec-coverage \
+ ${D}${sbindir}/dnssec-checkds \
+ ${D}${sbindir}/dnssec-keymgr
+ fi
+
+ # Install systemd related files
+ install -d ${D}${sbindir}
+ install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ ${D}${systemd_unitdir}/system/named.service
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
+ fi
+}
+
+CONFFILES_${PN} = " \
+ ${sysconfdir}/bind/named.conf \
+ ${sysconfdir}/bind/named.conf.local \
+ ${sysconfdir}/bind/named.conf.options \
+ ${sysconfdir}/bind/db.0 \
+ ${sysconfdir}/bind/db.127 \
+ ${sysconfdir}/bind/db.empty \
+ ${sysconfdir}/bind/db.local \
+ ${sysconfdir}/bind/db.root \
+ "
+
+ALTERNATIVE_${PN}-utils = "nslookup"
+ALTERNATIVE_LINK_NAME[nslookup] = "${bindir}/nslookup"
+ALTERNATIVE_PRIORITY = "100"
+
+PACKAGE_BEFORE_PN += "${PN}-utils"
+FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig ${bindir}/nslookup ${bindir}/nsupdate"
+FILES_${PN}-dev += "${bindir}/isc-config.h"
+FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
+
+PACKAGE_BEFORE_PN += "${PN}-libs"
+FILES_${PN}-libs = "${libdir}/*.so*"
+FILES_${PN}-staticdev += "${libdir}/*.la"
+
+PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}"
+FILES_python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \
+ ${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}"
+
+RDEPENDS_${PN}-dev = ""
+RDEPENDS_python3-bind = "python3-core python3-ply"
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index ecefb7b593..150d909d73 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -6,44 +6,75 @@ LICENSE = "GPLv2+ & LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
-DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline"
+DEPENDS = "dbus glib-2.0"
PROVIDES += "bluez-hcidump"
RPROVIDES_${PN} += "bluez-hcidump"
RCONFLICTS_${PN} = "bluez4"
-PACKAGECONFIG ??= "obex-profiles"
-PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
-PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
-
-SRC_URI = "\
- ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
- file://out-of-tree.patch \
- file://init \
- file://run-ptest \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
- file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
+PACKAGECONFIG ??= "obex-profiles \
+ readline \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+ a2dp-profiles \
+ avrcp-profiles \
+ network-profiles \
+ hid-profiles \
+ hog-profiles \
+ tools \
+ deprecated \
+ udev \
"
+PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
+PACKAGECONFIG[readline] = "--enable-client,--disable-client,readline,"
+PACKAGECONFIG[testing] = "--enable-testing,--disable-testing"
+PACKAGECONFIG[midi] = "--enable-midi,--disable-midi,alsa-lib"
+PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd"
+PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,,cups"
+PACKAGECONFIG[nfc] = "--enable-nfc,--disable-nfc"
+PACKAGECONFIG[sap-profiles] = "--enable-sap,--disable-sap"
+PACKAGECONFIG[a2dp-profiles] = "--enable-a2dp,--disable-a2dp"
+PACKAGECONFIG[avrcp-profiles] = "--enable-avrcp,--disable-avrcp"
+PACKAGECONFIG[network-profiles] = "--enable-network,--disable-network"
+PACKAGECONFIG[hid-profiles] = "--enable-hid,--disable-hid"
+PACKAGECONFIG[hog-profiles] = "--enable-hog,--disable-hog"
+PACKAGECONFIG[health-profiles] = "--enable-health,--disable-health"
+PACKAGECONFIG[sixaxis] = "--enable-sixaxis,--disable-sixaxis"
+PACKAGECONFIG[tools] = "--enable-tools,--disable-tools"
+PACKAGECONFIG[threads] = "--enable-threads,--disable-threads"
+PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated"
+PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c ell"
+PACKAGECONFIG[btpclient] = "--enable-btpclient,--disable-btpclient, ell"
+PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
+ file://init \
+ file://run-ptest \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
+ file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
+ file://0001-test-gatt-Fix-hung-issue.patch \
+ "
S = "${WORKDIR}/bluez-${PV}"
-inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest
+CVE_PRODUCT = "bluez"
+
+inherit autotools pkgconfig systemd update-rc.d features_check ptest gobject-introspection-data
EXTRA_OECONF = "\
- --enable-tools \
- --disable-cups \
--enable-test \
--enable-datafiles \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)} \
--enable-library \
+ --without-zsh-completion-dir \
"
# bluez5 builds a large number of useful utilities but does not
# install them. Specify which ones we want put into ${PN}-noinst-tools.
NOINST_TOOLS_READLINE ??= ""
-NOINST_TOOLS_EXPERIMENTAL ??= ""
+NOINST_TOOLS_TESTING ??= ""
+NOINST_TOOLS_BT ??= ""
NOINST_TOOLS = " \
- ${NOINST_TOOLS_READLINE} \
- ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'readline', '${NOINST_TOOLS_READLINE}', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'testing', '${NOINST_TOOLS_TESTING}', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'tools', '${NOINST_TOOLS_BT}', '', d)} \
"
do_install_append() {
@@ -51,43 +82,44 @@ do_install_append() {
install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
install -d ${D}${sysconfdir}/bluetooth/
- if [ -f ${S}/profiles/audio/audio.conf ]; then
- install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
- fi
if [ -f ${S}/profiles/network/network.conf ]; then
- install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
+ install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
fi
if [ -f ${S}/profiles/input/input.conf ]; then
- install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
+ install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
fi
- if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
- sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth
- fi
+ if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
+ sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth
+ fi
# Install desired tools that upstream leaves in build area
- for f in ${NOINST_TOOLS} ; do
- install -m 755 ${B}/$f ${D}/${bindir}
+ for f in ${NOINST_TOOLS} ; do
+ install -m 755 ${B}/$f ${D}/${bindir}
done
- # Patch python tools to use Python 3; they should be source compatible, but
- # still refer to Python 2 in the shebang
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/bluez/test/*
+ # Patch python tools to use Python 3; they should be source compatible, but
+ # still refer to Python 2 in the shebang
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/bluez/test/*
}
-ALLOW_EMPTY_libasound-module-bluez = "1"
-PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
+PACKAGES =+ "${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
-FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
-FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${systemd_unitdir}/ ${datadir}/dbus-1"
-FILES_${PN}-dev += "\
- ${libdir}/bluetooth/plugins/*.la \
- ${libdir}/alsa-lib/*.la \
+FILES_${PN} += " \
+ ${libdir}/bluetooth/plugins/*.so \
+ ${systemd_unitdir}/ ${datadir}/dbus-1 \
+ ${libdir}/cups \
+"
+FILES_${PN}-dev += " \
+ ${libdir}/bluetooth/plugins/*.la \
"
FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \
${exec_prefix}/lib/systemd/user/obex.service \
+ ${systemd_system_unitdir}/obex.service \
+ ${sysconfdir}/systemd/system/multi-user.target.wants/obex.service \
${datadir}/dbus-1/services/org.bluez.obex.service \
+ ${sysconfdir}/dbus-1/system.d/obexd.conf \
"
SYSTEMD_SERVICE_${PN}-obex = "obex.service"
@@ -95,27 +127,28 @@ FILES_${PN}-testtools = "${libdir}/bluez/test/*"
def get_noinst_tools_paths (d, bb, tools):
s = list()
- bindir = d.getVar("bindir", True)
+ bindir = d.getVar("bindir")
for bdp in tools.split():
f = os.path.basename(bdp)
s.append("%s/%s" % (bindir, f))
return "\n".join(s)
-FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
+FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS'))}"
-RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject"
+RDEPENDS_${PN}-testtools += "python3-core python3-dbus"
+RDEPENDS_${PN}-testtools += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
-SYSTEMD_SERVICE_${PN} = "bluetooth.service"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'bluetooth.service', '', d)}"
INITSCRIPT_PACKAGES = "${PN}"
INITSCRIPT_NAME_${PN} = "bluetooth"
-EXCLUDE_FROM_WORLD = "1"
-
do_compile_ptest() {
- oe_runmake buildtests
+ oe_runmake buildtests
}
do_install_ptest() {
- cp -r ${B}/unit/ ${D}${PTEST_PATH}
- rm -f ${D}${PTEST_PATH}/unit/*.o
+ cp -r ${B}/unit/ ${D}${PTEST_PATH}
+ rm -f ${D}${PTEST_PATH}/unit/*.o
}
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-utf-16"
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
index 2fde7bc069..618ed734a9 100644
--- a/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
+++ b/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
@@ -1,3 +1,4 @@
+From f74eb97c9fb3c0ee2895742e773ac6a3c41c999c Mon Sep 17 00:00:00 2001
From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org>
Date: Sat, 12 Oct 2013 17:45:25 +0200
Subject: [PATCH] Allow using obexd without systemd in the user session
@@ -14,50 +15,42 @@ configuration. See thread:
http://thread.gmane.org/gmane.linux.bluez.kernel/38725/focus=38843
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
+
---
- Makefile.obexd | 4 ++--
- obexd/src/org.bluez.obex.service | 4 ----
- obexd/src/org.bluez.obex.service.in | 4 ++++
- 3 files changed, 6 insertions(+), 6 deletions(-)
- delete mode 100644 obexd/src/org.bluez.obex.service
- create mode 100644 obexd/src/org.bluez.obex.service.in
+ Makefile.obexd | 4 ++--
+ .../src/{org.bluez.obex.service => org.bluez.obex.service.in} | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+ rename obexd/src/{org.bluez.obex.service => org.bluez.obex.service.in} (76%)
diff --git a/Makefile.obexd b/Makefile.obexd
-index 2e33cbc72f2b..d5d858c857b4 100644
+index de59d29..73004a3 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
-@@ -2,12 +2,12 @@
+@@ -1,12 +1,12 @@
if SYSTEMD
- systemduserunitdir = @SYSTEMD_USERUNITDIR@
+ systemduserunitdir = $(SYSTEMD_USERUNITDIR)
systemduserunit_DATA = obexd/src/obex.service
+endif
- dbussessionbusdir = @DBUS_SESSIONBUSDIR@
+ dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
-endif
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
- obex_plugindir = $(libdir)/obex/plugins
+ if OBEX
-diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
-deleted file mode 100644
-index a53808884554..000000000000
+diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service.in
+similarity index 76%
+rename from obexd/src/org.bluez.obex.service
+rename to obexd/src/org.bluez.obex.service.in
+index a538088..9c815f2 100644
--- a/obexd/src/org.bluez.obex.service
-+++ /dev/null
-@@ -1,4 +0,0 @@
--[D-BUS Service]
--Name=org.bluez.obex
--Exec=/bin/false
--SystemdService=dbus-org.bluez.obex.service
-diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
-new file mode 100644
-index 000000000000..9c815f246b77
---- /dev/null
+++ b/obexd/src/org.bluez.obex.service.in
-@@ -0,0 +1,4 @@
-+[D-BUS Service]
-+Name=org.bluez.obex
+@@ -1,4 +1,4 @@
+ [D-BUS Service]
+ Name=org.bluez.obex
+-Exec=/bin/false
+Exec=@libexecdir@/obexd
-+SystemdService=dbus-org.bluez.obex.service
+ SystemdService=dbus-org.bluez.obex.service
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch
new file mode 100644
index 0000000000..e90b6a546f
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch
@@ -0,0 +1,43 @@
+From 61e741654cc2eb167bca212a3bb2ba8f3ba280c1 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Fri, 24 Aug 2018 12:04:03 +0800
+Subject: [PATCH] test-gatt: Fix hung issue
+
+The below test hangs infinitely
+$ unit/test-gatt -p /robustness/unkown-request -d
+/robustness/unkown-request - init
+/robustness/unkown-request - setup
+/robustness/unkown-request - setup complete
+/robustness/unkown-request - run
+ GATT: < 02 17 00 ...
+ bt_gatt_server:MTU exchange complete, with MTU: 23
+ GATT: > 03 00 02 ...
+ PDU: = 03 00 02 ...
+ GATT: < bf 00
+
+Actually, the /robustness/unkown-request test does
+no action.
+
+Upstream-Status: Submitted [https://marc.info/?l=linux-bluetooth&m=153508881804635&w=2]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ unit/test-gatt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/unit/test-gatt.c b/unit/test-gatt.c
+index c7e28f8..b57373b 100644
+--- a/unit/test-gatt.c
++++ b/unit/test-gatt.c
+@@ -4463,7 +4463,7 @@ int main(int argc, char *argv[])
+ test_server, service_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0xbf, 0x00),
+- raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06));
++ raw_pdu());
+
+ define_test_server("/robustness/unkown-command",
+ test_server, service_db_1, NULL,
+--
+2.7.4
+
diff --git a/meta/recipes-connectivity/bluez5/bluez5/init b/meta/recipes-connectivity/bluez5/bluez5/init
index 489e9b9eba..ca9fa18549 100644
--- a/meta/recipes-connectivity/bluez5/bluez5/init
+++ b/meta/recipes-connectivity/bluez5/bluez5/init
@@ -1,5 +1,8 @@
#!/bin/sh
+# Source function library
+. /etc/init.d/functions
+
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESC=bluetooth
@@ -21,25 +24,22 @@ set -e
case $1 in
start)
- echo "Starting $DESC"
-
+ echo -n "Starting $DESC: "
if test "$BLUETOOTH_ENABLED" = 0; then
- echo "disabled. see /etc/default/bluetooth"
+ echo "disabled (see /etc/default/bluetooth)."
exit 0
fi
-
start-stop-daemon --start --background $SSD_OPTIONS
- echo "${DAEMON##*/}"
-
+ echo "${DAEMON##*/}."
;;
stop)
- echo "Stopping $DESC"
+ echo -n "Stopping $DESC: "
if test "$BLUETOOTH_ENABLED" = 0; then
- echo "disabled."
+ echo "disabled (see /etc/default/bluetooth)."
exit 0
fi
start-stop-daemon --stop $SSD_OPTIONS
- echo "${DAEMON}"
+ echo "${DAEMON##*/}."
;;
restart|force-reload)
$0 stop
@@ -47,14 +47,7 @@ case $1 in
$0 start
;;
status)
- pidof ${DAEMON} >/dev/null
- status=$?
- if [ $status -eq 0 ]; then
- echo "bluetooth is running."
- else
- echo "bluetooth is not running"
- fi
- exit $status
+ status ${DAEMON} || exit $?
;;
*)
N=/etc/init.d/bluetooth
diff --git a/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch b/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch
deleted file mode 100644
index 3ee79d7047..0000000000
--- a/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ed55b49a226ca3909f52416be2ae5ce1c5ca2cb2 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Fri, 22 Apr 2016 15:40:37 +0100
-Subject: [PATCH] Makefile.obexd: add missing mkdir in builtin.h generation
-
-In parallel out-of-tree builds it's possible that obexd/src/builtin.h is
-generated before the target directory has been implicitly created. Solve this by
-creating the directory before writing into it.
-
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- Makefile.obexd | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.obexd b/Makefile.obexd
-index 2e33cbc..c8286f0 100644
---- a/Makefile.obexd
-+++ b/Makefile.obexd
-@@ -105,2 +105,3 @@ obexd/src/plugin.$(OBJEXT): obexd/src/builtin.h
- obexd/src/builtin.h: obexd/src/genbuiltin $(obexd_builtin_sources)
-+ $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(srcdir)/obexd/src/genbuiltin $(obexd_builtin_modules) > $@
---
-2.8.0.rc3
-
diff --git a/meta/recipes-connectivity/bluez5/bluez5/run-ptest b/meta/recipes-connectivity/bluez5/bluez5/run-ptest
index 21df00c327..0335e68e48 100644
--- a/meta/recipes-connectivity/bluez5/bluez5/run-ptest
+++ b/meta/recipes-connectivity/bluez5/bluez5/run-ptest
@@ -6,7 +6,7 @@ failed=0
all=0
for f in test-*; do
- "./$f"
+ "./$f" -q
case "$?" in
0)
echo "PASS: $f"
diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.41.bb b/meta/recipes-connectivity/bluez5/bluez5_5.41.bb
deleted file mode 100644
index 522aab7d57..0000000000
--- a/meta/recipes-connectivity/bluez5/bluez5_5.41.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-require bluez5.inc
-
-REQUIRED_DISTRO_FEATURES = "bluez5"
-
-SRC_URI[md5sum] = "318341b2188698130adb73236ee69244"
-SRC_URI[sha256sum] = "df7dc4462494dad4e60a2943240d584f6e760235dca64f5f10eba46dbab7f5f0"
-
-# noinst programs in Makefile.tools that are conditional on READLINE
-# support
-NOINST_TOOLS_READLINE ?= " \
- attrib/gatttool \
- tools/obex-client-tool \
- tools/obex-server-tool \
- tools/bluetooth-player \
- tools/obexctl \
- tools/btmgmt \
-"
-
-# noinst programs in Makefile.tools that are conditional on EXPERIMENTAL
-# support
-NOINST_TOOLS_EXPERIMENTAL ?= " \
- emulator/btvirt \
- emulator/b1ee \
- emulator/hfp \
- tools/3dsp \
- tools/mgmt-tester \
- tools/gap-tester \
- tools/l2cap-tester \
- tools/sco-tester \
- tools/smp-tester \
- tools/hci-tester \
- tools/rfcomm-tester \
- tools/bdaddr \
- tools/avinfo \
- tools/avtest \
- tools/scotest \
- tools/amptest \
- tools/hwdb \
- tools/hcieventmask \
- tools/hcisecfilter \
- tools/btinfo \
- tools/btattach \
- tools/btsnoop \
- tools/btproxy \
- tools/btiotest \
- tools/mcaptest \
- tools/cltest \
- tools/oobtest \
- tools/seq2bseq \
- tools/ibeacon \
- tools/btgatt-client \
- tools/btgatt-server \
- tools/gatt-service \
- profiles/iap/iapd \
-"
diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.52.bb b/meta/recipes-connectivity/bluez5/bluez5_5.52.bb
new file mode 100644
index 0000000000..b86103014b
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5_5.52.bb
@@ -0,0 +1,68 @@
+require bluez5.inc
+
+SRC_URI[md5sum] = "a33eb9aadf1dd4153420958709d3ce60"
+SRC_URI[sha256sum] = "f7144ce2039202cfac18ccb52426efea11c98e4f6e1bb8041bcb994b8378560a"
+
+# noinst programs in Makefile.tools that are conditional on READLINE
+# support
+NOINST_TOOLS_READLINE ?= " \
+ ${@bb.utils.contains('PACKAGECONFIG', 'deprecated', 'attrib/gatttool', '', d)} \
+ tools/obex-client-tool \
+ tools/obex-server-tool \
+ tools/bluetooth-player \
+ tools/obexctl \
+ tools/btmgmt \
+"
+
+# noinst programs in Makefile.tools that are conditional on TESTING
+# support
+NOINST_TOOLS_TESTING ?= " \
+ emulator/btvirt \
+ emulator/b1ee \
+ emulator/hfp \
+ peripheral/btsensor \
+ tools/3dsp \
+ tools/mgmt-tester \
+ tools/gap-tester \
+ tools/l2cap-tester \
+ tools/sco-tester \
+ tools/smp-tester \
+ tools/hci-tester \
+ tools/rfcomm-tester \
+ tools/bnep-tester \
+ tools/userchan-tester \
+"
+
+# noinst programs in Makefile.tools that are conditional on TOOLS
+# support
+NOINST_TOOLS_BT ?= " \
+ tools/bdaddr \
+ tools/avinfo \
+ tools/avtest \
+ tools/scotest \
+ tools/amptest \
+ tools/hwdb \
+ tools/hcieventmask \
+ tools/hcisecfilter \
+ tools/btinfo \
+ tools/btsnoop \
+ tools/btproxy \
+ tools/btiotest \
+ tools/bneptest \
+ tools/mcaptest \
+ tools/cltest \
+ tools/oobtest \
+ tools/advtest \
+ tools/seq2bseq \
+ tools/nokfw \
+ tools/create-image \
+ tools/eddystone \
+ tools/ibeacon \
+ tools/btgatt-client \
+ tools/btgatt-server \
+ tools/test-runner \
+ tools/check-selftest \
+ tools/gatt-service \
+ profiles/iap/iapd \
+ ${@bb.utils.contains('PACKAGECONFIG', 'btpclient', 'tools/btpclient', '', d)} \
+"
diff --git a/meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch b/meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch
index 279ca05d6f..c93e9b4654 100644
--- a/meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch
+++ b/meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch
@@ -1,11 +1,10 @@
-From 092fe0793b39c6feb6464bfbd568b050960d62c0 Mon Sep 17 00:00:00 2001
+From a59b0fac02e74a971ac3f08bf28c17ce361a9526 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Wed, 2 Mar 2016 15:47:49 +0200
Subject: [PATCH] Port to Gtk3
Some unused (or not useful) code was removed, functionality should stay
-the same, although applet now loads icons based on actual size available
-to it.
+the same.
Code still contains quite a few uses of deprecated API.
@@ -13,13 +12,13 @@ Upstream-Status: Submitted
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
applet/agent.c | 3 +--
- applet/main.c | 43 ------------------------------
- applet/status.c | 74 +++++++++++++++++++++++++++++++++------------------
+ applet/main.c | 43 -------------------------------------------
+ applet/status.c | 8 --------
configure.ac | 3 +--
- properties/ethernet.c | 14 +++++-----
+ properties/ethernet.c | 14 +++++++-------
properties/main.c | 2 +-
- properties/wifi.c | 12 ++++-----
- 7 files changed, 64 insertions(+), 87 deletions(-)
+ properties/wifi.c | 12 ++++++------
+ 7 files changed, 16 insertions(+), 69 deletions(-)
diff --git a/applet/agent.c b/applet/agent.c
index 65bed08..04fe86a 100644
@@ -43,7 +42,7 @@ index 65bed08..04fe86a 100644
label = gtk_label_new(_("Please provide some network information:"));
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
diff --git a/applet/main.c b/applet/main.c
-index c7b3c7f..f2ce46b 100644
+index f12d371..cd16285 100644
--- a/applet/main.c
+++ b/applet/main.c
@@ -157,46 +157,6 @@ static void name_owner_changed(DBusGProxy *proxy, const char *name,
@@ -104,26 +103,10 @@ index c7b3c7f..f2ce46b 100644
"copyright", "Copyright \xc2\xa9 2008 Intel Corporation",
"comments", _("A connection manager for the GNOME desktop"),
diff --git a/applet/status.c b/applet/status.c
-index aed6f1e..6ecbf3a 100644
+index aed6f1e..015ff29 100644
--- a/applet/status.c
+++ b/applet/status.c
-@@ -30,13 +30,14 @@
- static gboolean available = FALSE;
-
- static GtkStatusIcon *statusicon = NULL;
-+static gint icon_size = 0;
-
- static GdkPixbuf *pixbuf_load(GtkIconTheme *icontheme, const gchar *name)
- {
- GdkPixbuf *pixbuf;
- GError *error = NULL;
-
-- pixbuf = gtk_icon_theme_load_icon(icontheme, name, 22, 0, &error);
-+ pixbuf = gtk_icon_theme_load_icon(icontheme, name, icon_size, 0, &error);
-
- if (pixbuf == NULL) {
- g_warning("Missing icon %s: %s", name, error->message);
-@@ -102,8 +103,6 @@ static void icon_animation_start(IconAnimation *animation,
+@@ -102,8 +102,6 @@ static void icon_animation_start(IconAnimation *animation,
{
available = TRUE;
@@ -132,7 +115,7 @@ index aed6f1e..6ecbf3a 100644
animation->start = start;
animation->end = (end == 0) ? animation->count - 1 : end;
-@@ -120,8 +119,6 @@ static void icon_animation_stop(IconAnimation *animation)
+@@ -120,8 +118,6 @@ static void icon_animation_stop(IconAnimation *animation)
{
available = TRUE;
@@ -141,96 +124,7 @@ index aed6f1e..6ecbf3a 100644
if (animation->id > 0)
g_source_remove(animation->id);
-@@ -190,6 +187,42 @@ static GdkPixbuf *pixbuf_none;
- static GdkPixbuf *pixbuf_wired;
- static GdkPixbuf *pixbuf_signal[5];
-
-+static void
-+load_icons (gint size)
-+{
-+ // educated guess to preload correct size
-+ if (size == 0)
-+ size = 34;
-+
-+ if (icon_size == size)
-+ return;
-+
-+ icon_size = size;
-+
-+ if(pixbuf_none)
-+ status_cleanup();
-+
-+ g_debug ("Loading icons at size %d", icon_size);
-+ animation = icon_animation_load(icontheme, "connman-connecting", 33);
-+ pixbuf_signal[0] = pixbuf_load(icontheme, "connman-signal-01");
-+ pixbuf_signal[1] = pixbuf_load(icontheme, "connman-signal-02");
-+ pixbuf_signal[2] = pixbuf_load(icontheme, "connman-signal-03");
-+ pixbuf_signal[3] = pixbuf_load(icontheme, "connman-signal-04");
-+ pixbuf_signal[4] = pixbuf_load(icontheme, "connman-signal-05");
-+
-+ pixbuf_none = pixbuf_load(icontheme, "connman-type-none");
-+ pixbuf_wired = pixbuf_load(icontheme, "connman-type-wired");
-+ pixbuf_notifier = pixbuf_load(icontheme, "connman-notifier-unavailable");
-+}
-+
-+static gboolean
-+size_changed_cb (GtkStatusIcon *statusicon,
-+ gint size,
-+ gpointer user_data)
-+{
-+ load_icons (size);
-+}
-+
- int status_init(StatusCallback activate, GtkWidget *popup)
- {
- GdkScreen *screen;
-@@ -204,17 +237,9 @@ int status_init(StatusCallback activate, GtkWidget *popup)
-
- gtk_icon_theme_append_search_path(icontheme, ICONDIR);
-
-- animation = icon_animation_load(icontheme, "connman-connecting", 33);
--
-- pixbuf_signal[0] = pixbuf_load(icontheme, "connman-signal-01");
-- pixbuf_signal[1] = pixbuf_load(icontheme, "connman-signal-02");
-- pixbuf_signal[2] = pixbuf_load(icontheme, "connman-signal-03");
-- pixbuf_signal[3] = pixbuf_load(icontheme, "connman-signal-04");
-- pixbuf_signal[4] = pixbuf_load(icontheme, "connman-signal-05");
--
-- pixbuf_none = pixbuf_load(icontheme, "connman-type-none");
-- pixbuf_wired = pixbuf_load(icontheme, "connman-type-wired");
-- pixbuf_notifier = pixbuf_load(icontheme, "connman-notifier-unavailable");
-+ g_signal_connect (statusicon, "size-changed",
-+ G_CALLBACK(size_changed_cb), NULL);
-+ load_icons (gtk_status_icon_get_size (statusicon));
-
- if (activate != NULL)
- g_signal_connect(statusicon, "activate",
-@@ -231,17 +256,18 @@ void status_cleanup(void)
- int i;
-
- icon_animation_free(animation);
-+ animation = NULL;
-
- for (i = 0; i < 5; i++)
-- g_object_unref(pixbuf_signal[i]);
-+ g_clear_object(&pixbuf_signal[i]);
-
-- g_object_unref(pixbuf_none);
-- g_object_unref(pixbuf_wired);
-- g_object_unref(pixbuf_notifier);
-+ g_clear_object(&pixbuf_none);
-+ g_clear_object(&pixbuf_wired);
-+ g_clear_object(&pixbuf_notifier);
-
-- g_object_unref(icontheme);
-+ g_clear_object(&icontheme);
-
-- g_object_unref(statusicon);
-+ g_clear_object(&statusicon);
- }
-
- void status_unavailable(void)
-@@ -251,8 +277,6 @@ void status_unavailable(void)
+@@ -251,8 +247,6 @@ void status_unavailable(void)
available = FALSE;
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_notifier);
@@ -239,7 +133,7 @@ index aed6f1e..6ecbf3a 100644
gtk_status_icon_set_visible(statusicon, TRUE);
}
-@@ -299,7 +323,6 @@ static void set_ready(gint signal)
+@@ -299,7 +293,6 @@ static void set_ready(gint signal)
if (signal < 0) {
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_wired);
@@ -247,7 +141,7 @@ index aed6f1e..6ecbf3a 100644
return;
}
-@@ -311,7 +334,6 @@ static void set_ready(gint signal)
+@@ -311,7 +304,6 @@ static void set_ready(gint signal)
index = 4;
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_signal[index]);
@@ -379,5 +273,5 @@ index bd325ef..a5827e0 100644
}
break;
--
-2.1.4
+2.8.1
diff --git a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
index a56bd3751f..778bf50191 100644
--- a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
+++ b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
@@ -20,7 +20,7 @@ SRC_URI = "git://github.com/connectivity/connman-gnome.git \
S = "${WORKDIR}/git"
-inherit autotools-brokensep gtk-icon-cache pkgconfig distro_features_check
+inherit autotools-brokensep gtk-icon-cache pkgconfig features_check
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
RDEPENDS_${PN} = "connman"
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 35a7eed0a9..ff3aff5f1f 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -13,9 +13,9 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
-inherit autotools pkgconfig systemd update-rc.d bluetooth
+inherit autotools pkgconfig systemd update-rc.d update-alternatives
-DEPENDS = "dbus glib-2.0 ppp iptables readline"
+DEPENDS = "dbus glib-2.0 ppp readline"
INC_PR = "r20"
@@ -31,10 +31,9 @@ EXTRA_OECONF += "\
"
PACKAGECONFIG ??= "wispr \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd','systemd', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', '3g','3g', '', d)} \
+ iptables \
"
# If you want ConnMan to support VPN, add following statement into
@@ -43,7 +42,7 @@ PACKAGECONFIG ??= "wispr \
PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant"
-PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, ${BLUEZ}, ${BLUEZ}"
+PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
@@ -52,13 +51,16 @@ PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t
PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
# WISPr support for logging into hotspots, requires TLS
PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
+PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
+PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
+PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard"
INITSCRIPT_NAME = "connman"
INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
python __anonymous () {
- systemd_packages = "${PN}"
- pkgconfig = d.getVar('PACKAGECONFIG', True)
+ systemd_packages = "${PN} ${PN}-wait-online"
+ pkgconfig = d.getVar('PACKAGECONFIG')
if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
systemd_packages += " ${PN}-vpn"
d.setVar('SYSTEMD_PACKAGES', systemd_packages)
@@ -68,6 +70,11 @@ SYSTEMD_SERVICE_${PN} = "connman.service"
SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service"
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
+ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}"
+ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
+
do_install_append() {
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
install -d ${D}${sysconfdir}/init.d
@@ -88,6 +95,11 @@ do_install_append() {
# Automake 1.12 won't install empty directories, but we need the
# plugins directory to be present for ownership
mkdir -p ${D}${libdir}/connman/plugins
+
+ # For read-only filesystem, do not create links during bootup
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman
+ fi
}
# These used to be plugins, but now they are core
@@ -116,20 +128,20 @@ def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
python populate_packages_prepend() {
depmap = dict(pppd="ppp")
- multilib_prefix = (d.getVar("MLPREFIX", True) or "")
+ multilib_prefix = (d.getVar("MLPREFIX") or "")
hook = lambda file,pkg,x,y,z: \
add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False)
plugin_dir = d.expand('${libdir}/connman/plugins/')
plugin_name = d.expand('${PN}-plugin-%s')
- do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \
+ do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
'${PN} plugin for %s', extra_depends='', hook=hook, prepend=True )
hook = lambda file,pkg,x,y,z: \
add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True)
plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
plugin_name = d.expand('${PN}-plugin-vpn-%s')
- do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \
+ do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
'${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True )
}
@@ -145,7 +157,7 @@ RDEPENDS_${PN}-client ="${PN}"
FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
${libdir}/connman/plugins \
- ${sysconfdir} ${sharedstatedir} ${localstatedir} \
+ ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \
${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
${datadir}/dbus-1/system-services/* \
${sysconfdir}/tmpfiles.d/connman_resolvconf.conf"
diff --git a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch
new file mode 100644
index 0000000000..8e2e0bd02d
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch
@@ -0,0 +1,29 @@
+From 9f70b94ebf18f52c115634642652830fa77f27a1 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Mon, 12 Jun 2017 16:52:39 +0300
+Subject: [PATCH] connman.service: stop systemd-resolved when we use connman
+
+Stop systemd-resolved service when we use connman as network manager.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ src/connman.service.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/connman.service.in b/src/connman.service.in
+index 9f5c10f..dab48bc 100644
+--- a/src/connman.service.in
++++ b/src/connman.service.in
+@@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman
+ After=dbus.service network-pre.target systemd-sysusers.service
+ Before=network.target multi-user.target shutdown.target
+ Wants=network.target
++Conflicts=systemd-resolved.service
+
+ [Service]
+ Type=dbus
+--
+2.4.0
+
diff --git a/meta/recipes-connectivity/connman/connman/0001-gweb-fix-segfault-with-musl-v1.1.21.patch b/meta/recipes-connectivity/connman/connman/0001-gweb-fix-segfault-with-musl-v1.1.21.patch
new file mode 100644
index 0000000000..30f1432cd3
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-gweb-fix-segfault-with-musl-v1.1.21.patch
@@ -0,0 +1,34 @@
+From f0a8c69971b30ea7ca255bb885fdd1179fa5d298 Mon Sep 17 00:00:00 2001
+From: Nicola Lunghi <nick83ola@gmail.com>
+Date: Thu, 23 May 2019 07:55:25 +0100
+Subject: [PATCH] gweb: fix segfault with musl v1.1.21
+
+In musl > v1.1.21 freeaddrinfo() implementation changed and
+was causing a segmentation fault on recent Yocto using musl.
+
+See this commit:
+
+ https://git.musl-libc.org/cgit/musl/commit/src/network/freeaddrinfo.c?id=d1395c43c019aec6b855cf3c656bf47c8a719e7f
+
+Upstream-Status: Submitted
+---
+ gweb/gweb.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gweb/gweb.c b/gweb/gweb.c
+index 393afe0a..12fcb1d8 100644
+--- a/gweb/gweb.c
++++ b/gweb/gweb.c
+@@ -1274,7 +1274,8 @@ static bool is_ip_address(const char *host)
+ addr = NULL;
+
+ result = getaddrinfo(host, NULL, &hints, &addr);
+- freeaddrinfo(addr);
++ if(!result)
++ freeaddrinfo(addr);
+
+ return result == 0;
+ }
+--
+2.19.1
+
diff --git a/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch b/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
index 0593427710..639ccfa2a2 100644
--- a/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
+++ b/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
@@ -17,6 +17,14 @@ diff --git a/gweb/gresolv.c b/gweb/gresolv.c
index 5cf7a9a..3ad8e70 100644
--- a/gweb/gresolv.c
+++ b/gweb/gresolv.c
+@@ -36,6 +36,7 @@
+ #include <arpa/inet.h>
+ #include <arpa/nameser.h>
+ #include <net/if.h>
++#include <ctype.h>
+
+ #include "gresolv.h"
+
@@ -875,8 +875,6 @@ GResolv *g_resolv_new(int index)
resolv->index = index;
resolv->nameserver_list = NULL;
diff --git a/meta/recipes-connectivity/connman/connman/includes.patch b/meta/recipes-connectivity/connman/connman/includes.patch
deleted file mode 100644
index 55cb187931..0000000000
--- a/meta/recipes-connectivity/connman/connman/includes.patch
+++ /dev/null
@@ -1,423 +0,0 @@
-Fix various issues which cause problems under musl.
-
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 630516bcc0233b047f65665c003201ba6e77453d Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 9 Aug 2016 16:22:36 +0100
-Subject: [PATCH 1/3] Use AC_USE_SYSTEM_EXTENSIONS
-
-Instead of using #define _GNU_SOURCE in some source files which causes problems
-when building with musl as more files need the define, simply use
-AC_USE_SYSTEM_EXTENSIONS in configure.ac to get it defined globally.
----
- configure.ac | 1 +
- gdhcp/client.c | 1 -
- plugins/tist.c | 1 -
- src/backtrace.c | 1 -
- src/inet.c | 1 -
- src/log.c | 1 -
- src/ntp.c | 1 -
- src/resolver.c | 1 -
- src/rfkill.c | 1 -
- src/stats.c | 1 -
- src/timezone.c | 1 -
- tools/stats-tool.c | 1 -
- tools/tap-test.c | 1 -
- tools/wispr.c | 1 -
- vpn/plugins/vpn.c | 1 -
- 15 files changed, 1 insertion(+), 14 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 6e66ab3..bacf5ec 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -20,6 +20,7 @@ AC_SUBST(abs_top_srcdir)
- AC_SUBST(abs_top_builddir)
-
- AC_LANG_C
-+AC_USE_SYSTEM_EXTENSIONS
-
- AC_PROG_CC
- AM_PROG_CC_C_O
-diff --git a/gdhcp/client.c b/gdhcp/client.c
-index fbb40ab..3aeb089 100644
---- a/gdhcp/client.c
-+++ b/gdhcp/client.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <errno.h>
- #include <unistd.h>
-diff --git a/plugins/tist.c b/plugins/tist.c
-index ad5ef79..cc2800a 100644
---- a/plugins/tist.c
-+++ b/plugins/tist.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdbool.h>
- #include <stdlib.h>
-diff --git a/src/backtrace.c b/src/backtrace.c
-index 6a66c0a..4dbdda8 100644
---- a/src/backtrace.c
-+++ b/src/backtrace.c
-@@ -24,7 +24,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
-diff --git a/src/inet.c b/src/inet.c
-index 69ded19..81d92c2 100644
---- a/src/inet.c
-+++ b/src/inet.c
-@@ -25,7 +25,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <errno.h>
- #include <unistd.h>
-diff --git a/src/log.c b/src/log.c
-index 9bae4a3..f7e82e5 100644
---- a/src/log.c
-+++ b/src/log.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <unistd.h>
- #include <stdarg.h>
-diff --git a/src/ntp.c b/src/ntp.c
-index dd246eb..db8ae96 100644
---- a/src/ntp.c
-+++ b/src/ntp.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <errno.h>
- #include <fcntl.h>
- #include <unistd.h>
-diff --git a/src/resolver.c b/src/resolver.c
-index fbe4be7..ef61f92 100644
---- a/src/resolver.c
-+++ b/src/resolver.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <errno.h>
- #include <fcntl.h>
-diff --git a/src/rfkill.c b/src/rfkill.c
-index 2bfb092..af49d12 100644
---- a/src/rfkill.c
-+++ b/src/rfkill.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <errno.h>
- #include <fcntl.h>
-diff --git a/src/stats.c b/src/stats.c
-index 26343b1..cfcdc94 100644
---- a/src/stats.c
-+++ b/src/stats.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <errno.h>
- #include <sys/mman.h>
- #include <sys/types.h>
-diff --git a/src/timezone.c b/src/timezone.c
-index e346b11..8e91267 100644
---- a/src/timezone.c
-+++ b/src/timezone.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <errno.h>
- #include <stdio.h>
- #include <fcntl.h>
-diff --git a/tools/stats-tool.c b/tools/stats-tool.c
-index b076478..428d94b 100644
---- a/tools/stats-tool.c
-+++ b/tools/stats-tool.c
-@@ -22,7 +22,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <sys/mman.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-diff --git a/tools/tap-test.c b/tools/tap-test.c
-index fdc098a..57917f5 100644
---- a/tools/tap-test.c
-+++ b/tools/tap-test.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <errno.h>
- #include <fcntl.h>
-diff --git a/tools/wispr.c b/tools/wispr.c
-index d5f9341..e56dfc1 100644
---- a/tools/wispr.c
-+++ b/tools/wispr.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <fcntl.h>
- #include <unistd.h>
-diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c
-index 9a42385..479c3a7 100644
---- a/vpn/plugins/vpn.c
-+++ b/vpn/plugins/vpn.c
-@@ -23,7 +23,6 @@
- #include <config.h>
- #endif
-
--#define _GNU_SOURCE
- #include <string.h>
- #include <fcntl.h>
- #include <unistd.h>
---
-2.8.1
-
-
-From b8b7878e6cb2a1ed4fcfa256f7e232511a40e3d9 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 9 Aug 2016 15:37:50 +0100
-Subject: [PATCH 2/3] Check for in6_pktinfo.ipi6_addr explicitly
-
-Instead of assuming that just glibc has this structure, check for it at
-configure as musl also has it.
-
-Based on work by Khem Raj <raj.khem@gmail.com>.
----
- configure.ac | 2 ++
- gdhcp/common.h | 5 +++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index bacf5ec..ad00456 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -186,6 +186,8 @@ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
- AC_CHECK_HEADERS([execinfo.h])
- AM_CONDITIONAL([BACKTRACE], [test "${ac_cv_header_execinfo_h}" = "yes"])
-
-+AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include <netinet/in.h>]])
-+
- AC_CHECK_FUNC(signalfd, dummy=yes,
- AC_MSG_ERROR(signalfd support is required))
-
-diff --git a/gdhcp/common.h b/gdhcp/common.h
-index 75abc18..6899499 100644
---- a/gdhcp/common.h
-+++ b/gdhcp/common.h
-@@ -19,6 +19,7 @@
- *
- */
-
-+#include <config.h>
- #include <netinet/udp.h>
- #include <netinet/ip.h>
-
-@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths[] = {
- [OPTION_U32] = 4,
- };
-
--/* already defined within netinet/in.h if using GNU compiler */
--#ifndef __USE_GNU
-+/* already defined within netinet/in.h if using glibc or musl */
-+#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
- struct in6_pktinfo {
- struct in6_addr ipi6_addr; /* src/dst IPv6 address */
- unsigned int ipi6_ifindex; /* send/recv interface index */
---
-2.8.1
-
-
-From c0726e432fa0274a2b9c70179b03df6720972816 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 9 Aug 2016 15:19:23 +0100
-Subject: [PATCH 3/3] Rationalise includes
-
-gweb/gresolv.c uses snprintf() and isspace() so it should include stdio.h and
-ctype.h.
-
-tools/dnsproxy-test uses functions from stdio.h.
-
-musl warns when sys/ headers are included when the non-sys form should be used,
-so switch sys/errno.h and so on to errno.h.
-
-musl also causes redefinition errors when pieces of the networking headers are
-included, so remove the redundant includes.
-
-Based on work by Khem Raj <raj.khem@gmail.com>.
----
- gweb/gresolv.c | 2 ++
- plugins/wifi.c | 3 +--
- src/ippool.c | 1 -
- src/iptables.c | 2 +-
- src/tethering.c | 2 --
- tools/dhcp-test.c | 1 -
- tools/dnsproxy-test.c | 1 +
- tools/private-network-test.c | 2 +-
- tools/tap-test.c | 2 +-
- 9 files changed, 7 insertions(+), 9 deletions(-)
-
-diff --git a/gweb/gresolv.c b/gweb/gresolv.c
-index 8a51a9f..d55027c 100644
---- a/gweb/gresolv.c
-+++ b/gweb/gresolv.c
-@@ -23,11 +23,13 @@
- #include <config.h>
- #endif
-
-+#include <ctype.h>
- #include <errno.h>
- #include <unistd.h>
- #include <stdarg.h>
- #include <string.h>
- #include <stdlib.h>
-+#include <stdio.h>
- #include <resolv.h>
- #include <sys/types.h>
- #include <sys/socket.h>
-diff --git a/plugins/wifi.c b/plugins/wifi.c
-index 9d56671..148131d 100644
---- a/plugins/wifi.c
-+++ b/plugins/wifi.c
-@@ -30,9 +30,8 @@
- #include <string.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
--#include <linux/if_arp.h>
--#include <linux/wireless.h>
- #include <net/ethernet.h>
-+#include <linux/wireless.h>
-
- #ifndef IFF_LOWER_UP
- #define IFF_LOWER_UP 0x10000
-diff --git a/src/ippool.c b/src/ippool.c
-index cea1dcc..8a645da 100644
---- a/src/ippool.c
-+++ b/src/ippool.c
-@@ -28,7 +28,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
--#include <sys/errno.h>
- #include <sys/socket.h>
-
- #include "connman.h"
-diff --git a/src/iptables.c b/src/iptables.c
-index 5ef757a..82e3ac4 100644
---- a/src/iptables.c
-+++ b/src/iptables.c
-@@ -28,7 +28,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
--#include <sys/errno.h>
-+#include <errno.h>
- #include <sys/socket.h>
- #include <xtables.h>
- #include <inttypes.h>
-diff --git a/src/tethering.c b/src/tethering.c
-index 3153349..ad062d5 100644
---- a/src/tethering.c
-+++ b/src/tethering.c
-@@ -31,10 +31,8 @@
- #include <stdio.h>
- #include <sys/ioctl.h>
- #include <net/if.h>
--#include <linux/sockios.h>
- #include <string.h>
- #include <fcntl.h>
--#include <linux/if_tun.h>
- #include <netinet/in.h>
- #include <linux/if_bridge.h>
-
-diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
-index c34e10a..eae66fc 100644
---- a/tools/dhcp-test.c
-+++ b/tools/dhcp-test.c
-@@ -33,7 +33,6 @@
- #include <arpa/inet.h>
- #include <net/route.h>
- #include <net/ethernet.h>
--#include <linux/if_arp.h>
-
- #include <gdhcp/gdhcp.h>
-
-diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c
-index 551cae9..371e2e2 100644
---- a/tools/dnsproxy-test.c
-+++ b/tools/dnsproxy-test.c
-@@ -24,6 +24,7 @@
- #endif
-
- #include <errno.h>
-+#include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-diff --git a/tools/private-network-test.c b/tools/private-network-test.c
-index 3dd115b..2828bb3 100644
---- a/tools/private-network-test.c
-+++ b/tools/private-network-test.c
-@@ -32,7 +32,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <signal.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/signalfd.h>
- #include <unistd.h>
-
-diff --git a/tools/tap-test.c b/tools/tap-test.c
-index 57917f5..cb3ee62 100644
---- a/tools/tap-test.c
-+++ b/tools/tap-test.c
-@@ -28,7 +28,7 @@
- #include <fcntl.h>
- #include <unistd.h>
- #include <string.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/ioctl.h>
-
- #include <netinet/in.h>
---
-2.8.1
diff --git a/meta/recipes-connectivity/connman/connman_1.33.bb b/meta/recipes-connectivity/connman/connman_1.33.bb
deleted file mode 100644
index 6ea1a08dc1..0000000000
--- a/meta/recipes-connectivity/connman/connman_1.33.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require connman.inc
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
- file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
- file://connman \
- file://no-version-scripts.patch \
- file://includes.patch \
- "
-SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
-
-SRC_URI[md5sum] = "c51903fd3e7a6a371d12ac5d72a1fa01"
-SRC_URI[sha256sum] = "bc8946036fa70124d663136f9f6b6238d897ca482782df907b07a428b09df5a0"
-
-RRECOMMENDS_${PN} = "connman-conf"
diff --git a/meta/recipes-connectivity/connman/connman_1.37.bb b/meta/recipes-connectivity/connman/connman_1.37.bb
new file mode 100644
index 0000000000..00852bf0d6
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman_1.37.bb
@@ -0,0 +1,17 @@
+require connman.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+ file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
+ file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
+ file://0001-gweb-fix-segfault-with-musl-v1.1.21.patch \
+ file://connman \
+ file://no-version-scripts.patch \
+"
+
+SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
+
+SRC_URI[md5sum] = "75012084f14fb63a84b116e66c6e94fb"
+SRC_URI[sha256sum] = "6ce29b3eb0bb16a7387bc609c39455fd13064bdcde5a4d185fab3a0c71946e16"
+
+RRECOMMENDS_${PN} = "connman-conf"
+RCONFLICTS_${PN} = "networkmanager"
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
index aafdd0a13d..c4697beaf1 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -8,48 +8,57 @@ easier to administer devices."
HOMEPAGE = "http://www.isc.org/"
LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=c5c64d696107f84b56fe337d14da1753"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=004a4db50a1e20972e924a8618747c01"
DEPENDS = "openssl bind"
-SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
- file://define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \
+SRC_URI = "http://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
file://init-relay file://default-relay \
file://init-server file://default-server \
file://dhclient.conf file://dhcpd.conf \
+ file://dhclient-systemd-wrapper \
+ file://dhclient.service \
file://dhcpd.service file://dhcrelay.service \
file://dhcpd6.service \
- file://search-for-libxml2.patch "
-
-UPSTREAM_CHECK_URI = "ftp://ftp.isc.org/isc/dhcp/"
+ "
+UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/"
-inherit autotools systemd useradd update-rc.d
+inherit autotools-brokensep systemd useradd update-rc.d
USERADD_PACKAGES = "${PN}-server"
-USERADD_PARAM_${PN}-server = "--system --no-create-home --home-dir /var/run/${PN} --shell /bin/false --user-group ${PN}"
+USERADD_PARAM_${PN}-server = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}"
-SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay"
+SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay ${PN}-client"
SYSTEMD_SERVICE_${PN}-server = "dhcpd.service dhcpd6.service"
SYSTEMD_AUTO_ENABLE_${PN}-server = "disable"
SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service"
SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable"
+SYSTEMD_SERVICE_${PN}-client = "dhclient.service"
+SYSTEMD_AUTO_ENABLE_${PN}-client = "disable"
+
INITSCRIPT_PACKAGES = "dhcp-server"
INITSCRIPT_NAME_dhcp-server = "dhcp-server"
INITSCRIPT_PARAMS_dhcp-server = "defaults"
-TARGET_CFLAGS += "-D_GNU_SOURCE"
+CFLAGS += "-D_GNU_SOURCE"
EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
--with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
--with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
--with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \
- --with-libbind=${STAGING_LIBDIR}/ \
- --enable-paranoia \
+ --enable-paranoia --disable-static \
--with-randomdev=/dev/random \
+ --with-libbind=${STAGING_DIR_HOST} \
+ --enable-libtool \
"
+#Enable shared libs per dhcp README
+do_configure_prepend () {
+ cp configure.ac+lt configure.ac
+}
+
do_install_append () {
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/default
@@ -79,14 +88,21 @@ do_install_append () {
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
sed -i -e 's,@base_bindir@,${base_bindir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
- sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service
+ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service
+
+ install -d ${D}${base_sbindir}
+ install -m 0755 ${WORKDIR}/dhclient-systemd-wrapper ${D}${base_sbindir}/dhclient-systemd-wrapper
+ install -m 0644 ${WORKDIR}/dhclient.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhclient.service
+ sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/dhclient.service
}
-PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
+PACKAGES += "dhcp-libs dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
-FILES_${PN} = ""
+PACKAGES_remove = "${PN}"
RDEPENDS_${PN}-dev = ""
RDEPENDS_${PN}-staticdev = ""
+FILES_${PN}-libs = "${libdir}/libdhcpctl.so.0* ${libdir}/libomapi.so.0* ${libdir}/libdhcp.so.0*"
FILES_${PN}-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server"
RRECOMMENDS_${PN}-server = "dhcp-server-config"
@@ -95,7 +111,11 @@ FILES_${PN}-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhc
FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
-FILES_${PN}-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
+FILES_${PN}-client = "${base_sbindir}/dhclient \
+ ${base_sbindir}/dhclient-script \
+ ${sysconfdir}/dhcp/dhclient.conf \
+ ${base_sbindir}/dhclient-systemd-wrapper \
+ "
FILES_${PN}-omshell = "${bindir}/omshell"
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0001-Fix-a-NSUPDATE-compiling-issue.patch b/meta/recipes-connectivity/dhcp/dhcp/0001-Fix-a-NSUPDATE-compiling-issue.patch
new file mode 100644
index 0000000000..f12a112fcf
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0001-Fix-a-NSUPDATE-compiling-issue.patch
@@ -0,0 +1,68 @@
+From a59cb98a473caa2afd64d7ae368480b6e9f91b3f Mon Sep 17 00:00:00 2001
+From: Ming Liu <liu.ming50@gmail.com>
+Date: Tue, 14 May 2019 11:07:15 +0200
+Subject: [PATCH] Fix a NSUPDATE compiling issue
+
+Upstream-Status: Pending [Patch sent to: https://gitlab.isc.org/isc-projects/dhcp/issues/16]
+
+A following error was observed when NSUPDATE is not defined:
+| omapip/isclib.c: In function 'dns_client_init':
+| omapip/isclib.c:356:18: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'dnsclient'
+| if (dhcp_gbl_ctx.dnsclient == NULL) {
+| ^
+| omapip/isclib.c:363:24: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'dnsclient'
+| &dhcp_gbl_ctx.dnsclient,
+| ^
+| omapip/isclib.c:364:24: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'use_local4'
+| (dhcp_gbl_ctx.use_local4 ?
+| ^
+| omapip/isclib.c:365:25: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'local4_sockaddr'
+| &dhcp_gbl_ctx.local4_sockaddr
+| ^
+| omapip/isclib.c:367:24: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'use_local6'
+| (dhcp_gbl_ctx.use_local6 ?
+| ^
+| omapip/isclib.c:368:25: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'local6_sockaddr'
+| &dhcp_gbl_ctx.local6_sockaddr
+
+Fix it by adding NSUPDATE conditional checking.
+
+Signed-off-by: Ming Liu <liu.ming50@gmail.com>
+---
+ includes/omapip/isclib.h | 2 ++
+ omapip/isclib.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h
+index 538b927..6c20584 100644
+--- a/includes/omapip/isclib.h
++++ b/includes/omapip/isclib.h
+@@ -141,6 +141,8 @@ void isclib_cleanup(void);
+ void dhcp_signal_handler(int signal);
+ extern int shutdown_signal;
+
++#if defined (NSUPDATE)
+ isc_result_t dns_client_init();
++#endif
+
+ #endif /* ISCLIB_H */
+diff --git a/omapip/isclib.c b/omapip/isclib.c
+index db3b895..ce4b4a1 100644
+--- a/omapip/isclib.c
++++ b/omapip/isclib.c
+@@ -351,6 +351,7 @@ void dhcp_signal_handler(int signal) {
+ }
+ }
+
++#if defined (NSUPDATE)
+ isc_result_t dns_client_init() {
+ isc_result_t result;
+ if (dhcp_gbl_ctx.dnsclient == NULL) {
+@@ -387,3 +388,4 @@ isc_result_t dns_client_init() {
+
+ return ISC_R_SUCCESS;
+ }
++#endif
+--
+2.7.4
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch b/meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
new file mode 100644
index 0000000000..d1b57f0bb4
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
@@ -0,0 +1,27 @@
+From 7cc29144535a622fc671dc86eb1da65b0473a7c4 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 16:14:22 +0800
+Subject: [PATCH 01/11] define macro _PATH_DHCPD_CONF and _PATH_DHCLIENT_CONF
+
+Upstream-Status: Inappropriate [OE specific]
+
+Rebase to 4.3.6
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ includes/site.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: dhcp-4.4.1/includes/site.h
+===================================================================
+--- dhcp-4.4.1.orig/includes/site.h
++++ dhcp-4.4.1/includes/site.h
+@@ -148,7 +148,8 @@
+ /* Define this if you want the dhcpd.conf file to go somewhere other than
+ the default location. By default, it goes in /etc/dhcpd.conf. */
+
+-/* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */
++#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
++#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
+
+ /* Network API definitions. You do not need to choose one of these - if
+ you don't choose, one will be chosen for you in your system's config
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch b/meta/recipes-connectivity/dhcp/dhcp/0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch
new file mode 100644
index 0000000000..1bc1422475
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch
@@ -0,0 +1,79 @@
+From 8194daabfd590f17825f0c61e9534bee5c99cc86 Mon Sep 17 00:00:00 2001
+From: Thomas Markwalder <tmark@isc.org>
+Date: Fri, 14 Sep 2018 13:41:41 -0400
+Subject: [master] Added includes of new BIND9 compatibility headers
+
+ Merges in rt48072.
+
+Upstream-Status: Backport
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+
+diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h
+index 75a87ff6..538b927f 100644
+--- a/includes/omapip/isclib.h
++++ b/includes/omapip/isclib.h
+@@ -48,6 +48,9 @@
+ #include <string.h>
+ #include <netdb.h>
+
++#include <isc/boolean.h>
++#include <isc/int.h>
++
+ #include <isc/buffer.h>
+ #include <isc/lex.h>
+ #include <isc/lib.h>
+diff --git a/includes/omapip/result.h b/includes/omapip/result.h
+index 91243e1b..860298f6 100644
+--- a/includes/omapip/result.h
++++ b/includes/omapip/result.h
+@@ -26,6 +26,7 @@
+ #ifndef DHCP_RESULT_H
+ #define DHCP_RESULT_H 1
+
++#include <isc/boolean.h>
+ #include <isc/lang.h>
+ #include <isc/resultclass.h>
+ #include <isc/types.h>
+diff --git a/server/dhcpv6.c b/server/dhcpv6.c
+index a7110f98..cde4f617 100644
+--- a/server/dhcpv6.c
++++ b/server/dhcpv6.c
+@@ -1034,7 +1034,8 @@ void check_pool6_threshold(struct reply_state *reply,
+ shared_name,
+ inet_ntop(AF_INET6, &lease->addr,
+ tmp_addr, sizeof(tmp_addr)),
+- used, count);
++ (long long unsigned)(used),
++ (long long unsigned)(count));
+ }
+ return;
+ }
+@@ -1066,7 +1067,8 @@ void check_pool6_threshold(struct reply_state *reply,
+ "address: %s; high threshold %d%% %llu/%llu.",
+ shared_name,
+ inet_ntop(AF_INET6, &lease->addr, tmp_addr, sizeof(tmp_addr)),
+- poolhigh, used, count);
++ poolhigh, (long long unsigned)(used),
++ (long long unsigned)(count));
+
+ /* handle the low threshold now, if we don't
+ * have one we default to 0. */
+@@ -1436,12 +1438,15 @@ pick_v6_address(struct reply_state *reply)
+ log_debug("Unable to pick client address: "
+ "no addresses available - shared network %s: "
+ " 2^64-1 < total, %llu active, %llu abandoned",
+- shared_name, active - abandoned, abandoned);
++ shared_name, (long long unsigned)(active - abandoned),
++ (long long unsigned)(abandoned));
+ } else {
+ log_debug("Unable to pick client address: "
+ "no addresses available - shared network %s: "
+ "%llu total, %llu active, %llu abandoned",
+- shared_name, total, active - abandoned, abandoned);
++ shared_name, (long long unsigned)(total),
++ (long long unsigned)(active - abandoned),
++ (long long unsigned)(abandoned));
+ }
+
+ return ISC_R_NORESOURCES;
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch b/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch
deleted file mode 100644
index 47443a50ef..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Subject: [PATCH] site.h: enable gentle shutdown
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- includes/site.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/includes/site.h b/includes/site.h
-index 1dd1251..abb66e4 100644
---- a/includes/site.h
-+++ b/includes/site.h
-@@ -289,7 +289,7 @@
- situations. We plan to revisit this feature and may
- make non-backwards compatible changes including the
- removal of this define. Use at your own risk. */
--/* #define ENABLE_GENTLE_SHUTDOWN */
-+#define ENABLE_GENTLE_SHUTDOWN
-
- /* Include old error codes. This is provided in case you
- are building an external program similar to omshell for
---
-2.8.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch b/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch
new file mode 100644
index 0000000000..2359381b93
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch
@@ -0,0 +1,65 @@
+From eec0503cfc36f63d777f5cb3f2719cecedcb8468 Mon Sep 17 00:00:00 2001
+From: Haris Okanovic <haris.okanovic@ni.com>
+Date: Mon, 7 Jan 2019 13:22:09 -0600
+Subject: [PATCH] Workaround busybox limitation in Linux dhclient-script
+
+Busybox is a lightweight implementation of coreutils commonly used on
+space-constrained embedded Linux distributions. It's implementation of
+chown and chmod doesn't provide a "--reference" option added to
+client/scripts/linux as of commit 9261cb14. This change works around
+that limitation by using stat to read ownership and permissions flags
+and simple chown/chmod calls supported in both coreutils and busybox.
+
+ modified: client/scripts/linux
+
+Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
+Upstream-Status: Pending [ISC-Bugs #48771]
+---
+ client/scripts/linux | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/client/scripts/linux b/client/scripts/linux
+index 0c429697..2435a44b 100755
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -32,6 +32,17 @@
+ # if your system holds ip tool in a non-standard location.
+ ip=/sbin/ip
+
++chown_chmod_by_reference() {
++ local reference_file="$1"
++ local target_file="$2"
++
++ local owner=$(stat -c "%u:%g" "$reference_file")
++ local perm=$(stat -c "%a" "$reference_file")
++
++ chown "$owner" "$target_file"
++ chmod "$perm" "$target_file"
++}
++
+ # update /etc/resolv.conf based on received values
+ # This updated version mostly follows Debian script by Andrew Pollock et al.
+ make_resolv_conf() {
+@@ -74,8 +85,7 @@ make_resolv_conf() {
+ fi
+
+ if [ -f /etc/resolv.conf ]; then
+- chown --reference=/etc/resolv.conf $new_resolv_conf
+- chmod --reference=/etc/resolv.conf $new_resolv_conf
++ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf
+ fi
+ mv -f $new_resolv_conf /etc/resolv.conf
+ # DHCPv6
+@@ -101,8 +111,7 @@ make_resolv_conf() {
+ fi
+
+ if [ -f /etc/resolv.conf ]; then
+- chown --reference=/etc/resolv.conf $new_resolv_conf
+- chmod --reference=/etc/resolv.conf $new_resolv_conf
++ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf
+ fi
+ mv -f $new_resolv_conf /etc/resolv.conf
+ fi
+--
+2.20.0
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch b/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch
new file mode 100644
index 0000000000..101c33f677
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch
@@ -0,0 +1,117 @@
+From be7540d31c356e80ee02e90e8bf162b7ac6e5ba5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 14:56:56 +0800
+Subject: [PATCH 02/11] dhclient dbus
+
+Upstream-Status: Inappropriate [distribution]
+
+Rebase to 4.3.6
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/scripts/bsdos | 5 +++++
+ client/scripts/freebsd | 5 +++++
+ client/scripts/linux | 5 +++++
+ client/scripts/netbsd | 5 +++++
+ client/scripts/openbsd | 5 +++++
+ client/scripts/solaris | 5 +++++
+ 6 files changed, 30 insertions(+)
+
+diff --git a/client/scripts/bsdos b/client/scripts/bsdos
+index d69d0d8..095b143 100755
+--- a/client/scripts/bsdos
++++ b/client/scripts/bsdos
+@@ -45,6 +45,11 @@ exit_with_hooks() {
+ . /etc/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+diff --git a/client/scripts/freebsd b/client/scripts/freebsd
+index 8f3e2a2..ad7fb44 100755
+--- a/client/scripts/freebsd
++++ b/client/scripts/freebsd
+@@ -89,6 +89,11 @@ exit_with_hooks() {
+ . /etc/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+diff --git a/client/scripts/linux b/client/scripts/linux
+index 5fb1612..3d447b6 100755
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -174,6 +174,11 @@ exit_with_hooks() {
+ exit_status=$?
+ fi
+
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+diff --git a/client/scripts/netbsd b/client/scripts/netbsd
+index 07383b7..aaba8e8 100755
+--- a/client/scripts/netbsd
++++ b/client/scripts/netbsd
+@@ -45,6 +45,11 @@ exit_with_hooks() {
+ . /etc/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+diff --git a/client/scripts/openbsd b/client/scripts/openbsd
+index e7f4746..56b980c 100644
+--- a/client/scripts/openbsd
++++ b/client/scripts/openbsd
+@@ -45,6 +45,11 @@ exit_with_hooks() {
+ . /etc/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+diff --git a/client/scripts/solaris b/client/scripts/solaris
+index af553b9..4a2aa69 100755
+--- a/client/scripts/solaris
++++ b/client/scripts/solaris
+@@ -26,6 +26,11 @@ exit_with_hooks() {
+ . /etc/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--
+1.8.3.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch b/meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch
new file mode 100644
index 0000000000..5b35933a54
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch
@@ -0,0 +1,35 @@
+From d80bd792323dbd56269309f85b4506eb6b1b60e9 Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Tue, 15 Aug 2017 15:05:47 +0800
+Subject: [PATCH 03/11] link with lcrypto
+
+From 4.2.0 final release, -lcrypto check was removed and we compile
+static libraries
+from bind that are linked to libcrypto. This is why i added a patch in
+order to add
+-lcrypto to LIBS.
+
+Upstream-Status: Pending
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+Rebase to 4.3.6
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+Index: dhcp-4.4.1/configure.ac
+===================================================================
+--- dhcp-4.4.1.orig/configure.ac
++++ dhcp-4.4.1/configure.ac
+@@ -612,6 +612,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
+ # Look for optional headers.
+ AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
+
++# find an MD5 library
++AC_SEARCH_LIBS(MD5_Init, [crypto])
++AC_SEARCH_LIBS(MD5Init, [crypto])
++
+ # Solaris needs some libraries for functions
+ AC_SEARCH_LIBS(socket, [socket])
+ AC_SEARCH_LIBS(inet_ntoa, [nsl])
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch b/meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch
new file mode 100644
index 0000000000..b71c93dd6d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch
@@ -0,0 +1,93 @@
+From cccec0344d68dac4100b6f260ee24e7c2da9dfda Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 15:08:22 +0800
+Subject: [PATCH 04/11] Fix out of tree builds
+
+Upstream-Status: Pending
+
+RP 2013/03/21
+
+Rebase to 4.3.6
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/Makefile.am | 4 ++--
+ common/Makefile.am | 3 ++-
+ dhcpctl/Makefile.am | 2 ++
+ omapip/Makefile.am | 1 +
+ relay/Makefile.am | 2 +-
+ server/Makefile.am | 2 +-
+ 6 files changed, 9 insertions(+), 5 deletions(-)
+
+Index: dhcp-4.4.1/common/Makefile.am
+===================================================================
+--- dhcp-4.4.1.orig/common/Makefile.am
++++ dhcp-4.4.1/common/Makefile.am
+@@ -1,4 +1,5 @@
+-AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
++AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
++
+ AM_CFLAGS = $(LDAP_CFLAGS)
+
+ lib_LIBRARIES = libdhcp.a
+Index: dhcp-4.4.1/dhcpctl/Makefile.am
+===================================================================
+--- dhcp-4.4.1.orig/dhcpctl/Makefile.am
++++ dhcp-4.4.1/dhcpctl/Makefile.am
+@@ -3,6 +3,8 @@ BINDLIBDNSDIR=@BINDLIBDNSDIR@
+ BINDLIBISCCFGDIR=@BINDLIBISCCFGDIR@
+ BINDLIBISCDIR=@BINDLIBISCDIR@
+
++AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
++
+ bin_PROGRAMS = omshell
+ lib_LIBRARIES = libdhcpctl.a
+ noinst_PROGRAMS = cltest
+Index: dhcp-4.4.1/server/Makefile.am
+===================================================================
+--- dhcp-4.4.1.orig/server/Makefile.am
++++ dhcp-4.4.1/server/Makefile.am
+@@ -4,7 +4,7 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
+
+-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
++AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
+
+ dist_sysconf_DATA = dhcpd.conf.example
+ sbin_PROGRAMS = dhcpd
+Index: dhcp-4.4.1/client/Makefile.am
+===================================================================
+--- dhcp-4.4.1.orig/client/Makefile.am
++++ dhcp-4.4.1/client/Makefile.am
+@@ -5,7 +5,7 @@
+ SUBDIRS = . tests
+
+ AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"'
+-AM_CPPFLAGS += -DLOCALSTATEDIR='"$(localstatedir)"'
++AM_CPPFLAGS += -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes
+
+ dist_sysconf_DATA = dhclient.conf.example
+ sbin_PROGRAMS = dhclient
+Index: dhcp-4.4.1/omapip/Makefile.am
+===================================================================
+--- dhcp-4.4.1.orig/omapip/Makefile.am
++++ dhcp-4.4.1/omapip/Makefile.am
+@@ -2,6 +2,7 @@ BINDLIBIRSDIR=@BINDLIBIRSDIR@
+ BINDLIBDNSDIR=@BINDLIBDNSDIR@
+ BINDLIBISCCFGDIR=@BINDLIBISCCFGDIR@
+ BINDLIBISCDIR=@BINDLIBISCDIR@
++AM_CPPFLAGS = -I$(top_srcdir)/includes
+
+ lib_LIBRARIES = libomapi.a
+ noinst_PROGRAMS = svtest
+Index: dhcp-4.4.1/relay/Makefile.am
+===================================================================
+--- dhcp-4.4.1.orig/relay/Makefile.am
++++ dhcp-4.4.1/relay/Makefile.am
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
++AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
+
+ sbin_PROGRAMS = dhcrelay
+ dhcrelay_SOURCES = dhcrelay.c
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch b/meta/recipes-connectivity/dhcp/dhcp/0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch
new file mode 100644
index 0000000000..dd56381b1d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch
@@ -0,0 +1,36 @@
+From 2e8ff0e4f6d39e346ea86b8c514ab4ccc78fa359 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 15:24:14 +0800
+Subject: [PATCH 05/11] dhcp-client: fix invoke dhclient-script failed on
+ Read-only file system
+
+In read-only file system, '/etc' is on the readonly partition,
+and '/etc/resolv.conf' is symlinked to a separate writable
+partition.
+
+In this situation, we create temp files 'resolv.conf.dhclient-new'
+in /tmp dir.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/scripts/linux | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/client/scripts/linux b/client/scripts/linux
+index 3d447b6..3122a75 100755
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -40,7 +40,7 @@ make_resolv_conf() {
+ # DHCPv4
+ if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] ||
+ [ -n "$new_domain_name_servers" ]; then
+- new_resolv_conf=/etc/resolv.conf.dhclient-new
++ new_resolv_conf=/tmp/resolv.conf.dhclient-new
+ rm -f $new_resolv_conf
+
+ if [ -n "$new_domain_name" ]; then
+--
+1.8.3.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch b/meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch
new file mode 100644
index 0000000000..feb0754fff
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch
@@ -0,0 +1,62 @@
+From 7107511fd209f08f9a96f8938041ae48f3295895 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 15 Aug 2017 16:17:49 +0800
+Subject: [PATCH 07/11] Add configure argument to make the libxml2 dependency
+ explicit and determinisitic.
+
+Upstream-Status: Pending
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+Rebase to 4.3.6
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+Index: dhcp-4.4.1/configure.ac
+===================================================================
+--- dhcp-4.4.1.orig/configure.ac
++++ dhcp-4.4.1/configure.ac
+@@ -642,6 +642,17 @@ if test "$have_nanosleep" = "rt"; then
+ LIBS="-lrt $LIBS"
+ fi
+
++AC_ARG_WITH(libxml2,
++ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
++ with_libxml2="$withval", with_libxml2="no")
++
++if test x$with_libxml2 != xno; then
++ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
++ [if test x$with_libxml2 != xauto; then
++ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
++ fi])
++fi
++
+ # check for /dev/random (declares HAVE_DEV_RANDOM)
+ AC_MSG_CHECKING(for random device)
+ AC_ARG_WITH(randomdev,
+Index: dhcp-4.4.1/configure.ac+lt
+===================================================================
+--- dhcp-4.4.1.orig/configure.ac+lt
++++ dhcp-4.4.1/configure.ac+lt
+@@ -909,6 +909,18 @@ elif test "$want_libtool" = "yes" -a "$u
+ fi
+ AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes")
+
++AC_ARG_WITH(libxml2,
++ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
++ with_libxml2="$withval", with_libxml2="no")
++
++if test x$with_libxml2 != xno; then
++ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
++ [if test x$with_libxml2 != xauto; then
++ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
++ fi])
++fi
++
++
+ # OpenLDAP support.
+ AC_ARG_WITH(ldap,
+ AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0009-remove-dhclient-script-bash-dependency.patch b/meta/recipes-connectivity/dhcp/dhcp/0009-remove-dhclient-script-bash-dependency.patch
new file mode 100644
index 0000000000..912b6d6312
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0009-remove-dhclient-script-bash-dependency.patch
@@ -0,0 +1,28 @@
+From f3f8b7726e50e24ef3edf5fa5a17e31d39118d7e Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 15 Aug 2017 15:49:31 +0800
+Subject: [PATCH 09/11] remove dhclient-script bash dependency
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+Rebase to 4.3.6
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/scripts/linux | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/client/scripts/linux b/client/scripts/linux
+index 3122a75..1712d7d 100755
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # dhclient-script for Linux. Dan Halbert, March, 1997.
+ # Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
+ # No guarantees about this. I'm a novice at the details of Linux
+--
+1.8.3.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch b/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
new file mode 100644
index 0000000000..39ba65fbc4
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
@@ -0,0 +1,34 @@
+From 501543b3ef715488a142e3d301ff2733aa33eec7 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_belal@mentor.com>
+Date: Wed, 25 Oct 2017 21:00:05 +0500
+Subject: [PATCH] dhcp: correct the intention for xml2 lib search
+
+A missing case breaks the build when libxml2 is
+required and found appropriately. The third argument
+to the function AC_SEARCH_LIB is action-if-found which
+was mistakenly been used for the case where the library
+is not found and hence breaks the configure phase
+where it shoud actually pass.
+We now pass on silently when action-if-found is
+executed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Awais Belal <awais_belal@mentor.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: dhcp-4.4.1/configure.ac
+===================================================================
+--- dhcp-4.4.1.orig/configure.ac
++++ dhcp-4.4.1/configure.ac
+@@ -647,7 +647,7 @@ AC_ARG_WITH(libxml2,
+ with_libxml2="$withval", with_libxml2="no")
+
+ if test x$with_libxml2 != xno; then
+- AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
++ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
+ [if test x$with_libxml2 != xauto; then
+ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
+ fi])
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch b/meta/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch
new file mode 100644
index 0000000000..fcec010bd0
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch
@@ -0,0 +1,64 @@
+lib and include path is hardcoded for use_libbind
+
+use libdir and includedir vars
+
+Upstream-Status: Pending
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: dhcp-4.4.1/configure.ac+lt
+===================================================================
+--- dhcp-4.4.1.orig/configure.ac+lt
++++ dhcp-4.4.1/configure.ac+lt
+@@ -801,22 +801,22 @@ no)
+ if test ! -d "$use_libbind"; then
+ AC_MSG_ERROR([Cannot find bind directory at $use_libbind])
+ fi
+- if test ! -d "$use_libbind/include" -o \
+- ! -f "$use_libbind/include/isc/buffer.h"
++ if test ! -d "$use_libbind/$includedir" -o \
++ ! -f "$use_libbind/$includedir/isc/buffer.h"
+ then
+- AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include])
++ AC_MSG_ERROR([Cannot find bind includes at $use_libbind/$includedir])
+ fi
+- if test ! -d "$use_libbind/lib" -o \
+- \( ! -f "$use_libbind/lib/libisc.a" -a \
+- ! -f "$use_libbind/lib/libisc.la" \)
++ if test ! -d "$use_libbind/$libdir" -o \
++ \( ! -f "$use_libbind/$libdir/libisc.a" -a \
++ ! -f "$use_libbind/$libdir/libisc.la" \)
+ then
+- AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib])
++ AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/$libdir])
+ fi
+ BINDDIR="$use_libbind"
+- BINDLIBIRSDIR="$BINDDIR/lib"
+- BINDLIBDNSDIR="$BINDDIR/lib"
+- BINDLIBISCCFGDIR="$BINDDIR/lib"
+- BINDLIBISCDIR="$BINDDIR/lib"
++ BINDLIBIRSDIR="$BINDDIR/$libdir"
++ BINDLIBDNSDIR="$BINDDIR/$libdir"
++ BINDLIBISCCFGDIR="$BINDDIR/$libdir"
++ BINDLIBISCDIR="$BINDDIR/$libdir"
+ DISTCHECK_LIBBIND_CONFIGURE_FLAG="--with-libbind=$use_libbind"
+ ;;
+ esac
+@@ -856,14 +856,14 @@ AC_ARG_ENABLE(libtool,
+
+ if test "$use_libbind" != "no"; then
+ if test "$want_libtool" = "yes" -a \
+- ! -f "$use_libbind/lib/libisc.la"
++ ! -f "$use_libbind/$libdir/libisc.la"
+ then
+- AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib])
++ AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/$libdir])
+ fi
+ if test "$want_libtool" = "no" -a \
+- ! -f "$use_libbind/lib/libisc.a"
++ ! -f "$use_libbind/$libdir/libisc.a"
+ then
+- AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib])
++ AC_MSG_ERROR([Cannot find static libraries at $use_libbind/$libdir])
+ fi
+ fi
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch b/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
deleted file mode 100644
index 32bdaf08e7..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-define macro _PATH_DHCPD_CONF and _PATH_DHCLIENT_CONF
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- includes/site.h | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/includes/site.h b/includes/site.h
-index d87b309..17bc40d 100644
---- a/includes/site.h
-+++ b/includes/site.h
-@@ -139,7 +139,8 @@
- /* Define this if you want the dhcpd.conf file to go somewhere other than
- the default location. By default, it goes in /etc/dhcpd.conf. */
-
--/* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */
-+#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
-+#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
-
- /* Network API definitions. You do not need to choose one of these - if
- you don't choose, one will be chosen for you in your system's config
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch b/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch
deleted file mode 100644
index 96095a5e08..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-dhcp-client: fix invoke dhclient-script failed on Read-only file system
-
-In read-only file system, '/etc' is on the readonly partition,
-and '/etc/resolv.conf' is symlinked to a separate writable
-partition.
-
-In this situation, we should use shell variable to instead of
-temp files '/etc/resolv.conf.dhclient' and '/etc/resolv.conf.dhclient6'.
-
-Upstream-Status: Pending
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- client/scripts/linux | 20 +++++++++-----------
- 1 file changed, 9 insertions(+), 11 deletions(-)
-
-diff --git a/client/scripts/linux b/client/scripts/linux
---- a/client/scripts/linux
-+++ b/client/scripts/linux
-@@ -27,27 +27,25 @@ ip=/sbin/ip
-
- make_resolv_conf() {
- if [ x"$new_domain_name_servers" != x ]; then
-- cat /dev/null > /etc/resolv.conf.dhclient
-- chmod 644 /etc/resolv.conf.dhclient
-+ resolv_conf=""
- if [ x"$new_domain_search" != x ]; then
-- echo search $new_domain_search >> /etc/resolv.conf.dhclient
-+ resolv_conf="search ${new_domain_search}\n"
- elif [ x"$new_domain_name" != x ]; then
- # Note that the DHCP 'Domain Name Option' is really just a domain
- # name, and that this practice of using the domain name option as
- # a search path is both nonstandard and deprecated.
-- echo search $new_domain_name >> /etc/resolv.conf.dhclient
-+ resolv_conf="search ${new_domain_name}\n"
- fi
- for nameserver in $new_domain_name_servers; do
-- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
-+ resolv_conf="${resolv_conf}nameserver ${nameserver}\n"
- done
-
-- mv /etc/resolv.conf.dhclient /etc/resolv.conf
-+ echo -e "${resolv_conf}" > /etc/resolv.conf
- elif [ "x${new_dhcp6_name_servers}" != x ] ; then
-- cat /dev/null > /etc/resolv.conf.dhclient6
-- chmod 644 /etc/resolv.conf.dhclient6
-+ resolv_conf=""
-
- if [ "x${new_dhcp6_domain_search}" != x ] ; then
-- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
-+ resolv_conf="search ${new_dhcp6_domain_search}\n"
- fi
- shopt -s nocasematch
- for nameserver in ${new_dhcp6_name_servers} ; do
-@@ -59,11 +57,11 @@ make_resolv_conf() {
- else
- zone_id=
- fi
-- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
-+ resolv_conf="${resolv_conf}nameserver ${nameserver}$zone_id\n"
- done
- shopt -u nocasematch
-
-- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
-+ echo -e "${resolv_conf}" > /etc/resolv.conf
- fi
- }
-
---
-2.8.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch b/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch
deleted file mode 100644
index b4a666d106..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-Upstream-Status: Inappropriate [distribution]
-
---- client/scripts/bsdos
-+++ client/scripts/bsdos
-@@ -47,6 +47,11 @@
- . /etc/dhcp/dhclient-exit-hooks
- fi
- # probably should do something with exit status of the local script
-+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
-+ dbus-send --system --dest=com.redhat.dhcp \
-+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
-+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
-+ fi
- exit $exit_status
- }
-
---- client/scripts/freebsd
-+++ client/scripts/freebsd
-@@ -57,6 +57,11 @@
- . /etc/dhcp/dhclient-exit-hooks
- fi
- # probably should do something with exit status of the local script
-+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
-+ dbus-send --system --dest=com.redhat.dhcp \
-+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
-+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
-+ fi
- exit $exit_status
- }
-
---- client/scripts/linux
-+++ client/scripts/linux
-@@ -69,6 +69,11 @@
- . /etc/dhcp/dhclient-exit-hooks
- fi
- # probably should do something with exit status of the local script
-+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
-+ dbus-send --system --dest=com.redhat.dhcp \
-+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
-+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
-+ fi
- exit $exit_status
- }
-
---- client/scripts/netbsd
-+++ client/scripts/netbsd
-@@ -47,6 +47,11 @@
- . /etc/dhcp/dhclient-exit-hooks
- fi
- # probably should do something with exit status of the local script
-+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
-+ dbus-send --system --dest=com.redhat.dhcp \
-+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
-+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
-+ fi
- exit $exit_status
- }
-
---- client/scripts/openbsd
-+++ client/scripts/openbsd
-@@ -47,6 +47,11 @@
- . /etc/dhcp/dhclient-exit-hooks
- fi
- # probably should do something with exit status of the local script
-+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
-+ dbus-send --system --dest=com.redhat.dhcp \
-+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
-+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
-+ fi
- exit $exit_status
- }
-
---- client/scripts/solaris
-+++ client/scripts/solaris
-@@ -47,6 +47,11 @@
- . /etc/dhcp/dhclient-exit-hooks
- fi
- # probably should do something with exit status of the local script
-+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
-+ dbus-send --system --dest=com.redhat.dhcp \
-+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
-+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
-+ fi
- exit $exit_status
- }
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
deleted file mode 100644
index 2f44147ad6..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-Fix out of tree builds
-
-Upstream-Status: Pending
-
-RP 2013/03/21
-
-Rebase to 4.3.4
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- client/Makefile.am | 4 ++--
- common/Makefile.am | 3 ++-
- dhcpctl/Makefile.am | 2 ++
- omapip/Makefile.am | 1 +
- relay/Makefile.am | 2 +-
- server/Makefile.am | 2 +-
- 6 files changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/client/Makefile.am b/client/Makefile.am
-index 2cb83d8..4730bb3 100644
---- a/client/Makefile.am
-+++ b/client/Makefile.am
-@@ -7,11 +7,11 @@ SUBDIRS = . tests
- BINDLIBDIR = @BINDDIR@/lib
-
- AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
-- -DLOCALSTATEDIR='"$(localstatedir)"'
-+ -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes
-
- dist_sysconf_DATA = dhclient.conf.example
- sbin_PROGRAMS = dhclient
--dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
-+dhclient_SOURCES = $(srcdir)/clparse.c $(srcdir)/dhclient.c $(srcdir)/dhc6.c \
- scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
- scripts/netbsd scripts/nextstep scripts/openbsd \
- scripts/solaris scripts/openwrt
-diff --git a/common/Makefile.am b/common/Makefile.am
-index 113aee8..0f24fbb 100644
---- a/common/Makefile.am
-+++ b/common/Makefile.am
-@@ -1,4 +1,5 @@
--AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
-+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
-+
- AM_CFLAGS = $(LDAP_CFLAGS)
-
- noinst_LIBRARIES = libdhcp.a
-diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
-index ceb0de1..ba8dd8b 100644
---- a/dhcpctl/Makefile.am
-+++ b/dhcpctl/Makefile.am
-@@ -1,5 +1,7 @@
- BINDLIBDIR = @BINDDIR@/lib
-
-+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
-+
- bin_PROGRAMS = omshell
- lib_LIBRARIES = libdhcpctl.a
- noinst_PROGRAMS = cltest
-diff --git a/omapip/Makefile.am b/omapip/Makefile.am
-index 446a594..dd1afa0 100644
---- a/omapip/Makefile.am
-+++ b/omapip/Makefile.am
-@@ -1,4 +1,5 @@
- BINDLIBDIR = @BINDDIR@/lib
-+AM_CPPFLAGS = -I$(top_srcdir)/includes
-
- lib_LIBRARIES = libomapi.a
- noinst_PROGRAMS = svtest
-diff --git a/relay/Makefile.am b/relay/Makefile.am
-index 3060eca..6d652f6 100644
---- a/relay/Makefile.am
-+++ b/relay/Makefile.am
-@@ -1,6 +1,6 @@
- BINDLIBDIR = @BINDDIR@/lib
-
--AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
-+AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
-
- sbin_PROGRAMS = dhcrelay
- dhcrelay_SOURCES = dhcrelay.c
-diff --git a/server/Makefile.am b/server/Makefile.am
-index 54feedf..3990b9c 100644
---- a/server/Makefile.am
-+++ b/server/Makefile.am
-@@ -6,7 +6,7 @@ SUBDIRS = . tests
-
- BINDLIBDIR = @BINDDIR@/lib
-
--AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
-+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
-
- dist_sysconf_DATA = dhcpd.conf.example
- sbin_PROGRAMS = dhcpd
---
-2.8.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/libxml2-configure-argument.patch b/meta/recipes-connectivity/dhcp/dhcp/libxml2-configure-argument.patch
deleted file mode 100644
index 14356621c0..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/libxml2-configure-argument.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Add configure argument to make the libxml2 dependency explicit and
-determinisitic.
-
-Upstream-Status: Pending
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-
-Rebase to 4.3.4
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- configure.ac | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 726c88e..1684df1 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -718,7 +718,16 @@ AC_SUBST(BINDSRCDIR)
-
- # We need to find libxml2 if bind was built with support enabled
- # otherwise we'll fail to build omapip/test.c
--AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],)
-+AC_ARG_WITH(libxml2,
-+ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
-+ with_libxml2="$withval", with_libxml2="no")
-+
-+if test x$with_libxml2 != xno; then
-+ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
-+ [if test x$with_libxml2 != xauto; then
-+ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
-+ fi])
-+fi
-
- # OpenLDAP support.
- AC_ARG_WITH(ldap,
---
-2.8.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch b/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
deleted file mode 100644
index 0d0e0dd08e..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Andrei Gherzan <andrei@gherzan.ro>
-Date: Thu Feb 2 23:59:11 2012 +0200
-
-From 4.2.0 final release, -lcrypto check was removed and we compile static libraries
-from bind that are linked to libcrypto. This is why i added a patch in order to add
--lcrypto to LIBS.
-
-Upstream-Status: Pending
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Rebase to 4.3.4
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- configure.ac | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 097b0c3..726c88e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -584,6 +584,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn));
- # Look for optional headers.
- AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
-
-+# find an MD5 library
-+AC_SEARCH_LIBS(MD5_Init, [crypto])
-+AC_SEARCH_LIBS(MD5Init, [crypto])
-+
- # Solaris needs some libraries for functions
- AC_SEARCH_LIBS(socket, [socket])
- AC_SEARCH_LIBS(inet_ntoa, [nsl])
---
-2.8.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch b/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch
deleted file mode 100644
index 997b9f6ba9..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 8aed2a9ff09cb0d584ad0a7340fe3a596879d9b1 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Thu, 21 Jul 2016 19:07:02 -0700
-Subject: [PATCH] remove dhclient-script bash dependency
-
-Take the dash compatible IPv6 link-local address test from the Debian
-version of dhclient-script.
-
-Note that although "echo -e" in the OE version of dhclient-script is
-technically bash specific too, it is supported by Busybox echo when
-Busybox is configured with CONFIG_FEATURE_FANCY_ECHO enabled (which
-is the default in the OE Busybox defconfig) therefore leave as-is.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- client/scripts/linux | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/client/scripts/linux b/client/scripts/linux
-index 232a0aa..1383f46 100755
---- a/client/scripts/linux
-+++ b/client/scripts/linux
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- # dhclient-script for Linux. Dan Halbert, March, 1997.
- # Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
- # No guarantees about this. I'm a novice at the details of Linux
-@@ -47,11 +47,11 @@ make_resolv_conf() {
- if [ "x${new_dhcp6_domain_search}" != x ] ; then
- resolv_conf="search ${new_dhcp6_domain_search}\n"
- fi
-- shopt -s nocasematch
- for nameserver in ${new_dhcp6_name_servers} ; do
- # If the nameserver has a link-local address
- # add a <zone_id> (interface name) to it.
-- if [[ "$nameserver" =~ ^fe80:: ]]
-+ if [ "${nameserver##fe80::}" != "$nameserver" ] ||
-+ [ "${nameserver##FE80::}" != "$nameserver" ]
- then
- zone_id="%$interface"
- else
-@@ -59,7 +59,6 @@ make_resolv_conf() {
- fi
- resolv_conf="${resolv_conf}nameserver ${nameserver}$zone_id\n"
- done
-- shopt -u nocasematch
-
- echo -e "${resolv_conf}" > /etc/resolv.conf
- fi
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch b/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
deleted file mode 100644
index d84df5cd34..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-Found this patch here:
-https://lists.isc.org/pipermail/dhcp-users/2011-January/012910.html
-
-and made some adjustments/updates to make it work with this version.
-Wasn't able to find that why this patch was not accepted by ISC DHCP developers.
-
-Upstream-Status: Pending
-
-Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
-
-Rebase to 4.3.4
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- client/scripts/linux | 82 ++++++++++++++++++++++++++++------------------------
- 1 file changed, 45 insertions(+), 37 deletions(-)
-
-diff --git a/client/scripts/linux b/client/scripts/linux
-index a02cfd9..232a0aa 100755
---- a/client/scripts/linux
-+++ b/client/scripts/linux
-@@ -101,17 +101,11 @@ fi
- if [ x$old_broadcast_address != x ]; then
- old_broadcast_arg="broadcast $old_broadcast_address"
- fi
--if [ x$new_subnet_mask != x ]; then
-- new_subnet_arg="netmask $new_subnet_mask"
-+if [ -n "$new_subnet_mask" ]; then
-+ new_mask="/$new_subnet_mask"
- fi
--if [ x$old_subnet_mask != x ]; then
-- old_subnet_arg="netmask $old_subnet_mask"
--fi
--if [ x$alias_subnet_mask != x ]; then
-- alias_subnet_arg="netmask $alias_subnet_mask"
--fi
--if [ x$new_interface_mtu != x ]; then
-- mtu_arg="mtu $new_interface_mtu"
-+if [ -n "$alias_subnet_mask" ]; then
-+ alias_mask="/$alias_subnet_mask"
- fi
- if [ x$IF_METRIC != x ]; then
- metric_arg="metric $IF_METRIC"
-@@ -125,9 +119,9 @@ fi
- if [ x$reason = xPREINIT ]; then
- if [ x$alias_ip_address != x ]; then
- # Bring down alias interface. Its routes will disappear too.
-- ifconfig $interface:0- inet 0
-+ ${ip} -4 addr flush dev ${interface} label ${interface}:0
- fi
-- ifconfig $interface 0 up
-+ ${ip} link set dev ${interface} up
-
- # We need to give the kernel some time to get the interface up.
- sleep 1
-@@ -154,25 +148,30 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
- if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
- [ x$alias_ip_address != x$old_ip_address ]; then
- # Possible new alias. Remove old alias.
-- ifconfig $interface:0- inet 0
-+ ${ip} -4 addr flush dev ${interface} label ${interface}:0
- fi
- if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
- # IP address changed. Bringing down the interface will delete all routes,
- # and clear the ARP cache.
-- ifconfig $interface inet 0 down
-+ ${ip} -4 addr flush dev ${interface} label ${interface}
-
- fi
- if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
- [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
-
-- ifconfig $interface inet $new_ip_address $new_subnet_arg \
-- $new_broadcast_arg $mtu_arg
-+ ${ip} -4 addr add ${new_ip_address}${new_mask} ${new_broadcast_arg} \
-+ dev ${interface} label ${interface}
-+ if [ -n "$new_interface_mtu" ]; then
-+ # set MTU
-+ ${ip} link set dev ${interface} mtu ${new_interface_mtu}
-+ fi
- # Add a network route to the computed network address.
- for router in $new_routers; do
- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
-- route add -host $router dev $interface
-+ ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
- fi
-- route add default gw $router $metric_arg dev $interface
-+ ${ip} -4 route add default via ${router} dev ${interface} \
-+ ${metric_arg} >/dev/null 2>&1
- done
- else
- # we haven't changed the address, have we changed other options
-@@ -180,21 +179,23 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
- if [ x$new_routers != x ] && [ x$new_routers != x$old_routers ] ; then
- # if we've changed routers delete the old and add the new.
- for router in $old_routers; do
-- route del default gw $router
-+ ${ip} -4 route delete default via ${router}
- done
- for router in $new_routers; do
- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
-- route add -host $router dev $interface
-- fi
-- route add default gw $router $metric_arg dev $interface
-+ ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
-+ fi
-+ ${ip} -4 route add default via ${router} dev ${interface} \
-+ ${metric_arg} >/dev/null 2>&1
- done
- fi
- fi
- if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
- then
-- ifconfig $interface:0- inet 0
-- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-- route add -host $alias_ip_address $interface:0
-+ ${ip} -4 addr flush dev ${interface} label ${interface}:0
-+ ${ip} -4 addr add ${alias_ip_address}${alias_mask} \
-+ dev ${interface} label ${interface}:0
-+ ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
- fi
- make_resolv_conf
- exit_with_hooks 0
-@@ -204,42 +205,49 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
- || [ x$reason = xSTOP ]; then
- if [ x$alias_ip_address != x ]; then
- # Turn off alias interface.
-- ifconfig $interface:0- inet 0
-+ ${ip} -4 addr flush dev ${interface} label ${interface}:0
- fi
- if [ x$old_ip_address != x ]; then
- # Shut down interface, which will delete routes and clear arp cache.
-- ifconfig $interface inet 0 down
-+ ${ip} -4 addr flush dev ${interface} label ${interface}
- fi
- if [ x$alias_ip_address != x ]; then
-- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-- route add -host $alias_ip_address $interface:0
-+ ${ip} -4 addr add ${alias_ip_address}${alias_network_arg} \
-+ dev ${interface} label ${interface}:0
-+ ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
- fi
- exit_with_hooks 0
- fi
-
- if [ x$reason = xTIMEOUT ]; then
- if [ x$alias_ip_address != x ]; then
-- ifconfig $interface:0- inet 0
-+ ${ip} -4 addr flush dev ${interface} label ${interface}:0
-+ fi
-+ ${ip} -4 addr add ${new_ip_address}${new_mask} ${new_broadcast_arg} \
-+ dev ${interface} label ${interface}
-+ if [ -n "$new_interface_mtu" ]; then
-+ # set MTU
-+ ip link set dev ${interface} mtu ${new_interface_mtu}
- fi
-- ifconfig $interface inet $new_ip_address $new_subnet_arg \
-- $new_broadcast_arg $mtu_arg
- set $new_routers
- if ping -q -c 1 $1; then
- if [ x$new_ip_address != x$alias_ip_address ] && \
- [ x$alias_ip_address != x ]; then
-- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-- route add -host $alias_ip_address dev $interface:0
-+ ${ip} -4 addr add ${alias_ip_address}${alias_mask} \
-+ dev ${interface} label ${interface}:0
-+ ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
- fi
- for router in $new_routers; do
- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
-- route add -host $router dev $interface
-+ ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
- fi
-- route add default gw $router $metric_arg dev $interface
-+ ${ip} -4 route add default via ${router} dev ${interface} \
-+ ${metric_arg} >/dev/null 2>&1
- done
- make_resolv_conf
- exit_with_hooks 0
- fi
-- ifconfig $interface inet 0 down
-+ ${ip} -4 addr flush dev ${interface}
- exit_with_hooks 1
- fi
-
---
-2.8.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch b/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch
deleted file mode 100644
index a08a5b725f..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-libdns requires libxml2 if bind was built with libxml2 support
-enabled. Compilation will fail for omapip/test.c in case
-lxml2 isn't used during the build. So, we add losely coupled
-search path which will pick up the lib if it is present.
-
-Signed-off-by: Awais Belal <awais_belal@mentor.com>
-Upstream-Status: Pending
-
-diff --git a/configure.ac b/configure.ac
-index c9dc8b5..85f59be 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -602,6 +602,10 @@ no)
- esac
- AC_SUBST([libbind])
-
-+# We need to find libxml2 if bind was built with support enabled
-+# otherwise we'll fail to build omapip/test.c
-+AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],)
-+
- # OpenLDAP support.
- AC_ARG_WITH(ldap,
- AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),
diff --git a/meta/recipes-connectivity/dhcp/dhcp/tweak-to-support-external-bind.patch b/meta/recipes-connectivity/dhcp/dhcp/tweak-to-support-external-bind.patch
deleted file mode 100644
index 03c6abb799..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/tweak-to-support-external-bind.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From ad7bb401f47714fc30c408853b796ce0f1c7e65f Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Sat, 11 Jun 2016 22:51:44 -0400
-Subject: [PATCH] tweak to support external bind
-
-Tweak the external bind to oe-core's sysroot rather than
-external bind source build.
-
-Upstream-Status: Inappropriate <oe-core specific>
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- client/Makefile.am | 2 +-
- client/tests/Makefile.am | 2 +-
- common/tests/Makefile.am | 2 +-
- dhcpctl/Makefile.am | 2 +-
- omapip/Makefile.am | 2 +-
- relay/Makefile.am | 2 +-
- server/Makefile.am | 2 +-
- server/tests/Makefile.am | 2 +-
- 8 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/client/Makefile.am b/client/Makefile.am
-index 4730bb3..84d8131 100644
---- a/client/Makefile.am
-+++ b/client/Makefile.am
-@@ -4,7 +4,7 @@
- # production code. Sadly, we are not there yet.
- SUBDIRS = . tests
-
--BINDLIBDIR = @BINDDIR@/lib
-+BINDLIBDIR = @BINDDIR@
-
- AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
- -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes
-diff --git a/client/tests/Makefile.am b/client/tests/Makefile.am
-index da69ea9..fe35e57 100644
---- a/client/tests/Makefile.am
-+++ b/client/tests/Makefile.am
-@@ -1,6 +1,6 @@
- SUBDIRS = .
-
--BINDLIBDIR = @BINDDIR@/lib
-+BINDLIBDIR = @BINDDIR@
-
- AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
- AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
-diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
-index f8d6b0e..05cd9c1 100644
---- a/common/tests/Makefile.am
-+++ b/common/tests/Makefile.am
-@@ -1,6 +1,6 @@
- SUBDIRS = .
-
--BINDLIBDIR = @BINDDIR@/lib
-+BINDLIBDIR = @BINDDIR@
-
- AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
-
-diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
-index ba8dd8b..9b2486e 100644
---- a/dhcpctl/Makefile.am
-+++ b/dhcpctl/Makefile.am
-@@ -1,4 +1,4 @@
--BINDLIBDIR = @BINDDIR@/lib
-+BINDLIBDIR = @BINDDIR@
-
- AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
-
-diff --git a/omapip/Makefile.am b/omapip/Makefile.am
-index dd1afa0..e4a8599 100644
---- a/omapip/Makefile.am
-+++ b/omapip/Makefile.am
-@@ -1,4 +1,4 @@
--BINDLIBDIR = @BINDDIR@/lib
-+BINDLIBDIR = @BINDDIR@
- AM_CPPFLAGS = -I$(top_srcdir)/includes
-
- lib_LIBRARIES = libomapi.a
-diff --git a/relay/Makefile.am b/relay/Makefile.am
-index 6d652f6..b3bf578 100644
---- a/relay/Makefile.am
-+++ b/relay/Makefile.am
-@@ -1,4 +1,4 @@
--BINDLIBDIR = @BINDDIR@/lib
-+BINDLIBDIR = @BINDDIR@
-
- AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
-
-diff --git a/server/Makefile.am b/server/Makefile.am
-index 3990b9c..b5d8c2d 100644
---- a/server/Makefile.am
-+++ b/server/Makefile.am
-@@ -4,7 +4,7 @@
- # production code. Sadly, we are not there yet.
- SUBDIRS = . tests
-
--BINDLIBDIR = @BINDDIR@/lib
-+BINDLIBDIR = @BINDDIR@
-
- AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
-
-diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
-index 65a9f74..2892309 100644
---- a/server/tests/Makefile.am
-+++ b/server/tests/Makefile.am
-@@ -1,6 +1,6 @@
- SUBDIRS = .
-
--BINDLIBDIR = @BINDDIR@/lib
-+BINDLIBDIR = @BINDDIR@
-
- AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
- AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
---
-2.8.1
-
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb b/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
deleted file mode 100644
index 4151eb1836..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require dhcp.inc
-
-SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
- file://link-with-lcrypto.patch \
- file://fixsepbuild.patch \
- file://dhclient-script-drop-resolv.conf.dhclient.patch \
- file://replace-ifconfig-route.patch \
- file://0001-site.h-enable-gentle-shutdown.patch \
- file://libxml2-configure-argument.patch \
- file://tweak-to-support-external-bind.patch \
- file://remove-dhclient-script-bash-dependency.patch \
- "
-
-SRC_URI[md5sum] = "0138319fe2b788cf4bdf34fbeaf9ff54"
-SRC_URI[sha256sum] = "f5115aee3dd3e6925de4ba47b80ab732ba48b481c8364b6ebade2d43698d607e"
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb b/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb
new file mode 100644
index 0000000000..020777b8f2
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb
@@ -0,0 +1,23 @@
+require dhcp.inc
+
+SRC_URI += "file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \
+ file://0002-dhclient-dbus.patch \
+ file://0003-link-with-lcrypto.patch \
+ file://0004-Fix-out-of-tree-builds.patch \
+ file://0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch \
+ file://0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch \
+ file://0009-remove-dhclient-script-bash-dependency.patch \
+ file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
+ file://0013-fixup_use_libbind.patch \
+ file://0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch \
+ file://0001-Fix-a-NSUPDATE-compiling-issue.patch \
+ file://0001-workaround-busybox-limitation-in-linux-dhclient-script.patch \
+"
+
+SRC_URI[md5sum] = "18c7f4dcbb0a63df25098216d47b1ede"
+SRC_URI[sha256sum] = "2a22508922ab367b4af4664a0472dc220cc9603482cf3c16d9aff14f3a76b608"
+
+LDFLAGS_append = " -pthread"
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"
diff --git a/meta/recipes-connectivity/dhcp/files/dhclient-systemd-wrapper b/meta/recipes-connectivity/dhcp/files/dhclient-systemd-wrapper
new file mode 100644
index 0000000000..7d0e224a1d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhclient-systemd-wrapper
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# In case the interface is used for nfs, skip it.
+nfsroot=0
+interfaces=""
+exec 9<&0 < /proc/mounts
+while read dev mtpt fstype rest; do
+ if test $mtpt = "/" ; then
+ case $fstype in
+ nfs | nfs4)
+ nfsroot=1
+ nfs_addr=`echo $rest | sed -e 's/^.*addr=\([0-9.]*\).*$/\1/'`
+ break
+ ;;
+ *)
+ ;;
+ esac
+ fi
+done
+exec 0<&9 9<&-
+
+if [ $nfsroot -eq 0 ]; then
+ interfaces="$INTERFACES"
+else
+ if [ -x /bin/ip -o -x /sbin/ip ] ; then
+ nfs_iface=`ip route get $nfs_addr | grep dev | sed -e 's/^.*dev \([-a-z0-9.]*\).*$/\1/'`
+ fi
+ for i in $INTERFACES; do
+ if test "x$i" = "x$nfs_iface"; then
+ echo "dhclient skipping nfsroot interface $i"
+ else
+ interfaces="$interfaces $i"
+ fi
+ done
+fi
+
+if test "x$interfaces" != "x"; then
+ /sbin/dhclient -d -cf /etc/dhcp/dhclient.conf -q -lf /var/lib/dhcp/dhclient.leases $interfaces
+fi
diff --git a/meta/recipes-connectivity/dhcp/files/dhclient.service b/meta/recipes-connectivity/dhcp/files/dhclient.service
new file mode 100644
index 0000000000..9ddb4d1dfe
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhclient.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Dynamic Host Configuration Protocol (DHCP)
+Wants=network.target
+Before=network.target
+After=systemd-udevd.service
+
+[Service]
+EnvironmentFile=-@SYSCONFDIR@/default/dhcp-client
+ExecStart=@BASE_SBINDIR@/dhclient-systemd-wrapper
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd6.service b/meta/recipes-connectivity/dhcp/files/dhcpd6.service
index ca96abb838..52a6224dc2 100644
--- a/meta/recipes-connectivity/dhcp/files/dhcpd6.service
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd6.service
@@ -9,7 +9,7 @@ PIDFile=@localstatedir@/run/dhcpd6.pid
EnvironmentFile=@SYSCONFDIR@/default/dhcp-server
EnvironmentFile=-@SYSCONFDIR@/sysconfig/dhcpd6
ExecStartPre=@base_bindir@/touch @localstatedir@/lib/dhcp/dhcpd6.leases
-ExecStart=@SBINDIR@/dhcpd -f -6 -cf @SYSCONFDIR@/dhcp/dhcpd.conf -pf @localstatedir@/run/dhcpd6.pid $DHCPDARGS -q $INTERFACES
+ExecStart=@SBINDIR@/dhcpd -f -6 -cf @SYSCONFDIR@/dhcp/dhcpd6.conf -pf @localstatedir@/run/dhcpd6.pid $DHCPDARGS -q $INTERFACES
[Install]
WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch b/meta/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch
new file mode 100644
index 0000000000..d4764f5867
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Pending
+
+Subject: rcp: fix to work with large files
+
+When we copy file by rcp command, if the file > 2GB, it will fail.
+The cause is that it used incorrect data type on file size in sink() of rcp.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/rcp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/rcp.c b/src/rcp.c
+index 21f55b6..bafa35f 100644
+--- a/src/rcp.c
++++ b/src/rcp.c
+@@ -876,9 +876,9 @@ sink (int argc, char *argv[])
+ enum
+ { YES, NO, DISPLAYED } wrerr;
+ BUF *bp;
+- off_t i, j;
++ off_t i, j, size;
+ int amt, count, exists, first, mask, mode, ofd, omode;
+- int setimes, size, targisdir, wrerrno;
++ int setimes, targisdir, wrerrno;
+ char ch, *cp, *np, *targ, *vect[1], buf[BUFSIZ];
+ const char *why;
+
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch b/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch
new file mode 100644
index 0000000000..a91913cb51
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch
@@ -0,0 +1,25 @@
+tftpd: Fix abort on error path
+
+When trying to fetch a non existent file, the app crashes with:
+
+*** buffer overflow detected ***:
+Aborted
+
+
+Upstream-Status: Submitted [https://www.mail-archive.com/bug-inetutils@gnu.org/msg03036.html https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91205]
+Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
+diff --git a/src/tftpd.c b/src/tftpd.c
+index 56002a0..144012f 100644
+--- a/src/tftpd.c
++++ b/src/tftpd.c
+@@ -864,9 +864,8 @@ nak (int error)
+ pe->e_msg = strerror (error - 100);
+ tp->th_code = EUNDEF; /* set 'undef' errorcode */
+ }
+- strcpy (tp->th_msg, pe->e_msg);
+ length = strlen (pe->e_msg);
+- tp->th_msg[length] = '\0';
++ memcpy(tp->th_msg, pe->e_msg, length + 1);
+ length += 5;
+ if (sendto (peer, buf, length, 0, (struct sockaddr *) &from, fromlen) != length)
+ syslog (LOG_ERR, "nak: %m\n");
diff --git a/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
new file mode 100644
index 0000000000..24c134fcac
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
@@ -0,0 +1,83 @@
+Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html
+
+Upstream-Status: Pending
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ ping/ping_common.h | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/ping/ping_common.h b/ping/ping_common.h
+index 1dfd1b5..3bfbd12 100644
+--- a/ping/ping_common.h
++++ b/ping/ping_common.h
+@@ -17,10 +17,14 @@
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see `http://www.gnu.org/licenses/'. */
+
++#include <config.h>
++
+ #include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
++#ifdef HAVE_IPV6
+ #include <netinet/icmp6.h>
++#endif
+ #include <icmp.h>
+ #include <error.h>
+ #include <progname.h>
+@@ -62,7 +66,12 @@ struct ping_stat
+ want to follow the traditional behaviour of ping. */
+ #define DEFAULT_PING_COUNT 0
+
++#ifdef HAVE_IPV6
+ #define PING_HEADER_LEN (USE_IPV6 ? sizeof (struct icmp6_hdr) : ICMP_MINLEN)
++#else
++#define PING_HEADER_LEN (ICMP_MINLEN)
++#endif
++
+ #define PING_TIMING(s) ((s) >= sizeof (struct timeval))
+ #define PING_DATALEN (64 - PING_HEADER_LEN) /* default data length */
+
+@@ -74,13 +83,20 @@ struct ping_stat
+ (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\
+ } while (0)
+
++#ifdef HAVE_IPV6
+ /* FIXME: Adjust IPv6 case for options and their consumption. */
+ #define _PING_BUFLEN(p, u) ((u)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \
+ (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN))
+
++#else
++#define _PING_BUFLEN(p, u) (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN)
++#endif
++
++#ifdef HAVE_IPV6
+ typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest,
+ struct sockaddr_in6 * from, struct icmp6_hdr * icmp,
+ int datalen);
++#endif
+
+ typedef int (*ping_efp) (int code,
+ void *closure,
+@@ -89,13 +105,17 @@ typedef int (*ping_efp) (int code,
+ struct ip * ip, icmphdr_t * icmp, int datalen);
+
+ union event {
++#ifdef HAVE_IPV6
+ ping_efp6 handler6;
++#endif
+ ping_efp handler;
+ };
+
+ union ping_address {
+ struct sockaddr_in ping_sockaddr;
++#ifdef HAVE_IPV6
+ struct sockaddr_in6 ping_sockaddr6;
++#endif
+ };
+
+ typedef struct ping_data PING;
+--
+2.8.3
+
diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch
new file mode 100644
index 0000000000..3da4e9f55a
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch
@@ -0,0 +1,29 @@
+From 552a7d64ad4a7188a9b7cd89933ae7caf7ebfe90 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier at gentoo.org>
+Date: Thu, 18 Nov 2010 16:59:14 -0500
+Subject: [PATCH gnulib] printf-parse: pull in features.h for __GLIBC__
+
+Upstream-Status: Pending
+
+Signed-off-by: Mike Frysinger <vapier at gentoo.org>
+---
+ lib/printf-parse.h | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/lib/printf-parse.h b/lib/printf-parse.h
+index 67a4a2a..3bd6152 100644
+--- a/lib/printf-parse.h
++++ b/lib/printf-parse.h
+@@ -25,6 +25,9 @@
+
+ #include "printf-args.h"
+
++#ifdef HAVE_FEATURES_H
++# include <features.h> /* for __GLIBC__ */
++#endif
+
+ /* Flags */
+ #define FLAG_GROUP 1 /* ' flag */
+--
+1.7.3.2
+
diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch
new file mode 100644
index 0000000000..b13bb9229f
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Pending
+
+--- inetutils-1.8/lib/wchar.in.h
++++ inetutils-1.8/lib/wchar.in.h
+@@ -70,6 +70,9 @@
+ /* The include_next requires a split double-inclusion guard. */
+ #if @HAVE_WCHAR_H@
+ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
++#else
++# include <stddef.h>
++# define MB_CUR_MAX 1
+ #endif
+
+ #undef _GL_ALREADY_INCLUDING_WCHAR_H
diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch
new file mode 100644
index 0000000000..2592989a90
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch
@@ -0,0 +1,26 @@
+inetutils: define PATH_PROCNET_DEV if not already defined
+
+this prevents the following compilation error :
+system/linux.c:401:15: error: 'PATH_PROCNET_DEV' undeclared (first use in this function)
+
+this patch comes from :
+ http://repository.timesys.com/buildsources/i/inetutils/inetutils-1.9/
+
+Upstream-Status: Inappropriate [not author]
+
+Signed-of-by: Eric Bénard <eric@eukrea.com>
+---
+diff -Naur inetutils-1.9.orig/ifconfig/system/linux.c inetutils-1.9/ifconfig/system/linux.c
+--- inetutils-1.9.orig/ifconfig/system/linux.c 2012-01-04 16:31:36.000000000 -0500
++++ inetutils-1.9/ifconfig/system/linux.c 2012-01-04 16:40:53.000000000 -0500
+@@ -49,6 +49,10 @@
+ #include "../ifconfig.h"
+
+
++#ifndef PATH_PROCNET_DEV
++ #define PATH_PROCNET_DEV "/proc/net/dev"
++#endif
++
+ /* ARPHRD stuff. */
+
+ static void
diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch
new file mode 100644
index 0000000000..ff3abd86aa
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch
@@ -0,0 +1,40 @@
+Only check security/pam_appl.h which is provided by package libpam when pam is
+enabled.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/configure.ac b/configure.ac
+index b35e672..e78a751 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -195,6 +195,19 @@ fi
+
+ # See if we have libpam.a. Investigate PAM versus Linux-PAM.
+ if test "$with_pam" = yes ; then
++ AC_CHECK_HEADERS([security/pam_appl.h], [], [], [
++#include <sys/types.h>
++#ifdef HAVE_NETINET_IN_SYSTM_H
++# include <netinet/in_systm.h>
++#endif
++#include <netinet/in.h>
++#ifdef HAVE_NETINET_IP_H
++# include <netinet/ip.h>
++#endif
++#ifdef HAVE_SYS_PARAM_H
++# include <sys/param.h>
++#endif
++])
+ AC_CHECK_LIB(dl, dlopen, LIBDL=-ldl)
+ AC_CHECK_LIB(pam, pam_authenticate, LIBPAM=-lpam)
+ if test "$ac_cv_lib_pam_pam_authenticate" = yes ; then
+@@ -587,7 +600,7 @@ AC_HEADER_DIRENT
+ AC_CHECK_HEADERS([arpa/nameser.h errno.h fcntl.h features.h \
+ glob.h memory.h netinet/ether.h netinet/in_systm.h \
+ netinet/ip.h netinet/ip_icmp.h netinet/ip_var.h \
+- security/pam_appl.h shadow.h \
++ shadow.h \
+ stdarg.h stdlib.h string.h stropts.h sys/tty.h \
+ sys/utsname.h sys/ptyvar.h sys/msgbuf.h sys/filio.h \
+ sys/ioctl_compat.h sys/cdefs.h sys/stream.h sys/mkdev.h \
diff --git a/meta/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils b/meta/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils
new file mode 100644
index 0000000000..30e81ef450
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils
@@ -0,0 +1,20 @@
+# default: off
+# description:
+# Rexecd is the server for the rexec program. The server provides remote
+# execution facilities with authentication based on user names and
+# passwords.
+#
+service exec
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = @SBINDIR@/tcpd
+ server_args = @SBINDIR@/in.rexecd
+ disable = yes
+}
diff --git a/meta/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils b/meta/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils
new file mode 100644
index 0000000000..21b55da9a9
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils
@@ -0,0 +1,23 @@
+# default: off
+# description:
+# Rlogind is a server for the rlogin program. The server provides remote
+# execution with authentication based on privileged port numbers from trusted
+# host
+#
+service login
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = @SBINDIR@/tcpd
+ server_args = @SBINDIR@/in.rlogind -a
+ disable = yes
+}
+
+
+
diff --git a/meta/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils b/meta/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils
new file mode 100644
index 0000000000..2b894a74bd
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils
@@ -0,0 +1,21 @@
+# default: off
+# description:
+# The rshd server is a server for the rcmd(3) routine and,
+# consequently, for the rsh(1) program. The server provides
+# remote execution facilities with authentication based on
+# privileged port numbers from trusted hosts.
+#
+service shell
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = @SBINDIR@/tcpd
+ server_args = @SBINDIR@/in.rshd -aL
+ disable = yes
+}
diff --git a/meta/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils b/meta/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils
new file mode 100644
index 0000000000..2d9a0408c0
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils
@@ -0,0 +1,13 @@
+# default: on
+# description: The telnet server serves telnet sessions; it uses \
+# unencrypted username/password pairs for authentication.
+service telnet
+{
+ disable = no
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = @SBINDIR@/in.telnetd
+ log_on_failure += USERID
+}
diff --git a/meta/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils b/meta/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils
new file mode 100644
index 0000000000..67b44c43e8
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils
@@ -0,0 +1,19 @@
+# default: off
+# description:
+# Tftpd is a server which supports the Internet Trivial File Transfer
+# Pro-tocol (RFC 783). The TFTP server operates at the port indicated
+# in the tftp service description; see services(5).
+#
+service tftp
+{
+ disable = yes
+ socket_type = dgram
+ protocol = udp
+ flags = IPv6
+ wait = yes
+ user = root
+ group = root
+ server = @SBINDIR@/in.tftpd
+ server_args = /tftpboot
+}
+
diff --git a/meta/recipes-connectivity/inetutils/inetutils/version.patch b/meta/recipes-connectivity/inetutils/inetutils/version.patch
new file mode 100644
index 0000000000..532a0e5c08
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/version.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Pending
+
+remove m4_esyscmd function
+
+Signed-off-by: Chunrong Guo <b40290@freescale.com>
+--- inetutils-1.9.1/configure.ac 2012-01-06 22:05:05.000000000 +0800
++++ inetutils-1.9.1/configure.ac 2012-11-12 14:01:11.732957019 +0800
+@@ -20,8 +20,7 @@
+
+ AC_PREREQ(2.59)
+
+-AC_INIT([GNU inetutils],
+- m4_esyscmd([build-aux/git-version-gen .tarball-version 's/inetutils-/v/;s/_/./g']),
++AC_INIT([GNU inetutils],[1.9.4],
+ [bug-inetutils@gnu.org])
+
+ AC_CONFIG_SRCDIR([src/inetd.c])
diff --git a/meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb b/meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb
new file mode 100644
index 0000000000..684fbe09e1
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb
@@ -0,0 +1,210 @@
+DESCRIPTION = "The GNU inetutils are a collection of common \
+networking utilities and servers including ftp, ftpd, rcp, \
+rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \
+talkd, telnet, telnetd, tftp, tftpd, and uucpd."
+HOMEPAGE = "http://www.gnu.org/software/inetutils"
+SECTION = "net"
+DEPENDS = "ncurses netbase readline virtual/crypt"
+
+LICENSE = "GPLv3"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7"
+
+SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \
+ file://version.patch \
+ file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \
+ file://inetutils-1.8-0003-wchar.patch \
+ file://rexec.xinetd.inetutils \
+ file://rlogin.xinetd.inetutils \
+ file://rsh.xinetd.inetutils \
+ file://telnet.xinetd.inetutils \
+ file://tftpd.xinetd.inetutils \
+ file://inetutils-1.9-PATH_PROCNET_DEV.patch \
+ file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \
+ file://0001-rcp-fix-to-work-with-large-files.patch \
+ file://fix-buffer-fortify-tfpt.patch \
+"
+
+SRC_URI[md5sum] = "04852c26c47cc8c6b825f2b74f191f52"
+SRC_URI[sha256sum] = "be8f75eff936b8e41b112462db51adf689715658a1b09e0d6b05d11ec92cc616"
+
+inherit autotools gettext update-alternatives texinfo
+
+acpaths = "-I ./m4"
+
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}"
+
+PACKAGECONFIG ??= "ftp uucpd \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \
+ "
+PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline"
+PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no,"
+PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6,"
+
+EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
+ inetutils_cv_path_login=${base_bindir}/login \
+ --with-libreadline-prefix=${STAGING_LIBDIR} \
+ --enable-rpath=no \
+"
+
+# These are horrible for security, disable them
+EXTRA_OECONF_append = " --disable-rsh --disable-rshd --disable-rcp \
+ --disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd"
+
+do_configure_prepend () {
+ export HELP2MAN='true'
+ cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}/build-aux/config.rpath
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+ rm -f ${S}/glob/configure*
+}
+
+do_install_append () {
+ install -m 0755 -d ${D}${base_sbindir}
+ install -m 0755 -d ${D}${sbindir}
+ install -m 0755 -d ${D}${sysconfdir}/xinetd.d
+ if [ "${base_bindir}" != "${bindir}" ] ; then
+ install -m 0755 -d ${D}${base_bindir}
+ mv ${D}${bindir}/ping* ${D}${base_bindir}/
+ mv ${D}${bindir}/hostname ${D}${base_bindir}/
+ fi
+ mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/
+ mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/
+ mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd
+ mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd
+ if [ -e ${D}${libexecdir}/rexecd ]; then
+ mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd
+ cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec
+ fi
+ if [ -e ${D}${libexecdir}/rlogind ]; then
+ mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind
+ cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin
+ fi
+ if [ -e ${D}${libexecdir}/rshd ]; then
+ mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd
+ cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh
+ fi
+ if [ -e ${D}${libexecdir}/talkd ]; then
+ mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd
+ fi
+ mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd
+ mv ${D}${libexecdir}/* ${D}${bindir}/
+ cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet
+ cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd
+
+ sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/*
+ if [ -e ${D}${libdir}/charset.alias ]; then
+ rm -rf ${D}${libdir}/charset.alias
+ fi
+ rm -rf ${D}${libexecdir}/
+ # remove usr/lib if empty
+ rmdir ${D}${libdir} || true
+}
+
+PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \
+${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \
+${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \
+${PN}-rsh ${PN}-rshd"
+
+# The packages tftpd, telnetd and rshd conflict with the ones
+# provided by netkit, so add the corresponding -dbg packages
+# for them to avoid the confliction between the dbg package
+# of inetutils and netkit.
+PACKAGES =+ "${PN}-tftpd-dbg ${PN}-telnetd-dbg ${PN}-rshd-dbg"
+NOAUTOPACKAGEDEBUG = "1"
+
+ALTERNATIVE_PRIORITY = "79"
+ALTERNATIVE_${PN} = "whois"
+ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd"
+
+ALTERNATIVE_PRIORITY_${PN}-logger = "60"
+ALTERNATIVE_${PN}-logger = "logger"
+ALTERNATIVE_${PN}-syslogd = "syslogd"
+ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
+
+ALTERNATIVE_${PN}-ftp = "ftp"
+ALTERNATIVE_${PN}-ftpd = "ftpd"
+ALTERNATIVE_${PN}-tftp = "tftp"
+ALTERNATIVE_${PN}-tftpd = "tftpd"
+ALTERNATIVE_LINK_NAME[tftpd] = "${sbindir}/tftpd"
+ALTERNATIVE_TARGET[tftpd] = "${sbindir}/in.tftpd"
+
+ALTERNATIVE_${PN}-telnet = "telnet"
+ALTERNATIVE_${PN}-telnetd = "telnetd"
+ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd"
+ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd"
+
+ALTERNATIVE_${PN}-inetd= "inetd"
+ALTERNATIVE_${PN}-traceroute = "traceroute"
+
+ALTERNATIVE_${PN}-hostname = "hostname"
+ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname"
+
+ALTERNATIVE_${PN}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8"
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1"
+ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1"
+ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
+
+ALTERNATIVE_${PN}-ifconfig = "ifconfig"
+ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig"
+
+ALTERNATIVE_${PN}-ping = "ping"
+ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
+
+ALTERNATIVE_${PN}-ping6 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}"
+ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
+
+
+FILES_${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
+FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
+FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
+FILES_${PN}-hostname = "${base_bindir}/hostname.${BPN}"
+FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}"
+FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}"
+FILES_${PN}-logger = "${bindir}/logger.${BPN}"
+
+FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}"
+RCONFLICTS_${PN}-syslogd = "rsyslog busybox-syslog sysklogd syslog-ng"
+
+FILES_${PN}-ftp = "${bindir}/ftp.${BPN}"
+
+FILES_${PN}-tftp = "${bindir}/tftp.${BPN}"
+FILES_${PN}-telnet = "${bindir}/telnet.${BPN}"
+
+# We make us of RCONFLICTS / RPROVIDES here rather than using the normal
+# alternatives method as this leads to packaging QA issues when using
+# musl as that library does not provide what these applications need to
+# build.
+FILES_${PN}-rsh = "${bindir}/rsh ${bindir}/rlogin ${bindir}/rexec ${bindir}/rcp"
+RCONFLICTS_${PN}-rsh += "netkit-rsh-client"
+RPROVIDES_${PN}-rsh = "rsh"
+
+FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \
+ ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec"
+FILES_${PN}-rshd-dbg = "${sbindir}/.debug/in.rshd ${sbindir}/.debug/in.rlogind ${sbindir}/.debug/in.rexecd"
+RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers"
+RCONFLICTS_${PN}-rshd += "netkit-rshd-server"
+RPROVIDES_${PN}-rshd = "rshd"
+
+FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}"
+FILES_${PN}-ftpd-dbg = "${bindir}/.debug/ftpd.${BPN}"
+RDEPENDS_${PN}-ftpd += "xinetd"
+
+FILES_${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd"
+FILES_${PN}-tftpd-dbg = "${sbindir}/.debug/in.tftpd"
+RCONFLICTS_${PN}-tftpd += "netkit-tftpd"
+RDEPENDS_${PN}-tftpd += "xinetd"
+
+FILES_${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet"
+FILES_${PN}-telnetd-dbg = "${sbindir}/.debug/in.telnetd"
+RCONFLICTS_${PN}-telnetd += "netkit-telnet"
+RPROVIDES_${PN}-telnetd = "telnetd"
+RDEPENDS_${PN}-telnetd += "xinetd"
+
+FILES_${PN}-inetd = "${bindir}/inetd.${BPN}"
+
+RDEPENDS_${PN} = "xinetd"
diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
index 63e7ca9e83..fc31b8444e 100644
--- a/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -9,16 +9,23 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817"
-DEPENDS = "flex-native bison-native iptables elfutils"
+DEPENDS = "flex-native bison-native iptables libcap"
-inherit update-alternatives bash-completion
+inherit update-alternatives bash-completion pkgconfig
-EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
+CLEANBROKEN = "1"
+
+PACKAGECONFIG ??= "tipc elf"
+PACKAGECONFIG[tipc] = ",,libmnl,"
+PACKAGECONFIG[elf] = ",,elfutils,"
+
+EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
+ ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
do_configure_append () {
sh configure ${STAGING_INCDIR}
# Explicitly disable ATM support
- sed -i -e '/TC_CONFIG_ATM/d' Config
+ sed -i -e '/TC_CONFIG_ATM/d' config.mk
}
do_install () {
@@ -32,17 +39,31 @@ do_install () {
# The .so files in iproute2-tc are modules, not traditional libraries
INSANE_SKIP_${PN}-tc = "dev-so"
-PACKAGES =+ "${PN}-tc ${PN}-lnstat ${PN}-ifstat ${PN}-genl ${PN}-rtacct ${PN}-nstat ${PN}-ss"
+PACKAGES =+ "${PN}-tc \
+ ${PN}-lnstat \
+ ${PN}-ifstat \
+ ${PN}-genl \
+ ${PN}-rtacct \
+ ${PN}-nstat \
+ ${PN}-ss \
+ ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}"
FILES_${PN}-tc = "${base_sbindir}/tc* \
${libdir}/tc/*.so"
-FILES_${PN}-lnstat = "${base_sbindir}/lnstat ${base_sbindir}/ctstat ${base_sbindir}/rtstat"
+FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
+ ${base_sbindir}/ctstat \
+ ${base_sbindir}/rtstat"
FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
FILES_${PN}-genl = "${base_sbindir}/genl"
FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
FILES_${PN}-nstat = "${base_sbindir}/nstat"
FILES_${PN}-ss = "${base_sbindir}/ss"
+FILES_${PN}-tipc = "${base_sbindir}/tipc"
ALTERNATIVE_${PN} = "ip"
ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-tc = "tc"
+ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc"
+ALTERNATIVE_PRIORITY_${PN}-tc = "100"
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
deleted file mode 100644
index 39c7d40319..0000000000
--- a/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Subject: [PATCH] iproute2: de-bash scripts
-
-de-bash these two scripts to make iproute2 not depend on bash.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
----
- ip/ifcfg | 15 ++++++++-------
- ip/rtpr | 2 +-
- 2 files changed, 9 insertions(+), 8 deletions(-)
-
-diff --git a/ip/ifcfg b/ip/ifcfg
-index 083d9df..60bcf1f 100644
---- a/ip/ifcfg
-+++ b/ip/ifcfg
-@@ -1,12 +1,13 @@
--#! /bin/bash
-+#! /bin/sh
-
- CheckForwarding () {
-- local sbase fwd
-+ local sbase fwd forwarding
- sbase=/proc/sys/net/ipv4/conf
- fwd=0
- if [ -d $sbase ]; then
- for dir in $sbase/*/forwarding; do
-- fwd=$[$fwd + `cat $dir`]
-+ forwarding=`cat $dir`
-+ fwd=$(($fwd+$forwarding))
- done
- else
- fwd=2
-@@ -127,12 +128,12 @@ fi
- arping -q -A -c 1 -I $dev $ipaddr
- noarp=$?
- ( sleep 2 ;
-- arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null &
-+ arping -q -U -c 1 -I $dev $ipaddr ) > /dev/null 2>&1 </dev/null &
-
--ip route add unreachable 224.0.0.0/24 >& /dev/null
--ip route add unreachable 255.255.255.255 >& /dev/null
-+ip route add unreachable 224.0.0.0/24 > /dev/null 2>&1
-+ip route add unreachable 255.255.255.255 > /dev/null 2>&1
- if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then
-- ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
-+ ip route add 224.0.0.0/4 dev $dev scope global > /dev/null 2>&1
- fi
-
- if [ $fwd -eq 0 ]; then
-diff --git a/ip/rtpr b/ip/rtpr
-index c3629fd..674198d 100644
---- a/ip/rtpr
-+++ b/ip/rtpr
-@@ -1,4 +1,4 @@
--#! /bin/bash
-+#! /bin/sh
-
- exec tr "[\\\\]" "[
- ]"
---
-1.7.9.5
-
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
new file mode 100644
index 0000000000..50c4bfb0f2
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
@@ -0,0 +1,41 @@
+From b7d96340c55afb7023ded0041107c63dbd886196 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Thu, 22 Dec 2016 15:26:30 +0200
+Subject: [PATCH] libc-compat.h: add musl workaround
+
+The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and
+__USE_MISC) to solve conflicts with libc provided headers. This patch makes
+libc-compat.h work for musl libc as well.
+
+Upstream-Status: Pending
+
+Taken From:
+https://git.buildroot.net/buildroot/tree/package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ include/uapi/linux/libc-compat.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
+index f38571d..30f0b67 100644
+--- a/include/uapi/linux/libc-compat.h
++++ b/include/uapi/linux/libc-compat.h
+@@ -49,10 +49,12 @@
+ #define _LIBC_COMPAT_H
+
+ /* We have included glibc headers... */
+-#if defined(__GLIBC__)
++#if 1
++#define __USE_MISC
+
+ /* Coordinate with glibc net/if.h header. */
+ #if defined(_NET_IF_H) && defined(__USE_MISC)
++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
+
+ /* GLIBC headers included first so don't define anything
+ * that would already be defined. */
+--
+2.4.0
+
diff --git a/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch b/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch
deleted file mode 100644
index 866609ca99..0000000000
--- a/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 85b0589b4843c03e8e6fd9416d71ea449a73c5c0 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 3 Nov 2011 10:46:16 +0100
-Subject: [PATCH] make configure cross compile safe
-
-According to Kevin Tian:
-Upstream-Status: Pending
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-Signed-off-by: Shane Wang <shane.wang@intel.com>
-
-Index: iproute2-3.7.0/configure
-===================================================================
---- iproute2-3.7.0.orig/configure
-+++ iproute2-3.7.0/configure
-@@ -2,6 +2,7 @@
- # This is not an autconf generated configure
- #
- INCLUDE=${1:-"$PWD/include"}
-+SYSROOT=$1
-
- # Make a temp directory in build tree.
- TMPDIR=$(mktemp -d config.XXXXXX)
-@@ -158,7 +159,7 @@ check_ipt_lib_dir()
- return
- fi
-
-- for dir in /lib /usr/lib /usr/local/lib
-+ for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib
- do
- for file in $dir/{xtables,iptables}/lib*t_*so ; do
- if [ -f $file ]; then
diff --git a/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch b/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
deleted file mode 100644
index 8c078f69d0..0000000000
--- a/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-Subject: [PATCH] Avoid in6_addr redefinition
-
-Due to both <netinet/in.h> and <linux/in6.h> being included, the
-in6_addr is being redefined: once from the C library headers and once
-from the kernel headers. This causes some build failures with for
-example the musl C library.
-
-In order to fix this, use just the C library header <netinet/in.h>.
-Original patch taken from
-http://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-fixes.patch.
-
-(Refreshed the patch for 4.6 release)
-
-Upstream-Status: Pending
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
-----
-diff -Naur iproute2-4.6.0-orig/include/libiptc/ipt_kernel_headers.h iproute2-4.6.0/include/libiptc/ipt_kernel_headers.h
---- iproute2-4.6.0-orig/include/libiptc/ipt_kernel_headers.h 2016-05-23 12:03:23.821826910 +0300
-+++ iproute2-4.6.0/include/libiptc/ipt_kernel_headers.h 2016-05-23 12:04:23.714078154 +0300
-@@ -6,7 +6,6 @@
- #include <limits.h>
-
- #include <netinet/ip.h>
--#include <netinet/in.h>
- #include <netinet/ip_icmp.h>
- #include <netinet/tcp.h>
- #include <netinet/udp.h>
-diff -Naur iproute2-4.6.0-orig/include/linux/if_bridge.h iproute2-4.6.0/include/linux/if_bridge.h
---- iproute2-4.6.0-orig/include/linux/if_bridge.h 2016-05-23 12:03:23.821826910 +0300
-+++ iproute2-4.6.0/include/linux/if_bridge.h 2016-05-23 12:04:23.716078129 +0300
-@@ -15,7 +15,6 @@
-
- #include <linux/types.h>
- #include <linux/if_ether.h>
--#include <linux/in6.h>
-
- #define SYSFS_BRIDGE_ATTR "bridge"
- #define SYSFS_BRIDGE_FDB "brforward"
-diff -Naur iproute2-4.6.0-orig/include/linux/netfilter.h iproute2-4.6.0/include/linux/netfilter.h
---- iproute2-4.6.0-orig/include/linux/netfilter.h 2016-05-23 12:03:23.821826910 +0300
-+++ iproute2-4.6.0/include/linux/netfilter.h 2016-05-23 12:04:23.717078117 +0300
-@@ -4,8 +4,6 @@
- #include <linux/types.h>
-
- #include <linux/sysctl.h>
--#include <linux/in.h>
--#include <linux/in6.h>
-
- /* Responses from hook functions. */
- #define NF_DROP 0
-diff -Naur iproute2-4.6.0-orig/include/linux/netfilter_ipv4/ip_tables.h iproute2-4.6.0/include/linux/netfilter_ipv4/ip_tables.h
---- iproute2-4.6.0-orig/include/linux/netfilter_ipv4/ip_tables.h 2016-05-18 21:56:02.000000000 +0300
-+++ iproute2-4.6.0/include/linux/netfilter_ipv4/ip_tables.h 2016-05-23 12:09:22.888337961 +0300
-@@ -17,7 +17,6 @@
-
- #include <linux/types.h>
-
--#include <linux/if.h>
- #include <linux/netfilter_ipv4.h>
-
- #include <linux/netfilter/x_tables.h>
-diff -Naur iproute2-4.6.0-orig/include/linux/xfrm.h iproute2-4.6.0/include/linux/xfrm.h
---- iproute2-4.6.0-orig/include/linux/xfrm.h 2016-05-23 12:03:23.821826910 +0300
-+++ iproute2-4.6.0/include/linux/xfrm.h 2016-05-23 12:04:23.718078104 +0300
-@@ -1,7 +1,6 @@
- #ifndef _LINUX_XFRM_H
- #define _LINUX_XFRM_H
-
--#include <linux/in6.h>
- #include <linux/types.h>
-
- /* All of the structures in this file may not change size as they are
-diff -Naur iproute2-4.6.0-orig/include/utils.h iproute2-4.6.0/include/utils.h
---- iproute2-4.6.0-orig/include/utils.h 2016-05-23 12:03:23.821826910 +0300
-+++ iproute2-4.6.0/include/utils.h 2016-05-23 12:04:23.718078104 +0300
-@@ -1,6 +1,7 @@
- #ifndef __UTILS_H__
- #define __UTILS_H__ 1
-
-+#include <sys/param.h> /* MAXPATHLEN */
- #include <sys/types.h>
- #include <asm/types.h>
- #include <resolv.h>
diff --git a/meta/recipes-connectivity/iproute2/iproute2_4.7.0.bb b/meta/recipes-connectivity/iproute2/iproute2_4.7.0.bb
deleted file mode 100644
index 426f989160..0000000000
--- a/meta/recipes-connectivity/iproute2/iproute2_4.7.0.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require iproute2.inc
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
- file://configure-cross.patch \
- file://0001-iproute2-de-bash-scripts.patch \
- file://iproute2-4.3.0-musl.patch \
- "
-SRC_URI[md5sum] = "d4b205830cdc2702f8a0cbd6232129cd"
-SRC_URI[sha256sum] = "8f60dbcfb33a79daae0638f53bdcaa4310c0aa59ae39af8a234020dc69bb7b92"
-
-# CFLAGS are computed in Makefile and reference CCOPTS
-#
-EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb b/meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb
new file mode 100644
index 0000000000..8a86cbf78c
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb
@@ -0,0 +1,12 @@
+require iproute2.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
+ file://0001-libc-compat.h-add-musl-workaround.patch \
+ "
+
+SRC_URI[md5sum] = "227404413c8d6db649d6188ead1e5a6e"
+SRC_URI[sha256sum] = "cb1c1e45993a3bd2438543fd4332d70f1726a6e6ff97dc613a8258c993117b3f"
+
+# CFLAGS are computed in Makefile and reference CCOPTS
+#
+EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init
deleted file mode 100755
index 6f29e9c6ed..0000000000
--- a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init
+++ /dev/null
@@ -1,78 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: irda
-# Required-Start: $network $remote_fs
-# Required-Stop: $network $remote_fs
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Infrared port support
-### END INIT INFO
-
-NAME="irattach"
-test -x "$IRDA_DAEMON" || IRDA_DAEMON=/usr/sbin/irattach
-test -z "$IRATTACH_PID" && IRATTACH_PID=/var/run/irattach.pid
-
-# Source function library.
-. /etc/init.d/functions
-
-module_id() {
- awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
-}
-
-if [ ! -f /etc/sysconfig/irda ]; then
- case `module_id` in
- "HP iPAQ H2200" | "HP iPAQ HX4700" | "HTC Universal")
- IRDA=yes
- DEVICE=/dev/ttyS2
- DONGLE=
- DISCOVERY=
- ;;
- *)
- IRDA=yes
- DEVICE=/dev/ttyS1
- DONGLE=
- DISCOVERY=
- ;;
- esac
-else
- . /etc/sysconfig/irda
-fi
-
-# Check that irda is up.
-[ ${IRDA} = "no" ] && exit 0
-
-[ -f /usr/sbin/irattach ] || exit 0
-
-ARGS=
-if [ $DONGLE ]; then
- ARGS="$ARGS -d $DONGLE"
-fi
-if [ "$DISCOVERY" = "yes" ];then
- ARGS="$ARGS -s"
-fi
-
-case "$1" in
- start)
- echo -n "Starting IrDA: $NAME"
- start-stop-daemon --start --quiet --exec "$IRDA_DAEMON" ${DEVICE} ${ARGS} --pidfile "$IRATTACH_PID"
- sleep 1
- [ -f /var/run/irattach.pid ] && echo " done" || echo " fail"
- ;;
- stop)
- echo "Stopping IrDA: $NAME"
- start-stop-daemon --stop --quiet --exec "$IRDA_DAEMON" --pidfile "$IRATTACH_PID"
- ;;
- restart|force-reload)
- $0 stop
- $0 start
- ;;
- status)
- status irattach
- exit $?
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
- exit 1
- ;;
-esac
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
deleted file mode 100644
index e95fe35f8f..0000000000
--- a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Obey LDFLAGS
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
-
---- irda-utils-0.9.18.orig/findchip/Makefile
-+++ irda-utils-0.9.18/findchip/Makefile
-@@ -65,5 +65,5 @@ install: findchip
-
- gfindchip: gfindchip.c
- $(prn_cc)
-- $(ECMD))$(CC) $(CFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
-+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
-
---- irda-utils-0.9.18.orig/irattach/Makefile
-+++ irda-utils-0.9.18/irattach/Makefile
-@@ -49,13 +49,13 @@ all: $(TARGETS)
-
- irattach: irattach.o util.o
- $(prn_cc_o)
-- $(ECMD)$(CC) $(CFLAGS) irattach.o util.o -o $@
-+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) irattach.o util.o -o $@
-
-
-
- dongle_attach: dongle_attach.o
- $(prn_cc_o)
-- $(ECMD)$(CC) $(CFLAGS) dongle_attach.o -o $@
-+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) dongle_attach.o -o $@
-
-
- install: $(TARGETS)
---- irda-utils-0.9.18.orig/irdadump/Makefile
-+++ irda-utils-0.9.18/irdadump/Makefile
-@@ -40,7 +40,7 @@ lib_irdadump.a: $(LIBIRDADUMP_OBJS)
-
- irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET)
- $(prn_cc_o)
-- $(ECMD)$(CC) $(CFLAGS) `pkg-config --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
-+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) `pkg-config --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
-
-
- .c.o:
---- irda-utils-0.9.18.orig/irdaping/Makefile
-+++ irda-utils-0.9.18/irdaping/Makefile
-@@ -56,7 +56,7 @@ all: $(TARGETS)
-
- irdaping: $(OBJS)
- $(prn_cc_o)
-- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
-+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
-
-
- .c.o:
---- irda-utils-0.9.18.orig/irnetd/Makefile
-+++ irda-utils-0.9.18/irnetd/Makefile
-@@ -50,7 +50,7 @@ all: $(TARGETS)
-
- irnetd: $(OBJS)
- $(prn_cc_o)
-- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
-+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
-
-
- install: irnetd
---- irda-utils-0.9.18.orig/psion/Makefile
-+++ irda-utils-0.9.18/psion/Makefile
-@@ -25,4 +25,4 @@ install: $(PSION_TARGETS)
- CFLAGS += -g -I../include -Wall -Wstrict-prototypes $(RPM_OPT_FLAGS)
- irpsion5:
- $(prn_cc_o)
-- $(ECMD)$(CC) $(CFLAGS) $(PSION_SRC) -o $@
-\ No newline at end of file
-+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(PSION_SRC) -o $@
-\ No newline at end of file
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch
deleted file mode 100644
index 97eb975023..0000000000
--- a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Replace use of <net/if_packet.h> with <linux/if_packet.h>.
-
-kernel headers <linux/if_packet.h> already provides the
-needed definitions, moreover not all libc implementations
-provide if_packet.h e.g. musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: irda-utils-0.9.18/irdaping/irdaping.c
-===================================================================
---- irda-utils-0.9.18.orig/irdaping/irdaping.c
-+++ irda-utils-0.9.18/irdaping/irdaping.c
-@@ -33,7 +33,6 @@
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- #include <net/if.h> /* For struct ifreq */
--#include <net/if_packet.h> /* For struct sockaddr_pkt */
- #include <net/if_arp.h> /* For ARPHRD_IRDA */
- #include <netinet/if_ether.h> /* For ETH_P_ALL */
- #include <netinet/in.h> /* For htons */
-@@ -46,6 +45,7 @@
- #include <asm/byteorder.h> /* __cpu_to_le32 and co. */
-
- #include <linux/types.h> /* For __u8 and co. */
-+#include <linux/if_packet.h> /* For struct sockaddr_pkt */
- #include <irda.h>
-
- #ifndef AF_IRDA
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
deleted file mode 100644
index 11b2ee9117..0000000000
--- a/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Common files for IrDA"
-DESCRIPTION = "Provides common files needed to use IrDA. \
-IrDA allows communication over Infrared with other devices \
-such as phones and laptops."
-HOMEPAGE = "http://irda.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/p/irda/bugs/"
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://irdadump/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://smcinit/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://man/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://irdadump/irdadump.c;beginline=1;endline=24;md5=d78b9dce3cd78c2220250c9c7a2be178"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
- file://ldflags.patch \
- file://musl.patch \
- file://init"
-
-SRC_URI[md5sum] = "84dc12aa4c3f61fccb8d8919bf4079bb"
-SRC_URI[sha256sum] = "61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6"
-
-inherit update-rc.d
-
-EXTRA_OEMAKE = "\
- 'CC=${CC}' \
- 'LD=${LD}' \
- 'CFLAGS=${CFLAGS}' \
- 'LDFLAGS=${LDFLAGS}' \
- 'SYS_INCLUDES=' \
- 'V=1' \
-"
-
-INITSCRIPT_NAME = "irattach"
-INITSCRIPT_PARAMS = "defaults 20"
-
-TARGETS ??= "irattach irdaping"
-do_compile () {
- for t in ${TARGETS}; do
- oe_runmake -C $t
- done
-}
-
-do_install () {
- install -d ${D}${sbindir}
- for t in ${TARGETS}; do
- oe_runmake -C $t ROOT="${D}" install
- done
-
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
-}
diff --git a/meta/recipes-connectivity/iw/iw/separate-objdir.patch b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
index 0ea6a52789..eb01a5a14e 100644
--- a/meta/recipes-connectivity/iw/iw/separate-objdir.patch
+++ b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
@@ -7,29 +7,36 @@ Upstream-Status: Pending
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
-diff -Naur iw-4.3-origin/Makefile iw-4.3/Makefile
---- iw-4.3-origin/Makefile 2015-11-20 16:37:58.752077287 +0200
-+++ iw-4.3/Makefile 2015-11-20 16:57:15.510615815 +0200
-@@ -1,5 +1,7 @@
+ Makefile | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 33aaf6a..9030796 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,9 @@
MAKEFLAGS += --no-print-directory
--
+
+SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
+OBJDIR ?= $(PWD)
+VPATH = $(SRCDIR)
++
PREFIX ?= /usr
SBINDIR ?= $(PREFIX)/sbin
MANDIR ?= $(PREFIX)/share/man
-@@ -95,11 +97,11 @@
+@@ -103,11 +107,11 @@ VERSION_OBJS := $(filter-out version.o, $(OBJS))
version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \
$(wildcard .git/index .git/refs/tags)
@$(NQ) ' GEN ' $@
- $(Q)./version.sh $@
+ $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@
-
+
%.o: %.c iw.h nl80211.h
@$(NQ) ' CC ' $@
-- $(Q)$(CC) $(CFLAGS) -c -o $@ $<
-+ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) -c -o $@ $<
-
+- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
++ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
ifeq ($(IW_ANDROID_BUILD),)
iw: $(OBJS)
+--
+2.20.1 (Apple Git-117)
diff --git a/meta/recipes-connectivity/iw/iw_4.7.bb b/meta/recipes-connectivity/iw/iw_4.7.bb
deleted file mode 100644
index e9f414129c..0000000000
--- a/meta/recipes-connectivity/iw/iw_4.7.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
-DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
-wireless devices. It supports almost all new drivers that have been added \
-to the kernel recently. "
-HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
-SECTION = "base"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
-
-DEPENDS = "libnl"
-
-SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
- file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
- file://separate-objdir.patch \
-"
-
-SRC_URI[md5sum] = "19d1edd276b2ac0c6cccfc7ae8d2b732"
-SRC_URI[sha256sum] = "758092229f13d691968060a0ad41364ba8eb8da4503626c20233a5b1eb33b4d9"
-
-inherit pkgconfig
-
-EXTRA_OEMAKE = "\
- -f '${S}/Makefile' \
- \
- 'PREFIX=${prefix}' \
- 'SBINDIR=${sbindir}' \
- 'MANDIR=${mandir}' \
-"
-B = "${WORKDIR}/build"
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
diff --git a/meta/recipes-connectivity/iw/iw_5.3.bb b/meta/recipes-connectivity/iw/iw_5.3.bb
new file mode 100644
index 0000000000..f7f13f5a30
--- /dev/null
+++ b/meta/recipes-connectivity/iw/iw_5.3.bb
@@ -0,0 +1,32 @@
+SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
+DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
+wireless devices. It supports almost all new drivers that have been added \
+to the kernel recently. "
+HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
+SECTION = "base"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
+
+DEPENDS = "libnl"
+
+SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
+ file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
+ file://separate-objdir.patch \
+"
+
+SRC_URI[md5sum] = "6d4d1c0ee34f3a7bda0e6aafcd7aaf31"
+SRC_URI[sha256sum] = "175abbfce86348c0b70e778c13a94c0bfc9abc7a506d2bd608261583aeedf64a"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "\
+ -f '${S}/Makefile' \
+ \
+ 'PREFIX=${prefix}' \
+ 'SBINDIR=${sbindir}' \
+ 'MANDIR=${mandir}' \
+"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch b/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch
deleted file mode 100644
index f63eb90cdc..0000000000
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From bdf01a581d58eb5340e9238d143dbcac9db5b11c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 30 Jan 2016 19:29:45 +0000
-Subject: [PATCH] check for nss.h
-
-nss.h may not available on all libc implementations, e.g. musl does not
-have this header, this patch detects nss.h presence and defines the data
-types that are required if nss.h is missing on platform
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 2 +-
- src/nss.c | 11 +++++++++++
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index aa66bc6..ce19b07 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -71,7 +71,7 @@ AC_PROG_LIBTOOL
-
- # Checks for header files.
- AC_HEADER_STDC
--AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h])
-+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h nss.h])
-
- # Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
-diff --git a/src/nss.c b/src/nss.c
-index e48e315..406733b 100644
---- a/src/nss.c
-+++ b/src/nss.c
-@@ -29,7 +29,18 @@
- #include <assert.h>
- #include <netdb.h>
- #include <sys/socket.h>
-+#ifdef HAVE_NSS_H
- #include <nss.h>
-+#else
-+enum nss_status {
-+ NSS_STATUS_TRYAGAIN = -2,
-+ NSS_STATUS_UNAVAIL,
-+ NSS_STATUS_NOTFOUND,
-+ NSS_STATUS_SUCCESS,
-+ NSS_STATUS_RETURN
-+};
-+#endif
-+
- #include <stdio.h>
- #include <stdlib.h>
-
---
-2.7.0
-
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index 8d2feec769..953505971a 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -9,7 +9,6 @@ DEPENDS = "avahi"
PR = "r7"
SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz \
- file://0001-check-for-nss.h.patch \
"
SRC_URI[md5sum] = "03938f17646efbb50aa70ba5f99f51d7"
@@ -17,8 +16,12 @@ SRC_URI[sha256sum] = "1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d81
S = "${WORKDIR}/nss-mdns-${PV}"
+localstatedir = "/"
+
inherit autotools
+COMPATIBLE_HOST_libc-musl = 'null'
+
EXTRA_OECONF = "--libdir=${base_libdir} --disable-lynx --enable-avahi"
# suppress warning, but don't bother with autonamer
@@ -28,13 +31,16 @@ DEBIANNAME_${PN} = "libnss-mdns"
RDEPENDS_${PN} = "avahi-daemon"
pkg_postinst_${PN} () {
- sed -e '/^hosts:/s/\s*\<mdns\>//' \
- -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns4_minimal [NOTFOUND=return]\3\4 mdns\5/' \
- -i $D${sysconfdir}/nsswitch.conf
+ sed '
+ /^hosts:/ !b
+ /\<mdns\(4\|6\)\?\(_minimal\)\?\>/ b
+ s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g
+ ' -i $D${sysconfdir}/nsswitch.conf
}
pkg_prerm_${PN} () {
- sed -e '/^hosts:/s/\s*\<mdns\>//' \
- -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \
- -i $D${sysconfdir}/nsswitch.conf
+ sed '
+ /^hosts:/ !b
+ s/[[:blank:]]\+mdns\(4\|6\)\?\(_minimal\( \[NOTFOUND=return\]\)\?\)\?//g
+ ' -i $D${sysconfdir}/nsswitch.conf
}
diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
deleted file mode 100644
index 7b29a52dcd..0000000000
--- a/meta/recipes-connectivity/libpcap/libpcap.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Interface for user-level network packet capture"
-DESCRIPTION = "Libpcap provides a portable framework for low-level network \
-monitoring. Libpcap can provide network statistics collection, \
-security monitoring and network debugging."
-HOMEPAGE = "http://www.tcpdump.org/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
-SECTION = "libs/network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453 \
- file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2"
-DEPENDS = "flex-native bison-native"
-
-INC_PR = "r5"
-
-SRC_URI = "http://www.tcpdump.org/release/${BP}.tar.gz"
-
-BINCONFIG = "${bindir}/pcap-config"
-
-inherit autotools binconfig-disabled pkgconfig bluetooth
-
-EXTRA_OECONF = "--with-pcap=linux"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-"
-PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
-# Add a dummy PACKAGECONFIG for bluez5 since it is not supported by libpcap.
-PACKAGECONFIG[bluez5] = ",,"
-PACKAGECONFIG[canusb] = "--enable-canusb,--enable-canusb=no,libusb"
-PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-PACKAGECONFIG[libnl] = "--with-libnl,--without-libnl,libnl"
-
-CPPFLAGS_prepend = "-I${S} "
-CFLAGS_prepend = "-I${S} "
-CXXFLAGS_prepend = "-I${S} "
-
-do_configure_prepend () {
- if [ ! -e ${S}/acinclude.m4 ]; then
- cat ${S}/aclocal.m4 > ${S}/acinclude.m4
- fi
- sed -i -e's,^V_RPATH_OPT=.*$,V_RPATH_OPT=,' ${S}/pcap-config.in
-}
diff --git a/meta/recipes-connectivity/libpcap/libpcap/aclocal.patch b/meta/recipes-connectivity/libpcap/libpcap/aclocal.patch
deleted file mode 100644
index 21519825c3..0000000000
--- a/meta/recipes-connectivity/libpcap/libpcap/aclocal.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff -ruN libpcap-1.1.1-orig/aclocal.m4 libpcap-1.1.1/aclocal.m4
---- libpcap-1.1.1-orig/aclocal.m4 2010-06-29 10:46:32.815117569 +0800
-+++ libpcap-1.1.1/aclocal.m4 2010-06-29 10:49:17.150149949 +0800
-@@ -37,7 +37,7 @@
- dnl AC_LBL_C_INIT. Now, we run AC_LBL_C_INIT_BEFORE_CC, AC_PROG_CC,
- dnl and AC_LBL_C_INIT at the top level.
- dnl
--AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
-+AC_DEFUN([AC_LBL_C_INIT_BEFORE_CC],
- [
- AC_BEFORE([$0], [AC_LBL_C_INIT])
- AC_BEFORE([$0], [AC_PROG_CC])
-@@ -90,7 +90,7 @@
- dnl LDFLAGS
- dnl LBL_CFLAGS
- dnl
--AC_DEFUN(AC_LBL_C_INIT,
-+AC_DEFUN([AC_LBL_C_INIT],
- [
- AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
- AC_BEFORE([$0], [AC_LBL_DEVEL])
-@@ -217,7 +217,7 @@
- dnl V_SONAME_OPT
- dnl V_RPATH_OPT
- dnl
--AC_DEFUN(AC_LBL_SHLIBS_INIT,
-+AC_DEFUN([AC_LBL_SHLIBS_INIT],
- [AC_PREREQ(2.50)
- if test "$GCC" = yes ; then
- #
-@@ -361,7 +361,7 @@
- # Make sure we use the V_CCOPT flags, because some of those might
- # disable inlining.
- #
--AC_DEFUN(AC_LBL_C_INLINE,
-+AC_DEFUN([AC_LBL_C_INLINE],
- [AC_MSG_CHECKING(for inline)
- save_CFLAGS="$CFLAGS"
- CFLAGS="$V_CCOPT"
-@@ -407,7 +407,7 @@
- dnl
- dnl AC_LBL_FIXINCLUDES
- dnl
--AC_DEFUN(AC_LBL_FIXINCLUDES,
-+AC_DEFUN([AC_LBL_FIXINCLUDES],
- [if test "$GCC" = yes ; then
- AC_MSG_CHECKING(for ANSI ioctl definitions)
- AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes,
-@@ -453,7 +453,7 @@
- dnl $2 (yacc appended)
- dnl $3 (optional flex and bison -P prefix)
- dnl
--AC_DEFUN(AC_LBL_LEX_AND_YACC,
-+AC_DEFUN([AC_LBL_LEX_AND_YACC],
- [AC_ARG_WITH(flex, [ --without-flex don't use flex])
- AC_ARG_WITH(bison, [ --without-bison don't use bison])
- if test "$with_flex" = no ; then
-@@ -506,7 +506,7 @@
- dnl
- dnl DECLWAITSTATUS (defined)
- dnl
--AC_DEFUN(AC_LBL_UNION_WAIT,
-+AC_DEFUN([AC_LBL_UNION_WAIT],
- [AC_MSG_CHECKING(if union wait is used)
- AC_CACHE_VAL(ac_cv_lbl_union_wait,
- AC_TRY_COMPILE([
-@@ -535,7 +535,7 @@
- dnl
- dnl HAVE_SOCKADDR_SA_LEN (defined)
- dnl
--AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN,
-+AC_DEFUN([AC_LBL_SOCKADDR_SA_LEN],
- [AC_MSG_CHECKING(if sockaddr struct has the sa_len member)
- AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len,
- AC_TRY_COMPILE([
-@@ -560,7 +560,7 @@
- dnl
- dnl HAVE_SOCKADDR_STORAGE (defined)
- dnl
--AC_DEFUN(AC_LBL_SOCKADDR_STORAGE,
-+AC_DEFUN([AC_LBL_SOCKADDR_STORAGE],
- [AC_MSG_CHECKING(if sockaddr_storage struct exists)
- AC_CACHE_VAL(ac_cv_lbl_has_sockaddr_storage,
- AC_TRY_COMPILE([
-@@ -593,7 +593,7 @@
- dnl won't be using code that would use that member, or we wouldn't
- dnl compile in any case).
- dnl
--AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1,
-+AC_DEFUN([AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1],
- [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member)
- AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
- AC_TRY_COMPILE([
-@@ -619,7 +619,7 @@
- dnl
- dnl ac_cv_lbl_have_run_path (yes or no)
- dnl
--AC_DEFUN(AC_LBL_HAVE_RUN_PATH,
-+AC_DEFUN([AC_LBL_HAVE_RUN_PATH],
- [AC_MSG_CHECKING(for ${CC-cc} -R)
- AC_CACHE_VAL(ac_cv_lbl_have_run_path,
- [echo 'main(){}' > conftest.c
-@@ -644,7 +644,7 @@
- dnl
- dnl LBL_ALIGN (DEFINED)
- dnl
--AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
-+AC_DEFUN([AC_LBL_UNALIGNED_ACCESS],
- [AC_MSG_CHECKING(if unaligned accesses fail)
- AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
- [case "$host_cpu" in
-@@ -749,7 +749,7 @@
- dnl HAVE_OS_PROTO_H (defined)
- dnl os-proto.h (symlinked)
- dnl
--AC_DEFUN(AC_LBL_DEVEL,
-+AC_DEFUN([AC_LBL_DEVEL],
- [rm -f os-proto.h
- if test "${LBL_CFLAGS+set}" = set; then
- $1="$$1 ${LBL_CFLAGS}"
-@@ -886,7 +886,7 @@
- dnl statically and happen to have a libresolv.a lying around (and no
- dnl libnsl.a).
- dnl
--AC_DEFUN(AC_LBL_LIBRARY_NET, [
-+AC_DEFUN([AC_LBL_LIBRARY_NET], [
- # Most operating systems have gethostbyname() in the default searched
- # libraries (i.e. libc):
- # Some OSes (eg. Solaris) place it in libnsl
-@@ -909,7 +909,7 @@
- dnl Test for __attribute__
- dnl
-
--AC_DEFUN(AC_C___ATTRIBUTE__, [
-+AC_DEFUN([AC_C___ATTRIBUTE__], [
- AC_MSG_CHECKING(for __attribute__)
- AC_CACHE_VAL(ac_cv___attribute__, [
- AC_COMPILE_IFELSE(
-@@ -947,7 +947,7 @@
- dnl
- dnl -Scott Barron
- dnl
--AC_DEFUN(AC_LBL_TPACKET_STATS,
-+AC_DEFUN([AC_LBL_TPACKET_STATS],
- [AC_MSG_CHECKING(if if_packet.h has tpacket_stats defined)
- AC_CACHE_VAL(ac_cv_lbl_tpacket_stats,
- AC_TRY_COMPILE([
-@@ -976,7 +976,7 @@
- dnl doesn't have that member (which is OK, as either we won't be using
- dnl code that would use that member, or we wouldn't compile in any case).
- dnl
--AC_DEFUN(AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI,
-+AC_DEFUN([AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI],
- [AC_MSG_CHECKING(if tpacket_auxdata struct has tp_vlan_tci member)
- AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
- AC_TRY_COMPILE([
-@@ -1003,7 +1003,7 @@
- dnl
- dnl HAVE_DLPI_PASSIVE (defined)
- dnl
--AC_DEFUN(AC_LBL_DL_PASSIVE_REQ_T,
-+AC_DEFUN([AC_LBL_DL_PASSIVE_REQ_T],
- [AC_MSG_CHECKING(if dl_passive_req_t struct exists)
- AC_CACHE_VAL(ac_cv_lbl_has_dl_passive_req_t,
- AC_TRY_COMPILE([
diff --git a/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch b/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch
deleted file mode 100644
index b8615135b0..0000000000
--- a/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 8887132e85892a72a84ca3878e60f254ad2ce939 Mon Sep 17 00:00:00 2001
-From: Joe MacDonald <joe_macdonald@mentor.com>
-Date: Tue, 24 Feb 2015 15:56:06 -0500
-Subject: [PATCH] libpcap: pkgconfig support
-
-Adding basic structure to support pkg-config.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
----
- Makefile.in | 5 +++++
- configure.in | 1 +
- libpcap.pc.in | 10 ++++++++++
- 3 files changed, 16 insertions(+)
- create mode 100644 libpcap.pc.in
-
-diff --git a/Makefile.in b/Makefile.in
-index 1c2d745..1f25faf 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -60,6 +60,10 @@ V_RPATH_OPT = @V_RPATH_OPT@
- DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
- PROG=libpcap
-
-+# pkgconfig support
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = libpcap.pc
-+
- # Standard CFLAGS
- FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
-
-@@ -275,6 +279,7 @@ EXTRA_DIST = \
- lbl/os-solaris2.h \
- lbl/os-sunos4.h \
- lbl/os-ultrix4.h \
-+ libpcap.pc \
- missing/snprintf.c \
- mkdep \
- msdos/bin2c.c \
-diff --git a/configure.in b/configure.in
-index 8f5c86b..fb51b35 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1700,6 +1700,7 @@ esac
- AC_PROG_INSTALL
-
- AC_CONFIG_HEADER(config.h)
-+AC_CONFIG_FILES([libpcap.pc])
-
- AC_OUTPUT_COMMANDS([if test -f .devel; then
- echo timestamp > stamp-h
-diff --git a/libpcap.pc.in b/libpcap.pc.in
-new file mode 100644
-index 0000000..4f78ad8
---- /dev/null
-+++ b/libpcap.pc.in
-@@ -0,0 +1,10 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+Name: libpcap
-+Description: System-independent interface for user-level packet capture.
-+Version: @VERSION@
-+Libs: -L${libdir} -lpcap
-+Cflags: -I${includedir}
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.7.4.bb b/meta/recipes-connectivity/libpcap/libpcap_1.7.4.bb
deleted file mode 100644
index 8d12b25213..0000000000
--- a/meta/recipes-connectivity/libpcap/libpcap_1.7.4.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require libpcap.inc
-
-SRC_URI += "file://aclocal.patch \
- file://libpcap-pkgconfig-support.patch \
- "
-SRC_URI[md5sum] = "b2e13142bbaba857ab1c6894aedaf547"
-SRC_URI[sha256sum] = "7ad3112187e88328b85e46dce7a9b949632af18ee74d97ffc3f2b41fe7f448b0"
-
-#
-# make install doesn't cover the shared lib
-# make install-shared is just broken (no symlinks)
-#
-
-do_configure_prepend () {
- #remove hardcoded references to /usr/include
- sed 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i ${S}/configure.in
-}
-
-do_install_prepend () {
- install -d ${D}${libdir}
- install -d ${D}${bindir}
- oe_runmake install-shared DESTDIR=${D}
- oe_libinstall -a -so libpcap ${D}${libdir}
- sed "s|@VERSION@|${PV}|" -i ${B}/libpcap.pc
- install -D -m 0644 libpcap.pc ${D}${libdir}/pkgconfig/libpcap.pc
-}
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.9.1.bb b/meta/recipes-connectivity/libpcap/libpcap_1.9.1.bb
new file mode 100644
index 0000000000..35bb5650b3
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap_1.9.1.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Interface for user-level network packet capture"
+DESCRIPTION = "Libpcap provides a portable framework for low-level network \
+monitoring. Libpcap can provide network statistics collection, \
+security monitoring and network debugging."
+HOMEPAGE = "http://www.tcpdump.org/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
+SECTION = "libs/network"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453 \
+ file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2"
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \
+ "
+SRC_URI[md5sum] = "21af603d9a591c7d96a6457021d84e6c"
+SRC_URI[sha256sum] = "635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094"
+
+inherit autotools binconfig-disabled pkgconfig
+
+BINCONFIG = "${bindir}/pcap-config"
+
+# Explicitly disable dag support. We don't have recipe for it and if enabled here,
+# configure script poisons the include dirs with /usr/local/include even when the
+# support hasn't been detected.
+EXTRA_OECONF = " \
+ --with-pcap=linux \
+ --without-dag \
+ "
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[bluez5] = "--enable-bluetooth,--disable-bluetooth,bluez5"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[libnl] = "--with-libnl,--without-libnl,libnl"
+
+do_configure_prepend () {
+ #remove hardcoded references to /usr/include
+ sed 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i ${S}/configure.ac
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
index bd488eb089..0b0bbab168 100644
--- a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
+++ b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
@@ -1,12 +1,15 @@
SUMMARY = "Mobile Broadband Service Provider Database"
+HOMEPAGE = "http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders"
SECTION = "network"
LICENSE = "PD"
LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04"
-SRCREV = "519465766fabc85b9fdea5f2b5ee3d08c2b1f70d"
-PV = "20151214"
+SRCREV = "22b49d86fb7aded2c195a9d49e5924da696b3228"
+PV = "20190618"
PE = "1"
-SRC_URI = "git://git.gnome.org/mobile-broadband-provider-info"
+SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https"
S = "${WORKDIR}/git"
inherit autotools
+
+DEPENDS += "libxslt-native"
diff --git a/meta/recipes-connectivity/neard/neard/0001-Add-header-dependency-to-nciattach.o.patch b/meta/recipes-connectivity/neard/neard/0001-Add-header-dependency-to-nciattach.o.patch
new file mode 100644
index 0000000000..d8e8a5e5da
--- /dev/null
+++ b/meta/recipes-connectivity/neard/neard/0001-Add-header-dependency-to-nciattach.o.patch
@@ -0,0 +1,35 @@
+From affaa2021a54c30353e4e1fee09c13a4de2196be Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 17 Mar 2017 14:24:29 +0200
+Subject: [PATCH] Add header dependency to nciattach.o
+
+This can happen when compiling nciattach.o:
+
+| In file included from ../neard-0.16/tools/nciattach.c:47:0:
+| ../neard-0.16/src/near.h:30:27: fatal error: near/nfc_copy.h: No such
+file or directory
+| #include <near/nfc_copy.h>
+
+Add the missing dependency to local headers.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted [mailinglist]
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index fa552ee..acef6ba 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -253,6 +253,7 @@ se/builtin.h: src/genbuiltin $(builtin_se_sources)
+
+ $(src_neard_OBJECTS) \
+ $(tools_nfctool_nfctool_OBJECTS) \
++$(tools_nciattach_OBJECTS) \
+ $(plugin_objects) \
+ $(se_seeld_OBJECTS) \
+ $(unit_test_ndef_parse_OBJECTS) \
+--
+2.11.0
+
diff --git a/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch b/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
index 466067693d..6e864079a9 100644
--- a/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
+++ b/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
@@ -16,18 +16,15 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Makefile.am | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Makefile.am b/Makefile.am
-index 3241311..a43eaa2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -164,6 +164,7 @@ MAINTAINERCLEANFILES = Makefile.in \
+Index: neard-0.16/Makefile.am
+===================================================================
+--- neard-0.16.orig/Makefile.am
++++ neard-0.16/Makefile.am
+@@ -244,6 +244,7 @@ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(di
src/plugin.$(OBJEXT): src/builtin.h
src/builtin.h: src/genbuiltin $(builtin_sources)
+ $(AM_V_at)$(MKDIR_P) src
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
- $(src_neard_OBJECTS) \
---
-1.7.9.5
-
+ se/plugin.$(OBJEXT): se/builtin.h
diff --git a/meta/recipes-connectivity/neard/neard_0.16.bb b/meta/recipes-connectivity/neard/neard_0.16.bb
index 5433dc3c3e..7c124a3c0b 100644
--- a/meta/recipes-connectivity/neard/neard_0.16.bb
+++ b/meta/recipes-connectivity/neard/neard_0.16.bb
@@ -9,6 +9,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BP}.tar.xz \
file://neard.in \
file://Makefile.am-fix-parallel-issue.patch \
file://Makefile.am-do-not-ship-version.h.patch \
+ file://0001-Add-header-dependency-to-nciattach.o.patch \
"
SRC_URI[md5sum] = "5c691fb7872856dc0d909c298bc8cb41"
SRC_URI[sha256sum] = "eae3b11c541a988ec11ca94b7deab01080cd5b58cfef3ced6ceac9b6e6e65b36"
@@ -17,9 +18,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
"
-inherit autotools pkgconfig systemd update-rc.d bluetooth
+inherit autotools pkgconfig systemd update-rc.d
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-systemduserunitdir=${systemd_unitdir}/user/,--disable-systemd"
@@ -39,7 +40,7 @@ RDEPENDS_${PN} = "dbus"
# Bluez & Wifi are not mandatory except for handover
RRECOMMENDS_${PN} = "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
"
diff --git a/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch b/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
deleted file mode 100644
index 14bd4036af..0000000000
--- a/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 398fed3bb0350cb1229e54e7020ae0e044c206d1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de>
-Date: Wed, 17 Feb 2016 08:33:45 +0100
-Subject: bugfix: adjust statd service name
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream uses 'rpc-statd.service' and Yocto introduced 'nfs-statd.service'
-instead but forgot to update the mount.nfs helper 'start-statd' accordingly.
-
-Upstream-Status: Inappropriate [other]
-
-Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
----
- utils/statd/start-statd | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/statd/start-statd b/utils/statd/start-statd
-index 8211a90..3c2aa6f 100755
---- a/utils/statd/start-statd
-+++ b/utils/statd/start-statd
-@@ -16,7 +16,7 @@ fi
- # First try systemd if it's installed.
- if [ -d /run/systemd/system ]; then
- # Quit only if the call worked.
-- systemctl start rpc-statd.service && exit
-+ systemctl start nfs-statd.service && exit
- fi
-
- # Fall back to launching it ourselves.
---
-2.1.4
-
diff --git a/meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch b/meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch
deleted file mode 100644
index 85002290f0..0000000000
--- a/meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-[PATCH] nfs-utils: debianize start-statd
-
-Upstream-Status: Pending
-
-make start-statd command to use nfscommon configure, too.
-
-Signed-off-by: Henrik Riomar <henrik.riomar@ericsson.com>
-Signed-off-by: Li Wang <li.wang@windriver.com>
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- utils/statd/start-statd | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/utils/statd/start-statd b/utils/statd/start-statd
-index ec9383b..3969b8c 100755
---- a/utils/statd/start-statd
-+++ b/utils/statd/start-statd
-@@ -6,6 +6,13 @@
- # site.
- PATH="/sbin:/usr/sbin:/bin:/usr/bin"
-
-+# Read config
-+DEFAULTFILE=/etc/default/nfs-common
-+NEED_IDMAPD=
-+if [ -f $DEFAULTFILE ]; then
-+ . $DEFAULTFILE
-+fi
-+
- # First try systemd if it's installed.
- if systemctl --help >/dev/null 2>&1; then
- # Quit only if the call worked.
-@@ -13,4 +20,4 @@ if systemctl --help >/dev/null 2>&1; then
- fi
-
- # Fall back to launching it ourselves.
--exec rpc.statd --no-notify
-+exec rpc.statd --no-notify $STATDOPTS
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch b/meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch
deleted file mode 100644
index 4ac5290440..0000000000
--- a/meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From a5e95a42e7bceddc9ecad06694c1a0588f4bafc8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 14 Apr 2015 07:22:47 -0700
-Subject: [PATCH] include sys/types.h for getting u_* typedefs
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- cfg.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/cfg.h b/cfg.h
-index d4d4cab..fe49e8f 100644
---- a/cfg.h
-+++ b/cfg.h
-@@ -33,6 +33,7 @@
- #ifndef _CONF_H_
- #define _CONF_H_
-
-+#include <sys/types.h>
- #include "queue.h"
-
- struct conf_list_node {
---
-2.1.4
-
diff --git a/meta/recipes-connectivity/nfs-utils/libnfsidmap/Set_nobody_user_group.patch b/meta/recipes-connectivity/nfs-utils/libnfsidmap/Set_nobody_user_group.patch
deleted file mode 100644
index 4633da919e..0000000000
--- a/meta/recipes-connectivity/nfs-utils/libnfsidmap/Set_nobody_user_group.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Set nobody user and group
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---- a/idmapd.conf
-+++ b/idmapd.conf
-@@ -17,8 +17,8 @@
-
- [Mapping]
-
--#Nobody-User = nobody
--#Nobody-Group = nobody
-+Nobody-User = nobody
-+Nobody-Group = nogroup
-
- [Translation]
-
diff --git a/meta/recipes-connectivity/nfs-utils/libnfsidmap/fix-ac-prereq.patch b/meta/recipes-connectivity/nfs-utils/libnfsidmap/fix-ac-prereq.patch
deleted file mode 100644
index d81c7c5f32..0000000000
--- a/meta/recipes-connectivity/nfs-utils/libnfsidmap/fix-ac-prereq.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
---- a/configure.in
-+++ b/configure.in
-@@ -1,7 +1,7 @@
- # -*- Autoconf -*-
- # Process this file with autoconf to produce a configure script.
-
--AC_PREREQ([2.68])
-+AC_PREREQ([2.65])
- AC_INIT([libnfsidmap],[0.25],[linux-nfs@vger.kernel.org])
- AC_CONFIG_SRCDIR([nfsidmap.h])
- AC_CONFIG_MACRO_DIR([m4])
diff --git a/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb b/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb
deleted file mode 100644
index 2565771006..0000000000
--- a/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "NFS id mapping library"
-HOMEPAGE = "http://www.citi.umich.edu/projects/nfsv4/linux/"
-SECTION = "libs"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d9c6a2a0ca6017fda7cd905ed2739b37"
-
-SRC_URI = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${BPN}-${PV}.tar.gz \
- file://fix-ac-prereq.patch \
- file://Set_nobody_user_group.patch \
- file://0001-include-sys-types.h-for-getting-u_-typedefs.patch \
- "
-
-SRC_URI[md5sum] = "2ac4893c92716add1a1447ae01df77ab"
-SRC_URI[sha256sum] = "656d245d84400e1030f8f40a5a27da76370690c4a932baf249110f047fe7efcf"
-
-UPSTREAM_CHECK_URI = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/"
-
-inherit autotools
-
-EXTRA_OECONF = "--disable-ldap"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/
- install -m 0644 ${WORKDIR}/${BPN}-${PV}/idmapd.conf ${D}${sysconfdir}/idmapd.conf
-}
-
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Don-t-build-tools-with-CC_FOR_BUILD.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Don-t-build-tools-with-CC_FOR_BUILD.patch
new file mode 100644
index 0000000000..23bc3eaf72
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Don-t-build-tools-with-CC_FOR_BUILD.patch
@@ -0,0 +1,40 @@
+From 79019d976584c598f8d0a9d8de43c989946f974b Mon Sep 17 00:00:00 2001
+From: Pascal Bach <pascal.bach@siemens.com>
+Date: Wed, 13 Feb 2019 09:28:07 +0100
+Subject: [PATCH] Don't build tools with CC_FOR_BUILD
+
+The tools are intended for the target not for the host.
+
+Upstream-Status: Pending
+
+Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
+---
+ tools/locktest/Makefile.am | 1 -
+ tools/rpcgen/Makefile.am | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
+index 3156815..87d0bac 100644
+--- a/tools/locktest/Makefile.am
++++ b/tools/locktest/Makefile.am
+@@ -1,6 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+
+-CC=$(CC_FOR_BUILD)
+ LIBTOOL = @LIBTOOL@ --tag=CC
+
+ noinst_PROGRAMS = testlk
+diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
+index 8a9ec89..3e092c9 100644
+--- a/tools/rpcgen/Makefile.am
++++ b/tools/rpcgen/Makefile.am
+@@ -1,6 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+
+-CC=$(CC_FOR_BUILD)
+ LIBTOOL = @LIBTOOL@ --tag=CC
+
+ noinst_PROGRAMS = rpcgen
+--
+2.11.0
+
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch
new file mode 100644
index 0000000000..7b0f93535f
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch
@@ -0,0 +1,156 @@
+From 2fbc62e2a13fc22b6ae4910e295a2c10fb790486 Mon Sep 17 00:00:00 2001
+From: Zoltan Karcagi <zkr7432@gmail.com>
+Date: Mon, 12 Aug 2019 13:27:16 -0400
+Subject: [PATCH] Fix include order between config.h and stat.h
+
+At least on Arch linux ARM, the definition of struct stat in stat.h depends
+on __USE_FILE_OFFSET64. This symbol comes from config.h when defined,
+therefore config.h must always be included before stat.h. Fix all
+occurrences where the order is wrong by moving config.h to the top.
+
+This fixes the client side error "Stale file handle" when mounting from
+a server running Arch Linux ARM.
+
+Signed-off-by: Zoltan Karcagi <zkr7432@gmail.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+
+Upstream-Status: Backport
+[http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=2fbc62e2a13fc22b6ae4910e295a2c10fb790486]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ support/misc/nfsd_path.c | 5 ++++-
+ support/misc/xstat.c | 5 ++++-
+ support/nfs/conffile.c | 8 +++++++-
+ utils/blkmapd/device-discovery.c | 8 ++++----
+ utils/idmapd/idmapd.c | 8 ++++----
+ 5 files changed, 23 insertions(+), 11 deletions(-)
+
+diff --git a/support/misc/nfsd_path.c b/support/misc/nfsd_path.c
+index 84e4802..f078a66 100644
+--- a/support/misc/nfsd_path.c
++++ b/support/misc/nfsd_path.c
+@@ -1,3 +1,7 @@
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -5,7 +9,6 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+
+-#include "config.h"
+ #include "conffile.h"
+ #include "xmalloc.h"
+ #include "xlog.h"
+diff --git a/support/misc/xstat.c b/support/misc/xstat.c
+index fa04788..4c997ee 100644
+--- a/support/misc/xstat.c
++++ b/support/misc/xstat.c
+@@ -1,3 +1,7 @@
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+@@ -5,7 +9,6 @@
+ #include <sys/sysmacros.h>
+ #include <unistd.h>
+
+-#include "config.h"
+ #include "xstat.h"
+
+ #ifdef HAVE_FSTATAT
+diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
+index b6400be..6ba8a35 100644
+--- a/support/nfs/conffile.c
++++ b/support/nfs/conffile.c
+@@ -500,7 +500,7 @@ conf_readfile(const char *path)
+
+ if ((stat (path, &sb) == 0) || (errno != ENOENT)) {
+ char *new_conf_addr = NULL;
+- size_t sz = sb.st_size;
++ off_t sz;
+ int fd = open (path, O_RDONLY, 0);
+
+ if (fd == -1) {
+@@ -517,6 +517,11 @@ conf_readfile(const char *path)
+
+ /* only after we have the lock, check the file size ready to read it */
+ sz = lseek(fd, 0, SEEK_END);
++ if (sz < 0) {
++ xlog_warn("conf_readfile: unable to determine file size: %s",
++ strerror(errno));
++ goto fail;
++ }
+ lseek(fd, 0, SEEK_SET);
+
+ new_conf_addr = malloc(sz+1);
+@@ -2162,6 +2167,7 @@ conf_write(const char *filename, const char *section, const char *arg,
+ ret = 0;
+
+ cleanup:
++ flush_outqueue(&inqueue, NULL);
+ flush_outqueue(&outqueue, NULL);
+
+ if (buff)
+diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c
+index e811703..f5f9b10 100644
+--- a/utils/blkmapd/device-discovery.c
++++ b/utils/blkmapd/device-discovery.c
+@@ -26,6 +26,10 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif /* HAVE_CONFIG_H */
++
+ #include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -51,10 +55,6 @@
+ #include <errno.h>
+ #include <libdevmapper.h>
+
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif /* HAVE_CONFIG_H */
+-
+ #include "device-discovery.h"
+ #include "xcommon.h"
+ #include "nfslib.h"
+diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
+index 62e37b8..267acea 100644
+--- a/utils/idmapd/idmapd.c
++++ b/utils/idmapd/idmapd.c
+@@ -34,6 +34,10 @@
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif /* HAVE_CONFIG_H */
++
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/inotify.h>
+@@ -62,10 +66,6 @@
+ #include <libgen.h>
+ #include <nfsidmap.h>
+
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif /* HAVE_CONFIG_H */
+-
+ #include "xlog.h"
+ #include "conffile.h"
+ #include "queue.h"
+--
+2.7.4
+
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch
new file mode 100644
index 0000000000..fcb0e99b33
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch
@@ -0,0 +1,295 @@
+From 690a90a5b7786e40b5447ad7c5f19a7657d27405 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Fri, 14 Dec 2018 17:44:32 +0800
+Subject: [PATCH] Makefile.am: fix undefined function for libnsm.a
+
+The source file of libnsm.a uses some function
+in ../support/misc/file.c, add ../support/misc/file.c
+to libnsm_a_SOURCES to fix build error when run
+"make -C tests statdb_dump":
+| ../support/nsm/libnsm.a(file.o): In function `nsm_make_pathname':
+| /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname'
+| /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname'
+| /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname'
+| ../support/nsm/libnsm.a(file.o): In function `nsm_setup_pathnames':
+| /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:280: undefined reference to `generic_setup_basedir'
+| collect2: error: ld returned 1 exit status
+
+As there is already one source file named file.c
+as support/nsm/file.c in support/nsm/Makefile.am,
+so rename ../support/misc/file.c to ../support/misc/misc.c.
+
+Upstream-Status: Submitted[https://marc.info/?l=linux-nfs&m=154502780423058&w=2]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+
+Rebase it.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ support/misc/Makefile.am | 2 +-
+ support/misc/file.c | 111 ---------------------------------------------------------------------------------------------------------------
+ support/misc/misc.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ support/nsm/Makefile.am | 2 +-
+ 4 files changed, 113 insertions(+), 113 deletions(-)
+
+diff --git a/support/misc/Makefile.am b/support/misc/Makefile.am
+index f9993e3..8b0e9db 100644
+--- a/support/misc/Makefile.am
++++ b/support/misc/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in
+
+ noinst_LIBRARIES = libmisc.a
+-libmisc_a_SOURCES = tcpwrapper.c from_local.c mountpoint.c file.c \
++libmisc_a_SOURCES = tcpwrapper.c from_local.c mountpoint.c misc.c \
+ nfsd_path.c workqueue.c xstat.c
+
+ MAINTAINERCLEANFILES = Makefile.in
+diff --git a/support/misc/file.c b/support/misc/file.c
+deleted file mode 100644
+index e7c3819..0000000
+--- a/support/misc/file.c
++++ /dev/null
+@@ -1,111 +0,0 @@
+-/*
+- * Copyright 2009 Oracle. All rights reserved.
+- * Copyright 2017 Red Hat, Inc. All rights reserved.
+- *
+- * This file is part of nfs-utils.
+- *
+- * nfs-utils is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2 of the License, or
+- * (at your option) any later version.
+- *
+- * nfs-utils is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with nfs-utils. If not, see <http://www.gnu.org/licenses/>.
+- */
+-
+-#include <sys/stat.h>
+-
+-#include <string.h>
+-#include <libgen.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <dirent.h>
+-#include <stdlib.h>
+-#include <stdbool.h>
+-#include <limits.h>
+-
+-#include "xlog.h"
+-#include "misc.h"
+-
+-/*
+- * Returns a dynamically allocated, '\0'-terminated buffer
+- * containing an appropriate pathname, or NULL if an error
+- * occurs. Caller must free the returned result with free(3).
+- */
+-__attribute__((__malloc__))
+-char *
+-generic_make_pathname(const char *base, const char *leaf)
+-{
+- size_t size;
+- char *path;
+- int len;
+-
+- size = strlen(base) + strlen(leaf) + 2;
+- if (size > PATH_MAX)
+- return NULL;
+-
+- path = malloc(size);
+- if (path == NULL)
+- return NULL;
+-
+- len = snprintf(path, size, "%s/%s", base, leaf);
+- if ((len < 0) || ((size_t)len >= size)) {
+- free(path);
+- return NULL;
+- }
+-
+- return path;
+-}
+-
+-
+-/**
+- * generic_setup_basedir - set up basedir
+- * @progname: C string containing name of program, for error messages
+- * @parentdir: C string containing pathname to on-disk state, or NULL
+- * @base: character buffer to contain the basedir that is set up
+- * @baselen: size of @base in bytes
+- *
+- * This runs before logging is set up, so error messages are directed
+- * to stderr.
+- *
+- * Returns true and sets up our basedir, if @parentdir was valid
+- * and usable; otherwise false is returned.
+- */
+-_Bool
+-generic_setup_basedir(const char *progname, const char *parentdir, char *base,
+- const size_t baselen)
+-{
+- static char buf[PATH_MAX];
+- struct stat st;
+- char *path;
+-
+- /* First: test length of name and whether it exists */
+- if ((strlen(parentdir) >= baselen) || (strlen(parentdir) >= PATH_MAX)) {
+- (void)fprintf(stderr, "%s: Directory name too long: %s",
+- progname, parentdir);
+- return false;
+- }
+- if (lstat(parentdir, &st) == -1) {
+- (void)fprintf(stderr, "%s: Failed to stat %s: %s",
+- progname, parentdir, strerror(errno));
+- return false;
+- }
+-
+- /* Ensure we have a clean directory pathname */
+- strncpy(buf, parentdir, sizeof(buf)-1);
+- path = dirname(buf);
+- if (*path == '.') {
+- (void)fprintf(stderr, "%s: Unusable directory %s",
+- progname, parentdir);
+- return false;
+- }
+-
+- xlog(D_CALL, "Using %s as the state directory", parentdir);
+- strcpy(base, parentdir);
+- return true;
+-}
+diff --git a/support/misc/misc.c b/support/misc/misc.c
+new file mode 100644
+index 0000000..e7c3819
+--- /dev/null
++++ b/support/misc/misc.c
+@@ -0,0 +1,111 @@
++/*
++ * Copyright 2009 Oracle. All rights reserved.
++ * Copyright 2017 Red Hat, Inc. All rights reserved.
++ *
++ * This file is part of nfs-utils.
++ *
++ * nfs-utils is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * nfs-utils is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with nfs-utils. If not, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <sys/stat.h>
++
++#include <string.h>
++#include <libgen.h>
++#include <stdio.h>
++#include <errno.h>
++#include <dirent.h>
++#include <stdlib.h>
++#include <stdbool.h>
++#include <limits.h>
++
++#include "xlog.h"
++#include "misc.h"
++
++/*
++ * Returns a dynamically allocated, '\0'-terminated buffer
++ * containing an appropriate pathname, or NULL if an error
++ * occurs. Caller must free the returned result with free(3).
++ */
++__attribute__((__malloc__))
++char *
++generic_make_pathname(const char *base, const char *leaf)
++{
++ size_t size;
++ char *path;
++ int len;
++
++ size = strlen(base) + strlen(leaf) + 2;
++ if (size > PATH_MAX)
++ return NULL;
++
++ path = malloc(size);
++ if (path == NULL)
++ return NULL;
++
++ len = snprintf(path, size, "%s/%s", base, leaf);
++ if ((len < 0) || ((size_t)len >= size)) {
++ free(path);
++ return NULL;
++ }
++
++ return path;
++}
++
++
++/**
++ * generic_setup_basedir - set up basedir
++ * @progname: C string containing name of program, for error messages
++ * @parentdir: C string containing pathname to on-disk state, or NULL
++ * @base: character buffer to contain the basedir that is set up
++ * @baselen: size of @base in bytes
++ *
++ * This runs before logging is set up, so error messages are directed
++ * to stderr.
++ *
++ * Returns true and sets up our basedir, if @parentdir was valid
++ * and usable; otherwise false is returned.
++ */
++_Bool
++generic_setup_basedir(const char *progname, const char *parentdir, char *base,
++ const size_t baselen)
++{
++ static char buf[PATH_MAX];
++ struct stat st;
++ char *path;
++
++ /* First: test length of name and whether it exists */
++ if ((strlen(parentdir) >= baselen) || (strlen(parentdir) >= PATH_MAX)) {
++ (void)fprintf(stderr, "%s: Directory name too long: %s",
++ progname, parentdir);
++ return false;
++ }
++ if (lstat(parentdir, &st) == -1) {
++ (void)fprintf(stderr, "%s: Failed to stat %s: %s",
++ progname, parentdir, strerror(errno));
++ return false;
++ }
++
++ /* Ensure we have a clean directory pathname */
++ strncpy(buf, parentdir, sizeof(buf)-1);
++ path = dirname(buf);
++ if (*path == '.') {
++ (void)fprintf(stderr, "%s: Unusable directory %s",
++ progname, parentdir);
++ return false;
++ }
++
++ xlog(D_CALL, "Using %s as the state directory", parentdir);
++ strcpy(base, parentdir);
++ return true;
++}
+diff --git a/support/nsm/Makefile.am b/support/nsm/Makefile.am
+index 8f5874e..68f1a46 100644
+--- a/support/nsm/Makefile.am
++++ b/support/nsm/Makefile.am
+@@ -10,7 +10,7 @@ GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H)
+ EXTRA_DIST = sm_inter.x
+
+ noinst_LIBRARIES = libnsm.a
+-libnsm_a_SOURCES = $(GENFILES) file.c rpc.c
++libnsm_a_SOURCES = $(GENFILES) ../misc/misc.c file.c rpc.c
+
+ BUILT_SOURCES = $(GENFILES)
+
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-cacheio-use-intmax_t-for-formatted-IO.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-cacheio-use-intmax_t-for-formatted-IO.patch
new file mode 100644
index 0000000000..bafff5b9c0
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-cacheio-use-intmax_t-for-formatted-IO.patch
@@ -0,0 +1,38 @@
+From ac32b813f5d6f9a2de944015cf9bb98d68e0203a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 1 Dec 2018 10:02:12 -0800
+Subject: [PATCH] cacheio: use intmax_t for formatted IO
+
+time_t is not same size on x32 ABI (ILP32)
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ support/nfs/cacheio.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
+index 9dc4cf1..2086a95 100644
+--- a/support/nfs/cacheio.c
++++ b/support/nfs/cacheio.c
+@@ -17,6 +17,7 @@
+
+ #include <nfslib.h>
+ #include <stdio.h>
++#include <inttypes.h>
+ #include <stdio_ext.h>
+ #include <string.h>
+ #include <ctype.h>
+@@ -234,7 +235,7 @@ cache_flush(int force)
+ stb.st_mtime > now)
+ stb.st_mtime = time(0);
+
+- sprintf(stime, "%ld\n", stb.st_mtime);
++ sprintf(stime, "%jd\n", (intmax_t)stb.st_mtime);
+ for (c=0; cachelist[c]; c++) {
+ int fd;
+ sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]);
+--
+2.19.2
+
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch
deleted file mode 100644
index 7025fb555c..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 9b84cff305866abd150cf1a4c6e7e5ebf8a7eb3a Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Fri, 15 Nov 2013 23:21:35 +0100
-Subject: [PATCH] configure: Allow to explicitly disable nfsidmap
-
-* keyutils availability is autodetected and builds aren't reproducible
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure.ac | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index bf433d6..28a8f62 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -69,6 +69,12 @@ AC_ARG_ENABLE(nfsv4,
- AC_SUBST(enable_nfsv4)
- AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"])
-
-+AC_ARG_ENABLE(nfsidmap,
-+ [AC_HELP_STRING([--enable-nfsidmap],
-+ [enable support for NFSv4 idmapper @<:@default=yes@:>@])],
-+ enable_nfsidmap=$enableval,
-+ enable_nfsidmap=yes)
-+
- AC_ARG_ENABLE(nfsv41,
- [AC_HELP_STRING([--enable-nfsv41],
- [enable support for NFSv41 @<:@default=yes@:>@])],
-@@ -296,7 +302,7 @@ fi
-
- dnl enable nfsidmap when its support by libnfsidmap
- AM_CONDITIONAL(CONFIG_NFSDCLTRACK, [test "$enable_nfsdcltrack" = "yes" ])
--AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$ac_cv_header_keyutils_h$ac_cv_lib_nfsidmap_nfs4_owner_to_uid" = "yesyes"])
-+AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$enable_nfsidmap$ac_cv_header_keyutils_h$ac_cv_lib_nfsidmap_nfs4_owner_to_uid" = "yesyesyes"])
-
-
- if test "$knfsd_cv_glibc2" = no; then
---
-1.8.4.3
-
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch
new file mode 100644
index 0000000000..d14f0789ff
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch
@@ -0,0 +1,40 @@
+From 66471fbf7106917da7a1536b18a0a77d07479779 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Mon, 17 Dec 2018 15:29:47 +0800
+Subject: [PATCH] configure.ac: Do not fatalize -Wmissing-prototypes
+
+There comes below error when run "make -C tests/nsm_client nsm_client"
+| nlm_sm_inter_svc.c:20:1: error: no previous prototype for 'nlm_sm_prog_3' [-Werror=missing-prototypes]
+
+It is because rpcgen doesn't generate -Wmissing-prototypes
+free code for nlm_sm_inter_svc.c with below logic
+in tests/nsm_client/Makefile.am
+[snip]
+GENFILES_SVC = nlm_sm_inter_svc.c
+[snip]
+$(GENFILES_SVC): %_svc.c: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -m -o $@ $<
+
+So add the logic not to fatalize -Wmissing-prototypes.
+
+Upstream-Status: Submitted[https://marc.info/?l=linux-nfs&m=154503260323936&w=2]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 50002b4..aebff01 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -582,7 +582,7 @@ my_am_cflags="\
+ -Wall \
+ -Wextra \
+ $rpcgen_cflags \
+- -Werror=missing-prototypes \
++ -Wmissing-prototypes \
+ -Werror=missing-declarations \
+ -Werror=format=2 \
+ -Werror=undef \
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch
deleted file mode 100644
index de0b045c8c..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-Upstream-Status: Pending
-
-Subject: nfs-utils/statd: fix a segfault caused by improper usage of RPC interface
-
-There is a hack which uses the bottom-level RPC improperly as below
-in the current statd implementation:
-insert a socket in the svc_fdset without a corresponding transport handle
-and passes the socket to the svc_getreqset subroutine, this usage causes
-a segfault of statd on a huge amount of sm-notifications.
-
-Fix the issue by separating the non-RPC-server sock from RPC dispatcher.
-
-Signed-off-by: Shan Hai <shan.hai@windriver.com>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- utils/statd/rmtcall.c | 1 -
- utils/statd/statd.c | 5 +++--
- utils/statd/statd.h | 2 +-
- utils/statd/svc_run.c | 8 ++++++--
- 4 files changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
-index fd576d9..cde091b 100644
---- a/utils/statd/rmtcall.c
-+++ b/utils/statd/rmtcall.c
-@@ -104,7 +104,6 @@ statd_get_socket(void)
- if (sockfd < 0)
- return -1;
-
-- FD_SET(sockfd, &SVC_FDSET);
- return sockfd;
- }
-
-diff --git a/utils/statd/statd.c b/utils/statd/statd.c
-index 51a016e..e21a259 100644
---- a/utils/statd/statd.c
-+++ b/utils/statd/statd.c
-@@ -247,6 +247,7 @@ int main (int argc, char **argv)
- int port = 0, out_port = 0;
- int nlm_udp = 0, nlm_tcp = 0;
- struct rlimit rlim;
-+ int notify_sockfd;
-
- int pipefds[2] = { -1, -1};
- char status;
-@@ -473,7 +474,7 @@ int main (int argc, char **argv)
- }
-
- /* Make sure we have a privilege port for calling into the kernel */
-- if (statd_get_socket() < 0)
-+ if ((notify_sockfd = statd_get_socket()) < 0)
- exit(1);
-
- /* If sm-notify didn't take all the state files, load
-@@ -528,7 +529,7 @@ int main (int argc, char **argv)
- * Handle incoming requests: SM_NOTIFY socket requests, as
- * well as callbacks from lockd.
- */
-- my_svc_run(); /* I rolled my own, Olaf made it better... */
-+ my_svc_run(notify_sockfd); /* I rolled my own, Olaf made it better... */
-
- /* Only get here when simulating a crash so we should probably
- * start sm-notify running again. As we have already dropped
-diff --git a/utils/statd/statd.h b/utils/statd/statd.h
-index a1d8035..231ac7e 100644
---- a/utils/statd/statd.h
-+++ b/utils/statd/statd.h
-@@ -28,7 +28,7 @@ extern _Bool statd_present_address(const struct sockaddr *sap, char *buf,
- __attribute__((__malloc__))
- extern char * statd_canonical_name(const char *hostname);
-
--extern void my_svc_run(void);
-+extern void my_svc_run(int);
- extern void notify_hosts(void);
- extern void shuffle_dirs(void);
- extern int statd_get_socket(void);
-diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c
-index d98ecee..28c1ad6 100644
---- a/utils/statd/svc_run.c
-+++ b/utils/statd/svc_run.c
-@@ -78,7 +78,7 @@ my_svc_exit(void)
- * The heart of the server. A crib from libc for the most part...
- */
- void
--my_svc_run(void)
-+my_svc_run(int sockfd)
- {
- FD_SET_TYPE readfds;
- int selret;
-@@ -96,6 +96,8 @@ my_svc_run(void)
- }
-
- readfds = SVC_FDSET;
-+ /* Set notify sockfd for waiting for reply */
-+ FD_SET(sockfd, &readfds);
- if (notify) {
- struct timeval tv;
-
-@@ -125,8 +127,10 @@ my_svc_run(void)
-
- default:
- selret -= process_reply(&readfds);
-- if (selret)
-+ if (selret) {
-+ FD_CLR(sockfd, &readfds);
- svc_getreqset(&readfds);
-+ }
- }
- }
- }
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/bugfix-adjust-statd-service-name.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/bugfix-adjust-statd-service-name.patch
new file mode 100644
index 0000000000..f13d7b380c
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/bugfix-adjust-statd-service-name.patch
@@ -0,0 +1,39 @@
+From 398fed3bb0350cb1229e54e7020ae0e044c206d1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de>
+Date: Wed, 17 Feb 2016 08:33:45 +0100
+Subject: bugfix: adjust statd service name
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream uses 'rpc-statd.service' and Yocto introduced 'nfs-statd.service'
+instead but forgot to update the mount.nfs helper 'start-statd' accordingly.
+
+Upstream-Status: Inappropriate [other]
+
+Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
+
+Rebase it.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ utils/statd/start-statd | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/statd/start-statd b/utils/statd/start-statd
+index af5c950..df9b9be 100755
+--- a/utils/statd/start-statd
++++ b/utils/statd/start-statd
+@@ -28,10 +28,10 @@ fi
+ # First try systemd if it's installed.
+ if [ -d /run/systemd/system ]; then
+ # Quit only if the call worked.
+- if systemctl start rpc-statd.service; then
++ if systemctl start nfs-statd.service; then
+ # Ensure systemd knows not to stop rpc.statd or its dependencies
+ # on 'systemctl isolate ..'
+- systemctl add-wants --runtime remote-fs.target rpc-statd.service
++ systemctl add-wants --runtime remote-fs.target nfs-statd.service
+ exit 0
+ fi
+ fi
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch
new file mode 100644
index 0000000000..1d693e4142
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch
@@ -0,0 +1,183 @@
+Clang comes up with more printf format warnings
+Correcting “format string is not a string literal†warning
+requires us to declare that parameter is a printf style
+format using the attribute flag
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: nfs-utils-2.3.3/support/include/xcommon.h
+===================================================================
+--- nfs-utils-2.3.3.orig/support/include/xcommon.h
++++ nfs-utils-2.3.3/support/include/xcommon.h
+@@ -27,7 +27,7 @@
+
+ /* Functions in sundries.c that are used in mount.c and umount.c */
+ char *canonicalize (const char *path);
+-void nfs_error (const char *fmt, ...);
++void nfs_error (const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
+ void *xmalloc (size_t size);
+ void *xrealloc(void *p, size_t size);
+ void xfree(void *);
+@@ -36,9 +36,9 @@ char *xstrndup (const char *s, int n);
+ char *xstrconcat2 (const char *, const char *);
+ char *xstrconcat3 (const char *, const char *, const char *);
+ char *xstrconcat4 (const char *, const char *, const char *, const char *);
+-void die (int errcode, const char *fmt, ...);
++void die (int errcode, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
+
+-extern void die(int err, const char *fmt, ...);
++extern void die(int err, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
+ extern void (*at_die)(void);
+
+ /* exit status - bits below are ORed */
+Index: nfs-utils-2.3.3/support/include/xlog.h
+===================================================================
+--- nfs-utils-2.3.3.orig/support/include/xlog.h
++++ nfs-utils-2.3.3/support/include/xlog.h
+@@ -43,10 +43,10 @@ void xlog_config(int fac, int on);
+ void xlog_sconfig(char *, int on);
+ void xlog_from_conffile(char *);
+ int xlog_enabled(int fac);
+-void xlog(int fac, const char *fmt, ...);
+-void xlog_warn(const char *fmt, ...);
+-void xlog_err(const char *fmt, ...);
+-void xlog_errno(int err, const char *fmt, ...);
+-void xlog_backend(int fac, const char *fmt, va_list args);
++void xlog(int fac, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
++void xlog_warn(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
++void xlog_err(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
++void xlog_errno(int err, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
++void xlog_backend(int fac, const char *fmt, va_list args) __attribute__((__format__ (__printf__, 2, 0)));
+
+ #endif /* XLOG_H */
+Index: nfs-utils-2.3.3/support/nfs/xcommon.c
+===================================================================
+--- nfs-utils-2.3.3.orig/support/nfs/xcommon.c
++++ nfs-utils-2.3.3/support/nfs/xcommon.c
+@@ -93,7 +93,10 @@ nfs_error (const char *fmt, ...) {
+
+ fmt2 = xstrconcat2 (fmt, "\n");
+ va_start (args, fmt);
++#pragma clang diagnostic push
++#pragma clang diagnostic ignored "-Wformat-nonliteral"
+ vfprintf (stderr, fmt2, args);
++#pragma clang diagnostic pop
+ va_end (args);
+ free (fmt2);
+ }
+Index: nfs-utils-2.3.3/utils/exportfs/exportfs.c
+===================================================================
+--- nfs-utils-2.3.3.orig/utils/exportfs/exportfs.c
++++ nfs-utils-2.3.3/utils/exportfs/exportfs.c
+@@ -644,6 +644,7 @@ out:
+ return result;
+ }
+
++__attribute__((__format__ (__printf__, 2, 3)))
+ static char
+ dumpopt(char c, char *fmt, ...)
+ {
+Index: nfs-utils-2.3.3/utils/statd/statd.c
+===================================================================
+--- nfs-utils-2.3.3.orig/utils/statd/statd.c
++++ nfs-utils-2.3.3/utils/statd/statd.c
+@@ -136,7 +136,7 @@ static void log_modes(void)
+ strcat(buf, "TI-RPC ");
+ #endif
+
+- xlog_warn(buf);
++ xlog_warn("%s", buf);
+ }
+
+ /*
+Index: nfs-utils-2.3.3/support/nfs/svc_create.c
+===================================================================
+--- nfs-utils-2.3.3.orig/support/nfs/svc_create.c
++++ nfs-utils-2.3.3/support/nfs/svc_create.c
+@@ -184,7 +184,7 @@ svc_create_sock(const struct sockaddr *s
+ type = SOCK_STREAM;
+ break;
+ default:
+- xlog(D_GENERAL, "%s: Unrecognized bind address semantics: %u",
++ xlog(D_GENERAL, "%s: Unrecognized bind address semantics: %lu",
+ __func__, nconf->nc_semantics);
+ return -1;
+ }
+Index: nfs-utils-2.3.3/support/nsm/rpc.c
+===================================================================
+--- nfs-utils-2.3.3.orig/support/nsm/rpc.c
++++ nfs-utils-2.3.3/support/nsm/rpc.c
+@@ -182,7 +182,7 @@ nsm_xmit_getport(const int sock, const s
+ uint32_t xid;
+ XDR xdr;
+
+- xlog(D_CALL, "Sending PMAP_GETPORT for %u, %u, udp", program, version);
++ xlog(D_CALL, "Sending PMAP_GETPORT for %lu, %lu, udp", program, version);
+
+ nsm_init_xdrmem(msgbuf, NSM_MAXMSGSIZE, &xdr);
+ xid = nsm_init_rpc_header(PMAPPROG, PMAPVERS,
+Index: nfs-utils-2.3.3/utils/mountd/cache.c
+===================================================================
+--- nfs-utils-2.3.3.orig/utils/mountd/cache.c
++++ nfs-utils-2.3.3/utils/mountd/cache.c
+@@ -968,8 +968,7 @@ lookup_export(char *dom, char *path, str
+ } else if (found_type == i && found->m_warned == 0) {
+ xlog(L_WARNING, "%s exported to both %s and %s, "
+ "arbitrarily choosing options from first",
+- path, found->m_client->m_hostname, exp->m_client->m_hostname,
+- dom);
++ path, found->m_client->m_hostname, exp->m_client->m_hostname);
+ found->m_warned = 1;
+ }
+ }
+Index: nfs-utils-2.3.3/utils/mountd/mountd.c
+===================================================================
+--- nfs-utils-2.3.3.orig/utils/mountd/mountd.c
++++ nfs-utils-2.3.3/utils/mountd/mountd.c
+@@ -213,7 +213,7 @@ static void
+ sig_hup (int sig)
+ {
+ /* don't exit on SIGHUP */
+- xlog (L_NOTICE, "Received SIGHUP... Ignoring.\n", sig);
++ xlog (L_NOTICE, "Received SIGHUP(%d)... Ignoring.\n", sig);
+ return;
+ }
+
+Index: nfs-utils-2.3.3/utils/statd/rmtcall.c
+===================================================================
+--- nfs-utils-2.3.3.orig/utils/statd/rmtcall.c
++++ nfs-utils-2.3.3/utils/statd/rmtcall.c
+@@ -247,7 +247,7 @@ process_reply(FD_SET_TYPE *rfds)
+ xlog_warn("%s: service %d not registered on localhost",
+ __func__, NL_MY_PROG(lp));
+ } else {
+- xlog(D_GENERAL, "%s: Callback to %s (for %d) succeeded",
++ xlog(D_GENERAL, "%s: Callback to %s (for %s) succeeded",
+ __func__, NL_MY_NAME(lp), NL_MON_NAME(lp));
+ }
+ nlist_free(&notify, lp);
+Index: nfs-utils-2.3.3/utils/statd/svc_run.c
+===================================================================
+--- nfs-utils-2.3.3.orig/utils/statd/svc_run.c
++++ nfs-utils-2.3.3/utils/statd/svc_run.c
+@@ -53,6 +53,7 @@
+
+ #include <errno.h>
+ #include <time.h>
++#include <inttypes.h>
+ #include "statd.h"
+ #include "notlist.h"
+
+@@ -104,8 +105,8 @@ my_svc_run(int sockfd)
+
+ tv.tv_sec = NL_WHEN(notify) - now;
+ tv.tv_usec = 0;
+- xlog(D_GENERAL, "Waiting for reply... (timeo %d)",
+- tv.tv_sec);
++ xlog(D_GENERAL, "Waiting for reply... (timeo %jd)",
++ (intmax_t)tv.tv_sec);
+ selret = select(FD_SETSIZE, &readfds,
+ (void *) 0, (void *) 0, &tv);
+ } else {
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
index 613ddc003a..c01415de84 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
@@ -1,11 +1,17 @@
[Unit]
Description=NFS Mount Daemon
-After=rpcbind.service nfs-server.service
-Requires=rpcbind.service nfs-server.service
+DefaultDependencies=no
+After=rpcbind.socket
+Requires=proc-fs-nfsd.mount
+After=proc-fs-nfsd.mount
+After=network.target local-fs.target
+BindsTo=nfs-server.service
+ConditionPathExists=@SYSCONFDIR@/exports
[Service]
EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf
ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS
+LimitNOFILE=@HIGH_RLIMIT_NOFILE@
[Install]
WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service
index 147d7a7b5f..6481377d80 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service
@@ -1,7 +1,12 @@
[Unit]
-Description=NFS Server
-Requires=rpcbind.service nfs-mountd.service
-After=rpcbind.service
+Description=NFS server and services
+DefaultDependencies=no
+Requires=network.target proc-fs-nfsd.mount
+Requires=nfs-mountd.service
+Wants=rpcbind.service
+After=local-fs.target
+After=network.target proc-fs-nfsd.mount rpcbind.service nfs-mountd.service
+ConditionPathExists=@SYSCONFDIR@/exports
[Service]
Type=oneshot
@@ -9,6 +14,7 @@ EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf
ExecStartPre=@SBINDIR@/exportfs -r
ExecStart=@SBINDIR@/rpc.nfsd $NFSD_OPTS $NFSD_COUNT
ExecStop=@SBINDIR@/rpc.nfsd 0
+ExecStopPost=@SBINDIR@/exportfs -au
ExecStopPost=@SBINDIR@/exportfs -f
ExecReload=@SBINDIR@/exportfs -r
StandardError=syslog
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
index 746dacf056..4fa64e1998 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
@@ -1,12 +1,14 @@
[Unit]
-Description=NFS file locking service
-After=rpcbind.service
-Requires=rpcbind.service
-Before=remote-fs-pre.target
+Description=NFS status monitor for NFSv2/3 locking.
+DefaultDependencies=no
+Conflicts=umount.target
+Requires=nss-lookup.target rpcbind.service
+After=network.target nss-lookup.target rpcbind.service
[Service]
EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf
ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS
+LimitNOFILE=@HIGH_RLIMIT_NOFILE@
[Install]
WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
deleted file mode 100644
index d8f8181670..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Fixes errors like
-sm-notify[1070]: DNS resolution of a.b.c.d..com failed; retrying later
-This error will occur anytime sm-notify is run before the network if fully up,
-which is happening more and more with parallel startup systems.
-The res_init() call is simple, safe, quick, and a patch to use it should be
-able to go upstream. Presumably the whole reason sm-notify tries several
-times is to wait for possible changes to the network configuration, but without
-calling res_init() it will never be aware of those changes
-
-Backported drom Fedora
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-
-diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/statd/sm-notify.c
---- nfs-utils-1.2.3/utils/statd/sm-notify.c.orig 2010-09-28 08:24:16.000000000 -0400
-+++ nfs-utils-1.2.3/utils/statd/sm-notify.c 2010-10-15 16:44:43.487119601 -0400
-@@ -28,6 +28,9 @@
- #include <netdb.h>
- #include <errno.h>
- #include <grp.h>
-+#include <netinet/in.h>
-+#include <arpa/nameser.h>
-+#include <resolv.h>
-
- #include "sockaddr.h"
- #include "xlog.h"
-@@ -84,6 +87,7 @@ smn_lookup(const char *name)
- };
- int error;
-
-+ res_init();
- error = getaddrinfo(name, NULL, &hint, &ai);
- if (error != 0) {
- xlog(D_GENERAL, "getaddrinfo(3): %s", gai_strerror(error));
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch
deleted file mode 100644
index 993f1e5ea5..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-nfs-utils: Do not pass CFLAGS to gcc while building
-
-Do not pass CFLAGS/LDFLAGS to gcc while building, The needed flags has
-been passed by xxx_CFLAGS=$(CFLAGS_FOR_BUILD).
-
-Upstream-Status: Pending
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- tools/locktest/Makefile.am | 2 ++
- tools/rpcgen/Makefile.am | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
-index 3156815..1729fd1 100644
---- a/tools/locktest/Makefile.am
-+++ b/tools/locktest/Makefile.am
-@@ -1,6 +1,8 @@
- ## Process this file with automake to produce Makefile.in
-
- CC=$(CC_FOR_BUILD)
-+CFLAGS=
-+LDFLAGS=
- LIBTOOL = @LIBTOOL@ --tag=CC
-
- noinst_PROGRAMS = testlk
-diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
-index 8a9ec89..8bacdaa 100644
---- a/tools/rpcgen/Makefile.am
-+++ b/tools/rpcgen/Makefile.am
-@@ -1,6 +1,8 @@
- ## Process this file with automake to produce Makefile.in
-
- CC=$(CC_FOR_BUILD)
-+CFLAGS=
-+LDFLAGS=
- LIBTOOL = @LIBTOOL@ --tag=CC
-
- noinst_PROGRAMS = rpcgen
---
-1.7.9.5
-
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-debianize-start-statd.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-debianize-start-statd.patch
new file mode 100644
index 0000000000..ede0dcefc4
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-debianize-start-statd.patch
@@ -0,0 +1,42 @@
+[PATCH] nfs-utils: debianize start-statd
+
+Upstream-Status: Pending
+
+make start-statd command to use nfscommon configure, too.
+
+Signed-off-by: Henrik Riomar <henrik.riomar@ericsson.com>
+Signed-off-by: Li Wang <li.wang@windriver.com>
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ utils/statd/start-statd | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/utils/statd/start-statd b/utils/statd/start-statd
+index 2fd6039..f591b34 100755
+--- a/utils/statd/start-statd
++++ b/utils/statd/start-statd
+@@ -17,6 +17,14 @@ then
+ # statd already running - must have been slow to respond.
+ exit 0
+ fi
++
++# Read config
++DEFAULTFILE=/etc/default/nfs-common
++NEED_IDMAPD=
++if [ -f $DEFAULTFILE ]; then
++ . $DEFAULTFILE
++fi
++
+ # First try systemd if it's installed.
+ if [ -d /run/systemd/system ]; then
+ # Quit only if the call worked.
+@@ -25,4 +33,4 @@ fi
+
+ cd /
+ # Fall back to launching it ourselves.
+-exec rpc.statd --no-notify
++exec rpc.statd --no-notify $STATDOPTS
+--
+2.6.6
+
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch
new file mode 100644
index 0000000000..921f5edc82
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch
@@ -0,0 +1,46 @@
+From caa19231196d73541445728e6813c8fa70345acb Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 26 Jun 2018 15:59:00 +0800
+Subject: [PATCH] nfs-utils: 2.1.1 -> 2.3.1
+
+Fixed:
+configure: error: res_querydomain needed
+
+Upstream-Status: Pending [https://github.com/alpinelinux/aports/blob/master/main/nfs-utils/musl-configure_ac.patch]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+---
+ configure.ac | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 50002b4..dcadb23 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -582,10 +582,10 @@ my_am_cflags="\
+ -Wall \
+ -Wextra \
+ $rpcgen_cflags \
+- -Werror=missing-prototypes \
+- -Werror=missing-declarations \
++ -Wmissing-prototypes \
++ -Wmissing-declarations \
+ -Werror=format=2 \
+- -Werror=undef \
++ -Wundef \
+ -Werror=missing-include-dirs \
+ -Werror=strict-aliasing=2 \
+ -Werror=init-self \
+@@ -614,10 +614,9 @@ AC_DEFUN([CHECK_CCSUPPORT], [
+
+ CHECK_CCSUPPORT([-Werror=format-overflow=2], [flg1])
+ CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
+-CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
+ CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
+
+-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
++AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg4"])
+
+ # Make sure that $ACLOCAL_FLAGS are used during a rebuild
+ AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
index 7ed93a59d4..0f5747cc6d 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -40,7 +40,7 @@ test "$NFS_SERVERS" != "" && test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -l
#mountd
start_mountd(){
echo -n 'starting mountd: '
- start-stop-daemon --start --exec "$NFS_MOUNTD" -- "-f /etc/exports $@"
+ start-stop-daemon --start --exec "$NFS_MOUNTD" -- "$@"
echo done
}
stop_mountd(){
@@ -107,7 +107,7 @@ stop_nfsd(){
#FIXME: need to create the /var/lib/nfs/... directories
case "$1" in
start)
- exportfs -r
+ test -r /etc/exports && exportfs -r
start_nfsd "$NFS_SERVERS"
start_mountd
test -r /etc/exports && exportfs -a;;
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
deleted file mode 100644
index 8540503df9..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
+++ /dev/null
@@ -1,150 +0,0 @@
-SUMMARY = "userspace utilities for kernel nfs"
-DESCRIPTION = "The nfs-utils package provides a daemon for the kernel \
-NFS server and related tools."
-HOMEPAGE = "http://nfs.sourceforge.net/"
-SECTION = "console/network"
-
-LICENSE = "MIT & GPLv2+ & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
-
-# util-linux for libblkid
-DEPENDS = "libcap libnfsidmap libevent util-linux sqlite3 libtirpc"
-RDEPENDS_${PN}-client = "rpcbind bash"
-RDEPENDS_${PN} = "${PN}-client bash"
-RRECOMMENDS_${PN} = "kernel-module-nfsd"
-
-inherit useradd
-
-USERADD_PACKAGES = "${PN}-client"
-USERADD_PARAM_${PN}-client = "--system --home-dir /var/lib/nfs \
- --shell /bin/false --user-group rpcuser"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \
- file://0001-configure-Allow-to-explicitly-disable-nfsidmap.patch \
- file://nfs-utils-1.2.3-sm-notify-res_init.patch \
- file://nfsserver \
- file://nfscommon \
- file://nfs-utils.conf \
- file://nfs-server.service \
- file://nfs-mountd.service \
- file://nfs-statd.service \
- file://proc-fs-nfsd.mount \
- file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
- file://nfs-utils-debianize-start-statd.patch \
- file://0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch \
- file://bugfix-adjust-statd-service-name.patch \
-"
-
-SRC_URI[md5sum] = "cd6b568c2e9301cc3bfac09d87fbbc0b"
-SRC_URI[sha256sum] = "700d689c5622c87953c34102e5befafc4d3c811e676852238f0dd79c9c0c084d"
-
-# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
-# pull in the remainder of the dependencies.
-
-INITSCRIPT_PACKAGES = "${PN} ${PN}-client"
-INITSCRIPT_NAME = "nfsserver"
-INITSCRIPT_PARAMS = "defaults"
-INITSCRIPT_NAME_${PN}-client = "nfscommon"
-INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21"
-
-inherit autotools-brokensep update-rc.d systemd pkgconfig
-
-SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service"
-SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-# --enable-uuid is need for cross-compiling
-EXTRA_OECONF = "--with-statduser=rpcuser \
- --enable-mountconfig \
- --enable-libmount-mount \
- --disable-nfsv41 \
- --enable-uuid \
- --disable-gss \
- --disable-nfsdcltrack \
- --with-statdpath=/var/lib/nfs/statd \
- "
-
-PACKAGECONFIG ??= "tcp-wrappers \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-"
-PACKAGECONFIG_remove_libc-musl = "tcp-wrappers"
-PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
-PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-INHIBIT_AUTO_STAGE = "1"
-
-PACKAGES =+ "${PN}-client ${PN}-stats"
-
-CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
- ${localstatedir}/lib/nfs/rmtab \
- ${localstatedir}/lib/nfs/xtab \
- ${localstatedir}/lib/nfs/statd/state \
- ${sysconfdir}/nfsmount.conf"
-
-FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
- ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
- ${sbindir}/showmount ${sbindir}/nfsstat \
- ${localstatedir}/lib/nfs \
- ${sysconfdir}/nfs-utils.conf \
- ${sysconfdir}/nfsmount.conf \
- ${sysconfdir}/init.d/nfscommon \
- ${systemd_unitdir}/system/nfs-statd.service"
-FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
-RDEPENDS_${PN}-stats = "python3-core"
-
-FILES_${PN} += "${systemd_unitdir}"
-
-do_configure_prepend() {
- sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
- ${S}/utils/mount/Makefile.am
-
- sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
- ${S}/utils/osd_login/Makefile.am
-}
-
-# Make clean needed because the package comes with
-# precompiled 64-bit objects that break the build
-do_compile_prepend() {
- make clean
-}
-
-do_install_append () {
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
- install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
-
- install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir}
- install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir}
-
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/
- install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/
- install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/
- sed -i -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- ${D}${systemd_unitdir}/system/*.service
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${sysconfdir}/modules-load.d
- echo "nfsd" > ${D}${sysconfdir}/modules-load.d/nfsd.conf
- install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/
- install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/
- ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount
- fi
-
- # kernel code as of 3.8 hard-codes this path as a default
- install -d ${D}/var/lib/nfs/v4recovery
-
- # chown the directories and files
- chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
- chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
-
- # the following are built by CC_FOR_BUILD
- rm -f ${D}${sbindir}/rpcdebug
- rm -f ${D}${sbindir}/rpcgen
- rm -f ${D}${sbindir}/locktest
-
- # Make python tools use python 3
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat
-
-}
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb
new file mode 100644
index 0000000000..eb32bccb57
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb
@@ -0,0 +1,152 @@
+SUMMARY = "userspace utilities for kernel nfs"
+DESCRIPTION = "The nfs-utils package provides a daemon for the kernel \
+NFS server and related tools."
+HOMEPAGE = "http://nfs.sourceforge.net/"
+SECTION = "console/network"
+
+LICENSE = "MIT & GPLv2+ & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
+
+# util-linux for libblkid
+DEPENDS = "libcap libevent util-linux sqlite3 libtirpc"
+RDEPENDS_${PN} = "${PN}-client"
+RRECOMMENDS_${PN} = "kernel-module-nfsd"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}-client"
+USERADD_PARAM_${PN}-client = "--system --home-dir /var/lib/nfs \
+ --shell /bin/false --user-group rpcuser"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \
+ file://nfsserver \
+ file://nfscommon \
+ file://nfs-utils.conf \
+ file://nfs-server.service \
+ file://nfs-mountd.service \
+ file://nfs-statd.service \
+ file://proc-fs-nfsd.mount \
+ file://nfs-utils-debianize-start-statd.patch \
+ file://bugfix-adjust-statd-service-name.patch \
+ file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \
+ file://clang-format-string.patch \
+ file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \
+ file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \
+ file://0001-Fix-include-order-between-config.h-and-stat.h.patch \
+"
+SRC_URI_append_libc-glibc = " file://0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch"
+SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch"
+
+SRC_URI[md5sum] = "161efe469ec1b06f1c750bd87f8ba6dd"
+SRC_URI[sha256sum] = "85274ada94479b1beba9f8eeffd19f477c53a6710b9998d1192c807854087736"
+
+# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
+# pull in the remainder of the dependencies.
+
+INITSCRIPT_PACKAGES = "${PN} ${PN}-client"
+INITSCRIPT_NAME = "nfsserver"
+INITSCRIPT_PARAMS = "defaults"
+INITSCRIPT_NAME_${PN}-client = "nfscommon"
+INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21"
+
+inherit autotools-brokensep update-rc.d systemd pkgconfig
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-client"
+SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service"
+SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
+
+# --enable-uuid is need for cross-compiling
+EXTRA_OECONF = "--with-statduser=rpcuser \
+ --enable-mountconfig \
+ --enable-libmount-mount \
+ --enable-uuid \
+ --disable-gss \
+ --disable-nfsdcltrack \
+ --with-statdpath=/var/lib/nfs/statd \
+ "
+
+CFLAGS += "-Wno-error=format-overflow"
+
+PACKAGECONFIG ??= "tcp-wrappers \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG_remove_libc-musl = "tcp-wrappers"
+PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+# libdevmapper is available in meta-oe
+PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper"
+# keyutils is available in meta-security
+PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils"
+
+PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats"
+
+CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
+ ${localstatedir}/lib/nfs/rmtab \
+ ${localstatedir}/lib/nfs/xtab \
+ ${localstatedir}/lib/nfs/statd/state \
+ ${sysconfdir}/nfsmount.conf"
+
+FILES_${PN}-client = "${sbindir}/*statd \
+ ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
+ ${sbindir}/showmount ${sbindir}/nfsstat \
+ ${localstatedir}/lib/nfs \
+ ${sysconfdir}/nfs-utils.conf \
+ ${sysconfdir}/nfsmount.conf \
+ ${sysconfdir}/init.d/nfscommon \
+ ${systemd_unitdir}/system/nfs-statd.service"
+RDEPENDS_${PN}-client = "${PN}-mount rpcbind"
+
+FILES_${PN}-mount = "${base_sbindir}/*mount.nfs*"
+
+FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
+RDEPENDS_${PN}-stats = "python3-core"
+
+FILES_${PN} += "${systemd_unitdir}"
+
+do_configure_prepend() {
+ sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
+ ${S}/utils/mount/Makefile.am
+}
+
+# Make clean needed because the package comes with
+# precompiled 64-bit objects that break the build
+do_compile_prepend() {
+ make clean
+}
+
+# Works on systemd only
+HIGH_RLIMIT_NOFILE ??= "4096"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
+ install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
+
+ install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir}
+ install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir}
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/
+ sed -i -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \
+ ${D}${systemd_unitdir}/system/*.service
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/
+ install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/
+ ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount
+ fi
+
+ # kernel code as of 3.8 hard-codes this path as a default
+ install -d ${D}/var/lib/nfs/v4recovery
+
+ # chown the directories and files
+ chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
+ chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
+
+ # Make python tools use python 3
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat
+
+}
diff --git a/meta/recipes-connectivity/ofono/ofono.inc b/meta/recipes-connectivity/ofono/ofono.inc
deleted file mode 100644
index 9c47c6fde5..0000000000
--- a/meta/recipes-connectivity/ofono/ofono.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-HOMEPAGE = "http://www.ofono.org"
-SUMMARY = "open source telephony"
-DESCRIPTION = "oFono is a stack for mobile telephony devices on Linux. oFono supports speaking to telephony devices through specific drivers, or with generic AT commands."
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
- file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee"
-
-inherit autotools pkgconfig update-rc.d systemd bluetooth
-
-DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info"
-
-INITSCRIPT_NAME = "ofono"
-INITSCRIPT_PARAMS = "defaults 22"
-
-PACKAGECONFIG ??= "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
- "
-PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
-PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, ${BLUEZ}"
-
-EXTRA_OECONF += "--enable-test"
-
-SYSTEMD_SERVICE_${PN} = "ofono.service"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
-
- # Ofono still has one test tool that refers to Python 2 in the shebang
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/ofono/test/set-ddr
-
-}
-
-PACKAGES =+ "${PN}-tests"
-
-RDEPENDS_${PN} += "dbus"
-RRECOMMENDS_${PN} += "kernel-module-tun mobile-broadband-provider-info"
-
-FILES_${PN} += "${systemd_unitdir}"
-FILES_${PN}-tests = "${libdir}/${BPN}/test"
-RDEPENDS_${PN}-tests = "python3 python3-pygobject python3-dbus"
diff --git a/meta/recipes-connectivity/ofono/ofono/0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch b/meta/recipes-connectivity/ofono/ofono/0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch
new file mode 100644
index 0000000000..8a5a300adc
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono/0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch
@@ -0,0 +1,36 @@
+From 22b52db4842611ac31a356f023fc09595384e2ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 23 May 2019 18:11:22 -0700
+Subject: [PATCH] mbim: add an optional TEMP_FAILURE_RETRY macro copy
+
+Fixes build on musl which does not provide this macro
+
+Upstream-Status: Submitted [https://lists.ofono.org/pipermail/ofono/2019-May/019370.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ drivers/mbimmodem/mbim-private.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/mbimmodem/mbim-private.h b/drivers/mbimmodem/mbim-private.h
+index e159235..51693ea 100644
+--- a/drivers/mbimmodem/mbim-private.h
++++ b/drivers/mbimmodem/mbim-private.h
+@@ -21,6 +21,15 @@
+
+ #define align_len(len, boundary) (((len)+(boundary)-1) & ~((boundary)-1))
+
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) ({ \
++ __typeof(expression) __result; \
++ do { \
++ __result = (expression); \
++ } while (__result == -1 && errno == EINTR); \
++ __result; })
++#endif
++
+ enum mbim_control_message {
+ MBIM_OPEN_MSG = 0x1,
+ MBIM_CLOSE_MSG = 0x2,
+--
+2.21.0
+
diff --git a/meta/recipes-connectivity/ofono/ofono_1.18.bb b/meta/recipes-connectivity/ofono/ofono_1.18.bb
deleted file mode 100644
index b0707311ad..0000000000
--- a/meta/recipes-connectivity/ofono/ofono_1.18.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require ofono.inc
-
-SRC_URI = "\
- ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
- file://ofono \
-"
-SRC_URI[md5sum] = "0a6b37c8ace891cb2a7ca5d121043a0a"
-SRC_URI[sha256sum] = "53cdbf342913f46bce4827241c60e24255a3d43a94945edf77482ae5b312d51f"
-
-CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/meta/recipes-connectivity/ofono/ofono_1.31.bb b/meta/recipes-connectivity/ofono/ofono_1.31.bb
new file mode 100644
index 0000000000..7d0976ad7f
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono_1.31.bb
@@ -0,0 +1,50 @@
+SUMMARY = "open source telephony"
+DESCRIPTION = "oFono is a stack for mobile telephony devices on Linux. oFono supports speaking to telephony devices through specific drivers, or with generic AT commands."
+HOMEPAGE = "http://www.ofono.org"
+BUGTRACKER = "https://01.org/jira/browse/OF"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
+ file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee"
+DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell"
+
+SRC_URI = "\
+ ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+ file://ofono \
+ file://0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch \
+"
+SRC_URI[md5sum] = "1c26340e3c6ed132cc812595081bb3dc"
+SRC_URI[sha256sum] = "a15c5d28096c10eb30e47a68b6dc2e7c4a5a99d7f4cfedf0b69624f33d859e9b"
+
+inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data
+
+INITSCRIPT_NAME = "ofono"
+INITSCRIPT_PARAMS = "defaults 22"
+SYSTEMD_SERVICE_${PN} = "ofono.service"
+
+PACKAGECONFIG ??= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+"
+PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
+PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5"
+
+EXTRA_OECONF += "--enable-test --enable-external-ell"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
+}
+
+PACKAGES =+ "${PN}-tests"
+
+FILES_${PN} += "${systemd_unitdir}"
+FILES_${PN}-tests = "${libdir}/${BPN}/test"
+
+RDEPENDS_${PN} += "dbus"
+RDEPENDS_${PN}-tests = "\
+ python3-core \
+ python3-dbus \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)} \
+"
+
+RRECOMMENDS_${PN} += "kernel-module-tun mobile-broadband-provider-info"
diff --git a/meta/recipes-connectivity/ofono/ofono_git.bb b/meta/recipes-connectivity/ofono/ofono_git.bb
deleted file mode 100644
index beafb775c2..0000000000
--- a/meta/recipes-connectivity/ofono/ofono_git.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require ofono.inc
-
-S = "${WORKDIR}/git"
-SRCREV = "14544d5996836f628613c2ce544380ee6fc8f514"
-PV = "0.12-git${SRCPV}"
-PR = "r5"
-
-SRC_URI = "git://git.kernel.org/pub/scm/network/ofono/ofono.git \
- file://ofono"
-
-do_configure_prepend () {
- ${S}/bootstrap
-}
-
diff --git a/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch b/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
index adc25c668f..b8402a4dee 100644
--- a/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
+++ b/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
@@ -6,64 +6,42 @@ Adjust test cases to work with busybox.
Signed-off-by: Maxin B. John <maxin.john@enea.com>
Upstream-Status: Pending
-Index: openssh-6.8p1/regress/cipher-speed.sh
+Index: openssh-7.6p1/regress/cipher-speed.sh
===================================================================
---- openssh-6.8p1.orig/regress/cipher-speed.sh
-+++ openssh-6.8p1/regress/cipher-speed.sh
+--- openssh-7.6p1.orig/regress/cipher-speed.sh
++++ openssh-7.6p1/regress/cipher-speed.sh
@@ -17,7 +17,7 @@ for c in `${SSH} -Q cipher`; do n=0; for
printf "%-60s" "$c/$m:"
( ${SSH} -o 'compression no' \
- -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
+ -F $OBJ/ssh_proxy -m $m -c $c somehost \
- exec sh -c \'"dd of=/dev/null obs=32k"\' \
+ exec sh -c \'"dd of=/dev/null bs=32k"\' \
< ${DATA} ) 2>&1 | getbytes
if [ $? -ne 0 ]; then
-@@ -42,7 +42,7 @@ for c in $ciphers; do
- printf "%-60s" "$c:"
- ( ${SSH} -o 'compression no' \
- -F $OBJ/ssh_proxy -1 -c $c somehost \
-- exec sh -c \'"dd of=/dev/null obs=32k"\' \
-+ exec sh -c \'"dd of=/dev/null bs=32k"\' \
- < ${DATA} ) 2>&1 | getbytes
- if [ $? -ne 0 ]; then
- fail "ssh -1 failed with cipher $c"
-Index: openssh-6.8p1/regress/transfer.sh
-===================================================================
---- openssh-6.8p1.orig/regress/transfer.sh
-+++ openssh-6.8p1/regress/transfer.sh
-@@ -15,7 +15,7 @@ for p in ${SSH_PROTOCOLS}; do
- for s in 10 100 1k 32k 64k 128k 256k; do
- trace "proto $p dd-size ${s}"
- rm -f ${COPY}
-- dd if=$DATA obs=${s} 2> /dev/null | \
-+ dd if=$DATA bs=${s} 2> /dev/null | \
- ${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
- if [ $? -ne 0 ]; then
- fail "ssh cat $DATA failed"
-Index: openssh-6.8p1/regress/yes-head.sh
+Index: openssh-7.6p1/regress/transfer.sh
===================================================================
---- openssh-6.8p1.orig/regress/yes-head.sh
-+++ openssh-6.8p1/regress/yes-head.sh
-@@ -4,7 +4,7 @@
- tid="yes pipe head"
-
- for p in ${SSH_PROTOCOLS}; do
-- lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)`
-+ lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)`
+--- openssh-7.6p1.orig/regress/transfer.sh
++++ openssh-7.6p1/regress/transfer.sh
+@@ -13,7 +13,7 @@ cmp ${DATA} ${COPY} || fail "corrupted
+ for s in 10 100 1k 32k 64k 128k 256k; do
+ trace "dd-size ${s}"
+ rm -f ${COPY}
+- dd if=$DATA obs=${s} 2> /dev/null | \
++ dd if=$DATA bs=${s} 2> /dev/null | \
+ ${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
if [ $? -ne 0 ]; then
- fail "yes|head test failed"
- lines = 0;
-Index: openssh-6.8p1/regress/key-options.sh
+ fail "ssh cat $DATA failed"
+Index: openssh-7.6p1/regress/key-options.sh
===================================================================
---- openssh-6.8p1.orig/regress/key-options.sh
-+++ openssh-6.8p1/regress/key-options.sh
-@@ -54,7 +54,7 @@ for p in ${SSH_PROTOCOLS}; do
+--- openssh-7.6p1.orig/regress/key-options.sh
++++ openssh-7.6p1/regress/key-options.sh
+@@ -47,7 +47,7 @@ for f in 127.0.0.1 '127.0.0.0\/8'; do
fi
sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
- from=`head -1 $authkeys | cut -f1 -d ' '`
+ from=`head -n 1 $authkeys | cut -f1 -d ' '`
- verbose "key option proto $p $from"
- r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo true'`
+ verbose "key option $from"
+ r=`${SSH} -q -F $OBJ/ssh_proxy somehost 'echo true'`
if [ "$r" = "true" ]; then
diff --git a/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch b/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
index df64a140d3..20036da931 100644
--- a/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
+++ b/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
@@ -8,17 +8,20 @@ type, so that 's - src' in strlcpy and others may trigger signed overflow.
In case of compilation by gcc or clang with -ftrapv option, the overflow
would lead to program abort.
-Upstream-status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608]
+Upstream-Status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608]
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+
+Complete the fix
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
- openbsd-compat/strlcat.c | 8 ++++++--
- openbsd-compat/strlcpy.c | 8 ++++++--
- openbsd-compat/strnlen.c | 8 ++++++--
- 3 files changed, 18 insertions(+), 6 deletions(-)
+ openbsd-compat/strlcat.c | 10 +++++++---
+ openbsd-compat/strlcpy.c | 8 ++++++--
+ openbsd-compat/strnlen.c | 8 ++++++--
+ 3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c
-index bcc1b61..e758ebf 100644
+index bcc1b61..124e1e3 100644
--- a/openbsd-compat/strlcat.c
+++ b/openbsd-compat/strlcat.c
@@ -23,6 +23,7 @@
@@ -29,6 +32,15 @@ index bcc1b61..e758ebf 100644
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
+@@ -42,7 +43,7 @@ strlcat(char *dst, const char *src, size_t siz)
+ /* Find the end of dst and adjust bytes left but don't go past end */
+ while (n-- != 0 && *d != '\0')
+ d++;
+- dlen = d - dst;
++ dlen = (uintptr_t)d - (uintptr_t)dst;
+ n = siz - dlen;
+
+ if (n == 0)
@@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz)
s++;
}
@@ -70,7 +82,7 @@ index b4b1b60..b06f374 100644
#endif /* !HAVE_STRLCPY */
diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c
-index 93d5155..9b8de5d 100644
+index 7ad3573..7040f1f 100644
--- a/openbsd-compat/strnlen.c
+++ b/openbsd-compat/strnlen.c
@@ -23,6 +23,7 @@
@@ -95,5 +107,5 @@ index 93d5155..9b8de5d 100644
}
#endif
--
-1.9.1
+2.17.1
diff --git a/meta/recipes-connectivity/openssh/openssh/init b/meta/recipes-connectivity/openssh/openssh/init
index 1f63725cc0..8887e3af13 100644
--- a/meta/recipes-connectivity/openssh/openssh/init
+++ b/meta/recipes-connectivity/openssh/openssh/init
@@ -19,11 +19,6 @@ fi
[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh
mkdir -p $SYSCONFDIR
-HOST_KEY_RSA=$SYSCONFDIR/ssh_host_rsa_key
-HOST_KEY_DSA=$SYSCONFDIR/ssh_host_dsa_key
-HOST_KEY_ECDSA=$SYSCONFDIR/ssh_host_ecdsa_key
-HOST_KEY_ED25519=$SYSCONFDIR/ssh_host_ed25519_key
-
check_for_no_start() {
# forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists
if [ -e $SYSCONFDIR/sshd_not_to_be_run ]; then
@@ -41,27 +36,7 @@ check_privsep_dir() {
}
check_config() {
- /usr/sbin/sshd -t $SSHD_OPTS || exit 1
-}
-
-check_keys() {
- # create keys if necessary
- if [ ! -f $HOST_KEY_RSA ]; then
- echo " generating ssh RSA key..."
- ssh-keygen -q -f $HOST_KEY_RSA -N '' -t rsa
- fi
- if [ ! -f $HOST_KEY_ECDSA ]; then
- echo " generating ssh ECDSA key..."
- ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa
- fi
- if [ ! -f $HOST_KEY_DSA ]; then
- echo " generating ssh DSA key..."
- ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa
- fi
- if [ ! -f $HOST_KEY_ED25519 ]; then
- echo " generating ssh ED25519 key..."
- ssh-keygen -q -f $HOST_KEY_ED25519 -N '' -t ed25519
- fi
+ /usr/sbin/sshd $SSHD_OPTS -t || exit 1
}
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
@@ -70,30 +45,30 @@ case "$1" in
start)
check_for_no_start
echo "Starting OpenBSD Secure Shell server: sshd"
- check_keys
+ @LIBEXECDIR@/sshd_check_keys
check_privsep_dir
start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS
- echo "done."
+ echo "done."
;;
stop)
- echo -n "Stopping OpenBSD Secure Shell server: sshd"
+ echo -n "Stopping OpenBSD Secure Shell server: sshd"
start-stop-daemon -K -p $PIDFILE -x /usr/sbin/sshd
- echo "."
+ echo "."
;;
reload|force-reload)
check_for_no_start
- check_keys
+ @LIBEXECDIR@/sshd_check_keys
check_config
- echo -n "Reloading OpenBSD Secure Shell server's configuration"
+ echo -n "Reloading OpenBSD Secure Shell server's configuration"
start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/sbin/sshd
echo "."
;;
restart)
- check_keys
+ @LIBEXECDIR@/sshd_check_keys
check_config
- echo -n "Restarting OpenBSD Secure Shell server: sshd"
+ echo -n "Restarting OpenBSD Secure Shell server: sshd"
start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/sbin/sshd
check_for_no_start
check_privsep_dir
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch b/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
deleted file mode 100644
index 2773c14e5a..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From d7eb26785ad4f25fb09fae46726ab8ca3fe16921 Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Mon, 22 Aug 2016 14:11:16 +0300
-Subject: [PATCH] Remove des in cipher.
-
-Upstream-Status: Pending
-
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- cipher.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/cipher.c b/cipher.c
-index 031bda9..6cd667a 100644
---- a/cipher.c
-+++ b/cipher.c
-@@ -53,8 +53,10 @@
-
- #ifdef WITH_SSH1
- extern const EVP_CIPHER *evp_ssh1_bf(void);
-+#ifndef OPENSSL_NO_DES
- extern const EVP_CIPHER *evp_ssh1_3des(void);
- extern int ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int);
-+#endif /* OPENSSL_NO_DES */
- #endif
-
- struct sshcipher {
-@@ -79,15 +81,19 @@ struct sshcipher {
-
- static const struct sshcipher ciphers[] = {
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- { "des", SSH_CIPHER_DES, 8, 8, 0, 0, 0, 1, EVP_des_cbc },
- { "3des", SSH_CIPHER_3DES, 8, 16, 0, 0, 0, 1, evp_ssh1_3des },
-+#endif /* OPENSSL_NO_DES */
- # ifndef OPENSSL_NO_BF
- { "blowfish", SSH_CIPHER_BLOWFISH, 8, 32, 0, 0, 0, 1, evp_ssh1_bf },
- # endif /* OPENSSL_NO_BF */
- #endif /* WITH_SSH1 */
- #ifdef WITH_OPENSSL
- { "none", SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
-+#ifndef OPENSSL_NO_DES
- { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
-+#endif /* OPENSSL_NO_DES */
- # ifndef OPENSSL_NO_BF
- { "blowfish-cbc",
- SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
-@@ -171,8 +177,10 @@ cipher_keylen(const struct sshcipher *c)
- u_int
- cipher_seclen(const struct sshcipher *c)
- {
-+#ifndef OPENSSL_NO_DES
- if (strcmp("3des-cbc", c->name) == 0)
- return 14;
-+#endif /* OPENSSL_NO_DES */
- return cipher_keylen(c);
- }
-
-@@ -209,11 +217,13 @@ u_int
- cipher_mask_ssh1(int client)
- {
- u_int mask = 0;
-+#ifndef OPENSSL_NO_DES
- mask |= 1 << SSH_CIPHER_3DES; /* Mandatory */
- mask |= 1 << SSH_CIPHER_BLOWFISH;
- if (client) {
- mask |= 1 << SSH_CIPHER_DES;
- }
-+#endif /*OPENSSL_NO_DES*/
- return mask;
- }
-
-@@ -553,7 +563,9 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
- switch (c->number) {
- #ifdef WITH_OPENSSL
- case SSH_CIPHER_SSH2:
-+#ifndef OPENSSL_NO_DES
- case SSH_CIPHER_DES:
-+#endif /* OPENSSL_NO_DES */
- case SSH_CIPHER_BLOWFISH:
- evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
- if (evplen == 0)
-@@ -576,8 +588,10 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
- break;
- #endif
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- case SSH_CIPHER_3DES:
- return ssh1_3des_iv(&cc->evp, 0, iv, 24);
-+#endif /* OPENSSL_NO_DES */
- #endif
- default:
- return SSH_ERR_INVALID_ARGUMENT;
-@@ -601,7 +615,9 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
- switch (c->number) {
- #ifdef WITH_OPENSSL
- case SSH_CIPHER_SSH2:
-+#ifndef OPENSSL_NO_DES
- case SSH_CIPHER_DES:
-+#endif /* OPENSSL_NO_DES */
- case SSH_CIPHER_BLOWFISH:
- evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
- if (evplen <= 0)
-@@ -616,8 +632,10 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
- break;
- #endif
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- case SSH_CIPHER_3DES:
- return ssh1_3des_iv(&cc->evp, 1, (u_char *)iv, 24);
-+#endif /* OPENSSL_NO_DES */
- #endif
- default:
- return SSH_ERR_INVALID_ARGUMENT;
---
-2.1.4
-
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch b/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch
deleted file mode 100644
index 815af422ff..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 04cfd84423f693d879dc3ffebb0f6fe2680c254f Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Fri, 18 Mar 2016 15:59:21 +0800
-Subject: [PATCH 3/3] remove des in pkcs11.
-
-Upstream-Status: Pending
-
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
-
----
- pkcs11.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/pkcs11.h b/pkcs11.h
-index b01d58f..98b36e6 100644
---- a/pkcs11.h
-+++ b/pkcs11.h
-@@ -342,9 +342,11 @@ typedef unsigned long ck_key_type_t;
- #define CKK_GENERIC_SECRET (0x10)
- #define CKK_RC2 (0x11)
- #define CKK_RC4 (0x12)
-+#ifndef OPENSSL_NO_DES
- #define CKK_DES (0x13)
- #define CKK_DES2 (0x14)
- #define CKK_DES3 (0x15)
-+#endif /* OPENSSL_NO_DES */
- #define CKK_CAST (0x16)
- #define CKK_CAST3 (0x17)
- #define CKK_CAST128 (0x18)
-@@ -512,6 +514,7 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_RC2_CBC_PAD (0x105)
- #define CKM_RC4_KEY_GEN (0x110)
- #define CKM_RC4 (0x111)
-+#ifndef OPENSSL_NO_DES
- #define CKM_DES_KEY_GEN (0x120)
- #define CKM_DES_ECB (0x121)
- #define CKM_DES_CBC (0x122)
-@@ -525,6 +528,7 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_DES3_MAC (0x134)
- #define CKM_DES3_MAC_GENERAL (0x135)
- #define CKM_DES3_CBC_PAD (0x136)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_CDMF_KEY_GEN (0x140)
- #define CKM_CDMF_ECB (0x141)
- #define CKM_CDMF_CBC (0x142)
-@@ -610,8 +614,10 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_MD5_KEY_DERIVATION (0x390)
- #define CKM_MD2_KEY_DERIVATION (0x391)
- #define CKM_SHA1_KEY_DERIVATION (0x392)
-+#ifndef OPENSSL_NO_DES
- #define CKM_PBE_MD2_DES_CBC (0x3a0)
- #define CKM_PBE_MD5_DES_CBC (0x3a1)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_PBE_MD5_CAST_CBC (0x3a2)
- #define CKM_PBE_MD5_CAST3_CBC (0x3a3)
- #define CKM_PBE_MD5_CAST5_CBC (0x3a4)
-@@ -620,8 +626,10 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_PBE_SHA1_CAST128_CBC (0x3a5)
- #define CKM_PBE_SHA1_RC4_128 (0x3a6)
- #define CKM_PBE_SHA1_RC4_40 (0x3a7)
-+#ifndef OPENSSL_NO_DES
- #define CKM_PBE_SHA1_DES3_EDE_CBC (0x3a8)
- #define CKM_PBE_SHA1_DES2_EDE_CBC (0x3a9)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_PBE_SHA1_RC2_128_CBC (0x3aa)
- #define CKM_PBE_SHA1_RC2_40_CBC (0x3ab)
- #define CKM_PKCS5_PBKD2 (0x3b0)
---
-1.9.1
-
diff --git a/meta/recipes-connectivity/openssh/openssh/run-ptest b/meta/recipes-connectivity/openssh/openssh/run-ptest
index 36a3d2a7b7..daf62cca5b 100755
--- a/meta/recipes-connectivity/openssh/openssh/run-ptest
+++ b/meta/recipes-connectivity/openssh/openssh/run-ptest
@@ -5,7 +5,7 @@ export TEST_SHELL=sh
cd regress
sed -i "/\t\tagent-ptrace /d" Makefile
make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
- | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
+ | sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
SSHAGENT=`which ssh-agent`
GDB=`which gdb`
diff --git a/meta/recipes-connectivity/openssh/openssh/ssh_config b/meta/recipes-connectivity/openssh/openssh/ssh_config
index 9e919156d3..e0d023803e 100644
--- a/meta/recipes-connectivity/openssh/openssh/ssh_config
+++ b/meta/recipes-connectivity/openssh/openssh/ssh_config
@@ -1,4 +1,4 @@
-# $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $
+# $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
@@ -31,14 +31,14 @@ Host *
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
-# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
+# IdentityFile ~/.ssh/id_ecdsa
+# IdentityFile ~/.ssh/id_ed25519
# Port 22
-# Protocol 2,1
-# Cipher 3des
-# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
-# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
+# Protocol 2
+# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
+# MACs hmac-md5,hmac-sha1,umac-64@openssh.com
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_check_keys b/meta/recipes-connectivity/openssh/openssh/sshd_check_keys
new file mode 100644
index 0000000000..1931dc7153
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/sshd_check_keys
@@ -0,0 +1,78 @@
+#! /bin/sh
+
+generate_key() {
+ local FILE=$1
+ local TYPE=$2
+ local DIR="$(dirname "$FILE")"
+
+ mkdir -p "$DIR"
+ ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE
+
+ # Atomically rename file public key
+ mv -f "${FILE}.tmp.pub" "${FILE}.pub"
+
+ # This sync does double duty: Ensuring that the data in the temporary
+ # private key file is on disk before the rename, and ensuring that the
+ # public key rename is completed before the private key rename, since we
+ # switch on the existence of the private key to trigger key generation.
+ # This does mean it is possible for the public key to exist, but be garbage
+ # but this is OK because in that case the private key won't exist and the
+ # keys will be regenerated.
+ #
+ # In the event that sync understands arguments that limit what it tries to
+ # fsync(), we provided them. If it does not, it will simply call sync()
+ # which is just as well
+ sync "${FILE}.pub" "$DIR" "${FILE}.tmp"
+
+ mv "${FILE}.tmp" "$FILE"
+
+ # sync to ensure the atomic rename is committed
+ sync "$DIR"
+}
+
+# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS
+if test -f /etc/default/ssh; then
+ . /etc/default/ssh
+fi
+
+[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh
+mkdir -p $SYSCONFDIR
+
+# parse sshd options
+set -- ${SSHD_OPTS} --
+sshd_config=/etc/ssh/sshd_config
+while true ; do
+ case "$1" in
+ -f*) if [ "$1" = "-f" ] ; then
+ sshd_config="$2"
+ shift
+ else
+ sshd_config="${1#-f}"
+ fi
+ shift
+ ;;
+ --) shift; break;;
+ *) shift;;
+ esac
+done
+
+HOST_KEYS=$(sed -n 's/^[ \t]*HostKey[ \t]\+\(.*\)/\1/p' "${sshd_config}")
+[ -z "${HOST_KEYS}" ] && HOST_KEYS="$SYSCONFDIR/ssh_host_rsa_key $SYSCONFDIR/ssh_host_ecdsa_key $SYSCONFDIR/ssh_host_ed25519_key"
+
+for key in ${HOST_KEYS} ; do
+ [ -f $key ] && continue
+ case $key in
+ *_rsa_key)
+ echo " generating ssh RSA host key..."
+ generate_key $key rsa
+ ;;
+ *_ecdsa_key)
+ echo " generating ssh ECDSA host key..."
+ generate_key $key ecdsa
+ ;;
+ *_ed25519_key)
+ echo " generating ssh ED25519 host key..."
+ generate_key $key ed25519
+ ;;
+ esac
+done
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_config b/meta/recipes-connectivity/openssh/openssh/sshd_config
index d48bd2b98d..15f061b570 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshd_config
+++ b/meta/recipes-connectivity/openssh/openssh/sshd_config
@@ -1,4 +1,4 @@
-# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
+# $OpenBSD: sshd_config,v 1.102 2018/02/16 02:32:40 djm Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
@@ -7,7 +7,7 @@
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
-# possible, but leave them commented. Uncommented options change a
+# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
@@ -15,43 +15,30 @@
#ListenAddress 0.0.0.0
#ListenAddress ::
-# The default requires explicit activation of protocol 1
-Protocol 2
-
-# HostKey for protocol version 1
-#HostKey /etc/ssh/ssh_host_key
-# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
-#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
-# Lifetime and size of ephemeral version 1 server key
-#KeyRegenerationInterval 1h
-#ServerKeyBits 1024
-
# Ciphers and keying
#RekeyLimit default none
# Logging
-# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
-#PermitRootLogin yes
+#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
-#RSAAuthentication yes
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
-AuthorizedKeysFile .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
@@ -59,11 +46,9 @@ AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
-#RhostsRSAAuthentication no
-# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
-# RhostsRSAAuthentication and HostbasedAuthentication
+# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
@@ -72,7 +57,8 @@ AuthorizedKeysFile .ssh/authorized_keys
#PasswordAuthentication yes
#PermitEmptyPasswords no
-# Change to no to disable s/key passwords
+# Change to yes to enable challenge-response passwords (beware issues with
+# some PAM modules and threads)
ChallengeResponseAuthentication no
# Kerberos options
@@ -107,12 +93,11 @@ ChallengeResponseAuthentication no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
-UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
Compression no
ClientAliveInterval 15
ClientAliveCountMax 4
-#UseDNS yes
+#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
index 148e6ad63a..603c33787f 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
+++ b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
@@ -1,22 +1,8 @@
[Unit]
Description=OpenSSH Key Generation
RequiresMountsFor=/var /run
-ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key
-ConditionPathExists=!/etc/ssh/ssh_host_rsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_dsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key
[Service]
-Environment="SYSCONFDIR=/etc/ssh"
-EnvironmentFile=-/etc/default/ssh
-ExecStart=@BASE_BINDIR@/mkdir -p $SYSCONFDIR
-ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' -t rsa
-ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' -t dsa
-ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' -t ecdsa
-ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ed25519_key -N '' -t ed25519
+ExecStart=@LIBEXECDIR@/sshd_check_keys
Type=oneshot
RemainAfterExit=yes
diff --git a/meta/recipes-connectivity/openssh/openssh_7.3p1.bb b/meta/recipes-connectivity/openssh/openssh_7.3p1.bb
deleted file mode 100644
index 039b0ffdde..0000000000
--- a/meta/recipes-connectivity/openssh/openssh_7.3p1.bb
+++ /dev/null
@@ -1,164 +0,0 @@
-SUMMARY = "A suite of security-related network utilities based on \
-the SSH protocol including the ssh client and sshd server"
-DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
-Ssh (Secure Shell) is a program for logging into a remote machine \
-and for executing commands on a remote machine."
-HOMEPAGE = "http://www.openssh.com/"
-SECTION = "console/network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=e326045657e842541d3f35aada442507"
-
-DEPENDS = "zlib openssl"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
- file://sshd_config \
- file://ssh_config \
- file://init \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://sshd.socket \
- file://sshd@.service \
- file://sshdgenkeys.service \
- file://volatiles.99_sshd \
- file://add-test-support-for-busybox.patch \
- file://run-ptest \
- file://openssh-7.1p1-conditional-compile-des-in-cipher.patch \
- file://openssh-7.1p1-conditional-compile-des-in-pkcs11.patch \
- file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
- "
-
-PAM_SRC_URI = "file://sshd"
-
-SRC_URI[md5sum] = "dfadd9f035d38ce5d58a3bf130b86d08"
-SRC_URI[sha256sum] = "3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc"
-
-inherit useradd update-rc.d update-alternatives systemd
-
-USERADD_PACKAGES = "${PN}-sshd"
-USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
-INITSCRIPT_PACKAGES = "${PN}-sshd"
-INITSCRIPT_NAME_${PN}-sshd = "sshd"
-INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
-
-SYSTEMD_PACKAGES = "${PN}-sshd"
-SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
-
-inherit autotools-brokensep ptest
-
-# LFS support:
-CFLAGS += "-D__FILE_OFFSET_BITS=64"
-
-# login path is hardcoded in sshd
-EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
- --without-zlib-version-check \
- --with-privsep-path=/var/run/sshd \
- --sysconfdir=${sysconfdir}/ssh \
- --with-xauth=/usr/bin/xauth \
- --disable-strip \
- "
-
-# Since we do not depend on libbsd, we do not want configure to use it
-# just because it finds libutil.h. But, specifying --disable-libutil
-# causes compile errors, so...
-CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
-
-# passwd path is hardcoded in sshd
-CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
-
-# We don't want to depend on libblockfile
-CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
-
-# This is a workaround for uclibc because including stdio.h
-# pulls in pthreads.h and causes conflicts in function prototypes.
-# This results in compilation failure, so unless this is fixed,
-# disable pam for uclibc.
-EXTRA_OECONF_append_libc-uclibc=" --without-pam"
-
-do_configure_prepend () {
- export LD="${CC}"
- install -m 0644 ${WORKDIR}/sshd_config ${B}/
- install -m 0644 ${WORKDIR}/ssh_config ${B}/
- if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
- cp aclocal.m4 acinclude.m4
- fi
-}
-
-do_compile_ptest() {
- # skip regress/unittests/ binaries: this will silently skip
- # unittests in run-ptests which is good because they are so slow.
- oe_runmake regress/modpipe regress/setuid-allowed regress/netcat
-}
-
-do_install_append () {
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
- sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
- fi
-
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
- sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
- fi
-
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
- rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
- rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
- install -d ${D}/${sysconfdir}/default/volatiles
- install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
- install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
-
- # Create config files for read-only rootfs
- install -d ${D}${sysconfdir}/ssh
- install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
- sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
-
- install -d ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@BINDIR@,${bindir},g' \
- ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
-}
-
-do_install_ptest () {
- sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
- cp -r regress ${D}${PTEST_PATH}
-}
-
-ALLOW_EMPTY_${PN} = "1"
-
-PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
-FILES_${PN}-scp = "${bindir}/scp.${BPN}"
-FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
-FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
-FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
-FILES_${PN}-sftp = "${bindir}/sftp"
-FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
-FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
-FILES_${PN}-keygen = "${bindir}/ssh-keygen"
-
-RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
-RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
-RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
-
-RPROVIDES_${PN}-ssh = "ssh"
-RPROVIDES_${PN}-sshd = "sshd"
-
-RCONFLICTS_${PN} = "dropbear"
-RCONFLICTS_${PN}-sshd = "dropbear"
-RCONFLICTS_${PN}-keygen = "ssh-keygen"
-
-CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
-CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
-
-ALTERNATIVE_PRIORITY = "90"
-ALTERNATIVE_${PN}-scp = "scp"
-ALTERNATIVE_${PN}-ssh = "ssh"
-
diff --git a/meta/recipes-connectivity/openssh/openssh_8.1p1.bb b/meta/recipes-connectivity/openssh/openssh_8.1p1.bb
new file mode 100644
index 0000000000..024ebca402
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh_8.1p1.bb
@@ -0,0 +1,170 @@
+SUMMARY = "A suite of security-related network utilities based on \
+the SSH protocol including the ssh client and sshd server"
+DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
+Ssh (Secure Shell) is a program for logging into a remote machine \
+and for executing commands on a remote machine."
+HOMEPAGE = "http://www.openssh.com/"
+SECTION = "console/network"
+LICENSE = "BSD & ISC & MIT"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=18d9e5a8b3dd1790d73502f50426d4d3"
+
+DEPENDS = "zlib openssl virtual/crypt"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
+ file://sshd_config \
+ file://ssh_config \
+ file://init \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://sshd.socket \
+ file://sshd@.service \
+ file://sshdgenkeys.service \
+ file://volatiles.99_sshd \
+ file://run-ptest \
+ file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
+ file://sshd_check_keys \
+ file://add-test-support-for-busybox.patch \
+ "
+SRC_URI[md5sum] = "513694343631a99841e815306806edf0"
+SRC_URI[sha256sum] = "02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff"
+
+PAM_SRC_URI = "file://sshd"
+
+inherit manpages useradd update-rc.d update-alternatives systemd
+
+USERADD_PACKAGES = "${PN}-sshd"
+USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
+INITSCRIPT_PACKAGES = "${PN}-sshd"
+INITSCRIPT_NAME_${PN}-sshd = "sshd"
+INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
+
+SYSTEMD_PACKAGES = "${PN}-sshd"
+SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
+
+inherit autotools-brokensep ptest
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5"
+PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns"
+PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
+PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat"
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+# login path is hardcoded in sshd
+EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+ --without-zlib-version-check \
+ --with-privsep-path=${localstatedir}/run/sshd \
+ --sysconfdir=${sysconfdir}/ssh \
+ --with-xauth=${bindir}/xauth \
+ --disable-strip \
+ "
+
+# musl doesn't implement wtmp/utmp
+EXTRA_OECONF_append_libc-musl = " --disable-wtmp"
+
+# Since we do not depend on libbsd, we do not want configure to use it
+# just because it finds libutil.h. But, specifying --disable-libutil
+# causes compile errors, so...
+CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
+
+# passwd path is hardcoded in sshd
+CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
+
+# We don't want to depend on libblockfile
+CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
+
+do_configure_prepend () {
+ export LD="${CC}"
+ install -m 0644 ${WORKDIR}/sshd_config ${B}/
+ install -m 0644 ${WORKDIR}/ssh_config ${B}/
+}
+
+do_compile_ptest() {
+ # skip regress/unittests/ binaries: this will silently skip
+ # unittests in run-ptests which is good because they are so slow.
+ oe_runmake regress/modpipe regress/setuid-allowed regress/netcat \
+ regress/check-perm regress/mkdtemp
+}
+
+do_install_append () {
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
+ sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
+ fi
+
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
+ sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
+ fi
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
+ rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
+ rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
+ install -d ${D}/${sysconfdir}/default/volatiles
+ install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
+ install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
+
+ # Create config files for read-only rootfs
+ install -d ${D}${sysconfdir}/ssh
+ install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
+ sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+
+ install -d ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@BINDIR@,${bindir},g' \
+ -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
+ ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
+
+ sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
+ ${D}${sysconfdir}/init.d/sshd
+
+ install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys
+}
+
+do_install_ptest () {
+ sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
+ cp -r regress ${D}${PTEST_PATH}
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
+FILES_${PN}-scp = "${bindir}/scp.${BPN}"
+FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
+FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
+FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
+FILES_${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys"
+FILES_${PN}-sftp = "${bindir}/sftp"
+FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
+FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
+FILES_${PN}-keygen = "${bindir}/ssh-keygen"
+
+RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
+RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
+RRECOMMENDS_${PN}-sshd_append_class-target = " rng-tools"
+# gdb would make attach-ptrace test pass rather than skip but not worth the build dependencies
+RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed sudo coreutils"
+
+RPROVIDES_${PN}-ssh = "ssh"
+RPROVIDES_${PN}-sshd = "sshd"
+
+RCONFLICTS_${PN} = "dropbear"
+RCONFLICTS_${PN}-sshd = "dropbear"
+
+CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
+CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_${PN}-scp = "scp"
+ALTERNATIVE_${PN}-ssh = "ssh"
+
+BBCLASSEXTEND += "nativesdk"
diff --git a/meta/recipes-connectivity/openssl/files/environment.d-openssl.sh b/meta/recipes-connectivity/openssl/files/environment.d-openssl.sh
new file mode 100644
index 0000000000..b9cc24a7ac
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/files/environment.d-openssl.sh
@@ -0,0 +1 @@
+export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf"
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
deleted file mode 100644
index f3a2c5abd7..0000000000
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ /dev/null
@@ -1,242 +0,0 @@
-SUMMARY = "Secure Socket Layer"
-DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
-HOMEPAGE = "http://www.openssl.org/"
-BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
-SECTION = "libs/network"
-
-# "openssl | SSLeay" dual license
-LICENSE = "openssl"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
-
-DEPENDS = "makedepend-native hostperl-runtime-native"
-DEPENDS_append_class-target = " openssl-native"
-
-SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
- "
-S = "${WORKDIR}/openssl-${PV}"
-
-PACKAGECONFIG[perl] = ",,,"
-
-AR_append = " r"
-TERMIO_libc-musl = "-DTERMIOS"
-TERMIO ?= "-DTERMIO"
-# Avoid binaries being marked as requiring an executable stack since it
-# doesn't(which causes and this causes issues with SELinux
-CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
- ${TERMIO} ${CFLAGS} -Wall -Wa,--noexecstack"
-
-export DIRS = "crypto ssl apps"
-export EX_LIBS = "-lgcc -ldl"
-export AS = "${CC} -c"
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-inherit pkgconfig siteinfo multilib_header ptest
-
-PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
-FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
-FILES_libssl = "${libdir}/libssl${SOLIBS}"
-FILES_${PN} =+ " ${libdir}/ssl/*"
-FILES_${PN}-misc = "${libdir}/ssl/misc"
-RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}"
-
-# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
-# package RRECOMMENDS on this package. This will enable the configuration
-# file to be installed for both the base openssl package and the libcrypto
-# package since the base openssl package depends on the libcrypto package.
-FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
-CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
-RRECOMMENDS_libcrypto += "openssl-conf"
-RDEPENDS_${PN}-ptest += "${PN}-misc make perl perl-module-filehandle bc"
-
-# Remove this to enable SSLv3. SSLv3 is defaulted to disabled due to the POODLE
-# vulnerability
-EXTRA_OECONF = " -no-ssl3"
-
-do_configure_prepend_darwin () {
- sed -i -e '/version-script=openssl\.ld/d' Configure
-}
-
-do_configure () {
- cd util
- perl perlpath.pl ${STAGING_BINDIR_NATIVE}
- cd ..
- ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
-
- os=${HOST_OS}
- case $os in
- linux-uclibc |\
- linux-uclibceabi |\
- linux-gnueabi |\
- linux-uclibcspe |\
- linux-gnuspe |\
- linux-musl*)
- os=linux
- ;;
- *)
- ;;
- esac
- target="$os-${HOST_ARCH}"
- case $target in
- linux-arm)
- target=linux-armv4
- ;;
- linux-armeb)
- target=linux-elf-armeb
- ;;
- linux-aarch64*)
- target=linux-generic64
- ;;
- linux-sh3)
- target=debian-sh3
- ;;
- linux-sh4)
- target=debian-sh4
- ;;
- linux-i486)
- target=debian-i386-i486
- ;;
- linux-i586 | linux-viac3)
- target=debian-i386-i586
- ;;
- linux-i686)
- target=debian-i386-i686/cmov
- ;;
- linux-gnux32-x86_64)
- target=linux-x32
- ;;
- linux-gnu64-x86_64)
- target=linux-x86_64
- ;;
- linux-mips)
- target=debian-mips
- ;;
- linux-mipsel)
- target=debian-mipsel
- ;;
- linux-*-mips64 | linux-mips64)
- target=debian-mips64
- ;;
- linux-*-mips64el | linux-mips64el)
- target=debian-mips64el
- ;;
- linux-microblaze*|linux-nios2*)
- target=linux-generic32
- ;;
- linux-powerpc)
- target=linux-ppc
- ;;
- linux-powerpc64)
- target=linux-ppc64
- ;;
- linux-supersparc)
- target=linux-sparcv8
- ;;
- linux-sparc)
- target=linux-sparcv8
- ;;
- darwin-i386)
- target=darwin-i386-cc
- ;;
- esac
- # inject machine-specific flags
- sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure
- useprefix=${prefix}
- if [ "x$useprefix" = "x" ]; then
- useprefix=/
- fi
- perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target
-}
-
-do_compile_prepend_class-target () {
- sed -i 's/\((OPENSSL=\)".*"/\1"openssl"/' Makefile
-}
-
-do_compile () {
- oe_runmake depend
- oe_runmake
-}
-
-do_compile_ptest () {
- # build dependencies for test directory too
- export DIRS="$DIRS test"
- oe_runmake depend
- oe_runmake buildtest
-}
-
-do_install () {
- # Create ${D}/${prefix} to fix parallel issues
- mkdir -p ${D}/${prefix}/
-
- oe_runmake INSTALL_PREFIX="${D}" MANDIR="${mandir}" install
-
- oe_libinstall -so libcrypto ${D}${libdir}
- oe_libinstall -so libssl ${D}${libdir}
-
- install -d ${D}${includedir}
- cp --dereference -R include/openssl ${D}${includedir}
-
- install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
- sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
-
- oe_multilib_header openssl/opensslconf.h
- if [ "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then
- sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
- sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget
- else
- rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget
- fi
-
- # Create SSL structure
- install -d ${D}${sysconfdir}/ssl/
- mv ${D}${libdir}/ssl/openssl.cnf \
- ${D}${libdir}/ssl/certs \
- ${D}${libdir}/ssl/private \
- \
- ${D}${sysconfdir}/ssl/
- ln -sf ${sysconfdir}/ssl/certs ${D}${libdir}/ssl/certs
- ln -sf ${sysconfdir}/ssl/private ${D}${libdir}/ssl/private
- ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${libdir}/ssl/openssl.cnf
-}
-
-do_install_ptest () {
- cp -r -L Makefile.org Makefile test ${D}${PTEST_PATH}
- cp Configure config e_os.h ${D}${PTEST_PATH}
- cp -r -L include ${D}${PTEST_PATH}
- ln -sf ${libdir}/libcrypto.a ${D}${PTEST_PATH}
- ln -sf ${libdir}/libssl.a ${D}${PTEST_PATH}
- mkdir -p ${D}${PTEST_PATH}/crypto
- cp crypto/constant_time_locl.h ${D}${PTEST_PATH}/crypto
- cp -r certs ${D}${PTEST_PATH}
- mkdir -p ${D}${PTEST_PATH}/apps
- ln -sf ${libdir}/ssl/misc/CA.sh ${D}${PTEST_PATH}/apps
- ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${PTEST_PATH}/apps
- ln -sf ${bindir}/openssl ${D}${PTEST_PATH}/apps
- cp apps/server.pem ${D}${PTEST_PATH}/apps
- cp apps/server2.pem ${D}${PTEST_PATH}/apps
- mkdir -p ${D}${PTEST_PATH}/util
- install util/opensslwrap.sh ${D}${PTEST_PATH}/util
- install util/shlib_wrap.sh ${D}${PTEST_PATH}/util
- # Time stamps are relevant for "make alltests", otherwise
- # make may try to recompile binaries. Not only must the
- # binary files be newer than the sources, they also must
- # be more recent than the header files in /usr/include.
- #
- # Using "cp -a" is not sufficient, because do_install
- # does not preserve the original time stamps.
- #
- # So instead of using the original file stamps, we set
- # the current time for all files. Binaries will get
- # modified again later when stripping them, but that's okay.
- touch ${D}${PTEST_PATH}
- find ${D}${PTEST_PATH} -type f -print0 | xargs --verbose -0 touch -r ${D}${PTEST_PATH}
-}
-
-do_install_append_class-native() {
- create_wrapper ${D}${bindir}/openssl \
- OPENSSL_CONF=${libdir}/ssl/openssl.cnf \
- SSL_CERT_DIR=${libdir}/ssl/certs \
- SSL_CERT_FILE=${libdir}/ssl/cert.pem \
- OPENSSL_ENGINES=${libdir}/ssl/engines
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch b/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch
new file mode 100644
index 0000000000..949c788344
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch
@@ -0,0 +1,76 @@
+From 3e1d00481093e10775eaf69d619c45b32a4aa7dc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
+Date: Tue, 6 Nov 2018 14:50:47 +0100
+Subject: [PATCH] buildinfo: strip sysroot and debug-prefix-map from compiler
+ info
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The openssl build system generates buildinf.h containing the full
+compiler command line used to compile objects. This breaks
+reproducibility, as the compile command is baked into libcrypto, where
+it is used when running `openssl version -f`.
+
+Add stripped build variables for the compiler and cflags lines, and use
+those when generating buildinfo.h.
+
+This is based on a similar patch for older openssl versions:
+https://patchwork.openembedded.org/patch/147229/
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Martin Hundebøll <martin@geanix.com>
+
+
+Update to fix buildpaths qa issue for '-fmacro-prefix-map'.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ Configurations/unix-Makefile.tmpl | 10 +++++++++-
+ crypto/build.info | 2 +-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
+index 16af4d2087..54c162784c 100644
+--- a/Configurations/unix-Makefile.tmpl
++++ b/Configurations/unix-Makefile.tmpl
+@@ -317,13 +317,22 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (),
+ '$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
+ BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
+
+-# CPPFLAGS_Q is used for one thing only: to build up buildinf.h
++# *_Q variables are used for one thing only: to build up buildinf.h
+ CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g;
+ $cppflags2 =~ s|([\\"])|\\$1|g;
+ $lib_cppflags =~ s|([\\"])|\\$1|g;
+ join(' ', $lib_cppflags || (), $cppflags2 || (),
+ $cppflags1 || ()) -}
+
++CFLAGS_Q={- for (@{$config{CFLAGS}}) {
++ s|-fdebug-prefix-map=[^ ]+|-fdebug-prefix-map=|g;
++ s|-fmacro-prefix-map=[^ ]+|-fmacro-prefix-map=|g;
++ }
++ join(' ', @{$config{CFLAGS}}) -}
++
++CC_Q={- $config{CC} =~ s|--sysroot=[^ ]+|--sysroot=recipe-sysroot|g;
++ join(' ', $config{CC}) -}
++
+ PERLASM_SCHEME= {- $target{perlasm_scheme} -}
+
+ # For x86 assembler: Set PROCESSOR to 386 if you want to support
+diff --git a/crypto/build.info b/crypto/build.info
+index b515b7318e..8c9cee2a09 100644
+--- a/crypto/build.info
++++ b/crypto/build.info
+@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
+ ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
+
+ DEPEND[cversion.o]=buildinf.h
+-GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
++GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC_Q) $(CFLAGS_Q) $(CPPFLAGS_Q)" "$(PLATFORM)"
+ DEPEND[buildinf.h]=../configdata.pm
+
+ GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME)
+--
+2.19.1
+
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch b/meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch
new file mode 100644
index 0000000000..d8d9651b64
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch
@@ -0,0 +1,46 @@
+From a9401b2289656c5a36dd1b0ecebf0d23e291ce70 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 2 Oct 2018 23:58:24 +0800
+Subject: [PATCH] skip test_symbol_presence
+
+We cannot skip `01-test_symbol_presence.t' by configuring option `no-shared'
+as INSTALL told us the shared libraries will not be built.
+
+[INSTALL snip]
+ Notes on shared libraries
+ -------------------------
+
+ For most systems the OpenSSL Configure script knows what is needed to
+ build shared libraries for libcrypto and libssl. On these systems
+ the shared libraries will be created by default. This can be suppressed and
+ only static libraries created by using the "no-shared" option. On systems
+ where OpenSSL does not know how to build shared libraries the "no-shared"
+ option will be forced and only static libraries will be created.
+[INSTALL snip]
+
+Hence directly modification the case to skip it.
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ test/recipes/01-test_symbol_presence.t | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t
+index 7f2a2d7..0b93745 100644
+--- a/test/recipes/01-test_symbol_presence.t
++++ b/test/recipes/01-test_symbol_presence.t
+@@ -14,8 +14,7 @@ use OpenSSL::Test::Utils;
+
+ setup("test_symbol_presence");
+
+-plan skip_all => "Only useful when building shared libraries"
+- if disabled("shared");
++plan skip_all => "The case needs debug symbols then we just disable it";
+
+ my @libnames = ("crypto", "ssl");
+ my $testcount = scalar @libnames;
+--
+2.7.4
+
diff --git a/meta/recipes-connectivity/openssl/openssl/CVE-2019-1551.patch b/meta/recipes-connectivity/openssl/openssl/CVE-2019-1551.patch
new file mode 100644
index 0000000000..0cc19cb5f4
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/CVE-2019-1551.patch
@@ -0,0 +1,758 @@
+From 419102400a2811582a7a3d4a4e317d72e5ce0a8f Mon Sep 17 00:00:00 2001
+From: Andy Polyakov <appro@openssl.org>
+Date: Wed, 4 Dec 2019 12:48:21 +0100
+Subject: [PATCH] Fix an overflow bug in rsaz_512_sqr
+
+There is an overflow bug in the x64_64 Montgomery squaring procedure used in
+exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis
+suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a
+result of this defect would be very difficult to perform and are not believed
+likely. Attacks against DH512 are considered just feasible. However, for an
+attack the target would have to re-use the DH512 private key, which is not
+recommended anyway. Also applications directly using the low level API
+BN_mod_exp may be affected if they use BN_FLG_CONSTTIME.
+
+CVE-2019-1551
+
+Reviewed-by: Paul Dale <paul.dale@oracle.com>
+Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
+(Merged from https://github.com/openssl/openssl/pull/10575)
+
+CVE: CVE-2019-1551
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ crypto/bn/asm/rsaz-x86_64.pl | 381 ++++++++++++++++++-----------------
+ 1 file changed, 197 insertions(+), 184 deletions(-)
+
+diff --git a/crypto/bn/asm/rsaz-x86_64.pl b/crypto/bn/asm/rsaz-x86_64.pl
+index b1797b649f0..7534d5cd03e 100755
+--- a/crypto/bn/asm/rsaz-x86_64.pl
++++ b/crypto/bn/asm/rsaz-x86_64.pl
+@@ -116,7 +116,7 @@
+ subq \$128+24, %rsp
+ .cfi_adjust_cfa_offset 128+24
+ .Lsqr_body:
+- movq $mod, %rbp # common argument
++ movq $mod, %xmm1 # common off-load
+ movq ($inp), %rdx
+ movq 8($inp), %rax
+ movq $n0, 128(%rsp)
+@@ -134,7 +134,8 @@
+ .Loop_sqr:
+ movl $times,128+8(%rsp)
+ #first iteration
+- movq %rdx, %rbx
++ movq %rdx, %rbx # 0($inp)
++ mov %rax, %rbp # 8($inp)
+ mulq %rdx
+ movq %rax, %r8
+ movq 16($inp), %rax
+@@ -173,31 +174,29 @@
+ mulq %rbx
+ addq %rax, %r14
+ movq %rbx, %rax
+- movq %rdx, %r15
+- adcq \$0, %r15
++ adcq \$0, %rdx
+
+- addq %r8, %r8 #shlq \$1, %r8
+- movq %r9, %rcx
+- adcq %r9, %r9 #shld \$1, %r8, %r9
++ xorq %rcx,%rcx # rcx:r8 = r8 << 1
++ addq %r8, %r8
++ movq %rdx, %r15
++ adcq \$0, %rcx
+
+ mulq %rax
+- movq %rax, (%rsp)
+- addq %rdx, %r8
+- adcq \$0, %r9
++ addq %r8, %rdx
++ adcq \$0, %rcx
+
+- movq %r8, 8(%rsp)
+- shrq \$63, %rcx
++ movq %rax, (%rsp)
++ movq %rdx, 8(%rsp)
+
+ #second iteration
+- movq 8($inp), %r8
+ movq 16($inp), %rax
+- mulq %r8
++ mulq %rbp
+ addq %rax, %r10
+ movq 24($inp), %rax
+ movq %rdx, %rbx
+ adcq \$0, %rbx
+
+- mulq %r8
++ mulq %rbp
+ addq %rax, %r11
+ movq 32($inp), %rax
+ adcq \$0, %rdx
+@@ -205,7 +204,7 @@
+ movq %rdx, %rbx
+ adcq \$0, %rbx
+
+- mulq %r8
++ mulq %rbp
+ addq %rax, %r12
+ movq 40($inp), %rax
+ adcq \$0, %rdx
+@@ -213,7 +212,7 @@
+ movq %rdx, %rbx
+ adcq \$0, %rbx
+
+- mulq %r8
++ mulq %rbp
+ addq %rax, %r13
+ movq 48($inp), %rax
+ adcq \$0, %rdx
+@@ -221,7 +220,7 @@
+ movq %rdx, %rbx
+ adcq \$0, %rbx
+
+- mulq %r8
++ mulq %rbp
+ addq %rax, %r14
+ movq 56($inp), %rax
+ adcq \$0, %rdx
+@@ -229,39 +228,39 @@
+ movq %rdx, %rbx
+ adcq \$0, %rbx
+
+- mulq %r8
++ mulq %rbp
+ addq %rax, %r15
+- movq %r8, %rax
++ movq %rbp, %rax
+ adcq \$0, %rdx
+ addq %rbx, %r15
+- movq %rdx, %r8
+- movq %r10, %rdx
+- adcq \$0, %r8
++ adcq \$0, %rdx
+
+- add %rdx, %rdx
+- lea (%rcx,%r10,2), %r10 #shld \$1, %rcx, %r10
+- movq %r11, %rbx
+- adcq %r11, %r11 #shld \$1, %r10, %r11
++ xorq %rbx, %rbx # rbx:r10:r9 = r10:r9 << 1
++ addq %r9, %r9
++ movq %rdx, %r8
++ adcq %r10, %r10
++ adcq \$0, %rbx
+
+ mulq %rax
++ addq %rcx, %rax
++ movq 16($inp), %rbp
++ adcq \$0, %rdx
+ addq %rax, %r9
++ movq 24($inp), %rax
+ adcq %rdx, %r10
+- adcq \$0, %r11
++ adcq \$0, %rbx
+
+ movq %r9, 16(%rsp)
+ movq %r10, 24(%rsp)
+- shrq \$63, %rbx
+
+ #third iteration
+- movq 16($inp), %r9
+- movq 24($inp), %rax
+- mulq %r9
++ mulq %rbp
+ addq %rax, %r12
+ movq 32($inp), %rax
+ movq %rdx, %rcx
+ adcq \$0, %rcx
+
+- mulq %r9
++ mulq %rbp
+ addq %rax, %r13
+ movq 40($inp), %rax
+ adcq \$0, %rdx
+@@ -269,7 +268,7 @@
+ movq %rdx, %rcx
+ adcq \$0, %rcx
+
+- mulq %r9
++ mulq %rbp
+ addq %rax, %r14
+ movq 48($inp), %rax
+ adcq \$0, %rdx
+@@ -277,9 +276,7 @@
+ movq %rdx, %rcx
+ adcq \$0, %rcx
+
+- mulq %r9
+- movq %r12, %r10
+- lea (%rbx,%r12,2), %r12 #shld \$1, %rbx, %r12
++ mulq %rbp
+ addq %rax, %r15
+ movq 56($inp), %rax
+ adcq \$0, %rdx
+@@ -287,36 +284,40 @@
+ movq %rdx, %rcx
+ adcq \$0, %rcx
+
+- mulq %r9
+- shrq \$63, %r10
++ mulq %rbp
+ addq %rax, %r8
+- movq %r9, %rax
++ movq %rbp, %rax
+ adcq \$0, %rdx
+ addq %rcx, %r8
+- movq %rdx, %r9
+- adcq \$0, %r9
++ adcq \$0, %rdx
+
+- movq %r13, %rcx
+- leaq (%r10,%r13,2), %r13 #shld \$1, %r12, %r13
++ xorq %rcx, %rcx # rcx:r12:r11 = r12:r11 << 1
++ addq %r11, %r11
++ movq %rdx, %r9
++ adcq %r12, %r12
++ adcq \$0, %rcx
+
+ mulq %rax
++ addq %rbx, %rax
++ movq 24($inp), %r10
++ adcq \$0, %rdx
+ addq %rax, %r11
++ movq 32($inp), %rax
+ adcq %rdx, %r12
+- adcq \$0, %r13
++ adcq \$0, %rcx
+
+ movq %r11, 32(%rsp)
+ movq %r12, 40(%rsp)
+- shrq \$63, %rcx
+
+ #fourth iteration
+- movq 24($inp), %r10
+- movq 32($inp), %rax
++ mov %rax, %r11 # 32($inp)
+ mulq %r10
+ addq %rax, %r14
+ movq 40($inp), %rax
+ movq %rdx, %rbx
+ adcq \$0, %rbx
+
++ mov %rax, %r12 # 40($inp)
+ mulq %r10
+ addq %rax, %r15
+ movq 48($inp), %rax
+@@ -325,9 +326,8 @@
+ movq %rdx, %rbx
+ adcq \$0, %rbx
+
++ mov %rax, %rbp # 48($inp)
+ mulq %r10
+- movq %r14, %r12
+- leaq (%rcx,%r14,2), %r14 #shld \$1, %rcx, %r14
+ addq %rax, %r8
+ movq 56($inp), %rax
+ adcq \$0, %rdx
+@@ -336,32 +336,33 @@
+ adcq \$0, %rbx
+
+ mulq %r10
+- shrq \$63, %r12
+ addq %rax, %r9
+ movq %r10, %rax
+ adcq \$0, %rdx
+ addq %rbx, %r9
+- movq %rdx, %r10
+- adcq \$0, %r10
++ adcq \$0, %rdx
+
+- movq %r15, %rbx
+- leaq (%r12,%r15,2),%r15 #shld \$1, %r14, %r15
++ xorq %rbx, %rbx # rbx:r13:r14 = r13:r14 << 1
++ addq %r13, %r13
++ movq %rdx, %r10
++ adcq %r14, %r14
++ adcq \$0, %rbx
+
+ mulq %rax
++ addq %rcx, %rax
++ adcq \$0, %rdx
+ addq %rax, %r13
++ movq %r12, %rax # 40($inp)
+ adcq %rdx, %r14
+- adcq \$0, %r15
++ adcq \$0, %rbx
+
+ movq %r13, 48(%rsp)
+ movq %r14, 56(%rsp)
+- shrq \$63, %rbx
+
+ #fifth iteration
+- movq 32($inp), %r11
+- movq 40($inp), %rax
+ mulq %r11
+ addq %rax, %r8
+- movq 48($inp), %rax
++ movq %rbp, %rax # 48($inp)
+ movq %rdx, %rcx
+ adcq \$0, %rcx
+
+@@ -369,97 +370,99 @@
+ addq %rax, %r9
+ movq 56($inp), %rax
+ adcq \$0, %rdx
+- movq %r8, %r12
+- leaq (%rbx,%r8,2), %r8 #shld \$1, %rbx, %r8
+ addq %rcx, %r9
+ movq %rdx, %rcx
+ adcq \$0, %rcx
+
++ mov %rax, %r14 # 56($inp)
+ mulq %r11
+- shrq \$63, %r12
+ addq %rax, %r10
+ movq %r11, %rax
+ adcq \$0, %rdx
+ addq %rcx, %r10
+- movq %rdx, %r11
+- adcq \$0, %r11
++ adcq \$0, %rdx
+
+- movq %r9, %rcx
+- leaq (%r12,%r9,2), %r9 #shld \$1, %r8, %r9
++ xorq %rcx, %rcx # rcx:r8:r15 = r8:r15 << 1
++ addq %r15, %r15
++ movq %rdx, %r11
++ adcq %r8, %r8
++ adcq \$0, %rcx
+
+ mulq %rax
++ addq %rbx, %rax
++ adcq \$0, %rdx
+ addq %rax, %r15
++ movq %rbp, %rax # 48($inp)
+ adcq %rdx, %r8
+- adcq \$0, %r9
++ adcq \$0, %rcx
+
+ movq %r15, 64(%rsp)
+ movq %r8, 72(%rsp)
+- shrq \$63, %rcx
+
+ #sixth iteration
+- movq 40($inp), %r12
+- movq 48($inp), %rax
+ mulq %r12
+ addq %rax, %r10
+- movq 56($inp), %rax
++ movq %r14, %rax # 56($inp)
+ movq %rdx, %rbx
+ adcq \$0, %rbx
+
+ mulq %r12
+ addq %rax, %r11
+ movq %r12, %rax
+- movq %r10, %r15
+- leaq (%rcx,%r10,2), %r10 #shld \$1, %rcx, %r10
+ adcq \$0, %rdx
+- shrq \$63, %r15
+ addq %rbx, %r11
+- movq %rdx, %r12
+- adcq \$0, %r12
++ adcq \$0, %rdx
+
+- movq %r11, %rbx
+- leaq (%r15,%r11,2), %r11 #shld \$1, %r10, %r11
++ xorq %rbx, %rbx # rbx:r10:r9 = r10:r9 << 1
++ addq %r9, %r9
++ movq %rdx, %r12
++ adcq %r10, %r10
++ adcq \$0, %rbx
+
+ mulq %rax
++ addq %rcx, %rax
++ adcq \$0, %rdx
+ addq %rax, %r9
++ movq %r14, %rax # 56($inp)
+ adcq %rdx, %r10
+- adcq \$0, %r11
++ adcq \$0, %rbx
+
+ movq %r9, 80(%rsp)
+ movq %r10, 88(%rsp)
+
+ #seventh iteration
+- movq 48($inp), %r13
+- movq 56($inp), %rax
+- mulq %r13
++ mulq %rbp
+ addq %rax, %r12
+- movq %r13, %rax
+- movq %rdx, %r13
+- adcq \$0, %r13
++ movq %rbp, %rax
++ adcq \$0, %rdx
+
+- xorq %r14, %r14
+- shlq \$1, %rbx
+- adcq %r12, %r12 #shld \$1, %rbx, %r12
+- adcq %r13, %r13 #shld \$1, %r12, %r13
+- adcq %r14, %r14 #shld \$1, %r13, %r14
++ xorq %rcx, %rcx # rcx:r12:r11 = r12:r11 << 1
++ addq %r11, %r11
++ movq %rdx, %r13
++ adcq %r12, %r12
++ adcq \$0, %rcx
+
+ mulq %rax
++ addq %rbx, %rax
++ adcq \$0, %rdx
+ addq %rax, %r11
++ movq %r14, %rax # 56($inp)
+ adcq %rdx, %r12
+- adcq \$0, %r13
++ adcq \$0, %rcx
+
+ movq %r11, 96(%rsp)
+ movq %r12, 104(%rsp)
+
+ #eighth iteration
+- movq 56($inp), %rax
++ xorq %rbx, %rbx # rbx:r13 = r13 << 1
++ addq %r13, %r13
++ adcq \$0, %rbx
++
+ mulq %rax
+- addq %rax, %r13
++ addq %rcx, %rax
+ adcq \$0, %rdx
+-
+- addq %rdx, %r14
+-
+- movq %r13, 112(%rsp)
+- movq %r14, 120(%rsp)
++ addq %r13, %rax
++ adcq %rbx, %rdx
+
+ movq (%rsp), %r8
+ movq 8(%rsp), %r9
+@@ -469,6 +472,10 @@
+ movq 40(%rsp), %r13
+ movq 48(%rsp), %r14
+ movq 56(%rsp), %r15
++ movq %xmm1, %rbp
++
++ movq %rax, 112(%rsp)
++ movq %rdx, 120(%rsp)
+
+ call __rsaz_512_reduce
+
+@@ -500,9 +507,9 @@
+ .Loop_sqrx:
+ movl $times,128+8(%rsp)
+ movq $out, %xmm0 # off-load
+- movq %rbp, %xmm1 # off-load
+ #first iteration
+ mulx %rax, %r8, %r9
++ mov %rax, %rbx
+
+ mulx 16($inp), %rcx, %r10
+ xor %rbp, %rbp # cf=0, of=0
+@@ -510,40 +517,39 @@
+ mulx 24($inp), %rax, %r11
+ adcx %rcx, %r9
+
+- mulx 32($inp), %rcx, %r12
++ .byte 0xc4,0x62,0xf3,0xf6,0xa6,0x20,0x00,0x00,0x00 # mulx 32($inp), %rcx, %r12
+ adcx %rax, %r10
+
+- mulx 40($inp), %rax, %r13
++ .byte 0xc4,0x62,0xfb,0xf6,0xae,0x28,0x00,0x00,0x00 # mulx 40($inp), %rax, %r13
+ adcx %rcx, %r11
+
+- .byte 0xc4,0x62,0xf3,0xf6,0xb6,0x30,0x00,0x00,0x00 # mulx 48($inp), %rcx, %r14
++ mulx 48($inp), %rcx, %r14
+ adcx %rax, %r12
+ adcx %rcx, %r13
+
+- .byte 0xc4,0x62,0xfb,0xf6,0xbe,0x38,0x00,0x00,0x00 # mulx 56($inp), %rax, %r15
++ mulx 56($inp), %rax, %r15
+ adcx %rax, %r14
+ adcx %rbp, %r15 # %rbp is 0
+
+- mov %r9, %rcx
+- shld \$1, %r8, %r9
+- shl \$1, %r8
+-
+- xor %ebp, %ebp
+- mulx %rdx, %rax, %rdx
+- adcx %rdx, %r8
+- mov 8($inp), %rdx
+- adcx %rbp, %r9
++ mulx %rdx, %rax, $out
++ mov %rbx, %rdx # 8($inp)
++ xor %rcx, %rcx
++ adox %r8, %r8
++ adcx $out, %r8
++ adox %rbp, %rcx
++ adcx %rbp, %rcx
+
+ mov %rax, (%rsp)
+ mov %r8, 8(%rsp)
+
+ #second iteration
+- mulx 16($inp), %rax, %rbx
++ .byte 0xc4,0xe2,0xfb,0xf6,0x9e,0x10,0x00,0x00,0x00 # mulx 16($inp), %rax, %rbx
+ adox %rax, %r10
+ adcx %rbx, %r11
+
+- .byte 0xc4,0x62,0xc3,0xf6,0x86,0x18,0x00,0x00,0x00 # mulx 24($inp), $out, %r8
++ mulx 24($inp), $out, %r8
+ adox $out, %r11
++ .byte 0x66
+ adcx %r8, %r12
+
+ mulx 32($inp), %rax, %rbx
+@@ -561,24 +567,25 @@
+ .byte 0xc4,0x62,0xc3,0xf6,0x86,0x38,0x00,0x00,0x00 # mulx 56($inp), $out, %r8
+ adox $out, %r15
+ adcx %rbp, %r8
++ mulx %rdx, %rax, $out
+ adox %rbp, %r8
++ .byte 0x48,0x8b,0x96,0x10,0x00,0x00,0x00 # mov 16($inp), %rdx
+
+- mov %r11, %rbx
+- shld \$1, %r10, %r11
+- shld \$1, %rcx, %r10
+-
+- xor %ebp,%ebp
+- mulx %rdx, %rax, %rcx
+- mov 16($inp), %rdx
++ xor %rbx, %rbx
++ adcx %rcx, %rax
++ adox %r9, %r9
++ adcx %rbp, $out
++ adox %r10, %r10
+ adcx %rax, %r9
+- adcx %rcx, %r10
+- adcx %rbp, %r11
++ adox %rbp, %rbx
++ adcx $out, %r10
++ adcx %rbp, %rbx
+
+ mov %r9, 16(%rsp)
+ .byte 0x4c,0x89,0x94,0x24,0x18,0x00,0x00,0x00 # mov %r10, 24(%rsp)
+
+ #third iteration
+- .byte 0xc4,0x62,0xc3,0xf6,0x8e,0x18,0x00,0x00,0x00 # mulx 24($inp), $out, %r9
++ mulx 24($inp), $out, %r9
+ adox $out, %r12
+ adcx %r9, %r13
+
+@@ -586,7 +593,7 @@
+ adox %rax, %r13
+ adcx %rcx, %r14
+
+- mulx 40($inp), $out, %r9
++ .byte 0xc4,0x62,0xc3,0xf6,0x8e,0x28,0x00,0x00,0x00 # mulx 40($inp), $out, %r9
+ adox $out, %r14
+ adcx %r9, %r15
+
+@@ -594,27 +601,28 @@
+ adox %rax, %r15
+ adcx %rcx, %r8
+
+- .byte 0xc4,0x62,0xc3,0xf6,0x8e,0x38,0x00,0x00,0x00 # mulx 56($inp), $out, %r9
++ mulx 56($inp), $out, %r9
+ adox $out, %r8
+ adcx %rbp, %r9
++ mulx %rdx, %rax, $out
+ adox %rbp, %r9
++ mov 24($inp), %rdx
+
+- mov %r13, %rcx
+- shld \$1, %r12, %r13
+- shld \$1, %rbx, %r12
+-
+- xor %ebp, %ebp
+- mulx %rdx, %rax, %rdx
++ xor %rcx, %rcx
++ adcx %rbx, %rax
++ adox %r11, %r11
++ adcx %rbp, $out
++ adox %r12, %r12
+ adcx %rax, %r11
+- adcx %rdx, %r12
+- mov 24($inp), %rdx
+- adcx %rbp, %r13
++ adox %rbp, %rcx
++ adcx $out, %r12
++ adcx %rbp, %rcx
+
+ mov %r11, 32(%rsp)
+- .byte 0x4c,0x89,0xa4,0x24,0x28,0x00,0x00,0x00 # mov %r12, 40(%rsp)
++ mov %r12, 40(%rsp)
+
+ #fourth iteration
+- .byte 0xc4,0xe2,0xfb,0xf6,0x9e,0x20,0x00,0x00,0x00 # mulx 32($inp), %rax, %rbx
++ mulx 32($inp), %rax, %rbx
+ adox %rax, %r14
+ adcx %rbx, %r15
+
+@@ -629,25 +637,25 @@
+ mulx 56($inp), $out, %r10
+ adox $out, %r9
+ adcx %rbp, %r10
++ mulx %rdx, %rax, $out
+ adox %rbp, %r10
++ mov 32($inp), %rdx
+
+- .byte 0x66
+- mov %r15, %rbx
+- shld \$1, %r14, %r15
+- shld \$1, %rcx, %r14
+-
+- xor %ebp, %ebp
+- mulx %rdx, %rax, %rdx
++ xor %rbx, %rbx
++ adcx %rcx, %rax
++ adox %r13, %r13
++ adcx %rbp, $out
++ adox %r14, %r14
+ adcx %rax, %r13
+- adcx %rdx, %r14
+- mov 32($inp), %rdx
+- adcx %rbp, %r15
++ adox %rbp, %rbx
++ adcx $out, %r14
++ adcx %rbp, %rbx
+
+ mov %r13, 48(%rsp)
+ mov %r14, 56(%rsp)
+
+ #fifth iteration
+- .byte 0xc4,0x62,0xc3,0xf6,0x9e,0x28,0x00,0x00,0x00 # mulx 40($inp), $out, %r11
++ mulx 40($inp), $out, %r11
+ adox $out, %r8
+ adcx %r11, %r9
+
+@@ -658,18 +666,19 @@
+ mulx 56($inp), $out, %r11
+ adox $out, %r10
+ adcx %rbp, %r11
++ mulx %rdx, %rax, $out
++ mov 40($inp), %rdx
+ adox %rbp, %r11
+
+- mov %r9, %rcx
+- shld \$1, %r8, %r9
+- shld \$1, %rbx, %r8
+-
+- xor %ebp, %ebp
+- mulx %rdx, %rax, %rdx
++ xor %rcx, %rcx
++ adcx %rbx, %rax
++ adox %r15, %r15
++ adcx %rbp, $out
++ adox %r8, %r8
+ adcx %rax, %r15
+- adcx %rdx, %r8
+- mov 40($inp), %rdx
+- adcx %rbp, %r9
++ adox %rbp, %rcx
++ adcx $out, %r8
++ adcx %rbp, %rcx
+
+ mov %r15, 64(%rsp)
+ mov %r8, 72(%rsp)
+@@ -682,18 +691,19 @@
+ .byte 0xc4,0x62,0xc3,0xf6,0xa6,0x38,0x00,0x00,0x00 # mulx 56($inp), $out, %r12
+ adox $out, %r11
+ adcx %rbp, %r12
++ mulx %rdx, %rax, $out
+ adox %rbp, %r12
++ mov 48($inp), %rdx
+
+- mov %r11, %rbx
+- shld \$1, %r10, %r11
+- shld \$1, %rcx, %r10
+-
+- xor %ebp, %ebp
+- mulx %rdx, %rax, %rdx
++ xor %rbx, %rbx
++ adcx %rcx, %rax
++ adox %r9, %r9
++ adcx %rbp, $out
++ adox %r10, %r10
+ adcx %rax, %r9
+- adcx %rdx, %r10
+- mov 48($inp), %rdx
+- adcx %rbp, %r11
++ adcx $out, %r10
++ adox %rbp, %rbx
++ adcx %rbp, %rbx
+
+ mov %r9, 80(%rsp)
+ mov %r10, 88(%rsp)
+@@ -703,31 +713,31 @@
+ adox %rax, %r12
+ adox %rbp, %r13
+
+- xor %r14, %r14
+- shld \$1, %r13, %r14
+- shld \$1, %r12, %r13
+- shld \$1, %rbx, %r12
+-
+- xor %ebp, %ebp
+- mulx %rdx, %rax, %rdx
+- adcx %rax, %r11
+- adcx %rdx, %r12
++ mulx %rdx, %rax, $out
++ xor %rcx, %rcx
+ mov 56($inp), %rdx
+- adcx %rbp, %r13
++ adcx %rbx, %rax
++ adox %r11, %r11
++ adcx %rbp, $out
++ adox %r12, %r12
++ adcx %rax, %r11
++ adox %rbp, %rcx
++ adcx $out, %r12
++ adcx %rbp, %rcx
+
+ .byte 0x4c,0x89,0x9c,0x24,0x60,0x00,0x00,0x00 # mov %r11, 96(%rsp)
+ .byte 0x4c,0x89,0xa4,0x24,0x68,0x00,0x00,0x00 # mov %r12, 104(%rsp)
+
+ #eighth iteration
+ mulx %rdx, %rax, %rdx
+- adox %rax, %r13
+- adox %rbp, %rdx
++ xor %rbx, %rbx
++ adcx %rcx, %rax
++ adox %r13, %r13
++ adcx %rbp, %rdx
++ adox %rbp, %rbx
++ adcx %r13, %rax
++ adcx %rdx, %rbx
+
+- .byte 0x66
+- add %rdx, %r14
+-
+- movq %r13, 112(%rsp)
+- movq %r14, 120(%rsp)
+ movq %xmm0, $out
+ movq %xmm1, %rbp
+
+@@ -741,6 +751,9 @@
+ movq 48(%rsp), %r14
+ movq 56(%rsp), %r15
+
++ movq %rax, 112(%rsp)
++ movq %rbx, 120(%rsp)
++
+ call __rsaz_512_reducex
+
+ addq 64(%rsp), %r8
diff --git a/meta/recipes-connectivity/openssl/openssl/Makefiles-ptest.patch b/meta/recipes-connectivity/openssl/openssl/Makefiles-ptest.patch
deleted file mode 100644
index 249446a5bd..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/Makefiles-ptest.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Add 'buildtest' and 'runtest' targets to Makefile, to build and run tests
-cross-compiled.
-
-Signed-off-by: Anders Roxell <anders.roxell@enea.com>
-Signed-off-by: Maxin B. John <maxin.john@enea.com>
-Upstream-Status: Pending
----
-Index: openssl-1.0.2/Makefile.org
-===================================================================
---- openssl-1.0.2.orig/Makefile.org
-+++ openssl-1.0.2/Makefile.org
-@@ -451,8 +451,16 @@ rehash.time: certs apps
- test: tests
-
- tests: rehash
-+ $(MAKE) buildtest
-+ $(MAKE) runtest
-+
-+buildtest:
-+ @(cd test && \
-+ $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf exe apps);
-+
-+runtest:
- @(cd test && echo "testing..." && \
-- $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
-+ $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf alltests );
- OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
-
- report:
-Index: openssl-1.0.2/test/Makefile
-===================================================================
---- openssl-1.0.2.orig/test/Makefile
-+++ openssl-1.0.2/test/Makefile
-@@ -137,7 +137,7 @@ tests: exe apps $(TESTS)
- apps:
- @(cd ..; $(MAKE) DIRS=apps all)
-
--alltests: \
-+all-tests= \
- test_des test_idea test_sha test_md4 test_md5 test_hmac \
- test_md2 test_mdc2 test_wp \
- test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
-@@ -148,6 +148,11 @@ alltests: \
- test_jpake test_srp test_cms test_ocsp test_v3name test_heartbeat \
- test_constant_time
-
-+alltests:
-+ @(for i in $(all-tests); do \
-+ ( $(MAKE) $$i && echo "PASS: $$i" ) || echo "FAIL: $$i"; \
-+ done)
-+
- test_evp: $(EVPTEST)$(EXE_EXT) evptests.txt
- ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
-
-@@ -213,7 +218,7 @@ test_x509: ../apps/openssl$(EXE_EXT) tx5
- echo test second x509v3 certificate
- sh ./tx509 v3-cert2.pem 2>/dev/null
-
--test_rsa: $(RSATEST)$(EXE_EXT) ../apps/openssl$(EXE_EXT) trsa testrsa.pem
-+test_rsa: ../apps/openssl$(EXE_EXT) trsa testrsa.pem
- @sh ./trsa 2>/dev/null
- ../util/shlib_wrap.sh ./$(RSATEST)
-
-@@ -313,11 +318,11 @@ test_tsa: ../apps/openssl$(EXE_EXT) test
- sh ./testtsa; \
- fi
-
--test_ige: $(IGETEST)$(EXE_EXT)
-+test_ige:
- @echo "Test IGE mode"
- ../util/shlib_wrap.sh ./$(IGETEST)
-
--test_jpake: $(JPAKETEST)$(EXE_EXT)
-+test_jpake:
- @echo "Test JPAKE"
- ../util/shlib_wrap.sh ./$(JPAKETEST)
-
diff --git a/meta/recipes-connectivity/openssl/openssl/afalg.patch b/meta/recipes-connectivity/openssl/openssl/afalg.patch
new file mode 100644
index 0000000000..b7c0e9697f
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/afalg.patch
@@ -0,0 +1,31 @@
+Don't refuse to build afalgeng if cross-compiling or the host kernel is too old.
+
+Upstream-Status: Submitted [hhttps://github.com/openssl/openssl/pull/7688]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Configure b/Configure
+index 3baa8ce..9ef52ed 100755
+--- a/Configure
++++ b/Configure
+@@ -1550,20 +1550,7 @@ unless ($disabled{"crypto-mdebug-backtrace"})
+ unless ($disabled{afalgeng}) {
+ $config{afalgeng}="";
+ if (grep { $_ eq 'afalgeng' } @{$target{enable}}) {
+- my $minver = 4*10000 + 1*100 + 0;
+- if ($config{CROSS_COMPILE} eq "") {
+- my $verstr = `uname -r`;
+- my ($ma, $mi1, $mi2) = split("\\.", $verstr);
+- ($mi2) = $mi2 =~ /(\d+)/;
+- my $ver = $ma*10000 + $mi1*100 + $mi2;
+- if ($ver < $minver) {
+- disable('too-old-kernel', 'afalgeng');
+- } else {
+- push @{$config{engdirs}}, "afalg";
+- }
+- } else {
+- disable('cross-compiling', 'afalgeng');
+- }
++ push @{$config{engdirs}}, "afalg";
+ } else {
+ disable('not-linux', 'afalgeng');
+ }
diff --git a/meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch b/meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch
deleted file mode 100644
index 613dc7b71c..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Add musl triplet support
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: openssl-1.0.2a/Configure
-===================================================================
---- openssl-1.0.2a.orig/Configure
-+++ openssl-1.0.2a/Configure
-@@ -431,7 +431,7 @@ my %table=(
- #
- # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
- #
--"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-aarch64","gcc: -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- # Configure script adds minimally required -march for assembly support,
- # if no -march was specified at command line. mips32 and mips64 below
-@@ -504,6 +504,8 @@ my %table=(
- "linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-uclibceabi-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-uclibceabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-musleabi-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-musleabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-
- "linux-avr32","$ENV{'CC'}:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
-
diff --git a/meta/recipes-connectivity/openssl/openssl/configure-targets.patch b/meta/recipes-connectivity/openssl/openssl/configure-targets.patch
deleted file mode 100644
index 691e74afbd..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/configure-targets.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-The number of colons are important :)
-
-
----
- Configure | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-Index: openssl-1.0.2a/Configure
-===================================================================
---- openssl-1.0.2a.orig/Configure
-+++ openssl-1.0.2a/Configure
-@@ -443,6 +443,23 @@ my %table=(
- "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
- "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
-
-+
-+# Linux on ARM
-+"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-uclibceabi-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-uclibceabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+
-+"linux-avr32","$ENV{'CC'}:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
-+
-+#### Linux on MIPS/MIPS64
-+"linux-mips","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-mips64","$ENV{'CC'}:-DB_ENDIAN -mabi=64 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-mips64el","$ENV{'CC'}:-DL_ENDIAN -mabi=64 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-mipsel","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+
- # Android: linux-* but without pointers to headers and libs.
- "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch b/meta/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch
deleted file mode 100644
index 68e54d561e..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001
-From: Ludwig Nussel <ludwig.nussel@suse.de>
-Date: Wed, 21 Apr 2010 15:52:10 +0200
-Subject: [PATCH] also create old hash for compatibility
-
-Upstream-Status: Backport [debian]
-
-diff --git a/tools/c_rehash.in b/tools/c_rehash.in
-index b086ff9..b777d79 100644
---- a/tools/c_rehash.in
-+++ b/tools/c_rehash.in
-@@ -8,8 +8,6 @@ my $prefix;
-
- my $openssl = $ENV{OPENSSL} || "openssl";
- my $pwd;
--my $x509hash = "-subject_hash";
--my $crlhash = "-hash";
- my $verbose = 0;
- my $symlink_exists=eval {symlink("",""); 1};
- my $removelinks = 1;
-@@ -18,10 +16,7 @@ my $removelinks = 1;
- while ( $ARGV[0] =~ /^-/ ) {
- my $flag = shift @ARGV;
- last if ( $flag eq '--');
-- if ( $flag eq '-old') {
-- $x509hash = "-subject_hash_old";
-- $crlhash = "-hash_old";
-- } elsif ( $flag eq '-h') {
-+ if ( $flag eq '-h') {
- help();
- } elsif ( $flag eq '-n' ) {
- $removelinks = 0;
-@@ -113,7 +108,9 @@ sub hash_dir {
- next;
- }
- link_hash_cert($fname) if($cert);
-+ link_hash_cert_old($fname) if($cert);
- link_hash_crl($fname) if($crl);
-+ link_hash_crl_old($fname) if($crl);
- }
- }
-
-@@ -146,6 +143,7 @@ sub check_file {
-
- sub link_hash_cert {
- my $fname = $_[0];
-+ my $x509hash = $_[1] || '-subject_hash';
- $fname =~ s/'/'\\''/g;
- my ($hash, $fprint) = `"$openssl" x509 $x509hash -fingerprint -noout -in "$fname"`;
- chomp $hash;
-@@ -176,11 +174,21 @@ sub link_hash_cert {
- $hashlist{$hash} = $fprint;
- }
-
-+sub link_hash_cert_old {
-+ link_hash_cert($_[0], '-subject_hash_old');
-+}
-+
-+sub link_hash_crl_old {
-+ link_hash_crl($_[0], '-hash_old');
-+}
-+
-+
- # Same as above except for a CRL. CRL links are of the form <hash>.r<n>
-
- sub link_hash_crl {
- my $fname = $_[0];
-+ my $crlhash = $_[1] || "-hash";
- $fname =~ s/'/'\\''/g;
- my ($hash, $fprint) = `"$openssl" crl $crlhash -fingerprint -noout -in '$fname'`;
- chomp $hash;
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/ca.patch b/meta/recipes-connectivity/openssl/openssl/debian/ca.patch
deleted file mode 100644
index fb745e4394..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/ca.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-0.9.8m/apps/CA.pl.in
-===================================================================
---- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000
-+++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000
-@@ -65,6 +65,7 @@
- foreach (@ARGV) {
- if ( /^(-\?|-h|-help)$/ ) {
- print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n";
-+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
- exit 0;
- } elsif (/^-newcert$/) {
- # create a certificate
-@@ -165,6 +166,7 @@
- } else {
- print STDERR "Unknown arg $_\n";
- print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
-+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
- exit 1;
- }
- }
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/debian-targets.patch b/meta/recipes-connectivity/openssl/openssl/debian/debian-targets.patch
deleted file mode 100644
index 39d4328184..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/debian-targets.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-1.0.2/Configure
-===================================================================
---- openssl-1.0.2.orig/Configure
-+++ openssl-1.0.2/Configure
-@@ -107,6 +107,10 @@ my $gcc_devteam_warn = "-Wall -pedantic
-
- my $clang_disabled_warnings = "-Wno-language-extension-token -Wno-extended-offsetof -Wno-padded -Wno-shorten-64-to-32 -Wno-format-nonliteral -Wno-missing-noreturn -Wno-unused-parameter -Wno-sign-conversion -Wno-unreachable-code -Wno-conversion -Wno-documentation -Wno-missing-variable-declarations -Wno-cast-align -Wno-incompatible-pointer-types-discards-qualifiers -Wno-missing-variable-declarations -Wno-missing-field-initializers -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-conditional-uninitialized -Wno-switch-enum";
-
-+# There are no separate CFLAGS/CPPFLAGS/LDFLAGS, set everything in CFLAGS
-+my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get CPPFLAGS` . `dpkg-buildflags --get LDFLAGS` . "-Wa,--noexecstack -Wall";
-+$debian_cflags =~ s/\n/ /g;
-+
- my $strict_warnings = 0;
-
- my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
-@@ -343,6 +347,55 @@ my %table=(
- "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
- "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
-
-+# Debian GNU/* (various architectures)
-+"debian-alpha","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-alpha-ev4","gcc:-DTERMIO ${debian_cflags} -mcpu=ev4::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-alpha-ev5","gcc:-DTERMIO ${debian_cflags} -mcpu=ev5::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-arm64","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-armel","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-armhf","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::",
-+"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -fomit-frame-pointer::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-hppa","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ia64","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i586::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i686::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsn32", "mips64-linux-gnuabin32-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsn32el", "mips64el-linux-gnuabin32-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips64", "mips64-linux-gnuabi64-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips64el", "mips64el-linux-gnuabi64-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags}::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags} -mv8::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-alpha","gcc:-DTERMIOS ${debian_cflags}::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-mips","gcc:-DL_ENDIAN ${debian_cflags}::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-or1k", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-powerpcspe","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ppc64el","gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-s390","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-s390x","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-m32r","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v8 -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v9 -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags} -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-x32","gcc:-mx32 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32",
-+
- ####
- #### Variety of LINUX:-)
- ####
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/man-dir.patch b/meta/recipes-connectivity/openssl/openssl/debian/man-dir.patch
deleted file mode 100644
index 4085e3b1d7..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/man-dir.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-1.0.0c/Makefile.org
-===================================================================
---- openssl-1.0.0c.orig/Makefile.org 2010-12-12 16:11:27.000000000 +0100
-+++ openssl-1.0.0c/Makefile.org 2010-12-12 16:11:37.000000000 +0100
-@@ -131,7 +131,7 @@
-
- MAKEFILE= Makefile
-
--MANDIR=$(OPENSSLDIR)/man
-+MANDIR=/usr/share/man
- MAN1=1
- MAN3=3
- MANSUFFIX=
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/man-section.patch b/meta/recipes-connectivity/openssl/openssl/debian/man-section.patch
deleted file mode 100644
index 21c1d1a4eb..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/man-section.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-1.0.0c/Makefile.org
-===================================================================
---- openssl-1.0.0c.orig/Makefile.org 2010-12-12 16:11:37.000000000 +0100
-+++ openssl-1.0.0c/Makefile.org 2010-12-12 16:13:28.000000000 +0100
-@@ -160,7 +160,8 @@
- MANDIR=/usr/share/man
- MAN1=1
- MAN3=3
--MANSUFFIX=
-+MANSUFFIX=ssl
-+MANSECTION=SSL
- HTMLSUFFIX=html
- HTMLDIR=$(OPENSSLDIR)/html
- SHELL=/bin/sh
-@@ -651,7 +652,7 @@
- echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
- (cd `$(PERL) util/dirname.pl $$i`; \
- sh -c "$$pod2man \
-- --section=$$sec --center=OpenSSL \
-+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
- --release=$(VERSION) `basename $$i`") \
- > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
- $(PERL) util/extract-names.pl < $$i | \
-@@ -668,7 +669,7 @@
- echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
- (cd `$(PERL) util/dirname.pl $$i`; \
- sh -c "$$pod2man \
-- --section=$$sec --center=OpenSSL \
-+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
- --release=$(VERSION) `basename $$i`") \
- > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
- $(PERL) util/extract-names.pl < $$i | \
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/no-rpath.patch b/meta/recipes-connectivity/openssl/openssl/debian/no-rpath.patch
deleted file mode 100644
index 1ccb3b86ee..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/no-rpath.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-1.0.0c/Makefile.shared
-===================================================================
---- openssl-1.0.0c.orig/Makefile.shared 2010-08-21 13:36:49.000000000 +0200
-+++ openssl-1.0.0c/Makefile.shared 2010-12-12 16:13:36.000000000 +0100
-@@ -153,7 +153,7 @@
- NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
-
--DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
-+DO_GNU_APP=LDFLAGS="$(CFLAGS)"
-
- #This is rather special. It's a special target with which one can link
- #applications without bothering with any features that have anything to
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch b/meta/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch
deleted file mode 100644
index cc4408ab7d..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-1.0.0c/Makefile.shared
-===================================================================
---- openssl-1.0.0c.orig/Makefile.shared 2010-12-12 16:13:36.000000000 +0100
-+++ openssl-1.0.0c/Makefile.shared 2010-12-12 16:13:44.000000000 +0100
-@@ -151,7 +151,7 @@
- SHLIB_SUFFIX=; \
- ALLSYMSFLAGS='-Wl,--whole-archive'; \
- NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
-- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
-+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
-
- DO_GNU_APP=LDFLAGS="$(CFLAGS)"
-
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/pic.patch b/meta/recipes-connectivity/openssl/openssl/debian/pic.patch
deleted file mode 100644
index bfda3888bf..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/pic.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-1.0.1c/crypto/des/asm/desboth.pl
-===================================================================
---- openssl-1.0.1c.orig/crypto/des/asm/desboth.pl 2001-10-24 23:20:56.000000000 +0200
-+++ openssl-1.0.1c/crypto/des/asm/desboth.pl 2012-07-29 14:15:26.000000000 +0200
-@@ -16,6 +16,11 @@
-
- &push("edi");
-
-+ &call (&label("pic_point0"));
-+ &set_label("pic_point0");
-+ &blindpop("ebp");
-+ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
-+
- &comment("");
- &comment("Load the data words");
- &mov($L,&DWP(0,"ebx","",0));
-@@ -47,15 +52,21 @@
- &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
- &mov(&swtmp(1), "eax");
- &mov(&swtmp(0), "ebx");
-- &call("DES_encrypt2");
-+ &exch("ebx", "ebp");
-+ &call("DES_encrypt2\@PLT");
-+ &exch("ebx", "ebp");
- &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
- &mov(&swtmp(1), "edi");
- &mov(&swtmp(0), "ebx");
-- &call("DES_encrypt2");
-+ &exch("ebx", "ebp");
-+ &call("DES_encrypt2\@PLT");
-+ &exch("ebx", "ebp");
- &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
- &mov(&swtmp(1), "esi");
- &mov(&swtmp(0), "ebx");
-- &call("DES_encrypt2");
-+ &exch("ebx", "ebp");
-+ &call("DES_encrypt2\@PLT");
-+ &exch("ebx", "ebp");
-
- &stack_pop(3);
- &mov($L,&DWP(0,"ebx","",0));
-Index: openssl-1.0.1c/crypto/perlasm/cbc.pl
-===================================================================
---- openssl-1.0.1c.orig/crypto/perlasm/cbc.pl 2011-07-13 08:22:46.000000000 +0200
-+++ openssl-1.0.1c/crypto/perlasm/cbc.pl 2012-07-29 14:15:26.000000000 +0200
-@@ -122,7 +122,11 @@
- &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
- &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
-
-- &call($enc_func);
-+ &call (&label("pic_point0"));
-+ &set_label("pic_point0");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
-+ &call("$enc_func\@PLT");
-
- &mov("eax", &DWP($data_off,"esp","",0));
- &mov("ebx", &DWP($data_off+4,"esp","",0));
-@@ -185,7 +189,11 @@
- &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
- &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
-
-- &call($enc_func);
-+ &call (&label("pic_point1"));
-+ &set_label("pic_point1");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
-+ &call("$enc_func\@PLT");
-
- &mov("eax", &DWP($data_off,"esp","",0));
- &mov("ebx", &DWP($data_off+4,"esp","",0));
-@@ -218,7 +226,11 @@
- &mov(&DWP($data_off,"esp","",0), "eax"); # put back
- &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
-
-- &call($dec_func);
-+ &call (&label("pic_point2"));
-+ &set_label("pic_point2");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
-+ &call("$dec_func\@PLT");
-
- &mov("eax", &DWP($data_off,"esp","",0)); # get return
- &mov("ebx", &DWP($data_off+4,"esp","",0)); #
-@@ -261,7 +273,11 @@
- &mov(&DWP($data_off,"esp","",0), "eax"); # put back
- &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
-
-- &call($dec_func);
-+ &call (&label("pic_point3"));
-+ &set_label("pic_point3");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
-+ &call("$dec_func\@PLT");
-
- &mov("eax", &DWP($data_off,"esp","",0)); # get return
- &mov("ebx", &DWP($data_off+4,"esp","",0)); #
-Index: openssl-1.0.1c/crypto/perlasm/x86gas.pl
-===================================================================
---- openssl-1.0.1c.orig/crypto/perlasm/x86gas.pl 2011-12-09 20:16:35.000000000 +0100
-+++ openssl-1.0.1c/crypto/perlasm/x86gas.pl 2012-07-29 14:15:26.000000000 +0200
-@@ -161,6 +161,7 @@
- if ($::macosx) { push (@out,"$tmp,2\n"); }
- elsif ($::elf) { push (@out,"$tmp,4\n"); }
- else { push (@out,"$tmp\n"); }
-+ if ($::elf) { push (@out,".hidden\tOPENSSL_ia32cap_P\n"); }
- }
- push(@out,$initseg) if ($initseg);
- }
-@@ -218,8 +219,23 @@
- elsif ($::elf)
- { $initseg.=<<___;
- .section .init
-+___
-+ if ($::pic)
-+ { $initseg.=<<___;
-+ pushl %ebx
-+ call .pic_point0
-+.pic_point0:
-+ popl %ebx
-+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
-+ call $f\@PLT
-+ popl %ebx
-+___
-+ }
-+ else
-+ { $initseg.=<<___;
- call $f
- ___
-+ }
- }
- elsif ($::coff)
- { $initseg.=<<___; # applies to both Cygwin and Mingw
-Index: openssl-1.0.1c/crypto/x86cpuid.pl
-===================================================================
---- openssl-1.0.1c.orig/crypto/x86cpuid.pl 2012-02-28 15:20:34.000000000 +0100
-+++ openssl-1.0.1c/crypto/x86cpuid.pl 2012-07-29 14:15:26.000000000 +0200
-@@ -8,6 +8,8 @@
-
- for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
-
-+push(@out, ".hidden OPENSSL_ia32cap_P\n");
-+
- &function_begin("OPENSSL_ia32_cpuid");
- &xor ("edx","edx");
- &pushf ();
-@@ -139,9 +141,7 @@
- &set_label("nocpuid");
- &function_end("OPENSSL_ia32_cpuid");
-
--&external_label("OPENSSL_ia32cap_P");
--
--&function_begin_B("OPENSSL_rdtsc","EXTRN\t_OPENSSL_ia32cap_P:DWORD");
-+&function_begin_B("OPENSSL_rdtsc");
- &xor ("eax","eax");
- &xor ("edx","edx");
- &picmeup("ecx","OPENSSL_ia32cap_P");
-@@ -155,7 +155,7 @@
- # This works in Ring 0 only [read DJGPP+MS-DOS+privileged DPMI host],
- # but it's safe to call it on any [supported] 32-bit platform...
- # Just check for [non-]zero return value...
--&function_begin_B("OPENSSL_instrument_halt","EXTRN\t_OPENSSL_ia32cap_P:DWORD");
-+&function_begin_B("OPENSSL_instrument_halt");
- &picmeup("ecx","OPENSSL_ia32cap_P");
- &bt (&DWP(0,"ecx"),4);
- &jnc (&label("nohalt")); # no TSC
-@@ -222,7 +222,7 @@
- &ret ();
- &function_end_B("OPENSSL_far_spin");
-
--&function_begin_B("OPENSSL_wipe_cpu","EXTRN\t_OPENSSL_ia32cap_P:DWORD");
-+&function_begin_B("OPENSSL_wipe_cpu");
- &xor ("eax","eax");
- &xor ("edx","edx");
- &picmeup("ecx","OPENSSL_ia32cap_P");
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/version-script.patch b/meta/recipes-connectivity/openssl/openssl/debian/version-script.patch
deleted file mode 100644
index a24918000a..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian/version-script.patch
+++ /dev/null
@@ -1,4663 +0,0 @@
-Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/Configure
-===================================================================
---- openssl-1.0.2~beta1.obsolete.0.0498436515490575.orig/Configure 2014-02-24 21:02:30.000000000 +0100
-+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/Configure 2014-02-24 21:02:30.000000000 +0100
-@@ -1651,6 +1651,8 @@
- }
- }
-
-+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
-+
- open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
- unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
- open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
-Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld 2014-02-24 22:19:08.601827266 +0100
-@@ -0,0 +1,4615 @@
-+OPENSSL_1.0.0 {
-+ global:
-+ BIO_f_ssl;
-+ BIO_new_buffer_ssl_connect;
-+ BIO_new_ssl;
-+ BIO_new_ssl_connect;
-+ BIO_proxy_ssl_copy_session_id;
-+ BIO_ssl_copy_session_id;
-+ BIO_ssl_shutdown;
-+ d2i_SSL_SESSION;
-+ DTLSv1_client_method;
-+ DTLSv1_method;
-+ DTLSv1_server_method;
-+ ERR_load_SSL_strings;
-+ i2d_SSL_SESSION;
-+ kssl_build_principal_2;
-+ kssl_cget_tkt;
-+ kssl_check_authent;
-+ kssl_ctx_free;
-+ kssl_ctx_new;
-+ kssl_ctx_setkey;
-+ kssl_ctx_setprinc;
-+ kssl_ctx_setstring;
-+ kssl_ctx_show;
-+ kssl_err_set;
-+ kssl_krb5_free_data_contents;
-+ kssl_sget_tkt;
-+ kssl_skip_confound;
-+ kssl_validate_times;
-+ PEM_read_bio_SSL_SESSION;
-+ PEM_read_SSL_SESSION;
-+ PEM_write_bio_SSL_SESSION;
-+ PEM_write_SSL_SESSION;
-+ SSL_accept;
-+ SSL_add_client_CA;
-+ SSL_add_dir_cert_subjects_to_stack;
-+ SSL_add_dir_cert_subjs_to_stk;
-+ SSL_add_file_cert_subjects_to_stack;
-+ SSL_add_file_cert_subjs_to_stk;
-+ SSL_alert_desc_string;
-+ SSL_alert_desc_string_long;
-+ SSL_alert_type_string;
-+ SSL_alert_type_string_long;
-+ SSL_callback_ctrl;
-+ SSL_check_private_key;
-+ SSL_CIPHER_description;
-+ SSL_CIPHER_get_bits;
-+ SSL_CIPHER_get_name;
-+ SSL_CIPHER_get_version;
-+ SSL_clear;
-+ SSL_COMP_add_compression_method;
-+ SSL_COMP_get_compression_methods;
-+ SSL_COMP_get_compress_methods;
-+ SSL_COMP_get_name;
-+ SSL_connect;
-+ SSL_copy_session_id;
-+ SSL_ctrl;
-+ SSL_CTX_add_client_CA;
-+ SSL_CTX_add_session;
-+ SSL_CTX_callback_ctrl;
-+ SSL_CTX_check_private_key;
-+ SSL_CTX_ctrl;
-+ SSL_CTX_flush_sessions;
-+ SSL_CTX_free;
-+ SSL_CTX_get_cert_store;
-+ SSL_CTX_get_client_CA_list;
-+ SSL_CTX_get_client_cert_cb;
-+ SSL_CTX_get_ex_data;
-+ SSL_CTX_get_ex_new_index;
-+ SSL_CTX_get_info_callback;
-+ SSL_CTX_get_quiet_shutdown;
-+ SSL_CTX_get_timeout;
-+ SSL_CTX_get_verify_callback;
-+ SSL_CTX_get_verify_depth;
-+ SSL_CTX_get_verify_mode;
-+ SSL_CTX_load_verify_locations;
-+ SSL_CTX_new;
-+ SSL_CTX_remove_session;
-+ SSL_CTX_sess_get_get_cb;
-+ SSL_CTX_sess_get_new_cb;
-+ SSL_CTX_sess_get_remove_cb;
-+ SSL_CTX_sessions;
-+ SSL_CTX_sess_set_get_cb;
-+ SSL_CTX_sess_set_new_cb;
-+ SSL_CTX_sess_set_remove_cb;
-+ SSL_CTX_set1_param;
-+ SSL_CTX_set_cert_store;
-+ SSL_CTX_set_cert_verify_callback;
-+ SSL_CTX_set_cert_verify_cb;
-+ SSL_CTX_set_cipher_list;
-+ SSL_CTX_set_client_CA_list;
-+ SSL_CTX_set_client_cert_cb;
-+ SSL_CTX_set_client_cert_engine;
-+ SSL_CTX_set_cookie_generate_cb;
-+ SSL_CTX_set_cookie_verify_cb;
-+ SSL_CTX_set_default_passwd_cb;
-+ SSL_CTX_set_default_passwd_cb_userdata;
-+ SSL_CTX_set_default_verify_paths;
-+ SSL_CTX_set_def_passwd_cb_ud;
-+ SSL_CTX_set_def_verify_paths;
-+ SSL_CTX_set_ex_data;
-+ SSL_CTX_set_generate_session_id;
-+ SSL_CTX_set_info_callback;
-+ SSL_CTX_set_msg_callback;
-+ SSL_CTX_set_psk_client_callback;
-+ SSL_CTX_set_psk_server_callback;
-+ SSL_CTX_set_purpose;
-+ SSL_CTX_set_quiet_shutdown;
-+ SSL_CTX_set_session_id_context;
-+ SSL_CTX_set_ssl_version;
-+ SSL_CTX_set_timeout;
-+ SSL_CTX_set_tmp_dh_callback;
-+ SSL_CTX_set_tmp_ecdh_callback;
-+ SSL_CTX_set_tmp_rsa_callback;
-+ SSL_CTX_set_trust;
-+ SSL_CTX_set_verify;
-+ SSL_CTX_set_verify_depth;
-+ SSL_CTX_use_cert_chain_file;
-+ SSL_CTX_use_certificate;
-+ SSL_CTX_use_certificate_ASN1;
-+ SSL_CTX_use_certificate_chain_file;
-+ SSL_CTX_use_certificate_file;
-+ SSL_CTX_use_PrivateKey;
-+ SSL_CTX_use_PrivateKey_ASN1;
-+ SSL_CTX_use_PrivateKey_file;
-+ SSL_CTX_use_psk_identity_hint;
-+ SSL_CTX_use_RSAPrivateKey;
-+ SSL_CTX_use_RSAPrivateKey_ASN1;
-+ SSL_CTX_use_RSAPrivateKey_file;
-+ SSL_do_handshake;
-+ SSL_dup;
-+ SSL_dup_CA_list;
-+ SSLeay_add_ssl_algorithms;
-+ SSL_free;
-+ SSL_get1_session;
-+ SSL_get_certificate;
-+ SSL_get_cipher_list;
-+ SSL_get_ciphers;
-+ SSL_get_client_CA_list;
-+ SSL_get_current_cipher;
-+ SSL_get_current_compression;
-+ SSL_get_current_expansion;
-+ SSL_get_default_timeout;
-+ SSL_get_error;
-+ SSL_get_ex_data;
-+ SSL_get_ex_data_X509_STORE_CTX_idx;
-+ SSL_get_ex_d_X509_STORE_CTX_idx;
-+ SSL_get_ex_new_index;
-+ SSL_get_fd;
-+ SSL_get_finished;
-+ SSL_get_info_callback;
-+ SSL_get_peer_cert_chain;
-+ SSL_get_peer_certificate;
-+ SSL_get_peer_finished;
-+ SSL_get_privatekey;
-+ SSL_get_psk_identity;
-+ SSL_get_psk_identity_hint;
-+ SSL_get_quiet_shutdown;
-+ SSL_get_rbio;
-+ SSL_get_read_ahead;
-+ SSL_get_rfd;
-+ SSL_get_servername;
-+ SSL_get_servername_type;
-+ SSL_get_session;
-+ SSL_get_shared_ciphers;
-+ SSL_get_shutdown;
-+ SSL_get_SSL_CTX;
-+ SSL_get_ssl_method;
-+ SSL_get_verify_callback;
-+ SSL_get_verify_depth;
-+ SSL_get_verify_mode;
-+ SSL_get_verify_result;
-+ SSL_get_version;
-+ SSL_get_wbio;
-+ SSL_get_wfd;
-+ SSL_has_matching_session_id;
-+ SSL_library_init;
-+ SSL_load_client_CA_file;
-+ SSL_load_error_strings;
-+ SSL_new;
-+ SSL_peek;
-+ SSL_pending;
-+ SSL_read;
-+ SSL_renegotiate;
-+ SSL_renegotiate_pending;
-+ SSL_rstate_string;
-+ SSL_rstate_string_long;
-+ SSL_SESSION_cmp;
-+ SSL_SESSION_free;
-+ SSL_SESSION_get_ex_data;
-+ SSL_SESSION_get_ex_new_index;
-+ SSL_SESSION_get_id;
-+ SSL_SESSION_get_time;
-+ SSL_SESSION_get_timeout;
-+ SSL_SESSION_hash;
-+ SSL_SESSION_new;
-+ SSL_SESSION_print;
-+ SSL_SESSION_print_fp;
-+ SSL_SESSION_set_ex_data;
-+ SSL_SESSION_set_time;
-+ SSL_SESSION_set_timeout;
-+ SSL_set1_param;
-+ SSL_set_accept_state;
-+ SSL_set_bio;
-+ SSL_set_cipher_list;
-+ SSL_set_client_CA_list;
-+ SSL_set_connect_state;
-+ SSL_set_ex_data;
-+ SSL_set_fd;
-+ SSL_set_generate_session_id;
-+ SSL_set_info_callback;
-+ SSL_set_msg_callback;
-+ SSL_set_psk_client_callback;
-+ SSL_set_psk_server_callback;
-+ SSL_set_purpose;
-+ SSL_set_quiet_shutdown;
-+ SSL_set_read_ahead;
-+ SSL_set_rfd;
-+ SSL_set_session;
-+ SSL_set_session_id_context;
-+ SSL_set_session_secret_cb;
-+ SSL_set_session_ticket_ext;
-+ SSL_set_session_ticket_ext_cb;
-+ SSL_set_shutdown;
-+ SSL_set_SSL_CTX;
-+ SSL_set_ssl_method;
-+ SSL_set_tmp_dh_callback;
-+ SSL_set_tmp_ecdh_callback;
-+ SSL_set_tmp_rsa_callback;
-+ SSL_set_trust;
-+ SSL_set_verify;
-+ SSL_set_verify_depth;
-+ SSL_set_verify_result;
-+ SSL_set_wfd;
-+ SSL_shutdown;
-+ SSL_state;
-+ SSL_state_string;
-+ SSL_state_string_long;
-+ SSL_use_certificate;
-+ SSL_use_certificate_ASN1;
-+ SSL_use_certificate_file;
-+ SSL_use_PrivateKey;
-+ SSL_use_PrivateKey_ASN1;
-+ SSL_use_PrivateKey_file;
-+ SSL_use_psk_identity_hint;
-+ SSL_use_RSAPrivateKey;
-+ SSL_use_RSAPrivateKey_ASN1;
-+ SSL_use_RSAPrivateKey_file;
-+ SSLv23_client_method;
-+ SSLv23_method;
-+ SSLv23_server_method;
-+ SSLv2_client_method;
-+ SSLv2_method;
-+ SSLv2_server_method;
-+ SSLv3_client_method;
-+ SSLv3_method;
-+ SSLv3_server_method;
-+ SSL_version;
-+ SSL_want;
-+ SSL_write;
-+ TLSv1_client_method;
-+ TLSv1_method;
-+ TLSv1_server_method;
-+
-+
-+ SSLeay;
-+ SSLeay_version;
-+ ASN1_BIT_STRING_asn1_meth;
-+ ASN1_HEADER_free;
-+ ASN1_HEADER_new;
-+ ASN1_IA5STRING_asn1_meth;
-+ ASN1_INTEGER_get;
-+ ASN1_INTEGER_set;
-+ ASN1_INTEGER_to_BN;
-+ ASN1_OBJECT_create;
-+ ASN1_OBJECT_free;
-+ ASN1_OBJECT_new;
-+ ASN1_PRINTABLE_type;
-+ ASN1_STRING_cmp;
-+ ASN1_STRING_dup;
-+ ASN1_STRING_free;
-+ ASN1_STRING_new;
-+ ASN1_STRING_print;
-+ ASN1_STRING_set;
-+ ASN1_STRING_type_new;
-+ ASN1_TYPE_free;
-+ ASN1_TYPE_new;
-+ ASN1_UNIVERSALSTRING_to_string;
-+ ASN1_UTCTIME_check;
-+ ASN1_UTCTIME_print;
-+ ASN1_UTCTIME_set;
-+ ASN1_check_infinite_end;
-+ ASN1_d2i_bio;
-+ ASN1_d2i_fp;
-+ ASN1_digest;
-+ ASN1_dup;
-+ ASN1_get_object;
-+ ASN1_i2d_bio;
-+ ASN1_i2d_fp;
-+ ASN1_object_size;
-+ ASN1_parse;
-+ ASN1_put_object;
-+ ASN1_sign;
-+ ASN1_verify;
-+ BF_cbc_encrypt;
-+ BF_cfb64_encrypt;
-+ BF_ecb_encrypt;
-+ BF_encrypt;
-+ BF_ofb64_encrypt;
-+ BF_options;
-+ BF_set_key;
-+ BIO_CONNECT_free;
-+ BIO_CONNECT_new;
-+ BIO_accept;
-+ BIO_ctrl;
-+ BIO_int_ctrl;
-+ BIO_debug_callback;
-+ BIO_dump;
-+ BIO_dup_chain;
-+ BIO_f_base64;
-+ BIO_f_buffer;
-+ BIO_f_cipher;
-+ BIO_f_md;
-+ BIO_f_null;
-+ BIO_f_proxy_server;
-+ BIO_fd_non_fatal_error;
-+ BIO_fd_should_retry;
-+ BIO_find_type;
-+ BIO_free;
-+ BIO_free_all;
-+ BIO_get_accept_socket;
-+ BIO_get_filter_bio;
-+ BIO_get_host_ip;
-+ BIO_get_port;
-+ BIO_get_retry_BIO;
-+ BIO_get_retry_reason;
-+ BIO_gethostbyname;
-+ BIO_gets;
-+ BIO_new;
-+ BIO_new_accept;
-+ BIO_new_connect;
-+ BIO_new_fd;
-+ BIO_new_file;
-+ BIO_new_fp;
-+ BIO_new_socket;
-+ BIO_pop;
-+ BIO_printf;
-+ BIO_push;
-+ BIO_puts;
-+ BIO_read;
-+ BIO_s_accept;
-+ BIO_s_connect;
-+ BIO_s_fd;
-+ BIO_s_file;
-+ BIO_s_mem;
-+ BIO_s_null;
-+ BIO_s_proxy_client;
-+ BIO_s_socket;
-+ BIO_set;
-+ BIO_set_cipher;
-+ BIO_set_tcp_ndelay;
-+ BIO_sock_cleanup;
-+ BIO_sock_error;
-+ BIO_sock_init;
-+ BIO_sock_non_fatal_error;
-+ BIO_sock_should_retry;
-+ BIO_socket_ioctl;
-+ BIO_write;
-+ BN_CTX_free;
-+ BN_CTX_new;
-+ BN_MONT_CTX_free;
-+ BN_MONT_CTX_new;
-+ BN_MONT_CTX_set;
-+ BN_add;
-+ BN_add_word;
-+ BN_hex2bn;
-+ BN_bin2bn;
-+ BN_bn2hex;
-+ BN_bn2bin;
-+ BN_clear;
-+ BN_clear_bit;
-+ BN_clear_free;
-+ BN_cmp;
-+ BN_copy;
-+ BN_div;
-+ BN_div_word;
-+ BN_dup;
-+ BN_free;
-+ BN_from_montgomery;
-+ BN_gcd;
-+ BN_generate_prime;
-+ BN_get_word;
-+ BN_is_bit_set;
-+ BN_is_prime;
-+ BN_lshift;
-+ BN_lshift1;
-+ BN_mask_bits;
-+ BN_mod;
-+ BN_mod_exp;
-+ BN_mod_exp_mont;
-+ BN_mod_exp_simple;
-+ BN_mod_inverse;
-+ BN_mod_mul;
-+ BN_mod_mul_montgomery;
-+ BN_mod_word;
-+ BN_mul;
-+ BN_new;
-+ BN_num_bits;
-+ BN_num_bits_word;
-+ BN_options;
-+ BN_print;
-+ BN_print_fp;
-+ BN_rand;
-+ BN_reciprocal;
-+ BN_rshift;
-+ BN_rshift1;
-+ BN_set_bit;
-+ BN_set_word;
-+ BN_sqr;
-+ BN_sub;
-+ BN_to_ASN1_INTEGER;
-+ BN_ucmp;
-+ BN_value_one;
-+ BUF_MEM_free;
-+ BUF_MEM_grow;
-+ BUF_MEM_new;
-+ BUF_strdup;
-+ CONF_free;
-+ CONF_get_number;
-+ CONF_get_section;
-+ CONF_get_string;
-+ CONF_load;
-+ CRYPTO_add_lock;
-+ CRYPTO_dbg_free;
-+ CRYPTO_dbg_malloc;
-+ CRYPTO_dbg_realloc;
-+ CRYPTO_dbg_remalloc;
-+ CRYPTO_free;
-+ CRYPTO_get_add_lock_callback;
-+ CRYPTO_get_id_callback;
-+ CRYPTO_get_lock_name;
-+ CRYPTO_get_locking_callback;
-+ CRYPTO_get_mem_functions;
-+ CRYPTO_lock;
-+ CRYPTO_malloc;
-+ CRYPTO_mem_ctrl;
-+ CRYPTO_mem_leaks;
-+ CRYPTO_mem_leaks_cb;
-+ CRYPTO_mem_leaks_fp;
-+ CRYPTO_realloc;
-+ CRYPTO_remalloc;
-+ CRYPTO_set_add_lock_callback;
-+ CRYPTO_set_id_callback;
-+ CRYPTO_set_locking_callback;
-+ CRYPTO_set_mem_functions;
-+ CRYPTO_thread_id;
-+ DH_check;
-+ DH_compute_key;
-+ DH_free;
-+ DH_generate_key;
-+ DH_generate_parameters;
-+ DH_new;
-+ DH_size;
-+ DHparams_print;
-+ DHparams_print_fp;
-+ DSA_free;
-+ DSA_generate_key;
-+ DSA_generate_parameters;
-+ DSA_is_prime;
-+ DSA_new;
-+ DSA_print;
-+ DSA_print_fp;
-+ DSA_sign;
-+ DSA_sign_setup;
-+ DSA_size;
-+ DSA_verify;
-+ DSAparams_print;
-+ DSAparams_print_fp;
-+ ERR_clear_error;
-+ ERR_error_string;
-+ ERR_free_strings;
-+ ERR_func_error_string;
-+ ERR_get_err_state_table;
-+ ERR_get_error;
-+ ERR_get_error_line;
-+ ERR_get_state;
-+ ERR_get_string_table;
-+ ERR_lib_error_string;
-+ ERR_load_ASN1_strings;
-+ ERR_load_BIO_strings;
-+ ERR_load_BN_strings;
-+ ERR_load_BUF_strings;
-+ ERR_load_CONF_strings;
-+ ERR_load_DH_strings;
-+ ERR_load_DSA_strings;
-+ ERR_load_ERR_strings;
-+ ERR_load_EVP_strings;
-+ ERR_load_OBJ_strings;
-+ ERR_load_PEM_strings;
-+ ERR_load_PROXY_strings;
-+ ERR_load_RSA_strings;
-+ ERR_load_X509_strings;
-+ ERR_load_crypto_strings;
-+ ERR_load_strings;
-+ ERR_peek_error;
-+ ERR_peek_error_line;
-+ ERR_print_errors;
-+ ERR_print_errors_fp;
-+ ERR_put_error;
-+ ERR_reason_error_string;
-+ ERR_remove_state;
-+ EVP_BytesToKey;
-+ EVP_CIPHER_CTX_cleanup;
-+ EVP_CipherFinal;
-+ EVP_CipherInit;
-+ EVP_CipherUpdate;
-+ EVP_DecodeBlock;
-+ EVP_DecodeFinal;
-+ EVP_DecodeInit;
-+ EVP_DecodeUpdate;
-+ EVP_DecryptFinal;
-+ EVP_DecryptInit;
-+ EVP_DecryptUpdate;
-+ EVP_DigestFinal;
-+ EVP_DigestInit;
-+ EVP_DigestUpdate;
-+ EVP_EncodeBlock;
-+ EVP_EncodeFinal;
-+ EVP_EncodeInit;
-+ EVP_EncodeUpdate;
-+ EVP_EncryptFinal;
-+ EVP_EncryptInit;
-+ EVP_EncryptUpdate;
-+ EVP_OpenFinal;
-+ EVP_OpenInit;
-+ EVP_PKEY_assign;
-+ EVP_PKEY_copy_parameters;
-+ EVP_PKEY_free;
-+ EVP_PKEY_missing_parameters;
-+ EVP_PKEY_new;
-+ EVP_PKEY_save_parameters;
-+ EVP_PKEY_size;
-+ EVP_PKEY_type;
-+ EVP_SealFinal;
-+ EVP_SealInit;
-+ EVP_SignFinal;
-+ EVP_VerifyFinal;
-+ EVP_add_alias;
-+ EVP_add_cipher;
-+ EVP_add_digest;
-+ EVP_bf_cbc;
-+ EVP_bf_cfb64;
-+ EVP_bf_ecb;
-+ EVP_bf_ofb;
-+ EVP_cleanup;
-+ EVP_des_cbc;
-+ EVP_des_cfb64;
-+ EVP_des_ecb;
-+ EVP_des_ede;
-+ EVP_des_ede3;
-+ EVP_des_ede3_cbc;
-+ EVP_des_ede3_cfb64;
-+ EVP_des_ede3_ofb;
-+ EVP_des_ede_cbc;
-+ EVP_des_ede_cfb64;
-+ EVP_des_ede_ofb;
-+ EVP_des_ofb;
-+ EVP_desx_cbc;
-+ EVP_dss;
-+ EVP_dss1;
-+ EVP_enc_null;
-+ EVP_get_cipherbyname;
-+ EVP_get_digestbyname;
-+ EVP_get_pw_prompt;
-+ EVP_idea_cbc;
-+ EVP_idea_cfb64;
-+ EVP_idea_ecb;
-+ EVP_idea_ofb;
-+ EVP_md2;
-+ EVP_md5;
-+ EVP_md_null;
-+ EVP_rc2_cbc;
-+ EVP_rc2_cfb64;
-+ EVP_rc2_ecb;
-+ EVP_rc2_ofb;
-+ EVP_rc4;
-+ EVP_read_pw_string;
-+ EVP_set_pw_prompt;
-+ EVP_sha;
-+ EVP_sha1;
-+ MD2;
-+ MD2_Final;
-+ MD2_Init;
-+ MD2_Update;
-+ MD2_options;
-+ MD5;
-+ MD5_Final;
-+ MD5_Init;
-+ MD5_Update;
-+ MDC2;
-+ MDC2_Final;
-+ MDC2_Init;
-+ MDC2_Update;
-+ NETSCAPE_SPKAC_free;
-+ NETSCAPE_SPKAC_new;
-+ NETSCAPE_SPKI_free;
-+ NETSCAPE_SPKI_new;
-+ NETSCAPE_SPKI_sign;
-+ NETSCAPE_SPKI_verify;
-+ OBJ_add_object;
-+ OBJ_bsearch;
-+ OBJ_cleanup;
-+ OBJ_cmp;
-+ OBJ_create;
-+ OBJ_dup;
-+ OBJ_ln2nid;
-+ OBJ_new_nid;
-+ OBJ_nid2ln;
-+ OBJ_nid2obj;
-+ OBJ_nid2sn;
-+ OBJ_obj2nid;
-+ OBJ_sn2nid;
-+ OBJ_txt2nid;
-+ PEM_ASN1_read;
-+ PEM_ASN1_read_bio;
-+ PEM_ASN1_write;
-+ PEM_ASN1_write_bio;
-+ PEM_SealFinal;
-+ PEM_SealInit;
-+ PEM_SealUpdate;
-+ PEM_SignFinal;
-+ PEM_SignInit;
-+ PEM_SignUpdate;
-+ PEM_X509_INFO_read;
-+ PEM_X509_INFO_read_bio;
-+ PEM_X509_INFO_write_bio;
-+ PEM_dek_info;
-+ PEM_do_header;
-+ PEM_get_EVP_CIPHER_INFO;
-+ PEM_proc_type;
-+ PEM_read;
-+ PEM_read_DHparams;
-+ PEM_read_DSAPrivateKey;
-+ PEM_read_DSAparams;
-+ PEM_read_PKCS7;
-+ PEM_read_PrivateKey;
-+ PEM_read_RSAPrivateKey;
-+ PEM_read_X509;
-+ PEM_read_X509_CRL;
-+ PEM_read_X509_REQ;
-+ PEM_read_bio;
-+ PEM_read_bio_DHparams;
-+ PEM_read_bio_DSAPrivateKey;
-+ PEM_read_bio_DSAparams;
-+ PEM_read_bio_PKCS7;
-+ PEM_read_bio_PrivateKey;
-+ PEM_read_bio_RSAPrivateKey;
-+ PEM_read_bio_X509;
-+ PEM_read_bio_X509_CRL;
-+ PEM_read_bio_X509_REQ;
-+ PEM_write;
-+ PEM_write_DHparams;
-+ PEM_write_DSAPrivateKey;
-+ PEM_write_DSAparams;
-+ PEM_write_PKCS7;
-+ PEM_write_PrivateKey;
-+ PEM_write_RSAPrivateKey;
-+ PEM_write_X509;
-+ PEM_write_X509_CRL;
-+ PEM_write_X509_REQ;
-+ PEM_write_bio;
-+ PEM_write_bio_DHparams;
-+ PEM_write_bio_DSAPrivateKey;
-+ PEM_write_bio_DSAparams;
-+ PEM_write_bio_PKCS7;
-+ PEM_write_bio_PrivateKey;
-+ PEM_write_bio_RSAPrivateKey;
-+ PEM_write_bio_X509;
-+ PEM_write_bio_X509_CRL;
-+ PEM_write_bio_X509_REQ;
-+ PKCS7_DIGEST_free;
-+ PKCS7_DIGEST_new;
-+ PKCS7_ENCRYPT_free;
-+ PKCS7_ENCRYPT_new;
-+ PKCS7_ENC_CONTENT_free;
-+ PKCS7_ENC_CONTENT_new;
-+ PKCS7_ENVELOPE_free;
-+ PKCS7_ENVELOPE_new;
-+ PKCS7_ISSUER_AND_SERIAL_digest;
-+ PKCS7_ISSUER_AND_SERIAL_free;
-+ PKCS7_ISSUER_AND_SERIAL_new;
-+ PKCS7_RECIP_INFO_free;
-+ PKCS7_RECIP_INFO_new;
-+ PKCS7_SIGNED_free;
-+ PKCS7_SIGNED_new;
-+ PKCS7_SIGNER_INFO_free;
-+ PKCS7_SIGNER_INFO_new;
-+ PKCS7_SIGN_ENVELOPE_free;
-+ PKCS7_SIGN_ENVELOPE_new;
-+ PKCS7_dup;
-+ PKCS7_free;
-+ PKCS7_new;
-+ PROXY_ENTRY_add_noproxy;
-+ PROXY_ENTRY_clear_noproxy;
-+ PROXY_ENTRY_free;
-+ PROXY_ENTRY_get_noproxy;
-+ PROXY_ENTRY_new;
-+ PROXY_ENTRY_set_server;
-+ PROXY_add_noproxy;
-+ PROXY_add_server;
-+ PROXY_check_by_host;
-+ PROXY_check_url;
-+ PROXY_clear_noproxy;
-+ PROXY_free;
-+ PROXY_get_noproxy;
-+ PROXY_get_proxies;
-+ PROXY_get_proxy_entry;
-+ PROXY_load_conf;
-+ PROXY_new;
-+ PROXY_print;
-+ RAND_bytes;
-+ RAND_cleanup;
-+ RAND_file_name;
-+ RAND_load_file;
-+ RAND_screen;
-+ RAND_seed;
-+ RAND_write_file;
-+ RC2_cbc_encrypt;
-+ RC2_cfb64_encrypt;
-+ RC2_ecb_encrypt;
-+ RC2_encrypt;
-+ RC2_ofb64_encrypt;
-+ RC2_set_key;
-+ RC4;
-+ RC4_options;
-+ RC4_set_key;
-+ RSAPrivateKey_asn1_meth;
-+ RSAPrivateKey_dup;
-+ RSAPublicKey_dup;
-+ RSA_PKCS1_SSLeay;
-+ RSA_free;
-+ RSA_generate_key;
-+ RSA_new;
-+ RSA_new_method;
-+ RSA_print;
-+ RSA_print_fp;
-+ RSA_private_decrypt;
-+ RSA_private_encrypt;
-+ RSA_public_decrypt;
-+ RSA_public_encrypt;
-+ RSA_set_default_method;
-+ RSA_sign;
-+ RSA_sign_ASN1_OCTET_STRING;
-+ RSA_size;
-+ RSA_verify;
-+ RSA_verify_ASN1_OCTET_STRING;
-+ SHA;
-+ SHA1;
-+ SHA1_Final;
-+ SHA1_Init;
-+ SHA1_Update;
-+ SHA_Final;
-+ SHA_Init;
-+ SHA_Update;
-+ OpenSSL_add_all_algorithms;
-+ OpenSSL_add_all_ciphers;
-+ OpenSSL_add_all_digests;
-+ TXT_DB_create_index;
-+ TXT_DB_free;
-+ TXT_DB_get_by_index;
-+ TXT_DB_insert;
-+ TXT_DB_read;
-+ TXT_DB_write;
-+ X509_ALGOR_free;
-+ X509_ALGOR_new;
-+ X509_ATTRIBUTE_free;
-+ X509_ATTRIBUTE_new;
-+ X509_CINF_free;
-+ X509_CINF_new;
-+ X509_CRL_INFO_free;
-+ X509_CRL_INFO_new;
-+ X509_CRL_add_ext;
-+ X509_CRL_cmp;
-+ X509_CRL_delete_ext;
-+ X509_CRL_dup;
-+ X509_CRL_free;
-+ X509_CRL_get_ext;
-+ X509_CRL_get_ext_by_NID;
-+ X509_CRL_get_ext_by_OBJ;
-+ X509_CRL_get_ext_by_critical;
-+ X509_CRL_get_ext_count;
-+ X509_CRL_new;
-+ X509_CRL_sign;
-+ X509_CRL_verify;
-+ X509_EXTENSION_create_by_NID;
-+ X509_EXTENSION_create_by_OBJ;
-+ X509_EXTENSION_dup;
-+ X509_EXTENSION_free;
-+ X509_EXTENSION_get_critical;
-+ X509_EXTENSION_get_data;
-+ X509_EXTENSION_get_object;
-+ X509_EXTENSION_new;
-+ X509_EXTENSION_set_critical;
-+ X509_EXTENSION_set_data;
-+ X509_EXTENSION_set_object;
-+ X509_INFO_free;
-+ X509_INFO_new;
-+ X509_LOOKUP_by_alias;
-+ X509_LOOKUP_by_fingerprint;
-+ X509_LOOKUP_by_issuer_serial;
-+ X509_LOOKUP_by_subject;
-+ X509_LOOKUP_ctrl;
-+ X509_LOOKUP_file;
-+ X509_LOOKUP_free;
-+ X509_LOOKUP_hash_dir;
-+ X509_LOOKUP_init;
-+ X509_LOOKUP_new;
-+ X509_LOOKUP_shutdown;
-+ X509_NAME_ENTRY_create_by_NID;
-+ X509_NAME_ENTRY_create_by_OBJ;
-+ X509_NAME_ENTRY_dup;
-+ X509_NAME_ENTRY_free;
-+ X509_NAME_ENTRY_get_data;
-+ X509_NAME_ENTRY_get_object;
-+ X509_NAME_ENTRY_new;
-+ X509_NAME_ENTRY_set_data;
-+ X509_NAME_ENTRY_set_object;
-+ X509_NAME_add_entry;
-+ X509_NAME_cmp;
-+ X509_NAME_delete_entry;
-+ X509_NAME_digest;
-+ X509_NAME_dup;
-+ X509_NAME_entry_count;
-+ X509_NAME_free;
-+ X509_NAME_get_entry;
-+ X509_NAME_get_index_by_NID;
-+ X509_NAME_get_index_by_OBJ;
-+ X509_NAME_get_text_by_NID;
-+ X509_NAME_get_text_by_OBJ;
-+ X509_NAME_hash;
-+ X509_NAME_new;
-+ X509_NAME_oneline;
-+ X509_NAME_print;
-+ X509_NAME_set;
-+ X509_OBJECT_free_contents;
-+ X509_OBJECT_retrieve_by_subject;
-+ X509_OBJECT_up_ref_count;
-+ X509_PKEY_free;
-+ X509_PKEY_new;
-+ X509_PUBKEY_free;
-+ X509_PUBKEY_get;
-+ X509_PUBKEY_new;
-+ X509_PUBKEY_set;
-+ X509_REQ_INFO_free;
-+ X509_REQ_INFO_new;
-+ X509_REQ_dup;
-+ X509_REQ_free;
-+ X509_REQ_get_pubkey;
-+ X509_REQ_new;
-+ X509_REQ_print;
-+ X509_REQ_print_fp;
-+ X509_REQ_set_pubkey;
-+ X509_REQ_set_subject_name;
-+ X509_REQ_set_version;
-+ X509_REQ_sign;
-+ X509_REQ_to_X509;
-+ X509_REQ_verify;
-+ X509_REVOKED_add_ext;
-+ X509_REVOKED_delete_ext;
-+ X509_REVOKED_free;
-+ X509_REVOKED_get_ext;
-+ X509_REVOKED_get_ext_by_NID;
-+ X509_REVOKED_get_ext_by_OBJ;
-+ X509_REVOKED_get_ext_by_critical;
-+ X509_REVOKED_get_ext_by_critic;
-+ X509_REVOKED_get_ext_count;
-+ X509_REVOKED_new;
-+ X509_SIG_free;
-+ X509_SIG_new;
-+ X509_STORE_CTX_cleanup;
-+ X509_STORE_CTX_init;
-+ X509_STORE_add_cert;
-+ X509_STORE_add_lookup;
-+ X509_STORE_free;
-+ X509_STORE_get_by_subject;
-+ X509_STORE_load_locations;
-+ X509_STORE_new;
-+ X509_STORE_set_default_paths;
-+ X509_VAL_free;
-+ X509_VAL_new;
-+ X509_add_ext;
-+ X509_asn1_meth;
-+ X509_certificate_type;
-+ X509_check_private_key;
-+ X509_cmp_current_time;
-+ X509_delete_ext;
-+ X509_digest;
-+ X509_dup;
-+ X509_free;
-+ X509_get_default_cert_area;
-+ X509_get_default_cert_dir;
-+ X509_get_default_cert_dir_env;
-+ X509_get_default_cert_file;
-+ X509_get_default_cert_file_env;
-+ X509_get_default_private_dir;
-+ X509_get_ext;
-+ X509_get_ext_by_NID;
-+ X509_get_ext_by_OBJ;
-+ X509_get_ext_by_critical;
-+ X509_get_ext_count;
-+ X509_get_issuer_name;
-+ X509_get_pubkey;
-+ X509_get_pubkey_parameters;
-+ X509_get_serialNumber;
-+ X509_get_subject_name;
-+ X509_gmtime_adj;
-+ X509_issuer_and_serial_cmp;
-+ X509_issuer_and_serial_hash;
-+ X509_issuer_name_cmp;
-+ X509_issuer_name_hash;
-+ X509_load_cert_file;
-+ X509_new;
-+ X509_print;
-+ X509_print_fp;
-+ X509_set_issuer_name;
-+ X509_set_notAfter;
-+ X509_set_notBefore;
-+ X509_set_pubkey;
-+ X509_set_serialNumber;
-+ X509_set_subject_name;
-+ X509_set_version;
-+ X509_sign;
-+ X509_subject_name_cmp;
-+ X509_subject_name_hash;
-+ X509_to_X509_REQ;
-+ X509_verify;
-+ X509_verify_cert;
-+ X509_verify_cert_error_string;
-+ X509v3_add_ext;
-+ X509v3_add_extension;
-+ X509v3_add_netscape_extensions;
-+ X509v3_add_standard_extensions;
-+ X509v3_cleanup_extensions;
-+ X509v3_data_type_by_NID;
-+ X509v3_data_type_by_OBJ;
-+ X509v3_delete_ext;
-+ X509v3_get_ext;
-+ X509v3_get_ext_by_NID;
-+ X509v3_get_ext_by_OBJ;
-+ X509v3_get_ext_by_critical;
-+ X509v3_get_ext_count;
-+ X509v3_pack_string;
-+ X509v3_pack_type_by_NID;
-+ X509v3_pack_type_by_OBJ;
-+ X509v3_unpack_string;
-+ _des_crypt;
-+ a2d_ASN1_OBJECT;
-+ a2i_ASN1_INTEGER;
-+ a2i_ASN1_STRING;
-+ asn1_Finish;
-+ asn1_GetSequence;
-+ bn_div_words;
-+ bn_expand2;
-+ bn_mul_add_words;
-+ bn_mul_words;
-+ BN_uadd;
-+ BN_usub;
-+ bn_sqr_words;
-+ _ossl_old_crypt;
-+ d2i_ASN1_BIT_STRING;
-+ d2i_ASN1_BOOLEAN;
-+ d2i_ASN1_HEADER;
-+ d2i_ASN1_IA5STRING;
-+ d2i_ASN1_INTEGER;
-+ d2i_ASN1_OBJECT;
-+ d2i_ASN1_OCTET_STRING;
-+ d2i_ASN1_PRINTABLE;
-+ d2i_ASN1_PRINTABLESTRING;
-+ d2i_ASN1_SET;
-+ d2i_ASN1_T61STRING;
-+ d2i_ASN1_TYPE;
-+ d2i_ASN1_UTCTIME;
-+ d2i_ASN1_bytes;
-+ d2i_ASN1_type_bytes;
-+ d2i_DHparams;
-+ d2i_DSAPrivateKey;
-+ d2i_DSAPrivateKey_bio;
-+ d2i_DSAPrivateKey_fp;
-+ d2i_DSAPublicKey;
-+ d2i_DSAparams;
-+ d2i_NETSCAPE_SPKAC;
-+ d2i_NETSCAPE_SPKI;
-+ d2i_Netscape_RSA;
-+ d2i_PKCS7;
-+ d2i_PKCS7_DIGEST;
-+ d2i_PKCS7_ENCRYPT;
-+ d2i_PKCS7_ENC_CONTENT;
-+ d2i_PKCS7_ENVELOPE;
-+ d2i_PKCS7_ISSUER_AND_SERIAL;
-+ d2i_PKCS7_RECIP_INFO;
-+ d2i_PKCS7_SIGNED;
-+ d2i_PKCS7_SIGNER_INFO;
-+ d2i_PKCS7_SIGN_ENVELOPE;
-+ d2i_PKCS7_bio;
-+ d2i_PKCS7_fp;
-+ d2i_PrivateKey;
-+ d2i_PublicKey;
-+ d2i_RSAPrivateKey;
-+ d2i_RSAPrivateKey_bio;
-+ d2i_RSAPrivateKey_fp;
-+ d2i_RSAPublicKey;
-+ d2i_X509;
-+ d2i_X509_ALGOR;
-+ d2i_X509_ATTRIBUTE;
-+ d2i_X509_CINF;
-+ d2i_X509_CRL;
-+ d2i_X509_CRL_INFO;
-+ d2i_X509_CRL_bio;
-+ d2i_X509_CRL_fp;
-+ d2i_X509_EXTENSION;
-+ d2i_X509_NAME;
-+ d2i_X509_NAME_ENTRY;
-+ d2i_X509_PKEY;
-+ d2i_X509_PUBKEY;
-+ d2i_X509_REQ;
-+ d2i_X509_REQ_INFO;
-+ d2i_X509_REQ_bio;
-+ d2i_X509_REQ_fp;
-+ d2i_X509_REVOKED;
-+ d2i_X509_SIG;
-+ d2i_X509_VAL;
-+ d2i_X509_bio;
-+ d2i_X509_fp;
-+ DES_cbc_cksum;
-+ DES_cbc_encrypt;
-+ DES_cblock_print_file;
-+ DES_cfb64_encrypt;
-+ DES_cfb_encrypt;
-+ DES_decrypt3;
-+ DES_ecb3_encrypt;
-+ DES_ecb_encrypt;
-+ DES_ede3_cbc_encrypt;
-+ DES_ede3_cfb64_encrypt;
-+ DES_ede3_ofb64_encrypt;
-+ DES_enc_read;
-+ DES_enc_write;
-+ DES_encrypt1;
-+ DES_encrypt2;
-+ DES_encrypt3;
-+ DES_fcrypt;
-+ DES_is_weak_key;
-+ DES_key_sched;
-+ DES_ncbc_encrypt;
-+ DES_ofb64_encrypt;
-+ DES_ofb_encrypt;
-+ DES_options;
-+ DES_pcbc_encrypt;
-+ DES_quad_cksum;
-+ DES_random_key;
-+ _ossl_old_des_random_seed;
-+ _ossl_old_des_read_2passwords;
-+ _ossl_old_des_read_password;
-+ _ossl_old_des_read_pw;
-+ _ossl_old_des_read_pw_string;
-+ DES_set_key;
-+ DES_set_odd_parity;
-+ DES_string_to_2keys;
-+ DES_string_to_key;
-+ DES_xcbc_encrypt;
-+ DES_xwhite_in2out;
-+ fcrypt_body;
-+ i2a_ASN1_INTEGER;
-+ i2a_ASN1_OBJECT;
-+ i2a_ASN1_STRING;
-+ i2d_ASN1_BIT_STRING;
-+ i2d_ASN1_BOOLEAN;
-+ i2d_ASN1_HEADER;
-+ i2d_ASN1_IA5STRING;
-+ i2d_ASN1_INTEGER;
-+ i2d_ASN1_OBJECT;
-+ i2d_ASN1_OCTET_STRING;
-+ i2d_ASN1_PRINTABLE;
-+ i2d_ASN1_SET;
-+ i2d_ASN1_TYPE;
-+ i2d_ASN1_UTCTIME;
-+ i2d_ASN1_bytes;
-+ i2d_DHparams;
-+ i2d_DSAPrivateKey;
-+ i2d_DSAPrivateKey_bio;
-+ i2d_DSAPrivateKey_fp;
-+ i2d_DSAPublicKey;
-+ i2d_DSAparams;
-+ i2d_NETSCAPE_SPKAC;
-+ i2d_NETSCAPE_SPKI;
-+ i2d_Netscape_RSA;
-+ i2d_PKCS7;
-+ i2d_PKCS7_DIGEST;
-+ i2d_PKCS7_ENCRYPT;
-+ i2d_PKCS7_ENC_CONTENT;
-+ i2d_PKCS7_ENVELOPE;
-+ i2d_PKCS7_ISSUER_AND_SERIAL;
-+ i2d_PKCS7_RECIP_INFO;
-+ i2d_PKCS7_SIGNED;
-+ i2d_PKCS7_SIGNER_INFO;
-+ i2d_PKCS7_SIGN_ENVELOPE;
-+ i2d_PKCS7_bio;
-+ i2d_PKCS7_fp;
-+ i2d_PrivateKey;
-+ i2d_PublicKey;
-+ i2d_RSAPrivateKey;
-+ i2d_RSAPrivateKey_bio;
-+ i2d_RSAPrivateKey_fp;
-+ i2d_RSAPublicKey;
-+ i2d_X509;
-+ i2d_X509_ALGOR;
-+ i2d_X509_ATTRIBUTE;
-+ i2d_X509_CINF;
-+ i2d_X509_CRL;
-+ i2d_X509_CRL_INFO;
-+ i2d_X509_CRL_bio;
-+ i2d_X509_CRL_fp;
-+ i2d_X509_EXTENSION;
-+ i2d_X509_NAME;
-+ i2d_X509_NAME_ENTRY;
-+ i2d_X509_PKEY;
-+ i2d_X509_PUBKEY;
-+ i2d_X509_REQ;
-+ i2d_X509_REQ_INFO;
-+ i2d_X509_REQ_bio;
-+ i2d_X509_REQ_fp;
-+ i2d_X509_REVOKED;
-+ i2d_X509_SIG;
-+ i2d_X509_VAL;
-+ i2d_X509_bio;
-+ i2d_X509_fp;
-+ idea_cbc_encrypt;
-+ idea_cfb64_encrypt;
-+ idea_ecb_encrypt;
-+ idea_encrypt;
-+ idea_ofb64_encrypt;
-+ idea_options;
-+ idea_set_decrypt_key;
-+ idea_set_encrypt_key;
-+ lh_delete;
-+ lh_doall;
-+ lh_doall_arg;
-+ lh_free;
-+ lh_insert;
-+ lh_new;
-+ lh_node_stats;
-+ lh_node_stats_bio;
-+ lh_node_usage_stats;
-+ lh_node_usage_stats_bio;
-+ lh_retrieve;
-+ lh_stats;
-+ lh_stats_bio;
-+ lh_strhash;
-+ sk_delete;
-+ sk_delete_ptr;
-+ sk_dup;
-+ sk_find;
-+ sk_free;
-+ sk_insert;
-+ sk_new;
-+ sk_pop;
-+ sk_pop_free;
-+ sk_push;
-+ sk_set_cmp_func;
-+ sk_shift;
-+ sk_unshift;
-+ sk_zero;
-+ BIO_f_nbio_test;
-+ ASN1_TYPE_get;
-+ ASN1_TYPE_set;
-+ PKCS7_content_free;
-+ ERR_load_PKCS7_strings;
-+ X509_find_by_issuer_and_serial;
-+ X509_find_by_subject;
-+ PKCS7_ctrl;
-+ PKCS7_set_type;
-+ PKCS7_set_content;
-+ PKCS7_SIGNER_INFO_set;
-+ PKCS7_add_signer;
-+ PKCS7_add_certificate;
-+ PKCS7_add_crl;
-+ PKCS7_content_new;
-+ PKCS7_dataSign;
-+ PKCS7_dataVerify;
-+ PKCS7_dataInit;
-+ PKCS7_add_signature;
-+ PKCS7_cert_from_signer_info;
-+ PKCS7_get_signer_info;
-+ EVP_delete_alias;
-+ EVP_mdc2;
-+ PEM_read_bio_RSAPublicKey;
-+ PEM_write_bio_RSAPublicKey;
-+ d2i_RSAPublicKey_bio;
-+ i2d_RSAPublicKey_bio;
-+ PEM_read_RSAPublicKey;
-+ PEM_write_RSAPublicKey;
-+ d2i_RSAPublicKey_fp;
-+ i2d_RSAPublicKey_fp;
-+ BIO_copy_next_retry;
-+ RSA_flags;
-+ X509_STORE_add_crl;
-+ X509_load_crl_file;
-+ EVP_rc2_40_cbc;
-+ EVP_rc4_40;
-+ EVP_CIPHER_CTX_init;
-+ HMAC;
-+ HMAC_Init;
-+ HMAC_Update;
-+ HMAC_Final;
-+ ERR_get_next_error_library;
-+ EVP_PKEY_cmp_parameters;
-+ HMAC_cleanup;
-+ BIO_ptr_ctrl;
-+ BIO_new_file_internal;
-+ BIO_new_fp_internal;
-+ BIO_s_file_internal;
-+ BN_BLINDING_convert;
-+ BN_BLINDING_invert;
-+ BN_BLINDING_update;
-+ RSA_blinding_on;
-+ RSA_blinding_off;
-+ i2t_ASN1_OBJECT;
-+ BN_BLINDING_new;
-+ BN_BLINDING_free;
-+ EVP_cast5_cbc;
-+ EVP_cast5_cfb64;
-+ EVP_cast5_ecb;
-+ EVP_cast5_ofb;
-+ BF_decrypt;
-+ CAST_set_key;
-+ CAST_encrypt;
-+ CAST_decrypt;
-+ CAST_ecb_encrypt;
-+ CAST_cbc_encrypt;
-+ CAST_cfb64_encrypt;
-+ CAST_ofb64_encrypt;
-+ RC2_decrypt;
-+ OBJ_create_objects;
-+ BN_exp;
-+ BN_mul_word;
-+ BN_sub_word;
-+ BN_dec2bn;
-+ BN_bn2dec;
-+ BIO_ghbn_ctrl;
-+ CRYPTO_free_ex_data;
-+ CRYPTO_get_ex_data;
-+ CRYPTO_set_ex_data;
-+ ERR_load_CRYPTO_strings;
-+ ERR_load_CRYPTOlib_strings;
-+ EVP_PKEY_bits;
-+ MD5_Transform;
-+ SHA1_Transform;
-+ SHA_Transform;
-+ X509_STORE_CTX_get_chain;
-+ X509_STORE_CTX_get_current_cert;
-+ X509_STORE_CTX_get_error;
-+ X509_STORE_CTX_get_error_depth;
-+ X509_STORE_CTX_get_ex_data;
-+ X509_STORE_CTX_set_cert;
-+ X509_STORE_CTX_set_chain;
-+ X509_STORE_CTX_set_error;
-+ X509_STORE_CTX_set_ex_data;
-+ CRYPTO_dup_ex_data;
-+ CRYPTO_get_new_lockid;
-+ CRYPTO_new_ex_data;
-+ RSA_set_ex_data;
-+ RSA_get_ex_data;
-+ RSA_get_ex_new_index;
-+ RSA_padding_add_PKCS1_type_1;
-+ RSA_padding_add_PKCS1_type_2;
-+ RSA_padding_add_SSLv23;
-+ RSA_padding_add_none;
-+ RSA_padding_check_PKCS1_type_1;
-+ RSA_padding_check_PKCS1_type_2;
-+ RSA_padding_check_SSLv23;
-+ RSA_padding_check_none;
-+ bn_add_words;
-+ d2i_Netscape_RSA_2;
-+ CRYPTO_get_ex_new_index;
-+ RIPEMD160_Init;
-+ RIPEMD160_Update;
-+ RIPEMD160_Final;
-+ RIPEMD160;
-+ RIPEMD160_Transform;
-+ RC5_32_set_key;
-+ RC5_32_ecb_encrypt;
-+ RC5_32_encrypt;
-+ RC5_32_decrypt;
-+ RC5_32_cbc_encrypt;
-+ RC5_32_cfb64_encrypt;
-+ RC5_32_ofb64_encrypt;
-+ BN_bn2mpi;
-+ BN_mpi2bn;
-+ ASN1_BIT_STRING_get_bit;
-+ ASN1_BIT_STRING_set_bit;
-+ BIO_get_ex_data;
-+ BIO_get_ex_new_index;
-+ BIO_set_ex_data;
-+ X509v3_get_key_usage;
-+ X509v3_set_key_usage;
-+ a2i_X509v3_key_usage;
-+ i2a_X509v3_key_usage;
-+ EVP_PKEY_decrypt;
-+ EVP_PKEY_encrypt;
-+ PKCS7_RECIP_INFO_set;
-+ PKCS7_add_recipient;
-+ PKCS7_add_recipient_info;
-+ PKCS7_set_cipher;
-+ ASN1_TYPE_get_int_octetstring;
-+ ASN1_TYPE_get_octetstring;
-+ ASN1_TYPE_set_int_octetstring;
-+ ASN1_TYPE_set_octetstring;
-+ ASN1_UTCTIME_set_string;
-+ ERR_add_error_data;
-+ ERR_set_error_data;
-+ EVP_CIPHER_asn1_to_param;
-+ EVP_CIPHER_param_to_asn1;
-+ EVP_CIPHER_get_asn1_iv;
-+ EVP_CIPHER_set_asn1_iv;
-+ EVP_rc5_32_12_16_cbc;
-+ EVP_rc5_32_12_16_cfb64;
-+ EVP_rc5_32_12_16_ecb;
-+ EVP_rc5_32_12_16_ofb;
-+ asn1_add_error;
-+ d2i_ASN1_BMPSTRING;
-+ i2d_ASN1_BMPSTRING;
-+ BIO_f_ber;
-+ BN_init;
-+ COMP_CTX_new;
-+ COMP_CTX_free;
-+ COMP_CTX_compress_block;
-+ COMP_CTX_expand_block;
-+ X509_STORE_CTX_get_ex_new_index;
-+ OBJ_NAME_add;
-+ BIO_socket_nbio;
-+ EVP_rc2_64_cbc;
-+ OBJ_NAME_cleanup;
-+ OBJ_NAME_get;
-+ OBJ_NAME_init;
-+ OBJ_NAME_new_index;
-+ OBJ_NAME_remove;
-+ BN_MONT_CTX_copy;
-+ BIO_new_socks4a_connect;
-+ BIO_s_socks4a_connect;
-+ PROXY_set_connect_mode;
-+ RAND_SSLeay;
-+ RAND_set_rand_method;
-+ RSA_memory_lock;
-+ bn_sub_words;
-+ bn_mul_normal;
-+ bn_mul_comba8;
-+ bn_mul_comba4;
-+ bn_sqr_normal;
-+ bn_sqr_comba8;
-+ bn_sqr_comba4;
-+ bn_cmp_words;
-+ bn_mul_recursive;
-+ bn_mul_part_recursive;
-+ bn_sqr_recursive;
-+ bn_mul_low_normal;
-+ BN_RECP_CTX_init;
-+ BN_RECP_CTX_new;
-+ BN_RECP_CTX_free;
-+ BN_RECP_CTX_set;
-+ BN_mod_mul_reciprocal;
-+ BN_mod_exp_recp;
-+ BN_div_recp;
-+ BN_CTX_init;
-+ BN_MONT_CTX_init;
-+ RAND_get_rand_method;
-+ PKCS7_add_attribute;
-+ PKCS7_add_signed_attribute;
-+ PKCS7_digest_from_attributes;
-+ PKCS7_get_attribute;
-+ PKCS7_get_issuer_and_serial;
-+ PKCS7_get_signed_attribute;
-+ COMP_compress_block;
-+ COMP_expand_block;
-+ COMP_rle;
-+ COMP_zlib;
-+ ms_time_diff;
-+ ms_time_new;
-+ ms_time_free;
-+ ms_time_cmp;
-+ ms_time_get;
-+ PKCS7_set_attributes;
-+ PKCS7_set_signed_attributes;
-+ X509_ATTRIBUTE_create;
-+ X509_ATTRIBUTE_dup;
-+ ASN1_GENERALIZEDTIME_check;
-+ ASN1_GENERALIZEDTIME_print;
-+ ASN1_GENERALIZEDTIME_set;
-+ ASN1_GENERALIZEDTIME_set_string;
-+ ASN1_TIME_print;
-+ BASIC_CONSTRAINTS_free;
-+ BASIC_CONSTRAINTS_new;
-+ ERR_load_X509V3_strings;
-+ NETSCAPE_CERT_SEQUENCE_free;
-+ NETSCAPE_CERT_SEQUENCE_new;
-+ OBJ_txt2obj;
-+ PEM_read_NETSCAPE_CERT_SEQUENCE;
-+ PEM_read_NS_CERT_SEQ;
-+ PEM_read_bio_NETSCAPE_CERT_SEQUENCE;
-+ PEM_read_bio_NS_CERT_SEQ;
-+ PEM_write_NETSCAPE_CERT_SEQUENCE;
-+ PEM_write_NS_CERT_SEQ;
-+ PEM_write_bio_NETSCAPE_CERT_SEQUENCE;
-+ PEM_write_bio_NS_CERT_SEQ;
-+ X509V3_EXT_add;
-+ X509V3_EXT_add_alias;
-+ X509V3_EXT_add_conf;
-+ X509V3_EXT_cleanup;
-+ X509V3_EXT_conf;
-+ X509V3_EXT_conf_nid;
-+ X509V3_EXT_get;
-+ X509V3_EXT_get_nid;
-+ X509V3_EXT_print;
-+ X509V3_EXT_print_fp;
-+ X509V3_add_standard_extensions;
-+ X509V3_add_value;
-+ X509V3_add_value_bool;
-+ X509V3_add_value_int;
-+ X509V3_conf_free;
-+ X509V3_get_value_bool;
-+ X509V3_get_value_int;
-+ X509V3_parse_list;
-+ d2i_ASN1_GENERALIZEDTIME;
-+ d2i_ASN1_TIME;
-+ d2i_BASIC_CONSTRAINTS;
-+ d2i_NETSCAPE_CERT_SEQUENCE;
-+ d2i_ext_ku;
-+ ext_ku_free;
-+ ext_ku_new;
-+ i2d_ASN1_GENERALIZEDTIME;
-+ i2d_ASN1_TIME;
-+ i2d_BASIC_CONSTRAINTS;
-+ i2d_NETSCAPE_CERT_SEQUENCE;
-+ i2d_ext_ku;
-+ EVP_MD_CTX_copy;
-+ i2d_ASN1_ENUMERATED;
-+ d2i_ASN1_ENUMERATED;
-+ ASN1_ENUMERATED_set;
-+ ASN1_ENUMERATED_get;
-+ BN_to_ASN1_ENUMERATED;
-+ ASN1_ENUMERATED_to_BN;
-+ i2a_ASN1_ENUMERATED;
-+ a2i_ASN1_ENUMERATED;
-+ i2d_GENERAL_NAME;
-+ d2i_GENERAL_NAME;
-+ GENERAL_NAME_new;
-+ GENERAL_NAME_free;
-+ GENERAL_NAMES_new;
-+ GENERAL_NAMES_free;
-+ d2i_GENERAL_NAMES;
-+ i2d_GENERAL_NAMES;
-+ i2v_GENERAL_NAMES;
-+ i2s_ASN1_OCTET_STRING;
-+ s2i_ASN1_OCTET_STRING;
-+ X509V3_EXT_check_conf;
-+ hex_to_string;
-+ string_to_hex;
-+ DES_ede3_cbcm_encrypt;
-+ RSA_padding_add_PKCS1_OAEP;
-+ RSA_padding_check_PKCS1_OAEP;
-+ X509_CRL_print_fp;
-+ X509_CRL_print;
-+ i2v_GENERAL_NAME;
-+ v2i_GENERAL_NAME;
-+ i2d_PKEY_USAGE_PERIOD;
-+ d2i_PKEY_USAGE_PERIOD;
-+ PKEY_USAGE_PERIOD_new;
-+ PKEY_USAGE_PERIOD_free;
-+ v2i_GENERAL_NAMES;
-+ i2s_ASN1_INTEGER;
-+ X509V3_EXT_d2i;
-+ name_cmp;
-+ str_dup;
-+ i2s_ASN1_ENUMERATED;
-+ i2s_ASN1_ENUMERATED_TABLE;
-+ BIO_s_log;
-+ BIO_f_reliable;
-+ PKCS7_dataFinal;
-+ PKCS7_dataDecode;
-+ X509V3_EXT_CRL_add_conf;
-+ BN_set_params;
-+ BN_get_params;
-+ BIO_get_ex_num;
-+ BIO_set_ex_free_func;
-+ EVP_ripemd160;
-+ ASN1_TIME_set;
-+ i2d_AUTHORITY_KEYID;
-+ d2i_AUTHORITY_KEYID;
-+ AUTHORITY_KEYID_new;
-+ AUTHORITY_KEYID_free;
-+ ASN1_seq_unpack;
-+ ASN1_seq_pack;
-+ ASN1_unpack_string;
-+ ASN1_pack_string;
-+ PKCS12_pack_safebag;
-+ PKCS12_MAKE_KEYBAG;
-+ PKCS8_encrypt;
-+ PKCS12_MAKE_SHKEYBAG;
-+ PKCS12_pack_p7data;
-+ PKCS12_pack_p7encdata;
-+ PKCS12_add_localkeyid;
-+ PKCS12_add_friendlyname_asc;
-+ PKCS12_add_friendlyname_uni;
-+ PKCS12_get_friendlyname;
-+ PKCS12_pbe_crypt;
-+ PKCS12_decrypt_d2i;
-+ PKCS12_i2d_encrypt;
-+ PKCS12_init;
-+ PKCS12_key_gen_asc;
-+ PKCS12_key_gen_uni;
-+ PKCS12_gen_mac;
-+ PKCS12_verify_mac;
-+ PKCS12_set_mac;
-+ PKCS12_setup_mac;
-+ OPENSSL_asc2uni;
-+ OPENSSL_uni2asc;
-+ i2d_PKCS12_BAGS;
-+ PKCS12_BAGS_new;
-+ d2i_PKCS12_BAGS;
-+ PKCS12_BAGS_free;
-+ i2d_PKCS12;
-+ d2i_PKCS12;
-+ PKCS12_new;
-+ PKCS12_free;
-+ i2d_PKCS12_MAC_DATA;
-+ PKCS12_MAC_DATA_new;
-+ d2i_PKCS12_MAC_DATA;
-+ PKCS12_MAC_DATA_free;
-+ i2d_PKCS12_SAFEBAG;
-+ PKCS12_SAFEBAG_new;
-+ d2i_PKCS12_SAFEBAG;
-+ PKCS12_SAFEBAG_free;
-+ ERR_load_PKCS12_strings;
-+ PKCS12_PBE_add;
-+ PKCS8_add_keyusage;
-+ PKCS12_get_attr_gen;
-+ PKCS12_parse;
-+ PKCS12_create;
-+ i2d_PKCS12_bio;
-+ i2d_PKCS12_fp;
-+ d2i_PKCS12_bio;
-+ d2i_PKCS12_fp;
-+ i2d_PBEPARAM;
-+ PBEPARAM_new;
-+ d2i_PBEPARAM;
-+ PBEPARAM_free;
-+ i2d_PKCS8_PRIV_KEY_INFO;
-+ PKCS8_PRIV_KEY_INFO_new;
-+ d2i_PKCS8_PRIV_KEY_INFO;
-+ PKCS8_PRIV_KEY_INFO_free;
-+ EVP_PKCS82PKEY;
-+ EVP_PKEY2PKCS8;
-+ PKCS8_set_broken;
-+ EVP_PBE_ALGOR_CipherInit;
-+ EVP_PBE_alg_add;
-+ PKCS5_pbe_set;
-+ EVP_PBE_cleanup;
-+ i2d_SXNET;
-+ d2i_SXNET;
-+ SXNET_new;
-+ SXNET_free;
-+ i2d_SXNETID;
-+ d2i_SXNETID;
-+ SXNETID_new;
-+ SXNETID_free;
-+ DSA_SIG_new;
-+ DSA_SIG_free;
-+ DSA_do_sign;
-+ DSA_do_verify;
-+ d2i_DSA_SIG;
-+ i2d_DSA_SIG;
-+ i2d_ASN1_VISIBLESTRING;
-+ d2i_ASN1_VISIBLESTRING;
-+ i2d_ASN1_UTF8STRING;
-+ d2i_ASN1_UTF8STRING;
-+ i2d_DIRECTORYSTRING;
-+ d2i_DIRECTORYSTRING;
-+ i2d_DISPLAYTEXT;
-+ d2i_DISPLAYTEXT;
-+ d2i_ASN1_SET_OF_X509;
-+ i2d_ASN1_SET_OF_X509;
-+ i2d_PBKDF2PARAM;
-+ PBKDF2PARAM_new;
-+ d2i_PBKDF2PARAM;
-+ PBKDF2PARAM_free;
-+ i2d_PBE2PARAM;
-+ PBE2PARAM_new;
-+ d2i_PBE2PARAM;
-+ PBE2PARAM_free;
-+ d2i_ASN1_SET_OF_GENERAL_NAME;
-+ i2d_ASN1_SET_OF_GENERAL_NAME;
-+ d2i_ASN1_SET_OF_SXNETID;
-+ i2d_ASN1_SET_OF_SXNETID;
-+ d2i_ASN1_SET_OF_POLICYQUALINFO;
-+ i2d_ASN1_SET_OF_POLICYQUALINFO;
-+ d2i_ASN1_SET_OF_POLICYINFO;
-+ i2d_ASN1_SET_OF_POLICYINFO;
-+ SXNET_add_id_asc;
-+ SXNET_add_id_ulong;
-+ SXNET_add_id_INTEGER;
-+ SXNET_get_id_asc;
-+ SXNET_get_id_ulong;
-+ SXNET_get_id_INTEGER;
-+ X509V3_set_conf_lhash;
-+ i2d_CERTIFICATEPOLICIES;
-+ CERTIFICATEPOLICIES_new;
-+ CERTIFICATEPOLICIES_free;
-+ d2i_CERTIFICATEPOLICIES;
-+ i2d_POLICYINFO;
-+ POLICYINFO_new;
-+ d2i_POLICYINFO;
-+ POLICYINFO_free;
-+ i2d_POLICYQUALINFO;
-+ POLICYQUALINFO_new;
-+ d2i_POLICYQUALINFO;
-+ POLICYQUALINFO_free;
-+ i2d_USERNOTICE;
-+ USERNOTICE_new;
-+ d2i_USERNOTICE;
-+ USERNOTICE_free;
-+ i2d_NOTICEREF;
-+ NOTICEREF_new;
-+ d2i_NOTICEREF;
-+ NOTICEREF_free;
-+ X509V3_get_string;
-+ X509V3_get_section;
-+ X509V3_string_free;
-+ X509V3_section_free;
-+ X509V3_set_ctx;
-+ s2i_ASN1_INTEGER;
-+ CRYPTO_set_locked_mem_functions;
-+ CRYPTO_get_locked_mem_functions;
-+ CRYPTO_malloc_locked;
-+ CRYPTO_free_locked;
-+ BN_mod_exp2_mont;
-+ ERR_get_error_line_data;
-+ ERR_peek_error_line_data;
-+ PKCS12_PBE_keyivgen;
-+ X509_ALGOR_dup;
-+ d2i_ASN1_SET_OF_DIST_POINT;
-+ i2d_ASN1_SET_OF_DIST_POINT;
-+ i2d_CRL_DIST_POINTS;
-+ CRL_DIST_POINTS_new;
-+ CRL_DIST_POINTS_free;
-+ d2i_CRL_DIST_POINTS;
-+ i2d_DIST_POINT;
-+ DIST_POINT_new;
-+ d2i_DIST_POINT;
-+ DIST_POINT_free;
-+ i2d_DIST_POINT_NAME;
-+ DIST_POINT_NAME_new;
-+ DIST_POINT_NAME_free;
-+ d2i_DIST_POINT_NAME;
-+ X509V3_add_value_uchar;
-+ d2i_ASN1_SET_OF_X509_ATTRIBUTE;
-+ i2d_ASN1_SET_OF_ASN1_TYPE;
-+ d2i_ASN1_SET_OF_X509_EXTENSION;
-+ d2i_ASN1_SET_OF_X509_NAME_ENTRY;
-+ d2i_ASN1_SET_OF_ASN1_TYPE;
-+ i2d_ASN1_SET_OF_X509_ATTRIBUTE;
-+ i2d_ASN1_SET_OF_X509_EXTENSION;
-+ i2d_ASN1_SET_OF_X509_NAME_ENTRY;
-+ X509V3_EXT_i2d;
-+ X509V3_EXT_val_prn;
-+ X509V3_EXT_add_list;
-+ EVP_CIPHER_type;
-+ EVP_PBE_CipherInit;
-+ X509V3_add_value_bool_nf;
-+ d2i_ASN1_UINTEGER;
-+ sk_value;
-+ sk_num;
-+ sk_set;
-+ i2d_ASN1_SET_OF_X509_REVOKED;
-+ sk_sort;
-+ d2i_ASN1_SET_OF_X509_REVOKED;
-+ i2d_ASN1_SET_OF_X509_ALGOR;
-+ i2d_ASN1_SET_OF_X509_CRL;
-+ d2i_ASN1_SET_OF_X509_ALGOR;
-+ d2i_ASN1_SET_OF_X509_CRL;
-+ i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO;
-+ i2d_ASN1_SET_OF_PKCS7_RECIP_INFO;
-+ d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO;
-+ d2i_ASN1_SET_OF_PKCS7_RECIP_INFO;
-+ PKCS5_PBE_add;
-+ PEM_write_bio_PKCS8;
-+ i2d_PKCS8_fp;
-+ PEM_read_bio_PKCS8_PRIV_KEY_INFO;
-+ PEM_read_bio_P8_PRIV_KEY_INFO;
-+ d2i_PKCS8_bio;
-+ d2i_PKCS8_PRIV_KEY_INFO_fp;
-+ PEM_write_bio_PKCS8_PRIV_KEY_INFO;
-+ PEM_write_bio_P8_PRIV_KEY_INFO;
-+ PEM_read_PKCS8;
-+ d2i_PKCS8_PRIV_KEY_INFO_bio;
-+ d2i_PKCS8_fp;
-+ PEM_write_PKCS8;
-+ PEM_read_PKCS8_PRIV_KEY_INFO;
-+ PEM_read_P8_PRIV_KEY_INFO;
-+ PEM_read_bio_PKCS8;
-+ PEM_write_PKCS8_PRIV_KEY_INFO;
-+ PEM_write_P8_PRIV_KEY_INFO;
-+ PKCS5_PBE_keyivgen;
-+ i2d_PKCS8_bio;
-+ i2d_PKCS8_PRIV_KEY_INFO_fp;
-+ i2d_PKCS8_PRIV_KEY_INFO_bio;
-+ BIO_s_bio;
-+ PKCS5_pbe2_set;
-+ PKCS5_PBKDF2_HMAC_SHA1;
-+ PKCS5_v2_PBE_keyivgen;
-+ PEM_write_bio_PKCS8PrivateKey;
-+ PEM_write_PKCS8PrivateKey;
-+ BIO_ctrl_get_read_request;
-+ BIO_ctrl_pending;
-+ BIO_ctrl_wpending;
-+ BIO_new_bio_pair;
-+ BIO_ctrl_get_write_guarantee;
-+ CRYPTO_num_locks;
-+ CONF_load_bio;
-+ CONF_load_fp;
-+ i2d_ASN1_SET_OF_ASN1_OBJECT;
-+ d2i_ASN1_SET_OF_ASN1_OBJECT;
-+ PKCS7_signatureVerify;
-+ RSA_set_method;
-+ RSA_get_method;
-+ RSA_get_default_method;
-+ RSA_check_key;
-+ OBJ_obj2txt;
-+ DSA_dup_DH;
-+ X509_REQ_get_extensions;
-+ X509_REQ_set_extension_nids;
-+ BIO_nwrite;
-+ X509_REQ_extension_nid;
-+ BIO_nread;
-+ X509_REQ_get_extension_nids;
-+ BIO_nwrite0;
-+ X509_REQ_add_extensions_nid;
-+ BIO_nread0;
-+ X509_REQ_add_extensions;
-+ BIO_new_mem_buf;
-+ DH_set_ex_data;
-+ DH_set_method;
-+ DSA_OpenSSL;
-+ DH_get_ex_data;
-+ DH_get_ex_new_index;
-+ DSA_new_method;
-+ DH_new_method;
-+ DH_OpenSSL;
-+ DSA_get_ex_new_index;
-+ DH_get_default_method;
-+ DSA_set_ex_data;
-+ DH_set_default_method;
-+ DSA_get_ex_data;
-+ X509V3_EXT_REQ_add_conf;
-+ NETSCAPE_SPKI_print;
-+ NETSCAPE_SPKI_set_pubkey;
-+ NETSCAPE_SPKI_b64_encode;
-+ NETSCAPE_SPKI_get_pubkey;
-+ NETSCAPE_SPKI_b64_decode;
-+ UTF8_putc;
-+ UTF8_getc;
-+ RSA_null_method;
-+ ASN1_tag2str;
-+ BIO_ctrl_reset_read_request;
-+ DISPLAYTEXT_new;
-+ ASN1_GENERALIZEDTIME_free;
-+ X509_REVOKED_get_ext_d2i;
-+ X509_set_ex_data;
-+ X509_reject_set_bit_asc;
-+ X509_NAME_add_entry_by_txt;
-+ X509_NAME_add_entry_by_NID;
-+ X509_PURPOSE_get0;
-+ PEM_read_X509_AUX;
-+ d2i_AUTHORITY_INFO_ACCESS;
-+ PEM_write_PUBKEY;
-+ ACCESS_DESCRIPTION_new;
-+ X509_CERT_AUX_free;
-+ d2i_ACCESS_DESCRIPTION;
-+ X509_trust_clear;
-+ X509_TRUST_add;
-+ ASN1_VISIBLESTRING_new;
-+ X509_alias_set1;
-+ ASN1_PRINTABLESTRING_free;
-+ EVP_PKEY_get1_DSA;
-+ ASN1_BMPSTRING_new;
-+ ASN1_mbstring_copy;
-+ ASN1_UTF8STRING_new;
-+ DSA_get_default_method;
-+ i2d_ASN1_SET_OF_ACCESS_DESCRIPTION;
-+ ASN1_T61STRING_free;
-+ DSA_set_method;
-+ X509_get_ex_data;
-+ ASN1_STRING_type;
-+ X509_PURPOSE_get_by_sname;
-+ ASN1_TIME_free;
-+ ASN1_OCTET_STRING_cmp;
-+ ASN1_BIT_STRING_new;
-+ X509_get_ext_d2i;
-+ PEM_read_bio_X509_AUX;
-+ ASN1_STRING_set_default_mask_asc;
-+ ASN1_STRING_set_def_mask_asc;
-+ PEM_write_bio_RSA_PUBKEY;
-+ ASN1_INTEGER_cmp;
-+ d2i_RSA_PUBKEY_fp;
-+ X509_trust_set_bit_asc;
-+ PEM_write_bio_DSA_PUBKEY;
-+ X509_STORE_CTX_free;
-+ EVP_PKEY_set1_DSA;
-+ i2d_DSA_PUBKEY_fp;
-+ X509_load_cert_crl_file;
-+ ASN1_TIME_new;
-+ i2d_RSA_PUBKEY;
-+ X509_STORE_CTX_purpose_inherit;
-+ PEM_read_RSA_PUBKEY;
-+ d2i_X509_AUX;
-+ i2d_DSA_PUBKEY;
-+ X509_CERT_AUX_print;
-+ PEM_read_DSA_PUBKEY;
-+ i2d_RSA_PUBKEY_bio;
-+ ASN1_BIT_STRING_num_asc;
-+ i2d_PUBKEY;
-+ ASN1_UTCTIME_free;
-+ DSA_set_default_method;
-+ X509_PURPOSE_get_by_id;
-+ ACCESS_DESCRIPTION_free;
-+ PEM_read_bio_PUBKEY;
-+ ASN1_STRING_set_by_NID;
-+ X509_PURPOSE_get_id;
-+ DISPLAYTEXT_free;
-+ OTHERNAME_new;
-+ X509_CERT_AUX_new;
-+ X509_TRUST_cleanup;
-+ X509_NAME_add_entry_by_OBJ;
-+ X509_CRL_get_ext_d2i;
-+ X509_PURPOSE_get0_name;
-+ PEM_read_PUBKEY;
-+ i2d_DSA_PUBKEY_bio;
-+ i2d_OTHERNAME;
-+ ASN1_OCTET_STRING_free;
-+ ASN1_BIT_STRING_set_asc;
-+ X509_get_ex_new_index;
-+ ASN1_STRING_TABLE_cleanup;
-+ X509_TRUST_get_by_id;
-+ X509_PURPOSE_get_trust;
-+ ASN1_STRING_length;
-+ d2i_ASN1_SET_OF_ACCESS_DESCRIPTION;
-+ ASN1_PRINTABLESTRING_new;
-+ X509V3_get_d2i;
-+ ASN1_ENUMERATED_free;
-+ i2d_X509_CERT_AUX;
-+ X509_STORE_CTX_set_trust;
-+ ASN1_STRING_set_default_mask;
-+ X509_STORE_CTX_new;
-+ EVP_PKEY_get1_RSA;
-+ DIRECTORYSTRING_free;
-+ PEM_write_X509_AUX;
-+ ASN1_OCTET_STRING_set;
-+ d2i_DSA_PUBKEY_fp;
-+ d2i_RSA_PUBKEY;
-+ X509_TRUST_get0_name;
-+ X509_TRUST_get0;
-+ AUTHORITY_INFO_ACCESS_free;
-+ ASN1_IA5STRING_new;
-+ d2i_DSA_PUBKEY;
-+ X509_check_purpose;
-+ ASN1_ENUMERATED_new;
-+ d2i_RSA_PUBKEY_bio;
-+ d2i_PUBKEY;
-+ X509_TRUST_get_trust;
-+ X509_TRUST_get_flags;
-+ ASN1_BMPSTRING_free;
-+ ASN1_T61STRING_new;
-+ ASN1_UTCTIME_new;
-+ i2d_AUTHORITY_INFO_ACCESS;
-+ EVP_PKEY_set1_RSA;
-+ X509_STORE_CTX_set_purpose;
-+ ASN1_IA5STRING_free;
-+ PEM_write_bio_X509_AUX;
-+ X509_PURPOSE_get_count;
-+ CRYPTO_add_info;
-+ X509_NAME_ENTRY_create_by_txt;
-+ ASN1_STRING_get_default_mask;
-+ X509_alias_get0;
-+ ASN1_STRING_data;
-+ i2d_ACCESS_DESCRIPTION;
-+ X509_trust_set_bit;
-+ ASN1_BIT_STRING_free;
-+ PEM_read_bio_RSA_PUBKEY;
-+ X509_add1_reject_object;
-+ X509_check_trust;
-+ PEM_read_bio_DSA_PUBKEY;
-+ X509_PURPOSE_add;
-+ ASN1_STRING_TABLE_get;
-+ ASN1_UTF8STRING_free;
-+ d2i_DSA_PUBKEY_bio;
-+ PEM_write_RSA_PUBKEY;
-+ d2i_OTHERNAME;
-+ X509_reject_set_bit;
-+ PEM_write_DSA_PUBKEY;
-+ X509_PURPOSE_get0_sname;
-+ EVP_PKEY_set1_DH;
-+ ASN1_OCTET_STRING_dup;
-+ ASN1_BIT_STRING_set;
-+ X509_TRUST_get_count;
-+ ASN1_INTEGER_free;
-+ OTHERNAME_free;
-+ i2d_RSA_PUBKEY_fp;
-+ ASN1_INTEGER_dup;
-+ d2i_X509_CERT_AUX;
-+ PEM_write_bio_PUBKEY;
-+ ASN1_VISIBLESTRING_free;
-+ X509_PURPOSE_cleanup;
-+ ASN1_mbstring_ncopy;
-+ ASN1_GENERALIZEDTIME_new;
-+ EVP_PKEY_get1_DH;
-+ ASN1_OCTET_STRING_new;
-+ ASN1_INTEGER_new;
-+ i2d_X509_AUX;
-+ ASN1_BIT_STRING_name_print;
-+ X509_cmp;
-+ ASN1_STRING_length_set;
-+ DIRECTORYSTRING_new;
-+ X509_add1_trust_object;
-+ PKCS12_newpass;
-+ SMIME_write_PKCS7;
-+ SMIME_read_PKCS7;
-+ DES_set_key_checked;
-+ PKCS7_verify;
-+ PKCS7_encrypt;
-+ DES_set_key_unchecked;
-+ SMIME_crlf_copy;
-+ i2d_ASN1_PRINTABLESTRING;
-+ PKCS7_get0_signers;
-+ PKCS7_decrypt;
-+ SMIME_text;
-+ PKCS7_simple_smimecap;
-+ PKCS7_get_smimecap;
-+ PKCS7_sign;
-+ PKCS7_add_attrib_smimecap;
-+ CRYPTO_dbg_set_options;
-+ CRYPTO_remove_all_info;
-+ CRYPTO_get_mem_debug_functions;
-+ CRYPTO_is_mem_check_on;
-+ CRYPTO_set_mem_debug_functions;
-+ CRYPTO_pop_info;
-+ CRYPTO_push_info_;
-+ CRYPTO_set_mem_debug_options;
-+ PEM_write_PKCS8PrivateKey_nid;
-+ PEM_write_bio_PKCS8PrivateKey_nid;
-+ PEM_write_bio_PKCS8PrivKey_nid;
-+ d2i_PKCS8PrivateKey_bio;
-+ ASN1_NULL_free;
-+ d2i_ASN1_NULL;
-+ ASN1_NULL_new;
-+ i2d_PKCS8PrivateKey_bio;
-+ i2d_PKCS8PrivateKey_fp;
-+ i2d_ASN1_NULL;
-+ i2d_PKCS8PrivateKey_nid_fp;
-+ d2i_PKCS8PrivateKey_fp;
-+ i2d_PKCS8PrivateKey_nid_bio;
-+ i2d_PKCS8PrivateKeyInfo_fp;
-+ i2d_PKCS8PrivateKeyInfo_bio;
-+ PEM_cb;
-+ i2d_PrivateKey_fp;
-+ d2i_PrivateKey_bio;
-+ d2i_PrivateKey_fp;
-+ i2d_PrivateKey_bio;
-+ X509_reject_clear;
-+ X509_TRUST_set_default;
-+ d2i_AutoPrivateKey;
-+ X509_ATTRIBUTE_get0_type;
-+ X509_ATTRIBUTE_set1_data;
-+ X509at_get_attr;
-+ X509at_get_attr_count;
-+ X509_ATTRIBUTE_create_by_NID;
-+ X509_ATTRIBUTE_set1_object;
-+ X509_ATTRIBUTE_count;
-+ X509_ATTRIBUTE_create_by_OBJ;
-+ X509_ATTRIBUTE_get0_object;
-+ X509at_get_attr_by_NID;
-+ X509at_add1_attr;
-+ X509_ATTRIBUTE_get0_data;
-+ X509at_delete_attr;
-+ X509at_get_attr_by_OBJ;
-+ RAND_add;
-+ BIO_number_written;
-+ BIO_number_read;
-+ X509_STORE_CTX_get1_chain;
-+ ERR_load_RAND_strings;
-+ RAND_pseudo_bytes;
-+ X509_REQ_get_attr_by_NID;
-+ X509_REQ_get_attr;
-+ X509_REQ_add1_attr_by_NID;
-+ X509_REQ_get_attr_by_OBJ;
-+ X509at_add1_attr_by_NID;
-+ X509_REQ_add1_attr_by_OBJ;
-+ X509_REQ_get_attr_count;
-+ X509_REQ_add1_attr;
-+ X509_REQ_delete_attr;
-+ X509at_add1_attr_by_OBJ;
-+ X509_REQ_add1_attr_by_txt;
-+ X509_ATTRIBUTE_create_by_txt;
-+ X509at_add1_attr_by_txt;
-+ BN_pseudo_rand;
-+ BN_is_prime_fasttest;
-+ BN_CTX_end;
-+ BN_CTX_start;
-+ BN_CTX_get;
-+ EVP_PKEY2PKCS8_broken;
-+ ASN1_STRING_TABLE_add;
-+ CRYPTO_dbg_get_options;
-+ AUTHORITY_INFO_ACCESS_new;
-+ CRYPTO_get_mem_debug_options;
-+ DES_crypt;
-+ PEM_write_bio_X509_REQ_NEW;
-+ PEM_write_X509_REQ_NEW;
-+ BIO_callback_ctrl;
-+ RAND_egd;
-+ RAND_status;
-+ bn_dump1;
-+ DES_check_key_parity;
-+ lh_num_items;
-+ RAND_event;
-+ DSO_new;
-+ DSO_new_method;
-+ DSO_free;
-+ DSO_flags;
-+ DSO_up;
-+ DSO_set_default_method;
-+ DSO_get_default_method;
-+ DSO_get_method;
-+ DSO_set_method;
-+ DSO_load;
-+ DSO_bind_var;
-+ DSO_METHOD_null;
-+ DSO_METHOD_openssl;
-+ DSO_METHOD_dlfcn;
-+ DSO_METHOD_win32;
-+ ERR_load_DSO_strings;
-+ DSO_METHOD_dl;
-+ NCONF_load;
-+ NCONF_load_fp;
-+ NCONF_new;
-+ NCONF_get_string;
-+ NCONF_free;
-+ NCONF_get_number;
-+ CONF_dump_fp;
-+ NCONF_load_bio;
-+ NCONF_dump_fp;
-+ NCONF_get_section;
-+ NCONF_dump_bio;
-+ CONF_dump_bio;
-+ NCONF_free_data;
-+ CONF_set_default_method;
-+ ERR_error_string_n;
-+ BIO_snprintf;
-+ DSO_ctrl;
-+ i2d_ASN1_SET_OF_ASN1_INTEGER;
-+ i2d_ASN1_SET_OF_PKCS12_SAFEBAG;
-+ i2d_ASN1_SET_OF_PKCS7;
-+ BIO_vfree;
-+ d2i_ASN1_SET_OF_ASN1_INTEGER;
-+ d2i_ASN1_SET_OF_PKCS12_SAFEBAG;
-+ ASN1_UTCTIME_get;
-+ X509_REQ_digest;
-+ X509_CRL_digest;
-+ d2i_ASN1_SET_OF_PKCS7;
-+ EVP_CIPHER_CTX_set_key_length;
-+ EVP_CIPHER_CTX_ctrl;
-+ BN_mod_exp_mont_word;
-+ RAND_egd_bytes;
-+ X509_REQ_get1_email;
-+ X509_get1_email;
-+ X509_email_free;
-+ i2d_RSA_NET;
-+ d2i_RSA_NET_2;
-+ d2i_RSA_NET;
-+ DSO_bind_func;
-+ CRYPTO_get_new_dynlockid;
-+ sk_new_null;
-+ CRYPTO_set_dynlock_destroy_callback;
-+ CRYPTO_set_dynlock_destroy_cb;
-+ CRYPTO_destroy_dynlockid;
-+ CRYPTO_set_dynlock_size;
-+ CRYPTO_set_dynlock_create_callback;
-+ CRYPTO_set_dynlock_create_cb;
-+ CRYPTO_set_dynlock_lock_callback;
-+ CRYPTO_set_dynlock_lock_cb;
-+ CRYPTO_get_dynlock_lock_callback;
-+ CRYPTO_get_dynlock_lock_cb;
-+ CRYPTO_get_dynlock_destroy_callback;
-+ CRYPTO_get_dynlock_destroy_cb;
-+ CRYPTO_get_dynlock_value;
-+ CRYPTO_get_dynlock_create_callback;
-+ CRYPTO_get_dynlock_create_cb;
-+ c2i_ASN1_BIT_STRING;
-+ i2c_ASN1_BIT_STRING;
-+ RAND_poll;
-+ c2i_ASN1_INTEGER;
-+ i2c_ASN1_INTEGER;
-+ BIO_dump_indent;
-+ ASN1_parse_dump;
-+ c2i_ASN1_OBJECT;
-+ X509_NAME_print_ex_fp;
-+ ASN1_STRING_print_ex_fp;
-+ X509_NAME_print_ex;
-+ ASN1_STRING_print_ex;
-+ MD4;
-+ MD4_Transform;
-+ MD4_Final;
-+ MD4_Update;
-+ MD4_Init;
-+ EVP_md4;
-+ i2d_PUBKEY_bio;
-+ i2d_PUBKEY_fp;
-+ d2i_PUBKEY_bio;
-+ ASN1_STRING_to_UTF8;
-+ BIO_vprintf;
-+ BIO_vsnprintf;
-+ d2i_PUBKEY_fp;
-+ X509_cmp_time;
-+ X509_STORE_CTX_set_time;
-+ X509_STORE_CTX_get1_issuer;
-+ X509_OBJECT_retrieve_match;
-+ X509_OBJECT_idx_by_subject;
-+ X509_STORE_CTX_set_flags;
-+ X509_STORE_CTX_trusted_stack;
-+ X509_time_adj;
-+ X509_check_issued;
-+ ASN1_UTCTIME_cmp_time_t;
-+ DES_set_weak_key_flag;
-+ DES_check_key;
-+ DES_rw_mode;
-+ RSA_PKCS1_RSAref;
-+ X509_keyid_set1;
-+ BIO_next;
-+ DSO_METHOD_vms;
-+ BIO_f_linebuffer;
-+ BN_bntest_rand;
-+ OPENSSL_issetugid;
-+ BN_rand_range;
-+ ERR_load_ENGINE_strings;
-+ ENGINE_set_DSA;
-+ ENGINE_get_finish_function;
-+ ENGINE_get_default_RSA;
-+ ENGINE_get_BN_mod_exp;
-+ DSA_get_default_openssl_method;
-+ ENGINE_set_DH;
-+ ENGINE_set_def_BN_mod_exp_crt;
-+ ENGINE_set_default_BN_mod_exp_crt;
-+ ENGINE_init;
-+ DH_get_default_openssl_method;
-+ RSA_set_default_openssl_method;
-+ ENGINE_finish;
-+ ENGINE_load_public_key;
-+ ENGINE_get_DH;
-+ ENGINE_ctrl;
-+ ENGINE_get_init_function;
-+ ENGINE_set_init_function;
-+ ENGINE_set_default_DSA;
-+ ENGINE_get_name;
-+ ENGINE_get_last;
-+ ENGINE_get_prev;
-+ ENGINE_get_default_DH;
-+ ENGINE_get_RSA;
-+ ENGINE_set_default;
-+ ENGINE_get_RAND;
-+ ENGINE_get_first;
-+ ENGINE_by_id;
-+ ENGINE_set_finish_function;
-+ ENGINE_get_def_BN_mod_exp_crt;
-+ ENGINE_get_default_BN_mod_exp_crt;
-+ RSA_get_default_openssl_method;
-+ ENGINE_set_RSA;
-+ ENGINE_load_private_key;
-+ ENGINE_set_default_RAND;
-+ ENGINE_set_BN_mod_exp;
-+ ENGINE_remove;
-+ ENGINE_free;
-+ ENGINE_get_BN_mod_exp_crt;
-+ ENGINE_get_next;
-+ ENGINE_set_name;
-+ ENGINE_get_default_DSA;
-+ ENGINE_set_default_BN_mod_exp;
-+ ENGINE_set_default_RSA;
-+ ENGINE_get_default_RAND;
-+ ENGINE_get_default_BN_mod_exp;
-+ ENGINE_set_RAND;
-+ ENGINE_set_id;
-+ ENGINE_set_BN_mod_exp_crt;
-+ ENGINE_set_default_DH;
-+ ENGINE_new;
-+ ENGINE_get_id;
-+ DSA_set_default_openssl_method;
-+ ENGINE_add;
-+ DH_set_default_openssl_method;
-+ ENGINE_get_DSA;
-+ ENGINE_get_ctrl_function;
-+ ENGINE_set_ctrl_function;
-+ BN_pseudo_rand_range;
-+ X509_STORE_CTX_set_verify_cb;
-+ ERR_load_COMP_strings;
-+ PKCS12_item_decrypt_d2i;
-+ ASN1_UTF8STRING_it;
-+ ENGINE_unregister_ciphers;
-+ ENGINE_get_ciphers;
-+ d2i_OCSP_BASICRESP;
-+ KRB5_CHECKSUM_it;
-+ EC_POINT_add;
-+ ASN1_item_ex_i2d;
-+ OCSP_CERTID_it;
-+ d2i_OCSP_RESPBYTES;
-+ X509V3_add1_i2d;
-+ PKCS7_ENVELOPE_it;
-+ UI_add_input_boolean;
-+ ENGINE_unregister_RSA;
-+ X509V3_EXT_nconf;
-+ ASN1_GENERALSTRING_free;
-+ d2i_OCSP_CERTSTATUS;
-+ X509_REVOKED_set_serialNumber;
-+ X509_print_ex;
-+ OCSP_ONEREQ_get1_ext_d2i;
-+ ENGINE_register_all_RAND;
-+ ENGINE_load_dynamic;
-+ PBKDF2PARAM_it;
-+ EXTENDED_KEY_USAGE_new;
-+ EC_GROUP_clear_free;
-+ OCSP_sendreq_bio;
-+ ASN1_item_digest;
-+ OCSP_BASICRESP_delete_ext;
-+ OCSP_SIGNATURE_it;
-+ X509_CRL_it;
-+ OCSP_BASICRESP_add_ext;
-+ KRB5_ENCKEY_it;
-+ UI_method_set_closer;
-+ X509_STORE_set_purpose;
-+ i2d_ASN1_GENERALSTRING;
-+ OCSP_response_status;
-+ i2d_OCSP_SERVICELOC;
-+ ENGINE_get_digest_engine;
-+ EC_GROUP_set_curve_GFp;
-+ OCSP_REQUEST_get_ext_by_OBJ;
-+ _ossl_old_des_random_key;
-+ ASN1_T61STRING_it;
-+ EC_GROUP_method_of;
-+ i2d_KRB5_APREQ;
-+ _ossl_old_des_encrypt;
-+ ASN1_PRINTABLE_new;
-+ HMAC_Init_ex;
-+ d2i_KRB5_AUTHENT;
-+ OCSP_archive_cutoff_new;
-+ EC_POINT_set_Jprojective_coordinates_GFp;
-+ EC_POINT_set_Jproj_coords_GFp;
-+ _ossl_old_des_is_weak_key;
-+ OCSP_BASICRESP_get_ext_by_OBJ;
-+ EC_POINT_oct2point;
-+ OCSP_SINGLERESP_get_ext_count;
-+ UI_ctrl;
-+ _shadow_DES_rw_mode;
-+ asn1_do_adb;
-+ ASN1_template_i2d;
-+ ENGINE_register_DH;
-+ UI_construct_prompt;
-+ X509_STORE_set_trust;
-+ UI_dup_input_string;
-+ d2i_KRB5_APREQ;
-+ EVP_MD_CTX_copy_ex;
-+ OCSP_request_is_signed;
-+ i2d_OCSP_REQINFO;
-+ KRB5_ENCKEY_free;
-+ OCSP_resp_get0;
-+ GENERAL_NAME_it;
-+ ASN1_GENERALIZEDTIME_it;
-+ X509_STORE_set_flags;
-+ EC_POINT_set_compressed_coordinates_GFp;
-+ EC_POINT_set_compr_coords_GFp;
-+ OCSP_response_status_str;
-+ d2i_OCSP_REVOKEDINFO;
-+ OCSP_basic_add1_cert;
-+ ERR_get_implementation;
-+ EVP_CipherFinal_ex;
-+ OCSP_CERTSTATUS_new;
-+ CRYPTO_cleanup_all_ex_data;
-+ OCSP_resp_find;
-+ BN_nnmod;
-+ X509_CRL_sort;
-+ X509_REVOKED_set_revocationDate;
-+ ENGINE_register_RAND;
-+ OCSP_SERVICELOC_new;
-+ EC_POINT_set_affine_coordinates_GFp;
-+ EC_POINT_set_affine_coords_GFp;
-+ _ossl_old_des_options;
-+ SXNET_it;
-+ UI_dup_input_boolean;
-+ PKCS12_add_CSPName_asc;
-+ EC_POINT_is_at_infinity;
-+ ENGINE_load_cryptodev;
-+ DSO_convert_filename;
-+ POLICYQUALINFO_it;
-+ ENGINE_register_ciphers;
-+ BN_mod_lshift_quick;
-+ DSO_set_filename;
-+ ASN1_item_free;
-+ KRB5_TKTBODY_free;
-+ AUTHORITY_KEYID_it;
-+ KRB5_APREQBODY_new;
-+ X509V3_EXT_REQ_add_nconf;
-+ ENGINE_ctrl_cmd_string;
-+ i2d_OCSP_RESPDATA;
-+ EVP_MD_CTX_init;
-+ EXTENDED_KEY_USAGE_free;
-+ PKCS7_ATTR_SIGN_it;
-+ UI_add_error_string;
-+ KRB5_CHECKSUM_free;
-+ OCSP_REQUEST_get_ext;
-+ ENGINE_load_ubsec;
-+ ENGINE_register_all_digests;
-+ PKEY_USAGE_PERIOD_it;
-+ PKCS12_unpack_authsafes;
-+ ASN1_item_unpack;
-+ NETSCAPE_SPKAC_it;
-+ X509_REVOKED_it;
-+ ASN1_STRING_encode;
-+ EVP_aes_128_ecb;
-+ KRB5_AUTHENT_free;
-+ OCSP_BASICRESP_get_ext_by_critical;
-+ OCSP_BASICRESP_get_ext_by_crit;
-+ OCSP_cert_status_str;
-+ d2i_OCSP_REQUEST;
-+ UI_dup_info_string;
-+ _ossl_old_des_xwhite_in2out;
-+ PKCS12_it;
-+ OCSP_SINGLERESP_get_ext_by_critical;
-+ OCSP_SINGLERESP_get_ext_by_crit;
-+ OCSP_CERTSTATUS_free;
-+ _ossl_old_des_crypt;
-+ ASN1_item_i2d;
-+ EVP_DecryptFinal_ex;
-+ ENGINE_load_openssl;
-+ ENGINE_get_cmd_defns;
-+ ENGINE_set_load_privkey_function;
-+ ENGINE_set_load_privkey_fn;
-+ EVP_EncryptFinal_ex;
-+ ENGINE_set_default_digests;
-+ X509_get0_pubkey_bitstr;
-+ asn1_ex_i2c;
-+ ENGINE_register_RSA;
-+ ENGINE_unregister_DSA;
-+ _ossl_old_des_key_sched;
-+ X509_EXTENSION_it;
-+ i2d_KRB5_AUTHENT;
-+ SXNETID_it;
-+ d2i_OCSP_SINGLERESP;
-+ EDIPARTYNAME_new;
-+ PKCS12_certbag2x509;
-+ _ossl_old_des_ofb64_encrypt;
-+ d2i_EXTENDED_KEY_USAGE;
-+ ERR_print_errors_cb;
-+ ENGINE_set_ciphers;
-+ d2i_KRB5_APREQBODY;
-+ UI_method_get_flusher;
-+ X509_PUBKEY_it;
-+ _ossl_old_des_enc_read;
-+ PKCS7_ENCRYPT_it;
-+ i2d_OCSP_RESPONSE;
-+ EC_GROUP_get_cofactor;
-+ PKCS12_unpack_p7data;
-+ d2i_KRB5_AUTHDATA;
-+ OCSP_copy_nonce;
-+ KRB5_AUTHDATA_new;
-+ OCSP_RESPDATA_new;
-+ EC_GFp_mont_method;
-+ OCSP_REVOKEDINFO_free;
-+ UI_get_ex_data;
-+ KRB5_APREQBODY_free;
-+ EC_GROUP_get0_generator;
-+ UI_get_default_method;
-+ X509V3_set_nconf;
-+ PKCS12_item_i2d_encrypt;
-+ X509_add1_ext_i2d;
-+ PKCS7_SIGNER_INFO_it;
-+ KRB5_PRINCNAME_new;
-+ PKCS12_SAFEBAG_it;
-+ EC_GROUP_get_order;
-+ d2i_OCSP_RESPID;
-+ OCSP_request_verify;
-+ NCONF_get_number_e;
-+ _ossl_old_des_decrypt3;
-+ X509_signature_print;
-+ OCSP_SINGLERESP_free;
-+ ENGINE_load_builtin_engines;
-+ i2d_OCSP_ONEREQ;
-+ OCSP_REQUEST_add_ext;
-+ OCSP_RESPBYTES_new;
-+ EVP_MD_CTX_create;
-+ OCSP_resp_find_status;
-+ X509_ALGOR_it;
-+ ASN1_TIME_it;
-+ OCSP_request_set1_name;
-+ OCSP_ONEREQ_get_ext_count;
-+ UI_get0_result;
-+ PKCS12_AUTHSAFES_it;
-+ EVP_aes_256_ecb;
-+ PKCS12_pack_authsafes;
-+ ASN1_IA5STRING_it;
-+ UI_get_input_flags;
-+ EC_GROUP_set_generator;
-+ _ossl_old_des_string_to_2keys;
-+ OCSP_CERTID_free;
-+ X509_CERT_AUX_it;
-+ CERTIFICATEPOLICIES_it;
-+ _ossl_old_des_ede3_cbc_encrypt;
-+ RAND_set_rand_engine;
-+ DSO_get_loaded_filename;
-+ X509_ATTRIBUTE_it;
-+ OCSP_ONEREQ_get_ext_by_NID;
-+ PKCS12_decrypt_skey;
-+ KRB5_AUTHENT_it;
-+ UI_dup_error_string;
-+ RSAPublicKey_it;
-+ i2d_OCSP_REQUEST;
-+ PKCS12_x509crl2certbag;
-+ OCSP_SERVICELOC_it;
-+ ASN1_item_sign;
-+ X509_CRL_set_issuer_name;
-+ OBJ_NAME_do_all_sorted;
-+ i2d_OCSP_BASICRESP;
-+ i2d_OCSP_RESPBYTES;
-+ PKCS12_unpack_p7encdata;
-+ HMAC_CTX_init;
-+ ENGINE_get_digest;
-+ OCSP_RESPONSE_print;
-+ KRB5_TKTBODY_it;
-+ ACCESS_DESCRIPTION_it;
-+ PKCS7_ISSUER_AND_SERIAL_it;
-+ PBE2PARAM_it;
-+ PKCS12_certbag2x509crl;
-+ PKCS7_SIGNED_it;
-+ ENGINE_get_cipher;
-+ i2d_OCSP_CRLID;
-+ OCSP_SINGLERESP_new;
-+ ENGINE_cmd_is_executable;
-+ RSA_up_ref;
-+ ASN1_GENERALSTRING_it;
-+ ENGINE_register_DSA;
-+ X509V3_EXT_add_nconf_sk;
-+ ENGINE_set_load_pubkey_function;
-+ PKCS8_decrypt;
-+ PEM_bytes_read_bio;
-+ DIRECTORYSTRING_it;
-+ d2i_OCSP_CRLID;
-+ EC_POINT_is_on_curve;
-+ CRYPTO_set_locked_mem_ex_functions;
-+ CRYPTO_set_locked_mem_ex_funcs;
-+ d2i_KRB5_CHECKSUM;
-+ ASN1_item_dup;
-+ X509_it;
-+ BN_mod_add;
-+ KRB5_AUTHDATA_free;
-+ _ossl_old_des_cbc_cksum;
-+ ASN1_item_verify;
-+ CRYPTO_set_mem_ex_functions;
-+ EC_POINT_get_Jprojective_coordinates_GFp;
-+ EC_POINT_get_Jproj_coords_GFp;
-+ ZLONG_it;
-+ CRYPTO_get_locked_mem_ex_functions;
-+ CRYPTO_get_locked_mem_ex_funcs;
-+ ASN1_TIME_check;
-+ UI_get0_user_data;
-+ HMAC_CTX_cleanup;
-+ DSA_up_ref;
-+ _ossl_old_des_ede3_cfb64_encrypt;
-+ _ossl_odes_ede3_cfb64_encrypt;
-+ ASN1_BMPSTRING_it;
-+ ASN1_tag2bit;
-+ UI_method_set_flusher;
-+ X509_ocspid_print;
-+ KRB5_ENCDATA_it;
-+ ENGINE_get_load_pubkey_function;
-+ UI_add_user_data;
-+ OCSP_REQUEST_delete_ext;
-+ UI_get_method;
-+ OCSP_ONEREQ_free;
-+ ASN1_PRINTABLESTRING_it;
-+ X509_CRL_set_nextUpdate;
-+ OCSP_REQUEST_it;
-+ OCSP_BASICRESP_it;
-+ AES_ecb_encrypt;
-+ BN_mod_sqr;
-+ NETSCAPE_CERT_SEQUENCE_it;
-+ GENERAL_NAMES_it;
-+ AUTHORITY_INFO_ACCESS_it;
-+ ASN1_FBOOLEAN_it;
-+ UI_set_ex_data;
-+ _ossl_old_des_string_to_key;
-+ ENGINE_register_all_RSA;
-+ d2i_KRB5_PRINCNAME;
-+ OCSP_RESPBYTES_it;
-+ X509_CINF_it;
-+ ENGINE_unregister_digests;
-+ d2i_EDIPARTYNAME;
-+ d2i_OCSP_SERVICELOC;
-+ ENGINE_get_digests;
-+ _ossl_old_des_set_odd_parity;
-+ OCSP_RESPDATA_free;
-+ d2i_KRB5_TICKET;
-+ OTHERNAME_it;
-+ EVP_MD_CTX_cleanup;
-+ d2i_ASN1_GENERALSTRING;
-+ X509_CRL_set_version;
-+ BN_mod_sub;
-+ OCSP_SINGLERESP_get_ext_by_NID;
-+ ENGINE_get_ex_new_index;
-+ OCSP_REQUEST_free;
-+ OCSP_REQUEST_add1_ext_i2d;
-+ X509_VAL_it;
-+ EC_POINTs_make_affine;
-+ EC_POINT_mul;
-+ X509V3_EXT_add_nconf;
-+ X509_TRUST_set;
-+ X509_CRL_add1_ext_i2d;
-+ _ossl_old_des_fcrypt;
-+ DISPLAYTEXT_it;
-+ X509_CRL_set_lastUpdate;
-+ OCSP_BASICRESP_free;
-+ OCSP_BASICRESP_add1_ext_i2d;
-+ d2i_KRB5_AUTHENTBODY;
-+ CRYPTO_set_ex_data_implementation;
-+ CRYPTO_set_ex_data_impl;
-+ KRB5_ENCDATA_new;
-+ DSO_up_ref;
-+ OCSP_crl_reason_str;
-+ UI_get0_result_string;
-+ ASN1_GENERALSTRING_new;
-+ X509_SIG_it;
-+ ERR_set_implementation;
-+ ERR_load_EC_strings;
-+ UI_get0_action_string;
-+ OCSP_ONEREQ_get_ext;
-+ EC_POINT_method_of;
-+ i2d_KRB5_APREQBODY;
-+ _ossl_old_des_ecb3_encrypt;
-+ CRYPTO_get_mem_ex_functions;
-+ ENGINE_get_ex_data;
-+ UI_destroy_method;
-+ ASN1_item_i2d_bio;
-+ OCSP_ONEREQ_get_ext_by_OBJ;
-+ ASN1_primitive_new;
-+ ASN1_PRINTABLE_it;
-+ EVP_aes_192_ecb;
-+ OCSP_SIGNATURE_new;
-+ LONG_it;
-+ ASN1_VISIBLESTRING_it;
-+ OCSP_SINGLERESP_add1_ext_i2d;
-+ d2i_OCSP_CERTID;
-+ ASN1_item_d2i_fp;
-+ CRL_DIST_POINTS_it;
-+ GENERAL_NAME_print;
-+ OCSP_SINGLERESP_delete_ext;
-+ PKCS12_SAFEBAGS_it;
-+ d2i_OCSP_SIGNATURE;
-+ OCSP_request_add1_nonce;
-+ ENGINE_set_cmd_defns;
-+ OCSP_SERVICELOC_free;
-+ EC_GROUP_free;
-+ ASN1_BIT_STRING_it;
-+ X509_REQ_it;
-+ _ossl_old_des_cbc_encrypt;
-+ ERR_unload_strings;
-+ PKCS7_SIGN_ENVELOPE_it;
-+ EDIPARTYNAME_free;
-+ OCSP_REQINFO_free;
-+ EC_GROUP_new_curve_GFp;
-+ OCSP_REQUEST_get1_ext_d2i;
-+ PKCS12_item_pack_safebag;
-+ asn1_ex_c2i;
-+ ENGINE_register_digests;
-+ i2d_OCSP_REVOKEDINFO;
-+ asn1_enc_restore;
-+ UI_free;
-+ UI_new_method;
-+ EVP_EncryptInit_ex;
-+ X509_pubkey_digest;
-+ EC_POINT_invert;
-+ OCSP_basic_sign;
-+ i2d_OCSP_RESPID;
-+ OCSP_check_nonce;
-+ ENGINE_ctrl_cmd;
-+ d2i_KRB5_ENCKEY;
-+ OCSP_parse_url;
-+ OCSP_SINGLERESP_get_ext;
-+ OCSP_CRLID_free;
-+ OCSP_BASICRESP_get1_ext_d2i;
-+ RSAPrivateKey_it;
-+ ENGINE_register_all_DH;
-+ i2d_EDIPARTYNAME;
-+ EC_POINT_get_affine_coordinates_GFp;
-+ EC_POINT_get_affine_coords_GFp;
-+ OCSP_CRLID_new;
-+ ENGINE_get_flags;
-+ OCSP_ONEREQ_it;
-+ UI_process;
-+ ASN1_INTEGER_it;
-+ EVP_CipherInit_ex;
-+ UI_get_string_type;
-+ ENGINE_unregister_DH;
-+ ENGINE_register_all_DSA;
-+ OCSP_ONEREQ_get_ext_by_critical;
-+ bn_dup_expand;
-+ OCSP_cert_id_new;
-+ BASIC_CONSTRAINTS_it;
-+ BN_mod_add_quick;
-+ EC_POINT_new;
-+ EVP_MD_CTX_destroy;
-+ OCSP_RESPBYTES_free;
-+ EVP_aes_128_cbc;
-+ OCSP_SINGLERESP_get1_ext_d2i;
-+ EC_POINT_free;
-+ DH_up_ref;
-+ X509_NAME_ENTRY_it;
-+ UI_get_ex_new_index;
-+ BN_mod_sub_quick;
-+ OCSP_ONEREQ_add_ext;
-+ OCSP_request_sign;
-+ EVP_DigestFinal_ex;
-+ ENGINE_set_digests;
-+ OCSP_id_issuer_cmp;
-+ OBJ_NAME_do_all;
-+ EC_POINTs_mul;
-+ ENGINE_register_complete;
-+ X509V3_EXT_nconf_nid;
-+ ASN1_SEQUENCE_it;
-+ UI_set_default_method;
-+ RAND_query_egd_bytes;
-+ UI_method_get_writer;
-+ UI_OpenSSL;
-+ PEM_def_callback;
-+ ENGINE_cleanup;
-+ DIST_POINT_it;
-+ OCSP_SINGLERESP_it;
-+ d2i_KRB5_TKTBODY;
-+ EC_POINT_cmp;
-+ OCSP_REVOKEDINFO_new;
-+ i2d_OCSP_CERTSTATUS;
-+ OCSP_basic_add1_nonce;
-+ ASN1_item_ex_d2i;
-+ BN_mod_lshift1_quick;
-+ UI_set_method;
-+ OCSP_id_get0_info;
-+ BN_mod_sqrt;
-+ EC_GROUP_copy;
-+ KRB5_ENCDATA_free;
-+ _ossl_old_des_cfb_encrypt;
-+ OCSP_SINGLERESP_get_ext_by_OBJ;
-+ OCSP_cert_to_id;
-+ OCSP_RESPID_new;
-+ OCSP_RESPDATA_it;
-+ d2i_OCSP_RESPDATA;
-+ ENGINE_register_all_complete;
-+ OCSP_check_validity;
-+ PKCS12_BAGS_it;
-+ OCSP_url_svcloc_new;
-+ ASN1_template_free;
-+ OCSP_SINGLERESP_add_ext;
-+ KRB5_AUTHENTBODY_it;
-+ X509_supported_extension;
-+ i2d_KRB5_AUTHDATA;
-+ UI_method_get_opener;
-+ ENGINE_set_ex_data;
-+ OCSP_REQUEST_print;
-+ CBIGNUM_it;
-+ KRB5_TICKET_new;
-+ KRB5_APREQ_new;
-+ EC_GROUP_get_curve_GFp;
-+ KRB5_ENCKEY_new;
-+ ASN1_template_d2i;
-+ _ossl_old_des_quad_cksum;
-+ OCSP_single_get0_status;
-+ BN_swap;
-+ POLICYINFO_it;
-+ ENGINE_set_destroy_function;
-+ asn1_enc_free;
-+ OCSP_RESPID_it;
-+ EC_GROUP_new;
-+ EVP_aes_256_cbc;
-+ i2d_KRB5_PRINCNAME;
-+ _ossl_old_des_encrypt2;
-+ _ossl_old_des_encrypt3;
-+ PKCS8_PRIV_KEY_INFO_it;
-+ OCSP_REQINFO_it;
-+ PBEPARAM_it;
-+ KRB5_AUTHENTBODY_new;
-+ X509_CRL_add0_revoked;
-+ EDIPARTYNAME_it;
-+ NETSCAPE_SPKI_it;
-+ UI_get0_test_string;
-+ ENGINE_get_cipher_engine;
-+ ENGINE_register_all_ciphers;
-+ EC_POINT_copy;
-+ BN_kronecker;
-+ _ossl_old_des_ede3_ofb64_encrypt;
-+ _ossl_odes_ede3_ofb64_encrypt;
-+ UI_method_get_reader;
-+ OCSP_BASICRESP_get_ext_count;
-+ ASN1_ENUMERATED_it;
-+ UI_set_result;
-+ i2d_KRB5_TICKET;
-+ X509_print_ex_fp;
-+ EVP_CIPHER_CTX_set_padding;
-+ d2i_OCSP_RESPONSE;
-+ ASN1_UTCTIME_it;
-+ _ossl_old_des_enc_write;
-+ OCSP_RESPONSE_new;
-+ AES_set_encrypt_key;
-+ OCSP_resp_count;
-+ KRB5_CHECKSUM_new;
-+ ENGINE_load_cswift;
-+ OCSP_onereq_get0_id;
-+ ENGINE_set_default_ciphers;
-+ NOTICEREF_it;
-+ X509V3_EXT_CRL_add_nconf;
-+ OCSP_REVOKEDINFO_it;
-+ AES_encrypt;
-+ OCSP_REQUEST_new;
-+ ASN1_ANY_it;
-+ CRYPTO_ex_data_new_class;
-+ _ossl_old_des_ncbc_encrypt;
-+ i2d_KRB5_TKTBODY;
-+ EC_POINT_clear_free;
-+ AES_decrypt;
-+ asn1_enc_init;
-+ UI_get_result_maxsize;
-+ OCSP_CERTID_new;
-+ ENGINE_unregister_RAND;
-+ UI_method_get_closer;
-+ d2i_KRB5_ENCDATA;
-+ OCSP_request_onereq_count;
-+ OCSP_basic_verify;
-+ KRB5_AUTHENTBODY_free;
-+ ASN1_item_d2i;
-+ ASN1_primitive_free;
-+ i2d_EXTENDED_KEY_USAGE;
-+ i2d_OCSP_SIGNATURE;
-+ asn1_enc_save;
-+ ENGINE_load_nuron;
-+ _ossl_old_des_pcbc_encrypt;
-+ PKCS12_MAC_DATA_it;
-+ OCSP_accept_responses_new;
-+ asn1_do_lock;
-+ PKCS7_ATTR_VERIFY_it;
-+ KRB5_APREQBODY_it;
-+ i2d_OCSP_SINGLERESP;
-+ ASN1_item_ex_new;
-+ UI_add_verify_string;
-+ _ossl_old_des_set_key;
-+ KRB5_PRINCNAME_it;
-+ EVP_DecryptInit_ex;
-+ i2d_OCSP_CERTID;
-+ ASN1_item_d2i_bio;
-+ EC_POINT_dbl;
-+ asn1_get_choice_selector;
-+ i2d_KRB5_CHECKSUM;
-+ ENGINE_set_table_flags;
-+ AES_options;
-+ ENGINE_load_chil;
-+ OCSP_id_cmp;
-+ OCSP_BASICRESP_new;
-+ OCSP_REQUEST_get_ext_by_NID;
-+ KRB5_APREQ_it;
-+ ENGINE_get_destroy_function;
-+ CONF_set_nconf;
-+ ASN1_PRINTABLE_free;
-+ OCSP_BASICRESP_get_ext_by_NID;
-+ DIST_POINT_NAME_it;
-+ X509V3_extensions_print;
-+ _ossl_old_des_cfb64_encrypt;
-+ X509_REVOKED_add1_ext_i2d;
-+ _ossl_old_des_ofb_encrypt;
-+ KRB5_TKTBODY_new;
-+ ASN1_OCTET_STRING_it;
-+ ERR_load_UI_strings;
-+ i2d_KRB5_ENCKEY;
-+ ASN1_template_new;
-+ OCSP_SIGNATURE_free;
-+ ASN1_item_i2d_fp;
-+ KRB5_PRINCNAME_free;
-+ PKCS7_RECIP_INFO_it;
-+ EXTENDED_KEY_USAGE_it;
-+ EC_GFp_simple_method;
-+ EC_GROUP_precompute_mult;
-+ OCSP_request_onereq_get0;
-+ UI_method_set_writer;
-+ KRB5_AUTHENT_new;
-+ X509_CRL_INFO_it;
-+ DSO_set_name_converter;
-+ AES_set_decrypt_key;
-+ PKCS7_DIGEST_it;
-+ PKCS12_x5092certbag;
-+ EVP_DigestInit_ex;
-+ i2a_ACCESS_DESCRIPTION;
-+ OCSP_RESPONSE_it;
-+ PKCS7_ENC_CONTENT_it;
-+ OCSP_request_add0_id;
-+ EC_POINT_make_affine;
-+ DSO_get_filename;
-+ OCSP_CERTSTATUS_it;
-+ OCSP_request_add1_cert;
-+ UI_get0_output_string;
-+ UI_dup_verify_string;
-+ BN_mod_lshift;
-+ KRB5_AUTHDATA_it;
-+ asn1_set_choice_selector;
-+ OCSP_basic_add1_status;
-+ OCSP_RESPID_free;
-+ asn1_get_field_ptr;
-+ UI_add_input_string;
-+ OCSP_CRLID_it;
-+ i2d_KRB5_AUTHENTBODY;
-+ OCSP_REQUEST_get_ext_count;
-+ ENGINE_load_atalla;
-+ X509_NAME_it;
-+ USERNOTICE_it;
-+ OCSP_REQINFO_new;
-+ OCSP_BASICRESP_get_ext;
-+ CRYPTO_get_ex_data_implementation;
-+ CRYPTO_get_ex_data_impl;
-+ ASN1_item_pack;
-+ i2d_KRB5_ENCDATA;
-+ X509_PURPOSE_set;
-+ X509_REQ_INFO_it;
-+ UI_method_set_opener;
-+ ASN1_item_ex_free;
-+ ASN1_BOOLEAN_it;
-+ ENGINE_get_table_flags;
-+ UI_create_method;
-+ OCSP_ONEREQ_add1_ext_i2d;
-+ _shadow_DES_check_key;
-+ d2i_OCSP_REQINFO;
-+ UI_add_info_string;
-+ UI_get_result_minsize;
-+ ASN1_NULL_it;
-+ BN_mod_lshift1;
-+ d2i_OCSP_ONEREQ;
-+ OCSP_ONEREQ_new;
-+ KRB5_TICKET_it;
-+ EVP_aes_192_cbc;
-+ KRB5_TICKET_free;
-+ UI_new;
-+ OCSP_response_create;
-+ _ossl_old_des_xcbc_encrypt;
-+ PKCS7_it;
-+ OCSP_REQUEST_get_ext_by_critical;
-+ OCSP_REQUEST_get_ext_by_crit;
-+ ENGINE_set_flags;
-+ _ossl_old_des_ecb_encrypt;
-+ OCSP_response_get1_basic;
-+ EVP_Digest;
-+ OCSP_ONEREQ_delete_ext;
-+ ASN1_TBOOLEAN_it;
-+ ASN1_item_new;
-+ ASN1_TIME_to_generalizedtime;
-+ BIGNUM_it;
-+ AES_cbc_encrypt;
-+ ENGINE_get_load_privkey_function;
-+ ENGINE_get_load_privkey_fn;
-+ OCSP_RESPONSE_free;
-+ UI_method_set_reader;
-+ i2d_ASN1_T61STRING;
-+ EC_POINT_set_to_infinity;
-+ ERR_load_OCSP_strings;
-+ EC_POINT_point2oct;
-+ KRB5_APREQ_free;
-+ ASN1_OBJECT_it;
-+ OCSP_crlID_new;
-+ OCSP_crlID2_new;
-+ CONF_modules_load_file;
-+ CONF_imodule_set_usr_data;
-+ ENGINE_set_default_string;
-+ CONF_module_get_usr_data;
-+ ASN1_add_oid_module;
-+ CONF_modules_finish;
-+ OPENSSL_config;
-+ CONF_modules_unload;
-+ CONF_imodule_get_value;
-+ CONF_module_set_usr_data;
-+ CONF_parse_list;
-+ CONF_module_add;
-+ CONF_get1_default_config_file;
-+ CONF_imodule_get_flags;
-+ CONF_imodule_get_module;
-+ CONF_modules_load;
-+ CONF_imodule_get_name;
-+ ERR_peek_top_error;
-+ CONF_imodule_get_usr_data;
-+ CONF_imodule_set_flags;
-+ ENGINE_add_conf_module;
-+ ERR_peek_last_error_line;
-+ ERR_peek_last_error_line_data;
-+ ERR_peek_last_error;
-+ DES_read_2passwords;
-+ DES_read_password;
-+ UI_UTIL_read_pw;
-+ UI_UTIL_read_pw_string;
-+ ENGINE_load_aep;
-+ ENGINE_load_sureware;
-+ OPENSSL_add_all_algorithms_noconf;
-+ OPENSSL_add_all_algo_noconf;
-+ OPENSSL_add_all_algorithms_conf;
-+ OPENSSL_add_all_algo_conf;
-+ OPENSSL_load_builtin_modules;
-+ AES_ofb128_encrypt;
-+ AES_ctr128_encrypt;
-+ AES_cfb128_encrypt;
-+ ENGINE_load_4758cca;
-+ _ossl_096_des_random_seed;
-+ EVP_aes_256_ofb;
-+ EVP_aes_192_ofb;
-+ EVP_aes_128_cfb128;
-+ EVP_aes_256_cfb128;
-+ EVP_aes_128_ofb;
-+ EVP_aes_192_cfb128;
-+ CONF_modules_free;
-+ NCONF_default;
-+ OPENSSL_no_config;
-+ NCONF_WIN32;
-+ ASN1_UNIVERSALSTRING_new;
-+ EVP_des_ede_ecb;
-+ i2d_ASN1_UNIVERSALSTRING;
-+ ASN1_UNIVERSALSTRING_free;
-+ ASN1_UNIVERSALSTRING_it;
-+ d2i_ASN1_UNIVERSALSTRING;
-+ EVP_des_ede3_ecb;
-+ X509_REQ_print_ex;
-+ ENGINE_up_ref;
-+ BUF_MEM_grow_clean;
-+ CRYPTO_realloc_clean;
-+ BUF_strlcat;
-+ BIO_indent;
-+ BUF_strlcpy;
-+ OpenSSLDie;
-+ OPENSSL_cleanse;
-+ ENGINE_setup_bsd_cryptodev;
-+ ERR_release_err_state_table;
-+ EVP_aes_128_cfb8;
-+ FIPS_corrupt_rsa;
-+ FIPS_selftest_des;
-+ EVP_aes_128_cfb1;
-+ EVP_aes_192_cfb8;
-+ FIPS_mode_set;
-+ FIPS_selftest_dsa;
-+ EVP_aes_256_cfb8;
-+ FIPS_allow_md5;
-+ DES_ede3_cfb_encrypt;
-+ EVP_des_ede3_cfb8;
-+ FIPS_rand_seeded;
-+ AES_cfbr_encrypt_block;
-+ AES_cfb8_encrypt;
-+ FIPS_rand_seed;
-+ FIPS_corrupt_des;
-+ EVP_aes_192_cfb1;
-+ FIPS_selftest_aes;
-+ FIPS_set_prng_key;
-+ EVP_des_cfb8;
-+ FIPS_corrupt_dsa;
-+ FIPS_test_mode;
-+ FIPS_rand_method;
-+ EVP_aes_256_cfb1;
-+ ERR_load_FIPS_strings;
-+ FIPS_corrupt_aes;
-+ FIPS_selftest_sha1;
-+ FIPS_selftest_rsa;
-+ FIPS_corrupt_sha1;
-+ EVP_des_cfb1;
-+ FIPS_dsa_check;
-+ AES_cfb1_encrypt;
-+ EVP_des_ede3_cfb1;
-+ FIPS_rand_check;
-+ FIPS_md5_allowed;
-+ FIPS_mode;
-+ FIPS_selftest_failed;
-+ sk_is_sorted;
-+ X509_check_ca;
-+ HMAC_CTX_set_flags;
-+ d2i_PROXY_CERT_INFO_EXTENSION;
-+ PROXY_POLICY_it;
-+ i2d_PROXY_POLICY;
-+ i2d_PROXY_CERT_INFO_EXTENSION;
-+ d2i_PROXY_POLICY;
-+ PROXY_CERT_INFO_EXTENSION_new;
-+ PROXY_CERT_INFO_EXTENSION_free;
-+ PROXY_CERT_INFO_EXTENSION_it;
-+ PROXY_POLICY_free;
-+ PROXY_POLICY_new;
-+ BN_MONT_CTX_set_locked;
-+ FIPS_selftest_rng;
-+ EVP_sha384;
-+ EVP_sha512;
-+ EVP_sha224;
-+ EVP_sha256;
-+ FIPS_selftest_hmac;
-+ FIPS_corrupt_rng;
-+ BN_mod_exp_mont_consttime;
-+ RSA_X931_hash_id;
-+ RSA_padding_check_X931;
-+ RSA_verify_PKCS1_PSS;
-+ RSA_padding_add_X931;
-+ RSA_padding_add_PKCS1_PSS;
-+ PKCS1_MGF1;
-+ BN_X931_generate_Xpq;
-+ RSA_X931_generate_key;
-+ BN_X931_derive_prime;
-+ BN_X931_generate_prime;
-+ RSA_X931_derive;
-+ BIO_new_dgram;
-+ BN_get0_nist_prime_384;
-+ ERR_set_mark;
-+ X509_STORE_CTX_set0_crls;
-+ ENGINE_set_STORE;
-+ ENGINE_register_ECDSA;
-+ STORE_meth_set_list_start_fn;
-+ STORE_method_set_list_start_function;
-+ BN_BLINDING_invert_ex;
-+ NAME_CONSTRAINTS_free;
-+ STORE_ATTR_INFO_set_number;
-+ BN_BLINDING_get_thread_id;
-+ X509_STORE_CTX_set0_param;
-+ POLICY_MAPPING_it;
-+ STORE_parse_attrs_start;
-+ POLICY_CONSTRAINTS_free;
-+ EVP_PKEY_add1_attr_by_NID;
-+ BN_nist_mod_192;
-+ EC_GROUP_get_trinomial_basis;
-+ STORE_set_method;
-+ GENERAL_SUBTREE_free;
-+ NAME_CONSTRAINTS_it;
-+ ECDH_get_default_method;
-+ PKCS12_add_safe;
-+ EC_KEY_new_by_curve_name;
-+ STORE_meth_get_update_store_fn;
-+ STORE_method_get_update_store_function;
-+ ENGINE_register_ECDH;
-+ SHA512_Update;
-+ i2d_ECPrivateKey;
-+ BN_get0_nist_prime_192;
-+ STORE_modify_certificate;
-+ EC_POINT_set_affine_coordinates_GF2m;
-+ EC_POINT_set_affine_coords_GF2m;
-+ BN_GF2m_mod_exp_arr;
-+ STORE_ATTR_INFO_modify_number;
-+ X509_keyid_get0;
-+ ENGINE_load_gmp;
-+ pitem_new;
-+ BN_GF2m_mod_mul_arr;
-+ STORE_list_public_key_endp;
-+ o2i_ECPublicKey;
-+ EC_KEY_copy;
-+ BIO_dump_fp;
-+ X509_policy_node_get0_parent;
-+ EC_GROUP_check_discriminant;
-+ i2o_ECPublicKey;
-+ EC_KEY_precompute_mult;
-+ a2i_IPADDRESS;
-+ STORE_meth_set_initialise_fn;
-+ STORE_method_set_initialise_function;
-+ X509_STORE_CTX_set_depth;
-+ X509_VERIFY_PARAM_inherit;
-+ EC_POINT_point2bn;
-+ STORE_ATTR_INFO_set_dn;
-+ X509_policy_tree_get0_policies;
-+ EC_GROUP_new_curve_GF2m;
-+ STORE_destroy_method;
-+ ENGINE_unregister_STORE;
-+ EVP_PKEY_get1_EC_KEY;
-+ STORE_ATTR_INFO_get0_number;
-+ ENGINE_get_default_ECDH;
-+ EC_KEY_get_conv_form;
-+ ASN1_OCTET_STRING_NDEF_it;
-+ STORE_delete_public_key;
-+ STORE_get_public_key;
-+ STORE_modify_arbitrary;
-+ ENGINE_get_static_state;
-+ pqueue_iterator;
-+ ECDSA_SIG_new;
-+ OPENSSL_DIR_end;
-+ BN_GF2m_mod_sqr;
-+ EC_POINT_bn2point;
-+ X509_VERIFY_PARAM_set_depth;
-+ EC_KEY_set_asn1_flag;
-+ STORE_get_method;
-+ EC_KEY_get_key_method_data;
-+ ECDSA_sign_ex;
-+ STORE_parse_attrs_end;
-+ EC_GROUP_get_point_conversion_form;
-+ EC_GROUP_get_point_conv_form;
-+ STORE_method_set_store_function;
-+ STORE_ATTR_INFO_in;
-+ PEM_read_bio_ECPKParameters;
-+ EC_GROUP_get_pentanomial_basis;
-+ EVP_PKEY_add1_attr_by_txt;
-+ BN_BLINDING_set_flags;
-+ X509_VERIFY_PARAM_set1_policies;
-+ X509_VERIFY_PARAM_set1_name;
-+ X509_VERIFY_PARAM_set_purpose;
-+ STORE_get_number;
-+ ECDSA_sign_setup;
-+ BN_GF2m_mod_solve_quad_arr;
-+ EC_KEY_up_ref;
-+ POLICY_MAPPING_free;
-+ BN_GF2m_mod_div;
-+ X509_VERIFY_PARAM_set_flags;
-+ EC_KEY_free;
-+ STORE_meth_set_list_next_fn;
-+ STORE_method_set_list_next_function;
-+ PEM_write_bio_ECPrivateKey;
-+ d2i_EC_PUBKEY;
-+ STORE_meth_get_generate_fn;
-+ STORE_method_get_generate_function;
-+ STORE_meth_set_list_end_fn;
-+ STORE_method_set_list_end_function;
-+ pqueue_print;
-+ EC_GROUP_have_precompute_mult;
-+ EC_KEY_print_fp;
-+ BN_GF2m_mod_arr;
-+ PEM_write_bio_X509_CERT_PAIR;
-+ EVP_PKEY_cmp;
-+ X509_policy_level_node_count;
-+ STORE_new_engine;
-+ STORE_list_public_key_start;
-+ X509_VERIFY_PARAM_new;
-+ ECDH_get_ex_data;
-+ EVP_PKEY_get_attr;
-+ ECDSA_do_sign;
-+ ENGINE_unregister_ECDH;
-+ ECDH_OpenSSL;
-+ EC_KEY_set_conv_form;
-+ EC_POINT_dup;
-+ GENERAL_SUBTREE_new;
-+ STORE_list_crl_endp;
-+ EC_get_builtin_curves;
-+ X509_policy_node_get0_qualifiers;
-+ X509_pcy_node_get0_qualifiers;
-+ STORE_list_crl_end;
-+ EVP_PKEY_set1_EC_KEY;
-+ BN_GF2m_mod_sqrt_arr;
-+ i2d_ECPrivateKey_bio;
-+ ECPKParameters_print_fp;
-+ pqueue_find;
-+ ECDSA_SIG_free;
-+ PEM_write_bio_ECPKParameters;
-+ STORE_method_set_ctrl_function;
-+ STORE_list_public_key_end;
-+ EC_KEY_set_private_key;
-+ pqueue_peek;
-+ STORE_get_arbitrary;
-+ STORE_store_crl;
-+ X509_policy_node_get0_policy;
-+ PKCS12_add_safes;
-+ BN_BLINDING_convert_ex;
-+ X509_policy_tree_free;
-+ OPENSSL_ia32cap_loc;
-+ BN_GF2m_poly2arr;
-+ STORE_ctrl;
-+ STORE_ATTR_INFO_compare;
-+ BN_get0_nist_prime_224;
-+ i2d_ECParameters;
-+ i2d_ECPKParameters;
-+ BN_GENCB_call;
-+ d2i_ECPKParameters;
-+ STORE_meth_set_generate_fn;
-+ STORE_method_set_generate_function;
-+ ENGINE_set_ECDH;
-+ NAME_CONSTRAINTS_new;
-+ SHA256_Init;
-+ EC_KEY_get0_public_key;
-+ PEM_write_bio_EC_PUBKEY;
-+ STORE_ATTR_INFO_set_cstr;
-+ STORE_list_crl_next;
-+ STORE_ATTR_INFO_in_range;
-+ ECParameters_print;
-+ STORE_meth_set_delete_fn;
-+ STORE_method_set_delete_function;
-+ STORE_list_certificate_next;
-+ ASN1_generate_nconf;
-+ BUF_memdup;
-+ BN_GF2m_mod_mul;
-+ STORE_meth_get_list_next_fn;
-+ STORE_method_get_list_next_function;
-+ STORE_ATTR_INFO_get0_dn;
-+ STORE_list_private_key_next;
-+ EC_GROUP_set_seed;
-+ X509_VERIFY_PARAM_set_trust;
-+ STORE_ATTR_INFO_free;
-+ STORE_get_private_key;
-+ EVP_PKEY_get_attr_count;
-+ STORE_ATTR_INFO_new;
-+ EC_GROUP_get_curve_GF2m;
-+ STORE_meth_set_revoke_fn;
-+ STORE_method_set_revoke_function;
-+ STORE_store_number;
-+ BN_is_prime_ex;
-+ STORE_revoke_public_key;
-+ X509_STORE_CTX_get0_param;
-+ STORE_delete_arbitrary;
-+ PEM_read_X509_CERT_PAIR;
-+ X509_STORE_set_depth;
-+ ECDSA_get_ex_data;
-+ SHA224;
-+ BIO_dump_indent_fp;
-+ EC_KEY_set_group;
-+ BUF_strndup;
-+ STORE_list_certificate_start;
-+ BN_GF2m_mod;
-+ X509_REQ_check_private_key;
-+ EC_GROUP_get_seed_len;
-+ ERR_load_STORE_strings;
-+ PEM_read_bio_EC_PUBKEY;
-+ STORE_list_private_key_end;
-+ i2d_EC_PUBKEY;
-+ ECDSA_get_default_method;
-+ ASN1_put_eoc;
-+ X509_STORE_CTX_get_explicit_policy;
-+ X509_STORE_CTX_get_expl_policy;
-+ X509_VERIFY_PARAM_table_cleanup;
-+ STORE_modify_private_key;
-+ X509_VERIFY_PARAM_free;
-+ EC_METHOD_get_field_type;
-+ EC_GFp_nist_method;
-+ STORE_meth_set_modify_fn;
-+ STORE_method_set_modify_function;
-+ STORE_parse_attrs_next;
-+ ENGINE_load_padlock;
-+ EC_GROUP_set_curve_name;
-+ X509_CERT_PAIR_it;
-+ STORE_meth_get_revoke_fn;
-+ STORE_method_get_revoke_function;
-+ STORE_method_set_get_function;
-+ STORE_modify_number;
-+ STORE_method_get_store_function;
-+ STORE_store_private_key;
-+ BN_GF2m_mod_sqr_arr;
-+ RSA_setup_blinding;
-+ BIO_s_datagram;
-+ STORE_Memory;
-+ sk_find_ex;
-+ EC_GROUP_set_curve_GF2m;
-+ ENGINE_set_default_ECDSA;
-+ POLICY_CONSTRAINTS_new;
-+ BN_GF2m_mod_sqrt;
-+ ECDH_set_default_method;
-+ EC_KEY_generate_key;
-+ SHA384_Update;
-+ BN_GF2m_arr2poly;
-+ STORE_method_get_get_function;
-+ STORE_meth_set_cleanup_fn;
-+ STORE_method_set_cleanup_function;
-+ EC_GROUP_check;
-+ d2i_ECPrivateKey_bio;
-+ EC_KEY_insert_key_method_data;
-+ STORE_meth_get_lock_store_fn;
-+ STORE_method_get_lock_store_function;
-+ X509_VERIFY_PARAM_get_depth;
-+ SHA224_Final;
-+ STORE_meth_set_update_store_fn;
-+ STORE_method_set_update_store_function;
-+ SHA224_Update;
-+ d2i_ECPrivateKey;
-+ ASN1_item_ndef_i2d;
-+ STORE_delete_private_key;
-+ ERR_pop_to_mark;
-+ ENGINE_register_all_STORE;
-+ X509_policy_level_get0_node;
-+ i2d_PKCS7_NDEF;
-+ EC_GROUP_get_degree;
-+ ASN1_generate_v3;
-+ STORE_ATTR_INFO_modify_cstr;
-+ X509_policy_tree_level_count;
-+ BN_GF2m_add;
-+ EC_KEY_get0_group;
-+ STORE_generate_crl;
-+ STORE_store_public_key;
-+ X509_CERT_PAIR_free;
-+ STORE_revoke_private_key;
-+ BN_nist_mod_224;
-+ SHA512_Final;
-+ STORE_ATTR_INFO_modify_dn;
-+ STORE_meth_get_initialise_fn;
-+ STORE_method_get_initialise_function;
-+ STORE_delete_number;
-+ i2d_EC_PUBKEY_bio;
-+ BIO_dgram_non_fatal_error;
-+ EC_GROUP_get_asn1_flag;
-+ STORE_ATTR_INFO_in_ex;
-+ STORE_list_crl_start;
-+ ECDH_get_ex_new_index;
-+ STORE_meth_get_modify_fn;
-+ STORE_method_get_modify_function;
-+ v2i_ASN1_BIT_STRING;
-+ STORE_store_certificate;
-+ OBJ_bsearch_ex;
-+ X509_STORE_CTX_set_default;
-+ STORE_ATTR_INFO_set_sha1str;
-+ BN_GF2m_mod_inv;
-+ BN_GF2m_mod_exp;
-+ STORE_modify_public_key;
-+ STORE_meth_get_list_start_fn;
-+ STORE_method_get_list_start_function;
-+ EC_GROUP_get0_seed;
-+ STORE_store_arbitrary;
-+ STORE_meth_set_unlock_store_fn;
-+ STORE_method_set_unlock_store_function;
-+ BN_GF2m_mod_div_arr;
-+ ENGINE_set_ECDSA;
-+ STORE_create_method;
-+ ECPKParameters_print;
-+ EC_KEY_get0_private_key;
-+ PEM_write_EC_PUBKEY;
-+ X509_VERIFY_PARAM_set1;
-+ ECDH_set_method;
-+ v2i_GENERAL_NAME_ex;
-+ ECDH_set_ex_data;
-+ STORE_generate_key;
-+ BN_nist_mod_521;
-+ X509_policy_tree_get0_level;
-+ EC_GROUP_set_point_conversion_form;
-+ EC_GROUP_set_point_conv_form;
-+ PEM_read_EC_PUBKEY;
-+ i2d_ECDSA_SIG;
-+ ECDSA_OpenSSL;
-+ STORE_delete_crl;
-+ EC_KEY_get_enc_flags;
-+ ASN1_const_check_infinite_end;
-+ EVP_PKEY_delete_attr;
-+ ECDSA_set_default_method;
-+ EC_POINT_set_compressed_coordinates_GF2m;
-+ EC_POINT_set_compr_coords_GF2m;
-+ EC_GROUP_cmp;
-+ STORE_revoke_certificate;
-+ BN_get0_nist_prime_256;
-+ STORE_meth_get_delete_fn;
-+ STORE_method_get_delete_function;
-+ SHA224_Init;
-+ PEM_read_ECPrivateKey;
-+ SHA512_Init;
-+ STORE_parse_attrs_endp;
-+ BN_set_negative;
-+ ERR_load_ECDSA_strings;
-+ EC_GROUP_get_basis_type;
-+ STORE_list_public_key_next;
-+ i2v_ASN1_BIT_STRING;
-+ STORE_OBJECT_free;
-+ BN_nist_mod_384;
-+ i2d_X509_CERT_PAIR;
-+ PEM_write_ECPKParameters;
-+ ECDH_compute_key;
-+ STORE_ATTR_INFO_get0_sha1str;
-+ ENGINE_register_all_ECDH;
-+ pqueue_pop;
-+ STORE_ATTR_INFO_get0_cstr;
-+ POLICY_CONSTRAINTS_it;
-+ STORE_get_ex_new_index;
-+ EVP_PKEY_get_attr_by_OBJ;
-+ X509_VERIFY_PARAM_add0_policy;
-+ BN_GF2m_mod_solve_quad;
-+ SHA256;
-+ i2d_ECPrivateKey_fp;
-+ X509_policy_tree_get0_user_policies;
-+ X509_pcy_tree_get0_usr_policies;
-+ OPENSSL_DIR_read;
-+ ENGINE_register_all_ECDSA;
-+ X509_VERIFY_PARAM_lookup;
-+ EC_POINT_get_affine_coordinates_GF2m;
-+ EC_POINT_get_affine_coords_GF2m;
-+ EC_GROUP_dup;
-+ ENGINE_get_default_ECDSA;
-+ EC_KEY_new;
-+ SHA256_Transform;
-+ EC_KEY_set_enc_flags;
-+ ECDSA_verify;
-+ EC_POINT_point2hex;
-+ ENGINE_get_STORE;
-+ SHA512;
-+ STORE_get_certificate;
-+ ECDSA_do_sign_ex;
-+ ECDSA_do_verify;
-+ d2i_ECPrivateKey_fp;
-+ STORE_delete_certificate;
-+ SHA512_Transform;
-+ X509_STORE_set1_param;
-+ STORE_method_get_ctrl_function;
-+ STORE_free;
-+ PEM_write_ECPrivateKey;
-+ STORE_meth_get_unlock_store_fn;
-+ STORE_method_get_unlock_store_function;
-+ STORE_get_ex_data;
-+ EC_KEY_set_public_key;
-+ PEM_read_ECPKParameters;
-+ X509_CERT_PAIR_new;
-+ ENGINE_register_STORE;
-+ RSA_generate_key_ex;
-+ DSA_generate_parameters_ex;
-+ ECParameters_print_fp;
-+ X509V3_NAME_from_section;
-+ EVP_PKEY_add1_attr;
-+ STORE_modify_crl;
-+ STORE_list_private_key_start;
-+ POLICY_MAPPINGS_it;
-+ GENERAL_SUBTREE_it;
-+ EC_GROUP_get_curve_name;
-+ PEM_write_X509_CERT_PAIR;
-+ BIO_dump_indent_cb;
-+ d2i_X509_CERT_PAIR;
-+ STORE_list_private_key_endp;
-+ asn1_const_Finish;
-+ i2d_EC_PUBKEY_fp;
-+ BN_nist_mod_256;
-+ X509_VERIFY_PARAM_add0_table;
-+ pqueue_free;
-+ BN_BLINDING_create_param;
-+ ECDSA_size;
-+ d2i_EC_PUBKEY_bio;
-+ BN_get0_nist_prime_521;
-+ STORE_ATTR_INFO_modify_sha1str;
-+ BN_generate_prime_ex;
-+ EC_GROUP_new_by_curve_name;
-+ SHA256_Final;
-+ DH_generate_parameters_ex;
-+ PEM_read_bio_ECPrivateKey;
-+ STORE_meth_get_cleanup_fn;
-+ STORE_method_get_cleanup_function;
-+ ENGINE_get_ECDH;
-+ d2i_ECDSA_SIG;
-+ BN_is_prime_fasttest_ex;
-+ ECDSA_sign;
-+ X509_policy_check;
-+ EVP_PKEY_get_attr_by_NID;
-+ STORE_set_ex_data;
-+ ENGINE_get_ECDSA;
-+ EVP_ecdsa;
-+ BN_BLINDING_get_flags;
-+ PKCS12_add_cert;
-+ STORE_OBJECT_new;
-+ ERR_load_ECDH_strings;
-+ EC_KEY_dup;
-+ EVP_CIPHER_CTX_rand_key;
-+ ECDSA_set_method;
-+ a2i_IPADDRESS_NC;
-+ d2i_ECParameters;
-+ STORE_list_certificate_end;
-+ STORE_get_crl;
-+ X509_POLICY_NODE_print;
-+ SHA384_Init;
-+ EC_GF2m_simple_method;
-+ ECDSA_set_ex_data;
-+ SHA384_Final;
-+ PKCS7_set_digest;
-+ EC_KEY_print;
-+ STORE_meth_set_lock_store_fn;
-+ STORE_method_set_lock_store_function;
-+ ECDSA_get_ex_new_index;
-+ SHA384;
-+ POLICY_MAPPING_new;
-+ STORE_list_certificate_endp;
-+ X509_STORE_CTX_get0_policy_tree;
-+ EC_GROUP_set_asn1_flag;
-+ EC_KEY_check_key;
-+ d2i_EC_PUBKEY_fp;
-+ PKCS7_set0_type_other;
-+ PEM_read_bio_X509_CERT_PAIR;
-+ pqueue_next;
-+ STORE_meth_get_list_end_fn;
-+ STORE_method_get_list_end_function;
-+ EVP_PKEY_add1_attr_by_OBJ;
-+ X509_VERIFY_PARAM_set_time;
-+ pqueue_new;
-+ ENGINE_set_default_ECDH;
-+ STORE_new_method;
-+ PKCS12_add_key;
-+ DSO_merge;
-+ EC_POINT_hex2point;
-+ BIO_dump_cb;
-+ SHA256_Update;
-+ pqueue_insert;
-+ pitem_free;
-+ BN_GF2m_mod_inv_arr;
-+ ENGINE_unregister_ECDSA;
-+ BN_BLINDING_set_thread_id;
-+ get_rfc3526_prime_8192;
-+ X509_VERIFY_PARAM_clear_flags;
-+ get_rfc2409_prime_1024;
-+ DH_check_pub_key;
-+ get_rfc3526_prime_2048;
-+ get_rfc3526_prime_6144;
-+ get_rfc3526_prime_1536;
-+ get_rfc3526_prime_3072;
-+ get_rfc3526_prime_4096;
-+ get_rfc2409_prime_768;
-+ X509_VERIFY_PARAM_get_flags;
-+ EVP_CIPHER_CTX_new;
-+ EVP_CIPHER_CTX_free;
-+ Camellia_cbc_encrypt;
-+ Camellia_cfb128_encrypt;
-+ Camellia_cfb1_encrypt;
-+ Camellia_cfb8_encrypt;
-+ Camellia_ctr128_encrypt;
-+ Camellia_cfbr_encrypt_block;
-+ Camellia_decrypt;
-+ Camellia_ecb_encrypt;
-+ Camellia_encrypt;
-+ Camellia_ofb128_encrypt;
-+ Camellia_set_key;
-+ EVP_camellia_128_cbc;
-+ EVP_camellia_128_cfb128;
-+ EVP_camellia_128_cfb1;
-+ EVP_camellia_128_cfb8;
-+ EVP_camellia_128_ecb;
-+ EVP_camellia_128_ofb;
-+ EVP_camellia_192_cbc;
-+ EVP_camellia_192_cfb128;
-+ EVP_camellia_192_cfb1;
-+ EVP_camellia_192_cfb8;
-+ EVP_camellia_192_ecb;
-+ EVP_camellia_192_ofb;
-+ EVP_camellia_256_cbc;
-+ EVP_camellia_256_cfb128;
-+ EVP_camellia_256_cfb1;
-+ EVP_camellia_256_cfb8;
-+ EVP_camellia_256_ecb;
-+ EVP_camellia_256_ofb;
-+ a2i_ipadd;
-+ ASIdentifiers_free;
-+ i2d_ASIdOrRange;
-+ EVP_CIPHER_block_size;
-+ v3_asid_is_canonical;
-+ IPAddressChoice_free;
-+ EVP_CIPHER_CTX_set_app_data;
-+ BIO_set_callback_arg;
-+ v3_addr_add_prefix;
-+ IPAddressOrRange_it;
-+ BIO_set_flags;
-+ ASIdentifiers_it;
-+ v3_addr_get_range;
-+ BIO_method_type;
-+ v3_addr_inherits;
-+ IPAddressChoice_it;
-+ AES_ige_encrypt;
-+ v3_addr_add_range;
-+ EVP_CIPHER_CTX_nid;
-+ d2i_ASRange;
-+ v3_addr_add_inherit;
-+ v3_asid_add_id_or_range;
-+ v3_addr_validate_resource_set;
-+ EVP_CIPHER_iv_length;
-+ EVP_MD_type;
-+ v3_asid_canonize;
-+ IPAddressRange_free;
-+ v3_asid_add_inherit;
-+ EVP_CIPHER_CTX_key_length;
-+ IPAddressRange_new;
-+ ASIdOrRange_new;
-+ EVP_MD_size;
-+ EVP_MD_CTX_test_flags;
-+ BIO_clear_flags;
-+ i2d_ASRange;
-+ IPAddressRange_it;
-+ IPAddressChoice_new;
-+ ASIdentifierChoice_new;
-+ ASRange_free;
-+ EVP_MD_pkey_type;
-+ EVP_MD_CTX_clear_flags;
-+ IPAddressFamily_free;
-+ i2d_IPAddressFamily;
-+ IPAddressOrRange_new;
-+ EVP_CIPHER_flags;
-+ v3_asid_validate_resource_set;
-+ d2i_IPAddressRange;
-+ AES_bi_ige_encrypt;
-+ BIO_get_callback;
-+ IPAddressOrRange_free;
-+ v3_addr_subset;
-+ d2i_IPAddressFamily;
-+ v3_asid_subset;
-+ BIO_test_flags;
-+ i2d_ASIdentifierChoice;
-+ ASRange_it;
-+ d2i_ASIdentifiers;
-+ ASRange_new;
-+ d2i_IPAddressChoice;
-+ v3_addr_get_afi;
-+ EVP_CIPHER_key_length;
-+ EVP_Cipher;
-+ i2d_IPAddressOrRange;
-+ ASIdOrRange_it;
-+ EVP_CIPHER_nid;
-+ i2d_IPAddressChoice;
-+ EVP_CIPHER_CTX_block_size;
-+ ASIdentifiers_new;
-+ v3_addr_validate_path;
-+ IPAddressFamily_new;
-+ EVP_MD_CTX_set_flags;
-+ v3_addr_is_canonical;
-+ i2d_IPAddressRange;
-+ IPAddressFamily_it;
-+ v3_asid_inherits;
-+ EVP_CIPHER_CTX_cipher;
-+ EVP_CIPHER_CTX_get_app_data;
-+ EVP_MD_block_size;
-+ EVP_CIPHER_CTX_flags;
-+ v3_asid_validate_path;
-+ d2i_IPAddressOrRange;
-+ v3_addr_canonize;
-+ ASIdentifierChoice_it;
-+ EVP_MD_CTX_md;
-+ d2i_ASIdentifierChoice;
-+ BIO_method_name;
-+ EVP_CIPHER_CTX_iv_length;
-+ ASIdOrRange_free;
-+ ASIdentifierChoice_free;
-+ BIO_get_callback_arg;
-+ BIO_set_callback;
-+ d2i_ASIdOrRange;
-+ i2d_ASIdentifiers;
-+ SEED_decrypt;
-+ SEED_encrypt;
-+ SEED_cbc_encrypt;
-+ EVP_seed_ofb;
-+ SEED_cfb128_encrypt;
-+ SEED_ofb128_encrypt;
-+ EVP_seed_cbc;
-+ SEED_ecb_encrypt;
-+ EVP_seed_ecb;
-+ SEED_set_key;
-+ EVP_seed_cfb128;
-+ X509_EXTENSIONS_it;
-+ X509_get1_ocsp;
-+ OCSP_REQ_CTX_free;
-+ i2d_X509_EXTENSIONS;
-+ OCSP_sendreq_nbio;
-+ OCSP_sendreq_new;
-+ d2i_X509_EXTENSIONS;
-+ X509_ALGORS_it;
-+ X509_ALGOR_get0;
-+ X509_ALGOR_set0;
-+ AES_unwrap_key;
-+ AES_wrap_key;
-+ X509at_get0_data_by_OBJ;
-+ ASN1_TYPE_set1;
-+ ASN1_STRING_set0;
-+ i2d_X509_ALGORS;
-+ BIO_f_zlib;
-+ COMP_zlib_cleanup;
-+ d2i_X509_ALGORS;
-+ CMS_ReceiptRequest_free;
-+ PEM_write_CMS;
-+ CMS_add0_CertificateChoices;
-+ CMS_unsigned_add1_attr_by_OBJ;
-+ ERR_load_CMS_strings;
-+ CMS_sign_receipt;
-+ i2d_CMS_ContentInfo;
-+ CMS_signed_delete_attr;
-+ d2i_CMS_bio;
-+ CMS_unsigned_get_attr_by_NID;
-+ CMS_verify;
-+ SMIME_read_CMS;
-+ CMS_decrypt_set1_key;
-+ CMS_SignerInfo_get0_algs;
-+ CMS_add1_cert;
-+ CMS_set_detached;
-+ CMS_encrypt;
-+ CMS_EnvelopedData_create;
-+ CMS_uncompress;
-+ CMS_add0_crl;
-+ CMS_SignerInfo_verify_content;
-+ CMS_unsigned_get0_data_by_OBJ;
-+ PEM_write_bio_CMS;
-+ CMS_unsigned_get_attr;
-+ CMS_RecipientInfo_ktri_cert_cmp;
-+ CMS_RecipientInfo_ktri_get0_algs;
-+ CMS_RecipInfo_ktri_get0_algs;
-+ CMS_ContentInfo_free;
-+ CMS_final;
-+ CMS_add_simple_smimecap;
-+ CMS_SignerInfo_verify;
-+ CMS_data;
-+ CMS_ContentInfo_it;
-+ d2i_CMS_ReceiptRequest;
-+ CMS_compress;
-+ CMS_digest_create;
-+ CMS_SignerInfo_cert_cmp;
-+ CMS_SignerInfo_sign;
-+ CMS_data_create;
-+ i2d_CMS_bio;
-+ CMS_EncryptedData_set1_key;
-+ CMS_decrypt;
-+ int_smime_write_ASN1;
-+ CMS_unsigned_delete_attr;
-+ CMS_unsigned_get_attr_count;
-+ CMS_add_smimecap;
-+ PEM_read_CMS;
-+ CMS_signed_get_attr_by_OBJ;
-+ d2i_CMS_ContentInfo;
-+ CMS_add_standard_smimecap;
-+ CMS_ContentInfo_new;
-+ CMS_RecipientInfo_type;
-+ CMS_get0_type;
-+ CMS_is_detached;
-+ CMS_sign;
-+ CMS_signed_add1_attr;
-+ CMS_unsigned_get_attr_by_OBJ;
-+ SMIME_write_CMS;
-+ CMS_EncryptedData_decrypt;
-+ CMS_get0_RecipientInfos;
-+ CMS_add0_RevocationInfoChoice;
-+ CMS_decrypt_set1_pkey;
-+ CMS_SignerInfo_set1_signer_cert;
-+ CMS_get0_signers;
-+ CMS_ReceiptRequest_get0_values;
-+ CMS_signed_get0_data_by_OBJ;
-+ CMS_get0_SignerInfos;
-+ CMS_add0_cert;
-+ CMS_EncryptedData_encrypt;
-+ CMS_digest_verify;
-+ CMS_set1_signers_certs;
-+ CMS_signed_get_attr;
-+ CMS_RecipientInfo_set0_key;
-+ CMS_SignedData_init;
-+ CMS_RecipientInfo_kekri_get0_id;
-+ CMS_verify_receipt;
-+ CMS_ReceiptRequest_it;
-+ PEM_read_bio_CMS;
-+ CMS_get1_crls;
-+ CMS_add0_recipient_key;
-+ SMIME_read_ASN1;
-+ CMS_ReceiptRequest_new;
-+ CMS_get0_content;
-+ CMS_get1_ReceiptRequest;
-+ CMS_signed_add1_attr_by_OBJ;
-+ CMS_RecipientInfo_kekri_id_cmp;
-+ CMS_add1_ReceiptRequest;
-+ CMS_SignerInfo_get0_signer_id;
-+ CMS_unsigned_add1_attr_by_NID;
-+ CMS_unsigned_add1_attr;
-+ CMS_signed_get_attr_by_NID;
-+ CMS_get1_certs;
-+ CMS_signed_add1_attr_by_NID;
-+ CMS_unsigned_add1_attr_by_txt;
-+ CMS_dataFinal;
-+ CMS_RecipientInfo_ktri_get0_signer_id;
-+ CMS_RecipInfo_ktri_get0_sigr_id;
-+ i2d_CMS_ReceiptRequest;
-+ CMS_add1_recipient_cert;
-+ CMS_dataInit;
-+ CMS_signed_add1_attr_by_txt;
-+ CMS_RecipientInfo_decrypt;
-+ CMS_signed_get_attr_count;
-+ CMS_get0_eContentType;
-+ CMS_set1_eContentType;
-+ CMS_ReceiptRequest_create0;
-+ CMS_add1_signer;
-+ CMS_RecipientInfo_set0_pkey;
-+ ENGINE_set_load_ssl_client_cert_function;
-+ ENGINE_set_ld_ssl_clnt_cert_fn;
-+ ENGINE_get_ssl_client_cert_function;
-+ ENGINE_get_ssl_client_cert_fn;
-+ ENGINE_load_ssl_client_cert;
-+ ENGINE_load_capi;
-+ OPENSSL_isservice;
-+ FIPS_dsa_sig_decode;
-+ EVP_CIPHER_CTX_clear_flags;
-+ FIPS_rand_status;
-+ FIPS_rand_set_key;
-+ CRYPTO_set_mem_info_functions;
-+ RSA_X931_generate_key_ex;
-+ int_ERR_set_state_func;
-+ int_EVP_MD_set_engine_callbacks;
-+ int_CRYPTO_set_do_dynlock_callback;
-+ FIPS_rng_stick;
-+ EVP_CIPHER_CTX_set_flags;
-+ BN_X931_generate_prime_ex;
-+ FIPS_selftest_check;
-+ FIPS_rand_set_dt;
-+ CRYPTO_dbg_pop_info;
-+ FIPS_dsa_free;
-+ RSA_X931_derive_ex;
-+ FIPS_rsa_new;
-+ FIPS_rand_bytes;
-+ fips_cipher_test;
-+ EVP_CIPHER_CTX_test_flags;
-+ CRYPTO_malloc_debug_init;
-+ CRYPTO_dbg_push_info;
-+ FIPS_corrupt_rsa_keygen;
-+ FIPS_dh_new;
-+ FIPS_corrupt_dsa_keygen;
-+ FIPS_dh_free;
-+ fips_pkey_signature_test;
-+ EVP_add_alg_module;
-+ int_RAND_init_engine_callbacks;
-+ int_EVP_CIPHER_set_engine_callbacks;
-+ int_EVP_MD_init_engine_callbacks;
-+ FIPS_rand_test_mode;
-+ FIPS_rand_reset;
-+ FIPS_dsa_new;
-+ int_RAND_set_callbacks;
-+ BN_X931_derive_prime_ex;
-+ int_ERR_lib_init;
-+ int_EVP_CIPHER_init_engine_callbacks;
-+ FIPS_rsa_free;
-+ FIPS_dsa_sig_encode;
-+ CRYPTO_dbg_remove_all_info;
-+ OPENSSL_init;
-+ CRYPTO_strdup;
-+ JPAKE_STEP3A_process;
-+ JPAKE_STEP1_release;
-+ JPAKE_get_shared_key;
-+ JPAKE_STEP3B_init;
-+ JPAKE_STEP1_generate;
-+ JPAKE_STEP1_init;
-+ JPAKE_STEP3B_process;
-+ JPAKE_STEP2_generate;
-+ JPAKE_CTX_new;
-+ JPAKE_CTX_free;
-+ JPAKE_STEP3B_release;
-+ JPAKE_STEP3A_release;
-+ JPAKE_STEP2_process;
-+ JPAKE_STEP3B_generate;
-+ JPAKE_STEP1_process;
-+ JPAKE_STEP3A_generate;
-+ JPAKE_STEP2_release;
-+ JPAKE_STEP3A_init;
-+ ERR_load_JPAKE_strings;
-+ JPAKE_STEP2_init;
-+ pqueue_size;
-+ i2d_TS_ACCURACY;
-+ i2d_TS_MSG_IMPRINT_fp;
-+ i2d_TS_MSG_IMPRINT;
-+ EVP_PKEY_print_public;
-+ EVP_PKEY_CTX_new;
-+ i2d_TS_TST_INFO;
-+ EVP_PKEY_asn1_find;
-+ DSO_METHOD_beos;
-+ TS_CONF_load_cert;
-+ TS_REQ_get_ext;
-+ EVP_PKEY_sign_init;
-+ ASN1_item_print;
-+ TS_TST_INFO_set_nonce;
-+ TS_RESP_dup;
-+ ENGINE_register_pkey_meths;
-+ EVP_PKEY_asn1_add0;
-+ PKCS7_add0_attrib_signing_time;
-+ i2d_TS_TST_INFO_fp;
-+ BIO_asn1_get_prefix;
-+ TS_TST_INFO_set_time;
-+ EVP_PKEY_meth_set_decrypt;
-+ EVP_PKEY_set_type_str;
-+ EVP_PKEY_CTX_get_keygen_info;
-+ TS_REQ_set_policy_id;
-+ d2i_TS_RESP_fp;
-+ ENGINE_get_pkey_asn1_meth_engine;
-+ ENGINE_get_pkey_asn1_meth_eng;
-+ WHIRLPOOL_Init;
-+ TS_RESP_set_status_info;
-+ EVP_PKEY_keygen;
-+ EVP_DigestSignInit;
-+ TS_ACCURACY_set_millis;
-+ TS_REQ_dup;
-+ GENERAL_NAME_dup;
-+ ASN1_SEQUENCE_ANY_it;
-+ WHIRLPOOL;
-+ X509_STORE_get1_crls;
-+ ENGINE_get_pkey_asn1_meth;
-+ EVP_PKEY_asn1_new;
-+ BIO_new_NDEF;
-+ ENGINE_get_pkey_meth;
-+ TS_MSG_IMPRINT_set_algo;
-+ i2d_TS_TST_INFO_bio;
-+ TS_TST_INFO_set_ordering;
-+ TS_TST_INFO_get_ext_by_OBJ;
-+ CRYPTO_THREADID_set_pointer;
-+ TS_CONF_get_tsa_section;
-+ SMIME_write_ASN1;
-+ TS_RESP_CTX_set_signer_key;
-+ EVP_PKEY_encrypt_old;
-+ EVP_PKEY_encrypt_init;
-+ CRYPTO_THREADID_cpy;
-+ ASN1_PCTX_get_cert_flags;
-+ i2d_ESS_SIGNING_CERT;
-+ TS_CONF_load_key;
-+ i2d_ASN1_SEQUENCE_ANY;
-+ d2i_TS_MSG_IMPRINT_bio;
-+ EVP_PKEY_asn1_set_public;
-+ b2i_PublicKey_bio;
-+ BIO_asn1_set_prefix;
-+ EVP_PKEY_new_mac_key;
-+ BIO_new_CMS;
-+ CRYPTO_THREADID_cmp;
-+ TS_REQ_ext_free;
-+ EVP_PKEY_asn1_set_free;
-+ EVP_PKEY_get0_asn1;
-+ d2i_NETSCAPE_X509;
-+ EVP_PKEY_verify_recover_init;
-+ EVP_PKEY_CTX_set_data;
-+ EVP_PKEY_keygen_init;
-+ TS_RESP_CTX_set_status_info;
-+ TS_MSG_IMPRINT_get_algo;
-+ TS_REQ_print_bio;
-+ EVP_PKEY_CTX_ctrl_str;
-+ EVP_PKEY_get_default_digest_nid;
-+ PEM_write_bio_PKCS7_stream;
-+ TS_MSG_IMPRINT_print_bio;
-+ BN_asc2bn;
-+ TS_REQ_get_policy_id;
-+ ENGINE_set_default_pkey_asn1_meths;
-+ ENGINE_set_def_pkey_asn1_meths;
-+ d2i_TS_ACCURACY;
-+ DSO_global_lookup;
-+ TS_CONF_set_tsa_name;
-+ i2d_ASN1_SET_ANY;
-+ ENGINE_load_gost;
-+ WHIRLPOOL_BitUpdate;
-+ ASN1_PCTX_get_flags;
-+ TS_TST_INFO_get_ext_by_NID;
-+ TS_RESP_new;
-+ ESS_CERT_ID_dup;
-+ TS_STATUS_INFO_dup;
-+ TS_REQ_delete_ext;
-+ EVP_DigestVerifyFinal;
-+ EVP_PKEY_print_params;
-+ i2d_CMS_bio_stream;
-+ TS_REQ_get_msg_imprint;
-+ OBJ_find_sigid_by_algs;
-+ TS_TST_INFO_get_serial;
-+ TS_REQ_get_nonce;
-+ X509_PUBKEY_set0_param;
-+ EVP_PKEY_CTX_set0_keygen_info;
-+ DIST_POINT_set_dpname;
-+ i2d_ISSUING_DIST_POINT;
-+ ASN1_SET_ANY_it;
-+ EVP_PKEY_CTX_get_data;
-+ TS_STATUS_INFO_print_bio;
-+ EVP_PKEY_derive_init;
-+ d2i_TS_TST_INFO;
-+ EVP_PKEY_asn1_add_alias;
-+ d2i_TS_RESP_bio;
-+ OTHERNAME_cmp;
-+ GENERAL_NAME_set0_value;
-+ PKCS7_RECIP_INFO_get0_alg;
-+ TS_RESP_CTX_new;
-+ TS_RESP_set_tst_info;
-+ PKCS7_final;
-+ EVP_PKEY_base_id;
-+ TS_RESP_CTX_set_signer_cert;
-+ TS_REQ_set_msg_imprint;
-+ EVP_PKEY_CTX_ctrl;
-+ TS_CONF_set_digests;
-+ d2i_TS_MSG_IMPRINT;
-+ EVP_PKEY_meth_set_ctrl;
-+ TS_REQ_get_ext_by_NID;
-+ PKCS5_pbe_set0_algor;
-+ BN_BLINDING_thread_id;
-+ TS_ACCURACY_new;
-+ X509_CRL_METHOD_free;
-+ ASN1_PCTX_get_nm_flags;
-+ EVP_PKEY_meth_set_sign;
-+ CRYPTO_THREADID_current;
-+ EVP_PKEY_decrypt_init;
-+ NETSCAPE_X509_free;
-+ i2b_PVK_bio;
-+ EVP_PKEY_print_private;
-+ GENERAL_NAME_get0_value;
-+ b2i_PVK_bio;
-+ ASN1_UTCTIME_adj;
-+ TS_TST_INFO_new;
-+ EVP_MD_do_all_sorted;
-+ TS_CONF_set_default_engine;
-+ TS_ACCURACY_set_seconds;
-+ TS_TST_INFO_get_time;
-+ PKCS8_pkey_get0;
-+ EVP_PKEY_asn1_get0;
-+ OBJ_add_sigid;
-+ PKCS7_SIGNER_INFO_sign;
-+ EVP_PKEY_paramgen_init;
-+ EVP_PKEY_sign;
-+ OBJ_sigid_free;
-+ EVP_PKEY_meth_set_init;
-+ d2i_ESS_ISSUER_SERIAL;
-+ ISSUING_DIST_POINT_new;
-+ ASN1_TIME_adj;
-+ TS_OBJ_print_bio;
-+ EVP_PKEY_meth_set_verify_recover;
-+ EVP_PKEY_meth_set_vrfy_recover;
-+ TS_RESP_get_status_info;
-+ CMS_stream;
-+ EVP_PKEY_CTX_set_cb;
-+ PKCS7_to_TS_TST_INFO;
-+ ASN1_PCTX_get_oid_flags;
-+ TS_TST_INFO_add_ext;
-+ EVP_PKEY_meth_set_derive;
-+ i2d_TS_RESP_fp;
-+ i2d_TS_MSG_IMPRINT_bio;
-+ TS_RESP_CTX_set_accuracy;
-+ TS_REQ_set_nonce;
-+ ESS_CERT_ID_new;
-+ ENGINE_pkey_asn1_find_str;
-+ TS_REQ_get_ext_count;
-+ BUF_reverse;
-+ TS_TST_INFO_print_bio;
-+ d2i_ISSUING_DIST_POINT;
-+ ENGINE_get_pkey_meths;
-+ i2b_PrivateKey_bio;
-+ i2d_TS_RESP;
-+ b2i_PublicKey;
-+ TS_VERIFY_CTX_cleanup;
-+ TS_STATUS_INFO_free;
-+ TS_RESP_verify_token;
-+ OBJ_bsearch_ex_;
-+ ASN1_bn_print;
-+ EVP_PKEY_asn1_get_count;
-+ ENGINE_register_pkey_asn1_meths;
-+ ASN1_PCTX_set_nm_flags;
-+ EVP_DigestVerifyInit;
-+ ENGINE_set_default_pkey_meths;
-+ TS_TST_INFO_get_policy_id;
-+ TS_REQ_get_cert_req;
-+ X509_CRL_set_meth_data;
-+ PKCS8_pkey_set0;
-+ ASN1_STRING_copy;
-+ d2i_TS_TST_INFO_fp;
-+ X509_CRL_match;
-+ EVP_PKEY_asn1_set_private;
-+ TS_TST_INFO_get_ext_d2i;
-+ TS_RESP_CTX_add_policy;
-+ d2i_TS_RESP;
-+ TS_CONF_load_certs;
-+ TS_TST_INFO_get_msg_imprint;
-+ ERR_load_TS_strings;
-+ TS_TST_INFO_get_version;
-+ EVP_PKEY_CTX_dup;
-+ EVP_PKEY_meth_set_verify;
-+ i2b_PublicKey_bio;
-+ TS_CONF_set_certs;
-+ EVP_PKEY_asn1_get0_info;
-+ TS_VERIFY_CTX_free;
-+ TS_REQ_get_ext_by_critical;
-+ TS_RESP_CTX_set_serial_cb;
-+ X509_CRL_get_meth_data;
-+ TS_RESP_CTX_set_time_cb;
-+ TS_MSG_IMPRINT_get_msg;
-+ TS_TST_INFO_ext_free;
-+ TS_REQ_get_version;
-+ TS_REQ_add_ext;
-+ EVP_PKEY_CTX_set_app_data;
-+ OBJ_bsearch_;
-+ EVP_PKEY_meth_set_verifyctx;
-+ i2d_PKCS7_bio_stream;
-+ CRYPTO_THREADID_set_numeric;
-+ PKCS7_sign_add_signer;
-+ d2i_TS_TST_INFO_bio;
-+ TS_TST_INFO_get_ordering;
-+ TS_RESP_print_bio;
-+ TS_TST_INFO_get_exts;
-+ HMAC_CTX_copy;
-+ PKCS5_pbe2_set_iv;
-+ ENGINE_get_pkey_asn1_meths;
-+ b2i_PrivateKey;
-+ EVP_PKEY_CTX_get_app_data;
-+ TS_REQ_set_cert_req;
-+ CRYPTO_THREADID_set_callback;
-+ TS_CONF_set_serial;
-+ TS_TST_INFO_free;
-+ d2i_TS_REQ_fp;
-+ TS_RESP_verify_response;
-+ i2d_ESS_ISSUER_SERIAL;
-+ TS_ACCURACY_get_seconds;
-+ EVP_CIPHER_do_all;
-+ b2i_PrivateKey_bio;
-+ OCSP_CERTID_dup;
-+ X509_PUBKEY_get0_param;
-+ TS_MSG_IMPRINT_dup;
-+ PKCS7_print_ctx;
-+ i2d_TS_REQ_bio;
-+ EVP_whirlpool;
-+ EVP_PKEY_asn1_set_param;
-+ EVP_PKEY_meth_set_encrypt;
-+ ASN1_PCTX_set_flags;
-+ i2d_ESS_CERT_ID;
-+ TS_VERIFY_CTX_new;
-+ TS_RESP_CTX_set_extension_cb;
-+ ENGINE_register_all_pkey_meths;
-+ TS_RESP_CTX_set_status_info_cond;
-+ TS_RESP_CTX_set_stat_info_cond;
-+ EVP_PKEY_verify;
-+ WHIRLPOOL_Final;
-+ X509_CRL_METHOD_new;
-+ EVP_DigestSignFinal;
-+ TS_RESP_CTX_set_def_policy;
-+ NETSCAPE_X509_it;
-+ TS_RESP_create_response;
-+ PKCS7_SIGNER_INFO_get0_algs;
-+ TS_TST_INFO_get_nonce;
-+ EVP_PKEY_decrypt_old;
-+ TS_TST_INFO_set_policy_id;
-+ TS_CONF_set_ess_cert_id_chain;
-+ EVP_PKEY_CTX_get0_pkey;
-+ d2i_TS_REQ;
-+ EVP_PKEY_asn1_find_str;
-+ BIO_f_asn1;
-+ ESS_SIGNING_CERT_new;
-+ EVP_PBE_find;
-+ X509_CRL_get0_by_cert;
-+ EVP_PKEY_derive;
-+ i2d_TS_REQ;
-+ TS_TST_INFO_delete_ext;
-+ ESS_ISSUER_SERIAL_free;
-+ ASN1_PCTX_set_str_flags;
-+ ENGINE_get_pkey_asn1_meth_str;
-+ TS_CONF_set_signer_key;
-+ TS_ACCURACY_get_millis;
-+ TS_RESP_get_token;
-+ TS_ACCURACY_dup;
-+ ENGINE_register_all_pkey_asn1_meths;
-+ ENGINE_reg_all_pkey_asn1_meths;
-+ X509_CRL_set_default_method;
-+ CRYPTO_THREADID_hash;
-+ CMS_ContentInfo_print_ctx;
-+ TS_RESP_free;
-+ ISSUING_DIST_POINT_free;
-+ ESS_ISSUER_SERIAL_new;
-+ CMS_add1_crl;
-+ PKCS7_add1_attrib_digest;
-+ TS_RESP_CTX_add_md;
-+ TS_TST_INFO_dup;
-+ ENGINE_set_pkey_asn1_meths;
-+ PEM_write_bio_Parameters;
-+ TS_TST_INFO_get_accuracy;
-+ X509_CRL_get0_by_serial;
-+ TS_TST_INFO_set_version;
-+ TS_RESP_CTX_get_tst_info;
-+ TS_RESP_verify_signature;
-+ CRYPTO_THREADID_get_callback;
-+ TS_TST_INFO_get_tsa;
-+ TS_STATUS_INFO_new;
-+ EVP_PKEY_CTX_get_cb;
-+ TS_REQ_get_ext_d2i;
-+ GENERAL_NAME_set0_othername;
-+ TS_TST_INFO_get_ext_count;
-+ TS_RESP_CTX_get_request;
-+ i2d_NETSCAPE_X509;
-+ ENGINE_get_pkey_meth_engine;
-+ EVP_PKEY_meth_set_signctx;
-+ EVP_PKEY_asn1_copy;
-+ ASN1_TYPE_cmp;
-+ EVP_CIPHER_do_all_sorted;
-+ EVP_PKEY_CTX_free;
-+ ISSUING_DIST_POINT_it;
-+ d2i_TS_MSG_IMPRINT_fp;
-+ X509_STORE_get1_certs;
-+ EVP_PKEY_CTX_get_operation;
-+ d2i_ESS_SIGNING_CERT;
-+ TS_CONF_set_ordering;
-+ EVP_PBE_alg_add_type;
-+ TS_REQ_set_version;
-+ EVP_PKEY_get0;
-+ BIO_asn1_set_suffix;
-+ i2d_TS_STATUS_INFO;
-+ EVP_MD_do_all;
-+ TS_TST_INFO_set_accuracy;
-+ PKCS7_add_attrib_content_type;
-+ ERR_remove_thread_state;
-+ EVP_PKEY_meth_add0;
-+ TS_TST_INFO_set_tsa;
-+ EVP_PKEY_meth_new;
-+ WHIRLPOOL_Update;
-+ TS_CONF_set_accuracy;
-+ ASN1_PCTX_set_oid_flags;
-+ ESS_SIGNING_CERT_dup;
-+ d2i_TS_REQ_bio;
-+ X509_time_adj_ex;
-+ TS_RESP_CTX_add_flags;
-+ d2i_TS_STATUS_INFO;
-+ TS_MSG_IMPRINT_set_msg;
-+ BIO_asn1_get_suffix;
-+ TS_REQ_free;
-+ EVP_PKEY_meth_free;
-+ TS_REQ_get_exts;
-+ TS_RESP_CTX_set_clock_precision_digits;
-+ TS_RESP_CTX_set_clk_prec_digits;
-+ TS_RESP_CTX_add_failure_info;
-+ i2d_TS_RESP_bio;
-+ EVP_PKEY_CTX_get0_peerkey;
-+ PEM_write_bio_CMS_stream;
-+ TS_REQ_new;
-+ TS_MSG_IMPRINT_new;
-+ EVP_PKEY_meth_find;
-+ EVP_PKEY_id;
-+ TS_TST_INFO_set_serial;
-+ a2i_GENERAL_NAME;
-+ TS_CONF_set_crypto_device;
-+ EVP_PKEY_verify_init;
-+ TS_CONF_set_policies;
-+ ASN1_PCTX_new;
-+ ESS_CERT_ID_free;
-+ ENGINE_unregister_pkey_meths;
-+ TS_MSG_IMPRINT_free;
-+ TS_VERIFY_CTX_init;
-+ PKCS7_stream;
-+ TS_RESP_CTX_set_certs;
-+ TS_CONF_set_def_policy;
-+ ASN1_GENERALIZEDTIME_adj;
-+ NETSCAPE_X509_new;
-+ TS_ACCURACY_free;
-+ TS_RESP_get_tst_info;
-+ EVP_PKEY_derive_set_peer;
-+ PEM_read_bio_Parameters;
-+ TS_CONF_set_clock_precision_digits;
-+ TS_CONF_set_clk_prec_digits;
-+ ESS_ISSUER_SERIAL_dup;
-+ TS_ACCURACY_get_micros;
-+ ASN1_PCTX_get_str_flags;
-+ NAME_CONSTRAINTS_check;
-+ ASN1_BIT_STRING_check;
-+ X509_check_akid;
-+ ENGINE_unregister_pkey_asn1_meths;
-+ ENGINE_unreg_pkey_asn1_meths;
-+ ASN1_PCTX_free;
-+ PEM_write_bio_ASN1_stream;
-+ i2d_ASN1_bio_stream;
-+ TS_X509_ALGOR_print_bio;
-+ EVP_PKEY_meth_set_cleanup;
-+ EVP_PKEY_asn1_free;
-+ ESS_SIGNING_CERT_free;
-+ TS_TST_INFO_set_msg_imprint;
-+ GENERAL_NAME_cmp;
-+ d2i_ASN1_SET_ANY;
-+ ENGINE_set_pkey_meths;
-+ i2d_TS_REQ_fp;
-+ d2i_ASN1_SEQUENCE_ANY;
-+ GENERAL_NAME_get0_otherName;
-+ d2i_ESS_CERT_ID;
-+ OBJ_find_sigid_algs;
-+ EVP_PKEY_meth_set_keygen;
-+ PKCS5_PBKDF2_HMAC;
-+ EVP_PKEY_paramgen;
-+ EVP_PKEY_meth_set_paramgen;
-+ BIO_new_PKCS7;
-+ EVP_PKEY_verify_recover;
-+ TS_ext_print_bio;
-+ TS_ASN1_INTEGER_print_bio;
-+ check_defer;
-+ DSO_pathbyaddr;
-+ EVP_PKEY_set_type;
-+ TS_ACCURACY_set_micros;
-+ TS_REQ_to_TS_VERIFY_CTX;
-+ EVP_PKEY_meth_set_copy;
-+ ASN1_PCTX_set_cert_flags;
-+ TS_TST_INFO_get_ext;
-+ EVP_PKEY_asn1_set_ctrl;
-+ TS_TST_INFO_get_ext_by_critical;
-+ EVP_PKEY_CTX_new_id;
-+ TS_REQ_get_ext_by_OBJ;
-+ TS_CONF_set_signer_cert;
-+ X509_NAME_hash_old;
-+ ASN1_TIME_set_string;
-+ EVP_MD_flags;
-+ TS_RESP_CTX_free;
-+ DSAparams_dup;
-+ DHparams_dup;
-+ OCSP_REQ_CTX_add1_header;
-+ OCSP_REQ_CTX_set1_req;
-+ X509_STORE_set_verify_cb;
-+ X509_STORE_CTX_get0_current_crl;
-+ X509_STORE_CTX_get0_parent_ctx;
-+ X509_STORE_CTX_get0_current_issuer;
-+ X509_STORE_CTX_get0_cur_issuer;
-+ X509_issuer_name_hash_old;
-+ X509_subject_name_hash_old;
-+ EVP_CIPHER_CTX_copy;
-+ UI_method_get_prompt_constructor;
-+ UI_method_get_prompt_constructr;
-+ UI_method_set_prompt_constructor;
-+ UI_method_set_prompt_constructr;
-+ EVP_read_pw_string_min;
-+ CRYPTO_cts128_encrypt;
-+ CRYPTO_cts128_decrypt_block;
-+ CRYPTO_cfb128_1_encrypt;
-+ CRYPTO_cbc128_encrypt;
-+ CRYPTO_ctr128_encrypt;
-+ CRYPTO_ofb128_encrypt;
-+ CRYPTO_cts128_decrypt;
-+ CRYPTO_cts128_encrypt_block;
-+ CRYPTO_cbc128_decrypt;
-+ CRYPTO_cfb128_encrypt;
-+ CRYPTO_cfb128_8_encrypt;
-+
-+ local:
-+ *;
-+};
-+
-+
-+OPENSSL_1.0.1 {
-+ global:
-+ SSL_renegotiate_abbreviated;
-+ TLSv1_1_method;
-+ TLSv1_1_client_method;
-+ TLSv1_1_server_method;
-+ SSL_CTX_set_srp_client_pwd_callback;
-+ SSL_CTX_set_srp_client_pwd_cb;
-+ SSL_get_srp_g;
-+ SSL_CTX_set_srp_username_callback;
-+ SSL_CTX_set_srp_un_cb;
-+ SSL_get_srp_userinfo;
-+ SSL_set_srp_server_param;
-+ SSL_set_srp_server_param_pw;
-+ SSL_get_srp_N;
-+ SSL_get_srp_username;
-+ SSL_CTX_set_srp_password;
-+ SSL_CTX_set_srp_strength;
-+ SSL_CTX_set_srp_verify_param_callback;
-+ SSL_CTX_set_srp_vfy_param_cb;
-+ SSL_CTX_set_srp_cb_arg;
-+ SSL_CTX_set_srp_username;
-+ SSL_CTX_SRP_CTX_init;
-+ SSL_SRP_CTX_init;
-+ SRP_Calc_A_param;
-+ SRP_generate_server_master_secret;
-+ SRP_gen_server_master_secret;
-+ SSL_CTX_SRP_CTX_free;
-+ SRP_generate_client_master_secret;
-+ SRP_gen_client_master_secret;
-+ SSL_srp_server_param_with_username;
-+ SSL_srp_server_param_with_un;
-+ SSL_SRP_CTX_free;
-+ SSL_set_debug;
-+ SSL_SESSION_get0_peer;
-+ TLSv1_2_client_method;
-+ SSL_SESSION_set1_id_context;
-+ TLSv1_2_server_method;
-+ SSL_cache_hit;
-+ SSL_get0_kssl_ctx;
-+ SSL_set0_kssl_ctx;
-+ SSL_set_state;
-+ SSL_CIPHER_get_id;
-+ TLSv1_2_method;
-+ kssl_ctx_get0_client_princ;
-+ SSL_export_keying_material;
-+ SSL_set_tlsext_use_srtp;
-+ SSL_CTX_set_next_protos_advertised_cb;
-+ SSL_CTX_set_next_protos_adv_cb;
-+ SSL_get0_next_proto_negotiated;
-+ SSL_get_selected_srtp_profile;
-+ SSL_CTX_set_tlsext_use_srtp;
-+ SSL_select_next_proto;
-+ SSL_get_srtp_profiles;
-+ SSL_CTX_set_next_proto_select_cb;
-+ SSL_CTX_set_next_proto_sel_cb;
-+ SSL_SESSION_get_compress_id;
-+
-+ SRP_VBASE_get_by_user;
-+ SRP_Calc_server_key;
-+ SRP_create_verifier;
-+ SRP_create_verifier_BN;
-+ SRP_Calc_u;
-+ SRP_VBASE_free;
-+ SRP_Calc_client_key;
-+ SRP_get_default_gN;
-+ SRP_Calc_x;
-+ SRP_Calc_B;
-+ SRP_VBASE_new;
-+ SRP_check_known_gN_param;
-+ SRP_Calc_A;
-+ SRP_Verify_A_mod_N;
-+ SRP_VBASE_init;
-+ SRP_Verify_B_mod_N;
-+ EC_KEY_set_public_key_affine_coordinates;
-+ EC_KEY_set_pub_key_aff_coords;
-+ EVP_aes_192_ctr;
-+ EVP_PKEY_meth_get0_info;
-+ EVP_PKEY_meth_copy;
-+ ERR_add_error_vdata;
-+ EVP_aes_128_ctr;
-+ EVP_aes_256_ctr;
-+ EC_GFp_nistp224_method;
-+ EC_KEY_get_flags;
-+ RSA_padding_add_PKCS1_PSS_mgf1;
-+ EVP_aes_128_xts;
-+ EVP_aes_256_xts;
-+ EVP_aes_128_gcm;
-+ EC_KEY_clear_flags;
-+ EC_KEY_set_flags;
-+ EVP_aes_256_ccm;
-+ RSA_verify_PKCS1_PSS_mgf1;
-+ EVP_aes_128_ccm;
-+ EVP_aes_192_gcm;
-+ X509_ALGOR_set_md;
-+ RAND_init_fips;
-+ EVP_aes_256_gcm;
-+ EVP_aes_192_ccm;
-+ CMAC_CTX_copy;
-+ CMAC_CTX_free;
-+ CMAC_CTX_get0_cipher_ctx;
-+ CMAC_CTX_cleanup;
-+ CMAC_Init;
-+ CMAC_Update;
-+ CMAC_resume;
-+ CMAC_CTX_new;
-+ CMAC_Final;
-+ CRYPTO_ctr128_encrypt_ctr32;
-+ CRYPTO_gcm128_release;
-+ CRYPTO_ccm128_decrypt_ccm64;
-+ CRYPTO_ccm128_encrypt;
-+ CRYPTO_gcm128_encrypt;
-+ CRYPTO_xts128_encrypt;
-+ EVP_rc4_hmac_md5;
-+ CRYPTO_nistcts128_decrypt_block;
-+ CRYPTO_gcm128_setiv;
-+ CRYPTO_nistcts128_encrypt;
-+ EVP_aes_128_cbc_hmac_sha1;
-+ CRYPTO_gcm128_tag;
-+ CRYPTO_ccm128_encrypt_ccm64;
-+ ENGINE_load_rdrand;
-+ CRYPTO_ccm128_setiv;
-+ CRYPTO_nistcts128_encrypt_block;
-+ CRYPTO_gcm128_aad;
-+ CRYPTO_ccm128_init;
-+ CRYPTO_nistcts128_decrypt;
-+ CRYPTO_gcm128_new;
-+ CRYPTO_ccm128_tag;
-+ CRYPTO_ccm128_decrypt;
-+ CRYPTO_ccm128_aad;
-+ CRYPTO_gcm128_init;
-+ CRYPTO_gcm128_decrypt;
-+ ENGINE_load_rsax;
-+ CRYPTO_gcm128_decrypt_ctr32;
-+ CRYPTO_gcm128_encrypt_ctr32;
-+ CRYPTO_gcm128_finish;
-+ EVP_aes_256_cbc_hmac_sha1;
-+ PKCS5_pbkdf2_set;
-+ CMS_add0_recipient_password;
-+ CMS_decrypt_set1_password;
-+ CMS_RecipientInfo_set0_password;
-+ RAND_set_fips_drbg_type;
-+ X509_REQ_sign_ctx;
-+ RSA_PSS_PARAMS_new;
-+ X509_CRL_sign_ctx;
-+ X509_signature_dump;
-+ d2i_RSA_PSS_PARAMS;
-+ RSA_PSS_PARAMS_it;
-+ RSA_PSS_PARAMS_free;
-+ X509_sign_ctx;
-+ i2d_RSA_PSS_PARAMS;
-+ ASN1_item_sign_ctx;
-+ EC_GFp_nistp521_method;
-+ EC_GFp_nistp256_method;
-+ OPENSSL_stderr;
-+ OPENSSL_cpuid_setup;
-+ OPENSSL_showfatal;
-+ BIO_new_dgram_sctp;
-+ BIO_dgram_sctp_msg_waiting;
-+ BIO_dgram_sctp_wait_for_dry;
-+ BIO_s_datagram_sctp;
-+ BIO_dgram_is_sctp;
-+ BIO_dgram_sctp_notification_cb;
-+} OPENSSL_1.0.0;
-+
-+OPENSSL_1.0.1d {
-+ global:
-+ CRYPTO_memcmp;
-+} OPENSSL_1.0.1;
-+
-+OPENSSL_1.0.2 {
-+ global:
-+ SSL_CTX_set_alpn_protos;
-+ SSL_set_alpn_protos;
-+ SSL_CTX_set_alpn_select_cb;
-+ SSL_get0_alpn_selected;
-+ SSL_CTX_set_custom_cli_ext;
-+ SSL_CTX_set_custom_srv_ext;
-+ SSL_CTX_set_srv_supp_data;
-+ SSL_CTX_set_cli_supp_data;
-+ SSL_set_cert_cb;
-+ SSL_CTX_use_serverinfo;
-+ SSL_CTX_use_serverinfo_file;
-+ SSL_CTX_set_cert_cb;
-+ SSL_CTX_get0_param;
-+ SSL_get0_param;
-+ SSL_certs_clear;
-+ DTLSv1_2_method;
-+ DTLSv1_2_server_method;
-+ DTLSv1_2_client_method;
-+ DTLS_method;
-+ DTLS_server_method;
-+ DTLS_client_method;
-+ SSL_CTX_get_ssl_method;
-+ SSL_CTX_get0_certificate;
-+ SSL_CTX_get0_privatekey;
-+ SSL_COMP_set0_compression_methods;
-+ SSL_COMP_free_compression_methods;
-+ SSL_CIPHER_find;
-+ SSL_is_server;
-+ SSL_CONF_CTX_new;
-+ SSL_CONF_CTX_finish;
-+ SSL_CONF_CTX_free;
-+ SSL_CONF_CTX_set_flags;
-+ SSL_CONF_CTX_clear_flags;
-+ SSL_CONF_CTX_set1_prefix;
-+ SSL_CONF_CTX_set_ssl;
-+ SSL_CONF_CTX_set_ssl_ctx;
-+ SSL_CONF_cmd;
-+ SSL_CONF_cmd_argv;
-+ SSL_CONF_cmd_value_type;
-+ SSL_trace;
-+ SSL_CIPHER_standard_name;
-+ SSL_get_tlsa_record_byname;
-+ ASN1_TIME_diff;
-+ BIO_hex_string;
-+ CMS_RecipientInfo_get0_pkey_ctx;
-+ CMS_RecipientInfo_encrypt;
-+ CMS_SignerInfo_get0_pkey_ctx;
-+ CMS_SignerInfo_get0_md_ctx;
-+ CMS_SignerInfo_get0_signature;
-+ CMS_RecipientInfo_kari_get0_alg;
-+ CMS_RecipientInfo_kari_get0_reks;
-+ CMS_RecipientInfo_kari_get0_orig_id;
-+ CMS_RecipientInfo_kari_orig_id_cmp;
-+ CMS_RecipientEncryptedKey_get0_id;
-+ CMS_RecipientEncryptedKey_cert_cmp;
-+ CMS_RecipientInfo_kari_set0_pkey;
-+ CMS_RecipientInfo_kari_get0_ctx;
-+ CMS_RecipientInfo_kari_decrypt;
-+ CMS_SharedInfo_encode;
-+ DH_compute_key_padded;
-+ d2i_DHxparams;
-+ i2d_DHxparams;
-+ DH_get_1024_160;
-+ DH_get_2048_224;
-+ DH_get_2048_256;
-+ DH_KDF_X9_42;
-+ ECDH_KDF_X9_62;
-+ ECDSA_METHOD_new;
-+ ECDSA_METHOD_free;
-+ ECDSA_METHOD_set_app_data;
-+ ECDSA_METHOD_get_app_data;
-+ ECDSA_METHOD_set_sign;
-+ ECDSA_METHOD_set_sign_setup;
-+ ECDSA_METHOD_set_verify;
-+ ECDSA_METHOD_set_flags;
-+ ECDSA_METHOD_set_name;
-+ EVP_des_ede3_wrap;
-+ EVP_aes_128_wrap;
-+ EVP_aes_192_wrap;
-+ EVP_aes_256_wrap;
-+ EVP_aes_128_cbc_hmac_sha256;
-+ EVP_aes_256_cbc_hmac_sha256;
-+ CRYPTO_128_wrap;
-+ CRYPTO_128_unwrap;
-+ OCSP_REQ_CTX_nbio;
-+ OCSP_REQ_CTX_new;
-+ OCSP_set_max_response_length;
-+ OCSP_REQ_CTX_i2d;
-+ OCSP_REQ_CTX_nbio_d2i;
-+ OCSP_REQ_CTX_get0_mem_bio;
-+ OCSP_REQ_CTX_http;
-+ RSA_padding_add_PKCS1_OAEP_mgf1;
-+ RSA_padding_check_PKCS1_OAEP_mgf1;
-+ RSA_OAEP_PARAMS_free;
-+ RSA_OAEP_PARAMS_it;
-+ RSA_OAEP_PARAMS_new;
-+ SSL_get_sigalgs;
-+ SSL_get_shared_sigalgs;
-+ SSL_check_chain;
-+ X509_chain_up_ref;
-+ X509_http_nbio;
-+ X509_CRL_http_nbio;
-+ X509_REVOKED_dup;
-+ i2d_re_X509_tbs;
-+ X509_get0_signature;
-+ X509_get_signature_nid;
-+ X509_CRL_diff;
-+ X509_chain_check_suiteb;
-+ X509_CRL_check_suiteb;
-+ X509_check_host;
-+ X509_check_email;
-+ X509_check_ip;
-+ X509_check_ip_asc;
-+ X509_STORE_set_lookup_crls_cb;
-+ X509_STORE_CTX_get0_store;
-+ X509_VERIFY_PARAM_set1_host;
-+ X509_VERIFY_PARAM_add1_host;
-+ X509_VERIFY_PARAM_set_hostflags;
-+ X509_VERIFY_PARAM_get0_peername;
-+ X509_VERIFY_PARAM_set1_email;
-+ X509_VERIFY_PARAM_set1_ip;
-+ X509_VERIFY_PARAM_set1_ip_asc;
-+ X509_VERIFY_PARAM_get0_name;
-+ X509_VERIFY_PARAM_get_count;
-+ X509_VERIFY_PARAM_get0;
-+ X509V3_EXT_free;
-+ EC_GROUP_get_mont_data;
-+ EC_curve_nid2nist;
-+ EC_curve_nist2nid;
-+ PEM_write_bio_DHxparams;
-+ PEM_write_DHxparams;
-+ SSL_CTX_add_client_custom_ext;
-+ SSL_CTX_add_server_custom_ext;
-+ SSL_extension_supported;
-+ BUF_strnlen;
-+ sk_deep_copy;
-+ SSL_test_functions;
-+} OPENSSL_1.0.1d;
-+
-Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/openssl.ld 2014-02-24 21:02:30.000000000 +0100
-@@ -0,0 +1,10 @@
-+OPENSSL_1.0.0 {
-+ global:
-+ bind_engine;
-+ v_check;
-+ OPENSSL_init;
-+ OPENSSL_finish;
-+ local:
-+ *;
-+};
-+
-Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/ccgost/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/ccgost/openssl.ld 2014-02-24 21:02:30.000000000 +0100
-@@ -0,0 +1,10 @@
-+OPENSSL_1.0.0 {
-+ global:
-+ bind_engine;
-+ v_check;
-+ OPENSSL_init;
-+ OPENSSL_finish;
-+ local:
-+ *;
-+};
-+
diff --git a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_digicert_malaysia.patch b/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_digicert_malaysia.patch
deleted file mode 100644
index c43bcd1c77..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_digicert_malaysia.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Raphael Geissert <geissert@debian.org>
-Description: make X509_verify_cert indicate that any certificate whose
- name contains "Digicert Sdn. Bhd." (from Malaysia) is revoked.
-Forwarded: not-needed
-Origin: vendor
-Last-Update: 2011-11-05
-
-Upstream-Status: Backport [debian]
-
-
-Index: openssl-1.0.2~beta1/crypto/x509/x509_vfy.c
-===================================================================
---- openssl-1.0.2~beta1.orig/crypto/x509/x509_vfy.c 2014-02-25 00:16:12.488028844 +0100
-+++ openssl-1.0.2~beta1/crypto/x509/x509_vfy.c 2014-02-25 00:16:12.484028929 +0100
-@@ -964,10 +964,11 @@
- for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
- {
- x = sk_X509_value(ctx->chain, i);
-- /* Mark DigiNotar certificates as revoked, no matter
-- * where in the chain they are.
-+ /* Mark certificates containing the following names as
-+ * revoked, no matter where in the chain they are.
- */
-- if (x->name && strstr(x->name, "DigiNotar"))
-+ if (x->name && (strstr(x->name, "DigiNotar") ||
-+ strstr(x->name, "Digicert Sdn. Bhd.")))
- {
- ctx->error = X509_V_ERR_CERT_REVOKED;
- ctx->error_depth = i;
diff --git a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch b/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
deleted file mode 100644
index d81e22cd8d..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From: Raphael Geissert <geissert@debian.org>
-Description: make X509_verify_cert indicate that any certificate whose
- name contains "DigiNotar" is revoked.
-Forwarded: not-needed
-Origin: vendor
-Last-Update: 2011-09-08
-Bug: http://bugs.debian.org/639744
-Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
-Reviewed-by: Dr Stephen N Henson <shenson@drh-consultancy.co.uk>
-
-This is not meant as final patch.
-
-Upstream-Status: Backport [debian]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: openssl-1.0.2g/crypto/x509/x509_vfy.c
-===================================================================
---- openssl-1.0.2g.orig/crypto/x509/x509_vfy.c
-+++ openssl-1.0.2g/crypto/x509/x509_vfy.c
-@@ -119,6 +119,7 @@ static int check_trust(X509_STORE_CTX *c
- static int check_revocation(X509_STORE_CTX *ctx);
- static int check_cert(X509_STORE_CTX *ctx);
- static int check_policy(X509_STORE_CTX *ctx);
-+static int check_ca_blacklist(X509_STORE_CTX *ctx);
-
- static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer,
- unsigned int *preasons, X509_CRL *crl, X509 *x);
-@@ -489,6 +490,9 @@ int X509_verify_cert(X509_STORE_CTX *ctx
- if (!ok)
- goto err;
-
-+ ok = check_ca_blacklist(ctx);
-+ if(!ok) goto err;
-+
- #ifndef OPENSSL_NO_RFC3779
- /* RFC 3779 path validation, now that CRL check has been done */
- ok = v3_asid_validate_path(ctx);
-@@ -996,6 +1000,29 @@ static int check_crl_time(X509_STORE_CTX
- return 1;
- }
-
-+static int check_ca_blacklist(X509_STORE_CTX *ctx)
-+ {
-+ X509 *x;
-+ int i;
-+ /* Check all certificates against the blacklist */
-+ for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
-+ {
-+ x = sk_X509_value(ctx->chain, i);
-+ /* Mark DigiNotar certificates as revoked, no matter
-+ * where in the chain they are.
-+ */
-+ if (x->name && strstr(x->name, "DigiNotar"))
-+ {
-+ ctx->error = X509_V_ERR_CERT_REVOKED;
-+ ctx->error_depth = i;
-+ ctx->current_cert = x;
-+ if (!ctx->verify_cb(0,ctx))
-+ return 0;
-+ }
-+ }
-+ return 1;
-+ }
-+
- static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl,
- X509 **pissuer, int *pscore, unsigned int *preasons,
- STACK_OF(X509_CRL) *crls)
diff --git a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch b/meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch
deleted file mode 100644
index 29f11a288e..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch
+++ /dev/null
@@ -1,4656 +0,0 @@
-Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/Configure
-===================================================================
---- openssl-1.0.2~beta1.obsolete.0.0498436515490575.orig/Configure 2014-02-24 21:02:30.000000000 +0100
-+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/Configure 2014-02-24 21:02:30.000000000 +0100
-@@ -1651,6 +1651,8 @@
- }
- }
-
-+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
-+
- open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
- unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
- open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
-Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld 2014-02-24 22:19:08.601827266 +0100
-@@ -0,0 +1,4608 @@
-+OPENSSL_1.0.2d {
-+ global:
-+ BIO_f_ssl;
-+ BIO_new_buffer_ssl_connect;
-+ BIO_new_ssl;
-+ BIO_new_ssl_connect;
-+ BIO_proxy_ssl_copy_session_id;
-+ BIO_ssl_copy_session_id;
-+ BIO_ssl_shutdown;
-+ d2i_SSL_SESSION;
-+ DTLSv1_client_method;
-+ DTLSv1_method;
-+ DTLSv1_server_method;
-+ ERR_load_SSL_strings;
-+ i2d_SSL_SESSION;
-+ kssl_build_principal_2;
-+ kssl_cget_tkt;
-+ kssl_check_authent;
-+ kssl_ctx_free;
-+ kssl_ctx_new;
-+ kssl_ctx_setkey;
-+ kssl_ctx_setprinc;
-+ kssl_ctx_setstring;
-+ kssl_ctx_show;
-+ kssl_err_set;
-+ kssl_krb5_free_data_contents;
-+ kssl_sget_tkt;
-+ kssl_skip_confound;
-+ kssl_validate_times;
-+ PEM_read_bio_SSL_SESSION;
-+ PEM_read_SSL_SESSION;
-+ PEM_write_bio_SSL_SESSION;
-+ PEM_write_SSL_SESSION;
-+ SSL_accept;
-+ SSL_add_client_CA;
-+ SSL_add_dir_cert_subjects_to_stack;
-+ SSL_add_dir_cert_subjs_to_stk;
-+ SSL_add_file_cert_subjects_to_stack;
-+ SSL_add_file_cert_subjs_to_stk;
-+ SSL_alert_desc_string;
-+ SSL_alert_desc_string_long;
-+ SSL_alert_type_string;
-+ SSL_alert_type_string_long;
-+ SSL_callback_ctrl;
-+ SSL_check_private_key;
-+ SSL_CIPHER_description;
-+ SSL_CIPHER_get_bits;
-+ SSL_CIPHER_get_name;
-+ SSL_CIPHER_get_version;
-+ SSL_clear;
-+ SSL_COMP_add_compression_method;
-+ SSL_COMP_get_compression_methods;
-+ SSL_COMP_get_compress_methods;
-+ SSL_COMP_get_name;
-+ SSL_connect;
-+ SSL_copy_session_id;
-+ SSL_ctrl;
-+ SSL_CTX_add_client_CA;
-+ SSL_CTX_add_session;
-+ SSL_CTX_callback_ctrl;
-+ SSL_CTX_check_private_key;
-+ SSL_CTX_ctrl;
-+ SSL_CTX_flush_sessions;
-+ SSL_CTX_free;
-+ SSL_CTX_get_cert_store;
-+ SSL_CTX_get_client_CA_list;
-+ SSL_CTX_get_client_cert_cb;
-+ SSL_CTX_get_ex_data;
-+ SSL_CTX_get_ex_new_index;
-+ SSL_CTX_get_info_callback;
-+ SSL_CTX_get_quiet_shutdown;
-+ SSL_CTX_get_timeout;
-+ SSL_CTX_get_verify_callback;
-+ SSL_CTX_get_verify_depth;
-+ SSL_CTX_get_verify_mode;
-+ SSL_CTX_load_verify_locations;
-+ SSL_CTX_new;
-+ SSL_CTX_remove_session;
-+ SSL_CTX_sess_get_get_cb;
-+ SSL_CTX_sess_get_new_cb;
-+ SSL_CTX_sess_get_remove_cb;
-+ SSL_CTX_sessions;
-+ SSL_CTX_sess_set_get_cb;
-+ SSL_CTX_sess_set_new_cb;
-+ SSL_CTX_sess_set_remove_cb;
-+ SSL_CTX_set1_param;
-+ SSL_CTX_set_cert_store;
-+ SSL_CTX_set_cert_verify_callback;
-+ SSL_CTX_set_cert_verify_cb;
-+ SSL_CTX_set_cipher_list;
-+ SSL_CTX_set_client_CA_list;
-+ SSL_CTX_set_client_cert_cb;
-+ SSL_CTX_set_client_cert_engine;
-+ SSL_CTX_set_cookie_generate_cb;
-+ SSL_CTX_set_cookie_verify_cb;
-+ SSL_CTX_set_default_passwd_cb;
-+ SSL_CTX_set_default_passwd_cb_userdata;
-+ SSL_CTX_set_default_verify_paths;
-+ SSL_CTX_set_def_passwd_cb_ud;
-+ SSL_CTX_set_def_verify_paths;
-+ SSL_CTX_set_ex_data;
-+ SSL_CTX_set_generate_session_id;
-+ SSL_CTX_set_info_callback;
-+ SSL_CTX_set_msg_callback;
-+ SSL_CTX_set_psk_client_callback;
-+ SSL_CTX_set_psk_server_callback;
-+ SSL_CTX_set_purpose;
-+ SSL_CTX_set_quiet_shutdown;
-+ SSL_CTX_set_session_id_context;
-+ SSL_CTX_set_ssl_version;
-+ SSL_CTX_set_timeout;
-+ SSL_CTX_set_tmp_dh_callback;
-+ SSL_CTX_set_tmp_ecdh_callback;
-+ SSL_CTX_set_tmp_rsa_callback;
-+ SSL_CTX_set_trust;
-+ SSL_CTX_set_verify;
-+ SSL_CTX_set_verify_depth;
-+ SSL_CTX_use_cert_chain_file;
-+ SSL_CTX_use_certificate;
-+ SSL_CTX_use_certificate_ASN1;
-+ SSL_CTX_use_certificate_chain_file;
-+ SSL_CTX_use_certificate_file;
-+ SSL_CTX_use_PrivateKey;
-+ SSL_CTX_use_PrivateKey_ASN1;
-+ SSL_CTX_use_PrivateKey_file;
-+ SSL_CTX_use_psk_identity_hint;
-+ SSL_CTX_use_RSAPrivateKey;
-+ SSL_CTX_use_RSAPrivateKey_ASN1;
-+ SSL_CTX_use_RSAPrivateKey_file;
-+ SSL_do_handshake;
-+ SSL_dup;
-+ SSL_dup_CA_list;
-+ SSLeay_add_ssl_algorithms;
-+ SSL_free;
-+ SSL_get1_session;
-+ SSL_get_certificate;
-+ SSL_get_cipher_list;
-+ SSL_get_ciphers;
-+ SSL_get_client_CA_list;
-+ SSL_get_current_cipher;
-+ SSL_get_current_compression;
-+ SSL_get_current_expansion;
-+ SSL_get_default_timeout;
-+ SSL_get_error;
-+ SSL_get_ex_data;
-+ SSL_get_ex_data_X509_STORE_CTX_idx;
-+ SSL_get_ex_d_X509_STORE_CTX_idx;
-+ SSL_get_ex_new_index;
-+ SSL_get_fd;
-+ SSL_get_finished;
-+ SSL_get_info_callback;
-+ SSL_get_peer_cert_chain;
-+ SSL_get_peer_certificate;
-+ SSL_get_peer_finished;
-+ SSL_get_privatekey;
-+ SSL_get_psk_identity;
-+ SSL_get_psk_identity_hint;
-+ SSL_get_quiet_shutdown;
-+ SSL_get_rbio;
-+ SSL_get_read_ahead;
-+ SSL_get_rfd;
-+ SSL_get_servername;
-+ SSL_get_servername_type;
-+ SSL_get_session;
-+ SSL_get_shared_ciphers;
-+ SSL_get_shutdown;
-+ SSL_get_SSL_CTX;
-+ SSL_get_ssl_method;
-+ SSL_get_verify_callback;
-+ SSL_get_verify_depth;
-+ SSL_get_verify_mode;
-+ SSL_get_verify_result;
-+ SSL_get_version;
-+ SSL_get_wbio;
-+ SSL_get_wfd;
-+ SSL_has_matching_session_id;
-+ SSL_library_init;
-+ SSL_load_client_CA_file;
-+ SSL_load_error_strings;
-+ SSL_new;
-+ SSL_peek;
-+ SSL_pending;
-+ SSL_read;
-+ SSL_renegotiate;
-+ SSL_renegotiate_pending;
-+ SSL_rstate_string;
-+ SSL_rstate_string_long;
-+ SSL_SESSION_cmp;
-+ SSL_SESSION_free;
-+ SSL_SESSION_get_ex_data;
-+ SSL_SESSION_get_ex_new_index;
-+ SSL_SESSION_get_id;
-+ SSL_SESSION_get_time;
-+ SSL_SESSION_get_timeout;
-+ SSL_SESSION_hash;
-+ SSL_SESSION_new;
-+ SSL_SESSION_print;
-+ SSL_SESSION_print_fp;
-+ SSL_SESSION_set_ex_data;
-+ SSL_SESSION_set_time;
-+ SSL_SESSION_set_timeout;
-+ SSL_set1_param;
-+ SSL_set_accept_state;
-+ SSL_set_bio;
-+ SSL_set_cipher_list;
-+ SSL_set_client_CA_list;
-+ SSL_set_connect_state;
-+ SSL_set_ex_data;
-+ SSL_set_fd;
-+ SSL_set_generate_session_id;
-+ SSL_set_info_callback;
-+ SSL_set_msg_callback;
-+ SSL_set_psk_client_callback;
-+ SSL_set_psk_server_callback;
-+ SSL_set_purpose;
-+ SSL_set_quiet_shutdown;
-+ SSL_set_read_ahead;
-+ SSL_set_rfd;
-+ SSL_set_session;
-+ SSL_set_session_id_context;
-+ SSL_set_session_secret_cb;
-+ SSL_set_session_ticket_ext;
-+ SSL_set_session_ticket_ext_cb;
-+ SSL_set_shutdown;
-+ SSL_set_SSL_CTX;
-+ SSL_set_ssl_method;
-+ SSL_set_tmp_dh_callback;
-+ SSL_set_tmp_ecdh_callback;
-+ SSL_set_tmp_rsa_callback;
-+ SSL_set_trust;
-+ SSL_set_verify;
-+ SSL_set_verify_depth;
-+ SSL_set_verify_result;
-+ SSL_set_wfd;
-+ SSL_shutdown;
-+ SSL_state;
-+ SSL_state_string;
-+ SSL_state_string_long;
-+ SSL_use_certificate;
-+ SSL_use_certificate_ASN1;
-+ SSL_use_certificate_file;
-+ SSL_use_PrivateKey;
-+ SSL_use_PrivateKey_ASN1;
-+ SSL_use_PrivateKey_file;
-+ SSL_use_psk_identity_hint;
-+ SSL_use_RSAPrivateKey;
-+ SSL_use_RSAPrivateKey_ASN1;
-+ SSL_use_RSAPrivateKey_file;
-+ SSLv23_client_method;
-+ SSLv23_method;
-+ SSLv23_server_method;
-+ SSLv2_client_method;
-+ SSLv2_method;
-+ SSLv2_server_method;
-+ SSLv3_client_method;
-+ SSLv3_method;
-+ SSLv3_server_method;
-+ SSL_version;
-+ SSL_want;
-+ SSL_write;
-+ TLSv1_client_method;
-+ TLSv1_method;
-+ TLSv1_server_method;
-+
-+
-+ SSLeay;
-+ SSLeay_version;
-+ ASN1_BIT_STRING_asn1_meth;
-+ ASN1_HEADER_free;
-+ ASN1_HEADER_new;
-+ ASN1_IA5STRING_asn1_meth;
-+ ASN1_INTEGER_get;
-+ ASN1_INTEGER_set;
-+ ASN1_INTEGER_to_BN;
-+ ASN1_OBJECT_create;
-+ ASN1_OBJECT_free;
-+ ASN1_OBJECT_new;
-+ ASN1_PRINTABLE_type;
-+ ASN1_STRING_cmp;
-+ ASN1_STRING_dup;
-+ ASN1_STRING_free;
-+ ASN1_STRING_new;
-+ ASN1_STRING_print;
-+ ASN1_STRING_set;
-+ ASN1_STRING_type_new;
-+ ASN1_TYPE_free;
-+ ASN1_TYPE_new;
-+ ASN1_UNIVERSALSTRING_to_string;
-+ ASN1_UTCTIME_check;
-+ ASN1_UTCTIME_print;
-+ ASN1_UTCTIME_set;
-+ ASN1_check_infinite_end;
-+ ASN1_d2i_bio;
-+ ASN1_d2i_fp;
-+ ASN1_digest;
-+ ASN1_dup;
-+ ASN1_get_object;
-+ ASN1_i2d_bio;
-+ ASN1_i2d_fp;
-+ ASN1_object_size;
-+ ASN1_parse;
-+ ASN1_put_object;
-+ ASN1_sign;
-+ ASN1_verify;
-+ BF_cbc_encrypt;
-+ BF_cfb64_encrypt;
-+ BF_ecb_encrypt;
-+ BF_encrypt;
-+ BF_ofb64_encrypt;
-+ BF_options;
-+ BF_set_key;
-+ BIO_CONNECT_free;
-+ BIO_CONNECT_new;
-+ BIO_accept;
-+ BIO_ctrl;
-+ BIO_int_ctrl;
-+ BIO_debug_callback;
-+ BIO_dump;
-+ BIO_dup_chain;
-+ BIO_f_base64;
-+ BIO_f_buffer;
-+ BIO_f_cipher;
-+ BIO_f_md;
-+ BIO_f_null;
-+ BIO_f_proxy_server;
-+ BIO_fd_non_fatal_error;
-+ BIO_fd_should_retry;
-+ BIO_find_type;
-+ BIO_free;
-+ BIO_free_all;
-+ BIO_get_accept_socket;
-+ BIO_get_filter_bio;
-+ BIO_get_host_ip;
-+ BIO_get_port;
-+ BIO_get_retry_BIO;
-+ BIO_get_retry_reason;
-+ BIO_gethostbyname;
-+ BIO_gets;
-+ BIO_new;
-+ BIO_new_accept;
-+ BIO_new_connect;
-+ BIO_new_fd;
-+ BIO_new_file;
-+ BIO_new_fp;
-+ BIO_new_socket;
-+ BIO_pop;
-+ BIO_printf;
-+ BIO_push;
-+ BIO_puts;
-+ BIO_read;
-+ BIO_s_accept;
-+ BIO_s_connect;
-+ BIO_s_fd;
-+ BIO_s_file;
-+ BIO_s_mem;
-+ BIO_s_null;
-+ BIO_s_proxy_client;
-+ BIO_s_socket;
-+ BIO_set;
-+ BIO_set_cipher;
-+ BIO_set_tcp_ndelay;
-+ BIO_sock_cleanup;
-+ BIO_sock_error;
-+ BIO_sock_init;
-+ BIO_sock_non_fatal_error;
-+ BIO_sock_should_retry;
-+ BIO_socket_ioctl;
-+ BIO_write;
-+ BN_CTX_free;
-+ BN_CTX_new;
-+ BN_MONT_CTX_free;
-+ BN_MONT_CTX_new;
-+ BN_MONT_CTX_set;
-+ BN_add;
-+ BN_add_word;
-+ BN_hex2bn;
-+ BN_bin2bn;
-+ BN_bn2hex;
-+ BN_bn2bin;
-+ BN_clear;
-+ BN_clear_bit;
-+ BN_clear_free;
-+ BN_cmp;
-+ BN_copy;
-+ BN_div;
-+ BN_div_word;
-+ BN_dup;
-+ BN_free;
-+ BN_from_montgomery;
-+ BN_gcd;
-+ BN_generate_prime;
-+ BN_get_word;
-+ BN_is_bit_set;
-+ BN_is_prime;
-+ BN_lshift;
-+ BN_lshift1;
-+ BN_mask_bits;
-+ BN_mod;
-+ BN_mod_exp;
-+ BN_mod_exp_mont;
-+ BN_mod_exp_simple;
-+ BN_mod_inverse;
-+ BN_mod_mul;
-+ BN_mod_mul_montgomery;
-+ BN_mod_word;
-+ BN_mul;
-+ BN_new;
-+ BN_num_bits;
-+ BN_num_bits_word;
-+ BN_options;
-+ BN_print;
-+ BN_print_fp;
-+ BN_rand;
-+ BN_reciprocal;
-+ BN_rshift;
-+ BN_rshift1;
-+ BN_set_bit;
-+ BN_set_word;
-+ BN_sqr;
-+ BN_sub;
-+ BN_to_ASN1_INTEGER;
-+ BN_ucmp;
-+ BN_value_one;
-+ BUF_MEM_free;
-+ BUF_MEM_grow;
-+ BUF_MEM_new;
-+ BUF_strdup;
-+ CONF_free;
-+ CONF_get_number;
-+ CONF_get_section;
-+ CONF_get_string;
-+ CONF_load;
-+ CRYPTO_add_lock;
-+ CRYPTO_dbg_free;
-+ CRYPTO_dbg_malloc;
-+ CRYPTO_dbg_realloc;
-+ CRYPTO_dbg_remalloc;
-+ CRYPTO_free;
-+ CRYPTO_get_add_lock_callback;
-+ CRYPTO_get_id_callback;
-+ CRYPTO_get_lock_name;
-+ CRYPTO_get_locking_callback;
-+ CRYPTO_get_mem_functions;
-+ CRYPTO_lock;
-+ CRYPTO_malloc;
-+ CRYPTO_mem_ctrl;
-+ CRYPTO_mem_leaks;
-+ CRYPTO_mem_leaks_cb;
-+ CRYPTO_mem_leaks_fp;
-+ CRYPTO_realloc;
-+ CRYPTO_remalloc;
-+ CRYPTO_set_add_lock_callback;
-+ CRYPTO_set_id_callback;
-+ CRYPTO_set_locking_callback;
-+ CRYPTO_set_mem_functions;
-+ CRYPTO_thread_id;
-+ DH_check;
-+ DH_compute_key;
-+ DH_free;
-+ DH_generate_key;
-+ DH_generate_parameters;
-+ DH_new;
-+ DH_size;
-+ DHparams_print;
-+ DHparams_print_fp;
-+ DSA_free;
-+ DSA_generate_key;
-+ DSA_generate_parameters;
-+ DSA_is_prime;
-+ DSA_new;
-+ DSA_print;
-+ DSA_print_fp;
-+ DSA_sign;
-+ DSA_sign_setup;
-+ DSA_size;
-+ DSA_verify;
-+ DSAparams_print;
-+ DSAparams_print_fp;
-+ ERR_clear_error;
-+ ERR_error_string;
-+ ERR_free_strings;
-+ ERR_func_error_string;
-+ ERR_get_err_state_table;
-+ ERR_get_error;
-+ ERR_get_error_line;
-+ ERR_get_state;
-+ ERR_get_string_table;
-+ ERR_lib_error_string;
-+ ERR_load_ASN1_strings;
-+ ERR_load_BIO_strings;
-+ ERR_load_BN_strings;
-+ ERR_load_BUF_strings;
-+ ERR_load_CONF_strings;
-+ ERR_load_DH_strings;
-+ ERR_load_DSA_strings;
-+ ERR_load_ERR_strings;
-+ ERR_load_EVP_strings;
-+ ERR_load_OBJ_strings;
-+ ERR_load_PEM_strings;
-+ ERR_load_PROXY_strings;
-+ ERR_load_RSA_strings;
-+ ERR_load_X509_strings;
-+ ERR_load_crypto_strings;
-+ ERR_load_strings;
-+ ERR_peek_error;
-+ ERR_peek_error_line;
-+ ERR_print_errors;
-+ ERR_print_errors_fp;
-+ ERR_put_error;
-+ ERR_reason_error_string;
-+ ERR_remove_state;
-+ EVP_BytesToKey;
-+ EVP_CIPHER_CTX_cleanup;
-+ EVP_CipherFinal;
-+ EVP_CipherInit;
-+ EVP_CipherUpdate;
-+ EVP_DecodeBlock;
-+ EVP_DecodeFinal;
-+ EVP_DecodeInit;
-+ EVP_DecodeUpdate;
-+ EVP_DecryptFinal;
-+ EVP_DecryptInit;
-+ EVP_DecryptUpdate;
-+ EVP_DigestFinal;
-+ EVP_DigestInit;
-+ EVP_DigestUpdate;
-+ EVP_EncodeBlock;
-+ EVP_EncodeFinal;
-+ EVP_EncodeInit;
-+ EVP_EncodeUpdate;
-+ EVP_EncryptFinal;
-+ EVP_EncryptInit;
-+ EVP_EncryptUpdate;
-+ EVP_OpenFinal;
-+ EVP_OpenInit;
-+ EVP_PKEY_assign;
-+ EVP_PKEY_copy_parameters;
-+ EVP_PKEY_free;
-+ EVP_PKEY_missing_parameters;
-+ EVP_PKEY_new;
-+ EVP_PKEY_save_parameters;
-+ EVP_PKEY_size;
-+ EVP_PKEY_type;
-+ EVP_SealFinal;
-+ EVP_SealInit;
-+ EVP_SignFinal;
-+ EVP_VerifyFinal;
-+ EVP_add_alias;
-+ EVP_add_cipher;
-+ EVP_add_digest;
-+ EVP_bf_cbc;
-+ EVP_bf_cfb64;
-+ EVP_bf_ecb;
-+ EVP_bf_ofb;
-+ EVP_cleanup;
-+ EVP_des_cbc;
-+ EVP_des_cfb64;
-+ EVP_des_ecb;
-+ EVP_des_ede;
-+ EVP_des_ede3;
-+ EVP_des_ede3_cbc;
-+ EVP_des_ede3_cfb64;
-+ EVP_des_ede3_ofb;
-+ EVP_des_ede_cbc;
-+ EVP_des_ede_cfb64;
-+ EVP_des_ede_ofb;
-+ EVP_des_ofb;
-+ EVP_desx_cbc;
-+ EVP_dss;
-+ EVP_dss1;
-+ EVP_enc_null;
-+ EVP_get_cipherbyname;
-+ EVP_get_digestbyname;
-+ EVP_get_pw_prompt;
-+ EVP_idea_cbc;
-+ EVP_idea_cfb64;
-+ EVP_idea_ecb;
-+ EVP_idea_ofb;
-+ EVP_md2;
-+ EVP_md5;
-+ EVP_md_null;
-+ EVP_rc2_cbc;
-+ EVP_rc2_cfb64;
-+ EVP_rc2_ecb;
-+ EVP_rc2_ofb;
-+ EVP_rc4;
-+ EVP_read_pw_string;
-+ EVP_set_pw_prompt;
-+ EVP_sha;
-+ EVP_sha1;
-+ MD2;
-+ MD2_Final;
-+ MD2_Init;
-+ MD2_Update;
-+ MD2_options;
-+ MD5;
-+ MD5_Final;
-+ MD5_Init;
-+ MD5_Update;
-+ MDC2;
-+ MDC2_Final;
-+ MDC2_Init;
-+ MDC2_Update;
-+ NETSCAPE_SPKAC_free;
-+ NETSCAPE_SPKAC_new;
-+ NETSCAPE_SPKI_free;
-+ NETSCAPE_SPKI_new;
-+ NETSCAPE_SPKI_sign;
-+ NETSCAPE_SPKI_verify;
-+ OBJ_add_object;
-+ OBJ_bsearch;
-+ OBJ_cleanup;
-+ OBJ_cmp;
-+ OBJ_create;
-+ OBJ_dup;
-+ OBJ_ln2nid;
-+ OBJ_new_nid;
-+ OBJ_nid2ln;
-+ OBJ_nid2obj;
-+ OBJ_nid2sn;
-+ OBJ_obj2nid;
-+ OBJ_sn2nid;
-+ OBJ_txt2nid;
-+ PEM_ASN1_read;
-+ PEM_ASN1_read_bio;
-+ PEM_ASN1_write;
-+ PEM_ASN1_write_bio;
-+ PEM_SealFinal;
-+ PEM_SealInit;
-+ PEM_SealUpdate;
-+ PEM_SignFinal;
-+ PEM_SignInit;
-+ PEM_SignUpdate;
-+ PEM_X509_INFO_read;
-+ PEM_X509_INFO_read_bio;
-+ PEM_X509_INFO_write_bio;
-+ PEM_dek_info;
-+ PEM_do_header;
-+ PEM_get_EVP_CIPHER_INFO;
-+ PEM_proc_type;
-+ PEM_read;
-+ PEM_read_DHparams;
-+ PEM_read_DSAPrivateKey;
-+ PEM_read_DSAparams;
-+ PEM_read_PKCS7;
-+ PEM_read_PrivateKey;
-+ PEM_read_RSAPrivateKey;
-+ PEM_read_X509;
-+ PEM_read_X509_CRL;
-+ PEM_read_X509_REQ;
-+ PEM_read_bio;
-+ PEM_read_bio_DHparams;
-+ PEM_read_bio_DSAPrivateKey;
-+ PEM_read_bio_DSAparams;
-+ PEM_read_bio_PKCS7;
-+ PEM_read_bio_PrivateKey;
-+ PEM_read_bio_RSAPrivateKey;
-+ PEM_read_bio_X509;
-+ PEM_read_bio_X509_CRL;
-+ PEM_read_bio_X509_REQ;
-+ PEM_write;
-+ PEM_write_DHparams;
-+ PEM_write_DSAPrivateKey;
-+ PEM_write_DSAparams;
-+ PEM_write_PKCS7;
-+ PEM_write_PrivateKey;
-+ PEM_write_RSAPrivateKey;
-+ PEM_write_X509;
-+ PEM_write_X509_CRL;
-+ PEM_write_X509_REQ;
-+ PEM_write_bio;
-+ PEM_write_bio_DHparams;
-+ PEM_write_bio_DSAPrivateKey;
-+ PEM_write_bio_DSAparams;
-+ PEM_write_bio_PKCS7;
-+ PEM_write_bio_PrivateKey;
-+ PEM_write_bio_RSAPrivateKey;
-+ PEM_write_bio_X509;
-+ PEM_write_bio_X509_CRL;
-+ PEM_write_bio_X509_REQ;
-+ PKCS7_DIGEST_free;
-+ PKCS7_DIGEST_new;
-+ PKCS7_ENCRYPT_free;
-+ PKCS7_ENCRYPT_new;
-+ PKCS7_ENC_CONTENT_free;
-+ PKCS7_ENC_CONTENT_new;
-+ PKCS7_ENVELOPE_free;
-+ PKCS7_ENVELOPE_new;
-+ PKCS7_ISSUER_AND_SERIAL_digest;
-+ PKCS7_ISSUER_AND_SERIAL_free;
-+ PKCS7_ISSUER_AND_SERIAL_new;
-+ PKCS7_RECIP_INFO_free;
-+ PKCS7_RECIP_INFO_new;
-+ PKCS7_SIGNED_free;
-+ PKCS7_SIGNED_new;
-+ PKCS7_SIGNER_INFO_free;
-+ PKCS7_SIGNER_INFO_new;
-+ PKCS7_SIGN_ENVELOPE_free;
-+ PKCS7_SIGN_ENVELOPE_new;
-+ PKCS7_dup;
-+ PKCS7_free;
-+ PKCS7_new;
-+ PROXY_ENTRY_add_noproxy;
-+ PROXY_ENTRY_clear_noproxy;
-+ PROXY_ENTRY_free;
-+ PROXY_ENTRY_get_noproxy;
-+ PROXY_ENTRY_new;
-+ PROXY_ENTRY_set_server;
-+ PROXY_add_noproxy;
-+ PROXY_add_server;
-+ PROXY_check_by_host;
-+ PROXY_check_url;
-+ PROXY_clear_noproxy;
-+ PROXY_free;
-+ PROXY_get_noproxy;
-+ PROXY_get_proxies;
-+ PROXY_get_proxy_entry;
-+ PROXY_load_conf;
-+ PROXY_new;
-+ PROXY_print;
-+ RAND_bytes;
-+ RAND_cleanup;
-+ RAND_file_name;
-+ RAND_load_file;
-+ RAND_screen;
-+ RAND_seed;
-+ RAND_write_file;
-+ RC2_cbc_encrypt;
-+ RC2_cfb64_encrypt;
-+ RC2_ecb_encrypt;
-+ RC2_encrypt;
-+ RC2_ofb64_encrypt;
-+ RC2_set_key;
-+ RC4;
-+ RC4_options;
-+ RC4_set_key;
-+ RSAPrivateKey_asn1_meth;
-+ RSAPrivateKey_dup;
-+ RSAPublicKey_dup;
-+ RSA_PKCS1_SSLeay;
-+ RSA_free;
-+ RSA_generate_key;
-+ RSA_new;
-+ RSA_new_method;
-+ RSA_print;
-+ RSA_print_fp;
-+ RSA_private_decrypt;
-+ RSA_private_encrypt;
-+ RSA_public_decrypt;
-+ RSA_public_encrypt;
-+ RSA_set_default_method;
-+ RSA_sign;
-+ RSA_sign_ASN1_OCTET_STRING;
-+ RSA_size;
-+ RSA_verify;
-+ RSA_verify_ASN1_OCTET_STRING;
-+ SHA;
-+ SHA1;
-+ SHA1_Final;
-+ SHA1_Init;
-+ SHA1_Update;
-+ SHA_Final;
-+ SHA_Init;
-+ SHA_Update;
-+ OpenSSL_add_all_algorithms;
-+ OpenSSL_add_all_ciphers;
-+ OpenSSL_add_all_digests;
-+ TXT_DB_create_index;
-+ TXT_DB_free;
-+ TXT_DB_get_by_index;
-+ TXT_DB_insert;
-+ TXT_DB_read;
-+ TXT_DB_write;
-+ X509_ALGOR_free;
-+ X509_ALGOR_new;
-+ X509_ATTRIBUTE_free;
-+ X509_ATTRIBUTE_new;
-+ X509_CINF_free;
-+ X509_CINF_new;
-+ X509_CRL_INFO_free;
-+ X509_CRL_INFO_new;
-+ X509_CRL_add_ext;
-+ X509_CRL_cmp;
-+ X509_CRL_delete_ext;
-+ X509_CRL_dup;
-+ X509_CRL_free;
-+ X509_CRL_get_ext;
-+ X509_CRL_get_ext_by_NID;
-+ X509_CRL_get_ext_by_OBJ;
-+ X509_CRL_get_ext_by_critical;
-+ X509_CRL_get_ext_count;
-+ X509_CRL_new;
-+ X509_CRL_sign;
-+ X509_CRL_verify;
-+ X509_EXTENSION_create_by_NID;
-+ X509_EXTENSION_create_by_OBJ;
-+ X509_EXTENSION_dup;
-+ X509_EXTENSION_free;
-+ X509_EXTENSION_get_critical;
-+ X509_EXTENSION_get_data;
-+ X509_EXTENSION_get_object;
-+ X509_EXTENSION_new;
-+ X509_EXTENSION_set_critical;
-+ X509_EXTENSION_set_data;
-+ X509_EXTENSION_set_object;
-+ X509_INFO_free;
-+ X509_INFO_new;
-+ X509_LOOKUP_by_alias;
-+ X509_LOOKUP_by_fingerprint;
-+ X509_LOOKUP_by_issuer_serial;
-+ X509_LOOKUP_by_subject;
-+ X509_LOOKUP_ctrl;
-+ X509_LOOKUP_file;
-+ X509_LOOKUP_free;
-+ X509_LOOKUP_hash_dir;
-+ X509_LOOKUP_init;
-+ X509_LOOKUP_new;
-+ X509_LOOKUP_shutdown;
-+ X509_NAME_ENTRY_create_by_NID;
-+ X509_NAME_ENTRY_create_by_OBJ;
-+ X509_NAME_ENTRY_dup;
-+ X509_NAME_ENTRY_free;
-+ X509_NAME_ENTRY_get_data;
-+ X509_NAME_ENTRY_get_object;
-+ X509_NAME_ENTRY_new;
-+ X509_NAME_ENTRY_set_data;
-+ X509_NAME_ENTRY_set_object;
-+ X509_NAME_add_entry;
-+ X509_NAME_cmp;
-+ X509_NAME_delete_entry;
-+ X509_NAME_digest;
-+ X509_NAME_dup;
-+ X509_NAME_entry_count;
-+ X509_NAME_free;
-+ X509_NAME_get_entry;
-+ X509_NAME_get_index_by_NID;
-+ X509_NAME_get_index_by_OBJ;
-+ X509_NAME_get_text_by_NID;
-+ X509_NAME_get_text_by_OBJ;
-+ X509_NAME_hash;
-+ X509_NAME_new;
-+ X509_NAME_oneline;
-+ X509_NAME_print;
-+ X509_NAME_set;
-+ X509_OBJECT_free_contents;
-+ X509_OBJECT_retrieve_by_subject;
-+ X509_OBJECT_up_ref_count;
-+ X509_PKEY_free;
-+ X509_PKEY_new;
-+ X509_PUBKEY_free;
-+ X509_PUBKEY_get;
-+ X509_PUBKEY_new;
-+ X509_PUBKEY_set;
-+ X509_REQ_INFO_free;
-+ X509_REQ_INFO_new;
-+ X509_REQ_dup;
-+ X509_REQ_free;
-+ X509_REQ_get_pubkey;
-+ X509_REQ_new;
-+ X509_REQ_print;
-+ X509_REQ_print_fp;
-+ X509_REQ_set_pubkey;
-+ X509_REQ_set_subject_name;
-+ X509_REQ_set_version;
-+ X509_REQ_sign;
-+ X509_REQ_to_X509;
-+ X509_REQ_verify;
-+ X509_REVOKED_add_ext;
-+ X509_REVOKED_delete_ext;
-+ X509_REVOKED_free;
-+ X509_REVOKED_get_ext;
-+ X509_REVOKED_get_ext_by_NID;
-+ X509_REVOKED_get_ext_by_OBJ;
-+ X509_REVOKED_get_ext_by_critical;
-+ X509_REVOKED_get_ext_by_critic;
-+ X509_REVOKED_get_ext_count;
-+ X509_REVOKED_new;
-+ X509_SIG_free;
-+ X509_SIG_new;
-+ X509_STORE_CTX_cleanup;
-+ X509_STORE_CTX_init;
-+ X509_STORE_add_cert;
-+ X509_STORE_add_lookup;
-+ X509_STORE_free;
-+ X509_STORE_get_by_subject;
-+ X509_STORE_load_locations;
-+ X509_STORE_new;
-+ X509_STORE_set_default_paths;
-+ X509_VAL_free;
-+ X509_VAL_new;
-+ X509_add_ext;
-+ X509_asn1_meth;
-+ X509_certificate_type;
-+ X509_check_private_key;
-+ X509_cmp_current_time;
-+ X509_delete_ext;
-+ X509_digest;
-+ X509_dup;
-+ X509_free;
-+ X509_get_default_cert_area;
-+ X509_get_default_cert_dir;
-+ X509_get_default_cert_dir_env;
-+ X509_get_default_cert_file;
-+ X509_get_default_cert_file_env;
-+ X509_get_default_private_dir;
-+ X509_get_ext;
-+ X509_get_ext_by_NID;
-+ X509_get_ext_by_OBJ;
-+ X509_get_ext_by_critical;
-+ X509_get_ext_count;
-+ X509_get_issuer_name;
-+ X509_get_pubkey;
-+ X509_get_pubkey_parameters;
-+ X509_get_serialNumber;
-+ X509_get_subject_name;
-+ X509_gmtime_adj;
-+ X509_issuer_and_serial_cmp;
-+ X509_issuer_and_serial_hash;
-+ X509_issuer_name_cmp;
-+ X509_issuer_name_hash;
-+ X509_load_cert_file;
-+ X509_new;
-+ X509_print;
-+ X509_print_fp;
-+ X509_set_issuer_name;
-+ X509_set_notAfter;
-+ X509_set_notBefore;
-+ X509_set_pubkey;
-+ X509_set_serialNumber;
-+ X509_set_subject_name;
-+ X509_set_version;
-+ X509_sign;
-+ X509_subject_name_cmp;
-+ X509_subject_name_hash;
-+ X509_to_X509_REQ;
-+ X509_verify;
-+ X509_verify_cert;
-+ X509_verify_cert_error_string;
-+ X509v3_add_ext;
-+ X509v3_add_extension;
-+ X509v3_add_netscape_extensions;
-+ X509v3_add_standard_extensions;
-+ X509v3_cleanup_extensions;
-+ X509v3_data_type_by_NID;
-+ X509v3_data_type_by_OBJ;
-+ X509v3_delete_ext;
-+ X509v3_get_ext;
-+ X509v3_get_ext_by_NID;
-+ X509v3_get_ext_by_OBJ;
-+ X509v3_get_ext_by_critical;
-+ X509v3_get_ext_count;
-+ X509v3_pack_string;
-+ X509v3_pack_type_by_NID;
-+ X509v3_pack_type_by_OBJ;
-+ X509v3_unpack_string;
-+ _des_crypt;
-+ a2d_ASN1_OBJECT;
-+ a2i_ASN1_INTEGER;
-+ a2i_ASN1_STRING;
-+ asn1_Finish;
-+ asn1_GetSequence;
-+ bn_div_words;
-+ bn_expand2;
-+ bn_mul_add_words;
-+ bn_mul_words;
-+ BN_uadd;
-+ BN_usub;
-+ bn_sqr_words;
-+ _ossl_old_crypt;
-+ d2i_ASN1_BIT_STRING;
-+ d2i_ASN1_BOOLEAN;
-+ d2i_ASN1_HEADER;
-+ d2i_ASN1_IA5STRING;
-+ d2i_ASN1_INTEGER;
-+ d2i_ASN1_OBJECT;
-+ d2i_ASN1_OCTET_STRING;
-+ d2i_ASN1_PRINTABLE;
-+ d2i_ASN1_PRINTABLESTRING;
-+ d2i_ASN1_SET;
-+ d2i_ASN1_T61STRING;
-+ d2i_ASN1_TYPE;
-+ d2i_ASN1_UTCTIME;
-+ d2i_ASN1_bytes;
-+ d2i_ASN1_type_bytes;
-+ d2i_DHparams;
-+ d2i_DSAPrivateKey;
-+ d2i_DSAPrivateKey_bio;
-+ d2i_DSAPrivateKey_fp;
-+ d2i_DSAPublicKey;
-+ d2i_DSAparams;
-+ d2i_NETSCAPE_SPKAC;
-+ d2i_NETSCAPE_SPKI;
-+ d2i_Netscape_RSA;
-+ d2i_PKCS7;
-+ d2i_PKCS7_DIGEST;
-+ d2i_PKCS7_ENCRYPT;
-+ d2i_PKCS7_ENC_CONTENT;
-+ d2i_PKCS7_ENVELOPE;
-+ d2i_PKCS7_ISSUER_AND_SERIAL;
-+ d2i_PKCS7_RECIP_INFO;
-+ d2i_PKCS7_SIGNED;
-+ d2i_PKCS7_SIGNER_INFO;
-+ d2i_PKCS7_SIGN_ENVELOPE;
-+ d2i_PKCS7_bio;
-+ d2i_PKCS7_fp;
-+ d2i_PrivateKey;
-+ d2i_PublicKey;
-+ d2i_RSAPrivateKey;
-+ d2i_RSAPrivateKey_bio;
-+ d2i_RSAPrivateKey_fp;
-+ d2i_RSAPublicKey;
-+ d2i_X509;
-+ d2i_X509_ALGOR;
-+ d2i_X509_ATTRIBUTE;
-+ d2i_X509_CINF;
-+ d2i_X509_CRL;
-+ d2i_X509_CRL_INFO;
-+ d2i_X509_CRL_bio;
-+ d2i_X509_CRL_fp;
-+ d2i_X509_EXTENSION;
-+ d2i_X509_NAME;
-+ d2i_X509_NAME_ENTRY;
-+ d2i_X509_PKEY;
-+ d2i_X509_PUBKEY;
-+ d2i_X509_REQ;
-+ d2i_X509_REQ_INFO;
-+ d2i_X509_REQ_bio;
-+ d2i_X509_REQ_fp;
-+ d2i_X509_REVOKED;
-+ d2i_X509_SIG;
-+ d2i_X509_VAL;
-+ d2i_X509_bio;
-+ d2i_X509_fp;
-+ DES_cbc_cksum;
-+ DES_cbc_encrypt;
-+ DES_cblock_print_file;
-+ DES_cfb64_encrypt;
-+ DES_cfb_encrypt;
-+ DES_decrypt3;
-+ DES_ecb3_encrypt;
-+ DES_ecb_encrypt;
-+ DES_ede3_cbc_encrypt;
-+ DES_ede3_cfb64_encrypt;
-+ DES_ede3_ofb64_encrypt;
-+ DES_enc_read;
-+ DES_enc_write;
-+ DES_encrypt1;
-+ DES_encrypt2;
-+ DES_encrypt3;
-+ DES_fcrypt;
-+ DES_is_weak_key;
-+ DES_key_sched;
-+ DES_ncbc_encrypt;
-+ DES_ofb64_encrypt;
-+ DES_ofb_encrypt;
-+ DES_options;
-+ DES_pcbc_encrypt;
-+ DES_quad_cksum;
-+ DES_random_key;
-+ _ossl_old_des_random_seed;
-+ _ossl_old_des_read_2passwords;
-+ _ossl_old_des_read_password;
-+ _ossl_old_des_read_pw;
-+ _ossl_old_des_read_pw_string;
-+ DES_set_key;
-+ DES_set_odd_parity;
-+ DES_string_to_2keys;
-+ DES_string_to_key;
-+ DES_xcbc_encrypt;
-+ DES_xwhite_in2out;
-+ fcrypt_body;
-+ i2a_ASN1_INTEGER;
-+ i2a_ASN1_OBJECT;
-+ i2a_ASN1_STRING;
-+ i2d_ASN1_BIT_STRING;
-+ i2d_ASN1_BOOLEAN;
-+ i2d_ASN1_HEADER;
-+ i2d_ASN1_IA5STRING;
-+ i2d_ASN1_INTEGER;
-+ i2d_ASN1_OBJECT;
-+ i2d_ASN1_OCTET_STRING;
-+ i2d_ASN1_PRINTABLE;
-+ i2d_ASN1_SET;
-+ i2d_ASN1_TYPE;
-+ i2d_ASN1_UTCTIME;
-+ i2d_ASN1_bytes;
-+ i2d_DHparams;
-+ i2d_DSAPrivateKey;
-+ i2d_DSAPrivateKey_bio;
-+ i2d_DSAPrivateKey_fp;
-+ i2d_DSAPublicKey;
-+ i2d_DSAparams;
-+ i2d_NETSCAPE_SPKAC;
-+ i2d_NETSCAPE_SPKI;
-+ i2d_Netscape_RSA;
-+ i2d_PKCS7;
-+ i2d_PKCS7_DIGEST;
-+ i2d_PKCS7_ENCRYPT;
-+ i2d_PKCS7_ENC_CONTENT;
-+ i2d_PKCS7_ENVELOPE;
-+ i2d_PKCS7_ISSUER_AND_SERIAL;
-+ i2d_PKCS7_RECIP_INFO;
-+ i2d_PKCS7_SIGNED;
-+ i2d_PKCS7_SIGNER_INFO;
-+ i2d_PKCS7_SIGN_ENVELOPE;
-+ i2d_PKCS7_bio;
-+ i2d_PKCS7_fp;
-+ i2d_PrivateKey;
-+ i2d_PublicKey;
-+ i2d_RSAPrivateKey;
-+ i2d_RSAPrivateKey_bio;
-+ i2d_RSAPrivateKey_fp;
-+ i2d_RSAPublicKey;
-+ i2d_X509;
-+ i2d_X509_ALGOR;
-+ i2d_X509_ATTRIBUTE;
-+ i2d_X509_CINF;
-+ i2d_X509_CRL;
-+ i2d_X509_CRL_INFO;
-+ i2d_X509_CRL_bio;
-+ i2d_X509_CRL_fp;
-+ i2d_X509_EXTENSION;
-+ i2d_X509_NAME;
-+ i2d_X509_NAME_ENTRY;
-+ i2d_X509_PKEY;
-+ i2d_X509_PUBKEY;
-+ i2d_X509_REQ;
-+ i2d_X509_REQ_INFO;
-+ i2d_X509_REQ_bio;
-+ i2d_X509_REQ_fp;
-+ i2d_X509_REVOKED;
-+ i2d_X509_SIG;
-+ i2d_X509_VAL;
-+ i2d_X509_bio;
-+ i2d_X509_fp;
-+ idea_cbc_encrypt;
-+ idea_cfb64_encrypt;
-+ idea_ecb_encrypt;
-+ idea_encrypt;
-+ idea_ofb64_encrypt;
-+ idea_options;
-+ idea_set_decrypt_key;
-+ idea_set_encrypt_key;
-+ lh_delete;
-+ lh_doall;
-+ lh_doall_arg;
-+ lh_free;
-+ lh_insert;
-+ lh_new;
-+ lh_node_stats;
-+ lh_node_stats_bio;
-+ lh_node_usage_stats;
-+ lh_node_usage_stats_bio;
-+ lh_retrieve;
-+ lh_stats;
-+ lh_stats_bio;
-+ lh_strhash;
-+ sk_delete;
-+ sk_delete_ptr;
-+ sk_dup;
-+ sk_find;
-+ sk_free;
-+ sk_insert;
-+ sk_new;
-+ sk_pop;
-+ sk_pop_free;
-+ sk_push;
-+ sk_set_cmp_func;
-+ sk_shift;
-+ sk_unshift;
-+ sk_zero;
-+ BIO_f_nbio_test;
-+ ASN1_TYPE_get;
-+ ASN1_TYPE_set;
-+ PKCS7_content_free;
-+ ERR_load_PKCS7_strings;
-+ X509_find_by_issuer_and_serial;
-+ X509_find_by_subject;
-+ PKCS7_ctrl;
-+ PKCS7_set_type;
-+ PKCS7_set_content;
-+ PKCS7_SIGNER_INFO_set;
-+ PKCS7_add_signer;
-+ PKCS7_add_certificate;
-+ PKCS7_add_crl;
-+ PKCS7_content_new;
-+ PKCS7_dataSign;
-+ PKCS7_dataVerify;
-+ PKCS7_dataInit;
-+ PKCS7_add_signature;
-+ PKCS7_cert_from_signer_info;
-+ PKCS7_get_signer_info;
-+ EVP_delete_alias;
-+ EVP_mdc2;
-+ PEM_read_bio_RSAPublicKey;
-+ PEM_write_bio_RSAPublicKey;
-+ d2i_RSAPublicKey_bio;
-+ i2d_RSAPublicKey_bio;
-+ PEM_read_RSAPublicKey;
-+ PEM_write_RSAPublicKey;
-+ d2i_RSAPublicKey_fp;
-+ i2d_RSAPublicKey_fp;
-+ BIO_copy_next_retry;
-+ RSA_flags;
-+ X509_STORE_add_crl;
-+ X509_load_crl_file;
-+ EVP_rc2_40_cbc;
-+ EVP_rc4_40;
-+ EVP_CIPHER_CTX_init;
-+ HMAC;
-+ HMAC_Init;
-+ HMAC_Update;
-+ HMAC_Final;
-+ ERR_get_next_error_library;
-+ EVP_PKEY_cmp_parameters;
-+ HMAC_cleanup;
-+ BIO_ptr_ctrl;
-+ BIO_new_file_internal;
-+ BIO_new_fp_internal;
-+ BIO_s_file_internal;
-+ BN_BLINDING_convert;
-+ BN_BLINDING_invert;
-+ BN_BLINDING_update;
-+ RSA_blinding_on;
-+ RSA_blinding_off;
-+ i2t_ASN1_OBJECT;
-+ BN_BLINDING_new;
-+ BN_BLINDING_free;
-+ EVP_cast5_cbc;
-+ EVP_cast5_cfb64;
-+ EVP_cast5_ecb;
-+ EVP_cast5_ofb;
-+ BF_decrypt;
-+ CAST_set_key;
-+ CAST_encrypt;
-+ CAST_decrypt;
-+ CAST_ecb_encrypt;
-+ CAST_cbc_encrypt;
-+ CAST_cfb64_encrypt;
-+ CAST_ofb64_encrypt;
-+ RC2_decrypt;
-+ OBJ_create_objects;
-+ BN_exp;
-+ BN_mul_word;
-+ BN_sub_word;
-+ BN_dec2bn;
-+ BN_bn2dec;
-+ BIO_ghbn_ctrl;
-+ CRYPTO_free_ex_data;
-+ CRYPTO_get_ex_data;
-+ CRYPTO_set_ex_data;
-+ ERR_load_CRYPTO_strings;
-+ ERR_load_CRYPTOlib_strings;
-+ EVP_PKEY_bits;
-+ MD5_Transform;
-+ SHA1_Transform;
-+ SHA_Transform;
-+ X509_STORE_CTX_get_chain;
-+ X509_STORE_CTX_get_current_cert;
-+ X509_STORE_CTX_get_error;
-+ X509_STORE_CTX_get_error_depth;
-+ X509_STORE_CTX_get_ex_data;
-+ X509_STORE_CTX_set_cert;
-+ X509_STORE_CTX_set_chain;
-+ X509_STORE_CTX_set_error;
-+ X509_STORE_CTX_set_ex_data;
-+ CRYPTO_dup_ex_data;
-+ CRYPTO_get_new_lockid;
-+ CRYPTO_new_ex_data;
-+ RSA_set_ex_data;
-+ RSA_get_ex_data;
-+ RSA_get_ex_new_index;
-+ RSA_padding_add_PKCS1_type_1;
-+ RSA_padding_add_PKCS1_type_2;
-+ RSA_padding_add_SSLv23;
-+ RSA_padding_add_none;
-+ RSA_padding_check_PKCS1_type_1;
-+ RSA_padding_check_PKCS1_type_2;
-+ RSA_padding_check_SSLv23;
-+ RSA_padding_check_none;
-+ bn_add_words;
-+ d2i_Netscape_RSA_2;
-+ CRYPTO_get_ex_new_index;
-+ RIPEMD160_Init;
-+ RIPEMD160_Update;
-+ RIPEMD160_Final;
-+ RIPEMD160;
-+ RIPEMD160_Transform;
-+ RC5_32_set_key;
-+ RC5_32_ecb_encrypt;
-+ RC5_32_encrypt;
-+ RC5_32_decrypt;
-+ RC5_32_cbc_encrypt;
-+ RC5_32_cfb64_encrypt;
-+ RC5_32_ofb64_encrypt;
-+ BN_bn2mpi;
-+ BN_mpi2bn;
-+ ASN1_BIT_STRING_get_bit;
-+ ASN1_BIT_STRING_set_bit;
-+ BIO_get_ex_data;
-+ BIO_get_ex_new_index;
-+ BIO_set_ex_data;
-+ X509v3_get_key_usage;
-+ X509v3_set_key_usage;
-+ a2i_X509v3_key_usage;
-+ i2a_X509v3_key_usage;
-+ EVP_PKEY_decrypt;
-+ EVP_PKEY_encrypt;
-+ PKCS7_RECIP_INFO_set;
-+ PKCS7_add_recipient;
-+ PKCS7_add_recipient_info;
-+ PKCS7_set_cipher;
-+ ASN1_TYPE_get_int_octetstring;
-+ ASN1_TYPE_get_octetstring;
-+ ASN1_TYPE_set_int_octetstring;
-+ ASN1_TYPE_set_octetstring;
-+ ASN1_UTCTIME_set_string;
-+ ERR_add_error_data;
-+ ERR_set_error_data;
-+ EVP_CIPHER_asn1_to_param;
-+ EVP_CIPHER_param_to_asn1;
-+ EVP_CIPHER_get_asn1_iv;
-+ EVP_CIPHER_set_asn1_iv;
-+ EVP_rc5_32_12_16_cbc;
-+ EVP_rc5_32_12_16_cfb64;
-+ EVP_rc5_32_12_16_ecb;
-+ EVP_rc5_32_12_16_ofb;
-+ asn1_add_error;
-+ d2i_ASN1_BMPSTRING;
-+ i2d_ASN1_BMPSTRING;
-+ BIO_f_ber;
-+ BN_init;
-+ COMP_CTX_new;
-+ COMP_CTX_free;
-+ COMP_CTX_compress_block;
-+ COMP_CTX_expand_block;
-+ X509_STORE_CTX_get_ex_new_index;
-+ OBJ_NAME_add;
-+ BIO_socket_nbio;
-+ EVP_rc2_64_cbc;
-+ OBJ_NAME_cleanup;
-+ OBJ_NAME_get;
-+ OBJ_NAME_init;
-+ OBJ_NAME_new_index;
-+ OBJ_NAME_remove;
-+ BN_MONT_CTX_copy;
-+ BIO_new_socks4a_connect;
-+ BIO_s_socks4a_connect;
-+ PROXY_set_connect_mode;
-+ RAND_SSLeay;
-+ RAND_set_rand_method;
-+ RSA_memory_lock;
-+ bn_sub_words;
-+ bn_mul_normal;
-+ bn_mul_comba8;
-+ bn_mul_comba4;
-+ bn_sqr_normal;
-+ bn_sqr_comba8;
-+ bn_sqr_comba4;
-+ bn_cmp_words;
-+ bn_mul_recursive;
-+ bn_mul_part_recursive;
-+ bn_sqr_recursive;
-+ bn_mul_low_normal;
-+ BN_RECP_CTX_init;
-+ BN_RECP_CTX_new;
-+ BN_RECP_CTX_free;
-+ BN_RECP_CTX_set;
-+ BN_mod_mul_reciprocal;
-+ BN_mod_exp_recp;
-+ BN_div_recp;
-+ BN_CTX_init;
-+ BN_MONT_CTX_init;
-+ RAND_get_rand_method;
-+ PKCS7_add_attribute;
-+ PKCS7_add_signed_attribute;
-+ PKCS7_digest_from_attributes;
-+ PKCS7_get_attribute;
-+ PKCS7_get_issuer_and_serial;
-+ PKCS7_get_signed_attribute;
-+ COMP_compress_block;
-+ COMP_expand_block;
-+ COMP_rle;
-+ COMP_zlib;
-+ ms_time_diff;
-+ ms_time_new;
-+ ms_time_free;
-+ ms_time_cmp;
-+ ms_time_get;
-+ PKCS7_set_attributes;
-+ PKCS7_set_signed_attributes;
-+ X509_ATTRIBUTE_create;
-+ X509_ATTRIBUTE_dup;
-+ ASN1_GENERALIZEDTIME_check;
-+ ASN1_GENERALIZEDTIME_print;
-+ ASN1_GENERALIZEDTIME_set;
-+ ASN1_GENERALIZEDTIME_set_string;
-+ ASN1_TIME_print;
-+ BASIC_CONSTRAINTS_free;
-+ BASIC_CONSTRAINTS_new;
-+ ERR_load_X509V3_strings;
-+ NETSCAPE_CERT_SEQUENCE_free;
-+ NETSCAPE_CERT_SEQUENCE_new;
-+ OBJ_txt2obj;
-+ PEM_read_NETSCAPE_CERT_SEQUENCE;
-+ PEM_read_NS_CERT_SEQ;
-+ PEM_read_bio_NETSCAPE_CERT_SEQUENCE;
-+ PEM_read_bio_NS_CERT_SEQ;
-+ PEM_write_NETSCAPE_CERT_SEQUENCE;
-+ PEM_write_NS_CERT_SEQ;
-+ PEM_write_bio_NETSCAPE_CERT_SEQUENCE;
-+ PEM_write_bio_NS_CERT_SEQ;
-+ X509V3_EXT_add;
-+ X509V3_EXT_add_alias;
-+ X509V3_EXT_add_conf;
-+ X509V3_EXT_cleanup;
-+ X509V3_EXT_conf;
-+ X509V3_EXT_conf_nid;
-+ X509V3_EXT_get;
-+ X509V3_EXT_get_nid;
-+ X509V3_EXT_print;
-+ X509V3_EXT_print_fp;
-+ X509V3_add_standard_extensions;
-+ X509V3_add_value;
-+ X509V3_add_value_bool;
-+ X509V3_add_value_int;
-+ X509V3_conf_free;
-+ X509V3_get_value_bool;
-+ X509V3_get_value_int;
-+ X509V3_parse_list;
-+ d2i_ASN1_GENERALIZEDTIME;
-+ d2i_ASN1_TIME;
-+ d2i_BASIC_CONSTRAINTS;
-+ d2i_NETSCAPE_CERT_SEQUENCE;
-+ d2i_ext_ku;
-+ ext_ku_free;
-+ ext_ku_new;
-+ i2d_ASN1_GENERALIZEDTIME;
-+ i2d_ASN1_TIME;
-+ i2d_BASIC_CONSTRAINTS;
-+ i2d_NETSCAPE_CERT_SEQUENCE;
-+ i2d_ext_ku;
-+ EVP_MD_CTX_copy;
-+ i2d_ASN1_ENUMERATED;
-+ d2i_ASN1_ENUMERATED;
-+ ASN1_ENUMERATED_set;
-+ ASN1_ENUMERATED_get;
-+ BN_to_ASN1_ENUMERATED;
-+ ASN1_ENUMERATED_to_BN;
-+ i2a_ASN1_ENUMERATED;
-+ a2i_ASN1_ENUMERATED;
-+ i2d_GENERAL_NAME;
-+ d2i_GENERAL_NAME;
-+ GENERAL_NAME_new;
-+ GENERAL_NAME_free;
-+ GENERAL_NAMES_new;
-+ GENERAL_NAMES_free;
-+ d2i_GENERAL_NAMES;
-+ i2d_GENERAL_NAMES;
-+ i2v_GENERAL_NAMES;
-+ i2s_ASN1_OCTET_STRING;
-+ s2i_ASN1_OCTET_STRING;
-+ X509V3_EXT_check_conf;
-+ hex_to_string;
-+ string_to_hex;
-+ DES_ede3_cbcm_encrypt;
-+ RSA_padding_add_PKCS1_OAEP;
-+ RSA_padding_check_PKCS1_OAEP;
-+ X509_CRL_print_fp;
-+ X509_CRL_print;
-+ i2v_GENERAL_NAME;
-+ v2i_GENERAL_NAME;
-+ i2d_PKEY_USAGE_PERIOD;
-+ d2i_PKEY_USAGE_PERIOD;
-+ PKEY_USAGE_PERIOD_new;
-+ PKEY_USAGE_PERIOD_free;
-+ v2i_GENERAL_NAMES;
-+ i2s_ASN1_INTEGER;
-+ X509V3_EXT_d2i;
-+ name_cmp;
-+ str_dup;
-+ i2s_ASN1_ENUMERATED;
-+ i2s_ASN1_ENUMERATED_TABLE;
-+ BIO_s_log;
-+ BIO_f_reliable;
-+ PKCS7_dataFinal;
-+ PKCS7_dataDecode;
-+ X509V3_EXT_CRL_add_conf;
-+ BN_set_params;
-+ BN_get_params;
-+ BIO_get_ex_num;
-+ BIO_set_ex_free_func;
-+ EVP_ripemd160;
-+ ASN1_TIME_set;
-+ i2d_AUTHORITY_KEYID;
-+ d2i_AUTHORITY_KEYID;
-+ AUTHORITY_KEYID_new;
-+ AUTHORITY_KEYID_free;
-+ ASN1_seq_unpack;
-+ ASN1_seq_pack;
-+ ASN1_unpack_string;
-+ ASN1_pack_string;
-+ PKCS12_pack_safebag;
-+ PKCS12_MAKE_KEYBAG;
-+ PKCS8_encrypt;
-+ PKCS12_MAKE_SHKEYBAG;
-+ PKCS12_pack_p7data;
-+ PKCS12_pack_p7encdata;
-+ PKCS12_add_localkeyid;
-+ PKCS12_add_friendlyname_asc;
-+ PKCS12_add_friendlyname_uni;
-+ PKCS12_get_friendlyname;
-+ PKCS12_pbe_crypt;
-+ PKCS12_decrypt_d2i;
-+ PKCS12_i2d_encrypt;
-+ PKCS12_init;
-+ PKCS12_key_gen_asc;
-+ PKCS12_key_gen_uni;
-+ PKCS12_gen_mac;
-+ PKCS12_verify_mac;
-+ PKCS12_set_mac;
-+ PKCS12_setup_mac;
-+ OPENSSL_asc2uni;
-+ OPENSSL_uni2asc;
-+ i2d_PKCS12_BAGS;
-+ PKCS12_BAGS_new;
-+ d2i_PKCS12_BAGS;
-+ PKCS12_BAGS_free;
-+ i2d_PKCS12;
-+ d2i_PKCS12;
-+ PKCS12_new;
-+ PKCS12_free;
-+ i2d_PKCS12_MAC_DATA;
-+ PKCS12_MAC_DATA_new;
-+ d2i_PKCS12_MAC_DATA;
-+ PKCS12_MAC_DATA_free;
-+ i2d_PKCS12_SAFEBAG;
-+ PKCS12_SAFEBAG_new;
-+ d2i_PKCS12_SAFEBAG;
-+ PKCS12_SAFEBAG_free;
-+ ERR_load_PKCS12_strings;
-+ PKCS12_PBE_add;
-+ PKCS8_add_keyusage;
-+ PKCS12_get_attr_gen;
-+ PKCS12_parse;
-+ PKCS12_create;
-+ i2d_PKCS12_bio;
-+ i2d_PKCS12_fp;
-+ d2i_PKCS12_bio;
-+ d2i_PKCS12_fp;
-+ i2d_PBEPARAM;
-+ PBEPARAM_new;
-+ d2i_PBEPARAM;
-+ PBEPARAM_free;
-+ i2d_PKCS8_PRIV_KEY_INFO;
-+ PKCS8_PRIV_KEY_INFO_new;
-+ d2i_PKCS8_PRIV_KEY_INFO;
-+ PKCS8_PRIV_KEY_INFO_free;
-+ EVP_PKCS82PKEY;
-+ EVP_PKEY2PKCS8;
-+ PKCS8_set_broken;
-+ EVP_PBE_ALGOR_CipherInit;
-+ EVP_PBE_alg_add;
-+ PKCS5_pbe_set;
-+ EVP_PBE_cleanup;
-+ i2d_SXNET;
-+ d2i_SXNET;
-+ SXNET_new;
-+ SXNET_free;
-+ i2d_SXNETID;
-+ d2i_SXNETID;
-+ SXNETID_new;
-+ SXNETID_free;
-+ DSA_SIG_new;
-+ DSA_SIG_free;
-+ DSA_do_sign;
-+ DSA_do_verify;
-+ d2i_DSA_SIG;
-+ i2d_DSA_SIG;
-+ i2d_ASN1_VISIBLESTRING;
-+ d2i_ASN1_VISIBLESTRING;
-+ i2d_ASN1_UTF8STRING;
-+ d2i_ASN1_UTF8STRING;
-+ i2d_DIRECTORYSTRING;
-+ d2i_DIRECTORYSTRING;
-+ i2d_DISPLAYTEXT;
-+ d2i_DISPLAYTEXT;
-+ d2i_ASN1_SET_OF_X509;
-+ i2d_ASN1_SET_OF_X509;
-+ i2d_PBKDF2PARAM;
-+ PBKDF2PARAM_new;
-+ d2i_PBKDF2PARAM;
-+ PBKDF2PARAM_free;
-+ i2d_PBE2PARAM;
-+ PBE2PARAM_new;
-+ d2i_PBE2PARAM;
-+ PBE2PARAM_free;
-+ d2i_ASN1_SET_OF_GENERAL_NAME;
-+ i2d_ASN1_SET_OF_GENERAL_NAME;
-+ d2i_ASN1_SET_OF_SXNETID;
-+ i2d_ASN1_SET_OF_SXNETID;
-+ d2i_ASN1_SET_OF_POLICYQUALINFO;
-+ i2d_ASN1_SET_OF_POLICYQUALINFO;
-+ d2i_ASN1_SET_OF_POLICYINFO;
-+ i2d_ASN1_SET_OF_POLICYINFO;
-+ SXNET_add_id_asc;
-+ SXNET_add_id_ulong;
-+ SXNET_add_id_INTEGER;
-+ SXNET_get_id_asc;
-+ SXNET_get_id_ulong;
-+ SXNET_get_id_INTEGER;
-+ X509V3_set_conf_lhash;
-+ i2d_CERTIFICATEPOLICIES;
-+ CERTIFICATEPOLICIES_new;
-+ CERTIFICATEPOLICIES_free;
-+ d2i_CERTIFICATEPOLICIES;
-+ i2d_POLICYINFO;
-+ POLICYINFO_new;
-+ d2i_POLICYINFO;
-+ POLICYINFO_free;
-+ i2d_POLICYQUALINFO;
-+ POLICYQUALINFO_new;
-+ d2i_POLICYQUALINFO;
-+ POLICYQUALINFO_free;
-+ i2d_USERNOTICE;
-+ USERNOTICE_new;
-+ d2i_USERNOTICE;
-+ USERNOTICE_free;
-+ i2d_NOTICEREF;
-+ NOTICEREF_new;
-+ d2i_NOTICEREF;
-+ NOTICEREF_free;
-+ X509V3_get_string;
-+ X509V3_get_section;
-+ X509V3_string_free;
-+ X509V3_section_free;
-+ X509V3_set_ctx;
-+ s2i_ASN1_INTEGER;
-+ CRYPTO_set_locked_mem_functions;
-+ CRYPTO_get_locked_mem_functions;
-+ CRYPTO_malloc_locked;
-+ CRYPTO_free_locked;
-+ BN_mod_exp2_mont;
-+ ERR_get_error_line_data;
-+ ERR_peek_error_line_data;
-+ PKCS12_PBE_keyivgen;
-+ X509_ALGOR_dup;
-+ d2i_ASN1_SET_OF_DIST_POINT;
-+ i2d_ASN1_SET_OF_DIST_POINT;
-+ i2d_CRL_DIST_POINTS;
-+ CRL_DIST_POINTS_new;
-+ CRL_DIST_POINTS_free;
-+ d2i_CRL_DIST_POINTS;
-+ i2d_DIST_POINT;
-+ DIST_POINT_new;
-+ d2i_DIST_POINT;
-+ DIST_POINT_free;
-+ i2d_DIST_POINT_NAME;
-+ DIST_POINT_NAME_new;
-+ DIST_POINT_NAME_free;
-+ d2i_DIST_POINT_NAME;
-+ X509V3_add_value_uchar;
-+ d2i_ASN1_SET_OF_X509_ATTRIBUTE;
-+ i2d_ASN1_SET_OF_ASN1_TYPE;
-+ d2i_ASN1_SET_OF_X509_EXTENSION;
-+ d2i_ASN1_SET_OF_X509_NAME_ENTRY;
-+ d2i_ASN1_SET_OF_ASN1_TYPE;
-+ i2d_ASN1_SET_OF_X509_ATTRIBUTE;
-+ i2d_ASN1_SET_OF_X509_EXTENSION;
-+ i2d_ASN1_SET_OF_X509_NAME_ENTRY;
-+ X509V3_EXT_i2d;
-+ X509V3_EXT_val_prn;
-+ X509V3_EXT_add_list;
-+ EVP_CIPHER_type;
-+ EVP_PBE_CipherInit;
-+ X509V3_add_value_bool_nf;
-+ d2i_ASN1_UINTEGER;
-+ sk_value;
-+ sk_num;
-+ sk_set;
-+ i2d_ASN1_SET_OF_X509_REVOKED;
-+ sk_sort;
-+ d2i_ASN1_SET_OF_X509_REVOKED;
-+ i2d_ASN1_SET_OF_X509_ALGOR;
-+ i2d_ASN1_SET_OF_X509_CRL;
-+ d2i_ASN1_SET_OF_X509_ALGOR;
-+ d2i_ASN1_SET_OF_X509_CRL;
-+ i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO;
-+ i2d_ASN1_SET_OF_PKCS7_RECIP_INFO;
-+ d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO;
-+ d2i_ASN1_SET_OF_PKCS7_RECIP_INFO;
-+ PKCS5_PBE_add;
-+ PEM_write_bio_PKCS8;
-+ i2d_PKCS8_fp;
-+ PEM_read_bio_PKCS8_PRIV_KEY_INFO;
-+ PEM_read_bio_P8_PRIV_KEY_INFO;
-+ d2i_PKCS8_bio;
-+ d2i_PKCS8_PRIV_KEY_INFO_fp;
-+ PEM_write_bio_PKCS8_PRIV_KEY_INFO;
-+ PEM_write_bio_P8_PRIV_KEY_INFO;
-+ PEM_read_PKCS8;
-+ d2i_PKCS8_PRIV_KEY_INFO_bio;
-+ d2i_PKCS8_fp;
-+ PEM_write_PKCS8;
-+ PEM_read_PKCS8_PRIV_KEY_INFO;
-+ PEM_read_P8_PRIV_KEY_INFO;
-+ PEM_read_bio_PKCS8;
-+ PEM_write_PKCS8_PRIV_KEY_INFO;
-+ PEM_write_P8_PRIV_KEY_INFO;
-+ PKCS5_PBE_keyivgen;
-+ i2d_PKCS8_bio;
-+ i2d_PKCS8_PRIV_KEY_INFO_fp;
-+ i2d_PKCS8_PRIV_KEY_INFO_bio;
-+ BIO_s_bio;
-+ PKCS5_pbe2_set;
-+ PKCS5_PBKDF2_HMAC_SHA1;
-+ PKCS5_v2_PBE_keyivgen;
-+ PEM_write_bio_PKCS8PrivateKey;
-+ PEM_write_PKCS8PrivateKey;
-+ BIO_ctrl_get_read_request;
-+ BIO_ctrl_pending;
-+ BIO_ctrl_wpending;
-+ BIO_new_bio_pair;
-+ BIO_ctrl_get_write_guarantee;
-+ CRYPTO_num_locks;
-+ CONF_load_bio;
-+ CONF_load_fp;
-+ i2d_ASN1_SET_OF_ASN1_OBJECT;
-+ d2i_ASN1_SET_OF_ASN1_OBJECT;
-+ PKCS7_signatureVerify;
-+ RSA_set_method;
-+ RSA_get_method;
-+ RSA_get_default_method;
-+ RSA_check_key;
-+ OBJ_obj2txt;
-+ DSA_dup_DH;
-+ X509_REQ_get_extensions;
-+ X509_REQ_set_extension_nids;
-+ BIO_nwrite;
-+ X509_REQ_extension_nid;
-+ BIO_nread;
-+ X509_REQ_get_extension_nids;
-+ BIO_nwrite0;
-+ X509_REQ_add_extensions_nid;
-+ BIO_nread0;
-+ X509_REQ_add_extensions;
-+ BIO_new_mem_buf;
-+ DH_set_ex_data;
-+ DH_set_method;
-+ DSA_OpenSSL;
-+ DH_get_ex_data;
-+ DH_get_ex_new_index;
-+ DSA_new_method;
-+ DH_new_method;
-+ DH_OpenSSL;
-+ DSA_get_ex_new_index;
-+ DH_get_default_method;
-+ DSA_set_ex_data;
-+ DH_set_default_method;
-+ DSA_get_ex_data;
-+ X509V3_EXT_REQ_add_conf;
-+ NETSCAPE_SPKI_print;
-+ NETSCAPE_SPKI_set_pubkey;
-+ NETSCAPE_SPKI_b64_encode;
-+ NETSCAPE_SPKI_get_pubkey;
-+ NETSCAPE_SPKI_b64_decode;
-+ UTF8_putc;
-+ UTF8_getc;
-+ RSA_null_method;
-+ ASN1_tag2str;
-+ BIO_ctrl_reset_read_request;
-+ DISPLAYTEXT_new;
-+ ASN1_GENERALIZEDTIME_free;
-+ X509_REVOKED_get_ext_d2i;
-+ X509_set_ex_data;
-+ X509_reject_set_bit_asc;
-+ X509_NAME_add_entry_by_txt;
-+ X509_NAME_add_entry_by_NID;
-+ X509_PURPOSE_get0;
-+ PEM_read_X509_AUX;
-+ d2i_AUTHORITY_INFO_ACCESS;
-+ PEM_write_PUBKEY;
-+ ACCESS_DESCRIPTION_new;
-+ X509_CERT_AUX_free;
-+ d2i_ACCESS_DESCRIPTION;
-+ X509_trust_clear;
-+ X509_TRUST_add;
-+ ASN1_VISIBLESTRING_new;
-+ X509_alias_set1;
-+ ASN1_PRINTABLESTRING_free;
-+ EVP_PKEY_get1_DSA;
-+ ASN1_BMPSTRING_new;
-+ ASN1_mbstring_copy;
-+ ASN1_UTF8STRING_new;
-+ DSA_get_default_method;
-+ i2d_ASN1_SET_OF_ACCESS_DESCRIPTION;
-+ ASN1_T61STRING_free;
-+ DSA_set_method;
-+ X509_get_ex_data;
-+ ASN1_STRING_type;
-+ X509_PURPOSE_get_by_sname;
-+ ASN1_TIME_free;
-+ ASN1_OCTET_STRING_cmp;
-+ ASN1_BIT_STRING_new;
-+ X509_get_ext_d2i;
-+ PEM_read_bio_X509_AUX;
-+ ASN1_STRING_set_default_mask_asc;
-+ ASN1_STRING_set_def_mask_asc;
-+ PEM_write_bio_RSA_PUBKEY;
-+ ASN1_INTEGER_cmp;
-+ d2i_RSA_PUBKEY_fp;
-+ X509_trust_set_bit_asc;
-+ PEM_write_bio_DSA_PUBKEY;
-+ X509_STORE_CTX_free;
-+ EVP_PKEY_set1_DSA;
-+ i2d_DSA_PUBKEY_fp;
-+ X509_load_cert_crl_file;
-+ ASN1_TIME_new;
-+ i2d_RSA_PUBKEY;
-+ X509_STORE_CTX_purpose_inherit;
-+ PEM_read_RSA_PUBKEY;
-+ d2i_X509_AUX;
-+ i2d_DSA_PUBKEY;
-+ X509_CERT_AUX_print;
-+ PEM_read_DSA_PUBKEY;
-+ i2d_RSA_PUBKEY_bio;
-+ ASN1_BIT_STRING_num_asc;
-+ i2d_PUBKEY;
-+ ASN1_UTCTIME_free;
-+ DSA_set_default_method;
-+ X509_PURPOSE_get_by_id;
-+ ACCESS_DESCRIPTION_free;
-+ PEM_read_bio_PUBKEY;
-+ ASN1_STRING_set_by_NID;
-+ X509_PURPOSE_get_id;
-+ DISPLAYTEXT_free;
-+ OTHERNAME_new;
-+ X509_CERT_AUX_new;
-+ X509_TRUST_cleanup;
-+ X509_NAME_add_entry_by_OBJ;
-+ X509_CRL_get_ext_d2i;
-+ X509_PURPOSE_get0_name;
-+ PEM_read_PUBKEY;
-+ i2d_DSA_PUBKEY_bio;
-+ i2d_OTHERNAME;
-+ ASN1_OCTET_STRING_free;
-+ ASN1_BIT_STRING_set_asc;
-+ X509_get_ex_new_index;
-+ ASN1_STRING_TABLE_cleanup;
-+ X509_TRUST_get_by_id;
-+ X509_PURPOSE_get_trust;
-+ ASN1_STRING_length;
-+ d2i_ASN1_SET_OF_ACCESS_DESCRIPTION;
-+ ASN1_PRINTABLESTRING_new;
-+ X509V3_get_d2i;
-+ ASN1_ENUMERATED_free;
-+ i2d_X509_CERT_AUX;
-+ X509_STORE_CTX_set_trust;
-+ ASN1_STRING_set_default_mask;
-+ X509_STORE_CTX_new;
-+ EVP_PKEY_get1_RSA;
-+ DIRECTORYSTRING_free;
-+ PEM_write_X509_AUX;
-+ ASN1_OCTET_STRING_set;
-+ d2i_DSA_PUBKEY_fp;
-+ d2i_RSA_PUBKEY;
-+ X509_TRUST_get0_name;
-+ X509_TRUST_get0;
-+ AUTHORITY_INFO_ACCESS_free;
-+ ASN1_IA5STRING_new;
-+ d2i_DSA_PUBKEY;
-+ X509_check_purpose;
-+ ASN1_ENUMERATED_new;
-+ d2i_RSA_PUBKEY_bio;
-+ d2i_PUBKEY;
-+ X509_TRUST_get_trust;
-+ X509_TRUST_get_flags;
-+ ASN1_BMPSTRING_free;
-+ ASN1_T61STRING_new;
-+ ASN1_UTCTIME_new;
-+ i2d_AUTHORITY_INFO_ACCESS;
-+ EVP_PKEY_set1_RSA;
-+ X509_STORE_CTX_set_purpose;
-+ ASN1_IA5STRING_free;
-+ PEM_write_bio_X509_AUX;
-+ X509_PURPOSE_get_count;
-+ CRYPTO_add_info;
-+ X509_NAME_ENTRY_create_by_txt;
-+ ASN1_STRING_get_default_mask;
-+ X509_alias_get0;
-+ ASN1_STRING_data;
-+ i2d_ACCESS_DESCRIPTION;
-+ X509_trust_set_bit;
-+ ASN1_BIT_STRING_free;
-+ PEM_read_bio_RSA_PUBKEY;
-+ X509_add1_reject_object;
-+ X509_check_trust;
-+ PEM_read_bio_DSA_PUBKEY;
-+ X509_PURPOSE_add;
-+ ASN1_STRING_TABLE_get;
-+ ASN1_UTF8STRING_free;
-+ d2i_DSA_PUBKEY_bio;
-+ PEM_write_RSA_PUBKEY;
-+ d2i_OTHERNAME;
-+ X509_reject_set_bit;
-+ PEM_write_DSA_PUBKEY;
-+ X509_PURPOSE_get0_sname;
-+ EVP_PKEY_set1_DH;
-+ ASN1_OCTET_STRING_dup;
-+ ASN1_BIT_STRING_set;
-+ X509_TRUST_get_count;
-+ ASN1_INTEGER_free;
-+ OTHERNAME_free;
-+ i2d_RSA_PUBKEY_fp;
-+ ASN1_INTEGER_dup;
-+ d2i_X509_CERT_AUX;
-+ PEM_write_bio_PUBKEY;
-+ ASN1_VISIBLESTRING_free;
-+ X509_PURPOSE_cleanup;
-+ ASN1_mbstring_ncopy;
-+ ASN1_GENERALIZEDTIME_new;
-+ EVP_PKEY_get1_DH;
-+ ASN1_OCTET_STRING_new;
-+ ASN1_INTEGER_new;
-+ i2d_X509_AUX;
-+ ASN1_BIT_STRING_name_print;
-+ X509_cmp;
-+ ASN1_STRING_length_set;
-+ DIRECTORYSTRING_new;
-+ X509_add1_trust_object;
-+ PKCS12_newpass;
-+ SMIME_write_PKCS7;
-+ SMIME_read_PKCS7;
-+ DES_set_key_checked;
-+ PKCS7_verify;
-+ PKCS7_encrypt;
-+ DES_set_key_unchecked;
-+ SMIME_crlf_copy;
-+ i2d_ASN1_PRINTABLESTRING;
-+ PKCS7_get0_signers;
-+ PKCS7_decrypt;
-+ SMIME_text;
-+ PKCS7_simple_smimecap;
-+ PKCS7_get_smimecap;
-+ PKCS7_sign;
-+ PKCS7_add_attrib_smimecap;
-+ CRYPTO_dbg_set_options;
-+ CRYPTO_remove_all_info;
-+ CRYPTO_get_mem_debug_functions;
-+ CRYPTO_is_mem_check_on;
-+ CRYPTO_set_mem_debug_functions;
-+ CRYPTO_pop_info;
-+ CRYPTO_push_info_;
-+ CRYPTO_set_mem_debug_options;
-+ PEM_write_PKCS8PrivateKey_nid;
-+ PEM_write_bio_PKCS8PrivateKey_nid;
-+ PEM_write_bio_PKCS8PrivKey_nid;
-+ d2i_PKCS8PrivateKey_bio;
-+ ASN1_NULL_free;
-+ d2i_ASN1_NULL;
-+ ASN1_NULL_new;
-+ i2d_PKCS8PrivateKey_bio;
-+ i2d_PKCS8PrivateKey_fp;
-+ i2d_ASN1_NULL;
-+ i2d_PKCS8PrivateKey_nid_fp;
-+ d2i_PKCS8PrivateKey_fp;
-+ i2d_PKCS8PrivateKey_nid_bio;
-+ i2d_PKCS8PrivateKeyInfo_fp;
-+ i2d_PKCS8PrivateKeyInfo_bio;
-+ PEM_cb;
-+ i2d_PrivateKey_fp;
-+ d2i_PrivateKey_bio;
-+ d2i_PrivateKey_fp;
-+ i2d_PrivateKey_bio;
-+ X509_reject_clear;
-+ X509_TRUST_set_default;
-+ d2i_AutoPrivateKey;
-+ X509_ATTRIBUTE_get0_type;
-+ X509_ATTRIBUTE_set1_data;
-+ X509at_get_attr;
-+ X509at_get_attr_count;
-+ X509_ATTRIBUTE_create_by_NID;
-+ X509_ATTRIBUTE_set1_object;
-+ X509_ATTRIBUTE_count;
-+ X509_ATTRIBUTE_create_by_OBJ;
-+ X509_ATTRIBUTE_get0_object;
-+ X509at_get_attr_by_NID;
-+ X509at_add1_attr;
-+ X509_ATTRIBUTE_get0_data;
-+ X509at_delete_attr;
-+ X509at_get_attr_by_OBJ;
-+ RAND_add;
-+ BIO_number_written;
-+ BIO_number_read;
-+ X509_STORE_CTX_get1_chain;
-+ ERR_load_RAND_strings;
-+ RAND_pseudo_bytes;
-+ X509_REQ_get_attr_by_NID;
-+ X509_REQ_get_attr;
-+ X509_REQ_add1_attr_by_NID;
-+ X509_REQ_get_attr_by_OBJ;
-+ X509at_add1_attr_by_NID;
-+ X509_REQ_add1_attr_by_OBJ;
-+ X509_REQ_get_attr_count;
-+ X509_REQ_add1_attr;
-+ X509_REQ_delete_attr;
-+ X509at_add1_attr_by_OBJ;
-+ X509_REQ_add1_attr_by_txt;
-+ X509_ATTRIBUTE_create_by_txt;
-+ X509at_add1_attr_by_txt;
-+ BN_pseudo_rand;
-+ BN_is_prime_fasttest;
-+ BN_CTX_end;
-+ BN_CTX_start;
-+ BN_CTX_get;
-+ EVP_PKEY2PKCS8_broken;
-+ ASN1_STRING_TABLE_add;
-+ CRYPTO_dbg_get_options;
-+ AUTHORITY_INFO_ACCESS_new;
-+ CRYPTO_get_mem_debug_options;
-+ DES_crypt;
-+ PEM_write_bio_X509_REQ_NEW;
-+ PEM_write_X509_REQ_NEW;
-+ BIO_callback_ctrl;
-+ RAND_egd;
-+ RAND_status;
-+ bn_dump1;
-+ DES_check_key_parity;
-+ lh_num_items;
-+ RAND_event;
-+ DSO_new;
-+ DSO_new_method;
-+ DSO_free;
-+ DSO_flags;
-+ DSO_up;
-+ DSO_set_default_method;
-+ DSO_get_default_method;
-+ DSO_get_method;
-+ DSO_set_method;
-+ DSO_load;
-+ DSO_bind_var;
-+ DSO_METHOD_null;
-+ DSO_METHOD_openssl;
-+ DSO_METHOD_dlfcn;
-+ DSO_METHOD_win32;
-+ ERR_load_DSO_strings;
-+ DSO_METHOD_dl;
-+ NCONF_load;
-+ NCONF_load_fp;
-+ NCONF_new;
-+ NCONF_get_string;
-+ NCONF_free;
-+ NCONF_get_number;
-+ CONF_dump_fp;
-+ NCONF_load_bio;
-+ NCONF_dump_fp;
-+ NCONF_get_section;
-+ NCONF_dump_bio;
-+ CONF_dump_bio;
-+ NCONF_free_data;
-+ CONF_set_default_method;
-+ ERR_error_string_n;
-+ BIO_snprintf;
-+ DSO_ctrl;
-+ i2d_ASN1_SET_OF_ASN1_INTEGER;
-+ i2d_ASN1_SET_OF_PKCS12_SAFEBAG;
-+ i2d_ASN1_SET_OF_PKCS7;
-+ BIO_vfree;
-+ d2i_ASN1_SET_OF_ASN1_INTEGER;
-+ d2i_ASN1_SET_OF_PKCS12_SAFEBAG;
-+ ASN1_UTCTIME_get;
-+ X509_REQ_digest;
-+ X509_CRL_digest;
-+ d2i_ASN1_SET_OF_PKCS7;
-+ EVP_CIPHER_CTX_set_key_length;
-+ EVP_CIPHER_CTX_ctrl;
-+ BN_mod_exp_mont_word;
-+ RAND_egd_bytes;
-+ X509_REQ_get1_email;
-+ X509_get1_email;
-+ X509_email_free;
-+ i2d_RSA_NET;
-+ d2i_RSA_NET_2;
-+ d2i_RSA_NET;
-+ DSO_bind_func;
-+ CRYPTO_get_new_dynlockid;
-+ sk_new_null;
-+ CRYPTO_set_dynlock_destroy_callback;
-+ CRYPTO_set_dynlock_destroy_cb;
-+ CRYPTO_destroy_dynlockid;
-+ CRYPTO_set_dynlock_size;
-+ CRYPTO_set_dynlock_create_callback;
-+ CRYPTO_set_dynlock_create_cb;
-+ CRYPTO_set_dynlock_lock_callback;
-+ CRYPTO_set_dynlock_lock_cb;
-+ CRYPTO_get_dynlock_lock_callback;
-+ CRYPTO_get_dynlock_lock_cb;
-+ CRYPTO_get_dynlock_destroy_callback;
-+ CRYPTO_get_dynlock_destroy_cb;
-+ CRYPTO_get_dynlock_value;
-+ CRYPTO_get_dynlock_create_callback;
-+ CRYPTO_get_dynlock_create_cb;
-+ c2i_ASN1_BIT_STRING;
-+ i2c_ASN1_BIT_STRING;
-+ RAND_poll;
-+ c2i_ASN1_INTEGER;
-+ i2c_ASN1_INTEGER;
-+ BIO_dump_indent;
-+ ASN1_parse_dump;
-+ c2i_ASN1_OBJECT;
-+ X509_NAME_print_ex_fp;
-+ ASN1_STRING_print_ex_fp;
-+ X509_NAME_print_ex;
-+ ASN1_STRING_print_ex;
-+ MD4;
-+ MD4_Transform;
-+ MD4_Final;
-+ MD4_Update;
-+ MD4_Init;
-+ EVP_md4;
-+ i2d_PUBKEY_bio;
-+ i2d_PUBKEY_fp;
-+ d2i_PUBKEY_bio;
-+ ASN1_STRING_to_UTF8;
-+ BIO_vprintf;
-+ BIO_vsnprintf;
-+ d2i_PUBKEY_fp;
-+ X509_cmp_time;
-+ X509_STORE_CTX_set_time;
-+ X509_STORE_CTX_get1_issuer;
-+ X509_OBJECT_retrieve_match;
-+ X509_OBJECT_idx_by_subject;
-+ X509_STORE_CTX_set_flags;
-+ X509_STORE_CTX_trusted_stack;
-+ X509_time_adj;
-+ X509_check_issued;
-+ ASN1_UTCTIME_cmp_time_t;
-+ DES_set_weak_key_flag;
-+ DES_check_key;
-+ DES_rw_mode;
-+ RSA_PKCS1_RSAref;
-+ X509_keyid_set1;
-+ BIO_next;
-+ DSO_METHOD_vms;
-+ BIO_f_linebuffer;
-+ BN_bntest_rand;
-+ OPENSSL_issetugid;
-+ BN_rand_range;
-+ ERR_load_ENGINE_strings;
-+ ENGINE_set_DSA;
-+ ENGINE_get_finish_function;
-+ ENGINE_get_default_RSA;
-+ ENGINE_get_BN_mod_exp;
-+ DSA_get_default_openssl_method;
-+ ENGINE_set_DH;
-+ ENGINE_set_def_BN_mod_exp_crt;
-+ ENGINE_set_default_BN_mod_exp_crt;
-+ ENGINE_init;
-+ DH_get_default_openssl_method;
-+ RSA_set_default_openssl_method;
-+ ENGINE_finish;
-+ ENGINE_load_public_key;
-+ ENGINE_get_DH;
-+ ENGINE_ctrl;
-+ ENGINE_get_init_function;
-+ ENGINE_set_init_function;
-+ ENGINE_set_default_DSA;
-+ ENGINE_get_name;
-+ ENGINE_get_last;
-+ ENGINE_get_prev;
-+ ENGINE_get_default_DH;
-+ ENGINE_get_RSA;
-+ ENGINE_set_default;
-+ ENGINE_get_RAND;
-+ ENGINE_get_first;
-+ ENGINE_by_id;
-+ ENGINE_set_finish_function;
-+ ENGINE_get_def_BN_mod_exp_crt;
-+ ENGINE_get_default_BN_mod_exp_crt;
-+ RSA_get_default_openssl_method;
-+ ENGINE_set_RSA;
-+ ENGINE_load_private_key;
-+ ENGINE_set_default_RAND;
-+ ENGINE_set_BN_mod_exp;
-+ ENGINE_remove;
-+ ENGINE_free;
-+ ENGINE_get_BN_mod_exp_crt;
-+ ENGINE_get_next;
-+ ENGINE_set_name;
-+ ENGINE_get_default_DSA;
-+ ENGINE_set_default_BN_mod_exp;
-+ ENGINE_set_default_RSA;
-+ ENGINE_get_default_RAND;
-+ ENGINE_get_default_BN_mod_exp;
-+ ENGINE_set_RAND;
-+ ENGINE_set_id;
-+ ENGINE_set_BN_mod_exp_crt;
-+ ENGINE_set_default_DH;
-+ ENGINE_new;
-+ ENGINE_get_id;
-+ DSA_set_default_openssl_method;
-+ ENGINE_add;
-+ DH_set_default_openssl_method;
-+ ENGINE_get_DSA;
-+ ENGINE_get_ctrl_function;
-+ ENGINE_set_ctrl_function;
-+ BN_pseudo_rand_range;
-+ X509_STORE_CTX_set_verify_cb;
-+ ERR_load_COMP_strings;
-+ PKCS12_item_decrypt_d2i;
-+ ASN1_UTF8STRING_it;
-+ ENGINE_unregister_ciphers;
-+ ENGINE_get_ciphers;
-+ d2i_OCSP_BASICRESP;
-+ KRB5_CHECKSUM_it;
-+ EC_POINT_add;
-+ ASN1_item_ex_i2d;
-+ OCSP_CERTID_it;
-+ d2i_OCSP_RESPBYTES;
-+ X509V3_add1_i2d;
-+ PKCS7_ENVELOPE_it;
-+ UI_add_input_boolean;
-+ ENGINE_unregister_RSA;
-+ X509V3_EXT_nconf;
-+ ASN1_GENERALSTRING_free;
-+ d2i_OCSP_CERTSTATUS;
-+ X509_REVOKED_set_serialNumber;
-+ X509_print_ex;
-+ OCSP_ONEREQ_get1_ext_d2i;
-+ ENGINE_register_all_RAND;
-+ ENGINE_load_dynamic;
-+ PBKDF2PARAM_it;
-+ EXTENDED_KEY_USAGE_new;
-+ EC_GROUP_clear_free;
-+ OCSP_sendreq_bio;
-+ ASN1_item_digest;
-+ OCSP_BASICRESP_delete_ext;
-+ OCSP_SIGNATURE_it;
-+ X509_CRL_it;
-+ OCSP_BASICRESP_add_ext;
-+ KRB5_ENCKEY_it;
-+ UI_method_set_closer;
-+ X509_STORE_set_purpose;
-+ i2d_ASN1_GENERALSTRING;
-+ OCSP_response_status;
-+ i2d_OCSP_SERVICELOC;
-+ ENGINE_get_digest_engine;
-+ EC_GROUP_set_curve_GFp;
-+ OCSP_REQUEST_get_ext_by_OBJ;
-+ _ossl_old_des_random_key;
-+ ASN1_T61STRING_it;
-+ EC_GROUP_method_of;
-+ i2d_KRB5_APREQ;
-+ _ossl_old_des_encrypt;
-+ ASN1_PRINTABLE_new;
-+ HMAC_Init_ex;
-+ d2i_KRB5_AUTHENT;
-+ OCSP_archive_cutoff_new;
-+ EC_POINT_set_Jprojective_coordinates_GFp;
-+ EC_POINT_set_Jproj_coords_GFp;
-+ _ossl_old_des_is_weak_key;
-+ OCSP_BASICRESP_get_ext_by_OBJ;
-+ EC_POINT_oct2point;
-+ OCSP_SINGLERESP_get_ext_count;
-+ UI_ctrl;
-+ _shadow_DES_rw_mode;
-+ asn1_do_adb;
-+ ASN1_template_i2d;
-+ ENGINE_register_DH;
-+ UI_construct_prompt;
-+ X509_STORE_set_trust;
-+ UI_dup_input_string;
-+ d2i_KRB5_APREQ;
-+ EVP_MD_CTX_copy_ex;
-+ OCSP_request_is_signed;
-+ i2d_OCSP_REQINFO;
-+ KRB5_ENCKEY_free;
-+ OCSP_resp_get0;
-+ GENERAL_NAME_it;
-+ ASN1_GENERALIZEDTIME_it;
-+ X509_STORE_set_flags;
-+ EC_POINT_set_compressed_coordinates_GFp;
-+ EC_POINT_set_compr_coords_GFp;
-+ OCSP_response_status_str;
-+ d2i_OCSP_REVOKEDINFO;
-+ OCSP_basic_add1_cert;
-+ ERR_get_implementation;
-+ EVP_CipherFinal_ex;
-+ OCSP_CERTSTATUS_new;
-+ CRYPTO_cleanup_all_ex_data;
-+ OCSP_resp_find;
-+ BN_nnmod;
-+ X509_CRL_sort;
-+ X509_REVOKED_set_revocationDate;
-+ ENGINE_register_RAND;
-+ OCSP_SERVICELOC_new;
-+ EC_POINT_set_affine_coordinates_GFp;
-+ EC_POINT_set_affine_coords_GFp;
-+ _ossl_old_des_options;
-+ SXNET_it;
-+ UI_dup_input_boolean;
-+ PKCS12_add_CSPName_asc;
-+ EC_POINT_is_at_infinity;
-+ ENGINE_load_cryptodev;
-+ DSO_convert_filename;
-+ POLICYQUALINFO_it;
-+ ENGINE_register_ciphers;
-+ BN_mod_lshift_quick;
-+ DSO_set_filename;
-+ ASN1_item_free;
-+ KRB5_TKTBODY_free;
-+ AUTHORITY_KEYID_it;
-+ KRB5_APREQBODY_new;
-+ X509V3_EXT_REQ_add_nconf;
-+ ENGINE_ctrl_cmd_string;
-+ i2d_OCSP_RESPDATA;
-+ EVP_MD_CTX_init;
-+ EXTENDED_KEY_USAGE_free;
-+ PKCS7_ATTR_SIGN_it;
-+ UI_add_error_string;
-+ KRB5_CHECKSUM_free;
-+ OCSP_REQUEST_get_ext;
-+ ENGINE_load_ubsec;
-+ ENGINE_register_all_digests;
-+ PKEY_USAGE_PERIOD_it;
-+ PKCS12_unpack_authsafes;
-+ ASN1_item_unpack;
-+ NETSCAPE_SPKAC_it;
-+ X509_REVOKED_it;
-+ ASN1_STRING_encode;
-+ EVP_aes_128_ecb;
-+ KRB5_AUTHENT_free;
-+ OCSP_BASICRESP_get_ext_by_critical;
-+ OCSP_BASICRESP_get_ext_by_crit;
-+ OCSP_cert_status_str;
-+ d2i_OCSP_REQUEST;
-+ UI_dup_info_string;
-+ _ossl_old_des_xwhite_in2out;
-+ PKCS12_it;
-+ OCSP_SINGLERESP_get_ext_by_critical;
-+ OCSP_SINGLERESP_get_ext_by_crit;
-+ OCSP_CERTSTATUS_free;
-+ _ossl_old_des_crypt;
-+ ASN1_item_i2d;
-+ EVP_DecryptFinal_ex;
-+ ENGINE_load_openssl;
-+ ENGINE_get_cmd_defns;
-+ ENGINE_set_load_privkey_function;
-+ ENGINE_set_load_privkey_fn;
-+ EVP_EncryptFinal_ex;
-+ ENGINE_set_default_digests;
-+ X509_get0_pubkey_bitstr;
-+ asn1_ex_i2c;
-+ ENGINE_register_RSA;
-+ ENGINE_unregister_DSA;
-+ _ossl_old_des_key_sched;
-+ X509_EXTENSION_it;
-+ i2d_KRB5_AUTHENT;
-+ SXNETID_it;
-+ d2i_OCSP_SINGLERESP;
-+ EDIPARTYNAME_new;
-+ PKCS12_certbag2x509;
-+ _ossl_old_des_ofb64_encrypt;
-+ d2i_EXTENDED_KEY_USAGE;
-+ ERR_print_errors_cb;
-+ ENGINE_set_ciphers;
-+ d2i_KRB5_APREQBODY;
-+ UI_method_get_flusher;
-+ X509_PUBKEY_it;
-+ _ossl_old_des_enc_read;
-+ PKCS7_ENCRYPT_it;
-+ i2d_OCSP_RESPONSE;
-+ EC_GROUP_get_cofactor;
-+ PKCS12_unpack_p7data;
-+ d2i_KRB5_AUTHDATA;
-+ OCSP_copy_nonce;
-+ KRB5_AUTHDATA_new;
-+ OCSP_RESPDATA_new;
-+ EC_GFp_mont_method;
-+ OCSP_REVOKEDINFO_free;
-+ UI_get_ex_data;
-+ KRB5_APREQBODY_free;
-+ EC_GROUP_get0_generator;
-+ UI_get_default_method;
-+ X509V3_set_nconf;
-+ PKCS12_item_i2d_encrypt;
-+ X509_add1_ext_i2d;
-+ PKCS7_SIGNER_INFO_it;
-+ KRB5_PRINCNAME_new;
-+ PKCS12_SAFEBAG_it;
-+ EC_GROUP_get_order;
-+ d2i_OCSP_RESPID;
-+ OCSP_request_verify;
-+ NCONF_get_number_e;
-+ _ossl_old_des_decrypt3;
-+ X509_signature_print;
-+ OCSP_SINGLERESP_free;
-+ ENGINE_load_builtin_engines;
-+ i2d_OCSP_ONEREQ;
-+ OCSP_REQUEST_add_ext;
-+ OCSP_RESPBYTES_new;
-+ EVP_MD_CTX_create;
-+ OCSP_resp_find_status;
-+ X509_ALGOR_it;
-+ ASN1_TIME_it;
-+ OCSP_request_set1_name;
-+ OCSP_ONEREQ_get_ext_count;
-+ UI_get0_result;
-+ PKCS12_AUTHSAFES_it;
-+ EVP_aes_256_ecb;
-+ PKCS12_pack_authsafes;
-+ ASN1_IA5STRING_it;
-+ UI_get_input_flags;
-+ EC_GROUP_set_generator;
-+ _ossl_old_des_string_to_2keys;
-+ OCSP_CERTID_free;
-+ X509_CERT_AUX_it;
-+ CERTIFICATEPOLICIES_it;
-+ _ossl_old_des_ede3_cbc_encrypt;
-+ RAND_set_rand_engine;
-+ DSO_get_loaded_filename;
-+ X509_ATTRIBUTE_it;
-+ OCSP_ONEREQ_get_ext_by_NID;
-+ PKCS12_decrypt_skey;
-+ KRB5_AUTHENT_it;
-+ UI_dup_error_string;
-+ RSAPublicKey_it;
-+ i2d_OCSP_REQUEST;
-+ PKCS12_x509crl2certbag;
-+ OCSP_SERVICELOC_it;
-+ ASN1_item_sign;
-+ X509_CRL_set_issuer_name;
-+ OBJ_NAME_do_all_sorted;
-+ i2d_OCSP_BASICRESP;
-+ i2d_OCSP_RESPBYTES;
-+ PKCS12_unpack_p7encdata;
-+ HMAC_CTX_init;
-+ ENGINE_get_digest;
-+ OCSP_RESPONSE_print;
-+ KRB5_TKTBODY_it;
-+ ACCESS_DESCRIPTION_it;
-+ PKCS7_ISSUER_AND_SERIAL_it;
-+ PBE2PARAM_it;
-+ PKCS12_certbag2x509crl;
-+ PKCS7_SIGNED_it;
-+ ENGINE_get_cipher;
-+ i2d_OCSP_CRLID;
-+ OCSP_SINGLERESP_new;
-+ ENGINE_cmd_is_executable;
-+ RSA_up_ref;
-+ ASN1_GENERALSTRING_it;
-+ ENGINE_register_DSA;
-+ X509V3_EXT_add_nconf_sk;
-+ ENGINE_set_load_pubkey_function;
-+ PKCS8_decrypt;
-+ PEM_bytes_read_bio;
-+ DIRECTORYSTRING_it;
-+ d2i_OCSP_CRLID;
-+ EC_POINT_is_on_curve;
-+ CRYPTO_set_locked_mem_ex_functions;
-+ CRYPTO_set_locked_mem_ex_funcs;
-+ d2i_KRB5_CHECKSUM;
-+ ASN1_item_dup;
-+ X509_it;
-+ BN_mod_add;
-+ KRB5_AUTHDATA_free;
-+ _ossl_old_des_cbc_cksum;
-+ ASN1_item_verify;
-+ CRYPTO_set_mem_ex_functions;
-+ EC_POINT_get_Jprojective_coordinates_GFp;
-+ EC_POINT_get_Jproj_coords_GFp;
-+ ZLONG_it;
-+ CRYPTO_get_locked_mem_ex_functions;
-+ CRYPTO_get_locked_mem_ex_funcs;
-+ ASN1_TIME_check;
-+ UI_get0_user_data;
-+ HMAC_CTX_cleanup;
-+ DSA_up_ref;
-+ _ossl_old_des_ede3_cfb64_encrypt;
-+ _ossl_odes_ede3_cfb64_encrypt;
-+ ASN1_BMPSTRING_it;
-+ ASN1_tag2bit;
-+ UI_method_set_flusher;
-+ X509_ocspid_print;
-+ KRB5_ENCDATA_it;
-+ ENGINE_get_load_pubkey_function;
-+ UI_add_user_data;
-+ OCSP_REQUEST_delete_ext;
-+ UI_get_method;
-+ OCSP_ONEREQ_free;
-+ ASN1_PRINTABLESTRING_it;
-+ X509_CRL_set_nextUpdate;
-+ OCSP_REQUEST_it;
-+ OCSP_BASICRESP_it;
-+ AES_ecb_encrypt;
-+ BN_mod_sqr;
-+ NETSCAPE_CERT_SEQUENCE_it;
-+ GENERAL_NAMES_it;
-+ AUTHORITY_INFO_ACCESS_it;
-+ ASN1_FBOOLEAN_it;
-+ UI_set_ex_data;
-+ _ossl_old_des_string_to_key;
-+ ENGINE_register_all_RSA;
-+ d2i_KRB5_PRINCNAME;
-+ OCSP_RESPBYTES_it;
-+ X509_CINF_it;
-+ ENGINE_unregister_digests;
-+ d2i_EDIPARTYNAME;
-+ d2i_OCSP_SERVICELOC;
-+ ENGINE_get_digests;
-+ _ossl_old_des_set_odd_parity;
-+ OCSP_RESPDATA_free;
-+ d2i_KRB5_TICKET;
-+ OTHERNAME_it;
-+ EVP_MD_CTX_cleanup;
-+ d2i_ASN1_GENERALSTRING;
-+ X509_CRL_set_version;
-+ BN_mod_sub;
-+ OCSP_SINGLERESP_get_ext_by_NID;
-+ ENGINE_get_ex_new_index;
-+ OCSP_REQUEST_free;
-+ OCSP_REQUEST_add1_ext_i2d;
-+ X509_VAL_it;
-+ EC_POINTs_make_affine;
-+ EC_POINT_mul;
-+ X509V3_EXT_add_nconf;
-+ X509_TRUST_set;
-+ X509_CRL_add1_ext_i2d;
-+ _ossl_old_des_fcrypt;
-+ DISPLAYTEXT_it;
-+ X509_CRL_set_lastUpdate;
-+ OCSP_BASICRESP_free;
-+ OCSP_BASICRESP_add1_ext_i2d;
-+ d2i_KRB5_AUTHENTBODY;
-+ CRYPTO_set_ex_data_implementation;
-+ CRYPTO_set_ex_data_impl;
-+ KRB5_ENCDATA_new;
-+ DSO_up_ref;
-+ OCSP_crl_reason_str;
-+ UI_get0_result_string;
-+ ASN1_GENERALSTRING_new;
-+ X509_SIG_it;
-+ ERR_set_implementation;
-+ ERR_load_EC_strings;
-+ UI_get0_action_string;
-+ OCSP_ONEREQ_get_ext;
-+ EC_POINT_method_of;
-+ i2d_KRB5_APREQBODY;
-+ _ossl_old_des_ecb3_encrypt;
-+ CRYPTO_get_mem_ex_functions;
-+ ENGINE_get_ex_data;
-+ UI_destroy_method;
-+ ASN1_item_i2d_bio;
-+ OCSP_ONEREQ_get_ext_by_OBJ;
-+ ASN1_primitive_new;
-+ ASN1_PRINTABLE_it;
-+ EVP_aes_192_ecb;
-+ OCSP_SIGNATURE_new;
-+ LONG_it;
-+ ASN1_VISIBLESTRING_it;
-+ OCSP_SINGLERESP_add1_ext_i2d;
-+ d2i_OCSP_CERTID;
-+ ASN1_item_d2i_fp;
-+ CRL_DIST_POINTS_it;
-+ GENERAL_NAME_print;
-+ OCSP_SINGLERESP_delete_ext;
-+ PKCS12_SAFEBAGS_it;
-+ d2i_OCSP_SIGNATURE;
-+ OCSP_request_add1_nonce;
-+ ENGINE_set_cmd_defns;
-+ OCSP_SERVICELOC_free;
-+ EC_GROUP_free;
-+ ASN1_BIT_STRING_it;
-+ X509_REQ_it;
-+ _ossl_old_des_cbc_encrypt;
-+ ERR_unload_strings;
-+ PKCS7_SIGN_ENVELOPE_it;
-+ EDIPARTYNAME_free;
-+ OCSP_REQINFO_free;
-+ EC_GROUP_new_curve_GFp;
-+ OCSP_REQUEST_get1_ext_d2i;
-+ PKCS12_item_pack_safebag;
-+ asn1_ex_c2i;
-+ ENGINE_register_digests;
-+ i2d_OCSP_REVOKEDINFO;
-+ asn1_enc_restore;
-+ UI_free;
-+ UI_new_method;
-+ EVP_EncryptInit_ex;
-+ X509_pubkey_digest;
-+ EC_POINT_invert;
-+ OCSP_basic_sign;
-+ i2d_OCSP_RESPID;
-+ OCSP_check_nonce;
-+ ENGINE_ctrl_cmd;
-+ d2i_KRB5_ENCKEY;
-+ OCSP_parse_url;
-+ OCSP_SINGLERESP_get_ext;
-+ OCSP_CRLID_free;
-+ OCSP_BASICRESP_get1_ext_d2i;
-+ RSAPrivateKey_it;
-+ ENGINE_register_all_DH;
-+ i2d_EDIPARTYNAME;
-+ EC_POINT_get_affine_coordinates_GFp;
-+ EC_POINT_get_affine_coords_GFp;
-+ OCSP_CRLID_new;
-+ ENGINE_get_flags;
-+ OCSP_ONEREQ_it;
-+ UI_process;
-+ ASN1_INTEGER_it;
-+ EVP_CipherInit_ex;
-+ UI_get_string_type;
-+ ENGINE_unregister_DH;
-+ ENGINE_register_all_DSA;
-+ OCSP_ONEREQ_get_ext_by_critical;
-+ bn_dup_expand;
-+ OCSP_cert_id_new;
-+ BASIC_CONSTRAINTS_it;
-+ BN_mod_add_quick;
-+ EC_POINT_new;
-+ EVP_MD_CTX_destroy;
-+ OCSP_RESPBYTES_free;
-+ EVP_aes_128_cbc;
-+ OCSP_SINGLERESP_get1_ext_d2i;
-+ EC_POINT_free;
-+ DH_up_ref;
-+ X509_NAME_ENTRY_it;
-+ UI_get_ex_new_index;
-+ BN_mod_sub_quick;
-+ OCSP_ONEREQ_add_ext;
-+ OCSP_request_sign;
-+ EVP_DigestFinal_ex;
-+ ENGINE_set_digests;
-+ OCSP_id_issuer_cmp;
-+ OBJ_NAME_do_all;
-+ EC_POINTs_mul;
-+ ENGINE_register_complete;
-+ X509V3_EXT_nconf_nid;
-+ ASN1_SEQUENCE_it;
-+ UI_set_default_method;
-+ RAND_query_egd_bytes;
-+ UI_method_get_writer;
-+ UI_OpenSSL;
-+ PEM_def_callback;
-+ ENGINE_cleanup;
-+ DIST_POINT_it;
-+ OCSP_SINGLERESP_it;
-+ d2i_KRB5_TKTBODY;
-+ EC_POINT_cmp;
-+ OCSP_REVOKEDINFO_new;
-+ i2d_OCSP_CERTSTATUS;
-+ OCSP_basic_add1_nonce;
-+ ASN1_item_ex_d2i;
-+ BN_mod_lshift1_quick;
-+ UI_set_method;
-+ OCSP_id_get0_info;
-+ BN_mod_sqrt;
-+ EC_GROUP_copy;
-+ KRB5_ENCDATA_free;
-+ _ossl_old_des_cfb_encrypt;
-+ OCSP_SINGLERESP_get_ext_by_OBJ;
-+ OCSP_cert_to_id;
-+ OCSP_RESPID_new;
-+ OCSP_RESPDATA_it;
-+ d2i_OCSP_RESPDATA;
-+ ENGINE_register_all_complete;
-+ OCSP_check_validity;
-+ PKCS12_BAGS_it;
-+ OCSP_url_svcloc_new;
-+ ASN1_template_free;
-+ OCSP_SINGLERESP_add_ext;
-+ KRB5_AUTHENTBODY_it;
-+ X509_supported_extension;
-+ i2d_KRB5_AUTHDATA;
-+ UI_method_get_opener;
-+ ENGINE_set_ex_data;
-+ OCSP_REQUEST_print;
-+ CBIGNUM_it;
-+ KRB5_TICKET_new;
-+ KRB5_APREQ_new;
-+ EC_GROUP_get_curve_GFp;
-+ KRB5_ENCKEY_new;
-+ ASN1_template_d2i;
-+ _ossl_old_des_quad_cksum;
-+ OCSP_single_get0_status;
-+ BN_swap;
-+ POLICYINFO_it;
-+ ENGINE_set_destroy_function;
-+ asn1_enc_free;
-+ OCSP_RESPID_it;
-+ EC_GROUP_new;
-+ EVP_aes_256_cbc;
-+ i2d_KRB5_PRINCNAME;
-+ _ossl_old_des_encrypt2;
-+ _ossl_old_des_encrypt3;
-+ PKCS8_PRIV_KEY_INFO_it;
-+ OCSP_REQINFO_it;
-+ PBEPARAM_it;
-+ KRB5_AUTHENTBODY_new;
-+ X509_CRL_add0_revoked;
-+ EDIPARTYNAME_it;
-+ NETSCAPE_SPKI_it;
-+ UI_get0_test_string;
-+ ENGINE_get_cipher_engine;
-+ ENGINE_register_all_ciphers;
-+ EC_POINT_copy;
-+ BN_kronecker;
-+ _ossl_old_des_ede3_ofb64_encrypt;
-+ _ossl_odes_ede3_ofb64_encrypt;
-+ UI_method_get_reader;
-+ OCSP_BASICRESP_get_ext_count;
-+ ASN1_ENUMERATED_it;
-+ UI_set_result;
-+ i2d_KRB5_TICKET;
-+ X509_print_ex_fp;
-+ EVP_CIPHER_CTX_set_padding;
-+ d2i_OCSP_RESPONSE;
-+ ASN1_UTCTIME_it;
-+ _ossl_old_des_enc_write;
-+ OCSP_RESPONSE_new;
-+ AES_set_encrypt_key;
-+ OCSP_resp_count;
-+ KRB5_CHECKSUM_new;
-+ ENGINE_load_cswift;
-+ OCSP_onereq_get0_id;
-+ ENGINE_set_default_ciphers;
-+ NOTICEREF_it;
-+ X509V3_EXT_CRL_add_nconf;
-+ OCSP_REVOKEDINFO_it;
-+ AES_encrypt;
-+ OCSP_REQUEST_new;
-+ ASN1_ANY_it;
-+ CRYPTO_ex_data_new_class;
-+ _ossl_old_des_ncbc_encrypt;
-+ i2d_KRB5_TKTBODY;
-+ EC_POINT_clear_free;
-+ AES_decrypt;
-+ asn1_enc_init;
-+ UI_get_result_maxsize;
-+ OCSP_CERTID_new;
-+ ENGINE_unregister_RAND;
-+ UI_method_get_closer;
-+ d2i_KRB5_ENCDATA;
-+ OCSP_request_onereq_count;
-+ OCSP_basic_verify;
-+ KRB5_AUTHENTBODY_free;
-+ ASN1_item_d2i;
-+ ASN1_primitive_free;
-+ i2d_EXTENDED_KEY_USAGE;
-+ i2d_OCSP_SIGNATURE;
-+ asn1_enc_save;
-+ ENGINE_load_nuron;
-+ _ossl_old_des_pcbc_encrypt;
-+ PKCS12_MAC_DATA_it;
-+ OCSP_accept_responses_new;
-+ asn1_do_lock;
-+ PKCS7_ATTR_VERIFY_it;
-+ KRB5_APREQBODY_it;
-+ i2d_OCSP_SINGLERESP;
-+ ASN1_item_ex_new;
-+ UI_add_verify_string;
-+ _ossl_old_des_set_key;
-+ KRB5_PRINCNAME_it;
-+ EVP_DecryptInit_ex;
-+ i2d_OCSP_CERTID;
-+ ASN1_item_d2i_bio;
-+ EC_POINT_dbl;
-+ asn1_get_choice_selector;
-+ i2d_KRB5_CHECKSUM;
-+ ENGINE_set_table_flags;
-+ AES_options;
-+ ENGINE_load_chil;
-+ OCSP_id_cmp;
-+ OCSP_BASICRESP_new;
-+ OCSP_REQUEST_get_ext_by_NID;
-+ KRB5_APREQ_it;
-+ ENGINE_get_destroy_function;
-+ CONF_set_nconf;
-+ ASN1_PRINTABLE_free;
-+ OCSP_BASICRESP_get_ext_by_NID;
-+ DIST_POINT_NAME_it;
-+ X509V3_extensions_print;
-+ _ossl_old_des_cfb64_encrypt;
-+ X509_REVOKED_add1_ext_i2d;
-+ _ossl_old_des_ofb_encrypt;
-+ KRB5_TKTBODY_new;
-+ ASN1_OCTET_STRING_it;
-+ ERR_load_UI_strings;
-+ i2d_KRB5_ENCKEY;
-+ ASN1_template_new;
-+ OCSP_SIGNATURE_free;
-+ ASN1_item_i2d_fp;
-+ KRB5_PRINCNAME_free;
-+ PKCS7_RECIP_INFO_it;
-+ EXTENDED_KEY_USAGE_it;
-+ EC_GFp_simple_method;
-+ EC_GROUP_precompute_mult;
-+ OCSP_request_onereq_get0;
-+ UI_method_set_writer;
-+ KRB5_AUTHENT_new;
-+ X509_CRL_INFO_it;
-+ DSO_set_name_converter;
-+ AES_set_decrypt_key;
-+ PKCS7_DIGEST_it;
-+ PKCS12_x5092certbag;
-+ EVP_DigestInit_ex;
-+ i2a_ACCESS_DESCRIPTION;
-+ OCSP_RESPONSE_it;
-+ PKCS7_ENC_CONTENT_it;
-+ OCSP_request_add0_id;
-+ EC_POINT_make_affine;
-+ DSO_get_filename;
-+ OCSP_CERTSTATUS_it;
-+ OCSP_request_add1_cert;
-+ UI_get0_output_string;
-+ UI_dup_verify_string;
-+ BN_mod_lshift;
-+ KRB5_AUTHDATA_it;
-+ asn1_set_choice_selector;
-+ OCSP_basic_add1_status;
-+ OCSP_RESPID_free;
-+ asn1_get_field_ptr;
-+ UI_add_input_string;
-+ OCSP_CRLID_it;
-+ i2d_KRB5_AUTHENTBODY;
-+ OCSP_REQUEST_get_ext_count;
-+ ENGINE_load_atalla;
-+ X509_NAME_it;
-+ USERNOTICE_it;
-+ OCSP_REQINFO_new;
-+ OCSP_BASICRESP_get_ext;
-+ CRYPTO_get_ex_data_implementation;
-+ CRYPTO_get_ex_data_impl;
-+ ASN1_item_pack;
-+ i2d_KRB5_ENCDATA;
-+ X509_PURPOSE_set;
-+ X509_REQ_INFO_it;
-+ UI_method_set_opener;
-+ ASN1_item_ex_free;
-+ ASN1_BOOLEAN_it;
-+ ENGINE_get_table_flags;
-+ UI_create_method;
-+ OCSP_ONEREQ_add1_ext_i2d;
-+ _shadow_DES_check_key;
-+ d2i_OCSP_REQINFO;
-+ UI_add_info_string;
-+ UI_get_result_minsize;
-+ ASN1_NULL_it;
-+ BN_mod_lshift1;
-+ d2i_OCSP_ONEREQ;
-+ OCSP_ONEREQ_new;
-+ KRB5_TICKET_it;
-+ EVP_aes_192_cbc;
-+ KRB5_TICKET_free;
-+ UI_new;
-+ OCSP_response_create;
-+ _ossl_old_des_xcbc_encrypt;
-+ PKCS7_it;
-+ OCSP_REQUEST_get_ext_by_critical;
-+ OCSP_REQUEST_get_ext_by_crit;
-+ ENGINE_set_flags;
-+ _ossl_old_des_ecb_encrypt;
-+ OCSP_response_get1_basic;
-+ EVP_Digest;
-+ OCSP_ONEREQ_delete_ext;
-+ ASN1_TBOOLEAN_it;
-+ ASN1_item_new;
-+ ASN1_TIME_to_generalizedtime;
-+ BIGNUM_it;
-+ AES_cbc_encrypt;
-+ ENGINE_get_load_privkey_function;
-+ ENGINE_get_load_privkey_fn;
-+ OCSP_RESPONSE_free;
-+ UI_method_set_reader;
-+ i2d_ASN1_T61STRING;
-+ EC_POINT_set_to_infinity;
-+ ERR_load_OCSP_strings;
-+ EC_POINT_point2oct;
-+ KRB5_APREQ_free;
-+ ASN1_OBJECT_it;
-+ OCSP_crlID_new;
-+ OCSP_crlID2_new;
-+ CONF_modules_load_file;
-+ CONF_imodule_set_usr_data;
-+ ENGINE_set_default_string;
-+ CONF_module_get_usr_data;
-+ ASN1_add_oid_module;
-+ CONF_modules_finish;
-+ OPENSSL_config;
-+ CONF_modules_unload;
-+ CONF_imodule_get_value;
-+ CONF_module_set_usr_data;
-+ CONF_parse_list;
-+ CONF_module_add;
-+ CONF_get1_default_config_file;
-+ CONF_imodule_get_flags;
-+ CONF_imodule_get_module;
-+ CONF_modules_load;
-+ CONF_imodule_get_name;
-+ ERR_peek_top_error;
-+ CONF_imodule_get_usr_data;
-+ CONF_imodule_set_flags;
-+ ENGINE_add_conf_module;
-+ ERR_peek_last_error_line;
-+ ERR_peek_last_error_line_data;
-+ ERR_peek_last_error;
-+ DES_read_2passwords;
-+ DES_read_password;
-+ UI_UTIL_read_pw;
-+ UI_UTIL_read_pw_string;
-+ ENGINE_load_aep;
-+ ENGINE_load_sureware;
-+ OPENSSL_add_all_algorithms_noconf;
-+ OPENSSL_add_all_algo_noconf;
-+ OPENSSL_add_all_algorithms_conf;
-+ OPENSSL_add_all_algo_conf;
-+ OPENSSL_load_builtin_modules;
-+ AES_ofb128_encrypt;
-+ AES_ctr128_encrypt;
-+ AES_cfb128_encrypt;
-+ ENGINE_load_4758cca;
-+ _ossl_096_des_random_seed;
-+ EVP_aes_256_ofb;
-+ EVP_aes_192_ofb;
-+ EVP_aes_128_cfb128;
-+ EVP_aes_256_cfb128;
-+ EVP_aes_128_ofb;
-+ EVP_aes_192_cfb128;
-+ CONF_modules_free;
-+ NCONF_default;
-+ OPENSSL_no_config;
-+ NCONF_WIN32;
-+ ASN1_UNIVERSALSTRING_new;
-+ EVP_des_ede_ecb;
-+ i2d_ASN1_UNIVERSALSTRING;
-+ ASN1_UNIVERSALSTRING_free;
-+ ASN1_UNIVERSALSTRING_it;
-+ d2i_ASN1_UNIVERSALSTRING;
-+ EVP_des_ede3_ecb;
-+ X509_REQ_print_ex;
-+ ENGINE_up_ref;
-+ BUF_MEM_grow_clean;
-+ CRYPTO_realloc_clean;
-+ BUF_strlcat;
-+ BIO_indent;
-+ BUF_strlcpy;
-+ OpenSSLDie;
-+ OPENSSL_cleanse;
-+ ENGINE_setup_bsd_cryptodev;
-+ ERR_release_err_state_table;
-+ EVP_aes_128_cfb8;
-+ FIPS_corrupt_rsa;
-+ FIPS_selftest_des;
-+ EVP_aes_128_cfb1;
-+ EVP_aes_192_cfb8;
-+ FIPS_mode_set;
-+ FIPS_selftest_dsa;
-+ EVP_aes_256_cfb8;
-+ FIPS_allow_md5;
-+ DES_ede3_cfb_encrypt;
-+ EVP_des_ede3_cfb8;
-+ FIPS_rand_seeded;
-+ AES_cfbr_encrypt_block;
-+ AES_cfb8_encrypt;
-+ FIPS_rand_seed;
-+ FIPS_corrupt_des;
-+ EVP_aes_192_cfb1;
-+ FIPS_selftest_aes;
-+ FIPS_set_prng_key;
-+ EVP_des_cfb8;
-+ FIPS_corrupt_dsa;
-+ FIPS_test_mode;
-+ FIPS_rand_method;
-+ EVP_aes_256_cfb1;
-+ ERR_load_FIPS_strings;
-+ FIPS_corrupt_aes;
-+ FIPS_selftest_sha1;
-+ FIPS_selftest_rsa;
-+ FIPS_corrupt_sha1;
-+ EVP_des_cfb1;
-+ FIPS_dsa_check;
-+ AES_cfb1_encrypt;
-+ EVP_des_ede3_cfb1;
-+ FIPS_rand_check;
-+ FIPS_md5_allowed;
-+ FIPS_mode;
-+ FIPS_selftest_failed;
-+ sk_is_sorted;
-+ X509_check_ca;
-+ HMAC_CTX_set_flags;
-+ d2i_PROXY_CERT_INFO_EXTENSION;
-+ PROXY_POLICY_it;
-+ i2d_PROXY_POLICY;
-+ i2d_PROXY_CERT_INFO_EXTENSION;
-+ d2i_PROXY_POLICY;
-+ PROXY_CERT_INFO_EXTENSION_new;
-+ PROXY_CERT_INFO_EXTENSION_free;
-+ PROXY_CERT_INFO_EXTENSION_it;
-+ PROXY_POLICY_free;
-+ PROXY_POLICY_new;
-+ BN_MONT_CTX_set_locked;
-+ FIPS_selftest_rng;
-+ EVP_sha384;
-+ EVP_sha512;
-+ EVP_sha224;
-+ EVP_sha256;
-+ FIPS_selftest_hmac;
-+ FIPS_corrupt_rng;
-+ BN_mod_exp_mont_consttime;
-+ RSA_X931_hash_id;
-+ RSA_padding_check_X931;
-+ RSA_verify_PKCS1_PSS;
-+ RSA_padding_add_X931;
-+ RSA_padding_add_PKCS1_PSS;
-+ PKCS1_MGF1;
-+ BN_X931_generate_Xpq;
-+ RSA_X931_generate_key;
-+ BN_X931_derive_prime;
-+ BN_X931_generate_prime;
-+ RSA_X931_derive;
-+ BIO_new_dgram;
-+ BN_get0_nist_prime_384;
-+ ERR_set_mark;
-+ X509_STORE_CTX_set0_crls;
-+ ENGINE_set_STORE;
-+ ENGINE_register_ECDSA;
-+ STORE_meth_set_list_start_fn;
-+ STORE_method_set_list_start_function;
-+ BN_BLINDING_invert_ex;
-+ NAME_CONSTRAINTS_free;
-+ STORE_ATTR_INFO_set_number;
-+ BN_BLINDING_get_thread_id;
-+ X509_STORE_CTX_set0_param;
-+ POLICY_MAPPING_it;
-+ STORE_parse_attrs_start;
-+ POLICY_CONSTRAINTS_free;
-+ EVP_PKEY_add1_attr_by_NID;
-+ BN_nist_mod_192;
-+ EC_GROUP_get_trinomial_basis;
-+ STORE_set_method;
-+ GENERAL_SUBTREE_free;
-+ NAME_CONSTRAINTS_it;
-+ ECDH_get_default_method;
-+ PKCS12_add_safe;
-+ EC_KEY_new_by_curve_name;
-+ STORE_meth_get_update_store_fn;
-+ STORE_method_get_update_store_function;
-+ ENGINE_register_ECDH;
-+ SHA512_Update;
-+ i2d_ECPrivateKey;
-+ BN_get0_nist_prime_192;
-+ STORE_modify_certificate;
-+ EC_POINT_set_affine_coordinates_GF2m;
-+ EC_POINT_set_affine_coords_GF2m;
-+ BN_GF2m_mod_exp_arr;
-+ STORE_ATTR_INFO_modify_number;
-+ X509_keyid_get0;
-+ ENGINE_load_gmp;
-+ pitem_new;
-+ BN_GF2m_mod_mul_arr;
-+ STORE_list_public_key_endp;
-+ o2i_ECPublicKey;
-+ EC_KEY_copy;
-+ BIO_dump_fp;
-+ X509_policy_node_get0_parent;
-+ EC_GROUP_check_discriminant;
-+ i2o_ECPublicKey;
-+ EC_KEY_precompute_mult;
-+ a2i_IPADDRESS;
-+ STORE_meth_set_initialise_fn;
-+ STORE_method_set_initialise_function;
-+ X509_STORE_CTX_set_depth;
-+ X509_VERIFY_PARAM_inherit;
-+ EC_POINT_point2bn;
-+ STORE_ATTR_INFO_set_dn;
-+ X509_policy_tree_get0_policies;
-+ EC_GROUP_new_curve_GF2m;
-+ STORE_destroy_method;
-+ ENGINE_unregister_STORE;
-+ EVP_PKEY_get1_EC_KEY;
-+ STORE_ATTR_INFO_get0_number;
-+ ENGINE_get_default_ECDH;
-+ EC_KEY_get_conv_form;
-+ ASN1_OCTET_STRING_NDEF_it;
-+ STORE_delete_public_key;
-+ STORE_get_public_key;
-+ STORE_modify_arbitrary;
-+ ENGINE_get_static_state;
-+ pqueue_iterator;
-+ ECDSA_SIG_new;
-+ OPENSSL_DIR_end;
-+ BN_GF2m_mod_sqr;
-+ EC_POINT_bn2point;
-+ X509_VERIFY_PARAM_set_depth;
-+ EC_KEY_set_asn1_flag;
-+ STORE_get_method;
-+ EC_KEY_get_key_method_data;
-+ ECDSA_sign_ex;
-+ STORE_parse_attrs_end;
-+ EC_GROUP_get_point_conversion_form;
-+ EC_GROUP_get_point_conv_form;
-+ STORE_method_set_store_function;
-+ STORE_ATTR_INFO_in;
-+ PEM_read_bio_ECPKParameters;
-+ EC_GROUP_get_pentanomial_basis;
-+ EVP_PKEY_add1_attr_by_txt;
-+ BN_BLINDING_set_flags;
-+ X509_VERIFY_PARAM_set1_policies;
-+ X509_VERIFY_PARAM_set1_name;
-+ X509_VERIFY_PARAM_set_purpose;
-+ STORE_get_number;
-+ ECDSA_sign_setup;
-+ BN_GF2m_mod_solve_quad_arr;
-+ EC_KEY_up_ref;
-+ POLICY_MAPPING_free;
-+ BN_GF2m_mod_div;
-+ X509_VERIFY_PARAM_set_flags;
-+ EC_KEY_free;
-+ STORE_meth_set_list_next_fn;
-+ STORE_method_set_list_next_function;
-+ PEM_write_bio_ECPrivateKey;
-+ d2i_EC_PUBKEY;
-+ STORE_meth_get_generate_fn;
-+ STORE_method_get_generate_function;
-+ STORE_meth_set_list_end_fn;
-+ STORE_method_set_list_end_function;
-+ pqueue_print;
-+ EC_GROUP_have_precompute_mult;
-+ EC_KEY_print_fp;
-+ BN_GF2m_mod_arr;
-+ PEM_write_bio_X509_CERT_PAIR;
-+ EVP_PKEY_cmp;
-+ X509_policy_level_node_count;
-+ STORE_new_engine;
-+ STORE_list_public_key_start;
-+ X509_VERIFY_PARAM_new;
-+ ECDH_get_ex_data;
-+ EVP_PKEY_get_attr;
-+ ECDSA_do_sign;
-+ ENGINE_unregister_ECDH;
-+ ECDH_OpenSSL;
-+ EC_KEY_set_conv_form;
-+ EC_POINT_dup;
-+ GENERAL_SUBTREE_new;
-+ STORE_list_crl_endp;
-+ EC_get_builtin_curves;
-+ X509_policy_node_get0_qualifiers;
-+ X509_pcy_node_get0_qualifiers;
-+ STORE_list_crl_end;
-+ EVP_PKEY_set1_EC_KEY;
-+ BN_GF2m_mod_sqrt_arr;
-+ i2d_ECPrivateKey_bio;
-+ ECPKParameters_print_fp;
-+ pqueue_find;
-+ ECDSA_SIG_free;
-+ PEM_write_bio_ECPKParameters;
-+ STORE_method_set_ctrl_function;
-+ STORE_list_public_key_end;
-+ EC_KEY_set_private_key;
-+ pqueue_peek;
-+ STORE_get_arbitrary;
-+ STORE_store_crl;
-+ X509_policy_node_get0_policy;
-+ PKCS12_add_safes;
-+ BN_BLINDING_convert_ex;
-+ X509_policy_tree_free;
-+ OPENSSL_ia32cap_loc;
-+ BN_GF2m_poly2arr;
-+ STORE_ctrl;
-+ STORE_ATTR_INFO_compare;
-+ BN_get0_nist_prime_224;
-+ i2d_ECParameters;
-+ i2d_ECPKParameters;
-+ BN_GENCB_call;
-+ d2i_ECPKParameters;
-+ STORE_meth_set_generate_fn;
-+ STORE_method_set_generate_function;
-+ ENGINE_set_ECDH;
-+ NAME_CONSTRAINTS_new;
-+ SHA256_Init;
-+ EC_KEY_get0_public_key;
-+ PEM_write_bio_EC_PUBKEY;
-+ STORE_ATTR_INFO_set_cstr;
-+ STORE_list_crl_next;
-+ STORE_ATTR_INFO_in_range;
-+ ECParameters_print;
-+ STORE_meth_set_delete_fn;
-+ STORE_method_set_delete_function;
-+ STORE_list_certificate_next;
-+ ASN1_generate_nconf;
-+ BUF_memdup;
-+ BN_GF2m_mod_mul;
-+ STORE_meth_get_list_next_fn;
-+ STORE_method_get_list_next_function;
-+ STORE_ATTR_INFO_get0_dn;
-+ STORE_list_private_key_next;
-+ EC_GROUP_set_seed;
-+ X509_VERIFY_PARAM_set_trust;
-+ STORE_ATTR_INFO_free;
-+ STORE_get_private_key;
-+ EVP_PKEY_get_attr_count;
-+ STORE_ATTR_INFO_new;
-+ EC_GROUP_get_curve_GF2m;
-+ STORE_meth_set_revoke_fn;
-+ STORE_method_set_revoke_function;
-+ STORE_store_number;
-+ BN_is_prime_ex;
-+ STORE_revoke_public_key;
-+ X509_STORE_CTX_get0_param;
-+ STORE_delete_arbitrary;
-+ PEM_read_X509_CERT_PAIR;
-+ X509_STORE_set_depth;
-+ ECDSA_get_ex_data;
-+ SHA224;
-+ BIO_dump_indent_fp;
-+ EC_KEY_set_group;
-+ BUF_strndup;
-+ STORE_list_certificate_start;
-+ BN_GF2m_mod;
-+ X509_REQ_check_private_key;
-+ EC_GROUP_get_seed_len;
-+ ERR_load_STORE_strings;
-+ PEM_read_bio_EC_PUBKEY;
-+ STORE_list_private_key_end;
-+ i2d_EC_PUBKEY;
-+ ECDSA_get_default_method;
-+ ASN1_put_eoc;
-+ X509_STORE_CTX_get_explicit_policy;
-+ X509_STORE_CTX_get_expl_policy;
-+ X509_VERIFY_PARAM_table_cleanup;
-+ STORE_modify_private_key;
-+ X509_VERIFY_PARAM_free;
-+ EC_METHOD_get_field_type;
-+ EC_GFp_nist_method;
-+ STORE_meth_set_modify_fn;
-+ STORE_method_set_modify_function;
-+ STORE_parse_attrs_next;
-+ ENGINE_load_padlock;
-+ EC_GROUP_set_curve_name;
-+ X509_CERT_PAIR_it;
-+ STORE_meth_get_revoke_fn;
-+ STORE_method_get_revoke_function;
-+ STORE_method_set_get_function;
-+ STORE_modify_number;
-+ STORE_method_get_store_function;
-+ STORE_store_private_key;
-+ BN_GF2m_mod_sqr_arr;
-+ RSA_setup_blinding;
-+ BIO_s_datagram;
-+ STORE_Memory;
-+ sk_find_ex;
-+ EC_GROUP_set_curve_GF2m;
-+ ENGINE_set_default_ECDSA;
-+ POLICY_CONSTRAINTS_new;
-+ BN_GF2m_mod_sqrt;
-+ ECDH_set_default_method;
-+ EC_KEY_generate_key;
-+ SHA384_Update;
-+ BN_GF2m_arr2poly;
-+ STORE_method_get_get_function;
-+ STORE_meth_set_cleanup_fn;
-+ STORE_method_set_cleanup_function;
-+ EC_GROUP_check;
-+ d2i_ECPrivateKey_bio;
-+ EC_KEY_insert_key_method_data;
-+ STORE_meth_get_lock_store_fn;
-+ STORE_method_get_lock_store_function;
-+ X509_VERIFY_PARAM_get_depth;
-+ SHA224_Final;
-+ STORE_meth_set_update_store_fn;
-+ STORE_method_set_update_store_function;
-+ SHA224_Update;
-+ d2i_ECPrivateKey;
-+ ASN1_item_ndef_i2d;
-+ STORE_delete_private_key;
-+ ERR_pop_to_mark;
-+ ENGINE_register_all_STORE;
-+ X509_policy_level_get0_node;
-+ i2d_PKCS7_NDEF;
-+ EC_GROUP_get_degree;
-+ ASN1_generate_v3;
-+ STORE_ATTR_INFO_modify_cstr;
-+ X509_policy_tree_level_count;
-+ BN_GF2m_add;
-+ EC_KEY_get0_group;
-+ STORE_generate_crl;
-+ STORE_store_public_key;
-+ X509_CERT_PAIR_free;
-+ STORE_revoke_private_key;
-+ BN_nist_mod_224;
-+ SHA512_Final;
-+ STORE_ATTR_INFO_modify_dn;
-+ STORE_meth_get_initialise_fn;
-+ STORE_method_get_initialise_function;
-+ STORE_delete_number;
-+ i2d_EC_PUBKEY_bio;
-+ BIO_dgram_non_fatal_error;
-+ EC_GROUP_get_asn1_flag;
-+ STORE_ATTR_INFO_in_ex;
-+ STORE_list_crl_start;
-+ ECDH_get_ex_new_index;
-+ STORE_meth_get_modify_fn;
-+ STORE_method_get_modify_function;
-+ v2i_ASN1_BIT_STRING;
-+ STORE_store_certificate;
-+ OBJ_bsearch_ex;
-+ X509_STORE_CTX_set_default;
-+ STORE_ATTR_INFO_set_sha1str;
-+ BN_GF2m_mod_inv;
-+ BN_GF2m_mod_exp;
-+ STORE_modify_public_key;
-+ STORE_meth_get_list_start_fn;
-+ STORE_method_get_list_start_function;
-+ EC_GROUP_get0_seed;
-+ STORE_store_arbitrary;
-+ STORE_meth_set_unlock_store_fn;
-+ STORE_method_set_unlock_store_function;
-+ BN_GF2m_mod_div_arr;
-+ ENGINE_set_ECDSA;
-+ STORE_create_method;
-+ ECPKParameters_print;
-+ EC_KEY_get0_private_key;
-+ PEM_write_EC_PUBKEY;
-+ X509_VERIFY_PARAM_set1;
-+ ECDH_set_method;
-+ v2i_GENERAL_NAME_ex;
-+ ECDH_set_ex_data;
-+ STORE_generate_key;
-+ BN_nist_mod_521;
-+ X509_policy_tree_get0_level;
-+ EC_GROUP_set_point_conversion_form;
-+ EC_GROUP_set_point_conv_form;
-+ PEM_read_EC_PUBKEY;
-+ i2d_ECDSA_SIG;
-+ ECDSA_OpenSSL;
-+ STORE_delete_crl;
-+ EC_KEY_get_enc_flags;
-+ ASN1_const_check_infinite_end;
-+ EVP_PKEY_delete_attr;
-+ ECDSA_set_default_method;
-+ EC_POINT_set_compressed_coordinates_GF2m;
-+ EC_POINT_set_compr_coords_GF2m;
-+ EC_GROUP_cmp;
-+ STORE_revoke_certificate;
-+ BN_get0_nist_prime_256;
-+ STORE_meth_get_delete_fn;
-+ STORE_method_get_delete_function;
-+ SHA224_Init;
-+ PEM_read_ECPrivateKey;
-+ SHA512_Init;
-+ STORE_parse_attrs_endp;
-+ BN_set_negative;
-+ ERR_load_ECDSA_strings;
-+ EC_GROUP_get_basis_type;
-+ STORE_list_public_key_next;
-+ i2v_ASN1_BIT_STRING;
-+ STORE_OBJECT_free;
-+ BN_nist_mod_384;
-+ i2d_X509_CERT_PAIR;
-+ PEM_write_ECPKParameters;
-+ ECDH_compute_key;
-+ STORE_ATTR_INFO_get0_sha1str;
-+ ENGINE_register_all_ECDH;
-+ pqueue_pop;
-+ STORE_ATTR_INFO_get0_cstr;
-+ POLICY_CONSTRAINTS_it;
-+ STORE_get_ex_new_index;
-+ EVP_PKEY_get_attr_by_OBJ;
-+ X509_VERIFY_PARAM_add0_policy;
-+ BN_GF2m_mod_solve_quad;
-+ SHA256;
-+ i2d_ECPrivateKey_fp;
-+ X509_policy_tree_get0_user_policies;
-+ X509_pcy_tree_get0_usr_policies;
-+ OPENSSL_DIR_read;
-+ ENGINE_register_all_ECDSA;
-+ X509_VERIFY_PARAM_lookup;
-+ EC_POINT_get_affine_coordinates_GF2m;
-+ EC_POINT_get_affine_coords_GF2m;
-+ EC_GROUP_dup;
-+ ENGINE_get_default_ECDSA;
-+ EC_KEY_new;
-+ SHA256_Transform;
-+ EC_KEY_set_enc_flags;
-+ ECDSA_verify;
-+ EC_POINT_point2hex;
-+ ENGINE_get_STORE;
-+ SHA512;
-+ STORE_get_certificate;
-+ ECDSA_do_sign_ex;
-+ ECDSA_do_verify;
-+ d2i_ECPrivateKey_fp;
-+ STORE_delete_certificate;
-+ SHA512_Transform;
-+ X509_STORE_set1_param;
-+ STORE_method_get_ctrl_function;
-+ STORE_free;
-+ PEM_write_ECPrivateKey;
-+ STORE_meth_get_unlock_store_fn;
-+ STORE_method_get_unlock_store_function;
-+ STORE_get_ex_data;
-+ EC_KEY_set_public_key;
-+ PEM_read_ECPKParameters;
-+ X509_CERT_PAIR_new;
-+ ENGINE_register_STORE;
-+ RSA_generate_key_ex;
-+ DSA_generate_parameters_ex;
-+ ECParameters_print_fp;
-+ X509V3_NAME_from_section;
-+ EVP_PKEY_add1_attr;
-+ STORE_modify_crl;
-+ STORE_list_private_key_start;
-+ POLICY_MAPPINGS_it;
-+ GENERAL_SUBTREE_it;
-+ EC_GROUP_get_curve_name;
-+ PEM_write_X509_CERT_PAIR;
-+ BIO_dump_indent_cb;
-+ d2i_X509_CERT_PAIR;
-+ STORE_list_private_key_endp;
-+ asn1_const_Finish;
-+ i2d_EC_PUBKEY_fp;
-+ BN_nist_mod_256;
-+ X509_VERIFY_PARAM_add0_table;
-+ pqueue_free;
-+ BN_BLINDING_create_param;
-+ ECDSA_size;
-+ d2i_EC_PUBKEY_bio;
-+ BN_get0_nist_prime_521;
-+ STORE_ATTR_INFO_modify_sha1str;
-+ BN_generate_prime_ex;
-+ EC_GROUP_new_by_curve_name;
-+ SHA256_Final;
-+ DH_generate_parameters_ex;
-+ PEM_read_bio_ECPrivateKey;
-+ STORE_meth_get_cleanup_fn;
-+ STORE_method_get_cleanup_function;
-+ ENGINE_get_ECDH;
-+ d2i_ECDSA_SIG;
-+ BN_is_prime_fasttest_ex;
-+ ECDSA_sign;
-+ X509_policy_check;
-+ EVP_PKEY_get_attr_by_NID;
-+ STORE_set_ex_data;
-+ ENGINE_get_ECDSA;
-+ EVP_ecdsa;
-+ BN_BLINDING_get_flags;
-+ PKCS12_add_cert;
-+ STORE_OBJECT_new;
-+ ERR_load_ECDH_strings;
-+ EC_KEY_dup;
-+ EVP_CIPHER_CTX_rand_key;
-+ ECDSA_set_method;
-+ a2i_IPADDRESS_NC;
-+ d2i_ECParameters;
-+ STORE_list_certificate_end;
-+ STORE_get_crl;
-+ X509_POLICY_NODE_print;
-+ SHA384_Init;
-+ EC_GF2m_simple_method;
-+ ECDSA_set_ex_data;
-+ SHA384_Final;
-+ PKCS7_set_digest;
-+ EC_KEY_print;
-+ STORE_meth_set_lock_store_fn;
-+ STORE_method_set_lock_store_function;
-+ ECDSA_get_ex_new_index;
-+ SHA384;
-+ POLICY_MAPPING_new;
-+ STORE_list_certificate_endp;
-+ X509_STORE_CTX_get0_policy_tree;
-+ EC_GROUP_set_asn1_flag;
-+ EC_KEY_check_key;
-+ d2i_EC_PUBKEY_fp;
-+ PKCS7_set0_type_other;
-+ PEM_read_bio_X509_CERT_PAIR;
-+ pqueue_next;
-+ STORE_meth_get_list_end_fn;
-+ STORE_method_get_list_end_function;
-+ EVP_PKEY_add1_attr_by_OBJ;
-+ X509_VERIFY_PARAM_set_time;
-+ pqueue_new;
-+ ENGINE_set_default_ECDH;
-+ STORE_new_method;
-+ PKCS12_add_key;
-+ DSO_merge;
-+ EC_POINT_hex2point;
-+ BIO_dump_cb;
-+ SHA256_Update;
-+ pqueue_insert;
-+ pitem_free;
-+ BN_GF2m_mod_inv_arr;
-+ ENGINE_unregister_ECDSA;
-+ BN_BLINDING_set_thread_id;
-+ get_rfc3526_prime_8192;
-+ X509_VERIFY_PARAM_clear_flags;
-+ get_rfc2409_prime_1024;
-+ DH_check_pub_key;
-+ get_rfc3526_prime_2048;
-+ get_rfc3526_prime_6144;
-+ get_rfc3526_prime_1536;
-+ get_rfc3526_prime_3072;
-+ get_rfc3526_prime_4096;
-+ get_rfc2409_prime_768;
-+ X509_VERIFY_PARAM_get_flags;
-+ EVP_CIPHER_CTX_new;
-+ EVP_CIPHER_CTX_free;
-+ Camellia_cbc_encrypt;
-+ Camellia_cfb128_encrypt;
-+ Camellia_cfb1_encrypt;
-+ Camellia_cfb8_encrypt;
-+ Camellia_ctr128_encrypt;
-+ Camellia_cfbr_encrypt_block;
-+ Camellia_decrypt;
-+ Camellia_ecb_encrypt;
-+ Camellia_encrypt;
-+ Camellia_ofb128_encrypt;
-+ Camellia_set_key;
-+ EVP_camellia_128_cbc;
-+ EVP_camellia_128_cfb128;
-+ EVP_camellia_128_cfb1;
-+ EVP_camellia_128_cfb8;
-+ EVP_camellia_128_ecb;
-+ EVP_camellia_128_ofb;
-+ EVP_camellia_192_cbc;
-+ EVP_camellia_192_cfb128;
-+ EVP_camellia_192_cfb1;
-+ EVP_camellia_192_cfb8;
-+ EVP_camellia_192_ecb;
-+ EVP_camellia_192_ofb;
-+ EVP_camellia_256_cbc;
-+ EVP_camellia_256_cfb128;
-+ EVP_camellia_256_cfb1;
-+ EVP_camellia_256_cfb8;
-+ EVP_camellia_256_ecb;
-+ EVP_camellia_256_ofb;
-+ a2i_ipadd;
-+ ASIdentifiers_free;
-+ i2d_ASIdOrRange;
-+ EVP_CIPHER_block_size;
-+ v3_asid_is_canonical;
-+ IPAddressChoice_free;
-+ EVP_CIPHER_CTX_set_app_data;
-+ BIO_set_callback_arg;
-+ v3_addr_add_prefix;
-+ IPAddressOrRange_it;
-+ BIO_set_flags;
-+ ASIdentifiers_it;
-+ v3_addr_get_range;
-+ BIO_method_type;
-+ v3_addr_inherits;
-+ IPAddressChoice_it;
-+ AES_ige_encrypt;
-+ v3_addr_add_range;
-+ EVP_CIPHER_CTX_nid;
-+ d2i_ASRange;
-+ v3_addr_add_inherit;
-+ v3_asid_add_id_or_range;
-+ v3_addr_validate_resource_set;
-+ EVP_CIPHER_iv_length;
-+ EVP_MD_type;
-+ v3_asid_canonize;
-+ IPAddressRange_free;
-+ v3_asid_add_inherit;
-+ EVP_CIPHER_CTX_key_length;
-+ IPAddressRange_new;
-+ ASIdOrRange_new;
-+ EVP_MD_size;
-+ EVP_MD_CTX_test_flags;
-+ BIO_clear_flags;
-+ i2d_ASRange;
-+ IPAddressRange_it;
-+ IPAddressChoice_new;
-+ ASIdentifierChoice_new;
-+ ASRange_free;
-+ EVP_MD_pkey_type;
-+ EVP_MD_CTX_clear_flags;
-+ IPAddressFamily_free;
-+ i2d_IPAddressFamily;
-+ IPAddressOrRange_new;
-+ EVP_CIPHER_flags;
-+ v3_asid_validate_resource_set;
-+ d2i_IPAddressRange;
-+ AES_bi_ige_encrypt;
-+ BIO_get_callback;
-+ IPAddressOrRange_free;
-+ v3_addr_subset;
-+ d2i_IPAddressFamily;
-+ v3_asid_subset;
-+ BIO_test_flags;
-+ i2d_ASIdentifierChoice;
-+ ASRange_it;
-+ d2i_ASIdentifiers;
-+ ASRange_new;
-+ d2i_IPAddressChoice;
-+ v3_addr_get_afi;
-+ EVP_CIPHER_key_length;
-+ EVP_Cipher;
-+ i2d_IPAddressOrRange;
-+ ASIdOrRange_it;
-+ EVP_CIPHER_nid;
-+ i2d_IPAddressChoice;
-+ EVP_CIPHER_CTX_block_size;
-+ ASIdentifiers_new;
-+ v3_addr_validate_path;
-+ IPAddressFamily_new;
-+ EVP_MD_CTX_set_flags;
-+ v3_addr_is_canonical;
-+ i2d_IPAddressRange;
-+ IPAddressFamily_it;
-+ v3_asid_inherits;
-+ EVP_CIPHER_CTX_cipher;
-+ EVP_CIPHER_CTX_get_app_data;
-+ EVP_MD_block_size;
-+ EVP_CIPHER_CTX_flags;
-+ v3_asid_validate_path;
-+ d2i_IPAddressOrRange;
-+ v3_addr_canonize;
-+ ASIdentifierChoice_it;
-+ EVP_MD_CTX_md;
-+ d2i_ASIdentifierChoice;
-+ BIO_method_name;
-+ EVP_CIPHER_CTX_iv_length;
-+ ASIdOrRange_free;
-+ ASIdentifierChoice_free;
-+ BIO_get_callback_arg;
-+ BIO_set_callback;
-+ d2i_ASIdOrRange;
-+ i2d_ASIdentifiers;
-+ SEED_decrypt;
-+ SEED_encrypt;
-+ SEED_cbc_encrypt;
-+ EVP_seed_ofb;
-+ SEED_cfb128_encrypt;
-+ SEED_ofb128_encrypt;
-+ EVP_seed_cbc;
-+ SEED_ecb_encrypt;
-+ EVP_seed_ecb;
-+ SEED_set_key;
-+ EVP_seed_cfb128;
-+ X509_EXTENSIONS_it;
-+ X509_get1_ocsp;
-+ OCSP_REQ_CTX_free;
-+ i2d_X509_EXTENSIONS;
-+ OCSP_sendreq_nbio;
-+ OCSP_sendreq_new;
-+ d2i_X509_EXTENSIONS;
-+ X509_ALGORS_it;
-+ X509_ALGOR_get0;
-+ X509_ALGOR_set0;
-+ AES_unwrap_key;
-+ AES_wrap_key;
-+ X509at_get0_data_by_OBJ;
-+ ASN1_TYPE_set1;
-+ ASN1_STRING_set0;
-+ i2d_X509_ALGORS;
-+ BIO_f_zlib;
-+ COMP_zlib_cleanup;
-+ d2i_X509_ALGORS;
-+ CMS_ReceiptRequest_free;
-+ PEM_write_CMS;
-+ CMS_add0_CertificateChoices;
-+ CMS_unsigned_add1_attr_by_OBJ;
-+ ERR_load_CMS_strings;
-+ CMS_sign_receipt;
-+ i2d_CMS_ContentInfo;
-+ CMS_signed_delete_attr;
-+ d2i_CMS_bio;
-+ CMS_unsigned_get_attr_by_NID;
-+ CMS_verify;
-+ SMIME_read_CMS;
-+ CMS_decrypt_set1_key;
-+ CMS_SignerInfo_get0_algs;
-+ CMS_add1_cert;
-+ CMS_set_detached;
-+ CMS_encrypt;
-+ CMS_EnvelopedData_create;
-+ CMS_uncompress;
-+ CMS_add0_crl;
-+ CMS_SignerInfo_verify_content;
-+ CMS_unsigned_get0_data_by_OBJ;
-+ PEM_write_bio_CMS;
-+ CMS_unsigned_get_attr;
-+ CMS_RecipientInfo_ktri_cert_cmp;
-+ CMS_RecipientInfo_ktri_get0_algs;
-+ CMS_RecipInfo_ktri_get0_algs;
-+ CMS_ContentInfo_free;
-+ CMS_final;
-+ CMS_add_simple_smimecap;
-+ CMS_SignerInfo_verify;
-+ CMS_data;
-+ CMS_ContentInfo_it;
-+ d2i_CMS_ReceiptRequest;
-+ CMS_compress;
-+ CMS_digest_create;
-+ CMS_SignerInfo_cert_cmp;
-+ CMS_SignerInfo_sign;
-+ CMS_data_create;
-+ i2d_CMS_bio;
-+ CMS_EncryptedData_set1_key;
-+ CMS_decrypt;
-+ int_smime_write_ASN1;
-+ CMS_unsigned_delete_attr;
-+ CMS_unsigned_get_attr_count;
-+ CMS_add_smimecap;
-+ PEM_read_CMS;
-+ CMS_signed_get_attr_by_OBJ;
-+ d2i_CMS_ContentInfo;
-+ CMS_add_standard_smimecap;
-+ CMS_ContentInfo_new;
-+ CMS_RecipientInfo_type;
-+ CMS_get0_type;
-+ CMS_is_detached;
-+ CMS_sign;
-+ CMS_signed_add1_attr;
-+ CMS_unsigned_get_attr_by_OBJ;
-+ SMIME_write_CMS;
-+ CMS_EncryptedData_decrypt;
-+ CMS_get0_RecipientInfos;
-+ CMS_add0_RevocationInfoChoice;
-+ CMS_decrypt_set1_pkey;
-+ CMS_SignerInfo_set1_signer_cert;
-+ CMS_get0_signers;
-+ CMS_ReceiptRequest_get0_values;
-+ CMS_signed_get0_data_by_OBJ;
-+ CMS_get0_SignerInfos;
-+ CMS_add0_cert;
-+ CMS_EncryptedData_encrypt;
-+ CMS_digest_verify;
-+ CMS_set1_signers_certs;
-+ CMS_signed_get_attr;
-+ CMS_RecipientInfo_set0_key;
-+ CMS_SignedData_init;
-+ CMS_RecipientInfo_kekri_get0_id;
-+ CMS_verify_receipt;
-+ CMS_ReceiptRequest_it;
-+ PEM_read_bio_CMS;
-+ CMS_get1_crls;
-+ CMS_add0_recipient_key;
-+ SMIME_read_ASN1;
-+ CMS_ReceiptRequest_new;
-+ CMS_get0_content;
-+ CMS_get1_ReceiptRequest;
-+ CMS_signed_add1_attr_by_OBJ;
-+ CMS_RecipientInfo_kekri_id_cmp;
-+ CMS_add1_ReceiptRequest;
-+ CMS_SignerInfo_get0_signer_id;
-+ CMS_unsigned_add1_attr_by_NID;
-+ CMS_unsigned_add1_attr;
-+ CMS_signed_get_attr_by_NID;
-+ CMS_get1_certs;
-+ CMS_signed_add1_attr_by_NID;
-+ CMS_unsigned_add1_attr_by_txt;
-+ CMS_dataFinal;
-+ CMS_RecipientInfo_ktri_get0_signer_id;
-+ CMS_RecipInfo_ktri_get0_sigr_id;
-+ i2d_CMS_ReceiptRequest;
-+ CMS_add1_recipient_cert;
-+ CMS_dataInit;
-+ CMS_signed_add1_attr_by_txt;
-+ CMS_RecipientInfo_decrypt;
-+ CMS_signed_get_attr_count;
-+ CMS_get0_eContentType;
-+ CMS_set1_eContentType;
-+ CMS_ReceiptRequest_create0;
-+ CMS_add1_signer;
-+ CMS_RecipientInfo_set0_pkey;
-+ ENGINE_set_load_ssl_client_cert_function;
-+ ENGINE_set_ld_ssl_clnt_cert_fn;
-+ ENGINE_get_ssl_client_cert_function;
-+ ENGINE_get_ssl_client_cert_fn;
-+ ENGINE_load_ssl_client_cert;
-+ ENGINE_load_capi;
-+ OPENSSL_isservice;
-+ FIPS_dsa_sig_decode;
-+ EVP_CIPHER_CTX_clear_flags;
-+ FIPS_rand_status;
-+ FIPS_rand_set_key;
-+ CRYPTO_set_mem_info_functions;
-+ RSA_X931_generate_key_ex;
-+ int_ERR_set_state_func;
-+ int_EVP_MD_set_engine_callbacks;
-+ int_CRYPTO_set_do_dynlock_callback;
-+ FIPS_rng_stick;
-+ EVP_CIPHER_CTX_set_flags;
-+ BN_X931_generate_prime_ex;
-+ FIPS_selftest_check;
-+ FIPS_rand_set_dt;
-+ CRYPTO_dbg_pop_info;
-+ FIPS_dsa_free;
-+ RSA_X931_derive_ex;
-+ FIPS_rsa_new;
-+ FIPS_rand_bytes;
-+ fips_cipher_test;
-+ EVP_CIPHER_CTX_test_flags;
-+ CRYPTO_malloc_debug_init;
-+ CRYPTO_dbg_push_info;
-+ FIPS_corrupt_rsa_keygen;
-+ FIPS_dh_new;
-+ FIPS_corrupt_dsa_keygen;
-+ FIPS_dh_free;
-+ fips_pkey_signature_test;
-+ EVP_add_alg_module;
-+ int_RAND_init_engine_callbacks;
-+ int_EVP_CIPHER_set_engine_callbacks;
-+ int_EVP_MD_init_engine_callbacks;
-+ FIPS_rand_test_mode;
-+ FIPS_rand_reset;
-+ FIPS_dsa_new;
-+ int_RAND_set_callbacks;
-+ BN_X931_derive_prime_ex;
-+ int_ERR_lib_init;
-+ int_EVP_CIPHER_init_engine_callbacks;
-+ FIPS_rsa_free;
-+ FIPS_dsa_sig_encode;
-+ CRYPTO_dbg_remove_all_info;
-+ OPENSSL_init;
-+ CRYPTO_strdup;
-+ JPAKE_STEP3A_process;
-+ JPAKE_STEP1_release;
-+ JPAKE_get_shared_key;
-+ JPAKE_STEP3B_init;
-+ JPAKE_STEP1_generate;
-+ JPAKE_STEP1_init;
-+ JPAKE_STEP3B_process;
-+ JPAKE_STEP2_generate;
-+ JPAKE_CTX_new;
-+ JPAKE_CTX_free;
-+ JPAKE_STEP3B_release;
-+ JPAKE_STEP3A_release;
-+ JPAKE_STEP2_process;
-+ JPAKE_STEP3B_generate;
-+ JPAKE_STEP1_process;
-+ JPAKE_STEP3A_generate;
-+ JPAKE_STEP2_release;
-+ JPAKE_STEP3A_init;
-+ ERR_load_JPAKE_strings;
-+ JPAKE_STEP2_init;
-+ pqueue_size;
-+ i2d_TS_ACCURACY;
-+ i2d_TS_MSG_IMPRINT_fp;
-+ i2d_TS_MSG_IMPRINT;
-+ EVP_PKEY_print_public;
-+ EVP_PKEY_CTX_new;
-+ i2d_TS_TST_INFO;
-+ EVP_PKEY_asn1_find;
-+ DSO_METHOD_beos;
-+ TS_CONF_load_cert;
-+ TS_REQ_get_ext;
-+ EVP_PKEY_sign_init;
-+ ASN1_item_print;
-+ TS_TST_INFO_set_nonce;
-+ TS_RESP_dup;
-+ ENGINE_register_pkey_meths;
-+ EVP_PKEY_asn1_add0;
-+ PKCS7_add0_attrib_signing_time;
-+ i2d_TS_TST_INFO_fp;
-+ BIO_asn1_get_prefix;
-+ TS_TST_INFO_set_time;
-+ EVP_PKEY_meth_set_decrypt;
-+ EVP_PKEY_set_type_str;
-+ EVP_PKEY_CTX_get_keygen_info;
-+ TS_REQ_set_policy_id;
-+ d2i_TS_RESP_fp;
-+ ENGINE_get_pkey_asn1_meth_engine;
-+ ENGINE_get_pkey_asn1_meth_eng;
-+ WHIRLPOOL_Init;
-+ TS_RESP_set_status_info;
-+ EVP_PKEY_keygen;
-+ EVP_DigestSignInit;
-+ TS_ACCURACY_set_millis;
-+ TS_REQ_dup;
-+ GENERAL_NAME_dup;
-+ ASN1_SEQUENCE_ANY_it;
-+ WHIRLPOOL;
-+ X509_STORE_get1_crls;
-+ ENGINE_get_pkey_asn1_meth;
-+ EVP_PKEY_asn1_new;
-+ BIO_new_NDEF;
-+ ENGINE_get_pkey_meth;
-+ TS_MSG_IMPRINT_set_algo;
-+ i2d_TS_TST_INFO_bio;
-+ TS_TST_INFO_set_ordering;
-+ TS_TST_INFO_get_ext_by_OBJ;
-+ CRYPTO_THREADID_set_pointer;
-+ TS_CONF_get_tsa_section;
-+ SMIME_write_ASN1;
-+ TS_RESP_CTX_set_signer_key;
-+ EVP_PKEY_encrypt_old;
-+ EVP_PKEY_encrypt_init;
-+ CRYPTO_THREADID_cpy;
-+ ASN1_PCTX_get_cert_flags;
-+ i2d_ESS_SIGNING_CERT;
-+ TS_CONF_load_key;
-+ i2d_ASN1_SEQUENCE_ANY;
-+ d2i_TS_MSG_IMPRINT_bio;
-+ EVP_PKEY_asn1_set_public;
-+ b2i_PublicKey_bio;
-+ BIO_asn1_set_prefix;
-+ EVP_PKEY_new_mac_key;
-+ BIO_new_CMS;
-+ CRYPTO_THREADID_cmp;
-+ TS_REQ_ext_free;
-+ EVP_PKEY_asn1_set_free;
-+ EVP_PKEY_get0_asn1;
-+ d2i_NETSCAPE_X509;
-+ EVP_PKEY_verify_recover_init;
-+ EVP_PKEY_CTX_set_data;
-+ EVP_PKEY_keygen_init;
-+ TS_RESP_CTX_set_status_info;
-+ TS_MSG_IMPRINT_get_algo;
-+ TS_REQ_print_bio;
-+ EVP_PKEY_CTX_ctrl_str;
-+ EVP_PKEY_get_default_digest_nid;
-+ PEM_write_bio_PKCS7_stream;
-+ TS_MSG_IMPRINT_print_bio;
-+ BN_asc2bn;
-+ TS_REQ_get_policy_id;
-+ ENGINE_set_default_pkey_asn1_meths;
-+ ENGINE_set_def_pkey_asn1_meths;
-+ d2i_TS_ACCURACY;
-+ DSO_global_lookup;
-+ TS_CONF_set_tsa_name;
-+ i2d_ASN1_SET_ANY;
-+ ENGINE_load_gost;
-+ WHIRLPOOL_BitUpdate;
-+ ASN1_PCTX_get_flags;
-+ TS_TST_INFO_get_ext_by_NID;
-+ TS_RESP_new;
-+ ESS_CERT_ID_dup;
-+ TS_STATUS_INFO_dup;
-+ TS_REQ_delete_ext;
-+ EVP_DigestVerifyFinal;
-+ EVP_PKEY_print_params;
-+ i2d_CMS_bio_stream;
-+ TS_REQ_get_msg_imprint;
-+ OBJ_find_sigid_by_algs;
-+ TS_TST_INFO_get_serial;
-+ TS_REQ_get_nonce;
-+ X509_PUBKEY_set0_param;
-+ EVP_PKEY_CTX_set0_keygen_info;
-+ DIST_POINT_set_dpname;
-+ i2d_ISSUING_DIST_POINT;
-+ ASN1_SET_ANY_it;
-+ EVP_PKEY_CTX_get_data;
-+ TS_STATUS_INFO_print_bio;
-+ EVP_PKEY_derive_init;
-+ d2i_TS_TST_INFO;
-+ EVP_PKEY_asn1_add_alias;
-+ d2i_TS_RESP_bio;
-+ OTHERNAME_cmp;
-+ GENERAL_NAME_set0_value;
-+ PKCS7_RECIP_INFO_get0_alg;
-+ TS_RESP_CTX_new;
-+ TS_RESP_set_tst_info;
-+ PKCS7_final;
-+ EVP_PKEY_base_id;
-+ TS_RESP_CTX_set_signer_cert;
-+ TS_REQ_set_msg_imprint;
-+ EVP_PKEY_CTX_ctrl;
-+ TS_CONF_set_digests;
-+ d2i_TS_MSG_IMPRINT;
-+ EVP_PKEY_meth_set_ctrl;
-+ TS_REQ_get_ext_by_NID;
-+ PKCS5_pbe_set0_algor;
-+ BN_BLINDING_thread_id;
-+ TS_ACCURACY_new;
-+ X509_CRL_METHOD_free;
-+ ASN1_PCTX_get_nm_flags;
-+ EVP_PKEY_meth_set_sign;
-+ CRYPTO_THREADID_current;
-+ EVP_PKEY_decrypt_init;
-+ NETSCAPE_X509_free;
-+ i2b_PVK_bio;
-+ EVP_PKEY_print_private;
-+ GENERAL_NAME_get0_value;
-+ b2i_PVK_bio;
-+ ASN1_UTCTIME_adj;
-+ TS_TST_INFO_new;
-+ EVP_MD_do_all_sorted;
-+ TS_CONF_set_default_engine;
-+ TS_ACCURACY_set_seconds;
-+ TS_TST_INFO_get_time;
-+ PKCS8_pkey_get0;
-+ EVP_PKEY_asn1_get0;
-+ OBJ_add_sigid;
-+ PKCS7_SIGNER_INFO_sign;
-+ EVP_PKEY_paramgen_init;
-+ EVP_PKEY_sign;
-+ OBJ_sigid_free;
-+ EVP_PKEY_meth_set_init;
-+ d2i_ESS_ISSUER_SERIAL;
-+ ISSUING_DIST_POINT_new;
-+ ASN1_TIME_adj;
-+ TS_OBJ_print_bio;
-+ EVP_PKEY_meth_set_verify_recover;
-+ EVP_PKEY_meth_set_vrfy_recover;
-+ TS_RESP_get_status_info;
-+ CMS_stream;
-+ EVP_PKEY_CTX_set_cb;
-+ PKCS7_to_TS_TST_INFO;
-+ ASN1_PCTX_get_oid_flags;
-+ TS_TST_INFO_add_ext;
-+ EVP_PKEY_meth_set_derive;
-+ i2d_TS_RESP_fp;
-+ i2d_TS_MSG_IMPRINT_bio;
-+ TS_RESP_CTX_set_accuracy;
-+ TS_REQ_set_nonce;
-+ ESS_CERT_ID_new;
-+ ENGINE_pkey_asn1_find_str;
-+ TS_REQ_get_ext_count;
-+ BUF_reverse;
-+ TS_TST_INFO_print_bio;
-+ d2i_ISSUING_DIST_POINT;
-+ ENGINE_get_pkey_meths;
-+ i2b_PrivateKey_bio;
-+ i2d_TS_RESP;
-+ b2i_PublicKey;
-+ TS_VERIFY_CTX_cleanup;
-+ TS_STATUS_INFO_free;
-+ TS_RESP_verify_token;
-+ OBJ_bsearch_ex_;
-+ ASN1_bn_print;
-+ EVP_PKEY_asn1_get_count;
-+ ENGINE_register_pkey_asn1_meths;
-+ ASN1_PCTX_set_nm_flags;
-+ EVP_DigestVerifyInit;
-+ ENGINE_set_default_pkey_meths;
-+ TS_TST_INFO_get_policy_id;
-+ TS_REQ_get_cert_req;
-+ X509_CRL_set_meth_data;
-+ PKCS8_pkey_set0;
-+ ASN1_STRING_copy;
-+ d2i_TS_TST_INFO_fp;
-+ X509_CRL_match;
-+ EVP_PKEY_asn1_set_private;
-+ TS_TST_INFO_get_ext_d2i;
-+ TS_RESP_CTX_add_policy;
-+ d2i_TS_RESP;
-+ TS_CONF_load_certs;
-+ TS_TST_INFO_get_msg_imprint;
-+ ERR_load_TS_strings;
-+ TS_TST_INFO_get_version;
-+ EVP_PKEY_CTX_dup;
-+ EVP_PKEY_meth_set_verify;
-+ i2b_PublicKey_bio;
-+ TS_CONF_set_certs;
-+ EVP_PKEY_asn1_get0_info;
-+ TS_VERIFY_CTX_free;
-+ TS_REQ_get_ext_by_critical;
-+ TS_RESP_CTX_set_serial_cb;
-+ X509_CRL_get_meth_data;
-+ TS_RESP_CTX_set_time_cb;
-+ TS_MSG_IMPRINT_get_msg;
-+ TS_TST_INFO_ext_free;
-+ TS_REQ_get_version;
-+ TS_REQ_add_ext;
-+ EVP_PKEY_CTX_set_app_data;
-+ OBJ_bsearch_;
-+ EVP_PKEY_meth_set_verifyctx;
-+ i2d_PKCS7_bio_stream;
-+ CRYPTO_THREADID_set_numeric;
-+ PKCS7_sign_add_signer;
-+ d2i_TS_TST_INFO_bio;
-+ TS_TST_INFO_get_ordering;
-+ TS_RESP_print_bio;
-+ TS_TST_INFO_get_exts;
-+ HMAC_CTX_copy;
-+ PKCS5_pbe2_set_iv;
-+ ENGINE_get_pkey_asn1_meths;
-+ b2i_PrivateKey;
-+ EVP_PKEY_CTX_get_app_data;
-+ TS_REQ_set_cert_req;
-+ CRYPTO_THREADID_set_callback;
-+ TS_CONF_set_serial;
-+ TS_TST_INFO_free;
-+ d2i_TS_REQ_fp;
-+ TS_RESP_verify_response;
-+ i2d_ESS_ISSUER_SERIAL;
-+ TS_ACCURACY_get_seconds;
-+ EVP_CIPHER_do_all;
-+ b2i_PrivateKey_bio;
-+ OCSP_CERTID_dup;
-+ X509_PUBKEY_get0_param;
-+ TS_MSG_IMPRINT_dup;
-+ PKCS7_print_ctx;
-+ i2d_TS_REQ_bio;
-+ EVP_whirlpool;
-+ EVP_PKEY_asn1_set_param;
-+ EVP_PKEY_meth_set_encrypt;
-+ ASN1_PCTX_set_flags;
-+ i2d_ESS_CERT_ID;
-+ TS_VERIFY_CTX_new;
-+ TS_RESP_CTX_set_extension_cb;
-+ ENGINE_register_all_pkey_meths;
-+ TS_RESP_CTX_set_status_info_cond;
-+ TS_RESP_CTX_set_stat_info_cond;
-+ EVP_PKEY_verify;
-+ WHIRLPOOL_Final;
-+ X509_CRL_METHOD_new;
-+ EVP_DigestSignFinal;
-+ TS_RESP_CTX_set_def_policy;
-+ NETSCAPE_X509_it;
-+ TS_RESP_create_response;
-+ PKCS7_SIGNER_INFO_get0_algs;
-+ TS_TST_INFO_get_nonce;
-+ EVP_PKEY_decrypt_old;
-+ TS_TST_INFO_set_policy_id;
-+ TS_CONF_set_ess_cert_id_chain;
-+ EVP_PKEY_CTX_get0_pkey;
-+ d2i_TS_REQ;
-+ EVP_PKEY_asn1_find_str;
-+ BIO_f_asn1;
-+ ESS_SIGNING_CERT_new;
-+ EVP_PBE_find;
-+ X509_CRL_get0_by_cert;
-+ EVP_PKEY_derive;
-+ i2d_TS_REQ;
-+ TS_TST_INFO_delete_ext;
-+ ESS_ISSUER_SERIAL_free;
-+ ASN1_PCTX_set_str_flags;
-+ ENGINE_get_pkey_asn1_meth_str;
-+ TS_CONF_set_signer_key;
-+ TS_ACCURACY_get_millis;
-+ TS_RESP_get_token;
-+ TS_ACCURACY_dup;
-+ ENGINE_register_all_pkey_asn1_meths;
-+ ENGINE_reg_all_pkey_asn1_meths;
-+ X509_CRL_set_default_method;
-+ CRYPTO_THREADID_hash;
-+ CMS_ContentInfo_print_ctx;
-+ TS_RESP_free;
-+ ISSUING_DIST_POINT_free;
-+ ESS_ISSUER_SERIAL_new;
-+ CMS_add1_crl;
-+ PKCS7_add1_attrib_digest;
-+ TS_RESP_CTX_add_md;
-+ TS_TST_INFO_dup;
-+ ENGINE_set_pkey_asn1_meths;
-+ PEM_write_bio_Parameters;
-+ TS_TST_INFO_get_accuracy;
-+ X509_CRL_get0_by_serial;
-+ TS_TST_INFO_set_version;
-+ TS_RESP_CTX_get_tst_info;
-+ TS_RESP_verify_signature;
-+ CRYPTO_THREADID_get_callback;
-+ TS_TST_INFO_get_tsa;
-+ TS_STATUS_INFO_new;
-+ EVP_PKEY_CTX_get_cb;
-+ TS_REQ_get_ext_d2i;
-+ GENERAL_NAME_set0_othername;
-+ TS_TST_INFO_get_ext_count;
-+ TS_RESP_CTX_get_request;
-+ i2d_NETSCAPE_X509;
-+ ENGINE_get_pkey_meth_engine;
-+ EVP_PKEY_meth_set_signctx;
-+ EVP_PKEY_asn1_copy;
-+ ASN1_TYPE_cmp;
-+ EVP_CIPHER_do_all_sorted;
-+ EVP_PKEY_CTX_free;
-+ ISSUING_DIST_POINT_it;
-+ d2i_TS_MSG_IMPRINT_fp;
-+ X509_STORE_get1_certs;
-+ EVP_PKEY_CTX_get_operation;
-+ d2i_ESS_SIGNING_CERT;
-+ TS_CONF_set_ordering;
-+ EVP_PBE_alg_add_type;
-+ TS_REQ_set_version;
-+ EVP_PKEY_get0;
-+ BIO_asn1_set_suffix;
-+ i2d_TS_STATUS_INFO;
-+ EVP_MD_do_all;
-+ TS_TST_INFO_set_accuracy;
-+ PKCS7_add_attrib_content_type;
-+ ERR_remove_thread_state;
-+ EVP_PKEY_meth_add0;
-+ TS_TST_INFO_set_tsa;
-+ EVP_PKEY_meth_new;
-+ WHIRLPOOL_Update;
-+ TS_CONF_set_accuracy;
-+ ASN1_PCTX_set_oid_flags;
-+ ESS_SIGNING_CERT_dup;
-+ d2i_TS_REQ_bio;
-+ X509_time_adj_ex;
-+ TS_RESP_CTX_add_flags;
-+ d2i_TS_STATUS_INFO;
-+ TS_MSG_IMPRINT_set_msg;
-+ BIO_asn1_get_suffix;
-+ TS_REQ_free;
-+ EVP_PKEY_meth_free;
-+ TS_REQ_get_exts;
-+ TS_RESP_CTX_set_clock_precision_digits;
-+ TS_RESP_CTX_set_clk_prec_digits;
-+ TS_RESP_CTX_add_failure_info;
-+ i2d_TS_RESP_bio;
-+ EVP_PKEY_CTX_get0_peerkey;
-+ PEM_write_bio_CMS_stream;
-+ TS_REQ_new;
-+ TS_MSG_IMPRINT_new;
-+ EVP_PKEY_meth_find;
-+ EVP_PKEY_id;
-+ TS_TST_INFO_set_serial;
-+ a2i_GENERAL_NAME;
-+ TS_CONF_set_crypto_device;
-+ EVP_PKEY_verify_init;
-+ TS_CONF_set_policies;
-+ ASN1_PCTX_new;
-+ ESS_CERT_ID_free;
-+ ENGINE_unregister_pkey_meths;
-+ TS_MSG_IMPRINT_free;
-+ TS_VERIFY_CTX_init;
-+ PKCS7_stream;
-+ TS_RESP_CTX_set_certs;
-+ TS_CONF_set_def_policy;
-+ ASN1_GENERALIZEDTIME_adj;
-+ NETSCAPE_X509_new;
-+ TS_ACCURACY_free;
-+ TS_RESP_get_tst_info;
-+ EVP_PKEY_derive_set_peer;
-+ PEM_read_bio_Parameters;
-+ TS_CONF_set_clock_precision_digits;
-+ TS_CONF_set_clk_prec_digits;
-+ ESS_ISSUER_SERIAL_dup;
-+ TS_ACCURACY_get_micros;
-+ ASN1_PCTX_get_str_flags;
-+ NAME_CONSTRAINTS_check;
-+ ASN1_BIT_STRING_check;
-+ X509_check_akid;
-+ ENGINE_unregister_pkey_asn1_meths;
-+ ENGINE_unreg_pkey_asn1_meths;
-+ ASN1_PCTX_free;
-+ PEM_write_bio_ASN1_stream;
-+ i2d_ASN1_bio_stream;
-+ TS_X509_ALGOR_print_bio;
-+ EVP_PKEY_meth_set_cleanup;
-+ EVP_PKEY_asn1_free;
-+ ESS_SIGNING_CERT_free;
-+ TS_TST_INFO_set_msg_imprint;
-+ GENERAL_NAME_cmp;
-+ d2i_ASN1_SET_ANY;
-+ ENGINE_set_pkey_meths;
-+ i2d_TS_REQ_fp;
-+ d2i_ASN1_SEQUENCE_ANY;
-+ GENERAL_NAME_get0_otherName;
-+ d2i_ESS_CERT_ID;
-+ OBJ_find_sigid_algs;
-+ EVP_PKEY_meth_set_keygen;
-+ PKCS5_PBKDF2_HMAC;
-+ EVP_PKEY_paramgen;
-+ EVP_PKEY_meth_set_paramgen;
-+ BIO_new_PKCS7;
-+ EVP_PKEY_verify_recover;
-+ TS_ext_print_bio;
-+ TS_ASN1_INTEGER_print_bio;
-+ check_defer;
-+ DSO_pathbyaddr;
-+ EVP_PKEY_set_type;
-+ TS_ACCURACY_set_micros;
-+ TS_REQ_to_TS_VERIFY_CTX;
-+ EVP_PKEY_meth_set_copy;
-+ ASN1_PCTX_set_cert_flags;
-+ TS_TST_INFO_get_ext;
-+ EVP_PKEY_asn1_set_ctrl;
-+ TS_TST_INFO_get_ext_by_critical;
-+ EVP_PKEY_CTX_new_id;
-+ TS_REQ_get_ext_by_OBJ;
-+ TS_CONF_set_signer_cert;
-+ X509_NAME_hash_old;
-+ ASN1_TIME_set_string;
-+ EVP_MD_flags;
-+ TS_RESP_CTX_free;
-+ DSAparams_dup;
-+ DHparams_dup;
-+ OCSP_REQ_CTX_add1_header;
-+ OCSP_REQ_CTX_set1_req;
-+ X509_STORE_set_verify_cb;
-+ X509_STORE_CTX_get0_current_crl;
-+ X509_STORE_CTX_get0_parent_ctx;
-+ X509_STORE_CTX_get0_current_issuer;
-+ X509_STORE_CTX_get0_cur_issuer;
-+ X509_issuer_name_hash_old;
-+ X509_subject_name_hash_old;
-+ EVP_CIPHER_CTX_copy;
-+ UI_method_get_prompt_constructor;
-+ UI_method_get_prompt_constructr;
-+ UI_method_set_prompt_constructor;
-+ UI_method_set_prompt_constructr;
-+ EVP_read_pw_string_min;
-+ CRYPTO_cts128_encrypt;
-+ CRYPTO_cts128_decrypt_block;
-+ CRYPTO_cfb128_1_encrypt;
-+ CRYPTO_cbc128_encrypt;
-+ CRYPTO_ctr128_encrypt;
-+ CRYPTO_ofb128_encrypt;
-+ CRYPTO_cts128_decrypt;
-+ CRYPTO_cts128_encrypt_block;
-+ CRYPTO_cbc128_decrypt;
-+ CRYPTO_cfb128_encrypt;
-+ CRYPTO_cfb128_8_encrypt;
-+ SSL_renegotiate_abbreviated;
-+ TLSv1_1_method;
-+ TLSv1_1_client_method;
-+ TLSv1_1_server_method;
-+ SSL_CTX_set_srp_client_pwd_callback;
-+ SSL_CTX_set_srp_client_pwd_cb;
-+ SSL_get_srp_g;
-+ SSL_CTX_set_srp_username_callback;
-+ SSL_CTX_set_srp_un_cb;
-+ SSL_get_srp_userinfo;
-+ SSL_set_srp_server_param;
-+ SSL_set_srp_server_param_pw;
-+ SSL_get_srp_N;
-+ SSL_get_srp_username;
-+ SSL_CTX_set_srp_password;
-+ SSL_CTX_set_srp_strength;
-+ SSL_CTX_set_srp_verify_param_callback;
-+ SSL_CTX_set_srp_vfy_param_cb;
-+ SSL_CTX_set_srp_cb_arg;
-+ SSL_CTX_set_srp_username;
-+ SSL_CTX_SRP_CTX_init;
-+ SSL_SRP_CTX_init;
-+ SRP_Calc_A_param;
-+ SRP_generate_server_master_secret;
-+ SRP_gen_server_master_secret;
-+ SSL_CTX_SRP_CTX_free;
-+ SRP_generate_client_master_secret;
-+ SRP_gen_client_master_secret;
-+ SSL_srp_server_param_with_username;
-+ SSL_srp_server_param_with_un;
-+ SSL_SRP_CTX_free;
-+ SSL_set_debug;
-+ SSL_SESSION_get0_peer;
-+ TLSv1_2_client_method;
-+ SSL_SESSION_set1_id_context;
-+ TLSv1_2_server_method;
-+ SSL_cache_hit;
-+ SSL_get0_kssl_ctx;
-+ SSL_set0_kssl_ctx;
-+ SSL_set_state;
-+ SSL_CIPHER_get_id;
-+ TLSv1_2_method;
-+ kssl_ctx_get0_client_princ;
-+ SSL_export_keying_material;
-+ SSL_set_tlsext_use_srtp;
-+ SSL_CTX_set_next_protos_advertised_cb;
-+ SSL_CTX_set_next_protos_adv_cb;
-+ SSL_get0_next_proto_negotiated;
-+ SSL_get_selected_srtp_profile;
-+ SSL_CTX_set_tlsext_use_srtp;
-+ SSL_select_next_proto;
-+ SSL_get_srtp_profiles;
-+ SSL_CTX_set_next_proto_select_cb;
-+ SSL_CTX_set_next_proto_sel_cb;
-+ SSL_SESSION_get_compress_id;
-+
-+ SRP_VBASE_get_by_user;
-+ SRP_Calc_server_key;
-+ SRP_create_verifier;
-+ SRP_create_verifier_BN;
-+ SRP_Calc_u;
-+ SRP_VBASE_free;
-+ SRP_Calc_client_key;
-+ SRP_get_default_gN;
-+ SRP_Calc_x;
-+ SRP_Calc_B;
-+ SRP_VBASE_new;
-+ SRP_check_known_gN_param;
-+ SRP_Calc_A;
-+ SRP_Verify_A_mod_N;
-+ SRP_VBASE_init;
-+ SRP_Verify_B_mod_N;
-+ EC_KEY_set_public_key_affine_coordinates;
-+ EC_KEY_set_pub_key_aff_coords;
-+ EVP_aes_192_ctr;
-+ EVP_PKEY_meth_get0_info;
-+ EVP_PKEY_meth_copy;
-+ ERR_add_error_vdata;
-+ EVP_aes_128_ctr;
-+ EVP_aes_256_ctr;
-+ EC_GFp_nistp224_method;
-+ EC_KEY_get_flags;
-+ RSA_padding_add_PKCS1_PSS_mgf1;
-+ EVP_aes_128_xts;
-+ EVP_aes_256_xts;
-+ EVP_aes_128_gcm;
-+ EC_KEY_clear_flags;
-+ EC_KEY_set_flags;
-+ EVP_aes_256_ccm;
-+ RSA_verify_PKCS1_PSS_mgf1;
-+ EVP_aes_128_ccm;
-+ EVP_aes_192_gcm;
-+ X509_ALGOR_set_md;
-+ RAND_init_fips;
-+ EVP_aes_256_gcm;
-+ EVP_aes_192_ccm;
-+ CMAC_CTX_copy;
-+ CMAC_CTX_free;
-+ CMAC_CTX_get0_cipher_ctx;
-+ CMAC_CTX_cleanup;
-+ CMAC_Init;
-+ CMAC_Update;
-+ CMAC_resume;
-+ CMAC_CTX_new;
-+ CMAC_Final;
-+ CRYPTO_ctr128_encrypt_ctr32;
-+ CRYPTO_gcm128_release;
-+ CRYPTO_ccm128_decrypt_ccm64;
-+ CRYPTO_ccm128_encrypt;
-+ CRYPTO_gcm128_encrypt;
-+ CRYPTO_xts128_encrypt;
-+ EVP_rc4_hmac_md5;
-+ CRYPTO_nistcts128_decrypt_block;
-+ CRYPTO_gcm128_setiv;
-+ CRYPTO_nistcts128_encrypt;
-+ EVP_aes_128_cbc_hmac_sha1;
-+ CRYPTO_gcm128_tag;
-+ CRYPTO_ccm128_encrypt_ccm64;
-+ ENGINE_load_rdrand;
-+ CRYPTO_ccm128_setiv;
-+ CRYPTO_nistcts128_encrypt_block;
-+ CRYPTO_gcm128_aad;
-+ CRYPTO_ccm128_init;
-+ CRYPTO_nistcts128_decrypt;
-+ CRYPTO_gcm128_new;
-+ CRYPTO_ccm128_tag;
-+ CRYPTO_ccm128_decrypt;
-+ CRYPTO_ccm128_aad;
-+ CRYPTO_gcm128_init;
-+ CRYPTO_gcm128_decrypt;
-+ ENGINE_load_rsax;
-+ CRYPTO_gcm128_decrypt_ctr32;
-+ CRYPTO_gcm128_encrypt_ctr32;
-+ CRYPTO_gcm128_finish;
-+ EVP_aes_256_cbc_hmac_sha1;
-+ PKCS5_pbkdf2_set;
-+ CMS_add0_recipient_password;
-+ CMS_decrypt_set1_password;
-+ CMS_RecipientInfo_set0_password;
-+ RAND_set_fips_drbg_type;
-+ X509_REQ_sign_ctx;
-+ RSA_PSS_PARAMS_new;
-+ X509_CRL_sign_ctx;
-+ X509_signature_dump;
-+ d2i_RSA_PSS_PARAMS;
-+ RSA_PSS_PARAMS_it;
-+ RSA_PSS_PARAMS_free;
-+ X509_sign_ctx;
-+ i2d_RSA_PSS_PARAMS;
-+ ASN1_item_sign_ctx;
-+ EC_GFp_nistp521_method;
-+ EC_GFp_nistp256_method;
-+ OPENSSL_stderr;
-+ OPENSSL_cpuid_setup;
-+ OPENSSL_showfatal;
-+ BIO_new_dgram_sctp;
-+ BIO_dgram_sctp_msg_waiting;
-+ BIO_dgram_sctp_wait_for_dry;
-+ BIO_s_datagram_sctp;
-+ BIO_dgram_is_sctp;
-+ BIO_dgram_sctp_notification_cb;
-+ CRYPTO_memcmp;
-+ SSL_CTX_set_alpn_protos;
-+ SSL_set_alpn_protos;
-+ SSL_CTX_set_alpn_select_cb;
-+ SSL_get0_alpn_selected;
-+ SSL_CTX_set_custom_cli_ext;
-+ SSL_CTX_set_custom_srv_ext;
-+ SSL_CTX_set_srv_supp_data;
-+ SSL_CTX_set_cli_supp_data;
-+ SSL_set_cert_cb;
-+ SSL_CTX_use_serverinfo;
-+ SSL_CTX_use_serverinfo_file;
-+ SSL_CTX_set_cert_cb;
-+ SSL_CTX_get0_param;
-+ SSL_get0_param;
-+ SSL_certs_clear;
-+ DTLSv1_2_method;
-+ DTLSv1_2_server_method;
-+ DTLSv1_2_client_method;
-+ DTLS_method;
-+ DTLS_server_method;
-+ DTLS_client_method;
-+ SSL_CTX_get_ssl_method;
-+ SSL_CTX_get0_certificate;
-+ SSL_CTX_get0_privatekey;
-+ SSL_COMP_set0_compression_methods;
-+ SSL_COMP_free_compression_methods;
-+ SSL_CIPHER_find;
-+ SSL_is_server;
-+ SSL_CONF_CTX_new;
-+ SSL_CONF_CTX_finish;
-+ SSL_CONF_CTX_free;
-+ SSL_CONF_CTX_set_flags;
-+ SSL_CONF_CTX_clear_flags;
-+ SSL_CONF_CTX_set1_prefix;
-+ SSL_CONF_CTX_set_ssl;
-+ SSL_CONF_CTX_set_ssl_ctx;
-+ SSL_CONF_cmd;
-+ SSL_CONF_cmd_argv;
-+ SSL_CONF_cmd_value_type;
-+ SSL_trace;
-+ SSL_CIPHER_standard_name;
-+ SSL_get_tlsa_record_byname;
-+ ASN1_TIME_diff;
-+ BIO_hex_string;
-+ CMS_RecipientInfo_get0_pkey_ctx;
-+ CMS_RecipientInfo_encrypt;
-+ CMS_SignerInfo_get0_pkey_ctx;
-+ CMS_SignerInfo_get0_md_ctx;
-+ CMS_SignerInfo_get0_signature;
-+ CMS_RecipientInfo_kari_get0_alg;
-+ CMS_RecipientInfo_kari_get0_reks;
-+ CMS_RecipientInfo_kari_get0_orig_id;
-+ CMS_RecipientInfo_kari_orig_id_cmp;
-+ CMS_RecipientEncryptedKey_get0_id;
-+ CMS_RecipientEncryptedKey_cert_cmp;
-+ CMS_RecipientInfo_kari_set0_pkey;
-+ CMS_RecipientInfo_kari_get0_ctx;
-+ CMS_RecipientInfo_kari_decrypt;
-+ CMS_SharedInfo_encode;
-+ DH_compute_key_padded;
-+ d2i_DHxparams;
-+ i2d_DHxparams;
-+ DH_get_1024_160;
-+ DH_get_2048_224;
-+ DH_get_2048_256;
-+ DH_KDF_X9_42;
-+ ECDH_KDF_X9_62;
-+ ECDSA_METHOD_new;
-+ ECDSA_METHOD_free;
-+ ECDSA_METHOD_set_app_data;
-+ ECDSA_METHOD_get_app_data;
-+ ECDSA_METHOD_set_sign;
-+ ECDSA_METHOD_set_sign_setup;
-+ ECDSA_METHOD_set_verify;
-+ ECDSA_METHOD_set_flags;
-+ ECDSA_METHOD_set_name;
-+ EVP_des_ede3_wrap;
-+ EVP_aes_128_wrap;
-+ EVP_aes_192_wrap;
-+ EVP_aes_256_wrap;
-+ EVP_aes_128_cbc_hmac_sha256;
-+ EVP_aes_256_cbc_hmac_sha256;
-+ CRYPTO_128_wrap;
-+ CRYPTO_128_unwrap;
-+ OCSP_REQ_CTX_nbio;
-+ OCSP_REQ_CTX_new;
-+ OCSP_set_max_response_length;
-+ OCSP_REQ_CTX_i2d;
-+ OCSP_REQ_CTX_nbio_d2i;
-+ OCSP_REQ_CTX_get0_mem_bio;
-+ OCSP_REQ_CTX_http;
-+ RSA_padding_add_PKCS1_OAEP_mgf1;
-+ RSA_padding_check_PKCS1_OAEP_mgf1;
-+ RSA_OAEP_PARAMS_free;
-+ RSA_OAEP_PARAMS_it;
-+ RSA_OAEP_PARAMS_new;
-+ SSL_get_sigalgs;
-+ SSL_get_shared_sigalgs;
-+ SSL_check_chain;
-+ X509_chain_up_ref;
-+ X509_http_nbio;
-+ X509_CRL_http_nbio;
-+ X509_REVOKED_dup;
-+ i2d_re_X509_tbs;
-+ X509_get0_signature;
-+ X509_get_signature_nid;
-+ X509_CRL_diff;
-+ X509_chain_check_suiteb;
-+ X509_CRL_check_suiteb;
-+ X509_check_host;
-+ X509_check_email;
-+ X509_check_ip;
-+ X509_check_ip_asc;
-+ X509_STORE_set_lookup_crls_cb;
-+ X509_STORE_CTX_get0_store;
-+ X509_VERIFY_PARAM_set1_host;
-+ X509_VERIFY_PARAM_add1_host;
-+ X509_VERIFY_PARAM_set_hostflags;
-+ X509_VERIFY_PARAM_get0_peername;
-+ X509_VERIFY_PARAM_set1_email;
-+ X509_VERIFY_PARAM_set1_ip;
-+ X509_VERIFY_PARAM_set1_ip_asc;
-+ X509_VERIFY_PARAM_get0_name;
-+ X509_VERIFY_PARAM_get_count;
-+ X509_VERIFY_PARAM_get0;
-+ X509V3_EXT_free;
-+ EC_GROUP_get_mont_data;
-+ EC_curve_nid2nist;
-+ EC_curve_nist2nid;
-+ PEM_write_bio_DHxparams;
-+ PEM_write_DHxparams;
-+ SSL_CTX_add_client_custom_ext;
-+ SSL_CTX_add_server_custom_ext;
-+ SSL_extension_supported;
-+ BUF_strnlen;
-+ sk_deep_copy;
-+ SSL_test_functions;
-+
-+ local:
-+ *;
-+};
-+
-+OPENSSL_1.0.2g {
-+ global:
-+ SRP_VBASE_get1_by_user;
-+ SRP_user_pwd_free;
-+} OPENSSL_1.0.2d;
-+
-Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/openssl.ld 2014-02-24 21:02:30.000000000 +0100
-@@ -0,0 +1,10 @@
-+OPENSSL_1.0.2 {
-+ global:
-+ bind_engine;
-+ v_check;
-+ OPENSSL_init;
-+ OPENSSL_finish;
-+ local:
-+ *;
-+};
-+
-Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/ccgost/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/ccgost/openssl.ld 2014-02-24 21:02:30.000000000 +0100
-@@ -0,0 +1,10 @@
-+OPENSSL_1.0.2 {
-+ global:
-+ bind_engine;
-+ v_check;
-+ OPENSSL_init;
-+ OPENSSL_finish;
-+ local:
-+ *;
-+};
-+
diff --git a/meta/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch b/meta/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch
deleted file mode 100644
index a5746483e6..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-
-Index: openssl-1.0.2/engines/Makefile
-===================================================================
---- openssl-1.0.2.orig/engines/Makefile
-+++ openssl-1.0.2/engines/Makefile
-@@ -107,13 +107,13 @@ install:
- @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
- @if [ -n "$(SHARED_LIBS)" ]; then \
- set -e; \
-- $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
-+ $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines; \
- for l in $(LIBNAMES); do \
- ( echo installing $$l; \
- pfx=lib; \
- if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
- sfx=".so"; \
-- cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-+ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
- else \
- case "$(CFLAGS)" in \
- *DSO_BEOS*) sfx=".so";; \
-@@ -122,10 +122,10 @@ install:
- *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
- *) sfx=".bad";; \
- esac; \
-- cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-+ cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
- fi; \
-- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
-+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
-+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx ); \
- done; \
- fi
- @target=install; $(RECURSIVE_MAKE)
-Index: openssl-1.0.2/engines/ccgost/Makefile
-===================================================================
---- openssl-1.0.2.orig/engines/ccgost/Makefile
-+++ openssl-1.0.2/engines/ccgost/Makefile
-@@ -47,7 +47,7 @@ install:
- pfx=lib; \
- if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
- sfx=".so"; \
-- cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
-+ cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
- else \
- case "$(CFLAGS)" in \
- *DSO_BEOS*) sfx=".so";; \
-@@ -56,10 +56,10 @@ install:
- *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
- *) sfx=".bad";; \
- esac; \
-- cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
-+ cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
- fi; \
-- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
-- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
-+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
-+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx; \
- fi
-
- links:
diff --git a/meta/recipes-connectivity/openssl/openssl/find.pl b/meta/recipes-connectivity/openssl/openssl/find.pl
deleted file mode 100644
index 8e1b42c88a..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/find.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# This library is deprecated and unmaintained. It is included for
-# compatibility with Perl 4 scripts which may use it, but it will be
-# removed in a future version of Perl. Please use the File::Find module
-# instead.
-
-# Usage:
-# require "find.pl";
-#
-# &find('/foo','/bar');
-#
-# sub wanted { ... }
-# where wanted does whatever you want. $dir contains the
-# current directory name, and $_ the current filename within
-# that directory. $name contains "$dir/$_". You are cd'ed
-# to $dir when the function is called. The function may
-# set $prune to prune the tree.
-#
-# For example,
-#
-# find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
-#
-# corresponds to this
-#
-# sub wanted {
-# /^\.nfs.*$/ &&
-# (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
-# int(-M _) > 7 &&
-# unlink($_)
-# ||
-# ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
-# $dev < 0 &&
-# ($prune = 1);
-# }
-#
-# Set the variable $dont_use_nlink if you're using AFS, since AFS cheats.
-
-use File::Find ();
-
-*name = *File::Find::name;
-*prune = *File::Find::prune;
-*dir = *File::Find::dir;
-*topdir = *File::Find::topdir;
-*topdev = *File::Find::topdev;
-*topino = *File::Find::topino;
-*topmode = *File::Find::topmode;
-*topnlink = *File::Find::topnlink;
-
-sub find {
- &File::Find::find(\&wanted, @_);
-}
-
-1;
diff --git a/meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch b/meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch
deleted file mode 100644
index 2a318a4584..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Submitted
-
-This patch adds the fix for one of the ciphers used in openssl, namely
-the cipher des-ede3-cfb1. Complete bug log and patch is present here:
-http://rt.openssl.org/Ticket/Display.html?id=2867
-
-Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
-
-Index: openssl-1.0.2/crypto/evp/e_des3.c
-===================================================================
---- openssl-1.0.2.orig/crypto/evp/e_des3.c
-+++ openssl-1.0.2/crypto/evp/e_des3.c
-@@ -211,7 +211,7 @@ static int des_ede3_cfb1_cipher(EVP_CIPH
- size_t n;
- unsigned char c[1], d[1];
-
-- for (n = 0; n < inl; ++n) {
-+ for (n = 0; n * 8 < inl; ++n) {
- c[0] = (in[n / 8] & (1 << (7 - n % 8))) ? 0x80 : 0;
- DES_ede3_cfb_encrypt(c, d, 1, 1,
- &data(ctx)->ks1, &data(ctx)->ks2,
diff --git a/meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch b/meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch
deleted file mode 100644
index 292e13dc5f..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Inappropriate [open-embedded]
-
-Index: openssl-1.0.0/Makefile.shared
-===================================================================
---- openssl-1.0.0.orig/Makefile.shared
-+++ openssl-1.0.0/Makefile.shared
-@@ -92,7 +92,7 @@
- LINK_APP= \
- ( $(SET_X); \
- LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
-- LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
-+ LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$(OE_LDFLAGS) $${LDFLAGS:-$(CFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
- LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
-@@ -102,7 +102,7 @@
- ( $(SET_X); \
- LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
- SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
-- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
-+ SHAREDFLAGS="$(OE_LDFLAGS) $${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
- LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-1.0.2a-x32-asm.patch b/meta/recipes-connectivity/openssl/openssl/openssl-1.0.2a-x32-asm.patch
deleted file mode 100644
index 1e5bfa17d6..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/openssl-1.0.2a-x32-asm.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://rt.openssl.org/Ticket/Display.html?id=3759&user=guest&pass=guest
-
-From 6257d59b3a68d2feb9d64317a1c556dc3813ee61 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 21 Mar 2015 06:01:25 -0400
-Subject: [PATCH] crypto: use bigint in x86-64 perl
-
-Upstream-Status: Pending
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
-
-When building on x32 systems where the default type is 32bit, make sure
-we can transparently represent 64bit integers. Otherwise we end up with
-build errors like:
-/usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s
-Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890.
-...
-ghash-x86_64.s: Assembler messages:
-ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression
-
-We don't enable this globally as there are some cases where we'd get
-32bit values interpreted as unsigned when we need them as signed.
-
-Reported-by: Bertrand Jacquin <bertrand@jacquin.bzh>
-URL: https://bugs.gentoo.org/542618
----
- crypto/perlasm/x86_64-xlate.pl | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
-index aae8288..0bf9774 100755
---- a/crypto/perlasm/x86_64-xlate.pl
-+++ b/crypto/perlasm/x86_64-xlate.pl
-@@ -195,6 +195,10 @@ my %globals;
- sub out {
- my $self = shift;
-
-+ # When building on x32 ABIs, the expanded hex value might be too
-+ # big to fit into 32bits. Enable transparent 64bit support here
-+ # so we can safely print it out.
-+ use bigint;
- if ($gas) {
- # Solaris /usr/ccs/bin/as can't handle multiplications
- # in $self->{value}
---
-2.3.3
-
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch b/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
deleted file mode 100644
index f736e5c098..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-openssl: avoid NULL pointer dereference in EVP_DigestInit_ex()
-
-We should avoid accessing the type pointer if it's NULL,
-this could happen if ctx->digest is not NULL.
-
-Upstream-Status: Submitted
-http://www.mail-archive.com/openssl-dev@openssl.org/msg32860.html
-
-Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
----
-Index: openssl-1.0.2h/crypto/evp/digest.c
-===================================================================
---- openssl-1.0.2h.orig/crypto/evp/digest.c
-+++ openssl-1.0.2h/crypto/evp/digest.c
-@@ -211,7 +211,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, c
- type = ctx->digest;
- }
- #endif
-- if (ctx->digest != type) {
-+ if (type && (ctx->digest != type)) {
- if (ctx->digest && ctx->digest->ctx_size) {
- OPENSSL_free(ctx->md_data);
- ctx->md_data = NULL;
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh b/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh
deleted file mode 100644
index f67f415544..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh
+++ /dev/null
@@ -1,210 +0,0 @@
-#!/bin/sh
-#
-# Ben Secrest <blsecres@gmail.com>
-#
-# sh c_rehash script, scan all files in a directory
-# and add symbolic links to their hash values.
-#
-# based on the c_rehash perl script distributed with openssl
-#
-# LICENSE: See OpenSSL license
-# ^^acceptable?^^
-#
-
-# default certificate location
-DIR=/etc/openssl
-
-# for filetype bitfield
-IS_CERT=$(( 1 << 0 ))
-IS_CRL=$(( 1 << 1 ))
-
-
-# check to see if a file is a certificate file or a CRL file
-# arguments:
-# 1. the filename to be scanned
-# returns:
-# bitfield of file type; uses ${IS_CERT} and ${IS_CRL}
-#
-check_file()
-{
- local IS_TYPE=0
-
- # make IFS a newline so we can process grep output line by line
- local OLDIFS=${IFS}
- IFS=$( printf "\n" )
-
- # XXX: could be more efficient to have two 'grep -m' but is -m portable?
- for LINE in $( grep '^-----BEGIN .*-----' ${1} )
- do
- if echo ${LINE} \
- | grep -q -E '^-----BEGIN (X509 |TRUSTED )?CERTIFICATE-----'
- then
- IS_TYPE=$(( ${IS_TYPE} | ${IS_CERT} ))
-
- if [ $(( ${IS_TYPE} & ${IS_CRL} )) -ne 0 ]
- then
- break
- fi
- elif echo ${LINE} | grep -q '^-----BEGIN X509 CRL-----'
- then
- IS_TYPE=$(( ${IS_TYPE} | ${IS_CRL} ))
-
- if [ $(( ${IS_TYPE} & ${IS_CERT} )) -ne 0 ]
- then
- break
- fi
- fi
- done
-
- # restore IFS
- IFS=${OLDIFS}
-
- return ${IS_TYPE}
-}
-
-
-#
-# use openssl to fingerprint a file
-# arguments:
-# 1. the filename to fingerprint
-# 2. the method to use (x509, crl)
-# returns:
-# none
-# assumptions:
-# user will capture output from last stage of pipeline
-#
-fingerprint()
-{
- ${SSL_CMD} ${2} -fingerprint -noout -in ${1} | sed 's/^.*=//' | tr -d ':'
-}
-
-
-#
-# link_hash - create links to certificate files
-# arguments:
-# 1. the filename to create a link for
-# 2. the type of certificate being linked (x509, crl)
-# returns:
-# 0 on success, 1 otherwise
-#
-link_hash()
-{
- local FINGERPRINT=$( fingerprint ${1} ${2} )
- local HASH=$( ${SSL_CMD} ${2} -hash -noout -in ${1} )
- local SUFFIX=0
- local LINKFILE=''
- local TAG=''
-
- if [ ${2} = "crl" ]
- then
- TAG='r'
- fi
-
- LINKFILE=${HASH}.${TAG}${SUFFIX}
-
- while [ -f ${LINKFILE} ]
- do
- if [ ${FINGERPRINT} = $( fingerprint ${LINKFILE} ${2} ) ]
- then
- echo "NOTE: Skipping duplicate file ${1}" >&2
- return 1
- fi
-
- SUFFIX=$(( ${SUFFIX} + 1 ))
- LINKFILE=${HASH}.${TAG}${SUFFIX}
- done
-
- echo "${1} => ${LINKFILE}"
-
- # assume any system with a POSIX shell will either support symlinks or
- # do something to handle this gracefully
- ln -s ${1} ${LINKFILE}
-
- return 0
-}
-
-
-# hash_dir create hash links in a given directory
-hash_dir()
-{
- echo "Doing ${1}"
-
- cd ${1}
-
- ls -1 * 2>/dev/null | while read FILE
- do
- if echo ${FILE} | grep -q -E '^[[:xdigit:]]{8}\.r?[[:digit:]]+$' \
- && [ -h "${FILE}" ]
- then
- rm ${FILE}
- fi
- done
-
- ls -1 *.pem *.cer *.crt *.crl 2>/dev/null | while read FILE
- do
- check_file ${FILE}
- local FILE_TYPE=${?}
- local TYPE_STR=''
-
- if [ $(( ${FILE_TYPE} & ${IS_CERT} )) -ne 0 ]
- then
- TYPE_STR='x509'
- elif [ $(( ${FILE_TYPE} & ${IS_CRL} )) -ne 0 ]
- then
- TYPE_STR='crl'
- else
- echo "NOTE: ${FILE} does not contain a certificate or CRL: skipping" >&2
- continue
- fi
-
- link_hash ${FILE} ${TYPE_STR}
- done
-}
-
-
-# choose the name of an ssl application
-if [ -n "${OPENSSL}" ]
-then
- SSL_CMD=$(which ${OPENSSL} 2>/dev/null)
-else
- SSL_CMD=/usr/bin/openssl
- OPENSSL=${SSL_CMD}
- export OPENSSL
-fi
-
-# fix paths
-PATH=${PATH}:${DIR}/bin
-export PATH
-
-# confirm existance/executability of ssl command
-if ! [ -x ${SSL_CMD} ]
-then
- echo "${0}: rehashing skipped ('openssl' program not available)" >&2
- exit 0
-fi
-
-# determine which directories to process
-old_IFS=$IFS
-if [ ${#} -gt 0 ]
-then
- IFS=':'
- DIRLIST=${*}
-elif [ -n "${SSL_CERT_DIR}" ]
-then
- DIRLIST=$SSL_CERT_DIR
-else
- DIRLIST=${DIR}/certs
-fi
-
-IFS=':'
-
-# process directories
-for CERT_DIR in ${DIRLIST}
-do
- if [ -d ${CERT_DIR} -a -w ${CERT_DIR} ]
- then
- IFS=$old_IFS
- hash_dir ${CERT_DIR}
- IFS=':'
- fi
-done
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch b/meta/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch
deleted file mode 100644
index de49729e5e..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-openssl: Fix pod2man des.pod error on Ubuntu 12.04
-
-This is a formatting fix, '=back' is required before
-'=head1' on Ubuntu 12.04.
-
-Upstream-Status: Pending
-Signed-off-by: Baogen Shang <baogen.shang@windriver.com>
-diff -urpN a_origin/des.pod b_modify/des.pod
---- a_origin/crypto/des/des.pod 2013-08-15 15:02:56.211674589 +0800
-+++ b_modify/crypto/des/des.pod 2013-08-15 15:04:14.439674580 +0800
-@@ -181,6 +181,8 @@ the uuencoded file to embed in the begin
- output. If there is no name specified after the B<-u>, the name text.des
- will be embedded in the header.
-
-+=back
-+
- =head1 SEE ALSO
-
- ps(1),
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch b/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch
deleted file mode 100644
index 065b9b122a..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From e427748f3bb5d37e78dc8d70a558c373aa8ababb Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 19 Sep 2016 22:06:28 -0700
-Subject: [PATCH] util/perlpath.pl: make it work when cwd is not in @INC
-
-Fixed when building on Debian-testing:
-| Can't locate find.pl in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.2 /usr/local/share/perl/5.22.2 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at perlpath.pl line 7.
-
-The find.pl is added by oe-core, so once openssl/find.pl is removed,
-then this patch can be dropped.
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- util/perlpath.pl | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/util/perlpath.pl b/util/perlpath.pl
-index a1f236b..5599892 100755
---- a/util/perlpath.pl
-+++ b/util/perlpath.pl
-@@ -4,6 +4,8 @@
- # line in all scripts that rely on perl.
- #
-
-+BEGIN { unshift @INC, "."; }
-+
- require "find.pl";
-
- $#ARGV == 0 || print STDERR "usage: perlpath newpath (eg /usr/bin)\n";
---
-2.9.0
-
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch b/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch
deleted file mode 100644
index 0f08a642f6..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Pending
-
-Received from H J Liu @ Intel
-Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
-
-ported the patch to the 1.0.0e version
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
-Index: openssl-1.0.2/crypto/bn/bn.h
-===================================================================
---- openssl-1.0.2.orig/crypto/bn/bn.h
-+++ openssl-1.0.2/crypto/bn/bn.h
-@@ -173,6 +173,13 @@ extern "C" {
- # endif
- # endif
-
-+/* Address type. */
-+#ifdef _WIN64
-+#define BN_ADDR unsigned long long
-+#else
-+#define BN_ADDR unsigned long
-+#endif
-+
- /*
- * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
- * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
-Index: openssl-1.0.2/crypto/bn/bn_exp.c
-===================================================================
---- openssl-1.0.2.orig/crypto/bn/bn_exp.c
-+++ openssl-1.0.2/crypto/bn/bn_exp.c
-@@ -638,7 +638,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBU
- * multiple.
- */
- #define MOD_EXP_CTIME_ALIGN(x_) \
-- ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
-+ ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ADDR)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
-
- /*
- * This variant of BN_mod_exp_mont() uses fixed windows and the special
diff --git a/meta/recipes-connectivity/openssl/openssl/parallel.patch b/meta/recipes-connectivity/openssl/openssl/parallel.patch
deleted file mode 100644
index f3f4c99888..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/parallel.patch
+++ /dev/null
@@ -1,337 +0,0 @@
-Fix the parallel races in the Makefiles.
-
-This patch was taken from the Gentoo packaging:
-https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2g-parallel-build.patch
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-Refreshed for 1.0.2i
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-
---- openssl-1.0.2g/crypto/Makefile
-+++ openssl-1.0.2g/crypto/Makefile
-@@ -85,11 +85,11 @@
- @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
-
- subdirs:
-- @target=all; $(RECURSIVE_MAKE)
-+ +@target=all; $(RECURSIVE_MAKE)
-
- files:
- $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
-- @target=files; $(RECURSIVE_MAKE)
-+ +@target=files; $(RECURSIVE_MAKE)
-
- links:
- @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
-@@ -100,7 +100,7 @@
- # lib: $(LIB): are splitted to avoid end-less loop
- lib: $(LIB)
- @touch lib
--$(LIB): $(LIBOBJ)
-+$(LIB): $(LIBOBJ) | subdirs
- $(AR) $(LIB) $(LIBOBJ)
- test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
- $(RANLIB) $(LIB) || echo Never mind.
-@@ -111,7 +111,7 @@
- fi
-
- libs:
-- @target=lib; $(RECURSIVE_MAKE)
-+ +@target=lib; $(RECURSIVE_MAKE)
-
- install:
- @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
-@@ -120,7 +120,7 @@
- (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
- chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
- done;
-- @target=install; $(RECURSIVE_MAKE)
-+ +@target=install; $(RECURSIVE_MAKE)
-
- lint:
- @target=lint; $(RECURSIVE_MAKE)
---- openssl-1.0.2g/engines/Makefile
-+++ openssl-1.0.2g/engines/Makefile
-@@ -72,7 +72,7 @@
-
- all: lib subdirs
-
--lib: $(LIBOBJ)
-+lib: $(LIBOBJ) | subdirs
- @if [ -n "$(SHARED_LIBS)" ]; then \
- set -e; \
- for l in $(LIBNAMES); do \
-@@ -89,7 +89,7 @@
-
- subdirs:
- echo $(EDIRS)
-- @target=all; $(RECURSIVE_MAKE)
-+ +@target=all; $(RECURSIVE_MAKE)
-
- files:
- $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
-@@ -128,7 +128,7 @@
- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
- done; \
- fi
-- @target=install; $(RECURSIVE_MAKE)
-+ +@target=install; $(RECURSIVE_MAKE)
-
- tags:
- ctags $(SRC)
---- openssl-1.0.2g/Makefile.org
-+++ openssl-1.0.2g/Makefile.org
-@@ -279,17 +279,17 @@
- build_libssl: build_ssl libssl.pc
-
- build_crypto:
-- @dir=crypto; target=all; $(BUILD_ONE_CMD)
-+ +@dir=crypto; target=all; $(BUILD_ONE_CMD)
- build_ssl: build_crypto
-- @dir=ssl; target=all; $(BUILD_ONE_CMD)
-+ +@dir=ssl; target=all; $(BUILD_ONE_CMD)
- build_engines: build_crypto
-- @dir=engines; target=all; $(BUILD_ONE_CMD)
-+ +@dir=engines; target=all; $(BUILD_ONE_CMD)
- build_apps: build_libs
-- @dir=apps; target=all; $(BUILD_ONE_CMD)
-+ +@dir=apps; target=all; $(BUILD_ONE_CMD)
- build_tests: build_libs
-- @dir=test; target=all; $(BUILD_ONE_CMD)
-+ +@dir=test; target=all; $(BUILD_ONE_CMD)
- build_tools: build_libs
-- @dir=tools; target=all; $(BUILD_ONE_CMD)
-+ +@dir=tools; target=all; $(BUILD_ONE_CMD)
-
- all_testapps: build_libs build_testapps
- build_testapps:
-@@ -544,7 +544,7 @@
- (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
- chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
- done;
-- @set -e; target=install; $(RECURSIVE_BUILD_CMD)
-+ +@set -e; target=install; $(RECURSIVE_BUILD_CMD)
- @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
- do \
- if [ -f "$$i" ]; then \
---- openssl-1.0.2g/Makefile.shared
-+++ openssl-1.0.2g/Makefile.shared
-@@ -105,6 +105,7 @@
- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
- LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
-+ [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \
- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
- $${SHAREDCMD} $${SHAREDFLAGS} \
- -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
-@@ -122,6 +123,7 @@
- done; \
- fi; \
- if [ -n "$$SHLIB_SOVER" ]; then \
-+ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
- ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
- ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
- fi; \
---- openssl-1.0.2g/test/Makefile
-+++ openssl-1.0.2g/test/Makefile
-@@ -144,7 +144,7 @@
- tags:
- ctags $(SRC)
-
--tests: exe apps $(TESTS)
-+tests: exe $(TESTS)
-
- apps:
- @(cd ..; $(MAKE) DIRS=apps all)
-@@ -438,136 +438,136 @@
- link_app.$${shlib_target}
-
- $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
-- @target=$(RSATEST); $(BUILD_CMD)
-+ +@target=$(RSATEST); $(BUILD_CMD)
-
- $(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO)
-- @target=$(BNTEST); $(BUILD_CMD)
-+ +@target=$(BNTEST); $(BUILD_CMD)
-
- $(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO)
-- @target=$(ECTEST); $(BUILD_CMD)
-+ +@target=$(ECTEST); $(BUILD_CMD)
-
- $(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO)
-- @target=$(EXPTEST); $(BUILD_CMD)
-+ +@target=$(EXPTEST); $(BUILD_CMD)
-
- $(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO)
-- @target=$(IDEATEST); $(BUILD_CMD)
-+ +@target=$(IDEATEST); $(BUILD_CMD)
-
- $(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO)
-- @target=$(MD2TEST); $(BUILD_CMD)
-+ +@target=$(MD2TEST); $(BUILD_CMD)
-
- $(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO)
-- @target=$(SHATEST); $(BUILD_CMD)
-+ +@target=$(SHATEST); $(BUILD_CMD)
-
- $(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO)
-- @target=$(SHA1TEST); $(BUILD_CMD)
-+ +@target=$(SHA1TEST); $(BUILD_CMD)
-
- $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
-- @target=$(SHA256TEST); $(BUILD_CMD)
-+ +@target=$(SHA256TEST); $(BUILD_CMD)
-
- $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
-- @target=$(SHA512TEST); $(BUILD_CMD)
-+ +@target=$(SHA512TEST); $(BUILD_CMD)
-
- $(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
-- @target=$(RMDTEST); $(BUILD_CMD)
-+ +@target=$(RMDTEST); $(BUILD_CMD)
-
- $(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO)
-- @target=$(MDC2TEST); $(BUILD_CMD)
-+ +@target=$(MDC2TEST); $(BUILD_CMD)
-
- $(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO)
-- @target=$(MD4TEST); $(BUILD_CMD)
-+ +@target=$(MD4TEST); $(BUILD_CMD)
-
- $(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO)
-- @target=$(MD5TEST); $(BUILD_CMD)
-+ +@target=$(MD5TEST); $(BUILD_CMD)
-
- $(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO)
-- @target=$(HMACTEST); $(BUILD_CMD)
-+ +@target=$(HMACTEST); $(BUILD_CMD)
-
- $(WPTEST)$(EXE_EXT): $(WPTEST).o $(DLIBCRYPTO)
-- @target=$(WPTEST); $(BUILD_CMD)
-+ +@target=$(WPTEST); $(BUILD_CMD)
-
- $(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO)
-- @target=$(RC2TEST); $(BUILD_CMD)
-+ +@target=$(RC2TEST); $(BUILD_CMD)
-
- $(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO)
-- @target=$(BFTEST); $(BUILD_CMD)
-+ +@target=$(BFTEST); $(BUILD_CMD)
-
- $(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO)
-- @target=$(CASTTEST); $(BUILD_CMD)
-+ +@target=$(CASTTEST); $(BUILD_CMD)
-
- $(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO)
-- @target=$(RC4TEST); $(BUILD_CMD)
-+ +@target=$(RC4TEST); $(BUILD_CMD)
-
- $(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO)
-- @target=$(RC5TEST); $(BUILD_CMD)
-+ +@target=$(RC5TEST); $(BUILD_CMD)
-
- $(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO)
-- @target=$(DESTEST); $(BUILD_CMD)
-+ +@target=$(DESTEST); $(BUILD_CMD)
-
- $(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO)
-- @target=$(RANDTEST); $(BUILD_CMD)
-+ +@target=$(RANDTEST); $(BUILD_CMD)
-
- $(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO)
-- @target=$(DHTEST); $(BUILD_CMD)
-+ +@target=$(DHTEST); $(BUILD_CMD)
-
- $(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO)
-- @target=$(DSATEST); $(BUILD_CMD)
-+ +@target=$(DSATEST); $(BUILD_CMD)
-
- $(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
-- @target=$(METHTEST); $(BUILD_CMD)
-+ +@target=$(METHTEST); $(BUILD_CMD)
-
- $(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
-- @target=$(SSLTEST); $(FIPS_BUILD_CMD)
-+ +@target=$(SSLTEST); $(FIPS_BUILD_CMD)
-
- $(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
-- @target=$(ENGINETEST); $(BUILD_CMD)
-+ +@target=$(ENGINETEST); $(BUILD_CMD)
-
- $(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO)
-- @target=$(EVPTEST); $(BUILD_CMD)
-+ +@target=$(EVPTEST); $(BUILD_CMD)
-
- $(EVPEXTRATEST)$(EXE_EXT): $(EVPEXTRATEST).o $(DLIBCRYPTO)
-- @target=$(EVPEXTRATEST); $(BUILD_CMD)
-+ +@target=$(EVPEXTRATEST); $(BUILD_CMD)
-
- $(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO)
-- @target=$(ECDSATEST); $(BUILD_CMD)
-+ +@target=$(ECDSATEST); $(BUILD_CMD)
-
- $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
-- @target=$(ECDHTEST); $(BUILD_CMD)
-+ +@target=$(ECDHTEST); $(BUILD_CMD)
-
- $(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
-- @target=$(IGETEST); $(BUILD_CMD)
-+ +@target=$(IGETEST); $(BUILD_CMD)
-
- $(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO)
-- @target=$(JPAKETEST); $(BUILD_CMD)
-+ +@target=$(JPAKETEST); $(BUILD_CMD)
-
- $(ASN1TEST)$(EXE_EXT): $(ASN1TEST).o $(DLIBCRYPTO)
-- @target=$(ASN1TEST); $(BUILD_CMD)
-+ +@target=$(ASN1TEST); $(BUILD_CMD)
-
- $(SRPTEST)$(EXE_EXT): $(SRPTEST).o $(DLIBCRYPTO)
-- @target=$(SRPTEST); $(BUILD_CMD)
-+ +@target=$(SRPTEST); $(BUILD_CMD)
-
- $(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO)
-- @target=$(V3NAMETEST); $(BUILD_CMD)
-+ +@target=$(V3NAMETEST); $(BUILD_CMD)
-
- $(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
-- @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
-+ +@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
-
- $(CONSTTIMETEST)$(EXE_EXT): $(CONSTTIMETEST).o
-- @target=$(CONSTTIMETEST) $(BUILD_CMD)
-+ +@target=$(CONSTTIMETEST) $(BUILD_CMD)
-
- $(VERIFYEXTRATEST)$(EXE_EXT): $(VERIFYEXTRATEST).o
-- @target=$(VERIFYEXTRATEST) $(BUILD_CMD)
-+ +@target=$(VERIFYEXTRATEST) $(BUILD_CMD)
-
- $(CLIENTHELLOTEST)$(EXE_EXT): $(CLIENTHELLOTEST).o
-- @target=$(CLIENTHELLOTEST) $(BUILD_CMD)
-+ +@target=$(CLIENTHELLOTEST) $(BUILD_CMD)
-
- $(BADDTLSTEST)$(EXE_EXT): $(BADDTLSTEST).o
-- @target=$(BADDTLSTEST) $(BUILD_CMD)
-+ +@target=$(BADDTLSTEST) $(BUILD_CMD)
-
- $(SSLV2CONFTEST)$(EXE_EXT): $(SSLV2CONFTEST).o
-- @target=$(SSLV2CONFTEST) $(BUILD_CMD)
-+ +@target=$(SSLV2CONFTEST) $(BUILD_CMD)
-
- $(DTLSTEST)$(EXE_EXT): $(DTLSTEST).o ssltestlib.o $(DLIBSSL) $(DLIBCRYPTO)
-- @target=$(DTLSTEST); exobj=ssltestlib.o; $(BUILD_CMD)
-+ +@target=$(DTLSTEST); exobj=ssltestlib.o; $(BUILD_CMD)
-
- #$(AESTEST).o: $(AESTEST).c
- # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
-@@ -580,6 +580,6 @@
- # fi
-
- dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
-- @target=dummytest; $(BUILD_CMD)
-+ +@target=dummytest; $(BUILD_CMD)
-
- # DO NOT DELETE THIS LINE -- make depend depends on it.
- \ No newline at end of file
diff --git a/meta/recipes-connectivity/openssl/openssl/ptest-deps.patch b/meta/recipes-connectivity/openssl/openssl/ptest-deps.patch
deleted file mode 100644
index ef6d17934d..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/ptest-deps.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Remove Makefile dependencies for test targets
-
-These are probably here because the executables aren't always built for
-other platforms (e.g. Windows); however we can safely assume they'll
-always be there. None of the other test targets have such dependencies
-and if we don't remove them, make tries to rebuild the executables and
-fails during run-ptest.
-
-Upstream-Status: Inappropriate [config]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-Index: openssl-1.0.2/test/Makefile
-===================================================================
---- openssl-1.0.2.orig/test/Makefile
-+++ openssl-1.0.2/test/Makefile
-@@ -330,7 +330,7 @@ test_cms: ../apps/openssl$(EXE_EXT) cms-
- @echo "CMS consistency test"
- $(PERL) cms-test.pl
-
--test_srp: $(SRPTEST)$(EXE_EXT)
-+test_srp:
- @echo "Test SRP"
- ../util/shlib_wrap.sh ./srptest
-
-@@ -342,7 +342,7 @@ test_v3name: $(V3NAMETEST)$(EXE_EXT)
- @echo "Test X509v3_check_*"
- ../util/shlib_wrap.sh ./$(V3NAMETEST)
-
--test_heartbeat: $(HEARTBEATTEST)$(EXE_EXT)
-+test_heartbeat:
- ../util/shlib_wrap.sh ./$(HEARTBEATTEST)
-
- test_constant_time: $(CONSTTIMETEST)$(EXE_EXT)
diff --git a/meta/recipes-connectivity/openssl/openssl/ptest_makefile_deps.patch b/meta/recipes-connectivity/openssl/openssl/ptest_makefile_deps.patch
deleted file mode 100644
index 4202e61d1e..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/ptest_makefile_deps.patch
+++ /dev/null
@@ -1,248 +0,0 @@
-Additional Makefile dependencies removal for test targets
-
-Removing the dependency check for test targets as these tests are
-causing a number of failures and "noise" during ptest execution.
-
-Upstream-Status: Inappropriate [config]
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
-
-diff -Naur openssl-1.0.2d-orig/test/Makefile openssl-1.0.2d/test/Makefile
---- openssl-1.0.2d-orig/test/Makefile 2015-09-28 12:50:41.530022979 +0300
-+++ openssl-1.0.2d/test/Makefile 2015-09-28 12:57:45.930717240 +0300
-@@ -155,67 +155,67 @@
- ( $(MAKE) $$i && echo "PASS: $$i" ) || echo "FAIL: $$i"; \
- done)
-
--test_evp: $(EVPTEST)$(EXE_EXT) evptests.txt
-+test_evp:
- ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
-
--test_evp_extra: $(EVPEXTRATEST)$(EXE_EXT)
-+test_evp_extra:
- ../util/shlib_wrap.sh ./$(EVPEXTRATEST)
-
--test_des: $(DESTEST)$(EXE_EXT)
-+test_des:
- ../util/shlib_wrap.sh ./$(DESTEST)
-
--test_idea: $(IDEATEST)$(EXE_EXT)
-+test_idea:
- ../util/shlib_wrap.sh ./$(IDEATEST)
-
--test_sha: $(SHATEST)$(EXE_EXT) $(SHA1TEST)$(EXE_EXT) $(SHA256TEST)$(EXE_EXT) $(SHA512TEST)$(EXE_EXT)
-+test_sha:
- ../util/shlib_wrap.sh ./$(SHATEST)
- ../util/shlib_wrap.sh ./$(SHA1TEST)
- ../util/shlib_wrap.sh ./$(SHA256TEST)
- ../util/shlib_wrap.sh ./$(SHA512TEST)
-
--test_mdc2: $(MDC2TEST)$(EXE_EXT)
-+test_mdc2:
- ../util/shlib_wrap.sh ./$(MDC2TEST)
-
--test_md5: $(MD5TEST)$(EXE_EXT)
-+test_md5:
- ../util/shlib_wrap.sh ./$(MD5TEST)
-
--test_md4: $(MD4TEST)$(EXE_EXT)
-+test_md4:
- ../util/shlib_wrap.sh ./$(MD4TEST)
-
--test_hmac: $(HMACTEST)$(EXE_EXT)
-+test_hmac:
- ../util/shlib_wrap.sh ./$(HMACTEST)
-
--test_wp: $(WPTEST)$(EXE_EXT)
-+test_wp:
- ../util/shlib_wrap.sh ./$(WPTEST)
-
--test_md2: $(MD2TEST)$(EXE_EXT)
-+test_md2:
- ../util/shlib_wrap.sh ./$(MD2TEST)
-
--test_rmd: $(RMDTEST)$(EXE_EXT)
-+test_rmd:
- ../util/shlib_wrap.sh ./$(RMDTEST)
-
--test_bf: $(BFTEST)$(EXE_EXT)
-+test_bf:
- ../util/shlib_wrap.sh ./$(BFTEST)
-
--test_cast: $(CASTTEST)$(EXE_EXT)
-+test_cast:
- ../util/shlib_wrap.sh ./$(CASTTEST)
-
--test_rc2: $(RC2TEST)$(EXE_EXT)
-+test_rc2:
- ../util/shlib_wrap.sh ./$(RC2TEST)
-
--test_rc4: $(RC4TEST)$(EXE_EXT)
-+test_rc4:
- ../util/shlib_wrap.sh ./$(RC4TEST)
-
--test_rc5: $(RC5TEST)$(EXE_EXT)
-+test_rc5:
- ../util/shlib_wrap.sh ./$(RC5TEST)
-
--test_rand: $(RANDTEST)$(EXE_EXT)
-+test_rand:
- ../util/shlib_wrap.sh ./$(RANDTEST)
-
--test_enc: ../apps/openssl$(EXE_EXT) testenc
-+test_enc:
- @sh ./testenc
-
--test_x509: ../apps/openssl$(EXE_EXT) tx509 testx509.pem v3-cert1.pem v3-cert2.pem
-+test_x509:
- echo test normal x509v1 certificate
- sh ./tx509 2>/dev/null
- echo test first x509v3 certificate
-@@ -223,25 +223,25 @@
- echo test second x509v3 certificate
- sh ./tx509 v3-cert2.pem 2>/dev/null
-
--test_rsa: ../apps/openssl$(EXE_EXT) trsa testrsa.pem
-+test_rsa:
- @sh ./trsa 2>/dev/null
- ../util/shlib_wrap.sh ./$(RSATEST)
-
--test_crl: ../apps/openssl$(EXE_EXT) tcrl testcrl.pem
-+test_crl:
- @sh ./tcrl 2>/dev/null
-
--test_sid: ../apps/openssl$(EXE_EXT) tsid testsid.pem
-+test_sid:
- @sh ./tsid 2>/dev/null
-
--test_req: ../apps/openssl$(EXE_EXT) treq testreq.pem testreq2.pem
-+test_req:
- @sh ./treq 2>/dev/null
- @sh ./treq testreq2.pem 2>/dev/null
-
--test_pkcs7: ../apps/openssl$(EXE_EXT) tpkcs7 tpkcs7d testp7.pem pkcs7-1.pem
-+test_pkcs7:
- @sh ./tpkcs7 2>/dev/null
- @sh ./tpkcs7d 2>/dev/null
-
--test_bn: $(BNTEST)$(EXE_EXT) $(EXPTEST)$(EXE_EXT) bctest
-+test_bn:
- @echo starting big number library test, could take a while...
- @../util/shlib_wrap.sh ./$(BNTEST) >tmp.bntest
- @echo quit >>tmp.bntest
-@@ -250,33 +250,33 @@
- @echo 'test a^b%c implementations'
- ../util/shlib_wrap.sh ./$(EXPTEST)
-
--test_ec: $(ECTEST)$(EXE_EXT)
-+test_ec:
- @echo 'test elliptic curves'
- ../util/shlib_wrap.sh ./$(ECTEST)
-
--test_ecdsa: $(ECDSATEST)$(EXE_EXT)
-+test_ecdsa:
- @echo 'test ecdsa'
- ../util/shlib_wrap.sh ./$(ECDSATEST)
-
--test_ecdh: $(ECDHTEST)$(EXE_EXT)
-+test_ecdh:
- @echo 'test ecdh'
- ../util/shlib_wrap.sh ./$(ECDHTEST)
-
--test_verify: ../apps/openssl$(EXE_EXT)
-+test_verify:
- @echo "The following command should have some OK's and some failures"
- @echo "There are definitly a few expired certificates"
- ../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs/demo ../certs/demo/*.pem
-
--test_dh: $(DHTEST)$(EXE_EXT)
-+test_dh:
- @echo "Generate a set of DH parameters"
- ../util/shlib_wrap.sh ./$(DHTEST)
-
--test_dsa: $(DSATEST)$(EXE_EXT)
-+test_dsa:
- @echo "Generate a set of DSA parameters"
- ../util/shlib_wrap.sh ./$(DSATEST)
- ../util/shlib_wrap.sh ./$(DSATEST) -app2_1
-
--test_gen testreq.pem: ../apps/openssl$(EXE_EXT) testgen test.cnf
-+test_gen testreq.pem:
- @echo "Generate and verify a certificate request"
- @sh ./testgen
-
-@@ -288,13 +288,11 @@
- @cat certCA.ss certU.ss > intP1.ss
- @cat certCA.ss certU.ss certP1.ss > intP2.ss
-
--test_engine: $(ENGINETEST)$(EXE_EXT)
-+test_engine:
- @echo "Manipulate the ENGINE structures"
- ../util/shlib_wrap.sh ./$(ENGINETEST)
-
--test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \
-- intP1.ss intP2.ss $(SSLTEST)$(EXE_EXT) testssl testsslproxy \
-- ../apps/server2.pem serverinfo.pem
-+test_ssl:
- @echo "test SSL protocol"
- @if [ -n "$(FIPSCANLIB)" ]; then \
- sh ./testfipsssl keyU.ss certU.ss certCA.ss; \
-@@ -304,7 +302,7 @@
- @sh ./testsslproxy keyP1.ss certP1.ss intP1.ss
- @sh ./testsslproxy keyP2.ss certP2.ss intP2.ss
-
--test_ca: ../apps/openssl$(EXE_EXT) testca CAss.cnf Uss.cnf
-+test_ca:
- @if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then \
- echo "skipping CA.sh test -- requires RSA"; \
- else \
-@@ -312,11 +310,11 @@
- sh ./testca; \
- fi
-
--test_aes: #$(AESTEST)
-+test_aes:
- # @echo "test Rijndael"
- # ../util/shlib_wrap.sh ./$(AESTEST)
-
--test_tsa: ../apps/openssl$(EXE_EXT) testtsa CAtsa.cnf ../util/shlib_wrap.sh
-+test_tsa:
- @if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then \
- echo "skipping testtsa test -- requires RSA"; \
- else \
-@@ -331,7 +329,7 @@
- @echo "Test JPAKE"
- ../util/shlib_wrap.sh ./$(JPAKETEST)
-
--test_cms: ../apps/openssl$(EXE_EXT) cms-test.pl smcont.txt
-+test_cms:
- @echo "CMS consistency test"
- $(PERL) cms-test.pl
-
-@@ -339,22 +337,22 @@
- @echo "Test SRP"
- ../util/shlib_wrap.sh ./srptest
-
--test_ocsp: ../apps/openssl$(EXE_EXT) tocsp
-+test_ocsp:
- @echo "Test OCSP"
- @sh ./tocsp
-
--test_v3name: $(V3NAMETEST)$(EXE_EXT)
-+test_v3name:
- @echo "Test X509v3_check_*"
- ../util/shlib_wrap.sh ./$(V3NAMETEST)
-
- test_heartbeat:
- ../util/shlib_wrap.sh ./$(HEARTBEATTEST)
-
--test_constant_time: $(CONSTTIMETEST)$(EXE_EXT)
-+test_constant_time:
- @echo "Test constant time utilites"
- ../util/shlib_wrap.sh ./$(CONSTTIMETEST)
-
--test_verify_extra: $(VERIFYEXTRATEST)$(EXE_EXT)
-+test_verify_extra:
- @echo $(START) $@
- ../util/shlib_wrap.sh ./$(VERIFYEXTRATEST)
-
diff --git a/meta/recipes-connectivity/openssl/openssl/run-ptest b/meta/recipes-connectivity/openssl/openssl/run-ptest
index 3b20fce1ee..3fb22471f8 100755..100644
--- a/meta/recipes-connectivity/openssl/openssl/run-ptest
+++ b/meta/recipes-connectivity/openssl/openssl/run-ptest
@@ -1,2 +1,12 @@
#!/bin/sh
-make -k runtest
+
+set -e
+
+# Optional arguments are 'list' to lists all tests, or the test name (base name
+# ie test_evp, not 03_test_evp.t).
+
+export TOP=.
+# OPENSSL_ENGINES is relative from the test binaries
+export OPENSSL_ENGINES=../engines
+
+perl ./test/run_tests.pl $* | perl -0pe 's#(.*) \.*.ok#PASS: \1#g; s#(.*) \.*.skipped: (.*)#SKIP: \1 (\2)#g; s#(.*) \.*.\nDubious#FAIL: \1#;'
diff --git a/meta/recipes-connectivity/openssl/openssl/shared-libs.patch b/meta/recipes-connectivity/openssl/openssl/shared-libs.patch
deleted file mode 100644
index a7ca0a3078..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/shared-libs.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: openssl-1.0.1e/crypto/Makefile
-===================================================================
---- openssl-1.0.1e.orig/crypto/Makefile
-+++ openssl-1.0.1e/crypto/Makefile
-@@ -108,7 +108,7 @@ $(LIB): $(LIBOBJ)
-
- shared: buildinf.h lib subdirs
- if [ -n "$(SHARED_LIBS)" ]; then \
-- (cd ..; $(MAKE) $(SHARED_LIB)); \
-+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
- fi
-
- libs:
-Index: openssl-1.0.1e/Makefile.org
-===================================================================
---- openssl-1.0.1e.orig/Makefile.org
-+++ openssl-1.0.1e/Makefile.org
-@@ -310,7 +310,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_
-
- libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
- @if [ "$(SHLIB_TARGET)" != "" ]; then \
-- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
-+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
- else \
- echo "There's no support for shared libraries on this platform" >&2; \
- exit 1; \
-Index: openssl-1.0.1e/ssl/Makefile
-===================================================================
---- openssl-1.0.1e.orig/ssl/Makefile
-+++ openssl-1.0.1e/ssl/Makefile
-@@ -62,7 +62,7 @@ lib: $(LIBOBJ)
-
- shared: lib
- if [ -n "$(SHARED_LIBS)" ]; then \
-- (cd ..; $(MAKE) $(SHARED_LIB)); \
-+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
- fi
-
- files:
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2j.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2j.bb
deleted file mode 100644
index 257e3cfc4b..0000000000
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2j.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-require openssl.inc
-
-# For target side versions of openssl enable support for OCF Linux driver
-# if they are available.
-DEPENDS += "cryptodev-linux"
-
-CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=27ffa5d74bb5a337056c14b2ef93fbf6"
-
-export DIRS = "crypto ssl apps engines"
-export OE_LDFLAGS="${LDFLAGS}"
-
-SRC_URI += "file://find.pl;subdir=${BP}/util/ \
- file://run-ptest \
- file://openssl-c_rehash.sh \
- file://configure-targets.patch \
- file://shared-libs.patch \
- file://oe-ldflags.patch \
- file://engines-install-in-libdir-ssl.patch \
- file://debian1.0.2/block_diginotar.patch \
- file://debian1.0.2/block_digicert_malaysia.patch \
- file://debian/ca.patch \
- file://debian/c_rehash-compat.patch \
- file://debian/debian-targets.patch \
- file://debian/man-dir.patch \
- file://debian/man-section.patch \
- file://debian/no-rpath.patch \
- file://debian/no-symbolic.patch \
- file://debian/pic.patch \
- file://debian1.0.2/version-script.patch \
- file://openssl_fix_for_x32.patch \
- file://fix-cipher-des-ede3-cfb1.patch \
- file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \
- file://openssl-fix-des.pod-error.patch \
- file://Makefiles-ptest.patch \
- file://ptest-deps.patch \
- file://openssl-1.0.2a-x32-asm.patch \
- file://ptest_makefile_deps.patch \
- file://configure-musl-target.patch \
- file://parallel.patch \
- file://openssl-util-perlpath.pl-cwd.patch \
- "
-SRC_URI[md5sum] = "96322138f0b69e61b7212bc53d5e912b"
-SRC_URI[sha256sum] = "e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431"
-
-PACKAGES =+ "${PN}-engines"
-FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
-
-# The crypto_use_bigint patch means that perl's bignum module needs to be
-# installed, but some distributions (for example Fedora 23) don't ship it by
-# default. As the resulting error is very misleading check for bignum before
-# building.
-do_configure_prepend() {
- if ! perl -Mbigint -e true; then
- bbfatal "The perl module 'bignum' was not found but this is required to build openssl. Please install this module (often packaged as perl-bignum) and re-run bitbake."
- fi
-}
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
new file mode 100644
index 0000000000..458ae7daf4
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
@@ -0,0 +1,209 @@
+SUMMARY = "Secure Socket Layer"
+DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
+HOMEPAGE = "http://www.openssl.org/"
+BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
+SECTION = "libs/network"
+
+# "openssl" here actually means both OpenSSL and SSLeay licenses apply
+# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped)
+LICENSE = "openssl"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8"
+
+DEPENDS = "hostperl-runtime-native"
+
+SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
+ file://run-ptest \
+ file://0001-skip-test_symbol_presence.patch \
+ file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
+ file://afalg.patch \
+ file://CVE-2019-1551.patch \
+ "
+
+SRC_URI_append_class-nativesdk = " \
+ file://environment.d-openssl.sh \
+ "
+
+SRC_URI[md5sum] = "3be209000dbc7e1b95bcdf47980a3baa"
+SRC_URI[sha256sum] = "1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2"
+
+inherit lib_package multilib_header multilib_script ptest
+MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux"
+
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+#| ./libcrypto.so: undefined reference to `getcontext'
+#| ./libcrypto.so: undefined reference to `setcontext'
+#| ./libcrypto.so: undefined reference to `makecontext'
+EXTRA_OECONF_append_libc-musl = " no-async"
+EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm"
+
+# adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions
+# (native versions can be built with newer glibc, but then relocated onto a system with older glibc)
+EXTRA_OECONF_class-native = "--with-rand-seed=os,devrandom"
+EXTRA_OECONF_class-nativesdk = "--with-rand-seed=os,devrandom"
+
+# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate.
+CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
+CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
+
+do_configure () {
+ os=${HOST_OS}
+ case $os in
+ linux-gnueabi |\
+ linux-gnuspe |\
+ linux-musleabi |\
+ linux-muslspe |\
+ linux-musl )
+ os=linux
+ ;;
+ *)
+ ;;
+ esac
+ target="$os-${HOST_ARCH}"
+ case $target in
+ linux-arm*)
+ target=linux-armv4
+ ;;
+ linux-aarch64*)
+ target=linux-aarch64
+ ;;
+ linux-i?86 | linux-viac3)
+ target=linux-x86
+ ;;
+ linux-gnux32-x86_64 | linux-muslx32-x86_64 )
+ target=linux-x32
+ ;;
+ linux-gnu64-x86_64)
+ target=linux-x86_64
+ ;;
+ linux-mips | linux-mipsel)
+ # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
+ target="linux-mips32 ${TARGET_CC_ARCH}"
+ ;;
+ linux-gnun32-mips*)
+ target=linux-mips64
+ ;;
+ linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el)
+ target=linux64-mips64
+ ;;
+ linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*)
+ target=linux-generic32
+ ;;
+ linux-powerpc)
+ target=linux-ppc
+ ;;
+ linux-powerpc64)
+ target=linux-ppc64
+ ;;
+ linux-riscv32)
+ target=linux-generic32
+ ;;
+ linux-riscv64)
+ target=linux-generic64
+ ;;
+ linux-sparc | linux-supersparc)
+ target=linux-sparcv9
+ ;;
+ esac
+
+ useprefix=${prefix}
+ if [ "x$useprefix" = "x" ]; then
+ useprefix=/
+ fi
+ # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the
+ # environment variables set by bitbake. Adjust the environment variables instead.
+ PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
+ perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
+ perl ${B}/configdata.pm --dump
+}
+
+do_install () {
+ oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
+
+ oe_multilib_header openssl/opensslconf.h
+
+ # Create SSL structure for packages such as ca-certificates which
+ # contain hard-coded paths to /etc/ssl. Debian does the same.
+ install -d ${D}${sysconfdir}/ssl
+ mv ${D}${libdir}/ssl-1.1/certs \
+ ${D}${libdir}/ssl-1.1/private \
+ ${D}${libdir}/ssl-1.1/openssl.cnf \
+ ${D}${sysconfdir}/ssl/
+
+ # Although absolute symlinks would be OK for the target, they become
+ # invalid if native or nativesdk are relocated from sstate.
+ ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs
+ ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private
+ ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf
+}
+
+do_install_append_class-native () {
+ create_wrapper ${D}${bindir}/openssl \
+ OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \
+ SSL_CERT_DIR=${libdir}/ssl-1.1/certs \
+ SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \
+ OPENSSL_ENGINES=${libdir}/engines-1.1
+}
+
+do_install_append_class-nativesdk () {
+ mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
+ install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
+ sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
+}
+
+PTEST_BUILD_HOST_FILES += "configdata.pm"
+PTEST_BUILD_HOST_PATTERN = "perl_version ="
+do_install_ptest () {
+ # Prune the build tree
+ rm -f ${B}/fuzz/*.* ${B}/test/*.*
+
+ cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH}
+ cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH}
+
+ # For test_shlibload
+ ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/
+ ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/
+
+ install -d ${D}${PTEST_PATH}/apps
+ ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps
+ install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps
+ install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps
+
+ install -d ${D}${PTEST_PATH}/engines
+ install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines
+}
+
+# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
+# package RRECOMMENDS on this package. This will enable the configuration
+# file to be installed for both the openssl-bin package and the libcrypto
+# package since the openssl-bin package depends on the libcrypto package.
+
+PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc"
+
+FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
+FILES_libssl = "${libdir}/libssl${SOLIBS}"
+FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
+FILES_${PN}-engines = "${libdir}/engines-1.1"
+FILES_${PN}-misc = "${libdir}/ssl-1.1/misc"
+FILES_${PN} =+ "${libdir}/ssl-1.1/*"
+FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
+
+CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
+
+RRECOMMENDS_libcrypto += "openssl-conf"
+RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash"
+
+BBCLASSEXTEND = "native nativesdk"
+
+CVE_PRODUCT = "openssl:openssl"
+
+# Only affects OpenSSL >= 1.1.1 in combination with Apache < 2.4.37
+# Apache in meta-webserver is already recent enough
+CVE_CHECK_WHITELIST += "CVE-2019-0190"
diff --git a/meta/recipes-connectivity/portmap/portmap.inc b/meta/recipes-connectivity/portmap/portmap.inc
deleted file mode 100644
index 338af33a38..0000000000
--- a/meta/recipes-connectivity/portmap/portmap.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "RPC program number mapper"
-HOMEPAGE = "http://neil.brown.name/portmap/"
-SECTION = "console/network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \
- file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1"
-
-INITSCRIPT_NAME = "portmap"
-INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 32 0 1 6 ."
-
-inherit update-rc.d systemd
-
-SYSTEMD_SERVICE_${PN} = "portmap.service"
-
-PACKAGES =+ "portmap-utils"
-FILES_portmap-utils = "${base_sbindir}/pmap_set ${base_sbindir}/pmap_dump"
-FILES_${PN}-doc += "${docdir}"
diff --git a/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch b/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch
deleted file mode 100644
index 2fbf784b73..0000000000
--- a/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Backport
-
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 13 May 2007 21:15:12 +0000 (-0400)
-Subject: respect DESTDIR and dont use -s with install
-X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d
-
-respect DESTDIR and dont use -s with install
-
-$(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ...
-so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a
-default to support old installs; not sure if you'd just cut it.
-
-Stripping should be left to the person to handle, not automatically done by
-the install step. Also, `install -s` always calls `strip` which is
-wrong/undesired in cross-compiling scenarios.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-Signed-off-by: Neil Brown <neilb@suse.de>
----
-
-diff --git a/Makefile b/Makefile
-index 9e9a4b4..5343428 100644
---- a/Makefile
-+++ b/Makefile
-@@ -135,13 +135,14 @@ from_local: CPPFLAGS += -DTEST
- portmap.man : portmap.8
- sed $(MAN_SED) < portmap.8 > portmap.man
-
-+DESTDIR = $(BASEDIR)
- install: all
-- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
-- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
-- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
-- install -o root -g root -m 0644 portmap.man ${BASEDIR}/usr/share/man/man8/portmap.8
-- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
-- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
-+ install -o root -g root -m 0755 portmap $(DESTDIR)/sbin
-+ install -o root -g root -m 0755 pmap_dump $(DESTDIR)/sbin
-+ install -o root -g root -m 0755 pmap_set $(DESTDIR)/sbin
-+ install -o root -g root -m 0644 portmap.man $(DESTDIR)/usr/share/man/man8/portmap.8
-+ install -o root -g root -m 0644 pmap_dump.8 $(DESTDIR)/usr/share/man/man8
-+ install -o root -g root -m 0644 pmap_set.8 $(DESTDIR)/usr/share/man/man8
-
- clean:
- rm -f *.o portmap pmap_dump pmap_set from_local \
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.init b/meta/recipes-connectivity/portmap/portmap/portmap.init
deleted file mode 100755
index 621aa171ae..0000000000
--- a/meta/recipes-connectivity/portmap/portmap/portmap.init
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-#
-### BEGIN INIT INFO
-# Provides: portmap
-# Required-Start: $network
-# Required-Stop: $network
-# Default-Start: S 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: The RPC portmapper
-# Description: Portmap is a server that converts RPC (Remote
-# Procedure Call) program numbers into DARPA
-# protocol port numbers. It must be running in
-# order to make RPC calls. Services that use
-# RPC include NFS and NIS.
-### END INIT INFO
-
-test -f /sbin/portmap || exit 0
-
-case "$1" in
- start)
- echo "Starting portmap daemon..."
- start-stop-daemon --start --quiet --exec /sbin/portmap
-
- if [ -f /var/run/portmap.upgrade-state ]; then
- echo "Restoring old RPC service information..."
- sleep 1 # needs a short pause or pmap_set won't work. :(
- pmap_set </var/run/portmap.upgrade-state
- rm -f /var/run/portmap.upgrade-state
- echo "done."
- fi
-
- ;;
- stop)
- echo "Stopping portmap daemon..."
- start-stop-daemon --stop --quiet --exec /sbin/portmap
- ;;
- reload)
- ;;
- force-reload)
- $0 restart
- ;;
- restart)
- # pmap_dump and pmap_set may be in a different package and not installed...
- if [ -f /sbin/pmap_dump -a -f /sbin/pmap_set ]; then
- do_state=1
- else
- do_state=0
- fi
- [ $do_state -eq 1 ] && pmap_dump >/var/run/portmap.state
- $0 stop
- $0 start
- if [ $do_state -eq 1 ]; then
- if [ ! -f /var/run/portmap.upgrade-state ]; then
- sleep 1
- pmap_set </var/run/portmap.state
- fi
- rm -f /var/run/portmap.state
- fi
- ;;
- *)
- echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
- exit 1
- ;;
-esac
-
-exit 0
-
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.service b/meta/recipes-connectivity/portmap/portmap/portmap.service
deleted file mode 100644
index 7ef9d7b02e..0000000000
--- a/meta/recipes-connectivity/portmap/portmap/portmap.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=The RPC portmapper
-After=network.target
-
-[Service]
-Type=forking
-ExecStart=@BASE_SBINDIR@/portmap
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/portmap/portmap/tcpd-config.patch b/meta/recipes-connectivity/portmap/portmap/tcpd-config.patch
deleted file mode 100644
index 2f25058095..0000000000
--- a/meta/recipes-connectivity/portmap/portmap/tcpd-config.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Backport
-
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 13 May 2007 21:17:32 +0000 (-0400)
-Subject: fix building with tcpd support disabled
-X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5
-
-fix building with tcpd support disabled
-
-Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined.
-
-Signed-off-by: Timothy Redaelli <drizzt@gentoo.org>
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-Signed-off-by: Neil Brown <neilb@suse.de>
----
-
-diff --git a/pmap_check.c b/pmap_check.c
-index 84f2c12..443a822 100644
---- a/pmap_check.c
-+++ b/pmap_check.c
-@@ -44,7 +44,9 @@
- #include <netinet/in.h>
- #include <rpc/rpcent.h>
- #endif
-+#ifdef HOSTS_ACCESS
- #include <tcpd.h>
-+#endif
- #include <arpa/inet.h>
- #include <grp.h>
-
diff --git a/meta/recipes-connectivity/portmap/portmap_6.0.bb b/meta/recipes-connectivity/portmap/portmap_6.0.bb
deleted file mode 100644
index 999b4a9374..0000000000
--- a/meta/recipes-connectivity/portmap/portmap_6.0.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-require portmap.inc
-
-DEPENDS_append_libc-musl = " libtirpc "
-
-PR = "r9"
-
-SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
- file://destdir-no-strip.patch \
- file://tcpd-config.patch \
- file://portmap.init \
- file://portmap.service"
-
-SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff"
-SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de"
-
-S = "${WORKDIR}/${BPN}_${PV}/"
-
-PACKAGECONFIG ??= "tcp-wrappers"
-PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers"
-
-CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
-CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
-EXTRA_OEMAKE += "'NO_TCP_WRAPPER=${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '', '1', d)}'"
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
-LDFLAGS_append_libc-musl = " -ltirpc "
-
-do_install() {
- install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
- oe_runmake install DESTDIR=${D}
-
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/portmap.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/portmap.service
-}
diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
index 51a76b4299..b5f68951d7 100644
--- a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
+++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
@@ -4,8 +4,7 @@ DEPENDS = "ppp"
RDEPENDS_${PN} = "ppp"
PR = "r8"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://host-peer \
file://ppp-dialin"
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch b/meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch
index 8aa2d2e678..ea4969b366 100644
--- a/meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch
+++ b/meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch
@@ -3,34 +3,14 @@ From: Lu Chong <Chong.Lu@windriver.com>
Date: Tue, 5 Nov 2013 17:32:56 +0800
Subject: [PATCH] ppp: Fix compilation errors in Makefile
-This patch fixes below issues:
-
-1. Make can't exit while compilation error occurs in subdir for plugins building.
-
-2. If build ppp with newer kernel (3.10.10), it will pick 'if_pppox.h' from sysroot-dir and
- 'if_pppol2tp.h' from its own source dir, this cause below build errors:
-
- bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:84:26:
- error: field 'pppol2tp' has incomplete type
- struct pppol2tpin6_addr pppol2tp;
- ^
- bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:99:28:
- error: field 'pppol2tp' has incomplete type
- struct pppol2tpv3in6_addr pppol2tp;
- ^
-
-The 'sysroot-dir/if_pppox.h' enabled ipv6 support but the 'source-dir/if_pppol2tp.h' lost
-related structure definitions, we should use both header files from sysroots to fix this
-build failure.
+Make can't exit while compilation error occurs in subdir for plugins building.
Upstream-Status: Pending
Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
---
- pppd/plugins/Makefile.linux | 2 +-
- pppd/plugins/pppol2tp/Makefile.linux | 2 +-
- pppd/plugins/rp-pppoe/Makefile.linux | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
+ pppd/plugins/Makefile.linux | 1 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
index 0a7ec7b..2a2c15a 100644
@@ -45,31 +25,6 @@ index 0a7ec7b..2a2c15a 100644
%.so: %.c
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
-diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
-index 19eff67..feb2f52 100644
---- a/pppd/plugins/pppol2tp/Makefile.linux
-+++ b/pppd/plugins/pppol2tp/Makefile.linux
-@@ -1,6 +1,6 @@
- #CC = gcc
- COPTS = -O2 -g
--CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC
-+CFLAGS = $(COPTS) -I. -I../.. -fPIC
- LDFLAGS = -shared
- INSTALL = install
-
-diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
-index f078991..15b9118 100644
---- a/pppd/plugins/rp-pppoe/Makefile.linux
-+++ b/pppd/plugins/rp-pppoe/Makefile.linux
-@@ -26,7 +26,7 @@ INSTALL = install
- RP_VERSION=3.8p
-
- COPTS=-O2 -g
--CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
-+CFLAGS=$(COPTS) '-DRP_VERSION="$(RP_VERSION)"'
- all: rp-pppoe.so pppoe-discovery
-
- pppoe-discovery: pppoe-discovery.o debug.o
--
1.7.9.5
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch b/meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch
new file mode 100644
index 0000000000..a32f89fbc8
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch
@@ -0,0 +1,43 @@
+commit cd90fd147844a0cfec101f1e2db7a3c59d236621
+Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed Dec 28 14:11:22 2016 +0200
+
+pppol2tp plugin: Remove unneeded include
+
+The include is not required and will break compile on musl libc with
+
+| In file included from pppol2tp.c:34:0:
+| /usr/include/linux/if.h:97:2: error: expected identifier before numeric constant
+| IFF_LOWER_UP = 1<<16, /* __volatile__ */
+
+Patch originally from Khem Raj.
+
+Upstream-Status: Pending [https://github.com/paulusmack/ppp/issues/73]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+diff --git a/pppd/plugins/pppol2tp/openl2tp.c b/pppd/plugins/pppol2tp/openl2tp.c
+index 9643b96..458316b 100644
+--- a/pppd/plugins/pppol2tp/openl2tp.c
++++ b/pppd/plugins/pppol2tp/openl2tp.c
+@@ -47,7 +47,6 @@
+ #include <linux/if_ether.h>
+ #include <linux/ppp_defs.h>
+ #include <linux/if_ppp.h>
+-#include <linux/if_pppox.h>
+ #include <linux/if_pppol2tp.h>
+
+ #include "l2tp_event.h"
+diff --git a/pppd/plugins/pppol2tp/pppol2tp.c b/pppd/plugins/pppol2tp/pppol2tp.c
+index 0e28606..4f6d98c 100644
+--- a/pppd/plugins/pppol2tp/pppol2tp.c
++++ b/pppd/plugins/pppol2tp/pppol2tp.c
+@@ -46,7 +46,6 @@
+ #include <linux/if_ether.h>
+ #include <linux/ppp_defs.h>
+ #include <linux/if_ppp.h>
+-#include <linux/if_pppox.h>
+ #include <linux/if_pppol2tp.h>
+
+ /* should be added to system's socket.h... */
+---
+
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch
new file mode 100644
index 0000000000..9362d12648
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch
@@ -0,0 +1,54 @@
+From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Mon, 9 Jan 2017 13:34:23 +0000
+Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
+
+This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
+included before <linux/in.h> otherwise the earlier, unaware of the latter,
+tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
+alone anymore, since it pulls the headers in the wrong order, so we better
+include <netinet/in.h> early.
+
+Upstream-Status: Backport
+[https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..c4aaa6e 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -47,6 +47,10 @@
+ #include <sys/socket.h>
+ #endif
+
++/* This has to be included before Linux 4.8's linux/in.h
++ * gets dragged in. */
++#include <netinet/in.h>
++
+ /* Ugly header files on some Linux boxes... */
+ #if defined(HAVE_LINUX_IF_H)
+ #include <linux/if.h>
+@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+
+-#include <netinet/in.h>
+-
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+
+@@ -98,7 +100,6 @@ typedef unsigned long UINT32_t;
+ #endif
+
+
+-
+ /* Ethernet frame types according to RFC 2516 */
+ #define ETH_PPPOE_DISCOVERY 0x8863
+ #define ETH_PPPOE_SESSION 0x8864
+--
+2.7.4
+
diff --git a/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch b/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
index db4dbc27a9..7dd69d8f4d 100644
--- a/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
+++ b/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
@@ -4,10 +4,11 @@ Rebased it to fit ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
Upstream-Status: Inappropriate [debian/suse patches]
-diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
---- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 16:40:00.478716855 +0800
-@@ -198,6 +198,16 @@
+Index: ppp-2.4.7/pppd/ipcp.c
+===================================================================
+--- ppp-2.4.7.orig/pppd/ipcp.c
++++ ppp-2.4.7/pppd/ipcp.c
+@@ -198,6 +198,16 @@ static option_t ipcp_option_list[] = {
"disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
&ipcp_wantoptions[0].default_route },
@@ -24,7 +25,7 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
{ "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
"Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
{ "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
-@@ -271,7 +281,7 @@
+@@ -271,7 +281,7 @@ struct protent ipcp_protent = {
ip_active_pkt
};
@@ -33,7 +34,7 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
static void ipcp_script __P((char *, int)); /* Run an up/down script */
static void ipcp_script_done __P((void *));
-@@ -1742,7 +1752,12 @@
+@@ -1761,7 +1771,12 @@ ip_demand_conf(u)
if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
return 0;
if (wo->default_route)
@@ -46,7 +47,7 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
default_route_set[u] = 1;
if (wo->proxy_arp)
if (sifproxyarp(u, wo->hisaddr))
-@@ -1830,7 +1845,8 @@
+@@ -1849,7 +1864,8 @@ ipcp_up(f)
*/
if (demand) {
if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
@@ -56,7 +57,7 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
if (go->ouraddr != wo->ouraddr) {
warn("Local IP address changed to %I", go->ouraddr);
script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
-@@ -1855,7 +1871,12 @@
+@@ -1874,7 +1890,12 @@ ipcp_up(f)
/* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route)
@@ -69,7 +70,7 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */
-@@ -1905,7 +1926,12 @@
+@@ -1924,7 +1945,12 @@ ipcp_up(f)
/* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route)
@@ -82,7 +83,7 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */
-@@ -1983,7 +2009,7 @@
+@@ -2002,7 +2028,7 @@ ipcp_down(f)
sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
sifdown(f->unit);
ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
@@ -91,7 +92,7 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
}
/* Execute the ip-down script */
-@@ -1999,12 +2025,21 @@
+@@ -2018,12 +2044,21 @@ ipcp_down(f)
* proxy arp entries, etc.
*/
static void
@@ -115,10 +116,11 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
cifproxyarp(unit, hisaddr);
proxy_arp_set[unit] = 0;
}
-diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
---- ppp-2.4.5-orig/pppd/ipcp.h 2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/ipcp.h 2010-06-30 16:40:49.586203129 +0800
-@@ -70,6 +70,7 @@
+Index: ppp-2.4.7/pppd/ipcp.h
+===================================================================
+--- ppp-2.4.7.orig/pppd/ipcp.h
++++ ppp-2.4.7/pppd/ipcp.h
+@@ -70,6 +70,7 @@ typedef struct ipcp_options {
bool old_addrs; /* Use old (IP-Addresses) option? */
bool req_addr; /* Ask peer to send IP address? */
bool default_route; /* Assign default route through interface? */
@@ -126,10 +128,11 @@ diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
bool proxy_arp; /* Make proxy ARP entry for peer? */
bool neg_vj; /* Van Jacobson Compression? */
bool old_vj; /* use old (short) form of VJ option? */
-diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
---- ppp-2.4.5-orig/pppd/pppd.8 2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/pppd.8 2010-06-30 16:42:47.102413859 +0800
-@@ -121,6 +121,13 @@
+Index: ppp-2.4.7/pppd/pppd.8
+===================================================================
+--- ppp-2.4.7.orig/pppd/pppd.8
++++ ppp-2.4.7/pppd/pppd.8
+@@ -121,6 +121,13 @@ the gateway, when IPCP negotiation is su
This entry is removed when the PPP connection is broken. This option
is privileged if the \fInodefaultroute\fR option has been specified.
.TP
@@ -143,7 +146,7 @@ diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
.B disconnect \fIscript
Execute the command specified by \fIscript\fR, by passing it to a
shell, after
-@@ -717,7 +724,12 @@
+@@ -734,7 +741,12 @@ disable both forms of hardware flow cont
.TP
.B nodefaultroute
Disable the \fIdefaultroute\fR option. The system administrator who
@@ -157,10 +160,11 @@ diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
can do so by placing this option in the /etc/ppp/options file.
.TP
.B nodeflate
-diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
---- ppp-2.4.5-orig/pppd/pppd.h 2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/pppd.h 2010-06-30 16:43:36.514148327 +0800
-@@ -643,7 +643,11 @@
+Index: ppp-2.4.7/pppd/pppd.h
+===================================================================
+--- ppp-2.4.7.orig/pppd/pppd.h
++++ ppp-2.4.7/pppd/pppd.h
+@@ -665,7 +665,11 @@ int sif6addr __P((int, eui64_t, eui64_t
int cif6addr __P((int, eui64_t, eui64_t));
/* Remove an IPv6 address from i/f */
#endif
@@ -172,19 +176,20 @@ diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
/* Create default route through i/f */
int cifdefaultroute __P((int, u_int32_t, u_int32_t));
/* Delete default route through i/f */
-diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
---- ppp-2.4.5-orig/pppd/sys-linux.c 2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/sys-linux.c 2010-06-30 16:54:00.362716231 +0800
-@@ -206,6 +206,8 @@
-
+Index: ppp-2.4.7/pppd/sys-linux.c
+===================================================================
+--- ppp-2.4.7.orig/pppd/sys-linux.c
++++ ppp-2.4.7/pppd/sys-linux.c
+@@ -207,6 +207,8 @@ static unsigned char inbuf[512]; /* buff
static int if_is_up; /* Interface has been marked up */
+ static int if6_is_up; /* Interface has been marked up for IPv6, to help differentiate */
static int have_default_route; /* Gateway for default route added */
+static struct rtentry old_def_rt; /* Old default route */
+static int default_rt_repl_rest; /* replace and restore old default rt */
static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
static char proxy_arp_dev[16]; /* Device for proxy arp entry */
static u_int32_t our_old_addr; /* for detecting address changes */
-@@ -1537,6 +1539,9 @@
+@@ -1545,6 +1547,9 @@ static int read_route_table(struct rtent
p = NULL;
}
@@ -194,7 +199,7 @@ diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
-@@ -1606,20 +1611,51 @@
+@@ -1614,20 +1619,51 @@ int have_route_to(u_int32_t addr)
/********************************************************************
*
* sifdefaultroute - assign a default route through the address given.
@@ -260,7 +265,7 @@ diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
}
memset (&rt, 0, sizeof (rt));
-@@ -1638,6 +1674,12 @@
+@@ -1646,6 +1682,12 @@ int sifdefaultroute (int unit, u_int32_t
error("default route ioctl(SIOCADDRT): %m");
return 0;
}
@@ -273,7 +278,7 @@ diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
have_default_route = 1;
return 1;
-@@ -1673,6 +1715,16 @@
+@@ -1681,6 +1723,16 @@ int cifdefaultroute (int unit, u_int32_t
return 0;
}
}
diff --git a/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch b/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
index d59717ebd3..8a69396cc7 100644
--- a/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
+++ b/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
@@ -6,10 +6,11 @@ Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Upstream-Status: Inappropriate [configuration]
-diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
---- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 17:08:21.806363042 +0800
-@@ -117,10 +117,10 @@
+Index: ppp-2.4.7/pppd/Makefile.linux
+===================================================================
+--- ppp-2.4.7.orig/pppd/Makefile.linux
++++ ppp-2.4.7/pppd/Makefile.linux
+@@ -120,10 +120,10 @@ CFLAGS += -DHAS_SHADOW
#LIBS += -lshadow $(LIBS)
endif
@@ -20,9 +21,9 @@ diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
-endif
+#endif
- ifdef NEEDDES
- ifndef USE_CRYPT
-@@ -169,10 +169,10 @@
+ ifdef USE_LIBUTIL
+ CFLAGS += -DHAVE_LOGWTMP=1
+@@ -177,10 +177,10 @@ LIBS += -ldl
endif
ifdef FILTER
diff --git a/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch b/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch
new file mode 100644
index 0000000000..e53f240543
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch
@@ -0,0 +1,84 @@
+Used openssl for the DES instead of the libcrypt / glibc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: ppp-2.4.7/pppd/Makefile.linux
+===================================================================
+--- ppp-2.4.7.orig/pppd/Makefile.linux
++++ ppp-2.4.7/pppd/Makefile.linux
+@@ -38,7 +38,7 @@ LIBS =
+ # Uncomment the next 2 lines to include support for Microsoft's
+ # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
+ CHAPMS=y
+-USE_CRYPT=y
++#USE_CRYPT=y
+ # Don't use MSLANMAN unless you really know what you're doing.
+ #MSLANMAN=y
+ # Uncomment the next line to include support for MPPE. CHAPMS (above) must
+@@ -132,7 +132,7 @@ endif
+
+ ifdef NEEDDES
+ ifndef USE_CRYPT
+-LIBS += -ldes $(LIBS)
++LIBS += -lcrypto
+ else
+ CFLAGS += -DUSE_CRYPT=1
+ endif
+Index: ppp-2.4.7/pppd/pppcrypt.c
+===================================================================
+--- ppp-2.4.7.orig/pppd/pppcrypt.c
++++ ppp-2.4.7/pppd/pppcrypt.c
+@@ -64,7 +64,7 @@ u_char *des_key; /* OUT 64 bit DES key w
+ des_key[7] = Get7Bits(key, 49);
+
+ #ifndef USE_CRYPT
+- des_set_odd_parity((des_cblock *)des_key);
++ DES_set_odd_parity((DES_cblock *)des_key);
+ #endif
+ }
+
+@@ -158,25 +158,25 @@ u_char *clear; /* OUT 8 octets */
+ }
+
+ #else /* USE_CRYPT */
+-static des_key_schedule key_schedule;
++static DES_key_schedule key_schedule;
+
+ bool
+ DesSetkey(key)
+ u_char *key;
+ {
+- des_cblock des_key;
++ DES_cblock des_key;
+ MakeKey(key, des_key);
+- des_set_key(&des_key, key_schedule);
++ DES_set_key(&des_key, &key_schedule);
+ return (1);
+ }
+
+ bool
+-DesEncrypt(clear, key, cipher)
++DesEncrypt(clear, cipher)
+ u_char *clear; /* IN 8 octets */
+ u_char *cipher; /* OUT 8 octets */
+ {
+- des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
+- key_schedule, 1);
++ DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
++ &key_schedule, 1);
+ return (1);
+ }
+
+@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear)
+ u_char *cipher; /* IN 8 octets */
+ u_char *clear; /* OUT 8 octets */
+ {
+- des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
+- key_schedule, 0);
++ DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
++ &key_schedule, 0);
+ return (1);
+ }
+
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index 4437b5c519..644cde4562 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -4,14 +4,14 @@ the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
SECTION = "console/network"
HOMEPAGE = "http://samba.org/ppp/"
BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
-DEPENDS = "libpcap"
+DEPENDS = "libpcap openssl virtual/crypt"
LICENSE = "BSD & GPLv2+ & LGPLv2+ & PD"
LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
-SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
+SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
file://makefile.patch \
file://cifdefroute.patch \
file://pppd-resolv-varrun.patch \
@@ -30,6 +30,9 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
file://ppp@.service \
file://fix-CVE-2015-3310.patch \
+ file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \
+ file://0001-ppp-Remove-unneeded-include.patch \
+ file://ppp-2.4.7-DES-openssl.patch \
"
SRC_URI_append_libc-musl = "\
@@ -47,7 +50,7 @@ EXTRA_OECONF = "--disable-strip"
# Package Makefile computes CFLAGS, referencing COPTS.
# Typically hard-coded to '-O2 -g' in the Makefile's.
#
-EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${S}/include"'
+EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${STAGING_INCDIR}/openssl -I${S}/include"'
do_configure () {
oe_runconf
@@ -78,6 +81,10 @@ do_install_append () {
chmod u+s ${D}${sbindir}/pppd
}
+do_install_append_libc-musl () {
+ install -Dm 0644 ${S}/include/net/ppp_defs.h ${D}${includedir}/net/ppp_defs.h
+}
+
CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools"
FILES_${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${systemd_unitdir}/system/ppp@.service"
diff --git a/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch b/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch
deleted file mode 100644
index c0e27f3d78..0000000000
--- a/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From fb10ab134d630705cae0c7be42437cc289af7d32 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 15 Mar 2016 21:36:02 +0000
-Subject: [PATCH] Use __c_ispeed and __c_ospeed on musl
-
-Original intention of these asserts is to find if termios structure
-is mapped correctly to locally define union, the get* APIs for
-baudrate would not do the right thing since they do not return the
-value from c_ospeed/c_ispeed but the value which is stored in iflag
-for baudrate.
-
-So we check if we are on Linux but not using glibc then we use
-__c_ispeed and __c_ospeed as defined in musl, however these are
-internal elements of structs it should not have been used this
-way.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
-Upstream-Status: Pending
-
- xioinitialize.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/xioinitialize.c b/xioinitialize.c
-index 9f50155..8fb2e4c 100644
---- a/xioinitialize.c
-+++ b/xioinitialize.c
-@@ -65,6 +65,12 @@ int xioinitialize(void) {
- #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1)
- #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1)
- #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1)
-+#if defined(__linux__) && !defined(__GLIBC__)
-+ tdata.termarg.__c_ispeed = 0x56789abc;
-+ tdata.termarg.__c_ospeed = 0x6789abcd;
-+ assert(tdata.termarg.__c_ispeed == tdata.speeds[ISPEED_OFFSET]);
-+ assert(tdata.termarg.__c_ospeed == tdata.speeds[OSPEED_OFFSET]);
-+#else
- tdata.termarg.c_ispeed = 0x56789abc;
- tdata.termarg.c_ospeed = 0x6789abcd;
- assert(tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET]);
-@@ -72,6 +78,7 @@ int xioinitialize(void) {
- #endif
- #endif
- #endif
-+#endif
- }
- #endif
-
---
-2.8.0
-
diff --git a/meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch b/meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch
deleted file mode 100644
index 4bbd36766d..0000000000
--- a/meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e6a7d96fa3675bdd3f4d7a3d7682381789eef22f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 15 Feb 2016 20:25:34 +0000
-Subject: [PATCH] define NETDB_INTERNAL to -1 if not available
-
-helps build with musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- compat.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/compat.h b/compat.h
-index c8bee4d..bfb013a 100644
---- a/compat.h
-+++ b/compat.h
-@@ -666,6 +666,10 @@ typedef int sig_atomic_t;
- # define NETDB_INTERNAL h_NETDB_INTERNAL
- #endif
-
-+#if !defined(NETDB_INTERNAL)
-+# define NETDB_INTERNAL (-1)
-+#endif
-+
- #ifndef INET_ADDRSTRLEN
- # define INET_ADDRSTRLEN sizeof(struct sockaddr_in)
- #endif
---
-2.7.1
-
diff --git a/meta/recipes-connectivity/socat/socat/Makefile.in-fix-for-parallel-build.patch b/meta/recipes-connectivity/socat/socat/Makefile.in-fix-for-parallel-build.patch
deleted file mode 100644
index aa4db65a79..0000000000
--- a/meta/recipes-connectivity/socat/socat/Makefile.in-fix-for-parallel-build.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From c6f0080b55679b6e8b5d332d6e05fdcbda1e4064 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 4 May 2015 00:58:47 -0700
-Subject: [PATCH] Makefile.in: fix for parallel build
-
-Fixed:
-vsnprintf_r.o: file not recognized: File truncated
-collect2: error: ld returned 3 exit status
-Makefile:122: recipe for target 'filan' failed
-
-Let filan depend on vsnprintf_r.o and snprinterr.o to fix the issue.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index f2a6edb..88b784b 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -118,7 +118,7 @@ PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysut
- procan: $(PROCAN_OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(PROCAN_OBJS) $(CLIBS)
-
--filan: filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o
-+filan: filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o $(CLIBS)
-
- libxio.a: $(XIOOBJS) $(UTLOBJS)
---
-1.7.9.5
-
diff --git a/meta/recipes-connectivity/socat/socat_1.7.3.1.bb b/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
deleted file mode 100644
index 4da6d3970b..0000000000
--- a/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Multipurpose relay for bidirectional data transfer"
-DESCRIPTION = "Socat is a relay for bidirectional data \
-transfer between two independent data channels."
-HOMEPAGE = "http://www.dest-unreach.org/socat/"
-
-SECTION = "console/network"
-
-DEPENDS = "openssl readline"
-
-LICENSE = "GPL-2.0+-with-OpenSSL-exception"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://README;beginline=257;endline=287;md5=338c05eadd013872abb1d6e198e10a3f"
-
-
-SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
- file://Makefile.in-fix-for-parallel-build.patch \
- file://0001-define-NETDB_INTERNAL-to-1-if-not-available.patch \
- file://0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch \
-"
-
-SRC_URI[md5sum] = "334e46924f2b386299c9db2ac22bcd36"
-SRC_URI[sha256sum] = "d2da659540c38139f388e9437bfaae16bb458d174d056cb3228432a8f489fbaa"
-
-inherit autotools
-
-EXTRA_AUTORECONF += "--exclude=autoheader"
-
-EXTRA_OECONF += "ac_cv_have_z_modifier=yes \
- ac_cv_header_bsd_libutil_h=no \
-"
-
-PACKAGECONFIG ??= "tcp-wrappers"
-PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
-
-do_install_prepend () {
- mkdir -p ${D}${bindir}
- install -d ${D}${bindir} ${D}${mandir}/man1
-}
diff --git a/meta/recipes-connectivity/socat/socat_1.7.3.3.bb b/meta/recipes-connectivity/socat/socat_1.7.3.3.bb
new file mode 100644
index 0000000000..1dbbe5cd55
--- /dev/null
+++ b/meta/recipes-connectivity/socat/socat_1.7.3.3.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Multipurpose relay for bidirectional data transfer"
+DESCRIPTION = "Socat is a relay for bidirectional data \
+transfer between two independent data channels."
+HOMEPAGE = "http://www.dest-unreach.org/socat/"
+
+SECTION = "console/network"
+
+DEPENDS = "openssl"
+
+LICENSE = "GPL-2.0-with-OpenSSL-exception"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://README;beginline=257;endline=287;md5=338c05eadd013872abb1d6e198e10a3f"
+
+SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
+"
+
+SRC_URI[md5sum] = "b2a032a47b8b89a18485697fa975154f"
+SRC_URI[sha256sum] = "0dd63ffe498168a4aac41d307594c5076ff307aa0ac04b141f8f1cec6594d04a"
+
+inherit autotools
+
+EXTRA_AUTORECONF += "--exclude=autoheader"
+
+EXTRA_OECONF += "ac_cv_have_z_modifier=yes \
+ ac_cv_header_bsd_libutil_h=no \
+ sc_cv_termios_ispeed=no \
+ ${TERMBITS_SHIFTS} \
+"
+
+TERMBITS_SHIFTS ?= "sc_cv_sys_crdly_shift=9 \
+ sc_cv_sys_tabdly_shift=11 \
+ sc_cv_sys_csize_shift=4"
+
+TERMBITS_SHIFTS_powerpc = "sc_cv_sys_crdly_shift=12 \
+ sc_cv_sys_tabdly_shift=10 \
+ sc_cv_sys_csize_shift=8"
+
+TERMBITS_SHIFTS_powerpc64 = "sc_cv_sys_crdly_shift=12 \
+ sc_cv_sys_tabdly_shift=10 \
+ sc_cv_sys_csize_shift=8"
+
+PACKAGECONFIG_class-target ??= "tcp-wrappers readline"
+PACKAGECONFIG ??= "readline"
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline"
+
+do_install_prepend () {
+ mkdir -p ${D}${bindir}
+ install -d ${D}${bindir} ${D}${mandir}/man1
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/avoid_strip.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/avoid_strip.patch
deleted file mode 100644
index f34e243de9..0000000000
--- a/meta/recipes-connectivity/wireless-tools/wireless-tools/avoid_strip.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-wireless_tools: Avoid stripping iwmulticall
-
-Upstream-Status: Inappropriate [other]
- The removed code was from upstream.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff -ur wireless_tools.29.orig/Makefile wireless_tools.29/Makefile
---- wireless_tools.29.orig/Makefile 2011-06-18 11:35:12.183907453 -0500
-+++ wireless_tools.29/Makefile 2011-06-18 11:38:09.995907985 -0500
-@@ -135,9 +135,8 @@
-
- macaddr: macaddr.o $(IWLIB)
-
--# Always do symbol stripping here
- iwmulticall: iwmulticall.o
-- $(CC) $(LDFLAGS) -Wl,-s $(XCFLAGS) -o $@ $^ $(LIBS)
-+ $(CC) $(LDFLAGS) $(STRIPFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS)
-
- # It's a kind of magic...
- wireless.h:
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/ldflags.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/ldflags.patch
deleted file mode 100644
index 6c0d8cbd2e..0000000000
--- a/meta/recipes-connectivity/wireless-tools/wireless-tools/ldflags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-wireless-tools: Remove QA warning: No GNU_HASH in the elf binary
-
-Upstream-Status: Inappropriate [other]
- Useful within bitbake environment only.
-
-Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
-
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- wireless_tools.29.orig/Makefile
-+++ wireless_tools.29/Makefile
-@@ -144,7 +144,7 @@ wireless.h:
-
- # Compilation of the dynamic library
- $(DYNAMIC): $(OBJS:.o=.so)
-- $(CC) -shared -o $@ -Wl,-soname,$@ $(STRIPFLAGS) $(LIBS) -lc $^
-+ $(CC) -shared -o $@ -Wl,-soname,$@ $(LDFLAGS) $(STRIPFLAGS) $(LIBS) -lc $^
-
- # Compilation of the static library
- $(STATIC): $(OBJS:.o=.so)
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch
deleted file mode 100644
index 6a757dae76..0000000000
--- a/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: wireless_tools.30/Makefile
-===================================================================
---- wireless_tools.30.orig/Makefile 2014-02-01 00:21:04.148463382 -0800
-+++ wireless_tools.30/Makefile 2014-02-01 00:23:35.448072279 -0800
-@@ -76,7 +76,7 @@
- INSTALL_DIR= $(PREFIX)/sbin
- INSTALL_LIB= $(PREFIX)/lib
- INSTALL_INC= $(PREFIX)/include
--INSTALL_MAN= $(PREFIX)/man
-+INSTALL_MAN= $(PREFIX)/share/man
-
- # Various commands
- RM = rm -f
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/remove.ldconfig.call.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/remove.ldconfig.call.patch
deleted file mode 100644
index 3a22c3f1e7..0000000000
--- a/meta/recipes-connectivity/wireless-tools/wireless-tools/remove.ldconfig.call.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-When /etc/ld.so.cache is writeable by user running bitbake then it creates invalid cache
-(in my case libstdc++.so cannot be found after building zlib(-native) and I have to call
-touch */libstdc++.so && /sbin/ldconfig to fix it.
-
-So remove ldconfig call from make install-libs
-
-Upstream-Status: Inappropriate [disable feature]
-
-diff -uNr wireless_tools.29.orig/Makefile wireless_tools.29/Makefile
---- wireless_tools.29.orig/Makefile 2007-09-18 01:56:46.000000000 +0200
-+++ wireless_tools.29/Makefile 2012-02-15 20:46:41.780763514 +0100
-@@ -163,7 +163,6 @@
- install -m 755 $(DYNAMIC) $(INSTALL_LIB)
- ln -sfn $(DYNAMIC) $(INSTALL_LIB)/$(DYNAMIC_LINK)
- @echo "*** Don't forget to add $(INSTALL_LIB) to /etc/ld.so.conf, and run ldconfig as root. ***"
-- @$(LDCONFIG) || echo "*** Could not run ldconfig ! ***"
-
- # Install the static library
- install-static:: $(STATIC)
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb b/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb
deleted file mode 100644
index c3b8f665b1..0000000000
--- a/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "Tools for the Linux Standard Wireless Extension Subsystem"
-HOMEPAGE = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
-LICENSE = "GPLv2 & (LGPLv2.1 | MPL-1.1 | BSD)"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://iwconfig.c;beginline=1;endline=12;md5=cf710eb1795c376eb10ea4ff04649caf \
- file://iwevent.c;beginline=59;endline=72;md5=d66a10026d4394f0a5b1c5587bce4537 \
- file://sample_enc.c;beginline=1;endline=4;md5=838372be07874260b566bae2f6ed33b6"
-SECTION = "base"
-PE = "1"
-
-SRC_URI = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.${PV}.tar.gz \
- file://remove.ldconfig.call.patch \
- file://man.patch \
- file://avoid_strip.patch \
- file://ldflags.patch \
- "
-SRC_URI[md5sum] = "ca91ba7c7eff9bfff6926b1a34a4697d"
-SRC_URI[sha256sum] = "abd9c5c98abf1fdd11892ac2f8a56737544fe101e1be27c6241a564948f34c63"
-
-UPSTREAM_CHECK_URI = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
-UPSTREAM_CHECK_REGEX = "wireless_tools\.(?P<pver>(\d+)(\..*|))\.tar\.gz"
-
-S = "${WORKDIR}/wireless_tools.30"
-
-CFLAGS =+ "-I${S}"
-EXTRA_OEMAKE = "-e 'BUILD_SHARED=y' \
- 'INSTALL_DIR=${D}${base_sbindir}' \
- 'INSTALL_LIB=${D}${libdir}' \
- 'INSTALL_INC=${D}${includedir}' \
- 'INSTALL_MAN=${D}${mandir}'"
-
-do_compile() {
- oe_runmake all libiw.a
-}
-
-do_install() {
- oe_runmake PREFIX=${D} install-iwmulticall install-dynamic install-man install-hdr
- install -d ${D}${sbindir}
- install -m 0755 ifrename ${D}${sbindir}/ifrename
-}
-
-PACKAGES = "libiw libiw-dev libiw-doc ifrename-doc ifrename ${PN} ${PN}-doc ${PN}-dbg"
-
-FILES_libiw = "${libdir}/*.so.*"
-FILES_libiw-dev = "${libdir}/*.a ${libdir}/*.so ${includedir}"
-FILES_libiw-doc = "${mandir}/man7"
-FILES_ifrename = "${sbindir}/ifrename"
-FILES_ifrename-doc = "${mandir}/man8/ifrename.8 ${mandir}/man5/iftab.5"
-FILES_${PN} = "${bindir} ${sbindir}/iw* ${base_sbindir} ${base_bindir} ${sysconfdir}/network"
-FILES_${PN}-doc = "${mandir}"
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch
new file mode 100644
index 0000000000..7b0713cf6d
--- /dev/null
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch
@@ -0,0 +1,82 @@
+hostapd before 2.10 and wpa_supplicant before 2.10 allow an incorrect indication
+of disconnection in certain situations because source address validation is
+mishandled. This is a denial of service that should have been prevented by PMF
+(aka management frame protection). The attacker must send a crafted 802.11 frame
+from a location that is within the 802.11 communications range.
+
+CVE: CVE-2019-16275
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 8c07fa9eda13e835f3f968b2e1c9a8be3a851ff9 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Thu, 29 Aug 2019 11:52:04 +0300
+Subject: [PATCH] AP: Silently ignore management frame from unexpected source
+ address
+
+Do not process any received Management frames with unexpected/invalid SA
+so that we do not add any state for unexpected STA addresses or end up
+sending out frames to unexpected destination. This prevents unexpected
+sequences where an unprotected frame might end up causing the AP to send
+out a response to another device and that other device processing the
+unexpected response.
+
+In particular, this prevents some potential denial of service cases
+where the unexpected response frame from the AP might result in a
+connected station dropping its association.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/ap/drv_callbacks.c | 13 +++++++++++++
+ src/ap/ieee802_11.c | 12 ++++++++++++
+ 2 files changed, 25 insertions(+)
+
+diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
+index 31587685fe3b..34ca379edc3d 100644
+--- a/src/ap/drv_callbacks.c
++++ b/src/ap/drv_callbacks.c
+@@ -131,6 +131,19 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
+ "hostapd_notif_assoc: Skip event with no address");
+ return -1;
+ }
++
++ if (is_multicast_ether_addr(addr) ||
++ is_zero_ether_addr(addr) ||
++ os_memcmp(addr, hapd->own_addr, ETH_ALEN) == 0) {
++ /* Do not process any frames with unexpected/invalid SA so that
++ * we do not add any state for unexpected STA addresses or end
++ * up sending out frames to unexpected destination. */
++ wpa_printf(MSG_DEBUG, "%s: Invalid SA=" MACSTR
++ " in received indication - ignore this indication silently",
++ __func__, MAC2STR(addr));
++ return 0;
++ }
++
+ random_add_randomness(addr, ETH_ALEN);
+
+ hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+index c85a28db44b7..e7065372e158 100644
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -4626,6 +4626,18 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
+ fc = le_to_host16(mgmt->frame_control);
+ stype = WLAN_FC_GET_STYPE(fc);
+
++ if (is_multicast_ether_addr(mgmt->sa) ||
++ is_zero_ether_addr(mgmt->sa) ||
++ os_memcmp(mgmt->sa, hapd->own_addr, ETH_ALEN) == 0) {
++ /* Do not process any frames with unexpected/invalid SA so that
++ * we do not add any state for unexpected STA addresses or end
++ * up sending out frames to unexpected destination. */
++ wpa_printf(MSG_DEBUG, "MGMT: Invalid SA=" MACSTR
++ " in received frame - ignore this frame silently",
++ MAC2STR(mgmt->sa));
++ return 0;
++ }
++
+ if (stype == WLAN_FC_STYPE_BEACON) {
+ handle_beacon(hapd, mgmt, len, fi);
+ return 1;
+--
+2.20.1
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch
deleted file mode 100644
index dd7d5f7267..0000000000
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 73e4abb24a936014727924d8b0b2965edfc117dd Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <jouni@qca.qualcomm.com>
-Date: Fri, 4 Mar 2016 18:46:41 +0200
-Subject: [PATCH 1/3] Reject psk parameter set with invalid passphrase
- character
-
-WPA/WPA2-Personal passphrase is not allowed to include control
-characters. Reject a passphrase configuration attempt if that passphrase
-includes an invalid passphrase.
-
-This fixes an issue where wpa_supplicant could have updated the
-configuration file psk parameter with arbitrary data from the control
-interface or D-Bus interface. While those interfaces are supposed to be
-accessible only for trusted users/applications, it may be possible that
-an untrusted user has access to a management software component that
-does not validate the passphrase value before passing it to
-wpa_supplicant.
-
-This could allow such an untrusted user to inject up to 63 characters of
-almost arbitrary data into the configuration file. Such configuration
-file could result in wpa_supplicant trying to load a library (e.g.,
-opensc_engine_path, pkcs11_engine_path, pkcs11_module_path,
-load_dynamic_eap) from user controlled location when starting again.
-This would allow code from that library to be executed under the
-wpa_supplicant process privileges.
-
-Upstream-Status: Backport
-
-CVE: CVE-2016-4477
-
-Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
----
- wpa_supplicant/config.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
-index b1c7870..fdd9643 100644
---- a/wpa_supplicant/config.c
-+++ b/wpa_supplicant/config.c
-@@ -478,6 +478,12 @@ static int wpa_config_parse_psk(const struct parse_data *data,
- }
- wpa_hexdump_ascii_key(MSG_MSGDUMP, "PSK (ASCII passphrase)",
- (u8 *) value, len);
-+ if (has_ctrl_char((u8 *) value, len)) {
-+ wpa_printf(MSG_ERROR,
-+ "Line %d: Invalid passphrase character",
-+ line);
-+ return -1;
-+ }
- if (ssid->passphrase && os_strlen(ssid->passphrase) == len &&
- os_memcmp(ssid->passphrase, value, len) == 0) {
- /* No change to the previously configured value */
---
-1.9.1
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch
deleted file mode 100644
index db222e41d4..0000000000
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From ecbb0b3dc122b0d290987cf9c84010bbe53e1022 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <jouni@qca.qualcomm.com>
-Date: Fri, 4 Mar 2016 17:20:18 +0200
-Subject: [PATCH 1/2] WPS: Reject a Credential with invalid passphrase
-
-WPA/WPA2-Personal passphrase is not allowed to include control
-characters. Reject a Credential received from a WPS Registrar both as
-STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or
-WPA2PSK authentication type and includes an invalid passphrase.
-
-This fixes an issue where hostapd or wpa_supplicant could have updated
-the configuration file PSK/passphrase parameter with arbitrary data from
-an external device (Registrar) that may not be fully trusted. Should
-such data include a newline character, the resulting configuration file
-could become invalid and fail to be parsed.
-
-Upstream-Status: Backport
-
-CVE: CVE-2016-4476
-
-Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
----
- src/utils/common.c | 12 ++++++++++++
- src/utils/common.h | 1 +
- src/wps/wps_attr_process.c | 10 ++++++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/src/utils/common.c b/src/utils/common.c
-index 450e2c6..27b7c02 100644
---- a/src/utils/common.c
-+++ b/src/utils/common.c
-@@ -697,6 +697,18 @@ int is_hex(const u8 *data, size_t len)
- }
-
-
-+int has_ctrl_char(const u8 *data, size_t len)
-+{
-+ size_t i;
-+
-+ for (i = 0; i < len; i++) {
-+ if (data[i] < 32 || data[i] == 127)
-+ return 1;
-+ }
-+ return 0;
-+}
-+
-+
- size_t merge_byte_arrays(u8 *res, size_t res_len,
- const u8 *src1, size_t src1_len,
- const u8 *src2, size_t src2_len)
-diff --git a/src/utils/common.h b/src/utils/common.h
-index 701dbb2..a972240 100644
---- a/src/utils/common.h
-+++ b/src/utils/common.h
-@@ -488,6 +488,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
-
- char * wpa_config_parse_string(const char *value, size_t *len);
- int is_hex(const u8 *data, size_t len);
-+int has_ctrl_char(const u8 *data, size_t len);
- size_t merge_byte_arrays(u8 *res, size_t res_len,
- const u8 *src1, size_t src1_len,
- const u8 *src2, size_t src2_len);
-diff --git a/src/wps/wps_attr_process.c b/src/wps/wps_attr_process.c
-index eadb22f..e8c4579 100644
---- a/src/wps/wps_attr_process.c
-+++ b/src/wps/wps_attr_process.c
-@@ -229,6 +229,16 @@ static int wps_workaround_cred_key(struct wps_credential *cred)
- cred->key_len--;
- #endif /* CONFIG_WPS_STRICT */
- }
-+
-+
-+ if (cred->auth_type & (WPS_AUTH_WPAPSK | WPS_AUTH_WPA2PSK) &&
-+ (cred->key_len < 8 || has_ctrl_char(cred->key, cred->key_len))) {
-+ wpa_printf(MSG_INFO, "WPS: Reject credential with invalid WPA/WPA2-Personal passphrase");
-+ wpa_hexdump_ascii_key(MSG_INFO, "WPS: Network Key",
-+ cred->key, cred->key_len);
-+ return -1;
-+ }
-+
- return 0;
- }
-
---
-1.9.1
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-replace-systemd-install-Alias-with-WantedBy.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-replace-systemd-install-Alias-with-WantedBy.patch
new file mode 100644
index 0000000000..a476cf040e
--- /dev/null
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-replace-systemd-install-Alias-with-WantedBy.patch
@@ -0,0 +1,52 @@
+From 94c401733a5a3d294cc412671166e6adfb409f53 Mon Sep 17 00:00:00 2001
+From: Joshua DeWeese <jdeweese@hennypenny.com>
+Date: Wed, 30 Jan 2019 16:19:47 -0500
+Subject: [PATCH] replace systemd install Alias with WantedBy
+
+According to the systemd documentation "WantedBy=foo.service in a
+service bar.service is mostly equivalent to
+Alias=foo.service.wants/bar.service in the same file." However,
+this is not really the intended purpose of install Aliases.
+
+Upstream-Status: Submitted [hostap@lists.infradead.org]
+
+Signed-off-by: Joshua DeWeese <jdeweese@hennypenny.com>
+---
+ wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in | 2 +-
+ wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in | 2 +-
+ wpa_supplicant/systemd/wpa_supplicant.service.arg.in | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in
+index 03ac507..da69a87 100644
+--- a/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in
++++ b/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in
+@@ -12,4 +12,4 @@ Type=simple
+ ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I
+
+ [Install]
+-Alias=multi-user.target.wants/wpa_supplicant-nl80211@%i.service
++WantedBy=multi-user.target
+diff --git a/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in
+index c8a744d..ca3054b 100644
+--- a/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in
++++ b/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in
+@@ -12,4 +12,4 @@ Type=simple
+ ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wired-%I.conf -Dwired -i%I
+
+ [Install]
+-Alias=multi-user.target.wants/wpa_supplicant-wired@%i.service
++WantedBy=multi-user.target
+diff --git a/wpa_supplicant/systemd/wpa_supplicant.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
+index 7788b38..55d2b9c 100644
+--- a/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
++++ b/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
+@@ -12,4 +12,4 @@ Type=simple
+ ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
+
+ [Install]
+-Alias=multi-user.target.wants/wpa_supplicant@%i.service
++WantedBy=multi-user.target
+--
+2.7.4
+
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch
deleted file mode 100644
index cad7425c36..0000000000
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From b166cd84a77a6717be9600bf95378a0055d6f5a5 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <jouni@qca.qualcomm.com>
-Date: Tue, 5 Apr 2016 23:33:10 +0300
-Subject: [PATCH 2/3] Reject SET_CRED commands with newline characters in the
- string values
-
-Most of the cred block parameters are written as strings without
-filtering and if there is an embedded newline character in the value,
-unexpected configuration file data might be written.
-
-This fixes an issue where wpa_supplicant could have updated the
-configuration file cred parameter with arbitrary data from the control
-interface or D-Bus interface. While those interfaces are supposed to be
-accessible only for trusted users/applications, it may be possible that
-an untrusted user has access to a management software component that
-does not validate the credential value before passing it to
-wpa_supplicant.
-
-This could allow such an untrusted user to inject almost arbitrary data
-into the configuration file. Such configuration file could result in
-wpa_supplicant trying to load a library (e.g., opensc_engine_path,
-pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user
-controlled location when starting again. This would allow code from that
-library to be executed under the wpa_supplicant process privileges.
-
-Upstream-Status: Backport
-
-CVE: CVE-2016-4477
-
-Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
----
- wpa_supplicant/config.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
-index eb97cd5..69152ef 100644
---- a/wpa_supplicant/config.c
-+++ b/wpa_supplicant/config.c
-@@ -2896,6 +2896,8 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var,
-
- if (os_strcmp(var, "password") == 0 &&
- os_strncmp(value, "ext:", 4) == 0) {
-+ if (has_newline(value))
-+ return -1;
- str_clear_free(cred->password);
- cred->password = os_strdup(value);
- cred->ext_password = 1;
-@@ -2946,9 +2948,14 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var,
- }
-
- val = wpa_config_parse_string(value, &len);
-- if (val == NULL) {
-+ if (val == NULL ||
-+ (os_strcmp(var, "excluded_ssid") != 0 &&
-+ os_strcmp(var, "roaming_consortium") != 0 &&
-+ os_strcmp(var, "required_roaming_consortium") != 0 &&
-+ has_newline(val))) {
- wpa_printf(MSG_ERROR, "Line %d: invalid field '%s' string "
- "value '%s'.", line, var, value);
-+ os_free(val);
- return -1;
- }
-
---
-1.9.1
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch
deleted file mode 100644
index cc7b01ad57..0000000000
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 0fe5a234240a108b294a87174ad197f6b5cb38e9 Mon Sep 17 00:00:00 2001
-From: Paul Stewart <pstew@google.com>
-Date: Thu, 3 Mar 2016 15:40:19 -0800
-Subject: [PATCH 2/2] Remove newlines from wpa_supplicant config network
- output
-
-Spurious newlines output while writing the config file can corrupt the
-wpa_supplicant configuration. Avoid writing these for the network block
-parameters. This is a generic filter that cover cases that may not have
-been explicitly addressed with a more specific commit to avoid control
-characters in the psk parameter.
-
-Upstream-Status: Backport
-
-CVE: CVE-2016-4476
-
-Signed-off-by: Paul Stewart <pstew@google.com>
-Signed-off-by: Zhixiong Chi <Zhixiong.Chi.wrs.com>
----
- src/utils/common.c | 11 +++++++++++
- src/utils/common.h | 1 +
- wpa_supplicant/config.c | 15 +++++++++++++--
- 3 files changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/src/utils/common.c b/src/utils/common.c
-index 27b7c02..9856463 100644
---- a/src/utils/common.c
-+++ b/src/utils/common.c
-@@ -709,6 +709,17 @@ int has_ctrl_char(const u8 *data, size_t len)
- }
-
-
-+int has_newline(const char *str)
-+{
-+ while (*str) {
-+ if (*str == '\n' || *str == '\r')
-+ return 1;
-+ str++;
-+ }
-+ return 0;
-+}
-+
-+
- size_t merge_byte_arrays(u8 *res, size_t res_len,
- const u8 *src1, size_t src1_len,
- const u8 *src2, size_t src2_len)
-diff --git a/src/utils/common.h b/src/utils/common.h
-index a972240..d19927b 100644
---- a/src/utils/common.h
-+++ b/src/utils/common.h
-@@ -489,6 +489,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
- char * wpa_config_parse_string(const char *value, size_t *len);
- int is_hex(const u8 *data, size_t len);
- int has_ctrl_char(const u8 *data, size_t len);
-+int has_newline(const char *str);
- size_t merge_byte_arrays(u8 *res, size_t res_len,
- const u8 *src1, size_t src1_len,
- const u8 *src2, size_t src2_len);
-diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
-index fdd9643..eb97cd5 100644
---- a/wpa_supplicant/config.c
-+++ b/wpa_supplicant/config.c
-@@ -2699,8 +2699,19 @@ char * wpa_config_get(struct wpa_ssid *ssid, const char *var)
-
- for (i = 0; i < NUM_SSID_FIELDS; i++) {
- const struct parse_data *field = &ssid_fields[i];
-- if (os_strcmp(var, field->name) == 0)
-- return field->writer(field, ssid);
-+ if (os_strcmp(var, field->name) == 0) {
-+ char *ret = field->writer(field, ssid);
-+
-+ if (ret && has_newline(ret)) {
-+ wpa_printf(MSG_ERROR,
-+ "Found newline in value for %s; not returning it",
-+ var);
-+ os_free(ret);
-+ ret = NULL;
-+ }
-+
-+ return ret;
-+ }
- }
-
- return NULL;
---
-1.9.1
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-Reject-SET-commands-with-newline-characters-in-the-s.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-Reject-SET-commands-with-newline-characters-in-the-s.patch
deleted file mode 100644
index 5375db74b3..0000000000
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-Reject-SET-commands-with-newline-characters-in-the-s.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 2a3f56502b52375c3bf113cf92adfa99bad6b488 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <jouni@qca.qualcomm.com>
-Date: Tue, 5 Apr 2016 23:55:48 +0300
-Subject: [PATCH 3/3] Reject SET commands with newline characters in the
- string values
-
-Many of the global configuration parameters are written as strings
-without filtering and if there is an embedded newline character in the
-value, unexpected configuration file data might be written.
-
-This fixes an issue where wpa_supplicant could have updated the
-configuration file global parameter with arbitrary data from the control
-interface or D-Bus interface. While those interfaces are supposed to be
-accessible only for trusted users/applications, it may be possible that
-an untrusted user has access to a management software component that
-does not validate the value of a parameter before passing it to
-wpa_supplicant.
-
-This could allow such an untrusted user to inject almost arbitrary data
-into the configuration file. Such configuration file could result in
-wpa_supplicant trying to load a library (e.g., opensc_engine_path,
-pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user
-controlled location when starting again. This would allow code from that
-library to be executed under the wpa_supplicant process privileges.
-
-Upstream-Status: Backport
-
-CVE: CVE-2016-4477
-
-Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
----
- wpa_supplicant/config.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
-index 69152ef..d9a1603 100644
---- a/wpa_supplicant/config.c
-+++ b/wpa_supplicant/config.c
-@@ -3764,6 +3764,12 @@ static int wpa_global_config_parse_str(const struct global_parse_data *data,
- return -1;
- }
-
-+ if (has_newline(pos)) {
-+ wpa_printf(MSG_ERROR, "Line %d: invalid %s value with newline",
-+ line, data->name);
-+ return -1;
-+ }
-+
- tmp = os_strdup(pos);
- if (tmp == NULL)
- return -1;
---
-1.9.1
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh
index 5c9e5d33a7..35a1aa639e 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh
@@ -4,6 +4,7 @@
WPA_SUP_BIN="/usr/sbin/wpa_supplicant"
WPA_SUP_PNAME="wpa_supplicant"
WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$IFACE.pid"
+WPA_COMMON_CTRL_IFACE="/var/run/wpa_supplicant"
WPA_SUP_OPTIONS="-B -P $WPA_SUP_PIDFILE -i $IFACE"
VERBOSITY=0
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb
deleted file mode 100644
index a4160e1c5c..0000000000
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb
+++ /dev/null
@@ -1,113 +0,0 @@
-SUMMARY = "Client for Wi-Fi Protected Access (WPA)"
-HOMEPAGE = "http://w1.fi/wpa_supplicant/"
-BUGTRACKER = "http://w1.fi/security/"
-SECTION = "network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=36b27801447e0662ee0138d17fe93880 \
- file://README;beginline=1;endline=56;md5=7f393579f8b109fe91f3b9765d26c7d3 \
- file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=3430fda79f2ba1dd545f0b3c4d6e4d24"
-DEPENDS = "dbus libnl"
-RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli"
-
-PACKAGECONFIG ??= "gnutls"
-PACKAGECONFIG[gnutls] = ",,gnutls libgcrypt"
-PACKAGECONFIG[openssl] = ",,openssl"
-
-inherit systemd
-
-SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service wpa_supplicant-nl80211@.service wpa_supplicant-wired@.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
- file://defconfig \
- file://wpa-supplicant.sh \
- file://wpa_supplicant.conf \
- file://wpa_supplicant.conf-sane \
- file://99_wpa_supplicant \
- file://0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch \
- file://0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch \
- file://0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch \
- file://0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch \
- file://0003-Reject-SET-commands-with-newline-characters-in-the-s.patch \
- "
-SRC_URI[md5sum] = "96ff75c3a514f1f324560a2376f13110"
-SRC_URI[sha256sum] = "cce55bae483b364eae55c35ba567c279be442ed8bab5b80a3c7fb0d057b9b316"
-
-S = "${WORKDIR}/wpa_supplicant-${PV}"
-
-PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli "
-FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase"
-FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli"
-FILES_${PN} += "${datadir}/dbus-1/system-services/*"
-CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
-
-do_configure () {
- ${MAKE} -C wpa_supplicant clean
- install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config
- echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
- echo "DRV_CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
-
- if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then
- ssl=openssl
- elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then
- ssl=gnutls
- fi
- if [ -n "$ssl" ]; then
- sed -i "s/%ssl%/$ssl/" wpa_supplicant/.config
- fi
-
- # For rebuild
- rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d
-}
-
-export EXTRA_CFLAGS = "${CFLAGS}"
-export BINDIR = "${sbindir}"
-
-do_compile () {
- unset CFLAGS CPPFLAGS CXXFLAGS
- sed -e "s:CFLAGS\ =.*:& \$(EXTRA_CFLAGS):g" -i ${S}/src/lib.rules
- oe_runmake -C wpa_supplicant
-}
-
-do_install () {
- install -d ${D}${sbindir}
- install -m 755 wpa_supplicant/wpa_supplicant ${D}${sbindir}
- install -m 755 wpa_supplicant/wpa_cli ${D}${sbindir}
-
- install -d ${D}${bindir}
- install -m 755 wpa_supplicant/wpa_passphrase ${D}${bindir}
-
- install -d ${D}${docdir}/wpa_supplicant
- install -m 644 wpa_supplicant/README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant
-
- install -d ${D}${sysconfdir}
- install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf
-
- install -d ${D}${sysconfdir}/network/if-pre-up.d/
- install -d ${D}${sysconfdir}/network/if-post-down.d/
- install -d ${D}${sysconfdir}/network/if-down.d/
- install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant
- cd ${D}${sysconfdir}/network/ && \
- ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant
-
- install -d ${D}/${sysconfdir}/dbus-1/system.d
- install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d
- install -d ${D}/${datadir}/dbus-1/system-services
- install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services
-
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}/${systemd_unitdir}/system
- install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_unitdir}/system
- fi
-
- install -d ${D}/etc/default/volatiles
- install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
-}
-
-pkg_postinst_wpa-supplicant () {
- # If we're offline, we don't need to do this.
- if [ "x$D" = "x" ]; then
- killall -q -HUP dbus-daemon || true
- fi
-
-}
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb
new file mode 100644
index 0000000000..3e92427bb0
--- /dev/null
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb
@@ -0,0 +1,110 @@
+SUMMARY = "Client for Wi-Fi Protected Access (WPA)"
+HOMEPAGE = "http://w1.fi/wpa_supplicant/"
+BUGTRACKER = "http://w1.fi/security/"
+SECTION = "network"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=279b4f5abb9c153c285221855ddb78cc \
+ file://README;beginline=1;endline=56;md5=e7d3dbb01f75f0b9799e192731d1e1ff \
+ file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=0a8b56d3543498b742b9c0e94cc2d18b"
+DEPENDS = "dbus libnl"
+RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli"
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[gnutls] = ",,gnutls libgcrypt"
+PACKAGECONFIG[openssl] = ",,openssl"
+
+inherit pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service wpa_supplicant-nl80211@.service wpa_supplicant-wired@.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
+ file://defconfig \
+ file://wpa-supplicant.sh \
+ file://wpa_supplicant.conf \
+ file://wpa_supplicant.conf-sane \
+ file://99_wpa_supplicant \
+ file://0001-replace-systemd-install-Alias-with-WantedBy.patch \
+ file://0001-AP-Silently-ignore-management-frame-from-unexpected-.patch \
+ "
+SRC_URI[md5sum] = "2d2958c782576dc9901092fbfecb4190"
+SRC_URI[sha256sum] = "fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17"
+
+CVE_PRODUCT = "wpa_supplicant"
+
+S = "${WORKDIR}/wpa_supplicant-${PV}"
+
+PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli "
+FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase"
+FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli"
+FILES_${PN} += "${datadir}/dbus-1/system-services/*"
+CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
+
+do_configure () {
+ ${MAKE} -C wpa_supplicant clean
+ install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config
+
+ if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then
+ ssl=openssl
+ elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then
+ ssl=gnutls
+ fi
+ if [ -n "$ssl" ]; then
+ sed -i "s/%ssl%/$ssl/" wpa_supplicant/.config
+ fi
+
+ # For rebuild
+ rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d
+}
+
+export EXTRA_CFLAGS = "${CFLAGS}"
+export BINDIR = "${sbindir}"
+
+do_compile () {
+ unset CFLAGS CPPFLAGS CXXFLAGS
+ sed -e "s:CFLAGS\ =.*:& \$(EXTRA_CFLAGS):g" -i ${S}/src/lib.rules
+ oe_runmake -C wpa_supplicant
+}
+
+do_install () {
+ install -d ${D}${sbindir}
+ install -m 755 wpa_supplicant/wpa_supplicant ${D}${sbindir}
+ install -m 755 wpa_supplicant/wpa_cli ${D}${sbindir}
+
+ install -d ${D}${bindir}
+ install -m 755 wpa_supplicant/wpa_passphrase ${D}${bindir}
+
+ install -d ${D}${docdir}/wpa_supplicant
+ install -m 644 wpa_supplicant/README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant
+
+ install -d ${D}${sysconfdir}
+ install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf
+
+ install -d ${D}${sysconfdir}/network/if-pre-up.d/
+ install -d ${D}${sysconfdir}/network/if-post-down.d/
+ install -d ${D}${sysconfdir}/network/if-down.d/
+ install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant
+ cd ${D}${sysconfdir}/network/ && \
+ ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant
+
+ install -d ${D}/${sysconfdir}/dbus-1/system.d
+ install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d
+ install -d ${D}/${datadir}/dbus-1/system-services
+ install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}/${systemd_unitdir}/system
+ install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_unitdir}/system
+ fi
+
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
+}
+
+pkg_postinst_wpa-supplicant () {
+ # If we're offline, we don't need to do this.
+ if [ "x$D" = "x" ]; then
+ killall -q -HUP dbus-daemon || true
+ fi
+
+}
diff --git a/meta/recipes-core/base-files/base-files/filesystems b/meta/recipes-core/base-files/base-files/filesystems
deleted file mode 100644
index 7e6c41c38f..0000000000
--- a/meta/recipes-core/base-files/base-files/filesystems
+++ /dev/null
@@ -1,8 +0,0 @@
-ext4
-ext3
-ext2
-vfat
-fat
-btrfs
-minix
-*
diff --git a/meta/recipes-core/base-files/base-files/fstab b/meta/recipes-core/base-files/base-files/fstab
index d79a01602f..70e400f567 100644
--- a/meta/recipes-core/base-files/base-files/fstab
+++ b/meta/recipes-core/base-files/base-files/fstab
@@ -2,7 +2,7 @@
/dev/root / auto defaults 1 1
proc /proc proc defaults 0 0
-devpts /dev/pts devpts mode=0620,gid=5 0 0
+devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0
diff --git a/meta/recipes-core/netbase/netbase/hosts b/meta/recipes-core/base-files/base-files/hosts
index b94f414d5c..b94f414d5c 100644
--- a/meta/recipes-core/netbase/netbase/hosts
+++ b/meta/recipes-core/base-files/base-files/hosts
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index a52bf89cfd..9e4283e0c7 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -3,36 +3,29 @@
PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="vi" # needed for packages like cron, git-commit
-test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
+[ "$TERM" ] || TERM="vt100" # Basic terminal capab. For screen etc.
-if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
- TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
- # for an explanation of how to set this to your local timezone.
- export TZ
-fi
+# Add /sbin & co to $PATH for the root user
+[ "$HOME" != "ROOTHOME" ] || PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
-if [ "$HOME" = "ROOTHOME" ]; then
- PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
-fi
-if [ "$PS1" ]; then
-# works for bash and ash (no other shells known to be in use here)
- PS1='\u@\h:\w\$ '
-fi
+# Set the prompt for bash and ash (no other shells known to be in use here)
+[ -z "$PS1" ] || PS1='\u@\h:\w\$ '
if [ -d /etc/profile.d ]; then
- for i in /etc/profile.d/*.sh ; do
- if [ -f $i -a -r $i ]; then
- . $i
- fi
- done
- unset i
+ for i in /etc/profile.d/*.sh; do
+ if [ -f $i -a -r $i ]; then
+ . $i
+ fi
+ done
+ unset i
fi
-if [ -x /usr/bin/resize ];then
- # Make sure we are on a serial console (i.e. the device used starts with /dev/tty),
- # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
- test "`tty | cut -c1-8`" = "/dev/tty" && resize >/dev/null
-fi
+# Make sure we are on a serial console (i.e. the device used starts with
+# /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher which tries do
+# use ssh
+case $(tty 2>/dev/null) in
+ /dev/tty[A-z]*) [ -x @BINDIR@/resize ] && @BINDIR@/resize >/dev/null;;
+esac
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
diff --git a/meta/recipes-core/base-files/base-files/share/dot.profile b/meta/recipes-core/base-files/base-files/share/dot.profile
index 979793e8b5..a87316077c 100644
--- a/meta/recipes-core/base-files/base-files/share/dot.profile
+++ b/meta/recipes-core/base-files/base-files/share/dot.profile
@@ -7,4 +7,5 @@ fi
# path set by /etc/profile
# export PATH
-mesg n
+# Might fail after "su - myuser" when /dev/tty* is not writable by "myuser".
+mesg n 2>/dev/null
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 533311061c..94299431f6 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -13,14 +13,13 @@ LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "file://rotation \
file://nsswitch.conf \
file://motd \
+ file://hosts \
file://host.conf \
file://profile \
file://shells \
file://fstab \
- file://filesystems \
file://issue.net \
file://issue \
- file://usbd \
file://share/dot.bashrc \
file://share/dot.profile \
file://licenses/GPL-2 \
@@ -32,16 +31,18 @@ INHIBIT_DEFAULT_DEPS = "1"
docdir_append = "/${P}"
dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
dirs2775 = ""
-dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
- ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \
+dirs555 = "/sys /proc"
+dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
+ ${sysconfdir} ${sysconfdir}/default \
+ ${sysconfdir}/skel ${nonarch_base_libdir} /mnt ${ROOT_HOME} /run \
${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
${libdir} ${sbindir} ${datadir} \
${datadir}/common-licenses ${datadir}/dict ${infodir} \
${mandir} ${datadir}/misc ${localstatedir} \
${localstatedir}/backups ${localstatedir}/lib \
- /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
+ ${localstatedir}/lib/misc ${localstatedir}/spool \
${localstatedir}/volatile \
- ${localstatedir}/volatile/log \
+ ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
/home ${prefix}/src ${localstatedir}/local \
/media"
@@ -52,7 +53,7 @@ dirs755-lsb = "/srv \
${prefix}/lib/locale"
dirs2775-lsb = "/var/mail"
-volatiles = "log tmp"
+volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp"
conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
${sysconfdir}/issue /${sysconfdir}/issue.net \
${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
@@ -92,6 +93,9 @@ pkg_preinst_${PN} () {
}
do_install () {
+ for d in ${dirs555}; do
+ install -m 0555 -d ${D}$d
+ done
for d in ${dirs755}; do
install -m 0755 -d ${D}$d
done
@@ -108,6 +112,7 @@ do_install () {
ln -snf ../run ${D}${localstatedir}/run
ln -snf ../run/lock ${D}${localstatedir}/lock
+ install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
${BASEFILESISSUEINSTALL}
rotation=`cat ${WORKDIR}/rotation`
@@ -116,37 +121,38 @@ do_install () {
fi
install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
- install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems
- install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile
+ sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile
install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
- install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf
install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
- if [ "/usr/bin" != "${bindir}" ]; then
- sed -i "s,/usr/bin/resize,${bindir}/resize," ${D}${sysconfdir}/profile
- fi
-
ln -sf /proc/mounts ${D}${sysconfdir}/mtab
-}
-DISTRO_VERSION[vardepsexclude] += "DATE"
-do_install_basefilesissue () {
+ # deal with hostname
if [ "${hostname}" ]; then
echo ${hostname} > ${D}${sysconfdir}/hostname
+ echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts
fi
+}
+
+do_install_append_libc-glibc () {
+ install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf
+}
+DISTRO_VERSION[vardepsexclude] += "DATE"
+do_install_basefilesissue () {
install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
if [ -n "${DISTRO_NAME}" ]; then
printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
if [ -n "${DISTRO_VERSION}" ]; then
- printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
- printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
+ distro_version_nodate="${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}','snapshot').replace('${DATE}','')}"
+ printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue
+ printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue.net
fi
printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
echo >> ${D}${sysconfdir}/issue
@@ -154,6 +160,7 @@ do_install_basefilesissue () {
echo >> ${D}${sysconfdir}/issue.net
fi
}
+do_install_basefilesissue[vardepsexclude] += "DATE"
do_install_append_linuxstdbase() {
for d in ${dirs755-lsb}; do
@@ -173,5 +180,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} ${sysconfdir}/shells"
+CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname ${sysconfdir}/hosts'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells"
CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile"
diff --git a/meta/recipes-core/base-passwd/base-passwd/kvm.patch b/meta/recipes-core/base-passwd/base-passwd/kvm.patch
new file mode 100644
index 0000000000..113d5151e7
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/kvm.patch
@@ -0,0 +1,23 @@
+From 6355278b9f744291864c373a32a8da8f84aaaf37 Mon Sep 17 00:00:00 2001
+From: Jacob Kroon <jacob.kroon@gmail.com>
+Date: Wed, 30 Jan 2019 04:53:48 +0000
+Subject: [PATCH] Add kvm group
+
+Upstream-Status: Pending
+Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
+---
+ group.master | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/group.master b/group.master
+index cea9d60..5b62284 100644
+--- a/group.master
++++ b/group.master
+@@ -34,6 +34,7 @@ utmp:*:43:
+ video:*:44:
+ sasl:*:45:
+ plugdev:*:46:
++kvm:*:47:
+ staff:*:50:
+ games:*:60:
+ shutdown:*:70:
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index 10457b2dec..d1aab09181 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -12,7 +12,8 @@ SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar
file://noshadow.patch \
file://input.patch \
file://disable-docs.patch \
- "
+ file://kvm.patch \
+ "
SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421"
SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36"
@@ -23,8 +24,6 @@ UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/"
inherit autotools
-SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst"
-
do_install () {
install -d -m 755 ${D}${sbindir}
install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/
@@ -45,23 +44,32 @@ do_install () {
install -p -m 644 ${S}/debian/copyright ${D}${docdir}/${BPN}/
}
-base_passwd_sstate_postinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- # Staging does not copy ${sysconfdir} files into the
- # target sysroot, so we need to do so manually. We
- # put these files in the target sysroot so they can
- # be used by recipes which use custom user/group
- # permissions.
- # Install passwd.master and group.master to sysconfdir and mv
- # them to make sure they are atomically install.
- install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
- for i in passwd group; do
- install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/$i.master \
- ${STAGING_DIR_TARGET}${sysconfdir}/
- mv ${STAGING_DIR_TARGET}${sysconfdir}/$i.master ${STAGING_DIR_TARGET}${sysconfdir}/$i
- done
+basepasswd_sysroot_postinst() {
+#!/bin/sh
+
+# Install passwd.master and group.master to sysconfdir
+install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
+for i in passwd group; do
+ install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/\$i.master \
+ ${STAGING_DIR_TARGET}${sysconfdir}/\$i
+done
+
+# Run any useradd postinsts
+for script in ${STAGING_DIR_TARGET}${bindir}/postinst-useradd-*; do
+ if [ -f \$script ]; then
+ \$script
fi
+done
+}
+
+SYSROOT_DIRS += "${sysconfdir}"
+SYSROOT_PREPROCESS_FUNCS += "base_passwd_tweaksysroot"
+
+base_passwd_tweaksysroot () {
+ mkdir -p ${SYSROOT_DESTDIR}${bindir}
+ dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}
+ echo "${basepasswd_sysroot_postinst}" > $dest
+ chmod 0755 $dest
}
python populate_packages_prepend() {
diff --git a/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb b/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb
new file mode 100644
index 0000000000..61fb8cbad1
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb
@@ -0,0 +1,35 @@
+SUMMARY = "inittab configuration for BusyBox"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+SRC_URI = "file://inittab"
+
+S = "${WORKDIR}"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}${sysconfdir}
+ install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
+ tmp="${SERIAL_CONSOLES}"
+ [ -n "$tmp" ] && echo >> ${D}${sysconfdir}/inittab
+ for i in $tmp
+ do
+ j=`echo ${i} | sed s/\;/\ /g`
+ id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'`
+ echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+ done
+}
+
+# SERIAL_CONSOLES is generally defined by the MACHINE .conf.
+# Set PACKAGE_ARCH appropriately.
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} = "${sysconfdir}/inittab"
+CONFFILES_${PN} = "${sysconfdir}/inittab"
+
+RCONFLICTS_${PN} = "sysvinit-inittab"
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index f67bbbc420..bf6ddae7d1 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -1,9 +1,9 @@
SUMMARY = "Tiny versions of many common UNIX utilities in a single small executable"
DESCRIPTION = "BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete POSIX environment for any small or embedded system."
-HOMEPAGE = "http://www.busybox.net"
+HOMEPAGE = "https://www.busybox.net"
BUGTRACKER = "https://bugs.busybox.net/"
-DEPENDS += "kern-tools-native"
+DEPENDS += "kern-tools-native virtual/crypt"
# bzip2 applet in busybox is based on lightly-modified bzip2 source
# the GPL is version 2 only
@@ -18,7 +18,6 @@ BUSYBOX_SPLIT_SUID ?= "1"
export EXTRA_CFLAGS = "${CFLAGS}"
export EXTRA_LDFLAGS = "${LDFLAGS}"
-# We don't want '-e MAKEFLAGS=' in EXTRA_OEMAKE
EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'"
PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
@@ -40,46 +39,53 @@ INITSCRIPT_NAME_${PN}-syslog = "syslog"
INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
SYSTEMD_PACKAGES = "${PN}-syslog"
-SYSTEMD_SERVICE_${PN}-syslog = "busybox-syslog.service"
+SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}"
+
+RDEPENDS_${PN}-syslog = "busybox"
+CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf"
+RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng"
-CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
-RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
+RRECOMMENDS_${PN} = "${PN}-udhcpc"
+
+RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}"
inherit cml1 systemd update-rc.d ptest
+# busybox's unzip test case needs zip command, which busybox itself does not provide
+RDEPENDS_${PN}-ptest = "zip"
+
# internal helper
def busybox_cfg(feature, tokens, cnf, rem):
- if type(tokens) == type(""):
- tokens = [tokens]
- rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
- if feature:
- cnf.extend([token + '=y' for token in tokens])
- else:
- cnf.extend(['# ' + token + ' is not set' for token in tokens])
+ if type(tokens) == type(""):
+ tokens = [tokens]
+ rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
+ if feature:
+ cnf.extend([token + '=y' for token in tokens])
+ else:
+ cnf.extend(['# ' + token + ' is not set' for token in tokens])
# Map distro features to config settings
def features_to_busybox_settings(d):
- cnf, rem = ([], [])
- busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IPV6', cnf, rem)
- busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'largefile', True, False, d), 'CONFIG_LFS', cnf, rem)
- busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'largefile', True, False, d), 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem)
- busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'nls', True, False, d), 'CONFIG_LOCALE_SUPPORT', cnf, rem)
- busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem)
- busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem)
- busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'wifi', True, False, d), 'CONFIG_RFKILL', cnf, rem)
- busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'bluetooth', True, False, d), 'CONFIG_RFKILL', cnf, rem)
- return "\n".join(cnf), "\n".join(rem)
-
-# X, Y = ${@features_to_uclibc_settings(d)}
+ cnf, rem = ([], [])
+ busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IPV6', cnf, rem)
+ busybox_cfg(True, 'CONFIG_LFS', cnf, rem)
+ busybox_cfg(True, 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem)
+ busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'nls', True, False, d), 'CONFIG_LOCALE_SUPPORT', cnf, rem)
+ busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem)
+ busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem)
+ busybox_cfg(bb.utils.contains_any('DISTRO_FEATURES', 'bluetooth wifi', True, False, d), 'CONFIG_RFKILL', cnf, rem)
+ return "\n".join(cnf), "\n".join(rem)
+
+# X, Y = ${@features_to_busybox_settings(d)}
# unfortunately doesn't seem to work with bitbake, workaround:
def features_to_busybox_conf(d):
- cnf, rem = features_to_busybox_settings(d)
- return cnf
+ cnf, rem = features_to_busybox_settings(d)
+ return cnf
def features_to_busybox_del(d):
- cnf, rem = features_to_busybox_settings(d)
- return rem
+ cnf, rem = features_to_busybox_settings(d)
+ return rem
configmangle = '/CONFIG_EXTRA_CFLAGS/d; \
'
@@ -103,6 +109,9 @@ python () {
}
do_prepare_config () {
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
+ export KCONFIG_NOTIMESTAMP=1
+ fi
sed -e '/CONFIG_STATIC/d' \
< ${WORKDIR}/defconfig > ${S}/.config
echo "# CONFIG_STATIC is not set" >> .config
@@ -110,15 +119,18 @@ do_prepare_config () {
${S}/.config
sed -i -e '${configmangle}' ${S}/.config
if test ${DO_IPv4} -eq 0 && test ${DO_IPv6} -eq 0; then
- # disable networking applets
- mv ${S}/.config ${S}/.config.oe-tmp
- awk 'BEGIN{net=0}
- /^# Networking Utilities/{net=1}
- /^#$/{if(net){net=net+1}}
- {if(net==2&&$0 !~ /^#/&&$1){print("# "$1" is not set")}else{print}}' \
- ${S}/.config.oe-tmp > ${S}/.config
+ # disable networking applets
+ mv ${S}/.config ${S}/.config.oe-tmp
+ awk 'BEGIN{net=0}
+ /^# Networking Utilities/{net=1}
+ /^#$/{if(net){net=net+1}}
+ {if(net==2&&$0 !~ /^#/&&$1){print("# "$1" is not set")}else{print}}' \
+ ${S}/.config.oe-tmp > ${S}/.config
fi
sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"/' ${S}/.config
+ if [ -n "${DEBUG_PREFIX_MAP}" ]; then
+ sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config
+ fi
}
# returns all the elements from the src uri that are .cfg files
@@ -132,6 +144,7 @@ def find_cfgs(d):
return sources_list
do_configure () {
+ set -x
do_prepare_config
merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
cml1_do_configure
@@ -139,11 +152,24 @@ do_configure () {
do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
+ export KCONFIG_NOTIMESTAMP=1
+ fi
if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then
- # split the .config into two parts, and make two busybox binaries
+ # split the .config into two parts, and make two busybox binaries
+ if [ -e .config.orig ]; then
+ # Need to guard again an interrupted do_compile - restore any backup
+ cp .config.orig .config
+ fi
cp .config .config.orig
oe_runmake busybox.cfg.suid
oe_runmake busybox.cfg.nosuid
+
+ # workaround for suid bug 10346
+ if ! grep -q "CONFIG_SH_IS_NONE" busybox.cfg.nosuid; then
+ echo "CONFIG_SH_IS_NONE" >> busybox.cfg.suid
+ fi
+
for i in `cat busybox.cfg.suid busybox.cfg.nosuid`; do
echo "# $i is not set" >> .config.disable.apps
done
@@ -153,12 +179,25 @@ do_compile() {
cat busybox.cfg.$s | while read item; do
grep -w "$item" .config.orig
done > .config.app.$s
+
+ # workaround for suid bug 10346
+ if [ "$s" = "suid" ] ; then
+ sed "s/.*CONFIG_SH_IS_NONE.*$/CONFIG_SH_IS_NONE=y/" -i .config.app.suid
+ fi
+
merge_config.sh -m .config.nonapps .config.app.$s
oe_runmake busybox_unstripped
mv busybox_unstripped busybox.$s
oe_runmake busybox.links
- mv busybox.links busybox.links.$s
+ sort busybox.links > busybox.links.$s
+ rm busybox.links
done
+
+ # hard fail if sh is being linked to the suid busybox (detects bug 10346)
+ if grep -q -x "/bin/sh" busybox.links.suid; then
+ bbfatal "busybox suid binary incorrectly provides /bin/sh"
+ fi
+
# copy .config.orig back to .config, because the install process may check this file
cp .config.orig .config
# cleanup
@@ -176,6 +215,10 @@ do_install () {
sed -i "s:^/usr/bin/:BINDIR/:" busybox.links*
sed -i "s:^/usr/sbin/:SBINDIR/:" busybox.links*
+ # Move arch/link to BINDIR to match coreutils
+ sed -i "s:^BASE_BINDIR/arch:BINDIR/arch:" busybox.links*
+ sed -i "s:^BASE_BINDIR/link:BINDIR/link:" busybox.links*
+
sed -i "s:^BASE_BINDIR/:${base_bindir}/:" busybox.links*
sed -i "s:^BASE_SBINDIR/:${base_sbindir}/:" busybox.links*
sed -i "s:^BINDIR/:${bindir}/:" busybox.links*
@@ -192,7 +235,7 @@ do_install () {
install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir}
install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir}
install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir}
- if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+ if grep -q "CONFIG_SH_IS_ASH=y" ${B}/.config; then
ln -sf busybox.nosuid ${D}${base_bindir}/sh
fi
# Keep a default busybox for people who want to invoke busybox directly.
@@ -206,7 +249,7 @@ do_install () {
install -m 0755 ${B}/busybox ${D}${base_bindir}
fi
install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
- if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+ if grep -q "CONFIG_SH_IS_ASH=y" ${B}/.config; then
ln -sf busybox ${D}${base_bindir}/sh
fi
# We make this symlink here to eliminate the error when upgrading together
@@ -217,8 +260,7 @@ do_install () {
ln -sf busybox ${D}${base_bindir}/busybox.nosuid
fi
else
- install -d ${D}${base_bindir} ${D}${base_sbindir}
- install -d ${D}${libdir} ${D}${bindir} ${D}${sbindir}
+ install -d ${D}${base_bindir} ${D}${bindir} ${D}${libdir}
cat busybox.links | while read FILE; do
NAME=`basename "$FILE"`
install -m 0755 "0_lib/$NAME" "${D}$FILE.${BPN}"
@@ -238,114 +280,94 @@ do_install () {
fi
if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
- install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN}
- install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN}
- install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN}
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog
+ install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
fi
- if grep "CONFIG_CROND=y" ${B}/.config; then
+ if grep -q "CONFIG_CROND=y" ${B}/.config; then
install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
fi
- if grep "CONFIG_HTTPD=y" ${B}/.config; then
+ if grep -q "CONFIG_HTTPD=y" ${B}/.config; then
install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
install -d ${D}/srv/www
fi
- if grep "CONFIG_UDHCPD=y" ${B}/.config; then
+ if grep -q "CONFIG_UDHCPD=y" ${B}/.config; then
install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
fi
- if grep "CONFIG_HWCLOCK=y" ${B}/.config; then
+ if grep -q "CONFIG_HWCLOCK=y" ${B}/.config; then
install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
fi
- if grep "CONFIG_UDHCPC=y" ${B}/.config; then
+ if grep -q "CONFIG_UDHCPC=y" ${B}/.config; then
install -d ${D}${sysconfdir}/udhcpc.d
install -d ${D}${datadir}/udhcpc
install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default
sed -i "s:/SBIN_DIR/:${base_sbindir}/:" ${D}${sysconfdir}/udhcpc.d/50default
install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
fi
- if grep "CONFIG_INETD=y" ${B}/.config; then
+ if grep -q "CONFIG_INETD=y" ${B}/.config; then
install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN}
sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN}
install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/
fi
- if grep "CONFIG_MDEV=y" ${B}/.config; then
- install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev
- if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then
- install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf
- install -d ${D}${sysconfdir}/mdev
- install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev
- install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
- fi
+ if grep -q "CONFIG_MDEV=y" ${B}/.config; then
+ install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev
+ if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then
+ install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf
+ install -d ${D}${sysconfdir}/mdev
+ install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev
+ install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
+ fi
+ fi
+ if grep -q "CONFIG_INIT=y" ${B}/.config; then
+ install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS
+ install -D -m 0755 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK
fi
- if grep "CONFIG_INIT=y" ${B}/.config; then
- install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS
- install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK
- install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel
- if grep "CONFIG_FEATURE_USE_INITTAB=y" ${B}/.config; then
- install -D -m 0777 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
- tmp="${SERIAL_CONSOLES}"
- for i in $tmp
- do
- j=`echo ${i} | sed s/\;/\ /g`
- id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'`
- echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
- done
- fi
- fi
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
- install -d ${D}${systemd_unitdir}/system
- sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
- > ${D}${systemd_unitdir}/system/busybox-syslog.service
- if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
- install -d ${D}${sysconfdir}/default
- install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
- fi
- ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
- fi
- if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
- install -d ${D}${systemd_unitdir}/system
- sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
- > ${D}${systemd_unitdir}/system/busybox-klogd.service
- fi
- fi
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
+ install -d ${D}${systemd_unitdir}/system
+ sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
+ > ${D}${systemd_unitdir}/system/busybox-klogd.service
+ fi
- # Remove the sysvinit specific configuration file for systemd systems to avoid confusion
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
- rm -f ${D}${sysconfdir}/syslog-startup.conf.${BPN}
- fi
+ if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
+ install -d ${D}${systemd_unitdir}/system
+ sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
+ > ${D}${systemd_unitdir}/system/busybox-syslog.service
+ if [ ! -e ${D}${systemd_unitdir}/system/busybox-klogd.service ] ; then
+ sed -i '/klog/d' ${D}${systemd_unitdir}/system/busybox-syslog.service
+ fi
+ if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
+ fi
+ fi
+ fi
+
+ # Remove the sysvinit specific configuration file for systemd systems to avoid confusion
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
+ rm -f ${D}${sysconfdir}/syslog-startup.conf
+ fi
}
+PTEST_BINDIR = "1"
+
do_install_ptest () {
- cp -r ${B}/testsuite ${D}${PTEST_PATH}/
- cp ${B}/.config ${D}${PTEST_PATH}/
- ln -s /bin/busybox ${D}${PTEST_PATH}/busybox
+ cp -r ${B}/testsuite ${D}${PTEST_PATH}/
+ cp ${B}/.config ${D}${PTEST_PATH}/
+ ln -s /bin/busybox ${D}${PTEST_PATH}/busybox
}
inherit update-alternatives
ALTERNATIVE_PRIORITY = "50"
-ALTERNATIVE_${PN}-syslog += "syslog-conf"
-ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
-
-python () {
- if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- pn = d.getVar('PN', True)
- d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init')
- d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir', True)))
- d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
- d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf')
- d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir', True)))
- d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
-}
-
python do_package_prepend () {
# We need to load the full set of busybox provides from the /etc/busybox.links
# Use this to see the update-alternatives with the right information
- dvar = d.getVar('D', True)
- pn = d.getVar('PN', True)
+ dvar = d.getVar('D')
+ pn = d.getVar('PN')
def set_alternative_vars(links, target):
links = d.expand(links)
target = d.expand(target)
@@ -356,7 +378,10 @@ python do_package_prepend () {
# Match coreutils
if alt_name == '[':
alt_name = 'lbracket'
- d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
+ if alt_name == 'klogd' or alt_name == 'syslogd':
+ d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' ' + alt_name)
+ else:
+ d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
if os.path.exists('%s%s' % (dvar, target)):
d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target)
@@ -370,31 +395,40 @@ python do_package_prepend () {
set_alternative_vars("${sysconfdir}/busybox.links.suid", "${base_bindir}/busybox.suid")
}
-pkg_postinst_${PN} () {
- # This part of code is dedicated to the on target upgrade problem.
- # It's known that if we don't make appropriate symlinks before update-alternatives calls,
- # there will be errors indicating missing commands such as 'sed'.
- # These symlinks will later be updated by update-alternatives calls.
- test -n 2 > /dev/null || alias test='busybox test'
- if test "x$D" = "x"; then
- # Remove busybox.nosuid if it's a symlink, because this situation indicates
- # that we're installing or upgrading to a one-binary busybox.
- if test -h ${base_bindir}/busybox.nosuid; then
- rm -f ${base_bindir}/busybox.nosuid
- fi
- for suffix in "" ".nosuid" ".suid"; do
- if test -e ${sysconfdir}/busybox.links$suffix; then
- while read link; do
- if test ! -e "$link"; then
- # we can use busybox here because even if we are using splitted busybox
- # we've made a symlink from /bin/busybox to /bin/busybox.nosuid.
- busybox rm -f $link
- busybox ln -s "${base_bindir}/busybox$suffix" $link
- fi
- done < ${sysconfdir}/busybox.links$suffix
- fi
- done
- fi
+# This part of code is dedicated to the on target upgrade problem. It's known
+# that if we don't make appropriate symlinks before update-alternatives calls,
+# there will be errors indicating missing commands such as 'sed'.
+# These symlinks will later be updated by update-alternatives calls.
+# The update-alternatives.bbclass' postinst script runs firstly before other
+# postinst, but this part of code needs run firstly, so add this funtion.
+python populate_packages_updatealternatives_append() {
+ postinst = """
+test -n 2 > /dev/null || alias test='busybox test'
+if test "x$D" = "x"; then
+ # Remove busybox.nosuid if it's a symlink, because this situation indicates
+ # that we're installing or upgrading to a one-binary busybox.
+ if test -h ${base_bindir}/busybox.nosuid; then
+ rm -f ${base_bindir}/busybox.nosuid
+ fi
+ for suffix in "" ".nosuid" ".suid"; do
+ if test -e ${sysconfdir}/busybox.links$suffix; then
+ while read link; do
+ if test ! -e "$link"; then
+ # we can use busybox here because even if we are using splitted busybox
+ # we've made a symlink from /bin/busybox to /bin/busybox.nosuid.
+ busybox rm -f $link
+ busybox ln -s "${base_bindir}/busybox$suffix" $link
+ fi
+ done < ${sysconfdir}/busybox.links$suffix
+ fi
+ done
+fi
+if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then
+ grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
+fi
+
+"""
+ d.prependVar('pkg_postinst_%s' % pkg, postinst)
}
pkg_prerm_${PN} () {
@@ -419,11 +453,19 @@ pkg_prerm_${PN} () {
export PATH=$PATH:$tmpdir
}
+pkg_postrm_${PN} () {
+ if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links* && [ ! -e $D${base_bindir}/bash ]; then
+ printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+ fi
+}
+
pkg_prerm_${PN}-syslog () {
# remove syslog
if test "x$D" = "x"; then
if test "$1" = "upgrade" -o "$1" = "remove"; then
- ${sysconfdir}/init.d/syslog stop
+ ${sysconfdir}/init.d/syslog stop || :
fi
fi
}
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/ash', '', d)}"
diff --git a/meta/recipes-core/busybox/busybox/0001-du-l-works-fix-to-use-145-instead-of-144.patch b/meta/recipes-core/busybox/busybox/0001-du-l-works-fix-to-use-145-instead-of-144.patch
new file mode 100644
index 0000000000..bb5f7533ec
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-du-l-works-fix-to-use-145-instead-of-144.patch
@@ -0,0 +1,32 @@
+From c69feb2fdb755d6db34d0eb0a9e9994386c15e3a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 14 Nov 2018 15:19:57 +0800
+Subject: [PATCH] du-l-works: fix to use 145 instead of 144
+
+64 + 64 + 16 = 144
+144 + size_of_directory >= 145
+So fix to use 145 instead of 144.
+
+Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2018-November/086836.html]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ testsuite/du/du-l-works | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testsuite/du/du-l-works b/testsuite/du/du-l-works
+index af87345..575064a 100644
+--- a/testsuite/du/du-l-works
++++ b/testsuite/du/du-l-works
+@@ -5,7 +5,7 @@ cd du.testdir
+ dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null
+ ln file1 file1.1
+ dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null
+-test x"`busybox du -l .`" = x"144 ." \
++test x"`busybox du -l .`" = x"145 ." \
+ -o x"`busybox du -l .`" = x"146 ." \
+ -o x"`busybox du -l .`" = x"148 ." \
+ -o x"`busybox du -l .`" = x"152 ." \
+--
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch b/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
deleted file mode 100644
index 8bcbd73de9..0000000000
--- a/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 198f18addf1d814c2fefcb492f3b9fbd221669bb Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Wed, 20 Apr 2016 18:24:45 +0300
-Subject: [PATCH] flock: update the behaviour of -c parameter to match upstream
-
-In upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
-
-function old new delta
-flock_main 286 377 +91
-.rodata 155849 155890 +41
-
-Upstream-Status: Submitted
-[ http://lists.busybox.net/pipermail/busybox/2016-April/084142.html ]
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- util-linux/flock.c | 20 ++++++++++++++------
- 1 file changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/util-linux/flock.c b/util-linux/flock.c
-index 05a747f..c85a25d 100644
---- a/util-linux/flock.c
-+++ b/util-linux/flock.c
-@@ -20,6 +20,7 @@ int flock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int flock_main(int argc UNUSED_PARAM, char **argv)
- {
- int mode, opt, fd;
-+ char *cmd_args[4];
- enum {
- OPT_s = (1 << 0),
- OPT_x = (1 << 1),
-@@ -57,7 +58,6 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- /* If it is "flock FILE -c PROG", then -c isn't caught by getopt32:
- * we use "+" in order to support "flock -opt FILE PROG -with-opts",
- * we need to remove -c by hand.
-- * TODO: in upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
- */
- if (argv[0]
- && argv[0][0] == '-'
-@@ -65,7 +65,10 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- || (ENABLE_LONG_OPTS && strcmp(argv[0] + 1, "-command") == 0)
- )
- ) {
-- argv++;
-+ if (argc != optind + 3)
-+ bb_error_msg_and_die("-c requires exactly one command argument");
-+ else
-+ argv++;
- }
-
- if (OPT_s == LOCK_SH && OPT_x == LOCK_EX && OPT_n == LOCK_NB && OPT_u == LOCK_UN) {
-@@ -89,9 +92,14 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- return EXIT_FAILURE;
- bb_perror_nomsg_and_die();
- }
--
-- if (argv[0])
-- return spawn_and_wait(argv);
--
-+ if (argv[0]) {
-+ cmd_args[0] = getenv("SHELL");
-+ if (!cmd_args[0])
-+ cmd_args[0] = (char*)DEFAULT_SHELL;
-+ cmd_args[1] = (char*)"-c";
-+ cmd_args[2] = argv[0];
-+ cmd_args[3] = NULL;
-+ return spawn_and_wait(cmd_args);
-+ }
- return EXIT_SUCCESS;
- }
---
-2.4.0
-
diff --git a/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch b/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
deleted file mode 100644
index 4f539848cb..0000000000
--- a/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 903542f7331c58007a3ef938d41e1c55fc329648 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 31 Aug 2016 23:40:43 -0400
-Subject: [PATCH] sed: fix "sed n (flushes pattern space, terminates early)"
- testcase failure
-
-This patch fix "sed n (flushes pattern space, terminates early)"
-testcase failure. We can see it at:
-
- https://git.busybox.net/busybox/commit/?id=76d72376e0244a5cafd4880cdc623e37d86a75e4
-
-Upstream-Status: Backport
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- editors/sed.c | 19 ++++++++++---------
- testsuite/sed.tests | 6 +-----
- 2 files changed, 11 insertions(+), 14 deletions(-)
-
-diff --git a/editors/sed.c b/editors/sed.c
-index 7bbf820..259c39c 100644
---- a/editors/sed.c
-+++ b/editors/sed.c
-@@ -1274,16 +1274,17 @@ static void process_files(void)
- case 'n':
- if (!G.be_quiet)
- sed_puts(pattern_space, last_gets_char);
-- if (next_line) {
-- free(pattern_space);
-- pattern_space = next_line;
-- last_gets_char = next_gets_char;
-- next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
-- substituted = 0;
-- linenum++;
-- break;
-+ if (next_line == NULL) {
-+ /* If no next line, jump to end of script and exit. */
-+ goto discard_line;
- }
-- /* fall through */
-+ free(pattern_space);
-+ pattern_space = next_line;
-+ last_gets_char = next_gets_char;
-+ next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
-+ substituted = 0;
-+ linenum++;
-+ break;
-
- /* Quit. End of script, end of input. */
- case 'q':
-diff --git a/testsuite/sed.tests b/testsuite/sed.tests
-index 34479e5..96ff7a5 100755
---- a/testsuite/sed.tests
-+++ b/testsuite/sed.tests
-@@ -73,13 +73,9 @@ testing "sed t (test/branch clears test bit)" "sed -e 's/a/b/;:loop;t loop'" \
- testing "sed T (!test/branch)" "sed -e 's/a/1/;T notone;p;: notone;p'" \
- "1\n1\n1\nb\nb\nc\nc\n" "" "a\nb\nc\n"
-
--test x"$SKIP_KNOWN_BUGS" = x"" && {
--# Normal sed end-of-script doesn't print "c" because n flushed the pattern
--# space. If n hits EOF, pattern space is empty when script ends.
--# Query: how does this interact with no newline at EOF?
- testing "sed n (flushes pattern space, terminates early)" "sed -e 'n;p'" \
- "a\nb\nb\nc\n" "" "a\nb\nc\n"
--}
-+
- # non-GNU sed: N does _not_ flush pattern space, therefore c is eaten @ script end
- # GNU sed: N flushes pattern space, therefore c is printed too @ script end
- testing "sed N (flushes pattern space (GNU behavior))" "sed -e 'N;p'" \
---
-2.8.1
-
diff --git a/meta/recipes-core/busybox/busybox/0001-testsuite-check-uudecode-before-using-it.patch b/meta/recipes-core/busybox/busybox/0001-testsuite-check-uudecode-before-using-it.patch
new file mode 100644
index 0000000000..25472f0bbd
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-testsuite-check-uudecode-before-using-it.patch
@@ -0,0 +1,45 @@
+From 85f164ec427fecbae24140b3c93acbbe2ba1c817 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 13 Nov 2018 11:27:01 +0800
+Subject: [PATCH] testsuite: check uudecode before using it
+
+The unzip and tar test cases use uudecode command, so also
+check it via optional function.
+
+Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2018-November/086833.html]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ testsuite/tar.tests | 2 +-
+ testsuite/unzip.tests | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testsuite/tar.tests b/testsuite/tar.tests
+index d71a349..8c88567 100755
+--- a/testsuite/tar.tests
++++ b/testsuite/tar.tests
+@@ -336,7 +336,7 @@ SKIP=
+ cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
+ mkdir tar.tempdir && cd tar.tempdir || exit 1
+-optional FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT LS
++optional FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT LS UUDECODE
+ testing "Symlink attack: create symlink and then write through it" '\
+ exec 2>&1
+ uudecode -o input && tar xvf input; echo $?
+diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
+index af53de9..3b45ece 100755
+--- a/testsuite/unzip.tests
++++ b/testsuite/unzip.tests
+@@ -31,7 +31,7 @@ rmdir foo
+ rm foo.zip
+
+ # File containing some damaged encrypted stream
+-optional FEATURE_UNZIP_CDF CONFIG_UNICODE_SUPPORT
++optional FEATURE_UNZIP_CDF CONFIG_UNICODE_SUPPORT UUDECODE
+ testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
+ "Archive: bad.zip
+ inflating: ]3j½r«I??K-%Ix
+--
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox/0001-testsuite-use-www.example.org-for-wget-test-cases.patch b/meta/recipes-core/busybox/busybox/0001-testsuite-use-www.example.org-for-wget-test-cases.patch
new file mode 100644
index 0000000000..7ba0f77fa2
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-testsuite-use-www.example.org-for-wget-test-cases.patch
@@ -0,0 +1,62 @@
+From 03acf460990dfcf6e52b298301b348b9504460a8 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 13 Nov 2018 13:51:42 +0800
+Subject: [PATCH] testsuite: use www.example.org for wget test cases
+
+Use example.org instead of google.com to make sure it's
+always reachible.
+
+Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2018-November/086835.html]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ testsuite/wget/wget--O-overrides--P | 2 +-
+ testsuite/wget/wget-handles-empty-path | 2 +-
+ testsuite/wget/wget-retrieves-google-index | 2 +-
+ testsuite/wget/wget-supports--P | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/testsuite/wget/wget--O-overrides--P b/testsuite/wget/wget--O-overrides--P
+index 40a3a96..490d743 100644
+--- a/testsuite/wget/wget--O-overrides--P
++++ b/testsuite/wget/wget--O-overrides--P
+@@ -1,5 +1,5 @@
+ test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+ mkdir foo
+-busybox wget -q -O index.html -P foo http://www.google.com/
++busybox wget -q -O index.html -P foo http://www.example.org/
+ test -s index.html
+diff --git a/testsuite/wget/wget-handles-empty-path b/testsuite/wget/wget-handles-empty-path
+index 01d60bd..1802db6 100644
+--- a/testsuite/wget/wget-handles-empty-path
++++ b/testsuite/wget/wget-handles-empty-path
+@@ -1,3 +1,3 @@
+ test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+-busybox wget http://www.google.com
++busybox wget http://www.example.org
+diff --git a/testsuite/wget/wget-retrieves-google-index b/testsuite/wget/wget-retrieves-google-index
+index f9dbb8b..fc801d4 100644
+--- a/testsuite/wget/wget-retrieves-google-index
++++ b/testsuite/wget/wget-retrieves-google-index
+@@ -1,4 +1,4 @@
+ test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+-busybox wget -q -O foo http://www.google.com/
++busybox wget -q -O foo http://www.example.org/
+ test -s foo
+diff --git a/testsuite/wget/wget-supports--P b/testsuite/wget/wget-supports--P
+index bfe4ac4..4ff2fe0 100644
+--- a/testsuite/wget/wget-supports--P
++++ b/testsuite/wget/wget-supports--P
+@@ -1,5 +1,5 @@
+ test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+ mkdir foo
+-busybox wget -q -P foo http://www.google.com/
++busybox wget -q -P foo http://www.example.org/
+ test -s foo/index.html
+--
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch b/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
deleted file mode 100644
index 84cae6aa2c..0000000000
--- a/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From d474ffc68290e0a83651c4432eeabfa62cd51e87 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Thu, 10 Mar 2016 11:47:58 +0100
-Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2147
-
-https://git.busybox.net/busybox/commit/?id=d474ffc
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/domain_codec.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/domain_codec.c
-+++ busybox-1.23.2/networking/udhcp/domain_codec.c
-@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- if (crtpos + *c + 1 > clen) /* label too long? abort */
- return NULL;
- if (dst)
-- memcpy(dst + len, c + 1, *c);
-+ /* \3com ---> "com." */
-+ ((char*)mempcpy(dst + len, c + 1, *c))[0] = '.';
- len += *c + 1;
- crtpos += *c + 1;
-- if (dst)
-- dst[len - 1] = '.';
- } else {
- /* NUL: end of current domain name */
- if (retpos == 0) {
-@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- crtpos = retpos;
- retpos = depth = 0;
- }
-- if (dst)
-+ if (dst && len != 0)
-+ /* \4host\3com\0\4host and we are at \0:
-+ * \3com was converted to "com.", change dot to space.
-+ */
- dst[len - 1] = ' ';
- }
-
-@@ -228,6 +230,9 @@ int main(int argc, char **argv)
- int len;
- uint8_t *encoded;
-
-+ uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 };
-+ printf("NUL:'%s'\n", dname_dec(str, 6, ""));
-+
- #define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), sizeof(encoded), (pre))
- printf("'%s'\n", DNAME_DEC("\4host\3com\0", "test1:"));
- printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", ""));
diff --git a/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch b/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
deleted file mode 100644
index 1473d46035..0000000000
--- a/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1b7c17391de66502dd7a97c866e0a33681edbb1f Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 11 Mar 2016 00:26:58 +0100
-Subject: [PATCH] udhcpc: fix a warning in debug code
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Upsteam-Status: Backport
-CVE: CVE-2016-2147 regression fix
-
-https://git.busybox.net/busybox/commit/?id=1b7c17
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
-index cee31f1..5a923cc 100644
---- a/networking/udhcp/domain_codec.c
-+++ b/networking/udhcp/domain_codec.c
-@@ -7,6 +7,7 @@
- * Licensed under GPLv2 or later, see file LICENSE in this source tree.
- */
- #ifdef DNS_COMPR_TESTING
-+# define _GNU_SOURCE
- # define FAST_FUNC /* nothing */
- # define xmalloc malloc
- # include <stdlib.h>
---
-2.3.5
-
diff --git a/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch b/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
deleted file mode 100644
index af04a7f5bd..0000000000
--- a/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 352f79acbd759c14399e39baef21fc4ffe180ac2 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 26 Feb 2016 15:54:56 +0100
-Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced
- buffer)
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2148
-https://git.busybox.net/busybox/commit/?id=352f79
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/common.c | 15 +++++++++++++--
- networking/udhcp/dhcpc.c | 4 ++--
- 2 files changed, 15 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/common.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/common.c
-+++ busybox-1.23.2/networking/udhcp/common.c
-@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1
- * udhcp_str2optset: to determine how many bytes to allocate.
- * xmalloc_optname_optval: to estimate string length
- * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type])
-- * is the number of elements, multiply in by one element's string width
-+ * is the number of elements, multiply it by one element's string width
- * (len_of_option_as_string[opt_type]) and you know how wide string you need.
- */
- const uint8_t dhcp_option_lengths[] ALIGN1 = {
-@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIG
- [OPTION_S32] = 4,
- /* Just like OPTION_STRING, we use minimum length here */
- [OPTION_STATIC_ROUTES] = 5,
-- [OPTION_6RD] = 22, /* ignored by udhcp_str2optset */
-+ [OPTION_6RD] = 12, /* ignored by udhcp_str2optset */
-+ /* The above value was chosen as follows:
-+ * len_of_option_as_string[] for this option is >60: it's a string of the form
-+ * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ".
-+ * Each additional ipv4 address takes 4 bytes in binary option and appends
-+ * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 4
-+ * but this severely overestimates string length: instead of 16 bytes,
-+ * it adds >60 for every 4 bytes in binary option.
-+ * We cheat and declare here that option is in units of 12 bytes.
-+ * This adds more than 60 bytes for every three ipv4 addresses - more than enough.
-+ * (Even 16 instead of 12 should work, but let's be paranoid).
-+ */
- };
-
-
-Index: busybox-1.23.2/networking/udhcp/dhcpc.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.23.2/networking/udhcp/dhcpc.c
-@@ -103,7 +103,7 @@ static const uint8_t len_of_option_as_st
- [OPTION_IP ] = sizeof("255.255.255.255 "),
- [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
- [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
-- [OPTION_6RD ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
-+ [OPTION_6RD ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
- [OPTION_STRING ] = 1,
- [OPTION_STRING_HOST ] = 1,
- #if ENABLE_FEATURE_UDHCP_RFC3397
-@@ -214,7 +214,7 @@ static NOINLINE char *xmalloc_optname_op
- type = optflag->flags & OPTION_TYPE_MASK;
- optlen = dhcp_option_lengths[type];
- upper_length = len_of_option_as_string[type]
-- * ((unsigned)(len + optlen - 1) / (unsigned)optlen);
-+ * ((unsigned)(len + optlen) / (unsigned)optlen);
-
- dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
- dest += sprintf(ret, "%s=", opt_name);
diff --git a/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch b/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
deleted file mode 100644
index cdc91082bc..0000000000
--- a/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- https://git.busybox.net/busybox/commit/?id=e111a1640494fe87fc913f94fae3bb805de0fc99
- https://git.busybox.net/busybox/commit/?h=1_24_stable&id=be729c1d3b5c923f10871dd68ea94156d0f8c803
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From be729c1d3b5c923f10871dd68ea94156d0f8c803 Mon Sep 17 00:00:00 2001
-From: Ari Sundholm <ari@tuxera.com>
-Date: Mon, 4 Jan 2016 15:40:37 +0200
-Subject: [PATCH] truncate: always set mode when opening file to avoid fortify
- errors
-
-Busybox crashes due to no mode being given when opening:
-$ ./busybox truncate -s 1M foo
-*** invalid open64 call: O_CREAT without mode ***: ./busybox terminated
-======= Backtrace: =========
-/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f66d921338f]
-/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f66d92aac9c]
-/lib/x86_64-linux-gnu/libc.so.6(+0xeb6aa)[0x7f66d928b6aa]
-./busybox[0x4899f9]
-======= Memory map: ========
-00400000-004d0000 r-xp 00000000 00:1a 137559 /home/ari/busybox/busybox
-006cf000-006d0000 r--p 000cf000 00:1a 137559 /home/ari/busybox/busybox
-006d0000-006d1000 rw-p 000d0000 00:1a 137559 /home/ari/busybox/busybox
-006d1000-006d4000 rw-p 00000000 00:00 0
-014e7000-01508000 rw-p 00000000 00:00 0 [heap]
-7f66d8f8a000-7f66d8fa0000 r-xp 00000000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d8fa0000-7f66d919f000 ---p 00016000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d919f000-7f66d91a0000 rw-p 00015000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d91a0000-7f66d935b000 r-xp 00000000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d935b000-7f66d955a000 ---p 001bb000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955a000-7f66d955e000 r--p 001ba000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955e000-7f66d9560000 rw-p 001be000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d9560000-7f66d9565000 rw-p 00000000 00:00 0
-7f66d9565000-7f66d966a000 r-xp 00000000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d966a000-7f66d9869000 ---p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d9869000-7f66d986a000 r--p 00104000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986a000-7f66d986b000 rw-p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986b000-7f66d988e000 r-xp 00000000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a64000-7f66d9a67000 rw-p 00000000 00:00 0
-7f66d9a8a000-7f66d9a8d000 rw-p 00000000 00:00 0
-7f66d9a8d000-7f66d9a8e000 r--p 00022000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8e000-7f66d9a8f000 rw-p 00023000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8f000-7f66d9a90000 rw-p 00000000 00:00 0
-7ffc47761000-7ffc47782000 rw-p 00000000 00:00 0 [stack]
-7ffc477ab000-7ffc477ad000 r-xp 00000000 00:00 0 [vdso]
-ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
-Aborted (core dumped)
-$
-
-Fix this by simply always setting the mode, as it doesn't hurt even
-when O_CREAT is not specified.
-
-This bug is a regression introduced in fc3e40e, as xopen(), which
-was originally used, would automatically set the mode.
-
-Signed-off-by: Ari Sundholm <ari@tuxera.com>
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-(cherry picked from commit e111a1640494fe87fc913f94fae3bb805de0fc99)
----
- coreutils/truncate.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/coreutils/truncate.c b/coreutils/truncate.c
-index e5fa656..4c997bf 100644
---- a/coreutils/truncate.c
-+++ b/coreutils/truncate.c
-@@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv)
-
- argv += optind;
- while (*argv) {
-- int fd = open(*argv, flags);
-+ int fd = open(*argv, flags, 0666);
- if (fd < 0) {
- if (errno != ENOENT || !(opts & OPT_NOCREATE)) {
- bb_perror_msg("%s: open", *argv);
---
-2.6.2
-
diff --git a/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch b/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
deleted file mode 100644
index e3c502091f..0000000000
--- a/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- http://git.busybox.net/busybox/commit/?id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
- http://git.busybox.net/busybox/commit/?h=1_24_stable&id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 092fabcf1df5d46cd22be4ffcd3b871f6180eb9c Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 30 Oct 2015 23:41:53 +0100
-Subject: [PATCH] [g]unzip: fix recent breakage.
-
-Also, do emit error message we so painstakingly pass from gzip internals
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-(cherry picked from commit 6bd3fff51aa74e2ee2d87887b12182a3b09792ef)
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
- testsuite/unzip.tests | 1 +
- 2 files changed, 22 insertions(+), 12 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index c76fd31..357c9bf 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- huft_t *q; /* points to current table */
- huft_t r; /* table entry for structure assignment */
- huft_t *u[BMAX]; /* table stack */
-- unsigned v[N_MAX]; /* values in order of bit length */
-- unsigned v_end;
-+ unsigned v[N_MAX + 1]; /* values in order of bit length. last v[] is never used */
- int ws[BMAX + 1]; /* bits decoded stack */
- int w; /* bits decoded */
- unsigned x[BMAX + 1]; /* bit offsets, then code stack */
-@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned n,
- *xp++ = j;
- }
-
-- /* Make a table of values in order of bit lengths */
-+ /* Make a table of values in order of bit lengths.
-+ * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
-+ * In particular, last v[i] is never filled and must not be accessed.
-+ */
-+ memset(v, 0xff, sizeof(v));
- p = b;
- i = 0;
-- v_end = 0;
- do {
- j = *p++;
- if (j != 0) {
- v[x[j]++] = i;
-- v_end = x[j];
- }
- } while (++i < n);
-
-@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* set up table entry in r */
- r.b = (unsigned char) (k - w);
-- if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
-+ if (/*p >= v + n || -- redundant, caught by the second check: */
-+ *p == UINT_MAX /* do we access uninited v[i]? (see memset(v))*/
-+ ) {
- r.e = 99; /* out of values--invalid code */
- } else if (*p < s) {
- r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
-@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- e = t->e;
- if (e > 16)
- do {
-- if (e == 99)
-- abort_unzip(PASS_STATE_ONLY);;
-+ if (e == 99) {
-+ abort_unzip(PASS_STATE_ONLY);
-+ }
- bb >>= t->b;
- k -= t->b;
- e -= 16;
-@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- e = t->e;
- if (e > 16)
- do {
-- if (e == 99)
-+ if (e == 99) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
- bb >>= t->b;
- k -= t->b;
- e -= 16;
-@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
-
- b_dynamic >>= 4;
- k_dynamic -= 4;
-- if (nl > 286 || nd > 30)
-+ if (nl > 286 || nd > 30) {
- abort_unzip(PASS_STATE_ONLY); /* bad lengths */
-+ }
-
- /* read in bit-length-code lengths */
- for (j = 0; j < nb; j++) {
-@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
- bl = lbits;
-
- i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, &bl);
-- if (i != 0)
-+ if (i != 0) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
- bd = dbits;
- i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &inflate_codes_td, &bd);
-- if (i != 0)
-+ if (i != 0) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
-
- /* set up data for inflate_codes() */
- inflate_codes_setup(PASS_STATE bl, bd);
-@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
- error_msg = "corrupted data";
- if (setjmp(error_jmp)) {
- /* Error from deep inside zip machinery */
-+ bb_error_msg(error_msg);
- n = -1;
- goto ret;
- }
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index ca0a458..d8738a3 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -34,6 +34,7 @@ rm foo.zip
- testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
- "Archive: bad.zip
- inflating: ]3j½r«IK-%Ix
-+unzip: corrupted data
- unzip: inflate error
- 1
- " \
---
-2.6.2
-
diff --git a/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch b/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
deleted file mode 100644
index 718672695c..0000000000
--- a/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- http://git.busybox.net/busybox/commit/?id=1de25a6e87e0e627aa34298105a3d17c60a1f44e
- http://git.busybox.net/busybox/commit/?h=1_24_stable&id=6767af17f11144c7cd3cfe9ef799d7f89a78fe65
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 1de25a6e87e0e627aa34298105a3d17c60a1f44e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Mon, 26 Oct 2015 19:33:05 +0100
-Subject: [PATCH] unzip: test for bad archive SEGVing
-
-function old new delta
-huft_build 1296 1300 +4
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- archival/libarchive/decompress_gunzip.c | 11 +++++++----
- testsuite/unzip.tests | 23 ++++++++++++++++++++++-
- 2 files changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index 7b6f459..30bf451 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -305,11 +305,12 @@ static int huft_build(const unsigned *b, const unsigned n,
- unsigned i; /* counter, current code */
- unsigned j; /* counter */
- int k; /* number of bits in current code */
-- unsigned *p; /* pointer into c[], b[], or v[] */
-+ const unsigned *p; /* pointer into c[], b[], or v[] */
- huft_t *q; /* points to current table */
- huft_t r; /* table entry for structure assignment */
- huft_t *u[BMAX]; /* table stack */
- unsigned v[N_MAX]; /* values in order of bit length */
-+ unsigned v_end;
- int ws[BMAX + 1]; /* bits decoded stack */
- int w; /* bits decoded */
- unsigned x[BMAX + 1]; /* bit offsets, then code stack */
-@@ -324,7 +325,7 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* Generate counts for each bit length */
- memset(c, 0, sizeof(c));
-- p = (unsigned *) b; /* cast allows us to reuse p for pointing to b */
-+ p = b;
- i = n;
- do {
- c[*p]++; /* assume all entries <= BMAX */
-@@ -365,12 +366,14 @@ static int huft_build(const unsigned *b, const unsigned n,
- }
-
- /* Make a table of values in order of bit lengths */
-- p = (unsigned *) b;
-+ p = b;
- i = 0;
-+ v_end = 0;
- do {
- j = *p++;
- if (j != 0) {
- v[x[j]++] = i;
-+ v_end = x[j];
- }
- } while (++i < n);
-
-@@ -432,7 +435,7 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* set up table entry in r */
- r.b = (unsigned char) (k - w);
-- if (p >= v + n) {
-+ if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
- r.e = 99; /* out of values--invalid code */
- } else if (*p < s) {
- r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index 8677a03..ca0a458 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -7,7 +7,7 @@
-
- . ./testing.sh
-
--# testing "test name" "options" "expected result" "file input" "stdin"
-+# testing "test name" "commands" "expected result" "file input" "stdin"
- # file input will be file called "input"
- # test can create a file "actual" instead of writing to stdout
-
-@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f
- rmdir foo
- rm foo.zip
-
-+# File containing some damaged encrypted stream
-+testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
-+"Archive: bad.zip
-+ inflating: ]3j½r«IK-%Ix
-+unzip: inflate error
-+1
-+" \
-+"" "\
-+begin-base64 644 bad.zip
-+UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ
-+eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA
-+AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA
-+oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst
-+JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA
-+BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW
-+NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
-+====
-+"
-+
-+rm *
-+
- # Clean up scratch directory.
-
- cd ..
---
-2.6.2
-
diff --git a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
index bda86859dc..6faca227f7 100644
--- a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
+++ b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
@@ -33,7 +33,7 @@ cc: linux-kbuild@vger.kernel.org
scripts/kconfig/lxdialog/Makefile | 2 +-
scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
-
+
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -4,6 +4,10 @@
@@ -44,10 +44,10 @@ cc: linux-kbuild@vger.kernel.org
+ echo "$CROSS_CURSES_LIB"
+ exit
+ fi
- for ext in so a dylib ; do
- for lib in ncursesw ncurses curses ; do
- $cc -print-file-name=lib${lib}.${ext} | grep -q /
-@@ -19,6 +23,10 @@ ldflags()
+ pkg-config --libs ncursesw 2>/dev/null && exit
+ pkg-config --libs ncurses 2>/dev/null && exit
+ for ext in so a dll.a dylib ; do
+@@ -21,6 +25,10 @@
# Where is ncurses.h?
ccflags()
{
@@ -55,12 +55,12 @@ cc: linux-kbuild@vger.kernel.org
+ echo "$CROSS_CURSES_INC"
+ exit
+ fi
- if [ -f /usr/include/ncursesw/ncurses.h ]; then
- echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
- elif [ -f /usr/include/ncursesw/curses.h ]; then
+ if pkg-config --cflags ncursesw 2>/dev/null; then
+ echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+ elif pkg-config --cflags ncurses 2>/dev/null; then
--- a/scripts/kconfig/lxdialog/Makefile
+++ b/scripts/kconfig/lxdialog/Makefile
-@@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che
+@@ -5,7 +5,7 @@
# Use reursively expanded variables so we do not call gcc unless
# we really need to do so. (Do not call gcc as part of make mrproper)
diff --git a/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch b/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
deleted file mode 100644
index 38302e0b68..0000000000
--- a/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
- http://git.busybox.net/busybox/commit/?id=d8e61bbf13d0cf38d477255cfd5dc71c5d51d575
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From d8e61bbf13d0cf38d477255cfd5dc71c5d51d575 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 21 Aug 2016 22:00:20 +0200
-Subject: build system: different fix for
- include/applet_tables.h/include/NUM_APPLETS.h
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index 5cc1827..3aedbbf 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
-
- applets/applet_tables: .config include/applets.h
- applets/usage: .config include/applets.h
--applets/usage_pod: .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
-+applets/usage_pod: .config include/applets.h include/applet_tables.h
-
- quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -37,8 +37,21 @@ quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
- $(call cmd,gen_usage_compressed)
-
--quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
-+quiet_cmd_gen_applet_tables = GEN include/applet_tables.h include/NUM_APPLETS.h
- cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
-
--include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
-+include/NUM_APPLETS.h: applets/applet_tables
-+ $(call cmd,gen_applet_tables)
-+
-+# In fact, include/applet_tables.h depends only on applets/applet_tables,
-+# and is generated by it. But specifying only it can run
-+# applets/applet_tables twice, possibly in parallel.
-+# We say that it also needs NUM_APPLETS.h
-+#
-+# Unfortunately, we need to list the same command,
-+# and it can be executed twice (sequentially).
-+# The alternative is to not list any command,
-+# and then if include/applet_tables.h is deleted, it won't be rebuilt.
-+#
-+include/applet_tables.h: include/NUM_APPLETS.h applets/applet_tables
- $(call cmd,gen_applet_tables)
diff --git a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
index 4c9ce3b711..2a0a40c512 100644
--- a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ b/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
@@ -28,36 +28,35 @@ Fixed options -b, -a and -P.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
- networking/udhcp/dhcpc.c | 29 +++++++++++++++++++++--------
- 1 files changed, 21 insertions(+), 8 deletions(-)
+ networking/udhcp/dhcpc.c | 29 ++++++++++++++++------
+ 1 file changed, 21 insertions(+), 8 deletions(-)
-Index: busybox-1.20.2/networking/udhcp/dhcpc.c
+Index: busybox-1.31.0/networking/udhcp/dhcpc.c
===================================================================
---- busybox-1.20.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.20.2/networking/udhcp/dhcpc.c
-@@ -29,6 +29,9 @@
- #include <netpacket/packet.h>
- #include <linux/filter.h>
+--- busybox-1.31.0.orig/networking/udhcp/dhcpc.c
++++ busybox-1.31.0/networking/udhcp/dhcpc.c
+@@ -48,6 +48,8 @@
+ };
+ #endif
+/* option whether to down the interface when reconfiguring */
+static int allow_deconfig = 1;
-+
- /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
+ /* "struct client_data_t client_data" is in bb_common_bufsiz1 */
-@@ -81,8 +84,9 @@ enum {
+@@ -103,8 +105,10 @@
OPT_x = 1 << 18,
OPT_f = 1 << 19,
OPT_B = 1 << 20,
+ OPT_D = 1 << 21,
/* The rest has variable bit positions, need to be clever */
-- OPTBIT_B = 20,
+ OPTBIT_B = 20,
+ OPTBIT_D = 21,
USE_FOR_MMU( OPTBIT_b,)
IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
-@@ -1040,7 +1044,8 @@ static void perform_renew(void)
- state = RENEW_REQUESTED;
+@@ -1124,7 +1128,8 @@
+ client_data.state = RENEW_REQUESTED;
break;
case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
- udhcp_run_script(NULL, "deconfig");
@@ -66,72 +65,79 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
case REQUESTING:
case RELEASED:
change_listen_mode(LISTEN_RAW);
-@@ -1064,7 +1069,8 @@ static void perform_release(uint32_t ser
- bb_info_msg("Unicasting a release of %s to %s",
- inet_ntoa(temp_addr), buffer);
- send_release(server_addr, requested_ip); /* unicast */
-- udhcp_run_script(NULL, "deconfig");
-+ if (allow_deconfig)
-+ udhcp_run_script(NULL, "deconfig");
- }
- bb_info_msg("Entering released state");
+@@ -1160,7 +1165,8 @@
+ * Users requested to be notified in all cases, even if not in one
+ * of the states above.
+ */
+- udhcp_run_script(NULL, "deconfig");
++ if (allow_deconfig)
++ udhcp_run_script(NULL, "deconfig");
-@@ -1215,7 +1221,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
- /* O,x: list; -T,-t,-A take numeric param */
- opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ;
- IF_LONG_OPTS(applet_long_options = udhcpc_longopts;)
-- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fB"
-+ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fBD"
+ change_listen_mode(LISTEN_NONE);
+ client_data.state = RELEASED;
+@@ -1278,7 +1284,7 @@
+ /* Parse command line */
+ opt = getopt32long(argv, "^"
+ /* O,x: list; -T,-t,-A take numeric param */
+- "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB"
++ "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD"
USE_FOR_MMU("b")
- IF_FEATURE_UDHCPC_ARPING("a")
+ IF_FEATURE_UDHCPC_ARPING("a::")
IF_FEATURE_UDHCP_PORT("P:")
-@@ -1316,6 +1322,9 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1389,6 +1395,10 @@
logmode |= LOGMODE_SYSLOG;
}
-+ if (opt & OPT_D)
++ if (opt & OPT_D) {
+ allow_deconfig = 0;
++ }
+
- /* Make sure fd 0,1,2 are open */
- bb_sanitize_stdio();
- /* Equivalent of doing a fflush after every \n */
-@@ -1330,7 +1339,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+ /* Create pidfile */
+ write_pidfile(client_data.pidfile);
+ /* Goes to stdout (unless NOMMU) and possibly syslog */
+@@ -1397,7 +1407,8 @@
srand(monotonic_us());
- state = INIT_SELECTING;
+ client_data.state = INIT_SELECTING;
- udhcp_run_script(NULL, "deconfig");
+ if (allow_deconfig)
+ udhcp_run_script(NULL, "deconfig");
change_listen_mode(LISTEN_RAW);
packet_num = 0;
timeout = 0;
-@@ -1484,7 +1494,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1570,7 +1581,8 @@
}
/* Timed out, enter init state */
- bb_info_msg("Lease lost, entering init state");
+ bb_info_msg("lease lost, entering init state");
- udhcp_run_script(NULL, "deconfig");
+ if (allow_deconfig)
+ udhcp_run_script(NULL, "deconfig");
- state = INIT_SELECTING;
- client_config.first_secs = 0; /* make secs field count from 0 */
+ client_data.state = INIT_SELECTING;
+ client_data.first_secs = 0; /* make secs field count from 0 */
/*timeout = 0; - already is */
-@@ -1667,7 +1678,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1762,8 +1774,10 @@
+ "(got ARP reply), declining");
send_decline(/*xid,*/ server_addr, packet.yiaddr);
- if (state != REQUESTING)
+- if (client_data.state != REQUESTING)
- udhcp_run_script(NULL, "deconfig");
++ if (client_data.state != REQUESTING) {
+ if (allow_deconfig)
+ udhcp_run_script(NULL, "deconfig");
++ }
change_listen_mode(LISTEN_RAW);
- state = INIT_SELECTING;
- client_config.first_secs = 0; /* make secs field count from 0 */
-@@ -1711,7 +1723,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
- bb_info_msg("Received DHCP NAK");
+ client_data.state = INIT_SELECTING;
+ client_data.first_secs = 0; /* make secs field count from 0 */
+@@ -1832,8 +1846,10 @@
+ /* return to init state */
+ bb_info_msg("received %s", "DHCP NAK");
udhcp_run_script(&packet, "nak");
- if (state != REQUESTING)
+- if (client_data.state != REQUESTING)
- udhcp_run_script(NULL, "deconfig");
++ if (client_data.state != REQUESTING) {
+ if (allow_deconfig)
+ udhcp_run_script(NULL, "deconfig");
++ }
change_listen_mode(LISTEN_RAW);
sleep(3); /* avoid excessive network traffic */
- state = INIT_SELECTING;
+ client_data.state = INIT_SELECTING;
diff --git a/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch b/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
deleted file mode 100644
index 7f80a1d915..0000000000
--- a/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
- http://git.busybox.net/busybox/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From 0dddbc1a59795a77679d8c5ef48a2795cb470563 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Tue, 23 Aug 2016 20:21:36 +0200
-Subject: build system: always rewrite NUM_APPLETS.h
-
-Conditional rewrite can keep NUM_APPLETS.h mtime old,
-this causes make to try to regenerate it at every invocation.
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/applet_tables.c b/applets/applet_tables.c
-index 8401a15..ef911a4 100644
---- a/applets/applet_tables.c
-+++ b/applets/applet_tables.c
-@@ -192,27 +192,28 @@ int main(int argc, char **argv)
- printf("};\n");
- #endif
- //printf("#endif /* SKIP_definitions */\n");
-+
- // printf("\n");
- // printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
-
- if (argv[2]) {
-- char line_old[80];
-- char line_new[80];
- FILE *fp;
-+ char line_new[80];
-+// char line_old[80];
-
-- line_old[0] = 0;
-- fp = fopen(argv[2], "r");
-- if (fp) {
-- fgets(line_old, sizeof(line_old), fp);
-- fclose(fp);
-- }
- sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
-- if (strcmp(line_old, line_new) != 0) {
-+// line_old[0] = 0;
-+// fp = fopen(argv[2], "r");
-+// if (fp) {
-+// fgets(line_old, sizeof(line_old), fp);
-+// fclose(fp);
-+// }
-+// if (strcmp(line_old, line_new) != 0) {
- fp = fopen(argv[2], "w");
- if (!fp)
- return 1;
- fputs(line_new, fp);
-- }
-+// }
- }
-
- return 0;
diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig
index c0459d5961..0b27fcd4b3 100644
--- a/meta/recipes-core/busybox/busybox/defconfig
+++ b/meta/recipes-core/busybox/busybox/defconfig
@@ -1,58 +1,41 @@
#
# Automatically generated make config: don't edit
-# Busybox version: 1.24.1
-# Tue Oct 31 11:00:00 2015
+# Busybox version: 1.30.1
+# Sun Feb 17 18:12:27 2019
#
CONFIG_HAVE_DOT_CONFIG=y
#
-# Busybox Settings
-#
-
-#
-# General Configuration
+# Settings
#
# CONFIG_DESKTOP is not set
# CONFIG_EXTRA_COMPAT is not set
+# CONFIG_FEDORA_COMPAT is not set
# CONFIG_INCLUDE_SUSv2 is not set
-# CONFIG_USE_PORTABLE_CODE is not set
-CONFIG_PLATFORM_LINUX=y
-CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
-# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
-# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+CONFIG_LONG_OPTS=y
CONFIG_SHOW_USAGE=y
# CONFIG_FEATURE_VERBOSE_USAGE is not set
CONFIG_FEATURE_COMPRESS_USAGE=y
-# CONFIG_FEATURE_INSTALLER is not set
-# CONFIG_INSTALL_NO_USR is not set
-# CONFIG_LOCALE_SUPPORT is not set
-# CONFIG_UNICODE_SUPPORT is not set
-# CONFIG_UNICODE_USING_LOCALE is not set
-# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
-CONFIG_SUBST_WCHAR=0
-CONFIG_LAST_SUPPORTED_WCHAR=0
-# CONFIG_UNICODE_COMBINING_WCHARS is not set
-# CONFIG_UNICODE_WIDE_WCHARS is not set
-# CONFIG_UNICODE_BIDI_SUPPORT is not set
-# CONFIG_UNICODE_NEUTRAL_TABLE is not set
-# CONFIG_UNICODE_PRESERVE_BROKEN is not set
+CONFIG_LFS=y
# CONFIG_PAM is not set
-CONFIG_FEATURE_USE_SENDFILE=y
-CONFIG_LONG_OPTS=y
CONFIG_FEATURE_DEVPTS=y
-# CONFIG_FEATURE_CLEAN_UP is not set
CONFIG_FEATURE_UTMP=y
# CONFIG_FEATURE_WTMP is not set
CONFIG_FEATURE_PIDFILE=y
CONFIG_PID_FILE_PATH="/var/run"
+CONFIG_BUSYBOX=y
+# CONFIG_FEATURE_SHOW_SCRIPT is not set
+# CONFIG_FEATURE_INSTALLER is not set
+# CONFIG_INSTALL_NO_USR is not set
CONFIG_FEATURE_SUID=y
CONFIG_FEATURE_SUID_CONFIG=y
CONFIG_FEATURE_SUID_CONFIG_QUIET=y
-# CONFIG_SELINUX is not set
# CONFIG_FEATURE_PREFER_APPLETS is not set
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+# CONFIG_SELINUX is not set
+# CONFIG_FEATURE_CLEAN_UP is not set
CONFIG_FEATURE_SYSLOG=y
-# CONFIG_FEATURE_HAVE_RPC is not set
+CONFIG_PLATFORM_LINUX=y
#
# Build Options
@@ -61,25 +44,16 @@ CONFIG_FEATURE_SYSLOG=y
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
+# CONFIG_FEATURE_LIBBUSYBOX_STATIC is not set
# CONFIG_FEATURE_INDIVIDUAL is not set
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
-CONFIG_LFS=y
CONFIG_CROSS_COMPILER_PREFIX=""
CONFIG_SYSROOT=""
CONFIG_EXTRA_CFLAGS=""
CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
-
-#
-# Debugging Options
-#
-# CONFIG_DEBUG is not set
-# CONFIG_DEBUG_PESSIMIZE is not set
-# CONFIG_UNIT_TEST is not set
-# CONFIG_WERROR is not set
-CONFIG_NO_DEBUG_LIB=y
-# CONFIG_DMALLOC is not set
-# CONFIG_EFENCE is not set
+# CONFIG_USE_PORTABLE_CODE is not set
+CONFIG_STACK_OPTIMIZATION_386=y
#
# Installation Options ("make install" behavior)
@@ -94,16 +68,33 @@ CONFIG_INSTALL_APPLET_SYMLINKS=y
CONFIG_PREFIX="./_install"
#
-# Busybox Library Tuning
+# Debugging Options
#
-CONFIG_FEATURE_SYSTEMD=y
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_PESSIMIZE is not set
+# CONFIG_DEBUG_SANITIZE is not set
+# CONFIG_UNIT_TEST is not set
+# CONFIG_WERROR is not set
+CONFIG_NO_DEBUG_LIB=y
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+
+#
+# Library Tuning
+#
+# CONFIG_FEATURE_USE_BSS_TAIL is not set
+CONFIG_FLOAT_DURATION=y
CONFIG_FEATURE_RTMINMAX=y
+# CONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS is not set
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SMALL=1
CONFIG_SHA3_SMALL=1
CONFIG_FEATURE_FAST_TOP=y
# CONFIG_FEATURE_ETC_NETWORKS is not set
-CONFIG_FEATURE_USE_TERMIOS=y
+# CONFIG_FEATURE_ETC_SERVICES is not set
CONFIG_FEATURE_EDITING=y
CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_VI is not set
@@ -114,9 +105,22 @@ CONFIG_FEATURE_EDITING_SAVEHISTORY=y
CONFIG_FEATURE_TAB_COMPLETION=y
CONFIG_FEATURE_USERNAME_COMPLETION=y
CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
+# CONFIG_FEATURE_EDITING_WINCH is not set
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
+# CONFIG_LOCALE_SUPPORT is not set
+# CONFIG_UNICODE_SUPPORT is not set
+# CONFIG_UNICODE_USING_LOCALE is not set
+# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
+CONFIG_SUBST_WCHAR=0
+CONFIG_LAST_SUPPORTED_WCHAR=0
+# CONFIG_UNICODE_COMBINING_WCHARS is not set
+# CONFIG_UNICODE_WIDE_WCHARS is not set
+# CONFIG_UNICODE_BIDI_SUPPORT is not set
+# CONFIG_UNICODE_NEUTRAL_TABLE is not set
+# CONFIG_UNICODE_PRESERVE_BROKEN is not set
CONFIG_FEATURE_NON_POSIX_CP=y
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_FEATURE_SKIP_ROOTFS=y
CONFIG_MONOTONIC_SYSCALL=y
@@ -140,76 +144,60 @@ CONFIG_FEATURE_SEAMLESS_Z=y
# CONFIG_FEATURE_AR_CREATE is not set
# CONFIG_UNCOMPRESS is not set
CONFIG_GUNZIP=y
+CONFIG_ZCAT=y
+CONFIG_FEATURE_GUNZIP_LONG_OPTIONS=y
CONFIG_BUNZIP2=y
+CONFIG_BZCAT=y
# CONFIG_UNLZMA is not set
-# CONFIG_FEATURE_LZMA_FAST is not set
+CONFIG_LZCAT=y
# CONFIG_LZMA is not set
# CONFIG_UNXZ is not set
+CONFIG_XZCAT=y
# CONFIG_XZ is not set
-# CONFIG_BZIP2 is not set
+CONFIG_BZIP2=y
+CONFIG_FEATURE_BZIP2_DECOMPRESS=y
CONFIG_CPIO=y
# CONFIG_FEATURE_CPIO_O is not set
# CONFIG_FEATURE_CPIO_P is not set
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
-# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GZIP=y
# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
CONFIG_GZIP_FAST=0
# CONFIG_FEATURE_GZIP_LEVELS is not set
+CONFIG_FEATURE_GZIP_DECOMPRESS=y
# CONFIG_LZOP is not set
+# CONFIG_UNLZOP is not set
+# CONFIG_LZOPCAT is not set
# CONFIG_LZOP_COMPR_HIGH is not set
# CONFIG_RPM is not set
# CONFIG_RPM2CPIO is not set
CONFIG_TAR=y
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
CONFIG_FEATURE_TAR_CREATE=y
CONFIG_FEATURE_TAR_AUTODETECT=y
CONFIG_FEATURE_TAR_FROM=y
CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
# CONFIG_FEATURE_TAR_TO_COMMAND is not set
# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
CONFIG_UNZIP=y
+CONFIG_FEATURE_UNZIP_CDF=y
+# CONFIG_FEATURE_UNZIP_BZIP2 is not set
+# CONFIG_FEATURE_UNZIP_LZMA is not set
+# CONFIG_FEATURE_UNZIP_XZ is not set
+# CONFIG_FEATURE_LZMA_FAST is not set
#
# Coreutils
#
CONFIG_BASENAME=y
CONFIG_CAT=y
-CONFIG_DATE=y
-# CONFIG_FEATURE_DATE_ISOFMT is not set
-# CONFIG_FEATURE_DATE_NANO is not set
-CONFIG_FEATURE_DATE_COMPAT=y
-CONFIG_DD=y
-CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
-# CONFIG_FEATURE_DD_IBS_OBS is not set
-# CONFIG_FEATURE_DD_STATUS is not set
-# CONFIG_HOSTID is not set
-CONFIG_ID=y
-CONFIG_GROUPS=y
-CONFIG_SHUF=y
-CONFIG_SYNC=y
-# CONFIG_FEATURE_SYNC_FANCY is not set
-CONFIG_TEST=y
-CONFIG_FEATURE_TEST_64=y
-CONFIG_TOUCH=y
-CONFIG_FEATURE_TOUCH_NODEREF=y
-CONFIG_FEATURE_TOUCH_SUSV3=y
-CONFIG_TR=y
-CONFIG_FEATURE_TR_CLASSES=y
-# CONFIG_FEATURE_TR_EQUIV is not set
-# CONFIG_TRUNCATE is not set
-CONFIG_UNLINK=y
-# CONFIG_BASE64 is not set
-CONFIG_WHO=y
-CONFIG_USERS=y
-# CONFIG_CAL is not set
-# CONFIG_CATV is not set
+CONFIG_FEATURE_CATN=y
+# CONFIG_FEATURE_CATV is not set
CONFIG_CHGRP=y
CONFIG_CHMOD=y
CONFIG_CHOWN=y
@@ -219,7 +207,17 @@ CONFIG_CHROOT=y
# CONFIG_COMM is not set
CONFIG_CP=y
# CONFIG_FEATURE_CP_LONG_OPTIONS is not set
+# CONFIG_FEATURE_CP_REFLINK is not set
CONFIG_CUT=y
+CONFIG_DATE=y
+# CONFIG_FEATURE_DATE_ISOFMT is not set
+# CONFIG_FEATURE_DATE_NANO is not set
+CONFIG_FEATURE_DATE_COMPAT=y
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+# CONFIG_FEATURE_DD_STATUS is not set
CONFIG_DF=y
# CONFIG_FEATURE_DF_FANCY is not set
CONFIG_DIRNAME=y
@@ -230,39 +228,55 @@ CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
CONFIG_ECHO=y
CONFIG_FEATURE_FANCY_ECHO=y
CONFIG_ENV=y
-CONFIG_FEATURE_ENV_LONG_OPTIONS=y
# CONFIG_EXPAND is not set
-# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
+# CONFIG_UNEXPAND is not set
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
+# CONFIG_FACTOR is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
# CONFIG_FSYNC is not set
CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
+# CONFIG_HOSTID is not set
+CONFIG_ID=y
+CONFIG_GROUPS=y
# CONFIG_INSTALL is not set
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+# CONFIG_LINK is not set
CONFIG_LN=y
CONFIG_LOGNAME=y
CONFIG_LS=y
CONFIG_FEATURE_LS_FILETYPES=y
CONFIG_FEATURE_LS_FOLLOWLINKS=y
CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_WIDTH=y
CONFIG_FEATURE_LS_SORTFILES=y
CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_FEATURE_LS_USERNAME=y
CONFIG_FEATURE_LS_COLOR=y
# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
CONFIG_MD5SUM=y
+# CONFIG_SHA1SUM is not set
+# CONFIG_SHA256SUM is not set
+# CONFIG_SHA512SUM is not set
+# CONFIG_SHA3SUM is not set
+
+#
+# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
CONFIG_MKDIR=y
-CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
CONFIG_MKFIFO=y
CONFIG_MKNOD=y
+CONFIG_MKTEMP=y
CONFIG_MV=y
-# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
# CONFIG_NICE is not set
+# CONFIG_NL is not set
CONFIG_NOHUP=y
+CONFIG_NPROC=y
CONFIG_OD=y
+# CONFIG_PASTE is not set
# CONFIG_PRINTENV is not set
CONFIG_PRINTF=y
CONFIG_PWD=y
@@ -271,41 +285,57 @@ CONFIG_FEATURE_READLINK_FOLLOW=y
CONFIG_REALPATH=y
CONFIG_RM=y
CONFIG_RMDIR=y
-# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
CONFIG_SEQ=y
-# CONFIG_SHA1SUM is not set
-# CONFIG_SHA256SUM is not set
-# CONFIG_SHA512SUM is not set
-# CONFIG_SHA3SUM is not set
+# CONFIG_SHRED is not set
+CONFIG_SHUF=y
CONFIG_SLEEP=y
CONFIG_FEATURE_FANCY_SLEEP=y
-# CONFIG_FEATURE_FLOAT_SLEEP is not set
CONFIG_SORT=y
CONFIG_FEATURE_SORT_BIG=y
+# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set
# CONFIG_SPLIT is not set
# CONFIG_FEATURE_SPLIT_FANCY is not set
CONFIG_STAT=y
CONFIG_FEATURE_STAT_FORMAT=y
+CONFIG_FEATURE_STAT_FILESYSTEM=y
CONFIG_STTY=y
# CONFIG_SUM is not set
+CONFIG_SYNC=y
+# CONFIG_FEATURE_SYNC_FANCY is not set
# CONFIG_TAC is not set
CONFIG_TAIL=y
CONFIG_FEATURE_FANCY_TAIL=y
CONFIG_TEE=y
# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+CONFIG_TEST=y
+CONFIG_TEST1=y
+CONFIG_TEST2=y
+CONFIG_FEATURE_TEST_64=y
+# CONFIG_TIMEOUT is not set
+CONFIG_TOUCH=y
+CONFIG_FEATURE_TOUCH_NODEREF=y
+CONFIG_FEATURE_TOUCH_SUSV3=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+# CONFIG_FEATURE_TR_EQUIV is not set
CONFIG_TRUE=y
+# CONFIG_TRUNCATE is not set
CONFIG_TTY=y
CONFIG_UNAME=y
CONFIG_UNAME_OSNAME="GNU/Linux"
-# CONFIG_UNEXPAND is not set
-# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
+# CONFIG_BB_ARCH is not set
CONFIG_UNIQ=y
+CONFIG_UNLINK=y
CONFIG_USLEEP=y
# CONFIG_UUDECODE is not set
+# CONFIG_BASE64 is not set
# CONFIG_UUENCODE is not set
CONFIG_WC=y
# CONFIG_FEATURE_WC_LARGE is not set
CONFIG_WHOAMI=y
+CONFIG_WHO=y
+# CONFIG_W is not set
+CONFIG_USERS=y
CONFIG_YES=y
#
@@ -319,30 +349,29 @@ CONFIG_FEATURE_VERBOSE=y
# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
#
-# Common options for ls, more and telnet
-#
-CONFIG_FEATURE_AUTOWIDTH=y
-
-#
# Common options for df, du, ls
#
CONFIG_FEATURE_HUMAN_READABLE=y
#
-# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
-#
-CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-
-#
# Console Utilities
#
CONFIG_CHVT=y
-# CONFIG_FGCONSOLE is not set
CONFIG_CLEAR=y
CONFIG_DEALLOCVT=y
CONFIG_DUMPKMAP=y
+# CONFIG_FGCONSOLE is not set
# CONFIG_KBD_MODE is not set
CONFIG_LOADFONT=y
+# CONFIG_SETFONT is not set
+# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
+CONFIG_DEFAULT_SETFONT_DIR=""
+
+#
+# Common options for loadfont and setfont
+#
+# CONFIG_FEATURE_LOADFONT_PSF2 is not set
+# CONFIG_FEATURE_LOADFONT_RAW is not set
CONFIG_LOADKMAP=y
CONFIG_OPENVT=y
CONFIG_RESET=y
@@ -350,33 +379,31 @@ CONFIG_RESET=y
# CONFIG_FEATURE_RESIZE_PRINT is not set
CONFIG_SETCONSOLE=y
# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
-# CONFIG_SETFONT is not set
-# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
-CONFIG_DEFAULT_SETFONT_DIR=""
# CONFIG_SETKEYCODES is not set
# CONFIG_SETLOGCONS is not set
# CONFIG_SHOWKEY is not set
#
-# Common options for loadfont and setfont
-#
-# CONFIG_FEATURE_LOADFONT_PSF2 is not set
-# CONFIG_FEATURE_LOADFONT_RAW is not set
-
-#
# Debian Utilities
#
-CONFIG_MKTEMP=y
# CONFIG_PIPE_PROGRESS is not set
CONFIG_RUN_PARTS=y
CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
CONFIG_START_STOP_DAEMON=y
-CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
CONFIG_WHICH=y
#
+# klibc-utils
+#
+# CONFIG_MINIPS is not set
+# CONFIG_NUKE is not set
+# CONFIG_RESUME is not set
+# CONFIG_RUN_INIT is not set
+
+#
# Editors
#
CONFIG_AWK=y
@@ -417,6 +444,7 @@ CONFIG_FEATURE_FIND_MTIME=y
CONFIG_FEATURE_FIND_MMIN=y
CONFIG_FEATURE_FIND_PERM=y
CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_FEATURE_FIND_EXECUTABLE=y
CONFIG_FEATURE_FIND_XDEV=y
CONFIG_FEATURE_FIND_MAXDEPTH=y
CONFIG_FEATURE_FIND_NEWER=y
@@ -430,14 +458,15 @@ CONFIG_FEATURE_FIND_DEPTH=y
CONFIG_FEATURE_FIND_PAREN=y
CONFIG_FEATURE_FIND_SIZE=y
CONFIG_FEATURE_FIND_PRUNE=y
+CONFIG_FEATURE_FIND_QUIT=y
# CONFIG_FEATURE_FIND_DELETE is not set
CONFIG_FEATURE_FIND_PATH=y
CONFIG_FEATURE_FIND_REGEX=y
# CONFIG_FEATURE_FIND_CONTEXT is not set
# CONFIG_FEATURE_FIND_LINKS is not set
CONFIG_GREP=y
-CONFIG_FEATURE_GREP_EGREP_ALIAS=y
-CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_EGREP=y
+CONFIG_FGREP=y
CONFIG_FEATURE_GREP_CONTEXT=y
CONFIG_XARGS=y
# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
@@ -445,6 +474,8 @@ CONFIG_XARGS=y
# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set
# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set
CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
+# CONFIG_FEATURE_XARGS_SUPPORT_PARALLEL is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE is not set
#
# Init Utilities
@@ -452,41 +483,45 @@ CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
# CONFIG_BOOTCHARTD is not set
# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
-CONFIG_HALT=y
+# CONFIG_HALT is not set
+# CONFIG_POWEROFF is not set
+CONFIG_REBOOT=y
+# CONFIG_FEATURE_WAIT_FOR_INIT is not set
# CONFIG_FEATURE_CALL_TELINIT is not set
-CONFIG_TELINIT_PATH=""
+# CONFIG_TELINIT_PATH is not set
# CONFIG_INIT is not set
+# CONFIG_LINUXRC is not set
# CONFIG_FEATURE_USE_INITTAB is not set
# CONFIG_FEATURE_KILL_REMOVED is not set
-CONFIG_FEATURE_KILL_DELAY=0
+# CONFIG_FEATURE_KILL_DELAY is not set
# CONFIG_FEATURE_INIT_SCTTY is not set
# CONFIG_FEATURE_INIT_SYSLOG is not set
-# CONFIG_FEATURE_EXTRA_QUIET is not set
+# CONFIG_FEATURE_INIT_QUIET is not set
# CONFIG_FEATURE_INIT_COREDUMPS is not set
-# CONFIG_FEATURE_INITRD is not set
-CONFIG_INIT_TERMINAL_TYPE=""
-CONFIG_MESG=y
-# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
+# CONFIG_INIT_TERMINAL_TYPE is not set
+# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set
#
# Login/Password Management Utilities
#
-# CONFIG_ADD_SHELL is not set
-# CONFIG_REMOVE_SHELL is not set
# CONFIG_FEATURE_SHADOWPASSWDS is not set
# CONFIG_USE_BB_PWD_GRP is not set
# CONFIG_USE_BB_SHADOW is not set
CONFIG_USE_BB_CRYPT=y
# CONFIG_USE_BB_CRYPT_SHA is not set
+# CONFIG_ADDGROUP is not set
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_ADD_SHELL is not set
+# CONFIG_REMOVE_SHELL is not set
# CONFIG_ADDUSER is not set
-# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
# CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_LAST_ID=60000
CONFIG_FIRST_SYSTEM_ID=100
CONFIG_LAST_SYSTEM_ID=999
-# CONFIG_ADDGROUP is not set
-# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
-# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_CHPASSWD is not set
+CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
+# CONFIG_CRYPTPW is not set
+# CONFIG_MKPASSWD is not set
# CONFIG_DELUSER is not set
# CONFIG_DELGROUP is not set
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
@@ -498,12 +533,10 @@ CONFIG_LAST_SYSTEM_ID=999
# CONFIG_FEATURE_SECURETTY is not set
# CONFIG_PASSWD is not set
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
-# CONFIG_CRYPTPW is not set
-# CONFIG_CHPASSWD is not set
-CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
# CONFIG_SU is not set
# CONFIG_FEATURE_SU_SYSLOG is not set
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set
# CONFIG_SULOGIN is not set
# CONFIG_VLOCK is not set
@@ -518,29 +551,29 @@ CONFIG_FSCK=y
#
# Linux Module Utilities
#
-# CONFIG_MODINFO is not set
# CONFIG_MODPROBE_SMALL is not set
-# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
-# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
+CONFIG_DEPMOD=y
CONFIG_INSMOD=y
-CONFIG_RMMOD=y
CONFIG_LSMOD=y
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
+# CONFIG_MODINFO is not set
CONFIG_MODPROBE=y
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
-CONFIG_DEPMOD=y
+CONFIG_RMMOD=y
#
# Options common to multiple modutils
#
+CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS=y
+# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
# CONFIG_FEATURE_2_4_MODULES is not set
-# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
CONFIG_FEATURE_MODUTILS_ALIAS=y
CONFIG_FEATURE_MODUTILS_SYMBOLS=y
CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
@@ -549,37 +582,23 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
#
# Linux System Utilities
#
-# CONFIG_BLOCKDEV is not set
-# CONFIG_FATATTR is not set
-CONFIG_FSTRIM=y
-# CONFIG_MDEV is not set
-# CONFIG_FEATURE_MDEV_CONF is not set
-# CONFIG_FEATURE_MDEV_RENAME is not set
-# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
-# CONFIG_FEATURE_MDEV_EXEC is not set
-# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
-CONFIG_MOUNT=y
-# CONFIG_FEATURE_MOUNT_FAKE is not set
-# CONFIG_FEATURE_MOUNT_VERBOSE is not set
-# CONFIG_FEATURE_MOUNT_HELPERS is not set
-# CONFIG_FEATURE_MOUNT_LABEL is not set
-# CONFIG_FEATURE_MOUNT_NFS is not set
-# CONFIG_FEATURE_MOUNT_CIFS is not set
-CONFIG_FEATURE_MOUNT_FLAGS=y
-CONFIG_FEATURE_MOUNT_FSTAB=y
-# CONFIG_FEATURE_MOUNT_OTHERTAB is not set
-# CONFIG_REV is not set
-# CONFIG_UEVENT is not set
# CONFIG_ACPID is not set
# CONFIG_FEATURE_ACPID_COMPAT is not set
+# CONFIG_BLKDISCARD is not set
# CONFIG_BLKID is not set
# CONFIG_FEATURE_BLKID_TYPE is not set
+# CONFIG_BLOCKDEV is not set
+# CONFIG_CAL is not set
+# CONFIG_CHRT is not set
CONFIG_DMESG=y
CONFIG_FEATURE_DMESG_PRETTY=y
+# CONFIG_EJECT is not set
+# CONFIG_FEATURE_EJECT_SCSI is not set
+# CONFIG_FALLOCATE is not set
+# CONFIG_FATATTR is not set
CONFIG_FBSET=y
CONFIG_FEATURE_FBSET_FANCY=y
CONFIG_FEATURE_FBSET_READMODE=y
-# CONFIG_FDFLUSH is not set
# CONFIG_FDFORMAT is not set
CONFIG_FDISK=y
# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
@@ -592,43 +611,89 @@ CONFIG_FEATURE_FDISK_WRITABLE=y
# CONFIG_FEATURE_FDISK_ADVANCED is not set
# CONFIG_FINDFS is not set
CONFIG_FLOCK=y
+# CONFIG_FDFLUSH is not set
# CONFIG_FREERAMDISK is not set
# CONFIG_FSCK_MINIX is not set
-# CONFIG_MKFS_EXT2 is not set
-# CONFIG_MKFS_MINIX is not set
-# CONFIG_FEATURE_MINIX2 is not set
-# CONFIG_MKFS_REISER is not set
-# CONFIG_MKFS_VFAT is not set
+# CONFIG_FSFREEZE is not set
+CONFIG_FSTRIM=y
# CONFIG_GETOPT is not set
# CONFIG_FEATURE_GETOPT_LONG is not set
CONFIG_HEXDUMP=y
# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
# CONFIG_HD is not set
+# CONFIG_XXD is not set
CONFIG_HWCLOCK=y
-CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
+# CONFIG_IONICE is not set
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
+# CONFIG_LAST is not set
+# CONFIG_FEATURE_LAST_FANCY is not set
CONFIG_LOSETUP=y
# CONFIG_LSPCI is not set
# CONFIG_LSUSB is not set
+# CONFIG_MDEV is not set
+# CONFIG_FEATURE_MDEV_CONF is not set
+# CONFIG_FEATURE_MDEV_RENAME is not set
+# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
+# CONFIG_FEATURE_MDEV_EXEC is not set
+# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
+CONFIG_MESG=y
+# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
+# CONFIG_MKE2FS is not set
+# CONFIG_MKFS_EXT2 is not set
+# CONFIG_MKFS_MINIX is not set
+# CONFIG_FEATURE_MINIX2 is not set
+# CONFIG_MKFS_REISER is not set
+# CONFIG_MKDOSFS is not set
+# CONFIG_MKFS_VFAT is not set
CONFIG_MKSWAP=y
# CONFIG_FEATURE_MKSWAP_UUID is not set
CONFIG_MORE=y
+CONFIG_MOUNT=y
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+# CONFIG_FEATURE_MOUNT_NFS is not set
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+CONFIG_FEATURE_MOUNT_FLAGS=y
+CONFIG_FEATURE_MOUNT_FSTAB=y
+# CONFIG_FEATURE_MOUNT_OTHERTAB is not set
+CONFIG_MOUNTPOINT=y
+# CONFIG_NOLOGIN is not set
+# CONFIG_NOLOGIN_DEPENDENCIES is not set
+# CONFIG_NSENTER is not set
CONFIG_PIVOT_ROOT=y
CONFIG_RDATE=y
# CONFIG_RDEV is not set
# CONFIG_READPROFILE is not set
+CONFIG_RENICE=y
+# CONFIG_REV is not set
# CONFIG_RTCWAKE is not set
# CONFIG_SCRIPT is not set
# CONFIG_SCRIPTREPLAY is not set
# CONFIG_SETARCH is not set
-CONFIG_SWAPONOFF=y
+# CONFIG_LINUX32 is not set
+# CONFIG_LINUX64 is not set
+# CONFIG_SETPRIV is not set
+# CONFIG_FEATURE_SETPRIV_DUMP is not set
+# CONFIG_FEATURE_SETPRIV_CAPABILITIES is not set
+# CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES is not set
+CONFIG_SETSID=y
+CONFIG_SWAPON=y
CONFIG_FEATURE_SWAPON_DISCARD=y
CONFIG_FEATURE_SWAPON_PRI=y
+CONFIG_SWAPOFF=y
+# CONFIG_FEATURE_SWAPONOFF_LABEL is not set
CONFIG_SWITCH_ROOT=y
+# CONFIG_TASKSET is not set
+# CONFIG_FEATURE_TASKSET_FANCY is not set
+# CONFIG_UEVENT is not set
CONFIG_UMOUNT=y
CONFIG_FEATURE_UMOUNT_ALL=y
+# CONFIG_UNSHARE is not set
+# CONFIG_WALL is not set
#
# Common options for mount/umount
@@ -637,6 +702,11 @@ CONFIG_FEATURE_MOUNT_LOOP=y
CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
# CONFIG_FEATURE_MTAB_SUPPORT is not set
# CONFIG_VOLUMEID is not set
+
+#
+# Filesystem/Volume identification
+#
+# CONFIG_FEATURE_VOLUMEID_BCACHE is not set
# CONFIG_FEATURE_VOLUMEID_BTRFS is not set
# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
# CONFIG_FEATURE_VOLUMEID_EXFAT is not set
@@ -646,9 +716,11 @@ CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
# CONFIG_FEATURE_VOLUMEID_HFS is not set
# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set
# CONFIG_FEATURE_VOLUMEID_JFS is not set
+# CONFIG_FEATURE_VOLUMEID_LFS is not set
# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set
# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set
# CONFIG_FEATURE_VOLUMEID_LUKS is not set
+# CONFIG_FEATURE_VOLUMEID_MINIX is not set
# CONFIG_FEATURE_VOLUMEID_NILFS is not set
# CONFIG_FEATURE_VOLUMEID_NTFS is not set
# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
@@ -656,48 +728,22 @@ CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set
# CONFIG_FEATURE_VOLUMEID_SYSV is not set
+# CONFIG_FEATURE_VOLUMEID_UBIFS is not set
# CONFIG_FEATURE_VOLUMEID_UDF is not set
# CONFIG_FEATURE_VOLUMEID_XFS is not set
#
# Miscellaneous Utilities
#
-# CONFIG_CONSPY is not set
-# CONFIG_CROND is not set
-# CONFIG_FEATURE_CROND_D is not set
-# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
-CONFIG_FEATURE_CROND_DIR=""
-# CONFIG_I2CGET is not set
-# CONFIG_I2CSET is not set
-# CONFIG_I2CDUMP is not set
-# CONFIG_I2CDETECT is not set
-CONFIG_LESS=y
-CONFIG_FEATURE_LESS_MAXLINES=9999999
-CONFIG_FEATURE_LESS_BRACKETS=y
-CONFIG_FEATURE_LESS_FLAGS=y
-# CONFIG_FEATURE_LESS_TRUNCATE is not set
-# CONFIG_FEATURE_LESS_MARKS is not set
-# CONFIG_FEATURE_LESS_REGEXP is not set
-# CONFIG_FEATURE_LESS_WINCH is not set
-# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set
-# CONFIG_FEATURE_LESS_DASHCMD is not set
-# CONFIG_FEATURE_LESS_LINENUMS is not set
-# CONFIG_NANDWRITE is not set
-# CONFIG_NANDDUMP is not set
-CONFIG_RFKILL=y
-# CONFIG_SETSERIAL is not set
-# CONFIG_TASKSET is not set
-# CONFIG_FEATURE_TASKSET_FANCY is not set
-# CONFIG_UBIATTACH is not set
-# CONFIG_UBIDETACH is not set
-# CONFIG_UBIMKVOL is not set
-# CONFIG_UBIRMVOL is not set
-# CONFIG_UBIRSVOL is not set
-# CONFIG_UBIUPDATEVOL is not set
-# CONFIG_WALL is not set
# CONFIG_ADJTIMEX is not set
# CONFIG_BBCONFIG is not set
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
+# CONFIG_BC is not set
+CONFIG_DC=y
+# CONFIG_FEATURE_DC_BIG is not set
+# CONFIG_FEATURE_DC_LIBM is not set
+# CONFIG_FEATURE_BC_INTERACTIVE is not set
+# CONFIG_FEATURE_BC_LONG_OPTIONS is not set
# CONFIG_BEEP is not set
CONFIG_FEATURE_BEEP_FREQ=0
CONFIG_FEATURE_BEEP_LENGTH_MS=0
@@ -709,28 +755,24 @@ CONFIG_FEATURE_BEEP_LENGTH_MS=0
# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set
# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
# CONFIG_FEATURE_CHAT_CLR_ABORT is not set
-# CONFIG_CHRT is not set
+# CONFIG_CONSPY is not set
+# CONFIG_CROND is not set
+# CONFIG_FEATURE_CROND_D is not set
+# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
+# CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set
+CONFIG_FEATURE_CROND_DIR=""
# CONFIG_CRONTAB is not set
-CONFIG_DC=y
-# CONFIG_FEATURE_DC_LIBM is not set
# CONFIG_DEVFSD is not set
# CONFIG_DEVFSD_MODLOAD is not set
# CONFIG_DEVFSD_FG_NP is not set
# CONFIG_DEVFSD_VERBOSE is not set
# CONFIG_FEATURE_DEVFS is not set
# CONFIG_DEVMEM is not set
-# CONFIG_EJECT is not set
-# CONFIG_FEATURE_EJECT_SCSI is not set
# CONFIG_FBSPLASH is not set
# CONFIG_FLASHCP is not set
+# CONFIG_FLASH_ERASEALL is not set
# CONFIG_FLASH_LOCK is not set
# CONFIG_FLASH_UNLOCK is not set
-# CONFIG_FLASH_ERASEALL is not set
-# CONFIG_IONICE is not set
-# CONFIG_INOTIFYD is not set
-# CONFIG_LAST is not set
-# CONFIG_FEATURE_LAST_SMALL is not set
-# CONFIG_FEATURE_LAST_FANCY is not set
# CONFIG_HDPARM is not set
# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
@@ -738,50 +780,63 @@ CONFIG_DC=y
# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
+# CONFIG_HEXEDIT is not set
+# CONFIG_I2CGET is not set
+# CONFIG_I2CSET is not set
+# CONFIG_I2CDUMP is not set
+# CONFIG_I2CDETECT is not set
+# CONFIG_INOTIFYD is not set
+CONFIG_LESS=y
+CONFIG_FEATURE_LESS_MAXLINES=9999999
+CONFIG_FEATURE_LESS_BRACKETS=y
+CONFIG_FEATURE_LESS_FLAGS=y
+# CONFIG_FEATURE_LESS_TRUNCATE is not set
+# CONFIG_FEATURE_LESS_MARKS is not set
+# CONFIG_FEATURE_LESS_REGEXP is not set
+# CONFIG_FEATURE_LESS_WINCH is not set
+# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set
+# CONFIG_FEATURE_LESS_DASHCMD is not set
+# CONFIG_FEATURE_LESS_LINENUMS is not set
+# CONFIG_FEATURE_LESS_RAW is not set
+# CONFIG_FEATURE_LESS_ENV is not set
+# CONFIG_LSSCSI is not set
# CONFIG_MAKEDEVS is not set
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
# CONFIG_MAN is not set
CONFIG_MICROCOM=y
-# CONFIG_MOUNTPOINT is not set
# CONFIG_MT is not set
+# CONFIG_NANDWRITE is not set
+# CONFIG_NANDDUMP is not set
+# CONFIG_PARTPROBE is not set
# CONFIG_RAIDAUTORUN is not set
# CONFIG_READAHEAD is not set
+CONFIG_RFKILL=y
# CONFIG_RUNLEVEL is not set
# CONFIG_RX is not set
-# CONFIG_SETSID is not set
+# CONFIG_SETFATTR is not set
+# CONFIG_SETSERIAL is not set
CONFIG_STRINGS=y
CONFIG_TIME=y
-# CONFIG_TIMEOUT is not set
# CONFIG_TTYSIZE is not set
+# CONFIG_UBIRENAME is not set
+# CONFIG_UBIATTACH is not set
+# CONFIG_UBIDETACH is not set
+# CONFIG_UBIMKVOL is not set
+# CONFIG_UBIRMVOL is not set
+# CONFIG_UBIRSVOL is not set
+# CONFIG_UBIUPDATEVOL is not set
# CONFIG_VOLNAME is not set
# CONFIG_WATCHDOG is not set
#
# Networking Utilities
#
-# CONFIG_NAMEIF is not set
-# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
-# CONFIG_NBDCLIENT is not set
-CONFIG_NC=y
-# CONFIG_NC_SERVER is not set
-# CONFIG_NC_EXTRA is not set
-# CONFIG_NC_110_COMPAT is not set
-CONFIG_PING=y
-CONFIG_PING6=y
-CONFIG_FEATURE_FANCY_PING=y
-CONFIG_WGET=y
-CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-CONFIG_FEATURE_WGET_TIMEOUT=y
-# CONFIG_FEATURE_WGET_OPENSSL is not set
-# CONFIG_FEATURE_WGET_SSL_HELPER is not set
-# CONFIG_WHOIS is not set
CONFIG_FEATURE_IPV6=y
# CONFIG_FEATURE_UNIX_LOCAL is not set
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+# CONFIG_FEATURE_TLS_SHA1 is not set
# CONFIG_ARP is not set
# CONFIG_ARPING is not set
# CONFIG_BRCTL is not set
@@ -789,15 +844,15 @@ CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_FEATURE_BRCTL_SHOW is not set
# CONFIG_DNSD is not set
# CONFIG_ETHER_WAKE is not set
-# CONFIG_FAKEIDENTD is not set
# CONFIG_FTPD is not set
-# CONFIG_FEATURE_FTP_WRITE is not set
+# CONFIG_FEATURE_FTPD_WRITE is not set
# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
-# CONFIG_FEATURE_FTP_AUTHENTICATION is not set
+# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set
# CONFIG_FTPGET is not set
# CONFIG_FTPPUT is not set
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
CONFIG_HOSTNAME=y
+CONFIG_DNSDOMAINNAME=y
# CONFIG_HTTPD is not set
# CONFIG_FEATURE_HTTPD_RANGES is not set
# CONFIG_FEATURE_HTTPD_SETUID is not set
@@ -818,11 +873,10 @@ CONFIG_FEATURE_IFCONFIG_HW=y
# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
# CONFIG_IFENSLAVE is not set
# CONFIG_IFPLUGD is not set
-CONFIG_IFUPDOWN=y
+CONFIG_IFUP=y
+CONFIG_IFDOWN=y
CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
-# CONFIG_FEATURE_IFUPDOWN_IP is not set
-# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
-CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+CONFIG_FEATURE_IFUPDOWN_IP=y
CONFIG_FEATURE_IFUPDOWN_IPV4=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
@@ -835,77 +889,108 @@ CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
# CONFIG_FEATURE_INETD_RPC is not set
CONFIG_IP=y
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+# CONFIG_IPRULE is not set
+# CONFIG_IPNEIGH is not set
CONFIG_FEATURE_IP_ADDRESS=y
CONFIG_FEATURE_IP_LINK=y
CONFIG_FEATURE_IP_ROUTE=y
CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
CONFIG_FEATURE_IP_TUNNEL=y
# CONFIG_FEATURE_IP_RULE is not set
-# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+# CONFIG_FEATURE_IP_NEIGH is not set
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
-# CONFIG_IPADDR is not set
-# CONFIG_IPLINK is not set
-# CONFIG_IPROUTE is not set
-# CONFIG_IPTUNNEL is not set
-# CONFIG_IPRULE is not set
# CONFIG_IPCALC is not set
-# CONFIG_FEATURE_IPCALC_FANCY is not set
# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
+# CONFIG_FEATURE_IPCALC_FANCY is not set
+# CONFIG_FAKEIDENTD is not set
+# CONFIG_NAMEIF is not set
+# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
+# CONFIG_NBDCLIENT is not set
+CONFIG_NC=y
+# CONFIG_NETCAT is not set
+# CONFIG_NC_SERVER is not set
+# CONFIG_NC_EXTRA is not set
+# CONFIG_NC_110_COMPAT is not set
CONFIG_NETSTAT=y
# CONFIG_FEATURE_NETSTAT_WIDE is not set
# CONFIG_FEATURE_NETSTAT_PRG is not set
CONFIG_NSLOOKUP=y
+# CONFIG_FEATURE_NSLOOKUP_BIG is not set
+# CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS is not set
# CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set
# CONFIG_FEATURE_NTPD_CONF is not set
+# CONFIG_FEATURE_NTP_AUTH is not set
+CONFIG_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING=y
# CONFIG_PSCAN is not set
CONFIG_ROUTE=y
# CONFIG_SLATTACH is not set
+# CONFIG_SSL_CLIENT is not set
+# CONFIG_TC is not set
+# CONFIG_FEATURE_TC_INGRESS is not set
# CONFIG_TCPSVD is not set
+# CONFIG_UDPSVD is not set
CONFIG_TELNET=y
# CONFIG_FEATURE_TELNET_TTYPE is not set
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+CONFIG_FEATURE_TELNET_WIDTH=y
# CONFIG_TELNETD is not set
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
CONFIG_TFTP=y
+# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
# CONFIG_TFTPD is not set
-
-#
-# Common options for tftp/tftpd
-#
CONFIG_FEATURE_TFTP_GET=y
CONFIG_FEATURE_TFTP_PUT=y
# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
-# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
# CONFIG_TFTP_DEBUG is not set
+CONFIG_TLS=y
CONFIG_TRACEROUTE=y
# CONFIG_TRACEROUTE6 is not set
# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
-# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
# CONFIG_TUNCTL is not set
# CONFIG_FEATURE_TUNCTL_UG is not set
-# CONFIG_UDHCPC6 is not set
+# CONFIG_VCONFIG is not set
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_TIMEOUT=y
+CONFIG_FEATURE_WGET_HTTPS=y
+# CONFIG_FEATURE_WGET_OPENSSL is not set
+# CONFIG_WHOIS is not set
+# CONFIG_ZCIP is not set
CONFIG_UDHCPD=y
-# CONFIG_DHCPRELAY is not set
-CONFIG_DUMPLEASES=y
-# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
+CONFIG_DUMPLEASES=y
+# CONFIG_DHCPRELAY is not set
CONFIG_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
+CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+# CONFIG_UDHCPC6 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set
+
+#
+# Common options for DHCP applets
+#
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=0
-# CONFIG_FEATURE_UDHCP_RFC3397 is not set
-# CONFIG_FEATURE_UDHCP_8021Q is not set
-CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
-# CONFIG_UDPSVD is not set
-# CONFIG_VCONFIG is not set
-# CONFIG_ZCIP is not set
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"
#
# Print Utilities
@@ -918,26 +1003,45 @@ CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
# Mail Utilities
#
# CONFIG_MAKEMIME is not set
-CONFIG_FEATURE_MIME_CHARSET=""
# CONFIG_POPMAILDIR is not set
# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
# CONFIG_REFORMIME is not set
# CONFIG_FEATURE_REFORMIME_COMPAT is not set
# CONFIG_SENDMAIL is not set
+CONFIG_FEATURE_MIME_CHARSET=""
#
# Process Utilities
#
+CONFIG_FREE=y
+CONFIG_FUSER=y
# CONFIG_IOSTAT is not set
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+# CONFIG_KILLALL5 is not set
# CONFIG_LSOF is not set
# CONFIG_MPSTAT is not set
# CONFIG_NMETER is not set
+# CONFIG_PGREP is not set
+# CONFIG_PKILL is not set
+CONFIG_PIDOF=y
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+# CONFIG_FEATURE_PIDOF_OMIT is not set
# CONFIG_PMAP is not set
# CONFIG_POWERTOP is not set
+# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set
+CONFIG_PS=y
+CONFIG_FEATURE_PS_WIDE=y
+CONFIG_FEATURE_PS_LONG=y
+# CONFIG_FEATURE_PS_TIME is not set
+# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
+# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
# CONFIG_PSTREE is not set
# CONFIG_PWDX is not set
# CONFIG_SMEMCAP is not set
+CONFIG_BB_SYSCTL=y
CONFIG_TOP=y
+# CONFIG_FEATURE_TOP_INTERACTIVE is not set
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
# CONFIG_FEATURE_TOP_SMP_CPU is not set
@@ -946,80 +1050,72 @@ CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
# CONFIG_FEATURE_TOPMEM is not set
CONFIG_UPTIME=y
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
-CONFIG_FREE=y
-CONFIG_FUSER=y
-CONFIG_KILL=y
-CONFIG_KILLALL=y
-# CONFIG_KILLALL5 is not set
-# CONFIG_PGREP is not set
-CONFIG_PIDOF=y
-# CONFIG_FEATURE_PIDOF_SINGLE is not set
-# CONFIG_FEATURE_PIDOF_OMIT is not set
-# CONFIG_PKILL is not set
-CONFIG_PS=y
-CONFIG_FEATURE_PS_WIDE=y
-CONFIG_FEATURE_PS_LONG=y
-# CONFIG_FEATURE_PS_TIME is not set
-# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
-# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
-CONFIG_RENICE=y
-CONFIG_BB_SYSCTL=y
-# CONFIG_FEATURE_SHOW_THREADS is not set
CONFIG_WATCH=y
+# CONFIG_FEATURE_SHOW_THREADS is not set
#
# Runit Utilities
#
+# CONFIG_CHPST is not set
+# CONFIG_SETUIDGID is not set
+# CONFIG_ENVUIDGID is not set
+# CONFIG_ENVDIR is not set
+# CONFIG_SOFTLIMIT is not set
# CONFIG_RUNSV is not set
# CONFIG_RUNSVDIR is not set
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
# CONFIG_SV is not set
CONFIG_SV_DEFAULT_SERVICE_DIR=""
+# CONFIG_SVC is not set
+# CONFIG_SVOK is not set
# CONFIG_SVLOGD is not set
-# CONFIG_CHPST is not set
-# CONFIG_SETUIDGID is not set
-# CONFIG_ENVUIDGID is not set
-# CONFIG_ENVDIR is not set
-# CONFIG_SOFTLIMIT is not set
# CONFIG_CHCON is not set
-# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set
# CONFIG_LOAD_POLICY is not set
# CONFIG_MATCHPATHCON is not set
-# CONFIG_RESTORECON is not set
# CONFIG_RUNCON is not set
-# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
# CONFIG_SELINUXENABLED is not set
+# CONFIG_SESTATUS is not set
# CONFIG_SETENFORCE is not set
# CONFIG_SETFILES is not set
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
+# CONFIG_RESTORECON is not set
# CONFIG_SETSEBOOL is not set
-# CONFIG_SESTATUS is not set
#
# Shells
#
+CONFIG_SH_IS_ASH=y
+# CONFIG_SH_IS_HUSH is not set
+# CONFIG_SH_IS_NONE is not set
+# CONFIG_BASH_IS_ASH is not set
+# CONFIG_BASH_IS_HUSH is not set
+CONFIG_BASH_IS_NONE=y
CONFIG_ASH=y
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+CONFIG_ASH_INTERNAL_GLOB=y
CONFIG_ASH_BASH_COMPAT=y
-# CONFIG_ASH_IDLE_TIMEOUT is not set
+# CONFIG_ASH_BASH_SOURCE_CURDIR is not set
+CONFIG_ASH_BASH_NOT_FOUND_HOOK=y
CONFIG_ASH_JOB_CONTROL=y
CONFIG_ASH_ALIAS=y
-CONFIG_ASH_GETOPTS=y
-CONFIG_ASH_BUILTIN_ECHO=y
-CONFIG_ASH_BUILTIN_PRINTF=y
-CONFIG_ASH_BUILTIN_TEST=y
-CONFIG_ASH_HELP=y
-# CONFIG_ASH_CMDCMD is not set
-# CONFIG_ASH_MAIL is not set
-CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
# CONFIG_ASH_RANDOM_SUPPORT is not set
CONFIG_ASH_EXPAND_PRMT=y
+# CONFIG_ASH_IDLE_TIMEOUT is not set
+# CONFIG_ASH_MAIL is not set
+CONFIG_ASH_ECHO=y
+CONFIG_ASH_PRINTF=y
+CONFIG_ASH_TEST=y
+CONFIG_ASH_HELP=y
+CONFIG_ASH_GETOPTS=y
+CONFIG_ASH_CMDCMD=y
# CONFIG_CTTYHACK is not set
# CONFIG_HUSH is not set
# CONFIG_HUSH_BASH_COMPAT is not set
# CONFIG_HUSH_BRACE_EXPANSION is not set
-# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_LINENO_VAR is not set
+# CONFIG_HUSH_BASH_SOURCE_CURDIR is not set
# CONFIG_HUSH_INTERACTIVE is not set
# CONFIG_HUSH_SAVEHISTORY is not set
# CONFIG_HUSH_JOB is not set
@@ -1030,36 +1126,43 @@ CONFIG_ASH_EXPAND_PRMT=y
# CONFIG_HUSH_FUNCTIONS is not set
# CONFIG_HUSH_LOCAL is not set
# CONFIG_HUSH_RANDOM_SUPPORT is not set
-# CONFIG_HUSH_EXPORT_N is not set
# CONFIG_HUSH_MODE_X is not set
-# CONFIG_MSH is not set
-CONFIG_FEATURE_SH_IS_ASH=y
-# CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_FEATURE_SH_IS_NONE is not set
-# CONFIG_FEATURE_BASH_IS_ASH is not set
-# CONFIG_FEATURE_BASH_IS_HUSH is not set
-CONFIG_FEATURE_BASH_IS_NONE=y
-CONFIG_SH_MATH_SUPPORT=y
-# CONFIG_SH_MATH_SUPPORT_64 is not set
+# CONFIG_HUSH_ECHO is not set
+# CONFIG_HUSH_PRINTF is not set
+# CONFIG_HUSH_TEST is not set
+# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_EXPORT is not set
+# CONFIG_HUSH_EXPORT_N is not set
+# CONFIG_HUSH_READONLY is not set
+# CONFIG_HUSH_KILL is not set
+# CONFIG_HUSH_WAIT is not set
+# CONFIG_HUSH_COMMAND is not set
+# CONFIG_HUSH_TRAP is not set
+# CONFIG_HUSH_TYPE is not set
+# CONFIG_HUSH_TIMES is not set
+# CONFIG_HUSH_READ is not set
+# CONFIG_HUSH_SET is not set
+# CONFIG_HUSH_UNSET is not set
+# CONFIG_HUSH_ULIMIT is not set
+# CONFIG_HUSH_UMASK is not set
+# CONFIG_HUSH_GETOPTS is not set
+# CONFIG_HUSH_MEMLEAK is not set
+
+#
+# Options common to all shells
+#
+CONFIG_FEATURE_SH_MATH=y
+# CONFIG_FEATURE_SH_MATH_64 is not set
CONFIG_FEATURE_SH_EXTRA_QUIET=y
# CONFIG_FEATURE_SH_STANDALONE is not set
# CONFIG_FEATURE_SH_NOFORK is not set
+# CONFIG_FEATURE_SH_READ_FRAC is not set
CONFIG_FEATURE_SH_HISTFILESIZE=y
+# CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS is not set
#
# System Logging Utilities
#
-CONFIG_SYSLOGD=y
-CONFIG_FEATURE_ROTATE_LOGFILE=y
-CONFIG_FEATURE_REMOTE_LOG=y
-CONFIG_FEATURE_SYSLOGD_DUP=y
-CONFIG_FEATURE_SYSLOGD_CFG=y
-CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
-CONFIG_FEATURE_IPC_SYSLOG=y
-CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=64
-CONFIG_LOGREAD=y
-CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
-CONFIG_FEATURE_KMSG_SYSLOG=y
CONFIG_KLOGD=y
#
@@ -1067,3 +1170,14 @@ CONFIG_KLOGD=y
#
CONFIG_FEATURE_KLOGD_KLOGCTL=y
CONFIG_LOGGER=y
+# CONFIG_LOGREAD is not set
+# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
+# CONFIG_SYSLOGD is not set
+# CONFIG_FEATURE_ROTATE_LOGFILE is not set
+# CONFIG_FEATURE_REMOTE_LOG is not set
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+# CONFIG_FEATURE_SYSLOGD_CFG is not set
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
+# CONFIG_FEATURE_KMSG_SYSLOG is not set
diff --git a/meta/recipes-core/busybox/busybox/init.cfg b/meta/recipes-core/busybox/busybox/init.cfg
index 006d4c633e..e96700682a 100644
--- a/meta/recipes-core/busybox/busybox/init.cfg
+++ b/meta/recipes-core/busybox/busybox/init.cfg
@@ -1,3 +1,8 @@
CONFIG_INIT=y
+CONFIG_RUNLEVEL=y
CONFIG_FEATURE_USE_INITTAB=y
-
+CONFIG_HALT=y
+CONFIG_POWEROFF=y
+CONFIG_FEATURE_KILL_DELAY=0
+CONFIG_TELINIT_PATH=""
+CONFIG_INIT_TERMINAL_TYPE=""
diff --git a/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch b/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
deleted file mode 100644
index 41c5656586..0000000000
--- a/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 4ab372d49a6e82b0bf097dedb96d26330c5f2d5f Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sun, 24 Apr 2016 17:39:02 +0200
-Subject: [PATCH] ip: fix problem on mips64 n64 big endian musl systems
-
-Use designated initializers for struct msghdr.
-The struct layout is non-portable and musl libc does not match what busybox expects.
-
-Signed-off-by: Szabolcs Nagy <nsz@port70.net>
-Tested-by: Waldemar Brodkorb <wbx@openadk.org>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-
-https://git.busybox.net/busybox/commit/?id=4ab372d49a6e82b0bf097dedb96d26330c5f2d5f
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/libiproute/libnetlink.c | 37 ++++++++++++++++++++++++-------------
- 1 file changed, 24 insertions(+), 13 deletions(-)
-
-diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
-index c7533a4..cbb5daf 100644
---- a/networking/libiproute/libnetlink.c
-+++ b/networking/libiproute/libnetlink.c
-@@ -71,11 +71,15 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
- struct nlmsghdr nlh;
- struct sockaddr_nl nladdr;
- struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- iov, 2,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = iov,
-+ .msg_iovlen = 2,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- memset(&nladdr, 0, sizeof(nladdr));
-@@ -104,12 +108,15 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
- while (1) {
- int status;
- struct nlmsghdr *h;
--
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- &iov, 1,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- status = recvmsg(rth->fd, &msg, 0);
-@@ -211,11 +218,15 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
- struct sockaddr_nl nladdr;
- struct iovec iov = { (void*)n, n->nlmsg_len };
- char *buf = xmalloc(8*1024); /* avoid big stack buffer */
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- &iov, 1,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- memset(&nladdr, 0, sizeof(nladdr));
---
-2.3.5
-
diff --git a/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch b/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
deleted file mode 100644
index 2e9842e5ec..0000000000
--- a/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9e5820a86277818c2f83c11c2aa76d7f0a38283e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 14 Aug 2016 02:54:27 +0200
-Subject: build system: fix include/NUM_APPLETS.h generation
-
-TBH, it's more like "work around my bad makefile-fu" than "fix"...
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- applets/Kbuild.src | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-Upstream-Status: Backport
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index b612399..5cc1827 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
-
- applets/applet_tables: .config include/applets.h
- applets/usage: .config include/applets.h
--applets/usage_pod: .config include/applet_tables.h include/applets.h
-+applets/usage_pod: .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
-
- quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -40,8 +40,5 @@ include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compress
- quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
- cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
-
--include/applet_tables.h: applets/applet_tables
-- $(call cmd,gen_applet_tables)
--
--include/NUM_APPLETS.h: applets/applet_tables
-+include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
- $(call cmd,gen_applet_tables)
---
-cgit v0.12
-
diff --git a/meta/recipes-core/busybox/busybox/musl.cfg b/meta/recipes-core/busybox/busybox/musl.cfg
index facfe85445..6fffc91098 100644
--- a/meta/recipes-core/busybox/busybox/musl.cfg
+++ b/meta/recipes-core/busybox/busybox/musl.cfg
@@ -2,7 +2,6 @@
# CONFIG_SELINUX is not set
# CONFIG_FEATURE_HAVE_RPC is not set
# CONFIG_WERROR is not set
-# CONFIG_FEATURE_SYSTEMD is not set
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
# CONFIG_PAM is not set
# CONFIG_FEATURE_INETD_RPC is not set
diff --git a/meta/recipes-core/busybox/busybox/syslog.cfg b/meta/recipes-core/busybox/busybox/syslog.cfg
new file mode 100644
index 0000000000..e2425ed80e
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/syslog.cfg
@@ -0,0 +1,11 @@
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+CONFIG_FEATURE_SYSLOGD_DUP=y
+CONFIG_FEATURE_SYSLOGD_CFG=y
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=64
+CONFIG_LOGREAD=y
+CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
+CONFIG_FEATURE_KMSG_SYSLOG=y
diff --git a/meta/recipes-core/busybox/busybox/unicode.cfg b/meta/recipes-core/busybox/busybox/unicode.cfg
new file mode 100644
index 0000000000..ecb5a64f27
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/unicode.cfg
@@ -0,0 +1,10 @@
+CONFIG_UNICODE_SUPPORT=y
+# CONFIG_UNICODE_USING_LOCALE is not set
+CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y
+CONFIG_SUBST_WCHAR=63
+CONFIG_LAST_SUPPORTED_WCHAR=767
+CONFIG_UNICODE_COMBINING_WCHARS=y
+CONFIG_UNICODE_WIDE_WCHARS=y
+# CONFIG_UNICODE_BIDI_SUPPORT is not set
+# CONFIG_UNICODE_NEUTRAL_TABLE is not set
+# CONFIG_UNICODE_PRESERVE_BROKEN is not set
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.24.1.bb
deleted file mode 100644
index df0e131266..0000000000
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-require busybox.inc
-
-SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
- file://busybox-udhcpc-no_deconfig.patch \
- file://find-touchscreen.sh \
- file://busybox-cron \
- file://busybox-httpd \
- file://busybox-udhcpd \
- file://default.script \
- file://simple.script \
- file://hwclock.sh \
- file://mount.busybox \
- file://syslog \
- file://syslog-startup.conf \
- file://syslog.conf \
- file://busybox-syslog.default \
- file://mdev \
- file://mdev.conf \
- file://mdev-mount.sh \
- file://umount.busybox \
- file://defconfig \
- file://busybox-syslog.service.in \
- file://busybox-klogd.service.in \
- file://fail_on_no_media.patch \
- file://run-ptest \
- file://inetd.conf \
- file://inetd \
- file://login-utilities.cfg \
- file://recognize_connmand.patch \
- file://busybox-cross-menuconfig.patch \
- file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
- file://busybox-1.24.1-unzip.patch \
- file://busybox-1.24.1-unzip-regression.patch \
- file://busybox-1.24.1-truncate-open-mode.patch \
- file://0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch \
- file://mount-via-label.cfg \
- file://sha1sum.cfg \
- file://sha256sum.cfg \
- file://getopts.cfg \
- file://resize.cfg \
- ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'busybox')]} \
- ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager', True) == 'busybox-mdev')]} \
- file://inittab \
- file://rcS \
- file://rcK \
- file://runlevel \
- file://CVE-2016-2148.patch \
- file://CVE-2016-2147.patch \
- file://CVE-2016-2147_2.patch \
- file://ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch \
- file://makefile-fix-backport.patch \
- file://0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch \
- file://busybox-kbuild-race-fix-commit-d8e61bb.patch \
- file://commit-applet_tables-fix-commit-0dddbc1.patch \
- file://makefile-libbb-race.patch \
-"
-SRC_URI_append_libc-musl = " file://musl.cfg "
-
-SRC_URI[tarball.md5sum] = "be98a40cadf84ce2d6b05fa41a275c6a"
-SRC_URI[tarball.sha256sum] = "37d03132cc078937360b392170b7a1d0e5b322eee9f57c0b82292a8b1f0afe3d"
diff --git a/meta/recipes-core/busybox/busybox_1.31.1.bb b/meta/recipes-core/busybox/busybox_1.31.1.bb
new file mode 100644
index 0000000000..e7618e5bfe
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox_1.31.1.bb
@@ -0,0 +1,49 @@
+require busybox.inc
+
+SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
+ file://busybox-udhcpc-no_deconfig.patch \
+ file://find-touchscreen.sh \
+ file://busybox-cron \
+ file://busybox-httpd \
+ file://busybox-udhcpd \
+ file://default.script \
+ file://simple.script \
+ file://hwclock.sh \
+ file://syslog \
+ file://syslog-startup.conf \
+ file://syslog.conf \
+ file://busybox-syslog.default \
+ file://mdev \
+ file://mdev.conf \
+ file://mdev-mount.sh \
+ file://defconfig \
+ file://busybox-syslog.service.in \
+ file://busybox-klogd.service.in \
+ file://fail_on_no_media.patch \
+ file://run-ptest \
+ file://inetd.conf \
+ file://inetd \
+ file://login-utilities.cfg \
+ file://recognize_connmand.patch \
+ file://busybox-cross-menuconfig.patch \
+ file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
+ file://mount-via-label.cfg \
+ file://sha1sum.cfg \
+ file://sha256sum.cfg \
+ file://getopts.cfg \
+ file://resize.cfg \
+ ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \
+ ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \
+ file://syslog.cfg \
+ file://unicode.cfg \
+ file://rcS \
+ file://rcK \
+ file://makefile-libbb-race.patch \
+ file://0001-testsuite-check-uudecode-before-using-it.patch \
+ file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \
+ file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \
+"
+SRC_URI_append_libc-musl = " file://musl.cfg "
+
+SRC_URI[tarball.md5sum] = "70913edaf2263a157393af07565c17f0"
+SRC_URI[tarball.sha256sum] = "d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a998"
diff --git a/meta/recipes-core/busybox/busybox_git.bb b/meta/recipes-core/busybox/busybox_git.bb
deleted file mode 100644
index c29b894349..0000000000
--- a/meta/recipes-core/busybox/busybox_git.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-require busybox.inc
-
-SRCREV = "1b7c17391de66502dd7a97c866e0a33681edbb1f"
-# Lookout for PV bump too when SRCREV is changed
-PV = "1.25.0+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-SRC_URI = "git://busybox.net/busybox.git \
- file://busybox-udhcpc-no_deconfig.patch \
- file://find-touchscreen.sh \
- file://busybox-cron \
- file://busybox-httpd \
- file://busybox-udhcpd \
- file://default.script \
- file://simple.script \
- file://hwclock.sh \
- file://mount.busybox \
- file://syslog \
- file://syslog-startup.conf \
- file://syslog.conf \
- file://busybox-syslog.default \
- file://mdev \
- file://mdev.conf \
- file://mdev-mount.sh \
- file://umount.busybox \
- file://defconfig \
- file://busybox-syslog.service.in \
- file://busybox-klogd.service.in \
- file://fail_on_no_media.patch \
- file://run-ptest \
- file://inetd.conf \
- file://inetd \
- file://login-utilities.cfg \
- file://recognize_connmand.patch \
- file://busybox-cross-menuconfig.patch \
- file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
- file://mount-via-label.cfg \
- file://sha1sum.cfg \
- file://sha256sum.cfg \
- file://getopts.cfg \
- file://resize.cfg \
- ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'busybox')]} \
- ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager', True) == 'busybox-mdev')]} \
- file://inittab \
- file://rcS \
- file://rcK \
- file://runlevel \
-"
-SRC_URI_append_libc-musl = " file://musl.cfg "
-
-DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-core/busybox/files/mdev-mount.sh b/meta/recipes-core/busybox/files/mdev-mount.sh
index b4385a157f..130e9472f3 100644
--- a/meta/recipes-core/busybox/files/mdev-mount.sh
+++ b/meta/recipes-core/busybox/files/mdev-mount.sh
@@ -25,7 +25,7 @@ case "$ACTION" in
fi
# check for full-disk partition
if [ "${DEVBASE}" = "${MDEV}" ] ; then
- if [ -d /sys/block/${DEVBASE}/${DEVBASE}*1 ] ; then
+ if [ -f /sys/block/${DEVBASE}/${DEVBASE}*1/partition ] ; then
# Partition detected, just quit
exit 0
fi
@@ -43,7 +43,7 @@ case "$ACTION" in
then
MOUNTPOINT="${MDEV_AUTOMOUNT_ROOT}/$MDEV"
mkdir -p "$MOUNTPOINT"
- mount -t auto /dev/$MDEV "$MOUNTPOINT"
+ mount -t auto /dev/$MDEV "$MOUNTPOINT" || rmdir "$MOUNTPOINT"
fi
;;
remove)
diff --git a/meta/recipes-core/busybox/files/mdev.conf b/meta/recipes-core/busybox/files/mdev.conf
index 17e93da7c3..4e9c23f14b 100644
--- a/meta/recipes-core/busybox/files/mdev.conf
+++ b/meta/recipes-core/busybox/files/mdev.conf
@@ -39,4 +39,6 @@ input/mouse.* 0:0 0660
tun[0-9]* 0:0 0660 =net/
[hs]d[a-z][0-9]? 0:0 660 */etc/mdev/mdev-mount.sh
+mmcblk[0-9]rpmb 0:0 660
+mmcblk[0-9]boot[0-9] 0:0 660
mmcblk[0-9].* 0:0 660 */etc/mdev/mdev-mount.sh
diff --git a/meta/recipes-core/busybox/files/mount.busybox b/meta/recipes-core/busybox/files/mount.busybox
deleted file mode 100755
index fef945b7b2..0000000000
--- a/meta/recipes-core/busybox/files/mount.busybox
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec /bin/busybox mount $@
diff --git a/meta/recipes-core/busybox/files/run-ptest b/meta/recipes-core/busybox/files/run-ptest
index 3608a8eb65..b19e5b5343 100644
--- a/meta/recipes-core/busybox/files/run-ptest
+++ b/meta/recipes-core/busybox/files/run-ptest
@@ -1,7 +1,9 @@
#!/bin/sh
-current_dir=$(readlink -f $0)
-export bindir=$(dirname $current_dir)
+current_path=$(readlink -f $0)
+export bindir=$(dirname $current_path)
+export PATH=$bindir/bin:$PATH
+export SKIP_KNOWN_BUGS=1
cd testsuite || exit 1
./runtest -v | sed -r 's/^(SKIPPED|UNTESTED):/SKIP:/'
diff --git a/meta/recipes-core/busybox/files/runlevel b/meta/recipes-core/busybox/files/runlevel
deleted file mode 100644
index 866f3b5945..0000000000
--- a/meta/recipes-core/busybox/files/runlevel
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# busybox init does not have LSB ( sysvinit ) like initlevels
-# so lets fake it to 5 which is what we default anyway
-# this helps with opkg post installs where it tries to invoke
-# update-rc.d ad post install step.
-# for package upgrades
-# See code in update-rc.d around line 190 where it calls runlevel
-# program
-#
-echo "5"
-
diff --git a/meta/recipes-core/busybox/files/syslog b/meta/recipes-core/busybox/files/syslog
index 89c4d12e9c..2208613e8c 100644
--- a/meta/recipes-core/busybox/files/syslog
+++ b/meta/recipes-core/busybox/files/syslog
@@ -51,6 +51,22 @@ else
SYSLOG_ARGS="-C"
fi
+waitpid ()
+{
+ pid=$1
+ # Give pid a chance to exit before we restart with a 5s timeout in 1s intervals
+ if [ -z "$pid" ]; then
+ return
+ fi
+ timeout=5;
+ while [ $timeout -gt 0 ]
+ do
+ timeout=$(( $timeout-1 ))
+ kill -0 $pid 2> /dev/null || break
+ sleep 1
+ done
+}
+
case "$1" in
start)
echo -n "Starting syslogd/klogd: "
@@ -65,7 +81,11 @@ case "$1" in
echo "done"
;;
restart)
- $0 stop
+ pid1=`pidof syslogd`
+ pid2=`pidof klogd`
+ $0 stop
+ waitpid $pid1
+ waitpid $pid2
$0 start
;;
*)
diff --git a/meta/recipes-core/busybox/files/umount.busybox b/meta/recipes-core/busybox/files/umount.busybox
deleted file mode 100755
index f3731626e6..0000000000
--- a/meta/recipes-core/busybox/files/umount.busybox
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec /bin/busybox umount $@
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch
deleted file mode 100644
index ace4bf0a76..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From b6a59b05f1fa514c6b387c9544bd63b1bfcf2eed Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 05:38:29 +0000
-Subject: [PATCH] Cover the else with __GLIBC__
-
-Fixes build errors on musl/x86
-
-| In file included from
-/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/asm/termios.h:1:0,
-| from
-/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/linux/termios.h:5,
-| from
-/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/console-tools/0.3.2-r8/console-tools-0.3.2/vttools/resizecons.c:86:
-|
-/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/asm-generic/termios.h:14:8:
-error: redefinition of 'struct winsize'
-| struct winsize {
-| ^
-| In file included from
-/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/sys/ioctl.h:7:0,
-| from
-/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/console-tools/0.3.2-r8/console-tools-0.3.2/vttools/resizecons.c:81:
-|
-/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/bits/ioctl.h:90:8:
-note: originally defined here
-| struct winsize {
-| ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- vttools/resizecons.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vttools/resizecons.c b/vttools/resizecons.c
-index f0a7055..e8753b1 100644
---- a/vttools/resizecons.c
-+++ b/vttools/resizecons.c
-@@ -81,7 +81,7 @@
- #include <sys/ioctl.h>
- #if (__GNU_LIBRARY__ >= 6)
- # include <sys/perm.h>
--#else
-+#elif defined __GLIBC__
- # include <linux/types.h>
- # include <linux/termios.h>
- #endif
---
-2.7.0
-
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch
deleted file mode 100644
index 64b5b044dd..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 0fd5dda51d68e1ec2a87e27b5ed0dff3503b4681 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 08:12:38 +0000
-Subject: [PATCH] kbdtools: Include sys/types.h for u_char and u_short
- definition
-
-on musl this gets exposed since sys/types.h is not
-included via some other indirect inclusion as is the case with glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- kbdtools/dumpkeys.c | 1 +
- kbdtools/loadkeys.y | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/kbdtools/dumpkeys.c b/kbdtools/dumpkeys.c
-index 6159d49..c19fb21 100644
---- a/kbdtools/dumpkeys.c
-+++ b/kbdtools/dumpkeys.c
-@@ -26,6 +26,7 @@
- #include <errno.h>
- #include <sysexits.h>
- #include <sys/ioctl.h>
-+#include <sys/types.h>
- #include <linux/types.h>
- #include <linux/kd.h>
- #include <linux/keyboard.h>
-diff --git a/kbdtools/loadkeys.y b/kbdtools/loadkeys.y
-index b6a8e01..4468f77 100644
---- a/kbdtools/loadkeys.y
-+++ b/kbdtools/loadkeys.y
-@@ -71,6 +71,7 @@
- #include <linux/kd.h>
- #include <linux/keyboard.h>
- #include <sys/ioctl.h>
-+#include <sys/types.h>
- #include <ctype.h>
- #include <sysexits.h>
- #include <signal.h>
---
-2.6.4
-
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/Makevars b/meta/recipes-core/console-tools/console-tools-0.3.2/Makevars
deleted file mode 100644
index 32692ab4b9..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/Makevars
+++ /dev/null
@@ -1,41 +0,0 @@
-# Makefile variables for PO directory in any package using GNU gettext.
-
-# Usually the message domain is the same as the package name.
-DOMAIN = $(PACKAGE)
-
-# These two variables depend on the location of this directory.
-subdir = po
-top_builddir = ..
-
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
-
-# This is the copyright holder that gets inserted into the header of the
-# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
-# package. (Note that the msgstr strings, extracted from the package's
-# sources, belong to the copyright holder of the package.) Translators are
-# expected to transfer the copyright for their translations to this person
-# or entity, or to disclaim their copyright. The empty string stands for
-# the public domain; in this case the translators are expected to disclaim
-# their copyright.
-COPYRIGHT_HOLDER = Free Software Foundation, Inc.
-
-# This is the email address or URL to which the translators shall report
-# bugs in the untranslated strings:
-# - Strings which are not entire sentences, see the maintainer guidelines
-# in the GNU gettext documentation, section 'Preparing Strings'.
-# - Strings which use unclear terms or require additional context to be
-# understood.
-# - Strings which make invalid assumptions about notation of date, time or
-# money.
-# - Pluralisation problems.
-# - Incorrect English spelling.
-# - Incorrect formatting.
-# It can be your email address, or a mailing list address where translators
-# can write to without being subscribed, or the URL of a web page through
-# which the translators can contact you.
-MSGID_BUGS_ADDRESS =
-
-# This is the list of locale categories, beyond LC_MESSAGES, for which the
-# message catalogs shall be used. It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/codepage.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/codepage.patch
deleted file mode 100644
index c287014767..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/codepage.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
---- console-tools-0.3.2/contrib/codepage.c~codepage
-+++ console-tools-0.3.2/contrib/codepage.c
-@@ -229,7 +229,7 @@
- return 0;
-
- fprintf(stderr, "\
--Warning: CP format is a hack!\n
-+Warning: CP format is a hack!\n\
- The files produced may or may not be usable!\n");
-
- sprintf(outfile, "%d.cp", CPEntryHeader.codepage);
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/compile.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/compile.patch
deleted file mode 100644
index c93f511950..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/compile.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Upstream-Status: Pending
-
---- console-tools-0.3.2/kbdtools/showkey.c~compile 1999-08-25 17:20:08.000000000 -0400
-+++ console-tools-0.3.2/kbdtools/showkey.c 2004-05-09 03:03:23.000000000 -0400
-@@ -264,7 +264,6 @@
- break;
- case cmd_keymap:
- printf(")\n");
-- default:
- }
- }
-
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/configure.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/configure.patch
deleted file mode 100644
index 15c100c908..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/configure.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Upstream-Status: Pending
-
---- console-tools-0.3.2/configure.in~configure
-+++ console-tools-0.3.2/configure.in
-@@ -2,13 +2,14 @@
- dnl Process this file with autoconf to produce a configure script.
-
- # Initialize
--AC_INIT(kbdtools/loadkeys.y)
-+AC_INIT
-+AC_CONFIG_SRCDIR([kbdtools/loadkeys.y])
-
- define(ct_unicodedata_default,/usr/share/unidata/UnicodeData-2.txt)
- ct_localdatadir_default=/usr/local/share # iff --enable-localdatadir without specific dir
-
- #AC_CONFIG_AUX_DIR(autoconf)
--AC_CANONICAL_SYSTEM
-+AC_CANONICAL_TARGET([])
- AM_INIT_AUTOMAKE(console-tools, 0.3.2)
-
- # Defaults
-@@ -25,7 +26,6 @@
- # i18n stuff
- ALL_LINGUAS="cs de ru ga fr"
- AM_GNU_GETTEXT
--AC_OUTPUT_COMMANDS([sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
-
- AC_DEFINE_UNQUOTED(LOCALEDIR, "/usr/share/locale")
-
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/fix-libconsole-linking.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/fix-libconsole-linking.patch
deleted file mode 100644
index be61eb846b..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/fix-libconsole-linking.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Fix the following error detected with i586-pokymllib32-linux-gcc (the
-multilib x86-64 lib32 compiler):
- ../lib/ctutils/.libs/libctutils.so: undefined reference to `get_kernel_sfm'
- collect2: error: ld returned 1 exit status
-
-It seems that libctutils.so (the library that uses get_kernel_sfm) must
-be stated before libconsole.so (the library that exports the function) when
-using multilib gcc
-
-Upstream-Status: Pending
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: console-tools-0.3.2/fontfiletools/Makefile.am
-===================================================================
---- console-tools-0.3.2.orig/fontfiletools/Makefile.am
-+++ console-tools-0.3.2/fontfiletools/Makefile.am
-@@ -10,5 +10,5 @@ EXTRA_DIST = fonts2virfont.c virfont.h
-
- # libconsole is needed by ctutils
- LDADD = ../lib/ctlocal/libctlocal.a ../lib/cfont/libcfont.la \
-- ../lib/console/libconsole.la \
-- ../lib/ctutils/libctutils.la ../lib/generic/libctgeneric.la
-+ ../lib/ctutils/libctutils.la \
-+ ../lib/console/libconsole.la ../lib/generic/libctgeneric.la
-Index: console-tools-0.3.2/vttools/Makefile.am
-===================================================================
---- console-tools-0.3.2.orig/vttools/Makefile.am
-+++ console-tools-0.3.2/vttools/Makefile.am
-@@ -7,9 +7,9 @@ bin_PROGRAMS = chvt deallocvt writevt fg
- vcstime vt-is-UTF8 openvt @RESIZECONS@
- EXTRA_PROGRAMS = resizecons
-
--LDADD = ../lib/ctlocal/libctlocal.a ../lib/console/libconsole.la \
-+LDADD = ../lib/ctlocal/libctlocal.a ../lib/ctutils/libctutils.la \
- ../lib/cfont/libcfont.la \
-- ../lib/ctutils/libctutils.la ../lib/generic/libctgeneric.la
-+ ../lib/console/libconsole.la ../lib/generic/libctgeneric.la
-
- vcstime_LDADD = ../lib/ctlocal/libctlocal.a
- screendump_LDADD = ../lib/ctlocal/libctlocal.a
-Index: console-tools-0.3.2/kbdtools/Makefile.am
-===================================================================
---- console-tools-0.3.2.orig/kbdtools/Makefile.am
-+++ console-tools-0.3.2/kbdtools/Makefile.am
-@@ -15,9 +15,9 @@ EXTRA_PROGRAMS = getkeycodes setkeycodes
- loadkeys_SOURCES = loadkeys.y analyze.l
-
- YFLAGS = -d
--LDADD = ../lib/ctlocal/libctlocal.a ../lib/console/libconsole.la \
-+LDADD = ../lib/ctlocal/libctlocal.a ../lib/ctutils/libctutils.la \
- ../lib/cfont/libcfont.la \
-- ../lib/ctutils/libctutils.la ../lib/generic/libctgeneric.la
-+ ../lib/console/libconsole.la ../lib/generic/libctgeneric.la
-
- loadkeys_LDADD = $(LDADD) @LEXLIB@
-
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/kbdrate.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/kbdrate.patch
deleted file mode 100644
index f370be8592..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/kbdrate.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Patch from Matthias Goebl <oe@m.goebl.net>
-Added via OE bugtracker: bug #478
-
-Upstream-Status: Pending
-
---- console-tools-0.3.2/kbdtools/kbd_mode.c.orig
-+++ console-tools-0.3.2/kbdtools/kbd_mode.c
-@@ -29,11 +29,16 @@
- OPT("-u --unicode ", _("UTF-8 mode (UNICODE)"));
- OPT("-s --scancode ", _("scancode mode (RAW)"));
- OPT(" --mode={8bit,keycode,unicode,scancode} ", _("set mode"));
-+ OPT("-r --rate=RATE ", _("set repeat rate (default: 33)"));
-+ OPT("-d --delay=DELAY ", _("set repeat delay (default: 250)"));
-
- OPT("-h --help ", HELPDESC);
- OPT("-V --version ", VERSIONDESC);
- }
-
-+int rate=-1;
-+int delay=-1;
-+
- static int parse_cmdline (int argc, char *argv[])
- {
- int mode = -1;
-@@ -46,11 +51,13 @@
- { "mode" , required_argument, NULL, 'm' },
- { "scancode" , no_argument, NULL, 's' },
- { "unicode" , no_argument, NULL, 'u' },
-+ { "rate" , required_argument, NULL, 'r' },
-+ { "delay" , required_argument, NULL, 'd' },
- { NULL, 0, NULL, 0 }
- };
- int c;
-
-- while ( (c = getopt_long (argc, argv, "Vhaksu", long_opts, NULL)) != EOF)
-+ while ( (c = getopt_long (argc, argv, "Vhaksur:d:", long_opts, NULL)) != EOF)
- switch (c) {
- case 'h':
- usage ();
-@@ -58,6 +65,14 @@
- case 'V':
- version ();
- exit(0);
-+ case 'r':
-+ rate = atoi(optarg);
-+ mode = -2;
-+ break;
-+ case 'd':
-+ delay = atoi(optarg);
-+ mode = -2;
-+ break;
- case 'a':
- mode = K_XLATE;
- break;
-@@ -129,6 +144,20 @@
- exit(0);
- }
-
-+ if ( rate != -1 || delay != -1 )
-+ {
-+ struct kbd_repeat kbd_rep;
-+ kbd_rep.delay = delay;
-+ kbd_rep.period = rate;
-+ if (ioctl(fd, KDKBDREP, &kbd_rep))
-+ {
-+ fprintf(stderr, progname);
-+ perror(_(": error setting keyboard repeat mode\n"));
-+ exit(1);
-+ }
-+ if(mode==-2) exit(0);
-+ }
-+
- if (ioctl(fd, KDSKBMODE, mode))
- {
- fprintf(stderr, progname);
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/lcmessage.m4 b/meta/recipes-core/console-tools/console-tools-0.3.2/lcmessage.m4
deleted file mode 100644
index 18d47a94f7..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/lcmessage.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file can be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU General Public
-# License or the GNU Library General Public License but which still want
-# to provide support for the GNU gettext functionality.
-# Please note that the actual code of the GNU gettext library is covered
-# by the GNU Library General Public License, and the rest of the GNU
-# gettext package package is covered by the GNU General Public License.
-# They are *not* in the public domain.
-
-# serial 2
-
-AC_DEFUN([AM_LC_MESSAGES],
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your <locale.h> file defines LC_MESSAGES.])
- fi
- fi])
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/no-dep-on-libfl.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/no-dep-on-libfl.patch
deleted file mode 100644
index a6735a53ff..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/no-dep-on-libfl.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-No reason to link with libfl since 'loadkeys' implements
-its own yywrap()/yylex() functions.
-
-Upstream-Status: Pending
-Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
-
-Index: console-tools-0.3.2/kbdtools/Makefile.am
-===================================================================
---- console-tools-0.3.2.orig/kbdtools/Makefile.am
-+++ console-tools-0.3.2/kbdtools/Makefile.am
-@@ -19,8 +19,6 @@ LDADD = ../lib/ctlocal/libctlocal.a ../l
- ../lib/cfont/libcfont.la \
- ../lib/console/libconsole.la ../lib/generic/libctgeneric.la
-
--loadkeys_LDADD = $(LDADD) @LEXLIB@
--
- bin_SCRIPTS = mk_modmap
-
- noinst_HEADERS = loadkeys.h
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/nodocs.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/nodocs.patch
deleted file mode 100644
index 2ed609219c..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/nodocs.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-The docs need tools we don't have to build so disable them.
-
-Also remove intl since the Makefile doesn't work with 3.82 and we
-don't want to build libintl anyway.
-
-Upstream-Status: Inappropriate [configuration]
-RP 2012/10/17
-
-Index: console-tools-0.3.2/Makefile.am
-===================================================================
---- console-tools-0.3.2.orig/Makefile.am 1999-04-15 01:33:24.000000000 +0000
-+++ console-tools-0.3.2/Makefile.am 2012-10-17 11:48:14.107069145 +0000
-@@ -1,7 +1,7 @@
- # -*- makefile -*-
- AUTOMAKE_OPTIONS = foreign
-
--SUBDIRS = lib fontfiletools vttools kbdtools screenfonttools contrib doc \
-- compat include examples po intl
-+SUBDIRS = lib fontfiletools vttools kbdtools screenfonttools contrib \
-+ compat include examples po
-
- EXTRA_DIST = BUGS RELEASE CREDITS COPYING.kbd local-scripts/* debian/* *.lsm
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch
deleted file mode 100644
index 0c95068a36..0000000000
--- a/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Fixing the locale issues isn't enough, console-tools also does a couple of
-other pretty stupid things (like FILE *f; f->_fileno instead of fileno(f)),
-
-Upstream-Status: Pending
-
---- console-tools-0.3.2/lib/cfont/fontstruct.c.ark 2005-05-22 19:12:38.000000000 +0000
-+++ console-tools-0.3.2/lib/cfont/fontstruct.c 2005-05-22 19:13:23.000000000 +0000
-@@ -50,8 +50,7 @@
- * get filesize
- */
-
-- /* FIXME: should not use _fileno ! */
-- if (fstat(fontfile->_fileno, &stbuf) == -1)
-+ if (fstat(fileno(fontfile), &stbuf) == -1)
- goto rsf_return_error;
-
- if (S_ISREG(stbuf.st_mode))
-@@ -211,8 +210,7 @@
- * get filesize
- */
-
-- /* FIXME: should not use _fileno ! */
-- if (fstat(fontfile->_fileno, &stbuf) == -1)
-+ if (fstat(fileno(fontfile), &stbuf) == -1)
- goto rfg_return_error;
-
- if (S_ISREG(stbuf.st_mode))
---- console-tools-0.3.2/lib/console/acm.c.ark 2005-05-22 19:17:15.000000000 +0000
-+++ console-tools-0.3.2/lib/console/acm.c 2005-05-22 19:17:23.000000000 +0000
-@@ -30,7 +30,7 @@
- lct_boolean parse_failed = False;
- lct_boolean is_unicode;
-
-- if (fstat(fp->_fileno, &stbuf))
-+ if (fstat(fileno(fp), &stbuf))
- perror(_("Cannot stat ACM file")), exit(1);
-
- /* first try a wg15-charmap (glibc) file format */
---- console-tools-0.3.2/include/lct/local.h.ark 2005-05-22 19:08:54.000000000 +0000
-+++ console-tools-0.3.2/include/lct/local.h 2005-05-22 19:09:12.000000000 +0000
-@@ -8,7 +8,7 @@
- #include <locale.h>
-
-
--#ifdef HAVE_LOCALE_H
-+#if defined(HAVE_LOCALE_H) && defined(HAVE_LIBINTL_H)
- # include <libintl.h>
- # define _(String) gettext (String)
- # ifdef gettext_noop
diff --git a/meta/recipes-core/console-tools/console-tools_0.3.2.bb b/meta/recipes-core/console-tools/console-tools_0.3.2.bb
deleted file mode 100644
index 1db8414cb2..0000000000
--- a/meta/recipes-core/console-tools/console-tools_0.3.2.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING.kbd;md5=9b2d91511d3d80d4d20ac6e6b0137fe9"
-SUMMARY = "Allows you to set-up and manipulate the Linux console"
-DESCRIPTION = "Provides tools that enable the set-up and manipulation of the linux console and console-font files."
-PR = "r8"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
- file://codepage.patch \
- file://configure.patch \
- file://compile.patch \
- file://kbdrate.patch \
- file://uclibc-fileno.patch \
- file://nodocs.patch \
- file://fix-libconsole-linking.patch \
- file://no-dep-on-libfl.patch \
- file://0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch \
- file://0001-Cover-the-else-with-__GLIBC__.patch \
- file://lcmessage.m4 \
- file://Makevars"
-
-SRC_URI[md5sum] = "bf21564fc38b3af853ef724babddbacd"
-SRC_URI[sha256sum] = "eea6b441672dacd251079fc85ed322e196282e0e66c16303ec64c3a2b1c126c2"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lct/files/console-tools-devel/"
-UPSTREAM_CHECK_REGEX = "/console-tools-devel/(?P<pver>(\d\d?\.)+\d\d?)/"
-
-CFLAGS_append_aarch64 = " -D_USE_TERMIOS "
-
-do_configure_prepend () {
- mkdir -p ${S}/m4
- cp ${WORKDIR}/lcmessage.m4 ${S}/m4/
- rm -f ${S}/acinclude.m4
- cp ${WORKDIR}/Makevars ${S}/po/
-}
-
-inherit autotools gettext update-alternatives
-
-ALTERNATIVE_PRIORITY = "30"
-
-bindir_progs = "chvt deallocvt fgconsole openvt"
-ALTERNATIVE_${PN} = "${bindir_progs}"
-
-RDEPENDS_${PN} = "bash"
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch
deleted file mode 100644
index 5452b46bbc..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
-
-The package is stated as being Licensed as GPLv2+.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-----
-
-When "cp -i --update old new" would do nothing because "new" is
-newer than "old", cp would nonetheless prompt for whether it is
-ok to overwrite "new". Then, regardless of the response (because
-of the --update option), cp would do nothing.
-
-The following patch eliminates the unnecessary prompt in that case.
-
-diff --git a/src/copy.c b/src/copy.c
-index b7bf73b..0e549d2 100644
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -1210,6 +1210,30 @@ copy_internal (char const *src_name, char const *dst_name,
- return false;
- }
-
-+ if (!S_ISDIR (src_mode) && x->update)
-+ {
-+ /* When preserving time stamps (but not moving within a file
-+ system), don't worry if the destination time stamp is
-+ less than the source merely because of time stamp
-+ truncation. */
-+ int options = ((x->preserve_timestamps
-+ && ! (x->move_mode
-+ && dst_sb.st_dev == src_sb.st_dev))
-+ ? UTIMECMP_TRUNCATE_SOURCE
-+ : 0);
-+
-+ if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
-+ {
-+ /* We're using --update and the destination is not older
-+ than the source, so do not copy or move. Pretend the
-+ rename succeeded, so the caller (if it's mv) doesn't
-+ end up removing the source file. */
-+ if (rename_succeeded)
-+ *rename_succeeded = true;
-+ return true;
-+ }
-+ }
-+
- /* When there is an existing destination file, we may end up
- returning early, and hence not copying/moving the file.
- This may be due to an interactive `negative' reply to the
-@@ -1302,30 +1326,6 @@ copy_internal (char const *src_name, char const *dst_name,
- return false;
- }
- }
--
-- if (x->update)
-- {
-- /* When preserving time stamps (but not moving within a file
-- system), don't worry if the destination time stamp is
-- less than the source merely because of time stamp
-- truncation. */
-- int options = ((x->preserve_timestamps
-- && ! (x->move_mode
-- && dst_sb.st_dev == src_sb.st_dev))
-- ? UTIMECMP_TRUNCATE_SOURCE
-- : 0);
--
-- if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
-- {
-- /* We're using --update and the destination is not older
-- than the source, so do not copy or move. Pretend the
-- rename succeeded, so the caller (if it's mv) doesn't
-- end up removing the source file. */
-- if (rename_succeeded)
-- *rename_succeeded = true;
-- return true;
-- }
-- }
- }
-
- if (x->move_mode)
-diff --git a/tests/mv/update b/tests/mv/update
-index 0c06024..6c3d149 100755
---- a/tests/mv/update
-+++ b/tests/mv/update
-@@ -1,7 +1,7 @@
- #!/bin/sh
- # make sure --update works as advertised
-
--# Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
-+# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
-
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
-@@ -46,11 +46,16 @@ fi
-
- fail=0
-
--for cp_or_mv in cp mv; do
-- # This is a no-op.
-- $cp_or_mv --update old new || fail=1
-- case "`cat new`" in new) ;; *) fail=1 ;; esac
-- case "`cat old`" in old) ;; *) fail=1 ;; esac
-+for interactive in '' -i; do
-+ for cp_or_mv in cp mv; do
-+ # This is a no-op, with no prompt.
-+ # With coreutils-6.9 and earlier, using --update with -i would
-+ # mistakenly elicit a prompt.
-+ $cp_or_mv $interactive --update old new < /dev/null > out 2>&1 || fail=1
-+ test -s out && fail=1
-+ case "`cat new`" in new) ;; *) fail=1 ;; esac
-+ case "`cat old`" in old) ;; *) fail=1 ;; esac
-+ done
- done
-
- # This will actually perform the rename.
---
-1.5.3.rc1.16.g9d6f
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch
deleted file mode 100644
index 88f61fa108..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-The install command doesn't over write the dangling symlink, for
-example:
-
-$ install fileA /tmp/fileA
-
-If /tmp/fileA is a dangling symlink, there would be an error:
-
-install: cannot create regular file '/tmp/fileA': File exists
-
-This is because of the following code in copy.c:
-
- if (!new_dst)
- {
- if (XSTAT (x, dst_name, &dst_sb) != 0)
- {
- if (errno != ENOENT)
- {
- error (0, errno, _("cannot stat %s"), quote (dst_name));
- return false;
- }
- else
- {
- new_dst = true;
- }
- }
-
-XSTAT() use stat() for dst_name(the dangling symlink /tmp/fileA) when
-install.c invokes it, and stat will set errno to ENOENT, and then
-new_dst will be set to true which means that /tmp/fileA doesn't exist,
-then we will create /tmp/fileA without remove it first, so the error
-comes.
-
-This is fixed in a way which adds the member cmd_install in
-struct cp_options to make sure my change only affected to the install
-command and use lstat to fix the problem.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
----
- src/copy.c | 10 +++++++++-
- src/copy.h | 3 +++
- src/install.c | 1 +
- 3 files changed, 13 insertions(+), 1 deletions(-)
-
-diff --git a/src/copy.c b/src/copy.c
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -1029,6 +1029,7 @@ copy_internal (char const *src_name, char const *dst_name,
- bool delayed_ok;
- bool copied_as_regular = false;
- bool preserve_metadata;
-+ int dst_stat_result;
-
- if (x->move_mode && rename_succeeded)
- *rename_succeeded = false;
-@@ -1069,7 +1070,14 @@ copy_internal (char const *src_name, char const *dst_name,
-
- if (!new_dst)
- {
-- if (XSTAT (x, dst_name, &dst_sb) != 0)
-+ if ( x->cmd_install && ( x->backup_type == no_backups))
-+ dst_stat_result = lstat (dst_name, &dst_sb);
-+ else
-+ {
-+ dst_stat_result = XSTAT (x, dst_name, &dst_sb);
-+ }
-+
-+ if (dst_stat_result != 0)
- {
- if (errno != ENOENT)
- {
-diff --git a/src/copy.h b/src/copy.h
---- a/src/copy.h
-+++ b/src/copy.h
-@@ -114,6 +114,9 @@ struct cp_options
- If that fails, then resort to copying. */
- bool move_mode;
-
-+ /* For the install command */
-+ bool cmd_install;
-+
- /* Whether this process has appropriate privileges to chown a file
- whose owner is not the effective user ID. */
- bool chown_privileges;
-diff --git a/src/install.c b/src/install.c
---- a/src/install.c
-+++ b/src/install.c
-@@ -149,6 +149,7 @@ cp_option_init (struct cp_options *x)
- x->hard_link = false;
- x->interactive = I_UNSPECIFIED;
- x->move_mode = false;
-+ x->cmd_install = true;
- x->chown_privileges = chown_privileges ();
- x->one_file_system = false;
- x->preserve_ownership = false;
---
-1.7.0.1
-
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-texinfo.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-texinfo.patch
deleted file mode 100644
index 3ae5a2faeb..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-texinfo.patch
+++ /dev/null
@@ -1,375 +0,0 @@
-From 170be4023bbf9e9698a709e03265945588ac8e01 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 26 Nov 2013 00:21:50 +0800
-Subject: [PATCH] doc/coreutils.texi: Use '@item' instead of '@itemx'
-
-Use '@item' instead of '@itemx' in several places, as Texinfo 5 refuses
-to process an '@itemx' that is not preceded by an '@item'. Ensure that
-node extended names in menus and sectioning are consistent, and that
-ordering and presence of nodes in menus and in the actual text are
-consistent as well.
-
-Upstream-Status: Backport [From: coreutils.7620.n7.nabble.com, bug#11828]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- doc/coreutils.texi | 82 +++++++++++++++++++++++++++---------------------------
- 1 file changed, 41 insertions(+), 41 deletions(-)
-
-diff --git a/doc/coreutils.texi b/doc/coreutils.texi
-index 588147f..2dae3fe 100644
---- a/doc/coreutils.texi
-+++ b/doc/coreutils.texi
-@@ -555,7 +555,7 @@ symbolic link to a directory. @xref{Target directory}.
- @end macro
-
- @macro optSi
--@itemx --si
-+@item --si
- @opindex --si
- @cindex SI output
- Append an SI-style abbreviation to each size, such as @samp{M} for
-@@ -578,7 +578,7 @@ Use the @option{--si} option if you prefer powers of 1000.
- @end macro
-
- @macro optStripTrailingSlashes
--@itemx @w{@kbd{--strip-trailing-slashes}}
-+@item @w{@kbd{--strip-trailing-slashes}}
- @opindex --strip-trailing-slashes
- @cindex stripping trailing slashes
- Remove any trailing slashes from each @var{source} argument.
-@@ -2496,7 +2496,7 @@ by 1048576.
- However, if @var{n} starts with a @samp{-},
- print all but the last @var{n} bytes of each file.
-
--@itemx -n @var{n}
-+@item -n @var{n}
- @itemx --lines=@var{n}
- @opindex -n
- @opindex --lines
-@@ -2633,7 +2633,7 @@ This option is the same as @option{--follow=name --retry}. That is, tail
- will attempt to reopen a file when it is removed. Should this fail, tail
- will keep trying until it becomes accessible again.
-
--@itemx --retry
-+@item --retry
- @opindex --retry
- This option is useful mainly when following by name (i.e., with
- @option{--follow=name}).
-@@ -2641,7 +2641,7 @@ Without this option, when tail encounters a file that doesn't
- exist or is otherwise inaccessible, it reports that fact and
- never checks it again.
-
--@itemx --sleep-interval=@var{number}
-+@item --sleep-interval=@var{number}
- @opindex --sleep-interval
- Change the number of seconds to wait between iterations (the default is 1.0).
- During one iteration, every specified file is checked to see if it has
-@@ -2651,7 +2651,7 @@ Historical implementations of @command{tail} have required that
- an arbitrary floating point number (using a period before any
- fractional digits).
-
--@itemx --pid=@var{pid}
-+@item --pid=@var{pid}
- @opindex --pid
- When following by name or by descriptor, you may specify the process ID,
- @var{pid}, of the sole writer of all @var{file} arguments. Then, shortly
-@@ -2674,7 +2674,7 @@ terminate until long after the real writer has terminated.
- Note that @option{--pid} cannot be supported on some systems; @command{tail}
- will print a warning if this is the case.
-
--@itemx --max-unchanged-stats=@var{n}
-+@item --max-unchanged-stats=@var{n}
- @opindex --max-unchanged-stats
- When tailing a file by name, if there have been @var{n} (default
- n=@value{DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS}) consecutive
-@@ -2686,7 +2686,7 @@ number of seconds between when tail prints the last pre-rotation lines
- and when it prints the lines that have accumulated in the new log file.
- This option is meaningful only when following by name.
-
--@itemx -n @var{n}
-+@item -n @var{n}
- @itemx --lines=@var{n}
- @opindex -n
- @opindex --lines
-@@ -2817,7 +2817,7 @@ option.
- @opindex --numeric-suffixes
- Use digits in suffixes rather than lower-case letters.
-
--@itemx --verbose
-+@item --verbose
- @opindex --verbose
- Write a diagnostic to standard error just before each output file is opened.
-
-@@ -3055,7 +3055,7 @@ Print only the newline counts.
- @opindex --max-line-length
- Print only the maximum line lengths.
-
--@itemx --files0-from=@var{FILE}
-+@item --files0-from=@var{FILE}
- @opindex --files0-from=@var{FILE}
- @cindex including files from @command{du}
- Rather than processing files named on the command line, process those
-@@ -3250,7 +3250,7 @@ an MD5 checksum inconsistent with the associated file, or if no valid
- line is found, @command{md5sum} exits with nonzero status. Otherwise,
- it exits successfully.
-
--@itemx --status
-+@item --status
- @opindex --status
- @cindex verifying MD5 checksums
- This option is useful only when verifying checksums.
-@@ -5837,7 +5837,7 @@ command line unless the @option{--dereference-command-line} (@option{-H}),
- If a command line argument specifies a symbolic link, show information
- for the file the link references rather than for the link itself.
-
--@itemx --dereference-command-line-symlink-to-dir
-+@item --dereference-command-line-symlink-to-dir
- @opindex --dereference-command-line-symlink-to-dir
- @cindex symbolic links, dereferencing
- Do not dereference symbolic links, with one exception:
-@@ -7015,15 +7015,15 @@ If specified, the @var{attribute_list} must be a comma-separated list
- of one or more of the following strings:
-
- @table @samp
--@itemx mode
-+@item mode
- Preserve the file mode bits and access control lists.
--@itemx ownership
-+@item ownership
- Preserve the owner and group. On most modern systems,
- only users with appropriate privileges may change the owner of a file,
- and ordinary users
- may preserve the group ownership of a file only if they happen to be
- a member of the desired group.
--@itemx timestamps
-+@item timestamps
- Preserve the times of last access and last modification, when possible.
- In general, it is not possible to preserve these attributes
- when the affected file is a symbolic link.
-@@ -7031,12 +7031,12 @@ However, FreeBSD now provides the @code{lutimes} function, which makes
- it possibile even for symbolic links. However, this implementation does
- not yet take advantage of that.
- @c FIXME: once we provide lutimes support, update the above.
--@itemx links
-+@item links
- Preserve in the destination files
- any links between corresponding source files.
- @c Give examples illustrating how hard links are preserved.
- @c Also, show how soft links map to hard links with -L and -H.
--@itemx all
-+@item all
- Preserve all file attributes.
- Equivalent to specifying all of the above.
- @end table
-@@ -7049,12 +7049,12 @@ mode bits of the corresponding source file, minus the bits set in the
- umask and minus the set-user-ID and set-group-ID bits.
- @xref{File permissions}.
-
--@itemx @w{@kbd{--no-preserve}=@var{attribute_list}}
-+@item @w{@kbd{--no-preserve}=@var{attribute_list}}
- @cindex file information, preserving
- Do not preserve the specified attributes. The @var{attribute_list}
- has the same form as for @option{--preserve}.
-
--@itemx --parents
-+@item --parents
- @opindex --parents
- @cindex parent directories and @command{cp}
- Form the name of each destination file by appending to the target
-@@ -7070,7 +7070,7 @@ cp --parents a/b/c existing_dir
- copies the file @file{a/b/c} to @file{existing_dir/a/b/c}, creating
- any missing intermediate directories.
-
--@itemx @w{@kbd{--reply}=@var{how}}
-+@item @w{@kbd{--reply}=@var{how}}
- @opindex --reply
- @cindex interactivity
- @c FIXME: remove in 2008
-@@ -7742,7 +7742,7 @@ Prompt whether to overwrite each existing destination file, regardless
- of its permissions.
- If the response is not affirmative, the file is skipped.
-
--@itemx @w{@kbd{--reply}=@var{how}}
-+@item @w{@kbd{--reply}=@var{how}}
- @opindex --reply
- @cindex interactivity
- @c FIXME: remove in 2008
-@@ -7847,7 +7847,7 @@ files are named or if a recursive removal is requested. Ignore any
- previous @option{--force} (@option{-f}) option. Equivalent to
- @option{--interactive=once}.
-
--@itemx --interactive [=@var{when}]
-+@item --interactive [=@var{when}]
- @opindex --interactive
- Specify when to issue an interactive prompt. @var{when} may be
- omitted, or one of:
-@@ -7866,7 +7866,7 @@ removal is requested. Equivalent to @option{-I}.
- Specifying @option{--interactive} and no @var{when} is equivalent to
- @option{--interactive=always}.
-
--@itemx --one-file-system
-+@item --one-file-system
- @opindex --one-file-system
- @cindex one file system, restricting @command{rm} to
- When removing a hierarchy recursively, skip any directory that is on a
-@@ -7884,7 +7884,7 @@ warn about and skip directories on other file systems.
- Of course, this will not save your @file{/home} if it and your
- chroot happen to be on the same file system.
-
--@itemx --preserve-root
-+@item --preserve-root
- @opindex --preserve-root
- @cindex root directory, disallow recursive destruction
- Fail upon any attempt to remove the root directory, @file{/},
-@@ -7892,7 +7892,7 @@ when used with the @option{--recursive} option.
- This is the default behavior.
- @xref{Treating / specially}.
-
--@itemx --no-preserve-root
-+@item --no-preserve-root
- @opindex --no-preserve-root
- @cindex root directory, allow recursive destruction
- Do not treat @file{/} specially when removing recursively.
-@@ -8874,7 +8874,7 @@ actually changes.
- Do not print error messages about files whose ownership cannot be
- changed.
-
--@itemx @w{@kbd{--from}=@var{old-owner}}
-+@item @w{@kbd{--from}=@var{old-owner}}
- @opindex --from
- @cindex symbolic links, changing owner
- Change a @var{file}'s ownership only if it has current attributes specified
-@@ -8928,14 +8928,14 @@ is a symbolic link.
- By default, no diagnostic is issued for symbolic links encountered
- during a recursive traversal, but see @option{--verbose}.
-
--@itemx --preserve-root
-+@item --preserve-root
- @opindex --preserve-root
- @cindex root directory, disallow recursive modification
- Fail upon any attempt to recursively change the root directory, @file{/}.
- Without @option{--recursive}, this option has no effect.
- @xref{Treating / specially}.
-
--@itemx --no-preserve-root
-+@item --no-preserve-root
- @opindex --no-preserve-root
- @cindex root directory, allow recursive modification
- Cancel the effect of any preceding @option{--preserve-root} option.
-@@ -9054,14 +9054,14 @@ is a symbolic link.
- By default, no diagnostic is issued for symbolic links encountered
- during a recursive traversal, but see @option{--verbose}.
-
--@itemx --preserve-root
-+@item --preserve-root
- @opindex --preserve-root
- @cindex root directory, disallow recursive modification
- Fail upon any attempt to recursively change the root directory, @file{/}.
- Without @option{--recursive}, this option has no effect.
- @xref{Treating / specially}.
-
--@itemx --no-preserve-root
-+@item --no-preserve-root
- @opindex --no-preserve-root
- @cindex root directory, allow recursive modification
- Cancel the effect of any preceding @option{--preserve-root} option.
-@@ -9175,14 +9175,14 @@ actually changes.
- Do not print error messages about files whose permissions cannot be
- changed.
-
--@itemx --preserve-root
-+@item --preserve-root
- @opindex --preserve-root
- @cindex root directory, disallow recursive modification
- Fail upon any attempt to recursively change the root directory, @file{/}.
- Without @option{--recursive}, this option has no effect.
- @xref{Treating / specially}.
-
--@itemx --no-preserve-root
-+@item --no-preserve-root
- @opindex --no-preserve-root
- @cindex root directory, allow recursive modification
- Cancel the effect of any preceding @option{--preserve-root} option.
-@@ -9603,7 +9603,7 @@ The program accepts the following options. Also see @ref{Common options}.
- @opindex --all
- Show counts for all files, not just directories.
-
--@itemx --apparent-size
-+@item --apparent-size
- @opindex --apparent-size
- Print apparent sizes, rather than disk usage. The apparent size of a
- file is the number of bytes reported by @code{wc -c} on regular files,
-@@ -9654,7 +9654,7 @@ Does not affect other symbolic links. This is helpful for finding
- out the disk usage of directories, such as @file{/usr/tmp}, which
- are often symbolic links.
-
--@itemx --files0-from=@var{FILE}
-+@item --files0-from=@var{FILE}
- @opindex --files0-from=@var{FILE}
- @cindex including files from @command{du}
- Rather than processing files named on the command line, process those
-@@ -9733,7 +9733,7 @@ Output a null byte at the end of each line, rather than a newline.
- This option enables other programs to parse the output of @command{du}
- even when that output would contain file names with embedded newlines.
-
--@itemx --si
-+@item --si
- @opindex --si
- @cindex SI output
- Append an SI-style abbreviation to each size, such as @samp{MB} for
-@@ -9754,13 +9754,13 @@ Display only a total for each argument.
- Report the size of each directory separately, not including the sizes
- of subdirectories.
-
--@itemx --time
-+@item --time
- @opindex --time
- @cindex last modified dates, displaying in @command{du}
- Show time of the most recent modification of any file in the directory,
- or any of its subdirectories.
-
--@itemx --time=ctime
-+@item --time=ctime
- @itemx --time=status
- @itemx --time=use
- @opindex --time
-@@ -9770,7 +9770,7 @@ or any of its subdirectories.
- Show the most recent status change time (the @samp{ctime} in the inode) of
- any file in the directory, instead of the modification time.
-
--@itemx --time=atime
-+@item --time=atime
- @itemx --time=access
- @opindex --time
- @opindex atime@r{, show the most recent}
-@@ -9911,7 +9911,7 @@ $ stat --format=%d:%i / /usr
- 2057:2
- @end example
-
--@itemx --printf=@var{format}
-+@item --printf=@var{format}
- @opindex --printf=@var{format}
- @cindex output format
- Use @var{format} rather than the default format.
-@@ -12240,7 +12240,7 @@ Overrides all other options.
- @opindex -s
- Ignored; for compatibility with other versions of @command{who}.
-
--@itemx -u
-+@item -u
- @opindex -u
- @cindex idle time
- After the login time, print the number of hours and minutes that the
-@@ -12254,7 +12254,7 @@ user has been idle. @samp{.} means the user was active in the last minute.
- List only the entries that correspond to processes via which the
- system is waiting for a user to login. The user name is always @samp{LOGIN}.
-
--@itemx --lookup
-+@item --lookup
- @opindex --lookup
- Attempt to canonicalize hostnames found in utmp through a DNS lookup. This
- is not the default because it can cause significant delays on systems with
---
-1.8.3.1
-
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch
deleted file mode 100644
index 653722348a..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch
+++ /dev/null
@@ -1,4051 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
-
-The package is stated as being Licensed as GPLv2+.
-
-The comment indicates that the purpose is lin18nux/lsb compliance.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
---- /dev/null 2007-03-01 09:16:39.219409909 +0000
-+++ coreutils-6.8+/tests/sort/sort-mb-tests 2007-03-01 15:08:24.000000000 +0000
-@@ -0,0 +1,58 @@
-+#! /bin/sh
-+case $# in
-+ 0) xx='../../src/sort';;
-+ *) xx="$1";;
-+esac
-+test "$VERBOSE" && echo=echo || echo=:
-+$echo testing program: $xx
-+errors=0
-+test "$srcdir" || srcdir=.
-+test "$VERBOSE" && $xx --version 2> /dev/null
-+
-+export LC_ALL=en_US.UTF-8
-+locale -k LC_CTYPE 2>&1 | grep -q charmap.*UTF-8 || exit 77
-+errors=0
-+
-+$xx -t ï¼  -k2 -n mb1.I > mb1.O
-+code=$?
-+if test $code != 0; then
-+ $echo "Test mb1 failed: $xx return code $code differs from expected value 0" 1>&2
-+ errors=`expr $errors + 1`
-+else
-+ cmp mb1.O $srcdir/mb1.X > /dev/null 2>&1
-+ case $? in
-+ 0) if test "$VERBOSE"; then $echo "passed mb1"; fi;;
-+ 1) $echo "Test mb1 failed: files mb1.O and $srcdir/mb1.X differ" 1>&2
-+ (diff -c mb1.O $srcdir/mb1.X) 2> /dev/null
-+ errors=`expr $errors + 1`;;
-+ 2) $echo "Test mb1 may have failed." 1>&2
-+ $echo The command "cmp mb1.O $srcdir/mb1.X" failed. 1>&2
-+ errors=`expr $errors + 1`;;
-+ esac
-+fi
-+
-+$xx -t ï¼  -k4 -n mb2.I > mb2.O
-+code=$?
-+if test $code != 0; then
-+ $echo "Test mb2 failed: $xx return code $code differs from expected value 0" 1>&2
-+ errors=`expr $errors + 1`
-+else
-+ cmp mb2.O $srcdir/mb2.X > /dev/null 2>&1
-+ case $? in
-+ 0) if test "$VERBOSE"; then $echo "passed mb2"; fi;;
-+ 1) $echo "Test mb2 failed: files mb2.O and $srcdir/mb2.X differ" 1>&2
-+ (diff -c mb2.O $srcdir/mb2.X) 2> /dev/null
-+ errors=`expr $errors + 1`;;
-+ 2) $echo "Test mb2 may have failed." 1>&2
-+ $echo The command "cmp mb2.O $srcdir/mb2.X" failed. 1>&2
-+ errors=`expr $errors + 1`;;
-+ esac
-+fi
-+
-+if test $errors = 0; then
-+ $echo Passed all 113 tests. 1>&2
-+else
-+ $echo Failed $errors tests. 1>&2
-+fi
-+test $errors = 0 || errors=1
-+exit $errors
---- /dev/null 2007-03-01 09:16:39.219409909 +0000
-+++ coreutils-6.8+/tests/sort/mb2.I 2007-03-01 15:08:24.000000000 +0000
-@@ -0,0 +1,4 @@
-+Apple@AA10@@20
-+Banana@AA5@@30
-+Citrus@AA20@@5
-+Cherry@AA30@@10
---- /dev/null 2007-03-01 09:16:39.219409909 +0000
-+++ coreutils-6.8+/tests/sort/mb2.X 2007-03-01 15:08:24.000000000 +0000
-@@ -0,0 +1,4 @@
-+Citrus@AA20@@5
-+Cherry@AA30@@10
-+Apple@AA10@@20
-+Banana@AA5@@30
---- /dev/null 2007-03-01 09:16:39.219409909 +0000
-+++ coreutils-6.8+/tests/sort/mb1.I 2007-03-01 15:08:24.000000000 +0000
-@@ -0,0 +1,4 @@
-+Appleï¼ 10
-+Bananaï¼ 5
-+Citrusï¼ 20
-+Cherryï¼ 30
---- /dev/null 2007-03-01 09:16:39.219409909 +0000
-+++ coreutils-6.8+/tests/sort/mb1.X 2007-03-01 15:08:24.000000000 +0000
-@@ -0,0 +1,4 @@
-+Bananaï¼ 5
-+Appleï¼ 10
-+Citrusï¼ 20
-+Cherryï¼ 30
---- coreutils-6.8+/tests/sort/Makefile.am.i18n 2007-01-24 07:47:37.000000000 +0000
-+++ coreutils-6.8+/tests/sort/Makefile.am 2007-03-01 15:09:59.000000000 +0000
-@@ -66,15 +66,17 @@
- bigfield.O bigfield.E
- ##test-files-end
-
--EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
--noinst_SCRIPTS = $x-tests
-+run_gen += mb1.0 mb2.0
-+
-+EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen) mb1.I mb1.X mb2.I mb2.X
-+noinst_SCRIPTS = $x-tests # $x-mb-tests
- TESTS_ENVIRONMENT = \
- CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \
- PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
-
- editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,$(srcdir),g'
-
--TESTS = $x-tests
-+TESTS = $x-tests $x-mb-tests
-
- mk_script = $(srcdir)/../mk-script
- $(srcdir)/$x-tests: $(mk_script) Test.pm Makefile.am
---- coreutils-6.8+/lib/linebuffer.h.i18n 2005-05-14 07:44:24.000000000 +0100
-+++ coreutils-6.8+/lib/linebuffer.h 2007-03-01 15:08:24.000000000 +0000
-@@ -22,6 +22,11 @@
-
- # include <stdio.h>
-
-+/* Get mbstate_t. */
-+# if HAVE_WCHAR_H
-+# include <wchar.h>
-+# endif
-+
- /* A `struct linebuffer' holds a line of text. */
-
- struct linebuffer
-@@ -29,6 +34,9 @@
- size_t size; /* Allocated. */
- size_t length; /* Used. */
- char *buffer;
-+# if HAVE_WCHAR_H
-+ mbstate_t state;
-+# endif
- };
-
- /* Initialize linebuffer LINEBUFFER for use. */
---- coreutils-6.8+/src/expand.c.i18n 2007-01-14 15:41:28.000000000 +0000
-+++ coreutils-6.8+/src/expand.c 2007-03-01 15:08:24.000000000 +0000
-@@ -38,11 +38,28 @@
- #include <stdio.h>
- #include <getopt.h>
- #include <sys/types.h>
-+
-+/* Get mbstate_t, mbrtowc(), wcwidth(). */
-+#if HAVE_WCHAR_H
-+# include <wchar.h>
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "quote.h"
- #include "xstrndup.h"
-
-+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
-+ installation; work around this configuration error. */
-+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
-+# define MB_LEN_MAX 16
-+#endif
-+
-+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
-+#if HAVE_MBRTOWC && defined mbstate_t
-+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
-+#endif
-+
- /* The official name of this program (e.g., no `g' prefix). */
- #define PROGRAM_NAME "expand"
-
-@@ -183,6 +200,7 @@
- stops = num_start + len - 1;
- }
- }
-+
- else
- {
- error (0, 0, _("tab size contains invalid character(s): %s"),
-@@ -365,6 +383,142 @@
- }
- }
-
-+#if HAVE_MBRTOWC
-+static void
-+expand_multibyte (void)
-+{
-+ FILE *fp; /* Input strem. */
-+ mbstate_t i_state; /* Current shift state of the input stream. */
-+ mbstate_t i_state_bak; /* Back up the I_STATE. */
-+ mbstate_t o_state; /* Current shift state of the output stream. */
-+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
-+ char *bufpos; /* Next read position of BUF. */
-+ size_t buflen = 0; /* The length of the byte sequence in buf. */
-+ wchar_t wc; /* A gotten wide character. */
-+ size_t mblength; /* The byte size of a multibyte character
-+ which shows as same character as WC. */
-+ int tab_index = 0; /* Index in `tab_list' of next tabstop. */
-+ int column = 0; /* Column on screen of the next char. */
-+ int next_tab_column; /* Column the next tab stop is on. */
-+ int convert = 1; /* If nonzero, perform translations. */
-+
-+ fp = next_file ((FILE *) NULL);
-+ if (fp == NULL)
-+ return;
-+
-+ memset (&o_state, '\0', sizeof(mbstate_t));
-+ memset (&i_state, '\0', sizeof(mbstate_t));
-+
-+ for (;;)
-+ {
-+ /* Refill the buffer BUF. */
-+ if (buflen < MB_LEN_MAX && !feof(fp) && !ferror(fp))
-+ {
-+ memmove (buf, bufpos, buflen);
-+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, fp);
-+ bufpos = buf;
-+ }
-+
-+ /* No character is left in BUF. */
-+ if (buflen < 1)
-+ {
-+ fp = next_file (fp);
-+
-+ if (fp == NULL)
-+ break; /* No more files. */
-+ else
-+ {
-+ memset (&i_state, '\0', sizeof(mbstate_t));
-+ continue;
-+ }
-+ }
-+
-+ /* Get a wide character. */
-+ i_state_bak = i_state;
-+ mblength = mbrtowc (&wc, bufpos, buflen, &i_state);
-+
-+ switch (mblength)
-+ {
-+ case (size_t)-1: /* illegal byte sequence. */
-+ case (size_t)-2:
-+ mblength = 1;
-+ i_state = i_state_bak;
-+ if (convert)
-+ {
-+ ++column;
-+ if (convert_entire_line == 0)
-+ convert = 0;
-+ }
-+ putchar (*bufpos);
-+ break;
-+
-+ case 0: /* null. */
-+ mblength = 1;
-+ if (convert && convert_entire_line == 0)
-+ convert = 0;
-+ putchar ('\0');
-+ break;
-+
-+ default:
-+ if (wc == L'\n') /* LF. */
-+ {
-+ tab_index = 0;
-+ column = 0;
-+ convert = 1;
-+ putchar ('\n');
-+ }
-+ else if (wc == L'\t' && convert) /* Tab. */
-+ {
-+ if (tab_size == 0)
-+ {
-+ /* Do not let tab_index == first_free_tab;
-+ stop when it is 1 less. */
-+ while (tab_index < first_free_tab - 1
-+ && column >= tab_list[tab_index])
-+ tab_index++;
-+ next_tab_column = tab_list[tab_index];
-+ if (tab_index < first_free_tab - 1)
-+ tab_index++;
-+ if (column >= next_tab_column)
-+ next_tab_column = column + 1;
-+ }
-+ else
-+ next_tab_column = column + tab_size - column % tab_size;
-+
-+ while (column < next_tab_column)
-+ {
-+ putchar (' ');
-+ ++column;
-+ }
-+ }
-+ else /* Others. */
-+ {
-+ if (convert)
-+ {
-+ if (wc == L'\b')
-+ {
-+ if (column > 0)
-+ --column;
-+ }
-+ else
-+ {
-+ int width; /* The width of WC. */
-+
-+ width = wcwidth (wc);
-+ column += (width > 0) ? width : 0;
-+ if (convert_entire_line == 0)
-+ convert = 0;
-+ }
-+ }
-+ fwrite (bufpos, sizeof(char), mblength, stdout);
-+ }
-+ }
-+ buflen -= mblength;
-+ bufpos += mblength;
-+ }
-+}
-+#endif
-+
- int
- main (int argc, char **argv)
- {
-@@ -429,7 +583,12 @@
-
- file_list = (optind < argc ? &argv[optind] : stdin_argv);
-
-- expand ();
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ expand_multibyte ();
-+ else
-+#endif
-+ expand ();
-
- if (have_read_stdin && fclose (stdin) != 0)
- error (EXIT_FAILURE, errno, "-");
---- coreutils-6.8+/src/join.c.i18n 2007-01-14 15:41:28.000000000 +0000
-+++ coreutils-6.8+/src/join.c 2007-03-01 15:08:24.000000000 +0000
-@@ -23,16 +23,30 @@
- #include <sys/types.h>
- #include <getopt.h>
-
-+/* Get mbstate_t, mbrtowc(), mbrtowc(), wcwidth(). */
-+#if HAVE_WCHAR_H
-+# include <wchar.h>
-+#endif
-+
-+/* Get iswblank(), towupper. */
-+#if HAVE_WCTYPE_H
-+# include <wctype.h>
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "hard-locale.h"
- #include "linebuffer.h"
--#include "memcasecmp.h"
- #include "quote.h"
- #include "stdio--.h"
- #include "xmemcoll.h"
- #include "xstrtol.h"
-
-+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
-+#if HAVE_MBRTOWC && defined mbstate_t
-+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
-+#endif
-+
- /* The official name of this program (e.g., no `g' prefix). */
- #define PROGRAM_NAME "join"
-
-@@ -104,10 +118,12 @@
- /* Last element in `outlist', where a new element can be added. */
- static struct outlist *outlist_end = &outlist_head;
-
--/* Tab character separating fields. If negative, fields are separated
-- by any nonempty string of blanks, otherwise by exactly one
-- tab character whose value (when cast to unsigned char) equals TAB. */
--static int tab = -1;
-+/* Tab character separating fields. If NULL, fields are separated
-+ by any nonempty string of blanks. */
-+static char *tab = NULL;
-+
-+/* The number of bytes used for tab. */
-+static size_t tablen = 0;
-
- static struct option const longopts[] =
- {
-@@ -190,6 +206,8 @@
-
- /* Fill in the `fields' structure in LINE. */
-
-+/* Fill in the `fields' structure in LINE. */
-+
- static void
- xfields (struct line *line)
- {
-@@ -199,10 +217,11 @@
- if (ptr == lim)
- return;
-
-- if (0 <= tab)
-+ if (tab != NULL)
- {
-+ unsigned char t = tab[0];
- char *sep;
-- for (; (sep = memchr (ptr, tab, lim - ptr)) != NULL; ptr = sep + 1)
-+ for (; (sep = memchr (ptr, t, lim - ptr)) != NULL; ptr = sep + 1)
- extract_field (line, ptr, sep - ptr);
- }
- else
-@@ -229,6 +248,148 @@
- extract_field (line, ptr, lim - ptr);
- }
-
-+#if HAVE_MBRTOWC
-+static void
-+xfields_multibyte (struct line *line)
-+{
-+ char *ptr = line->buf.buffer;
-+ char const *lim = ptr + line->buf.length - 1;
-+ wchar_t wc = 0;
-+ size_t mblength = 1;
-+ mbstate_t state, state_bak;
-+
-+ memset (&state, 0, sizeof (mbstate_t));
-+
-+ if (ptr == lim)
-+ return;
-+
-+ if (tab != NULL)
-+ {
-+ unsigned char t = tab[0];
-+ char *sep = ptr;
-+ for (; ptr < lim; ptr = sep + mblength)
-+ {
-+ sep = ptr;
-+ while (sep < lim)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
-+
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ if (mblength == tablen && !memcmp (sep, tab, mblength))
-+ break;
-+ else
-+ {
-+ sep += mblength;
-+ continue;
-+ }
-+ }
-+
-+ if (sep == lim)
-+ break;
-+
-+ extract_field (line, ptr, sep - ptr);
-+ }
-+ }
-+ else
-+ {
-+ /* Skip leading blanks before the first field. */
-+ while(ptr < lim)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
-+
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ if (!iswblank(wc))
-+ break;
-+ ptr += mblength;
-+ }
-+
-+ do
-+ {
-+ char *sep;
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ sep = ptr + mblength;
-+ while (sep != lim)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ if (iswblank (wc))
-+ break;
-+
-+ sep += mblength;
-+ }
-+
-+ extract_field (line, ptr, sep - ptr);
-+ if (sep == lim)
-+ return;
-+
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ ptr = sep + mblength;
-+ while (ptr != lim)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ if (!iswblank (wc))
-+ break;
-+
-+ ptr += mblength;
-+ }
-+ }
-+ while (ptr != lim);
-+ }
-+
-+ extract_field (line, ptr, lim - ptr);
-+}
-+#endif
-+
- /* Read a line from FP into LINE and split it into fields.
- Return true if successful. */
-
-@@ -249,6 +410,11 @@
- line->nfields_allocated = 0;
- line->nfields = 0;
- line->fields = NULL;
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ xfields_multibyte (line);
-+ else
-+#endif
- xfields (line);
- return true;
- }
-@@ -303,56 +469,114 @@
- keycmp (struct line const *line1, struct line const *line2)
- {
- /* Start of field to compare in each file. */
-- char *beg1;
-- char *beg2;
--
-- size_t len1;
-- size_t len2; /* Length of fields to compare. */
-+ char *beg[2];
-+ char *copy[2];
-+ size_t len[2]; /* Length of fields to compare. */
- int diff;
-+ int i, j;
-
- if (join_field_1 < line1->nfields)
- {
-- beg1 = line1->fields[join_field_1].beg;
-- len1 = line1->fields[join_field_1].len;
-+ beg[0] = line1->fields[join_field_1].beg;
-+ len[0] = line1->fields[join_field_1].len;
- }
- else
- {
-- beg1 = NULL;
-- len1 = 0;
-+ beg[0] = NULL;
-+ len[0] = 0;
- }
-
- if (join_field_2 < line2->nfields)
- {
-- beg2 = line2->fields[join_field_2].beg;
-- len2 = line2->fields[join_field_2].len;
-+ beg[1] = line2->fields[join_field_2].beg;
-+ len[1] = line2->fields[join_field_2].len;
- }
- else
- {
-- beg2 = NULL;
-- len2 = 0;
-+ beg[1] = NULL;
-+ len[1] = 0;
- }
-
-- if (len1 == 0)
-- return len2 == 0 ? 0 : -1;
-- if (len2 == 0)
-+ if (len[0] == 0)
-+ return len[1] == 0 ? 0 : -1;
-+ if (len[1] == 0)
- return 1;
-
- if (ignore_case)
- {
-- /* FIXME: ignore_case does not work with NLS (in particular,
-- with multibyte chars). */
-- diff = memcasecmp (beg1, beg2, MIN (len1, len2));
-+#ifdef HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ size_t mblength;
-+ wchar_t wc, uwc;
-+ mbstate_t state, state_bak;
-+
-+ memset (&state, '\0', sizeof (mbstate_t));
-+
-+ for (i = 0; i < 2; i++)
-+ {
-+ copy[i] = alloca (len[i] + 1);
-+
-+ for (j = 0; j < MIN (len[0], len[1]);)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, beg[i] + j, len[i] - j, &state);
-+
-+ switch (mblength)
-+ {
-+ case (size_t) -1:
-+ case (size_t) -2:
-+ state = state_bak;
-+ /* Fall through */
-+ case 0:
-+ mblength = 1;
-+ break;
-+
-+ default:
-+ uwc = towupper (wc);
-+
-+ if (uwc != wc)
-+ {
-+ mbstate_t state_wc;
-+
-+ memset (&state_wc, '\0', sizeof (mbstate_t));
-+ wcrtomb (copy[i] + j, uwc, &state_wc);
-+ }
-+ else
-+ memcpy (copy[i] + j, beg[i] + j, mblength);
-+ }
-+ j += mblength;
-+ }
-+ copy[i][j] = '\0';
-+ }
-+ }
-+ else
-+#endif
-+ {
-+ for (i = 0; i < 2; i++)
-+ {
-+ copy[i] = alloca (len[i] + 1);
-+
-+ for (j = 0; j < MIN (len[0], len[1]); j++)
-+ copy[i][j] = toupper (beg[i][j]);
-+
-+ copy[i][j] = '\0';
-+ }
-+ }
- }
- else
- {
-- if (hard_LC_COLLATE)
-- return xmemcoll (beg1, len1, beg2, len2);
-- diff = memcmp (beg1, beg2, MIN (len1, len2));
-+ copy[0] = (unsigned char *) beg[0];
-+ copy[1] = (unsigned char *) beg[1];
- }
-
-+ if (hard_LC_COLLATE)
-+ return xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]);
-+ diff = memcmp (copy[0], copy[1], MIN (len[0], len[1]));
-+
- if (diff)
- return diff;
-- return len1 < len2 ? -1 : len1 != len2;
-+ return len[0] - len[1];
- }
-
- /* Print field N of LINE if it exists and is nonempty, otherwise
-@@ -377,11 +601,18 @@
-
- /* Print the join of LINE1 and LINE2. */
-
-+#define PUT_TAB_CHAR \
-+ do \
-+ { \
-+ (tab != NULL) ? \
-+ fwrite(tab, sizeof(char), tablen, stdout) : putchar (' '); \
-+ } \
-+ while (0)
-+
- static void
- prjoin (struct line const *line1, struct line const *line2)
- {
- const struct outlist *outlist;
-- char output_separator = tab < 0 ? ' ' : tab;
-
- outlist = outlist_head.next;
- if (outlist)
-@@ -397,12 +628,12 @@
- if (o->file == 0)
- {
- if (line1 == &uni_blank)
-- {
-+ {
- line = line2;
- field = join_field_2;
- }
- else
-- {
-+ {
- line = line1;
- field = join_field_1;
- }
-@@ -416,7 +647,7 @@
- o = o->next;
- if (o == NULL)
- break;
-- putchar (output_separator);
-+ PUT_TAB_CHAR;
- }
- putchar ('\n');
- }
-@@ -434,23 +665,23 @@
- prfield (join_field_1, line1);
- for (i = 0; i < join_field_1 && i < line1->nfields; ++i)
- {
-- putchar (output_separator);
-+ PUT_TAB_CHAR;
- prfield (i, line1);
- }
- for (i = join_field_1 + 1; i < line1->nfields; ++i)
- {
-- putchar (output_separator);
-+ PUT_TAB_CHAR;
- prfield (i, line1);
- }
-
- for (i = 0; i < join_field_2 && i < line2->nfields; ++i)
- {
-- putchar (output_separator);
-+ PUT_TAB_CHAR;
- prfield (i, line2);
- }
- for (i = join_field_2 + 1; i < line2->nfields; ++i)
- {
-- putchar (output_separator);
-+ PUT_TAB_CHAR;
- prfield (i, line2);
- }
- putchar ('\n');
-@@ -859,20 +1090,41 @@
-
- case 't':
- {
-- unsigned char newtab = optarg[0];
-- if (! newtab)
-+ char *newtab;
-+ size_t newtablen;
-+ if (! optarg[0])
- error (EXIT_FAILURE, 0, _("empty tab"));
-- if (optarg[1])
-+ newtab = xstrdup (optarg);
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ mbstate_t state;
-+
-+ memset (&state, 0, sizeof (mbstate_t));
-+ newtablen = mbrtowc (NULL, newtab,
-+ strnlen (newtab, MB_LEN_MAX),
-+ &state);
-+ if (newtablen == (size_t) 0
-+ || newtablen == (size_t) -1
-+ || newtablen == (size_t) -2)
-+ newtablen = 1;
-+ }
-+ else
-+#endif
-+ newtablen = 1;
-+
-+ if (newtablen == 1 && newtab[1])
-+ {
-+ if (STREQ (newtab, "\\0"))
-+ newtab[0] = '\0';
-+ }
-+ if (tab != NULL && strcmp (tab, newtab))
- {
-- if (STREQ (optarg, "\\0"))
-- newtab = '\0';
-- else
-- error (EXIT_FAILURE, 0, _("multi-character tab %s"),
-- quote (optarg));
-+ free (newtab);
-+ error (EXIT_FAILURE, 0, _("incompatible tabs"));
- }
-- if (0 <= tab && tab != newtab)
-- error (EXIT_FAILURE, 0, _("incompatible tabs"));
- tab = newtab;
-+ tablen = newtablen;
- }
- break;
-
---- coreutils-6.8+/src/uniq.c.i18n 2007-01-14 15:41:28.000000000 +0000
-+++ coreutils-6.8+/src/uniq.c 2007-03-01 15:08:24.000000000 +0000
-@@ -23,6 +23,16 @@
- #include <getopt.h>
- #include <sys/types.h>
-
-+/* Get mbstate_t, mbrtowc(). */
-+#if HAVE_WCHAR_H
-+# include <wchar.h>
-+#endif
-+
-+/* Get isw* functions. */
-+#if HAVE_WCTYPE_H
-+# include <wctype.h>
-+#endif
-+
- #include "system.h"
- #include "argmatch.h"
- #include "linebuffer.h"
-@@ -32,7 +42,19 @@
- #include "quote.h"
- #include "xmemcoll.h"
- #include "xstrtol.h"
--#include "memcasecmp.h"
-+#include "xmemcoll.h"
-+
-+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
-+ installation; work around this configuration error. */
-+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
-+# define MB_LEN_MAX 16
-+#endif
-+
-+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
-+#if HAVE_MBRTOWC && defined mbstate_t
-+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
-+#endif
-+
-
- /* The official name of this program (e.g., no `g' prefix). */
- #define PROGRAM_NAME "uniq"
-@@ -109,6 +131,10 @@
- /* Select whether/how to delimit groups of duplicate lines. */
- static enum delimit_method delimit_groups;
-
-+/* Function pointers. */
-+static char *
-+(*find_field) (struct linebuffer *line);
-+
- static struct option const longopts[] =
- {
- {"count", no_argument, NULL, 'c'},
-@@ -198,7 +224,7 @@
- return a pointer to the beginning of the line's field to be compared. */
-
- static char *
--find_field (const struct linebuffer *line)
-+find_field_uni (struct linebuffer *line)
- {
- size_t count;
- char *lp = line->buffer;
-@@ -219,6 +245,83 @@
- return lp + i;
- }
-
-+#if HAVE_MBRTOWC
-+
-+# define MBCHAR_TO_WCHAR(WC, MBLENGTH, LP, POS, SIZE, STATEP, CONVFAIL) \
-+ do \
-+ { \
-+ mbstate_t state_bak; \
-+ \
-+ CONVFAIL = 0; \
-+ state_bak = *STATEP; \
-+ \
-+ MBLENGTH = mbrtowc (&WC, LP + POS, SIZE - POS, STATEP); \
-+ \
-+ switch (MBLENGTH) \
-+ { \
-+ case (size_t)-2: \
-+ case (size_t)-1: \
-+ *STATEP = state_bak; \
-+ CONVFAIL++; \
-+ /* Fall through */ \
-+ case 0: \
-+ MBLENGTH = 1; \
-+ } \
-+ } \
-+ while (0)
-+
-+static char *
-+find_field_multi (struct linebuffer *line)
-+{
-+ size_t count;
-+ char *lp = line->buffer;
-+ size_t size = line->length - 1;
-+ size_t pos;
-+ size_t mblength;
-+ wchar_t wc;
-+ mbstate_t *statep;
-+ int convfail;
-+
-+ pos = 0;
-+ statep = &(line->state);
-+
-+ /* skip fields. */
-+ for (count = 0; count < skip_fields && pos < size; count++)
-+ {
-+ while (pos < size)
-+ {
-+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail);
-+
-+ if (convfail || !iswblank (wc))
-+ {
-+ pos += mblength;
-+ break;
-+ }
-+ pos += mblength;
-+ }
-+
-+ while (pos < size)
-+ {
-+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail);
-+
-+ if (!convfail && iswblank (wc))
-+ break;
-+
-+ pos += mblength;
-+ }
-+ }
-+
-+ /* skip fields. */
-+ for (count = 0; count < skip_chars && pos < size; count++)
-+ {
-+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail);
-+ pos += mblength;
-+ }
-+
-+ return lp + pos;
-+}
-+#endif
-+
- /* Return false if two strings OLD and NEW match, true if not.
- OLD and NEW point not to the beginnings of the lines
- but rather to the beginnings of the fields to compare.
-@@ -227,6 +330,8 @@
- static bool
- different (char *old, char *new, size_t oldlen, size_t newlen)
- {
-+ char *copy_old, *copy_new;
-+
- if (check_chars < oldlen)
- oldlen = check_chars;
- if (check_chars < newlen)
-@@ -234,14 +339,92 @@
-
- if (ignore_case)
- {
-- /* FIXME: This should invoke strcoll somehow. */
-- return oldlen != newlen || memcasecmp (old, new, oldlen);
-+ size_t i;
-+
-+ copy_old = alloca (oldlen + 1);
-+ copy_new = alloca (oldlen + 1);
-+
-+ for (i = 0; i < oldlen; i++)
-+ {
-+ copy_old[i] = toupper (old[i]);
-+ copy_new[i] = toupper (new[i]);
-+ }
- }
-- else if (hard_LC_COLLATE)
-- return xmemcoll (old, oldlen, new, newlen) != 0;
- else
-- return oldlen != newlen || memcmp (old, new, oldlen);
-+ {
-+ copy_old = (char *)old;
-+ copy_new = (char *)new;
-+ }
-+
-+ return xmemcoll (copy_old, oldlen, copy_new, newlen);
-+}
-+
-+#if HAVE_MBRTOWC
-+static int
-+different_multi (const char *old, const char *new, size_t oldlen, size_t newlen, mbstate_t oldstate, mbstate_t newstate)
-+{
-+ size_t i, j, chars;
-+ const char *str[2];
-+ char *copy[2];
-+ size_t len[2];
-+ mbstate_t state[2];
-+ size_t mblength;
-+ wchar_t wc, uwc;
-+ mbstate_t state_bak;
-+
-+ str[0] = old;
-+ str[1] = new;
-+ len[0] = oldlen;
-+ len[1] = newlen;
-+ state[0] = oldstate;
-+ state[1] = newstate;
-+
-+ for (i = 0; i < 2; i++)
-+ {
-+ copy[i] = alloca (len[i] + 1);
-+
-+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)
-+ {
-+ state_bak = state[i];
-+ mblength = mbrtowc (&wc, str[i] + j, len[i] - j, &(state[i]));
-+
-+ switch (mblength)
-+ {
-+ case (size_t)-1:
-+ case (size_t)-2:
-+ state[i] = state_bak;
-+ /* Fall through */
-+ case 0:
-+ mblength = 1;
-+ break;
-+
-+ default:
-+ if (ignore_case)
-+ {
-+ uwc = towupper (wc);
-+
-+ if (uwc != wc)
-+ {
-+ mbstate_t state_wc;
-+
-+ memset (&state_wc, '\0', sizeof(mbstate_t));
-+ wcrtomb (copy[i] + j, uwc, &state_wc);
-+ }
-+ else
-+ memcpy (copy[i] + j, str[i] + j, mblength);
-+ }
-+ else
-+ memcpy (copy[i] + j, str[i] + j, mblength);
-+ }
-+ j += mblength;
-+ }
-+ copy[i][j] = '\0';
-+ len[i] = j;
-+ }
-+
-+ return xmemcoll (copy[0], len[0], copy[1], len[1]);
- }
-+#endif
-
- /* Output the line in linebuffer LINE to standard output
- provided that the switches say it should be output.
-@@ -295,15 +478,43 @@
- {
- char *prevfield IF_LINT (= NULL);
- size_t prevlen IF_LINT (= 0);
-+#if HAVE_MBRTOWC
-+ mbstate_t prevstate;
-+
-+ memset (&prevstate, '\0', sizeof (mbstate_t));
-+#endif
-
- while (!feof (stdin))
- {
- char *thisfield;
- size_t thislen;
-+#if HAVE_MBRTOWC
-+ mbstate_t thisstate;
-+#endif
-+
- if (readlinebuffer (thisline, stdin) == 0)
- break;
- thisfield = find_field (thisline);
- thislen = thisline->length - 1 - (thisfield - thisline->buffer);
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ thisstate = thisline->state;
-+
-+ if (prevline->length == 0 || different_multi
-+ (thisfield, prevfield, thislen, prevlen, thisstate, prevstate))
-+ {
-+ fwrite (thisline->buffer, sizeof (char),
-+ thisline->length, stdout);
-+
-+ SWAP_LINES (prevline, thisline);
-+ prevfield = thisfield;
-+ prevlen = thislen;
-+ prevstate = thisstate;
-+ }
-+ }
-+ else
-+#endif
- if (prevline->length == 0
- || different (thisfield, prevfield, thislen, prevlen))
- {
-@@ -322,17 +533,26 @@
- size_t prevlen;
- uintmax_t match_count = 0;
- bool first_delimiter = true;
-+#if HAVE_MBRTOWC
-+ mbstate_t prevstate;
-+#endif
-
- if (readlinebuffer (prevline, stdin) == 0)
- goto closefiles;
- prevfield = find_field (prevline);
- prevlen = prevline->length - 1 - (prevfield - prevline->buffer);
-+#if HAVE_MBRTOWC
-+ prevstate = prevline->state;
-+#endif
-
- while (!feof (stdin))
- {
- bool match;
- char *thisfield;
- size_t thislen;
-+#if HAVE_MBRTOWC
-+ mbstate_t thisstate;
-+#endif
- if (readlinebuffer (thisline, stdin) == 0)
- {
- if (ferror (stdin))
-@@ -341,6 +561,15 @@
- }
- thisfield = find_field (thisline);
- thislen = thisline->length - 1 - (thisfield - thisline->buffer);
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ thisstate = thisline->state;
-+ match = !different_multi (thisfield, prevfield,
-+ thislen, prevlen, thisstate, prevstate);
-+ }
-+ else
-+#endif
- match = !different (thisfield, prevfield, thislen, prevlen);
- match_count += match;
-
-@@ -373,6 +602,9 @@
- SWAP_LINES (prevline, thisline);
- prevfield = thisfield;
- prevlen = thislen;
-+#if HAVE_MBRTOWC
-+ prevstate = thisstate;
-+#endif
- if (!match)
- match_count = 0;
- }
-@@ -417,6 +649,19 @@
-
- atexit (close_stdout);
-
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ find_field = find_field_multi;
-+ }
-+ else
-+#endif
-+ {
-+ find_field = find_field_uni;
-+ }
-+
-+
-+
- skip_chars = 0;
- skip_fields = 0;
- check_chars = SIZE_MAX;
---- coreutils-6.8+/src/fold.c.i18n 2007-02-23 12:01:47.000000000 +0000
-+++ coreutils-6.8+/src/fold.c 2007-03-01 15:08:24.000000000 +0000
-@@ -23,11 +23,33 @@
- #include <getopt.h>
- #include <sys/types.h>
-
-+/* Get mbstate_t, mbrtowc(), wcwidth(). */
-+#if HAVE_WCHAR_H
-+# include <wchar.h>
-+#endif
-+
-+/* Get iswprint(), iswblank(), wcwidth(). */
-+#if HAVE_WCTYPE_H
-+# include <wctype.h>
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "quote.h"
- #include "xstrtol.h"
-
-+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
-+ installation; work around this configuration error. */
-+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
-+# undef MB_LEN_MAX
-+# define MB_LEN_MAX 16
-+#endif
-+
-+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
-+#if HAVE_MBRTOWC && defined mbstate_t
-+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
-+#endif
-+
- #define TAB_WIDTH 8
-
- /* The official name of this program (e.g., no `g' prefix). */
-@@ -35,23 +57,44 @@
-
- #define AUTHORS "David MacKenzie"
-
-+#define FATAL_ERROR(Message) \
-+ do \
-+ { \
-+ error (0, 0, (Message)); \
-+ usage (2); \
-+ } \
-+ while (0)
-+
-+enum operating_mode
-+{
-+ /* Fold texts by columns that are at the given positions. */
-+ column_mode,
-+
-+ /* Fold texts by bytes that are at the given positions. */
-+ byte_mode,
-+
-+ /* Fold texts by characters that are at the given positions. */
-+ character_mode,
-+};
-+
- /* The name this program was run with. */
- char *program_name;
-
-+/* The argument shows current mode. (Default: column_mode) */
-+static enum operating_mode operating_mode;
-+
- /* If nonzero, try to break on whitespace. */
- static bool break_spaces;
-
--/* If nonzero, count bytes, not column positions. */
--static bool count_bytes;
--
- /* If nonzero, at least one of the files we read was standard input. */
- static bool have_read_stdin;
-
--static char const shortopts[] = "bsw:0::1::2::3::4::5::6::7::8::9::";
-+static char const shortopts[] = "bcsw:0::1::2::3::4::5::6::7::8::9::";
-
- static struct option const longopts[] =
- {
- {"bytes", no_argument, NULL, 'b'},
-+ {"characters", no_argument, NULL, 'c'},
- {"spaces", no_argument, NULL, 's'},
- {"width", required_argument, NULL, 'w'},
- {GETOPT_HELP_OPTION_DECL},
-@@ -81,6 +124,7 @@
- "), stdout);
- fputs (_("\
- -b, --bytes count bytes rather than columns\n\
-+ -c, --characters count characters rather than columns\n\
- -s, --spaces break at spaces\n\
- -w, --width=WIDTH use WIDTH columns instead of 80\n\
- "), stdout);
-@@ -98,7 +142,7 @@
- static size_t
- adjust_column (size_t column, char c)
- {
-- if (!count_bytes)
-+ if (operating_mode != byte_mode)
- {
- if (c == '\b')
- {
-@@ -121,30 +165,14 @@
- to stdout, with maximum line length WIDTH.
- Return true if successful. */
-
--static bool
--fold_file (char const *filename, size_t width)
-+static void
-+fold_text (FILE *istream, size_t width, int *saved_errno)
- {
-- FILE *istream;
- int c;
- size_t column = 0; /* Screen column where next char will go. */
- size_t offset_out = 0; /* Index in `line_out' for next char. */
- static char *line_out = NULL;
- static size_t allocated_out = 0;
-- int saved_errno;
--
-- if (STREQ (filename, "-"))
-- {
-- istream = stdin;
-- have_read_stdin = true;
-- }
-- else
-- istream = fopen (filename, "r");
--
-- if (istream == NULL)
-- {
-- error (0, errno, "%s", filename);
-- return false;
-- }
-
- while ((c = getc (istream)) != EOF)
- {
-@@ -172,6 +200,15 @@
- bool found_blank = false;
- size_t logical_end = offset_out;
-
-+ /* If LINE_OUT has no wide character,
-+ put a new wide character in LINE_OUT
-+ if column is bigger than width. */
-+ if (offset_out == 0)
-+ {
-+ line_out[offset_out++] = c;
-+ continue;
-+ }
-+
- /* Look for the last blank. */
- while (logical_end)
- {
-@@ -218,11 +255,225 @@
- line_out[offset_out++] = c;
- }
-
-- saved_errno = errno;
-+ *saved_errno = errno;
-+
-+ if (offset_out)
-+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
-+
-+ free(line_out);
-+}
-+
-+#if HAVE_MBRTOWC
-+static void
-+fold_multibyte_text (FILE *istream, size_t width, int *saved_errno)
-+{
-+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
-+ size_t buflen = 0; /* The length of the byte sequence in buf. */
-+ char *bufpos; /* Next read position of BUF. */
-+ wint_t wc; /* A gotten wide character. */
-+ size_t mblength; /* The byte size of a multibyte character which shows
-+ as same character as WC. */
-+ mbstate_t state, state_bak; /* State of the stream. */
-+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
-+
-+ char *line_out = NULL;
-+ size_t offset_out = 0; /* Index in `line_out' for next char. */
-+ size_t allocated_out = 0;
-+
-+ int increment;
-+ size_t column = 0;
-+
-+ size_t last_blank_pos;
-+ size_t last_blank_column;
-+ int is_blank_seen;
-+ int last_blank_increment;
-+ int is_bs_following_last_blank;
-+ size_t bs_following_last_blank_num;
-+ int is_cr_after_last_blank;
-+
-+#define CLEAR_FLAGS \
-+ do \
-+ { \
-+ last_blank_pos = 0; \
-+ last_blank_column = 0; \
-+ is_blank_seen = 0; \
-+ is_bs_following_last_blank = 0; \
-+ bs_following_last_blank_num = 0; \
-+ is_cr_after_last_blank = 0; \
-+ } \
-+ while (0)
-+
-+#define START_NEW_LINE \
-+ do \
-+ { \
-+ putchar ('\n'); \
-+ column = 0; \
-+ offset_out = 0; \
-+ CLEAR_FLAGS; \
-+ } \
-+ while (0)
-+
-+ CLEAR_FLAGS;
-+ memset (&state, '\0', sizeof(mbstate_t));
-+
-+ for (;; bufpos += mblength, buflen -= mblength)
-+ {
-+ if (buflen < MB_LEN_MAX && !feof (istream) && !ferror (istream))
-+ {
-+ memmove (buf, bufpos, buflen);
-+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, istream);
-+ bufpos = buf;
-+ }
-+
-+ if (buflen < 1)
-+ break;
-+
-+ /* Get a wide character. */
-+ convfail = 0;
-+ state_bak = state;
-+ mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &state);
-+
-+ switch (mblength)
-+ {
-+ case (size_t)-1:
-+ case (size_t)-2:
-+ convfail++;
-+ state = state_bak;
-+ /* Fall through. */
-+
-+ case 0:
-+ mblength = 1;
-+ break;
-+ }
-+
-+rescan:
-+ if (operating_mode == byte_mode) /* byte mode */
-+ increment = mblength;
-+ else if (operating_mode == character_mode) /* character mode */
-+ increment = 1;
-+ else /* column mode */
-+ {
-+ if (convfail)
-+ increment = 1;
-+ else
-+ {
-+ switch (wc)
-+ {
-+ case L'\n':
-+ fwrite (line_out, sizeof(char), offset_out, stdout);
-+ START_NEW_LINE;
-+ continue;
-+
-+ case L'\b':
-+ increment = (column > 0) ? -1 : 0;
-+ break;
-+
-+ case L'\r':
-+ increment = -1 * column;
-+ break;
-+
-+ case L'\t':
-+ increment = 8 - column % 8;
-+ break;
-+
-+ default:
-+ increment = wcwidth (wc);
-+ increment = (increment < 0) ? 0 : increment;
-+ }
-+ }
-+ }
-+
-+ if (column + increment > width && break_spaces && last_blank_pos)
-+ {
-+ fwrite (line_out, sizeof(char), last_blank_pos, stdout);
-+ putchar ('\n');
-+
-+ offset_out = offset_out - last_blank_pos;
-+ column = column - last_blank_column + ((is_cr_after_last_blank)
-+ ? last_blank_increment : bs_following_last_blank_num);
-+ memmove (line_out, line_out + last_blank_pos, offset_out);
-+ CLEAR_FLAGS;
-+ goto rescan;
-+ }
-+
-+ if (column + increment > width && column != 0)
-+ {
-+ fwrite (line_out, sizeof(char), offset_out, stdout);
-+ START_NEW_LINE;
-+ goto rescan;
-+ }
-+
-+ if (allocated_out < offset_out + mblength)
-+ {
-+ allocated_out += 1024;
-+ line_out = xrealloc (line_out, allocated_out);
-+ }
-+
-+ memcpy (line_out + offset_out, bufpos, mblength);
-+ offset_out += mblength;
-+ column += increment;
-+
-+ if (is_blank_seen && !convfail && wc == L'\r')
-+ is_cr_after_last_blank = 1;
-+
-+ if (is_bs_following_last_blank && !convfail && wc == L'\b')
-+ ++bs_following_last_blank_num;
-+ else
-+ is_bs_following_last_blank = 0;
-+
-+ if (break_spaces && !convfail && iswblank (wc))
-+ {
-+ last_blank_pos = offset_out;
-+ last_blank_column = column;
-+ is_blank_seen = 1;
-+ last_blank_increment = increment;
-+ is_bs_following_last_blank = 1;
-+ bs_following_last_blank_num = 0;
-+ is_cr_after_last_blank = 0;
-+ }
-+ }
-+
-+ *saved_errno = errno;
-
- if (offset_out)
- fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
-
-+ free(line_out);
-+}
-+#endif
-+
-+/* Fold file FILENAME, or standard input if FILENAME is "-",
-+ to stdout, with maximum line length WIDTH.
-+ Return 0 if successful, 1 if an error occurs. */
-+
-+static bool
-+fold_file (char *filename, size_t width)
-+{
-+ FILE *istream;
-+ int saved_errno;
-+
-+ if (STREQ (filename, "-"))
-+ {
-+ istream = stdin;
-+ have_read_stdin = 1;
-+ }
-+ else
-+ istream = fopen (filename, "r");
-+
-+ if (istream == NULL)
-+ {
-+ error (0, errno, "%s", filename);
-+ return 1;
-+ }
-+
-+ /* Define how ISTREAM is being folded. */
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ fold_multibyte_text (istream, width, &saved_errno);
-+ else
-+#endif
-+ fold_text (istream, width, &saved_errno);
-+
- if (ferror (istream))
- {
- error (0, saved_errno, "%s", filename);
-@@ -255,7 +506,8 @@
-
- atexit (close_stdout);
-
-- break_spaces = count_bytes = have_read_stdin = false;
-+ operating_mode = column_mode;
-+ break_spaces = have_read_stdin = false;
-
- while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
- {
-@@ -264,7 +516,15 @@
- switch (optc)
- {
- case 'b': /* Count bytes rather than columns. */
-- count_bytes = true;
-+ if (operating_mode != column_mode)
-+ FATAL_ERROR (_("only one way of folding may be specified"));
-+ operating_mode = byte_mode;
-+ break;
-+
-+ case 'c':
-+ if (operating_mode != column_mode)
-+ FATAL_ERROR (_("only one way of folding may be specified"));
-+ operating_mode = character_mode;
- break;
-
- case 's': /* Break at word boundaries. */
---- coreutils-6.8+/src/sort.c.i18n 2007-02-24 11:23:23.000000000 +0000
-+++ coreutils-6.8+/src/sort.c 2007-03-01 15:10:57.000000000 +0000
-@@ -23,10 +23,19 @@
-
- #include <config.h>
-
-+#include <assert.h>
- #include <getopt.h>
- #include <sys/types.h>
- #include <sys/wait.h>
- #include <signal.h>
-+#if HAVE_WCHAR_H
-+# include <wchar.h>
-+#endif
-+/* Get isw* functions. */
-+#if HAVE_WCTYPE_H
-+# include <wctype.h>
-+#endif
-+
- #include "system.h"
- #include "argmatch.h"
- #include "error.h"
-@@ -116,14 +125,38 @@
- /* Thousands separator; if -1, then there isn't one. */
- static int thousands_sep;
-
-+static int force_general_numcompare = 0;
-+
- /* Nonzero if the corresponding locales are hard. */
- static bool hard_LC_COLLATE;
--#if HAVE_NL_LANGINFO
-+#if HAVE_LANGINFO_CODESET
- static bool hard_LC_TIME;
- #endif
-
- #define NONZERO(x) ((x) != 0)
-
-+/* get a multibyte character's byte length. */
-+#define GET_BYTELEN_OF_CHAR(LIM, PTR, MBLENGTH, STATE) \
-+ do \
-+ { \
-+ wchar_t wc; \
-+ mbstate_t state_bak; \
-+ \
-+ state_bak = STATE; \
-+ mblength = mbrtowc (&wc, PTR, LIM - PTR, &STATE); \
-+ \
-+ switch (MBLENGTH) \
-+ { \
-+ case (size_t)-1: \
-+ case (size_t)-2: \
-+ STATE = state_bak; \
-+ /* Fall through. */ \
-+ case 0: \
-+ MBLENGTH = 1; \
-+ } \
-+ } \
-+ while (0)
-+
- /* The kind of blanks for '-b' to skip in various options. */
- enum blanktype { bl_start, bl_end, bl_both };
-
-@@ -261,13 +294,11 @@
- they were read if all keys compare equal. */
- static bool stable;
-
--/* If TAB has this value, blanks separate fields. */
--enum { TAB_DEFAULT = CHAR_MAX + 1 };
--
--/* Tab character separating fields. If TAB_DEFAULT, then fields are
-+/* Tab character separating fields. If tab_length is 0, then fields are
- separated by the empty string between a non-blank character and a blank
- character. */
--static int tab = TAB_DEFAULT;
-+static char tab[MB_LEN_MAX + 1];
-+static size_t tab_length = 0;
-
- /* Flag to remove consecutive duplicate lines from the output.
- Only the last of a sequence of equal lines will be output. */
-@@ -639,6 +670,44 @@
- update_proc (pid);
- }
-
-+/* Function pointers. */
-+static void
-+(*inittables) (void);
-+static char *
-+(*begfield) (const struct line*, const struct keyfield *);
-+static char *
-+(*limfield) (const struct line*, const struct keyfield *);
-+static int
-+(*getmonth) (char const *, size_t);
-+static int
-+(*keycompare) (const struct line *, const struct line *);
-+static int
-+(*numcompare) (const char *, const char *);
-+
-+/* Test for white space multibyte character.
-+ Set LENGTH the byte length of investigated multibyte character. */
-+#if HAVE_MBRTOWC
-+static int
-+ismbblank (const char *str, size_t len, size_t *length)
-+{
-+ size_t mblength;
-+ wchar_t wc;
-+ mbstate_t state;
-+
-+ memset (&state, '\0', sizeof(mbstate_t));
-+ mblength = mbrtowc (&wc, str, len, &state);
-+
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ *length = 1;
-+ return 0;
-+ }
-+
-+ *length = (mblength < 1) ? 1 : mblength;
-+ return iswblank (wc);
-+}
-+#endif
-+
- /* Clean up any remaining temporary files. */
-
- static void
-@@ -978,7 +1047,7 @@
- free (node);
- }
-
--#if HAVE_NL_LANGINFO
-+#if HAVE_LANGINFO_CODESET
-
- static int
- struct_month_cmp (const void *m1, const void *m2)
-@@ -993,7 +1062,7 @@
- /* Initialize the character class tables. */
-
- static void
--inittables (void)
-+inittables_uni (void)
- {
- size_t i;
-
-@@ -1005,7 +1074,7 @@
- fold_toupper[i] = toupper (i);
- }
-
--#if HAVE_NL_LANGINFO
-+#if HAVE_LANGINFO_CODESET
- /* If we're not in the "C" locale, read different names for months. */
- if (hard_LC_TIME)
- {
-@@ -1031,6 +1100,64 @@
- #endif
- }
-
-+#if HAVE_MBRTOWC
-+static void
-+inittables_mb (void)
-+{
-+ int i, j, k, l;
-+ char *name, *s;
-+ size_t s_len, mblength;
-+ char mbc[MB_LEN_MAX];
-+ wchar_t wc, pwc;
-+ mbstate_t state_mb, state_wc;
-+
-+ for (i = 0; i < MONTHS_PER_YEAR; i++)
-+ {
-+ s = (char *) nl_langinfo (ABMON_1 + i);
-+ s_len = strlen (s);
-+ monthtab[i].name = name = (char *) xmalloc (s_len + 1);
-+ monthtab[i].val = i + 1;
-+
-+ memset (&state_mb, '\0', sizeof (mbstate_t));
-+ memset (&state_wc, '\0', sizeof (mbstate_t));
-+
-+ for (j = 0; j < s_len;)
-+ {
-+ if (!ismbblank (s + j, s_len - j, &mblength))
-+ break;
-+ j += mblength;
-+ }
-+
-+ for (k = 0; j < s_len;)
-+ {
-+ mblength = mbrtowc (&wc, (s + j), (s_len - j), &state_mb);
-+ assert (mblength != (size_t)-1 && mblength != (size_t)-2);
-+ if (mblength == 0)
-+ break;
-+
-+ pwc = towupper (wc);
-+ if (pwc == wc)
-+ {
-+ memcpy (mbc, s + j, mblength);
-+ j += mblength;
-+ }
-+ else
-+ {
-+ j += mblength;
-+ mblength = wcrtomb (mbc, pwc, &state_wc);
-+ assert (mblength != (size_t)0 && mblength != (size_t)-1);
-+ }
-+
-+ for (l = 0; l < mblength; l++)
-+ name[k++] = mbc[l];
-+ }
-+ name[k] = '\0';
-+ }
-+ qsort ((void *) monthtab, MONTHS_PER_YEAR,
-+ sizeof (struct month), struct_month_cmp);
-+}
-+#endif
-+
- /* Specify the amount of main memory to use when sorting. */
- static void
- specify_sort_size (char const *s)
-@@ -1241,7 +1368,7 @@
- by KEY in LINE. */
-
- static char *
--begfield (const struct line *line, const struct keyfield *key)
-+begfield_uni (const struct line *line, const struct keyfield *key)
- {
- char *ptr = line->text, *lim = ptr + line->length - 1;
- size_t sword = key->sword;
-@@ -1251,10 +1378,10 @@
- /* The leading field separator itself is included in a field when -t
- is absent. */
-
-- if (tab != TAB_DEFAULT)
-+ if (tab_length)
- while (ptr < lim && sword--)
- {
-- while (ptr < lim && *ptr != tab)
-+ while (ptr < lim && *ptr != tab[0])
- ++ptr;
- if (ptr < lim)
- ++ptr;
-@@ -1282,11 +1409,70 @@
- return ptr;
- }
-
-+#if HAVE_MBRTOWC
-+static char *
-+begfield_mb (const struct line *line, const struct keyfield *key)
-+{
-+ int i;
-+ char *ptr = line->text, *lim = ptr + line->length - 1;
-+ size_t sword = key->sword;
-+ size_t schar = key->schar;
-+ size_t mblength;
-+ mbstate_t state;
-+
-+ memset (&state, '\0', sizeof(mbstate_t));
-+
-+ if (tab_length)
-+ while (ptr < lim && sword--)
-+ {
-+ while (ptr < lim && memcmp (ptr, tab, tab_length) != 0)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+ ptr += mblength;
-+ }
-+ if (ptr < lim)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+ ptr += mblength;
-+ }
-+ }
-+ else
-+ while (ptr < lim && sword--)
-+ {
-+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
-+ ptr += mblength;
-+ if (ptr < lim)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+ ptr += mblength;
-+ }
-+ while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength))
-+ ptr += mblength;
-+ }
-+
-+ if (key->skipsblanks)
-+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
-+ ptr += mblength;
-+
-+ for (i = 0; i < schar; i++)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+
-+ if (ptr + mblength > lim)
-+ break;
-+ else
-+ ptr += mblength;
-+ }
-+
-+ return ptr;
-+}
-+#endif
-+
- /* Return the limit of (a pointer to the first character after) the field
- in LINE specified by KEY. */
-
- static char *
--limfield (const struct line *line, const struct keyfield *key)
-+limfield_uni (const struct line *line, const struct keyfield *key)
- {
- char *ptr = line->text, *lim = ptr + line->length - 1;
- size_t eword = key->eword, echar = key->echar;
-@@ -1299,10 +1485,10 @@
- `beginning' is the first character following the delimiting TAB.
- Otherwise, leave PTR pointing at the first `blank' character after
- the preceding field. */
-- if (tab != TAB_DEFAULT)
-+ if (tab_length)
- while (ptr < lim && eword--)
- {
-- while (ptr < lim && *ptr != tab)
-+ while (ptr < lim && *ptr != tab[0])
- ++ptr;
- if (ptr < lim && (eword | echar))
- ++ptr;
-@@ -1348,10 +1534,10 @@
- */
-
- /* Make LIM point to the end of (one byte past) the current field. */
-- if (tab != TAB_DEFAULT)
-+ if (tab_length)
- {
- char *newlim;
-- newlim = memchr (ptr, tab, lim - ptr);
-+ newlim = memchr (ptr, tab[0], lim - ptr);
- if (newlim)
- lim = newlim;
- }
-@@ -1384,6 +1570,107 @@
- return ptr;
- }
-
-+#if HAVE_MBRTOWC
-+static char *
-+limfield_mb (const struct line *line, const struct keyfield *key)
-+{
-+ char *ptr = line->text, *lim = ptr + line->length - 1;
-+ size_t eword = key->eword, echar = key->echar;
-+ int i;
-+ size_t mblength;
-+ mbstate_t state;
-+
-+ memset (&state, '\0', sizeof(mbstate_t));
-+
-+ if (tab_length)
-+ while (ptr < lim && eword--)
-+ {
-+ while (ptr < lim && memcmp (ptr, tab, tab_length) != 0)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+ ptr += mblength;
-+ }
-+ if (ptr < lim && (eword | echar))
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+ ptr += mblength;
-+ }
-+ }
-+ else
-+ while (ptr < lim && eword--)
-+ {
-+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
-+ ptr += mblength;
-+ if (ptr < lim)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+ ptr += mblength;
-+ }
-+ while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength))
-+ ptr += mblength;
-+ }
-+
-+
-+# ifdef POSIX_UNSPECIFIED
-+ /* Make LIM point to the end of (one byte past) the current field. */
-+ if (tab_length)
-+ {
-+ char *newlim, *p;
-+
-+ newlim = NULL;
-+ for (p = ptr; p < lim;)
-+ {
-+ if (memcmp (p, tab, tab_length) == 0)
-+ {
-+ newlim = p;
-+ break;
-+ }
-+
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+ p += mblength;
-+ }
-+ }
-+ else
-+ {
-+ char *newlim;
-+ newlim = ptr;
-+
-+ while (newlim < lim && ismbblank (newlim, lim - newlim, &mblength))
-+ newlim += mblength;
-+ if (ptr < lim)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+ ptr += mblength;
-+ }
-+ while (newlim < lim && !ismbblank (newlim, lim - newlim, &mblength))
-+ newlim += mblength;
-+ lim = newlim;
-+ }
-+# endif
-+
-+ /* If we're skipping leading blanks, don't start counting characters
-+ * until after skipping past any leading blanks. */
-+ if (key->skipsblanks)
-+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
-+ ptr += mblength;
-+
-+ memset (&state, '\0', sizeof(mbstate_t));
-+
-+ /* Advance PTR by ECHAR (if possible), but no further than LIM. */
-+ for (i = 0; i < echar; i++)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
-+
-+ if (ptr + mblength > lim)
-+ break;
-+ else
-+ ptr += mblength;
-+ }
-+
-+ return ptr;
-+}
-+#endif
-+
- /* Fill BUF reading from FP, moving buf->left bytes from the end
- of buf->buf to the beginning first. If EOF is reached and the
- file wasn't terminated by a newline, supply one. Set up BUF's line
-@@ -1466,8 +1753,24 @@
- else
- {
- if (key->skipsblanks)
-- while (blanks[to_uchar (*line_start)])
-- line_start++;
-+ {
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ size_t mblength;
-+ mbstate_t state;
-+ memset (&state, '\0', sizeof(mbstate_t));
-+ while (line_start < line->keylim &&
-+ ismbblank (line_start,
-+ line->keylim - line_start,
-+ &mblength))
-+ line_start += mblength;
-+ }
-+ else
-+#endif
-+ while (blanks[to_uchar (*line_start)])
-+ line_start++;
-+ }
- line->keybeg = line_start;
- }
- }
-@@ -1500,7 +1803,7 @@
- hideously fast. */
-
- static int
--numcompare (const char *a, const char *b)
-+numcompare_uni (const char *a, const char *b)
- {
- while (blanks[to_uchar (*a)])
- a++;
-@@ -1510,6 +1813,25 @@
- return strnumcmp (a, b, decimal_point, thousands_sep);
- }
-
-+#if HAVE_MBRTOWC
-+static int
-+numcompare_mb (const char *a, const char *b)
-+{
-+ size_t mblength, len;
-+ len = strlen (a); /* okay for UTF-8 */
-+ while (*a && ismbblank (a, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength))
-+ {
-+ a += mblength;
-+ len -= mblength;
-+ }
-+ len = strlen (b); /* okay for UTF-8 */
-+ while (*b && ismbblank (b, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength))
-+ b += mblength;
-+
-+ return strnumcmp (a, b, decimal_point, thousands_sep);
-+}
-+#endif /* HAV_EMBRTOWC */
-+
- static int
- general_numcompare (const char *sa, const char *sb)
- {
-@@ -1543,7 +1865,7 @@
- Return 0 if the name in S is not recognized. */
-
- static int
--getmonth (char const *month, size_t len)
-+getmonth_uni (char const *month, size_t len)
- {
- size_t lo = 0;
- size_t hi = MONTHS_PER_YEAR;
-@@ -1698,11 +2020,79 @@
- return diff;
- }
-
-+#if HAVE_MBRTOWC
-+static int
-+getmonth_mb (const char *s, size_t len)
-+{
-+ char *month;
-+ register size_t i;
-+ register int lo = 0, hi = MONTHS_PER_YEAR, result;
-+ char *tmp;
-+ size_t wclength, mblength;
-+ const char **pp;
-+ const wchar_t **wpp;
-+ wchar_t *month_wcs;
-+ mbstate_t state;
-+
-+ while (len > 0 && ismbblank (s, len, &mblength))
-+ {
-+ s += mblength;
-+ len -= mblength;
-+ }
-+
-+ if (len == 0)
-+ return 0;
-+
-+ month = (char *) alloca (len + 1);
-+
-+ tmp = (char *) alloca (len + 1);
-+ memcpy (tmp, s, len);
-+ tmp[len] = '\0';
-+ pp = (const char **)&tmp;
-+ month_wcs = (wchar_t *) alloca ((len + 1) * sizeof (wchar_t));
-+ memset (&state, '\0', sizeof(mbstate_t));
-+
-+ wclength = mbsrtowcs (month_wcs, pp, len + 1, &state);
-+ assert (wclength != (size_t)-1 && *pp == NULL);
-+
-+ for (i = 0; i < wclength; i++)
-+ {
-+ month_wcs[i] = towupper(month_wcs[i]);
-+ if (iswblank (month_wcs[i]))
-+ {
-+ month_wcs[i] = L'\0';
-+ break;
-+ }
-+ }
-+
-+ wpp = (const wchar_t **)&month_wcs;
-+
-+ mblength = wcsrtombs (month, wpp, len + 1, &state);
-+ assert (mblength != (-1) && *wpp == NULL);
-+
-+ do
-+ {
-+ int ix = (lo + hi) / 2;
-+
-+ if (strncmp (month, monthtab[ix].name, strlen (monthtab[ix].name)) < 0)
-+ hi = ix;
-+ else
-+ lo = ix;
-+ }
-+ while (hi - lo > 1);
-+
-+ result = (!strncmp (month, monthtab[lo].name, strlen (monthtab[lo].name))
-+ ? monthtab[lo].val : 0);
-+
-+ return result;
-+}
-+#endif
-+
- /* Compare two lines A and B trying every key in sequence until there
- are no more keys or a difference is found. */
-
- static int
--keycompare (const struct line *a, const struct line *b)
-+keycompare_uni (const struct line *a, const struct line *b)
- {
- struct keyfield const *key = keylist;
-
-@@ -1875,6 +2265,179 @@
- return key->reverse ? -diff : diff;
- }
-
-+#if HAVE_MBRTOWC
-+static int
-+keycompare_mb (const struct line *a, const struct line *b)
-+{
-+ struct keyfield *key = keylist;
-+
-+ /* For the first iteration only, the key positions have been
-+ precomputed for us. */
-+ char *texta = a->keybeg;
-+ char *textb = b->keybeg;
-+ char *lima = a->keylim;
-+ char *limb = b->keylim;
-+
-+ size_t mblength_a, mblength_b;
-+ wchar_t wc_a, wc_b;
-+ mbstate_t state_a, state_b;
-+
-+ int diff;
-+
-+ memset (&state_a, '\0', sizeof(mbstate_t));
-+ memset (&state_b, '\0', sizeof(mbstate_t));
-+
-+ for (;;)
-+ {
-+ unsigned char *translate = (unsigned char *) key->translate;
-+ bool const *ignore = key->ignore;
-+
-+ /* Find the lengths. */
-+ size_t lena = lima <= texta ? 0 : lima - texta;
-+ size_t lenb = limb <= textb ? 0 : limb - textb;
-+
-+ /* Actually compare the fields. */
-+ if (key->random)
-+ diff = compare_random (texta, lena, textb, lenb);
-+ else if (key->numeric | key->general_numeric)
-+ {
-+ char savea = *lima, saveb = *limb;
-+
-+ *lima = *limb = '\0';
-+ if (force_general_numcompare)
-+ diff = general_numcompare (texta, textb);
-+ else
-+ diff = ((key->numeric ? numcompare : general_numcompare)
-+ (texta, textb));
-+ *lima = savea, *limb = saveb;
-+ }
-+ else if (key->month)
-+ diff = getmonth (texta, lena) - getmonth (textb, lenb);
-+ else
-+ {
-+ if (ignore || translate)
-+ {
-+ char *copy_a = (char *) alloca (lena + 1 + lenb + 1);
-+ char *copy_b = copy_a + lena + 1;
-+ size_t new_len_a, new_len_b;
-+ size_t i, j;
-+
-+ /* Ignore and/or translate chars before comparing. */
-+# define IGNORE_CHARS(NEW_LEN, LEN, TEXT, COPY, WC, MBLENGTH, STATE) \
-+ do \
-+ { \
-+ wchar_t uwc; \
-+ char mbc[MB_LEN_MAX]; \
-+ mbstate_t state_wc; \
-+ \
-+ for (NEW_LEN = i = 0; i < LEN;) \
-+ { \
-+ mbstate_t state_bak; \
-+ \
-+ state_bak = STATE; \
-+ MBLENGTH = mbrtowc (&WC, TEXT + i, LEN - i, &STATE); \
-+ \
-+ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1 \
-+ || MBLENGTH == 0) \
-+ { \
-+ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \
-+ STATE = state_bak; \
-+ if (!ignore) \
-+ COPY[NEW_LEN++] = TEXT[i++]; \
-+ continue; \
-+ } \
-+ \
-+ if (ignore) \
-+ { \
-+ if ((ignore == nonprinting && !iswprint (WC)) \
-+ || (ignore == nondictionary \
-+ && !iswalnum (WC) && !iswblank (WC))) \
-+ { \
-+ i += MBLENGTH; \
-+ continue; \
-+ } \
-+ } \
-+ \
-+ if (translate) \
-+ { \
-+ \
-+ uwc = towupper(WC); \
-+ if (WC == uwc) \
-+ { \
-+ memcpy (mbc, TEXT + i, MBLENGTH); \
-+ i += MBLENGTH; \
-+ } \
-+ else \
-+ { \
-+ i += MBLENGTH; \
-+ WC = uwc; \
-+ memset (&state_wc, '\0', sizeof (mbstate_t)); \
-+ \
-+ MBLENGTH = wcrtomb (mbc, WC, &state_wc); \
-+ assert (MBLENGTH != (size_t)-1 && MBLENGTH != 0); \
-+ } \
-+ \
-+ for (j = 0; j < MBLENGTH; j++) \
-+ COPY[NEW_LEN++] = mbc[j]; \
-+ } \
-+ else \
-+ for (j = 0; j < MBLENGTH; j++) \
-+ COPY[NEW_LEN++] = TEXT[i++]; \
-+ } \
-+ COPY[NEW_LEN] = '\0'; \
-+ } \
-+ while (0)
-+ IGNORE_CHARS (new_len_a, lena, texta, copy_a,
-+ wc_a, mblength_a, state_a);
-+ IGNORE_CHARS (new_len_b, lenb, textb, copy_b,
-+ wc_b, mblength_b, state_b);
-+ diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b);
-+ }
-+ else if (lena == 0)
-+ diff = - NONZERO (lenb);
-+ else if (lenb == 0)
-+ goto greater;
-+ else
-+ diff = xmemcoll (texta, lena, textb, lenb);
-+ }
-+
-+ if (diff)
-+ goto not_equal;
-+
-+ key = key->next;
-+ if (! key)
-+ break;
-+
-+ /* Find the beginning and limit of the next field. */
-+ if (key->eword != -1)
-+ lima = limfield (a, key), limb = limfield (b, key);
-+ else
-+ lima = a->text + a->length - 1, limb = b->text + b->length - 1;
-+
-+ if (key->sword != -1)
-+ texta = begfield (a, key), textb = begfield (b, key);
-+ else
-+ {
-+ texta = a->text, textb = b->text;
-+ if (key->skipsblanks)
-+ {
-+ while (texta < lima && ismbblank (texta, lima - texta, &mblength_a))
-+ texta += mblength_a;
-+ while (textb < limb && ismbblank (textb, limb - textb, &mblength_b))
-+ textb += mblength_b;
-+ }
-+ }
-+ }
-+
-+ return 0;
-+
-+greater:
-+ diff = 1;
-+not_equal:
-+ return key->reverse ? -diff : diff;
-+}
-+#endif
-+
- /* Compare two lines A and B, returning negative, zero, or positive
- depending on whether A compares less than, equal to, or greater than B. */
-
-@@ -2744,7 +3305,7 @@
- initialize_exit_failure (SORT_FAILURE);
-
- hard_LC_COLLATE = hard_locale (LC_COLLATE);
--#if HAVE_NL_LANGINFO
-+#if HAVE_LANGINFO_CODESET
- hard_LC_TIME = hard_locale (LC_TIME);
- #endif
-
-@@ -2765,6 +3326,27 @@
- thousands_sep = -1;
- }
-
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ inittables = inittables_mb;
-+ begfield = begfield_mb;
-+ limfield = limfield_mb;
-+ getmonth = getmonth_mb;
-+ keycompare = keycompare_mb;
-+ numcompare = numcompare_mb;
-+ }
-+ else
-+#endif
-+ {
-+ inittables = inittables_uni;
-+ begfield = begfield_uni;
-+ limfield = limfield_uni;
-+ getmonth = getmonth_uni;
-+ keycompare = keycompare_uni;
-+ numcompare = numcompare_uni;
-+ }
-+
- have_read_stdin = false;
- inittables ();
-
-@@ -3015,13 +3597,35 @@
-
- case 't':
- {
-- char newtab = optarg[0];
-- if (! newtab)
-+ char newtab[MB_LEN_MAX + 1];
-+ size_t newtab_length = 1;
-+ strncpy (newtab, optarg, MB_LEN_MAX);
-+ if (! newtab[0])
- error (SORT_FAILURE, 0, _("empty tab"));
-- if (optarg[1])
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ wchar_t wc;
-+ mbstate_t state;
-+ size_t i;
-+
-+ memset (&state, '\0', sizeof (mbstate_t));
-+ newtab_length = mbrtowc (&wc, newtab, strnlen (newtab,
-+ MB_LEN_MAX),
-+ &state);
-+ switch (newtab_length)
-+ {
-+ case (size_t) -1:
-+ case (size_t) -2:
-+ case 0:
-+ newtab_length = 1;
-+ }
-+ }
-+#endif
-+ if (newtab_length == 1 && optarg[1])
- {
- if (STREQ (optarg, "\\0"))
-- newtab = '\0';
-+ newtab[0] = '\0';
- else
- {
- /* Provoke with `sort -txx'. Complain about
-@@ -3032,9 +3636,12 @@
- quote (optarg));
- }
- }
-- if (tab != TAB_DEFAULT && tab != newtab)
-+ if (tab_length
-+ && (tab_length != newtab_length
-+ || memcmp (tab, newtab, tab_length) != 0))
- error (SORT_FAILURE, 0, _("incompatible tabs"));
-- tab = newtab;
-+ memcpy (tab, newtab, newtab_length);
-+ tab_length = newtab_length;
- }
- break;
-
---- coreutils-6.8+/src/unexpand.c.i18n 2007-01-14 15:41:28.000000000 +0000
-+++ coreutils-6.8+/src/unexpand.c 2007-03-01 15:08:24.000000000 +0000
-@@ -39,11 +39,28 @@
- #include <stdio.h>
- #include <getopt.h>
- #include <sys/types.h>
-+
-+/* Get mbstate_t, mbrtowc(), wcwidth(). */
-+#if HAVE_WCHAR_H
-+# include <wchar.h>
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "quote.h"
- #include "xstrndup.h"
-
-+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
-+ installation; work around this configuration error. */
-+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
-+# define MB_LEN_MAX 16
-+#endif
-+
-+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
-+#if HAVE_MBRTOWC && defined mbstate_t
-+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
-+#endif
-+
- /* The official name of this program (e.g., no `g' prefix). */
- #define PROGRAM_NAME "unexpand"
-
-@@ -110,6 +127,208 @@
- {NULL, 0, NULL, 0}
- };
-
-+static FILE *next_file (FILE *fp);
-+
-+#if HAVE_MBRTOWC
-+static void
-+unexpand_multibyte (void)
-+{
-+ FILE *fp; /* Input stream. */
-+ mbstate_t i_state; /* Current shift state of the input stream. */
-+ mbstate_t i_state_bak; /* Back up the I_STATE. */
-+ mbstate_t o_state; /* Current shift state of the output stream. */
-+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
-+ char *bufpos; /* Next read position of BUF. */
-+ size_t buflen = 0; /* The length of the byte sequence in buf. */
-+ wint_t wc; /* A gotten wide character. */
-+ size_t mblength; /* The byte size of a multibyte character
-+ which shows as same character as WC. */
-+
-+ /* Index in `tab_list' of next tabstop: */
-+ int tab_index = 0; /* For calculating width of pending tabs. */
-+ int print_tab_index = 0; /* For printing as many tabs as possible. */
-+ unsigned int column = 0; /* Column on screen of next char. */
-+ int next_tab_column; /* Column the next tab stop is on. */
-+ int convert = 1; /* If nonzero, perform translations. */
-+ unsigned int pending = 0; /* Pending columns of blanks. */
-+
-+ fp = next_file ((FILE *) NULL);
-+ if (fp == NULL)
-+ return;
-+
-+ memset (&o_state, '\0', sizeof(mbstate_t));
-+ memset (&i_state, '\0', sizeof(mbstate_t));
-+
-+ for (;;)
-+ {
-+ if (buflen < MB_LEN_MAX && !feof(fp) && !ferror(fp))
-+ {
-+ memmove (buf, bufpos, buflen);
-+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, fp);
-+ bufpos = buf;
-+ }
-+
-+ /* Get a wide character. */
-+ if (buflen < 1)
-+ {
-+ mblength = 1;
-+ wc = WEOF;
-+ }
-+ else
-+ {
-+ i_state_bak = i_state;
-+ mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &i_state);
-+ }
-+
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ i_state = i_state_bak;
-+ wc = L'\0';
-+ }
-+
-+ if (wc == L' ' && convert && column < INT_MAX)
-+ {
-+ ++pending;
-+ ++column;
-+ }
-+ else if (wc == L'\t' && convert)
-+ {
-+ if (tab_size == 0)
-+ {
-+ /* Do not let tab_index == first_free_tab;
-+ stop when it is 1 less. */
-+ while (tab_index < first_free_tab - 1
-+ && column >= tab_list[tab_index])
-+ tab_index++;
-+ next_tab_column = tab_list[tab_index];
-+ if (tab_index < first_free_tab - 1)
-+ tab_index++;
-+ if (column >= next_tab_column)
-+ {
-+ convert = 0; /* Ran out of tab stops. */
-+ goto flush_pend_mb;
-+ }
-+ }
-+ else
-+ {
-+ next_tab_column = column + tab_size - column % tab_size;
-+ }
-+ pending += next_tab_column - column;
-+ column = next_tab_column;
-+ }
-+ else
-+ {
-+flush_pend_mb:
-+ /* Flush pending spaces. Print as many tabs as possible,
-+ then print the rest as spaces. */
-+ if (pending == 1)
-+ {
-+ putchar (' ');
-+ pending = 0;
-+ }
-+ column -= pending;
-+ while (pending > 0)
-+ {
-+ if (tab_size == 0)
-+ {
-+ /* Do not let print_tab_index == first_free_tab;
-+ stop when it is 1 less. */
-+ while (print_tab_index < first_free_tab - 1
-+ && column >= tab_list[print_tab_index])
-+ print_tab_index++;
-+ next_tab_column = tab_list[print_tab_index];
-+ if (print_tab_index < first_free_tab - 1)
-+ print_tab_index++;
-+ }
-+ else
-+ {
-+ next_tab_column =
-+ column + tab_size - column % tab_size;
-+ }
-+ if (next_tab_column - column <= pending)
-+ {
-+ putchar ('\t');
-+ pending -= next_tab_column - column;
-+ column = next_tab_column;
-+ }
-+ else
-+ {
-+ --print_tab_index;
-+ column += pending;
-+ while (pending != 0)
-+ {
-+ putchar (' ');
-+ pending--;
-+ }
-+ }
-+ }
-+
-+ if (wc == WEOF)
-+ {
-+ fp = next_file (fp);
-+ if (fp == NULL)
-+ break; /* No more files. */
-+ else
-+ {
-+ memset (&i_state, '\0', sizeof(mbstate_t));
-+ continue;
-+ }
-+ }
-+
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ if (convert)
-+ {
-+ ++column;
-+ if (convert_entire_line == 0)
-+ convert = 0;
-+ }
-+ mblength = 1;
-+ putchar (buf[0]);
-+ }
-+ else if (mblength == 0)
-+ {
-+ if (convert && convert_entire_line == 0)
-+ convert = 0;
-+ mblength = 1;
-+ putchar ('\0');
-+ }
-+ else
-+ {
-+ if (convert)
-+ {
-+ if (wc == L'\b')
-+ {
-+ if (column > 0)
-+ --column;
-+ }
-+ else
-+ {
-+ int width; /* The width of WC. */
-+
-+ width = wcwidth (wc);
-+ column += (width > 0) ? width : 0;
-+ if (convert_entire_line == 0)
-+ convert = 0;
-+ }
-+ }
-+
-+ if (wc == L'\n')
-+ {
-+ tab_index = print_tab_index = 0;
-+ column = pending = 0;
-+ convert = 1;
-+ }
-+ fwrite (bufpos, sizeof(char), mblength, stdout);
-+ }
-+ }
-+ buflen -= mblength;
-+ bufpos += mblength;
-+ }
-+}
-+#endif
-+
-+
- void
- usage (int status)
- {
-@@ -531,7 +750,12 @@
-
- file_list = (optind < argc ? &argv[optind] : stdin_argv);
-
-- unexpand ();
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ unexpand_multibyte ();
-+ else
-+#endif
-+ unexpand ();
-
- if (have_read_stdin && fclose (stdin) != 0)
- error (EXIT_FAILURE, errno, "-");
---- coreutils-6.8+/src/pr.c.i18n 2007-01-14 15:41:28.000000000 +0000
-+++ coreutils-6.8+/src/pr.c 2007-03-01 15:08:24.000000000 +0000
-@@ -313,6 +313,32 @@
-
- #include <getopt.h>
- #include <sys/types.h>
-+
-+/* Get MB_LEN_MAX. */
-+#include <limits.h>
-+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
-+ installation; work around this configuration error. */
-+#if !defined MB_LEN_MAX || MB_LEN_MAX == 1
-+# define MB_LEN_MAX 16
-+#endif
-+
-+/* Get MB_CUR_MAX. */
-+#include <stdlib.h>
-+
-+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
-+/* Get mbstate_t, mbrtowc(), wcwidth(). */
-+#if HAVE_WCHAR_H
-+# include <wchar.h>
-+#endif
-+
-+/* Get iswprint(). -- for wcwidth(). */
-+#if HAVE_WCTYPE_H
-+# include <wctype.h>
-+#endif
-+#if !defined iswprint && !HAVE_ISWPRINT
-+# define iswprint(wc) 1
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "hard-locale.h"
-@@ -324,6 +350,18 @@
- #include "strftime.h"
- #include "xstrtol.h"
-
-+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
-+#if HAVE_MBRTOWC && defined mbstate_t
-+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
-+#endif
-+
-+#ifndef HAVE_DECL_WCWIDTH
-+"this configure-time declaration test was not run"
-+#endif
-+#if !HAVE_DECL_WCWIDTH
-+extern int wcwidth ();
-+#endif
-+
- /* The official name of this program (e.g., no `g' prefix). */
- #define PROGRAM_NAME "pr"
-
-@@ -416,7 +454,20 @@
-
- #define NULLCOL (COLUMN *)0
-
--static int char_to_clump (char c);
-+/* Funtion pointers to switch functions for single byte locale or for
-+ multibyte locale. If multibyte functions do not exist in your sysytem,
-+ these pointers always point the function for single byte locale. */
-+static void (*print_char) (char c);
-+static int (*char_to_clump) (char c);
-+
-+/* Functions for single byte locale. */
-+static void print_char_single (char c);
-+static int char_to_clump_single (char c);
-+
-+/* Functions for multibyte locale. */
-+static void print_char_multi (char c);
-+static int char_to_clump_multi (char c);
-+
- static bool read_line (COLUMN *p);
- static bool print_page (void);
- static bool print_stored (COLUMN *p);
-@@ -426,6 +477,7 @@
- static void pad_across_to (int position);
- static void add_line_number (COLUMN *p);
- static void getoptarg (char *arg, char switch_char, char *character,
-+ int *character_length, int *character_width,
- int *number);
- void usage (int status);
- static void print_files (int number_of_files, char **av);
-@@ -440,7 +492,6 @@
- static void pad_down (int lines);
- static void read_rest_of_line (COLUMN *p);
- static void skip_read (COLUMN *p, int column_number);
--static void print_char (char c);
- static void cleanup (void);
- static void print_sep_string (void);
- static void separator_string (const char *optarg_S);
-@@ -455,7 +506,7 @@
- we store the leftmost columns contiguously in buff.
- To print a line from buff, get the index of the first character
- from line_vector[i], and print up to line_vector[i + 1]. */
--static char *buff;
-+static unsigned char *buff;
-
- /* Index of the position in buff where the next character
- will be stored. */
-@@ -559,7 +610,7 @@
- static bool untabify_input = false;
-
- /* (-e) The input tab character. */
--static char input_tab_char = '\t';
-+static char input_tab_char[MB_LEN_MAX] = "\t";
-
- /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ...
- where the leftmost column is 1. */
-@@ -569,7 +620,10 @@
- static bool tabify_output = false;
-
- /* (-i) The output tab character. */
--static char output_tab_char = '\t';
-+static char output_tab_char[MB_LEN_MAX] = "\t";
-+
-+/* (-i) The byte length of output tab character. */
-+static int output_tab_char_length = 1;
-
- /* (-i) The width of the output tab. */
- static int chars_per_output_tab = 8;
-@@ -643,7 +697,13 @@
- static bool numbered_lines = false;
-
- /* (-n) Character which follows each line number. */
--static char number_separator = '\t';
-+static char number_separator[MB_LEN_MAX] = "\t";
-+
-+/* (-n) The byte length of the character which follows each line number. */
-+static int number_separator_length = 1;
-+
-+/* (-n) The character width of the character which follows each line number. */
-+static int number_separator_width = 0;
-
- /* (-n) line counting starts with 1st line of input file (not with 1st
- line of 1st page printed). */
-@@ -696,6 +756,7 @@
- -a|COLUMN|-m is a `space' and with the -J option a `tab'. */
- static char *col_sep_string = "";
- static int col_sep_length = 0;
-+static int col_sep_width = 0;
- static char *column_separator = " ";
- static char *line_separator = "\t";
-
-@@ -852,6 +913,13 @@
- col_sep_length = (int) strlen (optarg_S);
- col_sep_string = xmalloc (col_sep_length + 1);
- strcpy (col_sep_string, optarg_S);
-+
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ col_sep_width = mbswidth (col_sep_string, 0);
-+ else
-+#endif
-+ col_sep_width = col_sep_length;
- }
-
- int
-@@ -877,6 +945,21 @@
-
- atexit (close_stdout);
-
-+/* Define which functions are used, the ones for single byte locale or the ones
-+ for multibyte locale. */
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ {
-+ print_char = print_char_multi;
-+ char_to_clump = char_to_clump_multi;
-+ }
-+ else
-+#endif
-+ {
-+ print_char = print_char_single;
-+ char_to_clump = char_to_clump_single;
-+ }
-+
- n_files = 0;
- file_names = (argc > 1
- ? xmalloc ((argc - 1) * sizeof (char *))
-@@ -949,8 +1032,12 @@
- break;
- case 'e':
- if (optarg)
-- getoptarg (optarg, 'e', &input_tab_char,
-- &chars_per_input_tab);
-+ {
-+ int dummy_length, dummy_width;
-+
-+ getoptarg (optarg, 'e', input_tab_char, &dummy_length,
-+ &dummy_width, &chars_per_input_tab);
-+ }
- /* Could check tab width > 0. */
- untabify_input = true;
- break;
-@@ -963,8 +1050,12 @@
- break;
- case 'i':
- if (optarg)
-- getoptarg (optarg, 'i', &output_tab_char,
-- &chars_per_output_tab);
-+ {
-+ int dummy_width;
-+
-+ getoptarg (optarg, 'i', output_tab_char, &output_tab_char_length,
-+ &dummy_width, &chars_per_output_tab);
-+ }
- /* Could check tab width > 0. */
- tabify_output = true;
- break;
-@@ -991,8 +1082,8 @@
- case 'n':
- numbered_lines = true;
- if (optarg)
-- getoptarg (optarg, 'n', &number_separator,
-- &chars_per_number);
-+ getoptarg (optarg, 'n', number_separator, &number_separator_length,
-+ &number_separator_width, &chars_per_number);
- break;
- case 'N':
- skip_count = false;
-@@ -1031,7 +1122,7 @@
- old_s = false;
- /* Reset an additional input of -s, -S dominates -s */
- col_sep_string = "";
-- col_sep_length = 0;
-+ col_sep_length = col_sep_width = 0;
- use_col_separator = true;
- if (optarg)
- separator_string (optarg);
-@@ -1188,10 +1279,45 @@
- a number. */
-
- static void
--getoptarg (char *arg, char switch_char, char *character, int *number)
-+getoptarg (char *arg, char switch_char, char *character, int *character_length,
-+ int *character_width, int *number)
- {
- if (!ISDIGIT (*arg))
-- *character = *arg++;
-+ {
-+#ifdef HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1) /* for multibyte locale. */
-+ {
-+ wchar_t wc;
-+ size_t mblength;
-+ int width;
-+ mbstate_t state = {'\0'};
-+
-+ mblength = mbrtowc (&wc, arg, strnlen(arg, MB_LEN_MAX), &state);
-+
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ *character_length = 1;
-+ *character_width = 1;
-+ }
-+ else
-+ {
-+ *character_length = (mblength < 1) ? 1 : mblength;
-+ width = wcwidth (wc);
-+ *character_width = (width < 0) ? 0 : width;
-+ }
-+
-+ strncpy (character, arg, *character_length);
-+ arg += *character_length;
-+ }
-+ else /* for single byte locale. */
-+#endif
-+ {
-+ *character = *arg++;
-+ *character_length = 1;
-+ *character_width = 1;
-+ }
-+ }
-+
- if (*arg)
- {
- long int tmp_long;
-@@ -1256,7 +1382,7 @@
- else
- col_sep_string = column_separator;
-
-- col_sep_length = 1;
-+ col_sep_length = col_sep_width = 1;
- use_col_separator = true;
- }
- /* It's rather pointless to define a TAB separator with column
-@@ -1288,11 +1414,11 @@
- TAB_WIDTH (chars_per_input_tab, chars_per_number); */
-
- /* Estimate chars_per_text without any margin and keep it constant. */
-- if (number_separator == '\t')
-+ if (number_separator[0] == '\t')
- number_width = chars_per_number +
- TAB_WIDTH (chars_per_default_tab, chars_per_number);
- else
-- number_width = chars_per_number + 1;
-+ number_width = chars_per_number + number_separator_width;
-
- /* The number is part of the column width unless we are
- printing files in parallel. */
-@@ -1307,7 +1433,7 @@
- }
-
- chars_per_column = (chars_per_line - chars_used_by_number -
-- (columns - 1) * col_sep_length) / columns;
-+ (columns - 1) * col_sep_width) / columns;
-
- if (chars_per_column < 1)
- error (EXIT_FAILURE, 0, _("page width too narrow"));
-@@ -1432,7 +1558,7 @@
-
- /* Enlarge p->start_position of first column to use the same form of
- padding_not_printed with all columns. */
-- h = h + col_sep_length;
-+ h = h + col_sep_width;
-
- /* This loop takes care of all but the rightmost column. */
-
-@@ -1466,7 +1592,7 @@
- }
- else
- {
-- h = h_next + col_sep_length;
-+ h = h_next + col_sep_width;
- h_next = h + chars_per_column;
- }
- }
-@@ -1756,9 +1882,9 @@
- align_column (COLUMN *p)
- {
- padding_not_printed = p->start_position;
-- if (padding_not_printed - col_sep_length > 0)
-+ if (padding_not_printed - col_sep_width > 0)
- {
-- pad_across_to (padding_not_printed - col_sep_length);
-+ pad_across_to (padding_not_printed - col_sep_width);
- padding_not_printed = ANYWHERE;
- }
-
-@@ -2029,13 +2155,13 @@
- /* May be too generous. */
- buff = X2REALLOC (buff, &buff_allocated);
- }
-- buff[buff_current++] = c;
-+ buff[buff_current++] = (unsigned char) c;
- }
-
- static void
- add_line_number (COLUMN *p)
- {
-- int i;
-+ int i, j;
- char *s;
- int left_cut;
-
-@@ -2058,22 +2184,24 @@
- /* Tabification is assumed for multiple columns, also for n-separators,
- but `default n-separator = TAB' hasn't been given priority over
- equal column_width also specified by POSIX. */
-- if (number_separator == '\t')
-+ if (number_separator[0] == '\t')
- {
- i = number_width - chars_per_number;
- while (i-- > 0)
- (p->char_func) (' ');
- }
- else
-- (p->char_func) (number_separator);
-+ for (j = 0; j < number_separator_length; j++)
-+ (p->char_func) (number_separator[j]);
- }
- else
- /* To comply with POSIX, we avoid any expansion of default TAB
- separator with a single column output. No column_width requirement
- has to be considered. */
- {
-- (p->char_func) (number_separator);
-- if (number_separator == '\t')
-+ for (j = 0; j < number_separator_length; j++)
-+ (p->char_func) (number_separator[j]);
-+ if (number_separator[0] == '\t')
- output_position = POS_AFTER_TAB (chars_per_output_tab,
- output_position);
- }
-@@ -2234,7 +2362,7 @@
- while (goal - h_old > 1
- && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal)
- {
-- putchar (output_tab_char);
-+ fwrite (output_tab_char, sizeof(char), output_tab_char_length, stdout);
- h_old = h_new;
- }
- while (++h_old <= goal)
-@@ -2254,6 +2382,7 @@
- {
- char *s;
- int l = col_sep_length;
-+ int not_space_flag;
-
- s = col_sep_string;
-
-@@ -2267,6 +2396,7 @@
- {
- for (; separators_not_printed > 0; --separators_not_printed)
- {
-+ not_space_flag = 0;
- while (l-- > 0)
- {
- /* 3 types of sep_strings: spaces only, spaces and chars,
-@@ -2280,12 +2410,15 @@
- }
- else
- {
-+ not_space_flag = 1;
- if (spaces_not_printed > 0)
- print_white_space ();
- putchar (*s++);
-- ++output_position;
- }
- }
-+ if (not_space_flag)
-+ output_position += col_sep_width;
-+
- /* sep_string ends with some spaces */
- if (spaces_not_printed > 0)
- print_white_space ();
-@@ -2313,7 +2446,7 @@
- required number of tabs and spaces. */
-
- static void
--print_char (char c)
-+print_char_single (char c)
- {
- if (tabify_output)
- {
-@@ -2337,6 +2470,74 @@
- putchar (c);
- }
-
-+#ifdef HAVE_MBRTOWC
-+static void
-+print_char_multi (char c)
-+{
-+ static size_t mbc_pos = 0;
-+ static char mbc[MB_LEN_MAX] = {'\0'};
-+ static mbstate_t state = {'\0'};
-+ mbstate_t state_bak;
-+ wchar_t wc;
-+ size_t mblength;
-+ int width;
-+
-+ if (tabify_output)
-+ {
-+ state_bak = state;
-+ mbc[mbc_pos++] = c;
-+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
-+
-+ while (mbc_pos > 0)
-+ {
-+ switch (mblength)
-+ {
-+ case (size_t)-2:
-+ state = state_bak;
-+ return;
-+
-+ case (size_t)-1:
-+ state = state_bak;
-+ ++output_position;
-+ putchar (mbc[0]);
-+ memmove (mbc, mbc + 1, MB_CUR_MAX - 1);
-+ --mbc_pos;
-+ break;
-+
-+ case 0:
-+ mblength = 1;
-+
-+ default:
-+ if (wc == L' ')
-+ {
-+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength);
-+ --mbc_pos;
-+ ++spaces_not_printed;
-+ return;
-+ }
-+ else if (spaces_not_printed > 0)
-+ print_white_space ();
-+
-+ /* Nonprintables are assumed to have width 0, except L'\b'. */
-+ if ((width = wcwidth (wc)) < 1)
-+ {
-+ if (wc == L'\b')
-+ --output_position;
-+ }
-+ else
-+ output_position += width;
-+
-+ fwrite (mbc, sizeof(char), mblength, stdout);
-+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength);
-+ mbc_pos -= mblength;
-+ }
-+ }
-+ return;
-+ }
-+ putchar (c);
-+}
-+#endif
-+
- /* Skip to page PAGE before printing.
- PAGE may be larger than total number of pages. */
-
-@@ -2517,9 +2718,9 @@
- align_empty_cols = false;
- }
-
-- if (padding_not_printed - col_sep_length > 0)
-+ if (padding_not_printed - col_sep_width > 0)
- {
-- pad_across_to (padding_not_printed - col_sep_length);
-+ pad_across_to (padding_not_printed - col_sep_width);
- padding_not_printed = ANYWHERE;
- }
-
-@@ -2620,9 +2821,9 @@
- }
- }
-
-- if (padding_not_printed - col_sep_length > 0)
-+ if (padding_not_printed - col_sep_width > 0)
- {
-- pad_across_to (padding_not_printed - col_sep_length);
-+ pad_across_to (padding_not_printed - col_sep_width);
- padding_not_printed = ANYWHERE;
- }
-
-@@ -2635,8 +2836,8 @@
- if (spaces_not_printed == 0)
- {
- output_position = p->start_position + end_vector[line];
-- if (p->start_position - col_sep_length == chars_per_margin)
-- output_position -= col_sep_length;
-+ if (p->start_position - col_sep_width == chars_per_margin)
-+ output_position -= col_sep_width;
- }
-
- return true;
-@@ -2655,7 +2856,7 @@
- number of characters is 1.) */
-
- static int
--char_to_clump (char c)
-+char_to_clump_single (char c)
- {
- unsigned char uc = c;
- char *s = clump_buff;
-@@ -2665,10 +2866,10 @@
- int chars;
- int chars_per_c = 8;
-
-- if (c == input_tab_char)
-+ if (c == input_tab_char[0])
- chars_per_c = chars_per_input_tab;
-
-- if (c == input_tab_char || c == '\t')
-+ if (c == input_tab_char[0] || c == '\t')
- {
- width = TAB_WIDTH (chars_per_c, input_position);
-
-@@ -2739,6 +2940,154 @@
- return chars;
- }
-
-+#ifdef HAVE_MBRTOWC
-+static int
-+char_to_clump_multi (char c)
-+{
-+ static size_t mbc_pos = 0;
-+ static char mbc[MB_LEN_MAX] = {'\0'};
-+ static mbstate_t state = {'\0'};
-+ mbstate_t state_bak;
-+ wchar_t wc;
-+ size_t mblength;
-+ int wc_width;
-+ register char *s = clump_buff;
-+ register int i, j;
-+ char esc_buff[4];
-+ int width;
-+ int chars;
-+ int chars_per_c = 8;
-+
-+ state_bak = state;
-+ mbc[mbc_pos++] = c;
-+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
-+
-+ width = 0;
-+ chars = 0;
-+ while (mbc_pos > 0)
-+ {
-+ switch (mblength)
-+ {
-+ case (size_t)-2:
-+ state = state_bak;
-+ return 0;
-+
-+ case (size_t)-1:
-+ state = state_bak;
-+ mblength = 1;
-+
-+ if (use_esc_sequence || use_cntrl_prefix)
-+ {
-+ width = +4;
-+ chars = +4;
-+ *s++ = '\\';
-+ sprintf (esc_buff, "%03o", mbc[0]);
-+ for (i = 0; i <= 2; ++i)
-+ *s++ = (int) esc_buff[i];
-+ }
-+ else
-+ {
-+ width += 1;
-+ chars += 1;
-+ *s++ = mbc[0];
-+ }
-+ break;
-+
-+ case 0:
-+ mblength = 1;
-+ /* Fall through */
-+
-+ default:
-+ if (memcmp (mbc, input_tab_char, mblength) == 0)
-+ chars_per_c = chars_per_input_tab;
-+
-+ if (memcmp (mbc, input_tab_char, mblength) == 0 || c == '\t')
-+ {
-+ int width_inc;
-+
-+ width_inc = TAB_WIDTH (chars_per_c, input_position);
-+ width += width_inc;
-+
-+ if (untabify_input)
-+ {
-+ for (i = width_inc; i; --i)
-+ *s++ = ' ';
-+ chars += width_inc;
-+ }
-+ else
-+ {
-+ for (i = 0; i < mblength; i++)
-+ *s++ = mbc[i];
-+ chars += mblength;
-+ }
-+ }
-+ else if ((wc_width = wcwidth (wc)) < 1)
-+ {
-+ if (use_esc_sequence)
-+ {
-+ for (i = 0; i < mblength; i++)
-+ {
-+ width += 4;
-+ chars += 4;
-+ *s++ = '\\';
-+ sprintf (esc_buff, "%03o", c);
-+ for (j = 0; j <= 2; ++j)
-+ *s++ = (int) esc_buff[j];
-+ }
-+ }
-+ else if (use_cntrl_prefix)
-+ {
-+ if (wc < 0200)
-+ {
-+ width += 2;
-+ chars += 2;
-+ *s++ = '^';
-+ *s++ = wc ^ 0100;
-+ }
-+ else
-+ {
-+ for (i = 0; i < mblength; i++)
-+ {
-+ width += 4;
-+ chars += 4;
-+ *s++ = '\\';
-+ sprintf (esc_buff, "%03o", c);
-+ for (j = 0; j <= 2; ++j)
-+ *s++ = (int) esc_buff[j];
-+ }
-+ }
-+ }
-+ else if (wc == L'\b')
-+ {
-+ width += -1;
-+ chars += 1;
-+ *s++ = c;
-+ }
-+ else
-+ {
-+ width += 0;
-+ chars += mblength;
-+ for (i = 0; i < mblength; i++)
-+ *s++ = mbc[i];
-+ }
-+ }
-+ else
-+ {
-+ width += wc_width;
-+ chars += mblength;
-+ for (i = 0; i < mblength; i++)
-+ *s++ = mbc[i];
-+ }
-+ }
-+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength);
-+ mbc_pos -= mblength;
-+ }
-+
-+ input_position += width;
-+ return chars;
-+}
-+#endif
-+
- /* We've just printed some files and need to clean up things before
- looking for more options and printing the next batch of files.
-
---- coreutils-6.8+/src/cut.c.i18n 2007-01-14 15:41:28.000000000 +0000
-+++ coreutils-6.8+/src/cut.c 2007-03-01 15:08:24.000000000 +0000
-@@ -29,6 +29,11 @@
- #include <assert.h>
- #include <getopt.h>
- #include <sys/types.h>
-+
-+/* Get mbstate_t, mbrtowc(). */
-+#if HAVE_WCHAR_H
-+# include <wchar.h>
-+#endif
- #include "system.h"
-
- #include "error.h"
-@@ -37,6 +42,18 @@
- #include "quote.h"
- #include "xstrndup.h"
-
-+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
-+ installation; work around this configuration error. */
-+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
-+# undef MB_LEN_MAX
-+# define MB_LEN_MAX 16
-+#endif
-+
-+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
-+#if HAVE_MBRTOWC && defined mbstate_t
-+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
-+#endif
-+
- /* The official name of this program (e.g., no `g' prefix). */
- #define PROGRAM_NAME "cut"
-
-@@ -67,6 +84,52 @@
- } \
- while (0)
-
-+/* Refill the buffer BUF to get a multibyte character. */
-+#define REFILL_BUFFER(BUF, BUFPOS, BUFLEN, STREAM) \
-+ do \
-+ { \
-+ if (BUFLEN < MB_LEN_MAX && !feof (STREAM) && !ferror (STREAM)) \
-+ { \
-+ memmove (BUF, BUFPOS, BUFLEN); \
-+ BUFLEN += fread (BUF + BUFLEN, sizeof(char), BUFSIZ, STREAM); \
-+ BUFPOS = BUF; \
-+ } \
-+ } \
-+ while (0)
-+
-+/* Get wide character on BUFPOS. BUFPOS is not included after that.
-+ If byte sequence is not valid as a character, CONVFAIL is 1. Otherwise 0. */
-+#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \
-+ do \
-+ { \
-+ mbstate_t state_bak; \
-+ \
-+ if (BUFLEN < 1) \
-+ { \
-+ WC = WEOF; \
-+ break; \
-+ } \
-+ \
-+ /* Get a wide character. */ \
-+ CONVFAIL = 0; \
-+ state_bak = STATE; \
-+ MBLENGTH = mbrtowc ((wchar_t *)&WC, BUFPOS, BUFLEN, &STATE); \
-+ \
-+ switch (MBLENGTH) \
-+ { \
-+ case (size_t)-1: \
-+ case (size_t)-2: \
-+ CONVFAIL++; \
-+ STATE = state_bak; \
-+ /* Fall througn. */ \
-+ \
-+ case 0: \
-+ MBLENGTH = 1; \
-+ break; \
-+ } \
-+ } \
-+ while (0)
-+
- struct range_pair
- {
- size_t lo;
-@@ -85,7 +148,7 @@
- /* The number of bytes allocated for FIELD_1_BUFFER. */
- static size_t field_1_bufsize;
-
--/* The largest field or byte index used as an endpoint of a closed
-+/* The largest byte, character or field index used as an endpoint of a closed
- or degenerate range specification; this doesn't include the starting
- index of right-open-ended ranges. For example, with either range spec
- `2-5,9-', `2-3,5,9-' this variable would be set to 5. */
-@@ -97,10 +160,11 @@
-
- /* This is a bit vector.
- In byte mode, which bytes to output.
-+ In character mode, which characters to output.
- In field mode, which DELIM-separated fields to output.
-- Both bytes and fields are numbered starting with 1,
-+ Bytes, characters and fields are numbered starting with 1,
- so the zeroth bit of this array is unused.
-- A field or byte K has been selected if
-+ A byte, character or field K has been selected if
- (K <= MAX_RANGE_ENDPOINT and is_printable_field(K))
- || (EOL_RANGE_START > 0 && K >= EOL_RANGE_START). */
- static unsigned char *printable_field;
-@@ -109,9 +173,12 @@
- {
- undefined_mode,
-
-- /* Output characters that are in the given bytes. */
-+ /* Output bytes that are at the given positions. */
- byte_mode,
-
-+ /* Output characters that are at the given positions. */
-+ character_mode,
-+
- /* Output the given delimeter-separated fields. */
- field_mode
- };
-@@ -121,6 +188,13 @@
-
- static enum operating_mode operating_mode;
-
-+/* If nonzero, when in byte mode, don't split multibyte characters. */
-+static int byte_mode_character_aware;
-+
-+/* If nonzero, the function for single byte locale is work
-+ if this program runs on multibyte locale. */
-+static int force_singlebyte_mode;
-+
- /* If true do not output lines containing no delimeter characters.
- Otherwise, all such lines are printed. This option is valid only
- with field mode. */
-@@ -132,6 +206,9 @@
-
- /* The delimeter character for field mode. */
- static unsigned char delim;
-+#if HAVE_WCHAR_H
-+static wchar_t wcdelim;
-+#endif
-
- /* True if the --output-delimiter=STRING option was specified. */
- static bool output_delimiter_specified;
-@@ -205,7 +282,7 @@
- -f, --fields=LIST select only these fields; also print any line\n\
- that contains no delimiter character, unless\n\
- the -s option is specified\n\
-- -n (ignored)\n\
-+ -n with -b: don't split multibyte characters\n\
- "), stdout);
- fputs (_("\
- --complement complement the set of selected bytes, characters\n\
-@@ -362,7 +439,7 @@
- in_digits = false;
- /* Starting a range. */
- if (dash_found)
-- FATAL_ERROR (_("invalid byte or field list"));
-+ FATAL_ERROR (_("invalid byte, character or field list"));
- dash_found = true;
- fieldstr++;
-
-@@ -387,14 +464,16 @@
- if (value == 0)
- {
- /* `n-'. From `initial' to end of line. */
-- eol_range_start = initial;
-+ if (eol_range_start == 0 ||
-+ (eol_range_start != 0 && eol_range_start > initial))
-+ eol_range_start = initial;
- field_found = true;
- }
- else
- {
- /* `m-n' or `-n' (1-n). */
- if (value < initial)
-- FATAL_ERROR (_("invalid byte or field list"));
-+ FATAL_ERROR (_("invalid byte, character or field list"));
-
- /* Is there already a range going to end of line? */
- if (eol_range_start != 0)
-@@ -467,6 +546,9 @@
- if (operating_mode == byte_mode)
- error (0, 0,
- _("byte offset %s is too large"), quote (bad_num));
-+ else if (operating_mode == character_mode)
-+ error (0, 0,
-+ _("character offset %s is too large"), quote (bad_num));
- else
- error (0, 0,
- _("field number %s is too large"), quote (bad_num));
-@@ -477,7 +559,7 @@
- fieldstr++;
- }
- else
-- FATAL_ERROR (_("invalid byte or field list"));
-+ FATAL_ERROR (_("invalid byte, character or field list"));
- }
-
- max_range_endpoint = 0;
-@@ -570,6 +652,63 @@
- }
- }
-
-+#if HAVE_MBRTOWC
-+/* This function is in use for the following case.
-+
-+ 1. Read from the stream STREAM, printing to standard output any selected
-+ characters.
-+
-+ 2. Read from stream STREAM, printing to standard output any selected bytes,
-+ without splitting multibyte characters. */
-+
-+static void
-+cut_characters_or_cut_bytes_no_split (FILE *stream)
-+{
-+ int idx; /* number of bytes or characters in the line so far. */
-+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
-+ char *bufpos; /* Next read position of BUF. */
-+ size_t buflen; /* The length of the byte sequence in buf. */
-+ wint_t wc; /* A gotten wide character. */
-+ size_t mblength; /* The byte size of a multibyte character which shows
-+ as same character as WC. */
-+ mbstate_t state; /* State of the stream. */
-+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
-+
-+ idx = 0;
-+ buflen = 0;
-+ bufpos = buf;
-+ memset (&state, '\0', sizeof(mbstate_t));
-+
-+ while (1)
-+ {
-+ REFILL_BUFFER (buf, bufpos, buflen, stream);
-+
-+ GET_NEXT_WC_FROM_BUFFER (wc, bufpos, buflen, mblength, state, convfail);
-+
-+ if (wc == WEOF)
-+ {
-+ if (idx > 0)
-+ putchar ('\n');
-+ break;
-+ }
-+ else if (wc == L'\n')
-+ {
-+ putchar ('\n');
-+ idx = 0;
-+ }
-+ else
-+ {
-+ idx += (operating_mode == byte_mode) ? mblength : 1;
-+ if (print_kth (idx, NULL))
-+ fwrite (bufpos, mblength, sizeof(char), stdout);
-+ }
-+
-+ buflen -= mblength;
-+ bufpos += mblength;
-+ }
-+}
-+#endif
-+
- /* Read from stream STREAM, printing to standard output any selected fields. */
-
- static void
-@@ -692,13 +831,192 @@
- }
- }
-
-+#if HAVE_MBRTOWC
-+static void
-+cut_fields_mb (FILE *stream)
-+{
-+ int c;
-+ unsigned int field_idx;
-+ int found_any_selected_field;
-+ int buffer_first_field;
-+ int empty_input;
-+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
-+ char *bufpos; /* Next read position of BUF. */
-+ size_t buflen; /* The length of the byte sequence in buf. */
-+ wint_t wc = 0; /* A gotten wide character. */
-+ size_t mblength; /* The byte size of a multibyte character which shows
-+ as same character as WC. */
-+ mbstate_t state; /* State of the stream. */
-+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
-+
-+ found_any_selected_field = 0;
-+ field_idx = 1;
-+ bufpos = buf;
-+ buflen = 0;
-+ memset (&state, '\0', sizeof(mbstate_t));
-+
-+ c = getc (stream);
-+ empty_input = (c == EOF);
-+ if (c != EOF)
-+ ungetc (c, stream);
-+ else
-+ wc = WEOF;
-+
-+ /* To support the semantics of the -s flag, we may have to buffer
-+ all of the first field to determine whether it is `delimited.'
-+ But that is unnecessary if all non-delimited lines must be printed
-+ and the first field has been selected, or if non-delimited lines
-+ must be suppressed and the first field has *not* been selected.
-+ That is because a non-delimited line has exactly one field. */
-+ buffer_first_field = (suppress_non_delimited ^ !print_kth (1, NULL));
-+
-+ while (1)
-+ {
-+ if (field_idx == 1 && buffer_first_field)
-+ {
-+ int len = 0;
-+
-+ while (1)
-+ {
-+ REFILL_BUFFER (buf, bufpos, buflen, stream);
-+
-+ GET_NEXT_WC_FROM_BUFFER
-+ (wc, bufpos, buflen, mblength, state, convfail);
-+
-+ if (wc == WEOF)
-+ break;
-+
-+ field_1_buffer = xrealloc (field_1_buffer, len + mblength);
-+ memcpy (field_1_buffer + len, bufpos, mblength);
-+ len += mblength;
-+ buflen -= mblength;
-+ bufpos += mblength;
-+
-+ if (!convfail && (wc == L'\n' || wc == wcdelim))
-+ break;
-+ }
-+
-+ if (wc == WEOF)
-+ break;
-+
-+ /* If the first field extends to the end of line (it is not
-+ delimited) and we are printing all non-delimited lines,
-+ print this one. */
-+ if (convfail || (!convfail && wc != wcdelim))
-+ {
-+ if (suppress_non_delimited)
-+ {
-+ /* Empty. */
-+ }
-+ else
-+ {
-+ fwrite (field_1_buffer, sizeof (char), len, stdout);
-+ /* Make sure the output line is newline terminated. */
-+ if (convfail || (!convfail && wc != L'\n'))
-+ putchar ('\n');
-+ }
-+ continue;
-+ }
-+
-+ if (print_kth (1, NULL))
-+ {
-+ /* Print the field, but not the trailing delimiter. */
-+ fwrite (field_1_buffer, sizeof (char), len - 1, stdout);
-+ found_any_selected_field = 1;
-+ }
-+ ++field_idx;
-+ }
-+
-+ if (wc != WEOF)
-+ {
-+ if (print_kth (field_idx, NULL))
-+ {
-+ if (found_any_selected_field)
-+ {
-+ fwrite (output_delimiter_string, sizeof (char),
-+ output_delimiter_length, stdout);
-+ }
-+ found_any_selected_field = 1;
-+ }
-+
-+ while (1)
-+ {
-+ REFILL_BUFFER (buf, bufpos, buflen, stream);
-+
-+ GET_NEXT_WC_FROM_BUFFER
-+ (wc, bufpos, buflen, mblength, state, convfail);
-+
-+ if (wc == WEOF)
-+ break;
-+ else if (!convfail && (wc == wcdelim || wc == L'\n'))
-+ {
-+ buflen -= mblength;
-+ bufpos += mblength;
-+ break;
-+ }
-+
-+ if (print_kth (field_idx, NULL))
-+ fwrite (bufpos, mblength, sizeof(char), stdout);
-+
-+ buflen -= mblength;
-+ bufpos += mblength;
-+ }
-+ }
-+
-+ if ((!convfail || wc == L'\n') && buflen < 1)
-+ wc = WEOF;
-+
-+ if (!convfail && wc == wcdelim)
-+ ++field_idx;
-+ else if (wc == WEOF || (!convfail && wc == L'\n'))
-+ {
-+ if (found_any_selected_field
-+ || (!empty_input && !(suppress_non_delimited && field_idx == 1)))
-+ putchar ('\n');
-+ if (wc == WEOF)
-+ break;
-+ field_idx = 1;
-+ found_any_selected_field = 0;
-+ }
-+ }
-+}
-+#endif
-+
- static void
- cut_stream (FILE *stream)
- {
-- if (operating_mode == byte_mode)
-- cut_bytes (stream);
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode)
-+ {
-+ switch (operating_mode)
-+ {
-+ case byte_mode:
-+ if (byte_mode_character_aware)
-+ cut_characters_or_cut_bytes_no_split (stream);
-+ else
-+ cut_bytes (stream);
-+ break;
-+
-+ case character_mode:
-+ cut_characters_or_cut_bytes_no_split (stream);
-+ break;
-+
-+ case field_mode:
-+ cut_fields_mb (stream);
-+ break;
-+
-+ default:
-+ abort ();
-+ }
-+ }
- else
-- cut_fields (stream);
-+#endif
-+ {
-+ if (operating_mode == field_mode)
-+ cut_fields (stream);
-+ else
-+ cut_bytes (stream);
-+ }
- }
-
- /* Process file FILE to standard output.
-@@ -748,6 +1066,8 @@
- bool ok;
- bool delim_specified = false;
- char *spec_list_string IF_LINT(= NULL);
-+ char mbdelim[MB_LEN_MAX + 1];
-+ size_t delimlen = 0;
-
- initialize_main (&argc, &argv);
- program_name = argv[0];
-@@ -770,7 +1090,6 @@
- switch (optc)
- {
- case 'b':
-- case 'c':
- /* Build the byte list. */
- if (operating_mode != undefined_mode)
- FATAL_ERROR (_("only one type of list may be specified"));
-@@ -778,6 +1097,14 @@
- spec_list_string = optarg;
- break;
-
-+ case 'c':
-+ /* Build the character list. */
-+ if (operating_mode != undefined_mode)
-+ FATAL_ERROR (_("only one type of list may be specified"));
-+ operating_mode = character_mode;
-+ spec_list_string = optarg;
-+ break;
-+
- case 'f':
- /* Build the field list. */
- if (operating_mode != undefined_mode)
-@@ -789,10 +1116,35 @@
- case 'd':
- /* New delimiter. */
- /* Interpret -d '' to mean `use the NUL byte as the delimiter.' */
-- if (optarg[0] != '\0' && optarg[1] != '\0')
-- FATAL_ERROR (_("the delimiter must be a single character"));
-- delim = optarg[0];
-- delim_specified = true;
-+#if HAVE_MBRTOWC
-+ {
-+ if(MB_CUR_MAX > 1)
-+ {
-+ mbstate_t state;
-+
-+ memset (&state, '\0', sizeof(mbstate_t));
-+ delimlen = mbrtowc (&wcdelim, optarg, strnlen(optarg, MB_LEN_MAX), &state);
-+
-+ if (delimlen == (size_t)-1 || delimlen == (size_t)-2)
-+ ++force_singlebyte_mode;
-+ else
-+ {
-+ delimlen = (delimlen < 1) ? 1 : delimlen;
-+ if (wcdelim != L'\0' && *(optarg + delimlen) != '\0')
-+ FATAL_ERROR (_("the delimiter must be a single character"));
-+ memcpy (mbdelim, optarg, delimlen);
-+ }
-+ }
-+
-+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode)
-+#endif
-+ {
-+ if (optarg[0] != '\0' && optarg[1] != '\0')
-+ FATAL_ERROR (_("the delimiter must be a single character"));
-+ delim = (unsigned char) optarg[0];
-+ }
-+ delim_specified = true;
-+ }
- break;
-
- case OUTPUT_DELIMITER_OPTION:
-@@ -805,6 +1157,7 @@
- break;
-
- case 'n':
-+ byte_mode_character_aware = 1;
- break;
-
- case 's':
-@@ -827,7 +1180,7 @@
- if (operating_mode == undefined_mode)
- FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
-
-- if (delim != '\0' && operating_mode != field_mode)
-+ if (delim_specified && operating_mode != field_mode)
- FATAL_ERROR (_("an input delimiter may be specified only\
- when operating on fields"));
-
-@@ -854,15 +1207,34 @@
- }
-
- if (!delim_specified)
-- delim = '\t';
-+ {
-+ delim = '\t';
-+#ifdef HAVE_MBRTOWC
-+ wcdelim = L'\t';
-+ mbdelim[0] = '\t';
-+ mbdelim[1] = '\0';
-+ delimlen = 1;
-+#endif
-+ }
-
- if (output_delimiter_string == NULL)
- {
-- static char dummy[2];
-- dummy[0] = delim;
-- dummy[1] = '\0';
-- output_delimiter_string = dummy;
-- output_delimiter_length = 1;
-+#ifdef HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode)
-+ {
-+ output_delimiter_string = xstrdup(mbdelim);
-+ output_delimiter_length = delimlen;
-+ }
-+
-+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode)
-+#endif
-+ {
-+ static char dummy[2];
-+ dummy[0] = delim;
-+ dummy[1] = '\0';
-+ output_delimiter_string = dummy;
-+ output_delimiter_length = 1;
-+ }
- }
-
- if (optind == argc)
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch
deleted file mode 100644
index aba8742f6a..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
-
-The package is stated as being Licensed as GPLv2+.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
---- coreutils-6.9/src/ls.c.ls-x 2007-06-13 14:27:36.000000000 +0100
-+++ coreutils-6.9/src/ls.c 2007-06-13 14:28:42.000000000 +0100
-@@ -4151,16 +4151,16 @@
- size_t pos = 0;
- size_t cols = calculate_columns (false);
- struct column_info const *line_fmt = &column_info[cols - 1];
-- size_t name_length = length_of_file_name_and_frills (cwd_file);
-+ struct fileinfo const *f = sorted_file[0];
-+ size_t name_length = length_of_file_name_and_frills (f);
- size_t max_name_length = line_fmt->col_arr[0];
-
- /* Print first entry. */
-- print_file_name_and_frills (cwd_file);
-+ print_file_name_and_frills (f);
-
- /* Now the rest. */
- for (filesno = 1; filesno < cwd_n_used; ++filesno)
- {
-- struct fileinfo const *f;
- size_t col = filesno % cols;
-
- if (col == 0)
---- coreutils-6.9/tests/ls/Makefile.am.ls-x 2007-03-18 21:36:43.000000000 +0000
-+++ coreutils-6.9/tests/ls/Makefile.am 2007-06-13 14:28:42.000000000 +0100
-@@ -24,7 +24,7 @@
- stat-dtype \
- inode dangle file-type recursive dired infloop \
- rt-1 time-1 symlink-slash follow-slink no-arg m-option \
-- stat-vs-dirent
-+ stat-vs-dirent x-option
-
- EXTRA_DIST = $(TESTS)
- TESTS_ENVIRONMENT = \
---- /dev/null 2007-06-13 08:43:51.993263382 +0100
-+++ coreutils-6.9/tests/ls/x-option 2007-06-13 14:28:42.000000000 +0100
-@@ -0,0 +1,59 @@
-+#!/bin/sh
-+# Exercise the -x option.
-+
-+# Copyright (C) 2007 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301, USA.
-+
-+if test "$VERBOSE" = yes; then
-+ set -x
-+ ls --version
-+fi
-+
-+. $srcdir/../envvar-check
-+. $srcdir/../lang-default
-+
-+pwd=`pwd`
-+t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-+trap '(exit $?); exit $?' 1 2 13 15
-+
-+framework_failure=0
-+mkdir -p $tmp || framework_failure=1
-+cd $tmp || framework_failure=1
-+mkdir subdir || framework_failure=1
-+touch subdir/b || framework_failure=1
-+touch subdir/a || framework_failure=1
-+
-+if test $framework_failure = 1; then
-+ echo "$0: failure in testing framework" 1>&2
-+ (exit 1); exit 1
-+fi
-+
-+fail=0
-+
-+# Coreutils 6.8 and 6.9 would output this in the wrong order.
-+ls -x subdir > out || fail=1
-+ls -rx subdir >> out || fail=1
-+cat <<\EOF > exp || fail=1
-+a b
-+b a
-+EOF
-+
-+cmp out exp || fail=1
-+test $fail = 1 && diff out exp 2> /dev/null
-+
-+(exit $fail); exit $fail
---- coreutils-6.9/NEWS.ls-x 2007-03-22 21:19:45.000000000 +0000
-+++ coreutils-6.9/NEWS 2007-06-13 14:28:42.000000000 +0100
-@@ -13,6 +13,11 @@
- Using pr -m -s (i.e. merging files, with TAB as the output separator)
- no longer inserts extraneous spaces between output columns.
-
-+** Bug fixes
-+
-+ ls -x DIR would sometimes output the wrong string in place of the
-+ first entry. [introduced in coreutils-6.8]
-+
-
- * Noteworthy changes in release 6.8 (2007-02-24) [not-unstable]
-
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch
deleted file mode 100644
index 58074c09a5..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
-
-The package is stated as being Licensed as GPLv2+.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
---- coreutils-5.2.1/src/who.c.overflow 2005-05-25 09:59:06.000000000 +0100
-+++ coreutils-5.2.1/src/who.c 2005-05-25 10:00:31.000000000 +0100
-@@ -75,7 +75,7 @@
- # define NEW_TIME 0
- #endif
-
--#define IDLESTR_LEN 6
-+#define IDLESTR_LEN 10
-
- #if HAVE_STRUCT_XTMP_UT_PID
- # define PIDSTR_DECL_AND_INIT(Var, Utmp_ent) \
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch
deleted file mode 100644
index 64e5f12baa..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| configure.ac:40: error: automatic de-ANSI-fication support has been removed
-| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
-| /srv/home/nitin/builds/build-gcc47/tmp/work/x86_64-linux/coreutils-native-6.9-r2/coreutils-6.9/m4/jm-macros.m4:138: gl_CHECK_ALL_TYPES is expanded from...
-| /srv/home/nitin/builds/build-gcc47/tmp/work/x86_64-linux/coreutils-native-6.9-r2/coreutils-6.9/m4/jm-macros.m4:24: coreutils_MACROS is expanded from...
-| configure.ac:40: the top level
-| autom4te: m4 failed with exit status: 1
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/04
-
-Index: coreutils-6.9/m4/jm-macros.m4
-===================================================================
---- coreutils-6.9.orig/m4/jm-macros.m4
-+++ coreutils-6.9/m4/jm-macros.m4
-@@ -142,11 +142,6 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
- dnl whether functions and headers are available, whether they work, etc.
- AC_REQUIRE([AC_SYS_LARGEFILE])
-
-- dnl This test must precede tests of compiler characteristics like
-- dnl that for the inline keyword, since it may change the degree to
-- dnl which the compiler supports such features.
-- AC_REQUIRE([AM_C_PROTOTYPES])
--
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_REQUIRE([AC_C_BIGENDIAN])
- AC_REQUIRE([AC_C_VOLATILE])
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/fix_for_manpage_building.patch b/meta/recipes-core/coreutils/coreutils-6.9/fix_for_manpage_building.patch
deleted file mode 100644
index e0d600a390..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/fix_for_manpage_building.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-Use native coreutils binaries to build manpages in cross environment.
-This avoids man page build issues like this:
-
-| Making all in man
-| make[1]: Entering directory `/build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/coreutils-6.9/man'
-| Updating man page cut.1
-| Updating man page dir.1
-| Updating man page expand.1
-| Updating man page fold.1
-| Updating man page install.1
-| Updating man page join.1
-| Updating man page pr.1
-| Updating man page ls.1
-| Updating man page sort.1
-| Updating man page unexpand.1
-| Updating man page uniq.1
-| Updating man page who.1
-| Updating man page vdir.1
-| help2man: can't get `--help' info from dir.td/dir
-| help2man: can't get `--help' info from cut.td/cut
-| make[1]: *** [dir.1] Error 126
-| make[1]: *** Waiting for unfinished jobs....
-| help2man: can't get `--help' info from fold.td/fold
-| help2man: can't get `--help' info from install.td/install
-| help2man: can't get `--help' info from expand.td/expand
-| help2man: can't get `--help' info from join.td/join
-| make[1]: *** [cut.1] Error 126
-| make[1]: *** [fold.1] Error 126
-| make[1]: *** [install.1] Error 126
-| help2man: can't get `--help' info from sort.td/sort
-| make[1]: *** [expand.1] Error 126
-| help2man: can't get `--help' info from pr.td/pr
-| make[1]: *** [join.1] Error 126
-| help2man: can't get `--help' info from ls.td/ls
-| help2man: can't get `--help' info from unexpand.td/unexpand
-| help2man: can't get `--help' info from uniq.td/uniq
-| help2man: can't get `--help' info from who.td/who
-| make[1]: *** [sort.1] Error 126
-| make[1]: *** [pr.1] Error 126
-| help2man: can't get `--help' info from vdir.td/vdir
-| make[1]: *** [ls.1] Error 126
-| make[1]: *** [uniq.1] Error 126
-| make[1]: *** [unexpand.1] Error 126
-| make[1]: *** [who.1] Error 126
-| make[1]: *** [vdir.1] Error 126
-| make[1]: Leaving directory `/build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/coreutils-6.9/man'
-| make: *** [all-recursive] Error 1
-| FATAL: oe_runmake failed
-| ERROR: Function 'do_compile' failed (see /build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/temp/log.do_compile.12780 for further information)
-NOTE: package coreutils-6.9-r0: task do_compile: Failed
-ERROR: Task 8 (/home/nitin/prj/poky.git/meta/recipes-core/coreutils/coreutils_6.9.bb, do_compile) failed with exit code '1'
-
-
-This patch is made for gplv2 coreutils the recipe
-Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/03/17
-
-Index: man/Makefile.am
-===================================================================
---- a/man.orig/Makefile.am
-+++ b/man/Makefile.am
-@@ -167,7 +167,7 @@ mapped_name = `echo $*|sed 's/install/gi
- $(PERL) -- $(srcdir)/help2man \
- --source='$(PACKAGE_STRING)' \
- --include=$(srcdir)/$*.x \
-- --output=$t/$@ $t/$*; \
-+ --output=$t/$@ $*; \
- } \
- && sed 's|$*\.td/||g' $t/$@ > $@ \
- && chmod a-w $@ \
-Index: man/Makefile.in
-===================================================================
---- a/man.orig/Makefile.in
-+++ b/man/Makefile.in
-@@ -865,7 +865,7 @@ yes.1: $(common_dep) $(srcdir)/yes.x .
- $(PERL) -- $(srcdir)/help2man \
- --source='$(PACKAGE_STRING)' \
- --include=$(srcdir)/$*.x \
-- --output=$t/$@ $t/$*; \
-+ --output=$t/$@ $*; \
- } \
- && sed 's|$*\.td/||g' $t/$@ > $@ \
- && chmod a-w $@ \
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch b/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
deleted file mode 100644
index 508810623d..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-# coreutils uses gnulib which conflicts with newer libc header on futimens
-# this patch simply renames coreutils futimes to avoid confliction
-#
-# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
-# (this patch is licensed under GPLv2)
-
-diff --git a/lib/utimens.c b/lib/utimens.c
-index 71bc510..ae870b8 100644
---- a/lib/utimens.c
-+++ b/lib/utimens.c
-@@ -75,7 +75,7 @@ struct utimbuf
- Return 0 on success, -1 (setting errno) on failure. */
-
- int
--futimens (int fd ATTRIBUTE_UNUSED,
-+futimens_coreutils (int fd ATTRIBUTE_UNUSED,
- char const *file, struct timespec const timespec[2])
- {
- /* Some Linux-based NFS clients are buggy, and mishandle time stamps
-@@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED,
- int
- utimens (char const *file, struct timespec const timespec[2])
- {
-- return futimens (-1, file, timespec);
-+ return futimens_coreutils (-1, file, timespec);
- }
-diff --git a/lib/utimens.h b/lib/utimens.h
-index 0097aaa..13fc45a 100644
---- a/lib/utimens.h
-+++ b/lib/utimens.h
-@@ -1,3 +1,3 @@
- #include <time.h>
--int futimens (int, char const *, struct timespec const [2]);
-+int futimens_coreutils (int, char const *, struct timespec const [2]);
- int utimens (char const *, struct timespec const [2]);
-diff --git a/src/copy.c b/src/copy.c
-index 4bdb75c..04634f1 100644
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -518,7 +518,7 @@ copy_reg (char const *src_name, char const *dst_name,
- timespec[0] = get_stat_atime (src_sb);
- timespec[1] = get_stat_mtime (src_sb);
-
-- if (futimens (dest_desc, dst_name, timespec) != 0)
-+ if (futimens_coreutils (dest_desc, dst_name, timespec) != 0)
- {
- error (0, errno, _("preserving times for %s"), quote (dst_name));
- if (x->require_preserve)
-diff --git a/src/touch.c b/src/touch.c
-index a79c26d..6ef317d 100644
---- a/src/touch.c
-+++ b/src/touch.c
-@@ -182,7 +182,7 @@ touch (const char *file)
- t = timespec;
- }
-
-- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
-+ ok = (futimens_coreutils (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
-
- if (fd == STDIN_FILENO)
- {
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch b/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
deleted file mode 100644
index 8a8ffa7264..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-# remove the line to cause recursive inclusion error from autoreconf, sicne
-# newer autoconf has included this definition. Simply rename it here.
-#
-# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
-# (this patch is licensed under GPLv2)
-
-diff --git a/extensions.m4 b/extensions.m4
-index 143a9e5..f6558f1 100644
---- a/m4/extensions.m4
-+++ b/m4/extensions.m4
-@@ -16,7 +16,7 @@
- # ------------------------
- # Enable extensions on systems that normally disable them,
- # typically due to standards-conformance issues.
--AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS_DUMMY],
- [
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/loadavg.patch b/meta/recipes-core/coreutils/coreutils-6.9/loadavg.patch
deleted file mode 100644
index c72efd4d30..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/loadavg.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Remove hardcoded paths so OE's configure QA does not detect it and fail the builds
-For cross compilation is less interesting to look into host paths for target libraries anyway
-
-Upstream-Status: Inappropriate [OE Specific]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: coreutils-6.9/m4/getloadavg.m4
-===================================================================
---- coreutils-6.9.orig/m4/getloadavg.m4
-+++ coreutils-6.9/m4/getloadavg.m4
-@@ -49,7 +49,6 @@ if test $gl_have_func = no; then
- # There is a commonly available library for RS/6000 AIX.
- # Since it is not a standard part of AIX, it might be installed locally.
- gl_getloadavg_LIBS=$LIBS
-- LIBS="-L/usr/local/lib $LIBS"
- AC_CHECK_LIB(getloadavg, getloadavg,
- [LIBS="-lgetloadavg $LIBS"], [LIBS=$gl_getloadavg_LIBS])
- fi
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch b/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
deleted file mode 100644
index 59a4fe0053..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-# man page for 'touch' is generated differently from others. All other utilities
-# are provided static man source files, while for 'touch' it requires help2man
-# to invoke "touch --help" and then convert the output into the manual. Since touch
-# is with target format which can't be invoked on build system, disable building
-# 'touch' man page here.
-#
-# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
-# (this patch is licensed under GPLv2)
-
-diff --git a/man/Makefile.am b/man/Makefile.am
-index 32df9d1..37b09e3 100644
---- a/man/Makefile.am
-+++ b/man/Makefile.am
-@@ -27,7 +27,7 @@ dist_man_MANS = \
- paste.1 pathchk.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
- rm.1 rmdir.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 sha384sum.1 sha512sum.1 \
- shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 \
-- su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
-+ su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 tr.1 true.1 tsort.1 \
- tty.1 unexpand.1 uniq.1 unlink.1 vdir.1 wc.1 \
- whoami.1 yes.1 $(MAN)
- optional_mans = \
diff --git a/meta/recipes-core/coreutils/coreutils-8.25/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-core/coreutils/coreutils-8.25/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.25/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gnulib.mk b/lib/gnulib.mk
-index e1d74db..c0e92dd 100644
---- a/lib/gnulib.mk
-+++ b/lib/gnulib.mk
-@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
---
-2.1.4
-
diff --git a/meta/recipes-core/coreutils/coreutils-8.25/man-decouple-manpages-from-build.patch b/meta/recipes-core/coreutils/coreutils-8.25/man-decouple-manpages-from-build.patch
deleted file mode 100644
index 3c896a11bf..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.25/man-decouple-manpages-from-build.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b4d258629f090066783c3b4c91b40f63b9d0a296 Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Sun, 8 Feb 2015 16:51:57 -0500
-Subject: [PATCH] man: decouple manpages from build
-
-The use of "help2man" doesn't work at all for cross compile, in
-addition to the extra requirement of perl it adds.
-
-Just decouple the manpages from the build in order to pave the way for
-importing prebuilt manpages that can be used in a cross build situation.
-
-Upstream-Status: Inappropriate [upstream doesn't care about x-compile case.]
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index fb4af27..7576b2c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -214,5 +214,4 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
- include $(top_srcdir)/lib/local.mk
- include $(top_srcdir)/src/local.mk
- include $(top_srcdir)/doc/local.mk
--include $(top_srcdir)/man/local.mk
- include $(top_srcdir)/tests/local.mk
---
-2.2.2
-
diff --git a/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch b/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
new file mode 100644
index 0000000000..66f9a716c9
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
@@ -0,0 +1,26 @@
+Subject: local.mk: fix cross compiling problem
+
+We meet the following error when cross compiling.
+| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
+This patch fixes this problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/local.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/local.mk b/src/local.mk
+index 36dfa4e..c5898cc 100644
+--- a/src/local.mk
++++ b/src/local.mk
+@@ -649,4 +649,4 @@ cu_install_program = @INSTALL_PROGRAM@
+ else
+ cu_install_program = src/ginstall
+ endif
+-INSTALL = $(cu_install_program) -c
++INSTALL_PROGRAM = $(cu_install_program)
+--
+2.1.0
+
diff --git a/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch b/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch
index 3c43e1d5da..3c43e1d5da 100644
--- a/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch
+++ b/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch
diff --git a/meta/recipes-core/coreutils/coreutils-8.25/disable-ls-output-quoting.patch b/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch
index e68c213550..e68c213550 100644
--- a/meta/recipes-core/coreutils/coreutils-8.25/disable-ls-output-quoting.patch
+++ b/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch
diff --git a/meta/recipes-core/coreutils/coreutils-8.25/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch
index 9d1ae55d47..9d1ae55d47 100644
--- a/meta/recipes-core/coreutils/coreutils-8.25/fix-selinux-flask.patch
+++ b/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch
diff --git a/meta/recipes-core/coreutils/coreutils-8.25/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch
index 2ef8a548ac..2ef8a548ac 100644
--- a/meta/recipes-core/coreutils/coreutils-8.25/remove-usr-local-lib-from-m4.patch
+++ b/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch
diff --git a/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch b/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch
new file mode 100644
index 0000000000..77770093cd
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch
@@ -0,0 +1,56 @@
+From 0562b040fa17f1722ba2b3096067b45d0582ca53 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Mon, 11 Mar 2019 16:40:29 -0700
+Subject: [PATCH] strtod: fix clash with strtold
+
+Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
+* lib/strtod.c (compute_minus_zero, minus_zero):
+Simplify by remving the macro / external variable,
+and having just a function. User changed. This avoids
+the need for an external variable that might clash.
+
+Upstream-Status: Backport [rhel5]
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+
+---
+ ChangeLog | 9 +++++++++
+ lib/strtod.c | 11 +++++------
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/lib/strtod.c b/lib/strtod.c
+index b9eaa51b4..69b1564e1 100644
+--- a/lib/strtod.c
++++ b/lib/strtod.c
+@@ -294,16 +294,15 @@ parse_number (const char *nptr,
+ ICC 10.0 has a bug when optimizing the expression -zero.
+ The expression -MIN * MIN does not work when cross-compiling
+ to PowerPC on Mac OS X 10.5. */
+-#if defined __hpux || defined __sgi || defined __ICC
+ static DOUBLE
+-compute_minus_zero (void)
++minus_zero (void)
+ {
++#if defined __hpux || defined __sgi || defined __ICC
+ return -MIN * MIN;
+-}
+-# define minus_zero compute_minus_zero ()
+ #else
+-DOUBLE minus_zero = -0.0;
++ return -0.0;
+ #endif
++}
+
+ /* Convert NPTR to a DOUBLE. If ENDPTR is not NULL, a pointer to the
+ character after the last one used in the number is put in *ENDPTR. */
+@@ -479,6 +478,6 @@ STRTOD (const char *nptr, char **endptr)
+ /* Special case -0.0, since at least ICC miscompiles negation. We
+ can't use copysign(), as that drags in -lm on some platforms. */
+ if (!num && negative)
+- return minus_zero;
++ return minus_zero ();
+ return negative ? -num : num;
+ }
+--
+2.20.1
+
diff --git a/meta/recipes-core/coreutils/coreutils_6.9.bb b/meta/recipes-core/coreutils/coreutils_6.9.bb
deleted file mode 100644
index 35700a32fd..0000000000
--- a/meta/recipes-core/coreutils/coreutils_6.9.bb
+++ /dev/null
@@ -1,107 +0,0 @@
-SUMMARY = "The basic file, shell and text manipulation utilities"
-DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
-manipulation utilities. These are the core utilities which are expected to exist on \
-every system."
-
-HOMEPAGE = "http://www.gnu.org/software/coreutils/"
-BUGTRACKER = "http://debbugs.gnu.org/coreutils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://src/ls.c;beginline=4;endline=16;md5=15ed60f67b1db5fedd5dbc37cf8a9543"
-PR = "r5"
-DEPENDS = "virtual/libiconv"
-
-inherit autotools gettext texinfo
-
-SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.bz2 \
- file://gnulib_m4.patch \
- file://futimens.patch \
- file://coreutils-ls-x.patch \
- file://coreutils-6.9-cp-i-u.patch \
- file://coreutils-i18n.patch \
- file://coreutils-overflow.patch \
- file://coreutils-fix-install.patch \
- file://man-touch.patch \
- file://coreutils_fix_for_automake-1.12.patch \
- file://coreutils-fix-texinfo.patch \
- file://fix_for_manpage_building.patch \
- file://loadavg.patch \
- "
-
-SRC_URI[md5sum] = "c9607d8495f16e98906e7ed2d9751a06"
-SRC_URI[sha256sum] = "89c2895ad157de50e53298b22d91db116ee4e1dd3fdf4019260254e2e31497b0"
-
-EXTRA_OECONF += "ac_cv_func_getgroups_works=yes \
- ac_cv_func_strcoll_works=yes"
-
-# acl is not a default feature
-#
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
-
-# with, without, depends, rdepends
-#
-PACKAGECONFIG[acl] = "ac_cv_header_sys_acl_h=yes ac_cv_header_acl_libacl_h=yes ac_cv_search_acl_get_file=-lacl,ac_cv_header_sys_acl_h=no ac_cv_header_acl_libacl_h=no ac_cv_search_acl_get_file=,acl,"
-
-
-# [ gets a special treatment and is not included in this
-bindir_progs = "base64 basename cksum comm csplit cut dir dircolors dirname du \
- env expand expr factor fmt fold groups head hostid id install \
- join link logname md5sum mkfifo nice nl nohup od paste pathchk \
- pinky pr printenv printf ptx readlink seq sha1sum sha224sum sha256sum \
- sha384sum sha512sum shred shuf sort split sum tac tail tee test \
- tr tsort tty unexpand uniq unlink users vdir wc who whoami yes uptime"
-
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
- mknod mv pwd rm rmdir sleep stty sync touch true uname hostname stat"
-
-sbindir_progs= "chroot"
-
-# Let aclocal use the relative path for the m4 file rather than the
-# absolute since coreutils has a lot of m4 files, otherwise there might
-# be an "Argument list too long" error when it is built in a long/deep
-# directory.
-acpaths = "-I ./m4"
-
-do_install() {
- autotools_do_install
-
- install -d ${D}${base_bindir}
- [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
-
- install -d ${D}${sbindir}
- [ "${bindir}" != "${sbindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i; done
-
- # [ requires special handling because [.coreutils will cause the sed stuff
- # in update-alternatives to fail, therefore use lbracket - the name used
- # for the actual source file.
- mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-
- # Newer versions of coreutils do not include su, to mimic this behavior
- # we simply remove it.
- rm -f ${D}${bindir}/su
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs}"
-
-ALTERNATIVE_${PN}-doc = "su.1 hostname.1"
-ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
-ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
-
-ALTERNATIVE_PRIORITY[uptime] = "10"
-ALTERNATIVE_PRIORITY[hostname] = "10"
-
-ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
-ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
-
-python __anonymous() {
- for prog in d.getVar('base_bindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
-
- for prog in d.getVar('sbindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog))
-}
diff --git a/meta/recipes-core/coreutils/coreutils_8.25.bb b/meta/recipes-core/coreutils/coreutils_8.25.bb
deleted file mode 100644
index df6ad380f3..0000000000
--- a/meta/recipes-core/coreutils/coreutils_8.25.bb
+++ /dev/null
@@ -1,142 +0,0 @@
-SUMMARY = "The basic file, shell and text manipulation utilities"
-DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
-manipulation utilities. These are the core utilities which are expected to exist on \
-every system."
-HOMEPAGE = "http://www.gnu.org/software/coreutils/"
-BUGTRACKER = "http://debbugs.gnu.org/coreutils"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
-DEPENDS = "gmp libcap"
-DEPENDS_class-native = ""
-
-inherit autotools gettext texinfo
-
-SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
- http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
- file://man-decouple-manpages-from-build.patch \
- file://remove-usr-local-lib-from-m4.patch \
- file://fix-selinux-flask.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://0001-uname-report-processor-and-hardware-correctly.patch \
- file://disable-ls-output-quoting.patch \
- "
-
-SRC_URI[tarball.md5sum] = "070e43ba7f618d747414ef56ab248a48"
-SRC_URI[tarball.sha256sum] = "31e67c057a5b32a582f26408c789e11c2e8d676593324849dcf5779296cdce87"
-SRC_URI[manpages.md5sum] = "415cc0552bc4e480b27ce8b2aebfdeb5"
-SRC_URI[manpages.sha256sum] = "2ee31c3a6d2276f49c5515375d4a0c1047580da6ac10536898e0f0de81707f29"
-
-EXTRA_OECONF_class-native = "--without-gmp"
-EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
-EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
-
-# acl and xattr are not default features
-#
-PACKAGECONFIG_class-target ??= "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
-"
-
-# The lib/oe/path.py requires xattr
-PACKAGECONFIG_class-native ??= "xattr"
-
-# with, without, depends, rdepends
-#
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-
-# [ df mktemp base64 gets a special treatment and is not included in this
-bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
- env expand expr factor fmt fold groups head hostid id install \
- join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
- pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
- sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\
- tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
-
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
- mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
-
-sbindir_progs= "chroot"
-
-# Let aclocal use the relative path for the m4 file rather than the
-# absolute since coreutils has a lot of m4 files, otherwise there might
-# be an "Argument list too long" error when it is built in a long/deep
-# directory.
-acpaths = "-I ./m4"
-
-# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
-do_compile_prepend () {
- mkdir -p ${B}/src
-}
-
-do_install_class-native() {
- autotools_do_install
- # remove groups to fix conflict with shadow-native
- rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
- # The return is a must since native doesn't need the
- # do_install_append() in the below.
- return
-}
-
-do_install_append() {
- for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
-
- install -d ${D}${base_bindir}
- [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
-
- install -d ${D}${sbindir}
- [ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
-
- # [ requires special handling because [.coreutils will cause the sed stuff
- # in update-alternatives to fail, therefore use lbracket - the name used
- # for the actual source file.
- mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-
- # prebuilt man pages
- install -d ${D}/${mandir}/man1
- install -t ${D}/${mandir}/man1 ${S}/man/*.1
- # prebuilt man pages don't do a separate man page for [ vs test.
- # see comment above r.e. sed and update-alternatives
- cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
-ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
-
-ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
-
-ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
-ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
-ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
-
-ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
-ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
-ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
-
-ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
-ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
-ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
-
-ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
-ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
-ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
-
-ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
-ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
-
-python __anonymous() {
- for prog in d.getVar('base_bindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
-
- for prog in d.getVar('sbindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog))
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/coreutils/coreutils_8.31.bb b/meta/recipes-core/coreutils/coreutils_8.31.bb
new file mode 100644
index 0000000000..57b2c1bdba
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils_8.31.bb
@@ -0,0 +1,145 @@
+SUMMARY = "The basic file, shell and text manipulation utilities"
+DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
+manipulation utilities. These are the core utilities which are expected to exist on \
+every system."
+HOMEPAGE = "http://www.gnu.org/software/coreutils/"
+BUGTRACKER = "http://debbugs.gnu.org/coreutils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://src/ls.c;beginline=1;endline=15;md5=c456f9896277a0543e3866777ccc0255"
+DEPENDS = "gmp libcap"
+DEPENDS_class-native = ""
+
+inherit autotools gettext texinfo
+
+SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
+ file://remove-usr-local-lib-from-m4.patch \
+ file://fix-selinux-flask.patch \
+ file://0001-uname-report-processor-and-hardware-correctly.patch \
+ file://disable-ls-output-quoting.patch \
+ file://0001-local.mk-fix-cross-compiling-problem.patch \
+ "
+
+SRC_URI_append_libc-musl = "file://strtod_fix_clash_with_strtold.patch"
+
+SRC_URI[md5sum] = "0009a224d8e288e8ec406ef0161f9293"
+SRC_URI[sha256sum] = "ff7a9c918edce6b4f4b2725e3f9b37b0c4d193531cac49a48b56c4d0d3a9e9fd"
+
+EXTRA_OECONF_class-native = "--without-gmp"
+EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}"
+EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch,hostname"
+
+# acl and xattr are not default features
+#
+PACKAGECONFIG_class-target ??= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
+"
+
+# The lib/oe/path.py requires xattr
+PACKAGECONFIG_class-native ??= "xattr"
+
+# with, without, depends, rdepends
+#
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+PACKAGECONFIG[single-binary] = "--enable-single-binary,--disable-single-binary,,"
+
+# [ df mktemp nice printenv base64 gets a special treatment and is not included in this
+bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
+ env expand expr factor fmt fold groups head hostid id install \
+ join link logname md5sum mkfifo nl nohup nproc od paste pathchk \
+ pinky pr printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
+ sha384sum sha512sum shred shuf sort split sum tac tail tee test timeout \
+ tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
+
+# hostname gets a special treatment and is not included in this
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \
+ mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
+
+sbindir_progs= "chroot"
+
+PACKAGE_BEFORE_PN_class-target += "coreutils-stdbuf"
+FILES_coreutils-stdbuf = "${bindir}/stdbuf ${libdir}/coreutils/libstdbuf.so"
+RDEPENDS_coreutils_class-target += "coreutils-stdbuf"
+
+# Let aclocal use the relative path for the m4 file rather than the
+# absolute since coreutils has a lot of m4 files, otherwise there might
+# be an "Argument list too long" error when it is built in a long/deep
+# directory.
+acpaths = "-I ./m4"
+
+# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
+do_compile_prepend () {
+ mkdir -p ${B}/src
+}
+
+do_install_class-native() {
+ autotools_do_install
+ # remove groups to fix conflict with shadow-native
+ rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
+ # The return is a must since native doesn't need the
+ # do_install_append() in the below.
+ return
+}
+
+do_install_append() {
+ for i in df mktemp nice printenv base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
+
+ install -d ${D}${base_bindir}
+ [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
+
+ install -d ${D}${sbindir}
+ [ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
+
+ # [ requires special handling because [.coreutils will cause the sed stuff
+ # in update-alternatives to fail, therefore use lbracket - the name used
+ # for the actual source file.
+ mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+# Make hostname's priority higher than busybox but lower than net-tools
+ALTERNATIVE_PRIORITY[hostname] = "90"
+ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 nice printenv mktemp df"
+ALTERNATIVE_${PN}-doc = "base64.1 nice.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
+
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+
+ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
+ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
+ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
+
+ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
+ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
+ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
+
+ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
+ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
+ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
+
+ALTERNATIVE_LINK_NAME[nice] = "${base_bindir}/nice"
+ALTERNATIVE_TARGET[nice] = "${bindir}/nice.${BPN}"
+ALTERNATIVE_LINK_NAME[nice.1] = "${mandir}/man1/nice.1"
+
+ALTERNATIVE_LINK_NAME[printenv] = "${base_bindir}/printenv"
+ALTERNATIVE_TARGET[printenv] = "${bindir}/printenv.${BPN}"
+
+ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
+ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
+
+ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
+
+python __anonymous() {
+ for prog in d.getVar('base_bindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
+
+ for prog in d.getVar('sbindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/dbus-wait/dbus-wait_git.bb b/meta/recipes-core/dbus-wait/dbus-wait_git.bb
index 691dc86e92..c24295b537 100644
--- a/meta/recipes-core/dbus-wait/dbus-wait_git.bb
+++ b/meta/recipes-core/dbus-wait/dbus-wait_git.bb
@@ -11,6 +11,7 @@ PV = "0.1+git${SRCPV}"
PR = "r2"
SRC_URI = "git://git.yoctoproject.org/${BPN}"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc
deleted file mode 100644
index 55f710f857..0000000000
--- a/meta/recipes-core/dbus/dbus-glib.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "High level language (GLib) binding for D-Bus"
-DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \
-the D-Bus library with the GLib thread abstraction and main loop."
-HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \
- file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-SECTION = "base"
-
-DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
-DEPENDS_class-native = "glib-2.0-native dbus-native"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
- file://no-examples.patch \
- file://test-install-makefile.patch \
-"
-
-inherit autotools pkgconfig gettext bash-completion gtk-doc
-
-#default disable regression tests, some unit test code in non testing code
-#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[tests] = "--enable-tests,,,"
-
-EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \
- --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
-EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml"
-
-PACKAGES += "${PN}-tests"
-
-FILES_${PN} = "${libdir}/lib*${SOLIBS}"
-FILES_${PN}-bash-completion += "${libexecdir}/dbus-bash-completion-helper"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
-FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
-
-RDEPENDS_${PN}-tests += "dbus-x11"
-FILES_${PN}-tests = "${datadir}/${BPN}/tests"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/dbus/dbus-glib/no-examples.patch b/meta/recipes-core/dbus/dbus-glib/no-examples.patch
index fbb4967828..32e7611718 100644
--- a/meta/recipes-core/dbus/dbus-glib/no-examples.patch
+++ b/meta/recipes-core/dbus/dbus-glib/no-examples.patch
@@ -5,11 +5,13 @@ Upstream-Status: Inappropriate [disable feature]
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200
-+++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200
+Index: dbus-glib-0.108/dbus/Makefile.am
+===================================================================
+--- dbus-glib-0.108.orig/dbus/Makefile.am
++++ dbus-glib-0.108/dbus/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = . examples
+SUBDIRS = .
- INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
-
+ AM_CPPFLAGS = \
+ -I$(top_srcdir) \
diff --git a/meta/recipes-core/dbus/dbus-glib_0.106.bb b/meta/recipes-core/dbus/dbus-glib_0.106.bb
deleted file mode 100644
index 0ae848e400..0000000000
--- a/meta/recipes-core/dbus/dbus-glib_0.106.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require dbus-glib.inc
-
-SRC_URI[md5sum] = "2eea0b7f52b49f600a07abfd8535d4e4"
-SRC_URI[sha256sum] = "b38952706dcf68bad9c302999ef0f420b8cf1a2428227123f0ac4764b689c046"
diff --git a/meta/recipes-core/dbus/dbus-glib_0.110.bb b/meta/recipes-core/dbus/dbus-glib_0.110.bb
new file mode 100644
index 0000000000..0b45805cf4
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib_0.110.bb
@@ -0,0 +1,39 @@
+SUMMARY = "High level language (GLib) binding for D-Bus"
+DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \
+the D-Bus library with the GLib thread abstraction and main loop."
+HOMEPAGE = "https://www.freedesktop.org/Software/dbus"
+LICENSE = "AFL-2.1 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \
+ file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+SECTION = "base"
+
+DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
+DEPENDS_class-native = "glib-2.0-native dbus-native"
+
+SRC_URI = "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
+ file://no-examples.patch \
+ file://test-install-makefile.patch \
+"
+SRC_URI[md5sum] = "d7cebf1d69445cbd28b4983392145192"
+SRC_URI[sha256sum] = "7ce4760cf66c69148f6bd6c92feaabb8812dee30846b24cd0f7395c436d7e825"
+
+inherit autotools pkgconfig gettext bash-completion gtk-doc
+
+#default disable regression tests, some unit test code in non testing code
+#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[tests] = "--enable-tests,,,"
+
+EXTRA_OECONF_class-target = "--with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
+
+PACKAGES += "${PN}-tests"
+
+FILES_${PN} = "${libdir}/lib*${SOLIBS}"
+FILES_${PN}-bash-completion += "${libexecdir}/dbus-bash-completion-helper"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
+FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
+
+RDEPENDS_${PN}-tests += "dbus-x11"
+FILES_${PN}-tests = "${datadir}/${BPN}/tests"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/dbus/dbus-test_1.10.10.bb b/meta/recipes-core/dbus/dbus-test_1.10.10.bb
deleted file mode 100644
index 650b7ab02b..0000000000
--- a/meta/recipes-core/dbus/dbus-test_1.10.10.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
- file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-
-DEPENDS = "dbus glib-2.0"
-
-RDEPENDS_${PN} += "make"
-RDEPENDS_${PN}-dev = ""
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
- file://tmpdir.patch \
- file://run-ptest \
- file://python-config.patch \
- file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
- "
-
-SRC_URI[md5sum] = "495676d240eb982921b3ad1343526849"
-SRC_URI[sha256sum] = "9d8f1d069ab4d1a0255d7b400ea3bcef4430c42e729b1012abb2890e3f739a43"
-
-S="${WORKDIR}/dbus-${PV}"
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
-
-inherit autotools pkgconfig gettext ptest upstream-version-is-even
-
-EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
-EXTRA_OECONF_X_class-native = "--without-x"
-
-EXTRA_OECONF = "--enable-tests \
- --enable-modular-tests \
- --enable-installed-tests \
- --enable-checks \
- --enable-asserts \
- --enable-verbose-mode \
- --disable-xml-docs \
- --disable-doxygen-docs \
- --disable-libaudit \
- --disable-systemd \
- --without-systemdsystemunitdir \
- --with-dbus-test-dir=${PTEST_PATH} \
- ${EXTRA_OECONF_X}"
-
-do_install() {
- :
-}
-
-do_install_ptest() {
- install -d ${D}${PTEST_PATH}/test
- l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
- for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
- l="bus bus-system bus-launch-helper"
- for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
- install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
- cp -r ${B}/test/data ${D}${PTEST_PATH}/test
-}
-RDEPENDS_${PN}-ptest += "bash"
diff --git a/meta/recipes-core/dbus/dbus-test_1.12.16.bb b/meta/recipes-core/dbus/dbus-test_1.12.16.bb
new file mode 100644
index 0000000000..bea0e74ed0
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-test_1.12.16.bb
@@ -0,0 +1,90 @@
+SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2.1 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+ file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+
+DEPENDS = "dbus glib-2.0"
+
+RDEPENDS_${PN}-dev = ""
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://run-ptest \
+ file://python-config.patch \
+ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+ "
+
+SRC_URI[md5sum] = "2dbeae80dfc9e3632320c6a53d5e8890"
+SRC_URI[sha256sum] = "54a22d2fa42f2eb2a871f32811c6005b531b9613b1b93a0d269b05e7549fec80"
+
+S="${WORKDIR}/dbus-${PV}"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
+
+inherit autotools pkgconfig gettext ptest upstream-version-is-even
+
+EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+EXTRA_OECONF_X_class-native = "--without-x"
+
+EXTRA_OECONF = "--enable-tests \
+ --enable-modular-tests \
+ --enable-installed-tests \
+ --enable-checks \
+ --enable-asserts \
+ --enable-largefile \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-libaudit \
+ --with-dbus-test-dir=${PTEST_PATH} \
+ ${EXTRA_OECONF_X} \
+ --enable-embedded-tests \
+ "
+
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,,"
+
+do_install() {
+ :
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \
+ variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service"
+ for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
+
+ l="bus bus-system bus-launch-helper"
+ for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
+
+ install -d ${D}${PTEST_PATH}/bus
+ install ${B}/bus/.libs/dbus-daemon-launch-helper-test ${D}${PTEST_PATH}/bus
+
+ install ${B}/test/test-segfault ${D}${PTEST_PATH}/test
+
+ cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+ install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
+
+ install -d ${D}${PTEST_PATH}/test/.libs
+ cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
+
+ # Remove build host references...
+ find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \
+ sed -i \
+ -e 's:${B}:${PTEST_PATH}:g' \
+ {} +
+ sed -i -e 's;@PTEST_PATH@;${PTEST_PATH};g' ${D}${PTEST_PATH}/run-ptest
+}
+
+RDEPENDS_${PN}-ptest += "bash make dbus"
+RDEPENDS_${PN}-ptest_remove = "${PN}"
+
+PRIVATE_LIBS_${PN}-ptest = "libdbus-1.so.3"
diff --git a/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch b/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
deleted file mode 100644
index 85acb7b1ca..0000000000
--- a/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1bfde222926be624a30a6e4b2cdc2c5064a36298 Mon Sep 17 00:00:00 2001
-From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
-Date: Fri, 29 Jul 2016 01:19:37 +0300
-Subject: [PATCH] configure.ac: explicitely check stdint.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Otherwise HAVE_STDINT_H will not be defined or the var will not be
-picked up from cache so builds could fail with errors like:
-| ../../dbus-1.10.8/dbus/dbus-internals.h:239:8: error: ‘uintptr_t’ undeclared (first use in this function)
-
-Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
-[smcv: fix Autoconf underquoting]
-Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-
-Upstream-Status: Backport [from dbus-1.10]
-
----
- configure.ac | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index cf5c5b9..a228d63 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -699,6 +699,8 @@ AC_CHECK_HEADERS(byteswap.h)
-
- AC_CHECK_HEADERS(unistd.h)
-
-+AC_CHECK_HEADERS([stdint.h])
-+
- AC_CHECK_HEADERS(ws2tcpip.h)
-
- AC_CHECK_HEADERS(alloca.h)
---
-2.9.2
-
diff --git a/meta/recipes-core/dbus/dbus/dbus-1.init b/meta/recipes-core/dbus/dbus/dbus-1.init
index 42c86297c3..90e167e572 100644
--- a/meta/recipes-core/dbus/dbus/dbus-1.init
+++ b/meta/recipes-core/dbus/dbus/dbus-1.init
@@ -21,8 +21,8 @@
DAEMON=@bindir@/dbus-daemon
NAME=dbus
-DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
-PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
+DAEMONUSER=messagebus # must match /usr/share/dbus-1/system.conf
+PIDFILE=/var/run/dbus/pid # must match /usr/share/dbus-1/system.conf
UUIDDIR=/var/lib/dbus
DESC="system message bus"
EVENTDIR=/etc/dbus-1/event.d
diff --git a/meta/recipes-core/dbus/dbus/os-test.patch b/meta/recipes-core/dbus/dbus/os-test.patch
deleted file mode 100644
index 54c257f813..0000000000
--- a/meta/recipes-core/dbus/dbus/os-test.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-dbus: remove build host test in configure script
-
-The dbus build tests the build host to detect what initscript
-environment it expects. Remove the test and set it to "redhat"
-unconditionally as the oe-core initscript has a redhat-style pid file
-path.
-
-Signed-off-by: Andy Ross <andy.ross@windriver.com>
-Upstream-Status: Inappropriate [embedded]
-
-diff -u a/configure.ac b/configure.ac
---- a/configure.ac 2012-08-28 11:23:43.040609874 -0700
-+++ b/configure.ac 2012-08-28 11:54:25.602913945 -0700
-@@ -1348,19 +1348,8 @@
- AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
- AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
-
--#### Check our operating system
--operating_system=unknown
--if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
-- operating_system=redhat
--fi
--
--if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
-- operating_system=slackware
--fi
--
--if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then
-- operating_system=cygwin
--fi
-+#### Build host test removed from upstream code, openembedded initscript is redhat-like:
-+operating_system=redhat
-
- #### Sort out init scripts
-
diff --git a/meta/recipes-core/dbus/dbus/run-ptest b/meta/recipes-core/dbus/dbus/run-ptest
index c72d083a91..48535e13da 100755
--- a/meta/recipes-core/dbus/dbus/run-ptest
+++ b/meta/recipes-core/dbus/dbus/run-ptest
@@ -1,10 +1,33 @@
#!/bin/sh
output() {
- if [ $? -eq 0 ]
+ retcode=$?
+ if [ $retcode -eq 0 ]
then echo "PASS: $i"
- else echo "FAIL: $i"
+ elif [ $retcode -eq 77 ]
+ then echo "SKIP: $i"
+ else echo "FAIL: $i"
fi
}
-for i in `ls test/test-*`; do ./$i ./test/data DBUS_TEST_HOMEDIR=./test >/dev/null; output; done
+export DBUS_TEST_HOMEDIR=./test
+export XDG_RUNTIME_DIR=./test
+export LD_LIBRARY_PATH=@PTEST_PATH@/test/.libs
+
+files=`ls test/test-*`
+
+for i in $files
+do
+ #these programs are used by testcase test-bus, don't run here
+ if [ $i = "test/test-service" ] \
+ || [ $i = "test/test-shell-service" ] \
+ || [ $i = "test/test-segfault" ] \
+ || [ $i = "test/test-bus" ]
+ then
+ continue
+ fi
+
+ ./$i ./test/data >/dev/null 2>&1
+ output
+done
+
diff --git a/meta/recipes-core/dbus/dbus_1.10.10.bb b/meta/recipes-core/dbus/dbus_1.10.10.bb
deleted file mode 100644
index 4db0b9b0b2..0000000000
--- a/meta/recipes-core/dbus/dbus_1.10.10.bb
+++ /dev/null
@@ -1,181 +0,0 @@
-SUMMARY = "D-Bus message bus"
-DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
- file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-DEPENDS = "expat virtual/libintl"
-RDEPENDS_dbus_class-native = ""
-RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
-ALLOW_EMPTY_dbus-ptest = "1"
-RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
- file://tmpdir.patch \
- file://dbus-1.init \
- file://os-test.patch \
- file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
- file://0001-configure.ac-explicitely-check-stdint.h.patch \
-"
-
-SRC_URI[md5sum] = "495676d240eb982921b3ad1343526849"
-SRC_URI[sha256sum] = "9d8f1d069ab4d1a0255d7b400ea3bcef4430c42e729b1012abb2890e3f739a43"
-
-inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
-
-INITSCRIPT_NAME = "dbus-1"
-INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
-
-python __anonymous() {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "-r netdev"
-USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
- --no-create-home --shell /bin/false \
- --user-group messagebus"
-
-CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
-
-DEBIANNAME_${PN} = "dbus-1"
-
-PACKAGES =+ "${PN}-lib"
-
-OLDPKGNAME = "dbus-x11"
-OLDPKGNAME_class-nativesdk = ""
-
-# for compatibility
-RPROVIDES_${PN} = "${OLDPKGNAME}"
-RREPLACES_${PN} += "${OLDPKGNAME}"
-
-FILES_${PN} = "${bindir}/dbus-daemon* \
- ${bindir}/dbus-uuidgen \
- ${bindir}/dbus-cleanup-sockets \
- ${bindir}/dbus-send \
- ${bindir}/dbus-monitor \
- ${bindir}/dbus-launch \
- ${bindir}/dbus-run-session \
- ${bindir}/dbus-update-activation-environment \
- ${libexecdir}/dbus* \
- ${sysconfdir} \
- ${localstatedir} \
- ${datadir}/dbus-1/services \
- ${datadir}/dbus-1/system-services \
- ${datadir}/dbus-1/session.d \
- ${datadir}/dbus-1/session.conf \
- ${datadir}/dbus-1/system.d \
- ${datadir}/dbus-1/system.conf \
- ${systemd_system_unitdir} \
- ${systemd_user_unitdir} \
-"
-FILES_${PN}-lib = "${libdir}/lib*.so.*"
-RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool"
-
-pkg_postinst_dbus() {
- # If both systemd and sysvinit are enabled, mask the dbus-1 init script
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
- if [ -n "$D" ]; then
- OPTS="--root=$D"
- fi
- systemctl $OPTS mask dbus-1.service
- fi
-
- if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
- /etc/init.d/populate-volatile.sh update
- fi
-}
-
-EXTRA_OECONF = "--disable-tests \
- --disable-xml-docs \
- --disable-doxygen-docs \
- --disable-libaudit \
- "
-
-EXTRA_OECONF_append_class-native = " --disable-selinux"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG_class-native = ""
-PACKAGECONFIG_class-nativesdk = ""
-
-PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
-PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
-PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
-PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
-
-do_install() {
- autotools_do_install
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
- install -d ${D}${sysconfdir}/init.d
- sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
- install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
- fi
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
- install -d ${D}${systemd_system_unitdir}/$i; done
- install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
- cd ${D}${systemd_system_unitdir}/dbus.target.wants/
- ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
- ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
- ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
- fi
-
- install -d ${D}${sysconfdir}/default/volatiles
- echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
- > ${D}${sysconfdir}/default/volatiles/99_dbus
-
-
- mkdir -p ${D}${localstatedir}/lib/dbus
-
- chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
-
- chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
- chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
-
- # Remove Red Hat initscript
- rm -rf ${D}${sysconfdir}/rc.d
-
- # Remove empty testexec directory as we don't build tests
- rm -rf ${D}${libdir}/dbus-1.0/test
-
- # Remove /var/run as it is created on startup
- rm -rf ${D}${localstatedir}/run
-}
-
-do_install_class-native() {
- autotools_do_install
-
- # for dbus-glib-native introspection generation
- install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
- # N.B. is below install actually required?
- install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
-
- # dbus-glib-native and dbus-glib need this xml file
- ./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
-
- # dbus-launch has no X support so lets not install it in case the host
- # has a more featured and useful version
- rm -f ${D}${bindir}/dbus-launch
-}
-
-do_install_class-nativesdk() {
- autotools_do_install
-
- # dbus-launch has no X support so lets not install it in case the host
- # has a more featured and useful version
- rm -f ${D}${bindir}/dbus-launch
-
- # Remove /var/run to avoid QA error
- rm -rf ${D}${localstatedir}/run
-}
-BBCLASSEXTEND = "native nativesdk"
-
-INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/meta/recipes-core/dbus/dbus_1.12.16.bb b/meta/recipes-core/dbus/dbus_1.12.16.bb
new file mode 100644
index 0000000000..82bb753731
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus_1.12.16.bb
@@ -0,0 +1,176 @@
+SUMMARY = "D-Bus message bus"
+DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
+HOMEPAGE = "https://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2.1 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+ file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+DEPENDS = "expat virtual/libintl autoconf-archive"
+RDEPENDS_dbus_class-native = ""
+RDEPENDS_dbus_class-nativesdk = ""
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
+ALLOW_EMPTY_dbus-ptest = "1"
+RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+
+SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://dbus-1.init \
+ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+"
+
+SRC_URI[md5sum] = "2dbeae80dfc9e3632320c6a53d5e8890"
+SRC_URI[sha256sum] = "54a22d2fa42f2eb2a871f32811c6005b531b9613b1b93a0d269b05e7549fec80"
+
+inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
+
+INITSCRIPT_NAME = "dbus-1"
+INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
+
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
+ --no-create-home --shell /bin/false \
+ --user-group messagebus"
+
+CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
+
+DEBIANNAME_${PN} = "dbus-1"
+
+PACKAGES =+ "${PN}-lib"
+
+OLDPKGNAME = "dbus-x11"
+OLDPKGNAME_class-nativesdk = ""
+
+# for compatibility
+RPROVIDES_${PN} = "${OLDPKGNAME}"
+RREPLACES_${PN} += "${OLDPKGNAME}"
+
+FILES_${PN} = "${bindir}/dbus-daemon* \
+ ${bindir}/dbus-uuidgen \
+ ${bindir}/dbus-cleanup-sockets \
+ ${bindir}/dbus-send \
+ ${bindir}/dbus-monitor \
+ ${bindir}/dbus-launch \
+ ${bindir}/dbus-run-session \
+ ${bindir}/dbus-update-activation-environment \
+ ${libexecdir}/dbus* \
+ ${sysconfdir} \
+ ${localstatedir} \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/session.d \
+ ${datadir}/dbus-1/session.conf \
+ ${datadir}/dbus-1/system.d \
+ ${datadir}/dbus-1/system.conf \
+ ${datadir}/xml/dbus-1 \
+ ${systemd_system_unitdir} \
+ ${systemd_user_unitdir} \
+ ${nonarch_libdir}/sysusers.d/dbus.conf \
+ ${nonarch_libdir}/tmpfiles.d/dbus.conf \
+"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+RRECOMMENDS_${PN}-lib = "${PN}"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
+
+PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
+pkg_postinst_dbus() {
+ # If both systemd and sysvinit are enabled, mask the dbus-1 init script
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask dbus-1.service
+ fi
+
+ if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+ /etc/init.d/populate-volatile.sh update
+ fi
+}
+
+
+EXTRA_OECONF = "--disable-tests \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-libaudit \
+ --enable-largefile \
+ --with-system-socket=/run/dbus/system_bus_socket \
+ "
+
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+EXTRA_OECONF_append_class-native = " --disable-selinux"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
+ user-session \
+ "
+
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
+do_install() {
+ autotools_do_install
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
+ install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
+ install -d ${D}${sysconfdir}/default/volatiles
+ echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
+ > ${D}${sysconfdir}/default/volatiles/99_dbus
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
+ install -d ${D}${systemd_system_unitdir}/$i; done
+ install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
+ ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
+ ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
+ ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
+ fi
+
+
+ mkdir -p ${D}${localstatedir}/lib/dbus
+
+ chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
+
+ chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
+ chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
+
+ # Remove Red Hat initscript
+ rm -rf ${D}${sysconfdir}/rc.d
+
+ # Remove empty testexec directory as we don't build tests
+ rm -rf ${D}${libdir}/dbus-1.0/test
+
+ # Remove /var/run as it is created on startup
+ rm -rf ${D}${localstatedir}/run
+}
+
+do_install_class-native() {
+ autotools_do_install
+
+ # dbus-launch has no X support so lets not install it in case the host
+ # has a more featured and useful version
+ rm -f ${D}${bindir}/dbus-launch
+}
+
+do_install_class-nativesdk() {
+ autotools_do_install
+
+ # dbus-launch has no X support so lets not install it in case the host
+ # has a more featured and useful version
+ rm -f ${D}${bindir}/dbus-launch
+
+ # Remove /var/run to avoid QA error
+ rm -rf ${D}${localstatedir}/run
+}
+BBCLASSEXTEND = "native nativesdk"
+
+INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index bda7eb847c..7269888a4e 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -7,22 +7,21 @@ SECTION = "console/network"
LICENSE = "MIT & BSD-3-Clause & BSD-2-Clause & PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a5ec40cafba26fc4396d0b550f824e01"
-DEPENDS = "zlib"
-RPROVIDES_${PN} = "ssh sshd"
+DEPENDS = "zlib virtual/crypt"
+RPROVIDES_${PN} = "ssh sshd"
+RCONFLICTS_${PN} = "openssh-sshd openssh"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
file://0001-urandom-xauth-changes-to-options.h.patch \
- file://0003-configure.patch \
- file://0004-fix-2kb-keys.patch \
- file://0007-dropbear-fix-for-x32-abi.patch \
- file://fix-libtomcrypt-libtommath-ordering.patch \
file://init \
file://dropbearkey.service \
file://dropbear@.service \
file://dropbear.socket \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} "
+ file://dropbear.default \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} "
PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
file://0006-dropbear-configuration-file.patch \
@@ -37,6 +36,8 @@ RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS
inherit autotools update-rc.d systemd
+CVE_PRODUCT = "dropbear_ssh"
+
INITSCRIPT_NAME = "dropbear"
INITSCRIPT_PARAMS = "defaults 10"
@@ -46,12 +47,17 @@ SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
-PACKAGECONFIG ?= ""
+PACKAGECONFIG ?= "disable-weak-ciphers"
PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
+PACKAGECONFIG[disable-weak-ciphers] = ""
EXTRA_OECONF += "\
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+# This option appends to CFLAGS and LDFLAGS from OE
+# This is causing [textrel] QA warning
+EXTRA_OECONF += "--disable-harden"
+
do_install() {
install -d ${D}${sysconfdir} \
${D}${sysconfdir}/init.d \
@@ -61,9 +67,16 @@ do_install() {
${D}${sbindir} \
${D}${localstatedir}
+ install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
+
install -m 0755 dropbearmulti ${D}${sbindir}/
- ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
-
+
+ for i in ${BINCOMMANDS}
+ do
+ # ssh and scp symlinks are created by update-alternatives
+ if [ $i = ssh ] || [ $i = scp ]; then continue; fi
+ ln -s ${sbindir}/dropbearmulti ${D}${bindir}/$i
+ done
for i in ${SBINCOMMANDS}
do
ln -s ./dropbearmulti ${D}${sbindir}/$i
@@ -74,7 +87,7 @@ do_install() {
-e 's,/usr/bin,${bindir},g' \
-e 's,/usr,${prefix},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/dropbear
chmod 755 ${D}${sysconfdir}/init.d/dropbear
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -d ${D}${sysconfdir}/pam.d
install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/
fi
@@ -93,7 +106,7 @@ do_install() {
inherit update-alternatives
ALTERNATIVE_PRIORITY = "20"
-ALTERNATIVE_${PN} = "scp ssh"
+ALTERNATIVE_${PN} = "${@bb.utils.filter('BINCOMMANDS', 'scp ssh', d)}"
ALTERNATIVE_TARGET = "${sbindir}/dropbearmulti"
@@ -105,3 +118,5 @@ pkg_postrm_append_${PN} () {
rm ${sysconfdir}/dropbear/dropbear_dss_host_key
fi
}
+
+FILES_${PN} += "${bindir}"
diff --git a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
index dc9d5782e8..684641dcbd 100644
--- a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
+++ b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
@@ -2,20 +2,20 @@ Subject: [PATCH 1/6] urandom-xauth-changes-to-options.h
Upstream-Status: Inappropriate [configuration]
---
- options.h | 2 +-
+ default_options.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/options.h b/options.h
-index 7d06322..71a21c2 100644
---- a/options.h
-+++ b/options.h
-@@ -247,7 +247,7 @@ much traffic. */
+diff --git a/default_options.h b/default_options.h
+index 3b75eb8..1fd8082 100644
+--- a/default_options.h
++++ b/default_options.h
+@@ -243,7 +243,7 @@ Homedir is prepended unless path begins with / */
+
/* The command to invoke for xauth when using X11 forwarding.
* "-q" for quiet */
- #ifndef XAUTH_COMMAND
-#define XAUTH_COMMAND "/usr/bin/xauth -q"
+#define XAUTH_COMMAND "xauth -q"
- #endif
+
/* if you want to enable running an sftp server (such as the one included with
--
diff --git a/meta/recipes-core/dropbear/dropbear/0003-configure.patch b/meta/recipes-core/dropbear/dropbear/0003-configure.patch
deleted file mode 100644
index c53ab01ddd..0000000000
--- a/meta/recipes-core/dropbear/dropbear/0003-configure.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From c5f5c5054c1b15539dccf866e2c3faba7ed68456 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
-Date: Thu, 25 Apr 2013 00:27:25 +0200
-Subject: [PATCH 3/6] configure: add a variable to allow openpty check to be cached
-
-Upstream-Status: Pending
-
----
- configure.ac | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 05461f3..9c16d90 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -166,15 +166,20 @@ AC_ARG_ENABLE(openpty,
- AC_MSG_NOTICE(Not using openpty)
- else
- AC_MSG_NOTICE(Using openpty if available)
-- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)])
-+ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes])
- fi
- ],
- [
- AC_MSG_NOTICE(Using openpty if available)
-- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)])
-+ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes])
- ]
- )
--
-+
-+if test "x$dropbear_cv_func_have_openpty" = "xyes"; then
-+ AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)
-+ no_ptc_check=yes
-+ no_ptmx_check=yes
-+fi
-
- AC_ARG_ENABLE(syslog,
- [ --disable-syslog Don't include syslog support],
---
-1.7.11.7
-
diff --git a/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch b/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
deleted file mode 100644
index 7539d2034f..0000000000
--- a/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Subject: [PATCH 4/6] fix 2kb keys
-
-Upstream-Status: Inappropriate [configuration]
----
- kex.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/kex.h b/kex.h
-index 72430e9..375c677 100644
---- a/kex.h
-+++ b/kex.h
-@@ -67,6 +67,6 @@ struct KEXState {
- };
-
-
--#define MAX_KEXHASHBUF 2000
-+#define MAX_KEXHASHBUF 3000
-
- #endif /* _KEX_H_ */
---
-1.7.11.7
-
diff --git a/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch b/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
index 539cb12e91..857681520c 100644
--- a/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
+++ b/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
@@ -3,7 +3,7 @@ From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Wed, 2 Dec 2015 11:36:02 +0200
Subject: Enable pam
-We need modify file option.h besides enabling pam in
+We need modify file default_options.h besides enabling pam in
configure if we want dropbear to support pam.
Upstream-Status: Pending
@@ -11,26 +11,32 @@ Upstream-Status: Pending
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
- options.h | 4 ++--
+ default_options.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/options.h b/options.h
-index 94261f6..90bfe2f 100644
---- a/options.h
-+++ b/options.h
-@@ -208,10 +208,10 @@ If you test it please contact the Dropbear author */
+diff --git a/default_options.h b/default_options.h
+index 3b75eb8..8617cd0 100644
+--- a/default_options.h
++++ b/default_options.h
+@@ -179,7 +179,7 @@ group1 in Dropbear server too */
- /* This requires crypt() */
- #ifdef HAVE_CRYPT
--#define ENABLE_SVR_PASSWORD_AUTH
-+/*#define ENABLE_SVR_PASSWORD_AUTH*/
- #endif
- /* PAM requires ./configure --enable-pam */
--/*#define ENABLE_SVR_PAM_AUTH */
-+#define ENABLE_SVR_PAM_AUTH
- #define ENABLE_SVR_PUBKEY_AUTH
+ /* Authentication Types - at least one required.
+ RFC Draft requires pubkey auth, and recommends password */
+-#define DROPBEAR_SVR_PASSWORD_AUTH 1
++#define DROPBEAR_SVR_PASSWORD_AUTH 0
+
+ /* Note: PAM auth is quite simple and only works for PAM modules which just do
+ * a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c).
+@@ -187,7 +187,7 @@ group1 in Dropbear server too */
+ * but there's an interface via a PAM module. It won't work for more complex
+ * PAM challenge/response.
+ * You can't enable both PASSWORD and PAM. */
+-#define DROPBEAR_SVR_PAM_AUTH 0
++#define DROPBEAR_SVR_PAM_AUTH 1
+
+ /* ~/.ssh/authorized_keys authentication */
+ #define DROPBEAR_SVR_PUBKEY_AUTH 1
- /* Whether to take public key options in
--
2.1.4
diff --git a/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch b/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch
index fa4c8d0a67..deed78ffb9 100644
--- a/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch
+++ b/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch
@@ -1,4 +1,7 @@
-Subject: [PATCH 6/6] dropbear configuration file
+From e3a5db1b6d3f6382a15b2266458c26c645a10f18 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Thu, 6 Sep 2018 15:54:00 +0800
+Subject: [PATCH] dropbear configuration file
dropbear: Change the path ("/etc/pam.d/sshd" as default) to find a pam configuration file \
to "/etc/pam.d/dropbear for dropbear when enabling pam supporting"
@@ -7,12 +10,17 @@ Upstream-Status: Inappropriate [configuration]
Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
-diff -Naur dropbear-2013.60-orig/svr-authpam.c dropbear-2013.60/svr-authpam.c
---- dropbear-2013.60-orig/svr-authpam.c 2013-10-16 16:34:53.000000000 +0200
-+++ dropbear-2013.60/svr-authpam.c 2013-10-21 17:04:04.969416055 +0200
-@@ -211,7 +211,7 @@
- userData.passwd = password;
+ svr-authpam.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/svr-authpam.c b/svr-authpam.c
+index d201bc9..165ec5c 100644
+--- a/svr-authpam.c
++++ b/svr-authpam.c
+@@ -223,7 +223,7 @@ void svr_auth_pam(int valid_user) {
+ }
/* Init pam */
- if ((rc = pam_start("sshd", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
@@ -20,3 +28,6 @@ diff -Naur dropbear-2013.60-orig/svr-authpam.c dropbear-2013.60/svr-authpam.c
dropbear_log(LOG_WARNING, "pam_start() failed, rc=%d, %s",
rc, pam_strerror(pamHandlep, rc));
goto cleanup;
+--
+2.7.4
+
diff --git a/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch b/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch
deleted file mode 100644
index 60b302b5cd..0000000000
--- a/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-Upstream-Status: Pending
-
-The dropbearkey utility built in x32 abi format, when generating ssh
-keys, was getting lost in the infinite loop.
-
-This patch fixes the issue by fixing types of variables and
-parameters of functions used in the code, which were getting
-undesired size, when compiled with the x32 abi toolchain.
-
-2013/05/23
-Received this fix from H J Lu.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-# HG changeset patch
-# User H.J. Lu <hjl.tools@gmail.com>
-# Date 1369344079 25200
-# Node ID a10a1c46b857cc8a3923c3bb6d1504aa25b6052f
-# Parent e76614145aea67f66e4a4257685c771efba21aa1
-Typdef mp_digit to unsigned long long for MP_64BIT
-
-When GCC is used with MP_64BIT, we should typedef mp_digit to unsigned
-long long instead of unsigned long since for x32, unsigned long is
-32-bit and unsigned long long is 64-bit and it is safe to use unsigned
-long long for 64-bit integer with GCC.
-
-diff -r e76614145aea -r a10a1c46b857 libtommath/tommath.h
---- a/libtommath/tommath.h Thu Apr 18 22:57:47 2013 +0800
-+++ b/libtommath/tommath.h Thu May 23 14:21:19 2013 -0700
-@@ -73,7 +73,7 @@
- typedef signed long long long64;
- #endif
-
-- typedef unsigned long mp_digit;
-+ typedef unsigned long long mp_digit;
- typedef unsigned long mp_word __attribute__ ((mode(TI)));
-
- #define DIGIT_BIT 60
-# HG changeset patch
-# User H.J. Lu <hjl.tools@gmail.com>
-# Date 1369344241 25200
-# Node ID c7555a4cb7ded3a88409ba85f4027baa7af5f536
-# Parent a10a1c46b857cc8a3923c3bb6d1504aa25b6052f
-Cast to mp_digit when updating *rho
-
-There is
-
-int
-mp_montgomery_setup (mp_int * n, mp_digit * rho)
-
-We should cast to mp_digit instead of unsigned long when updating
-*rho since mp_digit may be unsigned long long and unsigned long long
-may be different from unsigned long, like in x32.
-
-diff -r a10a1c46b857 -r c7555a4cb7de libtommath/bn_mp_montgomery_setup.c
---- a/libtommath/bn_mp_montgomery_setup.c Thu May 23 14:21:19 2013 -0700
-+++ b/libtommath/bn_mp_montgomery_setup.c Thu May 23 14:24:01 2013 -0700
-@@ -48,7 +48,7 @@
- #endif
-
- /* rho = -1/m mod b */
-- *rho = (unsigned long)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
-+ *rho = (mp_digit)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
-
- return MP_OKAY;
- }
-# HG changeset patch
-# User H.J. Lu <hjl.tools@gmail.com>
-# Date 1369344541 25200
-# Node ID 7c656e7071a6412688b2f30a529a9afac6c7bf5a
-# Parent c7555a4cb7ded3a88409ba85f4027baa7af5f536
-Define LTC_FAST_TYPE to unsigned long long for __x86_64__
-
-We should define LTC_FAST_TYPE to unsigned long long instead of unsigned
-long if __x86_64__ to support x32 where unsigned long long is 64-bit
-and unsigned long is 32-bit.
-
-diff -r c7555a4cb7de -r 7c656e7071a6 libtomcrypt/src/headers/tomcrypt_cfg.h
---- a/libtomcrypt/src/headers/tomcrypt_cfg.h Thu May 23 14:24:01 2013 -0700
-+++ b/libtomcrypt/src/headers/tomcrypt_cfg.h Thu May 23 14:29:01 2013 -0700
-@@ -74,7 +74,7 @@
- #define ENDIAN_LITTLE
- #define ENDIAN_64BITWORD
- #define LTC_FAST
-- #define LTC_FAST_TYPE unsigned long
-+ #define LTC_FAST_TYPE unsigned long long
- #endif
-
- /* detect PPC32 */
-# HG changeset patch
-# User H.J. Lu <hjl.tools@gmail.com>
-# Date 1369344730 25200
-# Node ID a7d4690158fae4ede2c4e5b56233e83730bf38ee
-# Parent 7c656e7071a6412688b2f30a529a9afac6c7bf5a
-Use unsigned long long aas unsigned 64-bit integer for x86-64 GCC
-
-We should use unsigned long long instead of unsigned long as unsigned
-64-bit integer for x86-64 GCC to support x32 where unsigned long is
-32-bit.
-
-diff -r 7c656e7071a6 -r a7d4690158fa libtomcrypt/src/headers/tomcrypt_macros.h
---- a/libtomcrypt/src/headers/tomcrypt_macros.h Thu May 23 14:29:01 2013 -0700
-+++ b/libtomcrypt/src/headers/tomcrypt_macros.h Thu May 23 14:32:10 2013 -0700
-@@ -343,7 +343,7 @@
- /* 64-bit Rotates */
- #if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM)
-
--static inline unsigned long ROL64(unsigned long word, int i)
-+static inline unsigned long long ROL64(unsigned long long word, int i)
- {
- asm("rolq %%cl,%0"
- :"=r" (word)
-@@ -351,7 +351,7 @@
- return word;
- }
-
--static inline unsigned long ROR64(unsigned long word, int i)
-+static inline unsigned long long ROR64(unsigned long long word, int i)
- {
- asm("rorq %%cl,%0"
- :"=r" (word)
-@@ -361,7 +361,7 @@
-
- #ifndef LTC_NO_ROLC
-
--static inline unsigned long ROL64c(unsigned long word, const int i)
-+static inline unsigned long long ROL64c(unsigned long long word, const int i)
- {
- asm("rolq %2,%0"
- :"=r" (word)
-@@ -369,7 +369,7 @@
- return word;
- }
-
--static inline unsigned long ROR64c(unsigned long word, const int i)
-+static inline unsigned long long ROR64c(unsigned long long word, const int i)
- {
- asm("rorq %2,%0"
- :"=r" (word)
-
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch b/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
new file mode 100644
index 0000000000..e48a34bac0
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
@@ -0,0 +1,44 @@
+This feature disables all CBC, SHA1, and diffie-hellman group1 ciphers
+in the dropbear ssh server and client since they're considered weak ciphers
+and we want to support the stong algorithms.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Joseph Reynolds <joseph.reynolds1@ibm.com>
+
+Index: dropbear-2019.78/default_options.h
+===================================================================
+--- dropbear-2019.78.orig/default_options.h
++++ dropbear-2019.78/default_options.h
+@@ -91,7 +91,7 @@ IMPORTANT: Some options will require "ma
+
+ /* Enable CBC mode for ciphers. This has security issues though
+ * is the most compatible with older SSH implementations */
+-#define DROPBEAR_ENABLE_CBC_MODE 1
++#define DROPBEAR_ENABLE_CBC_MODE 0
+
+ /* Enable "Counter Mode" for ciphers. This is more secure than
+ * CBC mode against certain attacks. It is recommended for security
+@@ -101,7 +101,7 @@ IMPORTANT: Some options will require "ma
+ /* Message integrity. sha2-256 is recommended as a default,
+ sha1 for compatibility */
+ #define DROPBEAR_SHA1_HMAC 1
+-#define DROPBEAR_SHA1_96_HMAC 1
++#define DROPBEAR_SHA1_96_HMAC 0
+ #define DROPBEAR_SHA2_256_HMAC 1
+
+ /* Hostkey/public key algorithms - at least one required, these are used
+@@ -149,12 +149,12 @@ IMPORTANT: Some options will require "ma
+ * Small systems should generally include either curve25519 or ecdh for performance.
+ * curve25519 is less widely supported but is faster
+ */
+-#define DROPBEAR_DH_GROUP14_SHA1 1
++#define DROPBEAR_DH_GROUP14_SHA1 0
+ #define DROPBEAR_DH_GROUP14_SHA256 1
+ #define DROPBEAR_DH_GROUP16 0
+ #define DROPBEAR_CURVE25519 1
+ #define DROPBEAR_ECDH 1
+-#define DROPBEAR_DH_GROUP1 1
++#define DROPBEAR_DH_GROUP1 0
+
+ /* When group1 is enabled it will only be allowed by Dropbear client
+ not as a server, due to concerns over its strength. Set to 0 to allow
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear.default b/meta/recipes-core/dropbear/dropbear/dropbear.default
new file mode 100644
index 0000000000..522453a86c
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/dropbear.default
@@ -0,0 +1,2 @@
+# Disallow root logins by default
+DROPBEAR_EXTRA_ARGS="-w"
diff --git a/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch b/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
deleted file mode 100644
index de930f29d1..0000000000
--- a/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 2fd8d2aedad0c50cdf1e43edd2387874b720ad4c Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Fri, 16 Sep 2016 12:18:23 -0700
-Subject: [PATCH] fix libtomcrypt/libtommath ordering
-
-To prevent build failures when using system libtom libraries and
-linking with --as-needed, LIBTOM_LIBS should be in the order
--ltomcrypt -ltommath, not the other way around, ie libs should be
-prepended to LIBTOM_LIBS as they are found, not appended.
-
-Note that LIBTOM_LIBS is not used when linking with the bundled
-libtom libs.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- configure.ac | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b6abe4c..85bb8bc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -390,16 +390,16 @@ AC_ARG_ENABLE(bundled-libtom,
- AC_MSG_NOTICE(Forcing bundled libtom*)
- else
- BUNDLED_LIBTOM=0
-- AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath",
-+ AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS",
- [AC_MSG_ERROR([Missing system libtommath and --disable-bundled-libtom was specified])] )
-- AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt",
-+ AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS",
- [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] )
- fi
- ],
- [
- BUNDLED_LIBTOM=0
-- AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath", BUNDLED_LIBTOM=1)
-- AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt", BUNDLED_LIBTOM=1)
-+ AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS", BUNDLED_LIBTOM=1)
-+ AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS", BUNDLED_LIBTOM=1)
- ]
- )
-
---
-1.9.1
-
diff --git a/meta/recipes-core/dropbear/dropbear/init b/meta/recipes-core/dropbear/dropbear/init
index 434bd6b971..ffab7a2362 100755
--- a/meta/recipes-core/dropbear/dropbear/init
+++ b/meta/recipes-core/dropbear/dropbear/init
@@ -17,8 +17,11 @@ NAME=dropbear
DESC="Dropbear SSH server"
PIDFILE=/var/run/dropbear.pid
+# These values may be replaced by those from /etc/default/dropbear
+DROPBEAR_RSAKEY_DIR="/etc/dropbear"
DROPBEAR_PORT=22
DROPBEAR_EXTRA_ARGS=
+DROPBEAR_RSAKEY_ARGS=
NO_START=0
set -e
@@ -28,61 +31,27 @@ test "$NO_START" = "0" || exit 0
test -x "$DAEMON" || exit 0
test ! -h /var/service/dropbear || exit 0
-readonly_rootfs=0
-for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }' </proc/mounts`; do
- case $flag in
- ro)
- readonly_rootfs=1
- ;;
- esac
-done
-
-if [ $readonly_rootfs = "1" ]; then
- mkdir -p /var/lib/dropbear
- DROPBEAR_RSAKEY_DEFAULT="/var/lib/dropbear/dropbear_rsa_host_key"
- DROPBEAR_DSSKEY_DEFAULT="/var/lib/dropbear/dropbear_dss_host_key"
-else
- DROPBEAR_RSAKEY_DEFAULT="/etc/dropbear/dropbear_rsa_host_key"
- DROPBEAR_DSSKEY_DEFAULT="/etc/dropbear/dropbear_dss_host_key"
-fi
-
test -z "$DROPBEAR_BANNER" || \
DROPBEAR_EXTRA_ARGS="$DROPBEAR_EXTRA_ARGS -b $DROPBEAR_BANNER"
test -n "$DROPBEAR_RSAKEY" || \
- DROPBEAR_RSAKEY=$DROPBEAR_RSAKEY_DEFAULT
-test -n "$DROPBEAR_DSSKEY" || \
- DROPBEAR_DSSKEY=$DROPBEAR_DSSKEY_DEFAULT
-test -n "$DROPBEAR_KEYTYPES" || \
- DROPBEAR_KEYTYPES="rsa"
+ DROPBEAR_RSAKEY="${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key"
gen_keys() {
-for t in $DROPBEAR_KEYTYPES; do
- case $t in
- rsa)
- if [ -f "$DROPBEAR_RSAKEY" -a ! -s "$DROPBEAR_RSAKEY" ]; then
- rm $DROPBEAR_RSAKEY || true
- fi
- test -f $DROPBEAR_RSAKEY || dropbearkey -t rsa -f $DROPBEAR_RSAKEY $DROPBEAR_RSAKEY_ARGS
- ;;
- dsa)
- if [ -f "$DROPBEAR_DSSKEY" -a ! -s "$DROPBEAR_DSSKEY" ]; then
- rm $DROPBEAR_DSSKEY || true
- fi
- test -f $DROPBEAR_DSSKEY || dropbearkey -t dss -f $DROPBEAR_DSSKEY $DROPBEAR_DSSKEY_ARGS
- ;;
- esac
-done
+ if [ -f "$DROPBEAR_RSAKEY" -a ! -s "$DROPBEAR_RSAKEY" ]; then
+ rm $DROPBEAR_RSAKEY || true
+ fi
+ if [ ! -f "$DROPBEAR_RSAKEY" ]; then
+ mkdir -p ${DROPBEAR_RSAKEY%/*}
+ dropbearkey -t rsa -f $DROPBEAR_RSAKEY $DROPBEAR_RSAKEY_ARGS
+ fi
}
case "$1" in
start)
echo -n "Starting $DESC: "
gen_keys
- KEY_ARGS=""
- test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d $DROPBEAR_DSSKEY"
- test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_RSAKEY"
start-stop-daemon -S -p $PIDFILE \
- -x "$DAEMON" -- $KEY_ARGS \
+ -x "$DAEMON" -- -r $DROPBEAR_RSAKEY \
-p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
echo "$NAME."
;;
@@ -95,11 +64,8 @@ case "$1" in
echo -n "Restarting $DESC: "
start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
sleep 1
- KEY_ARGS=""
- test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d $DROPBEAR_DSSKEY"
- test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_RSAKEY"
start-stop-daemon -S -p $PIDFILE \
- -x "$DAEMON" -- $KEY_ARGS \
+ -x "$DAEMON" -- -r $DROPBEAR_RSAKEY \
-p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
echo "$NAME."
;;
diff --git a/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch b/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch
deleted file mode 100644
index df6efb4534..0000000000
--- a/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From: =?UTF-8?q?Henrik=20Nordstr=C3=B6m?= <henrik@knc.nu>
-Date: Wed, 11 May 2016 12:35:06 +0200
-Subject: [PATCH] Support out-of-tree builds usign bundled libtom
-
-When building out-of-tree we need both source and generated
-folders in include paths to find both distributed and generated
-headers.
-
-
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Backport
----
- libtomcrypt/Makefile.in | 2 +-
- libtommath/Makefile.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libtomcrypt/Makefile.in b/libtomcrypt/Makefile.in
-index 3056ef0..7970700 100644
---- a/libtomcrypt/Makefile.in
-+++ b/libtomcrypt/Makefile.in
-@@ -19,7 +19,7 @@ srcdir=@srcdir@
-
- # Compilation flags. Note the += does not write over the user's CFLAGS!
- # The rest of the flags come from the parent Dropbear makefile
--CFLAGS += -c -I$(srcdir)/src/headers/ -I$(srcdir)/../ -DLTC_SOURCE -I$(srcdir)/../libtommath/
-+CFLAGS += -c -Isrc/headers/ -I$(srcdir)/src/headers/ -I../ -I$(srcdir)/../ -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/
-
- # additional warnings (newer GCC 3.4 and higher)
- ifdef GCC_34
-diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in
-index 06aba68..019c50b 100644
---- a/libtommath/Makefile.in
-+++ b/libtommath/Makefile.in
-@@ -9,7 +9,7 @@ VPATH=@srcdir@
- srcdir=@srcdir@
-
- # So that libtommath can include Dropbear headers for options and m_burn()
--CFLAGS += -I$(srcdir)/../libtomcrypt/src/headers/ -I$(srcdir)/../
-+CFLAGS += -I. -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../
-
- ifndef IGNORE_SPEED
-
diff --git a/meta/recipes-core/dropbear/dropbear_2016.74.bb b/meta/recipes-core/dropbear/dropbear_2016.74.bb
deleted file mode 100644
index a7020978a1..0000000000
--- a/meta/recipes-core/dropbear/dropbear_2016.74.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require dropbear.inc
-
-SRC_URI += "file://support-out-of-tree-builds.patch"
-
-SRC_URI[md5sum] = "9ad0172731e0f16623937804643b5bd8"
-SRC_URI[sha256sum] = "2720ea54ed009af812701bcc290a2a601d5c107d12993e5d92c0f5f81f718891"
-
diff --git a/meta/recipes-core/dropbear/dropbear_2019.78.bb b/meta/recipes-core/dropbear/dropbear_2019.78.bb
new file mode 100644
index 0000000000..d2cd8161bf
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear_2019.78.bb
@@ -0,0 +1,4 @@
+require dropbear.inc
+
+SRC_URI[md5sum] = "a972c85ed678ad0fdcb7844e1294fb54"
+SRC_URI[sha256sum] = "525965971272270995364a0eb01f35180d793182e63dd0b0c3eb0292291644a4"
diff --git a/meta/recipes-core/ell/ell_0.26.bb b/meta/recipes-core/ell/ell_0.26.bb
new file mode 100644
index 0000000000..f1f252ce4f
--- /dev/null
+++ b/meta/recipes-core/ell/ell_0.26.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Embedded Linux Library"
+DESCRIPTION = "The Embedded Linux Library (ELL) provides core, \
+low-level functionality for system daemons. It typically has no \
+dependencies other than the Linux kernel, C standard library, and \
+libdl (for dynamic linking). While ELL is designed to be efficient \
+and compact enough for use on embedded Linux platforms, it is not \
+limited to resource-constrained systems."
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
+
+DEPENDS = "dbus"
+
+inherit autotools pkgconfig
+
+SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "4660e25541071e933a2bb02ef2f94e7d"
+SRC_URI[sha256sum] = "7855b4b8f271ba6ee67d87d0965b975a9a8dbeaa616665ca2248afa3b5fcbc77"
+
+do_configure_prepend () {
+ mkdir -p ${S}/build-aux
+}
diff --git a/meta/recipes-core/expat/expat.inc b/meta/recipes-core/expat/expat.inc
deleted file mode 100644
index fe9d7e74f0..0000000000
--- a/meta/recipes-core/expat/expat.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "A stream-oriented XML parser library"
-DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
-HOMEPAGE = "http://expat.sourceforge.net/"
-SECTION = "libs"
-LICENSE = "MIT"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
- file://autotools.patch \
- "
-
-inherit autotools lib_package gzipnative
-
-# This package uses an archive format known to have issue with some
-# versions of gzip
-do_unpack[depends] += "gzip-native:do_populate_sysroot"
-
-do_configure_prepend () {
- rm -f ${S}/conftools/libtool.m4
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/expat/expat/autotools.patch b/meta/recipes-core/expat/expat/autotools.patch
deleted file mode 100644
index 3d3c5bad9d..0000000000
--- a/meta/recipes-core/expat/expat/autotools.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Avoid using expat's m4 files
-
-Upstream-Status: Inappropriate [Other]
-Workaround specific to our build system.
-
-Signed-off-by: Kevin Tian <kevin.tian@intel.com>
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Updated to apply over expat 2.1.0
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-
-diff -Nurd expat-2.1.0/configure.in expat-2.1.0/configure.in
---- expat-2.1.0/configure.ac 2012-03-04 01:45:53.000000000 +0200
-+++ expat-2.1.0/configure.ac 2012-05-10 21:04:44.000000000 +0300
-@@ -51,8 +51,6 @@
-
- AC_CONFIG_HEADER(expat_config.h)
-
--sinclude(conftools/ac_c_bigendian_cross.m4)
--
- AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
-
diff --git a/meta/recipes-core/expat/expat/libtool-tag.patch b/meta/recipes-core/expat/expat/libtool-tag.patch
new file mode 100644
index 0000000000..0a0aed23e5
--- /dev/null
+++ b/meta/recipes-core/expat/expat/libtool-tag.patch
@@ -0,0 +1,30 @@
+From 10342e6b600858b091bc7771e454d9e06af06410 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Nov 2017 18:20:57 +0800
+Subject: [PATCH] Add CC tag to build
+
+Add CC tag to build
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 9560a95..d444bd6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -319,7 +319,7 @@ LIBCURRENT = @LIBCURRENT@
+ LIBOBJS = @LIBOBJS@
+ LIBREVISION = @LIBREVISION@
+ LIBS = @LIBS@
+-LIBTOOL = @LIBTOOL@
++LIBTOOL = @LIBTOOL@ --tag CC
+ LIPO = @LIPO@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+--
+2.7.4
+
diff --git a/meta/recipes-core/expat/expat_2.2.0.bb b/meta/recipes-core/expat/expat_2.2.0.bb
deleted file mode 100644
index ef21a111a4..0000000000
--- a/meta/recipes-core/expat/expat_2.2.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require expat.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=9c3ee559c6f9dcee1043ead112139f4f"
-
-SRC_URI[md5sum] = "2f47841c829facb346eb6e3fab5212e2"
-SRC_URI[sha256sum] = "d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff"
diff --git a/meta/recipes-core/expat/expat_2.2.9.bb b/meta/recipes-core/expat/expat_2.2.9.bb
new file mode 100644
index 0000000000..8f3db41352
--- /dev/null
+++ b/meta/recipes-core/expat/expat_2.2.9.bb
@@ -0,0 +1,22 @@
+SUMMARY = "A stream-oriented XML parser library"
+DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
+HOMEPAGE = "http://expat.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "MIT"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
+ file://libtool-tag.patch \
+ "
+
+SRC_URI[md5sum] = "875a2c2ff3e8eb9e5a5cd62db2033ab5"
+SRC_URI[sha256sum] = "f1063084dc4302a427dabcca499c8312b3a32a29b7d2506653ecc8f950a9a237"
+
+inherit autotools lib_package
+
+do_configure_prepend () {
+ rm -f ${S}/conftools/libtool.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/fts/fts.bb b/meta/recipes-core/fts/fts.bb
deleted file mode 100644
index 9d8230fa3d..0000000000
--- a/meta/recipes-core/fts/fts.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "POSIX file tree stream operations library"
-HOMEPAGE = "https://sites.google.com/a/bostic.com/keithbostic"
-LICENSE = "BSD-4-Clause"
-LIC_FILES_CHKSUM = "file://fts.h;beginline=1;endline=36;md5=2532eddb3d1a21905723a4011ec4e085"
-SECTION = "libs"
-
-SRC_URI = "https://sites.google.com/a/bostic.com/keithbostic/files/fts.tar.gz \
- file://fts-header-correctness.patch \
- file://fts-uclibc.patch \
- file://remove_cdefs.patch \
- file://stdint.patch \
- file://gcc5.patch \
-"
-
-SRC_URI[md5sum] = "120c14715485ec6ced14f494d059d20a"
-SRC_URI[sha256sum] = "3df9b9b5a45aeaf16f33bb84e692a10dc662e22ec8a51748f98767d67fb6f342"
-
-S = "${WORKDIR}/${BPN}"
-
-do_configure[noexec] = "1"
-
-HASHSTYLE_mips = "sysv"
-HASHSTYLE_mipsel = "sysv"
-HASHSTYLE_mips64 = "sysv"
-HASHSTYLE_mips64el = "sysv"
-HASHSTYLE = "gnu"
-
-VER = "0"
-do_compile () {
- ${CC} -I${S} -fPIC -shared -Wl,--hash-style=${HASHSTYLE} -o libfts.so.${VER} -Wl,-soname,libfts.so.${VER} ${S}/fts.c
-}
-
-do_install() {
- install -Dm755 ${B}/libfts.so.${VER} ${D}${libdir}/libfts.so.${VER}
- ln -sf libfts.so.${VER} ${D}${libdir}/libfts.so
- install -Dm644 ${S}/fts.h ${D}${includedir}/fts.h
-}
-#
-# We will skip parsing for non-musl systems
-#
-COMPATIBLE_HOST = ".*-musl.*"
-
diff --git a/meta/recipes-core/fts/fts/fts-header-correctness.patch b/meta/recipes-core/fts/fts/fts-header-correctness.patch
deleted file mode 100644
index c73ddc95d8..0000000000
--- a/meta/recipes-core/fts/fts/fts-header-correctness.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Included needed headers for compiling with musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
---- fts.orig/fts.h
-+++ fts/fts.h
-@@ -38,6 +38,17 @@
- #ifndef _FTS_H_
- #define _FTS_H_
-
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <sys/stat.h>
-+
-+#include <dirent.h>
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+
- typedef struct {
- struct _ftsent *fts_cur; /* current node */
- struct _ftsent *fts_child; /* linked list of children */
diff --git a/meta/recipes-core/fts/fts/fts-uclibc.patch b/meta/recipes-core/fts/fts/fts-uclibc.patch
deleted file mode 100644
index 397654bf51..0000000000
--- a/meta/recipes-core/fts/fts/fts-uclibc.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Add missing defines for uclibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
---- fts.orig/fts.c
-+++ fts/fts.c
-@@ -31,6 +31,10 @@
- * SUCH DAMAGE.
- */
-
-+#define alignof(TYPE) ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
-+#define ALIGNBYTES (alignof(long double) - 1)
-+#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) & ~ALIGNBYTES)
-+
- #if defined(LIBC_SCCS) && !defined(lint)
- static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
- #endif /* LIBC_SCCS and not lint */
-@@ -652,10 +656,10 @@
- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
- continue;
-
-- if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_namlen)) == NULL)
-+ if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_reclen)) == NULL)
- goto mem1;
-- if (dp->d_namlen > maxlen) {
-- if (fts_palloc(sp, (size_t)dp->d_namlen)) {
-+ if (dp->d_reclen > maxlen) {
-+ if (fts_palloc(sp, (size_t)dp->d_reclen)) {
- /*
- * No more memory for path or structures. Save
- * errno, free up the current structure and the
-@@ -675,7 +679,7 @@
- maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1;
- }
-
-- p->fts_pathlen = len + dp->d_namlen + 1;
-+ p->fts_pathlen = len + dp->d_reclen + 1;
- p->fts_parent = sp->fts_cur;
- p->fts_level = level;
-
-@@ -784,7 +788,7 @@
- /* If user needs stat info, stat buffer already allocated. */
- sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-
--#ifdef DT_WHT
-+#ifdef S_IFWHT
- /*
- * Whited-out files don't really exist. However, there's stat(2) file
- * mask for them, so we set it so that programs (i.e., find) don't have
diff --git a/meta/recipes-core/fts/fts/gcc5.patch b/meta/recipes-core/fts/fts/gcc5.patch
deleted file mode 100644
index f5b948edc0..0000000000
--- a/meta/recipes-core/fts/fts/gcc5.patch
+++ /dev/null
@@ -1,1368 +0,0 @@
-Forward port the sources to be able to compile with c99/gcc5
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
-Index: fts/fts.c
-===================================================================
---- fts.orig/fts.c
-+++ fts/fts.c
-@@ -51,16 +51,6 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
- #include <string.h>
- #include <unistd.h>
-
--static FTSENT *fts_alloc __P(FTS *, char *, int);
--static FTSENT *fts_build __P(FTS *, int);
--static void fts_lfree __P(FTSENT *);
--static void fts_load __P(FTS *, FTSENT *);
--static size_t fts_maxarglen __P(char * const *);
--static void fts_padjust __P(FTS *, void *);
--static int fts_palloc __P(FTS *, size_t);
--static FTSENT *fts_sort __P(FTS *, FTSENT *, int);
--static u_short fts_stat __P(FTS *, struct dirent *, FTSENT *, int);
--
- #define ISDOT(a) (a[0] == '.' && (!a[1] || a[1] == '.' && !a[2]))
-
- #define ISSET(opt) (sp->fts_options & opt)
-@@ -73,119 +63,16 @@ static u_short fts_stat __P(FTS *, stru
- #define BCHILD 1 /* fts_children */
- #define BNAMES 2 /* fts_children, names only */
- #define BREAD 3 /* fts_read */
--
--FTS *
--fts_open(argv, options, compar)
-- char * const *argv;
-- register int options;
-- int (*compar)();
--{
-- register FTS *sp;
-- register FTSENT *p, *root;
-- register int nitems;
-- FTSENT *parent, *tmp;
-- int len;
--
-- /* Options check. */
-- if (options & ~FTS_OPTIONMASK) {
-- errno = EINVAL;
-- return (NULL);
-- }
--
-- /* Allocate/initialize the stream */
-- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
-- return (NULL);
-- memset(sp, 0, sizeof(FTS));
-- sp->fts_compar = compar;
-- sp->fts_options = options;
--
-- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
-- if (ISSET(FTS_LOGICAL))
-- SET(FTS_NOCHDIR);
--
-- /*
-- * Start out with 1K of path space, and enough, in any case,
-- * to hold the user's paths.
-- */
-- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
-- goto mem1;
--
-- /* Allocate/initialize root's parent. */
-- if ((parent = fts_alloc(sp, "", 0)) == NULL)
-- goto mem2;
-- parent->fts_level = FTS_ROOTPARENTLEVEL;
--
-- /* Allocate/initialize root(s). */
-- for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
-- /* Don't allow zero-length paths. */
-- if ((len = strlen(*argv)) == 0) {
-- errno = EINVAL;
-- goto mem3;
-- }
--
-- p = fts_alloc(sp, *argv, len);
-- p->fts_level = FTS_ROOTLEVEL;
-- p->fts_parent = parent;
-- p->fts_accpath = p->fts_name;
-- p->fts_info = fts_stat(sp, NULL, p, ISSET(FTS_COMFOLLOW));
--
-- /* Command-line "." and ".." are real directories. */
-- if (p->fts_info == FTS_DOT)
-- p->fts_info = FTS_D;
--
-- /*
-- * If comparison routine supplied, traverse in sorted
-- * order; otherwise traverse in the order specified.
-- */
-- if (compar) {
-- p->fts_link = root;
-- root = p;
-- } else {
-- p->fts_link = NULL;
-- if (root == NULL)
-- tmp = root = p;
-- else {
-- tmp->fts_link = p;
-- tmp = p;
-- }
-- }
-- }
-- if (compar && nitems > 1)
-- root = fts_sort(sp, root, nitems);
--
-- /*
-- * Allocate a dummy pointer and make fts_read think that we've just
-- * finished the node before the root(s); set p->fts_info to FTS_INIT
-- * so that everything about the "current" node is ignored.
-- */
-- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
-- goto mem3;
-- sp->fts_cur->fts_link = root;
-- sp->fts_cur->fts_info = FTS_INIT;
--
-- /*
-- * If using chdir(2), grab a file descriptor pointing to dot to insure
-- * that we can get back here; this could be avoided for some paths,
-- * but almost certainly not worth the effort. Slashes, symbolic links,
-- * and ".." are all fairly nasty problems. Note, if we can't get the
-- * descriptor we run anyway, just more slowly.
-- */
-- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
-- SET(FTS_NOCHDIR);
--
-- return (sp);
--
--mem3: fts_lfree(root);
-- free(parent);
--mem2: free(sp->fts_path);
--mem1: free(sp);
-- return (NULL);
--}
-+/*
-+ * Special case a root of "/" so that slashes aren't appended which would
-+ * cause paths to be written as "//foo".
-+ */
-+#define NAPPEND(p) \
-+ (p->fts_level == FTS_ROOTLEVEL && p->fts_pathlen == 1 && \
-+ p->fts_path[0] == '/' ? 0 : p->fts_pathlen)
-
- static void
--fts_load(sp, p)
-- FTS *sp;
-- register FTSENT *p;
-+fts_load(FTS *sp, register FTSENT *p)
- {
- register int len;
- register char *cp;
-@@ -208,332 +95,214 @@ fts_load(sp, p)
- sp->fts_dev = p->fts_dev;
- }
-
--int
--fts_close(sp)
-- FTS *sp;
-+static void
-+fts_lfree(register FTSENT *head)
- {
-- register FTSENT *freep, *p;
-- int saved_errno;
-+ register FTSENT *p;
-
-- /*
-- * This still works if we haven't read anything -- the dummy structure
-- * points to the root list, so we step through to the end of the root
-- * list which has a valid parent pointer.
-- */
-- if (sp->fts_cur) {
-- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-- freep = p;
-- p = p->fts_link ? p->fts_link : p->fts_parent;
-- free(freep);
-- }
-+ /* Free a linked list of structures. */
-+ while (p = head) {
-+ head = head->fts_link;
- free(p);
- }
-+}
-
-- /* Free up child linked list, sort array, path buffer. */
-- if (sp->fts_child)
-- fts_lfree(sp->fts_child);
-- if (sp->fts_array)
-- free(sp->fts_array);
-- free(sp->fts_path);
-+static size_t
-+fts_maxarglen(char * const *argv)
-+{
-+ size_t len, max;
-
-- /* Return to original directory, save errno if necessary. */
-- if (!ISSET(FTS_NOCHDIR)) {
-- saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
-- (void)close(sp->fts_rfd);
-- }
-+ for (max = 0; *argv; ++argv)
-+ if ((len = strlen(*argv)) > max)
-+ max = len;
-+ return (max);
-+}
-
-- /* Free up the stream pointer. */
-- free(sp);
-
-- /* Set errno and return. */
-- if (!ISSET(FTS_NOCHDIR) && saved_errno) {
-- errno = saved_errno;
-- return (-1);
-+/*
-+ * When the path is realloc'd, have to fix all of the pointers in structures
-+ * already returned.
-+ */
-+static void
-+fts_padjust(FTS *sp, void *addr)
-+{
-+ FTSENT *p;
-+
-+#define ADJUST(p) { \
-+ (p)->fts_accpath = \
-+ (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
-+ (p)->fts_path = addr; \
-+}
-+ /* Adjust the current set of children. */
-+ for (p = sp->fts_child; p; p = p->fts_link)
-+ ADJUST(p);
-+
-+ /* Adjust the rest of the tree. */
-+ for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-+ ADJUST(p);
-+ p = p->fts_link ? p->fts_link : p->fts_parent;
- }
-- return (0);
- }
-
- /*
-- * Special case a root of "/" so that slashes aren't appended which would
-- * cause paths to be written as "//foo".
-+ * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
-+ * Most systems will allow creation of paths much longer than MAXPATHLEN, even
-+ * though the kernel won't resolve them. Add the size (not just what's needed)
-+ * plus 256 bytes so don't realloc the path 2 bytes at a time.
- */
--#define NAPPEND(p) \
-- (p->fts_level == FTS_ROOTLEVEL && p->fts_pathlen == 1 && \
-- p->fts_path[0] == '/' ? 0 : p->fts_pathlen)
-+static int
-+fts_palloc(FTS *sp, size_t more)
-+{
-+ sp->fts_pathlen += more + 256;
-+ sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen);
-+ return (sp->fts_path == NULL);
-+}
-
--FTSENT *
--fts_read(sp)
-- register FTS *sp;
-+static FTSENT *
-+fts_alloc(FTS *sp, char *name, register int namelen)
- {
-- register FTSENT *p, *tmp;
-- register int instr;
-- register char *t;
-- int saved_errno;
-+ register FTSENT *p;
-+ size_t len;
-
-- /* If finished or unrecoverable error, return NULL. */
-- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
-+ /*
-+ * The file name is a variable length array and no stat structure is
-+ * necessary if the user has set the nostat bit. Allocate the FTSENT
-+ * structure, the file name and the stat structure in one chunk, but
-+ * be careful that the stat structure is reasonably aligned. Since the
-+ * fts_name field is declared to be of size 1, the fts_name pointer is
-+ * namelen + 2 before the first possible address of the stat structure.
-+ */
-+ len = sizeof(FTSENT) + namelen;
-+ if (!ISSET(FTS_NOSTAT))
-+ len += sizeof(struct stat) + ALIGNBYTES;
-+ if ((p = malloc(len)) == NULL)
- return (NULL);
-
-- /* Set current node pointer. */
-- p = sp->fts_cur;
-+ /* Copy the name plus the trailing NULL. */
-+ memmove(p->fts_name, name, namelen + 1);
-
-- /* Save and zero out user instructions. */
-- instr = p->fts_instr;
-+ if (!ISSET(FTS_NOSTAT))
-+ p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
-+ p->fts_namelen = namelen;
-+ p->fts_path = sp->fts_path;
-+ p->fts_errno = 0;
-+ p->fts_flags = 0;
- p->fts_instr = FTS_NOINSTR;
-+ p->fts_number = 0;
-+ p->fts_pointer = NULL;
-+ return (p);
-+}
-
-- /* Any type of file may be re-visited; re-stat and re-turn. */
-- if (instr == FTS_AGAIN) {
-- p->fts_info = fts_stat(sp, NULL, p, 0);
-- return (p);
-- }
-
-+static u_short
-+fts_stat(FTS *sp, register FTSENT *p, struct dirent *dp, int follow)
-+{
-+ register FTSENT *t;
-+ register dev_t dev;
-+ register ino_t ino;
-+ struct stat *sbp, sb;
-+ int saved_errno;
-+
-+ /* If user needs stat info, stat buffer already allocated. */
-+ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-+
-+#ifdef S_IFWHT
- /*
-- * Following a symlink -- SLNONE test allows application to see
-- * SLNONE and recover. If indirecting through a symlink, have
-- * keep a pointer to current location. If unable to get that
-- * pointer, follow fails.
-- */
-- if (instr == FTS_FOLLOW &&
-- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
-- p->fts_info = fts_stat(sp, NULL, p, 1);
-- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
-- if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
-- p->fts_errno = errno;
-- p->fts_info = FTS_ERR;
-- } else
-- p->fts_flags |= FTS_SYMFOLLOW;
-- return (p);
-+ * Whited-out files don't really exist. However, there's stat(2) file
-+ * mask for them, so we set it so that programs (i.e., find) don't have
-+ * to test FTS_W separately from other file types.
-+ */
-+ if (dp != NULL && dp->d_type == DT_WHT) {
-+ memset(sbp, 0, sizeof(struct stat));
-+ sbp->st_mode = S_IFWHT;
-+ return (FTS_W);
- }
--
-- /* Directory in pre-order. */
-- if (p->fts_info == FTS_D) {
-- /* If skipped or crossed mount point, do post-order visit. */
-- if (instr == FTS_SKIP ||
-- ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev) {
-- if (p->fts_flags & FTS_SYMFOLLOW)
-- (void)close(p->fts_symfd);
-- if (sp->fts_child) {
-- fts_lfree(sp->fts_child);
-- sp->fts_child = NULL;
-- }
-- p->fts_info = FTS_DP;
-- return (p);
-- }
--
-- /* Rebuild if only read the names and now traversing. */
-- if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
-- sp->fts_options &= ~FTS_NAMEONLY;
-- fts_lfree(sp->fts_child);
-- sp->fts_child = NULL;
-- }
--
-- /*
-- * Cd to the subdirectory.
-- *
-- * If have already read and now fail to chdir, whack the list
-- * to make the names come out right, and set the parent errno
-- * so the application will eventually get an error condition.
-- * Set the FTS_DONTCHDIR flag so that when we logically change
-- * directories back to the parent we don't do a chdir.
-- *
-- * If haven't read do so. If the read fails, fts_build sets
-- * FTS_STOP or the fts_info field of the node.
-- */
-- if (sp->fts_child) {
-- if (CHDIR(sp, p->fts_accpath)) {
-- p->fts_errno = errno;
-- p->fts_flags |= FTS_DONTCHDIR;
-- for (p = sp->fts_child; p; p = p->fts_link)
-- p->fts_accpath =
-- p->fts_parent->fts_accpath;
-- }
-- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
-- if (ISSET(FTS_STOP))
-- return (NULL);
-- return (p);
-+#endif
-+
-+ /*
-+ * If doing a logical walk, or application requested FTS_FOLLOW, do
-+ * a stat(2). If that fails, check for a non-existent symlink. If
-+ * fail, set the errno from the stat call.
-+ */
-+ if (ISSET(FTS_LOGICAL) || follow) {
-+ if (stat(p->fts_accpath, sbp)) {
-+ saved_errno = errno;
-+ if (!lstat(p->fts_accpath, sbp)) {
-+ errno = 0;
-+ return (FTS_SLNONE);
-+ }
-+ p->fts_errno = saved_errno;
-+ goto err;
- }
-- p = sp->fts_child;
-- sp->fts_child = NULL;
-- goto name;
-+ } else if (lstat(p->fts_accpath, sbp)) {
-+ p->fts_errno = errno;
-+err: memset(sbp, 0, sizeof(struct stat));
-+ return (FTS_NS);
- }
-
-- /* Move to the next node on this level. */
--next: tmp = p;
-- if (p = p->fts_link) {
-- free(tmp);
--
-- /*
-- * If reached the top, return to the original directory, and
-- * load the paths for the next root.
-- */
-- if (p->fts_level == FTS_ROOTLEVEL) {
-- if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- fts_load(sp, p);
-- return (sp->fts_cur = p);
-- }
--
-+ if (S_ISDIR(sbp->st_mode)) {
- /*
-- * User may have called fts_set on the node. If skipped,
-- * ignore. If followed, get a file descriptor so we can
-- * get back if necessary.
-+ * Set the device/inode. Used to find cycles and check for
-+ * crossing mount points. Also remember the link count, used
-+ * in fts_build to limit the number of stat calls. It is
-+ * understood that these fields are only referenced if fts_info
-+ * is set to FTS_D.
- */
-- if (p->fts_instr == FTS_SKIP)
-- goto next;
-- if (p->fts_instr == FTS_FOLLOW) {
-- p->fts_info = fts_stat(sp, NULL, p, 1);
-- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
-- if ((p->fts_symfd =
-- open(".", O_RDONLY, 0)) < 0) {
-- p->fts_errno = errno;
-- p->fts_info = FTS_ERR;
-- } else
-- p->fts_flags |= FTS_SYMFOLLOW;
-- p->fts_instr = FTS_NOINSTR;
-- }
--
--name: t = sp->fts_path + NAPPEND(p->fts_parent);
-- *t++ = '/';
-- memmove(t, p->fts_name, p->fts_namelen + 1);
-- return (sp->fts_cur = p);
-- }
-+ dev = p->fts_dev = sbp->st_dev;
-+ ino = p->fts_ino = sbp->st_ino;
-+ p->fts_nlink = sbp->st_nlink;
-
-- /* Move up to the parent node. */
-- p = tmp->fts_parent;
-- free(tmp);
-+ if (ISDOT(p->fts_name))
-+ return (FTS_DOT);
-
-- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
- /*
-- * Done; free everything up and set errno to 0 so the user
-- * can distinguish between error and EOF.
-+ * Cycle detection is done by brute force when the directory
-+ * is first encountered. If the tree gets deep enough or the
-+ * number of symbolic links to directories is high enough,
-+ * something faster might be worthwhile.
- */
-- free(p);
-- errno = 0;
-- return (sp->fts_cur = NULL);
-- }
--
-- /* Nul terminate the pathname. */
-- sp->fts_path[p->fts_pathlen] = '\0';
--
-- /*
-- * Return to the parent directory. If at a root node or came through
-- * a symlink, go back through the file descriptor. Otherwise, cd up
-- * one directory.
-- */
-- if (p->fts_level == FTS_ROOTLEVEL) {
-- if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- } else if (p->fts_flags & FTS_SYMFOLLOW) {
-- if (FCHDIR(sp, p->fts_symfd)) {
-- saved_errno = errno;
-- (void)close(p->fts_symfd);
-- errno = saved_errno;
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- (void)close(p->fts_symfd);
-- } else if (!(p->fts_flags & FTS_DONTCHDIR)) {
-- if (CHDIR(sp, "..")) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- }
-- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
-- return (sp->fts_cur = p);
--}
--
--/*
-- * Fts_set takes the stream as an argument although it's not used in this
-- * implementation; it would be necessary if anyone wanted to add global
-- * semantics to fts using fts_set. An error return is allowed for similar
-- * reasons.
-- */
--/* ARGSUSED */
--int
--fts_set(sp, p, instr)
-- FTS *sp;
-- FTSENT *p;
-- int instr;
--{
-- if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
-- instr != FTS_NOINSTR && instr != FTS_SKIP) {
-- errno = EINVAL;
-- return (1);
-+ for (t = p->fts_parent;
-+ t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
-+ if (ino == t->fts_ino && dev == t->fts_dev) {
-+ p->fts_cycle = t;
-+ return (FTS_DC);
-+ }
-+ return (FTS_D);
- }
-- p->fts_instr = instr;
-- return (0);
-+ if (S_ISLNK(sbp->st_mode))
-+ return (FTS_SL);
-+ if (S_ISREG(sbp->st_mode))
-+ return (FTS_F);
-+ return (FTS_DEFAULT);
- }
-
--FTSENT *
--fts_children(sp, instr)
-- register FTS *sp;
-- int instr;
-+static FTSENT *
-+fts_sort(FTS *sp, FTSENT *head, register int nitems)
- {
-- register FTSENT *p;
-- int fd;
--
-- if (instr && instr != FTS_NAMEONLY) {
-- errno = EINVAL;
-- return (NULL);
-- }
--
-- /* Set current node pointer. */
-- p = sp->fts_cur;
--
-- /*
-- * Errno set to 0 so user can distinguish empty directory from
-- * an error.
-- */
-- errno = 0;
--
-- /* Fatal errors stop here. */
-- if (ISSET(FTS_STOP))
-- return (NULL);
--
-- /* Return logical hierarchy of user's arguments. */
-- if (p->fts_info == FTS_INIT)
-- return (p->fts_link);
--
-- /*
-- * If not a directory being visited in pre-order, stop here. Could
-- * allow FTS_DNR, assuming the user has fixed the problem, but the
-- * same effect is available with FTS_AGAIN.
-- */
-- if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
-- return (NULL);
--
-- /* Free up any previous child list. */
-- if (sp->fts_child)
-- fts_lfree(sp->fts_child);
--
-- if (instr == FTS_NAMEONLY) {
-- sp->fts_options |= FTS_NAMEONLY;
-- instr = BNAMES;
-- } else
-- instr = BCHILD;
-+ register FTSENT **ap, *p;
-
- /*
-- * If using chdir on a relative path and called BEFORE fts_read does
-- * its chdir to the root of a traversal, we can lose -- we need to
-- * chdir into the subdirectory, and we don't know where the current
-- * directory is, so we can't get back so that the upcoming chdir by
-- * fts_read will work.
-+ * Construct an array of pointers to the structures and call qsort(3).
-+ * Reassemble the array in the order returned by qsort. If unable to
-+ * sort for memory reasons, return the directory entries in their
-+ * current order. Allocate enough space for the current needs plus
-+ * 40 so don't realloc one entry at a time.
- */
-- if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
-- ISSET(FTS_NOCHDIR))
-- return (sp->fts_child = fts_build(sp, instr));
--
-- if ((fd = open(".", O_RDONLY, 0)) < 0)
-- return (NULL);
-- sp->fts_child = fts_build(sp, instr);
-- if (fchdir(fd))
-- return (NULL);
-- (void)close(fd);
-- return (sp->fts_child);
-+ if (nitems > sp->fts_nitems) {
-+ sp->fts_nitems = nitems + 40;
-+ if ((sp->fts_array = realloc(sp->fts_array,
-+ (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
-+ sp->fts_nitems = 0;
-+ return (head);
-+ }
-+ }
-+ for (ap = sp->fts_array, p = head; p; p = p->fts_link)
-+ *ap++ = p;
-+ qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
-+ for (head = *(ap = sp->fts_array); --nitems; ++ap)
-+ ap[0]->fts_link = ap[1];
-+ ap[0]->fts_link = NULL;
-+ return (head);
- }
-
- /*
-@@ -551,9 +320,7 @@ fts_children(sp, instr)
- * been found, cutting the stat calls by about 2/3.
- */
- static FTSENT *
--fts_build(sp, type)
-- register FTS *sp;
-- int type;
-+fts_build(register FTS *sp, int type)
- {
- register struct dirent *dp;
- register FTSENT *p, *head;
-@@ -716,283 +483,479 @@ mem1: saved_errno = errno;
- --nlinks;
- }
-
-- /* We walk in directory order so "ls -f" doesn't get upset. */
-- p->fts_link = NULL;
-- if (head == NULL)
-- head = tail = p;
-- else {
-- tail->fts_link = p;
-- tail = p;
-+ /* We walk in directory order so "ls -f" doesn't get upset. */
-+ p->fts_link = NULL;
-+ if (head == NULL)
-+ head = tail = p;
-+ else {
-+ tail->fts_link = p;
-+ tail = p;
-+ }
-+ ++nitems;
-+ }
-+ (void)closedir(dirp);
-+
-+ /*
-+ * If had to realloc the path, adjust the addresses for the rest
-+ * of the tree.
-+ */
-+ if (adjaddr)
-+ fts_padjust(sp, adjaddr);
-+
-+ /*
-+ * If not changing directories, reset the path back to original
-+ * state.
-+ */
-+ if (ISSET(FTS_NOCHDIR)) {
-+ if (cp - 1 > sp->fts_path)
-+ --cp;
-+ *cp = '\0';
-+ }
-+
-+ /*
-+ * If descended after called from fts_children or after called from
-+ * fts_read and nothing found, get back. At the root level we use
-+ * the saved fd; if one of fts_open()'s arguments is a relative path
-+ * to an empty directory, we wind up here with no other way back. If
-+ * can't get back, we're done.
-+ */
-+ if (descend && (type == BCHILD || !nitems) &&
-+ (cur->fts_level == FTS_ROOTLEVEL ?
-+ FCHDIR(sp, sp->fts_rfd) : CHDIR(sp, ".."))) {
-+ cur->fts_info = FTS_ERR;
-+ SET(FTS_STOP);
-+ return (NULL);
-+ }
-+
-+ /* If didn't find anything, return NULL. */
-+ if (!nitems) {
-+ if (type == BREAD)
-+ cur->fts_info = FTS_DP;
-+ return (NULL);
-+ }
-+
-+ /* Sort the entries. */
-+ if (sp->fts_compar && nitems > 1)
-+ head = fts_sort(sp, head, nitems);
-+ return (head);
-+}
-+
-+
-+FTS *
-+fts_open(char * const *argv, register int options, int (*compar)())
-+{
-+ register FTS *sp;
-+ register FTSENT *p, *root;
-+ register int nitems;
-+ FTSENT *parent, *tmp;
-+ int len;
-+
-+ /* Options check. */
-+ if (options & ~FTS_OPTIONMASK) {
-+ errno = EINVAL;
-+ return (NULL);
-+ }
-+
-+ /* Allocate/initialize the stream */
-+ if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
-+ return (NULL);
-+ memset(sp, 0, sizeof(FTS));
-+ sp->fts_compar = compar;
-+ sp->fts_options = options;
-+
-+ /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
-+ if (ISSET(FTS_LOGICAL))
-+ SET(FTS_NOCHDIR);
-+
-+ /*
-+ * Start out with 1K of path space, and enough, in any case,
-+ * to hold the user's paths.
-+ */
-+ if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
-+ goto mem1;
-+
-+ /* Allocate/initialize root's parent. */
-+ if ((parent = fts_alloc(sp, "", 0)) == NULL)
-+ goto mem2;
-+ parent->fts_level = FTS_ROOTPARENTLEVEL;
-+
-+ /* Allocate/initialize root(s). */
-+ for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
-+ /* Don't allow zero-length paths. */
-+ if ((len = strlen(*argv)) == 0) {
-+ errno = EINVAL;
-+ goto mem3;
-+ }
-+
-+ p = fts_alloc(sp, *argv, len);
-+ p->fts_level = FTS_ROOTLEVEL;
-+ p->fts_parent = parent;
-+ p->fts_accpath = p->fts_name;
-+ p->fts_info = fts_stat(sp, NULL, p, ISSET(FTS_COMFOLLOW));
-+
-+ /* Command-line "." and ".." are real directories. */
-+ if (p->fts_info == FTS_DOT)
-+ p->fts_info = FTS_D;
-+
-+ /*
-+ * If comparison routine supplied, traverse in sorted
-+ * order; otherwise traverse in the order specified.
-+ */
-+ if (compar) {
-+ p->fts_link = root;
-+ root = p;
-+ } else {
-+ p->fts_link = NULL;
-+ if (root == NULL)
-+ tmp = root = p;
-+ else {
-+ tmp->fts_link = p;
-+ tmp = p;
-+ }
- }
-- ++nitems;
- }
-- (void)closedir(dirp);
--
-- /*
-- * If had to realloc the path, adjust the addresses for the rest
-- * of the tree.
-- */
-- if (adjaddr)
-- fts_padjust(sp, adjaddr);
-+ if (compar && nitems > 1)
-+ root = fts_sort(sp, root, nitems);
-
- /*
-- * If not changing directories, reset the path back to original
-- * state.
-+ * Allocate a dummy pointer and make fts_read think that we've just
-+ * finished the node before the root(s); set p->fts_info to FTS_INIT
-+ * so that everything about the "current" node is ignored.
- */
-- if (ISSET(FTS_NOCHDIR)) {
-- if (cp - 1 > sp->fts_path)
-- --cp;
-- *cp = '\0';
-- }
-+ if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
-+ goto mem3;
-+ sp->fts_cur->fts_link = root;
-+ sp->fts_cur->fts_info = FTS_INIT;
-
- /*
-- * If descended after called from fts_children or after called from
-- * fts_read and nothing found, get back. At the root level we use
-- * the saved fd; if one of fts_open()'s arguments is a relative path
-- * to an empty directory, we wind up here with no other way back. If
-- * can't get back, we're done.
-+ * If using chdir(2), grab a file descriptor pointing to dot to insure
-+ * that we can get back here; this could be avoided for some paths,
-+ * but almost certainly not worth the effort. Slashes, symbolic links,
-+ * and ".." are all fairly nasty problems. Note, if we can't get the
-+ * descriptor we run anyway, just more slowly.
- */
-- if (descend && (type == BCHILD || !nitems) &&
-- (cur->fts_level == FTS_ROOTLEVEL ?
-- FCHDIR(sp, sp->fts_rfd) : CHDIR(sp, ".."))) {
-- cur->fts_info = FTS_ERR;
-- SET(FTS_STOP);
-- return (NULL);
-- }
-+ if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
-+ SET(FTS_NOCHDIR);
-
-- /* If didn't find anything, return NULL. */
-- if (!nitems) {
-- if (type == BREAD)
-- cur->fts_info = FTS_DP;
-- return (NULL);
-- }
-+ return (sp);
-
-- /* Sort the entries. */
-- if (sp->fts_compar && nitems > 1)
-- head = fts_sort(sp, head, nitems);
-- return (head);
-+mem3: fts_lfree(root);
-+ free(parent);
-+mem2: free(sp->fts_path);
-+mem1: free(sp);
-+ return (NULL);
- }
-
--static u_short
--fts_stat(sp, dp, p, follow)
-- FTS *sp;
-- register FTSENT *p;
-- struct dirent *dp;
-- int follow;
-+FTSENT *
-+fts_read(register FTS *sp)
- {
-- register FTSENT *t;
-- register dev_t dev;
-- register ino_t ino;
-- struct stat *sbp, sb;
-+ register FTSENT *p, *tmp;
-+ register int instr;
-+ register char *t;
- int saved_errno;
-
-- /* If user needs stat info, stat buffer already allocated. */
-- sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-+ /* If finished or unrecoverable error, return NULL. */
-+ if (sp->fts_cur == NULL || ISSET(FTS_STOP))
-+ return (NULL);
-
--#ifdef S_IFWHT
-- /*
-- * Whited-out files don't really exist. However, there's stat(2) file
-- * mask for them, so we set it so that programs (i.e., find) don't have
-- * to test FTS_W separately from other file types.
-- */
-- if (dp != NULL && dp->d_type == DT_WHT) {
-- memset(sbp, 0, sizeof(struct stat));
-- sbp->st_mode = S_IFWHT;
-- return (FTS_W);
-+ /* Set current node pointer. */
-+ p = sp->fts_cur;
-+
-+ /* Save and zero out user instructions. */
-+ instr = p->fts_instr;
-+ p->fts_instr = FTS_NOINSTR;
-+
-+ /* Any type of file may be re-visited; re-stat and re-turn. */
-+ if (instr == FTS_AGAIN) {
-+ p->fts_info = fts_stat(sp, NULL, p, 0);
-+ return (p);
- }
--#endif
--
-+
- /*
-- * If doing a logical walk, or application requested FTS_FOLLOW, do
-- * a stat(2). If that fails, check for a non-existent symlink. If
-- * fail, set the errno from the stat call.
-+ * Following a symlink -- SLNONE test allows application to see
-+ * SLNONE and recover. If indirecting through a symlink, have
-+ * keep a pointer to current location. If unable to get that
-+ * pointer, follow fails.
- */
-- if (ISSET(FTS_LOGICAL) || follow) {
-- if (stat(p->fts_accpath, sbp)) {
-- saved_errno = errno;
-- if (!lstat(p->fts_accpath, sbp)) {
-- errno = 0;
-- return (FTS_SLNONE);
-- }
-- p->fts_errno = saved_errno;
-- goto err;
-+ if (instr == FTS_FOLLOW &&
-+ (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
-+ p->fts_info = fts_stat(sp, NULL, p, 1);
-+ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
-+ if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
-+ p->fts_errno = errno;
-+ p->fts_info = FTS_ERR;
-+ } else
-+ p->fts_flags |= FTS_SYMFOLLOW;
-+ return (p);
-+ }
-+
-+ /* Directory in pre-order. */
-+ if (p->fts_info == FTS_D) {
-+ /* If skipped or crossed mount point, do post-order visit. */
-+ if (instr == FTS_SKIP ||
-+ ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev) {
-+ if (p->fts_flags & FTS_SYMFOLLOW)
-+ (void)close(p->fts_symfd);
-+ if (sp->fts_child) {
-+ fts_lfree(sp->fts_child);
-+ sp->fts_child = NULL;
-+ }
-+ p->fts_info = FTS_DP;
-+ return (p);
- }
-- } else if (lstat(p->fts_accpath, sbp)) {
-- p->fts_errno = errno;
--err: memset(sbp, 0, sizeof(struct stat));
-- return (FTS_NS);
-+
-+ /* Rebuild if only read the names and now traversing. */
-+ if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
-+ sp->fts_options &= ~FTS_NAMEONLY;
-+ fts_lfree(sp->fts_child);
-+ sp->fts_child = NULL;
-+ }
-+
-+ /*
-+ * Cd to the subdirectory.
-+ *
-+ * If have already read and now fail to chdir, whack the list
-+ * to make the names come out right, and set the parent errno
-+ * so the application will eventually get an error condition.
-+ * Set the FTS_DONTCHDIR flag so that when we logically change
-+ * directories back to the parent we don't do a chdir.
-+ *
-+ * If haven't read do so. If the read fails, fts_build sets
-+ * FTS_STOP or the fts_info field of the node.
-+ */
-+ if (sp->fts_child) {
-+ if (CHDIR(sp, p->fts_accpath)) {
-+ p->fts_errno = errno;
-+ p->fts_flags |= FTS_DONTCHDIR;
-+ for (p = sp->fts_child; p; p = p->fts_link)
-+ p->fts_accpath =
-+ p->fts_parent->fts_accpath;
-+ }
-+ } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
-+ if (ISSET(FTS_STOP))
-+ return (NULL);
-+ return (p);
-+ }
-+ p = sp->fts_child;
-+ sp->fts_child = NULL;
-+ goto name;
- }
-
-- if (S_ISDIR(sbp->st_mode)) {
-+ /* Move to the next node on this level. */
-+next: tmp = p;
-+ if (p = p->fts_link) {
-+ free(tmp);
-+
- /*
-- * Set the device/inode. Used to find cycles and check for
-- * crossing mount points. Also remember the link count, used
-- * in fts_build to limit the number of stat calls. It is
-- * understood that these fields are only referenced if fts_info
-- * is set to FTS_D.
-+ * If reached the top, return to the original directory, and
-+ * load the paths for the next root.
- */
-- dev = p->fts_dev = sbp->st_dev;
-- ino = p->fts_ino = sbp->st_ino;
-- p->fts_nlink = sbp->st_nlink;
-+ if (p->fts_level == FTS_ROOTLEVEL) {
-+ if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
-+ SET(FTS_STOP);
-+ return (NULL);
-+ }
-+ fts_load(sp, p);
-+ return (sp->fts_cur = p);
-+ }
-+
-+ /*
-+ * User may have called fts_set on the node. If skipped,
-+ * ignore. If followed, get a file descriptor so we can
-+ * get back if necessary.
-+ */
-+ if (p->fts_instr == FTS_SKIP)
-+ goto next;
-+ if (p->fts_instr == FTS_FOLLOW) {
-+ p->fts_info = fts_stat(sp, NULL, p, 1);
-+ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
-+ if ((p->fts_symfd =
-+ open(".", O_RDONLY, 0)) < 0) {
-+ p->fts_errno = errno;
-+ p->fts_info = FTS_ERR;
-+ } else
-+ p->fts_flags |= FTS_SYMFOLLOW;
-+ p->fts_instr = FTS_NOINSTR;
-+ }
-
-- if (ISDOT(p->fts_name))
-- return (FTS_DOT);
-+name: t = sp->fts_path + NAPPEND(p->fts_parent);
-+ *t++ = '/';
-+ memmove(t, p->fts_name, p->fts_namelen + 1);
-+ return (sp->fts_cur = p);
-+ }
-
-+ /* Move up to the parent node. */
-+ p = tmp->fts_parent;
-+ free(tmp);
-+
-+ if (p->fts_level == FTS_ROOTPARENTLEVEL) {
- /*
-- * Cycle detection is done by brute force when the directory
-- * is first encountered. If the tree gets deep enough or the
-- * number of symbolic links to directories is high enough,
-- * something faster might be worthwhile.
-+ * Done; free everything up and set errno to 0 so the user
-+ * can distinguish between error and EOF.
- */
-- for (t = p->fts_parent;
-- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
-- if (ino == t->fts_ino && dev == t->fts_dev) {
-- p->fts_cycle = t;
-- return (FTS_DC);
-- }
-- return (FTS_D);
-+ free(p);
-+ errno = 0;
-+ return (sp->fts_cur = NULL);
- }
-- if (S_ISLNK(sbp->st_mode))
-- return (FTS_SL);
-- if (S_ISREG(sbp->st_mode))
-- return (FTS_F);
-- return (FTS_DEFAULT);
--}
-
--static FTSENT *
--fts_sort(sp, head, nitems)
-- FTS *sp;
-- FTSENT *head;
-- register int nitems;
--{
-- register FTSENT **ap, *p;
-+ /* Nul terminate the pathname. */
-+ sp->fts_path[p->fts_pathlen] = '\0';
-
- /*
-- * Construct an array of pointers to the structures and call qsort(3).
-- * Reassemble the array in the order returned by qsort. If unable to
-- * sort for memory reasons, return the directory entries in their
-- * current order. Allocate enough space for the current needs plus
-- * 40 so don't realloc one entry at a time.
-+ * Return to the parent directory. If at a root node or came through
-+ * a symlink, go back through the file descriptor. Otherwise, cd up
-+ * one directory.
- */
-- if (nitems > sp->fts_nitems) {
-- sp->fts_nitems = nitems + 40;
-- if ((sp->fts_array = realloc(sp->fts_array,
-- (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
-- sp->fts_nitems = 0;
-- return (head);
-+ if (p->fts_level == FTS_ROOTLEVEL) {
-+ if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
-+ SET(FTS_STOP);
-+ return (NULL);
-+ }
-+ } else if (p->fts_flags & FTS_SYMFOLLOW) {
-+ if (FCHDIR(sp, p->fts_symfd)) {
-+ saved_errno = errno;
-+ (void)close(p->fts_symfd);
-+ errno = saved_errno;
-+ SET(FTS_STOP);
-+ return (NULL);
-+ }
-+ (void)close(p->fts_symfd);
-+ } else if (!(p->fts_flags & FTS_DONTCHDIR)) {
-+ if (CHDIR(sp, "..")) {
-+ SET(FTS_STOP);
-+ return (NULL);
- }
- }
-- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
-- *ap++ = p;
-- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
-- for (head = *(ap = sp->fts_array); --nitems; ++ap)
-- ap[0]->fts_link = ap[1];
-- ap[0]->fts_link = NULL;
-- return (head);
-+ p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
-+ return (sp->fts_cur = p);
- }
-
--static FTSENT *
--fts_alloc(sp, name, namelen)
-- FTS *sp;
-- char *name;
-- register int namelen;
-+/*
-+ * Fts_set takes the stream as an argument although it's not used in this
-+ * implementation; it would be necessary if anyone wanted to add global
-+ * semantics to fts using fts_set. An error return is allowed for similar
-+ * reasons.
-+ */
-+/* ARGSUSED */
-+int
-+fts_set(FTS *sp, FTSENT *p, int instr)
-+{
-+ if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
-+ instr != FTS_NOINSTR && instr != FTS_SKIP) {
-+ errno = EINVAL;
-+ return (1);
-+ }
-+ p->fts_instr = instr;
-+ return (0);
-+}
-+
-+FTSENT *
-+fts_children(register FTS *sp, int instr)
- {
- register FTSENT *p;
-- size_t len;
-+ int fd;
-+
-+ if (instr && instr != FTS_NAMEONLY) {
-+ errno = EINVAL;
-+ return (NULL);
-+ }
-+
-+ /* Set current node pointer. */
-+ p = sp->fts_cur;
-
- /*
-- * The file name is a variable length array and no stat structure is
-- * necessary if the user has set the nostat bit. Allocate the FTSENT
-- * structure, the file name and the stat structure in one chunk, but
-- * be careful that the stat structure is reasonably aligned. Since the
-- * fts_name field is declared to be of size 1, the fts_name pointer is
-- * namelen + 2 before the first possible address of the stat structure.
-+ * Errno set to 0 so user can distinguish empty directory from
-+ * an error.
- */
-- len = sizeof(FTSENT) + namelen;
-- if (!ISSET(FTS_NOSTAT))
-- len += sizeof(struct stat) + ALIGNBYTES;
-- if ((p = malloc(len)) == NULL)
-+ errno = 0;
-+
-+ /* Fatal errors stop here. */
-+ if (ISSET(FTS_STOP))
- return (NULL);
-
-- /* Copy the name plus the trailing NULL. */
-- memmove(p->fts_name, name, namelen + 1);
-+ /* Return logical hierarchy of user's arguments. */
-+ if (p->fts_info == FTS_INIT)
-+ return (p->fts_link);
-
-- if (!ISSET(FTS_NOSTAT))
-- p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
-- p->fts_namelen = namelen;
-- p->fts_path = sp->fts_path;
-- p->fts_errno = 0;
-- p->fts_flags = 0;
-- p->fts_instr = FTS_NOINSTR;
-- p->fts_number = 0;
-- p->fts_pointer = NULL;
-- return (p);
-+ /*
-+ * If not a directory being visited in pre-order, stop here. Could
-+ * allow FTS_DNR, assuming the user has fixed the problem, but the
-+ * same effect is available with FTS_AGAIN.
-+ */
-+ if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
-+ return (NULL);
-+
-+ /* Free up any previous child list. */
-+ if (sp->fts_child)
-+ fts_lfree(sp->fts_child);
-+
-+ if (instr == FTS_NAMEONLY) {
-+ sp->fts_options |= FTS_NAMEONLY;
-+ instr = BNAMES;
-+ } else
-+ instr = BCHILD;
-+
-+ /*
-+ * If using chdir on a relative path and called BEFORE fts_read does
-+ * its chdir to the root of a traversal, we can lose -- we need to
-+ * chdir into the subdirectory, and we don't know where the current
-+ * directory is, so we can't get back so that the upcoming chdir by
-+ * fts_read will work.
-+ */
-+ if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
-+ ISSET(FTS_NOCHDIR))
-+ return (sp->fts_child = fts_build(sp, instr));
-+
-+ if ((fd = open(".", O_RDONLY, 0)) < 0)
-+ return (NULL);
-+ sp->fts_child = fts_build(sp, instr);
-+ if (fchdir(fd))
-+ return (NULL);
-+ (void)close(fd);
-+ return (sp->fts_child);
- }
-
--static void
--fts_lfree(head)
-- register FTSENT *head;
-+int
-+fts_close(FTS *sp)
- {
-- register FTSENT *p;
-+ register FTSENT *freep, *p;
-+ int saved_errno;
-
-- /* Free a linked list of structures. */
-- while (p = head) {
-- head = head->fts_link;
-+ /*
-+ * This still works if we haven't read anything -- the dummy structure
-+ * points to the root list, so we step through to the end of the root
-+ * list which has a valid parent pointer.
-+ */
-+ if (sp->fts_cur) {
-+ for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-+ freep = p;
-+ p = p->fts_link ? p->fts_link : p->fts_parent;
-+ free(freep);
-+ }
- free(p);
- }
--}
-
--/*
-- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
-- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
-- * though the kernel won't resolve them. Add the size (not just what's needed)
-- * plus 256 bytes so don't realloc the path 2 bytes at a time.
-- */
--static int
--fts_palloc(sp, more)
-- FTS *sp;
-- size_t more;
--{
-- sp->fts_pathlen += more + 256;
-- sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen);
-- return (sp->fts_path == NULL);
--}
-+ /* Free up child linked list, sort array, path buffer. */
-+ if (sp->fts_child)
-+ fts_lfree(sp->fts_child);
-+ if (sp->fts_array)
-+ free(sp->fts_array);
-+ free(sp->fts_path);
-
--/*
-- * When the path is realloc'd, have to fix all of the pointers in structures
-- * already returned.
-- */
--static void
--fts_padjust(sp, addr)
-- FTS *sp;
-- void *addr;
--{
-- FTSENT *p;
-+ /* Return to original directory, save errno if necessary. */
-+ if (!ISSET(FTS_NOCHDIR)) {
-+ saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
-+ (void)close(sp->fts_rfd);
-+ }
-
--#define ADJUST(p) { \
-- (p)->fts_accpath = \
-- (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
-- (p)->fts_path = addr; \
--}
-- /* Adjust the current set of children. */
-- for (p = sp->fts_child; p; p = p->fts_link)
-- ADJUST(p);
-+ /* Free up the stream pointer. */
-+ free(sp);
-
-- /* Adjust the rest of the tree. */
-- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-- ADJUST(p);
-- p = p->fts_link ? p->fts_link : p->fts_parent;
-+ /* Set errno and return. */
-+ if (!ISSET(FTS_NOCHDIR) && saved_errno) {
-+ errno = saved_errno;
-+ return (-1);
- }
-+ return (0);
- }
-
--static size_t
--fts_maxarglen(argv)
-- char * const *argv;
--{
-- size_t len, max;
--
-- for (max = 0; *argv; ++argv)
-- if ((len = strlen(*argv)) > max)
-- max = len;
-- return (max);
--}
diff --git a/meta/recipes-core/fts/fts/remove_cdefs.patch b/meta/recipes-core/fts/fts/remove_cdefs.patch
deleted file mode 100644
index c152704d44..0000000000
--- a/meta/recipes-core/fts/fts/remove_cdefs.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Replace use of macros from sys/cdefs.h since cdefs.h is missing on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
-Index: fts/fts.h
-===================================================================
---- fts.orig/fts.h
-+++ fts/fts.h
-@@ -126,15 +126,21 @@ typedef struct _ftsent {
- char fts_name[1]; /* file name */
- } FTSENT;
-
--#include <sys/cdefs.h>
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
--__BEGIN_DECLS
--FTSENT *fts_children __P((FTS *, int));
--int fts_close __P((FTS *));
--FTS *fts_open __P((char * const *, int,
-- int (*)(const FTSENT **, const FTSENT **)));
--FTSENT *fts_read __P((FTS *));
--int fts_set __P((FTS *, FTSENT *, int));
--__END_DECLS
-+#ifndef __P
-+#define __P
-+#endif
-+FTSENT *fts_children (FTS *p, int opts);
-+int fts_close (FTS *p);
-+FTS *fts_open (char * const * path, int opts,
-+ int (*compfn)(const FTSENT **, const FTSENT **));
-+FTSENT *fts_read (FTS *p);
-+int fts_set (FTS *p, FTSENT *f, int opts);
-
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* !_FTS_H_ */
-Index: fts/fts.c
-===================================================================
---- fts.orig/fts.c
-+++ fts/fts.c
-@@ -50,15 +50,15 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
- #include <string.h>
- #include <unistd.h>
-
--static FTSENT *fts_alloc __P((FTS *, char *, int));
--static FTSENT *fts_build __P((FTS *, int));
--static void fts_lfree __P((FTSENT *));
--static void fts_load __P((FTS *, FTSENT *));
--static size_t fts_maxarglen __P((char * const *));
--static void fts_padjust __P((FTS *, void *));
--static int fts_palloc __P((FTS *, size_t));
--static FTSENT *fts_sort __P((FTS *, FTSENT *, int));
--static u_short fts_stat __P((FTS *, struct dirent *, FTSENT *, int));
-+static FTSENT *fts_alloc __P(FTS *, char *, int);
-+static FTSENT *fts_build __P(FTS *, int);
-+static void fts_lfree __P(FTSENT *);
-+static void fts_load __P(FTS *, FTSENT *);
-+static size_t fts_maxarglen __P(char * const *);
-+static void fts_padjust __P(FTS *, void *);
-+static int fts_palloc __P(FTS *, size_t);
-+static FTSENT *fts_sort __P(FTS *, FTSENT *, int);
-+static u_short fts_stat __P(FTS *, struct dirent *, FTSENT *, int);
-
- #define ISDOT(a) (a[0] == '.' && (!a[1] || a[1] == '.' && !a[2]))
-
diff --git a/meta/recipes-core/fts/fts/stdint.patch b/meta/recipes-core/fts/fts/stdint.patch
deleted file mode 100644
index 89e6097fcb..0000000000
--- a/meta/recipes-core/fts/fts/stdint.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Include stdint.h for u_* typedefs
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
---- ./fts.c.orig
-+++ ./fts.c
-@@ -46,6 +46,7 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <fts.h>
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
diff --git a/meta/recipes-core/fts/fts_1.2.7.bb b/meta/recipes-core/fts/fts_1.2.7.bb
new file mode 100644
index 0000000000..589ae0e916
--- /dev/null
+++ b/meta/recipes-core/fts/fts_1.2.7.bb
@@ -0,0 +1,21 @@
+# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Implementation of ftsfor musl libc packages"
+HOMEPAGE = "https://github.com/pullmoll/musl-fts"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5ffe358174aad383f1b69ce3b53da982"
+SECTION = "libs"
+
+SRCREV = "0bde52df588e8969879a2cae51c3a4774ec62472"
+
+SRC_URI = "git://github.com/pullmoll/musl-fts.git"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
+
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/disable_java.patch b/meta/recipes-core/gettext/gettext-0.16.1/disable_java.patch
deleted file mode 100644
index e4c5f1566b..0000000000
--- a/meta/recipes-core/gettext/gettext-0.16.1/disable_java.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-
-# Pulled from OpenEmbedded
-#
-# Commented by: Saul Wold <saul.wold@intel.com>
-
-Upstream-Status: Inappropriate [licensing]
-
-Index: gettext-0.16.1/gettext-tools/configure.ac
-===================================================================
---- gettext-0.16.1.orig/gettext-tools/configure.ac 2006-11-27 09:02:01.000000000 -0800
-+++ gettext-0.16.1/gettext-tools/configure.ac 2011-03-16 16:55:36.111396557 -0700
-@@ -36,27 +36,15 @@
- gt_JAVA_CHOICE
-
- gt_GCJ
--if test -n "$HAVE_GCJ" && test "$JAVA_CHOICE" = yes; then
-- BUILDJAVAEXE=yes
--else
- BUILDJAVAEXE=no
--fi
- AC_SUBST(BUILDJAVAEXE)
-
- gt_JAVAEXEC
- gt_JAVACOMP([1.3])
- AC_CHECK_PROG(JAR, jar, jar)
--if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
-- BUILDJAVA=yes
--else
- BUILDJAVA=no
--fi
- AC_SUBST(BUILDJAVA)
--if test -n "$HAVE_JAVAEXEC" && test $BUILDJAVA = yes; then
-- TESTJAVA=yes
--else
- TESTJAVA=no
--fi
- AC_SUBST(TESTJAVA)
-
- gt_CSHARPCOMP
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch b/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch
deleted file mode 100644
index 49a10f5b18..0000000000
--- a/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-
-This patch updates the required version number from 2.61 to the
-current 2.65 version of aclocal, this will need to be updated
-when we update aclocal
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4
-===================================================================
---- gettext-0.16.1.orig/autoconf-lib-link/m4/lib-link.m4 2011-03-17 02:24:36.391519775 -0700
-+++ gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4 2011-03-17 02:24:45.569526073 -0700
-@@ -148,7 +148,7 @@
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl Autoconf >= 2.61 supports dots in --with options.
-- define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
-+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.65]),[-1],[translit([$1],[.],[_])],[$1])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
-Index: gettext-0.16.1/autoconf-lib-link/tests/rpathly/aclocal.m4
-===================================================================
---- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathly/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
-+++ gettext-0.16.1/autoconf-lib-link/tests/rpathly/aclocal.m4 2011-03-17 02:24:45.570526904 -0700
-@@ -11,8 +11,8 @@
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-
--m4_if(m4_PACKAGE_VERSION, [2.61],,
--[m4_fatal([this file was generated for autoconf 2.61.
-+m4_if(m4_PACKAGE_VERSION, [2.65],,
-+[m4_fatal([this file was generated for autoconf 2.65.
- You have another version of autoconf. If you want to use that,
- you should regenerate the build system entirely.], [63])])
-
-Index: gettext-0.16.1/autoconf-lib-link/tests/rpathx/aclocal.m4
-===================================================================
---- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathx/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
-+++ gettext-0.16.1/autoconf-lib-link/tests/rpathx/aclocal.m4 2011-03-17 02:24:45.572525773 -0700
-@@ -11,8 +11,8 @@
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-
--m4_if(m4_PACKAGE_VERSION, [2.61],,
--[m4_fatal([this file was generated for autoconf 2.61.
-+m4_if(m4_PACKAGE_VERSION, [2.65],,
-+[m4_fatal([this file was generated for autoconf 2.65.
- You have another version of autoconf. If you want to use that,
- you should regenerate the build system entirely.], [63])])
-
-Index: gettext-0.16.1/autoconf-lib-link/tests/rpathy/aclocal.m4
-===================================================================
---- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathy/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
-+++ gettext-0.16.1/autoconf-lib-link/tests/rpathy/aclocal.m4 2011-03-17 02:24:45.578394916 -0700
-@@ -11,7 +11,7 @@
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-
--m4_if(m4_PACKAGE_VERSION, [2.61],,
-+m4_if(m4_PACKAGE_VERSION, [2.65],,
- [m4_fatal([this file was generated for autoconf 2.61.
- You have another version of autoconf. If you want to use that,
- you should regenerate the build system entirely.], [63])])
-Index: gettext-0.16.1/autoconf-lib-link/tests/rpathz/aclocal.m4
-===================================================================
---- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathz/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
-+++ gettext-0.16.1/autoconf-lib-link/tests/rpathz/aclocal.m4 2011-03-17 02:24:45.586395416 -0700
-@@ -11,8 +11,8 @@
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-
--m4_if(m4_PACKAGE_VERSION, [2.61],,
--[m4_fatal([this file was generated for autoconf 2.61.
-+m4_if(m4_PACKAGE_VERSION, [2.65],,
-+[m4_fatal([this file was generated for autoconf 2.65.
- You have another version of autoconf. If you want to use that,
- you should regenerate the build system entirely.], [63])])
-
-Index: gettext-0.16.1/gettext-tools/aclocal.m4
-===================================================================
---- gettext-0.16.1.orig/gettext-tools/aclocal.m4 2006-11-27 09:34:32.000000000 -0800
-+++ gettext-0.16.1/gettext-tools/aclocal.m4 2011-03-17 02:27:01.135682807 -0700
-@@ -11,8 +11,8 @@
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-
--m4_if(m4_PACKAGE_VERSION, [2.61],,
--[m4_fatal([this file was generated for autoconf 2.61.
-+m4_if(m4_PACKAGE_VERSION, [2.65],,
-+[m4_fatal([this file was generated for autoconf 2.65.
- You have another version of autoconf. If you want to use that,
- you should regenerate the build system entirely.], [63])])
-
-Index: gettext-0.16.1/gettext-tools/examples/aclocal.m4
-===================================================================
---- gettext-0.16.1.orig/gettext-tools/examples/aclocal.m4 2006-11-27 09:16:23.000000000 -0800
-+++ gettext-0.16.1/gettext-tools/examples/aclocal.m4 2011-03-17 02:26:52.589396683 -0700
-@@ -11,8 +11,8 @@
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-
--m4_if(m4_PACKAGE_VERSION, [2.61],,
--[m4_fatal([this file was generated for autoconf 2.61.
-+m4_if(m4_PACKAGE_VERSION, [2.65],,
-+[m4_fatal([this file was generated for autoconf 2.65.
- You have another version of autoconf. If you want to use that,
- you should regenerate the build system entirely.], [63])])
-
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch b/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch
deleted file mode 100644
index fd5feebc85..0000000000
--- a/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch
+++ /dev/null
@@ -1,348 +0,0 @@
-
-This patch removes the circular dependency on AC_GNU_SOURCE in
-AC_USE_SYSTEM_EXTENSIONS.
-
-Thanks to Mark Hatle for the timely pointers and fixes.
-
-Upstream-Status: Inappropriate [licensing]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/extensions.m4 gettext.patched/gettext-runtime/gnulib-m4/extensions.m4
---- gettext-0.16.1/gettext-runtime/gnulib-m4/extensions.m4 2006-11-27 09:14:38.000000000 -0800
-+++ gettext.patched/gettext-runtime/gnulib-m4/extensions.m4 2011-03-16 23:54:01.711923448 -0700
-@@ -16,43 +16,47 @@
- # ------------------------
- # Enable extensions on systems that normally disable them,
- # typically due to standards-conformance issues.
--AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
--[
-- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-- AC_BEFORE([$0], [AC_RUN_IFELSE])
--
-- AC_REQUIRE([AC_GNU_SOURCE])
-- AC_REQUIRE([AC_AIX])
-- AC_REQUIRE([AC_MINIX])
--
-- AH_VERBATIM([__EXTENSIONS__],
--[/* Enable extensions on Solaris. */
--#ifndef __EXTENSIONS__
--# undef __EXTENSIONS__
--#endif
--#ifndef _POSIX_PTHREAD_SEMANTICS
--# undef _POSIX_PTHREAD_SEMANTICS
--#endif
--#ifndef _TANDEM_SOURCE
--# undef _TANDEM_SOURCE
--#endif])
-- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
-- [ac_cv_safe_to_define___extensions__],
-- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([
--# define __EXTENSIONS__ 1
-- AC_INCLUDES_DEFAULT])],
-- [ac_cv_safe_to_define___extensions__=yes],
-- [ac_cv_safe_to_define___extensions__=no])])
-- test $ac_cv_safe_to_define___extensions__ = yes &&
-- AC_DEFINE([__EXTENSIONS__])
-- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-- AC_DEFINE([_TANDEM_SOURCE])
--])
-+#AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-+#[
-+# AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-+# AC_BEFORE([$0], [AC_RUN_IFELSE])
-+#
-+# AC_REQUIRE([AC_GNU_SOURCE])
-+# AC_REQUIRE([AC_AIX])
-+# AC_REQUIRE([AC_MINIX])
-+#
-+# AH_VERBATIM([__EXTENSIONS__],
-+#[/* Enable extensions on Solaris. */
-+##ifndef __EXTENSIONS__
-+## undef __EXTENSIONS__
-+##endif
-+##ifndef _POSIX_PTHREAD_SEMANTICS
-+## undef _POSIX_PTHREAD_SEMANTICS
-+##endif
-+##ifndef _TANDEM_SOURCE
-+## undef _TANDEM_SOURCE
-+##endif])
-+# AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
-+# [ac_cv_safe_to_define___extensions__],
-+# [AC_COMPILE_IFELSE(
-+# [AC_LANG_PROGRAM([
-+## define __EXTENSIONS__ 1
-+# AC_INCLUDES_DEFAULT])],
-+# [ac_cv_safe_to_define___extensions__=yes],
-+# [ac_cv_safe_to_define___extensions__=no])])
-+# test $ac_cv_safe_to_define___extensions__ = yes &&
-+# AC_DEFINE([__EXTENSIONS__])
-+# AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-+# AC_DEFINE([_TANDEM_SOURCE])
-+#])
-
- # gl_USE_SYSTEM_EXTENSIONS
- # ------------------------
- # Enable extensions on systems that normally disable them,
- # typically due to standards-conformance issues.
- AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
-- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
-+[
-+ AC_REQUIRE([AC_GNU_SOURCE])
-+
-+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-+])
-diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-runtime/gnulib-m4/gnulib-comp.m4
---- gettext-0.16.1/gettext-runtime/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:19.000000000 -0800
-+++ gettext.patched/gettext-runtime/gnulib-m4/gnulib-comp.m4 2011-03-16 23:50:17.471531838 -0700
-@@ -25,7 +25,7 @@
- m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
- m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
- AC_REQUIRE([AC_PROG_RANLIB])
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- ])
-
-diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/mbchar.m4 gettext.patched/gettext-runtime/gnulib-m4/mbchar.m4
---- gettext-0.16.1/gettext-runtime/gnulib-m4/mbchar.m4 2006-11-27 09:14:38.000000000 -0800
-+++ gettext.patched/gettext-runtime/gnulib-m4/mbchar.m4 2011-03-16 23:50:10.814396529 -0700
-@@ -9,7 +9,7 @@
-
- AC_DEFUN([gl_MBCHAR],
- [
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
- dnl The following line is that so the user can test HAVE_WCHAR_H
- dnl before #include "mbchar.h".
- AC_CHECK_HEADERS_ONCE([wchar.h])
-diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/wcwidth.m4 gettext.patched/gettext-runtime/gnulib-m4/wcwidth.m4
---- gettext-0.16.1/gettext-runtime/gnulib-m4/wcwidth.m4 2006-11-27 09:14:38.000000000 -0800
-+++ gettext.patched/gettext-runtime/gnulib-m4/wcwidth.m4 2011-03-16 23:50:08.357396247 -0700
-@@ -7,7 +7,7 @@
- AC_DEFUN([gl_FUNC_WCWIDTH],
- [
- dnl Persuade glibc <wchar.h> to declare wcwidth().
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
-
- AC_REQUIRE([AC_C_INLINE])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
-diff -ru gettext-0.16.1/gettext-runtime/m4/lock.m4 gettext.patched/gettext-runtime/m4/lock.m4
---- gettext-0.16.1/gettext-runtime/m4/lock.m4 2006-10-24 13:59:59.000000000 -0700
-+++ gettext.patched/gettext-runtime/m4/lock.m4 2011-03-16 23:50:04.355891676 -0700
-@@ -35,7 +35,7 @@
- AC_BEFORE([$0], [gl_ARGP])dnl
-
- AC_REQUIRE([AC_CANONICAL_HOST])
-- AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
-+ dnl AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
- dnl Check for multithreading.
- AC_ARG_ENABLE(threads,
- AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/extensions.m4 gettext.patched/gettext-tools/gnulib-m4/extensions.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/extensions.m4 2006-11-27 09:14:54.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/extensions.m4 2011-03-16 23:53:28.487671266 -0700
-@@ -16,43 +16,47 @@
- # ------------------------
- # Enable extensions on systems that normally disable them,
- # typically due to standards-conformance issues.
--AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
--[
-- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-- AC_BEFORE([$0], [AC_RUN_IFELSE])
--
-- AC_REQUIRE([AC_GNU_SOURCE])
-- AC_REQUIRE([AC_AIX])
-- AC_REQUIRE([AC_MINIX])
--
-- AH_VERBATIM([__EXTENSIONS__],
--[/* Enable extensions on Solaris. */
--#ifndef __EXTENSIONS__
--# undef __EXTENSIONS__
--#endif
--#ifndef _POSIX_PTHREAD_SEMANTICS
--# undef _POSIX_PTHREAD_SEMANTICS
--#endif
--#ifndef _TANDEM_SOURCE
--# undef _TANDEM_SOURCE
--#endif])
-- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
-- [ac_cv_safe_to_define___extensions__],
-- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([
--# define __EXTENSIONS__ 1
-- AC_INCLUDES_DEFAULT])],
-- [ac_cv_safe_to_define___extensions__=yes],
-- [ac_cv_safe_to_define___extensions__=no])])
-- test $ac_cv_safe_to_define___extensions__ = yes &&
-- AC_DEFINE([__EXTENSIONS__])
-- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-- AC_DEFINE([_TANDEM_SOURCE])
--])
-+#AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-+#[
-+# AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-+# AC_BEFORE([$0], [AC_RUN_IFELSE])
-+#
-+# AC_REQUIRE([AC_GNU_SOURCE])
-+# AC_REQUIRE([AC_AIX])
-+# AC_REQUIRE([AC_MINIX])
-+#
-+# AH_VERBATIM([__EXTENSIONS__],
-+#[/* Enable extensions on Solaris. */
-+##ifndef __EXTENSIONS__
-+## undef __EXTENSIONS__
-+##endif
-+##ifndef _POSIX_PTHREAD_SEMANTICS
-+## undef _POSIX_PTHREAD_SEMANTICS
-+##endif
-+##ifndef _TANDEM_SOURCE
-+## undef _TANDEM_SOURCE
-+##endif])
-+# AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
-+# [ac_cv_safe_to_define___extensions__],
-+# [AC_COMPILE_IFELSE(
-+# [AC_LANG_PROGRAM([
-+## define __EXTENSIONS__ 1
-+# AC_INCLUDES_DEFAULT])],
-+# [ac_cv_safe_to_define___extensions__=yes],
-+# [ac_cv_safe_to_define___extensions__=no])])
-+# test $ac_cv_safe_to_define___extensions__ = yes &&
-+# AC_DEFINE([__EXTENSIONS__])
-+# AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-+# AC_DEFINE([_TANDEM_SOURCE])
-+#])
-
- # gl_USE_SYSTEM_EXTENSIONS
- # ------------------------
- # Enable extensions on systems that normally disable them,
- # typically due to standards-conformance issues.
- AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
-- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
-+[
-+ AC_REQUIRE([AC_GNU_SOURCE])
-+
-+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-+])
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/fnmatch.m4 gettext.patched/gettext-tools/gnulib-m4/fnmatch.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/fnmatch.m4 2006-11-27 09:14:54.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/fnmatch.m4 2011-03-16 23:52:06.477463671 -0700
-@@ -91,7 +91,7 @@
- AC_DEFUN([gl_FUNC_FNMATCH_GNU],
- [
- dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc.
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
-
- FNMATCH_H=
- _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/getdelim.m4 gettext.patched/gettext-tools/gnulib-m4/getdelim.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/getdelim.m4 2006-11-27 09:14:54.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/getdelim.m4 2011-03-16 23:52:22.871674845 -0700
-@@ -12,7 +12,7 @@
- [
-
- dnl Persuade glibc <stdio.h> to declare getdelim().
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
-
- AC_REPLACE_FUNCS(getdelim)
- AC_CHECK_DECLS_ONCE(getdelim)
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/getline.m4 gettext.patched/gettext-tools/gnulib-m4/getline.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/getline.m4 2006-11-27 09:14:54.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/getline.m4 2011-03-16 23:51:49.829971108 -0700
-@@ -16,7 +16,7 @@
- AC_DEFUN([gl_FUNC_GETLINE],
- [
- dnl Persuade glibc <stdio.h> to declare getline().
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
-
- AC_CHECK_DECLS([getline])
-
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-tools/gnulib-m4/gnulib-comp.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:36.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/gnulib-comp.m4 2011-03-16 23:52:18.970450488 -0700
-@@ -25,7 +25,7 @@
- m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
- m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
- AC_REQUIRE([AC_PROG_RANLIB])
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_REQUIRE([gl_LOCK_EARLY])
- ])
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/mbchar.m4 gettext.patched/gettext-tools/gnulib-m4/mbchar.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/mbchar.m4 2006-11-27 09:14:55.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/mbchar.m4 2011-03-16 23:51:40.844410216 -0700
-@@ -9,7 +9,7 @@
-
- AC_DEFUN([gl_MBCHAR],
- [
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
- dnl The following line is that so the user can test HAVE_WCHAR_H
- dnl before #include "mbchar.h".
- AC_CHECK_HEADERS_ONCE([wchar.h])
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/stpcpy.m4 gettext.patched/gettext-tools/gnulib-m4/stpcpy.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/stpcpy.m4 2006-11-27 09:14:55.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/stpcpy.m4 2011-03-16 23:52:14.691396045 -0700
-@@ -7,7 +7,7 @@
- AC_DEFUN([gl_FUNC_STPCPY],
- [
- dnl Persuade glibc <string.h> to declare stpcpy().
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
-
- AC_REPLACE_FUNCS(stpcpy)
- if test $ac_cv_func_stpcpy = no; then
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/stpncpy.m4 gettext.patched/gettext-tools/gnulib-m4/stpncpy.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/stpncpy.m4 2006-11-27 09:14:55.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/stpncpy.m4 2011-03-16 23:52:10.356641459 -0700
-@@ -7,7 +7,7 @@
- AC_DEFUN([gl_FUNC_STPNCPY],
- [
- dnl Persuade glibc <string.h> to declare stpncpy().
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
-
- dnl Both glibc and AIX (4.3.3, 5.1) have an stpncpy() function
- dnl declared in <string.h>. Its side effects are the same as those
-diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/wcwidth.m4 gettext.patched/gettext-tools/gnulib-m4/wcwidth.m4
---- gettext-0.16.1/gettext-tools/gnulib-m4/wcwidth.m4 2006-11-27 09:14:55.000000000 -0800
-+++ gettext.patched/gettext-tools/gnulib-m4/wcwidth.m4 2011-03-16 23:51:08.260324221 -0700
-@@ -7,7 +7,7 @@
- AC_DEFUN([gl_FUNC_WCWIDTH],
- [
- dnl Persuade glibc <wchar.h> to declare wcwidth().
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
-
- AC_REQUIRE([AC_C_INLINE])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
-diff -ru gettext-0.16.1/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4
---- gettext-0.16.1/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:45.000000000 -0800
-+++ gettext.patched/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 2011-03-16 23:51:02.036061317 -0700
-@@ -25,7 +25,7 @@
- m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
- m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
- AC_REQUIRE([AC_PROG_RANLIB])
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_REQUIRE([gl_LOCK_EARLY])
- ])
-diff -ru gettext-0.16.1/gettext-tools/m4/regex.m4 gettext.patched/gettext-tools/m4/regex.m4
---- gettext-0.16.1/gettext-tools/m4/regex.m4 2006-11-27 09:02:05.000000000 -0800
-+++ gettext.patched/gettext-tools/m4/regex.m4 2011-03-16 23:50:53.533477195 -0700
-@@ -116,7 +116,7 @@
- dnl to get them.
-
- dnl Persuade glibc <string.h> to declare mempcpy().
-- AC_REQUIRE([AC_GNU_SOURCE])
-+ dnl AC_REQUIRE([AC_GNU_SOURCE])
-
- AC_REQUIRE([AC_C_RESTRICT])
- AC_REQUIRE([AC_FUNC_ALLOCA])
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/gettext-autoconf-lib-link-no-L.patch b/meta/recipes-core/gettext/gettext-0.16.1/gettext-autoconf-lib-link-no-L.patch
deleted file mode 100644
index 072fe5ff6c..0000000000
--- a/meta/recipes-core/gettext/gettext-0.16.1/gettext-autoconf-lib-link-no-L.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-
-# Pulled from OpenEmbedded
-#
-# Commented by: Saul Wold <saul.wold@intel.com>
-
-Upstream-Status: Inappropriate [licensing]
-
---- gettext-0.17/autoconf-lib-link/m4/lib-link.m4~ 2009-04-17 15:12:30.000000000 -0700
-+++ gettext-0.17/autoconf-lib-link/m4/lib-link.m4 2009-04-17 15:37:39.000000000 -0700
-@@ -267,6 +267,9 @@
- fi
- fi
- fi
-+ dnl Just let the compiler find the library, the compiler and user are smarter then this script
-+ dnl when cross compiling and working with a relocated install.
-+ found_dir=""
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/gettext-vpath.patch b/meta/recipes-core/gettext/gettext-0.16.1/gettext-vpath.patch
deleted file mode 100644
index f09e450efe..0000000000
--- a/meta/recipes-core/gettext/gettext-0.16.1/gettext-vpath.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# Pulled from OpenEmbedded
-#
-# Commented by: Saul Wold <saul.wold@intel.com>
-
-Upstream-Status: Inappropriate [licensing]
-
-Index: gettext-0.16.1/gettext-runtime/intl/Makefile.in
-===================================================================
---- gettext-0.16.1.orig/gettext-runtime/intl/Makefile.in 2006-11-27 09:02:00.000000000 -0800
-+++ gettext-0.16.1/gettext-runtime/intl/Makefile.in 2011-03-16 16:04:49.175419930 -0700
-@@ -35,7 +35,7 @@
- # 'make' does the wrong thing if GNU gettext was configured with
- # "./configure --srcdir=`pwd`", namely it gets confused by the .lo and .la
- # files it finds in srcdir = ../../gettext-runtime/intl.
--VPATH = $(srcdir)
-+#VPATH = $(srcdir)
-
- prefix = @prefix@
- exec_prefix = @exec_prefix@
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/hardcode_macro_version.patch b/meta/recipes-core/gettext/gettext-0.16.1/hardcode_macro_version.patch
deleted file mode 100644
index 4da8dd4536..0000000000
--- a/meta/recipes-core/gettext/gettext-0.16.1/hardcode_macro_version.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-
-This patch hardcodes in version 0.17 for the GETTEXT_MACRO_VERSION,
-the version check is only part of 0.17 and will not affect any 0.16.1
-operations
-
-Upstream-Status: Inappropriate [licensing]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: gettext-0.16.1/gettext-runtime/m4/po.m4
-===================================================================
---- gettext-0.16.1.orig/gettext-runtime/m4/po.m4 2011-03-17 02:24:28.953520231 -0700
-+++ gettext-0.16.1/gettext-runtime/m4/po.m4 2011-03-17 02:28:25.455396862 -0700
-@@ -27,6 +27,9 @@
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
- AC_REQUIRE([AM_NLS])dnl
-
-+ dnl Hardcode the MACRO_VERSION to 0.17 for gnutls
-+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
-+
- dnl Perform the following tests also if --disable-nls has been given,
- dnl because they are needed for "make dist" to work.
-
-Index: gettext-0.16.1/gettext-runtime/po/Makefile.in.in
-===================================================================
---- gettext-0.16.1.orig/gettext-runtime/po/Makefile.in.in 2011-03-17 02:24:28.953520231 -0700
-+++ gettext-0.16.1/gettext-runtime/po/Makefile.in.in 2011-03-17 02:28:07.574395144 -0700
-@@ -10,6 +10,9 @@
- #
- # Origin: gettext-0.16
-
-+# Hardcode this value for gnutls building against gplv2 code
-+GETTEXT_MACRO_VERSION = 0.17
-+
- PACKAGE = @PACKAGE@
- VERSION = @VERSION@
- PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-Index: gettext-0.16.1/gettext-tools/po/Makefile.in.in
-===================================================================
---- gettext-0.16.1.orig/gettext-tools/po/Makefile.in.in 2011-03-17 02:24:28.953520231 -0700
-+++ gettext-0.16.1/gettext-tools/po/Makefile.in.in 2011-03-17 02:28:07.574395144 -0700
-@@ -10,6 +10,9 @@
- #
- # Origin: gettext-0.16
-
-+# Hardcode this value for gnutls building against gplv2 code
-+GETTEXT_MACRO_VERSION = 0.17
-+
- PACKAGE = @PACKAGE@
- VERSION = @VERSION@
- PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/linklib_from_0.17.patch b/meta/recipes-core/gettext/gettext-0.16.1/linklib_from_0.17.patch
deleted file mode 100644
index d921069711..0000000000
--- a/meta/recipes-core/gettext/gettext-0.16.1/linklib_from_0.17.patch
+++ /dev/null
@@ -1,720 +0,0 @@
-
-# Pulled from OpenEmbedded
-#
-# Commented by: Saul Wold <saul.wold@intel.com>
-
-Upstream-Status: Inappropriate [licensing]
-
-Index: gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4
-===================================================================
---- gettext-0.16.1.orig/autoconf-lib-link/m4/lib-link.m4 2006-11-27 09:01:58.000000000 -0800
-+++ gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4 2011-03-17 00:36:08.710836720 -0700
-@@ -6,12 +6,14 @@
-
- dnl From Bruno Haible.
-
--AC_PREREQ(2.50)
-+AC_PREREQ(2.54)
-
- dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
- dnl the libraries corresponding to explicit and implicit dependencies.
- dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
- dnl augments the CPPFLAGS variable.
-+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
- AC_DEFUN([AC_LIB_LINKFLAGS],
- [
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-@@ -24,13 +26,16 @@
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
-+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
-+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
-+ AC_SUBST([LIB]NAME[_PREFIX])
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
-@@ -46,6 +51,8 @@
- dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
- dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
- dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
- AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
- [
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-@@ -82,17 +89,24 @@
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
-+ LIB[]NAME[]_PREFIX=
-+
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
-+ AC_SUBST([LIB]NAME[_PREFIX])
- undefine([Name])
- undefine([NAME])
- ])
-
- dnl Determine the platform dependent parameters needed to use rpath:
--dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
--dnl hardcode_direct, hardcode_minus_L.
-+dnl acl_libext,
-+dnl acl_shlibext,
-+dnl acl_hardcode_libdir_flag_spec,
-+dnl acl_hardcode_libdir_separator,
-+dnl acl_hardcode_direct,
-+dnl acl_hardcode_minus_L.
- AC_DEFUN([AC_LIB_RPATH],
- [
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
-@@ -109,12 +123,14 @@
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
-- libext="$acl_cv_libext"
-- shlibext="$acl_cv_shlibext"
-- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-- hardcode_direct="$acl_cv_hardcode_direct"
-- hardcode_minus_L="$acl_cv_hardcode_minus_L"
-+ acl_libext="$acl_cv_libext"
-+ acl_shlibext="$acl_cv_shlibext"
-+ acl_libname_spec="$acl_cv_libname_spec"
-+ acl_library_names_spec="$acl_cv_library_names_spec"
-+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-+ acl_hardcode_direct="$acl_cv_hardcode_direct"
-+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
-@@ -124,20 +140,24 @@
- dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
- dnl the libraries corresponding to explicit and implicit dependencies.
- dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
-+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
- AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
- [
- AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-+ dnl Autoconf >= 2.61 supports dots in --with options.
-+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
-- AC_LIB_ARG_WITH([lib$1-prefix],
--[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
-- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-+ AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
-+[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
-+ --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
- [
- if test "X$withval" = "Xno"; then
- use_additional=no
-@@ -158,6 +178,7 @@
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
-+ LIB[]NAME[]_PREFIX=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
-@@ -197,27 +218,53 @@
- found_la=
- found_so=
- found_a=
-+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
-+ if test -n "$acl_shlibext"; then
-+ shrext=".$acl_shlibext" # typically: shrext=.so
-+ else
-+ shrext=
-+ fi
- if test $use_additional = yes; then
-- if test -n "$shlibext" \
-- && { test -f "$additional_libdir/lib$name.$shlibext" \
-- || { test "$shlibext" = dll \
-- && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
-- found_dir="$additional_libdir"
-- if test -f "$additional_libdir/lib$name.$shlibext"; then
-- found_so="$additional_libdir/lib$name.$shlibext"
-+ dir="$additional_libdir"
-+ dnl The same code as in the loop below:
-+ dnl First look for a shared library.
-+ if test -n "$acl_shlibext"; then
-+ if test -f "$dir/$libname$shrext"; then
-+ found_dir="$dir"
-+ found_so="$dir/$libname$shrext"
- else
-- found_so="$additional_libdir/lib$name.dll.a"
-+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-+ ver=`(cd "$dir" && \
-+ for f in "$libname$shrext".*; do echo "$f"; done \
-+ | sed -e "s,^$libname$shrext\\\\.,," \
-+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-+ | sed 1q ) 2>/dev/null`
-+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-+ found_dir="$dir"
-+ found_so="$dir/$libname$shrext.$ver"
-+ fi
-+ else
-+ eval library_names=\"$acl_library_names_spec\"
-+ for f in $library_names; do
-+ if test -f "$dir/$f"; then
-+ found_dir="$dir"
-+ found_so="$dir/$f"
-+ break
-+ fi
-+ done
-+ fi
- fi
-- if test -f "$additional_libdir/lib$name.la"; then
-- found_la="$additional_libdir/lib$name.la"
-+ fi
-+ dnl Then look for a static library.
-+ if test "X$found_dir" = "X"; then
-+ if test -f "$dir/$libname.$acl_libext"; then
-+ found_dir="$dir"
-+ found_a="$dir/$libname.$acl_libext"
- fi
-- else
-- if test -f "$additional_libdir/lib$name.$libext"; then
-- found_dir="$additional_libdir"
-- found_a="$additional_libdir/lib$name.$libext"
-- if test -f "$additional_libdir/lib$name.la"; then
-- found_la="$additional_libdir/lib$name.la"
-- fi
-+ fi
-+ if test "X$found_dir" != "X"; then
-+ if test -f "$dir/$libname.la"; then
-+ found_la="$dir/$libname.la"
- fi
- fi
- fi
-@@ -227,26 +274,44 @@
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
-- if test -n "$shlibext" \
-- && { test -f "$dir/lib$name.$shlibext" \
-- || { test "$shlibext" = dll \
-- && test -f "$dir/lib$name.dll.a"; }; }; then
-- found_dir="$dir"
-- if test -f "$dir/lib$name.$shlibext"; then
-- found_so="$dir/lib$name.$shlibext"
-+ dnl First look for a shared library.
-+ if test -n "$acl_shlibext"; then
-+ if test -f "$dir/$libname$shrext"; then
-+ found_dir="$dir"
-+ found_so="$dir/$libname$shrext"
- else
-- found_so="$dir/lib$name.dll.a"
-- fi
-- if test -f "$dir/lib$name.la"; then
-- found_la="$dir/lib$name.la"
-+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-+ ver=`(cd "$dir" && \
-+ for f in "$libname$shrext".*; do echo "$f"; done \
-+ | sed -e "s,^$libname$shrext\\\\.,," \
-+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-+ | sed 1q ) 2>/dev/null`
-+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-+ found_dir="$dir"
-+ found_so="$dir/$libname$shrext.$ver"
-+ fi
-+ else
-+ eval library_names=\"$acl_library_names_spec\"
-+ for f in $library_names; do
-+ if test -f "$dir/$f"; then
-+ found_dir="$dir"
-+ found_so="$dir/$f"
-+ break
-+ fi
-+ done
-+ fi
- fi
-- else
-- if test -f "$dir/lib$name.$libext"; then
-+ fi
-+ dnl Then look for a static library.
-+ if test "X$found_dir" = "X"; then
-+ if test -f "$dir/$libname.$acl_libext"; then
- found_dir="$dir"
-- found_a="$dir/lib$name.$libext"
-- if test -f "$dir/lib$name.la"; then
-- found_la="$dir/lib$name.la"
-- fi
-+ found_a="$dir/$libname.$acl_libext"
-+ fi
-+ fi
-+ if test "X$found_dir" != "X"; then
-+ if test -f "$dir/$libname.la"; then
-+ found_la="$dir/$libname.la"
- fi
- fi
- ;;
-@@ -282,12 +347,12 @@
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
-- if test "$hardcode_direct" = yes; then
-+ if test "$acl_hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
-- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-@@ -318,13 +383,13 @@
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
-- if test "$hardcode_minus_L" != no; then
-+ if test "$acl_hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
-- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
-+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
-@@ -512,18 +577,18 @@
- done
- done
- if test "X$rpathdirs" != "X"; then
-- if test -n "$hardcode_libdir_separator"; then
-+ if test -n "$acl_hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
-- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
-+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
- done
-- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
-+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
-- eval flag=\"$hardcode_libdir_flag_spec\"
-+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
-@@ -531,7 +596,7 @@
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
-- eval flag=\"$hardcode_libdir_flag_spec\"
-+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
-@@ -642,3 +707,79 @@
- fi
- AC_SUBST([$1])
- ])
-+
-+dnl For those cases where a variable contains several -L and -l options
-+dnl referring to unknown libraries and directories, this macro determines the
-+dnl necessary additional linker options for the runtime path.
-+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
-+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
-+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
-+dnl otherwise linking without libtool is assumed.
-+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-+[
-+ AC_REQUIRE([AC_LIB_RPATH])
-+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-+ $1=
-+ if test "$enable_rpath" != no; then
-+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-+ dnl Use an explicit option to hardcode directories into the resulting
-+ dnl binary.
-+ rpathdirs=
-+ next=
-+ for opt in $2; do
-+ if test -n "$next"; then
-+ dir="$next"
-+ dnl No need to hardcode the standard /usr/lib.
-+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
-+ rpathdirs="$rpathdirs $dir"
-+ fi
-+ next=
-+ else
-+ case $opt in
-+ -L) next=yes ;;
-+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
-+ dnl No need to hardcode the standard /usr/lib.
-+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
-+ rpathdirs="$rpathdirs $dir"
-+ fi
-+ next= ;;
-+ *) next= ;;
-+ esac
-+ fi
-+ done
-+ if test "X$rpathdirs" != "X"; then
-+ if test -n ""$3""; then
-+ dnl libtool is used for linking. Use -R options.
-+ for dir in $rpathdirs; do
-+ $1="${$1}${$1:+ }-R$dir"
-+ done
-+ else
-+ dnl The linker is used for linking directly.
-+ if test -n "$acl_hardcode_libdir_separator"; then
-+ dnl Weird platform: only the last -rpath option counts, the user
-+ dnl must pass all path elements in one option.
-+ alldirs=
-+ for dir in $rpathdirs; do
-+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
-+ done
-+ acl_save_libdir="$libdir"
-+ libdir="$alldirs"
-+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
-+ libdir="$acl_save_libdir"
-+ $1="$flag"
-+ else
-+ dnl The -rpath options are cumulative.
-+ for dir in $rpathdirs; do
-+ acl_save_libdir="$libdir"
-+ libdir="$dir"
-+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
-+ libdir="$acl_save_libdir"
-+ $1="${$1}${$1:+ }$flag"
-+ done
-+ fi
-+ fi
-+ fi
-+ fi
-+ fi
-+ AC_SUBST([$1])
-+])
-Index: gettext-0.16.1/autoconf-lib-link/config.rpath
-===================================================================
---- gettext-0.16.1.orig/autoconf-lib-link/config.rpath 2006-11-27 09:01:58.000000000 -0800
-+++ gettext-0.16.1/autoconf-lib-link/config.rpath 2011-03-17 00:33:23.336539490 -0700
-@@ -2,7 +2,7 @@
- # Output a system dependent set of variables, describing how to set the
- # run time search path of shared libraries in an executable.
- #
--# Copyright 1996-2006 Free Software Foundation, Inc.
-+# Copyright 1996-2007 Free Software Foundation, Inc.
- # Taken from GNU libtool, 2001
- # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
- #
-@@ -47,6 +47,18 @@
- done
- cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-
-+# Code taken from libtool.m4's _LT_CC_BASENAME.
-+
-+for cc_temp in $CC""; do
-+ case $cc_temp in
-+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-+ \-*) ;;
-+ *) break;;
-+ esac
-+done
-+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-+
- # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
-
- wl=
-@@ -64,7 +76,14 @@
- ;;
- esac
- ;;
-- mingw* | pw32* | os2*)
-+ darwin*)
-+ case $cc_basename in
-+ xlc*)
-+ wl='-Wl,'
-+ ;;
-+ esac
-+ ;;
-+ mingw* | cygwin* | pw32* | os2*)
- ;;
- hpux9* | hpux10* | hpux11*)
- wl='-Wl,'
-@@ -74,7 +93,7 @@
- ;;
- newsos6)
- ;;
-- linux*)
-+ linux* | k*bsd*-gnu)
- case $cc_basename in
- icc* | ecc*)
- wl='-Wl,'
-@@ -100,7 +119,7 @@
- osf3* | osf4* | osf5*)
- wl='-Wl,'
- ;;
-- sco3.2v5*)
-+ rdos*)
- ;;
- solaris*)
- wl='-Wl,'
-@@ -108,11 +127,14 @@
- sunos4*)
- wl='-Qoption ld '
- ;;
-- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-+ sysv4 | sysv4.2uw2* | sysv4.3*)
- wl='-Wl,'
- ;;
- sysv4*MP*)
- ;;
-+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-+ wl='-Wl,'
-+ ;;
- unicos*)
- wl='-Wl,'
- ;;
-@@ -141,6 +163,10 @@
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
-+ interix*)
-+ # we just hope/assume this is gcc and not c89 (= MSVC++)
-+ with_gnu_ld=yes
-+ ;;
- openbsd*)
- with_gnu_ld=no
- ;;
-@@ -189,11 +215,11 @@
- ld_shlibs=no
- fi
- ;;
-- interix3*)
-+ interix[3-9]*)
- hardcode_direct=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
-- linux*)
-+ gnu* | linux* | k*bsd*-gnu)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
-@@ -280,7 +306,7 @@
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
-- hardcode_direct=yes
-+ :
- else
- # We have old collect2
- hardcode_direct=unsupported
-@@ -359,7 +385,7 @@
- hardcode_direct=yes
- hardcode_minus_L=yes
- ;;
-- freebsd* | kfreebsd*-gnu | dragonfly*)
-+ freebsd* | dragonfly*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
-@@ -412,18 +438,22 @@
- hardcode_libdir_separator=:
- ;;
- openbsd*)
-- hardcode_direct=yes
-- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-+ if test -f /usr/libexec/ld.so; then
-+ hardcode_direct=yes
-+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-+ else
-+ case "$host_os" in
-+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-+ hardcode_libdir_flag_spec='-R$libdir'
-+ ;;
-+ *)
-+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-+ ;;
-+ esac
-+ fi
- else
-- case "$host_os" in
-- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-- hardcode_libdir_flag_spec='-R$libdir'
-- ;;
-- *)
-- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-- ;;
-- esac
-+ ld_shlibs=no
- fi
- ;;
- os2*)
-@@ -471,7 +501,7 @@
- ld_shlibs=yes
- fi
- ;;
-- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* |sco3.2v5.0.[024]*)
- ;;
- sysv5* | sco3.2v5* | sco5v6*)
- hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-@@ -488,33 +518,51 @@
-
- # Check dynamic linker characteristics
- # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
-+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
-+# only about the one the linker finds when passed -lNAME. This is the last
-+# element of library_names_spec in libtool.m4, or possibly two of them if the
-+# linker has special search rules.
-+library_names_spec= # the last element of library_names_spec in libtool.m4
- libname_spec='lib$name'
- case "$host_os" in
- aix3*)
-+ library_names_spec='$libname.a'
- ;;
- aix4* | aix5*)
-+ library_names_spec='$libname$shrext'
- ;;
- amigaos*)
-+ library_names_spec='$libname.a'
- ;;
- beos*)
-+ library_names_spec='$libname$shrext'
- ;;
- bsdi[45]*)
-+ library_names_spec='$libname$shrext'
- ;;
- cygwin* | mingw* | pw32*)
- shrext=.dll
-+ library_names_spec='$libname.dll.a $libname.lib'
- ;;
- darwin* | rhapsody*)
- shrext=.dylib
-+ library_names_spec='$libname$shrext'
- ;;
- dgux*)
-+ library_names_spec='$libname$shrext'
- ;;
- freebsd1*)
- ;;
-- kfreebsd*-gnu)
-- ;;
- freebsd* | dragonfly*)
-+ case "$host_os" in
-+ freebsd[123]*)
-+ library_names_spec='$libname$shrext$versuffix' ;;
-+ *)
-+ library_names_spec='$libname$shrext' ;;
-+ esac
- ;;
- gnu*)
-+ library_names_spec='$libname$shrext'
- ;;
- hpux9* | hpux10* | hpux11*)
- case $host_cpu in
-@@ -528,10 +576,13 @@
- shrext=.sl
- ;;
- esac
-+ library_names_spec='$libname$shrext'
- ;;
-- interix3*)
-+ interix[3-9]*)
-+ library_names_spec='$libname$shrext'
- ;;
- irix5* | irix6* | nonstopux*)
-+ library_names_spec='$libname$shrext'
- case "$host_os" in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
-@@ -548,33 +599,46 @@
- ;;
- linux*oldld* | linux*aout* | linux*coff*)
- ;;
-- linux*)
-+ linux* | k*bsd*-gnu)
-+ library_names_spec='$libname$shrext'
- ;;
- knetbsd*-gnu)
-+ library_names_spec='$libname$shrext'
- ;;
- netbsd*)
-+ library_names_spec='$libname$shrext'
- ;;
- newsos6)
-+ library_names_spec='$libname$shrext'
- ;;
- nto-qnx*)
-+ library_names_spec='$libname$shrext'
- ;;
- openbsd*)
-+ library_names_spec='$libname$shrext$versuffix'
- ;;
- os2*)
- libname_spec='$name'
- shrext=.dll
-+ library_names_spec='$libname.a'
- ;;
- osf3* | osf4* | osf5*)
-+ library_names_spec='$libname$shrext'
- ;;
- solaris*)
-+ library_names_spec='$libname$shrext'
- ;;
- sunos4*)
-+ library_names_spec='$libname$shrext$versuffix'
- ;;
- sysv4 | sysv4.3*)
-+ library_names_spec='$libname$shrext'
- ;;
- sysv4*MP*)
-+ library_names_spec='$libname$shrext'
- ;;
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-+ library_names_spec='$libname$shrext'
- ;;
- uts4*)
- ;;
-@@ -583,6 +647,8 @@
- sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
- escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
- shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
- escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-
- LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-@@ -596,6 +662,12 @@
- # Shared library suffix (normally "so").
- shlibext="$shlibext"
-
-+# Format of library name prefix.
-+libname_spec="$escaped_libname_spec"
-+
-+# Library names that the linker finds when passed -lNAME.
-+library_names_spec="$escaped_library_names_spec"
-+
- # Flag to hardcode \$libdir into a binary during linking.
- # This must work even if \$libdir does not exist.
- hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
new file mode 100644
index 0000000000..6af1604198
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
@@ -0,0 +1,87 @@
+From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 19 Feb 2017 23:32:46 -0800
+Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues
+
+Fixed when compile with "-Wformat -Wformat-security -Werror=format-security":
+| gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset':
+| gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security]
+| fprintf (a_fp, str) ;
+
+And:
+gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
+ fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++-----
+ gettext-tools/gnulib-lib/libxml/timsort.h | 2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
+index 617520f..100104b 100644
+--- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c
++++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
+@@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent)
+ g_return_if_fail (a_fp && a_this);
+ str = cr_statement_ruleset_to_string (a_this, a_indent);
+ if (str) {
+- fprintf (a_fp, str);
++ fprintf (a_fp, "%s", str);
+ g_free (str);
+ str = NULL;
+ }
+@@ -2658,7 +2658,7 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent)
+ str = cr_statement_charset_to_string (a_this,
+ a_indent) ;
+ if (str) {
+- fprintf (a_fp, str) ;
++ fprintf (a_fp, "%s", str) ;
+ g_free (str) ;
+ str = NULL ;
+ }
+@@ -2685,7 +2685,7 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent)
+
+ str = cr_statement_at_page_rule_to_string (a_this, a_indent) ;
+ if (str) {
+- fprintf (a_fp, str);
++ fprintf (a_fp, "%s", str);
+ g_free (str) ;
+ str = NULL ;
+ }
+@@ -2711,7 +2711,7 @@ cr_statement_dump_media_rule (CRStatement * a_this,
+
+ str = cr_statement_media_rule_to_string (a_this, a_indent) ;
+ if (str) {
+- fprintf (a_fp, str) ;
++ fprintf (a_fp, "%s", str) ;
+ g_free (str) ;
+ str = NULL ;
+ }
+@@ -2737,7 +2737,7 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp,
+
+ str = cr_statement_import_rule_to_string (a_this, a_indent) ;
+ if (str) {
+- fprintf (a_fp, str) ;
++ fprintf (a_fp, "%s", str) ;
+ g_free (str) ;
+ str = NULL ;
+ }
+diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h
+index 795f272..443918a 100644
+--- a/gettext-tools/gnulib-lib/libxml/timsort.h
++++ b/gettext-tools/gnulib-lib/libxml/timsort.h
+@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size)
+ SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE));
+ if (tempstore == NULL)
+ {
+- fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
++ fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size);
+ exit(1);
+ }
+ store->storage = tempstore;
+--
+2.10.2
+
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
new file mode 100644
index 0000000000..6dfe200d65
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
@@ -0,0 +1,141 @@
+Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=dce3a16]
+CVE: CVE-2018-18751
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001
+From: Daiki Ueno <ueno@gnu.org>
+Date: Thu, 15 Sep 2016 13:57:24 +0200
+Subject: [PATCH] xgettext: Fix crash with *.po file input
+
+When xgettext was given two *.po files with the same msgid_plural, it
+crashed with double-free. Problem reported by Davlet Panech in:
+http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html
+* gettext-tools/src/po-gram-gen.y: Don't free msgid_pluralform after
+calling do_callback_message, assuming that it takes ownership.
+* gettext-tools/src/read-catalog.c (default_add_message): Free
+msgid_plural after calling message_alloc.
+* gettext-tools/tests/xgettext-po-2: New file.
+* gettext-tools/tests/Makefile.am (TESTS): Add new test.
+---
+ gettext-tools/src/po-gram-gen.y | 13 ++++-----
+ gettext-tools/src/read-catalog.c | 2 ++
+ gettext-tools/tests/Makefile.am | 2 +-
+ gettext-tools/tests/xgettext-po-2 | 55 +++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 63 insertions(+), 9 deletions(-)
+ create mode 100755 gettext-tools/tests/xgettext-po-2
+
+diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y
+index becf5e6..4428e77 100644
+--- a/gettext-tools/src/po-gram-gen.y
++++ b/gettext-tools/src/po-gram-gen.y
+@@ -221,14 +221,11 @@ message
+ check_obsolete ($1, $3);
+ check_obsolete ($1, $4);
+ if (!$1.obsolete || pass_obsolete_entries)
+- {
+- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string,
+- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos,
+- $1.prev_ctxt,
+- $1.prev_id, $1.prev_id_plural,
+- $1.obsolete);
+- free ($3.string);
+- }
++ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string,
++ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos,
++ $1.prev_ctxt,
++ $1.prev_id, $1.prev_id_plural,
++ $1.obsolete);
+ else
+ {
+ free_message_intro ($1);
+diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c
+index 571d18e..6af6d20 100644
+--- a/gettext-tools/src/read-catalog.c
++++ b/gettext-tools/src/read-catalog.c
+@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this,
+ appropriate. */
+ mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len,
+ msgstr_pos);
++ if (msgid_plural != NULL)
++ free (msgid_plural);
+ mp->prev_msgctxt = prev_msgctxt;
+ mp->prev_msgid = prev_msgid;
+ mp->prev_msgid_plural = prev_msgid_plural;
+diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am
+index 23b09b1..0dfb4d8 100644
+--- a/gettext-tools/tests/Makefile.am
++++ b/gettext-tools/tests/Makefile.am
+@@ -95,7 +95,7 @@ TESTS = gettext-1 gettext-2 gettext-3 gettext-4 gettext-5 gettext-6 gettext-7 \
+ xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \
+ xgettext-perl-5 xgettext-perl-6 xgettext-perl-7 xgettext-perl-8 \
+ xgettext-php-1 xgettext-php-2 xgettext-php-3 xgettext-php-4 \
+- xgettext-po-1 \
++ xgettext-po-1 xgettext-po-2 \
+ xgettext-properties-1 \
+ xgettext-python-1 xgettext-python-2 xgettext-python-3 \
+ xgettext-python-4 \
+diff --git a/gettext-tools/tests/xgettext-po-2 b/gettext-tools/tests/xgettext-po-2
+new file mode 100755
+index 0000000..c4bd9d0
+--- /dev/null
++++ b/gettext-tools/tests/xgettext-po-2
+@@ -0,0 +1,55 @@
++#! /bin/sh
++. "${srcdir=.}/init.sh"; path_prepend_ . ../src
++
++# Test PO extractors with multiple input files.
++
++cat <<EOF > xg-po-2-1.po
++msgid "first msgid"
++msgid_plural "first msgid (plural)"
++msgstr[0] ""
++msgstr[1] ""
++
++msgid "second msgid"
++msgid_plural "second msgid (plural)"
++msgstr[0] ""
++msgstr[1] ""
++EOF
++
++cat <<EOF > xg-po-2-2.po
++msgid "third msgid"
++msgid_plural "third msgid (plural)"
++msgstr[0] ""
++msgstr[1] ""
++
++msgid "second msgid"
++msgid_plural "second msgid (plural)"
++msgstr[0] ""
++msgstr[1] ""
++EOF
++
++: ${XGETTEXT=xgettext}
++${XGETTEXT} --omit-header xg-po-2-1.po xg-po-2-2.po -o xg-po-2.tmp.po || Exit 1
++LC_ALL=C tr -d '\r' < xg-po-2.tmp.po > xg-po-2.po || Exit 1
++
++cat <<EOF > xg-po-2.ok
++msgid "first msgid"
++msgid_plural "first msgid (plural)"
++msgstr[0] ""
++msgstr[1] ""
++
++msgid "second msgid"
++msgid_plural "second msgid (plural)"
++msgstr[0] ""
++msgstr[1] ""
++
++msgid "third msgid"
++msgid_plural "third msgid (plural)"
++msgstr[0] ""
++msgstr[1] ""
++EOF
++
++: ${DIFF=diff}
++${DIFF} xg-po-2.ok xg-po-2.po
++result=$?
++
++exit $result
+--
+1.9.1
+
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest b/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest
new file mode 100644
index 0000000000..f17f3c87a7
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+#This script is used to run gettext test suites
+cd tests
+
+make -k runtest-TESTS top_srcdir=.. srcdir=. abs_srcdir=$PWD top_builddir=$PWD/../ abs_top_srcdir=$PWD/../ | cat
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch
new file mode 100644
index 0000000000..31ff9138a9
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch
@@ -0,0 +1,58 @@
+From c4b1f3a0c7b7c40b343be9b95deb84e0485643be Mon Sep 17 00:00:00 2001
+From: "Hongjun.Yang" <hongjun.yang@windriver.com>
+Date: Thu, 28 Jul 2016 12:36:15 +0800
+Subject: [PATCH] fix for ptest
+
+Add serial-tests support, ptest need it
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.ac | 2 +-
+ gettext-runtime/configure.ac | 2 +-
+ gettext-tools/configure.ac | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5e996fa..880581f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -23,7 +23,7 @@ AC_INIT([gettext],
+ [bug-gnu-gettext@gnu.org])
+ AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c])
+ AC_CONFIG_AUX_DIR([build-aux])
+-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests dist-xz dist-lzip])
++AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests dist-xz dist-lzip])
+
+ dnl Override automake's tar command used for creating distributions.
+ am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"'
+diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac
+index e9299b6..d4f5528 100644
+--- a/gettext-runtime/configure.ac
++++ b/gettext-runtime/configure.ac
+@@ -22,7 +22,7 @@ AC_INIT([gettext-runtime],
+ [bug-gnu-gettext@gnu.org])
+ AC_CONFIG_SRCDIR([intl/dcigettext.c])
+ AC_CONFIG_AUX_DIR([../build-aux])
+-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
++AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests])
+ AC_CONFIG_HEADERS([config.h])
+
+ dnl Installation directories.
+diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac
+index 920eeb6..c507434 100644
+--- a/gettext-tools/configure.ac
++++ b/gettext-tools/configure.ac
+@@ -22,7 +22,7 @@ AC_INIT([gettext-tools],
+ [bug-gnu-gettext@gnu.org])
+ AC_CONFIG_SRCDIR([src/msgfmt.c])
+ AC_CONFIG_AUX_DIR([../build-aux])
+-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
++AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests])
+ AC_CONFIG_HEADERS([config.h])
+
+ dnl Installation directories.
+--
+2.1.4
+
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
new file mode 100644
index 0000000000..6156a153f7
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
@@ -0,0 +1,321 @@
+For reasons which I just can't fathom gnulib doesn't use the expected tools to
+find libraries but badly reinvents the wheel. This will trivially lead to host
+contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad
+canonicalisation resulting in relative paths).
+
+Simply delete all the crazy, and replace with a single call to pkg-config.
+
+Upstream-Status: Inappropriate (upstream still refuse to consider pkg-config)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gnulib-local/m4/libcroco.m4 b/gnulib-local/m4/libcroco.m4
+index f79ea82f1..1f67274db 100644
+--- a/gettext-tools/gnulib-m4/libcroco.m4
++++ b/gettext-tools/gnulib-m4/libcroco.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBCROCO],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ dnl libcroco depends on libglib.
+ AC_REQUIRE([gl_LIBGLIB])
+
+@@ -23,65 +24,10 @@ AC_DEFUN([gl_LIBCROCO],
+ LTLIBCROCO=
+ INCCROCO=
+ if test "$gl_cv_libcroco_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to
+- dnl use the included one.
+- AC_CACHE_VAL([gl_cv_libcroco], [
+- gl_cv_libcroco=no
+- gl_cv_LIBCROCO=
+- gl_cv_LTLIBCROCO=
+- gl_cv_INCCROCO=
+- gl_save_LIBS="$LIBS"
+- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and
+- dnl INCCROCO_0_6 accordingly.
+- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0])
+- LIBS="$gl_save_LIBS $LIBCROCO_0_6"
+- AC_TRY_LINK([#include <libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- ])
+- if test "$gl_cv_libcroco" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6"
+- AC_TRY_LINK([#include <libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- gl_cv_INCCROCO="$INCCROCO_0_6"
+- ])
+- if test "$gl_cv_libcroco" != yes; then
+- dnl Often the include files are installed in
+- dnl /usr/include/libcroco-0.6/libcroco.
+- AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])
+- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
+- if test -d "$libcroco_include_dir"; then
+- gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- gl_cv_INCCROCO="-I$libcroco_include_dir"
+- fi
+- ])
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for libcroco])
+- AC_MSG_RESULT([$gl_cv_libcroco])
+- if test $gl_cv_libcroco = yes; then
+- LIBCROCO="$gl_cv_LIBCROCO"
+- LTLIBCROCO="$gl_cv_LTLIBCROCO"
+- INCCROCO="$gl_cv_INCCROCO"
+- else
+- gl_cv_libcroco_use_included=yes
+- fi
++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6])
++ LIBCROCO=$CROCO_LIBS
++ LTLIBCROCO=$CROCO_LIBS
++ INCCROCO=$CROCO_CFLAGS
+ fi
+ AC_SUBST([LIBCROCO])
+ AC_SUBST([LTLIBCROCO])
+diff --git a/gnulib-local/m4/libglib.m4 b/gnulib-local/m4/libglib.m4
+index 42e55e6fd..ab25a5b22 100644
+--- a/gettext-tools/gnulib-m4/libglib.m4
++++ b/gettext-tools/gnulib-m4/libglib.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBGLIB],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_MSG_CHECKING([whether included glib is requested])
+ AC_ARG_WITH([included-glib],
+ [ --with-included-glib use the glib2 included here],
+@@ -20,76 +21,10 @@ AC_DEFUN([gl_LIBGLIB],
+ LTLIBGLIB=
+ INCGLIB=
+ if test "$gl_cv_libglib_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use
+- dnl the included one.
+- AC_CACHE_VAL([gl_cv_libglib], [
+- gl_cv_libglib=no
+- gl_cv_LIBGLIB=
+- gl_cv_LTLIBGLIB=
+- gl_cv_INCGLIB=
+- gl_save_LIBS="$LIBS"
+- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and
+- dnl INCGLIB_2_0 accordingly.
+- dnl Don't use glib-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- AC_LIB_LINKFLAGS_BODY([glib-2.0])
+- LIBS="$gl_save_LIBS $LIBGLIB_2_0"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- ])
+- if test "$gl_cv_libglib" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- gl_cv_INCGLIB="$INCGLIB_2_0"
+- ])
+- if test "$gl_cv_libglib" != yes; then
+- dnl Often the include files are installed in /usr/include/glib-2.0
+- dnl and /usr/lib/glib-2.0/include.
+- if test -n "$LIBGLIB_2_0_PREFIX"; then
+- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
+- ])
+- fi
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for glib])
+- AC_MSG_RESULT([$gl_cv_libglib])
+- if test $gl_cv_libglib = yes; then
+- LIBGLIB="$gl_cv_LIBGLIB"
+- LTLIBGLIB="$gl_cv_LTLIBGLIB"
+- INCGLIB="$gl_cv_INCGLIB"
+- else
+- gl_cv_libglib_use_included=yes
+- fi
++ PKG_CHECK_MODULES([GLIB], [glib-2.0])
++ LIBGLIB="$GLIB_LIBS"
++ LTLIBGLIB="$GLIB_LIBS"
++ INCGLIB="$GLIB_CFLAGS"
+ fi
+ AC_SUBST([LIBGLIB])
+ AC_SUBST([LTLIBGLIB])
+diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4
+index 480c700d2..cb39309d5 100644
+--- a/gettext-tools/gnulib-m4/libxml.m4
++++ b/gettext-tools/gnulib-m4/libxml.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBXML],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_REQUIRE([AM_ICONV_LINK])
+
+ AC_MSG_CHECKING([whether included libxml is requested])
+@@ -22,100 +22,10 @@ AC_DEFUN([gl_LIBXML],
+ LTLIBXML=
+ INCXML=
+ if test "$gl_cv_libxml_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libxml2, or have to use
+- dnl the included one.
+- AC_CACHE_VAL([gl_cv_libxml], [
+- gl_cv_libxml=no
+- gl_cv_LIBXML=
+- gl_cv_LTLIBXML=
+- gl_cv_INCXML=
+- gl_save_LIBS="$LIBS"
+- LIBS="$LIBS $LIBICONV"
+- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2
+- dnl accordingly.
+- dnl Don't use xml2-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x,
+- dnl libxml2 is built in such a way that uses of xmlFree work fine with
+- dnl -Wl,--enable-auto-import but lead to a link error with
+- dnl -Wl,--disable-auto-import.
+- AC_LIB_LINKFLAGS_BODY([xml2])
+- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- ])
+- if test "$gl_cv_libxml" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCXML2"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- gl_cv_INCXML="$INCXML2"
+- ])
+- if test "$gl_cv_libxml" != yes; then
+- dnl Often the include files are installed in /usr/include/libxml2.
+- dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained.
+- dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is
+- dnl self-contained.
+- libxml2_include_dir=
+- AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>],
+- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h])
+- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
+- ])
+- if test -z "$libxml2_include_dir"; then
+- AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>],
+- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h])
+- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
+- ])
+- fi
+- if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then
+- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- gl_cv_INCXML="-I$libxml2_include_dir"
+- ])
+- fi
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for libxml])
+- AC_MSG_RESULT([$gl_cv_libxml])
+- if test $gl_cv_libxml = yes; then
+- LIBXML="$gl_cv_LIBXML"
+- LTLIBXML="$gl_cv_LTLIBXML"
+- INCXML="$gl_cv_INCXML"
+- else
+- gl_cv_libxml_use_included=yes
+- fi
++ PKG_CHECK_MODULES([XML], [libxml-2.0])
++ LIBXML=$XML_LIBS
++ LTLIBXML=$XML_LIBS
++ INCXML=$XML_CFLAGS
+ fi
+ AC_SUBST([LIBXML])
+ AC_SUBST([LTLIBXML])
+diff --git a/gnulib-local/lib/term-styled-ostream.oo.c b/gnulib-local/lib/term-styled-ostream.oo.c
+index 81a407467..218565329 100644
+--- a/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
++++ b/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
+@@ -25,4 +25,4 @@
+-#include <cr-om-parser.h>
+-#include <cr-sel-eng.h>
+-#include <cr-style.h>
+-#include <cr-rgb.h>
++#include <libcroco/cr-om-parser.h>
++#include <libcroco/cr-sel-eng.h>
++#include <libcroco/cr-style.h>
++#include <libcroco/cr-rgb.h>
+@@ -31 +31 @@
+-# include <cr-fonts.h>
++# include <libcroco/cr-fonts.h>
+@@ -33 +33 @@
+-#include <cr-string.h>
++#include <libcroco/cr-string.h>
diff --git a/meta/recipes-core/gettext/gettext_0.16.1.bb b/meta/recipes-core/gettext/gettext_0.16.1.bb
deleted file mode 100644
index e79f4dacf3..0000000000
--- a/meta/recipes-core/gettext/gettext_0.16.1.bb
+++ /dev/null
@@ -1,124 +0,0 @@
-SUMMARY = "Utilities and libraries for producing multi-lingual messages"
-DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
-HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
-SECTION = "libs"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9ea3144f04c41cd2eada5d3f472e6ea5"
-
-PR = "r6"
-DEPENDS = "virtual/libiconv"
-DEPENDS_class-native = ""
-PROVIDES = "virtual/libintl virtual/gettext"
-PROVIDES_class-native = "virtual/gettext-native"
-
-SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
- file://gettext-vpath.patch \
- file://linklib_from_0.17.patch \
- file://gettext-autoconf-lib-link-no-L.patch \
- file://disable_java.patch \
- file://fix_aclocal_version.patch \
- file://fix_gnu_source_circular.patch \
- file://hardcode_macro_version.patch \
- "
-
-SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"
-SRC_URI[sha256sum] = "0bf850d1a079fb5a61f0a47b1a9efd35eb44032255375e1cedb0253bc27b376d"
-
-PARALLEL_MAKE = ""
-
-LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-
-inherit autotools texinfo
-
-EXTRA_OECONF += "--without-lispdir \
- --disable-csharp \
- --disable-libasprintf \
- --disable-java \
- --disable-native-java \
- --disable-openmp \
- --without-emacs \
- "
-EXTRA_OECONF_append_libc-musl = "\
- gt_cv_func_gnugettext1_libc=yes \
- gt_cv_func_gnugettext2_libc=yes \
- "
-
-acpaths = '-I ${S}/autoconf-lib-link/m4/ \
- -I ${S}/gettext-runtime/m4 \
- -I ${S}/gettext-tools/m4'
-
-do_configure_prepend() {
- rm -f ${S}/config/m4/libtool.m4
-}
-
-do_install_append_libc-musl () {
- rm -f ${D}${libdir}/charset.alias
-}
-
-# these lack the .x behind the .so, but shouldn't be in the -dev package
-# Otherwise you get the following results:
-# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
-# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
-# because gettext depends on gettext-dev, which pulls in more -dev packages:
-# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
-# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
-# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
-# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
-
-PACKAGES =+ "libgettextlib libgettextsrc"
-FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
-FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
-
-PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-staticdev gettext-runtime-doc"
-
-FILES_${PN} += "${libdir}/${BPN}/*"
-
-FILES_gettext-runtime = "${bindir}/gettext \
- ${bindir}/ngettext \
- ${bindir}/envsubst \
- ${bindir}/gettext.sh \
- ${libdir}/libasprintf${SODEV} \
- ${libdir}/GNU.Gettext.dll \
- "
-FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
- ${libdir}/charset.alias \
- "
-FILES_gettext-runtime-staticdev += "${libdir}/libasprintf.a"
-FILES_gettext-runtime-dev += "${includedir}/autosprintf.h \
- ${libdir}/libasprintf${SOLIBDEV}"
-FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
- ${includedir}/libintl.h \
- "
-FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
- ${mandir}/man1/ngettext.* \
- ${mandir}/man1/envsubst.* \
- ${mandir}/man1/.* \
- ${mandir}/man3/* \
- ${docdir}/gettext/gettext.* \
- ${docdir}/gettext/ngettext.* \
- ${docdir}/gettext/envsubst.* \
- ${docdir}/gettext/*.3.html \
- ${datadir}/gettext/ABOUT-NLS \
- ${docdir}/gettext/csharpdoc/* \
- ${docdir}/libasprintf/autosprintf.html \
- ${infodir}/autosprintf.info \
- "
-
-do_install_append() {
- rm -f ${D}${libdir}/preloadable_libintl.so
-}
-
-do_install_append_class-native () {
- rm ${D}${datadir}/aclocal/*
- rm ${D}${datadir}/gettext/config.rpath
- rm ${D}${datadir}/gettext/po/Makefile.in.in
- rm ${D}${datadir}/gettext/po/remove-potcdate.sin
-}
-
-# Anyone inheriting gettext will have both gettext-native and gettext
-# available, and we don't want to use older macros from the target gettext in
-# a non-gplv3 build, so kill them and let dependent recipes rely on
-# gettext-native.
-SYSROOT_DIRS_BLACKLIST += "${datadir}/aclocal"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/meta/recipes-core/gettext/gettext_0.19.8.1.bb
index 7b8c1e8eb4..30121ad23e 100644
--- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.19.8.1.bb
@@ -1,28 +1,35 @@
SUMMARY = "Utilities and libraries for producing multi-lingual messages"
-DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
+DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. \
+These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file \
+naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and \
+a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
SECTION = "libs"
LICENSE = "GPLv3+ & LGPL-2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "gettext-native virtual/libiconv expat"
-DEPENDS_class-native = "gettext-minimal-native"
+# Because po-gram-gen.y has been modified by fix-CVE-2018-18751.patch,
+# it requires yacc which provided by bison-native
+# Please remove bison-native from DEPENDS* when next upgrade
+DEPENDS = "bison-native gettext-native virtual/libiconv"
+DEPENDS_class-native = "bison-native gettext-minimal-native"
PROVIDES = "virtual/libintl virtual/gettext"
PROVIDES_class-native = "virtual/gettext-native"
RCONFLICTS_${PN} = "proxy-libintl"
SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
file://parallel.patch \
file://add-with-bisonlocaledir.patch \
+ file://cr-statement.c-timsort.h-fix-formatting-issues.patch \
+ file://use-pkgconfig.patch \
+ file://fix-CVE-2018-18751.patch \
+ file://run-ptest \
+ file://serial-tests-config.patch \
"
SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43"
-PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
-
-LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-
-inherit autotools texinfo
+inherit autotools texinfo pkgconfig ptest
EXTRA_OECONF += "--without-lispdir \
--disable-csharp \
@@ -31,18 +38,27 @@ EXTRA_OECONF += "--without-lispdir \
--disable-native-java \
--disable-openmp \
--disable-acl \
- --with-included-glib \
--without-emacs \
--without-cvs \
--without-git \
- --with-included-libxml \
- --with-included-libcroco \
- --with-included-libunistring \
+ --cache-file=${B}/config.cache \
"
EXTRA_OECONF_append_class-target = " \
--with-bisonlocaledir=${datadir}/locale \
"
+PACKAGECONFIG ??= "croco glib libxml"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco"
+PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0"
+PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2"
+# Need paths here to avoid host contamination but this can cause RPATH warnings
+# or problems if $libdir isn't $prefix/lib.
+PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring"
+PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
+
acpaths = '-I ${S}/gettext-runtime/m4 \
-I ${S}/gettext-tools/m4'
@@ -82,15 +98,9 @@ FILES_gettext-runtime = "${bindir}/gettext \
${libdir}/libasprintf.so* \
${libdir}/GNU.Gettext.dll \
"
-FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
- ${libdir}/charset.alias \
- "
FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
${includedir}/autosprintf.h \
"
-FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
- ${includedir}/libintl.h \
- "
FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
${mandir}/man1/ngettext.* \
${mandir}/man1/envsubst.* \
@@ -115,6 +125,64 @@ do_install_append_class-native () {
rm ${D}${datadir}/gettext/config.rpath
rm ${D}${datadir}/gettext/po/Makefile.in.in
rm ${D}${datadir}/gettext/po/remove-potcdate.sin
+
+ create_wrapper ${D}${bindir}/msgfmt \
+ GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.19.8/"
+
}
+do_compile_ptest() {
+ cd ${B}/gettext-tools/tests/
+ sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_PROGRAMS)' Makefile
+ oe_runmake buildtest-TESTS
+ cd -
+}
+
+do_install_ptest() {
+ if [ ${PTEST_ENABLED} = "1" ]; then
+ mkdir -p ${D}${PTEST_PATH}/tests
+ mkdir -p ${D}${PTEST_PATH}/src
+ mkdir -p ${D}${PTEST_PATH}/po
+ mkdir -p ${D}${PTEST_PATH}/misc
+ cp -rf ${S}/gettext-tools/tests/* ${D}${PTEST_PATH}/tests
+ cp -rf ${B}/gettext-tools/tests/.libs/* ${D}${PTEST_PATH}/tests
+ cp -rf ${B}/gettext-runtime/intl/.libs/libgnuintl.so.8* ${D}${libdir}/
+ cp -rf ${B}/gettext-tools/tests/Makefile ${D}${PTEST_PATH}/tests
+ sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
+ sed -i -e 's:CONFIG_SHELL=.*:& LOCALE_FR='fr_FR.iso88591' LOCALE_FR_UTF8='fr_FR.utf8' LOCALE_JA='ja_JP.eucjp':g' \
+ -e 's:lang-c lang-c++:lang-c++:g' ${D}${PTEST_PATH}/tests/Makefile
+ install ${S}/gettext-tools/src/msgunfmt.tcl ${D}${PTEST_PATH}/src
+ install ${S}/gettext-tools/src/project-id ${D}${PTEST_PATH}/src
+ install ${B}/gettext-runtime/src/gettext.sh ${D}${PTEST_PATH}/src
+ install ${B}/gettext-runtime/src/ngettext ${D}${PTEST_PATH}/src
+ install ${B}/gettext-runtime/src/envsubst ${D}${PTEST_PATH}/src
+ install ${B}/gettext-runtime/src/gettext ${D}${PTEST_PATH}/src
+ install ${B}/gettext-tools/src/.libs/cldr-plurals ${D}${PTEST_PATH}/src
+ install ${S}/gettext-tools/po/gettext-tools.pot ${D}${PTEST_PATH}/po
+ install ${B}/gettext-tools/misc/* ${D}${PTEST_PATH}/misc
+ find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \;
+ chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \
+ ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2
+ fi
+}
+
+RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest_append_libc-glibc = "\
+ glibc-gconv-big5 \
+ glibc-charmap-big5 \
+ glibc-gconv-cp1251 \
+ glibc-charmap-cp1251 \
+ glibc-charmap-iso-8859-9 \
+ glibc-gconv-iso8859-9 \
+ glibc-charmap-koi8-r \
+ glibc-gconv-koi8-r \
+ glibc-gconv-iso8859-2 \
+ glibc-charmap-iso-8859-2 \
+ glibc-gconv-euc-kr \
+ glibc-charmap-euc-kr \
+"
+
+INSANE_SKIP_${PN}-ptest += "ldflags"
+INSANE_SKIP_${PN}-ptest += "rpaths"
+
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
index aee96aaa6e..0ebf138d60 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
@@ -1,30 +1,30 @@
-From d6501b107940e9f548c89236d773c6d33c15a5c9 Mon Sep 17 00:00:00 2001
+From d250652782b65b071b7cc8f01f2db833df104e0e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 16 Apr 2016 13:28:59 -0700
-Subject: [PATCH 1/2] Do not ignore return value of write()
+Subject: [PATCH] Do not ignore return value of write()
gcc warns about ignoring return value when compiling
with fortify turned on.
assert when write() fails
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
glib/tests/unix.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/glib/tests/unix.c b/glib/tests/unix.c
-index 3543458..4e7ed85 100644
+index 9d55a6c..a07f945 100644
--- a/glib/tests/unix.c
+++ b/glib/tests/unix.c
@@ -32,14 +32,15 @@ test_pipe (void)
GError *error = NULL;
int pipefd[2];
char buf[1024];
-- ssize_t bytes_read;
-+ ssize_t bytes_read, bytes_written;
+- gssize bytes_read;
++ gssize bytes_read, bytes_written;
gboolean res;
res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
@@ -37,6 +37,3 @@ index 3543458..4e7ed85 100644
memset (buf, 0, sizeof (buf));
bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
g_assert_cmpint (bytes_read, >, 0);
---
-2.8.0
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch
new file mode 100644
index 0000000000..edac4c9f75
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch
@@ -0,0 +1,61 @@
+From 60b36289ac314ad972cf81c1acd19f6f2e58ff25 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 15 Feb 2019 11:17:27 +0100
+Subject: [PATCH] Do not write $bindir into pkg-config files
+
+This would otherwise break when using the files to build other target
+components (we need to rely on PATH containing the paths to utilities,
+rather than use target paths).
+
+Upstream-Status: Inappropriate [upstream wants the paths in .pc files]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ gio/meson.build | 16 ++++++++--------
+ glib/meson.build | 6 +++---
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/gio/meson.build b/gio/meson.build
+index 71e88c4..8ce3987 100644
+--- a/gio/meson.build
++++ b/gio/meson.build
+@@ -831,14 +831,14 @@ pkg.generate(libgio,
+ 'schemasdir=' + join_paths('${datadir}', schemas_subdir),
+ 'bindir=' + join_paths('${prefix}', get_option('bindir')),
+ 'giomoduledir=' + giomodulesdir,
+- 'gio=' + join_paths('${bindir}', 'gio'),
+- 'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'),
+- 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'),
+- 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'),
+- 'gdbus=' + join_paths('${bindir}', 'gdbus'),
+- 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'),
+- 'gresource=' + join_paths('${bindir}', 'gresource'),
+- 'gsettings=' + join_paths('${bindir}', 'gsettings')],
++ 'gio=gio',
++ 'gio_querymodules=gio-querymodules',
++ 'glib_compile_schemas=glib-compile-schemas',
++ 'glib_compile_resources=glib-compile-resources',
++ 'gdbus=gdbus',
++ 'gdbus_codegen=gdbus-codegen',
++ 'gresource=gresource',
++ 'gsettings=gsettings'],
+ version : glib_version,
+ install_dir : glib_pkgconfigreldir,
+ filebase : 'gio-2.0',
+diff --git a/glib/meson.build b/glib/meson.build
+index 91a48f1..978fb73 100644
+--- a/glib/meson.build
++++ b/glib/meson.build
+@@ -375,9 +375,9 @@ pkg.generate(libglib,
+ subdirs : ['glib-2.0'],
+ extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
+ variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')),
+- 'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'),
+- 'gobject_query=' + join_paths('${bindir}', 'gobject-query'),
+- 'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')],
++ 'glib_genmarshal=glib-genmarshal',
++ 'gobject_query=gobject-query',
++ 'glib_mkenums=glib-mkenums'],
+ version : glib_version,
+ install_dir : glib_pkgconfigreldir,
+ filebase : 'glib-2.0',
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
new file mode 100644
index 0000000000..d8cf269bb8
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
@@ -0,0 +1,34 @@
+From 15f807481de53942525b48952c5b6bbb9fb66542 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Mar 2014 22:42:29 -0700
+Subject: [PATCH] Fix DATADIRNAME on uclibc/Linux
+
+translation files are always installed under PREFIX/share/locale in uclibc
+based systems therefore lets set DATADIRNAME to "share".
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+%% original patch: uclibc_musl_translation.patch
+---
+ m4macros/glib-gettext.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4
+index df6fbf0..47db864 100644
+--- a/m4macros/glib-gettext.m4
++++ b/m4macros/glib-gettext.m4
+@@ -293,6 +293,10 @@ msgstr ""
+ CATOBJEXT=.mo
+ DATADIRNAME=share
+ ;;
++ *-*-musl* | *-*-linux-uclibc*)
++ CATOBJEXT=.gmo
++ DATADIRNAME=share
++ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+--
+2.17.1
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
index 561d100209..a3d71f2b7a 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
@@ -1,4 +1,4 @@
-From 80682c171ccb27d01343d4cfcfb4dd49b7863ccc Mon Sep 17 00:00:00 2001
+From d29dfba67b1808eea6d428085f95b6e42cf2d1e4 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Tue, 22 Mar 2016 15:14:58 +0200
Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM
@@ -8,24 +8,20 @@ renamer does not cope with library packages with files in ${bindir}
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Upstream-Status: Inappropriate [OE specific]
+
---
- gio/Makefile.am | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ gio/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
-diff --git a/gio/Makefile.am b/gio/Makefile.am
-index b7f91cc..4d81cc0 100644
---- a/gio/Makefile.am
-+++ b/gio/Makefile.am
-@@ -702,7 +702,8 @@ gio.def: libgio-2.0.la
- gio-2.0.lib: libgio-2.0.la gio.def
- $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
-
--bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
-+bin_PROGRAMS = glib-compile-schemas glib-compile-resources gsettings
-+libexec_PROGRAMS = gio-querymodules
+diff --git a/gio/meson.build b/gio/meson.build
+index 4e5e021..90a741a 100644
+--- a/gio/meson.build
++++ b/gio/meson.build
+@@ -940,6 +940,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
+ c_args : gio_c_args,
+ # intl.lib is not compatible with SAFESEH
+ link_args : noseh_link_args,
++ install_dir: glib_libexecdir,
+ dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
- glib_compile_resources_LDADD = libgio-2.0.la \
- $(top_builddir)/gobject/libgobject-2.0.la \
---
-2.1.4
-
+ glib_compile_schemas = executable('glib-compile-schemas',
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
index 41a190eddf..67ca6240bc 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
@@ -1,7 +1,7 @@
-From 41534253b6b61ed4769eb6a3966698a50ee73b71 Mon Sep 17 00:00:00 2001
+From 2acf40361eecd17c6981743dabd06e25a9934258 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 12 Jun 2015 17:08:46 +0300
-Subject: [PATCH] Remove the warning about deprecated paths in schemas
+Subject: [PATCH 05/10] Remove the warning about deprecated paths in schemas
Some schemas in gsettings-desktop-schemas (such as proxy and locale)
are still using deprecated paths, as of 3.16.1. This causes warning
@@ -11,26 +11,33 @@ Upstream-Status: Inappropriate
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- gio/glib-compile-schemas.c | 6 ------
- 1 file changed, 6 deletions(-)
+ gio/glib-compile-schemas.c | 13 -------------
+ 1 file changed, 13 deletions(-)
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
-index e42949b..ec79d7c 100644
+index b8de090..130f89b 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
-@@ -1202,12 +1202,6 @@ parse_state_start_schema (ParseState *state,
+@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState *state,
return;
}
- if (path && (g_str_has_prefix (path, "/apps/") ||
- g_str_has_prefix (path, "/desktop/") ||
- g_str_has_prefix (path, "/system/")))
-- g_printerr ("warning: Schema '%s' has path '%s'. Paths starting with "
-- "'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path);
+- {
+- gchar *message = NULL;
+- message = g_strdup_printf (_("Warning: Schema “%s†has path “%sâ€. "
+- "Paths starting with "
+- "“/apps/â€, “/desktop/†or “/system/†are deprecated."),
+- id, path);
+- g_printerr ("%s\n", message);
+- g_free (message);
+- }
-
state->schema_state = schema_state_new (path, gettext_domain,
extends, extends_name, list_of);
--
-2.1.4
+2.14.1
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
new file mode 100644
index 0000000000..b02169e09b
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
@@ -0,0 +1,95 @@
+From cfff734af6bff6a30a649f784ecf698658c01884 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 13 Feb 2019 15:32:05 +0100
+Subject: [PATCH] Set host_machine correctly when building with mingw32
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ gio/tests/meson.build | 8 ++++----
+ glib/tests/meson.build | 2 +-
+ meson.build | 3 +++
+ tests/meson.build | 2 +-
+ 4 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index 95aafc1..9025eb2 100644
+--- a/gio/tests/meson.build
++++ b/gio/tests/meson.build
+@@ -13,7 +13,7 @@ test_c_args = [
+ '-UG_DISABLE_ASSERT',
+ ]
+
+-if host_machine.system() == 'windows'
++if host_system == 'windows'
+ common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
+ endif
+
+@@ -120,7 +120,7 @@ if dbus1_dep.found()
+ endif
+
+ # Test programs buildable on UNIX only
+-if host_machine.system() != 'windows'
++if host_system != 'windows'
+ gio_tests += {
+ 'file' : {},
+ 'gdbus-peer' : {
+@@ -332,7 +332,7 @@ if host_machine.system() != 'windows'
+ endif # unix
+
+ # Test programs buildable on Windows only
+-if host_machine.system() == 'windows'
++if host_system == 'windows'
+ gio_tests += {'win32-streams' : {}}
+ endif
+
+@@ -397,7 +397,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
+ }
+ endif
+
+-if host_machine.system() != 'windows'
++if host_system != 'windows'
+ test_extra_programs += {
+ 'gdbus-example-unix-fd-client' : {
+ 'install' : false,
+diff --git a/glib/tests/meson.build b/glib/tests/meson.build
+index c47133f..cad975f 100644
+--- a/glib/tests/meson.build
++++ b/glib/tests/meson.build
+@@ -132,7 +132,7 @@ if glib_conf.has('HAVE_EVENTFD')
+ }
+ endif
+
+-if host_machine.system() == 'windows'
++if host_system == 'windows'
+ if winsock2.found()
+ glib_tests += {
+ 'gpoll' : {
+diff --git a/meson.build b/meson.build
+index 717d1bc..2a3beb8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -32,6 +32,9 @@ else
+ endif
+
+ host_system = host_machine.system()
++if host_system == 'mingw32'
++ host_system = 'windows'
++endif
+
+ glib_version = meson.project_version()
+ glib_api_version = '2.0'
+diff --git a/tests/meson.build b/tests/meson.build
+index ce30442..5710f2c 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -66,7 +66,7 @@ test_extra_programs = {
+ 'unicode-collate' : {},
+ }
+
+-if host_machine.system() != 'windows'
++if host_system != 'windows'
+ tests += {
+ 'timeloop' : {},
+ 'iochannel-test' : {},
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
new file mode 100644
index 0000000000..833ad2540e
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
@@ -0,0 +1,31 @@
+From cce617bec254e327ed7bcad60f58208024c6dc42 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Oct 2019 17:46:26 -0700
+Subject: [PATCH] meson: Run atomics test on clang as well
+
+Fixes
+./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics.
+^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 9731de4..c678931 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1634,7 +1634,7 @@ atomicdefine = '''
+ # We know that we can always use real ("lock free") atomic operations with MSVC
+ if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops')
+ have_atomic_lock_free = true
+- if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define')
++ if (cc.get_id() == 'gcc' or cc.get_id() == 'clang') and not cc.compiles(atomicdefine, name : 'atomic ops define')
+ # Old gcc release may provide
+ # __sync_bool_compare_and_swap but doesn't define
+ # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+--
+2.23.0
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch b/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
deleted file mode 100644
index f61fa0ae6a..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From b06b22fecc7deda8c65e28670562ca2371e4e725 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 16 Apr 2016 13:43:54 -0700
-Subject: [PATCH 2/2] tests: Ignore y2k warnings
-
-silences
-| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c: In function 'test_strftime':
-| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c:1338:3: error: '%c' yields only last 2 digits of year in some locales [-Werror=format-y2k]
-| "a%a A%A b%b B%B c%c C%C d%d e%e F%F g%g G%G h%h H%H I%I j%j m%m M%M "
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- glib/tests/gdatetime.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
-index 16a163c..e6062fc 100644
---- a/glib/tests/gdatetime.c
-+++ b/glib/tests/gdatetime.c
-@@ -1326,6 +1326,9 @@ test_z (void)
- g_time_zone_unref (tz);
- }
-
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wformat-y2k"
-+
- static void
- test_strftime (void)
- {
-@@ -1351,6 +1354,7 @@ test_strftime (void)
- }
- #endif
- }
-+#pragma GCC diagnostic pop
-
- static void
- test_find_interval (void)
---
-2.8.0
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
new file mode 100644
index 0000000000..872340df96
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
@@ -0,0 +1,46 @@
+From b9160d951b9af647b97766c57295ca4f45cf9521 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 3 Oct 2017 10:45:55 +0300
+Subject: [PATCH 10/10] Do not hardcode python path into various tools
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +-
+ gobject/glib-genmarshal.in | 2 +-
+ gobject/glib-mkenums.in | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
+index 8050981..e693ef3 100755
+--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # GDBus - GLib D-Bus Library
+ #
+diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
+index 09e8408..b2f9d99 100755
+--- a/gobject/glib-genmarshal.in
++++ b/gobject/glib-genmarshal.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # pylint: disable=too-many-lines, missing-docstring, invalid-name
+
+diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
+index d4bfd11..051fce4 100755
+--- a/gobject/glib-mkenums.in
++++ b/gobject/glib-mkenums.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # If the code below looks horrible and unpythonic, do not panic.
+ #
+--
+2.14.1
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
index 9b4ded14d5..48899ce852 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -1,4 +1,4 @@
-From 310dfe1bdd16d4b254732fcc202c6211629bc7b6 Mon Sep 17 00:00:00 2001
+From 0061d66057dfd7e7267772df60b36474fb180eed Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Mon, 9 Nov 2015 11:07:27 +0200
Subject: [PATCH] Enable more tests while cross-compiling
@@ -9,73 +9,113 @@ case we can depend on glib-2.0-native.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- gio/tests/Makefile.am | 8 +++-----
- tests/gobject/Makefile.am | 8 +++-----
- 2 files changed, 6 insertions(+), 10 deletions(-)
+ gio/tests/meson.build | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
-diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
-index 868873f..533e454 100644
---- a/gio/tests/Makefile.am
-+++ b/gio/tests/Makefile.am
-@@ -503,10 +503,9 @@ test_programs += \
- endif
-
- # -----------------------------------------------------------------------------
--# The resources test is a bit more complicated, and we cannot build it when
--# cross-compiling GIO because it requires running a binary...
-+# The resources test is a bit more complicated, and requires glib-native
-+# for running a binary
-
--if !CROSS_COMPILING
- test_programs += resources
- resources_SOURCES = resources.c
- nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
-@@ -528,7 +527,11 @@ if !ENABLE_INSTALLED_TESTS
- libresourceplugin_la_LDFLAGS += -rpath /
- endif
-
-+if !CROSS_COMPILING
- glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
-+else
-+glib_compile_resources=glib-compile-resources
-+endif
-
- resources.o: test_resources2.h
- test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
-@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
-
- EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
- CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
--endif # !CROSS_COMPILING
-
- BUILT_SOURCES += giotypefuncs.c
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index 382dfcc..c171717 100644
+--- a/gio/tests/meson.build
++++ b/gio/tests/meson.build
+@@ -191,7 +191,7 @@ if host_machine.system() != 'windows'
-diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
-index 16f2827..4c2208e 100644
---- a/tests/gobject/Makefile.am
-+++ b/tests/gobject/Makefile.am
-@@ -48,10 +48,13 @@ if ENABLE_TIMELOOP
- installed_test_programs += timeloop-closure
+ # Test programs that need to bring up a session bus (requires dbus-daemon)
+ have_dbus_daemon = find_program('dbus-daemon', required : false).found()
+- if have_dbus_daemon
++ if true
+ annotate_args = [
+ '--annotate', 'org.project.Bar', 'Key1', 'Value1',
+ '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
+@@ -465,12 +465,12 @@ if installed_tests_enabled
+ install_data('static-link.py', install_dir : installed_tests_execdir)
endif
--# The marshal test requires running a binary, which means we cannot
--# build it when cross-compiling
-+# The marshal test requires running a binary, which means we require
-+# glib-native when cross-compiling
- if !CROSS_COMPILING
- glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
-+else
-+glib_genmarshal=$(shell which glib-genmarshal)
-+endif
+-if not meson.is_cross_build() or meson.has_exe_wrapper()
++if meson.is_cross_build()
- testmarshal.h: stamp-testmarshal.h
- @true
-@@ -69,7 +72,6 @@ BUILT_SOURCES += testmarshal.h testmarshal.c
- CLEANFILES += stamp-testmarshal.h
- EXTRA_DIST += testcommon.h testmarshal.list
- BUILT_EXTRA_DIST += testmarshal.h testmarshal.c
--endif # !CROSS_COMPILING
+ plugin_resources_c = custom_target('plugin-resources.c',
+ input : 'test4.gresource.xml',
+ output : 'plugin-resources.c',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--generate-source',
+@@ -494,7 +494,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ test_gresource = custom_target('test.gresource',
+ input : 'test.gresource.xml',
+ output : 'test.gresource',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--sourcedir=' + meson.current_build_dir(),
+@@ -505,7 +505,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ test_resources2_c = custom_target('test_resources2.c',
+ input : 'test3.gresource.xml',
+ output : 'test_resources2.c',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--generate',
+@@ -516,7 +516,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ test_resources2_h = custom_target('test_resources2.h',
+ input : 'test3.gresource.xml',
+ output : 'test_resources2.h',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--generate',
+@@ -528,7 +528,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ input : 'test2.gresource.xml',
+ depends : big_test_resource,
+ output : 'test_resources.c',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--sourcedir=' + meson.current_build_dir(),
+@@ -539,7 +539,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ digit_test_resources_c = custom_target('digit_test_resources.c',
+ input : '111_digit_test.gresource.xml',
+ output : 'digit_test_resources.c',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--sourcedir=' + meson.current_build_dir(),
+@@ -550,7 +550,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ digit_test_resources_h = custom_target('digit_test_resources.h',
+ input : '111_digit_test.gresource.xml',
+ output : 'digit_test_resources.h',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--generate',
+@@ -579,11 +579,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ # LLVM once that support is in a stable release.
+ objcopy = find_program('objcopy', required : false)
- dist-hook: $(BUILT_EXTRA_DIST)
- files='$(BUILT_EXTRA_DIST)'; \
+- if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found()
++ if not meson.is_cross_build()
+ test_gresource_binary = custom_target('test5.gresource',
+ input : 'test5.gresource.xml',
+ output : 'test5.gresource',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--sourcedir=' + meson.current_build_dir(),
+@@ -595,7 +595,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ test_resources_binary_c = custom_target('test_resources_binary.c',
+ input : 'test5.gresource.xml',
+ output : 'test_resources_binary.c',
+- command : [glib_compile_resources,
++ command : ['glib-compile-resources',
+ '--target=@OUTPUT@',
+ '--sourcedir=' + meson.current_source_dir(),
+ '--sourcedir=' + meson.current_build_dir(),
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch b/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch
deleted file mode 100644
index 3d0c008bbe..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From c53e94a520b573aa0dcf12903e9563fe8badc34c Mon Sep 17 00:00:00 2001
-From: Marius Avram <marius.avram@intel.com>
-Date: Wed, 27 Aug 2014 12:10:41 +0300
-Subject: [PATCH] Allow /run/media/sdX drive mount if username root
-
-In case that the username logged in the system is root
-the drives are directly mounted in /run/media/sdX and
-not /run/media/<username>/sdX as the function
-g_unix_mount_guess_should_display() expects.
-
-Without this change USB stick mounts are not accesible from
-graphical applications such as the File Manager (pcmanfm).
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Marius Avram <marius.avram@intel.com>
----
- gio/gunixmounts.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
-index 4999354..f6c1472 100644
---- a/gio/gunixmounts.c
-+++ b/gio/gunixmounts.c
-@@ -2136,6 +2136,11 @@ g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry)
- mount_path[sizeof ("/run/media/") - 1 + user_name_len] == '/')
- is_in_runtime_dir = TRUE;
-
-+ /* Allow no username in path in /run/media if current user is root */
-+ if (strcmp(user_name, "root") == 0 &&
-+ strncmp (mount_path, "/run/media/", sizeof("run/media")) == 0)
-+ is_in_runtime_dir = TRUE;
-+
- if (is_in_runtime_dir || g_str_has_prefix (mount_path, "/media/"))
- {
- char *path;
---
-1.7.9.5
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
deleted file mode 100644
index aa5de27d12..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From e8740833336c59d6f616a1781b256e648e338c26 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 28 Apr 2012 18:24:50 +0200
-Subject: [PATCH] configure: use $host_alias-libtool instead of libtool
- directly
-
-Poky renames libtool to $host_alias-libtool.
-./$host_alias-libtool isn't created until after configure runs with
-libtool >= 2.2.2
-so we can't call # it at this point. We can safely assume a version is
-available
-from PATH though
-
-Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>
-Rebased to glib-2.32.1 by Martin Jansa <Martin.Jansa@gmail.com>
-Rebased to glib-2.31.20+ by Andre McCurdy <armccurdy@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure.ac | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1af90c5..f6b7a73 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1378,7 +1378,7 @@ if test x"$glib_native_win32" = xyes; then
- G_MODULE_LDFLAGS=
- else
- export SED
-- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- fi
- dnl G_MODULE_IMPL= don't reset, so cmd-line can override
- G_MODULE_NEED_USCORE=0
-@@ -1427,13 +1427,13 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
- LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
- dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
- echo "void glib_plugin_test(void) { }" > plugin.c
-- ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
-+ ${SHELL} ./$host_alias-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
- ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1
-- ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
-+ ${SHELL} ./$host_alias-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
- ${LDFLAGS} -module -o plugin.la -export-dynamic \
- -shrext ".o" -avoid-version plugin.lo \
- -rpath /dont/care >/dev/null 2>&1
-- eval `./libtool --config | grep ^objdir`
-+ eval `./$host_alias-libtool --config | grep ^objdir`
- AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
- glib_cv_rtldglobal_broken,[
- AC_TRY_RUN([
-@@ -1506,7 +1506,7 @@ fi
-
- AC_MSG_CHECKING(for the suffix of module shared libraries)
- export SED
--shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
-+shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
- eval $shrext_cmds
- module=yes eval std_shrext=$shrext_cmds
- # chop the initial dot
---
-1.9.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
deleted file mode 100644
index 1571112b0e..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Rename 'rand' variable to avoid conflict.
-
-Upstream-Status: pending
-Signed-off-by: Björn Stenberg <bjst@enea.com>
-
-diff -u glib-2.34.3/tests/refcount/signals.c~ glib-2.34.3/tests/refcount/signals.c
---- glib-2.34.3/tests/refcount/signals.c 2012-11-26 17:52:48.000000000 +0100
-+++ glib-2.34.3/tests/refcount/signals.c 2013-02-08 14:24:10.052477546 +0100
-@@ -9,7 +9,7 @@
- #define MY_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), G_TYPE_TEST))
- #define MY_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), G_TYPE_TEST, GTestClass))
-
--static GRand *rand;
-+static GRand *grand;
-
- typedef struct _GTest GTest;
- typedef struct _GTestClass GTestClass;
-@@ -84,7 +84,7 @@
- NULL
- };
-
-- rand = g_rand_new();
-+ grand = g_rand_new();
-
- test_type = g_type_register_static (G_TYPE_OBJECT, "GTest",
- &test_info, 0);
-@@ -218,7 +218,7 @@
- static void
- my_test_do_prop (GTest * test)
- {
-- test->value = g_rand_int (rand);
-+ test->value = g_rand_int (grand);
- g_object_notify (G_OBJECT (test), "test-prop");
- }
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch b/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch
deleted file mode 100644
index dc62b92ef3..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-The autoptr types should be excluded from gobject-introspection parsing as
-they're not user-facing.
-
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/gio/gio-autocleanups.h b/gio/gio-autocleanups.h
-index a95ba65..24ccc2d 100644
---- a/gio/gio-autocleanups.h
-+++ b/gio/gio-autocleanups.h
-@@ -21,6 +21,8 @@
- #error "Only <gio/gio.h> can be included directly."
- #endif
-
-+#ifndef __GI_SCANNER__
-+
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAction, g_object_unref)
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GActionMap, g_object_unref)
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfo, g_object_unref)
-@@ -146,3 +148,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolume, g_object_unref)
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolumeMonitor, g_object_unref)
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibCompressor, g_object_unref)
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibDecompressor, g_object_unref)
-+
-+#endif
-diff --git a/glib/glib-autocleanups.h b/glib/glib-autocleanups.h
-index 6355f75..09d28be 100644
---- a/glib/glib-autocleanups.h
-+++ b/glib/glib-autocleanups.h
-@@ -21,6 +21,8 @@
- #error "Only <glib.h> can be included directly."
- #endif
-
-+#ifndef __GI_SCANNER__
-+
- static inline void
- g_autoptr_cleanup_generic_gfree (void *p)
- {
-@@ -87,3 +89,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantDict, g_variant_dict_unref)
- G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GVariantDict, g_variant_dict_clear)
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantType, g_variant_type_free)
- G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL)
-+
-+#endif
-diff --git a/gobject/gobject-autocleanups.h b/gobject/gobject-autocleanups.h
-index 980203f..a1d4ba1 100644
---- a/gobject/gobject-autocleanups.h
-+++ b/gobject/gobject-autocleanups.h
-@@ -21,6 +21,10 @@
- #error "Only <glib-object.h> can be included directly."
- #endif
-
-+#ifndef __GI_SCANNER__
-+
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
- G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
- G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
-+
-+#endif
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch
deleted file mode 100644
index ee435111fc..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-# an very old patch cherry-picked in every glib-2.0 patch directory. The earliest container
-# for it is 2.6.5 in OE. The earliest commit for it is c8e5702127e507e82e6f68a4b8c546803accea9d
-# in OE side which ports from previous bitkeeper SCM. In OE side it's only used til 2.12.4.
-#
-# keep it since it's always cleaner to not hardcode destination path. Use @datadir@ is more
-# portable here. mark for upstream
-#
-# by Kevin Tian <kevin.tian@intel.com>, 06/25/2010
-# Rebased by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010
-
-Upstream-Status: Inappropriate [configuration]
-
-diff -ruN glib-2.27.3-orig/glib-gettextize.in glib-2.27.3/glib-gettextize.in
---- glib-2.27.3-orig/glib-gettextize.in 2009-04-01 07:04:20.000000000 +0800
-+++ glib-2.27.3/glib-gettextize.in 2010-11-16 12:55:06.874605916 +0800
-@@ -52,7 +52,7 @@
- datadir=@datadir@
- datarootdir=@datarootdir@
-
--gettext_dir=$prefix/share/glib-2.0/gettext
-+gettext_dir=@datadir@/glib-2.0/gettext
-
- while test $# -gt 0; do
- case "$1" in
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-meson.cross b/meta/recipes-core/glib-2.0/glib-2.0/glib-meson.cross
new file mode 100644
index 0000000000..b5df400727
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-meson.cross
@@ -0,0 +1,9 @@
+[properties]
+have_c99_vsnprintf = true
+have_c99_snprintf = true
+have_unix98_printf = true
+va_val_copy = true
+growing_stack = false
+
+[binaries]
+env = "/usr/bin/env"
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch
deleted file mode 100644
index f3be02770c..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Instead of writing the temporary mapping files in the mappedfile test to the
-user runtime directory, write them to $TMP. The runtime directory may not
-currently exist if the test is executed on a non-desktop system and the test
-doesn't attempt to create the directory structure.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
-index 40e0e60..27a24be 100644
---- a/glib/tests/mappedfile.c
-+++ b/glib/tests/mappedfile.c
-@@ -81,7 +81,7 @@ test_writable (void)
- const gchar *new = "abcdefghijklmnopqrstuvxyz";
- gchar *tmp_copy_path;
-
-- tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL);
-+ tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL);
-
- g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error);
- g_assert_no_error (error);
-@@ -125,7 +125,7 @@ test_writable_fd (void)
- int fd;
- gchar *tmp_copy_path;
-
-- tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL);
-+ tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL);
-
- g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error);
- g_assert_no_error (error);
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
index 65d5b43f9b..70a43a7723 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -1,3 +1,8 @@
+From dd8c6822d05d65e8db72cbff0b2f3c1088686b6f Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Fri, 11 Mar 2016 15:35:55 +0000
+Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds
+
Instead of hard-coding GIO_MODULE_PATH when glib is built, use dladdr() to
determine where libglib.so is and use that path to calculate GIO_MODULES_DIR.
@@ -8,15 +13,16 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
Port patch to 2.48
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
gio/giomodule.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gio/giomodule.c b/gio/giomodule.c
-index da7c167..cc0bc7c 100644
+index 1007abd..5380982 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
-@@ -40,6 +40,8 @@
+@@ -44,6 +44,8 @@
#include "gnetworkmonitor.h"
#ifdef G_OS_WIN32
#include "gregistrysettingsbackend.h"
@@ -25,7 +31,7 @@ index da7c167..cc0bc7c 100644
#endif
#include <glib/gstdio.h>
-@@ -1036,7 +1038,15 @@ get_gio_module_dir (void)
+@@ -1158,7 +1160,15 @@ get_gio_module_dir (void)
#endif
g_free (install_dir);
#else
@@ -42,6 +48,3 @@ index da7c167..cc0bc7c 100644
#endif
}
---
-2.1.4
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
index 5b85e8fabe..fc50082c8e 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -1,5 +1,6 @@
#! /bin/sh
+set -eux
useradd glib2-test
-su glib2-test -c gnome-desktop-testing-runner glib
+su glib2-test -c 'gnome-desktop-testing-runner glib'
userdel glib2-test
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch b/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch
deleted file mode 100644
index 7aa6217d69..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix DATADIRNAME on uclibc/Linux
-
-translation files are always installed under PREFIX/share/locale in uclibc
-based systems therefore lets set DATADIRNAME to "share".
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: glib-2.46.1/m4macros/glib-gettext.m4
-===================================================================
---- glib-2.46.1.orig/m4macros/glib-gettext.m4
-+++ glib-2.46.1/m4macros/glib-gettext.m4
-@@ -243,6 +243,10 @@ msgstr ""
- CATOBJEXT=.mo
- DATADIRNAME=share
- ;;
-+ *-*-musl* | *-*-linux-uclibc*)
-+ CATOBJEXT=.gmo
-+ DATADIRNAME=share
-+ ;;
- *)
- CATOBJEXT=.mo
- DATADIRNAME=lib
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb
deleted file mode 100644
index a45f644448..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require glib.inc
-
-PE = "1"
-
-SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
- file://configure-libtool.patch \
- file://fix-conflicting-rand.patch \
- file://run-ptest \
- file://ptest-paths.patch \
- file://uclibc_musl_translation.patch \
- file://allow-run-media-sdX-drive-mount-if-username-root.patch \
- file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
- file://Enable-more-tests-while-cross-compiling.patch \
- file://gi-exclude.patch \
- file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
- file://0001-Do-not-ignore-return-value-of-write.patch \
- file://0002-tests-Ignore-y2k-warnings.patch \
- "
-
-SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
- file://relocate-modules.patch"
-
-SRC_URI[md5sum] = "f4ac1aa2efd4f5798c37625ea697ac57"
-SRC_URI[sha256sum] = "f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4"
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.62.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.62.3.bb
new file mode 100644
index 0000000000..25406ecfc8
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.62.3.bb
@@ -0,0 +1,24 @@
+require glib.inc
+
+PE = "1"
+
+SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
+ file://run-ptest \
+ file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
+ file://Enable-more-tests-while-cross-compiling.patch \
+ file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
+ file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
+ file://0001-Do-not-ignore-return-value-of-write.patch \
+ file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
+ file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
+ file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
+ file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
+ "
+
+SRC_URI_append_class-native = " file://relocate-modules.patch"
+SRC_URI_append_class-target = " file://glib-meson.cross"
+
+SRC_URI[md5sum] = "9766a37736974e636227d62f86bae40e"
+SRC_URI[sha256sum] = "4400adc9f0d3ffcfe8e84225210370ce3f9853afb81812ddadb685325aa655c4"
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index 906e0d4d56..e811b42d77 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -3,45 +3,53 @@ DESCRIPTION = "GLib is a general-purpose utility library, which provides many us
HOMEPAGE = "https://developer.gnome.org/glib/"
# pcre is under BSD;
-# docs/reference/COPYING is with a 'public domai'-like license!
-LICENSE = "LGPLv2+ & BSD & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://glib/glib.h;beginline=4;endline=17;md5=b4f0f4a399c19e5ebb20c31b79d6bc32 \
- file://gmodule/COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gmodule/gmodule.h;beginline=4;endline=17;md5=b4f0f4a399c19e5ebb20c31b79d6bc32 \
- file://glib/pcre/COPYING;md5=266ebc3ff74ee9ce6fad65577667c0f4 \
- file://glib/pcre/pcre.h;beginline=11;endline=35;md5=de27f2bf633d20a2b7af0b1983423283 \
+# docs/reference/COPYING is with a 'public domain'-like license!
+LICENSE = "LGPLv2.1+ & BSD & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \
+ file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \
+ file://glib/pcre/pcre.h;beginline=8;endline=36;md5=3e2977dae4ad05217f58c446237298fc \
file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
BUGTRACKER = "http://bugzilla.gnome.org"
SECTION = "libs"
+CVE_PRODUCT = "glib"
+
BBCLASSEXTEND = "native nativesdk"
-DEPENDS = "virtual/libiconv libffi zlib glib-2.0-native"
-DEPENDS_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' dbus', '', d)}"
-DEPENDS_class-native = "pkgconfig-native gettext-native libffi-native zlib-native"
-DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-gettext nativesdk-libffi nativesdk-zlib glib-2.0-native"
+DEPENDS = "glib-2.0-native \
+ virtual/libintl \
+ virtual/libiconv \
+ libffi \
+ zlib"
PACKAGES += "${PN}-codegen ${PN}-utils"
LEAD_SONAME = "libglib-2.0.*"
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native
+inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages features_check
+
+GTKDOC_MESON_OPTION = "gtk_doc"
+
+# This avoids the need to depend on target python3, which in case of mingw is not even possible.
+# meson's python configuration pokes into python3 configuration, so this provides the native config to it.
+unset _PYTHON_SYSCONFIGDATA_NAME
S = "${WORKDIR}/glib-${PV}"
-PACKAGECONFIG ??= "system-pcre"
+PACKAGECONFIG ??= "system-pcre libmount \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
# To use the system pcre it must be configured with --enable-unicode-properties
-PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre"
+PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre"
+PACKAGECONFIG[libmount] = "-Dlibmount=true,-Dlibmount=false,util-linux"
+PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native"
+# libelf is auto-detected without a configuration option
+PACKAGECONFIG[libelf] = ",,elfutils"
+PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,dbus"
-CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man"
-
-PRINTF = "--enable-included-printf=no"
-PRINTF_darwin = "--enable-included-printf=yes"
-PRINTF_mingw32 = "--enable-included-printf=yes"
-EXTRA_OECONF = "${PRINTF} ${CORECONF}"
-EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
-EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu"
+EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=disabled"
+EXTRA_OEMESON_append_class-target = " --cross-file ${WORKDIR}/glib-meson.cross"
do_configure_prepend() {
sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -60,19 +68,34 @@ FILES_${PN}-dev += "${libdir}/glib-2.0/include \
${bindir}/glib-compile-resources \
${datadir}/glib-2.0/gettext/po/Makefile.in.in \
${datadir}/glib-2.0/schemas/gschema.dtd \
+ ${datadir}/glib-2.0/valgrind/glib.supp \
${datadir}/gettext/its"
FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
${bindir}/gdbus-codegen"
FILES_${PN}-utils = "${bindir}/*"
+SHAREDMIMEDEP = "shared-mime-info"
+SHAREDMIMEDEP_class-native = ""
+# When cross compiling for Windows we don't want to include this
+SHAREDMIMEDEP_mingw32 = ""
+
+RRECOMMENDS_${PN} += "${SHAREDMIMEDEP}"
+
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
# Valgrind runtime detection works using hand-written assembly, which
# doesn't support mips16e
CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1"
-USE_NLS = "yes"
+# GLib generally requires gettext to be present so for USE_NLS to yes. For
+# native builds as i18n is disabled globally we have to add a gettext-native dependency.
+USE_NLS_class-target = "yes"
+USE_NLS_class-nativesdk = "yes"
+DEPENDS_append_class-native = " gettext-native"
+
+EXEEXT = ""
+EXEEXT_mingw32 = ".exe"
do_install_append () {
if [ -f ${D}${bindir}/gtester-report ]; then
@@ -84,29 +107,42 @@ do_install_append () {
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
- # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
- # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
- if [ -f ${D}${bindir}/glib-mkenums ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
+ if [ -e ${D}${libdir}/charset.alias ]; then
+ rm -f ${D}${libdir}/charset.alias
fi
+ # Make sure gio-querymodules is unique among multilibs
+ if test "x${MLPREFIX}" != "x"; then
+ mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT}
+ fi
+ # Autotools does this, meson does not
+ mkdir -p ${D}${libdir}/gio/modules
+}
+
+do_install_append_class-target () {
+ # Tests are only installed on targets, not native builds. Separating this out
+ # keeps glib-2.0-native from depending on DISTRO_FEATURES
if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then
if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", "true", d)}; then
rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test
fi
fi
-
- # Make sure gio-querymodules is unique among multilibs
- if test "x${MLPREFIX}" != "x"; then
- mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules
- fi
}
-do_install_append_libc-musl () {
- rm -f ${D}${libdir}/charset.alias
+# As we do not build python3 for windows, makes no sense to ship the script that's using it
+do_install_append_mingw32() {
+ rm -f ${D}${bindir}/gtester-report
}
+CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml"
+CODEGEN_PYTHON_RDEPENDS_mingw32 = ""
+
+RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}"
+
RDEPENDS_${PN}-ptest += "\
+ coreutils \
+ libgcc \
+ dbus \
gnome-desktop-testing \
tzdata \
tzdata-americas \
@@ -114,6 +150,16 @@ RDEPENDS_${PN}-ptest += "\
tzdata-europe \
tzdata-posix \
shared-mime-info \
+ ${PN}-locale-ja \
+ ${PN}-locale-fr \
+ ${PN}-locale-el \
+ ${PN}-locale-hr \
+ ${PN}-locale-lt \
+ ${PN}-locale-pl \
+ ${PN}-locale-ru \
+ ${PN}-locale-th \
+ python3-core \
+ python3-modules \
"
RDEPENDS_${PN}-ptest_append_libc-glibc = "\
@@ -128,6 +174,18 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = "\
glibc-gconv-iso8859-15 \
glibc-charmap-invariant \
glibc-localedata-translit-cjk-variants \
+ locale-base-tr-tr \
+ locale-base-lt-lt \
+ locale-base-ja-jp.euc-jp \
+ locale-base-fa-ir \
+ locale-base-ru-ru \
+ locale-base-de-de \
+ locale-base-hr-hr \
+ locale-base-el-gr \
+ locale-base-fr-fr \
+ locale-base-es-es \
+ locale-base-en-gb \
+ locale-base-en-us \
+ locale-base-pl-pl \
+ locale-base-pl-pl.iso-8859-2 \
"
-
-INSANE_SKIP_${PN}-ptest += "libdir"
diff --git a/meta/recipes-core/glib-networking/glib-networking_2.48.2.bb b/meta/recipes-core/glib-networking/glib-networking_2.48.2.bb
deleted file mode 100644
index 50d9983fe9..0000000000
--- a/meta/recipes-core/glib-networking/glib-networking_2.48.2.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "GLib networking extensions"
-DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
-HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SECTION = "libs"
-DEPENDS = "glib-2.0 intltool-native"
-
-SRC_URI[archive.md5sum] = "d7cf81d52c856b0c66f7821021f40e08"
-SRC_URI[archive.sha256sum] = "925c0c49d6b2b8b5695f2e33cd952d1dbb7d18d3f2f796413577719315bb3a84"
-
-PACKAGECONFIG ??= "ca-certificates gnutls"
-
-# No explicit dependency as it works without ca-certificates installed
-PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
-PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
-
-EXTRA_OECONF = "--without-gnome-proxy"
-
-inherit gnomebase gettext upstream-version-is-even gio-module-cache
-
-FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
-FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
-FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/meta/recipes-core/glib-networking/glib-networking_2.62.1.bb b/meta/recipes-core/glib-networking/glib-networking_2.62.1.bb
new file mode 100644
index 0000000000..81d3fd43d9
--- /dev/null
+++ b/meta/recipes-core/glib-networking/glib-networking_2.62.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "GLib networking extensions"
+DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/glib-networking/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SECTION = "libs"
+DEPENDS = "glib-2.0"
+
+SRC_URI[archive.md5sum] = "64ca1e1e43e623b916059585bf7e4758"
+SRC_URI[archive.sha256sum] = "3c55ae6771ad7a79fa606a834f4686ed555c2774ed6e9ece6f3c0f6a3dab7110"
+
+PACKAGECONFIG ??= "gnutls"
+
+PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls"
+PACKAGECONFIG[openssl] = "-Dopenssl=enabled,-Dopenssl=disabled,openssl"
+PACKAGECONFIG[libproxy] = "-Dlibproxy=enabled,-Dlibproxy=disabled,libproxy"
+
+EXTRA_OEMESON = "-Dgnome_proxy=disabled"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gettext upstream-version-is-even gio-module-cache
+
+FILES_${PN} += "\
+ ${libdir}/gio/modules/libgio*.so \
+ ${datadir}/dbus-1/services/ \
+ ${systemd_user_unitdir} \
+ "
+FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
+FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.24.bb b/meta/recipes-core/glibc/cross-localedef-native_2.24.bb
deleted file mode 100644
index d4cccedb43..0000000000
--- a/meta/recipes-core/glibc/cross-localedef-native_2.24.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Cross locale generation tool for glibc"
-HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-# Tell autotools that we're working in the localedef directory
-#
-AUTOTOOLS_SCRIPT_PATH = "${S}/localedef"
-
-inherit native
-inherit autotools
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
-
-SRCBRANCH ?= "release/${PV}/master"
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-SRCREV_glibc ?= "ea23815a795f72035262953dad5beb03e09c17dd"
-SRCREV_localedef ?= "29869b6dc11427c5bab839bdb155c85a7c644c71"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
- git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
- file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
- file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
- file://0018-eglibc-Cross-building-and-testing-instructions.patch \
- file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
- file://0020-eglibc-cherry-picked-from.patch \
- file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
- file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
- file://0023-eglibc-Install-PIC-archives.patch \
- file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \
- file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
-"
-# Makes for a rather long rev (22 characters), but...
-#
-SRCREV_FORMAT = "glibc_localedef"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = "--with-glibc=${S}"
-CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
-}
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.30.bb b/meta/recipes-core/glibc/cross-localedef-native_2.30.bb
new file mode 100644
index 0000000000..29cd43e89a
--- /dev/null
+++ b/meta/recipes-core/glibc/cross-localedef-native_2.30.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Cross locale generation tool for glibc"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=cfc0ed77a9f62fa62eded042ebe31d72 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+require glibc-version.inc
+
+# Tell autotools that we're working in the localedef directory
+#
+AUTOTOOLS_SCRIPT_PATH = "${S}/localedef"
+
+inherit native
+inherit autotools
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+ git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
+ file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0020-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+ file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
+ file://add-cross-localedef-hardlink.patch \
+ file://allow-compile-separate-from-util-linux-hardlink.patch \
+"
+# Makes for a rather long rev (22 characters), but...
+#
+SRCREV_FORMAT = "glibc_localedef"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-glibc=${S}"
+CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
+ install -m 0755 ${B}/cross-localedef-hardlink ${D}${bindir}/cross-localedef-hardlink
+}
diff --git a/meta/recipes-core/glibc/glibc-collateral.inc b/meta/recipes-core/glibc/glibc-collateral.inc
index 60655eba3c..52880791a7 100644
--- a/meta/recipes-core/glibc/glibc-collateral.inc
+++ b/meta/recipes-core/glibc/glibc-collateral.inc
@@ -1,22 +1,12 @@
-INHIBIT_DEFAULT_DEPS = "1"
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
- file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780"
-HOMEPAGE = "http://www.gnu.org/software/libc/index.html"
+require glibc-common.inc
-# This needs to match with glibc.inc, otherwise glibc-scripts and glibc-locale
-# will fail to find main glibc, for details see
-# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
-ARM_INSTRUCTION_SET = "arm"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
+ file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780"
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
do_configure[noexec] = "1"
do_compile[noexec] = "1"
-do_install[depends] += "virtual/${MLPREFIX}libc:do_populate_sysroot"
-
-COMPATIBLE_HOST_libc-musl_class-target = "null"
-COMPATIBLE_HOST_libc-uclibc_class-target = "null"
-
+do_install[depends] += "virtual/${MLPREFIX}libc:do_stash_locale"
diff --git a/meta/recipes-core/glibc/glibc-common.inc b/meta/recipes-core/glibc/glibc-common.inc
index bba1568baf..fa46fd89f1 100644
--- a/meta/recipes-core/glibc/glibc-common.inc
+++ b/meta/recipes-core/glibc/glibc-common.inc
@@ -3,7 +3,23 @@ DESCRIPTION = "The GNU C Library is used as the system C library in most systems
HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
SECTION = "libs"
LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
- file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
+
+LIC_FILES_CHKSUM ?= "file://LICENSES;md5=cfc0ed77a9f62fa62eded042ebe31d72 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+CVE_PRODUCT = "glibc"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+#
+# We will skip parsing glibc when target system C library selection is not glibc
+# this helps in easing out parsing for non-glibc system libraries
+#
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+
+PV = "2.30"
diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
deleted file mode 100644
index 2e3bc8104a..0000000000
--- a/meta/recipes-core/glibc/glibc-initial.inc
+++ /dev/null
@@ -1,78 +0,0 @@
-DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial libgcc-initial"
-PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
-
-PACKAGES = ""
-PACKAGES_DYNAMIC = ""
-
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
-
-do_configure () {
- (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
- find ${S} -name "configure" | xargs touch
- cfgscript=`python3 -c "import os; print(os.path.relpath('${S}', '.'))"`/configure
- $cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
- --prefix=/usr \
- --without-cvs --disable-sanity-checks \
- --with-headers=${STAGING_DIR_TARGET}${includedir} \
- --enable-hacker-mode --enable-addons
-}
-
-do_compile () {
- :
-}
-
-do_install () {
- oe_runmake cross-compiling=yes install_root=${D} \
- includedir='${includedir}' prefix='${prefix}' \
- install-bootstrap-headers=yes install-headers
-
- oe_runmake csu/subdir_lib
- mkdir -p ${D}${libdir}/
- install -m 644 csu/crt[1in].o ${D}${libdir}
-
- # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
- # so do them by hand. We can tolerate an empty stubs.h for the moment.
- # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
- mkdir -p ${D}${includedir}/gnu/
- touch ${D}${includedir}/gnu/stubs.h
- cp ${S}/include/features.h ${D}${includedir}/features.h
-
- if [ -e ${B}/bits/stdio_lim.h ]; then
- cp ${B}/bits/stdio_lim.h ${D}${includedir}/bits/
- fi
- # add links to linux-libc-headers: final glibc build need this.
- for t in linux asm asm-generic; do
- ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
- done
-}
-
-do_install_locale() {
- :
-}
-
-do_siteconfig () {
- :
-}
-
-SSTATEPOSTINSTFUNCS += "glibcinitial_sstate_postinst"
-glibcinitial_sstate_postinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- # Recreate the symlinks to ensure they point to the correct location
- for t in linux asm asm-generic; do
- rm -f ${STAGING_DIR_TCBOOTSTRAP}${includedir}/$t
- ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${STAGING_DIR_TCBOOTSTRAP}${includedir}/
- done
- fi
-}
-
-do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
-
-# We don't install any scripts so there is nothing to evacuate
-do_evacuate_scripts () {
- :
-}
-
-inherit nopackages
diff --git a/meta/recipes-core/glibc/glibc-initial_2.24.bb b/meta/recipes-core/glibc/glibc-initial_2.24.bb
deleted file mode 100644
index e86770e12d..0000000000
--- a/meta/recipes-core/glibc/glibc-initial_2.24.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require glibc_${PV}.bb
-require glibc-initial.inc
-
-# main glibc recipes muck with TARGET_CPPFLAGS to point into
-# final target sysroot but we
-# are not there when building glibc-initial
-# so reset it here
-
-TARGET_CPPFLAGS = ""
diff --git a/meta/recipes-core/glibc/glibc-ld.inc b/meta/recipes-core/glibc/glibc-ld.inc
index c5f4db2297..041ffbb9cb 100644
--- a/meta/recipes-core/glibc/glibc-ld.inc
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -1,57 +1,20 @@
-def ld_append_if_tune_exists(d, infos, dict):
- tune = d.getVar("DEFAULTTUNE", True) or ""
- libdir = d.getVar("base_libdir", True) or ""
- if tune in dict:
- infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
- infos['lddrewrite'].add(libdir+'/'+dict[tune][0])
+inherit linuxloader
-def glibc_dl_info(d):
- ld_info_all = {
- "mips": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips64": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mipsel": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips64el-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mips64el-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"],
- "powerpc64-nf": ["ld64.so.1", "FLAG_ELF_LIBC6"],
- "core2-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
- "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
- "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
- "x86-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
- "i586": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
- "corei7-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
- "corei7-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
- }
+GLIBC_GETLOADER = "${@get_linuxloader(d)}"
+def glibc_dl_info(d):
infos = {'ldconfig':set(), 'lddrewrite':set()}
- ld_append_if_tune_exists(d, infos, ld_info_all)
- #DEFAULTTUNE_MULTILIB_ORIGINAL
- original_tune=d.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL",True)
- if original_tune:
- localdata = bb.data.createCopy(d)
- localdata.setVar("DEFAULTTUNE", original_tune)
- ld_append_if_tune_exists(localdata, infos, ld_info_all)
+ loaders = all_multilib_tune_values(d, "GLIBC_GETLOADER").split()
+ for loader in loaders:
+ infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }')
+ infos['lddrewrite'].add(loader)
- variants = d.getVar("MULTILIB_VARIANTS", True) or ""
- for item in variants.split():
- localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- bb.data.update_data(localdata)
- ld_append_if_tune_exists(localdata, infos, ld_info_all)
- infos['ldconfig'] = ','.join(infos['ldconfig'])
- infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
+ infos['ldconfig'] = ','.join(sorted(infos['ldconfig']))
+ infos['lddrewrite'] = ' '.join(sorted(infos['lddrewrite']))
return infos
EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}"
RTLDLIST = "${@glibc_dl_info(d)['lddrewrite']}"
+RTLDLIST_class-nativesdk = "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
glibc_dl_info[vardepsexclude] = "OVERRIDES"
diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc
index 0a7adfcc83..ef06389ff9 100644
--- a/meta/recipes-core/glibc/glibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -1,4 +1,4 @@
-include glibc-collateral.inc
+require glibc-collateral.inc
SUMMARY = "Locale data from glibc"
@@ -12,18 +12,20 @@ BINUTILSDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot"
BINUTILSDEP_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot"
do_package[depends] += "${BINUTILSDEP}"
+DEPENDS += "virtual/libc"
+
# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
# is set. The idea is to avoid running localedef on the target (at first boot)
# to decrease initial boot time and avoid localedef being killed by the OOM
# killer which used to effectively break i18n on machines with < 128MB RAM.
-# default to disabled
+# default to disabled
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "1"
#enable locale generation on these arches
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
-BINARY_LOCALE_ARCHES ?= "arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64"
+BINARY_LOCALE_ARCHES ?= "arc arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64 riscv32 riscv64"
# set "1" to use cross-localedef for locale generation
# set "0" for qemu emulation of native localedef for locale generation
@@ -35,28 +37,27 @@ PACKAGES = "localedef ${PN}-dbg"
PACKAGES_DYNAMIC = "^locale-base-.* \
^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
- ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
^${MLPREFIX}glibc-gconv$"
# Create a glibc-binaries package
ALLOW_EMPTY_${BPN}-binaries = "1"
PACKAGES += "${BPN}-binaries"
-RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-binary") != -1])}"
+RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-binary") != -1])}"
# Create a glibc-charmaps package
ALLOW_EMPTY_${BPN}-charmaps = "1"
PACKAGES += "${BPN}-charmaps"
-RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-charmap") != -1])}"
+RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-charmap") != -1])}"
# Create a glibc-gconvs package
ALLOW_EMPTY_${BPN}-gconvs = "1"
PACKAGES += "${BPN}-gconvs"
-RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-gconv") != -1])}"
+RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-gconv") != -1])}"
# Create a glibc-localedatas package
ALLOW_EMPTY_${BPN}-localedatas = "1"
PACKAGES += "${BPN}-localedatas"
-RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-localedata") != -1])}"
+RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-localedata") != -1])}"
DESCRIPTION_localedef = "glibc: compile locale definition files"
@@ -66,30 +67,37 @@ DESCRIPTION_localedef = "glibc: compile locale definition files"
FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
FILES_localedef = "${bindir}/localedef"
-LOCALETREESRC = "${STAGING_INCDIR}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}"
+LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
-do_install () {
- mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
- if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then
- cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
- fi
- if [ -n "$(ls ${LOCALETREESRC}/${localedir})" ]; then
- mkdir -p ${D}${localedir}
- cp -fpPR ${LOCALETREESRC}/${localedir}/* ${D}${localedir}
- fi
- if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
- cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
- fi
- if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then
- cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
- fi
- if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then
- cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}
+copy_locale_files() {
+ local dir=$1 mode=$2
+
+ [ -e "${LOCALETREESRC}$dir" ] || return 0
+
+ for d in . $(find "${LOCALETREESRC}$dir" -type d -printf '%P '); do
+ install -d ${D}$dir/$d
+ find "${LOCALETREESRC}$dir/$d" -maxdepth 1 -type f \
+ -exec install -m $mode -t "${D}$dir/$d" {} \;
+ done
+}
+
+do_install() {
+ copy_locale_files ${bindir} 0755
+ copy_locale_files ${localedir} 0644
+ if [ ${PACKAGE_NO_GCONV} -eq 0 ]; then
+ copy_locale_files ${libdir}/gconv 0755
+ copy_locale_files ${datadir}/i18n 0644
+ else
+ # Remove the libdir if it is empty when gconv is not copied
+ find ${D}${libdir} -type d -empty -delete
fi
- chown root:root -R ${D}
- cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR}
+ copy_locale_files ${datadir}/locale 0644
+ install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED
}
inherit libc-package
BBCLASSEXTEND = "nativesdk"
+
+# Don't scan for CVEs as glibc will be scanned
+CVE_PRODUCT = ""
diff --git a/meta/recipes-core/glibc/glibc-locale_2.24.bb b/meta/recipes-core/glibc/glibc-locale_2.30.bb
index f7702e0358..f7702e0358 100644
--- a/meta/recipes-core/glibc/glibc-locale_2.24.bb
+++ b/meta/recipes-core/glibc/glibc-locale_2.30.bb
diff --git a/meta/recipes-core/glibc/glibc-mtrace.inc b/meta/recipes-core/glibc/glibc-mtrace.inc
index e12b079e06..ef9d60ec23 100644
--- a/meta/recipes-core/glibc/glibc-mtrace.inc
+++ b/meta/recipes-core/glibc/glibc-mtrace.inc
@@ -1,13 +1,16 @@
-include glibc-collateral.inc
+require glibc-collateral.inc
SUMMARY = "mtrace utility provided by glibc"
DESCRIPTION = "mtrace utility provided by glibc"
RDEPENDS_${PN} = "perl"
RPROVIDES_${PN} = "libc-mtrace"
-SRC = "${STAGING_INCDIR}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
+SRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale/scripts"
do_install() {
install -d -m 0755 ${D}${bindir}
install -m 0755 ${SRC}/mtrace ${D}${bindir}/
}
+
+# Don't scan for CVEs as glibc will be scanned
+CVE_PRODUCT = ""
diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.24.bb b/meta/recipes-core/glibc/glibc-mtrace_2.30.bb
index 0b69bad46a..0b69bad46a 100644
--- a/meta/recipes-core/glibc/glibc-mtrace_2.24.bb
+++ b/meta/recipes-core/glibc/glibc-mtrace_2.30.bb
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index bad642449a..ede9e9b909 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -1,25 +1,6 @@
-#
-# For now, we will skip building of a gcc package if it is a uclibc one
-# and our build is not a uclibc one, and we skip a glibc one if our build
-# is a uclibc build.
-#
-# See the note in gcc/gcc_3.4.0.oe
-#
-
-python __anonymous () {
- import bb, re
- uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None)
- if uc_os:
- raise bb.parse.SkipPackage("incompatible with target %s" %
- d.getVar('TARGET_OS', True))
-}
-
-# Set this to zero if you don't want ldconfig in the output package
-USE_LDCONFIG ?= "1"
-
INHIBIT_SYSROOT_STRIP = "1"
-PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
+PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
# The ld.so in this glibc supports the GNU_HASH
RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)"
@@ -33,21 +14,31 @@ RPROVIDES_glibc-extra-nss = "eglibc-extra-nss"
RPROVIDES_glibc-thread-db = "eglibc-thread-db"
RPROVIDES_${PN}-pcprofile = "eglibc-pcprofile"
RPROVIDES_${PN}-dbg = "eglibc-dbg"
-libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/libmvec-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
-libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1"
+libc_baselibs = "${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/libmvec-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
+ARCH_DYNAMIC_LOADER = ""
+# The aarch64 ABI says the dynamic linker -must- be
+# /lib/ld-linux-aarch64{,_be}.so.1. With usrmerge, that may mean that
+# we need to install it in /usr/lib.
+ARCH_DYNAMIC_LOADER_aarch64 = "ld-linux-${TARGET_ARCH}.so.1"
+libc_baselibs_append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', '', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}"
INSANE_SKIP_${PN}_append_aarch64 = " libdir"
-FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
+FILES_${PN} = "${libc_baselibs} ${libexecdir}/*"
+RRECOMMENDS_${PN} = "${@bb.utils.filter('DISTRO_FEATURES', 'ldconfig', d)}"
+FILES_ldconfig = "${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf"
FILES_ldd = "${bindir}/ldd"
FILES_libsegfault = "${base_libdir}/libSegFault*"
FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
FILES_libmemusage = "${base_libdir}/libmemusage.so"
+FILES_libnss-db = "${base_libdir}/libnss_db.so.* ${base_libdir}/libnss_db-*.so ${localstatedir}/db/Makefile ${localstatedir}/db/makedbs.sh"
+RDEPENDS_libnss-db = "${PN}-utils"
FILES_glibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*"
FILES_sln = "${base_sbindir}/sln"
FILES_${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o"
FILES_libsotruss = "${libdir}/audit/sotruss-lib.so"
FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
-FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
+FILES_${PN}-dev += "${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
+RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \
${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd"
@@ -70,7 +61,7 @@ DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services."
SUMMARY_ldd = "print shared library dependencies"
DESCRIPTION_ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line."
SUMMARY_${PN}-utils = "Miscellaneous utilities provided by glibc"
-DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconv, locale, gencat, rpcgen, ..."
+DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconv, locale, gencat, ..."
DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
DESCRIPTION_tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
@@ -78,102 +69,116 @@ inherit libc-common multilib_header
do_install_append () {
rm -f ${D}${sysconfdir}/localtime
- rm -rf ${D}${localstatedir}
# remove empty glibc dir
if [ -d ${D}${libexecdir} ]; then
rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
fi
- oe_multilib_header bits/syscall.h
+ oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h
if [ -f ${D}${bindir}/mtrace ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace
fi
- rm -rf ${D}${includedir}/rpcsvc/rquota*
# Info dir listing isn't interesting at this point so remove it if it exists.
if [ -e "${D}${infodir}/dir" ]; then
rm -f ${D}${infodir}/dir
fi
- if [ "${USE_LDCONFIG}" != "1" ]; then
- # We won't ship these files (see FILES above) so let's not install them
- rm -f ${D}${sysconfdir}/ld.so.conf
- rm -f ${D}${base_sbindir}/ldconfig
- # This directory will be empty now so remove it too.
- # But check whether it exists first, since it won't for glibc-initial.
- if [ -d ${D}${sysconfdir} ]; then
- rmdir ${D}${sysconfdir}
- fi
- fi
-
- if echo ${PN}|grep -q "glibc-initial"; then
- return
- fi
-
install -d ${D}${sysconfdir}/init.d
install -d ${D}${localstatedir}/db/nscd
install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf
+ install -m 0755 ${WORKDIR}/makedbs.sh ${D}${localstatedir}/db
sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd
+ sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/
+ # The dynamic loader will have been installed into
+ # ${base_libdir}. However, if that isn't going to end up being
+ # available in the ABI-mandated location, then a symlink must
+ # be created.
+
+ if [ -n "${ARCH_DYNAMIC_LOADER}" -a ! -e "${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then
+ install -d ${D}${root_prefix}/lib
+ ln -s ${@oe.path.relative('${root_prefix}/lib', '${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \
+ ${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}
+ fi
+}
+
+do_install_append_class-target() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d /run/nscd 755 root root -" \
> ${D}${sysconfdir}/tmpfiles.d/nscd.conf
- else
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/default/volatiles
echo "d root root 0755 /var/run/nscd none" \
> ${D}${sysconfdir}/default/volatiles/98_nscd
fi
-}
+}
do_install_append_aarch64 () {
- if [ "${base_libdir}" != "/lib" ] ; then
- # The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1
- install -d ${D}/lib
- if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then
- ln -s ${@base_path_relative('/lib', '${base_libdir}')}/ld-linux-aarch64.so.1 \
- ${D}/lib/ld-linux-aarch64.so.1
- elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then
- ln -s ${@base_path_relative('/lib', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
- ${D}/lib/ld-linux-aarch64_be.so.1
- fi
- fi
+ do_install_armmultilib
}
-do_install_locale () {
- dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
- install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
- if [ "${base_libdir}" != "${libdir}" ]; then
- cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
- fi
+do_install_append_arm () {
+ do_install_armmultilib
+}
+
+do_install_append_armeb () {
+ do_install_armmultilib
+}
+
+do_install_armmultilib () {
+ oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
+ oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h bits/pthreadtypes.h bits/pthreadtypes-arch.h bits/sem.h bits/semaphore.h bits/setjmp.h
+ oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h bits/typesizes.h
+ oe_multilib_header bits/procfs-id.h bits/procfs.h bits/shmlba.h
+
+ oe_multilib_header fpu_control.h gnu/lib-names.h gnu/stubs.h ieee754.h
+
+ oe_multilib_header sys/elf.h sys/procfs.h sys/ptrace.h sys/ucontext.h sys/user.h
+}
+
+
+LOCALESTASH = "${WORKDIR}/stashed-locale"
+bashscripts = "mtrace sotruss xtrace"
+
+do_stash_locale () {
+ dest=${LOCALESTASH}
+ install -d $dest${base_libdir} $dest${bindir} $dest${libdir} $dest${datadir}
+ # Hide away the locale data from the deployment
if [ -e ${D}${bindir}/localedef ]; then
- mv -f ${D}${bindir}/localedef ${dest}${bindir}
+ cp -a ${D}${bindir}/localedef $dest${bindir}
fi
if [ -e ${D}${libdir}/gconv ]; then
- mv -f ${D}${libdir}/gconv ${dest}${libdir}
- fi
- if [ -e ${D}${exec_prefix}/lib ]; then
- cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix}
+ cp -a ${D}${libdir}/gconv $dest${libdir}
fi
if [ -e ${D}${datadir}/i18n ]; then
- mv ${D}${datadir}/i18n ${dest}${datadir}
+ cp -a ${D}${datadir}/i18n $dest${datadir}
fi
- cp -fpPR ${D}${datadir}/* ${dest}${datadir}
- rm -rf ${D}${datadir}/locale/
- cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
-}
-addtask do_install_locale after do_install before do_populate_sysroot do_package
+ # Make a copy of all the libraries into the locale stash
+ cp -fpPR ${D}${libdir}/* $dest${libdir}
+ if [ "${base_libdir}" != "${libdir}" ]; then
+ cp -fpPR ${D}${base_libdir}/* $dest${base_libdir}
+ fi
+ if [ -e ${D}${exec_prefix}/lib ]; then
+ if [ ${exec_prefix}/lib != ${base_libdir} ] && [ ${exec_prefix}/lib != ${libdir} ]; then
+ cp -fpPR ${D}${exec_prefix}/lib $dest${exec_prefix}
+ fi
+ fi
-bashscripts = "mtrace sotruss xtrace"
+ cp -fpPR ${D}${datadir}/* $dest${datadir}
+ rm -rf ${D}${datadir}/locale/
+ cp -fpPR ${WORKDIR}/SUPPORTED $dest
-do_evacuate_scripts () {
- target=${D}${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+ target=$dest/scripts
mkdir -p $target
for i in ${bashscripts}; do
if [ -f ${D}${bindir}/$i ]; then
@@ -182,23 +187,52 @@ do_evacuate_scripts () {
done
}
-addtask evacuate_scripts after do_install before do_populate_sysroot do_package
+addtask do_stash_locale after do_install before do_populate_sysroot do_package
+do_stash_locale[dirs] = "${B}"
+do_stash_locale[cleandirs] = "${LOCALESTASH}"
+SSTATETASKS += "do_stash_locale"
+do_stash_locale[sstate-inputdirs] = "${LOCALESTASH}"
+do_stash_locale[sstate-outputdirs] = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
+do_stash_locale[sstate-fixmedir] = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
-PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess"
+python do_stash_locale_setscene () {
+ sstate_setscene(d)
+}
+addtask do_stash_locale_setscene
-glibc_package_preprocess () {
- rm -rf ${PKGD}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
- rm -rf ${PKGD}/${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+PACKAGE_PREPROCESS_FUNCS += "stash_locale_package_cleanup"
+SYSROOT_PREPROCESS_FUNCS += "stash_locale_sysroot_cleanup"
+stash_locale_cleanup () {
+ cleanupdir=$1
+ # Remove all files which do_stash_locale() copies
for i in ${bashscripts}; do
- rm -f ${PKGD}${bindir}/$i
+ rm -f $cleanupdir${bindir}/$i
done
- rm -rf ${PKGD}/${localedir}
- if [ "${libdir}" != "${exec_prefix}/lib" ]; then
- # This dir only exists to hold locales
- rm -rf ${PKGD}${exec_prefix}/lib
+ rm -f $cleanupdir${bindir}/localedef
+ rm -rf $cleanupdir${datadir}/i18n
+ rm -rf $cleanupdir${libdir}/gconv
+ rm -rf $cleanupdir${localedir}
+ rm -rf $cleanupdir${datadir}/locale
+ if [ "${libdir}" != "${exec_prefix}/lib" ] && [ "${root_prefix}/lib" != "${exec_prefix}/lib" ]; then
+ if [ -d "$cleanupdir${exec_prefix}/lib" ]; then
+ if [ -z "${ARCH_DYNAMIC_LOADER}" -o \
+ ! -e "$cleanupdir${exec_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then
+ # error out if directory isn't empty
+ # this dir should only contain locale dir
+ # which has been deleted in the previous step
+ rmdir $cleanupdir${exec_prefix}/lib
+ fi
+ fi
fi
}
+stash_locale_sysroot_cleanup() {
+ stash_locale_cleanup ${SYSROOT_DESTDIR}
+}
+stash_locale_package_cleanup() {
+ stash_locale_cleanup ${PKGD}
+}
+
pkg_postinst_nscd () {
if [ -z "$D" ]; then
if command -v systemd-tmpfiles >/dev/null; then
diff --git a/meta/recipes-core/glibc/glibc-scripts.inc b/meta/recipes-core/glibc/glibc-scripts.inc
index bce0a42106..14a14e4512 100644
--- a/meta/recipes-core/glibc/glibc-scripts.inc
+++ b/meta/recipes-core/glibc/glibc-scripts.inc
@@ -1,10 +1,10 @@
-include glibc-collateral.inc
+require glibc-collateral.inc
SUMMARY = "utility scripts provided by glibc"
DESCRIPTION = "utility scripts provided by glibc"
RDEPENDS_${PN} = "bash glibc-mtrace"
-SRC = "${STAGING_INCDIR}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
+SRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale/scripts"
bashscripts = "sotruss xtrace"
@@ -18,3 +18,6 @@ do_install() {
# sotruss script requires sotruss-lib.so (given by libsotruss package),
# to produce trace of the library calls.
RDEPENDS_${PN} += "libsotruss"
+
+# Don't scan for CVEs as glibc will be scanned
+CVE_PRODUCT = ""
diff --git a/meta/recipes-core/glibc/glibc-scripts_2.24.bb b/meta/recipes-core/glibc/glibc-scripts_2.30.bb
index 5a89bd8022..5a89bd8022 100644
--- a/meta/recipes-core/glibc/glibc-scripts_2.24.bb
+++ b/meta/recipes-core/glibc/glibc-scripts_2.30.bb
diff --git a/meta/recipes-core/glibc/glibc-testing.inc b/meta/recipes-core/glibc/glibc-testing.inc
deleted file mode 100644
index 0a42ae7f7c..0000000000
--- a/meta/recipes-core/glibc/glibc-testing.inc
+++ /dev/null
@@ -1,95 +0,0 @@
-do_compile_append () {
- # now generate script to drive testing
- echo "#!/usr/bin/env sh" >${B}/${HOST_PREFIX}testglibc
- set >> ${B}/${HOST_PREFIX}testglibc
- # prune out the unneeded vars
- sed -i -e "/^BASH/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^USER/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^OPT/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^DIRSTACK/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^EUID/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^FUNCNAME/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^GROUPS/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^HOST/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^HOME/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^IFS/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^LC_ALL/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^LOGNAME/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^MACHTYPE/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^OSTYPE/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^PIPE/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^SHELL/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^PS4/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^Q/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^SHLVL/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testglibc
- sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testglibc
-
- # point to real sysroot not the toolchain bootstrap sysroot
- sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testglibc
-
- # use the final cross-gcc to test since some tests need libstdc++
- sed -i -e "s/^PATH=.*\.gcc-cross-initial\:/PATH=/g" ${B}/${HOST_PREFIX}testglibc
-
- # append execution part script
-cat >> ${B}/${HOST_PREFIX}testglibc << STOP
-target="\$1"
-if [ "x\$target" = "x" ]
-then
- echo "Please specify the target machine and remote user in form of user@target"
- exit 1;
-fi
-ssh \$target ls \$PWD\ 2>&1 > /dev/null
-if [ "x\$?" != "x0" ]
-then
- echo "Failed connecting to \$target it could be because of:"
- echo "1. You dont have passwordless ssh setup to access \$target"
- echo "2. NFS share on \$target is not mounted or if mounted then not matching the build tree layout."
- echo " The tree should be accessible at same location on build host and target"
- echo " You can add nfs-client to IMAGE_FEATURES to get the nfs client on target"
- echo "3. nfs server on build host is not running."
- echo " Please make sure that you have 'no_root_squash' added in /etc/exports if you want"
- echo " to test as root user on target (usually its recommended to create a non"
- echo " root user."
- echo " As a sanity check make sure that target can read/write to the glibc build tree"
- echo " Please refer to ${S}/EGLIBC.cross-testing for further instructions on setup"
- exit 1
-fi
- echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms
- echo "# definitions that come from ${B}/config.make" >> ${B}/configparms
- fgrep tcbootstrap ${B}/config.make > ${B}/configparms
- sed -i -e "s/\-tcbootstrap//g" ${B}/configparms
-
-# g++ uses flag -nostdinc, so the locations of system include headers must be explicitly specified
-# If the locations are not already specified in config.make, then we provide the following locations:
-# <sysroot>/usr/include/c++/<g++ version>
-# <sysroot>/usr/include/c++/<g++ version>/<machine>
-
-cxxincludes=\`cat ${B}/config.make | gawk '\$1 == "c++-sysincludes"' | gawk -F"=" '{print \$2}' | sed "s/[ \t]\?//g"\`
-
-if [ -z "\$cxxincludes" ]; then
- sysroot=\`cat ${B}/configparms | sed -n "/CXX/p" | sed -e "s/^.*--sysroot=//"\`
- cxx=\`cat ${B}/configparms | gawk '\$1 ~ /^CXX/' | gawk -F"=" '{print \$2}' | gawk '{print \$1}'\`
- cxxmachine=\`\$cxx -dumpmachine\`
- cxxversion=\`\$cxx -dumpversion\`
- # pass the new value of c++-sysincludes via configparms
- echo "# c++-sysincludes added:" >> ${B}/configparms
- echo "c++-sysincludes = -isystem \$sysroot/usr/include/c++/\$cxxversion -isystem \$sysroot/usr/include/c++/\$cxxversion/\$cxxmachine" >> ${B}/configparms
-fi
-
-wrapper="${S}/scripts/cross-test-ssh.sh \$target"
-localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4"
-make tests-clean
-make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
-rm -rf ${B}/configparms
-STOP
-
- chmod +x ${B}/${HOST_PREFIX}testglibc
-}
diff --git a/meta/recipes-core/glibc/glibc-testsuite_2.30.bb b/meta/recipes-core/glibc/glibc-testsuite_2.30.bb
new file mode 100644
index 0000000000..657fd4dbc1
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-testsuite_2.30.bb
@@ -0,0 +1,60 @@
+require glibc_${PV}.bb
+
+# handle PN differences
+FILESEXTRAPATHS_prepend := "${THISDIR}/glibc:"
+
+# strip provides
+PROVIDES = ""
+# setup depends
+INHIBIT_DEFAULT_DEPS = ""
+
+python () {
+ libc = d.getVar("PREFERRED_PROVIDER_virtual/libc")
+ libclocale = d.getVar("PREFERRED_PROVIDER_virtual/libc-locale")
+ if libc != "glibc" or libclocale != "glibc-locale":
+ raise bb.parse.SkipRecipe("glibc-testsuite requires that virtual/libc is glibc")
+}
+
+DEPENDS += "glibc-locale libgcc gcc-runtime"
+
+# remove the initial depends
+DEPENDS_remove = "libgcc-initial"
+
+inherit qemu
+
+SRC_URI += "file://check-test-wrapper"
+
+DEPENDS += "${@'qemu-native' if d.getVar('TOOLCHAIN_TEST_TARGET') == 'user' else ''}"
+
+TOOLCHAIN_TEST_TARGET ??= "user"
+TOOLCHAIN_TEST_HOST ??= "localhost"
+TOOLCHAIN_TEST_HOST_USER ??= "root"
+TOOLCHAIN_TEST_HOST_PORT ??= "2222"
+
+do_check[dirs] += "${B}"
+do_check[nostamp] = "1"
+do_check () {
+ chmod 0755 ${WORKDIR}/check-test-wrapper
+
+ # clean out previous test results
+ oe_runmake tests-clean
+ # makefiles don't clean entirely (and also sometimes fails due to too many args)
+ find ${B} -type f -name "*.out" -delete
+ find ${B} -type f -name "*.test-result" -delete
+ find ${B}/catgets -name "*.cat" -delete
+ find ${B}/conform -name "symlist-*" -delete
+ [ ! -e ${B}/timezone/testdata ] || rm -rf ${B}/timezone/testdata
+
+ oe_runmake -i \
+ QEMU_SYSROOT="${RECIPE_SYSROOT}" \
+ QEMU_OPTIONS="${@qemu_target_binary(d)} ${QEMU_OPTIONS}" \
+ SSH_HOST="${TOOLCHAIN_TEST_HOST}" \
+ SSH_HOST_USER="${TOOLCHAIN_TEST_HOST_USER}" \
+ SSH_HOST_PORT="${TOOLCHAIN_TEST_HOST_PORT}" \
+ test-wrapper="${WORKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \
+ check
+}
+addtask do_check after do_compile
+
+inherit nopackages
+deltask do_stash_locale
diff --git a/meta/recipes-core/glibc/glibc-version.inc b/meta/recipes-core/glibc/glibc-version.inc
new file mode 100644
index 0000000000..c18c583399
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-version.inc
@@ -0,0 +1,8 @@
+SRCBRANCH ?= "release/2.30/master"
+PV = "2.30"
+SRCREV_glibc ?= "be9a328c93834648e0bec106a1f86357d1a8c7e1"
+SRCREV_localedef ?= "cd9f958c4c94a638fa7b2b4e21627364f1a1a655"
+
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)"
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index e85c7044a0..58d2ba7bc4 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -1,45 +1,11 @@
require glibc-common.inc
require glibc-ld.inc
-require glibc-testing.inc
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
-TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
-
-python () {
- opt_effective = "-O"
- for opt in d.getVar('SELECTED_OPTIMIZATION', True).split():
- if opt in ("-O0", "-O", "-O1", "-O2", "-O3", "-Os"):
- opt_effective = opt
- if opt_effective == "-O0":
- bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN', True), opt_effective))
- if opt_effective in ("-O", "-O1", "-Os"):
- bb.note("%s doesn't build cleanly with %s, adding -Wno-error to SELECTED_OPTIMIZATION" % (d.getVar('PN', True), opt_effective))
- d.appendVar("SELECTED_OPTIMIZATION", " -Wno-error")
-}
-
-# siteconfig.bbclass runs configure which needs a working compiler
-# For the compiler to work we need a working libc yet libc isn't
-# in the sysroots directory at this point. This means the libc.so
-# linker script won't work as the --sysroot setting isn't correct.
-# Here we create a hacked up libc linker script and pass in the right
-# flags to let configure work. Ugly.
-EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'"
-siteconfig_do_siteconfig_gencache_prepend = " \
- mkdir -p ${WORKDIR}/site_config_libc; \
- cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
- sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
-"
-
-# nptl needs unwind support in gcc, which can't be built without glibc.
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
-# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
-#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
-PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/libc"
PROVIDES += "virtual/libintl virtual/libiconv"
-inherit autotools texinfo distro_features_check systemd
+inherit autotools texinfo features_check systemd
LEAD_SONAME = "libc.so"
@@ -49,17 +15,15 @@ CACHED_CONFIGUREVARS += " \
libc_cv_rootsbindir=${base_sbindir} \
libc_cv_localedir=${localedir} \
libc_cv_ssp_strong=no \
+ libc_cv_ssp_all=no \
libc_cv_ssp=no \
"
+# ifunc doesn't appear to work on mips, casuses libbfd assertion failures
+CACHED_CONFIGUREVARS_append_mipsarch = " libc_cv_ld_gnu_indirect_function=no"
+
GLIBC_EXTRA_OECONF ?= ""
GLIBC_EXTRA_OECONF_class-nativesdk = ""
-INHIBIT_DEFAULT_DEPS = "1"
-
-# This needs to match with glibc-collateral.inc, otherwise glibc-scripts and glibc-locale
-# will fail to find main glibc, for details see
-# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
-ARM_INSTRUCTION_SET = "arm"
# glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
@@ -77,4 +41,8 @@ do_configure_prepend() {
sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
}
-GLIBC_ADDONS ?= "nptl,libidn"
+# Enable backtrace from abort()
+do_configure_append_arm () {
+ echo "CFLAGS-abort.c = -fasynchronous-unwind-tables" >> ${B}/configparms
+ echo "CFLAGS-raise.c = -fasynchronous-unwind-tables" >> ${B}/configparms
+}
diff --git a/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch b/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch
deleted file mode 100644
index d5fce7371b..0000000000
--- a/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 2c0ab83eb54c0e0fccbf261726dc03803b236079 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr>
-Date: Mon, 22 Aug 2016 16:09:25 +0200
-Subject: [PATCH] locale: fix hard-coded reference to gcc -E
-
-When new version of compilers are published, they may not be compatible with
-older versions of software. This is particularly common when software is built
-with -Werror.
-
-Autotools provides a way for a user to specify the name of his compiler using a
-set of variables ($CC $CXX $CPP etc.). Those variables are used correctly when
-compiling glibc but the script used to generate transliterations in the locale/
-subdirectory directly calls the gcc binary to get the output of the
-preprocessor instead of using the $CPP variable provided by the build
-environment.
-
-This patch replaces the hard-coded reference to the gcc binary with the proper
-environment variable, thus allowing a user to override it.
-
-Upstream-Status : Submitted [https://sourceware.org/ml/libc-alpha/2016-08/msg00746.html]
-
----
- locale/gen-translit.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl
-index 30d3f2f..7b287fa 100644
---- a/locale/gen-translit.pl
-+++ b/locale/gen-translit.pl
-@@ -1,5 +1,5 @@
- #!/usr/bin/perl -w
--open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file";
-+open F, 'cat C-translit.h.in | ${CPP:-gcc -E} - |' || die "Cannot preprocess input file";
-
-
- sub cstrlen {
---
-2.9.3
-
diff --git a/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index ca3375805d..d86d1d8dc7 100644
--- a/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
+++ b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,7 +1,7 @@
-From 7e11aafc3a7cb873b3f648740c8acd379597e4d1 Mon Sep 17 00:00:00 2001
+From f6984c923b41155979764bfa3f44609572be5414 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:48:24 +0000
-Subject: [PATCH 01/25] nativesdk-glibc: Look for host system ld.so.cache as
+Subject: [PATCH 01/28] nativesdk-glibc: Look for host system ld.so.cache as
well
Upstream-Status: Inappropriate [embedded specific]
@@ -31,10 +31,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index c0d6249..2c73105 100644
+index 5abeb867f1..981bd5b4af 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -2094,6 +2094,14 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2080,6 +2080,14 @@ _dl_map_object (struct link_map *loader, const char *name,
}
}
@@ -49,7 +49,7 @@ index c0d6249..2c73105 100644
#ifdef USE_LDCONFIG
if (fd == -1
&& (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2152,14 +2160,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2138,14 +2146,6 @@ _dl_map_object (struct link_map *loader, const char *name,
}
#endif
@@ -65,5 +65,5 @@ index c0d6249..2c73105 100644
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index 5428468c5a..63531082a4 100644
--- a/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
+++ b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,7 +1,7 @@
-From 5fd884dc28d5d84001fae8ffdd8be698bb84143e Mon Sep 17 00:00:00 2001
+From b91c323d809039bf9b8c445418579a8b5fe61aea Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:50:00 +0000
-Subject: [PATCH 02/25] nativesdk-glibc: Fix buffer overrun with a relocated
+Subject: [PATCH 02/28] nativesdk-glibc: Fix buffer overrun with a relocated
SDK
When ld-linux-*.so.2 is relocated to a path that is longer than the
@@ -22,10 +22,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 12 insertions(+)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 2c73105..c7b8797 100644
+index 981bd5b4af..c7a0fa58cb 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -1793,7 +1793,19 @@ open_path (const char *name, size_t namelen, int mode,
+@@ -1780,7 +1780,19 @@ open_path (const char *name, size_t namelen, int mode,
given on the command line when rtld is run directly. */
return -1;
@@ -46,5 +46,5 @@ index 2c73105..c7b8797 100644
{
struct r_search_path_elem *this_dir = *dirs;
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index 7cba6cc367..48f5a78716 100644
--- a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
+++ b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,7 +1,7 @@
-From c99892f2018cd7fa0f37b53e6cebec99fa036472 Mon Sep 17 00:00:00 2001
+From 3aceb84e2bc0f796204fe059beede91179b1bc6e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:51:38 +0000
-Subject: [PATCH 03/25] nativesdk-glibc: Raise the size of arrays containing dl
+Subject: [PATCH 03/28] nativesdk-glibc: Raise the size of arrays containing dl
paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -21,14 +21,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
elf/interp.c | 2 +-
elf/ldconfig.c | 3 +++
elf/rtld.c | 5 +++--
+ iconv/gconv_conf.c | 2 +-
sysdeps/generic/dl-cache.h | 4 ----
- 6 files changed, 13 insertions(+), 9 deletions(-)
+ 7 files changed, 14 insertions(+), 10 deletions(-)
-Index: git/elf/dl-cache.c
-===================================================================
---- git.orig/elf/dl-cache.c
-+++ git/elf/dl-cache.c
-@@ -132,6 +132,10 @@ do \
+diff --git a/elf/dl-cache.c b/elf/dl-cache.c
+index d8d1e2344e..d2247bfc4f 100644
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -133,6 +133,10 @@ do \
while (0)
@@ -37,14 +38,14 @@ Index: git/elf/dl-cache.c
+
+
int
- internal_function
_dl_cache_libcmp (const char *p1, const char *p2)
-Index: git/elf/dl-load.c
-===================================================================
---- git.orig/elf/dl-load.c
-+++ git/elf/dl-load.c
-@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_re
- /* Get the generated information about the trusted directories. */
+ {
+diff --git a/elf/dl-load.c b/elf/dl-load.c
+index c7a0fa58cb..4b87505d45 100644
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -110,8 +110,8 @@ static size_t max_capstrlen attribute_relro;
+ gen-trusted-dirs.awk. */
#include "trusted-dirs.h"
-static const char system_dirs[] = SYSTEM_DIRS;
@@ -54,10 +55,10 @@ Index: git/elf/dl-load.c
{
SYSTEM_DIRS_LEN
};
-Index: git/elf/interp.c
-===================================================================
---- git.orig/elf/interp.c
-+++ git/elf/interp.c
+diff --git a/elf/interp.c b/elf/interp.c
+index 243829f5f7..0e74241703 100644
+--- a/elf/interp.c
++++ b/elf/interp.c
@@ -18,5 +18,5 @@
#include <runtime-linker.h>
@@ -65,10 +66,10 @@ Index: git/elf/interp.c
-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
-Index: git/elf/ldconfig.c
-===================================================================
---- git.orig/elf/ldconfig.c
-+++ git/elf/ldconfig.c
+diff --git a/elf/ldconfig.c b/elf/ldconfig.c
+index 3bc9e61891..6a23096435 100644
+--- a/elf/ldconfig.c
++++ b/elf/ldconfig.c
@@ -168,6 +168,9 @@ static struct argp argp =
options, parse_opt, NULL, doc, NULL, more_help, NULL
};
@@ -79,19 +80,19 @@ Index: git/elf/ldconfig.c
/* Check if string corresponds to an important hardware capability or
a platform. */
static int
-Index: git/elf/rtld.c
-===================================================================
---- git.orig/elf/rtld.c
-+++ git/elf/rtld.c
-@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
- strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
- #endif
-
+diff --git a/elf/rtld.c b/elf/rtld.c
+index c9490ff694..3962373ebb 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -173,6 +173,7 @@ dso_name_valid_for_suid (const char *p)
+ }
+ return *p != '\0';
+ }
+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
- /* List of auditing DSOs. */
- static struct audit_list
-@@ -873,12 +874,12 @@ of this helper program; chances are you
+ /* LD_AUDIT variable contents. Must be processed before the
+ audit_list below. */
+@@ -1220,13 +1221,13 @@ of this helper program; chances are you did not intend to run this program.\n\
--list list all dependencies and how they are resolved\n\
--verify verify that given object really is a dynamically linked\n\
object we can handle\n\
@@ -101,15 +102,29 @@ Index: git/elf/rtld.c
variable LD_LIBRARY_PATH\n\
--inhibit-rpath LIST ignore RUNPATH and RPATH information in object names\n\
in LIST\n\
-- --audit LIST use objects named in LIST as auditors\n");
-+ --audit LIST use objects named in LIST as auditors\n", LD_SO_CACHE);
+ --audit LIST use objects named in LIST as auditors\n\
+- --preload LIST preload objects named in LIST\n");
++ --preload LIST preload objects named in LIST\n", LD_SO_CACHE);
++_dl_skip_args;
--_dl_argc;
-Index: git/sysdeps/generic/dl-cache.h
-===================================================================
---- git.orig/sysdeps/generic/dl-cache.h
-+++ git/sysdeps/generic/dl-cache.h
+diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
+index ae8937cba0..f321ee419e 100644
+--- a/iconv/gconv_conf.c
++++ b/iconv/gconv_conf.c
+@@ -36,7 +36,7 @@
+
+
+ /* This is the default path where we look for module lists. */
+-static const char default_gconv_path[] = GCONV_PATH;
++static char default_gconv_path[4096] __attribute__ ((section (".gccrelocprefix"))) = GCONV_PATH;
+
+ /* Type to represent search path. */
+ struct path_elem
+diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
+index bc8b40331d..b0fdd2144b 100644
+--- a/sysdeps/generic/dl-cache.h
++++ b/sysdeps/generic/dl-cache.h
@@ -27,10 +27,6 @@
((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
#endif
@@ -121,51 +136,6 @@ Index: git/sysdeps/generic/dl-cache.h
#ifndef add_system_dir
# define add_system_dir(dir) add_dir (dir)
#endif
-Index: git/iconv/gconv_conf.c
-===================================================================
---- git.orig/iconv/gconv_conf.c
-+++ git/iconv/gconv_conf.c
-@@ -36,7 +36,7 @@
-
-
- /* This is the default path where we look for module lists. */
--static const char default_gconv_path[] = GCONV_PATH;
-+static char default_gconv_path[4096] __attribute__ ((section (".gccrelocprefix"))) = GCONV_PATH;
-
- /* The path elements, as determined by the __gconv_get_path function.
- All path elements end in a slash. */
-Index: git/locale/findlocale.c
-===================================================================
---- git.orig/locale/findlocale.c
-+++ git/locale/findlocale.c
-@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attr
- which are somehow addressed. */
- struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
-
--const char _nl_default_locale_path[] attribute_hidden = COMPLOCALEDIR;
-+char _nl_default_locale_path[4096] __attribute__ ((section (".gccrelocprefix"))) attribute_hidden = COMPLOCALEDIR;
-
- /* Checks if the name is actually present, that is, not NULL and not
- empty. */
-@@ -168,7 +168,7 @@ _nl_find_locale (const char *locale_path
-
- /* Nothing in the archive. Set the default path to search below. */
- locale_path = _nl_default_locale_path;
-- locale_path_len = sizeof _nl_default_locale_path;
-+ locale_path_len = strlen(_nl_default_locale_path) + 1;
- }
- else
- /* We really have to load some data. First see whether the name is
-Index: git/locale/localeinfo.h
-===================================================================
---- git.orig/locale/localeinfo.h
-+++ git/locale/localeinfo.h
-@@ -322,7 +322,7 @@ _nl_lookup_word (locale_t l, int categor
- }
-
- /* Default search path if no LOCPATH environment variable. */
--extern const char _nl_default_locale_path[] attribute_hidden;
-+extern char _nl_default_locale_path[] attribute_hidden;
-
- /* Load the locale data for CATEGORY from the file specified by *NAME.
- If *NAME is "", use environment variables as specified by POSIX, and
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
index 3127de68ec..a43f294345 100644
--- a/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
+++ b/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
@@ -1,34 +1,42 @@
-From a56e7aa2fd10b178b9498f88a7a2ca8aad671a53 Mon Sep 17 00:00:00 2001
+From e41e042149eac349e09fa629fcac4c64e574322c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:35:35 -0800
-Subject: [PATCH 04/25] nativesdk-glibc: Allow 64 bit atomics for x86
+Subject: [PATCH 04/28] nativesdk-glibc: Allow 64 bit atomics for x86
The fix consist of allowing 64bit atomic ops for x86.
This should be safe for i586 and newer CPUs.
It also makes the synchronization more efficient.
+Upstream-Status: Inappropriate [OE-Specific]
+
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Pending
-
- sysdeps/i386/atomic-machine.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ sysdeps/x86/atomic-machine.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
-diff --git a/sysdeps/i386/atomic-machine.h b/sysdeps/i386/atomic-machine.h
-index ce62b33..4fe44ea 100644
---- a/sysdeps/i386/atomic-machine.h
-+++ b/sysdeps/i386/atomic-machine.h
-@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
- # endif
+diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
+index aa60ca4cd6..3e42e00183 100644
+--- a/sysdeps/x86/atomic-machine.h
++++ b/sysdeps/x86/atomic-machine.h
+@@ -58,15 +58,14 @@ typedef uintmax_t uatomic_max_t;
#endif
--#define __HAVE_64B_ATOMICS 0
-+#define __HAVE_64B_ATOMICS 1
- #define USE_ATOMIC_COMPILER_BUILTINS 0
-
+ #define USE_ATOMIC_COMPILER_BUILTINS 1
++# define __HAVE_64B_ATOMICS 1
+ #ifdef __x86_64__
+-# define __HAVE_64B_ATOMICS 1
+ # define SP_REG "rsp"
+ # define SEG_REG "fs"
+ # define BR_CONSTRAINT "q"
+ # define IBR_CONSTRAINT "iq"
+ #else
+-# define __HAVE_64B_ATOMICS 0
+ # define SP_REG "esp"
+ # define SEG_REG "gs"
+ # define BR_CONSTRAINT "r"
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
deleted file mode 100644
index dc0dfad9a8..0000000000
--- a/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
+++ /dev/null
@@ -1,1584 +0,0 @@
-From 450473ce27b47cebec2c5c5b611a8c8bed41e6e8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:01:50 +0000
-Subject: [PATCH 05/25] fsl e500/e5500/e6500/603e fsqrt implementation
-
-Upstream-Status: Pending
-Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++
- .../sysv/linux/powerpc/powerpc32/603e/fpu/Implies | 1 +
- .../linux/powerpc/powerpc32/e300c3/fpu/Implies | 2 +
- .../linux/powerpc/powerpc32/e500mc/fpu/Implies | 1 +
- .../sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | 1 +
- .../sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | 1 +
- .../sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | 1 +
- .../sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | 1 +
- 19 files changed, 1418 insertions(+)
- create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
- create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
- create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
- create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
- create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
- create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
- create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
- create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
- create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
- create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
- create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
- create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
- create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
- create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
- create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
- create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
- create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
- create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
- create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
-
-diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-new file mode 100644
-index 0000000..71e516d
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-@@ -0,0 +1,134 @@
-+/* Double-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float two108 = 3.245185536584267269e+32;
-+static const float twom54 = 5.551115123125782702e-17;
-+static const float half = 0.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the actual square root and half of its reciprocal
-+ simultaneously. */
-+
-+#ifdef __STDC__
-+double
-+__ieee754_sqrt (double b)
-+#else
-+double
-+__ieee754_sqrt (b)
-+ double b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+ double y, g, h, d, r;
-+ ieee_double_shape_type u;
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ u.value = b;
-+
-+ relax_fenv_state ();
-+
-+ __asm__ ("frsqrte %[estimate], %[x]\n"
-+ : [estimate] "=f" (y) : [x] "f" (b));
-+
-+ /* Following Muller et al, page 168, equation 5.20.
-+
-+ h goes to 1/(2*sqrt(b))
-+ g goes to sqrt(b).
-+
-+ We need three iterations to get within 1ulp. */
-+
-+ /* Indicate that these can be performed prior to the branch. GCC
-+ insists on sinking them below the branch, however; it seems like
-+ they'd be better before the branch so that we can cover any latency
-+ from storing the argument and loading its high word. Oh well. */
-+
-+ g = b * y;
-+ h = 0.5 * y;
-+
-+ /* Handle small numbers by scaling. */
-+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-+ return __ieee754_sqrt (b * two108) * twom54;
-+
-+#define FMADD(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
-+
-+ /* Final refinement. */
-+ d = FNMSUB (g, g, b);
-+
-+ fesetenv_register (fe);
-+ return FMADD (d, h, g);
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_wash (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-new file mode 100644
-index 0000000..26fa067
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-@@ -0,0 +1,101 @@
-+/* Single-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float threehalf = 1.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the reciprocal square root and use that to compute the actual
-+ square root. */
-+
-+#ifdef __STDC__
-+float
-+__ieee754_sqrtf (float b)
-+#else
-+float
-+__ieee754_sqrtf (b)
-+ float b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+#define FMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ double y, x;
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ relax_fenv_state ();
-+
-+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
-+ y = FMSUB (threehalf, b, b);
-+
-+ /* Initial estimate. */
-+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
-+
-+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+
-+ /* All done. */
-+ fesetenv_register (fe);
-+ return x * b;
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_washf (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-new file mode 100644
-index 0000000..71e516d
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-@@ -0,0 +1,134 @@
-+/* Double-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float two108 = 3.245185536584267269e+32;
-+static const float twom54 = 5.551115123125782702e-17;
-+static const float half = 0.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the actual square root and half of its reciprocal
-+ simultaneously. */
-+
-+#ifdef __STDC__
-+double
-+__ieee754_sqrt (double b)
-+#else
-+double
-+__ieee754_sqrt (b)
-+ double b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+ double y, g, h, d, r;
-+ ieee_double_shape_type u;
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ u.value = b;
-+
-+ relax_fenv_state ();
-+
-+ __asm__ ("frsqrte %[estimate], %[x]\n"
-+ : [estimate] "=f" (y) : [x] "f" (b));
-+
-+ /* Following Muller et al, page 168, equation 5.20.
-+
-+ h goes to 1/(2*sqrt(b))
-+ g goes to sqrt(b).
-+
-+ We need three iterations to get within 1ulp. */
-+
-+ /* Indicate that these can be performed prior to the branch. GCC
-+ insists on sinking them below the branch, however; it seems like
-+ they'd be better before the branch so that we can cover any latency
-+ from storing the argument and loading its high word. Oh well. */
-+
-+ g = b * y;
-+ h = 0.5 * y;
-+
-+ /* Handle small numbers by scaling. */
-+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-+ return __ieee754_sqrt (b * two108) * twom54;
-+
-+#define FMADD(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
-+
-+ /* Final refinement. */
-+ d = FNMSUB (g, g, b);
-+
-+ fesetenv_register (fe);
-+ return FMADD (d, h, g);
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_wash (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-new file mode 100644
-index 0000000..26fa067
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-@@ -0,0 +1,101 @@
-+/* Single-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float threehalf = 1.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the reciprocal square root and use that to compute the actual
-+ square root. */
-+
-+#ifdef __STDC__
-+float
-+__ieee754_sqrtf (float b)
-+#else
-+float
-+__ieee754_sqrtf (b)
-+ float b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+#define FMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ double y, x;
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ relax_fenv_state ();
-+
-+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
-+ y = FMSUB (threehalf, b, b);
-+
-+ /* Initial estimate. */
-+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
-+
-+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+
-+ /* All done. */
-+ fesetenv_register (fe);
-+ return x * b;
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_washf (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-new file mode 100644
-index 0000000..71e516d
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-@@ -0,0 +1,134 @@
-+/* Double-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float two108 = 3.245185536584267269e+32;
-+static const float twom54 = 5.551115123125782702e-17;
-+static const float half = 0.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the actual square root and half of its reciprocal
-+ simultaneously. */
-+
-+#ifdef __STDC__
-+double
-+__ieee754_sqrt (double b)
-+#else
-+double
-+__ieee754_sqrt (b)
-+ double b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+ double y, g, h, d, r;
-+ ieee_double_shape_type u;
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ u.value = b;
-+
-+ relax_fenv_state ();
-+
-+ __asm__ ("frsqrte %[estimate], %[x]\n"
-+ : [estimate] "=f" (y) : [x] "f" (b));
-+
-+ /* Following Muller et al, page 168, equation 5.20.
-+
-+ h goes to 1/(2*sqrt(b))
-+ g goes to sqrt(b).
-+
-+ We need three iterations to get within 1ulp. */
-+
-+ /* Indicate that these can be performed prior to the branch. GCC
-+ insists on sinking them below the branch, however; it seems like
-+ they'd be better before the branch so that we can cover any latency
-+ from storing the argument and loading its high word. Oh well. */
-+
-+ g = b * y;
-+ h = 0.5 * y;
-+
-+ /* Handle small numbers by scaling. */
-+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-+ return __ieee754_sqrt (b * two108) * twom54;
-+
-+#define FMADD(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
-+
-+ /* Final refinement. */
-+ d = FNMSUB (g, g, b);
-+
-+ fesetenv_register (fe);
-+ return FMADD (d, h, g);
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_wash (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-new file mode 100644
-index 0000000..26fa067
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-@@ -0,0 +1,101 @@
-+/* Single-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float threehalf = 1.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the reciprocal square root and use that to compute the actual
-+ square root. */
-+
-+#ifdef __STDC__
-+float
-+__ieee754_sqrtf (float b)
-+#else
-+float
-+__ieee754_sqrtf (b)
-+ float b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+#define FMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ double y, x;
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ relax_fenv_state ();
-+
-+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
-+ y = FMSUB (threehalf, b, b);
-+
-+ /* Initial estimate. */
-+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
-+
-+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+
-+ /* All done. */
-+ fesetenv_register (fe);
-+ return x * b;
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_washf (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-new file mode 100644
-index 0000000..71e516d
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-@@ -0,0 +1,134 @@
-+/* Double-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float two108 = 3.245185536584267269e+32;
-+static const float twom54 = 5.551115123125782702e-17;
-+static const float half = 0.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the actual square root and half of its reciprocal
-+ simultaneously. */
-+
-+#ifdef __STDC__
-+double
-+__ieee754_sqrt (double b)
-+#else
-+double
-+__ieee754_sqrt (b)
-+ double b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+ double y, g, h, d, r;
-+ ieee_double_shape_type u;
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ u.value = b;
-+
-+ relax_fenv_state ();
-+
-+ __asm__ ("frsqrte %[estimate], %[x]\n"
-+ : [estimate] "=f" (y) : [x] "f" (b));
-+
-+ /* Following Muller et al, page 168, equation 5.20.
-+
-+ h goes to 1/(2*sqrt(b))
-+ g goes to sqrt(b).
-+
-+ We need three iterations to get within 1ulp. */
-+
-+ /* Indicate that these can be performed prior to the branch. GCC
-+ insists on sinking them below the branch, however; it seems like
-+ they'd be better before the branch so that we can cover any latency
-+ from storing the argument and loading its high word. Oh well. */
-+
-+ g = b * y;
-+ h = 0.5 * y;
-+
-+ /* Handle small numbers by scaling. */
-+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-+ return __ieee754_sqrt (b * two108) * twom54;
-+
-+#define FMADD(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
-+
-+ /* Final refinement. */
-+ d = FNMSUB (g, g, b);
-+
-+ fesetenv_register (fe);
-+ return FMADD (d, h, g);
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_wash (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-new file mode 100644
-index 0000000..26fa067
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-@@ -0,0 +1,101 @@
-+/* Single-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float threehalf = 1.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the reciprocal square root and use that to compute the actual
-+ square root. */
-+
-+#ifdef __STDC__
-+float
-+__ieee754_sqrtf (float b)
-+#else
-+float
-+__ieee754_sqrtf (b)
-+ float b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+#define FMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ double y, x;
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ relax_fenv_state ();
-+
-+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
-+ y = FMSUB (threehalf, b, b);
-+
-+ /* Initial estimate. */
-+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
-+
-+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+
-+ /* All done. */
-+ fesetenv_register (fe);
-+ return x * b;
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_washf (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-new file mode 100644
-index 0000000..71e516d
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-@@ -0,0 +1,134 @@
-+/* Double-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float two108 = 3.245185536584267269e+32;
-+static const float twom54 = 5.551115123125782702e-17;
-+static const float half = 0.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the actual square root and half of its reciprocal
-+ simultaneously. */
-+
-+#ifdef __STDC__
-+double
-+__ieee754_sqrt (double b)
-+#else
-+double
-+__ieee754_sqrt (b)
-+ double b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+ double y, g, h, d, r;
-+ ieee_double_shape_type u;
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ u.value = b;
-+
-+ relax_fenv_state ();
-+
-+ __asm__ ("frsqrte %[estimate], %[x]\n"
-+ : [estimate] "=f" (y) : [x] "f" (b));
-+
-+ /* Following Muller et al, page 168, equation 5.20.
-+
-+ h goes to 1/(2*sqrt(b))
-+ g goes to sqrt(b).
-+
-+ We need three iterations to get within 1ulp. */
-+
-+ /* Indicate that these can be performed prior to the branch. GCC
-+ insists on sinking them below the branch, however; it seems like
-+ they'd be better before the branch so that we can cover any latency
-+ from storing the argument and loading its high word. Oh well. */
-+
-+ g = b * y;
-+ h = 0.5 * y;
-+
-+ /* Handle small numbers by scaling. */
-+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-+ return __ieee754_sqrt (b * two108) * twom54;
-+
-+#define FMADD(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
-+
-+ /* Final refinement. */
-+ d = FNMSUB (g, g, b);
-+
-+ fesetenv_register (fe);
-+ return FMADD (d, h, g);
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_wash (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-new file mode 100644
-index 0000000..26fa067
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-@@ -0,0 +1,101 @@
-+/* Single-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float threehalf = 1.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the reciprocal square root and use that to compute the actual
-+ square root. */
-+
-+#ifdef __STDC__
-+float
-+__ieee754_sqrtf (float b)
-+#else
-+float
-+__ieee754_sqrtf (b)
-+ float b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+#define FMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ double y, x;
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ relax_fenv_state ();
-+
-+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
-+ y = FMSUB (threehalf, b, b);
-+
-+ /* Initial estimate. */
-+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
-+
-+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+
-+ /* All done. */
-+ fesetenv_register (fe);
-+ return x * b;
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_washf (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-new file mode 100644
-index 0000000..71e516d
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-@@ -0,0 +1,134 @@
-+/* Double-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float two108 = 3.245185536584267269e+32;
-+static const float twom54 = 5.551115123125782702e-17;
-+static const float half = 0.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the actual square root and half of its reciprocal
-+ simultaneously. */
-+
-+#ifdef __STDC__
-+double
-+__ieee754_sqrt (double b)
-+#else
-+double
-+__ieee754_sqrt (b)
-+ double b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+ double y, g, h, d, r;
-+ ieee_double_shape_type u;
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ u.value = b;
-+
-+ relax_fenv_state ();
-+
-+ __asm__ ("frsqrte %[estimate], %[x]\n"
-+ : [estimate] "=f" (y) : [x] "f" (b));
-+
-+ /* Following Muller et al, page 168, equation 5.20.
-+
-+ h goes to 1/(2*sqrt(b))
-+ g goes to sqrt(b).
-+
-+ We need three iterations to get within 1ulp. */
-+
-+ /* Indicate that these can be performed prior to the branch. GCC
-+ insists on sinking them below the branch, however; it seems like
-+ they'd be better before the branch so that we can cover any latency
-+ from storing the argument and loading its high word. Oh well. */
-+
-+ g = b * y;
-+ h = 0.5 * y;
-+
-+ /* Handle small numbers by scaling. */
-+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-+ return __ieee754_sqrt (b * two108) * twom54;
-+
-+#define FMADD(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ r = FNMSUB (g, h, half);
-+ g = FMADD (g, r, g);
-+ h = FMADD (h, r, h);
-+
-+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
-+
-+ /* Final refinement. */
-+ d = FNMSUB (g, g, b);
-+
-+ fesetenv_register (fe);
-+ return FMADD (d, h, g);
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_wash (b);
-+}
-diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-new file mode 100644
-index 0000000..26fa067
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-@@ -0,0 +1,101 @@
-+/* Single-precision floating point square root.
-+ Copyright (C) 2010 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <math.h>
-+#include <math_private.h>
-+#include <fenv_libc.h>
-+#include <inttypes.h>
-+
-+#include <sysdep.h>
-+#include <ldsodefs.h>
-+
-+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
-+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
-+static const float threehalf = 1.5;
-+
-+/* The method is based on the descriptions in:
-+
-+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
-+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
-+
-+ We find the reciprocal square root and use that to compute the actual
-+ square root. */
-+
-+#ifdef __STDC__
-+float
-+__ieee754_sqrtf (float b)
-+#else
-+float
-+__ieee754_sqrtf (b)
-+ float b;
-+#endif
-+{
-+ if (__builtin_expect (b > 0, 1))
-+ {
-+#define FMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+#define FNMSUB(a_, c_, b_) \
-+ ({ double __r; \
-+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
-+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
-+ __r;})
-+
-+ if (__builtin_expect (b != a_inf.value, 1))
-+ {
-+ double y, x;
-+ fenv_t fe;
-+
-+ fe = fegetenv_register ();
-+
-+ relax_fenv_state ();
-+
-+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
-+ y = FMSUB (threehalf, b, b);
-+
-+ /* Initial estimate. */
-+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
-+
-+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+ x = x * FNMSUB (y, x * x, threehalf);
-+
-+ /* All done. */
-+ fesetenv_register (fe);
-+ return x * b;
-+ }
-+ }
-+ else if (b < 0)
-+ {
-+ /* For some reason, some PowerPC32 processors don't implement
-+ FE_INVALID_SQRT. */
-+#ifdef FE_INVALID_SQRT
-+ feraiseexcept (FE_INVALID_SQRT);
-+
-+ fenv_union_t u = { .fenv = fegetenv_register () };
-+ if ((u.l & FE_INVALID) == 0)
-+#endif
-+ feraiseexcept (FE_INVALID);
-+ b = a_nan.value;
-+ }
-+ return f_washf (b);
-+}
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
-new file mode 100644
-index 0000000..b103b4d
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
-@@ -0,0 +1 @@
-+powerpc/powerpc32/603e/fpu
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
-new file mode 100644
-index 0000000..64db17f
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
-@@ -0,0 +1,2 @@
-+# e300c3 is a variant of 603e so use the same optimizations for sqrt
-+powerpc/powerpc32/603e/fpu
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
-new file mode 100644
-index 0000000..7eac5fc
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
-@@ -0,0 +1 @@
-+powerpc/powerpc32/e500mc/fpu
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
-new file mode 100644
-index 0000000..264b2a7
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
-@@ -0,0 +1 @@
-+powerpc/powerpc32/e5500/fpu
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
-new file mode 100644
-index 0000000..a259344
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
-@@ -0,0 +1 @@
-+powerpc/powerpc32/e6500/fpu
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
-new file mode 100644
-index 0000000..a7bc854
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
-@@ -0,0 +1 @@
-+powerpc/powerpc64/e5500/fpu
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
-new file mode 100644
-index 0000000..04ff8cc
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
-@@ -0,0 +1 @@
-+powerpc/powerpc64/e6500/fpu
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch b/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch
new file mode 100644
index 0000000000..3aad603ada
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch
@@ -0,0 +1,70 @@
+From 50ab0b0c116f4ae3d975ec1b15ed4595fd9147f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Aug 2018 09:55:12 -0700
+Subject: [PATCH 05/28] nativesdk-glibc: Make relocatable install for locales
+
+The glibc locale path is hard-coded to the install prefix, but in SDKs we need
+to be able to relocate the binaries. Expand the strings to 4K and put them in a
+magic segment that we can relocate at install time.
+
+Upstream-Status: Inappropriate (OE-specific)
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/findlocale.c | 4 ++--
+ locale/loadarchive.c | 2 +-
+ locale/localeinfo.h | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/locale/findlocale.c b/locale/findlocale.c
+index 9af605bd64..b2b0a3f93b 100644
+--- a/locale/findlocale.c
++++ b/locale/findlocale.c
+@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden =
+ which are somehow addressed. */
+ struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
+
+-const char _nl_default_locale_path[] attribute_hidden = COMPLOCALEDIR;
++char _nl_default_locale_path[4096] attribute_hidden __attribute__ ((section (".gccrelocprefix"))) = COMPLOCALEDIR;
+
+ /* Checks if the name is actually present, that is, not NULL and not
+ empty. */
+@@ -167,7 +167,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
+
+ /* Nothing in the archive. Set the default path to search below. */
+ locale_path = _nl_default_locale_path;
+- locale_path_len = sizeof _nl_default_locale_path;
++ locale_path_len = strlen(locale_path) + 1;
+ }
+ else
+ /* We really have to load some data. First see whether the name is
+diff --git a/locale/loadarchive.c b/locale/loadarchive.c
+index 803c1cf2a4..9023f475b8 100644
+--- a/locale/loadarchive.c
++++ b/locale/loadarchive.c
+@@ -42,7 +42,7 @@
+
+
+ /* Name of the locale archive file. */
+-static const char archfname[] = COMPLOCALEDIR "/locale-archive";
++static const char archfname[4096] __attribute__ ((section (".gccrelocprefix"))) = COMPLOCALEDIR "/locale-archive";
+
+ /* Size of initial mapping window, optimal if large enough to
+ cover the header plus the initial locale. */
+diff --git a/locale/localeinfo.h b/locale/localeinfo.h
+index 7c1cc3eecb..53cb8bfc59 100644
+--- a/locale/localeinfo.h
++++ b/locale/localeinfo.h
+@@ -325,7 +325,7 @@ _nl_lookup_word (locale_t l, int category, int item)
+ }
+
+ /* Default search path if no LOCPATH environment variable. */
+-extern const char _nl_default_locale_path[] attribute_hidden;
++extern char _nl_default_locale_path[4096] attribute_hidden;
+
+ /* Load the locale data for CATEGORY from the file specified by *NAME.
+ If *NAME is "", use environment variables as specified by POSIX, and
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
new file mode 100644
index 0000000000..5e1c591432
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
@@ -0,0 +1,1584 @@
+From 7cccf5cec09f2a42cc3fe5d82ce21b7309330b33 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:01:50 +0000
+Subject: [PATCH 06/28] fsl e500/e5500/e6500/603e fsqrt implementation
+
+Upstream-Status: Pending
+Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ .../powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 +++++++++++++
+ .../linux/powerpc/powerpc32/603e/fpu/Implies | 1 +
+ .../powerpc/powerpc32/e300c3/fpu/Implies | 2 +
+ .../powerpc/powerpc32/e500mc/fpu/Implies | 1 +
+ .../linux/powerpc/powerpc32/e5500/fpu/Implies | 1 +
+ .../linux/powerpc/powerpc32/e6500/fpu/Implies | 1 +
+ .../linux/powerpc/powerpc64/e5500/fpu/Implies | 1 +
+ .../linux/powerpc/powerpc64/e6500/fpu/Implies | 1 +
+ 19 files changed, 1418 insertions(+)
+ create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+ create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+ create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+ create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+ create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+ create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+ create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+ create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+ create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+ create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+ create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+ create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+ create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
+ create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
+ create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
+ create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
+ create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
+ create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
+ create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
+
+diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+new file mode 100644
+index 0000000000..71e516d1c8
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+@@ -0,0 +1,134 @@
++/* Double-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float two108 = 3.245185536584267269e+32;
++static const float twom54 = 5.551115123125782702e-17;
++static const float half = 0.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the actual square root and half of its reciprocal
++ simultaneously. */
++
++#ifdef __STDC__
++double
++__ieee754_sqrt (double b)
++#else
++double
++__ieee754_sqrt (b)
++ double b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++ double y, g, h, d, r;
++ ieee_double_shape_type u;
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ u.value = b;
++
++ relax_fenv_state ();
++
++ __asm__ ("frsqrte %[estimate], %[x]\n"
++ : [estimate] "=f" (y) : [x] "f" (b));
++
++ /* Following Muller et al, page 168, equation 5.20.
++
++ h goes to 1/(2*sqrt(b))
++ g goes to sqrt(b).
++
++ We need three iterations to get within 1ulp. */
++
++ /* Indicate that these can be performed prior to the branch. GCC
++ insists on sinking them below the branch, however; it seems like
++ they'd be better before the branch so that we can cover any latency
++ from storing the argument and loading its high word. Oh well. */
++
++ g = b * y;
++ h = 0.5 * y;
++
++ /* Handle small numbers by scaling. */
++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
++ return __ieee754_sqrt (b * two108) * twom54;
++
++#define FMADD(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
++
++ /* Final refinement. */
++ d = FNMSUB (g, g, b);
++
++ fesetenv_register (fe);
++ return FMADD (d, h, g);
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_wash (b);
++}
+diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+new file mode 100644
+index 0000000000..26fa067abf
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+@@ -0,0 +1,101 @@
++/* Single-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float threehalf = 1.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the reciprocal square root and use that to compute the actual
++ square root. */
++
++#ifdef __STDC__
++float
++__ieee754_sqrtf (float b)
++#else
++float
++__ieee754_sqrtf (b)
++ float b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++#define FMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ double y, x;
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ relax_fenv_state ();
++
++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
++ y = FMSUB (threehalf, b, b);
++
++ /* Initial estimate. */
++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
++
++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++
++ /* All done. */
++ fesetenv_register (fe);
++ return x * b;
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_washf (b);
++}
+diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+new file mode 100644
+index 0000000000..71e516d1c8
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+@@ -0,0 +1,134 @@
++/* Double-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float two108 = 3.245185536584267269e+32;
++static const float twom54 = 5.551115123125782702e-17;
++static const float half = 0.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the actual square root and half of its reciprocal
++ simultaneously. */
++
++#ifdef __STDC__
++double
++__ieee754_sqrt (double b)
++#else
++double
++__ieee754_sqrt (b)
++ double b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++ double y, g, h, d, r;
++ ieee_double_shape_type u;
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ u.value = b;
++
++ relax_fenv_state ();
++
++ __asm__ ("frsqrte %[estimate], %[x]\n"
++ : [estimate] "=f" (y) : [x] "f" (b));
++
++ /* Following Muller et al, page 168, equation 5.20.
++
++ h goes to 1/(2*sqrt(b))
++ g goes to sqrt(b).
++
++ We need three iterations to get within 1ulp. */
++
++ /* Indicate that these can be performed prior to the branch. GCC
++ insists on sinking them below the branch, however; it seems like
++ they'd be better before the branch so that we can cover any latency
++ from storing the argument and loading its high word. Oh well. */
++
++ g = b * y;
++ h = 0.5 * y;
++
++ /* Handle small numbers by scaling. */
++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
++ return __ieee754_sqrt (b * two108) * twom54;
++
++#define FMADD(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
++
++ /* Final refinement. */
++ d = FNMSUB (g, g, b);
++
++ fesetenv_register (fe);
++ return FMADD (d, h, g);
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_wash (b);
++}
+diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+new file mode 100644
+index 0000000000..26fa067abf
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+@@ -0,0 +1,101 @@
++/* Single-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float threehalf = 1.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the reciprocal square root and use that to compute the actual
++ square root. */
++
++#ifdef __STDC__
++float
++__ieee754_sqrtf (float b)
++#else
++float
++__ieee754_sqrtf (b)
++ float b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++#define FMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ double y, x;
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ relax_fenv_state ();
++
++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
++ y = FMSUB (threehalf, b, b);
++
++ /* Initial estimate. */
++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
++
++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++
++ /* All done. */
++ fesetenv_register (fe);
++ return x * b;
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_washf (b);
++}
+diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+new file mode 100644
+index 0000000000..71e516d1c8
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+@@ -0,0 +1,134 @@
++/* Double-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float two108 = 3.245185536584267269e+32;
++static const float twom54 = 5.551115123125782702e-17;
++static const float half = 0.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the actual square root and half of its reciprocal
++ simultaneously. */
++
++#ifdef __STDC__
++double
++__ieee754_sqrt (double b)
++#else
++double
++__ieee754_sqrt (b)
++ double b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++ double y, g, h, d, r;
++ ieee_double_shape_type u;
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ u.value = b;
++
++ relax_fenv_state ();
++
++ __asm__ ("frsqrte %[estimate], %[x]\n"
++ : [estimate] "=f" (y) : [x] "f" (b));
++
++ /* Following Muller et al, page 168, equation 5.20.
++
++ h goes to 1/(2*sqrt(b))
++ g goes to sqrt(b).
++
++ We need three iterations to get within 1ulp. */
++
++ /* Indicate that these can be performed prior to the branch. GCC
++ insists on sinking them below the branch, however; it seems like
++ they'd be better before the branch so that we can cover any latency
++ from storing the argument and loading its high word. Oh well. */
++
++ g = b * y;
++ h = 0.5 * y;
++
++ /* Handle small numbers by scaling. */
++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
++ return __ieee754_sqrt (b * two108) * twom54;
++
++#define FMADD(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
++
++ /* Final refinement. */
++ d = FNMSUB (g, g, b);
++
++ fesetenv_register (fe);
++ return FMADD (d, h, g);
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_wash (b);
++}
+diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+new file mode 100644
+index 0000000000..26fa067abf
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+@@ -0,0 +1,101 @@
++/* Single-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float threehalf = 1.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the reciprocal square root and use that to compute the actual
++ square root. */
++
++#ifdef __STDC__
++float
++__ieee754_sqrtf (float b)
++#else
++float
++__ieee754_sqrtf (b)
++ float b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++#define FMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ double y, x;
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ relax_fenv_state ();
++
++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
++ y = FMSUB (threehalf, b, b);
++
++ /* Initial estimate. */
++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
++
++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++
++ /* All done. */
++ fesetenv_register (fe);
++ return x * b;
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_washf (b);
++}
+diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+new file mode 100644
+index 0000000000..71e516d1c8
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+@@ -0,0 +1,134 @@
++/* Double-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float two108 = 3.245185536584267269e+32;
++static const float twom54 = 5.551115123125782702e-17;
++static const float half = 0.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the actual square root and half of its reciprocal
++ simultaneously. */
++
++#ifdef __STDC__
++double
++__ieee754_sqrt (double b)
++#else
++double
++__ieee754_sqrt (b)
++ double b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++ double y, g, h, d, r;
++ ieee_double_shape_type u;
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ u.value = b;
++
++ relax_fenv_state ();
++
++ __asm__ ("frsqrte %[estimate], %[x]\n"
++ : [estimate] "=f" (y) : [x] "f" (b));
++
++ /* Following Muller et al, page 168, equation 5.20.
++
++ h goes to 1/(2*sqrt(b))
++ g goes to sqrt(b).
++
++ We need three iterations to get within 1ulp. */
++
++ /* Indicate that these can be performed prior to the branch. GCC
++ insists on sinking them below the branch, however; it seems like
++ they'd be better before the branch so that we can cover any latency
++ from storing the argument and loading its high word. Oh well. */
++
++ g = b * y;
++ h = 0.5 * y;
++
++ /* Handle small numbers by scaling. */
++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
++ return __ieee754_sqrt (b * two108) * twom54;
++
++#define FMADD(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
++
++ /* Final refinement. */
++ d = FNMSUB (g, g, b);
++
++ fesetenv_register (fe);
++ return FMADD (d, h, g);
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_wash (b);
++}
+diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+new file mode 100644
+index 0000000000..26fa067abf
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+@@ -0,0 +1,101 @@
++/* Single-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float threehalf = 1.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the reciprocal square root and use that to compute the actual
++ square root. */
++
++#ifdef __STDC__
++float
++__ieee754_sqrtf (float b)
++#else
++float
++__ieee754_sqrtf (b)
++ float b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++#define FMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ double y, x;
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ relax_fenv_state ();
++
++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
++ y = FMSUB (threehalf, b, b);
++
++ /* Initial estimate. */
++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
++
++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++
++ /* All done. */
++ fesetenv_register (fe);
++ return x * b;
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_washf (b);
++}
+diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+new file mode 100644
+index 0000000000..71e516d1c8
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+@@ -0,0 +1,134 @@
++/* Double-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float two108 = 3.245185536584267269e+32;
++static const float twom54 = 5.551115123125782702e-17;
++static const float half = 0.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the actual square root and half of its reciprocal
++ simultaneously. */
++
++#ifdef __STDC__
++double
++__ieee754_sqrt (double b)
++#else
++double
++__ieee754_sqrt (b)
++ double b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++ double y, g, h, d, r;
++ ieee_double_shape_type u;
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ u.value = b;
++
++ relax_fenv_state ();
++
++ __asm__ ("frsqrte %[estimate], %[x]\n"
++ : [estimate] "=f" (y) : [x] "f" (b));
++
++ /* Following Muller et al, page 168, equation 5.20.
++
++ h goes to 1/(2*sqrt(b))
++ g goes to sqrt(b).
++
++ We need three iterations to get within 1ulp. */
++
++ /* Indicate that these can be performed prior to the branch. GCC
++ insists on sinking them below the branch, however; it seems like
++ they'd be better before the branch so that we can cover any latency
++ from storing the argument and loading its high word. Oh well. */
++
++ g = b * y;
++ h = 0.5 * y;
++
++ /* Handle small numbers by scaling. */
++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
++ return __ieee754_sqrt (b * two108) * twom54;
++
++#define FMADD(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
++
++ /* Final refinement. */
++ d = FNMSUB (g, g, b);
++
++ fesetenv_register (fe);
++ return FMADD (d, h, g);
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_wash (b);
++}
+diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+new file mode 100644
+index 0000000000..26fa067abf
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+@@ -0,0 +1,101 @@
++/* Single-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float threehalf = 1.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the reciprocal square root and use that to compute the actual
++ square root. */
++
++#ifdef __STDC__
++float
++__ieee754_sqrtf (float b)
++#else
++float
++__ieee754_sqrtf (b)
++ float b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++#define FMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ double y, x;
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ relax_fenv_state ();
++
++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
++ y = FMSUB (threehalf, b, b);
++
++ /* Initial estimate. */
++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
++
++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++
++ /* All done. */
++ fesetenv_register (fe);
++ return x * b;
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_washf (b);
++}
+diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+new file mode 100644
+index 0000000000..71e516d1c8
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+@@ -0,0 +1,134 @@
++/* Double-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float two108 = 3.245185536584267269e+32;
++static const float twom54 = 5.551115123125782702e-17;
++static const float half = 0.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the actual square root and half of its reciprocal
++ simultaneously. */
++
++#ifdef __STDC__
++double
++__ieee754_sqrt (double b)
++#else
++double
++__ieee754_sqrt (b)
++ double b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++ double y, g, h, d, r;
++ ieee_double_shape_type u;
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ u.value = b;
++
++ relax_fenv_state ();
++
++ __asm__ ("frsqrte %[estimate], %[x]\n"
++ : [estimate] "=f" (y) : [x] "f" (b));
++
++ /* Following Muller et al, page 168, equation 5.20.
++
++ h goes to 1/(2*sqrt(b))
++ g goes to sqrt(b).
++
++ We need three iterations to get within 1ulp. */
++
++ /* Indicate that these can be performed prior to the branch. GCC
++ insists on sinking them below the branch, however; it seems like
++ they'd be better before the branch so that we can cover any latency
++ from storing the argument and loading its high word. Oh well. */
++
++ g = b * y;
++ h = 0.5 * y;
++
++ /* Handle small numbers by scaling. */
++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
++ return __ieee754_sqrt (b * two108) * twom54;
++
++#define FMADD(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ r = FNMSUB (g, h, half);
++ g = FMADD (g, r, g);
++ h = FMADD (h, r, h);
++
++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
++
++ /* Final refinement. */
++ d = FNMSUB (g, g, b);
++
++ fesetenv_register (fe);
++ return FMADD (d, h, g);
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_wash (b);
++}
+diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+new file mode 100644
+index 0000000000..26fa067abf
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+@@ -0,0 +1,101 @@
++/* Single-precision floating point square root.
++ Copyright (C) 2010 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++#include <math_private.h>
++#include <fenv_libc.h>
++#include <inttypes.h>
++
++#include <sysdep.h>
++#include <ldsodefs.h>
++
++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
++static const float threehalf = 1.5;
++
++/* The method is based on the descriptions in:
++
++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
++
++ We find the reciprocal square root and use that to compute the actual
++ square root. */
++
++#ifdef __STDC__
++float
++__ieee754_sqrtf (float b)
++#else
++float
++__ieee754_sqrtf (b)
++ float b;
++#endif
++{
++ if (__builtin_expect (b > 0, 1))
++ {
++#define FMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++#define FNMSUB(a_, c_, b_) \
++ ({ double __r; \
++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
++ __r;})
++
++ if (__builtin_expect (b != a_inf.value, 1))
++ {
++ double y, x;
++ fenv_t fe;
++
++ fe = fegetenv_register ();
++
++ relax_fenv_state ();
++
++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
++ y = FMSUB (threehalf, b, b);
++
++ /* Initial estimate. */
++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
++
++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++ x = x * FNMSUB (y, x * x, threehalf);
++
++ /* All done. */
++ fesetenv_register (fe);
++ return x * b;
++ }
++ }
++ else if (b < 0)
++ {
++ /* For some reason, some PowerPC32 processors don't implement
++ FE_INVALID_SQRT. */
++#ifdef FE_INVALID_SQRT
++ feraiseexcept (FE_INVALID_SQRT);
++
++ fenv_union_t u = { .fenv = fegetenv_register () };
++ if ((u.l & FE_INVALID) == 0)
++#endif
++ feraiseexcept (FE_INVALID);
++ b = a_nan.value;
++ }
++ return f_washf (b);
++}
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
+new file mode 100644
+index 0000000000..b103b4dea5
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
+@@ -0,0 +1 @@
++powerpc/powerpc32/603e/fpu
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
+new file mode 100644
+index 0000000000..64db17fada
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
+@@ -0,0 +1,2 @@
++# e300c3 is a variant of 603e so use the same optimizations for sqrt
++powerpc/powerpc32/603e/fpu
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
+new file mode 100644
+index 0000000000..7eac5fcf02
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
+@@ -0,0 +1 @@
++powerpc/powerpc32/e500mc/fpu
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
+new file mode 100644
+index 0000000000..264b2a7700
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
+@@ -0,0 +1 @@
++powerpc/powerpc32/e5500/fpu
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
+new file mode 100644
+index 0000000000..a25934467b
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
+@@ -0,0 +1 @@
++powerpc/powerpc32/e6500/fpu
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
+new file mode 100644
+index 0000000000..a7bc854be8
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
+@@ -0,0 +1 @@
++powerpc/powerpc64/e5500/fpu
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
+new file mode 100644
+index 0000000000..04ff8cc181
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
+@@ -0,0 +1 @@
++powerpc/powerpc64/e6500/fpu
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
deleted file mode 100644
index f267f66cde..0000000000
--- a/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From bb065b78e9e0d3301e64a26e37550a657c885ebc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:11:22 +0000
-Subject: [PATCH 06/25] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
- names
-
-This bolts in a hook for OE to pass its own version of interpreter
-names into glibc especially for multilib case, where it differs from any
-other distros
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- elf/readlib.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/elf/readlib.c b/elf/readlib.c
-index 8a66ffe..08d56fc 100644
---- a/elf/readlib.c
-+++ b/elf/readlib.c
-@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
- #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
- SYSDEP_KNOWN_INTERPRETER_NAMES
- #endif
-+ OECORE_KNOWN_INTERPRETER_NAMES
- };
-
- static struct known_names known_libs[] =
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
deleted file mode 100644
index 612e892e87..0000000000
--- a/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-From 4a91bbdb11a15f93094695bba4e0849c421fad48 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:15:07 +0000
-Subject: [PATCH 07/25] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
-
-on ppc fixes the errors like below
-| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
-| collect2: ld returned 1 exit status
-
-Upstream-Status: Pending
-
-ChangeLog
-
-2012-01-06 Khem Raj <raj.khem@gmail.com>
-
- * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias.
- Remove cruft.
- * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto.
- * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto.
- * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 7 +------
- sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 7 +------
- sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 1 +
- sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 1 +
- sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 1 +
- sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 1 +
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 1 +
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 1 +
- sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 7 +------
- sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 7 +------
- sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 1 +
- sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 1 +
- 12 files changed, 12 insertions(+), 24 deletions(-)
-
-diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-index 71e516d..1795fd6 100644
---- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-@@ -39,14 +39,8 @@ static const float half = 0.5;
- We find the actual square root and half of its reciprocal
- simultaneously. */
-
--#ifdef __STDC__
- double
- __ieee754_sqrt (double b)
--#else
--double
--__ieee754_sqrt (b)
-- double b;
--#endif
- {
- if (__builtin_expect (b > 0, 1))
- {
-@@ -132,3 +126,4 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-index 26fa067..a917f31 100644
---- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
- We find the reciprocal square root and use that to compute the actual
- square root. */
-
--#ifdef __STDC__
- float
- __ieee754_sqrtf (float b)
--#else
--float
--__ieee754_sqrtf (b)
-- float b;
--#endif
- {
- if (__builtin_expect (b > 0, 1))
- {
-@@ -99,3 +93,4 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
---- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
---- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
---- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
---- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
---- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
---- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-index 71e516d..1795fd6 100644
---- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-@@ -39,14 +39,8 @@ static const float half = 0.5;
- We find the actual square root and half of its reciprocal
- simultaneously. */
-
--#ifdef __STDC__
- double
- __ieee754_sqrt (double b)
--#else
--double
--__ieee754_sqrt (b)
-- double b;
--#endif
- {
- if (__builtin_expect (b > 0, 1))
- {
-@@ -132,3 +126,4 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-index 26fa067..a917f31 100644
---- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
- We find the reciprocal square root and use that to compute the actual
- square root. */
-
--#ifdef __STDC__
- float
- __ieee754_sqrtf (float b)
--#else
--float
--__ieee754_sqrtf (b)
-- float b;
--#endif
- {
- if (__builtin_expect (b > 0, 1))
- {
-@@ -99,3 +93,4 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
---- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
---- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
new file mode 100644
index 0000000000..ae6fb268a5
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
@@ -0,0 +1,33 @@
+From dc715f6c70d01e9c3b31c1825fa5bc447967c847 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:11:22 +0000
+Subject: [PATCH 07/28] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+ names
+
+This bolts in a hook for OE to pass its own version of interpreter
+names into glibc especially for multilib case, where it differs from any
+other distros
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ elf/readlib.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/elf/readlib.c b/elf/readlib.c
+index c9743e6692..6307f918fc 100644
+--- a/elf/readlib.c
++++ b/elf/readlib.c
+@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
+ #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
+ SYSDEP_KNOWN_INTERPRETER_NAMES
+ #endif
++ OECORE_KNOWN_INTERPRETER_NAMES
+ };
+
+ static struct known_names known_libs[] =
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
deleted file mode 100644
index 9e222b7b45..0000000000
--- a/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ /dev/null
@@ -1,387 +0,0 @@
-From ce2746a1560b4430d89d114e1b65c7be225b4c2a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:16:38 +0000
-Subject: [PATCH 08/25] __ieee754_sqrt{,f} are now inline functions and call
- out __slow versions
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 12 ++++++++++--
- sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 8 +++++++-
- sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 14 +++++++++++---
- sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 12 ++++++++++--
- sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 14 +++++++++++---
- sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 12 ++++++++++--
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 8 ++++++++
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 8 ++++++++
- sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 12 ++++++++++--
- sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 9 ++++++++-
- sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 14 +++++++++++---
- sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 12 ++++++++++--
- 12 files changed, 114 insertions(+), 21 deletions(-)
-
-diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-index 1795fd6..daa83f3 100644
---- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-@@ -40,7 +40,7 @@ static const float half = 0.5;
- simultaneously. */
-
- double
--__ieee754_sqrt (double b)
-+__slow_ieee754_sqrt (double b)
- {
- if (__builtin_expect (b > 0, 1))
- {
-@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
-
- /* Handle small numbers by scaling. */
- if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-- return __ieee754_sqrt (b * two108) * twom54;
-+ return __slow_ieee754_sqrt (b * two108) * twom54;
-
- #define FMADD(a_, c_, b_) \
- ({ double __r; \
-@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
- }
- return f_wash (b);
- }
-+
-+#undef __ieee754_sqrt
-+double
-+__ieee754_sqrt (double x)
-+{
-+ return __slow_ieee754_sqrt (x);
-+}
-+
- strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-index a917f31..b812cf1 100644
---- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
- square root. */
-
- float
--__ieee754_sqrtf (float b)
-+__slow_ieee754_sqrtf (float b)
- {
- if (__builtin_expect (b > 0, 1))
- {
-@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b)
- }
- return f_washf (b);
- }
-+#undef __ieee754_sqrtf
-+float
-+__ieee754_sqrtf (float x)
-+{
-+ return __slow_ieee754_sqrtf (x);
-+}
- strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
---- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
-
- #ifdef __STDC__
- double
--__ieee754_sqrt (double b)
-+__slow_ieee754_sqrt (double b)
- #else
- double
--__ieee754_sqrt (b)
-+__slow_ieee754_sqrt (b)
- double b;
- #endif
- {
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
- /* Handle small numbers by scaling. */
- if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-- return __ieee754_sqrt (b * two108) * twom54;
-+ return __slow_ieee754_sqrt (b * two108) * twom54;
-
- #define FMADD(a_, c_, b_) \
- ({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+
-+#undef __ieee754_sqrt
-+double
-+__ieee754_sqrt (double x)
-+{
-+ return __slow_ieee754_sqrt (x);
-+}
-+
- strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
---- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
-
- #ifdef __STDC__
- float
--__ieee754_sqrtf (float b)
-+__slow_ieee754_sqrtf (float b)
- #else
- float
--__ieee754_sqrtf (b)
-+__slow_ieee754_sqrtf (b)
- float b;
- #endif
- {
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+
-+#undef __ieee754_sqrtf
-+float
-+__ieee754_sqrtf (float x)
-+{
-+ return __slow_ieee754_sqrtf (x);
-+}
-+
- strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
---- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
-
- #ifdef __STDC__
- double
--__ieee754_sqrt (double b)
-+__slow_ieee754_sqrt (double b)
- #else
- double
--__ieee754_sqrt (b)
-+__slow_ieee754_sqrt (b)
- double b;
- #endif
- {
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
- /* Handle small numbers by scaling. */
- if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-- return __ieee754_sqrt (b * two108) * twom54;
-+ return __slow_ieee754_sqrt (b * two108) * twom54;
-
- #define FMADD(a_, c_, b_) \
- ({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+
-+#undef __ieee754_sqrt
-+double
-+__ieee754_sqrt (double x)
-+{
-+ return __slow_ieee754_sqrt (x);
-+}
-+
- strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
---- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
-
- #ifdef __STDC__
- float
--__ieee754_sqrtf (float b)
-+__slow_ieee754_sqrtf (float b)
- #else
- float
--__ieee754_sqrtf (b)
-+__slow_ieee754_sqrtf (b)
- float b;
- #endif
- {
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+
-+#undef __ieee754_sqrtf
-+float
-+__ieee754_sqrtf (float x)
-+{
-+ return __slow_ieee754_sqrtf (x);
-+}
-+
- strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index fc4a749..1c34244 100644
---- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+
-+#undef __ieee754_sqrt
-+double
-+__ieee754_sqrt (double x)
-+{
-+ return __slow_ieee754_sqrt (x);
-+}
-+
- strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 9d17512..8126535 100644
---- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+
-+#undef __ieee754_sqrtf
-+float
-+__ieee754_sqrtf (float x)
-+{
-+ return __slow_ieee754_sqrtf (x);
-+}
-+
- strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-index 1795fd6..13a8197 100644
---- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-@@ -40,7 +40,7 @@ static const float half = 0.5;
- simultaneously. */
-
- double
--__ieee754_sqrt (double b)
-+__slow_ieee754_sqrt (double b)
- {
- if (__builtin_expect (b > 0, 1))
- {
-@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
-
- /* Handle small numbers by scaling. */
- if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-- return __ieee754_sqrt (b * two108) * twom54;
-+ return __slow_ieee754_sqrt (b * two108) * twom54;
-
- #define FMADD(a_, c_, b_) \
- ({ double __r; \
-@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
- }
- return f_wash (b);
- }
-+
-+#undef __ieee754_sqrt
-+double
-+__ieee754_sqrt (double x)
-+{
-+ return __slow_ieee754_sqrt (x);
-+}
-+
- strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-index a917f31..fae2d81 100644
---- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
- square root. */
-
- float
--__ieee754_sqrtf (float b)
-+__slow_ieee754_sqrtf (float b)
- {
- if (__builtin_expect (b > 0, 1))
- {
-@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b)
- }
- return f_washf (b);
- }
-+#undef __ieee754_sqrtf
-+float
-+__ieee754_sqrtf (float x)
-+{
-+ return __slow_ieee754_sqrtf (x);
-+}
-+
- strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
---- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
-
- #ifdef __STDC__
- double
--__ieee754_sqrt (double b)
-+__slow_ieee754_sqrt (double b)
- #else
- double
--__ieee754_sqrt (b)
-+__slow_ieee754_sqrt (b)
- double b;
- #endif
- {
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
- /* Handle small numbers by scaling. */
- if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-- return __ieee754_sqrt (b * two108) * twom54;
-+ return __slow_ieee754_sqrt (b * two108) * twom54;
-
- #define FMADD(a_, c_, b_) \
- ({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
- }
- return f_wash (b);
- }
-+
-+#undef __ieee754_sqrt
-+double
-+__ieee754_sqrt (double x)
-+{
-+ return __slow_ieee754_sqrt (x);
-+}
-+
- strong_alias (__ieee754_sqrt, __sqrt_finite)
-diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
---- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
-
- #ifdef __STDC__
- float
--__ieee754_sqrtf (float b)
-+__slow_ieee754_sqrtf (float b)
- #else
- float
--__ieee754_sqrtf (b)
-+__slow_ieee754_sqrtf (b)
- float b;
- #endif
- {
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
- }
- return f_washf (b);
- }
-+
-+#undef __ieee754_sqrtf
-+float
-+__ieee754_sqrtf (float x)
-+{
-+ return __slow_ieee754_sqrtf (x);
-+}
-+
- strong_alias (__ieee754_sqrtf, __sqrtf_finite)
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
new file mode 100644
index 0000000000..8bed20306e
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
@@ -0,0 +1,208 @@
+From 42a01c55786a9472934e12e0bf0c40983579b607 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:15:07 +0000
+Subject: [PATCH 08/28] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+
+on ppc fixes the errors like below
+| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
+| collect2: ld returned 1 exit status
+
+Upstream-Status: Pending
+
+ChangeLog
+
+2012-01-06 Khem Raj <raj.khem@gmail.com>
+
+ * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias.
+ Remove cruft.
+ * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto.
+ * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto.
+ * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 7 +------
+ sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 7 +------
+ sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 1 +
+ sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 1 +
+ sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 1 +
+ sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 1 +
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 1 +
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 1 +
+ sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 7 +------
+ sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 7 +------
+ sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 1 +
+ sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 1 +
+ 12 files changed, 12 insertions(+), 24 deletions(-)
+
+diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+index 71e516d1c8..1795fd6c3e 100644
+--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+@@ -39,14 +39,8 @@ static const float half = 0.5;
+ We find the actual square root and half of its reciprocal
+ simultaneously. */
+
+-#ifdef __STDC__
+ double
+ __ieee754_sqrt (double b)
+-#else
+-double
+-__ieee754_sqrt (b)
+- double b;
+-#endif
+ {
+ if (__builtin_expect (b > 0, 1))
+ {
+@@ -132,3 +126,4 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+index 26fa067abf..a917f313ab 100644
+--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
+ We find the reciprocal square root and use that to compute the actual
+ square root. */
+
+-#ifdef __STDC__
+ float
+ __ieee754_sqrtf (float b)
+-#else
+-float
+-__ieee754_sqrtf (b)
+- float b;
+-#endif
+ {
+ if (__builtin_expect (b > 0, 1))
+ {
+@@ -99,3 +93,4 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+index 71e516d1c8..fc4a74990e 100644
+--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+index 26fa067abf..9d175122a8 100644
+--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+index 71e516d1c8..fc4a74990e 100644
+--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+index 26fa067abf..9d175122a8 100644
+--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+index 71e516d1c8..fc4a74990e 100644
+--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+index 26fa067abf..9d175122a8 100644
+--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+index 71e516d1c8..1795fd6c3e 100644
+--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+@@ -39,14 +39,8 @@ static const float half = 0.5;
+ We find the actual square root and half of its reciprocal
+ simultaneously. */
+
+-#ifdef __STDC__
+ double
+ __ieee754_sqrt (double b)
+-#else
+-double
+-__ieee754_sqrt (b)
+- double b;
+-#endif
+ {
+ if (__builtin_expect (b > 0, 1))
+ {
+@@ -132,3 +126,4 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+index 26fa067abf..a917f313ab 100644
+--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
+ We find the reciprocal square root and use that to compute the actual
+ square root. */
+
+-#ifdef __STDC__
+ float
+ __ieee754_sqrtf (float b)
+-#else
+-float
+-__ieee754_sqrtf (b)
+- float b;
+-#endif
+ {
+ if (__builtin_expect (b > 0, 1))
+ {
+@@ -99,3 +93,4 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+index 71e516d1c8..fc4a74990e 100644
+--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+index 26fa067abf..9d175122a8 100644
+--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
deleted file mode 100644
index 7aa74df239..0000000000
--- a/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 1b61649e545de76dd79a5e2c39bb16d0c4623160 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:20:09 +0000
-Subject: [PATCH 09/25] Quote from bug 1443 which explains what the patch does
- :
-
- We build some random program and link it with -lust. When we run it,
- it dies with a SIGSEGV before reaching main().
-
- Libust.so depends on liburcu-bp.so from the usermode-rcu package.
- Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this
- is critical.
-
- Libust.so uses a TLS / __thread variable that is defined in liburcu-
- bp.so. There are special ARM-specific relocation types that allow two
- shared libraries to share thread-specific data. This is critical too.
-
- One more critical issue: although liburcu-bp.so is prelinked, we can't
- load it at its prelinked address, because we also link against
- librt.so, and librt.so uses that address.
-
- The dynamic linker is forced to relink liburcu-bp.so at a different
- address. In the course of relinking, it processes the special ARM
- relocation record mentioned above. The prelinker has already filled
- in the information, which is a short offset into a table of thread-
- specific data that is allocated per-thread for each library that uses
- TLS. Because the normal behavior of a relocation is to add the symbol
- value to an addend stored at the address being relocated, we end up
- adding the short offset to itself, doubling it.
-
- Now we have an awkward situation. The libust.so library doesn't know
- about the addend, so its TLS data for this element is correct. The
- liburcu-bp.so library has a different offset for the element. When we
- go to initialize the element for the first time in liburcu-bp.so, we
- write the address of the result at the doubled (broken) offset.
- Later, when we refer to the address from libust.so, we check the value
- at the correct offset, but it's NULL, so we eat hot SIGSEGV.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/arm/dl-machine.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
-index 60eee00..7d54d5e 100644
---- a/sysdeps/arm/dl-machine.h
-+++ b/sysdeps/arm/dl-machine.h
-@@ -499,7 +499,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
-
- case R_ARM_TLS_DTPOFF32:
- if (sym != NULL)
-- *reloc_addr += sym->st_value;
-+ *reloc_addr = sym->st_value;
- break;
-
- case R_ARM_TLS_TPOFF32:
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
new file mode 100644
index 0000000000..8a5d6d8b7f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -0,0 +1,387 @@
+From a0fcb9135bc8c2b9d8a161d166b6f9d56d7af245 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:16:38 +0000
+Subject: [PATCH 09/28] __ieee754_sqrt{,f} are now inline functions and call
+ out __slow versions
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 12 ++++++++++--
+ sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 8 +++++++-
+ sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 14 +++++++++++---
+ sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 12 ++++++++++--
+ sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 14 +++++++++++---
+ sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 12 ++++++++++--
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 8 ++++++++
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 8 ++++++++
+ sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 12 ++++++++++--
+ sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 9 ++++++++-
+ sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 14 +++++++++++---
+ sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 12 ++++++++++--
+ 12 files changed, 114 insertions(+), 21 deletions(-)
+
+diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+index 1795fd6c3e..daa83f3fe8 100644
+--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+@@ -40,7 +40,7 @@ static const float half = 0.5;
+ simultaneously. */
+
+ double
+-__ieee754_sqrt (double b)
++__slow_ieee754_sqrt (double b)
+ {
+ if (__builtin_expect (b > 0, 1))
+ {
+@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
+
+ /* Handle small numbers by scaling. */
+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
+- return __ieee754_sqrt (b * two108) * twom54;
++ return __slow_ieee754_sqrt (b * two108) * twom54;
+
+ #define FMADD(a_, c_, b_) \
+ ({ double __r; \
+@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
+ }
+ return f_wash (b);
+ }
++
++#undef __ieee754_sqrt
++double
++__ieee754_sqrt (double x)
++{
++ return __slow_ieee754_sqrt (x);
++}
++
+ strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+index a917f313ab..b812cf1705 100644
+--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
+ square root. */
+
+ float
+-__ieee754_sqrtf (float b)
++__slow_ieee754_sqrtf (float b)
+ {
+ if (__builtin_expect (b > 0, 1))
+ {
+@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b)
+ }
+ return f_washf (b);
+ }
++#undef __ieee754_sqrtf
++float
++__ieee754_sqrtf (float x)
++{
++ return __slow_ieee754_sqrtf (x);
++}
+ strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+index fc4a74990e..7038a70b47 100644
+--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+@@ -41,10 +41,10 @@ static const float half = 0.5;
+
+ #ifdef __STDC__
+ double
+-__ieee754_sqrt (double b)
++__slow_ieee754_sqrt (double b)
+ #else
+ double
+-__ieee754_sqrt (b)
++__slow_ieee754_sqrt (b)
+ double b;
+ #endif
+ {
+@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
+
+ /* Handle small numbers by scaling. */
+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
+- return __ieee754_sqrt (b * two108) * twom54;
++ return __slow_ieee754_sqrt (b * two108) * twom54;
+
+ #define FMADD(a_, c_, b_) \
+ ({ double __r; \
+@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++
++#undef __ieee754_sqrt
++double
++__ieee754_sqrt (double x)
++{
++ return __slow_ieee754_sqrt (x);
++}
++
+ strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+index 9d175122a8..10de1f0cc3 100644
+--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+
+ #ifdef __STDC__
+ float
+-__ieee754_sqrtf (float b)
++__slow_ieee754_sqrtf (float b)
+ #else
+ float
+-__ieee754_sqrtf (b)
++__slow_ieee754_sqrtf (b)
+ float b;
+ #endif
+ {
+@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++
++#undef __ieee754_sqrtf
++float
++__ieee754_sqrtf (float x)
++{
++ return __slow_ieee754_sqrtf (x);
++}
++
+ strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+index fc4a74990e..7038a70b47 100644
+--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+@@ -41,10 +41,10 @@ static const float half = 0.5;
+
+ #ifdef __STDC__
+ double
+-__ieee754_sqrt (double b)
++__slow_ieee754_sqrt (double b)
+ #else
+ double
+-__ieee754_sqrt (b)
++__slow_ieee754_sqrt (b)
+ double b;
+ #endif
+ {
+@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
+
+ /* Handle small numbers by scaling. */
+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
+- return __ieee754_sqrt (b * two108) * twom54;
++ return __slow_ieee754_sqrt (b * two108) * twom54;
+
+ #define FMADD(a_, c_, b_) \
+ ({ double __r; \
+@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++
++#undef __ieee754_sqrt
++double
++__ieee754_sqrt (double x)
++{
++ return __slow_ieee754_sqrt (x);
++}
++
+ strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+index 9d175122a8..10de1f0cc3 100644
+--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+
+ #ifdef __STDC__
+ float
+-__ieee754_sqrtf (float b)
++__slow_ieee754_sqrtf (float b)
+ #else
+ float
+-__ieee754_sqrtf (b)
++__slow_ieee754_sqrtf (b)
+ float b;
+ #endif
+ {
+@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++
++#undef __ieee754_sqrtf
++float
++__ieee754_sqrtf (float x)
++{
++ return __slow_ieee754_sqrtf (x);
++}
++
+ strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+index fc4a74990e..1c34244bd8 100644
+--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++
++#undef __ieee754_sqrt
++double
++__ieee754_sqrt (double x)
++{
++ return __slow_ieee754_sqrt (x);
++}
++
+ strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+index 9d175122a8..812653558f 100644
+--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++
++#undef __ieee754_sqrtf
++float
++__ieee754_sqrtf (float x)
++{
++ return __slow_ieee754_sqrtf (x);
++}
++
+ strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+index 1795fd6c3e..13a81973e3 100644
+--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+@@ -40,7 +40,7 @@ static const float half = 0.5;
+ simultaneously. */
+
+ double
+-__ieee754_sqrt (double b)
++__slow_ieee754_sqrt (double b)
+ {
+ if (__builtin_expect (b > 0, 1))
+ {
+@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
+
+ /* Handle small numbers by scaling. */
+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
+- return __ieee754_sqrt (b * two108) * twom54;
++ return __slow_ieee754_sqrt (b * two108) * twom54;
+
+ #define FMADD(a_, c_, b_) \
+ ({ double __r; \
+@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
+ }
+ return f_wash (b);
+ }
++
++#undef __ieee754_sqrt
++double
++__ieee754_sqrt (double x)
++{
++ return __slow_ieee754_sqrt (x);
++}
++
+ strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+index a917f313ab..fae2d81210 100644
+--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
+ square root. */
+
+ float
+-__ieee754_sqrtf (float b)
++__slow_ieee754_sqrtf (float b)
+ {
+ if (__builtin_expect (b > 0, 1))
+ {
+@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b)
+ }
+ return f_washf (b);
+ }
++#undef __ieee754_sqrtf
++float
++__ieee754_sqrtf (float x)
++{
++ return __slow_ieee754_sqrtf (x);
++}
++
+ strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+index fc4a74990e..7038a70b47 100644
+--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+@@ -41,10 +41,10 @@ static const float half = 0.5;
+
+ #ifdef __STDC__
+ double
+-__ieee754_sqrt (double b)
++__slow_ieee754_sqrt (double b)
+ #else
+ double
+-__ieee754_sqrt (b)
++__slow_ieee754_sqrt (b)
+ double b;
+ #endif
+ {
+@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
+
+ /* Handle small numbers by scaling. */
+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
+- return __ieee754_sqrt (b * two108) * twom54;
++ return __slow_ieee754_sqrt (b * two108) * twom54;
+
+ #define FMADD(a_, c_, b_) \
+ ({ double __r; \
+@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+ }
+ return f_wash (b);
+ }
++
++#undef __ieee754_sqrt
++double
++__ieee754_sqrt (double x)
++{
++ return __slow_ieee754_sqrt (x);
++}
++
+ strong_alias (__ieee754_sqrt, __sqrt_finite)
+diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+index 9d175122a8..10de1f0cc3 100644
+--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+
+ #ifdef __STDC__
+ float
+-__ieee754_sqrtf (float b)
++__slow_ieee754_sqrtf (float b)
+ #else
+ float
+-__ieee754_sqrtf (b)
++__slow_ieee754_sqrtf (b)
+ float b;
+ #endif
+ {
+@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+ }
+ return f_washf (b);
+ }
++
++#undef __ieee754_sqrtf
++float
++__ieee754_sqrtf (float x)
++{
++ return __slow_ieee754_sqrtf (x);
++}
++
+ strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
new file mode 100644
index 0000000000..a140a15479
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -0,0 +1,62 @@
+From 9c1f2229c48c37b38628c485ef16e01f6780160c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:20:09 +0000
+Subject: [PATCH 10/28] Quote from bug 1443 which explains what the patch does
+ :
+
+ We build some random program and link it with -lust. When we run it,
+ it dies with a SIGSEGV before reaching main().
+
+ Libust.so depends on liburcu-bp.so from the usermode-rcu package.
+ Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this
+ is critical.
+
+ Libust.so uses a TLS / __thread variable that is defined in liburcu-
+ bp.so. There are special ARM-specific relocation types that allow two
+ shared libraries to share thread-specific data. This is critical too.
+
+ One more critical issue: although liburcu-bp.so is prelinked, we can't
+ load it at its prelinked address, because we also link against
+ librt.so, and librt.so uses that address.
+
+ The dynamic linker is forced to relink liburcu-bp.so at a different
+ address. In the course of relinking, it processes the special ARM
+ relocation record mentioned above. The prelinker has already filled
+ in the information, which is a short offset into a table of thread-
+ specific data that is allocated per-thread for each library that uses
+ TLS. Because the normal behavior of a relocation is to add the symbol
+ value to an addend stored at the address being relocated, we end up
+ adding the short offset to itself, doubling it.
+
+ Now we have an awkward situation. The libust.so library doesn't know
+ about the addend, so its TLS data for this element is correct. The
+ liburcu-bp.so library has a different offset for the element. When we
+ go to initialize the element for the first time in liburcu-bp.so, we
+ write the address of the result at the doubled (broken) offset.
+ Later, when we refer to the address from libust.so, we check the value
+ at the correct offset, but it's NULL, so we eat hot SIGSEGV.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/arm/dl-machine.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
+index 7a2f9d9b78..36a1dd1888 100644
+--- a/sysdeps/arm/dl-machine.h
++++ b/sysdeps/arm/dl-machine.h
+@@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+
+ case R_ARM_TLS_DTPOFF32:
+ if (sym != NULL)
+- *reloc_addr += sym->st_value;
++ *reloc_addr = sym->st_value;
+ break;
+
+ case R_ARM_TLS_TPOFF32:
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
deleted file mode 100644
index 14963a3577..0000000000
--- a/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 91af416408b8718b004c83d93a6daa1f34cba48d Mon Sep 17 00:00:00 2001
-From: Ting Liu <b28495@freescale.com>
-Date: Wed, 19 Dec 2012 04:39:57 -0600
-Subject: [PATCH 10/25] eglibc: run libm-err-tab.pl with specific dirs in ${S}
-
-libm-err-tab.pl will parse all the files named "libm-test-ulps"
-in the given dir recursively. To avoid parsing the one in
-${S}/.pc/ (it does exist after eglibc adds aarch64 support,
-${S}/.pc/aarch64-0001-glibc-fsf-v1-eaf6f205.patch/ports/sysdeps/
-aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs
-in ${S}.
-
-Upstream-Status: inappropriate [OE specific]
-
-Signed-off-by: Ting Liu <b28495@freescale.com>
----
- manual/Makefile | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/manual/Makefile b/manual/Makefile
-index f2f694f..e062833 100644
---- a/manual/Makefile
-+++ b/manual/Makefile
-@@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
- $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
- $(dir)/libm-test-ulps))
- pwd=`pwd`; \
-- $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp
-+ $(PERL) $< $$pwd/../ports > $(objpfx)libm-err-tmp
-+ $(PERL) $< $$pwd/../sysdeps >> $(objpfx)libm-err-tmp
- $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
- touch $@
-
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
deleted file mode 100644
index e92d04c62b..0000000000
--- a/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 6a71f688471fe0c85f8ad9afc4ee0723a20aae1d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:24:46 +0000
-Subject: [PATCH 11/25] __ieee754_sqrt{,f} are now inline functions and call
- out __slow versions
-
-Upstream-Status: Pending
-
-Signed-off-by: chunrong guo <B40290@freescale.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 6 +++---
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 4 ++--
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index 1c34244..7038a70 100644
---- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
-
- #ifdef __STDC__
- double
--__ieee754_sqrt (double b)
-+__slow_ieee754_sqrt (double b)
- #else
- double
--__ieee754_sqrt (b)
-+__slow_ieee754_sqrt (b)
- double b;
- #endif
- {
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
- /* Handle small numbers by scaling. */
- if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
-- return __ieee754_sqrt (b * two108) * twom54;
-+ return __slow_ieee754_sqrt (b * two108) * twom54;
-
- #define FMADD(a_, c_, b_) \
- ({ double __r; \
-diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 8126535..10de1f0 100644
---- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
-
- #ifdef __STDC__
- float
--__ieee754_sqrtf (float b)
-+__slow_ieee754_sqrtf (float b)
- #else
- float
--__ieee754_sqrtf (b)
-+__slow_ieee754_sqrtf (b)
- float b;
- #endif
- {
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
new file mode 100644
index 0000000000..cb99092eef
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -0,0 +1,36 @@
+From 171d2afb930917b0cfbe9df770774da1c92dd185 Mon Sep 17 00:00:00 2001
+From: Ting Liu <b28495@freescale.com>
+Date: Wed, 19 Dec 2012 04:39:57 -0600
+Subject: [PATCH 11/28] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+
+libm-err-tab.pl will parse all the files named "libm-test-ulps"
+in the given dir recursively. To avoid parsing the one in
+${S}/.pc/ (it does exist after eglibc adds aarch64 support,
+${S}/.pc/aarch64-0001-glibc-fsf-v1-eaf6f205.patch/ports/sysdeps/
+aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs
+in ${S}.
+
+Upstream-Status: inappropriate [OE specific]
+
+Signed-off-by: Ting Liu <b28495@freescale.com>
+---
+ manual/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/manual/Makefile b/manual/Makefile
+index 4f76ee85d2..04b8c8c320 100644
+--- a/manual/Makefile
++++ b/manual/Makefile
+@@ -103,7 +103,8 @@ $(objpfx)stamp-libm-err: $(..)math/gen-libm-test.py \
+ $(wildcard $(foreach dir,$(sysdirs),\
+ $(dir)/libm-test-ulps))
+ pwd=`pwd`; \
+- $(PYTHON) $< -s $$pwd/.. -m $(objpfx)libm-err-tmp
++ $(PYTHON) $< -s $$pwd/../ports -m $(objpfx)libm-err-tmp
++ $(PYTHON) $< -s $$pwd/../sysdeps -m $(objpfx)libm-err-tmp
+ $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
+ touch $@
+
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch b/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
deleted file mode 100644
index 4cba03f238..0000000000
--- a/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f9d024edb158659e403b51cc9d93da9bca6e5d7b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:25:45 +0000
-Subject: [PATCH 12/25] Make ld --version output matching grok gold's output
-
-adapted from from upstream branch roland/gold-vs-libc
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 8fe5937..7888a3f 100755
---- a/configure
-+++ b/configure
-@@ -4482,7 +4482,7 @@ else
- # Found it, now check the version.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
- $as_echo_n "checking version of $LD... " >&6; }
-- ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
-+ ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
-diff --git a/configure.ac b/configure.ac
-index 3c766b7..6908a99 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -944,7 +944,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
- [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
- AS=: critic_missing="$critic_missing as")
- AC_CHECK_PROG_VER(LD, $LD, --version,
-- [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
-+ [GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\)],
- [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
- LD=: critic_missing="$critic_missing ld")
-
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
new file mode 100644
index 0000000000..e233fbe542
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -0,0 +1,61 @@
+From 376be7b96152ef501c8cf95ed6dc52c0318bd26a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:24:46 +0000
+Subject: [PATCH 12/28] __ieee754_sqrt{,f} are now inline functions and call
+ out __slow versions
+
+Upstream-Status: Pending
+
+Signed-off-by: chunrong guo <B40290@freescale.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 6 +++---
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+index 1c34244bd8..7038a70b47 100644
+--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
++++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+@@ -41,10 +41,10 @@ static const float half = 0.5;
+
+ #ifdef __STDC__
+ double
+-__ieee754_sqrt (double b)
++__slow_ieee754_sqrt (double b)
+ #else
+ double
+-__ieee754_sqrt (b)
++__slow_ieee754_sqrt (b)
+ double b;
+ #endif
+ {
+@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
+
+ /* Handle small numbers by scaling. */
+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
+- return __ieee754_sqrt (b * two108) * twom54;
++ return __slow_ieee754_sqrt (b * two108) * twom54;
+
+ #define FMADD(a_, c_, b_) \
+ ({ double __r; \
+diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+index 812653558f..10de1f0cc3 100644
+--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
++++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+
+ #ifdef __STDC__
+ float
+-__ieee754_sqrtf (float b)
++__slow_ieee754_sqrtf (float b)
+ #else
+ float
+-__ieee754_sqrtf (b)
++__slow_ieee754_sqrtf (b)
+ float b;
+ #endif
+ {
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
index 6a82f8d933..9ba52e6e10 100644
--- a/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
+++ b/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
@@ -1,7 +1,7 @@
-From 2ece12093c8ba4cf688d235f35d36f1feb02324c Mon Sep 17 00:00:00 2001
+From 1ba4e9577437632856d719cbd5d63b5a76cbb4c4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH 13/25] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 13/28] sysdeps/gnu/configure.ac: handle correctly
$libc_cv_rootsbindir
Upstream-Status:Pending
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
-index 71243ad..f578187 100644
+index c15d1087e8..37cc983f2a 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -32,6 +32,6 @@ case "$prefix" in
@@ -26,7 +26,7 @@ index 71243ad..f578187 100644
;;
esac
diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac
-index 634fe4d..3db1697 100644
+index 634fe4de2a..3db1697f4f 100644
--- a/sysdeps/gnu/configure.ac
+++ b/sysdeps/gnu/configure.ac
@@ -21,6 +21,6 @@ case "$prefix" in
@@ -38,5 +38,5 @@ index 634fe4d..3db1697 100644
;;
esac
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
index d14a6d4cd5..0a602bb38c 100644
--- a/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
+++ b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
-From 9fec083dc99d2b524090e1d098e03709eed64a72 Mon Sep 17 00:00:00 2001
+From b84999dcf642b07e6c14e6ff507be14743349949 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:28:41 +0000
-Subject: [PATCH 14/25] Add unused attribute
+Subject: [PATCH 14/28] Add unused attribute
Helps in avoiding gcc warning when header is is included in
a source file which does not use both functions
@@ -17,7 +17,7 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h
-index 95cbce7..191a0dd 100644
+index 91e0ad3141..2e9549fe49 100644
--- a/iconv/gconv_charset.h
+++ b/iconv/gconv_charset.h
@@ -21,7 +21,7 @@
@@ -30,5 +30,5 @@ index 95cbce7..191a0dd 100644
{
int slash_count = 0;
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch b/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
index 8ceccec419..dd6562a631 100644
--- a/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
+++ b/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
@@ -1,7 +1,7 @@
-From 1794a97cba0b09b726eebc565c783c7b7c22dfba Mon Sep 17 00:00:00 2001
+From 7c57f84bef4aaffe4204a7a354411ab3ea7e5273 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:31:06 +0000
-Subject: [PATCH 15/25] 'yes' within the path sets wrong config variables
+Subject: [PATCH 15/28] 'yes' within the path sets wrong config variables
It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
but being such a short word to grep it is likely to produce
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
-index 5bd355a..3bc5537 100644
+index 5bd355a691..3bc5537bc0 100644
--- a/sysdeps/aarch64/configure
+++ b/sysdeps/aarch64/configure
@@ -148,12 +148,12 @@ else
@@ -48,7 +48,7 @@ index 5bd355a..3bc5537 100644
else
libc_cv_aarch64_be=no
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
-index 7851dd4..6e92381 100644
+index 7851dd4dac..6e9238171f 100644
--- a/sysdeps/aarch64/configure.ac
+++ b/sysdeps/aarch64/configure.ac
@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
@@ -63,7 +63,7 @@ index 7851dd4..6e92381 100644
], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)])
if test $libc_cv_aarch64_be = yes; then
diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure
-index 431e843..e152461 100644
+index 431e843b2b..e152461138 100644
--- a/sysdeps/arm/configure
+++ b/sysdeps/arm/configure
@@ -151,12 +151,12 @@ else
@@ -82,7 +82,7 @@ index 431e843..e152461 100644
else
libc_cv_arm_pcs_vfp=no
diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac
-index 90cdd69..05a262b 100644
+index 90cdd69c75..05a262ba00 100644
--- a/sysdeps/arm/configure.ac
+++ b/sysdeps/arm/configure.ac
@@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN)
@@ -97,7 +97,7 @@ index 90cdd69..05a262b 100644
], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
if test $libc_cv_arm_pcs_vfp = yes; then
diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure
-index 4e13248..f14af95 100644
+index 4e13248c03..f14af952d0 100644
--- a/sysdeps/mips/configure
+++ b/sysdeps/mips/configure
@@ -143,11 +143,11 @@ else
@@ -115,7 +115,7 @@ index 4e13248..f14af95 100644
else
libc_cv_mips_nan2008=no
diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac
-index bcbdaff..ad3057f 100644
+index bcbdaffd9f..ad3057f4cc 100644
--- a/sysdeps/mips/configure.ac
+++ b/sysdeps/mips/configure.ac
@@ -6,9 +6,9 @@ dnl position independent way.
@@ -131,7 +131,7 @@ index bcbdaff..ad3057f 100644
if test x$libc_cv_mips_nan2008 = xyes; then
AC_DEFINE(HAVE_MIPS_NAN2008)
diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure
-index 14c8a3a..dde3814 100644
+index 14c8a3a014..dde3814ef2 100644
--- a/sysdeps/nios2/configure
+++ b/sysdeps/nios2/configure
@@ -142,12 +142,12 @@ else
@@ -150,7 +150,7 @@ index 14c8a3a..dde3814 100644
else
libc_cv_nios2_be=no
diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac
-index f05f438..dc86399 100644
+index f05f43802b..dc8639902d 100644
--- a/sysdeps/nios2/configure.ac
+++ b/sysdeps/nios2/configure.ac
@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
@@ -165,7 +165,7 @@ index f05f438..dc86399 100644
], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
if test $libc_cv_nios2_be = yes; then
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
-index a5513fa..283b293 100644
+index 1ee7f41a36..77e38bebde 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -414,11 +414,11 @@ else
@@ -183,7 +183,7 @@ index a5513fa..283b293 100644
else
libc_cv_mips_nan2008=no
diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac
-index 9147aa4..7898e24 100644
+index 9147aa4582..7898e24738 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.ac
+++ b/sysdeps/unix/sysv/linux/mips/configure.ac
@@ -105,9 +105,9 @@ AC_COMPILE_IFELSE(
@@ -199,7 +199,7 @@ index 9147aa4..7898e24 100644
libc_mips_nan=
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-index af06970..27b8c1b 100644
+index ae7f254da4..874519000b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -155,12 +155,12 @@ else
@@ -233,7 +233,7 @@ index af06970..27b8c1b 100644
else
libc_cv_ppc64_def_call_elf=no
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
-index 0822915..9a32fdd 100644
+index f9cba6e15d..b21f72f1e4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
@@ -259,5 +259,5 @@ index 0822915..9a32fdd 100644
], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
if test $libc_cv_ppc64_def_call_elf = no; then
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
index e5b508330c..4d1cf31973 100644
--- a/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
+++ b/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
@@ -1,7 +1,7 @@
-From fdb5c9c88e3d1bc5ae6ef9ebcfcf560d3c42f0a6 Mon Sep 17 00:00:00 2001
+From a74f31ea9edf105f1a6dc26497aa2a12ae736660 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:33:03 +0000
-Subject: [PATCH 16/25] timezone: re-written tzselect as posix sh
+Subject: [PATCH 16/28] timezone: re-written tzselect as posix sh
To avoid the bash dependency.
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/timezone/Makefile b/timezone/Makefile
-index dee7568..66a50be 100644
+index 493deca790..36e559e16c 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
-@@ -120,7 +120,7 @@ $(testdata)/XT%: testdata/XT%
+@@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT%
cp $< $@
$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
@@ -28,10 +28,10 @@ index dee7568..66a50be 100644
-e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
-e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
-index 2c3b2f4..0c04a61 100755
+index 18fce27e24..70745f9d36 100755
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
-@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org
+@@ -34,7 +34,7 @@ REPORT_BUGS_TO=tz@iana.org
# Specify default values for environment variables if they are unset.
: ${AWK=awk}
@@ -41,5 +41,5 @@ index 2c3b2f4..0c04a61 100755
# Output one argument as-is to standard output.
# Safer than 'echo', which can mishandle '\' or leading '-'.
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch b/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
index c8da05dc6e..e4f8a135d3 100644
--- a/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
+++ b/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
@@ -1,21 +1,21 @@
-From 88ad88d014a5ee68b0e044d2def5ab13743c8ae0 Mon Sep 17 00:00:00 2001
+From 95882b9864ff20e476d15c6825c83728eb99597f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:33:02 -0800
-Subject: [PATCH 17/25] Remove bash dependency for nscd init script
+Subject: [PATCH 17/28] Remove bash dependency for nscd init script
The nscd init script uses #! /bin/bash but only really uses one bashism
(translated strings), so remove them and switch the shell to #!/bin/sh.
+Upstream-Status: Pending
+
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Pending
-
nscd/nscd.init | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/nscd/nscd.init b/nscd/nscd.init
-index a882da7..b02986e 100644
+index a882da7d8b..b02986ec15 100644
--- a/nscd/nscd.init
+++ b/nscd/nscd.init
@@ -1,4 +1,4 @@
@@ -71,5 +71,5 @@ index a882da7..b02986e 100644
;;
esac
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
index 1750765247..b5efc43042 100644
--- a/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
+++ b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,22 +1,22 @@
-From 49c0ad7dc2e02e808ed150296a109b586c34115a Mon Sep 17 00:00:00 2001
+From 6b603d25cc5723ba631dfc60b544774db1147d81 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:42:58 +0000
-Subject: [PATCH 18/25] eglibc: Cross building and testing instructions
+Subject: [PATCH 18/28] eglibc: Cross building and testing instructions
Ported from eglibc
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++++++++++
- GLIBC.cross-testing | 205 +++++++++++++++++++++++++++
+ GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++
+ GLIBC.cross-testing | 205 +++++++++++++++++++++++
2 files changed, 588 insertions(+)
create mode 100644 GLIBC.cross-building
create mode 100644 GLIBC.cross-testing
diff --git a/GLIBC.cross-building b/GLIBC.cross-building
new file mode 100644
-index 0000000..e6e0da1
+index 0000000000..e6e0da1aaf
--- /dev/null
+++ b/GLIBC.cross-building
@@ -0,0 +1,383 @@
@@ -405,7 +405,7 @@ index 0000000..e6e0da1
+ Hello, C++ world!
diff --git a/GLIBC.cross-testing b/GLIBC.cross-testing
new file mode 100644
-index 0000000..b67b468
+index 0000000000..b67b468466
--- /dev/null
+++ b/GLIBC.cross-testing
@@ -0,0 +1,205 @@
@@ -615,5 +615,5 @@ index 0000000..b67b468
+ simply place copies of these libraries in the top GLIBC build
+ directory.
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch b/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
index f983d86a90..0333db2814 100644
--- a/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
+++ b/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -1,7 +1,7 @@
-From e881face7a10354612bf634b44e09e3bc6462c67 Mon Sep 17 00:00:00 2001
+From 2864aaae984d945445f3f79869c703e0b791df88 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:49:28 +0000
-Subject: [PATCH 19/25] eglibc: Help bootstrap cross toolchain
+Subject: [PATCH 19/28] eglibc: Help bootstrap cross toolchain
Taken from EGLIBC, r1484 + r1525
@@ -29,10 +29,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
create mode 100644 include/stubs-bootstrap.h
diff --git a/Makefile b/Makefile
-index 32748b3..6d055ba 100644
+index 9fbf705200..64bfd455bc 100644
--- a/Makefile
+++ b/Makefile
-@@ -69,9 +69,18 @@ subdir-dirs = include
+@@ -70,9 +70,18 @@ subdir-dirs = include
vpath %.h $(subdir-dirs)
# What to install.
@@ -52,7 +52,7 @@ index 32748b3..6d055ba 100644
ifeq (yes,$(build-shared))
headers += gnu/lib-names.h
endif
-@@ -151,6 +160,16 @@ others: $(common-objpfx)testrun.sh
+@@ -196,6 +205,16 @@ others: $(common-objpfx)testrun.sh
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
@@ -69,7 +69,7 @@ index 32748b3..6d055ba 100644
ifndef abi-variants
installed-stubs = $(inst_includedir)/gnu/stubs.h
else
-@@ -177,6 +196,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
+@@ -222,6 +241,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
install-others-nosubdir: $(installed-stubs)
endif
@@ -79,7 +79,7 @@ index 32748b3..6d055ba 100644
# Since stubs.h is never needed when building the library, we simplify the
diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h
new file mode 100644
-index 0000000..1d2b669
+index 0000000000..1d2b669aff
--- /dev/null
+++ b/include/stubs-bootstrap.h
@@ -0,0 +1,12 @@
@@ -96,5 +96,5 @@ index 0000000..1d2b669
+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
+ an empty stubs.h like this will do fine for GCC. */
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch b/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch
new file mode 100644
index 0000000000..965ad6578e
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch
@@ -0,0 +1,83 @@
+From e2667086bf984de4d3f1226b9467761cd5a4c39f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 15:15:09 -0800
+Subject: [PATCH 20/28] eglibc: Clear cache lines on ppc8xx
+
+2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
+ Mark Shinwell <shinwell@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/libc-start.c
+ (__libc_start_main): Detect 8xx parts and clear
+ __cache_line_size if detected.
+ * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+ (DL_PLATFORM_AUXV): Likewise.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 14 +++++++++++++-
+ sysdeps/unix/sysv/linux/powerpc/libc-start.c | 16 +++++++++++++++-
+ 2 files changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+index b04ecc4a4c..75bda97241 100644
+--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
++++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
+ /* Scan the Aux Vector for the "Data Cache Block Size" entry. If found
+ verify that the static extern __cache_line_size is defined by checking
+ for not NULL. If it is defined then assign the cache block size
+- value to __cache_line_size. */
++ value to __cache_line_size. This is used by memset to
++ optimize setting to zero. We have to detect 8xx processors, which
++ have buggy dcbz implementations that cannot report page faults
++ correctly. That requires reading SPR, which is a privileged
++ operation. Fortunately 2.2.18 and later emulates PowerPC mfspr
++ reads from the PVR register. */
+ #define DL_PLATFORM_AUXV \
+ case AT_DCACHEBSIZE: \
++ if (__LINUX_KERNEL_VERSION >= 0x020218) \
++ { \
++ unsigned pvr = 0; \
++ asm ("mfspr %0, 287" : "=r" (pvr)); \
++ if ((pvr & 0xffff0000) == 0x00500000) \
++ break; \
++ } \
+ __cache_line_size = av->a_un.a_val; \
+ break;
+
+diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+index 4fd5f70700..1a21e4675c 100644
+--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
++++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv,
+
+ /* Initialize the __cache_line_size variable from the aux vector. For the
+ static case, we also need _dl_hwcap, _dl_hwcap2 and _dl_platform, so we
+- can call __tcb_parse_hwcap_and_convert_at_platform (). */
++ can call __tcb_parse_hwcap_and_convert_at_platform ().
++
++ This is used by memset to optimize setting to zero. We have to
++ detect 8xx processors, which have buggy dcbz implementations that
++ cannot report page faults correctly. That requires reading SPR,
++ which is a privileged operation. Fortunately 2.2.18 and later
++ emulates PowerPC mfspr reads from the PVR register. */
+ for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av)
+ switch (av->a_type)
+ {
+ case AT_DCACHEBSIZE:
++ if (__LINUX_KERNEL_VERSION >= 0x020218)
++ {
++ unsigned pvr = 0;
++
++ asm ("mfspr %0, 287" : "=r" (pvr) :);
++ if ((pvr & 0xffff0000) == 0x00500000)
++ break;
++ }
+ __cache_line_size = av->a_un.a_val;
+ break;
+ #ifndef SHARED
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch b/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
deleted file mode 100644
index 30c4c69877..0000000000
--- a/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 723a31d3e2627211b39fbcc08f75b3c23c4096c5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 15:10:33 -0800
-Subject: [PATCH 20/25] eglibc: cherry-picked from
-
-http://www.eglibc.org/archives/patches/msg00772.html
-
-Not yet merged into glibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- resolv/res_libc.c | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/resolv/res_libc.c b/resolv/res_libc.c
-index a4b376f..3256e12 100644
---- a/resolv/res_libc.c
-+++ b/resolv/res_libc.c
-@@ -21,11 +21,13 @@
- #include <atomic.h>
- #include <limits.h>
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <netinet/in.h>
- #include <arpa/nameser.h>
- #include <resolv.h>
- #include <libc-lock.h>
-
-+__libc_lock_define_initialized (static, lock);
- extern unsigned long long int __res_initstamp attribute_hidden;
- /* We have atomic increment operations on 64-bit platforms. */
- #if __WORDSIZE == 64
-@@ -33,7 +35,6 @@ extern unsigned long long int __res_initstamp attribute_hidden;
- # define atomicincunlock(lock) (void) 0
- # define atomicinc(var) catomic_increment (&(var))
- #else
--__libc_lock_define_initialized (static, lock);
- # define atomicinclock(lock) __libc_lock_lock (lock)
- # define atomicincunlock(lock) __libc_lock_unlock (lock)
- # define atomicinc(var) ++var
-@@ -92,7 +93,18 @@ res_init(void) {
- int
- __res_maybe_init (res_state resp, int preinit)
- {
-+ static time_t last_mtime;
-+ struct stat statbuf;
-+ int ret;
-+
- if (resp->options & RES_INIT) {
-+ ret = stat (_PATH_RESCONF, &statbuf);
-+ __libc_lock_lock (lock);
-+ if ((ret == 0) && (last_mtime != statbuf.st_mtime)) {
-+ last_mtime = statbuf.st_mtime;
-+ atomicinc (__res_initstamp);
-+ }
-+ __libc_lock_unlock (lock);
- if (__res_initstamp != resp->_u._ext.initstamp) {
- if (resp->nscount > 0)
- __res_iclose (resp, true);
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch b/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
deleted file mode 100644
index 8931c9e250..0000000000
--- a/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 9699873820d0347c2f377f0d86bce615d87a5e47 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 15:15:09 -0800
-Subject: [PATCH 21/25] eglibc: Clear cache lines on ppc8xx
-
-2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
- Mark Shinwell <shinwell@codesourcery.com>
-
- * sysdeps/unix/sysv/linux/powerpc/libc-start.c
- (__libc_start_main): Detect 8xx parts and clear
- __cache_line_size if detected.
- * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
- (DL_PLATFORM_AUXV): Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 14 +++++++++++++-
- sysdeps/unix/sysv/linux/powerpc/libc-start.c | 16 +++++++++++++++-
- 2 files changed, 28 insertions(+), 2 deletions(-)
-
-diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-index 98ec2b3..b384ae0 100644
---- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
- /* Scan the Aux Vector for the "Data Cache Block Size" entry. If found
- verify that the static extern __cache_line_size is defined by checking
- for not NULL. If it is defined then assign the cache block size
-- value to __cache_line_size. */
-+ value to __cache_line_size. This is used by memset to
-+ optimize setting to zero. We have to detect 8xx processors, which
-+ have buggy dcbz implementations that cannot report page faults
-+ correctly. That requires reading SPR, which is a privileged
-+ operation. Fortunately 2.2.18 and later emulates PowerPC mfspr
-+ reads from the PVR register. */
- #define DL_PLATFORM_AUXV \
- case AT_DCACHEBSIZE: \
-+ if (__LINUX_KERNEL_VERSION >= 0x020218) \
-+ { \
-+ unsigned pvr = 0; \
-+ asm ("mfspr %0, 287" : "=r" (pvr)); \
-+ if ((pvr & 0xffff0000) == 0x00500000) \
-+ break; \
-+ } \
- __cache_line_size = av->a_un.a_val; \
- break;
-
-diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-index 0efd297..8cc0ef8 100644
---- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv,
-
- /* Initialize the __cache_line_size variable from the aux vector. For the
- static case, we also need _dl_hwcap, _dl_hwcap2 and _dl_platform, so we
-- can call __tcb_parse_hwcap_and_convert_at_platform (). */
-+ can call __tcb_parse_hwcap_and_convert_at_platform ().
-+
-+ This is used by memset to optimize setting to zero. We have to
-+ detect 8xx processors, which have buggy dcbz implementations that
-+ cannot report page faults correctly. That requires reading SPR,
-+ which is a privileged operation. Fortunately 2.2.18 and later
-+ emulates PowerPC mfspr reads from the PVR register. */
- for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av)
- switch (av->a_type)
- {
- case AT_DCACHEBSIZE:
-+ if (__LINUX_KERNEL_VERSION >= 0x020218)
-+ {
-+ unsigned pvr = 0;
-+
-+ asm ("mfspr %0, 287" : "=r" (pvr) :);
-+ if ((pvr & 0xffff0000) == 0x00500000)
-+ break;
-+ }
- __cache_line_size = av->a_un.a_val;
- break;
- #ifndef SHARED
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch b/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch
new file mode 100644
index 0000000000..76551cf559
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch
@@ -0,0 +1,56 @@
+From b7290e54a1bda7a0212131655bc27926fc22de22 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:55:53 +0000
+Subject: [PATCH 21/28] eglibc: Resolve __fpscr_values on SH4
+
+2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+ Andrew Stubbs <ams@codesourcery.com>
+
+ Resolve SH's __fpscr_values to symbol in libc.so.
+
+ * sysdeps/sh/sh4/fpu/fpu_control.h: Add C++ __set_fpscr prototype.
+ * sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.2): Add __fpscr_values.
+ * sysdeps/unix/sysv/linux/sh/sysdep.S (___fpscr_values): New constant.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/unix/sysv/linux/sh/Versions | 1 +
+ sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
+index e0938c4165..ca1d7da339 100644
+--- a/sysdeps/unix/sysv/linux/sh/Versions
++++ b/sysdeps/unix/sysv/linux/sh/Versions
+@@ -2,6 +2,7 @@ libc {
+ GLIBC_2.2 {
+ # functions used in other libraries
+ __xstat64; __fxstat64; __lxstat64;
++ __fpscr_values;
+
+ # a*
+ alphasort64;
+diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
+index 6ce36d6dd5..425811cc77 100644
+--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
++++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
+@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
+
+ #define __syscall_error __syscall_error_1
+ #include <sysdeps/unix/sh/sysdep.S>
++
++ .data
++ .align 3
++ .globl ___fpscr_values
++ .type ___fpscr_values, @object
++ .size ___fpscr_values, 8
++___fpscr_values:
++ .long 0
++ .long 0x80000
++weak_alias (___fpscr_values, __fpscr_values)
++
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
new file mode 100644
index 0000000000..c46021a478
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -0,0 +1,566 @@
+From be382b4e0c6de52573f7e037f2d4ff9b1b5bbb6b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 01:33:49 +0000
+Subject: [PATCH 22/28] eglibc: Forward port cross locale generation support
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/Makefile | 3 +-
+ locale/catnames.c | 48 ++++++++++++++++++++++++++++
+ locale/localeinfo.h | 2 +-
+ locale/programs/charmap-dir.c | 6 ++++
+ locale/programs/ld-collate.c | 17 +++++-----
+ locale/programs/ld-ctype.c | 27 ++++++++--------
+ locale/programs/ld-time.c | 31 ++++++++++++------
+ locale/programs/linereader.c | 2 +-
+ locale/programs/localedef.c | 8 +++++
+ locale/programs/locfile.c | 5 ++-
+ locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++--
+ locale/setlocale.c | 30 ------------------
+ 12 files changed, 169 insertions(+), 69 deletions(-)
+ create mode 100644 locale/catnames.c
+
+diff --git a/locale/Makefile b/locale/Makefile
+index d78cf9b83a..e166f5252e 100644
+--- a/locale/Makefile
++++ b/locale/Makefile
+@@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \
+ bits/types/locale_t.h bits/types/__locale_t.h
+ routines = setlocale findlocale loadlocale loadarchive \
+ localeconv nl_langinfo nl_langinfo_l mb_cur_max \
+- newlocale duplocale freelocale uselocale
++ newlocale duplocale freelocale uselocale \
++ catnames
+ tests = tst-C-locale tst-locname tst-duplocale
+ categories = ctype messages monetary numeric time paper name \
+ address telephone measurement identification collate
+diff --git a/locale/catnames.c b/locale/catnames.c
+new file mode 100644
+index 0000000000..9fad357db1
+--- /dev/null
++++ b/locale/catnames.c
+@@ -0,0 +1,48 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include "localeinfo.h"
++
++/* Define an array of category names (also the environment variable names). */
++const union catnamestr_t _nl_category_names attribute_hidden =
++ {
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ category_name,
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ }
++ };
++
++const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ };
++
++/* An array of their lengths, for convenience. */
++const uint8_t _nl_category_name_sizes[] attribute_hidden =
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ [category] = sizeof (category_name) - 1,
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ [LC_ALL] = sizeof ("LC_ALL") - 1
++ };
+diff --git a/locale/localeinfo.h b/locale/localeinfo.h
+index 53cb8bfc59..92c466200c 100644
+--- a/locale/localeinfo.h
++++ b/locale/localeinfo.h
+@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
+ unused. We can manage this playing some tricks with weak references.
+ But with thread-local locale settings, it becomes quite ungainly unless
+ we can use __thread variables. So only in that case do we attempt this. */
+-#ifndef SHARED
++#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF
+ # include <tls.h>
+ # define NL_CURRENT_INDIRECT 1
+ #endif
+diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
+index 94c122df68..80e53e12c8 100644
+--- a/locale/programs/charmap-dir.c
++++ b/locale/programs/charmap-dir.c
+@@ -18,7 +18,9 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <libintl.h>
++#ifndef NO_UNCOMPRESS
+ #include <spawn.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -154,6 +156,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
+ return closedir (dir);
+ }
+
++#ifndef NO_UNCOMPRESS
+ /* Creates a subprocess decompressing the given pathname, and returns
+ a stream reading its output (the decompressed data). */
+ static
+@@ -202,6 +205,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
+ }
+ return NULL;
+ }
++#endif
+
+ /* Opens a charmap for reading, given its name (not an alias name). */
+ FILE *
+@@ -224,6 +228,7 @@ charmap_open (const char *directory, const char *name)
+ if (stream != NULL)
+ return stream;
+
++#ifndef NO_UNCOMPRESS
+ memcpy (p, ".gz", 4);
+ stream = fopen_uncompressed (pathname, "gzip");
+ if (stream != NULL)
+@@ -233,6 +238,7 @@ charmap_open (const char *directory, const char *name)
+ stream = fopen_uncompressed (pathname, "bzip2");
+ if (stream != NULL)
+ return stream;
++#endif
+
+ return NULL;
+ }
+diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
+index 6baab6cfb0..b12a2fceab 100644
+--- a/locale/programs/ld-collate.c
++++ b/locale/programs/ld-collate.c
+@@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
+ }
+ if (wcs != NULL)
+ {
+- size_t nwcs = wcslen ((wchar_t *) wcs);
++ size_t nwcs = wcslen_uint32 (wcs);
+ uint32_t zero = 0;
+ /* Handle <U0000> as a single character. */
+ if (nwcs == 0)
+@@ -1772,8 +1772,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
+
+ if ((*eptr)->nwcs == runp->nwcs)
+ {
+- int c = wmemcmp ((wchar_t *) (*eptr)->wcs,
+- (wchar_t *) runp->wcs, runp->nwcs);
++ int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs);
+
+ if (c == 0)
+ {
+@@ -2000,9 +1999,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+ one consecutive entry. */
+ if (runp->wcnext != NULL
+ && runp->nwcs == runp->wcnext->nwcs
+- && wmemcmp ((wchar_t *) runp->wcs,
+- (wchar_t *)runp->wcnext->wcs,
+- runp->nwcs - 1) == 0
++ && wmemcmp_uint32 (runp->wcs,
++ runp->wcnext->wcs,
++ runp->nwcs - 1) == 0
+ && (runp->wcs[runp->nwcs - 1]
+ == runp->wcnext->wcs[runp->nwcs - 1] + 1))
+ {
+@@ -2026,9 +2025,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+ runp = runp->wcnext;
+ while (runp->wcnext != NULL
+ && runp->nwcs == runp->wcnext->nwcs
+- && wmemcmp ((wchar_t *) runp->wcs,
+- (wchar_t *)runp->wcnext->wcs,
+- runp->nwcs - 1) == 0
++ && wmemcmp_uint32 (runp->wcs,
++ runp->wcnext->wcs,
++ runp->nwcs - 1) == 0
+ && (runp->wcs[runp->nwcs - 1]
+ == runp->wcnext->wcs[runp->nwcs - 1] + 1));
+
+diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
+index cfc9c43fd5..6572cc199c 100644
+--- a/locale/programs/ld-ctype.c
++++ b/locale/programs/ld-ctype.c
+@@ -915,7 +915,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
+ allocate_arrays (ctype, charmap, ctype->repertoire);
+
+ default_missing_len = (ctype->default_missing
+- ? wcslen ((wchar_t *) ctype->default_missing)
++ ? wcslen_uint32 (ctype->default_missing)
+ : 0);
+
+ init_locale_data (&file, nelems);
+@@ -1927,7 +1927,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
+ ignore = 1;
+ else
+ /* This value is usable. */
+- obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4);
++ obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4);
+
+ first = 0;
+ }
+@@ -2461,8 +2461,8 @@ with character code range values one must use the absolute ellipsis `...'"));
+ }
+
+ handle_tok_digit:
+- class_bit = _ISwdigit;
+- class256_bit = _ISdigit;
++ class_bit = BITw (tok_digit);
++ class256_bit = BIT (tok_digit);
+ handle_digits = 1;
+ goto read_charclass;
+
+@@ -3904,8 +3904,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+
+ while (idx < number)
+ {
+- int res = wcscmp ((const wchar_t *) sorted[idx]->from,
+- (const wchar_t *) runp->from);
++ int res = wcscmp_uint32 (sorted[idx]->from, runp->from);
+ if (res == 0)
+ {
+ replace = 1;
+@@ -3942,11 +3941,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+ for (size_t cnt = 0; cnt < number; ++cnt)
+ {
+ struct translit_to_t *srunp;
+- from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
++ from_len += wcslen_uint32 (sorted[cnt]->from) + 1;
+ srunp = sorted[cnt]->to;
+ while (srunp != NULL)
+ {
+- to_len += wcslen ((const wchar_t *) srunp->str) + 1;
++ to_len += wcslen_uint32 (srunp->str) + 1;
+ srunp = srunp->next;
+ }
+ /* Plus one for the extra NUL character marking the end of
+@@ -3970,18 +3969,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+ ctype->translit_from_idx[cnt] = from_len;
+ ctype->translit_to_idx[cnt] = to_len;
+
+- len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
+- wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len],
+- (const wchar_t *) sorted[cnt]->from, len);
++ len = wcslen_uint32 (sorted[cnt]->from) + 1;
++ wmemcpy_uint32 (&ctype->translit_from_tbl[from_len],
++ sorted[cnt]->from, len);
+ from_len += len;
+
+ ctype->translit_to_idx[cnt] = to_len;
+ srunp = sorted[cnt]->to;
+ while (srunp != NULL)
+ {
+- len = wcslen ((const wchar_t *) srunp->str) + 1;
+- wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len],
+- (const wchar_t *) srunp->str, len);
++ len = wcslen_uint32 (srunp->str) + 1;
++ wmemcpy_uint32 (&ctype->translit_to_tbl[to_len],
++ srunp->str, len);
+ to_len += len;
+ srunp = srunp->next;
+ }
+diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
+index 8e9849fdba..028d3efa9f 100644
+--- a/locale/programs/ld-time.c
++++ b/locale/programs/ld-time.c
+@@ -220,8 +220,10 @@ No definition for %s category found"), "LC_TIME");
+ }
+ else
+ {
++ static const uint32_t wt_fmt_ampm[]
++ = { '%','I',':','%','M',':','%','S',' ','%','p',0 };
+ time->t_fmt_ampm = "%I:%M:%S %p";
+- time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p";
++ time->wt_fmt_ampm = wt_fmt_ampm;
+ }
+ }
+
+@@ -231,7 +233,7 @@ No definition for %s category found"), "LC_TIME");
+ const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
+ 31, 31, 30, 31 ,30, 31 };
+ size_t idx;
+- wchar_t *wstr;
++ uint32_t *wstr;
+
+ time->era_entries =
+ (struct era_data *) xmalloc (time->num_era
+@@ -457,18 +459,18 @@ No definition for %s category found"), "LC_TIME");
+ }
+
+ /* Now generate the wide character name and format. */
+- wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */
++ wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */
+ if (wstr != NULL)
+ {
+- time->era_entries[idx].wname = (uint32_t *) wstr + 1;
+- wstr = wcschr (wstr + 1, L':'); /* end name */
++ time->era_entries[idx].wname = wstr + 1;
++ wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */
+ if (wstr != NULL)
+ {
+ *wstr = L'\0';
+- time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
++ time->era_entries[idx].wformat = wstr + 1;
+ }
+ else
+ time->era_entries[idx].wname =
+@@ -527,7 +529,16 @@ No definition for %s category found"), "LC_TIME");
+ if (time->date_fmt == NULL)
+ time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
+ if (time->wdate_fmt == NULL)
+- time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
++ {
++ static const uint32_t wdate_fmt[] =
++ { '%','a',' ',
++ '%','b',' ',
++ '%','e',' ',
++ '%','H',':','%','M',':','%','S',' ',
++ '%','Z',' ',
++ '%','Y',0 };
++ time->wdate_fmt = wdate_fmt;
++ }
+ }
+
+
+diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
+index ed3a9731d0..3178ea057a 100644
+--- a/locale/programs/linereader.c
++++ b/locale/programs/linereader.c
+@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
+ {
+ int return_widestr = lr->return_widestr;
+ char *buf;
+- wchar_t *buf2 = NULL;
++ uint32_t *buf2 = NULL;
+ size_t bufact;
+ size_t bufmax = 56;
+
+diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
+index b7bcef8248..efeced1e0f 100644
+--- a/locale/programs/localedef.c
++++ b/locale/programs/localedef.c
+@@ -109,6 +109,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
+ #define OPT_NO_WARN 402
+ #define OPT_WARN 403
+ #define OPT_NO_HARD_LINKS 404
++#define OPT_UINT32_ALIGN 405
+
+ /* Definitions of arguments for argp functions. */
+ static const struct argp_option options[] =
+@@ -153,6 +154,8 @@ static const struct argp_option options[] =
+ N_("Generate little-endian output") },
+ { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
+ N_("Generate big-endian output") },
++ { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0,
++ N_("Set the target's uint32_t alignment in bytes (default 4)") },
+ { NULL, 0, NULL, 0, NULL }
+ };
+
+@@ -242,12 +245,14 @@ main (int argc, char *argv[])
+ ctype locale. (P1003.2 4.35.5.2) */
+ setlocale (LC_CTYPE, "POSIX");
+
++#ifndef NO_SYSCONF
+ /* Look whether the system really allows locale definitions. POSIX
+ defines error code 3 for this situation so I think it must be
+ a fatal error (see P1003.2 4.35.8). */
+ if (sysconf (_SC_2_LOCALEDEF) < 0)
+ record_error (3, 0, _("\
+ FATAL: system does not define `_POSIX2_LOCALEDEF'"));
++#endif
+
+ /* Process charmap file. */
+ charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
+@@ -399,6 +404,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+ /* Do not hard link to other locales. */
+ hard_links = false;
+ break;
++ case OPT_UINT32_ALIGN:
++ uint32_align_mask = strtol (arg, NULL, 0) - 1;
++ break;
+ case 'c':
+ force_output = 1;
+ break;
+diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
+index e4ba48e968..e7b0efe887 100644
+--- a/locale/programs/locfile.c
++++ b/locale/programs/locfile.c
+@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
+ machine running localedef. */
+ bool swap_endianness_p;
+
++/* The target's value of __align__(uint32_t) - 1. */
++unsigned int uint32_align_mask = 3;
++
+ /* When called outside a start_locale_structure/end_locale_structure
+ or start_locale_prelude/end_locale_prelude block, record that the
+ next byte in FILE's obstack will be the first byte of a new element.
+@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string)
+ void
+ add_locale_wstring (struct locale_file *file, const uint32_t *string)
+ {
+- add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1);
++ add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1);
+ }
+
+ /* Record that FILE's next element is the 32-bit integer VALUE. */
+diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
+index c063fc097d..4e7465e55a 100644
+--- a/locale/programs/locfile.h
++++ b/locale/programs/locfile.h
+@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
+
+ extern bool swap_endianness_p;
+
++extern unsigned int uint32_align_mask;
++
+ /* Change the output to be big-endian if BIG_ENDIAN is true and
+ little-endian otherwise. */
+ static inline void
+@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value)
+ }
+
+ /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */
+-static inline void
++static void
++__attribute__ ((unused))
+ maybe_swap_uint32_array (uint32_t *array, size_t n)
+ {
+ if (swap_endianness_p)
+@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n)
+
+ /* Like maybe_swap_uint32_array, but the array of N elements is at
+ the end of OBSTACK's current object. */
+-static inline void
++static void
++__attribute__ ((unused))
+ maybe_swap_uint32_obstack (struct obstack *obstack, size_t n)
+ {
+ maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n);
+@@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale,
+ const struct charmap_t *charmap,
+ const char *output_path);
+
++static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused));
++static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
++static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused));
++static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused));
++static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
++
++static size_t
++wcslen_uint32 (const uint32_t *str)
++{
++ size_t len = 0;
++ while (str[len] != 0)
++ len++;
++ return len;
++}
++
++static int
++wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n)
++{
++ while (n-- != 0)
++ {
++ int diff = *s1++ - *s2++;
++ if (diff != 0)
++ return diff;
++ }
++ return 0;
++}
++
++static int
++wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2)
++{
++ while (*s1 != 0 && *s1 == *s2)
++ s1++, s2++;
++ return *s1 - *s2;
++}
++
++static uint32_t *
++wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n)
++{
++ return memcpy (s1, s2, n * sizeof (uint32_t));
++}
++
++static uint32_t *
++wcschr_uint32 (const uint32_t *s, uint32_t ch)
++{
++ do
++ if (*s == ch)
++ return (uint32_t *) s;
++ while (*s++ != 0);
++ return 0;
++}
++
+ #endif /* locfile.h */
+diff --git a/locale/setlocale.c b/locale/setlocale.c
+index 9bd35454b9..2a67dc6589 100644
+--- a/locale/setlocale.c
++++ b/locale/setlocale.c
+@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
+ #endif
+
+
+-/* Define an array of category names (also the environment variable names). */
+-const union catnamestr_t _nl_category_names attribute_hidden =
+- {
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- category_name,
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- }
+- };
+-
+-const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- };
+-
+-/* An array of their lengths, for convenience. */
+-const uint8_t _nl_category_name_sizes[] attribute_hidden =
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- [category] = sizeof (category_name) - 1,
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- [LC_ALL] = sizeof ("LC_ALL") - 1
+- };
+-
+-
+ #ifdef NL_CURRENT_INDIRECT
+ # define WEAK_POSTLOAD(postload) weak_extern (postload)
+ #else
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch b/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
deleted file mode 100644
index f53f5ff87c..0000000000
--- a/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 8904f4249c930d187e19c7e9d3e73c835d11e18f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:55:53 +0000
-Subject: [PATCH 22/25] eglibc: Resolve __fpscr_values on SH4
-
-2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
- Andrew Stubbs <ams@codesourcery.com>
-
- Resolve SH's __fpscr_values to symbol in libc.so.
-
- * sysdeps/sh/sh4/fpu/fpu_control.h: Add C++ __set_fpscr prototype.
- * sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.2): Add __fpscr_values.
- * sysdeps/unix/sysv/linux/sh/sysdep.S (___fpscr_values): New constant.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/unix/sysv/linux/sh/Versions | 1 +
- sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++
- 2 files changed, 12 insertions(+)
-
-diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
-index e0938c4..ca1d7da 100644
---- a/sysdeps/unix/sysv/linux/sh/Versions
-+++ b/sysdeps/unix/sysv/linux/sh/Versions
-@@ -2,6 +2,7 @@ libc {
- GLIBC_2.2 {
- # functions used in other libraries
- __xstat64; __fxstat64; __lxstat64;
-+ __fpscr_values;
-
- # a*
- alphasort64;
-diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index 0024d79..d1db7e4 100644
---- a/sysdeps/unix/sysv/linux/sh/sysdep.S
-+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
-@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
-
- #define __syscall_error __syscall_error_1
- #include <sysdeps/unix/sh/sysdep.S>
-+
-+ .data
-+ .align 3
-+ .globl ___fpscr_values
-+ .type ___fpscr_values, @object
-+ .size ___fpscr_values, 8
-+___fpscr_values:
-+ .long 0
-+ .long 0x80000
-+weak_alias (___fpscr_values, __fpscr_values)
-+
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch b/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
new file mode 100644
index 0000000000..17667da99f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
@@ -0,0 +1,32 @@
+From afa8d6faeddeb80aca318b33edf49d9f8ce65761 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 20 Apr 2016 21:11:00 -0700
+Subject: [PATCH 23/28] Define DUMMY_LOCALE_T if not defined
+
+This is a hack to fix building the locale bits on an older
+CentOs 5.X machine
+
+Upstream-Status: Inappropriate [other]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/programs/config.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/locale/programs/config.h b/locale/programs/config.h
+index a1e6e0ec3c..7f75528eae 100644
+--- a/locale/programs/config.h
++++ b/locale/programs/config.h
+@@ -19,6 +19,9 @@
+ #ifndef _LD_CONFIG_H
+ #define _LD_CONFIG_H 1
+
++#ifndef DUMMY_LOCALE_T
++#define DUMMY_LOCALE_T
++#endif
+ /* Use the internal textdomain used for libc messages. */
+ #define PACKAGE _libc_intl_domainname
+ #ifndef VERSION
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch b/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
deleted file mode 100644
index f985f3ca14..0000000000
--- a/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 1947f211fab4001e84bb52868cddbd401e597889 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 01:57:01 +0000
-Subject: [PATCH 23/25] eglibc: Install PIC archives
-
-Forward port from eglibc
-
-2008-02-07 Joseph Myers <joseph@codesourcery.com>
-
- * Makerules (install-extras, install-map): New variables.
- (installed-libcs): Add libc_pic.a.
- (install-lib): Include _pic.a files for versioned shared
- libraries.
- (install-map-nosubdir, install-extras-nosubdir): Add rules for
- installing extra files.
- (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and
- install-extras-nosubdir.
-
-2008-04-01 Maxim Kuvyrkov <maxim@codesourcery.com>
-
- * Makerules (install-lib): Don't install libpthread_pic.a.
- (install-map): Don't install libpthread_pic.map.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makerules | 42 ++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 40 insertions(+), 2 deletions(-)
-
-diff --git a/Makerules b/Makerules
-index 53eabfa..1cd2a53 100644
---- a/Makerules
-+++ b/Makerules
-@@ -694,6 +694,9 @@ ifeq ($(build-shared),yes)
- $(common-objpfx)libc.so: $(common-objpfx)libc.map
- endif
- common-generated += libc.so libc_pic.os
-+ifndef subdir
-+install-extras := soinit.o sofini.o
-+endif
- ifdef libc.so-version
- $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
- $(make-link)
-@@ -936,6 +939,7 @@ endif
-
- install: check-install-supported
-
-+installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a
- install: $(installed-libcs)
- $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
- $(make-target-directory)
-@@ -964,6 +968,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
- install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
- install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
-
-+# Install the _pic.a files for versioned libraries, and corresponding
-+# .map files.
-+# libpthread_pic.a breaks mklibs, so don't install it and its map.
-+install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a)
-+install-lib := $(filter-out libpthread_pic.a,$(install-lib))
-+# Despite having a soname libhurduser and libmachuser do not use symbol
-+# versioning, so don't install the corresponding .map files.
-+ifeq ($(build-shared),yes)
-+install-map := $(patsubst %.so,%.map,\
-+ $(foreach L,$(install-lib.so-versioned),$(notdir $L)))
-+install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map))
-+ifndef subdir
-+install-map := $(install-map) libc.map
-+endif
-+endif
-+
- # For versioned libraries, we install three files:
- # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
- # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
-@@ -1206,9 +1226,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
- endif # headers-nonh
- endif # headers
-
-+ifdef install-map
-+$(addprefix $(inst_libdir)/,$(patsubst lib%.map,lib%_pic.map,$(install-map))): \
-+ $(inst_libdir)/lib%_pic.map: $(common-objpfx)lib%.map $(+force)
-+ $(do-install)
-+endif
-+
-+ifdef install-extras
-+$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \
-+ $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)%.os $(+force)
-+ $(do-install)
-+endif
-+
- .PHONY: install-bin-nosubdir install-bin-script-nosubdir \
- install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
-- install-data-nosubdir install-headers-nosubdir
-+ install-data-nosubdir install-headers-nosubdir install-map-nosubdir \
-+ install-extras-nosubdir
- install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
- install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
- install-rootsbin-nosubdir: \
-@@ -1221,6 +1254,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
- install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
- install-others-nosubdir: $(install-others)
- install-others-programs-nosubdir: $(install-others-programs)
-+install-map-nosubdir: $(addprefix $(inst_libdir)/,\
-+ $(patsubst lib%.map,lib%_pic.map,$(install-map)))
-+install-extras-nosubdir: $(addprefix $(inst_libdir)/libc_pic/,\
-+ $(install-extras))
-
- # We need all the `-nosubdir' targets so that `install' in the parent
- # doesn't depend on several things which each iterate over the subdirs.
-@@ -1230,7 +1267,8 @@ install-%:: install-%-nosubdir ;
-
- .PHONY: install install-no-libc.a-nosubdir
- install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
-- install-lib-nosubdir install-others-nosubdir
-+ install-lib-nosubdir install-others-nosubdir \
-+ install-map-nosubdir install-extras-nosubdir
- ifeq ($(build-programs),yes)
- install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
- install-rootsbin-nosubdir install-sbin-nosubdir \
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch b/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch
deleted file mode 100644
index c45b557ab7..0000000000
--- a/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch
+++ /dev/null
@@ -1,566 +0,0 @@
-From 11d7633178301add26a24657e2f1596a2f7dddce Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH 24/25] eglibc: Forward port cross locale generation support
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- locale/Makefile | 3 ++-
- locale/catnames.c | 48 +++++++++++++++++++++++++++++++++++
- locale/localeinfo.h | 2 +-
- locale/programs/charmap-dir.c | 6 +++++
- locale/programs/ld-collate.c | 17 ++++++-------
- locale/programs/ld-ctype.c | 27 ++++++++++----------
- locale/programs/ld-time.c | 31 +++++++++++++++--------
- locale/programs/linereader.c | 2 +-
- locale/programs/localedef.c | 8 ++++++
- locale/programs/locfile.c | 5 +++-
- locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++++++++++--
- locale/setlocale.c | 30 ----------------------
- 12 files changed, 169 insertions(+), 69 deletions(-)
- create mode 100644 locale/catnames.c
-
-diff --git a/locale/Makefile b/locale/Makefile
-index c5379e6..c98c675 100644
---- a/locale/Makefile
-+++ b/locale/Makefile
-@@ -25,7 +25,8 @@ include ../Makeconfig
- headers = locale.h bits/locale.h langinfo.h xlocale.h
- routines = setlocale findlocale loadlocale loadarchive \
- localeconv nl_langinfo nl_langinfo_l mb_cur_max \
-- newlocale duplocale freelocale uselocale
-+ newlocale duplocale freelocale uselocale \
-+ catnames
- tests = tst-C-locale tst-locname tst-duplocale
- categories = ctype messages monetary numeric time paper name \
- address telephone measurement identification collate
-diff --git a/locale/catnames.c b/locale/catnames.c
-new file mode 100644
-index 0000000..9fad357
---- /dev/null
-+++ b/locale/catnames.c
-@@ -0,0 +1,48 @@
-+/* Copyright (C) 2006 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include "localeinfo.h"
-+
-+/* Define an array of category names (also the environment variable names). */
-+const union catnamestr_t _nl_category_names attribute_hidden =
-+ {
-+ {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+ category_name,
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+ }
-+ };
-+
-+const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
-+ {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+ [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+ };
-+
-+/* An array of their lengths, for convenience. */
-+const uint8_t _nl_category_name_sizes[] attribute_hidden =
-+ {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+ [category] = sizeof (category_name) - 1,
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+ [LC_ALL] = sizeof ("LC_ALL") - 1
-+ };
-diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index 94627f3..d0db77b 100644
---- a/locale/localeinfo.h
-+++ b/locale/localeinfo.h
-@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE)
- unused. We can manage this playing some tricks with weak references.
- But with thread-local locale settings, it becomes quite ungainly unless
- we can use __thread variables. So only in that case do we attempt this. */
--#ifndef SHARED
-+#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF
- # include <tls.h>
- # define NL_CURRENT_INDIRECT 1
- #endif
-diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index 99fcd35..5e528dc 100644
---- a/locale/programs/charmap-dir.c
-+++ b/locale/programs/charmap-dir.c
-@@ -19,7 +19,9 @@
- #include <error.h>
- #include <fcntl.h>
- #include <libintl.h>
-+#ifndef NO_UNCOMPRESS
- #include <spawn.h>
-+#endif
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
- return closedir (dir);
- }
-
-+#ifndef NO_UNCOMPRESS
- /* Creates a subprocess decompressing the given pathname, and returns
- a stream reading its output (the decompressed data). */
- static
-@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
- }
- return NULL;
- }
-+#endif
-
- /* Opens a charmap for reading, given its name (not an alias name). */
- FILE *
-@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
- if (stream != NULL)
- return stream;
-
-+#ifndef NO_UNCOMPRESS
- memcpy (p, ".gz", 4);
- stream = fopen_uncompressed (pathname, "gzip");
- if (stream != NULL)
-@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
- stream = fopen_uncompressed (pathname, "bzip2");
- if (stream != NULL)
- return stream;
-+#endif
-
- return NULL;
- }
-diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index 1e125f6..3b2867f 100644
---- a/locale/programs/ld-collate.c
-+++ b/locale/programs/ld-collate.c
-@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
- }
- if (wcs != NULL)
- {
-- size_t nwcs = wcslen ((wchar_t *) wcs);
-+ size_t nwcs = wcslen_uint32 (wcs);
- uint32_t zero = 0;
- /* Handle <U0000> as a single character. */
- if (nwcs == 0)
-@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
-
- if ((*eptr)->nwcs == runp->nwcs)
- {
-- int c = wmemcmp ((wchar_t *) (*eptr)->wcs,
-- (wchar_t *) runp->wcs, runp->nwcs);
-+ int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs);
-
- if (c == 0)
- {
-@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
- one consecutive entry. */
- if (runp->wcnext != NULL
- && runp->nwcs == runp->wcnext->nwcs
-- && wmemcmp ((wchar_t *) runp->wcs,
-- (wchar_t *)runp->wcnext->wcs,
-- runp->nwcs - 1) == 0
-+ && wmemcmp_uint32 (runp->wcs,
-+ runp->wcnext->wcs,
-+ runp->nwcs - 1) == 0
- && (runp->wcs[runp->nwcs - 1]
- == runp->wcnext->wcs[runp->nwcs - 1] + 1))
- {
-@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
- runp = runp->wcnext;
- while (runp->wcnext != NULL
- && runp->nwcs == runp->wcnext->nwcs
-- && wmemcmp ((wchar_t *) runp->wcs,
-- (wchar_t *)runp->wcnext->wcs,
-- runp->nwcs - 1) == 0
-+ && wmemcmp_uint32 (runp->wcs,
-+ runp->wcnext->wcs,
-+ runp->nwcs - 1) == 0
- && (runp->wcs[runp->nwcs - 1]
- == runp->wcnext->wcs[runp->nwcs - 1] + 1));
-
-diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index 0fd141c..68136e6 100644
---- a/locale/programs/ld-ctype.c
-+++ b/locale/programs/ld-ctype.c
-@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
- allocate_arrays (ctype, charmap, ctype->repertoire);
-
- default_missing_len = (ctype->default_missing
-- ? wcslen ((wchar_t *) ctype->default_missing)
-+ ? wcslen_uint32 (ctype->default_missing)
- : 0);
-
- init_locale_data (&file, nelems);
-@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
- ignore = 1;
- else
- /* This value is usable. */
-- obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4);
-+ obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4);
-
- first = 0;
- }
-@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
- }
-
- handle_tok_digit:
-- class_bit = _ISwdigit;
-- class256_bit = _ISdigit;
-+ class_bit = BITw (tok_digit);
-+ class256_bit = BIT (tok_digit);
- handle_digits = 1;
- goto read_charclass;
-
-@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
-
- while (idx < number)
- {
-- int res = wcscmp ((const wchar_t *) sorted[idx]->from,
-- (const wchar_t *) runp->from);
-+ int res = wcscmp_uint32 (sorted[idx]->from, runp->from);
- if (res == 0)
- {
- replace = 1;
-@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
- for (size_t cnt = 0; cnt < number; ++cnt)
- {
- struct translit_to_t *srunp;
-- from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
-+ from_len += wcslen_uint32 (sorted[cnt]->from) + 1;
- srunp = sorted[cnt]->to;
- while (srunp != NULL)
- {
-- to_len += wcslen ((const wchar_t *) srunp->str) + 1;
-+ to_len += wcslen_uint32 (srunp->str) + 1;
- srunp = srunp->next;
- }
- /* Plus one for the extra NUL character marking the end of
-@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
- ctype->translit_from_idx[cnt] = from_len;
- ctype->translit_to_idx[cnt] = to_len;
-
-- len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
-- wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len],
-- (const wchar_t *) sorted[cnt]->from, len);
-+ len = wcslen_uint32 (sorted[cnt]->from) + 1;
-+ wmemcpy_uint32 (&ctype->translit_from_tbl[from_len],
-+ sorted[cnt]->from, len);
- from_len += len;
-
- ctype->translit_to_idx[cnt] = to_len;
- srunp = sorted[cnt]->to;
- while (srunp != NULL)
- {
-- len = wcslen ((const wchar_t *) srunp->str) + 1;
-- wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len],
-- (const wchar_t *) srunp->str, len);
-+ len = wcslen_uint32 (srunp->str) + 1;
-+ wmemcpy_uint32 (&ctype->translit_to_tbl[to_len],
-+ srunp->str, len);
- to_len += len;
- srunp = srunp->next;
- }
-diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index 87531bc..5f2c266 100644
---- a/locale/programs/ld-time.c
-+++ b/locale/programs/ld-time.c
-@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
- }
- else
- {
-+ static const uint32_t wt_fmt_ampm[]
-+ = { '%','I',':','%','M',':','%','S',' ','%','p',0 };
- time->t_fmt_ampm = "%I:%M:%S %p";
-- time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p";
-+ time->wt_fmt_ampm = wt_fmt_ampm;
- }
- }
-
-@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
- const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
- 31, 31, 30, 31 ,30, 31 };
- size_t idx;
-- wchar_t *wstr;
-+ uint32_t *wstr;
-
- time->era_entries =
- (struct era_data *) xmalloc (time->num_era
-@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
- }
-
- /* Now generate the wide character name and format. */
-- wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */
-- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */
-- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */
-- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */
-+ wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */
-+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */
-+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */
-+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */
- if (wstr != NULL)
- {
-- time->era_entries[idx].wname = (uint32_t *) wstr + 1;
-- wstr = wcschr (wstr + 1, L':'); /* end name */
-+ time->era_entries[idx].wname = wstr + 1;
-+ wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */
- if (wstr != NULL)
- {
- *wstr = L'\0';
-- time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
-+ time->era_entries[idx].wformat = wstr + 1;
- }
- else
- time->era_entries[idx].wname =
-@@ -534,7 +536,16 @@ No definition for %s category found"), "LC_TIME"));
- if (time->date_fmt == NULL)
- time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
- if (time->wdate_fmt == NULL)
-- time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
-+ {
-+ static const uint32_t wdate_fmt[] =
-+ { '%','a',' ',
-+ '%','b',' ',
-+ '%','e',' ',
-+ '%','H',':','%','M',':','%','S',' ',
-+ '%','Z',' ',
-+ '%','Y',0 };
-+ time->wdate_fmt = wdate_fmt;
-+ }
- }
-
-
-diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index b885f65..0afb631 100644
---- a/locale/programs/linereader.c
-+++ b/locale/programs/linereader.c
-@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
- {
- int return_widestr = lr->return_widestr;
- char *buf;
-- wchar_t *buf2 = NULL;
-+ uint32_t *buf2 = NULL;
- size_t bufact;
- size_t bufmax = 56;
-
-diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index 6becd9a..8ddd080 100644
---- a/locale/programs/localedef.c
-+++ b/locale/programs/localedef.c
-@@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
- #define OPT_LIST_ARCHIVE 309
- #define OPT_LITTLE_ENDIAN 400
- #define OPT_BIG_ENDIAN 401
-+#define OPT_UINT32_ALIGN 402
-
- /* Definitions of arguments for argp functions. */
- static const struct argp_option options[] =
-@@ -150,6 +151,8 @@ static const struct argp_option options[] =
- N_("Generate little-endian output") },
- { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
- N_("Generate big-endian output") },
-+ { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0,
-+ N_("Set the target's uint32_t alignment in bytes (default 4)") },
- { NULL, 0, NULL, 0, NULL }
- };
-
-@@ -239,12 +242,14 @@ main (int argc, char *argv[])
- ctype locale. (P1003.2 4.35.5.2) */
- setlocale (LC_CTYPE, "POSIX");
-
-+#ifndef NO_SYSCONF
- /* Look whether the system really allows locale definitions. POSIX
- defines error code 3 for this situation so I think it must be
- a fatal error (see P1003.2 4.35.8). */
- if (sysconf (_SC_2_LOCALEDEF) < 0)
- WITH_CUR_LOCALE (error (3, 0, _("\
- FATAL: system does not define `_POSIX2_LOCALEDEF'")));
-+#endif
-
- /* Process charmap file. */
- charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
- case OPT_BIG_ENDIAN:
- set_big_endian (true);
- break;
-+ case OPT_UINT32_ALIGN:
-+ uint32_align_mask = strtol (arg, NULL, 0) - 1;
-+ break;
- case 'c':
- force_output = 1;
- break;
-diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index 32f5cd2..02967b0 100644
---- a/locale/programs/locfile.c
-+++ b/locale/programs/locfile.c
-@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
- machine running localedef. */
- bool swap_endianness_p;
-
-+/* The target's value of __align__(uint32_t) - 1. */
-+unsigned int uint32_align_mask = 3;
-+
- /* When called outside a start_locale_structure/end_locale_structure
- or start_locale_prelude/end_locale_prelude block, record that the
- next byte in FILE's obstack will be the first byte of a new element.
-@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string)
- void
- add_locale_wstring (struct locale_file *file, const uint32_t *string)
- {
-- add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1);
-+ add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1);
- }
-
- /* Record that FILE's next element is the 32-bit integer VALUE. */
-diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
-index a3dd904..2c7763a 100644
---- a/locale/programs/locfile.h
-+++ b/locale/programs/locfile.h
-@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
-
- extern bool swap_endianness_p;
-
-+extern unsigned int uint32_align_mask;
-+
- /* Change the output to be big-endian if BIG_ENDIAN is true and
- little-endian otherwise. */
- static inline void
-@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value)
- }
-
- /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */
--static inline void
-+static void
-+__attribute__ ((unused))
- maybe_swap_uint32_array (uint32_t *array, size_t n)
- {
- if (swap_endianness_p)
-@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n)
-
- /* Like maybe_swap_uint32_array, but the array of N elements is at
- the end of OBSTACK's current object. */
--static inline void
-+static void
-+__attribute__ ((unused))
- maybe_swap_uint32_obstack (struct obstack *obstack, size_t n)
- {
- maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n);
-@@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale,
- const struct charmap_t *charmap,
- const char *output_path);
-
-+static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused));
-+static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
-+static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused));
-+static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused));
-+static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
-+
-+static size_t
-+wcslen_uint32 (const uint32_t *str)
-+{
-+ size_t len = 0;
-+ while (str[len] != 0)
-+ len++;
-+ return len;
-+}
-+
-+static int
-+wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n)
-+{
-+ while (n-- != 0)
-+ {
-+ int diff = *s1++ - *s2++;
-+ if (diff != 0)
-+ return diff;
-+ }
-+ return 0;
-+}
-+
-+static int
-+wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2)
-+{
-+ while (*s1 != 0 && *s1 == *s2)
-+ s1++, s2++;
-+ return *s1 - *s2;
-+}
-+
-+static uint32_t *
-+wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n)
-+{
-+ return memcpy (s1, s2, n * sizeof (uint32_t));
-+}
-+
-+static uint32_t *
-+wcschr_uint32 (const uint32_t *s, uint32_t ch)
-+{
-+ do
-+ if (*s == ch)
-+ return (uint32_t *) s;
-+ while (*s++ != 0);
-+ return 0;
-+}
-+
- #endif /* locfile.h */
-diff --git a/locale/setlocale.c b/locale/setlocale.c
-index 69b3141..1cef0be 100644
---- a/locale/setlocale.c
-+++ b/locale/setlocale.c
-@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
- #endif
-
-
--/* Define an array of category names (also the environment variable names). */
--const union catnamestr_t _nl_category_names attribute_hidden =
-- {
-- {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
-- category_name,
--#include "categories.def"
--#undef DEFINE_CATEGORY
-- }
-- };
--
--const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
-- {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
-- [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
--#include "categories.def"
--#undef DEFINE_CATEGORY
-- };
--
--/* An array of their lengths, for convenience. */
--const uint8_t _nl_category_name_sizes[] attribute_hidden =
-- {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
-- [category] = sizeof (category_name) - 1,
--#include "categories.def"
--#undef DEFINE_CATEGORY
-- [LC_ALL] = sizeof ("LC_ALL") - 1
-- };
--
--
- #ifdef NL_CURRENT_INDIRECT
- # define WEAK_POSTLOAD(postload) weak_extern (postload)
- #else
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch b/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
new file mode 100644
index 0000000000..f68e4f4fa6
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
@@ -0,0 +1,84 @@
+From c13e18adb634a6fd59129150ab7f9468f64dc931 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Aug 2018 09:42:06 -0700
+Subject: [PATCH 24/28] localedef --add-to-archive uses a hard-coded locale
+ path
+
+it doesn't exist in normal use, and there's no way to pass an
+alternative filename.
+
+Add a fallback of $LOCALEARCHIVE from the environment, and allow
+creation of new locale archives that are not the system archive.
+
+Upstream-Status: Inappropriate (OE-specific)
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/programs/locarchive.c | 35 +++++++++++++++++++++++++----------
+ 1 file changed, 25 insertions(+), 10 deletions(-)
+
+diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
+index e6310b18be..f54a76eade 100644
+--- a/locale/programs/locarchive.c
++++ b/locale/programs/locarchive.c
+@@ -340,12 +340,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
+ struct namehashent *oldnamehashtab;
+ struct locarhandle new_ah;
+ size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
+- char archivefname[prefix_len + sizeof (ARCHIVE_NAME)];
+- char fname[prefix_len + sizeof (ARCHIVE_NAME) + sizeof (".XXXXXX") - 1];
++ char *archivefname;
++ char *fname;
++ char *envarchive = getenv("LOCALEARCHIVE");
+
+- if (output_prefix)
+- memcpy (archivefname, output_prefix, prefix_len);
+- strcpy (archivefname + prefix_len, ARCHIVE_NAME);
++ if (envarchive != NULL)
++ {
++ archivefname = xmalloc(strlen(envarchive) + 1);
++ fname = xmalloc(strlen(envarchive) + sizeof (".XXXXXX"));
++ strcpy (archivefname, envarchive);
++ }
++ else
++ {
++ archivefname = xmalloc(prefix_len + sizeof (ARCHIVE_NAME));
++ fname = xmalloc(prefix_len + sizeof (ARCHIVE_NAME) + sizeof (".XXXXXX") - 1);
++ if (output_prefix)
++ memcpy (archivefname, output_prefix, prefix_len);
++ strcpy (archivefname + prefix_len, ARCHIVE_NAME);
++ }
+ strcpy (stpcpy (fname, archivefname), ".XXXXXX");
+
+ /* Not all of the old file has to be mapped. Change this now this
+@@ -569,10 +581,13 @@ open_archive (struct locarhandle *ah, bool readonly)
+ /* If ah has a non-NULL fname open that otherwise open the default. */
+ if (archivefname == NULL)
+ {
+- archivefname = default_fname;
+- if (output_prefix)
+- memcpy (default_fname, output_prefix, prefix_len);
+- strcpy (default_fname + prefix_len, ARCHIVE_NAME);
++ archivefname = getenv("LOCALEARCHIVE");
++ if (archivefname == NULL) {
++ archivefname = default_fname;
++ if (output_prefix)
++ memcpy (default_fname, output_prefix, prefix_len);
++ strcpy (default_fname + prefix_len, ARCHIVE_NAME);
++ }
+ }
+
+ while (1)
+@@ -585,7 +600,7 @@ open_archive (struct locarhandle *ah, bool readonly)
+ the default locale archive we ignore the failure and
+ list an empty archive, otherwise we print an error
+ and exit. */
+- if (errno == ENOENT && archivefname == default_fname)
++ if (errno == ENOENT)
+ {
+ if (readonly)
+ {
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch b/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch
deleted file mode 100644
index 9d60d02828..0000000000
--- a/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 89ec25290d34413ce5c8ba6c378e31dbae3a37c0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 20 Apr 2016 21:11:00 -0700
-Subject: [PATCH 25/25] Define DUMMY_LOCALE_T if not defined
-
-This is a hack to fix building the locale bits on an older
-CentOs 5.X machine
-
-Upstream-Status: Inappropriate [other]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- locale/programs/config.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/locale/programs/config.h b/locale/programs/config.h
-index f606365..0e5f8c3 100644
---- a/locale/programs/config.h
-+++ b/locale/programs/config.h
-@@ -19,6 +19,9 @@
- #ifndef _LD_CONFIG_H
- #define _LD_CONFIG_H 1
-
-+#ifndef DUMMY_LOCALE_T
-+#define DUMMY_LOCALE_T
-+#endif
- /* Use the internal textdomain used for libc messages. */
- #define PACKAGE _libc_intl_domainname
- #ifndef VERSION
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
new file mode 100644
index 0000000000..76a9eb2563
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
@@ -0,0 +1,56 @@
+From 7c9ebe966bb97dd14de5719905b61311211ae3c8 Mon Sep 17 00:00:00 2001
+From: Mark Hatle <mark.hatle@windriver.com>
+Date: Thu, 18 Aug 2016 14:07:58 -0500
+Subject: [PATCH 25/28] elf/dl-deps.c: Make _dl_build_local_scope breadth first
+
+According to the ELF specification:
+
+When resolving symbolic references, the dynamic linker examines the symbol
+tables with a breadth-first search.
+
+This function was using a depth first search. By doing so the conflict
+resolution reported to the prelinker (when LD_TRACE_PRELINKING=1 is set)
+was incorrect. This caused problems when their were various circular
+dependencies between libraries. The problem usually manifested itself by
+the wrong IFUNC being executed.
+
+[BZ# 20488]
+
+Upstream-Status: Submitted [libc-alpha]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ elf/dl-deps.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/elf/dl-deps.c b/elf/dl-deps.c
+index e12c353158..9234daac05 100644
+--- a/elf/dl-deps.c
++++ b/elf/dl-deps.c
+@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
+ {
+ struct link_map **p = list;
+ struct link_map **q;
++ struct link_map **r;
+
+ *p++ = map;
+ map->l_reserved = 1;
+- if (map->l_initfini)
+- for (q = map->l_initfini + 1; *q; ++q)
+- if (! (*q)->l_reserved)
+- p += _dl_build_local_scope (p, *q);
++
++ for (r = list; r < p; ++r)
++ if ((*r)->l_initfini)
++ for (q = (*r)->l_initfini + 1; *q; ++q)
++ if (! (*q)->l_reserved)
++ {
++ *p++ = *q;
++ (*q)->l_reserved = 1;
++ }
+ return p - list;
+ }
+
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch b/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch
deleted file mode 100644
index 8e0cb83194..0000000000
--- a/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 6e4ec5a3c5fe63b6458036f18d43124de4a7e724 Mon Sep 17 00:00:00 2001
-From: Mark Hatle <mark.hatle@windriver.com>
-Date: Thu, 18 Aug 2016 14:07:58 -0500
-Subject: [PATCH] elf/dl-deps.c: Make _dl_build_local_scope breadth first
-
-According to the ELF specification:
-
-When resolving symbolic references, the dynamic linker examines the symbol
-tables with a breadth-first search.
-
-This function was using a depth first search. By doing so the conflict
-resolution reported to the prelinker (when LD_TRACE_PRELINKING=1 is set)
-was incorrect. This caused problems when their were various circular
-dependencies between libraries. The problem usually manifested itself by
-the wrong IFUNC being executed.
-
-[BZ# 20488]
-
-Upstream-Status: Submitted [libc-alpha]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
- elf/dl-deps.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/elf/dl-deps.c b/elf/dl-deps.c
-index 6a82987..fc37c87 100644
---- a/elf/dl-deps.c
-+++ b/elf/dl-deps.c
-@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
- {
- struct link_map **p = list;
- struct link_map **q;
-+ struct link_map **r;
-
- *p++ = map;
- map->l_reserved = 1;
-- if (map->l_initfini)
-- for (q = map->l_initfini + 1; *q; ++q)
-- if (! (*q)->l_reserved)
-- p += _dl_build_local_scope (p, *q);
-+
-+ for (r = list; r < p; ++r)
-+ if ((*r)->l_initfini)
-+ for (q = (*r)->l_initfini + 1; *q; ++q)
-+ if (! (*q)->l_reserved)
-+ {
-+ *p++ = *q;
-+ (*q)->l_reserved = 1;
-+ }
- return p - list;
- }
-
---
-2.5.5
-
diff --git a/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch b/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch
new file mode 100644
index 0000000000..7589e11d57
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch
@@ -0,0 +1,34 @@
+From aa5c758fbb7dbb026df33fc6bdc05548547bdb17 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Aug 2018 09:44:00 -0700
+Subject: [PATCH 26/28] intl: Emit no lines in bison generated files
+
+Improve reproducibility:
+Do not put any #line preprocessor commands in bison generated files.
+These lines contain absolute paths containing file locations on
+the host build machine.
+
+Upstream-Status: Pending
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ intl/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/intl/Makefile b/intl/Makefile
+index 9eea8d57e3..627dce4cf1 100644
+--- a/intl/Makefile
++++ b/intl/Makefile
+@@ -155,7 +155,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
+
+ CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
+ -D'LOCALE_ALIAS_PATH="$(localedir)"'
+-BISONFLAGS = --yacc --name-prefix=__gettext --output
++BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
+
+ $(inst_localedir)/locale.alias: locale.alias $(+force)
+ $(do-install)
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch b/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch
new file mode 100644
index 0000000000..dc205a833f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch
@@ -0,0 +1,304 @@
+From fecd98040a2ae1bc5943a40a1623d76a696e0785 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Nov 2018 17:29:35 -0800
+Subject: [PATCH 27/28] inject file assembly directives
+
+Currently, non-IA builds are not reproducibile since build paths are
+being injected into the debug symbols. These are coming from the use of
+.S assembler files during the glibc build. No STT_FILE section is added
+during the assembly but when linking, ld decides to add one to aid
+debugging and ensure references between the different object files its
+linking remain clear.
+
+We can avoid this by injecting a file header into the assembler files
+ahead of time, choosing a filename which does not contain build system
+paths.
+
+This is a bit of a workaround/hack but does significantly reduce the
+build system references in target binaries for the non-IA architectures
+which use .S files.
+
+RP
+2018/10/3
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ csu/abi-note.S | 2 ++
+ sysdeps/aarch64/crti.S | 2 ++
+ sysdeps/aarch64/crtn.S | 2 ++
+ sysdeps/aarch64/dl-tlsdesc.S | 2 ++
+ sysdeps/aarch64/dl-trampoline.S | 2 ++
+ sysdeps/aarch64/start.S | 2 ++
+ sysdeps/arm/abi-note.S | 2 ++
+ sysdeps/arm/crti.S | 2 ++
+ sysdeps/arm/crtn.S | 2 ++
+ sysdeps/arm/dl-tlsdesc.S | 2 ++
+ sysdeps/arm/dl-trampoline.S | 2 ++
+ sysdeps/arm/start.S | 2 ++
+ sysdeps/mips/start.S | 2 ++
+ sysdeps/powerpc/powerpc32/dl-start.S | 2 ++
+ sysdeps/powerpc/powerpc32/start.S | 2 ++
+ sysdeps/powerpc/powerpc64/start.S | 2 ++
+ sysdeps/unix/sysv/linux/aarch64/__read_tp.S | 2 ++
+ sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S | 2 ++
+ sysdeps/unix/sysv/linux/arm/libc-do-syscall.S | 2 ++
+ sysdeps/unix/sysv/linux/powerpc/dl-brk.S | 2 ++
+ 20 files changed, 40 insertions(+)
+
+diff --git a/csu/abi-note.S b/csu/abi-note.S
+index fa1f014a88..098731362a 100644
+--- a/csu/abi-note.S
++++ b/csu/abi-note.S
+@@ -56,6 +56,8 @@ offset length contents
+ #include <config.h>
+ #include <abi-tag.h> /* OS-specific ABI tag value */
+
++ .file "abi-note.S"
++
+ /* The linker (GNU ld 2.8 and later) recognizes an allocated section whose
+ name begins with `.note' and creates a PT_NOTE program header entry
+ pointing at it. */
+diff --git a/sysdeps/aarch64/crti.S b/sysdeps/aarch64/crti.S
+index d4e7dfcf5c..e0218df30c 100644
+--- a/sysdeps/aarch64/crti.S
++++ b/sysdeps/aarch64/crti.S
+@@ -50,6 +50,8 @@
+ # define PREINIT_FUNCTION_WEAK 1
+ #endif
+
++ .file "crti.S"
++
+ #if PREINIT_FUNCTION_WEAK
+ weak_extern (PREINIT_FUNCTION)
+ #else
+diff --git a/sysdeps/aarch64/crtn.S b/sysdeps/aarch64/crtn.S
+index 363f752460..2fb06fba62 100644
+--- a/sysdeps/aarch64/crtn.S
++++ b/sysdeps/aarch64/crtn.S
+@@ -37,6 +37,8 @@
+ /* crtn.S puts function epilogues in the .init and .fini sections
+ corresponding to the prologues in crti.S. */
+
++ .file "crtn.S"
++
+ .section .init,"ax",%progbits
+ ldp x29, x30, [sp], 16
+ RET
+diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
+index 4abe6b82a3..8c44b2ff8a 100644
+--- a/sysdeps/aarch64/dl-tlsdesc.S
++++ b/sysdeps/aarch64/dl-tlsdesc.S
+@@ -22,6 +22,8 @@
+ #include <tls.h>
+ #include "tlsdesc.h"
+
++ .file "dl-tlsdesc.S"
++
+ #define NSAVEDQREGPAIRS 16
+ #define SAVE_Q_REGISTERS \
+ stp q0, q1, [sp, #-32*NSAVEDQREGPAIRS]!; \
+diff --git a/sysdeps/aarch64/dl-trampoline.S b/sysdeps/aarch64/dl-trampoline.S
+index 19b117e8f9..38c78b5409 100644
+--- a/sysdeps/aarch64/dl-trampoline.S
++++ b/sysdeps/aarch64/dl-trampoline.S
+@@ -21,6 +21,8 @@
+
+ #include "dl-link.h"
+
++ .file "dl-trampoline.S"
++
+ #define ip0 x16
+ #define ip0l PTR_REG (16)
+ #define ip1 x17
+diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S
+index f5e9b9c223..ae3e22a6a5 100644
+--- a/sysdeps/aarch64/start.S
++++ b/sysdeps/aarch64/start.S
+@@ -18,6 +18,8 @@
+
+ #include <sysdep.h>
+
++ .file "start.S"
++
+ /* This is the canonical entry point, usually the first thing in the text
+ segment.
+
+diff --git a/sysdeps/arm/abi-note.S b/sysdeps/arm/abi-note.S
+index 07bd4c4619..7213b16f27 100644
+--- a/sysdeps/arm/abi-note.S
++++ b/sysdeps/arm/abi-note.S
+@@ -1,3 +1,5 @@
++ .file "abi-note.S"
++
+ /* Tag_ABI_align8_preserved: This code preserves 8-byte
+ alignment in any callee. */
+ .eabi_attribute 25, 1
+diff --git a/sysdeps/arm/crti.S b/sysdeps/arm/crti.S
+index 26dbba66a3..dd84ecd566 100644
+--- a/sysdeps/arm/crti.S
++++ b/sysdeps/arm/crti.S
+@@ -57,6 +57,8 @@
+ .hidden PREINIT_FUNCTION
+ #endif
+
++ .file "crti.S"
++
+ #if PREINIT_FUNCTION_WEAK
+ .p2align 2
+ .type call_weak_fn, %function
+diff --git a/sysdeps/arm/crtn.S b/sysdeps/arm/crtn.S
+index 8f91c8d88b..a87fe49e07 100644
+--- a/sysdeps/arm/crtn.S
++++ b/sysdeps/arm/crtn.S
+@@ -37,6 +37,8 @@
+ #define NO_THUMB
+ #include <sysdep.h>
+
++ .file "crtn.S"
++
+ /* crtn.S puts function epilogues in the .init and .fini sections
+ corresponding to the prologues in crti.S. */
+
+diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S
+index a929340b42..b724c9776d 100644
+--- a/sysdeps/arm/dl-tlsdesc.S
++++ b/sysdeps/arm/dl-tlsdesc.S
+@@ -21,6 +21,8 @@
+ #include <tls.h>
+ #include "tlsdesc.h"
+
++ .file "dl-tlsdesc.S"
++
+ .text
+ @ emit debug information with cfi
+ @ use arm-specific pseudos for unwinding itself
+diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S
+index 325cfcd2ce..4bfdcbce51 100644
+--- a/sysdeps/arm/dl-trampoline.S
++++ b/sysdeps/arm/dl-trampoline.S
+@@ -21,6 +21,8 @@
+ #include <sysdep.h>
+ #include <libc-symbols.h>
+
++ .file "dl-trampoline.S"
++
+ .text
+ .globl _dl_runtime_resolve
+ .type _dl_runtime_resolve, #function
+diff --git a/sysdeps/arm/start.S b/sysdeps/arm/start.S
+index a05f8a4651..2f4374fcaa 100644
+--- a/sysdeps/arm/start.S
++++ b/sysdeps/arm/start.S
+@@ -57,6 +57,8 @@
+ NULL
+ */
+
++ .file "start.S"
++
+ /* Tag_ABI_align8_preserved: This code preserves 8-byte
+ alignment in any callee. */
+ .eabi_attribute 25, 1
+diff --git a/sysdeps/mips/start.S b/sysdeps/mips/start.S
+index 8638e5b545..93f6564aec 100644
+--- a/sysdeps/mips/start.S
++++ b/sysdeps/mips/start.S
+@@ -38,6 +38,8 @@
+ #include <sgidefs.h>
+ #include <sys/asm.h>
+
++ .file "start.S"
++
+ #ifndef ENTRY_POINT
+ #error ENTRY_POINT needs to be defined for start.S on MIPS/ELF.
+ #endif
+diff --git a/sysdeps/powerpc/powerpc32/dl-start.S b/sysdeps/powerpc/powerpc32/dl-start.S
+index 99a10d643a..e47fc0d245 100644
+--- a/sysdeps/powerpc/powerpc32/dl-start.S
++++ b/sysdeps/powerpc/powerpc32/dl-start.S
+@@ -18,6 +18,8 @@
+
+ #include <sysdep.h>
+
++ .file "dl-start.S"
++
+ /* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+diff --git a/sysdeps/powerpc/powerpc32/start.S b/sysdeps/powerpc/powerpc32/start.S
+index 172fb5a56b..ef1471b861 100644
+--- a/sysdeps/powerpc/powerpc32/start.S
++++ b/sysdeps/powerpc/powerpc32/start.S
+@@ -35,6 +35,8 @@
+
+ #include <sysdep.h>
+
++ .file "start.S"
++
+ /* We do not want .eh_frame info for crt1.o since crt1.o is linked
+ before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
+ #undef cfi_startproc
+diff --git a/sysdeps/powerpc/powerpc64/start.S b/sysdeps/powerpc/powerpc64/start.S
+index 55fae68ad6..0cb608fe0f 100644
+--- a/sysdeps/powerpc/powerpc64/start.S
++++ b/sysdeps/powerpc/powerpc64/start.S
+@@ -35,6 +35,8 @@
+
+ #include <sysdep.h>
+
++ .file "start.S"
++
+ /* We do not want .eh_frame info for crt1.o since crt1.o is linked
+ before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
+ #undef cfi_startproc
+diff --git a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
+index 30a29b9fb0..07892b383f 100644
+--- a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
++++ b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
+@@ -18,6 +18,8 @@
+
+ #include <sysdep.h>
+
++ .file "__read_tp.S"
++
+ .hidden __read_tp
+ ENTRY (__read_tp)
+ mrs x0, tpidr_el0
+diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
+index f64c4ffe8a..2da315ab08 100644
+--- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
++++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
+@@ -39,6 +39,8 @@
+ a normal function call) in a high page of memory; tail call to the
+ helper. */
+
++ .file "aeabi_read_tp.S"
++
+ .hidden __aeabi_read_tp
+ ENTRY (__aeabi_read_tp)
+ #ifdef ARCH_HAS_HARD_TP
+diff --git a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
+index 0b6237ac55..8cda491c28 100644
+--- a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
++++ b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
+@@ -27,6 +27,8 @@
+ ARM unwind tables for register to register moves, the actual opcodes
+ are not defined. */
+
++ .file "libc-do-syscall.S"
++
+ #if defined(__thumb__)
+ .thumb
+ .syntax unified
+diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-brk.S b/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
+index eeb96544e3..da182b28f8 100644
+--- a/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
++++ b/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
+@@ -1 +1,3 @@
++ .file "dl-brk.S"
++
+ #include <brk.S>
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch b/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
new file mode 100644
index 0000000000..6c49066fd1
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
@@ -0,0 +1,56 @@
+From d934788e3221c28c9a1892235cbe4cfd1b28ced0 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@gmail.com>
+Date: Mon, 17 Dec 2018 21:36:18 +0000
+Subject: [PATCH 28/28] locale: prevent maybe-uninitialized errors with -Os [BZ
+ #19444]
+
+Fixes following error when building for aarch64 with -Os:
+| In file included from strcoll_l.c:43:
+| strcoll_l.c: In function '__strcoll_l':
+| ../locale/weight.h:31:26: error: 'seq2.back_us' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+| int_fast32_t i = table[*(*cpp)++];
+| ^~~~~~~~~
+| strcoll_l.c:304:18: note: 'seq2.back_us' was declared here
+| coll_seq seq1, seq2;
+| ^~~~
+| In file included from strcoll_l.c:43:
+| ../locale/weight.h:31:26: error: 'seq1.back_us' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+| int_fast32_t i = table[*(*cpp)++];
+| ^~~~~~~~~
+| strcoll_l.c:304:12: note: 'seq1.back_us' was declared here
+| coll_seq seq1, seq2;
+| ^~~~
+
+ Partial fix for [BZ #19444]
+ * locale/weight.h: Fix build with -Os.
+
+Upstream-Status: Submitted [https://patchwork.ozlabs.org/patch/1014766]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/weight.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/locale/weight.h b/locale/weight.h
+index 7ca81498b2..d608ca70bb 100644
+--- a/locale/weight.h
++++ b/locale/weight.h
+@@ -28,7 +28,14 @@ findidx (const int32_t *table,
+ const unsigned char *extra,
+ const unsigned char **cpp, size_t len)
+ {
++ /* With GCC 8 when compiling with -Os the compiler warns that
++ seq1.back_us and seq2.back_us might be used uninitialized.
++ This uninitialized use is impossible for the same reason
++ as described in comments in locale/weightwc.h. */
++ DIAG_PUSH_NEEDS_COMMENT;
++ DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
+ int_fast32_t i = table[*(*cpp)++];
++ DIAG_POP_NEEDS_COMMENT;
+ const unsigned char *cp;
+ const unsigned char *usrc;
+
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch b/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch
new file mode 100644
index 0000000000..aead04c485
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch
@@ -0,0 +1,32 @@
+From 37c90e117310728a4ad1eb998c0bbe7d79c4a398 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Marcin=20Ko=C5=9Bcielnicki?= <mwk@0x04.net>
+Date: Thu, 21 Nov 2019 00:20:15 +0100
+Subject: [PATCH] rtld: Check __libc_enable_secure before honoring
+ LD_PREFER_MAP_32BIT_EXEC (CVE-2019-19126) [BZ #25204]
+
+The problem was introduced in glibc 2.23, in commit
+b9eb92ab05204df772eb4929eccd018637c9f3e9
+("Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT").
+
+(cherry picked from commit d5dfad4326fc683c813df1e37bbf5cf920591c8e)
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=37c90e117310728a4ad1eb998c0bbe7d79c4a398]
+CVE: CVE-2019-19126
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+diff --git a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
+index 975cbe2..df2cdfd 100644
+--- a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
++++ b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
+@@ -31,7 +31,8 @@
+ environment variable, LD_PREFER_MAP_32BIT_EXEC. */
+ #define EXTRA_LD_ENVVARS \
+ case 21: \
+- if (memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
++ if (!__libc_enable_secure \
++ && memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
+ GLRO(dl_x86_cpu_features).feature[index_arch_Prefer_MAP_32BIT_EXEC] \
+ |= bit_arch_Prefer_MAP_32BIT_EXEC; \
+ break;
+--
+2.9.3
diff --git a/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch b/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch
new file mode 100644
index 0000000000..8471121949
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch
@@ -0,0 +1,1115 @@
+---
+ locale/programs/c.h | 407 ++++++++++++++++++++++
+ locale/programs/cross-localedef-hardlink.c | 528 +++++++++++++++++++++++++++++
+ locale/programs/xalloc.h | 129 +++++++
+ localedef/Makefile.in | 8
+ 4 files changed, 1071 insertions(+), 1 deletion(-)
+
+--- /dev/null
++++ b/locale/programs/cross-localedef-hardlink.c
+@@ -0,0 +1,528 @@
++/*
++ * hardlink - consolidate duplicate files via hardlinks
++ *
++ * Copyright (C) 2018 Red Hat, Inc. All rights reserved.
++ * Written by Jakub Jelinek <jakub@redhat.com>
++ *
++ * Copyright (C) 2019 Karel Zak <kzak@redhat.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it would be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++#include <sys/types.h>
++#include <stdlib.h>
++#include <getopt.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <sys/stat.h>
++#include <sys/mman.h>
++#include <string.h>
++#include <dirent.h>
++#include <fcntl.h>
++#include <errno.h>
++#ifdef HAVE_PCRE
++# define PCRE2_CODE_UNIT_WIDTH 8
++# include <pcre2.h>
++#endif
++
++#include "c.h"
++#include "xalloc.h"
++#include "nls.h"
++#include "closestream.h"
++
++#define NHASH (1<<17) /* Must be a power of 2! */
++#define NBUF 64
++
++struct hardlink_file;
++
++struct hardlink_hash {
++ struct hardlink_hash *next;
++ struct hardlink_file *chain;
++ off_t size;
++ time_t mtime;
++};
++
++struct hardlink_dir {
++ struct hardlink_dir *next;
++ char name[];
++};
++
++struct hardlink_file {
++ struct hardlink_file *next;
++ ino_t ino;
++ dev_t dev;
++ unsigned int cksum;
++ char name[];
++};
++
++struct hardlink_dynstr {
++ char *buf;
++ size_t alloc;
++};
++
++struct hardlink_ctl {
++ struct hardlink_dir *dirs;
++ struct hardlink_hash *hps[NHASH];
++ char iobuf1[BUFSIZ];
++ char iobuf2[BUFSIZ];
++ /* summary counters */
++ unsigned long long ndirs;
++ unsigned long long nobjects;
++ unsigned long long nregfiles;
++ unsigned long long ncomp;
++ unsigned long long nlinks;
++ unsigned long long nsaved;
++ /* current device */
++ dev_t dev;
++ /* flags */
++ unsigned int verbose;
++ unsigned int
++ no_link:1,
++ content_only:1,
++ force:1;
++};
++/* ctl is in global scope due use in atexit() */
++struct hardlink_ctl global_ctl;
++
++__attribute__ ((always_inline))
++static inline unsigned int hash(off_t size, time_t mtime)
++{
++ return (size ^ mtime) & (NHASH - 1);
++}
++
++__attribute__ ((always_inline))
++static inline int stcmp(struct stat *st1, struct stat *st2, int content_scope)
++{
++ if (content_scope)
++ return st1->st_size != st2->st_size;
++
++ return st1->st_mode != st2->st_mode
++ || st1->st_uid != st2->st_uid
++ || st1->st_gid != st2->st_gid
++ || st1->st_size != st2->st_size
++ || st1->st_mtime != st2->st_mtime;
++}
++
++static void print_summary(void)
++{
++ struct hardlink_ctl const *const ctl = &global_ctl;
++
++ if (!ctl->verbose)
++ return;
++
++ if (ctl->verbose > 1 && ctl->nlinks)
++ fputc('\n', stdout);
++
++ printf(_("Directories: %9lld\n"), ctl->ndirs);
++ printf(_("Objects: %9lld\n"), ctl->nobjects);
++ printf(_("Regular files: %9lld\n"), ctl->nregfiles);
++ printf(_("Comparisons: %9lld\n"), ctl->ncomp);
++ printf( "%s%9lld\n", (ctl->no_link ?
++ _("Would link: ") :
++ _("Linked: ")), ctl->nlinks);
++ printf( "%s %9lld\n", (ctl->no_link ?
++ _("Would save: ") :
++ _("Saved: ")), ctl->nsaved);
++}
++
++static void __attribute__((__noreturn__)) usage(void)
++{
++ fputs(USAGE_HEADER, stdout);
++ printf(_(" %s [options] directory...\n"), program_invocation_short_name);
++
++ fputs(USAGE_SEPARATOR, stdout);
++ puts(_("Consolidate duplicate files using hardlinks."));
++
++ fputs(USAGE_OPTIONS, stdout);
++ puts(_(" -c, --content compare only contents, ignore permission, etc."));
++ puts(_(" -n, --dry-run don't actually link anything"));
++ puts(_(" -v, --verbose print summary after hardlinking"));
++ puts(_(" -vv print every hardlinked file and summary"));
++ puts(_(" -f, --force force hardlinking across filesystems"));
++ puts(_(" -x, --exclude <regex> exclude files matching pattern"));
++
++ fputs(USAGE_SEPARATOR, stdout);
++ printf(USAGE_HELP_OPTIONS(16)); /* char offset to align option descriptions */
++ printf(USAGE_MAN_TAIL("hardlink(1)"));
++ exit(EXIT_SUCCESS);
++}
++
++__attribute__ ((always_inline))
++static inline size_t add2(size_t a, size_t b)
++{
++ size_t sum = a + b;
++
++ if (sum < a)
++ errx(EXIT_FAILURE, _("integer overflow"));
++ return sum;
++}
++
++__attribute__ ((always_inline))
++static inline size_t add3(size_t a, size_t b, size_t c)
++{
++ return add2(add2(a, b), c);
++}
++
++static void growstr(struct hardlink_dynstr *str, size_t newlen)
++{
++ if (newlen < str->alloc)
++ return;
++ str->buf = xrealloc(str->buf, str->alloc = add2(newlen, 1));
++}
++
++static void process_path(struct hardlink_ctl *ctl, const char *name)
++{
++ struct stat st, st2, st3;
++ const size_t namelen = strlen(name);
++
++ ctl->nobjects++;
++ if (lstat(name, &st))
++ return;
++
++ if (st.st_dev != ctl->dev && !ctl->force) {
++ if (ctl->dev)
++ errx(EXIT_FAILURE,
++ _("%s is on different filesystem than the rest "
++ "(use -f option to override)."), name);
++ ctl->dev = st.st_dev;
++ }
++ if (S_ISDIR(st.st_mode)) {
++ struct hardlink_dir *dp = xmalloc(add3(sizeof(*dp), namelen, 1));
++ memcpy(dp->name, name, namelen + 1);
++ dp->next = ctl->dirs;
++ ctl->dirs = dp;
++
++ } else if (S_ISREG(st.st_mode)) {
++ int fd, i;
++ struct hardlink_file *fp, *fp2;
++ struct hardlink_hash *hp;
++ const char *n1, *n2;
++ unsigned int buf[NBUF];
++ int cksumsize = sizeof(buf);
++ unsigned int cksum;
++ time_t mtime = ctl->content_only ? 0 : st.st_mtime;
++ unsigned int hsh = hash(st.st_size, mtime);
++ off_t fsize;
++
++ ctl->nregfiles++;
++ if (ctl->verbose > 1)
++ printf("%s\n", name);
++
++ fd = open(name, O_RDONLY);
++ if (fd < 0)
++ return;
++
++ if ((size_t)st.st_size < sizeof(buf)) {
++ cksumsize = st.st_size;
++ memset(((char *)buf) + cksumsize, 0,
++ (sizeof(buf) - cksumsize) % sizeof(buf[0]));
++ }
++ if (read(fd, buf, cksumsize) != cksumsize) {
++ close(fd);
++ return;
++ }
++ cksumsize = (cksumsize + sizeof(buf[0]) - 1) / sizeof(buf[0]);
++ for (i = 0, cksum = 0; i < cksumsize; i++) {
++ if (cksum + buf[i] < cksum)
++ cksum += buf[i] + 1;
++ else
++ cksum += buf[i];
++ }
++ for (hp = ctl->hps[hsh]; hp; hp = hp->next) {
++ if (hp->size == st.st_size && hp->mtime == mtime)
++ break;
++ }
++ if (!hp) {
++ hp = xmalloc(sizeof(*hp));
++ hp->size = st.st_size;
++ hp->mtime = mtime;
++ hp->chain = NULL;
++ hp->next = ctl->hps[hsh];
++ ctl->hps[hsh] = hp;
++ }
++ for (fp = hp->chain; fp; fp = fp->next) {
++ if (fp->cksum == cksum)
++ break;
++ }
++ for (fp2 = fp; fp2 && fp2->cksum == cksum; fp2 = fp2->next) {
++ if (fp2->ino == st.st_ino && fp2->dev == st.st_dev) {
++ close(fd);
++ return;
++ }
++ }
++ for (fp2 = fp; fp2 && fp2->cksum == cksum; fp2 = fp2->next) {
++
++ if (!lstat(fp2->name, &st2) && S_ISREG(st2.st_mode) &&
++ !stcmp(&st, &st2, ctl->content_only) &&
++ st2.st_ino != st.st_ino &&
++ st2.st_dev == st.st_dev) {
++
++ int fd2 = open(fp2->name, O_RDONLY);
++ if (fd2 < 0)
++ continue;
++
++ if (fstat(fd2, &st2) || !S_ISREG(st2.st_mode)
++ || st2.st_size == 0) {
++ close(fd2);
++ continue;
++ }
++ ctl->ncomp++;
++ lseek(fd, 0, SEEK_SET);
++
++ for (fsize = st.st_size; fsize > 0;
++ fsize -= (off_t)sizeof(ctl->iobuf1)) {
++ ssize_t xsz;
++ ssize_t rsize = fsize > (ssize_t) sizeof(ctl->iobuf1) ?
++ (ssize_t) sizeof(ctl->iobuf1) : fsize;
++
++ if ((xsz = read(fd, ctl->iobuf1, rsize)) != rsize)
++ warn(_("cannot read %s"), name);
++ else if ((xsz = read(fd2, ctl->iobuf2, rsize)) != rsize)
++ warn(_("cannot read %s"), fp2->name);
++
++ if (xsz != rsize) {
++ close(fd);
++ close(fd2);
++ return;
++ }
++ if (memcmp(ctl->iobuf1, ctl->iobuf2, rsize))
++ break;
++ }
++ close(fd2);
++ if (fsize > 0)
++ continue;
++ if (lstat(name, &st3)) {
++ warn(_("cannot stat %s"), name);
++ close(fd);
++ return;
++ }
++ st3.st_atime = st.st_atime;
++ if (stcmp(&st, &st3, 0)) {
++ warnx(_("file %s changed underneath us"), name);
++ close(fd);
++ return;
++ }
++ n1 = fp2->name;
++ n2 = name;
++
++ if (!ctl->no_link) {
++ const char *suffix =
++ ".$$$___cleanit___$$$";
++ const size_t suffixlen = strlen(suffix);
++ size_t n2len = strlen(n2);
++ struct hardlink_dynstr nam2 = { NULL, 0 };
++
++ growstr(&nam2, add2(n2len, suffixlen));
++ memcpy(nam2.buf, n2, n2len);
++ memcpy(&nam2.buf[n2len], suffix,
++ suffixlen + 1);
++ /* First create a temporary link to n1 under a new name */
++ if (link(n1, nam2.buf)) {
++ warn(_("failed to hardlink %s to %s (create temporary link as %s failed)"),
++ n1, n2, nam2.buf);
++ free(nam2.buf);
++ continue;
++ }
++ /* Then rename into place over the existing n2 */
++ if (rename(nam2.buf, n2)) {
++ warn(_("failed to hardlink %s to %s (rename temporary link to %s failed)"),
++ n1, n2, n2);
++ /* Something went wrong, try to remove the now redundant temporary link */
++ if (unlink(nam2.buf))
++ warn(_("failed to remove temporary link %s"), nam2.buf);
++ free(nam2.buf);
++ continue;
++ }
++ free(nam2.buf);
++ }
++ ctl->nlinks++;
++ if (st3.st_nlink > 1) {
++ /* We actually did not save anything this time, since the link second argument
++ had some other links as well. */
++ if (ctl->verbose > 1)
++ printf(_(" %s %s to %s\n"),
++ (ctl->no_link ? _("Would link") : _("Linked")),
++ n1, n2);
++ } else {
++ ctl->nsaved += ((st.st_size + 4095) / 4096) * 4096;
++ if (ctl->verbose > 1)
++ printf(_(" %s %s to %s, %s %jd\n"),
++ (ctl->no_link ? _("Would link") : _("Linked")),
++ n1, n2,
++ (ctl->no_link ? _("would save") : _("saved")),
++ (intmax_t)st.st_size);
++ }
++ close(fd);
++ return;
++ }
++ }
++ fp2 = xmalloc(add3(sizeof(*fp2), namelen, 1));
++ close(fd);
++ fp2->ino = st.st_ino;
++ fp2->dev = st.st_dev;
++ fp2->cksum = cksum;
++ memcpy(fp2->name, name, namelen + 1);
++
++ if (fp) {
++ fp2->next = fp->next;
++ fp->next = fp2;
++ } else {
++ fp2->next = hp->chain;
++ hp->chain = fp2;
++ }
++ return;
++ }
++}
++
++int main(int argc, char **argv)
++{
++ int ch;
++ int i;
++#ifdef HAVE_PCRE
++ int errornumber;
++ PCRE2_SIZE erroroffset;
++ pcre2_code *re = NULL;
++ PCRE2_SPTR exclude_pattern = NULL;
++ pcre2_match_data *match_data = NULL;
++#endif
++ struct hardlink_dynstr nam1 = { NULL, 0 };
++ struct hardlink_ctl *ctl = &global_ctl;
++
++ static const struct option longopts[] = {
++ { "content", no_argument, NULL, 'c' },
++ { "dry-run", no_argument, NULL, 'n' },
++ { "exclude", required_argument, NULL, 'x' },
++ { "force", no_argument, NULL, 'f' },
++ { "help", no_argument, NULL, 'h' },
++ { "verbose", no_argument, NULL, 'v' },
++ { "version", no_argument, NULL, 'V' },
++ { NULL, 0, NULL, 0 },
++ };
++
++ setlocale(LC_ALL, "");
++ bindtextdomain(PACKAGE, LOCALEDIR);
++ textdomain(PACKAGE);
++ close_stdout_atexit();
++
++ while ((ch = getopt_long(argc, argv, "cnvfx:Vh", longopts, NULL)) != -1) {
++ switch (ch) {
++ case 'n':
++ ctl->no_link = 1;
++ break;
++ case 'v':
++ ctl->verbose++;
++ break;
++ case 'c':
++ ctl->content_only = 1;
++ break;
++ case 'f':
++ ctl->force = 1;
++ break;
++ case 'x':
++#ifdef HAVE_PCRE
++ exclude_pattern = (PCRE2_SPTR) optarg;
++#else
++ errx(EXIT_FAILURE,
++ _("option --exclude not supported (built without pcre2)"));
++#endif
++ break;
++ case 'V':
++ print_version(EXIT_SUCCESS);
++ case 'h':
++ usage();
++ default:
++ errtryhelp(EXIT_FAILURE);
++ }
++ }
++
++ if (optind == argc) {
++ warnx(_("no directory specified"));
++ errtryhelp(EXIT_FAILURE);
++ }
++
++#ifdef HAVE_PCRE
++ if (exclude_pattern) {
++ re = pcre2_compile(exclude_pattern, /* the pattern */
++ PCRE2_ZERO_TERMINATED, /* indicates pattern is zero-terminate */
++ 0, /* default options */
++ &errornumber, &erroroffset, NULL); /* use default compile context */
++ if (!re) {
++ PCRE2_UCHAR buffer[256];
++ pcre2_get_error_message(errornumber, buffer,
++ sizeof(buffer));
++ errx(EXIT_FAILURE, _("pattern error at offset %d: %s"),
++ (int)erroroffset, buffer);
++ }
++ match_data = pcre2_match_data_create_from_pattern(re, NULL);
++ }
++#endif
++ atexit(print_summary);
++
++ for (i = optind; i < argc; i++)
++ process_path(ctl, argv[i]);
++
++ while (ctl->dirs) {
++ DIR *dh;
++ struct dirent *di;
++ struct hardlink_dir *dp = ctl->dirs;
++ size_t nam1baselen = strlen(dp->name);
++
++ ctl->dirs = dp->next;
++ growstr(&nam1, add2(nam1baselen, 1));
++ memcpy(nam1.buf, dp->name, nam1baselen);
++ free(dp);
++ nam1.buf[nam1baselen++] = '/';
++ nam1.buf[nam1baselen] = 0;
++ dh = opendir(nam1.buf);
++
++ if (dh == NULL)
++ continue;
++ ctl->ndirs++;
++
++ while ((di = readdir(dh)) != NULL) {
++ if (!di->d_name[0])
++ continue;
++ if (di->d_name[0] == '.') {
++ if (!di->d_name[1] || !strcmp(di->d_name, ".."))
++ continue;
++ }
++#ifdef HAVE_PCRE
++ if (re && pcre2_match(re, /* compiled regex */
++ (PCRE2_SPTR) di->d_name, strlen(di->d_name), 0, /* start at offset 0 */
++ 0, /* default options */
++ match_data, /* block for storing the result */
++ NULL) /* use default match context */
++ >=0) {
++ if (ctl->verbose) {
++ nam1.buf[nam1baselen] = 0;
++ printf(_("Skipping %s%s\n"), nam1.buf, di->d_name);
++ }
++ continue;
++ }
++#endif
++ {
++ size_t subdirlen;
++ growstr(&nam1,
++ add2(nam1baselen, subdirlen =
++ strlen(di->d_name)));
++ memcpy(&nam1.buf[nam1baselen], di->d_name,
++ add2(subdirlen, 1));
++ }
++ process_path(ctl, nam1.buf);
++ }
++ closedir(dh);
++ }
++
++ return 0;
++}
+--- a/localedef/Makefile.in
++++ b/localedef/Makefile.in
+@@ -40,6 +40,8 @@ WARNFLAGS = -Wall -Wno-format
+ FULLCC = $(CC) $(CPPFLAGS) $(CFLAGS) \
+ $(DEFINES) $(INCLUDES) $(WARNFLAGS)
+
++CROSS_LOCALEDEF_HARDLINK_OBJS = cross-localedef-hardlink.o
++
+ LOCALEDEF_OBJS = charmap.o charmap-dir.o ld-address.o ld-collate.o \
+ ld-ctype.o ld-identification.o ld-measurement.o \
+ ld-messages.o ld-monetary.o ld-name.o ld-numeric.o \
+@@ -54,11 +56,14 @@ LOCALEDEF_OBJS = charmap.o charmap-dir.o
+ asprintf.o getdelim.o localedef_extra.o \
+ obstack_printf.o vasprintf.o
+
+-all: localedef$(EXEEXT)
++all: localedef$(EXEEXT) cross-localedef-hardlink$(EXEEXT)
+
+ localedef$(EXEEXT): $(LOCALEDEF_OBJS)
+ $(CC) -o $@ $(LOCALEDEF_OBJS) $(LIBS)
+
++cross-localedef-hardlink$(EXEEXT): $(CROSS_LOCALEDEF_HARDLINK_OBJS)
++ $(CC) -o $@ $(CROSS_LOCALEDEF_HARDLINK_OBJS) $(LIBS)
++
+ clean:
+ rm -f locale$(EXEEXT) $(LOCALEDEF_OBJS)
+
+@@ -77,6 +82,7 @@ clean:
+ %.o: $(srcdir)/%.c
+ $(FULLCC) -c -o $@ $<
+
++cross-localedef-hardlink.o: glibc/locale/programs/cross-localedef-hardlink.c
+ charmap.o: glibc/locale/programs/charmap.c
+ charmap-dir.o: glibc/locale/programs/charmap-dir.c
+ ld-address.o: glibc/locale/programs/ld-address.c
+--- /dev/null
++++ b/locale/programs/c.h
+@@ -0,0 +1,407 @@
++/*
++ * Fundamental C definitions.
++ */
++
++#ifndef UTIL_LINUX_C_H
++#define UTIL_LINUX_C_H
++
++#include <limits.h>
++#include <stddef.h>
++#include <stdint.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <stdarg.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++#include <assert.h>
++
++#ifdef HAVE_ERR_H
++# include <err.h>
++#endif
++
++#ifdef HAVE_SYS_SYSMACROS_H
++# include <sys/sysmacros.h> /* for major, minor */
++#endif
++
++#ifndef LOGIN_NAME_MAX
++# define LOGIN_NAME_MAX 256
++#endif
++
++#ifndef NAME_MAX
++# define NAME_MAX PATH_MAX
++#endif
++
++/*
++ * __GNUC_PREREQ is deprecated in favour of __has_attribute() and
++ * __has_feature(). The __has macros are supported by clang and gcc>=5.
++ */
++#ifndef __GNUC_PREREQ
++# if defined __GNUC__ && defined __GNUC_MINOR__
++# define __GNUC_PREREQ(maj, min) \
++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++# else
++# define __GNUC_PREREQ(maj, min) 0
++# endif
++#endif
++
++#ifdef __GNUC__
++
++/* &a[0] degrades to a pointer: a different type from an array */
++# define __must_be_array(a) \
++ UL_BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0])))
++
++# define ignore_result(x) __extension__ ({ \
++ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \
++})
++
++#else /* !__GNUC__ */
++# define __must_be_array(a) 0
++# define __attribute__(_arg_)
++# define ignore_result(x) ((void) (x))
++#endif /* !__GNUC__ */
++
++/*
++ * It evaluates to 1 if the attribute/feature is supported by the current
++ * compilation targed. Fallback for old compilers.
++ */
++#ifndef __has_attribute
++ #define __has_attribute(x) 0
++#endif
++
++#ifndef __has_feature
++ #define __has_feature(x) 0
++#endif
++
++/*
++ * Function attributes
++ */
++#ifndef __ul_alloc_size
++# if (__has_attribute(alloc_size) && __has_attribute(warn_unused_result)) || __GNUC_PREREQ (4, 3)
++# define __ul_alloc_size(s) __attribute__((alloc_size(s), warn_unused_result))
++# else
++# define __ul_alloc_size(s)
++# endif
++#endif
++
++#ifndef __ul_calloc_size
++# if (__has_attribute(alloc_size) && __has_attribute(warn_unused_result)) || __GNUC_PREREQ (4, 3)
++# define __ul_calloc_size(n, s) __attribute__((alloc_size(n, s), warn_unused_result))
++# else
++# define __ul_calloc_size(n, s)
++# endif
++#endif
++
++#if __has_attribute(returns_nonnull) || __GNUC_PREREQ (4, 9)
++# define __ul_returns_nonnull __attribute__((returns_nonnull))
++#else
++# define __ul_returns_nonnull
++#endif
++
++/*
++ * Force a compilation error if condition is true, but also produce a
++ * result (of value 0 and type size_t), so the expression can be used
++ * e.g. in a structure initializer (or wherever else comma expressions
++ * aren't permitted).
++ */
++#define UL_BUILD_BUG_ON_ZERO(e) __extension__ (sizeof(struct { int:-!!(e); }))
++#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
++
++#ifndef ARRAY_SIZE
++# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
++#endif
++
++#ifndef PATH_MAX
++# define PATH_MAX 4096
++#endif
++
++#ifndef TRUE
++# define TRUE 1
++#endif
++
++#ifndef FALSE
++# define FALSE 0
++#endif
++
++#ifndef min
++# define min(x, y) __extension__ ({ \
++ __typeof__(x) _min1 = (x); \
++ __typeof__(y) _min2 = (y); \
++ (void) (&_min1 == &_min2); \
++ _min1 < _min2 ? _min1 : _min2; })
++#endif
++
++#ifndef max
++# define max(x, y) __extension__ ({ \
++ __typeof__(x) _max1 = (x); \
++ __typeof__(y) _max2 = (y); \
++ (void) (&_max1 == &_max2); \
++ _max1 > _max2 ? _max1 : _max2; })
++#endif
++
++#ifndef cmp_numbers
++# define cmp_numbers(x, y) __extension__ ({ \
++ __typeof__(x) _a = (x); \
++ __typeof__(y) _b = (y); \
++ (void) (&_a == &_b); \
++ _a == _b ? 0 : _a > _b ? 1 : -1; })
++#endif
++
++#ifndef offsetof
++#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
++#endif
++
++/*
++ * container_of - cast a member of a structure out to the containing structure
++ * @ptr: the pointer to the member.
++ * @type: the type of the container struct this is embedded in.
++ * @member: the name of the member within the struct.
++ */
++#ifndef container_of
++#define container_of(ptr, type, member) __extension__ ({ \
++ const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
++ (type *)( (char *)__mptr - offsetof(type,member) );})
++#endif
++
++#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
++# ifdef HAVE___PROGNAME
++extern char *__progname;
++# define program_invocation_short_name __progname
++# else
++# ifdef HAVE_GETEXECNAME
++# define program_invocation_short_name \
++ prog_inv_sh_nm_from_file(getexecname(), 0)
++# else
++# define program_invocation_short_name \
++ prog_inv_sh_nm_from_file(__FILE__, 1)
++# endif
++static char prog_inv_sh_nm_buf[256];
++static inline char *
++prog_inv_sh_nm_from_file(char *f, char stripext)
++{
++ char *t;
++
++ if ((t = strrchr(f, '/')) != NULL)
++ t++;
++ else
++ t = f;
++
++ strncpy(prog_inv_sh_nm_buf, t, sizeof(prog_inv_sh_nm_buf) - 1);
++ prog_inv_sh_nm_buf[sizeof(prog_inv_sh_nm_buf) - 1] = '\0';
++
++ if (stripext && (t = strrchr(prog_inv_sh_nm_buf, '.')) != NULL)
++ *t = '\0';
++
++ return prog_inv_sh_nm_buf;
++}
++# endif
++#endif
++
++
++#ifndef HAVE_ERR_H
++static inline void
++errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
++{
++ fprintf(stderr, "%s: ", program_invocation_short_name);
++ if (fmt != NULL) {
++ va_list argp;
++ va_start(argp, fmt);
++ vfprintf(stderr, fmt, argp);
++ va_end(argp);
++ if (adderr)
++ fprintf(stderr, ": ");
++ }
++ if (adderr)
++ fprintf(stderr, "%m");
++ fprintf(stderr, "\n");
++ if (doexit)
++ exit(excode);
++}
++
++#ifndef HAVE_ERR
++# define err(E, FMT...) errmsg(1, E, 1, FMT)
++#endif
++
++#ifndef HAVE_ERRX
++# define errx(E, FMT...) errmsg(1, E, 0, FMT)
++#endif
++
++#ifndef HAVE_WARN
++# define warn(FMT...) errmsg(0, 0, 1, FMT)
++#endif
++
++#ifndef HAVE_WARNX
++# define warnx(FMT...) errmsg(0, 0, 0, FMT)
++#endif
++#endif /* !HAVE_ERR_H */
++
++
++/* Don't use inline function to avoid '#include "nls.h"' in c.h
++ */
++#define errtryhelp(eval) __extension__ ({ \
++ fprintf(stderr, _("Try '%s --help' for more information.\n"), \
++ program_invocation_short_name); \
++ exit(eval); \
++})
++
++/* After failed execvp() */
++#define EX_EXEC_FAILED 126 /* Program located, but not usable. */
++#define EX_EXEC_ENOENT 127 /* Could not find program to exec. */
++#define errexec(name) err(errno == ENOENT ? EX_EXEC_ENOENT : EX_EXEC_FAILED, \
++ _("failed to execute %s"), name)
++
++
++static inline __attribute__((const)) int is_power_of_2(unsigned long num)
++{
++ return (num != 0 && ((num & (num - 1)) == 0));
++}
++
++#ifndef HAVE_LOFF_T
++typedef int64_t loff_t;
++#endif
++
++#if !defined(HAVE_DIRFD) && (!defined(HAVE_DECL_DIRFD) || HAVE_DECL_DIRFD == 0) && defined(HAVE_DIR_DD_FD)
++#include <sys/types.h>
++#include <dirent.h>
++static inline int dirfd(DIR *d)
++{
++ return d->dd_fd;
++}
++#endif
++
++/*
++ * Fallback defines for old versions of glibc
++ */
++#include <fcntl.h>
++
++#ifdef O_CLOEXEC
++#define UL_CLOEXECSTR "e"
++#else
++#define UL_CLOEXECSTR ""
++#endif
++
++#ifndef O_CLOEXEC
++#define O_CLOEXEC 0
++#endif
++
++#ifdef __FreeBSD_kernel__
++#ifndef F_DUPFD_CLOEXEC
++#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */
++#endif
++#endif
++
++
++#ifndef AI_ADDRCONFIG
++#define AI_ADDRCONFIG 0x0020
++#endif
++
++#ifndef IUTF8
++#define IUTF8 0040000
++#endif
++
++/*
++ * MAXHOSTNAMELEN replacement
++ */
++static inline size_t get_hostname_max(void)
++{
++ long len = sysconf(_SC_HOST_NAME_MAX);
++
++ if (0 < len)
++ return len;
++
++#ifdef MAXHOSTNAMELEN
++ return MAXHOSTNAMELEN;
++#elif HOST_NAME_MAX
++ return HOST_NAME_MAX;
++#endif
++ return 64;
++}
++
++
++/*
++ * Constant strings for usage() functions. For more info see
++ * Documentation/{howto-usage-function.txt,boilerplate.c}
++ */
++#define USAGE_HEADER ("\nUsage:\n")
++#define USAGE_OPTIONS ("\nOptions:\n")
++#define USAGE_FUNCTIONS ("\nFunctions:\n")
++#define USAGE_COMMANDS ("\nCommands:\n")
++#define USAGE_COLUMNS ("\nAvailable output columns:\n")
++#define USAGE_SEPARATOR "\n"
++
++#define USAGE_OPTSTR_HELP ("display this help")
++#define USAGE_OPTSTR_VERSION ("display version")
++
++#define USAGE_HELP_OPTIONS(marg_dsc) \
++ "%-" #marg_dsc "s%s\n" \
++ "%-" #marg_dsc "s%s\n" \
++ , " -h, --help", USAGE_OPTSTR_HELP \
++ , " -V, --version", USAGE_OPTSTR_VERSION
++
++#define USAGE_MAN_TAIL(_man) ("\nFor more details see %s.\n"), _man
++
++#define UTIL_LINUX_VERSION ("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING
++
++#define print_version(eval) __extension__ ({ \
++ printf(UTIL_LINUX_VERSION); \
++ exit(eval); \
++})
++
++/*
++ * scanf modifiers for "strings allocation"
++ */
++#ifdef HAVE_SCANF_MS_MODIFIER
++#define UL_SCNsA "%ms"
++#elif defined(HAVE_SCANF_AS_MODIFIER)
++#define UL_SCNsA "%as"
++#endif
++
++/*
++ * seek stuff
++ */
++#ifndef SEEK_DATA
++# define SEEK_DATA 3
++#endif
++#ifndef SEEK_HOLE
++# define SEEK_HOLE 4
++#endif
++
++
++/*
++ * Macros to convert #define'itions to strings, for example
++ * #define XYXXY 42
++ * printf ("%s=%s\n", stringify(XYXXY), stringify_value(XYXXY));
++ */
++#define stringify_value(s) stringify(s)
++#define stringify(s) #s
++
++/*
++ * UL_ASAN_BLACKLIST is a macro to tell AddressSanitizer (a compile-time
++ * instrumentation shipped with Clang and GCC) to not instrument the
++ * annotated function. Furthermore, it will prevent the compiler from
++ * inlining the function because inlining currently breaks the blacklisting
++ * mechanism of AddressSanitizer.
++ */
++#if __has_feature(address_sanitizer) && __has_attribute(no_sanitize_memory) && __has_attribute(no_sanitize_address)
++# define UL_ASAN_BLACKLIST __attribute__((noinline)) __attribute__((no_sanitize_memory)) __attribute__((no_sanitize_address))
++#else
++# define UL_ASAN_BLACKLIST /* nothing */
++#endif
++
++/*
++ * Note that sysconf(_SC_GETPW_R_SIZE_MAX) returns *initial* suggested size for
++ * pwd buffer and in some cases it is not large enough. See POSIX and
++ * getpwnam_r man page for more details.
++ */
++#define UL_GETPW_BUFSIZ (16 * 1024)
++
++/*
++ * Darwin or other BSDs may only have MAP_ANON. To get it on Darwin we must
++ * define _DARWIN_C_SOURCE before including sys/mman.h. We do this in config.h.
++ */
++#if !defined MAP_ANONYMOUS && defined MAP_ANON
++# define MAP_ANONYMOUS (MAP_ANON)
++#endif
++
++#endif /* UTIL_LINUX_C_H */
+--- /dev/null
++++ b/locale/programs/xalloc.h
+@@ -0,0 +1,129 @@
++/*
++ * Copyright (C) 2010 Davidlohr Bueso <dave@gnu.org>
++ *
++ * This file may be redistributed under the terms of the
++ * GNU Lesser General Public License.
++ *
++ * General memory allocation wrappers for malloc, realloc, calloc and strdup
++ */
++
++#ifndef UTIL_LINUX_XALLOC_H
++#define UTIL_LINUX_XALLOC_H
++
++#include <stdlib.h>
++#include <string.h>
++
++#include "c.h"
++
++#ifndef XALLOC_EXIT_CODE
++# define XALLOC_EXIT_CODE EXIT_FAILURE
++#endif
++
++static inline void __attribute__((__noreturn__))
++__err_oom(const char *file, unsigned int line)
++{
++ err(XALLOC_EXIT_CODE, "%s: %u: cannot allocate memory", file, line);
++}
++
++#define err_oom() __err_oom(__FILE__, __LINE__)
++
++static inline __ul_alloc_size(1) __ul_returns_nonnull
++void *xmalloc(const size_t size)
++{
++ void *ret = malloc(size);
++
++ if (!ret && size)
++ err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ return ret;
++}
++
++static inline __ul_alloc_size(2) __ul_returns_nonnull
++void *xrealloc(void *ptr, const size_t size)
++{
++ void *ret = realloc(ptr, size);
++
++ if (!ret && size)
++ err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ return ret;
++}
++
++static inline __ul_calloc_size(1, 2) __ul_returns_nonnull
++void *xcalloc(const size_t nelems, const size_t size)
++{
++ void *ret = calloc(nelems, size);
++
++ if (!ret && size && nelems)
++ err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ return ret;
++}
++
++static inline char __attribute__((warn_unused_result)) __ul_returns_nonnull
++*xstrdup(const char *str)
++{
++ char *ret;
++
++ if (!str)
++ return NULL;
++
++ ret = strdup(str);
++
++ if (!ret)
++ err(XALLOC_EXIT_CODE, "cannot duplicate string");
++ return ret;
++}
++
++static inline char * __attribute__((warn_unused_result)) __ul_returns_nonnull
++xstrndup(const char *str, size_t size)
++{
++ char *ret;
++
++ if (!str)
++ return NULL;
++
++ ret = strndup(str, size);
++
++ if (!ret)
++ err(XALLOC_EXIT_CODE, "cannot duplicate string");
++ return ret;
++}
++
++
++static inline int __attribute__ ((__format__(printf, 2, 3)))
++ xasprintf(char **strp, const char *fmt, ...)
++{
++ int ret;
++ va_list args;
++ va_start(args, fmt);
++ ret = vasprintf(&(*strp), fmt, args);
++ va_end(args);
++ if (ret < 0)
++ err(XALLOC_EXIT_CODE, "cannot allocate string");
++ return ret;
++}
++
++static inline int __attribute__ ((__format__(printf, 2, 0)))
++xvasprintf(char **strp, const char *fmt, va_list ap)
++{
++ int ret = vasprintf(&(*strp), fmt, ap);
++ if (ret < 0)
++ err(XALLOC_EXIT_CODE, "cannot allocate string");
++ return ret;
++}
++
++
++static inline char * __attribute__((warn_unused_result)) xgethostname(void)
++{
++ char *name;
++ size_t sz = get_hostname_max() + 1;
++
++ name = xmalloc(sizeof(char) * sz);
++
++ if (gethostname(name, sz) != 0) {
++ free(name);
++ return NULL;
++ }
++ name[sz - 1] = '\0';
++ return name;
++}
++
++#endif
diff --git a/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch b/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch
new file mode 100644
index 0000000000..1148ebfcc7
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch
@@ -0,0 +1,226 @@
+---
+ locale/programs/c.h | 2
+ locale/programs/cross-localedef-hardlink.c | 79 +++++++++++++----------------
+ 2 files changed, 39 insertions(+), 42 deletions(-)
+
+--- a/locale/programs/cross-localedef-hardlink.c
++++ b/locale/programs/cross-localedef-hardlink.c
+@@ -20,6 +20,8 @@
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
++
++#undef HAVE_PCRE
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <getopt.h>
+@@ -38,8 +40,8 @@
+
+ #include "c.h"
+ #include "xalloc.h"
+-#include "nls.h"
+-#include "closestream.h"
++//#include "nls.h"
++//#include "closestream.h"
+
+ #define NHASH (1<<17) /* Must be a power of 2! */
+ #define NBUF 64
+@@ -124,33 +126,33 @@ static void print_summary(void)
+ if (ctl->verbose > 1 && ctl->nlinks)
+ fputc('\n', stdout);
+
+- printf(_("Directories: %9lld\n"), ctl->ndirs);
+- printf(_("Objects: %9lld\n"), ctl->nobjects);
+- printf(_("Regular files: %9lld\n"), ctl->nregfiles);
+- printf(_("Comparisons: %9lld\n"), ctl->ncomp);
++ printf(("Directories: %9lld\n"), ctl->ndirs);
++ printf(("Objects: %9lld\n"), ctl->nobjects);
++ printf(("Regular files: %9lld\n"), ctl->nregfiles);
++ printf(("Comparisons: %9lld\n"), ctl->ncomp);
+ printf( "%s%9lld\n", (ctl->no_link ?
+- _("Would link: ") :
+- _("Linked: ")), ctl->nlinks);
++ ("Would link: ") :
++ ("Linked: ")), ctl->nlinks);
+ printf( "%s %9lld\n", (ctl->no_link ?
+- _("Would save: ") :
+- _("Saved: ")), ctl->nsaved);
++ ("Would save: ") :
++ ("Saved: ")), ctl->nsaved);
+ }
+
+ static void __attribute__((__noreturn__)) usage(void)
+ {
+ fputs(USAGE_HEADER, stdout);
+- printf(_(" %s [options] directory...\n"), program_invocation_short_name);
++ printf((" %s [options] directory...\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, stdout);
+- puts(_("Consolidate duplicate files using hardlinks."));
++ puts(("Consolidate duplicate files using hardlinks."));
+
+ fputs(USAGE_OPTIONS, stdout);
+- puts(_(" -c, --content compare only contents, ignore permission, etc."));
+- puts(_(" -n, --dry-run don't actually link anything"));
+- puts(_(" -v, --verbose print summary after hardlinking"));
+- puts(_(" -vv print every hardlinked file and summary"));
+- puts(_(" -f, --force force hardlinking across filesystems"));
+- puts(_(" -x, --exclude <regex> exclude files matching pattern"));
++ puts((" -c, --content compare only contents, ignore permission, etc."));
++ puts((" -n, --dry-run don't actually link anything"));
++ puts((" -v, --verbose print summary after hardlinking"));
++ puts((" -vv print every hardlinked file and summary"));
++ puts((" -f, --force force hardlinking across filesystems"));
++ puts((" -x, --exclude <regex> exclude files matching pattern"));
+
+ fputs(USAGE_SEPARATOR, stdout);
+ printf(USAGE_HELP_OPTIONS(16)); /* char offset to align option descriptions */
+@@ -164,7 +166,7 @@ static inline size_t add2(size_t a, size
+ size_t sum = a + b;
+
+ if (sum < a)
+- errx(EXIT_FAILURE, _("integer overflow"));
++ errx(EXIT_FAILURE, ("integer overflow"));
+ return sum;
+ }
+
+@@ -193,7 +195,7 @@ static void process_path(struct hardlink
+ if (st.st_dev != ctl->dev && !ctl->force) {
+ if (ctl->dev)
+ errx(EXIT_FAILURE,
+- _("%s is on different filesystem than the rest "
++ ("%s is on different filesystem than the rest "
+ "(use -f option to override)."), name);
+ ctl->dev = st.st_dev;
+ }
+@@ -287,9 +289,9 @@ static void process_path(struct hardlink
+ (ssize_t) sizeof(ctl->iobuf1) : fsize;
+
+ if ((xsz = read(fd, ctl->iobuf1, rsize)) != rsize)
+- warn(_("cannot read %s"), name);
++ warn(("cannot read %s"), name);
+ else if ((xsz = read(fd2, ctl->iobuf2, rsize)) != rsize)
+- warn(_("cannot read %s"), fp2->name);
++ warn(("cannot read %s"), fp2->name);
+
+ if (xsz != rsize) {
+ close(fd);
+@@ -303,13 +305,13 @@ static void process_path(struct hardlink
+ if (fsize > 0)
+ continue;
+ if (lstat(name, &st3)) {
+- warn(_("cannot stat %s"), name);
++ warn(("cannot stat %s"), name);
+ close(fd);
+ return;
+ }
+ st3.st_atime = st.st_atime;
+ if (stcmp(&st, &st3, 0)) {
+- warnx(_("file %s changed underneath us"), name);
++ warnx(("file %s changed underneath us"), name);
+ close(fd);
+ return;
+ }
+@@ -329,18 +331,18 @@ static void process_path(struct hardlink
+ suffixlen + 1);
+ /* First create a temporary link to n1 under a new name */
+ if (link(n1, nam2.buf)) {
+- warn(_("failed to hardlink %s to %s (create temporary link as %s failed)"),
++ warn(("failed to hardlink %s to %s (create temporary link as %s failed)"),
+ n1, n2, nam2.buf);
+ free(nam2.buf);
+ continue;
+ }
+ /* Then rename into place over the existing n2 */
+ if (rename(nam2.buf, n2)) {
+- warn(_("failed to hardlink %s to %s (rename temporary link to %s failed)"),
++ warn(("failed to hardlink %s to %s (rename temporary link to %s failed)"),
+ n1, n2, n2);
+ /* Something went wrong, try to remove the now redundant temporary link */
+ if (unlink(nam2.buf))
+- warn(_("failed to remove temporary link %s"), nam2.buf);
++ warn(("failed to remove temporary link %s"), nam2.buf);
+ free(nam2.buf);
+ continue;
+ }
+@@ -351,16 +353,16 @@ static void process_path(struct hardlink
+ /* We actually did not save anything this time, since the link second argument
+ had some other links as well. */
+ if (ctl->verbose > 1)
+- printf(_(" %s %s to %s\n"),
+- (ctl->no_link ? _("Would link") : _("Linked")),
++ printf((" %s %s to %s\n"),
++ (ctl->no_link ? ("Would link") : ("Linked")),
+ n1, n2);
+ } else {
+ ctl->nsaved += ((st.st_size + 4095) / 4096) * 4096;
+ if (ctl->verbose > 1)
+- printf(_(" %s %s to %s, %s %jd\n"),
+- (ctl->no_link ? _("Would link") : _("Linked")),
++ printf((" %s %s to %s, %s %jd\n"),
++ (ctl->no_link ? ("Would link") : ("Linked")),
+ n1, n2,
+- (ctl->no_link ? _("would save") : _("saved")),
++ (ctl->no_link ? ("would save") : ("saved")),
+ (intmax_t)st.st_size);
+ }
+ close(fd);
+@@ -410,11 +412,6 @@ int main(int argc, char **argv)
+ { NULL, 0, NULL, 0 },
+ };
+
+- setlocale(LC_ALL, "");
+- bindtextdomain(PACKAGE, LOCALEDIR);
+- textdomain(PACKAGE);
+- close_stdout_atexit();
+-
+ while ((ch = getopt_long(argc, argv, "cnvfx:Vh", longopts, NULL)) != -1) {
+ switch (ch) {
+ case 'n':
+@@ -434,7 +431,7 @@ int main(int argc, char **argv)
+ exclude_pattern = (PCRE2_SPTR) optarg;
+ #else
+ errx(EXIT_FAILURE,
+- _("option --exclude not supported (built without pcre2)"));
++ ("option --exclude not supported (built without pcre2)"));
+ #endif
+ break;
+ case 'V':
+@@ -447,7 +444,7 @@ int main(int argc, char **argv)
+ }
+
+ if (optind == argc) {
+- warnx(_("no directory specified"));
++ warnx(("no directory specified"));
+ errtryhelp(EXIT_FAILURE);
+ }
+
+@@ -461,7 +458,7 @@ int main(int argc, char **argv)
+ PCRE2_UCHAR buffer[256];
+ pcre2_get_error_message(errornumber, buffer,
+ sizeof(buffer));
+- errx(EXIT_FAILURE, _("pattern error at offset %d: %s"),
++ errx(EXIT_FAILURE, ("pattern error at offset %d: %s"),
+ (int)erroroffset, buffer);
+ }
+ match_data = pcre2_match_data_create_from_pattern(re, NULL);
+@@ -506,7 +503,7 @@ int main(int argc, char **argv)
+ >=0) {
+ if (ctl->verbose) {
+ nam1.buf[nam1baselen] = 0;
+- printf(_("Skipping %s%s\n"), nam1.buf, di->d_name);
++ printf(("Skipping %s%s\n"), nam1.buf, di->d_name);
+ }
+ continue;
+ }
+--- a/locale/programs/c.h
++++ b/locale/programs/c.h
+@@ -240,7 +240,7 @@ errmsg(char doexit, int excode, char add
+ /* Don't use inline function to avoid '#include "nls.h"' in c.h
+ */
+ #define errtryhelp(eval) __extension__ ({ \
+- fprintf(stderr, _("Try '%s --help' for more information.\n"), \
++ fprintf(stderr, ("Try '%s --help' for more information.\n"), \
+ program_invocation_short_name); \
+ exit(eval); \
+ })
diff --git a/meta/recipes-core/glibc/glibc/check-test-wrapper b/meta/recipes-core/glibc/glibc/check-test-wrapper
new file mode 100644
index 0000000000..f8e04e02d2
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/check-test-wrapper
@@ -0,0 +1,71 @@
+#!/usr/bin/env python3
+import sys
+import os
+import subprocess
+
+env = os.environ.copy()
+args = sys.argv[1:]
+targettype = args.pop(0)
+
+if targettype == "user":
+ qemuargs = os.environ.get("QEMU_OPTIONS", "").split()
+ if not os.path.exists(qemuargs[0]):
+ # ensure qemu args has a valid absolute path
+ for i in os.environ.get("PATH", "").split(":"):
+ if os.path.exists(os.path.join(i, qemuargs[0])):
+ qemuargs[0] = os.path.join(i, qemuargs[0])
+ break
+ sysroot = os.environ.get("QEMU_SYSROOT", None)
+ if not sysroot:
+ sys.exit(-1)
+ libpaths = [sysroot + "/usr/lib", sysroot + "/lib"]
+
+ if args[0] == "env":
+ args.pop(0)
+ if len(args) == 0:
+ args = ["env"]
+ else:
+ # process options
+ while args[0].startswith("-"):
+ opt = args.pop(0).lstrip("-")
+ if "i" in opt:
+ env.clear()
+ # process environment vars
+ while "=" in args[0]:
+ key, val = args.pop(0).split("=", 1)
+ if key == "LD_LIBRARY_PATH":
+ libpaths += val.split(":")
+ else:
+ env[key] = val
+ if args[0] == "cp":
+ # ignore copies, the filesystem is the same
+ sys.exit(0)
+
+ qemuargs += ["-L", sysroot]
+ qemuargs += ["-E", "LD_LIBRARY_PATH={}".format(":".join(libpaths))]
+ command = qemuargs + args
+elif targettype == "ssh":
+ host = os.environ.get("SSH_HOST", None)
+ user = os.environ.get("SSH_HOST_USER", None)
+ port = os.environ.get("SSH_HOST_PORT", None)
+
+ command = ["ssh", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no"]
+ if port:
+ command += ["-p", str(port)]
+ if not host:
+ sys.exit(-1)
+ command += ["{}@{}".format(user, host) if user else host]
+
+ # wrap and replace quotes for correct transformation on ssh
+ wrapped = " ".join(["'{0}'".format(i.replace("'", r"'\''")) for i in ["cd", os.getcwd()]]) + "; "
+ wrapped += " ".join(["'{0}'".format(i.replace("'", r"'\''")) for i in args])
+ command += ["sh", "-c", "\"{}\"".format(wrapped)]
+else:
+ sys.exit(-1)
+
+try:
+ r = subprocess.run(command, timeout = 1800, env = env)
+ sys.exit(r.returncode)
+except subprocess.TimeoutExpired:
+ sys.exit(-1)
+
diff --git a/meta/recipes-core/glibc/glibc/etc/ld.so.conf b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
index e69de29bb2..83327c01bf 100644
--- a/meta/recipes-core/glibc/glibc/etc/ld.so.conf
+++ b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
@@ -0,0 +1 @@
+include /etc/ld.so.conf.d/*.conf
diff --git a/meta/recipes-core/glibc/glibc/makedbs.sh b/meta/recipes-core/glibc/glibc/makedbs.sh
new file mode 100755
index 0000000000..7d51a67352
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/makedbs.sh
@@ -0,0 +1,177 @@
+#!/bin/sh
+
+#
+# Make passwd.db, group.db, etc.
+#
+
+VAR_DB=/var/db
+
+# Use make if available
+if [ -x /usr/bin/make -o -x /bin/make ]; then
+ make -C $VAR_DB
+ exit 0
+fi
+
+# No make available, do it in hard way
+
+# passwd.db
+if [ -e /etc/passwd ]; then
+target=$VAR_DB/passwd.db
+echo -n "passwd... "
+awk 'BEGIN { FS=":"; OFS=":" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$3; print }' /etc/passwd | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# group.db
+if [ -e /etc/group ]; then
+target=$VAR_DB/group.db
+echo -n "group... "
+awk 'BEGIN { FS=":"; OFS=":" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$3; print; \
+ if ($$4 != "") { \
+ split($$4, grmems, ","); \
+ for (memidx in grmems) { \
+ mem=grmems[memidx]; \
+ if (members[mem] == "") \
+ members[mem]=$$3; \
+ else \
+ members[mem]=members[mem] "," $$3; \
+ } \
+ delete grmems; } } \
+ END { for (mem in members) \
+ printf ":%s %s %s\n", mem, mem, members[mem]; }' /etc/group | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# ethers.db
+if [ -e /etc/ethers ]; then
+target=$VAR_DB/ethers.db
+echo -n "ethers... "
+awk '/^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$2; print }' /etc/ethers | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# protocols.db
+if [ -e /etc/protocols ]; then
+target=$VAR_DB/protocols.db
+echo -n "protocols... "
+awk '/^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$2; print; \
+ for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
+ { printf ".%s ", $$i; print } }' /etc/protocols | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# rpc.db
+if [ -e /etc/rpc ]; then
+target=$VAR_DB/rpc.db
+echo -n "rpc... "
+awk '/^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$2; print; \
+ for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
+ { printf ".%s ", $$i; print } }' /etc/rpc | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# services.db
+if [ -e /etc/services ]; then
+target=$VAR_DB/services.db
+echo -n "services... "
+awk 'BEGIN { FS="[ \t/]+" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { sub(/[ \t]*#.*$$/, "");\
+ printf ":%s/%s ", $$1, $$3; print; \
+ printf ":%s/ ", $$1; print; \
+ printf "=%s/%s ", $$2, $$3; print; \
+ printf "=%s/ ", $$2; print; \
+ for (i = 4; i <= NF && !($$i ~ /^#/); ++i) \
+ { printf ":%s/%s ", $$i, $$3; print; \
+ printf ":%s/ ", $$i; print } }' /etc/services | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# shadow.db
+if [ -e /etc/shadow ]; then
+target=$VAR_DB/shadow.db
+echo -n "shadow... "
+awk 'BEGIN { FS=":"; OFS=":" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print }' /etc/shadow | \
+(umask 077 && makedb --quiet -o $target -)
+echo "done."
+if chgrp shadow $target 2>/dev/null; then
+ chmod g+r $target
+else
+ chown 0 $target; chgrp 0 $target; chmod 600 $target;
+ echo
+ echo "Warning: The shadow password database $target"
+ echo "has been set to be readable only by root. You may want"
+ echo "to make it readable by the \`shadow' group depending"
+ echo "on your configuration."
+ echo
+fi
+fi
+
+# gshadow.db
+if [ -e /etc/gshadow ]; then
+target=$VAR_DB/gshadow.db
+echo -n "gshadow... "
+awk 'BEGIN { FS=":"; OFS=":" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print }' /etc/gshadow | \
+(umask 077 && makedb --quiet -o $target -)
+echo "done."
+if chgrp shadow $target 2>/dev/null; then
+ chmod g+r $target
+else
+ chown 0 $target; chgrp 0 $target; chmod 600 $target
+ echo
+ echo "Warning: The shadow group database $target"
+ echo "has been set to be readable only by root. You may want"
+ echo "to make it readable by the \`shadow' group depending"
+ echo "on your configuration."
+ echo
+fi
+fi
+
+# netgroup.db
+if [ -e /etc/netgroup ]; then
+target=$VAR_DB/netgroup.db
+echo -n "netgroup... "
+awk 'BEGIN { ini=1 } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { if (sub(/[ \t]*\\$$/, " ") == 0) end="\n"; \
+ else end=""; \
+ gsub(/[ \t]+/, " "); \
+ sub(/^[ \t]*/, ""); \
+ if (ini == 0) printf "%s%s", $$0, end; \
+ else printf ".%s %s%s", $$1, $$0, end; \
+ ini=end == "" ? 0 : 1; } \
+ END { if (ini==0) printf "\n" }' /etc/netgroup | \
+makedb --quiet -o $target
+echo "done."
+fi
diff --git a/meta/recipes-core/glibc/glibc_2.24.bb b/meta/recipes-core/glibc/glibc_2.24.bb
deleted file mode 100644
index f5a21b258d..0000000000
--- a/meta/recipes-core/glibc/glibc_2.24.bb
+++ /dev/null
@@ -1,140 +0,0 @@
-require glibc.inc
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS += "gperf-native"
-
-SRCREV ?= "ea23815a795f72035262953dad5beb03e09c17dd"
-
-SRCBRANCH ?= "release/${PV}/master"
-
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
- file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
- file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
- file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
- file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
- file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
- file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
- file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
- file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \
- file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
- file://0014-Add-unused-attribute.patch \
- file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
- file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
- file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
- file://0018-eglibc-Cross-building-and-testing-instructions.patch \
- file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
- file://0020-eglibc-cherry-picked-from.patch \
- file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
- file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
- file://0023-eglibc-Install-PIC-archives.patch \
- file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \
- file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
- file://0026-build_local_scope.patch \
-"
-
-SRC_URI += "\
- file://etc/ld.so.conf \
- file://generate-supported.mk \
- file://0001-locale-fix-hard-coded-reference-to-gcc-E.patch \
- "
-
-SRC_URI_append_class-nativesdk = "\
- file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
- file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
- file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
- file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
-"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build-${TARGET_SYS}"
-
-PACKAGES_DYNAMIC = ""
-
-# the -isystem in bitbake.conf screws up glibc do_stage
-BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
-TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
-
-GLIBC_BROKEN_LOCALES = ""
-#
-# We will skip parsing glibc when target system C library selection is not glibc
-# this helps in easing out parsing for non-glibc system libraries
-#
-COMPATIBLE_HOST_libc-musl_class-target = "null"
-COMPATIBLE_HOST_libc-uclibc_class-target = "null"
-
-EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
- --without-cvs --disable-profile \
- --disable-debug --without-gd \
- --enable-clocale=gnu \
- --enable-add-ons \
- --with-headers=${STAGING_INCDIR} \
- --without-selinux \
- --enable-obsolete-rpc \
- ${GLIBC_EXTRA_OECONF}"
-
-EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
-
-
-do_patch_append() {
- bb.build.exec_func('do_fix_readlib_c', d)
-}
-
-do_fix_readlib_c () {
- sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
-}
-
-do_configure () {
-# override this function to avoid the autoconf/automake/aclocal/autoheader
-# calls for now
-# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
-# version check and doesn't really help with anything
- (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
- find ${S} -name "configure" | xargs touch
- CPPFLAGS="" oe_runconf
-}
-
-rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
- yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
- rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
-
-do_compile () {
- # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
- unset LDFLAGS
- base_do_compile
- (
- cd ${S}/sunrpc/rpcsvc
- for r in ${rpcsvc}; do
- h=`echo $r|sed -e's,\.x$,.h,'`
- rm -f $h
- ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
- done
- )
- echo "Adjust ldd script"
- if [ -n "${RTLDLIST}" ]
- then
- prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
- if [ "${prevrtld}" != "${RTLDLIST}" ]
- then
- sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
- fi
- fi
-
-}
-
-# Use the host locale archive when built for nativesdk so that we don't need to
-# ship a complete (100MB) locale set.
-do_compile_prepend_class-nativesdk() {
- echo "complocaledir=/usr/lib/locale" >> ${S}/configparms
-}
-
-require glibc-package.inc
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/glibc/glibc_2.30.bb b/meta/recipes-core/glibc/glibc_2.30.bb
new file mode 100644
index 0000000000..7913bc2812
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc_2.30.bb
@@ -0,0 +1,113 @@
+require glibc.inc
+require glibc-version.inc
+
+DEPENDS += "gperf-native bison-native make-native"
+
+NATIVESDKFIXES ?= ""
+NATIVESDKFIXES_class-nativesdk = "\
+ file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
+ file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
+ file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
+ file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
+ file://0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch \
+"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+ file://etc/ld.so.conf \
+ file://generate-supported.mk \
+ file://makedbs.sh \
+ \
+ ${NATIVESDKFIXES} \
+ file://0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
+ file://0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
+ file://0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
+ file://0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+ file://0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
+ file://0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
+ file://0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+ file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
+ file://0014-Add-unused-attribute.patch \
+ file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
+ file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0020-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+ file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
+ file://0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
+ file://0026-intl-Emit-no-lines-in-bison-generated-files.patch \
+ file://0027-inject-file-assembly-directives.patch \
+ file://0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
+ file://CVE-2019-19126.patch \
+ "
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+PACKAGES_DYNAMIC = ""
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+
+GLIBC_BROKEN_LOCALES = ""
+
+GLIBCPIE ??= ""
+
+EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
+ --disable-profile \
+ --disable-debug --without-gd \
+ --enable-clocale=gnu \
+ --with-headers=${STAGING_INCDIR} \
+ --without-selinux \
+ --enable-tunables \
+ --enable-bind-now \
+ --enable-stack-protector=strong \
+ --enable-stackguard-randomization \
+ --disable-crypt \
+ --with-default-link \
+ --enable-nscd \
+ ${@bb.utils.contains_any('SELECTED_OPTIMIZATION', '-O0 -Og', '--disable-werror', '', d)} \
+ ${GLIBCPIE} \
+ ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
+
+do_patch_append() {
+ bb.build.exec_func('do_fix_readlib_c', d)
+}
+
+do_fix_readlib_c () {
+ sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
+}
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ find ${S} -name "configure" | xargs touch
+ CPPFLAGS="" oe_runconf
+}
+
+do_compile () {
+ # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+ LDFLAGS="-fuse-ld=bfd"
+ base_do_compile
+ echo "Adjust ldd script"
+ if [ -n "${RTLDLIST}" ]
+ then
+ prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
+ # remove duplicate entries
+ newrtld=`echo $(printf '%s\n' ${prevrtld} ${RTLDLIST} | LC_ALL=C sort -u)`
+ echo "ldd \"${prevrtld} ${RTLDLIST}\" -> \"${newrtld}\""
+ sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#"
+ fi
+}
+
+require glibc-package.inc
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/glibc/site_config/funcs b/meta/recipes-core/glibc/site_config/funcs
deleted file mode 100644
index ccc85392d7..0000000000
--- a/meta/recipes-core/glibc/site_config/funcs
+++ /dev/null
@@ -1,474 +0,0 @@
-a64l
-abs
-access
-__adjtimex
-alarm
-alphasort
-argz_append
-__argz_count
-argz_create_sep
-argz_insert
-__argz_next
-argz_next
-__argz_stringify
-argz_stringify
-asprintf
-atexit
-atof
-atoi
-bcmp
-bcopy
-bindresvport
-bind_textdomain_codeset
-btowc
-bzero
-calloc
-canonicalize_file_name
-catgets
-cfgetospeed
-cfsetispeed
-cfsetspeed
-chmod
-chown
-chroot
-clock
-close
-closedir
-closelog
-confstr
-connect
-daemon
-dcgettext
-difftime
-dirfd
-dirname
-dngettext
-dup2
-ecvt
-endgrent
-endmntent
-endpwent
-endutent
-endutxent
-epoll_ctl
-err
-ether_hostton
-ether_ntohost
-euidaccess
-execv
-fchdir
-fchmod
-fchmodat
-fchown
-fchownat
-fcntl
-fcvt
-fdatasync
-fdopendir
-feof_unlocked
-fgets_unlocked
-fgetxattr
-finite
-flistxattr
-flock
-flockfile
-fnmatch
-fork
-fpathconf
-__fpending
-fprintf
-free
-freeaddrinfo
-freeifaddrs
-fseeko
-__fsetlocking
-fsetxattr
-fstat64
-fstat
-fstatfs
-fsync
-ftello
-ftime
-ftruncate
-funlockfile
-futimes
-futimesat
-gai_strerror
-gcvt
-getaddrinfo
-getc_unlocked
-getcwd
-getdelim
-getdomainname
-getdtablesize
-getegid
-getenv
-geteuid
-getgid
-getgrent
-getgrent_r
-getgrgid_r
-getgrnam
-getgrnam_r
-getgrouplist
-getgroups
-gethostbyaddr_r
-gethostbyname2
-gethostbyname
-gethostbyname_r
-gethostent
-gethostid
-gethostname
-getifaddrs
-getline
-getloadavg
-getmntent
-getmsg
-getnameinfo
-getnetbyaddr_r
-getnetgrent_r
-getopt
-getopt_long
-getopt_long_only
-getpagesize
-getpass
-getpeername
-getpgrp
-getpid
-getppid
-getprotoent_r
-getpwent
-getpwent_r
-getpwnam
-getpwnam_r
-getpwuid
-getpwuid_r
-getresuid
-getrlimit
-getrusage
-getservbyname
-getservbyname_r
-getservbyport_r
-getservent
-getservent_r
-getspnam
-getspnam_r
-gettimeofday
-getttyent
-getttynam
-getuid
-getusershell
-getutent
-getutid
-getutline
-getutmp
-getutmpx
-getutxent
-getutxid
-getutxline
-getwd
-getxattr
-glob
-gmtime
-gmtime_r
-grantpt
-group_member
-herror
-hstrerror
-iconv
-iconv_open
-if_freenameindex
-if_indextoname
-if_nameindex
-if_nametoindex
-index
-inet_addr
-inet_aton
-inet_ntoa
-inet_ntop
-inet_pton
-initgroups
-innetgr
-iruserok
-isascii
-isatty
-isblank
-isgraph
-isinf
-isnan
-isprint
-isspace
-iswalnum
-iswcntrl
-iswctype
-iswprint
-iswspace
-iswupper
-isxdigit
-kill
-killpg
-lchown
-lckpwdf
-lgetxattr
-link
-listxattr
-llistxattr
-localtime
-localtime_r
-lockf
-lrand48
-lsearch
-lseek64
-lsetxattr
-lstat
-mallinfo
-malloc
-mblen
-mbrlen
-mbrtowc
-mbsinit
-mbsrtowcs
-mbtowc
-memalign
-memchr
-memcmp
-memcpy
-memmove
-mempcpy
-memrchr
-memset
-mkdir
-mkdirat
-mkdtemp
-mkfifo
-mknod
-mkstemp64
-mkstemp
-mktime
-mlock
-mmap
-mtrace
-munlock
-munmap
-nanosleep
-nice
-nl_langinfo
-ntp_adjtime
-ntp_gettime
-_obstack_free
-on_exit
-open64
-open
-openat
-opendir
-openlog
-pathconf
-pipe
-poll
-popen
-posix_memalign
-prctl
-pread
-printf
-__progname
-pselect
-pthread_mutex_lock
-ptsname
-putenv
-putgrent
-putpwent
-putspent
-pututline
-pututxline
-putwc
-pwrite
-qsort
-raise
-rand
-random
-rand_r
-read
-readdir
-readdir_r
-readlink
-realloc
-realpath
-re_comp
-recvmsg
-re_exec
-regcomp
-regexec
-remove
-rename
-re_search
-rmdir
-rpmatch
-rresvport_af
-ruserok
-ruserok_af
-sbrk
-scandir
-sched_setscheduler
-sched_yield
-__secure_getenv
-select
-semctl
-semget
-sendmsg
-setbuf
-setbuffer
-setegid
-setenv
-seteuid
-setgid
-setgroups
-sethostname
-setitimer
-_setjmp
-setjmp
-setlinebuf
-setlocale
-setmntent
-setpgid
-setpgrp
-setpriority
-setregid
-setresgid
-setresuid
-setreuid
-setrlimit
-setsid
-setsockopt
-settimeofday
-setuid
-setutent
-setutxent
-setvbuf
-setxattr
-sgetspent
-shmat
-shmctl
-shmdt
-shmget
-shutdown
-sigaction
-sigaddset
-sigaltstack
-sigblock
-sigemptyset
-sighold
-siginterrupt
-signal
-sigprocmask
-sigset
-sigsetmask
-sigstack
-sigsuspend
-sigvec
-snprintf
-socket
-socketpair
-sprintf
-srand48
-srand
-srandom
-sscanf
-stat
-statfs
-statvfs
-stime
-stpcpy
-strcasecmp
-strcasestr
-strchr
-strchrnul
-strcmp
-strcspn
-strdup
-strerror
-strerror_r
-strftime
-strlen
-strncasecmp
-strncmp
-strndup
-strnlen
-strpbrk
-strptime
-strrchr
-strsep
-strsignal
-strspn
-strstr
-strtod
-strtoimax
-strtok_r
-strtol
-strtoll
-strtoul
-strtoull
-strtoumax
-strverscmp
-strxfrm
-symlink
-sync
-sysconf
-sysctl
-sysinfo
-syslog
-_sys_siglist
-sys_siglist
-system
-tcgetattr
-tcgetpgrp
-tcsetattr
-tcsetpgrp
-time
-timegm
-times
-timezone
-tmpnam
-towlower
-towupper
-truncate
-tsearch
-ttyname
-tzset
-ulimit
-umask
-uname
-unlink
-unsetenv
-unshare
-updwtmp
-updwtmpx
-usleep
-ustat
-utime
-utimes
-utmpname
-utmpxname
-valloc
-vasprintf
-verrx
-vfork
-vfprintf
-vfscanf
-vhangup
-vprintf
-vsnprintf
-vsprintf
-wait3
-wait4
-waitpid
-wcrtomb
-wcscoll
-wcsdup
-wcslen
-wctob
-wctomb
-wctype
-wcwidth
-wmemchr
-wmemcpy
-wmempcpy
diff --git a/meta/recipes-core/glibc/site_config/headers b/meta/recipes-core/glibc/site_config/headers
deleted file mode 100644
index 609ab53797..0000000000
--- a/meta/recipes-core/glibc/site_config/headers
+++ /dev/null
@@ -1,156 +0,0 @@
-aio.h
-alloca.h
-argz.h
-arpa/inet.h
-arpa/nameser.h
-asm/byteorder.h
-asm/ioctls.h
-asm/page.h
-asm/types.h
-assert.h
-byteswap.h
-crypt.h
-ctype.h
-dirent.h
-dlfcn.h
-elf.h
-endian.h
-err.h
-errno.h
-execinfo.h
-fcntl.h
-features.h
-float.h
-fstab.h
-ftw.h
-getopt.h
-glob.h
-grp.h
-iconv.h
-ifaddrs.h
-inttypes.h
-langinfo.h
-lastlog.h
-libgen.h
-libintl.h
-limits.h
-linux/capability.h
-linux/fd.h
-linux/fs.h
-linux/hayesesp.h
-linux/hdreg.h
-linux/icmp.h
-linux/in6.h
-linux/joystick.h
-linux/ptrace.h
-linux/serial.h
-linux/sonypi.h
-linux/unistd.h
-linux/utsname.h
-linux/version.h
-locale.h
-malloc.h
-math.h
-mcheck.h
-memory.h
-mntent.h
-mqueue.h
-netdb.h
-net/if.h
-netinet/ether.h
-netinet/in.h
-netinet/ip6.h
-netinet/ip.h
-netinet/tcp.h
-netinet/udp.h
-netipx/ipx.h
-net/route.h
-paths.h
-poll.h
-pthread.h
-pty.h
-pwd.h
-regex.h
-resolv.h
-rpc/rpc.h
-rpc/types.h
-sched.h
-scsi/scsi.h
-search.h
-semaphore.h
-setjmp.h
-sgtty.h
-shadow.h
-signal.h
-stdarg.h
-stdbool.h
-stdc
-stddef.h
-stdint.h
-stdio.h
-stdlib.h
-string.h
-strings.h
-stropts.h
-sys/bitypes.h
-sys/cdefs.h
-sys/dir.h
-sys/epoll.h
-sysexits.h
-sys/fcntl.h
-sys/file.h
-sys/fsuid.h
-sys/ioctl.h
-sys/ipc.h
-syslog.h
-sys/mman.h
-sys/mount.h
-sys/mtio.h
-sys/param.h
-sys/poll.h
-sys/prctl.h
-sys/ptrace.h
-sys/queue.h
-sys/reg.h
-sys/resource.h
-sys/select.h
-sys/sem.h
-sys/shm.h
-sys/signal.h
-sys/socket.h
-sys/socketvar.h
-sys/soundcard.h
-sys/statfs.h
-sys/stat.h
-sys/statvfs.h
-sys/stropts.h
-sys/swap.h
-sys/sysctl.h
-sys/sysinfo.h
-sys/sysmacros.h
-sys/termios.h
-sys/timeb.h
-sys/time.h
-sys/times.h
-sys/timex.h
-sys/types.h
-sys/uio.h
-sys/un.h
-sys/unistd.h
-sys/user.h
-sys/utsname.h
-sys/vfs.h
-sys/wait.h
-termio.h
-termios.h
-time.h
-ttyent.h
-ulimit.h
-unistd.h
-ustat.h
-utime.h
-utmp.h
-utmpx.h
-values.h
-wchar.h
-wctype.h
diff --git a/meta/recipes-core/glibc/site_config/types b/meta/recipes-core/glibc/site_config/types
deleted file mode 100644
index 178bd85a00..0000000000
--- a/meta/recipes-core/glibc/site_config/types
+++ /dev/null
@@ -1,21 +0,0 @@
-char
-char *
-double
-float
-int
-long
-long double
-long int
-long long
-long long int
-short
-short int
-signed char
-unsigned char
-unsigned int
-unsigned long
-unsigned long int
-unsigned long long int
-unsigned short
-unsigned short int
-void *
diff --git a/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch b/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch
new file mode 100644
index 0000000000..7bf02ea536
--- /dev/null
+++ b/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch
@@ -0,0 +1,47 @@
+From ff714d6461569d69b253089110ec659e4ebec248 Mon Sep 17 00:00:00 2001
+From: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+Date: Tue, 2 Jul 2019 20:10:42 +0200
+Subject: [PATCH] Define FNM_EXTMATCH for musl
+
+Fixes the following compilation errors with musl that does not have
+FNM_EXTMATCH defined:
+
+| main.c: In function 'expand_matches':
+| main.c:700:40: error: 'FNM_EXTMATCH' undeclared (first use in this
+function); did you mean 'FNM_NOMATCH'?
+| 700 | if(fnmatch(pattern, ifa->ifa_name, FNM_EXTMATCH))
+| | ^~~~~~~~~~~~
+| | FNM_NOMATCH
+
+and
+
+| archlinux.c:40:28: error: 'FNM_EXTMATCH' undeclared (first use in this
+function); did you mean 'FNM_NOMATCH'?
+| 40 | if(fnmatch(pattern, buf, FNM_EXTMATCH) == 0) {
+| | ^~~~~~~~~~~~
+| | FNM_NOMATCH
+
+Upstream-Status: Submitted [https://salsa.debian.org/debian/ifupdown/merge_requests/5]
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+---
+ archcommon.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/archcommon.h b/archcommon.h
+index fe99950..f257f9d 100644
+--- a/archcommon.h
++++ b/archcommon.h
+@@ -1,5 +1,9 @@
+ #include "header.h"
+
++#if !defined(FNM_EXTMATCH)
++#define FNM_EXTMATCH 0
++#endif
++
+ bool execable(const char *);
+
+ #define iface_is_link() (!_iface_has(ifd->real_iface, ":."))
+--
+2.17.1
+
diff --git a/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch b/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
index 8c4d953a28..d1c3d260ed 100644
--- a/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
+++ b/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
@@ -1,4 +1,4 @@
-From 7af9db748974cb3a2c6ef8f9e03d7db1f9f8ee16 Mon Sep 17 00:00:00 2001
+From 40257d65b338b6e2ed9d89d6fa7c7b8701a4c311 Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Wed, 6 Aug 2014 14:54:12 -0400
Subject: [PATCH 1/2] defn2[c|man]: don't rely on dpkg-architecture to set arch
@@ -12,13 +12,14 @@ arch specific methods, and the end result will be strangeness
like the loopback device not being configured/enabled.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+Upstream-Status: Pending
---
defn2c.pl | 6 +++---
defn2man.pl | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/defn2c.pl b/defn2c.pl
-index c449de2f3d1c..38845e374c76 100755
+index 8798dc2..f2551c7 100755
--- a/defn2c.pl
+++ b/defn2c.pl
@@ -2,9 +2,9 @@
@@ -35,7 +36,7 @@ index c449de2f3d1c..38845e374c76 100755
# declarations
my $address_family = "";
diff --git a/defn2man.pl b/defn2man.pl
-index 6ddcfdd4fe68..c9c4dd046597 100755
+index 6ddcfdd..c9c4dd0 100755
--- a/defn2man.pl
+++ b/defn2man.pl
@@ -2,9 +2,9 @@
@@ -52,5 +53,5 @@ index 6ddcfdd4fe68..c9c4dd046597 100755
# declarations
my $line;
--
-1.9.1
+2.17.1
diff --git a/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch b/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch
index bff352e3af..5b0d51d736 100644
--- a/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch
+++ b/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch
@@ -1,6 +1,6 @@
-From 74152ac74a3e1ea0f3be292aa1eeca5ad1fe69c0 Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Wed, 6 Aug 2014 15:12:11 -0400
+From 6fce99c9e42cbacde1855473b745ca1fded3fbf7 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 21 Dec 2016 15:32:07 +0200
Subject: [PATCH 2/2] inet[6].defn: fix inverted checks for loopback
Compared to the hurd link.defn for loopback, we see these
@@ -11,93 +11,393 @@ The result was that we'd update /run/network/ifstate for "lo"
but never actually do anything for up/down, as shown below:
root@localhost:~# ifconfig -s
-Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
-eth0 1500 0 7736329 0 2016 0 5289422 0 0 0 BMRU
-lo 65536 0 18 0 0 0 18 0 0 0 LRU
+Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
+eth0 1500 0 7736329 0 2016 0 5289422 0 0 0 BMRU
+lo 65536 0 18 0 0 0 18 0 0 0 LRU
root@localhost:~# ifdown lo
root@localhost:~# echo $?
0
root@localhost:~# ifconfig -s
-Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
-eth0 1500 0 7736406 0 2016 0 5289455 0 0 0 BMRU
-lo 65536 0 18 0 0 0 18 0 0 0 LRU
+Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
+eth0 1500 0 7736406 0 2016 0 5289455 0 0 0 BMRU
+lo 65536 0 18 0 0 0 18 0 0 0 LRU
root@localhost:~# ifconfig lo down
root@localhost:~# ifconfig -s
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
-eth0 1500 0 7736474 0 2016 0 5289481 0 0 0 BMRU
+eth0 1500 0 7736474 0 2016 0 5289481 0 0 0 BMRU
root@localhost:~#
+Also reverted the commit:
+commit 80b878497663dae08f70b4d3cffe127b57a3cfc
+which uses absolute paths to binaries called by ifup/ifdown.
+
+Upstream-Status: Inappropriate [OE specific]
+
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
- inet.defn | 12 ++++++------
- inet6.defn | 8 ++++----
- 2 files changed, 10 insertions(+), 10 deletions(-)
+ inet.defn | 134 +++++++++++++++++++++++++++---------------------------
+ 1 file changed, 67 insertions(+), 67 deletions(-)
diff --git a/inet.defn b/inet.defn
-index b176ab4ed03e..5fdfb14a0e1c 100644
+index 182b56b..31067bc 100644
--- a/inet.defn
+++ b/inet.defn
@@ -6,10 +6,10 @@ method loopback
This method may be used to define the IPv4 loopback interface.
up
-- ip link set dev %iface% up if (!iface_is_lo())
-+ ip link set dev %iface% up if (iface_is_lo())
+- /bin/ip link set dev %iface% up if (!iface_is_lo())
++ ip link set dev %iface% up if (!iface_is_lo())
down
-- ip link set dev %iface% down if (!iface_is_lo())
-+ ip link set dev %iface% down if (iface_is_lo())
+- /bin/ip link set dev %iface% down if (!iface_is_lo())
++ ip link set dev %iface% down if (!iface_is_lo())
method static
description
-@@ -212,11 +212,11 @@ method loopback
+@@ -36,17 +36,17 @@ method static
+ broadcast compute_v4_broadcast
up
- ifconfig %iface% 127.0.0.1 up \
-- if (!iface_is_lo())
-+ if (iface_is_lo())
+- /bin/ip addr add %address%[[/%netmask%]] [[broadcast %broadcast%]] \
++ ip addr add %address%[[/%netmask%]] [[broadcast %broadcast%]] \
+ [[peer %pointopoint%]] [[scope %scope%]] dev %iface% label %iface%
+- /bin/ip link set dev %iface% [[mtu %mtu%]] [[address %hwaddress%]] up
++ ip link set dev %iface% [[mtu %mtu%]] [[address %hwaddress%]] up
+
+- [[ /bin/ip route add default via %gateway% [[metric %metric%]] dev %iface% onlink ]]
++ [[ ip route add default via %gateway% [[metric %metric%]] dev %iface% onlink ]]
down
- ifconfig %iface% down \
-- if (!iface_is_lo())
-+ if (iface_is_lo())
+- [[ /bin/ip route del default via %gateway% [[metric %metric%]] dev %iface% 2>&1 1>/dev/null || true ]]
+- /bin/ip addr del %address%[[/%netmask%]] [[broadcast %broadcast%]] \
++ [[ ip route del default via %gateway% [[metric %metric%]] dev %iface% 2>&1 1>/dev/null || true ]]
++ ip addr del %address%[[/%netmask%]] [[broadcast %broadcast%]] \
+ [[peer %pointopoint%]] [[scope %scope%]] dev %iface% label %iface%
+- /bin/ip link set dev %iface% down \
++ ip link set dev %iface% down \
+ if (iface_is_link())
- method static
+ method manual
+@@ -63,12 +63,12 @@ method manual
+ hwaddress cleanup_hwaddress
+
+ up
+- [[/bin/ip link set dev %iface% mtu %mtu%]]
+- [[/bin/ip link set dev %iface% address %hwaddress%]]
+- /bin/ip link set dev %iface% up 2>/dev/null || true
++ [[ip link set dev %iface% mtu %mtu%]]
++ [[ip link set dev %iface% address %hwaddress%]]
++ ip link set dev %iface% up 2>/dev/null || true
+
+ down
+- /bin/ip link set dev %iface% down 2>/dev/null || true \
++ ip link set dev %iface% down 2>/dev/null || true \
+ if (iface_is_link() && !do_all)
+
+ method dhcp
+@@ -93,33 +93,33 @@ method dhcp
+ hwaddress cleanup_hwaddress
+
+ up
+- [[/bin/ip link set dev %iface% address %hwaddress%]]
+- /sbin/dhclient -4 -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
++ [[ip link set dev %iface% address %hwaddress%]]
++ dhclient -4 -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
+ [[-e IF_METRIC=%metric%]] \
+ if (execable("/sbin/dhclient"))
+- /sbin/pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \
++ pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \
+ elsif (execable("/sbin/pump"))
+- /sbin/udhcpc -n -p /run/udhcpc.%iface%.pid -i %iface% [[-x hostname:%hostname%]] \
++ udhcpc -n -p /run/udhcpc.%iface%.pid -i %iface% [[-x hostname:%hostname%]] \
+ elsif (execable("/sbin/udhcpc"))
+- /sbin/dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %client%]] \
++ dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %client%]] \
+ [[-l %leasetime%]] [[-m %metric%]] %iface% \
+ elsif (execable("/sbin/dhcpcd"))
+ echo 'No DHCP client software found!' >/dev/stderr; false \
+ elsif (1)
+
+ down
+- /sbin/dhclient -4 -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
++ dhclient -4 -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
+ if (execable("/sbin/dhclient"))
+- /sbin/pump -i %iface% -r \
++ pump -i %iface% -r \
+ elsif (execable("/sbin/pump"))
+ if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface%.pid); fi \
+ elsif (execable("/sbin/udhcpc"))
+- /sbin/dhcpcd -k %iface% \
++ dhcpcd -k %iface% \
+ elsif (execable("/sbin/dhcpcd"))
+ echo 'No DHCP client software found!' >/dev/stderr; false \
+ elsif (1)
+
+- /bin/ip link set dev %iface% down \
++ ip link set dev %iface% down \
+ if (iface_is_link())
+
+ method bootp
+@@ -134,11 +134,11 @@ method bootp
+ whatever it really is.
+
+ up
+- /sbin/bootpc [[--bootfile %bootfile%]] --dev %iface% [[--server %server%]] \
++ bootpc [[--bootfile %bootfile%]] --dev %iface% [[--server %server%]] \
+ [[--hwaddr %hwaddr%]] --returniffail --serverbcast
+
+ down
+- /bin/ip link set dev %iface% down \
++ ip link set dev %iface% down \
+ if (iface_is_link())
+
+ method tunnel
+@@ -158,13 +158,13 @@ method tunnel
+ ttl time -- TTL setting
+ mtu size -- MTU size
+ up
+- /bin/ip tunnel add %iface% mode %mode% remote %endpoint% [[local %local%]] \
++ ip tunnel add %iface% mode %mode% remote %endpoint% [[local %local%]] \
+ [[ttl %ttl%]]
+- /bin/ip link set %iface% up [[mtu %mtu%]]
+- /bin/ip addr add %address%/%netmask% dev %iface% [[peer %dstaddr%]]
+- [[ /bin/ip route add default via %gateway% [[metric %metric%]] dev %iface% onlink ]]
++ ip link set %iface% up [[mtu %mtu%]]
++ ip addr add %address%/%netmask% dev %iface% [[peer %dstaddr%]]
++ [[ ip route add default via %gateway% [[metric %metric%]] dev %iface% onlink ]]
+ down
+- /bin/ip tunnel del %iface%
++ ip tunnel del %iface%
+
+ method ppp
description
-@@ -371,11 +371,11 @@ method loopback
+@@ -175,9 +175,9 @@ method ppp
+ unit number -- Use /number/ as the ppp unit number.
+ options string -- Pass /string/ as additional options to pon.
+ up
+- /usr/bin/pon [[%provider%]] [[unit %unit%]] [[%options%]]
++ pon [[%provider%]] [[unit %unit%]] [[%options%]]
+ down
+- /usr/bin/poff [[%provider%]]
++ poff [[%provider%]]
+ method wvdial
+ description
+@@ -186,10 +186,10 @@ method wvdial
+ options
+ provider name -- Use /name/ as the provider (from /etc/wvdial.conf).
up
- inetutils-ifconfig --interface %iface% --address 127.0.0.1 --up \
-- if (!iface_is_lo())
-+ if (iface_is_lo())
+- /sbin/start-stop-daemon --start -x /usr/bin/wvdial \
++ start-stop-daemon --start -x /usr/bin/wvdial \
+ -p /run/wvdial.%iface%.pid -b -m -- [[ %provider% ]]
+ down
+- /sbin/start-stop-daemon --stop -x /usr/bin/wvdial \
++ start-stop-daemon --stop -x /usr/bin/wvdial \
+ -p /run/wvdial.%iface%.pid -s 2
+
+@@ -200,9 +200,9 @@ method ipv4ll
+ known as APIPA or IPAC, and often colloquially referred to
+ as "Zeroconf address".
+ up
+- /usr/sbin/avahi-autoipd -D %iface%
++ avahi-autoipd -D %iface%
down
- inetutils-ifconfig --interface %iface% --down \
-- if (!iface_is_lo())
-+ if (iface_is_lo())
+- /usr/sbin/avahi-autoipd --kill %iface%
++ avahi-autoipd --kill %iface%
+
+ architecture kfreebsd
+
+@@ -211,11 +211,11 @@ method loopback
+ This method may be used to define the IPv4 loopback interface.
+
+ up
+- /sbin/ifconfig %iface% 127.0.0.1 up \
++ ifconfig %iface% 127.0.0.1 up \
+ if (!iface_is_lo())
+
+ down
+- /sbin/ifconfig %iface% down \
++ ifconfig %iface% down \
+ if (!iface_is_lo())
method static
+@@ -238,15 +238,15 @@ method static
+ hwaddress cleanup_hwaddress
+
+ up
+- [[ /sbin/ifconfig %iface% link %hwaddress%]]
+- /sbin/ifconfig %iface% %address% [[netmask %netmask%]] [[broadcast %broadcast%]] \
++ [[ ifconfig %iface% link %hwaddress%]]
++ ifconfig %iface% %address% [[netmask %netmask%]] [[broadcast %broadcast%]] \
+ [[pointopoint %pointopoint%]] [[media %media%]] [[mtu %mtu%]] \
+ up
+- [[ /sbin/route add default %gateway% ]]
++ [[ route add default %gateway% ]]
+
+ down
+- [[ /sbin/route del default %gateway% 2>&1 1>/dev/null || true ]]
+- /sbin/ifconfig %iface% down
++ [[ route del default %gateway% 2>&1 1>/dev/null || true ]]
++ ifconfig %iface% down
+
+ method manual
description
-diff --git a/inet6.defn b/inet6.defn
-index 09325539cd01..4df64aff38cc 100644
---- a/inet6.defn
-+++ b/inet6.defn
-@@ -33,11 +33,11 @@ method loopback
+@@ -279,30 +279,30 @@ method dhcp
+ hwaddress cleanup_hwaddress
+
+ up
+- [[/sbin/ifconfig %iface% link %hwaddress%]]
+- /sbin/dhclient -4 -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
++ [[ifconfig %iface% link %hwaddress%]]
++ dhclient -4 -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
+ [[-e IF_METRIC=%metric%]] \
+ if (execable("/sbin/dhclient"))
+- /sbin/udhcpc -n -p /run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \
++ udhcpc -n -p /run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \
+ [[-c %client%]] \
+ elsif (execable("/sbin/udhcpc"))
+- /sbin/dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %client%]] \
++ dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %client%]] \
+ [[-l %leasetime%]] %iface% \
+ elsif (execable("/sbin/dhcpcd"))
+ echo 'No DHCP client software found!' >/dev/stderr; false \
+ elsif (1)
+
+ down
+- /sbin/dhclient -4 -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
++ dhclient -4 -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
+ if (execable("/sbin/dhclient"))
+ if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface%.pid); fi \
+ elsif (execable("/sbin/udhcpc"))
+- /sbin/dhcpcd -k %iface% \
++ dhcpcd -k %iface% \
+ elsif (execable("/sbin/dhcpcd"))
+ echo 'No DHCP client software found!' >/dev/stderr; false \
+ elsif (1)
+
+- /sbin/ifconfig %iface% down
++ ifconfig %iface% down
+
+ method bootp
description
- This method may be used to define the IPv6 loopback interface.
+@@ -316,11 +316,11 @@ method bootp
+ whatever it really is.
+
up
-- -ip link set dev %iface% up 2>/dev/null if (!iface_is_lo())
-- -ip addr add dev %iface% ::1 2>/dev/null if (!iface_is_lo())
-+ -ip link set dev %iface% up 2>/dev/null if (iface_is_lo())
-+ -ip addr add dev %iface% ::1 2>/dev/null if (iface_is_lo())
+- /sbin/bootpc [[--bootfile %bootfile%]] --dev %iface% [[--server %server%]] \
++ bootpc [[--bootfile %bootfile%]] --dev %iface% [[--server %server%]] \
+ [[--hwaddr %hwaddr%]] --returniffail --serverbcast
+
down
-- -ip addr del dev %iface% ::1 2>/dev/null if (!iface_is_lo())
-- -ip link set dev %iface% down 2>/dev/null if (!iface_is_lo())
-+ -ip addr del dev %iface% ::1 2>/dev/null if (iface_is_lo())
-+ -ip link set dev %iface% down 2>/dev/null if (iface_is_lo())
+- /sbin/ifconfig %iface% down
++ ifconfig %iface% down
- method static
+ method ppp
+ description
+@@ -331,9 +331,9 @@ method ppp
+ unit number -- Use /number/ as the ppp unit number.
+ options string -- Pass /string/ as additional options to pon.
+ up
+- /usr/bin/pon [[%provider%]] [[unit %unit%]] [[%options%]]
++ pon [[%provider%]] [[unit %unit%]] [[%options%]]
+ down
+- /usr/bin/poff [[%provider%]]
++ poff [[%provider%]]
+
+ method wvdial
+ description
+@@ -342,10 +342,10 @@ method wvdial
+ options
+ provider name -- Use /name/ as the provider (from /etc/wvdial.conf).
+ up
+- /sbin/start-stop-daemon --start -x /usr/bin/wvdial \
++ start-stop-daemon --start -x /usr/bin/wvdial \
+ -p /run/wvdial.%iface%.pid -b -m -- [[ %provider% ]]
+ down
+- /sbin/start-stop-daemon --stop -x /usr/bin/wvdial \
++ start-stop-daemon --stop -x /usr/bin/wvdial \
+ -p /run/wvdial.%iface%.pid -s 2
+
+
+@@ -356,9 +356,9 @@ method ipv4ll
+ known as APIPA or IPAC, and often colloquially referred to
+ as "Zeroconf address".
+ up
+- /usr/sbin/avahi-autoipd -D %iface%
++ avahi-autoipd -D %iface%
+ down
+- /usr/sbin/avahi-autoipd --kill %iface%
++ avahi-autoipd --kill %iface%
+ architecture hurd
+
+ method loopback
+@@ -432,23 +432,23 @@ method dhcp
+
+ up
+ [[Warning: Option hwaddress: %hwaddress% not yet supported]]
+- /sbin/dhclient -4 -v -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
++ dhclient -4 -v -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
+ if (execable("/sbin/dhclient"))
+- /sbin/udhcpc -n -p /run/udhcpc.%iface///.%.pid -i %iface% [[-H %hostname%]] \
++ udhcpc -n -p /run/udhcpc.%iface///.%.pid -i %iface% [[-H %hostname%]] \
+ [[-c %client%]] \
+ elsif (execable("/sbin/udhcpc"))
+- /sbin/dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %client%]] \
++ dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %client%]] \
+ [[-l %leasetime%]] %iface% \
+ elsif (execable("/sbin/dhcpcd"))
+ echo 'No DHCP client software found!' >/dev/stderr; false \
+ elsif (1)
+
+ down
+- /sbin/dhclient -4 -v -r -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
++ dhclient -4 -v -r -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
+ if (execable("/sbin/dhclient"))
+ if test -f /run/udhcpc.%iface///.%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface///.%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface///.%.pid); fi \
+ elsif (execable("/sbin/udhcpc"))
+- /sbin/dhcpcd -k %iface% \
++ dhcpcd -k %iface% \
+ elsif (execable("/sbin/dhcpcd"))
+ echo 'No DHCP client software found!' >/dev/stderr; false \
+ elsif (1)
+@@ -482,9 +482,9 @@ method ppp
+ unit number -- Use /number/ as the ppp unit number.
+ options string -- Pass /string/ as additional options to pon.
+ up
+- /usr/bin/pon [[%provider%]] [[unit %unit%]] [[%options%]]
++ pon [[%provider%]] [[unit %unit%]] [[%options%]]
+ down
+- /usr/bin/poff [[%provider%]]
++ poff [[%provider%]]
+
+ method wvdial
description
+@@ -493,10 +493,10 @@ method wvdial
+ options
+ provider name -- Use /name/ as the provider (from /etc/wvdial.conf).
+ up
+- /sbin/start-stop-daemon --start -x /usr/bin/wvdial \
++ start-stop-daemon --start -x /usr/bin/wvdial \
+ -p /run/wvdial.%iface///.%.pid -b -m -- [[ %provider% ]]
+ down
+- /sbin/start-stop-daemon --stop -x /usr/bin/wvdial \
++ start-stop-daemon --stop -x /usr/bin/wvdial \
+ -p /run/wvdial.%iface///.%.pid -s 2
+
+
+@@ -507,6 +507,6 @@ method ipv4ll
+ known as APIPA or IPAC, and often colloquially referred to
+ as "Zeroconf address".
+ up
+- /usr/sbin/avahi-autoipd -D %iface%
++ avahi-autoipd -D %iface%
+ down
+- /usr/sbin/avahi-autoipd --kill %iface%
++ avahi-autoipd --kill %iface%
--
-1.9.1
+2.17.1
diff --git a/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb b/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb
deleted file mode 100644
index 9de01f9617..0000000000
--- a/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "ifupdown: basic ifup and ifdown used by initscripts"
-DESCRIPTION = "High level tools to configure network interfaces \
-This package provides the tools ifup and ifdown which may be used to \
-configure (or, respectively, deconfigure) network interfaces, based on \
-the file /etc/network/interfaces."
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = "git://anonscm.debian.org/git/collab-maint/ifupdown.git;protocol=https \
- file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \
- file://inet-6-.defn-fix-inverted-checks-for-loopback.patch \
- file://99_network \
- "
-SRCREV = "05ea2fd4f49bb1201aeef2a42efbcff8f336112f"
-
-S = "${WORKDIR}/git"
-
-
-inherit update-rc.d update-alternatives
-
-do_compile () {
- chmod a+rx *.pl *.sh
- oe_runmake 'CC=${CC}' "CFLAGS=${CFLAGS} -Wall -W -D'IFUPDOWN_VERSION=\"${PV}\"'"
-}
-
-do_install () {
- install -d ${D}${mandir}/man8 \
- ${D}${mandir}/man5 \
- ${D}${base_sbindir}
-
- # If volatiles are used, then we'll also need /run/network there too.
- install -d ${D}/etc/default/volatiles
- install -m 0644 ${WORKDIR}/99_network ${D}/etc/default/volatiles
-
- install -m 0755 ifup ${D}${base_sbindir}/
- ln ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifdown
- install -m 0644 ifup.8 ${D}${mandir}/man8
- install -m 0644 interfaces.5 ${D}${mandir}/man5
- cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8
-}
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "ifup ifdown"
-
-ALTERNATIVE_LINK_NAME[ifup] = "${base_sbindir}/ifup"
-ALTERNATIVE_LINK_NAME[ifdown] = "${base_sbindir}/ifdown"
-
-INITSCRIPT_NAME = "ifup"
-INITSCRIPT_PARAMS = "start 39 S . stop 39 0 6 1 ."
diff --git a/meta/recipes-core/ifupdown/ifupdown_0.8.22.bb b/meta/recipes-core/ifupdown/ifupdown_0.8.22.bb
new file mode 100644
index 0000000000..bd0989e885
--- /dev/null
+++ b/meta/recipes-core/ifupdown/ifupdown_0.8.22.bb
@@ -0,0 +1,47 @@
+SUMMARY = "ifupdown: basic ifup and ifdown used by initscripts"
+DESCRIPTION = "High level tools to configure network interfaces \
+This package provides the tools ifup and ifdown which may be used to \
+configure (or, respectively, deconfigure) network interfaces, based on \
+the file /etc/network/interfaces."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "git://salsa.debian.org/debian/ifupdown.git;protocol=https \
+ file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \
+ file://inet-6-.defn-fix-inverted-checks-for-loopback.patch \
+ file://99_network \
+ file://0001-Define-FNM_EXTMATCH-for-musl.patch \
+ "
+SRCREV = "ab5a0f464e53e172316a5ca8b5dcdc49e8848999"
+
+S = "${WORKDIR}/git"
+
+
+inherit update-alternatives
+
+do_compile () {
+ chmod a+rx *.pl *.sh
+ oe_runmake 'CC=${CC}' "CFLAGS=${CFLAGS} -Wall -W -D'IFUPDOWN_VERSION=\"${PV}\"'"
+}
+
+do_install () {
+ install -d ${D}${mandir}/man8 \
+ ${D}${mandir}/man5 \
+ ${D}${base_sbindir}
+
+ # If volatiles are used, then we'll also need /run/network there too.
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_network ${D}/etc/default/volatiles
+
+ install -m 0755 ifup ${D}${base_sbindir}/
+ ln ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifdown
+ install -m 0644 ifup.8 ${D}${mandir}/man8
+ install -m 0644 interfaces.5 ${D}${mandir}/man5
+ cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8
+}
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "ifup ifdown"
+
+ALTERNATIVE_LINK_NAME[ifup] = "${base_sbindir}/ifup"
+ALTERNATIVE_LINK_NAME[ifdown] = "${base_sbindir}/ifdown"
diff --git a/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Toaster.txt b/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Toaster.txt
new file mode 100644
index 0000000000..a0aede2fbf
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Toaster.txt
@@ -0,0 +1,78 @@
+
+Running Toaster in VirtualBox
+=============================
+
+Toaster is launched via the command in VM:
+
+ $ source toaster start webport=<IPADDR:PORT>
+
+The interaction with Toaster web server is done via a host internet
+browser.
+The particular steps depend on the actual networking being used
+by the VirtualBox.
+
+
+Bridged Network
+===============
+
+Find out your VM network IP address:
+
+ $ ifconfig
+
+IP address is listed under eth0 inet addr.
+It should be something like:
+ inet addr:192.168.1.18
+
+Launch the Toaster web server in VM:
+
+ $ source toaster start webport=192.168.1.18:8000
+
+Interact with the Toaster web server with your host browser using URL:
+
+ http://192.168.1.18:8000
+
+
+NAT Network
+===========
+Find out your VM network IP address:
+
+ $ ifconfig
+
+IP address is listed under eth0 inet addr.
+For NAT network it should be something like:
+ inet addr:10.0.2.15
+
+When using NAT network, the VM web server can be accessed using
+Port Forwarding.
+
+Using the VirtualBox GUI, navigate to:
+ Settings->Network->Adapter1
+
+You should set:
+ Attached to: NAT
+
+Select "Advanced", click on "Port Forwarding"
+
+This will open a new dialog box "Port Forwarding Rules".
+Create a new rule that looks like this:
+
+| Name | Protocol | Host IP | Host Port | Guest IP | Guest Port |
++-------+----------+---------+-----------+----------+------------+
+| Rule1 | TCP | | 8000 | | 8000 |
+------------------------------------------------------------------
+
+Now we can launch the Toaster web server in VM:
+
+ $ source toaster start webport=10.0.2.15:8000
+
+Interact with the Toaster web server with your host browser using URL:
+
+ http://127.0.0.1:8000
+
+
+
+
+
+
+
+
diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index 4161ab3f09..91329a731b 100644
--- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -1,33 +1,37 @@
SUMMARY = "An image containing the build system itself"
-DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation."
+DESCRIPTION = "An image containing the build system that you can boot and run using either VirtualBox, VMware Player or VMware Workstation."
HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted \
- kernel-dev kernel-devsrc connman connman-plugin-ethernet dhcp-client"
+ kernel-dev kernel-devsrc connman connman-plugin-ethernet dhcp-client \
+ tzdata python3-pip perl-misc"
IMAGE_FEATURES += "x11-base package-management splash"
+QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
+
# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
# Do a quiet boot with limited console messages
APPEND += "rootfstype=ext4 quiet"
-DEPENDS = "zip-native"
-IMAGE_FSTYPES = "vmdk"
+DEPENDS = "zip-native python3-pip-native"
+IMAGE_FSTYPES = "wic.vmdk"
-inherit core-image module-base
+inherit core-image module-base setuptools3
-SRCREV ?= "b6d61ec9977b5625865d711eff3f0fc960d949ec"
-SRC_URI = "git://git.yoctoproject.org/poky;branch=master \
+SRCREV ?= "39d45ef825694705daf6d7ab4ab3066b1b8e3aa2"
+SRC_URI = "git://git.yoctoproject.org/poky \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
file://README_VirtualBox_Guest_Additions.txt \
+ file://README_VirtualBox_Toaster.txt \
"
+RECIPE_NO_UPDATE_REASON = "Recipe is recursive and handled as part of the release process"
BA_INCLUDE_SOURCES ??= "0"
IMAGE_CMD_ext4_append () {
@@ -54,8 +58,14 @@ fakeroot do_populate_poky_src () {
# Place the README_VirtualBox_Guest_Additions file in builders home folder.
cp ${WORKDIR}/README_VirtualBox_Guest_Additions.txt ${IMAGE_ROOTFS}/home/builder/
+ # Place the README_VirtualBox_Toaster file in builders home folder.
+ cp ${WORKDIR}/README_VirtualBox_Toaster.txt ${IMAGE_ROOTFS}/home/builder/
+
# Create a symlink, needed for out-of-tree kernel modules build
- lnr ${IMAGE_ROOTFS}${KERNEL_SRC_PATH} ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build
+ if [ ! -e ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build ]; then
+ rm -f ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build
+ lnr ${IMAGE_ROOTFS}${KERNEL_SRC_PATH} ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build
+ fi
echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
echo "export LC_ALL=en_US.utf8" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
@@ -63,13 +73,16 @@ fakeroot do_populate_poky_src () {
# Also save (for reference only) the actual SRCREV used to create this image
echo "export BA_SRCREV=${SRCREV}" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo 'export PATH=$PATH:/sbin' >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
echo "# If working behind a proxy and using the provided oe-git-proxy script" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
echo "# you need to set ALL_PROXY based on your proxy settings." >> ${IMAGE_ROOTFS}/home/builder/.bashrc
echo "# Example ALL_PROXY values:" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
+ chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/poky
chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
# Assume we will need CDROM to install guest additions
@@ -79,12 +92,26 @@ fakeroot do_populate_poky_src () {
echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
# Load tap/tun at startup
+ rm -f ${IMAGE_ROOTFS}/sbin/iptables
lnr ${IMAGE_ROOTFS}/usr/sbin/iptables ${IMAGE_ROOTFS}/sbin/iptables
echo "tun" >> ${IMAGE_ROOTFS}/etc/modules
# Use Clearlooks GTK+ theme
mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0
echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc
+
+ # Install modules needed for toaster
+ export STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}
+ export STAGING_INCDIR=${STAGING_INCDIR_NATIVE}
+ export HOME=${IMAGE_ROOTFS}/home/builder
+ mkdir -p ${IMAGE_ROOTFS}/home/builder/.cache/pip
+ pip3_install_params="--user -I -U -v -r ${IMAGE_ROOTFS}/home/builder/poky/bitbake/toaster-requirements.txt"
+ if [ -n "${http_proxy}" ]; then
+ pip3_install_params="${pip3_install_params} --proxy ${http_proxy}"
+ fi
+ pip3 install ${pip3_install_params}
+ chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/.local
+ chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/.cache
}
IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
@@ -92,16 +119,16 @@ IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
addtask rootfs after do_unpack
python () {
- # Ensure we run these usually noexec tasks
- d.delVarFlag("do_fetch", "noexec")
- d.delVarFlag("do_unpack", "noexec")
+ # Ensure we run these usually noexec tasks
+ d.delVarFlag("do_fetch", "noexec")
+ d.delVarFlag("do_unpack", "noexec")
}
create_bundle_files () {
cd ${WORKDIR}
mkdir -p Yocto_Build_Appliance
cp *.vmx* Yocto_Build_Appliance
- ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.wic.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
zip -r ${IMGDEPLOYDIR}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${IMGDEPLOYDIR}/Yocto_Build_Appliance.zip
}
@@ -111,4 +138,4 @@ python do_bundle_files() {
bb.build.exec_func('create_bundle_files', d)
}
-addtask bundle_files after do_vmimg before do_image_complete
+addtask bundle_files after do_image_wic before do_image_complete
diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb b/meta/recipes-core/images/core-image-minimal-initramfs.bb
index 5794a25952..7df8ab1ebd 100644
--- a/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -3,12 +3,20 @@ DESCRIPTION = "Small image capable of booting a device. The kernel includes \
the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
first 'init' program more efficiently."
-PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+INITRAMFS_SCRIPTS ?= "\
+ initramfs-framework-base \
+ initramfs-module-setup-live \
+ initramfs-module-udev \
+ initramfs-module-install \
+ initramfs-module-install-efi \
+ "
+
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
-export IMAGE_BASENAME = "core-image-minimal-initramfs"
+export IMAGE_BASENAME = "${MLPREFIX}core-image-minimal-initramfs"
IMAGE_LINGUAS = ""
LICENSE = "MIT"
@@ -19,7 +27,5 @@ inherit core-image
IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
-BAD_RECOMMENDATIONS += "busybox-syslog"
-
# Use the same restriction as initramfs-live-install
COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
diff --git a/meta/recipes-core/images/core-image-minimal.bb b/meta/recipes-core/images/core-image-minimal.bb
index 8dd77b3472..4630026aa9 100644
--- a/meta/recipes-core/images/core-image-minimal.bb
+++ b/meta/recipes-core/images/core-image-minimal.bb
@@ -1,6 +1,6 @@
SUMMARY = "A small image just capable of allowing a device to boot."
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
+IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
IMAGE_LINGUAS = " "
diff --git a/meta/recipes-core/images/core-image-tiny-initramfs.bb b/meta/recipes-core/images/core-image-tiny-initramfs.bb
new file mode 100644
index 0000000000..0eca6d9944
--- /dev/null
+++ b/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -0,0 +1,43 @@
+# Simple initramfs image artifact generation for tiny images.
+DESCRIPTION = "Tiny image capable of booting a device. The kernel includes \
+the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
+first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
+actually generate an image but rather generates boot and rootfs artifacts \
+that can subsequently be picked up by external image generation tools such as wic."
+
+VIRTUAL-RUNTIME_dev_manager ?= "busybox-mdev"
+
+PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = ""
+
+export IMAGE_BASENAME = "core-image-tiny-initramfs"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+# don't actually generate an image, just the artifacts needed for one
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+# Use the same restriction as initramfs-live-install
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
+python tinyinitrd () {
+ # Modify our init file so the user knows we drop to shell prompt on purpose
+ newinit = None
+ with open(d.expand('${IMAGE_ROOTFS}/init'), 'r') as init:
+ newinit = init.read()
+ newinit = newinit.replace('Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell ', 'Poky Tiny Reference Distribution:')
+ with open(d.expand('${IMAGE_ROOTFS}/init'), 'w') as init:
+ init.write(newinit)
+}
+
+IMAGE_PREPROCESS_COMMAND += "tinyinitrd;"
+
+QB_KERNEL_CMDLINE_APPEND += "debugshell=3 init=/bin/busybox sh init"
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
index b562109157..b351985a61 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
@@ -27,7 +27,7 @@ do
# Try sleeping here to avoid getting kernel messages
# obscuring/confusing user
sleep 5
- echo "Found drive at /dev/${device}. Do you want to install this image there ? [y/n]"
+ echo "Found drive at /dev/${device}. Do you want to install this image there? [y/n]"
read answer
if [ "$answer" = "y" ] ; then
break
@@ -171,19 +171,19 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
fi
if [ -d /run/media/$1/loader ]; then
- GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf"
- # copy config files for gummiboot
+ SYSTEMDBOOT_CFGS="/ssd/loader/entries/*.conf"
+ # copy config files for systemd-boot
cp -dr /run/media/$1/loader /ssd
# delete the install entry
rm -f /ssd/loader/entries/install.conf
# delete the initrd lines
- sed -i "/initrd /d" $GUMMIBOOT_CFGS
+ sed -i "/initrd /d" $SYSTEMDBOOT_CFGS
# delete any LABEL= strings
- sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS
+ sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_CFGS
# delete any root= strings
- sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS
+ sed -i "s/ root=[^ ]*/ /" $SYSTEMDBOOT_CFGS
# add the root= and other standard boot options
- sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS
+ sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $SYSTEMDBOOT_CFGS
# Add the test label
echo -ne "title test\nlinux /test-kernel\noptions root=$testfs rw $rootwait quiet\n" > /ssd/loader/entries/test.conf
fi
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 441e25238d..b6855b5aac 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -8,8 +8,19 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# We need 20 Mb for the boot partition
-boot_size=20
+# figure out how big of a boot partition we need
+boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
+# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
+if [ -e /run/media/$1/$2 ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
+fi
+# remove initrd from size since its not currently installed
+if [ -e /run/media/$1/initrd ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
+fi
+# add 10M to provide some extra space for users and account
+# for rounding in the above subtractions
+boot_size=$(( boot_size + 10 ))
# 5% for swap
swap_ratio=5
@@ -22,6 +33,8 @@ live_dev_name=${live_dev_name#\/dev/}
case $live_dev_name in
mmcblk*)
;;
+ nvme*)
+ ;;
*)
live_dev_name=${live_dev_name%%[0-9]*}
;;
@@ -146,7 +159,8 @@ swap_start=$((rootfs_end))
# 2) they are detected asynchronously (need rootwait)
rootwait=""
part_prefix=""
-if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
+if [ ! "${device#/dev/mmcblk}" = "${device}" ] || \
+ [ ! "${device#/dev/nvme}" = "${device}" ]; then
part_prefix="p"
rootwait="rootwait"
fi
@@ -176,18 +190,25 @@ parted ${device} mkpart boot fat32 0% $boot_size
parted ${device} set 1 boot on
echo "Creating rootfs partition on $rootfs"
-parted ${device} mkpart root ext3 $rootfs_start $rootfs_end
+parted ${device} mkpart root ext4 $rootfs_start $rootfs_end
echo "Creating swap partition on $swap"
parted ${device} mkpart swap linux-swap $swap_start 100%
parted ${device} print
+echo "Waiting for device nodes..."
+C=0
+while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do
+ C=$(( C + 1 ))
+ sleep 1
+done
+
echo "Formatting $bootfs to vfat..."
mkfs.vfat $bootfs
-echo "Formatting $rootfs to ext3..."
-mkfs.ext3 $rootfs
+echo "Formatting $rootfs to ext4..."
+mkfs.ext4 $rootfs
echo "Formatting swap partition...($swap)"
mkswap $swap
@@ -234,38 +255,43 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
sed -i "/initrd /d" $GRUBCFG
# Delete any LABEL= strings
sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
- # Delete any root= strings
- sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
- # Add the root= and other standard boot options
- sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
+ # Replace root= and add additional standard boot options
+ # We use root as a sentinel value, as vmlinuz is no longer guaranteed
+ sed -i "s/ root=[^ ]*/ root=PARTUUID=$root_part_uuid rw $rootwait quiet /g" $GRUBCFG
fi
if [ -d /run/media/$1/loader ]; then
rootuuid=$(blkid -o value -s PARTUUID ${rootfs})
- GUMMIBOOT_CFGS="/boot/loader/entries/*.conf"
- # copy config files for gummiboot
+ SYSTEMDBOOT_CFGS="/boot/loader/entries/*.conf"
+ # copy config files for systemd-boot
cp -dr /run/media/$1/loader /boot
# delete the install entry
rm -f /boot/loader/entries/install.conf
# delete the initrd lines
- sed -i "/initrd /d" $GUMMIBOOT_CFGS
+ sed -i "/initrd /d" $SYSTEMDBOOT_CFGS
# delete any LABEL= strings
- sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS
+ sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_CFGS
# delete any root= strings
- sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS
+ sed -i "s/ root=[^ ]*/ /" $SYSTEMDBOOT_CFGS
# add the root= and other standard boot options
- sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $GUMMIBOOT_CFGS
+ sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $SYSTEMDBOOT_CFGS
fi
umount /tgt_root
-cp /run/media/$1/vmlinuz /boot
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+ for kernel in `find /run/media/$1/ -name $types*`; do
+ cp $kernel /boot
+ done
+done
umount /boot
sync
-echo "Remove your installation media, and press ENTER"
+echo "Installation successful. Remove your installation media and press ENTER to reboot."
read enter
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 04ce5fb4b5..e71579631b 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -7,8 +7,19 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# We need 20 Mb for the boot partition
-boot_size=20
+# figure out how big of a boot partition we need
+boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
+# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
+if [ -e /run/media/$1/$2 ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
+fi
+# remove initrd from size since its not currently installed
+if [ -e /run/media/$1/initrd ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
+fi
+# add 10M to provide some extra space for users and account
+# for rounding in the above subtractions
+boot_size=$(( boot_size + 10 ))
# 5% for the swap
swap_ratio=5
@@ -21,6 +32,8 @@ live_dev_name=${live_dev_name#\/dev/}
case $live_dev_name in
mmcblk*)
;;
+ nvme*)
+ ;;
*)
live_dev_name=${live_dev_name%%[0-9]*}
;;
@@ -130,7 +143,7 @@ fi
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
-grub_version=$(grub-install -v|sed 's/.* \([0-9]\).*/\1/')
+grub_version=$(grub-install -V|sed 's/.* \([0-9]\).*/\1/')
if [ $grub_version -eq 0 ] ; then
bios_boot_size=0
@@ -153,7 +166,8 @@ swap_start=$((rootfs_end))
# 2) they are detected asynchronously (need rootwait)
rootwait=""
part_prefix=""
-if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
+if [ ! "${device#/dev/mmcblk}" = "${device}" ] || \
+ [ ! "${device#/dev/nvme}" = "${device}" ]; then
part_prefix="p"
rootwait="rootwait"
fi
@@ -200,7 +214,7 @@ fi
echo "Creating rootfs partition on $rootfs"
[ $grub_version -eq 0 ] && pname='primary' || pname='root'
-parted ${device} mkpart $pname ext3 $rootfs_start $rootfs_end
+parted ${device} mkpart $pname ext4 $rootfs_start $rootfs_end
echo "Creating swap partition on $swap"
[ $grub_version -eq 0 ] && pname='primary' || pname='swap'
@@ -208,11 +222,18 @@ parted ${device} mkpart $pname linux-swap $swap_start 100%
parted ${device} print
+echo "Waiting for device nodes..."
+C=0
+while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do
+ C=$(( C + 1 ))
+ sleep 1
+done
+
echo "Formatting $bootfs to ext3..."
mkfs.ext3 $bootfs
-echo "Formatting $rootfs to ext3..."
-mkfs.ext3 $rootfs
+echo "Formatting $rootfs to ext4..."
+mkfs.ext4 $rootfs
echo "Formatting swap partition...($swap)"
mkswap $swap
@@ -246,9 +267,34 @@ fi
umount /tgt_root
umount /src_root
+echo "Looking for kernels to use as boot target.."
+# Find kernel to boot to
+# Give user options if multiple are found
+kernels="$(find /run/media/$1/ -type f \
+ -name bzImage* -o -name zImage* \
+ -o -name vmlinux* -o -name vmlinuz* \
+ -o -name fitImage* \
+ | sed s:.*/::)"
+if [ -n "$(echo $kernels)" ]; then
+ # only one kernel entry if no space
+ if [ -z "$(echo $kernels | grep " ")" ]; then
+ kernel=$kernels
+ echo "$kernel will be used as the boot target"
+ else
+ echo "Which kernel do we want to boot by default? The following kernels were found:"
+ echo $kernels
+ read answer
+ kernel=$answer
+ fi
+else
+ echo "No kernels found, exiting..."
+ exit 1
+fi
+
# Handling of the target boot partition
mount $bootfs /boot
echo "Preparing boot partition..."
+
if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
echo "Preparing custom grub2 menu..."
root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
@@ -256,9 +302,11 @@ if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
GRUBCFG="/boot/grub/grub.cfg"
mkdir -p $(dirname $GRUBCFG)
cat >$GRUBCFG <<_EOF
+timeout=5
+default=0
menuentry "Linux" {
search --no-floppy --fs-uuid $boot_uuid --set root
- linux /vmlinuz root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
+ linux /$kernel root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
}
_EOF
chmod 0444 $GRUBCFG
@@ -272,10 +320,16 @@ if [ $grub_version -eq 0 ] ; then
echo "timeout 30" >> /boot/grub/menu.lst
echo "title Live Boot/Install-Image" >> /boot/grub/menu.lst
echo "root (hd0,0)" >> /boot/grub/menu.lst
- echo "kernel /vmlinuz root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
+ echo "kernel /$kernel root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
fi
-cp /run/media/$1/vmlinuz /boot/
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+ for kernel in `find /run/media/$1/ -name $types*`; do
+ cp $kernel /boot
+ done
+done
umount /boot
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 441b41c9d6..b20660b60a 100644..100755
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -28,8 +28,7 @@ udev_daemon() {
_UDEV_DAEMON=`udev_daemon`
early_setup() {
- mkdir -p /proc
- mkdir -p /sys
+ mkdir -p /proc /sys /run /var/run
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs none /dev
@@ -37,9 +36,6 @@ early_setup() {
# support modular kernel
modprobe isofs 2> /dev/null
- mkdir -p /run
- mkdir -p /var/run
-
$_UDEV_DAEMON --daemon
udevadm trigger --action=add
}
@@ -84,6 +80,10 @@ boot_live_root() {
# device node creation events were handled, to avoid unexpected behavior
killall -9 "${_UDEV_DAEMON##*/}" 2>/dev/null
+ # Don't run systemd-update-done on systemd-based live systems
+ # because it triggers a slow rebuild of ldconfig caches.
+ touch ${ROOT_MOUNT}/etc/.updated ${ROOT_MOUNT}/var/.updated
+
# Allow for identification of the real root even after boot
mkdir -p ${ROOT_MOUNT}/media/realroot
mount -n --move "/run/media/${ROOT_DISK}" ${ROOT_MOUNT}/media/realroot
@@ -91,8 +91,11 @@ boot_live_root() {
# Move the mount points of some filesystems over to
# the corresponding directories under the real root filesystem.
for dir in `awk '/\/dev.* \/run\/media/{print $2}' /proc/mounts`; do
- mkdir -p ${ROOT_MOUNT}/media/${dir##*/}
- mount -n --move $dir ${ROOT_MOUNT}/media/${dir##*/}
+ # Parse any OCT or HEX encoded chars such as spaces
+ # in the mount points to actual ASCII chars
+ dir=`printf $dir`
+ mkdir -p "${ROOT_MOUNT}/media/${dir##*/}"
+ mount -n --move "$dir" "${ROOT_MOUNT}/media/${dir##*/}"
done
mount -n --move /proc ${ROOT_MOUNT}/proc
mount -n --move /sys ${ROOT_MOUNT}/sys
diff --git a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
index 7ae7969f5e..29ec5ec2ff 100644
--- a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
@@ -9,8 +9,13 @@ S = "${WORKDIR}"
do_install() {
install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init
+
+ # Create device nodes expected by some kernels in initramfs
+ # before even executing /init.
+ install -d ${D}/dev
+ mknod -m 622 ${D}/dev/console c 5 1
}
inherit allarch
-FILES_${PN} += " /init "
+FILES_${PN} += "/init /dev/console"
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/exec b/meta/recipes-core/initrdscripts/initramfs-framework/exec
new file mode 100644
index 0000000000..a8e2432bb6
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/exec
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright (C) 2017 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+EXEC_DIR=/exec.d # place to look for modules
+
+exec_enabled() {
+ return 0
+}
+
+exec_run() {
+ if [ ! -d $EXEC_DIR ]; then
+ msg "No contents to exec in $EXEC_DIR. Starting shell ..."
+ sh
+ fi
+
+ # Load and run modules
+ for m in $EXEC_DIR/*; do
+ # Skip backup files
+ if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
+ continue
+ fi
+
+ debug "Starting $m"
+
+ # process module
+ ./$m
+ done
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
index 37527a840a..c71ce0ce8c 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -72,6 +72,7 @@ ROOTFS_DIR="/rootfs" # where to do the switch root
MODULE_PRE_HOOKS="" # functions to call before running each module
MODULE_POST_HOOKS="" # functions to call after running each module
MODULES_DIR=/init.d # place to look for modules
+EFI_DIR=/sys/firmware/efi # place to store device firmware information
# make mount stop complaining about missing /etc/fstab
touch /etc/fstab
@@ -81,10 +82,14 @@ mkdir -p /proc /sys /run/lock /var/lock
mount -t proc proc /proc
mount -t sysfs sysfs /sys
+if [ -d $EFI_DIR ];then
+ mount -t efivarfs none /sys/firmware/efi/efivars
+fi
+
# populate bootparam environment
for p in `cat /proc/cmdline`; do
opt=`echo $p | cut -d'=' -f1`
- opt=`echo $opt | tr '.-' '__'`
+ opt=`echo $opt | sed -e 'y/.-/__/'`
if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then
eval "bootparam_${opt}=true"
else
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/lvm b/meta/recipes-core/initrdscripts/initramfs-framework/lvm
new file mode 100644
index 0000000000..7deeccb9a2
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/lvm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+lvm_enabled() {
+ if ! lvscan |grep -i -w "inactive" &>/dev/null;then
+ return 1
+ fi
+ return 0
+}
+
+lvm_run() {
+ lvm pvscan --cache --activate ay
+ udevadm trigger --action=add
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/mdev b/meta/recipes-core/initrdscripts/initramfs-framework/mdev
index a5df1d717a..9814d9764a 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/mdev
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/mdev
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Copyright (C) 2011, 2017 O.S. Systems Software LTDA.
# Licensed on MIT
mdev_enabled() {
@@ -25,6 +25,6 @@ mdev_run() {
# load modules for devices
find /sys -name modalias | while read m; do
- load_kernel_module $(cat $m)
+ load_kernel_module $(cat "$m")
done
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
new file mode 100644
index 0000000000..e67ee4c25d
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+nfsrootfs_enabled() {
+ if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
+ return 1
+ fi
+ return 0
+}
+
+nfsrootfs_run() {
+ local nfs_opts
+ local location
+ local flags
+ local server_ip
+
+ nfs_opts=""
+ if [ "${bootparam_nfsroot#*,}" != "${bootparam_nfsroot}" ]; then
+ nfs_opts="-o ${bootparam_nfsroot#*,}"
+ fi
+
+ location="${bootparam_nfsroot%%,*}"
+ if [ "${location#*:}" = "${location}" ]; then
+ # server-ip not given. Get server ip from ip option
+ server_ip=""
+ if [ "${bootparam_ip#*:}" != "${bootparam_ip}" ]; then
+ server_ip=$(echo "$bootparam_ip" | cut -d: -f2)
+ fi
+
+ if [ -z "$server_ip" ]; then
+ fatal "Server IP is not set. Update ip or nfsroot options."
+ fi
+ location=${server_ip}:${location}
+ fi
+
+ flags="-o nolock"
+ if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
+ if [ -n "$bootparam_rootflags" ]; then
+ bootparam_rootflags="$bootparam_rootflags,"
+ fi
+ bootparam_rootflags="${bootparam_rootflags}ro"
+ fi
+ if [ -n "$bootparam_rootflags" ]; then
+ flags="$flags -o $bootparam_rootflags"
+ fi
+
+ mount -t nfs ${flags} ${nfs_opts} ${location} ${ROOTFS_DIR}
+}
+
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 14768f1cd4..748c9391c0 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -27,8 +27,23 @@ rootfs_run() {
fi
if [ "`echo ${bootparam_root} | cut -c1-9`" = "PARTUUID=" ]; then
- root_uuid=`echo $bootparam_root | cut -c10-`
- bootparam_root="/dev/disk/by-partuuid/$root_uuid"
+ root_partuuid=`echo $bootparam_root | cut -c10-`
+ bootparam_root="/dev/disk/by-partuuid/$root_partuuid"
+ fi
+
+ if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
+ root_partlabel=`echo $bootparam_root | cut -c11-`
+ bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
+ fi
+
+ if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
+ root_partlabel=`echo $bootparam_root | cut -c11-`
+ bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
+ fi
+
+ if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
+ root_label=`echo $bootparam_root | cut -c7-`
+ bootparam_root="/dev/disk/by-label/$root_label"
fi
if [ -e "$bootparam_root" ]; then
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/setup-live b/meta/recipes-core/initrdscripts/initramfs-framework/setup-live
new file mode 100644
index 0000000000..4c79f41285
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/setup-live
@@ -0,0 +1,64 @@
+#/bin/sh
+# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+setup_enabled() {
+ return 0
+}
+
+setup_run() {
+ROOT_IMAGE="rootfs.img"
+ISOLINUX=""
+ROOT_DISK=""
+shelltimeout=30
+
+ if [ -z "$bootparam_root" -o "$bootparam_root" = "/dev/ram0" ]; then
+ echo "Waiting for removable media..."
+ C=0
+ while true
+ do
+ for i in `ls /run/media 2>/dev/null`; do
+ if [ -f /run/media/$i/$ROOT_IMAGE ] ; then
+ found="yes"
+ ROOT_DISK="$i"
+ break
+ elif [ -f /run/media/$i/isolinux/$ROOT_IMAGE ]; then
+ found="yes"
+ ISOLINUX="isolinux"
+ ROOT_DISK="$i"
+ break
+ fi
+ done
+ if [ "$found" = "yes" ]; then
+ break;
+ fi
+ # don't wait for more than $shelltimeout seconds, if it's set
+ if [ -n "$shelltimeout" ]; then
+ echo -n " " $(( $shelltimeout - $C ))
+ if [ $C -ge $shelltimeout ]; then
+ echo "..."
+ echo "Mounted filesystems"
+ mount | grep media
+ echo "Available block devices"
+ cat /proc/partitions
+ fatal "Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell "
+ fi
+ C=$(( C + 1 ))
+ fi
+ sleep 1
+ done
+ # The existing rootfs module has no support for rootfs images. Assign the rootfs image.
+ bootparam_root="/run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE"
+ fi
+
+ if [ "$bootparam_LABEL" != "boot" -a -f /init.d/$bootparam_LABEL.sh ] ; then
+ if [ -f /run/media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then
+ ./init.d/$bootparam_LABEL.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params
+ else
+ fatal "Could not find $bootparam_LABEL script"
+ fi
+
+ # If we're getting here, we failed...
+ fatal "Target $bootparam_LABEL failed"
+ fi
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev
index 79c8867823..87551ff4a9 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
@@ -6,6 +6,7 @@ udev_shutdown_hook_handler() {
status=$1
module=$2
if [ "$status" = "pre" ] && [ "$module" = "finish" ]; then
+ udevadm settle
killall `basename $_UDEV_DAEMON` 2>/dev/null
fi
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 67a1b04d28..c53a0c03ae 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -2,18 +2,23 @@ SUMMARY = "Modular initramfs system"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
-PR = "r2"
+PR = "r4"
inherit allarch
SRC_URI = "file://init \
+ file://exec \
+ file://nfsrootfs \
file://rootfs \
file://finish \
file://mdev \
file://udev \
file://e2fs \
- file://debug"
+ file://debug \
+ file://lvm \
+ "
S = "${WORKDIR}"
@@ -22,9 +27,13 @@ do_install() {
# base
install -m 0755 ${WORKDIR}/init ${D}/init
+ install -m 0755 ${WORKDIR}/nfsrootfs ${D}/init.d/85-nfsrootfs
install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs
install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish
+ # exec
+ install -m 0755 ${WORKDIR}/exec ${D}/init.d/89-exec
+
# mdev
install -m 0755 ${WORKDIR}/mdev ${D}/init.d/01-mdev
@@ -37,6 +46,9 @@ do_install() {
# debug
install -m 0755 ${WORKDIR}/debug ${D}/init.d/00-debug
+ # lvm
+ install -m 0755 ${WORKDIR}/lvm ${D}/init.d/09-lvm
+
# Create device nodes expected by some kernels in initramfs
# before even executing /init.
install -d ${D}/dev
@@ -44,11 +56,15 @@ do_install() {
}
PACKAGES = "${PN}-base \
+ initramfs-module-exec \
initramfs-module-mdev \
initramfs-module-udev \
initramfs-module-e2fs \
+ initramfs-module-nfsrootfs \
initramfs-module-rootfs \
- initramfs-module-debug"
+ initramfs-module-debug \
+ initramfs-module-lvm \
+ "
FILES_${PN}-base = "/init /init.d/99-finish /dev"
@@ -60,6 +76,10 @@ FILES_${PN}-base = "/init /init.d/99-finish /dev"
# and mounts the rootfs. Then 90-rootfs will proceed immediately.
RRECOMMENDS_${PN}-base += "initramfs-module-rootfs"
+SUMMARY_initramfs-module-exec = "initramfs support for easy execution of applications"
+RDEPENDS_initramfs-module-exec = "${PN}-base"
+FILES_initramfs-module-exec = "/init.d/89-exec"
+
SUMMARY_initramfs-module-mdev = "initramfs support for mdev"
RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev"
FILES_initramfs-module-mdev = "/init.d/01-mdev"
@@ -72,6 +92,10 @@ SUMMARY_initramfs-module-e2fs = "initramfs support for ext4/ext3/ext2 filesystem
RDEPENDS_initramfs-module-e2fs = "${PN}-base"
FILES_initramfs-module-e2fs = "/init.d/10-e2fs"
+SUMMARY_initramfs-module-nfsrootfs = "initramfs support for locating and mounting the root partition via nfs"
+RDEPENDS_initramfs-module-nfsrootfs = "${PN}-base"
+FILES_initramfs-module-nfsrootfs = "/init.d/85-nfsrootfs"
+
SUMMARY_initramfs-module-rootfs = "initramfs support for locating and mounting the root partition"
RDEPENDS_initramfs-module-rootfs = "${PN}-base"
FILES_initramfs-module-rootfs = "/init.d/90-rootfs"
@@ -79,3 +103,7 @@ FILES_initramfs-module-rootfs = "/init.d/90-rootfs"
SUMMARY_initramfs-module-debug = "initramfs dynamic debug support"
RDEPENDS_initramfs-module-debug = "${PN}-base"
FILES_initramfs-module-debug = "/init.d/00-debug"
+
+SUMMARY_initramfs-module-lvm = "initramfs lvm rootfs support"
+RDEPENDS_initramfs-module-lvm = "${PN}-base"
+FILES_initramfs-module-lvm = "/init.d/09-lvm"
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
new file mode 100644
index 0000000000..7a9a8ecae2
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Live image init script"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+DEPENDS = "virtual/kernel"
+RDEPENDS_${PN} = "busybox-mdev"
+SRC_URI = "file://init-live.sh"
+
+PR = "r12"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
+ install -d ${D}/dev
+ mknod -m 622 ${D}/dev/console c 5 1
+}
+
+FILES_${PN} += " /init /dev "
+
+# Due to kernel dependency
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
index 32c1fce76b..cc842ae8b7 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
@@ -5,7 +5,8 @@ SRC_URI = "file://init-install-efi.sh"
PR = "r1"
-RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid"
+RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
S = "${WORKDIR}"
@@ -21,4 +22,4 @@ INHIBIT_DEFAULT_DEPS = "1"
FILES_${PN} = " /install-efi.sh "
-COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+COMPATIBLE_HOST = "(i.86.*|x86_64.*|aarch64.*)-linux"
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
index 88b3b30197..48fc0c4a76 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -7,7 +7,8 @@ PR = "r9"
S = "${WORKDIR}"
-RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid"
+RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
do_install() {
install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh
@@ -21,4 +22,4 @@ INHIBIT_DEFAULT_DEPS = "1"
FILES_${PN} = " /install.sh "
-COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+COMPATIBLE_HOST = "(i.86.*|x86_64.*|aarch64.*)-linux"
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
new file mode 100644
index 0000000000..523138cff3
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "initramfs-framework module for EFI installation option"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
+
+PR = "r4"
+
+SRC_URI = "file://init-install-efi.sh"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${WORKDIR}/init-install-efi.sh ${D}/init.d/install-efi.sh
+}
+
+FILES_${PN} = "/init.d/install-efi.sh"
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
new file mode 100644
index 0000000000..56898e824f
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "initramfs-framework module for installation option"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
+
+# The same restriction as grub
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
+COMPATIBLE_HOST_armv7a = 'null'
+COMPATIBLE_HOST_armv7ve = 'null'
+
+PR = "r1"
+
+SRC_URI = "file://init-install.sh"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${WORKDIR}/init-install.sh ${D}/init.d/install.sh
+}
+
+FILES_${PN} = "/init.d/install.sh"
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
new file mode 100644
index 0000000000..4d2fe9dd2b
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "initramfs-framework module for live booting"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS_${PN} = "initramfs-framework-base udev-extraconf"
+
+PR = "r4"
+
+inherit allarch
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/initramfs-framework:"
+SRC_URI = "file://setup-live"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${WORKDIR}/setup-live ${D}/init.d/80-setup-live
+}
+
+FILES_${PN} = "/init.d/80-setup-live"
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh b/meta/recipes-core/initscripts/initscripts-1.0/alignment.sh
index b577b9a03a..b577b9a03a 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/alignment.sh
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
index df553bc079..591591f87f 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
@@ -8,7 +8,10 @@
# Short-Description: Misc and other.
### END INIT INFO
+TIMESTAMP_FILE=/etc/timestamp
+
. /etc/default/rcS
+[ -f /etc/default/timestamp ] && . /etc/default/timestamp
#
# Put a nologin file in /etc to prevent people from logging in before
# system startup is complete.
@@ -64,10 +67,10 @@ fi
# If the timestamp is more recent than the current time,
# use the timestamp instead.
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
-if test -e /etc/timestamp
+if test -e "$TIMESTAMP_FILE"
then
SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M%2S`
- read TIMESTAMP < /etc/timestamp
+ read TIMESTAMP < "$TIMESTAMP_FILE"
if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
# format the timestamp as date expects it (2m2d2H2M4Y.2S)
TS_YR=${TIMESTAMP%??????????}
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
index fe6c19605f..be9f5970fa 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
@@ -67,9 +67,12 @@ if test "$rpcbind" = yes
then
if test -x /usr/sbin/rpcbind
then
- echo -n "Starting rpcbind... "
- start-stop-daemon --start --quiet --exec /usr/sbin/rpcbind
- sleep 2
+ service rpcbind status > /dev/null
+ if [ $? != 0 ]; then
+ echo -n "Starting rpcbind..."
+ start-stop-daemon --start --quiet --exec /usr/sbin/rpcbind
+ sleep 2
+ fi
fi
fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index ce4622a5e5..1c525b71bd 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -25,9 +25,19 @@ COREDEF="00_core"
[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
create_file() {
+ EXEC=""
+ [ -z "$2" ] && {
+ EXEC="
+ touch \"$1\";
+ "
+ } || {
+ EXEC="
+ cp \"$2\" \"$1\";
+ "
+ }
EXEC="
- touch \"$1\";
- chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
+ ${EXEC}
+ chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
@@ -36,7 +46,7 @@ create_file() {
[ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
} || {
if [ -z "$ROOT_DIR" ]; then
- eval $EXEC &
+ eval $EXEC
else
# Creating some files at rootfs time may fail and should fail,
# but these failures should not be logged to make sure the do_rootfs
@@ -50,7 +60,7 @@ create_file() {
mk_dir() {
EXEC="
mkdir -p \"$1\";
- chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
+ chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
@@ -70,7 +80,7 @@ mk_dir() {
link_file() {
EXEC="
if [ -L \"$2\" ]; then
- [ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
+ [ \"\$(readlink \"$2\")\" != \"$1\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
elif [ -d \"$2\" ]; then
if awk '\$2 == \"$2\" {exit 1}' /proc/mounts; then
cp -a $2/* $1 2>/dev/null;
@@ -86,7 +96,7 @@ link_file() {
test "$VOLATILE_ENABLE_CACHE" = yes && echo " $EXEC" >> /etc/volatile.cache.build
if [ -z "$ROOT_DIR" ]; then
- eval $EXEC &
+ eval $EXEC
else
# For the same reason with create_file(), failures should
# not be logged.
@@ -102,7 +112,6 @@ check_requirements() {
}
CFGFILE="$1"
- [ `basename "${CFGFILE}"` = "${COREDEF}" ] && return 0
TMP_INTERMED="${TMPROOT}/tmp.$$"
TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
@@ -144,15 +153,18 @@ check_requirements() {
apply_cfgfile() {
CFGFILE="$1"
+ SKIP_REQUIREMENTS="$2"
+
+ [ "${VERBOSE}" != "no" ] && echo "Applying ${CFGFILE}"
- check_requirements "${CFGFILE}" || {
+ [ "${SKIP_REQUIREMENTS}" == "yes" ] || check_requirements "${CFGFILE}" || {
echo "Skipping ${CFGFILE}"
return 1
}
- cat ${CFGFILE} | grep -v "^#" | \
- while read LINE; do
- eval `echo "$LINE" | sed -n "s/\(.*\)\ \(.*\) \(.*\)\ \(.*\)\ \(.*\)\ \(.*\)/TTYPE=\1 ; TUSER=\2; TGROUP=\3; TMODE=\4; TNAME=\5 TLTARGET=\6/p"`
+ cat ${CFGFILE} | sed 's/#.*//' | \
+ while read TTYPE TUSER TGROUP TMODE TNAME TLTARGET; do
+ test -z "${TLTARGET}" && continue
TNAME=${ROOT_DIR}${TNAME}
[ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
@@ -187,7 +199,9 @@ apply_cfgfile() {
case "${TTYPE}" in
"f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
- create_file "${TNAME}" &
+ TSOURCE="$TLTARGET"
+ [ "${TSOURCE}" = "none" ] && TSOURCE=""
+ create_file "${TNAME}" "${TSOURCE}" &
;;
"d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
mk_dir "${TNAME}"
@@ -219,10 +233,37 @@ then
sh ${ROOT_DIR}/etc/volatile.cache
else
rm -f ${ROOT_DIR}/etc/volatile.cache ${ROOT_DIR}/etc/volatile.cache.build
- for file in `ls -1 "${CFGDIR}" | sort`; do
- apply_cfgfile "${CFGDIR}/${file}"
+
+ # Apply the core file with out checking requirements. ${TMPROOT} is
+ # needed by check_requirements but is setup by this file, so it must be
+ # processed first and without being checked.
+ [ -e "${CFGDIR}/${COREDEF}" ] && apply_cfgfile "${CFGDIR}/${COREDEF}" "yes"
+
+ # Fast path: check_requirements is slow and most of the time doesn't
+ # find any problems. If there are a lot of config files, it is much
+ # faster to to concatenate them all together and process them once to
+ # avoid the overhead of calling check_requirements repeatedly
+ TMP_FILE="${TMPROOT}/tmp_volatile.$$"
+ rm -f "$TMP_FILE"
+
+ CFGFILES="`ls -1 "${CFGDIR}" | grep -v "^${COREDEF}\$" | sort`"
+ for file in ${CFGFILES}; do
+ cat "${CFGDIR}/${file}" >> "$TMP_FILE"
done
+ if check_requirements "$TMP_FILE"
+ then
+ apply_cfgfile "$TMP_FILE" "yes"
+ else
+ # Slow path: One or more config files failed requirements.
+ # Process each one individually so the offending one can be
+ # skipped
+ for file in ${CFGFILES}; do
+ apply_cfgfile "${CFGDIR}/${file}"
+ done
+ fi
+ rm "$TMP_FILE"
+
[ -e ${ROOT_DIR}/etc/volatile.cache.build ] && sync && mv ${ROOT_DIR}/etc/volatile.cache.build ${ROOT_DIR}/etc/volatile.cache
fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
index 1a0328d63e..bd445ddb07 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
@@ -31,8 +31,13 @@ if [ "$1" = "start" ] ; then
if [ `is_on_read_only_partition /var/lib` = "yes" ]; then
grep -q "tmpfs /var/volatile" /proc/mounts || mount /var/volatile
mkdir -p /var/volatile/lib
- cp -a /var/lib/* /var/volatile/lib
- mount --bind /var/volatile/lib /var/lib
+ mkdir -p /var/volatile/.lib-work
+ # Try to mount using overlay, which is much faster than copying
+ # files. If that fails, fallback to the slower copy
+ if ! mount -t overlay overlay -olowerdir=/var/lib,upperdir=/var/volatile/lib,workdir=/var/volatile/.lib-work /var/lib > /dev/null 2>&1; then
+ cp -a /var/lib/* /var/volatile/lib
+ mount --bind /var/volatile/lib /var/lib
+ fi
fi
fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
index 1632a5f649..ffa1eee43d 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
@@ -9,5 +9,9 @@
# Description:
### END INIT INFO
+TIMESTAMP_FILE=/etc/timestamp
+
+[ -f /etc/default/timestamp ] && . /etc/default/timestamp
+
# Update the timestamp
-date -u +%4Y%2m%2d%2H%2M%2S 2>/dev/null > /etc/timestamp
+date -u +%4Y%2m%2d%2H%2M%2S 2>/dev/null > "$TIMESTAMP_FILE"
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh
index 0a52c90dac..4871ee94e5 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh
@@ -22,6 +22,14 @@ if [ -e /sys/kernel/debug ] && grep -q debugfs /proc/filesystems; then
mount -t debugfs debugfs /sys/kernel/debug
fi
+if [ -e /sys/kernel/config ] && grep -q configfs /proc/filesystems; then
+ mount -t configfs configfs /sys/kernel/config
+fi
+
+if [ -e /sys/firmware/efi/efivars ] && grep -q efivarfs /proc/filesystems; then
+ mount -t efivarfs efivarfs /sys/firmware/efi/efivars
+fi
+
if ! [ -e /dev/zero ] && [ -e /dev ] && grep -q devtmpfs /proc/filesystems; then
mount -n -t devtmpfs devtmpfs /dev
fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index 297245d0e4..cd8a4be05f 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -1,12 +1,14 @@
# This configuration file lists filesystem objects that should get verified
# during startup and be created if missing.
#
-# Every line must either be a comment starting with #
-# or a definition of format:
+# Entries have the following format:
# <type> <owner> <group> <mode> <path> <linksource>
# where the items are separated by whitespace !
#
-# <type> : d|f|l : (d)irectory|(f)ile|(l)ink
+# The # character introduces a comment lasting until end of line.
+# Blank lines are ignored.
+#
+# <type> : d|f|l|b : (d)irectory|(f)ile|(l)ink|(b)ind
#
# A linking example:
# l root root 0777 /var/test /tmp/testfile
@@ -25,7 +27,6 @@ d root root 1777 /run/lock none
d root root 0755 /var/volatile/log none
d root root 1777 /var/volatile/tmp none
l root root 1777 /var/lock /run/lock
-l root root 0755 /var/log /var/volatile/log
l root root 0755 /var/run /run
l root root 1777 /var/tmp /var/volatile/tmp
l root root 1777 /tmp /var/tmp
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 8f110b0050..1a59b82fbf 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -1,4 +1,5 @@
SUMMARY = "SysV init scripts"
+HOMEPAGE = "https://github.com/fedora-sysv/initscripts"
DESCRIPTION = "Initscripts provide the basic system startup initialization scripts for the system. These scripts include actions such as filesystem mounting, fsck, RTC manipulation and other actions routinely performed at system startup. In addition, the scripts are also used during system shutdown to reverse the actions performed at startup."
SECTION = "base"
LICENSE = "GPLv2"
@@ -39,22 +40,23 @@ SRC_URI = "file://functions \
S = "${WORKDIR}"
SRC_URI_append_arm = " file://alignment.sh"
+SRC_URI_append_armeb = " file://alignment.sh"
KERNEL_VERSION = ""
-inherit update-alternatives
DEPENDS_append = " update-rc.d-native"
-DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
-PACKAGES =+ "${PN}-functions"
-RDEPENDS_${PN} = "${PN}-functions \
- ${@bb.utils.contains('DISTRO_FEATURES','selinux','bash','',d)} \
+PACKAGES =+ "${PN}-functions ${PN}-sushell"
+RDEPENDS_${PN} = "initd-functions \
+ ${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \
"
+# Recommend pn-functions so that it will be a preferred default provider for initd-functions
+RRECOMMENDS_${PN} = "${PN}-functions"
+RPROVIDES_${PN}-functions = "initd-functions"
+RCONFLICTS_${PN}-functions = "lsbinitscripts"
FILES_${PN}-functions = "${sysconfdir}/init.d/functions*"
-
-ALTERNATIVE_PRIORITY_${PN}-functions = "90"
-ALTERNATIVE_${PN}-functions = "functions"
-ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
+FILES_${PN}-sushell = "${base_sbindir}/sushell"
HALTARGS ?= "-d -f"
@@ -102,6 +104,9 @@ do_install () {
install -m 0755 ${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
+ if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = True ]; then
+ echo "l root root 0755 /var/log /var/volatile/log" >> ${D}${sysconfdir}/default/volatiles/00_core
+ fi
install -m 0755 ${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
@@ -134,7 +139,7 @@ do_install () {
update-rc.d -r ${D} mountall.sh start 03 S .
update-rc.d -r ${D} hostname.sh start 39 S .
update-rc.d -r ${D} mountnfs.sh start 15 2 3 4 5 .
- update-rc.d -r ${D} bootmisc.sh start 55 S .
+ update-rc.d -r ${D} bootmisc.sh start 36 S .
update-rc.d -r ${D} sysfs.sh start 02 S .
update-rc.d -r ${D} populate-volatile.sh start 37 S .
update-rc.d -r ${D} read-only-rootfs-hook.sh start 29 S .
diff --git a/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch b/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch
new file mode 100644
index 0000000000..8916fd9f5e
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch
@@ -0,0 +1,24 @@
+From dc6bf2ae0835c6569b270e8e1f26a3173f3927d9 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 4 Dec 2019 13:14:01 +0100
+Subject: [PATCH] analyze.l: add missing string format
+
+Upstream-Status: Submitted [https://github.com/legionus/kbd/pull/35]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/libkeymap/analyze.l | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l
+index e32ace6..de62f46 100644
+--- a/src/libkeymap/analyze.l
++++ b/src/libkeymap/analyze.l
+@@ -463,7 +463,7 @@ To to|To|TO
+
+ strerror_r(errno, buf, sizeof(buf));
+
+- ERR(yyextra, buf);
++ ERR(yyextra, "%s", buf);
+ return(ERROR);
+ }
+
diff --git a/meta/recipes-core/kbd/kbd/run-ptest b/meta/recipes-core/kbd/kbd/run-ptest
new file mode 100644
index 0000000000..7a2d205f54
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd/run-ptest
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+CURDIR=$(dirname `readlink -f $0`)
+make -k -C ${CURDIR}/tests check-TESTS
diff --git a/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
new file mode 100644
index 0000000000..5872cef36b
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
@@ -0,0 +1,69 @@
+From 7f953dd689155bc1224a3369205c310bb5b760a7 Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Fri, 30 Sep 2016 16:49:55 +0800
+Subject: [PATCH] kbd: create ptest sub-package
+
+Upstream-Status: Inappropriate [embedded specific]
+
+kbd is out of source built, then the value of $(srcdir) is relative path of
+${S}/tests to ${B}/tests. Macro DATADIR is defined with $(srcdir) and replaced
+in .c files by compiler, and string @DATADIR@ is replaced with $(srdir) by rule
+"%: %.in" in Makefile.
+
+But kbd-ptest puts test cases and resource files in same directory, then some
+ptest cases fail to find resources.
+
+Replace DATADIR and @DATADIR@ with current directory(dot) to make test cases
+run as expected.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ tests/Makefile.am | 2 +-
+ tests/alt-is-meta.in | 6 ++----
+ tests/dumpkeys-fulltable.in | 2 +-
+ 3 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index f32b9aa..973cd26 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -7,7 +7,7 @@ AM_CPPFLAGS = \
+ -I$(builddir)/../src/libkeymap \
+ -I$(srcdir)/../src/libkbdfile \
+ -I$(builddir)/../src/libkbdfile \
+- -DDATADIR=\"$(srcdir)\" \
++ -DDATADIR=\".\" \
+ -DABS_DATADIR=\"$(realpath $(srcdir))\" \
+ -DBUILDDIR=\"$(builddir)\"
+
+diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
+index 3a1441f..772fb51 100755
+--- a/tests/alt-is-meta.in
++++ b/tests/alt-is-meta.in
+@@ -7,10 +7,8 @@ cd "$cwd"
+ rc=0
+ temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
+
+-datadir="@DATADIR@/data/alt-is-meta"
+-
+-./libkeymap-showmaps "$datadir"/alt-is-meta.map > "$temp" || rc=$?
+-cmp -s "$datadir/alt-is-meta.output" "$temp" || rc=$?
++./libkeymap-showmaps ./alt-is-meta.map > "$temp" || rc=$?
++cmp -s "./alt-is-meta.output" "$temp" || rc=$?
+
+ if [ "$rc" != 0 ]; then
+ printf 'failed\n'
+diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in
+index a3a5ece..67a73ef 100755
+--- a/tests/dumpkeys-fulltable.in
++++ b/tests/dumpkeys-fulltable.in
+@@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")"
+ cd "$cwd"
+
+ BUILDDIR="@BUILDDIR@"
+-DATADIR="@DATADIR@"
++DATADIR="."
+
+ check_keymap() {
+ local kmap temp rc
diff --git a/meta/recipes-core/kbd/kbd_2.0.3.bb b/meta/recipes-core/kbd/kbd_2.0.3.bb
deleted file mode 100644
index ea1e0b48d1..0000000000
--- a/meta/recipes-core/kbd/kbd_2.0.3.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Keytable files and keyboard utilities"
-# everything minus console-fonts is GPLv2+
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a5fcc36121d93e1f69d96a313078c8b5"
-DEPENDS = "libcheck"
-
-inherit autotools gettext ptest pkgconfig
-
-RREPLACES_${PN} = "console-tools"
-RPROVIDES_${PN} = "console-tools"
-RCONFLICTS_${PN} = "console-tools"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
- "
-
-SRC_URI[md5sum] = "231b46e7142eb41ea3ae06d2ded3c208"
-SRC_URI[sha256sum] = "7a899de1c0eb75f3aea737095a736f2375e1cbfbe693fc14a3fe0bfb4649fb5e"
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
-PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
-
-PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
-
-FILES_${PN}-consolefonts = "${datadir}/consolefonts"
-FILES_${PN}-consoletrans = "${datadir}/consoletrans"
-FILES_${PN}-keymaps = "${datadir}/keymaps"
-FILES_${PN}-unimaps = "${datadir}/unimaps"
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"
-ALTERNATIVE_PRIORITY = "100"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/kbd/kbd_2.2.0.bb b/meta/recipes-core/kbd/kbd_2.2.0.bb
new file mode 100644
index 0000000000..f2521617e5
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd_2.2.0.bb
@@ -0,0 +1,68 @@
+SUMMARY = "Keytable files and keyboard utilities"
+HOMEPAGE = "http://www.kbd-project.org/"
+# everything minus console-fonts is GPLv2+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
+
+inherit autotools gettext ptest pkgconfig
+
+DEPENDS += "flex-native"
+
+RREPLACES_${PN} = "console-tools"
+RPROVIDES_${PN} = "console-tools"
+RCONFLICTS_${PN} = "console-tools"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
+ file://run-ptest \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \
+ file://0001-analyze.l-add-missing-string-format.patch \
+ "
+
+SRC_URI[md5sum] = "d1d7ae0b5fb875dc082731e09cd0c8bc"
+SRC_URI[sha256sum] = "21a1bc5f6fb3b18ce9fdd717e4533368060a3182a39c7155eaf7ec0f5f83e9f7"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests','', d)} \
+ "
+
+PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
+PACKAGECONFIG[tests] = "--enable-tests, --disable-tests, libcheck"
+
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta
+}
+
+do_install_ptest() {
+ install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile
+ sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
+ -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+ -e 's:${DEBUG_PREFIX_MAP}::g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${S}/config/missing::g' \
+ -e 's:${WORKDIR}::g' \
+ -e '/libkeymap_.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
+
+ find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
+ find ${S}/tests \( -name \*.map -o -name \*.bin -o -name \*.output \) -exec install {} ${D}${PTEST_PATH}/tests \;
+
+ install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver
+}
+
+PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
+
+FILES_${PN}-consolefonts = "${datadir}/consolefonts"
+FILES_${PN}-consoletrans = "${datadir}/consoletrans"
+FILES_${PN}-keymaps = "${datadir}/keymaps"
+FILES_${PN}-unimaps = "${datadir}/unimaps"
+
+RDEPENDS_${PN}-ptest = "make"
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'vlock','', d)}"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/libcgroup/libcgroup/CVE-2018-14348.patch b/meta/recipes-core/libcgroup/libcgroup/CVE-2018-14348.patch
new file mode 100644
index 0000000000..d133703dec
--- /dev/null
+++ b/meta/recipes-core/libcgroup/libcgroup/CVE-2018-14348.patch
@@ -0,0 +1,37 @@
+From 0d88b73d189ea3440ccaab00418d6469f76fa590 Mon Sep 17 00:00:00 2001
+From: Michal Hocko <mhocko@suse.com>
+Date: Wed, 18 Jul 2018 11:24:29 +0200
+Subject: [PATCH] cgrulesengd: remove umask(0)
+
+One of our partners has noticed that cgred daemon is creating a log file
+(/var/log/cgred) with too wide permissions (0666) and that is seen as
+a security bug because an untrusted user can write to otherwise
+restricted area. CVE-2018-14348 has been assigned to this issue.
+
+CVE: CVE-2018-14348
+Upstream-Status: Backport [https://sourceforge.net/p/libcg/libcg/ci/0d88b73d189ea3440ccaab00418d6469f76fa590]
+
+Signed-off-by: Michal Hocko <mhocko@suse.com>
+Acked-by: Balbir Singh <bsingharora@gmail.com>
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+---
+ src/daemon/cgrulesengd.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c
+index ea51f11..0d288f3 100644
+--- a/src/daemon/cgrulesengd.c
++++ b/src/daemon/cgrulesengd.c
+@@ -889,9 +889,6 @@ int cgre_start_daemon(const char *logp, const int logf,
+ } else if (pid > 0) {
+ exit(EXIT_SUCCESS);
+ }
+-
+- /* Change the file mode mask. */
+- umask(0);
+ } else {
+ flog(LOG_DEBUG, "Not using daemon mode\n");
+ pid = getpid();
+--
+2.13.3
+
diff --git a/meta/recipes-core/libcgroup/libcgroup_0.41.bb b/meta/recipes-core/libcgroup/libcgroup_0.41.bb
index 95979630ad..92d7261b0d 100644
--- a/meta/recipes-core/libcgroup/libcgroup_0.41.bb
+++ b/meta/recipes-core/libcgroup/libcgroup_0.41.bb
@@ -1,4 +1,5 @@
SUMMARY = "Linux control group abstraction library"
+HOMEPAGE = "http://libcg.sourceforge.net/"
DESCRIPTION = "libcgroup is a library that abstracts the control group file system \
in Linux. Control groups allow you to limit, account and isolate resource usage \
(CPU, memory, disk I/O, etc.) of groups of processes."
@@ -8,9 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
inherit autotools pkgconfig
-DEPENDS = "bison-native flex-native ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+DEPENDS = "bison-native flex-native"
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v0.41/${BPN}-${PV}.tar.bz2"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v0.41/${BPN}-${PV}.tar.bz2 \
+ file://CVE-2018-14348.patch"
SRC_URI_append_libc-musl = " file://musl-decls-compat.patch"
SRC_URI[md5sum] = "3dea9d50b8a5b73ff0bf1cdcb210f63f"
@@ -19,9 +21,10 @@ SRC_URI[sha256sum] = "e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libcg/files/libcgroup/"
DEPENDS_append_libc-musl = " fts "
-EXTRA_OEMAKE_append_libc-musl = "LIBS=-lfts"
+EXTRA_OEMAKE_append_libc-musl = " LIBS=-lfts"
-EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
+PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG[pam] = "--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes,--enable-pam=no,libpam"
PACKAGES =+ "cgroups-pam-plugin"
FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
@@ -32,8 +35,8 @@ do_install_append() {
if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
mkdir -p ${D}/${base_libdir}/
mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
- rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
- ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
+ rm -f ${D}${libdir}/libcgroup.so
+ lnr ${D}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
fi
# pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
diff --git a/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.10.bb b/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.10.bb
new file mode 100644
index 0000000000..ba74eb1f94
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.10.bb
@@ -0,0 +1,18 @@
+#
+# This provides libcrypto.so.1 which contains obsolete APIs, needed for uninative in particular
+#
+
+require libxcrypt.inc
+
+PROVIDES = ""
+AUTO_LIBNAME_PKGS = ""
+EXCLUDE_FROM_WORLD = "1"
+
+API = "--enable-obsolete-api"
+
+do_install_append () {
+ rm -rf ${D}${includedir}
+ rm -rf ${D}${libdir}/pkgconfig
+ rm -rf ${D}${datadir}
+}
+
diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc
new file mode 100644
index 0000000000..6d6990c3d5
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
@@ -0,0 +1,33 @@
+SUMMARY = "Extended cryptographic library (from glibc)"
+DESCRIPTION = "Forked code from glibc libary to extract only crypto part."
+HOMEPAGE = "https://github.com/besser82/libxcrypt"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM ?= "file://LICENSING;md5=3bb6614cf5880cbf1b9dbd9e3d145e2c \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+"
+
+inherit autotools pkgconfig
+
+SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}"
+SRCREV = "dcf7d7509a26a2fe83f115f5ee731c59749ae17e"
+SRCBRANCH ?= "develop"
+
+PROVIDES = "virtual/crypt"
+
+FILES_${PN} = "${libdir}/libcrypt*.so.* \
+ ${libdir}/libcrypt-*.so \
+ ${libdir}/libowcrypt*.so.* \
+ ${libdir}/libowcrypt-*.so \
+"
+
+S = "${WORKDIR}/git"
+
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error"
+CPPFLAGS_append_class-nativesdk = " -Wno-error"
+
+API = "--disable-obsolete-api"
+EXTRA_OECONF += "${API}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/libxcrypt/libxcrypt_4.4.10.bb b/meta/recipes-core/libxcrypt/libxcrypt_4.4.10.bb
new file mode 100644
index 0000000000..79dba2f6dc
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/libxcrypt_4.4.10.bb
@@ -0,0 +1,2 @@
+require libxcrypt.inc
+
diff --git a/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
new file mode 100644
index 0000000000..5e9a0a506b
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
@@ -0,0 +1,98 @@
+From 2b5fb416aa275fd2a17a0139a2f783998bcb42cc Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Fri, 9 Jun 2017 17:50:46 +0200
+Subject: [PATCH] Make ptest run the python tests if python is enabled
+
+One of the tests (tstLastError.py) needed a minor correction. It might
+be due to the fact that the tests are forced to run with Python 3.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+
+---
+ Makefile.am | 2 +-
+ python/Makefile.am | 9 +++++++++
+ python/tests/Makefile.am | 10 ++++++++++
+ python/tests/tstLastError.py | 2 +-
+ 4 files changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ae62274..bd1e425 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -203,9 +203,9 @@ install-ptest:
+ install $(check_PROGRAMS) $(DESTDIR))
+ cp -r $(srcdir)/test $(DESTDIR)
+ cp -r $(srcdir)/result $(DESTDIR)
+- cp -r $(srcdir)/python $(DESTDIR)
+ cp Makefile $(DESTDIR)
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
++ $(MAKE) -C python install-ptest
+
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 34aed96..ba3ec6a 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+
+ $(GENERATED): $(srcdir)/generator.py $(API_DESC)
+ $(PYTHON) $(srcdir)/generator.py $(srcdir)
++
++install-ptest:
++ cp -r $(srcdir) $(DESTDIR)
++ sed -e 's|^Makefile:|_Makefile:|' \
++ -e 's|^\(tests test:\) all|\1|' Makefile >$(DESTDIR)/python/Makefile
++ $(MAKE) -C tests install-ptest
++else
++install-ptest:
+ endif
+
++.PHONY: tests test
+ tests test: all
+ cd tests && $(MAKE) tests
+diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
+index 227e24d..021bb29 100644
+--- a/python/tests/Makefile.am
++++ b/python/tests/Makefile.am
+@@ -59,6 +59,11 @@ XMLS= \
+ CLEANFILES = core tmp.xml *.pyc
+
+ if WITH_PYTHON
++install-ptest:
++ cp -r $(srcdir) $(DESTDIR)/python
++ sed -e 's|^Makefile:|_Makefile:|' \
++ -e 's|^\(srcdir = \).*|\1.|' Makefile >$(DESTDIR)/python/tests/Makefile
++
+ tests: $(PYTESTS)
+ @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
+ @echo "## running Python regression tests"
+@@ -70,9 +75,14 @@ tests: $(PYTESTS)
+ if [ "$$?" -ne 0 ] ; then \
+ echo "-- $$test" ; \
+ echo "$$log" ; \
++ echo "FAIL: $$test"; \
+ exit 1 ; \
++ else \
++ echo "PASS: $$test"; \
+ fi ; \
+ done)
+ else
++install-ptest:
++
+ tests:
+ endif
+diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py
+index 81d0acc..162c8db 100755
+--- a/python/tests/tstLastError.py
++++ b/python/tests/tstLastError.py
+@@ -25,7 +25,7 @@ class TestCase(unittest.TestCase):
+ when the exception is raised, check the libxml2.lastError for
+ expected values."""
+ # disable the default error handler
+- libxml2.registerErrorHandler(None,None)
++ libxml2.registerErrorHandler(lambda ctx,str: None,None)
+ try:
+ f(*args)
+ except exc:
diff --git a/meta/recipes-core/libxml/libxml2/ansidecl.patch b/meta/recipes-core/libxml/libxml2/ansidecl.patch
deleted file mode 100644
index 1085c680b6..0000000000
--- a/meta/recipes-core/libxml/libxml2/ansidecl.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Sadly cmake is broken. If it sees this reference and ansidecl is present, it will add a
-dependency upon it, even if HAVE_ANSIDEC_H is never set.
-
-The easiest solution is to remove these lines, otherwise recipes like libzypp can have a
-dependency on the ansidecl.h header via cmake. This can lead to odd results if the
-header is removed (clean binutils) and then the code is recompiled.
-
-RP 2012/7/10
-
-Upstream-Status: Inappropriate [its really a cmake bug]
-
-diff --git a/configure.ac b/configure.ac
-index 0260281..fdb58e9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -484 +483,0 @@ AC_CHECK_HEADERS([time.h])
--AC_CHECK_HEADERS([ansidecl.h])
-diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in
-index b173be9..d10f975 100644
---- a/include/libxml/xmlversion.h.in
-+++ b/include/libxml/xmlversion.h.in
-@@ -413,3 +412,0 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
--#ifdef HAVE_ANSIDECL_H
--#include <ansidecl.h>
--#endif
diff --git a/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch b/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
new file mode 100644
index 0000000000..ad719d4f5f
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
@@ -0,0 +1,33 @@
+From 395c0f53ec226aaabedb166e6b3a7f8590b95a5f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 20:39:15 +0800
+Subject: [PATCH] Make sure that Makefile doesn't try to compile these tests
+ again on the target where the source dependencies won't be available.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+Rebase to 2.9.9
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8f4e43d..5edb930 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -211,8 +211,7 @@ install-ptest:
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+ $(MAKE) -C python install-ptest
+
+-runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+- testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
++runtests:
+ [ -d test ] || $(LN_S) $(srcdir)/test .
+ [ -d result ] || $(LN_S) $(srcdir)/result .
+ $(CHECKER) ./runtest$(EXEEXT) && \
+--
+2.7.4
+
diff --git a/meta/recipes-core/libxml/libxml2/libxml-64bit.patch b/meta/recipes-core/libxml/libxml2/libxml-64bit.patch
index 1147017b61..fd8e469dd3 100644
--- a/meta/recipes-core/libxml/libxml2/libxml-64bit.patch
+++ b/meta/recipes-core/libxml/libxml2/libxml-64bit.patch
@@ -1,14 +1,19 @@
-Upstream-Status: Backport [from debian: bugs.debian.org/439843]
+From 056b14345b1abd76a761ab14538f1bc21302781a Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 20:26:51 +0800
+Subject: [PATCH] libxml 64bit
+Upstream-Status: Backport [from debian: bugs.debian.org/439843]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
- libxml.h | 3 +++
+ libxml.h | 3 +++
1 file changed, 3 insertions(+)
---- libxml2-2.6.29.orig/libxml.h
-+++ libxml2-2.6.29/libxml.h
-@@ -11,10 +11,13 @@
-
- #ifndef NO_LARGEFILE_SOURCE
+diff --git a/libxml.h b/libxml.h
+index 64e30f7..4e80d90 100644
+--- a/libxml.h
++++ b/libxml.h
+@@ -15,6 +15,9 @@
#ifndef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE
#endif
@@ -18,5 +23,6 @@ Upstream-Status: Backport [from debian: bugs.debian.org/439843]
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
- #endif
-
+--
+2.7.4
+
diff --git a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
index 3277165618..e6998f6e68 100644
--- a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
+++ b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
@@ -1,11 +1,20 @@
-AM_PATH_XML2 uses xml-config which we disable through
+From 43edc9a445ed66cceb7533eadeef242940b4592c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 20:37:12 +0800
+Subject: [PATCH] AM_PATH_XML2 uses xml-config which we disable through
binconfig-disabled.bbclass, so port it to use pkg-config instead.
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
+Rebase to 2.9.9
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libxml.m4 | 186 ++------------------------------------------------------------
+ 1 file changed, 5 insertions(+), 181 deletions(-)
+
diff --git a/libxml.m4 b/libxml.m4
-index 68cd824..5fa0a9b 100644
+index 2d7a6f5..1c53585 100644
--- a/libxml.m4
+++ b/libxml.m4
@@ -1,188 +1,12 @@
@@ -183,7 +192,7 @@ index 68cd824..5fa0a9b 100644
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
-- echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
+- echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed"
- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
- CPPFLAGS="$ac_save_CPPFLAGS"
@@ -202,3 +211,6 @@ index 68cd824..5fa0a9b 100644
- AC_SUBST(XML_LIBS)
- rm -f conf.xmltest
])
+--
+2.7.4
+
diff --git a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
index e83c8325e5..956ff3f33e 100644
--- a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
+++ b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
@@ -1,4 +1,7 @@
-Allow us to pass in PYTHON_SITE_PACKAGES
+From b038c3452667ed17ddb0e791cd7bdc7f8774ac29 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 20:35:20 +0800
+Subject: [PATCH] Allow us to pass in PYTHON_SITE_PACKAGES
The python binary used when building for nativesdk doesn't give us the
correct path here so we need to be able to specify it ourselves.
@@ -6,16 +9,18 @@ correct path here so we need to be able to specify it ourselves.
Upstream-Status: Inappropriate [config]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Rebase to 2.9.2
+Rebase to 2.9.9
+
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
+index ca911f3..3bbd654 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -813,7 +813,8 @@ dnl
+@@ -808,7 +808,8 @@ dnl
PYTHON_VERSION=
PYTHON_INCLUDES=
@@ -26,5 +31,5 @@ diff --git a/configure.ac b/configure.ac
pythondir=
if test "$with_python" != "no" ; then
--
-1.9.1
+2.7.4
diff --git a/meta/recipes-core/libxml/libxml2/run-ptest b/meta/recipes-core/libxml/libxml2/run-ptest
index 473d0b67a7..c313d83263 100644
--- a/meta/recipes-core/libxml/libxml2/run-ptest
+++ b/meta/recipes-core/libxml/libxml2/run-ptest
@@ -1,3 +1,4 @@
#!/bin/sh
+export LC_ALL=en_US.UTF-8
make -k runtests
diff --git a/meta/recipes-core/libxml/libxml2/runtest.patch b/meta/recipes-core/libxml/libxml2/runtest.patch
index 397ab20c30..0dbb353c0f 100644
--- a/meta/recipes-core/libxml/libxml2/runtest.patch
+++ b/meta/recipes-core/libxml/libxml2/runtest.patch
@@ -1,37 +1,48 @@
-Add 'install-ptest' rule.
-Print a standard result line for each test.
+Add 'install-ptest' rule. Print a standard result line for
+each test.
Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
-Upstream-Status: Pending
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+Upstream-Status: Backport
-diff -uNr a/Makefile.am b/Makefile.am
---- a/Makefile.am 2013-04-17 14:51:42.633386477 +0200
-+++ b/Makefile.am 2013-04-19 14:47:51.544720568 +0200
-@@ -202,10 +202,19 @@
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.am | 9 ++++
+ runsuite.c | 1 +
+ runtest.c | 2 +
+ runxmlconf.c | 1 +
+ testapi.c | 122 ++++++++++++++++++++++++++++++---------------
+ testchar.c | 156 +++++++++++++++++++++++++++++++++++++++++-----------------
+ testdict.c | 1 +
+ testlimits.c | 1 +
+ testrecurse.c | 2 +
+ 9 files changed, 210 insertions(+), 85 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 9c630be..7cfd04b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -202,6 +202,15 @@ runxmlconf_LDADD= $(LDADDS)
#testOOM_DEPENDENCIES = $(DEPS)
#testOOM_LDADD= $(LDADDS)
+install-ptest:
+ @(if [ -d .libs ] ; then cd .libs; fi; \
-+ install $(noinst_PROGRAMS) $(DESTDIR))
++ install $(check_PROGRAMS) $(DESTDIR))
+ cp -r $(srcdir)/test $(DESTDIR)
+ cp -r $(srcdir)/result $(DESTDIR)
+ cp -r $(srcdir)/python $(DESTDIR)
+ cp Makefile $(DESTDIR)
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+
- runtests:
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
[ -d test ] || $(LN_S) $(srcdir)/test .
- [ -d result ] || $(LN_S) $(srcdir)/result .
-- $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
-+ ./runtest$(EXEEXT) ; ./testrecurse$(EXEEXT) ; ./testapi$(EXEEXT) ; ./testchar$(EXEEXT) ; ./testdict$(EXEEXT) ; ./runxmlconf$(EXEEXT)
- @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
- $(MAKE) tests ; fi)
-
-diff -uNr a/runsuite.c b/runsuite.c
---- a/runsuite.c 2013-04-12 16:17:11.462823238 +0200
-+++ b/runsuite.c 2013-04-17 14:07:24.352693211 +0200
-@@ -1162,6 +1162,7 @@
+diff --git a/runsuite.c b/runsuite.c
+index aaab13e..9ba2c5d 100644
+--- a/runsuite.c
++++ b/runsuite.c
+@@ -1162,6 +1162,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
if (logfile != NULL)
fclose(logfile);
@@ -39,18 +50,19 @@ diff -uNr a/runsuite.c b/runsuite.c
return(ret);
}
#else /* !SCHEMAS */
-diff -uNr a/runtest.c b/runtest.c
---- a/runtest.c 2013-04-16 13:19:15.087997290 +0200
-+++ b/runtest.c 2013-04-17 14:08:29.529949655 +0200
-@@ -4386,6 +4386,7 @@
- err++;
- }
- }
+diff --git a/runtest.c b/runtest.c
+index addda5c..8ba5d59 100644
+--- a/runtest.c
++++ b/runtest.c
+@@ -4501,6 +4501,7 @@ launchTests(testDescPtr tst) {
+ xmlCharEncCloseFunc(ebcdicHandler);
+ xmlCharEncCloseFunc(eucJpHandler);
+
+ printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc);
return(err);
}
-@@ -4455,6 +4456,7 @@
+@@ -4577,6 +4578,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlCleanupParser();
xmlMemoryDump();
@@ -58,10 +70,11 @@ diff -uNr a/runtest.c b/runtest.c
return(ret);
}
-diff -uNr a/runxmlconf.c b/runxmlconf.c
---- a/runxmlconf.c 2013-04-16 12:53:49.900982990 +0200
-+++ b/runxmlconf.c 2013-04-17 14:09:21.111778104 +0200
-@@ -595,6 +595,7 @@
+diff --git a/runxmlconf.c b/runxmlconf.c
+index cef20f4..4f291fb 100644
+--- a/runxmlconf.c
++++ b/runxmlconf.c
+@@ -595,6 +595,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
if (logfile != NULL)
fclose(logfile);
@@ -69,15 +82,15 @@ diff -uNr a/runxmlconf.c b/runxmlconf.c
return(ret);
}
-diff -uNr a/testapi.c b/testapi.c
---- a/testapi.c 2013-04-12 16:16:57.763417659 +0200
-+++ b/testapi.c 2013-04-17 14:10:28.876924881 +0200
-@@ -1245,49 +1245,91 @@
+diff --git a/testapi.c b/testapi.c
+index 4a751e2..7ccc066 100644
+--- a/testapi.c
++++ b/testapi.c
+@@ -1246,49 +1246,91 @@ static int
testlibxml2(void)
{
int test_ret = 0;
-+ int ret = 0;
-
+-
- test_ret += test_HTMLparser();
- test_ret += test_HTMLtree();
- test_ret += test_SAX2();
@@ -117,6 +130,8 @@ diff -uNr a/testapi.c b/testapi.c
- test_ret += test_xpath();
- test_ret += test_xpathInternals();
- test_ret += test_xpointer();
++ int ret = 0;
++
+ test_ret += (ret = test_HTMLparser());
+ printf("%s: HTMLparser\n", (ret == 0) ? "PASS" : "FAIL");
+ test_ret += (ret = test_HTMLtree());
@@ -203,10 +218,11 @@ diff -uNr a/testapi.c b/testapi.c
return(test_ret);
}
-diff -uNr a/testchar.c b/testchar.c
---- a/testchar.c 2013-04-17 10:50:30.250147418 +0200
-+++ b/testchar.c 2013-04-18 16:11:28.455733800 +0200
-@@ -23,7 +23,7 @@
+diff --git a/testchar.c b/testchar.c
+index 0d08792..f555d3b 100644
+--- a/testchar.c
++++ b/testchar.c
+@@ -23,7 +23,7 @@ static void errorHandler(void *unused, xmlErrorPtr err) {
char document1[100] = "<doc>XXXX</doc>";
char document2[100] = "<doc foo='XXXX'/>";
@@ -215,7 +231,7 @@ diff -uNr a/testchar.c b/testchar.c
int len, char *data, int forbid1, int forbid2) {
int i;
xmlDocPtr res;
-@@ -37,33 +37,41 @@
+@@ -37,33 +37,41 @@ static void testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document,
res = xmlReadMemory(document, len, "test", NULL, 0);
if ((i == forbid1) || (i == forbid2)) {
@@ -225,7 +241,7 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Byte 0x%02X: %c\n",
i, i);
+ return(1);
-+ }
++ }
}
else if ((i == '<') || (i == '&')) {
@@ -233,8 +249,8 @@ diff -uNr a/testchar.c b/testchar.c
+ if ((lastError == 0) || (res != NULL)) {
fprintf(stderr,
"Failed to detect illegal char %c for Byte 0x%02X\n", i, i);
-+ return(1);
-+ }
++ return(1);
++ }
}
else if (((i < 0x20) || (i >= 0x80)) &&
(i != 0x9) && (i != 0xA) && (i != 0xD)) {
@@ -242,8 +258,8 @@ diff -uNr a/testchar.c b/testchar.c
+ if ((lastError != XML_ERR_INVALID_CHAR) && (res != NULL)) {
fprintf(stderr,
"Failed to detect invalid char for Byte 0x%02X\n", i);
-+ return(1);
-+ }
++ return(1);
++ }
}
else if (res == NULL) {
fprintf(stderr,
@@ -253,7 +269,7 @@ diff -uNr a/testchar.c b/testchar.c
if (res != NULL)
xmlFreeDoc(res);
}
-+ return(0);
++ return(0);
}
-static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
@@ -261,7 +277,7 @@ diff -uNr a/testchar.c b/testchar.c
int len, char *data) {
int i, j;
xmlDocPtr res;
-@@ -80,10 +88,12 @@
+@@ -80,10 +88,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
/* if first bit of first char is set, then second bit must too */
if ((i & 0x80) && ((i & 0x40) == 0)) {
@@ -271,11 +287,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
i, j);
+ return(1);
-+ }
++ }
}
/*
-@@ -91,10 +101,12 @@
+@@ -91,10 +101,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* bits must be 10
*/
else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
@@ -285,11 +301,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
i, j);
+ return(1);
-+ }
++ }
}
/*
-@@ -102,10 +114,12 @@
+@@ -102,10 +114,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* than 0x80, i.e. one of bits 5 to 1 of i must be set
*/
else if ((i & 0x80) && ((i & 0x1E) == 0)) {
@@ -299,11 +315,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
i, j);
+ return(1);
-+ }
++ }
}
/*
-@@ -113,10 +127,12 @@
+@@ -113,10 +127,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* at least 3 bytes, but we give only 2 !
*/
else if ((i & 0xE0) == 0xE0) {
@@ -313,25 +329,25 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n",
i, j);
+ return(1);
-+ }
++ }
}
/*
-@@ -125,11 +141,13 @@
+@@ -125,11 +141,13 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
else if ((lastError != 0) || (res == NULL)) {
fprintf(stderr,
"Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j);
-+ return(1);
++ return(1);
}
if (res != NULL)
xmlFreeDoc(res);
}
}
-+ return(0);
++ return(0);
}
/**
-@@ -141,9 +159,10 @@
+@@ -141,9 +159,10 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* CDATA in text or in attribute values.
*/
@@ -343,7 +359,7 @@ diff -uNr a/testchar.c b/testchar.c
/*
* Set up a parsing context using the first document as
-@@ -152,7 +171,7 @@
+@@ -152,7 +171,7 @@ static void testDocumentRanges(void) {
ctxt = xmlNewParserCtxt();
if (ctxt == NULL) {
fprintf(stderr, "Failed to allocate parser context\n");
@@ -352,7 +368,7 @@ diff -uNr a/testchar.c b/testchar.c
}
printf("testing 1 byte char in document: 1");
-@@ -163,7 +182,7 @@
+@@ -163,7 +182,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 1 byte injection at beginning of area */
@@ -361,7 +377,7 @@ diff -uNr a/testchar.c b/testchar.c
data, -1, -1);
printf(" 2");
fflush(stdout);
-@@ -172,7 +191,7 @@
+@@ -172,7 +191,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 1 byte injection at end of area */
@@ -370,7 +386,7 @@ diff -uNr a/testchar.c b/testchar.c
data + 3, -1, -1);
printf(" 3");
-@@ -183,7 +202,7 @@
+@@ -183,7 +202,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 1 byte injection at beginning of area */
@@ -379,7 +395,7 @@ diff -uNr a/testchar.c b/testchar.c
data, '\'', -1);
printf(" 4");
fflush(stdout);
-@@ -192,7 +211,7 @@
+@@ -192,7 +211,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 1 byte injection at end of area */
@@ -388,7 +404,7 @@ diff -uNr a/testchar.c b/testchar.c
data + 3, '\'', -1);
printf(" done\n");
-@@ -204,7 +223,7 @@
+@@ -204,7 +223,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 2 byte injection at beginning of area */
@@ -397,7 +413,7 @@ diff -uNr a/testchar.c b/testchar.c
data);
printf(" 2");
fflush(stdout);
-@@ -213,7 +232,7 @@
+@@ -213,7 +232,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 2 byte injection at end of area */
@@ -406,7 +422,7 @@ diff -uNr a/testchar.c b/testchar.c
data + 2);
printf(" 3");
-@@ -224,7 +243,7 @@
+@@ -224,7 +243,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 2 byte injection at beginning of area */
@@ -415,7 +431,7 @@ diff -uNr a/testchar.c b/testchar.c
data);
printf(" 4");
fflush(stdout);
-@@ -233,14 +252,15 @@
+@@ -233,14 +252,15 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 2 byte injection at end of area */
@@ -433,7 +449,7 @@ diff -uNr a/testchar.c b/testchar.c
int i = 0;
int len, c;
-@@ -255,19 +275,25 @@
+@@ -255,19 +275,25 @@ static void testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
c = xmlCurrentChar(ctxt, &len);
if ((i == 0) || (i >= 0x80)) {
/* we must see an error there */
@@ -441,20 +457,20 @@ diff -uNr a/testchar.c b/testchar.c
+ if (lastError != XML_ERR_INVALID_CHAR) {
fprintf(stderr,
"Failed to detect invalid char for Byte 0x%02X\n", i);
-+ return(1);
-+ }
++ return(1);
++ }
} else if (i == 0xD) {
- if ((c != 0xA) || (len != 1))
+ if ((c != 0xA) || (len != 1)) {
fprintf(stderr, "Failed to convert char for Byte 0x%02X\n", i);
+ return(1);
-+ }
++ }
} else if ((c != i) || (len != 1)) {
fprintf(stderr, "Failed to parse char for Byte 0x%02X\n", i);
-+ return(1);
++ return(1);
}
}
-+ return(0);
++ return(0);
}
-static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
@@ -462,7 +478,7 @@ diff -uNr a/testchar.c b/testchar.c
int i, j;
int len, c;
-@@ -284,10 +310,12 @@
+@@ -284,10 +310,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
/* if first bit of first char is set, then second bit must too */
if ((i & 0x80) && ((i & 0x40) == 0)) {
@@ -471,12 +487,12 @@ diff -uNr a/testchar.c b/testchar.c
fprintf(stderr,
"Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
i, j);
-+ return(1);
-+ }
++ return(1);
++ }
}
/*
-@@ -295,10 +323,12 @@
+@@ -295,10 +323,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
* bits must be 10
*/
else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
@@ -485,12 +501,12 @@ diff -uNr a/testchar.c b/testchar.c
fprintf(stderr,
"Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n",
i, j, c);
-+ return(1);
-+ }
++ return(1);
++ }
}
/*
-@@ -306,10 +336,12 @@
+@@ -306,10 +336,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
* than 0x80, i.e. one of bits 5 to 1 of i must be set
*/
else if ((i & 0x80) && ((i & 0x1E) == 0)) {
@@ -499,12 +515,12 @@ diff -uNr a/testchar.c b/testchar.c
fprintf(stderr,
"Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n",
i, j, c);
-+ return(1);
-+ }
++ return(1);
++ }
}
/*
-@@ -317,10 +349,12 @@
+@@ -317,10 +349,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
* at least 3 bytes, but we give only 2 !
*/
else if ((i & 0xE0) == 0xE0) {
@@ -513,12 +529,12 @@ diff -uNr a/testchar.c b/testchar.c
fprintf(stderr,
"Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n",
i, j);
-+ return(1);
-+ }
++ return(1);
++ }
}
/*
-@@ -329,6 +363,7 @@
+@@ -329,6 +363,7 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
else if ((lastError != 0) || (len != 2)) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X\n", i, j);
@@ -526,7 +542,7 @@ diff -uNr a/testchar.c b/testchar.c
}
/*
-@@ -338,12 +373,14 @@
+@@ -338,12 +373,14 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X: expect %d got %d\n",
i, j, ((j & 0x3F) + ((i & 0x1F) << 6)), c);
@@ -534,7 +550,7 @@ diff -uNr a/testchar.c b/testchar.c
}
}
}
-+ return(0);
++ return(0);
}
-static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
@@ -542,7 +558,7 @@ diff -uNr a/testchar.c b/testchar.c
int i, j, k, K;
int len, c;
unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
-@@ -368,20 +405,24 @@
+@@ -368,20 +405,24 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
* at least 4 bytes, but we give only 3 !
*/
if ((i & 0xF0) == 0xF0) {
@@ -552,7 +568,7 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
i, j, K, data[3]);
+ return(1);
-+ }
++ }
}
/*
@@ -565,11 +581,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n",
i, j, K);
+ return(1);
-+ }
++ }
}
/*
-@@ -390,10 +431,12 @@
+@@ -390,10 +431,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
* the 6th byte of data[1] must be set
*/
else if (((i & 0xF) == 0) && ((j & 0x20) == 0)) {
@@ -579,11 +595,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n",
i, j, K);
+ return(1);
-+ }
++ }
}
/*
-@@ -401,10 +444,12 @@
+@@ -401,10 +444,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
*/
else if (((value > 0xD7FF) && (value <0xE000)) ||
((value > 0xFFFD) && (value <0x10000))) {
@@ -593,28 +609,28 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X\n",
value, i, j, K);
+ return(1);
-+ }
++ }
}
/*
-@@ -414,6 +459,7 @@
+@@ -414,6 +459,7 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
i, j, K);
-+ return(1);
++ return(1);
}
/*
-@@ -423,13 +469,15 @@
+@@ -423,13 +469,15 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
i, j, data[2], value, c);
-+ return(1);
++ return(1);
}
}
}
}
-+ return(0);
++ return(0);
}
-static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
@@ -622,7 +638,7 @@ diff -uNr a/testchar.c b/testchar.c
int i, j, k, K, l, L;
int len, c;
unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
-@@ -458,10 +506,12 @@
+@@ -458,10 +506,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* at least 5 bytes, but we give only 4 !
*/
if ((i & 0xF8) == 0xF8) {
@@ -632,11 +648,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
i, j, K, data[3]);
+ return(1);
-+ }
++ }
}
/*
-@@ -469,10 +519,12 @@
+@@ -469,10 +519,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
*/
else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80) ||
((L & 0xC0) != 0x80)) {
@@ -646,11 +662,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
i, j, K, L);
+ return(1);
-+ }
++ }
}
/*
-@@ -481,10 +533,12 @@
+@@ -481,10 +533,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* the 6 or 5th byte of j must be set
*/
else if (((i & 0x7) == 0) && ((j & 0x30) == 0)) {
@@ -660,11 +676,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
i, j, K, L);
+ return(1);
-+ }
++ }
}
/*
-@@ -493,10 +547,12 @@
+@@ -493,10 +547,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
else if (((value > 0xD7FF) && (value <0xE000)) ||
((value > 0xFFFD) && (value <0x10000)) ||
(value > 0x10FFFF)) {
@@ -674,33 +690,33 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
value, i, j, K, L);
+ return(1);
-+ }
++ }
}
/*
-@@ -506,6 +562,7 @@
+@@ -506,6 +562,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
i, j, K);
-+ return(1);
++ return(1);
}
/*
-@@ -515,11 +572,13 @@
+@@ -515,11 +572,13 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
i, j, data[2], value, c);
-+ return(1);
++ return(1);
}
}
}
}
}
-+ return(0);
++ return(0);
}
/**
-@@ -530,11 +589,12 @@
+@@ -530,11 +589,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* cover the full range of UTF-8 chars accepted by XML-1.0
*/
@@ -714,7 +730,7 @@ diff -uNr a/testchar.c b/testchar.c
memset(data, 0, 5);
-@@ -545,17 +605,19 @@
+@@ -545,17 +605,19 @@ static void testCharRanges(void) {
ctxt = xmlNewParserCtxt();
if (ctxt == NULL) {
fprintf(stderr, "Failed to allocate parser context\n");
@@ -725,17 +741,17 @@ diff -uNr a/testchar.c b/testchar.c
XML_CHAR_ENCODING_NONE);
if (buf == NULL) {
fprintf(stderr, "Failed to allocate input buffer\n");
-+ test_ret = 1;
++ test_ret = 1;
goto error;
}
input = xmlNewInputStream(ctxt);
if (input == NULL) {
xmlFreeParserInputBuffer(buf);
-+ test_ret = 1;
++ test_ret = 1;
goto error;
}
input->filename = NULL;
-@@ -567,25 +629,28 @@
+@@ -567,25 +629,28 @@ static void testCharRanges(void) {
printf("testing char range: 1");
fflush(stdout);
@@ -768,7 +784,7 @@ diff -uNr a/testchar.c b/testchar.c
/*
* this initialize the library and check potential ABI mismatches
* between the version it was compiled for and the actual shared
-@@ -602,8 +667,9 @@
+@@ -602,8 +667,9 @@ int main(void) {
/*
* Run the tests
*/
@@ -780,30 +796,33 @@ diff -uNr a/testchar.c b/testchar.c
/*
* Cleanup function for the XML library.
-diff -uNr a/testdict.c b/testdict.c
---- a/testdict.c 2013-04-16 15:08:42.971177193 +0200
-+++ b/testdict.c 2013-04-18 15:59:00.699482439 +0200
-@@ -440,5 +440,6 @@
+diff --git a/testdict.c b/testdict.c
+index 40bebd0..114b934 100644
+--- a/testdict.c
++++ b/testdict.c
+@@ -440,5 +440,6 @@ int main(void)
clean_strings();
xmlCleanupParser();
xmlMemoryDump();
+ printf("%s: testdict\n\n", (ret == 0) ? "PASS" : "FAIL");
return(ret);
}
-diff -uNr a/testlimits.c b/testlimits.c
---- a/testlimits.c 2013-04-12 16:16:36.180354177 +0200
-+++ b/testlimits.c 2013-04-17 14:03:17.203092987 +0200
-@@ -1630,5 +1630,6 @@
+diff --git a/testlimits.c b/testlimits.c
+index 68c94db..1584434 100644
+--- a/testlimits.c
++++ b/testlimits.c
+@@ -1634,5 +1634,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlCleanupParser();
xmlMemoryDump();
+ printf("%s: testlimits\n", (ret == 0) ? "PASS" : "FAIL");
return(ret);
}
-diff -uNr a/testrecurse.c b/testrecurse.c
---- a/testrecurse.c 2013-04-16 13:19:49.366536295 +0200
-+++ b/testrecurse.c 2013-04-17 14:06:27.367091622 +0200
-@@ -892,6 +892,7 @@
+diff --git a/testrecurse.c b/testrecurse.c
+index f95ae1c..74c8f8b 100644
+--- a/testrecurse.c
++++ b/testrecurse.c
+@@ -892,6 +892,7 @@ launchTests(testDescPtr tst) {
err++;
}
}
@@ -811,10 +830,13 @@ diff -uNr a/testrecurse.c b/testrecurse.c
return(err);
}
-@@ -961,5 +962,6 @@
+@@ -961,5 +962,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlCleanupParser();
xmlMemoryDump();
+ printf("%s: testrecurse\n\n", (ret == 0) ? "PASS" : "FAIL");
return(ret);
}
+--
+2.7.4
+
diff --git a/meta/recipes-core/libxml/libxml2_2.9.10.bb b/meta/recipes-core/libxml/libxml2_2.9.10.bb
new file mode 100644
index 0000000000..2c833fa7a2
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2_2.9.10.bb
@@ -0,0 +1,110 @@
+SUMMARY = "XML C Parser Library and Toolkit"
+DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
+HOMEPAGE = "http://www.xmlsoft.org/"
+BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
+ file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
+ file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
+ file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
+
+DEPENDS = "zlib virtual/libiconv"
+
+SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
+ http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=testtar \
+ file://libxml-64bit.patch \
+ file://runtest.patch \
+ file://run-ptest \
+ file://python-sitepackages-dir.patch \
+ file://libxml-m4-use-pkgconfig.patch \
+ file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
+ file://fix-execution-of-ptests.patch \
+ "
+
+SRC_URI[libtar.md5sum] = "10942a1dc23137a8aa07f0639cbfece5"
+SRC_URI[libtar.sha256sum] = "aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f"
+SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
+SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
+
+BINCONFIG = "${bindir}/xml2-config"
+
+PACKAGECONFIG ??= "python \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+inherit autotools pkgconfig binconfig-disabled ptest features_check
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
+
+RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
+
+RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us \
+ glibc-gconv-ibm1141 \
+ glibc-gconv-iso8859-5 \
+ glibc-gconv-euc-jp \
+ locale-base-en-us \
+ "
+
+export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
+
+# WARNING: zlib is required for RPM use
+EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
+
+python populate_packages_prepend () {
+ # autonamer would call this libxml2-2, but we don't want that
+ if d.getVar('DEBIAN_NAMES'):
+ d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
+}
+
+PACKAGE_BEFORE_PN += "${PN}-utils"
+PACKAGES += "${PN}-python"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
+FILES_${PN}-utils = "${bindir}/*"
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+do_configure_prepend () {
+ # executables take longer to package: these should not be executable
+ find ${S}/xmlconf/ -type f -exec chmod -x {} \+
+}
+
+do_compile_ptest() {
+ oe_runmake check-am
+}
+
+do_install_ptest () {
+ cp -r ${S}/xmlconf ${D}${PTEST_PATH}
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
+ sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \
+ ${D}${PTEST_PATH}/python/tests/Makefile
+ grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
+ xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
+ fi
+ #Remove build host references from various Makefiles
+ find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ -e '/^RELDATE/d' \
+ {} +
+}
+
+do_install_append_class-native () {
+ # Docs are not needed in the native case
+ rm ${D}${datadir}/gtk-doc -rf
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/libxml/libxml2_2.9.4.bb b/meta/recipes-core/libxml/libxml2_2.9.4.bb
deleted file mode 100644
index 265d2b73a9..0000000000
--- a/meta/recipes-core/libxml/libxml2_2.9.4.bb
+++ /dev/null
@@ -1,70 +0,0 @@
-SUMMARY = "XML C Parser Library and Toolkit"
-DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
-HOMEPAGE = "http://www.xmlsoft.org/"
-BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
- file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
- file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
- file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
-
-DEPENDS = "zlib virtual/libiconv"
-
-SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
- http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
- file://libxml-64bit.patch \
- file://ansidecl.patch \
- file://runtest.patch \
- file://run-ptest \
- file://python-sitepackages-dir.patch \
- file://libxml-m4-use-pkgconfig.patch \
- "
-
-SRC_URI[libtar.md5sum] = "ae249165c173b1ff386ee8ad676815f5"
-SRC_URI[libtar.sha256sum] = "ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c"
-SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
-SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
-
-BINCONFIG = "${bindir}/xml2-config"
-
-inherit autotools pkgconfig binconfig-disabled pythonnative ptest
-
-RDEPENDS_${PN}-ptest += "python-core"
-
-RDEPENDS_${PN}-python += "python-core"
-
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
-
-export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-
-PACKAGECONFIG ??= "python \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-"
-PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-# WARNING: zlib is require for RPM use
-EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
-
-python populate_packages_prepend () {
- # autonamer would call this libxml2-2, but we don't want that
- if d.getVar('DEBIAN_NAMES', True):
- d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
-}
-
-PACKAGES += "${PN}-utils ${PN}-python"
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
-FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
-FILES_${PN}-utils += "${bindir}/*"
-FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
-
-do_install_ptest () {
- cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/meta/build-sysroots.bb b/meta/recipes-core/meta/build-sysroots.bb
new file mode 100644
index 0000000000..7a712e2f38
--- /dev/null
+++ b/meta/recipes-core/meta/build-sysroots.bb
@@ -0,0 +1,38 @@
+INHIBIT_DEFAULT_DEPS = "1"
+LICENSE = "MIT"
+
+STANDALONE_SYSROOT = "${STAGING_DIR}/${MACHINE}"
+STANDALONE_SYSROOT_NATIVE = "${STAGING_DIR}/${BUILD_ARCH}"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+EXCLUDE_FROM_WORLD = "1"
+
+inherit nopackages
+deltask fetch
+deltask unpack
+deltask patch
+deltask prepare_recipe_sysroot
+deltask populate_lic
+deltask configure
+deltask compile
+deltask install
+deltask populate_sysroot
+
+python do_build_native_sysroot () {
+ targetsysroot = d.getVar("STANDALONE_SYSROOT")
+ nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE")
+ staging_populate_sysroot_dir(targetsysroot, nativesysroot, True, d)
+}
+do_build_native_sysroot[cleandirs] = "${STANDALONE_SYSROOT_NATIVE}"
+do_build_native_sysroot[nostamp] = "1"
+addtask do_build_native_sysroot before do_build
+
+python do_build_target_sysroot () {
+ targetsysroot = d.getVar("STANDALONE_SYSROOT")
+ nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE")
+ staging_populate_sysroot_dir(targetsysroot, nativesysroot, False, d)
+}
+do_build_target_sysroot[cleandirs] = "${STANDALONE_SYSROOT}"
+do_build_target_sysroot[nostamp] = "1"
+addtask do_build_target_sysroot before do_build
+
+do_clean[cleandirs] += "${STANDALONE_SYSROOT} ${STANDALONE_SYSROOT_NATIVE}"
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 5808c95d81..9c5c2cc8d6 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -2,8 +2,6 @@ DESCRIPTION = "SDK type target for building a standalone tarball containing pyth
tarball can be used to run bitbake builds on systems which don't meet the usual version requirements."
SUMMARY = "Standalone tarball for running builds on systems with inadequate software"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
TOOLCHAIN_TARGET_TASK ?= ""
@@ -12,6 +10,8 @@ TOOLCHAIN_HOST_TASK ?= "\
nativesdk-python3-modules \
nativesdk-python3-misc \
nativesdk-python3-git \
+ nativesdk-python3-testtools \
+ nativesdk-python3-subunit \
nativesdk-ncurses-terminfo-base \
nativesdk-chrpath \
nativesdk-tar \
@@ -23,7 +23,8 @@ TOOLCHAIN_HOST_TASK ?= "\
nativesdk-wget \
nativesdk-ca-certificates \
nativesdk-texinfo \
- nativesdk-locale-base-en-us \
+ nativesdk-libnss-nis \
+ nativesdk-rpcsvc-proto \
"
MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
@@ -48,8 +49,6 @@ inherit toolchain-scripts-base
inherit nopackages
deltask install
-deltask package
-deltask packagedata
deltask populate_sysroot
do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
@@ -73,6 +72,7 @@ create_sdk_files_append () {
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
+ echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script
if [ "${SDKMACHINE}" = "i686" ]; then
echo 'export NO32LIBS="0"' >>$script
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
new file mode 100644
index 0000000000..575254af40
--- /dev/null
+++ b/meta/recipes-core/meta/cve-update-db-native.bb
@@ -0,0 +1,185 @@
+SUMMARY = "Updates the NVD CVE database"
+LICENSE = "MIT"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+inherit native
+
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_install
+deltask do_populate_sysroot
+
+python () {
+ if not d.getVar("CVE_CHECK_DB_FILE"):
+ raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.")
+}
+
+python do_populate_cve_db() {
+ """
+ Update NVD database with json data feed
+ """
+ import bb.utils
+ import sqlite3, urllib, urllib.parse, shutil, gzip
+ from datetime import date
+
+ bb.utils.export_proxies(d)
+
+ BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-"
+ YEAR_START = 2002
+
+ db_file = d.getVar("CVE_CHECK_DB_FILE")
+ db_dir = os.path.dirname(db_file)
+ json_tmpfile = os.path.join(db_dir, 'nvd.json.gz')
+
+ # Don't refresh the database more than once an hour
+ try:
+ import time
+ if time.time() - os.path.getmtime(db_file) < (60*60):
+ return
+ except OSError:
+ pass
+
+ cve_f = open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a')
+
+ if not os.path.isdir(db_dir):
+ os.mkdir(db_dir)
+
+ # Connect to database
+ conn = sqlite3.connect(db_file)
+ c = conn.cursor()
+
+ initialize_db(c)
+
+ for year in range(YEAR_START, date.today().year + 1):
+ year_url = BASE_URL + str(year)
+ meta_url = year_url + ".meta"
+ json_url = year_url + ".json.gz"
+
+ # Retrieve meta last modified date
+ response = urllib.request.urlopen(meta_url)
+ if response:
+ for l in response.read().decode("utf-8").splitlines():
+ key, value = l.split(":", 1)
+ if key == "lastModifiedDate":
+ last_modified = value
+ break
+ else:
+ bb.warn("Cannot parse CVE metadata, update failed")
+ return
+
+ # Compare with current db last modified date
+ c.execute("select DATE from META where YEAR = ?", (year,))
+ meta = c.fetchone()
+ if not meta or meta[0] != last_modified:
+ # Clear products table entries corresponding to current year
+ c.execute("delete from PRODUCTS where ID like ?", ('CVE-%d%%' % year,))
+
+ # Update db with current year json file
+ try:
+ response = urllib.request.urlopen(json_url)
+ if response:
+ update_db(c, gzip.decompress(response.read()).decode('utf-8'))
+ c.execute("insert or replace into META values (?, ?)", [year, last_modified])
+ except urllib.error.URLError as e:
+ cve_f.write('Warning: CVE db update error, CVE data is outdated.\n\n')
+ bb.warn("Cannot parse CVE data (%s), update failed" % e.reason)
+ return
+
+ # Update success, set the date to cve_check file.
+ if year == date.today().year:
+ cve_f.write('CVE database update : %s\n\n' % date.today())
+
+ cve_f.close()
+ conn.commit()
+ conn.close()
+}
+
+def initialize_db(c):
+ c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)")
+
+ c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \
+ SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)")
+
+ c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \
+ VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \
+ VERSION_END TEXT, OPERATOR_END TEXT)")
+ c.execute("CREATE INDEX IF NOT EXISTS PRODUCT_ID_IDX on PRODUCTS(ID);")
+
+def parse_node_and_insert(c, node, cveId):
+ # Parse children node if needed
+ for child in node.get('children', ()):
+ parse_node_and_insert(c, child, cveId)
+
+ def cpe_generator():
+ for cpe in node.get('cpe_match', ()):
+ if not cpe['vulnerable']:
+ return
+ cpe23 = cpe['cpe23Uri'].split(':')
+ vendor = cpe23[3]
+ product = cpe23[4]
+ version = cpe23[5]
+
+ if version != '*':
+ # Version is defined, this is a '=' match
+ yield [cveId, vendor, product, version, '=', '', '']
+ else:
+ # Parse start version, end version and operators
+ op_start = ''
+ op_end = ''
+ v_start = ''
+ v_end = ''
+
+ if 'versionStartIncluding' in cpe:
+ op_start = '>='
+ v_start = cpe['versionStartIncluding']
+
+ if 'versionStartExcluding' in cpe:
+ op_start = '>'
+ v_start = cpe['versionStartExcluding']
+
+ if 'versionEndIncluding' in cpe:
+ op_end = '<='
+ v_end = cpe['versionEndIncluding']
+
+ if 'versionEndExcluding' in cpe:
+ op_end = '<'
+ v_end = cpe['versionEndExcluding']
+
+ yield [cveId, vendor, product, v_start, op_start, v_end, op_end]
+
+ c.executemany("insert into PRODUCTS values (?, ?, ?, ?, ?, ?, ?)", cpe_generator())
+
+def update_db(c, jsondata):
+ import json
+ root = json.loads(jsondata)
+
+ for elt in root['CVE_Items']:
+ if not elt['impact']:
+ continue
+
+ cveId = elt['cve']['CVE_data_meta']['ID']
+ cveDesc = elt['cve']['description']['description_data'][0]['value']
+ date = elt['lastModifiedDate']
+ accessVector = elt['impact']['baseMetricV2']['cvssV2']['accessVector']
+ cvssv2 = elt['impact']['baseMetricV2']['cvssV2']['baseScore']
+
+ try:
+ cvssv3 = elt['impact']['baseMetricV3']['cvssV3']['baseScore']
+ except:
+ cvssv3 = 0.0
+
+ c.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)",
+ [cveId, cveDesc, cvssv2, cvssv3, date, accessVector])
+
+ configurations = elt['configurations']['nodes']
+ for config in configurations:
+ parse_node_and_insert(c, config, cveId)
+
+
+addtask do_populate_cve_db before do_fetch
+do_populate_cve_db[nostamp] = "1"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc b/meta/recipes-core/meta/dummy-sdk-package.inc
new file mode 100644
index 0000000000..61afab1d76
--- /dev/null
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -0,0 +1,30 @@
+SUMMARY = "Dummy packages which handle excluding packages from the sdk, e.g. ensuring perl is excluded from buildtools"
+LICENSE = "MIT"
+
+PACKAGE_ARCH = "all"
+
+inherit allarch
+
+python() {
+ # Put the package somewhere separate to ensure it's never used except
+ # when we want it
+ # (note that we have to do this in anonymous python here to avoid
+ # allarch.bbclass disabling itself)
+ d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PR[vardeps] += "DUMMYPROVIDES"
+PR[vardeps] += "DUMMYPROVIDES_PACKAGES"
+
+DUMMYPROVIDES_PACKAGES ??= ""
+DUMMYPROVIDES += "${@' '.join([multilib_pkg_extend(d, pkg) for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}"
+
+python populate_packages_prepend() {
+ p = d.getVar("PN")
+ d.appendVar("RPROVIDES_%s" % p, "${DUMMYPROVIDES}")
+ d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}")
+ d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES_PACKAGES}")
+}
+
diff --git a/meta/recipes-core/meta/meta-environment-extsdk.bb b/meta/recipes-core/meta/meta-environment-extsdk.bb
index d9e596143f..2076b56f25 100644
--- a/meta/recipes-core/meta/meta-environment-extsdk.bb
+++ b/meta/recipes-core/meta/meta-environment-extsdk.bb
@@ -5,8 +5,8 @@ require meta-environment.bb
PN = "meta-environment-extsdk-${MACHINE}"
create_sdk_files_append() {
- local sysroot=${SDKPATH}/${@os.path.relpath(d.getVar('STAGING_DIR_TARGET', True), d.getVar('TOPDIR', True))}
- local sdkpathnative=${SDKPATH}/${@os.path.relpath(d.getVar('STAGING_DIR_NATIVE',True), d.getVar('TOPDIR', True))}
+ local sysroot=${SDKPATH}/tmp/${@os.path.relpath(d.getVar('STAGING_DIR'), d.getVar('TMPDIR'))}/${MACHINE}
+ local sdkpathnative=${SDKPATH}/tmp/${@os.path.relpath(d.getVar('STAGING_DIR'), d.getVar('TMPDIR'))}/${BUILD_ARCH}
toolchain_create_sdk_env_script '' '' $sysroot '' ${bindir_native} ${prefix_native} $sdkpathnative
}
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index d9e045f041..da1230bead 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -1,6 +1,4 @@
SUMMARY = "Package of environment files for SDK"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
LICENSE = "MIT"
PR = "r8"
@@ -23,27 +21,28 @@ inherit cross-canadian
do_generate_content[cleandirs] = "${SDK_OUTPUT}"
do_generate_content[dirs] = "${SDK_OUTPUT}/${SDKPATH}"
+# Need to ensure we have the virtual mappings and site files for all multtilib variants
+do_generate_content[depends] = "${@oe.utils.build_depends_string(all_multilib_tune_values(d, 'TOOLCHAIN_NEED_CONFIGSITE_CACHE'), 'do_populate_sysroot')}"
python do_generate_content() {
# Handle multilibs in the SDK environment, siteconfig, etc files...
localdata = bb.data.createCopy(d)
# make sure we only use the WORKDIR value from 'd', or it can change
- localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
+ localdata.setVar('WORKDIR', d.getVar('WORKDIR'))
# make sure we only use the SDKTARGETSYSROOT value from 'd'
- localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
+ localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT'))
localdata.setVar('libdir', d.getVar('target_libdir', False))
# Process DEFAULTTUNE
bb.build.exec_func("create_sdk_files", localdata)
- variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ variants = d.getVar("MULTILIB_VARIANTS") or ""
for item in variants.split():
# Load overrides from 'd' to avoid having to reset the value...
overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
localdata.setVar("OVERRIDES", overrides)
localdata.setVar("MLPREFIX", item + "-")
- bb.data.update_data(localdata)
bb.build.exec_func("create_sdk_files", localdata)
}
addtask generate_content before do_install after do_compile
@@ -56,6 +55,8 @@ create_sdk_files() {
# Add version information
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+
+ toolchain_create_post_relocate_script ${SDK_OUTPUT}/${SDKPATH}/post-relocate-setup.sh ${SDKPATH}
}
do_install() {
@@ -69,9 +70,9 @@ FILES_${PN}= " \
${SDKPATH}/* \
"
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_populate_sysroot[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_populate_sysroot
diff --git a/meta/recipes-core/meta/meta-extsdk-toolchain.bb b/meta/recipes-core/meta/meta-extsdk-toolchain.bb
index 886ff076dc..235d6ecc0f 100644
--- a/meta/recipes-core/meta/meta-extsdk-toolchain.bb
+++ b/meta/recipes-core/meta/meta-extsdk-toolchain.bb
@@ -1,10 +1,8 @@
SUMMARY = "Extensible SDK toolchain meta-recipe"
DESCRIPTION = "Meta-recipe for ensuring the build directory contains all appropriate toolchain packages for using an IDE"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native"
+DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native"
do_populate_sysroot[deptask] = "do_populate_sysroot"
@@ -12,16 +10,16 @@ do_populate_sysroot[deptask] = "do_populate_sysroot"
# within sstate.bbclass, so if you copy or rename this and expect the same
# functionality you'll need to modify that as well.
-LOCKED_SIGS_INDIR = "${D}/locked-sigs"
+LOCKED_SIGS_INDIR = "${WORKDIR}/locked-sigs"
addtask do_locked_sigs after do_populate_sysroot
SSTATETASKS += "do_locked_sigs"
do_locked_sigs[sstate-inputdirs] = "${LOCKED_SIGS_INDIR}"
-do_locked_sigs[sstate-outputdirs] = "${STAGING_DIR_HOST}/locked-sigs"
+do_locked_sigs[sstate-outputdirs] = "${STAGING_DIR}/${PACKAGE_ARCH}/${PN}/locked-sigs"
python do_locked_sigs() {
import oe.copy_buildsystem
- outdir = os.path.join(d.getVar('LOCKED_SIGS_INDIR', True))
+ outdir = os.path.join(d.getVar('LOCKED_SIGS_INDIR'))
bb.utils.mkdirhier(outdir)
sigfile = os.path.join(outdir, 'locked-sigs-extsdk-toolchain.inc')
oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
diff --git a/meta/recipes-core/meta/meta-go-toolchain.bb b/meta/recipes-core/meta/meta-go-toolchain.bb
new file mode 100644
index 0000000000..dde385c1b1
--- /dev/null
+++ b/meta/recipes-core/meta/meta-go-toolchain.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Meta package for building a installable Go toolchain"
+LICENSE = "MIT"
+
+inherit populate_sdk
+
+TOOLCHAIN_HOST_TASK_append = " \
+ packagegroup-go-cross-canadian-${MACHINE} \
+"
+
+TOOLCHAIN_TARGET_TASK_append = " \
+ ${@multilib_pkg_extend(d, 'packagegroup-go-sdk-target')} \
+"
diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/recipes-core/meta/meta-ide-support.bb
index c4ddcfcb43..768f6f4bb6 100644
--- a/meta/recipes-core/meta/meta-ide-support.bb
+++ b/meta/recipes-core/meta/meta-ide-support.bb
@@ -1,11 +1,10 @@
SUMMARY = "Integrated Development Environment support"
DESCRIPTION = "Meta package for ensuring the build directory contains all appropriate toolchain packages for using an IDE"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native"
+DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native cmake-native"
PR = "r3"
+RM_WORK_EXCLUDE += "${PN}"
inherit meta toolchain-scripts nopackages
diff --git a/meta/recipes-core/meta/meta-toolchain.bb b/meta/recipes-core/meta/meta-toolchain.bb
index ba9fd88805..b02b0665e6 100644
--- a/meta/recipes-core/meta/meta-toolchain.bb
+++ b/meta/recipes-core/meta/meta-toolchain.bb
@@ -3,7 +3,4 @@ LICENSE = "MIT"
PR = "r7"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
inherit populate_sdk
diff --git a/meta/recipes-core/meta/meta-world-pkgdata.bb b/meta/recipes-core/meta/meta-world-pkgdata.bb
index 81c8647fa6..b299861375 100644
--- a/meta/recipes-core/meta/meta-world-pkgdata.bb
+++ b/meta/recipes-core/meta/meta-world-pkgdata.bb
@@ -3,6 +3,8 @@ LICENSE = "MIT"
INHIBIT_DEFAULT_DEPS = "1"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
addtask do_allpackagedata before do_build
do_allpackagedata() {
:
@@ -19,20 +21,20 @@ do_collect_packagedata[sstate-outputdirs] = "${STAGING_DIR_HOST}/world-pkgdata"
python do_collect_packagedata() {
import oe.copy_buildsystem
- outdir = os.path.join(d.getVar('WORLD_PKGDATADIR', True))
+ outdir = os.path.join(d.getVar('WORLD_PKGDATADIR'))
bb.utils.mkdirhier(outdir)
sigfile = os.path.join(outdir, 'locked-sigs-pkgdata.inc')
oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
}
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_install[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_install
-do_configure[deptask] = ""
+do_prepare_recipe_sysroot[deptask] = ""
WORLD_PKGDATA_EXCLUDE ?= ""
diff --git a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
index 2b96111600..5bc11b9daf 100644
--- a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
+++ b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -1,27 +1,34 @@
-SUMMARY = "Dummy package which ensures perl is excluded from buildtools"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+DUMMYARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
-inherit allarch
+DUMMYPROVIDES_PACKAGES = "\
+ nativesdk-perl \
+ nativesdk-libxml-parser-perl \
+ nativesdk-perl-module-bytes \
+ nativesdk-perl-module-carp \
+ nativesdk-perl-module-constant \
+ nativesdk-perl-module-data-dumper \
+ nativesdk-perl-module-errno \
+ nativesdk-perl-module-exporter \
+ nativesdk-perl-module-file-basename \
+ nativesdk-perl-module-file-compare \
+ nativesdk-perl-module-file-copy \
+ nativesdk-perl-module-file-find \
+ nativesdk-perl-module-file-glob \
+ nativesdk-perl-module-file-path \
+ nativesdk-perl-module-file-stat \
+ nativesdk-perl-module-getopt-long \
+ nativesdk-perl-module-io-file \
+ nativesdk-perl-module-posix \
+ nativesdk-perl-module-thread-queue \
+ nativesdk-perl-module-threads \
+"
-PR = "r2"
-
-python() {
- # Put the package somewhere separate to ensure it's never used except
- # when we want it
- # (note that we have to do this in anonymous python here to avoid
- # allarch.bbclass disabling itself)
- d.setVar('PACKAGE_ARCH', 'buildtools-dummy-${SDKPKGSUFFIX}')
-}
+DUMMYPROVIDES = "\
+ /usr/bin/perl \
+ "
-PERLPACKAGES = "nativesdk-perl \
- nativesdk-perl-module-file-path"
-
-ALLOW_EMPTY_${PN} = "1"
+PR = "r2"
-python populate_packages_prepend() {
- d.appendVar(d.expand('RPROVIDES_${PN}'), '${PERLPACKAGES}')
- d.appendVar(d.expand('RCONFLICTS_${PN}'), '${PERLPACKAGES}')
- d.appendVar(d.expand('RREPLACES_${PN}'), '${PERLPACKAGES}')
-}
+require dummy-sdk-package.inc
+inherit nativesdk
diff --git a/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb b/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
new file mode 100644
index 0000000000..29f4dd3633
--- /dev/null
+++ b/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
@@ -0,0 +1,17 @@
+DUMMYARCH = "sdk-provides-dummy-${SDKPKGSUFFIX}"
+
+DUMMYPROVIDES_PACKAGES = "\
+ pkgconfig \
+"
+
+# Add /bin/sh?
+DUMMYPROVIDES = "\
+ /bin/bash \
+ /usr/bin/env \
+ libGL.so()(64bit) \
+ libGL.so \
+"
+
+require dummy-sdk-package.inc
+
+inherit nativesdk
diff --git a/meta/recipes-core/meta/package-index.bb b/meta/recipes-core/meta/package-index.bb
index 3c46b49977..a4123b7622 100644
--- a/meta/recipes-core/meta/package-index.bb
+++ b/meta/recipes-core/meta/package-index.bb
@@ -4,18 +4,15 @@ LICENSE = "MIT"
INHIBIT_DEFAULT_DEPS = "1"
PACKAGES = ""
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_install[noexec] = "1"
-do_package[noexec] = "1"
-do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_populate_sysroot[noexec] = "1"
+inherit nopackages
+
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_install
+deltask do_populate_sysroot
do_package_index[nostamp] = "1"
do_package_index[depends] += "${PACKAGEINDEXDEPS}"
diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes-core/meta/signing-keys.bb
index 37790373a1..1e1c7e3459 100644
--- a/meta/recipes-core/meta/signing-keys.bb
+++ b/meta/recipes-core/meta/signing-keys.bb
@@ -3,8 +3,6 @@
SUMMARY = "Makes public keys of the signing keys available"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
inherit allarch deploy
@@ -23,53 +21,63 @@ FILES_${PN}-packagefeed = "${sysconfdir}/pki/packagefeed-gpg"
python do_get_public_keys () {
from oe.gpg_sign import get_signer
- if d.getVar("RPM_SIGN_PACKAGES", True):
+ if d.getVar("RPM_SIGN_PACKAGES"):
# Export public key of the rpm signing key
- signer = get_signer(d, d.getVar('RPM_GPG_BACKEND', True))
+ signer = get_signer(d, d.getVar('RPM_GPG_BACKEND'))
signer.export_pubkey(os.path.join(d.expand('${B}'), 'rpm-key'),
- d.getVar('RPM_GPG_NAME', True))
+ d.getVar('RPM_GPG_NAME'))
- if d.getVar("IPK_SIGN_PACKAGES", True):
+ if d.getVar("IPK_SIGN_PACKAGES"):
# Export public key of the ipk signing key
- signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
+ signer = get_signer(d, d.getVar('IPK_GPG_BACKEND'))
signer.export_pubkey(os.path.join(d.expand('${B}'), 'ipk-key'),
- d.getVar('IPK_GPG_NAME', True))
+ d.getVar('IPK_GPG_NAME'))
- if d.getVar('PACKAGE_FEED_SIGN', True) == '1':
+ if d.getVar('PACKAGE_FEED_SIGN') == '1':
# Export public key of the feed signing key
- signer = get_signer(d, d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
+ signer = get_signer(d, d.getVar('PACKAGE_FEED_GPG_BACKEND'))
signer.export_pubkey(os.path.join(d.expand('${B}'), 'pf-key'),
- d.getVar('PACKAGE_FEED_GPG_NAME', True))
+ d.getVar('PACKAGE_FEED_GPG_NAME'))
}
do_get_public_keys[cleandirs] = "${B}"
addtask get_public_keys before do_install
+do_get_public_keys[depends] += "gnupg-native:do_populate_sysroot"
do_install () {
if [ -f "${B}/rpm-key" ]; then
- install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
if [ -f "${B}/ipk-key" ]; then
- install -D -m 0644 "${B}/ipk-key" "${D}${sysconfdir}/pki/ipk-gpg/IPK-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/ipk-key" "${D}${sysconfdir}/pki/ipk-gpg/IPK-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
if [ -f "${B}/pf-key" ]; then
- install -D -m 0644 "${B}/pf-key" "${D}${sysconfdir}/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/pf-key" "${D}${sysconfdir}/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
}
do_deploy () {
if [ -f "${B}/rpm-key" ]; then
- install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
if [ -f "${B}/ipk-key" ]; then
- install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
if [ -f "${B}/pf-key" ]; then
- install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
}
do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
# cleandirs should possibly be in deploy.bbclass but we need it
do_deploy[cleandirs] = "${DEPLOYDIR}"
-# clear stamp-extra-info since MACHINE is normally put there by deploy.bbclass
+# clear stamp-extra-info since MACHINE_ARCH is normally put there by
+# deploy.bbclass
do_deploy[stamp-extra-info] = ""
addtask deploy after do_get_public_keys
+
+# Delete unnecessary tasks. In particular, "do_unpack" _must_ be deleted because
+# it cleans ${B} and will wipe any keys exported by do_get_public_keys.
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
diff --git a/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/meta/recipes-core/meta/target-sdk-provides-dummy.bb
new file mode 100644
index 0000000000..e3beeb796c
--- /dev/null
+++ b/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -0,0 +1,61 @@
+DUMMYARCH = "sdk-provides-dummy-target"
+
+DUMMYPROVIDES_PACKAGES = "\
+ busybox \
+ busybox-dev \
+ busybox-src \
+ coreutils \
+ coreutils-dev \
+ coreutils-src \
+ bash \
+ bash-dev \
+ bash-src \
+ perl \
+ perl-dev \
+ perl-src \
+ perl-module-re \
+ perl-module-strict \
+ perl-module-vars \
+ perl-module-text-wrap \
+ libxml-parser-perl \
+ perl-module-bytes \
+ perl-module-carp \
+ perl-module-config \
+ perl-module-constant \
+ perl-module-data-dumper \
+ perl-module-errno \
+ perl-module-exporter \
+ perl-module-file-basename \
+ perl-module-file-compare \
+ perl-module-file-copy \
+ perl-module-file-find \
+ perl-module-file-glob \
+ perl-module-file-path \
+ perl-module-file-stat \
+ perl-module-file-temp \
+ perl-module-getopt-long \
+ perl-module-io-file \
+ perl-module-overload \
+ perl-module-overloading \
+ perl-module-posix \
+ perl-module-thread-queue \
+ perl-module-threads \
+ perl-module-warnings \
+ perl-module-warnings-register \
+ pkgconfig \
+ pkgconfig-dev \
+ pkgconfig-src \
+"
+
+DUMMYPROVIDES = "\
+ /bin/sh \
+ /bin/bash \
+ /usr/bin/env \
+ /usr/bin/perl \
+ libperl.so.5 \
+ libperl.so.5()(64bit) \
+"
+
+require dummy-sdk-package.inc
+
+SSTATE_DUPWHITELIST += "${PKGDATA_DIR}/${PN} ${PKGDATA_DIR}/runtime/${PN}"
diff --git a/meta/recipes-core/meta/testexport-tarball.bb b/meta/recipes-core/meta/testexport-tarball.bb
index d9861c4da7..c38ac902a0 100644
--- a/meta/recipes-core/meta/testexport-tarball.bb
+++ b/meta/recipes-core/meta/testexport-tarball.bb
@@ -3,8 +3,6 @@ DESCRIPTION = "SDK type target for standalone tarball containing packages define
This recipe is almost the same as buildtools-tarball"
SUMMARY = "Standalone tarball for test systems with missing software"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
TEST_EXPORT_SDK_PACKAGES ??= ""
@@ -12,7 +10,13 @@ TOOLCHAIN_TARGET_TASK ?= ""
TOOLCHAIN_HOST_TASK ?= "${TEST_EXPORT_SDK_PACKAGES}"
-SDK_PACKAGE_ARCHS += "tesexport-tools-${SDKPKGSUFFIX}"
+MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}"
+PACKAGE_ARCHS = ""
+TARGET_ARCH = "none"
+TARGET_OS = "none"
+
+SDK_PACKAGE_ARCHS += "testexport-tools-${SDKPKGSUFFIX}"
TOOLCHAIN_OUTPUTNAME ?= "${TEST_EXPORT_SDK_NAME}"
@@ -24,7 +28,15 @@ EXCLUDE_FROM_WORLD = "1"
inherit meta
inherit populate_sdk
-inherit toolchain-scripts
+inherit toolchain-scripts-base
+inherit nopackages
+
+deltask install
+deltask populate_sysroot
+
+do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
+
+REAL_MULTIMACH_TARGET_SYS = "none"
create_sdk_files_append () {
rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb
index e203a8322e..39638eb8c5 100644
--- a/meta/recipes-core/meta/uninative-tarball.bb
+++ b/meta/recipes-core/meta/uninative-tarball.bb
@@ -1,17 +1,23 @@
SUMMARY = "libc and patchelf tarball for use with uninative.bbclass"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
TOOLCHAIN_TARGET_TASK = ""
# ibm850 - mcopy from mtools
# iso8859-1 - guile
+# utf-16, cp1252 - binutils-windres
TOOLCHAIN_HOST_TASK = "\
nativesdk-glibc \
nativesdk-glibc-gconv-ibm850 \
nativesdk-glibc-gconv-iso8859-1 \
+ nativesdk-glibc-gconv-utf-16 \
+ nativesdk-glibc-gconv-cp1252 \
+ nativesdk-glibc-gconv-euc-jp \
+ nativesdk-glibc-gconv-libjis \
nativesdk-patchelf \
+ nativesdk-libxcrypt \
+ nativesdk-libxcrypt-compat \
+ nativesdk-libnss-nis \
"
INHIBIT_DEFAULT_DEPS = "1"
@@ -33,8 +39,6 @@ inherit populate_sdk
inherit nopackages
deltask install
-deltask package
-deltask packagedata
deltask populate_sysroot
do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
@@ -54,7 +58,7 @@ fakeroot create_sdk_files() {
}
-fakeroot tar_sdk() {
+fakeroot archive_sdk() {
cd ${SDK_OUTPUT}/${SDKPATH}
DEST="./${SDK_ARCH}-${SDK_OS}"
@@ -62,5 +66,5 @@ fakeroot tar_sdk() {
rm sysroots -rf
patchelf --set-interpreter ${@''.join('a' for n in range(1024))} $DEST/usr/bin/patchelf
mv $DEST/usr/bin/patchelf $DEST/usr/bin/patchelf-uninative
- tar ${SDKTAROPTS} -c -j --file=${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
+ ${SDK_ARCHIVE_CMD}
}
diff --git a/meta/recipes-core/meta/wic-tools.bb b/meta/recipes-core/meta/wic-tools.bb
new file mode 100644
index 0000000000..09eb409e87
--- /dev/null
+++ b/meta/recipes-core/meta/wic-tools.bb
@@ -0,0 +1,26 @@
+SUMMARY = "A meta recipe to build native tools used by wic."
+
+LICENSE = "MIT"
+
+DEPENDS = "\
+ parted-native syslinux-native gptfdisk-native dosfstools-native \
+ mtools-native bmap-tools-native grub-efi-native cdrtools-native \
+ btrfs-tools-native squashfs-tools-native pseudo-native \
+ e2fsprogs-native util-linux-native \
+ "
+DEPENDS_append_x86 = " syslinux grub-efi systemd-boot"
+DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot"
+DEPENDS_append_x86-x32 = " syslinux grub-efi"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+inherit nopackages
+
+# The sysroot of wic-tools is needed for wic, but if rm_work is enabled, it will
+# be removed before wic has a chance to use it, hence the exclusion below.
+RM_WORK_EXCLUDE += "${PN}"
+
+python do_build_sysroot () {
+ bb.build.exec_func("extend_recipe_sysroot", d)
+}
+addtask do_build_sysroot after do_prepare_recipe_sysroot before do_build
diff --git a/meta/recipes-core/bsd-headers/bsd-headers.bb b/meta/recipes-core/musl/bsd-headers.bb
index c9945d45eb..c9945d45eb 100644
--- a/meta/recipes-core/bsd-headers/bsd-headers.bb
+++ b/meta/recipes-core/musl/bsd-headers.bb
diff --git a/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h b/meta/recipes-core/musl/bsd-headers/sys-cdefs.h
index 209a623c0f..209a623c0f 100644
--- a/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
+++ b/meta/recipes-core/musl/bsd-headers/sys-cdefs.h
diff --git a/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h b/meta/recipes-core/musl/bsd-headers/sys-queue.h
index 99d01a55b1..99d01a55b1 100644
--- a/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
+++ b/meta/recipes-core/musl/bsd-headers/sys-queue.h
diff --git a/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h b/meta/recipes-core/musl/bsd-headers/sys-tree.h
index eaea56aae3..eaea56aae3 100644
--- a/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
+++ b/meta/recipes-core/musl/bsd-headers/sys-tree.h
diff --git a/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch b/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
deleted file mode 100644
index 5490b1cba6..0000000000
--- a/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 94c0b97b62125d8bbc92dce0694e387d5b2ad181 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 10 Jan 2016 12:14:02 -0800
-Subject: [PATCH] Make dynamic linker a relative symlink to libc
-
-absolute symlink into $(libdir) fails to load in a cross build
-environment, especially when executing qemu in usermode to run target
-applications, which cross build systems often do, since not everything
-can be computed during cross builds, qemu in usermode often comes to aid
-in such situations to feed into cross builds.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index b2226fa..0d71f7f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -189,7 +189,7 @@ $(DESTDIR)$(includedir)/%: include/%
- $(INSTALL) -D -m 644 $< $@
-
- $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
-- $(INSTALL) -D -l $(libdir)/libc.so $@ || true
-+ $(INSTALL) -D -l ..$(libdir)/libc.so $@ || true
-
- install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
-
---
-2.7.0
-
diff --git a/meta/recipes-core/musl/libssp-nonshared.bb b/meta/recipes-core/musl/libssp-nonshared.bb
new file mode 100644
index 0000000000..bae8c81cc7
--- /dev/null
+++ b/meta/recipes-core/musl/libssp-nonshared.bb
@@ -0,0 +1,34 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Minimal libssp_nonshared.a must needed for ssp to work with gcc on musl"
+LICENSE = "GPL-3.0-with-GCC-exception"
+LIC_FILES_CHKSUM = "file://ssp-local.c;beginline=1;endline=32;md5=c06d391208c0cfcbc541a6728ed65cc4"
+SECTION = "libs"
+
+SRC_URI = "file://ssp-local.c"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils \
+ virtual/${TARGET_PREFIX}gcc \
+"
+
+do_configure[noexec] = "1"
+
+S = "${WORKDIR}"
+
+do_compile() {
+ ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c ssp-local.c -o ssp-local.o
+ ${AR} r libssp_nonshared.a ssp-local.o
+}
+do_install() {
+ install -Dm 0644 ${B}/libssp_nonshared.a ${D}${base_libdir}/libssp_nonshared.a
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
+RDEPENDS_${PN}-staticdev = ""
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-staticdev (= ${EXTENDPKGV})"
diff --git a/meta/recipes-core/musl/libssp-nonshared/ssp-local.c b/meta/recipes-core/musl/libssp-nonshared/ssp-local.c
new file mode 100644
index 0000000000..8f51afa2c1
--- /dev/null
+++ b/meta/recipes-core/musl/libssp-nonshared/ssp-local.c
@@ -0,0 +1,45 @@
+/* Stack protector support.
+ Copyright (C) 2005-2018 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file. (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+GCC 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+extern void __stack_chk_fail (void);
+
+/* Some targets can avoid loading a GP for calls to hidden functions.
+ Using this entry point may avoid the load of a GP entirely for the
+ function, making the overall code smaller. */
+
+void
+__attribute__((visibility ("hidden")))
+__stack_chk_fail_local (void)
+{
+ __stack_chk_fail ();
+}
diff --git a/meta/recipes-core/musl/musl-obstack.bb b/meta/recipes-core/musl/musl-obstack.bb
new file mode 100644
index 0000000000..3003935fe5
--- /dev/null
+++ b/meta/recipes-core/musl/musl-obstack.bb
@@ -0,0 +1,22 @@
+# Copyright (C) 2019 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "A standalone library to implement GNU libc's obstack"
+DESCRIPTION = "copy + paste of the obstack functions and macros found in GNU gcc libiberty library for use with musl libc"
+HOMEPAGE = "https://github.com/pullmoll/musl-obstack"
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3d23e4eef8243efcaab6f0a438078932"
+SECTION = "libs"
+
+PV = "1.1"
+SRCREV = "d2ad66b0df44a4b784956f7f7f2717131ddc05f4"
+SRC_URI = "git://github.com/pullmoll/musl-obstack"
+
+UPSTREAM_CHECK_COMMITS = "1"
+
+inherit autotools pkgconfig
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_HOST = ".*-musl.*"
+
diff --git a/meta/recipes-core/musl/musl-utils.bb b/meta/recipes-core/musl/musl-utils.bb
new file mode 100644
index 0000000000..dd0ce33061
--- /dev/null
+++ b/meta/recipes-core/musl/musl-utils.bb
@@ -0,0 +1,27 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "getconf, getent and iconv implementations for musl"
+HOMEPAGE = "https://git.alpinelinux.org/cgit/aports/tree/main/musl"
+LICENSE = "BSD-2-Clause & GPL-2.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9d08215e611db87b357e8674b4b42564"
+SECTION = "utils"
+
+# Date of the commit in SRCREV
+PV = "20170421"
+
+SRCREV = "fb5630138ccabbbc14a19d372096a04e42573c7d"
+SRC_URI = "git://github.com/boltlinux/musl-utils"
+
+UPSTREAM_CHECK_COMMITS = "1"
+
+inherit autotools
+
+S = "${WORKDIR}/git"
+
+PACKAGES =+ "${PN}-iconv"
+
+FILES_${PN}-iconv = "${bindir}/iconv"
+
+COMPATIBLE_HOST = ".*-musl.*"
+
diff --git a/meta/recipes-core/musl/musl.inc b/meta/recipes-core/musl/musl.inc
index 7ed931c6da..0683bf85ed 100644
--- a/meta/recipes-core/musl/musl.inc
+++ b/meta/recipes-core/musl/musl.inc
@@ -9,17 +9,10 @@ standards-conformance and safety."
HOMEPAGE = "http://www.musl-libc.org/"
LICENSE = "MIT"
SECTION = "libs"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7928b7ad32ceda04932478e330e52f7f"
-
-PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
-TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d0fe2be17bc45ff4a42ade1c13ed6340"
INHIBIT_DEFAULT_DEPS = "1"
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-
-
FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
INSANE_SKIP_${PN} = "dev-so"
@@ -27,3 +20,8 @@ INSANE_SKIP_${PN} = "dev-so"
# Doesn't compile in MIPS16e mode due to use of hand-written
# assembly
MIPS_INSTRUCTION_SET = "mips"
+
+# thumb1 is unsupported
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+
diff --git a/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch b/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
new file mode 100644
index 0000000000..462d338b96
--- /dev/null
+++ b/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
@@ -0,0 +1,76 @@
+From 0ec74744a4cba7c5fdfaa2685995119a4fca0260 Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Wed, 18 Jan 2017 16:14:37 +0200
+Subject: [PATCH] Make dynamic linker a relative symlink to libc
+
+absolute symlink into $(libdir) fails to load in a cross build
+environment, especially when executing qemu in usermode to run target
+applications, which cross build systems often do, since not everything
+can be computed during cross builds, qemu in usermode often comes to aid
+in such situations to feed into cross builds.
+
+V2:
+ Make use of 'ln -r' to create relative symlinks, as most fo the distros
+ shipping coreutils 8.16+
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+Upstream-Status: Pending
+---
+ Makefile | 2 +-
+ tools/install.sh | 8 +++++---
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8246b78..d1dbe39 100644
+--- a/Makefile
++++ b/Makefile
+@@ -215,7 +215,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/include/%
+ $(INSTALL) -D -m 644 $< $@
+
+ $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
+- $(INSTALL) -D -l $(libdir)/libc.so $@ || true
++ $(INSTALL) -D -r $(DESTDIR)$(libdir)/libc.so $@ || true
+
+ install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
+
+diff --git a/tools/install.sh b/tools/install.sh
+index d913b60..b6a7f79 100755
+--- a/tools/install.sh
++++ b/tools/install.sh
+@@ -6,18 +6,20 @@
+ #
+
+ usage() {
+-printf "usage: %s [-D] [-l] [-m mode] src dest\n" "$0" 1>&2
++printf "usage: %s [-D] [-l] [-r] [-m mode] src dest\n" "$0" 1>&2
+ exit 1
+ }
+
+ mkdirp=
+ symlink=
++symlinkflags="-s"
+ mode=755
+
+-while getopts Dlm: name ; do
++while getopts Dlrm: name ; do
+ case "$name" in
+ D) mkdirp=yes ;;
+ l) symlink=yes ;;
++r) symlink=yes; symlinkflags="$symlinkflags -r" ;;
+ m) mode=$OPTARG ;;
+ ?) usage ;;
+ esac
+@@ -48,7 +50,7 @@ trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP
+ umask 077
+
+ if test "$symlink" ; then
+-ln -s "$1" "$tmp"
++ln $symlinkflags "$1" "$tmp"
+ else
+ cat < "$1" > "$tmp"
+ chmod "$mode" "$tmp"
+--
+2.7.4
+
diff --git a/meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch b/meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch
new file mode 100644
index 0000000000..fcb324e15f
--- /dev/null
+++ b/meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch
@@ -0,0 +1,48 @@
+commit a0993f8f0f161423ecdcb754f282ffd2fe47a7b5
+Author: Rich Felker <dalias@aerifal.cx>
+Date: Wed Oct 2 09:28:03 2019 -0400
+
+ reintroduce riscv64 struct sigcontext
+
+ commit ab3eb89a8b83353cdaab12ed017a67a7730f90e9 removed it as part of
+ correcting the mcontext_t definition, but there is still code using
+ struct sigcontext and expecting the member names present in it, most
+ notably libgcc_eh. almost all such usage is incorrect, but bring back
+ struct sigcontext at least for now so as not to introduce regressions.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+diff --git a/arch/riscv64/bits/signal.h b/arch/riscv64/bits/signal.h
+index 03fe48c1..2ff4be30 100644
+--- a/arch/riscv64/bits/signal.h
++++ b/arch/riscv64/bits/signal.h
+@@ -6,12 +6,6 @@
+ # define SIGSTKSZ 8192
+ #endif
+
+-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+-typedef unsigned long greg_t;
+-typedef unsigned long gregset_t[32];
+-typedef union __riscv_mc_fp_state fpregset_t;
+-#endif
+-
+ typedef unsigned long __riscv_mc_gp_state[32];
+
+ struct __riscv_mc_f_ext_state {
+@@ -41,6 +35,16 @@ typedef struct mcontext_t {
+ union __riscv_mc_fp_state __fpregs;
+ } mcontext_t;
+
++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
++typedef unsigned long greg_t;
++typedef unsigned long gregset_t[32];
++typedef union __riscv_mc_fp_state fpregset_t;
++struct sigcontext {
++ gregset_t gregs;
++ fpregset_t fpregs;
++};
++#endif
++
+ struct sigaltstack {
+ void *ss_sp;
+ int ss_flags;
diff --git a/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch b/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch
new file mode 100644
index 0000000000..6a875a717e
--- /dev/null
+++ b/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch
@@ -0,0 +1,61 @@
+From 5a2886f81dbca3f2ed28eebe7d27d471da278db8 Mon Sep 17 00:00:00 2001
+From: Serhey Popovych <serhe.popovych@gmail.com>
+Date: Tue, 11 Dec 2018 05:44:20 -0500
+Subject: [PATCH] ldso: Use syslibdir and libdir as default pathes to libdirs
+
+In absence of /etc/ld-musl-$(ARCH).path ldso uses default path to search
+libraries /lib:/usr/local/lib:/usr/lib.
+
+However this path isn't relevant in case when library is put in dirs
+like lib64 or libx32.
+
+Adjust CFLAGS_ALL to pass syslibdir as SYSLIBDIR and libdir as LIBDIR
+preprocessor macroses to construct default ldso library search path
+in ldso/dynlink.c::SYS_PATH_DFLT.
+
+Upstream-Status: Pending
+Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
+---
+ Makefile | 3 ++-
+ ldso/dynlink.c | 4 +++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b46f8ca4..c07e4ae8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -46,7 +46,8 @@ CFLAGS_AUTO = -Os -pipe
+ CFLAGS_C99FSE = -std=c99 -ffreestanding -nostdinc
+
+ CFLAGS_ALL = $(CFLAGS_C99FSE)
+-CFLAGS_ALL += -D_XOPEN_SOURCE=700 -I$(srcdir)/arch/$(ARCH) -I$(srcdir)/arch/generic -Iobj/src/internal -I$(srcdir)/src/include -I$(srcdir)/src/internal -Iobj/include -I$(srcdir)/include
++CFLAGS_ALL += -D_XOPEN_SOURCE=700 -DSYSLIBDIR='"$(syslibdir)"' -DLIBDIR='"$(libdir)"'
++CFLAGS_ALL += -I$(srcdir)/arch/$(ARCH) -I$(srcdir)/arch/generic -Iobj/src/internal -I$(srcdir)/src/include -I$(srcdir)/src/internal -Iobj/include -I$(srcdir)/include
+ CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS)
+
+ LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS)
+diff --git a/ldso/dynlink.c b/ldso/dynlink.c
+index ec921dfd..7c119c55 100644
+--- a/ldso/dynlink.c
++++ b/ldso/dynlink.c
+@@ -22,6 +22,8 @@
+ #include "dynlink.h"
+ #include "malloc_impl.h"
+
++#define SYS_PATH_DFLT SYSLIBDIR ":" LIBDIR
++
+ static void error(const char *, ...);
+
+ #define MAXP2(a,b) (-(-(a)&-(b)))
+@@ -1038,7 +1040,7 @@ static struct dso *load_library(const char *name, struct dso *needed_by)
+ sys_path = "";
+ }
+ }
+- if (!sys_path) sys_path = "/lib:/usr/local/lib:/usr/lib";
++ if (!sys_path) sys_path = SYS_PATH_DFLT;
+ fd = path_open(name, sys_path, buf, sizeof buf);
+ }
+ pathname = buf;
+--
+2.7.4
+
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index c07101b748..aacff79f7c 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -2,32 +2,47 @@
# Released under the MIT license (see COPYING.MIT for the terms)
require musl.inc
+inherit linuxloader
-SRCREV = "39494a273eaa6b714e0fa0c59ce7a1f5fbc80a1e"
+SRCREV = "2c2477da9a553c0b9b2fa18073a5dcdbe6d395af"
-PV = "1.1.15+git${SRCPV}"
+BASEVER = "1.1.23"
+
+PV = "${BASEVER}+git${SRCPV}"
# mirror is at git://github.com/kraj/musl.git
SRC_URI = "git://git.musl-libc.org/musl \
file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
+ file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
+ file://0001-riscv-Define-sigcontext-again.patch \
"
S = "${WORKDIR}/git"
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl"
+PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt"
DEPENDS = "virtual/${TARGET_PREFIX}binutils \
- virtual/${TARGET_PREFIX}gcc-initial \
+ virtual/${TARGET_PREFIX}gcc \
libgcc-initial \
linux-libc-headers \
bsd-headers \
+ libssp-nonshared \
"
+GLIBC_LDSO = "${@get_glibc_loader(d)}"
export CROSS_COMPILE="${TARGET_PREFIX}"
LDFLAGS += "-Wl,-soname,libc.so"
+# When compiling for Thumb or Thumb2, frame pointers _must_ be disabled since the
+# Thumb frame pointer in r7 clashes with musl's use of inline asm to make syscalls
+# (where r7 is used for the syscall NR). In most cases, frame pointers will be
+# disabled automatically due to the optimisation level, but append an explicit
+# -fomit-frame-pointer to handle cases where optimisation is set to -O0 or frame
+# pointers have been enabled by -fno-omit-frame-pointer earlier in CFLAGS, etc.
+CFLAGS_append_arm = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+
CONFIGUREOPTS = " \
--prefix=${prefix} \
--exec-prefix=${exec_prefix} \
@@ -49,14 +64,29 @@ do_install() {
oe_runmake install DESTDIR='${D}'
install -d ${D}${bindir}
- ln -s ../../${libdir}/libc.so ${D}${bindir}/ldd
+ rm -f ${D}${bindir}/ldd ${D}${GLIBC_LDSO}
+ lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd
+ lnr ${D}${libdir}/libc.so ${D}${GLIBC_LDSO}
for l in crypt dl m pthread resolv rt util xnet
do
- ln -s libc.so ${D}${libdir}/lib$l.so
+ ln -sf libc.so ${D}${libdir}/lib$l.so
+ done
+ for i in libc.so.6 libcrypt.so.1 libdl.so.2 libm.so.6 libpthread.so.0 libresolv.so.2 librt.so.1 libutil.so.1; do
+ ln -sf libc.so ${D}${libdir}/$i
done
}
-RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev"
+PACKAGES =+ "${PN}-glibc-compat"
+
+FILES_${PN}-glibc-compat += "\
+ ${libdir}/libc.so.6 ${libdir}/libcrypt.so.1 \
+ ${libdir}/libdl.so.2 ${libdir}/libm.so.6 \
+ ${libdir}/libpthread.so.0 ${libdir}/libresolv.so.2 \
+ ${libdir}/librt.so.1 ${libdir}/libutil.so.1 \
+ ${GLIBC_LDSO} \
+ "
+
+RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev"
RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)"
diff --git a/meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch b/meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch
new file mode 100644
index 0000000000..7870c4ba32
--- /dev/null
+++ b/meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch
@@ -0,0 +1,169 @@
+From 064b77f173337aa790f1cec0d741bfbc61a33d31 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <trevor.gamblin@windriver.com>
+Date: Fri, 18 Oct 2019 09:57:43 -0400
+Subject: [PATCH] ncurses: selective backport of 20191012 patch
+
+Upstream-Status: Backport [https://salsa.debian.org/debian/ncurses/commit/243908b1e3d81]
+
+Contents of the upstream patch that are not applied to comp_hash.c,
+parse_entry.c, or dump_entry.c have been omitted.
+
+CVE: CVE-2019-17594
+CVE: CVE-2019-17595
+
+Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
+
+---
+ ncurses/tinfo/comp_hash.c | 14 ++++++++++----
+ ncurses/tinfo/parse_entry.c | 32 ++++++++++++++++----------------
+ progs/dump_entry.c | 7 ++++---
+ 3 files changed, 30 insertions(+), 23 deletions(-)
+
+diff --git a/ncurses/tinfo/comp_hash.c b/ncurses/tinfo/comp_hash.c
+index 21f165ca..a62d38f9 100644
+--- a/ncurses/tinfo/comp_hash.c
++++ b/ncurses/tinfo/comp_hash.c
+@@ -44,7 +44,7 @@
+ #include <tic.h>
+ #include <hashsize.h>
+
+-MODULE_ID("$Id: comp_hash.c,v 1.49 2019/03/10 00:06:48 tom Exp $")
++MODULE_ID("$Id: comp_hash.c,v 1.51 2019/10/12 16:32:13 tom Exp $")
+
+ /*
+ * Finds the entry for the given string in the hash table if present.
+@@ -63,7 +63,9 @@ _nc_find_entry(const char *string,
+
+ hashvalue = data->hash_of(string);
+
+- if (data->table_data[hashvalue] >= 0) {
++ if (hashvalue >= 0
++ && (unsigned) hashvalue < data->table_size
++ && data->table_data[hashvalue] >= 0) {
+
+ real_table = _nc_get_table(termcap);
+ ptr = real_table + data->table_data[hashvalue];
+@@ -96,7 +98,9 @@ _nc_find_type_entry(const char *string,
+ const HashData *data = _nc_get_hash_info(termcap);
+ int hashvalue = data->hash_of(string);
+
+- if (data->table_data[hashvalue] >= 0) {
++ if (hashvalue >= 0
++ && (unsigned) hashvalue < data->table_size
++ && data->table_data[hashvalue] >= 0) {
+ const struct name_table_entry *const table = _nc_get_table(termcap);
+
+ ptr = table + data->table_data[hashvalue];
+@@ -124,7 +128,9 @@ _nc_find_user_entry(const char *string)
+
+ hashvalue = data->hash_of(string);
+
+- if (data->table_data[hashvalue] >= 0) {
++ if (hashvalue >= 0
++ && (unsigned) hashvalue < data->table_size
++ && data->table_data[hashvalue] >= 0) {
+
+ real_table = _nc_get_userdefs_table();
+ ptr = real_table + data->table_data[hashvalue];
+diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
+index f8cca8b5..064376c5 100644
+--- a/ncurses/tinfo/parse_entry.c
++++ b/ncurses/tinfo/parse_entry.c
+@@ -47,7 +47,7 @@
+ #include <ctype.h>
+ #include <tic.h>
+
+-MODULE_ID("$Id: parse_entry.c,v 1.97 2019/08/03 23:10:38 tom Exp $")
++MODULE_ID("$Id: parse_entry.c,v 1.98 2019/10/12 00:50:31 tom Exp $")
+
+ #ifdef LINT
+ static short const parametrized[] =
+@@ -654,12 +654,12 @@ _nc_capcmp(const char *s, const char *t)
+ }
+
+ static void
+-append_acs0(string_desc * dst, int code, int src)
++append_acs0(string_desc * dst, int code, char *src, size_t off)
+ {
+- if (src != 0) {
++ if (src != 0 && off < strlen(src)) {
+ char temp[3];
+ temp[0] = (char) code;
+- temp[1] = (char) src;
++ temp[1] = src[off];
+ temp[2] = 0;
+ _nc_safe_strcat(dst, temp);
+ }
+@@ -669,7 +669,7 @@ static void
+ append_acs(string_desc * dst, int code, char *src)
+ {
+ if (VALID_STRING(src) && strlen(src) == 1) {
+- append_acs0(dst, code, *src);
++ append_acs0(dst, code, src, 0);
+ }
+ }
+
+@@ -1038,17 +1038,17 @@ postprocess_terminfo(TERMTYPE2 *tp)
+ _nc_str_init(&result, buf2, sizeof(buf2));
+ _nc_safe_strcat(&result, acs_chars);
+
+- append_acs0(&result, 'l', box_chars_1[0]); /* ACS_ULCORNER */
+- append_acs0(&result, 'q', box_chars_1[1]); /* ACS_HLINE */
+- append_acs0(&result, 'k', box_chars_1[2]); /* ACS_URCORNER */
+- append_acs0(&result, 'x', box_chars_1[3]); /* ACS_VLINE */
+- append_acs0(&result, 'j', box_chars_1[4]); /* ACS_LRCORNER */
+- append_acs0(&result, 'm', box_chars_1[5]); /* ACS_LLCORNER */
+- append_acs0(&result, 'w', box_chars_1[6]); /* ACS_TTEE */
+- append_acs0(&result, 'u', box_chars_1[7]); /* ACS_RTEE */
+- append_acs0(&result, 'v', box_chars_1[8]); /* ACS_BTEE */
+- append_acs0(&result, 't', box_chars_1[9]); /* ACS_LTEE */
+- append_acs0(&result, 'n', box_chars_1[10]); /* ACS_PLUS */
++ append_acs0(&result, 'l', box_chars_1, 0); /* ACS_ULCORNER */
++ append_acs0(&result, 'q', box_chars_1, 1); /* ACS_HLINE */
++ append_acs0(&result, 'k', box_chars_1, 2); /* ACS_URCORNER */
++ append_acs0(&result, 'x', box_chars_1, 3); /* ACS_VLINE */
++ append_acs0(&result, 'j', box_chars_1, 4); /* ACS_LRCORNER */
++ append_acs0(&result, 'm', box_chars_1, 5); /* ACS_LLCORNER */
++ append_acs0(&result, 'w', box_chars_1, 6); /* ACS_TTEE */
++ append_acs0(&result, 'u', box_chars_1, 7); /* ACS_RTEE */
++ append_acs0(&result, 'v', box_chars_1, 8); /* ACS_BTEE */
++ append_acs0(&result, 't', box_chars_1, 9); /* ACS_LTEE */
++ append_acs0(&result, 'n', box_chars_1, 10); /* ACS_PLUS */
+
+ if (buf2[0]) {
+ acs_chars = _nc_save_str(buf2);
+diff --git a/progs/dump_entry.c b/progs/dump_entry.c
+index d0e420ec..8a47084a 100644
+--- a/progs/dump_entry.c
++++ b/progs/dump_entry.c
+@@ -39,7 +39,7 @@
+ #include "termsort.c" /* this C file is generated */
+ #include <parametrized.h> /* so is this */
+
+-MODULE_ID("$Id: dump_entry.c,v 1.173 2019/05/11 21:02:24 tom Exp $")
++MODULE_ID("$Id: dump_entry.c,v 1.175 2019/10/12 15:59:07 tom Exp $")
+
+ #define DISCARD(string) string = ABSENT_STRING
+ #define PRINTF (void) printf
+@@ -1136,7 +1136,8 @@ fmt_entry(TERMTYPE2 *tterm,
+ *d++ = '\\';
+ *d = ':';
+ } else if (*d == '\\') {
+- *++d = *s++;
++ if ((*++d = *s++) == '\0')
++ break;
+ }
+ d++;
+ *d = '\0';
+@@ -1396,7 +1397,7 @@ one_one_mapping(const char *mapping)
+
+ if (VALID_STRING(mapping)) {
+ int n = 0;
+- while (mapping[n] != '\0') {
++ while (mapping[n] != '\0' && mapping[n + 1] != '\0') {
+ if (isLine(mapping[n]) &&
+ mapping[n] != mapping[n + 1]) {
+ result = FALSE;
+--
+2.17.1
+
diff --git a/meta/recipes-core/ncurses/files/0001-tic-hang.patch b/meta/recipes-core/ncurses/files/0001-tic-hang.patch
new file mode 100644
index 0000000000..f98a943e5c
--- /dev/null
+++ b/meta/recipes-core/ncurses/files/0001-tic-hang.patch
@@ -0,0 +1,43 @@
+From 168ba7a681be73ac024438e33e14fde1d5aea97d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 30 Mar 2018 10:02:24 +0800
+Subject: [PATCH 1/2] tic hang
+
+Upstream-Status: Inappropriate [configuration]
+
+'tic' of some linux distributions (e.g. fedora 11) hang in an infinite
+loop when processing the original file.
+
+Signed-off-by: anonymous
+
+Rebase to 6.1
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ misc/terminfo.src | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/misc/terminfo.src b/misc/terminfo.src
+index 84f4810..6b385ec 100644
+--- a/misc/terminfo.src
++++ b/misc/terminfo.src
+@@ -5562,12 +5562,11 @@ konsole-xf3x|KDE console window with keyboard for XFree86 3.x xterm,
+ # The value for kbs (see konsole-vt100) reflects local customization rather
+ # than the settings used for XFree86 xterm.
+ konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
+- kend=\EOF, khome=\EOH, use=konsole+pcfkeys,
+- use=konsole-vt100,
+-
+-konsole+pcfkeys|konsole subset of xterm+pcfkeys,
+- kcbt=\E[Z, use=xterm+pcc2, use=xterm+pcf0,
+- use=xterm+pce2,
++ kend=\EOF, kf1=\EOP, kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R,
++ kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~,
++ kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~,
++ kf23=\E[23;2~, kf24=\E[24;2~, kf3=\EOR, kf4=\EOS,
++ khome=\EOH, use=konsole-vt100,
+
+ # Obsolete: vt100.keymap
+ # KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but
+--
+1.8.3.1
+
diff --git a/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch b/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch
new file mode 100644
index 0000000000..572195611e
--- /dev/null
+++ b/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch
@@ -0,0 +1,35 @@
+From 2a53c03ffa90f0050a949fc5920f0df3e668ff42 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Aug 2017 14:45:27 +0800
+Subject: [PATCH 2/2] configure: reproducible
+
+"configure" enforces -U for ar flags, breaking deterministic builds.
+The flag was added to fix some vaguely specified "recent POSIX binutil
+build problems" in 2015.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+Rebase to 6.1
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index adead92..fa4fdb7 100755
+--- a/configure
++++ b/configure
+@@ -4503,7 +4503,7 @@ if test "${cf_cv_ar_flags+set}" = set; then
+ else
+
+ cf_cv_ar_flags=unknown
+- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
++ for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+ do
+
+ # check if $ARFLAGS already contains this choice
+--
+1.8.3.1
+
diff --git a/meta/recipes-core/ncurses/files/tic-hang.patch b/meta/recipes-core/ncurses/files/tic-hang.patch
deleted file mode 100644
index cba89d26f5..0000000000
--- a/meta/recipes-core/ncurses/files/tic-hang.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-'tic' of some linux distributions (e.g. fedora 11) hang in an infinite
-loop when processing the original file.
-
-Index: ncurses-5.7/misc/terminfo.src
-===================================================================
---- ncurses-5.7.orig/misc/terminfo.src
-+++ ncurses-5.7/misc/terminfo.src
-@@ -3706,12 +3706,11 @@ konsole-xf3x|KDE console window with key
- # The value for kbs reflects local customization rather than the settings used
- # for XFree86 xterm.
- konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
-- kend=\EOF, khome=\EOH, use=konsole+pcfkeys,
-- use=konsole-vt100,
--# Konsole does not implement shifted cursor-keys.
--konsole+pcfkeys|konsole subset of xterm+pcfkeys,
-- kLFT@, kRIT@, kcbt=\E[Z, kind@, kri@, kDN@, kUP@, use=xterm+pcc2,
-- use=xterm+pcf0,
-+ kend=\EOF, kf1=\EOP, kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R,
-+ kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~,
-+ kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~,
-+ kf23=\E[23;2~, kf24=\E[24;2~, kf3=\EOR, kf4=\EOS,
-+ khome=\EOH, use=konsole-vt100,
- # KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but
- # it is still useful for deriving the other entries.
- konsole-vt100|KDE console window with vt100 (sic) keyboard,
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index ff0117b822..5f2cc35823 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -7,16 +7,19 @@ SECTION = "libs"
DEPENDS = "ncurses-native"
DEPENDS_class-native = ""
-BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config"
+BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \
+ ${bindir}/ncurses6-config ${bindir}/ncursesw6-config"
inherit autotools binconfig-disabled multilib_header pkgconfig
# Upstream has useful patches at times at ftp://invisible-island.net/ncurses/
-SRC_URI = "git://anonscm.debian.org/collab-maint/ncurses.git"
+SRC_URI = "git://salsa.debian.org/debian/ncurses.git;protocol=https"
EXTRA_AUTORECONF = "-I m4"
CONFIG_SITE =+ "${WORKDIR}/config.cache"
+EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'"
+
# Whether to enable separate widec libraries; must be 'true' or 'false'
#
# TODO: remove this variable when widec is supported in every setup?
@@ -56,6 +59,7 @@ EX_TERMCAP_class-nativesdk = ":/etc/termcap:/usr/share/misc/termcap"
EX_TERMINFO = ""
EX_TERMINFO_class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
EX_TERMINFO_class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
+EX_TERMLIB ?= "tinfo"
# Helper function for do_configure to allow multiple configurations
# $1 the directory to run configure in
@@ -65,7 +69,6 @@ ncurses_configure() {
cd $1
shift
oe_runconf \
- --disable-static \
--without-debug \
--without-ada \
--without-gpm \
@@ -78,12 +81,13 @@ ncurses_configure() {
--disable-big-core \
--program-prefix= \
--with-ticlib \
- --with-termlib=tinfo \
+ --with-termlib=${EX_TERMLIB} \
--enable-sigwinch \
--enable-pc-files \
--disable-rpath-hack \
${EXCONFIG_ARGS} \
--with-manpage-format=normal \
+ --disable-stripping \
"$@" || return 1
cd ..
}
@@ -199,7 +203,10 @@ do_install() {
ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
fi
- rm -f ${D}${libdir}/terminfo
+ # When changing ${libdir} to e.g. /usr/lib/myawesomelib/ ncurses
+ # still installs '/usr/lib/terminfo', so try to rm both
+ # the proper path and a slightly hardcoded one
+ rm -f ${D}${libdir}/terminfo ${D}${prefix}/lib/terminfo
# create linker scripts for libcurses.so and libncurses to
# link against -ltinfo when needed. Some builds might break
@@ -225,7 +232,7 @@ do_install() {
if [ ! -d "${D}${base_libdir}" ]; then
# Setting base_libdir to libdir as is done in the -native
# case will skip this code
- mkdir ${D}${base_libdir}
+ mkdir -p ${D}${base_libdir}
mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir}
! ${ENABLE_WIDEC} || \
mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir}
@@ -253,9 +260,9 @@ python populate_packages_prepend () {
libdir = d.expand("${libdir}")
base_libdir = d.expand("${base_libdir}")
pnbase = d.expand("${PN}-lib%s")
- do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
+ do_split_packages(d, libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
if libdir is not base_libdir:
- do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
+ do_split_packages(d, base_libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
}
@@ -278,6 +285,8 @@ FILES_${PN} = "\
${bindir}/tset \
${bindir}/ncurses5-config \
${bindir}/ncursesw5-config \
+ ${bindir}/ncurses6-config \
+ ${bindir}/ncursesw6-config \
${datadir}/tabset \
"
diff --git a/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb b/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
deleted file mode 100644
index 6514613fe3..0000000000
--- a/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require ncurses.inc
-
-SRC_URI += "file://tic-hang.patch \
- file://config.cache \
-"
-# commit id corresponds to the revision in package version
-SRCREV = "63dd558cb8e888d6fab5f00bbf7842736a2356b9"
-S = "${WORKDIR}/git"
-EXTRA_OECONF += "--with-abi-version=5"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb b/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb
new file mode 100644
index 0000000000..e638a3737c
--- /dev/null
+++ b/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb
@@ -0,0 +1,12 @@
+require ncurses.inc
+
+SRC_URI += "file://0001-tic-hang.patch \
+ file://0002-configure-reproducible.patch \
+ file://config.cache \
+ file://0001-ncurses-selective-backport-of-20191012-patch.patch \
+"
+# commit id corresponds to the revision in package version
+SRCREV = "3c9b2677c96c645496997321bf2fe465a5e7e21f"
+S = "${WORKDIR}/git"
+EXTRA_OECONF += "--with-abi-version=5 --cache-file=${B}/config.cache"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/meta/recipes-core/netbase/netbase/netbase-add-rpcbind-as-an-alias-to-sunrpc.patch b/meta/recipes-core/netbase/netbase/netbase-add-rpcbind-as-an-alias-to-sunrpc.patch
deleted file mode 100644
index 35ce21e36d..0000000000
--- a/meta/recipes-core/netbase/netbase/netbase-add-rpcbind-as-an-alias-to-sunrpc.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-netbase: add rpcbind as an alias to sunrpc
-
-the patch comes from:
-https://bugs.archlinux.org/task/20273
-
-Upstream-Status: Pending
-
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- etc-rpc | 2 +-
- etc-services | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/etc-rpc b/etc-rpc
-index 1b30625..9a9a81a 100644
---- a/etc-rpc
-+++ b/etc-rpc
-@@ -1,7 +1,7 @@
- # This file contains user readable names that can be used in place of rpc
- # program numbers.
-
--portmapper 100000 portmap sunrpc
-+portmapper 100000 portmap sunrpc rpcbind
- rstatd 100001 rstat rstat_svc rup perfmeter
- rusersd 100002 rusers
- nfs 100003 nfsprog
-diff --git a/etc-services b/etc-services
-index 9d64a52..a19f7c8 100644
---- a/etc-services
-+++ b/etc-services
-@@ -72,8 +72,8 @@ pop2 109/tcp postoffice pop-2 # POP version 2
- pop2 109/udp pop-2
- pop3 110/tcp pop-3 # POP version 3
- pop3 110/udp pop-3
--sunrpc 111/tcp portmapper # RPC 4.0 portmapper
--sunrpc 111/udp portmapper
-+sunrpc 111/tcp portmapper rpcbind # RPC 4.0 portmapper
-+sunrpc 111/udp portmapper rpcbind
- auth 113/tcp authentication tap ident
- sftp 115/tcp
- uucp-path 117/tcp
---
-1.7.9.5
-
diff --git a/meta/recipes-core/netbase/netbase_5.3.bb b/meta/recipes-core/netbase/netbase_5.3.bb
deleted file mode 100644
index 543596a3d9..0000000000
--- a/meta/recipes-core/netbase/netbase_5.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Basic TCP/IP networking support"
-DESCRIPTION = "This package provides the necessary infrastructure for basic TCP/IP based networking"
-HOMEPAGE = "http://packages.debian.org/netbase"
-SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
-PE = "1"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/n/${BPN}/${BPN}_${PV}.tar.xz \
- file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch \
- file://hosts"
-
-SRC_URI[md5sum] = "2637a27fd3de02a278d2b5be7e6558c1"
-SRC_URI[sha256sum] = "81f6c69795044d62b8ad959cf9daf049d0545fd466c52860ad3f933b1e97b88b"
-
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/"
-do_install () {
- install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
- install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
- install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
- install -m 0644 etc-services ${D}${sysconfdir}/services
-}
-
-CONFFILES_${PN} = "${sysconfdir}/hosts"
diff --git a/meta/recipes-core/netbase/netbase_5.7.bb b/meta/recipes-core/netbase/netbase_5.7.bb
new file mode 100644
index 0000000000..754c2447d9
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase_5.7.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Basic TCP/IP networking support"
+DESCRIPTION = "This package provides the necessary infrastructure for basic TCP/IP based networking"
+HOMEPAGE = "http://packages.debian.org/netbase"
+SECTION = "base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
+PE = "1"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.tar.xz"
+
+SRC_URI[md5sum] = "f1e50e8d637f6be12af169fa1b67b40a"
+SRC_URI[sha256sum] = "1802ed95847a30d0b618cdfb6fc8f62989fda9fc3d1c0efd0b19e3011a34f915"
+
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/"
+do_install () {
+ install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
+ install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
+ install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
+ install -m 0644 etc-services ${D}${sysconfdir}/services
+}
diff --git a/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch b/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch
new file mode 100644
index 0000000000..c220fb8437
--- /dev/null
+++ b/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Inappropriate [OE-Specific]
+
+Make install tries to perform install for all variants, but some of them use the same
+name for crt0 in specific, so performing all of them results in an error during
+do_install, we simply modify the name of the objects so the installation can proceed
+and leave it to the user to select which object files to use.
+
+Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
+
+Index: newlib-3.0.0/libgloss/rs6000/Makefile.in
+===================================================================
+--- newlib-3.0.0.orig/libgloss/rs6000/Makefile.in
++++ newlib-3.0.0/libgloss/rs6000/Makefile.in
+@@ -358,7 +358,7 @@ install-sim:
+ set -e; for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
+
+ install-mvme:
+- set -e; for x in ${MVME_CRT0} ${MVME_BSP} ${MVME_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
++ set -e; for x in ${MVME_CRT0} ${MVME_BSP} ${MVME_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/mvme-$$x; done
+
+ install-solaris:
+ set -e; for x in ${SOLARIS_CRT0} ${SOLARIS_BSP} ${SOLARIS_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
+@@ -367,15 +367,15 @@ install-linux:
+ set -e; for x in ${LINUX_CRT0} ${LINUX_BSP} ${LINUX_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
+
+ install-yellowknife:
+- set -e; for x in ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
++ set -e; for x in ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/yellowknife-$$x; done
+ set -e; for x in ${YELLOWKNIFE_SCRIPTS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
+
+ install-ads:
+- set -e; for x in ${ADS_CRT0} ${ADS_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
++ set -e; for x in ${ADS_CRT0} ${ADS_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/ads-$$x; done
+ set -e; for x in ${ADS_SCRIPTS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
+
+ install-mbx:
+- set -e; for x in ${MBX_CRT0} ${MBX_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
++ set -e; for x in ${MBX_CRT0} ${MBX_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/mbx-$$x; done
+ set -e; for x in ${MBX_SCRIPTS} ${MBX_SPECS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
+
+ install-xil:
diff --git a/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch b/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch
new file mode 100644
index 0000000000..7645be7314
--- /dev/null
+++ b/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Inappropriate [OE-Specific]
+
+When trying to build libgloss for an arm target, the build system
+complains about missing some include files:
+
+| fatal error: acle-compiat.h: No such file or directory
+| #include "acle-compat.h"
+| ^~~~~~~~~~~~~~~
+| compilation terminated.
+
+These include files come from the newlib source, but since we
+are building libgloss separately from newlib, libgloss is unaware
+of where they are, this patch fixes the INCLUDES so the build system
+can find such files.
+
+Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
+
+Index: newlib-3.0.0/libgloss/config/default.mh
+===================================================================
+--- newlib-3.0.0.orig/libgloss/config/default.mh
++++ newlib-3.0.0/libgloss/config/default.mh
+@@ -1,7 +1,7 @@
+ NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
+ NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
+
+-INCLUDES = -I. -I$(srcdir)/..
++INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../newlib/libc/machine/arm
+ # Note that when building the library, ${MULTILIB} is not the way multilib
+ # options are passed; they're passed in $(CFLAGS).
+ CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
diff --git a/meta/recipes-core/newlib/libgloss_3.1.0.bb b/meta/recipes-core/newlib/libgloss_3.1.0.bb
new file mode 100644
index 0000000000..c9ed30d988
--- /dev/null
+++ b/meta/recipes-core/newlib/libgloss_3.1.0.bb
@@ -0,0 +1,33 @@
+require newlib.inc
+
+DEPENDS += "newlib"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/libgloss:"
+
+SRC_URI_append_powerpc = " file://fix-rs6000-crt0.patch"
+SRC_URI_append_arm = " file://fix_makefile_include_arm_h.patch"
+
+do_configure() {
+ ${S}/libgloss/configure ${EXTRA_OECONF}
+}
+
+do_install_prepend() {
+ # install doesn't create this itself, avoid install error
+ install -d ${D}${prefix}/${TARGET_SYS}/lib
+}
+
+do_install_append() {
+ # Move libs to default directories so they can be picked up later
+ install -d ${D}${libdir}
+ mv -v ${D}${prefix}/${TARGET_SYS}/lib/* ${D}${libdir}
+
+ # Remove original directory
+ rmdir -p --ignore-fail-on-non-empty ${D}${prefix}/${TARGET_SYS}/lib
+}
+
+# Split packages correctly
+FILES_${PN} += "${libdir}/*.ld ${libdir}/*.specs"
+FILES_${PN}-dev += "${libdir}/cpu-init/*"
+
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
diff --git a/meta/recipes-core/newlib/newlib.inc b/meta/recipes-core/newlib/newlib.inc
new file mode 100644
index 0000000000..2f0553bd63
--- /dev/null
+++ b/meta/recipes-core/newlib/newlib.inc
@@ -0,0 +1,54 @@
+SUMMARY = "Newlib is a C library intended for use on embedded systems"
+HOMEPAGE = "https://sourceware.org/newlib/"
+DESCRIPTION = "C library intended for use on embedded systems. It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products."
+SECTION = "libs"
+
+LICENSE = "GPLv2 & LGPLv3 & GPLv3 & LGPLv2 & BSD-2-Clause"
+LIC_FILES_CHKSUM = " \
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LIBGLOSS;md5=73f5c98779aea7dba4a6c94a74ab0ae2 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://COPYING.NEWLIB;md5=100d470af54e2d1d79fbd8498a32ff26 \
+ file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \
+ file://newlib/libc/sys/linux/linuxthreads/LICENSE;md5=73640207fbc79b198c7ffd4ad4d97aa0 \
+ "
+
+SRC_URI = "https://sourceware.org/pub/newlib/newlib-${PV}.tar.gz"
+SRC_URI[md5sum] = "f84263b7d524df92a9c9fb30b79e0134"
+SRC_URI[sha256sum] = "fb4fa1cc21e9060719208300a61420e4089d6de6ef59cf533b57fe74801d102a"
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc"
+
+S = "${WORKDIR}/newlib-${PV}"
+B = "${WORKDIR}/build"
+
+## disable stdlib
+TARGET_CC_ARCH_append = " -nostdlib"
+
+EXTRA_OECONF = " \
+ --build=${BUILD_SYS} \
+ --target=${TARGET_SYS} \
+ --host=${HOST_SYS} \
+ --prefix=${prefix} \
+ --exec-prefix=${exec_prefix} \
+ --bindir=${bindir} \
+ --libdir=${libdir} \
+ --includedir=${includedir} \
+ --enable-languages=c \
+ --with-newlib \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --disable-multilib \
+ "
+
+do_configure[cleandirs] = "${B}"
+
+do_install() {
+ oe_runmake install DESTDIR='${D}'
+}
+
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+COMPATIBLE_HOST_libc-glibc_class-target = "null"
diff --git a/meta/recipes-core/newlib/newlib_3.1.0.bb b/meta/recipes-core/newlib/newlib_3.1.0.bb
new file mode 100644
index 0000000000..7ab5b2b94e
--- /dev/null
+++ b/meta/recipes-core/newlib/newlib_3.1.0.bb
@@ -0,0 +1,20 @@
+require newlib.inc
+
+PROVIDES += "virtual/libc virtual/libiconv virtual/libintl"
+
+do_configure() {
+ export CC_FOR_TARGET="${CC}"
+ ${S}/configure ${EXTRA_OECONF}
+}
+
+do_install_append() {
+ # Move include files and libs to default directories so they can be picked up later
+ mv -v ${D}${prefix}/${TARGET_SYS}/lib ${D}${libdir}
+ mv -v ${D}${prefix}/${TARGET_SYS}/include ${D}${includedir}
+
+ # Remove original directory
+ rmdir ${D}${prefix}/${TARGET_SYS}
+}
+
+# No rpm package is actually created but -dev depends on it, avoid dnf error
+RDEPENDS_${PN}-dev_libc-newlib = ""
diff --git a/meta/recipes-core/os-release/os-release.bb b/meta/recipes-core/os-release/os-release.bb
index f519addd8d..d5793c6fed 100644
--- a/meta/recipes-core/os-release/os-release.bb
+++ b/meta/recipes-core/os-release/os-release.bb
@@ -1,9 +1,8 @@
inherit allarch
SUMMARY = "Operating system identification"
-DESCRIPTION = "The /etc/os-release file contains operating system identification data."
+DESCRIPTION = "The /usr/lib/os-release file contains operating system identification data."
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
INHIBIT_DEFAULT_DEPS = "1"
do_fetch[noexec] = "1"
@@ -31,10 +30,9 @@ def sanitise_version(ver):
return ret.lower()
python do_compile () {
- import shutil
with open(d.expand('${B}/os-release'), 'w') as f:
- for field in d.getVar('OS_RELEASE_FIELDS', True).split():
- value = d.getVar(field, True)
+ for field in d.getVar('OS_RELEASE_FIELDS').split():
+ value = d.getVar(field)
if value and field == 'VERSION_ID':
value = sanitise_version(value)
if value:
@@ -43,6 +41,9 @@ python do_compile () {
do_compile[vardeps] += "${OS_RELEASE_FIELDS}"
do_install () {
- install -d ${D}${sysconfdir}
- install -m 0644 os-release ${D}${sysconfdir}/
+ install -d ${D}${nonarch_libdir} ${D}${sysconfdir}
+ install -m 0644 os-release ${D}${nonarch_libdir}/
+ lnr ${D}${nonarch_libdir}/os-release ${D}${sysconfdir}/os-release
}
+
+FILES_${PN} += "${nonarch_libdir}/os-release"
diff --git a/meta/recipes-core/ovmf/ovmf-shell-image.bb b/meta/recipes-core/ovmf/ovmf-shell-image.bb
new file mode 100644
index 0000000000..0d2b8bf52f
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf-shell-image.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "boot image with UEFI shell and tools"
+
+# For this image recipe, only the wic format with a
+# single vfat partition makes sense. Because we have no
+# boot loader and no rootfs partition, not additional
+# tools are needed for this .wks file.
+IMAGE_FSTYPES_forcevariable = 'wic'
+WKS_FILE = "ovmf/ovmf-shell-image.wks"
+WKS_FILE_DEPENDS = ""
+
+inherit image
+
+# We want a minimal image with just ovmf-shell-efi unpacked in it. We
+# avoid installing unnecessary stuff as much as possible, but some
+# things still get through and need to be removed.
+PACKAGE_INSTALL = "ovmf-shell-efi"
+LINGUAS_INSTALL = ""
+do_image () {
+ rm -rf `ls -d ${IMAGE_ROOTFS}/* | grep -v efi`
+}
diff --git a/meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch b/meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch
new file mode 100644
index 0000000000..94ae5d4496
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch
@@ -0,0 +1,33 @@
+From 9e632e3f9edd09632cc877dff6ea57608f979aab Mon Sep 17 00:00:00 2001
+From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
+Date: Thu, 9 Jun 2016 02:23:01 -0700
+Subject: [PATCH] ovmf: update path to native BaseTools
+
+BaseTools is a set of utilities to build EDK-based firmware. These utilities
+are used during the build process. Thus, they need to be built natively.
+When cross-compiling, we need to provide a path to the location of these
+tools. The BBAKE_EDK_TOOLS_PATH string is used as a pattern to be replaced
+with the appropriate location before building.
+
+Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
+Upstream-Status: Pending
+---
+ OvmfPkg/build.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
+index eb5eb73..9058fca 100755
+--- a/OvmfPkg/build.sh
++++ b/OvmfPkg/build.sh
+@@ -30,7 +30,7 @@ then
+ # this assumes svn pulls have the same root dir
+ # export EDK_TOOLS_PATH=`pwd`/../BaseTools
+ # This version is for the tools source in edk2
+- export EDK_TOOLS_PATH=`pwd`/BaseTools
++ export EDK_TOOLS_PATH=BBAKE_EDK_TOOLS_PATH/BaseTools
+ echo $EDK_TOOLS_PATH
+ source edksetup.sh BaseTools
+ else
+--
+2.8.1
+
diff --git a/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch b/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
new file mode 100644
index 0000000000..070b0ac5a6
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
@@ -0,0 +1,50 @@
+From 2320650c6d381b914fe91b2dedaa5870279a8bcf Mon Sep 17 00:00:00 2001
+From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
+Date: Fri, 26 Jul 2019 17:34:26 -0400
+Subject: [PATCH] BaseTools: makefile: adjust to build in under bitbake
+
+Prepend the build flags with those of bitbake. This is to build
+using the bitbake native sysroot include and library directories.
+
+Signed-off-by: Ricardo Neri <ricardo.neri@linux.intel.com>
+Upstream-Status: Pending
+---
+ BaseTools/Source/C/Makefiles/header.makefile | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+Index: git/BaseTools/Source/C/Makefiles/header.makefile
+===================================================================
+--- git.orig/BaseTools/Source/C/Makefiles/header.makefile
++++ git/BaseTools/Source/C/Makefiles/header.makefile
+@@ -62,23 +62,23 @@ $(error Bad HOST_ARCH)
+ endif
+
+ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
+-BUILD_CPPFLAGS = $(INCLUDE)
++BUILD_CPPFLAGS += $(INCLUDE)
+
+ # keep EXTRA_OPTFLAGS last
+ BUILD_OPTFLAGS = -O2 $(EXTRA_OPTFLAGS)
+
+ ifeq ($(DARWIN),Darwin)
+ # assume clang or clang compatible flags on OS X
+-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
+ -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g
+ else
+-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
+ -fno-delete-null-pointer-checks -Wall -Werror \
+ -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \
+ -Wno-unused-result -nostdlib -g
+ endif
+-BUILD_LFLAGS =
+-BUILD_CXXFLAGS = -Wno-unused-result
++BUILD_LFLAGS = $(LDFLAGS)
++BUILD_CXXFLAGS += -Wno-unused-result
+
+ ifeq ($(HOST_ARCH), IA32)
+ #
+--
+2.20.1
+
diff --git a/meta/recipes-core/ovmf/ovmf/0004-ovmf-enable-long-path-file.patch b/meta/recipes-core/ovmf/ovmf/0004-ovmf-enable-long-path-file.patch
new file mode 100644
index 0000000000..d954fbe314
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0004-ovmf-enable-long-path-file.patch
@@ -0,0 +1,18 @@
+From 032fc6b1f7691bd537fd2a6bd13821fcf3c45e64 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Mon, 11 Sep 2017 02:21:55 -0400
+Subject: [PATCH] ovmf: enable long path file
+
+Upstream-Status: Pending
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ BaseTools/Source/C/Common/CommonLib.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/BaseTools/Source/C/Common/CommonLib.h b/BaseTools/Source/C/Common/CommonLib.h
+index 2041b89e2d..8116aa2e35 100644
+--- a/BaseTools/Source/C/Common/CommonLib.h
++++ b/BaseTools/Source/C/Common/CommonLib.h
+@@ -22 +22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+-#define MAX_LONG_FILE_PATH 500
++#define MAX_LONG_FILE_PATH 1023
diff --git a/meta/recipes-core/ovmf/ovmf/VfrCompile-increase-path-length-limit.patch b/meta/recipes-core/ovmf/ovmf/VfrCompile-increase-path-length-limit.patch
new file mode 100644
index 0000000000..bb12d8beba
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/VfrCompile-increase-path-length-limit.patch
@@ -0,0 +1,33 @@
+From c7722d10c7bcf6be0adcf54abb1d406599dd7914 Mon Sep 17 00:00:00 2001
+From: Patrick Ohly <patrick.ohly@intel.com>
+Date: Fri, 24 Feb 2017 01:40:02 +0100
+Subject: [PATCH] VfrCompile: increase path length limit
+
+The VfrCompile tool has a hard-coded maximum length for path names
+which turned out to be too small by around 20 characters in the Yocto
+autobuilder setup. Increasing the maximum by a factor of 4 is
+relatively easy and makes the problem less likely.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+---
+ BaseTools/Source/C/VfrCompile/EfiVfr.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/BaseTools/Source/C/VfrCompile/EfiVfr.h b/BaseTools/Source/C/VfrCompile/EfiVfr.h
+index d187902..9ad4a7b 100644
+--- a/BaseTools/Source/C/VfrCompile/EfiVfr.h
++++ b/BaseTools/Source/C/VfrCompile/EfiVfr.h
+@@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ #include "Common/UefiInternalFormRepresentation.h"
+ #include "Common/MdeModuleHii.h"
+
+-#define MAX_PATH 255
++#define MAX_PATH 1023
+ #define MAX_VFR_LINE_LEN 4096
+
+ #define EFI_IFR_MAX_LENGTH 0xFF
+--
+2.1.4
+
diff --git a/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch b/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
new file mode 100644
index 0000000000..1b65348e84
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
@@ -0,0 +1,34 @@
+Author: Steve Langasek <steve.langasek@ubuntu.com>
+Description: pass -fno-stack-protector to all GCC toolchains
+ The upstream build rules inexplicably pass -fno-stack-protector only
+ when building for i386 and amd64. Add this essential argument to the
+ generic rules for gcc 4.4 and later.
+Last-Updated: 2016-04-12
+Upstream-Status: Pending
+Index: git/BaseTools/Conf/tools_def.template
+===================================================================
+--- git.orig/BaseTools/Conf/tools_def.template
++++ git/BaseTools/Conf/tools_def.template
+@@ -1736,10 +1736,10 @@ DEFINE GCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386
+ DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii
+ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
+
+-DEFINE GCC48_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
++DEFINE GCC48_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+ DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
+-DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address
+-DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address
++DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -D EFI32 -fno-asynchronous-unwind-tables -Wno-address
++DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address
+ DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
+ DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
+ DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)
+@@ -1748,7 +1748,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF
+ DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
+ DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
+ DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
+-DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations
++DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mword-relocations
+ DEFINE GCC48_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS)
+ DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS)
+ DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
diff --git a/meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks b/meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks
new file mode 100644
index 0000000000..1d2f16bd33
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks
@@ -0,0 +1,4 @@
+# short-description: Create an EFI disk image with just the EFI system partition
+
+part / --source rootfs --ondisk sda --fstype=vfat --align 1024
+bootloader --ptable gpt --timeout=5
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
new file mode 100644
index 0000000000..ff2b2a530a
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -0,0 +1,245 @@
+SUMMARY = "OVMF - UEFI firmware for Qemu and KVM"
+DESCRIPTION = "OVMF is an EDK II based project to enable UEFI support for \
+Virtual Machines. OVMF contains sample UEFI firmware for QEMU and KVM"
+HOMEPAGE = "https://github.com/tianocore/tianocore.github.io/wiki/OVMF"
+LICENSE = "BSD-2-Clause"
+LICENSE_class-target = "${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'BSD & OpenSSL', 'BSD', d)}"
+LIC_FILES_CHKSUM = "file://OvmfPkg/License.txt;md5=06357ddc23f46577c2aeaeaf7b776d65"
+
+# Enabling Secure Boot adds a dependency on OpenSSL and implies
+# compiling OVMF twice, so it is disabled by default. Distros
+# may change that default.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[secureboot] = ",,,"
+
+SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=git \
+ file://0002-ovmf-update-path-to-native-BaseTools.patch \
+ file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
+ file://0004-ovmf-enable-long-path-file.patch \
+ file://no-stack-protector-all-archs.patch \
+ "
+
+PV = "edk2-stable201905"
+SRCREV="20d2e5a125e34fc8501026613a71549b2a1a3e54"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)"
+
+inherit deploy
+
+PARALLEL_MAKE = ""
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "nasm-native acpica-native ovmf-native util-linux-native"
+
+EDK_TOOLS_DIR="edk2_basetools"
+
+# OVMF has trouble building with the default optimization of -O2.
+BUILD_OPTIMIZATION="-pipe"
+
+# OVMF supports IA only, although it could conceivably support ARM someday.
+COMPATIBLE_HOST='(i.86|x86_64).*'
+
+# Additional build flags for OVMF with Secure Boot.
+# Fedora also uses "-D SMM_REQUIRE -D EXCLUDE_SHELL_FROM_FD".
+OVMF_SECURE_BOOT_EXTRA_FLAGS ??= ""
+OVMF_SECURE_BOOT_FLAGS = "-DSECURE_BOOT_ENABLE=TRUE ${OVMF_SECURE_BOOT_EXTRA_FLAGS}"
+
+export PYTHON_COMMAND = "${HOSTTOOLS_DIR}/python3"
+
+do_patch[postfuncs] += "fix_basetools_location"
+fix_basetools_location () {
+}
+fix_basetools_location_class-target() {
+ # Replaces the fake path inserted by 0002-ovmf-update-path-to-native-BaseTools.patch.
+ # Necessary for finding the actual BaseTools from ovmf-native.
+ sed -i -e 's#BBAKE_EDK_TOOLS_PATH#${STAGING_BINDIR_NATIVE}/${EDK_TOOLS_DIR}#' ${S}/OvmfPkg/build.sh
+}
+
+do_patch[postfuncs] += "fix_iasl"
+fix_iasl() {
+}
+fix_iasl_class-native() {
+ # iasl is not installed under /usr/bin when building with OE.
+ sed -i -e 's#/usr/bin/iasl#${STAGING_BINDIR_NATIVE}/iasl#' ${S}/BaseTools/Conf/tools_def.template
+}
+
+# Inject CC and friends into the build. LINKER already is in GNUmakefile.
+# Must be idempotent and thus remove old assignments that were inserted
+# earlier.
+do_patch[postfuncs] += "fix_toolchain"
+fix_toolchain() {
+ sed -i \
+ -e '/^\(CC\|CXX\|AS\|AR\|LD\|LINKER\) =/d' \
+ -e '/^APPLICATION/a CC = ${CC}\nCXX = ${CXX}\nAS = ${AS}\nAR = ${AR}\nLD = ${LD}\nLINKER = $(CC)' \
+ ${S}/BaseTools/Source/C/Makefiles/app.makefile
+ sed -i \
+ -e '/^\(CC\|CXX\|AS\|AR\|LD\)/d' \
+ -e '/^VFR_CPPFLAGS/a CC = ${CC}\nCXX = ${CXX}\nAS = ${AS}\nAR = ${AR}\nLD = ${LD}' \
+ ${S}/BaseTools/Source/C/VfrCompile/GNUmakefile
+}
+fix_toolchain_append_class-native() {
+ # This tools_def.template is going to be used by the target ovmf and
+ # defines which compilers to use. For the GCC toolchain definitions,
+ # that will be ${HOST_PREFIX}gcc. However, "make" doesn't need that
+ # prefix.
+ #
+ # Injecting ENV(HOST_PREFIX) matches exporting that value as env
+ # variable in do_compile_class-target.
+ sed -i \
+ -e 's#\(ENV\|DEF\)(GCC.*_PREFIX)#ENV(HOST_PREFIX)#' \
+ -e 's#ENV(HOST_PREFIX)make#make#' \
+ ${S}/BaseTools/Conf/tools_def.template
+ sed -i \
+ -e '/^\(LFLAGS\|CFLAGS\) +=/d' \
+ -e '/^LINKER/a LFLAGS += ${BUILD_LDFLAGS}\nCFLAGS += ${BUILD_CFLAGS}' \
+ ${S}/BaseTools/Source/C/Makefiles/app.makefile \
+ ${S}/BaseTools/Source/C/VfrCompile/GNUmakefile
+ # Linking with gold fails:
+ # internal error in do_layout, at ../../gold/object.cc:1821
+ # make: *** [.../OUTPUT/Facs.acpi] Error 1
+ # We intentionally hard-code the use of ld.bfd regardless of DISTRO_FEATURES
+ # to make ovmf-native reusable across distros.
+ sed -i \
+ -e 's#^\(DEFINE GCC.*DLINK.*FLAGS *=\)#\1 -fuse-ld=bfd#' \
+ ${S}/BaseTools/Conf/tools_def.template
+}
+
+GCC_VER="$(${CC} -v 2>&1 | tail -n1 | awk '{print $3}')"
+
+fixup_target_tools() {
+ case ${1} in
+ 4.4.*)
+ FIXED_GCCVER=GCC44
+ ;;
+ 4.5.*)
+ FIXED_GCCVER=GCC45
+ ;;
+ 4.6.*)
+ FIXED_GCCVER=GCC46
+ ;;
+ 4.7.*)
+ FIXED_GCCVER=GCC47
+ ;;
+ 4.8.*)
+ FIXED_GCCVER=GCC48
+ ;;
+ 4.9.*)
+ FIXED_GCCVER=GCC49
+ ;;
+ *)
+ FIXED_GCCVER=GCC5
+ ;;
+ esac
+ echo ${FIXED_GCCVER}
+}
+
+do_compile_class-native() {
+ oe_runmake -C ${S}/BaseTools
+}
+
+do_compile_class-target() {
+ export LFLAGS="${LDFLAGS}"
+ PARALLEL_JOBS="${@oe.utils.parallel_make_argument(d, '-n %d')}"
+ OVMF_ARCH="X64"
+ if [ "${TARGET_ARCH}" != "x86_64" ] ; then
+ OVMF_ARCH="IA32"
+ fi
+
+ # The build for the target uses BaseTools/Conf/tools_def.template
+ # from ovmf-native to find the compiler, which depends on
+ # exporting HOST_PREFIX.
+ export HOST_PREFIX="${HOST_PREFIX}"
+
+ # BaseTools/Conf gets copied to Conf, but only if that does not
+ # exist yet. To ensure that an updated template gets used during
+ # incremental builds, we need to remove the copy before we start.
+ rm -f `ls ${S}/Conf/*.txt | grep -v ReadMe.txt`
+
+ # ${WORKDIR}/ovmf is a well-known location where do_install and
+ # do_deploy will be able to find the files.
+ rm -rf ${WORKDIR}/ovmf
+ mkdir ${WORKDIR}/ovmf
+ OVMF_DIR_SUFFIX="X64"
+ if [ "${TARGET_ARCH}" != "x86_64" ] ; then
+ OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
+ fi
+ FIXED_GCCVER=$(fixup_target_tools ${GCC_VER})
+ bbnote FIXED_GCCVER is ${FIXED_GCCVER}
+ build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
+
+ bbnote "Building without Secure Boot."
+ rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX
+ ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER}
+ ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd
+ ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd
+ ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd
+ ln ${build_dir}/${OVMF_ARCH}/Shell.efi ${WORKDIR}/ovmf/
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'true', 'false', d)}; then
+ # Repeat build with the Secure Boot flags.
+ bbnote "Building with Secure Boot."
+ rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX
+ ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} ${OVMF_SECURE_BOOT_FLAGS}
+ ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.secboot.fd
+ ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.secboot.code.fd
+ ln ${build_dir}/${OVMF_ARCH}/EnrollDefaultKeys.efi ${WORKDIR}/ovmf/
+ fi
+}
+
+do_install_class-native() {
+ install -d ${D}/${bindir}/edk2_basetools
+ cp -r ${S}/BaseTools ${D}/${bindir}/${EDK_TOOLS_DIR}
+}
+
+do_install_class-target() {
+ # Content for UEFI shell iso. We install the EFI shell as
+ # bootx64/ia32.efi because then it can be started even when the
+ # firmware itself does not contain it.
+ install -d ${D}/efi/boot
+ install ${WORKDIR}/ovmf/Shell.efi ${D}/efi/boot/boot${@ "ia32" if "${TARGET_ARCH}" != "x86_64" else "x64"}.efi
+ if ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'true', 'false', d)}; then
+ install ${WORKDIR}/ovmf/EnrollDefaultKeys.efi ${D}
+ fi
+}
+
+# This always gets packaged because ovmf-shell-image depends on it.
+# This allows testing that recipe in all configurations because it
+# can always be part of a world build.
+#
+# However, EnrollDefaultKeys.efi is only included when Secure Boot is enabled.
+PACKAGES =+ "ovmf-shell-efi"
+FILES_ovmf-shell-efi = " \
+ EnrollDefaultKeys.efi \
+ efi/ \
+"
+
+DEPLOYDEP = ""
+DEPLOYDEP_class-target = "qemu-system-native:do_populate_sysroot"
+DEPLOYDEP_class-target += " ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'openssl-native:do_populate_sysroot', '', d)}"
+do_deploy[depends] += "${DEPLOYDEP}"
+
+do_deploy() {
+}
+do_deploy[cleandirs] = "${DEPLOYDIR}"
+do_deploy_class-target() {
+ # For use with "runqemu ovmf".
+ for i in \
+ ovmf \
+ ovmf.code \
+ ovmf.vars \
+ ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'ovmf.secboot ovmf.secboot.code', '', d)} \
+ ; do
+ qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/$i.fd ${DEPLOYDIR}/$i.qcow2
+ done
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'true', 'false', d)}; then
+ # Create a test Platform Key and first Key Exchange Key to use with EnrollDefaultKeys
+ openssl req -new -x509 -newkey rsa:2048 -keyout ${DEPLOYDIR}/OvmfPkKek1.key \
+ -out ${DEPLOYDIR}/OvmfPkKek1.crt -nodes -days 20 -subj "/CN=OVMFSecBootTest"
+ openssl x509 -in ${DEPLOYDIR}/OvmfPkKek1.crt -out ${DEPLOYDIR}/OvmfPkKek1.pem -outform PEM
+ fi
+}
+addtask do_deploy after do_compile before do_build
+
+BBCLASSEXTEND = "native"
+TOOLCHAIN = "gcc"
diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index 2c2abed33c..ae989011f4 100644
--- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -4,7 +4,6 @@
SUMMARY = "Host packages for the standalone SDK or external toolchain"
PR = "r12"
-LICENSE = "MIT"
inherit packagegroup nativesdk
@@ -22,9 +21,12 @@ RDEPENDS_${PN} = "\
nativesdk-automake \
nativesdk-shadow \
nativesdk-makedevs \
- nativesdk-smartpm \
- nativesdk-postinst-intercept \
+ nativesdk-cmake \
+ nativesdk-meson \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', '', d)} \
+ nativesdk-sdk-provides-dummy \
+ nativesdk-bison \
+ nativesdk-flex \
"
RDEPENDS_${PN}_darwin = "\
diff --git a/meta/recipes-core/packagegroups/packagegroup-base.bb b/meta/recipes-core/packagegroups/packagegroup-base.bb
index 2e94fdefb5..1f802da09b 100644
--- a/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -7,7 +7,6 @@ PR = "r83"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
-inherit bluetooth
PROVIDES = "${PACKAGES}"
PACKAGES = ' \
@@ -21,7 +20,6 @@ PACKAGES = ' \
${@bb.utils.contains("MACHINE_FEATURES", "apm", "packagegroup-base-apm", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "ext2", "packagegroup-base-ext2", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "vfat", "packagegroup-base-vfat", "", d)} \
- ${@bb.utils.contains("MACHINE_FEATURES", "irda", "packagegroup-base-irda", "",d)} \
${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "packagegroup-base-keyboard", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "pci", "packagegroup-base-pci", "",d)} \
${@bb.utils.contains("MACHINE_FEATURES", "pcmcia", "packagegroup-base-pcmcia", "", d)} \
@@ -54,7 +52,6 @@ RDEPENDS_packagegroup-base = "\
packagegroup-distro-base \
packagegroup-machine-base \
\
- sysfsutils \
module-init-tools \
${@bb.utils.contains('MACHINE_FEATURES', 'apm', 'packagegroup-base-apm', '',d)} \
${@bb.utils.contains('MACHINE_FEATURES', 'acpi', 'packagegroup-base-acpi', '',d)} \
@@ -64,7 +61,6 @@ RDEPENDS_packagegroup-base = "\
${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'packagegroup-base-alsa', '',d)} \
${@bb.utils.contains('COMBINED_FEATURES', 'ext2', 'packagegroup-base-ext2', '',d)} \
${@bb.utils.contains('COMBINED_FEATURES', 'vfat', 'packagegroup-base-vfat', '',d)} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'irda', 'packagegroup-base-irda', '',d)} \
${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'packagegroup-base-pci', '',d)} \
${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'packagegroup-base-pcmcia', '',d)} \
${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget', 'packagegroup-base-usbgadget', '',d)} \
@@ -110,8 +106,8 @@ python __anonymous () {
# If Distro want wifi and machine feature wifi/pci/pcmcia/usbhost (one of them)
# then include packagegroup-base-wifi in packagegroup-base
- distro_features = set(d.getVar("DISTRO_FEATURES", True).split())
- machine_features= set(d.getVar("MACHINE_FEATURES", True).split())
+ distro_features = set(d.getVar("DISTRO_FEATURES").split())
+ machine_features= set(d.getVar("MACHINE_FEATURES").split())
if "bluetooth" in distro_features and not "bluetooth" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
d.setVar("ADD_BT", "packagegroup-base-bluetooth")
@@ -152,8 +148,7 @@ RDEPENDS_packagegroup-base-pci = "\
SUMMARY_packagegroup-base-acpi = "ACPI support"
RDEPENDS_packagegroup-base-acpi = "\
- acpid \
- libacpi "
+ acpid"
SUMMARY_packagegroup-base-apm = "APM support"
RDEPENDS_packagegroup-base-apm = "\
@@ -203,8 +198,7 @@ RRECOMMENDS_packagegroup-base-pcmcia = "\
SUMMARY_packagegroup-base-bluetooth = "Bluetooth support"
RDEPENDS_packagegroup-base-bluetooth = "\
- ${BLUEZ} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'libasound-module-bluez', '',d)} \
+ bluez5 \
"
RRECOMMENDS_packagegroup-base-bluetooth = "\
@@ -223,23 +217,6 @@ RRECOMMENDS_packagegroup-base-bluetooth = "\
${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-dtl1-cs', '',d)} \
"
-SUMMARY_packagegroup-base-irda = "IrDA support"
-RDEPENDS_packagegroup-base-irda = "\
- irda-utils"
-
-RRECOMMENDS_packagegroup-base-irda = "\
- kernel-module-pxaficp-ir \
- kernel-module-irda \
- kernel-module-ircomm \
- kernel-module-ircomm-tty \
- kernel-module-irlan \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ppp', 'kernel-module-irnet', '',d)} \
- kernel-module-irport \
- kernel-module-irtty \
- kernel-module-irtty-sir \
- kernel-module-sir-dev \
- ${@bb.utils.contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-ir-usb', '',d)} "
-
SUMMARY_packagegroup-base-usbgadget = "USB gadget support"
RRECOMMENDS_packagegroup-base-usbgadget = "\
kernel-module-pxa27x_udc \
@@ -291,9 +268,8 @@ RRECOMMENDS_packagegroup-base-ipsec = "\
#
SUMMARY_packagegroup-base-wifi = "WiFi support"
RDEPENDS_packagegroup-base-wifi = "\
- ${VIRTUAL-RUNTIME_wireless-tools} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'hostap-utils', '',d)} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'hostap-utils', '',d)} \
+ iw \
+ wireless-regdb-static \
wpa-supplicant"
RRECOMMENDS_packagegroup-base-wifi = "\
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 04bc0f2b69..abbee14bd4 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -10,19 +10,12 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
-#
-# Set by the machine configuration with packages essential for device bootup
-#
-MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
-
# Distro can override the following VIRTUAL-RUNTIME providers:
VIRTUAL-RUNTIME_dev_manager ?= "udev"
-VIRTUAL-RUNTIME_login_manager ?= "busybox"
-VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
VIRTUAL-RUNTIME_keymaps ?= "keymaps"
+EFI_PROVIDER ??= "grub-efi"
+
SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
modutils-initscripts \
init-ifupdown \
@@ -35,6 +28,7 @@ RDEPENDS_${PN} = "\
${VIRTUAL-RUNTIME_base-utils} \
${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
+ ${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER} kernel", "", d)} \
netbase \
${VIRTUAL-RUNTIME_login_manager} \
${VIRTUAL-RUNTIME_init_manager} \
@@ -43,4 +37,5 @@ RDEPENDS_${PN} = "\
${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
RRECOMMENDS_${PN} = "\
+ ${VIRTUAL-RUNTIME_base-utils-syslog} \
${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index aceba78ded..03fa5296c1 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -16,7 +16,6 @@ RDEPENDS_packagegroup-core-sdk = "\
coreutils \
ccache \
diffutils \
- intltool \
perl-module-re \
perl-module-text-wrap \
findutils \
@@ -27,16 +26,13 @@ RDEPENDS_packagegroup-core-sdk = "\
tcl"
SANITIZERS = "libasan-dev libubsan-dev"
-SANITIZERS_aarch64 = ""
-SANITIZERS_mips = ""
-SANITIZERS_mipsel = ""
-SANITIZERS_mips64 = ""
-SANITIZERS_mips64n32 = ""
+SANITIZERS_arc = ""
+SANITIZERS_microblaze = ""
+SANITIZERS_mipsarch = ""
SANITIZERS_nios2 = ""
-SANITIZERS_powerpc64 = ""
-SANITIZERS_sparc = ""
+SANITIZERS_riscv64 = ""
+SANITIZERS_riscv32 = ""
SANITIZERS_libc-musl = ""
-SANITIZERS_libc-uclibc = ""
RRECOMMENDS_packagegroup-core-sdk = "\
libgomp \
@@ -45,7 +41,7 @@ RRECOMMENDS_packagegroup-core-sdk = "\
#python generate_sdk_pkgs () {
# poky_pkgs = read_pkgdata('packagegroup-core', d)['PACKAGES']
-# pkgs = d.getVar('PACKAGES', True).split()
+# pkgs = d.getVar('PACKAGES').split()
# for pkg in poky_pkgs.split():
# newpkg = pkg.replace('packagegroup-core', 'packagegroup-core-sdk')
#
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
index 274e11a8b0..2a54f1ca3e 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
@@ -1,6 +1,8 @@
SUMMARY = "Target packages for the standalone SDK"
PR = "r8"
+PACKAGE_ARCH = "${TUNE_PKGARCH}"
+
inherit packagegroup
RDEPENDS_${PN} = "\
@@ -12,3 +14,8 @@ RDEPENDS_${PN} = "\
libstdc++-dev \
${LIBC_DEPENDENCIES} \
"
+
+RRECOMMENDS_${PN}_mingw32 = "\
+ libssp \
+ libssp-dev \
+ "
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
index 9fc2b0ef4d..81fbdf4608 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
@@ -4,6 +4,8 @@
SUMMARY = "Debugging tools"
+PACKAGE_ARCH = "${TUNE_PKGARCH}"
+
inherit packagegroup
PR = "r3"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index dd9844504b..3fd423c592 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -18,7 +18,6 @@ PROFILE_TOOLS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'sys
RRECOMMENDS_${PN} = "\
${PERF} \
- trace-cmd \
blktrace \
${PROFILE_TOOLS_X} \
${PROFILE_TOOLS_SYSTEMD} \
@@ -26,54 +25,43 @@ RRECOMMENDS_${PN} = "\
PROFILETOOLS = "\
powertop \
- latencytop \
"
PERF = "perf"
PERF_libc-musl = ""
-# systemtap needs elfutils which is not fully buildable on uclibc
-# hence we exclude it from uclibc based builds
+# systemtap needs elfutils which is not fully buildable on some arches/libcs
SYSTEMTAP = "systemtap"
-SYSTEMTAP_libc-uclibc = ""
SYSTEMTAP_libc-musl = ""
-SYSTEMTAP_mips = ""
-SYSTEMTAP_mipsel = ""
-SYSTEMTAP_mips64 = ""
-SYSTEMTAP_mips64n32 = ""
SYSTEMTAP_nios2 = ""
-SYSTEMTAP_aarch64 = ""
-
-# lttng-ust uses sched_getcpu() which is not there on uclibc
-# for some of the architectures it can be patched to call the
-# syscall directly but for x86_64 __NR_getcpu is a vsyscall
-# which means we can not use syscall() to call it. So we ignore
-# it for x86_64/uclibc
+SYSTEMTAP_riscv64 = ""
+# lttng-ust uses sched_getcpu() which is not there on for some platforms.
LTTNGUST = "lttng-ust"
-LTTNGUST_libc-uclibc = ""
-LTTNGUST_libc-musl = ""
+LTTNGUST_arc = ""
LTTNGTOOLS = "lttng-tools"
-LTTNGTOOLS_libc-musl = ""
+LTTNGTOOLS_arc = ""
LTTNGMODULES = "lttng-modules"
+LTTNGMODULES_arc = ""
BABELTRACE = "babeltrace"
# valgrind does not work on the following configurations/architectures
VALGRIND = "valgrind"
-VALGRIND_libc-uclibc = ""
VALGRIND_libc-musl = ""
-VALGRIND_mips = ""
-VALGRIND_mipsel = ""
-VALGRIND_mips64 = ""
-VALGRIND_mips64n32 = ""
+VALGRIND_mipsarch = ""
VALGRIND_nios2 = ""
+VALGRIND_arc = ""
VALGRIND_armv4 = ""
VALGRIND_armv5 = ""
VALGRIND_armv6 = ""
+VALGRIND_armeb = ""
VALGRIND_aarch64 = ""
+VALGRIND_riscv64 = ""
+VALGRIND_linux-gnux32 = ""
+VALGRIND_linux-gnun32 = ""
RDEPENDS_${PN} = "\
${PROFILETOOLS} \
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index 317097854f..a5fc152859 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -10,10 +10,15 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
-# kexec-tools doesn't work on e5500-64b and nios2 yet
+# kexec-tools doesn't work on e5500-64b, microblaze and nios2 yet
KEXECTOOLS ?= "kexec"
KEXECTOOLS_e5500-64b ?= ""
+KEXECTOOLS_microblaze ?= ""
KEXECTOOLS_nios2 ?= ""
+KEXECTOOLS_riscv64 ?= ""
+
+GSTEXAMPLES ?= "gst-examples"
+GSTEXAMPLES_riscv64 = ""
X11GLTOOLS = "\
mesa-demos \
@@ -24,18 +29,15 @@ X11GLTOOLS = "\
"
X11TOOLS = "\
- fstests \
- gst-player \
+ ${GSTEXAMPLES} \
x11perf \
xrestop \
xwininfo \
xprop \
- xvideo-tests \
"
RDEPENDS_${PN} = "\
blktool \
- lrzsz \
${KEXECTOOLS} \
alsa-utils-amixer \
alsa-utils-aplay \
diff --git a/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb b/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
index d551147b5a..3b430c0814 100644
--- a/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
@@ -16,3 +16,9 @@ RDEPENDS_${PN} = "\
${@all_multilib_tune_values(d, 'GDB')} \
meta-environment-${MACHINE} \
"
+
+# When TUNE_ARCH changes but MACHINE does not (for example when a machine definition is updated),
+# cross-canadian.bbclass prevents variable dependency propagation to TRANSLATED_TARGET_ARCH
+# This will result in erroneous reuse of previous sstate packages. The following line
+# establishes a direct dependency instead.
+do_package[vardeps] += "TUNE_ARCH"
diff --git a/meta/recipes-core/packagegroups/packagegroup-go-cross-canadian.bb b/meta/recipes-core/packagegroups/packagegroup-go-cross-canadian.bb
new file mode 100644
index 0000000000..3daace1a40
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-go-cross-canadian.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Host SDK package for Go cross canadian toolchain"
+PN = "packagegroup-go-cross-canadian-${MACHINE}"
+
+inherit cross-canadian packagegroup
+
+PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
+
+GO = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+
+RDEPENDS_${PN} = " \
+ ${@all_multilib_tune_values(d, 'GO')} \
+"
diff --git a/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
new file mode 100644
index 0000000000..5afb490aac
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
@@ -0,0 +1,11 @@
+SUMMARY = "Target packages for the Go SDK"
+
+inherit packagegroup goarch
+
+RDEPENDS_${PN} = " \
+ go-runtime \
+ go-runtime-dev \
+ go-runtime-staticdev \
+"
+
+COMPATIBLE_HOST = "^(?!riscv64).*"
diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index 73430b86cd..ea6d567301 100644
--- a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -6,10 +6,15 @@ SUMMARY = "Self-hosting"
DESCRIPTION = "Packages required to run the build system"
PR = "r13"
-inherit packagegroup distro_features_check
+PACKAGE_ARCH = "${TUNE_PKGARCH}"
+
+inherit packagegroup features_check
# rdepends on libx11-dev
REQUIRED_DISTRO_FEATURES = "x11"
+# rdepends on libgl
+REQUIRED_DISTRO_FEATURES += "opengl"
+
PACKAGES = "\
packagegroup-self-hosted \
packagegroup-self-hosted-debug \
@@ -34,12 +39,11 @@ RDEPENDS_packagegroup-self-hosted-host-tools = "\
e2fsprogs-tune2fs \
hdparm \
iptables \
- lsb \
+ lsb-release \
mc \
mc-fish \
mc-helpers \
mc-helpers-perl \
- mc-helpers-python \
parted \
${PSEUDO} \
screen \
@@ -71,27 +75,28 @@ RDEPENDS_packagegroup-self-hosted-sdk = "\
g++-symlinks \
gcc \
gcc-symlinks \
- intltool \
ldd \
less \
- libssp \
- libssp-dev \
- libssp-staticdev \
libstdc++ \
libstdc++-dev \
libtool \
make \
- mktemp \
perl-module-re \
perl-module-text-wrap \
pkgconfig \
quilt \
sed \
"
-# glibc-utils: for rpcgen
+RDEPENDS_packagegroup-self-hosted-sdk_append_mingw32 = "\
+ libssp \
+ libssp-dev \
+ libssp-staticdev \
+ "
+# rpcsvc-proto: for rpcgen
RDEPENDS_packagegroup-self-hosted-sdk_append_libc-glibc = "\
glibc-gconv-ibm850 \
glibc-utils \
+ rpcsvc-proto \
"
RDEPENDS_packagegroup-self-hosted-debug = " \
gdb \
@@ -124,7 +129,6 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
libaio \
libusb1 \
libxml2 \
- lrzsz \
lsof \
lzo \
man \
@@ -134,21 +138,20 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
mtools \
ncurses \
ncurses-terminfo-base \
- neon \
nfs-utils \
nfs-utils-client \
openssl \
+ openssh-scp \
openssh-sftp-server \
+ openssh-ssh \
opkg \
opkg-utils \
patch \
perl \
perl-dev \
+ perl-misc \
perl-modules \
perl-pod \
- python \
- python-modules \
- python-git \
python3 \
python3-modules \
python3-git \
@@ -162,7 +165,6 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
sysstat \
tar \
tcl \
- texi2html \
texinfo \
unzip \
usbutils \
@@ -182,12 +184,9 @@ RDEPENDS_packagegroup-self-hosted-graphics = "\
libgl-dev \
libglu \
libglu-dev \
- libsdl \
- libsdl-dev \
libx11-dev \
adwaita-icon-theme \
xdg-utils \
- epiphany \
l3afpad \
pcmanfm \
vte \
diff --git a/meta/recipes-core/psplash/files/psplash-init b/meta/recipes-core/psplash/files/psplash-init
index 66c85e9335..4bee866b0d 100755
--- a/meta/recipes-core/psplash/files/psplash-init
+++ b/meta/recipes-core/psplash/files/psplash-init
@@ -7,6 +7,12 @@
# Default-Stop:
### END INIT INFO
+if [ ! -e /dev/fb0 ]; then
+ echo "Framebuffer /dev/fb0 not detected"
+ echo "Boot splashscreen disabled"
+ exit 0;
+fi
+
read CMDLINE < /proc/cmdline
for x in $CMDLINE; do
case $x in
@@ -18,7 +24,10 @@ for x in $CMDLINE; do
done
export TMPDIR=/mnt/.psplash
-mount tmpfs -t tmpfs $TMPDIR -o,size=40k
+[ -d $TMPDIR ] || mkdir -p $TMPDIR
+if ! mountpoint -q $TMPDIR; then
+ mount tmpfs -t tmpfs $TMPDIR -o,size=40k
+fi
rotation=0
if [ -e /etc/rotation ]; then
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 0537426513..56734c1582 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -5,19 +5,20 @@ SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6"
-SRCREV = "88343ad23c90fa1dd8d79ac0d784a691aa0c6d2b"
+SRCREV = "2015f7073e98dd9562db0936a254af5ef56356cf"
PV = "0.1+git${SRCPV}"
PR = "r15"
SRC_URI = "git://git.yoctoproject.org/${BPN} \
file://psplash-init \
${SPLASH_IMAGES}"
+UPSTREAM_CHECK_COMMITS = "1"
SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
python __anonymous() {
- oldpkgs = d.getVar("PACKAGES", True).split()
- splashfiles = d.getVar('SPLASH_IMAGES', True).split()
+ oldpkgs = d.getVar("PACKAGES").split()
+ splashfiles = d.getVar('SPLASH_IMAGES').split()
pkgs = []
localpaths = []
haspng = False
@@ -50,8 +51,8 @@ python __anonymous() {
d.appendVar("DEPENDS", " gdk-pixbuf-native")
d.prependVar("PACKAGES", "%s " % (" ".join(pkgs)))
- mlprefix = d.getVar('MLPREFIX', True) or ''
- pn = d.getVar('PN', True) or ''
+ mlprefix = d.getVar('MLPREFIX') or ''
+ pn = d.getVar('PN') or ''
for p in pkgs:
ep = '%s%s' % (mlprefix, p)
epsplash = '%s%s' % (mlprefix, 'psplash')
@@ -72,30 +73,30 @@ ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
python do_compile () {
import shutil
+ import subprocess
# Build a separate executable for each splash image
- workdir = d.getVar('WORKDIR', True)
- convertscript = "%s/make-image-header.sh" % d.getVar('S', True)
- destfile = "%s/psplash-poky-img.h" % d.getVar('S', True)
- localfiles = d.getVar('SPLASH_LOCALPATHS', True).split()
- outputfiles = d.getVar('SPLASH_INSTALL', True).split()
+ workdir = d.getVar('WORKDIR')
+ convertscript = "%s/make-image-header.sh" % d.getVar('S')
+ destfile = "%s/psplash-poky-img.h" % d.getVar('S')
+ localfiles = d.getVar('SPLASH_LOCALPATHS').split()
+ outputfiles = d.getVar('SPLASH_INSTALL').split()
for localfile, outputfile in zip(localfiles, outputfiles):
if localfile.endswith(".png"):
- outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, os.path.join(workdir, localfile)))
- print(outp[1])
+ if subprocess.call([ convertscript, os.path.join(workdir, localfile), 'POKY' ], cwd=workdir):
+ bb.fatal("Error calling convert script '%s'" % (convertscript))
fbase = os.path.splitext(localfile)[0]
- shutil.copyfile("%s-img.h" % fbase, destfile)
+ shutil.copyfile(os.path.join(workdir, "%s-img.h" % fbase), destfile)
else:
shutil.copyfile(os.path.join(workdir, localfile), destfile)
# For some reason just updating the header is not enough, we have to touch the .c
# file in order to get it to rebuild
- os.utime("%s/psplash.c" % d.getVar('S', True), None)
+ os.utime("%s/psplash.c" % d.getVar('S'), None)
bb.build.exec_func("oe_runmake", d)
shutil.copyfile("psplash", outputfile)
}
do_install_append() {
- install -d ${D}/mnt/.psplash/
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh
install -d ${D}${bindir}
@@ -105,12 +106,10 @@ do_install_append() {
rm -f ${D}${bindir}/psplash
}
-FILES_${PN} += "/mnt/.psplash"
-
INITSCRIPT_NAME = "psplash.sh"
INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
-DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
pkg_postinst_${PN} () {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
if [ -n "$D" ]; then
diff --git a/meta/recipes-core/readline/files/config-dirent-symbols.patch b/meta/recipes-core/readline/files/config-dirent-symbols.patch
deleted file mode 100644
index cfff03c0f8..0000000000
--- a/meta/recipes-core/readline/files/config-dirent-symbols.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Fix the names of the STRUCT_DIRENT_D symbols to match the names used by both
-configure and the source code.
-
-Upstream-Status: Submitted (http://lists.gnu.org/archive/html/bug-readline/2014-05/msg00008.html)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From e48656811550774892fd4e0f4b3c7d418422da52 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 27 May 2014 22:32:31 +0100
-Subject: [PATCH] config.h.in: fix names of STRUCT_DIRENT_D symbols
-
----
- config.h.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/config.h.in b/config.h.in
-index a67e43e..a42acc5 100644
---- a/config.h.in
-+++ b/config.h.in
-@@ -244,9 +244,9 @@
-
- #undef HAVE_GETPW_DECLS
-
--#undef STRUCT_DIRENT_HAS_D_INO
-+#undef HAVE_STRUCT_DIRENT_D_INO
-
--#undef STRUCT_DIRENT_HAS_D_FILENO
-+#undef HAVE_STRUCT_DIRENT_D_FILENO
-
- #undef HAVE_BSD_SIGNALS
-
---
-1.7.10.4
-
diff --git a/meta/recipes-core/readline/readline-5.2/configure-fix.patch b/meta/recipes-core/readline/readline-5.2/configure-fix.patch
deleted file mode 100644
index be60a9861e..0000000000
--- a/meta/recipes-core/readline/readline-5.2/configure-fix.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Pending
-
-Without this it fails to link against libtermcap causing various missing symbols
-issues.
-
-RP - 8/10/08
-
-Index: readline-5.2/configure.in
-===================================================================
---- readline-5.2.orig/configure.in 2008-10-08 09:58:52.000000000 +0100
-+++ readline-5.2/configure.in 2008-10-08 09:59:03.000000000 +0100
-@@ -211,10 +211,10 @@
- AC_MSG_CHECKING(configuration for building shared libraries)
- eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
-
--# case "$SHLIB_LIBS" in
--# *curses*|*termcap*|*termlib*) ;;
--# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
--# esac
-+ case "$SHLIB_LIBS" in
-+ *curses*|*termcap*|*termlib*) ;;
-+ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
-+ esac
-
- AC_SUBST(SHOBJ_CC)
- AC_SUBST(SHOBJ_CFLAGS)
diff --git a/meta/recipes-core/readline/readline-5.2/fix-redundant-rpath.patch b/meta/recipes-core/readline/readline-5.2/fix-redundant-rpath.patch
deleted file mode 100644
index 3166b470f2..0000000000
--- a/meta/recipes-core/readline/readline-5.2/fix-redundant-rpath.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-This support script ends up hardcoding unnecessary rpaths into the libraries. We
-will search $libdir automatically so this is just wastes space. There may be some
-cases this is necessary but our use cases aren't one of them.
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: readline-5.2/support/shobj-conf
-===================================================================
---- readline-5.2.orig/support/shobj-conf
-+++ readline-5.2/support/shobj-conf
-@@ -110,7 +110,7 @@ linux*-*|gnu*-*|k*bsd*-gnu-*)
- SHOBJ_LD='${CC}'
- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
-
-- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
-+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
- SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
- ;;
-
diff --git a/meta/recipes-core/readline/readline-6.3/configure-fix.patch b/meta/recipes-core/readline/readline-8.0/configure-fix.patch
index ef3104f8a6..ef3104f8a6 100644
--- a/meta/recipes-core/readline/readline-6.3/configure-fix.patch
+++ b/meta/recipes-core/readline/readline-8.0/configure-fix.patch
diff --git a/meta/recipes-core/readline/readline-6.3/norpath.patch b/meta/recipes-core/readline/readline-8.0/norpath.patch
index 5d71582b70..5d71582b70 100644
--- a/meta/recipes-core/readline/readline-6.3/norpath.patch
+++ b/meta/recipes-core/readline/readline-8.0/norpath.patch
diff --git a/meta/recipes-core/readline/readline-8.0/rl-native.map b/meta/recipes-core/readline/readline-8.0/rl-native.map
new file mode 100644
index 0000000000..5e7d49cdd2
--- /dev/null
+++ b/meta/recipes-core/readline/readline-8.0/rl-native.map
@@ -0,0 +1,12 @@
+READLINE_6.3 {
+ rl_change_environment;
+ rl_clear_history;
+ rl_executing_key;
+ rl_executing_keyseq;
+ rl_filename_stat_hook;
+ rl_history_substr_search_backward;
+ rl_history_substr_search_forward;
+ rl_input_available_hook;
+ rl_print_last_kbd_macro;
+ rl_signal_event_hook;
+};
diff --git a/meta/recipes-core/readline/readline.inc b/meta/recipes-core/readline/readline.inc
index 1a0a1558df..07f54a76f1 100644
--- a/meta/recipes-core/readline/readline.inc
+++ b/meta/recipes-core/readline/readline.inc
@@ -4,6 +4,7 @@ command lines as they are typed in. Both Emacs and vi editing modes are availabl
additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
lines, and perform csh-like history expansion on previous commands."
SECTION = "libs"
+HOMEPAGE = "https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
# GPLv2+ (< 6.0), GPLv3+ (>= 6.0)
LICENSE = "GPLv3+"
@@ -42,3 +43,8 @@ do_install_append () {
BBCLASSEXTEND = "native nativesdk"
CONFFILES_${PN} += "${sysconfdir}/inputrc"
+
+# OpenSuse injects versions into libreadline leading to conficits between our native one and theirs
+# see their spec file for where this is injected. Extra versioning is harmless so we just do the same.
+SRC_URI_append_class-native = " file://rl-native.map"
+LDFLAGS_append_class-native = " -Wl,--version-script=${WORKDIR}/rl-native.map" \ No newline at end of file
diff --git a/meta/recipes-core/readline/readline_5.2.bb b/meta/recipes-core/readline/readline_5.2.bb
deleted file mode 100644
index c1007a2311..0000000000
--- a/meta/recipes-core/readline/readline_5.2.bb
+++ /dev/null
@@ -1,84 +0,0 @@
-SUMMARY = "Library for editing typed command lines"
-DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \
-command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \
-additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
-lines, and perform csh-like history expansion on previous commands."
-SECTION = "libs"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=03b36fdd84f74b8d8189a202b980b67f"
-
-DEPENDS += "ncurses"
-
-PR = "r9"
-
-SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-001;name=patch1;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-002;name=patch2;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-003;name=patch3;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-004;name=patch4;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-005;name=patch5;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-006;name=patch6;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-007;name=patch7;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-008;name=patch8;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-009;name=patch9;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-010;name=patch10;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-011;name=patch11;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-012;name=patch12;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-013;name=patch13;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-014;name=patch14;apply=yes;striplevel=0 \
- file://configure-fix.patch \
- file://config-dirent-symbols.patch \
- file://fix-redundant-rpath.patch"
-
-SRC_URI[archive.md5sum] = "e39331f32ad14009b9ff49cc10c5e751"
-SRC_URI[archive.sha256sum] = "12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45"
-
-SRC_URI[patch1.md5sum] = "9d4d41622aa9b230c57f68548ce87d8f"
-SRC_URI[patch1.sha256sum] = "eac304c369154059f93049ada328739faaf40338d3cb1fb4b544c93d5ce3f8d5"
-SRC_URI[patch2.md5sum] = "f03e512d14206e37f7d6a748b56b9476"
-SRC_URI[patch2.sha256sum] = "9deacaef25507a0c2ae0b661bf9342559b59a2954d66ea3c5f5bcd900fdfcf78"
-SRC_URI[patch3.md5sum] = "252b42d8750f1a94b6bdf086612dceb2"
-SRC_URI[patch3.sha256sum] = "2a55d2ecb1c9b0147aeb193a6323616ab31c1c525a83b2db3a994b15594ba934"
-SRC_URI[patch4.md5sum] = "a32333c2e603a3ed250514e91050e552"
-SRC_URI[patch4.sha256sum] = "a03b65633781efa7c3aae5d57162985e7b7a3c10acf0f2621be610e16f27e5f2"
-SRC_URI[patch5.md5sum] = "8106796c09b789523a3a78ab69c04b6d"
-SRC_URI[patch5.sha256sum] = "06001896514148a757ea6edbbd40c4fc4331dc653847244386c37b138b150f64"
-SRC_URI[patch6.md5sum] = "512188e2bf0837f7eca19dbf71f182ae"
-SRC_URI[patch6.sha256sum] = "dfef3e982c0adf8bb5a9b7d0468ec8f5f18138b325e28759437464de5be71013"
-SRC_URI[patch7.md5sum] = "ac17aca62eb6fb398c9f2fe9de540aff"
-SRC_URI[patch7.sha256sum] = "775b028c7b761397ac6ae1bdfbac7e896dc3b9b3adc2f91312499180ca13bdd1"
-SRC_URI[patch8.md5sum] = "2484c392db021905f112cf97a94dfd4c"
-SRC_URI[patch8.sha256sum] = "a21b4e0bf0530b878bad24d5be23d18a9e03a75a31ae30844dc0933bb3d77ecd"
-SRC_URI[patch9.md5sum] = "fc6eb35d07914fae5c57d49c12483ff7"
-SRC_URI[patch9.sha256sum] = "138d5e0f0709a47a2d1621295a3dd5e3cc73b63b5cc28dab03abc4e94fe95ecf"
-SRC_URI[patch10.md5sum] = "7a2bf3dc7ac7680b1461a5701100e91b"
-SRC_URI[patch10.sha256sum] = "83f8c1aadb86b1a2fad8821a9c6be72a8de5afd7fd9fde58a30b3b57d939693e"
-SRC_URI[patch11.md5sum] = "ef6cef6822663470f6ac8c517c5a7ec6"
-SRC_URI[patch11.sha256sum] = "08ad3384ab0906e6fa4cc417eb8c43ff59375bcead15fd5c8e31730f0413b3d6"
-SRC_URI[patch12.md5sum] = "e3e9f441c8111589855bc363e5640f6c"
-SRC_URI[patch12.sha256sum] = "20f0243be2299c23213492cc2c19cfd15cc528d2b566a76a2de58306bb9e4c9e"
-SRC_URI[patch13.md5sum] = "3e2e5f543ed268a68fd1fa839faade1a"
-SRC_URI[patch13.sha256sum] = "0cc649516a5bdfa61c5e56937407570288b6972d75aa1bd060ad30ebe98144d5"
-SRC_URI[patch14.md5sum] = "a1be30e1c6f1099bb5fcef00a2631fb8"
-SRC_URI[patch14.sha256sum] = "6f1a68320d01522ca1ea5a737124ecc8739f3dcbfea2dee21e3ccf839a21a817"
-
-inherit autotools
-
-EXTRA_AUTORECONF += "--exclude=autoheader"
-
-LEAD_SONAME = "libreadline.so"
-
-do_configure_prepend () {
- if [ ! -e ${S}/acinclude.m4 ]; then
- cat ${S}/aclocal.m4 > ${S}/acinclude.m4
- fi
-}
-
-do_install_append () {
- # Make install doesn't properly install these
- oe_libinstall -so -C shlib libhistory ${D}${libdir}
- oe_libinstall -so -C shlib libreadline ${D}${libdir}
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/readline/readline_6.3.bb b/meta/recipes-core/readline/readline_6.3.bb
deleted file mode 100644
index 8ec7c4ada0..0000000000
--- a/meta/recipes-core/readline/readline_6.3.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-require readline.inc
-
-SRC_URI += "${GNU_MIRROR}/readline/readline-6.3-patches/readline63-001;name=patch1;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-002;name=patch2;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-003;name=patch3;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-004;name=patch4;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-005;name=patch5;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-006;name=patch6;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-007;name=patch7;apply=yes;striplevel=0 \
- ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-008;name=patch8;apply=yes;striplevel=0 \
- file://configure-fix.patch \
- file://config-dirent-symbols.patch \
- file://norpath.patch"
-
-SRC_URI[archive.md5sum] = "33c8fb279e981274f485fd91da77e94a"
-SRC_URI[archive.sha256sum] = "56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43"
-
-SRC_URI[patch1.md5sum] = "4343f5ea9b0f42447f102fb61576b398"
-SRC_URI[patch1.sha256sum] = "1a79bbb6eaee750e0d6f7f3d059b30a45fc54e8e388a8e05e9c3ae598590146f"
-SRC_URI[patch2.md5sum] = "700295212f7e2978577feaee584afddb"
-SRC_URI[patch2.sha256sum] = "39e304c7a526888f9e112e733848215736fb7b9d540729b9e31f3347b7a1e0a5"
-SRC_URI[patch3.md5sum] = "af4963862f5156fbf9111c2c6fa86ed7"
-SRC_URI[patch3.sha256sum] = "ec41bdd8b00fd884e847708513df41d51b1243cecb680189e31b7173d01ca52f"
-SRC_URI[patch4.md5sum] = "11f9def89803a5052db3ba72394ce14f"
-SRC_URI[patch4.sha256sum] = "4547b906fb2570866c21887807de5dee19838a60a1afb66385b272155e4355cc"
-SRC_URI[patch5.md5sum] = "93721c31cd225393f80cb3aadb165544"
-SRC_URI[patch5.sha256sum] = "877788f9228d1a9907a4bcfe3d6dd0439c08d728949458b41208d9bf9060274b"
-SRC_URI[patch6.md5sum] = "71dc6ecce66d1489b96595f55d142a52"
-SRC_URI[patch6.sha256sum] = "5c237ab3c6c97c23cf52b2a118adc265b7fb411b57c93a5f7c221d50fafbe556"
-SRC_URI[patch7.md5sum] = "062a08ed60679d3c4878710b3d595b65"
-SRC_URI[patch7.sha256sum] = "4d79b5a2adec3c2e8114cbd3d63c1771f7c6cf64035368624903d257014f5bea"
-SRC_URI[patch8.md5sum] = "ee1c04072154826870848d8b218d7b04"
-SRC_URI[patch8.sha256sum] = "3bc093cf526ceac23eb80256b0ec87fa1735540d659742107b6284d635c43787"
-
diff --git a/meta/recipes-core/readline/readline_8.0.bb b/meta/recipes-core/readline/readline_8.0.bb
new file mode 100644
index 0000000000..99d022a32f
--- /dev/null
+++ b/meta/recipes-core/readline/readline_8.0.bb
@@ -0,0 +1,7 @@
+require readline.inc
+
+SRC_URI += "file://configure-fix.patch \
+ file://norpath.patch"
+
+SRC_URI[archive.md5sum] = "7e6c1f16aee3244a69aba6e438295ca3"
+SRC_URI[archive.sha256sum] = "e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461"
diff --git a/meta/recipes-core/systemd/systemd-boot_243.bb b/meta/recipes-core/systemd/systemd-boot_243.bb
new file mode 100644
index 0000000000..515abc289b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-boot_243.bb
@@ -0,0 +1,70 @@
+require systemd.inc
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
+
+require conf/image-uefi.conf
+
+DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
+
+# NOTE: These three patches are in theory not needed, but we haven't
+# figured out how to correctly pass efi-cc parameter if it's an array.
+SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \
+ file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \
+ file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
+ file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch \
+ "
+
+inherit meson pkgconfig gettext
+inherit deploy
+
+EFI_CC ?= "${CC}"
+EXTRA_OEMESON += "-Defi=true \
+ -Dgnu-efi=true \
+ -Defi-includedir=${STAGING_INCDIR}/efi \
+ -Defi-ldsdir=${STAGING_LIBDIR} \
+ -Defi-libdir=${STAGING_LIBDIR} \
+ -Dman=false \
+ -Defi-cc='${EFI_CC}' \
+ -Defi-ld='${LD}' \
+ -Defi-objcopy='${OBJCOPY}' \
+ "
+
+# install to the image as boot*.efi if its the EFI_PROVIDER,
+# otherwise install as the full name.
+# This allows multiple bootloaders to coexist in a single image.
+python __anonymous () {
+ import re
+ target = d.getVar('TARGET_ARCH')
+ prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-"
+ systemdimage = prefix + d.getVar("EFI_BOOT_IMAGE")
+ d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
+ prefix = "systemd-" if prefix == "" else ""
+ d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
+}
+
+FILES_${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
+
+RDEPENDS_${PN} += "virtual/systemd-bootconf"
+
+# Imported from the old gummiboot recipe
+TUNE_CCARGS_remove = "-mfpmath=sse"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+COMPATIBLE_HOST_x86-x32 = "null"
+
+do_compile() {
+ SYSTEMD_BOOT_EFI_ARCH="ia32"
+ if [ "${TARGET_ARCH}" = "x86_64" ]; then
+ SYSTEMD_BOOT_EFI_ARCH="x64"
+ fi
+
+ ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
+}
+
+do_install() {
+ install -d ${D}${EFI_FILES_PATH}
+ install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}
+}
+
+do_deploy () {
+ install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR}
+}
+addtask deploy before do_build after do_compile
diff --git a/meta/recipes-core/systemd/systemd-bootconf_1.00.bb b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
new file mode 100644
index 0000000000..d13b8c518f
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
@@ -0,0 +1,32 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic systemd-boot configuration files"
+
+RPROVIDES_${PN} += "virtual/systemd-bootconf"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit systemd-boot-cfg
+
+S = "${WORKDIR}"
+
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+APPEND_append = " ${ROOT}"
+
+python do_configure() {
+ bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND"
+
+do_install() {
+ install -d ${D}/boot
+ install -d ${D}/boot/loader
+ install -d ${D}/boot/loader/entries
+ install loader.conf ${D}/boot/loader/
+ rm loader.conf
+ install *.conf ${D}/boot/loader/entries/
+}
+
+FILES_${PN} = "/boot/loader/* /boot/loader/entries/*"
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index 421fc06dfb..faa428b589 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -1,15 +1,14 @@
SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
-
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
PR = "r29"
-DEPENDS = "systemd-systemctl-native"
+PACKAGE_WRITE_DEPS += "systemd-systemctl-native"
S = "${WORKDIR}"
-inherit distro_features_check
+inherit features_check
ALLOW_EMPTY_${PN} = "1"
diff --git a/meta/recipes-core/systemd/systemd-conf/journald.conf b/meta/recipes-core/systemd/systemd-conf/journald.conf
new file mode 100644
index 0000000000..fd4d969fa7
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf/journald.conf
@@ -0,0 +1,3 @@
+[Journal]
+ForwardToSyslog=yes
+RuntimeMaxUse=64M
diff --git a/meta/recipes-core/systemd/systemd-conf/logind.conf b/meta/recipes-core/systemd/systemd-conf/logind.conf
new file mode 100644
index 0000000000..bf7f6920fa
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf/logind.conf
@@ -0,0 +1,2 @@
+[Login]
+KillUserProcesses=yes
diff --git a/meta/recipes-core/systemd/systemd-conf/system.conf b/meta/recipes-core/systemd/systemd-conf/system.conf
new file mode 100644
index 0000000000..554cab26c2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf/system.conf
@@ -0,0 +1,2 @@
+[Manager]
+DefaultMemoryAccounting=yes
diff --git a/meta/recipes-core/systemd/systemd-conf/system.conf-qemuall b/meta/recipes-core/systemd/systemd-conf/system.conf-qemuall
new file mode 100644
index 0000000000..741be27cb4
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf/system.conf-qemuall
@@ -0,0 +1,3 @@
+[Manager]
+# Change DefaultTimeoutStartSec from 90s to 240s
+DefaultTimeoutStartSec = 240s
diff --git a/meta/recipes-core/systemd/systemd-conf/wired.network b/meta/recipes-core/systemd/systemd-conf/wired.network
new file mode 100644
index 0000000000..ff807ba31f
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf/wired.network
@@ -0,0 +1,10 @@
+[Match]
+Name=en* eth*
+KernelCommandLine=!nfsroot
+
+[Network]
+DHCP=yes
+
+[DHCP]
+RouteMetric=10
+ClientIdentifier=mac
diff --git a/meta/recipes-core/systemd/systemd-conf_243.bb b/meta/recipes-core/systemd/systemd-conf_243.bb
new file mode 100644
index 0000000000..d9ec023bfd
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf_243.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Systemd system configuration"
+DESCRIPTION = "Systemd may require slightly different configuration for \
+different machines. For example, qemu machines require a longer \
+DefaultTimeoutStartSec setting."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "\
+ file://journald.conf \
+ file://logind.conf \
+ file://system.conf \
+ file://system.conf-qemuall \
+ file://wired.network \
+"
+
+do_install() {
+ install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf
+ install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf
+ install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf
+ install -D -m0644 ${WORKDIR}/wired.network ${D}${systemd_unitdir}/network/80-wired.network
+}
+
+# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
+do_install_append_qemuall() {
+ install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
+
+ # Do not install wired.network for qemu bsps
+ rm -rf ${D}${systemd_unitdir}/network
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} = "\
+ ${systemd_unitdir}/journald.conf.d/ \
+ ${systemd_unitdir}/logind.conf.d/ \
+ ${systemd_unitdir}/system.conf.d/ \
+ ${systemd_unitdir}/network/ \
+"
diff --git a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
new file mode 100644
index 0000000000..02756f43d7
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Machine specific systemd units"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+PR = "r19"
+
+inherit systemd
+SYSTEMD_SERVICE_${PN} = ""
+
+ALLOW_EMPTY_${PN} = "1"
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
index 768b1308f2..044c6c5b67 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -1,15 +1,20 @@
SUMMARY = "Serial terminal support for systemd"
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/systemd/"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
PR = "r5"
-SERIAL_CONSOLE ?= "115200 ttyS0"
+SERIAL_CONSOLES ?= "115200;ttyS0"
SRC_URI = "file://serial-getty@.service"
S = "${WORKDIR}"
+# As this package is tied to systemd, only build it when we're also building systemd.
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
do_install() {
if [ ! -z "${SERIAL_CONSOLES}" ] ; then
default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'`
@@ -38,14 +43,8 @@ do_install() {
fi
}
-RDEPENDS_${PN} = "systemd"
-
# This is a machine specific file
FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# As this package is tied to systemd, only build it when we're also building systemd.
-python () {
- if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-}
+ALLOW_EMPTY_${PN} = "1"
diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index e8b027e97d..15af16a9f8 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -9,7 +9,8 @@
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
-BindsTo=dev-%i.device
+PartOf=dev-%i.device
+ConditionPathExists=/dev/%i
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb
index fbdc9c0a18..fadc8433d8 100644
--- a/meta/recipes-core/systemd/systemd-systemctl-native.bb
+++ b/meta/recipes-core/systemd/systemd-systemctl-native.bb
@@ -1,7 +1,7 @@
SUMMARY = "Wrapper for enabling systemd services"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PR = "r6"
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index efad14ce17..990de1ab39 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -1,195 +1,321 @@
-#!/bin/sh
-echo "Started $0 $*"
-
-ROOT=
-
-# parse command line params
-action=
-while [ $# != 0 ]; do
- opt="$1"
-
- case "$opt" in
- enable)
- shift
-
- action="$opt"
- services="$1"
- cmd_args="1"
- shift
- ;;
- disable)
- shift
-
- action="$opt"
- services="$1"
- cmd_args="1"
- shift
- ;;
- mask)
- shift
-
- action="$opt"
- services="$1"
- cmd_args="1"
- shift
- ;;
- preset)
- shift
-
- action="$opt"
- services="$1"
- cmd_args="1"
- shift
- ;;
- --root=*)
- ROOT=${opt##--root=}
- cmd_args="0"
- shift
- ;;
- *)
- if [ "$cmd_args" = "1" ]; then
- services="$services $opt"
- shift
- else
- echo "'$opt' is an unkown option; exiting with error"
- exit 1
- fi
- ;;
- esac
-done
-if [ "$action" = "preset" -a "$service_file" = "" ]; then
- services=$(for f in `find $ROOT/etc/systemd/system $ROOT/lib/systemd/system $ROOT/usr/lib/systemd/system -type f 2>1`; do basename $f; done)
- services="$services $opt"
- presetall=1
-fi
-
-for service in $services; do
- if [ "$presetall" = "1" ]; then
- action="preset"
- fi
- if [ "$action" = "mask" ]; then
- if [ ! -d $ROOT/etc/systemd/system/ ]; then
- mkdir -p $ROOT/etc/systemd/system/
- fi
- cmd="ln -s /dev/null $ROOT/etc/systemd/system/$service"
- echo "$cmd"
- $cmd
- exit 0
- fi
-
- service_base_file=`echo $service | sed 's/\(@\).*\(\.[^.]\+\)/\1\2/'`
- if [ -z `echo $service | sed '/@/p;d'` ]; then
- echo "Try to find location of $service..."
- service_template=false
- else
- echo "Try to find location of template $service_base_file of instance $service..."
- service_template=true
- if [ -z `echo $service | sed 's/^.\+@\(.*\)\.[^.]\+/\1/'` ]; then
- instance_specified=false
- else
- instance_specified=true
- fi
- fi
-
- # find service file
- for p in $ROOT/etc/systemd/system \
- $ROOT/lib/systemd/system \
- $ROOT/usr/lib/systemd/system; do
- if [ -e $p/$service_base_file ]; then
- service_file=$p/$service_base_file
- service_file=${service_file##$ROOT}
- fi
- done
- if [ -z "$service_file" ]; then
- echo "'$service_base_file' couldn't be found; exiting with error"
- exit 1
- fi
- echo "Found $service in $service_file"
-
- # If any new unit types are added to systemd they should be added
- # to this regular expression.
- unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|path\|timer\|snapshot\)\s*$'
- if [ "$action" = "preset" ]; then
- action=`egrep -sh $service $ROOT/etc/systemd/user-preset/*.preset | cut -f1 -d' '`
- if [ -z "$action" ]; then
- globalpreset=`egrep -sh '\*' $ROOT/etc/systemd/user-preset/*.preset | cut -f1 -d' '`
- if [ -n "$globalpreset" ]; then
- action="$globalpreset"
- else
- action="enable"
- fi
- fi
- fi
- # create the required symbolic links
- wanted_by=$(sed '/^WantedBy[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
- | tr ',' '\n' \
- | grep "$unit_types_re")
-
- required_by=$(sed '/^RequiredBy[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
- | tr ',' '\n' \
- | grep "$unit_types_re")
-
- for dependency in WantedBy RequiredBy; do
- if [ "$dependency" = "WantedBy" ]; then
- suffix="wants"
- dependency_list="$wanted_by"
- elif [ "$dependency" = "RequiredBy" ]; then
- suffix="requires"
- dependency_list="$required_by"
- fi
- for r in $dependency_list; do
- echo "$dependency=$r found in $service"
- if [ "$action" = "enable" ]; then
- enable_service=$service
- if [ "$service_template" = true -a "$instance_specified" = false ]; then
- default_instance=$(sed '/^DefaultInstance[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file")
- if [ -z $default_instance ]; then
- echo "Template unit without instance or DefaultInstance directive, nothing to enable"
- continue
- else
- echo "Found DefaultInstance $default_instance, enabling it"
- enable_service=$(echo $service | sed "s/@/@$(echo $default_instance | sed 's/\\/\\\\/g')/")
- fi
- fi
- mkdir -p $ROOT/etc/systemd/system/$r.$suffix
- ln -s $service_file $ROOT/etc/systemd/system/$r.$suffix/$enable_service
- echo "Enabled $enable_service for $r."
- else
- if [ "$service_template" = true -a "$instance_specified" = false ]; then
- disable_service="$ROOT/etc/systemd/system/$r.$suffix/`echo $service | sed 's/@/@*/'`"
- else
- disable_service="$ROOT/etc/systemd/system/$r.$suffix/$service"
- fi
- rm -f $disable_service
- [ -d $ROOT/etc/systemd/system/$r.$suffix ] && rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.$suffix
- echo "Disabled ${disable_service##$ROOT/etc/systemd/system/$r.$suffix/} for $r."
- fi
- done
- done
-
- # create the required symbolic 'Alias' links
- alias=$(sed '/^Alias[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
- | tr ',' '\n' \
- | grep "$unit_types_re")
-
- for r in $alias; do
- if [ "$action" = "enable" ]; then
- mkdir -p $ROOT/etc/systemd/system
- ln -s $service_file $ROOT/etc/systemd/system/$r
- echo "Enabled $service for $alias."
- else
- rm -f $ROOT/etc/systemd/system/$r
- echo "Disabled $service for $alias."
- fi
- done
-
- # call us for the other required scripts
- also=$(sed '/^Also[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
- | tr ',' '\n')
- for a in $also; do
- echo "Also=$a found in $service"
- if [ "$action" = "enable" ]; then
- $0 --root=$ROOT enable $a
- fi
- done
-done
+#!/usr/bin/env python3
+"""systemctl: subset of systemctl used for image construction
+
+Mask/preset systemd units
+"""
+
+import argparse
+import fnmatch
+import os
+import re
+import sys
+
+from collections import namedtuple
+from pathlib import Path
+
+version = 1.0
+
+ROOT = Path("/")
+SYSCONFDIR = Path("etc")
+BASE_LIBDIR = Path("lib")
+LIBDIR = Path("usr", "lib")
+
+locations = list()
+
+
+class SystemdFile():
+ """Class representing a single systemd configuration file"""
+ def __init__(self, root, path):
+ self.sections = dict()
+ self._parse(root, path)
+ dirname = os.path.basename(path.name) + ".d"
+ for location in locations:
+ for path2 in sorted((root / location / "system" / dirname).glob("*.conf")):
+ self._parse(root, path2)
+
+ def _parse(self, root, path):
+ """Parse a systemd syntax configuration file
+
+ Args:
+ path: A pathlib.Path object pointing to the file
+
+ """
+ skip_re = re.compile(r"^\s*([#;]|$)")
+ section_re = re.compile(r"^\s*\[(?P<section>.*)\]")
+ kv_re = re.compile(r"^\s*(?P<key>[^\s]+)\s*=\s*(?P<value>.*)")
+ section = None
+
+ if path.is_symlink():
+ try:
+ path.resolve()
+ except FileNotFoundError:
+ # broken symlink, try relative to root
+ path = root / Path(os.readlink(str(path))).relative_to(ROOT)
+
+ with path.open() as f:
+ for line in f:
+ if skip_re.match(line):
+ continue
+
+ line = line.strip()
+ m = section_re.match(line)
+ if m:
+ if m.group('section') not in self.sections:
+ section = dict()
+ self.sections[m.group('section')] = section
+ else:
+ section = self.sections[m.group('section')]
+ continue
+
+ while line.endswith("\\"):
+ line += f.readline().rstrip("\n")
+
+ m = kv_re.match(line)
+ k = m.group('key')
+ v = m.group('value')
+ if k not in section:
+ section[k] = list()
+ section[k].extend(v.split())
+
+ def get(self, section, prop):
+ """Get a property from section
+
+ Args:
+ section: Section to retrieve property from
+ prop: Property to retrieve
+
+ Returns:
+ List representing all properties of type prop in section.
+
+ Raises:
+ KeyError: if ``section`` or ``prop`` not found
+ """
+ return self.sections[section][prop]
+
+
+class Presets():
+ """Class representing all systemd presets"""
+ def __init__(self, scope, root):
+ self.directives = list()
+ self._collect_presets(scope, root)
+
+ def _parse_presets(self, presets):
+ """Parse presets out of a set of preset files"""
+ skip_re = re.compile(r"^\s*([#;]|$)")
+ directive_re = re.compile(r"^\s*(?P<action>enable|disable)\s+(?P<unit_name>(.+))")
+
+ Directive = namedtuple("Directive", "action unit_name")
+ for preset in presets:
+ with preset.open() as f:
+ for line in f:
+ m = directive_re.match(line)
+ if m:
+ directive = Directive(action=m.group('action'),
+ unit_name=m.group('unit_name'))
+ self.directives.append(directive)
+ elif skip_re.match(line):
+ pass
+ else:
+ sys.exit("Unparsed preset line in {}".format(preset))
+
+ def _collect_presets(self, scope, root):
+ """Collect list of preset files"""
+ presets = dict()
+ for location in locations:
+ paths = (root / location / scope).glob("*.preset")
+ for path in paths:
+ # earlier names override later ones
+ if path.name not in presets:
+ presets[path.name] = path
+
+ self._parse_presets([v for k, v in sorted(presets.items())])
+
+ def state(self, unit_name):
+ """Return state of preset for unit_name
+
+ Args:
+ presets: set of presets
+ unit_name: name of the unit
+
+ Returns:
+ None: no matching preset
+ `enable`: unit_name is enabled
+ `disable`: unit_name is disabled
+ """
+ for directive in self.directives:
+ if fnmatch.fnmatch(unit_name, directive.unit_name):
+ return directive.action
+
+ return None
+
+
+def add_link(path, target):
+ try:
+ path.parent.mkdir(parents=True)
+ except FileExistsError:
+ pass
+ if not path.is_symlink():
+ print("ln -s {} {}".format(target, path))
+ path.symlink_to(target)
+
+
+class SystemdUnitNotFoundError(Exception):
+ pass
+
+
+class SystemdUnit():
+ def __init__(self, root, unit):
+ self.root = root
+ self.unit = unit
+ self.config = None
+
+ def _path_for_unit(self, unit):
+ for location in locations:
+ path = self.root / location / "system" / unit
+ if path.exists() or path.is_symlink():
+ return path
+
+ raise SystemdUnitNotFoundError(self.root, unit)
+
+ def _process_deps(self, config, service, location, prop, dirstem):
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+
+ target = ROOT / location.relative_to(self.root)
+ try:
+ for dependent in config.get('Install', prop):
+ wants = systemdir / "{}.{}".format(dependent, dirstem) / service
+ add_link(wants, target)
+
+ except KeyError:
+ pass
+
+ def enable(self):
+ # if we're enabling an instance, first extract the actual instance
+ # then figure out what the template unit is
+ template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit)
+ if template:
+ instance = template.group('instance')
+ unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1)
+ else:
+ instance = None
+ unit = self.unit
+
+ path = self._path_for_unit(unit)
+
+ if path.is_symlink():
+ # ignore aliases
+ return
+
+ config = SystemdFile(self.root, path)
+ if instance == "":
+ try:
+ default_instance = config.get('Install', 'DefaultInstance')[0]
+ except KeyError:
+ # no default instance, so nothing to enable
+ return
+
+ service = self.unit.replace("@.",
+ "@{}.".format(default_instance))
+ else:
+ service = self.unit
+
+ self._process_deps(config, service, path, 'WantedBy', 'wants')
+ self._process_deps(config, service, path, 'RequiredBy', 'requires')
+
+ try:
+ for also in config.get('Install', 'Also'):
+ SystemdUnit(self.root, also).enable()
+
+ except KeyError:
+ pass
+
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+ target = ROOT / path.relative_to(self.root)
+ try:
+ for dest in config.get('Install', 'Alias'):
+ alias = systemdir / dest
+ add_link(alias, target)
+
+ except KeyError:
+ pass
+
+ def mask(self):
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+ add_link(systemdir / self.unit, "/dev/null")
+
+
+def collect_services(root):
+ """Collect list of service files"""
+ services = set()
+ for location in locations:
+ paths = (root / location / "system").glob("*")
+ for path in paths:
+ if path.is_dir():
+ continue
+ services.add(path.name)
+
+ return services
+
+
+def preset_all(root):
+ presets = Presets('system-preset', root)
+ services = collect_services(root)
+
+ for service in services:
+ state = presets.state(service)
+
+ if state == "enable" or state is None:
+ SystemdUnit(root, service).enable()
+
+ # If we populate the systemd links we also create /etc/machine-id, which
+ # allows systemd to boot with the filesystem read-only before generating
+ # a real value and then committing it back.
+ #
+ # For the stateless configuration, where /etc is generated at runtime
+ # (for example on a tmpfs), this script shouldn't run at all and we
+ # allow systemd to completely populate /etc.
+ (root / SYSCONFDIR / "machine-id").touch()
+
+
+def main():
+ if sys.version_info < (3, 4, 0):
+ sys.exit("Python 3.4 or greater is required")
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('command', nargs=1, choices=['enable', 'mask',
+ 'preset-all'])
+ parser.add_argument('service', nargs=argparse.REMAINDER)
+ parser.add_argument('--root')
+ parser.add_argument('--preset-mode',
+ choices=['full', 'enable-only', 'disable-only'],
+ default='full')
+
+ args = parser.parse_args()
+
+ root = Path(args.root) if args.root else ROOT
+
+ locations.append(SYSCONFDIR / "systemd")
+ # Handle the usrmerge case by ignoring /lib when it's a symlink
+ if not (root / BASE_LIBDIR).is_symlink():
+ locations.append(BASE_LIBDIR / "systemd")
+ locations.append(LIBDIR / "systemd")
+
+ command = args.command[0]
+ if command == "mask":
+ for service in args.service:
+ SystemdUnit(root, service).mask()
+ elif command == "enable":
+ for service in args.service:
+ SystemdUnit(root, service).enable()
+ elif command == "preset-all":
+ if len(args.service) != 0:
+ sys.exit("Too many arguments.")
+ if args.preset_mode != "enable-only":
+ sys.exit("Only enable-only is supported as preset-mode.")
+ preset_all(root)
+ else:
+ raise RuntimeError()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index f800f42e97..6965b3b482 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,12 +14,10 @@ LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-SRCREV = "3a74d4fc90cb322a4784a3515bef7118c8f8c5ba"
-
-SRC_URI = "git://github.com/systemd/systemd.git;protocol=git"
-
-PV = "230+git${SRCPV}"
+SRCREV = "fab6f010ac6c3bc93a10868de722d7c8c3622eb9"
+SRCBRANCH = "v243-stable"
+SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
S = "${WORKDIR}/git"
-LDFLAGS_append_libc-uclibc = " -lrt -lssp_nonshared -lssp "
+PV_append = ".2"
diff --git a/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch b/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
new file mode 100644
index 0000000000..e2e19ba068
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
@@ -0,0 +1,62 @@
+From 527413ec243564a89ffaad6368d446de44415970 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 21:42:23 -0800
+Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling
+
+When cross-compiling, efi_cc and efi_ld may take the form of
+'xxx-gcc --sysroot=xxx', and this would cause run_command and
+the alike fail.
+
+Fix to split them to make commands run correctly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/boot/efi/meson.build | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 992a3ba4c..9f9ec4911 100644
+--- a/src/boot/efi/meson.build
++++ b/src/boot/efi/meson.build
+@@ -157,7 +157,7 @@ if have_gnu_efi
+ o_file = custom_target(file + '.o',
+ input : file,
+ output : file + '.o',
+- command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
++ command : efi_cc.split() + ['-c', '@INPUT@', '-o', '@OUTPUT@']
+ + compile_args,
+ depend_files : efi_headers)
+ if (common_sources + systemd_boot_sources).contains(file)
+@@ -168,7 +168,17 @@ if have_gnu_efi
+ endif
+ endforeach
+
+- libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
++ find_libgcc_cmd_all = efi_cc + ' -print-libgcc-file-name'
++ find_libgcc_cmd = find_libgcc_cmd_all.split()[0]
++ find_libgcc_args = []
++ cmd_args_all = find_libgcc_cmd_all.split()
++ foreach arg : cmd_args_all
++ if arg != find_libgcc_cmd
++ find_libgcc_args += arg
++ endif
++ endforeach
++
++ libgcc_file_name = run_command(find_libgcc_cmd, find_libgcc_args).stdout().strip()
+ systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
+ stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
+ no_undefined_symbols = find_program('no-undefined-symbols.sh')
+@@ -179,7 +189,7 @@ if have_gnu_efi
+ tuple[0],
+ input : tuple[2],
+ output : tuple[0],
+- command : [efi_ld, '-o', '@OUTPUT@'] +
++ command : efi_ld.split() + ['-o', '@OUTPUT@'] +
+ efi_ldflags + tuple[2] +
+ ['-lefi', '-lgnuefi', libgcc_file_name])
+
+--
+2.13.0
+
diff --git a/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch b/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
new file mode 100644
index 0000000000..ed14e25bce
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
@@ -0,0 +1,33 @@
+From 0bf530aac152630500939db31f98d933158fdabd Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 26 Feb 2019 14:27:49 +0800
+Subject: [PATCH] Revert "meson: print EFI CC configuration nicely"
+
+This reverts commit c512dfb9ac948ddb1ced0dab07b9dac88b198293.
+
+This patch is here because we haven't figured out how to pass
+parameter to efi-cc if it's an array in systemd-boot recipe.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 70fb218..30df834 100644
+--- a/meson.build
++++ b/meson.build
+@@ -3138,7 +3138,7 @@ if conf.get('ENABLE_EFI') == 1
+ if have_gnu_efi
+ status += [
+ 'EFI machine type: @0@'.format(EFI_MACHINE_TYPE_NAME),
+- 'EFI CC @0@'.format(' '.join(efi_cc)),
++ 'EFI CC @0@'.format(efi_cc),
+ 'EFI lib directory: @0@'.format(efi_libdir),
+ 'EFI lds directory: @0@'.format(efi_ldsdir),
+ 'EFI include directory: @0@'.format(efi_incdir)]
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch b/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
new file mode 100644
index 0000000000..0d2ebf62bd
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
@@ -0,0 +1,77 @@
+From 0030dcbac1a9177ef7a28af209ac67149b899f5f Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 26 Feb 2019 14:17:25 +0800
+Subject: [PATCH] Revert "meson: use an array option for efi-cc"
+
+This reverts commit 595343fb4c99c2679d347ef7c19debfbfed6342e.
+
+This patch is here because we haven't figured out how to pass
+parameter to efi-cc if it's an array in systemd-boot recipe.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson_options.txt | 2 +-
+ src/boot/efi/meson.build | 11 ++++++-----
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 044bb79..3d28bfd 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -292,7 +292,7 @@ option('dbus', type : 'combo', choices : ['auto', 'true', 'false'],
+
+ option('gnu-efi', type : 'combo', choices : ['auto', 'true', 'false'],
+ description : 'gnu-efi support for sd-boot')
+-option('efi-cc', type : 'array',
++option('efi-cc', type : 'string',
+ description : 'the compiler to use for EFI modules')
+ option('efi-ld', type : 'string',
+ description : 'the linker to use for EFI modules')
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 2140151..d8db3a1 100644
+--- a/src/boot/efi/meson.build
++++ b/src/boot/efi/meson.build
+@@ -34,8 +34,8 @@ stub_sources = '''
+
+ if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
+ efi_cc = get_option('efi-cc')
+- if efi_cc.length() == 0
+- efi_cc = cc.cmd_array()
++ if efi_cc == ''
++ efi_cc = ' '.join(cc.cmd_array())
+ endif
+ efi_ld = get_option('efi-ld')
+ if efi_ld == ''
+@@ -57,7 +57,8 @@ if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
+
+ efi_libdir = get_option('efi-libdir')
+ if efi_libdir == ''
+- ret = run_command(efi_cc + ['-print-multi-os-directory'])
++ cmd = 'cd /usr/lib/$(@0@ -print-multi-os-directory) && pwd'.format(efi_cc)
++ ret = run_command('sh', '-c', cmd)
+ if ret.returncode() == 0
+ path = join_paths('/usr/lib', ret.stdout().strip())
+ ret = run_command('realpath', '-e', path)
+@@ -152,7 +153,7 @@ if have_gnu_efi
+ o_file = custom_target(file + '.o',
+ input : file,
+ output : file + '.o',
+- command : efi_cc + ['-c', '@INPUT@', '-o', '@OUTPUT@']
++ command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
+ + compile_args,
+ depend_files : efi_headers)
+ if (common_sources + systemd_boot_sources).contains(file)
+@@ -163,7 +164,7 @@ if have_gnu_efi
+ endif
+ endforeach
+
+- libgcc_file_name = run_command(efi_cc + ['-print-libgcc-file-name']).stdout().strip()
++ libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
+ systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
+ stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
+ no_undefined_symbols = find_program('no-undefined-symbols.sh')
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
new file mode 100644
index 0000000000..73e65ff798
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -0,0 +1,80 @@
+From 98254e4798e79d52ac6b562616cd244120f6e239 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Thu, 21 Feb 2019 16:23:24 +0800
+Subject: [PATCH 1/5] binfmt: Don't install dependency links at install time
+ for the binfmt services
+
+use [Install] blocks so that they get created when the service is enabled
+like a traditional service.
+
+The [Install] blocks were rejected upstream as they don't have a way to
+"enable" it on install without static symlinks which can't be disabled,
+only masked. We however can do that in a postinst.
+
+Upstream-Status: Denied
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ units/meson.build | 6 ++----
+ units/proc-sys-fs-binfmt_misc.automount | 3 +++
+ units/systemd-binfmt.service.in | 4 ++++
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/units/meson.build b/units/meson.build
+index e1ee9f86c3..6bb7771b36 100644
+--- a/units/meson.build
++++ b/units/meson.build
+@@ -46,8 +46,7 @@ units = [
+ ['poweroff.target', '',
+ 'runlevel0.target'],
+ ['printer.target', ''],
+- ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT',
+- 'sysinit.target.wants/'],
++ ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'],
+ ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'],
+ ['reboot.target', '',
+ 'runlevel6.target ctrl-alt-del.target'],
+@@ -130,8 +129,7 @@ in_units = [
+ ['systemd-ask-password-console.service', ''],
+ ['systemd-ask-password-wall.service', ''],
+ ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'],
+- ['systemd-binfmt.service', 'ENABLE_BINFMT',
+- 'sysinit.target.wants/'],
++ ['systemd-binfmt.service', 'ENABLE_BINFMT'],
+ ['systemd-bless-boot.service', 'ENABLE_EFI HAVE_BLKID'],
+ ['systemd-boot-check-no-failures.service', ''],
+ ['systemd-boot-system-token.service', 'ENABLE_EFI',
+diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
+index 30a6bc9918..4231f3b70f 100644
+--- a/units/proc-sys-fs-binfmt_misc.automount
++++ b/units/proc-sys-fs-binfmt_misc.automount
+@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
+
+ [Automount]
+ Where=/proc/sys/fs/binfmt_misc
++
++[Install]
++WantedBy=sysinit.target
+diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
+index e940c7c9ad..6be7f5cc9b 100644
+--- a/units/systemd-binfmt.service.in
++++ b/units/systemd-binfmt.service.in
+@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm
+ Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+ DefaultDependencies=no
+ Conflicts=shutdown.target
++Wants=proc-sys-fs-binfmt_misc.automount
+ After=proc-sys-fs-binfmt_misc.automount
+ Before=sysinit.target shutdown.target
+ ConditionPathIsReadWrite=/proc/sys/
+@@ -28,3 +29,6 @@ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=@rootlibexecdir@/systemd-binfmt
+ TimeoutSec=90s
++
++[Install]
++WantedBy=sysinit.target
diff --git a/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch b/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
deleted file mode 100644
index f7ef7a3219..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3bc4552117879f57522b5972b724729ca993f1ea Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 04:09:19 +0000
-Subject: [PATCH 01/36] core/device.c: Change the default device timeout to 240
- sec.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [Specific case QEMU/AB]
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/core/device.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/device.c b/src/core/device.c
-index d201dc5..340d62a 100644
---- a/src/core/device.c
-+++ b/src/core/device.c
-@@ -112,7 +112,7 @@ static void device_init(Unit *u) {
- * indefinitely for plugged in devices, something which cannot
- * happen for the other units since their operations time out
- * anyway. */
-- u->job_timeout = u->manager->default_timeout_start_usec;
-+ u->job_timeout = (240 * USEC_PER_SEC);
-
- u->ignore_on_isolate = true;
- }
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
new file mode 100644
index 0000000000..2f4daf8665
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
@@ -0,0 +1,413 @@
+From 85e3c3046562ec24fc2f09ebfd08bf9f168091d5 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 1 Mar 2019 15:22:15 +0800
+Subject: [PATCH] do not disable buffer in writing files
+
+Do not disable buffer in writing files, otherwise we get
+failure at boot for musl like below.
+
+ [!!!!!!] Failed to allocate manager object.
+
+And there will be other failures, critical or not critical.
+This is specific to musl.
+
+Upstream-Status: Inappropriate [musl]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[Rebased for v242]
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ src/basic/cgroup-util.c | 14 +++++++-------
+ src/basic/procfs-util.c | 4 ++--
+ src/basic/smack-util.c | 2 +-
+ src/basic/util.c | 2 +-
+ src/binfmt/binfmt.c | 6 +++---
+ src/core/main.c | 4 ++--
+ src/core/smack-setup.c | 8 ++++----
+ src/hibernate-resume/hibernate-resume.c | 2 +-
+ src/libsystemd/sd-device/sd-device.c | 2 +-
+ src/login/logind-dbus.c | 2 +-
+ src/nspawn/nspawn-cgroup.c | 2 +-
+ src/nspawn/nspawn.c | 6 +++---
+ src/shared/sysctl-util.c | 2 +-
+ src/sleep/sleep.c | 10 +++++-----
+ src/udev/udevadm-trigger.c | 2 +-
+ src/udev/udevd.c | 2 +-
+ src/vconsole/vconsole-setup.c | 2 +-
+ 17 files changed, 36 insertions(+), 36 deletions(-)
+
+diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
+index 7b5839ccd6..18f6e8ffc8 100644
+--- a/src/basic/cgroup-util.c
++++ b/src/basic/cgroup-util.c
+@@ -860,7 +860,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
+
+ xsprintf(c, PID_FMT "\n", pid);
+
+- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(fs, c, 0);
+ if (r < 0)
+ return r;
+
+@@ -1142,7 +1142,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
+
+ sc = strstrip(contents);
+ if (isempty(sc)) {
+- r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(fs, agent, 0);
+ if (r < 0)
+ return r;
+ } else if (!path_equal(sc, agent))
+@@ -1160,7 +1160,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
+
+ sc = strstrip(contents);
+ if (streq(sc, "0")) {
+- r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(fs, "1", 0);
+ if (r < 0)
+ return r;
+
+@@ -1187,7 +1187,7 @@ int cg_uninstall_release_agent(const char *controller) {
+ if (r < 0)
+ return r;
+
+- r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(fs, "0", 0);
+ if (r < 0)
+ return r;
+
+@@ -1197,7 +1197,7 @@ int cg_uninstall_release_agent(const char *controller) {
+ if (r < 0)
+ return r;
+
+- r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(fs, "", 0);
+ if (r < 0)
+ return r;
+
+@@ -2053,7 +2053,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
+ if (r < 0)
+ return r;
+
+- return write_string_file(p, value, WRITE_STRING_FILE_DISABLE_BUFFER);
++ return write_string_file(p, value, 0);
+ }
+
+ int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
+@@ -2697,7 +2697,7 @@ int cg_enable_everywhere(
+ return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p);
+ }
+
+- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_stream(f, s, 0);
+ if (r < 0) {
+ log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
+ FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
+diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
+index 42ce53d5aa..57512532a6 100644
+--- a/src/basic/procfs-util.c
++++ b/src/basic/procfs-util.c
+@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) {
+ * decrease it, as threads-max is the much more relevant sysctl. */
+ if (limit > pid_max-1) {
+ sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */
+- r = write_string_file("/proc/sys/kernel/pid_max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/kernel/pid_max", buffer, 0);
+ if (r < 0)
+ return r;
+ }
+
+ sprintf(buffer, "%" PRIu64, limit);
+- r = write_string_file("/proc/sys/kernel/threads-max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/kernel/threads-max", buffer, 0);
+ if (r < 0) {
+ uint64_t threads_max;
+
+diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
+index 123d00e13e..e7ea78f349 100644
+--- a/src/basic/smack-util.c
++++ b/src/basic/smack-util.c
+@@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
+ return 0;
+
+ p = procfs_file_alloca(pid, "attr/current");
+- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(p, label, 0);
+ if (r < 0)
+ return r;
+
+diff --git a/src/basic/util.c b/src/basic/util.c
+index 93d610bc98..97dca64f73 100644
+--- a/src/basic/util.c
++++ b/src/basic/util.c
+@@ -294,7 +294,7 @@ void disable_coredumps(void) {
+ if (detect_container() > 0)
+ return;
+
+- r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", 0);
+ if (r < 0)
+ log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
+ }
+diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
+index aa9d811f2e..8c7f2dae7a 100644
+--- a/src/binfmt/binfmt.c
++++ b/src/binfmt/binfmt.c
+@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) {
+ if (!fn)
+ return log_oom();
+
+- return write_string_file(fn, "-1", WRITE_STRING_FILE_DISABLE_BUFFER);
++ return write_string_file(fn, "-1", 0);
+ }
+
+ static int apply_rule(const char *rule) {
+@@ -56,7 +56,7 @@ static int apply_rule(const char *rule) {
+
+ (void) delete_rule(rule);
+
+- r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to add binary format: %m");
+
+@@ -213,7 +213,7 @@ static int run(int argc, char *argv[]) {
+ }
+
+ /* Flush out all rules */
+- (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER);
++ (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0);
+
+ STRV_FOREACH(f, files) {
+ k = apply_file(*f, true);
+diff --git a/src/core/main.c b/src/core/main.c
+index bcce7178a8..4199cedab9 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -1285,7 +1285,7 @@ static int bump_unix_max_dgram_qlen(void) {
+ if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
+ return 0;
+
+- r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", WRITE_STRING_FILE_DISABLE_BUFFER, "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN);
++ r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", 0, "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN);
+ if (r < 0)
+ return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r,
+ "Failed to bump AF_UNIX datagram queue length, ignoring: %m");
+@@ -1509,7 +1509,7 @@ static void initialize_core_pattern(bool skip_setup) {
+ if (getpid_cached() != 1)
+ return;
+
+- r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern);
+ }
+diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
+index b95e6239d4..fdbdaaaccb 100644
+--- a/src/core/smack-setup.c
++++ b/src/core/smack-setup.c
+@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) {
+ }
+
+ #ifdef SMACK_RUN_LABEL
+- r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to set SMACK label \"" SMACK_RUN_LABEL "\" on self: %m");
+- r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m");
+ r = write_string_file("/sys/fs/smackfs/netlabel",
+- "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER);
++ "0.0.0.0/0 " SMACK_RUN_LABEL, 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m");
+- r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
+ #endif
+diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
+index 17e7cd1a00..87a7667716 100644
+--- a/src/hibernate-resume/hibernate-resume.c
++++ b/src/hibernate-resume/hibernate-resume.c
+@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
+ return EXIT_FAILURE;
+ }
+
+- r = write_string_file("/sys/power/resume", major_minor, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/sys/power/resume", major_minor, 0);
+ if (r < 0) {
+ log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor);
+ return EXIT_FAILURE;
+diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
+index c4a7f2f3d3..bcac758284 100644
+--- a/src/libsystemd/sd-device/sd-device.c
++++ b/src/libsystemd/sd-device/sd-device.c
+@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
+ if (!value)
+ return -ENOMEM;
+
+- r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW);
++ r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW);
+ if (r < 0) {
+ if (r == -ELOOP)
+ return -EINVAL;
+diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
+index 30b9a66334..cc1d577933 100644
+--- a/src/login/logind-dbus.c
++++ b/src/login/logind-dbus.c
+@@ -1325,7 +1325,7 @@ static int trigger_device(Manager *m, sd_device *d) {
+ if (!t)
+ return -ENOMEM;
+
+- (void) write_string_file(t, "change", WRITE_STRING_FILE_DISABLE_BUFFER);
++ (void) write_string_file(t, "change", 0);
+ }
+
+ return 0;
+diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
+index 0462b46413..7c53d41483 100644
+--- a/src/nspawn/nspawn-cgroup.c
++++ b/src/nspawn/nspawn-cgroup.c
+@@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) {
+ fn = strjoina(tree, cgroup, "/cgroup.procs");
+
+ sprintf(pid_string, PID_FMT, pid);
+- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755);
++ r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755);
+ if (r < 0) {
+ log_error_errno(r, "Failed to move process: %m");
+ goto finish;
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index 2aec8041f0..841542f2f3 100644
+--- a/src/nspawn/nspawn.c
++++ b/src/nspawn/nspawn.c
+@@ -2357,7 +2357,7 @@ static int reset_audit_loginuid(void) {
+ if (streq(p, "4294967295"))
+ return 0;
+
+- r = write_string_file("/proc/self/loginuid", "4294967295", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/self/loginuid", "4294967295", 0);
+ if (r < 0) {
+ log_error_errno(r,
+ "Failed to reset audit login UID. This probably means that your kernel is too\n"
+@@ -3566,13 +3566,13 @@ static int setup_uid_map(pid_t pid) {
+
+ xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
+ xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range);
+- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(uid_map, line, 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to write UID map: %m");
+
+ /* We always assign the same UID and GID ranges */
+ xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid);
+- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(uid_map, line, 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to write GID map: %m");
+
+diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c
+index 93bdcf11bf..68cddb7a9f 100644
+--- a/src/shared/sysctl-util.c
++++ b/src/shared/sysctl-util.c
+@@ -88,7 +88,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c
+
+ log_debug("Setting '%s' to '%s'", p, value);
+
+- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER);
++ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0);
+ }
+
+ int sysctl_read(const char *property, char **content) {
+diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
+index b9fe96635d..f168d7f890 100644
+--- a/src/sleep/sleep.c
++++ b/src/sleep/sleep.c
+@@ -54,7 +54,7 @@ static int write_hibernate_location_info(void) {
+
+ /* if it's a swap partition, we just write the disk to /sys/power/resume */
+ if (streq(type, "partition")) {
+- r = write_string_file("/sys/power/resume", device, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/sys/power/resume", device, 0);
+ if (r < 0)
+ return log_debug_errno(r, "Failed to write partition device to /sys/power/resume: %m");
+
+@@ -98,14 +98,14 @@ static int write_hibernate_location_info(void) {
+
+ offset = fiemap->fm_extents[0].fe_physical / page_size();
+ xsprintf(offset_str, "%" PRIu64, offset);
+- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/sys/power/resume_offset", offset_str, 0);
+ if (r < 0)
+ return log_debug_errno(r, "Failed to write offset '%s': %m", offset_str);
+
+ log_debug("Wrote calculated resume_offset value to /sys/power/resume_offset: %s", offset_str);
+
+ xsprintf(device_str, "%lx", (unsigned long)stb.st_dev);
+- r = write_string_file("/sys/power/resume", device_str, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/sys/power/resume", device_str, 0);
+ if (r < 0)
+ return log_debug_errno(r, "Failed to write device '%s': %m", device_str);
+
+@@ -121,7 +121,7 @@ static int write_mode(char **modes) {
+ STRV_FOREACH(mode, modes) {
+ int k;
+
+- k = write_string_file("/sys/power/disk", *mode, WRITE_STRING_FILE_DISABLE_BUFFER);
++ k = write_string_file("/sys/power/disk", *mode, 0);
+ if (k >= 0)
+ return 0;
+
+@@ -140,7 +140,7 @@ static int write_state(FILE **f, char **states) {
+ STRV_FOREACH(state, states) {
+ int k;
+
+- k = write_string_stream(*f, *state, WRITE_STRING_FILE_DISABLE_BUFFER);
++ k = write_string_stream(*f, *state, 0);
+ if (k >= 0)
+ return 0;
+ log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
+diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c
+index 77d95e513f..25ce4abfb1 100644
+--- a/src/udev/udevadm-trigger.c
++++ b/src/udev/udevadm-trigger.c
+@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se
+ if (!filename)
+ return log_oom();
+
+- r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(filename, action, 0);
+ if (r < 0) {
+ log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_ERR, r,
+ "Failed to write '%s' to '%s': %m", action, filename);
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index cb5123042a..ea309a9e7f 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -1113,7 +1113,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) {
+
+ filename = strjoina(syspath, "/uevent");
+ log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath);
+- r = write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(filename, "change", 0);
+ if (r < 0)
+ return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename);
+ return 0;
+diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
+index 75d052ae70..5a15c939d8 100644
+--- a/src/vconsole/vconsole-setup.c
++++ b/src/vconsole/vconsole-setup.c
+@@ -117,7 +117,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) {
+ static int toggle_utf8_sysfs(bool utf8) {
+ int r;
+
+- r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), 0);
+ if (r < 0)
+ return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8));
+
diff --git a/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch b/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
new file mode 100644
index 0000000000..7d764b4115
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
@@ -0,0 +1,48 @@
+From 3f37ad5e083dcad51c21c1050b2829b70d240b52 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 6 Aug 2019 03:10:20 +0000
+Subject: [PATCH] meson: Add -Defi-objcopy option to specify objcopy
+
+This helps in cross compiling for x86 target on a aarch64 host e.g.
+Fixes
+TOPDIR/build/tmp/hosttools/objcopy:src/boot/efi/systemd_boot.so: Invalid bfd target
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ meson_options.txt | 2 ++
+ src/boot/efi/meson.build | 5 ++++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index d4ec37dda2..dc1c96e112 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -296,6 +296,8 @@ option('efi-cc', type : 'array',
+ description : 'the compiler to use for EFI modules')
+ option('efi-ld', type : 'string',
+ description : 'the linker to use for EFI modules')
++option('efi-objcopy', type : 'string',
++ description : 'the objcopy to use for EFI')
+ option('efi-libdir', type : 'string',
+ description : 'path to the EFI lib directory')
+ option('efi-ldsdir', type : 'string',
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 0ae3191635..5a7137bc84 100644
+--- a/src/boot/efi/meson.build
++++ b/src/boot/efi/meson.build
+@@ -88,7 +88,10 @@ if have_gnu_efi
+ output : 'efi_config.h',
+ configuration : efi_conf)
+
+- objcopy = find_program('objcopy')
++ objcopy = get_option('efi-objcopy')
++ if objcopy == ''
++ objcopy = find_program('objcopy', required: true)
++ endif
+
+ efi_ldsdir = get_option('efi-ldsdir')
+ arch_lds = 'elf_@0@_efi.lds'.format(gnu_efi_path_arch)
+--
+2.17.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch b/meta/recipes-core/systemd/systemd/0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch
new file mode 100644
index 0000000000..ba20a0bb46
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch
@@ -0,0 +1,42 @@
+From d0122c077d2d8fd0fd29b463c501e7ddf9177ff3 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 24 Sep 2019 17:04:50 +0800
+Subject: [PATCH] unit-file.c: consider symlink on filesystems like NFS
+
+Some filesystems do not fully support readdir, according to the manual,
+so we should also consider DT_UNKNOWN to correctly handle symlinks.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/13637]
+---
+ src/shared/unit-file.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/shared/unit-file.c b/src/shared/unit-file.c
+index 4a5f23e6c1..8373103000 100644
+--- a/src/shared/unit-file.c
++++ b/src/shared/unit-file.c
+@@ -247,6 +247,7 @@ int unit_file_build_name_map(
+ _cleanup_free_ char *_filename_free = NULL, *simplified = NULL;
+ const char *suffix, *dst = NULL;
+ bool valid_unit_name;
++ struct stat sb;
+
+ valid_unit_name = unit_name_is_valid(de->d_name, UNIT_NAME_ANY);
+
+@@ -279,7 +280,10 @@ int unit_file_build_name_map(
+ if (hashmap_contains(ids, de->d_name))
+ continue;
+
+- if (de->d_type == DT_LNK) {
++ if (de->d_type == DT_LNK ||
++ (de->d_type == DT_UNKNOWN &&
++ lstat(filename, &sb) == 0 &&
++ (sb.st_mode & S_IFMT) == S_IFLNK)) {
+ /* We don't explicitly check for alias loops here. unit_ids_map_get() which
+ * limits the number of hops should be used to access the map. */
+
+--
+2.17.1
+
diff --git a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
new file mode 100644
index 0000000000..c6213ab88e
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
@@ -0,0 +1,163 @@
+From 1eb84534dea05d41afed1d898cba212ad7d310dd Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 13:41:41 +0800
+Subject: [PATCH 02/24] don't use glibc-specific qsort_r
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+[Rebased for v241]
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[Rebased for v242]
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+---
+ src/basic/sort-util.h | 14 --------------
+ src/libsystemd/sd-hwdb/hwdb-util.c | 19 ++++++++++++++-----
+ src/shared/format-table.c | 36 ++++++++++++++++++++++++------------
+ 3 files changed, 38 insertions(+), 31 deletions(-)
+
+diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
+index e029f8646e..27d68b341c 100644
+--- a/src/basic/sort-util.h
++++ b/src/basic/sort-util.h
+@@ -54,17 +54,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn
+ int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \
+ qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
+ })
+-
+-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
+- if (nmemb <= 1)
+- return;
+-
+- assert(base);
+- qsort_r(base, nmemb, size, compar, userdata);
+-}
+-
+-#define typesafe_qsort_r(p, n, func, userdata) \
+- ({ \
+- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
+- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
+- })
+diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c
+index c83575c7c8..72f8f3a050 100644
+--- a/src/libsystemd/sd-hwdb/hwdb-util.c
++++ b/src/libsystemd/sd-hwdb/hwdb-util.c
+@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie) {
+
+ DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
+
+-static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) {
+- return strcmp(trie->strings->buf + a->key_off,
+- trie->strings->buf + b->key_off);
++static struct trie *trie_node_add_value_trie;
++static int trie_values_cmp(const void *v1, const void *v2) {
++ const struct trie_value_entry *a = v1;
++ const struct trie_value_entry *b = v2;
++
++ return strcmp(trie_node_add_value_trie->strings->buf + a->key_off,
++ trie_node_add_value_trie->strings->buf + b->key_off);
+ }
+
+ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -158,7 +162,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ .value_off = v,
+ };
+
+- val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
++
+ if (val) {
+ /* At this point we have 2 identical properties on the same match-string.
+ * Since we process files in order, we just replace the previous value. */
+@@ -184,7 +191,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ .line_number = line_number,
+ };
+ node->values_count++;
+- typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
+ return 0;
+ }
+
+diff --git a/src/shared/format-table.c b/src/shared/format-table.c
+index a5c0a99b08..d595cbe372 100644
+--- a/src/shared/format-table.c
++++ b/src/shared/format-table.c
+@@ -850,31 +850,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
+ return CMP(index_a, index_b);
+ }
+
+-static int table_data_compare(const size_t *a, const size_t *b, Table *t) {
++static Table *user_table;
++static int table_data_compare(const void *x, const void *y) {
++ const size_t *a = x, *b=y;
+ size_t i;
+ int r;
+
+- assert(t);
+- assert(t->sort_map);
++ assert(user_table);
++ assert(user_table->sort_map);
+
+ /* Make sure the header stays at the beginning */
+- if (*a < t->n_columns && *b < t->n_columns)
++ if (*a < user_table->n_columns && *b < user_table->n_columns)
+ return 0;
+- if (*a < t->n_columns)
++ if (*a < user_table->n_columns)
+ return -1;
+- if (*b < t->n_columns)
++ if (*b < user_table->n_columns)
+ return 1;
+
+ /* Order other lines by the sorting map */
+- for (i = 0; i < t->n_sort_map; i++) {
++ for (i = 0; i < user_table->n_sort_map; i++) {
+ TableData *d, *dd;
+
+- d = t->data[*a + t->sort_map[i]];
+- dd = t->data[*b + t->sort_map[i]];
++ d = user_table->data[*a + user_table->sort_map[i]];
++ dd = user_table->data[*b + user_table->sort_map[i]];
+
+ r = cell_data_compare(d, *a, dd, *b);
+ if (r != 0)
+- return t->reverse_map && t->reverse_map[t->sort_map[i]] ? -r : r;
++ return user_table->reverse_map && user_table->reverse_map[user_table->sort_map[i]] ? -r : r;
+ }
+
+ /* Order identical lines by the order there were originally added in */
+@@ -1107,7 +1109,12 @@ int table_print(Table *t, FILE *f) {
+ for (i = 0; i < n_rows; i++)
+ sorted[i] = i * t->n_columns;
+
+- typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
++ if (n_rows <= 1)
++ return 0;
++ assert(sorted);
++ user_table = t;
++ qsort(sorted, n_rows, sizeof(size_t), table_data_compare);
++ user_table = NULL;
+ }
+
+ if (t->display_map)
+@@ -1534,7 +1541,12 @@ int table_to_json(Table *t, JsonVariant **ret) {
+ for (i = 0; i < n_rows; i++)
+ sorted[i] = i * t->n_columns;
+
+- typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
++ if (n_rows <= 1)
++ return 0;
++ assert(sorted);
++ user_table = t;
++ qsort(sorted, n_rows, sizeof(size_t), table_data_compare);
++ user_table = NULL;
+ }
+
+ if (t->display_map)
+--
+2.11.0
+
diff --git a/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch b/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch
new file mode 100644
index 0000000000..dcae668dcb
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch
@@ -0,0 +1,25 @@
+Include sys/wait.h
+
+Fixes:
+src/login/logind-brightness.c:158:85: error: 'WEXITED' undeclared (first use in this function); did you mean 'WIFEXITED'?
+ 158 | r = sd_event_add_child(w->manager->event, &w->child_event_source, w->child, WEXITED, on_brightness_writer_exit, w);
+ | ^~~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ src/login/logind-brightness.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/login/logind-brightness.c b/src/login/logind-brightness.c
+index 8dfa97d7ae..bddd4a2727 100644
+--- a/src/login/logind-brightness.c
++++ b/src/login/logind-brightness.c
+@@ -1,5 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <sys/wait.h>
+ #include "bus-util.h"
+ #include "device-util.h"
+ #include "hash-funcs.h"
diff --git a/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch b/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch
deleted file mode 100644
index 28939eb021..0000000000
--- a/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e5f405aba347d216e7f2b73d7dd681b13be442e3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:29:15 +0000
-Subject: [PATCH 02/36] units: Prefer getty to agetty in console setup systemd
- units
-
-Upstream-Status: Inappropriate [configuration specific]
-
-Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- units/getty@.service.m4 | 2 +-
- units/serial-getty@.service.m4 | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
-index 46164ab..bdf6ec8 100644
---- a/units/getty@.service.m4
-+++ b/units/getty@.service.m4
-@@ -27,7 +27,7 @@ ConditionPathExists=/dev/tty0
-
- [Service]
- # the VT is cleared by TTYVTDisallocate
--ExecStart=-/sbin/agetty --noclear %I $TERM
-+ExecStart=-/sbin/getty -L %I $TERM
- Type=idle
- Restart=always
- RestartSec=0
-diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
-index 4522d0d..e6d499d 100644
---- a/units/serial-getty@.service.m4
-+++ b/units/serial-getty@.service.m4
-@@ -22,7 +22,7 @@ Before=getty.target
- IgnoreOnIsolate=yes
-
- [Service]
--ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
-+ExecStart=-/sbin/getty -L 115200 %I $TERM
- Type=idle
- Restart=always
- UtmpIdentifier=%I
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
new file mode 100644
index 0000000000..49a334d090
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -0,0 +1,63 @@
+From bdbafe18c3bf99b3b691cd52b9ccff60f313892d Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 27 Jun 2018 16:09:24 +0800
+Subject: [PATCH 2/5] use lnr wrapper instead of looking for --relative option
+ for ln
+
+Remove file manually to avoid the 'File Exists' error when creating
+symlink. This is because the original 'ln' command uses '-f' option.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ meson.build | 4 ----
+ tools/meson-make-symlink.sh | 3 ++-
+ units/meson-add-wants.sh | 7 ++++++-
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index e5ceb1e169..79b762faeb 100644
+--- a/meson.build
++++ b/meson.build
+@@ -579,10 +579,6 @@ endforeach
+
+ conf.set_quoted('TELINIT', get_option('telinit-path'))
+
+-if run_command('ln', '--relative', '--help').returncode() != 0
+- error('ln does not support --relative (added in coreutils 8.16)')
+-endif
+-
+ ############################################################
+
+ gperf = find_program('gperf')
+diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh
+index da0d13a341..90bc0a93c2 100755
+--- a/tools/meson-make-symlink.sh
++++ b/tools/meson-make-symlink.sh
+@@ -8,5 +8,6 @@ mkdir -vp "$(dirname "${DESTDIR:-}$2")"
+ if [ "$(dirname $1)" = . ]; then
+ ln -vfs -T "$1" "${DESTDIR:-}$2"
+ else
+- ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
++ rm -f "${DESTDIR:-}$2"
++ lnr "${DESTDIR:-}$1" "${DESTDIR:-}$2"
+ fi
+diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh
+index a483d75b86..3c01c523f1 100755
+--- a/units/meson-add-wants.sh
++++ b/units/meson-add-wants.sh
+@@ -25,4 +25,9 @@ case "$target" in
+ ;;
+ esac
+
+-ln -vfs --relative "$unitpath" "$dir"
++if [ -d "$dir" ]; then
++ rm -f "$dir/$unit"
++ lnr "$unitpath" "$dir/$unit"
++else
++ lnr "$unitpath" "$dir"
++fi
diff --git a/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch b/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
deleted file mode 100644
index e62d580f18..0000000000
--- a/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Subject: [PATCH 03/36] define exp10 if missing
-
-Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
-
-exp10 extension is not part of uClibc, so compute it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Samuel Martin <s.martin49@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- src/basic/missing.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 651e414..fafa233 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -1013,4 +1013,9 @@ typedef int32_t key_serial_t;
-
- #endif
-
-+#ifdef __UCLIBC__
-+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
-+#define exp10(x) (exp((x) * log(10)))
-+#endif /* __UCLIBC__ */
-+
- #include "missing_syscall.h"
---
-2.8.3
-
diff --git a/meta/recipes-core/systemd/systemd/0003-implment-systemd-sysv-install-for-OE.patch b/meta/recipes-core/systemd/systemd/0003-implment-systemd-sysv-install-for-OE.patch
new file mode 100644
index 0000000000..6695d56804
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0003-implment-systemd-sysv-install-for-OE.patch
@@ -0,0 +1,43 @@
+From 47864989388bcd04d647ecf618ad7e260399dbb6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Sep 2015 06:31:47 +0000
+Subject: [PATCH 3/5] implment systemd-sysv-install for OE
+
+Use update-rc.d for enabling/disabling and status command
+to check the status of the sysv service
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
+index 8c16cf9..9f078a1 100755
+--- a/src/systemctl/systemd-sysv-install.SKELETON
++++ b/src/systemctl/systemd-sysv-install.SKELETON
+@@ -32,17 +32,17 @@ case "$1" in
+ enable)
+ # call the command to enable SysV init script $NAME here
+ # (consider optional $ROOT)
+- echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
++ update-rc.d -f $NAME defaults
+ ;;
+ disable)
+ # call the command to disable SysV init script $NAME here
+ # (consider optional $ROOT)
+- echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
++ update-rc.d -f $NAME remove
+ ;;
+ is-enabled)
+ # exit with 0 if $NAME is enabled, non-zero if it is disabled
+ # (consider optional $ROOT)
+- echo "IMPLEMENT ME: checking SysV init.d script $NAME"
++ /etc/init.d/$NAME status
+ ;;
+ *)
+ usage ;;
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
new file mode 100644
index 0000000000..2e39f7a2e1
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
@@ -0,0 +1,63 @@
+From a9421d55102fc84f77f7c21a2479fcd00652b896 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 13:55:12 +0800
+Subject: [PATCH 03/24] missing_type.h: add __compare_fn_t and comparison_fn_t
+
+Make it work with musl where comparison_fn_t and __compare_fn_t
+is not provided.
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[Rebased for v242]
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+---
+ src/basic/missing_type.h | 9 +++++++++
+ src/basic/sort-util.h | 1 +
+ src/journal/catalog.c | 1 +
+ 3 files changed, 11 insertions(+)
+
+diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
+index bf8a6caa1b..2134fe5095 100644
+--- a/src/basic/missing_type.h
++++ b/src/basic/missing_type.h
+@@ -10,3 +10,12 @@
+ #if !HAVE_CHAR16_T
+ #define char16_t uint16_t
+ #endif
++
++#ifndef __GLIBC__
++typedef int (*comparison_fn_t)(const void *, const void *);
++#endif
++
++#ifndef __COMPAR_FN_T
++#define __COMPAR_FN_T
++typedef int (*__compar_fn_t)(const void *, const void *);
++#endif
+diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
+index e029f86..7247d40 100644
+--- a/src/basic/sort-util.h
++++ b/src/basic/sort-util.h
+@@ -4,6 +4,7 @@
+ #include <stdlib.h>
+
+ #include "macro.h"
++#include "missing.h"
+
+ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+ __compar_d_fn_t compar, void *arg);
+diff --git a/src/journal/catalog.c b/src/journal/catalog.c
+index 7beffc1e1a..4818a2e5cc 100644
+--- a/src/journal/catalog.c
++++ b/src/journal/catalog.c
+@@ -29,6 +29,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "tmpfile-util.h"
++#include "missing.h"
+
+ const char * const catalog_file_dirs[] = {
+ "/usr/local/lib/systemd/catalog/",
+--
+2.11.0
+
diff --git a/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch b/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch
new file mode 100644
index 0000000000..7ee0d48fa6
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch
@@ -0,0 +1,27 @@
+Include signal.h
+
+Fixes several signal set related errors:
+src/basic/copy.c:92:19: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration]
+src/basic/copy.c:93:19: error: implicit declaration of function 'sigaddset' [-Werror=implicit-function-declaration]
+src/basic/copy.c:93:34: error: 'SIGINT' undeclared (first use in this function)
+src/basic/copy.c:95:13: error: implicit declaration of function 'sigtimedwait' [-Werror=implicit-function-declaration]
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ src/basic/copy.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/basic/copy.c b/src/basic/copy.c
+index ca311e021e..3cf7fc1697 100644
+--- a/src/basic/copy.c
++++ b/src/basic/copy.c
+@@ -12,6 +12,7 @@
+ #include <sys/xattr.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <signal.h>
+
+ #include "alloc-util.h"
+ #include "btrfs-util.h"
diff --git a/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch b/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
deleted file mode 100644
index 989a1fa1df..0000000000
--- a/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From bb8d8148b16572ae17d3c308552cf73915386b05 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 12 Sep 2015 19:10:04 +0000
-Subject: [PATCH 04/36] Use getenv when secure versions are not available
-
-musl doesnt implement secure version, so we default
-to it if configure does not detect a secure imeplementation
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Denied
----
- src/basic/missing.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index ee7e7ea..3170429 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -585,12 +585,11 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
- return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
- }
- #endif
--
- #ifndef HAVE_SECURE_GETENV
- # ifdef HAVE___SECURE_GETENV
- # define secure_getenv __secure_getenv
- # else
--# error "neither secure_getenv nor __secure_getenv are available"
-+# define secure_getenv getenv
- # endif
- #endif
-
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
new file mode 100644
index 0000000000..a2aad40ac2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
@@ -0,0 +1,432 @@
+From 7bcf3b166694090497a0acd2c5299e4e04fcc9b6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 14:04:21 +0800
+Subject: [PATCH 04/24] add fallback parse_printf_format implementation
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ meson.build | 1 +
+ src/basic/meson.build | 5 +
+ src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++
+ src/basic/parse-printf-format.h | 57 +++++++++
+ src/basic/stdio-util.h | 2 +-
+ src/journal/journal-send.c | 2 +-
+ 6 files changed, 338 insertions(+), 2 deletions(-)
+ create mode 100644 src/basic/parse-printf-format.c
+ create mode 100644 src/basic/parse-printf-format.h
+
+diff --git a/meson.build b/meson.build
+index 79b762faeb..7f8c679411 100644
+--- a/meson.build
++++ b/meson.build
+@@ -613,6 +613,7 @@ endif
+ foreach header : ['crypt.h',
+ 'linux/memfd.h',
+ 'linux/vm_sockets.h',
++ 'printf.h',
+ 'sys/auxv.h',
+ 'valgrind/memcheck.h',
+ 'valgrind/valgrind.h',
+diff --git a/src/basic/meson.build b/src/basic/meson.build
+index d6caf28f14..32c1acf349 100644
+--- a/src/basic/meson.build
++++ b/src/basic/meson.build
+@@ -312,6 +312,11 @@ foreach item : [['af', af_list_txt, 'af', ''],
+ endforeach
+
+ basic_sources += generated_gperf_headers
++
++if conf.get('HAVE_PRINTF_H') != 1
++ basic_sources += [files('parse-printf-format.c')]
++endif
++
+ basic_gcrypt_sources = files(
+ 'gcrypt-util.c',
+ 'gcrypt-util.h')
+diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
+new file mode 100644
+index 0000000000..49437e5445
+--- /dev/null
++++ b/src/basic/parse-printf-format.c
+@@ -0,0 +1,273 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the musl C library
++ Copyright 2005-2014 Rich Felker, et al.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#include <stddef.h>
++#include <string.h>
++
++#include "parse-printf-format.h"
++
++static const char *consume_nonarg(const char *fmt)
++{
++ do {
++ if (*fmt == '\0')
++ return fmt;
++ } while (*fmt++ != '%');
++ return fmt;
++}
++
++static const char *consume_num(const char *fmt)
++{
++ for (;*fmt >= '0' && *fmt <= '9'; fmt++)
++ /* do nothing */;
++ return fmt;
++}
++
++static const char *consume_argn(const char *fmt, size_t *arg)
++{
++ const char *p = fmt;
++ size_t val = 0;
++
++ if (*p < '1' || *p > '9')
++ return fmt;
++ do {
++ val = 10*val + (*p++ - '0');
++ } while (*p >= '0' && *p <= '9');
++
++ if (*p != '$')
++ return fmt;
++ *arg = val;
++ return p+1;
++}
++
++static const char *consume_flags(const char *fmt)
++{
++ while (1) {
++ switch (*fmt) {
++ case '#':
++ case '0':
++ case '-':
++ case ' ':
++ case '+':
++ case '\'':
++ case 'I':
++ fmt++;
++ continue;
++ }
++ return fmt;
++ }
++}
++
++enum state {
++ BARE,
++ LPRE,
++ LLPRE,
++ HPRE,
++ HHPRE,
++ BIGLPRE,
++ ZTPRE,
++ JPRE,
++ STOP
++};
++
++enum type {
++ NONE,
++ PTR,
++ INT,
++ UINT,
++ ULLONG,
++ LONG,
++ ULONG,
++ SHORT,
++ USHORT,
++ CHAR,
++ UCHAR,
++ LLONG,
++ SIZET,
++ IMAX,
++ UMAX,
++ PDIFF,
++ UIPTR,
++ DBL,
++ LDBL,
++ MAXTYPE
++};
++
++static const short pa_types[MAXTYPE] = {
++ [NONE] = PA_INT,
++ [PTR] = PA_POINTER,
++ [INT] = PA_INT,
++ [UINT] = PA_INT,
++ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [LONG] = PA_INT | PA_FLAG_LONG,
++ [ULONG] = PA_INT | PA_FLAG_LONG,
++ [SHORT] = PA_INT | PA_FLAG_SHORT,
++ [USHORT] = PA_INT | PA_FLAG_SHORT,
++ [CHAR] = PA_CHAR,
++ [UCHAR] = PA_CHAR,
++ [LLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [SIZET] = PA_INT | PA_FLAG_LONG,
++ [IMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [UMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG,
++ [UIPTR] = PA_INT | PA_FLAG_LONG,
++ [DBL] = PA_DOUBLE,
++ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
++};
++
++#define S(x) [(x)-'A']
++#define E(x) (STOP + (x))
++
++static const unsigned char states[]['z'-'A'+1] = {
++ { /* 0: bare types */
++ S('d') = E(INT), S('i') = E(INT),
++ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(CHAR),S('C') = E(INT),
++ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
++ S('m') = E(NONE),
++ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE,
++ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE
++ }, { /* 1: l-prefixed */
++ S('d') = E(LONG), S('i') = E(LONG),
++ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR),
++ S('l') = LLPRE
++ }, { /* 2: ll-prefixed */
++ S('d') = E(LLONG), S('i') = E(LLONG),
++ S('o') = E(ULLONG),S('u') = E(ULLONG),
++ S('x') = E(ULLONG),S('X') = E(ULLONG),
++ S('n') = E(PTR)
++ }, { /* 3: h-prefixed */
++ S('d') = E(SHORT), S('i') = E(SHORT),
++ S('o') = E(USHORT),S('u') = E(USHORT),
++ S('x') = E(USHORT),S('X') = E(USHORT),
++ S('n') = E(PTR),
++ S('h') = HHPRE
++ }, { /* 4: hh-prefixed */
++ S('d') = E(CHAR), S('i') = E(CHAR),
++ S('o') = E(UCHAR),S('u') = E(UCHAR),
++ S('x') = E(UCHAR),S('X') = E(UCHAR),
++ S('n') = E(PTR)
++ }, { /* 5: L-prefixed */
++ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
++ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
++ S('n') = E(PTR)
++ }, { /* 6: z- or t-prefixed (assumed to be same size) */
++ S('d') = E(PDIFF),S('i') = E(PDIFF),
++ S('o') = E(SIZET),S('u') = E(SIZET),
++ S('x') = E(SIZET),S('X') = E(SIZET),
++ S('n') = E(PTR)
++ }, { /* 7: j-prefixed */
++ S('d') = E(IMAX), S('i') = E(IMAX),
++ S('o') = E(UMAX), S('u') = E(UMAX),
++ S('x') = E(UMAX), S('X') = E(UMAX),
++ S('n') = E(PTR)
++ }
++};
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types)
++{
++ size_t i = 0;
++ size_t last = 0;
++
++ memset(types, 0, n);
++
++ while (1) {
++ size_t arg;
++ unsigned int state;
++
++ fmt = consume_nonarg(fmt);
++ if (*fmt == '\0')
++ break;
++ if (*fmt == '%') {
++ fmt++;
++ continue;
++ }
++ arg = 0;
++ fmt = consume_argn(fmt, &arg);
++ /* flags */
++ fmt = consume_flags(fmt);
++ /* width */
++ if (*fmt == '*') {
++ size_t warg = 0;
++ fmt = consume_argn(fmt+1, &warg);
++ if (warg == 0)
++ warg = ++i;
++ if (warg > last)
++ last = warg;
++ if (warg <= n && types[warg-1] == NONE)
++ types[warg-1] = INT;
++ } else
++ fmt = consume_num(fmt);
++ /* precision */
++ if (*fmt == '.') {
++ fmt++;
++ if (*fmt == '*') {
++ size_t parg = 0;
++ fmt = consume_argn(fmt+1, &parg);
++ if (parg == 0)
++ parg = ++i;
++ if (parg > last)
++ last = parg;
++ if (parg <= n && types[parg-1] == NONE)
++ types[parg-1] = INT;
++ } else {
++ if (*fmt == '-')
++ fmt++;
++ fmt = consume_num(fmt);
++ }
++ }
++ /* length modifier and conversion specifier */
++ state = BARE;
++ do {
++ unsigned char c = *fmt++;
++
++ if (c < 'A' || c > 'z')
++ continue;
++ state = states[state]S(c);
++ if (state == 0)
++ continue;
++ } while (state < STOP);
++
++ if (state == E(NONE))
++ continue;
++
++ if (arg == 0)
++ arg = ++i;
++ if (arg > last)
++ last = arg;
++ if (arg <= n)
++ types[arg-1] = state - STOP;
++ }
++
++ if (last > n)
++ last = n;
++ for (i = 0; i < last; i++)
++ types[i] = pa_types[types[i]];
++
++ return last;
++}
+diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
+new file mode 100644
+index 0000000000..47be7522d7
+--- /dev/null
++++ b/src/basic/parse-printf-format.h
+@@ -0,0 +1,57 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the GNU C Library
++ Copyright 1991-2014 Free Software Foundation, Inc.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#pragma once
++
++#include "config.h"
++
++#if HAVE_PRINTF_H
++#include <printf.h>
++#else
++
++#include <stddef.h>
++
++enum { /* C type: */
++ PA_INT, /* int */
++ PA_CHAR, /* int, cast to char */
++ PA_WCHAR, /* wide char */
++ PA_STRING, /* const char *, a '\0'-terminated string */
++ PA_WSTRING, /* const wchar_t *, wide character string */
++ PA_POINTER, /* void * */
++ PA_FLOAT, /* float */
++ PA_DOUBLE, /* double */
++ PA_LAST
++};
++
++/* Flag bits that can be set in a type returned by `parse_printf_format'. */
++#define PA_FLAG_MASK 0xff00
++#define PA_FLAG_LONG_LONG (1 << 8)
++#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
++#define PA_FLAG_LONG (1 << 9)
++#define PA_FLAG_SHORT (1 << 10)
++#define PA_FLAG_PTR (1 << 11)
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types);
++
++#endif /* HAVE_PRINTF_H */
+diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
+index c3b9448d4f..2937aa13b1 100644
+--- a/src/basic/stdio-util.h
++++ b/src/basic/stdio-util.h
+@@ -1,13 +1,13 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+ #pragma once
+
+-#include <printf.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+
+ #include "macro.h"
+ #include "memory-util.h"
++#include "parse-printf-format.h"
+
+ #define snprintf_ok(buf, len, fmt, ...) \
+ ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len))
+diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
+index 5ef11fa1a4..6384ab620c 100644
+--- a/src/journal/journal-send.c
++++ b/src/journal/journal-send.c
+@@ -2,7 +2,6 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <printf.h>
+ #include <stddef.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+@@ -21,6 +20,7 @@
+ #include "stdio-util.h"
+ #include "string-util.h"
+ #include "tmpfile-util.h"
++#include "parse-printf-format.h"
+
+ #define SNDBUF_SIZE (8*1024*1024)
+
diff --git a/meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch b/meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch
new file mode 100644
index 0000000000..f9c5996ffb
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch
@@ -0,0 +1,34 @@
+From dc0a6a9fe4da9738efaba942233ad39da625a918 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Thu, 21 Feb 2019 16:28:21 +0800
+Subject: [PATCH 4/5] rules: whitelist hd* devices
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.
+
+Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+[rebased for systemd 241]
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ rules/60-persistent-storage.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
+index 7802b1c94f..c0534ae26a 100644
+--- a/rules/60-persistent-storage.rules
++++ b/rules/60-persistent-storage.rules
+@@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
+ ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
+
+ SUBSYSTEM!="block", GOTO="persistent_storage_end"
+-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end"
++KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*|hd*", GOTO="persistent_storage_end"
+
+ # ignore partitions that span the entire disk
+ TEST=="whole_disk", GOTO="persistent_storage_end"
diff --git a/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch b/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch
new file mode 100644
index 0000000000..0f75e8c12d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch
@@ -0,0 +1,54 @@
+Handle __cpu_mask usage
+
+Fixes errors:
+
+src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function)
+src/test/test-sizeof.c:73:14: error: '__cpu_mask' undeclared (first use in this function)
+
+__cpu_mask is an internal type of glibc's cpu_set implementation, not
+part of the POSIX definition, which is problematic when building with
+musl, which does not define a matching type. From inspection of musl's
+sched.h, however, it is clear that the corresponding type would be
+unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So,
+add a typedef to cpu-set-util.h defining __cpu_mask appropriately.
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ src/shared/cpu-set-util.h | 2 ++
+ src/test/test-sizeof.c | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h
+index 27812dfd59..f698f9df83 100644
+--- a/src/shared/cpu-set-util.h
++++ b/src/shared/cpu-set-util.h
+@@ -6,6 +6,8 @@
+ #include "macro.h"
+ #include "missing_syscall.h"
+
++typedef unsigned long __cpu_mask;
++
+ /* This wraps the libc interface with a variable to keep the allocated size. */
+ typedef struct CPUSet {
+ cpu_set_t *set;
+diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
+index a710db5370..d1601ad929 100644
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -1,6 +1,5 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
+-#include <sched.h>
+ #include <stdio.h>
+ #include <string.h>
+
+@@ -8,6 +7,7 @@
+ #include <float.h>
+
+ #include "time-util.h"
++#include "cpu-set-util.h"
+
+ /* Print information about various types. Useful when diagnosing
+ * gcc diagnostics on an unfamiliar architecture. */
diff --git a/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
deleted file mode 100644
index f69e26ec5c..0000000000
--- a/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 3436b12d40bf4f4ab7e3e16600e5f6c35a470da4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:03:44 +0000
-Subject: [PATCH 05/36] binfmt: Don't install dependency links at install time
- for the binfmt services
-
-use [Install] blocks so that they get created when the service is enabled
-like a traditional service.
-
-The [Install] blocks were rejected upstream as they don't have a way to
-"enable"
-it on install without static symlinks which can't be disabled, only
-masked. We
-however can do that in a postinst.
-
-Upstream-Status: Denied
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 4 ----
- units/proc-sys-fs-binfmt_misc.automount | 3 +++
- units/systemd-binfmt.service.in | 5 +++++
- 3 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 03341fc..629740f 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4387,10 +4387,6 @@ INSTALL_DIRS += \
- $(prefix)/lib/binfmt.d \
- $(sysconfdir)/binfmt.d
-
--SYSINIT_TARGET_WANTS += \
-- systemd-binfmt.service \
-- proc-sys-fs-binfmt_misc.automount
--
- endif
-
- EXTRA_DIST += \
-diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
-index 6be3893..709adef 100644
---- a/units/proc-sys-fs-binfmt_misc.automount
-+++ b/units/proc-sys-fs-binfmt_misc.automount
-@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
-
- [Automount]
- Where=/proc/sys/fs/binfmt_misc
-+
-+[Install]
-+WantedBy=sysinit.target
-diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
-index d53073e..8c57ee0 100644
---- a/units/systemd-binfmt.service.in
-+++ b/units/systemd-binfmt.service.in
-@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
- Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
- DefaultDependencies=no
- Conflicts=shutdown.target
-+Wants=proc-sys-fs-binfmt_misc.automount
-+
- After=proc-sys-fs-binfmt_misc.automount
- Before=sysinit.target shutdown.target
- ConditionPathIsReadWrite=/proc/sys/
-@@ -25,3 +27,6 @@ Type=oneshot
- RemainAfterExit=yes
- ExecStart=@rootlibexecdir@/systemd-binfmt
- TimeoutSec=90s
-+
-+[Install]
-+WantedBy=sysinit.target
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch b/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch
new file mode 100644
index 0000000000..96175b5b5e
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch
@@ -0,0 +1,45 @@
+From d1bccc721dd8f43fee29c5df0e9b78345e69f4b6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Thu, 21 Feb 2019 16:38:38 +0800
+Subject: [PATCH 5/5] rules: watch metadata changes in ide devices
+
+Formatting IDE storage does not trigger "change" uevents. As a result
+clients using udev API don't get any updates afterwards and get outdated
+information about the device.
+...
+root@qemux86-64:~# mkfs.ext4 -F /dev/hda1
+Creating filesystem with 262144 4k blocks and 65536 inodes
+Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+
+root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+ls: cannot access '/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file or directory
+...
+Include hd* in a match for watch option assignment.
+
+Upstream-Status: Denied
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
+is deprecated.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+[rebased for systemd 241]
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ rules/60-block.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-block.rules b/rules/60-block.rules
+index 3134ab995e..cd72a494a1 100644
+--- a/rules/60-block.rules
++++ b/rules/60-block.rules
+@@ -9,5 +9,5 @@ ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block",
+
+ # watch metadata changes, caused by tools closing the device node which was opened for writing
+ ACTION!="remove", SUBSYSTEM=="block", \
+- KERNEL=="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", \
++ KERNEL=="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*|hd*", \
+ OPTIONS+="watch"
diff --git a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
new file mode 100644
index 0000000000..adfc3b7861
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -0,0 +1,442 @@
+From 399fd3eda3045636a70da438a0fd1406cc332ed1 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 14:18:21 +0800
+Subject: [PATCH 05/24] src/basic/missing.h: check for missing strndupa
+
+include missing.h for definition of strndupa
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[Rebased for v242]
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ meson.build | 1 +
+ src/backlight/backlight.c | 1 +
+ src/basic/env-util.c | 1 +
+ src/basic/missing_stdlib.h | 12 ++++++++++++
+ src/basic/mkdir.c | 1 +
+ src/basic/parse-util.c | 1 +
+ src/basic/proc-cmdline.c | 1 +
+ src/basic/procfs-util.c | 1 +
+ src/basic/time-util.c | 1 +
+ src/core/dbus-cgroup.c | 1 +
+ src/core/dbus-util.c | 1 +
+ src/core/kmod-setup.c | 1 +
+ src/core/service.c | 1 +
+ src/journal/journalctl.c | 1 +
+ src/libsystemd/sd-bus/bus-message.c | 1 +
+ src/libsystemd/sd-bus/bus-objects.c | 1 +
+ src/libsystemd/sd-bus/test-bus-benchmark.c | 1 +
+ src/locale/keymap-util.c | 1 +
+ src/login/pam_systemd.c | 1 +
+ src/network/generator/network-generator.c | 1 +
+ src/nspawn/nspawn-settings.c | 1 +
+ src/shared/dns-domain.c | 1 +
+ src/shared/journal-importer.c | 1 +
+ src/shared/logs-show.c | 1 +
+ src/shared/pager.c | 1 +
+ src/shared/path-lookup.c | 1 +
+ src/shared/uid-range.c | 1 +
+ src/socket-proxy/socket-proxyd.c | 1 +
+ src/test/test-hexdecoct.c | 1 +
+ src/udev/udev-builtin-path_id.c | 1 +
+ src/udev/udev-event.c | 1 +
+ src/udev/udev-rules.c | 1 +
+ 32 files changed, 43 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 7f8c679411..81c061b768 100644
+--- a/meson.build
++++ b/meson.build
+@@ -506,6 +506,7 @@ foreach ident : [
+ #include <unistd.h>'''],
+ ['get_mempolicy', '''#include <stdlib.h>
+ #include <unistd.h>'''],
++ ['strndupa' , '''#include <string.h>'''],
+ ]
+
+ have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
+diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
+index dfd6805398..c2b2ace6ec 100644
+--- a/src/backlight/backlight.c
++++ b/src/backlight/backlight.c
+@@ -17,6 +17,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "util.h"
++#include "missing.h"
+
+ static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) {
+ const char *subsystem, *sysname, *value;
+diff --git a/src/basic/env-util.c b/src/basic/env-util.c
+index a6503cf2b6..ceef9a62c8 100644
+--- a/src/basic/env-util.c
++++ b/src/basic/env-util.c
+@@ -16,6 +16,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "utf8.h"
++#include "missing.h"
+
+ #define VALID_CHARS_ENV_NAME \
+ DIGITS LETTERS \
+diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
+index 188a8d4406..1e16ec287a 100644
+--- a/src/basic/missing_stdlib.h
++++ b/src/basic/missing_stdlib.h
+@@ -11,3 +11,15 @@
+ # error "neither secure_getenv nor __secure_getenv are available"
+ # endif
+ #endif
++
++/* string.h */
++#if ! HAVE_STRNDUPA
++#define strndupa(s, n) \
++ ({ \
++ const char *__old = (s); \
++ size_t __len = strnlen(__old, (n)); \
++ char *__new = (char *)alloca(__len + 1); \
++ __new[__len] = '\0'; \
++ (char *)memcpy(__new, __old, __len); \
++ })
++#endif
+diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
+index 6b82eab640..51c6b78615 100644
+--- a/src/basic/mkdir.c
++++ b/src/basic/mkdir.c
+@@ -14,6 +14,7 @@
+ #include "stat-util.h"
+ #include "stdio-util.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdir_func_t _mkdir) {
+ struct stat st;
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 115a1494a2..07a34bfd53 100644
+--- a/src/basic/parse-util.c
++++ b/src/basic/parse-util.c
+@@ -20,6 +20,7 @@
+ #include "process-util.h"
+ #include "stat-util.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ int parse_boolean(const char *v) {
+ if (!v)
+diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
+index 09169cf963..f411ba897f 100644
+--- a/src/basic/proc-cmdline.c
++++ b/src/basic/proc-cmdline.c
+@@ -15,6 +15,7 @@
+ #include "string-util.h"
+ #include "util.h"
+ #include "virt.h"
++#include "missing.h"
+
+ int proc_cmdline(char **ret) {
+ const char *e;
+diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
+index 7aaf95bfce..42ce53d5aa 100644
+--- a/src/basic/procfs-util.c
++++ b/src/basic/procfs-util.c
+@@ -11,6 +11,7 @@
+ #include "procfs-util.h"
+ #include "stdio-util.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ int procfs_tasks_get_limit(uint64_t *ret) {
+ _cleanup_free_ char *value = NULL;
+diff --git a/src/basic/time-util.c b/src/basic/time-util.c
+index 3018e81acb..4e2b3b66c1 100644
+--- a/src/basic/time-util.c
++++ b/src/basic/time-util.c
+@@ -28,6 +28,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "time-util.h"
++#include "missing.h"
+
+ static clockid_t map_clock_id(clockid_t c) {
+
+diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
+index 2f2313c599..c9937f9d62 100644
+--- a/src/core/dbus-cgroup.c
++++ b/src/core/dbus-cgroup.c
+@@ -15,6 +15,7 @@
+ #include "fileio.h"
+ #include "limits-util.h"
+ #include "path-util.h"
++#include "missing.h"
+
+ static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy);
+
+diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
+index 7862beaacb..19f6968cfe 100644
+--- a/src/core/dbus-util.c
++++ b/src/core/dbus-util.c
+@@ -7,6 +7,7 @@
+ #include "unit-printf.h"
+ #include "user-util.h"
+ #include "unit.h"
++#include "missing.h"
+
+ int bus_property_get_triggered_unit(
+ sd_bus *bus,
+diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
+index a91cfebc67..a45961013f 100644
+--- a/src/core/kmod-setup.c
++++ b/src/core/kmod-setup.c
+@@ -11,6 +11,7 @@
+ #include "kmod-setup.h"
+ #include "macro.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ #if HAVE_KMOD
+ #include <libkmod.h>
+diff --git a/src/core/service.c b/src/core/service.c
+index 73b3c9c316..ef74f00a08 100644
+--- a/src/core/service.c
++++ b/src/core/service.c
+@@ -43,6 +43,7 @@
+ #include "unit.h"
+ #include "utf8.h"
+ #include "util.h"
++#include "missing.h"
+
+ static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
+ [SERVICE_DEAD] = UNIT_INACTIVE,
+diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
+index 6d6bb1cf63..6666349a35 100644
+--- a/src/journal/journalctl.c
++++ b/src/journal/journalctl.c
+@@ -70,6 +70,7 @@
+ #include "unit-name.h"
+ #include "user-util.h"
+ #include "varlink.h"
++#include "missing.h"
+
+ #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
+
+diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
+index eb029e4453..f31fe9d5a8 100644
+--- a/src/libsystemd/sd-bus/bus-message.c
++++ b/src/libsystemd/sd-bus/bus-message.c
+@@ -21,6 +21,7 @@
+ #include "strv.h"
+ #include "time-util.h"
+ #include "utf8.h"
++#include "missing.h"
+
+ static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
+
+diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
+index ae643cacc7..1b752271a5 100644
+--- a/src/libsystemd/sd-bus/bus-objects.c
++++ b/src/libsystemd/sd-bus/bus-objects.c
+@@ -13,6 +13,7 @@
+ #include "set.h"
+ #include "string-util.h"
+ #include "strv.h"
++#include "missing.h"
+
+ static int node_vtable_get_userdata(
+ sd_bus *bus,
+diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
+index 8de0a859ee..4fd0a2e692 100644
+--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
++++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
+@@ -14,6 +14,7 @@
+ #include "missing_resource.h"
+ #include "time-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ #define MAX_SIZE (2*1024*1024)
+
+diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
+index f8c36c94f5..41f5606aea 100644
+--- a/src/locale/keymap-util.c
++++ b/src/locale/keymap-util.c
+@@ -22,6 +22,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "tmpfile-util.h"
++#include "missing.h"
+
+ static bool startswith_comma(const char *s, const char *prefix) {
+ s = startswith(s, prefix);
+diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
+index 3f762cbbc3..005cfea658 100644
+--- a/src/login/pam_systemd.c
++++ b/src/login/pam_systemd.c
+@@ -28,6 +28,7 @@
+ #include "hostname-util.h"
+ #include "login-util.h"
+ #include "macro.h"
++#include "missing.h"
+ #include "parse-util.h"
+ #include "path-util.h"
+ #include "process-util.h"
+diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
+index 0b5af33566..9c808cd014 100644
+--- a/src/network/generator/network-generator.c
++++ b/src/network/generator/network-generator.c
+@@ -13,6 +13,7 @@
+ #include "string-table.h"
+ #include "string-util.h"
+ #include "strv.h"
++#include "missing.h"
+
+ /*
+ # .network
+diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
+index 3a99736813..279fea4d88 100644
+--- a/src/nspawn/nspawn-settings.c
++++ b/src/nspawn/nspawn-settings.c
+@@ -16,6 +16,7 @@
+ #include "strv.h"
+ #include "user-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ Settings *settings_new(void) {
+ Settings *s;
+diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
+index f62ad0a0f5..f1a27e158d 100644
+--- a/src/shared/dns-domain.c
++++ b/src/shared/dns-domain.c
+@@ -24,6 +24,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "utf8.h"
++#include "missing.h"
+
+ int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
+ const char *n;
+diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
+index 7c4fc7021d..a6ff2214df 100644
+--- a/src/shared/journal-importer.c
++++ b/src/shared/journal-importer.c
+@@ -14,6 +14,7 @@
+ #include "parse-util.h"
+ #include "string-util.h"
+ #include "unaligned.h"
++#include "missing.h"
+
+ enum {
+ IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
+diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
+index b615c70dff..75b26e9c21 100644
+--- a/src/shared/logs-show.c
++++ b/src/shared/logs-show.c
+@@ -39,6 +39,7 @@
+ #include "time-util.h"
+ #include "utf8.h"
+ #include "util.h"
++#include "missing.h"
+
+ /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
+ #define PRINT_LINE_THRESHOLD 3
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index 7c20b100b4..e4209d3a95 100644
+--- a/src/shared/pager.c
++++ b/src/shared/pager.c
+@@ -25,6 +25,7 @@
+ #include "strv.h"
+ #include "terminal-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ static pid_t pager_pid = 0;
+
+diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
+index 6bf0ff0316..f6c8009cd2 100644
+--- a/src/shared/path-lookup.c
++++ b/src/shared/path-lookup.c
+@@ -20,6 +20,7 @@
+ #include "tmpfile-util.h"
+ #include "user-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ int xdg_user_runtime_dir(char **ret, const char *suffix) {
+ const char *e;
+diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
+index 7cb7d8a477..8b12b91084 100644
+--- a/src/shared/uid-range.c
++++ b/src/shared/uid-range.c
+@@ -9,6 +9,7 @@
+ #include "sort-util.h"
+ #include "uid-range.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
+ assert(range);
+diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
+index abbbc9f2d6..6179b5851e 100644
+--- a/src/socket-proxy/socket-proxyd.c
++++ b/src/socket-proxy/socket-proxyd.c
+@@ -28,6 +28,7 @@
+ #include "socket-util.h"
+ #include "string-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ #define BUFFER_SIZE (256 * 1024)
+
+diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
+index 52217429b1..a05e7782f6 100644
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -6,6 +6,7 @@
+ #include "hexdecoct.h"
+ #include "macro.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ static void test_hexchar(void) {
+ assert_se(hexchar(0xa) == 'a');
+diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
+index e8f1ce1354..8693cb02a4 100644
+--- a/src/udev/udev-builtin-path_id.c
++++ b/src/udev/udev-builtin-path_id.c
+@@ -23,6 +23,7 @@
+ #include "strv.h"
+ #include "sysexits.h"
+ #include "udev-builtin.h"
++#include "missing.h"
+
+ _printf_(2,3)
+ static void path_prepend(char **path, const char *fmt, ...) {
+diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
+index 8cfa2cdf23..b0670c77ec 100644
+--- a/src/udev/udev-event.c
++++ b/src/udev/udev-event.c
+@@ -35,6 +35,7 @@
+ #include "udev-util.h"
+ #include "udev-watch.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ typedef struct Spawn {
+ sd_device *device;
+diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
+index 1642f10535..fe2aa75478 100644
+--- a/src/udev/udev-rules.c
++++ b/src/udev/udev-rules.c
+@@ -28,6 +28,7 @@
+ #include "udev-event.h"
+ #include "udev-rules.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
+
diff --git a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
new file mode 100644
index 0000000000..6d73d715ce
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
@@ -0,0 +1,227 @@
+Include netinet/if_ether.h
+
+Fixes
+/path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
+ struct ethhdr {
+ ^~~~~~
+
+and related arphdr, arpreq, and arpreq_old errors
+/path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr'
+ struct arphdr {
+ ^~~~~~
+
+The latter requires removing some includes of net/if_arp.h to avoid
+conflicting with netinet/if_ether.h.
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ src/libsystemd-network/sd-dhcp6-client.c | 1 -
+ src/libsystemd/sd-netlink/netlink-types.c | 1 +
+ src/machine/machine-dbus.c | 1 +
+ src/network/netdev/macsec.c | 1 +
+ src/network/netdev/netdev.c | 1 +
+ src/network/networkd-brvlan.c | 1 +
+ src/network/networkd-dhcp-common.c | 1 +
+ src/network/networkd-dhcp4.c | 2 +-
+ src/network/networkd-dhcp6.c | 2 +-
+ src/network/networkd-link.c | 2 +-
+ src/network/networkd-network.c | 1 +
+ src/shared/ethtool-util.c | 1 +
+ src/shared/ethtool-util.h | 1 +
+ src/udev/net/link-config.c | 1 +
+ src/udev/udev-builtin-net_setup_link.c | 1 +
+ 15 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
+index d7a5349c70..68b41dfb6c 100644
+--- a/src/libsystemd-network/sd-dhcp6-client.c
++++ b/src/libsystemd-network/sd-dhcp6-client.c
+@@ -6,7 +6,6 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <sys/ioctl.h>
+-#include <linux/if_arp.h>
+ #include <linux/if_infiniband.h>
+
+ #include "sd-dhcp6-client.h"
+diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
+index de9b8b21ab..f64f6500f7 100644
+--- a/src/libsystemd/sd-netlink/netlink-types.c
++++ b/src/libsystemd/sd-netlink/netlink-types.c
+@@ -3,6 +3,7 @@
+ #include <netinet/in.h>
+ #include <stdint.h>
+ #include <sys/socket.h>
++#include <netinet/if_ether.h>
+ #include <linux/can/vxcan.h>
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
+diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
+index 0d58b5eb8b..01093c1f62 100644
+--- a/src/machine/machine-dbus.c
++++ b/src/machine/machine-dbus.c
+@@ -4,6 +4,7 @@
+ #include <string.h>
+ #include <sys/mount.h>
+ #include <sys/wait.h>
++#include <netinet/if_ether.h>
+
+ /* When we include libgen.h because we need dirname() we immediately
+ * undefine basename() since libgen.h defines it as a macro to the POSIX
+diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
+index cf281e75a6..269dc618ff 100644
+--- a/src/network/netdev/macsec.c
++++ b/src/network/netdev/macsec.c
+@@ -1,5 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <netinet/if_ether.h>
+ #include <netinet/in.h>
+ #include <linux/if_ether.h>
+ #include <linux/if_macsec.h>
+diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
+index 7735b455b7..ed4eda4a44 100644
+--- a/src/network/netdev/netdev.c
++++ b/src/network/netdev/netdev.c
+@@ -1,5 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <netinet/if_ether.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+
+diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
+index c3c5d535ac..ebea408c89 100644
+--- a/src/network/networkd-brvlan.c
++++ b/src/network/networkd-brvlan.c
+@@ -4,6 +4,7 @@
+ ***/
+
+ #include <netinet/in.h>
++#include <netinet/if_ether.h>
+ #include <linux/if_bridge.h>
+ #include <stdbool.h>
+
+diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
+index 626b975839..42fe92f320 100644
+--- a/src/network/networkd-dhcp-common.c
++++ b/src/network/networkd-dhcp-common.c
+@@ -1,6 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
+ #include "networkd-dhcp-common.h"
++#include <netinet/if_ether.h>
+ #include "networkd-network.h"
+ #include "parse-util.h"
+ #include "string-table.h"
+diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
+index 662770b50e..c6ab62a94d 100644
+--- a/src/network/networkd-dhcp4.c
++++ b/src/network/networkd-dhcp4.c
+@@ -1,8 +1,8 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <netinet/if_ether.h>
+ #include <netinet/in.h>
+ #include <linux/if.h>
+-#include <linux/if_arp.h>
+
+ #include "alloc-util.h"
+ #include "hostname-util.h"
+diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
+index 8ad736a82b..f41b4d834e 100644
+--- a/src/network/networkd-dhcp6.c
++++ b/src/network/networkd-dhcp6.c
+@@ -3,9 +3,9 @@
+ Copyright © 2014 Intel Corporation. All rights reserved.
+ ***/
+
++#include <netinet/if_ether.h>
+ #include <netinet/in.h>
+ #include <linux/if.h>
+-#include <linux/if_arp.h>
+ #include "sd-radv.h"
+
+ #include "sd-dhcp6-client.h"
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index f5bb78890a..f13a36b791 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -1,8 +1,8 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <netinet/if_ether.h>
+ #include <netinet/in.h>
+ #include <linux/if.h>
+-#include <linux/if_arp.h>
+ #include <unistd.h>
+
+ #include "alloc-util.h"
+diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
+index 2b8d0eb2fb..2f79ef25cd 100644
+--- a/src/network/networkd-network.c
++++ b/src/network/networkd-network.c
+@@ -1,5 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <netinet/if_ether.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <linux/netdevice.h>
+diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
+index b0961df72e..53fcbbd84b 100644
+--- a/src/shared/ethtool-util.c
++++ b/src/shared/ethtool-util.c
+@@ -1,5 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <netinet/if_ether.h>
+ #include <net/if.h>
+ #include <sys/ioctl.h>
+ #include <linux/ethtool.h>
+diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
+index 8b32b243f3..262b819976 100644
+--- a/src/shared/ethtool-util.h
++++ b/src/shared/ethtool-util.h
+@@ -2,6 +2,7 @@
+ #pragma once
+
+ #include <macro.h>
++#include <netinet/if_ether.h>
+ #include <linux/ethtool.h>
+
+ #include "conf-parser.h"
+diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
+index d44af64d5e..fd052f1591 100644
+--- a/src/udev/net/link-config.c
++++ b/src/udev/net/link-config.c
+@@ -1,5 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <netinet/if_ether.h>
+ #include <linux/netdevice.h>
+ #include <netinet/ether.h>
+
+diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
+index ee3ca9fa38..9aa4e82874 100644
+--- a/src/udev/udev-builtin-net_setup_link.c
++++ b/src/udev/udev-builtin-net_setup_link.c
+@@ -1,5 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+
++#include <netinet/if_ether.h>
+ #include "device-util.h"
+ #include "alloc-util.h"
+ #include "link-config.h"
diff --git a/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch b/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
deleted file mode 100644
index 0d63755731..0000000000
--- a/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From bb6f1d8a000b337280541afde7cccdcfe03cdeb1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:05:45 +0000
-Subject: [PATCH 06/36] configure: Check for additional features that uclibc
- doesnt support
-
-This helps in supporting uclibc which does not have all features that
-glibc might have
-
-Upstream-Status: Denied [no desire for uclibc support]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index f51533c..0239fd0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -112,6 +112,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]
-
- AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
-
-+# check for few functions not implemented in uClibc
-+
-+AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
-+
-+# check for %ms format support - assume always no if cross compiling
-+
-+AC_MSG_CHECKING([whether %ms format is supported by *scanf])
-+
-+AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM([
-+ #include <stdio.h>
-+ ],[
-+ char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
-+ int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
-+ return (rc==3)?0:1;])],
-+ [AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
-+ [AC_MSG_RESULT([no])])
-+
- M4_DEFINES=
-
- AC_CHECK_TOOL(OBJCOPY, objcopy)
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
new file mode 100644
index 0000000000..34f7f5fb74
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
@@ -0,0 +1,153 @@
+From f8a239b182158ca0a537ba053cb0e6bad9c3a2fb Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 14:56:21 +0800
+Subject: [PATCH 07/24] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
+ defined
+
+If the standard library doesn't provide brace
+expansion users just won't get it.
+
+Dont use GNU GLOB extentions on non-glibc systems
+
+Conditionalize use of GLOB_ALTDIRFUNC
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ src/basic/glob-util.c | 12 ++++++++++++
+ src/test/test-glob-util.c | 16 ++++++++++++++++
+ src/tmpfiles/tmpfiles.c | 10 ++++++++++
+ 3 files changed, 38 insertions(+)
+
+diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
+index b335af8d97..2cdfc11f16 100644
+--- a/src/basic/glob-util.c
++++ b/src/basic/glob-util.c
+@@ -14,6 +14,12 @@
+ #include "path-util.h"
+ #include "strv.h"
+
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ static void closedir_wrapper(void* v) {
+ (void) closedir(v);
+ }
+@@ -21,6 +27,7 @@ static void closedir_wrapper(void* v) {
+ int safe_glob(const char *path, int flags, glob_t *pglob) {
+ int k;
+
++#ifdef GLOB_ALTDIRFUNC
+ /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
+ assert(!(flags & GLOB_ALTDIRFUNC));
+
+@@ -34,9 +41,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
+ pglob->gl_lstat = lstat;
+ if (!pglob->gl_stat)
+ pglob->gl_stat = stat;
++#endif
+
+ errno = 0;
++#ifdef GLOB_ALTDIRFUNC
+ k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob);
++#else
++ k = glob(path, flags, NULL, pglob);
++#endif
+ if (k == GLOB_NOMATCH)
+ return -ENOENT;
+ if (k == GLOB_NOSPACE)
+diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
+index b4f41445fe..f0d474ed14 100644
+--- a/src/test/test-glob-util.c
++++ b/src/test/test-glob-util.c
+@@ -13,6 +13,12 @@
+ #include "rm-rf.h"
+ #include "tmpfile-util.h"
+
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ static void test_glob_exists(void) {
+ char name[] = "/tmp/test-glob_exists.XXXXXX";
+ int fd = -1;
+@@ -40,11 +46,13 @@ static void test_glob_no_dot(void) {
+ const char *fn;
+
+ _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+ .gl_closedir = closedir_wrapper,
+ .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot,
+ .gl_opendir = (void *(*)(const char *)) opendir,
+ .gl_lstat = lstat,
+ .gl_stat = stat,
++#endif
+ };
+
+ int r;
+@@ -52,11 +60,19 @@ static void test_glob_no_dot(void) {
+ assert_se(mkdtemp(template));
+
+ fn = strjoina(template, "/*");
++#ifdef GLOB_ALTDIRFUNC
+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
++#else
++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
++#endif
+ assert_se(r == GLOB_NOMATCH);
+
+ fn = strjoina(template, "/.*");
++#ifdef GLOB_ALTDIRFUNC
+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
++#else
++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
++#endif
+ assert_se(r == GLOB_NOMATCH);
+
+ (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
+diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
+index 3c30612af1..14bc428085 100644
+--- a/src/tmpfiles/tmpfiles.c
++++ b/src/tmpfiles/tmpfiles.c
+@@ -63,6 +63,12 @@
+ #include "umask-util.h"
+ #include "user-util.h"
+
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
+ * them in the file system. This is intended to be used to create
+ * properly owned directories beneath /tmp, /var/tmp, /run, which are
+@@ -1853,7 +1859,9 @@ finish:
+
+ static int glob_item(Item *i, action_t action) {
+ _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+ .gl_opendir = (void *(*)(const char *)) opendir_nomod,
++#endif
+ };
+ int r = 0, k;
+ char **fn;
+@@ -1873,7 +1881,9 @@ static int glob_item(Item *i, action_t action) {
+
+ static int glob_item_recursively(Item *i, fdaction_t action) {
+ _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+ .gl_opendir = (void *(*)(const char *)) opendir_nomod,
++#endif
+ };
+ int r = 0, k;
+ char **fn;
diff --git a/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
deleted file mode 100644
index 12f6ace93d..0000000000
--- a/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From fa5e137fbd2fb081ae897575377d718ee8cb6349 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 20 Dec 2015 04:20:28 +0000
-Subject: [PATCH 07/36] use lnr wrapper instead of looking for --relative
- option for ln
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 6 +++---
- configure.ac | 2 --
- 2 files changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 629740f..82b6553 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -243,7 +243,7 @@ define move-to-rootlibdir
- $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
- so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
- rm -f $(DESTDIR)$(libdir)/$$libname && \
-- $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
-+ lnr $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
- mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
- fi
- endef
-@@ -317,7 +317,7 @@ define install-relative-aliases
- while [ -n "$$1" ]; do \
- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
- rm -f $(DESTDIR)$$dir/$$2 && \
-- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
-+ lnr $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
- shift 2 || exit $$?; \
- done
- endef
-@@ -2781,7 +2781,7 @@ systemd_dbus1_generator_LDADD = \
- dbus1-generator-install-hook:
- $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
- $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
-- $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
-+ $(AM_V_LN)lnr $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
-
- dbus1-generator-uninstall-hook:
- rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
-diff --git a/configure.ac b/configure.ac
-index 0239fd0..c5ab9d0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
- AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
- AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
-
--AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
--
- # check for few functions not implemented in uClibc
-
- AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
new file mode 100644
index 0000000000..d5f2349f2b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
@@ -0,0 +1,47 @@
+From 6cd17c753d2c0a90fc791f69bbc694cbc8556a4f Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 15:00:06 +0800
+Subject: [PATCH 08/24] add missing FTW_ macros for musl
+
+This is to avoid build failures like below for musl.
+
+ locale-util.c:296:24: error: 'FTW_STOP' undeclared
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing_type.h | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
+index c487e65..23602eb 100644
+--- a/src/basic/missing_type.h
++++ b/src/basic/missing_type.h
+@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *);
+ #define __COMPAR_FN_T
+ typedef int (*__compar_fn_t)(const void *, const void *);
+ #endif
++
++#ifndef FTW_ACTIONRETVAL
++#define FTW_ACTIONRETVAL 16
++#endif
++
++#ifndef FTW_CONTINUE
++#define FTW_CONTINUE 0
++#endif
++
++#ifndef FTW_STOP
++#define FTW_STOP 1
++#endif
++
++#ifndef FTW_SKIP_SUBTREE
++#define FTW_SKIP_SUBTREE 2
++#endif
++
++#ifndef FTW_SKIP_SIBLINGS
++#define FTW_SKIP_SIBLINGS 3
++#endif
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
deleted file mode 100644
index 6e6f199ef1..0000000000
--- a/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From ae999ff50efb9cc82537adef7696c6f732afcfc8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:10:37 +0000
-Subject: [PATCH 08/36] nspawn: Use execvpe only when libc supports it
-
-Upstream-Status: Denied [no desire for uclibc support]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/nspawn/nspawn.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 5a68fec..65e65ec 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -111,6 +111,8 @@ typedef enum LinkJournal {
- LINK_GUEST
- } LinkJournal;
-
-+#include "config.h"
-+
- static char *arg_directory = NULL;
- static char *arg_template = NULL;
- static char *arg_chdir = NULL;
-@@ -2637,7 +2639,12 @@ static int inner_child(
- a[0] = (char*) "/sbin/init";
- execve(a[0], a, env_use);
- } else if (!strv_isempty(arg_parameters))
-+#ifdef HAVE_EXECVPE
- execvpe(arg_parameters[0], arg_parameters, env_use);
-+#else
-+ environ = env_use;
-+ execvp(arg_parameters[0], arg_parameters);
-+#endif /* HAVE_EXECVPE */
- else {
- if (!arg_chdir)
- chdir(home ?: "/root");
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch b/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
deleted file mode 100644
index 116f3d4de6..0000000000
--- a/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 3498f488b27f90398d7c8d1d06aac5ab684370e8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 00:47:53 +0000
-Subject: [PATCH 09/36] util: bypass unimplemented _SC_PHYS_PAGES system
- configuration API on uclibc
-
-Upstream-Status: Inappropriate [uclibc-specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/basic/util.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/src/basic/util.c b/src/basic/util.c
-index ea1bed7..fdaf340 100644
---- a/src/basic/util.c
-+++ b/src/basic/util.c
-@@ -767,10 +767,25 @@ uint64_t physical_memory(void) {
- /* We return this as uint64_t in case we are running as 32bit
- * process on a 64bit kernel with huge amounts of memory */
-
-+#ifdef __UCLIBC__
-+ char line[128];
-+ FILE *f = fopen("/proc/meminfo", "r");
-+ if (f == NULL)
-+ return 0;
-+ while (!feof(f) && fgets(line, sizeof(line)-1, f)) {
-+ if (sscanf(line, "MemTotal: %li kB", &mem) == 1) {
-+ mem *= 1024;
-+ break;
-+ }
-+ }
-+ fclose(f);
-+ return (uint64_t) mem;
-+#else
- mem = sysconf(_SC_PHYS_PAGES);
- assert(mem > 0);
-
- return (uint64_t) mem * (uint64_t) page_size();
-+#endif
- }
-
- int update_reboot_param_file(const char *param) {
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
new file mode 100644
index 0000000000..8bacd0289d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -0,0 +1,45 @@
+From f1f4b4f9684fed185bfa8b9ed409cdf241657e99 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 15:03:47 +0800
+Subject: [PATCH 10/24] fix missing of __register_atfork for non-glibc builds
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/process-util.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index 78ce43b..aec2daf 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -22,6 +22,9 @@
+ #if HAVE_VALGRIND_VALGRIND_H
+ #include <valgrind/valgrind.h>
+ #endif
++#ifndef __GLIBC__
++#include <pthread.h>
++#endif
+
+ #include "alloc-util.h"
+ #include "architecture.h"
+@@ -1160,11 +1163,15 @@ void reset_cached_pid(void) {
+ cached_pid = CACHED_PID_UNSET;
+ }
+
++#ifdef __GLIBC__
+ /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
+ * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
+ * libpthread, as it is part of glibc anyway. */
+ extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle);
+ extern void* __dso_handle _weak_;
++#else
++#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
++#endif
+
+ pid_t getpid_cached(void) {
+ static bool installed = false;
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch b/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
deleted file mode 100644
index 75fa3a54eb..0000000000
--- a/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 5f94f5ad46c1ded54c3797979d384e4c1eb77bb0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 5 Sep 2015 06:31:47 +0000
-Subject: [PATCH 10/36] implment systemd-sysv-install for OE
-
-Use update-rc.d for enabling/disabling and status command
-to check the status of the sysv service
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
-index a53a3e6..5d877b0 100755
---- a/src/systemctl/systemd-sysv-install.SKELETON
-+++ b/src/systemctl/systemd-sysv-install.SKELETON
-@@ -30,17 +30,17 @@ case "$1" in
- enable)
- # call the command to enable SysV init script $NAME here
- # (consider optional $ROOT)
-- echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
-+ update-rc.d -f $NAME defaults
- ;;
- disable)
- # call the command to disable SysV init script $NAME here
- # (consider optional $ROOT)
-- echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
-+ update-rc.d -f $NAME remove
- ;;
- is-enabled)
- # exit with 0 if $NAME is enabled, non-zero if it is disabled
- # (consider optional $ROOT)
-- echo "IMPLEMENT ME: checking SysV init.d script $NAME"
-+ /etc/init.d/$NAME status
- ;;
- *)
- usage ;;
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
new file mode 100644
index 0000000000..d6eda9c038
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
@@ -0,0 +1,97 @@
+From e3f847bd0338d27aff3335b42661d8a4b66b965e Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 15:12:41 +0800
+Subject: [PATCH 11/24] Use uintmax_t for handling rlim_t
+
+PRIu{32,64} is not right format to represent rlim_t type
+therefore use %ju and typecast the rlim_t variables to
+uintmax_t.
+
+Fixes portablility errors like
+
+execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=]
+| fprintf(f, "%s%s: " RLIM_FMT "\n",
+| ^~~~~~~~
+| prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
+| ~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+[Rebased for v241]
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/format-util.h | 8 +-------
+ src/basic/rlimit-util.c | 10 +++++-----
+ src/core/execute.c | 4 ++--
+ 3 files changed, 8 insertions(+), 14 deletions(-)
+
+diff --git a/src/basic/format-util.h b/src/basic/format-util.h
+index dece5d3..dbb87bc 100644
+--- a/src/basic/format-util.h
++++ b/src/basic/format-util.h
+@@ -42,13 +42,7 @@
+ # define PRI_TIMEX "li"
+ #endif
+
+-#if SIZEOF_RLIM_T == 8
+-# define RLIM_FMT "%" PRIu64
+-#elif SIZEOF_RLIM_T == 4
+-# define RLIM_FMT "%" PRIu32
+-#else
+-# error Unknown rlim_t size
+-#endif
++#define RLIM_FMT "%ju"
+
+ #if SIZEOF_DEV_T == 8
+ # define DEV_FMT "%" PRIu64
+diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
+index 74b3a02..b02c03c 100644
+--- a/src/basic/rlimit-util.c
++++ b/src/basic/rlimit-util.c
+@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
+ if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
+ s = strdup("infinity");
+ else if (rl->rlim_cur >= RLIM_INFINITY)
+- (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max);
++ (void) asprintf(&s, "infinity:" RLIM_FMT, (uintmax_t)rl->rlim_max);
+ else if (rl->rlim_max >= RLIM_INFINITY)
+- (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur);
++ (void) asprintf(&s, RLIM_FMT ":infinity", (uintmax_t)rl->rlim_cur);
+ else if (rl->rlim_cur == rl->rlim_max)
+- (void) asprintf(&s, RLIM_FMT, rl->rlim_cur);
++ (void) asprintf(&s, RLIM_FMT, (uintmax_t)rl->rlim_cur);
+ else
+- (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max);
++ (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max);
+
+ if (!s)
+ return -ENOMEM;
+@@ -404,7 +404,7 @@ int rlimit_nofile_safe(void) {
+
+ rl.rlim_cur = FD_SETSIZE;
+ if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
+- return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur);
++ return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur);
+
+ return 1;
+ }
+diff --git a/src/core/execute.c b/src/core/execute.c
+index a708231..e2b8748 100644
+--- a/src/core/execute.c
++++ b/src/core/execute.c
+@@ -4220,9 +4220,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
+ for (i = 0; i < RLIM_NLIMITS; i++)
+ if (c->rlimit[i]) {
+ fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
+- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max);
+ fprintf(f, "%sLimit%sSoft: " RLIM_FMT "\n",
+- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur);
++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur);
+ }
+
+ if (c->ioprio_set) {
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch b/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
deleted file mode 100644
index 34ae64535d..0000000000
--- a/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 2b2450f6b7197bff4637c0283e8784500471d083 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 00:50:01 +0000
-Subject: [PATCH 11/36] nss-mymachines: Build conditionally when
- HAVE_MYHOSTNAME is set
-
-Fixes build failures when building with --disable-myhostname
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 82b6553..b3f3343 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4876,6 +4876,7 @@ SYSTEM_UNIT_ALIASES += \
- BUSNAMES_TARGET_WANTS += \
- org.freedesktop.machine1.busname
-
-+if HAVE_MYHOSTNAME
- libnss_mymachines_la_SOURCES = \
- src/nss-mymachines/nss-mymachines.sym \
- src/nss-mymachines/nss-mymachines.c
-@@ -4896,6 +4897,7 @@ lib_LTLIBRARIES += \
- libnss_mymachines.la
-
- endif
-+endif
-
- polkitpolicy_in_files += \
- src/machine/org.freedesktop.machine1.policy.in
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch b/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
deleted file mode 100644
index 6143088e8c..0000000000
--- a/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 5ebc0d87565a73710dea602c00b1586d5a1364e5 Mon Sep 17 00:00:00 2001
-From: Patrick Ohly <patrick.ohly@intel.com>
-Date: Wed, 16 Sep 2015 13:55:58 +0200
-Subject: [PATCH 12/36] rules: whitelist hd* devices
-
-qemu by default emulates IDE and the linux-yocto kernel(s) use
-CONFIG_IDE instead of the more modern libsata, so disks appear as
-/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.
-
-Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
-
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- rules/60-persistent-storage.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
-index 0b14bb4..1c4d97a 100644
---- a/rules/60-persistent-storage.rules
-+++ b/rules/60-persistent-storage.rules
-@@ -6,7 +6,7 @@
- ACTION=="remove", GOTO="persistent_storage_end"
-
- SUBSYSTEM!="block", GOTO="persistent_storage_end"
--KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*", GOTO="persistent_storage_end"
-+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|hd*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*", GOTO="persistent_storage_end"
-
- # ignore partitions that span the entire disk
- TEST=="whole_disk", GOTO="persistent_storage_end"
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch b/meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch
deleted file mode 100644
index ac67f65685..0000000000
--- a/meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 6736de4a3caf9a0b3c888c6cc05103ab1b86907d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 05:09:53 +0000
-Subject: [PATCH 13/36] sysv-generator: add support for executing scripts under
- /etc/rcS.d/
-
-To be compatible, all services translated from scripts under /etc/rcS.d would
-run before services translated from scripts under /etc/rcN.d.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/sysv-generator/sysv-generator.c | 47 ++++++++++++++++++++++++++++---------
- 1 file changed, 36 insertions(+), 11 deletions(-)
-
-diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
-index b5925a4..ea06d6a 100644
---- a/src/sysv-generator/sysv-generator.c
-+++ b/src/sysv-generator/sysv-generator.c
-@@ -44,7 +44,8 @@
-
- typedef enum RunlevelType {
- RUNLEVEL_UP,
-- RUNLEVEL_DOWN
-+ RUNLEVEL_DOWN,
-+ RUNLEVEL_SYSINIT
- } RunlevelType;
-
- static const struct {
-@@ -59,6 +60,9 @@ static const struct {
- { "rc4.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
- { "rc5.d", SPECIAL_GRAPHICAL_TARGET, RUNLEVEL_UP },
-
-+ /* Debian style rcS.d, also adopted by OE */
-+ { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT},
-+
- /* Standard SysV runlevels for shutdown */
- { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN },
- { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN }
-@@ -67,7 +71,7 @@ static const struct {
- directories in this order, and we want to make sure that
- sysv_start_priority is known when we first load the
- unit. And that value we only know from S links. Hence
-- UP must be read before DOWN */
-+ UP/SYSINIT must be read before DOWN */
- };
-
- static const char *arg_dest = "/tmp";
-@@ -86,6 +90,8 @@ typedef struct SysvStub {
- bool has_lsb;
- bool reload;
- bool loaded;
-+ bool default_dependencies;
-+ bool from_rcsd;
- } SysvStub;
-
- static void free_sysvstub(SysvStub *s) {
-@@ -711,17 +717,31 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
- if (s->has_lsb && other->has_lsb)
- continue;
-
-- if (other->sysv_start_priority < s->sysv_start_priority) {
-- r = strv_extend(&s->after, other->name);
-+ /* All scripts under /etc/rcS.d should execute before scripts under
-+ * /etc/rcN.d */
-+ if (!other->from_rcsd && s->from_rcsd) {
-+ r = strv_extend(&s->before, other->name);
- if (r < 0)
- return log_oom();
-
-- } else if (other->sysv_start_priority > s->sysv_start_priority) {
-- r = strv_extend(&s->before, other->name);
-+ } else if (other->from_rcsd && !s->from_rcsd) {
-+ r = strv_extend(&s->after, other->name);
- if (r < 0)
- return log_oom();
-- } else
-- continue;
-+ } else {
-+ if (other->sysv_start_priority < s->sysv_start_priority) {
-+ r = strv_extend(&s->after, other->name);
-+ if (r < 0)
-+ return log_oom();
-+ }
-+ else if (other->sysv_start_priority > s->sysv_start_priority) {
-+ r = strv_extend(&s->before, other->name);
-+ if (r < 0)
-+ return log_oom();
-+ }
-+ else
-+ continue;
-+ }
-
- /* FIXME: Maybe we should compare the name here lexicographically? */
- }
-@@ -788,6 +808,8 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
- return log_oom();
-
- service->sysv_start_priority = -1;
-+ service->default_dependencies = true;
-+ service->from_rcsd = false;
- service->name = name;
- service->path = fpath;
- name = fpath = NULL;
-@@ -871,9 +893,11 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
-
- if (de->d_name[0] == 'S') {
-
-- if (rcnd_table[i].type == RUNLEVEL_UP)
-+ if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) {
- service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority);
--
-+ service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true;
-+ service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
-+ }
- r = set_ensure_allocated(&runlevel_services[i], NULL);
- if (r < 0) {
- log_oom();
-@@ -887,7 +911,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
- }
-
- } else if (de->d_name[0] == 'K' &&
-- (rcnd_table[i].type == RUNLEVEL_DOWN)) {
-+ (rcnd_table[i].type == RUNLEVEL_DOWN ||
-+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
-
- r = set_ensure_allocated(&shutdown_services, NULL);
- if (r < 0) {
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch
deleted file mode 100644
index 2eea0ff9a6..0000000000
--- a/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-Subject: [PATCH 14/36] Make root's home directory configurable
-
-OpenEmbedded has a configurable home directory for root. Allow
-systemd to be built using its idea of what root's home directory
-should be.
-
-Upstream-Status: Denied
-Upstream wants to have a unified hierarchy where everyone is
-using the same root folder.
-https://github.com/systemd/systemd/issues/541
-
-Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- Makefile.am | 2 ++
- configure.ac | 7 +++++++
- src/basic/user-util.c | 4 ++--
- src/core/namespace.c | 2 +-
- src/nspawn/nspawn.c | 4 ++--
- units/console-shell.service.m4.in | 4 ++--
- units/emergency.service.in | 4 ++--
- units/rescue.service.in | 4 ++--
- 8 files changed, 20 insertions(+), 11 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 305099a..88c1250 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -206,6 +206,7 @@ AM_CPPFLAGS = \
- -DLIBDIR=\"$(libdir)\" \
- -DROOTLIBDIR=\"$(rootlibdir)\" \
- -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
-+ -DROOTHOMEDIR=\"$(roothomedir)\" \
- -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
- -I $(top_srcdir)/src \
- -I $(top_builddir)/src/basic \
-@@ -5863,6 +5864,7 @@ EXTRA_DIST += \
- substitutions = \
- '|rootlibexecdir=$(rootlibexecdir)|' \
- '|rootbindir=$(rootbindir)|' \
-+ '|roothomedir=$(roothomedir)|' \
- '|bindir=$(bindir)|' \
- '|SYSTEMCTL=$(rootbindir)/systemctl|' \
- '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
-diff --git a/configure.ac b/configure.ac
-index 329861a..01764f5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1478,6 +1478,11 @@ AC_ARG_WITH([rootlibdir],
- [with_rootlibdir=${libdir}])
- AX_NORMALIZE_PATH([with_rootlibdir])
-
-+AC_ARG_WITH([roothomedir],
-+ AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]),
-+ [],
-+ [with_roothomedir=/root])
-+
- AC_ARG_WITH([pamlibdir],
- AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
- [],
-@@ -1562,6 +1567,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
- AC_SUBST([pamconfdir], [$with_pamconfdir])
- AC_SUBST([rootprefix], [$with_rootprefix])
- AC_SUBST([rootlibdir], [$with_rootlibdir])
-+AC_SUBST([roothomedir], [$with_roothomedir])
-
- AC_CONFIG_FILES([
- Makefile
-@@ -1653,6 +1659,7 @@ AC_MSG_RESULT([
- includedir: ${includedir}
- lib dir: ${libdir}
- rootlib dir: ${with_rootlibdir}
-+ root home dir: ${with_roothomedir}
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
-diff --git a/src/basic/user-util.c b/src/basic/user-util.c
-index f65ca3e..da1101a 100644
---- a/src/basic/user-util.c
-+++ b/src/basic/user-util.c
-@@ -123,7 +123,7 @@ int get_user_creds(
- *gid = 0;
-
- if (home)
-- *home = "/root";
-+ *home = ROOTHOMEDIR;
-
- if (shell)
- *shell = "/bin/sh";
-@@ -354,7 +354,7 @@ int get_home_dir(char **_h) {
- /* Hardcode home directory for root to avoid NSS */
- u = getuid();
- if (u == 0) {
-- h = strdup("/root");
-+ h = strdup(ROOTHOMEDIR);
- if (!h)
- return -ENOMEM;
-
-diff --git a/src/core/namespace.c b/src/core/namespace.c
-index 203d122..45c0d11 100644
---- a/src/core/namespace.c
-+++ b/src/core/namespace.c
-@@ -415,7 +415,7 @@ int setup_namespace(
- home_dir = strjoina("-", home_dir);
- run_user_dir = prefix_roota(root_directory, "/run/user");
- run_user_dir = strjoina("-", run_user_dir);
-- root_dir = prefix_roota(root_directory, "/root");
-+ root_dir = prefix_roota(root_directory, ROOTHOMEDIR);
- root_dir = strjoina("-", root_dir);
-
- r = append_mounts(&m, STRV_MAKE(home_dir, run_user_dir, root_dir),
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 8ec0584..51df00b 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -2739,7 +2739,7 @@ static int inner_child(
- if (envp[n_env])
- n_env++;
-
-- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
-+ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
- (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
- (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
- return log_oom();
-@@ -2816,7 +2816,7 @@ static int inner_child(
- else {
- if (!arg_chdir)
- /* If we cannot change the directory, we'll end up in /, that is expected. */
-- (void) chdir(home ?: "/root");
-+ (void) chdir(home ?: ROOTHOMEDIR);
-
- execle("/bin/bash", "-bash", NULL, env_use);
- execle("/bin/sh", "-sh", NULL, env_use);
-diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
-index a345ec2..3caae7d 100644
---- a/units/console-shell.service.m4.in
-+++ b/units/console-shell.service.m4.in
-@@ -15,8 +15,8 @@ After=rc-local.service
- Before=getty.target
-
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStart=-@SULOGIN@
- ExecStopPost=-@SYSTEMCTL@ poweroff
- Type=idle
-diff --git a/units/emergency.service.in b/units/emergency.service.in
-index 0de16f2..4826062 100644
---- a/units/emergency.service.in
-+++ b/units/emergency.service.in
-@@ -15,8 +15,8 @@ Conflicts=syslog.socket
- Before=shutdown.target
-
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStartPre=-/bin/plymouth --wait quit
- ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
- ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
-diff --git a/units/rescue.service.in b/units/rescue.service.in
-index 92553f6..590ae17 100644
---- a/units/rescue.service.in
-+++ b/units/rescue.service.in
-@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
- Before=shutdown.target
-
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStartPre=-/bin/plymouth quit
- ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
- ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
---
-2.8.3
-
diff --git a/meta/recipes-core/systemd/systemd/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/meta/recipes-core/systemd/systemd/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
new file mode 100644
index 0000000000..914589dbd3
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
@@ -0,0 +1,42 @@
+From d3d65d4036670cbd5129fe55c09ca391286ef4b3 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:25:22 -0800
+Subject: [PATCH 14/24] test-sizeof.c: Disable tests for missing typedefs in
+ musl
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/test-sizeof.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
+index 35b0876..e78e7ca 100644
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -41,8 +41,10 @@ int main(void) {
+ info(unsigned);
+ info(long unsigned);
+ info(long long unsigned);
++#ifdef __GLIBC__
+ info(__syscall_ulong_t);
+ info(__syscall_slong_t);
++#endif
+
+ info(float);
+ info(double);
+@@ -60,7 +62,9 @@ int main(void) {
+ info(ssize_t);
+ info(time_t);
+ info(usec_t);
++#ifdef __GLIBC__
+ info(__time_t);
++#endif
+ info(pid_t);
+ info(uid_t);
+ info(gid_t);
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
new file mode 100644
index 0000000000..fd407f604d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -0,0 +1,99 @@
+From 48c628f532f6025c2d1646b6819cd81eb789d7fb Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 10 Oct 2017 14:33:30 -0700
+Subject: [PATCH 15/24] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
+
+Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right
+thing to do and it's not portable (not supported by musl). See:
+
+ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
+ http://www.openwall.com/lists/musl/2015/02/05/2
+
+Note that laccess() is never passing AT_EACCESS so a lot of the
+discussion in the links above doesn't apply. Note also that
+(currently) all systemd callers of laccess() pass mode as F_OK, so
+only check for existence of a file, not access permissions.
+Therefore, in this case, the only distiction between faccessat()
+with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour
+for broken symlinks; laccess() on a broken symlink will succeed with
+(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
+
+The laccess() macros was added to systemd some time ago and it's not
+clear if or why it needs to return success for broken symlinks. Maybe
+just historical and not actually necessary or desired behaviour?
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ src/basic/fs-util.h | 22 +++++++++++++++++++++-
+ src/shared/base-filesystem.c | 6 +++---
+ 2 files changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
+index 7ad030b..d4cb1e9 100644
+--- a/src/basic/fs-util.h
++++ b/src/basic/fs-util.h
+@@ -32,7 +32,27 @@ int fchmod_opath(int fd, mode_t m);
+
+ int fd_warn_permissions(const char *path, int fd);
+
+-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
++/*
++ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
++ do and it's not portable (not supported by musl). See:
++
++ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
++ http://www.openwall.com/lists/musl/2015/02/05/2
++
++ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in
++ the links above doesn't apply. Note also that (currently) all systemd callers
++ of laccess() pass mode as F_OK, so only check for existence of a file, not
++ access permissions. Therefore, in this case, the only distiction between
++ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the
++ behaviour for broken symlinks; laccess() on a broken symlink will succeed
++ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
++
++ The laccess() macros was added to systemd some time ago and it's not clear if
++ or why it needs to return success for broken symlinks. Maybe just historical
++ and not actually necessary or desired behaviour?
++*/
++
++#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0)
+
+ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
+ int touch(const char *path);
+diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
+index 89d7a7d..34b4ad5 100644
+--- a/src/shared/base-filesystem.c
++++ b/src/shared/base-filesystem.c
+@@ -53,7 +53,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+ return log_error_errno(errno, "Failed to open root file system: %m");
+
+ for (i = 0; i < ELEMENTSOF(table); i ++) {
+- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
++ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
+ continue;
+
+ if (table[i].target) {
+@@ -61,7 +61,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+
+ /* check if one of the targets exists */
+ NULSTR_FOREACH(s, table[i].target) {
+- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
++ if (faccessat(fd, s, F_OK, 0) < 0)
+ continue;
+
+ /* check if a specific file exists at the target path */
+@@ -72,7 +72,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+ if (!p)
+ return log_oom();
+
+- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
++ if (faccessat(fd, p, F_OK, 0) < 0)
+ continue;
+ }
+
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch b/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
deleted file mode 100644
index 6e6f344890..0000000000
--- a/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Subject: [PATCH 15/36] systemd-user: avoid using system-auth
-
-In OE, we don't provide system-auth, instead, we use common-* files.
-So modify systemd-user file to use common-* files.
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- src/login/systemd-user.m4 | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/login/systemd-user.m4 b/src/login/systemd-user.m4
-index f188a8e..862d8d7 100644
---- a/src/login/systemd-user.m4
-+++ b/src/login/systemd-user.m4
-@@ -2,11 +2,11 @@
- #
- # Used by systemd --user instances.
-
--account include system-auth
-+account include common-account
-
- m4_ifdef(`HAVE_SELINUX',
- session required pam_selinux.so close
- session required pam_selinux.so nottys open
- )m4_dnl
- session required pam_loginuid.so
--session include system-auth
-+session include common-session
---
-2.8.3
-
diff --git a/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
new file mode 100644
index 0000000000..d5565698aa
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -0,0 +1,34 @@
+From af76c973e41929360a6e021f2ff9a7fc1d7994e9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 27 May 2018 08:36:44 -0700
+Subject: [PATCH 16/24] Define glibc compatible basename() for non-glibc
+ systems
+
+Fixes builds with musl, even though systemd is adamant about
+using non-posix basename implementation, we have a way out
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/machine/machine-dbus.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
+index 7a558df..eca7d4b 100644
+--- a/src/machine/machine-dbus.c
++++ b/src/machine/machine-dbus.c
+@@ -11,6 +11,10 @@
+ #include <libgen.h>
+ #undef basename
+
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ #include "alloc-util.h"
+ #include "bus-common-errors.h"
+ #include "bus-internal.h"
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch b/meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch
deleted file mode 100644
index 66905b5c57..0000000000
--- a/meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 7311ecc745c17d6ed9fd9cf43039648483a87605 Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Thu, 19 Mar 2015 15:01:29 +1100
-Subject: [PATCH 16/36] Revert "rules: remove firmware loading rules"
-
-This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
-Userspace firmware loading support is needed for Linux < 3.7.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
----
- rules/50-firmware.rules | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 rules/50-firmware.rules
-
-diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
-new file mode 100644
-index 0000000..f0ae684
---- /dev/null
-+++ b/rules/50-firmware.rules
-@@ -0,0 +1,3 @@
-+# do not edit this file, it will be overwritten on update
-+
-+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
new file mode 100644
index 0000000000..24e24e8e5a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -0,0 +1,38 @@
+From c7a4efb8bccb52e1714c151929c23e12bde59b82 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 4 Jul 2018 15:00:44 +0800
+Subject: [PATCH 17/24] Do not disable buffering when writing to oom_score_adj
+
+On musl, disabling buffering when writing to oom_score_adj will
+cause the following error.
+
+ Failed to adjust OOM setting: Invalid argument
+
+This error appears for systemd-udevd.service and dbus.service.
+This is because kernel receives '-' instead of the whole '-900'
+if buffering is disabled.
+
+This is libc implementation specific, as glibc does not have this issue.
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ src/basic/process-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index b1c08fcade..0a7a1f7d89 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -1474,7 +1474,7 @@ int set_oom_score_adjust(int value) {
+ sprintf(t, "%i", value);
+
+ return write_string_file("/proc/self/oom_score_adj", t,
+- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER);
++ WRITE_STRING_FILE_VERIFY_ON_FAILURE);
+ }
+
+ static const char *const ioprio_class_table[] = {
diff --git a/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
deleted file mode 100644
index 642625f32f..0000000000
--- a/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
+++ /dev/null
@@ -1,351 +0,0 @@
-Subject: [PATCH 17/36] Revert "udev: remove userspace firmware loading
- support"
-
-This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
-Userspace firmware loading support is needed for Linux < 3.7.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 12 +++
- README | 4 +-
- TODO | 1 +
- configure.ac | 22 ++++++
- src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
- src/udev/udev-builtin.c | 3 +
- src/udev/udev.h | 6 ++
- src/udev/udevd.c | 13 ++++
- 8 files changed, 213 insertions(+), 2 deletions(-)
- create mode 100644 src/udev/udev-builtin-firmware.c
-
-diff --git a/Makefile.am b/Makefile.am
-index 305099a..e774976 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -3706,6 +3706,18 @@ libudev_core_la_LIBADD = \
- $(BLKID_LIBS) \
- $(KMOD_LIBS)
-
-+libudev_core_la_CPPFLAGS = \
-+ $(AM_CPPFLAGS) \
-+ -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-+
-+if ENABLE_FIRMWARE
-+libudev_core_la_SOURCES += \
-+ src/udev/udev-builtin-firmware.c
-+
-+dist_udevrules_DATA += \
-+ rules/50-firmware.rules
-+endif
-+
- if HAVE_KMOD
- libudev_core_la_SOURCES += \
- src/udev/udev-builtin-kmod.c
-diff --git a/README b/README
-index ca8993c..87f3297 100644
---- a/README
-+++ b/README
-@@ -56,8 +56,8 @@ REQUIREMENTS:
- Legacy hotplug slows down the system and confuses udev:
- CONFIG_UEVENT_HELPER_PATH=""
-
-- Userspace firmware loading is not supported and should
-- be disabled in the kernel:
-+ Userspace firmware loading is deprecated, will go away, and
-+ sometimes causes problems:
- CONFIG_FW_LOADER_USER_HELPER=n
-
- Some udev rules and virtualization detection relies on it:
-diff --git a/TODO b/TODO
-index fac9ccf..2645582 100644
---- a/TODO
-+++ b/TODO
-@@ -642,6 +642,7 @@ Features:
- * initialize the hostname from the fs label of /, if /etc/hostname does not exist?
-
- * udev:
-+ - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
- - move to LGPL
- - kill scsi_id
- - add trigger --subsystem-match=usb/usb_device device
-diff --git a/configure.ac b/configure.ac
-index 329861a..af85405 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1361,6 +1361,25 @@ AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database
- AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
-
- # ------------------------------------------------------------------------------
-+AC_ARG_WITH(firmware-path,
-+ AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
-+ [Firmware search path (default="")]),
-+ [], [with_firmware_path=""])
-+OLD_IFS=$IFS
-+IFS=:
-+for i in $with_firmware_path; do
-+ if test "x${FIRMWARE_PATH}" = "x"; then
-+ FIRMWARE_PATH="\\\"${i}/\\\""
-+ else
-+ FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
-+ fi
-+done
-+IFS=$OLD_IFS
-+AC_SUBST(FIRMWARE_PATH)
-+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is availabe]) ])
-+AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
-+
-+# ------------------------------------------------------------------------------
- have_manpages=no
- AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
- AC_PATH_PROG([XSLTPROC], [xsltproc])
-@@ -1656,6 +1675,9 @@ AC_MSG_RESULT([
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
-+ Installation Python: ${PYTHON_BINARY}
-+ sphinx binary: ${SPHINX_BUILD}
-+ firmware path: ${FIRMWARE_PATH}
- PAM modules dir: ${with_pamlibdir}
- PAM configuration dir: ${with_pamconfdir}
- D-Bus policy dir: ${with_dbuspolicydir}
-diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
-new file mode 100644
-index 0000000..bd8c2fb
---- /dev/null
-+++ b/src/udev/udev-builtin-firmware.c
-@@ -0,0 +1,154 @@
-+/*
-+ * firmware - Kernel firmware loader
-+ *
-+ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
-+ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of the
-+ * License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * General Public License for more details:*
-+ */
-+
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <stdio.h>
-+#include <getopt.h>
-+#include <errno.h>
-+#include <stdbool.h>
-+#include <sys/utsname.h>
-+#include <sys/stat.h>
-+
-+#include "udev.h"
-+
-+static bool set_loading(struct udev *udev, char *loadpath, const char *state) {
-+ FILE *ldfile;
-+
-+ ldfile = fopen(loadpath, "we");
-+ if (ldfile == NULL) {
-+ log_error("error: can not open '%s'", loadpath);
-+ return false;
-+ };
-+ fprintf(ldfile, "%s\n", state);
-+ fclose(ldfile);
-+ return true;
-+}
-+
-+static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) {
-+ char *buf;
-+ FILE *fsource = NULL, *ftarget = NULL;
-+ bool ret = false;
-+
-+ buf = malloc(size);
-+ if (buf == NULL) {
-+ log_error("No memory available to load firmware file");
-+ return false;
-+ }
-+
-+ log_debug("writing '%s' (%zi) to '%s'", source, size, target);
-+
-+ fsource = fopen(source, "re");
-+ if (fsource == NULL)
-+ goto exit;
-+ ftarget = fopen(target, "we");
-+ if (ftarget == NULL)
-+ goto exit;
-+ if (fread(buf, size, 1, fsource) != 1)
-+ goto exit;
-+ if (fwrite(buf, size, 1, ftarget) == 1)
-+ ret = true;
-+exit:
-+ if (ftarget != NULL)
-+ fclose(ftarget);
-+ if (fsource != NULL)
-+ fclose(fsource);
-+ free(buf);
-+ return ret;
-+}
-+
-+static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) {
-+ struct udev *udev = udev_device_get_udev(dev);
-+ static const char *searchpath[] = { FIRMWARE_PATH };
-+ char loadpath[UTIL_PATH_SIZE];
-+ char datapath[UTIL_PATH_SIZE];
-+ char fwpath[UTIL_PATH_SIZE];
-+ const char *firmware;
-+ FILE *fwfile = NULL;
-+ struct utsname kernel;
-+ struct stat statbuf;
-+ unsigned int i;
-+ int rc = EXIT_SUCCESS;
-+
-+ firmware = udev_device_get_property_value(dev, "FIRMWARE");
-+ if (firmware == NULL) {
-+ log_error("firmware parameter missing");
-+ rc = EXIT_FAILURE;
-+ goto exit;
-+ }
-+
-+ /* lookup firmware file */
-+ uname(&kernel);
-+ for (i = 0; i < ELEMENTSOF(searchpath); i++) {
-+ strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
-+ fwfile = fopen(fwpath, "re");
-+ if (fwfile != NULL)
-+ break;
-+
-+ strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
-+ fwfile = fopen(fwpath, "re");
-+ if (fwfile != NULL)
-+ break;
-+ }
-+
-+ strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
-+
-+ if (fwfile == NULL) {
-+ log_debug("did not find firmware file '%s'", firmware);
-+ rc = EXIT_FAILURE;
-+ /*
-+ * Do not cancel the request in the initrd, the real root might have
-+ * the firmware file and the 'coldplug' run in the real root will find
-+ * this pending request and fulfill or cancel it.
-+ * */
-+ if (!in_initrd())
-+ set_loading(udev, loadpath, "-1");
-+ goto exit;
-+ }
-+
-+ if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
-+ if (!in_initrd())
-+ set_loading(udev, loadpath, "-1");
-+ rc = EXIT_FAILURE;
-+ goto exit;
-+ }
-+
-+ if (!set_loading(udev, loadpath, "1"))
-+ goto exit;
-+
-+ strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
-+ if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
-+ log_error("error sending firmware '%s' to device", firmware);
-+ set_loading(udev, loadpath, "-1");
-+ rc = EXIT_FAILURE;
-+ goto exit;
-+ };
-+
-+ set_loading(udev, loadpath, "0");
-+exit:
-+ if (fwfile)
-+ fclose(fwfile);
-+ return rc;
-+}
-+
-+const struct udev_builtin udev_builtin_firmware = {
-+ .name = "firmware",
-+ .cmd = builtin_firmware,
-+ .help = "kernel firmware loader",
-+ .run_once = true,
-+};
-diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
-index e6b36f1..cd9947e 100644
---- a/src/udev/udev-builtin.c
-+++ b/src/udev/udev-builtin.c
-@@ -31,6 +31,9 @@ static const struct udev_builtin *builtins[] = {
- [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
- #endif
- [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-+#ifdef HAVE_FIRMWARE
-+ [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
-+#endif
- [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
- [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
- [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
-diff --git a/src/udev/udev.h b/src/udev/udev.h
-index 8433e8d..d32366d 100644
---- a/src/udev/udev.h
-+++ b/src/udev/udev.h
-@@ -148,6 +148,9 @@ enum udev_builtin_cmd {
- UDEV_BUILTIN_BLKID,
- #endif
- UDEV_BUILTIN_BTRFS,
-+#ifdef HAVE_FIRMWARE
-+ UDEV_BUILTIN_FIRMWARE,
-+#endif
- UDEV_BUILTIN_HWDB,
- UDEV_BUILTIN_INPUT_ID,
- UDEV_BUILTIN_KEYBOARD,
-@@ -176,6 +179,9 @@ struct udev_builtin {
- extern const struct udev_builtin udev_builtin_blkid;
- #endif
- extern const struct udev_builtin udev_builtin_btrfs;
-+#ifdef HAVE_FIRMWARE
-+extern const struct udev_builtin udev_builtin_firmware;
-+#endif
- extern const struct udev_builtin udev_builtin_hwdb;
- extern const struct udev_builtin udev_builtin_input_id;
- extern const struct udev_builtin udev_builtin_keyboard;
-diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index e9dd2f4..0abc28e 100644
---- a/src/udev/udevd.c
-+++ b/src/udev/udevd.c
-@@ -125,6 +125,9 @@ struct event {
- bool is_block;
- sd_event_source *timeout_warning;
- sd_event_source *timeout;
-+#ifdef HAVE_FIRMWARE
-+ bool nodelay;
-+#endif
- };
-
- static inline struct event *node_to_event(struct udev_list_node *node) {
-@@ -614,6 +617,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
- event->devnum = udev_device_get_devnum(dev);
- event->is_block = streq("block", udev_device_get_subsystem(dev));
- event->ifindex = udev_device_get_ifindex(dev);
-+#ifdef HAVE_FIRMWARE
-+ if (streq(udev_device_get_subsystem(dev), "firmware"))
-+ event->nodelay = true;
-+#endif
-
- log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
- udev_device_get_action(dev), udev_device_get_subsystem(dev));
-@@ -699,6 +706,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
- return true;
- }
-
-+#ifdef HAVE_FIRMWARE
-+ /* allow to bypass the dependency tracking */
-+ if (event->nodelay)
-+ continue;
-+#endif
-+
- /* parent device event found */
- if (event->devpath[common] == '/') {
- event->delaying_seqnum = loop_event->seqnum;
---
-2.8.3
-
diff --git a/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
new file mode 100644
index 0000000000..5901772998
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
@@ -0,0 +1,62 @@
+From fffb2810611b4a26f5c6c0958093b5b3b7d4cd99 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 10 Jul 2018 15:40:17 +0800
+Subject: [PATCH 18/24] distinguish XSI-compliant strerror_r from GNU-specifi
+ strerror_r
+
+XSI-compliant strerror_r and GNU-specifi strerror_r are different.
+
+ int strerror_r(int errnum, char *buf, size_t buflen);
+ /* XSI-compliant */
+
+ char *strerror_r(int errnum, char *buf, size_t buflen);
+ /* GNU-specific */
+
+We need to distinguish between them. Otherwise, we'll get an int value
+assigned to (char *) variable, resulting in segment fault.
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/journal/journal-send.c | 5 +++++
+ src/libsystemd/sd-bus/bus-error.c | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
+index 3fea912..4f1e592 100644
+--- a/src/journal/journal-send.c
++++ b/src/journal/journal-send.c
+@@ -337,7 +337,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove
+ char* j;
+
+ errno = 0;
++#ifndef __GLIBC__
++ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k);
++ j = buffer + 8 + k;
++#else
+ j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k);
++#endif
+ if (errno == 0) {
+ char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1];
+
+diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
+index dc95237..bdda30f 100644
+--- a/src/libsystemd/sd-bus/bus-error.c
++++ b/src/libsystemd/sd-bus/bus-error.c
+@@ -379,7 +379,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
+ return;
+
+ errno = 0;
++#ifndef __GLIBC__
++ strerror_r(error, m, k);
++ x = m;
++#else
+ x = strerror_r(error, m, k);
++#endif
+ if (errno == ERANGE || strlen(x) >= k - 1) {
+ free(m);
+ k *= 2;
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch b/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch
deleted file mode 100644
index 5d13e4af94..0000000000
--- a/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Subject: [PATCH 18/36] make test dir configurable
-
-Upstream-Status: Pending
-
-test maybe be run on target in cross-compile environment, and test dir
-is not the compilation dir, so make it configurable
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-
----
- Makefile.am | 2 +-
- configure.ac | 7 +++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index a94636a..dbd3386 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -207,7 +207,7 @@ AM_CPPFLAGS = \
- -DROOTLIBDIR=\"$(rootlibdir)\" \
- -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
- -DROOTHOMEDIR=\"$(roothomedir)\" \
-- -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
-+ -DTEST_DIR=\"$(testdir)/test\" \
- -I $(top_srcdir)/src \
- -I $(top_builddir)/src/basic \
- -I $(top_srcdir)/src/basic \
-diff --git a/configure.ac b/configure.ac
-index 45aae8a..c53fae2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1518,6 +1518,11 @@ AC_ARG_WITH([roothomedir],
- [],
- [with_roothomedir=/root])
-
-+AC_ARG_WITH([testdir],
-+ AS_HELP_STRING([--with-testdir=DIR], [test file directory]),
-+ [],
-+ [with_testdir=${abs_top_srcdir}])
-+
- AC_ARG_WITH([pamlibdir],
- AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
- [],
-@@ -1603,6 +1608,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
- AC_SUBST([rootprefix], [$with_rootprefix])
- AC_SUBST([rootlibdir], [$with_rootlibdir])
- AC_SUBST([roothomedir], [$with_roothomedir])
-+AC_SUBST([testdir], [$with_testdir])
-
- AC_CONFIG_FILES([
- Makefile
-@@ -1695,6 +1701,7 @@ AC_MSG_RESULT([
- lib dir: ${libdir}
- rootlib dir: ${with_rootlibdir}
- root home dir: ${with_roothomedir}
-+ test dir: ${with_testdir}
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
---
-2.8.3
-
diff --git a/meta/recipes-core/systemd/systemd/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/meta/recipes-core/systemd/systemd/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
new file mode 100644
index 0000000000..35cc66ff66
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
@@ -0,0 +1,35 @@
+From 969ab9e68249fd383f4b513b1c9306bdac4ae9b2 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 15:18:00 +0800
+Subject: [PATCH 19/24] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP
+
+for currently unknown reasons they get exported to the shared libries
+even without being listed in the sym file
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+[Rebased for v241]
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/libsystemd/sd-bus/bus-error.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
+index bdda30f..e21853c 100644
+--- a/src/libsystemd/sd-bus/bus-error.c
++++ b/src/libsystemd/sd-bus/bus-error.c
+@@ -54,8 +54,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
+ };
+
+ /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
+-extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[];
+-extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[];
++extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[] _hidden_;
++extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[] _hidden_;
+
+ /* Additional maps registered with sd_bus_error_add_map() are in this
+ * NULL terminated array */
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch b/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch
deleted file mode 100644
index 17592f8aa6..0000000000
--- a/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 3ca534935460647fed66e31aaa90b364e29eab5c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 22 Feb 2016 05:59:01 +0000
-Subject: [PATCH 1/2] remove duplicate include uchar.h
-
-missing.h already includes it
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/escape.h | 1 -
- src/basic/utf8.h | 1 -
- 2 files changed, 2 deletions(-)
-
-diff --git a/src/basic/escape.h b/src/basic/escape.h
-index deaa4de..36d437c 100644
---- a/src/basic/escape.h
-+++ b/src/basic/escape.h
-@@ -23,7 +23,6 @@
- #include <stddef.h>
- #include <stdint.h>
- #include <sys/types.h>
--#include <uchar.h>
-
- #include "string-util.h"
- #include "missing.h"
-diff --git a/src/basic/utf8.h b/src/basic/utf8.h
-index 12c272d..bea93a6 100644
---- a/src/basic/utf8.h
-+++ b/src/basic/utf8.h
-@@ -22,7 +22,6 @@
- #include <stdbool.h>
- #include <stddef.h>
- #include <stdint.h>
--#include <uchar.h>
-
- #include "macro.h"
- #include "missing.h"
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch b/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch
deleted file mode 100644
index a027fad1d9..0000000000
--- a/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e06eec89a22719c38e257fe07afff18e359114cb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 22 Feb 2016 06:02:38 +0000
-Subject: [PATCH 2/2] check for uchar.h in configure
-
-Use ifdef to include uchar.h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 1 +
- src/basic/missing.h | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index ecc3e6b..62f934e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -297,6 +297,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
-
- # ------------------------------------------------------------------------------
-
-+AC_CHECK_HEADERS([uchar.h], [], [])
- AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
- AC_CHECK_HEADERS([linux/btrfs.h], [], [])
- AC_CHECK_HEADERS([linux/memfd.h], [], [])
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index f704422..a1baa95 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -34,7 +34,9 @@
- #include <stdlib.h>
- #include <sys/resource.h>
- #include <sys/syscall.h>
-+#ifdef HAVE_UCHAR_H
- #include <uchar.h>
-+#endif
- #include <unistd.h>
-
- #ifdef HAVE_AUDIT
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0020-missing_type.h-add-__compar_d_fn_t-definition.patch b/meta/recipes-core/systemd/systemd/0020-missing_type.h-add-__compar_d_fn_t-definition.patch
new file mode 100644
index 0000000000..753d5116ac
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0020-missing_type.h-add-__compar_d_fn_t-definition.patch
@@ -0,0 +1,30 @@
+From 75c06e3e2a4760b36fffd95cdf5535b8ad73c481 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 15:27:54 +0800
+Subject: [PATCH 20/24] missing_type.h: add __compar_d_fn_t definition
+
+Fix the following compile failure:
+src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean '__compar_fn_t'?
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing_type.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
+index 7d7c1e4..85902ab 100644
+--- a/src/basic/missing_type.h
++++ b/src/basic/missing_type.h
+@@ -13,6 +13,7 @@
+
+ #ifndef __GLIBC__
+ typedef int (*comparison_fn_t)(const void *, const void *);
++typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
+ #endif
+
+ #ifndef __COMPAR_FN_T
+--
+2.7.4
+
diff --git a/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch
new file mode 100644
index 0000000000..cdddf83890
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch
@@ -0,0 +1,32 @@
+From 3fbf61d54b82fc9bf21d8039bfd89dc9efc5bbcd Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 15:44:54 +0800
+Subject: [PATCH 21/24] avoid redefinition of prctl_mm_map structure
+
+Fix the following compile failure:
+error: redefinition of 'struct prctl_mm_map'
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing_prctl.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h
+index f80cd17..47e4893 100644
+--- a/src/basic/missing_prctl.h
++++ b/src/basic/missing_prctl.h
+@@ -1,7 +1,9 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+ #pragma once
+
++#ifdef __GLIBC__
+ #include <linux/prctl.h>
++#endif
+
+ /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */
+ #ifndef PR_CAP_AMBIENT
+--
+2.11.0
+
diff --git a/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch b/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch
deleted file mode 100644
index 5797a29e60..0000000000
--- a/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 6cedbaee7964f6a6c61b9f2c8f0b87cef9370424 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 15 Dec 2015 22:51:55 +0000
-Subject: [PATCH 26/38] include missing.h for getting secure_getenv definition
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/user-util.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/basic/user-util.c b/src/basic/user-util.c
-index 55672b3..22c4a23 100644
---- a/src/basic/user-util.c
-+++ b/src/basic/user-util.c
-@@ -38,6 +38,7 @@
- #include "path-util.h"
- #include "string-util.h"
- #include "user-util.h"
-+#include "missing.h"
-
- bool uid_is_valid(uid_t uid) {
-
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
deleted file mode 100644
index 96fc3d8448..0000000000
--- a/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 71e710a6c8a3879af7d50c4cb995e0615deba5c3 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Sat, 12 Sep 2015 19:56:52 +0000
-Subject: [PATCH 29/38] socket-util: don't fail if libc doesn't support IDN
-
-Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/socket-util.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
-index 5851268..aefaca5 100644
---- a/src/basic/socket-util.c
-+++ b/src/basic/socket-util.c
-@@ -44,6 +44,15 @@
- #include "string-util.h"
- #include "user-util.h"
- #include "util.h"
-+/* Don't fail if the standard library
-+ * doesn't support IDN */
-+#ifndef NI_IDN
-+#define NI_IDN 0
-+#endif
-+
-+#ifndef NI_IDN_USE_STD3_ASCII_RULES
-+#define NI_IDN_USE_STD3_ASCII_RULES 0
-+#endif
-
- int socket_address_parse(SocketAddress *a, const char *s) {
- char *e, *n;
---
-1.8.3.1
-
diff --git a/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch b/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch
new file mode 100644
index 0000000000..0e5629d37b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch
@@ -0,0 +1,33 @@
+From 902412c271e0c5d9cb93b10ec0fb5b119b393474 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 16:53:06 +0800
+Subject: [PATCH 24/24] test-json.c: define M_PIl
+
+Fix the following compile failure:
+src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'?
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/test-json.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/test/test-json.c b/src/test/test-json.c
+index 9b8a2a9..efc746c 100644
+--- a/src/test/test-json.c
++++ b/src/test/test-json.c
+@@ -11,6 +11,10 @@
+ #include "tests.h"
+ #include "util.h"
+
++#ifndef M_PIl
++#define M_PIl 3.141592653589793238462643383279502884L
++#endif
++
+ static void test_tokenizer(const char *data, ...) {
+ unsigned line = 0, column = 0;
+ void *state = NULL;
+--
+2.11.0
+
diff --git a/meta/recipes-core/systemd/systemd/99-default.preset b/meta/recipes-core/systemd/systemd/99-default.preset
new file mode 100644
index 0000000000..1f29b50597
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/99-default.preset
@@ -0,0 +1 @@
+disable *
diff --git a/meta/recipes-core/systemd/systemd/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest
deleted file mode 100644
index 2ae76ffaf1..0000000000
--- a/meta/recipes-core/systemd/systemd/run-ptest
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-cd tests
-tar -C test -xJf test/sys.tar.xz
-make check-TESTS
-cd ..
diff --git a/meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch b/meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch
deleted file mode 100644
index 23e22d40e6..0000000000
--- a/meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Michael Biebl <biebl@debian.org>
-Date: Sat, 27 Sep 2014 04:19:24 +0200
-Subject: udev: re-enable mount propagation for udevd
-
-Upstream-Status: Backport [http://http.debian.net/debian/pool/main/s/systemd/systemd_215-17+deb8u4.debian.tar.xz]
-
-laptop-mode-tools remounts file systems from within a udev rule to apply
-certain mount options. With MountFlags=slave, those mounts then become private
-to the systemd-udevd namespace and are no longer accessible from outside the
-namespace.
-While the root cause is the broken behaviour of laptop-mode-tools, with mount
-propagation turned off, this can result in a read-only root file system.
-Therefore revert the relevant parts from commit
-c2c13f2df42e0691aecabe3979ea81cd7faa35c7 to re-enable mount propagation for
-udevd.
-
-Once affected packages have been fixed, this patch should be dropped
-again.
-
-Closes: #762018
-diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in
-index e7216d6..1e9a600 100644
---- a/units/systemd-udevd.service.in
-+++ b/units/systemd-udevd.service.in
-@@ -21,6 +21,5 @@ Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket
- Restart=always
- RestartSec=0
- ExecStart=@rootlibexecdir@/systemd-udevd
--MountFlags=slave
- KillMode=mixed
- WatchdogSec=1min
diff --git a/meta/recipes-core/systemd/systemd_230.bb b/meta/recipes-core/systemd/systemd_230.bb
deleted file mode 100644
index a949fe8dbf..0000000000
--- a/meta/recipes-core/systemd/systemd_230.bb
+++ /dev/null
@@ -1,598 +0,0 @@
-require systemd.inc
-
-PROVIDES = "udev"
-
-PE = "1"
-
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline libcap libcgroup qemu-native util-linux"
-
-SECTION = "base/shell"
-
-inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion
-
-SRC_URI += " \
- file://touchscreen.rules \
- file://00-create-volatile.conf \
- file://init \
- file://run-ptest \
- file://0003-define-exp10-if-missing.patch \
- file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
- file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
- file://0006-configure-Check-for-additional-features-that-uclibc-.patch \
- file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
- file://0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
- file://0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
- file://0010-implment-systemd-sysv-install-for-OE.patch \
- file://0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
- file://0012-rules-whitelist-hd-devices.patch \
- file://0013-sysv-generator-add-support-for-executing-scripts-und.patch \
- file://0014-Make-root-s-home-directory-configurable.patch \
- file://0015-systemd-user-avoid-using-system-auth.patch \
- file://0016-Revert-rules-remove-firmware-loading-rules.patch \
- file://0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
- file://0018-make-test-dir-configurable.patch \
- file://0019-remove-duplicate-include-uchar.h.patch \
- file://0020-check-for-uchar.h-in-configure.patch \
- file://0021-include-missing.h-for-getting-secure_getenv-definiti.patch \
- file://0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
- file://udev-re-enable-mount-propagation-for-udevd.patch \
-"
-SRC_URI_append_libc-uclibc = "\
- file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
-"
-SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
-
-PACKAGECONFIG ??= "xz \
- ldconfig \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
- ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'efi', '', d)} \
- binfmt \
- randomseed \
- machined \
- backlight \
- quotacheck \
- hostnamed \
- ${@bb.utils.contains('TCLIBC', 'glibc', 'myhostname sysusers', '', d)} \
- hibernate \
- timedated \
- timesyncd \
- localed \
- kdbus \
- ima \
- smack \
- logind \
- firstboot \
- utmp \
- polkit \
-"
-PACKAGECONFIG_remove_libc-musl = "selinux"
-PACKAGECONFIG_remove_libc-musl = "smack"
-
-# Use the upstream systemd serial-getty@.service and rely on
-# systemd-getty-generator instead of using the OE-core specific
-# systemd-serialgetty.bb - not enabled by default.
-PACKAGECONFIG[serial-getty-generator] = ""
-
-PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
-# Sign the journal for anti-tampering
-PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
-PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
-PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
-PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
-PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
-PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
-PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
-PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
-PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
-PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
-PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
-PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
-PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
-PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
-PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
-PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
-PACKAGECONFIG[kdbus] = "--enable-kdbus,--disable-kdbus"
-PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
-PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
-# libseccomp is found in meta-security
-PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
-PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
-PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
-PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
-PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
-PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
-PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
-# importd requires curl/xz/zlib/bzip2/gcrypt
-PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
-PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
-PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
-PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
-# Verify keymaps on locale change
-PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
-# Update NAT firewall rules
-PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
-PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
-PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind"
-PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
-PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
-PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
-PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
-PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-
-CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
-CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
-CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck"
-CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon"
-CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
-
-# Helper variables to clarify locations. This mirrors the logic in systemd's
-# build system.
-rootprefix ?= "${base_prefix}"
-rootlibdir ?= "${base_libdir}"
-rootlibexecdir = "${rootprefix}/lib"
-
-CACHED_CONFIGUREVARS_class-target = "\
- ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
- ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
- ac_cv_path_KMOD=${base_bindir}/kmod \
- ac_cv_path_KILL=${base_bindir}/kill \
- ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
- ac_cv_path_KEXEC=${sbindir}/kexec \
- ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
- ac_cv_path_QUOTAON=${sbindir}/quotaon \
- "
-
-EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
- --with-rootlibdir=${rootlibdir} \
- --with-roothomedir=${ROOT_HOME} \
- --enable-split-usr \
- --without-python \
- --with-sysvrcnd-path=${sysconfdir} \
- --with-firmware-path=/lib/firmware \
- --with-testdir=${PTEST_PATH} \
- "
-# per the systemd README, define VALGRIND=1 to run under valgrind
-CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
-
-# disable problematic GCC 5.2 optimizations [YOCTO #8291]
-FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
-
-do_configure_prepend() {
- export NM="${HOST_PREFIX}gcc-nm"
- export AR="${HOST_PREFIX}gcc-ar"
- export RANLIB="${HOST_PREFIX}gcc-ranlib"
- export KMOD="${base_bindir}/kmod"
- if [ -d ${S}/units.pre_sed ] ; then
- cp -r ${S}/units.pre_sed ${S}/units
- else
- cp -r ${S}/units ${S}/units.pre_sed
- fi
- sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
- sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
-}
-
-do_install() {
- autotools_do_install
- install -d ${D}/${base_sbindir}
- if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
- # Provided by a separate recipe
- rm ${D}${systemd_unitdir}/system/serial-getty* -f
- fi
-
- # Provide support for initramfs
- [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
- [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
-
- # Create machine-id
- # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
- touch ${D}${sysconfdir}/machine-id
-
-
- install -d ${D}${sysconfdir}/udev/rules.d/
- install -d ${D}${sysconfdir}/tmpfiles.d
- install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
- install -d ${D}${libdir}/pkgconfig
- install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/
-
- install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
-
- if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
- sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
- fi
-
- chown root:systemd-journal ${D}/${localstatedir}/log/journal
-
- # Delete journal README, as log can be symlinked inside volatile.
- rm -f ${D}/${localstatedir}/log/README
-
- install -d ${D}${systemd_unitdir}/system/graphical.target.wants
- install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
- install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
- install -d ${D}${systemd_unitdir}/system/reboot.target.wants
- install -d ${D}${systemd_unitdir}/system/rescue.target.wants
-
- # Create symlinks for systemd-update-utmp-runlevel.service
- if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
- fi
-
- # Enable journal to forward message to syslog daemon
- sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
- # Set the maximium size of runtime journal to 64M as default
- sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
-
- # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
- # for existence else it fails
- if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
- ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
- fi
- if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
- # if resolved is disabled, it won't handle the link of resolv.conf, so
- # set it up ourselves
- ln -s ../run/resolv.conf ${D}${sysconfdir}/resolv.conf
- echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
- echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
- fi
- install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
-}
-
-do_install_ptest () {
- # install data files needed for tests
- install -d ${D}${PTEST_PATH}/tests/test
- cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
- # python is disabled for systemd, thus removing these python testing scripts
- rm ${D}${PTEST_PATH}/tests/test/*.py
- sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
-
- install -d ${D}${PTEST_PATH}/tests/catalog
- install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
-
- install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
-
- install -d ${D}${PTEST_PATH}/tests/rules
- install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
-
- # This directory needs to be there for udev-test.pl to work.
- install -d ${D}${libdir}/udev/rules.d
-
- # install actual test binaries
- install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
- install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
-
- install ${B}/Makefile ${D}${PTEST_PATH}/tests/
-}
-
-python populate_packages_prepend (){
- systemdlibdir = d.getVar("rootlibdir", True)
- do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
-}
-PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
-
-PACKAGES =+ "\
- ${PN}-gui \
- ${PN}-vconsole-setup \
- ${PN}-initramfs \
- ${PN}-analyze \
- ${PN}-kernel-install \
- ${PN}-rpm-macros \
- ${PN}-binfmt \
- ${PN}-pam \
- ${PN}-zsh-completion \
- ${PN}-xorg-xinitrc \
- ${PN}-container \
- ${PN}-extra-utils \
-"
-
-SUMMARY_${PN}-container = "Tools for containers and VMs"
-DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
-
-SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
-SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
-
-USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
-USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
-
-FILES_${PN}-analyze = "${bindir}/systemd-analyze"
-
-FILES_${PN}-initramfs = "/init"
-RDEPENDS_${PN}-initramfs = "${PN}"
-
-RDEPENDS_${PN}-ptest += "gawk make perl bash xz \
- tzdata tzdata-americas tzdata-asia \
- tzdata-europe tzdata-africa tzdata-antarctica \
- tzdata-arctic tzdata-atlantic tzdata-australia \
- tzdata-pacific tzdata-posix"
-
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
-
-FILES_${PN}-gui = "${bindir}/systemadm"
-
-FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
- ${systemd_unitdir}/system/systemd-vconsole-setup.service \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
-
-RDEPENDS_${PN}-kernel-install += "bash"
-FILES_${PN}-kernel-install = "${bindir}/kernel-install \
- ${sysconfdir}/kernel/ \
- ${exec_prefix}/lib/kernel \
- "
-FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
- "
-
-FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
-
-FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
-
-FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
- ${exec_prefix}/lib/binfmt.d \
- ${rootlibexecdir}/systemd/systemd-binfmt \
- ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
- ${systemd_unitdir}/system/systemd-binfmt.service"
-RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-
-FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
- ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
- ${base_bindir}/machinectl \
- ${bindir}/systemd-nspawn \
- ${nonarch_libdir}/systemd/import-pubring.gpg \
- ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
- ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
- ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
- ${systemd_system_unitdir}/machine.slice \
- ${systemd_system_unitdir}/machines.target \
- ${systemd_system_unitdir}/org.freedesktop.import1.busname \
- ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
- ${systemd_system_unitdir}/systemd-importd.service \
- ${systemd_system_unitdir}/systemd-machined.service \
- ${systemd_system_unitdir}/var-lib-machines.mount \
- ${rootlibexecdir}/systemd/systemd-import \
- ${rootlibexecdir}/systemd/systemd-importd \
- ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
- ${rootlibexecdir}/systemd/systemd-journal-remote \
- ${rootlibexecdir}/systemd/systemd-journal-upload \
- ${rootlibexecdir}/systemd/systemd-machined \
- ${rootlibexecdir}/systemd/systemd-pull \
- ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
- ${systemd_system_unitdir}/systemd-nspawn@.service \
- ${libdir}/libnss_mymachines.so.2 \
- ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
- ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
- ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
- ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
- "
-
-FILES_${PN}-extra-utils = "\
- ${base_bindir}/systemd-escape \
- ${base_bindir}/systemd-inhibit \
- ${bindir}/systemd-detect-virt \
- ${bindir}/systemd-path \
- ${bindir}/systemd-run \
- ${bindir}/systemd-cat \
- ${bindir}/systemd-delta \
- ${bindir}/systemd-cgls \
- ${bindir}/systemd-cgtop \
- ${bindir}/systemd-stdio-bridge \
- ${base_bindir}/systemd-ask-password \
- ${base_bindir}/systemd-tty-ask-password-agent \
- ${systemd_unitdir}/system/systemd-ask-password-console.path \
- ${systemd_unitdir}/system/systemd-ask-password-console.service \
- ${systemd_unitdir}/system/systemd-ask-password-wall.path \
- ${systemd_unitdir}/system/systemd-ask-password-wall.service \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
- ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
- ${rootlibexecdir}/systemd/systemd-resolve-host \
- ${rootlibexecdir}/systemd/systemd-ac-power \
- ${rootlibexecdir}/systemd/systemd-activate \
- ${rootlibexecdir}/systemd/systemd-bus-proxyd \
- ${systemd_unitdir}/system/systemd-bus-proxyd.service \
- ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
- ${rootlibexecdir}/systemd/systemd-socket-proxyd \
- ${rootlibexecdir}/systemd/systemd-reply-password \
- ${rootlibexecdir}/systemd/systemd-sleep \
- ${rootlibexecdir}/systemd/system-sleep \
- ${systemd_unitdir}/system/systemd-hibernate.service \
- ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
- ${systemd_unitdir}/system/systemd-suspend.service \
- ${systemd_unitdir}/system/sleep.target \
- ${rootlibexecdir}/systemd/systemd-initctl \
- ${systemd_unitdir}/system/systemd-initctl.service \
- ${systemd_unitdir}/system/systemd-initctl.socket \
- ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
- ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
- ${rootlibexecdir}/systemd/systemd-cgroups-agent \
-"
-
-CONFFILES_${PN} = "${sysconfdir}/machine-id \
- ${sysconfdir}/systemd/coredump.conf \
- ${sysconfdir}/systemd/journald.conf \
- ${sysconfdir}/systemd/logind.conf \
- ${sysconfdir}/systemd/system.conf \
- ${sysconfdir}/systemd/user.conf"
-
-FILES_${PN} = " ${base_bindir}/* \
- ${datadir}/dbus-1/services \
- ${datadir}/dbus-1/system-services \
- ${datadir}/polkit-1 \
- ${datadir}/${BPN} \
- ${datadir}/factory \
- ${sysconfdir}/dbus-1/ \
- ${sysconfdir}/machine-id \
- ${sysconfdir}/modules-load.d/ \
- ${sysconfdir}/pam.d/ \
- ${sysconfdir}/sysctl.d/ \
- ${sysconfdir}/systemd/ \
- ${sysconfdir}/tmpfiles.d/ \
- ${sysconfdir}/xdg/ \
- ${sysconfdir}/init.d/README \
- ${sysconfdir}/resolv.conf \
- ${rootlibexecdir}/systemd/* \
- ${systemd_unitdir}/* \
- ${base_libdir}/security/*.so \
- ${libdir}/libnss_* \
- /cgroup \
- ${bindir}/systemd* \
- ${bindir}/busctl \
- ${bindir}/coredumpctl \
- ${bindir}/localectl \
- ${bindir}/hostnamectl \
- ${bindir}/timedatectl \
- ${bindir}/bootctl \
- ${bindir}/kernel-install \
- ${exec_prefix}/lib/tmpfiles.d/*.conf \
- ${exec_prefix}/lib/systemd \
- ${exec_prefix}/lib/modules-load.d \
- ${exec_prefix}/lib/sysctl.d \
- ${exec_prefix}/lib/sysusers.d \
- ${localstatedir} \
- ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
- ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
- ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
- ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
- "
-
-FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
-
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
-RDEPENDS_${PN} += "volatile-binds update-rc.d"
-
-RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
- systemd-vconsole-setup \
- systemd-extra-utils \
- systemd-compat-units udev-hwdb \
- util-linux-agetty util-linux-fsck e2fsprogs-e2fsck \
- kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
- os-release \
-"
-
-INSANE_SKIP_${PN}-doc += " libdir"
-
-PACKAGES =+ "udev udev-hwdb"
-
-RPROVIDES_udev = "hotplug"
-
-RDEPENDS_udev-hwdb += "udev"
-
-FILES_udev += "${base_sbindir}/udevd \
- ${rootlibexecdir}/systemd/systemd-udevd \
- ${rootlibexecdir}/udev/accelerometer \
- ${rootlibexecdir}/udev/ata_id \
- ${rootlibexecdir}/udev/cdrom_id \
- ${rootlibexecdir}/udev/collect \
- ${rootlibexecdir}/udev/findkeyboards \
- ${rootlibexecdir}/udev/keyboard-force-release.sh \
- ${rootlibexecdir}/udev/keymap \
- ${rootlibexecdir}/udev/mtd_probe \
- ${rootlibexecdir}/udev/scsi_id \
- ${rootlibexecdir}/udev/v4l_id \
- ${rootlibexecdir}/udev/keymaps \
- ${rootlibexecdir}/udev/rules.d/*.rules \
- ${sysconfdir}/udev \
- ${sysconfdir}/init.d/systemd-udevd \
- ${systemd_unitdir}/system/*udev* \
- ${systemd_unitdir}/system/*.wants/*udev* \
- ${base_bindir}/udevadm \
- ${datadir}/bash-completion/completions/udevadm \
- "
-
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
-
-INITSCRIPT_PACKAGES = "udev"
-INITSCRIPT_NAME_udev = "systemd-udevd"
-INITSCRIPT_PARAMS_udev = "start 03 S ."
-
-python __anonymous() {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-# TODO:
-# u-a for runlevel and telinit
-
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
-
-ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
-ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
-ALTERNATIVE_PRIORITY[init] ?= "300"
-
-ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
-ALTERNATIVE_PRIORITY[halt] ?= "300"
-
-ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
-ALTERNATIVE_PRIORITY[reboot] ?= "300"
-
-ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
-ALTERNATIVE_PRIORITY[shutdown] ?= "300"
-
-ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
-ALTERNATIVE_PRIORITY[poweroff] ?= "300"
-
-ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
-ALTERNATIVE_PRIORITY[runlevel] ?= "300"
-
-pkg_postinst_${PN} () {
- sed -e '/^hosts:/s/\s*\<myhostname\>//' \
- -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
- -i $D${sysconfdir}/nsswitch.conf
-}
-
-pkg_prerm_${PN} () {
- sed -e '/^hosts:/s/\s*\<myhostname\>//' \
- -e '/^hosts:/s/\s*myhostname//' \
- -i $D${sysconfdir}/nsswitch.conf
-}
-
-pkg_postinst_udev-hwdb () {
- if test -n "$D"; then
- ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
- --root $D
- chown root:root $D${sysconfdir}/udev/hwdb.bin
- else
- udevadm hwdb --update
- fi
-}
-
-pkg_prerm_udev-hwdb () {
- rm -f $D${sysconfdir}/udev/hwdb.bin
-}
-
-# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
-# that we don't build both udev and systemd in world builds.
-python () {
- if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-
- import re
- if re.match('.*musl*', d.getVar('TARGET_OS', True)) != None:
- raise bb.parse.SkipPackage("Not _yet_ supported on musl based targets")
-}
diff --git a/meta/recipes-core/systemd/systemd_243.bb b/meta/recipes-core/systemd/systemd_243.bb
new file mode 100644
index 0000000000..ac7a5f86b3
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_243.bb
@@ -0,0 +1,682 @@
+require systemd.inc
+
+PROVIDES = "udev"
+
+PE = "1"
+
+DEPENDS = "intltool-native gperf-native libcap util-linux"
+
+SECTION = "base/shell"
+
+inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check
+
+# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
+# that we don't build both udev and systemd in world builds.
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SRC_URI += "file://touchscreen.rules \
+ file://00-create-volatile.conf \
+ file://init \
+ file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
+ file://0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+ file://0003-implment-systemd-sysv-install-for-OE.patch \
+ file://0004-rules-whitelist-hd-devices.patch \
+ file://0005-rules-watch-metadata-changes-in-ide-devices.patch \
+ file://0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch \
+ file://99-default.preset \
+ "
+
+# patches needed by musl
+SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}"
+SRC_URI_MUSL = "\
+ file://0002-don-t-use-glibc-specific-qsort_r.patch \
+ file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
+ file://0004-add-fallback-parse_printf_format-implementation.patch \
+ file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
+ file://0006-Include-netinet-if_ether.h.patch \
+ file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \
+ file://0008-add-missing-FTW_-macros-for-musl.patch \
+ file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
+ file://0011-Use-uintmax_t-for-handling-rlim_t.patch \
+ file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
+ file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
+ file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
+ file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
+ file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
+ file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
+ file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \
+ file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \
+ file://0024-test-json.c-define-M_PIl.patch \
+ file://0001-do-not-disable-buffer-in-writing-files.patch \
+ file://0002-src-login-brightness.c-include-sys-wait.h.patch \
+ file://0003-src-basic-copy.c-include-signal.h.patch \
+ file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \
+ "
+
+PAM_PLUGINS = " \
+ pam-plugin-unix \
+ pam-plugin-loginuid \
+ pam-plugin-keyinit \
+"
+
+PACKAGECONFIG ??= " \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge polkit', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
+ acl \
+ backlight \
+ binfmt \
+ gshadow \
+ hibernate \
+ hostnamed \
+ idn \
+ ima \
+ kmod \
+ localed \
+ logind \
+ machined \
+ myhostname \
+ networkd \
+ nss \
+ nss-mymachines \
+ nss-resolve \
+ quotacheck \
+ randomseed \
+ resolved \
+ set-time-epoch \
+ smack \
+ sysusers \
+ timedated \
+ timesyncd \
+ utmp \
+ vconsole \
+ xz \
+"
+
+PACKAGECONFIG_remove_libc-musl = " \
+ gshadow \
+ idn \
+ localed \
+ myhostname \
+ nss \
+ nss-mymachines \
+ nss-resolve \
+ resolved \
+ smack \
+ sysusers \
+ utmp \
+"
+
+# Use the upstream systemd serial-getty@.service and rely on
+# systemd-getty-generator instead of using the OE-core specific
+# systemd-serialgetty.bb - not enabled by default.
+PACKAGECONFIG[serial-getty-generator] = ""
+
+PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl"
+PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
+PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
+PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
+PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
+PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid"
+PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
+PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup"
+PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
+PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
+PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
+PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
+PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
+PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
+PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
+PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
+PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
+PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
+PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
+# importd requires curl/xz/zlib/bzip2/gcrypt
+PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
+# Update NAT firewall rules
+PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
+PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
+PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod"
+PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
+PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn"
+PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
+PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
+PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
+PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
+PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
+PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname"
+PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
+PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
+PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false"
+PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false"
+PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl"
+PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
+PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2"
+PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
+PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false"
+PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode"
+PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
+PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
+PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
+PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
+# libseccomp is found in meta-security
+PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
+PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
+PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
+PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
+# When enabled use reproducble build timestamp if set as time epoch,
+# or build time if not. When disabled, time epoch is unset.
+def build_epoch(d):
+ epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1"
+ return '-Dtime-epoch=%d' % int(epoch)
+PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
+PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
+PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
+PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
+PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
+PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
+PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
+PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
+# Verify keymaps on locale change
+PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
+PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
+PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
+
+# Helper variables to clarify locations. This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${root_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+# This links udev statically with systemd helper library.
+# Otherwise udev package would depend on systemd package (which has the needed shared library),
+# and always pull it into images.
+EXTRA_OEMESON += "-Dlink-udev-shared=false"
+
+EXTRA_OEMESON += "-Dnobody-user=nobody \
+ -Dnobody-group=nobody \
+ -Drootlibdir=${rootlibdir} \
+ -Drootprefix=${rootprefix} \
+ -Dsysvrcnd-path=${sysconfdir} \
+ -Ddefault-locale=C \
+ "
+
+# Hardcode target binary paths to avoid using paths from sysroot
+EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
+ -Dkmod-path=${base_bindir}/kmod \
+ -Dmount-path=${base_bindir}/mount \
+ -Dquotacheck-path=${sbindir}/quotacheck \
+ -Dquotaon-path=${sbindir}/quotaon \
+ -Dsulogin-path=${base_sbindir}/sulogin \
+ -Dnologin-path=${base_sbindir}/nologin \
+ -Dumount-path=${base_bindir}/umount"
+
+do_install() {
+ meson_do_install
+ install -d ${D}/${base_sbindir}
+ if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
+ # Provided by a separate recipe
+ rm ${D}${systemd_unitdir}/system/serial-getty* -f
+ fi
+
+ # Provide support for initramfs
+ [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
+ [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
+
+ install -d ${D}${sysconfdir}/udev/rules.d/
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+
+ install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
+ sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+ fi
+
+ chown root:systemd-journal ${D}/${localstatedir}/log/journal
+
+ # Delete journal README, as log can be symlinked inside volatile.
+ rm -f ${D}/${localstatedir}/log/README
+
+ # journal-remote creates this at start
+ rm -rf ${D}/${localstatedir}/log/journal/remote
+
+ install -d ${D}${systemd_unitdir}/system/graphical.target.wants
+ install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
+ install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
+ install -d ${D}${systemd_unitdir}/system/reboot.target.wants
+ install -d ${D}${systemd_unitdir}/system/rescue.target.wants
+
+ # Create symlinks for systemd-update-utmp-runlevel.service
+ if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+ fi
+
+ # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
+ # for existence else it fails
+ if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
+ ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
+ fi
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
+ echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+ echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+ echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+ ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
+ else
+ sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+ ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
+ fi
+ install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
+
+ # If polkit is setup fixup permissions and ownership
+ if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
+ if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
+ chmod 700 ${D}${datadir}/polkit-1/rules.d
+ chown polkitd:root ${D}${datadir}/polkit-1/rules.d
+ fi
+ fi
+
+ # create link for existing udev rules
+ ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
+
+ # duplicate udevadm for postinst script
+ install -d ${D}${libexecdir}
+ ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
+
+ # install default policy for presets
+ # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
+ install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
+
+ # We use package postinsts for the hwdb update, as the update service is
+ # easily triggered for no reason and will slow down boots.
+ find ${D} -name systemd-hwdb-update.service -delete
+}
+
+python populate_packages_prepend (){
+ systemdlibdir = d.getVar("rootlibdir")
+ do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
+
+PACKAGES =+ "\
+ ${PN}-gui \
+ ${PN}-vconsole-setup \
+ ${PN}-initramfs \
+ ${PN}-analyze \
+ ${PN}-kernel-install \
+ ${PN}-rpm-macros \
+ ${PN}-binfmt \
+ ${PN}-zsh-completion \
+ ${PN}-container \
+ ${PN}-journal-gatewayd \
+ ${PN}-journal-upload \
+ ${PN}-journal-remote \
+ ${PN}-extra-utils \
+"
+
+SUMMARY_${PN}-container = "Tools for containers and VMs"
+DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
+
+SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events"
+DESCRIPTION_${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default."
+
+SUMMARY_${PN}-journal-upload = "Send journal messages over the network"
+DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL."
+
+SUMMARY_${PN}-journal-remote = "Receive journal messages over the network"
+DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files."
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
+"
+SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+
+USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
+ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
+"
+GROUPADD_PARAM_${PN} = "-r systemd-journal"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
+USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy"
+USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway"
+USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote"
+USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload"
+
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
+ ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+
+RDEPENDS_${PN}-kernel-install += "bash"
+FILES_${PN}-kernel-install = "${bindir}/kernel-install \
+ ${sysconfdir}/kernel/ \
+ ${exec_prefix}/lib/kernel \
+ "
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
+ "
+
+FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
+
+FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
+ ${exec_prefix}/lib/binfmt.d \
+ ${rootlibexecdir}/systemd/systemd-binfmt \
+ ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+ ${systemd_unitdir}/system/systemd-binfmt.service"
+RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
+
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+
+
+FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
+ ${systemd_system_unitdir}/systemd-journal-gatewayd.service \
+ ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \
+ ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \
+ ${datadir}/systemd/gatewayd/browse.html \
+ "
+SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket"
+
+FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \
+ ${systemd_system_unitdir}/systemd-journal-upload.service \
+ ${sysconfdir}/systemd/journal-upload.conf \
+ "
+SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service"
+
+FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \
+ ${sysconfdir}/systemd/journal-remote.conf \
+ ${systemd_system_unitdir}/systemd-journal-remote.service \
+ ${systemd_system_unitdir}/systemd-journal-remote.socket \
+ "
+SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket"
+
+
+FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+ ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+ ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \
+ ${base_bindir}/machinectl \
+ ${bindir}/systemd-nspawn \
+ ${nonarch_libdir}/systemd/import-pubring.gpg \
+ ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
+ ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
+ ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
+ ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \
+ ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \
+ ${systemd_system_unitdir}/machine.slice \
+ ${systemd_system_unitdir}/machines.target \
+ ${systemd_system_unitdir}/org.freedesktop.import1.busname \
+ ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
+ ${systemd_system_unitdir}/systemd-importd.service \
+ ${systemd_system_unitdir}/systemd-machined.service \
+ ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
+ ${systemd_system_unitdir}/var-lib-machines.mount \
+ ${rootlibexecdir}/systemd/systemd-import \
+ ${rootlibexecdir}/systemd/systemd-importd \
+ ${rootlibexecdir}/systemd/systemd-machined \
+ ${rootlibexecdir}/systemd/systemd-pull \
+ ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
+ ${systemd_system_unitdir}/systemd-nspawn@.service \
+ ${libdir}/libnss_mymachines.so.2 \
+ ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
+ ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+ ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+ ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
+ ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
+ "
+
+RRECOMMENDS_${PN}-container += "\
+ ${PN}-journal-upload \
+ ${PN}-journal-remote \
+ ${PN}-journal-gatewayd \
+ "
+
+FILES_${PN}-extra-utils = "\
+ ${base_bindir}/systemd-escape \
+ ${base_bindir}/systemd-inhibit \
+ ${bindir}/systemd-detect-virt \
+ ${bindir}/systemd-path \
+ ${bindir}/systemd-run \
+ ${bindir}/systemd-cat \
+ ${bindir}/systemd-delta \
+ ${bindir}/systemd-cgls \
+ ${bindir}/systemd-cgtop \
+ ${bindir}/systemd-stdio-bridge \
+ ${base_bindir}/systemd-ask-password \
+ ${base_bindir}/systemd-tty-ask-password-agent \
+ ${systemd_unitdir}/system/systemd-ask-password-console.path \
+ ${systemd_unitdir}/system/systemd-ask-password-console.service \
+ ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+ ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
+ ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+ ${rootlibexecdir}/systemd/systemd-resolve-host \
+ ${rootlibexecdir}/systemd/systemd-ac-power \
+ ${rootlibexecdir}/systemd/systemd-activate \
+ ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+ ${systemd_unitdir}/system/systemd-bus-proxyd.service \
+ ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
+ ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+ ${rootlibexecdir}/systemd/systemd-reply-password \
+ ${rootlibexecdir}/systemd/systemd-sleep \
+ ${rootlibexecdir}/systemd/system-sleep \
+ ${systemd_unitdir}/system/systemd-hibernate.service \
+ ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+ ${systemd_unitdir}/system/systemd-suspend.service \
+ ${systemd_unitdir}/system/sleep.target \
+ ${rootlibexecdir}/systemd/systemd-initctl \
+ ${systemd_unitdir}/system/systemd-initctl.service \
+ ${systemd_unitdir}/system/systemd-initctl.socket \
+ ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+ ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+ ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+"
+
+CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \
+ ${sysconfdir}/systemd/journald.conf \
+ ${sysconfdir}/systemd/logind.conf \
+ ${sysconfdir}/systemd/system.conf \
+ ${sysconfdir}/systemd/user.conf \
+ ${sysconfdir}/systemd/resolved.conf \
+ ${sysconfdir}/systemd/timesyncd.conf \
+"
+
+FILES_${PN} = " ${base_bindir}/* \
+ ${base_sbindir}/shutdown \
+ ${base_sbindir}/halt \
+ ${base_sbindir}/poweroff \
+ ${base_sbindir}/runlevel \
+ ${base_sbindir}/telinit \
+ ${base_sbindir}/resolvconf \
+ ${base_sbindir}/reboot \
+ ${base_sbindir}/init \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/polkit-1 \
+ ${datadir}/${BPN} \
+ ${datadir}/factory \
+ ${sysconfdir}/dbus-1/ \
+ ${sysconfdir}/modules-load.d/ \
+ ${sysconfdir}/pam.d/ \
+ ${sysconfdir}/sysctl.d/ \
+ ${sysconfdir}/systemd/ \
+ ${sysconfdir}/tmpfiles.d/ \
+ ${sysconfdir}/xdg/ \
+ ${sysconfdir}/init.d/README \
+ ${sysconfdir}/resolv-conf.systemd \
+ ${sysconfdir}/X11/xinit/xinitrc.d/* \
+ ${rootlibexecdir}/systemd/* \
+ ${systemd_unitdir}/* \
+ ${base_libdir}/security/*.so \
+ /cgroup \
+ ${bindir}/systemd* \
+ ${bindir}/busctl \
+ ${bindir}/coredumpctl \
+ ${bindir}/localectl \
+ ${bindir}/hostnamectl \
+ ${bindir}/resolvectl \
+ ${bindir}/timedatectl \
+ ${bindir}/bootctl \
+ ${bindir}/kernel-install \
+ ${exec_prefix}/lib/tmpfiles.d/*.conf \
+ ${exec_prefix}/lib/systemd \
+ ${exec_prefix}/lib/modules-load.d \
+ ${exec_prefix}/lib/sysctl.d \
+ ${exec_prefix}/lib/sysusers.d \
+ ${exec_prefix}/lib/environment.d \
+ ${localstatedir} \
+ ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
+ ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
+ ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
+ ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
+ ${nonarch_base_libdir}/modprobe.d/systemd.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
+ "
+
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
+
+RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
+RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
+RDEPENDS_${PN} += "volatile-binds update-rc.d"
+
+RRECOMMENDS_${PN} += "systemd-extra-utils \
+ systemd-compat-units udev-hwdb \
+ e2fsprogs-e2fsck \
+ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+ os-release \
+ systemd-conf \
+"
+
+INSANE_SKIP_${PN} += "dev-so libdir"
+INSANE_SKIP_${PN}-dbg += "libdir"
+INSANE_SKIP_${PN}-doc += " libdir"
+
+PACKAGES =+ "udev udev-hwdb"
+
+RPROVIDES_udev = "hotplug"
+
+RDEPENDS_udev-hwdb += "udev"
+
+FILES_udev += "${base_sbindir}/udevd \
+ ${rootlibexecdir}/systemd/network/99-default.link \
+ ${rootlibexecdir}/systemd/systemd-udevd \
+ ${rootlibexecdir}/udev/accelerometer \
+ ${rootlibexecdir}/udev/ata_id \
+ ${rootlibexecdir}/udev/cdrom_id \
+ ${rootlibexecdir}/udev/collect \
+ ${rootlibexecdir}/udev/findkeyboards \
+ ${rootlibexecdir}/udev/keyboard-force-release.sh \
+ ${rootlibexecdir}/udev/keymap \
+ ${rootlibexecdir}/udev/mtd_probe \
+ ${rootlibexecdir}/udev/scsi_id \
+ ${rootlibexecdir}/udev/v4l_id \
+ ${rootlibexecdir}/udev/keymaps \
+ ${rootlibexecdir}/udev/rules.d/*.rules \
+ ${sysconfdir}/udev \
+ ${sysconfdir}/init.d/systemd-udevd \
+ ${systemd_unitdir}/system/*udev* \
+ ${systemd_unitdir}/system/*.wants/*udev* \
+ ${base_bindir}/udevadm \
+ ${base_sbindir}/udevadm \
+ ${libexecdir}/${MLPREFIX}udevadm \
+ ${datadir}/bash-completion/completions/udevadm \
+ "
+
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+
+RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+python do_warn_musl() {
+ if d.getVar('TCLIBC') == "musl":
+ bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.")
+}
+addtask warn_musl before do_configure
+
+ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
+
+ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
+ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
+ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
+pkg_postinst_${PN}_libc-glibc () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN}_libc-glibc () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e '/^hosts:/s/\s*myhostname//' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+PACKAGE_WRITE_DEPS += "qemu-native"
+pkg_postinst_udev-hwdb () {
+ if test -n "$D"; then
+ $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX}
+ else
+ udevadm hwdb --update
+ fi
+}
+
+pkg_prerm_udev-hwdb () {
+ rm -f $D${sysconfdir}/udev/hwdb.bin
+}
diff --git a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/crypt-lib.patch b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/crypt-lib.patch
deleted file mode 100644
index 7b342901e1..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/crypt-lib.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-# The src Makefile was checking for libcrypt.a on the host, not in the
-# build environment. This patch checks for $LCRYPT in the environment
-# and uses it if it's there.
-# - jdike@linux.intel.com
-
-Index: sysvinit-2.88dsf/src/Makefile
-===================================================================
---- sysvinit-2.88dsf.orig/src/Makefile
-+++ sysvinit-2.88dsf/src/Makefile
-@@ -85,9 +85,13 @@ else
- endif
-
- # Additional libs for GNU libc.
-+ifneq ($(LCRYPT),)
-+ SULOGINLIBS += $(LCRYPT)
-+else
- ifneq ($(wildcard /usr/lib*/libcrypt.a),)
- SULOGINLIBS += -lcrypt
- endif
-+endif
-
- all: $(BIN) $(SBIN) $(USRBIN)
-
diff --git a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/install.patch b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/install.patch
deleted file mode 100644
index 6c4225a678..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/install.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Upstream-Status: Pending
-
-diff --git a/src/Makefile b/src/Makefile
-index e2b8028..3e11e92 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -65,7 +65,14 @@ else
- INSTALL_DATA = install -m 644
- endif
- INSTALL_DIR = install -m 755 -d
--MANDIR = /usr/share/man
-+
-+ROOT ?=
-+base_bindir ?= /bin
-+base_sbindir ?= /sbin
-+bindir ?= /usr/bin
-+sysconfdir ?= /etc
-+includedir ?= /usr/include
-+mandir ?= /usr/share/man
-
- ifeq ($(WITH_SELINUX),yes)
- SELINUX_DEF = -DWITH_SELINUX
-@@ -138,39 +145,39 @@ clobber: cleanobjs
- distclean: clobber
-
- install:
-- $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/
-- $(INSTALL_DIR) $(ROOT)/usr/bin/
-+ $(INSTALL_DIR) $(ROOT)$(base_bindir)/ $(ROOT)$(base_sbindir)/
-+ $(INSTALL_DIR) $(ROOT)$(bindir)/
- for i in $(BIN); do \
-- $(INSTALL_EXEC) $$i $(ROOT)/bin/ ; \
-+ $(INSTALL_EXEC) $$i $(ROOT)$(base_bindir)/ ; \
- done
- for i in $(SBIN); do \
-- $(INSTALL_EXEC) $$i $(ROOT)/sbin/ ; \
-+ $(INSTALL_EXEC) $$i $(ROOT)$(base_sbindir)/ ; \
- done
- for i in $(USRBIN); do \
-- $(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \
-+ $(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \
- done
-- # $(INSTALL_DIR) $(ROOT)/etc/
-- # $(INSTALL_EXEC) initscript.sample $(ROOT)/etc/
-- ln -sf halt $(ROOT)/sbin/reboot
-- ln -sf halt $(ROOT)/sbin/poweroff
-- ln -sf init $(ROOT)/sbin/telinit
-- ln -sf /sbin/killall5 $(ROOT)/bin/pidof
-- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
-- ln -sf last $(ROOT)/usr/bin/lastb; \
-+ # $(INSTALL_DIR) $(ROOT)$(sysconfdir)/
-+ # $(INSTALL_EXEC) initscript.sample $(ROOT)$(sysconfdir)/
-+ ln -sf halt $(ROOT)$(base_sbindir)/reboot
-+ ln -sf halt $(ROOT)$(base_sbindir)/poweroff
-+ ln -sf init $(ROOT)$(base_sbindir)/telinit
-+ ln -sf $(base_sbindir)/killall5 $(ROOT)$(base_bindir)/pidof
-+ if [ ! -f $(ROOT)$(bindir)/lastb ]; then \
-+ ln -sf last $(ROOT)$(bindir)/lastb; \
- fi
-- $(INSTALL_DIR) $(ROOT)/usr/include/
-- $(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
-- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man1/
-- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man5/
-- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man8/
-+ $(INSTALL_DIR) $(ROOT)$(includedir)/
-+ $(INSTALL_DATA) initreq.h $(ROOT)$(includedir)/
-+ $(INSTALL_DIR) $(ROOT)$(mandir)/man1/
-+ $(INSTALL_DIR) $(ROOT)$(mandir)/man5/
-+ $(INSTALL_DIR) $(ROOT)$(mandir)/man8/
- for i in $(MAN1); do \
-- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man1/; \
-+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man1/; \
- done
- for i in $(MAN5); do \
-- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man5/; \
-+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man5/; \
- done
- for i in $(MAN8); do \
-- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man8/; \
-+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man8/; \
- done
- ifeq ($(ROOT),)
- #
diff --git a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/pidof-add-m-option.patch b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/pidof-add-m-option.patch
deleted file mode 100644
index 5b5dfdc001..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/pidof-add-m-option.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-pidof: add -m option
-
-When used with -o, will also omit any processes that have the same
-argv[0] and argv[1] as any explicitly omitted process ids. This can be
-used to avoid multiple shell scripts concurrently calling pidof returning
-each other's pids.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=883856
-
-Upstream-Status: backport
-Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- man/pidof.8 | 6 ++++++
- src/killall5.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
- 2 files changed, 65 insertions(+), 3 deletions(-)
-
-diff --git a/man/pidof.8 b/man/pidof.8
---- a/man/pidof.8
-+++ b/man/pidof.8
-@@ -24,6 +24,7 @@ pidof -- find the process ID of a running program.
- .RB [ \-c ]
- .RB [ \-n ]
- .RB [ \-x ]
-+.RB [ \-m ]
- .RB [ \-o
- .IR omitpid[,omitpid..] ]
- .RB [ \-o
-@@ -63,6 +64,11 @@ shells running the named scripts.
- Tells \fIpidof\fP to omit processes with that process id. The special
- pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
- program, in other words the calling shell or shell script.
-+.IP -m
-+When used with -o, will also omit any processes that have the same
-+argv[0] and argv[1] as any explicitly omitted process ids. This can be
-+used to avoid multiple shell scripts concurrently calling pidof returning
-+each other's pids.
- .SH "EXIT STATUS"
- .TP
- .B 0
-diff --git a/src/killall5.c b/src/killall5.c
-index 5937d98..e73885e 100644
---- a/src/killall5.c
-+++ b/src/killall5.c
-@@ -118,6 +118,7 @@ typedef struct _s_nfs
-
- /* List of processes. */
- PROC *plist;
-+PROC *olist;
-
- /* List of processes to omit. */
- OMIT *omit;
-@@ -345,6 +346,20 @@ static void clear_mnt(void)
- }
- }
-
-+static void clear_omit(void)
-+{
-+ OMIT *o;
-+ PROC *p;
-+ for (o = omit; o; o = omit) {
-+ omit = omit->next;
-+ free(o);
-+ }
-+ for (p = olist; p; p = olist) {
-+ olist = olist->next;
-+ free(p);
-+ }
-+}
-+
- /*
- * Check if path is ia shadow off a NFS partition.
- */
-@@ -452,6 +467,7 @@ int readproc(int do_stat)
- DIR *dir;
- FILE *fp;
- PROC *p, *n;
-+ OMIT *o, *m;
- struct dirent *d;
- struct stat st;
- char path[PATH_MAX+1];
-@@ -624,6 +640,17 @@ int readproc(int do_stat)
- p->next = plist;
- plist = p;
- p->pid = pid;
-+ /* Could be smarter, but it's a small list. */
-+ m = omit;
-+ for (o = omit; m; o = m) {
-+ m = o->next;
-+ if (o->pid == p->pid) {
-+ n = (PROC*)xmalloc(sizeof(PROC));
-+ *n = *p;
-+ n->next = olist;
-+ olist = n;
-+ }
-+ }
- }
- closedir(dir);
-
-@@ -813,6 +840,26 @@ PIDQ_HEAD *pidof(char *prog)
- return q;
- }
-
-+int matches(PROC *o, PROC *p)
-+{
-+ int ret = 0;
-+ char *oargv1, *pargv1;
-+ if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
-+ if (o->argv1 && p->argv1) {
-+ if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL)
-+ oargv1 = strdup(o->argv1);
-+ if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL)
-+ pargv1 = strdup(p->argv1);
-+ if (! strcmp(oargv1, pargv1)) {
-+ ret = 1;
-+ }
-+ free(oargv1);
-+ free(pargv1);
-+ }
-+ }
-+ return ret;
-+}
-+
- /* Give usage message and exit. */
- void usage(void)
- {
-@@ -845,6 +892,7 @@ void nsyslog(int pri, char *fmt, ...)
- #define PIDOF_SINGLE 0x01
- #define PIDOF_OMIT 0x02
- #define PIDOF_NETFS 0x04
-+#define PIDOF_OMIT_OMIT_MATCHES 0x08
-
- /*
- * Pidof functionality.
-@@ -861,6 +909,7 @@ int main_pidof(int argc, char **argv)
- struct stat st;
- char tmp[512];
-
-+ olist = (PROC*)0;
- omit = (OMIT*)0;
- nlist = (NFS*)0;
- opterr = 0;
-@@ -868,7 +917,7 @@ int main_pidof(int argc, char **argv)
- if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0))
- flags |= PIDOF_NETFS;
-
-- while ((opt = getopt(argc,argv,"hco:sxn")) != EOF) switch (opt) {
-+ while ((opt = getopt(argc,argv,"hcmo:sxn")) != EOF) switch (opt) {
- case '?':
- nsyslog(LOG_ERR,"invalid options on command line!\n");
- closelog();
-@@ -907,6 +956,9 @@ int main_pidof(int argc, char **argv)
- case 'x':
- scripts_too++;
- break;
-+ case 'm':
-+ flags |= PIDOF_OMIT_OMIT_MATCHES;
-+ break;
- case 'n':
- flags |= PIDOF_NETFS;
- break;
-@@ -938,10 +990,13 @@ int main_pidof(int argc, char **argv)
- pid_t spid = 0;
- while ((p = get_next_from_pid_q(q))) {
- if ((flags & PIDOF_OMIT) && omit) {
-- OMIT * optr;
-- for (optr = omit; optr; optr = optr->next) {
-+ PROC * optr;
-+ for (optr = olist; optr; optr = optr->next) {
- if (optr->pid == p->pid)
- break;
-+ if (flags & PIDOF_OMIT_OMIT_MATCHES)
-+ if (matches(optr, p))
-+ break;
- }
-
- /*
-@@ -977,6 +1032,7 @@ int main_pidof(int argc, char **argv)
- if (!first)
- printf("\n");
-
-+ clear_omit();
- clear_mnt();
-
- closelog();
---
-1.8.1.2
-
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
index 6eaeb7a2b0..96fd6cfcfd 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
@@ -1,5 +1,55 @@
#!/bin/sh
-if [ -c /dev/$2 ]
-then
- /sbin/getty -L $1 $2
-fi
+###############################################################################
+# This script is used to automatically set up the serial console(s) on startup.
+# The variable SERIAL_CONSOLES can be set in meta/conf/machine/*.conf.
+# Script enhancement has been done based on Bug YOCTO #10844.
+# Most of the information is retrieved from /proc virtual filesystem containing
+# all the runtime system information (eg. system memory, device mount, etc).
+###############################################################################
+
+# Get active serial filename.
+active_serial=$(grep "serial" /proc/tty/drivers | cut -d/ -f1 | sed "s/ *$//")
+
+# Rephrase input parameter from ttyS target index (ttyS1, ttyS2, ttyAMA0, etc).
+runtime_tty=$(echo $2 | grep -oh '[0-9]')
+
+# busybox' getty does this itself, util-linux' agetty needs extra help
+getty="/sbin/getty"
+case $(readlink -f "${getty}") in
+ */busybox*)
+ ;;
+ *)
+ if [ -x "/usr/bin/setsid" ] ; then
+ setsid="/usr/bin/setsid"
+ fi
+ ;;
+esac
+
+# Backup $IFS.
+DEFAULT_IFS=$IFS
+# Customize Internal Field Separator.
+IFS="$(printf '\n\t')"
+
+for line in $active_serial; do
+ # Check we have the file containing current active serial target index.
+ if [ -e "/proc/tty/driver/$line" ]
+ then
+ # Remove all unknown entries and discard the first line (desc).
+ activetty=$(grep -v "unknown" "/proc/tty/driver/$line" \
+ | tail -n +2 | grep -oh "^\s*\S*[0-9]")
+ for active in $activetty; do
+ # If indexes do match then enable the serial console.
+ if [ $active -eq $runtime_tty ]
+ then
+ if [ -c /dev/$2 ]
+ then
+ ${setsid:-} ${getty} -L $1 $2 $3
+ fi
+ break
+ fi
+ done
+ fi
+done
+
+# Restore $IFS.
+IFS=$DEFAULT_IFS
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index f136ad821b..8781492d47 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -20,6 +20,7 @@ do_install() {
install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
install -d ${D}${base_bindir}
install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty
+ sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty
set -x
tmp="${SERIAL_CONSOLES}"
@@ -28,7 +29,7 @@ do_install() {
j=`echo ${i} | sed s/\;/\ /g`
l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
label=`echo $l | sed 's/.*\(....\)/\1/'`
- echo "$label:12345:respawn:${base_bindir}/start_getty ${j}" >> ${D}${sysconfdir}/inittab
+ echo "$label:12345:respawn:${base_bindir}/start_getty ${j} vt102" >> ${D}${sysconfdir}/inittab
done
if [ "${USE_VT}" = "1" ]; then
@@ -53,8 +54,15 @@ EOF
}
pkg_postinst_${PN} () {
+# run this on host and on target
+if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
+ exit 0
+fi
+}
+
+pkg_postinst_ontarget_${PN} () {
# run this on the target
-if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
+if [ -e /proc/consoles ]; then
tmp="${SERIAL_CONSOLES_CHECK}"
for i in $tmp
do
@@ -62,17 +70,13 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
k=`echo ${i} | sed s/^.*\://g`
if [ -z "`grep ${j} /proc/consoles`" ]; then
if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then
- sed -i /^.*${j}$/d /etc/inittab
+ sed -i -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab
fi
fi
done
kill -HUP 1
else
- if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
- exit 0
- else
- exit 1
- fi
+ exit 1
fi
}
@@ -86,5 +90,4 @@ CONFFILES_${PN} = "${sysconfdir}/inittab"
USE_VT ?= "1"
SYSVINIT_ENABLED_GETTYS ?= "1"
-
-
+RCONFLICTS_${PN} = "busybox-inittab"
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch b/meta/recipes-core/sysvinit/sysvinit/0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch
deleted file mode 100644
index f35c15cb31..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit/0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 36ac97bfe51797458442a6035219a504a42e703a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 21 Aug 2015 10:56:40 -0700
-Subject: [PATCH] This fixes an issue that clang reports about mutliple output
- files
-
-Issue is that we are passing .h file to link step as seen below.
-
-| arm-oe-linux-gnueabi-clang -march=armv7-a -mthumb -mfloat-abi=hard
--mfpu=neon-vfpv4 -mtune=cortex-a7 -D__extern_always_inline=inline
--no-integrated-as
---sysroot=/mnt/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-glibc/sysroots/raspberrypi2
--Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed halt.o ifdown.o hddown.o
-utmp.o reboot.h -o halt
-| clang-3.7: error: cannot specify -o when generating multiple output
-files
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/Makefile | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index e77ed5f..a6f9f40 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -103,9 +103,9 @@ all: $(BIN) $(SBIN) $(USRBIN)
- init: LDLIBS += $(INITLIBS) $(STATIC)
- init: init.o init_utmp.o
-
--halt: halt.o ifdown.o hddown.o utmp.o reboot.h
-+halt: halt.o ifdown.o hddown.o utmp.o
-
--last: last.o oldutmp.h
-+last: last.o
-
- mesg: mesg.o
-
-@@ -120,7 +120,7 @@ sulogin: sulogin.o
-
- wall: dowall.o wall.o
-
--shutdown: dowall.o shutdown.o utmp.o reboot.h
-+shutdown: dowall.o shutdown.o utmp.o
-
- bootlogd: LDLIBS += -lutil
- bootlogd: bootlogd.o
---
-2.1.4
-
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch b/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
new file mode 100644
index 0000000000..60fbd87534
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
@@ -0,0 +1,50 @@
+From c710a3accd1fabdb671274e1a458405282d51e0c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Aug 2018 15:38:58 -0700
+Subject: [PATCH] include sys/sysmacros.h for major/minor definitions
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+---
+ src/bootlogd.c | 1 +
+ src/mountpoint.c | 1 +
+ src/shutdown.c | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/bootlogd.c b/src/bootlogd.c
+index 787db87..8b07903 100644
+--- a/src/bootlogd.c
++++ b/src/bootlogd.c
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/ioctl.h>
+ #include <sys/utsname.h>
+ #include <time.h>
+diff --git a/src/mountpoint.c b/src/mountpoint.c
+index 5f20522..94df7a1 100644
+--- a/src/mountpoint.c
++++ b/src/mountpoint.c
+@@ -25,6 +25,7 @@
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/shutdown.c b/src/shutdown.c
+index b744a2c..40b7faf 100644
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -40,6 +40,7 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/wait.h>
+ #ifdef __linux__
+ #include <sys/sysmacros.h> /* brought in my LFS patch */
diff --git a/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch b/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
new file mode 100644
index 0000000000..bd4444b81b
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
@@ -0,0 +1,36 @@
+From 7276275d9a08d5ae268fb263027bbc60bc0ab2e8 Mon Sep 17 00:00:00 2001
+From: Jeff Dike <jdike@x86_64.user-mode-linux.org>
+Date: Wed, 14 Jul 2010 14:35:52 -0400
+Subject: [PATCH] sysvinit - Remove sulogin dependency on /usr/lib*/libcrypt.a
+
+Upstream-Status: Inappropriate [configuration]
+
+# The src Makefile was checking for libcrypt.a on the host, not in the
+# build environment. This patch checks for $LCRYPT in the environment
+# and uses it if it's there.
+# - jdike@linux.intel.com
+
+---
+ src/Makefile | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 1380d7f..628e77f 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -97,13 +97,8 @@ else
+ endif
+
+ # Additional libs for GNU libc.
+-ifneq ($(wildcard /usr/lib*/libcrypt.*),)
+- SULOGINLIBS += -lcrypt
+-endif
+-
+-# Additional libs for GNU libc / multiarch on Debian based systems.
+-ifneq ($(wildcard /usr/lib/*/libcrypt.*),)
+- SULOGINLIBS += -lcrypt
++ifneq ($(LCRYPT),)
++ SULOGINLIBS += $(LCRYPT)
+ endif
+
+ all: $(BIN) $(SBIN) $(USRBIN)
diff --git a/meta/recipes-core/sysvinit/sysvinit/install.patch b/meta/recipes-core/sysvinit/sysvinit/install.patch
new file mode 100644
index 0000000000..2930fb0195
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/install.patch
@@ -0,0 +1,96 @@
+From b6cc66ab245ceb6bca0116dff7a41f6d7677b96a Mon Sep 17 00:00:00 2001
+From: Qing He <qing.he@intel.com>
+Date: Fri, 18 Jun 2010 09:40:30 +0800
+Subject: [PATCH] sysvinit: upgrade to version 2.88dsf
+
+Upstream-Status: Pending
+
+---
+ src/Makefile | 53 +++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 30 insertions(+), 23 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 9f9f09e..1380d7f 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -77,7 +77,14 @@ else
+ INSTALL_DATA = install -m 644
+ endif
+ INSTALL_DIR = install -m 755 -d
+-MANDIR = /usr/share/man
++
++ROOT ?=
++base_bindir ?= /bin
++base_sbindir ?= /sbin
++bindir ?= /usr/bin
++sysconfdir ?= /etc
++includedir ?= /usr/include
++mandir ?= /usr/share/man
+
+ ifeq ($(WITH_SELINUX),yes)
+ SELINUX_DEF = -DWITH_SELINUX
+@@ -189,42 +196,42 @@ clobber: cleanobjs
+ distclean: clobber
+
+ install: all
+- $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/
+- $(INSTALL_DIR) $(ROOT)/usr/bin/
++ $(INSTALL_DIR) $(ROOT)$(base_bindir)/ $(ROOT)$(base_sbindir)/
++ $(INSTALL_DIR) $(ROOT)$(bindir)/
+ for i in $(BIN); do \
+- $(INSTALL_EXEC) $$i $(ROOT)/bin/ ; \
++ $(INSTALL_EXEC) $$i $(ROOT)$(base_bindir)/ ; \
+ done
+ for i in $(SBIN); do \
+- $(INSTALL_EXEC) $$i $(ROOT)/sbin/ ; \
++ $(INSTALL_EXEC) $$i $(ROOT)$(base_sbindir)/ ; \
+ done
+ for i in $(USRBIN); do \
+- $(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \
++ $(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \
+ done
+ # $(INSTALL_DIR) $(ROOT)/etc/
+ # $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/
+- ln -sf halt $(ROOT)/sbin/reboot
+- ln -sf halt $(ROOT)/sbin/poweroff
+- ln -sf init $(ROOT)/sbin/telinit
+- ln -sf /sbin/killall5 $(ROOT)/bin/pidof
+- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
+- ln -sf last $(ROOT)/usr/bin/lastb; \
++ ln -sf halt $(ROOT)$(base_sbindir)/reboot
++ ln -sf halt $(ROOT)$(base_sbindir)/poweroff
++ ln -sf init $(ROOT)$(base_sbindir)/telinit
++ ln -sf $(base_sbindir)/killall5 $(ROOT)$(base_bindir)/pidof
++ if [ ! -f $(ROOT)$(bindir)/lastb ]; then \
++ ln -sf last $(ROOT)$(bindir)/lastb; \
+ fi
+- $(INSTALL_DIR) $(ROOT)/usr/include/
+- $(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
+- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man1/
+- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man5/
+- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man8/
++ $(INSTALL_DIR) $(ROOT)$(includedir)/
++ $(INSTALL_DATA) initreq.h $(ROOT)$(includedir)/
++ $(INSTALL_DIR) $(ROOT)$(mandir)/man1/
++ $(INSTALL_DIR) $(ROOT)$(mandir)/man5/
++ $(INSTALL_DIR) $(ROOT)$(mandir)/man8/
+ for man in $(MAN1); do \
+- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man1/; \
+- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man1/$$man ; \
++ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man1/; \
++ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man1/$$man ; \
+ done
+ for man in $(MAN5); do \
+- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man5/; \
+- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man5/$$man ; \
++ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man5/; \
++ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man5/$$man ; \
+ done
+ for man in $(MAN8); do \
+- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man8/; \
+- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man8/$$man ; \
++ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man8/; \
++ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man8/$$man ; \
+ done
+ ifeq ($(ROOT),)
+ #
diff --git a/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch b/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch
new file mode 100644
index 0000000000..494aa0e012
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch
@@ -0,0 +1,191 @@
+From 6c490ea6579a132fabb7dbd25387bb521f820371 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 24 Jul 2013 17:07:22 +0800
+Subject: [PATCH] pidof: add -m option
+
+When used with -o, will also omit any processes that have the same
+argv[0] and argv[1] as any explicitly omitted process ids. This can be
+used to avoid multiple shell scripts concurrently calling pidof returning
+each other's pids.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=883856
+
+Upstream-Status: backport
+Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ man/pidof.8 | 6 +++++
+ src/killall5.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 65 insertions(+), 3 deletions(-)
+
+diff --git a/man/pidof.8 b/man/pidof.8
+index ebe5f55..2fdc4d3 100644
+--- a/man/pidof.8
++++ b/man/pidof.8
+@@ -25,6 +25,7 @@ pidof -- find the process ID of a running program.
+ .RB [ \-n ]
+ .RB [ \-x ]
+ .RB [ \-z ]
++.RB [ \-m ]
+ .RB [ \-o
+ .IR omitpid[,omitpid...] ]
+ .RB [ \-o
+@@ -76,6 +77,11 @@ is shown. The default separator is a space.
+ Tells \fIpidof\fP to omit processes with that process id. The special
+ pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
+ program, in other words the calling shell or shell script.
++.IP -m
++When used with -o, will also omit any processes that have the same
++argv[0] and argv[1] as any explicitly omitted process ids. This can be
++used to avoid multiple shell scripts concurrently calling pidof returning
++each other's pids.
+ .SH "EXIT STATUS"
+ .TP
+ .B 0
+diff --git a/src/killall5.c b/src/killall5.c
+index 8b5cb38..a664954 100644
+--- a/src/killall5.c
++++ b/src/killall5.c
+@@ -126,6 +126,7 @@ typedef struct _s_nfs
+
+ /* List of processes. */
+ PROC *plist;
++PROC *olist;
+
+ /* List of processes to omit. */
+ OMIT *omit;
+@@ -361,6 +362,20 @@ static void clear_mnt(void)
+ }
+ }
+
++static void clear_omit(void)
++{
++ OMIT *o;
++ PROC *p;
++ for (o = omit; o; o = omit) {
++ omit = omit->next;
++ free(o);
++ }
++ for (p = olist; p; p = olist) {
++ olist = olist->next;
++ free(p);
++ }
++}
++
+ /*
+ * Check if path is a shadow off a NFS partition.
+ */
+@@ -486,6 +501,7 @@ int readproc(int do_stat)
+ DIR *dir;
+ FILE *fp;
+ PROC *p, *n;
++ OMIT *o, *m;
+ struct dirent *d;
+ struct stat st;
+ char path[PATH_MAX+1];
+@@ -733,6 +749,17 @@ int readproc(int do_stat)
+ p->next = plist;
+ plist = p;
+ p->pid = pid;
++ /* Could be smarter, but it's a small list. */
++ m = omit;
++ for (o = omit; m; o = m) {
++ m = o->next;
++ if (o->pid == p->pid) {
++ n = (PROC*)xmalloc(sizeof(PROC));
++ *n = *p;
++ n->next = olist;
++ olist = n;
++ }
++ }
+ }
+ closedir(dir);
+
+@@ -944,6 +971,26 @@ PIDQ_HEAD *pidof(char *prog)
+ return q;
+ }
+
++int matches(PROC *o, PROC *p)
++{
++ int ret = 0;
++ char *oargv1, *pargv1;
++ if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
++ if (o->argv1 && p->argv1) {
++ if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL)
++ oargv1 = strdup(o->argv1);
++ if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL)
++ pargv1 = strdup(p->argv1);
++ if (! strcmp(oargv1, pargv1)) {
++ ret = 1;
++ }
++ free(oargv1);
++ free(pargv1);
++ }
++ }
++ return ret;
++}
++
+ /* Give usage message and exit. */
+ void usage(void)
+ {
+@@ -994,6 +1041,7 @@ void nsyslog(int pri, char *fmt, ...)
+ #define PIDOF_OMIT 0x02
+ #define PIDOF_NETFS 0x04
+ #define PIDOF_QUIET 0x08
++#define PIDOF_OMIT_OMIT_MATCHES 0x08
+
+ /*
+ * Pidof functionality.
+@@ -1011,6 +1059,7 @@ int main_pidof(int argc, char **argv)
+ char tmp[512];
+ char sep = ' ';
+
++ olist = (PROC*)0;
+ omit = (OMIT*)0;
+ nlist = (NFS*)0;
+ opterr = 0;
+@@ -1018,7 +1067,7 @@ int main_pidof(int argc, char **argv)
+ if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0))
+ flags |= PIDOF_NETFS;
+
+- while ((opt = getopt(argc,argv,"qhco:d:sxzn")) != EOF) switch (opt) {
++ while ((opt = getopt(argc,argv,"qhcmo:d:sxzn")) != EOF) switch (opt) {
+ case '?':
+ nsyslog(LOG_ERR,"invalid options on command line!\n");
+ closelog();
+@@ -1069,6 +1118,9 @@ int main_pidof(int argc, char **argv)
+ case 'z':
+ list_dz_processes = TRUE;
+ break;
++ case 'm':
++ flags |= PIDOF_OMIT_OMIT_MATCHES;
++ break;
+ case 'n':
+ flags |= PIDOF_NETFS;
+ break;
+@@ -1100,10 +1152,13 @@ int main_pidof(int argc, char **argv)
+ pid_t spid = 0;
+ while ((p = get_next_from_pid_q(q))) {
+ if ((flags & PIDOF_OMIT) && omit) {
+- OMIT * optr;
+- for (optr = omit; optr; optr = optr->next) {
++ PROC * optr;
++ for (optr = olist; optr; optr = optr->next) {
+ if (optr->pid == p->pid)
+ break;
++ if (flags & PIDOF_OMIT_OMIT_MATCHES)
++ if (matches(optr, p))
++ break;
+ }
+
+ /*
+@@ -1145,6 +1200,7 @@ int main_pidof(int argc, char **argv)
+ printf("\n");
+ }
+
++ clear_omit();
+ clear_mnt();
+
+ closelog();
diff --git a/meta/recipes-core/sysvinit/sysvinit/realpath.patch b/meta/recipes-core/sysvinit/sysvinit/realpath.patch
index 5e0dca3bf1..859fd8baad 100644
--- a/meta/recipes-core/sysvinit/sysvinit/realpath.patch
+++ b/meta/recipes-core/sysvinit/sysvinit/realpath.patch
@@ -1,4 +1,8 @@
-Fix build on musl use realpath() API its available on all libcs
+From eb158c97f19d473d01befe96359a7f93ae834517 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 19 Nov 2015 00:10:03 +0000
+Subject: [PATCH] Fix build on musl use realpath() API its available on all
+ libcs
realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd
However for Linux it should always work
@@ -7,52 +11,17 @@ Upstream-Status: Inappropriate[Linux specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: sysvinit-2.88dsf/src/ifdown.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/ifdown.c 2010-03-23 07:37:01.000000000 -0700
-+++ sysvinit-2.88dsf/src/ifdown.c 2014-04-02 00:43:43.675437029 -0700
-@@ -26,11 +26,11 @@
- #include <unistd.h>
- #include <time.h>
- #include <string.h>
-+#include <errno.h>
-
- #include <sys/ioctl.h>
- #include <sys/socket.h>
- #include <sys/time.h>
--#include <sys/errno.h>
-
- #include <net/if.h>
- #include <netinet/in.h>
-Index: sysvinit-2.88dsf/src/init.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/init.c 2014-04-02 00:42:10.488770162 -0700
-+++ sysvinit-2.88dsf/src/init.c 2014-04-02 00:42:59.432103823 -0700
-@@ -49,6 +49,7 @@
- #include <utmp.h>
- #include <ctype.h>
- #include <stdarg.h>
-+#include <sys/ttydefaults.h>
- #include <sys/syslog.h>
- #include <sys/time.h>
-
-Index: sysvinit-2.88dsf/src/mountpoint.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/mountpoint.c 2009-09-10 01:28:49.000000000 -0700
-+++ sysvinit-2.88dsf/src/mountpoint.c 2014-04-02 00:44:18.248770942 -0700
-@@ -23,6 +23,7 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-+#include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
- #include <stdlib.h>
-Index: sysvinit-2.88dsf/src/killall5.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/killall5.c 2014-03-26 00:49:52.982668074 -0700
-+++ sysvinit-2.88dsf/src/killall5.c 2014-04-02 00:46:45.838771653 -0700
-@@ -846,9 +846,9 @@
+---
+ src/killall5.c | 4 ++--
+ src/mountpoint.c | 1 +
+ src/wall.c | 1 +
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/killall5.c b/src/killall5.c
+index a664954..9798423 100644
+--- a/src/killall5.c
++++ b/src/killall5.c
+@@ -977,9 +977,9 @@ int matches(PROC *o, PROC *p)
char *oargv1, *pargv1;
if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
if (o->argv1 && p->argv1) {
@@ -64,14 +33,26 @@ Index: sysvinit-2.88dsf/src/killall5.c
pargv1 = strdup(p->argv1);
if (! strcmp(oargv1, pargv1)) {
ret = 1;
-Index: sysvinit-2.88dsf/src/wall.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/wall.c 2009-11-22 14:05:53.000000000 -0800
-+++ sysvinit-2.88dsf/src/wall.c 2014-04-02 00:49:15.258772217 -0700
-@@ -29,6 +29,7 @@
+diff --git a/src/mountpoint.c b/src/mountpoint.c
+index b24335e..5f20522 100644
+--- a/src/mountpoint.c
++++ b/src/mountpoint.c
+@@ -23,6 +23,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <sys/types.h>
+ #include <sys/stat.h>
#include <unistd.h>
+ #include <stdlib.h>
+diff --git a/src/wall.c b/src/wall.c
+index d3a2c70..00826e9 100644
+--- a/src/wall.c
++++ b/src/wall.c
+@@ -30,6 +30,7 @@
#include <pwd.h>
#include <syslog.h>
+ #include <sys/types.h>
+#include <time.h>
#include "init.h"
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
deleted file mode 100644
index 884857a96d..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ /dev/null
@@ -1,112 +0,0 @@
-SUMMARY = "System-V like init"
-DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts."
-HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/"
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
-PR = "r14"
-
-RDEPENDS_${PN} = "${PN}-inittab"
-
-SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.bz2 \
- file://install.patch \
- file://crypt-lib.patch \
- file://pidof-add-m-option.patch \
- file://0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch \
- file://realpath.patch \
- file://rcS-default \
- file://rc \
- file://rcS \
- file://bootlogd.init \
- file://01_bootlogd \
-"
-
-SRC_URI[md5sum] = "6eda8a97b86e0a6f59dabbf25202aa6f"
-SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519"
-
-S = "${WORKDIR}/sysvinit-${PV}"
-B = "${S}/src"
-
-inherit update-alternatives
-DEPENDS_append = " update-rc.d-native base-passwd"
-
-ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall"
-
-ALTERNATIVE_PRIORITY = "200"
-
-ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
-ALTERNATIVE_PRIORITY[init] = "50"
-
-ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
-ALTERNATIVE_PRIORITY[mountpoint] = "20"
-
-ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
-ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
-ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
-ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
-ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
-
-ALTERNATIVE_${PN}-pidof = "pidof"
-ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof"
-
-ALTERNATIVE_${PN}-sulogin = "sulogin"
-ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
-
-ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
-
-ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
-ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
-ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
-ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
-ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
-ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
-ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
-
-PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
-FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
-FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
-FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit"
-
-RDEPENDS_${PN} += "sysvinit-pidof initscripts-functions"
-
-CFLAGS_prepend = "-D_GNU_SOURCE "
-export LCRYPT = "-lcrypt"
-EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \
- 'base_sbindir=${base_sbindir}' \
- 'bindir=${bindir}' \
- 'sbindir=${sbindir}' \
- 'sysconfdir=${sysconfdir}' \
- 'includedir=${includedir}' \
- 'mandir=${mandir}'"
-
-do_install () {
- oe_runmake 'ROOT=${D}' install
-
- install -d ${D}${sysconfdir} \
- ${D}${sysconfdir}/default \
- ${D}${sysconfdir}/init.d
- for level in S 0 1 2 3 4 5 6; do
- install -d ${D}${sysconfdir}/rc$level.d
- done
-
- install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS
- install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd
- ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd
-
- update-rc.d -r ${D} bootlogd start 07 S .
- update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 .
-
- install -d ${D}${sysconfdir}/default/volatiles
- install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles
-
- chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
- chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
-}
-
-python () {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- raise bb.parse.SkipPackage("'sysvinit' not in DISTRO_FEATURES")
-}
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.96.bb b/meta/recipes-core/sysvinit/sysvinit_2.96.bb
new file mode 100644
index 0000000000..2b146b1ef8
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit_2.96.bb
@@ -0,0 +1,112 @@
+SUMMARY = "System-V like init"
+DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts."
+HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+ file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \
+ "
+
+RDEPENDS_${PN} = "${PN}-inittab"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \
+ file://install.patch \
+ file://crypt-lib.patch \
+ file://pidof-add-m-option.patch \
+ file://realpath.patch \
+ file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \
+ file://rcS-default \
+ file://rc \
+ file://rcS \
+ file://bootlogd.init \
+ file://01_bootlogd \
+ "
+SRC_URI[md5sum] = "48cebffebf2a96ab09bec14bf9976016"
+SRC_URI[sha256sum] = "2a2e26b72aa235a23ab1c8471005f890309ce1196c83fbc9413c57b9ab62b587"
+
+S = "${WORKDIR}/sysvinit-${PV}"
+B = "${S}/src"
+
+inherit update-alternatives features_check
+DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt"
+
+REQUIRED_DISTRO_FEATURES = "sysvinit"
+
+ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall"
+
+ALTERNATIVE_PRIORITY = "200"
+
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] = "50"
+
+ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
+ALTERNATIVE_PRIORITY[mountpoint] = "20"
+
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+
+ALTERNATIVE_${PN}-pidof = "pidof"
+ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof"
+
+ALTERNATIVE_${PN}-sulogin = "sulogin"
+ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+
+ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
+
+ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
+ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
+ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
+ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
+ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
+ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
+ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
+
+PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
+FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
+FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
+FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit"
+
+RDEPENDS_${PN} += "sysvinit-pidof initd-functions"
+
+CFLAGS_prepend = "-D_GNU_SOURCE "
+export LCRYPT = "-lcrypt"
+EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \
+ 'base_sbindir=${base_sbindir}' \
+ 'bindir=${bindir}' \
+ 'sbindir=${sbindir}' \
+ 'sysconfdir=${sysconfdir}' \
+ 'includedir=${includedir}' \
+ 'mandir=${mandir}' \
+ MNTPOINT=yes"
+
+do_install () {
+ oe_runmake 'ROOT=${D}' install
+
+ install -d ${D}${sysconfdir} \
+ ${D}${sysconfdir}/default \
+ ${D}${sysconfdir}/init.d
+ for level in S 0 1 2 3 4 5 6; do
+ install -d ${D}${sysconfdir}/rc$level.d
+ done
+
+ install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS
+ install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd
+ ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd
+
+ update-rc.d -r ${D} bootlogd start 07 S .
+ update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 .
+
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles
+
+ chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
+ chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
+
+ # Already provided by e2fsprogs; sysvinit's version is a copy from there
+ rm ${D}${base_sbindir}/logsave
+}
diff --git a/meta/recipes-core/udev/eudev/0014-Revert-rules-remove-firmware-loading-rules.patch b/meta/recipes-core/udev/eudev/0014-Revert-rules-remove-firmware-loading-rules.patch
new file mode 100644
index 0000000000..fe2ba5328d
--- /dev/null
+++ b/meta/recipes-core/udev/eudev/0014-Revert-rules-remove-firmware-loading-rules.patch
@@ -0,0 +1,28 @@
+From 4f0a722489154da99e7f6b3051afde984eed2f74 Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Thu, 19 Mar 2015 15:01:29 +1100
+Subject: [PATCH] Revert "rules: remove firmware loading rules"
+
+This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
+Userspace firmware loading support is needed for Linux < 3.7.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ rules/50-firmware.rules | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 rules/50-firmware.rules
+
+diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
+new file mode 100644
+index 0000000..f0ae684
+--- /dev/null
++++ b/rules/50-firmware.rules
+@@ -0,0 +1,3 @@
++# do not edit this file, it will be overwritten on update
++
++SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
+--
+2.3.3
+
diff --git a/meta/recipes-core/udev/eudev/Revert-udev-remove-userspace-firmware-loading-suppor.patch b/meta/recipes-core/udev/eudev/Revert-udev-remove-userspace-firmware-loading-suppor.patch
new file mode 100644
index 0000000000..db333e9376
--- /dev/null
+++ b/meta/recipes-core/udev/eudev/Revert-udev-remove-userspace-firmware-loading-suppor.patch
@@ -0,0 +1,364 @@
+From e415372cc7a2f52e70e1cfa8c6c1f633b411355d Mon Sep 17 00:00:00 2001
+From: Lauren Post <lauren.post@nxp.com>
+Date: Wed, 8 Jun 2016 06:51:56 -0500
+Subject: [PATCH] Revert "udev: remove userspace firmware loading support"
+
+This reverts commit 3b717594600fa717cdf9bcfd0c7c1b703b245482.
+
+Conflicts:
+ configure.ac
+ src/udev/udevd.c
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Lauren Post <lauren.post@nxp.com>
+---
+ configure.ac | 39 +++++++++-
+ rules/Makefile.am | 5 ++
+ src/udev/Makefile.am | 10 +++
+ src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
+ src/udev/udev-builtin.c | 3 +
+ src/udev/udev.h | 6 ++
+ src/udev/udevd.c | 13 ++++
+ 7 files changed, 227 insertions(+), 3 deletions(-)
+ create mode 100644 src/udev/udev-builtin-firmware.c
+
+diff --git a/configure.ac b/configure.ac
+index 8691891..65028c2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -238,9 +238,42 @@ AC_CHECK_DECL([unshare],
+ [#include <sched.h>])
+
+ # ------------------------------------------------------------------------------
+-AC_PATH_TOOL(GPERF, gperf)
+-if test -z "$GPERF" ; then
+- AC_MSG_ERROR([*** gperf not found])
++AC_ARG_WITH(firmware-path,
++ AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
++ [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]),
++ [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"])
++OLD_IFS=$IFS
++IFS=:
++for i in $with_firmware_path; do
++ if test "x${FIRMWARE_PATH}" = "x"; then
++ FIRMWARE_PATH="\\\"${i}/\\\""
++ else
++ FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
++ fi
++done
++IFS=$OLD_IFS
++AC_SUBST(FIRMWARE_PATH)
++AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
++AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
++
++# ------------------------------------------------------------------------------
++AC_ARG_ENABLE([gudev],
++ AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
++ [], [enable_gudev=yes])
++AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0]) ])
++AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
++
++# ------------------------------------------------------------------------------
++AC_ARG_ENABLE([keymap],
++ AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
++ [], [enable_keymap=yes])
++
++if test "x$enable_keymap" = "xyes"; then
++ AC_PATH_TOOL(GPERF, gperf)
++ if test -z "$GPERF" ; then
++ AC_MSG_ERROR([*** gperf not found])
++ fi
++ AC_DEFINE([ENABLE_KEYMAP], [1], [Define if we are enabling rule generator])
+ fi
+
+ # ------------------------------------------------------------------------------
+diff --git a/rules/Makefile.am b/rules/Makefile.am
+index 24c099c..d714ae3 100644
+--- a/rules/Makefile.am
++++ b/rules/Makefile.am
+@@ -22,6 +22,11 @@ dist_udevrules_DATA += \
+ 80-net-name-slot.rules
+ endif
+
++if ENABLE_FIRMWARE
++dist_udevrules_DATA += \
++ 50-firmware.rules
++endif
++
+ if HAVE_BLKID
+ dist_udevrules_DATA += \
+ 60-persistent-storage.rules
+diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am
+index 401af01..742fbc8 100644
+--- a/src/udev/Makefile.am
++++ b/src/udev/Makefile.am
+@@ -53,12 +53,18 @@ libudev_core_la_SOURCES = \
+ udev-ctrl.c \
+ udev-builtin.c \
+ udev-builtin-btrfs.c \
++ udev-builtin-firmware.c \
+ udev-builtin-hwdb.c \
+ udev-builtin-input_id.c \
+ udev-builtin-net_id.c \
+ udev-builtin-path_id.c \
+ udev-builtin-usb_id.c
+
++if ENABLE_FIRMWARE
++libudev_core_la_SOURCES += \
++ udev-builtin-firmware.c
++endif
++
+ include_HEADERS = \
+ udev.h
+
+@@ -86,6 +92,10 @@ libudev_core_la_LIBADD += \
+ $(KMOD_LIBS)
+ endif
+
++libudev_core_la_CPPFLAGS = \
++ $(AM_CPPFLAGS) \
++ -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
++
+ #
+ # Extras
+ #
+diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
+new file mode 100644
+index 0000000..bd8c2fb
+--- /dev/null
++++ b/src/udev/udev-builtin-firmware.c
+@@ -0,0 +1,154 @@
++/*
++ * firmware - Kernel firmware loader
++ *
++ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
++ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details:*
++ */
++
++#include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <getopt.h>
++#include <errno.h>
++#include <stdbool.h>
++#include <sys/utsname.h>
++#include <sys/stat.h>
++
++#include "udev.h"
++
++static bool set_loading(struct udev *udev, char *loadpath, const char *state) {
++ FILE *ldfile;
++
++ ldfile = fopen(loadpath, "we");
++ if (ldfile == NULL) {
++ log_error("error: can not open '%s'", loadpath);
++ return false;
++ };
++ fprintf(ldfile, "%s\n", state);
++ fclose(ldfile);
++ return true;
++}
++
++static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) {
++ char *buf;
++ FILE *fsource = NULL, *ftarget = NULL;
++ bool ret = false;
++
++ buf = malloc(size);
++ if (buf == NULL) {
++ log_error("No memory available to load firmware file");
++ return false;
++ }
++
++ log_debug("writing '%s' (%zi) to '%s'", source, size, target);
++
++ fsource = fopen(source, "re");
++ if (fsource == NULL)
++ goto exit;
++ ftarget = fopen(target, "we");
++ if (ftarget == NULL)
++ goto exit;
++ if (fread(buf, size, 1, fsource) != 1)
++ goto exit;
++ if (fwrite(buf, size, 1, ftarget) == 1)
++ ret = true;
++exit:
++ if (ftarget != NULL)
++ fclose(ftarget);
++ if (fsource != NULL)
++ fclose(fsource);
++ free(buf);
++ return ret;
++}
++
++static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) {
++ struct udev *udev = udev_device_get_udev(dev);
++ static const char *searchpath[] = { FIRMWARE_PATH };
++ char loadpath[UTIL_PATH_SIZE];
++ char datapath[UTIL_PATH_SIZE];
++ char fwpath[UTIL_PATH_SIZE];
++ const char *firmware;
++ FILE *fwfile = NULL;
++ struct utsname kernel;
++ struct stat statbuf;
++ unsigned int i;
++ int rc = EXIT_SUCCESS;
++
++ firmware = udev_device_get_property_value(dev, "FIRMWARE");
++ if (firmware == NULL) {
++ log_error("firmware parameter missing");
++ rc = EXIT_FAILURE;
++ goto exit;
++ }
++
++ /* lookup firmware file */
++ uname(&kernel);
++ for (i = 0; i < ELEMENTSOF(searchpath); i++) {
++ strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
++ fwfile = fopen(fwpath, "re");
++ if (fwfile != NULL)
++ break;
++
++ strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
++ fwfile = fopen(fwpath, "re");
++ if (fwfile != NULL)
++ break;
++ }
++
++ strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
++
++ if (fwfile == NULL) {
++ log_debug("did not find firmware file '%s'", firmware);
++ rc = EXIT_FAILURE;
++ /*
++ * Do not cancel the request in the initrd, the real root might have
++ * the firmware file and the 'coldplug' run in the real root will find
++ * this pending request and fulfill or cancel it.
++ * */
++ if (!in_initrd())
++ set_loading(udev, loadpath, "-1");
++ goto exit;
++ }
++
++ if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
++ if (!in_initrd())
++ set_loading(udev, loadpath, "-1");
++ rc = EXIT_FAILURE;
++ goto exit;
++ }
++
++ if (!set_loading(udev, loadpath, "1"))
++ goto exit;
++
++ strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
++ if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
++ log_error("error sending firmware '%s' to device", firmware);
++ set_loading(udev, loadpath, "-1");
++ rc = EXIT_FAILURE;
++ goto exit;
++ };
++
++ set_loading(udev, loadpath, "0");
++exit:
++ if (fwfile)
++ fclose(fwfile);
++ return rc;
++}
++
++const struct udev_builtin udev_builtin_firmware = {
++ .name = "firmware",
++ .cmd = builtin_firmware,
++ .help = "kernel firmware loader",
++ .run_once = true,
++};
+diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
+index 74b3bdc..3657106 100644
+--- a/src/udev/udev-builtin.c
++++ b/src/udev/udev-builtin.c
+@@ -34,6 +34,9 @@ static const struct udev_builtin *builtins[] = {
+ [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
+ #endif
+ [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
++#ifdef HAVE_FIRMWARE
++ [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
++#endif
+ [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
+ [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
+ [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
+diff --git a/src/udev/udev.h b/src/udev/udev.h
+index 198cb2c..01a1e9c 100644
+--- a/src/udev/udev.h
++++ b/src/udev/udev.h
+@@ -149,6 +149,9 @@ enum udev_builtin_cmd {
+ UDEV_BUILTIN_BLKID,
+ #endif
+ UDEV_BUILTIN_BTRFS,
++#ifdef HAVE_FIRMWARE
++ UDEV_BUILTIN_FIRMWARE,
++#endif
+ UDEV_BUILTIN_HWDB,
+ UDEV_BUILTIN_INPUT_ID,
+ UDEV_BUILTIN_KEYBOARD,
+@@ -173,6 +176,9 @@ struct udev_builtin {
+ extern const struct udev_builtin udev_builtin_blkid;
+ #endif
+ extern const struct udev_builtin udev_builtin_btrfs;
++#ifdef HAVE_FIRMWARE
++extern const struct udev_builtin udev_builtin_firmware;
++#endif
+ extern const struct udev_builtin udev_builtin_hwdb;
+ extern const struct udev_builtin udev_builtin_input_id;
+ extern const struct udev_builtin udev_builtin_keyboard;
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index b1de97a..35655d8 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -101,6 +101,9 @@ struct event {
+ bool is_block;
+ usec_t start_usec;
+ bool warned;
++#ifdef HAVE_FIRMWARE
++ bool nodelay;
++#endif
+ };
+
+ static inline struct event *node_to_event(struct udev_list_node *node) {
+@@ -491,6 +494,10 @@ static int event_queue_insert(struct udev_device *dev) {
+ event->devnum = udev_device_get_devnum(dev);
+ event->is_block = streq("block", udev_device_get_subsystem(dev));
+ event->ifindex = udev_device_get_ifindex(dev);
++#ifdef HAVE_FIRMWARE
++ if (streq(udev_device_get_subsystem(dev), "firmware"))
++ event->nodelay = true;
++#endif
+
+ log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
+ udev_device_get_action(dev), udev_device_get_subsystem(dev));
+@@ -566,6 +573,12 @@ static bool is_devpath_busy(struct event *event) {
+ return true;
+ }
+
++#ifdef HAVE_FIRMWARE
++ /* allow to bypass the dependency tracking */
++ if (event->nodelay)
++ continue;
++#endif
++
+ /* parent device event found */
+ if (event->devpath[common] == '/') {
+ event->delaying_seqnum = loop_event->seqnum;
+--
+1.9.1
+
diff --git a/meta/recipes-core/udev/eudev/init b/meta/recipes-core/udev/eudev/init
index 0ab028b391..0455ade258 100644
--- a/meta/recipes-core/udev/eudev/init
+++ b/meta/recipes-core/udev/eudev/init
@@ -14,25 +14,7 @@ export TZ=/etc/localtime
[ -d /sys/class ] || exit 1
[ -r /proc/mounts ] || exit 1
[ -x @UDEVD@ ] || exit 1
-SYSCONF_CACHED="/etc/udev/cache.data"
-SYSCONF_TMP="/dev/shm/udev.cache"
-DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
-# A list of files which are used as a criteria to judge whether the udev cache could be reused.
-CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
-[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
-
-# List of files whose metadata (size/mtime/name) will be included in cached
-# system state.
-META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
-
-# Command to compute system configuration.
-sysconf_cmd () {
- cat -- $CMP_FILE_LIST
- stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
-}
-
-[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
[ -f /etc/default/rcS ] && . /etc/default/rcS
@@ -66,37 +48,6 @@ case "$1" in
# /var/volatile/tmp directory to be available.
mkdir -m 1777 -p /var/volatile/tmp
- # Cache handling.
- if [ "$DEVCACHE" != "" ]; then
- if [ -e $DEVCACHE ]; then
- sysconf_cmd > "$SYSCONF_TMP"
- if cmp $SYSCONF_CACHED $SYSCONF_TMP >/dev/null; then
- tar xmf $DEVCACHE -C / -m
- not_first_boot=1
- [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
- [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP"
- [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN"
- else
- # Output detailed reason why the cached /dev is not used
- cat <<EOF
-udev: Not using udev cache because of changes detected in the following files:
-udev: $CMP_FILE_LIST
-udev: $META_FILE_LIST
-udev: The udev cache will be regenerated. To identify the detected changes,
-udev: compare the cached sysconf at $SYSCONF_CACHED
-udev: against the current sysconf at $SYSCONF_TMP
-EOF
- touch "$DEVCACHE_REGEN"
- fi
- else
- if [ "$ROOTFS_READ_ONLY" != "yes" ]; then
- # If rootfs is not read-only, it's possible that a new udev cache would be generated;
- # otherwise, we do not bother to read files.
- touch "$DEVCACHE_REGEN"
- fi
- fi
- fi
-
# make_extra_nodes
kill_udevd > "/dev/null" 2>&1
diff --git a/meta/recipes-core/udev/eudev/udev-cache b/meta/recipes-core/udev/eudev/udev-cache
deleted file mode 100644
index dcfff1cb45..0000000000
--- a/meta/recipes-core/udev/eudev/udev-cache
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh -e
-
-### BEGIN INIT INFO
-# Provides: udev-cache
-# Required-Start: mountall
-# Required-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: cache /dev to speedup the udev next boot
-### END INIT INFO
-
-export TZ=/etc/localtime
-
-[ -r /proc/mounts ] || exit 1
-[ -x @UDEVD@ ] || exit 1
-[ -d /sys/class ] || exit 1
-
-[ -f /etc/default/rcS ] && . /etc/default/rcS
-DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar"
-SYSCONF_CACHED="/etc/udev/cache.data"
-SYSCONF_TMP="/dev/shm/udev.cache"
-DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
-
-# A list of files which are used as a criteria to judge whether the udev cache could be reused.
-CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
-[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
-
-# List of files whose metadata (size/mtime/name) will be included in cached
-# system state.
-META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
-
-# Command to compute system configuration.
-sysconf_cmd () {
- cat -- $CMP_FILE_LIST
- stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
-}
-
-[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
-
-if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
- [ "$VERBOSE" != "no" ] && echo "udev-cache: read-only rootfs, skip generating udev-cache"
- exit 0
-fi
-
-[ "$DEVCACHE" != "" ] || exit 0
-[ "${VERBOSE}" == "no" ] || echo -n "udev-cache: checking for ${DEVCACHE_REGEN}... "
-if ! [ -e "$DEVCACHE_REGEN" ]; then
- [ "${VERBOSE}" == "no" ] || echo "not found."
- exit 0
-fi
-[ "${VERBOSE}" == "no" ] || echo "found."
-echo "Populating dev cache"
-
-err_cleanup () {
- echo "udev-cache: update failed!"
- udevadm control --start-exec-queue
- rm -f -- "$SYSCONF_TMP" "$DEVCACHE_TMP" "$DEVCACHE" "$SYSCONF_CACHED"
-}
-
-(
- set -e
- trap 'err_cleanup' EXIT
- udevadm control --stop-exec-queue
- sysconf_cmd > "$SYSCONF_TMP"
- find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
- | xargs tar cf "${DEVCACHE_TMP}"
- gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
- rm -f "${DEVCACHE_TMP}"
- mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
- udevadm control --start-exec-queue
- rm -f "$DEVCACHE_REGEN"
- trap - EXIT
-) &
-
-exit 0
diff --git a/meta/recipes-core/udev/eudev/udev-cache.default b/meta/recipes-core/udev/eudev/udev-cache.default
deleted file mode 100644
index a3b732698d..0000000000
--- a/meta/recipes-core/udev/eudev/udev-cache.default
+++ /dev/null
@@ -1,5 +0,0 @@
-# Default for /etc/init.d/udev
-
-# Comment this out to disable device cache
-DEVCACHE="/etc/udev-cache.tar.gz"
-PROBE_PLATFORM_BUS="yes"
diff --git a/meta/recipes-core/udev/eudev_3.2.8.bb b/meta/recipes-core/udev/eudev_3.2.8.bb
new file mode 100644
index 0000000000..6619cdde37
--- /dev/null
+++ b/meta/recipes-core/udev/eudev_3.2.8.bb
@@ -0,0 +1,96 @@
+SUMMARY = "eudev is a fork of systemd's udev"
+HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
+LICENSE = "GPLv2.0+ & LGPL-2.1+"
+LICENSE_libudev = "LGPL-2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
+
+PROVIDES = "udev"
+
+SRC_URI = "https://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
+ file://0014-Revert-rules-remove-firmware-loading-rules.patch \
+ file://Revert-udev-remove-userspace-firmware-loading-suppor.patch \
+ file://devfs-udev.rules \
+ file://init \
+ file://links.conf \
+ file://local.rules \
+ file://permissions.rules \
+ file://run.rules \
+ file://udev.rules \
+"
+
+SRC_URI[md5sum] = "ce166b3fdd910c2a4a840378f48fedaf"
+SRC_URI[sha256sum] = "61e4948e9e51271c3cce2bb5311a30b206dd03ef011062e6c627fb007e43f6b8"
+
+inherit autotools update-rc.d qemu pkgconfig features_check
+
+CONFLICT_DISTRO_FEATURES = "systemd"
+
+EXTRA_OECONF = " \
+ --sbindir=${base_sbindir} \
+ --with-rootlibdir=${base_libdir} \
+ --with-rootlibexecdir=${nonarch_base_libdir}/udev \
+ --with-rootprefix= \
+"
+
+PACKAGECONFIG ??= "hwdb"
+PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
+
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
+
+ # Use classic network interface naming scheme
+ touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+
+ # hid2hci has moved to bluez4. removed in udev as of version 169
+ rm -f ${D}${base_libdir}/udev/hid2hci
+
+ # duplicate udevadm for postinst script
+ install -d ${D}${libexecdir}
+ ln ${D}${bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
+}
+
+do_install_prepend_class-target () {
+ # Remove references to buildmachine
+ sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ ${B}/src/udev/keyboard-keys-from-name.h
+}
+
+INITSCRIPT_NAME = "udev"
+INITSCRIPT_PARAMS = "start 04 S ."
+
+PACKAGES =+ "libudev"
+PACKAGES =+ "eudev-hwdb"
+
+
+FILES_${PN} += "${libexecdir} ${nonarch_base_libdir}/udev ${bindir}/udevadm"
+FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
+ ${includedir}/libudev.h ${libdir}/libudev.so \
+ ${includedir}/udev.h ${libdir}/libudev.la \
+ ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
+FILES_libudev = "${base_libdir}/libudev.so.*"
+FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
+
+RDEPENDS_eudev-hwdb += "eudev"
+
+RPROVIDES_${PN} = "hotplug udev"
+RPROVIDES_eudev-hwdb += "udev-hwdb"
+
+PACKAGE_WRITE_DEPS += "qemu-native"
+pkg_postinst_eudev-hwdb () {
+ if test -n "$D"; then
+ $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX}
+ else
+ udevadm hwdb --update
+ fi
+}
+
+pkg_prerm_eudev-hwdb () {
+ rm -f $D${sysconfdir}/udev/hwdb.bin
+}
diff --git a/meta/recipes-core/udev/eudev_3.2.bb b/meta/recipes-core/udev/eudev_3.2.bb
deleted file mode 100644
index 211252cebc..0000000000
--- a/meta/recipes-core/udev/eudev_3.2.bb
+++ /dev/null
@@ -1,101 +0,0 @@
-SUMMARY = "eudev is a fork of systemd's udev"
-HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
-LICENSE = "GPLv2.0+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
-
-PROVIDES = "udev"
-
-SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz \
- file://devfs-udev.rules \
- file://init \
- file://links.conf \
- file://local.rules \
- file://permissions.rules \
- file://run.rules \
- file://udev-cache \
- file://udev-cache.default \
- file://udev.rules \
-"
-UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases"
-
-SRC_URI[md5sum] = "9eb477cc8718db272b5d24dff1126b04"
-SRC_URI[sha256sum] = "37829d37f4beb7e358ca33abc1ad0907d87f917ce157777aeaeebeacae24efdc"
-
-inherit autotools update-rc.d qemu pkgconfig
-
-EXTRA_OECONF = " \
- --sbindir=${base_sbindir} \
- --with-rootlibdir=${base_libdir} \
- --with-rootprefix= \
-"
-
-PACKAGECONFIG ??= "hwdb"
-PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
- install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
- sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
- sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache
-
- install -d ${D}${sysconfdir}/default
- install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
-
- touch ${D}${sysconfdir}/udev/cache.data
-
- install -d ${D}${sysconfdir}/udev/rules.d
- install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
-
- # Use classic network interface naming scheme
- touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
-
- # hid2hci has moved to bluez4. removed in udev as of version 169
- rm -f ${D}${base_libdir}/udev/hid2hci
-}
-
-INITSCRIPT_PACKAGES = "eudev udev-cache"
-INITSCRIPT_NAME_eudev = "udev"
-INITSCRIPT_PARAMS_eudev = "start 04 S ."
-INITSCRIPT_NAME_udev-cache = "udev-cache"
-INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
-
-PACKAGES =+ "libudev"
-PACKAGES =+ "udev-cache"
-PACKAGES =+ "eudev-hwdb"
-
-
-FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
-FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
- ${includedir}/libudev.h ${libdir}/libudev.so \
- ${includedir}/udev.h ${libdir}/libudev.la \
- ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
-FILES_libudev = "${base_libdir}/libudev.so.*"
-FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
-FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
-
-RDEPENDS_eudev-hwdb += "eudev"
-
-RRECOMMENDS_${PN} += "udev-cache"
-
-RPROVIDES_${PN} = "hotplug udev"
-
-python () {
- if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
-}
-
-pkg_postinst_eudev-hwdb () {
- if test -n "$D"; then
- ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
- chown root:root $D${sysconfdir}/udev/hwdb.bin
- else
- udevadm hwdb --update
- fi
-}
-
-pkg_prerm_eudev-hwdb () {
- rm -f $D${sysconfdir}/udev/hwdb.bin
-}
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index d760328a09..b23731870e 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -4,10 +4,28 @@
#
# Attempt to mount any added block devices and umount any removed devices
+BASE_INIT="`readlink -f "@base_sbindir@/init"`"
+INIT_SYSTEMD="@systemd_unitdir@/systemd"
+
+if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then
+ # systemd as init uses systemd-mount to mount block devices
+ MOUNT="/usr/bin/systemd-mount"
+ UMOUNT="/usr/bin/systemd-umount"
+
+ if [ -x $MOUNT ] && [ -x $UMOUNT ];
+ then
+ logger "Using systemd-mount to finish mount"
+ else
+ logger "Linux init is using systemd, so please install systemd-mount to finish mount"
+ exit 1
+ fi
+else
+ MOUNT="/bin/mount"
+ UMOUNT="/bin/umount"
+fi
-MOUNT="/bin/mount"
PMOUNT="/usr/bin/pmount"
-UMOUNT="/bin/umount"
+
for line in `grep -h -v ^# /etc/udev/mount.blacklist /etc/udev/mount.blacklist.d/*`
do
if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ];
@@ -17,22 +35,79 @@ do
fi
done
-automount() {
+automount_systemd() {
+ name="`basename "$DEVNAME"`"
+
+ # Skip already mounted partitions
+ if [ -f /run/systemd/transient/run-media-$name.mount ]; then
+ logger "mount.sh/automount" "/run/media/$name already mounted"
+ return
+ fi
+
+ # Skip the partition which are already in /etc/fstab
+ grep "^[[:space:]]*$DEVNAME" /etc/fstab && return
+ for n in LABEL PARTLABEL UUID PARTUUID; do
+ tmp="$(lsblk -o $n $DEVNAME | sed -e '1d')"
+ test -z "$tmp" && continue
+ tmp="$n=$tmp"
+ grep "^[[:space:]]*$tmp" /etc/fstab && return
+ done
+
+ [ -d "/run/media/$name" ] || mkdir -p "/run/media/$name"
+
+ MOUNT="$MOUNT -o silent"
+
+ # If filesystemtype is vfat, change the ownership group to 'disk', and
+ # grant it with w/r/x permissions.
+ case $ID_FS_TYPE in
+ vfat|fat)
+ MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
+ ;;
+ swap)
+ return ;;
+ # TODO
+ *)
+ ;;
+ esac
+
+ if ! $MOUNT --no-block -t auto $DEVNAME "/run/media/$name"
+ then
+ #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" failed!"
+ rm_dir "/run/media/$name"
+ else
+ logger "mount.sh/automount" "Auto-mount of [/run/media/$name] successful"
+ touch "/tmp/.automount-$name"
+ fi
+}
+
+automount() {
name="`basename "$DEVNAME"`"
+ if [ -x "$PMOUNT" ]; then
+ $PMOUNT $DEVNAME 2> /dev/null
+ elif [ -x $MOUNT ]; then
+ $MOUNT $DEVNAME 2> /dev/null
+ fi
+
+ # If the device isn't mounted at this point, it isn't
+ # configured in fstab
+ grep -q "^$DEVNAME " /proc/mounts && return
+
! test -d "/run/media/$name" && mkdir -p "/run/media/$name"
# Silent util-linux's version of mounting auto
if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
then
MOUNT="$MOUNT -o silent"
fi
-
+
# If filesystem type is vfat, change the ownership group to 'disk', and
# grant it with w/r/x permissions.
case $ID_FS_TYPE in
vfat|fat)
MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
;;
+ swap)
+ return ;;
# TODO
*)
;;
@@ -63,28 +138,24 @@ name="`basename "$DEVNAME"`"
[ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media`
if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_type" = "cdrom" ]; then
- if [ -x "$PMOUNT" ]; then
- $PMOUNT $DEVNAME 2> /dev/null
- elif [ -x $MOUNT ]; then
- $MOUNT $DEVNAME 2> /dev/null
- fi
-
- # If the device isn't mounted at this point, it isn't
- # configured in fstab (note the root filesystem can show up as
- # /dev/root in /proc/mounts, so check the device number too)
- if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then
- grep -q "^$DEVNAME " /proc/mounts || automount
- fi
+ # Note the root filesystem can show up as /dev/root in /proc/mounts,
+ # so check the device number too
+ if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then
+ if [ "`basename $MOUNT`" = "systemd-mount" ];then
+ automount_systemd
+ else
+ automount
+ fi
+ fi
fi
-
if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
- for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
- do
- $UMOUNT $mnt
- done
-
- # Remove empty directories from auto-mounter
- name="`basename "$DEVNAME"`"
- test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name"
+ for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
+ do
+ $UMOUNT $mnt
+ done
+
+ # Remove empty directories from auto-mounter
+ name="`basename "$DEVNAME"`"
+ test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name"
fi
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index ecd4a8aab5..90f933d981 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -1,8 +1,8 @@
SUMMARY = "Extra machine specific configuration files"
+HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information."
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = " \
file://automount.rules \
@@ -29,6 +29,9 @@ do_install() {
install -d ${D}${sysconfdir}/udev/scripts/
install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
+ sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh
+ sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh
+
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
}
diff --git a/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch b/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch
deleted file mode 100644
index fb443ff15e..0000000000
--- a/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Upstream-Status: Pending
-
---- update-rc.d/update-rc.d.org 2005-01-03 00:30:47.000000000 +0200
-+++ update-rc.d/update-rc.d 2007-12-01 19:41:08.000000000 +0200
-@@ -19,6 +19,7 @@
- notreally=0
- force=0
- dostart=0
-+verbose=0
-
- usage()
- {
-@@ -28,6 +29,7 @@
- update-rc.d [-n] [-r <root>] [-s] <basename> start|stop NN runlvl [runlvl] [...] .
- -n: not really
- -f: force
-+ -v: verbose
- -r: alternate root path (default is /)
- -s: invoke start methods if appropriate to current runlevel
- EOF
-@@ -69,7 +71,7 @@
- lev=`echo $2 | cut -d/ -f1`
- nn=`echo $2 | cut -d/ -f2`
- fn="${etcd}${lev}.d/${startstop}${nn}${bn}"
-- echo " $fn -> ../init.d/$bn"
-+ [ $verbose -eq 1 ] && echo " $fn -> ../init.d/$bn"
- if [ $notreally -eq 0 ]; then
- mkdir -p `dirname $fn`
- ln -s ../init.d/$bn $fn
-@@ -89,7 +91,7 @@
- exit 0
- fi
-
-- echo " Adding system startup for $initd/$bn ..."
-+ echo " Adding system startup for $initd/$bn."
-
- for i in $startlinks; do
- dolink S $i
-@@ -105,6 +107,10 @@
- shift
- continue
- ;;
-+ -v) verbose=1
-+ shift
-+ continue
-+ ;;
- -f) force=1
- shift
- continue
diff --git a/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch b/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch
deleted file mode 100644
index 075171a5a3..0000000000
--- a/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Check if symlinks are valid
-
-When using root option and $initd/$bn is a symlink, the script would fail because
-the symlink points to a path on target. For example:
-
-/path/to/target/rootfs/etc/init.d/syslog -> /etc/init.d/syslog.busybox
-
-Hence, [ -f /path/to/target/rootfs/etc/init.d/syslog ] condition would return
-false.
-
-This patch adds the posibility to check whether the file the symlink points to
-actually exists in rootfs path and then continue.
-
-Upstream-Status: Pending
-
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-
-Index: git/update-rc.d
-===================================================================
---- git.orig/update-rc.d
-+++ git/update-rc.d
-@@ -147,13 +147,34 @@ fi
- bn=$1
- shift
-
-+sn=$initd/$bn
-+if [ -L "$sn" -a -n "$root" ]; then
-+ if which readlink >/dev/null; then
-+ while true; do
-+ linksn="$(readlink "$sn")"
-+ if [ -z "$linksn" ]; then
-+ break
-+ fi
-+
-+ sn="$linksn"
-+ case "$sn" in
-+ /*) sn="$root$sn" ;;
-+ *) sn="$initd/$sn" ;;
-+ esac
-+ done
-+ else
-+ echo "update-rc.d: readlink tool not present, cannot check whether \
-+ $sn symlink points to a valid file." >&2
-+ fi
-+fi
-+
- if [ $1 != "remove" ]; then
-- if [ ! -f "$initd/$bn" ]; then
-+ if [ ! -f "$sn" ]; then
- echo "update-rc.d: $initd/$bn: file does not exist" >&2
- exit 1
- fi
- else
-- if [ -f "$initd/$bn" ]; then
-+ if [ -f "$sn" ]; then
- if [ $force -eq 1 ]; then
- echo "update-rc.d: $initd/$bn exists during rc.d purge (continuing)" >&2
- else
diff --git a/meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch b/meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch
deleted file mode 100644
index 85bc234a27..0000000000
--- a/meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Pending
-
-Fix to handle priority numbers correctly.
-Previously, if the priority number is '08' or '09', for example,
-the script cannot handle them correctly as these numbers are treated
-as octal numbers.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- update-rc.d | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/update-rc.d b/update-rc.d
-index ec50d15..c70b859 100644
---- a/update-rc.d
-+++ b/update-rc.d
-@@ -205,7 +205,7 @@ case $1 in
- exit 1
- fi
- shift
-- NN=`printf %02d $1`
-+ NN=`printf %02d $(expr $1 + 0)`
- shift
- while [ "x$1" != "x." ]; do
- if [ $# -eq 0 ]; then
---
-1.7.9.5
-
diff --git a/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb b/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
deleted file mode 100644
index 3b965c50b4..0000000000
--- a/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "manage symlinks in /etc/rcN.d"
-DESCRIPTION = "update-rc.d is a utility that allows the management of symlinks to the initscripts in the /etc/rcN.d directory structure."
-SECTION = "base"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=148a48321b10eb37c1fa3ee02b940a75"
-
-PR = "r5"
-
-# Revision corresponding to tag update-rc.d_0.7
-SRCREV = "eca680ddf28d024954895f59a241a622dd575c11"
-
-SRC_URI = "git://github.com/philb/update-rc.d.git \
- file://add-verbose.patch \
- file://check-if-symlinks-are-valid.patch \
- file://fix-to-handle-priority-numbers-correctly.patch \
- "
-
-S = "${WORKDIR}/git"
-
-inherit allarch
-
-do_compile() {
-}
-
-do_install() {
- install -d ${D}${sbindir}
- install -m 0755 ${S}/update-rc.d ${D}${sbindir}/update-rc.d
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb b/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb
new file mode 100644
index 0000000000..75632d9434
--- /dev/null
+++ b/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb
@@ -0,0 +1,26 @@
+SUMMARY = "manage symlinks in /etc/rcN.d"
+HOMEPAGE = "http://github.com/philb/update-rc.d/"
+DESCRIPTION = "update-rc.d is a utility that allows the management of symlinks to the initscripts in the /etc/rcN.d directory structure."
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=d40a07c27f535425934bb5001f2037d9"
+
+SRC_URI = "git://git.yoctoproject.org/update-rc.d"
+SRCREV = "4b150b25b38de688d25cde2b2d22c268ed65a748"
+
+UPSTREAM_CHECK_COMMITS = "1"
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 ${S}/update-rc.d ${D}${sbindir}/update-rc.d
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index c6355021fc..1fa82363b1 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -1,132 +1,153 @@
SUMMARY = "A suite of basic system administration utilities"
+HOMEPAGE = "http://userweb.kernel.org/~kzak/util-linux/"
DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \
commonly found on most Linux systems. Some of the more important utilities include \
disk partitioning, kernel message management, filesystem creation, and system login."
SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2.1+ & BSD"
+LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause"
-LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c \
+LIC_FILES_CHKSUM = "file://README.licensing;md5=972a134f1e14b2b060e365df2fab0099 \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://Documentation/licenses/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://Documentation/licenses/COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
- file://Documentation/licenses/COPYING.BSD-3;md5=58dcd8452651fc8b07d1f65ce07ca8af \
- file://Documentation/licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \
- file://libuuid/COPYING;md5=b442ffb762cf8d3e9df1b99e0bb4af70 \
- file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
- file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
+ file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \
+ file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \
+ file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \
+ file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \
+ file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \
+ file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04"
#gtk-doc is not enabled as it requires xmlto which requires util-linux
-inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest
-DEPENDS = "zlib ncurses"
-DEPENDS_append_class-native = " lzo-native"
-DEPENDS_append_class-nativesdk = " lzo-native"
+inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \
"
-PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \
- util-linux-swaponoff util-linux-losetup util-linux-umount \
- util-linux-mount util-linux-readprofile util-linux-uuidd \
- util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
- util-linux-mkfs util-linux-mcookie util-linux-reset \
- util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \
- util-linux-partx util-linux-hwclock util-linux-mountpoint \
- util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit"
-PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
-PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
-
-PACKAGES_DYNAMIC = "^util-linux-lib.*"
-
-SHARED_EXTRA_OECONF = "--disable-use-tty-group \
- --disable-makeinstall-chown \
- --enable-kill --enable-last --enable-mesg --enable-partx \
- --enable-raw --enable-reset --disable-login \
- --disable-vipw --disable-newgrp --disable-chfn-chsh \
- --enable-write --enable-mount \
- --enable-libuuid --enable-libblkid --enable-fsck \
- --disable-minix --disable-bfs --without-udev \
- usrsbin_execdir='${sbindir}' \
-"
+PACKAGES =+ "${PN}-swaponoff"
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
+
+python util_linux_binpackages () {
+ def pkg_hook(f, pkg, file_regex, output_pattern, modulename):
+ pn = d.getVar('PN')
+ d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg)
+
+ if d.getVar('ALTERNATIVE_' + pkg):
+ return
+ if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename):
+ d.setVar('ALTERNATIVE_' + pkg, modulename)
+
+ bindirs = sorted(list(set(d.expand("${base_sbindir} ${base_bindir} ${sbindir} ${bindir}").split())))
+ for dir in bindirs:
+ do_split_packages(d, root=dir,
+ file_regex=r'(.*)', output_pattern='${PN}-%s',
+ description='${PN} %s',
+ hook=pkg_hook, extra_depends='')
+
+ # There are some symlinks for some binaries which we have ignored
+ # above. Add them to the package owning the binary they are
+ # pointing to
+ extras = {}
+ dvar = d.getVar('PKGD')
+ for root in bindirs:
+ for walkroot, dirs, files in os.walk(dvar + root):
+ for f in files:
+ file = os.path.join(walkroot, f)
+ if not os.path.islink(file):
+ continue
+
+ pkg = os.path.basename(os.readlink(file))
+ extras[pkg] = extras.get(pkg, '') + ' ' + file.replace(dvar, '', 1)
+
+ pn = d.getVar('PN')
+ for pkg, links in extras.items():
+ of = d.getVar('FILES_' + pn + '-' + pkg)
+ links = of + links
+ d.setVar('FILES_' + pn + '-' + pkg, links)
+}
-EXTRA_OECONF = "${SHARED_EXTRA_OECONF} --libdir=${base_libdir}"
+# we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
+PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
-PACKAGECONFIG_class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
-PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam,"
+python util_linux_libpackages() {
+ do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+ output_pattern='${PN}-lib%s',
+ description='${PN} lib%s',
+ extra_depends='', prepend=True, allow_links=True)
+}
-# Respect the systemd feature for uuidd
-PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/, --without-systemd --without-systemdsystemunitdir,systemd"
+PACKAGESPLITFUNCS =+ "util_linux_libpackages"
+
+PACKAGES_DYNAMIC = "^${PN}-.*"
+
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+UTIL_LINUX_LIBDIR = "${libdir}"
+UTIL_LINUX_LIBDIR_class-target = "${base_libdir}"
+EXTRA_OECONF = "\
+ --enable-libuuid --enable-libblkid \
+ \
+ --enable-fsck --enable-kill --enable-last --enable-mesg \
+ --enable-mount --enable-partx --enable-raw --enable-rfkill \
+ --enable-unshare --enable-write \
+ \
+ --disable-bfs --disable-chfn-chsh --disable-login \
+ --disable-makeinstall-chown --disable-minix --disable-newgrp \
+ --disable-use-tty-group --disable-vipw \
+ \
+ --without-udev \
+ \
+ usrsbin_execdir='${sbindir}' \
+ --libdir='${UTIL_LINUX_LIBDIR}' \
+"
-# Build setpriv requires libcap-ng
-PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng,"
+EXTRA_OECONF_append_class-target = " --enable-setpriv"
+EXTRA_OECONF_append_class-native = " --without-cap-ng --disable-setpriv"
+EXTRA_OECONF_append_class-nativesdk = " --without-cap-ng --disable-setpriv"
+PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+# inherit manpages requires this to be present, however util-linux does not have
+# configuration options, and installs manpages always
+PACKAGECONFIG[manpages] = ""
+PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam,"
+# Respect the systemd feature for uuidd
+PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd"
# Build python bindings for libmount
PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3"
-
# Readline support
PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
-FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
+EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'"
+ALLOW_EMPTY_${PN} = "1"
+FILES_${PN} = ""
+FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
-
-FILES_util-linux-agetty = "${base_sbindir}/agetty"
-FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
-FILES_util-linux-fstrim = "${base_sbindir}/fstrim"
-FILES_util-linux-cfdisk = "${base_sbindir}/cfdisk"
-FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
-FILES_util-linux-swaponoff = "${base_sbindir}/swapon.${BPN} ${base_sbindir}/swapoff.${BPN}"
-FILES_util-linux-losetup = "${base_sbindir}/losetup.${BPN}"
-FILES_util-linux-mount = "${base_bindir}/mount.${BPN}"
-FILES_util-linux-mcookie = "${bindir}/mcookie"
-FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
-FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
-FILES_util-linux-uuidgen = "${bindir}/uuidgen"
-FILES_util-linux-uuidd = "${sbindir}/uuidd"
-FILES_util-linux-reset = "${base_bindir}/reset"
-FILES_util-linux-partx = "${sbindir}/partx"
-FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
-FILES_util-linux-findfs = "${sbindir}/findfs"
-FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
-FILES_util-linux-runuser = "${sbindir}/runuser"
-FILES_util-linux-prlimit = "${bindir}/prlimit"
-
-FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
- ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
- ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
-FILES_util-linux-lscpu = "${bindir}/lscpu"
-
-FILES_util-linux-fsck = "${base_sbindir}/fsck*"
-FILES_util-linux-mkfs = "${sbindir}/mkfs"
-
-FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
-FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
-
-FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
-FILES_util-linux-mountpoint = "${base_bindir}/mountpoint.${BPN}"
+FILES_${PN}-mount = "${sysconfdir}/default/mountall"
+FILES_${PN}-runuser = "${sysconfdir}/pam.d/runuser*"
+FILES_${PN}-su = "${sysconfdir}/pam.d/su-l"
+CONFFILES_${PN}-su = "${sysconfdir}/pam.d/su-l"
+FILES_${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
+ ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
+ ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
# Util-linux' blkid replaces the e2fsprogs one
-FILES_util-linux-blkid = "${base_sbindir}/blkid*"
-RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
-RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
-
-# reset calls 'tput'
-RDEPENDS_util-linux-reset += "ncurses"
-
-RDEPENDS_util-linux-runuser += "libpam"
-
-RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin"
-RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
-
-RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit"
+RCONFLICTS_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid"
+RREPLACES_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid"
RRECOMMENDS_${PN}_class-native = ""
RRECOMMENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-nativesdk = ""
-RPROVIDES_${PN}-dev = "util-linux-libblkid-dev util-linux-libmount-dev util-linux-libuuid-dev"
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+
+RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
+RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
+RRECOMMENDS_${PN}-ptest += "kernel-module-scsi-debug"
+RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff"
+ALLOW_EMPTY_${PN}-swaponoff = "1"
#SYSTEMD_PACKAGES = "${PN}-uuidd ${PN}-fstrim"
SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service"
@@ -134,24 +155,18 @@ SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable"
SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service"
SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable"
-do_compile () {
- set -e
- oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'
-}
-
do_install () {
# with ccache the timestamps on compiled files may
# end up earlier than on their inputs, this allows
# for the resultant compilation in the install step.
- oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
- 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
+ oe_runmake 'CC=${CC}' 'LD=${LD}' \
'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install
mkdir -p ${D}${base_bindir}
sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
- sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root"
- binprogs_a="dmesg getopt kill more umount mount login reset su mountpoint"
+ sbinprogs_a="pivot_root hwclock mkswap losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin"
+ binprogs_a="dmesg getopt kill more umount mount login su mountpoint"
if [ "${base_sbindir}" != "${sbindir}" ]; then
mkdir -p ${D}${base_sbindir}
@@ -175,139 +190,142 @@ do_install () {
echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
rm -f ${D}${bindir}/chkdupexe
+}
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+do_install_append_class-target () {
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
install -d ${D}${sysconfdir}/pam.d
install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
+ # Required for "su -" aka "su --login" because
+ # otherwise it uses "other", which has "auth pam_deny.so"
+ # and thus prevents the operation.
+ ln -s su ${D}${sysconfdir}/pam.d/su-l
fi
}
-
-# reset and nologin causes a conflict with ncurses-native and shadow-native
+# nologin causes a conflict with shadow-native
+# kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir})
do_install_append_class-native () {
- rm -f ${D}${base_bindir}/reset
rm -f ${D}${base_sbindir}/nologin
+ rm -f ${D}${base_bindir}/kill
}
ALTERNATIVE_PRIORITY = "80"
-ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root"
-ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject"
-
+ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
+ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
+ALTERNATIVE_LINK_NAME[cal] = "${bindir}/cal"
+ALTERNATIVE_LINK_NAME[chrt] = "${bindir}/chrt"
ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
+ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
+ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate"
+ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk"
+ALTERNATIVE_LINK_NAME[flock] = "${bindir}/flock"
+ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck"
+ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze"
+ALTERNATIVE_LINK_NAME[fstrim] = "${base_sbindir}/fstrim"
+ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
+ALTERNATIVE_${PN}-agetty = "getty"
+ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
+ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty"
+ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump"
+ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock"
+ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice"
ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
-ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
+ALTERNATIVE_${PN}-last = "last lastb"
+ALTERNATIVE_LINK_NAME[last] = "${bindir}/last"
+ALTERNATIVE_LINK_NAME[lastb] = "${bindir}/lastb"
+ALTERNATIVE_LINK_NAME[logger] = "${bindir}/logger"
+ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup"
+ALTERNATIVE_LINK_NAME[mesg] = "${bindir}/mesg"
ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap"
-ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
+ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
+ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount"
+ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
+ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
+ALTERNATIVE_LINK_NAME[nsenter] = "${bindir}/nsenter"
ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
+ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile"
+ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice"
+ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev"
+ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill"
+ALTERNATIVE_LINK_NAME[setpriv] = "${bindir}/setpriv"
+ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid"
+ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
+ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff"
+ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon"
ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
-ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
+ALTERNATIVE_LINK_NAME[taskset] = "${bindir}/taskset"
+ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount"
+ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare"
+ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump"
+ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall"
-ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 reset.1 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3"
+ALTERNATIVE_${PN}-doc = "\
+blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \
+mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\
+"
+ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}"
+ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8"
+ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1"
+ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8"
+ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
+ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3"
+ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1"
ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
-ALTERNATIVE_LINK_NAME[reset.1] = "${mandir}/man1/reset.1"
+ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8"
+ALTERNATIVE_LINK_NAME[setpriv.1] = "${mandir}/man1/setpriv.1"
+ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
-ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3"
-ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8"
-ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8"
-ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3"
+ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
-ALTERNATIVE_util-linux-hwclock = "hwclock"
-ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock"
-
-ALTERNATIVE_util-linux-fdisk = "fdisk"
-ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk"
-
-ALTERNATIVE_util-linux-agetty = "getty"
-ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
-ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty"
-
-ALTERNATIVE_util-linux-mount = "mount"
-ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount"
-
-ALTERNATIVE_util-linux-umount = "umount"
-ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount"
-
-ALTERNATIVE_util-linux-readprofile = "readprofile"
-ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile"
-
-ALTERNATIVE_util-linux-losetup = "losetup"
-ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup"
-
-ALTERNATIVE_util-linux-swaponoff = "swapoff swapon"
-ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff"
-ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon"
-
-ALTERNATIVE_util-linux-fsck = "fsck"
-ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck"
-
-ALTERNATIVE_util-linux-blkid = "blkid"
-ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
-
-ALTERNATIVE_util-linux-reset = "reset"
-ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
-ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
-
-ALTERNATIVE_util-linux-getopt = "getopt"
-ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
-
-ALTERNATIVE_util-linux-sulogin = "sulogin"
-ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
-
-ALTERNATIVE_util-linux-mountpoint = "mountpoint"
-ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
BBCLASSEXTEND = "native nativesdk"
-python do_package_prepend () {
- if '--enable-su' in d.getVar('EXTRA_OECONF', True).split():
- alt_name = "su"
- d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('base_bindir', True), alt_name))
- d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name)
-}
-
-python populate_packages_prepend() {
- do_split_packages(d, '${base_libdir}', '^lib(.*)\.so\..*$',
- output_pattern='util-linux-lib%s',
- description='util-linux lib%s',
- extra_depends='', prepend=True, allow_links=True)
-}
-
-RDEPENDS_${PN}-ptest = "bash grep coreutils"
-
+PTEST_BINDIR = "1"
do_compile_ptest() {
oe_runmake buildtest-TESTS
}
do_install_ptest() {
mkdir -p ${D}${PTEST_PATH}/tests/ts
- find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
- cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
- cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
- cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
+ find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
+ find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
+ find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
+
+ cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/
cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
+ cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/
+ cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH}
+
+ # The original paths of executables to be tested point to a local folder containing
+ # the executables. We want to test the installed executables, not the local copies.
+ # So strip the paths, the executables will be located via "which"
+ sed -i \
+ -e '/^TS_CMD/ s|$top_builddir/||g' \
+ -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \
+ ${D}${PTEST_PATH}/tests/commands.sh
+
+ # Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]'
+ sed -i -e \
+ '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \
+ ${D}${PTEST_PATH}/tests/functions.sh
+
+ # Running "kill" without the the complete path would use the shell's built-in kill
+ sed -i -e \
+ '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \
+ ${D}${PTEST_PATH}/tests/commands.sh
+
+
+ sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest
- list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon tailf"
- # The following tests are not installed yet:
- # blkid scsi_debug module dependent
- # cramfs gcc dependent
- # eject gcc dependent
- # fdisk scsi_debug module and gcc dependent
- # lscpu gcc dependant
- # libmount uuidgen dependent
- # mount gcc dependant
- # partx blkid dependant
- for d in $list; do
- cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
- done
}
diff --git a/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch b/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch
new file mode 100644
index 0000000000..5d4c148fb3
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch
@@ -0,0 +1,36 @@
+From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 27 Jun 2019 09:22:18 +0200
+Subject: [PATCH] lsblk: force to print PKNAME for partition
+
+PKNAME (parent kernel device name) is based on printed tree according
+to parent -> child relationship. The tree is optional and not printed
+if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old
+versions print the PKNAME also in this case.
+
+Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/e3bb9bfb76c17b1d05814436ced62c05c4011f48]
+
+Addresses: https://github.com/karelzak/util-linux/issues/813
+Signed-off-by: Karel Zak <kzak@redhat.com>
+Signed-off-by: Liwei Song <liwei.song@windriver.com>
+---
+ misc-utils/lsblk.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
+index e95af7af0256..3ce6da730264 100644
+--- a/misc-utils/lsblk.c
++++ b/misc-utils/lsblk.c
+@@ -1019,6 +1019,9 @@ static void device_to_scols(
+ DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name));
+ ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name));
+
++ if (!parent && dev->wholedisk)
++ parent = dev->wholedisk;
++
+ /* Do not print device more than one in --list mode */
+ if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed)
+ return;
+--
+2.17.1
+
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
index 46d4d37650..748b6ef096 100644
--- a/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
+++ b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
@@ -5,15 +5,16 @@ Revert run.sh script accordingly to serialize running tests
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Inappropriate
-diff -ruN a/configure.ac b/configure.ac
---- a/configure.ac 2014-05-27 12:37:42.119772658 +0200
-+++ b/configure.ac 2014-05-27 12:41:46.225573272 +0200
-@@ -10,7 +10,7 @@
+Index: util-linux-2.32/configure.ac
+===================================================================
+--- util-linux-2.32.orig/configure.ac
++++ util-linux-2.32/configure.ac
+@@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4])
dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS
--AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
-+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests])
-
+-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects])
++AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects serial-tests])
+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
diff --git a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
index a5b1ff12e5..e475289f65 100644
--- a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
+++ b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
@@ -5,11 +5,11 @@ Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com
Upstream-Status: Inappropriate [configuration]
-Index: util-linux-2.22.1/configure.ac
+Index: util-linux-2.31/configure.ac
===================================================================
---- util-linux-2.22.1.orig/configure.ac
-+++ util-linux-2.22.1/configure.ac
-@@ -73,7 +73,10 @@ AC_SUBST([localstatedir])
+--- util-linux-2.31.orig/configure.ac
++++ util-linux-2.31/configure.ac
+@@ -89,7 +89,10 @@ AC_SUBST([runstatedir])
usrbin_execdir='${exec_prefix}/bin'
AC_SUBST([usrbin_execdir])
@@ -20,4 +20,4 @@ Index: util-linux-2.22.1/configure.ac
+fi
AC_SUBST([usrsbin_execdir])
- case $libdir in
+ AS_CASE([$libdir],
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest
index fbc2f9b56a..e135ee583b 100644
--- a/meta/recipes-core/util-linux/util-linux/run-ptest
+++ b/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -1,5 +1,18 @@
#!/bin/sh
+
+# When udevd (from eudev) is running most eject/mount tests will fail because
+# of automount. We need to stop udevd before executing util-linux's tests.
+# The systemd-udevd daemon doesn't change the outcome of util-linux's tests.
+UDEV_PID="`pidof "@base_sbindir@/udevd"`"
+if [ "x$UDEV_PID" != "x" ]; then
+ /etc/init.d/udev stop
+fi
+
+current_path=$(readlink -f $0)
+export bindir=$(dirname $current_path)
+export PATH=$bindir/bin:$PATH
+
cd tests || exit 1
comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
@@ -16,10 +29,15 @@ res=0
count=0
for ts in $comps;
do
- $ts | sed '{
+ $ts | sed -u '{
s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/
}'
done
+
+if [ "x$UDEV_PID" != "x" ]; then
+ /etc/init.d/udev start
+fi
+
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch
deleted file mode 100644
index 68bf22de8c..0000000000
--- a/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 26 Mar 2014 01:30:29 +0000
-Subject: [PATCH] sun.c: use qsort() to instead of qsort_r()
-
-qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on
-the host like CentOS 5.x.
-
-Upstream-Status: Inappropriate [Other]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libfdisk/src/sun.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-Index: util-linux-2.24.2/libfdisk/src/sun.c
-===================================================================
---- util-linux-2.24.2.orig/libfdisk/src/sun.c
-+++ util-linux-2.24.2/libfdisk/src/sun.c
-@@ -431,10 +431,9 @@ static int sun_verify_disklabel(struct f
- }
- verify_sun_starts = starts;
-
-- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
-- (int (*)(const void *,const void *,void *)) verify_sun_cmp,
-- verify_sun_starts);
--
-+ qsort(array,ARRAY_SIZE(array),sizeof(array[0]),
-+ (int (*)(const void *,const void *)) verify_sun_cmp);
-+
- if (array[0] == -1) {
- fdisk_info(cxt, _("No partitions defined."));
- return 0;
diff --git a/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch b/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
deleted file mode 100644
index a6fde5d9cb..0000000000
--- a/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-This patch adds error() API implementation for non-glibc system C libs
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- misc-utils/test_uuidd.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 61 insertions(+), 1 deletion(-)
-
-diff --git a/misc-utils/test_uuidd.c b/misc-utils/test_uuidd.c
-index 36f3b3d..7d579ce 100644
---- a/misc-utils/test_uuidd.c
-+++ b/misc-utils/test_uuidd.c
-@@ -23,7 +23,6 @@
- *
- * make uuidd uuidgen localstatedir=/var
- */
--#include <error.h>
- #include <pthread.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -38,6 +37,17 @@
- #include "xalloc.h"
- #include "strutils.h"
-
-+#ifdef __GLIBC__
-+#include <error.h>
-+#else
-+extern void (*error_print_progname)(void);
-+extern unsigned int error_message_count;
-+extern int error_one_per_line;
-+
-+void error(int, int, const char *, ...);
-+void error_at_line(int, int, const char *, unsigned int, const char *, ...);
-+#endif
-+
- #define LOG(level,args) if (loglev >= level) { fprintf args; }
-
- size_t nprocesses = 4;
-@@ -256,6 +266,56 @@ static void object_dump(size_t idx, object_t *obj)
- fprintf(stderr, "}\n");
- }
-
-+#ifndef __GLIBC__
-+extern char *__progname;
-+
-+void (*error_print_progname)(void) = 0;
-+unsigned int error_message_count = 0;
-+int error_one_per_line = 0;
-+
-+static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
-+{
-+ if (file && error_one_per_line) {
-+ static const char *oldfile;
-+ static unsigned int oldline;
-+ if (line == oldline && strcmp(file, oldfile) == 0)
-+ return;
-+ oldfile = file;
-+ oldline = line;
-+ }
-+ if (error_print_progname)
-+ error_print_progname();
-+ else
-+ fprintf(stderr, "%s: ", __progname);
-+ if (file)
-+ fprintf(stderr, "%s:%u: ", file, line);
-+ vfprintf(stderr, fmt, ap);
-+ if (e)
-+ fprintf(stderr, ": %s", strerror(e));
-+ putc('\n', stderr);
-+ fflush(stderr);
-+ error_message_count++;
-+ if (status)
-+ exit(status);
-+}
-+
-+void error(int status, int e, const char *fmt, ...)
-+{
-+ va_list ap;
-+ va_start(ap,fmt);
-+ eprint(status, e, 0, 0, fmt, ap);
-+ va_end(ap);
-+}
-+
-+void error_at_line(int status, int e, const char *file, unsigned int line, const char *fmt, ...)
-+{
-+ va_list ap;
-+ va_start(ap,fmt);
-+ eprint(status, e, file, line, fmt, ap);
-+ va_end(ap);
-+}
-+#endif /* __GLIBC__ */
-+
- int main(int argc, char *argv[])
- {
- size_t i, nfailed = 0, nignored = 0;
---
-2.8.3
-
diff --git a/meta/recipes-core/util-linux/util-linux_2.28.1.bb b/meta/recipes-core/util-linux/util-linux_2.28.1.bb
deleted file mode 100644
index f232cb9f3c..0000000000
--- a/meta/recipes-core/util-linux/util-linux_2.28.1.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-MAJOR_VERSION = "2.28"
-require util-linux.inc
-
-# To support older hosts, we need to patch and/or revert
-# some upstream changes. Only do this for native packages.
-OLDHOST = ""
-OLDHOST_class-native = "file://util-linux-native-qsort.patch"
-
-SRC_URI += "file://configure-sbindir.patch \
- file://runuser.pamd \
- file://runuser-l.pamd \
- ${OLDHOST} \
- file://ptest.patch \
- file://run-ptest \
- file://display_testname_for_subtest.patch \
- file://avoid_parallel_tests.patch \
- file://uuid-test-error-api.patch \
-"
-SRC_URI[md5sum] = "e2d863efaf4fd330a42c5efe9f1b02b4"
-SRC_URI[sha256sum] = "3ece4ea4a34ef786b68f5c415e848390424232abd1ee00f7ee5bddc30657b60f"
-
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
-
-EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
- --disable-fallocate \
- --disable-use-tty-group \
-"
-EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
- --disable-fallocate \
- --disable-use-tty-group \
-"
diff --git a/meta/recipes-core/util-linux/util-linux_2.34.bb b/meta/recipes-core/util-linux/util-linux_2.34.bb
new file mode 100644
index 0000000000..e9c2d80e90
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux_2.34.bb
@@ -0,0 +1,13 @@
+require util-linux.inc
+
+SRC_URI += "file://configure-sbindir.patch \
+ file://runuser.pamd \
+ file://runuser-l.pamd \
+ file://ptest.patch \
+ file://run-ptest \
+ file://display_testname_for_subtest.patch \
+ file://avoid_parallel_tests.patch \
+ file://0001-lsblk-force-to-print-PKNAME-for-partition.patch \
+"
+SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50"
+SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"
diff --git a/meta/recipes-core/volatile-binds/files/mount-copybind b/meta/recipes-core/volatile-binds/files/mount-copybind
index 2aeaf84ddb..e32e675308 100755
--- a/meta/recipes-core/volatile-binds/files/mount-copybind
+++ b/meta/recipes-core/volatile-binds/files/mount-copybind
@@ -8,7 +8,10 @@ if [ $# -lt 2 ]; then
exit 1
fi
+# e.g. /var/volatile/lib
spec=$1
+
+# e.g. /var/lib
mountpoint=$2
if [ $# -gt 2 ]; then
@@ -20,15 +23,34 @@ fi
[ -n "$options" ] && options=",$options"
mkdir -p "${spec%/*}"
+
if [ -d "$mountpoint" ]; then
- if [ ! -d "$spec" ]; then
+
+ if [ -d "$spec" ]; then
+ specdir_existed=yes
+ else
+ specdir_existed=no
mkdir "$spec"
- cp -pPR "$mountpoint"/. "$spec/"
+ fi
+
+ # Fast version of calculating `dirname ${spec}`/.`basename ${spec}`-work
+ overlay_workdir="${spec%/*}/.${spec##*/}-work"
+ mkdir "${overlay_workdir}"
+
+ # Try to mount using overlay, which is must faster than copying files.
+ # If that fails, fall back to slower copy.
+ if ! mount -t overlay overlay -olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir" "$mountpoint" > /dev/null 2>&1; then
+
+ if [ "$specdir_existed" != "yes" ]; then
+ cp -aPR "$mountpoint"/. "$spec/"
+ fi
+
+ mount -o "bind$options" "$spec" "$mountpoint"
fi
elif [ -f "$mountpoint" ]; then
if [ ! -f "$spec" ]; then
- cp -pP "$mountpoint" "$spec"
+ cp -aP "$mountpoint" "$spec"
fi
-fi
-mount -o "bind$options" "$spec" "$mountpoint"
+ mount -o "bind$options" "$spec" "$mountpoint"
+fi
diff --git a/meta/recipes-core/volatile-binds/volatile-binds.bb b/meta/recipes-core/volatile-binds/volatile-binds.bb
index fee7275e32..b273293e9a 100644
--- a/meta/recipes-core/volatile-binds/volatile-binds.bb
+++ b/meta/recipes-core/volatile-binds/volatile-binds.bb
@@ -11,12 +11,15 @@ SRC_URI = "\
S = "${WORKDIR}"
-inherit allarch systemd distro_features_check
+inherit allarch systemd features_check
REQUIRED_DISTRO_FEATURES = "systemd"
VOLATILE_BINDS ?= "\
/var/volatile/lib /var/lib\n\
+ /var/volatile/cache /var/cache\n\
+ /var/volatile/spool /var/spool\n\
+ /var/volatile/srv /srv\n\
"
VOLATILE_BINDS[type] = "list"
VOLATILE_BINDS[separator] = "\n"
@@ -46,7 +49,7 @@ do_compile () {
-e "s#@whatparent@#${spec%/*}#g; s#@whereparent@#${mountpoint%/*}#g" \
volatile-binds.service.in >$servicefile
done <<END
-${@d.getVar('VOLATILE_BINDS', True).replace("\\n", "\n")}
+${@d.getVar('VOLATILE_BINDS').replace("\\n", "\n")}
END
if [ -e var-volatile-lib.service ]; then
@@ -64,8 +67,14 @@ do_install () {
install -m 0755 mount-copybind ${D}${base_sbindir}/
install -d ${D}${systemd_unitdir}/system
- for service in ${SYSTEMD_SERVICE_volatile-binds}; do
+ for service in ${SYSTEMD_SERVICE_${PN}}; do
install -m 0644 $service ${D}${systemd_unitdir}/system/
done
+
+ # Suppress attempts to process some tmpfiles that are not temporary.
+ #
+ install -d ${D}${sysconfdir}/tmpfiles.d ${D}/var/cache
+ ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf
+ ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf
}
do_install[dirs] = "${WORKDIR}"
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch b/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch
deleted file mode 100644
index 61eea8238a..0000000000
--- a/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Add 'ptest' target to Makefile, to run tests without checking dependencies.
-
-Signed-off-by: Anders Roxell <anders.roxell@enea.com>
-Upstream-Status: Pending
----
-diff -uNr a/Makefile.in b/Makefile.in
---- a/Makefile.in 2013-06-10 13:48:14.321959162 +0200
-+++ b/Makefile.in 2013-06-10 13:49:36.686476448 +0200
-@@ -83,6 +83,9 @@
- test: all teststatic testshared
-
- teststatic: static
-+ @make runteststatic
-+
-+runteststatic:
- @TMPST=tmpst_$$; \
- if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
- echo ' *** zlib test OK ***'; \
-@@ -92,6 +95,9 @@
- rm -f $$TMPST
-
- testshared: shared
-+ @make runtestshared
-+
-+runtestshared:
- @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
- LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
- DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
-@@ -105,6 +111,9 @@
- rm -f $$TMPSH
-
- test64: all64
-+ @make runtestall64
-+
-+runtestall64:
- @TMP64=tmp64_$$; \
- if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
- echo ' *** zlib 64-bit test OK ***'; \
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/remove.ldconfig.call.patch b/meta/recipes-core/zlib/zlib-1.2.8/remove.ldconfig.call.patch
deleted file mode 100644
index 403b4825c9..0000000000
--- a/meta/recipes-core/zlib/zlib-1.2.8/remove.ldconfig.call.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-
-When /etc/ld.so.cache is writeable by user running bitbake then it creates invalid cache
-(in my case libstdc++.so cannot be found after building zlib(-native) and I have to call
-touch */libstdc++.so && /sbin/ldconfig to fix it.
-
-So remove ldconfig call from make install-libs
-
-Upstream-Status: Inappropriate [disable feature]
-
-diff -uNr zlib-1.2.6.orig/Makefile.in zlib-1.2.6/Makefile.in
---- zlib-1.2.6.orig/Makefile.in 2012-01-28 23:48:50.000000000 +0100
-+++ zlib-1.2.6/Makefile.in 2012-02-13 15:38:20.577700723 +0100
-@@ -199,7 +199,6 @@
- rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
- ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
- ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
-- ($(LDCONFIG) || true) >/dev/null 2>&1; \
- fi
- cp zlib.3 $(DESTDIR)$(man3dir)
- chmod 644 $(DESTDIR)$(man3dir)/zlib.3
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/run-ptest b/meta/recipes-core/zlib/zlib-1.2.8/run-ptest
deleted file mode 100644
index 884d9dc699..0000000000
--- a/meta/recipes-core/zlib/zlib-1.2.8/run-ptest
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-make -k runteststatic runtestshared | sed -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/'
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch b/meta/recipes-core/zlib/zlib/ldflags-tests.patch
index 19c40b7452..286390665f 100644
--- a/meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch
+++ b/meta/recipes-core/zlib/zlib/ldflags-tests.patch
@@ -1,7 +1,7 @@
Obey LDFLAGS for tests
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/madler/zlib/pull/409]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
--- zlib-1.2.8.orig/Makefile.in
+++ zlib-1.2.8/Makefile.in
diff --git a/meta/recipes-core/zlib/zlib/run-ptest b/meta/recipes-core/zlib/zlib/run-ptest
new file mode 100644
index 0000000000..065863ef75
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if ./examplesh ; then
+ echo "PASS: zlib"
+else
+ echo "FAIL: zlib"
+fi
diff --git a/meta/recipes-core/zlib/zlib_1.2.11.bb b/meta/recipes-core/zlib/zlib_1.2.11.bb
new file mode 100644
index 0000000000..ef9431ae47
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib_1.2.11.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Zlib Compression Library"
+DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data compression \
+library which is used by many different programs."
+HOMEPAGE = "http://zlib.net/"
+SECTION = "libs"
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = "file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef63bc555f7aa6c0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
+ file://ldflags-tests.patch \
+ file://run-ptest \
+ "
+UPSTREAM_CHECK_URI = "http://zlib.net/"
+
+SRC_URI[md5sum] = "85adef240c5f370b308da8c938951a68"
+SRC_URI[sha256sum] = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066"
+
+CFLAGS += "-D_REENTRANT"
+
+RDEPENDS_${PN}-ptest += "make"
+
+inherit ptest
+
+do_configure() {
+ LDCONFIG=true ./configure --prefix=${prefix} --shared --libdir=${libdir} --uname=GNU
+}
+
+do_compile() {
+ oe_runmake shared
+}
+
+do_install() {
+ oe_runmake DESTDIR=${D} install
+}
+
+do_install_ptest() {
+ install ${B}/examplesh ${D}${PTEST_PATH}
+}
+
+# Move zlib shared libraries for target builds to $base_libdir so the library
+# can be used in early boot before $prefix is mounted.
+do_install_append_class-target() {
+ if [ ${base_libdir} != ${libdir} ]
+ then
+ mkdir -p ${D}/${base_libdir}
+ mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
+ libname=`readlink ${D}/${libdir}/libz.so`
+ ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so
+ fi
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/zlib/zlib_1.2.8.bb b/meta/recipes-core/zlib/zlib_1.2.8.bb
deleted file mode 100644
index 9470adb1be..0000000000
--- a/meta/recipes-core/zlib/zlib_1.2.8.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "Zlib Compression Library"
-DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data compression \
-library which is used by many different programs."
-HOMEPAGE = "http://zlib.net/"
-SECTION = "libs"
-LICENSE = "Zlib"
-LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd"
-
-SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.xz \
- file://remove.ldconfig.call.patch \
- file://Makefile-runtests.patch \
- file://ldflags-tests.patch \
- file://run-ptest \
- "
-
-SRC_URI[md5sum] = "28f1205d8dd2001f26fec1e8c2cebe37"
-SRC_URI[sha256sum] = "831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057"
-
-RDEPENDS_${PN}-ptest += "make"
-
-inherit ptest
-
-do_configure (){
- ./configure --prefix=${prefix} --shared --libdir=${libdir}
-}
-
-do_compile (){
- oe_runmake
-}
-
-do_compile_ptest() {
- oe_runmake static shared
-}
-
-do_install() {
- oe_runmake DESTDIR=${D} install
-}
-
-do_install_ptest() {
- install ${B}/Makefile ${D}${PTEST_PATH}
- install ${B}/example ${D}${PTEST_PATH}
- install ${B}/minigzip ${D}${PTEST_PATH}
- install ${B}/examplesh ${D}${PTEST_PATH}
- install ${B}/minigzipsh ${D}${PTEST_PATH}
-}
-
-# Move zlib shared libraries for target builds to $base_libdir so the library
-# can be used in early boot before $prefix is mounted.
-do_install_append_class-target() {
- if [ ${base_libdir} != ${libdir} ]
- then
- mkdir -p ${D}/${base_libdir}
- mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
- libname=`readlink ${D}/${libdir}/libz.so`
- ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so
- fi
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index 9fa206efe1..d826786329 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -7,8 +7,6 @@ USE_NLS = "yes"
SRC_URI += "file://db_linking_hack.patch \
file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \
- file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
- file://0001-fix-the-gcc-version-check.patch \
"
python do_install () {
@@ -17,14 +15,14 @@ python do_install () {
}
python do_install_config () {
- indir = os.path.dirname(d.getVar('FILE', True))
+ indir = os.path.dirname(d.getVar('FILE'))
infile = open(oe.path.join(indir, 'files', 'apt.conf'), 'r')
data = infile.read()
infile.close()
data = d.expand(data)
- outdir = oe.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
+ outdir = oe.path.join(d.getVar('D'), d.getVar('sysconfdir'), 'apt')
if not os.path.exists(outdir):
os.makedirs(outdir)
@@ -67,4 +65,10 @@ do_install_base () {
install -d ${D}${localstatedir}/cache/apt/archives/partial
install -d ${D}${localstatedir}/log/apt/
+
+ install -d ${D}${includedir}/apt-pkg
+ for h in `find ${S}/apt-pkg ${S}/apt-inst -name '*.h'`
+ do
+ install -m 0644 $h ${D}${includedir}/apt-pkg
+ done
}
diff --git a/meta/recipes-devtools/apt/apt-native_1.2.12.bb b/meta/recipes-devtools/apt/apt-native_1.2.12.bb
deleted file mode 100644
index 1e660da74b..0000000000
--- a/meta/recipes-devtools/apt/apt-native_1.2.12.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require apt-native.inc
-
-SRC_URI += "file://noconfigure.patch \
- file://no-curl.patch"
diff --git a/meta/recipes-devtools/apt/apt-native_1.2.31.bb b/meta/recipes-devtools/apt/apt-native_1.2.31.bb
new file mode 100644
index 0000000000..5b16b503d5
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-native_1.2.31.bb
@@ -0,0 +1,7 @@
+require apt-native.inc
+
+SRC_URI += "file://noconfigure.patch \
+ file://no-curl.patch \
+ file://gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch \
+ file://gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch \
+ file://gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch"
diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc
index a553aa21fe..922f739d0d 100644
--- a/meta/recipes-devtools/apt/apt-package.inc
+++ b/meta/recipes-devtools/apt/apt-package.inc
@@ -32,13 +32,20 @@ FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
${bindir}/apt-config ${bindir}/apt-cache \
${libdir}/apt ${libdir}/libapt*.so.* \
${localstatedir} ${sysconfdir} \
- ${libdir}/dpkg"
+ ${libdir}/dpkg \
+ ${systemd_unitdir}/system \
+ "
+RDEPENDS_${PN} += "perl"
FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
-FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', True))} \
+FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages'))} \
${docdir}/apt"
-FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}"
+FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages'))}"
FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
+inherit systemd
+
+SYSTEMD_SERVICE_${PN} = "apt-daily.timer"
+
do_install () {
set -x
install -d ${D}${bindir}
@@ -75,4 +82,13 @@ do_install () {
install -d ${D}${includedir}/apt-pkg/
install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
+
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0755 ${S}/debian/apt.systemd.daily ${D}${libdir}/apt/
+ install -m 0644 ${S}/debian/apt-daily.service ${D}${systemd_unitdir}/system/
+ sed -i 's#/usr/lib/apt/#${libdir}/apt/#g' ${D}${systemd_unitdir}/system/apt-daily.service
+ install -m 0644 ${S}/debian/apt-daily.timer ${D}${systemd_unitdir}/system/
+ install -d ${D}${sysconfdir}/cron.daily/
+ install -m 0755 ${S}/debian/apt.apt-compat.cron.daily ${D}${sysconfdir}/cron.daily/
+ sed -i 's#/usr/lib/apt/#${libdir}/apt/#g' ${D}${sysconfdir}/cron.daily/apt.apt-compat.cron.daily
}
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
index 3026370844..50c4d8484a 100644
--- a/meta/recipes-devtools/apt/apt.inc
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -1,8 +1,11 @@
SUMMARY = "Advanced front-end for dpkg"
+DESCRIPTION = "Provides command-line tools for searching and managing as well \
+as querying information about packages as a low-level access to all features \
+of the libapt-pkg library."
LICENSE = "GPLv2.0+"
SECTION = "base"
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
+SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/${BPN}/${PV}/${BPN}_${PV}.tar.xz \
file://use-host.patch \
file://makerace.patch \
file://no-nls-dpkg.patch \
@@ -13,10 +16,11 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/
file://disable-test.patch \
file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
file://0001-apt-1.2.12-Fix-musl-build.patch \
+ file://0001-Include-array.h-for-std-array.patch \
"
-SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7"
-SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6"
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
+SRC_URI[md5sum] = "d30eed9304e82ea8238c854b5c5a34d9"
+SRC_URI[sha256sum] = "03ded4f5e9b8d43ecec083704b2dcabf20c182ed382db9ac7251da0b0b038059"
+LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
# the package is taken from snapshots.debian.org; that source is static and goes stale
# so we check the latest upstream from a directory that does get updated
diff --git a/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch b/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch
new file mode 100644
index 0000000000..e4a8faa2b4
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch
@@ -0,0 +1,35 @@
+From 4d64ec843185bf6fd1b85c3a6a4c4e3c968c8ab1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 20 Jan 2019 18:56:58 -0800
+Subject: [PATCH] Include <array.h> for std::array
+
+When compiling using clang/libc++ it fails to build because this header
+is not included, with libstdc++ this seems to be pulled in
+automatically.
+
+Fixes below error
+
+apt-pkg/contrib/strutl.cc:949:38: error: implicit instantiation of undefined template 'std::__1::array<const char *const, 7>'
+ std::array<char const * const, 7> c_weekdays = {{ "sun", "mon", "tue", "wed", "thu", "fri", "sat" }};
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/Debian/apt/commit/24a59c62efafbdb8387b2d3c5616b04b9fd21306]
+---
+ apt-pkg/contrib/strutl.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+index 60d0ca8..c2bfcbc 100644
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -21,6 +21,7 @@
+ #include <apt-pkg/fileutl.h>
+ #include <apt-pkg/error.h>
+
++#include <array>
+ #include <algorithm>
+ #include <iomanip>
+ #include <locale>
+--
+2.20.1
+
diff --git a/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
index b3a883bae8..734ba00d4f 100644
--- a/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
+++ b/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
@@ -22,10 +22,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
3 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
-index 834cb0e..84ded3a 100644
+index 533d9b367..6ce81bbd9 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
-@@ -1037,12 +1037,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
+@@ -1041,12 +1041,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
PackagesTotal++;
}
}
@@ -38,7 +38,7 @@ index 834cb0e..84ded3a 100644
}
/*}}}*/
bool pkgDPkgPM::Go(int StatusFd)
-@@ -1250,8 +1244,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
+@@ -1268,8 +1262,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
// support subpressing of triggers processing for special
// cases like d-i that runs the triggers handling manually
@@ -50,7 +50,7 @@ index 834cb0e..84ded3a 100644
// for the progress
diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
-index 58fd732..3359762 100755
+index a8d59608d..0c6a9bbbf 100755
--- a/test/integration/test-apt-progress-fd-deb822
+++ b/test/integration/test-apt-progress-fd-deb822
@@ -27,36 +27,36 @@ Message: Installing testing (amd64)
@@ -69,19 +69,19 @@ index 58fd732..3359762 100755
Status: progress
Package: testing:amd64
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
Message: Preparing to configure testing (amd64)
Status: progress
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
Message: Running dpkg
Status: progress
Package: testing:amd64
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
Message: Configuring testing (amd64)
Status: progress
@@ -98,7 +98,7 @@ index 58fd732..3359762 100755
Status: progress
diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts
-index d86e638..ef6d23b 100755
+index d86e638cd..ef6d23be2 100755
--- a/test/integration/test-no-fds-leaked-to-maintainer-scripts
+++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts
@@ -59,8 +59,7 @@ startup packages configure
@@ -122,5 +122,5 @@ index d86e638..ef6d23b 100755
checkpurge
--
-2.1.4
+2.11.0
diff --git a/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch b/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
index 04b0406583..f7ac19bfd0 100644
--- a/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
+++ b/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
@@ -11,7 +11,7 @@ header so define it manually.
apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h
to avoid errors in types u_int_SIZE.
-Upstream-status: Pending
+Upstream-Status: Pending
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
diff --git a/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch b/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
deleted file mode 100644
index 3ac92462c5..0000000000
--- a/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 53c5d0982f03fd0e24c4195d6e1e42b9ade9d500 Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Wed, 27 May 2015 14:30:28 +0800
-Subject: [PATCH] fix the gcc version check
-
-Upstream-Status: pending
-
-"GCC diagnostic push" is gcc 4.6 feature, gcc 4.4.7 on centos did not know it
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- apt-pkg/contrib/macros.h | 2 +-
- apt-pkg/deb/debsrcrecords.cc | 4 ++--
- apt-pkg/srcrecords.cc | 4 ++--
- 3 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
-index 2727fd8..0ecae50 100644
---- a/apt-pkg/contrib/macros.h
-+++ b/apt-pkg/contrib/macros.h
-@@ -136,7 +136,7 @@
- #endif
- #endif
-
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #define APT_IGNORE_DEPRECATED_PUSH \
- _Pragma("GCC diagnostic push") \
- _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
-index e8295de..40160b2 100644
---- a/apt-pkg/deb/debsrcrecords.cc
-+++ b/apt-pkg/deb/debsrcrecords.cc
-@@ -139,13 +139,13 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F)
- for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2)
- {
- pkgSrcRecords::File2 f;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
- f.MD5Hash = f2->MD5Hash;
- f.Size = f2->Size;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
- f.Path = f2->Path;
-diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
-index 53d7e60..1484828 100644
---- a/apt-pkg/srcrecords.cc
-+++ b/apt-pkg/srcrecords.cc
-@@ -157,7 +157,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
- for (std::vector<pkgSrcRecords::File>::const_iterator f = F.begin(); f != F.end(); ++f)
- {
- pkgSrcRecords::File2 f2;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
-@@ -165,7 +165,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
- f2.Size = f->Size;
- f2.Hashes.push_back(HashString("MD5Sum", f->MD5Hash));
- f2.FileSize = f->Size;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
- f2.Path = f->Path;
---
-2.1.4
-
diff --git a/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch b/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
deleted file mode 100644
index 47870e3c8b..0000000000
--- a/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 9fdf50d63df08ee65e7d8e62c35f19ac4841bca9 Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Wed, 27 May 2015 09:48:45 +0800
-Subject: [PATCH] remove Wsuggest-attribute from CXXFLAGS
-
-Upstream-Status: Inappropriate
-
-Wsuggest-attribute is GCC 4.6 feature, centos6 is using GCC
-4.4.7 which unknown this flag, so remove it from CXXFLAGS
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- buildlib/environment.mak.in | 1 -
- test/libapt/makefile | 1 -
- 2 files changed, 2 deletions(-)
-
-diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
-index 9620722..c344d01 100644
---- a/buildlib/environment.mak.in
-+++ b/buildlib/environment.mak.in
-@@ -14,7 +14,6 @@ CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra
- CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations
- CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef
- # suggests methods which already have such an attribute
--#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
- # sanitize options to be enabled for testing
- #CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
- # a bit too pedantic to be run by default
-diff --git a/test/libapt/makefile b/test/libapt/makefile
-index 5ff9cf6..c5b5190 100644
---- a/test/libapt/makefile
-+++ b/test/libapt/makefile
-@@ -40,7 +40,6 @@ CXXFLAGS += -pthread
- # disable some flags for gtest again
- CXXFLAGS+= -Wno-missing-declarations
- CXXFLAGS+= -Wno-missing-field-initializers
--CXXFLAGS+= -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-suggest-attribute=noreturn
- CXXFLAGS+= -Wno-undef
-
- # All Google Test headers. Usually you shouldn't change this definition.
---
-2.1.4
-
diff --git a/meta/recipes-devtools/apt/apt/disable-test.patch b/meta/recipes-devtools/apt/apt/disable-test.patch
index 0532671747..d16b5c771b 100644
--- a/meta/recipes-devtools/apt/apt/disable-test.patch
+++ b/meta/recipes-devtools/apt/apt/disable-test.patch
@@ -17,10 +17,10 @@ Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
configure.ac | 7 -------
2 files changed, 3 insertions(+), 13 deletions(-)
-diff --git a/Makefile b/Makefile
-index 7680f08..69527a5 100644
---- a/Makefile
-+++ b/Makefile
+Index: apt-1.2.24/Makefile
+===================================================================
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
@@ -9,8 +9,8 @@ endif
.PHONY: default
default: startup all
@@ -32,9 +32,9 @@ index 7680f08..69527a5 100644
$(MAKE) -C vendor $@
$(MAKE) -C apt-pkg $@
$(MAKE) -C apt-inst $@
-@@ -21,8 +21,6 @@ all headers library clean veryclean binary program doc manpages docbook test upd
+@@ -21,8 +21,6 @@ all headers library clean veryclean bina
$(MAKE) -C dselect $@
- $(MAKE) -C doc $@
+ # $(MAKE) -C doc $@
$(MAKE) -C po $@
- # FIXME: -C test has issue swith parallel builds, investigate!
- -$(MAKE) -C test $@
@@ -52,10 +52,10 @@ index 7680f08..69527a5 100644
dirs: startup
-diff --git a/configure.ac b/configure.ac
-index 1f05da5..e47f459 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: apt-1.2.24/configure.ac
+===================================================================
+--- apt-1.2.24.orig/configure.ac
++++ apt-1.2.24/configure.ac
@@ -90,13 +90,6 @@ AC_CHECK_LIB(curl, curl_easy_init,
AC_MSG_ERROR([failed: I need CURL due https support]),
)
@@ -70,6 +70,3 @@ index 1f05da5..e47f459 100644
AC_SUBST(BDBLIB)
HAVE_ZLIB=no
---
-2.1.4
-
diff --git a/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch b/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
index 801ae6dddb..899c6ef2fc 100644
--- a/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
+++ b/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
@@ -1,12 +1,14 @@
Upstream-Status: Pending
---- a/apt-pkg/contrib/weakptr.h
-+++ b/apt-pkg/contrib/weakptr.h
+Index: apt-1.2.24/apt-pkg/contrib/weakptr.h
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/contrib/weakptr.h
++++ apt-1.2.24/apt-pkg/contrib/weakptr.h
@@ -21,6 +21,7 @@
#ifndef WEAK_POINTER_H
#define WEAK_POINTER_H
+#include <cstdlib>
#include <set>
- /**
- * Class for objects providing support for weak pointers.
+ #include <stddef.h>
+
diff --git a/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch b/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
new file mode 100644
index 0000000000..438de209a2
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
@@ -0,0 +1,80 @@
+From 7ef2b2dba0e0bee450da3c8450ea782a3e7d6429 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Tue, 22 Aug 2017 11:49:01 -0500
+Subject: [PATCH 3/3] Revert "avoid changing the global LC_TIME for Release
+ writing"
+
+This reverts commit 78e7b683c645e907db12658405a4b201a6243ea8.
+
+After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available)
+versions this patch can be remove.
+
+Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ ftparchive/writer.cc | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
+index 2596382..e43a643 100644
+--- a/ftparchive/writer.cc
++++ b/ftparchive/writer.cc
+@@ -37,7 +37,6 @@
+ #include <unistd.h>
+ #include <ctime>
+ #include <iostream>
+-#include <iomanip>
+ #include <sstream>
+ #include <memory>
+ #include <utility>
+@@ -984,29 +983,35 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) :
+ AddPatterns(_config->FindVector("APT::FTPArchive::Release::Patterns"));
+
+ time_t const now = time(NULL);
+- auto const posix = std::locale("C.UTF-8");
+
+- // FIXME: use TimeRFC1123 here? But that uses GMT to satisfy HTTP/1.1
+- std::ostringstream datestr;
+- datestr.imbue(posix);
+- datestr << std::put_time(gmtime(&now), "%a, %d %b %Y %H:%M:%S UTC");
++ setlocale(LC_TIME, "C");
++
++ char datestr[128];
++ if (strftime(datestr, sizeof(datestr), "%a, %d %b %Y %H:%M:%S UTC",
++ gmtime(&now)) == 0)
++ {
++ datestr[0] = '\0';
++ }
+
+ time_t const validuntil = now + _config->FindI("APT::FTPArchive::Release::ValidTime", 0);
+- std::ostringstream validstr;
+- if (validuntil != now)
++ char validstr[128];
++ if (now == validuntil ||
++ strftime(validstr, sizeof(validstr), "%a, %d %b %Y %H:%M:%S UTC",
++ gmtime(&validuntil)) == 0)
+ {
+- datestr.imbue(posix);
+- validstr << std::put_time(gmtime(&validuntil), "%a, %d %b %Y %H:%M:%S UTC");
++ validstr[0] = '\0';
+ }
+
++ setlocale(LC_TIME, "");
++
+ map<string,string> Fields;
+ Fields["Origin"] = "";
+ Fields["Label"] = "";
+ Fields["Suite"] = "";
+ Fields["Version"] = "";
+ Fields["Codename"] = "";
+- Fields["Date"] = datestr.str();
+- Fields["Valid-Until"] = validstr.str();
++ Fields["Date"] = datestr;
++ Fields["Valid-Until"] = validstr;
+ Fields["Architectures"] = "";
+ Fields["Components"] = "";
+ Fields["Description"] = "";
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch b/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
new file mode 100644
index 0000000000..088a66a3c8
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
@@ -0,0 +1,46 @@
+From c72ef9b6ae83a0a2fbbefd5c050335f65f0d2bc9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Tue, 22 Aug 2017 11:48:46 -0500
+Subject: [PATCH 2/3] Revert "use de-localed std::put_time instead rolling our
+ own"
+
+This reverts commit 4ed2a17ab4334f019c00512aa54a162f0bf083c4.
+
+After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available)
+versions this patch can be remove.
+
+Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ apt-pkg/contrib/strutl.cc | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+index c2ff01d..e9ef2be 100644
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -760,11 +760,15 @@ string TimeRFC1123(time_t Date)
+ if (gmtime_r(&Date, &Conv) == NULL)
+ return "";
+
+- auto const posix = std::locale::classic();
+- std::ostringstream datestr;
+- datestr.imbue(posix);
+- datestr << std::put_time(&Conv, "%a, %d %b %Y %H:%M:%S GMT");
+- return datestr.str();
++ char Buf[300];
++ const char *Day[] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
++ const char *Month[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul",
++ "Aug","Sep","Oct","Nov","Dec"};
++
++ snprintf(Buf, sizeof(Buf), "%s, %02i %s %i %02i:%02i:%02i GMT",Day[Conv.tm_wday],
++ Conv.tm_mday,Month[Conv.tm_mon],Conv.tm_year+1900,Conv.tm_hour,
++ Conv.tm_min,Conv.tm_sec);
++ return Buf;
+ }
+ /*}}}*/
+ // ReadMessages - Read messages from the FD /*{{{*/
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch b/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
new file mode 100644
index 0000000000..cb32591876
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
@@ -0,0 +1,33 @@
+From ff8562f7724c4db4b83635af9e627f3495222327 Mon Sep 17 00:00:00 2001
+From: Anibal Limon <limon.anibal@gmail.com>
+Date: Tue, 22 Aug 2017 04:41:31 -0500
+Subject: [PATCH 1/3] apt-pkg/contrib/strutl.cc: Include array header
+
+If GCC version is less than 5 the array header needs to be included
+to support std::array.
+
+After we drop debian8 and centos7 that has gcc < 5 versions this patch
+can be remove.
+
+Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ apt-pkg/contrib/strutl.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+index 60d0ca8..c2ff01d 100644
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -27,6 +27,7 @@
+ #include <sstream>
+ #include <string>
+ #include <vector>
++#include <array>
+
+ #include <stddef.h>
+ #include <stdlib.h>
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/apt/apt/makerace.patch b/meta/recipes-devtools/apt/apt/makerace.patch
index 46e3161b67..0c686d6e27 100644
--- a/meta/recipes-devtools/apt/apt/makerace.patch
+++ b/meta/recipes-devtools/apt/apt/makerace.patch
@@ -8,16 +8,16 @@ RP 2012/3/19
Upstream-Status: Pending
-Index: apt-0.9.9.4/buildlib/library.mak
+Index: apt-1.2.24/buildlib/library.mak
===================================================================
---- apt-0.9.9.4.orig/buildlib/library.mak 2013-07-31 15:45:07.320440575 +0300
-+++ apt-0.9.9.4/buildlib/library.mak 2013-07-31 15:46:49.440440561 +0300
-@@ -61,7 +61,7 @@
+--- apt-1.2.24.orig/buildlib/library.mak
++++ apt-1.2.24/buildlib/library.mak
+@@ -65,7 +65,7 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR
# Compilation rules
vpath %.cc $(SUBDIRS)
-$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS)
+$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS) $($(LOCAL)-HEADERS)
echo Compiling $< to $@
- $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $<
+ $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXSTD) $(CXXFLAGS) $(PICFLAGS) -o $@ '$(abspath $<)'
$(DoDep)
diff --git a/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch b/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
index a0996d4d44..98b6c96caa 100644
--- a/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
+++ b/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
@@ -1,8 +1,10 @@
Upstream-Status: Pending
---- a/apt-pkg/deb/dpkgpm.cc
-+++ b/apt-pkg/deb/dpkgpm.cc
-@@ -42,6 +42,12 @@
+Index: apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/deb/dpkgpm.cc
++++ apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+@@ -54,6 +54,12 @@
#include <apti18n.h>
/*}}}*/
@@ -14,8 +16,8 @@ Upstream-Status: Pending
+
using namespace std;
- namespace
-@@ -1279,7 +1285,7 @@ void pkgDPkgPM::WriteApportReport(const
+ APT_PURE static string
+@@ -1703,7 +1709,7 @@ void pkgDPkgPM::WriteApportReport(const
}
// check if its not a follow up error
diff --git a/meta/recipes-devtools/apt/apt/nodoc.patch b/meta/recipes-devtools/apt/apt/nodoc.patch
index 449e42df4a..78cf53884a 100644
--- a/meta/recipes-devtools/apt/apt/nodoc.patch
+++ b/meta/recipes-devtools/apt/apt/nodoc.patch
@@ -3,16 +3,16 @@ Disable documentation
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: apt-0.9.7.7/Makefile
+Index: apt-1.2.24/Makefile
===================================================================
---- apt-0.9.7.7.orig/Makefile
-+++ apt-0.9.7.7/Makefile
-@@ -17,7 +17,7 @@ all headers library clean veryclean bina
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
+@@ -19,7 +19,7 @@ all headers library clean veryclean bina
$(MAKE) -C cmdline $@
$(MAKE) -C ftparchive $@
$(MAKE) -C dselect $@
- $(MAKE) -C doc $@
+# $(MAKE) -C doc $@
$(MAKE) -C po $@
- $(MAKE) -C test $@
-
+ # FIXME: -C test has issue swith parallel builds, investigate!
+ -$(MAKE) -C test $@
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.31.bb
index ae0bce933d..ae0bce933d 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.31.bb
diff --git a/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb b/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb
new file mode 100644
index 0000000000..985a254fcc
--- /dev/null
+++ b/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb
@@ -0,0 +1,18 @@
+SUMMARY = "a collection of freely re-usable Autoconf macros"
+HOMEPAGE = "http://www.gnu.org/software/autoconf-archive/"
+SECTION = "devel"
+LICENSE = "GPL-3.0-with-autoconf-exception"
+LIC_FILES_CHKSUM = "file://COPYING;md5=11cc2d3ee574f9d6b7ee797bdce4d423 \
+ file://COPYING.EXCEPTION;md5=fdef168ebff3bc2f13664c365a5fb515"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "d46413c8b00a125b1529bae385bbec55"
+SRC_URI[sha256sum] = "17195c833098da79de5778ee90948f4c5d90ed1a0cf8391b4ab348e2ec511e3f"
+
+inherit autotools allarch
+
+PACKAGES = "${PN} ${PN}-doc"
+
+FILES_${PN} += "${datadir}/aclocal"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc
index b4e33569a6..2c87bf8296 100644
--- a/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/meta/recipes-devtools/autoconf/autoconf.inc
@@ -1,4 +1,4 @@
-SUMMARY = "A GNU tool that procude shell scripts to automatically configure software"
+SUMMARY = "A GNU tool that produce shell scripts to automatically configure software"
DESCRIPTION = "Autoconf is an extensible package of M4 macros that produce shell scripts to automatically \
configure software source code packages. Autoconf creates a configuration script for a package from a template \
file that lists the operating system features that the package can use, in the form of M4 macro calls."
@@ -10,32 +10,76 @@ DEPENDS_class-native = "m4-native gnu-config-native"
DEPENDS_class-nativesdk = "nativesdk-m4 nativesdk-gnu-config"
RDEPENDS_${PN} = "m4 gnu-config \
perl \
+ perl-module-bytes \
perl-module-carp \
perl-module-constant \
+ perl-module-data-dumper \
perl-module-errno \
perl-module-exporter \
perl-module-file-basename \
perl-module-file-compare \
perl-module-file-copy \
+ perl-module-file-find \
perl-module-file-glob \
perl-module-file-path \
+ perl-module-file-spec \
+ perl-module-file-spec-unix \
perl-module-file-stat \
- perl-module-file-find \
perl-module-getopt-long \
perl-module-io-file \
+ perl-module-overloading \
perl-module-posix \
- perl-module-data-dumper \
+ perl-module-symbol \
+ perl-module-thread-queue \
+ perl-module-threads \
"
RDEPENDS_${PN}_class-native = "m4-native gnu-config-native"
+RDEPENDS_${PN}_class-nativesdk = "\
+ nativesdk-gnu-config \
+ nativesdk-m4 \
+ nativesdk-perl \
+ nativesdk-perl-module-bytes \
+ nativesdk-perl-module-carp \
+ nativesdk-perl-module-constant \
+ nativesdk-perl-module-data-dumper \
+ nativesdk-perl-module-errno \
+ nativesdk-perl-module-exporter \
+ nativesdk-perl-module-file-basename \
+ nativesdk-perl-module-file-compare \
+ nativesdk-perl-module-file-copy \
+ nativesdk-perl-module-file-find \
+ nativesdk-perl-module-file-glob \
+ nativesdk-perl-module-file-path \
+ nativesdk-perl-module-file-spec \
+ nativesdk-perl-module-file-spec-unix \
+ nativesdk-perl-module-file-stat \
+ nativesdk-perl-module-getopt-long \
+ nativesdk-perl-module-io-file \
+ nativesdk-perl-module-overloading \
+ nativesdk-perl-module-posix \
+ nativesdk-perl-module-symbol \
+ nativesdk-perl-module-thread-queue \
+ nativesdk-perl-module-threads \
+ "
+
+
SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.gz \
file://program_prefix.patch"
inherit autotools texinfo
-CACHED_CONFIGUREVARS += "ac_cv_path_PERL=${USRBINPATH}/perl"
+PERL = "${USRBINPATH}/perl"
+PERL_class-native = "/usr/bin/env perl"
+PERL_class-nativesdk = "/usr/bin/env perl"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'"
do_configure() {
+ # manually install a newer config.guess/.sub
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/build-aux
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/build-aux
+
oe_runconf
}
diff --git a/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch b/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
new file mode 100644
index 0000000000..b2d7dc0e24
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
@@ -0,0 +1,101 @@
+From b859ab1b211d348b46eca9158b7742f050c8115e Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Wed, 14 Sep 2016 08:17:06 -0500
+Subject: [PATCH] AC_HEADER_MAJOR: port to glibc 2.25
+
+glibc 2.25 is deprecating the namespace pollution of <sys/types.h>
+injecting major(), minor(), and makedev() into the compilation
+environment, with a warning that insists that users include
+<sys/sysmacros.h> instead. However, because the expansion of
+AC_HEADER_MAJOR didn't bother checking sys/sysmacros.h until
+after probing whether sys/types.h pollutes the namespace, it was
+not defining MAJOR_IN_SYSMACROS, with the result that code
+compiled with -Werror chokes on the deprecation warnings because
+it was not including sysmacros.h.
+
+In addition to fixing autoconf (which only benefits projects
+that rebuild configure after this fix is released), we can also
+give a hint to distros on how they can populate config.site with
+a cache variable to force pre-existing configure scripts without
+the updated macro to behave sanely in the presence of glibc 2.25
+(the documentation is especially useful since that cache variable
+is no longer present in autoconf after this patch).
+
+Note that mingw lacks major/minor/makedev in any of its standard
+headers; for that platform, the behavior of this macro is unchanged
+(code using the recommended include formula will get a compile error
+when trying to use major(), whether before or after this patch); but
+for now, it is assumed that programs actually concerned with
+creating devices are not worried about portability to mingw. If
+desired, a later patch could tighten AC_HEADER_MAJOR to fail at
+configure time if the macros are unavailable in any of the three
+system headers, but that semantic change is not worth mixing into
+this patch.
+
+* lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Drop check for
+major within sys/types.h; it interferes with the need to check
+sysmacros.h first.
+
+Signed-off-by: Eric Blake <eblake@redhat.com>
+
+Remove the documentation change from the patch
+Upstream-Status: Backport
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lib/autoconf/headers.m4 | 30 ++++++++++++++----------------
+ 1 file changed, 14 insertions(+), 16 deletions(-)
+
+diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
+index 81a7fa2..a57d0d3 100644
+--- a/lib/autoconf/headers.m4
++++ b/lib/autoconf/headers.m4
+@@ -502,31 +502,29 @@ fi
+
+ # AC_HEADER_MAJOR
+ # ---------------
++# Thanks to glibc 2.25 deprecating macros in sys/types.h, coupled with
++# back-compat to autoconf 2.69, we need the following logic:
++# Check whether <sys/types.h> compiles.
++# If <sys/mkdev.h> compiles, assume it provides major/minor/makedev.
++# Otherwise, if <sys/sysmacros.h> compiles, assume it provides the macros.
++# Otherwise, either the macros were provided by <sys/types.h>, or do
++# not exist on the platform. Code trying to use these three macros is
++# assumed to not care about platforms that lack the macros.
+ AN_FUNCTION([major], [AC_HEADER_MAJOR])
+ AN_FUNCTION([makedev], [AC_HEADER_MAJOR])
+ AN_FUNCTION([minor], [AC_HEADER_MAJOR])
+ AN_HEADER([sys/mkdev.h], [AC_HEADER_MAJOR])
+ AC_DEFUN([AC_HEADER_MAJOR],
+-[AC_CACHE_CHECK(whether sys/types.h defines makedev,
+- ac_cv_header_sys_types_h_makedev,
+-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <sys/types.h>]],
+- [[return makedev(0, 0);]])],
+- [ac_cv_header_sys_types_h_makedev=yes],
+- [ac_cv_header_sys_types_h_makedev=no])
+-])
+-
+-if test $ac_cv_header_sys_types_h_makedev = no; then
++[AC_CHECK_HEADERS_ONCE([sys/types.h])
+ AC_CHECK_HEADER(sys/mkdev.h,
+ [AC_DEFINE(MAJOR_IN_MKDEV, 1,
+ [Define to 1 if `major', `minor', and `makedev' are
+ declared in <mkdev.h>.])])
+-
+- if test $ac_cv_header_sys_mkdev_h = no; then
+- AC_CHECK_HEADER(sys/sysmacros.h,
+- [AC_DEFINE(MAJOR_IN_SYSMACROS, 1,
+- [Define to 1 if `major', `minor', and `makedev'
+- are declared in <sysmacros.h>.])])
+- fi
++if test $ac_cv_header_sys_mkdev_h = no; then
++ AC_CHECK_HEADER(sys/sysmacros.h,
++ [AC_DEFINE(MAJOR_IN_SYSMACROS, 1,
++ [Define to 1 if `major', `minor', and `makedev'
++ are declared in <sysmacros.h>.])])
+ fi
+ ])# AC_HEADER_MAJOR
+
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch
new file mode 100644
index 0000000000..ae0e3825f6
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch
@@ -0,0 +1,120 @@
+From 236552ff5b9f1ebf666d8d0e9850007dcce03d26 Mon Sep 17 00:00:00 2001
+From: Serhii Popovych <spopovyc@cisco.com>
+Date: Wed, 10 Feb 2016 16:32:44 +0000
+Subject: [PATCH] perl: Replace -w option in shebangs with modern "use
+ warnings"
+
+In some builds we might provide ac_cv_path_PERL as /usr/bin/env perl
+to use newer version of the perl from users PATH rather than
+older from standard system path.
+
+However using /usr/bin/env perl -w from shebang line isn't
+possible because it translates to something like
+/usr/bin/env -w perl and env complains about illegal option.
+
+To address this we can remove -w option from perl shebang
+line and add "use warnings" statement.
+
+Upstream-Status: Pending
+Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
+---
+ bin/autom4te.in | 3 ++-
+ bin/autoreconf.in | 3 ++-
+ bin/autoscan.in | 3 ++-
+ bin/autoupdate.in | 3 ++-
+ bin/ifnames.in | 3 ++-
+ 5 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/bin/autom4te.in b/bin/autom4te.in
+index 11773c9..a8f5e41 100644
+--- a/bin/autom4te.in
++++ b/bin/autom4te.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ # -*- perl -*-
+ # @configure_input@
+
+@@ -42,6 +42,7 @@ use Autom4te::General;
+ use Autom4te::XFile;
+ use File::Basename;
+ use strict;
++use warnings;
+
+ # Data directory.
+ my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@';
+diff --git a/bin/autoreconf.in b/bin/autoreconf.in
+index e245db4..1a318cb 100644
+--- a/bin/autoreconf.in
++++ b/bin/autoreconf.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ # -*- perl -*-
+ # @configure_input@
+
+@@ -45,6 +45,7 @@ use Autom4te::XFile;
+ # Do not use Cwd::chdir, since it might hang.
+ use Cwd 'cwd';
+ use strict;
++use warnings;
+
+ ## ----------- ##
+ ## Variables. ##
+diff --git a/bin/autoscan.in b/bin/autoscan.in
+index a67c48d..b931249 100644
+--- a/bin/autoscan.in
++++ b/bin/autoscan.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ # -*- perl -*-
+ # @configure_input@
+
+@@ -43,6 +43,7 @@ use Autom4te::XFile;
+ use File::Basename;
+ use File::Find;
+ use strict;
++use warnings;
+
+ use vars qw(@cfiles @makefiles @shfiles @subdirs %printed);
+
+diff --git a/bin/autoupdate.in b/bin/autoupdate.in
+index 9737d49..92cb147 100644
+--- a/bin/autoupdate.in
++++ b/bin/autoupdate.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ # -*- perl -*-
+ # @configure_input@
+
+@@ -44,6 +44,7 @@ use Autom4te::General;
+ use Autom4te::XFile;
+ use File::Basename;
+ use strict;
++use warnings;
+
+ # Lib files.
+ my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
+diff --git a/bin/ifnames.in b/bin/ifnames.in
+index ba2cd05..74b0278 100644
+--- a/bin/ifnames.in
++++ b/bin/ifnames.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ # -*- perl -*-
+ # @configure_input@
+
+@@ -44,6 +44,7 @@ BEGIN
+ use Autom4te::General;
+ use Autom4te::XFile;
+ use Autom4te::FileUtils;
++use warnings;
+
+ # $HELP
+ # -----
+--
+2.3.0
+
diff --git a/meta/recipes-devtools/autoconf/autoconf_2.69.bb b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
index aa1877a1fb..8e67f4b829 100644
--- a/meta/recipes-devtools/autoconf/autoconf_2.69.bb
+++ b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
@@ -14,6 +14,8 @@ SRC_URI += "file://check-automake-cross-warning.patch \
file://autotest-automake-result-format.patch \
file://add_musl_config.patch \
file://performance.patch \
+ file://AC_HEADER_MAJOR-port-to-glibc-2.25.patch \
+ file://autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch \
"
SRC_URI[md5sum] = "82d05e03b93e45f5a39b828dc9c6c29b"
diff --git a/meta/recipes-devtools/autogen/autogen-native_5.18.10.bb b/meta/recipes-devtools/autogen/autogen-native_5.18.10.bb
deleted file mode 100644
index 274427c7e9..0000000000
--- a/meta/recipes-devtools/autogen/autogen-native_5.18.10.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Automated text and program generation tool"
-DESCRIPTION = "AutoGen is a tool designed to simplify the creation and\
- maintenance of programs that contain large amounts of repetitious text.\
- It is especially valuable in programs that have several blocks of text\
- that must be kept synchronized."
-HOMEPAGE = "http://www.gnu.org/software/autogen/"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-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 \
- file://fix-script-err-when-processing-libguile.patch \
-"
-
-SRC_URI[md5sum] = "2d1b5226e1929d0680011df631289571"
-SRC_URI[sha256sum] = "0b8681d9724c481d3b726b5a9e81d3d09dc7f307d1a801c76d0a30d8f843d20a"
-
-UPSTREAM_CHECK_URI = "http://ftp.gnu.org/gnu/autogen/"
-UPSTREAM_CHECK_REGEX = "rel(?P<pver>\d+(\.\d+)+)/"
-
-DEPENDS = "guile-native libtool-native libxml2-native"
-
-inherit autotools texinfo native pkgconfig
-
-# autogen-native links against libguile which may have been relocated with sstate
-# these environment variables ensure there isn't a relocation issue
-export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
-export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
-
-do_install_append () {
- create_wrapper ${D}/${bindir}/autogen \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
-}
diff --git a/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch b/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch
deleted file mode 100644
index 694a3953ea..0000000000
--- a/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-autogen-native: fix script err when processing libguile
-
-do_configure for autogen will fail if project directory path
-contains '-I' character, which is caused by the unsuitable sed
-script when processing libguile.
-
-Upstream-Status: Pending
-
-Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-
-diff --git a/config/ag_macros.m4 b/config/ag_macros.m4
-index 58186b6..58ed2ad 100644
---- a/config/ag_macros.m4
-+++ b/config/ag_macros.m4
-@@ -32,7 +32,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[
- GUILE_FLAGS
- [ag_gv=`gdir=\`pkg-config --cflags-only-I \
- guile-${GUILE_EFFECTIVE_VERSION} | \
-- sed 's/-I *//;s/ *-I.*/ /g'\`
-+ sed 's/ *-I *\// \//g'\`
- for d in $gdir
- do test -f "$d/libguile/version.h" && gdir=$d && break
- done
-diff --git a/config/misc.def b/config/misc.def
-index 490d361..6e183ef 100644
---- a/config/misc.def
-+++ b/config/misc.def
-@@ -342,7 +342,7 @@ do-always = <<- _END_ALWAYS_
- GUILE_FLAGS
- [ag_gv=`gdir=\`pkg-config --cflags-only-I \
- guile-${GUILE_EFFECTIVE_VERSION} | \
-- sed 's/-I *//;s/ *-I.*/ /g'\`
-+ sed 's/ *-I *\// \//g'\`
- test -z "$gdir" && gdir=/usr/include
- for d in $gdir
- do test -f "$d/libguile/version.h" && gdir=$d && break
diff --git a/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch b/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch
deleted file mode 100644
index 9efd7e5587..0000000000
--- a/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Subject: [PATCH] autogen: increase timeout limit for shell commands
-
-On some overloaded hosts, shell commands of autogen may can not
-finish in 5 secs. This has caused many build failures, so increase
-the timeout limit to fix this.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
----
- configure.ac | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 58a848b..170dd9e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -178,9 +178,9 @@ time_delta=`expr ${config_end_time} - ${config_start_time} 2>/dev/null`
- if test -z "${AG_TIMEOUT}"
- then
- if test -z "${time_delta}"
-- then time_delta=10
-- elif test ${time_delta} -lt 5
-- then time_delta=5 ; fi
-+ then time_delta=60
-+ elif test ${time_delta} -lt 30
-+ then time_delta=30 ; fi
-
- AG_TIMEOUT=${time_delta}
- fi
diff --git a/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch b/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch
deleted file mode 100644
index e56da7b1da..0000000000
--- a/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Pending
-
-mk-tpl-config.sh: force exit value to be 0 in subprocess
-
-The return value of statement list=`<subcommands>` is the exit value of the
-subcommands. So if the subcommands fails, the compilation fails. This is obviously
-not intended. In the normal case, we expect the grep command to fail as there should
-be no 'noreturn' word in the libguile files.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- autoopts/mk-tpl-config.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/autoopts/mk-tpl-config.sh b/autoopts/mk-tpl-config.sh
-index 926f5ab..6b4a0fb 100755
---- a/autoopts/mk-tpl-config.sh
-+++ b/autoopts/mk-tpl-config.sh
-@@ -202,7 +202,7 @@ fix_guile() {
-
- list=`set +e ; exec 2>/dev/null
- find ${libguiledir}/libguile* -type f | \
-- xargs grep -l -E '\<noreturn\>'`
-+ xargs grep -l -E '\<noreturn\>' ; exit 0`
-
- test -z "$list" && exit 0
-
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/automake/automake.inc b/meta/recipes-devtools/automake/automake.inc
index 4f9b5f7740..87cedc9838 100644
--- a/meta/recipes-devtools/automake/automake.inc
+++ b/meta/recipes-devtools/automake/automake.inc
@@ -16,6 +16,6 @@ do_configure() {
oe_runconf
}
-export AUTOMAKE = "${@bb.utils.which('automake', d.getVar('PATH', True))}"
+export AUTOMAKE = "${@bb.utils.which('automake', d.getVar('PATH'))}"
FILES_${PN} += "${datadir}/automake* ${datadir}/aclocal*"
diff --git a/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch b/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch
new file mode 100644
index 0000000000..deb1d03503
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch
@@ -0,0 +1,27 @@
+From b3c6e1971786cd93a2e3017c92bfbfe96baaf2f7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 26 Jul 2017 11:19:56 -0700
+Subject: [PATCH] automake: Add default libtool_tag to cppasm.
+
+ * bin/automake.in (register_language): Define default libtool tag to be CC
+ since CPPASCOMPILE is using CC to call assembler
+
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ bin/automake.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bin/automake.in b/bin/automake.in
+index 3a66965..08ba09a 100644
+--- a/bin/automake.in
++++ b/bin/automake.in
+@@ -898,6 +898,7 @@ register_language ('name' => 'cppasm',
+ 'libtool_tag' => 'CC',
+ 'compile_flag' => '-c',
+ 'output_flag' => '-o',
++ 'libtool_tag' => 'CC',
+ 'extensions' => ['.S', '.sx']);
+
+ # Fortran 77
diff --git a/meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch b/meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch
new file mode 100644
index 0000000000..591fce1bf1
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch
@@ -0,0 +1,65 @@
+From 592eb55b248a765abfc796fccb68baa3d53745ac Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 26 Jul 2018 00:58:12 -0700
+Subject: [PATCH] build: fix race in parallel builds
+
+The automake-$(APIVERSION) is a hardlink of automake, if it is
+created later than update_mans executing, there is a failure
+[snip]
+|: && mkdir -p doc && ./pre-inst-env /usr/bin/env perl
+../automake-1.16.1/doc/help2man --output=doc/aclocal-1.16.1
+aclocal-1.16
+|help2man: can't get `--help' info from aclocal-1.16
+|Try `--no-discard-stderr' if option outputs to stderr
+Makefile:3693: recipe for target 'doc/aclocal-1.16.1' failed
+[snip]
+
+The automake_script is required by update_mans and update_mans
+invokes automake-$(APIVERSION) rather than automake to generate
+doc, so we should assign `automake-$(APIVERSION)' to automake_script.
+
+The same reason to tweak aclocal_script.
+
+* bin/local.mk: correct automake_script/aclocal_script
+
+Upstream-Status: Submitted [automake-patches@gnu.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in | 4 ++--
+ bin/local.mk | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index c3e934c..7cddb8d 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -691,8 +691,8 @@ bin_SCRIPTS = bin/automake bin/aclocal
+ # Used by maintainer checks and such.
+ automake_in = $(srcdir)/bin/automake.in
+ aclocal_in = $(srcdir)/bin/aclocal.in
+-automake_script = bin/automake
+-aclocal_script = bin/aclocal
++automake_script = bin/automake-$(APIVERSION)
++aclocal_script = bin/aclocal-$(APIVERSION)
+ AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
+ info_TEXINFOS = doc/automake.texi doc/automake-history.texi
+ doc_automake_TEXINFOS = doc/fdl.texi
+diff --git a/bin/local.mk b/bin/local.mk
+index 97b38db..058ca99 100644
+--- a/bin/local.mk
++++ b/bin/local.mk
+@@ -31,8 +31,8 @@ CLEANFILES += \
+ # Used by maintainer checks and such.
+ automake_in = $(srcdir)/%D%/automake.in
+ aclocal_in = $(srcdir)/%D%/aclocal.in
+-automake_script = %D%/automake
+-aclocal_script = %D%/aclocal
++automake_script = %D%/automake-$(APIVERSION)
++aclocal_script = %D%/aclocal-$(APIVERSION)
+
+ AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
+ TAGS_FILES += $(AUTOMAKESOURCES)
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
new file mode 100644
index 0000000000..1592c02cb9
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
@@ -0,0 +1,60 @@
+From 081385f4d4bba367afad3bff1fa034f5263305e6 Mon Sep 17 00:00:00 2001
+From: Serhii Popovych <spopovyc@cisco.com>
+Date: Wed, 10 Feb 2016 17:07:32 +0000
+Subject: [PATCH] perl: Replace -w option in shebangs with modern "use
+ warnings" In some builds we might provide ac_cv_path_PERL as /usr/bin/env
+ perl to use newer version of the perl from users PATH rather than older from
+ standard system path.
+
+However using /usr/bin/env perl -w from shebang line isn't
+possible because it translates to something like
+/usr/bin/env -w perl and env complains about illegal option.
+
+To address this we can remove -w option from perl shebang
+line and add "use warnings" statement.
+
+Upstream-Status: Pending
+Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+---
+ bin/aclocal.in | 3 ++-
+ bin/automake.in | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/bin/aclocal.in b/bin/aclocal.in
+index b3715d9..461d453 100644
+--- a/bin/aclocal.in
++++ b/bin/aclocal.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!@PERL@
+ # -*- perl -*-
+ # @configure_input@
+
+@@ -32,6 +32,7 @@ BEGIN
+ }
+
+ use strict;
++use warnings;
+
+ use Automake::Config;
+ use Automake::General;
+diff --git a/bin/automake.in b/bin/automake.in
+index 8377d20..3a66965 100644
+--- a/bin/automake.in
++++ b/bin/automake.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!@PERL@
+ # -*- perl -*-
+ # @configure_input@
+
+@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ package Automake;
+
+ use strict;
++use warnings;
+
+ BEGIN
+ {
diff --git a/meta/recipes-devtools/automake/automake/buildtest.patch b/meta/recipes-devtools/automake/automake/buildtest.patch
index 1dd5337849..b88b9e8693 100644
--- a/meta/recipes-devtools/automake/automake/buildtest.patch
+++ b/meta/recipes-devtools/automake/automake/buildtest.patch
@@ -1,24 +1,38 @@
+From a860b28069785aa5bf2fa9b671287de9af5004ff Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= <bjst@enea.com>
+Date: Wed, 19 Dec 2012 17:18:27 +0100
+Subject: [PATCH] Add a new distro feature "ptest".
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
Split "check-TESTS" into a buildtest and runtest target, so that they can
be run separately.
Signed-off-by: Björn Stenberg <bjst@enea.com>
Upstream-Status: Pending
---- a/lib/am/check.am 2012-11-14 13:46:16.335475995 +0100
-+++ b/lib/am/check.am 2012-08-13 18:40:12.000000000 +0200
-@@ -44,7 +44,7 @@
- am__tty_colors = $(am__tty_colors_dummy)
- endif !%?COLOR%
+---
+ lib/am/check.am | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+diff --git a/lib/am/check.am b/lib/am/check.am
+index e0db651..de137fa 100644
+--- a/lib/am/check.am
++++ b/lib/am/check.am
+@@ -41,7 +41,7 @@ am__tty_colors = { \
+ fi; \
+ }
+
-.PHONY: check-TESTS
+.PHONY: check-TESTS buildtest-TESTS runtest-TESTS
-
- if %?PARALLEL_TESTS%
-
-@@ -465,7 +465,14 @@
-
- else !%?PARALLEL_TESTS%
-
+
+ if !%?SERIAL_TESTS%
+
+@@ -466,7 +466,14 @@ else %?SERIAL_TESTS%
+
+ ## Obsolescent serial testsuite driver.
+
-check-TESTS: $(TESTS)
+AM_RECURSIVE_TARGETS += buildtest runtest
+
@@ -28,6 +42,6 @@ Upstream-Status: Pending
+ $(MAKE) $(AM_MAKEFLAGS) runtest-TESTS
+
+runtest-TESTS:
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
## Make sure Solaris VPATH-expands all members of this list, even
diff --git a/meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch b/meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch
index 2c6594f523..1f71722334 100644
--- a/meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch
+++ b/meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch
@@ -1,22 +1,32 @@
-Set relative to top_builddir path in Makefile to access test-driver
+From f78dfa39139d528c94d72f27994f337f2fd3b6bd Mon Sep 17 00:00:00 2001
+From: Adrian Calianu <adrian.calianu@enea.com>
+Date: Thu, 25 Feb 2016 16:08:04 +0100
+Subject: [PATCH] Set relative to top_builddir path in Makefile to access
+ test-driver
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
Upstream-Status: Pending
Bug-Report: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19042
+---
+ bin/automake.in | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/bin/automake.in b/bin/automake.in
+index a52a489..8377d20 100644
--- a/bin/automake.in
+++ b/bin/automake.in
-@@ -272,6 +272,9 @@
+@@ -324,6 +324,9 @@ my $config_aux_dir_set_in_configure_ac = 0;
# $AM_CONFIG_AUX_DIR is prefixed with $(top_srcdir), so it can be used
# in Makefiles.
my $am_config_aux_dir = '';
+# Directory used at runtime like running test-driver that should not
+# depend on $(top_srcdir)
+my $am_config_rt_aux_dir = '';
-
+
# Directory to search for AC_LIBSOURCE files, as set by AC_CONFIG_LIBOBJ_DIR
# in configure.ac.
-@@ -4700,7 +4703,7 @@
+@@ -4854,7 +4857,7 @@ sub handle_per_suffix_test
{
require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
define_variable ("${pfx}LOG_DRIVER",
@@ -25,7 +35,7 @@ Bug-Report: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19042
INTERNAL);
}
my $driver = '$(' . $pfx . 'LOG_DRIVER)';
-@@ -7284,6 +7287,10 @@
+@@ -7440,6 +7443,10 @@ sub locate_aux_dir ()
$am_config_aux_dir =
'$(top_srcdir)' . ($config_aux_dir eq '.' ? "" : "/$config_aux_dir");
$am_config_aux_dir =~ s,/*$,,;
@@ -34,3 +44,5 @@ Bug-Report: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19042
+ '$(top_builddir)' . ($config_aux_dir eq '.' ? "" : "/$config_aux_dir");
+ $am_config_rt_aux_dir =~ s,/*$,,;
}
+
+
diff --git a/meta/recipes-devtools/automake/automake/performance.patch b/meta/recipes-devtools/automake/automake/performance.patch
index 3e6d5694dc..a8ba6592fa 100644
--- a/meta/recipes-devtools/automake/automake/performance.patch
+++ b/meta/recipes-devtools/automake/automake/performance.patch
@@ -1,15 +1,24 @@
+From cd47c328cb53546891bb3dc7c9b2c54ed01cc6d1 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Mon, 7 Dec 2015 18:28:05 +0000
+Subject: [PATCH] automake: Remove delays in configure scripts using automake
+
By default automake puts "sleep 1" into the start of configure scripts
-which adds pointless delays to them. Rather than do this, lets just assume
+which adds pointless delays to them. Rather than do this, lets just assume
our systems are sane.
RP
2015/12/7
Upstream-Status: Inappropriate
-Index: automake-1.15/m4/sanity.m4
-===================================================================
---- automake-1.15.orig/m4/sanity.m4
-+++ automake-1.15/m4/sanity.m4
+---
+ m4/sanity.m4 | 55 -------------------------------------------------------
+ 1 file changed, 55 deletions(-)
+
+diff --git a/m4/sanity.m4 b/m4/sanity.m4
+index eaac218..bfdfe88 100644
+--- a/m4/sanity.m4
++++ b/m4/sanity.m4
@@ -23,60 +23,5 @@ case $srcdir in
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
diff --git a/meta/recipes-devtools/automake/automake/python-libdir.patch b/meta/recipes-devtools/automake/automake/python-libdir.patch
index 2a48b133eb..ee1f725f76 100644
--- a/meta/recipes-devtools/automake/automake/python-libdir.patch
+++ b/meta/recipes-devtools/automake/automake/python-libdir.patch
@@ -1,7 +1,7 @@
-From 472a3d36c97ef7535f05d6c185edcbc22b0074c4 Mon Sep 17 00:00:00 2001
+From a80dacd5124d0713cf2c986b28d736e78dc6b0ca Mon Sep 17 00:00:00 2001
From: Kumar Gala <galak@kernel.crashing.org>
Date: Thu, 11 Aug 2011 01:26:33 -0500
-Subject: [PATCH 1/4] automake: Update for python.m4 to respect libdir
+Subject: [PATCH] automake: Update for python.m4 to respect libdir
Upstream-Status: Inappropriate [embedded specific]
@@ -17,10 +17,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/m4/python.m4 b/m4/python.m4
-index 5b2c695..ed19261 100644
+index 63c0a0e..7bbd2d2 100644
--- a/m4/python.m4
+++ b/m4/python.m4
-@@ -91,12 +91,13 @@ AC_DEFUN([AM_PATH_PYTHON],
+@@ -94,12 +94,13 @@ AC_DEFUN([AM_PATH_PYTHON],
[am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
@@ -36,7 +36,7 @@ index 5b2c695..ed19261 100644
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
dnl At times (like when building shared libraries) you may want
-@@ -141,14 +142,7 @@ except ImportError:
+@@ -144,14 +145,7 @@ except ImportError:
else
am_py_prefix=$prefix
fi
@@ -52,7 +52,7 @@ index 5b2c695..ed19261 100644
case $am_cv_python_pythondir in
$am_py_prefix*)
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
-@@ -158,7 +152,7 @@ sys.stdout.write(sitedir)"`
+@@ -161,7 +155,7 @@ sys.stdout.write(sitedir)"`
case $am_py_prefix in
/usr|/System*) ;;
*)
@@ -61,7 +61,7 @@ index 5b2c695..ed19261 100644
;;
esac
;;
-@@ -183,14 +177,7 @@ sys.stdout.write(sitedir)"`
+@@ -186,14 +180,7 @@ sys.stdout.write(sitedir)"`
else
am_py_exec_prefix=$exec_prefix
fi
@@ -77,7 +77,7 @@ index 5b2c695..ed19261 100644
case $am_cv_python_pyexecdir in
$am_py_exec_prefix*)
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
-@@ -200,7 +187,7 @@ sys.stdout.write(sitedir)"`
+@@ -203,7 +190,7 @@ sys.stdout.write(sitedir)"`
case $am_py_exec_prefix in
/usr|/System*) ;;
*)
@@ -86,6 +86,3 @@ index 5b2c695..ed19261 100644
;;
esac
;;
---
-2.8.1
-
diff --git a/meta/recipes-devtools/automake/automake_1.15.bb b/meta/recipes-devtools/automake/automake_1.15.bb
deleted file mode 100644
index a3c72fd334..0000000000
--- a/meta/recipes-devtools/automake/automake_1.15.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-require automake.inc
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS_class-native = "autoconf-native"
-
-NAMEVER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-RDEPENDS_${PN} += "\
- autoconf \
- perl \
- perl-module-bytes \
- perl-module-data-dumper \
- perl-module-strict \
- perl-module-text-parsewords \
- perl-module-thread-queue \
- perl-module-threads \
- perl-module-vars "
-
-RDEPENDS_${PN}_class-native = "autoconf-native hostperl-runtime-native"
-
-SRC_URI += " file://python-libdir.patch \
- file://buildtest.patch \
- file://performance.patch \
- file://new_rt_path_for_test-driver.patch"
-
-SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3"
-SRC_URI[sha256sum] = "7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924"
-
-CACHED_CONFIGUREVARS += "ac_cv_path_PERL=${USRBINPATH}/perl"
-
-do_install_append () {
- install -d ${D}${datadir}
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/automake/automake_1.16.1.bb b/meta/recipes-devtools/automake/automake_1.16.1.bb
new file mode 100644
index 0000000000..d82eed3c60
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake_1.16.1.bb
@@ -0,0 +1,44 @@
+require automake.inc
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+DEPENDS_class-native = "autoconf-native"
+
+NAMEVER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+RDEPENDS_${PN} += "\
+ autoconf \
+ perl \
+ perl-module-bytes \
+ perl-module-data-dumper \
+ perl-module-strict \
+ perl-module-text-parsewords \
+ perl-module-thread-queue \
+ perl-module-threads \
+ perl-module-vars "
+
+RDEPENDS_${PN}_class-native = "autoconf-native hostperl-runtime-native"
+RDEPENDS_${PN}_class-nativesdk = "nativesdk-autoconf"
+
+SRC_URI += "file://python-libdir.patch \
+ file://buildtest.patch \
+ file://performance.patch \
+ file://new_rt_path_for_test-driver.patch \
+ file://automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch \
+ file://0001-automake-Add-default-libtool_tag-to-cppasm.patch \
+ file://0001-build-fix-race-in-parallel-builds.patch \
+ "
+
+SRC_URI[md5sum] = "83cc2463a4080efd46a72ba2c9f6b8f5"
+SRC_URI[sha256sum] = "608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8"
+
+PERL = "${USRBINPATH}/perl"
+PERL_class-native = "${USRBINPATH}/env perl"
+PERL_class-nativesdk = "${USRBINPATH}/env perl"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'"
+
+do_install_append () {
+ install -d ${D}${datadir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/binutils/binutils-2.27.inc b/meta/recipes-devtools/binutils/binutils-2.27.inc
deleted file mode 100644
index 9cc57fcdea..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.27.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-LIC_FILES_CHKSUM="\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
- file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
- file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- "
-
-def binutils_branch_version(d):
- pvsplit = d.getVar('PV', True).split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
-BINUPV = "${@binutils_branch_version(d)}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
-
-SRCREV = "5fe53ce37f9d9dd544ec8cc9e2863b68e1a61f4c"
-SRC_URI = "\
- git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
- file://0002-configure-widen-the-regexp-for-SH-architectures.patch \
- file://0003-Point-scripts-location-to-libdir.patch \
- file://0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
- file://0005-Explicitly-link-with-libm-on-uclibc.patch \
- file://0006-Use-libtool-2.4.patch \
- file://0007-Add-the-armv5e-architecture-to-binutils.patch \
- file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
- file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
- file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
- file://0011-Change-default-emulation-for-mips64-linux.patch \
- file://0012-Add-support-for-Netlogic-XLP.patch \
- file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
-"
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
-}
diff --git a/meta/recipes-devtools/binutils/binutils-2.33.inc b/meta/recipes-devtools/binutils/binutils-2.33.inc
new file mode 100644
index 0000000000..84a9ec8fc3
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.33.inc
@@ -0,0 +1,51 @@
+LIC_FILES_CHKSUM="\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+ file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+ file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ "
+
+def binutils_branch_version(d):
+ pvsplit = d.getVar('PV').split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+# When upgrading to 2.33, please make sure there is no trailing .0, so
+# that upstream version check can work correctly.
+PV = "2.33.1"
+CVE_VERSION = "2.33"
+BINUPV = "${@binutils_branch_version(d)}"
+#BRANCH = "binutils-${BINUPV}-branch"
+BRANCH ?= "binutils-2_33-branch"
+
+UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
+
+SRCREV ?= "c656f9a430636a6a7fc7a08c0e08f0098a729a02"
+BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${BRANCH};protocol=git"
+SRC_URI = "\
+ ${BINUTILS_GIT_URI} \
+ file://0003-configure-widen-the-regexp-for-SH-architectures.patch \
+ file://0004-Point-scripts-location-to-libdir.patch \
+ file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
+ file://0006-Use-libtool-2.4.patch \
+ file://0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+ file://0008-warn-for-uses-of-system-directories-when-cross-linki.patch \
+ file://0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
+ file://0010-Change-default-emulation-for-mips64-linux.patch \
+ file://0011-Add-support-for-Netlogic-XLP.patch \
+ file://0012-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
+ file://0013-Detect-64-bit-MIPS-targets.patch \
+ file://0014-sync-with-OE-libtool-changes.patch \
+ file://0015-binutils-enable-x86_64-pep-for-producing-EFI-binarie.patch \
+ file://CVE-2019-17450.patch \
+ file://CVE-2019-17451.patch \
+"
+S = "${WORKDIR}/git"
+
+do_configure_prepend () {
+ rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
+}
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
index ae14642272..e98f31f9c3 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -6,12 +6,15 @@ BPN = "binutils"
DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext nativesdk-flex"
EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
+ --enable-poison-system-directories \
"
# We have to point binutils at a sysroot but we don't need to rebuild if this changes
# e.g. we switch between different machines with different tunes.
EXTRA_OECONF[vardepsexclude] = "TUNE_PKGARCH"
+LDGOLD_sdkmingw32 = ""
+
do_install () {
autotools_do_install
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.27.bb b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.33.bb
index 5dbaa03017..5dbaa03017 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.27.bb
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.33.bb
diff --git a/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.33.bb b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.33.bb
new file mode 100644
index 0000000000..07a8e7c417
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.33.bb
@@ -0,0 +1,85 @@
+require binutils.inc
+require binutils-${PV}.inc
+
+BPN = "binutils"
+
+DEPENDS += "dejagnu-native expect-native"
+DEPENDS += "binutils-native"
+
+deltask do_compile
+deltask do_install
+
+inherit nopackages
+
+do_configure[dirs] += "${B}/ld ${B}/bfd"
+do_configure() {
+ # create config.h, oe enables initfini-array by default
+ echo "#define HAVE_INITFINI_ARRAY" > ${B}/ld/config.h
+ # use the bfd_stdint.h from binutils-native, this is the same of the one
+ # generated by binutils-cross
+ cp ${RECIPE_SYSROOT_NATIVE}/usr/include/bfd_stdint.h ${B}/bfd/
+}
+
+# target depends
+DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils"
+DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}gcc"
+DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs"
+DEPENDS += "virtual/${MLPREFIX}libc"
+
+python check_prepare() {
+ def suffix_sys(sys):
+ if sys.endswith("-linux"):
+ return sys + "-gnu"
+ return sys
+
+ def generate_site_exp(d, suite):
+ content = []
+ content.append('set srcdir "{0}/{1}"'.format(d.getVar("S"), suite))
+ content.append('set objdir "{0}/{1}"'.format(d.getVar("B"), suite))
+ content.append('set build_alias "{0}"'.format(d.getVar("BUILD_SYS")))
+ content.append('set build_triplet {0}'.format(d.getVar("BUILD_SYS")))
+ # use BUILD here since HOST=TARGET
+ content.append('set host_alias "{0}"'.format(d.getVar("BUILD_SYS")))
+ content.append('set host_triplet {0}'.format(d.getVar("BUILD_SYS")))
+ content.append('set target_alias "{0}"'.format(d.getVar("TARGET_SYS")))
+ content.append('set target_triplet {0}'.format(suffix_sys(d.getVar("TARGET_SYS"))))
+ content.append("set development true")
+ content.append("set experimental false")
+
+ content.append(d.expand('set CXXFILT "${TARGET_PREFIX}c++filt"'))
+ content.append(d.expand('set CC "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
+ content.append(d.expand('set CXX "${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
+ content.append(d.expand('set CFLAGS_FOR_TARGET "--sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
+
+ if suite == "ld" and d.getVar("TUNE_ARCH") == "mips64":
+ # oe patches binutils to have the default mips64 abi as 64bit, but
+ # skips gas causing issues with the ld test suite (which uses gas)
+ content.append('set ASFLAGS "-64"')
+
+ return "\n".join(content)
+
+ for i in ["binutils", "gas", "ld"]:
+ builddir = os.path.join(d.getVar("B"), i)
+ if not os.path.isdir(builddir):
+ os.makedirs(builddir)
+ with open(os.path.join(builddir, "site.exp"), "w") as f:
+ f.write(generate_site_exp(d, i))
+}
+
+CHECK_TARGETS ??= "binutils gas ld"
+
+do_check[dirs] = "${B} ${B}/binutils ${B}/gas ${B}/ld"
+do_check[prefuncs] += "check_prepare"
+do_check[nostamp] = "1"
+do_check() {
+ export LC_ALL=C
+ for i in ${CHECK_TARGETS}; do
+ (cd ${B}/$i; runtest \
+ --tool $i \
+ --srcdir ${S}/$i/testsuite \
+ --ignore 'plugin.exp' \
+ || true)
+ done
+}
+addtask check after do_configure
+
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
index fd3d801491..02ec891606 100644
--- a/meta/recipes-devtools/binutils/binutils-cross.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -4,12 +4,20 @@ PROVIDES = "virtual/${TARGET_PREFIX}binutils"
PN = "binutils-cross-${TARGET_ARCH}"
BPN = "binutils"
+# Ignore how TARGET_ARCH is computed.
+TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}"
+
INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_AUTOTOOLS_DEPS = "1"
+SRC_URI += "file://0002-binutils-cross-Do-not-generate-linker-script-directo.patch"
+
+# Specify lib-path else we use a load of search dirs which we don't use
+# and mean the linker scripts have to be relocated.
EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \
--disable-install-libbfd \
--enable-poison-system-directories \
+ --with-lib-path==${target_base_libdir}:=${target_libdir} \
"
do_install () {
oe_runmake 'DESTDIR=${D}' install
diff --git a/meta/recipes-devtools/binutils/binutils-cross_2.27.bb b/meta/recipes-devtools/binutils/binutils-cross_2.33.bb
index fbd1f7d25a..fbd1f7d25a 100644
--- a/meta/recipes-devtools/binutils/binutils-cross_2.27.bb
+++ b/meta/recipes-devtools/binutils/binutils-cross_2.33.bb
diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.27.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.27.bb
deleted file mode 100644
index 62c03d7240..0000000000
--- a/meta/recipes-devtools/binutils/binutils-crosssdk_2.27.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require binutils-cross_${PV}.bb
-
-inherit crosssdk
-
-PN = "binutils-crosssdk-${SDK_SYS}"
-
-PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
-
-SRC_URI += "file://0001-Generate-relocatable-SDKs.patch"
-
-do_configure_prepend () {
- sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
-}
diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.33.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.33.bb
new file mode 100644
index 0000000000..37f4d6d2e9
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.33.bb
@@ -0,0 +1,13 @@
+require binutils-cross_${PV}.bb
+
+inherit crosssdk
+
+PN = "binutils-crosssdk-${SDK_SYS}"
+
+PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
+
+SRC_URI += "file://0001-binutils-crosssdk-Generate-relocatable-SDKs.patch"
+
+do_configure_prepend () {
+ sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
+}
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 75d190f802..0fb6cae407 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -38,6 +38,9 @@ FILES_${PN}-dev = " \
# Rather than duplicating multiple entries for these, make one
# list and reuse it.
+LDGOLD_ALTS ?= "ld.gold dwp"
+LDGOLD_ALTS_riscv64 = ""
+
USE_ALTERNATIVES_FOR = " \
addr2line \
ar \
@@ -47,7 +50,7 @@ USE_ALTERNATIVES_FOR = " \
gprof \
ld \
ld.bfd \
- ld.gold dwp \
+ ${LDGOLD_ALTS} \
nm \
objcopy \
objdump \
@@ -59,9 +62,9 @@ USE_ALTERNATIVES_FOR = " \
"
python do_package_prepend() {
- make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
- prefix = d.getVar("TARGET_PREFIX", True)
- bindir = d.getVar("bindir", True)
+ make_alts = d.getVar("USE_ALTERNATIVES_FOR") or ""
+ prefix = d.getVar("TARGET_PREFIX")
+ bindir = d.getVar("bindir")
for alt in make_alts.split():
d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt)
d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt)
@@ -78,7 +81,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
LDGOLD_class-native = ""
LDGOLD_class-crosssdk = ""
-LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default', d)}"
+LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
# This is necessary due to a bug in the binutils Makefiles
# EXTRA_OEMAKE = "configure-build-libiberty all"
@@ -128,12 +131,12 @@ do_install () {
# We don't really need these, so we'll remove them...
rm -rf ${D}${libdir}/ldscripts
+ bindir_rel=${@os.path.relpath('${bindir}', '${prefix}/${TARGET_SYS}/bin')}
+
# Fix the /usr/${TARGET_SYS}/bin/* links
for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
rm -f $l
- ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
- | tr -s / \
- | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
+ ln -sf $bindir_rel/${TARGET_PREFIX}`basename $l` $l
done
# Install the libiberty header
diff --git a/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch b/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
deleted file mode 100644
index cad704a720..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 2dae6b137ce609fd008f2063034a4403d95484c5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:58:54 +0000
-Subject: [PATCH 01/13] Generate relocatable SDKs
-
-This patch will modify the ELF linker scripts so that the crosssdk
-linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
-will be relocated, at SDK install time, the interpreter path can be easily
-changed by the relocating script.
-
-Upstream-Status: Inappropriate [SDK specific]
-
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ld/genscripts.sh | 3 +++
- ld/scripttempl/elf.sc | 4 ++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index eb262e7..1a3b8bc 100755
---- a/ld/genscripts.sh
-+++ b/ld/genscripts.sh
-@@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
- LD_FLAG=r
- DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
- DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
-+PARTIAL_LINKING=" "
- ( echo "/* Script for ld -r: link without relocation */"
- . ${CUSTOMIZER_SCRIPT}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-@@ -285,10 +286,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
- LD_FLAG=u
- DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
- CONSTRUCTING=" "
-+PARTIAL_LINKING=" "
- ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
- . ${CUSTOMIZER_SCRIPT}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
-+unset PARTIAL_LINKING
-
- LD_FLAG=
- DATA_ALIGNMENT=${DATA_ALIGNMENT_}
-diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index f0c6439..223c55f 100644
---- a/ld/scripttempl/elf.sc
-+++ b/ld/scripttempl/elf.sc
-@@ -136,8 +136,8 @@ if test -n "${COMMONPAGESIZE}"; then
- DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
- DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
- fi
--if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
-- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
-+if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}${PARTIAL_LINKING}"; then
-+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = 0x1000; }"
- fi
- if test -z "$PLT"; then
- IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
new file mode 100644
index 0000000000..3a9461bf4a
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -0,0 +1,59 @@
+From c9aed4cb3c02715b2ba1fc70949043849f202f46 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 8 Dec 2019 00:31:35 -0800
+Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
+
+This patch will modify the ELF linker scripts so that the crosssdk
+linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
+will be relocated, at SDK install time, the interpreter path can be easily
+changed by the relocating script.
+
+Upstream-Status: Inappropriate [SDK specific]
+
+Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ld/genscripts.sh | 3 +++
+ ld/scripttempl/elf.sc | 4 ++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/ld/genscripts.sh b/ld/genscripts.sh
+index cb2b081e9e..db2e9fd569 100755
+--- a/ld/genscripts.sh
++++ b/ld/genscripts.sh
+@@ -325,6 +325,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
+ LD_FLAG=r
+ DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
+ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
++PARTIAL_LINKING=" "
+ ( echo "/* Script for ld -r: link without relocation */"
+ source_sh ${CUSTOMIZER_SCRIPT}
+ source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+@@ -333,10 +334,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
+ LD_FLAG=u
+ DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
+ CONSTRUCTING=" "
++PARTIAL_LINKING=" "
+ ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
+ source_sh ${CUSTOMIZER_SCRIPT}
+ source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
++unset PARTIAL_LINKING
+
+ DATA_ALIGNMENT=${DATA_ALIGNMENT_}
+ RELOCATING=" "
+diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
+index f9f0f7d402..9e469dca86 100644
+--- a/ld/scripttempl/elf.sc
++++ b/ld/scripttempl/elf.sc
+@@ -140,8 +140,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
+ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
+ fi
+ fi
+-if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
+- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
++if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}${PARTIAL_LINKING}"; then
++ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = 0x1000; }"
+ fi
+ if test -z "$PLT"; then
+ IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
diff --git a/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch b/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
new file mode 100644
index 0000000000..1b499a4504
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
@@ -0,0 +1,59 @@
+From 9fe5a2dd03fdf2986c89dd58ae48c0095f1c0411 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Mar 2017 23:37:05 -0800
+Subject: [PATCH] binutils-cross: Do not generate linker script directories
+
+We don't place target libraries within ${exec_prefix}, we'd always place these
+within the target sysroot within the standard library directories. Worse, the
+append_to_lib_path code prefixes these paths with the sysroot which makes even
+less sense.
+
+These directories therefore don't make sense in our case and mean we have to
+relocate all the linker scripts if they're present. Dropping them
+gives a reasonable performance improvement/simplification.
+
+Upstream-Status: Inappropriate
+
+RP 2017/01/30
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ld/genscripts.sh | 25 -------------------------
+ 1 file changed, 25 deletions(-)
+
+diff --git a/ld/genscripts.sh b/ld/genscripts.sh
+index c90f38a63c..97ad1a24d6 100755
+--- a/ld/genscripts.sh
++++ b/ld/genscripts.sh
+@@ -235,31 +235,6 @@ append_to_lib_path()
+ fi
+ }
+
+-# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib when native
+-# except when LIBPATH=":".
+-if [ "${LIB_PATH}" != ":" ] ; then
+- libs=
+- if [ "x${TOOL_LIB}" = "x" ] ; then
+- if [ "x${NATIVE}" = "xyes" ] ; then
+- libs="${exec_prefix}/${target_alias}/lib"
+- fi
+- else
+- # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX}
+- # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path,
+- # because 64bit libraries may be in both places, depending on
+- # cross-development setup method (e.g.: /usr/s390x-linux/lib64
+- # vs. /usr/s390-linux/lib64)
+- for libpath_suffix in ${LIBPATH_SUFFIX}; do
+- case "${NATIVE}:${libpath_suffix}:${TOOL_LIB}" in
+- :* | *::* | *:*:*${libpath_suffix}) ;;
+- *) libs="${exec_prefix}/${target_alias}/lib${libpath_suffix}" ;;
+- esac
+- done
+- libs="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
+- fi
+- append_to_lib_path ${libs}
+-fi
+-
+ if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
+ libs=${NATIVE_LIB_DIRS}
+ if [ "x${NATIVE}" = "xyes" ] ; then
diff --git a/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch b/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
deleted file mode 100644
index 8d7cf00d4b..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From e4cd40722f597dff39c7214fab1742dd5bcc67eb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:07:33 +0000
-Subject: [PATCH 02/13] configure: widen the regexp for SH architectures
-
-gprof needs to know about uclibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure | 4 ++--
- gprof/configure | 5 +++++
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index ad3dfb7..2a74a77 100755
---- a/configure
-+++ b/configure
-@@ -3444,7 +3444,7 @@ case "${target}" in
- ;;
- s390-*-* | s390x-*-*)
- ;;
-- sh-*-* | sh[34]*-*-*)
-+ sh*-*-* | sh[34]*-*-*)
- ;;
- sh64-*-* | sh5*-*-*)
- ;;
-@@ -3946,7 +3946,7 @@ case "${target}" in
- or1k*-*-*)
- noconfigdirs="$noconfigdirs gdb"
- ;;
-- sh-*-* | sh64-*-*)
-+ sh*-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
-diff --git a/gprof/configure b/gprof/configure
-index bf3ecaa..626e1c7 100755
---- a/gprof/configure
-+++ b/gprof/configure
-@@ -5873,6 +5873,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch b/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
deleted file mode 100644
index acc198b3ef..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 93c49f6197bd59b2abbf04b3296bf10029b80f48 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:09:58 +0000
-Subject: [PATCH 03/13] Point scripts location to libdir
-
-Upstream-Status: Inappropriate [debian patch]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ld/Makefile.am | 2 +-
- ld/Makefile.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 0598923..b478ba7 100644
---- a/ld/Makefile.am
-+++ b/ld/Makefile.am
-@@ -57,7 +57,7 @@ endif
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 7c78198..5eb67e0 100644
---- a/ld/Makefile.in
-+++ b/ld/Makefile.in
-@@ -451,7 +451,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch b/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
new file mode 100644
index 0000000000..4a6b107126
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
@@ -0,0 +1,44 @@
+From aecded290b2ec0b469c70fc6b062bd5ee6ba5e3a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 01:07:33 +0000
+Subject: [PATCH] configure: widen the regexp for SH architectures
+
+gprof needs to know about uclibc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure | 2 +-
+ gprof/configure | 5 +++++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 6a9719f609..001523eebf 100755
+--- a/configure
++++ b/configure
+@@ -3865,7 +3865,7 @@ case "${target}" in
+ nvptx*-*-*)
+ noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
+ ;;
+- sh-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
+diff --git a/gprof/configure b/gprof/configure
+index cbb3aced46..b5eabceb77 100755
+--- a/gprof/configure
++++ b/gprof/configure
+@@ -6162,6 +6162,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
diff --git a/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
deleted file mode 100644
index 28a17f3865..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 4ff83779de8621715c6c2a79cf7ed8d74ff2d7c5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:27:17 +0000
-Subject: [PATCH 04/13] Only generate an RPATH entry if LD_RUN_PATH is not
- empty
-
-for cases where -rpath isn't specified. debian (#151024)
-
-Upstream-Status: Pending
-
-Signed-off-by: Chris Chimelis <chris@debian.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ld/emultempl/elf32.em | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 47fa549..f4c640e 100644
---- a/ld/emultempl/elf32.em
-+++ b/ld/emultempl/elf32.em
-@@ -1244,6 +1244,8 @@ fragment <<EOF
- && command_line.rpath == NULL)
- {
- lib_path = (const char *) getenv ("LD_RUN_PATH");
-+ if ((lib_path) && (strlen (lib_path) == 0))
-+ lib_path = NULL;
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- force))
- break;
-@@ -1525,6 +1527,8 @@ gld${EMULATION_NAME}_before_allocation (void)
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
-
- for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch b/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
new file mode 100644
index 0000000000..8318bd3899
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
@@ -0,0 +1,39 @@
+From a9332107872ada73e72e92872ea2998a4e1495e0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 01:09:58 +0000
+Subject: [PATCH] Point scripts location to libdir
+
+Upstream-Status: Inappropriate [debian patch]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ld/Makefile.am b/ld/Makefile.am
+index ddc7a78368..6fa7bf2583 100644
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -63,7 +63,7 @@ endif
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff --git a/ld/Makefile.in b/ld/Makefile.in
+index fdf06128b2..5c108b9e05 100644
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -572,7 +572,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch b/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
deleted file mode 100644
index 331f78221c..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 18a7ae169e8d55ace683357d1de6b07e4fdf797a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:32:49 +0000
-Subject: [PATCH 05/13] Explicitly link with libm on uclibc
-
-Description:
-
-We do not need to have the libtool patch anymore for binutils after
-libtool has been updated upstream it include support for it. However
-for building gas natively on uclibc systems we have to link it with
--lm so that it picks up missing symbols.
-
-/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o):
-In function `floatformat_from_double':
-floatformat.c:(.text+0x1ec): undefined reference to `frexp'
-floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
-/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o):
-In function `floatformat_to_double':
-floatformat.c:(.text+0x38a): undefined reference to `ldexp'
-floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
-floatformat.c:(.text+0x43e): undefined reference to `ldexp'
-floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
-collect2: ld returned 1 exit status
-make[4]: *** [as-new] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gas/configure.tgt | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/gas/configure.tgt b/gas/configure.tgt
-index e2df659..1b9fd99 100644
---- a/gas/configure.tgt
-+++ b/gas/configure.tgt
-@@ -487,6 +487,12 @@ case ${generic_target} in
- *-*-netware) fmt=elf em=netware ;;
- esac
-
-+case ${generic_target} in
-+ arm-*-*uclibc*)
-+ need_libm=yes
-+ ;;
-+esac
-+
- case ${cpu_type} in
- aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | sparc | z80 | z8k)
- bfd_gas=yes
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
new file mode 100644
index 0000000000..214ae06344
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -0,0 +1,35 @@
+From 65fb7a33aba30dec8690e0a237efaa3b9649154c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 01:27:17 +0000
+Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty
+
+for cases where -rpath isn't specified. debian (#151024)
+
+Upstream-Status: Pending
+
+Signed-off-by: Chris Chimelis <chris@debian.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1470,6 +1470,8 @@ fragment <<EOF
+ && command_line.rpath == NULL)
+ {
+ path = (const char *) getenv ("LD_RUN_PATH");
++ if ((path) && (strlen (path) == 0))
++ path = NULL;
+ if (path
+ && gld${EMULATION_NAME}_search_needed (path, &n, force))
+ break;
+@@ -1745,6 +1747,8 @@ gld${EMULATION_NAME}_before_allocation (
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+
+ for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch b/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
index f2411c47df..135eb8877c 100644
--- a/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
+++ b/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
@@ -1,36 +1,33 @@
-From 71adcde3648db47f7fa155db12810591ffd3ae34 Mon Sep 17 00:00:00 2001
+From 9cebc65f222dfd4e0b3072b53f46ffcf328e9fe4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 14 Feb 2016 17:04:07 +0000
-Subject: [PATCH 06/13] Use libtool 2.4
+Subject: [PATCH] Use libtool 2.4
get libtool sysroot support
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Pending
- bfd/configure | 1318 +++++++++++++++++------
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ bfd/configure | 1322 ++++++++++++++-----
bfd/configure.ac | 2 +-
- binutils/configure | 1316 +++++++++++++++++------
- configure | 4 +-
- gas/configure | 1314 +++++++++++++++++------
- gprof/configure | 1321 +++++++++++++++++------
- ld/configure | 1691 +++++++++++++++++++++--------
- libtool.m4 | 1080 +++++++++++++------
- ltmain.sh | 2925 +++++++++++++++++++++++++++++++++-----------------
+ binutils/configure | 1320 ++++++++++++++-----
+ gas/configure | 1320 ++++++++++++++-----
+ gprof/configure | 1321 ++++++++++++++-----
+ ld/configure | 1695 ++++++++++++++++++------
+ libtool.m4 | 1080 +++++++++++-----
+ ltmain.sh | 2925 ++++++++++++++++++++++++++++--------------
ltoptions.m4 | 2 +-
ltversion.m4 | 12 +-
lt~obsolete.m4 | 2 +-
- opcodes/configure | 1318 +++++++++++++++++------
+ opcodes/configure | 1322 ++++++++++++++-----
opcodes/configure.ac | 2 +-
- zlib/configure | 1320 +++++++++++++++++------
- 15 files changed, 9930 insertions(+), 3697 deletions(-)
+ zlib/configure | 1320 ++++++++++++++-----
+ 14 files changed, 9940 insertions(+), 3705 deletions(-)
-diff --git a/bfd/configure b/bfd/configure
-index a437569..575a257 100755
--- a/bfd/configure
+++ b/bfd/configure
-@@ -671,6 +671,9 @@ OTOOL
+@@ -704,6 +704,9 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -40,7 +37,7 @@ index a437569..575a257 100755
OBJDUMP
LN_S
NM
-@@ -784,6 +787,7 @@ enable_static
+@@ -822,6 +825,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -48,7 +45,7 @@ index a437569..575a257 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1460,6 +1464,8 @@ Optional Packages:
+@@ -1504,6 +1508,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -57,7 +54,7 @@ index a437569..575a257 100755
--with-mmap try using mmap for BFD input files if available
--with-separate-debug-dir=DIR
Look for global separate debug info in DIR
-@@ -5392,8 +5398,8 @@ esac
+@@ -5693,8 +5699,8 @@ esac
@@ -68,7 +65,7 @@ index a437569..575a257 100755
-@@ -5433,7 +5439,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5734,7 +5740,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -77,7 +74,7 @@ index a437569..575a257 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6119,8 +6125,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6420,8 +6426,8 @@ $as_echo_n "checking whether the shell u
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -88,13 +85,13 @@ index a437569..575a257 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -6169,6 +6175,80 @@ esac
+@@ -6470,6 +6476,80 @@ esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
++if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
@@ -141,7 +138,7 @@ index a437569..575a257 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
++if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
@@ -168,8 +165,8 @@ index a437569..575a257 100755
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
- if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -6185,6 +6265,11 @@ case $reload_flag in
+ if ${lt_cv_ld_reload_flag+:} false; then :
+@@ -6486,6 +6566,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -181,7 +178,7 @@ index a437569..575a257 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6353,7 +6438,8 @@ mingw* | pw32*)
+@@ -6654,7 +6739,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -191,7 +188,7 @@ index a437569..575a257 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6507,6 +6593,21 @@ esac
+@@ -6808,6 +6894,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -213,7 +210,7 @@ index a437569..575a257 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6522,9 +6623,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6823,9 +6924,162 @@ test -z "$deplibs_check_method" && depli
@@ -234,7 +231,7 @@ index a437569..575a257 100755
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
@@ -246,7 +243,7 @@ index a437569..575a257 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -274,7 +271,7 @@ index a437569..575a257 100755
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
@@ -286,7 +283,7 @@ index a437569..575a257 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -334,7 +331,7 @@ index a437569..575a257 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
@@ -377,17 +374,17 @@ index a437569..575a257 100755
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6540,7 +6794,7 @@ do
+ if ${ac_cv_prog_AR+:} false; then :
+@@ -6841,7 +7095,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6560,11 +6814,15 @@ $as_echo "no" >&6; }
+@@ -6861,11 +7115,15 @@ $as_echo "no" >&6; }
fi
@@ -405,17 +402,17 @@ index a437569..575a257 100755
+set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6580,7 +6838,7 @@ do
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
+@@ -6881,7 +7139,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
+ ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6599,6 +6857,10 @@ else
+@@ -6900,6 +7158,10 @@ else
$as_echo "no" >&6; }
fi
@@ -426,7 +423,7 @@ index a437569..575a257 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6610,16 +6872,72 @@ ac_tool_warned=yes ;;
+@@ -6911,16 +7173,72 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -448,16 +445,16 @@ index a437569..575a257 100755
+
+
+
-+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
-+if test "${lt_cv_ar_at_file+set}" = set; then :
++if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-+
+
+int
+main ()
+{
@@ -490,11 +487,11 @@ index a437569..575a257 100755
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
++
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
-
++
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
@@ -503,7 +500,7 @@ index a437569..575a257 100755
-@@ -6961,8 +7279,8 @@ esac
+@@ -7262,8 +7580,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -514,7 +511,7 @@ index a437569..575a257 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6998,6 +7316,7 @@ for ac_symprfx in "" "_"; do
+@@ -7299,6 +7617,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -522,7 +519,7 @@ index a437569..575a257 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -7039,6 +7358,18 @@ _LT_EOF
+@@ -7340,6 +7659,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -541,7 +538,7 @@ index a437569..575a257 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -7050,7 +7381,7 @@ _LT_EOF
+@@ -7351,7 +7682,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -550,7 +547,7 @@ index a437569..575a257 100755
const char *name;
void *address;
}
-@@ -7076,8 +7407,8 @@ static const void *lt_preloaded_setup() {
+@@ -7377,8 +7708,8 @@ static const void *lt_preloaded_setup()
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -561,7 +558,7 @@ index a437569..575a257 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7087,8 +7418,8 @@ _LT_EOF
+@@ -7388,8 +7719,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -572,7 +569,7 @@ index a437569..575a257 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -7125,6 +7456,16 @@ else
+@@ -7426,6 +7757,20 @@ else
$as_echo "ok" >&6; }
fi
@@ -586,15 +583,17 @@ index a437569..575a257 100755
+
+
+
++
++
++
++
-@@ -7146,6 +7487,45 @@ fi
+@@ -7445,6 +7790,41 @@ fi
-+
-+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -621,7 +620,7 @@ index a437569..575a257 100755
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
+$as_echo "${with_libtool_sysroot}" >&6; }
-+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
@@ -630,12 +629,10 @@ index a437569..575a257 100755
+
+
+
-+
-+
+
+
# Check whether --enable-libtool-lock was given.
- if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
-@@ -7352,6 +7732,123 @@ esac
+@@ -7653,6 +8033,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -644,7 +641,7 @@ index a437569..575a257 100755
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
@@ -656,7 +653,7 @@ index a437569..575a257 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -684,7 +681,7 @@ index a437569..575a257 100755
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
@@ -696,7 +693,7 @@ index a437569..575a257 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -734,7 +731,7 @@ index a437569..575a257 100755
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
++if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
@@ -759,7 +756,7 @@ index a437569..575a257 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7915,6 +8412,8 @@ _LT_EOF
+@@ -8216,6 +8713,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -768,7 +765,7 @@ index a437569..575a257 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -8079,7 +8578,8 @@ fi
+@@ -8380,7 +8879,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -778,7 +775,7 @@ index a437569..575a257 100755
-@@ -8168,7 +8668,7 @@ aix3*)
+@@ -8469,7 +8969,7 @@ aix3*)
esac
# Global variables:
@@ -787,7 +784,7 @@ index a437569..575a257 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8466,8 +8966,6 @@ fi
+@@ -8767,8 +9267,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -796,7 +793,7 @@ index a437569..575a257 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8633,6 +9131,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8934,6 +9432,12 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -809,7 +806,7 @@ index a437569..575a257 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8695,7 +9199,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8996,7 +9500,7 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -818,7 +815,7 @@ index a437569..575a257 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8752,13 +9256,17 @@ case $host_os in
+@@ -9053,13 +9557,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -831,7 +828,7 @@ index a437569..575a257 100755
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
++if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
@@ -842,7 +839,7 @@ index a437569..575a257 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8819,6 +9327,11 @@ fi
+@@ -9120,6 +9628,11 @@ fi
@@ -854,7 +851,7 @@ index a437569..575a257 100755
#
# Check to make sure the static flag actually works.
#
-@@ -9169,7 +9682,8 @@ _LT_EOF
+@@ -9470,7 +9983,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -864,7 +861,7 @@ index a437569..575a257 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9268,12 +9782,12 @@ _LT_EOF
+@@ -9569,12 +10083,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -879,7 +876,7 @@ index a437569..575a257 100755
fi
;;
esac
-@@ -9287,8 +9801,8 @@ _LT_EOF
+@@ -9588,8 +10102,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -890,7 +887,7 @@ index a437569..575a257 100755
fi
;;
-@@ -9306,8 +9820,8 @@ _LT_EOF
+@@ -9607,8 +10121,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -901,7 +898,7 @@ index a437569..575a257 100755
else
ld_shlibs=no
fi
-@@ -9353,8 +9867,8 @@ _LT_EOF
+@@ -9654,8 +10168,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -912,7 +909,7 @@ index a437569..575a257 100755
else
ld_shlibs=no
fi
-@@ -9484,7 +9998,13 @@ _LT_EOF
+@@ -9785,7 +10299,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -920,14 +917,14 @@ index a437569..575a257 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9497,22 +10017,29 @@ main ()
+@@ -9798,22 +10318,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -970,7 +967,7 @@ index a437569..575a257 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9524,7 +10051,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9825,7 +10352,13 @@ if test -z "$aix_libpath"; then aix_libp
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -978,14 +975,14 @@ index a437569..575a257 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9537,22 +10070,29 @@ main ()
+@@ -9838,22 +10371,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -1028,7 +1025,7 @@ index a437569..575a257 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9597,20 +10137,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9898,20 +10438,63 @@ if test -z "$aix_libpath"; then aix_libp
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -1106,7 +1103,7 @@ index a437569..575a257 100755
;;
darwin* | rhapsody*)
-@@ -9671,7 +10254,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9972,7 +10555,7 @@ if test -z "$aix_libpath"; then aix_libp
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -1115,7 +1112,7 @@ index a437569..575a257 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9679,7 +10262,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9980,7 +10563,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux9*)
if test "$GCC" = yes; then
@@ -1124,7 +1121,7 @@ index a437569..575a257 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9695,7 +10278,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9996,7 +10579,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -1133,7 +1130,7 @@ index a437569..575a257 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9719,10 +10302,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10020,10 +10603,10 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -1146,7 +1143,7 @@ index a437569..575a257 100755
;;
esac
else
-@@ -9801,23 +10384,36 @@ fi
+@@ -10102,23 +10685,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -1161,7 +1158,7 @@ index a437569..575a257 100755
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
@@ -1191,7 +1188,7 @@ index a437569..575a257 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9902,7 +10498,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10203,7 +10799,7 @@ rm -f core conftest.err conftest.$ac_obj
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -1200,7 +1197,7 @@ index a437569..575a257 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9921,9 +10517,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10222,9 +10818,9 @@ rm -f core conftest.err conftest.$ac_obj
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -1212,7 +1209,7 @@ index a437569..575a257 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10499,8 +11095,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10800,8 +11396,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -1224,7 +1221,7 @@ index a437569..575a257 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10533,13 +11130,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10834,13 +11431,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -1297,7 +1294,7 @@ index a437569..575a257 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10631,7 +11286,7 @@ haiku*)
+@@ -10932,7 +11587,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -1306,7 +1303,16 @@ index a437569..575a257 100755
hardcode_into_libs=yes
;;
-@@ -11471,10 +12126,10 @@ else
+@@ -11728,7 +12383,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11731 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11772,10 +12427,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -1319,7 +1325,16 @@ index a437569..575a257 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11577,10 +12232,10 @@ else
+@@ -11834,7 +12489,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11837 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11878,10 +12533,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -1332,7 +1347,7 @@ index a437569..575a257 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -14078,7 +14733,7 @@ SHARED_LDFLAGS=
+@@ -14554,7 +15209,7 @@ SHARED_LDFLAGS=
if test "$enable_shared" = "yes"; then
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
if test -n "$x"; then
@@ -1340,8 +1355,8 @@ index a437569..575a257 100755
+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a"
fi
- # More hacks to build DLLs on Windows.
-@@ -16789,13 +17444,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+ case "${host}" in
+@@ -17177,13 +17832,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -1362,7 +1377,7 @@ index a437569..575a257 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -16810,14 +17472,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -17198,14 +17860,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -1381,7 +1396,7 @@ index a437569..575a257 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -16850,12 +17515,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -17238,12 +17903,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -1395,7 +1410,7 @@ index a437569..575a257 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -16910,8 +17575,13 @@ reload_flag \
+@@ -17298,8 +17963,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -1409,7 +1424,7 @@ index a437569..575a257 100755
STRIP \
RANLIB \
CC \
-@@ -16921,12 +17591,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -17309,12 +17979,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -1425,7 +1440,7 @@ index a437569..575a257 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -16942,7 +17614,6 @@ no_undefined_flag \
+@@ -17330,7 +18002,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -1433,7 +1448,7 @@ index a437569..575a257 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -16978,6 +17649,7 @@ module_cmds \
+@@ -17366,6 +18037,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -1441,7 +1456,7 @@ index a437569..575a257 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -17757,7 +18429,8 @@ $as_echo X"$file" |
+@@ -18154,7 +18826,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -1451,7 +1466,7 @@ index a437569..575a257 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -17860,19 +18533,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -18257,19 +18930,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -1495,7 +1510,7 @@ index a437569..575a257 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -17902,6 +18598,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -18299,6 +18995,12 @@ global_symbol_to_c_name_address=$lt_lt_c
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -1508,7 +1523,7 @@ index a437569..575a257 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -17911,6 +18613,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -18308,6 +19010,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -1518,7 +1533,7 @@ index a437569..575a257 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -18025,12 +18730,12 @@ with_gcc=$GCC
+@@ -18422,12 +19127,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -1534,7 +1549,7 @@ index a437569..575a257 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -18117,9 +18822,6 @@ inherit_rpath=$inherit_rpath
+@@ -18514,9 +19219,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -1544,7 +1559,7 @@ index a437569..575a257 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -18135,6 +18837,9 @@ include_expsyms=$lt_include_expsyms
+@@ -18532,6 +19234,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -1554,7 +1569,7 @@ index a437569..575a257 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -18167,210 +18872,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -18564,210 +19269,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -1756,15 +1771,9 @@ index a437569..575a257 100755
-_LT_EOF
- ;;
- esac
--
--
-- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-- || (rm -f "$cfgfile"; exit 1)
--
-- mv -f "$cfgfile" "$ofile" ||
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
-+
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
@@ -1922,17 +1931,18 @@ index a437569..575a257 100755
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
-+
-+
+
+- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+- || (rm -f "$cfgfile"; exit 1)
+
+- mv -f "$cfgfile" "$ofile" ||
+ mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-diff --git a/bfd/configure.ac b/bfd/configure.ac
-index 669cff7..5f57877 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
-@@ -253,7 +253,7 @@ changequote(,)dnl
+@@ -290,7 +290,7 @@ changequote(,)dnl
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
changequote([,])dnl
if test -n "$x"; then
@@ -1940,12 +1950,10 @@ index 669cff7..5f57877 100644
+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a"
fi
- # More hacks to build DLLs on Windows.
-diff --git a/binutils/configure b/binutils/configure
-index 6cbf17c..6d20600 100755
+ case "${host}" in
--- a/binutils/configure
+++ b/binutils/configure
-@@ -658,8 +658,11 @@ OTOOL
+@@ -689,8 +689,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -1957,7 +1965,7 @@ index 6cbf17c..6d20600 100755
OBJDUMP
LN_S
NM
-@@ -771,6 +774,7 @@ enable_static
+@@ -807,6 +810,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -1965,7 +1973,7 @@ index 6cbf17c..6d20600 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1443,6 +1447,8 @@ Optional Packages:
+@@ -1483,6 +1487,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -1974,7 +1982,7 @@ index 6cbf17c..6d20600 100755
--with-system-zlib use installed libz
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
-@@ -5159,8 +5165,8 @@ esac
+@@ -5457,8 +5463,8 @@ esac
@@ -1985,7 +1993,7 @@ index 6cbf17c..6d20600 100755
-@@ -5200,7 +5206,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5498,7 +5504,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -1994,7 +2002,7 @@ index 6cbf17c..6d20600 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5886,8 +5892,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6184,8 +6190,8 @@ $as_echo_n "checking whether the shell u
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -2005,13 +2013,13 @@ index 6cbf17c..6d20600 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -5936,6 +5942,80 @@ esac
+@@ -6234,6 +6240,80 @@ esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
++if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
@@ -2058,7 +2066,7 @@ index 6cbf17c..6d20600 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
++if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
@@ -2085,8 +2093,8 @@ index 6cbf17c..6d20600 100755
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
- if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5952,6 +6032,11 @@ case $reload_flag in
+ if ${lt_cv_ld_reload_flag+:} false; then :
+@@ -6250,6 +6330,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -2098,7 +2106,7 @@ index 6cbf17c..6d20600 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6120,7 +6205,8 @@ mingw* | pw32*)
+@@ -6418,7 +6503,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -2108,7 +2116,7 @@ index 6cbf17c..6d20600 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6274,6 +6360,21 @@ esac
+@@ -6572,6 +6658,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -2130,7 +2138,7 @@ index 6cbf17c..6d20600 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6289,9 +6390,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6587,9 +6688,162 @@ test -z "$deplibs_check_method" && depli
@@ -2149,7 +2157,7 @@ index 6cbf17c..6d20600 100755
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
@@ -2161,7 +2169,7 @@ index 6cbf17c..6d20600 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -2189,7 +2197,7 @@ index 6cbf17c..6d20600 100755
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
@@ -2201,7 +2209,7 @@ index 6cbf17c..6d20600 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -2249,7 +2257,7 @@ index 6cbf17c..6d20600 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
@@ -2294,17 +2302,17 @@ index 6cbf17c..6d20600 100755
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6307,7 +6561,7 @@ do
+ if ${ac_cv_prog_AR+:} false; then :
+@@ -6605,7 +6859,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6327,11 +6581,15 @@ $as_echo "no" >&6; }
+@@ -6625,11 +6879,15 @@ $as_echo "no" >&6; }
fi
@@ -2322,17 +2330,17 @@ index 6cbf17c..6d20600 100755
+set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6347,7 +6605,7 @@ do
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
+@@ -6645,7 +6903,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
+ ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6366,6 +6624,10 @@ else
+@@ -6664,6 +6922,10 @@ else
$as_echo "no" >&6; }
fi
@@ -2343,7 +2351,7 @@ index 6cbf17c..6d20600 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6377,12 +6639,10 @@ ac_tool_warned=yes ;;
+@@ -6675,12 +6937,10 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -2358,13 +2366,13 @@ index 6cbf17c..6d20600 100755
-@@ -6394,6 +6654,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6692,6 +6952,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
-+if test "${lt_cv_ar_at_file+set}" = set; then :
++if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
@@ -2423,7 +2431,7 @@ index 6cbf17c..6d20600 100755
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-@@ -6728,8 +7046,8 @@ esac
+@@ -7026,8 +7344,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -2434,7 +2442,7 @@ index 6cbf17c..6d20600 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6765,6 +7083,7 @@ for ac_symprfx in "" "_"; do
+@@ -7063,6 +7381,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -2442,7 +2450,7 @@ index 6cbf17c..6d20600 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -6806,6 +7125,18 @@ _LT_EOF
+@@ -7104,6 +7423,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -2461,7 +2469,7 @@ index 6cbf17c..6d20600 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -6817,7 +7148,7 @@ _LT_EOF
+@@ -7115,7 +7446,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -2470,7 +2478,7 @@ index 6cbf17c..6d20600 100755
const char *name;
void *address;
}
-@@ -6843,8 +7174,8 @@ static const void *lt_preloaded_setup() {
+@@ -7141,8 +7472,8 @@ static const void *lt_preloaded_setup()
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -2481,7 +2489,7 @@ index 6cbf17c..6d20600 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6854,8 +7185,8 @@ _LT_EOF
+@@ -7152,8 +7483,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -2492,7 +2500,7 @@ index 6cbf17c..6d20600 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -6892,6 +7223,21 @@ else
+@@ -7190,6 +7521,18 @@ else
$as_echo "ok" >&6; }
fi
@@ -2508,13 +2516,10 @@ index 6cbf17c..6d20600 100755
+
+
+
-+
-+
-+
-@@ -6910,6 +7256,40 @@ fi
+@@ -7211,6 +7554,43 @@ fi
@@ -2544,7 +2549,7 @@ index 6cbf17c..6d20600 100755
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
+$as_echo "${with_libtool_sysroot}" >&6; }
-+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
@@ -2552,10 +2557,13 @@ index 6cbf17c..6d20600 100755
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
-
-
-
-@@ -7119,6 +7499,123 @@ esac
++
++
++
+ # Check whether --enable-libtool-lock was given.
+ if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+@@ -7417,6 +7797,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -2564,7 +2572,7 @@ index 6cbf17c..6d20600 100755
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
@@ -2576,7 +2584,7 @@ index 6cbf17c..6d20600 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -2604,7 +2612,7 @@ index 6cbf17c..6d20600 100755
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
@@ -2616,7 +2624,7 @@ index 6cbf17c..6d20600 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -2654,7 +2662,7 @@ index 6cbf17c..6d20600 100755
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
++if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
@@ -2679,7 +2687,7 @@ index 6cbf17c..6d20600 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7682,6 +8179,8 @@ _LT_EOF
+@@ -7980,6 +8477,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -2688,7 +2696,7 @@ index 6cbf17c..6d20600 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7877,7 +8376,8 @@ fi
+@@ -8175,7 +8674,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -2698,7 +2706,7 @@ index 6cbf17c..6d20600 100755
-@@ -7966,7 +8466,7 @@ aix3*)
+@@ -8264,7 +8764,7 @@ aix3*)
esac
# Global variables:
@@ -2707,7 +2715,7 @@ index 6cbf17c..6d20600 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8264,8 +8764,6 @@ fi
+@@ -8562,8 +9062,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -2716,7 +2724,7 @@ index 6cbf17c..6d20600 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8431,6 +8929,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8729,6 +9227,12 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -2729,7 +2737,7 @@ index 6cbf17c..6d20600 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8493,7 +8997,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8791,7 +9295,7 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -2738,7 +2746,7 @@ index 6cbf17c..6d20600 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8550,13 +9054,17 @@ case $host_os in
+@@ -8848,13 +9352,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -2751,7 +2759,7 @@ index 6cbf17c..6d20600 100755
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
++if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
@@ -2762,7 +2770,7 @@ index 6cbf17c..6d20600 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8617,6 +9125,11 @@ fi
+@@ -8915,6 +9423,11 @@ fi
@@ -2774,7 +2782,7 @@ index 6cbf17c..6d20600 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8967,7 +9480,8 @@ _LT_EOF
+@@ -9265,7 +9778,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -2784,7 +2792,7 @@ index 6cbf17c..6d20600 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9066,12 +9580,12 @@ _LT_EOF
+@@ -9364,12 +9878,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -2799,7 +2807,7 @@ index 6cbf17c..6d20600 100755
fi
;;
esac
-@@ -9085,8 +9599,8 @@ _LT_EOF
+@@ -9383,8 +9897,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -2810,7 +2818,7 @@ index 6cbf17c..6d20600 100755
fi
;;
-@@ -9104,8 +9618,8 @@ _LT_EOF
+@@ -9402,8 +9916,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -2821,7 +2829,7 @@ index 6cbf17c..6d20600 100755
else
ld_shlibs=no
fi
-@@ -9151,8 +9665,8 @@ _LT_EOF
+@@ -9449,8 +9963,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -2832,7 +2840,7 @@ index 6cbf17c..6d20600 100755
else
ld_shlibs=no
fi
-@@ -9282,7 +9796,13 @@ _LT_EOF
+@@ -9580,7 +10094,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -2840,14 +2848,14 @@ index 6cbf17c..6d20600 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9295,22 +9815,29 @@ main ()
+@@ -9593,22 +10113,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -2890,7 +2898,7 @@ index 6cbf17c..6d20600 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9322,7 +9849,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9620,7 +10147,13 @@ if test -z "$aix_libpath"; then aix_libp
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -2898,14 +2906,14 @@ index 6cbf17c..6d20600 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9335,22 +9868,29 @@ main ()
+@@ -9633,22 +10166,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -2948,7 +2956,7 @@ index 6cbf17c..6d20600 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9395,20 +9935,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9693,20 +10233,63 @@ if test -z "$aix_libpath"; then aix_libp
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -3026,7 +3034,7 @@ index 6cbf17c..6d20600 100755
;;
darwin* | rhapsody*)
-@@ -9469,7 +10052,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9767,7 +10350,7 @@ if test -z "$aix_libpath"; then aix_libp
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -3035,7 +3043,7 @@ index 6cbf17c..6d20600 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9477,7 +10060,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9775,7 +10358,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux9*)
if test "$GCC" = yes; then
@@ -3044,7 +3052,7 @@ index 6cbf17c..6d20600 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9493,7 +10076,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9791,7 +10374,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -3053,7 +3061,7 @@ index 6cbf17c..6d20600 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9517,10 +10100,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9815,10 +10398,10 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -3066,7 +3074,7 @@ index 6cbf17c..6d20600 100755
;;
esac
else
-@@ -9599,23 +10182,36 @@ fi
+@@ -9897,23 +10480,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -3081,7 +3089,7 @@ index 6cbf17c..6d20600 100755
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
@@ -3111,7 +3119,7 @@ index 6cbf17c..6d20600 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9700,7 +10296,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9998,7 +10594,7 @@ rm -f core conftest.err conftest.$ac_obj
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -3120,7 +3128,7 @@ index 6cbf17c..6d20600 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9719,9 +10315,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10017,9 +10613,9 @@ rm -f core conftest.err conftest.$ac_obj
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -3132,7 +3140,7 @@ index 6cbf17c..6d20600 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10297,8 +10893,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10595,8 +11191,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -3144,7 +3152,7 @@ index 6cbf17c..6d20600 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10331,13 +10928,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10629,13 +11226,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -3217,7 +3225,7 @@ index 6cbf17c..6d20600 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10429,7 +11084,7 @@ haiku*)
+@@ -10727,7 +11382,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -3226,7 +3234,16 @@ index 6cbf17c..6d20600 100755
hardcode_into_libs=yes
;;
-@@ -11269,10 +11924,10 @@ else
+@@ -11523,7 +12178,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11526 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11567,10 +12222,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -3239,7 +3256,16 @@ index 6cbf17c..6d20600 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11375,10 +12030,10 @@ else
+@@ -11629,7 +12284,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11632 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11673,10 +12328,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -3252,7 +3278,7 @@ index 6cbf17c..6d20600 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15392,13 +16047,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15936,13 +16591,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -3273,7 +3299,7 @@ index 6cbf17c..6d20600 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15413,14 +16075,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15957,14 +16619,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -3292,7 +3318,7 @@ index 6cbf17c..6d20600 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15453,12 +16118,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15997,12 +16662,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -3306,7 +3332,7 @@ index 6cbf17c..6d20600 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15513,8 +16178,13 @@ reload_flag \
+@@ -16057,8 +16722,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -3320,7 +3346,7 @@ index 6cbf17c..6d20600 100755
STRIP \
RANLIB \
CC \
-@@ -15524,12 +16194,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -16068,12 +16738,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -3336,7 +3362,7 @@ index 6cbf17c..6d20600 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -15545,7 +16217,6 @@ no_undefined_flag \
+@@ -16089,7 +16761,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -3344,7 +3370,7 @@ index 6cbf17c..6d20600 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -15581,6 +16252,7 @@ module_cmds \
+@@ -16125,6 +16796,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -3352,7 +3378,7 @@ index 6cbf17c..6d20600 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -16338,7 +17010,8 @@ $as_echo X"$file" |
+@@ -16891,7 +17563,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -3362,7 +3388,7 @@ index 6cbf17c..6d20600 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -16441,19 +17114,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16994,19 +17667,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -3406,7 +3432,7 @@ index 6cbf17c..6d20600 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -16483,6 +17179,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -17036,6 +17732,12 @@ global_symbol_to_c_name_address=$lt_lt_c
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -3419,7 +3445,7 @@ index 6cbf17c..6d20600 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -16492,6 +17194,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -17045,6 +17747,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -3429,7 +3455,7 @@ index 6cbf17c..6d20600 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -16606,12 +17311,12 @@ with_gcc=$GCC
+@@ -17159,12 +17864,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -3445,7 +3471,7 @@ index 6cbf17c..6d20600 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -16698,9 +17403,6 @@ inherit_rpath=$inherit_rpath
+@@ -17251,9 +17956,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -3455,7 +3481,7 @@ index 6cbf17c..6d20600 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -16716,6 +17418,9 @@ include_expsyms=$lt_include_expsyms
+@@ -17269,6 +17971,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -3465,7 +3491,7 @@ index 6cbf17c..6d20600 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -16748,210 +17453,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -17301,210 +18006,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -3667,15 +3693,9 @@ index 6cbf17c..6d20600 100755
-_LT_EOF
- ;;
- esac
--
--
-- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-- || (rm -f "$cfgfile"; exit 1)
--
-- mv -f "$cfgfile" "$ofile" ||
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
-+
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
@@ -3833,39 +3853,18 @@ index 6cbf17c..6d20600 100755
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
-+
-+
+
+- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+- || (rm -f "$cfgfile"; exit 1)
+
+- mv -f "$cfgfile" "$ofile" ||
+ mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-diff --git a/configure b/configure
-index 2a74a77..ad3dfb7 100755
---- a/configure
-+++ b/configure
-@@ -3444,7 +3444,7 @@ case "${target}" in
- ;;
- s390-*-* | s390x-*-*)
- ;;
-- sh*-*-* | sh[34]*-*-*)
-+ sh-*-* | sh[34]*-*-*)
- ;;
- sh64-*-* | sh5*-*-*)
- ;;
-@@ -3946,7 +3946,7 @@ case "${target}" in
- or1k*-*-*)
- noconfigdirs="$noconfigdirs gdb"
- ;;
-- sh*-*-* | sh64-*-*)
-+ sh-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
-diff --git a/gas/configure b/gas/configure
-index f7753b8..45da030 100755
--- a/gas/configure
+++ b/gas/configure
-@@ -648,8 +648,11 @@ OTOOL
+@@ -681,8 +681,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -3877,7 +3876,7 @@ index f7753b8..45da030 100755
OBJDUMP
LN_S
NM
-@@ -761,6 +764,7 @@ enable_static
+@@ -799,6 +802,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -3885,7 +3884,16 @@ index f7753b8..45da030 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -4919,8 +4923,8 @@ esac
+@@ -1490,6 +1494,8 @@ Optional Packages:
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR
++ (or the compiler's sysroot if not specified).
+ --with-cpu=CPU default cpu variant is CPU (currently only supported
+ on ARC)
+ --with-system-zlib use installed libz
+@@ -5277,8 +5283,8 @@ esac
@@ -3896,7 +3904,7 @@ index f7753b8..45da030 100755
-@@ -4960,7 +4964,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5318,7 +5324,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -3905,7 +3913,7 @@ index f7753b8..45da030 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5646,8 +5650,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6004,8 +6010,8 @@ $as_echo_n "checking whether the shell u
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -3916,13 +3924,13 @@ index f7753b8..45da030 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -5696,6 +5700,80 @@ esac
+@@ -6054,6 +6060,80 @@ esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
++if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
@@ -3969,7 +3977,7 @@ index f7753b8..45da030 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
++if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
@@ -3996,8 +4004,8 @@ index f7753b8..45da030 100755
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
- if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5712,6 +5790,11 @@ case $reload_flag in
+ if ${lt_cv_ld_reload_flag+:} false; then :
+@@ -6070,6 +6150,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -4009,7 +4017,7 @@ index f7753b8..45da030 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -5880,7 +5963,8 @@ mingw* | pw32*)
+@@ -6238,7 +6323,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -4019,7 +4027,7 @@ index f7753b8..45da030 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6034,6 +6118,21 @@ esac
+@@ -6392,6 +6478,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -4041,7 +4049,7 @@ index f7753b8..45da030 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6049,9 +6148,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6407,9 +6508,162 @@ test -z "$deplibs_check_method" && depli
@@ -4055,12 +4063,14 @@ index f7753b8..45da030 100755
+
+
+
-+if test -n "$ac_tool_prefix"; then
+ if test -n "$ac_tool_prefix"; then
+- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}ar; ac_word=$2
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
@@ -4072,7 +4082,7 @@ index f7753b8..45da030 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -4100,7 +4110,7 @@ index f7753b8..45da030 100755
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
@@ -4112,7 +4122,7 @@ index f7753b8..45da030 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -4160,7 +4170,7 @@ index f7753b8..45da030 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
@@ -4196,26 +4206,24 @@ index f7753b8..45da030 100755
+
+
+
- if test -n "$ac_tool_prefix"; then
-- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
--set dummy ${ac_tool_prefix}ar; ac_word=$2
++if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6067,7 +6319,7 @@ do
+ if ${ac_cv_prog_AR+:} false; then :
+@@ -6425,7 +6679,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6087,11 +6339,15 @@ $as_echo "no" >&6; }
+@@ -6445,11 +6699,15 @@ $as_echo "no" >&6; }
fi
@@ -4233,17 +4241,17 @@ index f7753b8..45da030 100755
+set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6107,7 +6363,7 @@ do
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
+@@ -6465,7 +6723,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
+ ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6126,6 +6382,10 @@ else
+@@ -6484,6 +6742,10 @@ else
$as_echo "no" >&6; }
fi
@@ -4254,7 +4262,7 @@ index f7753b8..45da030 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6137,12 +6397,10 @@ ac_tool_warned=yes ;;
+@@ -6495,12 +6757,10 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -4269,13 +4277,13 @@ index f7753b8..45da030 100755
-@@ -6154,6 +6412,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6512,6 +6772,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
-+if test "${lt_cv_ar_at_file+set}" = set; then :
++if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
@@ -4334,7 +4342,7 @@ index f7753b8..45da030 100755
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-@@ -6488,8 +6804,8 @@ esac
+@@ -6846,8 +7164,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -4345,7 +4353,7 @@ index f7753b8..45da030 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6525,6 +6841,7 @@ for ac_symprfx in "" "_"; do
+@@ -6883,6 +7201,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -4353,7 +4361,7 @@ index f7753b8..45da030 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -6566,6 +6883,18 @@ _LT_EOF
+@@ -6924,6 +7243,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -4372,7 +4380,7 @@ index f7753b8..45da030 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -6577,7 +6906,7 @@ _LT_EOF
+@@ -6935,7 +7266,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -4381,7 +4389,7 @@ index f7753b8..45da030 100755
const char *name;
void *address;
}
-@@ -6603,8 +6932,8 @@ static const void *lt_preloaded_setup() {
+@@ -6961,8 +7292,8 @@ static const void *lt_preloaded_setup()
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -4392,7 +4400,7 @@ index f7753b8..45da030 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6614,8 +6943,8 @@ _LT_EOF
+@@ -6972,8 +7303,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -4403,7 +4411,7 @@ index f7753b8..45da030 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -6652,6 +6981,21 @@ else
+@@ -7010,6 +7341,19 @@ else
$as_echo "ok" >&6; }
fi
@@ -4420,12 +4428,10 @@ index f7753b8..45da030 100755
+
+
+
-+
-+
-@@ -6670,6 +7014,40 @@ fi
+@@ -7030,6 +7374,42 @@ fi
@@ -4455,7 +4461,7 @@ index f7753b8..45da030 100755
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
+$as_echo "${with_libtool_sysroot}" >&6; }
-+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
@@ -4463,10 +4469,12 @@ index f7753b8..45da030 100755
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
++
++
-
-
-@@ -6879,6 +7257,123 @@ esac
+ # Check whether --enable-libtool-lock was given.
+ if test "${enable_libtool_lock+set}" = set; then :
+@@ -7237,6 +7617,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -4475,7 +4483,7 @@ index f7753b8..45da030 100755
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
@@ -4487,7 +4495,7 @@ index f7753b8..45da030 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -4515,7 +4523,7 @@ index f7753b8..45da030 100755
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
@@ -4527,7 +4535,7 @@ index f7753b8..45da030 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -4565,7 +4573,7 @@ index f7753b8..45da030 100755
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
++if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
@@ -4590,7 +4598,7 @@ index f7753b8..45da030 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7442,6 +7937,8 @@ _LT_EOF
+@@ -7800,6 +8297,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -4599,7 +4607,7 @@ index f7753b8..45da030 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7637,7 +8134,8 @@ fi
+@@ -7995,7 +8494,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -4609,7 +4617,7 @@ index f7753b8..45da030 100755
-@@ -7726,7 +8224,7 @@ aix3*)
+@@ -8084,7 +8584,7 @@ aix3*)
esac
# Global variables:
@@ -4618,7 +4626,7 @@ index f7753b8..45da030 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8024,8 +8522,6 @@ fi
+@@ -8382,8 +8882,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -4627,7 +4635,7 @@ index f7753b8..45da030 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8191,6 +8687,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8549,6 +9047,12 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -4640,7 +4648,7 @@ index f7753b8..45da030 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8253,7 +8755,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8611,7 +9115,7 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -4649,7 +4657,7 @@ index f7753b8..45da030 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8310,13 +8812,17 @@ case $host_os in
+@@ -8668,13 +9172,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -4662,7 +4670,7 @@ index f7753b8..45da030 100755
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
++if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
@@ -4673,7 +4681,7 @@ index f7753b8..45da030 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8377,6 +8883,11 @@ fi
+@@ -8735,6 +9243,11 @@ fi
@@ -4685,7 +4693,7 @@ index f7753b8..45da030 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8727,7 +9238,8 @@ _LT_EOF
+@@ -9085,7 +9598,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -4695,7 +4703,7 @@ index f7753b8..45da030 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8826,12 +9338,12 @@ _LT_EOF
+@@ -9184,12 +9698,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -4710,7 +4718,7 @@ index f7753b8..45da030 100755
fi
;;
esac
-@@ -8845,8 +9357,8 @@ _LT_EOF
+@@ -9203,8 +9717,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -4721,7 +4729,7 @@ index f7753b8..45da030 100755
fi
;;
-@@ -8864,8 +9376,8 @@ _LT_EOF
+@@ -9222,8 +9736,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -4732,7 +4740,7 @@ index f7753b8..45da030 100755
else
ld_shlibs=no
fi
-@@ -8911,8 +9423,8 @@ _LT_EOF
+@@ -9269,8 +9783,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -4743,7 +4751,7 @@ index f7753b8..45da030 100755
else
ld_shlibs=no
fi
-@@ -9042,7 +9554,13 @@ _LT_EOF
+@@ -9400,7 +9914,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -4751,14 +4759,14 @@ index f7753b8..45da030 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9055,22 +9573,29 @@ main ()
+@@ -9413,22 +9933,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -4801,7 +4809,7 @@ index f7753b8..45da030 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9082,7 +9607,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9440,7 +9967,13 @@ if test -z "$aix_libpath"; then aix_libp
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -4809,14 +4817,14 @@ index f7753b8..45da030 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9095,22 +9626,29 @@ main ()
+@@ -9453,22 +9986,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -4859,7 +4867,7 @@ index f7753b8..45da030 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9155,20 +9693,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9513,20 +10053,63 @@ if test -z "$aix_libpath"; then aix_libp
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -4937,7 +4945,7 @@ index f7753b8..45da030 100755
;;
darwin* | rhapsody*)
-@@ -9229,7 +9810,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9587,7 +10170,7 @@ if test -z "$aix_libpath"; then aix_libp
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -4946,7 +4954,7 @@ index f7753b8..45da030 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9237,7 +9818,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9595,7 +10178,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux9*)
if test "$GCC" = yes; then
@@ -4955,7 +4963,7 @@ index f7753b8..45da030 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9253,7 +9834,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9611,7 +10194,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -4964,7 +4972,7 @@ index f7753b8..45da030 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9277,10 +9858,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9635,10 +10218,10 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -4977,7 +4985,7 @@ index f7753b8..45da030 100755
;;
esac
else
-@@ -9359,23 +9940,36 @@ fi
+@@ -9717,23 +10300,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -4992,7 +5000,7 @@ index f7753b8..45da030 100755
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
@@ -5022,7 +5030,7 @@ index f7753b8..45da030 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9460,7 +10054,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9818,7 +10414,7 @@ rm -f core conftest.err conftest.$ac_obj
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -5031,7 +5039,7 @@ index f7753b8..45da030 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9479,9 +10073,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9837,9 +10433,9 @@ rm -f core conftest.err conftest.$ac_obj
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -5043,7 +5051,7 @@ index f7753b8..45da030 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10057,8 +10651,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10415,8 +11011,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -5055,7 +5063,7 @@ index f7753b8..45da030 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10091,13 +10686,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10449,13 +11046,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -5128,7 +5136,7 @@ index f7753b8..45da030 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10189,7 +10842,7 @@ haiku*)
+@@ -10547,7 +11202,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -5137,7 +5145,16 @@ index f7753b8..45da030 100755
hardcode_into_libs=yes
;;
-@@ -11029,10 +11682,10 @@ else
+@@ -11343,7 +11998,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11346 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11387,10 +12042,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -5150,7 +5167,16 @@ index f7753b8..45da030 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11135,10 +11788,10 @@ else
+@@ -11449,7 +12104,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11452 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11493,10 +12148,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -5163,7 +5189,7 @@ index f7753b8..45da030 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15350,13 +16003,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15928,13 +16583,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -5184,7 +5210,7 @@ index f7753b8..45da030 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15371,14 +16031,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15949,14 +16611,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -5203,7 +5229,7 @@ index f7753b8..45da030 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15411,12 +16074,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15989,12 +16654,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -5217,7 +5243,7 @@ index f7753b8..45da030 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15471,8 +16134,13 @@ reload_flag \
+@@ -16049,8 +16714,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -5231,7 +5257,7 @@ index f7753b8..45da030 100755
STRIP \
RANLIB \
CC \
-@@ -15482,12 +16150,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -16060,12 +16730,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -5247,7 +5273,7 @@ index f7753b8..45da030 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -15503,7 +16173,6 @@ no_undefined_flag \
+@@ -16081,7 +16753,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -5255,7 +5281,7 @@ index f7753b8..45da030 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -15539,6 +16208,7 @@ module_cmds \
+@@ -16117,6 +16788,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -5263,7 +5289,7 @@ index f7753b8..45da030 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -16303,7 +16973,8 @@ $as_echo X"$file" |
+@@ -16890,7 +17562,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -5273,7 +5299,7 @@ index f7753b8..45da030 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -16406,19 +17077,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16993,19 +17666,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -5317,7 +5343,7 @@ index f7753b8..45da030 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -16448,6 +17142,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -17035,6 +17731,12 @@ global_symbol_to_c_name_address=$lt_lt_c
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -5330,7 +5356,7 @@ index f7753b8..45da030 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -16457,6 +17157,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -17044,6 +17746,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -5340,7 +5366,7 @@ index f7753b8..45da030 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -16571,12 +17274,12 @@ with_gcc=$GCC
+@@ -17158,12 +17863,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -5356,7 +5382,7 @@ index f7753b8..45da030 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -16663,9 +17366,6 @@ inherit_rpath=$inherit_rpath
+@@ -17250,9 +17955,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -5366,7 +5392,7 @@ index f7753b8..45da030 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -16681,6 +17381,9 @@ include_expsyms=$lt_include_expsyms
+@@ -17268,6 +17970,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -5376,7 +5402,7 @@ index f7753b8..45da030 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -16713,210 +17416,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -17300,210 +18005,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -5578,15 +5604,9 @@ index f7753b8..45da030 100755
-_LT_EOF
- ;;
- esac
--
--
-- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-- || (rm -f "$cfgfile"; exit 1)
--
-- mv -f "$cfgfile" "$ofile" ||
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
-+
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
@@ -5744,17 +5764,18 @@ index f7753b8..45da030 100755
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
-+
-+
+
+- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+- || (rm -f "$cfgfile"; exit 1)
+
+- mv -f "$cfgfile" "$ofile" ||
+ mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-diff --git a/gprof/configure b/gprof/configure
-index 626e1c7..a88719c 100755
--- a/gprof/configure
+++ b/gprof/configure
-@@ -630,8 +630,11 @@ OTOOL
+@@ -662,8 +662,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -5766,7 +5787,7 @@ index 626e1c7..a88719c 100755
OBJDUMP
LN_S
NM
-@@ -743,6 +746,7 @@ enable_static
+@@ -780,6 +783,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -5774,7 +5795,7 @@ index 626e1c7..a88719c 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1401,6 +1405,8 @@ Optional Packages:
+@@ -1442,6 +1446,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -5783,7 +5804,7 @@ index 626e1c7..a88719c 100755
Some influential environment variables:
CC C compiler command
-@@ -4835,8 +4841,8 @@ esac
+@@ -5124,8 +5130,8 @@ esac
@@ -5794,7 +5815,7 @@ index 626e1c7..a88719c 100755
-@@ -4876,7 +4882,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5165,7 +5171,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -5803,7 +5824,7 @@ index 626e1c7..a88719c 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5562,8 +5568,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -5851,8 +5857,8 @@ $as_echo_n "checking whether the shell u
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -5814,7 +5835,7 @@ index 626e1c7..a88719c 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -5612,6 +5618,80 @@ esac
+@@ -5901,6 +5907,80 @@ esac
@@ -5894,8 +5915,8 @@ index 626e1c7..a88719c 100755
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
- if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5628,6 +5708,11 @@ case $reload_flag in
+ if ${lt_cv_ld_reload_flag+:} false; then :
+@@ -5917,6 +5997,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -5907,7 +5928,7 @@ index 626e1c7..a88719c 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -5796,7 +5881,8 @@ mingw* | pw32*)
+@@ -6085,7 +6170,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -5917,7 +5938,7 @@ index 626e1c7..a88719c 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -5873,11 +5959,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+@@ -6162,11 +6248,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5929,7 +5950,7 @@ index 626e1c7..a88719c 100755
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-@@ -5955,6 +6036,21 @@ esac
+@@ -6244,6 +6325,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -5951,7 +5972,7 @@ index 626e1c7..a88719c 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -5970,9 +6066,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6259,9 +6355,162 @@ test -z "$deplibs_check_method" && depli
@@ -5965,7 +5986,9 @@ index 626e1c7..a88719c 100755
+
+
+
-+if test -n "$ac_tool_prefix"; then
+ if test -n "$ac_tool_prefix"; then
+- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}ar; ac_word=$2
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -6106,26 +6129,26 @@ index 626e1c7..a88719c 100755
+
+
+
- if test -n "$ac_tool_prefix"; then
-- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
--set dummy ${ac_tool_prefix}ar; ac_word=$2
++if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -5988,7 +6237,7 @@ do
+ if ${ac_cv_prog_AR+:} false; then :
+@@ -6276,8 +6525,8 @@ do
+ IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6008,11 +6257,15 @@ $as_echo "no" >&6; }
+@@ -6297,11 +6546,15 @@ $as_echo "no" >&6; }
fi
@@ -6143,17 +6166,8 @@ index 626e1c7..a88719c 100755
+set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6028,7 +6281,7 @@ do
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-- ac_cv_prog_ac_ct_AR="ar"
-+ ac_cv_prog_ac_ct_AR="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-@@ -6047,6 +6300,10 @@ else
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
+@@ -6336,6 +6589,10 @@ else
$as_echo "no" >&6; }
fi
@@ -6164,7 +6178,7 @@ index 626e1c7..a88719c 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6058,12 +6315,10 @@ ac_tool_warned=yes ;;
+@@ -6347,12 +6604,10 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -6179,7 +6193,7 @@ index 626e1c7..a88719c 100755
-@@ -6075,6 +6330,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6364,6 +6619,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -6244,7 +6258,7 @@ index 626e1c7..a88719c 100755
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-@@ -6409,8 +6722,8 @@ esac
+@@ -6698,8 +7011,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -6255,7 +6269,7 @@ index 626e1c7..a88719c 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6446,6 +6759,7 @@ for ac_symprfx in "" "_"; do
+@@ -6735,6 +7048,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -6263,7 +6277,7 @@ index 626e1c7..a88719c 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -6487,6 +6801,18 @@ _LT_EOF
+@@ -6776,6 +7090,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -6282,7 +6296,7 @@ index 626e1c7..a88719c 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -6498,7 +6824,7 @@ _LT_EOF
+@@ -6787,7 +7113,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -6291,7 +6305,7 @@ index 626e1c7..a88719c 100755
const char *name;
void *address;
}
-@@ -6524,8 +6850,8 @@ static const void *lt_preloaded_setup() {
+@@ -6813,8 +7139,8 @@ static const void *lt_preloaded_setup()
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -6302,7 +6316,7 @@ index 626e1c7..a88719c 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6535,8 +6861,8 @@ _LT_EOF
+@@ -6824,8 +7150,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -6313,7 +6327,7 @@ index 626e1c7..a88719c 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -6573,6 +6899,18 @@ else
+@@ -6862,6 +7188,17 @@ else
$as_echo "ok" >&6; }
fi
@@ -6328,14 +6342,14 @@ index 626e1c7..a88719c 100755
+
+
+
-+
-@@ -6594,6 +6932,43 @@ fi
+@@ -6883,6 +7220,44 @@ fi
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -6376,7 +6390,7 @@ index 626e1c7..a88719c 100755
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
-@@ -6800,6 +7175,123 @@ esac
+@@ -7089,6 +7464,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -6500,7 +6514,7 @@ index 626e1c7..a88719c 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7363,6 +7855,8 @@ _LT_EOF
+@@ -7652,6 +8144,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -6509,7 +6523,7 @@ index 626e1c7..a88719c 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7558,7 +8052,8 @@ fi
+@@ -7847,7 +8341,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -6519,7 +6533,7 @@ index 626e1c7..a88719c 100755
-@@ -7647,7 +8142,7 @@ aix3*)
+@@ -7936,7 +8431,7 @@ aix3*)
esac
# Global variables:
@@ -6528,7 +6542,7 @@ index 626e1c7..a88719c 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -7945,8 +8440,6 @@ fi
+@@ -8234,8 +8729,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -6537,7 +6551,7 @@ index 626e1c7..a88719c 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8112,6 +8605,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8401,6 +8894,12 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -6550,7 +6564,7 @@ index 626e1c7..a88719c 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8174,7 +8673,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8463,7 +8962,7 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -6559,7 +6573,7 @@ index 626e1c7..a88719c 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8231,13 +8730,17 @@ case $host_os in
+@@ -8520,13 +9019,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -6583,7 +6597,7 @@ index 626e1c7..a88719c 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8298,6 +8801,11 @@ fi
+@@ -8587,6 +9090,11 @@ fi
@@ -6595,7 +6609,7 @@ index 626e1c7..a88719c 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8648,7 +9156,8 @@ _LT_EOF
+@@ -8937,7 +9445,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -6605,7 +6619,7 @@ index 626e1c7..a88719c 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8747,12 +9256,12 @@ _LT_EOF
+@@ -9036,12 +9545,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -6620,7 +6634,7 @@ index 626e1c7..a88719c 100755
fi
;;
esac
-@@ -8766,8 +9275,8 @@ _LT_EOF
+@@ -9055,8 +9564,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -6631,7 +6645,7 @@ index 626e1c7..a88719c 100755
fi
;;
-@@ -8785,8 +9294,8 @@ _LT_EOF
+@@ -9074,8 +9583,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -6642,7 +6656,7 @@ index 626e1c7..a88719c 100755
else
ld_shlibs=no
fi
-@@ -8832,8 +9341,8 @@ _LT_EOF
+@@ -9121,8 +9630,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -6653,7 +6667,7 @@ index 626e1c7..a88719c 100755
else
ld_shlibs=no
fi
-@@ -8963,7 +9472,13 @@ _LT_EOF
+@@ -9252,7 +9761,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -6668,7 +6682,7 @@ index 626e1c7..a88719c 100755
/* end confdefs.h. */
int
-@@ -8976,22 +9491,29 @@ main ()
+@@ -9265,22 +9780,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -6711,7 +6725,7 @@ index 626e1c7..a88719c 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9003,7 +9525,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9292,7 +9814,13 @@ if test -z "$aix_libpath"; then aix_libp
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -6726,7 +6740,7 @@ index 626e1c7..a88719c 100755
/* end confdefs.h. */
int
-@@ -9016,22 +9544,29 @@ main ()
+@@ -9305,22 +9833,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -6769,7 +6783,7 @@ index 626e1c7..a88719c 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9076,20 +9611,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9365,20 +9900,63 @@ if test -z "$aix_libpath"; then aix_libp
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -6847,7 +6861,7 @@ index 626e1c7..a88719c 100755
;;
darwin* | rhapsody*)
-@@ -9150,7 +9728,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9439,7 +10017,7 @@ if test -z "$aix_libpath"; then aix_libp
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -6856,7 +6870,7 @@ index 626e1c7..a88719c 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9158,7 +9736,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9447,7 +10025,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux9*)
if test "$GCC" = yes; then
@@ -6865,7 +6879,7 @@ index 626e1c7..a88719c 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9174,7 +9752,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9463,7 +10041,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -6874,7 +6888,7 @@ index 626e1c7..a88719c 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9198,10 +9776,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9487,10 +10065,10 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -6887,7 +6901,7 @@ index 626e1c7..a88719c 100755
;;
esac
else
-@@ -9280,23 +9858,36 @@ fi
+@@ -9569,23 +10147,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -6932,7 +6946,7 @@ index 626e1c7..a88719c 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9381,7 +9972,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9670,7 +10261,7 @@ rm -f core conftest.err conftest.$ac_obj
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -6941,7 +6955,7 @@ index 626e1c7..a88719c 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9400,9 +9991,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9689,9 +10280,9 @@ rm -f core conftest.err conftest.$ac_obj
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -6953,7 +6967,7 @@ index 626e1c7..a88719c 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -9978,8 +10569,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10267,8 +10858,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -6965,7 +6979,7 @@ index 626e1c7..a88719c 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10012,13 +10604,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10301,13 +10893,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -7038,7 +7052,7 @@ index 626e1c7..a88719c 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10110,7 +10760,7 @@ haiku*)
+@@ -10399,7 +11049,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -7047,7 +7061,7 @@ index 626e1c7..a88719c 100755
hardcode_into_libs=yes
;;
-@@ -10950,10 +11600,10 @@ else
+@@ -11239,10 +11889,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -7060,7 +7074,7 @@ index 626e1c7..a88719c 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11056,10 +11706,10 @@ else
+@@ -11345,10 +11995,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -7073,7 +7087,7 @@ index 626e1c7..a88719c 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12961,13 +13611,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -13314,13 +13964,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -7094,7 +7108,7 @@ index 626e1c7..a88719c 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -12982,14 +13639,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -13335,14 +13992,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -7113,7 +7127,7 @@ index 626e1c7..a88719c 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -13022,12 +13682,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -13375,12 +14035,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -7127,7 +7141,7 @@ index 626e1c7..a88719c 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -13082,8 +13742,13 @@ reload_flag \
+@@ -13435,8 +14095,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -7141,7 +7155,7 @@ index 626e1c7..a88719c 100755
STRIP \
RANLIB \
CC \
-@@ -13093,12 +13758,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -13446,12 +14111,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -7157,7 +7171,7 @@ index 626e1c7..a88719c 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -13114,7 +13781,6 @@ no_undefined_flag \
+@@ -13467,7 +14134,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -7165,7 +7179,7 @@ index 626e1c7..a88719c 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -13150,6 +13816,7 @@ module_cmds \
+@@ -13503,6 +14169,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -7173,7 +7187,7 @@ index 626e1c7..a88719c 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -13906,7 +14573,8 @@ $as_echo X"$file" |
+@@ -14268,7 +14935,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -7183,7 +7197,7 @@ index 626e1c7..a88719c 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -14009,19 +14677,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -14371,19 +15039,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -7227,7 +7241,7 @@ index 626e1c7..a88719c 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -14051,6 +14742,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -14413,6 +15104,12 @@ global_symbol_to_c_name_address=$lt_lt_c
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -7240,7 +7254,7 @@ index 626e1c7..a88719c 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -14060,6 +14757,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -14422,6 +15119,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -7250,7 +7264,7 @@ index 626e1c7..a88719c 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -14174,12 +14874,12 @@ with_gcc=$GCC
+@@ -14536,12 +15236,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -7266,7 +7280,7 @@ index 626e1c7..a88719c 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -14266,9 +14966,6 @@ inherit_rpath=$inherit_rpath
+@@ -14628,9 +15328,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -7276,7 +7290,7 @@ index 626e1c7..a88719c 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -14284,6 +14981,9 @@ include_expsyms=$lt_include_expsyms
+@@ -14646,6 +15343,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -7286,7 +7300,7 @@ index 626e1c7..a88719c 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -14316,210 +15016,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -14678,210 +15378,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -7488,15 +7502,9 @@ index 626e1c7..a88719c 100755
-_LT_EOF
- ;;
- esac
--
--
-- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-- || (rm -f "$cfgfile"; exit 1)
--
-- mv -f "$cfgfile" "$ofile" ||
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
-+
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
@@ -7654,17 +7662,18 @@ index 626e1c7..a88719c 100755
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
-+
-+
+
+- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+- || (rm -f "$cfgfile"; exit 1)
+
+- mv -f "$cfgfile" "$ofile" ||
+ mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-diff --git a/ld/configure b/ld/configure
-index f9be51a..3df1149 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -658,8 +658,11 @@ OTOOL
+@@ -688,8 +688,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -7676,7 +7685,7 @@ index f9be51a..3df1149 100755
OBJDUMP
LN_S
NM
-@@ -781,6 +784,7 @@ enable_static
+@@ -816,6 +819,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -7684,7 +7693,7 @@ index f9be51a..3df1149 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1462,6 +1466,8 @@ Optional Packages:
+@@ -1508,6 +1512,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -7693,7 +7702,7 @@ index f9be51a..3df1149 100755
--with-lib-path=dir1:dir2... set default LIB_PATH
--with-sysroot=DIR Search for usr/lib et al within DIR.
-@@ -5656,8 +5662,8 @@ esac
+@@ -5960,8 +5966,8 @@ esac
@@ -7704,7 +7713,7 @@ index f9be51a..3df1149 100755
-@@ -5697,7 +5703,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -6001,7 +6007,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -7713,7 +7722,7 @@ index f9be51a..3df1149 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6383,8 +6389,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6687,8 +6693,8 @@ $as_echo_n "checking whether the shell u
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -7724,13 +7733,13 @@ index f9be51a..3df1149 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -6433,6 +6439,80 @@ esac
+@@ -6737,6 +6743,80 @@ esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
++if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
@@ -7777,7 +7786,7 @@ index f9be51a..3df1149 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
++if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
@@ -7804,8 +7813,8 @@ index f9be51a..3df1149 100755
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
- if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -6449,6 +6529,11 @@ case $reload_flag in
+ if ${lt_cv_ld_reload_flag+:} false; then :
+@@ -6753,6 +6833,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -7817,7 +7826,7 @@ index f9be51a..3df1149 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6617,7 +6702,8 @@ mingw* | pw32*)
+@@ -6921,7 +7006,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -7827,7 +7836,7 @@ index f9be51a..3df1149 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6771,6 +6857,21 @@ esac
+@@ -7075,6 +7161,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -7849,7 +7858,7 @@ index f9be51a..3df1149 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6786,9 +6887,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -7090,9 +7191,162 @@ test -z "$deplibs_check_method" && depli
@@ -7868,7 +7877,7 @@ index f9be51a..3df1149 100755
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
@@ -7880,7 +7889,7 @@ index f9be51a..3df1149 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -7908,7 +7917,7 @@ index f9be51a..3df1149 100755
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
@@ -7920,7 +7929,7 @@ index f9be51a..3df1149 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -7968,7 +7977,7 @@ index f9be51a..3df1149 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
@@ -8013,17 +8022,17 @@ index f9be51a..3df1149 100755
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6804,7 +7058,7 @@ do
+ if ${ac_cv_prog_AR+:} false; then :
+@@ -7108,7 +7362,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6824,11 +7078,15 @@ $as_echo "no" >&6; }
+@@ -7128,11 +7382,15 @@ $as_echo "no" >&6; }
fi
@@ -8041,17 +8050,17 @@ index f9be51a..3df1149 100755
+set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6844,7 +7102,7 @@ do
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
+@@ -7148,7 +7406,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
+ ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6863,6 +7121,10 @@ else
+@@ -7167,6 +7425,10 @@ else
$as_echo "no" >&6; }
fi
@@ -8062,7 +8071,7 @@ index f9be51a..3df1149 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6874,12 +7136,12 @@ ac_tool_warned=yes ;;
+@@ -7178,12 +7440,11 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -8075,17 +8084,16 @@ index f9be51a..3df1149 100755
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
-+
-@@ -6889,6 +7151,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -7194,6 +7455,63 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
-+if test "${lt_cv_ar_at_file+set}" = set; then :
++if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
@@ -8139,10 +8147,11 @@ index f9be51a..3df1149 100755
+
+
+
-
++
if test -n "$ac_tool_prefix"; then
-@@ -7225,8 +7543,8 @@ esac
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+@@ -7529,8 +7847,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -8153,7 +8162,7 @@ index f9be51a..3df1149 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -7262,6 +7580,7 @@ for ac_symprfx in "" "_"; do
+@@ -7566,6 +7884,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -8161,7 +8170,7 @@ index f9be51a..3df1149 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -7303,6 +7622,18 @@ _LT_EOF
+@@ -7607,6 +7926,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -8180,7 +8189,7 @@ index f9be51a..3df1149 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -7314,7 +7645,7 @@ _LT_EOF
+@@ -7618,7 +7949,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -8189,7 +8198,7 @@ index f9be51a..3df1149 100755
const char *name;
void *address;
}
-@@ -7340,8 +7671,8 @@ static const void *lt_preloaded_setup() {
+@@ -7644,8 +7975,8 @@ static const void *lt_preloaded_setup()
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -8200,7 +8209,7 @@ index f9be51a..3df1149 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7351,8 +7682,8 @@ _LT_EOF
+@@ -7655,8 +7986,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -8211,7 +8220,7 @@ index f9be51a..3df1149 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -7389,6 +7720,19 @@ else
+@@ -7693,6 +8024,13 @@ else
$as_echo "ok" >&6; }
fi
@@ -8222,19 +8231,18 @@ index f9be51a..3df1149 100755
+ nm_file_list_spec='@'
+fi
+
-+
-+
-+
-+
-+
-+
-@@ -7409,6 +7753,42 @@ fi
+@@ -7714,6 +8052,48 @@ fi
++
++
++
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -8261,7 +8269,7 @@ index f9be51a..3df1149 100755
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
+$as_echo "${with_libtool_sysroot}" >&6; }
-+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
@@ -8271,10 +8279,11 @@ index f9be51a..3df1149 100755
+
+
+
-
++
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
-@@ -7616,6 +7996,123 @@ esac
+ enableval=$enable_libtool_lock;
+@@ -7920,6 +8300,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -8283,7 +8292,7 @@ index f9be51a..3df1149 100755
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
@@ -8295,7 +8304,7 @@ index f9be51a..3df1149 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -8323,7 +8332,7 @@ index f9be51a..3df1149 100755
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
@@ -8335,7 +8344,7 @@ index f9be51a..3df1149 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -8373,7 +8382,7 @@ index f9be51a..3df1149 100755
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
++if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
@@ -8398,7 +8407,7 @@ index f9be51a..3df1149 100755
case $host_os in
rhapsody* | darwin*)
-@@ -8179,6 +8676,8 @@ _LT_EOF
+@@ -8483,6 +8980,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -8407,7 +8416,7 @@ index f9be51a..3df1149 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -8247,6 +8746,16 @@ done
+@@ -8551,6 +9050,16 @@ done
@@ -8424,7 +8433,7 @@ index f9be51a..3df1149 100755
# Set options
-@@ -8375,7 +8884,8 @@ fi
+@@ -8679,7 +9188,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -8434,7 +8443,7 @@ index f9be51a..3df1149 100755
-@@ -8464,7 +8974,7 @@ aix3*)
+@@ -8768,7 +9278,7 @@ aix3*)
esac
# Global variables:
@@ -8443,7 +8452,7 @@ index f9be51a..3df1149 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8762,8 +9272,6 @@ fi
+@@ -9066,8 +9576,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -8452,7 +8461,7 @@ index f9be51a..3df1149 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8929,6 +9437,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -9233,6 +9741,12 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -8465,7 +8474,7 @@ index f9be51a..3df1149 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8991,7 +9505,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -9295,7 +9809,7 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -8474,7 +8483,7 @@ index f9be51a..3df1149 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -9048,13 +9562,17 @@ case $host_os in
+@@ -9352,13 +9866,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -8487,7 +8496,7 @@ index f9be51a..3df1149 100755
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
++if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
@@ -8498,7 +8507,7 @@ index f9be51a..3df1149 100755
#
# Check to make sure the PIC flag actually works.
-@@ -9115,6 +9633,11 @@ fi
+@@ -9419,6 +9937,11 @@ fi
@@ -8510,7 +8519,7 @@ index f9be51a..3df1149 100755
#
# Check to make sure the static flag actually works.
#
-@@ -9465,7 +9988,8 @@ _LT_EOF
+@@ -9769,7 +10292,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -8520,7 +8529,7 @@ index f9be51a..3df1149 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9564,12 +10088,12 @@ _LT_EOF
+@@ -9868,12 +10392,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -8535,7 +8544,7 @@ index f9be51a..3df1149 100755
fi
;;
esac
-@@ -9583,8 +10107,8 @@ _LT_EOF
+@@ -9887,8 +10411,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -8546,7 +8555,7 @@ index f9be51a..3df1149 100755
fi
;;
-@@ -9602,8 +10126,8 @@ _LT_EOF
+@@ -9906,8 +10430,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8557,7 +8566,7 @@ index f9be51a..3df1149 100755
else
ld_shlibs=no
fi
-@@ -9649,8 +10173,8 @@ _LT_EOF
+@@ -9953,8 +10477,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8568,7 +8577,7 @@ index f9be51a..3df1149 100755
else
ld_shlibs=no
fi
-@@ -9780,7 +10304,13 @@ _LT_EOF
+@@ -10084,7 +10608,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -8576,14 +8585,14 @@ index f9be51a..3df1149 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9793,22 +10323,29 @@ main ()
+@@ -10097,22 +10627,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -8626,7 +8635,7 @@ index f9be51a..3df1149 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9820,7 +10357,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10124,7 +10661,13 @@ if test -z "$aix_libpath"; then aix_libp
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -8634,14 +8643,14 @@ index f9be51a..3df1149 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9833,22 +10376,29 @@ main ()
+@@ -10137,22 +10680,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -8684,11 +8693,10 @@ index f9be51a..3df1149 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9892,21 +10442,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- # When not using gcc, we currently assume that we are using
+@@ -10197,20 +10747,63 @@ if test -z "$aix_libpath"; then aix_libp
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
-- # no search path for DLLs.
+ # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
@@ -8703,7 +8711,6 @@ index f9be51a..3df1149 100755
- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes=yes
-+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
@@ -8764,7 +8771,7 @@ index f9be51a..3df1149 100755
;;
darwin* | rhapsody*)
-@@ -9967,7 +10560,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10271,7 +10864,7 @@ if test -z "$aix_libpath"; then aix_libp
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -8773,7 +8780,7 @@ index f9be51a..3df1149 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9975,7 +10568,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10279,7 +10872,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux9*)
if test "$GCC" = yes; then
@@ -8782,7 +8789,7 @@ index f9be51a..3df1149 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9991,7 +10584,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10295,7 +10888,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -8791,7 +8798,7 @@ index f9be51a..3df1149 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -10015,10 +10608,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10319,10 +10912,10 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -8804,7 +8811,7 @@ index f9be51a..3df1149 100755
;;
esac
else
-@@ -10097,23 +10690,36 @@ fi
+@@ -10401,23 +10994,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -8819,7 +8826,7 @@ index f9be51a..3df1149 100755
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
@@ -8849,7 +8856,7 @@ index f9be51a..3df1149 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -10198,7 +10804,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10502,7 +11108,7 @@ rm -f core conftest.err conftest.$ac_obj
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -8858,7 +8865,7 @@ index f9be51a..3df1149 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -10217,9 +10823,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10521,9 +11127,9 @@ rm -f core conftest.err conftest.$ac_obj
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -8870,7 +8877,7 @@ index f9be51a..3df1149 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10795,8 +11401,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -11099,8 +11705,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -8882,7 +8889,7 @@ index f9be51a..3df1149 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10829,13 +11436,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -11133,13 +11740,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -8955,7 +8962,7 @@ index f9be51a..3df1149 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10927,7 +11592,7 @@ haiku*)
+@@ -11231,7 +11896,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -8964,7 +8971,16 @@ index f9be51a..3df1149 100755
hardcode_into_libs=yes
;;
-@@ -11767,10 +12432,10 @@ else
+@@ -12027,7 +12692,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 12030 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -12071,10 +12736,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -8977,7 +8993,16 @@ index f9be51a..3df1149 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11873,10 +12538,10 @@ else
+@@ -12133,7 +12798,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 12136 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -12177,10 +12842,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -8990,7 +9015,7 @@ index f9be51a..3df1149 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12268,6 +12933,7 @@ $RM -r conftest*
+@@ -12572,6 +13237,7 @@ $RM -r conftest*
# Allow CC to be a program name with arguments.
lt_save_CC=$CC
@@ -8998,7 +9023,7 @@ index f9be51a..3df1149 100755
lt_save_LD=$LD
lt_save_GCC=$GCC
GCC=$GXX
-@@ -12285,6 +12951,7 @@ $RM -r conftest*
+@@ -12589,6 +13255,7 @@ $RM -r conftest*
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
@@ -9006,7 +9031,7 @@ index f9be51a..3df1149 100755
compiler=$CC
compiler_CXX=$CC
for cc_temp in $compiler""; do
-@@ -12567,7 +13234,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -12871,7 +13538,13 @@ $as_echo_n "checking whether the $compil
allow_undefined_flag_CXX='-berok'
# Determine the default libpath from the value encoded in an empty
# executable.
@@ -9014,14 +9039,14 @@ index f9be51a..3df1149 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath__CXX+set}" = set; then :
++ if ${lt_cv_aix_libpath__CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -12580,22 +13253,29 @@ main ()
+@@ -12884,22 +13557,29 @@ main ()
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
@@ -9064,7 +9089,7 @@ index f9be51a..3df1149 100755
hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-@@ -12608,7 +13288,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12912,7 +13592,13 @@ if test -z "$aix_libpath"; then aix_libp
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -9072,14 +9097,14 @@ index f9be51a..3df1149 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath__CXX+set}" = set; then :
++ if ${lt_cv_aix_libpath__CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -12621,22 +13307,29 @@ main ()
+@@ -12925,22 +13611,29 @@ main ()
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
@@ -9122,7 +9147,7 @@ index f9be51a..3df1149 100755
hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -12679,29 +13372,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12983,29 +13676,75 @@ if test -z "$aix_libpath"; then aix_libp
;;
cygwin* | mingw* | pw32* | cegcc*)
@@ -9221,7 +9246,7 @@ index f9be51a..3df1149 100755
darwin* | rhapsody*)
-@@ -12807,7 +13546,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13111,7 +13850,7 @@ if test -z "$aix_libpath"; then aix_libp
;;
*)
if test "$GXX" = yes; then
@@ -9230,7 +9255,7 @@ index f9be51a..3df1149 100755
else
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
-@@ -12878,10 +13617,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13182,10 +13921,10 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
@@ -9243,7 +9268,7 @@ index f9be51a..3df1149 100755
;;
esac
fi
-@@ -12922,9 +13661,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13226,9 +13965,9 @@ if test -z "$aix_libpath"; then aix_libp
*)
if test "$GXX" = yes; then
if test "$with_gnu_ld" = no; then
@@ -9255,7 +9280,7 @@ index f9be51a..3df1149 100755
fi
fi
link_all_deplibs_CXX=yes
-@@ -12994,20 +13733,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13298,20 +14037,20 @@ if test -z "$aix_libpath"; then aix_libp
prelink_cmds_CXX='tpldir=Template.dir~
rm -rf $tpldir~
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
@@ -9280,7 +9305,7 @@ index f9be51a..3df1149 100755
;;
*) # Version 6 and above use weak symbols
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-@@ -13202,7 +13941,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13506,7 +14245,7 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
*)
@@ -9289,7 +9314,7 @@ index f9be51a..3df1149 100755
;;
esac
-@@ -13248,7 +13987,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13552,7 +14291,7 @@ if test -z "$aix_libpath"; then aix_libp
solaris*)
case $cc_basename in
@@ -9298,7 +9323,7 @@ index f9be51a..3df1149 100755
# Sun C++ 4.2, 5.x and Centerline C++
archive_cmds_need_lc_CXX=yes
no_undefined_flag_CXX=' -zdefs'
-@@ -13289,9 +14028,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13593,9 +14332,9 @@ if test -z "$aix_libpath"; then aix_libp
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
@@ -9310,7 +9335,7 @@ index f9be51a..3df1149 100755
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
-@@ -13426,6 +14165,13 @@ private:
+@@ -13730,6 +14469,13 @@ private:
};
_LT_EOF
@@ -9324,7 +9349,7 @@ index f9be51a..3df1149 100755
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
-@@ -13439,7 +14185,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13743,7 +14489,7 @@ if { { eval echo "\"\$as_me\":${as_linen
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
@@ -9333,7 +9358,7 @@ index f9be51a..3df1149 100755
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
-@@ -13448,13 +14194,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13752,13 +14498,22 @@ if { { eval echo "\"\$as_me\":${as_linen
test $p = "-R"; then
prev=$p
continue
@@ -9360,7 +9385,7 @@ index f9be51a..3df1149 100755
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
-@@ -13474,8 +14229,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13778,8 +14533,10 @@ if { { eval echo "\"\$as_me\":${as_linen
postdeps_CXX="${postdeps_CXX} ${prev}${p}"
fi
fi
@@ -9371,7 +9396,7 @@ index f9be51a..3df1149 100755
*.$objext)
# This assumes that the test object file only shows up
# once in the compiler output.
-@@ -13511,6 +14268,7 @@ else
+@@ -13815,6 +14572,7 @@ else
fi
$RM -f confest.$objext
@@ -9379,7 +9404,7 @@ index f9be51a..3df1149 100755
# PORTME: override above test on systems where it is broken
case $host_os in
-@@ -13546,7 +14304,7 @@ linux*)
+@@ -13850,7 +14608,7 @@ linux*)
solaris*)
case $cc_basename in
@@ -9388,7 +9413,7 @@ index f9be51a..3df1149 100755
# The more standards-conforming stlport4 library is
# incompatible with the Cstd library. Avoid specifying
# it if it's in CXXFLAGS. Ignore libCrun as
-@@ -13611,8 +14369,6 @@ fi
+@@ -13915,8 +14673,6 @@ fi
lt_prog_compiler_pic_CXX=
lt_prog_compiler_static_CXX=
@@ -9397,7 +9422,7 @@ index f9be51a..3df1149 100755
# C++ specific cases for pic, static, wl, etc.
if test "$GXX" = yes; then
-@@ -13717,6 +14473,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -14021,6 +14777,11 @@ $as_echo_n "checking for $compiler optio
;;
esac
;;
@@ -9409,7 +9434,7 @@ index f9be51a..3df1149 100755
dgux*)
case $cc_basename in
ec++*)
-@@ -13869,7 +14630,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -14173,7 +14934,7 @@ $as_echo_n "checking for $compiler optio
;;
solaris*)
case $cc_basename in
@@ -9418,7 +9443,7 @@ index f9be51a..3df1149 100755
# Sun C++ 4.2, 5.x and Centerline C++
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-Bstatic'
-@@ -13934,10 +14695,17 @@ case $host_os in
+@@ -14238,10 +14999,17 @@ case $host_os in
lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
;;
esac
@@ -9428,7 +9453,7 @@ index f9be51a..3df1149 100755
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-+if test "${lt_cv_prog_compiler_pic_CXX+set}" = set; then :
++if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
@@ -9439,7 +9464,7 @@ index f9be51a..3df1149 100755
#
# Check to make sure the PIC flag actually works.
-@@ -13995,6 +14763,8 @@ fi
+@@ -14299,6 +15067,8 @@ fi
@@ -9448,7 +9473,7 @@ index f9be51a..3df1149 100755
#
# Check to make sure the static flag actually works.
#
-@@ -14172,6 +14942,7 @@ fi
+@@ -14476,6 +15246,7 @@ fi
$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -9456,7 +9481,7 @@ index f9be51a..3df1149 100755
case $host_os in
aix[4-9]*)
# If we're using GNU nm, then we don't want the "-C" option.
-@@ -14186,15 +14957,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -14490,15 +15261,20 @@ $as_echo_n "checking whether the $compil
;;
pw32*)
export_symbols_cmds_CXX="$ltdll_cmds"
@@ -9482,7 +9507,7 @@ index f9be51a..3df1149 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
-@@ -14457,8 +15233,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14761,8 +15537,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -9494,7 +9519,7 @@ index f9be51a..3df1149 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -14490,13 +15267,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14794,13 +15571,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -9567,7 +9592,7 @@ index f9be51a..3df1149 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -14587,7 +15422,7 @@ haiku*)
+@@ -14891,7 +15726,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -9576,7 +9601,7 @@ index f9be51a..3df1149 100755
hardcode_into_libs=yes
;;
-@@ -15046,6 +15881,7 @@ fi
+@@ -15350,6 +16185,7 @@ fi
fi # test -n "$compiler"
CC=$lt_save_CC
@@ -9584,7 +9609,7 @@ index f9be51a..3df1149 100755
LDCXX=$LD
LD=$lt_save_LD
GCC=$lt_save_GCC
-@@ -17982,13 +18818,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -18449,13 +19285,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -9605,7 +9630,7 @@ index f9be51a..3df1149 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -18003,14 +18846,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -18470,14 +19313,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -9624,7 +9649,7 @@ index f9be51a..3df1149 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -18043,12 +18889,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -18510,12 +19356,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -9638,7 +9663,7 @@ index f9be51a..3df1149 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -18087,8 +18933,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
+@@ -18554,8 +19400,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archi
compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9648,7 +9673,7 @@ index f9be51a..3df1149 100755
lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -18115,12 +18961,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
+@@ -18582,12 +19428,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$har
hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9662,7 +9687,7 @@ index f9be51a..3df1149 100755
file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -18158,8 +19004,13 @@ reload_flag \
+@@ -18625,8 +19471,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -9676,7 +9701,7 @@ index f9be51a..3df1149 100755
STRIP \
RANLIB \
CC \
-@@ -18169,12 +19020,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -18636,12 +19487,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -9692,7 +9717,7 @@ index f9be51a..3df1149 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -18190,7 +19043,6 @@ no_undefined_flag \
+@@ -18657,7 +19510,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -9700,7 +9725,7 @@ index f9be51a..3df1149 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -18212,8 +19064,8 @@ LD_CXX \
+@@ -18679,8 +19531,8 @@ LD_CXX \
reload_flag_CXX \
compiler_CXX \
lt_prog_compiler_no_builtin_flag_CXX \
@@ -9710,7 +9735,7 @@ index f9be51a..3df1149 100755
lt_prog_compiler_static_CXX \
lt_cv_prog_compiler_c_o_CXX \
export_dynamic_flag_spec_CXX \
-@@ -18225,7 +19077,6 @@ no_undefined_flag_CXX \
+@@ -18692,7 +19544,6 @@ no_undefined_flag_CXX \
hardcode_libdir_flag_spec_CXX \
hardcode_libdir_flag_spec_ld_CXX \
hardcode_libdir_separator_CXX \
@@ -9718,7 +9743,7 @@ index f9be51a..3df1149 100755
exclude_expsyms_CXX \
include_expsyms_CXX \
file_list_spec_CXX \
-@@ -18259,6 +19110,7 @@ module_cmds \
+@@ -18726,6 +19577,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -9726,7 +9751,7 @@ index f9be51a..3df1149 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -18273,7 +19125,8 @@ archive_expsym_cmds_CXX \
+@@ -18740,7 +19592,8 @@ archive_expsym_cmds_CXX \
module_cmds_CXX \
module_expsym_cmds_CXX \
export_symbols_cmds_CXX \
@@ -9736,7 +9761,7 @@ index f9be51a..3df1149 100755
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-@@ -19066,7 +19919,8 @@ $as_echo X"$file" |
+@@ -19505,7 +20358,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -9746,7 +9771,7 @@ index f9be51a..3df1149 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -19169,19 +20023,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -19608,19 +20462,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -9790,7 +9815,7 @@ index f9be51a..3df1149 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -19211,6 +20088,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -19650,6 +20527,12 @@ global_symbol_to_c_name_address=$lt_lt_c
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -9803,7 +9828,7 @@ index f9be51a..3df1149 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -19220,6 +20103,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -19659,6 +20542,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -9813,7 +9838,7 @@ index f9be51a..3df1149 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -19334,12 +20220,12 @@ with_gcc=$GCC
+@@ -19773,12 +20659,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -9829,7 +9854,7 @@ index f9be51a..3df1149 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -19426,9 +20312,6 @@ inherit_rpath=$inherit_rpath
+@@ -19865,9 +20751,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -9839,7 +9864,7 @@ index f9be51a..3df1149 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -19444,6 +20327,9 @@ include_expsyms=$lt_include_expsyms
+@@ -19883,6 +20766,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -9849,7 +9874,7 @@ index f9be51a..3df1149 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -19490,210 +20376,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -19929,210 +20815,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -10051,15 +10076,9 @@ index f9be51a..3df1149 100755
-_LT_EOF
- ;;
- esac
--
--
-- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-- || (rm -f "$cfgfile"; exit 1)
--
-- mv -f "$cfgfile" "$ofile" ||
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
-+
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
@@ -10217,13 +10236,16 @@ index f9be51a..3df1149 100755
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
-+
-+
+
+- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+- || (rm -f "$cfgfile"; exit 1)
+
+- mv -f "$cfgfile" "$ofile" ||
+ mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-@@ -19721,12 +20566,12 @@ with_gcc=$GCC_CXX
+@@ -20160,12 +21005,12 @@ with_gcc=$GCC_CXX
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
@@ -10239,7 +10261,7 @@ index f9be51a..3df1149 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static_CXX
-@@ -19813,9 +20658,6 @@ inherit_rpath=$inherit_rpath_CXX
+@@ -20252,9 +21097,6 @@ inherit_rpath=$inherit_rpath_CXX
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs_CXX
@@ -10249,7 +10271,7 @@ index f9be51a..3df1149 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols_CXX
-@@ -19831,6 +20673,9 @@ include_expsyms=$lt_include_expsyms_CXX
+@@ -20270,6 +21112,9 @@ include_expsyms=$lt_include_expsyms_CXX
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds_CXX
@@ -10259,8 +10281,6 @@ index f9be51a..3df1149 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec_CXX
-diff --git a/libtool.m4 b/libtool.m4
-index 24d13f3..e45fdc6 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -1,7 +1,8 @@
@@ -10302,7 +10322,7 @@ index 24d13f3..e45fdc6 100644
AC_SUBST(LIBTOOL)dnl
_LT_SETUP
-@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable
dnl
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
@@ -10325,7 +10345,7 @@ index 24d13f3..e45fdc6 100644
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
configured by $[0], generated by m4_PACKAGE_STRING.
@@ -10381,7 +10401,7 @@ index 24d13f3..e45fdc6 100644
+# Allow to override them for all tags through lt_cv_aix_libpath.
m4_defun([_LT_SYS_MODULE_PATH_AIX],
[m4_require([_LT_DECL_SED])dnl
--AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+-AC_LINK_IFELSE([AC_LANG_SOURCE([AC_LANG_PROGRAM])],[
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
@@ -10430,7 +10450,7 @@ index 24d13f3..e45fdc6 100644
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo progr
])# _LT_PROG_ECHO_BACKSLASH
@@ -10683,7 +10703,7 @@ index 24d13f3..e45fdc6 100644
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -3174,7 +3336,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -3174,7 +3336,11 @@ test -z "$deplibs_check_method" && depli
_LT_DECL([], [deplibs_check_method], [1],
[Method to check whether dependent libraries are shared objects])
_LT_DECL([], [file_magic_cmd], [1],
@@ -10811,7 +10831,7 @@ index 24d13f3..e45fdc6 100644
const char *name;
void *address;
}
-@@ -3510,15 +3750,15 @@ static const void *lt_preloaded_setup() {
+@@ -3510,15 +3750,15 @@ static const void *lt_preloaded_setup()
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -10845,7 +10865,7 @@ index 24d13f3..e45fdc6 100644
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
[Take the output of nm and produce a listing of raw symbols and C names])
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
-@@ -3561,6 +3808,8 @@ _LT_DECL([global_symbol_to_c_name_address],
+@@ -3561,6 +3808,8 @@ _LT_DECL([global_symbol_to_c_name_addres
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
[Transform the output of nm in a C name address pair when lib prefix is needed])
@@ -10930,7 +10950,7 @@ index 24d13f3..e45fdc6 100644
#
# Check to make sure the static flag actually works.
#
-@@ -4213,6 +4477,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+@@ -4213,6 +4477,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog
m4_defun([_LT_LINKER_SHLIBS],
[AC_REQUIRE([LT_PATH_LD])dnl
AC_REQUIRE([LT_PATH_NM])dnl
@@ -11177,7 +11197,7 @@ index 24d13f3..e45fdc6 100644
# implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-- AC_LINK_IFELSE(int foo(void) {},
+- AC_LINK_IFELSE([AC_LANG_SOURCE([int foo(void) {}])],
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
- )
- LDFLAGS="$save_LDFLAGS"
@@ -11252,7 +11272,7 @@ index 24d13f3..e45fdc6 100644
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
(test "X$CXX" != "Xg++"))) ; then
-@@ -5487,6 +5818,7 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -5487,6 +5818,7 @@ if test "$_lt_caught_CXX_error" != yes;
# Allow CC to be a program name with arguments.
lt_save_CC=$CC
@@ -11260,7 +11280,7 @@ index 24d13f3..e45fdc6 100644
lt_save_LD=$LD
lt_save_GCC=$GCC
GCC=$GXX
-@@ -5504,6 +5836,7 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -5504,6 +5836,7 @@ if test "$_lt_caught_CXX_error" != yes;
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
@@ -11268,7 +11288,7 @@ index 24d13f3..e45fdc6 100644
compiler=$CC
_LT_TAGVAR(compiler, $1)=$CC
_LT_CC_BASENAME([$compiler])
-@@ -5667,7 +6000,7 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -5667,7 +6000,7 @@ if test "$_lt_caught_CXX_error" != yes;
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
# Determine the default libpath from the value encoded in an empty
# executable.
@@ -11277,7 +11297,7 @@ index 24d13f3..e45fdc6 100644
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -5679,7 +6012,7 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -5679,7 +6012,7 @@ if test "$_lt_caught_CXX_error" != yes;
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -11286,7 +11306,7 @@ index 24d13f3..e45fdc6 100644
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
-@@ -5721,29 +6054,75 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -5721,29 +6054,75 @@ if test "$_lt_caught_CXX_error" != yes;
;;
cygwin* | mingw* | pw32* | cegcc*)
@@ -11385,7 +11405,7 @@ index 24d13f3..e45fdc6 100644
darwin* | rhapsody*)
_LT_DARWIN_LINKER_FEATURES($1)
;;
-@@ -5818,7 +6197,7 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -5818,7 +6197,7 @@ if test "$_lt_caught_CXX_error" != yes;
;;
*)
if test "$GXX" = yes; then
@@ -11394,7 +11414,7 @@ index 24d13f3..e45fdc6 100644
else
# FIXME: insert proper C++ library support
_LT_TAGVAR(ld_shlibs, $1)=no
-@@ -5889,10 +6268,10 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -5889,10 +6268,10 @@ if test "$_lt_caught_CXX_error" != yes;
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
@@ -11407,7 +11427,7 @@ index 24d13f3..e45fdc6 100644
;;
esac
fi
-@@ -5933,9 +6312,9 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -5933,9 +6312,9 @@ if test "$_lt_caught_CXX_error" != yes;
*)
if test "$GXX" = yes; then
if test "$with_gnu_ld" = no; then
@@ -11419,7 +11439,7 @@ index 24d13f3..e45fdc6 100644
fi
fi
_LT_TAGVAR(link_all_deplibs, $1)=yes
-@@ -6005,20 +6384,20 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -6005,20 +6384,20 @@ if test "$_lt_caught_CXX_error" != yes;
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
rm -rf $tpldir~
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
@@ -11444,7 +11464,7 @@ index 24d13f3..e45fdc6 100644
;;
*) # Version 6 and above use weak symbols
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-@@ -6213,7 +6592,7 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -6213,7 +6592,7 @@ if test "$_lt_caught_CXX_error" != yes;
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
*)
@@ -11453,7 +11473,7 @@ index 24d13f3..e45fdc6 100644
;;
esac
-@@ -6259,7 +6638,7 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -6259,7 +6638,7 @@ if test "$_lt_caught_CXX_error" != yes;
solaris*)
case $cc_basename in
@@ -11462,7 +11482,7 @@ index 24d13f3..e45fdc6 100644
# Sun C++ 4.2, 5.x and Centerline C++
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-@@ -6300,9 +6679,9 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -6300,9 +6679,9 @@ if test "$_lt_caught_CXX_error" != yes;
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
@@ -11474,7 +11494,7 @@ index 24d13f3..e45fdc6 100644
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
-@@ -6431,6 +6810,7 @@ if test "$_lt_caught_CXX_error" != yes; then
+@@ -6431,6 +6810,7 @@ if test "$_lt_caught_CXX_error" != yes;
fi # test -n "$compiler"
CC=$lt_save_CC
@@ -11682,7 +11702,7 @@ index 24d13f3..e45fdc6 100644
])# _LT_LANG_RC_CONFIG
-@@ -7101,6 +7536,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+@@ -7101,6 +7536,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object
AC_SUBST([OBJDUMP])
])
@@ -11709,7 +11729,7 @@ index 24d13f3..e45fdc6 100644
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -7234,206 +7678,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+@@ -7234,206 +7678,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn
])# _LT_CHECK_SHELL_FEATURES
@@ -11807,6 +11827,31 @@ index 24d13f3..e45fdc6 100644
-{
- func_len_result=${#1}
-}
+-
+-_LT_EOF
+- ;;
+- *) # Bourne compatible functions.
+- cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_dirname file append nondir_replacement
+-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+-# otherwise set result to NONDIR_REPLACEMENT.
+-func_dirname ()
+-{
+- # Extract subdirectory from the argument.
+- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+- if test "X$func_dirname_result" = "X${1}"; then
+- func_dirname_result="${3}"
+- else
+- func_dirname_result="$func_dirname_result${2}"
+- fi
+-}
+-
+-# func_basename file
+-func_basename ()
+-{
+- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+-}
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
@@ -11823,23 +11868,22 @@ index 24d13f3..e45fdc6 100644
+test 0 -eq $? || _lt_function_replace_fail=:
+])
--_LT_EOF
-- ;;
-- *) # Bourne compatible functions.
-- cat << \_LT_EOF >> "$cfgfile"
+-dnl func_dirname_and_basename
+-dnl A portable version of this function is already defined in general.m4sh
+-dnl so there is no need for it here.
--# func_dirname file append nondir_replacement
--# Compute the dirname of FILE. If nonempty, add APPEND to the result,
--# otherwise set result to NONDIR_REPLACEMENT.
--func_dirname ()
+-# func_stripname prefix suffix name
+-# strip PREFIX and SUFFIX off of NAME.
+-# PREFIX and SUFFIX must not contain globbing or regex special
+-# characters, hashes, percent signs, but SUFFIX may contain a leading
+-# dot (in which case that matches only a dot).
+-# func_strip_suffix prefix name
+-func_stripname ()
-{
-- # Extract subdirectory from the argument.
-- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
-- if test "X$func_dirname_result" = "X${1}"; then
-- func_dirname_result="${3}"
-- else
-- func_dirname_result="$func_dirname_result${2}"
-- fi
+- case ${2} in
+- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+- esac
-}
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
@@ -11863,45 +11907,24 @@ index 24d13f3..e45fdc6 100644
+ esac
+ func_basename_result="${1##*/}"])
--# func_basename file
--func_basename ()
--{
-- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
--}
+-# sed scripts:
+-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+-my_sed_long_arg='1s/^-[[^=]]*=//'
+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}])
-
--dnl func_dirname_and_basename
--dnl A portable version of this function is already defined in general.m4sh
--dnl so there is no need for it here.
++
+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+ func_split_long_opt_name=${1%%=*}
+ func_split_long_opt_arg=${1#*=}])
-
--# func_stripname prefix suffix name
--# strip PREFIX and SUFFIX off of NAME.
--# PREFIX and SUFFIX must not contain globbing or regex special
--# characters, hashes, percent signs, but SUFFIX may contain a leading
--# dot (in which case that matches only a dot).
--# func_strip_suffix prefix name
--func_stripname ()
--{
-- case ${2} in
-- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-- esac
--}
++
+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
-
--# sed scripts:
--my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
--my_sed_long_arg='1s/^-[[^=]]*=//'
++
+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
@@ -11949,9 +11972,7 @@ index 24d13f3..e45fdc6 100644
+ func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
-
--_LT_EOF
--esac
++
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
@@ -11965,14 +11986,17 @@ index 24d13f3..e45fdc6 100644
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
--case $lt_shell_append in
-- yes)
-- cat << \_LT_EOF >> "$cfgfile"
+-_LT_EOF
+-esac
+if test x"$_lt_function_replace_fail" = x":"; then
+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+-case $lt_shell_append in
+- yes)
+- cat << \_LT_EOF >> "$cfgfile"
+-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
@@ -12058,8 +12082,6 @@ index 24d13f3..e45fdc6 100644
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
-diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..70e856e 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,10 +1,9 @@
@@ -12491,31 +12513,7 @@ index 9503ec8..70e856e 100644
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
-
-- # Shorthand for --mode=foo, only valid as the first argument
-- case $1 in
-- clean|clea|cle|cl)
-- shift; set dummy --mode clean ${1+"$@"}; shift
-- ;;
-- compile|compil|compi|comp|com|co|c)
-- shift; set dummy --mode compile ${1+"$@"}; shift
-- ;;
-- execute|execut|execu|exec|exe|ex|e)
-- shift; set dummy --mode execute ${1+"$@"}; shift
-- ;;
-- finish|finis|fini|fin|fi|f)
-- shift; set dummy --mode finish ${1+"$@"}; shift
-- ;;
-- install|instal|insta|inst|ins|in|i)
-- shift; set dummy --mode install ${1+"$@"}; shift
-- ;;
-- link|lin|li|l)
-- shift; set dummy --mode link ${1+"$@"}; shift
-- ;;
-- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-- shift; set dummy --mode uninstall ${1+"$@"}; shift
-- ;;
-- esac
++
+ exit $EXIT_MISMATCH
+ fi
+}
@@ -12545,9 +12543,7 @@ index 9503ec8..70e856e 100644
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+esac
-
-- # Parse non-mode specific arguments:
-- while test "$#" -gt 0; do
++
+
+
+# Option defaults:
@@ -12563,8 +12559,34 @@ index 9503ec8..70e856e 100644
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
-+
-+
+
+- # Shorthand for --mode=foo, only valid as the first argument
+- case $1 in
+- clean|clea|cle|cl)
+- shift; set dummy --mode clean ${1+"$@"}; shift
+- ;;
+- compile|compil|compi|comp|com|co|c)
+- shift; set dummy --mode compile ${1+"$@"}; shift
+- ;;
+- execute|execut|execu|exec|exe|ex|e)
+- shift; set dummy --mode execute ${1+"$@"}; shift
+- ;;
+- finish|finis|fini|fin|fi|f)
+- shift; set dummy --mode finish ${1+"$@"}; shift
+- ;;
+- install|instal|insta|inst|ins|in|i)
+- shift; set dummy --mode install ${1+"$@"}; shift
+- ;;
+- link|lin|li|l)
+- shift; set dummy --mode link ${1+"$@"}; shift
+- ;;
+- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+- shift; set dummy --mode uninstall ${1+"$@"}; shift
+- ;;
+- esac
+
+- # Parse non-mode specific arguments:
+- while test "$#" -gt 0; do
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
@@ -12808,13 +12830,13 @@ index 9503ec8..70e856e 100644
- fi
-}
-
-+ # Darwin sucks
-+ eval std_shrext=\"$shrext_cmds\"
-
+-
-## ----------- ##
-## Main. ##
-## ----------- ##
--
++ # Darwin sucks
++ eval std_shrext=\"$shrext_cmds\"
+
-$opt_help || {
- # Sanity checks first:
- func_check_version_match
@@ -13535,7 +13557,7 @@ index 9503ec8..70e856e 100644
"")
# Generic help is extracted from the usage comments
# at the start of this file.
-@@ -1659,8 +2327,8 @@ This mode accepts the following additional options:
+@@ -1659,8 +2327,8 @@ This mode accepts the following addition
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
-no-suppress do not suppress compiler output for multiple passes
@@ -13546,7 +13568,7 @@ index 9503ec8..70e856e 100644
-shared do not build a \`.o' file suitable for static linking
-static only build a \`.o' file suitable for static linking
-Wc,FLAG pass FLAG directly to the compiler
-@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted using RM."
+@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted u
;;
*)
@@ -13648,7 +13670,7 @@ index 9503ec8..70e856e 100644
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
-
++
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
@@ -13668,7 +13690,7 @@ index 9503ec8..70e856e 100644
+ else
+ sysroot_cmd=
+ fi
-+
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
@@ -14080,7 +14102,7 @@ index 9503ec8..70e856e 100644
lt_${my_prefix}_LTX_preloaded_symbols[] =
{\
{ \"$my_originator\", (void *) 0 },"
-@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup() {
+@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup()
for arg in $LTCFLAGS; do
case $arg in
-pie | -fpie | -fPIE) ;;
@@ -14609,7 +14631,7 @@ index 9503ec8..70e856e 100644
*/
EOF
cat <<"EOF"
-@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *, int);
+@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *,
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
@@ -14636,7 +14658,7 @@ index 9503ec8..70e856e 100644
void *xmalloc (size_t num);
char *xstrdup (const char *string);
-@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathspec);
+@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathsp
int make_executable (const char *path);
int check_executable (const char *path);
char *strendzap (char *str, const char *pat);
@@ -14964,7 +14986,7 @@ index 9503ec8..70e856e 100644
vfprintf (stderr, message, ap);
fprintf (stderr, ".\n");
-@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const char *mode,
+@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const ch
}
void
@@ -15002,7 +15024,7 @@ index 9503ec8..70e856e 100644
{
#ifdef HAVE_SETENV
/* always make a copy, for consistency with !HAVE_SETENV */
-@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
+@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, c
void
lt_update_exe_path (const char *name, const char *value)
{
@@ -15015,7 +15037,7 @@ index 9503ec8..70e856e 100644
if (name && *name && value && *value)
{
-@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, const char *value)
+@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, co
void
lt_update_lib_path (const char *name, const char *value)
{
@@ -17288,8 +17310,6 @@ index 9503ec8..70e856e 100644
if test -n "$exec_cmd"; then
eval exec "$exec_cmd"
-diff --git a/ltoptions.m4 b/ltoptions.m4
-index 5ef12ce..17cfd51 100644
--- a/ltoptions.m4
+++ b/ltoptions.m4
@@ -8,7 +8,7 @@
@@ -17301,8 +17321,6 @@ index 5ef12ce..17cfd51 100644
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-diff --git a/ltversion.m4 b/ltversion.m4
-index bf87f77..9c7b5d4 100644
--- a/ltversion.m4
+++ b/ltversion.m4
@@ -7,17 +7,17 @@
@@ -17329,8 +17347,6 @@ index bf87f77..9c7b5d4 100644
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
-diff --git a/lt~obsolete.m4 b/lt~obsolete.m4
-index bf92b5e..c573da9 100644
--- a/lt~obsolete.m4
+++ b/lt~obsolete.m4
@@ -7,7 +7,7 @@
@@ -17342,11 +17358,9 @@ index bf92b5e..c573da9 100644
# These exist entirely to fool aclocal when bootstrapping libtool.
#
-diff --git a/opcodes/configure b/opcodes/configure
-index f615634..a340983 100755
--- a/opcodes/configure
+++ b/opcodes/configure
-@@ -649,6 +649,9 @@ OTOOL
+@@ -680,6 +680,9 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -17356,7 +17370,7 @@ index f615634..a340983 100755
OBJDUMP
LN_S
NM
-@@ -762,6 +765,7 @@ enable_static
+@@ -798,6 +801,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -17364,7 +17378,7 @@ index f615634..a340983 100755
enable_libtool_lock
enable_targets
enable_werror
-@@ -1422,6 +1426,8 @@ Optional Packages:
+@@ -1462,6 +1466,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -17373,7 +17387,7 @@ index f615634..a340983 100755
Some influential environment variables:
CC C compiler command
-@@ -5114,8 +5120,8 @@ esac
+@@ -5403,8 +5409,8 @@ esac
@@ -17384,7 +17398,7 @@ index f615634..a340983 100755
-@@ -5155,7 +5161,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5444,7 +5450,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -17393,7 +17407,7 @@ index f615634..a340983 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5841,8 +5847,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6130,8 +6136,8 @@ $as_echo_n "checking whether the shell u
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -17404,13 +17418,13 @@ index f615634..a340983 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -5891,6 +5897,80 @@ esac
+@@ -6180,6 +6186,80 @@ esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
++if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
@@ -17457,7 +17471,7 @@ index f615634..a340983 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
++if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
@@ -17484,8 +17498,8 @@ index f615634..a340983 100755
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
- if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5907,6 +5987,11 @@ case $reload_flag in
+ if ${lt_cv_ld_reload_flag+:} false; then :
+@@ -6196,6 +6276,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -17497,7 +17511,7 @@ index f615634..a340983 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6075,7 +6160,8 @@ mingw* | pw32*)
+@@ -6364,7 +6449,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -17507,7 +17521,7 @@ index f615634..a340983 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6229,6 +6315,21 @@ esac
+@@ -6518,6 +6604,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -17529,7 +17543,7 @@ index f615634..a340983 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6244,9 +6345,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6533,9 +6634,162 @@ test -z "$deplibs_check_method" && depli
@@ -17550,7 +17564,7 @@ index f615634..a340983 100755
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
@@ -17562,7 +17576,7 @@ index f615634..a340983 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -17590,7 +17604,7 @@ index f615634..a340983 100755
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
@@ -17602,7 +17616,7 @@ index f615634..a340983 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -17650,7 +17664,7 @@ index f615634..a340983 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
@@ -17693,17 +17707,17 @@ index f615634..a340983 100755
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6262,7 +6516,7 @@ do
+ if ${ac_cv_prog_AR+:} false; then :
+@@ -6551,7 +6805,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6282,11 +6536,15 @@ $as_echo "no" >&6; }
+@@ -6571,11 +6825,15 @@ $as_echo "no" >&6; }
fi
@@ -17721,17 +17735,17 @@ index f615634..a340983 100755
+set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6302,7 +6560,7 @@ do
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
+@@ -6591,7 +6849,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
+ ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6321,6 +6579,10 @@ else
+@@ -6610,6 +6868,10 @@ else
$as_echo "no" >&6; }
fi
@@ -17742,7 +17756,7 @@ index f615634..a340983 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6332,16 +6594,72 @@ ac_tool_warned=yes ;;
+@@ -6621,12 +6883,11 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -17755,19 +17769,16 @@ index f615634..a340983 100755
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
+
+
+
+@@ -6637,6 +6898,63 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
-+if test "${lt_cv_ar_at_file+set}" = set; then :
++if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
@@ -17777,7 +17788,7 @@ index f615634..a340983 100755
+int
+main ()
+{
-
++
+ ;
+ return 0;
+}
@@ -17803,23 +17814,29 @@ index f615634..a340983 100755
+ fi
+ fi
+ rm -f conftest.* libconftest.a
-
++
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
++
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
-
++
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
++
++
++
++
++
++
-
-
-@@ -6683,8 +7001,8 @@ esac
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+@@ -6972,8 +7290,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -17830,7 +17847,7 @@ index f615634..a340983 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6720,6 +7038,7 @@ for ac_symprfx in "" "_"; do
+@@ -7009,6 +7327,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -17838,7 +17855,7 @@ index f615634..a340983 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -6761,6 +7080,18 @@ _LT_EOF
+@@ -7050,6 +7369,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -17857,7 +17874,7 @@ index f615634..a340983 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -6772,7 +7103,7 @@ _LT_EOF
+@@ -7061,7 +7392,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -17866,7 +17883,7 @@ index f615634..a340983 100755
const char *name;
void *address;
}
-@@ -6798,8 +7129,8 @@ static const void *lt_preloaded_setup() {
+@@ -7087,8 +7418,8 @@ static const void *lt_preloaded_setup()
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -17877,7 +17894,7 @@ index f615634..a340983 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6809,8 +7140,8 @@ _LT_EOF
+@@ -7098,8 +7429,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -17888,7 +17905,7 @@ index f615634..a340983 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -6847,6 +7178,16 @@ else
+@@ -7136,6 +7467,14 @@ else
$as_echo "ok" >&6; }
fi
@@ -17900,17 +17917,17 @@ index f615634..a340983 100755
+fi
+
+
-+
-+
-@@ -6868,6 +7209,45 @@ fi
+@@ -7157,6 +7496,47 @@ fi
+
+
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -17937,7 +17954,7 @@ index f615634..a340983 100755
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
+$as_echo "${with_libtool_sysroot}" >&6; }
-+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
@@ -17951,7 +17968,7 @@ index f615634..a340983 100755
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
-@@ -7074,6 +7454,123 @@ esac
+@@ -7363,6 +7743,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -17960,7 +17977,7 @@ index f615634..a340983 100755
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
@@ -17972,7 +17989,7 @@ index f615634..a340983 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -18000,7 +18017,7 @@ index f615634..a340983 100755
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
@@ -18012,7 +18029,7 @@ index f615634..a340983 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -18050,7 +18067,7 @@ index f615634..a340983 100755
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
++if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
@@ -18075,7 +18092,7 @@ index f615634..a340983 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7637,6 +8134,8 @@ _LT_EOF
+@@ -7926,6 +8423,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -18084,7 +18101,7 @@ index f615634..a340983 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7802,7 +8301,8 @@ fi
+@@ -8091,7 +8590,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -18094,7 +18111,7 @@ index f615634..a340983 100755
-@@ -7891,7 +8391,7 @@ aix3*)
+@@ -8180,7 +8680,7 @@ aix3*)
esac
# Global variables:
@@ -18103,7 +18120,7 @@ index f615634..a340983 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8189,8 +8689,6 @@ fi
+@@ -8478,8 +8978,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -18112,7 +18129,7 @@ index f615634..a340983 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8356,6 +8854,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8645,6 +9143,12 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -18125,7 +18142,7 @@ index f615634..a340983 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8418,7 +8922,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8707,7 +9211,7 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -18134,7 +18151,7 @@ index f615634..a340983 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8475,13 +8979,17 @@ case $host_os in
+@@ -8764,13 +9268,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -18147,7 +18164,7 @@ index f615634..a340983 100755
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
++if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
@@ -18158,7 +18175,7 @@ index f615634..a340983 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8542,6 +9050,11 @@ fi
+@@ -8831,6 +9339,11 @@ fi
@@ -18170,7 +18187,7 @@ index f615634..a340983 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8892,7 +9405,8 @@ _LT_EOF
+@@ -9181,7 +9694,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -18180,7 +18197,7 @@ index f615634..a340983 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8991,12 +9505,12 @@ _LT_EOF
+@@ -9280,12 +9794,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -18195,7 +18212,7 @@ index f615634..a340983 100755
fi
;;
esac
-@@ -9010,8 +9524,8 @@ _LT_EOF
+@@ -9299,8 +9813,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -18206,7 +18223,7 @@ index f615634..a340983 100755
fi
;;
-@@ -9029,8 +9543,8 @@ _LT_EOF
+@@ -9318,8 +9832,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -18217,7 +18234,7 @@ index f615634..a340983 100755
else
ld_shlibs=no
fi
-@@ -9076,8 +9590,8 @@ _LT_EOF
+@@ -9365,8 +9879,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -18228,7 +18245,7 @@ index f615634..a340983 100755
else
ld_shlibs=no
fi
-@@ -9207,7 +9721,13 @@ _LT_EOF
+@@ -9496,7 +10010,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -18236,14 +18253,14 @@ index f615634..a340983 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9220,22 +9740,29 @@ main ()
+@@ -9509,22 +10029,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -18286,7 +18303,7 @@ index f615634..a340983 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9247,7 +9774,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9536,7 +10063,13 @@ if test -z "$aix_libpath"; then aix_libp
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -18294,14 +18311,14 @@ index f615634..a340983 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-@@ -9260,22 +9793,29 @@ main ()
+@@ -9549,22 +10082,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -18344,7 +18361,7 @@ index f615634..a340983 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9320,20 +9860,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9609,20 +10149,63 @@ if test -z "$aix_libpath"; then aix_libp
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -18422,7 +18439,7 @@ index f615634..a340983 100755
;;
darwin* | rhapsody*)
-@@ -9394,7 +9977,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9683,7 +10266,7 @@ if test -z "$aix_libpath"; then aix_libp
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -18431,7 +18448,7 @@ index f615634..a340983 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9402,7 +9985,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9691,7 +10274,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux9*)
if test "$GCC" = yes; then
@@ -18440,7 +18457,7 @@ index f615634..a340983 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9418,7 +10001,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9707,7 +10290,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -18449,7 +18466,7 @@ index f615634..a340983 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9442,10 +10025,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9731,10 +10314,10 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -18462,7 +18479,7 @@ index f615634..a340983 100755
;;
esac
else
-@@ -9524,23 +10107,36 @@ fi
+@@ -9813,23 +10396,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -18477,7 +18494,7 @@ index f615634..a340983 100755
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
@@ -18507,7 +18524,7 @@ index f615634..a340983 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9625,7 +10221,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9914,7 +10510,7 @@ rm -f core conftest.err conftest.$ac_obj
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -18516,7 +18533,7 @@ index f615634..a340983 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9644,9 +10240,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9933,9 +10529,9 @@ rm -f core conftest.err conftest.$ac_obj
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -18528,7 +18545,7 @@ index f615634..a340983 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10222,8 +10818,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10511,8 +11107,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -18540,7 +18557,7 @@ index f615634..a340983 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10256,13 +10853,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10545,13 +11142,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -18613,7 +18630,7 @@ index f615634..a340983 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10354,7 +11009,7 @@ haiku*)
+@@ -10643,7 +11298,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -18622,7 +18639,16 @@ index f615634..a340983 100755
hardcode_into_libs=yes
;;
-@@ -11194,10 +11849,10 @@ else
+@@ -11439,7 +12094,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11442 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11483,10 +12138,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -18635,7 +18661,16 @@ index f615634..a340983 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11300,10 +11955,10 @@ else
+@@ -11545,7 +12200,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11548 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11589,10 +12244,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -18648,7 +18683,7 @@ index f615634..a340983 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12499,7 +13154,7 @@ if test "$enable_shared" = "yes"; then
+@@ -12779,7 +13434,7 @@ if test "$enable_shared" = "yes"; then
# since libbfd may not pull in the entirety of libiberty.
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
if test -n "$x"; then
@@ -18657,7 +18692,7 @@ index f615634..a340983 100755
fi
case "${host}" in
-@@ -13473,13 +14128,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -13757,13 +14412,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -18678,7 +18713,7 @@ index f615634..a340983 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -13494,14 +14156,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -13778,14 +14440,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -18697,7 +18732,7 @@ index f615634..a340983 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -13534,12 +14199,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -13818,12 +14483,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -18711,7 +18746,7 @@ index f615634..a340983 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -13594,8 +14259,13 @@ reload_flag \
+@@ -13878,8 +14543,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -18725,7 +18760,7 @@ index f615634..a340983 100755
STRIP \
RANLIB \
CC \
-@@ -13605,12 +14275,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -13889,12 +14559,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -18741,7 +18776,7 @@ index f615634..a340983 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -13626,7 +14298,6 @@ no_undefined_flag \
+@@ -13910,7 +14582,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -18749,7 +18784,7 @@ index f615634..a340983 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -13662,6 +14333,7 @@ module_cmds \
+@@ -13946,6 +14617,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -18757,7 +18792,7 @@ index f615634..a340983 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -14418,7 +15090,8 @@ $as_echo X"$file" |
+@@ -14711,7 +15383,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -18767,7 +18802,7 @@ index f615634..a340983 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -14521,19 +15194,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -14814,19 +15487,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -18811,7 +18846,7 @@ index f615634..a340983 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -14563,6 +15259,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -14856,6 +15552,12 @@ global_symbol_to_c_name_address=$lt_lt_c
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -18824,7 +18859,7 @@ index f615634..a340983 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -14572,6 +15274,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -14865,6 +15567,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -18834,7 +18869,7 @@ index f615634..a340983 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -14686,12 +15391,12 @@ with_gcc=$GCC
+@@ -14979,12 +15684,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -18850,7 +18885,7 @@ index f615634..a340983 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -14778,9 +15483,6 @@ inherit_rpath=$inherit_rpath
+@@ -15071,9 +15776,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -18860,7 +18895,7 @@ index f615634..a340983 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -14796,6 +15498,9 @@ include_expsyms=$lt_include_expsyms
+@@ -15089,6 +15791,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -18870,7 +18905,7 @@ index f615634..a340983 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -14828,210 +15533,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -15121,210 +15826,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -19072,15 +19107,9 @@ index f615634..a340983 100755
-_LT_EOF
- ;;
- esac
--
--
-- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-- || (rm -f "$cfgfile"; exit 1)
--
-- mv -f "$cfgfile" "$ofile" ||
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
-+
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
@@ -19238,17 +19267,18 @@ index f615634..a340983 100755
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
-+
-+
+
+- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+- || (rm -f "$cfgfile"; exit 1)
+
+- mv -f "$cfgfile" "$ofile" ||
+ mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index c7f4783..f2e002d 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
-@@ -167,7 +167,7 @@ changequote(,)dnl
+@@ -170,7 +170,7 @@ changequote(,)dnl
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
changequote([,])dnl
if test -n "$x"; then
@@ -19257,11 +19287,9 @@ index c7f4783..f2e002d 100644
fi
case "${host}" in
-diff --git a/zlib/configure b/zlib/configure
-index bba9fd2..25a2dae 100755
--- a/zlib/configure
+++ b/zlib/configure
-@@ -614,8 +614,11 @@ OTOOL
+@@ -646,8 +646,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -19273,7 +19301,7 @@ index bba9fd2..25a2dae 100755
OBJDUMP
LN_S
NM
-@@ -737,6 +740,7 @@ enable_static
+@@ -774,6 +777,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -19281,7 +19309,7 @@ index bba9fd2..25a2dae 100755
enable_libtool_lock
enable_host_shared
'
-@@ -1385,6 +1389,8 @@ Optional Packages:
+@@ -1428,6 +1432,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -19290,7 +19318,7 @@ index bba9fd2..25a2dae 100755
Some influential environment variables:
CC C compiler command
-@@ -3910,8 +3916,8 @@ esac
+@@ -4147,8 +4153,8 @@ esac
@@ -19301,7 +19329,7 @@ index bba9fd2..25a2dae 100755
-@@ -3951,7 +3957,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -4188,7 +4194,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -19310,7 +19338,7 @@ index bba9fd2..25a2dae 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -4767,8 +4773,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -5004,8 +5010,8 @@ $as_echo_n "checking whether the shell u
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -19321,13 +19349,13 @@ index bba9fd2..25a2dae 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -4817,6 +4823,80 @@ esac
+@@ -5054,6 +5060,80 @@ esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
++if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
@@ -19374,7 +19402,7 @@ index bba9fd2..25a2dae 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
++if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
@@ -19401,8 +19429,8 @@ index bba9fd2..25a2dae 100755
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
- if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -4833,6 +4913,11 @@ case $reload_flag in
+ if ${lt_cv_ld_reload_flag+:} false; then :
+@@ -5070,6 +5150,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -19414,7 +19442,7 @@ index bba9fd2..25a2dae 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -5001,7 +5086,8 @@ mingw* | pw32*)
+@@ -5238,7 +5323,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -19424,7 +19452,7 @@ index bba9fd2..25a2dae 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -5155,6 +5241,21 @@ esac
+@@ -5392,6 +5478,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -19446,7 +19474,7 @@ index bba9fd2..25a2dae 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -5170,9 +5271,163 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -5407,9 +5508,163 @@ test -z "$deplibs_check_method" && depli
@@ -19467,7 +19495,7 @@ index bba9fd2..25a2dae 100755
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
@@ -19479,7 +19507,7 @@ index bba9fd2..25a2dae 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -19507,7 +19535,7 @@ index bba9fd2..25a2dae 100755
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
@@ -19519,7 +19547,7 @@ index bba9fd2..25a2dae 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -19567,7 +19595,7 @@ index bba9fd2..25a2dae 100755
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
@@ -19611,17 +19639,17 @@ index bba9fd2..25a2dae 100755
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -5188,7 +5443,7 @@ do
+ if ${ac_cv_prog_AR+:} false; then :
+@@ -5425,7 +5680,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -5208,11 +5463,15 @@ $as_echo "no" >&6; }
+@@ -5445,11 +5700,15 @@ $as_echo "no" >&6; }
fi
@@ -19639,17 +19667,17 @@ index bba9fd2..25a2dae 100755
+set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -5228,7 +5487,7 @@ do
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
+@@ -5465,7 +5724,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
+ ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -5247,6 +5506,10 @@ else
+@@ -5484,6 +5743,10 @@ else
$as_echo "no" >&6; }
fi
@@ -19660,7 +19688,7 @@ index bba9fd2..25a2dae 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -5258,16 +5521,72 @@ ac_tool_warned=yes ;;
+@@ -5495,12 +5758,10 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -19672,20 +19700,16 @@ index bba9fd2..25a2dae 100755
-test -z "$AR_FLAGS" && AR_FLAGS=cru
+: ${AR=ar}
+: ${AR_FLAGS=cru}
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
+
+
+
+@@ -5512,6 +5773,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
-+if test "${lt_cv_ar_at_file+set}" = set; then :
++if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
@@ -19695,7 +19719,7 @@ index bba9fd2..25a2dae 100755
+int
+main ()
+{
-
++
+ ;
+ return 0;
+}
@@ -19721,23 +19745,30 @@ index bba9fd2..25a2dae 100755
+ fi
+ fi
+ rm -f conftest.* libconftest.a
-
++
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
++
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
-
++
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
-
-
-
-@@ -5609,8 +5928,8 @@ esac
++
++
++
++
++
++
++
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}strip; ac_word=$2
+@@ -5846,8 +6165,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -19748,7 +19779,7 @@ index bba9fd2..25a2dae 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -5646,6 +5965,7 @@ for ac_symprfx in "" "_"; do
+@@ -5883,6 +6202,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -19756,7 +19787,7 @@ index bba9fd2..25a2dae 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -5687,6 +6007,18 @@ _LT_EOF
+@@ -5924,6 +6244,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -19775,7 +19806,7 @@ index bba9fd2..25a2dae 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -5698,7 +6030,7 @@ _LT_EOF
+@@ -5935,7 +6267,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -19784,7 +19815,7 @@ index bba9fd2..25a2dae 100755
const char *name;
void *address;
}
-@@ -5724,8 +6056,8 @@ static const void *lt_preloaded_setup() {
+@@ -5961,8 +6293,8 @@ static const void *lt_preloaded_setup()
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -19795,7 +19826,7 @@ index bba9fd2..25a2dae 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -5735,8 +6067,8 @@ _LT_EOF
+@@ -5972,8 +6304,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -19806,7 +19837,7 @@ index bba9fd2..25a2dae 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -5773,6 +6105,19 @@ else
+@@ -6010,6 +6342,18 @@ else
$as_echo "ok" >&6; }
fi
@@ -19822,11 +19853,10 @@ index bba9fd2..25a2dae 100755
+
+
+
-+
-@@ -5793,6 +6138,41 @@ fi
+@@ -6031,6 +6375,42 @@ fi
@@ -19856,7 +19886,7 @@ index bba9fd2..25a2dae 100755
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
+$as_echo "${with_libtool_sysroot}" >&6; }
-+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
@@ -19865,10 +19895,11 @@ index bba9fd2..25a2dae 100755
+
+
+
-
++
# Check whether --enable-libtool-lock was given.
-@@ -6004,6 +6384,123 @@ esac
+ if test "${enable_libtool_lock+set}" = set; then :
+@@ -6241,6 +6621,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -19877,7 +19908,7 @@ index bba9fd2..25a2dae 100755
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
@@ -19889,7 +19920,7 @@ index bba9fd2..25a2dae 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -19917,7 +19948,7 @@ index bba9fd2..25a2dae 100755
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
@@ -19929,7 +19960,7 @@ index bba9fd2..25a2dae 100755
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
@@ -19967,7 +19998,7 @@ index bba9fd2..25a2dae 100755
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
++if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
@@ -19992,7 +20023,7 @@ index bba9fd2..25a2dae 100755
case $host_os in
rhapsody* | darwin*)
-@@ -6570,6 +7067,8 @@ _LT_EOF
+@@ -6807,6 +7304,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -20001,7 +20032,7 @@ index bba9fd2..25a2dae 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7033,7 +7532,8 @@ fi
+@@ -7269,7 +7768,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -20011,7 +20042,7 @@ index bba9fd2..25a2dae 100755
-@@ -7122,7 +7622,7 @@ aix3*)
+@@ -7358,7 +7858,7 @@ aix3*)
esac
# Global variables:
@@ -20020,7 +20051,7 @@ index bba9fd2..25a2dae 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -7420,8 +7920,6 @@ fi
+@@ -7656,8 +8156,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -20029,7 +20060,7 @@ index bba9fd2..25a2dae 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -7587,6 +8085,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -7823,6 +8321,12 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -20042,7 +20073,7 @@ index bba9fd2..25a2dae 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -7649,7 +8153,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -7885,7 +8389,7 @@ $as_echo_n "checking for $compiler optio
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -20051,7 +20082,7 @@ index bba9fd2..25a2dae 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -7706,13 +8210,17 @@ case $host_os in
+@@ -7942,13 +8446,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -20064,7 +20095,7 @@ index bba9fd2..25a2dae 100755
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
++if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
@@ -20075,7 +20106,7 @@ index bba9fd2..25a2dae 100755
#
# Check to make sure the PIC flag actually works.
-@@ -7773,6 +8281,11 @@ fi
+@@ -8009,6 +8517,11 @@ fi
@@ -20087,7 +20118,7 @@ index bba9fd2..25a2dae 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8123,7 +8636,8 @@ _LT_EOF
+@@ -8359,7 +8872,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -20097,7 +20128,7 @@ index bba9fd2..25a2dae 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8222,12 +8736,12 @@ _LT_EOF
+@@ -8458,12 +8972,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -20112,7 +20143,7 @@ index bba9fd2..25a2dae 100755
fi
;;
esac
-@@ -8241,8 +8755,8 @@ _LT_EOF
+@@ -8477,8 +8991,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -20123,7 +20154,7 @@ index bba9fd2..25a2dae 100755
fi
;;
-@@ -8260,8 +8774,8 @@ _LT_EOF
+@@ -8496,8 +9010,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -20134,7 +20165,7 @@ index bba9fd2..25a2dae 100755
else
ld_shlibs=no
fi
-@@ -8307,8 +8821,8 @@ _LT_EOF
+@@ -8543,8 +9057,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -20145,7 +20176,7 @@ index bba9fd2..25a2dae 100755
else
ld_shlibs=no
fi
-@@ -8438,7 +8952,13 @@ _LT_EOF
+@@ -8674,7 +9188,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -20153,14 +20184,14 @@ index bba9fd2..25a2dae 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x$gcc_no_link = xyes; then
- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -8454,22 +8974,29 @@ main ()
+@@ -8690,22 +9210,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -20203,7 +20234,7 @@ index bba9fd2..25a2dae 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -8481,7 +9008,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8717,7 +9244,13 @@ if test -z "$aix_libpath"; then aix_libp
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -20211,14 +20242,14 @@ index bba9fd2..25a2dae 100755
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
-+ if test "${lt_cv_aix_libpath_+set}" = set; then :
++ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x$gcc_no_link = xyes; then
- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -8497,22 +9030,29 @@ main ()
+@@ -8733,22 +9266,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -20261,7 +20292,7 @@ index bba9fd2..25a2dae 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -8557,20 +9097,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8793,20 +9333,63 @@ if test -z "$aix_libpath"; then aix_libp
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -20339,7 +20370,7 @@ index bba9fd2..25a2dae 100755
;;
darwin* | rhapsody*)
-@@ -8631,7 +9214,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8867,7 +9450,7 @@ if test -z "$aix_libpath"; then aix_libp
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -20348,7 +20379,7 @@ index bba9fd2..25a2dae 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -8639,7 +9222,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8875,7 +9458,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux9*)
if test "$GCC" = yes; then
@@ -20357,7 +20388,7 @@ index bba9fd2..25a2dae 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -8655,7 +9238,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8891,7 +9474,7 @@ if test -z "$aix_libpath"; then aix_libp
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -20366,7 +20397,7 @@ index bba9fd2..25a2dae 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -8679,10 +9262,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8915,10 +9498,10 @@ if test -z "$aix_libpath"; then aix_libp
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -20379,7 +20410,7 @@ index bba9fd2..25a2dae 100755
;;
esac
else
-@@ -8761,26 +9344,39 @@ fi
+@@ -8997,26 +9580,39 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -20394,13 +20425,13 @@ index bba9fd2..25a2dae 100755
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ if test x$gcc_no_link = xyes; then
- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20427,7 +20458,7 @@ index bba9fd2..25a2dae 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -8865,7 +9461,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9101,7 +9697,7 @@ rm -f core conftest.err conftest.$ac_obj
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -20436,7 +20467,7 @@ index bba9fd2..25a2dae 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -8884,9 +9480,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9120,9 +9716,9 @@ rm -f core conftest.err conftest.$ac_obj
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -20448,7 +20479,7 @@ index bba9fd2..25a2dae 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -9462,8 +10058,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -9698,8 +10294,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -20460,7 +20491,7 @@ index bba9fd2..25a2dae 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -9496,13 +10093,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -9732,13 +10329,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -20533,7 +20564,7 @@ index bba9fd2..25a2dae 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -9594,7 +10249,7 @@ haiku*)
+@@ -9830,7 +10485,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -20542,16 +20573,16 @@ index bba9fd2..25a2dae 100755
hardcode_into_libs=yes
;;
-@@ -10408,7 +11063,7 @@ else
+@@ -10644,7 +11299,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
--#line 10411 "configure"
+-#line 10647 "configure"
+#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-@@ -10452,10 +11107,10 @@ else
+@@ -10688,10 +11343,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -20564,16 +20595,16 @@ index bba9fd2..25a2dae 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -10514,7 +11169,7 @@ else
+@@ -10750,7 +11405,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
--#line 10517 "configure"
+-#line 10753 "configure"
+#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-@@ -10558,10 +11213,10 @@ else
+@@ -10794,10 +11449,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -20586,7 +20617,7 @@ index bba9fd2..25a2dae 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11993,13 +12648,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -12267,13 +12922,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -20607,7 +20638,7 @@ index bba9fd2..25a2dae 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -12014,14 +12676,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -12288,14 +12950,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -20626,7 +20657,7 @@ index bba9fd2..25a2dae 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -12054,12 +12719,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -12328,12 +12993,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -20640,7 +20671,7 @@ index bba9fd2..25a2dae 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -12114,8 +12779,13 @@ reload_flag \
+@@ -12388,8 +13053,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -20654,7 +20685,7 @@ index bba9fd2..25a2dae 100755
STRIP \
RANLIB \
CC \
-@@ -12125,12 +12795,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -12399,12 +13069,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -20670,7 +20701,7 @@ index bba9fd2..25a2dae 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -12146,7 +12818,6 @@ no_undefined_flag \
+@@ -12420,7 +13092,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -20678,7 +20709,7 @@ index bba9fd2..25a2dae 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -12182,6 +12853,7 @@ module_cmds \
+@@ -12456,6 +13127,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -20686,7 +20717,7 @@ index bba9fd2..25a2dae 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -12771,7 +13443,8 @@ $as_echo X"$file" |
+@@ -13054,7 +13726,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -20696,7 +20727,7 @@ index bba9fd2..25a2dae 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -12874,19 +13547,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -13157,19 +13830,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -20740,7 +20771,7 @@ index bba9fd2..25a2dae 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -12916,6 +13612,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -13199,6 +13895,12 @@ global_symbol_to_c_name_address=$lt_lt_c
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -20753,7 +20784,7 @@ index bba9fd2..25a2dae 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -12925,6 +13627,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -13208,6 +13910,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -20763,7 +20794,7 @@ index bba9fd2..25a2dae 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -13039,12 +13744,12 @@ with_gcc=$GCC
+@@ -13322,12 +14027,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -20779,7 +20810,7 @@ index bba9fd2..25a2dae 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -13131,9 +13836,6 @@ inherit_rpath=$inherit_rpath
+@@ -13414,9 +14119,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -20789,7 +20820,7 @@ index bba9fd2..25a2dae 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -13149,6 +13851,9 @@ include_expsyms=$lt_include_expsyms
+@@ -13432,6 +14134,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -20799,7 +20830,7 @@ index bba9fd2..25a2dae 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -13181,210 +13886,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -13464,210 +14169,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -21001,15 +21032,9 @@ index bba9fd2..25a2dae 100755
-_LT_EOF
- ;;
- esac
--
--
-- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-- || (rm -f "$cfgfile"; exit 1)
--
-- mv -f "$cfgfile" "$ofile" ||
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
-+
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
@@ -21167,12 +21192,12 @@ index bba9fd2..25a2dae 100755
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
-+
-+
+
+- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+- || (rm -f "$cfgfile"; exit 1)
+
+- mv -f "$cfgfile" "$ofile" ||
+ mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch b/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
deleted file mode 100644
index 795abf3659..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 9475aee8a702aa531737ec12dfd928d52951bc84 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:37:10 +0000
-Subject: [PATCH 07/13] Add the armv5e architecture to binutils
-
-Binutils has a comment that indicates it is supposed to match gcc for
-all of the support "-march=" settings, but it was lacking the armv5e setting.
-This was a simple way to add it, as thumb instructions shouldn't be generated
-by the compiler anyway.
-
-Upstream-Status: Denied
-Upstream maintainer indicated that we should not be using armv5e, even
-though it is a legal archicture defined by our gcc.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gas/config/tc-arm.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index 73d0531..4b9e32f 100644
---- a/gas/config/tc-arm.c
-+++ b/gas/config/tc-arm.c
-@@ -25421,6 +25421,7 @@ static const struct arm_arch_option_table arm_archs[] =
- ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
- ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
- ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
-+ ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP),
- ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP),
- ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
- ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/meta/recipes-devtools/binutils/binutils/0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
new file mode 100644
index 0000000000..5a195054f6
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
@@ -0,0 +1,32 @@
+From cd6151c8423a0550fd5758ce17664e34560a103c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 01:39:01 +0000
+Subject: [PATCH] don't let the distro compiler point to the wrong installation
+ location
+
+Thanks to RP for helping find the source code causing the issue.
+
+2010/08/13
+Nitin A Kamble <nitin.a.kamble@intel.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libiberty/Makefile.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
+index 0be45b4ae8..4817616bb2 100644
+--- a/libiberty/Makefile.in
++++ b/libiberty/Makefile.in
+@@ -364,7 +364,8 @@ install-strip: install
+ # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
+ # default multilib, so we have to take CFLAGS into account as well,
+ # since it will be passed the multilib flags.
+-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
++#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
++MULTIOSDIR = ""
+ install_to_libdir: all
+ if test -n "${target_header_dir}"; then \
+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
diff --git a/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
deleted file mode 100644
index af524ced29..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From b2d277937d11f1ce1d581f48ff74a25822a052da Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:39:01 +0000
-Subject: [PATCH 08/13] don't let the distro compiler point to the wrong
- installation location
-
-Thanks to RP for helping find the source code causing the issue.
-
-2010/08/13
-Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libiberty/Makefile.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index c7a4568..f766b72 100644
---- a/libiberty/Makefile.in
-+++ b/libiberty/Makefile.in
-@@ -364,7 +364,8 @@ install-strip: install
- # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
- # default multilib, so we have to take CFLAGS into account as well,
- # since it will be passed the multilib flags.
--MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
-+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
-+MULTIOSDIR = ""
- install_to_libdir: all
- if test -n "${target_header_dir}"; then \
- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch b/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
new file mode 100644
index 0000000000..655cc375a9
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -0,0 +1,251 @@
+From 8ee1a4986ea35bd1e8ab867c5639d5fdbd944d9f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Jan 2016 06:31:09 +0000
+Subject: [PATCH] warn for uses of system directories when cross linking
+
+2008-07-02 Joseph Myers <joseph@codesourcery.com>
+
+ ld/
+ * ld.h (args_type): Add error_poison_system_directories.
+ * ld.texinfo (--error-poison-system-directories): Document.
+ * ldfile.c (ldfile_add_library_path): Check
+ command_line.error_poison_system_directories.
+ * ldmain.c (main): Initialize
+ command_line.error_poison_system_directories.
+ * lexsup.c (enum option_values): Add
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
+ (ld_options): Add --error-poison-system-directories.
+ (parse_args): Handle new option.
+
+2007-06-13 Joseph Myers <joseph@codesourcery.com>
+
+ ld/
+ * config.in: Regenerate.
+ * ld.h (args_type): Add poison_system_directories.
+ * ld.texinfo (--no-poison-system-directories): Document.
+ * ldfile.c (ldfile_add_library_path): Check
+ command_line.poison_system_directories.
+ * ldmain.c (main): Initialize
+ command_line.poison_system_directories.
+ * lexsup.c (enum option_values): Add
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES.
+ (ld_options): Add --no-poison-system-directories.
+ (parse_args): Handle new option.
+
+2007-04-20 Joseph Myers <joseph@codesourcery.com>
+
+ Merge from Sourcery G++ binutils 2.17:
+
+ 2007-03-20 Joseph Myers <joseph@codesourcery.com>
+ Based on patch by Mark Hatle <mark.hatle@windriver.com>.
+ ld/
+ * configure.in (--enable-poison-system-directories): New option.
+ * configure, config.in: Regenerate.
+ * ldfile.c (ldfile_add_library_path): If
+ ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
+ /usr/lib, /usr/local/lib or /usr/X11R6/lib.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ld/config.in | 3 +++
+ ld/configure | 16 ++++++++++++++++
+ ld/configure.ac | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texi | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 16 ++++++++++++++++
+ 9 files changed, 86 insertions(+)
+
+--- a/ld/config.in
++++ b/ld/config.in
+@@ -31,6 +31,9 @@
+ language is requested. */
+ #undef ENABLE_NLS
+
++/* Define to warn for use of native system library directories */
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++
+ /* Additional extension a shared object might have. */
+ #undef EXTRA_SHLIB_EXTENSION
+
+--- a/ld/configure
++++ b/ld/configure
+@@ -827,6 +827,7 @@ with_lib_path
+ enable_targets
+ enable_64_bit_bfd
+ with_sysroot
++enable_poison_system_directories
+ enable_gold
+ enable_got
+ enable_compressed_debug_sections
+@@ -1491,6 +1492,8 @@ Optional Features:
+ --disable-largefile omit support for large files
+ --enable-targets alternative target configurations
+ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
++ --enable-poison-system-directories
++ warn for use of native system library directories
+ --enable-gold[=ARG] build gold [ARG={default,yes,no}]
+ --enable-got=<type> GOT handling scheme (target, single, negative,
+ multigot)
+@@ -16619,6 +16622,19 @@ fi
+
+
+
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++ enableval=$enable_poison_system_directories;
++else
++ enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
++
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
++
+ # Check whether --enable-gold was given.
+ if test "${enable_gold+set}" = set; then :
+ enableval=$enable_gold; case "${enableval}" in
+--- a/ld/configure.ac
++++ b/ld/configure.ac
+@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
+ AC_SUBST(TARGET_SYSTEM_ROOT)
+ AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+
++AC_ARG_ENABLE([poison-system-directories],
++ AS_HELP_STRING([--enable-poison-system-directories],
++ [warn for use of native system library directories]),,
++ [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++ [1],
++ [Define to warn for use of native system library directories])
++fi
++
+ dnl Use --enable-gold to decide if this linker should be the default.
+ dnl "install_as_default" is set to false if gold is the default linker.
+ dnl "installed_linker" is the installed BFD linker name.
+--- a/ld/ld.h
++++ b/ld/ld.h
+@@ -180,6 +180,14 @@ typedef struct
+ in the linker script. */
+ bfd_boolean force_group_allocation;
+
++ /* If TRUE (the default) warn for uses of system directories when
++ cross linking. */
++ bfd_boolean poison_system_directories;
++
++ /* If TRUE (default FALSE) give an error for uses of system
++ directories when cross linking instead of a warning. */
++ bfd_boolean error_poison_system_directories;
++
+ /* Big or little endian as set on command line. */
+ enum endian_enum endian;
+
+--- a/ld/ld.texi
++++ b/ld/ld.texi
+@@ -2557,6 +2557,18 @@ string identifying the original linked f
+
+ Passing @code{none} for @var{style} disables the setting from any
+ @code{--build-id} options earlier on the command line.
++
++@kindex --no-poison-system-directories
++@item --no-poison-system-directories
++Do not warn for @option{-L} options using system directories such as
++@file{/usr/lib} when cross linking. This option is intended for use
++in chroot environments when such directories contain the correct
++libraries for the target system rather than the host.
++
++@kindex --error-poison-system-directories
++@item --error-poison-system-directories
++Give an error instead of a warning for @option{-L} options using
++system directories when cross linking.
+ @end table
+
+ @c man end
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
+@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *nam
+ new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL);
+ else
+ new_dirs->name = xstrdup (name);
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++ if (command_line.poison_system_directories
++ && ((!strncmp (name, "/lib", 4))
++ || (!strncmp (name, "/usr/lib", 8))
++ || (!strncmp (name, "/usr/local/lib", 14))
++ || (!strncmp (name, "/usr/X11R6/lib", 14))))
++ {
++ if (command_line.error_poison_system_directories)
++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
++ "cross-compilation\n"), name);
++ else
++ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
++ "cross-compilation\n"), name);
++ }
++#endif
++
+ }
+
+ /* Try to open a BFD for a lang_input_statement. */
+--- a/ld/ldlex.h
++++ b/ld/ldlex.h
+@@ -150,6 +150,8 @@ enum option_values
+ OPTION_FORCE_GROUP_ALLOCATION,
+ OPTION_PRINT_MAP_DISCARDED,
+ OPTION_NO_PRINT_MAP_DISCARDED,
++ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
+ };
+
+ /* The initial parser states. */
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
+@@ -270,6 +270,8 @@ main (int argc, char **argv)
+ command_line.warn_mismatch = TRUE;
+ command_line.warn_search_mismatch = TRUE;
+ command_line.check_section_addresses = -1;
++ command_line.poison_system_directories = TRUE;
++ command_line.error_poison_system_directories = FALSE;
+
+ /* We initialize DEMANGLING based on the environment variable
+ COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
+--- a/ld/lexsup.c
++++ b/ld/lexsup.c
+@@ -549,6 +549,14 @@ static const struct ld_option ld_options
+ { {"no-print-map-discarded", no_argument, NULL, OPTION_NO_PRINT_MAP_DISCARDED},
+ '\0', NULL, N_("Do not show discarded sections in map file output"),
+ TWO_DASHES },
++ { {"no-poison-system-directories", no_argument, NULL,
++ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
++ '\0', NULL, N_("Do not warn for -L options using system directories"),
++ TWO_DASHES },
++ { {"error-poison-system-directories", no_argument, NULL,
++ + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
++ '\0', NULL, N_("Give an error for -L options using system directories"),
++ TWO_DASHES },
+ };
+
+ #define OPTION_COUNT ARRAY_SIZE (ld_options)
+@@ -1590,6 +1598,13 @@ parse_args (unsigned argc, char **argv)
+
+ case OPTION_PRINT_MAP_DISCARDED:
+ config.print_map_discarded = TRUE;
++
++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
++ command_line.poison_system_directories = FALSE;
++ break;
++
++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
++ command_line.error_poison_system_directories = TRUE;
+ break;
+ }
+ }
diff --git a/meta/recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/meta/recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
new file mode 100644
index 0000000000..e63d278bcd
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
@@ -0,0 +1,49 @@
+From 903a43f07b7229adadff0f01d560646eb4b0e200 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 01:42:38 +0000
+Subject: [PATCH] Fix rpath in libtool when sysroot is enabled
+
+Enabling sysroot support in libtool exposed a bug where the final
+library had an RPATH encoded into it which still pointed to the
+sysroot. This works around the issue until it gets sorted out
+upstream.
+
+Fix suggested by Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 70e856e065..11ee684ccc 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -8035,9 +8035,11 @@ EOF
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $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
+- func_replace_sysroot "$libdir"
+- libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+@@ -8770,6 +8772,10 @@ EOF
+ hardcode_libdirs=
+ for libdir in $compile_rpath $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/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
deleted file mode 100644
index 3c83e69e43..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-From 7ab8e318659eb5d9adc758c78d084a95560b93fd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 15 Jan 2016 06:31:09 +0000
-Subject: [PATCH 09/13] warn for uses of system directories when cross linking
-
-2008-07-02 Joseph Myers <joseph@codesourcery.com>
-
- ld/
- * ld.h (args_type): Add error_poison_system_directories.
- * ld.texinfo (--error-poison-system-directories): Document.
- * ldfile.c (ldfile_add_library_path): Check
- command_line.error_poison_system_directories.
- * ldmain.c (main): Initialize
- command_line.error_poison_system_directories.
- * lexsup.c (enum option_values): Add
- OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
- (ld_options): Add --error-poison-system-directories.
- (parse_args): Handle new option.
-
-2007-06-13 Joseph Myers <joseph@codesourcery.com>
-
- ld/
- * config.in: Regenerate.
- * ld.h (args_type): Add poison_system_directories.
- * ld.texinfo (--no-poison-system-directories): Document.
- * ldfile.c (ldfile_add_library_path): Check
- command_line.poison_system_directories.
- * ldmain.c (main): Initialize
- command_line.poison_system_directories.
- * lexsup.c (enum option_values): Add
- OPTION_NO_POISON_SYSTEM_DIRECTORIES.
- (ld_options): Add --no-poison-system-directories.
- (parse_args): Handle new option.
-
-2007-04-20 Joseph Myers <joseph@codesourcery.com>
-
- Merge from Sourcery G++ binutils 2.17:
-
- 2007-03-20 Joseph Myers <joseph@codesourcery.com>
- Based on patch by Mark Hatle <mark.hatle@windriver.com>.
- ld/
- * configure.in (--enable-poison-system-directories): New option.
- * configure, config.in: Regenerate.
- * ldfile.c (ldfile_add_library_path): If
- ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
- /usr/lib, /usr/local/lib or /usr/X11R6/lib.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- ld/config.in | 3 +++
- ld/configure | 16 ++++++++++++++++
- ld/configure.ac | 10 ++++++++++
- ld/ld.h | 8 ++++++++
- ld/ld.texinfo | 12 ++++++++++++
- ld/ldfile.c | 17 +++++++++++++++++
- ld/ldlex.h | 2 ++
- ld/ldmain.c | 2 ++
- ld/lexsup.c | 16 ++++++++++++++++
- 9 files changed, 86 insertions(+)
-
-diff --git a/ld/config.in b/ld/config.in
-index 2c6d698..d3cb7e8 100644
---- a/ld/config.in
-+++ b/ld/config.in
-@@ -17,6 +17,9 @@
- language is requested. */
- #undef ENABLE_NLS
-
-+/* Define to warn for use of native system library directories */
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+
- /* Additional extension a shared object might have. */
- #undef EXTRA_SHLIB_EXTENSION
-
-diff --git a/ld/configure b/ld/configure
-index 3df1149..0601c98 100755
---- a/ld/configure
-+++ b/ld/configure
-@@ -792,6 +792,7 @@ with_lib_path
- enable_targets
- enable_64_bit_bfd
- with_sysroot
-+enable_poison_system_directories
- enable_gold
- enable_got
- enable_compressed_debug_sections
-@@ -1449,6 +1450,8 @@ Optional Features:
- --disable-largefile omit support for large files
- --enable-targets alternative target configurations
- --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-+ --enable-poison-system-directories
-+ warn for use of native system library directories
- --enable-gold[=ARG] build gold [ARG={default,yes,no}]
- --enable-got=<type> GOT handling scheme (target, single, negative,
- multigot)
-@@ -16313,6 +16316,19 @@ fi
-
-
-
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+ enableval=$enable_poison_system_directories;
-+else
-+ enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Check whether --enable-gold was given.
- if test "${enable_gold+set}" = set; then :
- enableval=$enable_gold; case "${enableval}" in
-diff --git a/ld/configure.ac b/ld/configure.ac
-index d17281f..9fb3db9 100644
---- a/ld/configure.ac
-+++ b/ld/configure.ac
-@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
- AC_SUBST(TARGET_SYSTEM_ROOT)
- AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
-
-+AC_ARG_ENABLE([poison-system-directories],
-+ AS_HELP_STRING([--enable-poison-system-directories],
-+ [warn for use of native system library directories]),,
-+ [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+ [1],
-+ [Define to warn for use of native system library directories])
-+fi
-+
- dnl Use --enable-gold to decide if this linker should be the default.
- dnl "install_as_default" is set to false if gold is the default linker.
- dnl "installed_linker" is the installed BFD linker name.
-diff --git a/ld/ld.h b/ld/ld.h
-index 85a48ad..a8fdddf 100644
---- a/ld/ld.h
-+++ b/ld/ld.h
-@@ -169,6 +169,14 @@ typedef struct
- /* If set, display the target memory usage (per memory region). */
- bfd_boolean print_memory_usage;
-
-+ /* If TRUE (the default) warn for uses of system directories when
-+ cross linking. */
-+ bfd_boolean poison_system_directories;
-+
-+ /* If TRUE (default FALSE) give an error for uses of system
-+ directories when cross linking instead of a warning. */
-+ bfd_boolean error_poison_system_directories;
-+
- /* Big or little endian as set on command line. */
- enum endian_enum endian;
-
-diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index bc16764..838c75d 100644
---- a/ld/ld.texinfo
-+++ b/ld/ld.texinfo
-@@ -2357,6 +2357,18 @@ string identifying the original linked file does not change.
-
- Passing @code{none} for @var{style} disables the setting from any
- @code{--build-id} options earlier on the command line.
-+
-+@kindex --no-poison-system-directories
-+@item --no-poison-system-directories
-+Do not warn for @option{-L} options using system directories such as
-+@file{/usr/lib} when cross linking. This option is intended for use
-+in chroot environments when such directories contain the correct
-+libraries for the target system rather than the host.
-+
-+@kindex --error-poison-system-directories
-+@item --error-poison-system-directories
-+Give an error instead of a warning for @option{-L} options using
-+system directories when cross linking.
- @end table
-
- @c man end
-diff --git a/ld/ldfile.c b/ld/ldfile.c
-index e397737..013727b 100644
---- a/ld/ldfile.c
-+++ b/ld/ldfile.c
-@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
- new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
- else
- new_dirs->name = xstrdup (name);
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+ if (command_line.poison_system_directories
-+ && ((!strncmp (name, "/lib", 4))
-+ || (!strncmp (name, "/usr/lib", 8))
-+ || (!strncmp (name, "/usr/local/lib", 14))
-+ || (!strncmp (name, "/usr/X11R6/lib", 14))))
-+ {
-+ if (command_line.error_poison_system_directories)
-+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
-+ "cross-compilation\n"), name);
-+ else
-+ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
-+ "cross-compilation\n"), name);
-+ }
-+#endif
-+
- }
-
- /* Try to open a BFD for a lang_input_statement. */
-diff --git a/ld/ldlex.h b/ld/ldlex.h
-index cf943e4..12cfcaa 100644
---- a/ld/ldlex.h
-+++ b/ld/ldlex.h
-@@ -144,6 +144,8 @@ enum option_values
- OPTION_PRINT_MEMORY_USAGE,
- OPTION_REQUIRE_DEFINED_SYMBOL,
- OPTION_ORPHAN_HANDLING,
-+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
-+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
- };
-
- /* The initial parser states. */
-diff --git a/ld/ldmain.c b/ld/ldmain.c
-index e7a8dff..3ccf2af 100644
---- a/ld/ldmain.c
-+++ b/ld/ldmain.c
-@@ -257,6 +257,8 @@ main (int argc, char **argv)
- command_line.warn_mismatch = TRUE;
- command_line.warn_search_mismatch = TRUE;
- command_line.check_section_addresses = -1;
-+ command_line.poison_system_directories = TRUE;
-+ command_line.error_poison_system_directories = FALSE;
-
- /* We initialize DEMANGLING based on the environment variable
- COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 6d28e91..5c9da57 100644
---- a/ld/lexsup.c
-+++ b/ld/lexsup.c
-@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
- { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
- '\0', N_("=MODE"), N_("Control how orphan sections are handled."),
- TWO_DASHES },
-+ { {"no-poison-system-directories", no_argument, NULL,
-+ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
-+ '\0', NULL, N_("Do not warn for -L options using system directories"),
-+ TWO_DASHES },
-+ { {"error-poison-system-directories", no_argument, NULL,
-+ + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
-+ '\0', NULL, N_("Give an error for -L options using system directories"),
-+ TWO_DASHES },
- };
-
- #define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -1550,6 +1558,14 @@ parse_args (unsigned argc, char **argv)
- einfo (_("%P%F: invalid argument to option"
- " \"--orphan-handling\"\n"));
- break;
-+
-+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
-+ command_line.poison_system_directories = FALSE;
-+ break;
-+
-+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
-+ command_line.error_poison_system_directories = TRUE;
-+ break;
- }
- }
-
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0010-Change-default-emulation-for-mips64-linux.patch b/meta/recipes-devtools/binutils/binutils/0010-Change-default-emulation-for-mips64-linux.patch
new file mode 100644
index 0000000000..e6b50dbcde
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0010-Change-default-emulation-for-mips64-linux.patch
@@ -0,0 +1,52 @@
+From 84349ede307f61d624e5d97397074f5177a5bdc9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 01:44:14 +0000
+Subject: [PATCH] Change default emulation for mips64*-*-linux
+
+we change the default emulations to be N64 instead of N32
+
+Upstream-Status: Inappropriate [ OE configuration Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ bfd/config.bfd | 8 ++++----
+ ld/configure.tgt | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -915,12 +915,12 @@ case "${targ}" in
+ targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
+ ;;
+ mips64*el-*-linux*)
+- targ_defvec=mips_elf32_ntrad_le_vec
+- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
++ targ_defvec=mips_elf64_trad_le_vec
++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
+ ;;
+ mips64*-*-linux*)
+- targ_defvec=mips_elf32_ntrad_be_vec
+- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
++ targ_defvec=mips_elf64_trad_be_vec
++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_be_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
+ ;;
+ mips*el-*-linux*)
+ targ_defvec=mips_elf32_trad_le_vec
+--- a/ld/configure.tgt
++++ b/ld/configure.tgt
+@@ -468,11 +468,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip
+ mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
+ targ_extra_emuls="elf32elmipvxworks" ;;
+ mips*-*-windiss) targ_emul=elf32mipswindiss ;;
+-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
+- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
++mips64*el-*-linux-*) targ_emul=elf64ltsmip
++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
+ targ_extra_libpath=$targ_extra_emuls ;;
+-mips64*-*-linux-*) targ_emul=elf32btsmipn32
+- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
++mips64*-*-linux-*) targ_emul=elf64btsmip
++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
+ targ_extra_libpath=$targ_extra_emuls ;;
+ mips*el-*-linux-*) targ_emul=elf32ltsmip
+ targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
diff --git a/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
deleted file mode 100644
index e2f6a51a39..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 27fc7a4927ab92925a5be84217959d9f1c808ccc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:42:38 +0000
-Subject: [PATCH 10/13] Fix rpath in libtool when sysroot is enabled
-
-Enabling sysroot support in libtool exposed a bug where the final
-library had an RPATH encoded into it which still pointed to the
-sysroot. This works around the issue until it gets sorted out
-upstream.
-
-Fix suggested by Richard Purdie <richard.purdie@linuxfoundation.org>
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 70e856e..11ee684 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -8035,9 +8035,11 @@ EOF
- test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
- for libdir in $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
-- func_replace_sysroot "$libdir"
-- libdir=$func_replace_sysroot_result
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
-@@ -8770,6 +8772,10 @@ EOF
- hardcode_libdirs=
- for libdir in $compile_rpath $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"
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0011-Add-support-for-Netlogic-XLP.patch b/meta/recipes-devtools/binutils/binutils/0011-Add-support-for-Netlogic-XLP.patch
new file mode 100644
index 0000000000..b710752245
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0011-Add-support-for-Netlogic-XLP.patch
@@ -0,0 +1,362 @@
+From 97e0fdbf8e85a7e690ac09d01a2ae93ba00cfb5d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 14 Feb 2016 17:06:19 +0000
+Subject: [PATCH] Add support for Netlogic XLP
+
+Patch From: Nebu Philips <nphilips@netlogicmicro.com>
+
+Using the mipsisa64r2nlm target, add support for XLP from
+Netlogic. Also, update vendor name to NLM wherever applicable.
+
+Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been
+assigned to INSN_OCTEON3
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ bfd/aoutx.h | 1 +
+ bfd/archures.c | 1 +
+ bfd/bfd-in2.h | 1 +
+ bfd/config.bfd | 5 +++++
+ bfd/cpu-mips.c | 6 ++++--
+ bfd/elfxx-mips.c | 8 ++++++++
+ binutils/readelf.c | 1 +
+ gas/config/tc-mips.c | 4 +++-
+ gas/configure | 3 +++
+ include/elf/mips.h | 1 +
+ include/opcode/mips.h | 6 ++++++
+ ld/configure.tgt | 3 +++
+ opcodes/mips-dis.c | 12 +++++-------
+ opcodes/mips-opc.c | 31 ++++++++++++++++++++-----------
+ 14 files changed, 62 insertions(+), 21 deletions(-)
+
+--- a/bfd/aoutx.h
++++ b/bfd/aoutx.h
+@@ -799,6 +799,7 @@ NAME (aout, machine_type) (enum bfd_arch
+ case bfd_mach_mipsisa64r6:
+ case bfd_mach_mips_sb1:
+ case bfd_mach_mips_xlr:
++ case bfd_mach_mips_xlp:
+ /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */
+ arch_flags = M_MIPS2;
+ break;
+--- a/bfd/archures.c
++++ b/bfd/archures.c
+@@ -185,6 +185,7 @@ DESCRIPTION
+ .#define bfd_mach_mips_octeon3 6503
+ .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR'. *}
+ .#define bfd_mach_mips_interaptiv_mr2 736550 {* decimal 'IA2'. *}
++.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP'. *}
+ .#define bfd_mach_mipsisa32 32
+ .#define bfd_mach_mipsisa32r2 33
+ .#define bfd_mach_mipsisa32r3 34
+--- a/bfd/bfd-in2.h
++++ b/bfd/bfd-in2.h
+@@ -2125,6 +2125,7 @@ enum bfd_architecture
+ #define bfd_mach_mips_octeon3 6503
+ #define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
+ #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
++#define bfd_mach_mips_xlp 887680 /* decimal 'XLP'. */
+ #define bfd_mach_mipsisa32 32
+ #define bfd_mach_mipsisa32r2 33
+ #define bfd_mach_mipsisa32r3 34
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -898,6 +898,11 @@ case "${targ}" in
+ targ_defvec=mips_elf32_le_vec
+ targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
+ ;;
++ mipsisa64*-*-elf*)
++ targ_defvec=mips_elf32_trad_be_vec
++ targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
++ want64=true
++ ;;
+ mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
+ targ_defvec=mips_elf32_be_vec
+ targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
+--- a/bfd/cpu-mips.c
++++ b/bfd/cpu-mips.c
+@@ -107,7 +107,8 @@ enum
+ I_mipsocteon3,
+ I_xlr,
+ I_interaptiv_mr2,
+- I_micromips
++ I_micromips,
++ I_xlp
+ };
+
+ #define NN(index) (&arch_info_struct[(index) + 1])
+@@ -162,7 +163,8 @@ static const bfd_arch_info_type arch_inf
+ N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
+ N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE,
+ NN(I_interaptiv_mr2)),
+- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
++ N (64, 64, bfd_mach_mips_micromips, "mips:micromips", FALSE, NN(I_micromips)),
++ N (64, 64, bfd_mach_mips_xlp, "mips:xlp", FALSE, NULL)
+ };
+
+ /* The default architecture is mips:3000, but with a machine number of
+--- a/bfd/elfxx-mips.c
++++ b/bfd/elfxx-mips.c
+@@ -6999,6 +6999,9 @@ _bfd_elf_mips_mach (flagword flags)
+ case E_MIPS_MACH_IAMR2:
+ return bfd_mach_mips_interaptiv_mr2;
+
++ case E_MIPS_MACH_XLP:
++ return bfd_mach_mips_xlp;
++
+ default:
+ switch (flags & EF_MIPS_ARCH)
+ {
+@@ -12360,6 +12363,10 @@ mips_set_isa_flags (bfd *abfd)
+ val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
+ break;
+
++ case bfd_mach_mips_xlp:
++ val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_XLP;
++ break;
++
+ case bfd_mach_mipsisa32:
+ val = E_MIPS_ARCH_32;
+ break;
+@@ -14394,6 +14401,7 @@ static const struct mips_mach_extension
+ { bfd_mach_mips_gs264e, bfd_mach_mips_gs464e },
+ { bfd_mach_mips_gs464e, bfd_mach_mips_gs464 },
+ { bfd_mach_mips_gs464, bfd_mach_mipsisa64r2 },
++ { bfd_mach_mips_xlp, bfd_mach_mipsisa64r2 },
+
+ /* MIPS64 extensions. */
+ { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
+--- a/binutils/readelf.c
++++ b/binutils/readelf.c
+@@ -3446,6 +3446,7 @@ get_machine_flags (Filedata * filedata,
+ case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
+ case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
+ case E_MIPS_MACH_IAMR2: strcat (buf, ", interaptiv-mr2"); break;
++ case E_MIPS_MACH_XLP: strcat (buf, ", xlp"); break;
+ case 0:
+ /* We simply ignore the field in this case to avoid confusion:
+ MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
+--- a/gas/config/tc-mips.c
++++ b/gas/config/tc-mips.c
+@@ -568,6 +568,7 @@ static int mips_32bitmode = 0;
+ || mips_opts.arch == CPU_RM7000 \
+ || mips_opts.arch == CPU_VR5500 \
+ || mips_opts.micromips \
++ || mips_opts.arch == CPU_XLP \
+ )
+
+ /* Whether the processor uses hardware interlocks to protect reads
+@@ -597,6 +598,7 @@ static int mips_32bitmode = 0;
+ && mips_opts.isa != ISA_MIPS3) \
+ || mips_opts.arch == CPU_R4300 \
+ || mips_opts.micromips \
++ || mips_opts.arch == CPU_XLP \
+ )
+
+ /* Whether the processor uses hardware interlocks to protect reads
+@@ -20138,7 +20140,7 @@ static const struct mips_cpu_info mips_c
+ /* Broadcom XLP.
+ XLP is mostly like XLR, with the prominent exception that it is
+ MIPS64R2 rather than MIPS64. */
+- { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR },
++ { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP },
+
+ /* MIPS 64 Release 6. */
+ { "i6400", 0, ASE_VIRT | ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
+--- a/gas/configure
++++ b/gas/configure
+@@ -13377,6 +13377,9 @@ _ACEOF
+ mipsisa64r6 | mipsisa64r6el)
+ mips_cpu=mips64r6
+ ;;
++ mipsisa64r2nlm | mipsisa64r2nlmel)
++ mips_cpu=xlp
++ ;;
+ mipstx39 | mipstx39el)
+ mips_cpu=r3900
+ ;;
+--- a/include/elf/mips.h
++++ b/include/elf/mips.h
+@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
+ #define E_MIPS_MACH_SB1 0x008a0000
+ #define E_MIPS_MACH_OCTEON 0x008b0000
+ #define E_MIPS_MACH_XLR 0x008c0000
++#define E_MIPS_MACH_XLP 0x008f0000
+ #define E_MIPS_MACH_OCTEON2 0x008d0000
+ #define E_MIPS_MACH_OCTEON3 0x008e0000
+ #define E_MIPS_MACH_5400 0x00910000
+--- a/include/opcode/mips.h
++++ b/include/opcode/mips.h
+@@ -1260,6 +1260,8 @@ static const unsigned int mips_isa_table
+ #define INSN_XLR 0x00000020
+ /* Imagination interAptiv MR2. */
+ #define INSN_INTERAPTIV_MR2 0x04000000
++/* Netlogic XlP instruction */
++#define INSN_XLP 0x00000080
+
+ /* DSP ASE */
+ #define ASE_DSP 0x00000001
+@@ -1384,6 +1386,7 @@ static const unsigned int mips_isa_table
+ #define CPU_OCTEON3 6503
+ #define CPU_XLR 887682 /* decimal 'XLR' */
+ #define CPU_INTERAPTIV_MR2 736550 /* decimal 'IA2' */
++#define CPU_XLP 887680 /* decimal 'XLP' */
+
+ /* Return true if the given CPU is included in INSN_* mask MASK. */
+
+@@ -1461,6 +1464,9 @@ cpu_is_member (int cpu, unsigned int mas
+ return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
+ || ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
+
++ case CPU_XLP:
++ return (mask & INSN_XLP) != 0;
++
+ default:
+ return FALSE;
+ }
+--- a/ld/configure.tgt
++++ b/ld/configure.tgt
+@@ -454,6 +454,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mi
+ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
+ targ_emul=elf32btsmip
+ targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
++mipsisa64*-*-elf*) targ_emul=elf32btsmip
++ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;;
+ mips64*el-ps2-elf*) targ_emul=elf32lr5900n32
+ targ_extra_emuls="elf32lr5900"
+ targ_extra_libpath=$targ_extra_emuls ;;
+--- a/opcodes/mips-dis.c
++++ b/opcodes/mips-dis.c
+@@ -673,13 +673,11 @@ const struct mips_arch_choice mips_arch_
+ mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
+ mips_cp1_names_mips3264, mips_hwr_names_numeric },
+
+- /* XLP is mostly like XLR, with the prominent exception it is being
+- MIPS64R2. */
+- { "xlp", 1, bfd_mach_mips_xlr, CPU_XLR,
+- ISA_MIPS64R2 | INSN_XLR, 0,
+- mips_cp0_names_xlr,
+- mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
+- mips_cp1_names_mips3264, mips_hwr_names_numeric },
++ { "xlp", 1, bfd_mach_mips_xlp, CPU_XLP,
++ ISA_MIPS64R2 | INSN_XLP, 0,
++ mips_cp0_names_mips3264r2,
++ mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
++ mips_cp1_names_mips3264, mips_hwr_names_mips3264r2 },
+
+ /* This entry, mips16, is here only for ISA/processor selection; do
+ not print its name. */
+--- a/opcodes/mips-opc.c
++++ b/opcodes/mips-opc.c
+@@ -328,6 +328,7 @@ decode_mips_operand (const char *p)
+ #define IOCT3 INSN_OCTEON3
+ #define XLR INSN_XLR
+ #define IAMR2 INSN_INTERAPTIV_MR2
++#define XLP INSN_XLP
+ #define IVIRT ASE_VIRT
+ #define IVIRT64 ASE_VIRT64
+
+@@ -990,6 +991,7 @@ const struct mips_opcode mips_builtin_op
+ {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
+ {"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 },
+ {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
++{"crc", "d,s,t", 0x7000001c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 },
+ /* ctc0 is at the bottom of the table. */
+ {"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
+ {"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
+@@ -1022,12 +1024,13 @@ const struct mips_opcode mips_builtin_op
+ {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 },
+ {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 },
+ {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 },
+-{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR, 0, 0 },
++{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR|XLP, 0, 0 },
+ {"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5, 0, 0 },
+ {"dclo", "d,s", 0x00000053, 0xfc1f07ff, WR_1|RD_2, 0, I69, 0, 0 },
+ {"dclo", "U,s", 0x70000025, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, I69 },
+ {"dclz", "d,s", 0x00000052, 0xfc1f07ff, WR_1|RD_2, 0, I69, 0, 0 },
+ {"dclz", "U,s", 0x70000024, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, I69 },
++{"dcrc", "d,s,t", 0x7000001d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 },
+ /* dctr and dctw are used on the r5000. */
+ {"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
+ {"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
+@@ -1099,6 +1102,7 @@ const struct mips_opcode mips_builtin_op
+ {"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 },
+ {"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
+ {"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
++{"dmfur", "t,d", 0x7000001e, 0xffe007ff, WR_1, 0, XLP, 0, 0 },
+ {"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 },
+ {"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 },
+ {"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE },
+@@ -1114,6 +1118,8 @@ const struct mips_opcode mips_builtin_op
+ /* dmfc3 is at the bottom of the table. */
+ /* dmtc3 is at the bottom of the table. */
+ {"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
++{"dmtur", "t,d", 0x7000001f, 0xffe007ff, RD_1, 0, XLP, 0, 0 },
++{"dmul", "d,s,t", 0x70000006, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 },
+ {"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
+ {"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 },
+ {"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
+@@ -1267,9 +1273,9 @@ const struct mips_opcode mips_builtin_op
+ {"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 },
+ {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 },
+ {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 },
+-{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
+-{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
+-{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
++{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
++{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
++{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
+ {"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
+ {"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
+ {"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF },
+@@ -1438,7 +1444,7 @@ const struct mips_opcode mips_builtin_op
+ {"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 },
+ {"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 },
+ {"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 },
+-{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1|RD_2, 0, XLR, 0, 0 },
++{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1, 0, XLR|XLP, 0, 0 },
+ {"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 },
+ {"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 },
+ {"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 },
+@@ -1483,10 +1489,13 @@ const struct mips_opcode mips_builtin_op
+ /* move is at the top of the table. */
+ {"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 },
+ {"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 },
++{"msgsnds", "d,t", 0x4a000001, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 },
+ {"msgld", "", 0, (int) M_MSGLD, INSN_MACRO, 0, XLR, 0, 0 },
+ {"msgld", "t", 0, (int) M_MSGLD_T, INSN_MACRO, 0, XLR, 0, 0 },
+-{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR, 0, 0 },
+-{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR, 0, 0 },
++{"msglds", "d,t", 0x4a000002, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 },
++{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR|XLP, 0, 0 },
++{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR|XLP, 0, 0 },
++{"msgsync", "", 0x4a000004, 0xffffffff,0, 0, XLP, 0, 0 },
+ {"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 },
+ {"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 },
+ {"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 },
+@@ -1536,7 +1545,7 @@ const struct mips_opcode mips_builtin_op
+ {"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 },
+ {"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 },
+ {"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 },
+-{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1|RD_2, 0, XLR, 0, 0 },
++{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1, 0, XLR|XLP, 0, 0 },
+ {"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
+ {"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 0, 0 },
+ {"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
+@@ -1978,9 +1987,9 @@ const struct mips_opcode mips_builtin_op
+ {"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37},
+ {"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 },
+ {"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 },
+-{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
+-{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
+-{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
++{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
++{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
++{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
+ {"swc0", "E,o(b)", 0xe0000000, 0xfc000000, RD_3|RD_C0|SM, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
+ {"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
+ {"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
diff --git a/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch b/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
deleted file mode 100644
index 3fdb5eb927..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 6b018e8129298dbd5b714e459ef0b3aef5bbce13 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:44:14 +0000
-Subject: [PATCH 11/13] Change default emulation for mips64*-*-linux
-
-we change the default emulations to be N64 instead of N32
-
-Upstream-Status: Inappropriate [ OE configuration Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- bfd/config.bfd | 8 ++++----
- ld/configure.tgt | 8 ++++----
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/bfd/config.bfd b/bfd/config.bfd
-index b998830..ab17e72 100644
---- a/bfd/config.bfd
-+++ b/bfd/config.bfd
-@@ -1101,12 +1101,12 @@ case "${targ}" in
- targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
- ;;
- mips64*el-*-linux*)
-- targ_defvec=mips_elf32_ntrad_le_vec
-- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
-+ targ_defvec=mips_elf64_trad_le_vec
-+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
- ;;
- mips64*-*-linux*)
-- targ_defvec=mips_elf32_ntrad_be_vec
-- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
-+ targ_defvec=mips_elf64_trad_be_vec
-+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_be_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
- ;;
- mips*el-*-linux*)
- targ_defvec=mips_elf32_trad_le_vec
-diff --git a/ld/configure.tgt b/ld/configure.tgt
-index a3db909..212327c 100644
---- a/ld/configure.tgt
-+++ b/ld/configure.tgt
-@@ -513,11 +513,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
- mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
- targ_extra_emuls="elf32elmipvxworks" ;;
- mips*-*-windiss) targ_emul=elf32mipswindiss ;;
--mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
-- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
-+mips64*el-*-linux-*) targ_emul=elf64ltsmip
-+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
- targ_extra_libpath=$targ_extra_emuls ;;
--mips64*-*-linux-*) targ_emul=elf32btsmipn32
-- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
-+mips64*-*-linux-*) targ_emul=elf64btsmip
-+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
- targ_extra_libpath=$targ_extra_emuls ;;
- mips*el-*-linux-*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch b/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
deleted file mode 100644
index 8103347ba4..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
+++ /dev/null
@@ -1,413 +0,0 @@
-From c2e138f4ccdf8af81c18c8511c901d3deee696b5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 14 Feb 2016 17:06:19 +0000
-Subject: [PATCH 12/13] Add support for Netlogic XLP
-
-Patch From: Nebu Philips <nphilips@netlogicmicro.com>
-
-Using the mipsisa64r2nlm target, add support for XLP from
-Netlogic. Also, update vendor name to NLM wherever applicable.
-
-Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been
-assigned to INSN_OCTEON3
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
-Upstream-Status: Pending
-
- bfd/aoutx.h | 1 +
- bfd/archures.c | 1 +
- bfd/bfd-in2.h | 1 +
- bfd/config.bfd | 5 +++++
- bfd/cpu-mips.c | 6 ++++--
- bfd/elfxx-mips.c | 8 ++++++++
- binutils/readelf.c | 1 +
- gas/config/tc-mips.c | 4 +++-
- gas/configure | 3 +++
- gas/configure.tgt | 2 +-
- include/elf/mips.h | 1 +
- include/opcode/mips.h | 10 ++++++++--
- ld/configure.tgt | 2 ++
- opcodes/mips-dis.c | 12 +++++-------
- opcodes/mips-opc.c | 33 +++++++++++++++++++++------------
- 15 files changed, 65 insertions(+), 25 deletions(-)
-
-diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index be0126a..4ca7e24 100644
---- a/bfd/aoutx.h
-+++ b/bfd/aoutx.h
-@@ -812,6 +812,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
- case bfd_mach_mipsisa64r6:
- case bfd_mach_mips_sb1:
- case bfd_mach_mips_xlr:
-+ case bfd_mach_mips_xlp:
- /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */
- arch_flags = M_MIPS2;
- break;
-diff --git a/bfd/archures.c b/bfd/archures.c
-index 96c9109..5a30d02 100644
---- a/bfd/archures.c
-+++ b/bfd/archures.c
-@@ -197,6 +197,7 @@ DESCRIPTION
- .#define bfd_mach_mips_octeon2 6502
- .#define bfd_mach_mips_octeon3 6503
- .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *}
-+.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP' *}
- .#define bfd_mach_mipsisa32 32
- .#define bfd_mach_mipsisa32r2 33
- .#define bfd_mach_mipsisa32r3 34
-diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index 30513c4..5e8ed4c 100644
---- a/bfd/bfd-in2.h
-+++ b/bfd/bfd-in2.h
-@@ -2008,6 +2008,7 @@ enum bfd_architecture
- #define bfd_mach_mips_octeon2 6502
- #define bfd_mach_mips_octeon3 6503
- #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
-+#define bfd_mach_mips_xlp 887680 /* decimal 'XLP' */
- #define bfd_mach_mipsisa32 32
- #define bfd_mach_mipsisa32r2 33
- #define bfd_mach_mipsisa32r3 34
-diff --git a/bfd/config.bfd b/bfd/config.bfd
-index ab17e72..863be89 100644
---- a/bfd/config.bfd
-+++ b/bfd/config.bfd
-@@ -1084,6 +1084,11 @@ case "${targ}" in
- targ_defvec=mips_elf32_le_vec
- targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
- ;;
-+ mipsisa64*-*-elf*)
-+ targ_defvec=mips_elf32_trad_be_vec
-+ targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
-+ want64=true
-+ ;;
- mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
- targ_defvec=mips_elf32_be_vec
- targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
-diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
-index d209fb6..b6a86ae 100644
---- a/bfd/cpu-mips.c
-+++ b/bfd/cpu-mips.c
-@@ -104,7 +104,8 @@ enum
- I_mipsocteon2,
- I_mipsocteon3,
- I_xlr,
-- I_micromips
-+ I_micromips,
-+ I_xlp
- };
-
- #define NN(index) (&arch_info_struct[(index) + 1])
-@@ -155,7 +156,8 @@ static const bfd_arch_info_type arch_info_struct[] =
- N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)),
- N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3", FALSE, NN(I_mipsocteon3)),
- N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
-- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
-+ N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)),
-+ N (64, 64, bfd_mach_mips_xlp, "mips:xlp", FALSE, 0)
- };
-
- /* The default architecture is mips:3000, but with a machine number of
-diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
-index e47276b..71c30a0 100644
---- a/bfd/elfxx-mips.c
-+++ b/bfd/elfxx-mips.c
-@@ -6646,6 +6646,9 @@ _bfd_elf_mips_mach (flagword flags)
- case E_MIPS_MACH_XLR:
- return bfd_mach_mips_xlr;
-
-+ case E_MIPS_MACH_XLP:
-+ return bfd_mach_mips_xlp;
-+
- default:
- switch (flags & EF_MIPS_ARCH)
- {
-@@ -11949,6 +11952,10 @@ mips_set_isa_flags (bfd *abfd)
- val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
- break;
-
-+ case bfd_mach_mips_xlp:
-+ val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_XLP;
-+ break;
-+
- case bfd_mach_mipsisa32:
- val = E_MIPS_ARCH_32;
- break;
-@@ -13975,6 +13982,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
- { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
- { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
- { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
-+ { bfd_mach_mips_xlp, bfd_mach_mipsisa64r2 },
-
- /* MIPS64 extensions. */
- { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
-diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 274ddd1..d31558c 100644
---- a/binutils/readelf.c
-+++ b/binutils/readelf.c
-@@ -3230,6 +3230,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
- case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
- case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
- case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
-+ case E_MIPS_MACH_XLP: strcat (buf, ", xlp"); break;
- case 0:
- /* We simply ignore the field in this case to avoid confusion:
- MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
-diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
-index eb8b26b..e59dce6 100644
---- a/gas/config/tc-mips.c
-+++ b/gas/config/tc-mips.c
-@@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
- || mips_opts.arch == CPU_RM7000 \
- || mips_opts.arch == CPU_VR5500 \
- || mips_opts.micromips \
-+ || mips_opts.arch == CPU_XLP \
- )
-
- /* Whether the processor uses hardware interlocks to protect reads
-@@ -581,6 +582,7 @@ static int mips_32bitmode = 0;
- && mips_opts.isa != ISA_MIPS3) \
- || mips_opts.arch == CPU_R4300 \
- || mips_opts.micromips \
-+ || mips_opts.arch == CPU_XLP \
- )
-
- /* Whether the processor uses hardware interlocks to protect reads
-@@ -18858,7 +18860,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
- /* Broadcom XLP.
- XLP is mostly like XLR, with the prominent exception that it is
- MIPS64R2 rather than MIPS64. */
-- { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR },
-+ { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP },
-
- /* MIPS 64 Release 6 */
- { "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
-diff --git a/gas/configure b/gas/configure
-index 45da030..aba89f7 100755
---- a/gas/configure
-+++ b/gas/configure
-@@ -12914,6 +12914,9 @@ _ACEOF
- mipsisa64r6 | mipsisa64r6el)
- mips_cpu=mips64r6
- ;;
-+ mipsisa64r2nlm | mipsisa64r2nlmel)
-+ mips_cpu=xlp
-+ ;;
- mipstx39 | mipstx39el)
- mips_cpu=r3900
- ;;
-diff --git a/gas/configure.tgt b/gas/configure.tgt
-index 1b9fd99..a9f1977 100644
---- a/gas/configure.tgt
-+++ b/gas/configure.tgt
-@@ -339,7 +339,7 @@ case ${generic_target} in
- mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;;
- mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
- fmt=elf em=tmips ;;
-- mips-*-elf* | mips-*-rtems*) fmt=elf ;;
-+ mips-*-elf* | mips-*-rtems*) fmt=elf em=tmips ;;
- mips-*-netbsd*) fmt=elf em=tmips ;;
- mips-*-openbsd*) fmt=elf em=tmips ;;
-
-diff --git a/include/elf/mips.h b/include/elf/mips.h
-index 7e813de..d7d72c1 100644
---- a/include/elf/mips.h
-+++ b/include/elf/mips.h
-@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
- #define E_MIPS_MACH_SB1 0x008a0000
- #define E_MIPS_MACH_OCTEON 0x008b0000
- #define E_MIPS_MACH_XLR 0x008c0000
-+#define E_MIPS_MACH_XLP 0x008f0000
- #define E_MIPS_MACH_OCTEON2 0x008d0000
- #define E_MIPS_MACH_OCTEON3 0x008e0000
- #define E_MIPS_MACH_5400 0x00910000
-diff --git a/include/opcode/mips.h b/include/opcode/mips.h
-index b1d4ef6..f2c8e88 100644
---- a/include/opcode/mips.h
-+++ b/include/opcode/mips.h
-@@ -1232,8 +1232,10 @@ static const unsigned int mips_isa_table[] = {
- #define INSN_LOONGSON_2F 0x80000000
- /* Loongson 3A. */
- #define INSN_LOONGSON_3A 0x00000400
--/* RMI Xlr instruction */
--#define INSN_XLR 0x00000020
-+/* Netlogic Xlr instruction */
-+#define INSN_XLR 0x00000020
-+/* Netlogic XlP instruction */
-+#define INSN_XLP 0x00000080
-
- /* DSP ASE */
- #define ASE_DSP 0x00000001
-@@ -1331,6 +1333,7 @@ static const unsigned int mips_isa_table[] = {
- #define CPU_OCTEON2 6502
- #define CPU_OCTEON3 6503
- #define CPU_XLR 887682 /* decimal 'XLR' */
-+#define CPU_XLP 887680 /* decimal 'XLP' */
-
- /* Return true if the given CPU is included in INSN_* mask MASK. */
-
-@@ -1408,6 +1411,9 @@ cpu_is_member (int cpu, unsigned int mask)
- return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
- || ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
-
-+ case CPU_XLP:
-+ return (mask & INSN_XLP) != 0;
-+
- default:
- return FALSE;
- }
-diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 212327c..212e09c 100644
---- a/ld/configure.tgt
-+++ b/ld/configure.tgt
-@@ -499,6 +499,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
- mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
- targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
-+mipsisa64*-*-elf*) targ_emul=elf32btsmip
-+ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;;
- mips64*el-ps2-elf*) targ_emul=elf32lr5900n32
- targ_extra_emuls="elf32lr5900"
- targ_extra_libpath=$targ_extra_emuls ;;
-diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index 3f874e7..9813d0e 100644
---- a/opcodes/mips-dis.c
-+++ b/opcodes/mips-dis.c
-@@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] =
- mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
- mips_cp1_names_mips3264, mips_hwr_names_numeric },
-
-- /* XLP is mostly like XLR, with the prominent exception it is being
-- MIPS64R2. */
-- { "xlp", 1, bfd_mach_mips_xlr, CPU_XLR,
-- ISA_MIPS64R2 | INSN_XLR, 0,
-- mips_cp0_names_xlr,
-- mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
-- mips_cp1_names_mips3264, mips_hwr_names_numeric },
-+ { "xlp", 1, bfd_mach_mips_xlp, CPU_XLP,
-+ ISA_MIPS64R2 | INSN_XLP, 0,
-+ mips_cp0_names_mips3264r2,
-+ mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
-+ mips_cp1_names_mips3264, mips_hwr_names_mips3264r2 },
-
- /* This entry, mips16, is here only for ISA/processor selection; do
- not print its name. */
-diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
-index a95eff1..99fb7bb 100644
---- a/opcodes/mips-opc.c
-+++ b/opcodes/mips-opc.c
-@@ -320,7 +320,8 @@ decode_mips_operand (const char *p)
- #define IOCTP (INSN_OCTEONP | INSN_OCTEON2 | INSN_OCTEON3)
- #define IOCT2 (INSN_OCTEON2 | INSN_OCTEON3)
- #define IOCT3 INSN_OCTEON3
--#define XLR INSN_XLR
-+#define XLR INSN_XLR
-+#define XLP INSN_XLP
- #define IVIRT ASE_VIRT
- #define IVIRT64 ASE_VIRT64
-
-@@ -958,6 +959,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
- {"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 },
- {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
-+{"crc", "d,s,t", 0x7000001c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 },
- /* ctc0 is at the bottom of the table. */
- {"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
- {"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
-@@ -990,12 +992,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 },
- {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 },
- {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 },
--{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR, 0, 0 },
-+{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR|XLP, 0, 0 },
- {"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5, 0, 0 },
- {"dclo", "d,s", 0x00000053, 0xfc1f07ff, WR_1|RD_2, 0, I69, 0, 0 },
- {"dclo", "U,s", 0x70000025, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, I69 },
- {"dclz", "d,s", 0x00000052, 0xfc1f07ff, WR_1|RD_2, 0, I69, 0, 0 },
- {"dclz", "U,s", 0x70000024, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, I69 },
-+{"dcrc", "d,s,t", 0x7000001d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 },
- /* dctr and dctw are used on the r5000. */
- {"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
- {"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
-@@ -1067,6 +1070,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 },
- {"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
- {"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
-+{"dmfur", "t,d", 0x7000001e, 0xffe007ff, WR_1, 0, XLP, 0, 0 },
- {"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 },
- {"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 },
- {"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE },
-@@ -1082,6 +1086,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
- /* dmfc3 is at the bottom of the table. */
- /* dmtc3 is at the bottom of the table. */
- {"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
-+{"dmtur", "t,d", 0x7000001f, 0xffe007ff, RD_1, 0, XLP, 0, 0 },
-+{"dmul", "d,s,t", 0x70000006, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 },
- {"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
- {"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 },
- {"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
-@@ -1235,9 +1241,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 },
- {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 },
- {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 },
--{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
--{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
--{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
-+{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
-+{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
-+{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
- {"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
- {"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
- {"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF },
-@@ -1402,7 +1408,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 },
- {"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 },
- {"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 },
--{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1|RD_2, 0, XLR, 0, 0 },
-+{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1, 0, XLR|XLP, 0, 0 },
- {"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 },
- {"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 },
- {"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 },
-@@ -1447,10 +1453,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
- /* move is at the top of the table. */
- {"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 },
- {"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 },
-+{"msgsnds", "d,t", 0x4a000001, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 },
- {"msgld", "", 0, (int) M_MSGLD, INSN_MACRO, 0, XLR, 0, 0 },
- {"msgld", "t", 0, (int) M_MSGLD_T, INSN_MACRO, 0, XLR, 0, 0 },
--{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR, 0, 0 },
--{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR, 0, 0 },
-+{"msglds", "d,t", 0x4a000002, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 },
-+{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR|XLP, 0, 0 },
-+{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR|XLP, 0, 0 },
-+{"msgsync", "", 0x4a000004, 0xffffffff,0, 0, XLP, 0, 0 },
- {"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 },
- {"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 },
- {"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 },
-@@ -1500,7 +1509,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 },
- {"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 },
- {"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 },
--{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1|RD_2, 0, XLR, 0, 0 },
-+{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1, 0, XLR|XLP, 0, 0 },
- {"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
- {"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 0, 0 },
- {"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
-@@ -1937,9 +1946,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37},
- {"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 },
- {"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 },
--{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
--{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
--{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 },
-+{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
-+{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
-+{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 },
- {"swc0", "E,o(b)", 0xe0000000, 0xfc000000, RD_3|RD_C0|SM, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
- {"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
- {"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0012-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/meta/recipes-devtools/binutils/binutils/0012-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
new file mode 100644
index 0000000000..f686763594
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0012-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
@@ -0,0 +1,33 @@
+From f34aac4314b821396fe745013dc8ec8683ea2598 Mon Sep 17 00:00:00 2001
+From: Zhenhua Luo <zhenhua.luo@nxp.com>
+Date: Sat, 11 Jun 2016 22:08:29 -0500
+Subject: [PATCH] fix the incorrect assembling for ppc wait mnemonic
+
+Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
+
+Upstream-Status: Pending
+---
+ opcodes/ppc-opc.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
+index b56fe3e21a..696fe83a7b 100644
+--- a/opcodes/ppc-opc.c
++++ b/opcodes/ppc-opc.c
+@@ -5709,7 +5709,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+ {"ldepx", X(31,29), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
+
+ {"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}},
+-{"wait", X(31,30), XWC_MASK, POWER9, 0, {WC}},
+
+ {"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
+
+@@ -5763,7 +5762,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+
+ {"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
+ {"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
+-{"wait", X(31,62), XWC_MASK, E500MC|PPCA2, 0, {WC}},
++{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|POWER9, 0, {WC}},
+
+ {"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
+
diff --git a/meta/recipes-devtools/binutils/binutils/0013-Detect-64-bit-MIPS-targets.patch b/meta/recipes-devtools/binutils/binutils/0013-Detect-64-bit-MIPS-targets.patch
new file mode 100644
index 0000000000..493b05026d
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0013-Detect-64-bit-MIPS-targets.patch
@@ -0,0 +1,47 @@
+From ebb74c39acb171fd24c2698646134ce88dd96a15 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 31 Mar 2017 11:42:03 -0700
+Subject: [PATCH] Detect 64-bit MIPS targets
+
+Add mips64 target triplets and default to N64
+
+Upstream-Status: Submitted
+https://sourceware.org/ml/binutils/2016-08/msg00048.html
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gold/configure.tgt | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/gold/configure.tgt b/gold/configure.tgt
+index 3e066edaa8..caf130ceda 100644
+--- a/gold/configure.tgt
++++ b/gold/configure.tgt
+@@ -153,6 +153,13 @@ aarch64*-*)
+ targ_big_endian=false
+ targ_extra_big_endian=true
+ ;;
++mips*64*el*-*-*|mips*64*le*-*-*)
++ targ_obj=mips
++ targ_machine=EM_MIPS_RS3_LE
++ targ_size=64
++ targ_big_endian=false
++ targ_extra_big_endian=true
++ ;;
+ mips*el*-*-*|mips*le*-*-*)
+ targ_obj=mips
+ targ_machine=EM_MIPS_RS3_LE
+@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*)
+ targ_big_endian=false
+ targ_extra_big_endian=true
+ ;;
++mips*64*-*-*)
++ targ_obj=mips
++ targ_machine=EM_MIPS
++ targ_size=64
++ targ_big_endian=true
++ targ_extra_big_endian=false
++ ;;
+ mips*-*-*)
+ targ_obj=mips
+ targ_machine=EM_MIPS
diff --git a/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
deleted file mode 100644
index f314d6420d..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0c04c3b626998c8e7b595381b35456428581f52a Mon Sep 17 00:00:00 2001
-From: Zhenhua Luo <zhenhua.luo@nxp.com>
-Date: Sat, 11 Jun 2016 22:08:29 -0500
-Subject: [PATCH 13/13] fix the incorrect assembling for ppc wait mnemonic
-
-Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
-
-Upstream-Status: Pending
----
- opcodes/ppc-opc.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
-index 8106ab7..ca4b0f3 100644
---- a/opcodes/ppc-opc.c
-+++ b/opcodes/ppc-opc.c
-@@ -4811,7 +4811,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
- {"ldepx", X(31,29), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
-
- {"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}},
--{"wait", X(31,30), XWC_MASK, POWER9, 0, {WC}},
-
- {"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
-
-@@ -4865,7 +4864,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
-
- {"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
- {"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
--{"wait", X(31,62), XWC_MASK, E500MC|PPCA2, 0, {WC}},
-+{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|POWER9, 0, {WC}},
-
- {"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
-
---
-2.9.0
-
diff --git a/meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch b/meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch
new file mode 100644
index 0000000000..ae5915d39b
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch
@@ -0,0 +1,86 @@
+From 6bc49e9a581eb46265935ea2756a99faa7d0562e Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 6 Mar 2017 23:33:27 -0800
+Subject: [PATCH] sync with OE libtool changes
+
+Apply these patches from our libtool patches as not only are redundant RPATHs a
+waste of space but they can cause incorrect linking when native packages are
+restored from sstate.
+
+fix-rpath.patch:
+We don't want to add RPATHS which match default linker
+search paths, they're a waste of space. This patch
+filters libtools list and removes the ones we don't need.
+
+norm-rpath.patch:
+Libtool may be passed link paths of the form "/usr/lib/../lib", which
+fool its detection code into thinking it should be included as an
+RPATH in the generated binary. Normalize before comparision.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 34 ++++++++++++++++++++++++++++------
+ 1 file changed, 28 insertions(+), 6 deletions(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 11ee684ccc..3b19ac1532 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -8053,8 +8053,16 @@ EOF
+ esac
+ fi
+ else
+- eval flag=\"$hardcode_libdir_flag_spec\"
+- func_append dep_rpath " $flag"
++ # We only want to hardcode in an rpath if it isn't in the
++ # default dlsearch path.
++ func_normal_abspath "$libdir"
++ libdir_norm=$func_normal_abspath_result
++ case " $sys_lib_dlsearch_path " in
++ *" $libdir_norm "*) ;;
++ *) eval flag=\"$hardcode_libdir_flag_spec\"
++ func_append dep_rpath " $flag"
++ ;;
++ esac
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+@@ -8790,8 +8798,16 @@ EOF
+ esac
+ fi
+ else
+- eval flag=\"$hardcode_libdir_flag_spec\"
+- func_append rpath " $flag"
++ # We only want to hardcode in an rpath if it isn't in the
++ # default dlsearch path.
++ func_normal_abspath "$libdir"
++ libdir_norm=$func_normal_abspath_result
++ case " $sys_lib_dlsearch_path " in
++ *" $libdir_norm "*) ;;
++ *) eval flag=\"$hardcode_libdir_flag_spec\"
++ rpath+=" $flag"
++ ;;
++ esac
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+@@ -8841,8 +8857,14 @@ EOF
+ esac
+ fi
+ else
+- eval flag=\"$hardcode_libdir_flag_spec\"
+- func_append rpath " $flag"
++ # We only want to hardcode in an rpath if it isn't in the
++ # default dlsearch path.
++ case " $sys_lib_dlsearch_path " in
++ *" $libdir "*) ;;
++ *) eval flag=\"$hardcode_libdir_flag_spec\"
++ func_append rpath " $flag"
++ ;;
++ esac
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
diff --git a/meta/recipes-devtools/binutils/binutils/0015-binutils-enable-x86_64-pep-for-producing-EFI-binarie.patch b/meta/recipes-devtools/binutils/binutils/0015-binutils-enable-x86_64-pep-for-producing-EFI-binarie.patch
new file mode 100644
index 0000000000..d25ce61626
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0015-binutils-enable-x86_64-pep-for-producing-EFI-binarie.patch
@@ -0,0 +1,46 @@
+From a326a8feb445a5713ff3d17c55f43d5681e26585 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Nov 2018 17:46:40 -0800
+Subject: [PATCH] binutils : enable x86_64-pep for producing EFI binaries on
+ x86-64
+
+Add x86_64-pep emulation support to the set enabled for x86_64 targets
+to enable the linker to produce Portable Executables for EFI binaries.
+
+Enables building the x86-64 EFI variant of the Xen hypervisor for
+the OpenXT Project.
+
+Upstream-Status: Inappropriate [OE configuration specific]
+
+Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ bfd/config.bfd | 2 +-
+ ld/configure.tgt | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -694,7 +694,7 @@ case "${targ}" in
+ ;;
+ x86_64-*-linux-*)
+ targ_defvec=x86_64_elf64_vec
+- targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
++ targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec x86_64_pe_vec x86_64_pe_be_vec i386_pe_vec"
+ want64=true
+ ;;
+ x86_64-*-nacl*)
+--- a/ld/configure.tgt
++++ b/ld/configure.tgt
+@@ -258,8 +258,9 @@ x86_64-*-linux-gnux32) targ_emul=elf32_x
+ tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'` ;;
+ x86_64-*-linux-*) targ_emul=elf_x86_64
+- targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om"
+- targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
++ targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pe i386pep"
++ targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om i386pep"
++ targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
+ i[3-7]86-*-redox*) targ_emul=elf_i386
+ targ_extra_emuls=elf_x86_64 ;;
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2019-17450.patch b/meta/recipes-devtools/binutils/binutils/CVE-2019-17450.patch
new file mode 100644
index 0000000000..ce5b9f392d
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2019-17450.patch
@@ -0,0 +1,94 @@
+From 09dd135df9ebc7a4b640537e23e26a03a288a789 Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Wed, 9 Oct 2019 00:07:29 +1030
+Subject: [PATCH] PR25078, stack overflow in function find_abstract_instance
+
+Selectively backporting fix for bfd/dwarf2.c, but not the ChangeLog
+file. There are newer versions of binutils, but none of them contain the
+commit fixing CVE-2019-17450, so backport it to master and zeus.
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=063c511bd79]
+CVE: CVE-2019-17450
+Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
+
+ PR 25078
+ * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
+ recur_count. Error on recur_count reaching 100 rather than
+ info_ptr matching orig_info_ptr. Adjust calls.
+
+---
+ bfd/dwarf2.c | 35 +++++++++++++++++------------------
+ 1 file changed, 17 insertions(+), 18 deletions(-)
+
+--- a/bfd/dwarf2.c
++++ b/bfd/dwarf2.c
+@@ -2812,13 +2812,13 @@ static bfd_boolean comp_unit_maybe_decod
+ struct dwarf2_debug *);
+
+ static bfd_boolean
+-find_abstract_instance (struct comp_unit * unit,
+- bfd_byte * orig_info_ptr,
+- struct attribute * attr_ptr,
+- const char ** pname,
+- bfd_boolean * is_linkage,
+- char ** filename_ptr,
+- int * linenumber_ptr)
++find_abstract_instance (struct comp_unit *unit,
++ struct attribute *attr_ptr,
++ unsigned int recur_count,
++ const char **pname,
++ bfd_boolean *is_linkage,
++ char **filename_ptr,
++ int *linenumber_ptr)
+ {
+ bfd *abfd = unit->abfd;
+ bfd_byte *info_ptr;
+@@ -2829,6 +2829,14 @@ find_abstract_instance (struct comp_unit
+ struct attribute attr;
+ const char *name = NULL;
+
++ if (recur_count == 100)
++ {
++ _bfd_error_handler
++ (_("DWARF error: abstract instance recursion detected"));
++ bfd_set_error (bfd_error_bad_value);
++ return FALSE;
++ }
++
+ /* DW_FORM_ref_addr can reference an entry in a different CU. It
+ is an offset from the .debug_info section, not the current CU. */
+ if (attr_ptr->form == DW_FORM_ref_addr)
+@@ -2962,15 +2970,6 @@ find_abstract_instance (struct comp_unit
+ info_ptr, info_ptr_end);
+ if (info_ptr == NULL)
+ break;
+- /* It doesn't ever make sense for DW_AT_specification to
+- refer to the same DIE. Stop simple recursion. */
+- if (info_ptr == orig_info_ptr)
+- {
+- _bfd_error_handler
+- (_("DWARF error: abstract instance recursion detected"));
+- bfd_set_error (bfd_error_bad_value);
+- return FALSE;
+- }
+ switch (attr.name)
+ {
+ case DW_AT_name:
+@@ -2984,7 +2983,7 @@ find_abstract_instance (struct comp_unit
+ }
+ break;
+ case DW_AT_specification:
+- if (!find_abstract_instance (unit, info_ptr, &attr,
++ if (!find_abstract_instance (unit, &attr, recur_count + 1,
+ &name, is_linkage,
+ filename_ptr, linenumber_ptr))
+ return FALSE;
+@@ -3200,7 +3199,7 @@ scan_unit_for_symbols (struct comp_unit
+
+ case DW_AT_abstract_origin:
+ case DW_AT_specification:
+- if (!find_abstract_instance (unit, info_ptr, &attr,
++ if (!find_abstract_instance (unit, &attr, 0,
+ &func->name,
+ &func->is_linkage,
+ &func->file,
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2019-17451.patch b/meta/recipes-devtools/binutils/binutils/CVE-2019-17451.patch
new file mode 100644
index 0000000000..1fe05d310e
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2019-17451.patch
@@ -0,0 +1,46 @@
+From 0192438051a7e781585647d5581a2a6f62fda362 Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Wed, 9 Oct 2019 10:47:13 +1030
+Subject: [PATCH] PR25070, SEGV in function _bfd_dwarf2_find_nearest_line
+
+Selectively backporting fix for bfd/dwarf2.c, but not the ChangeLog
+file. There are newer versions of binutils, but none of them contain the
+commit fixing CVE-2019-17451, so backport it to master and zeus.
+
+Upstream-Status: Backport
+[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=336bfbeb1848]
+CVE: CVE-2019-17451
+Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
+
+
+Evil testcase with two debug info sections, with sizes of 2aaaabac4ec1
+and ffffd5555453b140 result in a total size of 1. Reading the first
+section of course overflows the buffer and tramples on other memory.
+
+ PR 25070
+ * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
+ total_size calculation.
+---
+ bfd/dwarf2.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/bfd/dwarf2.c
++++ b/bfd/dwarf2.c
+@@ -4439,7 +4439,16 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd,
+ for (total_size = 0;
+ msec;
+ msec = find_debug_info (debug_bfd, debug_sections, msec))
+- total_size += msec->size;
++ {
++ /* Catch PR25070 testcase overflowing size calculation here. */
++ if (total_size + msec->size < total_size
++ || total_size + msec->size < msec->size)
++ {
++ bfd_set_error (bfd_error_no_memory);
++ return FALSE;
++ }
++ total_size += msec->size;
++ }
+
+ stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size);
+ if (stash->info_ptr_memory == NULL)
diff --git a/meta/recipes-devtools/binutils/binutils_2.27.bb b/meta/recipes-devtools/binutils/binutils_2.27.bb
deleted file mode 100644
index b51437bbc3..0000000000
--- a/meta/recipes-devtools/binutils/binutils_2.27.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-require binutils.inc
-require binutils-${PV}.inc
-
-DEPENDS += "flex bison zlib"
-
-EXTRA_OECONF += "--with-sysroot=/ \
- --enable-install-libbfd \
- --enable-install-libiberty \
- --enable-shared \
- --with-system-zlib \
- "
-
-EXTRA_OEMAKE_append_libc-musl = "\
- gt_cv_func_gnugettext1_libc=yes \
- gt_cv_func_gnugettext2_libc=yes \
- "
-EXTRA_OECONF_class-native = "--enable-targets=all \
- --enable-64-bit-bfd \
- --enable-install-libiberty \
- --enable-install-libbfd \
- --disable-werror"
-
-do_install_class-native () {
- autotools_do_install
-
- # Install the libiberty header
- install -d ${D}${includedir}
- install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
- install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-
- # We only want libiberty, libbfd and libopcodes
- rm -rf ${D}${bindir}
- rm -rf ${D}${prefix}/${TARGET_SYS}
- rm -rf ${D}${prefix}/lib/ldscripts
- rm -rf ${D}${prefix}/share/info
- rm -rf ${D}${prefix}/share/locale
- rm -rf ${D}${prefix}/share/man
- rmdir ${D}${prefix}/share || :
- rmdir ${D}/${libdir}/gcc-lib || :
- rmdir ${D}/${libdir}64/gcc-lib || :
- rmdir ${D}/${libdir} || :
- rmdir ${D}/${libdir}64 || :
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/binutils/binutils_2.33.bb b/meta/recipes-devtools/binutils/binutils_2.33.bb
new file mode 100644
index 0000000000..89315915c4
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils_2.33.bb
@@ -0,0 +1,55 @@
+require binutils.inc
+require binutils-${PV}.inc
+
+DEPENDS += "flex bison zlib"
+
+EXTRA_OECONF += "--with-sysroot=/ \
+ --enable-install-libbfd \
+ --enable-install-libiberty \
+ --enable-shared \
+ --with-system-zlib \
+ "
+
+EXTRA_OEMAKE_append_libc-musl = "\
+ gt_cv_func_gnugettext1_libc=yes \
+ gt_cv_func_gnugettext2_libc=yes \
+ "
+EXTRA_OECONF_class-native = "--enable-targets=all \
+ --enable-64-bit-bfd \
+ --enable-install-libiberty \
+ --enable-install-libbfd \
+ --disable-werror"
+
+# gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target
+# So remove -O2 and use -Os as workaround
+SELECTED_OPTIMIZATION_remove_mipsarch = "-O2"
+SELECTED_OPTIMIZATION_append_mipsarch = " -Os"
+
+do_install_class-native () {
+ autotools_do_install
+
+ # Install the libiberty header
+ install -d ${D}${includedir}
+ install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+ install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+
+ # We only want libiberty, libbfd and libopcodes
+ rm -rf ${D}${bindir}
+ rm -rf ${D}${prefix}/${TARGET_SYS}
+ rm -rf ${D}${prefix}/lib/ldscripts
+ rm -rf ${D}${prefix}/share/info
+ rm -rf ${D}${prefix}/share/locale
+ rm -rf ${D}${prefix}/share/man
+ rmdir ${D}${prefix}/share || :
+ rmdir ${D}/${libdir}/gcc-lib || :
+ rmdir ${D}/${libdir}64/gcc-lib || :
+ rmdir ${D}/${libdir} || :
+ rmdir ${D}/${libdir}64 || :
+}
+
+# Split out libbfd-*.so so including perf doesn't include extra stuff
+PACKAGE_BEFORE_PN += "libbfd"
+FILES_libbfd = "${libdir}/libbfd-*.so"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c..0000000000
--- a/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gnulib.mk b/lib/gnulib.mk
-index e1d74db..c0e92dd 100644
---- a/lib/gnulib.mk
-+++ b/lib/gnulib.mk
-@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
---
-2.1.4
-
diff --git a/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch b/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch
deleted file mode 100644
index 9543a56f1e..0000000000
--- a/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3a15f7c9ace6c0294edc313a1848cafcc31b2a92 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Fri, 24 Apr 2015 00:38:32 -0700
-Subject: [PATCH] src/local.mk: fix parallel issue
-
-Fixed:
-rm -f src/yacc src/yacc.tmp
-echo '#! /bin/sh' >src/yacc.tmp
-/bin/bash: src/yacc.tmp: No such file or directory
-Makefile:6670: recipe for target 'src/yacc' failed
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- src/local.mk | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/local.mk b/src/local.mk
-index 573ad00..28bfae4 100644
---- a/src/local.mk
-+++ b/src/local.mk
-@@ -119,6 +119,7 @@ MOSTLYCLEANFILES += src/yacc
-
- src/yacc:
- $(AM_V_GEN)rm -f $@ $@.tmp
-+ $(AM_V_at)$(MKDIR_P) src
- $(AM_V_at)echo '#! /bin/sh' >$@.tmp
- $(AM_V_at)echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@.tmp
- $(AM_V_at)chmod a+x $@.tmp
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/bison/bison/bison-2.3_m4.patch b/meta/recipes-devtools/bison/bison/bison-2.3_m4.patch
deleted file mode 100644
index 348ce1d2bb..0000000000
--- a/meta/recipes-devtools/bison/bison/bison-2.3_m4.patch
+++ /dev/null
@@ -1,591 +0,0 @@
-Upstream-Status: Pending
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
---- /dev/null
-+++ bison-1.875/m4/inttypes-pri.m4
-@@ -0,0 +1,32 @@
-+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
-+# macros to non-string values. This is the case on AIX 4.3.3.
-+
-+AC_DEFUN([gt_INTTYPES_PRI],
-+[
-+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
-+ if test $gt_cv_header_inttypes_h = yes; then
-+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
-+ gt_cv_inttypes_pri_broken,
-+ [
-+ AC_TRY_COMPILE([#include <inttypes.h>
-+#ifdef PRId32
-+char *p = PRId32;
-+#endif
-+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
-+ ])
-+ fi
-+ if test "$gt_cv_inttypes_pri_broken" = yes; then
-+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
-+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
-+ fi
-+])
---- /dev/null
-+++ bison-1.875/m4/lcmessage.m4
-@@ -0,0 +1,32 @@
-+# lcmessage.m4 serial 3 (gettext-0.11.3)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
-+
-+# Check whether LC_MESSAGES is available in <locale.h>.
-+
-+AC_DEFUN([AM_LC_MESSAGES],
-+[
-+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-+ if test $am_cv_val_LC_MESSAGES = yes; then
-+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
-+ [Define if your <locale.h> file defines LC_MESSAGES.])
-+ fi
-+])
---- /dev/null
-+++ bison-1.875/m4/uintmax_t.m4
-@@ -0,0 +1,29 @@
-+# uintmax_t.m4 serial 6 (gettext-0.11)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_PREREQ(2.13)
-+
-+# Define uintmax_t to `unsigned long' or `unsigned long long'
-+# if <inttypes.h> does not exist.
-+
-+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
-+[
-+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
-+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
-+ test $ac_cv_type_unsigned_long_long = yes \
-+ && ac_type='unsigned long long' \
-+ || ac_type='unsigned long'
-+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
-+ [Define to unsigned long or unsigned long long
-+ if <inttypes.h> and <stdint.h> don't define.])
-+ fi
-+])
---- /dev/null
-+++ bison-1.875/m4/glibc21.m4
-@@ -0,0 +1,32 @@
-+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
-+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# Test for the GNU C Library, version 2.1 or newer.
-+# From Bruno Haible.
-+
-+AC_DEFUN([jm_GLIBC21],
-+ [
-+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
-+ ac_cv_gnu_library_2_1,
-+ [AC_EGREP_CPP([Lucky GNU user],
-+ [
-+#include <features.h>
-+#ifdef __GNU_LIBRARY__
-+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
-+ Lucky GNU user
-+ #endif
-+#endif
-+ ],
-+ ac_cv_gnu_library_2_1=yes,
-+ ac_cv_gnu_library_2_1=no)
-+ ]
-+ )
-+ AC_SUBST(GLIBC21)
-+ GLIBC21="$ac_cv_gnu_library_2_1"
-+ ]
-+)
---- /dev/null
-+++ bison-1.875/m4/stdint_h.m4
-@@ -0,0 +1,28 @@
-+# stdint_h.m4 serial 2 (gettext-0.11.4)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
-+# doesn't clash with <sys/types.h>, and declares uintmax_t.
-+
-+AC_DEFUN([jm_AC_HEADER_STDINT_H],
-+[
-+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
-+ [AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <stdint.h>],
-+ [uintmax_t i = (uintmax_t) -1;],
-+ jm_ac_cv_header_stdint_h=yes,
-+ jm_ac_cv_header_stdint_h=no)])
-+ if test $jm_ac_cv_header_stdint_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
-+[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
-+ and declares uintmax_t. ])
-+ fi
-+])
---- /dev/null
-+++ bison-1.875/m4/inttypes_h.m4
-@@ -0,0 +1,28 @@
-+# inttypes_h.m4 serial 4 (gettext-0.11.4)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
-+# doesn't clash with <sys/types.h>, and declares uintmax_t.
-+
-+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
-+[
-+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
-+ [AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <inttypes.h>],
-+ [uintmax_t i = (uintmax_t) -1;],
-+ jm_ac_cv_header_inttypes_h=yes,
-+ jm_ac_cv_header_inttypes_h=no)])
-+ if test $jm_ac_cv_header_inttypes_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
-+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
-+ and declares uintmax_t. ])
-+ fi
-+])
---- /dev/null
-+++ bison-1.875/m4/ulonglong.m4
-@@ -0,0 +1,23 @@
-+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
-+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
-+[
-+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
-+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
-+ [unsigned long long ullmax = (unsigned long long) -1;
-+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
-+ ac_cv_type_unsigned_long_long=yes,
-+ ac_cv_type_unsigned_long_long=no)])
-+ if test $ac_cv_type_unsigned_long_long = yes; then
-+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
-+ [Define if you have the unsigned long long type.])
-+ fi
-+])
---- /dev/null
-+++ bison-1.875/m4/codeset.m4
-@@ -0,0 +1,23 @@
-+# codeset.m4 serial AM1 (gettext-0.10.40)
-+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([AM_LANGINFO_CODESET],
-+[
-+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
-+ [AC_TRY_LINK([#include <langinfo.h>],
-+ [char* cs = nl_langinfo(CODESET);],
-+ am_cv_langinfo_codeset=yes,
-+ am_cv_langinfo_codeset=no)
-+ ])
-+ if test $am_cv_langinfo_codeset = yes; then
-+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
-+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
-+ fi
-+])
---- /dev/null
-+++ bison-1.875/m4/intdiv0.m4
-@@ -0,0 +1,72 @@
-+# intdiv0.m4 serial 1 (gettext-0.11.3)
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([gt_INTDIV0],
-+[
-+ AC_REQUIRE([AC_PROG_CC])dnl
-+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+
-+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
-+ gt_cv_int_divbyzero_sigfpe,
-+ [
-+ AC_TRY_RUN([
-+#include <stdlib.h>
-+#include <signal.h>
-+
-+static void
-+#ifdef __cplusplus
-+sigfpe_handler (int sig)
-+#else
-+sigfpe_handler (sig) int sig;
-+#endif
-+{
-+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
-+ exit (sig != SIGFPE);
-+}
-+
-+int x = 1;
-+int y = 0;
-+int z;
-+int nan;
-+
-+int main ()
-+{
-+ signal (SIGFPE, sigfpe_handler);
-+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
-+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
-+ signal (SIGTRAP, sigfpe_handler);
-+#endif
-+/* Linux/SPARC yields signal SIGILL. */
-+#if defined (__sparc__) && defined (__linux__)
-+ signal (SIGILL, sigfpe_handler);
-+#endif
-+
-+ z = x / y;
-+ nan = y / y;
-+ exit (1);
-+}
-+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
-+ [
-+ # Guess based on the CPU.
-+ case "$host_cpu" in
-+ alpha* | i[34567]86 | m68k | s390*)
-+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
-+ *)
-+ gt_cv_int_divbyzero_sigfpe="guessing no";;
-+ esac
-+ ])
-+ ])
-+ case "$gt_cv_int_divbyzero_sigfpe" in
-+ *yes) value=1;;
-+ *) value=0;;
-+ esac
-+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
-+ [Define if integer division by zero raises signal SIGFPE.])
-+])
---- /dev/null
-+++ bison-1.875/m4/glib.m4
-@@ -0,0 +1,196 @@
-+# Configure paths for GLIB
-+# Owen Taylor 97-11-3
-+
-+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
-+dnl gthread is specified in MODULES, pass to glib-config
-+dnl
-+AC_DEFUN(AM_PATH_GLIB,
-+[dnl
-+dnl Get the cflags and libraries from the glib-config script
-+dnl
-+AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
-+ glib_config_prefix="$withval", glib_config_prefix="")
-+AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
-+ glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
-+AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
-+ , enable_glibtest=yes)
-+
-+ if test x$glib_config_exec_prefix != x ; then
-+ glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
-+ if test x${GLIB_CONFIG+set} != xset ; then
-+ GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
-+ fi
-+ fi
-+ if test x$glib_config_prefix != x ; then
-+ glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
-+ if test x${GLIB_CONFIG+set} != xset ; then
-+ GLIB_CONFIG=$glib_config_prefix/bin/glib-config
-+ fi
-+ fi
-+
-+ for module in . $4
-+ do
-+ case "$module" in
-+ gmodule)
-+ glib_config_args="$glib_config_args gmodule"
-+ ;;
-+ gthread)
-+ glib_config_args="$glib_config_args gthread"
-+ ;;
-+ esac
-+ done
-+
-+ AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
-+ min_glib_version=ifelse([$1], ,0.99.7,$1)
-+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
-+ no_glib=""
-+ if test "$GLIB_CONFIG" = "no" ; then
-+ no_glib=yes
-+ else
-+ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
-+ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
-+ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-+ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-+ glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-+ if test "x$enable_glibtest" = "xyes" ; then
-+ ac_save_CFLAGS="$CFLAGS"
-+ ac_save_LIBS="$LIBS"
-+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+ LIBS="$GLIB_LIBS $LIBS"
-+dnl
-+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
-+dnl checks the results of glib-config to some extent
-+dnl
-+ rm -f conf.glibtest
-+ AC_TRY_RUN([
-+#include <glib.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+int
-+main ()
-+{
-+ int major, minor, micro;
-+ char *tmp_version;
-+
-+ system ("touch conf.glibtest");
-+
-+ /* HP/UX 9 (%@#!) writes to sscanf strings */
-+ tmp_version = g_strdup("$min_glib_version");
-+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-+ printf("%s, bad version string\n", "$min_glib_version");
-+ exit(1);
-+ }
-+
-+ if ((glib_major_version != $glib_config_major_version) ||
-+ (glib_minor_version != $glib_config_minor_version) ||
-+ (glib_micro_version != $glib_config_micro_version))
-+ {
-+ printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
-+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ printf ("*** was found! If glib-config was correct, then it is best\n");
-+ printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
-+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-+ printf("*** required on your system.\n");
-+ printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
-+ printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
-+ printf("*** before re-running configure\n");
-+ }
-+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
-+ (glib_minor_version != GLIB_MINOR_VERSION) ||
-+ (glib_micro_version != GLIB_MICRO_VERSION))
-+ {
-+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
-+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
-+ printf("*** library (version %d.%d.%d)\n",
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ }
-+ else
-+ {
-+ if ((glib_major_version > major) ||
-+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
-+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
-+ {
-+ return 0;
-+ }
-+ else
-+ {
-+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
-+ major, minor, micro);
-+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
-+ printf("***\n");
-+ printf("*** If you have already installed a sufficiently new version, this error\n");
-+ printf("*** probably means that the wrong copy of the glib-config shell script is\n");
-+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
-+ printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
-+ printf("*** correct copy of glib-config. (In this case, you will have to\n");
-+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-+ printf("*** so that the correct libraries are found at run-time))\n");
-+ }
-+ }
-+ return 1;
-+}
-+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-+ CFLAGS="$ac_save_CFLAGS"
-+ LIBS="$ac_save_LIBS"
-+ fi
-+ fi
-+ if test "x$no_glib" = x ; then
-+ AC_MSG_RESULT(yes)
-+ ifelse([$2], , :, [$2])
-+ else
-+ AC_MSG_RESULT(no)
-+ if test "$GLIB_CONFIG" = "no" ; then
-+ echo "*** The glib-config script installed by GLIB could not be found"
-+ echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
-+ echo "*** your path, or set the GLIB_CONFIG environment variable to the"
-+ echo "*** full path to glib-config."
-+ else
-+ if test -f conf.glibtest ; then
-+ :
-+ else
-+ echo "*** Could not run GLIB test program, checking why..."
-+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+ LIBS="$LIBS $GLIB_LIBS"
-+ AC_TRY_LINK([
-+#include <glib.h>
-+#include <stdio.h>
-+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
-+ [ echo "*** The test program compiled, but did not run. This usually means"
-+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
-+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
-+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
-+ echo "*** is required on your system"
-+ echo "***"
-+ echo "*** If you have an old version installed, it is best to remove it, although"
-+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-+ echo "***"
-+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
-+ echo "*** came with the system with the command"
-+ echo "***"
-+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
-+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
-+ echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
-+ echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
-+ echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
-+ CFLAGS="$ac_save_CFLAGS"
-+ LIBS="$ac_save_LIBS"
-+ fi
-+ fi
-+ GLIB_CFLAGS=""
-+ GLIB_LIBS=""
-+ ifelse([$3], , :, [$3])
-+ fi
-+ AC_SUBST(GLIB_CFLAGS)
-+ AC_SUBST(GLIB_LIBS)
-+ rm -f conf.glibtest
-+])
---- /dev/null
-+++ bison-1.875/m4/inttypes.m4
-@@ -0,0 +1,27 @@
-+# inttypes.m4 serial 1 (gettext-0.11.4)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
-+# <sys/types.h>.
-+
-+AC_DEFUN([gt_HEADER_INTTYPES_H],
-+[
-+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
-+ [
-+ AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <inttypes.h>],
-+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
-+ ])
-+ if test $gt_cv_header_inttypes_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
-+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
-+ fi
-+])
---- /dev/null
-+++ bison-1.875/m4/isc-posix.m4
-@@ -0,0 +1,26 @@
-+# isc-posix.m4 serial 2 (gettext-0.11.2)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
-+
-+# This test replaces the one in autoconf.
-+# Currently this macro should have the same name as the autoconf macro
-+# because gettext's gettext.m4 (distributed in the automake package)
-+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-+# give these diagnostics:
-+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-+
-+undefine([AC_ISC_POSIX])
-+
-+AC_DEFUN([AC_ISC_POSIX],
-+ [
-+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
-+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
-+ ]
-+)
-
diff --git a/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch b/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch
index ac16c5770a..8a41a3a762 100644
--- a/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch
+++ b/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch
@@ -1,4 +1,4 @@
-From 4c0d7733f30903f8d7c7cd7433f5c8a7505e35f5 Mon Sep 17 00:00:00 2001
+From 31bb81ef15c42b10844eb8af8738f672076edf0e Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Tue, 21 Apr 2015 00:48:45 -0700
Subject: [PATCH] doc/local.mk: dont-depend-on-help2man.patch
@@ -10,15 +10,16 @@ Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Updated for bison 3.0.4
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
---
- doc/local.mk | 9 +--------
+ doc/local.mk | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/doc/local.mk b/doc/local.mk
-index c340452..642f385 100644
+index d12836e..f9bf332 100644
--- a/doc/local.mk
+++ b/doc/local.mk
-@@ -98,10 +98,7 @@ endif ! CROSS_COMPILING
+@@ -101,10 +101,7 @@ endif ! CROSS_COMPILING
## Man Pages. ##
## ----------- ##
@@ -30,9 +31,9 @@ index c340452..642f385 100644
# Differences to ignore when comparing the man page (the date).
remove_time_stamp = \
-@@ -124,10 +121,6 @@ $(top_srcdir)/doc/bison.1: $(MAN_DEPS)
+@@ -127,10 +124,6 @@ $(top_srcdir)/doc/bison.1: $(MAN_DEPS)
fi
- $(AM_V_at)rm -f $@*.t
+ $(AM_V_at)rm -f $@*.tmp
-if ENABLE_YACC
-nodist_man_MANS = doc/yacc.1
@@ -41,6 +42,3 @@ index c340452..642f385 100644
## ----------------------------- ##
## Graphviz examples generation. ##
## ----------------------------- ##
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/bison/bison/m4.patch b/meta/recipes-devtools/bison/bison/m4.patch
deleted file mode 100644
index d139da5e79..0000000000
--- a/meta/recipes-devtools/bison/bison/m4.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-Upstream-Status: Pending
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
-Index: bison-2.4.2/m4/lcmessage.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/lcmessage.m4
-@@ -0,0 +1,32 @@
-+# lcmessage.m4 serial 3 (gettext-0.11.3)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
-+
-+# Check whether LC_MESSAGES is available in <locale.h>.
-+
-+AC_DEFUN([AM_LC_MESSAGES],
-+[
-+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-+ if test $am_cv_val_LC_MESSAGES = yes; then
-+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
-+ [Define if your <locale.h> file defines LC_MESSAGES.])
-+ fi
-+])
-Index: bison-2.4.2/m4/uintmax_t.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/uintmax_t.m4
-@@ -0,0 +1,29 @@
-+# uintmax_t.m4 serial 6 (gettext-0.11)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_PREREQ(2.13)
-+
-+# Define uintmax_t to `unsigned long' or `unsigned long long'
-+# if <inttypes.h> does not exist.
-+
-+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
-+[
-+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
-+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
-+ test $ac_cv_type_unsigned_long_long = yes \
-+ && ac_type='unsigned long long' \
-+ || ac_type='unsigned long'
-+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
-+ [Define to unsigned long or unsigned long long
-+ if <inttypes.h> and <stdint.h> don't define.])
-+ fi
-+])
-Index: bison-2.4.2/m4/ulonglong.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/ulonglong.m4
-@@ -0,0 +1,23 @@
-+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
-+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
-+[
-+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
-+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
-+ [unsigned long long ullmax = (unsigned long long) -1;
-+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
-+ ac_cv_type_unsigned_long_long=yes,
-+ ac_cv_type_unsigned_long_long=no)])
-+ if test $ac_cv_type_unsigned_long_long = yes; then
-+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
-+ [Define if you have the unsigned long long type.])
-+ fi
-+])
-Index: bison-2.4.2/m4/intdiv0.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/intdiv0.m4
-@@ -0,0 +1,72 @@
-+# intdiv0.m4 serial 1 (gettext-0.11.3)
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([gt_INTDIV0],
-+[
-+ AC_REQUIRE([AC_PROG_CC])dnl
-+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+
-+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
-+ gt_cv_int_divbyzero_sigfpe,
-+ [
-+ AC_TRY_RUN([
-+#include <stdlib.h>
-+#include <signal.h>
-+
-+static void
-+#ifdef __cplusplus
-+sigfpe_handler (int sig)
-+#else
-+sigfpe_handler (sig) int sig;
-+#endif
-+{
-+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
-+ exit (sig != SIGFPE);
-+}
-+
-+int x = 1;
-+int y = 0;
-+int z;
-+int nan;
-+
-+int main ()
-+{
-+ signal (SIGFPE, sigfpe_handler);
-+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
-+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
-+ signal (SIGTRAP, sigfpe_handler);
-+#endif
-+/* Linux/SPARC yields signal SIGILL. */
-+#if defined (__sparc__) && defined (__linux__)
-+ signal (SIGILL, sigfpe_handler);
-+#endif
-+
-+ z = x / y;
-+ nan = y / y;
-+ exit (1);
-+}
-+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
-+ [
-+ # Guess based on the CPU.
-+ case "$host_cpu" in
-+ alpha* | i[34567]86 | m68k | s390*)
-+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
-+ *)
-+ gt_cv_int_divbyzero_sigfpe="guessing no";;
-+ esac
-+ ])
-+ ])
-+ case "$gt_cv_int_divbyzero_sigfpe" in
-+ *yes) value=1;;
-+ *) value=0;;
-+ esac
-+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
-+ [Define if integer division by zero raises signal SIGFPE.])
-+])
-Index: bison-2.4.2/m4/glib.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/glib.m4
-@@ -0,0 +1,196 @@
-+# Configure paths for GLIB
-+# Owen Taylor 97-11-3
-+
-+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
-+dnl gthread is specified in MODULES, pass to glib-config
-+dnl
-+AC_DEFUN(AM_PATH_GLIB,
-+[dnl
-+dnl Get the cflags and libraries from the glib-config script
-+dnl
-+AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
-+ glib_config_prefix="$withval", glib_config_prefix="")
-+AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
-+ glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
-+AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
-+ , enable_glibtest=yes)
-+
-+ if test x$glib_config_exec_prefix != x ; then
-+ glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
-+ if test x${GLIB_CONFIG+set} != xset ; then
-+ GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
-+ fi
-+ fi
-+ if test x$glib_config_prefix != x ; then
-+ glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
-+ if test x${GLIB_CONFIG+set} != xset ; then
-+ GLIB_CONFIG=$glib_config_prefix/bin/glib-config
-+ fi
-+ fi
-+
-+ for module in . $4
-+ do
-+ case "$module" in
-+ gmodule)
-+ glib_config_args="$glib_config_args gmodule"
-+ ;;
-+ gthread)
-+ glib_config_args="$glib_config_args gthread"
-+ ;;
-+ esac
-+ done
-+
-+ AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
-+ min_glib_version=ifelse([$1], ,0.99.7,$1)
-+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
-+ no_glib=""
-+ if test "$GLIB_CONFIG" = "no" ; then
-+ no_glib=yes
-+ else
-+ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
-+ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
-+ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-+ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-+ glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-+ if test "x$enable_glibtest" = "xyes" ; then
-+ ac_save_CFLAGS="$CFLAGS"
-+ ac_save_LIBS="$LIBS"
-+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+ LIBS="$GLIB_LIBS $LIBS"
-+dnl
-+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
-+dnl checks the results of glib-config to some extent
-+dnl
-+ rm -f conf.glibtest
-+ AC_TRY_RUN([
-+#include <glib.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+int
-+main ()
-+{
-+ int major, minor, micro;
-+ char *tmp_version;
-+
-+ system ("touch conf.glibtest");
-+
-+ /* HP/UX 9 (%@#!) writes to sscanf strings */
-+ tmp_version = g_strdup("$min_glib_version");
-+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-+ printf("%s, bad version string\n", "$min_glib_version");
-+ exit(1);
-+ }
-+
-+ if ((glib_major_version != $glib_config_major_version) ||
-+ (glib_minor_version != $glib_config_minor_version) ||
-+ (glib_micro_version != $glib_config_micro_version))
-+ {
-+ printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
-+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ printf ("*** was found! If glib-config was correct, then it is best\n");
-+ printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
-+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-+ printf("*** required on your system.\n");
-+ printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
-+ printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
-+ printf("*** before re-running configure\n");
-+ }
-+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
-+ (glib_minor_version != GLIB_MINOR_VERSION) ||
-+ (glib_micro_version != GLIB_MICRO_VERSION))
-+ {
-+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
-+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
-+ printf("*** library (version %d.%d.%d)\n",
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ }
-+ else
-+ {
-+ if ((glib_major_version > major) ||
-+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
-+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
-+ {
-+ return 0;
-+ }
-+ else
-+ {
-+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
-+ major, minor, micro);
-+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
-+ printf("***\n");
-+ printf("*** If you have already installed a sufficiently new version, this error\n");
-+ printf("*** probably means that the wrong copy of the glib-config shell script is\n");
-+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
-+ printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
-+ printf("*** correct copy of glib-config. (In this case, you will have to\n");
-+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-+ printf("*** so that the correct libraries are found at run-time))\n");
-+ }
-+ }
-+ return 1;
-+}
-+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-+ CFLAGS="$ac_save_CFLAGS"
-+ LIBS="$ac_save_LIBS"
-+ fi
-+ fi
-+ if test "x$no_glib" = x ; then
-+ AC_MSG_RESULT(yes)
-+ ifelse([$2], , :, [$2])
-+ else
-+ AC_MSG_RESULT(no)
-+ if test "$GLIB_CONFIG" = "no" ; then
-+ echo "*** The glib-config script installed by GLIB could not be found"
-+ echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
-+ echo "*** your path, or set the GLIB_CONFIG environment variable to the"
-+ echo "*** full path to glib-config."
-+ else
-+ if test -f conf.glibtest ; then
-+ :
-+ else
-+ echo "*** Could not run GLIB test program, checking why..."
-+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+ LIBS="$LIBS $GLIB_LIBS"
-+ AC_TRY_LINK([
-+#include <glib.h>
-+#include <stdio.h>
-+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
-+ [ echo "*** The test program compiled, but did not run. This usually means"
-+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
-+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
-+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
-+ echo "*** is required on your system"
-+ echo "***"
-+ echo "*** If you have an old version installed, it is best to remove it, although"
-+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-+ echo "***"
-+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
-+ echo "*** came with the system with the command"
-+ echo "***"
-+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
-+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
-+ echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
-+ echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
-+ echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
-+ CFLAGS="$ac_save_CFLAGS"
-+ LIBS="$ac_save_LIBS"
-+ fi
-+ fi
-+ GLIB_CFLAGS=""
-+ GLIB_LIBS=""
-+ ifelse([$3], , :, [$3])
-+ fi
-+ AC_SUBST(GLIB_CFLAGS)
-+ AC_SUBST(GLIB_LIBS)
-+ rm -f conf.glibtest
-+])
-Index: bison-2.4.2/m4/isc-posix.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/isc-posix.m4
-@@ -0,0 +1,26 @@
-+# isc-posix.m4 serial 2 (gettext-0.11.2)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
-+
-+# This test replaces the one in autoconf.
-+# Currently this macro should have the same name as the autoconf macro
-+# because gettext's gettext.m4 (distributed in the automake package)
-+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-+# give these diagnostics:
-+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-+
-+undefine([AC_ISC_POSIX])
-+
-+AC_DEFUN([AC_ISC_POSIX],
-+ [
-+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
-+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
-+ ]
-+)
diff --git a/meta/recipes-devtools/bison/bison_2.3.bb b/meta/recipes-devtools/bison/bison_2.3.bb
deleted file mode 100644
index 182e8802b2..0000000000
--- a/meta/recipes-devtools/bison/bison_2.3.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "GNU Project parser generator (yacc replacement)"
-DESCRIPTION = "Bison is a general-purpose parser generator that converts an annotated context-free grammar into \
-an LALR(1) or GLR parser for that grammar. Bison is upward compatible with Yacc: all properly-written Yacc \
-grammars ought to work with Bison with no change. Anyone familiar with Yacc should be able to use Bison with \
-little trouble."
-HOMEPAGE = "http://www.gnu.org/software/bison/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-SECTION = "devel"
-DEPENDS = "bison-native flex-native"
-
-PR = "r1"
-
-SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \
- file://bison-2.3_m4.patch"
-
-SRC_URI[md5sum] = "22327efdd5080e2b1acb6e560a04b43a"
-SRC_URI[sha256sum] = "52f78aa4761a74ceb7fdf770f3554dd84308c3b93c4255e3a5c17558ecda293e"
-
-inherit autotools gettext texinfo
-acpaths = "-I ${S}/m4"
-
-do_configure_prepend () {
- rm -f ${S}/m4/*gl.m4
- cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/runtime-po/
-}
diff --git a/meta/recipes-devtools/bison/bison_3.0.4.bb b/meta/recipes-devtools/bison/bison_3.0.4.bb
deleted file mode 100644
index cffcd885aa..0000000000
--- a/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "GNU Project parser generator (yacc replacement)"
-DESCRIPTION = "Bison is a general-purpose parser generator that converts an annotated context-free grammar into \
-an LALR(1) or GLR parser for that grammar. Bison is upward compatible with Yacc: all properly-written Yacc \
-grammars ought to work with Bison with no change. Anyone familiar with Yacc should be able to use Bison with \
-little trouble."
-HOMEPAGE = "http://www.gnu.org/software/bison/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-SECTION = "devel"
-DEPENDS = "bison-native flex-native"
-
-SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
- file://m4.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://dont-depend-on-help2man.patch.patch \
- file://0001-src-local.mk-fix-parallel-issue.patch \
- file://add-with-bisonlocaledir.patch \
-"
-
-# No point in hardcoding path to m4, just use PATH
-EXTRA_OECONF += "M4=m4"
-
-SRC_URI[md5sum] = "c342201de104cc9ce0a21e0ad10d4021"
-SRC_URI[sha256sum] = "a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1"
-
-LDFLAGS_prepend_libc-uclibc = " -lrt "
-DEPENDS_class-native = "gettext-minimal-native"
-
-inherit autotools gettext texinfo
-acpaths = "-I ${S}/m4"
-
-do_compile_prepend() {
- for i in mfcalc calc++ rpcalc; do mkdir -p ${B}/examples/$i; done
-}
-
-do_install_append_class-native() {
- create_wrapper ${D}/${bindir}/bison \
- BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
-}
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/bison/bison_3.4.2.bb b/meta/recipes-devtools/bison/bison_3.4.2.bb
new file mode 100644
index 0000000000..46f0f908dd
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison_3.4.2.bb
@@ -0,0 +1,40 @@
+SUMMARY = "GNU Project parser generator (yacc replacement)"
+DESCRIPTION = "Bison is a general-purpose parser generator that converts an annotated context-free grammar into \
+an LALR(1) or GLR parser for that grammar. Bison is upward compatible with Yacc: all properly-written Yacc \
+grammars ought to work with Bison with no change. Anyone familiar with Yacc should be able to use Bison with \
+little trouble."
+HOMEPAGE = "http://www.gnu.org/software/bison/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+SECTION = "devel"
+DEPENDS = "bison-native flex-native"
+
+SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
+ file://dont-depend-on-help2man.patch.patch \
+ file://add-with-bisonlocaledir.patch \
+"
+
+# No point in hardcoding path to m4, just use PATH
+EXTRA_OECONF += "M4=m4"
+
+SRC_URI[md5sum] = "d1ceb9dfde2d03b24a4c1137f7f1b572"
+SRC_URI[sha256sum] = "27d05534699735dc69e86add5b808d6cb35900ad3fd63fa82e3eb644336abfa0"
+
+inherit autotools gettext texinfo
+
+# The automatic m4 path detection gets confused, so force the right value
+acpaths = "-I ${S}/m4"
+
+do_compile_prepend() {
+ for i in mfcalc calc++ rpcalc; do mkdir -p ${B}/examples/$i; done
+}
+
+do_install_append_class-native() {
+ create_wrapper ${D}/${bindir}/bison \
+ BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
+}
+do_install_append_class-nativesdk() {
+ create_wrapper ${D}/${bindir}/bison \
+ BISON_PKGDATADIR=${datadir}/bison
+}
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch b/meta/recipes-devtools/bootchart2/bootchart2/0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch
deleted file mode 100644
index 118814a807..0000000000
--- a/meta/recipes-devtools/bootchart2/bootchart2/0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 2225ab2038bfe50f16f972e39d89bcd0bd7767f5 Mon Sep 17 00:00:00 2001
-From: Steffen Pankratz <kratz00@gmx.de>
-Date: Tue, 9 Feb 2016 13:49:42 +0100
-Subject: [PATCH] Fixed: Missing default value for BOOTLOG_DEST
-
-Upstream-Status: Backport
-
-BUILDLOG_DEST seems to be a typo or mix-up which was introduced with 281d1df80884bf2969c509ec60ee8a6593524fe8
-
-Signed-off-by: Peter Liu <peter.x.liu@external.atlascopco.com>
----
- bootchartd.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bootchartd.in b/bootchartd.in
-index f58ab9e..30af677 100755
---- a/bootchartd.in
-+++ b/bootchartd.in
-@@ -37,7 +37,7 @@ PATH="/sbin:/bin:/usr/sbin:/usr/bin:$PATH"
-
- # Defaults, in case we can't find our configuration
- SAMPLE_HZ=50
--BUILDLOG_DEST=/var/log/bootchart.tgz
-+BOOTLOG_DEST=/var/log/bootchart.tgz
- AUTO_RENDER="no"
- AUTO_RENDER_DIR="/var/log"
- AUTO_RENDER_FORMAT="png"
---
-1.9.1
-
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchart2-support-usrmerge.patch b/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchart2-support-usrmerge.patch
new file mode 100644
index 0000000000..8ee6723df1
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchart2-support-usrmerge.patch
@@ -0,0 +1,37 @@
+From b6d1a1ff2de363b1b76c8c70f77ae56a4e4d4b56 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 5 Sep 2019 18:37:31 +0800
+Subject: [PATCH] bootchart2: support usrmerge
+
+Upstream-Status: Inappropriate[oe-specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1cc2974..f988904 100644
+--- a/Makefile
++++ b/Makefile
+@@ -36,7 +36,7 @@ endif
+ PY_SITEDIR ?= $(PY_LIBDIR)/site-packages
+ LIBC_A_PATH = /usr$(LIBDIR)
+ # Always lib, even on systems that otherwise use lib64
+-SYSTEMD_UNIT_DIR = $(EARLY_PREFIX)/lib/systemd/system
++SYSTEMD_UNIT_DIR ?= $(EARLY_PREFIX)/lib/systemd/system
+ COLLECTOR = \
+ collector/collector.o \
+ collector/output.o \
+@@ -99,7 +99,7 @@ install-chroot:
+ install -d $(DESTDIR)$(PKGLIBDIR)/tmpfs
+
+ install-collector: all install-chroot
+- install -m 755 -D bootchartd $(DESTDIR)$(EARLY_PREFIX)/sbin/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX)
++ install -m 755 -D bootchartd $(DESTDIR)${BASE_SBINDIR}/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX)
+ install -m 644 -D bootchartd.conf $(DESTDIR)/etc/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX).conf
+ install -m 755 -D bootchart-collector $(DESTDIR)$(PKGLIBDIR)/$(PROGRAM_PREFIX)bootchart$(PROGRAM_SUFFIX)-collector
+
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch b/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch
new file mode 100644
index 0000000000..7a8813e968
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch
@@ -0,0 +1,45 @@
+From 09505532b49573663fb4ff4dad424dc2ef4c1f84 Mon Sep 17 00:00:00 2001
+From: Kyle Russell <bkylerussell@gmail.com>
+Date: Wed, 13 Jul 2016 17:30:00 -0400
+Subject: [PATCH] collector: Allocate space on heap for chunks
+
+Nicer for embedded devices which may have smaller stack limitations.
+
+Upstream-Status: Submitted [https://github.com/xrmx/bootchart/pull/74]
+
+Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
+---
+ collector/dump.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/collector/dump.c b/collector/dump.c
+index e673b5b..2f094b4 100644
+--- a/collector/dump.c
++++ b/collector/dump.c
+@@ -184,12 +184,12 @@ static void dump_buffers (DumpState *s)
+ log ("reading %d chunks (of %d) ...\n", max_chunk, s->map.max_chunk);
+ for (i = 0; i < max_chunk; i++) {
+ FILE *output;
+- char buffer[CHUNK_SIZE];
+- Chunk *c = (Chunk *)&buffer;
++ char *buffer = malloc(CHUNK_SIZE);
++ Chunk *c = (Chunk *)buffer;
+ size_t addr = (size_t) s->map.chunks[i];
+
+ lseek (s->mem, addr, SEEK_SET);
+- read (s->mem, &buffer, CHUNK_SIZE);
++ read (s->mem, buffer, CHUNK_SIZE);
+ /* log ("type: '%s' len %d\n",
+ c->dest_stream, (int)c->length); */
+
+@@ -197,6 +197,7 @@ static void dump_buffers (DumpState *s)
+ fwrite (c->data, 1, c->length, output);
+ bytes_dumped += c->length;
+ fclose (output);
++ free(buffer);
+ }
+ log ("wrote %ld kb\n", (long)(bytes_dumped+1023)/1024);
+ }
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
index fdebb6419c..a938b2da49 100644
--- a/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
+++ b/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
@@ -90,13 +90,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=44ac4678311254db62edf8fd39cb8124"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-SRC_URI = "git://github.com/mmeeks/bootchart.git \
+SRC_URI = "git://github.com/xrmx/bootchart.git \
file://bootchartd_stop.sh \
- file://0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch \
+ file://0001-collector-Allocate-space-on-heap-for-chunks.patch \
+ file://0001-bootchart2-support-usrmerge.patch \
"
S = "${WORKDIR}/git"
-SRCREV = "48e0071048564c6af75ab969e842d6dec808da09"
+SRCREV = "331ada031f1d65f6d934d918f896e1c708c64bf7"
+PV .= "+git${SRCPV}"
inherit systemd update-rc.d python3native update-alternatives
@@ -113,6 +115,8 @@ UPDATERCPN = "bootchartd-stop-initscript"
INITSCRIPT_NAME = "bootchartd_stop.sh"
INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
+EXTRA_OEMAKE = 'BASE_SBINDIR="${base_sbindir}"'
+
do_compile_prepend () {
export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
export BINDIR="${bindir}"
@@ -125,6 +129,8 @@ do_install () {
export BINDIR="${bindir}"
export DESTDIR="${D}"
export LIBDIR="${base_libdir}"
+ export PKGLIBDIR="${base_libdir}/bootchart"
+ export SYSTEMD_UNIT_DIR="${systemd_unitdir}/system"
oe_runmake install
install -d ${D}${sysconfdir}/init.d
@@ -133,14 +139,14 @@ do_install () {
echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
# Use python 3 instead of python 2
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/pybootchartgui
+ sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' ${D}${bindir}/pybootchartgui
}
PACKAGES =+ "pybootchartgui"
FILES_pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui"
-RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
+RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-shell python3-compression python3-codecs"
RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
-RDEPENDS_${PN}_class-target += "lsb"
+RDEPENDS_${PN}_class-target += "lsb-release"
DEPENDS_append_class-native = " python3-pycairo-native"
PACKAGES =+ "bootchartd-stop-initscript"
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch
new file mode 100644
index 0000000000..5846f04d1a
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch
@@ -0,0 +1,25 @@
+From d3adfc21c9cc264bd191722f102963cbc4794259 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 23 May 2018 21:20:35 +0300
+Subject: [PATCH] Add a possibility to specify where python modules are
+ installed
+
+Upstream-Status: Inappropriate [oe-core specific to solve multilib use case]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 1697794c..8ab38818 100644
+--- a/Makefile
++++ b/Makefile
+@@ -651,7 +651,7 @@ endif
+ ifeq ($(PYTHON_BINDINGS),1)
+ install_python: libbtrfsutil_python
+ $(Q)cd libbtrfsutil/python; \
+- $(PYTHON) setup.py install --skip-build $(if $(DESTDIR),--root $(DESTDIR)) --prefix $(prefix)
++ $(PYTHON) setup.py install --skip-build $(if $(DESTDIR),--root $(DESTDIR)) --prefix $(prefix) --install-lib=$(PYTHON_SITEPACKAGES_DIR)
+
+ .PHONY: install_python
+ endif
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-parallel.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-parallel.patch
deleted file mode 100644
index bbc53c6fe1..0000000000
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-parallel.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-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.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 860a390..8a6fbd7 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -142,7 +142,7 @@ else
- check_echo = true
- endif
-
--%.o.d: %.c
-+%.o.d: %.c version.h
- $(Q)$(CC) -MM -MG -MF $@ -MT $(@:.o.d=.o) -MT $(@:.o.d=.static.o) -MT $@ $(CFLAGS) $<
-
- .c.o:
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.7.1.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.7.1.bb
deleted file mode 100644
index becf093967..0000000000
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.7.1.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Checksumming Copy on Write Filesystem utilities"
-DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
-implementing advanced features while focusing on fault tolerance, repair and \
-easy administration. \
-This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
-btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
-
-HOMEPAGE = "https://btrfs.wiki.kernel.org"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
-SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl"
-RDEPENDS_${PN} = "libgcc"
-
-SRCREV = "6819fbcdcab63c2d95da1a2997e37be9a71ca533"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
- file://fix-parallel.patch \
-"
-
-inherit autotools-brokensep pkgconfig
-
-EXTRA_OECONF += "--disable-documentation"
-EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
-
-
-do_configure_prepend() {
- sh autogen.sh
-}
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb
new file mode 100644
index 0000000000..a44c0bc87a
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Checksumming Copy on Write Filesystem utilities"
+DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
+implementing advanced features while focusing on fault tolerance, repair and \
+easy administration. \
+This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
+btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
+
+HOMEPAGE = "https://btrfs.wiki.kernel.org"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
+SECTION = "base"
+DEPENDS = "util-linux attr e2fsprogs lzo acl"
+DEPENDS_append_class-target = " udev"
+RDEPENDS_${PN} = "libgcc"
+
+SRCREV = "f82e569b33c3c1cfd4f8f405085ff8d439a0a915"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
+ file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
+ "
+
+PACKAGECONFIG ??= "python"
+PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
+PACKAGECONFIG[python] = "--enable-python,--disable-python,python3-setuptools-native"
+PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd"
+
+inherit autotools-brokensep pkgconfig manpages
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'distutils3-base', '', d)}
+
+CLEANBROKEN = "1"
+
+EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
+EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}"
+EXTRA_PYTHON_CFLAGS_class-native = ""
+EXTRA_PYTHON_LDFLAGS = "${LDFLAGS}"
+EXTRA_OEMAKE = "V=1 'EXTRA_PYTHON_CFLAGS=${EXTRA_PYTHON_CFLAGS}' 'EXTRA_PYTHON_LDFLAGS=${EXTRA_PYTHON_LDFLAGS}'"
+
+do_configure_prepend() {
+ # Upstream doesn't ship this and autoreconf won't install it as automake isn't used.
+ mkdir -p ${S}/config
+ cp -f $(automake --print-libdir)/install-sh ${S}/config/
+}
+
+S = "${WORKDIR}/git"
+
+do_install_append() {
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
+ oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python
+ fi
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/build-compare/build-compare_git.bb b/meta/recipes-devtools/build-compare/build-compare_git.bb
index fa9c6b45d3..b0560cc277 100644
--- a/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ b/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -6,22 +6,19 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SRC_URI = "git://github.com/openSUSE/build-compare.git \
- file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1 \
file://Ignore-DWARF-sections.patch;striplevel=1 \
- file://0001-Add-support-for-deb-and-ipk-packaging.patch \
- file://functions.sh-remove-space-at-head.patch \
- file://functions.sh-run-rpm-once-to-make-it-faster.patch \
- file://pkg-diff.sh-check-for-fifo-named-pipe.patch \
- file://pkg-diff.sh-check_single_file-return-at-once-when-sa.patch \
- file://pkg-diff.sh-remove-space-in-the-end-for-ftype.patch \
- file://functions.sh-improve-deb-and-ipk-checking.patch \
"
-SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
+# Date matches entry in build-compare.changes and date of SRCREV.
+#
+SRCREV = "4dfa207660776cae120afa4353aec7f1f2a998d2"
+PE = "1"
+PV = "2019.08.14+git${SRCPV}"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
-BBCLASSEXTEND += "native nativesdk"
+BBCLASSEXTEND = "native nativesdk"
do_install() {
install -d ${D}/${bindir}
diff --git a/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch b/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch
deleted file mode 100644
index 82fd8169ff..0000000000
--- a/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 02dbc7e3478e409d6f5e3e1c53daddf8838be999 Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Tue, 1 Sep 2015 12:04:33 +0100
-Subject: [PATCH] Add support for deb and ipk packaging
-
-Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- functions.sh | 15 +++++++++++++++
- pkg-diff.sh | 6 ++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/functions.sh b/functions.sh
-index 06079df..85c9003 100644
---- a/functions.sh
-+++ b/functions.sh
-@@ -85,6 +85,13 @@ function unpackage()
- CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories --quiet"
- rpm2cpio $file | cpio ${CPIO_OPTS}
- ;;
-+ *.ipk|*.deb)
-+ ar x $file
-+ tar xf control.tar.gz
-+ rm control.tar.gz
-+ tar xf data.tar.gz
-+ rm data.tar.gz
-+ ;;
- esac
- popd 1>/dev/null
- }
-@@ -255,4 +262,12 @@ function cmp_spec ()
- rm $file1 $file2
- return $RES
- }
-+
-+function adjust_controlfile() {
-+ cat $1/control | sed '/^Version: /d' > $1/control.fixed
-+ mv $1/control.fixed $1/control
-+ cat $2/control | sed '/^Version: /d' > $2/control.fixed
-+ mv $2/control.fixed $2/control
-+}
-+
- # vim: tw=666 ts=2 et
-diff --git a/pkg-diff.sh b/pkg-diff.sh
-index 0f1fa76..3cf10aa 100644
---- a/pkg-diff.sh
-+++ b/pkg-diff.sh
-@@ -138,6 +138,12 @@ echo "Extracting packages"
- unpackage $oldpkg $dir/old
- unpackage $newpkg $dir/new
-
-+case $oldpkg in
-+ *.deb|*.ipk)
-+ adjust_controlfile $dir/old $dir/new
-+ ;;
-+esac
-+
- # 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
---
-2.1.0
-
diff --git a/meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch b/meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch
index 7dda1acbf2..2fb62ae8ce 100644
--- a/meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch
+++ b/meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch
@@ -23,18 +23,15 @@ Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg-diff.sh b/pkg-diff.sh
-index 56035c1..0f1fa76 100755
+index 9c2125e..b0d77c8 100755
--- a/pkg-diff.sh
+++ b/pkg-diff.sh
-@@ -658,7 +658,7 @@ check_single_file()
+@@ -851,7 +851,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" " ")"
+ # Don't compare .build-id, .gnu_debuglink and .gnu_debugdata sections
+- sections="$($OBJDUMP -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" -e "\.gnu_debugdata" | 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 "\.gnu_debugdata" -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
-
+ $OBJDUMP -s -j $section old/$file | sed "s,^old/,," > $file1
+ $OBJDUMP -s -j $section new/$file | sed "s,^new/,," > $file2
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
deleted file mode 100644
index cff3a9e236..0000000000
--- a/meta/recipes-devtools/build-compare/files/Rename-rpm-check.sh-to-pkg-diff.sh.patch
+++ /dev/null
@@ -1,1599 +0,0 @@
-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/build-compare/files/functions.sh-improve-deb-and-ipk-checking.patch b/meta/recipes-devtools/build-compare/files/functions.sh-improve-deb-and-ipk-checking.patch
deleted file mode 100644
index 05420f89f7..0000000000
--- a/meta/recipes-devtools/build-compare/files/functions.sh-improve-deb-and-ipk-checking.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From b4eb7fde10318162bd2d02b9017ef51746752a91 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 14 Jul 2016 23:14:21 -0700
-Subject: [PATCH 4/4] functions.sh: improve deb and ipk checking
-
-* The deb and ipk's depends version string is like:
- Depends: libc6 (>= 2.24)
- Update trim_release_old and trim_release_new to match the bracket in
- the end ")".
-
-* The deb's data tarball now is .tar.xz, and ipk's is .tar.gz.
-
-* Update adjust_controlfile() to make ituse trim_release_old and
- trim_release_new.
-
-Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- functions.sh | 45 ++++++++++++++++++++++++++++-----------------
- 1 file changed, 28 insertions(+), 17 deletions(-)
-
-diff --git a/functions.sh b/functions.sh
-index aa572f9..fe493ba 100755
---- a/functions.sh
-+++ b/functions.sh
-@@ -78,7 +78,7 @@ check_header()
- function trim_release_old()
- {
- sed -e "
-- /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g}
-+ /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\|$version_release_old_regex_l)\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g}
- s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
- s/^ *//g
- "
-@@ -86,7 +86,7 @@ function trim_release_old()
- function trim_release_new()
- {
- sed -e "
-- /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g}
-+ /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\|$version_release_new_regex_l)\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g}
- s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
- s/^ *//g
- "
-@@ -133,8 +133,8 @@ function unpackage()
- ar x $file
- tar xf control.tar.gz
- rm control.tar.gz
-- tar xf data.tar.gz
-- rm data.tar.gz
-+ tar xf data.tar.[xg]z
-+ rm data.tar.[xg]z
- ;;
- esac
- popd 1>/dev/null
-@@ -164,6 +164,22 @@ function get_value()
- sed -n -e "/^___${1}___/,/^___${1}___/p" $2 | sed -e "/^___${1}___/d"
- }
-
-+# Set version_release_old_regex_s, version_release_old_regex_l and
-+# name_ver_rel_old_regex_l, also the new ones.
-+function set_regex() {
-+ # Remember to quote the . which is in release
-+ # Short version without B_CN
-+ version_release_old_regex_s=${version_release_old%.*}
-+ version_release_old_regex_s=${version_release_old_regex_s//./\\.}
-+ version_release_new_regex_s=${version_release_new%.*}
-+ version_release_new_regex_s=${version_release_new_regex_s//./\\.}
-+ # Long version with B_CNT
-+ version_release_old_regex_l=${version_release_old//./\\.}
-+ version_release_new_regex_l=${version_release_new//./\\.}
-+ name_ver_rel_old_regex_l=${name_ver_rel_old//./\\.}
-+ name_ver_rel_new_regex_l=${name_ver_rel_new//./\\.}
-+}
-+
- # Compare just the rpm meta data of two rpms
- # Returns:
- # 0 in case of same content
-@@ -194,17 +210,7 @@ function cmp_spec ()
- version_release_old="$(get_value QF_VER_REL $spec_old)"
- name_ver_rel_old="$(get_value QF_NAME_VER_REL $spec_old)"
-
-- # Remember to quote the . which is in release
-- # Short version without B_CN
-- version_release_old_regex_s=${version_release_old%.*}
-- version_release_old_regex_s=${version_release_old_regex_s//./\\.}
-- version_release_new_regex_s=${version_release_new%.*}
-- version_release_new_regex_s=${version_release_new_regex_s//./\\.}
-- # Long version with B_CNT
-- version_release_old_regex_l=${version_release_old//./\\.}
-- version_release_new_regex_l=${version_release_new//./\\.}
-- name_ver_rel_old_regex_l=${name_ver_rel_old//./\\.}
-- name_ver_rel_new_regex_l=${name_ver_rel_new//./\\.}
-+ set_regex
-
- # Check the whole spec file at first, return 0 immediately if the
- # are the same.
-@@ -285,9 +291,14 @@ function cmp_spec ()
- }
-
- function adjust_controlfile() {
-- cat $1/control | sed '/^Version: /d' > $1/control.fixed
-+ version_release_old="`sed -ne 's/^Version: \(.*\)/\1/p' $1/control`"
-+ name_ver_rel_old="`sed -n -e 's/^Package: \(.*\)/\1/p' $1/control`-`sed -n -e 's/^Version: \(.*\)/\1/p' $1/control`"
-+ version_release_new="`sed -ne 's/^Version: \(.*\)/\1/p' $2/control`"
-+ name_ver_rel_new="`sed -n -e 's/^Package: \(.*\)/\1/p' $2/control`-`sed -n -e 's/^Version: \(.*\)/\1/p' $2/control`"
-+ set_regex
-+ cat $1/control | trim_release_old > $1/control.fixed
- mv $1/control.fixed $1/control
-- cat $2/control | sed '/^Version: /d' > $2/control.fixed
-+ cat $2/control | trim_release_new > $2/control.fixed
- mv $2/control.fixed $2/control
- }
-
---
-2.9.0
-
diff --git a/meta/recipes-devtools/build-compare/files/functions.sh-remove-space-at-head.patch b/meta/recipes-devtools/build-compare/files/functions.sh-remove-space-at-head.patch
deleted file mode 100644
index 02e96bab5a..0000000000
--- a/meta/recipes-devtools/build-compare/files/functions.sh-remove-space-at-head.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 402a821e604f280e62c34bf4d40c6d1b4c6c892d Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 4 Jul 2016 20:11:33 -0700
-Subject: [PATCH] functions.sh: remove space at head
-
-The command like:
-rpm -qp --nodigest --nosignature --qf '<foo> [%{REQUIRENAME}\n]\n'
- ^^space
-
-The space will be printed, and will impact the check result, so remove it.
-
-Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/9]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- functions.sh | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/functions.sh b/functions.sh
-index 85c9003..b1069d2 100644
---- a/functions.sh
-+++ b/functions.sh
-@@ -26,6 +26,7 @@ function trim_release_old()
- sed -e "
- /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g}
- s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
-+ s/^ *//g
- "
- }
- function trim_release_new()
-@@ -33,6 +34,7 @@ function trim_release_new()
- sed -e "
- /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g}
- s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
-+ s/^ *//g
- "
- }
- # Get single directory or filename with long or short release string
---
-2.9.0
-
diff --git a/meta/recipes-devtools/build-compare/files/functions.sh-run-rpm-once-to-make-it-faster.patch b/meta/recipes-devtools/build-compare/files/functions.sh-run-rpm-once-to-make-it-faster.patch
deleted file mode 100644
index f5b99d9447..0000000000
--- a/meta/recipes-devtools/build-compare/files/functions.sh-run-rpm-once-to-make-it-faster.patch
+++ /dev/null
@@ -1,361 +0,0 @@
-From f34d632c427b1e1570ef9136454fc01d8c9f10a6 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 7 Jul 2016 19:34:09 -0700
-Subject: [PATCH] functions.sh: run rpm once to make it faster
-
-The rpm tool is a heavy process, it ran 16 (or 17 for kernel)
-"rpm -qp" times when the pkgs are identical, now we only run
-"rpm -qp --qf <all we need>" twice (one is for old pkg, and one is for
-new), save the results to spec_old and spec_new, then use sed command to
-get what we need later, this can make it 75% faster when the pkgs are
-identical. Here is the rough data on my host Ubuntu 14.04.4, 32 cores
-CPU and 128G mem:
-* When the pkgs are identical:
- - Before the patch: 1s
- - After the patch: 0.26s
- I compare the whole spec firstly, and return 0 if they are the same,
- or go on checking one by one if not, without this, it would be 0.46s,
- the gain is great when there are lot of packages, usually, we have
- more than 10,000 rpms to compare.
-
-* When the pkgs are different:
- That depends on where is the different, if the different is at the
- comparing rpmtags stage:
- - Before the patch: 0.26s
- - After the patch: 0.29s
- Increased 0.03s, but if the different is happend later than comparing
- rpmtags, it will save time.
-
-Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/9]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- functions.sh | 245 ++++++++++++++++++++++++++++++++---------------------------
- 1 file changed, 132 insertions(+), 113 deletions(-)
- mode change 100644 => 100755 functions.sh
-
-diff --git a/functions.sh b/functions.sh
-old mode 100644
-new mode 100755
-index b1069d2..aa572f9
---- a/functions.sh
-+++ b/functions.sh
-@@ -10,9 +10,63 @@
-
- RPM="rpm -qp --nodigest --nosignature"
-
--check_header()
-+# Name, Version, Release
-+QF_NAME="%{NAME}"
-+QF_VER_REL="%{VERSION}-%{RELEASE}"
-+QF_NAME_VER_REL="%{NAME}-%{VERSION}-%{RELEASE}"
-+
-+# provides destroy this because at least the self-provide includes the
-+# -buildnumber :-(
-+QF_PROVIDES="[%{PROVIDENAME} %{PROVIDEFLAGS} %{PROVIDEVERSION}\\n]\\n"
-+QF_PROVIDES="$QF_PROVIDES [%{REQUIRENAME} %{REQUIREFLAGS} %{REQUIREVERSION}\\n]\\n"
-+QF_PROVIDES="$QF_PROVIDES [%{CONFLICTNAME} %{CONFLICTFLAGS} %{CONFLICTVERSION}\\n]\\n"
-+QF_PROVIDES="$QF_PROVIDES [%{OBSOLETENAME} %{OBSOLETEFLAGS} %{OBSOLETEVERSION}\\n]\\n"
-+
-+# don't look at RELEASE, it contains our build number
-+QF_TAGS="%{NAME} %{VERSION} %{EPOCH}\\n"
-+QF_TAGS="$QF_TAGS %{SUMMARY}\\n%{DESCRIPTION}\\n"
-+# the DISTURL tag can be used as checkin ID
-+QF_TAGS="$QF_TAGS %{VENDOR} %{DISTRIBUTION} %{DISTURL}"
-+QF_TAGS="$QF_TAGS %{LICENSE} %{LICENSE}\\n"
-+QF_TAGS="$QF_TAGS %{GROUP} %{URL} %{EXCLUDEARCH} %{EXCLUDEOS} %{EXCLUSIVEARCH}\\n"
-+QF_TAGS="$QF_TAGS %{EXCLUSIVEOS} %{RPMVERSION} %{PLATFORM}\\n"
-+QF_TAGS="$QF_TAGS %{PAYLOADFORMAT} %{PAYLOADCOMPRESSOR} %{PAYLOADFLAGS}\\n"
-+
-+# XXX We also need to check the existence (but not the content (!))
-+# of SIGGPG (and perhaps the other SIG*)
-+# XXX We don't look at triggers
-+QF_TAGS="$QF_TAGS [%{VERIFYSCRIPTPROG} %{VERIFYSCRIPT}]\\n"
-+# Only the first ChangeLog entry; should be enough
-+QF_TAGS="$QF_TAGS %{CHANGELOGTIME} %{CHANGELOGNAME} %{CHANGELOGTEXT}\\n"
-+
-+# scripts, might contain release number
-+QF_SCRIPT="[%{PREINPROG} %{PREIN}\\n]\\n[%{POSTINPROG} %{POSTIN}\\n]\\n[%{PREUNPROG} %{PREUN}\\n]\\n[%{POSTUNPROG} %{POSTUN}\\n]\\n"
-+
-+# Now the files. We leave out mtime and size. For normal files
-+# the size will influence the MD5 anyway. For directories the sizes can
-+# differ, depending on which file system the package was built. To not
-+# have to filter out directories we simply ignore all sizes.
-+# Also leave out FILEDEVICES, FILEINODES (depends on the build host),
-+# FILECOLORS, FILECLASS (normally useful but file output contains mtimes),
-+# FILEDEPENDSX and FILEDEPENDSN.
-+# Also FILELANGS (or?)
-+QF_FILELIST="[%{FILENAMES} %{FILEFLAGS} %{FILESTATES} %{FILEMODES:octal} %{FILEUSERNAME} %{FILEGROUPNAME} %{FILERDEVS} %{FILEVERIFYFLAGS} %{FILELINKTOS}\n]\\n"
-+# ??? what to do with FILEPROVIDE and FILEREQUIRE?
-+
-+QF_CHECKSUM="[%{FILENAMES} %{FILEMD5S} %{FILEFLAGS}\n]\\n"
-+
-+QF_ALL="\n___QF_NAME___\n${QF_NAME}\n___QF_NAME___\n"
-+QF_ALL="$QF_ALL\n___QF_TAGS___\n${QF_TAGS}\n___QF_TAGS___\n"
-+QF_ALL="$QF_ALL\n___QF_VER_REL___\n${QF_VER_REL}\n___QF_VER_REL___\n"
-+QF_ALL="$QF_ALL\n___QF_NAME_VER_REL___\n${QF_NAME_VER_REL}\n___QF_NAME_VER_REL___\n"
-+QF_ALL="$QF_ALL\n___QF_PROVIDES___\n${QF_PROVIDES}\n___QF_PROVIDES___\n"
-+QF_ALL="$QF_ALL\n___QF_SCRIPT___\n${QF_SCRIPT}\n___QF_SCRIPT___\n"
-+QF_ALL="$QF_ALL\n___QF_FILELIST___\n${QF_FILELIST}\n___QF_FILELIST___\n"
-+QF_ALL="$QF_ALL\n___QF_CHECKSUM___\n${QF_CHECKSUM}\n___QF_CHECKSUM___\n"
-+
-+check_header()
- {
-- $RPM --qf "$QF" "$1"
-+ $RPM --qf "$1" "$2"
- }
-
- # Trim version-release string:
-@@ -47,18 +101,6 @@ function grep_release_new()
- grep -E "(/boot|/lib/modules|/lib/firmware|/usr/src)/[^/]+(${version_release_new_regex_l}(\$|[^/]+\$)|${version_release_new_regex_s}(\$|[^/]+\$))"
- }
-
--function check_provides()
--{
-- local pkg=$1
-- # provides destroy this because at least the self-provide includes the
-- # -buildnumber :-(
-- QF="[%{PROVIDENAME} %{PROVIDEFLAGS} %{PROVIDEVERSION}\\n]\\n"
-- QF="$QF [%{REQUIRENAME} %{REQUIREFLAGS} %{REQUIREVERSION}\\n]\\n"
-- QF="$QF [%{CONFLICTNAME} %{CONFLICTFLAGS} %{CONFLICTVERSION}\\n]\\n"
-- QF="$QF [%{OBSOLETENAME} %{OBSOLETEFLAGS} %{OBSOLETEVERSION}\\n]\\n"
-- check_header "$pkg"
--}
--
- #usage unpackage <file> $dir
- # Unpack files in directory $dir
- # like /usr/bin/unpackage - just for one file and with no options
-@@ -98,6 +140,30 @@ function unpackage()
- popd 1>/dev/null
- }
-
-+# Run diff command on the files
-+# $1: printed info
-+# $2: file1
-+# $3: file2
-+function comp_file()
-+{
-+ echo "comparing $1"
-+ if ! diff -au $2 $3; then
-+ if test -z "$check_all"; then
-+ rm $2 $3 $spec_old $spec_new
-+ return 1
-+ fi
-+ fi
-+ return 0
-+}
-+
-+# Get var's value from specfile.
-+# $1: var name
-+# $2: specfile
-+function get_value()
-+{
-+ sed -n -e "/^___${1}___/,/^___${1}___/p" $2 | sed -e "/^___${1}___/d"
-+}
-+
- # Compare just the rpm meta data of two rpms
- # Returns:
- # 0 in case of same content
-@@ -107,56 +173,29 @@ function unpackage()
- function cmp_spec ()
- {
- local RES
-- local file1 file2
-+ local file_old file_new
- local f
- local sh=$1
- local oldrpm=$2
- local newrpm=$3
-
-- QF="%{NAME}"
--
-- # don't look at RELEASE, it contains our build number
-- QF="$QF %{VERSION} %{EPOCH}\\n"
-- QF="$QF %{SUMMARY}\\n%{DESCRIPTION}\\n"
-- QF="$QF %{VENDOR} %{DISTRIBUTION} %{DISTURL}"
-- QF="$QF %{LICENSE} %{LICENSE}\\n"
-- QF="$QF %{GROUP} %{URL} %{EXCLUDEARCH} %{EXCLUDEOS} %{EXCLUSIVEARCH}\\n"
-- QF="$QF %{EXCLUSIVEOS} %{RPMVERSION} %{PLATFORM}\\n"
-- QF="$QF %{PAYLOADFORMAT} %{PAYLOADCOMPRESSOR} %{PAYLOADFLAGS}\\n"
--
--
-- # XXX We also need to check the existence (but not the content (!))
-- # of SIGGPG (and perhaps the other SIG*)
--
-- # XXX We don't look at triggers
--
-- QF="$QF [%{VERIFYSCRIPTPROG} %{VERIFYSCRIPT}]\\n"
--
-- # Only the first ChangeLog entry; should be enough
-- QF="$QF %{CHANGELOGTIME} %{CHANGELOGNAME} %{CHANGELOGTEXT}\\n"
--
-- file1=`mktemp`
-- file2=`mktemp`
--
-- check_header $oldrpm > $file1
-- check_header $newrpm > $file2
--
-- # the DISTURL tag can be used as checkin ID
-- #echo "$QF"
-- echo "comparing rpmtags"
-- if ! diff -au $file1 $file2; then
-- if test -z "$check_all"; then
-- rm $file1 $file2
-- return 1
-- fi
-- fi
--
-+ file_old=`mktemp`
-+ file_new=`mktemp`
-+ spec_old=`mktemp`
-+ spec_new=`mktemp`
-+
-+ check_header "$QF_ALL" $oldrpm > $spec_old
-+ check_header "$QF_ALL" $newrpm > $spec_new
-+
-+ name_new="$(get_value QF_NAME $spec_new)"
-+ version_release_new="$(get_value QF_VER_REL $spec_new)"
-+ name_ver_rel_new="$(get_value QF_NAME_VER_REL $spec_new)"
-+
-+ version_release_old="$(get_value QF_VER_REL $spec_old)"
-+ name_ver_rel_old="$(get_value QF_NAME_VER_REL $spec_old)"
-+
- # Remember to quote the . which is in release
-- version_release_old=$($RPM --qf "%{VERSION}-%{RELEASE}" "$oldrpm")
-- version_release_new=$($RPM --qf "%{VERSION}-%{RELEASE}" "$newrpm")
-- name_ver_rel_old=$($RPM --qf "%{NAME}-%{VERSION}-%{RELEASE}" "$oldrpm")
-- name_ver_rel_new=$($RPM --qf "%{NAME}-%{VERSION}-%{RELEASE}" "$newrpm")
-- # Short version without B_CNT
-+ # Short version without B_CN
- version_release_old_regex_s=${version_release_old%.*}
- version_release_old_regex_s=${version_release_old_regex_s//./\\.}
- version_release_new_regex_s=${version_release_new%.*}
-@@ -166,10 +205,27 @@ function cmp_spec ()
- version_release_new_regex_l=${version_release_new//./\\.}
- name_ver_rel_old_regex_l=${name_ver_rel_old//./\\.}
- name_ver_rel_new_regex_l=${name_ver_rel_new//./\\.}
-+
-+ # Check the whole spec file at first, return 0 immediately if the
-+ # are the same.
-+ cat $spec_old | trim_release_old > $file_old
-+ cat $spec_new | trim_release_new > $file_new
-+ echo "comparing the whole specfile"
-+ if diff -au $spec_old $spec_new; then
-+ if test -z "$check_all"; then
-+ rm $file_old $file_new $spec_old $spec_new
-+ return 0
-+ fi
-+ fi
-+
-+ get_value QF_TAGS $spec_old > $file_old
-+ get_value QF_TAGS $spec_new > $file_new
-+ comp_file rpmtags $file_old $file_new || return 1
-+
- # This might happen when?!
- echo "comparing RELEASE"
- if [ "${version_release_old%.*}" != "${version_release_new%.*}" ] ; then
-- case $($RPM --qf '%{NAME}' "$newrpm") in
-+ case $name_new in
- kernel-*)
- # Make sure all kernel packages have the same %RELEASE
- echo "release prefix mismatch"
-@@ -181,71 +237,34 @@ function cmp_spec ()
- *) ;;
- esac
- fi
--
-- check_provides $oldrpm | trim_release_old | sort > $file1
-- check_provides $newrpm | trim_release_new | sort > $file2
--
-- echo "comparing PROVIDES"
-- if ! diff -au $file1 $file2; then
-- if test -z "$check_all"; then
-- rm $file1 $file2
-- return 1
-- fi
-- fi
-
-- # scripts, might contain release number
-- QF="[%{PREINPROG} %{PREIN}\\n]\\n[%{POSTINPROG} %{POSTIN}\\n]\\n[%{PREUNPROG} %{PREUN}\\n]\\n[%{POSTUNPROG} %{POSTUN}\\n]\\n"
-- check_header $oldrpm | trim_release_old > $file1
-- check_header $newrpm | trim_release_new > $file2
-+ get_value QF_PROVIDES $spec_old | trim_release_old | sort > $file_old
-+ get_value QF_PROVIDES $spec_new | trim_release_new | sort > $file_new
-+ comp_file PROVIDES $file_old $file_new || return 1
-+
-+ get_value QF_SCRIPT $spec_old | trim_release_old > $file_old
-+ get_value QF_SCRIPT $spec_new | trim_release_new > $file_new
-+ comp_file scripts $file_old $file_new || return 1
-
-- echo "comparing scripts"
-- if ! diff -au $file1 $file2; then
-- if test -z "$check_all"; then
-- rm $file1 $file2
-- return 1
-- fi
-- fi
--
- # First check the file attributes and later the md5s
--
-- # Now the files. We leave out mtime and size. For normal files
-- # the size will influence the MD5 anyway. For directories the sizes can
-- # differ, depending on which file system the package was built. To not
-- # have to filter out directories we simply ignore all sizes.
-- # Also leave out FILEDEVICES, FILEINODES (depends on the build host),
-- # FILECOLORS, FILECLASS (normally useful but file output contains mtimes),
-- # FILEDEPENDSX and FILEDEPENDSN.
-- # Also FILELANGS (or?)
-- QF="[%{FILENAMES} %{FILEFLAGS} %{FILESTATES} %{FILEMODES:octal} %{FILEUSERNAME} %{FILEGROUPNAME} %{FILERDEVS} %{FILEVERIFYFLAGS} %{FILELINKTOS}\n]\\n"
-- # ??? what to do with FILEPROVIDE and FILEREQUIRE?
--
-- check_header $oldrpm | trim_release_old > $file1
-- check_header $newrpm | trim_release_new > $file2
--
-- echo "comparing filelist"
-- if ! diff -au $file1 $file2; then
-- if test -z "$check_all"; then
-- rm $file1 $file2
-- return 1
-- fi
-- fi
--
-+ get_value QF_FILELIST $spec_old | trim_release_old > $file_old
-+ get_value QF_FILELIST $spec_new | trim_release_new > $file_new
-+ comp_file filelist $file_old $file_new || return 1
-+
- # now the md5sums. if they are different, we check more detailed
- # if there are different filenames, we will already have aborted before
- # file flag 64 means "ghost", filter those out.
-- QF="[%{FILENAMES} %{FILEMD5S} %{FILEFLAGS}\n]\\n"
-- check_header $oldrpm |grep -v " 64$"| trim_release_old > $file1
-- check_header $newrpm |grep -v " 64$"| trim_release_new > $file2
--
-+ get_value QF_CHECKSUM $spec_old | grep -v " 64$" | trim_release_old > $file_old
-+ get_value QF_CHECKSUM $spec_new | grep -v " 64$" | trim_release_new > $file_new
- RES=2
- # done if the same
- echo "comparing file checksum"
-- if cmp -s $file1 $file2; then
-+ if cmp -s $file_old $file_new; then
- RES=0
- fi
--
-+
- # Get only files with different MD5sums
-- files=`diff -U0 $file1 $file2 | fgrep -v +++ | grep ^+ | cut -b2- | awk '{print $1}'`
-+ files=`diff -U0 $file_old $file_new | fgrep -v +++ | grep ^+ | cut -b2- | awk '{print $1}'`
-
- if test -f "$sh"; then
- echo "creating rename script"
-@@ -261,7 +280,7 @@ function cmp_spec ()
- done >> "${sh}"
- fi
- #
-- rm $file1 $file2
-+ rm $file_old $file_new
- return $RES
- }
-
---
-2.9.0
-
diff --git a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch
deleted file mode 100644
index e4f0c54163..0000000000
--- a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a78fe4f792a9ac9f4d364e836c8855f48561d6f2 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 14 Jul 2016 19:52:18 -0700
-Subject: [PATCH 3/4] pkg-diff.sh: check for fifo(named pipe)
-
-Otherwise "cmp -s fifo1 fifo2" will wait for inputing forever.
-
-Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- pkg-diff.sh | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/pkg-diff.sh b/pkg-diff.sh
-index 5dd3a38..1f353aa 100644
---- a/pkg-diff.sh
-+++ b/pkg-diff.sh
-@@ -735,6 +735,13 @@ check_single_file()
- return 1
- fi
- ;;
-+ fifo*pipe*)
-+ ftype_new="`/usr/bin/file new/$file | sed -e 's@^[^:]\+:[[:blank:]]*@@' -e 's@[[:blank:]]*$@@'`"
-+ if [ "$ftype_new" = "$ftype" ]; then
-+ return 0
-+ fi
-+ return 1
-+ ;;
- *)
- if ! diff_two_files; then
- return 1
---
-2.9.0
-
diff --git a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch
deleted file mode 100644
index b42af2531d..0000000000
--- a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 657983ef9ca8f8354172682e17408c4f6b5bc667 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 14 Jul 2016 19:46:08 -0700
-Subject: [PATCH 1/4] pkg-diff.sh: check_single_file(): return at once when
- same
-
-If the two files are the same, return at once, this can save a lot of
-time when there are archives inside archives.
-
-Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- pkg-diff.sh | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/pkg-diff.sh b/pkg-diff.sh
-index 3cf10aa..402d4a4 100644
---- a/pkg-diff.sh
-+++ b/pkg-diff.sh
-@@ -293,6 +293,13 @@ check_compressed_file()
- check_single_file()
- {
- local file="$1"
-+
-+ # If the two files are the same, return at once.
-+ if [ -f old/$file -a -f new/$file ]; then
-+ if cmp -s old/$file new/$file; then
-+ return 0
-+ fi
-+ fi
- case $file in
- *.spec)
- sed -i -e "s,Release:.*$release1,Release: @RELEASE@," old/$file
---
-2.9.0
-
diff --git a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch
deleted file mode 100644
index 8077172333..0000000000
--- a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 836a6783df9c582a834fca239f227063a5687715 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 14 Jul 2016 19:49:12 -0700
-Subject: [PATCH 2/4] pkg-diff.sh: remove space in the end for ftype
-
-Versions of file like 5.14 returns a " " in the end, for example:
-ftype="directory ", but we need ftype="directory", remove the space to
-fix the problem.
-
-Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- pkg-diff.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pkg-diff.sh b/pkg-diff.sh
-index 402d4a4..5dd3a38 100644
---- a/pkg-diff.sh
-+++ b/pkg-diff.sh
-@@ -633,7 +633,7 @@ check_single_file()
- ;;
- esac
-
-- ftype=`/usr/bin/file old/$file | sed 's@^[^:]\+:[[:blank:]]*@@'`
-+ ftype=`/usr/bin/file old/$file | sed -e 's@^[^:]\+:[[:blank:]]*@@' -e 's@[[:blank:]]*$@@'`
- case $ftype in
- PE32\ executable*Mono\/\.Net\ assembly*)
- echo "PE32 Mono/.Net assembly: $file"
---
-2.9.0
-
diff --git a/meta/recipes-devtools/ccache/ccache.inc b/meta/recipes-devtools/ccache/ccache.inc
index 69aa64e5e6..dcbbf0ca7a 100644
--- a/meta/recipes-devtools/ccache/ccache.inc
+++ b/meta/recipes-devtools/ccache/ccache.inc
@@ -9,10 +9,20 @@ LICENSE = "GPLv3+"
DEPENDS = "zlib"
-SRC_URI = "git://git.samba.org/ccache.git"
-
-S = "${WORKDIR}/git"
+SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
+UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
inherit autotools
+# Remove ccache-native's dependencies, so that it can be used widely by
+# other native recipes.
+DEPENDS_class-native = ""
+EXTRA_OECONF_class-native = "--with-bundled-zlib"
+INHIBIT_AUTOTOOLS_DEPS_class-native = "1"
+PATCHTOOL = "patch"
+
BBCLASSEXTEND = "native"
+
+do_configure_class-native() {
+ oe_runconf
+}
diff --git a/meta/recipes-devtools/ccache/ccache_3.2.5.bb b/meta/recipes-devtools/ccache/ccache_3.2.5.bb
deleted file mode 100644
index afd1b0ea12..0000000000
--- a/meta/recipes-devtools/ccache/ccache_3.2.5.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require ccache.inc
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b8a4fa173ed91c1a5204ea4f9c9eadc3"
-
-SRCREV = "424d3ae1fb73444c6c38bf189f8fc048f66d6499"
-
-SRC_URI += " \
- file://0002-dev.mk.in-fix-file-name-too-long.patch \
- file://Revert-Create-man-page-in-the-make-install-from-git-.patch \
-"
diff --git a/meta/recipes-devtools/ccache/ccache_3.7.3.bb b/meta/recipes-devtools/ccache/ccache_3.7.3.bb
new file mode 100644
index 0000000000..c6a682ee0d
--- /dev/null
+++ b/meta/recipes-devtools/ccache/ccache_3.7.3.bb
@@ -0,0 +1,7 @@
+require ccache.inc
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=0094c59039cec66b8a4c905204333514"
+
+SRC_URI[md5sum] = "7be62ea6e190941a8c12a3d5394fd926"
+SRC_URI[sha256sum] = "355955a61562c53c4ec4669e1c92708b0008f50d214b27f07a87cf4a1fa6b01e"
diff --git a/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch b/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
deleted file mode 100644
index 837cfadf6a..0000000000
--- a/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 71bd0082c6edcf73f054a8a4fa34bd8dd4de7cd7 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 16 Sep 2015 19:45:40 -0700
-Subject: [PATCH] dev.mk.in: fix file name too long
-
-The all_cppflags change paths to filename which cause file name too long
-error when the path is longer than NAME_MAX (usually 255). Strip srcdir
-to fix the problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- dev.mk.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dev.mk.in b/dev.mk.in
-index 1261ad3..ec55ac4 100644
---- a/dev.mk.in
-+++ b/dev.mk.in
-@@ -1,7 +1,7 @@
- # GNU make syntax reigns in this file.
-
- all_cflags += -Werror
--all_cppflags += -MD -MP -MF .deps/$(subst .._,,$(subst /,_,$<)).d
-+all_cppflags += -MD -MP -MF .deps/$(subst .._,,$(subst /,_,$(subst $(srcdir)/,,$<))).d
-
- ASCIIDOC = asciidoc
- GPERF = gperf
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/ccache/files/Revert-Create-man-page-in-the-make-install-from-git-.patch b/meta/recipes-devtools/ccache/files/Revert-Create-man-page-in-the-make-install-from-git-.patch
deleted file mode 100644
index f0208b9dc2..0000000000
--- a/meta/recipes-devtools/ccache/files/Revert-Create-man-page-in-the-make-install-from-git-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 94fabcdda5c7e54ccdbc1f0aeccb26ce30e61226 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 18 Jul 2016 19:53:00 -0700
-Subject: [PATCH] Revert "Create man page in the make-install-from-git-repo
- case"
-
-This reverts commit b86784902d28defd5e475c8922de594787df4541.
-
-We dont' have asciidoc, so revert it.
-
-Upstream-Status: Inappropriate [OE-Core specific]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index d474f2a..c6cdc04 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -76,7 +76,7 @@ ccache$(EXEEXT): $(ccache_objs) $(extra_libs)
- $(CC) $(all_cflags) -o $@ $(ccache_objs) $(LDFLAGS) $(extra_libs) $(LIBS)
-
- .PHONY: install
--install: all $(srcdir)/ccache.1
-+install: all
- $(installcmd) -d $(DESTDIR)$(bindir)
- $(installcmd) -m 755 ccache$(EXEEXT) $(DESTDIR)$(bindir)
- $(installcmd) -d $(DESTDIR)$(mandir)/man1
---
-2.9.0
-
diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
index ff4d5ac441..1c602e7ce7 100644
--- a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
@@ -7,13 +7,20 @@ SECTION = "console/utils"
LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2"
+SRC_URI = " \
+ ${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2 \
+ file://0001-Don-t-set-uid-gid-during-install.patch \
+ "
+UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
SRC_URI[sha256sum] = "ed282eb6276c4154ce6a0b5dee0bdb81940d0cbbfc7d03f769c4735ef5f5860f"
EXTRA_OEMAKE = "-e MAKEFLAGS="
+# Stop failures when 'cc' can't be found
+export ac_cv_prog_CC = "${CC}"
+
inherit native
PV = "3.01a31+really3.01"
diff --git a/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch b/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch
new file mode 100644
index 0000000000..9d38294b41
--- /dev/null
+++ b/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch
@@ -0,0 +1,27 @@
+From 529cd5b007aa681c3ca14e5ab1e30469dd51646b Mon Sep 17 00:00:00 2001
+From: Paul Barker <paul@betafive.co.uk>
+Date: Tue, 12 Nov 2019 22:17:19 +0000
+Subject: [PATCH] Don't set uid/gid during install
+
+Signed-off-by: Paul Barker <paul@betafive.co.uk>
+Upstream-Status: Inappropriate [native]
+---
+ RULES/rules.prg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/RULES/rules.prg b/RULES/rules.prg
+index 023555c..f70f1a7 100644
+--- a/RULES/rules.prg
++++ b/RULES/rules.prg
+@@ -94,7 +94,7 @@ INSGRP= $(__DEFINSGRP:$(_UNIQ)%=%)
+
+ LD= @echo " ==> LINKING \"$@\""; ld
+ LOCALIZE= @echo " ==> LOCALIZING \"$@\""; $(RM_F) $@; cp
+-INSTALL= @echo " ==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) -o $(INSUSR) -g $(INSGRP)
++INSTALL= @echo " ==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS)
+ CHMOD= @echo " ==> SETTING PERMISSIONS ON \"$@\""; chmod
+ CHOWN= @echo " ==> SETTING OWNER ON \"$@\""; chown
+ CHGRP= @echo " ==> SETTING GROUP ON \"$@\""; chgrp
+--
+2.24.0
+
diff --git a/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch b/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch
index f96f104fad..3d303fbc6f 100644
--- a/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch
+++ b/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch
@@ -1,14 +1,24 @@
-Upstream-Status: Pending
+From 285b5fbf1d6b25ff55d305c17edf4d327bf19dd3 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 5 Jul 2011 23:42:29 +0100
+Subject: [PATCH] chrpath: Ensure the package respects the docdir variable
-autoconf/automake set docdir automatically, use their value ensuring
+autoconf/automake set docdir automatically, use their value ensuring
doc files are placed into $datadir/doc, not $prefix/doc.
RP 5/7/2011
-Index: chrpath-0.13/Makefile.am
-===================================================================
---- chrpath-0.13.orig/Makefile.am 2011-07-05 23:40:14.769920254 +0100
-+++ chrpath-0.13/Makefile.am 2011-07-05 23:40:19.819920635 +0100
+Upstream-Status: Submitted [ http://lists.alioth.debian.org/pipermail/chrpath-devel/Week-of-Mon-20170710/000013.html ]
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b50ad21..5f7e861 100644
+--- a/Makefile.am
++++ b/Makefile.am
@@ -1,7 +1,5 @@
SUBDIRS = testsuite deb
@@ -17,3 +27,6 @@ Index: chrpath-0.13/Makefile.am
doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README
bin_PROGRAMS = chrpath
+--
+2.8.1
+
diff --git a/meta/recipes-devtools/chrpath/chrpath_0.16.bb b/meta/recipes-devtools/chrpath/chrpath_0.16.bb
index e115eb5c95..8de8850576 100644
--- a/meta/recipes-devtools/chrpath/chrpath_0.16.bb
+++ b/meta/recipes-devtools/chrpath/chrpath_0.16.bb
@@ -7,14 +7,12 @@ BUGTRACKER = "http://alioth.debian.org/tracker/?atid=412807&group_id=31052"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-SRC_URI = "http://alioth.debian.org/frs/download.php/file/3979/chrpath-0.16.tar.gz \
+SRC_URI = "${DEBIAN_MIRROR}/main/c/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://standarddoc.patch"
SRC_URI[md5sum] = "2bf8d1d1ee345fc8a7915576f5649982"
SRC_URI[sha256sum] = "bb0d4c54bac2990e1bdf8132f2c9477ae752859d523e141e72b3b11a12c26e7b"
-UPSTREAM_CHECK_URI = "http://alioth.debian.org/frs/?group_id=31052"
-
inherit autotools
# We don't have a staged chrpath-native for ensuring our binary is
diff --git a/meta/recipes-devtools/cmake/cmake-native_3.16.1.bb b/meta/recipes-devtools/cmake/cmake-native_3.16.1.bb
new file mode 100644
index 0000000000..b2952ee5f5
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake-native_3.16.1.bb
@@ -0,0 +1,52 @@
+require cmake.inc
+inherit native
+
+DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native ncurses-native"
+
+SRC_URI += "file://OEToolchainConfig.cmake \
+ file://environment.d-cmake.sh \
+ file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
+ file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
+ "
+
+
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+CMAKE_EXTRACONF = "\
+ -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
+ -DBUILD_CursesDialog=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
+ -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
+ -DHAVE_SYS_ACL_H=0 \
+"
+
+do_configure () {
+ ${S}/configure --verbose --prefix=${prefix} \
+ ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
+ ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
+ -- ${CMAKE_EXTRACONF}
+}
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+
+ # The following codes are here because eSDK needs to provide compatibilty
+ # for SDK. That is, eSDK could also be used like traditional SDK.
+ mkdir -p ${D}${datadir}/cmake
+ install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
+ mkdir -p ${D}${base_prefix}/environment-setup.d
+ install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh
+}
+
+do_compile[progress] = "percent"
+
+SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"
diff --git a/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb b/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
deleted file mode 100644
index aec0d64de1..0000000000
--- a/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require cmake.inc
-inherit native
-
-DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native"
-
-SRC_URI += "\
- file://cmlibarchive-disable-ext2fs.patch \
-"
-
-B = "${WORKDIR}/build"
-do_configure[cleandirs] = "${B}"
-
-# Disable ccmake since we don't depend on ncurses
-CMAKE_EXTRACONF = "\
- -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
- -DBUILD_CursesDialog=0 \
- -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
- -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
- -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
- -DHAVE_SYS_ACL_H=0 \
-"
-
-do_configure () {
- ${S}/configure --verbose --prefix=${prefix} -- ${CMAKE_EXTRACONF}
-}
-
-do_compile() {
- oe_runmake
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
-
-do_compile[progress] = "percent"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 4fcb0b1ed0..9d14c14b54 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -2,44 +2,27 @@
# Released under the MIT license (see packages/COPYING)
SUMMARY = "Cross-platform, open-source make system"
+DESCRIPTION = "CMake is used to control the software compilation process \
+using simple platform and compiler independent configuration files. CMake \
+generates native makefiles and workspaces that can be used in the compiler \
+environment of your choice."
HOMEPAGE = "http://www.cmake.org/"
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=052f86c15bbde68af55c7f7b340ab639 \
- file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=622747147b46f22e1953876a7cba3323 \
+ file://Source/cmake.h;md5=4494dee184212fc89c469c3acd555a14;beginline=1;endline=3 \
+ "
-CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV', True).split('.')[0:2])}"
+CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
- file://support-oe-qt4-tools-names.patch \
- file://qt4-fail-silent.patch \
- "
+ file://0002-cmake-Prevent-the-detection-of-Qt5.patch \
+ file://0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch \
+ file://0004-Fail-silently-if-system-Qt-installation-is-broken.patch \
+"
-SRC_URI[md5sum] = "d6dd661380adacdb12f41b926ec99545"
-SRC_URI[sha256sum] = "28ee98ec40427d41a45673847db7a905b59ce9243bb866eaf59dce0f58aaef11"
+SRC_URI[md5sum] = "142cf11cd9a7c298cf875604cee96434"
+SRC_URI[sha256sum] = "a275b3168fa8626eca4465da7bb159ff07c8c6cb0fb7179be59e12cbdfa725fd"
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
-
-# 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
-# e.g. in order to upgrade it, even when there is target qtbase)
-
-# Fixes errors like this in cmake(-native).do_configure:
-#| -- Performing Test run_pic_test - Success
-#| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
-#| The imported target "Qt5::Core" references the file
-#|
-#| "/qmake"
-#|
-#| but this file does not exist. Possible reasons include:
-
-do_configure_prepend() {
- sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets QUIET NO_MODULE)/# find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt
- sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutoUicInterface/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
-}
diff --git a/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch b/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
new file mode 100644
index 0000000000..e2a58d25e2
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
@@ -0,0 +1,44 @@
+From ab272d703ce77f323aa1285526559c9efbf85834 Mon Sep 17 00:00:00 2001
+From: Cody P Schafer <dev@codyps.com>
+Date: Thu, 27 Apr 2017 11:35:05 -0400
+Subject: [PATCH] CMakeDetermineSystem: use oe environment vars to load default
+ toolchain file in sdk
+
+Passing the toolchain by:
+
+ - shell aliases does not work if cmake is called by a script
+ - unconditionally by a wrapper script causes cmake to believe it is
+ configuring things when it is not (for example, `cmake --build` breaks).
+
+The OE_CMAKE_TOOLCHAIN_FILE variable is only used as a default if no
+toolchain is explicitly specified.
+
+Setting the CMAKE_TOOLCHAIN_FILE cmake variable is marked as cached
+because '-D' options are cache entries themselves.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Cody P Schafer <dev@codyps.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+---
+ Modules/CMakeDetermineSystem.cmake | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
+index dc208c6..e0af4ca 100644
+--- a/Modules/CMakeDetermineSystem.cmake
++++ b/Modules/CMakeDetermineSystem.cmake
+@@ -81,6 +81,13 @@ else()
+ endif()
+ endif()
+
++if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
++ if(DEFINED ENV{OE_CMAKE_TOOLCHAIN_FILE})
++ set(CMAKE_TOOLCHAIN_FILE "$ENV{OE_CMAKE_TOOLCHAIN_FILE}" CACHE FILEPATH "toolchain file")
++ message(STATUS "Toolchain file defaulted to '${CMAKE_TOOLCHAIN_FILE}'")
++ endif()
++endif()
++
+ # if a toolchain file is used, the user wants to cross compile.
+ # in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_*
+ # variables around so they can be used in CMakeLists.txt.
diff --git a/meta/recipes-devtools/cmake/cmake/0002-cmake-Prevent-the-detection-of-Qt5.patch b/meta/recipes-devtools/cmake/cmake/0002-cmake-Prevent-the-detection-of-Qt5.patch
new file mode 100644
index 0000000000..61c8f27cd6
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0002-cmake-Prevent-the-detection-of-Qt5.patch
@@ -0,0 +1,122 @@
+From 5a86c7fa987bd407f228176df2abeffd015be9ea Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Wed, 17 Jan 2018 10:02:14 -0200
+Subject: [PATCH] cmake: Prevent the detection of Qt5
+
+Organization: O.S. Systems Software LTDA.
+
+CMake doesn't have dependency on qt4/qt5, so these tests usually fail
+but still can cause undeterministic results or build failures (when
+OE_QMAKE_PATH_EXTERNAL_HOST_BINS is undefined or native qmake removed
+while running the test in cmake)
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+---
+ Source/QtDialog/CMakeLists.txt | 2 +-
+ Tests/CMakeLists.txt | 2 +-
+ Tests/Qt4And5Automoc/CMakeLists.txt | 4 ++--
+ Tests/QtAutogen/AutogenGuiTest.cmake | 3 +--
+ Tests/QtAutogen/MacOsFW/CMakeLists.txt | 2 +-
+ Tests/RunCMake/CMakeLists.txt | 2 +-
+ Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake | 2 +-
+ 7 files changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
+index cb89d19..9e68981 100644
+--- a/Source/QtDialog/CMakeLists.txt
++++ b/Source/QtDialog/CMakeLists.txt
+@@ -3,7 +3,7 @@
+
+ project(QtDialog)
+ CMake_OPTIONAL_COMPONENT(cmake-gui)
+-find_package(Qt5Widgets QUIET)
++#find_package(Qt5Widgets QUIET)
+ if (Qt5Widgets_FOUND)
+ include_directories(${Qt5Widgets_INCLUDE_DIRS})
+ add_definitions(${Qt5Widgets_DEFINITONS})
+diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
+index 57fa7fc..d50c146 100644
+--- a/Tests/CMakeLists.txt
++++ b/Tests/CMakeLists.txt
+@@ -1329,7 +1329,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
+ set(CMake_TEST_Qt5 1)
+ endif()
+ if(CMake_TEST_Qt5)
+- find_package(Qt5Widgets QUIET NO_MODULE)
++ #find_package(Qt5Widgets QUIET NO_MODULE)
+ endif()
+ if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
+ add_subdirectory(Qt5Autogen)
+diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt
+index ad74961..a9dd74b 100644
+--- a/Tests/Qt4And5Automoc/CMakeLists.txt
++++ b/Tests/Qt4And5Automoc/CMakeLists.txt
+@@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 2.8.12)
+ project(Qt4And5Automoc)
+
+ if (QT_REVERSE_FIND_ORDER)
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ find_package(Qt4 REQUIRED)
+ else()
+ find_package(Qt4 REQUIRED)
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ endif()
+
+ set(CMAKE_AUTOMOC ON)
+diff --git a/Tests/QtAutogen/AutogenGuiTest.cmake b/Tests/QtAutogen/AutogenGuiTest.cmake
+index b76d341..a6e0acb 100644
+--- a/Tests/QtAutogen/AutogenGuiTest.cmake
++++ b/Tests/QtAutogen/AutogenGuiTest.cmake
+@@ -22,8 +22,7 @@ if (QT_TEST_VERSION EQUAL 4)
+ endmacro()
+
+ elseif(QT_TEST_VERSION EQUAL 5)
+-
+- find_package(Qt5Widgets REQUIRED)
++ #find_package(Qt5Widgets REQUIRED)
+
+ set(QT_QTCORE_TARGET Qt5::Core)
+ set(QT_LIBRARIES Qt5::Widgets)
+diff --git a/Tests/QtAutogen/MacOsFW/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/CMakeLists.txt
+index c08efc4..87e25d9 100644
+--- a/Tests/QtAutogen/MacOsFW/CMakeLists.txt
++++ b/Tests/QtAutogen/MacOsFW/CMakeLists.txt
+@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
+ project(MacOsFW)
+ include("../AutogenGuiTest.cmake")
+
+-find_package(Qt5Test REQUIRED)
++#find_package(Qt5Test REQUIRED)
+
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/bin)
+diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
+index 6b2f117..1002005 100644
+--- a/Tests/RunCMake/CMakeLists.txt
++++ b/Tests/RunCMake/CMakeLists.txt
+@@ -376,7 +376,7 @@ else()
+ endif()
+
+ find_package(Qt4 QUIET)
+-find_package(Qt5Core QUIET)
++#find_package(Qt5Core QUIET)
+ if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0)
+ add_RunCMake_test(IncompatibleQt)
+ endif()
+diff --git a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+index 4fccdc4..b76e1e5 100644
+--- a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
++++ b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+@@ -1,6 +1,6 @@
+
+ find_package(Qt4 REQUIRED)
+-find_package(Qt5Core REQUIRED)
++#find_package(Qt5Core REQUIRED)
+
+ add_executable(mainexe main.cpp)
+ target_link_libraries(mainexe Qt4::QtCore Qt5::Core)
diff --git a/meta/recipes-devtools/cmake/cmake/0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch b/meta/recipes-devtools/cmake/cmake/0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch
new file mode 100644
index 0000000000..e30dc51e4a
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch
@@ -0,0 +1,56 @@
+From e528861023bf69df0ad061a59fd4e527c9dde1ce Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 12 May 2011 15:36:03 +0000
+Subject: [PATCH] cmake: support OpenEmbedded Qt4 tool binary names
+
+The FindQt4 module looks for Qt4 binaries to be able to gather the
+paths used for compilation and also to be using during other processes
+(translation update, translation binary generating and like) however
+OpenEmbedded has renamed those to allow old QMake to be used in
+parallel with the current one. This patch adds support for the
+OpenEmbedded specific binary names.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+The patch was slightly adapted in order to match cmake 3.2.2:
+Instead of find_program, _find_qt4_program is now used.
+
+Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+---
+ Modules/FindQt4.cmake | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
+index 3993968..b2a8585 100644
+--- a/Modules/FindQt4.cmake
++++ b/Modules/FindQt4.cmake
+@@ -518,7 +518,7 @@ endfunction()
+
+ set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
+
+-set(_QT4_QMAKE_NAMES qmake qmake4 qmake-qt4 qmake-mac)
++set(_QT4_QMAKE_NAMES qmake qmake2 qmake4 qmake-qt4 qmake-mac)
+ _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
+
+ if (QT_QMAKE_EXECUTABLE AND
+@@ -1136,12 +1136,12 @@ if (QT_QMAKE_EXECUTABLE AND
+ _find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc)
+ _find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic)
+ _find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
+- _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc)
+- _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml)
+- _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp)
++ _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc4 rcc)
++ _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml4 qdbuscpp2xml)
++ _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp4 qdbusxml2cpp)
+ _find_qt4_program(QT_LUPDATE_EXECUTABLE Qt4::lupdate lupdate-qt4 lupdate4 lupdate)
+ _find_qt4_program(QT_LRELEASE_EXECUTABLE Qt4::lrelease lrelease-qt4 lrelease4 lrelease)
+- _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator)
++ _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator qcollectiongenerator4)
+ _find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4 designer4 designer)
+ _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
+
diff --git a/meta/recipes-devtools/cmake/cmake/0004-Fail-silently-if-system-Qt-installation-is-broken.patch b/meta/recipes-devtools/cmake/cmake/0004-Fail-silently-if-system-Qt-installation-is-broken.patch
new file mode 100644
index 0000000000..48f43be837
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0004-Fail-silently-if-system-Qt-installation-is-broken.patch
@@ -0,0 +1,79 @@
+From b0aeca35187983e22ec256a439cff4702dbde331 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 5 Jul 2018 10:26:48 -0300
+Subject: [PATCH] Fail silently if system Qt installation is broken
+
+Fixes a regression in behaviour from 2.8.10 to 2.8.11 resulting in the
+following error if the system Qt installation is broken:
+
+CMake Error at Modules/FindQt4.cmake:1028 (set_property):
+ set_property could not find TARGET Qt4::QtCore. Perhaps it has not yet
+ been created.
+Call Stack (most recent call first):
+ Tests/RunCMake/CMakeLists.txt:79 (find_package)
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+The patch was slightly adapted in order to match cmake 3.2.2:
+Another set_property was introduced which had to be included
+within the if(QT_QTCORE_FOUND) statement.
+
+Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+---
+ Modules/FindQt4.cmake | 39 ++++++++++++++++++++-------------------
+ 1 file changed, 20 insertions(+), 19 deletions(-)
+
+diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
+index b2a8585..77c89aa 100644
+--- a/Modules/FindQt4.cmake
++++ b/Modules/FindQt4.cmake
+@@ -988,25 +988,26 @@ if (QT_QMAKE_EXECUTABLE AND
+ endif()
+ endmacro()
+
+-
+- # Set QT_xyz_LIBRARY variable and add
+- # library include path to QT_INCLUDES
+- _QT4_ADJUST_LIB_VARS(QtCore)
+- set_property(TARGET Qt4::QtCore APPEND PROPERTY
+- INTERFACE_INCLUDE_DIRECTORIES
+- "${QT_MKSPECS_DIR}/default"
+- ${QT_INCLUDE_DIR}
+- )
+- set_property(TARGET Qt4::QtCore APPEND PROPERTY
+- INTERFACE_COMPILE_DEFINITIONS
+- $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
+- )
+- set_property(TARGET Qt4::QtCore PROPERTY
+- INTERFACE_QT_MAJOR_VERSION 4
+- )
+- set_property(TARGET Qt4::QtCore APPEND PROPERTY
+- COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION
+- )
++ if(QT_QTCORE_FOUND)
++ # Set QT_xyz_LIBRARY variable and add
++ # library include path to QT_INCLUDES
++ _QT4_ADJUST_LIB_VARS(QtCore)
++ set_property(TARGET Qt4::QtCore APPEND PROPERTY
++ INTERFACE_INCLUDE_DIRECTORIES
++ "${QT_MKSPECS_DIR}/default"
++ ${QT_INCLUDE_DIR}
++ )
++ set_property(TARGET Qt4::QtCore APPEND PROPERTY
++ INTERFACE_COMPILE_DEFINITIONS
++ $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
++ )
++ set_property(TARGET Qt4::QtCore PROPERTY
++ INTERFACE_QT_MAJOR_VERSION 4
++ )
++ set_property(TARGET Qt4::QtCore APPEND PROPERTY
++ COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION
++ )
++ endif()
+
+ foreach(QT_MODULE ${QT_MODULES})
+ _QT4_ADJUST_LIB_VARS(${QT_MODULE})
diff --git a/meta/recipes-devtools/cmake/cmake/0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch b/meta/recipes-devtools/cmake/cmake/0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch
new file mode 100644
index 0000000000..ad42d409d9
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch
@@ -0,0 +1,40 @@
+From 0df8d46d14c371f21c327966a553c4c187a8acfe Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 5 Jul 2018 10:28:04 -0300
+Subject: [PATCH 5/5] Disable use of ext2fs/ext2_fs.h by cmake's internal
+ libarchive copy
+Organization: O.S. Systems Software LTDA.
+
+We don't want to add a dependency on e2fsprogs-native for cmake-native,
+and we don't use CPack so just disable this functionality.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Utilities/cmlibarchive/CMakeLists.txt | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
+index 206f3c6a5..642fb0dd9 100644
+--- a/Utilities/cmlibarchive/CMakeLists.txt
++++ b/Utilities/cmlibarchive/CMakeLists.txt
+@@ -430,12 +430,8 @@ LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H)
+ LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H)
+ LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
+ LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H)
+-LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H)
+-
+-CHECK_C_SOURCE_COMPILES("#include <sys/ioctl.h>
+-#include <ext2fs/ext2_fs.h>
+-int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS)
+-
++SET(HAVE_EXT2FS_EXT2_FS_H 0)
++SET(HAVE_WORKING_EXT2_IOC_GETFLAGS 0)
+ LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
+ LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H)
+ LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
+--
+2.18.0
+
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 60014bbf2b..398069eef2 100644
--- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -1,15 +1,22 @@
set( CMAKE_SYSTEM_NAME Linux )
set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE )
-set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
+set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
-set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )
+set( CMAKE_SYSROOT $ENV{OECORE_TARGET_SYSROOT} )
+
+set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
+
+set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX "$ENV{OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX}")
-string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
-string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
+# Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os).
+if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+")
+ set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1})
+endif()
# Include the toolchain configuration subscripts
file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )
diff --git a/meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch b/meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch
deleted file mode 100644
index bf3671259e..0000000000
--- a/meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Disable use of ext2fs/ext2_fs.h by cmake's internal libarchive copy
-
-We don't want to add a dependency on e2fsprogs-native for cmake-native,
-and we don't use CPack so just disable this functionality.
-
-Upstream-Status: Inappropriate [config]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
---- a/Utilities/cmlibarchive/CMakeLists.txt
-+++ b/Utilities/cmlibarchive/CMakeLists.txt
-@@ -237,12 +237,8 @@ LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H)
- LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H)
- LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
- LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H)
--LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H)
--
--CHECK_C_SOURCE_COMPILES("#include <sys/ioctl.h>
--#include <ext2fs/ext2_fs.h>
--int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS)
--
-+SET(HAVE_EXT2FS_EXT2_FS_H 0)
-+SET(HAVE_WORKING_EXT2_IOC_GETFLAGS 0)
- LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
- LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H)
- LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
index 0eb56b66fa..7bdb19fb6c 100644
--- a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
+++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
@@ -1 +1,2 @@
-alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
+export OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
+export OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX="`echo $OECORE_BASELIB | sed -e s/lib//`"
diff --git a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
deleted file mode 100644
index 80fc277fa2..0000000000
--- a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Fail silently if system Qt installation is broken
-
-Fixes a regression in behaviour from 2.8.10 to 2.8.11 resulting in the
-following error if the system Qt installation is broken:
-
-CMake Error at Modules/FindQt4.cmake:1028 (set_property):
- set_property could not find TARGET Qt4::QtCore. Perhaps it has not yet
- been created.
-Call Stack (most recent call first):
- Tests/RunCMake/CMakeLists.txt:79 (find_package)
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-The patch was slightly adapted in order to match cmake 3.2.2:
-Another set_property was introduced which had to be included
-within the if(QT_QTCORE_FOUND) statement.
-
-Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
----
- Modules/FindQt4.cmake | 39 ++++++++++++++++++++-------------------
- 1 file changed, 20 insertions(+), 19 deletions(-)
-
-diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
-index 6704769..9048e35 100644
---- a/Modules/FindQt4.cmake
-+++ b/Modules/FindQt4.cmake
-@@ -1000,25 +1000,26 @@ if (QT_QMAKE_EXECUTABLE AND
- endif()
- endmacro()
-
--
-- # Set QT_xyz_LIBRARY variable and add
-- # library include path to QT_INCLUDES
-- _QT4_ADJUST_LIB_VARS(QtCore)
-- set_property(TARGET Qt4::QtCore APPEND PROPERTY
-- INTERFACE_INCLUDE_DIRECTORIES
-- "${QT_MKSPECS_DIR}/default"
-- ${QT_INCLUDE_DIR}
-- )
-- set_property(TARGET Qt4::QtCore APPEND PROPERTY
-- INTERFACE_COMPILE_DEFINITIONS
-- $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
-- )
-- set_property(TARGET Qt4::QtCore PROPERTY
-- INTERFACE_QT_MAJOR_VERSION 4
-- )
-- set_property(TARGET Qt4::QtCore APPEND PROPERTY
-- COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION
-- )
-+ if(QT_QTCORE_FOUND)
-+ # Set QT_xyz_LIBRARY variable and add
-+ # library include path to QT_INCLUDES
-+ _QT4_ADJUST_LIB_VARS(QtCore)
-+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
-+ INTERFACE_INCLUDE_DIRECTORIES
-+ "${QT_MKSPECS_DIR}/default"
-+ ${QT_INCLUDE_DIR}
-+ )
-+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
-+ INTERFACE_COMPILE_DEFINITIONS
-+ $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
-+ )
-+ set_property(TARGET Qt4::QtCore PROPERTY
-+ INTERFACE_QT_MAJOR_VERSION 4
-+ )
-+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
-+ COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION
-+ )
-+ endif()
-
- foreach(QT_MODULE ${QT_MODULES})
- _QT4_ADJUST_LIB_VARS(${QT_MODULE})
---
-1.9.1
-
diff --git a/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch b/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
deleted file mode 100644
index 15cbca89d8..0000000000
--- a/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-cmake: support OpenEmbedded Qt4 tool binary names
-
-The FindQt4 module looks for Qt4 binaries to be able to gather the
-paths used for compilation and also to be using during other processes
-(translation update, translation binary generating and like) however
-OpenEmbedded has renamed those to allow old QMake to be used in
-parallel with the current one. This patch adds support for the
-OpenEmbedded specific binary names.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
-The patch was slightly adapted in order to match cmake 3.2.2:
-Instead of find_program, _find_qt4_program is now used.
-
-Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
----
- Modules/FindQt4.cmake | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
-index 11091b5..6704769 100644
---- a/Modules/FindQt4.cmake
-+++ b/Modules/FindQt4.cmake
-@@ -522,7 +522,7 @@ endfunction()
-
- set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
-
--set(_QT4_QMAKE_NAMES qmake qmake4 qmake-qt4 qmake-mac)
-+set(_QT4_QMAKE_NAMES qmake qmake2 qmake4 qmake-qt4 qmake-mac)
- _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
-
- if (QT_QMAKE_EXECUTABLE AND
-@@ -1148,12 +1148,12 @@ if (QT_QMAKE_EXECUTABLE AND
- _find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc)
- _find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic)
- _find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
-- _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc)
-- _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml)
-- _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp)
-+ _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc4 rcc)
-+ _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml4 qdbuscpp2xml)
-+ _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp4 qdbusxml2cpp)
- _find_qt4_program(QT_LUPDATE_EXECUTABLE Qt4::lupdate lupdate-qt4 lupdate4 lupdate)
- _find_qt4_program(QT_LRELEASE_EXECUTABLE Qt4::lrelease lrelease-qt4 lrelease4 lrelease)
-- _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator)
-+ _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator qcollectiongenerator4)
- _find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4 designer4 designer)
- _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
-
---
-1.9.1
-
diff --git a/meta/recipes-devtools/cmake/cmake_3.16.1.bb b/meta/recipes-devtools/cmake/cmake_3.16.1.bb
new file mode 100644
index 0000000000..e0457677e8
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake_3.16.1.bb
@@ -0,0 +1,53 @@
+require cmake.inc
+
+inherit cmake
+
+DEPENDS += "curl expat zlib libarchive xz ncurses bzip2"
+
+SRC_URI_append_class-nativesdk = " \
+ file://OEToolchainConfig.cmake \
+ file://environment.d-cmake.sh \
+ file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
+"
+
+# Strip ${prefix} from ${docdir}, set result into docdir_stripped
+python () {
+ prefix=d.getVar("prefix")
+ docdir=d.getVar("docdir")
+
+ if not docdir.startswith(prefix):
+ bb.fatal('docdir must contain prefix as its prefix')
+
+ docdir_stripped = docdir[len(prefix):]
+ if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
+ docdir_stripped = docdir_stripped[1:]
+
+ d.setVar("docdir_stripped", docdir_stripped)
+}
+
+EXTRA_OECMAKE=" \
+ -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
+ -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
+ -DKWSYS_CHAR_IS_SIGNED=1 \
+ -DBUILD_CursesDialog=0 \
+ -DKWSYS_LFS_WORKS=1 \
+"
+
+do_install_append_class-nativesdk() {
+ mkdir -p ${D}${datadir}/cmake
+ install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
+
+ mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
+ install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
+}
+
+FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
+
+FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION} ${datadir}/cmake ${datadir}/aclocal"
+FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
+FILES_${PN}-dev = ""
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/cmake/cmake_3.6.1.bb b/meta/recipes-devtools/cmake/cmake_3.6.1.bb
deleted file mode 100644
index 67ba9c473d..0000000000
--- a/meta/recipes-devtools/cmake/cmake_3.6.1.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-require cmake.inc
-
-inherit cmake
-
-DEPENDS += "curl expat zlib libarchive xz ncurses bzip2"
-
-SRC_URI_append_class-nativesdk = " \
- file://OEToolchainConfig.cmake \
- file://environment.d-cmake.sh"
-
-# Strip ${prefix} from ${docdir}, set result into docdir_stripped
-python () {
- prefix=d.getVar("prefix", True)
- docdir=d.getVar("docdir", True)
-
- if not docdir.startswith(prefix):
- raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
-
- docdir_stripped = docdir[len(prefix):]
- if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
- docdir_stripped = docdir_stripped[1:]
-
- d.setVar("docdir_stripped", docdir_stripped)
-}
-
-EXTRA_OECMAKE=" \
- -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
- -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
- -DKWSYS_CHAR_IS_SIGNED=1 \
- -DBUILD_CursesDialog=0 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
-"
-
-do_install_append_class-nativesdk() {
- mkdir -p ${D}${datadir}/cmake
- install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
-
- mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
- install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
-}
-
-FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
-
-FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
-FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 0000000000..c0f07fe2ca
--- /dev/null
+++ b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,25 @@
+From 4644d18157296257284bedd857f4610f1037d50e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:31:02 +0200
+Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ src/python/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
+index 3d873f7..e977b2f 100644
+--- a/src/python/CMakeLists.txt
++++ b/src/python/CMakeLists.txt
+@@ -21,7 +21,7 @@ if (NOT SKBUILD)
+ endif ()
+ endif (NOT SKBUILD)
+
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
diff --git a/meta/recipes-devtools/createrepo-c/createrepo-c_0.15.1.bb b/meta/recipes-devtools/createrepo-c/createrepo-c_0.15.1.bb
new file mode 100644
index 0000000000..797db738f4
--- /dev/null
+++ b/meta/recipes-devtools/createrepo-c/createrepo-c_0.15.1.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "C implementation of createrepo."
+HOMEPAGE = "https://github.com/rpm-software-management/createrepo_c/wiki"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
+ file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+ "
+
+SRCREV = "bc67f19ed09593e3886ebeee2391e9d51cc3439f"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm"
+DEPENDS_append_class-native = " file-replacement-native"
+
+inherit cmake pkgconfig bash-completion distutils3-base
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 -DWITH_ZCHUNK=OFF -DENABLE_DRPM=OFF -DWITH_LIBMODULEMD=OFF"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Direct createrepo to read rpm configuration from our sysroot, not the one it was compiled in
+do_install_append_class-native() {
+ create_wrapper ${D}/${bindir}/createrepo_c \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm
+}
+
+do_install_append_class-nativesdk() {
+ create_wrapper ${D}/${bindir}/createrepo_c \
+ RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm
+ rm -rf ${D}/etc
+}
diff --git a/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb b/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
deleted file mode 100644
index 116555962c..0000000000
--- a/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "cve-check-tool"
-DESCRIPTION = "cve-check-tool is a tool for checking known (public) CVEs.\
-The tool will identify potentially vunlnerable software packages within Linux distributions through version matching."
-HOMEPAGE = "https://github.com/ikeydoherty/cve-check-tool"
-SECTION = "Development/Tools"
-LICENSE = "GPL-2.0+"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e8c1458438ead3c34974bc0be3a03ed6"
-
-SRC_URI = "https://github.com/ikeydoherty/${BPN}/releases/download/v${PV}/${BP}.tar.xz \
- file://check-for-malloc_trim-before-using-it.patch \
- "
-
-SRC_URI[md5sum] = "c5f4247140fc9be3bf41491d31a34155"
-SRC_URI[sha256sum] = "b8f283be718af8d31232ac1bfc10a0378fb958aaaa49af39168f8acf501e6a5b"
-
-DEPENDS = "libcheck glib-2.0 json-glib curl libxml2 sqlite3 openssl ca-certificates"
-
-RDEPENDS_${PN} = "ca-certificates"
-
-inherit pkgconfig autotools
-
-EXTRA_OECONF = "--disable-coverage"
-CFLAGS_append = " -Wno-error=pedantic"
-
-python do_populate_cve_db () {
- import subprocess
- import time
-
- if d.getVar("BB_NO_NETWORK", True) == "1":
- bb.error("BB_NO_NETWORK is set; Can't update cve-check-tool database, "
- "CVEs won't be checked")
- return
-
- bb.utils.export_proxies(d)
- # In case we don't inherit cve-check class, use default values defined in the class.
- cve_dir = d.getVar("CVE_CHECK_DB_DIR", True) or d.expand("${DL_DIR}/CVE_CHECK")
- cve_file = d.getVar("CVE_CHECK_TMP_FILE", True) or d.expand("${TMPDIR}/cve_check")
- cve_cmd = "cve-check-update"
- cmd = [cve_cmd, "-d", cve_dir]
- bb.debug(1, "Updating cve-check-tool database located in %s" % cve_dir)
- try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- bb.debug(2, "Command '%s' returned:\n%s" % ("\n".join(cmd), output))
- time_utc = time.gmtime(time.time())
- time_format = "%Y-%m-%d %H:%M:%S"
- with open(cve_file, "w") as f:
- f.write("CVE database was updated on %s UTC\n\n"
- % time.strftime(time_format, time_utc))
-
- except subprocess.CalledProcessError as e:
- bb.warn("Error in executing cve-check-update: %s (output %s)" % (e, e.output))
- if bb.data.inherits_class('cve-check', d):
- bb.warn("Failed to update cve-check-tool database, CVEs won't be checked")
-}
-
-addtask populate_cve_db after do_populate_sysroot
-do_populate_cve_db[nostamp] = "1"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch b/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch
deleted file mode 100644
index 0774ad946a..0000000000
--- a/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From ce64633b9733e962b8d8482244301f614d8b5845 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 22 Aug 2016 22:54:24 -0700
-Subject: [PATCH] Check for malloc_trim before using it
-
-malloc_trim is gnu specific and not all libc
-implement it, threfore write a configure check
-to poke for it first and use the define to
-guard its use.
-
-Helps in compiling on musl based systems
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted [https://github.com/ikeydoherty/cve-check-tool/pull/48]
- configure.ac | 2 ++
- src/core.c | 4 ++--
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index d3b66ce..79c3542 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -19,6 +19,8 @@ m4_define([json_required_version], [0.16.0])
- m4_define([openssl_required_version],[1.0.0])
- # TODO: Set minimum sqlite
-
-+AC_CHECK_FUNCS_ONCE(malloc_trim)
-+
- PKG_CHECK_MODULES(CVE_CHECK_TOOL,
- [
- glib-2.0 >= glib_required_version,
-diff --git a/src/core.c b/src/core.c
-index 6263031..0d5df29 100644
---- a/src/core.c
-+++ b/src/core.c
-@@ -498,9 +498,9 @@ bool cve_db_load(CveDB *self, const char *fname)
- }
-
- b = true;
--
-+#ifdef HAVE_MALLOC_TRIM
- malloc_trim(0);
--
-+#endif
- xmlFreeTextReader(r);
- if (fd) {
- close(fd);
---
-2.9.3
-
diff --git a/meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb b/meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb
new file mode 100644
index 0000000000..10220ebc91
--- /dev/null
+++ b/meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb
@@ -0,0 +1,17 @@
+SUMMARY = "GNU unit testing framework, written in Expect and Tcl"
+DESCRIPTION = "DejaGnu is a framework for testing other programs. Its purpose \
+is to provide a single front end for all tests."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+SECTION = "devel"
+
+DEPENDS += "expect-native"
+
+inherit autotools
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "e1b07516533f351b3aba3423fafeffd6"
+SRC_URI[sha256sum] = "0d0671e1b45189c5fc8ade4b3b01635fb9eeab45cf54f57db23e4c4c1a17d261"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb b/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb
deleted file mode 100644
index 54daabef56..0000000000
--- a/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SECTION = "console/utils"
-SUMMARY = "Command line utilities for working with *.desktop files"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/desktop-file-utils"
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "glib-2.0-native"
-
-SRC_URI = "http://freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "599133d51cc9a41bfec186414906b6f1"
-SRC_URI[sha256sum] = "6c094031bdec46c9f621708f919084e1cb5294e2c5b1e4c883b3e70cb8903385"
-
-inherit autotools native
-
-S = "${WORKDIR}/desktop-file-utils-${PV}"
-
-EXTRA_OECONF += "ac_cv_prog_EMACS=no"
diff --git a/meta/recipes-devtools/desktop-file-utils/desktop-file-utils_0.24.bb b/meta/recipes-devtools/desktop-file-utils/desktop-file-utils_0.24.bb
new file mode 100644
index 0000000000..aecba07235
--- /dev/null
+++ b/meta/recipes-devtools/desktop-file-utils/desktop-file-utils_0.24.bb
@@ -0,0 +1,24 @@
+SECTION = "console/utils"
+SUMMARY = "Command line utilities for working with *.desktop files"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/desktop-file-utils"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/validator.c;beginline=4;endline=27;md5=281e1114ee6c486a1a0a4295986b9416"
+
+SRC_URI = "http://freedesktop.org/software/${BPN}/releases/${BP}.tar.xz"
+SRC_URI[md5sum] = "9364b82e14cfcad881161aa7ea5257ae"
+SRC_URI[sha256sum] = "a1de5da60cbdbe91e5c9c10ac9afee6c3deb019e0cee5fdb9a99dddc245f83d9"
+
+DEPENDS = "glib-2.0"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "ac_cv_prog_EMACS=no"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append() {
+ rm -rf ${D}${datadir}/emacs
+}
+
diff --git a/meta/recipes-devtools/devel-config/distcc-config.bb b/meta/recipes-devtools/devel-config/distcc-config.bb
index cb7830b999..3cd661d543 100644
--- a/meta/recipes-devtools/devel-config/distcc-config.bb
+++ b/meta/recipes-devtools/devel-config/distcc-config.bb
@@ -1,8 +1,7 @@
SUMMARY = "Sets up distcc for compilation on the target device"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://distcc.sh"
diff --git a/meta/recipes-devtools/devel-config/nfs-export-root.bb b/meta/recipes-devtools/devel-config/nfs-export-root.bb
index 169d00581d..56375a47b7 100644
--- a/meta/recipes-devtools/devel-config/nfs-export-root.bb
+++ b/meta/recipes-devtools/devel-config/nfs-export-root.bb
@@ -1,8 +1,7 @@
SUMMARY = "Configuration script to export target rootfs filesystem"
DESCRIPTION = "Enables NFS access from any host to the entire filesystem (for development purposes)."
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PR = "r1"
diff --git a/meta/recipes-devtools/diffstat/diffstat/avoid-check-user-break-cc.patch b/meta/recipes-devtools/diffstat/diffstat/avoid-check-user-break-cc.patch
new file mode 100644
index 0000000000..811faa48da
--- /dev/null
+++ b/meta/recipes-devtools/diffstat/diffstat/avoid-check-user-break-cc.patch
@@ -0,0 +1,32 @@
+From 1046593aacb74ff888a0d68c0ff89b20c4bc9ed4 Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Tue, 15 May 2018 17:17:01 +0800
+Subject: [PATCH] diffstat: fix wrong evaluation of CC
+
+Upstream-Status: Inappropriate [oe specific]
+
+m4 function CF_CC_ENV_FLAGS checks whether variable CC contains options '-I', '-U'
+and '-D'. It is not suitable for oe that option such as '-D_FORTIFY_SOURCE=2' may
+be included in CC. And then CC will be wrongly filtered.
+
+So comment out CF_CC_ENV_FLAGS from function CF_PROG_CC.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ aclocal.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 9281aa8..dd57b7a 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1239,7 +1239,7 @@ CF_GCC_VERSION
+ CF_ACVERSION_CHECK(2.52,
+ [AC_PROG_CC_STDC],
+ [CF_ANSI_CC_REQD])
+-CF_CC_ENV_FLAGS
++dnl CF_CC_ENV_FLAGS
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+ dnl CF_PROG_GROFF version: 3 updated: 2018/01/07 13:16:19
diff --git a/meta/recipes-devtools/diffstat/diffstat_1.61.bb b/meta/recipes-devtools/diffstat/diffstat_1.61.bb
deleted file mode 100644
index 0ec41c3abf..0000000000
--- a/meta/recipes-devtools/diffstat/diffstat_1.61.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Tool to produce a statistics based on a diff"
-DESCRIPTION = "diffstat reads the output of diff and displays a histogram of \
-the insertions, deletions, and modifications per-file. It is useful for \
-reviewing large, complex patch files."
-HOMEPAGE = "http://invisible-island.net/diffstat/"
-SECTION = "devel"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://install-sh;endline=42;md5=b3549726c1022bee09c174c72a0ca4a5"
-
-SRC_URI = "ftp://invisible-island.net/diffstat/diffstat-${PV}.tgz \
- file://run-ptest \
-"
-
-SRC_URI[md5sum] = "c048a32d55d8bd6724f382baf41f325f"
-SRC_URI[sha256sum] = "25359e0c27183f997b36c9202583b5dc2df390c20e22a92606af4bf7856a55ee"
-
-S = "${WORKDIR}/diffstat-${PV}"
-
-inherit autotools gettext ptest
-
-LDFLAGS += "${TOOLCHAIN_OPTIONS}"
-
-do_configure () {
- if [ ! -e ${S}/acinclude.m4 ]; then
- mv ${S}/aclocal.m4 ${S}/acinclude.m4
- fi
- autotools_do_configure
-}
-
-do_install_ptest() {
- cp -r ${S}/testing ${D}${PTEST_PATH}
-}
diff --git a/meta/recipes-devtools/diffstat/diffstat_1.62.bb b/meta/recipes-devtools/diffstat/diffstat_1.62.bb
new file mode 100644
index 0000000000..93d77797c9
--- /dev/null
+++ b/meta/recipes-devtools/diffstat/diffstat_1.62.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Tool to produce a statistics based on a diff"
+DESCRIPTION = "diffstat reads the output of diff and displays a histogram of \
+the insertions, deletions, and modifications per-file. It is useful for \
+reviewing large, complex patch files."
+HOMEPAGE = "http://invisible-island.net/diffstat/"
+SECTION = "devel"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://install-sh;endline=42;md5=b3549726c1022bee09c174c72a0ca4a5"
+
+SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \
+ file://run-ptest \
+ file://avoid-check-user-break-cc.patch \
+"
+
+SRC_URI[md5sum] = "91e106bb34cb097750db7ddc0ba1d8fc"
+SRC_URI[sha256sum] = "7f09183644ed77a156b15346bbad4e89c93543e140add9dab18747e30522591f"
+
+S = "${WORKDIR}/diffstat-${PV}"
+
+inherit autotools gettext ptest
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+LDFLAGS += "${TOOLCHAIN_OPTIONS}"
+
+do_install_ptest() {
+ cp -r ${S}/testing ${D}${PTEST_PATH}
+}
diff --git a/meta/recipes-devtools/distcc/distcc_3.2.bb b/meta/recipes-devtools/distcc/distcc_3.2.bb
deleted file mode 100644
index c084ad2b73..0000000000
--- a/meta/recipes-devtools/distcc/distcc_3.2.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "A parallel build system"
-DESCRIPTION = "distcc is a parallel build system that distributes \
-compilation of C/C++/ObjC code across machines on a network."
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "avahi binutils"
-
-PACKAGECONFIG ??= "popt"
-PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk --without-gnome,gtk+"
-# use system popt by default
-PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt"
-
-RRECOMMENDS_${PN} = "avahi-daemon"
-
-SRC_URI = "git://github.com/distcc/distcc.git;branch=${PV} \
- file://separatebuilddir.patch \
- file://0001-zeroconf-Include-fcntl.h.patch \
- file://default \
- file://distccmon-gnome.desktop \
- file://distcc \
- file://distcc.service"
-SRCREV = "d8b18df3e9dcbe4f092bed565835d3975e99432c"
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig update-rc.d useradd systemd
-
-EXTRA_OECONF += "--disable-Werror PYTHON='' --disable-pump-mode"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system \
- --home /dev/null \
- --no-create-home \
- --gid nogroup \
- distcc"
-
-INITSCRIPT_NAME = "distcc"
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "distcc.service"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d/
- install -d ${D}${sysconfdir}/default
- install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
- install -d ${D}${systemd_unitdir}/system/
- install -m 0644 ${WORKDIR}/distcc.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distcc.service
- ${DESKTOPINSTALL}
-}
-DESKTOPINSTALL = ""
-DESKTOPINSTALL_libc-glibc () {
- install -d ${D}${datadir}/distcc/
- install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
-}
-PACKAGES += "distcc-distmon-gnome"
-
-FILES_${PN} = " ${sysconfdir} \
- ${bindir}/distcc \
- ${bindir}/lsdistcc \
- ${bindir}/distccd \
- ${bindir}/distccmon-text \
- ${systemd_unitdir}/system/distcc.service"
-FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \
- ${datadir}/distcc"
-
-pkg_postrm_${PN} () {
- deluser distcc || true
-}
diff --git a/meta/recipes-devtools/distcc/distcc_3.3.3.bb b/meta/recipes-devtools/distcc/distcc_3.3.3.bb
new file mode 100644
index 0000000000..c52f136be8
--- /dev/null
+++ b/meta/recipes-devtools/distcc/distcc_3.3.3.bb
@@ -0,0 +1,87 @@
+SUMMARY = "A parallel build system"
+DESCRIPTION = "distcc is a parallel build system that distributes \
+compilation of C/C++/ObjC code across machines on a network."
+SECTION = "devel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+DEPENDS = "avahi binutils"
+
+PACKAGECONFIG ??= "popt"
+PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk --without-gnome,gtk+"
+# use system popt by default
+PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt"
+
+RRECOMMENDS_${PN}-server = "avahi-daemon"
+
+SRC_URI = "git://github.com/distcc/distcc.git \
+ file://fix-gnome.patch \
+ file://separatebuilddir.patch \
+ file://default \
+ file://distcc \
+ file://distcc.service"
+SRCREV = "4cde9bcfbda589abd842e3bbc652ce369085eaae"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig update-rc.d useradd systemd
+
+ASNEEDED = ""
+
+EXTRA_OECONF += "--disable-Werror PYTHON='' --disable-pump-mode"
+
+PACKAGE_BEFORE_PN = "${PN}-distmon-gnome ${PN}-server"
+
+USERADD_PACKAGES = "${PN}-server"
+USERADD_PARAM_${PN}-server = "--system \
+ --home /dev/null \
+ --no-create-home \
+ --gid nogroup \
+ distcc"
+
+UPDATERCPN = "${PN}-server"
+INITSCRIPT_NAME = "distcc"
+
+SYSTEMD_PACKAGES = "${PN}-server"
+SYSTEMD_SERVICE_${PN}-server = "distcc.service"
+
+do_install() {
+ # Improve reproducibility: compress w/o timestamps
+ oe_runmake 'DESTDIR=${D}' "GZIP_BIN=gzip -n" install
+ install -d ${D}${sysconfdir}/init.d/
+ install -d ${D}${sysconfdir}/default
+ install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/distcc.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distcc.service
+}
+
+FILES_${PN}-server = "${sysconfdir} \
+ ${bindir}/distccd \
+ ${sbindir}"
+FILES_${PN}-distmon-gnome = "${bindir}/distccmon-gnome \
+ ${datadir}/applications \
+ ${datadir}/pixmaps"
+
+#
+# distcc upstream dropped the 3.2 branch which we reference in older project releases
+# the revisions are there, just the branch is not. In order to be able to continue
+# to build those old releases, adjust any mirror tarball to contain the missing branch
+#
+fixup_distcc_mirror_tarball () {
+ TBALL=${DL_DIR}/git2_github.com.distcc.distcc.git.tar.gz
+ if [ -f $TBALL ]; then
+ TDIR=`mktemp -d`
+ cd $TDIR
+ tar -xzf $TBALL
+ set +e
+ git rev-parse --verify 3.2
+ if [ "$?" != "0" ]; then
+ git branch 3.2 d8b18df3e9dcbe4f092bed565835d3975e99432c
+ tar -czf $TBALL *
+ fi
+ set -e
+ rm -rf $TDIR/*
+ fi
+}
+do_fetch[postfuncs] += "fixup_distcc_mirror_tarball"
diff --git a/meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch b/meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch
deleted file mode 100644
index b17ec9c959..0000000000
--- a/meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8331fc4759d809512f404e7a27f817ad6d616450 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 18:00:33 -0700
-Subject: [PATCH] zeroconf: Include fcntl.h
-
-We need it for getting deinitions for O_* e.g. O_CREAT
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/zeroconf.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/zeroconf.c b/src/zeroconf.c
-index 414ddc4..31bd33f 100644
---- a/src/zeroconf.c
-+++ b/src/zeroconf.c
-@@ -33,6 +33,7 @@
- #include <unistd.h>
- #include <stdlib.h>
- #include <limits.h>
-+#include <fcntl.h>
-
- #include <avahi-common/domain.h>
- #include <avahi-common/error.h>
---
-2.1.4
-
diff --git a/meta/recipes-devtools/distcc/files/default b/meta/recipes-devtools/distcc/files/default
index 63c4159b9d..a5bc13ecf3 100644
--- a/meta/recipes-devtools/distcc/files/default
+++ b/meta/recipes-devtools/distcc/files/default
@@ -16,9 +16,9 @@ STARTDISTCC="true"
#
# ALLOWEDNETS="127.0.0.1"
-ALLOWEDNETS="192.168.7.0/24"
+ALLOWEDNETS="127.0.0.1"
#
# OPTIONS is used for the systemd service file
#
-OPTIONS="--allow 192.168.7.0/24"
+OPTIONS="--allow 127.0.0.1 --enable-tcp-insecure"
diff --git a/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop b/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop
deleted file mode 100644
index 7b5d85ce4e..0000000000
--- a/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Version=0.9.4
-Exec=distccmon-gnome
-Name=distcc monitor
-GenericName=Distributed Compile Monitor
-Comment=Graphical view of distributed compile tasks
-Icon=distccmon-gnome-icon
-TryExec=distccmon-gnome
-Terminal=false
-Type=Application
-Categories=GNOME;Development;
-StartupNotify=true
diff --git a/meta/recipes-devtools/distcc/files/fix-gnome.patch b/meta/recipes-devtools/distcc/files/fix-gnome.patch
new file mode 100644
index 0000000000..f1f5ed1a9f
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/fix-gnome.patch
@@ -0,0 +1,122 @@
+Upstream-Status: Backport [https://github.com/distcc/distcc/pull/319]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 2faacc2be8d7eeee0a3f66d88fedd1d3ab11070e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 8 Dec 2018 12:50:07 +0100
+Subject: [PATCH] Fix desktop spec compliance of distccmon-gnome install
+
+Update the .desktop file and install rules for distccmon-gnome to
+conform to the freedesktop.org specifications. More specifically:
+
+- update to version 1.0 of the spec
+- remove obsolete 'Encoding' key
+- remove obsolete 'Application' category and add recommended 'GTK'
+- install icon file to the correct directory
+- strip suffix from desktop file (specifying it is deprecated)
+- while at it, remove redundant '-icon' from the filename
+- install desktop file to the correct directory
+---
+ Makefile.in | 18 ++++++++++--------
+ gnome/distccmon-gnome.desktop | 7 +++----
+ ...mon-gnome-icon.png => distccmon-gnome.png} | Bin
+ src/mon-gnome.c | 2 +-
+ 4 files changed, 14 insertions(+), 13 deletions(-)
+ rename gnome/{distccmon-gnome-icon.png => distccmon-gnome.png} (100%)
+
+diff --git a/Makefile.in b/Makefile.in
+index 6e1e467..1106559 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -52,13 +52,14 @@ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+ docdir = @docdir@
+-pkgdatadir = $(datadir)/@PACKAGE_NAME@
++icondir = $(datarootdir)/pixmaps
++desktopdir = $(datarootdir)/applications
+
+ include_server_builddir = $(builddir)/_include_server
+
+ # These must be done from here, not from autoconf, because they can
+ # contain variable expansions written in Make syntax. Ew.
+-DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\""
++DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\""
+
+ # arguments to pkgconfig
+ GNOME_PACKAGES = @GNOME_PACKAGES@
+@@ -387,7 +388,7 @@ man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html \
+ man/lsdistcc_1.html man/pump_1.html man/include_server_1.html
+ MEN = $(man1_MEN)
+
+-gnome_data = gnome/distccmon-gnome-icon.png \
++gnome_data = gnome/distccmon-gnome.png \
+ gnome/distccmon-gnome.desktop
+
+ popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
+@@ -1033,7 +1034,8 @@ showpaths:
+ @echo " programs $(DESTDIR)$(bindir)"
+ @echo " sbin programs $(DESTDIR)$(sbindir)"
+ @echo " system configuration $(DESTDIR)$(sysconfdir)"
+- @echo " shared data files $(DESTDIR)$(pkgdatadir)"
++ @echo " icon file $(DESTDIR)$(icondir)"
++ @echo " application file $(DESTDIR)$(desktopdir)"
+
+
+ # install-sh can't handle multiple arguments, but we don't need any
+@@ -1129,10 +1131,10 @@ install-example: $(example_DOCS)
+ done
+
+ install-gnome-data: $(gnome_data)
+- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
+- for p in $(gnome_data); do \
+- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+- done
++ $(mkinstalldirs) "$(DESTDIR)$(icondir)"
++ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)"
++ $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)"
++ $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)"
+
+ install-conf: $(conf_files) $(default_files)
+ $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc"
+diff --git a/gnome/distccmon-gnome.desktop b/gnome/distccmon-gnome.desktop
+index bd1fa26..7205f5e 100644
+--- a/gnome/distccmon-gnome.desktop
++++ b/gnome/distccmon-gnome.desktop
+@@ -1,6 +1,5 @@
+ [Desktop Entry]
+-Version=0.9.4
+-Encoding=UTF-8
++Version=1.0
+ Exec=distccmon-gnome
+ Name=distcc monitor
+ Name[sv]=distcc övervakare
+@@ -8,9 +7,9 @@ GenericName=Distributed Compile Monitor
+ GenericName[sv]=Distribuerad kompilerings-övervakare
+ Comment=Graphical view of distributed compile tasks
+ Comment[sv]=Grafisk vy av distribuerade kompileringsuppgifter
+-Icon=distccmon-gnome-icon.png
++Icon=distccmon-gnome
+ TryExec=distccmon-gnome
+ Terminal=false
+ Type=Application
+-Categories=GNOME;Application;Development;
++Categories=GNOME;GTK;Development;
+ StartupNotify=true
+diff --git a/gnome/distccmon-gnome-icon.png b/gnome/distccmon-gnome.png
+similarity index 100%
+rename from gnome/distccmon-gnome-icon.png
+rename to gnome/distccmon-gnome.png
+diff --git a/src/mon-gnome.c b/src/mon-gnome.c
+index 24681d0..bfc286d 100644
+--- a/src/mon-gnome.c
++++ b/src/mon-gnome.c
+@@ -599,7 +599,7 @@ static GtkWidget * dcc_gnome_make_mainwin (void)
+
+ #if GTK_CHECK_VERSION(2,2,0)
+ gtk_window_set_icon_from_file (GTK_WINDOW (mainwin),
+- PKGDATADIR "/distccmon-gnome-icon.png",
++ ICONDIR "/distccmon-gnome.png",
+ NULL);
+ #endif
+
diff --git a/meta/recipes-devtools/distcc/files/separatebuilddir.patch b/meta/recipes-devtools/distcc/files/separatebuilddir.patch
index 7580b5584b..c8da9d51c3 100644
--- a/meta/recipes-devtools/distcc/files/separatebuilddir.patch
+++ b/meta/recipes-devtools/distcc/files/separatebuilddir.patch
@@ -1,21 +1,33 @@
-When building with a separate build directory, make install fails,
-unable to find the gnome_data files. This patch corrects the
-patch and ensures the build works in this case.
+Upstream-Status: Backport [https://github.com/distcc/distcc/pull/363]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
-RP 2013/3/8
+From 469628ee8dc90c7162d1a850c0b179b7349f9cf3 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 17 Sep 2019 13:04:22 +0100
+Subject: [PATCH] Makefile.in: fix out-of-tree builds when the GNOME UI is
+ enabled
-Upstream-Status: Pending
+The install command doesn't use $(srcdir) so out-of-tree builds fail.
-Index: git/Makefile.in
-===================================================================
---- git.orig/Makefile.in
-+++ git/Makefile.in
-@@ -1117,7 +1117,7 @@ install-example: $(example_DOCS)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 123054f..b9ce974 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1130,8 +1130,8 @@ install-example: $(example_DOCS)
install-gnome-data: $(gnome_data)
- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
- for p in $(gnome_data); do \
-- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
-+ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
- done
+ $(mkinstalldirs) "$(DESTDIR)$(icondir)"
+ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)"
+- $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)"
+- $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)"
++ $(INSTALL_DATA) $(srcdir)/gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)"
++ $(INSTALL_DATA) $(srcdir)/gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)"
install-conf: $(conf_files) $(default_files)
+ $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc"
+--
+2.20.1
diff --git a/meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch b/meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch
new file mode 100644
index 0000000000..ce9d423104
--- /dev/null
+++ b/meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch
@@ -0,0 +1,24 @@
+From 00a3ace35d66e7ae60046e254a4d00f0f9c1abe2 Mon Sep 17 00:00:00 2001
+From: OpenEmbedded <oe.patch@oe>
+Date: Thu, 22 Nov 2018 12:05:04 +0000
+Subject: [PATCH] Do not install to /usr/local
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 77c9310..fc378fd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@ CFLAGS += -O2
+ LDFLAGS =
+
+ DESTDIR =
+-prefix = /usr/local
++prefix = /usr
+ sbindir = $(prefix)/sbin
+ mandir = $(prefix)/share/man
+ man8dir = $(mandir)/man8
diff --git a/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb b/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb
deleted file mode 100644
index 109a9d2ee8..0000000000
--- a/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "DMI (Desktop Management Interface) table related utilities"
-HOMEPAGE = "http://www.nongnu.org/dmidecode/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz"
-
-COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_install() {
- oe_runmake DESTDIR="${D}" install
-}
-
-do_unpack_extra() {
- sed -i -e '/^prefix/s:/usr/local:${exec_prefix}:' ${S}/Makefile
-}
-addtask unpack_extra after do_unpack before do_patch
-
-SRC_URI[md5sum] = "281ee572d45c78eca73a14834c495ffd"
-SRC_URI[sha256sum] = "7ec35bb193729c1d593a1460b59d82d24b89102ab23fd0416e6cf4325d077e45"
-
diff --git a/meta/recipes-devtools/dmidecode/dmidecode_3.2.bb b/meta/recipes-devtools/dmidecode/dmidecode_3.2.bb
new file mode 100644
index 0000000000..63f4061cb7
--- /dev/null
+++ b/meta/recipes-devtools/dmidecode/dmidecode_3.2.bb
@@ -0,0 +1,24 @@
+SUMMARY = "DMI (Desktop Management Interface) table related utilities"
+HOMEPAGE = "http://www.nongnu.org/dmidecode/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz \
+ file://0001-Committing-changes-from-do_unpack_extra.patch \
+ "
+
+COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+# The upstream buildsystem uses 'docdir' as the path where it puts AUTHORS,
+# README, etc, but we don't want those in the root of our docdir.
+docdir .= "/${BPN}"
+
+do_install() {
+ oe_runmake DESTDIR="${D}" install
+}
+
+SRC_URI[md5sum] = "9cc2e27e74ade740a25b1aaf0412461b"
+SRC_URI[sha256sum] = "077006fa2da0d06d6383728112f2edef9684e9c8da56752e97cd45a11f838edd"
+
diff --git a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
new file mode 100644
index 0000000000..6692b41a16
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
@@ -0,0 +1,22 @@
+From 05e059cd4e9910c00b32d377f4f98e3c8dde6bc6 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 26 Jan 2017 16:36:20 +0200
+Subject: [PATCH 4/5] Corretly install tmpfiles.d configuration
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ etc/tmpfiles.d/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/etc/tmpfiles.d/CMakeLists.txt b/etc/tmpfiles.d/CMakeLists.txt
+index f69c773e..3eb6d0e8 100644
+--- a/etc/tmpfiles.d/CMakeLists.txt
++++ b/etc/tmpfiles.d/CMakeLists.txt
+@@ -1 +1 @@
+-INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/)
++INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
+--
+2.14.2
+
diff --git a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
new file mode 100644
index 0000000000..cb09f17a56
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
@@ -0,0 +1,27 @@
+From ffb7942cc73c3d2c6aa7c689cdaf9bc0bcbc144b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 26 Jan 2017 16:25:47 +0200
+Subject: [PATCH] Do not hardcode /etc and systemd unit directories
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 73552967..38cf4fbf 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,8 +3,8 @@ CMAKE_MINIMUM_REQUIRED (VERSION 2.4)
+
+ INCLUDE (${CMAKE_SOURCE_DIR}/VERSION.cmake)
+
+-SET( SYSCONFDIR /etc)
+-SET( SYSTEMD_DIR /usr/lib/systemd/system)
++SET( SYSCONFDIR ${CMAKE_INSTALL_SYSCONFDIR})
++SET( SYSTEMD_DIR $ENV{systemd_system_unitdir})
+
+ IF (NOT PYTHON_DESIRED)
+ FIND_PACKAGE (PythonInterp REQUIRED)
diff --git a/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch b/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
new file mode 100644
index 0000000000..aa20009cef
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
@@ -0,0 +1,31 @@
+From 6365389074a1b86962f3d8b22a2ead2202026a98 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 11 Jan 2017 15:10:13 +0200
+Subject: [PATCH 5/5] Do not prepend installroot to logdir.
+
+This would otherwise write the logs into rootfs/var/log
+(whereas we want them in $T),
+and will break installation of base-files rpm.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dnf/cli/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
+index d2d9c082..82270ecf 100644
+--- a/dnf/cli/cli.py
++++ b/dnf/cli/cli.py
+@@ -920,7 +920,7 @@ class Cli(object):
+ logger.warning(_("Unable to detect release version (use '--releasever' to specify "
+ "release version)"))
+
+- for opt in ('cachedir', 'logdir', 'persistdir'):
++ for opt in ('cachedir', 'persistdir'):
+ conf.prepend_installroot(opt)
+
+ self.base._logging._setup_from_dnf_conf(conf)
+--
+2.14.2
+
diff --git a/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 0000000000..0ed9afc58d
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,25 @@
+From 6be13143a54c79085d400d5bd4c7a6e1cb6ffaf5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:29:07 +0200
+Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 38cf4fbf..6c5debd8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,7 +19,7 @@ ELSE ()
+ MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED})
+ ENDIF()
+
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+
+ ADD_SUBDIRECTORY (dnf)
diff --git a/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
new file mode 100644
index 0000000000..eedbb5723f
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
@@ -0,0 +1,38 @@
+From 8d97b72a1d77149e2f9048d1ca6cef66da1a8aa5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:29:37 +0200
+Subject: [PATCH 2/5] Run python scripts using env
+
+Otherwise the build tools hardcode the python path into them.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ bin/dnf-automatic.in | 2 +-
+ bin/dnf.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in
+index 5b06aa26..891b4c24 100755
+--- a/bin/dnf-automatic.in
++++ b/bin/dnf-automatic.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON_EXECUTABLE@
++#!/usr/bin/env python3
+ # dnf-automatic executable.
+ #
+ # Copyright (C) 2014-2016 Red Hat, Inc.
+diff --git a/bin/dnf.in b/bin/dnf.in
+index 645d0f06..bdf7b3c4 100755
+--- a/bin/dnf.in
++++ b/bin/dnf.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON_EXECUTABLE@
++#!/usr/bin/env python3
+ # The dnf executable script.
+ #
+ # Copyright (C) 2012-2016 Red Hat, Inc.
+--
+2.14.2
+
diff --git a/meta/recipes-devtools/dnf/dnf_4.2.2.bb b/meta/recipes-devtools/dnf/dnf_4.2.2.bb
new file mode 100644
index 0000000000..f38167f1ad
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf_4.2.2.bb
@@ -0,0 +1,86 @@
+SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver"
+DESCRIPTION = "Software package manager that installs, updates, and removes \
+packages on RPM-based Linux distributions. It automatically computes \
+dependencies and determines the actions required to install packages."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://PACKAGE-LICENSING;md5=4a0548e303dbc77f067335b4d688e745 \
+ "
+
+SRC_URI = "git://github.com/rpm-software-management/dnf.git \
+ file://0001-Corretly-install-tmpfiles.d-configuration.patch \
+ file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
+ file://0005-Do-not-prepend-installroot-to-logdir.patch \
+ file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+ file://0030-Run-python-scripts-using-env.patch \
+ "
+
+SRCREV = "9947306a55271b8b7c9e2b6e3b7d582885b6045d"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake gettext bash-completion distutils3-base systemd
+
+DEPENDS += "libdnf librepo libcomps python3-iniparse"
+
+# manpages generation requires http://www.sphinx-doc.org/
+EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
+
+BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS_${PN} += " \
+ python3-core \
+ python3-codecs \
+ python3-netclient \
+ python3-email \
+ python3-threading \
+ python3-distutils \
+ python3-logging \
+ python3-fcntl \
+ librepo \
+ python3-shell \
+ libcomps \
+ libdnf \
+ python3-sqlite3 \
+ python3-compression \
+ python3-rpm \
+ python3-iniparse \
+ python3-json \
+ python3-curses \
+ python3-misc \
+ python3-gpg \
+ "
+
+RDEPENDS_${PN}_class-native = ""
+
+RRECOMMENDS_${PN}_class-target += "gnupg"
+
+# Create a symlink called 'dnf' as 'make install' does not do it, but
+# .spec file in dnf source tree does (and then Fedora and dnf documentation
+# says that dnf binary is plain 'dnf').
+do_install_append() {
+ lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
+ lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
+}
+
+# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
+do_install_append_class-native() {
+ create_wrapper ${D}/${bindir}/dnf \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+}
+
+do_install_append_class-nativesdk() {
+ create_wrapper ${D}/${bindir}/dnf \
+ RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+}
+
+SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
+ dnf-automatic.service dnf-automatic.timer \
+ dnf-automatic-download.service dnf-automatic-download.timer \
+ dnf-automatic-install.service dnf-automatic-install.timer \
+ dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
+"
+SYSTEMD_AUTO_ENABLE ?= "disable"
diff --git a/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb b/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
deleted file mode 100644
index b7791f360b..0000000000
--- a/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "DSSSL stylesheets used to transform SGML and XML DocBook files"
-HOMEPAGE = "http://docbook.sourceforge.net"
-# Simple persmissive
-LICENSE = "DSSSL"
-LIC_FILES_CHKSUM = "file://README;beginline=41;endline=74;md5=875385159b2ee76ecf56136ae7f542d6"
-
-DEPENDS = "sgml-common-native"
-
-PR = "r4"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-dsssl-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "bc192d23266b9a664ca0aba4a7794c7c"
-SRC_URI[sha256sum] = "2f329e120bee9ef42fbdd74ddd60e05e49786c5a7953a0ff4c680ae6bdf0e2bc"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/docbook/files/docbook-dsssl/"
-UPSTREAM_CHECK_REGEX = "/docbook-dsssl/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/docbook-dsssl-${PV}"
-
-inherit native
-
-SSTATEPOSTINSTFUNCS += "docbook_dsssl_stylesheets_sstate_postinst"
-SYSROOT_PREPROCESS_FUNCS += "docbook_dsssl_sysroot_preprocess"
-CLEANFUNCS += "docbook_dsssl_stylesheets_sstate_clean"
-
-
-do_install () {
- # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-dsssl.html
- # for details.
- install -d ${D}${bindir}
- install -m 0755 bin/collateindex.pl ${D}${bindir}
-
- install -d ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
- install -m 0644 catalog ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
- cp -v -R * ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
-
- install -d ${D}${sysconfdir}/sgml
- echo "CATALOG ${datadir}/sgml/docbook/dsssl-stylesheets-${PV}/catalog" > \
- ${D}${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
- echo "CATALOG ${datadir}/sgml/docbook/dsssl-stylesheets-${PV}/common/catalog" >> \
- ${D}${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
-}
-
-docbook_dsssl_stylesheets_sstate_postinst () {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is installed from sstate cache.
- ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl \
- --add ${sysconfdir}/sgml/sgml-docbook.bak \
- ${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
- ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl \
- --add ${sysconfdir}/sgml/sgml-docbook.cat \
- ${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
- fi
-}
-
-docbook_dsssl_sysroot_preprocess () {
- install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
- install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl
-}
-
-docbook_dsssl_stylesheets_sstate_clean () {
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is removed from sstate cache.
- files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
- for f in $files; do
- [ ! -f $f ] || sed -i '/\/sgml\/dsssl-docbook-stylesheets.cat/d' $f
- done
-}
diff --git a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native_3.1.bb b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native_3.1.bb
deleted file mode 100644
index a3ee5d83a6..0000000000
--- a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native_3.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require docbook-sgml-dtd-native.inc
-
-LICENSE = "OASIS"
-LIC_FILES_CHKSUM = "file://LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
-
-DTD_VERSION = "3.1"
-
-PR = "${INC_PR}.0"
-
-# Note: the upstream sources are not distributed with a license file.
-# LICENSE-OASIS is included as a "patch" to workaround this. When
-# upgrading this recipe, please verify whether this is still needed.
-SRC_URI = "http://www.docbook.org/sgml/3.1/docbk31.zip \
- file://LICENSE-OASIS"
-
-SRC_URI[md5sum] = "432749c0c806dbae81c8bcb70da3b5d3"
-SRC_URI[sha256sum] = "20261d2771b9a052abfa3d8fab1aa62be05791a010281c566f9073bf0e644538"
-
-UPSTREAM_CHECK_URI = "http://www.docbook.org/sgml/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>3\..+)/"
-
-do_compile() {
- # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd-3.html
- # for details.
- sed -i -e '/ISO 8879/d' -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' docbook.cat
-}
diff --git a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native_4.1.bb b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native_4.1.bb
deleted file mode 100644
index be59680770..0000000000
--- a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native_4.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require docbook-sgml-dtd-native.inc
-
-LICENSE = "OASIS"
-LIC_FILES_CHKSUM = "file://LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
-
-DTD_VERSION = "4.1"
-
-PR = "${INC_PR}.0"
-
-# Note: the upstream sources are not distributed with a license file.
-# LICENSE-OASIS is included as a "patch" to workaround this. When
-# upgrading this recipe, please verify whether this is still needed.
-SRC_URI = "http://docbook.org/sgml/4.1/docbk41.zip \
- file://LICENSE-OASIS"
-
-SRC_URI[md5sum] = "489f6ff2a2173eb1e14216c10533ede2"
-SRC_URI[sha256sum] = "deaafcf0a3677692e7ad4412c0e41c1db3e9da6cdcdb3dd32b2cc1f9c97d6311"
-
-UPSTREAM_CHECK_URI = "http://www.docbook.org/sgml/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>4\.1(\.\d+)*)/"
-
-do_compile() {
- # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
- # for details.
- sed -i -e '/ISO 8879/d' -e '/gml/d' docbook.cat
-}
diff --git a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.5-native.bb b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.5-native.bb
deleted file mode 100644
index ae723c74fe..0000000000
--- a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.5-native.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require docbook-sgml-dtd-native.inc
-
-LICENSE = "OASIS"
-LIC_FILES_CHKSUM = "file://LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
-
-DTD_VERSION = "4.5"
-
-PR = "${INC_PR}.0"
-PV = "4.5"
-
-SRC_URI[md5sum] = "07c581f4bbcba6d3aac85360a19f95f7"
-SRC_URI[sha256sum] = "8043e514e80c6c19cb146b5d37937d1305bf3abf9b0097c36df7f70f611cdf43"
-
-do_compile() {
- # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
- # for details.
- sed -i -e '/ISO 8879/d' -e'/gml/d' docbook.cat
-}
diff --git a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
deleted file mode 100644
index af50987968..0000000000
--- a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
+++ /dev/null
@@ -1,70 +0,0 @@
-# The DTDs of the various versions have to be installed in parallel and
-# should not replace each other. The installation step is common for
-# all versions and just differs in ${DTD_VERSION} which is set in each
-# version recipe.
-#
-# The DTDs do have some quirks (see LFS documentation).
-SUMMARY = "Document type definitions for verification of SGML data files"
-DESCRIPTION = "Document type definitions for verification of SGML data \
-files against the DocBook rule set"
-HOMEPAGE = "http://www.docbook.org/sgml/"
-
-DEPENDS = "sgml-common-native"
-
-# Note: the upstream sources are not distributed with a license file.
-# LICENSE-OASIS is included as a "patch" to workaround this. When
-# upgrading this recipe, please verify whether this is still needed.
-SRC_URI = "http://www.docbook.org/sgml/${DTD_VERSION}/docbook-${DTD_VERSION}.zip \
- file://LICENSE-OASIS"
-
-# The .zip file extracts to the current dir
-S = "${WORKDIR}"
-
-INC_PR = "r3"
-
-SSTATEPOSTINSTFUNCS += "docbook_sgml_dtd_sstate_postinst"
-SYSROOT_PREPROCESS_FUNCS += "docbook_sgml_dtd_sysroot_preprocess"
-
-inherit native
-
-do_install () {
- # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
- # for details.
- install -d -m 755 ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
- install docbook.cat ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
- cp -PpRr *.dtd *.mod *.dcl ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
-
- install -d ${D}${sysconfdir}/sgml
- echo "CATALOG ${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog" > \
- ${D}${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
-}
-
-docbook_sgml_dtd_sstate_postinst () {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is installed from sstate cache.
- ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION} \
- --add ${sysconfdir}/sgml/sgml-docbook.bak \
- ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
- ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION} \
- --add ${sysconfdir}/sgml/sgml-docbook.cat \
- ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
- fi
-}
-
-docbook_sgml_dtd_sysroot_preprocess () {
- install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
- install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION}
-}
-
-CLEANFUNCS += "docbook_sgml_dtd_sstate_clean"
-
-docbook_sgml_dtd_sstate_clean () {
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is removed from sstate cache.
- files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
- for f in $files; do
- [ ! -f $f ] || sed -i '/\/sgml\/sgml-docbook-dtd-${DTD_VERSION}.cat/d' $f
- done
-}
diff --git a/meta/recipes-devtools/docbook-sgml-dtd/files/LICENSE-OASIS b/meta/recipes-devtools/docbook-sgml-dtd/files/LICENSE-OASIS
deleted file mode 100644
index 6da7f5b8c7..0000000000
--- a/meta/recipes-devtools/docbook-sgml-dtd/files/LICENSE-OASIS
+++ /dev/null
@@ -1,16 +0,0 @@
-Permission to use, copy, modify and distribute the DocBook XML DTD
-and its accompanying documentation for any purpose and without fee
-is hereby granted in perpetuity, provided that the above copyright
-notice and this paragraph appear in all copies. The copyright
-holders make no representation about the suitability of the DTD for
-any purpose. It is provided "as is" without expressed or implied
-warranty.
-
-If you modify the DocBook DTD in any way, except for declaring and
-referencing additional sets of general entities and declaring
-additional notations, label your DTD as a variant of DocBook. See
-the maintenance documentation for more information.
-
-Please direct all questions, bug reports, or suggestions for
-changes to the docbook@lists.oasis-open.org mailing list. For more
-information, see http://www.oasis-open.org/docbook/.
diff --git a/meta/recipes-devtools/docbook-utils/docbook-utils-0.6.14/re.patch b/meta/recipes-devtools/docbook-utils/docbook-utils-0.6.14/re.patch
deleted file mode 100644
index db079d68fd..0000000000
--- a/meta/recipes-devtools/docbook-utils/docbook-utils-0.6.14/re.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Upstream-Status: Pending
-
-Fix runtime error occurred e.g. with docbook-to-man calls:
-
- grep: character class syntax is [[:space:]], not [:space:]
- grep: character class syntax is [[:space:]], not [:space:]
- jw: There is no frontend called "/docbook/utils-0.6.14/frontends/docbook".
-
-See also:
-
- <https://qa.mandriva.com/show_bug.cgi?id=61127>
-
-Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de>
-
-diff -Nurd docbook-utils-0.6.14-orig/bin/jw.in docbook-utils-0.6.14/bin/jw.in
---- docbook-utils-0.6.14-orig/bin/jw.in 2012-03-29 07:50:00.789564826 +0200
-+++ docbook-utils-0.6.14/bin/jw.in 2012-03-29 07:52:10.371302967 +0200
-@@ -80,9 +80,9 @@
- SGML_CATALOGS_DIR="/etc/sgml"
- if [ -f "$SGML_CONF" ]
- then
-- RE='^[:space:]*SGML_BASE_DIR[:space:]*=[:space:]*'
-+ RE='^[[:space:]]*SGML_BASE_DIR[[:space:]]*=[[:space:]]*'
- SGML_BASE_DIR=`grep $RE $SGML_CONF | sed "s/$RE//"`
-- RE='^[:space:]*SGML_CATALOGS_DIR[:space:]*=[:space:]*'
-+ RE='^[[:space:]]*SGML_CATALOGS_DIR[[:space:]]*=[[:space:]]*'
- SGML_CATALOGS_DIR=`grep $RE $SGML_CONF | sed "s/$RE//"`
- fi
-
diff --git a/meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb b/meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb
deleted file mode 100644
index c3a5f3b421..0000000000
--- a/meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Utilities for formatting and manipulating DocBook documents"
-DESCRIPTION = "A collection of all the free software tools you need to \
-work on and format DocBook documents."
-HOMEPAGE = "http://sources.redhat.com/docbook-tools/"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "openjade-native sgmlspl-native docbook-dsssl-stylesheets-native docbook-sgml-dtd-3.1-native"
-
-PR = "r3"
-
-SRC_URI = "\
- ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/docbook-utils-${PV}.tar.gz \
- file://re.patch \
-"
-
-SRC_URI[md5sum] = "6b41b18c365c01f225bc417cf632d81c"
-SRC_URI[sha256sum] = "48faab8ee8a7605c9342fb7b906e0815e3cee84a489182af38e8f7c0df2e92e9"
-
-inherit autotools native
-
-do_configure_prepend() {
- # Fix hard-coded references to /etc/sgml
- if [ ! -e ${S}/.sed_done ]; then
- sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" ${S}/bin/jw.in
- sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" ${S}/doc/man/Makefile.am
- sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" ${S}/doc/HTML/Makefile.am
-
- # Point jw to the native sysroot catalog
- sed -i -e 's|^SGML_EXTRA_CATALOGS=""|SGML_EXTRA_CATALOGS=":${sysconfdir}/sgml/catalog"|g' ${S}/bin/jw.in
- touch ${S}/.sed_done
- fi
-}
-do_unpack[cleandirs] += "${S}"
-
-do_install() {
- install -d ${D}${bindir}
- # Install the binaries and a bunch of other commonly used names for them.
- for doctype in html ps dvi man pdf rtf tex texi txt
- do
- install -m 0755 ${S}/bin/docbook2$doctype ${D}${bindir}/
- ln -sf docbook2x-$doctype ${D}${bindir}/db2$doctype
- ln -sf docbook2$doctype ${D}${bindir}/db2$doctype
- ln -sf docbook2$doctype ${D}${bindir}/docbook-to-$doctype
- done
-
- install -m 0755 ${B}/bin/jw ${D}${bindir}/
- for i in backends/dvi backends/html \
- backends/pdf backends/ps backends/rtf backends/tex \
- backends/txt \
- helpers/docbook2man-spec.pl helpers/docbook2texi-spec.pl \
- docbook-utils.dsl
- do
- install -d ${D}${datadir}/sgml/docbook/utils-${PV}/`dirname $i`
- install ${S}/$i ${D}${datadir}/sgml/docbook/utils-${PV}/$i
- done
- for i in backends/man backends/texi frontends/docbook
- do
- install -d ${D}${datadir}/sgml/docbook/utils-${PV}/`dirname $i`
- install ${B}/$i ${D}${datadir}/sgml/docbook/utils-${PV}/$i
- done
-
-}
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml
deleted file mode 100644
index b71f559ef5..0000000000
--- a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Norman Walsh//ELEMENTS DocBook XML Information Pool V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.1//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBook XML Notations V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Norman Walsh//DTD CALS Table Model XML V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBook XML Character Entities V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Norman Walsh//ELEMENTS DocBook XML Document Hierarchy V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Normal Walsh//Exchange Table Model 19960430 XML V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegateSystem systemIdStartString="http://docbook.org/xml/4.4/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegateSystem systemIdStartString="http://docbook.org/xml/4.1/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBk XML V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBook XML V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegateSystem systemIdStartString="http://docbook.org/xml/4.1.2/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegateSystem systemIdStartString="http://docbook.org/xml/4.5/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBook XML Additional General Entities V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
- <delegateSystem systemIdStartString="http://docbook.org/xml/4.2/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD XML Exchange Table Model 19990315//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegateSystem systemIdStartString="http://docbook.org/xml/4.3/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
- <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
-</catalog>
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
index 2f13dba52c..6452c8d99f 100644
--- a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
@@ -14,7 +14,6 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e763
SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/d/docbook-xml/docbook-xml_${PV}.orig.tar.gz \
file://LICENSE-OASIS \
file://docbook-xml-update-catalog.xml.patch \
- file://docbook-xml.xml \
"
SRC_URI[md5sum] = "487b4d44e15cffb1f4048af23f98208e"
@@ -22,15 +21,12 @@ SRC_URI[sha256sum] = "b0f8edcf697f5318e63dd98c9a931f3fee167af0805ba441db372e0f17
UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/"
-S="${WORKDIR}/docbook-xml-4.5.c31424"
+S = "${WORKDIR}/docbook-xml-4.5.c31424"
inherit allarch
BBCLASSEXTEND = "native"
-SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xml_dtd_sstate_postinst"
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xml_dtd_sysroot_preprocess"
-
-do_configre (){
+do_configure (){
:
}
@@ -39,28 +35,18 @@ do_compile (){
}
do_install () {
- # Refer debian https://packages.debian.org/sid/all/docbook-xml/filelist
- for DTDVERSION in 4.0 4.1.2 4.2 4.3 4.4 4.5; do
- install -d -m 755 ${D}${datadir}/xml/docbook/schema/dtd/${DTDVERSION}
- cp -v -R docbook-${DTDVERSION}/* ${D}${datadir}/xml/docbook/schema/dtd/${DTDVERSION}
- done
-
install -d ${D}${sysconfdir}/xml/
- install -m 755 ${WORKDIR}/docbook-xml.xml ${D}${sysconfdir}/xml/docbook-xml.xml
-}
+ xmlcatalog --create --noout ${D}${sysconfdir}/xml/docbook-xml.xml
-docbook_xml_dtd_sstate_postinst () {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is installed from sstate cache.
- sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xml.xml
- fi
+ for DTDVERSION in 4.0 4.1.2 4.2 4.3 4.4 4.5; do
+ DEST=${datadir}/xml/docbook/schema/dtd/$DTDVERSION
+ install -d -m 755 ${D}$DEST
+ cp -v -R docbook-$DTDVERSION/* ${D}$DEST
+ xmlcatalog --verbose --noout --add nextCatalog unused file://$DEST/catalog.xml ${D}${sysconfdir}/xml/docbook-xml.xml
+ done
}
-docbook_xml_dtd_sysroot_preprocess () {
- # Update the hardcode dir in docbook-xml.xml
- sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xml.xml
-}
+XMLCATALOGS = "${sysconfdir}/xml/docbook-xml.xml"
+inherit xmlcatalog
FILES_${PN} = "${datadir}/* ${sysconfdir}/xml/docbook-xml.xml"
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
deleted file mode 100644
index c60555ae14..0000000000
--- a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
-<delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets/catalog.xml"/>
-<delegateSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets/catalog.xml"/>
-</catalog>
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
index aa03a82a2a..c5d3a24808 100644
--- a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
@@ -4,7 +4,6 @@ LICENSE = "XSL"
LIC_FILES_CHKSUM = "file://COPYING;md5=6beadd98f9c54ab0c387e14211ee4d0e"
SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-xsl-${PV}.tar.bz2 \
- file://docbook-xsl.xml \
file://docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch \
"
@@ -17,11 +16,7 @@ UPSTREAM_CHECK_REGEX = "/docbook-xsl/(?P<pver>(\d+[\.\-_]*)+(?!\.0)\.\d+)/"
S = "${WORKDIR}/docbook-xsl-${PV}"
-inherit allarch
-BBCLASSEXTEND = "native"
-
-SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xsl_stylesheets_sstate_postinst"
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xsl_stylesheets_sysroot_preprocess"
+inherit allarch xmlcatalog
do_configure (){
:
@@ -32,8 +27,6 @@ do_compile (){
}
do_install () {
- # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-xsl.html
- # for details.
install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-${PV}
ln -s xsl-stylesheets-${PV} ${D}${datadir}/xml/docbook/xsl-stylesheets
@@ -45,30 +38,14 @@ do_install () {
ln -s VERSION ${D}/${datadir}/xml/docbook/xsl-stylesheets-${PV}/VERSION.xsl
- install -v -m644 -D README \
- ${D}${datadir}/doc/docbook-xsl-${PV}/README.txt
- install -v -m644 RELEASE-NOTES* NEWS* \
- ${D}${datadir}/doc/docbook-xsl-${PV}
-
- install -d ${D}${sysconfdir}/xml/
- install -m 755 ${WORKDIR}/docbook-xsl.xml ${D}${sysconfdir}/xml/docbook-xsl.xml
-
-}
-
-docbook_xsl_stylesheets_sstate_postinst () {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is installed from sstate cache.
- sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml
- fi
-}
-
-docbook_xsl_stylesheets_sysroot_preprocess () {
- # Update the hardcode dir in docbook-xml.xml
- sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml
+ install -d ${D}${docdir}/${BPN}
+ install -v -m644 README RELEASE-NOTES* NEWS* ${D}${docdir}/${BPN}
}
RDEPENDS_${PN} += "perl"
FILES_${PN} = "${datadir}/xml/* ${sysconfdir}/xml/docbook-xsl.xml"
FILES_${PN}-doc = "${datadir}/doc/*"
+
+XMLCATALOGS = "${datadir}/xml/docbook/xsl-stylesheets-${PV}/catalog.xml"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch b/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch
deleted file mode 100644
index 06f5b7a960..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b7c42c6a9829bea911b22201edd7df2a9bec1a14 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:52:34 -0700
-Subject: [PATCH] Include fcntl.h for getting loff_t definition
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- dosfsck/dosfsck.h | 2 ++
- dosfsck/lfn.c | 1 +
- 2 files changed, 3 insertions(+)
-
-diff --git a/dosfsck/dosfsck.h b/dosfsck/dosfsck.h
-index d9314b1..2076d5f 100644
---- a/dosfsck/dosfsck.h
-+++ b/dosfsck/dosfsck.h
-@@ -50,6 +50,8 @@
- #define CT_LE_L(v) (v)
- #endif /* __BIG_ENDIAN */
-
-+#include <fcntl.h>
-+
- #define VFAT_LN_ATTR (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
-
- /* ++roman: Use own definition of boot sector structure -- the kernel headers'
-diff --git a/dosfsck/lfn.c b/dosfsck/lfn.c
-index 9b2cfc3..bb04fda 100644
---- a/dosfsck/lfn.c
-+++ b/dosfsck/lfn.c
-@@ -7,6 +7,7 @@
- #include <string.h>
- #include <limits.h>
- #include <time.h>
-+#include <fcntl.h>
-
- #include "common.h"
- #include "io.h"
---
-2.1.4
-
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
deleted file mode 100644
index b46b2db0a3..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-The problem is that unsigned char[2] is
-guranteed to be 8Bit aligned on arm
-but unsigned short is/needs to be 16bit aligned
-the union { unsigned short; unsigned char[2] } trick
-didn't work so no we use the alpha hack.
-
-memcpy into an 16bit aligned
-
- -zecke
-
-Upstream-Status: Inappropriate [licensing]
-We're tracking an old release of dosfstools due to licensing issues.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- dosfstools/dosfsck/boot.c.orig 2003-05-15 19:32:23.000000000 +0200
-+++ dosfstools/dosfsck/boot.c 2003-06-13 17:44:25.000000000 +0200
-@@ -36,17 +36,15 @@
- { 0xff, "5.25\" 320k floppy 2s/40tr/8sec" },
- };
-
--#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
-+
- /* Unaligned fields must first be copied byte-wise */
- #define GET_UNALIGNED_W(f) \
- ({ \
- unsigned short __v; \
- memcpy( &__v, &f, sizeof(__v) ); \
-- CF_LE_W( *(unsigned short *)&f ); \
-+ CF_LE_W( *(unsigned short *)&__v ); \
- })
--#else
--#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
--#endif
-+
-
-
- static char *get_media_descr( unsigned char media )
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch
deleted file mode 100644
index 35abd1a2b1..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Ensure the __s8 type is properly defined.
-
-Upstream-Status: Inappropriate [licensing]
-We're tracking an old release of dosfstools due to licensing issues.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- dosfstools-2.10/dosfsck/dosfsck.h.org 2006-02-21 08:36:14.000000000 -0700
-+++ dosfstools-2.10/dosfsck/dosfsck.h 2006-02-21 08:40:12.000000000 -0700
-@@ -22,6 +22,14 @@
- #undef __KERNEL__
- #endif
-
-+#ifndef __s8
-+#include <asm/types.h>
-+#endif
-+
-+#ifndef __ASM_STUB_BYTEORDER_H__
-+#include <asm/byteorder.h>
-+#endif
-+
- #include <linux/msdos_fs.h>
-
- /* 2.1 kernels use le16_to_cpu() type functions for CF_LE_W & Co., but don't
---- dosfstools-2.10/dosfsck/file.c.org 2006-02-21 08:37:36.000000000 -0700
-+++ dosfstools-2.10/dosfsck/file.c 2006-02-21 08:37:47.000000000 -0700
-@@ -23,6 +23,10 @@
- #undef __KERNEL__
- #endif
-
-+#ifndef __s8
-+#include <asm/types.h>
-+#endif
-+
- #include <linux/msdos_fs.h>
-
- #include "common.h"
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/fix_populated_dosfs_creation.patch b/meta/recipes-devtools/dosfstools/dosfstools/fix_populated_dosfs_creation.patch
deleted file mode 100644
index 9d7f7321ac..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/fix_populated_dosfs_creation.patch
+++ /dev/null
@@ -1,489 +0,0 @@
-Upstream-Status: Inappropriate
-
-This patch fixes populated dosfs image creation with directory
-structures. Earlier it was causing segfault; and only image
-population with no subdirectories was working.
-
-Issues fixed:
-1. (dir->count == dir->entries) check was only needed for root
- directory entries. And this check is wrong for non-root
- directories.
-2. For each dir entry 2 dir->table entries were needed, one for
- the file/dir and 2nd for long file name support. Earlier long
- name support was added for filenames but the 2nd entry
- allocation, initialization & counting was missed.
-3. The memory clearing was missed at the code path after dir->table
- memroy allocation.
-4. Add entries for . & .. directories in all non-root directories.
-5. The . directory points to the correct entry in fat now.
-6. All directoriy entries' size was not zero as required for dosfsck,
- Now all directory entries' size is zero.
-
-Enhancements:
-1. Added support for long names for directory names. This is same
- as the existing long name support for filenames.
-2. Added error messages for previously silent memory allocation and
- other errors.
-3. -d options does not work correctly with fat32, so now throwing
- an error for that.
-4. Use predefined structures from kernel's msdos_fs.h file, rather
- than defining again here. And accordingly change the names & use
- of structure variables.
-
-Outstanding Issues:
-1. The .. directory entry do not point to the parent of current
- directory. This issue can be fixed by running dosfsck -a after
- image creation.
-2. For files the filesize is correct, but the clusters size is more
- than it needs to be, this also can be fixed by running dosfsck -a
- after image creation.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/12/13
-
-
-Index: dosfstools-2.11/mkdosfs/mkdosfs.c
-===================================================================
---- dosfstools-2.11.orig/mkdosfs/mkdosfs.c
-+++ dosfstools-2.11/mkdosfs/mkdosfs.c
-@@ -21,7 +21,17 @@
- June 2004 - Jordan Crouse (info.linux@amd.com)
- Added -d <directory> support to populate the image
- Copyright (C) 2004, Advanced Micro Devices, All Rights Reserved
--
-+
-+ 2011-12-13: Nitin A Kamble <nitin.a.kamble@intel.com>
-+ Enhanced the -d <directory> support for population of image while
-+ creation. Earlier subdirectores support was broken, only files in
-+ the rootdir were supported. Now directory hirarchy is supported.
-+ Also added long filename support to directory names.
-+ The -d <directory> option (image population while creation)
-+ is broken with fat32.
-+ Copyright (C) 2011, Intel Corporation, All Rights Reserved
-+
-+
- Fixes/additions May 1998 by Roman Hodek
- <Roman.Hodek@informatik.uni-erlangen.de>:
- - Atari format support
-@@ -86,23 +96,23 @@
- # undef __KERNEL__
- #endif
-
--#if __BYTE_ORDER == __BIG_ENDIAN
--
-+#ifndef __ASM_STUB_BYTEORDER_H__
- #include <asm/byteorder.h>
--#ifdef __le16_to_cpu
--/* ++roman: 2.1 kernel headers define these function, they're probably more
-- * efficient then coding the swaps machine-independently. */
--#define CF_LE_W __le16_to_cpu
--#define CF_LE_L __le32_to_cpu
--#define CT_LE_W __cpu_to_le16
--#define CT_LE_L __cpu_to_le32
--#else
--#define CF_LE_W(v) ((((v) & 0xff) << 8) | (((v) >> 8) & 0xff))
--#define CF_LE_L(v) (((unsigned)(v)>>24) | (((unsigned)(v)>>8)&0xff00) | \
-- (((unsigned)(v)<<8)&0xff0000) | ((unsigned)(v)<<24))
-+#endif
-+
-+#include <linux/msdos_fs.h>
-+
-+#undef CF_LE_W
-+#undef CF_LE_L
-+#undef CT_LE_W
-+#undef CT_LE_L
-+
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+#include <byteswap.h>
-+#define CF_LE_W(v) bswap_16(v)
-+#define CF_LE_L(v) bswap_32(v)
- #define CT_LE_W(v) CF_LE_W(v)
- #define CT_LE_L(v) CF_LE_L(v)
--#endif /* defined(__le16_to_cpu) */
-
- #else
-
-@@ -253,33 +263,6 @@ struct fat32_fsinfo {
- __u32 reserved2[4];
- };
-
--/* This stores up to 13 chars of the name */
--
--struct msdos_dir_slot {
-- __u8 id; /* sequence number for slot */
-- __u8 name0_4[10]; /* first 5 characters in name */
-- __u8 attr; /* attribute byte */
-- __u8 reserved; /* always 0 */
-- __u8 alias_checksum; /* checksum for 8.3 alias */
-- __u8 name5_10[12]; /* 6 more characters in name */
-- __u16 start; /* starting cluster number, 0 in long slots */
-- __u8 name11_12[4]; /* last 2 characters in name */
--};
--
--struct msdos_dir_entry
-- {
-- char name[8], ext[3]; /* name and extension */
-- __u8 attr; /* attribute bits */
-- __u8 lcase; /* Case for base and extension */
-- __u8 ctime_ms; /* Creation time, milliseconds */
-- __u16 ctime; /* Creation time */
-- __u16 cdate; /* Creation date */
-- __u16 adate; /* Last access date */
-- __u16 starthi; /* high 16 bits of first cl. (FAT32) */
-- __u16 time, date, start; /* time, date and first cluster */
-- __u32 size; /* file size (in bytes) */
-- } __attribute__ ((packed));
--
- /* The "boot code" we put into the filesystem... it writes a message and
- tells the user to try again */
-
-@@ -356,7 +339,6 @@ static struct msdos_dir_entry *root_dir;
- static int size_root_dir; /* Size of the root directory in bytes */
- static int sectors_per_cluster = 0; /* Number of sectors per disk cluster */
- static int root_dir_entries = 0; /* Number of root directory entries */
--static int root_dir_num_entries = 0;
- static int last_cluster_written = 0;
-
- static char *blank_sector; /* Blank sector - all zeros */
-@@ -1315,7 +1297,7 @@ setup_tables (void)
- de->date = CT_LE_W((unsigned short)(ctime->tm_mday +
- ((ctime->tm_mon+1) << 5) +
- ((ctime->tm_year-80) << 9)));
-- de->ctime_ms = 0;
-+ de->ctime_cs = 0;
- de->ctime = de->time;
- de->cdate = de->date;
- de->adate = de->date;
-@@ -1451,16 +1433,23 @@ write_tables (void)
-
- /* Add a file to the specified directory entry, and also write it into the image */
-
--static void copy_filename(char *filename, char *base, char *ext) {
-+static void copy_filename(char *filename, char *dos_name) {
-
- char *ch = filename;
- int i, len;
-
-- memset(base, 0x20, 8);
-- memset(ext, 0x20, 3);
-+ if (!strcmp(filename, ".")) {
-+ strncpy(dos_name, MSDOS_DOT, MSDOS_NAME);
-+ return;
-+ }
-+ if (!strcmp(filename, "..")) {
-+ strncpy(dos_name, MSDOS_DOTDOT, MSDOS_NAME);
-+ return;
-+ }
-+ memset(dos_name, 0x20, MSDOS_NAME);
-
- for(len = 0 ; *ch && *ch != '.'; ch++) {
-- base[len++] = toupper(*ch);
-+ dos_name[len++] = toupper(*ch);
- if (len == 8) break;
- }
-
-@@ -1468,7 +1457,7 @@ static void copy_filename(char *filename
- if (*ch) ch++;
-
- for(len = 0 ; *ch; ch++) {
-- ext[len++] = toupper(*ch);
-+ dos_name[8 + len++] = toupper(*ch);
- if (len == 3) break;
- }
- }
-@@ -1551,7 +1540,7 @@ static int add_file(char *filename, stru
- int start;
- int usedsec, totalsec;
-
-- char name83[8], ext83[3];
-+ char dos_name[MSDOS_NAME+1];
-
- struct msdos_dir_slot *slot;
- int i;
-@@ -1562,23 +1551,22 @@ static int add_file(char *filename, stru
- if (dir->root) {
- if (dir->count == dir->entries) {
- printf("Error - too many directory entries\n");
-+ return;
- }
- }
- else {
-- if (dir->count == dir->entries) {
-- if (!dir->table)
-- dir->table =
-- (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
-- else {
-- dir->table =
-- (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
-- sizeof(struct msdos_dir_entry));
--
-- memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
-- }
--
-- dir->entries++;
-- }
-+ /* 2 entries, one extra for long filename */
-+ if (!dir->table)
-+ dir->table =
-+ (struct msdos_dir_entry *) malloc(2 * sizeof(struct msdos_dir_entry));
-+ else
-+ dir->table =
-+ (struct msdos_dir_entry *) realloc(dir->table, 2 * (dir->entries + 1) *
-+ sizeof(struct msdos_dir_entry));
-+ if (!dir->table)
-+ printf("Error - realloc failed\n");
-+ memset(&dir->table[dir->entries], 0, 2 * sizeof(struct msdos_dir_entry));
-+ dir->entries += 2;
- }
-
- infile = open(filename, O_RDONLY, 0);
-@@ -1611,13 +1599,13 @@ static int add_file(char *filename, stru
- return -1;
- }
-
-- printf("ADD %s\n", filename);
-+ printf("ADD FILE %s\n", filename);
-
- /* Grab the basename of the file */
- base = basename(filename);
-
-- /* Extract out the 8.3 name */
-- copy_filename(base, name83, ext83);
-+ /* convert for dos fat structure */
-+ copy_filename(base, dos_name);
-
- /* Make an extended name slot */
-
-@@ -1629,12 +1617,9 @@ static int add_file(char *filename, stru
-
- slot->alias_checksum = 0;
-
-- for(i = 0; i < 8; i++)
-- slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + name83[i];
-+ for(i = 0; i < MSDOS_NAME; i++)
-+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + dos_name[i];
-
-- for(i = 0; i < 3; i++)
-- slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + ext83[i];
--
- p = base;
-
- copy_name(slot->name0_4, 10, &p);
-@@ -1645,8 +1630,7 @@ static int add_file(char *filename, stru
- /* Get the entry from the root filesytem */
- entry = &dir->table[dir->count++];
-
-- strncpy(entry->name, name83, 8);
-- strncpy(entry->ext, ext83, 3);
-+ strncpy(entry->name, dos_name, MSDOS_NAME);
-
-
- /* If the user has it read only, then add read only to the incoming
-@@ -1665,7 +1649,7 @@ static int add_file(char *filename, stru
- ((ctime->tm_mon+1) << 5) +
- ((ctime->tm_year-80) << 9)));
-
-- entry->ctime_ms = 0;
-+ entry->ctime_cs = 0;
- entry->ctime = entry->time;
- entry->cdate = entry->date;
- entry->adate = entry->date;
-@@ -1711,6 +1695,7 @@ static int add_file(char *filename, stru
-
- exit_add:
- if (infile) close(infile);
-+ return 0;
- }
-
- /* Add a new directory to the specified directory entry, and in turn populate
-@@ -1727,10 +1712,18 @@ static void add_directory(char *filename
- struct dirent *dentry = 0;
- int remain;
- char *data;
-+ char *base;
-+ char dos_name[MSDOS_NAME+1];
-+ struct msdos_dir_slot *slot;
-+ int i;
-+ char *p;
-
- /* If the directory doesn't exist */
-- if (!rddir) return;
--
-+ if (!rddir) {
-+ printf("Error - dir does not exist: %s\n", filename);
-+ return;
-+ }
-+
- if (dir->root) {
- if (dir->count == dir->entries) {
- printf("Error - too many directory entries\n");
-@@ -1738,28 +1731,58 @@ static void add_directory(char *filename
- }
- }
- else {
-- if (dir->count == dir->entries) {
-- if (!dir->table)
-- dir->table = (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
-- else {
-- dir->table = (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
-- sizeof(struct msdos_dir_entry));
--
-- /* Zero it out to avoid issues */
-- memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
-- }
-- dir->entries++;
-+ /* 2 entries, one extra for long name of the directory */
-+ if (!dir->table)
-+ dir->table = (struct msdos_dir_entry *) malloc(2 * sizeof(struct msdos_dir_entry));
-+ else
-+ dir->table = (struct msdos_dir_entry *) realloc(dir->table, 2 * (dir->entries + 1) *
-+ sizeof(struct msdos_dir_entry));
-+ if (!dir->table) {
-+ printf("Error - memory allocation failed\n");
-+ goto exit_add_dir;
- }
-+ /* Zero it out to avoid issues */
-+ memset(&dir->table[dir->entries], 0, 2 * sizeof(struct msdos_dir_entry));
-+ dir->entries += 2;
- }
-
-+ printf("ADD DIR %s\n", filename);
- /* Now, create a new directory entry for the new directory */
- newdir = (struct dir_entry *) calloc(1, sizeof(struct dir_entry));
-- if (!newdir) goto exit_add_dir;
-+ if (!newdir) {
-+ printf("Error - calloc failed\n");
-+ goto exit_add_dir;
-+ }
-+
-+ /* Grab the basename of the file */
-+ base = basename(filename);
-+
-+ /* convert for dos structure */
-+ copy_filename(base, dos_name);
-+
-+ /* Make an extended name slot */
-+ slot = (struct msdos_dir_slot *) &dir->table[dir->count++];
-+ slot->id = 'A';
-+ slot->attr = 0x0F;
-+ slot->reserved = 0;
-+ slot->start = 0;
-+
-+ slot->alias_checksum = 0;
-
-+ for (i = 0; i < MSDOS_NAME; i++)
-+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + dos_name[i];
-+
-+ p = base;
-+
-+ copy_name(slot->name0_4, 10, &p);
-+ copy_name(slot->name5_10, 12, &p);
-+ copy_name(slot->name11_12, 4, &p);
-+
-+ /* Get the entry from the root filesytem */
- entry = &dir->table[dir->count++];
-
-- strncpy(entry->name, basename(filename), sizeof(entry->name));
--
-+ strncpy(entry->name, dos_name, MSDOS_NAME);
-+
- entry->attr = ATTR_DIR;
- ctime = localtime(&create_time);
-
-@@ -1770,25 +1793,32 @@ static void add_directory(char *filename
- ((ctime->tm_mon+1) << 5) +
- ((ctime->tm_year-80) << 9)));
-
-- entry->ctime_ms = 0;
-+ entry->ctime_cs = 0;
- entry->ctime = entry->time;
- entry->cdate = entry->date;
- entry->adate = entry->date;
-
- /* Now, read the directory */
-
-- while((dentry = readdir(rddir))) {
-+
-+ while((base[0] != '.') && (dentry = readdir(rddir))) {
- struct stat st;
- char *buffer;
--
-- if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, ".."))
-- continue;
-
-- /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
-- if (dentry->d_name[0] == '.') continue;
-+ if (dentry->d_name[0] == '.') {
-+ /* dos also has . & .. directory entries */
-+ if (! ((!strcmp(dentry->d_name, ".")) || (!strcmp(dentry->d_name, "..")))) {
-+ /* ignore other .* files */
-+ printf("Error - File/Dir name is not dos compatible, ignored: %s\n", dentry->d_name);
-+ continue;
-+ }
-+ }
-
- buffer = malloc(strlen(filename) + strlen(dentry->d_name) + 3);
-- if (!buffer) continue;
-+ if (!buffer) {
-+ printf("Error - malloc failed\n");
-+ goto exit_add_dir;
-+ }
-
- sprintf(buffer, "%s/%s", filename, dentry->d_name);
- if (!stat(buffer, &st)) {
-@@ -1806,11 +1836,23 @@ static void add_directory(char *filename
- /* Now that the entire directory has been written, go ahead and write the directory
- entry as well */
-
-+ entry->size = 0; /* a directory has zero size */
-+
-+ if (base[0] == '.') { /* . & .. point to parent's cluster */
-+ goto exit_add_dir;
-+ }
-+
- entry->start = CT_LE_W(last_cluster_written);
- entry->starthi = CT_LE_W((last_cluster_written & 0xFFFF0000) >> 16);
-- entry->size = newdir->count * sizeof(struct msdos_dir_entry);
-+
-+/* . dir start points to parent */
-+ newdir->table[1].start = entry->start;
-+/* .. dir points to parent of parent*/
-+/* .. dir start is not set yet, would need more changes to the code,
-+ * but dosfsck can fix these .. entry start pointers correctly */
-+
-+ remain = newdir->count * sizeof(struct msdos_dir_entry);
-
-- remain = entry->size;
- data = (char *) newdir->table;
-
- while(remain) {
-@@ -1858,6 +1900,7 @@ static void add_root_directory(char *dir
-
- if (!newdir) {
- closedir(dir);
-+ printf("Error - calloc failed!\n");
- return;
- }
-
-@@ -1877,7 +1920,10 @@ static void add_root_directory(char *dir
- if (entry->d_name[0] == '.') continue;
-
- buffer = malloc(strlen(dirname) + strlen(entry->d_name) + 3);
-- if (!buffer) continue;
-+ if (!buffer) {
-+ printf("Error - malloc failed!\n");
-+ continue;
-+ }
-
- sprintf(buffer, "%s/%s", dirname, entry->d_name);
- if (!stat(buffer, &st)) {
-@@ -2245,6 +2291,9 @@ main (int argc, char **argv)
- if (check && listfile) /* Auto and specified bad block handling are mutually */
- die ("-c and -l are incompatible"); /* exclusive of each other! */
-
-+ if (dirname && (size_fat == 32))
-+ die ("-d is incompatible with FAT32");
-+
- if (!create) {
- check_mount (device_name); /* Is the device already mounted? */
- dev = open (device_name, O_RDWR); /* Is it a suitable device to build the FS on? */
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch b/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch
deleted file mode 100644
index ab5c8cf8c3..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-mkdsofs is using types of the style __u8, which it gets with some
-versions of libc headers via linux/hdreg.h including asm/types.h.
-Newer version of fedora (at least) have a hdreg.h whichdoes not
-include asm/types.h. To work around this patch mkdosfs.c to explicity
-include linux/types.h which will in turn pull in asm/types.h which
-defines these variables.
-
-Upstream-Status: Inappropriate [licensing]
-We're tracking an old release of dosfstools due to licensing issues.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- dosfstools-2.10/mkdosfs/mkdosfs.c~ 2006-07-12 18:46:21.000000000 +1000
-+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2006-07-12 18:46:21.000000000 +1000
-@@ -60,6 +60,7 @@
- #include "../version.h"
-
- #include <fcntl.h>
-+#include <linux/types.h>
- #include <linux/hdreg.h>
- #include <linux/fs.h>
- #include <linux/fd.h>
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch
deleted file mode 100644
index ae21bee78e..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-Add option to read in bootcode from a file.
-
-Upstream-Status: Inappropriate [licensing]
-We're tracking an old release of dosfstools due to licensing issues.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: dosfstools-2.11/mkdosfs/ChangeLog
-===================================================================
---- dosfstools-2.11.orig/mkdosfs/ChangeLog 1997-06-18 10:09:38.000000000 +0000
-+++ dosfstools-2.11/mkdosfs/ChangeLog 2011-12-06 12:14:23.634011558 +0000
-@@ -1,3 +1,14 @@
-+19th June 2003 Sam Bingner (sam@bingner.com)
-+
-+ Added option to read in bootcode from a file so that if you have
-+ for example Windows 2000 boot code, you can have it write that
-+ as the bootcode. This is a dump of the behinning of a partition
-+ generally 512 bytes, but can be up to reserved sectors*512 bytes.
-+ Also writes 0x80 as the BIOS drive number if we are formatting a
-+ hard drive, and sets the number of hidden sectors to be the
-+ number of sectors in one track. These were required so that DOS
-+ could boot using the bootcode.
-+
- 28th January 1995 H. Peter Anvin (hpa@yggdrasil.com)
-
- Better algorithm to select cluster sizes on large filesystems.
-Index: dosfstools-2.11/mkdosfs/mkdosfs.8
-===================================================================
---- dosfstools-2.11.orig/mkdosfs/mkdosfs.8 2004-02-25 19:36:07.000000000 +0000
-+++ dosfstools-2.11/mkdosfs/mkdosfs.8 2011-12-06 12:19:54.777888434 +0000
-@@ -44,6 +44,10 @@
- .I message-file
- ]
- [
-+.B \-B
-+.I bootcode-file
-+]
-+[
- .B \-n
- .I volume-name
- ]
-@@ -165,6 +169,18 @@
- carriage return-line feed combinations, and tabs have been expanded.
- If the filename is a hyphen (-), the text is taken from standard input.
- .TP
-+.BI \-B " bootcode-file"
-+Uses boot machine code from file "file". On any thing other than FAT32,
-+this only writes the first 3 bytes, and 480 bytes from offset 3Eh. On
-+FAT32, this writes the first 3 bytes, 420 bytes from offset 5Ah to both
-+primary and backup boot sectors. Also writes all other reserved sectors
-+excluding the sectors following boot sectors (usually sector 2 and 7).
-+Does not require that the input file be as large as reserved_sectors*512.
-+To make a FAT32 partition bootable, you will need at least the first
-+13 sectors (6656 bytes). You can also specify a partition as the argument
-+to clone the boot code from that partition.
-+i.e mkdosfs -B /dev/sda1 /dev/sda1
-+.TP
- .BI \-n " volume-name"
- Sets the volume name (label) of the filesystem. The volume name can
- be up to 11 characters long. The default is no label.
-@@ -198,8 +214,9 @@
- simply will not support it ;)
- .SH AUTHOR
- Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin
--<hpa@yggdrasil.com>. Fixes and additions by Roman Hodek
--<roman@hodek.net> for Debian/GNU Linux.
-+<hpa@yggdrasil.com> and Sam Bingner <sam@bingner.com>. Fixes and
-+additions by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
-+for Debian/GNU Linux.
- .SH ACKNOWLEDGEMENTS
- .B mkdosfs
- is based on code from
-Index: dosfstools-2.11/mkdosfs/mkdosfs.c
-===================================================================
---- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2005-03-12 16:12:16.000000000 +0000
-+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-06 12:27:55.121886076 +0000
-@@ -24,6 +24,12 @@
- - New options -A, -S, -C
- - Support for filesystems > 2GB
- - FAT32 support
-+
-+ Fixes/additions June 2003 by Sam Bingner
-+ <sam@bingner.com>:
-+ - Add -B option to read in bootcode from a file
-+ - Write BIOS drive number so that FS can properly boot
-+ - Set number of hidden sectors before boot code to be one track
-
- Copying: Copyright 1993, 1994 David Hudson (dave@humbug.demon.co.uk)
-
-@@ -153,6 +159,8 @@
- #define FAT_BAD 0x0ffffff7
-
- #define MSDOS_EXT_SIGN 0x29 /* extended boot sector signature */
-+#define HD_DRIVE_NUMBER 0x80 /* Boot off first hard drive */
-+#define FD_DRIVE_NUMBER 0x00 /* Boot off first floppy drive */
- #define MSDOS_FAT12_SIGN "FAT12 " /* FAT12 filesystem signature */
- #define MSDOS_FAT16_SIGN "FAT16 " /* FAT16 filesystem signature */
- #define MSDOS_FAT32_SIGN "FAT32 " /* FAT32 filesystem signature */
-@@ -175,6 +183,8 @@
- #define BOOTCODE_SIZE 448
- #define BOOTCODE_FAT32_SIZE 420
-
-+#define MAX_RESERVED 0xFFFF
-+
- /* __attribute__ ((packed)) is used on all structures to make gcc ignore any
- * alignments */
-
-@@ -202,7 +212,7 @@
- __u16 fat_length; /* sectors/FAT */
- __u16 secs_track; /* sectors per track */
- __u16 heads; /* number of heads */
-- __u32 hidden; /* hidden sectors (unused) */
-+ __u32 hidden; /* hidden sectors (one track) */
- __u32 total_sect; /* number of sectors (if sectors == 0) */
- union {
- struct {
-@@ -285,6 +295,8 @@
-
- /* Global variables - the root of all evil :-) - see these and weep! */
-
-+static char *template_boot_code; /* Variable to store a full template boot sector in */
-+static int use_template = 0;
- static char *program_name = "mkdosfs"; /* Name of the program */
- static char *device_name = NULL; /* Name of the device on which to create the filesystem */
- static int atari_format = 0; /* Use Atari variation of MS-DOS FS format */
-@@ -837,6 +849,12 @@
- vi->volume_id[2] = (unsigned char) ((volume_id & 0x00ff0000) >> 16);
- vi->volume_id[3] = (unsigned char) (volume_id >> 24);
- }
-+ if (bs.media == 0xf8) {
-+ vi->drive_number = HD_DRIVE_NUMBER; /* Set bios drive number to 80h */
-+ }
-+ else {
-+ vi->drive_number = FD_DRIVE_NUMBER; /* Set bios drive number to 00h */
-+ }
-
- if (!atari_format) {
- memcpy(vi->volume_label, volume_name, 11);
-@@ -1362,6 +1380,32 @@
- * dir area on FAT12/16, and the first cluster on FAT32. */
- writebuf( (char *) root_dir, size_root_dir, "root directory" );
-
-+ if (use_template == 1) {
-+ /* dupe template into reserved sectors */
-+ seekto( 0, "Start of partition" );
-+ if (size_fat == 32) {
-+ writebuf( template_boot_code, 3, "backup jmpBoot" );
-+ seekto( 0x5a, "sector 1 boot area" );
-+ writebuf( template_boot_code+0x5a, 420, "sector 1 boot area" );
-+ seekto( 512*2, "third sector" );
-+ if (backup_boot != 0) {
-+ writebuf( template_boot_code+512*2, backup_boot*sector_size - 512*2, "data to backup boot" );
-+ seekto( backup_boot*sector_size, "backup boot sector" );
-+ writebuf( template_boot_code, 3, "backup jmpBoot" );
-+ seekto( backup_boot*sector_size+0x5a, "backup boot sector boot area" );
-+ writebuf( template_boot_code+0x5a, 420, "backup boot sector boot area" );
-+ seekto( (backup_boot+2)*sector_size, "sector following backup code" );
-+ writebuf( template_boot_code+(backup_boot+2)*sector_size, (reserved_sectors-backup_boot-2)*512, "remaining data" );
-+ } else {
-+ writebuf( template_boot_code+512*2, (reserved_sectors-2)*512, "remaining data" );
-+ }
-+ } else {
-+ writebuf( template_boot_code, 3, "jmpBoot" );
-+ seekto( 0x3e, "sector 1 boot area" );
-+ writebuf( template_boot_code+0x3e, 448, "boot code" );
-+ }
-+ }
-+
- if (blank_sector) free( blank_sector );
- if (info_sector) free( info_sector );
- free (root_dir); /* Free up the root directory space from setup_tables */
-@@ -1376,7 +1420,7 @@
- {
- fatal_error("\
- Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]\n\
-- [-m boot-msg-file] [-n volume-name] [-i volume-id]\n\
-+ [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
- [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
- [-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
- /dev/name [blocks]\n");
-@@ -1439,7 +1483,7 @@
- printf ("%s " VERSION " (" VERSION_DATE ")\n",
- program_name);
-
-- while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:h:v")) != EOF)
-+ while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
- /* Scan the command line for options */
- switch (c)
- {
-@@ -1509,6 +1553,51 @@
- listfile = optarg;
- break;
-
-+ case 'B': /* B : read in bootcode */
-+ if ( strcmp(optarg, "-") )
-+ {
-+ msgfile = fopen(optarg, "r");
-+ if ( !msgfile )
-+ perror(optarg);
-+ }
-+ else
-+ msgfile = stdin;
-+
-+ if ( msgfile )
-+ {
-+ if (!(template_boot_code = malloc( MAX_RESERVED )))
-+ die( "Out of memory" );
-+ /* The template boot sector including reserved must not be > 65535 */
-+ use_template = 1;
-+ i = 0;
-+ do
-+ {
-+ ch = getc(msgfile);
-+ switch (ch)
-+ {
-+ case EOF:
-+ break;
-+
-+ default:
-+ template_boot_code[i++] = ch; /* Store character */
-+ break;
-+ }
-+ }
-+ while ( ch != EOF && i < MAX_RESERVED );
-+ ch = getc(msgfile); /* find out if we're at EOF */
-+
-+ /* Fill up with zeros */
-+ while( i < MAX_RESERVED )
-+ template_boot_code[i++] = '\0';
-+
-+ if ( ch != EOF )
-+ printf ("Warning: template too long; truncated after %d bytes\n", i);
-+
-+ if ( msgfile != stdin )
-+ fclose(msgfile);
-+ }
-+ break;
-+
- case 'm': /* m : Set boot message */
- if ( strcmp(optarg, "-") )
- {
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch
deleted file mode 100644
index 3ba4711d12..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch
+++ /dev/null
@@ -1,639 +0,0 @@
-Add -d <directory> support to populate the image.
-
-Upstream-Status: Inappropriate [licensing]
-We're tracking an old release of dosfstools due to licensing issues.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: dosfstools-2.11/mkdosfs/mkdosfs.c
-===================================================================
---- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2011-12-06 12:27:55.000000000 +0000
-+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-06 12:37:13.445950703 +0000
-@@ -18,6 +18,10 @@
- as a rule), and not the block. For example the boot block does not
- occupy a full cluster.
-
-+ June 2004 - Jordan Crouse (info.linux@amd.com)
-+ Added -d <directory> support to populate the image
-+ Copyright (C) 2004, Advanced Micro Devices, All Rights Reserved
-+
- Fixes/additions May 1998 by Roman Hodek
- <Roman.Hodek@informatik.uni-erlangen.de>:
- - Atari format support
-@@ -71,6 +75,8 @@
- #include <unistd.h>
- #include <time.h>
- #include <errno.h>
-+#include <libgen.h>
-+#include <dirent.h>
-
- #include <linux/version.h>
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
-@@ -110,6 +116,8 @@
- * sufficient (or even better :) for 64 bit offsets in the meantime */
- #define llseek lseek
-
-+#define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
-+
- /* Constant definitions */
-
- #define TRUE 1 /* Boolean constants */
-@@ -149,7 +157,6 @@
- #define ATTR_VOLUME 8 /* volume label */
- #define ATTR_DIR 16 /* directory */
- #define ATTR_ARCH 32 /* archived */
--
- #define ATTR_NONE 0 /* no attribute bits */
- #define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
- /* attribute bits that are copied "as is" */
-@@ -245,6 +252,19 @@
- __u32 reserved2[4];
- };
-
-+/* This stores up to 13 chars of the name */
-+
-+struct msdos_dir_slot {
-+ __u8 id; /* sequence number for slot */
-+ __u8 name0_4[10]; /* first 5 characters in name */
-+ __u8 attr; /* attribute byte */
-+ __u8 reserved; /* always 0 */
-+ __u8 alias_checksum; /* checksum for 8.3 alias */
-+ __u8 name5_10[12]; /* 6 more characters in name */
-+ __u16 start; /* starting cluster number, 0 in long slots */
-+ __u8 name11_12[4]; /* last 2 characters in name */
-+};
-+
- struct msdos_dir_entry
- {
- char name[8], ext[3]; /* name and extension */
-@@ -293,6 +313,15 @@
-
- #define MESSAGE_OFFSET 29 /* Offset of message in above code */
-
-+/* Special structure to keep track of directories as we add them for the -d option */
-+
-+struct dir_entry {
-+ int root; /* Specifies if this is the root dir or not */
-+ int count; /* Number of items in the table */
-+ int entries; /* Number of entries in the table */
-+ struct msdos_dir_entry *table; /* Pointer to the entry table */
-+};
-+
- /* Global variables - the root of all evil :-) - see these and weep! */
-
- static char *template_boot_code; /* Variable to store a full template boot sector in */
-@@ -326,6 +355,9 @@
- static int size_root_dir; /* Size of the root directory in bytes */
- static int sectors_per_cluster = 0; /* Number of sectors per disk cluster */
- static int root_dir_entries = 0; /* Number of root directory entries */
-+static int root_dir_num_entries = 0;
-+static int last_cluster_written = 0;
-+
- static char *blank_sector; /* Blank sector - all zeros */
- static int hidden_sectors = 0; /* Number of hidden sectors */
-
-@@ -399,7 +431,6 @@
- }
- }
-
--
- /* Mark a specified sector as having a particular value in it's FAT entry */
-
- static void
-@@ -1266,6 +1297,9 @@
- die ("unable to allocate space for root directory in memory");
- }
-
-+
-+ last_cluster_written = 2;
-+
- memset(root_dir, 0, size_root_dir);
- if ( memcmp(volume_name, " ", 11) )
- {
-@@ -1314,11 +1348,11 @@
- }
-
- if (!(blank_sector = malloc( sector_size )))
-- die( "Out of memory" );
-+ die( "Out of memory" );
-+
- memset(blank_sector, 0, sector_size);
- }
--
--
-+
- /* Write the new filesystem's data tables to wherever they're going to end up! */
-
- #define error(str) \
-@@ -1340,7 +1374,7 @@
- do { \
- int __size = (size); \
- if (write (dev, buf, __size) != __size) \
-- error ("failed whilst writing " errstr); \
-+ error ("failed whilst writing " errstr); \
- } while(0)
-
-
-@@ -1412,6 +1446,452 @@
- free (fat); /* Free up the fat table space reserved during setup_tables */
- }
-
-+/* Add a file to the specified directory entry, and also write it into the image */
-+
-+static void copy_filename(char *filename, char *base, char *ext) {
-+
-+ char *ch = filename;
-+ int i, len;
-+
-+ memset(base, 0x20, 8);
-+ memset(ext, 0x20, 3);
-+
-+ for(len = 0 ; *ch && *ch != '.'; ch++) {
-+ base[len++] = toupper(*ch);
-+ if (len == 8) break;
-+ }
-+
-+ for ( ; *ch && *ch != '.'; ch++);
-+ if (*ch) ch++;
-+
-+ for(len = 0 ; *ch; ch++) {
-+ ext[len++] = toupper(*ch);
-+ if (len == 3) break;
-+ }
-+}
-+
-+/* Check for an .attrib.<filename> file, and read the attributes therein */
-+
-+/* We are going to be pretty pedantic about this. The file needs 3
-+ bytes at the beginning, the attributes are listed in this order:
-+
-+ (H)idden|(S)ystem|(A)rchived
-+
-+ A capital HSA means to enable it, anything else will disable it
-+ (I recommend a '-') The unix user attributes will still be used
-+ for write access.
-+
-+ For example, to enable system file access for ldlinux.sys, write
-+ the following to .attrib.ldlinux.sys: -S-
-+*/
-+
-+unsigned char check_attrib_file(char *dir, char *filename) {
-+
-+ char attrib[4] = { '-', '-', '-' };
-+ unsigned char *buffer = 0;
-+ int ret = ATTR_NONE;
-+ int fd = -1;
-+
-+ buffer = (char *) calloc(1, strlen(dir) + strlen(filename) + 10);
-+ if (!buffer) return ATTR_NONE;
-+
-+ sprintf(buffer, "%s/.attrib.%s", dir, filename);
-+
-+ if (access(buffer, R_OK))
-+ goto exit_attrib;
-+
-+ if ((fd = open(buffer, O_RDONLY, 0)) < 0)
-+ goto exit_attrib;
-+
-+ if (read(fd, attrib, 3) < 0)
-+ goto exit_attrib;
-+
-+ if (attrib[0] == 'H') ret |= ATTR_HIDDEN;
-+ if (attrib[1] == 'S') ret |= ATTR_SYS;
-+ if (attrib[2] == 'A') ret |= ATTR_ARCH;
-+
-+ printf("%s: Setting atrribute %x\n", filename, ret);
-+
-+ exit_attrib:
-+ if (fd >= 0) close(fd);
-+ if (buffer) free(buffer);
-+
-+ return ret;
-+}
-+
-+static void copy_name(char *buffer, int size, char **pointer) {
-+ int i;
-+
-+ for(i = 0; i < size; i += 2) {
-+ if (*pointer) {
-+ buffer[i] = **pointer;
-+ buffer[i + 1] = 0x00;
-+ *pointer = **pointer ? *pointer + 1 : 0;
-+ }
-+ else {
-+ buffer[i] = 0xFF;
-+ buffer[i + 1] = 0xFF;
-+ }
-+ }
-+}
-+
-+static int add_file(char *filename, struct dir_entry *dir, unsigned char attr)
-+{
-+ struct stat stat;
-+ struct msdos_dir_entry *entry;
-+ int infile = 0;
-+ int sectors, clusters;
-+ struct tm *ctime;
-+ int c, s;
-+ int ptr;
-+ char *buffer, *base;
-+ int start;
-+ int usedsec, totalsec;
-+
-+ char name83[8], ext83[3];
-+
-+ struct msdos_dir_slot *slot;
-+ int i;
-+ char *p;
-+
-+ /* The root directory is static, everything else grows as needed */
-+
-+ if (dir->root) {
-+ if (dir->count == dir->entries) {
-+ printf("Error - too many directory entries\n");
-+ }
-+ }
-+ else {
-+ if (dir->count == dir->entries) {
-+ if (!dir->table)
-+ dir->table =
-+ (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
-+ else {
-+ dir->table =
-+ (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
-+ sizeof(struct msdos_dir_entry));
-+
-+ memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
-+ }
-+
-+ dir->entries++;
-+ }
-+ }
-+
-+ infile = open(filename, O_RDONLY, 0);
-+ if (!infile) return;
-+
-+ if (fstat(infile, &stat))
-+ goto exit_add;
-+
-+ if (S_ISCHR(stat.st_mode) ||S_ISBLK(stat.st_mode) ||
-+ S_ISFIFO(stat.st_mode) || S_ISLNK(stat.st_mode)) {
-+ printf("Error - cannot create a special file in a FATFS\n");
-+ goto exit_add;
-+ }
-+
-+ /* FIXME: This isn't very pretty */
-+
-+ usedsec = start_data_sector + (size_root_dir / sector_size) +
-+ (last_cluster_written * bs.cluster_size);
-+
-+ totalsec = blocks * BLOCK_SIZE / sector_size;
-+
-+ /* Figure out how many sectors / clustors the file requires */
-+
-+ sectors = ROUND_UP(stat.st_size, sector_size);
-+ clusters = ROUND_UP(sectors, (int) bs.cluster_size);
-+
-+ if (usedsec + sectors > totalsec) {
-+ printf("Error - %s is too big (%d vs %d)\n", filename, sectors, totalsec - usedsec);
-+ close(infile);
-+ return -1;
-+ }
-+
-+ printf("ADD %s\n", filename);
-+
-+ /* Grab the basename of the file */
-+ base = basename(filename);
-+
-+ /* Extract out the 8.3 name */
-+ copy_filename(base, name83, ext83);
-+
-+ /* Make an extended name slot */
-+
-+ slot = (struct msdos_dir_slot *) &dir->table[dir->count++];
-+ slot->id = 'A';
-+ slot->attr = 0x0F;
-+ slot->reserved = 0;
-+ slot->start = 0;
-+
-+ slot->alias_checksum = 0;
-+
-+ for(i = 0; i < 8; i++)
-+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + name83[i];
-+
-+ for(i = 0; i < 3; i++)
-+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + ext83[i];
-+
-+ p = base;
-+
-+ copy_name(slot->name0_4, 10, &p);
-+ copy_name(slot->name5_10, 12, &p);
-+ copy_name(slot->name11_12, 4, &p);
-+
-+
-+ /* Get the entry from the root filesytem */
-+ entry = &dir->table[dir->count++];
-+
-+ strncpy(entry->name, name83, 8);
-+ strncpy(entry->ext, ext83, 3);
-+
-+
-+ /* If the user has it read only, then add read only to the incoming
-+ attribute settings */
-+
-+ if (!(stat.st_mode & S_IWUSR)) attr |= ATTR_RO;
-+ entry->attr = attr;
-+
-+ /* Set the access time on the file */
-+ ctime = localtime(&create_time);
-+
-+ entry->time = CT_LE_W((unsigned short)((ctime->tm_sec >> 1) +
-+ (ctime->tm_min << 5) + (ctime->tm_hour << 11)));
-+
-+ entry->date = CT_LE_W((unsigned short)(ctime->tm_mday +
-+ ((ctime->tm_mon+1) << 5) +
-+ ((ctime->tm_year-80) << 9)));
-+
-+ entry->ctime_ms = 0;
-+ entry->ctime = entry->time;
-+ entry->cdate = entry->date;
-+ entry->adate = entry->date;
-+ entry->size = stat.st_size;
-+
-+ start = last_cluster_written;
-+
-+ entry->start = CT_LE_W(start); /* start sector */
-+ entry->starthi = CT_LE_W((start & 0xFFFF0000) >> 16); /* High start sector (for FAT32) */
-+
-+ /* We mark all of the clusters we use in the FAT */
-+
-+ for(c = 0; c < clusters; c++ ) {
-+ int free;
-+ int next = c == (clusters - 1) ? FAT_EOF : start + c + 1;
-+ mark_FAT_cluster(start + c, next);
-+ last_cluster_written++;
-+ }
-+
-+ /* This confused me too - cluster 2 starts after the
-+ root directory data - search me as to why */
-+
-+ ptr = (start_data_sector * sector_size) + size_root_dir;
-+ ptr += (start - 2) * bs.cluster_size * sector_size;
-+
-+ buffer = (char *) malloc(sector_size);
-+
-+ if (!buffer) {
-+ printf("Error - couldn't allocate memory\n");
-+ goto exit_add;
-+ }
-+
-+ /* Write the file into the file block */
-+
-+ seekto(ptr, "datafile");
-+
-+ while(1) {
-+ int size = read(infile, buffer, sector_size);
-+ if (size <= 0) break;
-+
-+ writebuf(buffer, size, "data");
-+ }
-+
-+ exit_add:
-+ if (infile) close(infile);
-+}
-+
-+/* Add a new directory to the specified directory entry, and in turn populate
-+ it with its own files */
-+
-+/* FIXME: This should check to make sure there is enough size to add itself */
-+
-+static void add_directory(char *filename, struct dir_entry *dir) {
-+
-+ struct dir_entry *newdir = 0;
-+ struct msdos_dir_entry *entry;
-+ struct tm *ctime;
-+ DIR *rddir = opendir(filename);
-+ struct dirent *dentry = 0;
-+ int remain;
-+ char *data;
-+
-+ /* If the directory doesn't exist */
-+ if (!rddir) return;
-+
-+ if (dir->root) {
-+ if (dir->count == dir->entries) {
-+ printf("Error - too many directory entries\n");
-+ goto exit_add_dir;
-+ }
-+ }
-+ else {
-+ if (dir->count == dir->entries) {
-+ if (!dir->table)
-+ dir->table = (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
-+ else {
-+ dir->table = (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
-+ sizeof(struct msdos_dir_entry));
-+
-+ /* Zero it out to avoid issues */
-+ memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
-+ }
-+ dir->entries++;
-+ }
-+ }
-+
-+ /* Now, create a new directory entry for the new directory */
-+ newdir = (struct dir_entry *) calloc(1, sizeof(struct dir_entry));
-+ if (!newdir) goto exit_add_dir;
-+
-+ entry = &dir->table[dir->count++];
-+
-+ strncpy(entry->name, basename(filename), sizeof(entry->name));
-+
-+ entry->attr = ATTR_DIR;
-+ ctime = localtime(&create_time);
-+
-+ entry->time = CT_LE_W((unsigned short)((ctime->tm_sec >> 1) +
-+ (ctime->tm_min << 5) + (ctime->tm_hour << 11)));
-+
-+ entry->date = CT_LE_W((unsigned short)(ctime->tm_mday +
-+ ((ctime->tm_mon+1) << 5) +
-+ ((ctime->tm_year-80) << 9)));
-+
-+ entry->ctime_ms = 0;
-+ entry->ctime = entry->time;
-+ entry->cdate = entry->date;
-+ entry->adate = entry->date;
-+
-+ /* Now, read the directory */
-+
-+ while((dentry = readdir(rddir))) {
-+ struct stat st;
-+ char *buffer;
-+
-+ if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, ".."))
-+ continue;
-+
-+ /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
-+ if (dentry->d_name[0] == '.') continue;
-+
-+ buffer = malloc(strlen(filename) + strlen(dentry->d_name) + 3);
-+ if (!buffer) continue;
-+
-+ sprintf(buffer, "%s/%s", filename, dentry->d_name);
-+ if (!stat(buffer, &st)) {
-+ if (S_ISDIR(st.st_mode))
-+ add_directory(buffer, newdir);
-+ else if (S_ISREG(st.st_mode)) {
-+ unsigned char attrib = check_attrib_file(filename, dentry->d_name);
-+ add_file(buffer, newdir, attrib);
-+ }
-+ }
-+
-+ free(buffer);
-+ }
-+
-+ /* Now that the entire directory has been written, go ahead and write the directory
-+ entry as well */
-+
-+ entry->start = CT_LE_W(last_cluster_written);
-+ entry->starthi = CT_LE_W((last_cluster_written & 0xFFFF0000) >> 16);
-+ entry->size = newdir->count * sizeof(struct msdos_dir_entry);
-+
-+ remain = entry->size;
-+ data = (char *) newdir->table;
-+
-+ while(remain) {
-+ int size =
-+ remain > bs.cluster_size * sector_size ? bs.cluster_size * sector_size : remain;
-+
-+ int pos = (start_data_sector * sector_size) + size_root_dir;
-+ pos += (last_cluster_written - 2) * bs.cluster_size * sector_size;
-+
-+ seekto(pos, "add_dir");
-+ writebuf(data, size, "add_dir");
-+
-+ remain -= size;
-+ data += size;
-+
-+ mark_FAT_cluster(last_cluster_written, remain ? last_cluster_written + 1 : FAT_EOF);
-+ last_cluster_written++;
-+ }
-+
-+ exit_add_dir:
-+ if (rddir) closedir(rddir);
-+ if (newdir->table) free(newdir->table);
-+ if (newdir) free(newdir);
-+}
-+
-+/* Given a directory, add all the files and directories to the root directory of the
-+ image.
-+*/
-+
-+static void add_root_directory(char *dirname)
-+{
-+ DIR *dir = opendir(dirname);
-+ struct dirent *entry = 0;
-+ struct dir_entry *newdir = 0;
-+
-+ if (!dir) {
-+ printf("Error - directory %s does not exist\n", dirname);
-+ return;
-+ }
-+
-+ /* Create the root directory structure - this is a bit different then
-+ above, because the table already exists, we just refer to it. */
-+
-+ newdir = (struct dir_entry *) calloc(1,sizeof(struct dir_entry));
-+
-+ if (!newdir) {
-+ closedir(dir);
-+ return;
-+ }
-+
-+ newdir->entries = root_dir_entries;
-+ newdir->root = 1;
-+ newdir->count = 0;
-+ newdir->table = root_dir;
-+
-+ while((entry = readdir(dir))) {
-+ struct stat st;
-+ char *buffer;
-+
-+ if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
-+ continue;
-+
-+ /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
-+ if (entry->d_name[0] == '.') continue;
-+
-+ buffer = malloc(strlen(dirname) + strlen(entry->d_name) + 3);
-+ if (!buffer) continue;
-+
-+ sprintf(buffer, "%s/%s", dirname, entry->d_name);
-+ if (!stat(buffer, &st)) {
-+ if (S_ISDIR(st.st_mode))
-+ add_directory(buffer, newdir);
-+ else if (S_ISREG(st.st_mode)) {
-+ unsigned char attrib = check_attrib_file(dirname, entry->d_name);
-+ add_file(buffer, newdir, attrib);
-+ }
-+ }
-+
-+ free(buffer);
-+ }
-+
-+ closedir(dir);
-+ if (newdir) free(newdir);
-+}
-
- /* Report the command usage and return a failure error code */
-
-@@ -1423,7 +1903,7 @@
- [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
- [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
- [-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
-- /dev/name [blocks]\n");
-+ [-d directory] /dev/name [blocks]\n");
- }
-
- /*
-@@ -1463,6 +1943,8 @@
- int c;
- char *tmp;
- char *listfile = NULL;
-+ char *dirname = NULL;
-+
- FILE *msgfile;
- struct stat statbuf;
- int i = 0, pos, ch;
-@@ -1483,7 +1965,7 @@
- printf ("%s " VERSION " (" VERSION_DATE ")\n",
- program_name);
-
-- while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
-+ while ((c = getopt (argc, argv, "AbcCd:f:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
- /* Scan the command line for options */
- switch (c)
- {
-@@ -1508,6 +1990,10 @@
- create = TRUE;
- break;
-
-+ case 'd':
-+ dirname = optarg;
-+ break;
-+
- case 'f': /* f : Choose number of FATs */
- nr_fats = (int) strtol (optarg, &tmp, 0);
- if (*tmp || nr_fats < 1 || nr_fats > 4)
-@@ -1811,8 +2297,10 @@
- else if (listfile)
- get_list_blocks (listfile);
-
-- write_tables (); /* Write the file system tables away! */
-
-+ if (dirname) add_root_directory(dirname);
-+
-+ write_tables (); /* Write the file system tables away! */
- exit (0); /* Terminate with no errors! */
- }
-
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch b/meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch
deleted file mode 100644
index 11e8a7594b..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Fix a compilation error due to undefined MSDOS_FAT12.
-
-Upstream-Status: Inappropriate [licensing]
-We're tracking an old release of dosfstools due to licensing issues.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- dosfstools-2.10/dosfsck/boot.c.orig 2004-10-15 08:51:42.394725176 -0600
-+++ dosfstools-2.10/dosfsck/boot.c 2004-10-15 08:49:16.776862456 -0600
-@@ -14,6 +14,9 @@
- #include "io.h"
- #include "boot.h"
-
-+#ifndef MSDOS_FAT12
-+#define MSDOS_FAT12 4084
-+#endif
-
- #define ROUND_TO_MULTIPLE(n,m) ((n) && (m) ? (n)+(m)-1-((n)-1)%(m) : 0)
- /* don't divide by zero */
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/nofat32_autoselect.patch b/meta/recipes-devtools/dosfstools/dosfstools/nofat32_autoselect.patch
deleted file mode 100644
index 848a76b990..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/nofat32_autoselect.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-FAT32 appears to be broken when used with the -d option to populate the msdos
-image. This disables the FAT32 autoselection code which means we don't get
-broken images with the -d option. It can still be enabled on the commandline
-at the users own risk. This changes us back to the 2.10 version's behaviour
-which was known to work well even with large images.
-
-Upstream-Status: Inappropriate [depends on other patches we apply]
-
-RP 2011/12/13
-
-Index: dosfstools-2.11/mkdosfs/mkdosfs.c
-===================================================================
---- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2011-12-13 13:54:37.538509391 +0000
-+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-13 13:55:10.258508631 +0000
-@@ -808,10 +808,12 @@
- bs.media = (char) 0xf8; /* Set up the media descriptor for a hard drive */
- bs.dir_entries[0] = (char) 0; /* Default to 512 entries */
- bs.dir_entries[1] = (char) 2;
-+/*
- if (!size_fat && blocks*SECTORS_PER_BLOCK > 1064960) {
- if (verbose) printf("Auto-selecting FAT32 for large filesystem\n");
- size_fat = 32;
- }
-+*/
- if (size_fat == 32) {
- /* For FAT32, try to do the same as M$'s format command:
- * fs size < 256M: 0.5k clusters
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
deleted file mode 100644
index 176504d4f3..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-# dosfstools OE build file
-# 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 = "https://github.com/dosfstools/dosfstools"
-
-SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://mkdosfs/COPYING;md5=cbe67f08d6883bff587f615f0cc81aa8"
-PR = "r5"
-
-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 \
- file://msdos_fat12_undefined.patch \
- file://dosfstools-msdos_fs-types.patch \
- file://include-linux-types.patch \
- file://nofat32_autoselect.patch \
- file://fix_populated_dosfs_creation.patch \
- file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \
-"
-
-SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6"
-SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c98a484"
-
-CFLAGS += "-D_GNU_SOURCE ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', '', d)}"
-
-EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
-
-do_install () {
- oe_runmake "PREFIX=${D}" "SBINDIR=${D}${base_sbindir}" \
- "MANDIR=${D}${mandir}/man8" install
-}
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_4.0.bb b/meta/recipes-devtools/dosfstools/dosfstools_4.0.bb
deleted file mode 100644
index e7b1f61096..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools_4.0.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-# dosfstools OE build file
-# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
-# Copyright (C) 2015, Sören Brinkmann <soeren.brinkmann@gmail> All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-SUMMARY = "DOS FAT Filesystem Utilities"
-HOMEPAGE = "https://github.com/dosfstools/dosfstools"
-
-SECTION = "base"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "https://github.com/dosfstools/dosfstools/releases/download/v${PV}/${BP}.tar.xz \
- "
-SRC_URI[md5sum] = "20f8388b99702f276c973d228c7cff45"
-SRC_URI[sha256sum] = "9037738953559d1efe04fc5408b6846216cc0138f7f9d32de80b6ec3c35e7daf"
-
-UPSTREAM_CHECK_URI = "https://github.com/dosfstools/dosfstools/releases"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--without-udev --enable-compat-symlinks"
-
-CFLAGS += "-D_GNU_SOURCE ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', '', d)}"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_4.1.bb b/meta/recipes-devtools/dosfstools/dosfstools_4.1.bb
new file mode 100644
index 0000000000..23b8836670
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools_4.1.bb
@@ -0,0 +1,28 @@
+# dosfstools OE build file
+# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Copyright (C) 2015, Sören Brinkmann <soeren.brinkmann@gmail> All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+SUMMARY = "DOS FAT Filesystem Utilities"
+HOMEPAGE = "https://github.com/dosfstools/dosfstools"
+
+SECTION = "base"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "https://github.com/dosfstools/dosfstools/releases/download/v${PV}/${BP}.tar.xz \
+ "
+SRC_URI[md5sum] = "07a1050db1a898e9a2e03b0c4569c4bd"
+SRC_URI[sha256sum] = "e6b2aca70ccc3fe3687365009dd94a2e18e82b688ed4e260e04b7412471cc173"
+
+UPSTREAM_CHECK_URI = "https://github.com/dosfstools/dosfstools/releases"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--without-udev --enable-compat-symlinks"
+
+CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+BBCLASSEXTEND = "native"
+
+# Add codepage437 to avoid error from `dosfsck -l`
+RRECOMMENDS_${PN}_append_libc-glibc = " glibc-gconv-ibm437"
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index e8d8a9b4f7..1c3c585d79 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -4,42 +4,31 @@ SECTION = "base"
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 perl"
-RDEPENDS_${PN}_class-native = "xz-native"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
+RDEPENDS_${PN}_class-native = ""
UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
-inherit autotools gettext perlnative pkgconfig systemd
+inherit autotools gettext perlnative pkgconfig perl-version update-alternatives
-python () {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- pn = d.getVar('PN', True)
- d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'dpkg-configure.service')
-}
-
-export PERL = "${bindir}/perl"
PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
-export PERL_LIBDIR = "${libdir}/perl"
-PERL_LIBDIR_class-native = "${libdir}/perl-native/perl"
+export PERL_LIBDIR = "${libdir}/perl/${@get_perl_version(d)}"
+PERL_LIBDIR_class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}"
EXTRA_OECONF = "\
--disable-dselect \
--enable-start-stop-daemon \
- --with-zlib \
- --with-bz2 \
- --without-liblzma \
- --without-selinux \
+ --with-libz \
+ --with-libbz2 \
+ --without-libselinux \
+ TAR=tar \
"
-EXTRA_OECONF += "TAR=tar"
-EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}"
+EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
-do_configure () {
- echo >> ${S}/m4/compiler.m4
- sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure
- autotools_do_configure
-}
+PACKAGECONFIG = "liblzma"
+PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
do_install_append () {
if [ "${PN}" = "dpkg-native" ]; then
@@ -49,16 +38,6 @@ do_install_append () {
else
sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
fi
-
- if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system/
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BINDIR@,${bindir},g' \
- -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
- ${D}${systemd_unitdir}/system/dpkg-configure.service
- fi
}
PROV = "virtual/update-alternatives"
@@ -71,14 +50,36 @@ FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}
RPROVIDES_update-alternatives-dpkg += "update-alternatives"
PACKAGES += "${PN}-perl"
-FILES_${PN}-perl = "${libdir}/perl"
+FILES_${PN}-perl = "${libdir}/perl/${@get_perl_version(d)}"
+
+RDEPENDS_${PN}-perl += "perl-module-carp perl-module-constant \
+ perl-module-cwd perl-module-digest \
+ perl-module-digest-md5 perl-module-errno \
+ perl-module-exporter perl-module-fcntl \
+ perl-module-feature perl-module-file-basename \
+ perl-module-file-compare perl-module-file-copy \
+ perl-module-file-find perl-module-file-path \
+ perl-module-file-spec perl-module-file-temp \
+ perl-module-list-util perl-module-overload \
+ perl-module-parent perl-module-storable \
+ perl-module-filehandle perl-module-io \
+ perl-module-io-handle perl-module-io-seekable \
+ perl-module-posix perl-module-scalar-util \
+ perl-module-selectsaver perl-module-symbol \
+ perl-module-term-ansicolor perl-module-tie-handle \
+ perl-module-tie-hash perl-module-storable \
+ perl-module-time-hires perl-module-time-piece \
+ perl-module-xsloader"
# Split out start-stop-daemon to its own package. Note that it
# is installed in a different directory than the one used for
# the bitbake version.
#
PACKAGES =+ "${PN}-start-stop"
-FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon"
+FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon.${BPN}"
+ALTERNATIVE_${PN}-start-stop = "start-stop-daemon"
+ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon"
+ALTERNATIVE_PRIORITY = "100"
RDEPENDS_${PN} += "${PN}-start-stop"
diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch b/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch
new file mode 100644
index 0000000000..50e6894406
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch
@@ -0,0 +1,41 @@
+From a328c8bec0bf8071ae8f20fee4c7475205064ba1 Mon Sep 17 00:00:00 2001
+From: sweeaun <swee.aun.khor@intel.com>
+Date: Sun, 10 Sep 2017 00:14:15 -0700
+Subject: [PATCH] dpkg: Support muslx32 build
+
+Upstream-Status: Pending.
+Changes made on ostable and tupletable to enable muslx32 build.
+
+Signed-off-by: sweeaun <swee.aun.khor@intel.com>
+---
+ data/ostable | 1 +
+ data/tupletable | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/data/ostable b/data/ostable
+index be64342..87db273 100644
+--- a/data/ostable
++++ b/data/ostable
+@@ -19,6 +19,7 @@ base-uclibc-linux linux-uclibc linux[^-]*-uclibc
+ eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf
+ eabi-musl-linux linux-musleabi linux[^-]*-musleabi
+ base-musl-linux linux-musl linux[^-]*-musl
++x32-musl-linux linux-muslx32 linux[^-]*-muslx32
+ eabihf-gnu-linux linux-gnueabihf linux[^-]*-gnueabihf
+ eabi-gnu-linux linux-gnueabi linux[^-]*-gnueabi
+ abin32-gnu-linux linux-gnuabin32 linux[^-]*-gnuabin32
+diff --git a/data/tupletable b/data/tupletable
+index 28f00bf..748ffab 100644
+--- a/data/tupletable
++++ b/data/tupletable
+@@ -10,6 +10,7 @@ base-uclibc-linux-<cpu> uclibc-linux-<cpu>
+ eabihf-musl-linux-arm musl-linux-armhf
+ eabi-musl-linux-arm musl-linux-armel
+ base-musl-linux-<cpu> musl-linux-<cpu>
++x32-musl-linux-amd64 x32
+ ilp32-gnu-linux-arm64 arm64ilp32
+ eabihf-gnu-linux-arm armhf
+ eabi-gnu-linux-arm armel
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch b/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch
index 231a6a2909..9fe0ca7600 100644
--- a/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch
@@ -13,13 +13,13 @@ Upstream-Status: Inappropriate [embedded specific]
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
-index 79b2908..7758aa5 100644
+index 453077fd9..f42ea2882 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
-@@ -235,14 +235,12 @@ parseversion(struct dpkg_version *rversion, const char *string,
-
- /* XXX: Would be faster to use something like cisversion and cisrevision. */
+@@ -243,14 +243,12 @@ parseversion(struct dpkg_version *rversion, const char *string,
ptr = rversion->version;
+ if (!*ptr)
+ return dpkg_put_error(err, _("version number is empty"));
- if (*ptr && !c_isdigit(*ptr++))
- return dpkg_put_warn(err, _("version number does not start with digit"));
for (; *ptr; ptr++) {
@@ -33,6 +33,6 @@ index 79b2908..7758aa5 100644
return dpkg_put_warn(err, _("invalid character in revision number"));
}
---
-2.1.4
+--
+2.11.0
diff --git a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
index 80504ce8b9..9ca7262eb9 100644
--- a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
@@ -1,7 +1,7 @@
-From 24229971492515b64c81e8c6392e5dfbdc22b44c Mon Sep 17 00:00:00 2001
+From dd11ed66640f79143e42d778b58fdd5a61fb5836 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 26 Aug 2015 16:25:45 +0300
-Subject: [PATCH 3/5] Our pre/postinsts expect $D to be set when running in a
+Subject: [PATCH] Our pre/postinsts expect $D to be set when running in a
sysroot and don't expect a chroot. This matches up our system expectations
with what dpkg does.
@@ -9,32 +9,45 @@ Upstream-Status: Inappropriate [OE Specific]
RP 2011/12/07
ALIMON 2016/05/26
-
+ALIMON 2017/02/21
+KKang 2019/02/20
---
- src/script.c | 39 +++------------------------------------
- 1 file changed, 3 insertions(+), 36 deletions(-)
+ src/script.c | 53 +++-------------------------------------------------
+ 1 file changed, 3 insertions(+), 50 deletions(-)
diff --git a/src/script.c b/src/script.c
-index 3c88be8..ce66a86 100644
+index abe65b6f7..621ff9b27 100644
--- a/src/script.c
+++ b/src/script.c
-@@ -97,43 +97,10 @@ setexecute(const char *path, struct stat *stab)
+@@ -96,58 +96,11 @@ setexecute(const char *path, struct stat *stab)
static const char *
maintscript_pre_exec(struct command *cmd)
{
- const char *admindir = dpkg_db_get_dir();
-- const char *changedir = fc_script_chrootless ? instdir : "/";
-- size_t instdirl = strlen(instdir);
+- const char *changedir;
+- size_t instdirlen = strlen(instdir);
+-
+- if (instdirlen > 0 && in_force(FORCE_SCRIPT_CHROOTLESS))
+- changedir = instdir;
+- else
+- changedir = "/";
-
-- if (*instdir && !fc_script_chrootless) {
-- if (strncmp(admindir, instdir, instdirl) != 0)
+- if (instdirlen > 0 && !in_force(FORCE_SCRIPT_CHROOTLESS)) {
+- int rc;
+-
+- if (strncmp(admindir, instdir, instdirlen) != 0)
- ohshit(_("admindir must be inside instdir for dpkg to work properly"));
-- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0)
+- if (setenv("DPKG_ADMINDIR", admindir + instdirlen, 1) < 0)
- ohshite(_("unable to setenv for subprocesses"));
- if (setenv("DPKG_ROOT", "", 1) < 0)
- ohshite(_("unable to setenv for subprocesses"));
-
-- if (chroot(instdir))
+- rc = chroot(instdir);
+- if (rc && in_force(FORCE_NON_ROOT) && errno == EPERM)
+- ohshit(_("not enough privileges to change root "
+- "directory with --force-not-root, consider "
+- "using --force-script-chrootless?"));
+- else if (rc)
- ohshite(_("failed to chroot to '%.250s'"), instdir);
+ if (*instdir) {
+ setenv("D", instdir, 1);
@@ -56,15 +69,18 @@ index 3c88be8..ce66a86 100644
- args.buf);
- varbuf_destroy(&args);
- }
-- if (!instdirl || fc_script_chrootless)
+- if (instdirlen == 0 || in_force(FORCE_SCRIPT_CHROOTLESS))
- return cmd->filename;
-
-- assert(strlen(cmd->filename) >= instdirl);
-- return cmd->filename + instdirl;
+- if (strlen(cmd->filename) < instdirlen)
+- internerr("maintscript name '%s' length < instdir length %zd",
+- cmd->filename, instdirlen);
+
+- return cmd->filename + instdirlen;
+ return cmd->filename;
}
/**
--
-2.1.4
+2.17.1
diff --git a/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch b/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch
deleted file mode 100644
index 96e96f277b..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0ad7bba80d5b9035089ff2b2f77a774b5b201915 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 26 Aug 2015 16:28:59 +0300
-Subject: [PATCH 5/5] dpkg-compiler.m4: remove -Wvla
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Remove the -Wvla flag from the set of compiler warning flags, since gcc
-on old host systems such as CentOS 5.8 doesn't support it, and it
-causes a build error for dpkg-native.
-
-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 682857c..23ed7d0 100644
---- a/m4/dpkg-compiler.m4
-+++ b/m4/dpkg-compiler.m4
-@@ -52,7 +52,6 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [
- DPKG_CHECK_COMPILER_FLAG([-Wlogical-op])
- DPKG_CHECK_COMPILER_FLAG([-Wlogical-not-parentheses])
- DPKG_CHECK_COMPILER_FLAG([-Wswitch-bool])
-- DPKG_CHECK_COMPILER_FLAG([-Wvla])
- DPKG_CHECK_COMPILER_FLAG([-Winit-self])
- DPKG_CHECK_COMPILER_FLAG([-Wwrite-strings])
- DPKG_CHECK_COMPILER_FLAG([-Wcast-align])
---
-2.1.4
-
diff --git a/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch b/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
index a6b00880ce..8797ea55c6 100644
--- a/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
@@ -5,38 +5,38 @@ Subject: [PATCH] add musleabi to known target tripets
helps compiling dpkg for musl/arm-softfloat
+Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
-Upstream-Status: Pending
-
- ostable | 1 +
- triplettable | 1 +
+ data/ostable | 1 +
+ data/tupletable | 1 +
2 files changed, 2 insertions(+)
-diff --git a/ostable b/ostable
-index 3bb6819..d0ffdc7 100644
---- a/ostable
-+++ b/ostable
-@@ -15,6 +15,7 @@
- uclibceabi-linux linux-uclibceabi linux[^-]*-uclibceabi
- uclibc-linux linux-uclibc linux[^-]*-uclibc
- musleabihf-linux linux-musleabihf linux[^-]*-musleabihf
-+musleabi-linux linux-musleabi linux[^-]*-musleabi
- musl-linux linux-musl linux[^-]*-musl
- gnueabihf-linux linux-gnueabihf linux[^-]*-gnueabihf
- gnueabi-linux linux-gnueabi linux[^-]*-gnueabi
-diff --git a/triplettable b/triplettable
-index 1213584..70d24c1 100644
---- a/triplettable
-+++ b/triplettable
-@@ -6,6 +6,7 @@
- uclibceabi-linux-arm uclibc-linux-armel
- uclibc-linux-<cpu> uclibc-linux-<cpu>
- musleabihf-linux-arm musl-linux-armhf
-+musleabi-linux-arm musl-linux-armel
- musl-linux-<cpu> musl-linux-<cpu>
- gnueabihf-linux-arm armhf
- gnueabi-linux-arm armel
+diff --git a/data/ostable b/data/ostable
+index 99c1f889d..be6434271 100644
+--- a/data/ostable
++++ b/data/ostable
+@@ -17,6 +17,7 @@
+ eabi-uclibc-linux linux-uclibceabi linux[^-]*-uclibceabi
+ base-uclibc-linux linux-uclibc linux[^-]*-uclibc
+ eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf
++eabi-musl-linux linux-musleabi linux[^-]*-musleabi
+ base-musl-linux linux-musl linux[^-]*-musl
+ eabihf-gnu-linux linux-gnueabihf linux[^-]*-gnueabihf
+ eabi-gnu-linux linux-gnueabi linux[^-]*-gnueabi
+diff --git a/data/tupletable b/data/tupletable
+index 5f500f6ca..28f00bfe6 100644
+--- a/data/tupletable
++++ b/data/tupletable
+@@ -8,6 +8,7 @@
+ eabi-uclibc-linux-arm uclibc-linux-armel
+ base-uclibc-linux-<cpu> uclibc-linux-<cpu>
+ eabihf-musl-linux-arm musl-linux-armhf
++eabi-musl-linux-arm musl-linux-armel
+ base-musl-linux-<cpu> musl-linux-<cpu>
+ ilp32-gnu-linux-arm64 arm64ilp32
+ eabihf-gnu-linux-arm armhf
--
-2.6.4
+2.11.0
diff --git a/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch b/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
new file mode 100644
index 0000000000..4f79a40d8b
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
@@ -0,0 +1,43 @@
+From 8659eeeeda74d71e12080121f0b13a88cbdda433 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Tue, 21 Feb 2017 11:23:27 -0600
+Subject: [PATCH] dpkg-deb/build.c: Remove usage of --clamp-mtime in tar
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Recently dpkg added --clamp-mtime to tar to create reproducible
+build tarballs [1].
+
+But host tools doesn't support this option because is new on tar
+so disable in our builds.
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+Upstream-Status: Inappropriate [Configuration]
+
+[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759999#20
+[2] https://lists.gnu.org/archive/html/help-tar/2016-01/msg00000.html
+
+Update patch context for dpkg 1.19.4.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ dpkg-deb/build.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
+index 68d1875..053fcb7 100644
+--- a/dpkg-deb/build.c
++++ b/dpkg-deb/build.c
+@@ -457,7 +457,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+
+ command_init(&cmd, TAR, "tar -cf");
+ command_add_args(&cmd, "tar", "-cf", "-", "--format=gnu",
+- "--mtime", mtime, "--clamp-mtime", NULL);
++ "--mtime", mtime, NULL);
+ /* Mode might become a positional argument, pass it before -T. */
+ if (options->mode)
+ command_add_args(&cmd, "--mode", options->mode, NULL);
+--
+2.11.0
diff --git a/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch b/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
index dc69eb2d1c..d165616a19 100644
--- a/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
@@ -24,23 +24,25 @@ empty in configure script.
Upstream-Status: Pending
Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
- triplettable | 1 +
+ data/tupletable | 1 +
1 file changed, 1 insertion(+)
-diff --git a/triplettable b/triplettable
-index abe4726..1e9c247 100644
---- a/triplettable
-+++ b/triplettable
-@@ -11,6 +11,7 @@ gnueabihf-linux-arm armhf
- gnueabi-linux-arm armel
- gnuabin32-linux-mips64r6el mipsn32r6el
- gnuabin32-linux-mips64r6 mipsn32r6
-+gnueabi-linux-armeb armeb
- gnuabin32-linux-mips64el mipsn32el
- gnuabin32-linux-mips64 mipsn32
- gnuabi64-linux-mips64r6el mips64r6el
+diff --git a/data/tupletable b/data/tupletable
+index b7802bec3..5f500f6ca 100644
+--- a/data/tupletable
++++ b/data/tupletable
+@@ -12,6 +12,7 @@ base-musl-linux-<cpu> musl-linux-<cpu>
+ ilp32-gnu-linux-arm64 arm64ilp32
+ eabihf-gnu-linux-arm armhf
+ eabi-gnu-linux-arm armel
++eabi-gnu-linux-armeb armeb
+ abin32-gnu-linux-mips64r6el mipsn32r6el
+ abin32-gnu-linux-mips64r6 mipsn32r6
+ abin32-gnu-linux-mips64el mipsn32el
--
-2.1.4
+2.11.0
+
diff --git a/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch b/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch
index cad4c0f0a1..4e0d22acbb 100644
--- a/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch
@@ -7,16 +7,23 @@ Upstream-Status: Pending
Signed-off-by: Joe Slater <jslater@windriver.com>
+---
+ scripts/Dpkg/Arch.pm | 3 ---
+ 1 file changed, 3 deletions(-)
+diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
+index 1720847b8..6345ce3b9 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
-@@ -233,9 +233,6 @@ sub read_triplettable()
- (my $dt = $debtriplet) =~ s/<cpu>/$_cpu/;
+@@ -323,9 +323,6 @@ sub _load_tupletable()
+ (my $dt = $debtuple) =~ s/<cpu>/$_cpu/;
(my $da = $debarch) =~ s/<cpu>/$_cpu/;
-- next if exists $debarch_to_debtriplet{$da}
-- or exists $debtriplet_to_debarch{$dt};
+- next if exists $debarch_to_debtuple{$da}
+- or exists $debtuple_to_debarch{$dt};
-
- $debarch_to_debtriplet{$da} = $dt;
- $debtriplet_to_debarch{$dt} = $da;
+ $debarch_to_debtuple{$da} = $dt;
+ $debtuple_to_debarch{$dt} = $da;
}
+--
+2.11.0
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service b/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
deleted file mode 100644
index f0b0789e4e..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=dpkg first boot configure
-DefaultDependencies=no
-After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
-Before=sysinit.target
-
-[Service]
-Type=oneshot
-EnvironmentFile=-@SYSCONFDIR@/default/postinst
-ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/dpkg --configure -a > $LOGFILE 2>&1; else @BINDIR@/dpkg --configure -a; fi"
-ExecStartPost=@BASE_BINDIR@/systemctl disable dpkg-configure.service
-StandardOutput=syslog
-RemainAfterExit=No
-
-[Install]
-WantedBy=basic.target
-WantedBy=sysinit.target
diff --git a/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
deleted file mode 100644
index d56b8a69a3..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-CentOS 5.8 kernels and headers support the sync_file_range() system call,
-but glibc 2.5 doesn't provide the syscall stub. It appears that this
-problem is known but will never be fixed:
-
- https://bugzilla.redhat.com/show_bug.cgi?id=518581
-
- Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface
-
- Status: CLOSED CANTFIX
- Last Closed: 2009-11-22 22:19:55
-
- Kirby Zhou 2009-08-20 23:37:55 EDT
-
- Description of problem:
-
- glibc misses sync_file_range syscall interface. The header file and
- man page both say 'sync_file_range' should exist. From man page,
- sync_file_range should exist sinc kernel-2.6.17
-
- Andreas Schwab 2009-08-21 03:24:24 EDT
-
- It has only been added to glibc 2.6, and cannot be backported due to
- ABI breakage. You can always fall back to syscall(3).
-
- Ulrich Drepper 2009-11-22 22:19:55 EST
-
- As comment #1 says, no chance to backport this.
-
- See the syscall man page for instructions.
-
- Jon E 2010-03-19 10:32:37 EDT
-
- then why document it if it's broken and you're not going to fix it?
- .. might want to FTFM over at sync_file_range(2) - in the meantime -
- borrowing from glibc 2.6 .. any thoughts on this implementation for a
- hacky workaround for those still on your "ancient releases" .. (eg:
- RHEL5.3)?:
-
- #ifdef ULI_WONT_FIX_THIS_IN_GLIBC2.5
- #define NR_sync_file_range 277
- int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
- {
- return syscall (NR_sync_file_range, fd,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
- flags);
- }
- #endif
-
- assuming of course that you're on an x86_64 and include/asm-
- x86_64/unistd.h has the correct entry
-
- (fwiw - fio is starting to use this now)
-
-Rather than attempting to provide an implementation using syscall(),
-we take the more conservative route and ignore header support for
-sync_file_range() flags when the glibc version is <= 2.5.
-
-Upstream-Status: Inappropriate [everyone else builds on newer hosts :-)]
-
-Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
-Signed-off-by: Lei Liu <lei.liu2@windriver.com>
----
- src/archives.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/src/archives.c
-+++ b/src/archives.c
-@@ -75,7 +75,7 @@
- /* Ignore the return code as it should be considered equivalent to an
- * asynchronous hint for the kernel, we are doing an fsync() later on
- * anyway. */
--#if defined(SYNC_FILE_RANGE_WRITE)
-+#if defined(SYNC_FILE_RANGE_WRITE) && __GLIBC_PREREQ(2, 6)
- sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
- #elif defined(HAVE_POSIX_FADVISE)
- posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
-@@ -1179,7 +1179,7 @@
- return 0;
- }
-
--#if defined(SYNC_FILE_RANGE_WAIT_BEFORE)
-+#if defined(SYNC_FILE_RANGE_WAIT_BEFORE) && __GLIBC_PREREQ(2, 6)
- static void
- tar_writeback_barrier(struct fileinlist *files, struct pkginfo *pkg)
- {
diff --git a/meta/recipes-devtools/dpkg/dpkg/noman.patch b/meta/recipes-devtools/dpkg/dpkg/noman.patch
index d30c15018a..a7f3cb8f45 100644
--- a/meta/recipes-devtools/dpkg/dpkg/noman.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/noman.patch
@@ -1,14 +1,22 @@
Upstream-Status: Inappropriate [disable feature]
-diff -ruN dpkg-1.15.8.5-orig/Makefile.am dpkg-1.15.8.5/Makefile.am
---- dpkg-1.15.8.5-orig/Makefile.am 2010-10-08 12:27:15.042083703 +0800
-+++ dpkg-1.15.8.5/Makefile.am 2010-10-08 12:27:27.755148228 +0800
-@@ -12,8 +12,7 @@
- utils \
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 0da52cb16..a1f79e0a2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,8 +13,7 @@ SUBDIRS = \
$(MAYBE_DSELECT) \
scripts \
+ t-func \
- po \
- man
+ po
ACLOCAL_AMFLAGS = -I m4
+
+--
+2.11.0
diff --git a/meta/recipes-devtools/dpkg/dpkg/pager.patch b/meta/recipes-devtools/dpkg/dpkg/pager.patch
new file mode 100644
index 0000000000..e56b9d28af
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/pager.patch
@@ -0,0 +1,21 @@
+pager: Use less instead of pager
+
+pager is a Debianism. Istead use directly pager.
+
+Upstream-Status: Inappropriate [OE-Core integration specific]
+
+Suggested-by: Burton, Ross <ross.burton@intel.com>
+Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
+diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
+index 2bb067a..6cbce80 100644
+--- a/lib/dpkg/dpkg.h
++++ b/lib/dpkg/dpkg.h
+@@ -95,7 +95,7 @@ DPKG_BEGIN_DECLS
+ #define MAXUPDATES 250
+
+ #define DEFAULTSHELL "sh"
+-#define DEFAULTPAGER "pager"
++#define DEFAULTPAGER "less"
+
+ #define MD5HASHLEN 32
+ #define MAXTRIGDIRECTIVE 256
diff --git a/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch b/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch
new file mode 100644
index 0000000000..e9119918b1
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch
@@ -0,0 +1,27 @@
+GNU tar >= 1.27 is required for --owner=NAME:ID and --group=NAME:ID. And fails
+to build .deb packages with error:
+
+| dpkg-deb: building package 'linux-libc-headers-dbg' in '.../tmp/work/i586-poky-linux/linux-libc-headers/4.19-r0/deploy-debs/i586/linux-libc-headers-dbg_ 4.19-r0.0_i386.deb'.
+| tar: root\:0: Invalid owner
+| tar: Error is not recoverable: exiting now
+| dpkg-deb: error: tar -cf subprocess returned error exit status 2
+
+Tweak tar options in dpkg-deb source code to make it work on old machines.
+
+Upstream-Status: Inappropriate [cross build specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
+index 68d187511..86fe22e25 100644
+--- a/dpkg-deb/build.c
++++ b/dpkg-deb/build.c
+@@ -462,7 +462,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+ if (options->mode)
+ command_add_args(&cmd, "--mode", options->mode, NULL);
+ if (options->root_owner_group)
+- command_add_args(&cmd, "--owner", "root:0", "--group", "root:0", NULL);
++ command_add_args(&cmd, "--owner", "root", "--group", "root", NULL);
+ command_add_args(&cmd, "--null", "--no-unquote", "--no-recursion",
+ "-T", "-", NULL);
+ command_exec(&cmd);
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb b/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
deleted file mode 100644
index 28fdc136a0..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require dpkg.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160509T100042Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz \
- file://noman.patch \
- file://remove-tar-no-timestamp.patch \
- file://arch_pm.patch \
- file://dpkg-configure.service \
- file://add_armeb_triplet_entry.patch \
- file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
- file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
- file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
- file://0005-dpkg-compiler.m4-remove-Wvla.patch \
- file://0006-add-musleabi-to-known-target-tripets.patch \
- "
-SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch "
-
-SRC_URI[md5sum] = "073dbf2129a54b0fc627464bf8af4a1b"
-SRC_URI[sha256sum] = "ace36d3a6dc750a42baf797f9e75ec580a21f92bb9ff96b482100755d6d9b87b"
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb b/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb
new file mode 100644
index 0000000000..e9dec337b3
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb
@@ -0,0 +1,22 @@
+require dpkg.inc
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \
+ file://noman.patch \
+ file://remove-tar-no-timestamp.patch \
+ file://arch_pm.patch \
+ file://add_armeb_triplet_entry.patch \
+ file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
+ file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
+ file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
+ file://0006-add-musleabi-to-known-target-tripets.patch \
+ file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \
+ file://0001-dpkg-Support-muslx32-build.patch \
+ file://pager.patch \
+ "
+SRC_URI_append_class-native = " \
+ file://tweak-options-require-tar-1.27.patch \
+"
+
+SRC_URI[md5sum] = "60f57c5494e6dfa177504d47bfa0e383"
+SRC_URI[sha256sum] = "4c27fededf620c0aa522fff1a48577ba08144445341257502e7730f2b1a296e8"
diff --git a/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb b/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
new file mode 100644
index 0000000000..2c843a9342
--- /dev/null
+++ b/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
@@ -0,0 +1,22 @@
+SUMMARY = "A small utility for printing debug source file locations embedded in binaries"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://../dwarfsrcfiles.c;md5=31483894e453a77acbb67847565f1b5c;beginline=1;endline=8"
+
+SRC_URI = "file://dwarfsrcfiles.c"
+BBCLASSEXTEND = "native"
+DEPENDS = "elfutils"
+DEPENDS_append_libc-musl = " argp-standalone"
+
+do_compile () {
+ ${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw
+}
+
+do_compile_libc-musl () {
+ ${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw -largp
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -t ${D}${bindir} dwarfsrcfiles
+}
+
diff --git a/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c b/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
new file mode 100644
index 0000000000..af7af524eb
--- /dev/null
+++ b/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
@@ -0,0 +1,111 @@
+// dwarfsrcfiles.c - Get source files associated with the dwarf in a elf file.
+// gcc -Wall -g -O2 -lelf -ldw -o dwarfsrcfiles dwarfsrcfiles.c
+//
+// Copyright (C) 2011, Mark Wielaard <mjw@redhat.com>
+//
+// This file is free software. You can redistribute it and/or modify
+// it under the terms of the GNU General Public License (GPL); either
+// version 2, or (at your option) any later version.
+
+#include <argp.h>
+#include <stdio.h>
+
+#include <dwarf.h>
+#include <elfutils/libdw.h>
+#include <elfutils/libdwfl.h>
+
+static int
+process_cu (Dwarf_Die *cu_die)
+{
+ Dwarf_Attribute attr;
+ const char *name;
+ const char *dir = NULL;
+
+ Dwarf_Files *files;
+ size_t n;
+ int i;
+
+ if (dwarf_tag (cu_die) != DW_TAG_compile_unit)
+ {
+ fprintf (stderr, "DIE isn't a compile unit");
+ return -1;
+ }
+
+ if (dwarf_attr (cu_die, DW_AT_name, &attr) == NULL)
+ {
+ fprintf(stderr, "CU doesn't have a DW_AT_name");
+ return -1;
+ }
+
+ name = dwarf_formstring (&attr);
+ if (name == NULL)
+ {
+ fprintf(stderr, "Couldn't get DW_AT_name as string, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+
+ if (dwarf_attr (cu_die, DW_AT_comp_dir, &attr) != NULL)
+ {
+ dir = dwarf_formstring (&attr);
+ if (dir == NULL)
+ {
+ fprintf(stderr, "Couldn't get DW_AT_comp_die as string, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+ }
+
+ if (dir == NULL)
+ printf ("%s\n", name);
+ else
+ printf ("%s/%s\n", dir, name);
+
+ if (dwarf_getsrcfiles (cu_die, &files, &n) != 0)
+ {
+ fprintf(stderr, "Couldn't get CU file table, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+
+ for (i = 1; i < n; i++)
+ {
+ const char *file = dwarf_filesrc (files, i, NULL, NULL);
+ if (dir != NULL && file[0] != '/')
+ printf ("\t%s/%s\n", dir, file);
+ else
+ printf ("\t%s\n", file);
+ }
+
+ return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ char* args[3];
+ int res = 0;
+ Dwfl *dwfl;
+ Dwarf_Addr bias;
+
+ if (argc != 2)
+ fprintf(stderr, "Usage %s <file>", argv[0]);
+
+ // Pretend "dwarfsrcfiles -e <file>" was given, so we can use standard
+ // dwfl argp parser to open the file for us and get our Dwfl. Useful
+ // in case argument is an ET_REL file (like kernel modules). libdwfl
+ // will fix up relocations for us.
+ args[0] = argv[0];
+ args[1] = "-e";
+ args[2] = argv[1];
+
+ argp_parse (dwfl_standard_argp (), 3, args, 0, NULL, &dwfl);
+
+ Dwarf_Die *cu = NULL;
+ while ((cu = dwfl_nextcu (dwfl, cu, &bias)) != NULL)
+ res |= process_cu (cu);
+
+ dwfl_end (dwfl);
+
+ return res;
+}
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
index 74e92f6b19..009f5ed807 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -4,12 +4,12 @@ fixing, configuring , and debugging ext2 filesystems."
HOMEPAGE = "http://e2fsprogs.sourceforge.net/"
LICENSE = "GPLv2 & LGPLv2 & BSD & MIT"
+LICENSE_e2fsprogs-dumpe2fs = "GPLv2"
LICENSE_e2fsprogs-e2fsck = "GPLv2"
LICENSE_e2fsprogs-mke2fs = "GPLv2"
-LICENSE_e2fsprogs-fsck = "GPLv2"
LICENSE_e2fsprogs-tune2fs = "GPLv2"
LICENSE_e2fsprogs-badblocks = "GPLv2"
-LIC_FILES_CHKSUM = "file://NOTICE;md5=b48f21d765b875bd10400975d12c1ca2 \
+LIC_FILES_CHKSUM = "file://NOTICE;md5=d50be0580c0b0a7fbc7a4830bbe6c12b \
file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \
file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \
file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://NOTICE;md5=b48f21d765b875bd10400975d12c1ca2 \
file://lib/et/et_name.c;beginline=1;endline=11;md5=ead236447dac7b980dbc5b4804d8c836 \
file://lib/ss/ss.h;beginline=1;endline=20;md5=6e89ad47da6e75fecd2b5e0e81e1d4a6"
SECTION = "base"
-DEPENDS = "util-linux"
+DEPENDS = "util-linux attr"
SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-configure.ac-correct-AM_GNU_GETTEXT.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-configure.ac-correct-AM_GNU_GETTEXT.patch
new file mode 100644
index 0000000000..2719594c2f
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-configure.ac-correct-AM_GNU_GETTEXT.patch
@@ -0,0 +1,26 @@
+From f907fea9ea053d5433b5199ce74008664141f753 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 19 Nov 2019 17:32:33 +0100
+Subject: [PATCH] configure.ac: correct AM_GNU_GETTEXT
+
+New version of gettext require the 'external' argument.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 654ff43d..4772b97b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -873,7 +873,7 @@ AC_SUBST(GETTEXT_PACKAGE)
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
+-AM_GNU_GETTEXT
++AM_GNU_GETTEXT([external])
+ dnl @MKDIR_P@ is expanded in AM_GNU_GETTEXT
+ AC_SUBST([mkdir_p],['$(MKDIR_P)'])
+ dnl
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-intl-do-not-try-to-use-gettext-defines-that-no-longe.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-intl-do-not-try-to-use-gettext-defines-that-no-longe.patch
new file mode 100644
index 0000000000..31b585fc9a
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-intl-do-not-try-to-use-gettext-defines-that-no-longe.patch
@@ -0,0 +1,27 @@
+From d034239f05cfba849f6ad16eb3f1ea37efbe4f95 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 19 Nov 2019 18:34:00 +0100
+Subject: [PATCH] intl: do not try to use gettext defines that no longer exist
+
+Newer version of gettext no longer define this in m4 files,
+so patch it out until e2fsprogs upstream sorts the situation.
+
+Upstream-Status: Inappropriate [hardcodes a choice]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ intl/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/intl/Makefile.in b/intl/Makefile.in
+index e037e23c..89a876b8 100644
+--- a/intl/Makefile.in
++++ b/intl/Makefile.in
+@@ -175,7 +175,7 @@ libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
+ DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
+ COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
+
+-all: all-@USE_INCLUDED_LIBINTL@
++all:
+ all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
+ all-no: all-no-@BUILD_INCLUDED_LIBINTL@
+ all-no-yes: libgnuintl.$la
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch
new file mode 100644
index 0000000000..fc4a540986
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch
@@ -0,0 +1,41 @@
+From f6d188580c2c9599319076fee22f2424652c711c Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 13 Sep 2017 19:55:35 -0700
+Subject: [PATCH] misc/create_inode.c: set dir's mode correctly
+
+The dir's mode has been set by ext2fs_mkdir() with umask, so
+reset it to the source's mode in set_inode_extra().
+
+Fixed when source dir's mode is 521, but tarball would be 721, this was
+incorrect.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ misc/create_inode.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/misc/create_inode.c b/misc/create_inode.c
+index 8ce3faf..50fbaa8 100644
+--- a/misc/create_inode.c
++++ b/misc/create_inode.c
+@@ -116,7 +116,14 @@ static errcode_t set_inode_extra(ext2_filsys fs, ext2_ino_t ino,
+
+ inode.i_uid = st->st_uid;
+ inode.i_gid = st->st_gid;
+- inode.i_mode |= st->st_mode;
++ /*
++ * The dir's mode has been set by ext2fs_mkdir() with umask, so
++ * reset it to the source's mode
++ */
++ if S_ISDIR(st->st_mode)
++ inode.i_mode = LINUX_S_IFDIR | st->st_mode;
++ else
++ inode.i_mode |= st->st_mode;
+ inode.i_atime = st->st_atime;
+ inode.i_mtime = st->st_mtime;
+ inode.i_ctime = st->st_ctime;
+--
+2.10.2
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
deleted file mode 100644
index e66cd4d1a7..0000000000
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 0a392baf1874964651115d9f77b0daa6851d1daa Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Tue, 1 Mar 2016 14:28:01 +1100
-Subject: [PATCH] Revert "mke2fs: enable the metadata_csum and 64bit features
- by default"
-
-This reverts commit cd27af3ecb83e8fd1e3eaa14994284a1818c7c15 as we
-don't want to enable features by default that are not supported by
-the latest stable e2fsprogs release.
-
-Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-Rebase to 1.43:
-The upstream has disabled metadata_csum by default
-this rebase just revert 64bit feature.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- misc/mke2fs.conf.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
-index 78fe50a..6f1940e 100644
---- a/misc/mke2fs.conf.in
-+++ b/misc/mke2fs.conf.in
-@@ -11,8 +11,9 @@
- features = has_journal
- }
- ext4 = {
-- features = has_journal,extent,huge_file,flex_bg,64bit,dir_nlink,extra_isize
-+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
- inode_size = 256
-+ auto_64-bit_support = 1
- }
- ext4dev = {
- features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
---
-2.8.1
-
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4 b/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
deleted file mode 100644
index c0bd7dbdee..0000000000
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
+++ /dev/null
@@ -1,135 +0,0 @@
-# Extracted from the package's shipped aclocal.m4. Custom macros should be in
-# acinclude.m4 so running aclocal doesn't blow them away.
-#
-# Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-# from http://autoconf-archive.cryp.to/ax_tls.html
-#
-# This was licensed under the GPL with the following exception:
-#
-# As a special exception, the respective Autoconf Macro's copyright
-# owner gives unlimited permission to copy, distribute and modify the
-# configure scripts that are the output of Autoconf when processing
-# the Macro. You need not follow the terms of the GNU General Public
-# License when using or distributing such scripts, even though
-# portions of the text of the Macro appear in them. The GNU General
-# Public License (GPL) does govern all other use of the material that
-# constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the
-# Autoconf Macro released by the Autoconf Macro Archive. When you make
-# and distribute a modified version of the Autoconf Macro, you may
-# extend this special exception to the GPL to apply to your modified
-# version as well.
-#
-AC_DEFUN([AX_TLS], [
- AC_MSG_CHECKING(for thread local storage (TLS) class)
- AC_CACHE_VAL(ac_cv_tls, [
- ax_tls_keywords="__thread __declspec(thread) none"
- for ax_tls_keyword in $ax_tls_keywords; do
- case $ax_tls_keyword in
- none) ac_cv_tls=none ; break ;;
- *)
- AC_TRY_COMPILE(
- [#include <stdlib.h>
- static void
- foo(void) {
- static ] $ax_tls_keyword [ int bar;
- exit(1);
- }],
- [],
- [ac_cv_tls=$ax_tls_keyword ; break],
- ac_cv_tls=none
- )
- esac
- done
-])
-
- if test "$ac_cv_tls" != "none"; then
- dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
- AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
- fi
- AC_MSG_RESULT($ac_cv_tls)
-])
-
-# ===========================================================================
-# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# CHECK_GNU_MAKE()
-#
-# DESCRIPTION
-#
-# This macro searches for a GNU version of make. If a match is found, the
-# makefile variable `ifGNUmake' is set to the empty string, otherwise it
-# is set to "#". This is useful for including a special features in a
-# Makefile, which cannot be handled by other versions of make. The
-# variable _cv_gnu_make_command is set to the command to invoke GNU make
-# if it exists, the empty string otherwise.
-#
-# Here is an example of its use:
-#
-# Makefile.in might contain:
-#
-# # A failsafe way of putting a dependency rule into a makefile
-# $(DEPEND):
-# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-#
-# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-# @ifGNUmake@ include $(DEPEND)
-# @ifGNUmake@ endif
-#
-# Then configure.in would normally contain:
-#
-# CHECK_GNU_MAKE()
-# AC_OUTPUT(Makefile)
-#
-# Then perhaps to cause gnu make to override any other make, we could do
-# something like this (note that GNU make always looks for GNUmakefile
-# first):
-#
-# if ! test x$_cv_gnu_make_command = x ; then
-# mv Makefile GNUmakefile
-# echo .DEFAULT: > Makefile ;
-# echo \ $_cv_gnu_make_command \$@ >> Makefile;
-# fi
-#
-# Then, if any (well almost any) other make is called, and GNU make also
-# exists, then the other make wraps the GNU make.
-#
-# LICENSE
-#
-# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-#
-# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
-
-AC_DEFUN(
- [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
- _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
- for a in "$MAKE" make gmake gnumake ; do
- if test -z "$a" ; then continue ; fi ;
- if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
- ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
- ifNotGNUmake='#' ;
- else
- ifGNUmake='#' ;
- ifNotGNUmake='' ;
- AC_MSG_RESULT("Not found");
- fi
- AC_SUBST(ifGNUmake)
- AC_SUBST(ifNotGNUmake)
-] )
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
index 33054c61fa..4d335af4cf 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -1,3 +1,6 @@
+From e8331a76983e839a3d193446ab8ae9c1b09daa07 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 10 Aug 2016 11:19:44 +0800
Subject: [PATCH] Fix missing check for permission denied.
If the path to "ROOT_SYSCONFDIR/mke2fs.conf" has a permission denied problem,
@@ -10,15 +13,16 @@ Upstream-Status: Pending
Written-by: Henrik Wallin <henrik.b.wallin@ericsson.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
---
lib/support/profile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/support/profile.c b/lib/support/profile.c
-index 51a3314..1c1039f 100644
+index 585ed595..810dd66b 100644
--- a/lib/support/profile.c
+++ b/lib/support/profile.c
-@@ -335,7 +335,7 @@ profile_init(const char **files, profile_t *ret_profile)
+@@ -335,7 +335,7 @@ profile_init(const char * const *files, profile_t *ret_profile)
*last = new_file;
last = &new_file->next;
}
@@ -27,6 +31,3 @@ index 51a3314..1c1039f 100644
strcmp(*fs, default_filename))
goto errout;
---
-2.7.4
-
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
deleted file mode 100644
index 2a3aeff613..0000000000
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index c1fe224..f5ac628 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1374,7 +1374,8 @@ if test -n "$WITH_DIET_LIBC" ; then
- INCLUDES="$INCLUDES -D_REENTRANT"
- fi
- AC_SUBST(INCLUDES)
--AM_MKINSTALLDIRS
-+MKINSTALLDIRS="mkdir -p"
-+AC_SUBST(MKINSTALLDIRS)
- dnl
- dnl Build CFLAGS
- dnl
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir_p.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir_p.patch
new file mode 100644
index 0000000000..b0fa4b8cc5
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir_p.patch
@@ -0,0 +1,20 @@
+e2fsprogs: expand @mkdir_p@
+
+Add AC_SUBST to configure.ac. @mkdir_p@ is currently
+not expanded so no locale data is written into usr/share/locale.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -811,6 +811,8 @@ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
+ AM_GNU_GETTEXT
++dnl @MKDIR_P@ is expanded in AM_GNU_GETTEXT
++AC_SUBST([mkdir_p],['$(MKDIR_P)'])
+ dnl
+ dnl End of configuration options
+ dnl
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
index ef1ce5872a..c3e46ce65f 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
@@ -1,30 +1,45 @@
+From b8842065ad621a03a971dfd50db862c5bffdeb49 Mon Sep 17 00:00:00 2001
+From: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
+Date: Sat, 18 Apr 2015 17:58:17 +0300
+Subject: [PATCH] e2fsprogs: add ptest
+
+Upstream-Status: Inappropriate
+
+Rebase for e2fsprogs 1.45.3.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ tests/Makefile.in | 4 ++--
+ tests/test_config | 32 ++++++++++++++++----------------
+ 2 files changed, 18 insertions(+), 18 deletions(-)
+
diff --git a/tests/Makefile.in b/tests/Makefile.in
-index 60cf655..ce220f1 100644
+index 8c4d2048..e021af32 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
-@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
+@@ -19,7 +19,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
@echo "#!/bin/sh" > test_one
@echo "HTREE=y" >> test_one
@echo "QUOTA=y" >> test_one
- @echo "SRCDIR=@srcdir@" >> test_one
-+ @echo "SRCDIR=/usr/lib/e2fsprogs/ptest/test" >> test_one
++ @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
@echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
- @cat $(srcdir)/test_one.in >> test_one
- @chmod +x test_one
-@@ -26,7 +26,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
- test_script: test_one test_script.in Makefile mke2fs.conf
+ @echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one
+ @echo "DD=@DD@" >>test_one
+@@ -30,7 +30,7 @@ test_script: test_one test_script.in Makefile mke2fs.conf
@echo "Creating test_script..."
+ @[ -f test_script ] && chmod u+w test_script || true
@echo "#!/bin/sh" > test_script
- @echo "SRCDIR=@srcdir@" >> test_script
-+ @echo "SRCDIR=/usr/lib/e2fsprogs/ptest/test" >> test_script
++ @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
@cat $(srcdir)/test_script.in >> test_script
- @chmod +x test_script
+ @chmod +x-w test_script
diff --git a/tests/test_config b/tests/test_config
-index 7f39157..c815a44 100644
+index 9dc762ce..a5fbdef6 100644
--- a/tests/test_config
+++ b/tests/test_config
-@@ -3,24 +3,24 @@
+@@ -3,25 +3,25 @@
#
unset LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME PAGER
@@ -38,8 +53,6 @@ index 7f39157..c815a44 100644
-E2IMAGE_EXE="../misc/e2image"
-DEBUGFS="$USE_VALGRIND ../debugfs/debugfs"
-DEBUGFS_EXE="../debugfs/debugfs"
--TEST_BITS="../debugfs/debugfs"
--RESIZE2FS_EXE="../resize/resize2fs"
+FSCK="$USE_VALGRIND e2fsck"
+MKE2FS="$USE_VALGRIND mke2fs"
+DUMPE2FS="$USE_VALGRIND dumpe2fs"
@@ -50,15 +63,18 @@ index 7f39157..c815a44 100644
+E2IMAGE_EXE="/sbin/e2image"
+DEBUGFS="$USE_VALGRIND debugfs"
+DEBUGFS_EXE="/sbin/debugfs"
-+TEST_BITS="/sbin/debugfs"
+ TEST_BITS="test_data.tmp"
+-RESIZE2FS_EXE="../resize/resize2fs"
+RESIZE2FS_EXE="/sbin/resize2fs"
RESIZE2FS="$USE_VALGRIND $RESIZE2FS_EXE"
-E2UNDO_EXE="../misc/e2undo"
+E2UNDO_EXE="/sbin/e2undo"
E2UNDO="$USE_VALGRIND $E2UNDO_EXE"
+-E2MMPSTATUS="$USE_VALGRIND ../misc/dumpe2fs -m"
-TEST_REL=../tests/progs/test_rel
-TEST_ICOUNT=../tests/progs/test_icount
-CRCSUM=../tests/progs/crcsum
++E2MMPSTATUS="$USE_VALGRIND dumpe2fs -m"
+TEST_REL=./progs/test_rel
+TEST_ICOUNT=./progs/test_icount
+CRCSUM=./progs/crcsum
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
index 830e9d57a5..95e6a7a2d5 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
@@ -1,14 +1,23 @@
+From de6d6f0dd010f5b9d917553acb9430278f448f23 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 23 Dec 2013 13:38:34 +0000
+Subject: [PATCH] e2fsprogs: silence debugfs
+
When executing a script don't echo every command, as we do this for entire
filesystems at rootfs time.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ debugfs/debugfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
-index 5590295..ac57292 100644
+index 15b01214..15164df2 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
-@@ -2378,7 +2378,7 @@ static int source_file(const char *cmd_file, int ss_idx)
+@@ -2492,7 +2492,7 @@ static int source_file(const char *cmd_file, int ss_idx)
cp = strchr(buf, '\r');
if (cp)
*cp = 0;
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
index 1ac2513248..c97c0377e9 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
@@ -1,11 +1,10 @@
#!/bin/sh
cd ./test
-./test_script &>../test.log
-if [ $? -eq 0 ]
-then
- echo "PASS: e2fsprogs"
- rm test.log
-else
- echo "FAIL: e2fsprogs"
-fi
+SKIP_SLOW_TESTS=yes ./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /'
+rm -rf /var/volatile/tmp/*e2fsprogs*
+rm -f tmp-*
+rm -f *.tmp
+rm -f *.ok
+rm -f *.failed
+rm -f *.log
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
deleted file mode 100644
index f4855bc430..0000000000
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
+++ /dev/null
@@ -1,111 +0,0 @@
-require e2fsprogs.inc
-
-PR = "r1"
-
-SRC_URI += "file://acinclude.m4 \
- file://remove.ldconfig.call.patch \
- file://quiet-debugfs.patch \
- file://run-ptest \
- file://ptest.patch \
- file://mkdir.patch \
- file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
-"
-
-SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
-
-SRCREV = "d6adf070b0e85f209c0d7f310188b134b5cb7180"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
-
-EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
- --enable-elf-shlibs --disable-libuuid --disable-uuidd \
- --disable-libblkid --enable-verbose-makecmds"
-
-EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
-
-do_configure_prepend () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
-do_install () {
- oe_runmake 'DESTDIR=${D}' install
- oe_runmake 'DESTDIR=${D}' install-libs
- # We use blkid from util-linux now so remove from here
- rm -f ${D}${base_libdir}/libblkid*
- rm -rf ${D}${includedir}/blkid
- rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
- rm -f ${D}${base_sbindir}/blkid
- rm -f ${D}${base_sbindir}/fsck
- rm -f ${D}${base_sbindir}/findfs
-
- # e2initrd_helper and the pkgconfig files belong in libdir
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- install -d ${D}${libdir}
- mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
- mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
- fi
-
- oe_multilib_header ext2fs/ext2_types.h
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
-
- install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
-
- # Clean host path (build directory) in compile_et, mk_cmds
- sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et
- sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds
-}
-
-# Need to find the right mke2fs.conf file
-e2fsprogs_conf_fixup () {
- for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev; do
- create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
- done
-}
-
-do_install_append_class-native() {
- e2fsprogs_conf_fixup
-}
-
-do_install_append_class-nativesdk() {
- e2fsprogs_conf_fixup
-}
-
-RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
-RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
-
-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"
-FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
-FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
-FILES_libss = "${base_libdir}/libss.so.*"
-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 ${bindir}/compile_et ${bindir}/mk_cmds"
-
-ALTERNATIVE_${PN} = "chattr"
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
-ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
-
-ALTERNATIVE_${PN}-doc = "fsck.8"
-ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
-
-RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
-
-do_compile_ptest() {
- oe_runmake -C ${B}/tests
-}
-
-do_install_ptest() {
- cp -a ${B}/tests ${D}${PTEST_PATH}/test
- cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
- sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
-}
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb
new file mode 100644
index 0000000000..6e69eea21c
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb
@@ -0,0 +1,141 @@
+require e2fsprogs.inc
+
+SRC_URI += "file://remove.ldconfig.call.patch \
+ file://run-ptest \
+ file://ptest.patch \
+ file://mkdir_p.patch \
+ file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
+ file://0001-configure.ac-correct-AM_GNU_GETTEXT.patch \
+ file://0001-intl-do-not-try-to-use-gettext-defines-that-no-longe.patch \
+ "
+
+SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
+ file://quiet-debugfs.patch \
+"
+
+SRCREV = "984ff8d6a0a1d5dc300505f67b38ed5047d51dac"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
+
+EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
+ --enable-elf-shlibs --disable-libuuid --disable-uuidd \
+ --disable-libblkid --enable-verbose-makecmds \
+ --with-crond-dir=no"
+
+EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
+
+# make locale rules sometimes fire, sometimes don't as git doesn't preserve
+# file mktime. Touch the files introducing non-determinism to the build
+do_compile_prepend (){
+ find ${S}/po -type f -name "*.po" -exec touch {} +
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+ oe_runmake 'DESTDIR=${D}' install-libs
+ # We use blkid from util-linux now so remove from here
+ rm -f ${D}${base_libdir}/libblkid*
+ rm -rf ${D}${includedir}/blkid
+ rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
+ rm -f ${D}${base_sbindir}/blkid
+ rm -f ${D}${base_sbindir}/fsck
+ rm -f ${D}${base_sbindir}/findfs
+
+ # e2initrd_helper and the pkgconfig files belong in libdir
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ install -d ${D}${libdir}
+ mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
+ mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+ fi
+
+ oe_multilib_header ext2fs/ext2_types.h
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
+
+ install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
+
+ # Clean host path (build directory) in compile_et, mk_cmds
+ sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et
+ sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds
+}
+
+# Need to find the right mke2fs.conf file
+e2fsprogs_conf_fixup () {
+ for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do
+ create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
+ done
+}
+
+do_install_append_class-native() {
+ e2fsprogs_conf_fixup
+}
+
+do_install_append_class-nativesdk() {
+ e2fsprogs_conf_fixup
+}
+
+do_install_append_class-target() {
+ mv ${D}${base_sbindir}/mke2fs ${D}${base_sbindir}/mke2fs.e2fsprogs
+ mv ${D}${base_sbindir}/mkfs.ext2 ${D}${base_sbindir}/mkfs.ext2.e2fsprogs
+ mv ${D}${base_sbindir}/tune2fs ${D}${base_sbindir}/tune2fs.e2fsprogs
+}
+
+RDEPENDS_e2fsprogs = "e2fsprogs-badblocks e2fsprogs-dumpe2fs"
+RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
+
+PACKAGES =+ "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck e2fsprogs-e2scrub e2fsprogs-mke2fs e2fsprogs-resize2fs e2fsprogs-tune2fs"
+PACKAGES =+ "libcomerr libss libe2p libext2fs"
+
+FILES_e2fsprogs-dumpe2fs = "${base_sbindir}/dumpe2fs"
+FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
+FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
+FILES_e2fsprogs-e2scrub = "${base_sbindir}/e2scrub*"
+FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs.e2fsprogs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
+FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs.e2fsprogs ${base_sbindir}/e2label"
+FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
+FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
+FILES_libss = "${base_libdir}/libss.so.*"
+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 ${bindir}/compile_et ${bindir}/mk_cmds"
+
+ALTERNATIVE_${PN} = "chattr"
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
+ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
+
+ALTERNATIVE_${PN}-doc = "fsck.8"
+ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
+
+ALTERNATIVE_${PN}-mke2fs = "mke2fs mkfs.ext2"
+ALTERNATIVE_LINK_NAME[mke2fs] = "${base_sbindir}/mke2fs"
+ALTERNATIVE_LINK_NAME[mkfs.ext2] = "${base_sbindir}/mkfs.ext2"
+
+ALTERNATIVE_${PN}-tune2fs = "tune2fs"
+ALTERNATIVE_LINK_NAME[tune2fs] = "${base_sbindir}/tune2fs"
+
+RDEPENDS_e2fsprogs-e2scrub = "bash"
+RDEPENDS_${PN}-ptest += "coreutils procps bash bzip2 diffutils perl sed"
+RDEPENDS_${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-resize2fs e2fsprogs-tune2fs"
+
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests
+}
+
+do_install_ptest() {
+ cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test
+ cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test
+ sed -e 's!../e2fsck/e2fsck!e2fsck!g' \
+ -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect*
+ sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script
+
+ # Remove various files
+ find "${D}${PTEST_PATH}" -type f \
+ \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\
+ -exec rm -f {} +
+
+ install -d ${D}${PTEST_PATH}/lib
+ install -m 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/
+}
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
deleted file mode 100644
index d4e4675ad5..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
+++ /dev/null
@@ -1,449 +0,0 @@
-Upstream-Status: Backport
-
-Index: elfutils-0.146/backends/arm_init.c
-===================================================================
---- elfutils-0.146.orig/backends/arm_init.c 2009-04-21 14:50:01.000000000 +0000
-+++ elfutils-0.146/backends/arm_init.c 2010-04-24 10:11:13.000000000 +0000
-@@ -32,21 +32,32 @@
- #define RELOC_PREFIX R_ARM_
- #include "libebl_CPU.h"
-
-+#include "libebl_arm.h"
-+
- /* This defines the common reloc hooks based on arm_reloc.def. */
- #include "common-reloc.c"
-
-
- const char *
- arm_init (elf, machine, eh, ehlen)
-- Elf *elf __attribute__ ((unused));
-+ Elf *elf;
- GElf_Half machine __attribute__ ((unused));
- Ebl *eh;
- size_t ehlen;
- {
-+ int soft_float = 0;
-+
- /* Check whether the Elf_BH object has a sufficent size. */
- if (ehlen < sizeof (Ebl))
- return NULL;
-
-+ if (elf) {
-+ GElf_Ehdr ehdr_mem;
-+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT))
-+ soft_float = 1;
-+ }
-+
- /* We handle it. */
- eh->name = "ARM";
- arm_init_reloc (eh);
-@@ -58,7 +69,10 @@
- HOOK (eh, core_note);
- HOOK (eh, auxv_info);
- HOOK (eh, check_object_attribute);
-- HOOK (eh, return_value_location);
-+ if (soft_float)
-+ eh->return_value_location = arm_return_value_location_soft;
-+ else
-+ eh->return_value_location = arm_return_value_location_hard;
-
- return MODVERSION;
- }
-Index: elfutils-0.146/backends/arm_regs.c
-===================================================================
---- elfutils-0.146.orig/backends/arm_regs.c 2009-04-21 14:50:01.000000000 +0000
-+++ elfutils-0.146/backends/arm_regs.c 2010-04-24 10:11:13.000000000 +0000
-@@ -28,6 +28,7 @@
- #endif
-
- #include <string.h>
-+#include <stdio.h>
- #include <dwarf.h>
-
- #define BACKEND arm_
-@@ -58,7 +59,15 @@
- namelen = 2;
- break;
-
-- case 10 ... 12:
-+ case 10 ... 11:
-+ name[0] = 'r';
-+ name[1] = '1';
-+ name[2] = regno % 10 + '0';
-+ namelen = 3;
-+ break;
-+
-+ case 12:
-+ *type = DW_ATE_unsigned;
- name[0] = 'r';
- name[1] = '1';
- name[2] = regno % 10 + '0';
-@@ -73,6 +82,9 @@
- break;
-
- case 16 + 0 ... 16 + 7:
-+ /* AADWARF says that there are no registers in that range,
-+ * but gcc maps FPA registers here
-+ */
- regno += 96 - 16;
- /* Fall through. */
- case 96 + 0 ... 96 + 7:
-@@ -84,11 +96,139 @@
- namelen = 2;
- break;
-
-+ case 64 + 0 ... 64 + 9:
-+ *setname = "VFP";
-+ *bits = 32;
-+ *type = DW_ATE_float;
-+ name[0] = 's';
-+ name[1] = regno - 64 + '0';
-+ namelen = 2;
-+ break;
-+
-+ case 64 + 10 ... 64 + 31:
-+ *setname = "VFP";
-+ *bits = 32;
-+ *type = DW_ATE_float;
-+ name[0] = 's';
-+ name[1] = (regno - 64) / 10 + '0';
-+ name[2] = (regno - 64) % 10 + '0';
-+ namelen = 3;
-+ break;
-+
-+ case 104 + 0 ... 104 + 7:
-+ /* XXX TODO:
-+ * This can be either intel wireless MMX general purpose/control
-+ * registers or xscale accumulator, which have different usage.
-+ * We only have the intel wireless MMX here now.
-+ * The name needs to be changed for the xscale accumulator too. */
-+ *setname = "MMX";
-+ *type = DW_ATE_unsigned;
-+ *bits = 32;
-+ memcpy(name, "wcgr", 4);
-+ name[4] = regno - 104 + '0';
-+ namelen = 5;
-+ break;
-+
-+ case 112 + 0 ... 112 + 9:
-+ *setname = "MMX";
-+ *type = DW_ATE_unsigned;
-+ *bits = 64;
-+ name[0] = 'w';
-+ name[1] = 'r';
-+ name[2] = regno - 112 + '0';
-+ namelen = 3;
-+ break;
-+
-+ case 112 + 10 ... 112 + 15:
-+ *setname = "MMX";
-+ *type = DW_ATE_unsigned;
-+ *bits = 64;
-+ name[0] = 'w';
-+ name[1] = 'r';
-+ name[2] = '1';
-+ name[3] = regno - 112 - 10 + '0';
-+ namelen = 4;
-+ break;
-+
- case 128:
-+ *setname = "special";
- *type = DW_ATE_unsigned;
- return stpcpy (name, "spsr") + 1 - name;
-
-+ case 129:
-+ *setname = "special";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_fiq") + 1 - name;
-+
-+ case 130:
-+ *setname = "special";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_irq") + 1 - name;
-+
-+ case 131:
-+ *setname = "special";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_abt") + 1 - name;
-+
-+ case 132:
-+ *setname = "special";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_und") + 1 - name;
-+
-+ case 133:
-+ *setname = "special";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_svc") + 1 - name;
-+
-+ case 144 ... 150:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1;
-+
-+ case 151 ... 157:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1;
-+
-+ case 158 ... 159:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1;
-+
-+ case 160 ... 161:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1;
-+
-+ case 162 ... 163:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_und", regno - 162 + 13) + 1;
-+
-+ case 164 ... 165:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1;
-+
-+ case 192 ... 199:
-+ *setname = "MMX";
-+ *bits = 32;
-+ *type = DW_ATE_unsigned;
-+ name[0] = 'w';
-+ name[1] = 'c';
-+ name[2] = regno - 192 + '0';
-+ namelen = 3;
-+ break;
-+
- case 256 + 0 ... 256 + 9:
-+ /* XXX TODO: Neon also uses those registers and can contain
-+ * both float and integers */
- *setname = "VFP";
- *type = DW_ATE_float;
- *bits = 64;
-Index: elfutils-0.146/backends/arm_retval.c
-===================================================================
---- elfutils-0.146.orig/backends/arm_retval.c 2010-01-12 16:57:54.000000000 +0000
-+++ elfutils-0.146/backends/arm_retval.c 2010-04-24 10:11:13.000000000 +0000
-@@ -45,6 +45,13 @@
- #define nloc_intreg 1
- #define nloc_intregs(n) (2 * (n))
-
-+/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */
-+static const Dwarf_Op loc_fpreg[] =
-+ {
-+ { .atom = DW_OP_reg16 },
-+ };
-+#define nloc_fpreg 1
-+
- /* 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. */
-@@ -55,8 +62,9 @@
- #define nloc_aggregate 1
-
-
--int
--arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+static int
-+arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
-+ int soft_float)
- {
- /* Start with the function's type, and get the DW_AT_type attribute,
- which is the type of the return value. */
-@@ -109,14 +117,31 @@
- else
- return -1;
- }
-+ if (tag == DW_TAG_base_type)
-+ {
-+ Dwarf_Word encoding;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+ &attr_mem), &encoding) != 0)
-+ return -1;
-+
-+ if ((encoding == DW_ATE_float) && !soft_float)
-+ {
-+ *locp = loc_fpreg;
-+ if (size <= 8)
-+ return nloc_fpreg;
-+ goto aggregate;
-+ }
-+ }
- 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;
-
-@@ -135,3 +160,18 @@
- DWARF and might be valid. */
- return -2;
- }
-+
-+/* return location for -mabi=apcs-gnu -msoft-float */
-+int
-+arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ return arm_return_value_location_ (functypedie, locp, 1);
-+}
-+
-+/* return location for -mabi=apcs-gnu -mhard-float (current default) */
-+int
-+arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ return arm_return_value_location_ (functypedie, locp, 0);
-+}
-+
-Index: elfutils-0.146/libelf/elf.h
-===================================================================
---- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:11.000000000 +0000
-+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000
-@@ -2290,6 +2290,9 @@
- #define EF_ARM_EABI_VER4 0x04000000
- #define EF_ARM_EABI_VER5 0x05000000
-
-+/* EI_OSABI values */
-+#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */
-+
- /* Additional symbol types for Thumb. */
- #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
- #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
-@@ -2307,12 +2310,19 @@
-
- /* Processor specific values for the Phdr p_type field. */
- #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
-+#define PT_ARM_UNWIND PT_ARM_EXIDX
-
- /* Processor specific values for the Shdr sh_type field. */
- #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */
- #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */
- #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */
-
-+/* Processor specific values for the Dyn d_tag field. */
-+#define DT_ARM_RESERVED1 (DT_LOPROC + 0)
-+#define DT_ARM_SYMTABSZ (DT_LOPROC + 1)
-+#define DT_ARM_PREEMTMAB (DT_LOPROC + 2)
-+#define DT_ARM_RESERVED2 (DT_LOPROC + 3)
-+#define DT_ARM_NUM 4
-
- /* ARM relocs. */
-
-@@ -2344,12 +2354,75 @@
- #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */
- #define R_ARM_GOT32 26 /* 32 bit GOT entry */
- #define R_ARM_PLT32 27 /* 32 bit PLT address */
-+#define R_ARM_CALL 28
-+#define R_ARM_JUMP24 29
-+#define R_ARM_THM_JUMP24 30
-+#define R_ARM_BASE_ABS 31
- #define R_ARM_ALU_PCREL_7_0 32
- #define R_ARM_ALU_PCREL_15_8 33
- #define R_ARM_ALU_PCREL_23_15 34
- #define R_ARM_LDR_SBREL_11_0 35
- #define R_ARM_ALU_SBREL_19_12 36
- #define R_ARM_ALU_SBREL_27_20 37
-+#define R_ARM_TARGET1 38
-+#define R_ARM_SBREL31 39
-+#define R_ARM_V4BX 40
-+#define R_ARM_TARGET2 41
-+#define R_ARM_PREL31 42
-+#define R_ARM_MOVW_ABS_NC 43
-+#define R_ARM_MOVT_ABS 44
-+#define R_ARM_MOVW_PREL_NC 45
-+#define R_ARM_MOVT_PREL 46
-+#define R_ARM_THM_MOVW_ABS_NC 47
-+#define R_ARM_THM_MOVT_ABS 48
-+#define R_ARM_THM_MOVW_PREL_NC 49
-+#define R_ARM_THM_MOVT_PREL 50
-+#define R_ARM_THM_JUMP19 51
-+#define R_ARM_THM_JUMP6 52
-+#define R_ARM_THM_ALU_PREL_11_0 53
-+#define R_ARM_THM_PC12 54
-+#define R_ARM_ABS32_NOI 55
-+#define R_ARM_REL32_NOI 56
-+#define R_ARM_ALU_PC_G0_NC 57
-+#define R_ARM_ALU_PC_G0 58
-+#define R_ARM_ALU_PC_G1_NC 59
-+#define R_ARM_ALU_PC_G1 60
-+#define R_ARM_ALU_PC_G2 61
-+#define R_ARM_LDR_PC_G1 62
-+#define R_ARM_LDR_PC_G2 63
-+#define R_ARM_LDRS_PC_G0 64
-+#define R_ARM_LDRS_PC_G1 65
-+#define R_ARM_LDRS_PC_G2 66
-+#define R_ARM_LDC_PC_G0 67
-+#define R_ARM_LDC_PC_G1 68
-+#define R_ARM_LDC_PC_G2 69
-+#define R_ARM_ALU_SB_G0_NC 70
-+#define R_ARM_ALU_SB_G0 71
-+#define R_ARM_ALU_SB_G1_NC 72
-+#define R_ARM_ALU_SB_G1 73
-+#define R_ARM_ALU_SB_G2 74
-+#define R_ARM_LDR_SB_G0 75
-+#define R_ARM_LDR_SB_G1 76
-+#define R_ARM_LDR_SB_G2 77
-+#define R_ARM_LDRS_SB_G0 78
-+#define R_ARM_LDRS_SB_G1 79
-+#define R_ARM_LDRS_SB_G2 80
-+#define R_ARM_LDC_G0 81
-+#define R_ARM_LDC_G1 82
-+#define R_ARM_LDC_G2 83
-+#define R_ARM_MOVW_BREL_NC 84
-+#define R_ARM_MOVT_BREL 85
-+#define R_ARM_MOVW_BREL 86
-+#define R_ARM_THM_MOVW_BREL_NC 87
-+#define R_ARM_THM_MOVT_BREL 88
-+#define R_ARM_THM_MOVW_BREL 89
-+/* 90-93 unallocated */
-+#define R_ARM_PLT32_ABS 94
-+#define R_ARM_GOT_ABS 95
-+#define R_ARM_GOT_PREL 96
-+#define R_ARM_GOT_BREL12 97
-+#define R_ARM_GOTOFF12 98
-+#define R_ARM_GOTRELAX 99
- #define R_ARM_GNU_VTENTRY 100
- #define R_ARM_GNU_VTINHERIT 101
- #define R_ARM_THM_PC11 102 /* thumb unconditional branch */
-@@ -2364,6 +2437,12 @@
- static TLS block offset */
- #define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static
- TLS block */
-+#define R_ARM_TLS_LDO12 109
-+#define R_ARM_TLS_LE12 110
-+#define R_ARM_TLS_IE12GP 111
-+/* 112 - 127 private range */
-+#define R_ARM_ME_TOO 128 /* obsolete */
-+
- #define R_ARM_RXPC25 249
- #define R_ARM_RSBREL32 250
- #define R_ARM_THM_RPC22 251
-Index: elfutils-0.146/backends/libebl_arm.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/libebl_arm.h 2010-04-24 10:11:13.000000000 +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
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
deleted file mode 100644
index 5baa709000..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
+++ /dev/null
@@ -1,71 +0,0 @@
-Upstream-Status: Backport
-
-Index: elfutils-0.146/libelf/elf.h
-===================================================================
---- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000
-+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:22:43.000000000 +0000
-@@ -143,6 +143,7 @@
- #define ELFOSABI_HPUX 1 /* HP-UX */
- #define ELFOSABI_NETBSD 2 /* NetBSD. */
- #define ELFOSABI_LINUX 3 /* Linux. */
-+#define ELFOSABI_HURD 4 /* GNU/Hurd */
- #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
- #define ELFOSABI_AIX 7 /* IBM AIX. */
- #define ELFOSABI_IRIX 8 /* SGI Irix. */
-@@ -150,8 +151,13 @@
- #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 */
-@@ -206,7 +212,7 @@
- #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 */
-@@ -220,7 +226,8 @@
- #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 */
-@@ -250,7 +257,22 @@
- #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_NUM 95
-+#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_NUM 110
-
- /* If it is necessary to assign new unofficial EM_* values, please
- pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch
deleted file mode 100644
index deba45fa86..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 323ca04a0c9189544075c19b49da67f6443a8950 Mon Sep 17 00:00:00 2001
-From: Li xin <lixin.fnst@cn.fujitsu.com>
-Date: Wed, 21 Jan 2015 09:33:38 +0900
-Subject: [PATCH] elf_begin.c: CVE-2014-9447 fix
-
-this patch is from:
- https://git.fedorahosted.org/cgit/elfutils.git/commit/?id=147018e729e7c22eeabf15b82d26e4bf68a0d18e
-
-Upstream-Status: Backport
-CVE: CVE-2014-9447
-
-Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
----
- libelf/elf_begin.c | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
-index e46add3..e83ba35 100644
---- a/libelf/elf_begin.c
-+++ b/libelf/elf_begin.c
-@@ -736,11 +736,8 @@ read_long_names (Elf *elf)
- break;
-
- /* NUL-terminate the string. */
-- *runp = '\0';
--
-- /* Skip the NUL byte and the \012. */
-- runp += 2;
--
-+ *runp++ = '\0';
-+
- /* A sanity check. Somebody might have generated invalid
- archive. */
- if (runp >= newp + len)
---
-1.8.4.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/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
deleted file mode 100644
index b619619ec0..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Backport
-
-ar.c (do_oper_delete): Fix num passed to memset
-native build failed as following on Fedora18+:
-ar.c: In function 'do_oper_delete':
-ar.c:918:31: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
- memset (found, '\0', sizeof (found));
- ^
-The original commit is http://git.fedorahosted.org/cgit/elfutils.git/commit/src/ar.c?id=1a4d0668d18bf1090c5c08cdb5cb3ba2b8eb5410
-
-Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
-
---- elfutils-0.148/src/ar.c.org 2013-03-12 21:12:17.928281375 -0500
-+++ elfutils-0.148/src/ar.c 2013-03-12 21:15:30.053285271 -0500
-@@ -915,7 +915,7 @@
- long int instance)
- {
- bool *found = alloca (sizeof (bool) * argc);
-- memset (found, '\0', sizeof (found));
-+ memset (found, '\0', sizeof (bool) * argc);
-
- /* List of the files we keep. */
- struct armem *to_copy = NULL;
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
deleted file mode 100644
index 0ff353d0de..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Backport
-
-The ELF_T_LIB and ELF_T_GNUHASH sizes were missing from fsize table.
-
-This could cause a failure in the elf*_xlatetof function.
-
-diff -ur elfutils-0.148.orig/libelf/exttypes.h elfutils-0.148/libelf/exttypes.h
---- elfutils-0.148.orig/libelf/exttypes.h 2009-01-08 12:56:37.000000000 -0800
-+++ elfutils-0.148/libelf/exttypes.h 2010-08-18 14:00:33.000000000 -0700
-@@ -94,6 +94,7 @@
- Vernaux32 (Ext_);
- Syminfo32 (Ext_);
- Move32 (Ext_);
-+Lib32 (Ext_);
- auxv_t32 (Ext_);
-
- Ehdr64 (Ext_);
-@@ -110,6 +111,7 @@
- Vernaux64 (Ext_);
- Syminfo64 (Ext_);
- Move64 (Ext_);
-+Lib64 (Ext_);
- auxv_t64 (Ext_);
-
- #undef START
-diff -ur elfutils-0.148.orig/libelf/gelf_fsize.c elfutils-0.148/libelf/gelf_fsize.c
---- elfutils-0.148.orig/libelf/gelf_fsize.c 2009-01-08 12:56:37.000000000 -0800
-+++ elfutils-0.148/libelf/gelf_fsize.c 2010-08-18 14:11:57.000000000 -0700
-@@ -87,7 +87,9 @@
- [ELF_T_NHDR] = sizeof (ElfW2(LIBELFBITS, Ext_Nhdr)), \
- [ELF_T_SYMINFO] = sizeof (ElfW2(LIBELFBITS, Ext_Syminfo)), \
- [ELF_T_MOVE] = sizeof (ElfW2(LIBELFBITS, Ext_Move)), \
-- [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t))
-+ [ELF_T_LIB] = sizeof (ElfW2(LIBELFBITS, Ext_Lib)), \
-+ [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t)), \
-+ [ELF_T_GNUHASH] = ELFW2(LIBELFBITS, FSZ_WORD)
- TYPE_SIZES (32)
- },
- [ELFCLASS64 - 1] = {
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch
deleted file mode 100644
index 0e28690207..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-This patch fixes a warning seen with gcc 4.8 (especially on ubuntu 13.10)
-
-| addr2line.c: In function 'handle_address':
-| addr2line.c:450:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
-| if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
-| ^
-| addr2line.c:453:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
-| switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
-| ^
-| cc1: all warnings being treated as errors
-
-
-%a is old GNU style and should be abandoned in favor of %m
-
-Also see
-
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54361
-
-to support this assertion
-
-This patch is added via redhat-compatibility patch so lets revert this part
-here.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [Caused by an earlier patch]
-
-Index: elfutils-0.148/src/addr2line.c
-===================================================================
---- elfutils-0.148.orig/src/addr2line.c 2013-09-23 17:46:45.513586538 -0700
-+++ elfutils-0.148/src/addr2line.c 2013-09-23 17:46:46.329586558 -0700
-@@ -447,10 +447,10 @@
- bool parsed = false;
- int i, j;
- char *name = NULL;
-- if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
-+ if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
- && string[i] == '\0')
- parsed = adjust_to_section (name, &addr, dwfl);
-- switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
-+ switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
- {
- default:
- break;
-Index: elfutils-0.148/tests/line2addr.c
-===================================================================
---- elfutils-0.148.orig/tests/line2addr.c 2013-09-23 17:46:45.521586538 -0700
-+++ elfutils-0.148/tests/line2addr.c 2013-09-23 17:46:46.329586558 -0700
-@@ -132,7 +132,7 @@
- {
- struct args a = { .arg = argv[cnt] };
-
-- switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
-+ switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
- {
- default:
- case 0:
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
deleted file mode 100644
index c78f95d693..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Upstream-Status: pending
-gcc 4.7 does not like pointer conversion, so have a void * tmp var to work
-around following compilation issue.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/07/07
-
-| md5.c: In function 'md5_finish_ctx':
-| md5.c:108:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-| md5.c:109:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-| cc1: all warnings being treated as errors
-|
-| make[2]: *** [md5.o] Error 1
-| make[2]: *** Waiting for unfinished jobs....
-| sha1.c: In function 'sha1_finish_ctx':
-| sha1.c:109:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-| sha1.c:111:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-| cc1: all warnings being treated as errors
-|
-| make[2]: *** [sha1.o] Error 1
-
-Index: elfutils-0.148/lib/md5.c
-===================================================================
---- elfutils-0.148.orig/lib/md5.c
-+++ elfutils-0.148/lib/md5.c
-@@ -95,6 +95,7 @@ md5_finish_ctx (ctx, resbuf)
- /* Take yet unprocessed bytes into account. */
- md5_uint32 bytes = ctx->buflen;
- size_t pad;
-+ void * tmp;
-
- /* Now count remaining bytes. */
- ctx->total[0] += bytes;
-@@ -105,9 +106,10 @@ md5_finish_ctx (ctx, resbuf)
- memcpy (&ctx->buffer[bytes], fillbuf, pad);
-
- /* Put the 64-bit file length in *bits* at the end of the buffer. */
-- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
-- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
-- (ctx->total[0] >> 29));
-+ tmp = &ctx->buffer[bytes + pad];
-+ *(md5_uint32 *) tmp = SWAP (ctx->total[0] << 3);
-+ tmp = &ctx->buffer[bytes + pad + 4];
-+ *(md5_uint32 *) tmp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
-
- /* Process last bytes. */
- md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
-Index: elfutils-0.148/lib/sha1.c
-===================================================================
---- elfutils-0.148.orig/lib/sha1.c
-+++ elfutils-0.148/lib/sha1.c
-@@ -96,6 +96,7 @@ sha1_finish_ctx (ctx, resbuf)
- /* Take yet unprocessed bytes into account. */
- sha1_uint32 bytes = ctx->buflen;
- size_t pad;
-+ void * tmp;
-
- /* Now count remaining bytes. */
- ctx->total[0] += bytes;
-@@ -106,9 +107,10 @@ sha1_finish_ctx (ctx, resbuf)
- memcpy (&ctx->buffer[bytes], fillbuf, pad);
-
- /* Put the 64-bit file length in *bits* at the end of the buffer. */
-- *(sha1_uint32 *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) |
-- (ctx->total[0] >> 29));
-- *(sha1_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3);
-+ tmp = &ctx->buffer[bytes + pad];
-+ *(sha1_uint32 *) tmp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
-+ tmp = &ctx->buffer[bytes + pad + 4];
-+ *(sha1_uint32 *) tmp = SWAP (ctx->total[0] << 3);
-
- /* Process last bytes. */
- sha1_process_block (ctx->buffer, bytes + pad + 8, ctx);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/gcc6.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/gcc6.patch
deleted file mode 100644
index b56a754f81..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/gcc6.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Fix warnings found with gcc6
-
-| ../../elfutils-0.148/libdw/dwarf_siblingof.c: In function 'dwarf_siblingof':
-| ../../elfutils-0.148/libdw/dwarf_siblingof.c:69:6: error: nonnull argument 'result' compared to NULL [-Werror=nonnull-compare]
-| if (result == NULL)
-| ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate [ unmaintained ]
-Index: elfutils-0.148/libdw/dwarf_siblingof.c
-===================================================================
---- elfutils-0.148.orig/libdw/dwarf_siblingof.c
-+++ elfutils-0.148/libdw/dwarf_siblingof.c
-@@ -66,9 +66,6 @@ dwarf_siblingof (die, result)
- if (die == NULL)
- return -1;
-
-- if (result == NULL)
-- return -1;
--
- if (result != die)
- result->addr = NULL;
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
deleted file mode 100644
index a86b97c683..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
+++ /dev/null
@@ -1,801 +0,0 @@
-Upstream-Status: Backport
-
-Index: elfutils-0.146/backends/parisc_init.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/parisc_init.c 2010-04-24 10:10:50.000000000 +0000
-@@ -0,0 +1,74 @@
-+/* Initialization of PA-RISC specific backend library.
-+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND parisc_
-+#define RELOC_PREFIX R_PARISC_
-+#include "libebl_CPU.h"
-+#include "libebl_parisc.h"
-+
-+/* This defines the common reloc hooks based on parisc_reloc.def. */
-+#include "common-reloc.c"
-+
-+
-+const char *
-+parisc_init (elf, machine, eh, ehlen)
-+ Elf *elf __attribute__ ((unused));
-+ GElf_Half machine __attribute__ ((unused));
-+ Ebl *eh;
-+ size_t ehlen;
-+{
-+ int pa64 = 0;
-+
-+ /* Check whether the Elf_BH object has a sufficent size. */
-+ if (ehlen < sizeof (Ebl))
-+ return NULL;
-+
-+ if (elf) {
-+ GElf_Ehdr ehdr_mem;
-+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE))
-+ pa64 = 1;
-+ }
-+ /* We handle it. */
-+ eh->name = "PA-RISC";
-+ parisc_init_reloc (eh);
-+ HOOK (eh, reloc_simple_type);
-+ HOOK (eh, machine_flag_check);
-+ HOOK (eh, symbol_type_name);
-+ HOOK (eh, segment_type_name);
-+ HOOK (eh, section_type_name);
-+ HOOK (eh, register_info);
-+ if (pa64)
-+ eh->return_value_location = parisc_return_value_location_64;
-+ else
-+ eh->return_value_location = parisc_return_value_location_32;
-+
-+ return MODVERSION;
-+}
-Index: elfutils-0.146/backends/parisc_regs.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/parisc_regs.c 2010-04-24 10:10:50.000000000 +0000
-@@ -0,0 +1,159 @@
-+/* Register names and numbers for PA-RISC DWARF.
-+ Copyright (C) 2005, 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND parisc_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
-+ const char **prefix, const char **setname,
-+ int *bits, int *type)
-+{
-+ int pa64 = 0;
-+
-+ if (ebl->elf) {
-+ GElf_Ehdr ehdr_mem;
-+ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem);
-+ if (ehdr->e_flags & EF_PARISC_WIDE)
-+ pa64 = 1;
-+ }
-+
-+ int nregs = pa64 ? 127 : 128;
-+
-+ if (name == NULL)
-+ return nregs;
-+
-+ if (regno < 0 || regno >= nregs || namelen < 6)
-+ return -1;
-+
-+ *prefix = "%";
-+
-+ if (regno < 32)
-+ {
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ if (pa64)
-+ {
-+ *bits = 64;
-+ }
-+ else
-+ {
-+ *bits = 32;
-+ }
-+ }
-+ else if (regno == 32)
-+ {
-+ *setname = "special";
-+ if (pa64)
-+ {
-+ *bits = 6;
-+ }
-+ else
-+ {
-+ *bits = 5;
-+ }
-+ *type = DW_ATE_unsigned;
-+ }
-+ else
-+ {
-+ *setname = "FPU";
-+ *type = DW_ATE_float;
-+ if (pa64)
-+ {
-+ *bits = 64;
-+ }
-+ else
-+ {
-+ *bits = 32;
-+ }
-+ }
-+
-+ if (regno < 33) {
-+ switch (regno)
-+ {
-+ case 0 ... 9:
-+ name[0] = 'r';
-+ name[1] = regno + '0';
-+ namelen = 2;
-+ break;
-+ case 10 ... 31:
-+ name[0] = 'r';
-+ name[1] = regno / 10 + '0';
-+ name[2] = regno % 10 + '0';
-+ namelen = 3;
-+ break;
-+ case 32:
-+ *prefix = NULL;
-+ name[0] = 'S';
-+ name[1] = 'A';
-+ name[2] = 'R';
-+ namelen = 3;
-+ break;
-+ }
-+ }
-+ else {
-+ if (pa64 && ((regno - 72) % 2)) {
-+ *setname = NULL;
-+ return 0;
-+ }
-+
-+ switch (regno)
-+ {
-+ case 72 + 0 ... 72 + 11:
-+ name[0] = 'f';
-+ name[1] = 'r';
-+ name[2] = (regno + 8 - 72) / 2 + '0';
-+ namelen = 3;
-+ if ((regno + 8 - 72) % 2) {
-+ name[3] = 'R';
-+ namelen++;
-+ }
-+ break;
-+ case 72 + 12 ... 72 + 55:
-+ name[0] = 'f';
-+ name[1] = 'r';
-+ name[2] = (regno + 8 - 72) / 2 / 10 + '0';
-+ name[3] = (regno + 8 - 72) / 2 % 10 + '0';
-+ namelen = 4;
-+ if ((regno + 8 - 72) % 2) {
-+ name[4] = 'R';
-+ namelen++;
-+ }
-+ break;
-+ default:
-+ *setname = NULL;
-+ return 0;
-+ }
-+ }
-+ name[namelen++] = '\0';
-+ return namelen;
-+}
-Index: elfutils-0.146/backends/parisc_reloc.def
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/parisc_reloc.def 2010-04-24 10:10:50.000000000 +0000
-@@ -0,0 +1,128 @@
-+/* List the relocation types for PA-RISC. -*- C -*-
-+ Copyright (C) 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+/* NAME, REL|EXEC|DYN */
-+
-+RELOC_TYPE (NONE, EXEC|DYN)
-+RELOC_TYPE (DIR32, REL|EXEC|DYN)
-+RELOC_TYPE (DIR21L, REL|EXEC|DYN)
-+RELOC_TYPE (DIR17R, REL)
-+RELOC_TYPE (DIR17F, REL)
-+RELOC_TYPE (DIR14R, REL|DYN)
-+RELOC_TYPE (PCREL32, REL)
-+RELOC_TYPE (PCREL21L, REL)
-+RELOC_TYPE (PCREL17R, REL)
-+RELOC_TYPE (PCREL17F, REL)
-+RELOC_TYPE (PCREL14R, REL|EXEC)
-+RELOC_TYPE (DPREL21L, REL)
-+RELOC_TYPE (DPREL14WR, REL)
-+RELOC_TYPE (DPREL14DR, REL)
-+RELOC_TYPE (DPREL14R, REL)
-+RELOC_TYPE (GPREL21L, 0)
-+RELOC_TYPE (GPREL14R, 0)
-+RELOC_TYPE (LTOFF21L, REL)
-+RELOC_TYPE (LTOFF14R, REL)
-+RELOC_TYPE (DLTIND14F, 0)
-+RELOC_TYPE (SETBASE, 0)
-+RELOC_TYPE (SECREL32, REL)
-+RELOC_TYPE (BASEREL21L, 0)
-+RELOC_TYPE (BASEREL17R, 0)
-+RELOC_TYPE (BASEREL14R, 0)
-+RELOC_TYPE (SEGBASE, 0)
-+RELOC_TYPE (SEGREL32, REL)
-+RELOC_TYPE (PLTOFF21L, 0)
-+RELOC_TYPE (PLTOFF14R, 0)
-+RELOC_TYPE (PLTOFF14F, 0)
-+RELOC_TYPE (LTOFF_FPTR32, 0)
-+RELOC_TYPE (LTOFF_FPTR21L, 0)
-+RELOC_TYPE (LTOFF_FPTR14R, 0)
-+RELOC_TYPE (FPTR64, 0)
-+RELOC_TYPE (PLABEL32, REL|DYN)
-+RELOC_TYPE (PCREL64, 0)
-+RELOC_TYPE (PCREL22C, 0)
-+RELOC_TYPE (PCREL22F, 0)
-+RELOC_TYPE (PCREL14WR, 0)
-+RELOC_TYPE (PCREL14DR, 0)
-+RELOC_TYPE (PCREL16F, 0)
-+RELOC_TYPE (PCREL16WF, 0)
-+RELOC_TYPE (PCREL16DF, 0)
-+RELOC_TYPE (DIR64, REL|DYN)
-+RELOC_TYPE (DIR14WR, REL)
-+RELOC_TYPE (DIR14DR, REL)
-+RELOC_TYPE (DIR16F, REL)
-+RELOC_TYPE (DIR16WF, REL)
-+RELOC_TYPE (DIR16DF, REL)
-+RELOC_TYPE (GPREL64, 0)
-+RELOC_TYPE (GPREL14WR, 0)
-+RELOC_TYPE (GPREL14DR, 0)
-+RELOC_TYPE (GPREL16F, 0)
-+RELOC_TYPE (GPREL16WF, 0)
-+RELOC_TYPE (GPREL16DF, 0)
-+RELOC_TYPE (LTOFF64, 0)
-+RELOC_TYPE (LTOFF14WR, 0)
-+RELOC_TYPE (LTOFF14DR, 0)
-+RELOC_TYPE (LTOFF16F, 0)
-+RELOC_TYPE (LTOFF16WF, 0)
-+RELOC_TYPE (LTOFF16DF, 0)
-+RELOC_TYPE (SECREL64, 0)
-+RELOC_TYPE (BASEREL14WR, 0)
-+RELOC_TYPE (BASEREL14DR, 0)
-+RELOC_TYPE (SEGREL64, 0)
-+RELOC_TYPE (PLTOFF14WR, 0)
-+RELOC_TYPE (PLTOFF14DR, 0)
-+RELOC_TYPE (PLTOFF16F, 0)
-+RELOC_TYPE (PLTOFF16WF, 0)
-+RELOC_TYPE (PLTOFF16DF, 0)
-+RELOC_TYPE (LTOFF_FPTR64, 0)
-+RELOC_TYPE (LTOFF_FPTR14WR, 0)
-+RELOC_TYPE (LTOFF_FPTR14DR, 0)
-+RELOC_TYPE (LTOFF_FPTR16F, 0)
-+RELOC_TYPE (LTOFF_FPTR16WF, 0)
-+RELOC_TYPE (LTOFF_FPTR16DF, 0)
-+RELOC_TYPE (COPY, EXEC)
-+RELOC_TYPE (IPLT, EXEC|DYN)
-+RELOC_TYPE (EPLT, 0)
-+RELOC_TYPE (TPREL32, DYN)
-+RELOC_TYPE (TPREL21L, 0)
-+RELOC_TYPE (TPREL14R, 0)
-+RELOC_TYPE (LTOFF_TP21L, 0)
-+RELOC_TYPE (LTOFF_TP14R, 0)
-+RELOC_TYPE (LTOFF_TP14F, 0)
-+RELOC_TYPE (TPREL64, 0)
-+RELOC_TYPE (TPREL14WR, 0)
-+RELOC_TYPE (TPREL14DR, 0)
-+RELOC_TYPE (TPREL16F, 0)
-+RELOC_TYPE (TPREL16WF, 0)
-+RELOC_TYPE (TPREL16DF, 0)
-+RELOC_TYPE (LTOFF_TP64, 0)
-+RELOC_TYPE (LTOFF_TP14WR, 0)
-+RELOC_TYPE (LTOFF_TP14DR, 0)
-+RELOC_TYPE (LTOFF_TP16F, 0)
-+RELOC_TYPE (LTOFF_TP16WF, 0)
-+RELOC_TYPE (LTOFF_TP16DF, 0)
-+RELOC_TYPE (TLS_DTPMOD32, DYN)
-+RELOC_TYPE (TLS_DTPMOD64, DYN)
-+
-+#define NO_RELATIVE_RELOC 1
-Index: elfutils-0.146/backends/parisc_retval.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/parisc_retval.c 2010-04-24 10:10:50.000000000 +0000
-@@ -0,0 +1,213 @@
-+/* Function return value location for Linux/PA-RISC ABI.
-+ Copyright (C) 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <assert.h>
-+#include <dwarf.h>
-+
-+#define BACKEND parisc_
-+#include "libebl_CPU.h"
-+#include "libebl_parisc.h"
-+
-+/* %r28, or pair %r28, %r29. */
-+static const Dwarf_Op loc_intreg32[] =
-+ {
-+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+
-+static const Dwarf_Op loc_intreg[] =
-+ {
-+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 },
-+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 },
-+ };
-+#define nloc_intreg 1
-+#define nloc_intregpair 4
-+
-+/* %fr4L, or pair %fr4L, %fr4R on pa-32 */
-+static const Dwarf_Op loc_fpreg32[] =
-+ {
-+ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+#define nloc_fpreg32 2
-+#define nloc_fpregpair32 4
-+
-+/* $fr4 */
-+static const Dwarf_Op loc_fpreg[] =
-+ {
-+ { .atom = DW_OP_regx, .number = 72 },
-+ };
-+#define nloc_fpreg 1
-+
-+#if 0
-+/* The return value is a structure and is actually stored in stack space
-+ passed in a hidden argument by the caller. Address of the location is stored
-+ in %r28 before function call, but it may be changed by function. */
-+static const Dwarf_Op loc_aggregate[] =
-+ {
-+ { .atom = DW_OP_breg28 },
-+ };
-+#define nloc_aggregate 1
-+#endif
-+
-+static int
-+parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64)
-+{
-+ Dwarf_Word regsize = pa64 ? 8 : 4;
-+
-+ /* Start with the function's type, and get the DW_AT_type attribute,
-+ which is the type of the return value. */
-+
-+ Dwarf_Attribute attr_mem;
-+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
-+ if (attr == NULL)
-+ /* The function has no return value, like a `void' function in C. */
-+ return 0;
-+
-+ Dwarf_Die die_mem;
-+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
-+ int tag = dwarf_tag (typedie);
-+
-+ /* 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)
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+
-+ switch (tag)
-+ {
-+ case -1:
-+ return -1;
-+
-+ case DW_TAG_subrange_type:
-+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+ /* Fall through. */
-+
-+ case DW_TAG_base_type:
-+ case DW_TAG_enumeration_type:
-+ case DW_TAG_pointer_type:
-+ case DW_TAG_ptr_to_member_type:
-+ {
-+ Dwarf_Word size;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
-+ &attr_mem), &size) != 0)
-+ {
-+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+ size = 4;
-+ else
-+ return -1;
-+ }
-+ if (tag == DW_TAG_base_type)
-+ {
-+ Dwarf_Word encoding;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+ &attr_mem), &encoding) != 0)
-+ return -1;
-+
-+ if (encoding == DW_ATE_float)
-+ {
-+ if (pa64) {
-+ *locp = loc_fpreg;
-+ if (size <= 8)
-+ return nloc_fpreg;
-+ }
-+ else {
-+ *locp = loc_fpreg32;
-+ if (size <= 4)
-+ return nloc_fpreg32;
-+ else if (size <= 8)
-+ return nloc_fpregpair32;
-+ }
-+ goto aggregate;
-+ }
-+ }
-+ if (pa64)
-+ *locp = loc_intreg;
-+ else
-+ *locp = loc_intreg32;
-+ if (size <= regsize)
-+ return nloc_intreg;
-+ if (size <= 2 * regsize)
-+ return nloc_intregpair;
-+
-+ /* Else fall through. */
-+ }
-+
-+ case DW_TAG_structure_type:
-+ case DW_TAG_class_type:
-+ case DW_TAG_union_type:
-+ case DW_TAG_array_type:
-+ aggregate: {
-+ Dwarf_Word size;
-+ if (dwarf_aggregate_size (typedie, &size) != 0)
-+ return -1;
-+ if (pa64)
-+ *locp = loc_intreg;
-+ else
-+ *locp = loc_intreg32;
-+ if (size <= regsize)
-+ return nloc_intreg;
-+ if (size <= 2 * regsize)
-+ return nloc_intregpair;
-+#if 0
-+ /* there should be some way to know this location... But I do not see it. */
-+ *locp = loc_aggregate;
-+ return nloc_aggregate;
-+#endif
-+ /* fall through. */
-+ }
-+ }
-+
-+ /* XXX We don't have a good way to return specific errors from ebl calls.
-+ This value means we do not understand the type, but it is well-formed
-+ DWARF and might be valid. */
-+ return -2;
-+}
-+
-+int
-+parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ return parisc_return_value_location_ (functypedie, locp, 0);
-+}
-+
-+int
-+parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ return parisc_return_value_location_ (functypedie, locp, 1);
-+}
-+
-Index: elfutils-0.146/backends/parisc_symbol.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/parisc_symbol.c 2010-04-24 10:10:50.000000000 +0000
-@@ -0,0 +1,112 @@
-+/* PA-RISC specific symbolic name handling.
-+ Copyright (C) 2002, 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND parisc_
-+#include "libebl_CPU.h"
-+
-+const char *
-+parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)),
-+ size_t len __attribute__ ((unused)))
-+{
-+ switch (segment)
-+ {
-+ case PT_PARISC_ARCHEXT:
-+ return "PARISC_ARCHEXT";
-+ case PT_PARISC_UNWIND:
-+ return "PARISC_UNWIND";
-+ default:
-+ break;
-+ }
-+ return NULL;
-+}
-+
-+/* Return symbolic representation of symbol type. */
-+const char *
-+parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)),
-+ size_t len __attribute__ ((unused)))
-+{
-+ if (symbol == STT_PARISC_MILLICODE)
-+ return "PARISC_MILLI";
-+ return NULL;
-+}
-+
-+/* Return symbolic representation of section type. */
-+const char *
-+parisc_section_type_name (int type,
-+ char *buf __attribute__ ((unused)),
-+ size_t len __attribute__ ((unused)))
-+{
-+ switch (type)
-+ {
-+ case SHT_PARISC_EXT:
-+ return "PARISC_EXT";
-+ case SHT_PARISC_UNWIND:
-+ return "PARISC_UNWIND";
-+ case SHT_PARISC_DOC:
-+ return "PARISC_DOC";
-+ }
-+
-+ return NULL;
-+}
-+
-+/* Check whether machine flags are valid. */
-+bool
-+parisc_machine_flag_check (GElf_Word flags)
-+{
-+ if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB |
-+ EF_PARISC_WIDE | EF_PARISC_NO_KABP |
-+ EF_PARISC_LAZYSWAP | EF_PARISC_ARCH))
-+ return 0;
-+
-+ GElf_Word arch = flags & EF_PARISC_ARCH;
-+
-+ return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) ||
-+ (arch == EFA_PARISC_2_0));
-+}
-+
-+/* Check for the simple reloc types. */
-+Elf_Type
-+parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+ switch (type)
-+ {
-+ case R_PARISC_DIR64:
-+ case R_PARISC_SECREL64:
-+ return ELF_T_XWORD;
-+ case R_PARISC_DIR32:
-+ case R_PARISC_SECREL32:
-+ return ELF_T_WORD;
-+ default:
-+ return ELF_T_NUM;
-+ }
-+}
-Index: elfutils-0.146/backends/libebl_parisc.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/libebl_parisc.h 2010-04-24 10:10:50.000000000 +0000
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_HPPA_H
-+#define _LIBEBL_HPPA_H 1
-+
-+#include <libdw.h>
-+
-+extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.146/backends/Makefile.am
-===================================================================
---- elfutils-0.146.orig/backends/Makefile.am 2010-04-24 10:10:41.000000000 +0000
-+++ elfutils-0.146/backends/Makefile.am 2010-04-24 10:10:50.000000000 +0000
-@@ -29,11 +29,11 @@
- -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
-
-
--modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390
-+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
-- libebl_s390_pic.a
-+ libebl_s390_pic.a libebl_parisc_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -95,6 +95,9 @@
- libebl_s390_pic_a_SOURCES = $(s390_SRCS)
- am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os)
-
-+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
-+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
-+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
-
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- @rm -f $(@:.so=.map)
-Index: elfutils-0.146/libelf/elf.h
-===================================================================
---- elfutils-0.146.orig/libelf/elf.h 2010-04-13 20:08:02.000000000 +0000
-+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:10:50.000000000 +0000
-@@ -1789,16 +1789,24 @@
- #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
- #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
- #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
-+#define R_PARISC_DPREL14WR 19
-+#define R_PARISC_DPREL14DR 20
- #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
- #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
- #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
- #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
- #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
-+#define R_PARISC_DLTIND14F 39
-+#define R_PARISC_SETBASE 40
- #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
-+#define R_PARISC_BASEREL21L 42
-+#define R_PARISC_BASEREL17R 43
-+#define R_PARISC_BASEREL14R 46
- #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
- #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
- #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
- #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
-+#define R_PARISC_PLTOFF14F 55
- #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
- #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
- #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
-@@ -1807,6 +1815,7 @@
- #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
- #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
- #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
-+#define R_PARISC_PCREL22C 73
- #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
- #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
- #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
-@@ -1832,6 +1841,8 @@
- #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
- #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
- #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
-+#define R_PARISC_BASEREL14WR 107
-+#define R_PARISC_BASEREL14DR 108
- #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
- #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
- #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h b/meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h
deleted file mode 100644
index a5cc01f919..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h
+++ /dev/null
@@ -1,1657 +0,0 @@
-#define MNEMONIC_BITS 10
-#define SUFFIX_BITS 3
-#define FCT1_BITS 7
-#define STR1_BITS 4
-#define OFF1_1_BITS 7
-#define OFF1_1_BIAS 3
-#define OFF1_2_BITS 7
-#define OFF1_2_BIAS 4
-#define OFF1_3_BITS 1
-#define OFF1_3_BIAS 7
-#define FCT2_BITS 6
-#define STR2_BITS 2
-#define OFF2_1_BITS 7
-#define OFF2_1_BIAS 5
-#define OFF2_2_BITS 7
-#define OFF2_2_BIAS 4
-#define OFF2_3_BITS 4
-#define OFF2_3_BIAS 7
-#define FCT3_BITS 4
-#define STR3_BITS 1
-#define OFF3_1_BITS 6
-#define OFF3_1_BIAS 10
-#define OFF3_2_BITS 1
-#define OFF3_2_BIAS 21
-
-#include <i386_data.h>
-
-#define suffix_none 0
-#define suffix_w 1
-#define suffix_w0 2
-#define suffix_W 3
-#define suffix_tttn 4
-#define suffix_D 7
-#define suffix_w1 5
-#define suffix_W1 6
-
-static const opfct_t op1_fct[] =
-{
- NULL,
- FCT_MOD$R_M,
- FCT_Mod$R_m,
- FCT_abs,
- FCT_ax,
- FCT_ax$w,
- FCT_ccc,
- FCT_ddd,
- FCT_disp8,
- FCT_ds_bx,
- FCT_ds_si,
- FCT_dx,
- FCT_es_di,
- FCT_freg,
- FCT_imm$s,
- FCT_imm$w,
- FCT_imm16,
- FCT_imm8,
- FCT_imms8,
- FCT_mmxreg,
- FCT_mod$16r_m,
- FCT_mod$64r_m,
- FCT_mod$8r_m,
- FCT_mod$r_m,
- FCT_mod$r_m$w,
- FCT_reg,
- FCT_reg$w,
- FCT_reg16,
- FCT_reg64,
- FCT_rel,
- FCT_sel,
- FCT_sreg2,
- FCT_sreg3,
- FCT_string,
- FCT_xmmreg,
-};
-static const char op1_str[] =
- "%ax\0"
- "%cl\0"
- "%eax\0"
- "%st\0"
- "%xmm0\0"
- "*";
-static const uint8_t op1_str_idx[] = {
- 0,
- 4,
- 8,
- 13,
- 17,
- 23,
-};
-static const opfct_t op2_fct[] =
-{
- NULL,
- FCT_MOD$R_M,
- FCT_Mod$R_m,
- FCT_abs,
- FCT_absval,
- FCT_ax$w,
- FCT_ccc,
- FCT_ddd,
- FCT_ds_si,
- FCT_dx,
- FCT_es_di,
- FCT_freg,
- FCT_imm8,
- FCT_mmxreg,
- FCT_mod$64r_m,
- FCT_mod$r_m,
- FCT_mod$r_m$w,
- FCT_moda$r_m,
- FCT_reg,
- FCT_reg$w,
- FCT_reg64,
- FCT_sreg3,
- FCT_string,
- FCT_xmmreg,
-};
-static const char op2_str[] =
- "%ecx\0"
- "%st";
-static const uint8_t op2_str_idx[] = {
- 0,
- 5,
-};
-static const opfct_t op3_fct[] =
-{
- NULL,
- FCT_mmxreg,
- FCT_mod$r_m,
- FCT_reg,
- FCT_string,
- FCT_xmmreg,
-};
-static const char op3_str[] =
- "%edx";
-static const uint8_t op3_str_idx[] = {
- 0,
-};
-static const struct instr_enc instrtab[] =
-{
- { .mnemonic = MNE_aaa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_aad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_aam, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_aas, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addsubpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addsubps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_arpl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bound, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 17, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bsf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bswap, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bt, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_btc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_btc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_btr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_btr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bts, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bts, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_call, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_call, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 21, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lcall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 30, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 4, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lcall, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 21, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_clc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cli, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_syscall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_clts, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sysret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sysenter, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sysexit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmov, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmps, .rep = 0, .repe = 1, .suffix = 1, .modrm = 0, .fct1 = 12, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 8, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpxchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 11, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 8, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpxchg8b, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cpuid, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtdq2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpd2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttpd2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_daa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_das, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_dec, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_dec, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_div, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_emms, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_enter, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 12, .str2 = 0, .off2_1 = 19, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fchs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fabs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ftst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxam, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fld1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldl2t, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldl2e, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldpi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldlg2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldln2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldz, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_f2xm1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fyl2x, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fptan, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fpatan, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxtract, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fprem1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdecstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fincstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fprem, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fyl2xp1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsqrt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsincos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_frndint, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fscale, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsin, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fst, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fstp, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldenv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldcw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnstenv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnstcw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_faddp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fiadd, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmove, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fmulp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fimul, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fisub, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fisubr, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnstsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 1, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fbld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fbstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fchs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fclex, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_finit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fwait, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnclex, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmove, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovnb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovne, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovnbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovnu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcom, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcom, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomp, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcompp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fucomi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fucomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdecstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fidivl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fidiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fidivrl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fidivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ffree, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ficom, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ficomp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fild, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fildl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fildll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fincstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fninit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fist, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fistp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fistpll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fisttp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fisttpll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fstpt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fld, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fucom, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_frstor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fucomp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnsave, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnstsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_hlt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_idiv, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 14, .str1 = 0, .off1_1 = 13, .off1_2 = 2, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_in, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_in, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 11, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_inc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_inc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ins, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 11, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_int, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_int3, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_into, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_invd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_swapgs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_invlpg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_iret, .rep = 0, .repe = 0, .suffix = 6, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_j, .rep = 0, .repe = 0, .suffix = 4, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_j, .rep = 0, .repe = 0, .suffix = 4, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_set, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 21, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ljmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 30, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 4, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ljmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 21, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lahf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lar, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lds, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lea, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_leave, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_les, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lfs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lgs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lgdt, .rep = 0, .repe = 0, .suffix = 2, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lidt, .rep = 0, .repe = 0, .suffix = 2, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lmsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lock, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lods, .rep = 1, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_loop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_loope, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_loopne, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lsl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ltr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 3, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 35, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 37, .off1_2 = 3, .off1_3 = 0, .fct2 = 3, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 6, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 6, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 7, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 7, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movs, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movsbl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movswl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movzbl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movzwl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mul, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_neg, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pause, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_nop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_popcnt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_not, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_out, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 12, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_out, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 9, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_outs, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 9, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_popf, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 14, .str1 = 0, .off1_1 = 5, .off1_2 = 2, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 31, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pusha, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_popa, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pushf, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rdmsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rdpmc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rdtsc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ret, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ret, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rsm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sahf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_scas, .rep = 0, .repe = 1, .suffix = 0, .modrm = 0, .fct1 = 12, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_set, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
- { .mnemonic = MNE_shld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
- { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
- { .mnemonic = MNE_shrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
- { .mnemonic = MNE_vmcall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmlaunch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmresume, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmxoff, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmread, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 28, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 14, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmwrite, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sgdtl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_monitor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 3, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 1, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 4, .str3 = 1, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mwait, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 3, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 1, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sidtl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_smsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_stc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_std, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sti, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_stos, .rep = 1, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_str, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ud2a, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_verr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_verw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_wbinvd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetchw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetchnta, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetcht0, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetcht1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetcht2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_nop, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_wrmsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 11, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 8, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 4, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xlat, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 9, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_emms, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pand, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pand, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pandn, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pandn, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaddwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaddwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_por, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_por, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pxor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pxor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpeqps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpltps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpleps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpunordps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpneqps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpnltps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpnleps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpordps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpeqss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpltss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpless, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpunordss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpneqss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpnltss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpnless, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpordss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxrstor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxsave, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ldmxcsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_stmxcsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movupd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movups, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movupd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movups, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movddup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movsldup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_unpcklpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_unpcklps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_unpckhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_unpckhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movshdup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movapd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movaps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movapd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movaps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtsi2sd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtsi2ss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpi2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpi2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movntpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movntps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttsd2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttss2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttpd2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttps2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpd2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtsd2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtss2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtps2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ucomisd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ucomiss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_comisd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_comiss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_getsec, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movmskpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movmskps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sqrtpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sqrtsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sqrtss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sqrtps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rsqrtss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rsqrtps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcpss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcpps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_orpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_orps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xorpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xorps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mulsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mulss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mulpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mulps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtsd2ss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtss2sd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpd2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtps2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtps2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttps2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtdq2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_subsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_subss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_subpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_subps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_minsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_minss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_minpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_minps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_divsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_divss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_divpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_divps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maxsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maxss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maxpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maxps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packsswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packsswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packuswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packuswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packssdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packssdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklqdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhqdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pshufd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pshuflw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pshufhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pshufw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_haddpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_haddps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_hsubpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_hsubps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movnti, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pinsrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pinsrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
- { .mnemonic = MNE_pextrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pextrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
- { .mnemonic = MNE_shufpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_shufps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
- { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmullw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmullw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdq2q, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 19, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovmskb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovmskb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 19, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pavgb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pavgb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pavgw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pavgw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movntdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movntq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lddqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmuludq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmuludq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maskmovdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maskmovq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 19, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pshufb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pshufb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaddubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaddubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhrsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhrsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_palignr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_palignr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_vmclear, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmxon, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmptrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmptrst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_clflush, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_blendps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_blendpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_blendvps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_blendvpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_dpps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_dppd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_insertps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_movntdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mpsadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_packusdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pblendvb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pblendw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpestri, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpestrm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpistri, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpistrm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phminposuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pinsrb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pinsrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxud, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminud, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxbd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxbq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxwq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxbd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxbq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxwq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmuldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ptest, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_roundps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_roundpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_roundss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_roundsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 31, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
-};
-static const uint8_t match_data[] =
-{
- 0x11, 0x37,
- 0x22, 0xd5, 0xa,
- 0x22, 0xd4, 0xa,
- 0x11, 0x3f,
- 0x1, 0xfe, 0x14,
- 0x2, 0xfe, 0x80, 0x38, 0x10,
- 0x2, 0xfe, 0x82, 0x38, 0x10,
- 0x2, 0xfe, 0x10, 0, 0,
- 0x2, 0xfe, 0x12, 0, 0,
- 0x1, 0xfe, 0x4,
- 0x2, 0xfe, 0x80, 0x38, 0,
- 0x12, 0x83, 0x38, 0,
- 0x2, 0xfe, 0, 0, 0,
- 0x2, 0xfe, 0x2, 0, 0,
- 0x34, 0x66, 0xf, 0xd0, 0, 0,
- 0x34, 0xf2, 0xf, 0xd0, 0, 0,
- 0x1, 0xfe, 0x24,
- 0x2, 0xfe, 0x80, 0x38, 0x20,
- 0x2, 0xfe, 0x82, 0x38, 0x20,
- 0x2, 0xfe, 0x20, 0, 0,
- 0x2, 0xfe, 0x22, 0, 0,
- 0x34, 0x66, 0xf, 0x54, 0, 0,
- 0x23, 0xf, 0x54, 0, 0,
- 0x34, 0x66, 0xf, 0x55, 0, 0,
- 0x23, 0xf, 0x55, 0, 0,
- 0x12, 0x63, 0, 0,
- 0x12, 0x62, 0, 0,
- 0x23, 0xf, 0xbc, 0, 0,
- 0x23, 0xf, 0xbd, 0, 0,
- 0x12, 0xf, 0xf8, 0xc8,
- 0x23, 0xf, 0xa3, 0, 0,
- 0x23, 0xf, 0xba, 0x38, 0x20,
- 0x23, 0xf, 0xbb, 0, 0,
- 0x23, 0xf, 0xba, 0x38, 0x38,
- 0x23, 0xf, 0xb3, 0, 0,
- 0x23, 0xf, 0xba, 0x38, 0x30,
- 0x23, 0xf, 0xab, 0, 0,
- 0x23, 0xf, 0xba, 0x38, 0x28,
- 0x11, 0xe8,
- 0x12, 0xff, 0x38, 0x10,
- 0x11, 0x9a,
- 0x12, 0xff, 0x38, 0x18,
- 0x11, 0x98,
- 0x11, 0x99,
- 0x11, 0xf8,
- 0x11, 0xfc,
- 0x11, 0xfa,
- 0x22, 0xf, 0x5,
- 0x22, 0xf, 0x6,
- 0x22, 0xf, 0x7,
- 0x22, 0xf, 0x34,
- 0x22, 0xf, 0x35,
- 0x11, 0xf5,
- 0x13, 0xf, 0xf0, 0x40, 0, 0,
- 0x1, 0xfe, 0x3c,
- 0x2, 0xfe, 0x80, 0x38, 0x38,
- 0x12, 0x83, 0x38, 0x38,
- 0x2, 0xfe, 0x38, 0, 0,
- 0x2, 0xfe, 0x3a, 0, 0,
- 0x34, 0xf2, 0xf, 0xc2, 0, 0,
- 0x34, 0xf3, 0xf, 0xc2, 0, 0,
- 0x34, 0x66, 0xf, 0xc2, 0, 0,
- 0x23, 0xf, 0xc2, 0, 0,
- 0x1, 0xfe, 0xa6,
- 0x13, 0xf, 0xfe, 0xb0, 0, 0,
- 0x23, 0xf, 0xc7, 0x38, 0x8,
- 0x22, 0xf, 0xa2,
- 0x34, 0xf3, 0xf, 0xe6, 0, 0,
- 0x34, 0xf2, 0xf, 0xe6, 0, 0,
- 0x34, 0x66, 0xf, 0xe6, 0, 0,
- 0x11, 0x27,
- 0x11, 0x2f,
- 0x2, 0xfe, 0xfe, 0x38, 0x8,
- 0x1, 0xf8, 0x48,
- 0x2, 0xfe, 0xf6, 0x38, 0x30,
- 0x22, 0xf, 0x77,
- 0x11, 0xc8,
- 0x22, 0xd9, 0xd0,
- 0x22, 0xd9, 0xe0,
- 0x22, 0xd9, 0xe1,
- 0x22, 0xd9, 0xe4,
- 0x22, 0xd9, 0xe5,
- 0x22, 0xd9, 0xe8,
- 0x22, 0xd9, 0xe9,
- 0x22, 0xd9, 0xea,
- 0x22, 0xd9, 0xeb,
- 0x22, 0xd9, 0xec,
- 0x22, 0xd9, 0xed,
- 0x22, 0xd9, 0xee,
- 0x22, 0xd9, 0xf0,
- 0x22, 0xd9, 0xf1,
- 0x22, 0xd9, 0xf2,
- 0x22, 0xd9, 0xf3,
- 0x22, 0xd9, 0xf4,
- 0x22, 0xd9, 0xf5,
- 0x22, 0xd9, 0xf6,
- 0x22, 0xd9, 0xf7,
- 0x22, 0xd9, 0xf8,
- 0x22, 0xd9, 0xf9,
- 0x22, 0xd9, 0xfa,
- 0x22, 0xd9, 0xfb,
- 0x22, 0xd9, 0xfc,
- 0x22, 0xd9, 0xfd,
- 0x22, 0xd9, 0xfe,
- 0x22, 0xd9, 0xff,
- 0x12, 0xd8, 0xf8, 0xc0,
- 0x12, 0xdc, 0xf8, 0xc0,
- 0x2, 0xfb, 0xd8, 0x38, 0,
- 0x12, 0xd8, 0xf8, 0xc8,
- 0x12, 0xdc, 0xf8, 0xc8,
- 0x2, 0xfb, 0xd8, 0x38, 0x8,
- 0x12, 0xd8, 0xf8, 0xe0,
- 0x12, 0xdc, 0xf8, 0xe0,
- 0x2, 0xfb, 0xd8, 0x38, 0x20,
- 0x12, 0xd8, 0xf8, 0xe8,
- 0x12, 0xdc, 0xf8, 0xe8,
- 0x2, 0xfb, 0xd8, 0x38, 0x28,
- 0x12, 0xdd, 0xf8, 0xd0,
- 0x2, 0xfb, 0xd9, 0x38, 0x10,
- 0x12, 0xdd, 0xf8, 0xd8,
- 0x2, 0xfb, 0xd9, 0x38, 0x18,
- 0x12, 0xd9, 0x38, 0x20,
- 0x12, 0xd9, 0x38, 0x28,
- 0x12, 0xd9, 0x38, 0x30,
- 0x12, 0xd9, 0x38, 0x38,
- 0x12, 0xd9, 0xf8, 0xc8,
- 0x12, 0xde, 0xf8, 0xc0,
- 0x12, 0xda, 0xf8, 0xc0,
- 0x2, 0xfb, 0xda, 0x38, 0,
- 0x12, 0xda, 0xf8, 0xc8,
- 0x12, 0xde, 0xf8, 0xc8,
- 0x2, 0xfb, 0xda, 0x38, 0x8,
- 0x12, 0xde, 0xf8, 0xe0,
- 0x2, 0xfb, 0xda, 0x38, 0x20,
- 0x12, 0xde, 0xf8, 0xe8,
- 0x2, 0xfb, 0xda, 0x38, 0x28,
- 0x22, 0xdf, 0xe0,
- 0x12, 0xdf, 0x38, 0x20,
- 0x12, 0xdf, 0xf8, 0xf0,
- 0x12, 0xdf, 0x38, 0x30,
- 0x22, 0xd9, 0xe0,
- 0x33, 0x9b, 0xdb, 0xe2,
- 0x33, 0x9b, 0xdb, 0xe3,
- 0x11, 0x9b,
- 0x22, 0xdb, 0xe2,
- 0x12, 0xda, 0xf8, 0xc0,
- 0x12, 0xda, 0xf8, 0xc8,
- 0x12, 0xda, 0xf8, 0xd0,
- 0x12, 0xda, 0xf8, 0xd8,
- 0x12, 0xdb, 0xf8, 0xc0,
- 0x12, 0xdb, 0xf8, 0xc8,
- 0x12, 0xdb, 0xf8, 0xd0,
- 0x12, 0xdb, 0xf8, 0xd8,
- 0x12, 0xd8, 0xf8, 0xd0,
- 0x2, 0xfb, 0xd8, 0x38, 0x10,
- 0x12, 0xd8, 0xf8, 0xd8,
- 0x2, 0xfb, 0xd8, 0x38, 0x18,
- 0x22, 0xde, 0xd9,
- 0x12, 0xdb, 0xf8, 0xf0,
- 0x12, 0xdf, 0xf8, 0xf0,
- 0x12, 0xdb, 0xf8, 0xe8,
- 0x12, 0xdf, 0xf8, 0xe8,
- 0x22, 0xd9, 0xff,
- 0x22, 0xd9, 0xf6,
- 0x12, 0xd8, 0xf8, 0xf0,
- 0x12, 0xdc, 0xf8, 0xf0,
- 0x2, 0xfb, 0xd8, 0x38, 0x30,
- 0x12, 0xda, 0x38, 0x30,
- 0x12, 0xde, 0xf8, 0xf0,
- 0x12, 0xde, 0x38, 0x30,
- 0x12, 0xde, 0xf8, 0xf8,
- 0x12, 0xd8, 0xf8, 0xf8,
- 0x12, 0xdc, 0xf8, 0xf8,
- 0x2, 0xfb, 0xd8, 0x38, 0x38,
- 0x12, 0xda, 0x38, 0x38,
- 0x12, 0xde, 0x38, 0x38,
- 0x12, 0xde, 0xf8, 0xf0,
- 0x12, 0xdd, 0xf8, 0xc0,
- 0x12, 0xda, 0xf8, 0xd0,
- 0x2, 0xfb, 0xda, 0x38, 0x10,
- 0x12, 0xda, 0xf8, 0xd8,
- 0x2, 0xfb, 0xda, 0x38, 0x18,
- 0x12, 0xdf, 0x38, 0,
- 0x12, 0xdb, 0x38, 0,
- 0x12, 0xdf, 0x38, 0x28,
- 0x22, 0xd9, 0xf7,
- 0x22, 0xdb, 0xe3,
- 0x2, 0xfb, 0xdb, 0x38, 0x10,
- 0x2, 0xfb, 0xdb, 0x38, 0x18,
- 0x12, 0xdf, 0x38, 0x38,
- 0x2, 0xfb, 0xdb, 0x38, 0x8,
- 0x12, 0xdd, 0x38, 0x8,
- 0x12, 0xdb, 0x38, 0x28,
- 0x12, 0xdb, 0x38, 0x38,
- 0x12, 0xd9, 0xf8, 0xc0,
- 0x2, 0xfb, 0xd9, 0x38, 0,
- 0x12, 0xdd, 0xf8, 0xe0,
- 0x12, 0xdd, 0x38, 0x20,
- 0x12, 0xdd, 0xf8, 0xe8,
- 0x12, 0xdd, 0x38, 0x30,
- 0x12, 0xdd, 0x38, 0x38,
- 0x11, 0xf4,
- 0x2, 0xfe, 0xf6, 0x38, 0x38,
- 0x2, 0xfe, 0xf6, 0x38, 0x28,
- 0x23, 0xf, 0xaf, 0, 0,
- 0x2, 0xfd, 0x69, 0, 0,
- 0x1, 0xfe, 0xe4,
- 0x1, 0xfe, 0xec,
- 0x2, 0xfe, 0xfe, 0x38, 0,
- 0x1, 0xf8, 0x40,
- 0x1, 0xfe, 0x6c,
- 0x11, 0xcd,
- 0x11, 0xcc,
- 0x11, 0xce,
- 0x22, 0xf, 0x8,
- 0x33, 0xf, 0x1, 0xf8,
- 0x23, 0xf, 0x1, 0x38, 0x38,
- 0x11, 0xcf,
- 0x1, 0xf0, 0x70,
- 0x12, 0xf, 0xf0, 0x80,
- 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
- 0x11, 0xe3,
- 0x11, 0xeb,
- 0x11, 0xe9,
- 0x12, 0xff, 0x38, 0x20,
- 0x11, 0xea,
- 0x12, 0xff, 0x38, 0x28,
- 0x11, 0x9f,
- 0x23, 0xf, 0x2, 0, 0,
- 0x12, 0xc5, 0, 0,
- 0x12, 0x8d, 0, 0,
- 0x11, 0xc9,
- 0x12, 0xc4, 0, 0,
- 0x23, 0xf, 0xb4, 0, 0,
- 0x23, 0xf, 0xb5, 0, 0,
- 0x23, 0xf, 0x1, 0x38, 0x10,
- 0x23, 0xf, 0x1, 0x38, 0x18,
- 0x23, 0xf, 0, 0x38, 0x10,
- 0x23, 0xf, 0x1, 0x38, 0x30,
- 0x11, 0xf0,
- 0x1, 0xfe, 0xac,
- 0x11, 0xe2,
- 0x11, 0xe1,
- 0x11, 0xe0,
- 0x23, 0xf, 0x3, 0, 0,
- 0x23, 0xf, 0xb2, 0, 0,
- 0x23, 0xf, 0, 0x38, 0x18,
- 0x2, 0xfe, 0x88, 0, 0,
- 0x2, 0xfe, 0x8a, 0, 0,
- 0x2, 0xfe, 0xc6, 0x38, 0,
- 0x1, 0xf0, 0xb0,
- 0x1, 0xfe, 0xa0,
- 0x1, 0xfe, 0xa2,
- 0x23, 0xf, 0x20, 0xc0, 0xc0,
- 0x23, 0xf, 0x22, 0xc0, 0xc0,
- 0x23, 0xf, 0x21, 0xc0, 0xc0,
- 0x23, 0xf, 0x23, 0xc0, 0xc0,
- 0x12, 0x8c, 0, 0,
- 0x12, 0x8e, 0, 0,
- 0x1, 0xfe, 0xa4,
- 0x23, 0xf, 0xbe, 0, 0,
- 0x23, 0xf, 0xbf, 0, 0,
- 0x23, 0xf, 0xb6, 0, 0,
- 0x23, 0xf, 0xb7, 0, 0,
- 0x2, 0xfe, 0xf6, 0x38, 0x20,
- 0x2, 0xfe, 0xf6, 0x38, 0x18,
- 0x22, 0xf3, 0x90,
- 0x11, 0x90,
- 0x34, 0xf3, 0xf, 0xb8, 0, 0,
- 0x2, 0xfe, 0xf6, 0x38, 0x10,
- 0x2, 0xfe, 0x8, 0, 0,
- 0x2, 0xfe, 0xa, 0, 0,
- 0x2, 0xfe, 0x80, 0x38, 0x8,
- 0x2, 0xfe, 0x82, 0x38, 0x8,
- 0x1, 0xfe, 0xc,
- 0x1, 0xfe, 0xe6,
- 0x1, 0xfe, 0xee,
- 0x1, 0xfe, 0x6e,
- 0x12, 0x8f, 0x38, 0,
- 0x12, 0xf, 0xc7, 0x81,
- 0x11, 0x9d,
- 0x12, 0xff, 0x38, 0x30,
- 0x1, 0xf8, 0x50,
- 0x1, 0xf8, 0x58,
- 0x1, 0xfd, 0x68,
- 0x1, 0xe7, 0x6,
- 0x12, 0xf, 0xc7, 0x80,
- 0x11, 0x60,
- 0x11, 0x61,
- 0x11, 0x9c,
- 0x2, 0xfe, 0xd0, 0x38, 0x10,
- 0x2, 0xfe, 0xd2, 0x38, 0x10,
- 0x2, 0xfe, 0xc0, 0x38, 0x10,
- 0x2, 0xfe, 0xd0, 0x38, 0x18,
- 0x2, 0xfe, 0xd2, 0x38, 0x18,
- 0x2, 0xfe, 0xc0, 0x38, 0x18,
- 0x22, 0xf, 0x32,
- 0x22, 0xf, 0x33,
- 0x22, 0xf, 0x31,
- 0x11, 0xc3,
- 0x11, 0xc2,
- 0x11, 0xcb,
- 0x11, 0xca,
- 0x2, 0xfe, 0xd0, 0x38, 0,
- 0x2, 0xfe, 0xd2, 0x38, 0,
- 0x2, 0xfe, 0xc0, 0x38, 0,
- 0x2, 0xfe, 0xd0, 0x38, 0x8,
- 0x2, 0xfe, 0xd2, 0x38, 0x8,
- 0x2, 0xfe, 0xc0, 0x38, 0x8,
- 0x22, 0xf, 0xaa,
- 0x11, 0x9e,
- 0x2, 0xfe, 0xd0, 0x38, 0x38,
- 0x2, 0xfe, 0xd2, 0x38, 0x38,
- 0x2, 0xfe, 0xc0, 0x38, 0x38,
- 0x2, 0xfe, 0x18, 0, 0,
- 0x2, 0xfe, 0x1a, 0, 0,
- 0x1, 0xfe, 0x1c,
- 0x2, 0xfe, 0x80, 0x38, 0x18,
- 0x2, 0xfe, 0x82, 0x38, 0x18,
- 0x1, 0xfe, 0xae,
- 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
- 0x2, 0xfe, 0xd0, 0x38, 0x20,
- 0x2, 0xfe, 0xd2, 0x38, 0x20,
- 0x2, 0xfe, 0xc0, 0x38, 0x20,
- 0x2, 0xfe, 0xd0, 0x38, 0x28,
- 0x23, 0xf, 0xa4, 0, 0,
- 0x23, 0xf, 0xa5, 0, 0,
- 0x2, 0xfe, 0xd2, 0x38, 0x28,
- 0x2, 0xfe, 0xc0, 0x38, 0x28,
- 0x23, 0xf, 0xac, 0, 0,
- 0x23, 0xf, 0xad, 0, 0,
- 0x33, 0xf, 0x1, 0xc1,
- 0x33, 0xf, 0x1, 0xc2,
- 0x33, 0xf, 0x1, 0xc3,
- 0x33, 0xf, 0x1, 0xc4,
- 0x23, 0xf, 0x78, 0, 0,
- 0x23, 0xf, 0x79, 0, 0,
- 0x23, 0xf, 0x1, 0x38, 0,
- 0x33, 0xf, 0x1, 0xc8,
- 0x33, 0xf, 0x1, 0xc9,
- 0x23, 0xf, 0x1, 0x38, 0x8,
- 0x23, 0xf, 0, 0x38, 0,
- 0x23, 0xf, 0x1, 0x38, 0x20,
- 0x11, 0xf9,
- 0x11, 0xfd,
- 0x11, 0xfb,
- 0x1, 0xfe, 0xaa,
- 0x23, 0xf, 0, 0x38, 0x8,
- 0x2, 0xfe, 0x28, 0, 0,
- 0x2, 0xfe, 0x2a, 0, 0,
- 0x1, 0xfe, 0x2c,
- 0x2, 0xfe, 0x80, 0x38, 0x28,
- 0x2, 0xfe, 0x82, 0x38, 0x28,
- 0x2, 0xfe, 0x84, 0, 0,
- 0x1, 0xfe, 0xa8,
- 0x2, 0xfe, 0xf6, 0x38, 0,
- 0x22, 0xf, 0xb,
- 0x23, 0xf, 0, 0x38, 0x20,
- 0x23, 0xf, 0, 0x38, 0x28,
- 0x22, 0xf, 0x9,
- 0x23, 0xf, 0xd, 0x38, 0,
- 0x23, 0xf, 0xd, 0x38, 0x8,
- 0x23, 0xf, 0x18, 0x38, 0,
- 0x23, 0xf, 0x18, 0x38, 0x8,
- 0x23, 0xf, 0x18, 0x38, 0x10,
- 0x23, 0xf, 0x18, 0x38, 0x18,
- 0x23, 0xf, 0x1f, 0, 0,
- 0x22, 0xf, 0x30,
- 0x13, 0xf, 0xfe, 0xc0, 0, 0,
- 0x2, 0xfe, 0x86, 0, 0,
- 0x1, 0xf8, 0x90,
- 0x11, 0xd7,
- 0x2, 0xfe, 0x30, 0, 0,
- 0x2, 0xfe, 0x32, 0, 0,
- 0x1, 0xfe, 0x34,
- 0x2, 0xfe, 0x80, 0x38, 0x30,
- 0x2, 0xfe, 0x82, 0x38, 0x30,
- 0x22, 0xf, 0x77,
- 0x34, 0x66, 0xf, 0xdb, 0, 0,
- 0x23, 0xf, 0xdb, 0, 0,
- 0x34, 0x66, 0xf, 0xdf, 0, 0,
- 0x23, 0xf, 0xdf, 0, 0,
- 0x34, 0x66, 0xf, 0xf5, 0, 0,
- 0x23, 0xf, 0xf5, 0, 0,
- 0x34, 0x66, 0xf, 0xeb, 0, 0,
- 0x23, 0xf, 0xeb, 0, 0,
- 0x34, 0x66, 0xf, 0xef, 0, 0,
- 0x23, 0xf, 0xef, 0, 0,
- 0x23, 0xf, 0x55, 0, 0,
- 0x23, 0xf, 0x54, 0, 0,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x1,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x2,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x3,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x4,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x5,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x6,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x7,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x1,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x2,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x3,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x4,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x5,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x6,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x7,
- 0x23, 0xf, 0xae, 0x38, 0x8,
- 0x23, 0xf, 0xae, 0x38, 0,
- 0x23, 0xf, 0xae, 0x38, 0x10,
- 0x23, 0xf, 0xae, 0x38, 0x18,
- 0x34, 0xf2, 0xf, 0x10, 0, 0,
- 0x34, 0xf3, 0xf, 0x10, 0, 0,
- 0x34, 0x66, 0xf, 0x10, 0, 0,
- 0x23, 0xf, 0x10, 0, 0,
- 0x34, 0xf2, 0xf, 0x11, 0, 0,
- 0x34, 0xf3, 0xf, 0x11, 0, 0,
- 0x34, 0x66, 0xf, 0x11, 0, 0,
- 0x23, 0xf, 0x11, 0, 0,
- 0x34, 0xf2, 0xf, 0x12, 0, 0,
- 0x34, 0xf3, 0xf, 0x12, 0, 0,
- 0x34, 0x66, 0xf, 0x12, 0, 0,
- 0x23, 0xf, 0x12, 0xc0, 0xc0,
- 0x23, 0xf, 0x12, 0, 0,
- 0x34, 0x66, 0xf, 0x13, 0xc0, 0xc0,
- 0x23, 0xf, 0x13, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0x13, 0, 0,
- 0x23, 0xf, 0x13, 0, 0,
- 0x34, 0x66, 0xf, 0x14, 0, 0,
- 0x23, 0xf, 0x14, 0, 0,
- 0x34, 0x66, 0xf, 0x15, 0, 0,
- 0x23, 0xf, 0x15, 0, 0,
- 0x34, 0xf3, 0xf, 0x16, 0, 0,
- 0x34, 0x66, 0xf, 0x16, 0, 0,
- 0x23, 0xf, 0x16, 0xc0, 0xc0,
- 0x23, 0xf, 0x16, 0, 0,
- 0x34, 0x66, 0xf, 0x17, 0xc0, 0xc0,
- 0x23, 0xf, 0x17, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0x17, 0, 0,
- 0x23, 0xf, 0x17, 0, 0,
- 0x34, 0x66, 0xf, 0x28, 0, 0,
- 0x23, 0xf, 0x28, 0, 0,
- 0x34, 0x66, 0xf, 0x29, 0, 0,
- 0x23, 0xf, 0x29, 0, 0,
- 0x34, 0xf2, 0xf, 0x2a, 0, 0,
- 0x34, 0xf3, 0xf, 0x2a, 0, 0,
- 0x34, 0x66, 0xf, 0x2a, 0, 0,
- 0x23, 0xf, 0x2a, 0, 0,
- 0x34, 0x66, 0xf, 0x2b, 0, 0,
- 0x23, 0xf, 0x2b, 0, 0,
- 0x34, 0xf2, 0xf, 0x2c, 0, 0,
- 0x34, 0xf3, 0xf, 0x2c, 0, 0,
- 0x34, 0x66, 0xf, 0x2c, 0, 0,
- 0x23, 0xf, 0x2c, 0, 0,
- 0x34, 0x66, 0xf, 0x2d, 0, 0,
- 0x34, 0xf2, 0xf, 0x2d, 0, 0,
- 0x34, 0xf3, 0xf, 0x2d, 0, 0,
- 0x23, 0xf, 0x2d, 0, 0,
- 0x34, 0x66, 0xf, 0x2e, 0, 0,
- 0x23, 0xf, 0x2e, 0, 0,
- 0x34, 0x66, 0xf, 0x2f, 0, 0,
- 0x23, 0xf, 0x2f, 0, 0,
- 0x22, 0xf, 0x37,
- 0x34, 0x66, 0xf, 0x50, 0xc0, 0xc0,
- 0x23, 0xf, 0x50, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0x51, 0, 0,
- 0x34, 0xf2, 0xf, 0x51, 0, 0,
- 0x34, 0xf3, 0xf, 0x51, 0, 0,
- 0x23, 0xf, 0x51, 0, 0,
- 0x34, 0xf3, 0xf, 0x52, 0, 0,
- 0x23, 0xf, 0x52, 0, 0,
- 0x34, 0xf3, 0xf, 0x53, 0, 0,
- 0x23, 0xf, 0x53, 0, 0,
- 0x34, 0x66, 0xf, 0x54, 0, 0,
- 0x23, 0xf, 0x54, 0, 0,
- 0x34, 0x66, 0xf, 0x55, 0, 0,
- 0x23, 0xf, 0x55, 0, 0,
- 0x34, 0x66, 0xf, 0x56, 0, 0,
- 0x23, 0xf, 0x56, 0, 0,
- 0x34, 0x66, 0xf, 0x57, 0, 0,
- 0x23, 0xf, 0x57, 0, 0,
- 0x34, 0xf2, 0xf, 0x58, 0, 0,
- 0x34, 0xf3, 0xf, 0x58, 0, 0,
- 0x34, 0x66, 0xf, 0x58, 0, 0,
- 0x23, 0xf, 0x58, 0, 0,
- 0x34, 0xf2, 0xf, 0x59, 0, 0,
- 0x34, 0xf3, 0xf, 0x59, 0, 0,
- 0x34, 0x66, 0xf, 0x59, 0, 0,
- 0x23, 0xf, 0x59, 0, 0,
- 0x34, 0xf2, 0xf, 0x5a, 0, 0,
- 0x34, 0xf3, 0xf, 0x5a, 0, 0,
- 0x34, 0x66, 0xf, 0x5a, 0, 0,
- 0x23, 0xf, 0x5a, 0, 0,
- 0x34, 0x66, 0xf, 0x5b, 0, 0,
- 0x34, 0xf3, 0xf, 0x5b, 0, 0,
- 0x23, 0xf, 0x5b, 0, 0,
- 0x34, 0xf2, 0xf, 0x5c, 0, 0,
- 0x34, 0xf3, 0xf, 0x5c, 0, 0,
- 0x34, 0x66, 0xf, 0x5c, 0, 0,
- 0x23, 0xf, 0x5c, 0, 0,
- 0x34, 0xf2, 0xf, 0x5d, 0, 0,
- 0x34, 0xf3, 0xf, 0x5d, 0, 0,
- 0x34, 0x66, 0xf, 0x5d, 0, 0,
- 0x23, 0xf, 0x5d, 0, 0,
- 0x34, 0xf2, 0xf, 0x5e, 0, 0,
- 0x34, 0xf3, 0xf, 0x5e, 0, 0,
- 0x34, 0x66, 0xf, 0x5e, 0, 0,
- 0x23, 0xf, 0x5e, 0, 0,
- 0x34, 0xf2, 0xf, 0x5f, 0, 0,
- 0x34, 0xf3, 0xf, 0x5f, 0, 0,
- 0x34, 0x66, 0xf, 0x5f, 0, 0,
- 0x23, 0xf, 0x5f, 0, 0,
- 0x34, 0x66, 0xf, 0x60, 0, 0,
- 0x23, 0xf, 0x60, 0, 0,
- 0x34, 0x66, 0xf, 0x61, 0, 0,
- 0x23, 0xf, 0x61, 0, 0,
- 0x34, 0x66, 0xf, 0x62, 0, 0,
- 0x23, 0xf, 0x62, 0, 0,
- 0x34, 0x66, 0xf, 0x63, 0, 0,
- 0x23, 0xf, 0x63, 0, 0,
- 0x34, 0x66, 0xf, 0x64, 0, 0,
- 0x23, 0xf, 0x64, 0, 0,
- 0x34, 0x66, 0xf, 0x65, 0, 0,
- 0x23, 0xf, 0x65, 0, 0,
- 0x34, 0x66, 0xf, 0x66, 0, 0,
- 0x23, 0xf, 0x66, 0, 0,
- 0x34, 0x66, 0xf, 0x67, 0, 0,
- 0x23, 0xf, 0x67, 0, 0,
- 0x34, 0x66, 0xf, 0x68, 0, 0,
- 0x23, 0xf, 0x68, 0, 0,
- 0x34, 0x66, 0xf, 0x69, 0, 0,
- 0x23, 0xf, 0x69, 0, 0,
- 0x34, 0x66, 0xf, 0x6a, 0, 0,
- 0x23, 0xf, 0x6a, 0, 0,
- 0x34, 0x66, 0xf, 0x6b, 0, 0,
- 0x23, 0xf, 0x6b, 0, 0,
- 0x34, 0x66, 0xf, 0x6c, 0, 0,
- 0x34, 0x66, 0xf, 0x6d, 0, 0,
- 0x34, 0x66, 0xf, 0x6e, 0, 0,
- 0x23, 0xf, 0x6e, 0, 0,
- 0x34, 0x66, 0xf, 0x6f, 0, 0,
- 0x34, 0xf3, 0xf, 0x6f, 0, 0,
- 0x23, 0xf, 0x6f, 0, 0,
- 0x34, 0x66, 0xf, 0x70, 0, 0,
- 0x34, 0xf2, 0xf, 0x70, 0, 0,
- 0x34, 0xf3, 0xf, 0x70, 0, 0,
- 0x23, 0xf, 0x70, 0, 0,
- 0x34, 0x66, 0xf, 0x74, 0, 0,
- 0x23, 0xf, 0x74, 0, 0,
- 0x34, 0x66, 0xf, 0x75, 0, 0,
- 0x23, 0xf, 0x75, 0, 0,
- 0x34, 0x66, 0xf, 0x76, 0, 0,
- 0x23, 0xf, 0x76, 0, 0,
- 0x34, 0x66, 0xf, 0x7c, 0, 0,
- 0x34, 0xf2, 0xf, 0x7c, 0, 0,
- 0x34, 0x66, 0xf, 0x7d, 0, 0,
- 0x34, 0xf2, 0xf, 0x7d, 0, 0,
- 0x34, 0x66, 0xf, 0x7e, 0, 0,
- 0x34, 0xf3, 0xf, 0x7e, 0, 0,
- 0x23, 0xf, 0x7e, 0, 0,
- 0x34, 0x66, 0xf, 0x7f, 0, 0,
- 0x34, 0xf3, 0xf, 0x7f, 0, 0,
- 0x23, 0xf, 0x7f, 0, 0,
- 0x23, 0xf, 0xc3, 0, 0,
- 0x34, 0x66, 0xf, 0xc4, 0, 0,
- 0x23, 0xf, 0xc4, 0, 0,
- 0x34, 0x66, 0xf, 0xc5, 0xc0, 0xc0,
- 0x23, 0xf, 0xc5, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0xc6, 0, 0,
- 0x23, 0xf, 0xc6, 0, 0,
- 0x34, 0x66, 0xf, 0xd1, 0, 0,
- 0x23, 0xf, 0xd1, 0, 0,
- 0x34, 0x66, 0xf, 0xd2, 0, 0,
- 0x23, 0xf, 0xd2, 0, 0,
- 0x34, 0x66, 0xf, 0xd3, 0, 0,
- 0x23, 0xf, 0xd3, 0, 0,
- 0x34, 0x66, 0xf, 0xd4, 0, 0,
- 0x23, 0xf, 0xd4, 0, 0,
- 0x34, 0x66, 0xf, 0xd5, 0, 0,
- 0x23, 0xf, 0xd5, 0, 0,
- 0x34, 0x66, 0xf, 0xd6, 0, 0,
- 0x34, 0xf2, 0xf, 0xd6, 0xc0, 0xc0,
- 0x34, 0xf3, 0xf, 0xd6, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0xd7, 0xc0, 0xc0,
- 0x23, 0xf, 0xd7, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0xd8, 0, 0,
- 0x23, 0xf, 0xd8, 0, 0,
- 0x34, 0x66, 0xf, 0xd9, 0, 0,
- 0x23, 0xf, 0xd9, 0, 0,
- 0x34, 0x66, 0xf, 0xda, 0, 0,
- 0x23, 0xf, 0xda, 0, 0,
- 0x34, 0x66, 0xf, 0xdc, 0, 0,
- 0x23, 0xf, 0xdc, 0, 0,
- 0x34, 0x66, 0xf, 0xdd, 0, 0,
- 0x23, 0xf, 0xdd, 0, 0,
- 0x34, 0x66, 0xf, 0xde, 0, 0,
- 0x23, 0xf, 0xde, 0, 0,
- 0x34, 0x66, 0xf, 0xe0, 0, 0,
- 0x23, 0xf, 0xe0, 0, 0,
- 0x34, 0x66, 0xf, 0xe1, 0, 0,
- 0x23, 0xf, 0xe1, 0, 0,
- 0x34, 0x66, 0xf, 0xe2, 0, 0,
- 0x23, 0xf, 0xe2, 0, 0,
- 0x34, 0x66, 0xf, 0xe3, 0, 0,
- 0x23, 0xf, 0xe3, 0, 0,
- 0x34, 0x66, 0xf, 0xe4, 0, 0,
- 0x23, 0xf, 0xe4, 0, 0,
- 0x34, 0x66, 0xf, 0xe5, 0, 0,
- 0x23, 0xf, 0xe5, 0, 0,
- 0x34, 0x66, 0xf, 0xe7, 0, 0,
- 0x23, 0xf, 0xe7, 0, 0,
- 0x34, 0x66, 0xf, 0xe8, 0, 0,
- 0x23, 0xf, 0xe8, 0, 0,
- 0x34, 0x66, 0xf, 0xe9, 0, 0,
- 0x23, 0xf, 0xe9, 0, 0,
- 0x34, 0x66, 0xf, 0xea, 0, 0,
- 0x23, 0xf, 0xea, 0, 0,
- 0x34, 0x66, 0xf, 0xec, 0, 0,
- 0x23, 0xf, 0xec, 0, 0,
- 0x34, 0x66, 0xf, 0xed, 0, 0,
- 0x23, 0xf, 0xed, 0, 0,
- 0x34, 0x66, 0xf, 0xee, 0, 0,
- 0x23, 0xf, 0xee, 0, 0,
- 0x34, 0xf2, 0xf, 0xf0, 0, 0,
- 0x34, 0x66, 0xf, 0xf1, 0, 0,
- 0x23, 0xf, 0xf1, 0, 0,
- 0x34, 0x66, 0xf, 0xf2, 0, 0,
- 0x23, 0xf, 0xf2, 0, 0,
- 0x34, 0x66, 0xf, 0xf3, 0, 0,
- 0x23, 0xf, 0xf3, 0, 0,
- 0x34, 0x66, 0xf, 0xf4, 0, 0,
- 0x23, 0xf, 0xf4, 0, 0,
- 0x34, 0x66, 0xf, 0xf6, 0, 0,
- 0x23, 0xf, 0xf6, 0, 0,
- 0x34, 0x66, 0xf, 0xf7, 0xc0, 0xc0,
- 0x23, 0xf, 0xf7, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0xf8, 0, 0,
- 0x23, 0xf, 0xf8, 0, 0,
- 0x34, 0x66, 0xf, 0xf9, 0, 0,
- 0x23, 0xf, 0xf9, 0, 0,
- 0x34, 0x66, 0xf, 0xfa, 0, 0,
- 0x23, 0xf, 0xfa, 0, 0,
- 0x34, 0x66, 0xf, 0xfb, 0, 0,
- 0x23, 0xf, 0xfb, 0, 0,
- 0x34, 0x66, 0xf, 0xfc, 0, 0,
- 0x23, 0xf, 0xfc, 0, 0,
- 0x34, 0x66, 0xf, 0xfd, 0, 0,
- 0x23, 0xf, 0xfd, 0, 0,
- 0x34, 0x66, 0xf, 0xfe, 0, 0,
- 0x23, 0xf, 0xfe, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0, 0, 0,
- 0x34, 0xf, 0x38, 0, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x1, 0, 0,
- 0x34, 0xf, 0x38, 0x1, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x2, 0, 0,
- 0x34, 0xf, 0x38, 0x2, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3, 0, 0,
- 0x34, 0xf, 0x38, 0x3, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x4, 0, 0,
- 0x34, 0xf, 0x38, 0x4, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x5, 0, 0,
- 0x34, 0xf, 0x38, 0x5, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x6, 0, 0,
- 0x34, 0xf, 0x38, 0x6, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x7, 0, 0,
- 0x34, 0xf, 0x38, 0x7, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x8, 0, 0,
- 0x34, 0xf, 0x38, 0x8, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x9, 0, 0,
- 0x34, 0xf, 0x38, 0x9, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0xa, 0, 0,
- 0x34, 0xf, 0x38, 0xa, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0xb, 0, 0,
- 0x34, 0xf, 0x38, 0xb, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x1c, 0, 0,
- 0x34, 0xf, 0x38, 0x1c, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x1d, 0, 0,
- 0x34, 0xf, 0x38, 0x1d, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x1e, 0, 0,
- 0x34, 0xf, 0x38, 0x1e, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xf, 0, 0,
- 0x34, 0xf, 0x3a, 0xf, 0, 0,
- 0x34, 0x66, 0xf, 0xc7, 0x38, 0x30,
- 0x34, 0xf3, 0xf, 0xc7, 0x38, 0x30,
- 0x23, 0xf, 0xc7, 0x38, 0x30,
- 0x23, 0xf, 0xc7, 0x38, 0x38,
- 0x34, 0x66, 0xf, 0x71, 0xf8, 0xd0,
- 0x23, 0xf, 0x71, 0xf8, 0xd0,
- 0x34, 0x66, 0xf, 0x71, 0xf8, 0xe0,
- 0x23, 0xf, 0x71, 0xf8, 0xe0,
- 0x34, 0x66, 0xf, 0x71, 0xf8, 0xf0,
- 0x23, 0xf, 0x71, 0xf8, 0xf0,
- 0x34, 0x66, 0xf, 0x72, 0xf8, 0xd0,
- 0x23, 0xf, 0x72, 0xf8, 0xd0,
- 0x34, 0x66, 0xf, 0x72, 0xf8, 0xe0,
- 0x23, 0xf, 0x72, 0xf8, 0xe0,
- 0x34, 0x66, 0xf, 0x72, 0xf8, 0xf0,
- 0x23, 0xf, 0x72, 0xf8, 0xf0,
- 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd0,
- 0x23, 0xf, 0x73, 0xf8, 0xd0,
- 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd8,
- 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf0,
- 0x23, 0xf, 0x73, 0xf8, 0xf0,
- 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf8,
- 0x33, 0xf, 0xae, 0xe8,
- 0x33, 0xf, 0xae, 0xf0,
- 0x33, 0xf, 0xae, 0xf8,
- 0x23, 0xf, 0xae, 0x38, 0x38,
- 0x23, 0xf, 0xf, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xc, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xd, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x14, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x15, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x40, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x41, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x21, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x2a, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x42, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x2b, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x10, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xe, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x29, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x61, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x60, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x63, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x62, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x37, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x41, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x20, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x22, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3c, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3d, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3f, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3e, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x38, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x39, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3b, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3a, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x20, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x21, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x22, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x23, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x24, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x25, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x30, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x31, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x32, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x33, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x34, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x35, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x28, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x40, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x17, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x8, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x9, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xa, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xb, 0, 0,
- 0x1, 0xe7, 0x7,
-};
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
deleted file mode 100644
index 5b621f92ff..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
+++ /dev/null
@@ -1,309 +0,0 @@
-Upstream-Status: Backport
-
-Index: elfutils-0.146/backends/m68k_init.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/m68k_init.c 2010-04-24 10:11:38.000000000 +0000
-@@ -0,0 +1,49 @@
-+/* Initialization of m68k specific backend library.
-+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+ This software is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ This softare is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this software; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+*/
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND m68k_
-+#define RELOC_PREFIX R_68K_
-+#include "libebl_CPU.h"
-+
-+/* This defines the common reloc hooks based on m68k_reloc.def. */
-+#include "common-reloc.c"
-+
-+
-+const char *
-+m68k_init (elf, machine, eh, ehlen)
-+ Elf *elf __attribute__ ((unused));
-+ GElf_Half machine __attribute__ ((unused));
-+ Ebl *eh;
-+ size_t ehlen;
-+{
-+ /* Check whether the Elf_BH object has a sufficent size. */
-+ if (ehlen < sizeof (Ebl))
-+ return NULL;
-+
-+ /* We handle it. */
-+ eh->name = "m68k";
-+ m68k_init_reloc (eh);
-+ HOOK (eh, reloc_simple_type);
-+ HOOK (eh, register_info);
-+
-+ return MODVERSION;
-+}
-Index: elfutils-0.146/backends/m68k_regs.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/m68k_regs.c 2010-04-24 10:11:38.000000000 +0000
-@@ -0,0 +1,106 @@
-+/* Register names and numbers for m68k DWARF.
-+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+ This software is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ This software is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this software; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND m68k_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+m68k_register_info (Ebl *ebl __attribute__ ((unused)),
-+ int regno, char *name, size_t namelen,
-+ const char **prefix, const char **setname,
-+ int *bits, int *type)
-+{
-+ if (name == NULL)
-+ return 25;
-+
-+ if (regno < 0 || regno > 24 || namelen < 5)
-+ return -1;
-+
-+ *prefix = "%";
-+ *bits = 32;
-+ *type = (regno < 8 ? DW_ATE_signed
-+ : regno < 16 ? DW_ATE_address : DW_ATE_float);
-+
-+ if (regno < 8)
-+ {
-+ *setname = "integer";
-+ }
-+ else if (regno < 16)
-+ {
-+ *setname = "address";
-+ }
-+ else if (regno < 24)
-+ {
-+ *setname = "FPU";
-+ }
-+ else
-+ {
-+ *setname = "address";
-+ *type = DW_ATE_address;
-+ }
-+
-+ switch (regno)
-+ {
-+ case 0 ... 7:
-+ name[0] = 'd';
-+ name[1] = regno + '0';
-+ namelen = 2;
-+ break;
-+
-+ case 8 ... 13:
-+ name[0] = 'a';
-+ name[1] = regno - 8 + '0';
-+ namelen = 2;
-+ break;
-+
-+ case 14:
-+ name[0] = 'f';
-+ name[1] = 'p';
-+ namelen = 2;
-+ break;
-+
-+ case 15:
-+ name[0] = 's';
-+ name[1] = 'p';
-+ namelen = 2;
-+ break;
-+
-+ case 16 ... 23:
-+ name[0] = 'f';
-+ name[1] = 'p';
-+ name[2] = regno - 16 + '0';
-+ namelen = 3;
-+ break;
-+
-+ case 24:
-+ name[0] = 'p';
-+ name[1] = 'c';
-+ namelen = 2;
-+ }
-+
-+ name[namelen++] = '\0';
-+ return namelen;
-+}
-+
-Index: elfutils-0.146/backends/m68k_reloc.def
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/m68k_reloc.def 2010-04-24 10:11:38.000000000 +0000
-@@ -0,0 +1,45 @@
-+/* List the relocation types for m68k. -*- C -*-
-+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+ This software is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ This software is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this software; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+*/
-+
-+/* NAME, REL|EXEC|DYN */
-+
-+RELOC_TYPE (NONE, 0)
-+RELOC_TYPE (32, REL|EXEC|DYN)
-+RELOC_TYPE (16, REL)
-+RELOC_TYPE (8, REL)
-+RELOC_TYPE (PC32, REL|EXEC|DYN)
-+RELOC_TYPE (PC16, REL)
-+RELOC_TYPE (PC8, REL)
-+RELOC_TYPE (GOT32, REL)
-+RELOC_TYPE (GOT16, REL)
-+RELOC_TYPE (GOT8, REL)
-+RELOC_TYPE (GOT32O, REL)
-+RELOC_TYPE (GOT16O, REL)
-+RELOC_TYPE (GOT8O, REL)
-+RELOC_TYPE (PLT32, REL)
-+RELOC_TYPE (PLT16, REL)
-+RELOC_TYPE (PLT8, REL)
-+RELOC_TYPE (PLT32O, REL)
-+RELOC_TYPE (PLT16O, REL)
-+RELOC_TYPE (PLT8O, REL)
-+RELOC_TYPE (COPY, EXEC)
-+RELOC_TYPE (GLOB_DAT, EXEC|DYN)
-+RELOC_TYPE (JMP_SLOT, EXEC|DYN)
-+RELOC_TYPE (RELATIVE, EXEC|DYN)
-+RELOC_TYPE (GNU_VTINHERIT, REL)
-+RELOC_TYPE (GNU_VTENTRY, REL)
-+
-Index: elfutils-0.146/libelf/elf.h
-===================================================================
---- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000
-+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000
-@@ -1125,6 +1125,9 @@
- #define R_68K_GLOB_DAT 20 /* Create GOT entry */
- #define R_68K_JMP_SLOT 21 /* Create PLT entry */
- #define R_68K_RELATIVE 22 /* Adjust by program base */
-+/* The next 2 are GNU extensions to enable C++ vtable garbage collection. */
-+#define R_68K_GNU_VTINHERIT 23
-+#define R_68K_GNU_VTENTRY 24
- #define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */
- #define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */
- #define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */
-Index: elfutils-0.146/backends/Makefile.am
-===================================================================
---- elfutils-0.146.orig/backends/Makefile.am 2010-04-24 10:11:23.000000000 +0000
-+++ elfutils-0.146/backends/Makefile.am 2010-04-24 10:11:38.000000000 +0000
-@@ -29,11 +29,12 @@
- -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
-
-
--modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips
-+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips m68k
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
-- libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a
-+ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a \
-+ libebl_m68k_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -103,6 +104,10 @@
- libebl_mips_pic_a_SOURCES = $(mips_SRCS)
- am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
-
-+m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c
-+libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
-+am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
-+
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- @rm -f $(@:.so=.map)
- echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
-Index: elfutils-0.146/backends/m68k_symbol.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.146/backends/m68k_symbol.c 2010-04-24 10:11:38.000000000 +0000
-@@ -0,0 +1,43 @@
-+/* m68k specific symbolic name handling.
-+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+ This software is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ This software distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this software; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+*/
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND m68k_
-+#include "libebl_CPU.h"
-+
-+/* Check for the simple reloc types. */
-+Elf_Type
-+m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+ switch (type)
-+ {
-+ case R_68K_32:
-+ return ELF_T_SWORD;
-+ case R_68K_16:
-+ return ELF_T_HALF;
-+ case R_68K_8:
-+ return ELF_T_BYTE;
-+ default:
-+ return ELF_T_NUM;
-+ }
-+}
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
deleted file mode 100644
index 3f81a75b1a..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
+++ /dev/null
@@ -1,713 +0,0 @@
-Upstream-Status: Backport
-
-Index: elfutils-0.145/backends/mips_init.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.145/backends/mips_init.c 2010-02-24 18:57:35.000000000 +0000
-@@ -0,0 +1,60 @@
-+/* Initialization of mips specific backend library.
-+ Copyright (C) 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND mips_
-+#define RELOC_PREFIX R_MIPS_
-+#include "libebl_CPU.h"
-+
-+/* This defines the common reloc hooks based on mips_reloc.def. */
-+#include "common-reloc.c"
-+
-+const char *
-+mips_init (elf, machine, eh, ehlen)
-+ Elf *elf __attribute__ ((unused));
-+ GElf_Half machine __attribute__ ((unused));
-+ Ebl *eh;
-+ size_t ehlen;
-+{
-+ /* Check whether the Elf_BH object has a sufficent size. */
-+ if (ehlen < sizeof (Ebl))
-+ return NULL;
-+
-+ /* We handle it. */
-+ if (machine == EM_MIPS)
-+ eh->name = "MIPS R3000 big-endian";
-+ else if (machine == EM_MIPS_RS3_LE)
-+ eh->name = "MIPS R3000 little-endian";
-+
-+ mips_init_reloc (eh);
-+ HOOK (eh, reloc_simple_type);
-+ HOOK (eh, return_value_location);
-+ HOOK (eh, register_info);
-+
-+ return MODVERSION;
-+}
-Index: elfutils-0.145/backends/mips_regs.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.145/backends/mips_regs.c 2010-02-24 18:57:35.000000000 +0000
-@@ -0,0 +1,104 @@
-+/* Register names and numbers for MIPS DWARF.
-+ Copyright (C) 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND mips_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+mips_register_info (Ebl *ebl __attribute__((unused)),
-+ int regno, char *name, size_t namelen,
-+ const char **prefix, const char **setname,
-+ int *bits, int *type)
-+{
-+ if (name == NULL)
-+ return 66;
-+
-+ if (regno < 0 || regno > 65 || namelen < 4)
-+ return -1;
-+
-+ *prefix = "$";
-+
-+ if (regno < 32)
-+ {
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ if (regno < 32 + 10)
-+ {
-+ name[0] = regno + '0';
-+ namelen = 1;
-+ }
-+ else
-+ {
-+ name[0] = (regno / 10) + '0';
-+ name[1] = (regno % 10) + '0';
-+ namelen = 2;
-+ }
-+ }
-+ else if (regno < 64)
-+ {
-+ *setname = "FPU";
-+ *type = DW_ATE_float;
-+ *bits = 32;
-+ name[0] = 'f';
-+ if (regno < 32 + 10)
-+ {
-+ name[1] = (regno - 32) + '0';
-+ namelen = 2;
-+ }
-+ else
-+ {
-+ name[1] = (regno - 32) / 10 + '0';
-+ name[2] = (regno - 32) % 10 + '0';
-+ namelen = 3;
-+ }
-+ }
-+ else if (regno == 64)
-+ {
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ name[0] = 'h';
-+ name[1] = 'i';
-+ namelen = 2;
-+ }
-+ else
-+ {
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ name[0] = 'l';
-+ name[1] = 'o';
-+ namelen = 2;
-+ }
-+
-+ name[namelen++] = '\0';
-+ return namelen;
-+}
-Index: elfutils-0.145/backends/mips_reloc.def
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.145/backends/mips_reloc.def 2010-02-24 18:57:35.000000000 +0000
-@@ -0,0 +1,79 @@
-+/* List the relocation types for mips. -*- C -*-
-+ Copyright (C) 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+/* NAME, REL|EXEC|DYN */
-+
-+RELOC_TYPE (NONE, 0)
-+RELOC_TYPE (16, 0)
-+RELOC_TYPE (32, 0)
-+RELOC_TYPE (REL32, 0)
-+RELOC_TYPE (26, 0)
-+RELOC_TYPE (HI16, 0)
-+RELOC_TYPE (LO16, 0)
-+RELOC_TYPE (GPREL16, 0)
-+RELOC_TYPE (LITERAL, 0)
-+RELOC_TYPE (GOT16, 0)
-+RELOC_TYPE (PC16, 0)
-+RELOC_TYPE (CALL16, 0)
-+RELOC_TYPE (GPREL32, 0)
-+
-+RELOC_TYPE (SHIFT5, 0)
-+RELOC_TYPE (SHIFT6, 0)
-+RELOC_TYPE (64, 0)
-+RELOC_TYPE (GOT_DISP, 0)
-+RELOC_TYPE (GOT_PAGE, 0)
-+RELOC_TYPE (GOT_OFST, 0)
-+RELOC_TYPE (GOT_HI16, 0)
-+RELOC_TYPE (GOT_LO16, 0)
-+RELOC_TYPE (SUB, 0)
-+RELOC_TYPE (INSERT_A, 0)
-+RELOC_TYPE (INSERT_B, 0)
-+RELOC_TYPE (DELETE, 0)
-+RELOC_TYPE (HIGHER, 0)
-+RELOC_TYPE (HIGHEST, 0)
-+RELOC_TYPE (CALL_HI16, 0)
-+RELOC_TYPE (CALL_LO16, 0)
-+RELOC_TYPE (SCN_DISP, 0)
-+RELOC_TYPE (REL16, 0)
-+RELOC_TYPE (ADD_IMMEDIATE, 0)
-+RELOC_TYPE (PJUMP, 0)
-+RELOC_TYPE (RELGOT, 0)
-+RELOC_TYPE (JALR, 0)
-+RELOC_TYPE (TLS_DTPMOD32, 0)
-+RELOC_TYPE (TLS_DTPREL32, 0)
-+RELOC_TYPE (TLS_DTPMOD64, 0)
-+RELOC_TYPE (TLS_DTPREL64, 0)
-+RELOC_TYPE (TLS_GD, 0)
-+RELOC_TYPE (TLS_LDM, 0)
-+RELOC_TYPE (TLS_DTPREL_HI16, 0)
-+RELOC_TYPE (TLS_DTPREL_LO16, 0)
-+RELOC_TYPE (TLS_GOTTPREL, 0)
-+RELOC_TYPE (TLS_TPREL32, 0)
-+RELOC_TYPE (TLS_TPREL64, 0)
-+RELOC_TYPE (TLS_TPREL_HI16, 0)
-+RELOC_TYPE (TLS_TPREL_LO16, 0)
-+
-+#define NO_COPY_RELOC 1
-+#define NO_RELATIVE_RELOC 1
-Index: elfutils-0.145/backends/mips_retval.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.145/backends/mips_retval.c 2010-02-24 18:57:35.000000000 +0000
-@@ -0,0 +1,321 @@
-+/* Function return value location for Linux/mips ABI.
-+ Copyright (C) 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <assert.h>
-+#include <dwarf.h>
-+#include <elf.h>
-+
-+#include "../libebl/libeblP.h"
-+#include "../libdw/libdwP.h"
-+
-+#define BACKEND mips_
-+#include "libebl_CPU.h"
-+
-+/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
-+#define EF_MIPS_ABI 0x0000F000
-+
-+/* The original o32 abi. */
-+#define E_MIPS_ABI_O32 0x00001000
-+
-+/* O32 extended to work on 64 bit architectures */
-+#define E_MIPS_ABI_O64 0x00002000
-+
-+/* EABI in 32 bit mode */
-+#define E_MIPS_ABI_EABI32 0x00003000
-+
-+/* EABI in 64 bit mode */
-+#define E_MIPS_ABI_EABI64 0x00004000
-+
-+/* All the possible MIPS ABIs. */
-+enum mips_abi
-+ {
-+ MIPS_ABI_UNKNOWN = 0,
-+ MIPS_ABI_N32,
-+ MIPS_ABI_O32,
-+ MIPS_ABI_N64,
-+ MIPS_ABI_O64,
-+ MIPS_ABI_EABI32,
-+ MIPS_ABI_EABI64,
-+ MIPS_ABI_LAST
-+ };
-+
-+/* Find the mips ABI of the current file */
-+enum mips_abi find_mips_abi(Elf *elf)
-+{
-+ GElf_Ehdr ehdr_mem;
-+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+
-+ if (ehdr == NULL)
-+ return MIPS_ABI_LAST;
-+
-+ GElf_Word elf_flags = ehdr->e_flags;
-+
-+ /* Check elf_flags to see if it specifies the ABI being used. */
-+ switch ((elf_flags & EF_MIPS_ABI))
-+ {
-+ case E_MIPS_ABI_O32:
-+ return MIPS_ABI_O32;
-+ case E_MIPS_ABI_O64:
-+ return MIPS_ABI_O64;
-+ case E_MIPS_ABI_EABI32:
-+ return MIPS_ABI_EABI32;
-+ case E_MIPS_ABI_EABI64:
-+ return MIPS_ABI_EABI64;
-+ default:
-+ if ((elf_flags & EF_MIPS_ABI2))
-+ return MIPS_ABI_N32;
-+ }
-+
-+ /* GCC creates a pseudo-section whose name describes the ABI. */
-+ size_t shstrndx;
-+ if (elf_getshdrstrndx (elf, &shstrndx) < 0)
-+ return MIPS_ABI_LAST;
-+
-+ const char *name;
-+ Elf_Scn *scn = NULL;
-+ while ((scn = elf_nextscn (elf, scn)) != NULL)
-+ {
-+ GElf_Shdr shdr_mem;
-+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
-+ if (shdr == NULL)
-+ return MIPS_ABI_LAST;
-+
-+ name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: "";
-+ if (strncmp (name, ".mdebug.", 8) != 0)
-+ continue;
-+
-+ if (strcmp (name, ".mdebug.abi32") == 0)
-+ return MIPS_ABI_O32;
-+ else if (strcmp (name, ".mdebug.abiN32") == 0)
-+ return MIPS_ABI_N32;
-+ else if (strcmp (name, ".mdebug.abi64") == 0)
-+ return MIPS_ABI_N64;
-+ else if (strcmp (name, ".mdebug.abiO64") == 0)
-+ return MIPS_ABI_O64;
-+ else if (strcmp (name, ".mdebug.eabi32") == 0)
-+ return MIPS_ABI_EABI32;
-+ else if (strcmp (name, ".mdebug.eabi64") == 0)
-+ return MIPS_ABI_EABI64;
-+ else
-+ return MIPS_ABI_UNKNOWN;
-+ }
-+
-+ return MIPS_ABI_UNKNOWN;
-+}
-+
-+unsigned int
-+mips_abi_regsize (enum mips_abi abi)
-+{
-+ switch (abi)
-+ {
-+ case MIPS_ABI_EABI32:
-+ case MIPS_ABI_O32:
-+ return 4;
-+ case MIPS_ABI_N32:
-+ case MIPS_ABI_N64:
-+ case MIPS_ABI_O64:
-+ case MIPS_ABI_EABI64:
-+ return 8;
-+ case MIPS_ABI_UNKNOWN:
-+ case MIPS_ABI_LAST:
-+ default:
-+ return 0;
-+ }
-+}
-+
-+
-+/* $v0 or pair $v0, $v1 */
-+static const Dwarf_Op loc_intreg_o32[] =
-+ {
-+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+
-+static const Dwarf_Op loc_intreg[] =
-+ {
-+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 },
-+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 },
-+ };
-+#define nloc_intreg 1
-+#define nloc_intregpair 4
-+
-+/* $f0 (float), or pair $f0, $f1 (double).
-+ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */
-+static const Dwarf_Op loc_fpreg_o32[] =
-+ {
-+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+
-+/* $f0, or pair $f0, $f2. */
-+static const Dwarf_Op loc_fpreg[] =
-+ {
-+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 },
-+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 },
-+ };
-+#define nloc_fpreg 1
-+#define nloc_fpregpair 4
-+#define nloc_fpregquad 8
-+
-+/* 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 $v0. */
-+static const Dwarf_Op loc_aggregate[] =
-+ {
-+ { .atom = DW_OP_breg2, .number = 0 }
-+ };
-+#define nloc_aggregate 1
-+
-+int
-+mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ /* First find the ABI used by the elf object */
-+ enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);
-+
-+ /* Something went seriously wrong while trying to figure out the ABI */
-+ if (abi == MIPS_ABI_LAST)
-+ return -1;
-+
-+ /* We couldn't identify the ABI, but the file seems valid */
-+ if (abi == MIPS_ABI_UNKNOWN)
-+ return -2;
-+
-+ /* Can't handle EABI variants */
-+ if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64))
-+ return -2;
-+
-+ unsigned int regsize = mips_abi_regsize (abi);
-+ if (!regsize)
-+ return -2;
-+
-+ /* Start with the function's type, and get the DW_AT_type attribute,
-+ which is the type of the return value. */
-+
-+ Dwarf_Attribute attr_mem;
-+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
-+ if (attr == NULL)
-+ /* The function has no return value, like a `void' function in C. */
-+ return 0;
-+
-+ Dwarf_Die die_mem;
-+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
-+ int tag = dwarf_tag (typedie);
-+
-+ /* 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)
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+
-+ switch (tag)
-+ {
-+ case -1:
-+ return -1;
-+
-+ case DW_TAG_subrange_type:
-+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+ /* Fall through. */
-+
-+ case DW_TAG_base_type:
-+ case DW_TAG_enumeration_type:
-+ case DW_TAG_pointer_type:
-+ case DW_TAG_ptr_to_member_type:
-+ {
-+ Dwarf_Word size;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
-+ &attr_mem), &size) != 0)
-+ {
-+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+ size = regsize;
-+ else
-+ return -1;
-+ }
-+ if (tag == DW_TAG_base_type)
-+ {
-+ Dwarf_Word encoding;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+ &attr_mem), &encoding) != 0)
-+ return -1;
-+
-+#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc))
-+
-+ if (encoding == DW_ATE_float)
-+ {
-+ *locp = ABI_LOC(loc_fpreg, regsize);
-+ if (size <= regsize)
-+ return nloc_fpreg;
-+
-+ if (size <= 2*regsize)
-+ return nloc_fpregpair;
-+
-+ if (size <= 4*regsize && abi == MIPS_ABI_O32)
-+ return nloc_fpregquad;
-+
-+ goto aggregate;
-+ }
-+ }
-+ *locp = ABI_LOC(loc_intreg, regsize);
-+ if (size <= regsize)
-+ return nloc_intreg;
-+ if (size <= 2*regsize)
-+ return nloc_intregpair;
-+
-+ /* Else fall through. Shouldn't happen though (at least with gcc) */
-+ }
-+
-+ case DW_TAG_structure_type:
-+ case DW_TAG_class_type:
-+ case DW_TAG_union_type:
-+ case DW_TAG_array_type:
-+ aggregate:
-+ /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
-+ if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
-+ return -2;
-+
-+ *locp = loc_aggregate;
-+ return nloc_aggregate;
-+ }
-+
-+ /* XXX We don't have a good way to return specific errors from ebl calls.
-+ This value means we do not understand the type, but it is well-formed
-+ DWARF and might be valid. */
-+ return -2;
-+}
-Index: elfutils-0.145/backends/mips_symbol.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.145/backends/mips_symbol.c 2010-02-24 18:57:35.000000000 +0000
-@@ -0,0 +1,52 @@
-+/* MIPS specific symbolic name handling.
-+ Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+ Written by Jakub Jelinek <jakub@redhat.com>, 2002.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND mips_
-+#include "libebl_CPU.h"
-+
-+/* Check for the simple reloc types. */
-+Elf_Type
-+mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+ switch (type)
-+ {
-+ case R_MIPS_16:
-+ return ELF_T_HALF;
-+ case R_MIPS_32:
-+ return ELF_T_WORD;
-+ case R_MIPS_64:
-+ return ELF_T_XWORD;
-+ default:
-+ return ELF_T_NUM;
-+ }
-+}
-Index: elfutils-0.145/libebl/eblopenbackend.c
-===================================================================
---- elfutils-0.145.orig/libebl/eblopenbackend.c 2010-02-24 18:55:51.000000000 +0000
-+++ elfutils-0.145/libebl/eblopenbackend.c 2010-02-24 18:57:35.000000000 +0000
-@@ -91,6 +91,8 @@
- { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
- { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
- { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
-+ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
-+ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
-
- { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
- { "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 },
-Index: elfutils-0.145/backends/common-reloc.c
-===================================================================
---- elfutils-0.145.orig/backends/common-reloc.c 2010-02-24 18:55:51.000000000 +0000
-+++ elfutils-0.145/backends/common-reloc.c 2010-02-24 18:57:35.000000000 +0000
-@@ -109,11 +109,13 @@
- }
-
-
-+#ifndef NO_COPY_RELOC
- bool
- EBLHOOK(copy_reloc_p) (int reloc)
- {
- return reloc == R_TYPE (COPY);
- }
-+#endif
-
- bool
- EBLHOOK(none_reloc_p) (int reloc)
-@@ -135,7 +137,9 @@
- ebl->reloc_type_name = EBLHOOK(reloc_type_name);
- ebl->reloc_type_check = EBLHOOK(reloc_type_check);
- ebl->reloc_valid_use = EBLHOOK(reloc_valid_use);
-+#ifndef NO_COPY_RELOC
- ebl->copy_reloc_p = EBLHOOK(copy_reloc_p);
-+#endif
- ebl->none_reloc_p = EBLHOOK(none_reloc_p);
- #ifndef NO_RELATIVE_RELOC
- ebl->relative_reloc_p = EBLHOOK(relative_reloc_p);
-Index: elfutils-0.145/backends/Makefile.am
-===================================================================
---- elfutils-0.145.orig/backends/Makefile.am 2010-02-24 18:57:26.000000000 +0000
-+++ elfutils-0.145/backends/Makefile.am 2010-02-24 18:57:57.000000000 +0000
-@@ -29,11 +29,11 @@
- -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
-
-
--modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc
-+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
-- libebl_s390_pic.a libebl_parisc_pic.a
-+ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -99,6 +99,10 @@
- libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
- am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
-
-+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
-+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
-+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
-+
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- @rm -f $(@:.so=.map)
- echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/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
deleted file mode 100644
index 2b5dad368a..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Backport
-
-nm: Fix size passed to snprintf for invalid sh_name case.
-native build failed as following on Fedora18:
-nm.c: In function 'show_symbols_sysv':
-nm.c:756:27: error: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
- snprintf (name, sizeof name, "[invalid sh_name %#" PRIx32 "]",
- ^
-
-The original commit is http://git.fedorahosted.org/cgit/elfutils.git/commit/src/nm.c?id=57bd66cabf6e6b9ecf622cdbf350804897a8df58
-
-Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
-
---- elfutils-0.148/src/nm.c.org 2013-03-11 22:36:11.000000000 -0500
-+++ elfutils-0.148/src/nm.c 2013-03-11 22:46:09.000000000 -0500
-@@ -752,8 +752,9 @@
- gelf_getshdr (scn, &shdr_mem)->sh_name);
- if (unlikely (name == NULL))
- {
-- name = alloca (sizeof "[invalid sh_name 0x12345678]");
-- snprintf (name, sizeof name, "[invalid sh_name %#" PRIx32 "]",
-+ const size_t bufsz = sizeof "[invalid sh_name 0x12345678]";
-+ name = alloca (bufsz);
-+ snprintf (name, bufsz, "[invalid sh_name %#" PRIx32 "]",
- gelf_getshdr (scn, &shdr_mem)->sh_name);
- }
- scnnames[elf_ndxscn (scn)] = name;
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
deleted file mode 100644
index b8a912c412..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
+++ /dev/null
@@ -1,756 +0,0 @@
-Upstream-Status: Backport
-
-Index: elfutils-0.148/backends/ChangeLog
-===================================================================
---- elfutils-0.148.orig/backends/ChangeLog 2010-04-13 20:08:02.000000000 +0000
-+++ elfutils-0.148/backends/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -106,6 +106,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
-@@ -433,6 +437,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.
-@@ -455,6 +464,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.
-
-Index: elfutils-0.148/backends/Makefile.am
-===================================================================
---- elfutils-0.148.orig/backends/Makefile.am 2010-04-13 20:08:02.000000000 +0000
-+++ elfutils-0.148/backends/Makefile.am 2010-07-03 13:04:07.000000000 +0000
-@@ -103,7 +103,7 @@
- $(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)
-Index: elfutils-0.148/ChangeLog
-===================================================================
---- elfutils-0.148.orig/ChangeLog 2010-04-21 14:26:40.000000000 +0000
-+++ elfutils-0.148/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -2,6 +2,10 @@
-
- * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
-
-+2009-11-22 Roland McGrath <roland@redhat.com>
-+
-+ * configure.ac: Use sed and expr instead of modern bash extensions.
-+
- 2009-09-21 Ulrich Drepper <drepper@redhat.com>
-
- * configure.ac: Update for more modern autoconf.
-@@ -10,6 +14,10 @@
-
- * configure.ac (zip_LIBS): Check for liblzma too.
-
-+2009-08-17 Roland McGrath <roland@redhat.com>
-+
-+ * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
-+
- 2009-04-19 Roland McGrath <roland@redhat.com>
-
- * configure.ac (eu_version): Round down here, not in version.h macros.
-@@ -21,6 +29,8 @@
-
- 2009-01-23 Roland McGrath <roland@redhat.com>
-
-+ * configure.ac: Check for __builtin_popcount.
-+
- * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
-
- * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
-@@ -101,6 +111,10 @@
- * configure.ac: Add dummy automake conditional to get dependencies
- for non-generic linker right. See src/Makefile.am.
-
-+2005-11-22 Roland McGrath <roland@redhat.com>
-+
-+ * configure.ac: Check for --as-needed linker option.
-+
- 2005-11-18 Roland McGrath <roland@redhat.com>
-
- * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
-@@ -148,6 +162,17 @@
- * Makefile.am (all_SUBDIRS): Add libdwfl.
- * configure.ac: Write libdwfl/Makefile.
-
-+2005-05-31 Roland McGrath <roland@redhat.com>
-+
-+ * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
-+
-+ * configure.ac: Check for struct stat st_?tim members.
-+ * src/strip.c (process_file): Use st_?time if st_?tim are not there.
-+
-+ * configure.ac: Check for futimes function.
-+ * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
-+ (handle_ar) [! HAVE_FUTIMES]: Likewise.
-+
- 2005-05-19 Roland McGrath <roland@redhat.com>
-
- * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
-Index: elfutils-0.148/config/eu.am
-===================================================================
---- elfutils-0.148.orig/config/eu.am 2010-04-21 14:26:40.000000000 +0000
-+++ elfutils-0.148/config/eu.am 2010-07-03 13:04:07.000000000 +0000
-@@ -25,11 +25,14 @@
- ## <http://www.openinventionnetwork.com>.
- ##
-
-+WEXTRA = @WEXTRA@
-+LD_AS_NEEDED = @LD_AS_NEEDED@
-+
- DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
- INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
- 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) \
- $($(*F)_CFLAGS)
-
-Index: elfutils-0.148/config.h.in
-===================================================================
---- elfutils-0.148.orig/config.h.in 2010-06-28 19:07:37.000000000 +0000
-+++ elfutils-0.148/config.h.in 2010-07-03 13:04:07.000000000 +0000
-@@ -1,5 +1,8 @@
- /* config.h.in. Generated from configure.ac by autoheader. */
-
-+/* Have __builtin_popcount. */
-+#undef HAVE_BUILTIN_POPCOUNT
-+
- /* $libdir subdirectory containing libebl modules. */
- #undef LIBEBL_SUBDIR
-
-@@ -55,4 +58,7 @@
- /* Define for large files, on AIX-style hosts. */
- #undef _LARGE_FILES
-
-+/* Stubbed out if missing compiler support. */
-+#undef __thread
-+
- #include <eu-config.h>
-Index: elfutils-0.148/configure.ac
-===================================================================
---- elfutils-0.148.orig/configure.ac 2010-06-28 19:07:26.000000000 +0000
-+++ elfutils-0.148/configure.ac 2010-07-03 13:04:07.000000000 +0000
-@@ -73,6 +73,54 @@
- AS_IF([test "x$ac_cv_c99" != xyes],
- AC_MSG_ERROR([gcc with C99 support required]))
-
-+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
-+old_CFLAGS="$CFLAGS"
-+CFLAGS="$CFLAGS -Wextra"
-+AC_COMPILE_IFELSE([void foo (void) { }],
-+ ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
-+CFLAGS="$old_CFLAGS"])
-+AC_SUBST(WEXTRA)
-+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
-+
-+AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
-+old_CFLAGS="$CFLAGS"
-+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
-+AC_COMPILE_IFELSE([
-+void foo (void)
-+{
-+ inline void bar (void) {}
-+ bar ();
-+}
-+extern inline void baz (void) {}
-+], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
-+CFLAGS="$old_CFLAGS"])
-+AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
-+ [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
-+
-+AC_CACHE_CHECK([for --as-needed linker option],
-+ ac_cv_as_needed, [dnl
-+cat > conftest.c <<EOF
-+int main (void) { return 0; }
-+EOF
-+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-+ -fPIC -shared -o conftest.so conftest.c
-+ -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
-+then
-+ ac_cv_as_needed=yes
-+else
-+ ac_cv_as_needed=no
-+fi
-+rm -f conftest*])
-+AS_IF([test "x$ac_cv_as_needed" = xyes],
-+ [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
-+AC_SUBST(LD_AS_NEEDED)
-+
-+AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
-+ ac_cv_popcount=yes, ac_cv_popcount=no)])
-+AS_IF([test "x$ac_cv_popcount" = xyes],
-+ [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
-+
- 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.
-@@ -88,7 +136,10 @@
- CFLAGS="$save_CFLAGS"
- LDFLAGS="$save_LDFLAGS"])
- AS_IF([test "x$ac_cv_tls" != xyes],
-- AC_MSG_ERROR([__thread support required]))
-+ [AS_IF([test "$use_locks" = yes],
-+ [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
-+ [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
-+ [Stubbed out if missing compiler support.])])])
-
- 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
-@@ -251,7 +302,7 @@
-
- # 1.234<whatever> -> 1234<whatever>
- case "$PACKAGE_VERSION" in
--[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
-+[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
- *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
- esac
- case "$eu_version" in
-@@ -280,6 +331,6 @@
- esac
-
- # Round up to the next release API (x.y) version.
--[eu_version=$[($eu_version + 999) / 1000]]
-+eu_version=`expr \( $eu_version + 999 \) / 1000`
-
- AC_OUTPUT
-Index: elfutils-0.148/lib/ChangeLog
-===================================================================
---- elfutils-0.148.orig/lib/ChangeLog 2010-06-28 19:05:56.000000000 +0000
-+++ elfutils-0.148/lib/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -14,6 +14,9 @@
-
- 2009-01-23 Roland McGrath <roland@redhat.com>
-
-+ * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
-+ (__builtin_popcount): New inline function.
-+
- * eu-config.h: Add multiple inclusion protection.
-
- 2009-01-17 Ulrich Drepper <drepper@redhat.com>
-@@ -70,6 +73,11 @@
- * Makefile.am (libeu_a_SOURCES): Add it.
- * system.h: Declare crc32_file.
-
-+2005-02-07 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-04-30 Ulrich Drepper <drepper@redhat.com>
-
- * Makefile.am: Use -ffunction-sections for xmalloc.c.
-Index: elfutils-0.148/lib/eu-config.h
-===================================================================
---- elfutils-0.148.orig/lib/eu-config.h 2009-08-12 14:23:22.000000000 +0000
-+++ elfutils-0.148/lib/eu-config.h 2010-07-03 13:04:07.000000000 +0000
-@@ -182,6 +182,17 @@
- /* This macro is used by the tests conditionalize for standalone building. */
- #define ELFUTILS_HEADER(name) <lib##name.h>
-
-+#ifndef HAVE_BUILTIN_POPCOUNT
-+# define __builtin_popcount hakmem_popcount
-+static inline unsigned int __attribute__ ((unused))
-+hakmem_popcount (unsigned int x)
-+{
-+ /* HAKMEM 169 */
-+ unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
-+ return ((n + (n >> 3)) & 030707070707) % 63;
-+}
-+#endif /* HAVE_BUILTIN_POPCOUNT */
-+
-
- #ifdef SHARED
- # define OLD_VERSION(name, version) \
-Index: elfutils-0.148/libasm/ChangeLog
-===================================================================
---- elfutils-0.148.orig/libasm/ChangeLog 2010-03-05 05:48:23.000000000 +0000
-+++ elfutils-0.148/libasm/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -67,6 +67,11 @@
- * asm_error.c: Add new error ASM_E_IOERROR.
- * libasmP.h: Add ASM_E_IOERROR definition.
-
-+2005-05-31 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-02-15 Ulrich Drepper <drepper@redhat.com>
-
- * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
-Index: elfutils-0.148/libcpu/ChangeLog
-===================================================================
---- elfutils-0.148.orig/libcpu/ChangeLog 2010-03-05 05:48:23.000000000 +0000
-+++ elfutils-0.148/libcpu/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -9,6 +9,9 @@
-
- 2009-01-23 Roland McGrath <roland@redhat.com>
-
-+ * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
-+ compilers that don't realize it's noreturn.
-+
- * Makefile.am (i386_parse_CFLAGS): Use quotes around command
- substitution that can produce leading whitespace.
-
-@@ -338,6 +341,11 @@
- * defs/i386.doc: New file.
- * defs/x86_64: New file.
-
-+2005-04-04 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it instead of -Wextra.
-+
- 2005-02-15 Ulrich Drepper <drepper@redhat.com>
-
- * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
-Index: elfutils-0.148/libcpu/i386_disasm.c
-===================================================================
---- elfutils-0.148.orig/libcpu/i386_disasm.c 2009-01-08 20:56:36.000000000 +0000
-+++ elfutils-0.148/libcpu/i386_disasm.c 2010-07-03 13:04:07.000000000 +0000
-@@ -791,6 +791,7 @@
-
- default:
- assert (! "INVALID not handled");
-+ abort ();
- }
- }
- else
-Index: elfutils-0.148/libdw/ChangeLog
-===================================================================
---- elfutils-0.148.orig/libdw/ChangeLog 2010-06-28 19:05:56.000000000 +0000
-+++ elfutils-0.148/libdw/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -276,6 +276,10 @@
-
- * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
-
-+2009-08-17 Roland McGrath <roland@redhat.com>
-+
-+ * libdw.h: Disable extern inlines for GCC 4.2.
-+
- 2009-08-10 Roland McGrath <roland@redhat.com>
-
- * dwarf_getscopevar.c: Use dwarf_diename.
-@@ -1044,6 +1048,11 @@
-
- 2005-05-31 Roland McGrath <roland@redhat.com>
-
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
-+2005-05-31 Roland McGrath <roland@redhat.com>
-+
- * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
- formref offset.
-
-Index: elfutils-0.148/libdw/libdw.h
-===================================================================
---- elfutils-0.148.orig/libdw/libdw.h 2010-06-28 19:05:56.000000000 +0000
-+++ elfutils-0.148/libdw/libdw.h 2010-07-03 13:04:07.000000000 +0000
-@@ -842,7 +842,7 @@
-
-
- /* Inline optimizations. */
--#ifdef __OPTIMIZE__
-+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
- /* Return attribute code of given attribute. */
- __libdw_extern_inline unsigned int
- dwarf_whatattr (Dwarf_Attribute *attr)
-Index: elfutils-0.148/libdwfl/ChangeLog
-===================================================================
---- elfutils-0.148.orig/libdwfl/ChangeLog 2010-06-28 19:05:56.000000000 +0000
-+++ elfutils-0.148/libdwfl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -1265,6 +1265,11 @@
-
- 2005-07-21 Roland McGrath <roland@redhat.com>
-
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
-+2005-07-21 Roland McGrath <roland@redhat.com>
-+
- * Makefile.am (noinst_HEADERS): Add loc2c.c.
-
- * test2.c (main): Check sscanf result to quiet warning.
-Index: elfutils-0.148/libebl/ChangeLog
-===================================================================
---- elfutils-0.148.orig/libebl/ChangeLog 2010-03-05 05:48:23.000000000 +0000
-+++ elfutils-0.148/libebl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -624,6 +624,11 @@
- * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
- tracking works right.
-
-+2005-05-31 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-05-21 Ulrich Drepper <drepper@redhat.com>
-
- * libebl_x86_64.map: Add x86_64_core_note.
-Index: elfutils-0.148/libelf/ChangeLog
-===================================================================
---- elfutils-0.148.orig/libelf/ChangeLog 2010-06-14 21:17:20.000000000 +0000
-+++ elfutils-0.148/libelf/ChangeLog 2010-07-03 13:04:07.000000000 +0000
-@@ -657,6 +657,11 @@
-
- * elf.h: Update from glibc.
-
-+2005-05-31 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-05-08 Roland McGrath <roland@redhat.com>
-
- * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
-Index: elfutils-0.148/libelf/common.h
-===================================================================
---- elfutils-0.148.orig/libelf/common.h 2009-01-08 20:56:36.000000000 +0000
-+++ elfutils-0.148/libelf/common.h 2010-07-03 13:04:07.000000000 +0000
-@@ -160,7 +160,7 @@
- (Var) = (sizeof (Var) == 1 \
- ? (unsigned char) (Var) \
- : (sizeof (Var) == 2 \
-- ? bswap_16 (Var) \
-+ ? (unsigned short int) bswap_16 (Var) \
- : (sizeof (Var) == 4 \
- ? bswap_32 (Var) \
- : bswap_64 (Var))))
-@@ -169,7 +169,7 @@
- (Dst) = (sizeof (Var) == 1 \
- ? (unsigned char) (Var) \
- : (sizeof (Var) == 2 \
-- ? bswap_16 (Var) \
-+ ? (unsigned short int) bswap_16 (Var) \
- : (sizeof (Var) == 4 \
- ? bswap_32 (Var) \
- : bswap_64 (Var))))
-Index: elfutils-0.148/src/addr2line.c
-===================================================================
---- elfutils-0.148.orig/src/addr2line.c 2010-05-28 14:38:30.000000000 +0000
-+++ elfutils-0.148/src/addr2line.c 2010-07-03 13:05:40.000000000 +0000
-@@ -447,10 +447,10 @@
- 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;
-Index: elfutils-0.148/src/ChangeLog
-===================================================================
---- elfutils-0.148.orig/src/ChangeLog 2010-06-28 19:05:56.000000000 +0000
-+++ elfutils-0.148/src/ChangeLog 2010-07-03 13:04:08.000000000 +0000
-@@ -165,8 +165,16 @@
- * readelf.c (attr_callback): Use print_block only when we don't use
- print_ops.
-
-+2009-08-17 Roland McGrath <roland@redhat.com>
-+
-+ * ld.h: Disable extern inlines for GCC 4.2.
-+
- 2009-08-14 Roland McGrath <roland@redhat.com>
-
-+ * strings.c (read_block): Conditionalize posix_fadvise use
-+ on [POSIX_FADV_SEQUENTIAL].
-+ From Petr Salinger <Petr.Salinger@seznam.cz>.
-+
- * ar.c (do_oper_extract): Use pathconf instead of statfs.
-
- 2009-08-01 Ulrich Drepper <drepper@redhat.com>
-@@ -330,6 +338,8 @@
- * readelf.c (print_debug_frame_section): Use t instead of j formats
- for ptrdiff_t OFFSET.
-
-+ * addr2line.c (handle_address): Use %a instead of %m for compatibility.
-+
- 2009-01-21 Ulrich Drepper <drepper@redhat.com>
-
- * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
-@@ -513,6 +523,11 @@
- that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
- is valid in RELRO.
-
-+2008-03-01 Roland McGrath <roland@redhat.com>
-+
-+ * readelf.c (dump_archive_index): Tweak portability hack
-+ to match [__GNUC__ < 4] too.
-+
- 2008-02-29 Roland McGrath <roland@redhat.com>
-
- * readelf.c (print_attributes): Add a cast.
-@@ -764,6 +779,8 @@
-
- * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
-
-+ * Makefile.am (readelf_no_Werror): New variable.
-+
- 2007-10-15 Roland McGrath <roland@redhat.com>
-
- * make-debug-archive.in: New file.
-@@ -1203,6 +1220,10 @@
- * elflint.c (valid_e_machine): Add EM_ALPHA.
- Reported by Christian Aichinger <Greek0@gmx.net>.
-
-+ * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
-+ MADV_SEQUENTIAL if undefined. Don't call posix_madvise
-+ if neither is defined.
-+
- 2006-08-08 Ulrich Drepper <drepper@redhat.com>
-
- * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
-@@ -1279,6 +1300,10 @@
- * Makefile.am: Add hacks to create dependency files for non-generic
- linker.
-
-+2006-04-05 Roland McGrath <roland@redhat.com>
-+
-+ * strings.c (MAP_POPULATE): Define to 0 if undefined.
-+
- 2006-06-12 Ulrich Drepper <drepper@redhat.com>
-
- * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
-@@ -1627,6 +1652,11 @@
- * readelf.c (print_debug_loc_section): Fix indentation for larger
- address size.
-
-+2005-05-31 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-05-30 Roland McGrath <roland@redhat.com>
-
- * readelf.c (print_debug_line_section): Print section offset of each
-Index: elfutils-0.148/src/findtextrel.c
-===================================================================
---- elfutils-0.148.orig/src/findtextrel.c 2009-02-11 01:12:59.000000000 +0000
-+++ elfutils-0.148/src/findtextrel.c 2010-07-03 13:04:08.000000000 +0000
-@@ -490,7 +490,11 @@
-
-
- static void
--check_rel (size_t nsegments, struct segments segments[nsegments],
-+check_rel (size_t nsegments, struct segments segments[
-+#if __GNUC__ >= 4
-+ nsegments
-+#endif
-+ ],
- GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
- const char *fname, bool more_than_one, void **knownsrcs)
- {
-Index: elfutils-0.148/src/ld.h
-===================================================================
---- elfutils-0.148.orig/src/ld.h 2009-06-13 22:39:51.000000000 +0000
-+++ elfutils-0.148/src/ld.h 2010-07-03 13:04:08.000000000 +0000
-@@ -1122,6 +1122,7 @@
-
- /* Checked whether the symbol is undefined and referenced from a DSO. */
- extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
-+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
- #ifdef __GNUC_STDC_INLINE__
- __attribute__ ((__gnu_inline__))
- #endif
-@@ -1139,5 +1140,6 @@
-
- return sym->defined && sym->in_dso;
- }
-+#endif /* Optimizing and not GCC 4.2. */
-
- #endif /* ld.h */
-Index: elfutils-0.148/src/Makefile.am
-===================================================================
---- elfutils-0.148.orig/src/Makefile.am 2010-03-05 05:48:23.000000000 +0000
-+++ elfutils-0.148/src/Makefile.am 2010-07-03 13:04:08.000000000 +0000
-@@ -99,6 +99,9 @@
- # 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
- size_LDADD = $(libelf) $(libeu) $(libmudflap)
-
-Index: elfutils-0.148/src/readelf.c
-===================================================================
---- elfutils-0.148.orig/src/readelf.c 2010-06-28 19:05:56.000000000 +0000
-+++ elfutils-0.148/src/readelf.c 2010-07-03 13:04:08.000000000 +0000
-@@ -7845,7 +7845,7 @@
- if (unlikely (elf_rand (elf, as_off) == 0)
- || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
- == NULL))
--#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
-+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
- while (1)
- #endif
- error (EXIT_FAILURE, 0,
-Index: elfutils-0.148/src/strings.c
-===================================================================
---- elfutils-0.148.orig/src/strings.c 2009-02-11 01:12:59.000000000 +0000
-+++ elfutils-0.148/src/strings.c 2010-07-03 13:04:08.000000000 +0000
-@@ -51,6 +51,10 @@
-
- #include <system.h>
-
-+#ifndef MAP_POPULATE
-+# define MAP_POPULATE 0
-+#endif
-+
-
- /* Prototypes of local functions. */
- static int read_fd (int fd, const char *fname, off64_t fdlen);
-@@ -491,8 +495,13 @@
- fd, start_off);
- if (mem != MAP_FAILED)
- {
-+#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
-+# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
-+#endif
-+#ifdef POSIX_MADV_SEQUENTIAL
- /* We will go through the mapping sequentially. */
- (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
-+#endif
- break;
- }
- if (errno != EINVAL && errno != ENOMEM)
-@@ -586,9 +595,11 @@
- elfmap_off = from & ~(ps - 1);
- elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
-
-+#ifdef POSIX_FADV_SEQUENTIAL
- if (unlikely (elfmap == MAP_FAILED))
- /* Let the kernel know we are going to read everything in sequence. */
- (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
-+#endif
- }
-
- if (unlikely (elfmap == MAP_FAILED))
-Index: elfutils-0.148/src/strip.c
-===================================================================
---- elfutils-0.148.orig/src/strip.c 2010-01-15 09:05:55.000000000 +0000
-+++ elfutils-0.148/src/strip.c 2010-07-03 13:04:08.000000000 +0000
-@@ -53,6 +53,12 @@
- #include <libebl.h>
- #include <system.h>
-
-+#ifdef HAVE_FUTIMES
-+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
-+#else
-+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
-+#endif
-+
-
- /* Name and version of program. */
- static void print_version (FILE *stream, struct argp_state *state);
-@@ -301,8 +307,18 @@
-
- /* If we have to preserve the timestamp, we need it in the
- format utimes() understands. */
-+#ifdef HAVE_STRUCT_STAT_ST_ATIM
- TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
-+#else
-+ tv[0].tv_sec = pre_st.st_atime;
-+ tv[0].tv_usec = 0;
-+#endif
-+#ifdef HAVE_STRUCT_STAT_ST_MTIM
- TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
-+#else
-+ tv[1].tv_sec = pre_st.st_atime;
-+ tv[1].tv_usec = 0;
-+#endif
- }
-
- /* Open the file. */
-@@ -1747,7 +1763,7 @@
- /* If requested, preserve the timestamp. */
- if (tvp != NULL)
- {
-- if (futimes (fd, tvp) != 0)
-+ if (FUTIMES (fd, output_fname, tvp) != 0)
- {
- error (0, errno, gettext ("\
- cannot set access and modification date of '%s'"),
-@@ -1804,7 +1820,7 @@
-
- if (tvp != NULL)
- {
-- if (unlikely (futimes (fd, tvp) != 0))
-+ if (unlikely (FUTIMES (fd, fname, tvp) != 0))
- {
- error (0, errno, gettext ("\
- cannot set access and modification date of '%s'"), fname);
-Index: elfutils-0.148/tests/ChangeLog
-===================================================================
---- elfutils-0.148.orig/tests/ChangeLog 2010-06-28 19:05:56.000000000 +0000
-+++ elfutils-0.148/tests/ChangeLog 2010-07-03 13:04:08.000000000 +0000
-@@ -154,6 +154,8 @@
-
- 2008-01-21 Roland McGrath <roland@redhat.com>
-
-+ * line2addr.c (main): Revert last change.
-+
- * testfile45.S.bz2: Add tests for cltq, cqto.
- * testfile45.expect.bz2: Adjust.
-
-@@ -862,6 +864,11 @@
- * Makefile.am (TESTS): Add run-elflint-test.sh.
- (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
-
-+2005-05-31 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-05-24 Ulrich Drepper <drepper@redhat.com>
-
- * get-files.c (main): Use correct format specifier.
-Index: elfutils-0.148/tests/line2addr.c
-===================================================================
---- elfutils-0.148.orig/tests/line2addr.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/tests/line2addr.c 2010-07-03 13:04:08.000000000 +0000
-@@ -132,7 +132,7 @@
- {
- struct args a = { .arg = argv[cnt] };
-
-- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
-+ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
- {
- default:
- case 0:
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
deleted file mode 100644
index cd398549df..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
+++ /dev/null
@@ -1,1709 +0,0 @@
-Upstream-Status: Backport
-
-Index: elfutils-0.148/libelf/ChangeLog
-===================================================================
---- elfutils-0.148.orig/libelf/ChangeLog 2010-07-03 13:07:10.000000000 +0000
-+++ elfutils-0.148/libelf/ChangeLog 2010-07-03 13:07:11.000000000 +0000
-@@ -649,10 +649,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.
-Index: elfutils-0.148/libelf/elf32_getphdr.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf32_getphdr.c 2010-04-21 14:26:40.000000000 +0000
-+++ elfutils-0.148/libelf/elf32_getphdr.c 2010-07-03 13:07:11.000000000 +0000
-@@ -114,6 +114,16 @@
-
- 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);
-Index: elfutils-0.148/libelf/elf32_getshdr.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf32_getshdr.c 2009-06-13 22:41:42.000000000 +0000
-+++ elfutils-0.148/libelf/elf32_getshdr.c 2010-07-03 13:07:11.000000000 +0000
-@@ -1,5 +1,5 @@
- /* Return section header.
-- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2009 Red Hat, Inc.
-+ Copyright (C) 1998-2009 Red Hat, Inc.
- This file is part of Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1998.
-
-@@ -81,7 +81,8 @@
- 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));
-
-@@ -98,6 +99,16 @@
-
- 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
-Index: elfutils-0.148/libelf/elf32_newphdr.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf32_newphdr.c 2010-01-12 16:57:54.000000000 +0000
-+++ elfutils-0.148/libelf/elf32_newphdr.c 2010-07-03 13:07:11.000000000 +0000
-@@ -135,6 +135,12 @@
- || 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) *)
-Index: elfutils-0.148/libelf/elf32_updatefile.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf32_updatefile.c 2010-01-12 16:57:54.000000000 +0000
-+++ elfutils-0.148/libelf/elf32_updatefile.c 2010-07-03 13:07:11.000000000 +0000
-@@ -223,6 +223,9 @@
- /* 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
-@@ -645,6 +648,10 @@
- /* 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];
-Index: elfutils-0.148/libelf/elf_begin.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf_begin.c 2010-04-21 14:26:40.000000000 +0000
-+++ elfutils-0.148/libelf/elf_begin.c 2010-07-03 13:07:11.000000000 +0000
-@@ -165,7 +165,8 @@
-
- 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;
-
-@@ -213,7 +214,8 @@
-
- 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;
-
-@@ -285,6 +287,15 @@
- /* 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)
-@@ -324,6 +335,16 @@
- {
- /* 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);
-
-@@ -410,6 +431,11 @@
- {
- /* 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);
-
-Index: elfutils-0.148/libelf/elf_getarsym.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf_getarsym.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/elf_getarsym.c 2010-07-03 13:07:11.000000000 +0000
-@@ -179,6 +179,9 @@
- 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 * sizeof (uint32_t) > index_size)
- {
- /* This index table cannot be right since it does not fit into
-Index: elfutils-0.148/libelf/elf_getshdrstrndx.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf_getshdrstrndx.c 2009-06-13 22:31:35.000000000 +0000
-+++ elfutils-0.148/libelf/elf_getshdrstrndx.c 2010-07-03 13:07:11.000000000 +0000
-@@ -125,10 +125,25 @@
- 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
-@@ -163,10 +178,25 @@
- 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
-Index: elfutils-0.148/libelf/elf_newscn.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf_newscn.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/elf_newscn.c 2010-07-03 13:07:11.000000000 +0000
-@@ -104,10 +104,18 @@
- 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);
-Index: elfutils-0.148/libelf/gelf_getdyn.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getdyn.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getdyn.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -93,7 +93,7 @@
- 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;
-@@ -114,7 +114,7 @@
-
- /* 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;
-Index: elfutils-0.148/libelf/gelf_getlib.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getlib.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getlib.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2004.
-
-@@ -86,7 +86,7 @@
- /* 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
- {
-Index: elfutils-0.148/libelf/gelf_getmove.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getmove.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getmove.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -83,7 +83,7 @@
-
- /* 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;
-Index: elfutils-0.148/libelf/gelf_getrela.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getrela.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getrela.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -71,12 +71,6 @@
- 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);
-@@ -93,7 +87,7 @@
- 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;
-@@ -114,7 +108,7 @@
- {
- /* 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;
-Index: elfutils-0.148/libelf/gelf_getrel.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getrel.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getrel.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -71,12 +71,6 @@
- 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);
-@@ -93,7 +87,7 @@
- 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;
-@@ -113,7 +107,7 @@
- {
- /* 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;
-Index: elfutils-0.148/libelf/gelf_getsym.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getsym.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getsym.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1999.
-
-@@ -90,7 +90,7 @@
- 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;
-@@ -119,7 +119,7 @@
-
- /* 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;
-Index: elfutils-0.148/libelf/gelf_getsyminfo.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getsyminfo.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getsyminfo.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -84,7 +84,7 @@
-
- /* 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;
-Index: elfutils-0.148/libelf/gelf_getsymshndx.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getsymshndx.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getsymshndx.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -90,7 +90,7 @@
- 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;
-@@ -110,7 +110,7 @@
- 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;
-@@ -139,7 +139,7 @@
-
- /* 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;
-Index: elfutils-0.148/libelf/gelf_getversym.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_getversym.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_getversym.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1999.
-
-@@ -92,7 +92,7 @@
-
- /* 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;
-Index: elfutils-0.148/libelf/gelf_update_dyn.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_dyn.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_dyn.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -71,12 +71,6 @@
- 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. */
-@@ -102,7 +96,7 @@
- }
-
- /* 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;
-@@ -116,7 +110,7 @@
- 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;
-Index: elfutils-0.148/libelf/gelf_update_lib.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_lib.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_lib.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2004.
-
-@@ -68,12 +68,6 @@
- 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))
- {
-@@ -87,7 +81,7 @@
-
- /* 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
- {
-Index: elfutils-0.148/libelf/gelf_update_move.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_move.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_move.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -75,8 +75,7 @@
- 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;
-Index: elfutils-0.148/libelf/gelf_update_rela.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_rela.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_rela.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -68,12 +68,6 @@
- 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. */
-@@ -101,7 +95,7 @@
- }
-
- /* 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;
-@@ -117,7 +111,7 @@
- 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;
-Index: elfutils-0.148/libelf/gelf_update_rel.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_rel.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_rel.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -68,12 +68,6 @@
- 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. */
-@@ -99,7 +93,7 @@
- }
-
- /* 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;
-@@ -114,7 +108,7 @@
- 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;
-Index: elfutils-0.148/libelf/gelf_update_sym.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_sym.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_sym.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -72,12 +72,6 @@
- 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. */
-@@ -102,7 +96,7 @@
- }
-
- /* 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;
-@@ -125,7 +119,7 @@
- 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;
-Index: elfutils-0.148/libelf/gelf_update_syminfo.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_syminfo.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_syminfo.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -72,12 +72,6 @@
- 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. */
-@@ -93,7 +87,7 @@
- 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;
-Index: elfutils-0.148/libelf/gelf_update_symshndx.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_symshndx.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_symshndx.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -77,12 +77,6 @@
- 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. */
-@@ -128,7 +122,7 @@
- }
-
- /* 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;
-@@ -151,7 +145,7 @@
- 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;
-Index: elfutils-0.148/libelf/gelf_update_versym.c
-===================================================================
---- elfutils-0.148.orig/libelf/gelf_update_versym.c 2009-01-08 20:56:37.000000000 +0000
-+++ elfutils-0.148/libelf/gelf_update_versym.c 2010-07-03 13:07:11.000000000 +0000
-@@ -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 Red Hat elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2001.
-
-@@ -75,8 +75,7 @@
- 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;
-Index: elfutils-0.148/libelf/libelfP.h
-===================================================================
---- elfutils-0.148.orig/libelf/libelfP.h 2010-01-12 16:57:54.000000000 +0000
-+++ elfutils-0.148/libelf/libelfP.h 2010-07-03 13:07:11.000000000 +0000
-@@ -608,4 +608,8 @@
- /* 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 */
-Index: elfutils-0.148/src/ChangeLog
-===================================================================
---- elfutils-0.148.orig/src/ChangeLog 2010-07-03 13:07:10.000000000 +0000
-+++ elfutils-0.148/src/ChangeLog 2010-07-03 13:07:11.000000000 +0000
-@@ -1640,6 +1640,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.
-@@ -1690,6 +1700,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,
-Index: elfutils-0.148/src/elflint.c
-===================================================================
---- elfutils-0.148.orig/src/elflint.c 2010-04-13 20:08:02.000000000 +0000
-+++ elfutils-0.148/src/elflint.c 2010-07-03 13:07:11.000000000 +0000
-@@ -131,6 +131,10 @@
- /* 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[])
-@@ -319,10 +323,19 @@
- {
- 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;
- }
-
-
-@@ -344,11 +357,6 @@
- (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)
- {
-@@ -632,7 +640,8 @@
- }
- }
-
-- 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));
-@@ -670,7 +679,7 @@
- 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)
-@@ -690,7 +699,8 @@
- 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)
-@@ -1038,9 +1048,11 @@
- {
- 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);
-@@ -1050,7 +1062,9 @@
- {
- 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)
- {
-@@ -1064,7 +1078,9 @@
- /* 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),
-@@ -1224,7 +1240,8 @@
- }
- }
-
-- 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"),
-@@ -1447,7 +1464,8 @@
- 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);
-@@ -1497,7 +1515,8 @@
- 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);
-@@ -1600,7 +1619,8 @@
- 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));
-@@ -1610,7 +1630,7 @@
- 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);
-@@ -1891,6 +1911,8 @@
- 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 ("\
-@@ -1917,6 +1939,12 @@
- }
-
- 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"));
-@@ -1959,7 +1987,7 @@
-
- size_t maxidx = nchain;
-
-- if (symshdr != NULL)
-+ if (symshdr != NULL && symshdr->sh_entsize != 0)
- {
- size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
-
-@@ -1970,18 +1998,28 @@
- 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);
-+ }
- }
-
-
-@@ -2011,18 +2049,28 @@
- 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);
-+ }
- }
-
-
-@@ -2047,7 +2095,7 @@
- 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;
-@@ -2719,8 +2767,9 @@
-
- /* 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),
-Index: elfutils-0.148/src/readelf.c
-===================================================================
---- elfutils-0.148.orig/src/readelf.c 2010-07-03 13:07:10.000000000 +0000
-+++ elfutils-0.148/src/readelf.c 2010-07-03 13:07:11.000000000 +0000
-@@ -1172,6 +1172,8 @@
- 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",
-@@ -1184,8 +1186,8 @@
- 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);
-
-@@ -1336,7 +1338,8 @@
- 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;
-@@ -1351,6 +1354,11 @@
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ 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",
- "\
-@@ -1360,9 +1368,7 @@
- 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)
-@@ -1945,6 +1951,13 @@
- 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)
-@@ -1955,15 +1968,12 @@
- 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 ("\
-@@ -2199,7 +2209,13 @@
- 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",
- "\
-@@ -2210,9 +2226,7 @@
- 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; )
-@@ -2265,8 +2279,14 @@
- 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",
- "\
-@@ -2278,9 +2298,7 @@
- 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; )
-@@ -2542,8 +2560,14 @@
- filename = NULL;
- }
-
-+ 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));
-+
- /* 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'",
- "\
-@@ -2555,9 +2579,7 @@
- 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)
-@@ -2609,7 +2631,17 @@
- 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",
- "\
-@@ -2622,9 +2654,7 @@
- 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);
-@@ -4312,6 +4342,16 @@
- 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",
- "\
-Index: elfutils-0.148/src/strip.c
-===================================================================
---- elfutils-0.148.orig/src/strip.c 2010-07-03 13:07:10.000000000 +0000
-+++ elfutils-0.148/src/strip.c 2010-07-03 13:07:11.000000000 +0000
-@@ -561,6 +561,11 @@
- 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.
-@@ -582,7 +587,7 @@
- {
- /* 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;
-
-@@ -595,6 +600,7 @@
- shdr_info[cnt].shdr.sh_name);
- if (shdr_info[cnt].name == NULL)
- {
-+ illformed:
- error (0, 0, gettext ("illformed file '%s'"), fname);
- goto fail_close;
- }
-@@ -604,6 +610,8 @@
-
- /* 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
-@@ -616,7 +624,7 @@
- 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))
-@@ -633,7 +641,12 @@
- 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
-@@ -644,7 +657,7 @@
- }
- 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;
- }
-
-@@ -652,7 +665,7 @@
- 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)
- {
-@@ -727,11 +740,15 @@
- {
- /* 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)
-+ {
-+ 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 (shdr_info[cnt].idx == 1)
- {
-@@ -758,7 +775,7 @@
- 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,
-@@ -798,6 +815,9 @@
- 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
-@@ -828,12 +848,16 @@
- }
-
- /* 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;
-@@ -972,7 +996,7 @@
- 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);
-@@ -1009,7 +1033,7 @@
- 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)
-@@ -1065,7 +1089,7 @@
- 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. */
-@@ -1155,20 +1179,20 @@
- 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);
- }
-
-@@ -1223,7 +1247,7 @@
- sec = shdr_info[sym->st_shndx].idx;
- else
- {
-- assert (shndxdata != NULL);
-+ elf_assert (shndxdata != NULL);
-
- sec = shdr_info[xshndx].idx;
- }
-@@ -1244,7 +1268,7 @@
- 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))
-@@ -1268,7 +1292,7 @@
- || shdr_info[cnt].debug_data == NULL)
- /* This is a section symbol for a section which has
- been removed. */
-- assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
-+ elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
- }
-
- if (destidx != inner)
-@@ -1455,11 +1479,11 @@
- {
- 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)
-@@ -1478,7 +1502,7 @@
- else
- {
- /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */
-- assert (shdr_info[cnt].shdr.sh_entsize
-+ elf_assert (shdr_info[cnt].shdr.sh_entsize
- == sizeof (Elf64_Xword));
-
- Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
-@@ -1509,11 +1533,11 @@
- {
- 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.148/remove-unused.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
deleted file mode 100644
index 6a19791480..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Upstream-Status: Backport
-
-Remove unused variables from the code to prevent -Werror causing a build
-failure on hosts with GCC 4.6.
-
-These changes are all upstream so should not be required once we've updated
-to elfutils 0.152 or later. Therefore this patch consolidates several
-changes from elfutils upstream by Roland McGrath into a single file so that
-it's easier to remove later once we upgrade.
-Links to upstream gitweb of the consolidated commits follow:
-- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=7094d00a169afb27e0323f8580e817798ae7c240
-- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=fd992543185126eb0280c1ee0883e073020499b4
-- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=4db89f04bb59327abd7a3b60e88f2e7e73c65c79
-- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=8f6c1795ab9d41f03805eebd55767070ade55aac
-- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=240784b48aa276822c5a61c9ad6a4355051ce259
-
-Joshua Lock <josh@linux.intel.com> - 06/04/11
-
-Index: elfutils-0.148/libasm/asm_newscn.c
-===================================================================
---- elfutils-0.148.orig/libasm/asm_newscn.c
-+++ elfutils-0.148/libasm/asm_newscn.c
-@@ -162,7 +162,6 @@ asm_newscn (ctx, scnname, type, flags)
- GElf_Xword flags;
- {
- size_t scnname_len = strlen (scnname) + 1;
-- unsigned long int hval;
- AsmScn_t *result;
-
- /* If no context is given there might be an earlier error. */
-@@ -180,8 +179,6 @@ asm_newscn (ctx, scnname, type, flags)
- return NULL;
- }
-
-- hval = elf_hash (scnname);
--
- rwlock_wrlock (ctx->lock);
-
- /* This is a new section. */
-Index: elfutils-0.148/src/elflint.c
-===================================================================
---- elfutils-0.148.orig/src/elflint.c
-+++ elfutils-0.148/src/elflint.c
-@@ -707,9 +707,10 @@ section [%2d] '%s': symbol %zu: invalid
- {
- if (xndxdata == NULL)
- {
-- ERROR (gettext ("\
-+ if (!no_xndx_warned)
-+ ERROR (gettext ("\
- section [%2d] '%s': symbol %zu: too large section index but no extended section index section\n"),
-- idx, section_name (ebl, idx), cnt);
-+ idx, section_name (ebl, idx), cnt);
- no_xndx_warned = true;
- }
- else if (xndx < SHN_LORESERVE)
-@@ -1592,10 +1593,6 @@ check_dynamic (Ebl *ebl, GElf_Ehdr *ehdr
- [DT_STRSZ] = true,
- [DT_SYMENT] = true
- };
-- GElf_Addr reladdr = 0;
-- GElf_Word relsz = 0;
-- GElf_Addr pltreladdr = 0;
-- GElf_Word pltrelsz = 0;
-
- memset (has_dt, '\0', sizeof (has_dt));
- memset (has_val_dt, '\0', sizeof (has_val_dt));
-@@ -1694,15 +1691,6 @@ section [%2d] '%s': entry %zu: level 2 t
- section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n"),
- idx, section_name (ebl, idx), cnt);
-
-- if (dyn->d_tag == DT_REL)
-- reladdr = dyn->d_un.d_ptr;
-- if (dyn->d_tag == DT_RELSZ)
-- relsz = dyn->d_un.d_val;
-- if (dyn->d_tag == DT_JMPREL)
-- pltreladdr = dyn->d_un.d_ptr;
-- if (dyn->d_tag == DT_PLTRELSZ)
-- pltrelsz = dyn->d_un.d_val;
--
- /* Check that addresses for entries are in loaded segments. */
- switch (dyn->d_tag)
- {
-Index: elfutils-0.148/src/ldgeneric.c
-===================================================================
---- elfutils-0.148.orig/src/ldgeneric.c
-+++ elfutils-0.148/src/ldgeneric.c
-@@ -285,12 +285,10 @@ static int
- check_for_duplicate2 (struct usedfiles *newp, struct usedfiles *list)
- {
- struct usedfiles *first;
-- struct usedfiles *prevp;
-
- if (list == NULL)
- return 0;
-
-- prevp = list;
- list = first = list->next;
- do
- {
-Index: elfutils-0.148/src/ldscript.y
-===================================================================
---- elfutils-0.148.orig/src/ldscript.y
-+++ elfutils-0.148/src/ldscript.y
-@@ -802,12 +802,9 @@ add_versions (struct version *versions)
-
- do
- {
-- struct version *oldp;
--
- add_id_list (versions->versionname, versions->local_names, true);
- add_id_list (versions->versionname, versions->global_names, false);
-
-- oldp = versions;
- versions = versions->next;
- }
- while (versions != NULL);
-Index: elfutils-0.148/src/unstrip.c
-===================================================================
---- elfutils-0.148.orig/src/unstrip.c
-+++ elfutils-0.148/src/unstrip.c
-@@ -1301,7 +1301,6 @@ more sections in stripped file than debu
- /* Match each debuginfo section with its corresponding stripped section. */
- bool check_prelink = false;
- Elf_Scn *unstripped_symtab = NULL;
-- size_t unstripped_strtab_ndx = SHN_UNDEF;
- size_t alloc_avail = 0;
- scn = NULL;
- while ((scn = elf_nextscn (unstripped, scn)) != NULL)
-@@ -1313,7 +1312,6 @@ more sections in stripped file than debu
- if (shdr->sh_type == SHT_SYMTAB)
- {
- unstripped_symtab = scn;
-- unstripped_strtab_ndx = shdr->sh_link;
- continue;
- }
-
-Index: elfutils-0.148/src/ldscript.c
-===================================================================
---- elfutils-0.148.orig/src/ldscript.c
-+++ elfutils-0.148/src/ldscript.c
-@@ -2728,12 +2728,9 @@ add_versions (struct version *versions)
-
- do
- {
-- struct version *oldp;
--
- add_id_list (versions->versionname, versions->local_names, true);
- add_id_list (versions->versionname, versions->global_names, false);
-
-- oldp = versions;
- versions = versions->next;
- }
- while (versions != NULL);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
deleted file mode 100644
index d792d5fd73..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Backport
-
-On many architectures this test fails because binaries/libs produced by
-binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.
-
-So we run the tests on all archs to see what breaks, but if it breaks we ignore
-the result (exitcode 77 means: this test was skipped).
-
-Index: elfutils-0.128/tests/run-elflint-self.sh
-===================================================================
---- elfutils-0.128.orig/tests/run-elflint-self.sh 2007-07-08 21:46:16.000000000 +0000
-+++ elfutils-0.128/tests/run-elflint-self.sh 2007-07-08 21:46:49.000000000 +0000
-@@ -32,7 +32,7 @@
- # echo $1
- if [ -f $1 ]; then
- testrun ../src/elflint --quiet --gnu-ld $1 ||
-- { echo "*** failure in $1"; status=1; }
-+ { echo "*** failure in $1"; status=77; }
- fi
- }
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch
deleted file mode 100644
index 3cf16ac923..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-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.
-
-Signed-off-by: Khem Raj <raj.khem>
-
-Upstream-Status: Inappropriate [uclibc specific]
-
-Index: elfutils-0.148/configure.ac
-===================================================================
---- elfutils-0.148.orig/configure.ac
-+++ elfutils-0.148/configure.ac
-@@ -55,9 +55,16 @@ AS_IF([test "$use_locks" = yes], [AC_DEF
-
- 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.])
-+
- dnl Add all the languages for which translations are available.
- ALL_LINGUAS=
--
- AC_PROG_CC
- AC_PROG_RANLIB
- AC_PROG_YACC
-Index: elfutils-0.148/libelf/Makefile.am
-===================================================================
---- elfutils-0.148.orig/libelf/Makefile.am
-+++ elfutils-0.148/libelf/Makefile.am
-@@ -93,7 +93,12 @@ if !MUDFLAP
- 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
-Index: elfutils-0.148/libdw/Makefile.am
-===================================================================
---- elfutils-0.148.orig/libdw/Makefile.am
-+++ elfutils-0.148/libdw/Makefile.am
-@@ -98,6 +98,11 @@ if !MUDFLAP
- 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: $(srcdir)/libdw.map libdw_pic.a \
- ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
-@@ -108,7 +113,7 @@ libdw.so: $(srcdir)/libdw.map libdw_pic.
- -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)
- if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
- ln -fs $@ $@.$(VERSION)
-
-Index: elfutils-0.148/libcpu/Makefile.am
-===================================================================
---- elfutils-0.148.orig/libcpu/Makefile.am
-+++ elfutils-0.148/libcpu/Makefile.am
-@@ -63,6 +63,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3
- i386_lex.o: i386_parse.h
- i386_gendis_LDADD = $(libeu) -lm $(libmudflap)
-
-+if USE_UCLIBC
-+i386_gendis_LDADD += -luargp -lintl
-+endif
-+
- i386_parse.h: i386_parse.c ;
-
- noinst_HEADERS = memory-access.h i386_parse.h i386_data.h
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h b/meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h
deleted file mode 100644
index a0198bed97..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h
+++ /dev/null
@@ -1,1632 +0,0 @@
-#define MNEMONIC_BITS 10
-#define SUFFIX_BITS 3
-#define FCT1_BITS 7
-#define STR1_BITS 4
-#define OFF1_1_BITS 7
-#define OFF1_1_BIAS 3
-#define OFF1_2_BITS 7
-#define OFF1_2_BIAS 4
-#define OFF1_3_BITS 1
-#define OFF1_3_BIAS 7
-#define FCT2_BITS 6
-#define STR2_BITS 2
-#define OFF2_1_BITS 7
-#define OFF2_1_BIAS 5
-#define OFF2_2_BITS 7
-#define OFF2_2_BIAS 4
-#define OFF2_3_BITS 4
-#define OFF2_3_BIAS 7
-#define FCT3_BITS 4
-#define STR3_BITS 1
-#define OFF3_1_BITS 6
-#define OFF3_1_BIAS 10
-#define OFF3_2_BITS 1
-#define OFF3_2_BIAS 21
-
-#include <i386_data.h>
-
-#define suffix_none 0
-#define suffix_w 1
-#define suffix_w0 2
-#define suffix_W 3
-#define suffix_tttn 4
-#define suffix_D 7
-#define suffix_w1 5
-#define suffix_W1 6
-
-static const opfct_t op1_fct[] =
-{
- NULL,
- FCT_MOD$R_M,
- FCT_Mod$R_m,
- FCT_abs,
- FCT_ax,
- FCT_ax$w,
- FCT_ccc,
- FCT_ddd,
- FCT_disp8,
- FCT_ds_bx,
- FCT_ds_si,
- FCT_dx,
- FCT_es_di,
- FCT_freg,
- FCT_imm$s,
- FCT_imm$w,
- FCT_imm16,
- FCT_imm64$w,
- FCT_imm8,
- FCT_imms8,
- FCT_mmxreg,
- FCT_mod$16r_m,
- FCT_mod$64r_m,
- FCT_mod$8r_m,
- FCT_mod$r_m,
- FCT_mod$r_m$w,
- FCT_reg,
- FCT_reg$w,
- FCT_reg64,
- FCT_rel,
- FCT_sel,
- FCT_sreg2,
- FCT_sreg3,
- FCT_string,
- FCT_xmmreg,
-};
-static const char op1_str[] =
- "%ax\0"
- "%cl\0"
- "%rax\0"
- "%st\0"
- "%xmm0\0"
- "*";
-static const uint8_t op1_str_idx[] = {
- 0,
- 4,
- 8,
- 13,
- 17,
- 23,
-};
-static const opfct_t op2_fct[] =
-{
- NULL,
- FCT_MOD$R_M,
- FCT_Mod$R_m,
- FCT_abs,
- FCT_absval,
- FCT_ax$w,
- FCT_ccc,
- FCT_ddd,
- FCT_ds_si,
- FCT_dx,
- FCT_es_di,
- FCT_freg,
- FCT_imm8,
- FCT_mmxreg,
- FCT_mod$64r_m,
- FCT_mod$r_m,
- FCT_mod$r_m$w,
- FCT_oreg,
- FCT_oreg$w,
- FCT_reg,
- FCT_reg$w,
- FCT_reg64,
- FCT_sreg3,
- FCT_string,
- FCT_xmmreg,
-};
-static const char op2_str[] =
- "%rcx\0"
- "%st";
-static const uint8_t op2_str_idx[] = {
- 0,
- 5,
-};
-static const opfct_t op3_fct[] =
-{
- NULL,
- FCT_mmxreg,
- FCT_mod$r_m,
- FCT_reg,
- FCT_string,
- FCT_xmmreg,
-};
-static const char op3_str[] =
- "%rdx";
-static const uint8_t op3_str_idx[] = {
- 0,
-};
-static const struct instr_enc instrtab[] =
-{
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addsubpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addsubps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movslq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bsf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bswap, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 26, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bt, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_btc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_btc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_btr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_btr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bts, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_bts, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_call, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_call, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 22, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lcall, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 22, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_clc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cli, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_syscall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_clts, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sysret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sysenter, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sysexit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmov, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmps, .rep = 0, .repe = 1, .suffix = 1, .modrm = 0, .fct1 = 12, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 8, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpxchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 15, .off1_2 = 11, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 8, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cpuid, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtdq2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpd2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttpd2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_dec, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_div, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_emms, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_enter, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 12, .str2 = 0, .off2_1 = 19, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fchs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fabs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ftst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxam, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fld1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldl2t, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldl2e, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldpi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldlg2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldln2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldz, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_f2xm1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fyl2x, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fptan, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fpatan, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxtract, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fprem1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdecstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fincstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fprem, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fyl2xp1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsqrt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsincos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_frndint, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fscale, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsin, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fst, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fstp, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldenv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldcw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnstenv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnstcw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_faddp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fiadd, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmove, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fmulp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fimul, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fisub, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fsubrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fisubr, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnstsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 1, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fbld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fbstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fchs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fclex, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_finit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fwait, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnclex, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmove, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovnb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovne, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovnbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovnu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcom, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcom, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomp, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcompp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fucomi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fucomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdecstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fidivl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fidiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fidivrl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fidivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fdivrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ffree, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ficom, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fcmovu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ficomp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fild, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fildl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fildll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fincstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fninit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fist, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fistp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fistpll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fisttp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fisttpll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fstpt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fld, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fucom, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_frstor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fucomp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnsave, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fnstsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_hlt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_idiv, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 14, .str1 = 0, .off1_1 = 13, .off1_2 = 2, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_in, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_in, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 11, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_inc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ins, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 11, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_int, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_int3, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_invd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_swapgs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_invlpg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_iret, .rep = 0, .repe = 0, .suffix = 6, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_j, .rep = 0, .repe = 0, .suffix = 4, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_j, .rep = 0, .repe = 0, .suffix = 4, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_set, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 22, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ljmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 30, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 4, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ljmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 22, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lahf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lar, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lea, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_leave, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lfs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lgs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lgdt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lidt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lmsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lock, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lods, .rep = 1, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_loop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_loope, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_loopne, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lsl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ltr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 3, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 35, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 37, .off1_2 = 3, .off1_3 = 0, .fct2 = 3, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 6, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 6, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 7, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 7, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 22, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movs, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movsbl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movswl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movzbl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movzwl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mul, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_neg, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pause, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_popcnt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_not, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_out, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 12, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_out, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 9, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_outs, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 9, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_popf, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pushq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 14, .str1 = 0, .off1_1 = 5, .off1_2 = 2, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 31, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pushf, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rdmsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rdpmc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rdtsc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ret, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ret, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rsm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sahf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_scas, .rep = 0, .repe = 1, .suffix = 0, .modrm = 0, .fct1 = 12, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_set, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
- { .mnemonic = MNE_shld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
- { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_shrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
- { .mnemonic = MNE_shrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
- { .mnemonic = MNE_vmcall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmlaunch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmresume, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmxoff, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmread, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 28, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 14, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmwrite, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sgdt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_monitor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 3, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 1, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 4, .str3 = 1, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mwait, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 3, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 1, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sidt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_smsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_stc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_std, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sti, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_stos, .rep = 1, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_str, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ud2a, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_verr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_verw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_wbinvd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetchw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetchnta, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetcht0, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetcht1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_prefetcht2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_nop, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_wrmsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 15, .off1_2 = 11, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 8, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 4, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 17, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xlat, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 9, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_emms, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pand, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pand, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pandn, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pandn, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaddwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaddwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_por, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_por, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pxor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pxor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpeqps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpltps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpleps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpunordps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpneqps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpnltps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpnleps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpordps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpeqss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpltss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpless, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpunordss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpneqss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpnltss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpnless, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cmpordss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxrstor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_fxsave, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ldmxcsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_stmxcsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movupd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movups, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movupd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movups, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movddup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movsldup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_unpcklpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_unpcklps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_unpckhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_unpckhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movshdup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movlhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movapd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movaps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movapd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movaps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtsi2sd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtsi2ss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpi2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpi2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movntpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movntps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttsd2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttss2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttpd2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttps2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpd2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtsd2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtss2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtps2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ucomisd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ucomiss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_comisd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_comiss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_getsec, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movmskpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movmskps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sqrtpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sqrtsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sqrtss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sqrtps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rsqrtss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rsqrtps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcpss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_rcpps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_orpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_orps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xorpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_xorps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_addps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mulsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mulss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mulpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mulps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtsd2ss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtss2sd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtpd2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtps2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtps2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvttps2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_cvtdq2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_subsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_subss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_subpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_subps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_minsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_minss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_minpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_minps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_divsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_divss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_divpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_divps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maxsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maxss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maxpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maxps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packsswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packsswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packuswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packuswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packssdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_packssdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpcklqdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_punpckhqdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pshufd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pshuflw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pshufhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pshufw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_haddpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_haddps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_hsubpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_hsubps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movnti, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pinsrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pinsrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
- { .mnemonic = MNE_pextrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_pextrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
- { .mnemonic = MNE_shufpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_shufps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
- { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmullw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmullw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movdq2q, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movq2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 20, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovmskb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovmskb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 20, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pavgb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pavgb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pavgw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pavgw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movntdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_movntq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lddqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmuludq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmuludq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maskmovdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_maskmovq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 20, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psubq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_paddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pshufb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pshufb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phaddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaddubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaddubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phsubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psignd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhrsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulhrsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pabsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_palignr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_palignr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
- { .mnemonic = MNE_vmclear, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmxon, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmptrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_vmptrst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psrldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pslldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_lfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_sfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_clflush, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_blendps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_blendpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_blendvps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_blendvpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_dpps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_dppd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_insertps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_movntdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_mpsadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_packusdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pblendvb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pblendw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpeqq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpestri, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpestrm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpistri, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpistrm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pcmpgtq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_phminposuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pinsrb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pinsrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxud, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmaxuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminud, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pminuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxbd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxbq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxwq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovsxdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxbd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxbq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxwq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmovzxdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmuldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_pmulld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_ptest, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
- { .mnemonic = MNE_roundps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_roundpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_roundss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_roundsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
- { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 31, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
-};
-static const uint8_t match_data[] =
-{
- 0x1, 0xfe, 0x14,
- 0x2, 0xfe, 0x80, 0x38, 0x10,
- 0x2, 0xfe, 0x82, 0x38, 0x10,
- 0x2, 0xfe, 0x10, 0, 0,
- 0x2, 0xfe, 0x12, 0, 0,
- 0x1, 0xfe, 0x4,
- 0x2, 0xfe, 0x80, 0x38, 0,
- 0x12, 0x83, 0x38, 0,
- 0x2, 0xfe, 0, 0, 0,
- 0x2, 0xfe, 0x2, 0, 0,
- 0x34, 0x66, 0xf, 0xd0, 0, 0,
- 0x34, 0xf2, 0xf, 0xd0, 0, 0,
- 0x1, 0xfe, 0x24,
- 0x2, 0xfe, 0x80, 0x38, 0x20,
- 0x2, 0xfe, 0x82, 0x38, 0x20,
- 0x2, 0xfe, 0x20, 0, 0,
- 0x2, 0xfe, 0x22, 0, 0,
- 0x34, 0x66, 0xf, 0x54, 0, 0,
- 0x23, 0xf, 0x54, 0, 0,
- 0x34, 0x66, 0xf, 0x55, 0, 0,
- 0x23, 0xf, 0x55, 0, 0,
- 0x12, 0x63, 0, 0,
- 0x23, 0xf, 0xbc, 0, 0,
- 0x23, 0xf, 0xbd, 0, 0,
- 0x12, 0xf, 0xf8, 0xc8,
- 0x23, 0xf, 0xa3, 0, 0,
- 0x23, 0xf, 0xba, 0x38, 0x20,
- 0x23, 0xf, 0xbb, 0, 0,
- 0x23, 0xf, 0xba, 0x38, 0x38,
- 0x23, 0xf, 0xb3, 0, 0,
- 0x23, 0xf, 0xba, 0x38, 0x30,
- 0x23, 0xf, 0xab, 0, 0,
- 0x23, 0xf, 0xba, 0x38, 0x28,
- 0x11, 0xe8,
- 0x12, 0xff, 0x38, 0x10,
- 0x12, 0xff, 0x38, 0x18,
- 0x11, 0x98,
- 0x11, 0x99,
- 0x11, 0xf8,
- 0x11, 0xfc,
- 0x11, 0xfa,
- 0x22, 0xf, 0x5,
- 0x22, 0xf, 0x6,
- 0x22, 0xf, 0x7,
- 0x22, 0xf, 0x34,
- 0x22, 0xf, 0x35,
- 0x11, 0xf5,
- 0x13, 0xf, 0xf0, 0x40, 0, 0,
- 0x1, 0xfe, 0x3c,
- 0x2, 0xfe, 0x80, 0x38, 0x38,
- 0x12, 0x83, 0x38, 0x38,
- 0x2, 0xfe, 0x38, 0, 0,
- 0x2, 0xfe, 0x3a, 0, 0,
- 0x34, 0xf2, 0xf, 0xc2, 0, 0,
- 0x34, 0xf3, 0xf, 0xc2, 0, 0,
- 0x34, 0x66, 0xf, 0xc2, 0, 0,
- 0x23, 0xf, 0xc2, 0, 0,
- 0x1, 0xfe, 0xa6,
- 0x13, 0xf, 0xfe, 0xb0, 0, 0,
- 0x23, 0xf, 0xc7, 0x38, 0x8,
- 0x22, 0xf, 0xa2,
- 0x34, 0xf3, 0xf, 0xe6, 0, 0,
- 0x34, 0xf2, 0xf, 0xe6, 0, 0,
- 0x34, 0x66, 0xf, 0xe6, 0, 0,
- 0x2, 0xfe, 0xfe, 0x38, 0x8,
- 0x2, 0xfe, 0xf6, 0x38, 0x30,
- 0x22, 0xf, 0x77,
- 0x11, 0xc8,
- 0x22, 0xd9, 0xd0,
- 0x22, 0xd9, 0xe0,
- 0x22, 0xd9, 0xe1,
- 0x22, 0xd9, 0xe4,
- 0x22, 0xd9, 0xe5,
- 0x22, 0xd9, 0xe8,
- 0x22, 0xd9, 0xe9,
- 0x22, 0xd9, 0xea,
- 0x22, 0xd9, 0xeb,
- 0x22, 0xd9, 0xec,
- 0x22, 0xd9, 0xed,
- 0x22, 0xd9, 0xee,
- 0x22, 0xd9, 0xf0,
- 0x22, 0xd9, 0xf1,
- 0x22, 0xd9, 0xf2,
- 0x22, 0xd9, 0xf3,
- 0x22, 0xd9, 0xf4,
- 0x22, 0xd9, 0xf5,
- 0x22, 0xd9, 0xf6,
- 0x22, 0xd9, 0xf7,
- 0x22, 0xd9, 0xf8,
- 0x22, 0xd9, 0xf9,
- 0x22, 0xd9, 0xfa,
- 0x22, 0xd9, 0xfb,
- 0x22, 0xd9, 0xfc,
- 0x22, 0xd9, 0xfd,
- 0x22, 0xd9, 0xfe,
- 0x22, 0xd9, 0xff,
- 0x12, 0xd8, 0xf8, 0xc0,
- 0x12, 0xdc, 0xf8, 0xc0,
- 0x2, 0xfb, 0xd8, 0x38, 0,
- 0x12, 0xd8, 0xf8, 0xc8,
- 0x12, 0xdc, 0xf8, 0xc8,
- 0x2, 0xfb, 0xd8, 0x38, 0x8,
- 0x12, 0xd8, 0xf8, 0xe0,
- 0x12, 0xdc, 0xf8, 0xe0,
- 0x2, 0xfb, 0xd8, 0x38, 0x20,
- 0x12, 0xd8, 0xf8, 0xe8,
- 0x12, 0xdc, 0xf8, 0xe8,
- 0x2, 0xfb, 0xd8, 0x38, 0x28,
- 0x12, 0xdd, 0xf8, 0xd0,
- 0x2, 0xfb, 0xd9, 0x38, 0x10,
- 0x12, 0xdd, 0xf8, 0xd8,
- 0x2, 0xfb, 0xd9, 0x38, 0x18,
- 0x12, 0xd9, 0x38, 0x20,
- 0x12, 0xd9, 0x38, 0x28,
- 0x12, 0xd9, 0x38, 0x30,
- 0x12, 0xd9, 0x38, 0x38,
- 0x12, 0xd9, 0xf8, 0xc8,
- 0x12, 0xde, 0xf8, 0xc0,
- 0x12, 0xda, 0xf8, 0xc0,
- 0x2, 0xfb, 0xda, 0x38, 0,
- 0x12, 0xda, 0xf8, 0xc8,
- 0x12, 0xde, 0xf8, 0xc8,
- 0x2, 0xfb, 0xda, 0x38, 0x8,
- 0x12, 0xde, 0xf8, 0xe0,
- 0x2, 0xfb, 0xda, 0x38, 0x20,
- 0x12, 0xde, 0xf8, 0xe8,
- 0x2, 0xfb, 0xda, 0x38, 0x28,
- 0x22, 0xdf, 0xe0,
- 0x12, 0xdf, 0x38, 0x20,
- 0x12, 0xdf, 0xf8, 0xf0,
- 0x12, 0xdf, 0x38, 0x30,
- 0x22, 0xd9, 0xe0,
- 0x33, 0x9b, 0xdb, 0xe2,
- 0x33, 0x9b, 0xdb, 0xe3,
- 0x11, 0x9b,
- 0x22, 0xdb, 0xe2,
- 0x12, 0xda, 0xf8, 0xc0,
- 0x12, 0xda, 0xf8, 0xc8,
- 0x12, 0xda, 0xf8, 0xd0,
- 0x12, 0xda, 0xf8, 0xd8,
- 0x12, 0xdb, 0xf8, 0xc0,
- 0x12, 0xdb, 0xf8, 0xc8,
- 0x12, 0xdb, 0xf8, 0xd0,
- 0x12, 0xdb, 0xf8, 0xd8,
- 0x12, 0xd8, 0xf8, 0xd0,
- 0x2, 0xfb, 0xd8, 0x38, 0x10,
- 0x12, 0xd8, 0xf8, 0xd8,
- 0x2, 0xfb, 0xd8, 0x38, 0x18,
- 0x22, 0xde, 0xd9,
- 0x12, 0xdb, 0xf8, 0xf0,
- 0x12, 0xdf, 0xf8, 0xf0,
- 0x12, 0xdb, 0xf8, 0xe8,
- 0x12, 0xdf, 0xf8, 0xe8,
- 0x22, 0xd9, 0xff,
- 0x22, 0xd9, 0xf6,
- 0x12, 0xd8, 0xf8, 0xf0,
- 0x12, 0xdc, 0xf8, 0xf0,
- 0x2, 0xfb, 0xd8, 0x38, 0x30,
- 0x12, 0xda, 0x38, 0x30,
- 0x12, 0xde, 0xf8, 0xf0,
- 0x12, 0xde, 0x38, 0x30,
- 0x12, 0xde, 0xf8, 0xf8,
- 0x12, 0xd8, 0xf8, 0xf8,
- 0x12, 0xdc, 0xf8, 0xf8,
- 0x2, 0xfb, 0xd8, 0x38, 0x38,
- 0x12, 0xda, 0x38, 0x38,
- 0x12, 0xde, 0x38, 0x38,
- 0x12, 0xde, 0xf8, 0xf0,
- 0x12, 0xdd, 0xf8, 0xc0,
- 0x12, 0xda, 0xf8, 0xd0,
- 0x2, 0xfb, 0xda, 0x38, 0x10,
- 0x12, 0xda, 0xf8, 0xd8,
- 0x2, 0xfb, 0xda, 0x38, 0x18,
- 0x12, 0xdf, 0x38, 0,
- 0x12, 0xdb, 0x38, 0,
- 0x12, 0xdf, 0x38, 0x28,
- 0x22, 0xd9, 0xf7,
- 0x22, 0xdb, 0xe3,
- 0x2, 0xfb, 0xdb, 0x38, 0x10,
- 0x2, 0xfb, 0xdb, 0x38, 0x18,
- 0x12, 0xdf, 0x38, 0x38,
- 0x2, 0xfb, 0xdb, 0x38, 0x8,
- 0x12, 0xdd, 0x38, 0x8,
- 0x12, 0xdb, 0x38, 0x28,
- 0x12, 0xdb, 0x38, 0x38,
- 0x12, 0xd9, 0xf8, 0xc0,
- 0x2, 0xfb, 0xd9, 0x38, 0,
- 0x12, 0xdd, 0xf8, 0xe0,
- 0x12, 0xdd, 0x38, 0x20,
- 0x12, 0xdd, 0xf8, 0xe8,
- 0x12, 0xdd, 0x38, 0x30,
- 0x12, 0xdd, 0x38, 0x38,
- 0x11, 0xf4,
- 0x2, 0xfe, 0xf6, 0x38, 0x38,
- 0x2, 0xfe, 0xf6, 0x38, 0x28,
- 0x23, 0xf, 0xaf, 0, 0,
- 0x2, 0xfd, 0x69, 0, 0,
- 0x1, 0xfe, 0xe4,
- 0x1, 0xfe, 0xec,
- 0x2, 0xfe, 0xfe, 0x38, 0,
- 0x1, 0xfe, 0x6c,
- 0x11, 0xcd,
- 0x11, 0xcc,
- 0x22, 0xf, 0x8,
- 0x33, 0xf, 0x1, 0xf8,
- 0x23, 0xf, 0x1, 0x38, 0x38,
- 0x11, 0xcf,
- 0x1, 0xf0, 0x70,
- 0x12, 0xf, 0xf0, 0x80,
- 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
- 0x11, 0xe3,
- 0x11, 0xeb,
- 0x11, 0xe9,
- 0x12, 0xff, 0x38, 0x20,
- 0x11, 0xea,
- 0x12, 0xff, 0x38, 0x28,
- 0x11, 0x9f,
- 0x23, 0xf, 0x2, 0, 0,
- 0x12, 0x8d, 0, 0,
- 0x11, 0xc9,
- 0x23, 0xf, 0xb4, 0, 0,
- 0x23, 0xf, 0xb5, 0, 0,
- 0x23, 0xf, 0x1, 0x38, 0x10,
- 0x23, 0xf, 0x1, 0x38, 0x18,
- 0x23, 0xf, 0, 0x38, 0x10,
- 0x23, 0xf, 0x1, 0x38, 0x30,
- 0x11, 0xf0,
- 0x1, 0xfe, 0xac,
- 0x11, 0xe2,
- 0x11, 0xe1,
- 0x11, 0xe0,
- 0x23, 0xf, 0x3, 0, 0,
- 0x23, 0xf, 0xb2, 0, 0,
- 0x23, 0xf, 0, 0x38, 0x18,
- 0x2, 0xfe, 0x88, 0, 0,
- 0x2, 0xfe, 0x8a, 0, 0,
- 0x2, 0xfe, 0xc6, 0x38, 0,
- 0x1, 0xf0, 0xb0,
- 0x1, 0xfe, 0xa0,
- 0x1, 0xfe, 0xa2,
- 0x23, 0xf, 0x20, 0xc0, 0xc0,
- 0x23, 0xf, 0x22, 0xc0, 0xc0,
- 0x23, 0xf, 0x21, 0xc0, 0xc0,
- 0x23, 0xf, 0x23, 0xc0, 0xc0,
- 0x12, 0x8c, 0, 0,
- 0x12, 0x8e, 0, 0,
- 0x1, 0xfe, 0xa4,
- 0x23, 0xf, 0xbe, 0, 0,
- 0x23, 0xf, 0xbf, 0, 0,
- 0x23, 0xf, 0xb6, 0, 0,
- 0x23, 0xf, 0xb7, 0, 0,
- 0x2, 0xfe, 0xf6, 0x38, 0x20,
- 0x2, 0xfe, 0xf6, 0x38, 0x18,
- 0x22, 0xf3, 0x90,
- 0x11, 0x90,
- 0x34, 0xf3, 0xf, 0xb8, 0, 0,
- 0x2, 0xfe, 0xf6, 0x38, 0x10,
- 0x2, 0xfe, 0x8, 0, 0,
- 0x2, 0xfe, 0xa, 0, 0,
- 0x2, 0xfe, 0x80, 0x38, 0x8,
- 0x2, 0xfe, 0x82, 0x38, 0x8,
- 0x1, 0xfe, 0xc,
- 0x1, 0xfe, 0xe6,
- 0x1, 0xfe, 0xee,
- 0x1, 0xfe, 0x6e,
- 0x12, 0x8f, 0xf8, 0xc0,
- 0x12, 0x8f, 0x38, 0,
- 0x12, 0xf, 0xc7, 0x81,
- 0x11, 0x9d,
- 0x12, 0xff, 0xf8, 0xf0,
- 0x12, 0xff, 0x38, 0x30,
- 0x1, 0xf8, 0x50,
- 0x1, 0xf8, 0x58,
- 0x1, 0xfd, 0x68,
- 0x1, 0xe7, 0x6,
- 0x12, 0xf, 0xc7, 0x80,
- 0x11, 0x9c,
- 0x2, 0xfe, 0xd0, 0x38, 0x10,
- 0x2, 0xfe, 0xd2, 0x38, 0x10,
- 0x2, 0xfe, 0xc0, 0x38, 0x10,
- 0x2, 0xfe, 0xd0, 0x38, 0x18,
- 0x2, 0xfe, 0xd2, 0x38, 0x18,
- 0x2, 0xfe, 0xc0, 0x38, 0x18,
- 0x22, 0xf, 0x32,
- 0x22, 0xf, 0x33,
- 0x22, 0xf, 0x31,
- 0x11, 0xc3,
- 0x11, 0xc2,
- 0x11, 0xcb,
- 0x11, 0xca,
- 0x2, 0xfe, 0xd0, 0x38, 0,
- 0x2, 0xfe, 0xd2, 0x38, 0,
- 0x2, 0xfe, 0xc0, 0x38, 0,
- 0x2, 0xfe, 0xd0, 0x38, 0x8,
- 0x2, 0xfe, 0xd2, 0x38, 0x8,
- 0x2, 0xfe, 0xc0, 0x38, 0x8,
- 0x22, 0xf, 0xaa,
- 0x11, 0x9e,
- 0x2, 0xfe, 0xd0, 0x38, 0x38,
- 0x2, 0xfe, 0xd2, 0x38, 0x38,
- 0x2, 0xfe, 0xc0, 0x38, 0x38,
- 0x2, 0xfe, 0x18, 0, 0,
- 0x2, 0xfe, 0x1a, 0, 0,
- 0x1, 0xfe, 0x1c,
- 0x2, 0xfe, 0x80, 0x38, 0x18,
- 0x2, 0xfe, 0x82, 0x38, 0x18,
- 0x1, 0xfe, 0xae,
- 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
- 0x2, 0xfe, 0xd0, 0x38, 0x20,
- 0x2, 0xfe, 0xd2, 0x38, 0x20,
- 0x2, 0xfe, 0xc0, 0x38, 0x20,
- 0x2, 0xfe, 0xd0, 0x38, 0x28,
- 0x23, 0xf, 0xa4, 0, 0,
- 0x23, 0xf, 0xa5, 0, 0,
- 0x2, 0xfe, 0xd2, 0x38, 0x28,
- 0x2, 0xfe, 0xc0, 0x38, 0x28,
- 0x23, 0xf, 0xac, 0, 0,
- 0x23, 0xf, 0xad, 0, 0,
- 0x33, 0xf, 0x1, 0xc1,
- 0x33, 0xf, 0x1, 0xc2,
- 0x33, 0xf, 0x1, 0xc3,
- 0x33, 0xf, 0x1, 0xc4,
- 0x23, 0xf, 0x78, 0, 0,
- 0x23, 0xf, 0x79, 0, 0,
- 0x23, 0xf, 0x1, 0x38, 0,
- 0x33, 0xf, 0x1, 0xc8,
- 0x33, 0xf, 0x1, 0xc9,
- 0x23, 0xf, 0x1, 0x38, 0x8,
- 0x23, 0xf, 0, 0x38, 0,
- 0x23, 0xf, 0x1, 0x38, 0x20,
- 0x11, 0xf9,
- 0x11, 0xfd,
- 0x11, 0xfb,
- 0x1, 0xfe, 0xaa,
- 0x23, 0xf, 0, 0x38, 0x8,
- 0x2, 0xfe, 0x28, 0, 0,
- 0x2, 0xfe, 0x2a, 0, 0,
- 0x1, 0xfe, 0x2c,
- 0x2, 0xfe, 0x80, 0x38, 0x28,
- 0x2, 0xfe, 0x82, 0x38, 0x28,
- 0x2, 0xfe, 0x84, 0, 0,
- 0x1, 0xfe, 0xa8,
- 0x2, 0xfe, 0xf6, 0x38, 0,
- 0x22, 0xf, 0xb,
- 0x23, 0xf, 0, 0x38, 0x20,
- 0x23, 0xf, 0, 0x38, 0x28,
- 0x22, 0xf, 0x9,
- 0x23, 0xf, 0xd, 0x38, 0,
- 0x23, 0xf, 0xd, 0x38, 0x8,
- 0x23, 0xf, 0x18, 0x38, 0,
- 0x23, 0xf, 0x18, 0x38, 0x8,
- 0x23, 0xf, 0x18, 0x38, 0x10,
- 0x23, 0xf, 0x18, 0x38, 0x18,
- 0x23, 0xf, 0x1f, 0, 0,
- 0x22, 0xf, 0x30,
- 0x13, 0xf, 0xfe, 0xc0, 0, 0,
- 0x2, 0xfe, 0x86, 0, 0,
- 0x1, 0xf8, 0x90,
- 0x11, 0xd7,
- 0x2, 0xfe, 0x30, 0, 0,
- 0x2, 0xfe, 0x32, 0, 0,
- 0x1, 0xfe, 0x34,
- 0x2, 0xfe, 0x80, 0x38, 0x30,
- 0x2, 0xfe, 0x82, 0x38, 0x30,
- 0x22, 0xf, 0x77,
- 0x34, 0x66, 0xf, 0xdb, 0, 0,
- 0x23, 0xf, 0xdb, 0, 0,
- 0x34, 0x66, 0xf, 0xdf, 0, 0,
- 0x23, 0xf, 0xdf, 0, 0,
- 0x34, 0x66, 0xf, 0xf5, 0, 0,
- 0x23, 0xf, 0xf5, 0, 0,
- 0x34, 0x66, 0xf, 0xeb, 0, 0,
- 0x23, 0xf, 0xeb, 0, 0,
- 0x34, 0x66, 0xf, 0xef, 0, 0,
- 0x23, 0xf, 0xef, 0, 0,
- 0x23, 0xf, 0x55, 0, 0,
- 0x23, 0xf, 0x54, 0, 0,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x1,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x2,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x3,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x4,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x5,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x6,
- 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x7,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x1,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x2,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x3,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x4,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x5,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x6,
- 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x7,
- 0x23, 0xf, 0xae, 0x38, 0x8,
- 0x23, 0xf, 0xae, 0x38, 0,
- 0x23, 0xf, 0xae, 0x38, 0x10,
- 0x23, 0xf, 0xae, 0x38, 0x18,
- 0x34, 0xf2, 0xf, 0x10, 0, 0,
- 0x34, 0xf3, 0xf, 0x10, 0, 0,
- 0x34, 0x66, 0xf, 0x10, 0, 0,
- 0x23, 0xf, 0x10, 0, 0,
- 0x34, 0xf2, 0xf, 0x11, 0, 0,
- 0x34, 0xf3, 0xf, 0x11, 0, 0,
- 0x34, 0x66, 0xf, 0x11, 0, 0,
- 0x23, 0xf, 0x11, 0, 0,
- 0x34, 0xf2, 0xf, 0x12, 0, 0,
- 0x34, 0xf3, 0xf, 0x12, 0, 0,
- 0x34, 0x66, 0xf, 0x12, 0, 0,
- 0x23, 0xf, 0x12, 0xc0, 0xc0,
- 0x23, 0xf, 0x12, 0, 0,
- 0x34, 0x66, 0xf, 0x13, 0xc0, 0xc0,
- 0x23, 0xf, 0x13, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0x13, 0, 0,
- 0x23, 0xf, 0x13, 0, 0,
- 0x34, 0x66, 0xf, 0x14, 0, 0,
- 0x23, 0xf, 0x14, 0, 0,
- 0x34, 0x66, 0xf, 0x15, 0, 0,
- 0x23, 0xf, 0x15, 0, 0,
- 0x34, 0xf3, 0xf, 0x16, 0, 0,
- 0x34, 0x66, 0xf, 0x16, 0, 0,
- 0x23, 0xf, 0x16, 0xc0, 0xc0,
- 0x23, 0xf, 0x16, 0, 0,
- 0x34, 0x66, 0xf, 0x17, 0xc0, 0xc0,
- 0x23, 0xf, 0x17, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0x17, 0, 0,
- 0x23, 0xf, 0x17, 0, 0,
- 0x34, 0x66, 0xf, 0x28, 0, 0,
- 0x23, 0xf, 0x28, 0, 0,
- 0x34, 0x66, 0xf, 0x29, 0, 0,
- 0x23, 0xf, 0x29, 0, 0,
- 0x34, 0xf2, 0xf, 0x2a, 0, 0,
- 0x34, 0xf3, 0xf, 0x2a, 0, 0,
- 0x34, 0x66, 0xf, 0x2a, 0, 0,
- 0x23, 0xf, 0x2a, 0, 0,
- 0x34, 0x66, 0xf, 0x2b, 0, 0,
- 0x23, 0xf, 0x2b, 0, 0,
- 0x34, 0xf2, 0xf, 0x2c, 0, 0,
- 0x34, 0xf3, 0xf, 0x2c, 0, 0,
- 0x34, 0x66, 0xf, 0x2c, 0, 0,
- 0x23, 0xf, 0x2c, 0, 0,
- 0x34, 0x66, 0xf, 0x2d, 0, 0,
- 0x34, 0xf2, 0xf, 0x2d, 0, 0,
- 0x34, 0xf3, 0xf, 0x2d, 0, 0,
- 0x23, 0xf, 0x2d, 0, 0,
- 0x34, 0x66, 0xf, 0x2e, 0, 0,
- 0x23, 0xf, 0x2e, 0, 0,
- 0x34, 0x66, 0xf, 0x2f, 0, 0,
- 0x23, 0xf, 0x2f, 0, 0,
- 0x22, 0xf, 0x37,
- 0x34, 0x66, 0xf, 0x50, 0xc0, 0xc0,
- 0x23, 0xf, 0x50, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0x51, 0, 0,
- 0x34, 0xf2, 0xf, 0x51, 0, 0,
- 0x34, 0xf3, 0xf, 0x51, 0, 0,
- 0x23, 0xf, 0x51, 0, 0,
- 0x34, 0xf3, 0xf, 0x52, 0, 0,
- 0x23, 0xf, 0x52, 0, 0,
- 0x34, 0xf3, 0xf, 0x53, 0, 0,
- 0x23, 0xf, 0x53, 0, 0,
- 0x34, 0x66, 0xf, 0x54, 0, 0,
- 0x23, 0xf, 0x54, 0, 0,
- 0x34, 0x66, 0xf, 0x55, 0, 0,
- 0x23, 0xf, 0x55, 0, 0,
- 0x34, 0x66, 0xf, 0x56, 0, 0,
- 0x23, 0xf, 0x56, 0, 0,
- 0x34, 0x66, 0xf, 0x57, 0, 0,
- 0x23, 0xf, 0x57, 0, 0,
- 0x34, 0xf2, 0xf, 0x58, 0, 0,
- 0x34, 0xf3, 0xf, 0x58, 0, 0,
- 0x34, 0x66, 0xf, 0x58, 0, 0,
- 0x23, 0xf, 0x58, 0, 0,
- 0x34, 0xf2, 0xf, 0x59, 0, 0,
- 0x34, 0xf3, 0xf, 0x59, 0, 0,
- 0x34, 0x66, 0xf, 0x59, 0, 0,
- 0x23, 0xf, 0x59, 0, 0,
- 0x34, 0xf2, 0xf, 0x5a, 0, 0,
- 0x34, 0xf3, 0xf, 0x5a, 0, 0,
- 0x34, 0x66, 0xf, 0x5a, 0, 0,
- 0x23, 0xf, 0x5a, 0, 0,
- 0x34, 0x66, 0xf, 0x5b, 0, 0,
- 0x34, 0xf3, 0xf, 0x5b, 0, 0,
- 0x23, 0xf, 0x5b, 0, 0,
- 0x34, 0xf2, 0xf, 0x5c, 0, 0,
- 0x34, 0xf3, 0xf, 0x5c, 0, 0,
- 0x34, 0x66, 0xf, 0x5c, 0, 0,
- 0x23, 0xf, 0x5c, 0, 0,
- 0x34, 0xf2, 0xf, 0x5d, 0, 0,
- 0x34, 0xf3, 0xf, 0x5d, 0, 0,
- 0x34, 0x66, 0xf, 0x5d, 0, 0,
- 0x23, 0xf, 0x5d, 0, 0,
- 0x34, 0xf2, 0xf, 0x5e, 0, 0,
- 0x34, 0xf3, 0xf, 0x5e, 0, 0,
- 0x34, 0x66, 0xf, 0x5e, 0, 0,
- 0x23, 0xf, 0x5e, 0, 0,
- 0x34, 0xf2, 0xf, 0x5f, 0, 0,
- 0x34, 0xf3, 0xf, 0x5f, 0, 0,
- 0x34, 0x66, 0xf, 0x5f, 0, 0,
- 0x23, 0xf, 0x5f, 0, 0,
- 0x34, 0x66, 0xf, 0x60, 0, 0,
- 0x23, 0xf, 0x60, 0, 0,
- 0x34, 0x66, 0xf, 0x61, 0, 0,
- 0x23, 0xf, 0x61, 0, 0,
- 0x34, 0x66, 0xf, 0x62, 0, 0,
- 0x23, 0xf, 0x62, 0, 0,
- 0x34, 0x66, 0xf, 0x63, 0, 0,
- 0x23, 0xf, 0x63, 0, 0,
- 0x34, 0x66, 0xf, 0x64, 0, 0,
- 0x23, 0xf, 0x64, 0, 0,
- 0x34, 0x66, 0xf, 0x65, 0, 0,
- 0x23, 0xf, 0x65, 0, 0,
- 0x34, 0x66, 0xf, 0x66, 0, 0,
- 0x23, 0xf, 0x66, 0, 0,
- 0x34, 0x66, 0xf, 0x67, 0, 0,
- 0x23, 0xf, 0x67, 0, 0,
- 0x34, 0x66, 0xf, 0x68, 0, 0,
- 0x23, 0xf, 0x68, 0, 0,
- 0x34, 0x66, 0xf, 0x69, 0, 0,
- 0x23, 0xf, 0x69, 0, 0,
- 0x34, 0x66, 0xf, 0x6a, 0, 0,
- 0x23, 0xf, 0x6a, 0, 0,
- 0x34, 0x66, 0xf, 0x6b, 0, 0,
- 0x23, 0xf, 0x6b, 0, 0,
- 0x34, 0x66, 0xf, 0x6c, 0, 0,
- 0x34, 0x66, 0xf, 0x6d, 0, 0,
- 0x34, 0x66, 0xf, 0x6e, 0, 0,
- 0x23, 0xf, 0x6e, 0, 0,
- 0x34, 0x66, 0xf, 0x6f, 0, 0,
- 0x34, 0xf3, 0xf, 0x6f, 0, 0,
- 0x23, 0xf, 0x6f, 0, 0,
- 0x34, 0x66, 0xf, 0x70, 0, 0,
- 0x34, 0xf2, 0xf, 0x70, 0, 0,
- 0x34, 0xf3, 0xf, 0x70, 0, 0,
- 0x23, 0xf, 0x70, 0, 0,
- 0x34, 0x66, 0xf, 0x74, 0, 0,
- 0x23, 0xf, 0x74, 0, 0,
- 0x34, 0x66, 0xf, 0x75, 0, 0,
- 0x23, 0xf, 0x75, 0, 0,
- 0x34, 0x66, 0xf, 0x76, 0, 0,
- 0x23, 0xf, 0x76, 0, 0,
- 0x34, 0x66, 0xf, 0x7c, 0, 0,
- 0x34, 0xf2, 0xf, 0x7c, 0, 0,
- 0x34, 0x66, 0xf, 0x7d, 0, 0,
- 0x34, 0xf2, 0xf, 0x7d, 0, 0,
- 0x34, 0x66, 0xf, 0x7e, 0, 0,
- 0x34, 0xf3, 0xf, 0x7e, 0, 0,
- 0x23, 0xf, 0x7e, 0, 0,
- 0x34, 0x66, 0xf, 0x7f, 0, 0,
- 0x34, 0xf3, 0xf, 0x7f, 0, 0,
- 0x23, 0xf, 0x7f, 0, 0,
- 0x23, 0xf, 0xc3, 0, 0,
- 0x34, 0x66, 0xf, 0xc4, 0, 0,
- 0x23, 0xf, 0xc4, 0, 0,
- 0x34, 0x66, 0xf, 0xc5, 0xc0, 0xc0,
- 0x23, 0xf, 0xc5, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0xc6, 0, 0,
- 0x23, 0xf, 0xc6, 0, 0,
- 0x34, 0x66, 0xf, 0xd1, 0, 0,
- 0x23, 0xf, 0xd1, 0, 0,
- 0x34, 0x66, 0xf, 0xd2, 0, 0,
- 0x23, 0xf, 0xd2, 0, 0,
- 0x34, 0x66, 0xf, 0xd3, 0, 0,
- 0x23, 0xf, 0xd3, 0, 0,
- 0x34, 0x66, 0xf, 0xd4, 0, 0,
- 0x23, 0xf, 0xd4, 0, 0,
- 0x34, 0x66, 0xf, 0xd5, 0, 0,
- 0x23, 0xf, 0xd5, 0, 0,
- 0x34, 0x66, 0xf, 0xd6, 0, 0,
- 0x34, 0xf2, 0xf, 0xd6, 0xc0, 0xc0,
- 0x34, 0xf3, 0xf, 0xd6, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0xd7, 0xc0, 0xc0,
- 0x23, 0xf, 0xd7, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0xd8, 0, 0,
- 0x23, 0xf, 0xd8, 0, 0,
- 0x34, 0x66, 0xf, 0xd9, 0, 0,
- 0x23, 0xf, 0xd9, 0, 0,
- 0x34, 0x66, 0xf, 0xda, 0, 0,
- 0x23, 0xf, 0xda, 0, 0,
- 0x34, 0x66, 0xf, 0xdc, 0, 0,
- 0x23, 0xf, 0xdc, 0, 0,
- 0x34, 0x66, 0xf, 0xdd, 0, 0,
- 0x23, 0xf, 0xdd, 0, 0,
- 0x34, 0x66, 0xf, 0xde, 0, 0,
- 0x23, 0xf, 0xde, 0, 0,
- 0x34, 0x66, 0xf, 0xe0, 0, 0,
- 0x23, 0xf, 0xe0, 0, 0,
- 0x34, 0x66, 0xf, 0xe1, 0, 0,
- 0x23, 0xf, 0xe1, 0, 0,
- 0x34, 0x66, 0xf, 0xe2, 0, 0,
- 0x23, 0xf, 0xe2, 0, 0,
- 0x34, 0x66, 0xf, 0xe3, 0, 0,
- 0x23, 0xf, 0xe3, 0, 0,
- 0x34, 0x66, 0xf, 0xe4, 0, 0,
- 0x23, 0xf, 0xe4, 0, 0,
- 0x34, 0x66, 0xf, 0xe5, 0, 0,
- 0x23, 0xf, 0xe5, 0, 0,
- 0x34, 0x66, 0xf, 0xe7, 0, 0,
- 0x23, 0xf, 0xe7, 0, 0,
- 0x34, 0x66, 0xf, 0xe8, 0, 0,
- 0x23, 0xf, 0xe8, 0, 0,
- 0x34, 0x66, 0xf, 0xe9, 0, 0,
- 0x23, 0xf, 0xe9, 0, 0,
- 0x34, 0x66, 0xf, 0xea, 0, 0,
- 0x23, 0xf, 0xea, 0, 0,
- 0x34, 0x66, 0xf, 0xec, 0, 0,
- 0x23, 0xf, 0xec, 0, 0,
- 0x34, 0x66, 0xf, 0xed, 0, 0,
- 0x23, 0xf, 0xed, 0, 0,
- 0x34, 0x66, 0xf, 0xee, 0, 0,
- 0x23, 0xf, 0xee, 0, 0,
- 0x34, 0xf2, 0xf, 0xf0, 0, 0,
- 0x34, 0x66, 0xf, 0xf1, 0, 0,
- 0x23, 0xf, 0xf1, 0, 0,
- 0x34, 0x66, 0xf, 0xf2, 0, 0,
- 0x23, 0xf, 0xf2, 0, 0,
- 0x34, 0x66, 0xf, 0xf3, 0, 0,
- 0x23, 0xf, 0xf3, 0, 0,
- 0x34, 0x66, 0xf, 0xf4, 0, 0,
- 0x23, 0xf, 0xf4, 0, 0,
- 0x34, 0x66, 0xf, 0xf6, 0, 0,
- 0x23, 0xf, 0xf6, 0, 0,
- 0x34, 0x66, 0xf, 0xf7, 0xc0, 0xc0,
- 0x23, 0xf, 0xf7, 0xc0, 0xc0,
- 0x34, 0x66, 0xf, 0xf8, 0, 0,
- 0x23, 0xf, 0xf8, 0, 0,
- 0x34, 0x66, 0xf, 0xf9, 0, 0,
- 0x23, 0xf, 0xf9, 0, 0,
- 0x34, 0x66, 0xf, 0xfa, 0, 0,
- 0x23, 0xf, 0xfa, 0, 0,
- 0x34, 0x66, 0xf, 0xfb, 0, 0,
- 0x23, 0xf, 0xfb, 0, 0,
- 0x34, 0x66, 0xf, 0xfc, 0, 0,
- 0x23, 0xf, 0xfc, 0, 0,
- 0x34, 0x66, 0xf, 0xfd, 0, 0,
- 0x23, 0xf, 0xfd, 0, 0,
- 0x34, 0x66, 0xf, 0xfe, 0, 0,
- 0x23, 0xf, 0xfe, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0, 0, 0,
- 0x34, 0xf, 0x38, 0, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x1, 0, 0,
- 0x34, 0xf, 0x38, 0x1, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x2, 0, 0,
- 0x34, 0xf, 0x38, 0x2, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3, 0, 0,
- 0x34, 0xf, 0x38, 0x3, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x4, 0, 0,
- 0x34, 0xf, 0x38, 0x4, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x5, 0, 0,
- 0x34, 0xf, 0x38, 0x5, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x6, 0, 0,
- 0x34, 0xf, 0x38, 0x6, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x7, 0, 0,
- 0x34, 0xf, 0x38, 0x7, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x8, 0, 0,
- 0x34, 0xf, 0x38, 0x8, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x9, 0, 0,
- 0x34, 0xf, 0x38, 0x9, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0xa, 0, 0,
- 0x34, 0xf, 0x38, 0xa, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0xb, 0, 0,
- 0x34, 0xf, 0x38, 0xb, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x1c, 0, 0,
- 0x34, 0xf, 0x38, 0x1c, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x1d, 0, 0,
- 0x34, 0xf, 0x38, 0x1d, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x1e, 0, 0,
- 0x34, 0xf, 0x38, 0x1e, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xf, 0, 0,
- 0x34, 0xf, 0x3a, 0xf, 0, 0,
- 0x34, 0x66, 0xf, 0xc7, 0x38, 0x30,
- 0x34, 0xf3, 0xf, 0xc7, 0x38, 0x30,
- 0x23, 0xf, 0xc7, 0x38, 0x30,
- 0x23, 0xf, 0xc7, 0x38, 0x38,
- 0x34, 0x66, 0xf, 0x71, 0xf8, 0xd0,
- 0x23, 0xf, 0x71, 0xf8, 0xd0,
- 0x34, 0x66, 0xf, 0x71, 0xf8, 0xe0,
- 0x23, 0xf, 0x71, 0xf8, 0xe0,
- 0x34, 0x66, 0xf, 0x71, 0xf8, 0xf0,
- 0x23, 0xf, 0x71, 0xf8, 0xf0,
- 0x34, 0x66, 0xf, 0x72, 0xf8, 0xd0,
- 0x23, 0xf, 0x72, 0xf8, 0xd0,
- 0x34, 0x66, 0xf, 0x72, 0xf8, 0xe0,
- 0x23, 0xf, 0x72, 0xf8, 0xe0,
- 0x34, 0x66, 0xf, 0x72, 0xf8, 0xf0,
- 0x23, 0xf, 0x72, 0xf8, 0xf0,
- 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd0,
- 0x23, 0xf, 0x73, 0xf8, 0xd0,
- 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd8,
- 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf0,
- 0x23, 0xf, 0x73, 0xf8, 0xf0,
- 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf8,
- 0x33, 0xf, 0xae, 0xe8,
- 0x33, 0xf, 0xae, 0xf0,
- 0x33, 0xf, 0xae, 0xf8,
- 0x23, 0xf, 0xae, 0x38, 0x38,
- 0x23, 0xf, 0xf, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xc, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xd, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x14, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x15, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x40, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x41, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x21, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x2a, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x42, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x2b, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x10, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xe, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x29, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x61, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x60, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x63, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x62, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x37, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x41, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x20, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x22, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3c, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3d, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3f, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3e, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x38, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x39, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3b, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x3a, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x20, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x21, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x22, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x23, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x24, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x25, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x30, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x31, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x32, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x33, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x34, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x35, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x28, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x40, 0, 0,
- 0x45, 0x66, 0xf, 0x38, 0x17, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x8, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0x9, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xa, 0, 0,
- 0x45, 0x66, 0xf, 0x3a, 0xb, 0, 0,
- 0x1, 0xe7, 0x7,
-};
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
deleted file mode 100644
index 38b31f6a8d..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+++ /dev/null
@@ -1,1163 +0,0 @@
-From 4b0fe80b3951f044c1c1b14d1d7f5f0b8ab67507 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 06:35:34 +0000
-Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
- compiling it on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile.am | 2 +-
- lib/color.c | 2 +-
- lib/crc32_file.c | 4 +++-
- lib/fixedsizehash.h | 4 ++--
- lib/system.h | 11 +++++++++++
- lib/xmalloc.c | 2 +-
- libasm/asm_end.c | 2 +-
- libasm/asm_newscn.c | 2 +-
- libcpu/i386_gendis.c | 2 +-
- libcpu/i386_lex.c | 2 +-
- libcpu/i386_parse.c | 2 +-
- libdw/Makefile.am | 2 +-
- libdw/libdw_alloc.c | 3 ++-
- libdwfl/Makefile.am | 2 ++
- libdwfl/dwfl_build_id_find_elf.c | 3 ++-
- libdwfl/dwfl_error.c | 4 +++-
- libdwfl/dwfl_module_getdwarf.c | 1 +
- libdwfl/find-debuginfo.c | 2 +-
- libdwfl/libdwfl_crc32_file.c | 10 ++++++++++
- libdwfl/linux-kernel-modules.c | 1 +
- libebl/eblopenbackend.c | 2 +-
- libebl/eblwstrtab.c | 2 +-
- libelf/elf.h | 9 ++++++---
- libelf/libelf.h | 1 +
- libelf/libelfP.h | 1 +
- src/addr2line.c | 2 +-
- src/ar.c | 2 +-
- src/arlib.c | 2 +-
- src/arlib2.c | 2 +-
- src/elfcmp.c | 2 +-
- src/elflint.c | 2 +-
- src/findtextrel.c | 2 +-
- src/i386_ld.c | 2 +-
- src/ld.c | 2 +-
- src/ldgeneric.c | 2 +-
- src/ldlex.c | 2 +-
- src/ldscript.c | 2 +-
- src/nm.c | 2 +-
- src/objdump.c | 2 +-
- src/ranlib.c | 2 +-
- src/readelf.c | 2 +-
- src/size.c | 2 +-
- src/stack.c | 2 +-
- src/strings.c | 2 +-
- src/strip.c | 2 +-
- src/unstrip.c | 2 +-
- tests/addrscopes.c | 2 +-
- tests/allregs.c | 2 +-
- tests/backtrace-data.c | 2 +-
- tests/backtrace-dwarf.c | 2 +-
- tests/backtrace.c | 2 +-
- tests/buildid.c | 2 +-
- tests/debugaltlink.c | 2 +-
- tests/debuglink.c | 2 +-
- tests/deleted.c | 2 +-
- tests/dwfl-addr-sect.c | 2 +-
- tests/dwfl-bug-addr-overflow.c | 2 +-
- tests/dwfl-bug-fd-leak.c | 2 +-
- tests/dwfl-bug-getmodules.c | 2 +-
- tests/dwfl-report-elf-align.c | 2 +-
- tests/dwfllines.c | 2 +-
- tests/dwflmodtest.c | 2 +-
- tests/dwflsyms.c | 2 +-
- tests/early-offscn.c | 2 +-
- tests/ecp.c | 2 +-
- tests/find-prologues.c | 2 +-
- tests/funcretval.c | 2 +-
- tests/funcscopes.c | 2 +-
- tests/getsrc_die.c | 2 +-
- tests/line2addr.c | 2 +-
- tests/low_high_pc.c | 2 +-
- tests/md5-sha1-test.c | 2 +-
- tests/rdwrmmap.c | 2 +-
- tests/saridx.c | 2 +-
- tests/sectiondump.c | 2 +-
- tests/varlocs.c | 2 +-
- tests/vdsosyms.c | 2 +-
- 77 files changed, 109 insertions(+), 73 deletions(-)
-
-Index: elfutils-0.166/Makefile.am
-===================================================================
---- elfutils-0.166.orig/Makefile.am
-+++ elfutils-0.166/Makefile.am
-@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h
-
- # Add doc back when we have some real content.
- SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
-- backends src po tests
-+ backends po tests
-
- EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
- COPYING COPYING-GPLV2 COPYING-LGPLV3
-Index: elfutils-0.166/lib/color.c
-===================================================================
---- elfutils-0.166.orig/lib/color.c
-+++ elfutils-0.166/lib/color.c
-@@ -32,7 +32,7 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include <string.h>
-Index: elfutils-0.166/lib/crc32_file.c
-===================================================================
---- elfutils-0.166.orig/lib/crc32_file.c
-+++ elfutils-0.166/lib/crc32_file.c
-@@ -30,12 +30,14 @@
- # include <config.h>
- #endif
-
--#include "system.h"
- #include <errno.h>
- #include <unistd.h>
-+#include <stdint.h>
- #include <sys/stat.h>
- #include <sys/mman.h>
-
-+#include "system.h"
-+
- int
- crc32_file (int fd, uint32_t *resp)
- {
-Index: elfutils-0.166/lib/fixedsizehash.h
-===================================================================
---- elfutils-0.166.orig/lib/fixedsizehash.h
-+++ elfutils-0.166/lib/fixedsizehash.h
-@@ -30,12 +30,12 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/cdefs.h>
- #include <sys/param.h>
-
- #include <system.h>
-
--#define CONCAT(t1,t2) __CONCAT (t1,t2)
-+#define CONCAT1(x,y) x##y
-+#define CONCAT(x,y) CONCAT1(x,y)
-
- /* Before including this file the following macros must be defined:
-
-Index: elfutils-0.166/lib/system.h
-===================================================================
---- elfutils-0.166.orig/lib/system.h
-+++ elfutils-0.166/lib/system.h
-@@ -49,6 +49,16 @@
- #else
- # error "Unknown byte order"
- #endif
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
-+ __result; }))
-+#endif
-+
-+#define error(status, errno, ...) err(status, __VA_ARGS__)
-
- extern void *xmalloc (size_t) __attribute__ ((__malloc__));
- extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
-Index: elfutils-0.166/lib/xmalloc.c
-===================================================================
---- elfutils-0.166.orig/lib/xmalloc.c
-+++ elfutils-0.166/lib/xmalloc.c
-@@ -30,7 +30,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stddef.h>
- #include <stdlib.h>
-Index: elfutils-0.166/libasm/asm_end.c
-===================================================================
---- elfutils-0.166.orig/libasm/asm_end.c
-+++ elfutils-0.166/libasm/asm_end.c
-@@ -32,7 +32,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdio.h>
- #include <stdlib.h>
-Index: elfutils-0.166/libasm/asm_newscn.c
-===================================================================
---- elfutils-0.166.orig/libasm/asm_newscn.c
-+++ elfutils-0.166/libasm/asm_newscn.c
-@@ -32,7 +32,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include <string.h>
-Index: elfutils-0.166/libcpu/i386_gendis.c
-===================================================================
---- elfutils-0.166.orig/libcpu/i386_gendis.c
-+++ elfutils-0.166/libcpu/i386_gendis.c
-@@ -31,7 +31,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
-Index: elfutils-0.166/libcpu/i386_lex.c
-===================================================================
---- elfutils-0.166.orig/libcpu/i386_lex.c
-+++ elfutils-0.166/libcpu/i386_lex.c
-@@ -578,7 +578,7 @@ char *i386_text;
- #endif
-
- #include <ctype.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
-
- #include <system.h>
-Index: elfutils-0.166/libcpu/i386_parse.c
-===================================================================
---- elfutils-0.166.orig/libcpu/i386_parse.c
-+++ elfutils-0.166/libcpu/i386_parse.c
-@@ -107,7 +107,7 @@
- #include <assert.h>
- #include <ctype.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <inttypes.h>
- #include <libintl.h>
- #include <math.h>
-Index: elfutils-0.166/libdw/Makefile.am
-===================================================================
---- elfutils-0.166.orig/libdw/Makefile.am
-+++ elfutils-0.166/libdw/Makefile.am
-@@ -117,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
- -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
- -Wl,--version-script,$<,--no-undefined \
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
-- -ldl -lz $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
-+ -ldl -lz $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -lfts -largp
- @$(textrel_check)
- $(AM_V_at)ln -fs $@ $@.$(VERSION)
-
-Index: elfutils-0.166/libdw/libdw_alloc.c
-===================================================================
---- elfutils-0.166.orig/libdw/libdw_alloc.c
-+++ elfutils-0.166/libdw/libdw_alloc.c
-@@ -31,11 +31,12 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #include <stdlib.h>
- #include <sys/param.h>
- #include "libdwP.h"
-+#include "system.h"
-
-
- void *
-Index: elfutils-0.166/libdwfl/Makefile.am
-===================================================================
---- elfutils-0.166.orig/libdwfl/Makefile.am
-+++ elfutils-0.166/libdwfl/Makefile.am
-@@ -84,6 +84,8 @@ libelf = ../libelf/libelf.so
- libebl = ../libebl/libebl.a
- libeu = ../lib/libeu.a
-
-+LDADD = -lfts
-+
- libdwfl_pic_a_SOURCES =
- am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os)
-
-Index: elfutils-0.166/libdwfl/dwfl_build_id_find_elf.c
-===================================================================
---- elfutils-0.166.orig/libdwfl/dwfl_build_id_find_elf.c
-+++ elfutils-0.166/libdwfl/dwfl_build_id_find_elf.c
-@@ -27,6 +27,7 @@
- not, see <http://www.gnu.org/licenses/>. */
-
- #include "libdwflP.h"
-+#include "system.h"
- #include <inttypes.h>
- #include <fcntl.h>
- #include <unistd.h>
-@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module
- {
- if (*file_name != NULL)
- free (*file_name);
-- *file_name = canonicalize_file_name (name);
-+ *file_name = realpath (name, NULL);
- if (*file_name == NULL)
- {
- *file_name = name;
-Index: elfutils-0.166/libdwfl/dwfl_error.c
-===================================================================
---- elfutils-0.166.orig/libdwfl/dwfl_error.c
-+++ elfutils-0.166/libdwfl/dwfl_error.c
-@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
- const char *
- dwfl_errmsg (int error)
- {
-+ static __thread char s[64] = "";
- if (error == 0 || error == -1)
- {
- int last_error = global_error;
-@@ -154,7 +155,8 @@ dwfl_errmsg (int error)
- switch (error &~ 0xffff)
- {
- case OTHER_ERROR (ERRNO):
-- return strerror_r (error & 0xffff, "bad", 0);
-+ strerror_r (error & 0xffff, s, sizeof(s));
-+ return s;
- case OTHER_ERROR (LIBELF):
- return elf_errmsg (error & 0xffff);
- case OTHER_ERROR (LIBDW):
-Index: elfutils-0.166/libdwfl/dwfl_module_getdwarf.c
-===================================================================
---- elfutils-0.166.orig/libdwfl/dwfl_module_getdwarf.c
-+++ elfutils-0.166/libdwfl/dwfl_module_getdwarf.c
-@@ -31,6 +31,7 @@
- #include <fcntl.h>
- #include <string.h>
- #include <unistd.h>
-+#include "system.h"
- #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
- #include "../libelf/libelfP.h"
-
-Index: elfutils-0.166/libdwfl/find-debuginfo.c
-===================================================================
---- elfutils-0.166.orig/libdwfl/find-debuginfo.c
-+++ elfutils-0.166/libdwfl/find-debuginfo.c
-@@ -385,7 +385,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul
- /* If FILE_NAME is a symlink, the debug file might be associated
- with the symlink target name instead. */
-
-- char *canon = canonicalize_file_name (file_name);
-+ char *canon = realpath (file_name, NULL);
- if (canon != NULL && strcmp (file_name, canon))
- fd = find_debuginfo_in_path (mod, canon,
- debuglink_file, debuglink_crc,
-Index: elfutils-0.166/libdwfl/libdwfl_crc32_file.c
-===================================================================
---- elfutils-0.166.orig/libdwfl/libdwfl_crc32_file.c
-+++ elfutils-0.166/libdwfl/libdwfl_crc32_file.c
-@@ -31,6 +31,16 @@
-
- #define crc32_file attribute_hidden __libdwfl_crc32_file
- #define crc32 __libdwfl_crc32
-+
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
-+ __result; }))
-+#endif
-+
- #define LIB_SYSTEM_H 1
- #include <libdwflP.h>
- #include "../lib/crc32_file.c"
-Index: elfutils-0.166/libdwfl/linux-kernel-modules.c
-===================================================================
---- elfutils-0.166.orig/libdwfl/linux-kernel-modules.c
-+++ elfutils-0.166/libdwfl/linux-kernel-modules.c
-@@ -34,6 +34,7 @@
- #include <config.h>
-
- #include "libdwflP.h"
-+#include "system.h"
- #include <inttypes.h>
- #include <errno.h>
- #include <stdio.h>
-Index: elfutils-0.166/libebl/eblopenbackend.c
-===================================================================
---- elfutils-0.166.orig/libebl/eblopenbackend.c
-+++ elfutils-0.166/libebl/eblopenbackend.c
-@@ -32,7 +32,7 @@
-
- #include <assert.h>
- #include <dlfcn.h>
--#include <error.h>
-+#include <err.h>
- #include <libelfP.h>
- #include <dwarf.h>
- #include <stdlib.h>
-Index: elfutils-0.166/libebl/eblwstrtab.c
-===================================================================
---- elfutils-0.166.orig/libebl/eblwstrtab.c
-+++ elfutils-0.166/libebl/eblwstrtab.c
-@@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep,
-
- /* Process the current node. */
- nodep->offset = *offsetp;
-- *freep = wmempcpy (*freep, nodep->string, nodep->len);
-+ *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len;
- *offsetp += nodep->len * sizeof (wchar_t);
-
- for (subs = nodep->next; subs != NULL; subs = subs->next)
-Index: elfutils-0.166/libelf/elf.h
-===================================================================
---- elfutils-0.166.orig/libelf/elf.h
-+++ elfutils-0.166/libelf/elf.h
-@@ -21,7 +21,9 @@
-
- #include <features.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Standard ELF types. */
-
-@@ -3591,7 +3593,8 @@ enum
-
- #define R_TILEGX_NUM 130
-
--
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-
- #endif /* elf.h */
-Index: elfutils-0.166/libelf/libelf.h
-===================================================================
---- elfutils-0.166.orig/libelf/libelf.h
-+++ elfutils-0.166/libelf/libelf.h
-@@ -29,6 +29,7 @@
- #ifndef _LIBELF_H
- #define _LIBELF_H 1
-
-+#include <fcntl.h>
- #include <stdint.h>
- #include <sys/types.h>
-
-Index: elfutils-0.166/libelf/libelfP.h
-===================================================================
---- elfutils-0.166.orig/libelf/libelfP.h
-+++ elfutils-0.166/libelf/libelfP.h
-@@ -36,6 +36,7 @@
-
- #include <ar.h>
- #include <gelf.h>
-+#include <libelf.h>
-
- #include <errno.h>
- #include <stdbool.h>
-Index: elfutils-0.166/src/addr2line.c
-===================================================================
---- elfutils-0.166.orig/src/addr2line.c
-+++ elfutils-0.166/src/addr2line.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libdwfl.h>
-Index: elfutils-0.166/src/ar.c
-===================================================================
---- elfutils-0.166.orig/src/ar.c
-+++ elfutils-0.166/src/ar.c
-@@ -22,7 +22,7 @@
-
- #include <argp.h>
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libintl.h>
-Index: elfutils-0.166/src/arlib.c
-===================================================================
---- elfutils-0.166.orig/src/arlib.c
-+++ elfutils-0.166/src/arlib.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <gelf.h>
- #include <libintl.h>
- #include <stdio.h>
-Index: elfutils-0.166/src/arlib2.c
-===================================================================
---- elfutils-0.166.orig/src/arlib2.c
-+++ elfutils-0.166/src/arlib2.c
-@@ -20,7 +20,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <limits.h>
- #include <string.h>
-Index: elfutils-0.166/src/elfcmp.c
-===================================================================
---- elfutils-0.166.orig/src/elfcmp.c
-+++ elfutils-0.166/src/elfcmp.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <locale.h>
- #include <libintl.h>
-Index: elfutils-0.166/src/elflint.c
-===================================================================
---- elfutils-0.166.orig/src/elflint.c
-+++ elfutils-0.166/src/elflint.c
-@@ -24,7 +24,7 @@
- #include <assert.h>
- #include <byteswap.h>
- #include <endian.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.166/src/findtextrel.c
-===================================================================
---- elfutils-0.166.orig/src/findtextrel.c
-+++ elfutils-0.166/src/findtextrel.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libdw.h>
-Index: elfutils-0.166/src/i386_ld.c
-===================================================================
---- elfutils-0.166.orig/src/i386_ld.c
-+++ elfutils-0.166/src/i386_ld.c
-@@ -20,7 +20,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include <string.h>
-Index: elfutils-0.166/src/ld.c
-===================================================================
---- elfutils-0.166.orig/src/ld.c
-+++ elfutils-0.166/src/ld.c
-@@ -21,7 +21,7 @@
-
- #include <argp.h>
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <libelf.h>
- #include <libintl.h>
-Index: elfutils-0.166/src/ldgeneric.c
-===================================================================
---- elfutils-0.166.orig/src/ldgeneric.c
-+++ elfutils-0.166/src/ldgeneric.c
-@@ -23,7 +23,7 @@
- #include <ctype.h>
- #include <dlfcn.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <fnmatch.h>
- #include <gelf.h>
-Index: elfutils-0.166/src/ldlex.c
-===================================================================
---- elfutils-0.166.orig/src/ldlex.c
-+++ elfutils-0.166/src/ldlex.c
-@@ -1106,7 +1106,7 @@ char *ldtext;
- #include <assert.h>
- #include <ctype.h>
- #include <elf.h>
--#include <error.h>
-+#include <err.h>
- #include <inttypes.h>
- #include <libintl.h>
- #include <stdbool.h>
-Index: elfutils-0.166/src/ldscript.c
-===================================================================
---- elfutils-0.166.orig/src/ldscript.c
-+++ elfutils-0.166/src/ldscript.c
-@@ -95,7 +95,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdbool.h>
- #include <stdint.h>
-Index: elfutils-0.166/src/nm.c
-===================================================================
---- elfutils-0.166.orig/src/nm.c
-+++ elfutils-0.166/src/nm.c
-@@ -26,7 +26,7 @@
- #include <ctype.h>
- #include <dwarf.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.166/src/objdump.c
-===================================================================
---- elfutils-0.166.orig/src/objdump.c
-+++ elfutils-0.166/src/objdump.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libintl.h>
-Index: elfutils-0.166/src/ranlib.c
-===================================================================
---- elfutils-0.166.orig/src/ranlib.c
-+++ elfutils-0.166/src/ranlib.c
-@@ -24,7 +24,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libintl.h>
-Index: elfutils-0.166/src/readelf.c
-===================================================================
---- elfutils-0.166.orig/src/readelf.c
-+++ elfutils-0.166/src/readelf.c
-@@ -25,7 +25,7 @@
- #include <ctype.h>
- #include <dwarf.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.166/src/size.c
-===================================================================
---- elfutils-0.166.orig/src/size.c
-+++ elfutils-0.166/src/size.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.166/src/stack.c
-===================================================================
---- elfutils-0.166.orig/src/stack.c
-+++ elfutils-0.166/src/stack.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include <assert.h>
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <stdlib.h>
- #include <inttypes.h>
- #include <stdio.h>
-Index: elfutils-0.166/src/strings.c
-===================================================================
---- elfutils-0.166.orig/src/strings.c
-+++ elfutils-0.166/src/strings.c
-@@ -25,7 +25,7 @@
- #include <ctype.h>
- #include <endian.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.166/src/strip.c
-===================================================================
---- elfutils-0.166.orig/src/strip.c
-+++ elfutils-0.166/src/strip.c
-@@ -24,7 +24,7 @@
- #include <assert.h>
- #include <byteswap.h>
- #include <endian.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libelf.h>
-Index: elfutils-0.166/src/unstrip.c
-===================================================================
---- elfutils-0.166.orig/src/unstrip.c
-+++ elfutils-0.166/src/unstrip.c
-@@ -31,7 +31,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <fnmatch.h>
- #include <libintl.h>
-Index: elfutils-0.166/tests/addrscopes.c
-===================================================================
---- elfutils-0.166.orig/tests/addrscopes.c
-+++ elfutils-0.166/tests/addrscopes.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
-
-
-Index: elfutils-0.166/tests/allregs.c
-===================================================================
---- elfutils-0.166.orig/tests/allregs.c
-+++ elfutils-0.166/tests/allregs.c
-@@ -21,7 +21,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include <assert.h>
-Index: elfutils-0.166/tests/backtrace-data.c
-===================================================================
---- elfutils-0.166.orig/tests/backtrace-data.c
-+++ elfutils-0.166/tests/backtrace-data.c
-@@ -27,7 +27,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
- #if defined(__x86_64__) && defined(__linux__)
-Index: elfutils-0.166/tests/backtrace-dwarf.c
-===================================================================
---- elfutils-0.166.orig/tests/backtrace-dwarf.c
-+++ elfutils-0.166/tests/backtrace-dwarf.c
-@@ -22,7 +22,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <sys/ptrace.h>
- #include <sys/types.h>
-Index: elfutils-0.166/tests/backtrace.c
-===================================================================
---- elfutils-0.166.orig/tests/backtrace.c
-+++ elfutils-0.166/tests/backtrace.c
-@@ -24,7 +24,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
- #ifdef __linux__
-Index: elfutils-0.166/tests/buildid.c
-===================================================================
---- elfutils-0.166.orig/tests/buildid.c
-+++ elfutils-0.166/tests/buildid.c
-@@ -23,7 +23,7 @@
- #include ELFUTILS_HEADER(elf)
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-Index: elfutils-0.166/tests/debugaltlink.c
-===================================================================
---- elfutils-0.166.orig/tests/debugaltlink.c
-+++ elfutils-0.166/tests/debugaltlink.c
-@@ -23,7 +23,7 @@
- #include ELFUTILS_HEADER(dw)
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-Index: elfutils-0.166/tests/debuglink.c
-===================================================================
---- elfutils-0.166.orig/tests/debuglink.c
-+++ elfutils-0.166/tests/debuglink.c
-@@ -21,7 +21,7 @@
- #include <errno.h>
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-Index: elfutils-0.166/tests/deleted.c
-===================================================================
---- elfutils-0.166.orig/tests/deleted.c
-+++ elfutils-0.166/tests/deleted.c
-@@ -21,7 +21,7 @@
- #include <unistd.h>
- #include <assert.h>
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #ifdef __linux__
- #include <sys/prctl.h>
-Index: elfutils-0.166/tests/dwfl-addr-sect.c
-===================================================================
---- elfutils-0.166.orig/tests/dwfl-addr-sect.c
-+++ elfutils-0.166/tests/dwfl-addr-sect.c
-@@ -23,7 +23,7 @@
- #include <stdio_ext.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include ELFUTILS_HEADER(dwfl)
-Index: elfutils-0.166/tests/dwfl-bug-addr-overflow.c
-===================================================================
---- elfutils-0.166.orig/tests/dwfl-bug-addr-overflow.c
-+++ elfutils-0.166/tests/dwfl-bug-addr-overflow.c
-@@ -20,7 +20,7 @@
- #include <inttypes.h>
- #include <stdio.h>
- #include <stdio_ext.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include ELFUTILS_HEADER(dwfl)
-
-Index: elfutils-0.166/tests/dwfl-bug-fd-leak.c
-===================================================================
---- elfutils-0.166.orig/tests/dwfl-bug-fd-leak.c
-+++ elfutils-0.166/tests/dwfl-bug-fd-leak.c
-@@ -24,7 +24,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
-
-Index: elfutils-0.166/tests/dwfl-bug-getmodules.c
-===================================================================
---- elfutils-0.166.orig/tests/dwfl-bug-getmodules.c
-+++ elfutils-0.166/tests/dwfl-bug-getmodules.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include ELFUTILS_HEADER(dwfl)
-
--#include <error.h>
-+#include <err.h>
-
- static const Dwfl_Callbacks callbacks =
- {
-Index: elfutils-0.166/tests/dwfl-report-elf-align.c
-===================================================================
---- elfutils-0.166.orig/tests/dwfl-report-elf-align.c
-+++ elfutils-0.166/tests/dwfl-report-elf-align.c
-@@ -20,7 +20,7 @@
- #include <inttypes.h>
- #include <stdio.h>
- #include <stdio_ext.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <string.h>
- #include <stdlib.h>
-Index: elfutils-0.166/tests/dwfllines.c
-===================================================================
---- elfutils-0.166.orig/tests/dwfllines.c
-+++ elfutils-0.166/tests/dwfllines.c
-@@ -27,7 +27,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
- int
- main (int argc, char *argv[])
-Index: elfutils-0.166/tests/dwflmodtest.c
-===================================================================
---- elfutils-0.166.orig/tests/dwflmodtest.c
-+++ elfutils-0.166/tests/dwflmodtest.c
-@@ -23,7 +23,7 @@
- #include <stdio_ext.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include ELFUTILS_HEADER(dwfl)
-Index: elfutils-0.166/tests/dwflsyms.c
-===================================================================
---- elfutils-0.166.orig/tests/dwflsyms.c
-+++ elfutils-0.166/tests/dwflsyms.c
-@@ -25,7 +25,7 @@
- #include <stdio.h>
- #include <stdio_ext.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
-
- static const char *
-Index: elfutils-0.166/tests/early-offscn.c
-===================================================================
---- elfutils-0.166.orig/tests/early-offscn.c
-+++ elfutils-0.166/tests/early-offscn.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdio.h>
-Index: elfutils-0.166/tests/ecp.c
-===================================================================
---- elfutils-0.166.orig/tests/ecp.c
-+++ elfutils-0.166/tests/ecp.c
-@@ -20,7 +20,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdlib.h>
-Index: elfutils-0.166/tests/find-prologues.c
-===================================================================
---- elfutils-0.166.orig/tests/find-prologues.c
-+++ elfutils-0.166/tests/find-prologues.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-Index: elfutils-0.166/tests/funcretval.c
-===================================================================
---- elfutils-0.166.orig/tests/funcretval.c
-+++ elfutils-0.166/tests/funcretval.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-Index: elfutils-0.166/tests/funcscopes.c
-===================================================================
---- elfutils-0.166.orig/tests/funcscopes.c
-+++ elfutils-0.166/tests/funcscopes.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-Index: elfutils-0.166/tests/getsrc_die.c
-===================================================================
---- elfutils-0.166.orig/tests/getsrc_die.c
-+++ elfutils-0.166/tests/getsrc_die.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libelf.h>
-Index: elfutils-0.166/tests/line2addr.c
-===================================================================
---- elfutils-0.166.orig/tests/line2addr.c
-+++ elfutils-0.166/tests/line2addr.c
-@@ -26,7 +26,7 @@
- #include <locale.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
-
- static void
-Index: elfutils-0.166/tests/low_high_pc.c
-===================================================================
---- elfutils-0.166.orig/tests/low_high_pc.c
-+++ elfutils-0.166/tests/low_high_pc.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-Index: elfutils-0.166/tests/md5-sha1-test.c
-===================================================================
---- elfutils-0.166.orig/tests/md5-sha1-test.c
-+++ elfutils-0.166/tests/md5-sha1-test.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
- #include "md5.h"
- #include "sha1.h"
-Index: elfutils-0.166/tests/rdwrmmap.c
-===================================================================
---- elfutils-0.166.orig/tests/rdwrmmap.c
-+++ elfutils-0.166/tests/rdwrmmap.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <stdio.h>
- #include <fcntl.h>
- #include <unistd.h>
-Index: elfutils-0.166/tests/saridx.c
-===================================================================
---- elfutils-0.166.orig/tests/saridx.c
-+++ elfutils-0.166/tests/saridx.c
-@@ -17,7 +17,7 @@
-
- #include <config.h>
-
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdio.h>
-Index: elfutils-0.166/tests/sectiondump.c
-===================================================================
---- elfutils-0.166.orig/tests/sectiondump.c
-+++ elfutils-0.166/tests/sectiondump.c
-@@ -18,7 +18,7 @@
- #include <config.h>
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.166/tests/varlocs.c
-===================================================================
---- elfutils-0.166.orig/tests/varlocs.c
-+++ elfutils-0.166/tests/varlocs.c
-@@ -25,7 +25,7 @@
- #include <dwarf.h>
- #include <stdio.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-Index: elfutils-0.166/tests/vdsosyms.c
-===================================================================
---- elfutils-0.166.orig/tests/vdsosyms.c
-+++ elfutils-0.166/tests/vdsosyms.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <inttypes.h>
- #include <stdio.h>
- #include <string.h>
-Index: elfutils-0.166/libelf/elf_getarsym.c
-===================================================================
---- elfutils-0.166.orig/libelf/elf_getarsym.c
-+++ elfutils-0.166/libelf/elf_getarsym.c
-@@ -302,7 +302,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
- arsym[cnt].as_off = (*u32)[cnt];
-
- arsym[cnt].as_hash = _dl_elf_hash (str_data);
-- str_data = rawmemchr (str_data, '\0') + 1;
-+ str_data = memchr (str_data, '\0', SIZE_MAX) + 1;
- }
-
- /* At the end a special entry. */
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
deleted file mode 100644
index 3754c1c361..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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.166/0001-fix-a-stack-usage-warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/0001-fix-a-stack-usage-warning.patch
deleted file mode 100644
index 6923bf7053..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-fix-a-stack-usage-warning.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-[PATCH] fix a stack-usage warning
-
-Upstream-Status: Pending
-
-not use a variable to as a array size, otherwise the warning to error that
-stack usage might be unbounded [-Werror=stack-usage=] will happen
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- backends/ppc_initreg.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
-index 64f5379..52dde3e 100644
---- a/backends/ppc_initreg.c
-+++ b/backends/ppc_initreg.c
-@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
- return false;
- }
- const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr);
-- Dwarf_Word dwarf_regs[gprs];
-+ Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)];
- for (unsigned gpr = 0; gpr < gprs; gpr++)
- dwarf_regs[gpr] = user_regs.r.gpr[gpr];
- if (! setfunc (0, gprs, dwarf_regs, arg))
---
-1.9.1
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-remove-the-unneed-checking.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/0001-remove-the-unneed-checking.patch
deleted file mode 100644
index 5be92d705a..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-remove-the-unneed-checking.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Disable the test to convert euc-jp
-
-Remove the test "Test against HP-UX 11.11 bug:
-No converter from EUC-JP to UTF-8 is provided"
-since we don't support HP-UX and if the euc-jp is not
-installed on the host, the dependence will be built without
-iconv support and will cause guild-native building fail.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- m4/iconv.m4 | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/m4/iconv.m4 b/m4/iconv.m4
-index a503646..299f1eb 100644
---- a/m4/iconv.m4
-+++ b/m4/iconv.m4
-@@ -159,6 +159,7 @@ int main ()
- }
- }
- #endif
-+#if 0
- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
- provided. */
- if (/* Try standardized names. */
-@@ -170,6 +171,7 @@ int main ()
- /* Try HP-UX names. */
- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
- result |= 16;
-+#endif
- return result;
- }]])],
- [am_cv_func_iconv_works=yes],
---
-2.0.1
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/aarch64_uio.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/aarch64_uio.patch
deleted file mode 100644
index 38dc57befc..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/aarch64_uio.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Fix build on aarch64/musl
-
-Errors
-
-invalid operands to binary & (have 'long double' and 'unsigned int')
-
-error: redefinition
- of 'struct iovec'
- struct iovec { void *iov_base; size_t iov_len; };
- ^
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: elfutils-0.163/backends/aarch64_initreg.c
-===================================================================
---- elfutils-0.163.orig/backends/aarch64_initreg.c
-+++ elfutils-0.163/backends/aarch64_initreg.c
-@@ -33,7 +33,7 @@
- #include "system.h"
- #include <assert.h>
- #ifdef __aarch64__
--# include <linux/uio.h>
-+# include <sys/uio.h>
- # include <sys/user.h>
- # include <sys/ptrace.h>
- /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
-@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t
-
- Dwarf_Word dwarf_fregs[32];
- for (int r = 0; r < 32; r++)
-- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF;
-+ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF;
-
- if (! setfunc (64, 32, dwarf_fregs, arg))
- return false;
-Index: elfutils-0.163/backends/arm_initreg.c
-===================================================================
---- elfutils-0.163.orig/backends/arm_initreg.c
-+++ elfutils-0.163/backends/arm_initreg.c
-@@ -37,7 +37,7 @@
- #endif
-
- #ifdef __aarch64__
--# include <linux/uio.h>
-+# include <sys/uio.h>
- # include <sys/user.h>
- # include <sys/ptrace.h>
- /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.166/arm_backend.diff
deleted file mode 100644
index 9d47f95f26..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/arm_backend.diff
+++ /dev/null
@@ -1,600 +0,0 @@
-Index: elfutils-0.164/backends/arm_init.c
-===================================================================
---- elfutils-0.164.orig/backends/arm_init.c
-+++ elfutils-0.164/backends/arm_init.c
-@@ -35,20 +35,31 @@
- #define RELOC_PREFIX R_ARM_
- #include "libebl_CPU.h"
-
-+#include "libebl_arm.h"
-+
- /* This defines the common reloc hooks based on arm_reloc.def. */
- #include "common-reloc.c"
-
-
- const char *
--arm_init (Elf *elf __attribute__ ((unused)),
-+arm_init (Elf *elf,
- GElf_Half machine __attribute__ ((unused)),
- Ebl *eh,
- size_t ehlen)
- {
-+ int soft_float = 0;
-+
- /* Check whether the Elf_BH object has a sufficent size. */
- if (ehlen < sizeof (Ebl))
- return NULL;
-
-+ if (elf) {
-+ GElf_Ehdr ehdr_mem;
-+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT))
-+ soft_float = 1;
-+ }
-+
- /* We handle it. */
- eh->name = "ARM";
- arm_init_reloc (eh);
-@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse
- HOOK (eh, core_note);
- HOOK (eh, auxv_info);
- HOOK (eh, check_object_attribute);
-- HOOK (eh, return_value_location);
-+ if (soft_float)
-+ eh->return_value_location = arm_return_value_location_soft;
-+ else
-+ eh->return_value_location = arm_return_value_location_hard;
- HOOK (eh, abi_cfi);
- HOOK (eh, check_reloc_target_type);
- HOOK (eh, symbol_type_name);
-Index: elfutils-0.164/backends/arm_regs.c
-===================================================================
---- elfutils-0.164.orig/backends/arm_regs.c
-+++ elfutils-0.164/backends/arm_regs.c
-@@ -31,6 +31,7 @@
- #endif
-
- #include <string.h>
-+#include <stdio.h>
- #include <dwarf.h>
-
- #define BACKEND arm_
-@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_
- break;
-
- case 16 + 0 ... 16 + 7:
-+ /* AADWARF says that there are no registers in that range,
-+ * but gcc maps FPA registers here
-+ */
- regno += 96 - 16;
- /* Fall through. */
- case 96 + 0 ... 96 + 7:
-@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_
- namelen = 2;
- break;
-
-+ case 64 + 0 ... 64 + 9:
-+ *setname = "VFP";
-+ *bits = 32;
-+ *type = DW_ATE_float;
-+ name[0] = 's';
-+ name[1] = regno - 64 + '0';
-+ namelen = 2;
-+ break;
-+
-+ case 64 + 10 ... 64 + 31:
-+ *setname = "VFP";
-+ *bits = 32;
-+ *type = DW_ATE_float;
-+ name[0] = 's';
-+ name[1] = (regno - 64) / 10 + '0';
-+ name[2] = (regno - 64) % 10 + '0';
-+ namelen = 3;
-+ break;
-+
-+ case 104 + 0 ... 104 + 7:
-+ /* XXX TODO:
-+ * This can be either intel wireless MMX general purpose/control
-+ * registers or xscale accumulator, which have different usage.
-+ * We only have the intel wireless MMX here now.
-+ * The name needs to be changed for the xscale accumulator too. */
-+ *setname = "MMX";
-+ *type = DW_ATE_unsigned;
-+ *bits = 32;
-+ memcpy(name, "wcgr", 4);
-+ name[4] = regno - 104 + '0';
-+ namelen = 5;
-+ break;
-+
-+ case 112 + 0 ... 112 + 9:
-+ *setname = "MMX";
-+ *type = DW_ATE_unsigned;
-+ *bits = 64;
-+ name[0] = 'w';
-+ name[1] = 'r';
-+ name[2] = regno - 112 + '0';
-+ namelen = 3;
-+ break;
-+
-+ case 112 + 10 ... 112 + 15:
-+ *setname = "MMX";
-+ *type = DW_ATE_unsigned;
-+ *bits = 64;
-+ name[0] = 'w';
-+ name[1] = 'r';
-+ name[2] = '1';
-+ name[3] = regno - 112 - 10 + '0';
-+ namelen = 4;
-+ break;
-+
- case 128:
-+ *setname = "state";
- *type = DW_ATE_unsigned;
- return stpcpy (name, "spsr") + 1 - name;
-
-+ case 129:
-+ *setname = "state";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_fiq") + 1 - name;
-+
-+ case 130:
-+ *setname = "state";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_irq") + 1 - name;
-+
-+ case 131:
-+ *setname = "state";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_abt") + 1 - name;
-+
-+ case 132:
-+ *setname = "state";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_und") + 1 - name;
-+
-+ case 133:
-+ *setname = "state";
-+ *type = DW_ATE_unsigned;
-+ return stpcpy(name, "spsr_svc") + 1 - name;
-+
-+ case 144 ... 150:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1;
-+
-+ case 151 ... 157:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1;
-+
-+ case 158 ... 159:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1;
-+
-+ case 160 ... 161:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1;
-+
-+ case 162 ... 163:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_und", regno - 162 + 13) + 1;
-+
-+ case 164 ... 165:
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1;
-+
-+ case 192 ... 199:
-+ *setname = "MMX";
-+ *bits = 32;
-+ *type = DW_ATE_unsigned;
-+ name[0] = 'w';
-+ name[1] = 'c';
-+ name[2] = regno - 192 + '0';
-+ namelen = 3;
-+ break;
-+
- case 256 + 0 ... 256 + 9:
-+ /* XXX TODO: Neon also uses those registers and can contain
-+ * both float and integers */
- *setname = "VFP";
- *type = DW_ATE_float;
- *bits = 64;
-Index: elfutils-0.164/backends/arm_retval.c
-===================================================================
---- elfutils-0.164.orig/backends/arm_retval.c
-+++ elfutils-0.164/backends/arm_retval.c
-@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
- #define nloc_intreg 1
- #define nloc_intregs(n) (2 * (n))
-
-+/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */
-+static const Dwarf_Op loc_fpreg[] =
-+ {
-+ { .atom = DW_OP_reg16 },
-+ };
-+#define nloc_fpreg 1
-+
- /* 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 @@ static const Dwarf_Op loc_aggregate[] =
- #define nloc_aggregate 1
-
-
--int
--arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+static int
-+arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
-+ int soft_float)
- {
- /* Start with the function's type, and get the DW_AT_type attribute,
- which is the type of the return value. */
-@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *fu
- else
- return -1;
- }
-+ if (tag == DW_TAG_base_type)
-+ {
-+ Dwarf_Word encoding;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+ &attr_mem), &encoding) != 0)
-+ return -1;
-+
-+ if ((encoding == DW_ATE_float) && !soft_float)
-+ {
-+ *locp = loc_fpreg;
-+ if (size <= 8)
-+ return nloc_fpreg;
-+ goto aggregate;
-+ }
-+ }
- if (size <= 16)
- {
- intreg:
-@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *fu
- }
-
- aggregate:
-+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
- *locp = loc_aggregate;
- return nloc_aggregate;
- }
-@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *fu
- DWARF and might be valid. */
- return -2;
- }
-+
-+/* return location for -mabi=apcs-gnu -msoft-float */
-+int
-+arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ return arm_return_value_location_ (functypedie, locp, 1);
-+}
-+
-+/* return location for -mabi=apcs-gnu -mhard-float (current default) */
-+int
-+arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ return arm_return_value_location_ (functypedie, locp, 0);
-+}
-+
-Index: elfutils-0.164/libelf/elf.h
-===================================================================
---- elfutils-0.164.orig/libelf/elf.h
-+++ elfutils-0.164/libelf/elf.h
-@@ -2450,6 +2450,9 @@ enum
- #define EF_ARM_EABI_VER4 0x04000000
- #define EF_ARM_EABI_VER5 0x05000000
-
-+/* EI_OSABI values */
-+#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */
-+
- /* Additional symbol types for Thumb. */
- #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
- #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
-@@ -2467,12 +2470,19 @@ enum
-
- /* Processor specific values for the Phdr p_type field. */
- #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
-+#define PT_ARM_UNWIND PT_ARM_EXIDX
-
- /* Processor specific values for the Shdr sh_type field. */
- #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */
- #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */
- #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */
-
-+/* Processor specific values for the Dyn d_tag field. */
-+#define DT_ARM_RESERVED1 (DT_LOPROC + 0)
-+#define DT_ARM_SYMTABSZ (DT_LOPROC + 1)
-+#define DT_ARM_PREEMTMAB (DT_LOPROC + 2)
-+#define DT_ARM_RESERVED2 (DT_LOPROC + 3)
-+#define DT_ARM_NUM 4
-
- /* AArch64 relocs. */
-
-@@ -2765,6 +2775,7 @@ enum
- TLS block (LDR, STR). */
- #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
- to GOT origin (LDR). */
-+/* 112 - 127 private range */
- #define R_ARM_ME_TOO 128 /* Obsolete. */
- #define R_ARM_THM_TLS_DESCSEQ 129
- #define R_ARM_THM_TLS_DESCSEQ16 129
-Index: elfutils-0.164/backends/libebl_arm.h
-===================================================================
---- /dev/null
-+++ elfutils-0.164/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
-Index: elfutils-0.164/tests/run-allregs.sh
-===================================================================
---- elfutils-0.164.orig/tests/run-allregs.sh
-+++ elfutils-0.164/tests/run-allregs.sh
-@@ -2672,7 +2672,28 @@ integer registers:
- 13: sp (sp), address 32 bits
- 14: lr (lr), address 32 bits
- 15: pc (pc), address 32 bits
-- 128: spsr (spsr), unsigned 32 bits
-+ 144: r8_usr (r8_usr), signed 32 bits
-+ 145: r9_usr (r9_usr), signed 32 bits
-+ 146: r10_usr (r10_usr), signed 32 bits
-+ 147: r11_usr (r11_usr), signed 32 bits
-+ 148: r12_usr (r12_usr), signed 32 bits
-+ 149: r13_usr (r13_usr), signed 32 bits
-+ 150: r14_usr (r14_usr), signed 32 bits
-+ 151: r8_fiq (r8_fiq), signed 32 bits
-+ 152: r9_fiq (r9_fiq), signed 32 bits
-+ 153: r10_fiq (r10_fiq), signed 32 bits
-+ 154: r11_fiq (r11_fiq), signed 32 bits
-+ 155: r12_fiq (r12_fiq), signed 32 bits
-+ 156: r13_fiq (r13_fiq), signed 32 bits
-+ 157: r14_fiq (r14_fiq), signed 32 bits
-+ 158: r13_irq (r13_irq), signed 32 bits
-+ 159: r14_irq (r14_irq), signed 32 bits
-+ 160: r13_abt (r13_abt), signed 32 bits
-+ 161: r14_abt (r14_abt), signed 32 bits
-+ 162: r13_und (r13_und), signed 32 bits
-+ 163: r14_und (r14_und), signed 32 bits
-+ 164: r13_svc (r13_svc), signed 32 bits
-+ 165: r14_svc (r14_svc), signed 32 bits
- FPA registers:
- 16: f0 (f0), float 96 bits
- 17: f1 (f1), float 96 bits
-@@ -2690,7 +2711,72 @@ FPA registers:
- 101: f5 (f5), float 96 bits
- 102: f6 (f6), float 96 bits
- 103: f7 (f7), float 96 bits
-+MMX registers:
-+ 104: wcgr0 (wcgr0), unsigned 32 bits
-+ 105: wcgr1 (wcgr1), unsigned 32 bits
-+ 106: wcgr2 (wcgr2), unsigned 32 bits
-+ 107: wcgr3 (wcgr3), unsigned 32 bits
-+ 108: wcgr4 (wcgr4), unsigned 32 bits
-+ 109: wcgr5 (wcgr5), unsigned 32 bits
-+ 110: wcgr6 (wcgr6), unsigned 32 bits
-+ 111: wcgr7 (wcgr7), unsigned 32 bits
-+ 112: wr0 (wr0), unsigned 64 bits
-+ 113: wr1 (wr1), unsigned 64 bits
-+ 114: wr2 (wr2), unsigned 64 bits
-+ 115: wr3 (wr3), unsigned 64 bits
-+ 116: wr4 (wr4), unsigned 64 bits
-+ 117: wr5 (wr5), unsigned 64 bits
-+ 118: wr6 (wr6), unsigned 64 bits
-+ 119: wr7 (wr7), unsigned 64 bits
-+ 120: wr8 (wr8), unsigned 64 bits
-+ 121: wr9 (wr9), unsigned 64 bits
-+ 122: wr10 (wr10), unsigned 64 bits
-+ 123: wr11 (wr11), unsigned 64 bits
-+ 124: wr12 (wr12), unsigned 64 bits
-+ 125: wr13 (wr13), unsigned 64 bits
-+ 126: wr14 (wr14), unsigned 64 bits
-+ 127: wr15 (wr15), unsigned 64 bits
-+ 192: wc0 (wc0), unsigned 32 bits
-+ 193: wc1 (wc1), unsigned 32 bits
-+ 194: wc2 (wc2), unsigned 32 bits
-+ 195: wc3 (wc3), unsigned 32 bits
-+ 196: wc4 (wc4), unsigned 32 bits
-+ 197: wc5 (wc5), unsigned 32 bits
-+ 198: wc6 (wc6), unsigned 32 bits
-+ 199: wc7 (wc7), unsigned 32 bits
- VFP registers:
-+ 64: s0 (s0), float 32 bits
-+ 65: s1 (s1), float 32 bits
-+ 66: s2 (s2), float 32 bits
-+ 67: s3 (s3), float 32 bits
-+ 68: s4 (s4), float 32 bits
-+ 69: s5 (s5), float 32 bits
-+ 70: s6 (s6), float 32 bits
-+ 71: s7 (s7), float 32 bits
-+ 72: s8 (s8), float 32 bits
-+ 73: s9 (s9), float 32 bits
-+ 74: s10 (s10), float 32 bits
-+ 75: s11 (s11), float 32 bits
-+ 76: s12 (s12), float 32 bits
-+ 77: s13 (s13), float 32 bits
-+ 78: s14 (s14), float 32 bits
-+ 79: s15 (s15), float 32 bits
-+ 80: s16 (s16), float 32 bits
-+ 81: s17 (s17), float 32 bits
-+ 82: s18 (s18), float 32 bits
-+ 83: s19 (s19), float 32 bits
-+ 84: s20 (s20), float 32 bits
-+ 85: s21 (s21), float 32 bits
-+ 86: s22 (s22), float 32 bits
-+ 87: s23 (s23), float 32 bits
-+ 88: s24 (s24), float 32 bits
-+ 89: s25 (s25), float 32 bits
-+ 90: s26 (s26), float 32 bits
-+ 91: s27 (s27), float 32 bits
-+ 92: s28 (s28), float 32 bits
-+ 93: s29 (s29), float 32 bits
-+ 94: s30 (s30), float 32 bits
-+ 95: s31 (s31), float 32 bits
- 256: d0 (d0), float 64 bits
- 257: d1 (d1), float 64 bits
- 258: d2 (d2), float 64 bits
-@@ -2723,6 +2809,13 @@ VFP registers:
- 285: d29 (d29), float 64 bits
- 286: d30 (d30), float 64 bits
- 287: d31 (d31), float 64 bits
-+state registers:
-+ 128: spsr (spsr), unsigned 32 bits
-+ 129: spsr_fiq (spsr_fiq), unsigned 32 bits
-+ 130: spsr_irq (spsr_irq), unsigned 32 bits
-+ 131: spsr_abt (spsr_abt), unsigned 32 bits
-+ 132: spsr_und (spsr_und), unsigned 32 bits
-+ 133: spsr_svc (spsr_svc), unsigned 32 bits
- EOF
-
- # See run-readelf-mixed-corenote.sh for instructions to regenerate
-Index: elfutils-0.164/tests/run-readelf-mixed-corenote.sh
-===================================================================
---- elfutils-0.164.orig/tests/run-readelf-mixed-corenote.sh
-+++ elfutils-0.164/tests/run-readelf-mixed-corenote.sh
-@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x27
- 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
-- r0: 1 r1: -1091672508 r2: -1091672500
-- r3: 0 r4: 0 r5: 0
-- r6: 33728 r7: 0 r8: 0
-- r9: 0 r10: -1225703496 r11: -1091672844
-- r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48
-- pc: 0x00008500 spsr: 0x60000010
-+ r0: 1 r1: -1091672508 r2: -1091672500 r3: 0
-+ r4: 0 r5: 0 r6: 33728 r7: 0
-+ r8: 0 r9: 0 r10: -1225703496 r11: -1091672844
-+ r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48 pc: 0x00008500
-+ spsr: 0x60000010
- 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.164/tests/run-addrcfi.sh
-===================================================================
---- elfutils-0.164.orig/tests/run-addrcfi.sh
-+++ elfutils-0.164/tests/run-addrcfi.sh
-@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matc
- 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
-@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matc
- 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/meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch
deleted file mode 100644
index 6c150bb54c..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 836a16fe5b5bab4a3afe2c991c104652775ce3a3 Mon Sep 17 00:00:00 2001
-From: David Abdurachmanov <davidlt@cern.ch>
-Date: Mon, 11 Apr 2016 16:00:57 +0200
-Subject: elfcmp: fix self-comparison error with GCC 6
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Noticed with Fedora 24 Alpha, gcc (GCC) 6.0.0 20160406
-(Red Hat 6.0.0-0.20).
-
-elfcmp.c: In function ‘main’:
-elfcmp.c:364:199: error: self-comparison always evaluates
-to false [-Werror=tautological-compare]
- if (unlikely (name1 == NULL || name2 == NULL
-
-Signed-off-by: David Abdurachmanov <davidlt@cern.ch>
----
-
-Upstream-Status: Backport
-
- src/ChangeLog | 4 ++++
- src/elfcmp.c | 2 +-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/elfcmp.c b/src/elfcmp.c
-index 852b92f..7b5d39c 100644
---- a/src/elfcmp.c
-+++ b/src/elfcmp.c
-@@ -368,7 +368,7 @@ main (int argc, char *argv[])
- && sym1->st_shndx != SHN_UNDEF)
- || sym1->st_info != sym2->st_info
- || sym1->st_other != sym2->st_other
-- || sym1->st_shndx != sym1->st_shndx))
-+ || sym1->st_shndx != sym2->st_shndx))
- {
- // XXX Do we want to allow reordered symbol tables?
- symtab_mismatch:
---
-cgit v0.12
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/fixheadercheck.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/fixheadercheck.patch
deleted file mode 100644
index 5de3b24c85..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/fixheadercheck.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-For some binaries we can get a invalid section alignment, for example if
-sh_align = 1 and sh_addralign is 0. In the case of a zero size section like
-".note.GNU-stack", this is irrelavent as far as I can tell and we shouldn't
-error in this case.
-
-RP 2014/6/11
-
-Upstream-Status: Pending
-
-diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
---- a/libelf/elf32_updatenull.c
-+++ b/libelf/elf32_updatenull.c
-@@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
- we test for the alignment of the section being large
- enough for the largest alignment required by a data
- block. */
-- if (unlikely (! powerof2 (shdr->sh_addralign))
-- || unlikely ((shdr->sh_addralign ?: 1) < sh_align))
-+ if (shdr->sh_size && (unlikely (! powerof2 (shdr->sh_addralign))
-+ || unlikely ((shdr->sh_addralign ?: 1) < sh_align)))
- {
- __libelf_seterrno (ELF_E_INVALID_ALIGN);
- return -1;
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.166/hppa_backend.diff
deleted file mode 100644
index 45456715a3..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/hppa_backend.diff
+++ /dev/null
@@ -1,799 +0,0 @@
-Index: elfutils-0.164/backends/parisc_init.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/parisc_init.c
-@@ -0,0 +1,73 @@
-+/* Initialization of PA-RISC specific backend library.
-+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND parisc_
-+#define RELOC_PREFIX R_PARISC_
-+#include "libebl_CPU.h"
-+#include "libebl_parisc.h"
-+
-+/* This defines the common reloc hooks based on parisc_reloc.def. */
-+#include "common-reloc.c"
-+
-+
-+const char *
-+parisc_init (Elf *elf __attribute__ ((unused)),
-+ GElf_Half machine __attribute__ ((unused)),
-+ Ebl *eh,
-+ size_t ehlen)
-+{
-+ int pa64 = 0;
-+
-+ /* Check whether the Elf_BH object has a sufficent size. */
-+ if (ehlen < sizeof (Ebl))
-+ return NULL;
-+
-+ if (elf) {
-+ GElf_Ehdr ehdr_mem;
-+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE))
-+ pa64 = 1;
-+ }
-+ /* We handle it. */
-+ eh->name = "PA-RISC";
-+ parisc_init_reloc (eh);
-+ HOOK (eh, reloc_simple_type);
-+ HOOK (eh, machine_flag_check);
-+ HOOK (eh, symbol_type_name);
-+ HOOK (eh, segment_type_name);
-+ HOOK (eh, section_type_name);
-+ HOOK (eh, register_info);
-+ if (pa64)
-+ eh->return_value_location = parisc_return_value_location_64;
-+ else
-+ eh->return_value_location = parisc_return_value_location_32;
-+
-+ return MODVERSION;
-+}
-Index: elfutils-0.164/backends/parisc_regs.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/parisc_regs.c
-@@ -0,0 +1,159 @@
-+/* Register names and numbers for PA-RISC DWARF.
-+ Copyright (C) 2005, 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND parisc_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
-+ const char **prefix, const char **setname,
-+ int *bits, int *type)
-+{
-+ int pa64 = 0;
-+
-+ if (ebl->elf) {
-+ GElf_Ehdr ehdr_mem;
-+ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem);
-+ if (ehdr->e_flags & EF_PARISC_WIDE)
-+ pa64 = 1;
-+ }
-+
-+ int nregs = pa64 ? 127 : 128;
-+
-+ if (name == NULL)
-+ return nregs;
-+
-+ if (regno < 0 || regno >= nregs || namelen < 6)
-+ return -1;
-+
-+ *prefix = "%";
-+
-+ if (regno < 32)
-+ {
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ if (pa64)
-+ {
-+ *bits = 64;
-+ }
-+ else
-+ {
-+ *bits = 32;
-+ }
-+ }
-+ else if (regno == 32)
-+ {
-+ *setname = "special";
-+ if (pa64)
-+ {
-+ *bits = 6;
-+ }
-+ else
-+ {
-+ *bits = 5;
-+ }
-+ *type = DW_ATE_unsigned;
-+ }
-+ else
-+ {
-+ *setname = "FPU";
-+ *type = DW_ATE_float;
-+ if (pa64)
-+ {
-+ *bits = 64;
-+ }
-+ else
-+ {
-+ *bits = 32;
-+ }
-+ }
-+
-+ if (regno < 33) {
-+ switch (regno)
-+ {
-+ case 0 ... 9:
-+ name[0] = 'r';
-+ name[1] = regno + '0';
-+ namelen = 2;
-+ break;
-+ case 10 ... 31:
-+ name[0] = 'r';
-+ name[1] = regno / 10 + '0';
-+ name[2] = regno % 10 + '0';
-+ namelen = 3;
-+ break;
-+ case 32:
-+ *prefix = NULL;
-+ name[0] = 'S';
-+ name[1] = 'A';
-+ name[2] = 'R';
-+ namelen = 3;
-+ break;
-+ }
-+ }
-+ else {
-+ if (pa64 && ((regno - 72) % 2)) {
-+ *setname = NULL;
-+ return 0;
-+ }
-+
-+ switch (regno)
-+ {
-+ case 72 + 0 ... 72 + 11:
-+ name[0] = 'f';
-+ name[1] = 'r';
-+ name[2] = (regno + 8 - 72) / 2 + '0';
-+ namelen = 3;
-+ if ((regno + 8 - 72) % 2) {
-+ name[3] = 'R';
-+ namelen++;
-+ }
-+ break;
-+ case 72 + 12 ... 72 + 55:
-+ name[0] = 'f';
-+ name[1] = 'r';
-+ name[2] = (regno + 8 - 72) / 2 / 10 + '0';
-+ name[3] = (regno + 8 - 72) / 2 % 10 + '0';
-+ namelen = 4;
-+ if ((regno + 8 - 72) % 2) {
-+ name[4] = 'R';
-+ namelen++;
-+ }
-+ break;
-+ default:
-+ *setname = NULL;
-+ return 0;
-+ }
-+ }
-+ name[namelen++] = '\0';
-+ return namelen;
-+}
-Index: elfutils-0.164/backends/parisc_reloc.def
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/parisc_reloc.def
-@@ -0,0 +1,128 @@
-+/* List the relocation types for PA-RISC. -*- C -*-
-+ Copyright (C) 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+/* NAME, REL|EXEC|DYN */
-+
-+RELOC_TYPE (NONE, EXEC|DYN)
-+RELOC_TYPE (DIR32, REL|EXEC|DYN)
-+RELOC_TYPE (DIR21L, REL|EXEC|DYN)
-+RELOC_TYPE (DIR17R, REL)
-+RELOC_TYPE (DIR17F, REL)
-+RELOC_TYPE (DIR14R, REL|DYN)
-+RELOC_TYPE (PCREL32, REL)
-+RELOC_TYPE (PCREL21L, REL)
-+RELOC_TYPE (PCREL17R, REL)
-+RELOC_TYPE (PCREL17F, REL)
-+RELOC_TYPE (PCREL14R, REL|EXEC)
-+RELOC_TYPE (DPREL21L, REL)
-+RELOC_TYPE (DPREL14WR, REL)
-+RELOC_TYPE (DPREL14DR, REL)
-+RELOC_TYPE (DPREL14R, REL)
-+RELOC_TYPE (GPREL21L, 0)
-+RELOC_TYPE (GPREL14R, 0)
-+RELOC_TYPE (LTOFF21L, REL)
-+RELOC_TYPE (LTOFF14R, REL)
-+RELOC_TYPE (DLTIND14F, 0)
-+RELOC_TYPE (SETBASE, 0)
-+RELOC_TYPE (SECREL32, REL)
-+RELOC_TYPE (BASEREL21L, 0)
-+RELOC_TYPE (BASEREL17R, 0)
-+RELOC_TYPE (BASEREL14R, 0)
-+RELOC_TYPE (SEGBASE, 0)
-+RELOC_TYPE (SEGREL32, REL)
-+RELOC_TYPE (PLTOFF21L, 0)
-+RELOC_TYPE (PLTOFF14R, 0)
-+RELOC_TYPE (PLTOFF14F, 0)
-+RELOC_TYPE (LTOFF_FPTR32, 0)
-+RELOC_TYPE (LTOFF_FPTR21L, 0)
-+RELOC_TYPE (LTOFF_FPTR14R, 0)
-+RELOC_TYPE (FPTR64, 0)
-+RELOC_TYPE (PLABEL32, REL|DYN)
-+RELOC_TYPE (PCREL64, 0)
-+RELOC_TYPE (PCREL22C, 0)
-+RELOC_TYPE (PCREL22F, 0)
-+RELOC_TYPE (PCREL14WR, 0)
-+RELOC_TYPE (PCREL14DR, 0)
-+RELOC_TYPE (PCREL16F, 0)
-+RELOC_TYPE (PCREL16WF, 0)
-+RELOC_TYPE (PCREL16DF, 0)
-+RELOC_TYPE (DIR64, REL|DYN)
-+RELOC_TYPE (DIR14WR, REL)
-+RELOC_TYPE (DIR14DR, REL)
-+RELOC_TYPE (DIR16F, REL)
-+RELOC_TYPE (DIR16WF, REL)
-+RELOC_TYPE (DIR16DF, REL)
-+RELOC_TYPE (GPREL64, 0)
-+RELOC_TYPE (GPREL14WR, 0)
-+RELOC_TYPE (GPREL14DR, 0)
-+RELOC_TYPE (GPREL16F, 0)
-+RELOC_TYPE (GPREL16WF, 0)
-+RELOC_TYPE (GPREL16DF, 0)
-+RELOC_TYPE (LTOFF64, 0)
-+RELOC_TYPE (LTOFF14WR, 0)
-+RELOC_TYPE (LTOFF14DR, 0)
-+RELOC_TYPE (LTOFF16F, 0)
-+RELOC_TYPE (LTOFF16WF, 0)
-+RELOC_TYPE (LTOFF16DF, 0)
-+RELOC_TYPE (SECREL64, 0)
-+RELOC_TYPE (BASEREL14WR, 0)
-+RELOC_TYPE (BASEREL14DR, 0)
-+RELOC_TYPE (SEGREL64, 0)
-+RELOC_TYPE (PLTOFF14WR, 0)
-+RELOC_TYPE (PLTOFF14DR, 0)
-+RELOC_TYPE (PLTOFF16F, 0)
-+RELOC_TYPE (PLTOFF16WF, 0)
-+RELOC_TYPE (PLTOFF16DF, 0)
-+RELOC_TYPE (LTOFF_FPTR64, 0)
-+RELOC_TYPE (LTOFF_FPTR14WR, 0)
-+RELOC_TYPE (LTOFF_FPTR14DR, 0)
-+RELOC_TYPE (LTOFF_FPTR16F, 0)
-+RELOC_TYPE (LTOFF_FPTR16WF, 0)
-+RELOC_TYPE (LTOFF_FPTR16DF, 0)
-+RELOC_TYPE (COPY, EXEC)
-+RELOC_TYPE (IPLT, EXEC|DYN)
-+RELOC_TYPE (EPLT, 0)
-+RELOC_TYPE (TPREL32, DYN)
-+RELOC_TYPE (TPREL21L, 0)
-+RELOC_TYPE (TPREL14R, 0)
-+RELOC_TYPE (LTOFF_TP21L, 0)
-+RELOC_TYPE (LTOFF_TP14R, 0)
-+RELOC_TYPE (LTOFF_TP14F, 0)
-+RELOC_TYPE (TPREL64, 0)
-+RELOC_TYPE (TPREL14WR, 0)
-+RELOC_TYPE (TPREL14DR, 0)
-+RELOC_TYPE (TPREL16F, 0)
-+RELOC_TYPE (TPREL16WF, 0)
-+RELOC_TYPE (TPREL16DF, 0)
-+RELOC_TYPE (LTOFF_TP64, 0)
-+RELOC_TYPE (LTOFF_TP14WR, 0)
-+RELOC_TYPE (LTOFF_TP14DR, 0)
-+RELOC_TYPE (LTOFF_TP16F, 0)
-+RELOC_TYPE (LTOFF_TP16WF, 0)
-+RELOC_TYPE (LTOFF_TP16DF, 0)
-+RELOC_TYPE (TLS_DTPMOD32, DYN)
-+RELOC_TYPE (TLS_DTPMOD64, DYN)
-+
-+#define NO_RELATIVE_RELOC 1
-Index: elfutils-0.164/backends/parisc_retval.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/parisc_retval.c
-@@ -0,0 +1,213 @@
-+/* Function return value location for Linux/PA-RISC ABI.
-+ Copyright (C) 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <assert.h>
-+#include <dwarf.h>
-+
-+#define BACKEND parisc_
-+#include "libebl_CPU.h"
-+#include "libebl_parisc.h"
-+
-+/* %r28, or pair %r28, %r29. */
-+static const Dwarf_Op loc_intreg32[] =
-+ {
-+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+
-+static const Dwarf_Op loc_intreg[] =
-+ {
-+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 },
-+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 },
-+ };
-+#define nloc_intreg 1
-+#define nloc_intregpair 4
-+
-+/* %fr4L, or pair %fr4L, %fr4R on pa-32 */
-+static const Dwarf_Op loc_fpreg32[] =
-+ {
-+ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+#define nloc_fpreg32 2
-+#define nloc_fpregpair32 4
-+
-+/* $fr4 */
-+static const Dwarf_Op loc_fpreg[] =
-+ {
-+ { .atom = DW_OP_regx, .number = 72 },
-+ };
-+#define nloc_fpreg 1
-+
-+#if 0
-+/* The return value is a structure and is actually stored in stack space
-+ passed in a hidden argument by the caller. Address of the location is stored
-+ in %r28 before function call, but it may be changed by function. */
-+static const Dwarf_Op loc_aggregate[] =
-+ {
-+ { .atom = DW_OP_breg28 },
-+ };
-+#define nloc_aggregate 1
-+#endif
-+
-+static int
-+parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64)
-+{
-+ Dwarf_Word regsize = pa64 ? 8 : 4;
-+
-+ /* Start with the function's type, and get the DW_AT_type attribute,
-+ which is the type of the return value. */
-+
-+ Dwarf_Attribute attr_mem;
-+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
-+ if (attr == NULL)
-+ /* The function has no return value, like a `void' function in C. */
-+ return 0;
-+
-+ Dwarf_Die die_mem;
-+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
-+ int tag = dwarf_tag (typedie);
-+
-+ /* 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)
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+
-+ switch (tag)
-+ {
-+ case -1:
-+ return -1;
-+
-+ case DW_TAG_subrange_type:
-+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+ /* Fall through. */
-+
-+ case DW_TAG_base_type:
-+ case DW_TAG_enumeration_type:
-+ case DW_TAG_pointer_type:
-+ case DW_TAG_ptr_to_member_type:
-+ {
-+ Dwarf_Word size;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
-+ &attr_mem), &size) != 0)
-+ {
-+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+ size = 4;
-+ else
-+ return -1;
-+ }
-+ if (tag == DW_TAG_base_type)
-+ {
-+ Dwarf_Word encoding;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+ &attr_mem), &encoding) != 0)
-+ return -1;
-+
-+ if (encoding == DW_ATE_float)
-+ {
-+ if (pa64) {
-+ *locp = loc_fpreg;
-+ if (size <= 8)
-+ return nloc_fpreg;
-+ }
-+ else {
-+ *locp = loc_fpreg32;
-+ if (size <= 4)
-+ return nloc_fpreg32;
-+ else if (size <= 8)
-+ return nloc_fpregpair32;
-+ }
-+ goto aggregate;
-+ }
-+ }
-+ if (pa64)
-+ *locp = loc_intreg;
-+ else
-+ *locp = loc_intreg32;
-+ if (size <= regsize)
-+ return nloc_intreg;
-+ if (size <= 2 * regsize)
-+ return nloc_intregpair;
-+
-+ /* Else fall through. */
-+ }
-+
-+ case DW_TAG_structure_type:
-+ case DW_TAG_class_type:
-+ case DW_TAG_union_type:
-+ case DW_TAG_array_type:
-+ aggregate: {
-+ Dwarf_Word size;
-+ if (dwarf_aggregate_size (typedie, &size) != 0)
-+ return -1;
-+ if (pa64)
-+ *locp = loc_intreg;
-+ else
-+ *locp = loc_intreg32;
-+ if (size <= regsize)
-+ return nloc_intreg;
-+ if (size <= 2 * regsize)
-+ return nloc_intregpair;
-+#if 0
-+ /* there should be some way to know this location... But I do not see it. */
-+ *locp = loc_aggregate;
-+ return nloc_aggregate;
-+#endif
-+ /* fall through. */
-+ }
-+ }
-+
-+ /* XXX We don't have a good way to return specific errors from ebl calls.
-+ This value means we do not understand the type, but it is well-formed
-+ DWARF and might be valid. */
-+ return -2;
-+}
-+
-+int
-+parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ return parisc_return_value_location_ (functypedie, locp, 0);
-+}
-+
-+int
-+parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ return parisc_return_value_location_ (functypedie, locp, 1);
-+}
-+
-Index: elfutils-0.164/backends/parisc_symbol.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/parisc_symbol.c
-@@ -0,0 +1,112 @@
-+/* PA-RISC specific symbolic name handling.
-+ Copyright (C) 2002, 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND parisc_
-+#include "libebl_CPU.h"
-+
-+const char *
-+parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)),
-+ size_t len __attribute__ ((unused)))
-+{
-+ switch (segment)
-+ {
-+ case PT_PARISC_ARCHEXT:
-+ return "PARISC_ARCHEXT";
-+ case PT_PARISC_UNWIND:
-+ return "PARISC_UNWIND";
-+ default:
-+ break;
-+ }
-+ return NULL;
-+}
-+
-+/* Return symbolic representation of symbol type. */
-+const char *
-+parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)),
-+ size_t len __attribute__ ((unused)))
-+{
-+ if (symbol == STT_PARISC_MILLICODE)
-+ return "PARISC_MILLI";
-+ return NULL;
-+}
-+
-+/* Return symbolic representation of section type. */
-+const char *
-+parisc_section_type_name (int type,
-+ char *buf __attribute__ ((unused)),
-+ size_t len __attribute__ ((unused)))
-+{
-+ switch (type)
-+ {
-+ case SHT_PARISC_EXT:
-+ return "PARISC_EXT";
-+ case SHT_PARISC_UNWIND:
-+ return "PARISC_UNWIND";
-+ case SHT_PARISC_DOC:
-+ return "PARISC_DOC";
-+ }
-+
-+ return NULL;
-+}
-+
-+/* Check whether machine flags are valid. */
-+bool
-+parisc_machine_flag_check (GElf_Word flags)
-+{
-+ if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB |
-+ EF_PARISC_WIDE | EF_PARISC_NO_KABP |
-+ EF_PARISC_LAZYSWAP | EF_PARISC_ARCH))
-+ return 0;
-+
-+ GElf_Word arch = flags & EF_PARISC_ARCH;
-+
-+ return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) ||
-+ (arch == EFA_PARISC_2_0));
-+}
-+
-+/* Check for the simple reloc types. */
-+Elf_Type
-+parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+ switch (type)
-+ {
-+ case R_PARISC_DIR64:
-+ case R_PARISC_SECREL64:
-+ return ELF_T_XWORD;
-+ case R_PARISC_DIR32:
-+ case R_PARISC_SECREL32:
-+ return ELF_T_WORD;
-+ default:
-+ return ELF_T_NUM;
-+ }
-+}
-Index: elfutils-0.164/backends/libebl_parisc.h
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/libebl_parisc.h
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_HPPA_H
-+#define _LIBEBL_HPPA_H 1
-+
-+#include <libdw.h>
-+
-+extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.164/backends/Makefile.am
-===================================================================
---- elfutils-0.164.orig/backends/Makefile.am
-+++ elfutils-0.164/backends/Makefile.am
-@@ -33,11 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
-
-
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-- tilegx
-+ tilegx parisc
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
-- libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a
-+ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
-+ libebl_parisc_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -111,6 +112,9 @@ tilegx_SRCS = tilegx_init.c tilegx_symbo
- libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS)
- am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os)
-
-+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
-+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
-+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
-
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- @rm -f $(@:.so=.map)
-Index: elfutils-0.164/libelf/elf.h
-===================================================================
---- elfutils-0.164.orig/libelf/elf.h
-+++ elfutils-0.164/libelf/elf.h
-@@ -1912,16 +1912,24 @@ enum
- #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
- #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
- #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
-+#define R_PARISC_DPREL14WR 19
-+#define R_PARISC_DPREL14DR 20
- #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
- #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
- #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
- #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
- #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
-+#define R_PARISC_DLTIND14F 39
-+#define R_PARISC_SETBASE 40
- #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
-+#define R_PARISC_BASEREL21L 42
-+#define R_PARISC_BASEREL17R 43
-+#define R_PARISC_BASEREL14R 46
- #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
- #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
- #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
- #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
-+#define R_PARISC_PLTOFF14F 55
- #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
- #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
- #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
-@@ -1930,6 +1938,7 @@ enum
- #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
- #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
- #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
-+#define R_PARISC_PCREL22C 73
- #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
- #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
- #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
-@@ -1955,6 +1964,8 @@ enum
- #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
- #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
- #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
-+#define R_PARISC_BASEREL14WR 107
-+#define R_PARISC_BASEREL14DR 108
- #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
- #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
- #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/kfreebsd_path.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/kfreebsd_path.patch
deleted file mode 100644
index ba454ee77c..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/kfreebsd_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- elfutils/tests/run-native-test.sh.orig
-+++ elfutils/tests/run-native-test.sh
-@@ -78,6 +78,12 @@
- test $native -eq 0 || testrun "$@" -p $native > /dev/null
- }
-
-+# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does
-+# not give absolute paths due to sbuild's bind mounts (bug #570805)
-+# therefore the next two test programs are expected to fail with
-+# "cannot attach to process: Function not implemented".
-+[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
-+
- native_test ${abs_builddir}/allregs
- native_test ${abs_builddir}/funcretval
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.166/m68k_backend.diff
deleted file mode 100644
index d73855b601..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/m68k_backend.diff
+++ /dev/null
@@ -1,492 +0,0 @@
-From: Kurt Roeckx <kurt@roeckx.be>
-From: Thorsten Glaser <tg@mirbsd.de>
-Subject: m68k support
-
-Written by Kurt Roeckx, except for the retval support which was written
-by Thorsten Glaser
-
-
-Index: elfutils-0.164/backends/m68k_init.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/m68k_init.c
-@@ -0,0 +1,49 @@
-+/* Initialization of m68k specific backend library.
-+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+ This software is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ This softare is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this software; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+*/
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND m68k_
-+#define RELOC_PREFIX R_68K_
-+#include "libebl_CPU.h"
-+
-+/* This defines the common reloc hooks based on m68k_reloc.def. */
-+#include "common-reloc.c"
-+
-+
-+const char *
-+m68k_init (Elf *elf __attribute__ ((unused)),
-+ GElf_Half machine __attribute__ ((unused)),
-+ Ebl *eh,
-+ size_t ehlen)
-+{
-+ /* Check whether the Elf_BH object has a sufficent size. */
-+ if (ehlen < sizeof (Ebl))
-+ return NULL;
-+
-+ /* We handle it. */
-+ eh->name = "m68k";
-+ m68k_init_reloc (eh);
-+ HOOK (eh, reloc_simple_type);
-+ HOOK (eh, return_value_location);
-+ HOOK (eh, register_info);
-+
-+ return MODVERSION;
-+}
-Index: elfutils-0.164/backends/m68k_regs.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/m68k_regs.c
-@@ -0,0 +1,106 @@
-+/* Register names and numbers for m68k DWARF.
-+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+ This software is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ This software is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this software; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND m68k_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+m68k_register_info (Ebl *ebl __attribute__ ((unused)),
-+ int regno, char *name, size_t namelen,
-+ const char **prefix, const char **setname,
-+ int *bits, int *type)
-+{
-+ if (name == NULL)
-+ return 25;
-+
-+ if (regno < 0 || regno > 24 || namelen < 5)
-+ return -1;
-+
-+ *prefix = "%";
-+ *bits = 32;
-+ *type = (regno < 8 ? DW_ATE_signed
-+ : regno < 16 ? DW_ATE_address : DW_ATE_float);
-+
-+ if (regno < 8)
-+ {
-+ *setname = "integer";
-+ }
-+ else if (regno < 16)
-+ {
-+ *setname = "address";
-+ }
-+ else if (regno < 24)
-+ {
-+ *setname = "FPU";
-+ }
-+ else
-+ {
-+ *setname = "address";
-+ *type = DW_ATE_address;
-+ }
-+
-+ switch (regno)
-+ {
-+ case 0 ... 7:
-+ name[0] = 'd';
-+ name[1] = regno + '0';
-+ namelen = 2;
-+ break;
-+
-+ case 8 ... 13:
-+ name[0] = 'a';
-+ name[1] = regno - 8 + '0';
-+ namelen = 2;
-+ break;
-+
-+ case 14:
-+ name[0] = 'f';
-+ name[1] = 'p';
-+ namelen = 2;
-+ break;
-+
-+ case 15:
-+ name[0] = 's';
-+ name[1] = 'p';
-+ namelen = 2;
-+ break;
-+
-+ case 16 ... 23:
-+ name[0] = 'f';
-+ name[1] = 'p';
-+ name[2] = regno - 16 + '0';
-+ namelen = 3;
-+ break;
-+
-+ case 24:
-+ name[0] = 'p';
-+ name[1] = 'c';
-+ namelen = 2;
-+ }
-+
-+ name[namelen++] = '\0';
-+ return namelen;
-+}
-+
-Index: elfutils-0.164/backends/m68k_reloc.def
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/m68k_reloc.def
-@@ -0,0 +1,45 @@
-+/* List the relocation types for m68k. -*- C -*-
-+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+ This software is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ This software is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this software; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+*/
-+
-+/* NAME, REL|EXEC|DYN */
-+
-+RELOC_TYPE (NONE, 0)
-+RELOC_TYPE (32, REL|EXEC|DYN)
-+RELOC_TYPE (16, REL)
-+RELOC_TYPE (8, REL)
-+RELOC_TYPE (PC32, REL|EXEC|DYN)
-+RELOC_TYPE (PC16, REL)
-+RELOC_TYPE (PC8, REL)
-+RELOC_TYPE (GOT32, REL)
-+RELOC_TYPE (GOT16, REL)
-+RELOC_TYPE (GOT8, REL)
-+RELOC_TYPE (GOT32O, REL)
-+RELOC_TYPE (GOT16O, REL)
-+RELOC_TYPE (GOT8O, REL)
-+RELOC_TYPE (PLT32, REL)
-+RELOC_TYPE (PLT16, REL)
-+RELOC_TYPE (PLT8, REL)
-+RELOC_TYPE (PLT32O, REL)
-+RELOC_TYPE (PLT16O, REL)
-+RELOC_TYPE (PLT8O, REL)
-+RELOC_TYPE (COPY, EXEC)
-+RELOC_TYPE (GLOB_DAT, EXEC|DYN)
-+RELOC_TYPE (JMP_SLOT, EXEC|DYN)
-+RELOC_TYPE (RELATIVE, EXEC|DYN)
-+RELOC_TYPE (GNU_VTINHERIT, REL)
-+RELOC_TYPE (GNU_VTENTRY, REL)
-+
-Index: elfutils-0.164/libelf/elf.h
-===================================================================
---- elfutils-0.164.orig/libelf/elf.h
-+++ elfutils-0.164/libelf/elf.h
-@@ -1158,6 +1158,9 @@ typedef struct
- #define R_68K_GLOB_DAT 20 /* Create GOT entry */
- #define R_68K_JMP_SLOT 21 /* Create PLT entry */
- #define R_68K_RELATIVE 22 /* Adjust by program base */
-+/* The next 2 are GNU extensions to enable C++ vtable garbage collection. */
-+#define R_68K_GNU_VTINHERIT 23
-+#define R_68K_GNU_VTENTRY 24
- #define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */
- #define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */
- #define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */
-Index: elfutils-0.164/backends/Makefile.am
-===================================================================
---- elfutils-0.164.orig/backends/Makefile.am
-+++ elfutils-0.164/backends/Makefile.am
-@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
-
-
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-- tilegx parisc mips
-+ tilegx parisc mips m68k
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
- libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
-- libebl_parisc_pic.a libebl_mips_pic.a
-+ libebl_parisc_pic.a libebl_mips_pic.a libebl_m68k_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -120,6 +120,10 @@ mips_SRCS = mips_init.c mips_symbol.c mi
- libebl_mips_pic_a_SOURCES = $(mips_SRCS)
- am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
-
-+m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c m68k_retval.c
-+libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
-+am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
-+
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- @rm -f $(@:.so=.map)
- $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
-Index: elfutils-0.164/backends/m68k_symbol.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/m68k_symbol.c
-@@ -0,0 +1,43 @@
-+/* m68k specific symbolic name handling.
-+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+ This software is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ This software distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this software; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+*/
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND m68k_
-+#include "libebl_CPU.h"
-+
-+/* Check for the simple reloc types. */
-+Elf_Type
-+m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+ switch (type)
-+ {
-+ case R_68K_32:
-+ return ELF_T_SWORD;
-+ case R_68K_16:
-+ return ELF_T_HALF;
-+ case R_68K_8:
-+ return ELF_T_BYTE;
-+ default:
-+ return ELF_T_NUM;
-+ }
-+}
-Index: elfutils-0.164/backends/m68k_retval.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/m68k_retval.c
-@@ -0,0 +1,172 @@
-+/* Function return value location for Linux/m68k ABI.
-+ Copyright (C) 2005-2010 Red Hat, Inc.
-+ Copyright (c) 2011 Thorsten Glaser, Debian.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <assert.h>
-+#include <dwarf.h>
-+
-+#define BACKEND m68k_
-+#include "libebl_CPU.h"
-+
-+
-+/* %d0, or pair %d0, %d1, or %a0 */
-+static const Dwarf_Op loc_intreg[] =
-+ {
-+ { .atom = DW_OP_reg0 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_reg1 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+static const Dwarf_Op loc_ptrreg[] =
-+ {
-+ { .atom = DW_OP_reg8 },
-+ };
-+#define nloc_intreg 1
-+#define nloc_intregpair 4
-+#define nloc_ptrreg 1
-+
-+/* %f0 */
-+static const Dwarf_Op loc_fpreg[] =
-+ {
-+ { .atom = DW_OP_reg16 }
-+ };
-+#define nloc_fpreg 1
-+
-+/* Structures are a bit more complicated - small structures are returned
-+ in %d0 / %d1 (-freg-struct-return which is enabled by default), large
-+ structures use %a1 (in constrast to the SYSV psABI which says %a0) as
-+ reentrant storage space indicator. */
-+static const Dwarf_Op loc_aggregate[] =
-+ {
-+ { .atom = DW_OP_breg9, .number = 0 }
-+ };
-+#define nloc_aggregate 1
-+
-+int
-+m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ Dwarf_Word size;
-+
-+ /* Start with the function's type, and get the DW_AT_type attribute,
-+ which is the type of the return value. */
-+
-+ Dwarf_Attribute attr_mem;
-+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type,
-+ &attr_mem);
-+ if (attr == NULL)
-+ /* The function has no return value, like a `void' function in C. */
-+ return 0;
-+
-+ Dwarf_Die die_mem;
-+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
-+ int tag = dwarf_tag (typedie);
-+
-+ /* 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)
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+
-+ switch (tag)
-+ {
-+ case -1:
-+ return -1;
-+
-+ case DW_TAG_subrange_type:
-+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+ /* Fall through. */
-+
-+ case DW_TAG_base_type:
-+ case DW_TAG_enumeration_type:
-+ case DW_TAG_pointer_type:
-+ case DW_TAG_ptr_to_member_type:
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
-+ &attr_mem), &size) != 0)
-+ {
-+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+ size = 4;
-+ else
-+ return -1;
-+ }
-+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+ {
-+ *locp = loc_ptrreg;
-+ return nloc_ptrreg;
-+ }
-+ if (tag == DW_TAG_base_type)
-+ {
-+ Dwarf_Word encoding;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+ &attr_mem),
-+ &encoding) != 0)
-+ return -1;
-+ if (encoding == DW_ATE_float)
-+ {
-+ /* XXX really 10? */
-+ if (size > 10)
-+ return -2;
-+ *locp = loc_fpreg;
-+ return nloc_fpreg;
-+ }
-+ }
-+ if (size <= 8)
-+ {
-+ intreg:
-+ /* XXX check endianness of dword pair, int64 vs aggregate */
-+ *locp = loc_intreg;
-+ return size <= 4 ? nloc_intreg : nloc_intregpair;
-+ }
-+
-+ aggregate:
-+ *locp = loc_aggregate;
-+ return nloc_aggregate;
-+
-+ case DW_TAG_structure_type:
-+ case DW_TAG_class_type:
-+ case DW_TAG_union_type:
-+ case DW_TAG_array_type:
-+ if (dwarf_aggregate_size (typedie, &size) == 0
-+ && size > 0 && size <= 8)
-+ /* not accurate for a struct whose only member is a float */
-+ goto intreg;
-+ goto aggregate;
-+ }
-+
-+ /* XXX We don't have a good way to return specific errors from ebl calls.
-+ This value means we do not understand the type, but it is well-formed
-+ DWARF and might be valid. */
-+ return -2;
-+}
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.166/mips_backend.diff
deleted file mode 100644
index de1237be09..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/mips_backend.diff
+++ /dev/null
@@ -1,711 +0,0 @@
-Index: elfutils-0.164/backends/mips_init.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/mips_init.c
-@@ -0,0 +1,59 @@
-+/* Initialization of mips specific backend library.
-+ Copyright (C) 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND mips_
-+#define RELOC_PREFIX R_MIPS_
-+#include "libebl_CPU.h"
-+
-+/* This defines the common reloc hooks based on mips_reloc.def. */
-+#include "common-reloc.c"
-+
-+const char *
-+mips_init (Elf *elf __attribute__ ((unused)),
-+ GElf_Half machine __attribute__ ((unused)),
-+ Ebl *eh,
-+ size_t ehlen)
-+{
-+ /* Check whether the Elf_BH object has a sufficent size. */
-+ if (ehlen < sizeof (Ebl))
-+ return NULL;
-+
-+ /* We handle it. */
-+ if (machine == EM_MIPS)
-+ eh->name = "MIPS R3000 big-endian";
-+ else if (machine == EM_MIPS_RS3_LE)
-+ eh->name = "MIPS R3000 little-endian";
-+
-+ mips_init_reloc (eh);
-+ HOOK (eh, reloc_simple_type);
-+ HOOK (eh, return_value_location);
-+ HOOK (eh, register_info);
-+
-+ return MODVERSION;
-+}
-Index: elfutils-0.164/backends/mips_regs.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/mips_regs.c
-@@ -0,0 +1,104 @@
-+/* Register names and numbers for MIPS DWARF.
-+ Copyright (C) 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND mips_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+mips_register_info (Ebl *ebl __attribute__((unused)),
-+ int regno, char *name, size_t namelen,
-+ const char **prefix, const char **setname,
-+ int *bits, int *type)
-+{
-+ if (name == NULL)
-+ return 66;
-+
-+ if (regno < 0 || regno > 65 || namelen < 4)
-+ return -1;
-+
-+ *prefix = "$";
-+
-+ if (regno < 32)
-+ {
-+ *setname = "integer";
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ if (regno < 32 + 10)
-+ {
-+ name[0] = regno + '0';
-+ namelen = 1;
-+ }
-+ else
-+ {
-+ name[0] = (regno / 10) + '0';
-+ name[1] = (regno % 10) + '0';
-+ namelen = 2;
-+ }
-+ }
-+ else if (regno < 64)
-+ {
-+ *setname = "FPU";
-+ *type = DW_ATE_float;
-+ *bits = 32;
-+ name[0] = 'f';
-+ if (regno < 32 + 10)
-+ {
-+ name[1] = (regno - 32) + '0';
-+ namelen = 2;
-+ }
-+ else
-+ {
-+ name[1] = (regno - 32) / 10 + '0';
-+ name[2] = (regno - 32) % 10 + '0';
-+ namelen = 3;
-+ }
-+ }
-+ else if (regno == 64)
-+ {
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ name[0] = 'h';
-+ name[1] = 'i';
-+ namelen = 2;
-+ }
-+ else
-+ {
-+ *type = DW_ATE_signed;
-+ *bits = 32;
-+ name[0] = 'l';
-+ name[1] = 'o';
-+ namelen = 2;
-+ }
-+
-+ name[namelen++] = '\0';
-+ return namelen;
-+}
-Index: elfutils-0.164/backends/mips_reloc.def
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/mips_reloc.def
-@@ -0,0 +1,79 @@
-+/* List the relocation types for mips. -*- C -*-
-+ Copyright (C) 2006 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+/* NAME, REL|EXEC|DYN */
-+
-+RELOC_TYPE (NONE, 0)
-+RELOC_TYPE (16, 0)
-+RELOC_TYPE (32, 0)
-+RELOC_TYPE (REL32, 0)
-+RELOC_TYPE (26, 0)
-+RELOC_TYPE (HI16, 0)
-+RELOC_TYPE (LO16, 0)
-+RELOC_TYPE (GPREL16, 0)
-+RELOC_TYPE (LITERAL, 0)
-+RELOC_TYPE (GOT16, 0)
-+RELOC_TYPE (PC16, 0)
-+RELOC_TYPE (CALL16, 0)
-+RELOC_TYPE (GPREL32, 0)
-+
-+RELOC_TYPE (SHIFT5, 0)
-+RELOC_TYPE (SHIFT6, 0)
-+RELOC_TYPE (64, 0)
-+RELOC_TYPE (GOT_DISP, 0)
-+RELOC_TYPE (GOT_PAGE, 0)
-+RELOC_TYPE (GOT_OFST, 0)
-+RELOC_TYPE (GOT_HI16, 0)
-+RELOC_TYPE (GOT_LO16, 0)
-+RELOC_TYPE (SUB, 0)
-+RELOC_TYPE (INSERT_A, 0)
-+RELOC_TYPE (INSERT_B, 0)
-+RELOC_TYPE (DELETE, 0)
-+RELOC_TYPE (HIGHER, 0)
-+RELOC_TYPE (HIGHEST, 0)
-+RELOC_TYPE (CALL_HI16, 0)
-+RELOC_TYPE (CALL_LO16, 0)
-+RELOC_TYPE (SCN_DISP, 0)
-+RELOC_TYPE (REL16, 0)
-+RELOC_TYPE (ADD_IMMEDIATE, 0)
-+RELOC_TYPE (PJUMP, 0)
-+RELOC_TYPE (RELGOT, 0)
-+RELOC_TYPE (JALR, 0)
-+RELOC_TYPE (TLS_DTPMOD32, 0)
-+RELOC_TYPE (TLS_DTPREL32, 0)
-+RELOC_TYPE (TLS_DTPMOD64, 0)
-+RELOC_TYPE (TLS_DTPREL64, 0)
-+RELOC_TYPE (TLS_GD, 0)
-+RELOC_TYPE (TLS_LDM, 0)
-+RELOC_TYPE (TLS_DTPREL_HI16, 0)
-+RELOC_TYPE (TLS_DTPREL_LO16, 0)
-+RELOC_TYPE (TLS_GOTTPREL, 0)
-+RELOC_TYPE (TLS_TPREL32, 0)
-+RELOC_TYPE (TLS_TPREL64, 0)
-+RELOC_TYPE (TLS_TPREL_HI16, 0)
-+RELOC_TYPE (TLS_TPREL_LO16, 0)
-+
-+#define NO_COPY_RELOC 1
-+#define NO_RELATIVE_RELOC 1
-Index: elfutils-0.164/backends/mips_retval.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/mips_retval.c
-@@ -0,0 +1,321 @@
-+/* Function return value location for Linux/mips ABI.
-+ Copyright (C) 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <assert.h>
-+#include <dwarf.h>
-+#include <elf.h>
-+
-+#include "../libebl/libeblP.h"
-+#include "../libdw/libdwP.h"
-+
-+#define BACKEND mips_
-+#include "libebl_CPU.h"
-+
-+/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
-+#define EF_MIPS_ABI 0x0000F000
-+
-+/* The original o32 abi. */
-+#define E_MIPS_ABI_O32 0x00001000
-+
-+/* O32 extended to work on 64 bit architectures */
-+#define E_MIPS_ABI_O64 0x00002000
-+
-+/* EABI in 32 bit mode */
-+#define E_MIPS_ABI_EABI32 0x00003000
-+
-+/* EABI in 64 bit mode */
-+#define E_MIPS_ABI_EABI64 0x00004000
-+
-+/* All the possible MIPS ABIs. */
-+enum mips_abi
-+ {
-+ MIPS_ABI_UNKNOWN = 0,
-+ MIPS_ABI_N32,
-+ MIPS_ABI_O32,
-+ MIPS_ABI_N64,
-+ MIPS_ABI_O64,
-+ MIPS_ABI_EABI32,
-+ MIPS_ABI_EABI64,
-+ MIPS_ABI_LAST
-+ };
-+
-+/* Find the mips ABI of the current file */
-+enum mips_abi find_mips_abi(Elf *elf)
-+{
-+ GElf_Ehdr ehdr_mem;
-+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+
-+ if (ehdr == NULL)
-+ return MIPS_ABI_LAST;
-+
-+ GElf_Word elf_flags = ehdr->e_flags;
-+
-+ /* Check elf_flags to see if it specifies the ABI being used. */
-+ switch ((elf_flags & EF_MIPS_ABI))
-+ {
-+ case E_MIPS_ABI_O32:
-+ return MIPS_ABI_O32;
-+ case E_MIPS_ABI_O64:
-+ return MIPS_ABI_O64;
-+ case E_MIPS_ABI_EABI32:
-+ return MIPS_ABI_EABI32;
-+ case E_MIPS_ABI_EABI64:
-+ return MIPS_ABI_EABI64;
-+ default:
-+ if ((elf_flags & EF_MIPS_ABI2))
-+ return MIPS_ABI_N32;
-+ }
-+
-+ /* GCC creates a pseudo-section whose name describes the ABI. */
-+ size_t shstrndx;
-+ if (elf_getshdrstrndx (elf, &shstrndx) < 0)
-+ return MIPS_ABI_LAST;
-+
-+ const char *name;
-+ Elf_Scn *scn = NULL;
-+ while ((scn = elf_nextscn (elf, scn)) != NULL)
-+ {
-+ GElf_Shdr shdr_mem;
-+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
-+ if (shdr == NULL)
-+ return MIPS_ABI_LAST;
-+
-+ name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: "";
-+ if (strncmp (name, ".mdebug.", 8) != 0)
-+ continue;
-+
-+ if (strcmp (name, ".mdebug.abi32") == 0)
-+ return MIPS_ABI_O32;
-+ else if (strcmp (name, ".mdebug.abiN32") == 0)
-+ return MIPS_ABI_N32;
-+ else if (strcmp (name, ".mdebug.abi64") == 0)
-+ return MIPS_ABI_N64;
-+ else if (strcmp (name, ".mdebug.abiO64") == 0)
-+ return MIPS_ABI_O64;
-+ else if (strcmp (name, ".mdebug.eabi32") == 0)
-+ return MIPS_ABI_EABI32;
-+ else if (strcmp (name, ".mdebug.eabi64") == 0)
-+ return MIPS_ABI_EABI64;
-+ else
-+ return MIPS_ABI_UNKNOWN;
-+ }
-+
-+ return MIPS_ABI_UNKNOWN;
-+}
-+
-+unsigned int
-+mips_abi_regsize (enum mips_abi abi)
-+{
-+ switch (abi)
-+ {
-+ case MIPS_ABI_EABI32:
-+ case MIPS_ABI_O32:
-+ return 4;
-+ case MIPS_ABI_N32:
-+ case MIPS_ABI_N64:
-+ case MIPS_ABI_O64:
-+ case MIPS_ABI_EABI64:
-+ return 8;
-+ case MIPS_ABI_UNKNOWN:
-+ case MIPS_ABI_LAST:
-+ default:
-+ return 0;
-+ }
-+}
-+
-+
-+/* $v0 or pair $v0, $v1 */
-+static const Dwarf_Op loc_intreg_o32[] =
-+ {
-+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+
-+static const Dwarf_Op loc_intreg[] =
-+ {
-+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 },
-+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 },
-+ };
-+#define nloc_intreg 1
-+#define nloc_intregpair 4
-+
-+/* $f0 (float), or pair $f0, $f1 (double).
-+ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */
-+static const Dwarf_Op loc_fpreg_o32[] =
-+ {
-+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 },
-+ { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 },
-+ };
-+
-+/* $f0, or pair $f0, $f2. */
-+static const Dwarf_Op loc_fpreg[] =
-+ {
-+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 },
-+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 },
-+ };
-+#define nloc_fpreg 1
-+#define nloc_fpregpair 4
-+#define nloc_fpregquad 8
-+
-+/* 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 $v0. */
-+static const Dwarf_Op loc_aggregate[] =
-+ {
-+ { .atom = DW_OP_breg2, .number = 0 }
-+ };
-+#define nloc_aggregate 1
-+
-+int
-+mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+ /* First find the ABI used by the elf object */
-+ enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);
-+
-+ /* Something went seriously wrong while trying to figure out the ABI */
-+ if (abi == MIPS_ABI_LAST)
-+ return -1;
-+
-+ /* We couldn't identify the ABI, but the file seems valid */
-+ if (abi == MIPS_ABI_UNKNOWN)
-+ return -2;
-+
-+ /* Can't handle EABI variants */
-+ if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64))
-+ return -2;
-+
-+ unsigned int regsize = mips_abi_regsize (abi);
-+ if (!regsize)
-+ return -2;
-+
-+ /* Start with the function's type, and get the DW_AT_type attribute,
-+ which is the type of the return value. */
-+
-+ Dwarf_Attribute attr_mem;
-+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
-+ if (attr == NULL)
-+ /* The function has no return value, like a `void' function in C. */
-+ return 0;
-+
-+ Dwarf_Die die_mem;
-+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
-+ int tag = dwarf_tag (typedie);
-+
-+ /* 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)
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+
-+ switch (tag)
-+ {
-+ case -1:
-+ return -1;
-+
-+ case DW_TAG_subrange_type:
-+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
-+ {
-+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+ typedie = dwarf_formref_die (attr, &die_mem);
-+ tag = dwarf_tag (typedie);
-+ }
-+ /* Fall through. */
-+
-+ case DW_TAG_base_type:
-+ case DW_TAG_enumeration_type:
-+ case DW_TAG_pointer_type:
-+ case DW_TAG_ptr_to_member_type:
-+ {
-+ Dwarf_Word size;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
-+ &attr_mem), &size) != 0)
-+ {
-+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+ size = regsize;
-+ else
-+ return -1;
-+ }
-+ if (tag == DW_TAG_base_type)
-+ {
-+ Dwarf_Word encoding;
-+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+ &attr_mem), &encoding) != 0)
-+ return -1;
-+
-+#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc))
-+
-+ if (encoding == DW_ATE_float)
-+ {
-+ *locp = ABI_LOC(loc_fpreg, regsize);
-+ if (size <= regsize)
-+ return nloc_fpreg;
-+
-+ if (size <= 2*regsize)
-+ return nloc_fpregpair;
-+
-+ if (size <= 4*regsize && abi == MIPS_ABI_O32)
-+ return nloc_fpregquad;
-+
-+ goto aggregate;
-+ }
-+ }
-+ *locp = ABI_LOC(loc_intreg, regsize);
-+ if (size <= regsize)
-+ return nloc_intreg;
-+ if (size <= 2*regsize)
-+ return nloc_intregpair;
-+
-+ /* Else fall through. Shouldn't happen though (at least with gcc) */
-+ }
-+
-+ case DW_TAG_structure_type:
-+ case DW_TAG_class_type:
-+ case DW_TAG_union_type:
-+ case DW_TAG_array_type:
-+ aggregate:
-+ /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
-+ if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
-+ return -2;
-+
-+ *locp = loc_aggregate;
-+ return nloc_aggregate;
-+ }
-+
-+ /* XXX We don't have a good way to return specific errors from ebl calls.
-+ This value means we do not understand the type, but it is well-formed
-+ DWARF and might be valid. */
-+ return -2;
-+}
-Index: elfutils-0.164/backends/mips_symbol.c
-===================================================================
---- /dev/null
-+++ elfutils-0.164/backends/mips_symbol.c
-@@ -0,0 +1,52 @@
-+/* MIPS specific symbolic name handling.
-+ Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
-+ This file is part of Red Hat elfutils.
-+ Written by Jakub Jelinek <jakub@redhat.com>, 2002.
-+
-+ Red Hat elfutils is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; version 2 of the License.
-+
-+ Red Hat 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 a copy of the GNU General Public License along
-+ with Red Hat elfutils; if not, write to the Free Software Foundation,
-+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+ Red Hat elfutils is an included package of the Open Invention Network.
-+ An included package of the Open Invention Network is a package for which
-+ Open Invention Network licensees cross-license their patents. No patent
-+ license is granted, either expressly or impliedly, by designation as an
-+ included package. Should you wish to participate in the Open Invention
-+ Network licensing program, please visit www.openinventionnetwork.com
-+ <http://www.openinventionnetwork.com>. */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND mips_
-+#include "libebl_CPU.h"
-+
-+/* Check for the simple reloc types. */
-+Elf_Type
-+mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+ switch (type)
-+ {
-+ case R_MIPS_16:
-+ return ELF_T_HALF;
-+ case R_MIPS_32:
-+ return ELF_T_WORD;
-+ case R_MIPS_64:
-+ return ELF_T_XWORD;
-+ default:
-+ return ELF_T_NUM;
-+ }
-+}
-Index: elfutils-0.164/libebl/eblopenbackend.c
-===================================================================
---- elfutils-0.164.orig/libebl/eblopenbackend.c
-+++ elfutils-0.164/libebl/eblopenbackend.c
-@@ -71,6 +71,8 @@ static const struct
- { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
- { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
- { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
-+ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
-+ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
-
- { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
- { "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 },
-Index: elfutils-0.164/backends/common-reloc.c
-===================================================================
---- elfutils-0.164.orig/backends/common-reloc.c
-+++ elfutils-0.164/backends/common-reloc.c
-@@ -125,11 +125,13 @@ EBLHOOK(reloc_valid_use) (Elf *elf, int
- }
-
-
-+#ifndef NO_COPY_RELOC
- bool
- EBLHOOK(copy_reloc_p) (int reloc)
- {
- return reloc == R_TYPE (COPY);
- }
-+#endif
-
- bool
- EBLHOOK(none_reloc_p) (int reloc)
-@@ -151,7 +153,9 @@ EBLHOOK(init_reloc) (Ebl *ebl)
- ebl->reloc_type_name = EBLHOOK(reloc_type_name);
- ebl->reloc_type_check = EBLHOOK(reloc_type_check);
- ebl->reloc_valid_use = EBLHOOK(reloc_valid_use);
-+#ifndef NO_COPY_RELOC
- ebl->copy_reloc_p = EBLHOOK(copy_reloc_p);
-+#endif
- ebl->none_reloc_p = EBLHOOK(none_reloc_p);
- #ifndef NO_RELATIVE_RELOC
- ebl->relative_reloc_p = EBLHOOK(relative_reloc_p);
-Index: elfutils-0.164/backends/Makefile.am
-===================================================================
---- elfutils-0.164.orig/backends/Makefile.am
-+++ elfutils-0.164/backends/Makefile.am
-@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
-
-
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-- tilegx parisc
-+ tilegx parisc mips
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
- libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
-- libebl_parisc_pic.a
-+ libebl_parisc_pic.a libebl_mips_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -116,6 +116,10 @@ parisc_SRCS = parisc_init.c parisc_symbo
- libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
- am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
-
-+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
-+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
-+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
-+
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- @rm -f $(@:.so=.map)
- $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/mips_readelf_w.patch
deleted file mode 100644
index 930d6f664e..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/mips_readelf_w.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Kurt Roeckx <kurt@roeckx.be>
-Subject: Make readelf -w output debug information on mips
-Bug-Debian: http://bugs.debian.org/662041
-Forwarded: not-needed
-
-Upstreams wants a change where this is handled by a hook that needs
-to be filled in by the backend for the arch.
-
-Index: elfutils-0.164/src/readelf.c
-===================================================================
---- elfutils-0.164.orig/src/readelf.c
-+++ elfutils-0.164/src/readelf.c
-@@ -8218,7 +8218,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *
- GElf_Shdr shdr_mem;
- GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
-
-- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
-+ if (shdr != NULL && (
-+ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
- {
- static const struct
- {
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/shadow.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/shadow.patch
deleted file mode 100644
index d31961f94f..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/shadow.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Fix control path where we have str as uninitialized string
-
-| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: In function 'i386_disasm':
-| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized]
-| memcpy (buf + bufcnt, _str, _len); \
-| ^
-| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: note: 'str' was declared here
-| const char *str;
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: elfutils-0.164/libcpu/i386_disasm.c
-===================================================================
---- elfutils-0.164.orig/libcpu/i386_disasm.c
-+++ elfutils-0.164/libcpu/i386_disasm.c
-@@ -821,6 +821,7 @@ i386_disasm (const uint8_t **startp, con
- }
-
- default:
-+ str = "";
- assert (! "INVALID not handled");
- }
- }
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.166/testsuite-ignore-elflint.diff
deleted file mode 100644
index eae5796de3..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/testsuite-ignore-elflint.diff
+++ /dev/null
@@ -1,39 +0,0 @@
-On many architectures this test fails because binaries/libs produced by
-binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.
-
-So we run the tests on all archs to see what breaks, but if it breaks we ignore
-the result (exitcode 77 means: this test was skipped).
-
-Index: elfutils-0.156/tests/run-elflint-self.sh
-===================================================================
---- elfutils-0.156.orig/tests/run-elflint-self.sh 2013-07-28 14:35:36.000000000 +0200
-+++ elfutils-0.156/tests/run-elflint-self.sh 2013-07-28 14:36:10.000000000 +0200
-@@ -18,4 +18,4 @@
-
- . $srcdir/test-subr.sh
-
--testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
-+testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
-Index: elfutils-0.156/tests/test-subr.sh
-===================================================================
---- elfutils-0.156.orig/tests/test-subr.sh 2013-07-28 14:35:36.000000000 +0200
-+++ elfutils-0.156/tests/test-subr.sh 2013-07-28 14:35:36.000000000 +0200
-@@ -149,3 +149,18 @@
- # Only exit if something failed
- if test $exit_status != 0; then exit $exit_status; fi
- }
-+
-+# Same as testrun_on_self(), but skip on failure.
-+testrun_on_self_skip()
-+{
-+ exit_status=0
-+
-+ for file in $self_test_files; do
-+ testrun $* $file \
-+ || { echo "*** failure in $* $file"; exit_status=77; }
-+ done
-+
-+ # Only exit if something failed
-+ if test $exit_status != 0; then exit $exit_status; fi
-+}
-+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch
deleted file mode 100644
index 62999985cc..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-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(-)
-
-Index: elfutils-0.166/configure.ac
-===================================================================
---- elfutils-0.166.orig/configure.ac
-+++ elfutils-0.166/configure.ac
-@@ -79,6 +79,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
-@@ -347,18 +355,13 @@ AC_LINK_IFELSE(
- )
-
- dnl If our libc doesn't provide argp, then test for libargp
--if test "$libc_has_argp" = "false" ; then
-- AC_MSG_WARN("libc does not have argp")
-- AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
--
-- if test "$have_argp" = "false"; then
-- AC_MSG_ERROR("no libargp found")
-- else
-- argp_LDADD="-largp"
-- fi
--else
-- argp_LDADD=""
--fi
-+AS_IF([test "x$libc_has_argp" = "xfalse"],
-+ [AC_MSG_WARN("libc does not have argp")
-+ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true" argp_LDADD="-largp"], [have_argp="false"])], [argp_LDADD=""])
-+
-+AS_IF([test "x$libc_has_argp" = "xfalse" -a "x$have_argp" = "xfalse"],
-+ AC_CHECK_LIB([uargp], [argp_parse], [have_uargp="true" argp_LDADD="-luargp"], [have_uargp="false"])], [argp_LDADD=""])
-+
- AC_SUBST([argp_LDADD])
-
- dnl The directories with content.
-Index: elfutils-0.166/libcpu/Makefile.am
-===================================================================
---- elfutils-0.166.orig/libcpu/Makefile.am
-+++ elfutils-0.166/libcpu/Makefile.am
-@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3
- i386_lex.o: i386_parse.h
- i386_gendis_LDADD = $(libeu) -lm
-
-+if USE_UCLIBC
-+i386_gendis_LDADD += -lintl
-+endif
-+
- i386_parse.h: i386_parse.c ;
-
- EXTRA_DIST = defs/i386
-Index: elfutils-0.166/libdw/Makefile.am
-===================================================================
---- elfutils-0.166.orig/libdw/Makefile.am
-+++ elfutils-0.166/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
-+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 l
- -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
- -Wl,--version-script,$<,--no-undefined \
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
-- -ldl -lz $(argp_LDADD) $(zip_LIBS)
-+ -ldl -lz $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
- @$(textrel_check)
- $(AM_V_at)ln -fs $@ $@.$(VERSION)
-
-Index: elfutils-0.166/libelf/Makefile.am
-===================================================================
---- elfutils-0.166.orig/libelf/Makefile.am
-+++ elfutils-0.166/libelf/Makefile.am
-@@ -96,6 +96,11 @@ libelf_pic_a_SOURCES =
- am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
-
- libelf_so_LDLIBS = -lz
-+
-+if USE_UCLIBC
-+libelf_so_LDLIBS += -lintl
-+endif
-+
- if USE_LOCKS
- libelf_so_LDLIBS += -lpthread
- endif
diff --git a/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch b/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
deleted file mode 100644
index f861e8990e..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Fix elf_cvt_gunhash if dest and src are same.
-
-Upstream-Status: Pending
-
-The 'dest' and 'src' can be same, we need to save the value of src32[2]
-before swaping it.
-
-Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com>
-diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
-index 6faf113..04d9ca1 100644
---- a/libelf/gnuhash_xlate.h
-+++ b/libelf/gnuhash_xlate.h
-@@ -40,6 +40,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
- words. We must detangle them here. */
- 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/dso-link-change.patch b/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch
deleted file mode 100644
index d0cd3ed6f9..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-
-# This patch makes the link to the dependencies of libdw explicit, as recent
-# ld no longer implicitly links them. See
-# http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html as
-# a similar example of the error message you can encounter without this patch,
-# and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and
-# https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for more
-# details.
-
---- elfutils-0.148.orig/src/Makefile.am
-+++ elfutils-0.148/src/Makefile.am
-@@ -86,7 +86,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l
- libelf = ../libelf/libelf.a
- else
- libasm = ../libasm/libasm.so
--libdw = ../libdw/libdw.so
-+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
- libelf = ../libelf/libelf.so
- endif
- libebl = ../libebl/libebl.a
---- elfutils-0.148.orig/tests/Makefile.am
-+++ elfutils-0.148/tests/Makefile.am
-@@ -172,7 +172,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l
- libelf = ../libelf/libelf.a
- libasm = ../libasm/libasm.a
- else
--libdw = ../libdw/libdw.so
-+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
- libelf = ../libelf/libelf.so
- libasm = ../libasm/libasm.so
- endif
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
deleted file mode 100644
index 6080c179fa..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ /dev/null
@@ -1,91 +0,0 @@
-SUMMARY = "Utilities and libraries for handling compiled object files"
-HOMEPAGE = "https://fedorahosted.org/elfutils"
-SECTION = "base"
-LICENSE = "(GPL-2+ & Elfutils-Exception)"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3\
- file://EXCEPTION;md5=570adcb0c1218ab57f2249c67d0ce417"
-DEPENDS = "libtool bzip2 zlib virtual/libintl"
-
-PR = "r11"
-
-SRC_URI = "https://fedorahosted.org/releases/e/l/${BPN}/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "a0bed1130135f17ad27533b0034dba8d"
-SRC_URI[sha256sum] = "8aebfa4a745db21cf5429c9541fe482729b62efc7e53e9110151b4169fe887da"
-
-# pick the patch from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.148-1.debian.tar.gz
-
-SRC_URI += "\
- file://redhat-portability.diff \
- file://redhat-robustify.diff \
- file://hppa_backend.diff \
- file://arm_backend.diff \
- file://mips_backend.diff \
- file://m68k_backend.diff \
- file://testsuite-ignore-elflint.diff \
- file://elf_additions.diff \
- file://elfutils-fsize.patch \
- file://remove-unused.patch \
- file://fix_for_gcc-4.7.patch \
- file://dso-link-change.patch \
- file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
- file://elfutils-ar-c-fix-num-passed-to-memset.patch \
- file://Fix_elf_cvt_gunhash.patch \
- file://elf_begin.c-CVE-2014-9447-fix.patch \
- file://fix-build-gcc-4.8.patch \
- file://gcc6.patch \
-"
-# Only apply when building uclibc based target recipe
-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
-# along with the do_configure_prepend()
-
-SRC_URI += "\
- file://i386_dis.h \
- file://x86_64_dis.h \
-"
-inherit autotools gettext
-
-EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
-EXTRA_OECONF_append_class-native = " --without-bzlib"
-EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
-
-do_configure_prepend() {
- sed -i '/^i386_dis.h:/,+4 {/.*/d}' ${S}/libcpu/Makefile.am
-
- cp ${WORKDIR}/*dis.h ${S}/libcpu
-}
-
-# we can not build complete elfutils when using uclibc
-# but some recipes e.g. gcc 4.5 depends on libelf so we
-# build only libelf for uclibc case
-
-EXTRA_OEMAKE_libc-uclibc = "-C libelf"
-EXTRA_OEMAKE_class-native = ""
-EXTRA_OEMAKE_class-nativesdk = ""
-
-BBCLASSEXTEND = "native nativesdk"
-
-# Package utilities separately
-PACKAGES =+ "${PN}-binutils libelf libasm libdw"
-FILES_${PN}-binutils = "\
- ${bindir}/eu-addr2line \
- ${bindir}/eu-ld \
- ${bindir}/eu-nm \
- ${bindir}/eu-readelf \
- ${bindir}/eu-size \
- ${bindir}/eu-strip"
-
-FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
-FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
-FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
-# Some packages have the version preceeding the .so instead properly
-# versioned .so.<version>, so we need to reorder and repackage.
-#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
-#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
-
-# The package contains symlinks that trip up insane
-INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.166.bb b/meta/recipes-devtools/elfutils/elfutils_0.166.bb
deleted file mode 100644
index 5c436d3864..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils_0.166.bb
+++ /dev/null
@@ -1,89 +0,0 @@
-SUMMARY = "Utilities and libraries for handling compiled object files"
-HOMEPAGE = "https://fedorahosted.org/elfutils"
-SECTION = "base"
-LICENSE = "(GPLv3 & Elfutils-Exception)"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "libtool bzip2 zlib virtual/libintl"
-DEPENDS_append_libc-musl = " argp-standalone fts "
-
-SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
-SRC_URI[md5sum] = "d4e462b7891915dc5326bccefa2024ff"
-SRC_URI[sha256sum] = "3c056914c8a438b210be0d790463b960fc79d234c3f05ce707cbff80e94cba30"
-
-SRC_URI += "\
- file://dso-link-change.patch \
- file://Fix_elf_cvt_gunhash.patch \
- file://fixheadercheck.patch \
- file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
- file://0001-remove-the-unneed-checking.patch \
- file://0001-fix-a-stack-usage-warning.patch \
- file://aarch64_uio.patch \
- file://shadow.patch \
-"
-
-# pick the patch from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.164-1.debian.tar.xz
-SRC_URI += "\
- file://hppa_backend.diff \
- file://arm_backend.diff \
- file://mips_backend.diff \
- file://m68k_backend.diff \
- file://testsuite-ignore-elflint.diff \
- file://mips_readelf_w.patch \
- file://kfreebsd_path.patch \
- file://0001-Ignore-differences-between-mips-machine-identifiers.patch \
- file://0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
- file://0003-Add-mips-n64-relocation-format-hack.patch \
- file://uclibc-support.patch \
- file://elfcmp-fix-self-comparision.patch \
-"
-SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.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
-# along with the do_configure_prepend()
-
-inherit autotools gettext
-
-EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
-EXTRA_OECONF_append_class-native = " --without-bzlib"
-EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
-
-do_install_append() {
- if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
- rm -f ${D}${bindir}/eu-objdump
- fi
-}
-
-# we can not build complete elfutils when using uclibc
-# but some recipes e.g. gcc 4.5 depends on libelf so we
-# build only libelf for uclibc case
-
-EXTRA_OEMAKE_libc-uclibc = "-C libelf"
-EXTRA_OEMAKE_class-native = ""
-EXTRA_OEMAKE_class-nativesdk = ""
-
-ALLOW_EMPTY_${PN}_libc-musl = "1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-# Package utilities separately
-PACKAGES =+ "${PN}-binutils libelf libasm libdw"
-FILES_${PN}-binutils = "\
- ${bindir}/eu-addr2line \
- ${bindir}/eu-ld \
- ${bindir}/eu-nm \
- ${bindir}/eu-readelf \
- ${bindir}/eu-size \
- ${bindir}/eu-strip"
-
-FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
-FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
-FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
-# Some packages have the version preceeding the .so instead properly
-# versioned .so.<version>, so we need to reorder and repackage.
-#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
-#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
-
-# The package contains symlinks that trip up insane
-INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
new file mode 100644
index 0000000000..e7740c7fb4
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
@@ -0,0 +1,155 @@
+SUMMARY = "Utilities and libraries for handling compiled object files"
+HOMEPAGE = "https://sourceware.org/elfutils"
+SECTION = "base"
+LICENSE = "GPLv2 & LGPLv3+ & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "zlib virtual/libintl"
+DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
+# The Debian patches below are from:
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
+SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
+ file://0001-dso-link-change.patch \
+ file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
+ file://0003-fixheadercheck.patch \
+ file://0004-Disable-the-test-to-convert-euc-jp.patch \
+ file://0006-Fix-build-on-aarch64-musl.patch \
+ file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
+ file://0001-libasm-may-link-with-libbz2-if-found.patch \
+ file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \
+ file://debian/hppa_backend.diff \
+ file://debian/arm_backend.diff \
+ file://debian/mips_backend.diff \
+ file://debian/mips_readelf_w.patch \
+ file://debian/kfreebsd_path.patch \
+ file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
+ file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
+ file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
+ file://debian/hurd_path.patch \
+ file://debian/ignore_strmerge.diff \
+ file://debian/disable_werror.patch \
+ file://debian/testsuite-ignore-elflint.diff \
+ file://debian/mips_cfi.patch \
+ file://debian/0001-fix-compile-failure-with-debian-patches.patch \
+ file://0001-skip-the-test-when-gcc-not-deployed.patch \
+ file://0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch \
+ file://run-ptest \
+ file://ptest.patch \
+ "
+SRC_URI_append_libc-musl = " \
+ file://musl-obstack-fts.patch \
+ file://musl-libs.patch \
+ file://musl-utils.patch \
+ file://musl-tests.patch \
+ "
+SRC_URI[md5sum] = "0b583722f911e1632544718d502aab87"
+SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e"
+
+inherit autotools gettext ptest
+
+EXTRA_OECONF = "--program-prefix=eu-"
+
+DEPENDS_BZIP2 = "bzip2-replacement-native"
+DEPENDS_BZIP2_class-target = "bzip2"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
+PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
+
+RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
+
+EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
+
+do_install_append() {
+ if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
+ rm -f ${D}${bindir}/eu-objdump
+ fi
+}
+
+do_compile_ptest() {
+ cd ${B}/tests
+ oe_runmake buildtest-TESTS oecheck
+}
+
+do_install_ptest() {
+ if [ ${PTEST_ENABLED} = "1" ]; then
+ # copy the files which needed by the cases
+ TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint"
+ install -d -m 755 ${D}${PTEST_PATH}/src
+ install -d -m 755 ${D}${PTEST_PATH}/libelf
+ install -d -m 755 ${D}${PTEST_PATH}/libdw
+ for test_file in ${TEST_FILES}; do
+ if [ -f ${B}/src/${test_file} ]; then
+ cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src
+ fi
+ done
+ cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
+ cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
+ cp -r ${S}/tests/ ${D}${PTEST_PATH}
+ cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
+ cp -r ${B}/config.h ${D}${PTEST_PATH}
+ cp -r ${B}/backends ${D}${PTEST_PATH}
+ sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
+ find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
+ fi
+}
+
+EXTRA_OEMAKE_class-native = ""
+EXTRA_OEMAKE_class-nativesdk = ""
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Package utilities separately
+PACKAGES =+ "${PN}-binutils libelf libasm libdw"
+
+# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+
+# according to NEWS file:
+# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone
+# programs. There is now also a formal CONTRIBUTING document describing how to
+# submit patches."
+LICENSE_${PN}-binutils = "GPLv3+"
+LICENSE_${PN} = "GPLv3+"
+LICENSE_libelf = "GPLv2 | LGPLv3+"
+LICENSE_libasm = "GPLv2 | LGPLv3+"
+LICENSE_libdw = "GPLv2 | LGPLv3+"
+
+FILES_${PN}-binutils = "\
+ ${bindir}/eu-addr2line \
+ ${bindir}/eu-ld \
+ ${bindir}/eu-nm \
+ ${bindir}/eu-readelf \
+ ${bindir}/eu-size \
+ ${bindir}/eu-strip"
+
+FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
+FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
+FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
+# Some packages have the version preceeding the .so instead properly
+# versioned .so.<version>, so we need to reorder and repackage.
+#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
+#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
+
+# The package contains symlinks that trip up insane
+INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
+
+# avoid stripping some generated binaries otherwise some of the tests such as test-nlist,
+# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
+INHIBIT_PACKAGE_STRIP_FILES = "\
+ ${PKGD}${PTEST_PATH}/tests/test-nlist \
+ ${PKGD}${PTEST_PATH}/tests/elfstrmerge \
+ ${PKGD}${PTEST_PATH}/tests/backtrace-child \
+ ${PKGD}${PTEST_PATH}/tests/backtrace-data \
+ ${PKGD}${PTEST_PATH}/tests/deleted \
+ ${PKGD}${PTEST_PATH}/src/strip \
+ ${PKGD}${PTEST_PATH}/src/addr2line \
+ ${PKGD}${PTEST_PATH}/src/elfcmp \
+ ${PKGD}${PTEST_PATH}/src/objdump \
+ ${PKGD}${PTEST_PATH}/src/readelf \
+ ${PKGD}${PTEST_PATH}/src/nm \
+ ${PKGD}${PTEST_PATH}/src/elflint \
+ ${PKGD}${PTEST_PATH}/libelf/libelf.so \
+ ${PKGD}${PTEST_PATH}/libdw/libdw.so \
+ ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \
+ ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \
+"
+
+PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1"
diff --git a/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch b/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
new file mode 100644
index 0000000000..af79ef496d
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
@@ -0,0 +1,50 @@
+From b99aa12cf879ce200e03d75e543c7ab2dfa5503b Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:10:57 +0800
+Subject: [PATCH] dso link change
+
+Upstream-Status: Pending
+
+This patch makes the link to the dependencies of libdw explicit, as
+recent ld no longer implicitly links them. See
+http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html
+as a similar example of the error message you can encounter without this
+patch, and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and
+https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for
+more details.
+
+Rebase to 0.170
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ src/Makefile.am | 2 +-
+ tests/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 2b1c0dc..9305b84 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -44,7 +44,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.a -lz
+ else
+ libasm = ../libasm/libasm.so
+-libdw = ../libdw/libdw.so
++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.so
+ endif
+ libebl = ../libebl/libebl.a
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 1b0c7d3..bced19b 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -476,7 +476,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.a -lz
+ libasm = ../libasm/libasm.a
+ else
+-libdw = ../libdw/libdw.so
++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.so
+ libasm = ../libasm/libasm.so
+ endif
diff --git a/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch b/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
new file mode 100644
index 0000000000..0d533c8f10
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
@@ -0,0 +1,36 @@
+From d7be687c35fa42954874034c82ca9059d28196fe Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 4 Oct 2017 22:30:46 -0700
+Subject: [PATCH] libasm may link with libbz2 if found
+
+This can fail to link binaries like objdump
+where indirect libraries may be not found by linker
+
+| /mnt/a/oe/build/tmp/work/riscv64-bec-linux/elfutils/0.170-r0/recipe-sysroot/usr/lib/libbz2.so.1: error adding symbols: DSO missing from command line
+| collect2: error: ld returned 1 exit status
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 9305b84..9b7e853 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -39,11 +39,11 @@ EXTRA_DIST += make-debug-archive.in
+ CLEANFILES += make-debug-archive
+
+ if BUILD_STATIC
+-libasm = ../libasm/libasm.a
++libasm = ../libasm/libasm.a $(zip_LIBS)
+ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.a -lz
+ else
+-libasm = ../libasm/libasm.so
++libasm = ../libasm/libasm.so $(zip_LIBS)
+ libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.so
+ endif
diff --git a/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch b/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch
new file mode 100644
index 0000000000..b26ed99f65
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch
@@ -0,0 +1,44 @@
+From e571cbd0c20085ec71969971f19280b5de95cfb7 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 16 Aug 2018 09:58:26 +0800
+Subject: [PATCH] libelf/elf_end.c: check data_list.data.d.d_buf before free it
+
+The one which actually saves the data is data_list.data.d.d_buf, so check it
+before free rawdata_base.
+
+This can fix a segmentation fault when prelink libqb_1.0.3:
+prelink: /usr/lib/libqb.so.0.18.2: Symbol section index outside of section numbers
+
+The segmentation fault happens when prelink call elf_end().
+
+Upstream-Status: Submitted [https://sourceware.org/ml/elfutils-devel/2018-q3/msg00085.html]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+---
+ libelf/elf_end.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libelf/elf_end.c b/libelf/elf_end.c
+index 160f0b8..5280a70 100644
+--- a/libelf/elf_end.c
++++ b/libelf/elf_end.c
+@@ -160,14 +160,16 @@ elf_end (Elf *elf)
+ architecture doesn't require overly stringent
+ alignment the raw data buffer is the same as the
+ one used for presenting to the caller. */
+- if (scn->data_base != scn->rawdata_base)
++ if ((scn->data_base != scn->rawdata_base)
++ && (scn->data_list.data.d.d_buf != NULL))
+ free (scn->data_base);
+
+ /* The section data is allocated if we couldn't mmap
+ the file. Or if we had to decompress. */
+- if (elf->map_address == NULL
++ if ((elf->map_address == NULL
+ || scn->rawdata_base == scn->zdata_base
+ || (scn->flags & ELF_F_MALLOCED) != 0)
++ && (scn->data_list.data.d.d_buf != NULL))
+ free (scn->rawdata_base);
+
+ /* Free the list of data buffers for the section.
diff --git a/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch b/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
new file mode 100644
index 0000000000..3303333c45
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
@@ -0,0 +1,32 @@
+From 2e2232d0935bf8ef6e66ebffba3be68a73b5b3e5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 8 Sep 2019 15:57:59 -0700
+Subject: [PATCH] ppc_initreg.c: Incliude asm/ptrace.h for pt_regs definition
+
+Fixes
+| ../../elfutils-0.176/backends/ppc_initreg.c:79:22: error: field 'r' has incomplete type
+| struct pt_regs r;
+| ^
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ backends/ppc_initreg.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
+index 0e0d359..e5cca7e 100644
+--- a/backends/ppc_initreg.c
++++ b/backends/ppc_initreg.c
+@@ -33,6 +33,7 @@
+ #include <stdlib.h>
+ #if defined(__powerpc__) && defined(__linux__)
+ # include <sys/ptrace.h>
++# include <asm/ptrace.h>
+ # include <sys/user.h>
+ #endif
+
+--
+2.23.0
+
diff --git a/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
new file mode 100644
index 0000000000..de8c05f11e
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
@@ -0,0 +1,73 @@
+From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Tue, 21 May 2019 15:20:34 +0800
+Subject: [PATCH v2] skip the test when gcc not deployed
+
+Skip the tests which depend on gcc when
+gcc not deployed.
+
+Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ tests/run-disasm-x86-64.sh | 2 ++
+ tests/run-disasm-x86.sh | 2 ++
+ tests/run-strip-g.sh | 2 ++
+ tests/run-strip-nothing.sh | 2 ++
+ 4 files changed, 8 insertions(+)
+
+diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh
+index a6be62b..c3ef238 100755
+--- a/tests/run-disasm-x86-64.sh
++++ b/tests/run-disasm-x86-64.sh
+@@ -22,6 +22,8 @@ case "`uname -m`" in
+ x86_64)
+ tempfiles testfile45.o
+ testfiles testfile45.S testfile45.expect
++ # skip the case if no gcc deployed
++ which gcc || exit 77
+ gcc -m64 -c -o testfile45.o testfile45.S
+ testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
+ ;;
+diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh
+index 28a3df7..544fc28 100755
+--- a/tests/run-disasm-x86.sh
++++ b/tests/run-disasm-x86.sh
+@@ -22,6 +22,8 @@ case "`uname -m`" in
+ x86_64 | i?86 )
+ tempfiles testfile44.o
+ testfiles testfile44.S testfile44.expect
++ # skip the case if no gcc deployed
++ which gcc || exit 77
+ gcc -m32 -c -o testfile44.o testfile44.S
+ testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
+ ;;
+diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
+index 1303819..a943dec 100755
+--- a/tests/run-strip-g.sh
++++ b/tests/run-strip-g.sh
+@@ -24,6 +24,8 @@
+
+ tempfiles a.out strip.out debug.out readelf.out
+
++# skip the test if gcc deployed
++which gcc || exit 77
+ echo Create debug a.out.
+ echo "int main() { return 1; }" | gcc -g -xc -
+
+diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh
+index 914fdfb..d03f734 100755
+--- a/tests/run-strip-nothing.sh
++++ b/tests/run-strip-nothing.sh
+@@ -22,6 +22,8 @@
+
+ tempfiles a.out strip.out debug.out
+
++# skip the case if no gcc deployed
++which gcc || exit 77
+ # Create no-debug a.out.
+ echo "int main() { return 1; }" | gcc -s -xc -
+
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch b/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
new file mode 100644
index 0000000000..96c2565e3e
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
@@ -0,0 +1,40 @@
+From f8e4118b60a9b54950437006a82b4047f38f5347 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:13:59 +0800
+Subject: [PATCH] Fix elf_cvt_gunhash if dest and src are same.
+
+Upstream-Status: Pending
+
+The 'dest' and 'src' can be same, we need to save the value of src32[2]
+before swaping it.
+
+Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com>
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ libelf/gnuhash_xlate.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
+index 6faf113..04d9ca1 100644
+--- a/libelf/gnuhash_xlate.h
++++ b/libelf/gnuhash_xlate.h
+@@ -40,6 +40,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
+ words. We must detangle them here. */
+ 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/files/0003-fixheadercheck.patch b/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
new file mode 100644
index 0000000000..e36d3f44dd
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
@@ -0,0 +1,38 @@
+From dd7c8c730457def5f62ebd43022b2f06df8c6ed9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:17:20 +0800
+Subject: [PATCH] fixheadercheck
+
+For some binaries we can get a invalid section alignment, for example if
+sh_align = 1 and sh_addralign is 0. In the case of a zero size section
+like
+".note.GNU-stack", this is irrelavent as far as I can tell and we
+shouldn't
+error in this case.
+
+RP 2014/6/11
+
+Upstream-Status: Pending
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ libelf/elf32_updatenull.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
+index 3e9ef61..5351518 100644
+--- a/libelf/elf32_updatenull.c
++++ b/libelf/elf32_updatenull.c
+@@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
+ we test for the alignment of the section being large
+ enough for the largest alignment required by a data
+ block. */
+- if (unlikely (! powerof2 (shdr->sh_addralign))
+- || unlikely ((shdr->sh_addralign ?: 1) < sh_align))
++ if (shdr->sh_size && (unlikely (! powerof2 (shdr->sh_addralign))
++ || unlikely ((shdr->sh_addralign ?: 1) < sh_align)))
+ {
+ __libelf_seterrno (ELF_E_INVALID_ALIGN);
+ return -1;
diff --git a/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch b/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch
new file mode 100644
index 0000000000..5dee61210a
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch
@@ -0,0 +1,42 @@
+From e4ede22e28eaa38d81667ddcb19541ece1a83cf8 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:24:06 +0800
+Subject: [PATCH] Disable the test to convert euc-jp
+
+Remove the test "Test against HP-UX 11.11 bug:
+No converter from EUC-JP to UTF-8 is provided"
+since we don't support HP-UX and if the euc-jp is not
+installed on the host, the dependence will be built without
+iconv support and will cause guild-native building fail.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ m4/iconv.m4 | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/m4/iconv.m4 b/m4/iconv.m4
+index a503646..299f1eb 100644
+--- a/m4/iconv.m4
++++ b/m4/iconv.m4
+@@ -159,6 +159,7 @@ int main ()
+ }
+ }
+ #endif
++#if 0
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+@@ -170,6 +171,7 @@ int main ()
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ result |= 16;
++#endif
+ return result;
+ }]])],
+ [am_cv_func_iconv_works=yes],
diff --git a/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch b/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
new file mode 100644
index 0000000000..6f7956c5ae
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
@@ -0,0 +1,59 @@
+From 578f370c7e7a9f056aefa062b34590b0aa13bce5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:27:30 +0800
+Subject: [PATCH] Fix build on aarch64/musl
+
+Errors
+
+invalid operands to binary & (have 'long double' and 'unsigned int')
+
+error: redefinition
+ of 'struct iovec'
+ struct iovec { void *iov_base; size_t iov_len; };
+ ^
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ backends/aarch64_initreg.c | 4 ++--
+ backends/arm_initreg.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c
+index daf6f37..6445276 100644
+--- a/backends/aarch64_initreg.c
++++ b/backends/aarch64_initreg.c
+@@ -33,7 +33,7 @@
+ #include "system.h"
+ #include <assert.h>
+ #if defined(__aarch64__) && defined(__linux__)
+-# include <linux/uio.h>
++# include <sys/uio.h>
+ # include <sys/user.h>
+ # include <sys/ptrace.h>
+ /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
+@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
+
+ Dwarf_Word dwarf_fregs[32];
+ for (int r = 0; r < 32; r++)
+- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF;
++ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF;
+
+ if (! setfunc (64, 32, dwarf_fregs, arg))
+ return false;
+diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c
+index efcabaf..062bb9e 100644
+--- a/backends/arm_initreg.c
++++ b/backends/arm_initreg.c
+@@ -38,7 +38,7 @@
+ #endif
+
+ #ifdef __aarch64__
+-# include <linux/uio.h>
++# include <sys/uio.h>
+ # include <sys/user.h>
+ # include <sys/ptrace.h>
+ /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
diff --git a/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch b/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
new file mode 100644
index 0000000000..611a24c0f5
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
@@ -0,0 +1,42 @@
+From 112d1645bab7922c7796fe32ddea8fa6e1bbded1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 29 Jun 2018 15:14:28 +0800
+Subject: [PATCH] Fix control path where we have str as uninitialized string
+
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:
+In function 'i386_disasm':
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5:
+error: 'str' may be used uninitialized in this function
+[-Werror=maybe-uninitialized]
+| memcpy (buf + bufcnt, _str, _len); \
+| ^
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17:
+note: 'str' was declared here
+| const char *str;
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Rebase to 0.172
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ libcpu/i386_disasm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
+index a7e03f9..837a3a8 100644
+--- a/libcpu/i386_disasm.c
++++ b/libcpu/i386_disasm.c
+@@ -821,6 +821,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
+ }
+ FALLTHROUGH;
+ default:
++ str = "";
+ assert (! "INVALID not handled");
+ }
+ }
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-Ignore-differences-between-mips-machine-identifiers.patch b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
index 3f110f98fc..a2983c5770 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-Ignore-differences-between-mips-machine-identifiers.patch
+++ b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
@@ -8,15 +8,18 @@ from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the
kernel will not load binaries containing it).
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
backends/mips_init.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
-diff --git a/backends/mips_init.c b/backends/mips_init.c
-index 7429a89..d10e940 100644
+Index: b/backends/mips_init.c
+===================================================================
--- a/backends/mips_init.c
+++ b/backends/mips_init.c
-@@ -46,11 +46,7 @@ mips_init (elf, machine, eh, ehlen)
+@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unus
return NULL;
/* We handle it. */
@@ -29,6 +32,3 @@ index 7429a89..d10e940 100644
mips_init_reloc (eh);
HOOK (eh, reloc_simple_type);
HOOK (eh, return_value_location);
---
-2.1.4
-
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch b/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch
new file mode 100644
index 0000000000..19a2015062
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch
@@ -0,0 +1,48 @@
+From 3f3e7b16934ec58ab47d2bdc9982f54a55b07534 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 21 Aug 2019 16:25:33 +0800
+Subject: [PATCH] fix compile failure with debian patches
+
+While applying debian patches, there is a compile failure
+...
+elfutils-0.177/backends/mips_init.c:48:5: error: 'Ebl' {aka 'struct ebl'} has no member named 'name'
+...
+
+Since upstream applied commit [b323391 libdwelf: Add dwelf_elf_e_machine_string
+and use it in readelf], it remove 'name' from 'struct ebl'
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/mips_init.c | 1 -
+ backends/parisc_init.c | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/backends/mips_init.c b/backends/mips_init.c
+index bce5abe..e1c65c8 100644
+--- a/backends/mips_init.c
++++ b/backends/mips_init.c
+@@ -45,7 +45,6 @@ mips_init (Elf *elf __attribute__ ((unused)),
+ return NULL;
+
+ /* We handle it. */
+- eh->name = "MIPS";
+ mips_init_reloc (eh);
+ HOOK (eh, reloc_simple_type);
+ HOOK (eh, return_value_location);
+diff --git a/backends/parisc_init.c b/backends/parisc_init.c
+index f1e401c..97b4a8c 100644
+--- a/backends/parisc_init.c
++++ b/backends/parisc_init.c
+@@ -56,7 +56,6 @@ parisc_init (Elf *elf __attribute__ ((unused)),
+ pa64 = 1;
+ }
+ /* We handle it. */
+- eh->name = "PA-RISC";
+ parisc_init_reloc (eh);
+ HOOK (eh, reloc_simple_type);
+ HOOK (eh, machine_flag_check);
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
index 72125c9ff0..aee00cba14 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
+++ b/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
@@ -4,6 +4,9 @@ Date: Mon, 5 Jan 2015 15:17:01 +0000
Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 94 insertions(+), 10 deletions(-)
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/0003-Add-mips-n64-relocation-format-hack.patch b/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch
index 14b7985ce8..c949e96533 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.166/0003-Add-mips-n64-relocation-format-hack.patch
+++ b/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch
@@ -12,6 +12,9 @@ This patch also ensures that strip.c sets the correct value of e_machine
before manipulating relocations so that these changes take effect.
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
libelf/gelf_getrel.c | 25 +++++++++++++++++++++++--
libelf/gelf_getrela.c | 25 +++++++++++++++++++++++--
@@ -20,10 +23,10 @@ Signed-off-by: James Cowgill <james410@cowgill.org.uk>
src/strip.c | 17 +++++++++++++++++
5 files changed, 101 insertions(+), 6 deletions(-)
-Index: elfutils-0.164/libelf/gelf_getrel.c
+Index: elfutils-0.175/libelf/gelf_getrel.c
===================================================================
---- elfutils-0.164.orig/libelf/gelf_getrel.c
-+++ elfutils-0.164/libelf/gelf_getrel.c
+--- elfutils-0.175.orig/libelf/gelf_getrel.c
++++ elfutils-0.175/libelf/gelf_getrel.c
@@ -36,6 +36,7 @@
#include "libelfP.h"
@@ -63,10 +66,10 @@ Index: elfutils-0.164/libelf/gelf_getrel.c
}
rwlock_unlock (scn->elf->lock);
-Index: elfutils-0.164/libelf/gelf_getrela.c
+Index: elfutils-0.175/libelf/gelf_getrela.c
===================================================================
---- elfutils-0.164.orig/libelf/gelf_getrela.c
-+++ elfutils-0.164/libelf/gelf_getrela.c
+--- elfutils-0.175.orig/libelf/gelf_getrela.c
++++ elfutils-0.175/libelf/gelf_getrela.c
@@ -36,6 +36,7 @@
#include "libelfP.h"
@@ -106,10 +109,10 @@ Index: elfutils-0.164/libelf/gelf_getrela.c
}
rwlock_unlock (scn->elf->lock);
-Index: elfutils-0.164/libelf/gelf_update_rel.c
+Index: elfutils-0.175/libelf/gelf_update_rel.c
===================================================================
---- elfutils-0.164.orig/libelf/gelf_update_rel.c
-+++ elfutils-0.164/libelf/gelf_update_rel.c
+--- elfutils-0.175.orig/libelf/gelf_update_rel.c
++++ elfutils-0.175/libelf/gelf_update_rel.c
@@ -36,6 +36,7 @@
#include "libelfP.h"
@@ -151,10 +154,10 @@ Index: elfutils-0.164/libelf/gelf_update_rel.c
}
result = 1;
-Index: elfutils-0.164/libelf/gelf_update_rela.c
+Index: elfutils-0.175/libelf/gelf_update_rela.c
===================================================================
---- elfutils-0.164.orig/libelf/gelf_update_rela.c
-+++ elfutils-0.164/libelf/gelf_update_rela.c
+--- elfutils-0.175.orig/libelf/gelf_update_rela.c
++++ elfutils-0.175/libelf/gelf_update_rela.c
@@ -36,6 +36,7 @@
#include "libelfP.h"
@@ -196,11 +199,11 @@ Index: elfutils-0.164/libelf/gelf_update_rela.c
}
result = 1;
-Index: elfutils-0.164/src/strip.c
+Index: elfutils-0.175/src/strip.c
===================================================================
---- elfutils-0.164.orig/src/strip.c
-+++ elfutils-0.164/src/strip.c
-@@ -546,6 +546,23 @@ handle_elf (int fd, Elf *elf, const char
+--- elfutils-0.175.orig/src/strip.c
++++ elfutils-0.175/src/strip.c
+@@ -1062,6 +1062,23 @@ handle_elf (int fd, Elf *elf, const char
goto fail;
}
@@ -222,5 +225,5 @@ Index: elfutils-0.164/src/strip.c
+ }
+
/* Copy over the old program header if needed. */
- if (ehdr->e_type != ET_REL)
- for (cnt = 0; cnt < phnum; ++cnt)
+ if (phnum > 0)
+ {
diff --git a/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff b/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff
new file mode 100644
index 0000000000..ba0ce33bd4
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff
@@ -0,0 +1,624 @@
+From 4e6fededb3d8c90694c44214c862ac216a69ecae Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 21 Aug 2019 16:50:33 +0800
+Subject: [PATCH] arm_backend
+
+Upstream-Status: Pending [from debian]
+Rebase to 0.177
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 18 ++++-
+ backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++
+ backends/arm_retval.c | 43 +++++++++++-
+ 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, 400 insertions(+), 12 deletions(-)
+ create mode 100644 backends/libebl_arm.h
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index af023f0..ea2bcb7 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
+@@ -35,20 +35,31 @@
+ #define RELOC_PREFIX R_ARM_
+ #include "libebl_CPU.h"
+
++#include "libebl_arm.h"
++
+ /* This defines the common reloc hooks based on arm_reloc.def. */
+ #include "common-reloc.c"
+
+
+ const char *
+-arm_init (Elf *elf __attribute__ ((unused)),
++arm_init (Elf *elf,
+ GElf_Half machine __attribute__ ((unused)),
+ Ebl *eh,
+ size_t ehlen)
+ {
++ int soft_float = 0;
++
+ /* Check whether the Elf_BH object has a sufficent size. */
+ if (ehlen < sizeof (Ebl))
+ return NULL;
+
++ if (elf) {
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT))
++ soft_float = 1;
++ }
++
+ /* We handle it. */
+ arm_init_reloc (eh);
+ HOOK (eh, segment_type_name);
+@@ -59,7 +70,10 @@ arm_init (Elf *elf __attribute__ ((unused)),
+ HOOK (eh, core_note);
+ HOOK (eh, auxv_info);
+ HOOK (eh, check_object_attribute);
+- HOOK (eh, return_value_location);
++ if (soft_float)
++ eh->return_value_location = arm_return_value_location_soft;
++ else
++ eh->return_value_location = arm_return_value_location_hard;
+ HOOK (eh, abi_cfi);
+ HOOK (eh, check_reloc_target_type);
+ HOOK (eh, symbol_type_name);
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index a46a4c9..418c931 100644
+--- a/backends/arm_regs.c
++++ b/backends/arm_regs.c
+@@ -31,6 +31,7 @@
+ #endif
+
+ #include <string.h>
++#include <stdio.h>
+ #include <dwarf.h>
+
+ #define BACKEND arm_
+@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
+ break;
+
+ case 16 + 0 ... 16 + 7:
++ /* AADWARF says that there are no registers in that range,
++ * but gcc maps FPA registers here
++ */
+ regno += 96 - 16;
+ FALLTHROUGH;
+ case 96 + 0 ... 96 + 7:
+@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
+ namelen = 2;
+ break;
+
++ case 64 + 0 ... 64 + 9:
++ *setname = "VFP";
++ *bits = 32;
++ *type = DW_ATE_float;
++ name[0] = 's';
++ name[1] = regno - 64 + '0';
++ namelen = 2;
++ break;
++
++ case 64 + 10 ... 64 + 31:
++ *setname = "VFP";
++ *bits = 32;
++ *type = DW_ATE_float;
++ name[0] = 's';
++ name[1] = (regno - 64) / 10 + '0';
++ name[2] = (regno - 64) % 10 + '0';
++ namelen = 3;
++ break;
++
++ case 104 + 0 ... 104 + 7:
++ /* XXX TODO:
++ * This can be either intel wireless MMX general purpose/control
++ * registers or xscale accumulator, which have different usage.
++ * We only have the intel wireless MMX here now.
++ * The name needs to be changed for the xscale accumulator too. */
++ *setname = "MMX";
++ *type = DW_ATE_unsigned;
++ *bits = 32;
++ memcpy(name, "wcgr", 4);
++ name[4] = regno - 104 + '0';
++ namelen = 5;
++ break;
++
++ case 112 + 0 ... 112 + 9:
++ *setname = "MMX";
++ *type = DW_ATE_unsigned;
++ *bits = 64;
++ name[0] = 'w';
++ name[1] = 'r';
++ name[2] = regno - 112 + '0';
++ namelen = 3;
++ break;
++
++ case 112 + 10 ... 112 + 15:
++ *setname = "MMX";
++ *type = DW_ATE_unsigned;
++ *bits = 64;
++ name[0] = 'w';
++ name[1] = 'r';
++ name[2] = '1';
++ name[3] = regno - 112 - 10 + '0';
++ namelen = 4;
++ break;
++
+ case 128:
++ *setname = "state";
+ *type = DW_ATE_unsigned;
+ return stpcpy (name, "spsr") + 1 - name;
+
++ case 129:
++ *setname = "state";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_fiq") + 1 - name;
++
++ case 130:
++ *setname = "state";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_irq") + 1 - name;
++
++ case 131:
++ *setname = "state";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_abt") + 1 - name;
++
++ case 132:
++ *setname = "state";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_und") + 1 - name;
++
++ case 133:
++ *setname = "state";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_svc") + 1 - name;
++
++ case 144 ... 150:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1;
++
++ case 151 ... 157:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1;
++
++ case 158 ... 159:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1;
++
++ case 160 ... 161:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1;
++
++ case 162 ... 163:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_und", regno - 162 + 13) + 1;
++
++ case 164 ... 165:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1;
++
++ case 192 ... 199:
++ *setname = "MMX";
++ *bits = 32;
++ *type = DW_ATE_unsigned;
++ name[0] = 'w';
++ name[1] = 'c';
++ name[2] = regno - 192 + '0';
++ namelen = 3;
++ break;
++
+ case 256 + 0 ... 256 + 9:
++ /* XXX TODO: Neon also uses those registers and can contain
++ * both float and integers */
+ *setname = "VFP";
+ *type = DW_ATE_float;
+ *bits = 64;
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 1c28f01..313e4eb 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))
+
++/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */
++static const Dwarf_Op loc_fpreg[] =
++ {
++ { .atom = DW_OP_reg16 },
++ };
++#define nloc_fpreg 1
++
+ /* 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 @@ static const Dwarf_Op loc_aggregate[] =
+ #define nloc_aggregate 1
+
+
+-int
+-arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++static int
++arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
++ int soft_float)
+ {
+ /* Start with the function's type, and get the DW_AT_type attribute,
+ which is the type of the return value. */
+@@ -98,6 +106,21 @@ 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,
++ &attr_mem), &encoding) != 0)
++ return -1;
++
++ if ((encoding == DW_ATE_float) && !soft_float)
++ {
++ *locp = loc_fpreg;
++ if (size <= 8)
++ return nloc_fpreg;
++ goto aggregate;
++ }
++ }
+ if (size <= 16)
+ {
+ intreg:
+@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ }
+
+ aggregate:
++ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+ }
+@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ DWARF and might be valid. */
+ return -2;
+ }
++
++/* return location for -mabi=apcs-gnu -msoft-float */
++int
++arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ return arm_return_value_location_ (functypedie, locp, 1);
++}
++
++/* return location for -mabi=apcs-gnu -mhard-float (current default) */
++int
++arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ return arm_return_value_location_ (functypedie, locp, 0);
++}
++
+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 01648bd..05b7e7e 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -2690,6 +2690,9 @@ enum
+ #define EF_ARM_EABI_VER4 0x04000000
+ #define EF_ARM_EABI_VER5 0x05000000
+
++/* EI_OSABI values */
++#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */
++
+ /* Additional symbol types for Thumb. */
+ #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
+ #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
+@@ -2707,12 +2710,19 @@ enum
+
+ /* Processor specific values for the Phdr p_type field. */
+ #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
++#define PT_ARM_UNWIND PT_ARM_EXIDX
+
+ /* Processor specific values for the Shdr sh_type field. */
+ #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */
+ #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */
+ #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */
+
++/* Processor specific values for the Dyn d_tag field. */
++#define DT_ARM_RESERVED1 (DT_LOPROC + 0)
++#define DT_ARM_SYMTABSZ (DT_LOPROC + 1)
++#define DT_ARM_PREEMTMAB (DT_LOPROC + 2)
++#define DT_ARM_RESERVED2 (DT_LOPROC + 3)
++#define DT_ARM_NUM 4
+
+ /* AArch64 relocs. */
+
+@@ -3005,6 +3015,7 @@ enum
+ TLS block (LDR, STR). */
+ #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
+ to GOT origin (LDR). */
++/* 112 - 127 private range */
+ #define R_ARM_ME_TOO 128 /* Obsolete. */
+ #define R_ARM_THM_TLS_DESCSEQ 129
+ #define R_ARM_THM_TLS_DESCSEQ16 129
+diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
+index 64fa24d..1c2aa4d 100755
+--- a/tests/run-addrcfi.sh
++++ b/tests/run-addrcfi.sh
+@@ -3554,6 +3554,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
+@@ -3562,7 +3594,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 1422bd6..dc0fc99 100755
+--- a/tests/run-allregs.sh
++++ b/tests/run-allregs.sh
+@@ -2672,7 +2672,28 @@ integer registers:
+ 13: sp (sp), address 32 bits
+ 14: lr (lr), address 32 bits
+ 15: pc (pc), address 32 bits
+- 128: spsr (spsr), unsigned 32 bits
++ 144: r8_usr (r8_usr), signed 32 bits
++ 145: r9_usr (r9_usr), signed 32 bits
++ 146: r10_usr (r10_usr), signed 32 bits
++ 147: r11_usr (r11_usr), signed 32 bits
++ 148: r12_usr (r12_usr), signed 32 bits
++ 149: r13_usr (r13_usr), signed 32 bits
++ 150: r14_usr (r14_usr), signed 32 bits
++ 151: r8_fiq (r8_fiq), signed 32 bits
++ 152: r9_fiq (r9_fiq), signed 32 bits
++ 153: r10_fiq (r10_fiq), signed 32 bits
++ 154: r11_fiq (r11_fiq), signed 32 bits
++ 155: r12_fiq (r12_fiq), signed 32 bits
++ 156: r13_fiq (r13_fiq), signed 32 bits
++ 157: r14_fiq (r14_fiq), signed 32 bits
++ 158: r13_irq (r13_irq), signed 32 bits
++ 159: r14_irq (r14_irq), signed 32 bits
++ 160: r13_abt (r13_abt), signed 32 bits
++ 161: r14_abt (r14_abt), signed 32 bits
++ 162: r13_und (r13_und), signed 32 bits
++ 163: r14_und (r14_und), signed 32 bits
++ 164: r13_svc (r13_svc), signed 32 bits
++ 165: r14_svc (r14_svc), signed 32 bits
+ FPA registers:
+ 16: f0 (f0), float 96 bits
+ 17: f1 (f1), float 96 bits
+@@ -2690,7 +2711,72 @@ FPA registers:
+ 101: f5 (f5), float 96 bits
+ 102: f6 (f6), float 96 bits
+ 103: f7 (f7), float 96 bits
++MMX registers:
++ 104: wcgr0 (wcgr0), unsigned 32 bits
++ 105: wcgr1 (wcgr1), unsigned 32 bits
++ 106: wcgr2 (wcgr2), unsigned 32 bits
++ 107: wcgr3 (wcgr3), unsigned 32 bits
++ 108: wcgr4 (wcgr4), unsigned 32 bits
++ 109: wcgr5 (wcgr5), unsigned 32 bits
++ 110: wcgr6 (wcgr6), unsigned 32 bits
++ 111: wcgr7 (wcgr7), unsigned 32 bits
++ 112: wr0 (wr0), unsigned 64 bits
++ 113: wr1 (wr1), unsigned 64 bits
++ 114: wr2 (wr2), unsigned 64 bits
++ 115: wr3 (wr3), unsigned 64 bits
++ 116: wr4 (wr4), unsigned 64 bits
++ 117: wr5 (wr5), unsigned 64 bits
++ 118: wr6 (wr6), unsigned 64 bits
++ 119: wr7 (wr7), unsigned 64 bits
++ 120: wr8 (wr8), unsigned 64 bits
++ 121: wr9 (wr9), unsigned 64 bits
++ 122: wr10 (wr10), unsigned 64 bits
++ 123: wr11 (wr11), unsigned 64 bits
++ 124: wr12 (wr12), unsigned 64 bits
++ 125: wr13 (wr13), unsigned 64 bits
++ 126: wr14 (wr14), unsigned 64 bits
++ 127: wr15 (wr15), unsigned 64 bits
++ 192: wc0 (wc0), unsigned 32 bits
++ 193: wc1 (wc1), unsigned 32 bits
++ 194: wc2 (wc2), unsigned 32 bits
++ 195: wc3 (wc3), unsigned 32 bits
++ 196: wc4 (wc4), unsigned 32 bits
++ 197: wc5 (wc5), unsigned 32 bits
++ 198: wc6 (wc6), unsigned 32 bits
++ 199: wc7 (wc7), unsigned 32 bits
+ VFP registers:
++ 64: s0 (s0), float 32 bits
++ 65: s1 (s1), float 32 bits
++ 66: s2 (s2), float 32 bits
++ 67: s3 (s3), float 32 bits
++ 68: s4 (s4), float 32 bits
++ 69: s5 (s5), float 32 bits
++ 70: s6 (s6), float 32 bits
++ 71: s7 (s7), float 32 bits
++ 72: s8 (s8), float 32 bits
++ 73: s9 (s9), float 32 bits
++ 74: s10 (s10), float 32 bits
++ 75: s11 (s11), float 32 bits
++ 76: s12 (s12), float 32 bits
++ 77: s13 (s13), float 32 bits
++ 78: s14 (s14), float 32 bits
++ 79: s15 (s15), float 32 bits
++ 80: s16 (s16), float 32 bits
++ 81: s17 (s17), float 32 bits
++ 82: s18 (s18), float 32 bits
++ 83: s19 (s19), float 32 bits
++ 84: s20 (s20), float 32 bits
++ 85: s21 (s21), float 32 bits
++ 86: s22 (s22), float 32 bits
++ 87: s23 (s23), float 32 bits
++ 88: s24 (s24), float 32 bits
++ 89: s25 (s25), float 32 bits
++ 90: s26 (s26), float 32 bits
++ 91: s27 (s27), float 32 bits
++ 92: s28 (s28), float 32 bits
++ 93: s29 (s29), float 32 bits
++ 94: s30 (s30), float 32 bits
++ 95: s31 (s31), float 32 bits
+ 256: d0 (d0), float 64 bits
+ 257: d1 (d1), float 64 bits
+ 258: d2 (d2), float 64 bits
+@@ -2723,6 +2809,13 @@ VFP registers:
+ 285: d29 (d29), float 64 bits
+ 286: d30 (d30), float 64 bits
+ 287: d31 (d31), float 64 bits
++state registers:
++ 128: spsr (spsr), unsigned 32 bits
++ 129: spsr_fiq (spsr_fiq), unsigned 32 bits
++ 130: spsr_irq (spsr_irq), unsigned 32 bits
++ 131: spsr_abt (spsr_abt), unsigned 32 bits
++ 132: spsr_und (spsr_und), unsigned 32 bits
++ 133: spsr_svc (spsr_svc), unsigned 32 bits
+ EOF
+
+ # See run-readelf-mixed-corenote.sh for instructions to regenerate
+diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
+index c960f1d..e4bf074 100755
+--- a/tests/run-readelf-mixed-corenote.sh
++++ b/tests/run-readelf-mixed-corenote.sh
+@@ -31,12 +31,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
+- r0: 1 r1: -1091672508 r2: -1091672500
+- r3: 0 r4: 0 r5: 0
+- r6: 33728 r7: 0 r8: 0
+- r9: 0 r10: -1225703496 r11: -1091672844
+- r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48
+- pc: 0x00008500 spsr: 0x60000010
++ r0: 1 r1: -1091672508 r2: -1091672500 r3: 0
++ r4: 0 r5: 0 r6: 33728 r7: 0
++ r8: 0 r9: 0 r10: -1225703496 r11: -1091672844
++ r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48 pc: 0x00008500
++ spsr: 0x60000010
+ 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
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch b/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch
new file mode 100644
index 0000000000..bd98dae4b2
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch
@@ -0,0 +1,20 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: disable -Werror as it tends to break with new gcc versions
+Bug-Debian: https://bugs.debian.org/886004
+Last-Update: 2018-01-01
+
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Index: elfutils-0.176/config/eu.am
+===================================================================
+--- elfutils-0.176.orig/config/eu.am
++++ elfutils-0.176/config/eu.am
+@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -W
+ -Wold-style-definition -Wstrict-prototypes -Wtrampolines \
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
+- $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
+ $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \
diff --git a/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
new file mode 100644
index 0000000000..4460d582c7
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
@@ -0,0 +1,831 @@
+From 8efad9105b38985bea373416ae8fcacf21d1d129 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 21 Aug 2019 15:44:18 +0800
+Subject: [PATCH] hppa backend
+
+Rebase to 0.177
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/Makefile.am | 7 +-
+ backends/libebl_parisc.h | 9 ++
+ backends/parisc_init.c | 73 ++++++++++++++++
+ backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++++++++
+ backends/parisc_reloc.def | 128 ++++++++++++++++++++++++++++
+ backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++
+ backends/parisc_symbol.c | 113 ++++++++++++++++++++++++
+ libelf/elf.h | 11 +++
+ 8 files changed, 711 insertions(+), 2 deletions(-)
+ create mode 100644 backends/libebl_parisc.h
+ create mode 100644 backends/parisc_init.c
+ create mode 100644 backends/parisc_regs.c
+ create mode 100644 backends/parisc_reloc.def
+ create mode 100644 backends/parisc_retval.c
+ create mode 100644 backends/parisc_symbol.c
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 175468f..91a38e2 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -33,16 +33,19 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
+
+
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+- tilegx m68k bpf riscv csky
++ tilegx m68k bpf riscv csky parisc
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
+- libebl_csky_pic.a
++ libebl_csky_pic.a libebl_parisc_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+
+ libelf = ../libelf/libelf.so
+ libdw = ../libdw/libdw.so
+diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h
+new file mode 100644
+index 0000000..f473b79
+--- /dev/null
++++ b/backends/libebl_parisc.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_HPPA_H
++#define _LIBEBL_HPPA_H 1
++
++#include <libdw.h>
++
++extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
++extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+diff --git a/backends/parisc_init.c b/backends/parisc_init.c
+new file mode 100644
+index 0000000..f1e401c
+--- /dev/null
++++ b/backends/parisc_init.c
+@@ -0,0 +1,73 @@
++/* Initialization of PA-RISC specific backend library.
++ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#define BACKEND parisc_
++#define RELOC_PREFIX R_PARISC_
++#include "libebl_CPU.h"
++#include "libebl_parisc.h"
++
++/* This defines the common reloc hooks based on parisc_reloc.def. */
++#include "common-reloc.c"
++
++
++const char *
++parisc_init (Elf *elf __attribute__ ((unused)),
++ GElf_Half machine __attribute__ ((unused)),
++ Ebl *eh,
++ size_t ehlen)
++{
++ int pa64 = 0;
++
++ /* Check whether the Elf_BH object has a sufficent size. */
++ if (ehlen < sizeof (Ebl))
++ return NULL;
++
++ if (elf) {
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE))
++ pa64 = 1;
++ }
++ /* We handle it. */
++ eh->name = "PA-RISC";
++ parisc_init_reloc (eh);
++ HOOK (eh, reloc_simple_type);
++ HOOK (eh, machine_flag_check);
++ HOOK (eh, symbol_type_name);
++ HOOK (eh, segment_type_name);
++ HOOK (eh, section_type_name);
++ HOOK (eh, register_info);
++ if (pa64)
++ eh->return_value_location = parisc_return_value_location_64;
++ else
++ eh->return_value_location = parisc_return_value_location_32;
++
++ return MODVERSION;
++}
+diff --git a/backends/parisc_regs.c b/backends/parisc_regs.c
+new file mode 100644
+index 0000000..3895f8e
+--- /dev/null
++++ b/backends/parisc_regs.c
+@@ -0,0 +1,159 @@
++/* Register names and numbers for PA-RISC DWARF.
++ Copyright (C) 2005, 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <dwarf.h>
++
++#define BACKEND parisc_
++#include "libebl_CPU.h"
++
++ssize_t
++parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
++ const char **prefix, const char **setname,
++ int *bits, int *type)
++{
++ int pa64 = 0;
++
++ if (ebl->elf) {
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem);
++ if (ehdr->e_flags & EF_PARISC_WIDE)
++ pa64 = 1;
++ }
++
++ int nregs = pa64 ? 127 : 128;
++
++ if (name == NULL)
++ return nregs;
++
++ if (regno < 0 || regno >= nregs || namelen < 6)
++ return -1;
++
++ *prefix = "%";
++
++ if (regno < 32)
++ {
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ if (pa64)
++ {
++ *bits = 64;
++ }
++ else
++ {
++ *bits = 32;
++ }
++ }
++ else if (regno == 32)
++ {
++ *setname = "special";
++ if (pa64)
++ {
++ *bits = 6;
++ }
++ else
++ {
++ *bits = 5;
++ }
++ *type = DW_ATE_unsigned;
++ }
++ else
++ {
++ *setname = "FPU";
++ *type = DW_ATE_float;
++ if (pa64)
++ {
++ *bits = 64;
++ }
++ else
++ {
++ *bits = 32;
++ }
++ }
++
++ if (regno < 33) {
++ switch (regno)
++ {
++ case 0 ... 9:
++ name[0] = 'r';
++ name[1] = regno + '0';
++ namelen = 2;
++ break;
++ case 10 ... 31:
++ name[0] = 'r';
++ name[1] = regno / 10 + '0';
++ name[2] = regno % 10 + '0';
++ namelen = 3;
++ break;
++ case 32:
++ *prefix = NULL;
++ name[0] = 'S';
++ name[1] = 'A';
++ name[2] = 'R';
++ namelen = 3;
++ break;
++ }
++ }
++ else {
++ if (pa64 && ((regno - 72) % 2)) {
++ *setname = NULL;
++ return 0;
++ }
++
++ switch (regno)
++ {
++ case 72 + 0 ... 72 + 11:
++ name[0] = 'f';
++ name[1] = 'r';
++ name[2] = (regno + 8 - 72) / 2 + '0';
++ namelen = 3;
++ if ((regno + 8 - 72) % 2) {
++ name[3] = 'R';
++ namelen++;
++ }
++ break;
++ case 72 + 12 ... 72 + 55:
++ name[0] = 'f';
++ name[1] = 'r';
++ name[2] = (regno + 8 - 72) / 2 / 10 + '0';
++ name[3] = (regno + 8 - 72) / 2 % 10 + '0';
++ namelen = 4;
++ if ((regno + 8 - 72) % 2) {
++ name[4] = 'R';
++ namelen++;
++ }
++ break;
++ default:
++ *setname = NULL;
++ return 0;
++ }
++ }
++ name[namelen++] = '\0';
++ return namelen;
++}
+diff --git a/backends/parisc_reloc.def b/backends/parisc_reloc.def
+new file mode 100644
+index 0000000..1f875ba
+--- /dev/null
++++ b/backends/parisc_reloc.def
+@@ -0,0 +1,128 @@
++/* List the relocation types for PA-RISC. -*- C -*-
++ Copyright (C) 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++/* NAME, REL|EXEC|DYN */
++
++RELOC_TYPE (NONE, EXEC|DYN)
++RELOC_TYPE (DIR32, REL|EXEC|DYN)
++RELOC_TYPE (DIR21L, REL|EXEC|DYN)
++RELOC_TYPE (DIR17R, REL)
++RELOC_TYPE (DIR17F, REL)
++RELOC_TYPE (DIR14R, REL|DYN)
++RELOC_TYPE (PCREL32, REL)
++RELOC_TYPE (PCREL21L, REL)
++RELOC_TYPE (PCREL17R, REL)
++RELOC_TYPE (PCREL17F, REL)
++RELOC_TYPE (PCREL14R, REL|EXEC)
++RELOC_TYPE (DPREL21L, REL)
++RELOC_TYPE (DPREL14WR, REL)
++RELOC_TYPE (DPREL14DR, REL)
++RELOC_TYPE (DPREL14R, REL)
++RELOC_TYPE (GPREL21L, 0)
++RELOC_TYPE (GPREL14R, 0)
++RELOC_TYPE (LTOFF21L, REL)
++RELOC_TYPE (LTOFF14R, REL)
++RELOC_TYPE (DLTIND14F, 0)
++RELOC_TYPE (SETBASE, 0)
++RELOC_TYPE (SECREL32, REL)
++RELOC_TYPE (BASEREL21L, 0)
++RELOC_TYPE (BASEREL17R, 0)
++RELOC_TYPE (BASEREL14R, 0)
++RELOC_TYPE (SEGBASE, 0)
++RELOC_TYPE (SEGREL32, REL)
++RELOC_TYPE (PLTOFF21L, 0)
++RELOC_TYPE (PLTOFF14R, 0)
++RELOC_TYPE (PLTOFF14F, 0)
++RELOC_TYPE (LTOFF_FPTR32, 0)
++RELOC_TYPE (LTOFF_FPTR21L, 0)
++RELOC_TYPE (LTOFF_FPTR14R, 0)
++RELOC_TYPE (FPTR64, 0)
++RELOC_TYPE (PLABEL32, REL|DYN)
++RELOC_TYPE (PCREL64, 0)
++RELOC_TYPE (PCREL22C, 0)
++RELOC_TYPE (PCREL22F, 0)
++RELOC_TYPE (PCREL14WR, 0)
++RELOC_TYPE (PCREL14DR, 0)
++RELOC_TYPE (PCREL16F, 0)
++RELOC_TYPE (PCREL16WF, 0)
++RELOC_TYPE (PCREL16DF, 0)
++RELOC_TYPE (DIR64, REL|DYN)
++RELOC_TYPE (DIR14WR, REL)
++RELOC_TYPE (DIR14DR, REL)
++RELOC_TYPE (DIR16F, REL)
++RELOC_TYPE (DIR16WF, REL)
++RELOC_TYPE (DIR16DF, REL)
++RELOC_TYPE (GPREL64, 0)
++RELOC_TYPE (GPREL14WR, 0)
++RELOC_TYPE (GPREL14DR, 0)
++RELOC_TYPE (GPREL16F, 0)
++RELOC_TYPE (GPREL16WF, 0)
++RELOC_TYPE (GPREL16DF, 0)
++RELOC_TYPE (LTOFF64, 0)
++RELOC_TYPE (LTOFF14WR, 0)
++RELOC_TYPE (LTOFF14DR, 0)
++RELOC_TYPE (LTOFF16F, 0)
++RELOC_TYPE (LTOFF16WF, 0)
++RELOC_TYPE (LTOFF16DF, 0)
++RELOC_TYPE (SECREL64, 0)
++RELOC_TYPE (BASEREL14WR, 0)
++RELOC_TYPE (BASEREL14DR, 0)
++RELOC_TYPE (SEGREL64, 0)
++RELOC_TYPE (PLTOFF14WR, 0)
++RELOC_TYPE (PLTOFF14DR, 0)
++RELOC_TYPE (PLTOFF16F, 0)
++RELOC_TYPE (PLTOFF16WF, 0)
++RELOC_TYPE (PLTOFF16DF, 0)
++RELOC_TYPE (LTOFF_FPTR64, 0)
++RELOC_TYPE (LTOFF_FPTR14WR, 0)
++RELOC_TYPE (LTOFF_FPTR14DR, 0)
++RELOC_TYPE (LTOFF_FPTR16F, 0)
++RELOC_TYPE (LTOFF_FPTR16WF, 0)
++RELOC_TYPE (LTOFF_FPTR16DF, 0)
++RELOC_TYPE (COPY, EXEC)
++RELOC_TYPE (IPLT, EXEC|DYN)
++RELOC_TYPE (EPLT, 0)
++RELOC_TYPE (TPREL32, DYN)
++RELOC_TYPE (TPREL21L, 0)
++RELOC_TYPE (TPREL14R, 0)
++RELOC_TYPE (LTOFF_TP21L, 0)
++RELOC_TYPE (LTOFF_TP14R, 0)
++RELOC_TYPE (LTOFF_TP14F, 0)
++RELOC_TYPE (TPREL64, 0)
++RELOC_TYPE (TPREL14WR, 0)
++RELOC_TYPE (TPREL14DR, 0)
++RELOC_TYPE (TPREL16F, 0)
++RELOC_TYPE (TPREL16WF, 0)
++RELOC_TYPE (TPREL16DF, 0)
++RELOC_TYPE (LTOFF_TP64, 0)
++RELOC_TYPE (LTOFF_TP14WR, 0)
++RELOC_TYPE (LTOFF_TP14DR, 0)
++RELOC_TYPE (LTOFF_TP16F, 0)
++RELOC_TYPE (LTOFF_TP16WF, 0)
++RELOC_TYPE (LTOFF_TP16DF, 0)
++RELOC_TYPE (TLS_DTPMOD32, DYN)
++RELOC_TYPE (TLS_DTPMOD64, DYN)
++
++#define NO_RELATIVE_RELOC 1
+diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c
+new file mode 100644
+index 0000000..df7ec3a
+--- /dev/null
++++ b/backends/parisc_retval.c
+@@ -0,0 +1,213 @@
++/* Function return value location for Linux/PA-RISC ABI.
++ Copyright (C) 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <assert.h>
++#include <dwarf.h>
++
++#define BACKEND parisc_
++#include "libebl_CPU.h"
++#include "libebl_parisc.h"
++
++/* %r28, or pair %r28, %r29. */
++static const Dwarf_Op loc_intreg32[] =
++ {
++ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 },
++ };
++
++static const Dwarf_Op loc_intreg[] =
++ {
++ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 },
++ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 },
++ };
++#define nloc_intreg 1
++#define nloc_intregpair 4
++
++/* %fr4L, or pair %fr4L, %fr4R on pa-32 */
++static const Dwarf_Op loc_fpreg32[] =
++ {
++ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 },
++ };
++#define nloc_fpreg32 2
++#define nloc_fpregpair32 4
++
++/* $fr4 */
++static const Dwarf_Op loc_fpreg[] =
++ {
++ { .atom = DW_OP_regx, .number = 72 },
++ };
++#define nloc_fpreg 1
++
++#if 0
++/* The return value is a structure and is actually stored in stack space
++ passed in a hidden argument by the caller. Address of the location is stored
++ in %r28 before function call, but it may be changed by function. */
++static const Dwarf_Op loc_aggregate[] =
++ {
++ { .atom = DW_OP_breg28 },
++ };
++#define nloc_aggregate 1
++#endif
++
++static int
++parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64)
++{
++ Dwarf_Word regsize = pa64 ? 8 : 4;
++
++ /* Start with the function's type, and get the DW_AT_type attribute,
++ which is the type of the return value. */
++
++ Dwarf_Attribute attr_mem;
++ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
++ if (attr == NULL)
++ /* The function has no return value, like a `void' function in C. */
++ return 0;
++
++ Dwarf_Die die_mem;
++ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
++ int tag = dwarf_tag (typedie);
++
++ /* 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)
++ {
++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++ typedie = dwarf_formref_die (attr, &die_mem);
++ tag = dwarf_tag (typedie);
++ }
++
++ switch (tag)
++ {
++ case -1:
++ return -1;
++
++ case DW_TAG_subrange_type:
++ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
++ {
++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++ typedie = dwarf_formref_die (attr, &die_mem);
++ tag = dwarf_tag (typedie);
++ }
++ /* Fall through. */
++
++ case DW_TAG_base_type:
++ case DW_TAG_enumeration_type:
++ case DW_TAG_pointer_type:
++ case DW_TAG_ptr_to_member_type:
++ {
++ Dwarf_Word size;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
++ &attr_mem), &size) != 0)
++ {
++ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
++ size = 4;
++ else
++ return -1;
++ }
++ if (tag == DW_TAG_base_type)
++ {
++ Dwarf_Word encoding;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++ &attr_mem), &encoding) != 0)
++ return -1;
++
++ if (encoding == DW_ATE_float)
++ {
++ if (pa64) {
++ *locp = loc_fpreg;
++ if (size <= 8)
++ return nloc_fpreg;
++ }
++ else {
++ *locp = loc_fpreg32;
++ if (size <= 4)
++ return nloc_fpreg32;
++ else if (size <= 8)
++ return nloc_fpregpair32;
++ }
++ goto aggregate;
++ }
++ }
++ if (pa64)
++ *locp = loc_intreg;
++ else
++ *locp = loc_intreg32;
++ if (size <= regsize)
++ return nloc_intreg;
++ if (size <= 2 * regsize)
++ return nloc_intregpair;
++
++ /* Else fall through. */
++ }
++
++ case DW_TAG_structure_type:
++ case DW_TAG_class_type:
++ case DW_TAG_union_type:
++ case DW_TAG_array_type:
++ aggregate: {
++ Dwarf_Word size;
++ if (dwarf_aggregate_size (typedie, &size) != 0)
++ return -1;
++ if (pa64)
++ *locp = loc_intreg;
++ else
++ *locp = loc_intreg32;
++ if (size <= regsize)
++ return nloc_intreg;
++ if (size <= 2 * regsize)
++ return nloc_intregpair;
++#if 0
++ /* there should be some way to know this location... But I do not see it. */
++ *locp = loc_aggregate;
++ return nloc_aggregate;
++#endif
++ /* fall through. */
++ }
++ }
++
++ /* XXX We don't have a good way to return specific errors from ebl calls.
++ This value means we do not understand the type, but it is well-formed
++ DWARF and might be valid. */
++ return -2;
++}
++
++int
++parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ return parisc_return_value_location_ (functypedie, locp, 0);
++}
++
++int
++parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ return parisc_return_value_location_ (functypedie, locp, 1);
++}
++
+diff --git a/backends/parisc_symbol.c b/backends/parisc_symbol.c
+new file mode 100644
+index 0000000..5754bd8
+--- /dev/null
++++ b/backends/parisc_symbol.c
+@@ -0,0 +1,113 @@
++/* PA-RISC specific symbolic name handling.
++ Copyright (C) 2002, 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <elf.h>
++#include <stddef.h>
++
++#define BACKEND parisc_
++#include "libebl_CPU.h"
++
++const char *
++parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)),
++ size_t len __attribute__ ((unused)))
++{
++ switch (segment)
++ {
++ case PT_PARISC_ARCHEXT:
++ return "PARISC_ARCHEXT";
++ case PT_PARISC_UNWIND:
++ return "PARISC_UNWIND";
++ default:
++ break;
++ }
++ return NULL;
++}
++
++/* Return symbolic representation of symbol type. */
++const char *
++parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)),
++ size_t len __attribute__ ((unused)))
++{
++ if (symbol == STT_PARISC_MILLICODE)
++ return "PARISC_MILLI";
++ return NULL;
++}
++
++/* Return symbolic representation of section type. */
++const char *
++parisc_section_type_name (int type,
++ char *buf __attribute__ ((unused)),
++ size_t len __attribute__ ((unused)))
++{
++ switch (type)
++ {
++ case SHT_PARISC_EXT:
++ return "PARISC_EXT";
++ case SHT_PARISC_UNWIND:
++ return "PARISC_UNWIND";
++ case SHT_PARISC_DOC:
++ return "PARISC_DOC";
++ }
++
++ return NULL;
++}
++
++/* Check whether machine flags are valid. */
++bool
++parisc_machine_flag_check (GElf_Word flags)
++{
++ if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB |
++ EF_PARISC_WIDE | EF_PARISC_NO_KABP |
++ EF_PARISC_LAZYSWAP | EF_PARISC_ARCH))
++ return 0;
++
++ GElf_Word arch = flags & EF_PARISC_ARCH;
++
++ return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) ||
++ (arch == EFA_PARISC_2_0));
++}
++
++/* Check for the simple reloc types. */
++Elf_Type
++parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
++ int *addsub __attribute__ ((unused)))
++{
++ switch (type)
++ {
++ case R_PARISC_DIR64:
++ case R_PARISC_SECREL64:
++ return ELF_T_XWORD;
++ case R_PARISC_DIR32:
++ case R_PARISC_SECREL32:
++ return ELF_T_WORD;
++ default:
++ return ELF_T_NUM;
++ }
++}
+diff --git a/libelf/elf.h b/libelf/elf.h
+index 01648bd..218ceb2 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -2162,16 +2162,24 @@ enum
+ #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
+ #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
+ #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
++#define R_PARISC_DPREL14WR 19
++#define R_PARISC_DPREL14DR 20
+ #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
+ #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
+ #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
+ #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
+ #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
++#define R_PARISC_DLTIND14F 39
++#define R_PARISC_SETBASE 40
+ #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
++#define R_PARISC_BASEREL21L 42
++#define R_PARISC_BASEREL17R 43
++#define R_PARISC_BASEREL14R 46
+ #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
+ #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
+ #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
+ #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
++#define R_PARISC_PLTOFF14F 55
+ #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
+ #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
+ #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
+@@ -2180,6 +2188,7 @@ enum
+ #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
+ #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
+ #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
++#define R_PARISC_PCREL22C 73
+ #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
+ #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
+ #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
+@@ -2205,6 +2214,8 @@ enum
+ #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
+ #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
+ #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
++#define R_PARISC_BASEREL14WR 107
++#define R_PARISC_BASEREL14DR 108
+ #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
+ #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
+ #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch b/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch
new file mode 100644
index 0000000000..62a960f3a8
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Index: elfutils-0.165/tests/run-native-test.sh
+===================================================================
+--- elfutils-0.165.orig/tests/run-native-test.sh
++++ elfutils-0.165/tests/run-native-test.sh
+@@ -83,6 +83,9 @@ native_test()
+ # "cannot attach to process: Function not implemented".
+ [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
+
++# hurd's /proc/$PID/maps does not give paths yet.
++[ "$(uname)" = "GNU" ] && exit 77
++
+ native_test ${abs_builddir}/allregs
+ native_test ${abs_builddir}/funcretval
+
diff --git a/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff b/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff
new file mode 100644
index 0000000000..55513eeddc
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff
@@ -0,0 +1,14 @@
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+--- elfutils-0.165.orig/tests/run-strip-strmerge.sh
++++ elfutils-0.165/tests/run-strip-strmerge.sh
+@@ -30,7 +30,7 @@ remerged=remerged.elf
+ tempfiles $merged $stripped $debugfile $remerged
+
+ echo elflint $input
+-testrun ${abs_top_builddir}/src/elflint --gnu $input
++testrun_on_self_skip ${abs_top_builddir}/src/elflint --gnu $input
+ echo elfstrmerge
+ testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input
+ echo elflint $merged
diff --git a/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch b/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch
new file mode 100644
index 0000000000..e85a2fed9d
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Index: b/tests/run-native-test.sh
+===================================================================
+--- a/tests/run-native-test.sh
++++ b/tests/run-native-test.sh
+@@ -77,6 +77,12 @@ native_test()
+ test $native -eq 0 || testrun "$@" -p $native > /dev/null
+ }
+
++# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does
++# not give absolute paths due to sbuild's bind mounts (bug #570805)
++# therefore the next two test programs are expected to fail with
++# "cannot attach to process: Function not implemented".
++[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
++
+ native_test ${abs_builddir}/allregs
+ native_test ${abs_builddir}/funcretval
+
diff --git a/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff b/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff
new file mode 100644
index 0000000000..1097b0ec6f
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff
@@ -0,0 +1,717 @@
+From 68b497668cde5171880d073a7ea50d11c3bddbfc Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 21 Aug 2019 15:49:52 +0800
+Subject: [PATCH] mips backend
+
+Rebase to 0.177
+Upstream-Status: Pending [from debian]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/Makefile.am | 8 +-
+ backends/mips_init.c | 59 +++++++++
+ backends/mips_regs.c | 104 ++++++++++++++++
+ backends/mips_reloc.def | 79 ++++++++++++
+ backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++
+ backends/mips_symbol.c | 53 ++++++++
+ libebl/eblopenbackend.c | 2 +
+ 7 files changed, 624 insertions(+), 2 deletions(-)
+ create mode 100644 backends/mips_init.c
+ create mode 100644 backends/mips_regs.c
+ create mode 100644 backends/mips_reloc.def
+ create mode 100644 backends/mips_retval.c
+ create mode 100644 backends/mips_symbol.c
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 91a38e2..aba8a4a 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
+
+
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+- tilegx m68k bpf riscv csky parisc
++ tilegx m68k bpf riscv csky parisc mips
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
+- libebl_csky_pic.a libebl_parisc_pic.a
++ libebl_csky_pic.a libebl_parisc_pic.a libebl_mips_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
+@@ -145,6 +145,10 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \
+ libebl_csky_pic_a_SOURCES = $(csky_SRCS)
+ am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os)
+
++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
++libebl_mips_pic_a_SOURCES = $(mips_SRCS)
++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
++
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
+ @rm -f $(@:.so=.map)
+ $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
+diff --git a/backends/mips_init.c b/backends/mips_init.c
+new file mode 100644
+index 0000000..975c04e
+--- /dev/null
++++ b/backends/mips_init.c
+@@ -0,0 +1,59 @@
++/* Initialization of mips specific backend library.
++ Copyright (C) 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#define BACKEND mips_
++#define RELOC_PREFIX R_MIPS_
++#include "libebl_CPU.h"
++
++/* This defines the common reloc hooks based on mips_reloc.def. */
++#include "common-reloc.c"
++
++const char *
++mips_init (Elf *elf __attribute__ ((unused)),
++ GElf_Half machine __attribute__ ((unused)),
++ Ebl *eh,
++ size_t ehlen)
++{
++ /* Check whether the Elf_BH object has a sufficent size. */
++ if (ehlen < sizeof (Ebl))
++ return NULL;
++
++ /* We handle it. */
++ if (machine == EM_MIPS)
++ eh->name = "MIPS R3000 big-endian";
++ else if (machine == EM_MIPS_RS3_LE)
++ eh->name = "MIPS R3000 little-endian";
++
++ mips_init_reloc (eh);
++ HOOK (eh, reloc_simple_type);
++ HOOK (eh, return_value_location);
++ HOOK (eh, register_info);
++
++ return MODVERSION;
++}
+diff --git a/backends/mips_regs.c b/backends/mips_regs.c
+new file mode 100644
+index 0000000..44f86cb
+--- /dev/null
++++ b/backends/mips_regs.c
+@@ -0,0 +1,104 @@
++/* Register names and numbers for MIPS DWARF.
++ Copyright (C) 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <dwarf.h>
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++ssize_t
++mips_register_info (Ebl *ebl __attribute__((unused)),
++ int regno, char *name, size_t namelen,
++ const char **prefix, const char **setname,
++ int *bits, int *type)
++{
++ if (name == NULL)
++ return 66;
++
++ if (regno < 0 || regno > 65 || namelen < 4)
++ return -1;
++
++ *prefix = "$";
++
++ if (regno < 32)
++ {
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ if (regno < 32 + 10)
++ {
++ name[0] = regno + '0';
++ namelen = 1;
++ }
++ else
++ {
++ name[0] = (regno / 10) + '0';
++ name[1] = (regno % 10) + '0';
++ namelen = 2;
++ }
++ }
++ else if (regno < 64)
++ {
++ *setname = "FPU";
++ *type = DW_ATE_float;
++ *bits = 32;
++ name[0] = 'f';
++ if (regno < 32 + 10)
++ {
++ name[1] = (regno - 32) + '0';
++ namelen = 2;
++ }
++ else
++ {
++ name[1] = (regno - 32) / 10 + '0';
++ name[2] = (regno - 32) % 10 + '0';
++ namelen = 3;
++ }
++ }
++ else if (regno == 64)
++ {
++ *type = DW_ATE_signed;
++ *bits = 32;
++ name[0] = 'h';
++ name[1] = 'i';
++ namelen = 2;
++ }
++ else
++ {
++ *type = DW_ATE_signed;
++ *bits = 32;
++ name[0] = 'l';
++ name[1] = 'o';
++ namelen = 2;
++ }
++
++ name[namelen++] = '\0';
++ return namelen;
++}
+diff --git a/backends/mips_reloc.def b/backends/mips_reloc.def
+new file mode 100644
+index 0000000..4579970
+--- /dev/null
++++ b/backends/mips_reloc.def
+@@ -0,0 +1,79 @@
++/* List the relocation types for mips. -*- C -*-
++ Copyright (C) 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++/* NAME, REL|EXEC|DYN */
++
++RELOC_TYPE (NONE, 0)
++RELOC_TYPE (16, 0)
++RELOC_TYPE (32, 0)
++RELOC_TYPE (REL32, 0)
++RELOC_TYPE (26, 0)
++RELOC_TYPE (HI16, 0)
++RELOC_TYPE (LO16, 0)
++RELOC_TYPE (GPREL16, 0)
++RELOC_TYPE (LITERAL, 0)
++RELOC_TYPE (GOT16, 0)
++RELOC_TYPE (PC16, 0)
++RELOC_TYPE (CALL16, 0)
++RELOC_TYPE (GPREL32, 0)
++
++RELOC_TYPE (SHIFT5, 0)
++RELOC_TYPE (SHIFT6, 0)
++RELOC_TYPE (64, 0)
++RELOC_TYPE (GOT_DISP, 0)
++RELOC_TYPE (GOT_PAGE, 0)
++RELOC_TYPE (GOT_OFST, 0)
++RELOC_TYPE (GOT_HI16, 0)
++RELOC_TYPE (GOT_LO16, 0)
++RELOC_TYPE (SUB, 0)
++RELOC_TYPE (INSERT_A, 0)
++RELOC_TYPE (INSERT_B, 0)
++RELOC_TYPE (DELETE, 0)
++RELOC_TYPE (HIGHER, 0)
++RELOC_TYPE (HIGHEST, 0)
++RELOC_TYPE (CALL_HI16, 0)
++RELOC_TYPE (CALL_LO16, 0)
++RELOC_TYPE (SCN_DISP, 0)
++RELOC_TYPE (REL16, 0)
++RELOC_TYPE (ADD_IMMEDIATE, 0)
++RELOC_TYPE (PJUMP, 0)
++RELOC_TYPE (RELGOT, 0)
++RELOC_TYPE (JALR, 0)
++RELOC_TYPE (TLS_DTPMOD32, 0)
++RELOC_TYPE (TLS_DTPREL32, 0)
++RELOC_TYPE (TLS_DTPMOD64, 0)
++RELOC_TYPE (TLS_DTPREL64, 0)
++RELOC_TYPE (TLS_GD, 0)
++RELOC_TYPE (TLS_LDM, 0)
++RELOC_TYPE (TLS_DTPREL_HI16, 0)
++RELOC_TYPE (TLS_DTPREL_LO16, 0)
++RELOC_TYPE (TLS_GOTTPREL, 0)
++RELOC_TYPE (TLS_TPREL32, 0)
++RELOC_TYPE (TLS_TPREL64, 0)
++RELOC_TYPE (TLS_TPREL_HI16, 0)
++RELOC_TYPE (TLS_TPREL_LO16, 0)
++
++#define NO_COPY_RELOC 1
++#define NO_RELATIVE_RELOC 1
+diff --git a/backends/mips_retval.c b/backends/mips_retval.c
+new file mode 100644
+index 0000000..656cd1f
+--- /dev/null
++++ b/backends/mips_retval.c
+@@ -0,0 +1,321 @@
++/* Function return value location for Linux/mips ABI.
++ Copyright (C) 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <assert.h>
++#include <dwarf.h>
++#include <elf.h>
++
++#include "../libebl/libeblP.h"
++#include "../libdw/libdwP.h"
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
++#define EF_MIPS_ABI 0x0000F000
++
++/* The original o32 abi. */
++#define E_MIPS_ABI_O32 0x00001000
++
++/* O32 extended to work on 64 bit architectures */
++#define E_MIPS_ABI_O64 0x00002000
++
++/* EABI in 32 bit mode */
++#define E_MIPS_ABI_EABI32 0x00003000
++
++/* EABI in 64 bit mode */
++#define E_MIPS_ABI_EABI64 0x00004000
++
++/* All the possible MIPS ABIs. */
++enum mips_abi
++ {
++ MIPS_ABI_UNKNOWN = 0,
++ MIPS_ABI_N32,
++ MIPS_ABI_O32,
++ MIPS_ABI_N64,
++ MIPS_ABI_O64,
++ MIPS_ABI_EABI32,
++ MIPS_ABI_EABI64,
++ MIPS_ABI_LAST
++ };
++
++/* Find the mips ABI of the current file */
++enum mips_abi find_mips_abi(Elf *elf)
++{
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++
++ if (ehdr == NULL)
++ return MIPS_ABI_LAST;
++
++ GElf_Word elf_flags = ehdr->e_flags;
++
++ /* Check elf_flags to see if it specifies the ABI being used. */
++ switch ((elf_flags & EF_MIPS_ABI))
++ {
++ case E_MIPS_ABI_O32:
++ return MIPS_ABI_O32;
++ case E_MIPS_ABI_O64:
++ return MIPS_ABI_O64;
++ case E_MIPS_ABI_EABI32:
++ return MIPS_ABI_EABI32;
++ case E_MIPS_ABI_EABI64:
++ return MIPS_ABI_EABI64;
++ default:
++ if ((elf_flags & EF_MIPS_ABI2))
++ return MIPS_ABI_N32;
++ }
++
++ /* GCC creates a pseudo-section whose name describes the ABI. */
++ size_t shstrndx;
++ if (elf_getshdrstrndx (elf, &shstrndx) < 0)
++ return MIPS_ABI_LAST;
++
++ const char *name;
++ Elf_Scn *scn = NULL;
++ while ((scn = elf_nextscn (elf, scn)) != NULL)
++ {
++ GElf_Shdr shdr_mem;
++ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
++ if (shdr == NULL)
++ return MIPS_ABI_LAST;
++
++ name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: "";
++ if (strncmp (name, ".mdebug.", 8) != 0)
++ continue;
++
++ if (strcmp (name, ".mdebug.abi32") == 0)
++ return MIPS_ABI_O32;
++ else if (strcmp (name, ".mdebug.abiN32") == 0)
++ return MIPS_ABI_N32;
++ else if (strcmp (name, ".mdebug.abi64") == 0)
++ return MIPS_ABI_N64;
++ else if (strcmp (name, ".mdebug.abiO64") == 0)
++ return MIPS_ABI_O64;
++ else if (strcmp (name, ".mdebug.eabi32") == 0)
++ return MIPS_ABI_EABI32;
++ else if (strcmp (name, ".mdebug.eabi64") == 0)
++ return MIPS_ABI_EABI64;
++ else
++ return MIPS_ABI_UNKNOWN;
++ }
++
++ return MIPS_ABI_UNKNOWN;
++}
++
++unsigned int
++mips_abi_regsize (enum mips_abi abi)
++{
++ switch (abi)
++ {
++ case MIPS_ABI_EABI32:
++ case MIPS_ABI_O32:
++ return 4;
++ case MIPS_ABI_N32:
++ case MIPS_ABI_N64:
++ case MIPS_ABI_O64:
++ case MIPS_ABI_EABI64:
++ return 8;
++ case MIPS_ABI_UNKNOWN:
++ case MIPS_ABI_LAST:
++ default:
++ return 0;
++ }
++}
++
++
++/* $v0 or pair $v0, $v1 */
++static const Dwarf_Op loc_intreg_o32[] =
++ {
++ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 },
++ };
++
++static const Dwarf_Op loc_intreg[] =
++ {
++ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 },
++ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 },
++ };
++#define nloc_intreg 1
++#define nloc_intregpair 4
++
++/* $f0 (float), or pair $f0, $f1 (double).
++ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */
++static const Dwarf_Op loc_fpreg_o32[] =
++ {
++ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 },
++ };
++
++/* $f0, or pair $f0, $f2. */
++static const Dwarf_Op loc_fpreg[] =
++ {
++ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 },
++ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 },
++ };
++#define nloc_fpreg 1
++#define nloc_fpregpair 4
++#define nloc_fpregquad 8
++
++/* 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 $v0. */
++static const Dwarf_Op loc_aggregate[] =
++ {
++ { .atom = DW_OP_breg2, .number = 0 }
++ };
++#define nloc_aggregate 1
++
++int
++mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ /* First find the ABI used by the elf object */
++ enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);
++
++ /* Something went seriously wrong while trying to figure out the ABI */
++ if (abi == MIPS_ABI_LAST)
++ return -1;
++
++ /* We couldn't identify the ABI, but the file seems valid */
++ if (abi == MIPS_ABI_UNKNOWN)
++ return -2;
++
++ /* Can't handle EABI variants */
++ if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64))
++ return -2;
++
++ unsigned int regsize = mips_abi_regsize (abi);
++ if (!regsize)
++ return -2;
++
++ /* Start with the function's type, and get the DW_AT_type attribute,
++ which is the type of the return value. */
++
++ Dwarf_Attribute attr_mem;
++ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
++ if (attr == NULL)
++ /* The function has no return value, like a `void' function in C. */
++ return 0;
++
++ Dwarf_Die die_mem;
++ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
++ int tag = dwarf_tag (typedie);
++
++ /* 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)
++ {
++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++ typedie = dwarf_formref_die (attr, &die_mem);
++ tag = dwarf_tag (typedie);
++ }
++
++ switch (tag)
++ {
++ case -1:
++ return -1;
++
++ case DW_TAG_subrange_type:
++ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
++ {
++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++ typedie = dwarf_formref_die (attr, &die_mem);
++ tag = dwarf_tag (typedie);
++ }
++ /* Fall through. */
++
++ case DW_TAG_base_type:
++ case DW_TAG_enumeration_type:
++ case DW_TAG_pointer_type:
++ case DW_TAG_ptr_to_member_type:
++ {
++ Dwarf_Word size;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
++ &attr_mem), &size) != 0)
++ {
++ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
++ size = regsize;
++ else
++ return -1;
++ }
++ if (tag == DW_TAG_base_type)
++ {
++ Dwarf_Word encoding;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++ &attr_mem), &encoding) != 0)
++ return -1;
++
++#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc))
++
++ if (encoding == DW_ATE_float)
++ {
++ *locp = ABI_LOC(loc_fpreg, regsize);
++ if (size <= regsize)
++ return nloc_fpreg;
++
++ if (size <= 2*regsize)
++ return nloc_fpregpair;
++
++ if (size <= 4*regsize && abi == MIPS_ABI_O32)
++ return nloc_fpregquad;
++
++ goto aggregate;
++ }
++ }
++ *locp = ABI_LOC(loc_intreg, regsize);
++ if (size <= regsize)
++ return nloc_intreg;
++ if (size <= 2*regsize)
++ return nloc_intregpair;
++
++ /* Else fall through. Shouldn't happen though (at least with gcc) */
++ }
++
++ case DW_TAG_structure_type:
++ case DW_TAG_class_type:
++ case DW_TAG_union_type:
++ case DW_TAG_array_type:
++ aggregate:
++ /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
++ if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
++ return -2;
++
++ *locp = loc_aggregate;
++ return nloc_aggregate;
++ }
++
++ /* XXX We don't have a good way to return specific errors from ebl calls.
++ This value means we do not understand the type, but it is well-formed
++ DWARF and might be valid. */
++ return -2;
++}
+diff --git a/backends/mips_symbol.c b/backends/mips_symbol.c
+new file mode 100644
+index 0000000..261b05d
+--- /dev/null
++++ b/backends/mips_symbol.c
+@@ -0,0 +1,53 @@
++/* MIPS specific symbolic name handling.
++ Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++ Written by Jakub Jelinek <jakub@redhat.com>, 2002.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat 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 a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <elf.h>
++#include <stddef.h>
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++/* Check for the simple reloc types. */
++Elf_Type
++mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
++ int *addsub __attribute__ ((unused)))
++{
++ switch (type)
++ {
++ case R_MIPS_16:
++ return ELF_T_HALF;
++ case R_MIPS_32:
++ return ELF_T_WORD;
++ case R_MIPS_64:
++ return ELF_T_XWORD;
++ default:
++ return ELF_T_NUM;
++ }
++}
+diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
+index 01711f5..d0c3589 100644
+--- a/libebl/eblopenbackend.c
++++ b/libebl/eblopenbackend.c
+@@ -71,6 +71,8 @@ static const struct
+ { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
+ { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
+ { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
++ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
++ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
+
+ { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
+ { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB },
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch b/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch
new file mode 100644
index 0000000000..fda4f68059
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch
@@ -0,0 +1,131 @@
+From 96e38289f2887ddb8e6d2fb91ea04bdbdf034ab5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 21 Aug 2019 17:00:30 +0800
+Subject: [PATCH 2/2] mips_cfi
+
+Upstream-Status: Pending [from debian]
+
+Rebase to 0.177
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/Makefile.am | 2 +-
+ backends/mips_cfi.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ backends/mips_init.c | 1 +
+ 3 files changed, 82 insertions(+), 1 deletion(-)
+ create mode 100644 backends/mips_cfi.c
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index aba8a4a..6ac0eec 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -145,7 +145,7 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \
+ libebl_csky_pic_a_SOURCES = $(csky_SRCS)
+ am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os)
+
+-mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c mips_cfi.c
+ libebl_mips_pic_a_SOURCES = $(mips_SRCS)
+ am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
+
+diff --git a/backends/mips_cfi.c b/backends/mips_cfi.c
+new file mode 100644
+index 0000000..9ffdab5
+--- /dev/null
++++ b/backends/mips_cfi.c
+@@ -0,0 +1,80 @@
++/* MIPS ABI-specified defaults for DWARF CFI.
++ Copyright (C) 2018 Kurt Roeckx, 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 <dwarf.h>
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++int
++mips_abi_cfi (Ebl *ebl __attribute__ ((unused)), Dwarf_CIE *abi_info)
++{
++ static const uint8_t abi_cfi[] =
++ {
++ /* Call-saved regs. */
++ DW_CFA_same_value, ULEB128_7 (16), /* $16 */
++ DW_CFA_same_value, ULEB128_7 (17), /* $17 */
++ DW_CFA_same_value, ULEB128_7 (18), /* $18 */
++ DW_CFA_same_value, ULEB128_7 (19), /* $19 */
++ DW_CFA_same_value, ULEB128_7 (20), /* $20 */
++ DW_CFA_same_value, ULEB128_7 (21), /* $21 */
++ DW_CFA_same_value, ULEB128_7 (22), /* $22 */
++ DW_CFA_same_value, ULEB128_7 (23), /* $23 */
++ DW_CFA_same_value, ULEB128_7 (28), /* $28 */
++ DW_CFA_same_value, ULEB128_7 (29), /* $29 */
++ DW_CFA_same_value, ULEB128_7 (30), /* $30 */
++
++ DW_CFA_same_value, ULEB128_7 (52), /* $f20 */
++ DW_CFA_same_value, ULEB128_7 (53), /* $f21 */
++ DW_CFA_same_value, ULEB128_7 (54), /* $f22 */
++ DW_CFA_same_value, ULEB128_7 (55), /* $f23 */
++ DW_CFA_same_value, ULEB128_7 (56), /* $f24 */
++ DW_CFA_same_value, ULEB128_7 (57), /* $f25 */
++ DW_CFA_same_value, ULEB128_7 (58), /* $f26 */
++ DW_CFA_same_value, ULEB128_7 (59), /* $f27 */
++ DW_CFA_same_value, ULEB128_7 (60), /* $f28 */
++ DW_CFA_same_value, ULEB128_7 (61), /* $f29 */
++ DW_CFA_same_value, ULEB128_7 (62), /* $f30 */
++ DW_CFA_same_value, ULEB128_7 (63), /* $f31 */
++
++ /* The CFA is the SP. */
++ DW_CFA_def_cfa, ULEB128_7 (29), ULEB128_7 (0),
++ };
++
++ abi_info->initial_instructions = abi_cfi;
++ abi_info->initial_instructions_end = &abi_cfi[sizeof abi_cfi];
++ abi_info->data_alignment_factor = 4;
++
++ abi_info->return_address_register = 31; /* $31 */
++
++ return 0;
++}
+diff --git a/backends/mips_init.c b/backends/mips_init.c
+index 8482e7f..bce5abe 100644
+--- a/backends/mips_init.c
++++ b/backends/mips_init.c
+@@ -50,6 +50,7 @@ mips_init (Elf *elf __attribute__ ((unused)),
+ HOOK (eh, reloc_simple_type);
+ HOOK (eh, return_value_location);
+ HOOK (eh, register_info);
++ HOOK (eh, abi_cfi);
+
+ return MODVERSION;
+ }
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
new file mode 100644
index 0000000000..c6d42e163a
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
@@ -0,0 +1,31 @@
+From 7bdc83296865cf2b2a5615dbdb7ac0d441fb1849 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 21 Aug 2019 16:55:01 +0800
+Subject: [PATCH] mips_readelf_w
+
+Upstream-Status: Pending [from debian]
+
+Rebase to 0.177
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/readelf.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/readelf.c b/src/readelf.c
+index 2084fb1..5c02a9b 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -11256,7 +11256,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+
+- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
++ if (shdr != NULL && (
++ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
+ {
+ static const struct
+ {
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
new file mode 100644
index 0000000000..e6d7948c67
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
@@ -0,0 +1,52 @@
+From 6393b0e57872b3ffedf0dbd6784cd29694010878 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 21 Aug 2019 16:59:01 +0800
+Subject: [PATCH 1/2] testsuite-ignore-elflint
+
+Upstream-Status: Pending [from debian]
+
+Rebase to 0.177
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/run-elflint-self.sh | 2 +-
+ tests/test-subr.sh | 15 +++++++++++++++
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh
+index 58fa7d0..85d21a5 100755
+--- a/tests/run-elflint-self.sh
++++ b/tests/run-elflint-self.sh
+@@ -18,5 +18,5 @@
+
+ . $srcdir/test-subr.sh
+
+-testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
++testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+ testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+diff --git a/tests/test-subr.sh b/tests/test-subr.sh
+index 09f428d..26f61f1 100644
+--- a/tests/test-subr.sh
++++ b/tests/test-subr.sh
+@@ -201,3 +201,18 @@ testrun_on_self_quiet()
+ # Only exit if something failed
+ if test $exit_status != 0; then exit $exit_status; fi
+ }
++
++# Same as testrun_on_self(), but skip on failure.
++testrun_on_self_skip()
++{
++ exit_status=0
++
++ for file in $self_test_files; do
++ testrun $* $file \
++ || { echo "*** failure in $* $file"; exit_status=77; }
++ done
++
++ # Only exit if something failed
++ if test $exit_status != 0; then exit $exit_status; fi
++}
++
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/musl-libs.patch b/meta/recipes-devtools/elfutils/files/musl-libs.patch
new file mode 100644
index 0000000000..b9b9f120df
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/musl-libs.patch
@@ -0,0 +1,144 @@
+From d5a1651df9884fcf57ed320bc2f866538af2f420 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 23 Aug 2019 10:18:47 +0800
+Subject: [PATCH 2/3] musl-libs
+
+Collection of fixes needed to compile libelf and other libraries
+provided by elfutils for musl targets
+
+error is glibc specific API, so this patch will mostly not accepted
+upstream given that elfutils has been closely tied to glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [workaround for musl]
+
+Rebase to 0.177
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lib/error.h | 27 +++++++++++++++++++++++++++
+ lib/fixedsizehash.h | 1 -
+ lib/libeu.h | 1 +
+ libdwfl/dwfl_error.c | 9 +++++++++
+ libdwfl/linux-kernel-modules.c | 1 +
+ libelf/elf.h | 9 ++++++---
+ 6 files changed, 44 insertions(+), 4 deletions(-)
+ create mode 100644 lib/error.h
+
+diff --git a/lib/error.h b/lib/error.h
+new file mode 100644
+index 0000000..ef06827
+--- /dev/null
++++ b/lib/error.h
+@@ -0,0 +1,27 @@
++#ifndef _ERROR_H_
++#define _ERROR_H_
++
++#include <stdarg.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++static unsigned int error_message_count = 0;
++
++static inline void error(int status, int errnum, const char* format, ...)
++{
++ va_list ap;
++ fprintf(stderr, "%s: ", program_invocation_name);
++ va_start(ap, format);
++ vfprintf(stderr, format, ap);
++ va_end(ap);
++ if (errnum)
++ fprintf(stderr, ": %s", strerror(errnum));
++ fprintf(stderr, "\n");
++ error_message_count++;
++ if (status)
++ exit(status);
++}
++
++#endif /* _ERROR_H_ */
+diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
+index dac2a5f..43016fc 100644
+--- a/lib/fixedsizehash.h
++++ b/lib/fixedsizehash.h
+@@ -30,7 +30,6 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <sys/cdefs.h>
+
+ #include <system.h>
+
+diff --git a/lib/libeu.h b/lib/libeu.h
+index ecb4d01..edc85e3 100644
+--- a/lib/libeu.h
++++ b/lib/libeu.h
+@@ -29,6 +29,7 @@
+ #ifndef LIBEU_H
+ #define LIBEU_H
+
++#include "system.h"
+ #include <stddef.h>
+ #include <stdint.h>
+
+diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
+index 7bcf61c..11dcc8b 100644
+--- a/libdwfl/dwfl_error.c
++++ b/libdwfl/dwfl_error.c
+@@ -154,7 +154,16 @@ dwfl_errmsg (int error)
+ switch (error &~ 0xffff)
+ {
+ case OTHER_ERROR (ERRNO):
++#if defined(__GLIBC__)
+ return strerror_r (error & 0xffff, "bad", 0);
++#else
++ {
++ static __thread char buf[128] = "";
++ if (strerror_r (error & 0xffff, buf, sizeof(buf)) == 0)
++ return buf;
++ }
++ return "strerror_r() failed";
++#endif
+ case OTHER_ERROR (LIBELF):
+ return elf_errmsg (error & 0xffff);
+ case OTHER_ERROR (LIBDW):
+diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
+index d46ab5a..1c3faee 100644
+--- a/libdwfl/linux-kernel-modules.c
++++ b/libdwfl/linux-kernel-modules.c
+@@ -50,6 +50,7 @@
+ #include <sys/utsname.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include "system.h"
+
+ /* If fts.h is included before config.h, its indirect inclusions may not
+ give us the right LFS aliases of these functions, so map them manually. */
+diff --git a/libelf/elf.h b/libelf/elf.h
+index bed273d..be228e6 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -21,7 +21,9 @@
+
+ #include <features.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Standard ELF types. */
+
+@@ -4029,6 +4031,7 @@ enum
+ #define R_NDS32_TLS_TPOFF 102
+ #define R_NDS32_TLS_DESC 119
+
+-__END_DECLS
+-
++#ifdef __cplusplus
++}
++#endif
+ #endif /* elf.h */
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch b/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
new file mode 100644
index 0000000000..40f2b69cf4
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
@@ -0,0 +1,128 @@
+From 77b89dbc9f9f965ad0ef2e341d7d46bce5f07549 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 23 Aug 2019 10:17:25 +0800
+Subject: [PATCH 1/3] musl-obstack-fts
+
+Look for libfts and libobstack during configure, these
+libraries are external to libc when using musl, whereas
+on glibc these libraries are provided in libc itself.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [workaround for musl]
+
+Rebase to 0.177
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ libdw/Makefile.am | 2 +-
+ src/Makefile.am | 8 ++++----
+ 3 files changed, 59 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f93964c..b87b762 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -494,6 +494,60 @@ else
+ fi
+ AC_SUBST([argp_LDADD])
+
++dnl Check if we have fts available from our libc
++AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [#if !defined(__x86_64__)
++ #undef _FILE_OFFSET_BITS
++ #define _FILE_OFFSET_BITS 32
++ #endif
++ #include <fts.h>],
++ [FTS* fts = 0; return fts_close(fts); return 0;]
++ )],
++ [libc_has_fts="true"],
++ [libc_has_fts="false"]
++)
++
++dnl If our libc doesn't provide fts, then test for libfts
++if test "$libc_has_fts" = "false" ; then
++ AC_MSG_WARN("libc does not have fts")
++ AC_CHECK_LIB([fts], [fts_close], [have_fts="true"], [have_fts="false"])
++
++ if test "$have_fts" = "false"; then
++ AC_MSG_ERROR("no libfts found")
++ else
++ fts_LDADD="-lfts"
++ fi
++else
++ fts_LDADD=""
++fi
++AC_SUBST([fts_LDADD])
++
++dnl Check if we have obstack available from our libc
++AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [#include <obstack.h>],
++ [_obstack_begin(0, 0, 0, NULL, NULL); return 0;]
++ )],
++ [libc_has_obstack="true"],
++ [libc_has_obstack="false"]
++)
++
++dnl If our libc doesn't provide obstack, then test for libobstack
++if test "$libc_has_obstack" = "false" ; then
++ AC_MSG_WARN("libc does not have obstack")
++ AC_CHECK_LIB([obstack], [_obstack_begin], [have_obstack="true"], [have_obstack="false"])
++
++ if test "$have_obstack" = "false"; then
++ AC_MSG_ERROR("no libobstack found")
++ else
++ obstack_LDADD="-lobstack"
++ fi
++else
++ obstack_LDADD=""
++fi
++AC_SUBST([obstack_LDADD])
++
+ dnl The directories with content.
+
+ dnl Documentation.
+diff --git a/libdw/Makefile.am b/libdw/Makefile.am
+index 7a3d532..a541fa3 100644
+--- a/libdw/Makefile.am
++++ b/libdw/Makefile.am
+@@ -108,7 +108,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+ libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ ../libdwfl/libdwfl_pic.a ../libebl/libebl.a
+ libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
+-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS)
++libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LDADD) $(zip_LIBS)
+ libdw_so_SOURCES =
+ libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
+ # The rpath is necessary for libebl because its $ORIGIN use will
+diff --git a/src/Makefile.am b/src/Makefile.am
+index b72f853..2f3dfce 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -69,8 +69,8 @@ ar_no_Wstack_usage = yes
+ unstrip_no_Wstack_usage = yes
+
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
+-nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \
+- $(demanglelib)
++nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \
++ $(obstack_LDADD) -ldl $(demanglelib)
+ size_LDADD = $(libelf) $(libeu) $(argp_LDADD)
+ strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl
+ elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
+@@ -78,9 +78,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD)
+ addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
+ elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
+ objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
+-ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
++ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD)
+ strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
+-ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
++ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD)
+ unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl
+ stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib)
+ elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/musl-tests.patch b/meta/recipes-devtools/elfutils/files/musl-tests.patch
new file mode 100644
index 0000000000..be35791b1a
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/musl-tests.patch
@@ -0,0 +1,29 @@
+Fix error on musl:
+
+| ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main':
+| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'?
+| fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS);
+| ^~~~~~~~
+| EPERM
+| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: note: each undeclared identifier is reported only once for each function it appears in
+
+Upstream-Status: Inappropriate [workaround in musl]
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: elfutils-0.176/tests/elfstrmerge.c
+===================================================================
+--- elfutils-0.176.orig/tests/elfstrmerge.c
++++ elfutils-0.176/tests/elfstrmerge.c
+@@ -33,6 +33,11 @@
+ #include ELFUTILS_HEADER(dwelf)
+ #include "elf-knowledge.h"
+
++/* for musl */
++#ifndef ALLPERMS
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
++#endif
++
+ /* The original ELF file. */
+ static int fd = -1;
+ static Elf *elf = NULL;
diff --git a/meta/recipes-devtools/elfutils/files/musl-utils.patch b/meta/recipes-devtools/elfutils/files/musl-utils.patch
new file mode 100644
index 0000000000..a8ad931236
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/musl-utils.patch
@@ -0,0 +1,165 @@
+From 7f5e2fd86d54e0a4d195ec65afb9b411829dff9f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 23 Aug 2019 10:19:48 +0800
+Subject: [PATCH 3/3] musl-utils
+
+Provide missing defines which otherwise are available on glibc system headers
+
+Alter the error API to match posix version
+use qsort instead of qsort_r which is glibc specific API
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [workaround for musl]
+
+Rebase to 0.177
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/arlib.h | 6 ++++++
+ src/elfcompress.c | 7 +++++++
+ src/readelf.c | 20 ++++++++++++--------
+ src/strip.c | 7 +++++++
+ src/unstrip.c | 9 +++++++++
+ 5 files changed, 41 insertions(+), 8 deletions(-)
+
+diff --git a/src/arlib.h b/src/arlib.h
+index e117166..8326f6c 100644
+--- a/src/arlib.h
++++ b/src/arlib.h
+@@ -29,6 +29,12 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++#if !defined(DEFFILEMODE)
++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
++#endif
+
+ /* State of -D/-U flags. */
+ extern bool arlib_deterministic_output;
+diff --git a/src/elfcompress.c b/src/elfcompress.c
+index 6ba6af4..0c7674b 100644
+--- a/src/elfcompress.c
++++ b/src/elfcompress.c
+@@ -37,6 +37,13 @@
+ #include "libeu.h"
+ #include "printversion.h"
+
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH (0)
++#endif
++
+ /* Name and version of program. */
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+
+diff --git a/src/readelf.c b/src/readelf.c
+index 5c02a9b..817562d 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -4813,10 +4813,11 @@ listptr_base (struct listptr *p)
+ return cudie_base (&cu);
+ }
+
++static const char *listptr_name;
++
+ static int
+-compare_listptr (const void *a, const void *b, void *arg)
++compare_listptr (const void *a, const void *b)
+ {
+- const char *name = arg;
+ struct listptr *p1 = (void *) a;
+ struct listptr *p2 = (void *) b;
+
+@@ -4832,21 +4833,21 @@ compare_listptr (const void *a, const void *b, void *arg)
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different address sizes"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ if (p1->dwarf64 != p2->dwarf64)
+ {
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different offset sizes"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ if (listptr_base (p1) != listptr_base (p2))
+ {
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different base addresses"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ if (p1->attr != p2 ->attr)
+ {
+@@ -4854,7 +4855,7 @@ compare_listptr (const void *a, const void *b, void *arg)
+ error (0, 0,
+ gettext ("%s %#" PRIx64
+ " used with different attribute %s and %s"),
+- name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
++ listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
+ dwarf_attr_name (p2->attr));
+ }
+ }
+@@ -4926,8 +4927,11 @@ static void
+ sort_listptr (struct listptr_table *table, const char *name)
+ {
+ if (table->n > 0)
+- qsort_r (table->table, table->n, sizeof table->table[0],
+- &compare_listptr, (void *) name);
++ {
++ listptr_name = name;
++ qsort (table->table, table->n, sizeof table->table[0],
++ &compare_listptr);
++ }
+ }
+
+ static bool
+diff --git a/src/strip.c b/src/strip.c
+index 4054c2a..d2d2176 100644
+--- a/src/strip.c
++++ b/src/strip.c
+@@ -46,6 +46,13 @@
+ #include <system.h>
+ #include <printversion.h>
+
++#if !defined(ACCESSPERMS)
++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
++#endif
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH (0)
++#endif
++
+ typedef uint8_t GElf_Byte;
+
+ /* Name and version of program. */
+diff --git a/src/unstrip.c b/src/unstrip.c
+index fc87832..21ea6b3 100644
+--- a/src/unstrip.c
++++ b/src/unstrip.c
+@@ -56,6 +56,15 @@
+ # define _(str) gettext (str)
+ #endif
+
++#ifndef strndupa
++#define strndupa(s, n) \
++ ({const char *__in = (s); \
++ size_t __len = strnlen (__in, (n)) + 1; \
++ char *__out = (char *) alloca (__len); \
++ __out[__len-1] = '\0'; \
++ (char *) memcpy (__out, __in, __len-1);})
++#endif
++
+ /* Name and version of program. */
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/elfutils/files/ptest.patch b/meta/recipes-devtools/elfutils/files/ptest.patch
new file mode 100644
index 0000000000..35b23f43b3
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/ptest.patch
@@ -0,0 +1,76 @@
+Changes to allow ptest to run standalone on target:
+
+a) Run the tests serially
+b) Use the standalone test mode which allows the tests to be run in their
+ 'installled' locations on target (but not any of the standalone build pieces)
+c) We want to use the binaries from their installed locations so the run-subr
+ script needs tweaking to run them like that. The rpath conditional isn't
+ enough since we want the second entry in the case statement.
+d) Add an oecheck make target which we can use to build the test binaries we need
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Upstream-Status: Inappropriate [oe specific]
+
+Index: elfutils-0.176/configure.ac
+===================================================================
+--- elfutils-0.176.orig/configure.ac
++++ elfutils-0.176/configure.ac
+@@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 Th
+ AC_PREREQ(2.63) dnl Minimum Autoconf version required.
+
+ dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
+-AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
++AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
+ AM_MAINTAINER_MODE
+
+ AM_SILENT_RULES([yes])
+Index: elfutils-0.176/tests/Makefile.am
+===================================================================
+--- elfutils-0.176.orig/tests/Makefile.am
++++ elfutils-0.176/tests/Makefile.am
+@@ -445,10 +445,10 @@ installed_TESTS_ENVIRONMENT = libdir=$(D
+ installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ installed $(tests_rpath) \
+ '$(program_transform_name)'
+-if STANDALONE
++if !STANDALONE
+ TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+ LOG_COMPILER = $(installed_LOG_COMPILER)
+-else !STANDALONE
++else STANDALONE
+ TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
+ abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \
+ abs_top_builddir=$(abs_top_builddir); \
+@@ -463,7 +463,7 @@ installcheck-local:
+ $(MAKE) $(AM_MAKEFLAGS) \
+ TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
+ LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
+-endif !STANDALONE
++endif STANDALONE
+
+ if STANDALONE
+ libdw = -ldw
+@@ -612,3 +612,5 @@ check: check-am coverage
+ coverage:
+ -$(srcdir)/coverage.sh
+ endif
++oecheck:
++ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+Index: elfutils-0.176/tests/test-subr.sh
+===================================================================
+--- elfutils-0.176.orig/tests/test-subr.sh
++++ elfutils-0.176/tests/test-subr.sh
+@@ -91,12 +91,6 @@ installed_testrun()
+ program="$1"
+ shift
+ case "$program" in
+- ${abs_builddir}/*)
+- if [ "x$elfutils_tests_rpath" != xno ]; then
+- echo >&2 installcheck not possible with --enable-tests-rpath
+- exit 77
+- fi
+- ;;
+ ${abs_top_builddir}/src/*)
+ program=${bindir}/`program_transform ${program##*/}`
+ ;;
diff --git a/meta/recipes-devtools/elfutils/files/run-ptest b/meta/recipes-devtools/elfutils/files/run-ptest
new file mode 100644
index 0000000000..81b81f2f5d
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+#This script is used to run elfutils test suites
+cd tests
+
+make -k runtest-TESTS abs_srcdir=$PWD abs_builddir=$PWD srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed elfutils_tests_rpath=no program_transform_name=s,^,eu-,
diff --git a/meta/recipes-devtools/expect/expect/0001-Resolve-string-formatting-issues.patch b/meta/recipes-devtools/expect/expect/0001-Resolve-string-formatting-issues.patch
new file mode 100644
index 0000000000..af1d8c626c
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect/0001-Resolve-string-formatting-issues.patch
@@ -0,0 +1,29 @@
+From 107cc370705d8520ba42f1416d89ed3544277c83 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 23 Mar 2017 13:44:41 +0200
+Subject: [PATCH] Resolve string formatting issues.
+
+Upstream-Status: Inappropriate [upstream seems dead]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ exp_clib.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/exp_clib.c b/exp_clib.c
+index 172c05e..809200e 100644
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -1476,8 +1476,8 @@ expDiagLogU(str)
+ char *str;
+ {
+ if (exp_is_debugging) {
+- fprintf(stderr,str);
+- if (exp_logfile) fprintf(exp_logfile,str);
++ fprintf(stderr, "%s", str);
++ if (exp_logfile) fprintf(exp_logfile, "%s", str);
+ }
+ }
+
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch b/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch
new file mode 100644
index 0000000000..37512fb9bc
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch
@@ -0,0 +1,55 @@
+From 1407fcad6f1dac0a4efe8041660bf6139c1cd16a Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 24 Sep 2019 13:40:10 +0800
+Subject: [PATCH] exp_main_sub.c: Use PATH_MAX for path
+
+If expect was built from a long path whose length > 200, then it couldn't run:
+$ expect -c 'puts yes'
+*** buffer overflow detected ***: expect terminated
+Aborted (core dumped)
+
+Use PATH_MAX to fix the problem.
+
+Upstream-Status: Pending [Upstream seems dead]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ exp_main_sub.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/exp_main_sub.c b/exp_main_sub.c
+index fcfaa6e..bf6c4be 100644
+--- a/exp_main_sub.c
++++ b/exp_main_sub.c
+@@ -48,6 +48,10 @@ char exp_version[] = PACKAGE_VERSION;
+ #define NEED_TCL_MAJOR 7
+ #define NEED_TCL_MINOR 5
+
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ char *exp_argv0 = "this program"; /* default program name */
+ void (*exp_app_exit)() = 0;
+ void (*exp_event_exit)() = 0;
+@@ -901,7 +905,7 @@ int sys_rc;
+ int rc;
+
+ if (sys_rc) {
+- char file[200];
++ char file[PATH_MAX];
+ int fd;
+
+ sprintf(file,"%s/expect.rc",SCRIPTDIR);
+@@ -917,7 +921,7 @@ int sys_rc;
+ }
+ }
+ if (my_rc) {
+- char file[200];
++ char file[PATH_MAX];
+ char *home;
+ int fd;
+ char *getenv();
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch b/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch
new file mode 100644
index 0000000000..b1d322d5c9
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch
@@ -0,0 +1,91 @@
+From f0049b4b2ea55b3b3c53bf6f0275654801c755d2 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 28 Sep 2017 15:54:55 +0800
+Subject: [PATCH] expect: Fix segfaults if Tcl is built with stubs and Expect
+ is used directly from C program
+
+Description: This dirty hack fixes segfaults if Tcl is built with stubs
+ and Expect is used directly from C program.
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588817
+Example:
+ #include <stdio.h>
+ #include <tcl8.5/expect.h>
+ int main()
+ {
+ FILE *pipe;
+ char *some_command = "uname";
+ char datum;
+ pipe = exp_popen(some_command);
+ if (pipe == NULL) return 1;
+ while ((datum = getc (pipe)) != EOF)
+ printf("%c",datum);
+ }
+Example:
+ #include <stdio.h>
+ #include "expect.h"
+ main()
+ {
+ int fd = 0;
+ fd = exp_spawnl("echo", "echo", "Hello User: Whats up?", (char*) 0);
+ switch (exp_expectl(fd, exp_regexp, "ser:", 1, exp_end)) {
+ case 1: {
+ printf("GOT ser:\n");
+ break;
+ }
+ default: {
+ printf("DEFAULT\n");
+ return 1;
+ }
+ }
+ printf("Normal Exit\n");
+ return 0;
+ }
+Author: Sergei Golovan <sgolovan@debian.org>
+
+Upstream-Status: Pending
+This patch is backported from fedora changes for expect:
+http://pkgs.fedoraproject.org/cgit/rpms/expect.git/commit/
+?h=master&id=b6737eed550be93182f2ed194e836a6cbbcf4fa3
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ exp_clib.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/exp_clib.c b/exp_clib.c
+index 172c05e..19341d5 100644
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -114,7 +114,11 @@ extern unsigned long strtoul _ANSI_ARGS_((CONST char *string,
+ #include <stdlib.h> /* for malloc */
+ #endif
+
+-#include <tcl.h>
++#define ckalloc(x) Tcl_Alloc(x)
++#define ckfree(x) Tcl_Free(x)
++extern char *Tcl_ErrnoMsg(int err);
++extern char *Tcl_Alloc(unsigned int size);
++extern void Tcl_Free(char *ptr);
+ #include "expect.h"
+ #define TclRegError exp_TclRegError
+
+@@ -389,7 +393,7 @@ char *exp;
+ FAIL("regexp too big");
+
+ /* Allocate space. */
+- r = (regexp *)ckalloc(sizeof(regexp) + (unsigned)rcstate->regsize);
++ r = (regexp *)malloc(sizeof(regexp) + (unsigned)rcstate->regsize);
+ if (r == NULL)
+ FAIL("out of space");
+
+@@ -399,7 +403,7 @@ char *exp;
+ rcstate->regcode = r->program;
+ regc(MAGIC, rcstate);
+ if (reg(0, &flags, rcstate) == NULL) {
+- ckfree ((char*) r);
++ free((char*) r);
+ return(NULL);
+ }
+
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/expect/expect_5.45.4.bb b/meta/recipes-devtools/expect/expect_5.45.4.bb
new file mode 100644
index 0000000000..39ae6151f6
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -0,0 +1,77 @@
+SUMMARY = "tool for automating interactive applications according to a script"
+DESCRIPTION = "Expect is a tool for automating interactive applications according to a script. \
+Following the script, Expect knows what can be expected from a program and what \
+the correct response should be. Expect is also useful for testing these same \
+applications. And by adding Tk, you can also wrap interactive applications in \
+X11 GUIs. An interpreted language provides branching and high-level control \
+structures to direct the dialogue. In addition, the user can take control and \
+interact directly when desired, afterward returning control to the script. \
+"
+HOMEPAGE = "http://sourceforge.net/projects/expect/"
+LICENSE = "PD"
+SECTION = "devel"
+
+LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
+
+DEPENDS += "tcl"
+RDEPENDS_${PN} = "tcl"
+
+inherit autotools update-alternatives
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
+ file://0001-configure.in.patch \
+ file://0002-tcl.m4.patch \
+ file://01-example-shebang.patch \
+ file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
+ file://0001-Resolve-string-formatting-issues.patch \
+ file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \
+ file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \
+ "
+SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
+SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
+UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
+
+S = "${WORKDIR}/${BPN}${PV}"
+
+do_install_append() {
+ install -d ${D}${libdir}
+ install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/
+ install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/
+ install -m 0755 ${S}/example/* ${D}${libdir}/expect${PV}/
+ rm ${D}${libdir}/expect${PV}/libexpect*.so
+ sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
+}
+
+# Apparently the public Tcl headers are only in /usr/include/tcl8.6
+# when building for the target and nativesdk.
+TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
+TCL_INCLUDE_PATH_class-native = ""
+
+EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
+ --enable-shared \
+ --enable-threads \
+ --disable-rpath \
+ ${TCL_INCLUDE_PATH} \
+ "
+EXTRA_OEMAKE_install = " 'SCRIPTS=' "
+
+ALTERNATIVE_${PN} = "mkpasswd"
+ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
+# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
+ALTERNATIVE_PRIORITY[mkpasswd] = "40"
+
+FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
+ ${includedir}/expect.h \
+ ${includedir}/expect_tcl.h \
+ ${includedir}/expect_comm.h \
+ ${includedir}/tcldbg.h \
+ ${includedir}/*.h \
+ "
+
+FILES_${PN} += "${libdir}/libexpect${PV}.so \
+ ${libdir}/expect${PV}/* \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/expect/expect_5.45.bb b/meta/recipes-devtools/expect/expect_5.45.bb
deleted file mode 100644
index b4dfe157ce..0000000000
--- a/meta/recipes-devtools/expect/expect_5.45.bb
+++ /dev/null
@@ -1,64 +0,0 @@
-SUMMARY = "tool for automating interactive applications according to a script"
-DESCRIPTION = "Expect is a tool for automating interactive applications according to a script. \
-Following the script, Expect knows what can be expected from a program and what \
-the correct response should be. Expect is also useful for testing these same \
-applications. And by adding Tk, you can also wrap interactive applications in \
-X11 GUIs. An interpreted language provides branching and high-level control \
-structures to direct the dialogue. In addition, the user can take control and \
-interact directly when desired, afterward returning control to the script. \
-"
-HOMEPAGE = "http://sourceforge.net/projects/expect/"
-LICENSE = "PD"
-SECTION = "devel"
-
-LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
-
-DEPENDS += "tcl"
-RDEPENDS_${PN} = "tcl"
-
-inherit autotools
-
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
- file://0001-configure.in.patch \
- file://0002-tcl.m4.patch \
- file://01-example-shebang.patch \
- file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
- "
-SRC_URI[md5sum] = "44e1a4f4c877e9ddc5a542dfa7ecc92b"
-SRC_URI[sha256sum] = "b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
-UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/${BPN}${PV}"
-
-do_install_append() {
- install -d ${D}${libdir}
- install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/
- install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/
- install -m 0755 ${S}/example/* ${D}${libdir}/expect${PV}/
- rm ${D}${libdir}/expect${PV}/libexpect*.so
- sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
-}
-
-EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
- --with-tclinclude=${STAGING_INCDIR}/tcl8.6 \
- --enable-shared \
- --enable-threads \
- --disable-rpath \
- "
-EXTRA_OEMAKE_install = " 'SCRIPTS=' "
-
-FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
- ${includedir}/expect.h \
- ${includedir}/expect_tcl.h \
- ${includedir}/expect_comm.h \
- ${includedir}/tcldbg.h \
- ${includedir}/*.h \
- "
-
-FILES_${PN} += "${libdir}/libexpect${PV}.so \
- ${libdir}/expect${PV}/* \
- "
diff --git a/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb b/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
deleted file mode 100644
index 8fab28f338..0000000000
--- a/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Utility for modifying GPT disk partitioning"
-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"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz"
-SRC_URI[md5sum] = "d7f3d306b083123bcc6f5941efade586"
-SRC_URI[sha256sum] = "864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/"
-UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P<pver>(\d+[\.\-_]*)+)/"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-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/fdisk/gptfdisk_1.0.4.bb b/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb
new file mode 100644
index 0000000000..b043c96543
--- /dev/null
+++ b/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Utility for modifying GPT disk partitioning"
+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"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz"
+SRC_URI[md5sum] = "5ecc3c44913bb6b53d3708d1ac7ac295"
+SRC_URI[sha256sum] = "b663391a6876f19a3cd901d862423a16e2b5ceaa2f4a3b9bb681e64b9c7ba78d"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/"
+UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P<pver>(\d+[\.\-_]*)+)/"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}' gdisk fixparts ${PACKAGECONFIG_CONFARGS}"
+
+PACKAGECONFIG ??= "ncurses popt"
+PACKAGECONFIG[ncurses] = "cgdisk,,ncurses"
+PACKAGECONFIG[popt] = "sgdisk,,popt"
+
+do_install() {
+ install -d ${D}${sbindir}
+ for f in cgdisk sgdisk; do
+ if [ -x $f ]; then
+ install -m 0755 $f ${D}${sbindir}
+ fi
+ done
+ install -m 0755 gdisk ${D}${sbindir}
+ install -m 0755 fixparts ${D}${sbindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/file/file/0001-Add-P-prompt-into-Usage-info.patch b/meta/recipes-devtools/file/file/0001-Add-P-prompt-into-Usage-info.patch
deleted file mode 100644
index 8a16b2cf73..0000000000
--- a/meta/recipes-devtools/file/file/0001-Add-P-prompt-into-Usage-info.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 08abf944b2bff27b6dd325dd15b4861cebef113a Mon Sep 17 00:00:00 2001
-From: Junling Zheng <zhengjunling@huawei.com>
-Date: Wed, 8 Apr 2015 03:26:57 +0000
-Subject: [PATCH] Add -P prompt into Usage info
-
-Currently, Usage info doesn't include -P prompt, add it:
-
-root@arma9el:~# file
-Usage: file [-bcEhikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
- [-e testname] [-F separator] [-f namefile] [-m magicfiles]
- [-P parameter=limits] file ...
- file -C [-m magicfiles]
- file [--help]
-
-Upstream-Status: Submitted
-
-Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
----
- src/file.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/file.c b/src/file.c
-index 2b15e21..e5a957b 100644
---- a/src/file.c
-+++ b/src/file.c
-@@ -76,8 +76,8 @@ int getopt_long(int argc, char * const *argv, const char *optstring, const struc
- # define USAGE \
- "Usage: %s [" FILE_FLAGS \
- "] [--apple] [--extension] [--mime-encoding] [--mime-type]\n" \
-- " [-e testname] [-F separator] [-f namefile] [-m magicfiles] " \
-- "file ...\n" \
-+ " [-e testname] [-F separator] [-f namefile] [-m magicfiles]\n " \
-+ " [-P parameter=limits] file ...\n" \
- " %s -C [-m magicfiles]\n" \
- " %s [--help]\n"
-
---
-1.8.3.4
-
diff --git a/meta/recipes-devtools/file/file/CVE-2019-18218.patch b/meta/recipes-devtools/file/file/CVE-2019-18218.patch
new file mode 100644
index 0000000000..3d02c5ad4b
--- /dev/null
+++ b/meta/recipes-devtools/file/file/CVE-2019-18218.patch
@@ -0,0 +1,55 @@
+cdf_read_property_info in cdf.c in file through 5.37 does not restrict the
+number of CDF_VECTOR elements, which allows a heap-based buffer overflow (4-byte
+out-of-bounds write).
+
+CVE: CVE-2019-18218
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 46a8443f76cec4b41ec736eca396984c74664f84 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Mon, 26 Aug 2019 14:31:39 +0000
+Subject: [PATCH] Limit the number of elements in a vector (found by oss-fuzz)
+
+---
+ src/cdf.c | 9 ++++-----
+ src/cdf.h | 1 +
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/cdf.c b/src/cdf.c
+index 9d6396742..bb81d6374 100644
+--- a/src/cdf.c
++++ b/src/cdf.c
+@@ -1016,8 +1016,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
+ goto out;
+ }
+ nelements = CDF_GETUINT32(q, 1);
+- if (nelements == 0) {
+- DPRINTF(("CDF_VECTOR with nelements == 0\n"));
++ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) {
++ DPRINTF(("CDF_VECTOR with nelements == %"
++ SIZE_T_FORMAT "u\n", nelements));
+ goto out;
+ }
+ slen = 2;
+@@ -1060,8 +1061,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
+ goto out;
+ inp += nelem;
+ }
+- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
+- nelements));
+ for (j = 0; j < nelements && i < sh.sh_properties;
+ j++, i++)
+ {
+diff --git a/src/cdf.h b/src/cdf.h
+index 2f7e554b7..05056668f 100644
+--- a/src/cdf.h
++++ b/src/cdf.h
+@@ -48,6 +48,7 @@
+ typedef int32_t cdf_secid_t;
+
+ #define CDF_LOOP_LIMIT 10000
++#define CDF_ELEMENT_LIMIT 100000
+
+ #define CDF_SECID_NULL 0
+ #define CDF_SECID_FREE -1
diff --git a/meta/recipes-devtools/file/file/debian-742262.patch b/meta/recipes-devtools/file/file/debian-742262.patch
deleted file mode 100644
index 1ef485e93c..0000000000
--- a/meta/recipes-devtools/file/file/debian-742262.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-The awk pattern was checked *before* the Perl pattern, so the perl
-script with BEGIN{...} would be reported as awk, this patch fixes it.
-
-Upstream-Status: Backport [debian]
-
-Signed-off-by: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-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
-@@ -57,6 +57,7 @@
- 0 string/wt #!\ /usr/bin/awk awk script text executable
- !:mime text/x-awk
- 0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk or perl script text
-+!:strength - 12
-
- # AT&T Bell Labs' Plan 9 shell
- 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
diff --git a/meta/recipes-devtools/file/file_5.28.bb b/meta/recipes-devtools/file/file_5.28.bb
deleted file mode 100644
index e64a89c804..0000000000
--- a/meta/recipes-devtools/file/file_5.28.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "File classification tool"
-DESCRIPTION = "File attempts to classify files depending \
-on their contents and prints a description if a match is found."
-HOMEPAGE = "http://www.darwinsys.com/file/"
-SECTION = "console/utils"
-
-# two clause BSD
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
-
-DEPENDS = "zlib file-replacement-native"
-DEPENDS_class-native = "zlib-native"
-
-# Blacklist a bogus tag in upstream check
-UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
-
-SRC_URI = "git://github.com/file/file.git \
- file://debian-742262.patch \
- file://0001-Add-P-prompt-into-Usage-info.patch \
- "
-
-SRCREV = "3c521817322a6bf5160cfeb09b9145ccde587b2a"
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-
-CFLAGS_append = " -std=c99"
-
-FILES_${PN} += "${datadir}/misc/*.mgc"
-
-do_install_append_class-native() {
- create_cmdline_wrapper ${D}/${bindir}/file \
- --magic-file ${datadir}/misc/magic.mgc
-}
-
-do_install_append_class-nativesdk() {
- create_cmdline_wrapper ${D}/${bindir}/file \
- --magic-file ${datadir}/misc/magic.mgc
-}
-
-BBCLASSEXTEND = "native nativesdk"
-PROVIDES_append_class-native = " file-replacement-native"
-# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
-# depends on file-replacement-native.
-bindir_append_class-native = "/file-native"
diff --git a/meta/recipes-devtools/file/file_5.37.bb b/meta/recipes-devtools/file/file_5.37.bb
new file mode 100644
index 0000000000..a96ccc0d39
--- /dev/null
+++ b/meta/recipes-devtools/file/file_5.37.bb
@@ -0,0 +1,50 @@
+SUMMARY = "File classification tool"
+DESCRIPTION = "File attempts to classify files depending \
+on their contents and prints a description if a match is found."
+HOMEPAGE = "http://www.darwinsys.com/file/"
+SECTION = "console/utils"
+
+# two clause BSD
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdda1b"
+
+DEPENDS = "zlib file-replacement-native"
+DEPENDS_class-native = "zlib-native"
+
+SRC_URI = "git://github.com/file/file.git \
+ file://CVE-2019-18218.patch"
+
+SRCREV = "a0d5b0e4e9f97d74a9911e95cedd579852e25398"
+S = "${WORKDIR}/git"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF += "--disable-libseccomp"
+
+ALTERNATIVE_${PN} = "file"
+ALTERNATIVE_LINK_NAME[file] = "${bindir}/file"
+
+EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+
+FILES_${PN} += "${datadir}/misc/*.mgc"
+
+do_compile_append_class-native() {
+ oe_runmake check
+}
+
+do_install_append_class-native() {
+ create_cmdline_wrapper ${D}/${bindir}/file \
+ --magic-file ${datadir}/misc/magic.mgc
+}
+
+do_install_append_class-nativesdk() {
+ create_cmdline_wrapper ${D}/${bindir}/file \
+ --magic-file ${datadir}/misc/magic.mgc
+}
+
+BBCLASSEXTEND = "native nativesdk"
+PROVIDES_append_class-native = " file-replacement-native"
+# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
+# depends on file-replacement-native.
+bindir_append_class-native = "/file-native"
diff --git a/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
new file mode 100644
index 0000000000..60bf7ce8cf
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
@@ -0,0 +1,32 @@
+From ed1f7e9de0d6a1d5a9e581e02a63593d22cf1e52 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Mon, 4 Sep 2017 10:47:33 +0800
+Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac.
+
+This would, e.g. define _GNU_SOURCE in config.h, enabling the
+reallocarray() prototype in glibc 2.26+ on Linux systems with that
+version of glibc.
+
+Fixes #241.
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 55e774b..c879fe1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,8 +25,10 @@
+ # autoconf requirements and initialization
+
+ AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex])
++AC_PREREQ([2.60])
+ AC_CONFIG_SRCDIR([src/scan.l])
+ AC_CONFIG_AUX_DIR([build-aux])
++AC_USE_SYSTEM_EXTENSIONS
+ LT_INIT
+ AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects])
+ AC_CONFIG_HEADER([src/config.h])
diff --git a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
deleted file mode 100644
index 438ca5f527..0000000000
--- a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Tue, 30 Aug 2016 14:25:32 +0200
-Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-fixes:
-
-| error: C++ style comments are not allowed in ISO C90
-| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- src/flex.skl | 2 +-
- src/scan.c | 2 +-
- src/skel.c | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/flex.skl b/src/flex.skl
-index 73a0b9e..ed71627 100644
---- a/src/flex.skl
-+++ b/src/flex.skl
-@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
-- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
-+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
- YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- M4_YY_CALL_LAST_ARG);
-diff --git a/src/scan.c b/src/scan.c
-index b55df2d..f1dce75 100644
---- a/src/scan.c
-+++ b/src/scan.c
-@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
-- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
-+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways...*/
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- );
-diff --git a/src/skel.c b/src/skel.c
-index ef657d3..26cc889 100644
---- a/src/skel.c
-+++ b/src/skel.c
-@@ -2561,7 +2561,7 @@ const char *skel[] = {
- " * scanner will even need a stack. We use 2 instead of 1 to avoid an",
- " * immediate realloc on the next call.",
- " */",
-- " num_to_alloc = 1; // After all that talk, this was set to 1 anyways...",
-+ " num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */",
- " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
- " (num_to_alloc * sizeof(struct yy_buffer_state*)",
- " M4_YY_CALL_LAST_ARG);",
---
-2.5.5
-
diff --git a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
deleted file mode 100644
index 032833ae7a..0000000000
--- a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Inappropriate (embedded specific)
-
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-
-Index: flex-2.5.37/doc/Makefile.am
-===================================================================
---- flex-2.5.37.orig/doc/Makefile.am 2012-07-21 04:18:27.000000000 +0300
-+++ flex-2.5.37/doc/Makefile.am 2013-07-30 17:57:09.834834531 +0300
-@@ -2,7 +2,7 @@
-
- info_TEXINFOS = flex.texi
- dist_man_MANS = flex.1
--dist_doc_DATA= flex.pdf
-+EXTRA_DIST= flex.pdf
-
- CLEANFILES = \
- flex.hks \
diff --git a/meta/recipes-devtools/flex/flex/run-ptest b/meta/recipes-devtools/flex/flex/run-ptest
index 19db337900..037301c40f 100755
--- a/meta/recipes-devtools/flex/flex/run-ptest
+++ b/meta/recipes-devtools/flex/flex/run-ptest
@@ -2,4 +2,4 @@
# make would want to rebuild some files with a compiler otherwise :-/
make FLEX=/usr/bin/flex -t check-TESTS || true
-make FLEX=/usr/bin/flex check-TESTS
+make FLEX=/usr/bin/flex abs_builddir=./ check-TESTS
diff --git a/meta/recipes-devtools/flex/flex_2.6.0.bb b/meta/recipes-devtools/flex/flex_2.6.0.bb
deleted file mode 100644
index db2cf1c6d4..0000000000
--- a/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "Flex (The Fast Lexical Analyzer)"
-DESCRIPTION = "Flex is a fast lexical analyser generator. Flex is a tool for generating programs that recognize \
-lexical patterns in text."
-HOMEPAGE = "http://sourceforge.net/projects/flex/"
-SECTION = "devel"
-LICENSE = "BSD"
-
-DEPENDS = "${@bb.utils.contains('PTEST_ENABLED', '1', 'bison-native flex-native', '', d)}"
-BBCLASSEXTEND = "native nativesdk"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
- file://run-ptest \
- file://do_not_create_pdf_doc.patch \
- file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
- file://0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch \
- ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
- "
-
-SRC_URI[md5sum] = "266270f13c48ed043d95648075084d59"
-SRC_URI[sha256sum] = "24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9"
-
-UPSTREAM_CHECK_REGEX = "flex-(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit autotools gettext texinfo ptest
-
-M4 = "${bindir}/m4"
-M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
-EXTRA_OECONF += "ac_cv_path_M4=${M4}"
-EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
-
-EXTRA_OEMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', 'FLEX=${STAGING_BINDIR_NATIVE}/flex', '', d)}"
-
-do_install_append_class-native() {
- create_wrapper ${D}/${bindir}/flex M4=${M4}
-}
-
-do_install_append_class-nativesdk() {
- create_wrapper ${D}/${bindir}/flex M4=${M4}
-}
-
-RDEPENDS_${PN} += "m4"
-RDEPENDS_${PN}-ptest += "bash gawk"
-
-do_compile_ptest() {
- oe_runmake -C ${B}/tests -f ${B}/tests/Makefile top_builddir=${B} INCLUDES=-I${S}/src buildtests
-}
-
-do_install_ptest() {
- mkdir -p ${D}${PTEST_PATH}/build-aux/
- cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
- cp -r ${S}/tests/* ${D}${PTEST_PATH}
- cp -r ${B}/tests/* ${D}${PTEST_PATH}
- sed -e 's/^Makefile:/_Makefile:/' \
- -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
- -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
- -i ${D}${PTEST_PATH}/Makefile
-}
diff --git a/meta/recipes-devtools/flex/flex_2.6.4.bb b/meta/recipes-devtools/flex/flex_2.6.4.bb
new file mode 100644
index 0000000000..43b2547fc6
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex_2.6.4.bb
@@ -0,0 +1,76 @@
+SUMMARY = "Flex (The Fast Lexical Analyzer)"
+DESCRIPTION = "Flex is a fast lexical analyser generator. Flex is a tool for generating programs that recognize \
+lexical patterns in text."
+HOMEPAGE = "http://sourceforge.net/projects/flex/"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+
+DEPENDS = "${@bb.utils.contains('PTEST_ENABLED', '1', 'bison-native flex-native', '', d)}"
+BBCLASSEXTEND = "native nativesdk"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
+
+SRC_URI = "https://github.com/westes/flex/releases/download/v${PV}/flex-${PV}.tar.gz \
+ file://run-ptest \
+ file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
+ file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \
+ "
+
+SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d"
+SRC_URI[sha256sum] = "e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995"
+
+# Flex has moved to github from 2.6.1 onwards
+UPSTREAM_CHECK_URI = "https://github.com/westes/flex/releases"
+UPSTREAM_CHECK_REGEX = "flex-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools gettext texinfo ptest
+
+M4 = "${bindir}/m4"
+M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
+EXTRA_OECONF += "ac_cv_path_M4=${M4} ac_cv_func_reallocarray=no"
+EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
+
+EXTRA_OEMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', 'FLEX=${STAGING_BINDIR_NATIVE}/flex', '', d)}"
+
+do_install_append_class-native() {
+ create_wrapper ${D}/${bindir}/flex M4=${M4}
+}
+
+do_install_append_class-nativesdk() {
+ create_wrapper ${D}/${bindir}/flex M4=${M4}
+}
+
+PACKAGES =+ "${PN}-libfl"
+
+FILES_${PN}-libfl = "${libdir}/libfl.so.* ${libdir}/libfl_pic.so.*"
+
+RDEPENDS_${PN} += "m4"
+RDEPENDS_${PN}-ptest += "bash gawk make"
+
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests -f ${B}/tests/Makefile top_builddir=${B} INCLUDES=-I${S}/src buildtests
+}
+
+do_install_ptest() {
+ mkdir -p ${D}${PTEST_PATH}/build-aux/
+ cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
+ cp -r ${S}/tests/* ${D}${PTEST_PATH}
+ cp -r ${B}/tests/* ${D}${PTEST_PATH}
+ sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \
+ -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
+ -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
+ -e 's:${UNINATIVE_LOADER}:${base_bindir}/false:g' \
+ -i ${D}${PTEST_PATH}/Makefile
+}
+# The uninative loader is different on i386 & x86_64 hosts. Since it is only
+# being replaced with /bin/false anyway, it doesn't need to be part of the task
+# hash
+do_install_ptest[vardepsexclude] += "UNINATIVE_LOADER"
+
+# Not Apache Flex, or Adobe Flex, or IBM Flex.
+CVE_PRODUCT = "flex_project:flex"
diff --git a/meta/recipes-devtools/gcc/gcc-5.4.inc b/meta/recipes-devtools/gcc/gcc-5.4.inc
deleted file mode 100644
index 338530fd6d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4.inc
+++ /dev/null
@@ -1,146 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "5.4.0"
-
-#SNAP = "5-20150405"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "5.4.0"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-5.4:${FILE_DIRNAME}/gcc-5.4/backport:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-#BASEURI = "http://www.netgull.com/gcc/snapshots/${SNAP}/gcc-${SNAP}.tar.bz2"
-BASEURI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
-
-SRC_URI = "\
- ${BASEURI} \
- ${BACKPORTS} \
- file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0002-uclibc-conf.patch \
- file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
- file://0004-uclibc-locale.patch \
- file://0005-uclibc-locale-no__x.patch \
- file://0006-uclibc-locale-wchar_fix.patch \
- file://0007-uclibc-locale-update.patch \
- file://0008-missing-execinfo_h.patch \
- file://0009-c99-snprintf.patch \
- file://0010-gcc-poison-system-directories.patch \
- file://0011-gcc-poison-dir-extend.patch \
- file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0013-64-bit-multilib-hack.patch \
- file://0014-optional-libstdc.patch \
- file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0016-COLLECT_GCC_OPTIONS.patch \
- file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0018-fortran-cross-compile-hack.patch \
- file://0019-libgcc-sjlj-check.patch \
- file://0020-cpp-honor-sysroot.patch \
- file://0021-MIPS64-Default-to-N64-ABI.patch \
- file://0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0023-gcc-Fix-argument-list-too-long-error.patch \
- file://0024-Disable-sdt.patch \
- file://0025-libtool.patch \
- file://0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
- file://0029-export-CPP.patch \
- file://0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
- file://0032-Ensure-target-gcc-headers-can-be-included.patch \
- file://0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
- file://0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
- file://0035-Dont-link-the-plugins-with-libgomp-explicitly.patch \
- file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
- file://0037-aarch64-Add-support-for-musl-ldso.patch \
- file://0038-fix-g-sysroot.patch \
- file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
- file://0040-handle-sysroot-support-for-nativesdk-gcc.patch \
- file://0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
- file://0042-Fix-various-_FOR_BUILD-and-related-variables.patch \
- file://0043-libstdc-Support-musl.patch \
- file://0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch \
- file://0045-Support-for-arm-linux-musl.patch \
- file://0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch \
- file://0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
- file://0048-ssp_nonshared.patch \
- file://0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch \
- file://0050-powerpc-pass-secure-plt-to-the-linker.patch \
- file://0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \
- file://0052-nios2-use-ret-with-r31.patch \
- file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \
- file://0054-support-ffile-prefix-map.patch \
- file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
- file://0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch \
- file://0057-unwind-fix-for-musl.patch \
- file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \
- file://0059-libgcc-use-ldflags.patch \
-"
-
-BACKPORTS = ""
-
-SRC_URI[md5sum] = "4c626ac2a83ef30dfb9260e6f59c2b30"
-SRC_URI[sha256sum] = "608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a"
-
-UPSTREAM_CHECK_REGEX = "gcc-(?P<pver>5\.\d+\.\d+).tar"
-
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${SNAP}"
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
- ${LTO} \
- --enable-libssp \
- --enable-libitm \
- --disable-bootstrap \
- --disable-libmudflap \
- --with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
- --enable-linker-build-id \
- --with-ppl=no \
- --with-cloog=no \
- --enable-checking=release \
- --enable-cheaders=c_global \
- --without-isl \
-"
-
-EXTRA_OECONF_INITIAL = "\
- --disable-libmudflap \
- --disable-libgomp \
- --disable-libitm \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no \
- --without-isl \
- gcc_cv_libc_provides_ssp=yes \
-"
-
-EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-
-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-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 1aead9691a..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6029bb338305a5d1403ee23427ed8d58eae1ff53 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:37:11 +0400
-Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- configure | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index a3f66ba..1cba3a9 100755
---- a/configure
-+++ b/configure
-@@ -7464,7 +7464,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
-diff --git a/configure.ac b/configure.ac
-index 987dfab..d3adb95 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3104,7 +3104,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch b/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch
deleted file mode 100644
index 8d6aeb5e43..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From b67c3a844bccec1766a7ec120e2d18cdcbc5f114 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:38:25 +0400
-Subject: [PATCH 02/46] uclibc-conf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- contrib/regression/objs-gcc.sh | 4 ++++
- libjava/classpath/ltconfig | 4 ++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
-index 60b0497..6dc7ead 100755
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
-diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
-index 743d951..ae4ea60 100755
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
deleted file mode 100644
index bd0326343e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 9bcb3a1848ff0f8990301ca09a25b15c2cf90c6f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:40:12 +0400
-Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
- libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++
- libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
-index 6da5f22..2f85c2f 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.cc
-+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
-@@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
- #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
- #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
- extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
-+#ifdef __UCLIBC__
-+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
-+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
-+#else
- _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
-+#endif
- #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
-index ee3ef86..7fd5485 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -40,13 +40,22 @@
-
- #include <clocale>
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- #define _GLIBCXX_NUM_CATEGORIES 0
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
-+#ifdef __UCLIBC__
-+ typedef __ctype_touplow_t* __c_locale;
-+#else
- typedef int* __c_locale;
-+#endif
-
- // Convert numeric value of type double and long double to string and
- // return length of string. If vsnprintf is available use it, otherwise
-diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-index fd52b73..2627cf3 100644
---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-@@ -33,6 +33,11 @@
-
- // Information as gleaned from /usr/include/ctype.h
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- struct ctype_base
- {
- // Non-standard typedefs.
-+#ifdef __UCLIBC__
-+ typedef const __ctype_touplow_t* __to_type;
-+#else
- typedef const int* __to_type;
-+#endif
-
- // NB: Offsets into ctype<char>::_M_table force a particular size
- // on the mask type. Because of this, we don't use an enum.
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch b/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch
deleted file mode 100644
index 656265a285..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch
+++ /dev/null
@@ -1,2862 +0,0 @@
-From bd9dd472d162fc72522f96f70f6391c7c63d2bf7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:41:39 +0400
-Subject: [PATCH 04/46] uclibc-locale
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/acinclude.m4 | 37 ++
- .../config/locale/uclibc/c++locale_internal.h | 63 ++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++
- .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++
- .../config/locale/uclibc/collate_members.cc | 80 +++
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
- .../config/locale/uclibc/messages_members.cc | 100 +++
- .../config/locale/uclibc/messages_members.h | 118 ++++
- .../config/locale/uclibc/monetary_members.cc | 692 +++++++++++++++++++++
- .../config/locale/uclibc/numeric_members.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++
- libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++
- libstdc++-v3/configure | 75 +++
- libstdc++-v3/include/c_compatibility/wchar.h | 2 +
- libstdc++-v3/include/c_std/cwchar | 2 +
- 16 files changed, 2688 insertions(+)
- create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
-
-diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
-index 826ef86..79cc716 100644
---- a/libstdc++-v3/acinclude.m4
-+++ b/libstdc++-v3/acinclude.m4
-@@ -2029,6 +2029,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -2213,6 +2216,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ AC_MSG_RESULT(uclibc)
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+ AC_SUBST(glibcxx_MOFILES)
-+ AC_SUBST(glibcxx_POFILES)
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-new file mode 100644
-index 0000000..2ae3e4a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -0,0 +1,63 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+// Written by Jakub Jelinek <jakub@redhat.com>
-+
-+#include <bits/c++config.h>
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+
-+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
-+extern "C" __typeof(strcoll_l) __strcoll_l;
-+extern "C" __typeof(strftime_l) __strftime_l;
-+extern "C" __typeof(strtod_l) __strtod_l;
-+extern "C" __typeof(strtof_l) __strtof_l;
-+extern "C" __typeof(strtold_l) __strtold_l;
-+extern "C" __typeof(strxfrm_l) __strxfrm_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+extern "C" __typeof(iswctype_l) __iswctype_l;
-+extern "C" __typeof(towlower_l) __towlower_l;
-+extern "C" __typeof(towupper_l) __towupper_l;
-+extern "C" __typeof(wcscoll_l) __wcscoll_l;
-+extern "C" __typeof(wcsftime_l) __wcsftime_l;
-+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
-+extern "C" __typeof(wctype_l) __wctype_l;
-+#endif
-+
-+#endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-new file mode 100644
-index 0000000..5081dc1
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -0,0 +1,160 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <cerrno> // For errno
-+#include <locale>
-+#include <stdexcept>
-+#include <langinfo.h>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
-+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
-+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
-+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
-+#define __strtof_l(S, E, L) strtof((S), (E))
-+#define __strtod_l(S, E, L) strtod((S), (E))
-+#define __strtold_l(S, E, L) strtold((S), (E))
-+#warning should dummy __newlocale check for C|POSIX ?
-+#define __newlocale(a, b, c) NULL
-+#define __freelocale(a) ((void)0)
-+#define __duplocale(a) __c_locale()
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ void
-+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
-+ __c_locale __old)
-+ {
-+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ if (!__cloc)
-+ {
-+ // This named locale is not supported by the underlying OS.
-+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+ "name not valid"));
-+ }
-+#endif
-+ }
-+
-+ void
-+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+ {
-+ if (_S_get_c_locale() != __cloc)
-+ __freelocale(__cloc);
-+ }
-+
-+ __c_locale
-+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-+ { return __duplocale(__cloc); }
-+} // namespace std
-+
-+namespace __gnu_cxx
-+{
-+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+ {
-+ "LC_CTYPE",
-+ "LC_NUMERIC",
-+ "LC_TIME",
-+ "LC_COLLATE",
-+ "LC_MONETARY",
-+ "LC_MESSAGES",
-+#if _GLIBCXX_NUM_CATEGORIES != 0
-+ "LC_PAPER",
-+ "LC_NAME",
-+ "LC_ADDRESS",
-+ "LC_TELEPHONE",
-+ "LC_MEASUREMENT",
-+ "LC_IDENTIFICATION"
-+#endif
-+ };
-+}
-+
-+namespace std
-+{
-+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+} // namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-new file mode 100644
-index 0000000..da07c1f
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -0,0 +1,117 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifndef _C_LOCALE_H
-+#define _C_LOCALE_H 1
-+
-+#pragma GCC system_header
-+
-+#include <cstring> // get std::strlen
-+#include <cstdio> // get std::snprintf or std::sprintf
-+#include <clocale>
-+#include <langinfo.h> // For codecvt
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC_HAS_LOCALE__
-+#include <iconv.h> // For codecvt using iconv, iconv_t
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#include <libintl.h> // For messages
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning what is _GLIBCXX_C_LOCALE_GNU for
-+#endif
-+#define _GLIBCXX_C_LOCALE_GNU 1
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix categories
-+#endif
-+// #define _GLIBCXX_NUM_CATEGORIES 6
-+#define _GLIBCXX_NUM_CATEGORIES 0
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+namespace __gnu_cxx
-+{
-+ extern "C" __typeof(uselocale) __uselocale;
-+}
-+#endif
-+
-+namespace std
-+{
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ typedef __locale_t __c_locale;
-+#else
-+ typedef int* __c_locale;
-+#endif
-+
-+ // Convert numeric value of type _Tv to string and return length of
-+ // string. If snprintf is available use it, otherwise fall back to
-+ // the unsafe sprintf which, in general, can be dangerous and should
-+ // be avoided.
-+ template<typename _Tv>
-+ int
-+ __convert_from_v(char* __out,
-+ const int __size __attribute__ ((__unused__)),
-+ const char* __fmt,
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ _Tv __v, const __c_locale& __cloc, int __prec)
-+ {
-+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
-+#else
-+ _Tv __v, const __c_locale&, int __prec)
-+ {
-+# ifdef __UCLIBC_HAS_LOCALE__
-+ char* __old = std::setlocale(LC_ALL, NULL);
-+ char* __sav = new char[std::strlen(__old) + 1];
-+ std::strcpy(__sav, __old);
-+ std::setlocale(LC_ALL, "C");
-+# endif
-+#endif
-+
-+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ __gnu_cxx::__uselocale(__old);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ std::setlocale(LC_ALL, __sav);
-+ delete [] __sav;
-+#endif
-+ return __ret;
-+ }
-+}
-+
-+#endif
-diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-new file mode 100644
-index 0000000..64aa962
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-@@ -0,0 +1,308 @@
-+// std::codecvt implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <cstdlib> // For MB_CUR_MAX
-+#include <climits> // For MB_LEN_MAX
-+#include <bits/c++locale_internal.h>
-+
-+namespace std
-+{
-+ // Specializations.
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_out(state_type& __state, const intern_type* __from,
-+ const intern_type* __from_end, const intern_type*& __from_next,
-+ extern_type* __to, extern_type* __to_end,
-+ extern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
-+ // in case we fall back to wcrtomb and then continue, in a loop.
-+ // NB: wcsnrtombs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
-+ __from_end - __from_next);
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // wcrtomb.
-+ for (; __from < __from_next; ++__from)
-+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ extern_type __buf[MB_LEN_MAX];
-+ __tmp_state = __state;
-+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
-+ if (__conv > static_cast<size_t>(__to_end - __to_next))
-+ __ret = partial;
-+ else
-+ {
-+ memcpy(__to_next, __buf, __conv);
-+ __state = __tmp_state;
-+ __to_next += __conv;
-+ ++__from_next;
-+ }
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_in(state_type& __state, const extern_type* __from,
-+ const extern_type* __from_end, const extern_type*& __from_next,
-+ intern_type* __to, intern_type* __to_end,
-+ intern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we store a L'\0' and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
-+ __from_end
-+ - __from_next));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (;; ++__to_next, __from += __conv)
-+ {
-+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __from_next = __from;
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ // It is unclear what to return in this case (see DR 382).
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ if (__to_next < __to_end)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from_next;
-+ *__to_next++ = L'\0';
-+ }
-+ else
-+ __ret = partial;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_encoding() const throw()
-+ {
-+ // XXX This implementation assumes that the encoding is
-+ // stateless and is either single-byte or variable-width.
-+ int __ret = 0;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ if (MB_CUR_MAX == 1)
-+ __ret = 1;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_max_length() const throw()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ // XXX Probably wrong for stateful encodings.
-+ int __ret = MB_CUR_MAX;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_length(state_type& __state, const extern_type* __from,
-+ const extern_type* __end, size_t __max) const
-+ {
-+ int __ret = 0;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we advance past it and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+
-+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
-+ // its fourth parameter (it wouldn't with NULL as first parameter).
-+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
-+ * __max));
-+ while (__from < __end && __max)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
-+ __end
-+ - __from));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __end;
-+
-+ const extern_type* __tmp_from = __from;
-+ size_t __conv = mbsnrtowcs(__to, &__from,
-+ __from_chunk_end - __from,
-+ __max, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (__from = __tmp_from;; __from += __conv)
-+ {
-+ __conv = mbrtowc(NULL, __from, __end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __state = __tmp_state;
-+ __ret += __from - __tmp_from;
-+ break;
-+ }
-+ if (!__from)
-+ __from = __from_chunk_end;
-+
-+ __ret += __from - __tmp_from;
-+ __max -= __conv;
-+
-+ if (__from < __end && __max)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from;
-+ ++__ret;
-+ --__max;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-new file mode 100644
-index 0000000..c2664a7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -0,0 +1,80 @@
-+// std::collate implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+#endif
-+
-+namespace std
-+{
-+ // These are basically extensions to char_traits, and perhaps should
-+ // be put there instead of here.
-+ template<>
-+ int
-+ collate<char>::_M_compare(const char* __one, const char* __two) const
-+ {
-+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<char>::_M_transform(char* __to, const char* __from,
-+ size_t __n) const
-+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ int
-+ collate<wchar_t>::_M_compare(const wchar_t* __one,
-+ const wchar_t* __two) const
-+ {
-+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
-+ size_t __n) const
-+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-new file mode 100644
-index 0000000..7294e3a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -0,0 +1,300 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __wctype_l(S, L) wctype((S))
-+#define __towupper_l(C, L) towupper((C))
-+#define __towlower_l(C, L) towlower((C))
-+#define __iswctype_l(C, M, L) iswctype((C), (M))
-+#endif
-+
-+namespace std
-+{
-+ // NB: The other ctype<char> specializations are in src/locale.cc and
-+ // various /config/os/* files.
-+ template<>
-+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+ : ctype<char>(0, false, __refs)
-+ {
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
-+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
-+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
-+#endif
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ ctype<wchar_t>::__wmask_type
-+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
-+ {
-+ __wmask_type __ret;
-+ switch (__m)
-+ {
-+ case space:
-+ __ret = __wctype_l("space", _M_c_locale_ctype);
-+ break;
-+ case print:
-+ __ret = __wctype_l("print", _M_c_locale_ctype);
-+ break;
-+ case cntrl:
-+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
-+ break;
-+ case upper:
-+ __ret = __wctype_l("upper", _M_c_locale_ctype);
-+ break;
-+ case lower:
-+ __ret = __wctype_l("lower", _M_c_locale_ctype);
-+ break;
-+ case alpha:
-+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
-+ break;
-+ case digit:
-+ __ret = __wctype_l("digit", _M_c_locale_ctype);
-+ break;
-+ case punct:
-+ __ret = __wctype_l("punct", _M_c_locale_ctype);
-+ break;
-+ case xdigit:
-+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
-+ break;
-+ case alnum:
-+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
-+ break;
-+ case graph:
-+ __ret = __wctype_l("graph", _M_c_locale_ctype);
-+ break;
-+ default:
-+ __ret = __wmask_type();
-+ }
-+ return __ret;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_toupper(wchar_t __c) const
-+ { return __towupper_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_tolower(wchar_t __c) const
-+ { return __towlower_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ bool
-+ ctype<wchar_t>::
-+ do_is(mask __m, wchar_t __c) const
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ bool __ret = false;
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur]
-+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ return __ret;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+ {
-+ for (; __lo < __hi; ++__vec, ++__lo)
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ mask __m = 0;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ __m |= _M_bit[__bitcur];
-+ *__vec = __m;
-+ }
-+ return __hi;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi && !this->do_is(__m, *__lo))
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+ {
-+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::
-+ do_widen(char __c) const
-+ { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+ const char*
-+ ctype<wchar_t>::
-+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+ ++__lo;
-+ ++__dest;
-+ }
-+ return __hi;
-+ }
-+
-+ char
-+ ctype<wchar_t>::
-+ do_narrow(wchar_t __wc, char __dfault) const
-+ {
-+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+ return _M_narrow[__wc];
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ const int __c = wctob(__wc);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
-+ char* __dest) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ if (_M_narrow_ok)
-+ while (__lo < __hi)
-+ {
-+ if (*__lo >= 0 && *__lo < 128)
-+ *__dest = _M_narrow[*__lo];
-+ else
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+ ++__lo;
-+ ++__dest;
-+ }
-+ else
-+ while (__lo < __hi)
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ ++__lo;
-+ ++__dest;
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __hi;
-+ }
-+
-+ void
-+ ctype<wchar_t>::_M_initialize_ctype()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ wint_t __i;
-+ for (__i = 0; __i < 128; ++__i)
-+ {
-+ const int __c = wctob(__i);
-+ if (__c == EOF)
-+ break;
-+ else
-+ _M_narrow[__i] = static_cast<char>(__c);
-+ }
-+ if (__i == 128)
-+ _M_narrow_ok = true;
-+ else
-+ _M_narrow_ok = false;
-+ for (size_t __j = 0;
-+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
-+ _M_widen[__j] = btowc(__j);
-+
-+ for (size_t __k = 0; __k <= 11; ++__k)
-+ {
-+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
-+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ }
-+#endif // _GLIBCXX_USE_WCHAR_T
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-new file mode 100644
-index 0000000..13594d9
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -0,0 +1,100 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix gettext stuff
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__dcgettext(const char *domainname,
-+ const char *msgid, int category);
-+#undef gettext
-+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#else
-+#undef gettext
-+#define gettext(msgid) (msgid)
-+#endif
-+
-+namespace std
-+{
-+ // Specializations.
-+ template<>
-+ string
-+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
-+ __uselocale(__old);
-+ return string(__msg);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ const char* __msg = gettext(__dfault.c_str());
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return string(__msg);
-+#else
-+ const char* __msg = gettext(__dfault.c_str());
-+ return string(__msg);
-+#endif
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ wstring
-+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
-+ {
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ __uselocale(__old);
-+ return _M_convert_from_char(__msg);
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return _M_convert_from_char(__msg);
-+# else
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ return _M_convert_from_char(__msg);
-+# endif
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-new file mode 100644
-index 0000000..1424078
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -0,0 +1,118 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix prototypes for *textdomain funcs
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__textdomain(const char *domainname);
-+extern "C" char *__bindtextdomain(const char *domainname,
-+ const char *dirname);
-+#else
-+#undef __textdomain
-+#undef __bindtextdomain
-+#define __textdomain(D) ((void)0)
-+#define __bindtextdomain(D,P) ((void)0)
-+#endif
-+
-+ // Non-virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::messages(size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
-+ _M_name_messages(_S_get_c_name())
-+ { }
-+
-+ template<typename _CharT>
-+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-+ _M_name_messages(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_messages = __tmp;
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
-+ const char* __dir) const
-+ {
-+ __bindtextdomain(__s.c_str(), __dir);
-+ return this->do_open(__s, __loc);
-+ }
-+
-+ // Virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::~messages()
-+ {
-+ if (_M_name_messages != _S_get_c_name())
-+ delete [] _M_name_messages;
-+ _S_destroy_c_locale(_M_c_locale_messages);
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::do_open(const basic_string<char>& __s,
-+ const locale&) const
-+ {
-+ // No error checking is done, assume the catalog exists and can
-+ // be used.
-+ __textdomain(__s.c_str());
-+ return 0;
-+ }
-+
-+ template<typename _CharT>
-+ void
-+ messages<_CharT>::do_close(catalog) const
-+ { }
-+
-+ // messages_byname
-+ template<typename _CharT>
-+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+ : messages<_CharT>(__refs)
-+ {
-+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
-+ delete [] this->_M_name_messages;
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ this->_M_name_messages = __tmp;
-+
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
-+ }
-+ }
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-new file mode 100644
-index 0000000..aa52731
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -0,0 +1,692 @@
-+// std::moneypunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning optimize this for uclibc
-+#warning tailor for stub locale support
-+#endif
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ // Construct and return valid pattern consisting of some combination of:
-+ // space none symbol sign value
-+ money_base::pattern
-+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+ {
-+ pattern __ret;
-+
-+ // This insanely complicated routine attempts to construct a valid
-+ // pattern for use with monyepunct. A couple of invariants:
-+
-+ // if (__precedes) symbol -> value
-+ // else value -> symbol
-+
-+ // if (__space) space
-+ // else none
-+
-+ // none == never first
-+ // space never first or last
-+
-+ // Any elegant implementations of this are welcome.
-+ switch (__posn)
-+ {
-+ case 0:
-+ case 1:
-+ // 1 The sign precedes the value and symbol.
-+ __ret.field[0] = sign;
-+ if (__space)
-+ {
-+ // Pattern starts with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[3] = symbol;
-+ }
-+ __ret.field[2] = space;
-+ }
-+ else
-+ {
-+ // Pattern starts with sign and ends with none.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 2:
-+ // 2 The sign follows the value and symbol.
-+ if (__space)
-+ {
-+ // Pattern either ends with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[1] = space;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ // Pattern ends with sign then none.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[1] = symbol;
-+ }
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 3:
-+ // 3 The sign immediately precedes the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = sign;
-+ __ret.field[1] = symbol;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = symbol;
-+ }
-+ else
-+ {
-+ __ret.field[1] = sign;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ case 4:
-+ // 4 The sign immediately follows the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = sign;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ default:
-+ ;
-+ }
-+ return __ret;
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == false
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<char, true>::~moneypunct()
-+ { delete _M_data; }
-+
-+ template<>
-+ moneypunct<char, false>::~moneypunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len;
-+ __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, true>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, false>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-new file mode 100644
-index 0000000..883ec1a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -0,0 +1,160 @@
-+// std::numpunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
-+ __cloc));
-+
-+ // Check for NULL, which implies no grouping.
-+ if (_M_data->_M_thousands_sep == '\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = "true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = "false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<char>::~numpunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<wchar_t>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+ // NB: In the GNU model wchar_t is always 32 bit wide.
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+
-+ if (_M_data->_M_thousands_sep == L'\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = L"true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = L"false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<wchar_t>::~numpunct()
-+ { delete _M_data; }
-+ #endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-new file mode 100644
-index 0000000..e0707d7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -0,0 +1,406 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __timepunct<char>::
-+ _M_put(char* __s, size_t __maxlen, const char* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = '\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = "%m/%d/%y";
-+ _M_data->_M_date_era_format = "%m/%d/%y";
-+ _M_data->_M_time_format = "%H:%M:%S";
-+ _M_data->_M_time_era_format = "%H:%M:%S";
-+ _M_data->_M_date_time_format = "";
-+ _M_data->_M_date_time_era_format = "";
-+ _M_data->_M_am = "AM";
-+ _M_data->_M_pm = "PM";
-+ _M_data->_M_am_pm_format = "";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = "Sunday";
-+ _M_data->_M_day2 = "Monday";
-+ _M_data->_M_day3 = "Tuesday";
-+ _M_data->_M_day4 = "Wednesday";
-+ _M_data->_M_day5 = "Thursday";
-+ _M_data->_M_day6 = "Friday";
-+ _M_data->_M_day7 = "Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = "Sun";
-+ _M_data->_M_aday2 = "Mon";
-+ _M_data->_M_aday3 = "Tue";
-+ _M_data->_M_aday4 = "Wed";
-+ _M_data->_M_aday5 = "Thu";
-+ _M_data->_M_aday6 = "Fri";
-+ _M_data->_M_aday7 = "Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = "January";
-+ _M_data->_M_month02 = "February";
-+ _M_data->_M_month03 = "March";
-+ _M_data->_M_month04 = "April";
-+ _M_data->_M_month05 = "May";
-+ _M_data->_M_month06 = "June";
-+ _M_data->_M_month07 = "July";
-+ _M_data->_M_month08 = "August";
-+ _M_data->_M_month09 = "September";
-+ _M_data->_M_month10 = "October";
-+ _M_data->_M_month11 = "November";
-+ _M_data->_M_month12 = "December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = "Jan";
-+ _M_data->_M_amonth02 = "Feb";
-+ _M_data->_M_amonth03 = "Mar";
-+ _M_data->_M_amonth04 = "Apr";
-+ _M_data->_M_amonth05 = "May";
-+ _M_data->_M_amonth06 = "Jun";
-+ _M_data->_M_amonth07 = "Jul";
-+ _M_data->_M_amonth08 = "Aug";
-+ _M_data->_M_amonth09 = "Sep";
-+ _M_data->_M_amonth10 = "Oct";
-+ _M_data->_M_amonth11 = "Nov";
-+ _M_data->_M_amonth12 = "Dec";
-+ }
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
-+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
-+ __cloc);
-+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
-+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
-+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
-+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
-+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
-+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
-+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
-+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
-+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
-+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
-+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
-+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
-+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
-+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
-+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
-+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
-+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
-+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
-+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
-+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
-+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
-+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
-+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
-+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
-+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
-+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
-+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
-+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
-+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
-+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
-+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
-+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
-+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
-+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
-+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
-+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
-+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ __timepunct<wchar_t>::
-+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
-+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = L'\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<wchar_t>;
-+
-+#warning wide time stuff
-+// if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = L"%m/%d/%y";
-+ _M_data->_M_date_era_format = L"%m/%d/%y";
-+ _M_data->_M_time_format = L"%H:%M:%S";
-+ _M_data->_M_time_era_format = L"%H:%M:%S";
-+ _M_data->_M_date_time_format = L"";
-+ _M_data->_M_date_time_era_format = L"";
-+ _M_data->_M_am = L"AM";
-+ _M_data->_M_pm = L"PM";
-+ _M_data->_M_am_pm_format = L"";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = L"Sunday";
-+ _M_data->_M_day2 = L"Monday";
-+ _M_data->_M_day3 = L"Tuesday";
-+ _M_data->_M_day4 = L"Wednesday";
-+ _M_data->_M_day5 = L"Thursday";
-+ _M_data->_M_day6 = L"Friday";
-+ _M_data->_M_day7 = L"Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = L"Sun";
-+ _M_data->_M_aday2 = L"Mon";
-+ _M_data->_M_aday3 = L"Tue";
-+ _M_data->_M_aday4 = L"Wed";
-+ _M_data->_M_aday5 = L"Thu";
-+ _M_data->_M_aday6 = L"Fri";
-+ _M_data->_M_aday7 = L"Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = L"January";
-+ _M_data->_M_month02 = L"February";
-+ _M_data->_M_month03 = L"March";
-+ _M_data->_M_month04 = L"April";
-+ _M_data->_M_month05 = L"May";
-+ _M_data->_M_month06 = L"June";
-+ _M_data->_M_month07 = L"July";
-+ _M_data->_M_month08 = L"August";
-+ _M_data->_M_month09 = L"September";
-+ _M_data->_M_month10 = L"October";
-+ _M_data->_M_month11 = L"November";
-+ _M_data->_M_month12 = L"December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = L"Jan";
-+ _M_data->_M_amonth02 = L"Feb";
-+ _M_data->_M_amonth03 = L"Mar";
-+ _M_data->_M_amonth04 = L"Apr";
-+ _M_data->_M_amonth05 = L"May";
-+ _M_data->_M_amonth06 = L"Jun";
-+ _M_data->_M_amonth07 = L"Jul";
-+ _M_data->_M_amonth08 = L"Aug";
-+ _M_data->_M_amonth09 = L"Sep";
-+ _M_data->_M_amonth10 = L"Oct";
-+ _M_data->_M_amonth11 = L"Nov";
-+ _M_data->_M_amonth12 = L"Dec";
-+ }
-+#if 0
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ union { char *__s; wchar_t *__w; } __u;
-+
-+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
-+ _M_data->_M_date_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
-+ _M_data->_M_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
-+ _M_data->_M_am = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
-+ _M_data->_M_pm = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
-+ _M_data->_M_am_pm_format = __u.__w;
-+
-+ // Day names, starting with "C"'s Sunday.
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
-+ _M_data->_M_day1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
-+ _M_data->_M_day2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
-+ _M_data->_M_day3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
-+ _M_data->_M_day4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
-+ _M_data->_M_day5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
-+ _M_data->_M_day6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
-+ _M_data->_M_day7 = __u.__w;
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
-+ _M_data->_M_aday1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
-+ _M_data->_M_aday2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
-+ _M_data->_M_aday3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
-+ _M_data->_M_aday4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
-+ _M_data->_M_aday5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
-+ _M_data->_M_aday6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
-+ _M_data->_M_aday7 = __u.__w;
-+
-+ // Month names, starting with "C"'s January.
-+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
-+ _M_data->_M_month01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
-+ _M_data->_M_month02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
-+ _M_data->_M_month03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
-+ _M_data->_M_month04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
-+ _M_data->_M_month05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
-+ _M_data->_M_month06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
-+ _M_data->_M_month07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
-+ _M_data->_M_month08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
-+ _M_data->_M_month09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
-+ _M_data->_M_month10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
-+ _M_data->_M_month11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
-+ _M_data->_M_month12 = __u.__w;
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
-+ _M_data->_M_amonth01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
-+ _M_data->_M_amonth02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
-+ _M_data->_M_amonth03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
-+ _M_data->_M_amonth04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
-+ _M_data->_M_amonth05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
-+ _M_data->_M_amonth06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
-+ _M_data->_M_amonth07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
-+ _M_data->_M_amonth08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
-+ _M_data->_M_amonth09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
-+ _M_data->_M_amonth10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
-+ _M_data->_M_amonth11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
-+ _M_data->_M_amonth12 = __u.__w;
-+ }
-+#endif // 0
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-new file mode 100644
-index 0000000..ba8e858
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -0,0 +1,68 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
-+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_timepunct = __tmp;
-+ _M_initialize_timepunct(__cloc);
-+ }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::~__timepunct()
-+ {
-+ if (_M_name_timepunct != _S_get_c_name())
-+ delete [] _M_name_timepunct;
-+ delete _M_data;
-+ _S_destroy_c_locale(_M_c_locale_timepunct);
-+ }
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 8cd4c76..217012e 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -15918,6 +15918,9 @@ fi
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -16196,6 +16199,78 @@ $as_echo "newlib" >&6; }
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
-+$as_echo "uclibc" >&6; }
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$check_msgfmt"; then
-+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_check_msgfmt="yes"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
-+fi
-+fi
-+check_msgfmt=$ac_cv_prog_check_msgfmt
-+if test -n "$check_msgfmt"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
-+$as_echo "$check_msgfmt" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+
-+
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
-index 06b5d47..7d3f835 100644
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -101,7 +101,9 @@ using std::wmemcmp;
- using std::wmemcpy;
- using std::wmemmove;
- using std::wmemset;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using std::wcsftime;
-+#endif
-
- #if _GLIBCXX_USE_C99
- using std::wcstold;
-diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
-index aa1b2fa..45c4617 100644
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- using ::wcscoll;
- using ::wcscpy;
- using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using ::wcsftime;
-+#endif
- using ::wcslen;
- using ::wcsncat;
- using ::wcsncmp;
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch b/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch
deleted file mode 100644
index 19a86a4e1d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From 72a1a4af3c18627f59aa5ba1f753a89011b4e4f0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:42:36 +0400
-Subject: [PATCH 05/46] uclibc-locale-no__x
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 -------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 1 +
- .../config/locale/uclibc/collate_members.cc | 7 ----
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ----
- .../config/locale/uclibc/messages_members.cc | 7 +---
- .../config/locale/uclibc/messages_members.h | 18 ++++-----
- .../config/locale/uclibc/monetary_members.cc | 4 --
- .../config/locale/uclibc/numeric_members.cc | 3 --
- libstdc++-v3/config/locale/uclibc/time_members.cc | 3 --
- 10 files changed, 55 insertions(+), 54 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index 2ae3e4a..e74fddf 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
- extern "C" __typeof(wctype_l) __wctype_l;
- #endif
-
-+# define __nl_langinfo_l nl_langinfo_l
-+# define __strcoll_l strcoll_l
-+# define __strftime_l strftime_l
-+# define __strtod_l strtod_l
-+# define __strtof_l strtof_l
-+# define __strtold_l strtold_l
-+# define __strxfrm_l strxfrm_l
-+# define __newlocale newlocale
-+# define __freelocale freelocale
-+# define __duplocale duplocale
-+# define __uselocale uselocale
-+
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l iswctype_l
-+# define __towlower_l towlower_l
-+# define __towupper_l towupper_l
-+# define __wcscoll_l wcscoll_l
-+# define __wcsftime_l wcsftime_l
-+# define __wcsxfrm_l wcsxfrm_l
-+# define __wctype_l wctype_l
-+# endif
-+
-+#else
-+# define __nl_langinfo_l(N, L) nl_langinfo((N))
-+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+# define __strtod_l(S, E, L) strtod((S), (E))
-+# define __strtof_l(S, E, L) strtof((S), (E))
-+# define __strtold_l(S, E, L) strtold((S), (E))
-+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+# warning should dummy __newlocale check for C|POSIX ?
-+# define __newlocale(a, b, c) NULL
-+# define __freelocale(a) ((void)0)
-+# define __duplocale(a) __c_locale()
-+//# define __uselocale ?
-+//
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l(C, M, L) iswctype((C), (M))
-+# define __towlower_l(C, L) towlower((C))
-+# define __towupper_l(C, L) towupper((C))
-+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
-+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+# define __wctype_l(S, L) wctype((S))
-+# endif
-+
- #endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 5081dc1..21430d0 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,20 +39,6 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
--#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
--#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
--#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
--#define __strtof_l(S, E, L) strtof((S), (E))
--#define __strtod_l(S, E, L) strtod((S), (E))
--#define __strtold_l(S, E, L) strtold((S), (E))
--#warning should dummy __newlocale check for C|POSIX ?
--#define __newlocale(a, b, c) NULL
--#define __freelocale(a) ((void)0)
--#define __duplocale(a) __c_locale()
--#endif
--
- namespace std
- {
- template<>
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index da07c1f..4bca5f1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -68,6 +68,7 @@ namespace __gnu_cxx
- {
- extern "C" __typeof(uselocale) __uselocale;
- }
-+#define __uselocale uselocale
- #endif
-
- namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-index c2664a7..ec5c329 100644
---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -36,13 +36,6 @@
- #include <locale>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
--#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
--#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
--#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
--#endif
--
- namespace std
- {
- // These are basically extensions to char_traits, and perhaps should
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7294e3a..7b12861 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -38,13 +38,6 @@
- #undef _LIBC
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __wctype_l(S, L) wctype((S))
--#define __towupper_l(C, L) towupper((C))
--#define __towlower_l(C, L) towlower((C))
--#define __iswctype_l(C, M, L) iswctype((C), (M))
--#endif
--
- namespace std
- {
- // NB: The other ctype<char> specializations are in src/locale.cc and
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-index 13594d9..d7693b4 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -39,13 +39,10 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix gettext stuff
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__dcgettext(const char *domainname,
-- const char *msgid, int category);
- #undef gettext
--#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
- #else
--#undef gettext
- #define gettext(msgid) (msgid)
- #endif
-
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 1424078..d89da33 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -36,15 +36,11 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__textdomain(const char *domainname);
--extern "C" char *__bindtextdomain(const char *domainname,
-- const char *dirname);
--#else
--#undef __textdomain
--#undef __bindtextdomain
--#define __textdomain(D) ((void)0)
--#define __bindtextdomain(D,P) ((void)0)
-+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#undef textdomain
-+#undef bindtextdomain
-+#define textdomain(D) ((void)0)
-+#define bindtextdomain(D,P) ((void)0)
- #endif
-
- // Non-virtual member functions.
-@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
- const char* __dir) const
- {
-- __bindtextdomain(__s.c_str(), __dir);
-+ bindtextdomain(__s.c_str(), __dir);
- return this->do_open(__s, __loc);
- }
-
-@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- {
- // No error checking is done, assume the catalog exists and can
- // be used.
-- __textdomain(__s.c_str());
-+ textdomain(__s.c_str());
- return 0;
- }
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index aa52731..2e6f80a 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -43,10 +43,6 @@
- #warning tailor for stub locale support
- #endif
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
--
- namespace std
- {
- // Construct and return valid pattern consisting of some combination of:
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 883ec1a..2c70642 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -41,9 +41,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index e0707d7..d848ed5 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -40,9 +40,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch b/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch
deleted file mode 100644
index d7dbe68bd2..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From b1298344f0c221c382a95af689f7f3ecd864f531 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:45:57 +0400
-Subject: [PATCH 06/46] uclibc-locale-wchar_fix
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++--
- libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 2e6f80a..31ebb9f 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -401,7 +401,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-@@ -556,7 +556,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 2c70642..d5c8961 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -127,12 +127,25 @@ namespace std
- {
- // Named locale.
- // NB: In the GNU model wchar_t is always 32 bit wide.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be numeric
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
- union { char *__s; wchar_t __w; } __u;
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
- _M_data->_M_decimal_point = __u.__w;
-
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
- _M_data->_M_thousands_sep = __u.__w;
-+#endif
-
- if (_M_data->_M_thousands_sep == L'\0')
- _M_data->_M_grouping = "";
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch b/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch
deleted file mode 100644
index cde749931d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch
+++ /dev/null
@@ -1,542 +0,0 @@
-From e9d7cb62741c22d667fe56e98d50753d89aefdc3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:46:58 +0400
-Subject: [PATCH 07/46] uclibc-locale-update
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 3 +
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 ++++++++++------------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++------
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++----
- .../config/locale/uclibc/messages_members.h | 12 ++--
- .../config/locale/uclibc/monetary_members.cc | 34 ++++++----
- .../config/locale/uclibc/numeric_members.cc | 5 ++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 18 ++++--
- libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++--
- 9 files changed, 158 insertions(+), 98 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index e74fddf..971a6b4 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -31,6 +31,9 @@
-
- #include <bits/c++config.h>
- #include <clocale>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstddef>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning clean this up
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 21430d0..1b9d8e1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,23 +39,20 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- template<>
- void
- __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- float __f = __strtof_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __f;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -63,16 +60,13 @@ namespace std
- __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- double __d = __strtod_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __d;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -80,16 +74,13 @@ namespace std
- __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- long double __ld = __strtold_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __ld;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- void
-@@ -110,17 +101,18 @@ namespace std
- void
- locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
- {
-- if (_S_get_c_locale() != __cloc)
-+ if (__cloc && _S_get_c_locale() != __cloc)
- __freelocale(__cloc);
- }
-
- __c_locale
- locale::facet::_S_clone_c_locale(__c_locale& __cloc)
- { return __duplocale(__cloc); }
--} // namespace std
-
--namespace __gnu_cxx
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-+
- const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
- {
- "LC_CTYPE",
-@@ -138,9 +130,11 @@ namespace __gnu_cxx
- "LC_IDENTIFICATION"
- #endif
- };
--}
-
--namespace std
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- const char* const* const locale::_S_categories = __gnu_cxx::category_names;
--} // namespace std
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index 4bca5f1..64a6d46 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -39,21 +39,23 @@
- #pragma GCC system_header
-
- #include <cstring> // get std::strlen
--#include <cstdio> // get std::snprintf or std::sprintf
-+#include <cstdio> // get std::vsnprintf or std::vsprintf
- #include <clocale>
- #include <langinfo.h> // For codecvt
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix this
- #endif
--#ifdef __UCLIBC_HAS_LOCALE__
-+#ifdef _GLIBCXX_USE_ICONV
- #include <iconv.h> // For codecvt using iconv, iconv_t
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--#include <libintl.h> // For messages
-+#ifdef HAVE_LIBINTL_H
-+#include <libintl.h> // For messages
- #endif
-+#include <cstdarg>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning what is _GLIBCXX_C_LOCALE_GNU for
-+// psm: used in os/gnu-linux/ctype_noninline.h
- #endif
- #define _GLIBCXX_C_LOCALE_GNU 1
-
-@@ -78,23 +80,25 @@ namespace std
- #else
- typedef int* __c_locale;
- #endif
--
-- // Convert numeric value of type _Tv to string and return length of
-- // string. If snprintf is available use it, otherwise fall back to
-- // the unsafe sprintf which, in general, can be dangerous and should
-+ // Convert numeric value of type double to string and return length of
-+ // string. If vsnprintf is available use it, otherwise fall back to
-+ // the unsafe vsprintf which, in general, can be dangerous and should
- // be avoided.
-- template<typename _Tv>
-- int
-- __convert_from_v(char* __out,
-- const int __size __attribute__ ((__unused__)),
-- const char* __fmt,
--#ifdef __UCLIBC_HAS_XCLOCALE__
-- _Tv __v, const __c_locale& __cloc, int __prec)
-+ inline int
-+ __convert_from_v(const __c_locale&
-+#ifndef __UCLIBC_HAS_XCLOCALE__
-+ __cloc __attribute__ ((__unused__))
-+#endif
-+ ,
-+ char* __out,
-+ const int __size,
-+ const char* __fmt, ...)
- {
-+ va_list __args;
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+
- __c_locale __old = __gnu_cxx::__uselocale(__cloc);
- #else
-- _Tv __v, const __c_locale&, int __prec)
-- {
- # ifdef __UCLIBC_HAS_LOCALE__
- char* __old = std::setlocale(LC_ALL, NULL);
- char* __sav = new char[std::strlen(__old) + 1];
-@@ -103,7 +107,9 @@ namespace std
- # endif
- #endif
-
-- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+ va_start(__args, __fmt);
-+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
-+ va_end(__args);
-
- #ifdef __UCLIBC_HAS_XCLOCALE__
- __gnu_cxx::__uselocale(__old);
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7b12861..13e011d 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -33,16 +33,20 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- // NB: The other ctype<char> specializations are in src/locale.cc and
- // various /config/os/* files.
-- template<>
- ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
- : ctype<char>(0, false, __refs)
- {
-@@ -57,6 +61,8 @@ namespace std
- #endif
- }
- }
-+ ctype_byname<char>::~ctype_byname()
-+ { }
-
- #ifdef _GLIBCXX_USE_WCHAR_T
- ctype<wchar_t>::__wmask_type
-@@ -138,17 +144,33 @@ namespace std
- ctype<wchar_t>::
- do_is(mask __m, wchar_t __c) const
- {
-- // Highest bitmask in ctype_base == 10, but extra in "C"
-- // library for blank.
-+ // The case of __m == ctype_base::space is particularly important,
-+ // due to its use in many istream functions. Therefore we deal with
-+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
-+ // is the mask corresponding to ctype_base::space. NB: an encoding
-+ // change would not affect correctness!
-+
- bool __ret = false;
-- const size_t __bitmasksize = 11;
-- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-- if (__m & _M_bit[__bitcur]
-- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-- {
-- __ret = true;
-- break;
-- }
-+ if (__m == _M_bit[5])
-+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
-+ else
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur])
-+ {
-+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ else if (__m == _M_bit[__bitcur])
-+ break;
-+ }
-+ }
-+
- return __ret;
- }
-
-@@ -290,4 +312,5 @@ namespace std
- #endif
- }
- #endif // _GLIBCXX_USE_WCHAR_T
--}
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index d89da33..067657a 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -53,12 +53,16 @@
- template<typename _CharT>
- messages<_CharT>::messages(__c_locale __cloc, const char* __s,
- size_t __refs)
-- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-- _M_name_messages(__s)
-+ : facet(__refs), _M_c_locale_messages(NULL),
-+ _M_name_messages(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_messages = __tmp;
-+
-+ // Last to avoid leaking memory if new throws.
-+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
- }
-
- template<typename _CharT>
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 31ebb9f..7679b9c 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -206,7 +211,7 @@ namespace std
- }
- break;
- default:
-- ;
-+ __ret = pattern();
- }
- return __ret;
- }
-@@ -390,7 +395,9 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
- setlocale(LC_ALL, __name);
- #endif
-
-@@ -477,8 +484,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -498,8 +505,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-@@ -545,8 +552,11 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-- setlocale(LC_ALL, __name);
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
-+ setlocale(LC_ALL, __name);
- #endif
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -633,8 +643,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -653,8 +663,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index d5c8961..8ae8969 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index d848ed5..f24d53e 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -53,11 +53,14 @@ namespace std
- const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = strftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-@@ -207,11 +210,14 @@ namespace std
- const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index ba8e858..1665dde 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -50,12 +50,21 @@
- __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
- size_t __refs)
- : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-- _M_name_timepunct(__s)
-+ _M_name_timepunct(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_timepunct = __tmp;
-- _M_initialize_timepunct(__cloc);
-+
-+ try
-+ { _M_initialize_timepunct(__cloc); }
-+ catch(...)
-+ {
-+ delete [] _M_name_timepunct;
-+ __throw_exception_again;
-+ }
-+
- }
-
- template<typename _CharT>
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch b/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch
deleted file mode 100644
index 9f8793125e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 9b7442069eb68a42d2437181c1b2e710dd077e8b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:48:10 +0400
-Subject: [PATCH 08/46] missing-execinfo_h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- boehm-gc/include/gc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index 6b38f2d..fca98ff 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch b/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch
deleted file mode 100644
index 6b236c62c0..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From fde97f80d2d931ed3fa4a86294799366b2359331 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:03 +0400
-Subject: [PATCH 09/46] c99-snprintf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/c_std/cstdio | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index 37f01ca..f00c06d 100644
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -144,7 +144,7 @@ namespace std
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99
-+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch
deleted file mode 100644
index 2da8877672..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From 7a90e62d557c78ae52006dff30c99006e10d9357 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 10/46] gcc: poison-system-directories
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/common.opt | 4 ++++
- gcc/config.in | 6 ++++++
- gcc/configure | 16 ++++++++++++++++
- gcc/configure.ac | 10 ++++++++++
- gcc/doc/invoke.texi | 9 +++++++++
- gcc/gcc.c | 2 ++
- gcc/incpath.c | 19 +++++++++++++++++++
- 7 files changed, 66 insertions(+)
-
-diff --git a/gcc/common.opt b/gcc/common.opt
-index 1218a71..bfba114 100644
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -623,6 +623,10 @@ Wreturn-local-addr
- Common Var(warn_return_local_addr) Init(1) Warning
- Warn about returning a pointer/reference to a local or temporary variable.
-
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another
-diff --git a/gcc/config.in b/gcc/config.in
-index 5335258..f079826 100644
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -168,6 +168,12 @@
- #endif
-
-
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
- optimizer and back end) to be checked for dynamic type safety at runtime.
- This is quite expensive. */
-diff --git a/gcc/configure b/gcc/configure
-index 3c92795..34371a3 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -933,6 +933,7 @@ with_system_zlib
- enable_maintainer_mode
- enable_link_mutex
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_host_shared
- enable_libquadmath_support
-@@ -1670,6 +1671,8 @@ Optional Features:
- --enable-version-specific-runtime-libs
- specify that runtime libraries should be installed
- in a compiler-specific directory
-+ --enable-poison-system-directories
-+ warn for use of native system header directories
- --enable-plugin enable plugin support
- --enable-host-shared build host code as shared libraries
- --disable-libquadmath-support
-@@ -28211,6 +28214,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
- fi
-
-
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+ enableval=$enable_poison_system_directories;
-+else
-+ enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Substitute configuration variables
-
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index d414081..240d322 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5654,6 +5654,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
- [specify that runtime libraries should be
- installed in a compiler-specific directory])])
-
-+AC_ARG_ENABLE([poison-system-directories],
-+ AS_HELP_STRING([--enable-poison-system-directories],
-+ [warn for use of native system header directories]),,
-+ [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+ [1],
-+ [Define to warn for use of native system header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index d3be589..c81b55b 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -269,6 +269,7 @@ Objective-C and Objective-C++ Dialects}.
- -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
- -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
- -Wpointer-arith -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wredundant-decls -Wno-return-local-addr @gol
- -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol
- -Wshift-count-negative -Wshift-count-overflow @gol
-@@ -4433,6 +4434,14 @@ made up of data only and thus requires no special treatment. But, for
- most targets, it is made up of code and thus requires the stack to be
- made executable in order for the program to work properly.
-
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling. This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index d956c36..675bcc1 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -835,6 +835,8 @@ proper position among the other output files. */
- "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
- "%X %{o*} %{e*} %{N} %{n} %{r}\
- %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
-+ %{Wno-poison-system-directories:--no-poison-system-directories}\
-+ %{Werror=poison-system-directories:--error-poison-system-directories}\
- %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
- " CHKP_SPEC " \
- %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index 6c54ca6..cc0c921 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -28,6 +28,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
-
- /* Microsoft Windows does not natively support inodes.
- VMS has non-numeric inodes. */
-@@ -383,6 +384,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- }
- fprintf (stderr, _("End of search list.\n"));
- }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+ if (flag_poison_system_directories)
-+ {
-+ struct cpp_dir *p;
-+
-+ for (p = heads[QUOTE]; p; p = p->next)
-+ {
-+ if ((!strncmp (p->name, "/usr/include", 12))
-+ || (!strncmp (p->name, "/usr/local/include", 18))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ warning (OPT_Wpoison_system_directories,
-+ "include location \"%s\" is unsafe for "
-+ "cross-compilation",
-+ p->name);
-+ }
-+ }
-+#endif
- }
-
- /* Use given -I paths for #include "..." but not #include <...>, and
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch b/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch
deleted file mode 100644
index 511e69481b..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From db406054de6b0967cd76cbb998f05b0c5af0bd94 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:00:34 +0400
-Subject: [PATCH 11/46] gcc-poison-dir-extend
-
-Add /sw/include and /opt/include based on the original
-zecke-no-host-includes.patch patch. The original patch checked for
-/usr/include, /sw/include and /opt/include and then triggered a failure and
-aborted.
-
-Instead, we add the two missing items to the current scan. If the user
-wants this to be a failure, they can add "-Werror=poison-system-directories".
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/incpath.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index cc0c921..0bc1f67 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -394,7 +394,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- {
- if ((!strncmp (p->name, "/usr/include", 12))
- || (!strncmp (p->name, "/usr/local/include", 18))
-- || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+ || (!strncmp (p->name, "/sw/include", 11))
-+ || (!strncmp (p->name, "/opt/include", 12)))
- warning (OPT_Wpoison_system_directories,
- "include location \"%s\" is unsafe for "
- "cross-compilation",
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
deleted file mode 100644
index 750bbc8238..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 278d293c4cee9482a23aa3443741861ff2f67212 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:08:31 +0400
-Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
-
-Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
-
-This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
-
-Other changes I had to do include:
-
-- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
-
-- passing the right CFLAGS to configure scripts as exported environment variables
-
-I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
-
-Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
-
-Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- configure | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/configure b/configure
-index 1cba3a9..9cae8da 100755
---- a/configure
-+++ b/configure
-@@ -6733,6 +6733,38 @@ fi
-
-
-
-+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
-+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-+# We want to ensure that TARGET libraries (which we know are built with
-+# gcc) are built with "-O2 -g", so include those options when setting
-+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-+if test "x$CFLAGS_FOR_TARGET" = x; then
-+ CFLAGS_FOR_TARGET=$CFLAGS
-+ case " $CFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
-+ esac
-+ case " $CFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
-+ esac
-+fi
-+
-+
-+if test "x$CXXFLAGS_FOR_TARGET" = x; then
-+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
-+ case " $CXXFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
-+ esac
-+ case " $CXXFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
-+ esac
-+fi
-+
-+
- # Handle --with-headers=XXX. If the value is not "yes", the contents of
- # the named directory are copied to $(tooldir)/sys-include.
- if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch b/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch
deleted file mode 100644
index 45aaf4cc22..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From bdde4f5efa3c89ac7ee0bc05f322f27e3dabeab9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH 13/46] 64-bit multilib hack.
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/i386/t-linux64 | 6 ++----
- gcc/config/mips/t-linux64 | 10 +++-------
- gcc/config/rs6000/t-linux64 | 5 ++---
- 3 files changed, 7 insertions(+), 14 deletions(-)
-
-diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index f6dbb78..d770da5 100644
---- a/gcc/config/i386/t-linux64
-+++ b/gcc/config/i386/t-linux64
-@@ -32,7 +32,5 @@
- #
- comma=,
- MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
--MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
--MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
-index 7e96406..b72dcb0 100644
---- a/gcc/config/mips/t-linux64
-+++ b/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
- # <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
--MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
-- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
-- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
-- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
-diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
-index b6b351d..1d5b37a 100644
---- a/gcc/config/rs6000/t-linux64
-+++ b/gcc/config/rs6000/t-linux64
-@@ -26,10 +26,9 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
-
- MULTILIB_OPTIONS := m64/m32
--MULTILIB_DIRNAMES := 64 32
-+MULTILIB_DIRNAMES := . .
- MULTILIB_EXTRA_OPTS :=
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- $(COMPILE) $<
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch b/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch
deleted file mode 100644
index 73741f83cc..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From a13763f8a1d413a432e7b40835a062f86208f29a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 14/46] optional libstdc
-
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
-will not run correctly since by default the linker will try to link against libstdc++
-which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
-driver. This patch adds such an option which only disables the -lstdc++.
-
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
-do this officially, the likely answer is don't build libstdc++ separately.
-
-RP 29/6/10
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- gcc/c-family/c.opt | 4 ++++
- gcc/cp/g++spec.c | 1 +
- gcc/doc/invoke.texi | 8 +++++++-
- gcc/gcc.c | 1 +
- 4 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 4162566..453ec8e 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1543,6 +1543,10 @@ nostdinc++
- C++ ObjC++
- Do not search standard system include directories for C++
-
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index 6536d7e..f57a5d4 100644
---- a/gcc/cp/g++spec.c
-+++ b/gcc/cp/g++spec.c
-@@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
- switch (decoded_options[i].opt_index)
- {
- case OPT_nostdlib:
-+ case OPT_nostdlib__:
- case OPT_nodefaultlibs:
- library = -1;
- break;
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index c81b55b..6d3f68c 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -195,6 +195,7 @@ in the following sections.
- -fvisibility-inlines-hidden @gol
- -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
- -fvtv-counts -fvtv-debug @gol
-+-nostdlib++ @gol
- -fvisibility-ms-compat @gol
- -fext-numeric-literals @gol
- -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
-@@ -488,7 +489,7 @@ Objective-C and Objective-C++ Dialects}.
- -s -static -static-libgcc -static-libstdc++ @gol
- -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
- -static-libmpx -static-libmpxwrappers @gol
---shared -shared-libgcc -symbolic @gol
-+-shared -shared-libgcc -symbolic -nostdlib++ @gol
- -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
- -u @var{symbol} -z @var{keyword}}
-
-@@ -11187,6 +11188,11 @@ These entries are usually resolved by entries in
- libc. These entry points should be supplied through some other
- mechanism when this option is specified.
-
-+@item -nostdlib++
-+@opindex nostdlib++
-+Do not use the standard system C++ runtime libraries when linking.
-+Only the libraries you specify will be passed to the linker.
-+
- @cindex @option{-lgcc}, use with @option{-nostdlib}
- @cindex @option{-nostdlib} and unresolved references
- @cindex unresolved references and @option{-nostdlib}
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 675bcc1..a37ec8b 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -845,6 +845,7 @@ proper position among the other output files. */
- %(mflib) " STACK_SPLIT_SPEC "\
- %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-+ %{!nostdlib++:}\
- %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
- #endif
-
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index 1b62ef8065..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 4bd21a1d63cfb14e261d90adc0c5d4f9462dc555 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 15/46] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 7 -------
- gcc/configure.ac | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 34371a3..8caecdc 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -26479,13 +26479,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 240d322..57819ff 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4384,13 +4384,6 @@ x:
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
-
- AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch b/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index e6ae262e4b..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 92427ebb94dc66f8e64ebf3ffbcd6dd5ce0935c1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index a37ec8b..87b47c5 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -4352,6 +4352,15 @@ set_collect_gcc_options (void)
- sizeof ("COLLECT_GCC_OPTIONS=") - 1);
-
- first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+ if (target_system_root_changed && target_system_root)
-+ {
-+ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+ obstack_grow (&collect_obstack, "'", 1);
-+ first_time = FALSE;
-+ }
-+#endif
- for (i = 0; (int) i < n_switches; i++)
- {
- const char *const *args;
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index b89a27919e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From b1f3118e439459c26a3e19c617b7b0c93745e77a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:17:25 +0400
-Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in
- ${B}
-
-Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
-the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-While compiling gcc-crosssdk-initial-x86_64 on some host, there is
-occasionally failure that test the existance of default.h doesn't
-work, the reason is tm_include_list='** defaults.h' rather than
-tm_include_list='** ./defaults.h'
-
-So we add the test condition for this situation.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/Makefile.in | 2 +-
- gcc/configure | 4 ++--
- gcc/configure.ac | 4 ++--
- gcc/mkconfig.sh | 4 ++--
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 07c6f0a..e1e63e8 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -502,7 +502,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
- TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
-
- xmake_file=@xmake_file@
--tmake_file=@tmake_file@
-+tmake_file=@tmake_file@ ./t-oe
- TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
- TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
- TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-diff --git a/gcc/configure b/gcc/configure
-index 8caecdc..8ec3d40 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11850,8 +11850,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 57819ff..643a47e 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1832,8 +1832,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index c32f087..6803ab9 100644
---- a/gcc/mkconfig.sh
-+++ b/gcc/mkconfig.sh
-@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
- if [ $# -ge 1 ]; then
- echo '#ifdef IN_GCC' >> ${output}T
- for file in "$@"; do
-- if test x"$file" = x"defaults.h"; then
-+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
- postpone_defaults_h="yes"
- else
- echo "# include \"$file\"" >> ${output}T
-@@ -109,7 +109,7 @@ esac
-
- # If we postponed including defaults.h, add the #include now.
- if test x"$postpone_defaults_h" = x"yes"; then
-- echo "# include \"defaults.h\"" >> ${output}T
-+ echo "# include \"./defaults.h\"" >> ${output}T
- fi
-
- # Add multiple inclusion protection guard, part two.
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch
deleted file mode 100644
index e8ba325585..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From d11c73c1295565ff3766ae04e2a410a89fc84dd5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH 18/46] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure | 2 +-
- libgfortran/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index bb3107b..5d47e65 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -12747,7 +12747,7 @@ esac
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index adafb3f..b4ade28 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
-
- # extra LD Flags which are required for targets
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch b/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch
deleted file mode 100644
index 01a4d1fdab..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 7b40212ed6c0c9fe4efe51f31bccd3d9f892f238 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:50 +0400
-Subject: [PATCH 19/46] libgcc-sjlj-check
-
-ac_fn_c_try_compile doesnt seem to keep the intermediate files
-which are needed for sjlj test to pass since it greps into the
-generated file. So we run the compiler command using AC_TRY_COMMAND
-which then generates the needed .s file
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libgcc/configure | 10 ++++++----
- libgcc/configure.ac | 10 ++++------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/libgcc/configure b/libgcc/configure
-index 203d384..6aef3e7 100644
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -4570,17 +4570,19 @@ void foo ()
- }
-
- _ACEOF
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--if ac_fn_c_try_compile; then :
-+if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5'
-+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then
- if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=no
- fi
- fi
--CFLAGS=$CFLAGS_hold
- rm -f conftest*
-
- fi
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index a10a952..cc324f3 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -255,16 +255,14 @@ void foo ()
- bar();
- }
- ])])
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--AS_IF([ac_fn_c_try_compile],
-- [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-+if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
-+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=no
-- fi])
--CFLAGS=$CFLAGS_hold
-+ fi
-+fi
- rm -f conftest*
- ])
-
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch b/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch
deleted file mode 100644
index 13f66d4136..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 5f9759a85fff3d78e3f71ae01c970b10d326c406 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 20/46] cpp: honor sysroot.
-
-Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
-permission denied (unreadable), gcc will error.
-
-This happens when ccache is in use due to the fact it uses preprocessed source files.
-
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
--isystem, -isysroot happen and the correct sysroot is used.
-
-[YOCTO #2074]
-
-RP 2012/04/13
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/cp/lang-specs.h | 2 +-
- gcc/gcc.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index b0728f0..e69ee7d 100644
---- a/gcc/cp/lang-specs.h
-+++ b/gcc/cp/lang-specs.h
-@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3. If not see
- {".ii", "@c++-cpp-output", 0, 0, 0},
- {"@c++-cpp-output",
- "%{!M:%{!MM:%{!E:\
-- cc1plus -fpreprocessed %i %(cc1_options) %2\
-+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 87b47c5..e6efae7 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1142,7 +1142,7 @@ static const struct compiler default_compilers[] =
- %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
- {".i", "@cpp-output", 0, 0, 0},
- {"@cpp-output",
-- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
- {".s", "@assembler", 0, 0, 0},
- {"@assembler",
- "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch b/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index c7cffe417d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 34d22ab6cfd2dfe6dd171c8d0b31cafcdeb86298 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH 21/46] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index c835734..dd0739d 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2017,29 +2017,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
- default_mips_arch=mips32
- ;;
- mips64el-st-linux-gnu)
-- default_mips_abi=n32
-+ default_mips_abi=64
- tm_file="${tm_file} mips/st.h"
- tmake_file="${tmake_file} mips/t-st"
- enable_mips_multilibs="yes"
- ;;
- mips64octeon*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
- target_cpu_default=MASK_SOFT_FLOAT_ABI
- enable_mips_multilibs="yes"
- ;;
- mipsisa64r6*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- default_mips_arch=mips64r6
- enable_mips_multilibs="yes"
- ;;
- mipsisa64r2*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- default_mips_arch=mips64r2
- enable_mips_multilibs="yes"
- ;;
- mips64*-*-linux* | mipsisa64*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- enable_mips_multilibs="yes"
- ;;
- esac
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index 6208351324..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From f6b41b62ea62a0f1447d9fc235f7fd2bbf3fe7c2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:24:50 +0400
-Subject: [PATCH 22/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
- relative to SYSTEMLIBS_DIR
-
-This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
-relative to SYSTEMLIBS_DIR which can be set in generated headers
-This breaks the assumption of hardcoded multilib in gcc
-Change is only for the supported architectures in OE including
-SH, sparc, alpha for possible future support (if any)
-
-Removes the do_headerfix task in metadata
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE configuration]
----
- gcc/config/alpha/linux-elf.h | 4 ++--
- gcc/config/arm/linux-eabi.h | 4 ++--
- gcc/config/arm/linux-elf.h | 2 +-
- gcc/config/i386/linux.h | 2 +-
- gcc/config/i386/linux64.h | 6 +++---
- gcc/config/linux.h | 8 ++++----
- gcc/config/mips/linux.h | 12 ++++++------
- gcc/config/rs6000/linux64.h | 10 +++++-----
- gcc/config/sh/linux.h | 2 +-
- gcc/config/sparc/linux.h | 2 +-
- gcc/config/sparc/linux64.h | 4 ++--
- 11 files changed, 28 insertions(+), 28 deletions(-)
-
-diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index 2c70a2f..dd048db 100644
---- a/gcc/config/alpha/linux-elf.h
-+++ b/gcc/config/alpha/linux-elf.h
-@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index e9d65dc..cfdf3f0 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -68,8 +68,8 @@
- GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
-
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
--#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
- #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
-
- #define GLIBC_DYNAMIC_LINKER \
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index 49ad954..a5ab559 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -62,7 +62,7 @@
-
- #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #define LINUX_TARGET_LINK_SPEC "%{h*} \
- %{static:-Bstatic} \
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index a100963..21ba2b2 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index a27d3be..6185cce 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
- #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
--#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 857389a..22b9be5 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -73,10 +73,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
- GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
- supporting both 32-bit and 64-bit compilation. */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index 91df261..c306afb 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-
- #define GLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
-
- #undef UCLIBC_DYNAMIC_LINKER32
- #define UCLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- #undef UCLIBC_DYNAMIC_LINKER64
- #define UCLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
- #define UCLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
-
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 0879e7e..31c4338 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -357,14 +357,14 @@ extern int dot_symbols;
- #undef LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
- #ifdef LINUX64_DEFAULT_ABI_ELFv2
--#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
- #else
--#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
- #endif
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index 0f5d614..168416c 100644
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see
-
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 56def4b..00b564c 100644
---- a/gcc/config/sparc/linux.h
-+++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index fa805fd..0eb4acd 100644
---- a/gcc/config/sparc/linux64.h
-+++ b/gcc/config/sparc/linux64.h
-@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #ifdef SPARC_BI_ARCH
-
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch b/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch
deleted file mode 100644
index be91c9e638..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9701f596bbe5bf51bbf48661bc515b45d4b6f4d2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:26:37 +0400
-Subject: [PATCH 23/46] gcc: Fix argument list too long error.
-
-There would be an "Argument list too long" error when the
-build directory is longer than 200, this is caused by:
-
-headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
-
-The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
-it, use the $(sort list) of GNU make which can handle the too long list
-would fix the problem, the header would be short enough after sorted.
-The "tr ' ' '\012'" was used for translating the space to "\n", the
-$(sort list) doesn't need this.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index e1e63e8..7b49f88 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -3262,7 +3262,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
- # We keep the directory structure for files in config or c-family and .def
- # files. All other files are flattened to a single directory.
- $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
-- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
-+ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
- for file in $$headers; do \
- if [ -f $$file ] ; then \
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch b/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch
deleted file mode 100644
index b23ce97563..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 946e047614103e1f2982613c7aa5f76587500c0e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:28:10 +0400
-Subject: [PATCH 24/46] Disable sdt.
-
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
-It may or may not exist from preivous builds though. To be determinstic, disable
-sdt.h usage always. This avoids build failures if the header is removed after configure
-but before libgcc is compiled for example.
-
-RP 2012/8/7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Disable sdt for libstdc++-v3.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [hack]
----
- gcc/configure | 12 ++++++------
- gcc/configure.ac | 18 +++++++++---------
- libstdc++-v3/configure | 6 +++---
- libstdc++-v3/configure.ac | 2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 8ec3d40..eaa3b07 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27857,12 +27857,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
- $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
- have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
--
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--
--fi
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+#
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#
-+#fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
- $as_echo "$have_sys_sdt_h" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 643a47e..9f6cacb 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5315,15 +5315,15 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
- fi
-
- # Test for <sys/sdt.h> on the target.
--GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
--AC_MSG_CHECKING(sys/sdt.h in the target C library)
--have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
-- AC_DEFINE(HAVE_SYS_SDT_H, 1,
-- [Define if your target C library provides sys/sdt.h])
--fi
--AC_MSG_RESULT($have_sys_sdt_h)
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+# AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+# [Define if your target C library provides sys/sdt.h])
-+#fi
-+#AC_MSG_RESULT($have_sys_sdt_h)
-
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 217012e..81240b9 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -20964,11 +20964,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-- if test $glibcxx_cv_sys_sdt_h = yes; then
-+# if test $glibcxx_cv_sys_sdt_h = yes; then
-
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-
-- fi
-+# fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
- $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
-
-diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 580fb8b..5a41083 100644
---- a/libstdc++-v3/configure.ac
-+++ b/libstdc++-v3/configure.ac
-@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
- GLIBCXX_CHECK_SC_NPROC_ONLN
- GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
- GLIBCXX_CHECK_SYSCTL_HW_NCPU
--GLIBCXX_CHECK_SDT_H
-+#GLIBCXX_CHECK_SDT_H
-
- # Check for available headers.
- AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch b/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch
deleted file mode 100644
index 8d5eb973bc..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From f68c5b78751660505b22b46dad99240db0df3456 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:29:11 +0400
-Subject: [PATCH 25/46] libtool
-
-libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
-when running on am x86_64 build host.
-
-This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Arguably, it shouldn't be passing this into libtool in the first place but
-for now this resolves the nastiest problems this causes.
-
-func_normal_abspath would resolve an empty path to `pwd` so we need
-to filter the zero case.
-
-RP 2012/8/24
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- ltmain.sh | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..0121fba 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6359,6 +6359,10 @@ func_mode_link ()
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-+ if test -n "$install_libdir"; then
-+ func_normal_abspath "$install_libdir"
-+ install_libdir=$func_normal_abspath_result
-+ fi
-
- oldlibs=
- if test -z "$rpath"; then
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index a22d95f721..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 4c75e349aa7abd1e285720328b23690636bea242 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:30:32 +0400
-Subject: [PATCH 26/46] gcc: armv4: pass fix-v4bx to linker to support EABI.
-
-The LINK_SPEC for linux gets overwritten by linux-eabi.h which
-means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
-the option is not passed to linker when chosing march=armv4
-This patch redefines this in linux-eabi.h and reinserts it
-for eabi defaulting toolchains.
-
-We might want to send it upstream.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-eabi.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index cfdf3f0..048a062 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -77,10 +77,14 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
-
-+/* For armv4 we pass --fix-v4bx to linker to support EABI */
-+#undef TARGET_FIX_V4BX_SPEC
-+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
--#define LINK_SPEC EABI_LINK_SPEC \
-+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
- LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
- LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
-
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index 46815d1569..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 8217dd7fb318f9abc6564f67b424c433d8398d61 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:33:04 +0400
-Subject: [PATCH 27/46] Use the multilib config files from ${B} instead of
- using the ones from ${S}
-
-Use the multilib config files from ${B} instead of using the ones from ${S}
-so that the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 22 ++++++++++++++++++----
- gcc/configure.ac | 22 ++++++++++++++++++----
- 2 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index eaa3b07..9b60aad 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11830,10 +11830,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -11844,6 +11854,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 9f6cacb..e1e54f2 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1812,10 +1812,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -1826,6 +1836,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
deleted file mode 100644
index 60ddd9cee7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 08a0e45b308fc97d06f5c3ef77a257e7a6bd1a48 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:39:38 +0000
-Subject: [PATCH 28/46] Avoid using libdir from .la which usually points to a
- host path
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 0121fba..52bdbdb 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5628,6 +5628,9 @@ func_mode_link ()
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
-+ # Instead of using libdir from .la which usually points to a host path,
-+ # use the path the .la is contained in.
-+ libdir="$abs_ladir"
- dir="$libdir"
- absdir="$libdir"
- fi
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch b/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch
deleted file mode 100644
index 62195aa872..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 95f494d1544857ad38949a7da37e2d7264475233 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:40:59 +0000
-Subject: [PATCH 29/46] export CPP
-
-The OE environment sets and exports CPP as being the target gcc. When
-building gcc-cross-canadian for a mingw targetted sdk, the following can be found
-in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
-
-configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
-configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5
-configure:3666: $? = 0
-configure:3698: result: no
-configure:3786: checking how to run the C preprocessor
-configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
-configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
-configure:3876: $? = 0
-
-Note this is a *build* target (in build-x86_64-linux) so it should be
-using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
-headers are very different, using the wrong cpp is a real problem. It is leaking
-into configure through the CPP variable. Ultimately this leads to build
-failures related to not being able to include a process.h file for pem-unix.c.
-
-The fix is to ensure we export a sane CPP value into the build
-environment when using build targets. We could define a CPP_FOR_BUILD value which may be
-the version which needs to be upstreamed but for now, this fix is good enough to
-avoid the problem.
-
-RP 22/08/2013
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 36b4008..a783e1e 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
-+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
deleted file mode 100644
index 57051871b3..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 4ed8c1fd9dc05f7a9db9298a55396c8f0ff549a7 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
-Date: Wed, 5 Feb 2014 16:52:31 +0200
-Subject: [PATCH 30/46] Enable SPE & AltiVec generation on powepc*linux target
-
-When is configured with --target=powerpc-linux, the resulting GCC will
-not be able to generate code for SPE targets (e500v1/v2).
-GCC configured with --target=powerpc-linuxspe will not be able to
-generate AltiVec instructions (for e6500).
-This patch modifies the configured file such that SPE or AltiVec code
-can be generated when gcc is configured with --target=powerpc-linux.
-The ABI and speciffic instructions can be selected through the
-"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
----
- gcc/config.gcc | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-Index: gcc-5.3.0/gcc/config.gcc
-===================================================================
---- gcc-5.3.0.orig/gcc/config.gcc
-+++ gcc-5.3.0/gcc/config.gcc
-@@ -2346,7 +2346,14 @@ powerpc-*-rtems*)
- tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
- ;;
- powerpc*-*-linux*)
-- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+ case ${target} in
-+ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+ ;;
-+ *)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
-+ ;;
-+ esac
- extra_options="${extra_options} rs6000/sysv4.opt"
- tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
- extra_objs="$extra_objs rs6000-linux.o"
-Index: gcc-5.3.0/gcc/config/rs6000/linuxspe.h
-===================================================================
---- gcc-5.3.0.orig/gcc/config/rs6000/linuxspe.h
-+++ gcc-5.3.0/gcc/config/rs6000/linuxspe.h
-@@ -27,6 +27,3 @@
- #undef TARGET_DEFAULT
- #define TARGET_DEFAULT MASK_STRICT_ALIGN
- #endif
--
--#undef ASM_DEFAULT_SPEC
--#define ASM_DEFAULT_SPEC "-mppc -mspe -me500"
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
deleted file mode 100644
index f2bc66432c..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From bb6fea821483aa3259b34e101a39c993edd01411 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:21:55 +0000
-Subject: [PATCH 31/46] 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.
-
-Upstream-Status: Inappropriate[OE-Specific]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/t-aarch64-linux | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index c296376..3bb59bf 100644
---- a/gcc/config/aarch64/t-aarch64-linux
-+++ b/gcc/config/aarch64/t-aarch64-linux
-@@ -21,8 +21,8 @@
- LIB1ASMSRC = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
-
--AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../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 = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-
--MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
-+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch b/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch
deleted file mode 100644
index 89503ff60e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From bb26f90f5e0accc3539f62b6fec663682959dd36 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:25:11 +0000
-Subject: [PATCH 32/46] Ensure target gcc headers can be included
-
-There are a few headers installed as part of the OpenEmbedded
-gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
-built for the target architecture, these are within the target
-sysroot and not cross/nativesdk; thus they weren't able to be
-found by gcc with the existing search paths. Add support for
-picking up these headers under the sysroot supplied on the gcc
-command line in order to resolve this.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/Makefile.in | 2 ++
- gcc/cppdefault.c | 4 ++++
- gcc/defaults.h | 9 +++++++++
- gcc/gcc.c | 7 -------
- 4 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 7b49f88..cd5bc4a 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -582,6 +582,7 @@ libexecdir = @libexecdir@
-
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
-+libsubdir_target = gcc/$(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
- # Directory in which all plugin resources are installed
-@@ -2610,6 +2611,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
-
- PREPROCESSOR_DEFINES = \
- -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-+ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
- -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
- -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 580c1ba..03a0287 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
- /* This is the dir for gcc's private headers. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
-+#ifdef GCC_INCLUDE_SUBDIR_TARGET
-+ /* This is the dir for gcc's private headers under the specified sysroot. */
-+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+#endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-diff --git a/gcc/defaults.h b/gcc/defaults.h
-index 1d54798..983d45e 100644
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1361,4 +1361,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-
- #endif /* GCC_INSN_FLAGS_H */
-
-+/* Default prefixes to attach to command names. */
-+
-+#ifndef STANDARD_STARTFILE_PREFIX_1
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#endif
-+#ifndef STANDARD_STARTFILE_PREFIX_2
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#endif
-+
- #endif /* ! GCC_DEFAULTS_H */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index e6efae7..3ca27b9 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1263,13 +1263,6 @@ static const char *gcc_libexec_prefix;
-
- /* Default prefixes to attach to command names. */
-
--#ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
--#endif
--#ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
--#endif
--
- #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
- #undef MD_EXEC_PREFIX
- #undef MD_STARTFILE_PREFIX
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
deleted file mode 100644
index 19d480f3d7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 629fcc7d0075c9b4261da6435e122429fb028ec0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 11:17:19 +0000
-Subject: [PATCH 33/46] gcc 4.8+ won't build with --disable-dependency-tracking
-
-since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
-
-This patch ensures we only use those compiler options when its enabled.
-
-Upstream-Status: Submitted
-
-(Problem was already reported upstream, attached this patch there
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
-
-RP
-2012/09/22
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libatomic/Makefile.am | 3 ++-
- libatomic/Makefile.in | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index 3d8ab62..23dff7e 100644
---- a/libatomic/Makefile.am
-+++ b/libatomic/Makefile.am
-@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
-
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
-diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index 9288652..3720256 100644
---- a/libatomic/Makefile.in
-+++ b/libatomic/Makefile.in
-@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
- PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
deleted file mode 100644
index a453fa6b34..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From a4efc9ca85734c283d4da09b628121e1c1f49c4e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 3 Mar 2015 08:21:19 +0000
-Subject: [PATCH 34/46] Don't search host directory during "relink" if
- $inst_prefix is provided
-
-http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
-
-Upstream-Status: Submitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 52bdbdb..82bcec3 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6004,12 +6004,13 @@ func_mode_link ()
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
-+ # Default if $libdir is not relative to the prefix:
- add_dir="-L$libdir"
-- # Try looking first in the location we're being installed to.
-+
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
-- add_dir="$add_dir -L$inst_prefix_dir$libdir"
-+ add_dir="-L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch b/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
deleted file mode 100644
index 6ed589beb8..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 5b0125a792842ae02df507bc55555661cb10f9a3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 8 Mar 2015 03:41:39 +0000
-Subject: [PATCH 35/46] Dont link the plugins with libgomp explicitly
-
-They are dlopened by libgomp anyway. This fixes
-the libtool relink issue which causes issues during
-cross compilation
-
-libtool: install: /usr/bin/install -c .libs/libgomp.lai
-/home/ubuntu/work/bleeding/build-qemux86-64mc/tmp/work/core2-64-rdk-linux/gcc-runtime/5.0-r0/image/usr/lib/../lib/libgomp.la
-libtool: install: error: cannot install `libgomp-plugin-host_nonshm.la'
-to a directory not ending in /usr/lib
-Makefile:517: recipe for target 'install-toolexeclibLTLIBRARIES' failed
-make[2]: *** [install-toolexeclibLTLIBRARIES] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libgomp/Makefile.in | 7 +++----
- libgomp/plugin/Makefrag.am | 3 +--
- 2 files changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
-index b61b108..71b2627 100644
---- a/libgomp/Makefile.in
-+++ b/libgomp/Makefile.in
-@@ -123,7 +123,7 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(infodir)" \
- "$(DESTDIR)$(fincludedir)" "$(DESTDIR)$(libsubincludedir)" \
- "$(DESTDIR)$(toolexeclibdir)"
- LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
--libgomp_plugin_host_nonshm_la_DEPENDENCIES = libgomp.la
-+libgomp_plugin_host_nonshm_la_LIBADD =
- am_libgomp_plugin_host_nonshm_la_OBJECTS = \
- libgomp_plugin_host_nonshm_la-plugin-host.lo
- libgomp_plugin_host_nonshm_la_OBJECTS = \
-@@ -133,7 +133,7 @@ libgomp_plugin_host_nonshm_la_LINK = $(LIBTOOL) --tag=CC \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(libgomp_plugin_host_nonshm_la_LDFLAGS) $(LDFLAGS) -o $@
- am__DEPENDENCIES_1 =
--@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES = libgomp.la \
-+@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES = \
- @PLUGIN_NVPTX_TRUE@ $(am__DEPENDENCIES_1)
- @PLUGIN_NVPTX_TRUE@am_libgomp_plugin_nvptx_la_OBJECTS = \
- @PLUGIN_NVPTX_TRUE@ libgomp_plugin_nvptx_la-plugin-nvptx.lo
-@@ -407,7 +407,7 @@ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
- @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LDFLAGS = \
- @PLUGIN_NVPTX_TRUE@ $(libgomp_plugin_nvptx_version_info) \
- @PLUGIN_NVPTX_TRUE@ $(lt_host_flags) $(PLUGIN_NVPTX_LDFLAGS)
--@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS)
-+@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
- @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
- libgomp_plugin_host_nonshm_version_info = -version-info $(libtool_VERSION)
- libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c
-@@ -415,7 +415,6 @@ libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
- libgomp_plugin_host_nonshm_la_LDFLAGS = \
- $(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
-
--libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la
- libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
- nodist_noinst_HEADERS = libgomp_f.h
- nodist_libsubinclude_HEADERS = omp.h openacc.h
-diff --git a/libgomp/plugin/Makefrag.am b/libgomp/plugin/Makefrag.am
-index 167485f..d2c5428 100644
---- a/libgomp/plugin/Makefrag.am
-+++ b/libgomp/plugin/Makefrag.am
-@@ -35,7 +35,7 @@ libgomp_plugin_nvptx_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_NVPTX_CPPFLAGS)
- libgomp_plugin_nvptx_la_LDFLAGS = $(libgomp_plugin_nvptx_version_info) \
- $(lt_host_flags)
- libgomp_plugin_nvptx_la_LDFLAGS += $(PLUGIN_NVPTX_LDFLAGS)
--libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS)
-+libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
- libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
- endif
-
-@@ -45,5 +45,4 @@ libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c
- libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
- libgomp_plugin_host_nonshm_la_LDFLAGS = \
- $(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
--libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la
- libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
deleted file mode 100644
index 41c0294da4..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b0b0688176a9482777e9b2e98408bfc4505d31af Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:15:27 -0700
-Subject: [PATCH 36/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding
- base_libdir
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 257acf0..abeb948 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,7 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch b/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch
deleted file mode 100644
index 30dbe74ef2..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 420ca64a86d560a77ee596a9774d672b08ca8278 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:18:39 -0700
-Subject: [PATCH 37/46] aarch64: Add support for musl ldso
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/aarch64-linux.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index abeb948..f9e65fc 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -23,6 +23,8 @@
-
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
-+
- #undef ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
-
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch b/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch
deleted file mode 100644
index 9ba574a5c6..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 8df3e7007a22c9d6be5d5ae4b9b169c5c8431917 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 27 May 2015 17:06:06 -0700
-Subject: [PATCH 38/46] fix g++ sysroot
-
-Portions of
-
-http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html
-
-are not upstreamed yet. So lets keep missing pieces.
-
-Upstream-Status: Pending
-
-Without this, compiling something simple like #include <limits> on target
-with c++ test.cpp fails unable to find the header. strace shows it looking in
-usr/include/xxxx rather than /usr/include/xxxx
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/configure | 4 +++-
- gcc/configure.ac | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 9b60aad..6df594c 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -3375,7 +3375,9 @@ gcc_gxx_include_dir_add_sysroot=0
- if test "${with_sysroot+set}" = set; then
- gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
- if test "${gcc_gxx_without_sysroot}"; then
-- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ if test x${with_sysroot} != x/; then
-+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ fi
- gcc_gxx_include_dir_add_sysroot=1
- fi
- fi
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index e1e54f2..3bb2173 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -152,7 +152,9 @@ gcc_gxx_include_dir_add_sysroot=0
- if test "${with_sysroot+set}" = set; then
- gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
- if test "${gcc_gxx_without_sysroot}"; then
-- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ if test x${with_sysroot} != x/; then
-+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ fi
- gcc_gxx_include_dir_add_sysroot=1
- fi
- fi
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
deleted file mode 100644
index 2e0df968bd..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 1eede9e4a10d3532db826a6eeced695df3ad5b89 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 5 Jul 2015 20:25:18 -0700
-Subject: [PATCH 39/46] libcc1: fix libcc1's install path and rpath
-
-* Install libcc1.so and libcc1plugin.so into
- $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
- had done to lto-plugin.
-* Fix bad RPATH iussue:
- gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
- /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
- [rpaths]
-
-Upstream-Status: Inappropriate [OE configuration]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libcc1/Makefile.am | 4 ++--
- libcc1/Makefile.in | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
-index 7a274b3..db69bea 100644
---- a/libcc1/Makefile.am
-+++ b/libcc1/Makefile.am
-@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- $(Wc)$(libiberty_normal)))
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
-
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
-
- if ENABLE_PLUGIN
- plugin_LTLIBRARIES = libcc1plugin.la
-diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
-index 1916134..c8995d2 100644
---- a/libcc1/Makefile.in
-+++ b/libcc1/Makefile.in
-@@ -262,8 +262,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- $(Wc)$(libiberty_normal)))
-
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
- @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
- @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
- BUILT_SOURCES = compiler-name.h
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch b/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch
deleted file mode 100644
index 11e1310f14..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From b41674d357c4ba320b9860e0f313d2f5a332f27d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:39:54 +0000
-Subject: [PATCH 40/46] handle sysroot support for nativesdk-gcc
-
-Being able to build a nativesdk gcc is useful, particularly in cases
-where the host compiler may be of an incompatible version (or a 32
-bit compiler is needed).
-
-Sadly, building nativesdk-gcc is not straight forward. We install
-nativesdk-gcc into a relocatable location and this means that its
-library locations can change. "Normal" sysroot support doesn't help
-in this case since the values of paths like "libdir" change, not just
-base root directory of the system.
-
-In order to handle this we do two things:
-
-a) Add %r into spec file markup which can be used for injected paths
- such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
-b) Add other paths which need relocation into a .gccrelocprefix section
- which the relocation code will notice and adjust automatically.
-
-Upstream-Status: Inappropriate
-RP 2015/7/28
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++-------------
- gcc/cppdefault.h | 3 ++-
- gcc/gcc.c | 20 ++++++++++++++------
- 3 files changed, 53 insertions(+), 20 deletions(-)
-
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 03a0287..f44c1d8 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -35,6 +35,30 @@
- # undef CROSS_INCLUDE_DIR
- #endif
-
-+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
-+static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
-+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
-+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
-+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
-+#ifdef LOCAL_INCLUDE_DIR
-+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
-+#endif
-+#ifdef PREFIX_INCLUDE_DIR
-+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
-+#endif
-+#ifdef FIXED_INCLUDE_DIR
-+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
-+#endif
-+#ifdef CROSS_INCLUDE_DIR
-+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
-+#endif
-+#ifdef TOOL_INCLUDE_DIR
-+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
-+#endif
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
-+#endif
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
- = {
- #ifdef GPLUSPLUS_INCLUDE_DIR
- /* Pick up GNU C++ generic include files. */
-- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
- /* Pick up GNU C++ target-dependent include files. */
-- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
- #endif
- #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
- /* Pick up GNU C++ backward and deprecated include files. */
-- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GCC_INCLUDE_DIR
- /* This is the dir for gcc's private headers. */
-- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef GCC_INCLUDE_SUBDIR_TARGET
- /* This is the dir for gcc's private headers under the specified sysroot. */
-- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
- #endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
- #endif
- #ifdef PREFIX_INCLUDE_DIR
-- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
-+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
- #endif
- #ifdef FIXED_INCLUDE_DIR
- /* This is the dir for fixincludes. */
-- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
-+ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
- /* A multilib suffix needs adding if different multilibs use
- different headers. */
- #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
- #endif
- #ifdef CROSS_INCLUDE_DIR
- /* One place the target system's headers might be. */
-- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef TOOL_INCLUDE_DIR
- /* Another place the target system's headers might be. */
-- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
-+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
- #endif
- #ifdef NATIVE_SYSTEM_HEADER_DIR
- /* /usr/include comes dead last. */
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
- #endif
- { 0, 0, 0, 0, 0, 0 }
- };
-diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index c98644f..4198669 100644
---- a/gcc/cppdefault.h
-+++ b/gcc/cppdefault.h
-@@ -33,7 +33,8 @@
-
- struct default_include
- {
-- const char *const fname; /* The name of the directory. */
-+ const char *fname; /* The name of the directory. */
-+
- const char *const component; /* The component containing the directory
- (see update_path in prefix.c) */
- const char cplusplus; /* Only look here if we're compiling C++. */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 3ca27b9..2b7756e 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -120,6 +120,8 @@ static const char *target_system_root = TARGET_SYSTEM_ROOT;
- #else
- static const char *target_system_root = 0;
- #endif
-+
-+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
-
- /* Nonzero means pass the updated target_system_root to the compiler. */
-
-@@ -390,6 +392,7 @@ or with constant text in a single argument.
- %G process LIBGCC_SPEC as a spec.
- %R Output the concatenation of target_system_root and
- target_sysroot_suffix.
-+ %r Output the base path target_relocatable_prefix
- %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
- %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
- %C process CPP_SPEC as a spec.
-@@ -1286,10 +1289,10 @@ static const char *gcc_libexec_prefix;
- gcc_exec_prefix is set because, in that case, we know where the
- compiler has been installed, and use paths relative to that
- location instead. */
--static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
--static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
--static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
--static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
-+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
-+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
-+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-
- /* For native compilers, these are well-known paths containing
- components that may be provided by the system. For cross
-@@ -1297,9 +1300,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *md_exec_prefix = MD_EXEC_PREFIX;
- static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
- static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_1
-+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_2
-+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_2;
-
- /* A relative path to be used in finding the location of tools
-@@ -5523,6 +5526,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
- }
- break;
-
-+ case 'r':
-+ obstack_grow (&obstack, target_relocatable_prefix,
-+ strlen (target_relocatable_prefix));
-+ break;
-+
- case 'S':
- value = do_spec_1 (startfile_spec, 0, NULL);
- if (value != 0)
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch
deleted file mode 100644
index 5a504a1f22..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 99cadb4d8415dd5a275d7d6410f20db33d0f8433 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:41:45 +0000
-Subject: [PATCH 41/46] Search target sysroot gcc version specific dirs with
- multilib.
-
-We install the gcc libraries (such as crtbegin.p) into
-<sysroot><libdir>/<target-sys>/5.2.0/
-which is a default search path for GCC (aka multi_suffix in the
-code below). <target-sys> is 'machine' in gcc's terminology. We use
-these directories so that multiple gcc versions could in theory
-co-exist on target.
-
-We only want to build one gcc-cross-canadian per arch and have this work
-for all multilibs. <target-sys> can be handled by mapping the multilib
-<target-sys> to the one used by gcc-cross-canadian, e.g.
-mips64-polkmllib32-linux
-is symlinked to by mips64-poky-linux.
-
-The default gcc search path in the target sysroot for a "lib64" mutlilib
-is:
-
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-which means that the lib32 crtbegin.o will be found and the lib64 ones
-will not which leads to compiler failures.
-
-This patch injects a multilib version of that path first so the lib64
-binaries can be found first. With this change the search path becomes:
-
-<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-Upstream-Status: Pending
-RP 2015/7/31
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
- 1 file changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 2b7756e..8f53aea 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -2305,7 +2305,7 @@ for_each_path (const struct path_prefix *paths,
- if (path == NULL)
- {
- len = paths->max_len + extra_space + 1;
-- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
-+ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
- path = XNEWVEC (char, len);
- }
-
-@@ -2317,6 +2317,33 @@ for_each_path (const struct path_prefix *paths,
- /* Look first in MACHINE/VERSION subdirectory. */
- if (!skip_multi_dir)
- {
-+ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
-+ {
-+ const char *this_multi;
-+ size_t this_multi_len;
-+
-+ if (pl->os_multilib)
-+ {
-+ this_multi = multi_os_dir;
-+ this_multi_len = multi_os_dir_len;
-+ }
-+ else
-+ {
-+ this_multi = multi_dir;
-+ this_multi_len = multi_dir_len;
-+ }
-+
-+ /* Look in multilib MACHINE/VERSION subdirectory first */
-+ if (this_multi_len)
-+ {
-+ memcpy (path + len, this_multi, this_multi_len + 1);
-+ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
-+ ret = callback (path, callback_info);
-+ if (ret)
-+ break;
-+ }
-+ }
-+
- memcpy (path + len, multi_suffix, suffix_len + 1);
- ret = callback (path, callback_info);
- if (ret)
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch b/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch
deleted file mode 100644
index 5af764b7c7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 78e77206902349c9256f06c3dd179197a39af2e1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:42:45 +0000
-Subject: [PATCH 42/46] Fix various _FOR_BUILD and related variables
-
-When doing a FOR_BUILD thing, you have to override CFLAGS with
-CFLAGS_FOR_BUILD. And if you use C++, you also have to override
-CXXFLAGS with CXXFLAGS_FOR_BUILD.
-Without this, when building for mingw, you end up trying to use
-the mingw headers for a host build.
-
-The same goes for other variables as well, such as CPPFLAGS,
-CPP, and GMPINC.
-
-Upstream-Status: Pending
-
-Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 6 ++++++
- Makefile.tpl | 5 +++++
- gcc/Makefile.in | 2 +-
- gcc/configure | 2 +-
- gcc/configure.ac | 2 +-
- 5 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index a783e1e..8b6d3d2 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
- CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -170,6 +171,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-@@ -710,6 +715,7 @@ BASE_FLAGS_TO_PASS = \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
-+ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
- "EXPECT=$(EXPECT)" \
- "FLEX=$(FLEX)" \
- "INSTALL=$(INSTALL)" \
-diff --git a/Makefile.tpl b/Makefile.tpl
-index 1ea1954..78a59c3 100644
---- a/Makefile.tpl
-+++ b/Makefile.tpl
-@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -172,6 +173,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index cd5bc4a..98ae4f4 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -762,7 +762,7 @@ BUILD_LINKERFLAGS = $(BUILD_CXXFLAGS)
- # Native linker and preprocessor flags. For x-fragment overrides.
- BUILD_LDFLAGS=@BUILD_LDFLAGS@
- BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
-+ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
-
- # Actual name to use when installing a native compiler.
- GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
-diff --git a/gcc/configure b/gcc/configure
-index 6df594c..fcb05e7 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11521,7 +11521,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 3bb2173..923bc9a 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1633,7 +1633,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch b/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch
deleted file mode 100644
index bad8402ef8..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From df430b943a2df6b72054c808d4b93338a82562de Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:23:34 +0000
-Subject: [PATCH 43/46] libstdc++: Support musl
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libstdc++-v3/configure.host | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
-index 640199c..1756444 100644
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -274,14 +274,24 @@ case "${host_os}" in
- os_include_dir="os/bsd/freebsd"
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-+ # check for musl by target
-+ case "${host_os}" in
-+ *-musl*)
-+ os_include_dir="os/generic"
-+ ;;
-+ *)
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
- elif [ "$bionic" = "yes" ]; then
- os_include_dir="os/bionic"
-+ elif [ "$musl" = "yes" ]; then
-+ os_include_dir="os/generic"
- else
- os_include_dir="os/gnu-linux"
- fi
- ;;
-+ esac
-+ ;;
- hpux*)
- os_include_dir="os/hpux"
- ;;
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch b/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
deleted file mode 100644
index 26aa96cad9..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
+++ /dev/null
@@ -1,270 +0,0 @@
-From 0b54799d80fb859c7b142467e4d42c99db59df50 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:30:35 +0000
-Subject: [PATCH 44/46] Adding -mmusl as a musl libc specifier, and the
- necessary hacks for it to know how to find musl's dynamic linker.
-
-Upstream-Status: Backport [partial]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config.gcc | 10 ++++-
- gcc/config/linux.h | 100 +++++++++++++++++++++++++++++++++++++-----
- gcc/config/linux.opt | 4 ++
- gcc/config/rs6000/secureplt.h | 1 +
- gcc/config/rs6000/sysv4.h | 5 +++
- gcc/ginclude/stddef.h | 3 ++
- 6 files changed, 110 insertions(+), 13 deletions(-)
-
-Index: gcc-5.4.0/gcc/config.gcc
-===================================================================
---- gcc-5.4.0.orig/gcc/config.gcc
-+++ gcc-5.4.0/gcc/config.gcc
-@@ -575,7 +575,7 @@ case ${target} in
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # 32-bit x86 processors supported by --with-arch=. Each processor
- # MUST be separated by exactly one space.
-@@ -720,6 +720,9 @@ case ${target} in
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-@@ -2420,6 +2423,11 @@ powerpc*-*-linux*)
- powerpc*-*-linux*paired*)
- tm_file="${tm_file} rs6000/750cl.h" ;;
- esac
-+ case ${target} in
-+ *-linux*-musl*)
-+ enable_secureplt=yes ;;
-+ esac
-+
- if test x${enable_secureplt} = xyes; then
- tm_file="rs6000/secureplt.h ${tm_file}"
- fi
-Index: gcc-5.4.0/gcc/config/linux.h
-===================================================================
---- gcc-5.4.0.orig/gcc/config/linux.h
-+++ gcc-5.4.0/gcc/config/linux.h
-@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -53,18 +55,21 @@ see the files COPYING3 and COPYING.RUNTI
- uClibc or Bionic is the default C library and whether
- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -84,16 +89,16 @@ see the files COPYING3 and COPYING.RUNTI
-
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
-@@ -123,3 +128,74 @@ see the files COPYING3 and COPYING.RUNTI
- # define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
-
- #endif
-+
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-Index: gcc-5.4.0/gcc/config/linux.opt
-===================================================================
---- gcc-5.4.0.orig/gcc/config/linux.opt
-+++ gcc-5.4.0/gcc/config/linux.opt
-@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l
- Use GNU C library
-
- muclibc
--Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
-+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic)
-+Use musl C library
-Index: gcc-5.4.0/gcc/config/rs6000/secureplt.h
-===================================================================
---- gcc-5.4.0.orig/gcc/config/rs6000/secureplt.h
-+++ gcc-5.4.0/gcc/config/rs6000/secureplt.h
-@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3.
- <http://www.gnu.org/licenses/>. */
-
- #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
-+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
-Index: gcc-5.4.0/gcc/config/rs6000/sysv4.h
-===================================================================
---- gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h
-+++ gcc-5.4.0/gcc/config/rs6000/sysv4.h
-@@ -538,6 +538,10 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
- #define CC1_SECURE_PLT_DEFAULT_SPEC ""
- #endif
-
-+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
-+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
-+#endif
-+
- /* Pass -G xxx to the compiler. */
- #undef CC1_SPEC
- #define CC1_SPEC "%{G*} %(cc1_cpu)" \
-@@ -889,6 +893,7 @@ ncrtn.o%s"
- { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
- { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
- { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
-+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
- { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
- { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
- { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
-Index: gcc-5.4.0/gcc/ginclude/stddef.h
-===================================================================
---- gcc-5.4.0.orig/gcc/ginclude/stddef.h
-+++ gcc-5.4.0/gcc/ginclude/stddef.h
-@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -200,6 +201,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__DragonFly__) \
- || defined(__FreeBSD_kernel__)
-@@ -218,6 +220,7 @@ typedef __SIZE_TYPE__ size_t;
- typedef long ssize_t;
- #endif /* __BEOS__ */
- #endif /* !(defined (__GNUG__) && defined (size_t)) */
-+#endif /* __DEFINED_size_t */
- #endif /* __size_t */
- #endif /* _SIZET_ */
- #endif /* _GCC_SIZE_T */
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch b/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch
deleted file mode 100644
index 3c1115aa86..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From a6c649571d49c972e6d207577780ada7e9b6bad5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:31:52 +0000
-Subject: [PATCH 45/57] Support for arm-linux-musl.
-
-Fix musl ldso for all arches
-
-Upstream-Status: backport [partial]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/aarch64-linux.h | 1 +
- gcc/config/arm/linux-eabi.h | 17 +++++++++++++++++
- gcc/config/i386/linux.h | 1 +
- gcc/config/i386/linux64.h | 5 +++++
- gcc/config/mips/linux.h | 8 +++++++-
- gcc/config/rs6000/linux64.h | 13 +++++++++----
- gcc/config/rs6000/sysv4.h | 10 +++++++---
- libitm/config/arm/hwcap.cc | 4 ++++
- libitm/config/linux/x86/tls.h | 8 ++++++--
- 9 files changed, 57 insertions(+), 10 deletions(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index f9e65fc..1b2d0c0 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -22,6 +22,7 @@
- #define GCC_AARCH64_LINUX_H
-
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
-
- #define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 048a062..adb9c44 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -81,6 +81,23 @@
- #undef TARGET_FIX_V4BX_SPEC
- #define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-
-+/* For ARM musl currently supports four dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+ musl does not support the legacy OABI mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, EL. */
-+#undef MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index 21ba2b2..e2b81e5 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -21,3 +21,4 @@ along with GCC; see the file COPYING3. If not see
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 6185cce..5a3a977 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -30,3 +30,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-+
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1"
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1"
-+#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1"
-+
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index c306afb..b899388 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -21,6 +21,12 @@ along with GCC; see the file COPYING3. If not see
- #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
-+#define MUSL_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
-+
- #define GLIBC_DYNAMIC_LINKER32 \
- "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
-@@ -40,4 +46,4 @@ along with GCC; see the file COPYING3. If not see
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 31c4338..679da4b 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -365,17 +365,22 @@ extern int dot_symbols;
- #endif
- #define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-powerpc.so.1"
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-powerpc64.so.1"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
-
- #undef DEFAULT_ASM_ENDIAN
- #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index 7cd07e0..8794fa5 100644
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -763,15 +763,19 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
-
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc
-index a1c2cfd..dd4fad2 100644
---- a/libitm/config/arm/hwcap.cc
-+++ b/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0
-
- #ifdef __linux__
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/fcntl.h>
-+#else
-+#include <fcntl.h>
-+#endif
- #include <elf.h>
-
- static void __attribute__((constructor))
-diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h
-index e731ab7..54ad8b6 100644
---- a/libitm/config/linux/x86/tls.h
-+++ b/libitm/config/linux/x86/tls.h
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct abi_dispatch *x)
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
---
-2.7.4
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch b/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
deleted file mode 100644
index ddb0fc4f40..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 047116e8c9cbb340264f4f28db3f21a68ba57ff3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:32:24 +0000
-Subject: [PATCH 46/46] Get rid of ever-broken fixincludes on musl.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- fixincludes/mkfixinc.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
-index 6653fedb..0d96c8c 100755
---- a/fixincludes/mkfixinc.sh
-+++ b/fixincludes/mkfixinc.sh
-@@ -19,7 +19,8 @@ case $machine in
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
---
-2.6.3
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch
deleted file mode 100644
index a1cfb9c7a0..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f5ca07132b9292d2045ca7204e9cbfde2e59d0bf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 10:26:10 -0800
-Subject: [PATCH 47/48] nios2: Define MUSL_DYNAMIC_LINKER
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gcc/config/nios2/linux.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
-index f43f655..5587ab3 100644
---- a/gcc/config/nios2/linux.h
-+++ b/gcc/config/nios2/linux.h
-@@ -30,6 +30,7 @@
- #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1"
-
- #undef LINK_SPEC
- #define LINK_SPEC LINK_SPEC_ENDIAN \
---
-2.7.0
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch b/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch
deleted file mode 100644
index 5ddd40a4aa..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3cb6013cf287ed9b1247ea37541e64b9810a121d Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sat, 7 Nov 2015 14:58:40 +0000
-Subject: [PATCH 48/48] ssp_nonshared
-
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
- gcc/gcc.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 8f53aea..3ddc658 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -732,7 +732,8 @@ proper position among the other output files. */
- #ifndef LINK_SSP_SPEC
- #ifdef TARGET_LIBC_PROVIDES_SSP
- #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-- "|fstack-protector-strong|fstack-protector-explicit:}"
-+ "|fstack-protector-strong|fstack-protector-explicit" \
-+ ":-lssp_nonshared}"
- #else
- #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
- "|fstack-protector-strong|fstack-protector-explicit" \
---
-2.7.0
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch b/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
deleted file mode 100644
index 0ea5143e0d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 553d8e3b9073ff3e0a9d2fac9b1823fb17ad247c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 21:00:18 -0800
-Subject: [PATCH 49/51] Disable the weak reference logic in gthr.h for
- os/generic
-
-It does not work unless work arounds are there in gthr-posix.h
-
-origin of patch
-http://port70.net/~nsz/musl/gcc-5.3.0/0004-gthr.patch
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libgfortran/acinclude.m4 | 2 +-
- libgfortran/configure | 2 +-
- libstdc++-v3/config/os/generic/os_defines.h | 5 +++++
- libstdc++-v3/configure.host | 3 +++
- 4 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4
-index ba890f9..30b8b1a6 100644
---- a/libgfortran/acinclude.m4
-+++ b/libgfortran/acinclude.m4
-@@ -100,7 +100,7 @@ void foo (void);
- [Define to 1 if the target supports #pragma weak])
- fi
- case "$host" in
-- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
- AC_DEFINE(GTHREAD_USE_WEAK, 0,
- [Define to 0 if the target shouldn't use #pragma weak])
- ;;
-diff --git a/libgfortran/configure b/libgfortran/configure
-index 5d47e65..cdf9695 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h
-
- fi
- case "$host" in
-- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
-
- $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
-
-diff --git a/libstdc++-v3/config/os/generic/os_defines.h b/libstdc++-v3/config/os/generic/os_defines.h
-index 45bf52a..103ec0e 100644
---- a/libstdc++-v3/config/os/generic/os_defines.h
-+++ b/libstdc++-v3/config/os/generic/os_defines.h
-@@ -33,4 +33,9 @@
- // System-specific #define, typedefs, corrections, etc, go here. This
- // file will come before all others.
-
-+// Disable the weak reference logic in gthr.h for os/generic because it
-+// is broken on every platform unless there is implementation specific
-+// workaround in gthr-posix.h and at link-time for static linking.
-+#define _GLIBCXX_GTHREAD_USE_WEAK 0
-+
- #endif
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
-index 1756444..2a87bb8 100644
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -273,6 +273,9 @@ case "${host_os}" in
- freebsd*)
- os_include_dir="os/bsd/freebsd"
- ;;
-+ linux-musl*)
-+ os_include_dir="os/generic"
-+ ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
- # check for musl by target
- case "${host_os}" in
---
-2.7.0
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch b/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch
deleted file mode 100644
index b2f2bbdf46..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 4fa0cf03678f849917dcc3d149989b7fecdbe276 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 21:10:00 -0800
-Subject: [PATCH 50/51] powerpc pass --secure-plt to the linker
-
-Secure-plt when enabled does not pass right options to linker
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
- gcc/config/rs6000/linux64.h | 4 ++++
- gcc/config/rs6000/sysv4.h | 2 ++
- 2 files changed, 6 insertions(+)
-
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 679da4b..3ca7cd7 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -174,20 +174,24 @@ extern int dot_symbols;
- #undef ASM_DEFAULT_SPEC
- #undef ASM_SPEC
- #undef LINK_OS_LINUX_SPEC
-+#undef LINK_SECURE_PLT_SPEC
-
- #ifndef RS6000_BI_ARCH
- #define ASM_DEFAULT_SPEC "-mppc64"
- #define ASM_SPEC "%(asm_spec64) %(asm_spec_common)"
- #define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)"
-+#define LINK_SECURE_PLT_SPEC ""
- #else
- #if DEFAULT_ARCH64_P
- #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
- #define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
- #define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}"
-+#define LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
- #else
- #define ASM_DEFAULT_SPEC "-mppc%{m64:64}"
- #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
- #define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}"
-+#define LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
- #endif
- #endif
-
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index 8794fa5..0835551 100644
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -571,6 +571,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- : %(link_start_default) }"
-
- #define LINK_START_DEFAULT_SPEC ""
-+#define LINK_SECURE_PLT_SPEC LINK_SECURE_PLT_DEFAULT_SPEC
-
- #undef LINK_SPEC
- #define LINK_SPEC "\
-@@ -578,6 +579,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- %{R*} \
- %(link_shlib) \
- %{!T*: %(link_start) } \
-+%{!static: %{!mbss-plt: %(link_secure_plt_default)}} \
- %(link_os)"
-
- /* Shared libraries are not default. */
---
-2.7.0
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch b/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
deleted file mode 100644
index e8f79b590a..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 32593b38082ea65f4c82159254adf1e0dc2423be Mon Sep 17 00:00:00 2001
-From: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 16 Feb 2016 03:15:15 -0500
-Subject: [PATCH] Ignore -fdebug-prefix-map in producer string (by Daniel Kahn
- Gillmor)
-
-* dwarf2out.c (gen_producer_string): Ignore -fdebug-prefix-map.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231835 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/dwarf2out.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 3614c10..526f114 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -19670,6 +19670,7 @@ gen_producer_string (void)
- case OPT_fpreprocessed:
- case OPT_fltrans_output_list_:
- case OPT_fresolution_:
-+ case OPT_fdebug_prefix_map_:
- /* Ignore these. */
- continue;
- default:
---
-1.9.1
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch b/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch
deleted file mode 100644
index f3cb47fd13..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 1d67120d95c2c6e0ed4f7357d1cc62887eaba463 Mon Sep 17 00:00:00 2001
-From: sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 12 May 2015 15:57:22 +0000
-Subject: [PATCH] 2015-05-12 Chung-Lin Tang <cltang@codesourcery.com>
- Sandra Loosemore <sandra@codesourcery.com>
-
- gcc/
- * config/nios2/nios2.h (enum reg_class): Add IJMP_REGS enum
- value.
- (REG_CLASS_NAMES): Add "IJMP_REGS".
- (REG_CLASS_CONTENTS): Add new entry for IJMP_REGS.
- * config/nios2/nios2.md (indirect_jump,*tablejump): Adjust to
- use new "c" register constraint.
- * config/nios2/constraint.md (c): New register constraint
- corresponding to IJMP_REGS.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223082 138bc75d-0d04-0410-961f-82ee72b054a4
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport [ git://gcc.gnu.org/git/gcc.git 1d67120d95c2c6e0ed4f7357d1cc62887eaba463 ]
----
- gcc/ChangeLog | 12 ++++++++++++
- gcc/config/nios2/constraints.md | 3 +++
- gcc/config/nios2/nios2.h | 11 +++++++----
- gcc/config/nios2/nios2.md | 4 ++--
- 4 files changed, 24 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/nios2/constraints.md b/gcc/config/nios2/constraints.md
-index f4bd9f7..735f892 100644
---- a/gcc/config/nios2/constraints.md
-+++ b/gcc/config/nios2/constraints.md
-@@ -39,6 +39,9 @@
-
- ;; Register constraints
-
-+(define_register_constraint "c" "IJMP_REGS"
-+ "A register suitable for an indirect jump.")
-+
- (define_register_constraint "j" "SIB_REGS"
- "A register suitable for an indirect sibcall.")
-
-diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h
-index 510ab5f..ac33978 100644
---- a/gcc/config/nios2/nios2.h
-+++ b/gcc/config/nios2/nios2.h
-@@ -173,6 +173,7 @@ enum reg_class
- {
- NO_REGS,
- SIB_REGS,
-+ IJMP_REGS,
- GP_REGS,
- ALL_REGS,
- LIM_REG_CLASSES
-@@ -183,6 +184,7 @@ enum reg_class
- #define REG_CLASS_NAMES \
- { "NO_REGS", \
- "SIB_REGS", \
-+ "IJMP_REGS", \
- "GP_REGS", \
- "ALL_REGS" }
-
-@@ -190,10 +192,11 @@ enum reg_class
-
- #define REG_CLASS_CONTENTS \
- { \
-- /* NO_REGS */ { 0, 0}, \
-- /* SIB_REGS */ { 0xfe0c, 0}, \
-- /* GP_REGS */ {~0, 0}, \
-- /* ALL_REGS */ {~0,~0} \
-+ /* NO_REGS */ { 0, 0}, \
-+ /* SIB_REGS */ { 0xfe0c, 0}, \
-+ /* IJMP_REGS */ { 0x7fffffff, 0}, \
-+ /* GP_REGS */ {~0, 0}, \
-+ /* ALL_REGS */ {~0,~0} \
- }
-
-
-diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md
-index 7b35d269..36ef101 100644
---- a/gcc/config/nios2/nios2.md
-+++ b/gcc/config/nios2/nios2.md
-@@ -697,7 +697,7 @@
- ; check or adjust for overflow.
-
- (define_insn "indirect_jump"
-- [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
-+ [(set (pc) (match_operand:SI 0 "register_operand" "c"))]
- ""
- "jmp\\t%0"
- [(set_attr "type" "control")])
-@@ -811,7 +811,7 @@
-
- (define_insn "*tablejump"
- [(set (pc)
-- (match_operand:SI 0 "register_operand" "r"))
-+ (match_operand:SI 0 "register_operand" "c"))
- (use (label_ref (match_operand 1 "" "")))]
- ""
- "jmp\\t%0"
---
-2.7.0
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch b/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
deleted file mode 100644
index c18f40e740..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
+++ /dev/null
@@ -1,307 +0,0 @@
-From 536b8318974495cde2b42c3c2742748e2b271be0 Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 27 May 2015 13:25:01 +0000
-Subject: [PATCH] PR target/65358 Avoid clobbering partial argument during
- sibcall
-
- PR target/65358
- * expr.c (memory_load_overlap): New function.
- (emit_push_insn): When pushing partial args to the stack would
- clobber the register part load the overlapping part into a pseudo
- and put it into the hard reg after pushing. Change return type
- to bool. Add bool argument.
- * expr.h (emit_push_insn): Change return type to bool.
- Add bool argument.
- * calls.c (expand_call): Cancel sibcall optimization when encountering
- partial argument on targets with ARGS_GROW_DOWNWARD and
- !STACK_GROWS_DOWNWARD.
- (emit_library_call_value_1): Update callsite of emit_push_insn.
- (store_one_arg): Likewise.
-
- PR target/65358
- * gcc.dg/pr65358.c: New test.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223753 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport from 6.0
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- gcc/calls.c | 17 ++++++--
- gcc/expr.c | 90 +++++++++++++++++++++++++++++++++++++-----
- gcc/expr.h | 4 +-
- gcc/testsuite/gcc.dg/pr65358.c | 33 ++++++++++++++++
- 4 files changed, 129 insertions(+), 15 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/pr65358.c
-
-diff --git a/gcc/calls.c b/gcc/calls.c
-index ee8ea5f..2334381 100644
---- a/gcc/calls.c
-+++ b/gcc/calls.c
-@@ -3236,6 +3236,14 @@ expand_call (tree exp, rtx target, int ignore)
- {
- rtx_insn *before_arg = get_last_insn ();
-
-+ /* On targets with weird calling conventions (e.g. PA) it's
-+ hard to ensure that all cases of argument overlap between
-+ stack and registers work. Play it safe and bail out. */
-+#if defined(ARGS_GROW_DOWNWARD) && !defined(STACK_GROWS_DOWNWARD)
-+ sibcall_failure = 1;
-+ break;
-+#endif
-+
- if (store_one_arg (&args[i], argblock, flags,
- adjusted_args_size.var != 0,
- reg_parm_stack_space)
-@@ -4279,7 +4287,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
- partial, reg, 0, argblock,
- GEN_INT (argvec[argnum].locate.offset.constant),
- reg_parm_stack_space,
-- ARGS_SIZE_RTX (argvec[argnum].locate.alignment_pad));
-+ ARGS_SIZE_RTX (argvec[argnum].locate.alignment_pad), false);
-
- /* Now mark the segment we just used. */
- if (ACCUMULATE_OUTGOING_ARGS)
-@@ -4886,10 +4894,11 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
-
- /* This isn't already where we want it on the stack, so put it there.
- This can either be done with push or copy insns. */
-- emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX,
-+ if (!emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX,
- parm_align, partial, reg, used - size, argblock,
- ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space,
-- ARGS_SIZE_RTX (arg->locate.alignment_pad));
-+ ARGS_SIZE_RTX (arg->locate.alignment_pad), true))
-+ sibcall_failure = 1;
-
- /* Unless this is a partially-in-register argument, the argument is now
- in the stack. */
-@@ -5001,7 +5010,7 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
- emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
- parm_align, partial, reg, excess, argblock,
- ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space,
-- ARGS_SIZE_RTX (arg->locate.alignment_pad));
-+ ARGS_SIZE_RTX (arg->locate.alignment_pad), false);
-
- /* Unless this is a partially-in-register argument, the argument is now
- in the stack.
-diff --git a/gcc/expr.c b/gcc/expr.c
-index 5c09550..24a6293 100644
---- a/gcc/expr.c
-+++ b/gcc/expr.c
-@@ -4121,12 +4121,35 @@ emit_single_push_insn (machine_mode mode, rtx x, tree type)
- }
- #endif
-
-+/* If reading SIZE bytes from X will end up reading from
-+ Y return the number of bytes that overlap. Return -1
-+ if there is no overlap or -2 if we can't determine
-+ (for example when X and Y have different base registers). */
-+
-+static int
-+memory_load_overlap (rtx x, rtx y, HOST_WIDE_INT size)
-+{
-+ rtx tmp = plus_constant (Pmode, x, size);
-+ rtx sub = simplify_gen_binary (MINUS, Pmode, tmp, y);
-+
-+ if (!CONST_INT_P (sub))
-+ return -2;
-+
-+ HOST_WIDE_INT val = INTVAL (sub);
-+
-+ return IN_RANGE (val, 1, size) ? val : -1;
-+}
-+
- /* Generate code to push X onto the stack, assuming it has mode MODE and
- type TYPE.
- MODE is redundant except when X is a CONST_INT (since they don't
- carry mode info).
- SIZE is an rtx for the size of data to be copied (in bytes),
- needed only if X is BLKmode.
-+ Return true if successful. May return false if asked to push a
-+ partial argument during a sibcall optimization (as specified by
-+ SIBCALL_P) and the incoming and outgoing pointers cannot be shown
-+ to not overlap.
-
- ALIGN (in bits) is maximum alignment we can assume.
-
-@@ -4152,11 +4175,11 @@ emit_single_push_insn (machine_mode mode, rtx x, tree type)
- for arguments passed in registers. If nonzero, it will be the number
- of bytes required. */
-
--void
-+bool
- emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- unsigned int align, int partial, rtx reg, int extra,
- rtx args_addr, rtx args_so_far, int reg_parm_stack_space,
-- rtx alignment_pad)
-+ rtx alignment_pad, bool sibcall_p)
- {
- rtx xinner;
- enum direction stack_direction
-@@ -4179,6 +4202,10 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
-
- xinner = x;
-
-+ int nregs = partial / UNITS_PER_WORD;
-+ rtx *tmp_regs = NULL;
-+ int overlapping = 0;
-+
- if (mode == BLKmode
- || (STRICT_ALIGNMENT && align < GET_MODE_ALIGNMENT (mode)))
- {
-@@ -4309,6 +4336,43 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- PARM_BOUNDARY. Assume the caller isn't lying. */
- set_mem_align (target, align);
-
-+ /* If part should go in registers and pushing to that part would
-+ overwrite some of the values that need to go into regs, load the
-+ overlapping values into temporary pseudos to be moved into the hard
-+ regs at the end after the stack pushing has completed.
-+ We cannot load them directly into the hard regs here because
-+ they can be clobbered by the block move expansions.
-+ See PR 65358. */
-+
-+ if (partial > 0 && reg != 0 && mode == BLKmode
-+ && GET_CODE (reg) != PARALLEL)
-+ {
-+ overlapping = memory_load_overlap (XEXP (x, 0), temp, partial);
-+ if (overlapping > 0)
-+ {
-+ gcc_assert (overlapping % UNITS_PER_WORD == 0);
-+ overlapping /= UNITS_PER_WORD;
-+
-+ tmp_regs = XALLOCAVEC (rtx, overlapping);
-+
-+ for (int i = 0; i < overlapping; i++)
-+ tmp_regs[i] = gen_reg_rtx (word_mode);
-+
-+ for (int i = 0; i < overlapping; i++)
-+ emit_move_insn (tmp_regs[i],
-+ operand_subword_force (target, i, mode));
-+ }
-+ else if (overlapping == -1)
-+ overlapping = 0;
-+ /* Could not determine whether there is overlap.
-+ Fail the sibcall. */
-+ else
-+ {
-+ overlapping = 0;
-+ if (sibcall_p)
-+ return false;
-+ }
-+ }
- emit_block_move (target, xinner, size, BLOCK_OP_CALL_PARM);
- }
- }
-@@ -4363,12 +4427,13 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- has a size a multiple of a word. */
- for (i = size - 1; i >= not_stack; i--)
- if (i >= not_stack + offset)
-- emit_push_insn (operand_subword_force (x, i, mode),
-+ if (!emit_push_insn (operand_subword_force (x, i, mode),
- word_mode, NULL_TREE, NULL_RTX, align, 0, NULL_RTX,
- 0, args_addr,
- GEN_INT (args_offset + ((i - not_stack + skip)
- * UNITS_PER_WORD)),
-- reg_parm_stack_space, alignment_pad);
-+ reg_parm_stack_space, alignment_pad, sibcall_p))
-+ return false;
- }
- else
- {
-@@ -4411,9 +4476,8 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- }
- }
-
-- /* If part should go in registers, copy that part
-- into the appropriate registers. Do this now, at the end,
-- since mem-to-mem copies above may do function calls. */
-+ /* Move the partial arguments into the registers and any overlapping
-+ values that we moved into the pseudos in tmp_regs. */
- if (partial > 0 && reg != 0)
- {
- /* Handle calls that pass values in multiple non-contiguous locations.
-@@ -4421,9 +4485,15 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- if (GET_CODE (reg) == PARALLEL)
- emit_group_load (reg, x, type, -1);
- else
-- {
-+ {
- gcc_assert (partial % UNITS_PER_WORD == 0);
-- move_block_to_reg (REGNO (reg), x, partial / UNITS_PER_WORD, mode);
-+ move_block_to_reg (REGNO (reg), x, nregs - overlapping, mode);
-+
-+ for (int i = 0; i < overlapping; i++)
-+ emit_move_insn (gen_rtx_REG (word_mode, REGNO (reg)
-+ + nregs - overlapping + i),
-+ tmp_regs[i]);
-+
- }
- }
-
-@@ -4432,6 +4502,8 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
-
- if (alignment_pad && args_addr == 0)
- anti_adjust_stack (alignment_pad);
-+
-+ return true;
- }
-
- /* Return X if X can be used as a subtarget in a sequence of arithmetic
-diff --git a/gcc/expr.h b/gcc/expr.h
-index 867852e..5fcc13f 100644
---- a/gcc/expr.h
-+++ b/gcc/expr.h
-@@ -218,8 +218,8 @@ extern rtx emit_move_resolve_push (machine_mode, rtx);
- extern rtx push_block (rtx, int, int);
-
- /* Generate code to push something onto the stack, given its mode and type. */
--extern void emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int,
-- int, rtx, int, rtx, rtx, int, rtx);
-+extern bool emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int,
-+ int, rtx, int, rtx, rtx, int, rtx, bool);
-
- /* Expand an assignment that stores the value of FROM into TO. */
- extern void expand_assignment (tree, tree, bool);
-diff --git a/gcc/testsuite/gcc.dg/pr65358.c b/gcc/testsuite/gcc.dg/pr65358.c
-new file mode 100644
-index 0000000..ba89fd4
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr65358.c
-@@ -0,0 +1,33 @@
-+/* { dg-do run } */
-+/* { dg-options "-O2" } */
-+
-+struct pack
-+{
-+ int fine;
-+ int victim;
-+ int killer;
-+};
-+
-+int __attribute__ ((__noinline__, __noclone__))
-+bar (int a, int b, struct pack p)
-+{
-+ if (a != 20 || b != 30)
-+ __builtin_abort ();
-+ if (p.fine != 40 || p.victim != 50 || p.killer != 60)
-+ __builtin_abort ();
-+ return 0;
-+}
-+
-+int __attribute__ ((__noinline__, __noclone__))
-+foo (int arg1, int arg2, int arg3, struct pack p)
-+{
-+ return bar (arg2, arg3, p);
-+}
-+
-+int main (void)
-+{
-+ struct pack p = { 40, 50, 60 };
-+
-+ (void) foo (10, 20, 30, p);
-+ return 0;
-+}
---
-2.7.0
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch b/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch
deleted file mode 100644
index da16879132..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch
+++ /dev/null
@@ -1,284 +0,0 @@
-From ef7c2bda6b4c88f8007ed663b1108cd4651598c8 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 02:27:43 -0400
-Subject: [PATCH] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
-
-Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
-directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
-__builtin_FILE ().
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
-
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/c-family/c-opts.c | 6 ++++
- gcc/c-family/c.opt | 4 +++
- gcc/dwarf2out.c | 1 +
- gcc/gimplify.c | 2 ++
- libcpp/Makefile.in | 10 +++---
- libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++
- libcpp/include/file-map.h | 30 ++++++++++++++++
- libcpp/macro.c | 2 ++
- 8 files changed, 142 insertions(+), 5 deletions(-)
- create mode 100644 libcpp/file-map.c
- create mode 100644 libcpp/include/file-map.h
-
-diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
-index 718a052..3f93c56 100644
---- a/gcc/c-family/c-opts.c
-+++ b/gcc/c-family/c-opts.c
-@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see
- #include "opts.h"
- #include "plugin.h" /* For PLUGIN_INCLUDE_FILE event. */
- #include "mkdeps.h"
-+#include "file-map.h"
- #include "c-target.h"
- #include "tm.h" /* For BYTES_BIG_ENDIAN,
- DOLLARS_IN_IDENTIFIERS,
-@@ -510,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
- cpp_opts->narrow_charset = arg;
- break;
-
-+ case OPT_ffile_prefix_map_:
-+ if (add_file_prefix_map (arg) < 0)
-+ error ("invalid argument %qs to -ffile-prefix-map", arg);
-+ break;
-+
- case OPT_fwide_exec_charset_:
- cpp_opts->wide_charset = arg;
- break;
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 453ec8e..30ad053 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1117,6 +1117,10 @@ fexec-charset=
- C ObjC C++ ObjC++ Joined RejectNegative
- -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
-
-+ffile-prefix-map=
-+C ObjC C++ ObjC++ Joined RejectNegative
-+-ffile-prefix-map=<old=new> Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
-+
- fextended-identifiers
- C ObjC C++ ObjC++
- Permit universal character names (\\u and \\U) in identifiers
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 526f114..438a475 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -19671,6 +19671,7 @@ gen_producer_string (void)
- case OPT_fltrans_output_list_:
- case OPT_fresolution_:
- case OPT_fdebug_prefix_map_:
-+ case OPT_ffile_prefix_map_:
- /* Ignore these. */
- continue;
- default:
-diff --git a/gcc/gimplify.c b/gcc/gimplify.c
-index c85f83a..1ffe1e1 100644
---- a/gcc/gimplify.c
-+++ b/gcc/gimplify.c
-@@ -87,6 +87,7 @@ along with GCC; see the file COPYING3. If not see
- #include "gimple-low.h"
- #include "cilk.h"
- #include "gomp-constants.h"
-+#include "file-map.h"
-
- #include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */
- #include "tree-pass.h" /* FIXME: only for PROP_gimple_any */
-@@ -2370,6 +2371,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
- case BUILT_IN_FILE:
- {
- const char *locfile = LOCATION_FILE (EXPR_LOCATION (*expr_p));
-+ locfile = remap_file_filename (locfile);
- *expr_p = build_string_literal (strlen (locfile) + 1, locfile);
- return GS_OK;
- }
-diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
-index ad35563..c210ff9 100644
---- a/libcpp/Makefile.in
-+++ b/libcpp/Makefile.in
-@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
-
-
- libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
-- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
-- mkdeps.o pch.o symtab.o traditional.o
-+ expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
-+ macro.o mkdeps.o pch.o symtab.o traditional.o
-
- libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
-- expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
-- mkdeps.c pch.c symtab.c traditional.c
-+ expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
-+ macro.c mkdeps.c pch.c symtab.c traditional.c
-
- all: libcpp.a $(USED_CATALOGS)
-
-@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
-
- TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
- include/line-map.h include/symtab.h include/cpp-id-data.h \
-- include/cpplib.h include/mkdeps.h system.h
-+ include/cpplib.h include/mkdeps.h system.h include/file-map.h
-
- TAGS: $(TAGS_SOURCES)
- cd $(srcdir) && etags $(TAGS_SOURCES)
-diff --git a/libcpp/file-map.c b/libcpp/file-map.c
-new file mode 100644
-index 0000000..04e851b
---- /dev/null
-+++ b/libcpp/file-map.c
-@@ -0,0 +1,92 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "file-map.h"
-+
-+/* Structure recording the mapping from source file and directory
-+ names at compile time to __FILE__ */
-+typedef struct file_prefix_map
-+{
-+ const char *old_prefix;
-+ const char *new_prefix;
-+ size_t old_len;
-+ size_t new_len;
-+ struct file_prefix_map *next;
-+} file_prefix_map;
-+
-+/* Linked list of such structures. */
-+static file_prefix_map *file_prefix_maps;
-+
-+/* Record prefix mapping of __FILE__. ARG is the argument to
-+ -ffile-prefix-map and must be of the form OLD=NEW. */
-+int
-+add_file_prefix_map (const char *arg)
-+{
-+ file_prefix_map *map;
-+ const char *p;
-+
-+ p = strchr (arg, '=');
-+ if (!p)
-+ {
-+ fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
-+ return -1;
-+ }
-+ map = XNEW (file_prefix_map);
-+ map->old_prefix = xstrndup (arg, p - arg);
-+ map->old_len = p - arg;
-+ p++;
-+ map->new_prefix = xstrdup (p);
-+ map->new_len = strlen (p);
-+ map->next = file_prefix_maps;
-+ file_prefix_maps = map;
-+
-+ return 0;
-+}
-+
-+/* Perform user-specified mapping of __FILE__ prefixes. Return
-+ the new name corresponding to filename. */
-+
-+const char *
-+remap_file_filename (const char *filename)
-+{
-+ file_prefix_map *map;
-+ char *s;
-+ const char *name;
-+ size_t name_len;
-+
-+ for (map = file_prefix_maps; map; map = map->next)
-+ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ break;
-+ if (!map)
-+ return filename;
-+ name = filename + map->old_len;
-+ name_len = strlen (name) + 1;
-+ s = (char *) alloca (name_len + map->new_len);
-+ memcpy (s, map->new_prefix, map->new_len);
-+ memcpy (s + map->new_len, name, name_len);
-+
-+ return xstrdup (s);
-+}
-+
-+
-diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
-new file mode 100644
-index 0000000..e6f8cbf
---- /dev/null
-+++ b/libcpp/include/file-map.h
-@@ -0,0 +1,30 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#ifndef LIBCPP_FILE_MAP_H
-+#define LIBCPP_FILE_MAP_H
-+
-+const char * remap_file_filename (const char *filename);
-+
-+int add_file_prefix_map (const char *arg);
-+
-+#endif /* !LIBCPP_FILE_MAP_H */
-diff --git a/libcpp/macro.c b/libcpp/macro.c
-index 1e0a0b5..c3d330c 100644
---- a/libcpp/macro.c
-+++ b/libcpp/macro.c
-@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see
- #include "system.h"
- #include "cpplib.h"
- #include "internal.h"
-+#include "file-map.h"
-
- typedef struct macro_arg macro_arg;
- /* This structure represents the tokens of a macro argument. These
-@@ -297,6 +298,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
- if (!name)
- abort ();
- }
-+ name = remap_file_filename (name);
- len = strlen (name);
- buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
- result = buf;
---
-1.9.1
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
deleted file mode 100644
index c7caed8c86..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 14b79641ff6b0008aef7fbf7aa300daec11d1e78 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 05:39:59 -0400
-Subject: [PATCH] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
-
-The oe-core may use external toolchain to compile,
-which may not support -ffile-prefix-map.
-
-Since we use -fdebug-prefix-map to do the same thing,
-so we could reuse it to replace -ffile-prefix-map.
-
-Upstream-Status: Inappropriate[oe-core specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/opts-global.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gcc/opts-global.c b/gcc/opts-global.c
-index b61bdcf..51bb177 100644
---- a/gcc/opts-global.c
-+++ b/gcc/opts-global.c
-@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
- #include "rtl.h"
- #include "dbgcnt.h"
- #include "debug.h"
-+#include "file-map.h"
- #include "hash-map.h"
- #include "plugin-api.h"
- #include "ipa-ref.h"
-@@ -378,6 +379,9 @@ handle_common_deferred_options (void)
-
- case OPT_fdebug_prefix_map_:
- add_debug_prefix_map (opt->arg);
-+
-+ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
-+ add_file_prefix_map (opt->arg);
- break;
-
- case OPT_fdump_:
---
-1.9.1
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch b/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
deleted file mode 100644
index 97913420e0..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 5c7bd853c8703f65904083778712ef625c3f3814 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 27 Mar 2016 20:31:50 -0700
-Subject: [PATCH 56/57] Enable libc provide ssp and
- gcc_cv_target_dl_iterate_phdr for musl
-
- * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
- (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.
- * configure: Regenerate.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Backport
-
- gcc/configure | 7 +++++++
- gcc/configure.ac | 7 +++++++
- 2 files changed, 14 insertions(+)
-
-diff --git a/gcc/configure b/gcc/configure
-index fcb05e7..81a449c 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27814,6 +27814,9 @@ if test "${gcc_cv_libc_provides_ssp+set}" = set; then :
- else
- gcc_cv_libc_provides_ssp=no
- case "$target" in
-+ *-*-musl*)
-+ # All versions of musl provide stack protector
-+ gcc_cv_libc_provides_ssp=yes;;
- *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
- # glibc 2.4 and later provides __stack_chk_fail and
- # either __stack_chk_guard, or TLS access to stack guard canary.
-@@ -27846,6 +27849,7 @@ fi
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
- # realistically usable GNU/Hurd configurations.
-+ # All supported versions of musl provide it as well
- gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
- ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
-@@ -27942,6 +27946,9 @@ case "$target" in
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 923bc9a..b08e3dc 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5291,6 +5291,9 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library,
- gcc_cv_libc_provides_ssp,
- [gcc_cv_libc_provides_ssp=no
- case "$target" in
-+ *-*-musl*)
-+ # All versions of musl provide stack protector
-+ gcc_cv_libc_provides_ssp=yes;;
- *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
- # glibc 2.4 and later provides __stack_chk_fail and
- # either __stack_chk_guard, or TLS access to stack guard canary.
-@@ -5317,6 +5320,7 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library,
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
- # realistically usable GNU/Hurd configurations.
-+ # All supported versions of musl provide it as well
- gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
- AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
-@@ -5390,6 +5394,9 @@ case "$target" in
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
---
-2.7.4
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch b/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch
deleted file mode 100644
index c193587bf9..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From c5c33bf881a2aea355310dd90873ed39bc272b3c Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:20:01 +0000
-Subject: [PATCH 57/57] unwind fix for musl
-
-On behalf of szabolcs.nagy@arm.com
-
-2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
- Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on
- Linux if target provides dl_iterate_phdr.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Backport
-
- libgcc/unwind-dw2-fde-dip.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
-index e1e566b..137dced 100644
---- a/libgcc/unwind-dw2-fde-dip.c
-+++ b/libgcc/unwind-dw2-fde-dip.c
-@@ -59,6 +59,12 @@
-
- #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
- && defined(TARGET_DL_ITERATE_PHDR) \
-+ && defined(__linux__)
-+# define USE_PT_GNU_EH_FRAME
-+#endif
-+
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-+ && defined(TARGET_DL_ITERATE_PHDR) \
- && (defined(__DragonFly__) || defined(__FreeBSD__))
- # define ElfW __ElfN
- # define USE_PT_GNU_EH_FRAME
---
-2.7.4
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch b/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch
deleted file mode 100644
index 0b91fdbbcf..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 289ad2969a5966c603bf6928ce442db74c4cbb25 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 24 Mar 2016 11:23:14 -0400
-Subject: [PATCH] gcc/final.c: -fdebug-prefix-map support to remap sources with
- relative path
-
-PR other/70428
-* final.c (remap_debug_filename): Use lrealpath to translate
-relative path before remapping
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
-diff --git a/gcc/final.c b/gcc/final.c
-index 55cf509..c3594c2 100644
---- a/gcc/final.c
-+++ b/gcc/final.c
-@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
- const char *name;
- size_t name_len;
-
-+ /* Support to remap filename with relative path */
-+ char *realpath = lrealpath (filename);
-+ if (realpath == NULL)
-+ return filename;
-+
- for (map = debug_prefix_maps; map; map = map->next)
-- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
- break;
- if (!map)
-- return filename;
-- name = filename + map->old_len;
-+ {
-+ free (realpath);
-+ return filename;
-+ }
-+ name = realpath + map->old_len;
- name_len = strlen (name) + 1;
- s = (char *) alloca (name_len + map->new_len);
- memcpy (s, map->new_prefix, map->new_len);
- memcpy (s + map->new_len, name, name_len);
-+ free (realpath);
- return ggc_strdup (s);
- }
-
---
-2.7.4
-
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch b/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch
deleted file mode 100644
index 325b72ab5f..0000000000
--- a/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
-
---- gcc-5.3.0.orig/libgcc/config/t-slibgcc
-+++ gcc-5.3.0/libgcc/config/t-slibgcc
-@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_S
- $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
-
- SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-- $(SHLIB_LDFLAGS) \
-+ $(LDFLAGS) $(SHLIB_LDFLAGS) \
- -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
- $(SHLIB_OBJS) $(SHLIB_LC) && \
- rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
diff --git a/meta/recipes-devtools/gcc/gcc-6.2.inc b/meta/recipes-devtools/gcc/gcc-6.2.inc
deleted file mode 100644
index b118995e1d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2.inc
+++ /dev/null
@@ -1,133 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "6.2.0"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "6.2.0"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-6.2:${FILE_DIRNAME}/gcc-6.2/backport:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-
-
-BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
-#SRCREV = "bd9a826d5448db11d29d2ec5884e7e679066f140"
-#BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git"
-#BASEURI ?= "ftp://sourceware.org/pub/gcc/snapshots/6.2.0-RC-20160815/gcc-6.2.0-RC-20160815.tar.bz2"
-
-SRC_URI = "\
- ${BASEURI} \
- file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0002-uclibc-conf.patch \
- file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
- file://0004-uclibc-locale.patch \
- file://0005-uclibc-locale-no__x.patch \
- file://0006-uclibc-locale-wchar_fix.patch \
- file://0007-uclibc-locale-update.patch \
- file://0008-missing-execinfo_h.patch \
- file://0009-c99-snprintf.patch \
- file://0010-gcc-poison-system-directories.patch \
- file://0011-gcc-poison-dir-extend.patch \
- file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0013-64-bit-multilib-hack.patch \
- file://0014-optional-libstdc.patch \
- file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0016-COLLECT_GCC_OPTIONS.patch \
- file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0018-fortran-cross-compile-hack.patch \
- file://0019-cpp-honor-sysroot.patch \
- file://0020-MIPS64-Default-to-N64-ABI.patch \
- file://0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0022-gcc-Fix-argument-list-too-long-error.patch \
- file://0023-Disable-sdt.patch \
- file://0024-libtool.patch \
- file://0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
- file://0028-export-CPP.patch \
- file://0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
- file://0031-Ensure-target-gcc-headers-can-be-included.patch \
- file://0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
- file://0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
- file://0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
- file://0035-aarch64-Add-support-for-musl-ldso.patch \
- file://0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
- file://0037-handle-sysroot-support-for-nativesdk-gcc.patch \
- file://0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
- file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \
- file://0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
- file://0041-ssp_nonshared.patch \
- file://0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch \
- file://0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
- file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \
- file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
- file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
- file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
- ${BACKPORTS} \
-"
-BACKPORTS = ""
-
-SRC_URI[md5sum] = "9768625159663b300ae4de2f4745fcc4"
-SRC_URI[sha256sum] = "9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5"
-
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
- ${LTO} \
- --enable-libssp \
- --enable-libitm \
- --disable-bootstrap \
- --disable-libmudflap \
- --with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
- --enable-linker-build-id \
- --with-ppl=no \
- --with-cloog=no \
- --enable-checking=release \
- --enable-cheaders=c_global \
- --without-isl \
-"
-
-EXTRA_OECONF_INITIAL = "\
- --disable-libmudflap \
- --disable-libgomp \
- --disable-libitm \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no \
- --without-isl \
- gcc_cv_libc_provides_ssp=yes \
-"
-
-EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-
-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-6.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-6.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 415f091ee7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 92ed30da16b7487b334f739be177eb39885ab772 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:37:11 +0400
-Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- configure | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 35f231e..bfadc33 100755
---- a/configure
-+++ b/configure
-@@ -7550,7 +7550,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
-diff --git a/configure.ac b/configure.ac
-index 74bf58a..197d61b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3149,7 +3149,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0002-uclibc-conf.patch b/meta/recipes-devtools/gcc/gcc-6.2/0002-uclibc-conf.patch
deleted file mode 100644
index 4d284ef862..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0002-uclibc-conf.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 4efc5a258c812875743647d756f75c93c4d514a5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:38:25 +0400
-Subject: [PATCH 02/46] uclibc-conf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- contrib/regression/objs-gcc.sh | 4 ++++
- libjava/classpath/ltconfig | 4 ++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
-index 60b0497..6dc7ead 100755
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
-diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
-index d318957..df55950 100755
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/meta/recipes-devtools/gcc/gcc-6.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch
deleted file mode 100644
index df07febee2..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From ad5fd283fc7ef04f66c7fb003805364ea3bd34e9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:40:12 +0400
-Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
- libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++
- libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
-index ef6ce8f..4740636 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.cc
-+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
-@@ -273,5 +273,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
- #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
- #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
- extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
-+#ifdef __UCLIBC__
-+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
-+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
-+#else
- _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
-+#endif
- #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
-index 794471e..d65f955 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -40,13 +40,22 @@
-
- #include <clocale>
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- #define _GLIBCXX_NUM_CATEGORIES 0
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
-+#ifdef __UCLIBC__
-+ typedef __ctype_touplow_t* __c_locale;
-+#else
- typedef int* __c_locale;
-+#endif
-
- // Convert numeric value of type double and long double to string and
- // return length of string. If vsnprintf is available use it, otherwise
-diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-index 591c793..55eb0e9 100644
---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-@@ -33,6 +33,11 @@
-
- // Information as gleaned from /usr/include/ctype.h
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- struct ctype_base
- {
- // Non-standard typedefs.
-+#ifdef __UCLIBC__
-+ typedef const __ctype_touplow_t* __to_type;
-+#else
- typedef const int* __to_type;
-+#endif
-
- // NB: Offsets into ctype<char>::_M_table force a particular size
- // on the mask type. Because of this, we don't use an enum.
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0004-uclibc-locale.patch b/meta/recipes-devtools/gcc/gcc-6.2/0004-uclibc-locale.patch
deleted file mode 100644
index ae2627c2ef..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0004-uclibc-locale.patch
+++ /dev/null
@@ -1,2862 +0,0 @@
-From 68bd083357e78678a9baac760beb2a31f00954a5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:41:39 +0400
-Subject: [PATCH 04/46] uclibc-locale
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/acinclude.m4 | 37 ++
- .../config/locale/uclibc/c++locale_internal.h | 63 ++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++
- .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++
- .../config/locale/uclibc/collate_members.cc | 80 +++
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
- .../config/locale/uclibc/messages_members.cc | 100 +++
- .../config/locale/uclibc/messages_members.h | 118 ++++
- .../config/locale/uclibc/monetary_members.cc | 692 +++++++++++++++++++++
- .../config/locale/uclibc/numeric_members.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++
- libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++
- libstdc++-v3/configure | 75 +++
- libstdc++-v3/include/c_compatibility/wchar.h | 2 +
- libstdc++-v3/include/c_std/cwchar | 2 +
- 16 files changed, 2688 insertions(+)
- create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
-
-diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
-index b0f88cb..a0ee36b 100644
---- a/libstdc++-v3/acinclude.m4
-+++ b/libstdc++-v3/acinclude.m4
-@@ -2358,6 +2358,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -2542,6 +2545,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ AC_MSG_RESULT(uclibc)
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+ AC_SUBST(glibcxx_MOFILES)
-+ AC_SUBST(glibcxx_POFILES)
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-new file mode 100644
-index 0000000..2ae3e4a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -0,0 +1,63 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+// Written by Jakub Jelinek <jakub@redhat.com>
-+
-+#include <bits/c++config.h>
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+
-+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
-+extern "C" __typeof(strcoll_l) __strcoll_l;
-+extern "C" __typeof(strftime_l) __strftime_l;
-+extern "C" __typeof(strtod_l) __strtod_l;
-+extern "C" __typeof(strtof_l) __strtof_l;
-+extern "C" __typeof(strtold_l) __strtold_l;
-+extern "C" __typeof(strxfrm_l) __strxfrm_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+extern "C" __typeof(iswctype_l) __iswctype_l;
-+extern "C" __typeof(towlower_l) __towlower_l;
-+extern "C" __typeof(towupper_l) __towupper_l;
-+extern "C" __typeof(wcscoll_l) __wcscoll_l;
-+extern "C" __typeof(wcsftime_l) __wcsftime_l;
-+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
-+extern "C" __typeof(wctype_l) __wctype_l;
-+#endif
-+
-+#endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-new file mode 100644
-index 0000000..5081dc1
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -0,0 +1,160 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <cerrno> // For errno
-+#include <locale>
-+#include <stdexcept>
-+#include <langinfo.h>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
-+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
-+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
-+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
-+#define __strtof_l(S, E, L) strtof((S), (E))
-+#define __strtod_l(S, E, L) strtod((S), (E))
-+#define __strtold_l(S, E, L) strtold((S), (E))
-+#warning should dummy __newlocale check for C|POSIX ?
-+#define __newlocale(a, b, c) NULL
-+#define __freelocale(a) ((void)0)
-+#define __duplocale(a) __c_locale()
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ void
-+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
-+ __c_locale __old)
-+ {
-+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ if (!__cloc)
-+ {
-+ // This named locale is not supported by the underlying OS.
-+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+ "name not valid"));
-+ }
-+#endif
-+ }
-+
-+ void
-+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+ {
-+ if (_S_get_c_locale() != __cloc)
-+ __freelocale(__cloc);
-+ }
-+
-+ __c_locale
-+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-+ { return __duplocale(__cloc); }
-+} // namespace std
-+
-+namespace __gnu_cxx
-+{
-+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+ {
-+ "LC_CTYPE",
-+ "LC_NUMERIC",
-+ "LC_TIME",
-+ "LC_COLLATE",
-+ "LC_MONETARY",
-+ "LC_MESSAGES",
-+#if _GLIBCXX_NUM_CATEGORIES != 0
-+ "LC_PAPER",
-+ "LC_NAME",
-+ "LC_ADDRESS",
-+ "LC_TELEPHONE",
-+ "LC_MEASUREMENT",
-+ "LC_IDENTIFICATION"
-+#endif
-+ };
-+}
-+
-+namespace std
-+{
-+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+} // namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-new file mode 100644
-index 0000000..da07c1f
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -0,0 +1,117 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifndef _C_LOCALE_H
-+#define _C_LOCALE_H 1
-+
-+#pragma GCC system_header
-+
-+#include <cstring> // get std::strlen
-+#include <cstdio> // get std::snprintf or std::sprintf
-+#include <clocale>
-+#include <langinfo.h> // For codecvt
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC_HAS_LOCALE__
-+#include <iconv.h> // For codecvt using iconv, iconv_t
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#include <libintl.h> // For messages
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning what is _GLIBCXX_C_LOCALE_GNU for
-+#endif
-+#define _GLIBCXX_C_LOCALE_GNU 1
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix categories
-+#endif
-+// #define _GLIBCXX_NUM_CATEGORIES 6
-+#define _GLIBCXX_NUM_CATEGORIES 0
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+namespace __gnu_cxx
-+{
-+ extern "C" __typeof(uselocale) __uselocale;
-+}
-+#endif
-+
-+namespace std
-+{
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ typedef __locale_t __c_locale;
-+#else
-+ typedef int* __c_locale;
-+#endif
-+
-+ // Convert numeric value of type _Tv to string and return length of
-+ // string. If snprintf is available use it, otherwise fall back to
-+ // the unsafe sprintf which, in general, can be dangerous and should
-+ // be avoided.
-+ template<typename _Tv>
-+ int
-+ __convert_from_v(char* __out,
-+ const int __size __attribute__ ((__unused__)),
-+ const char* __fmt,
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ _Tv __v, const __c_locale& __cloc, int __prec)
-+ {
-+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
-+#else
-+ _Tv __v, const __c_locale&, int __prec)
-+ {
-+# ifdef __UCLIBC_HAS_LOCALE__
-+ char* __old = std::setlocale(LC_ALL, NULL);
-+ char* __sav = new char[std::strlen(__old) + 1];
-+ std::strcpy(__sav, __old);
-+ std::setlocale(LC_ALL, "C");
-+# endif
-+#endif
-+
-+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ __gnu_cxx::__uselocale(__old);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ std::setlocale(LC_ALL, __sav);
-+ delete [] __sav;
-+#endif
-+ return __ret;
-+ }
-+}
-+
-+#endif
-diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-new file mode 100644
-index 0000000..64aa962
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-@@ -0,0 +1,308 @@
-+// std::codecvt implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <cstdlib> // For MB_CUR_MAX
-+#include <climits> // For MB_LEN_MAX
-+#include <bits/c++locale_internal.h>
-+
-+namespace std
-+{
-+ // Specializations.
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_out(state_type& __state, const intern_type* __from,
-+ const intern_type* __from_end, const intern_type*& __from_next,
-+ extern_type* __to, extern_type* __to_end,
-+ extern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
-+ // in case we fall back to wcrtomb and then continue, in a loop.
-+ // NB: wcsnrtombs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
-+ __from_end - __from_next);
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // wcrtomb.
-+ for (; __from < __from_next; ++__from)
-+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ extern_type __buf[MB_LEN_MAX];
-+ __tmp_state = __state;
-+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
-+ if (__conv > static_cast<size_t>(__to_end - __to_next))
-+ __ret = partial;
-+ else
-+ {
-+ memcpy(__to_next, __buf, __conv);
-+ __state = __tmp_state;
-+ __to_next += __conv;
-+ ++__from_next;
-+ }
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_in(state_type& __state, const extern_type* __from,
-+ const extern_type* __from_end, const extern_type*& __from_next,
-+ intern_type* __to, intern_type* __to_end,
-+ intern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we store a L'\0' and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
-+ __from_end
-+ - __from_next));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (;; ++__to_next, __from += __conv)
-+ {
-+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __from_next = __from;
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ // It is unclear what to return in this case (see DR 382).
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ if (__to_next < __to_end)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from_next;
-+ *__to_next++ = L'\0';
-+ }
-+ else
-+ __ret = partial;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_encoding() const throw()
-+ {
-+ // XXX This implementation assumes that the encoding is
-+ // stateless and is either single-byte or variable-width.
-+ int __ret = 0;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ if (MB_CUR_MAX == 1)
-+ __ret = 1;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_max_length() const throw()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ // XXX Probably wrong for stateful encodings.
-+ int __ret = MB_CUR_MAX;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_length(state_type& __state, const extern_type* __from,
-+ const extern_type* __end, size_t __max) const
-+ {
-+ int __ret = 0;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we advance past it and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+
-+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
-+ // its fourth parameter (it wouldn't with NULL as first parameter).
-+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
-+ * __max));
-+ while (__from < __end && __max)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
-+ __end
-+ - __from));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __end;
-+
-+ const extern_type* __tmp_from = __from;
-+ size_t __conv = mbsnrtowcs(__to, &__from,
-+ __from_chunk_end - __from,
-+ __max, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (__from = __tmp_from;; __from += __conv)
-+ {
-+ __conv = mbrtowc(NULL, __from, __end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __state = __tmp_state;
-+ __ret += __from - __tmp_from;
-+ break;
-+ }
-+ if (!__from)
-+ __from = __from_chunk_end;
-+
-+ __ret += __from - __tmp_from;
-+ __max -= __conv;
-+
-+ if (__from < __end && __max)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from;
-+ ++__ret;
-+ --__max;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-new file mode 100644
-index 0000000..c2664a7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -0,0 +1,80 @@
-+// std::collate implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+#endif
-+
-+namespace std
-+{
-+ // These are basically extensions to char_traits, and perhaps should
-+ // be put there instead of here.
-+ template<>
-+ int
-+ collate<char>::_M_compare(const char* __one, const char* __two) const
-+ {
-+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<char>::_M_transform(char* __to, const char* __from,
-+ size_t __n) const
-+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ int
-+ collate<wchar_t>::_M_compare(const wchar_t* __one,
-+ const wchar_t* __two) const
-+ {
-+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
-+ size_t __n) const
-+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-new file mode 100644
-index 0000000..7294e3a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -0,0 +1,300 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __wctype_l(S, L) wctype((S))
-+#define __towupper_l(C, L) towupper((C))
-+#define __towlower_l(C, L) towlower((C))
-+#define __iswctype_l(C, M, L) iswctype((C), (M))
-+#endif
-+
-+namespace std
-+{
-+ // NB: The other ctype<char> specializations are in src/locale.cc and
-+ // various /config/os/* files.
-+ template<>
-+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+ : ctype<char>(0, false, __refs)
-+ {
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
-+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
-+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
-+#endif
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ ctype<wchar_t>::__wmask_type
-+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
-+ {
-+ __wmask_type __ret;
-+ switch (__m)
-+ {
-+ case space:
-+ __ret = __wctype_l("space", _M_c_locale_ctype);
-+ break;
-+ case print:
-+ __ret = __wctype_l("print", _M_c_locale_ctype);
-+ break;
-+ case cntrl:
-+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
-+ break;
-+ case upper:
-+ __ret = __wctype_l("upper", _M_c_locale_ctype);
-+ break;
-+ case lower:
-+ __ret = __wctype_l("lower", _M_c_locale_ctype);
-+ break;
-+ case alpha:
-+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
-+ break;
-+ case digit:
-+ __ret = __wctype_l("digit", _M_c_locale_ctype);
-+ break;
-+ case punct:
-+ __ret = __wctype_l("punct", _M_c_locale_ctype);
-+ break;
-+ case xdigit:
-+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
-+ break;
-+ case alnum:
-+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
-+ break;
-+ case graph:
-+ __ret = __wctype_l("graph", _M_c_locale_ctype);
-+ break;
-+ default:
-+ __ret = __wmask_type();
-+ }
-+ return __ret;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_toupper(wchar_t __c) const
-+ { return __towupper_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_tolower(wchar_t __c) const
-+ { return __towlower_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ bool
-+ ctype<wchar_t>::
-+ do_is(mask __m, wchar_t __c) const
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ bool __ret = false;
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur]
-+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ return __ret;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+ {
-+ for (; __lo < __hi; ++__vec, ++__lo)
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ mask __m = 0;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ __m |= _M_bit[__bitcur];
-+ *__vec = __m;
-+ }
-+ return __hi;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi && !this->do_is(__m, *__lo))
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+ {
-+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::
-+ do_widen(char __c) const
-+ { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+ const char*
-+ ctype<wchar_t>::
-+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+ ++__lo;
-+ ++__dest;
-+ }
-+ return __hi;
-+ }
-+
-+ char
-+ ctype<wchar_t>::
-+ do_narrow(wchar_t __wc, char __dfault) const
-+ {
-+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+ return _M_narrow[__wc];
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ const int __c = wctob(__wc);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
-+ char* __dest) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ if (_M_narrow_ok)
-+ while (__lo < __hi)
-+ {
-+ if (*__lo >= 0 && *__lo < 128)
-+ *__dest = _M_narrow[*__lo];
-+ else
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+ ++__lo;
-+ ++__dest;
-+ }
-+ else
-+ while (__lo < __hi)
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ ++__lo;
-+ ++__dest;
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __hi;
-+ }
-+
-+ void
-+ ctype<wchar_t>::_M_initialize_ctype()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ wint_t __i;
-+ for (__i = 0; __i < 128; ++__i)
-+ {
-+ const int __c = wctob(__i);
-+ if (__c == EOF)
-+ break;
-+ else
-+ _M_narrow[__i] = static_cast<char>(__c);
-+ }
-+ if (__i == 128)
-+ _M_narrow_ok = true;
-+ else
-+ _M_narrow_ok = false;
-+ for (size_t __j = 0;
-+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
-+ _M_widen[__j] = btowc(__j);
-+
-+ for (size_t __k = 0; __k <= 11; ++__k)
-+ {
-+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
-+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ }
-+#endif // _GLIBCXX_USE_WCHAR_T
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-new file mode 100644
-index 0000000..13594d9
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -0,0 +1,100 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix gettext stuff
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__dcgettext(const char *domainname,
-+ const char *msgid, int category);
-+#undef gettext
-+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#else
-+#undef gettext
-+#define gettext(msgid) (msgid)
-+#endif
-+
-+namespace std
-+{
-+ // Specializations.
-+ template<>
-+ string
-+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
-+ __uselocale(__old);
-+ return string(__msg);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ const char* __msg = gettext(__dfault.c_str());
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return string(__msg);
-+#else
-+ const char* __msg = gettext(__dfault.c_str());
-+ return string(__msg);
-+#endif
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ wstring
-+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
-+ {
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ __uselocale(__old);
-+ return _M_convert_from_char(__msg);
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return _M_convert_from_char(__msg);
-+# else
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ return _M_convert_from_char(__msg);
-+# endif
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-new file mode 100644
-index 0000000..1424078
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -0,0 +1,118 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix prototypes for *textdomain funcs
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__textdomain(const char *domainname);
-+extern "C" char *__bindtextdomain(const char *domainname,
-+ const char *dirname);
-+#else
-+#undef __textdomain
-+#undef __bindtextdomain
-+#define __textdomain(D) ((void)0)
-+#define __bindtextdomain(D,P) ((void)0)
-+#endif
-+
-+ // Non-virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::messages(size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
-+ _M_name_messages(_S_get_c_name())
-+ { }
-+
-+ template<typename _CharT>
-+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-+ _M_name_messages(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_messages = __tmp;
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
-+ const char* __dir) const
-+ {
-+ __bindtextdomain(__s.c_str(), __dir);
-+ return this->do_open(__s, __loc);
-+ }
-+
-+ // Virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::~messages()
-+ {
-+ if (_M_name_messages != _S_get_c_name())
-+ delete [] _M_name_messages;
-+ _S_destroy_c_locale(_M_c_locale_messages);
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::do_open(const basic_string<char>& __s,
-+ const locale&) const
-+ {
-+ // No error checking is done, assume the catalog exists and can
-+ // be used.
-+ __textdomain(__s.c_str());
-+ return 0;
-+ }
-+
-+ template<typename _CharT>
-+ void
-+ messages<_CharT>::do_close(catalog) const
-+ { }
-+
-+ // messages_byname
-+ template<typename _CharT>
-+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+ : messages<_CharT>(__refs)
-+ {
-+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
-+ delete [] this->_M_name_messages;
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ this->_M_name_messages = __tmp;
-+
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
-+ }
-+ }
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-new file mode 100644
-index 0000000..aa52731
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -0,0 +1,692 @@
-+// std::moneypunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning optimize this for uclibc
-+#warning tailor for stub locale support
-+#endif
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ // Construct and return valid pattern consisting of some combination of:
-+ // space none symbol sign value
-+ money_base::pattern
-+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+ {
-+ pattern __ret;
-+
-+ // This insanely complicated routine attempts to construct a valid
-+ // pattern for use with monyepunct. A couple of invariants:
-+
-+ // if (__precedes) symbol -> value
-+ // else value -> symbol
-+
-+ // if (__space) space
-+ // else none
-+
-+ // none == never first
-+ // space never first or last
-+
-+ // Any elegant implementations of this are welcome.
-+ switch (__posn)
-+ {
-+ case 0:
-+ case 1:
-+ // 1 The sign precedes the value and symbol.
-+ __ret.field[0] = sign;
-+ if (__space)
-+ {
-+ // Pattern starts with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[3] = symbol;
-+ }
-+ __ret.field[2] = space;
-+ }
-+ else
-+ {
-+ // Pattern starts with sign and ends with none.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 2:
-+ // 2 The sign follows the value and symbol.
-+ if (__space)
-+ {
-+ // Pattern either ends with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[1] = space;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ // Pattern ends with sign then none.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[1] = symbol;
-+ }
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 3:
-+ // 3 The sign immediately precedes the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = sign;
-+ __ret.field[1] = symbol;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = symbol;
-+ }
-+ else
-+ {
-+ __ret.field[1] = sign;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ case 4:
-+ // 4 The sign immediately follows the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = sign;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ default:
-+ ;
-+ }
-+ return __ret;
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == false
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<char, true>::~moneypunct()
-+ { delete _M_data; }
-+
-+ template<>
-+ moneypunct<char, false>::~moneypunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len;
-+ __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, true>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, false>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-new file mode 100644
-index 0000000..883ec1a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -0,0 +1,160 @@
-+// std::numpunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
-+ __cloc));
-+
-+ // Check for NULL, which implies no grouping.
-+ if (_M_data->_M_thousands_sep == '\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = "true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = "false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<char>::~numpunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<wchar_t>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+ // NB: In the GNU model wchar_t is always 32 bit wide.
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+
-+ if (_M_data->_M_thousands_sep == L'\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = L"true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = L"false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<wchar_t>::~numpunct()
-+ { delete _M_data; }
-+ #endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-new file mode 100644
-index 0000000..e0707d7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -0,0 +1,406 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __timepunct<char>::
-+ _M_put(char* __s, size_t __maxlen, const char* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = '\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = "%m/%d/%y";
-+ _M_data->_M_date_era_format = "%m/%d/%y";
-+ _M_data->_M_time_format = "%H:%M:%S";
-+ _M_data->_M_time_era_format = "%H:%M:%S";
-+ _M_data->_M_date_time_format = "";
-+ _M_data->_M_date_time_era_format = "";
-+ _M_data->_M_am = "AM";
-+ _M_data->_M_pm = "PM";
-+ _M_data->_M_am_pm_format = "";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = "Sunday";
-+ _M_data->_M_day2 = "Monday";
-+ _M_data->_M_day3 = "Tuesday";
-+ _M_data->_M_day4 = "Wednesday";
-+ _M_data->_M_day5 = "Thursday";
-+ _M_data->_M_day6 = "Friday";
-+ _M_data->_M_day7 = "Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = "Sun";
-+ _M_data->_M_aday2 = "Mon";
-+ _M_data->_M_aday3 = "Tue";
-+ _M_data->_M_aday4 = "Wed";
-+ _M_data->_M_aday5 = "Thu";
-+ _M_data->_M_aday6 = "Fri";
-+ _M_data->_M_aday7 = "Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = "January";
-+ _M_data->_M_month02 = "February";
-+ _M_data->_M_month03 = "March";
-+ _M_data->_M_month04 = "April";
-+ _M_data->_M_month05 = "May";
-+ _M_data->_M_month06 = "June";
-+ _M_data->_M_month07 = "July";
-+ _M_data->_M_month08 = "August";
-+ _M_data->_M_month09 = "September";
-+ _M_data->_M_month10 = "October";
-+ _M_data->_M_month11 = "November";
-+ _M_data->_M_month12 = "December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = "Jan";
-+ _M_data->_M_amonth02 = "Feb";
-+ _M_data->_M_amonth03 = "Mar";
-+ _M_data->_M_amonth04 = "Apr";
-+ _M_data->_M_amonth05 = "May";
-+ _M_data->_M_amonth06 = "Jun";
-+ _M_data->_M_amonth07 = "Jul";
-+ _M_data->_M_amonth08 = "Aug";
-+ _M_data->_M_amonth09 = "Sep";
-+ _M_data->_M_amonth10 = "Oct";
-+ _M_data->_M_amonth11 = "Nov";
-+ _M_data->_M_amonth12 = "Dec";
-+ }
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
-+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
-+ __cloc);
-+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
-+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
-+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
-+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
-+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
-+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
-+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
-+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
-+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
-+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
-+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
-+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
-+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
-+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
-+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
-+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
-+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
-+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
-+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
-+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
-+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
-+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
-+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
-+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
-+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
-+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
-+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
-+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
-+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
-+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
-+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
-+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
-+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
-+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
-+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
-+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
-+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ __timepunct<wchar_t>::
-+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
-+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = L'\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<wchar_t>;
-+
-+#warning wide time stuff
-+// if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = L"%m/%d/%y";
-+ _M_data->_M_date_era_format = L"%m/%d/%y";
-+ _M_data->_M_time_format = L"%H:%M:%S";
-+ _M_data->_M_time_era_format = L"%H:%M:%S";
-+ _M_data->_M_date_time_format = L"";
-+ _M_data->_M_date_time_era_format = L"";
-+ _M_data->_M_am = L"AM";
-+ _M_data->_M_pm = L"PM";
-+ _M_data->_M_am_pm_format = L"";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = L"Sunday";
-+ _M_data->_M_day2 = L"Monday";
-+ _M_data->_M_day3 = L"Tuesday";
-+ _M_data->_M_day4 = L"Wednesday";
-+ _M_data->_M_day5 = L"Thursday";
-+ _M_data->_M_day6 = L"Friday";
-+ _M_data->_M_day7 = L"Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = L"Sun";
-+ _M_data->_M_aday2 = L"Mon";
-+ _M_data->_M_aday3 = L"Tue";
-+ _M_data->_M_aday4 = L"Wed";
-+ _M_data->_M_aday5 = L"Thu";
-+ _M_data->_M_aday6 = L"Fri";
-+ _M_data->_M_aday7 = L"Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = L"January";
-+ _M_data->_M_month02 = L"February";
-+ _M_data->_M_month03 = L"March";
-+ _M_data->_M_month04 = L"April";
-+ _M_data->_M_month05 = L"May";
-+ _M_data->_M_month06 = L"June";
-+ _M_data->_M_month07 = L"July";
-+ _M_data->_M_month08 = L"August";
-+ _M_data->_M_month09 = L"September";
-+ _M_data->_M_month10 = L"October";
-+ _M_data->_M_month11 = L"November";
-+ _M_data->_M_month12 = L"December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = L"Jan";
-+ _M_data->_M_amonth02 = L"Feb";
-+ _M_data->_M_amonth03 = L"Mar";
-+ _M_data->_M_amonth04 = L"Apr";
-+ _M_data->_M_amonth05 = L"May";
-+ _M_data->_M_amonth06 = L"Jun";
-+ _M_data->_M_amonth07 = L"Jul";
-+ _M_data->_M_amonth08 = L"Aug";
-+ _M_data->_M_amonth09 = L"Sep";
-+ _M_data->_M_amonth10 = L"Oct";
-+ _M_data->_M_amonth11 = L"Nov";
-+ _M_data->_M_amonth12 = L"Dec";
-+ }
-+#if 0
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ union { char *__s; wchar_t *__w; } __u;
-+
-+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
-+ _M_data->_M_date_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
-+ _M_data->_M_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
-+ _M_data->_M_am = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
-+ _M_data->_M_pm = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
-+ _M_data->_M_am_pm_format = __u.__w;
-+
-+ // Day names, starting with "C"'s Sunday.
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
-+ _M_data->_M_day1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
-+ _M_data->_M_day2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
-+ _M_data->_M_day3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
-+ _M_data->_M_day4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
-+ _M_data->_M_day5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
-+ _M_data->_M_day6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
-+ _M_data->_M_day7 = __u.__w;
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
-+ _M_data->_M_aday1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
-+ _M_data->_M_aday2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
-+ _M_data->_M_aday3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
-+ _M_data->_M_aday4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
-+ _M_data->_M_aday5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
-+ _M_data->_M_aday6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
-+ _M_data->_M_aday7 = __u.__w;
-+
-+ // Month names, starting with "C"'s January.
-+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
-+ _M_data->_M_month01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
-+ _M_data->_M_month02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
-+ _M_data->_M_month03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
-+ _M_data->_M_month04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
-+ _M_data->_M_month05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
-+ _M_data->_M_month06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
-+ _M_data->_M_month07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
-+ _M_data->_M_month08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
-+ _M_data->_M_month09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
-+ _M_data->_M_month10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
-+ _M_data->_M_month11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
-+ _M_data->_M_month12 = __u.__w;
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
-+ _M_data->_M_amonth01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
-+ _M_data->_M_amonth02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
-+ _M_data->_M_amonth03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
-+ _M_data->_M_amonth04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
-+ _M_data->_M_amonth05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
-+ _M_data->_M_amonth06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
-+ _M_data->_M_amonth07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
-+ _M_data->_M_amonth08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
-+ _M_data->_M_amonth09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
-+ _M_data->_M_amonth10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
-+ _M_data->_M_amonth11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
-+ _M_data->_M_amonth12 = __u.__w;
-+ }
-+#endif // 0
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-new file mode 100644
-index 0000000..ba8e858
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -0,0 +1,68 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
-+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_timepunct = __tmp;
-+ _M_initialize_timepunct(__cloc);
-+ }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::~__timepunct()
-+ {
-+ if (_M_name_timepunct != _S_get_c_name())
-+ delete [] _M_name_timepunct;
-+ delete _M_data;
-+ _S_destroy_c_locale(_M_c_locale_timepunct);
-+ }
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 41797a9..8a5481c 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -15830,6 +15830,9 @@ fi
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -16108,6 +16111,78 @@ $as_echo "newlib" >&6; }
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
-+$as_echo "uclibc" >&6; }
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$check_msgfmt"; then
-+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_check_msgfmt="yes"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
-+fi
-+fi
-+check_msgfmt=$ac_cv_prog_check_msgfmt
-+if test -n "$check_msgfmt"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
-+$as_echo "$check_msgfmt" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+
-+
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
-index 55a0b52..7d8bb15 100644
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -101,7 +101,9 @@ using std::wmemcmp;
- using std::wmemcpy;
- using std::wmemmove;
- using std::wmemset;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using std::wcsftime;
-+#endif
-
- #if _GLIBCXX_USE_C99_WCHAR
- using std::wcstold;
-diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
-index dc4cef02..256d126 100644
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- using ::wcscoll;
- using ::wcscpy;
- using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using ::wcsftime;
-+#endif
- using ::wcslen;
- using ::wcsncat;
- using ::wcsncmp;
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0005-uclibc-locale-no__x.patch b/meta/recipes-devtools/gcc/gcc-6.2/0005-uclibc-locale-no__x.patch
deleted file mode 100644
index 3275016e77..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0005-uclibc-locale-no__x.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From c01c14e8e9be382ecd4121ee70f5003b4cb0f904 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:42:36 +0400
-Subject: [PATCH 05/46] uclibc-locale-no__x
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 -------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 1 +
- .../config/locale/uclibc/collate_members.cc | 7 ----
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ----
- .../config/locale/uclibc/messages_members.cc | 7 +---
- .../config/locale/uclibc/messages_members.h | 18 ++++-----
- .../config/locale/uclibc/monetary_members.cc | 4 --
- .../config/locale/uclibc/numeric_members.cc | 3 --
- libstdc++-v3/config/locale/uclibc/time_members.cc | 3 --
- 10 files changed, 55 insertions(+), 54 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index 2ae3e4a..e74fddf 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
- extern "C" __typeof(wctype_l) __wctype_l;
- #endif
-
-+# define __nl_langinfo_l nl_langinfo_l
-+# define __strcoll_l strcoll_l
-+# define __strftime_l strftime_l
-+# define __strtod_l strtod_l
-+# define __strtof_l strtof_l
-+# define __strtold_l strtold_l
-+# define __strxfrm_l strxfrm_l
-+# define __newlocale newlocale
-+# define __freelocale freelocale
-+# define __duplocale duplocale
-+# define __uselocale uselocale
-+
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l iswctype_l
-+# define __towlower_l towlower_l
-+# define __towupper_l towupper_l
-+# define __wcscoll_l wcscoll_l
-+# define __wcsftime_l wcsftime_l
-+# define __wcsxfrm_l wcsxfrm_l
-+# define __wctype_l wctype_l
-+# endif
-+
-+#else
-+# define __nl_langinfo_l(N, L) nl_langinfo((N))
-+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+# define __strtod_l(S, E, L) strtod((S), (E))
-+# define __strtof_l(S, E, L) strtof((S), (E))
-+# define __strtold_l(S, E, L) strtold((S), (E))
-+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+# warning should dummy __newlocale check for C|POSIX ?
-+# define __newlocale(a, b, c) NULL
-+# define __freelocale(a) ((void)0)
-+# define __duplocale(a) __c_locale()
-+//# define __uselocale ?
-+//
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l(C, M, L) iswctype((C), (M))
-+# define __towlower_l(C, L) towlower((C))
-+# define __towupper_l(C, L) towupper((C))
-+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
-+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+# define __wctype_l(S, L) wctype((S))
-+# endif
-+
- #endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 5081dc1..21430d0 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,20 +39,6 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
--#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
--#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
--#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
--#define __strtof_l(S, E, L) strtof((S), (E))
--#define __strtod_l(S, E, L) strtod((S), (E))
--#define __strtold_l(S, E, L) strtold((S), (E))
--#warning should dummy __newlocale check for C|POSIX ?
--#define __newlocale(a, b, c) NULL
--#define __freelocale(a) ((void)0)
--#define __duplocale(a) __c_locale()
--#endif
--
- namespace std
- {
- template<>
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index da07c1f..4bca5f1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -68,6 +68,7 @@ namespace __gnu_cxx
- {
- extern "C" __typeof(uselocale) __uselocale;
- }
-+#define __uselocale uselocale
- #endif
-
- namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-index c2664a7..ec5c329 100644
---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -36,13 +36,6 @@
- #include <locale>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
--#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
--#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
--#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
--#endif
--
- namespace std
- {
- // These are basically extensions to char_traits, and perhaps should
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7294e3a..7b12861 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -38,13 +38,6 @@
- #undef _LIBC
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __wctype_l(S, L) wctype((S))
--#define __towupper_l(C, L) towupper((C))
--#define __towlower_l(C, L) towlower((C))
--#define __iswctype_l(C, M, L) iswctype((C), (M))
--#endif
--
- namespace std
- {
- // NB: The other ctype<char> specializations are in src/locale.cc and
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-index 13594d9..d7693b4 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -39,13 +39,10 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix gettext stuff
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__dcgettext(const char *domainname,
-- const char *msgid, int category);
- #undef gettext
--#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
- #else
--#undef gettext
- #define gettext(msgid) (msgid)
- #endif
-
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 1424078..d89da33 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -36,15 +36,11 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__textdomain(const char *domainname);
--extern "C" char *__bindtextdomain(const char *domainname,
-- const char *dirname);
--#else
--#undef __textdomain
--#undef __bindtextdomain
--#define __textdomain(D) ((void)0)
--#define __bindtextdomain(D,P) ((void)0)
-+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#undef textdomain
-+#undef bindtextdomain
-+#define textdomain(D) ((void)0)
-+#define bindtextdomain(D,P) ((void)0)
- #endif
-
- // Non-virtual member functions.
-@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
- const char* __dir) const
- {
-- __bindtextdomain(__s.c_str(), __dir);
-+ bindtextdomain(__s.c_str(), __dir);
- return this->do_open(__s, __loc);
- }
-
-@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- {
- // No error checking is done, assume the catalog exists and can
- // be used.
-- __textdomain(__s.c_str());
-+ textdomain(__s.c_str());
- return 0;
- }
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index aa52731..2e6f80a 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -43,10 +43,6 @@
- #warning tailor for stub locale support
- #endif
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
--
- namespace std
- {
- // Construct and return valid pattern consisting of some combination of:
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 883ec1a..2c70642 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -41,9 +41,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index e0707d7..d848ed5 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -40,9 +40,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0006-uclibc-locale-wchar_fix.patch b/meta/recipes-devtools/gcc/gcc-6.2/0006-uclibc-locale-wchar_fix.patch
deleted file mode 100644
index e45a482d53..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0006-uclibc-locale-wchar_fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From e7a4760fb40008cae33e6fc7dc4cfef6c2fd5f93 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:45:57 +0400
-Subject: [PATCH 06/46] uclibc-locale-wchar_fix
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++--
- libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 2e6f80a..31ebb9f 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -401,7 +401,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-@@ -556,7 +556,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 2c70642..d5c8961 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -127,12 +127,25 @@ namespace std
- {
- // Named locale.
- // NB: In the GNU model wchar_t is always 32 bit wide.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be numeric
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
- union { char *__s; wchar_t __w; } __u;
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
- _M_data->_M_decimal_point = __u.__w;
-
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
- _M_data->_M_thousands_sep = __u.__w;
-+#endif
-
- if (_M_data->_M_thousands_sep == L'\0')
- _M_data->_M_grouping = "";
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0007-uclibc-locale-update.patch b/meta/recipes-devtools/gcc/gcc-6.2/0007-uclibc-locale-update.patch
deleted file mode 100644
index b73e5914e2..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0007-uclibc-locale-update.patch
+++ /dev/null
@@ -1,542 +0,0 @@
-From 8d53a38a3038104e6830ecea5e4beadce54457c1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:46:58 +0400
-Subject: [PATCH 07/46] uclibc-locale-update
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 3 +
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 ++++++++++------------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++------
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++----
- .../config/locale/uclibc/messages_members.h | 12 ++--
- .../config/locale/uclibc/monetary_members.cc | 34 ++++++----
- .../config/locale/uclibc/numeric_members.cc | 5 ++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 18 ++++--
- libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++--
- 9 files changed, 158 insertions(+), 98 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index e74fddf..971a6b4 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -31,6 +31,9 @@
-
- #include <bits/c++config.h>
- #include <clocale>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstddef>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning clean this up
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 21430d0..1b9d8e1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,23 +39,20 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- template<>
- void
- __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- float __f = __strtof_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __f;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -63,16 +60,13 @@ namespace std
- __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- double __d = __strtod_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __d;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -80,16 +74,13 @@ namespace std
- __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- long double __ld = __strtold_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __ld;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- void
-@@ -110,17 +101,18 @@ namespace std
- void
- locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
- {
-- if (_S_get_c_locale() != __cloc)
-+ if (__cloc && _S_get_c_locale() != __cloc)
- __freelocale(__cloc);
- }
-
- __c_locale
- locale::facet::_S_clone_c_locale(__c_locale& __cloc)
- { return __duplocale(__cloc); }
--} // namespace std
-
--namespace __gnu_cxx
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-+
- const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
- {
- "LC_CTYPE",
-@@ -138,9 +130,11 @@ namespace __gnu_cxx
- "LC_IDENTIFICATION"
- #endif
- };
--}
-
--namespace std
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- const char* const* const locale::_S_categories = __gnu_cxx::category_names;
--} // namespace std
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index 4bca5f1..64a6d46 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -39,21 +39,23 @@
- #pragma GCC system_header
-
- #include <cstring> // get std::strlen
--#include <cstdio> // get std::snprintf or std::sprintf
-+#include <cstdio> // get std::vsnprintf or std::vsprintf
- #include <clocale>
- #include <langinfo.h> // For codecvt
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix this
- #endif
--#ifdef __UCLIBC_HAS_LOCALE__
-+#ifdef _GLIBCXX_USE_ICONV
- #include <iconv.h> // For codecvt using iconv, iconv_t
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--#include <libintl.h> // For messages
-+#ifdef HAVE_LIBINTL_H
-+#include <libintl.h> // For messages
- #endif
-+#include <cstdarg>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning what is _GLIBCXX_C_LOCALE_GNU for
-+// psm: used in os/gnu-linux/ctype_noninline.h
- #endif
- #define _GLIBCXX_C_LOCALE_GNU 1
-
-@@ -78,23 +80,25 @@ namespace std
- #else
- typedef int* __c_locale;
- #endif
--
-- // Convert numeric value of type _Tv to string and return length of
-- // string. If snprintf is available use it, otherwise fall back to
-- // the unsafe sprintf which, in general, can be dangerous and should
-+ // Convert numeric value of type double to string and return length of
-+ // string. If vsnprintf is available use it, otherwise fall back to
-+ // the unsafe vsprintf which, in general, can be dangerous and should
- // be avoided.
-- template<typename _Tv>
-- int
-- __convert_from_v(char* __out,
-- const int __size __attribute__ ((__unused__)),
-- const char* __fmt,
--#ifdef __UCLIBC_HAS_XCLOCALE__
-- _Tv __v, const __c_locale& __cloc, int __prec)
-+ inline int
-+ __convert_from_v(const __c_locale&
-+#ifndef __UCLIBC_HAS_XCLOCALE__
-+ __cloc __attribute__ ((__unused__))
-+#endif
-+ ,
-+ char* __out,
-+ const int __size,
-+ const char* __fmt, ...)
- {
-+ va_list __args;
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+
- __c_locale __old = __gnu_cxx::__uselocale(__cloc);
- #else
-- _Tv __v, const __c_locale&, int __prec)
-- {
- # ifdef __UCLIBC_HAS_LOCALE__
- char* __old = std::setlocale(LC_ALL, NULL);
- char* __sav = new char[std::strlen(__old) + 1];
-@@ -103,7 +107,9 @@ namespace std
- # endif
- #endif
-
-- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+ va_start(__args, __fmt);
-+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
-+ va_end(__args);
-
- #ifdef __UCLIBC_HAS_XCLOCALE__
- __gnu_cxx::__uselocale(__old);
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7b12861..13e011d 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -33,16 +33,20 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- // NB: The other ctype<char> specializations are in src/locale.cc and
- // various /config/os/* files.
-- template<>
- ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
- : ctype<char>(0, false, __refs)
- {
-@@ -57,6 +61,8 @@ namespace std
- #endif
- }
- }
-+ ctype_byname<char>::~ctype_byname()
-+ { }
-
- #ifdef _GLIBCXX_USE_WCHAR_T
- ctype<wchar_t>::__wmask_type
-@@ -138,17 +144,33 @@ namespace std
- ctype<wchar_t>::
- do_is(mask __m, wchar_t __c) const
- {
-- // Highest bitmask in ctype_base == 10, but extra in "C"
-- // library for blank.
-+ // The case of __m == ctype_base::space is particularly important,
-+ // due to its use in many istream functions. Therefore we deal with
-+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
-+ // is the mask corresponding to ctype_base::space. NB: an encoding
-+ // change would not affect correctness!
-+
- bool __ret = false;
-- const size_t __bitmasksize = 11;
-- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-- if (__m & _M_bit[__bitcur]
-- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-- {
-- __ret = true;
-- break;
-- }
-+ if (__m == _M_bit[5])
-+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
-+ else
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur])
-+ {
-+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ else if (__m == _M_bit[__bitcur])
-+ break;
-+ }
-+ }
-+
- return __ret;
- }
-
-@@ -290,4 +312,5 @@ namespace std
- #endif
- }
- #endif // _GLIBCXX_USE_WCHAR_T
--}
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index d89da33..067657a 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -53,12 +53,16 @@
- template<typename _CharT>
- messages<_CharT>::messages(__c_locale __cloc, const char* __s,
- size_t __refs)
-- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-- _M_name_messages(__s)
-+ : facet(__refs), _M_c_locale_messages(NULL),
-+ _M_name_messages(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_messages = __tmp;
-+
-+ // Last to avoid leaking memory if new throws.
-+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
- }
-
- template<typename _CharT>
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 31ebb9f..7679b9c 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -206,7 +211,7 @@ namespace std
- }
- break;
- default:
-- ;
-+ __ret = pattern();
- }
- return __ret;
- }
-@@ -390,7 +395,9 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
- setlocale(LC_ALL, __name);
- #endif
-
-@@ -477,8 +484,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -498,8 +505,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-@@ -545,8 +552,11 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-- setlocale(LC_ALL, __name);
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
-+ setlocale(LC_ALL, __name);
- #endif
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -633,8 +643,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -653,8 +663,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index d5c8961..8ae8969 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index d848ed5..f24d53e 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -53,11 +53,14 @@ namespace std
- const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = strftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-@@ -207,11 +210,14 @@ namespace std
- const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index ba8e858..1665dde 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -50,12 +50,21 @@
- __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
- size_t __refs)
- : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-- _M_name_timepunct(__s)
-+ _M_name_timepunct(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_timepunct = __tmp;
-- _M_initialize_timepunct(__cloc);
-+
-+ try
-+ { _M_initialize_timepunct(__cloc); }
-+ catch(...)
-+ {
-+ delete [] _M_name_timepunct;
-+ __throw_exception_again;
-+ }
-+
- }
-
- template<typename _CharT>
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0008-missing-execinfo_h.patch b/meta/recipes-devtools/gcc/gcc-6.2/0008-missing-execinfo_h.patch
deleted file mode 100644
index 01e7c9549e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6dde3da24ef4b9b357bca670d8551cab3fdda843 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:48:10 +0400
-Subject: [PATCH 08/46] missing-execinfo_h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- boehm-gc/include/gc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index 6b38f2d..fca98ff 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0009-c99-snprintf.patch b/meta/recipes-devtools/gcc/gcc-6.2/0009-c99-snprintf.patch
deleted file mode 100644
index d62341ac65..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0009-c99-snprintf.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b794f1f1c1c7c06f3f0d78cf76c4fb90c2ab8dfb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:03 +0400
-Subject: [PATCH 09/46] c99-snprintf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/c_std/cstdio | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index a4119ba..8396f43 100644
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -144,7 +144,7 @@ namespace std
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99_STDIO
-+#if _GLIBCXX_USE_C99_STDIO || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0010-gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc-6.2/0010-gcc-poison-system-directories.patch
deleted file mode 100644
index ac4cf442da..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0010-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From d76250323dad69212c958e4857a98d99ab51a39e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 10/46] gcc: poison-system-directories
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/common.opt | 4 ++++
- gcc/config.in | 6 ++++++
- gcc/configure | 16 ++++++++++++++++
- gcc/configure.ac | 10 ++++++++++
- gcc/doc/invoke.texi | 9 +++++++++
- gcc/gcc.c | 2 ++
- gcc/incpath.c | 19 +++++++++++++++++++
- 7 files changed, 66 insertions(+)
-
-diff --git a/gcc/common.opt b/gcc/common.opt
-index 67048db..733185c 100644
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -659,6 +659,10 @@ Wreturn-local-addr
- Common Var(warn_return_local_addr) Init(1) Warning
- Warn about returning a pointer/reference to a local or temporary variable.
-
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another.
-diff --git a/gcc/config.in b/gcc/config.in
-index 115cb61..105b30f 100644
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -187,6 +187,12 @@
- #endif
-
-
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
- optimizer and back end) to be checked for dynamic type safety at runtime.
- This is quite expensive. */
-diff --git a/gcc/configure b/gcc/configure
-index 1c6e340..8f83152 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -942,6 +942,7 @@ with_system_zlib
- enable_maintainer_mode
- enable_link_mutex
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_host_shared
- enable_libquadmath_support
-@@ -1681,6 +1682,8 @@ Optional Features:
- --enable-version-specific-runtime-libs
- specify that runtime libraries should be installed
- in a compiler-specific directory
-+ --enable-poison-system-directories
-+ warn for use of native system header directories
- --enable-plugin enable plugin support
- --enable-host-shared build host code as shared libraries
- --disable-libquadmath-support
-@@ -28908,6 +28911,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
- fi
-
-
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+ enableval=$enable_poison_system_directories;
-+else
-+ enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Substitute configuration variables
-
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 6c1dcd9..0fccaef 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5861,6 +5861,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
- [specify that runtime libraries should be
- installed in a compiler-specific directory])])
-
-+AC_ARG_ENABLE([poison-system-directories],
-+ AS_HELP_STRING([--enable-poison-system-directories],
-+ [warn for use of native system header directories]),,
-+ [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+ [1],
-+ [Define to warn for use of native system header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 821f8fd..8bb49e7 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -284,6 +284,7 @@ Objective-C and Objective-C++ Dialects}.
- -Wparentheses -Wno-pedantic-ms-format @gol
- -Wplacement-new -Wplacement-new=@var{n} @gol
- -Wpointer-arith -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wno-pragmas -Wredundant-decls -Wno-return-local-addr @gol
- -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol
- -Wshift-overflow -Wshift-overflow=@var{n} @gol
-@@ -4723,6 +4724,14 @@ made up of data only and thus requires no special treatment. But, for
- most targets, it is made up of code and thus requires the stack to be
- made executable in order for the program to work properly.
-
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling. This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 1af5920..4cfef7f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1017,6 +1017,8 @@ proper position among the other output files. */
- "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
- "%X %{o*} %{e*} %{N} %{n} %{r}\
- %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
-+ %{Wno-poison-system-directories:--no-poison-system-directories} \
-+ %{Werror=poison-system-directories:--error-poison-system-directories} \
- %{static:} %{L*} %(mfwrap) %(link_libgcc) " \
- VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
- %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index ea40f4a..856da41 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -26,6 +26,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
-
- /* Microsoft Windows does not natively support inodes.
- VMS has non-numeric inodes. */
-@@ -381,6 +382,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- }
- fprintf (stderr, _("End of search list.\n"));
- }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+ if (flag_poison_system_directories)
-+ {
-+ struct cpp_dir *p;
-+
-+ for (p = heads[QUOTE]; p; p = p->next)
-+ {
-+ if ((!strncmp (p->name, "/usr/include", 12))
-+ || (!strncmp (p->name, "/usr/local/include", 18))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ warning (OPT_Wpoison_system_directories,
-+ "include location \"%s\" is unsafe for "
-+ "cross-compilation",
-+ p->name);
-+ }
-+ }
-+#endif
- }
-
- /* Use given -I paths for #include "..." but not #include <...>, and
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0011-gcc-poison-dir-extend.patch b/meta/recipes-devtools/gcc/gcc-6.2/0011-gcc-poison-dir-extend.patch
deleted file mode 100644
index a1736aea12..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0011-gcc-poison-dir-extend.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a1c24b59def393e43cd50b6768604a212c788ed3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:00:34 +0400
-Subject: [PATCH 11/46] gcc-poison-dir-extend
-
-Add /sw/include and /opt/include based on the original
-zecke-no-host-includes.patch patch. The original patch checked for
-/usr/include, /sw/include and /opt/include and then triggered a failure and
-aborted.
-
-Instead, we add the two missing items to the current scan. If the user
-wants this to be a failure, they can add "-Werror=poison-system-directories".
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/incpath.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index 856da41..d2fc82c 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -392,7 +392,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- {
- if ((!strncmp (p->name, "/usr/include", 12))
- || (!strncmp (p->name, "/usr/local/include", 18))
-- || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+ || (!strncmp (p->name, "/sw/include", 11))
-+ || (!strncmp (p->name, "/opt/include", 12)))
- warning (OPT_Wpoison_system_directories,
- "include location \"%s\" is unsafe for "
- "cross-compilation",
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-6.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
deleted file mode 100644
index 939b0705f8..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 00ef5f0f2a8d3b33aeb1e55c0d23439f4dd495af Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:08:31 +0400
-Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
-
-Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
-
-This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
-
-Other changes I had to do include:
-
-- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
-
-- passing the right CFLAGS to configure scripts as exported environment variables
-
-I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
-
-Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
-
-Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- configure | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/configure b/configure
-index bfadc33..755d382 100755
---- a/configure
-+++ b/configure
-@@ -6819,6 +6819,38 @@ fi
-
-
-
-+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
-+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-+# We want to ensure that TARGET libraries (which we know are built with
-+# gcc) are built with "-O2 -g", so include those options when setting
-+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-+if test "x$CFLAGS_FOR_TARGET" = x; then
-+ CFLAGS_FOR_TARGET=$CFLAGS
-+ case " $CFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
-+ esac
-+ case " $CFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
-+ esac
-+fi
-+
-+
-+if test "x$CXXFLAGS_FOR_TARGET" = x; then
-+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
-+ case " $CXXFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
-+ esac
-+ case " $CXXFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
-+ esac
-+fi
-+
-+
- # Handle --with-headers=XXX. If the value is not "yes", the contents of
- # the named directory are copied to $(tooldir)/sys-include.
- if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0013-64-bit-multilib-hack.patch b/meta/recipes-devtools/gcc/gcc-6.2/0013-64-bit-multilib-hack.patch
deleted file mode 100644
index e31cde4317..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0013-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 7fc7a070ac53a55950a1eac76f02877d4106b4b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH 13/46] 64-bit multilib hack.
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/i386/t-linux64 | 6 ++----
- gcc/config/mips/t-linux64 | 10 +++-------
- gcc/config/rs6000/t-linux64 | 5 ++---
- 3 files changed, 7 insertions(+), 14 deletions(-)
-
-diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index c0cc8a3..365a5d6 100644
---- a/gcc/config/i386/t-linux64
-+++ b/gcc/config/i386/t-linux64
-@@ -32,7 +32,5 @@
- #
- comma=,
- MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
--MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
--MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
-index 16c8adf..b932ace 100644
---- a/gcc/config/mips/t-linux64
-+++ b/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
- # <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
--MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
-- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
-- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
-- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
-diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
-index fa7550b..9b5d9ef 100644
---- a/gcc/config/rs6000/t-linux64
-+++ b/gcc/config/rs6000/t-linux64
-@@ -26,10 +26,9 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
-
- MULTILIB_OPTIONS := m64/m32
--MULTILIB_DIRNAMES := 64 32
-+MULTILIB_DIRNAMES := . .
- MULTILIB_EXTRA_OPTS :=
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- $(COMPILE) $<
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0014-optional-libstdc.patch b/meta/recipes-devtools/gcc/gcc-6.2/0014-optional-libstdc.patch
deleted file mode 100644
index 44b0cc7d6e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0014-optional-libstdc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 36275f7981bdaf919bbc9b51a7c7fae1e192adb3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 14/46] optional libstdc
-
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
-will not run correctly since by default the linker will try to link against libstdc++
-which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
-driver. This patch adds such an option which only disables the -lstdc++.
-
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
-do this officially, the likely answer is don't build libstdc++ separately.
-
-RP 29/6/10
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- gcc/c-family/c.opt | 4 ++++
- gcc/cp/g++spec.c | 1 +
- gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++-
- gcc/gcc.c | 1 +
- 4 files changed, 37 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 4f86876..660da6c 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1647,6 +1647,10 @@ nostdinc++
- C++ ObjC++
- Do not search standard system include directories for C++.
-
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index 03cbde0..3642540 100644
---- a/gcc/cp/g++spec.c
-+++ b/gcc/cp/g++spec.c
-@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
- switch (decoded_options[i].opt_index)
- {
- case OPT_nostdlib:
-+ case OPT_nostdlib__:
- case OPT_nodefaultlibs:
- library = -1;
- break;
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 8bb49e7..84d68aa 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -207,6 +207,9 @@ in the following sections.
- -fno-weak -nostdinc++ @gol
- -fvisibility-inlines-hidden @gol
- -fvisibility-ms-compat @gol
-+-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
-+-fvtv-counts -fvtv-debug @gol
-+-nostdlib++ @gol
- -fext-numeric-literals @gol
- -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
- -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol
-@@ -470,7 +473,7 @@ Objective-C and Objective-C++ Dialects}.
- -s -static -static-libgcc -static-libstdc++ @gol
- -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
- -static-libmpx -static-libmpxwrappers @gol
---shared -shared-libgcc -symbolic @gol
-+-shared -shared-libgcc -symbolic -nostdlib++ @gol
- -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
- -u @var{symbol} -z @var{keyword}}
-
-@@ -10601,6 +10604,33 @@ library subroutines.
- constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
- GNU Compiler Collection (GCC) Internals}.)
-
-+@item -nostdlib++
-+@opindex nostdlib++
-+Do not use the standard system C++ runtime libraries when linking.
-+Only the libraries you specify will be passed to the linker.
-+
-+@cindex @option{-lgcc}, use with @option{-nostdlib}
-+@cindex @option{-nostdlib} and unresolved references
-+@cindex unresolved references and @option{-nostdlib}
-+@cindex @option{-lgcc}, use with @option{-nodefaultlibs}
-+@cindex @option{-nodefaultlibs} and unresolved references
-+@cindex unresolved references and @option{-nodefaultlibs}
-+One of the standard libraries bypassed by @option{-nostdlib} and
-+@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
-+which GCC uses to overcome shortcomings of particular machines, or special
-+needs for some languages.
-+(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
-+Collection (GCC) Internals},
-+for more discussion of @file{libgcc.a}.)
-+In most cases, you need @file{libgcc.a} even when you want to avoid
-+other standard libraries. In other words, when you specify @option{-nostdlib}
-+or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
-+This ensures that you have no unresolved references to internal GCC
-+library subroutines.
-+(An example of such an internal subroutine is @code{__main}, used to ensure C++
-+constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
-+GNU Compiler Collection (GCC) Internals}.)
-+
- @item -pie
- @opindex pie
- Produce a position independent executable on targets that support it.
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 4cfef7f..da0b482 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1028,6 +1028,7 @@ proper position among the other output files. */
- %(mflib) " STACK_SPLIT_SPEC "\
- %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-+ %{!nostdlib++:}\
- %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}"
- #endif
-
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/meta/recipes-devtools/gcc/gcc-6.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index 6fc7346f6e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 9346f6042d8f7f85a75ca2af15f3b8d234985165 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 15/46] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 7 -------
- gcc/configure.ac | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 8f83152..5e72f17 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27018,13 +27018,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 0fccaef..dd8f6fa 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4522,13 +4522,6 @@ x:
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
-
- AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0016-COLLECT_GCC_OPTIONS.patch b/meta/recipes-devtools/gcc/gcc-6.2/0016-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index c1548647c7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0016-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1033bc2d4efc5c301bb822b607a673f5b10cc69f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index da0b482..7ca129f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -4591,6 +4591,15 @@ set_collect_gcc_options (void)
- sizeof ("COLLECT_GCC_OPTIONS=") - 1);
-
- first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+ if (target_system_root_changed && target_system_root)
-+ {
-+ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+ obstack_grow (&collect_obstack, "'", 1);
-+ first_time = FALSE;
-+ }
-+#endif
- for (i = 0; (int) i < n_switches; i++)
- {
- const char *const *args;
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/gcc-6.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index 0dbabd9e93..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 67123a306880af997a99ae514677c2da4973bd1a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:17:25 +0400
-Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in
- ${B}
-
-Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
-the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-While compiling gcc-crosssdk-initial-x86_64 on some host, there is
-occasionally failure that test the existance of default.h doesn't
-work, the reason is tm_include_list='** defaults.h' rather than
-tm_include_list='** ./defaults.h'
-
-So we add the test condition for this situation.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/Makefile.in | 2 +-
- gcc/configure | 4 ++--
- gcc/configure.ac | 4 ++--
- gcc/mkconfig.sh | 4 ++--
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 6c5adc0..9a1d466 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -517,7 +517,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
- TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
-
- xmake_file=@xmake_file@
--tmake_file=@tmake_file@
-+tmake_file=@tmake_file@ ./t-oe
- TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
- TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
- TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-diff --git a/gcc/configure b/gcc/configure
-index 5e72f17..389b6d5 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -12130,8 +12130,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index dd8f6fa..91ac800 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1883,8 +1883,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index 67dfac6..b73e08d 100644
---- a/gcc/mkconfig.sh
-+++ b/gcc/mkconfig.sh
-@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
- if [ $# -ge 1 ]; then
- echo '#ifdef IN_GCC' >> ${output}T
- for file in "$@"; do
-- if test x"$file" = x"defaults.h"; then
-+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
- postpone_defaults_h="yes"
- else
- echo "# include \"$file\"" >> ${output}T
-@@ -109,7 +109,7 @@ esac
-
- # If we postponed including defaults.h, add the #include now.
- if test x"$postpone_defaults_h" = x"yes"; then
-- echo "# include \"defaults.h\"" >> ${output}T
-+ echo "# include \"./defaults.h\"" >> ${output}T
- fi
-
- # Add multiple inclusion protection guard, part two.
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0018-fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-6.2/0018-fortran-cross-compile-hack.patch
deleted file mode 100644
index b43d89ea84..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0018-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e360dc3e0f1e0b9b001ef722fcf66f8120a03dbc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH 18/46] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure | 2 +-
- libgfortran/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index f746f6f..b4f3278 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -12734,7 +12734,7 @@ esac
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index 8f377bb..67710b5 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
-
- # extra LD Flags which are required for targets
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0019-cpp-honor-sysroot.patch b/meta/recipes-devtools/gcc/gcc-6.2/0019-cpp-honor-sysroot.patch
deleted file mode 100644
index 417a5ede4d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0019-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 98d9c0c1b5552294b2130f7304bfb522da323442 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 19/46] cpp: honor sysroot.
-
-Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
-permission denied (unreadable), gcc will error.
-
-This happens when ccache is in use due to the fact it uses preprocessed source files.
-
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
--isystem, -isysroot happen and the correct sysroot is used.
-
-[YOCTO #2074]
-
-RP 2012/04/13
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/cp/lang-specs.h | 2 +-
- gcc/gcc.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index 9707fac..fe487a2 100644
---- a/gcc/cp/lang-specs.h
-+++ b/gcc/cp/lang-specs.h
-@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see
- {".ii", "@c++-cpp-output", 0, 0, 0},
- {"@c++-cpp-output",
- "%{!M:%{!MM:%{!E:\
-- cc1plus -fpreprocessed %i %(cc1_options) %2\
-+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 7ca129f..04fa81d 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1329,7 +1329,7 @@ static const struct compiler default_compilers[] =
- %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
- {".i", "@cpp-output", 0, 0, 0},
- {"@cpp-output",
-- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
- {".s", "@assembler", 0, 0, 0},
- {"@assembler",
- "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0020-MIPS64-Default-to-N64-ABI.patch b/meta/recipes-devtools/gcc/gcc-6.2/0020-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index ba612f5458..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0020-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 1f15447fbcf65142627af8a9694761534da8d0d1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH 20/46] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index f66e48c..9c6d156 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2065,29 +2065,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
- default_mips_arch=mips32
- ;;
- mips64el-st-linux-gnu)
-- default_mips_abi=n32
-+ default_mips_abi=64
- tm_file="${tm_file} mips/st.h"
- tmake_file="${tmake_file} mips/t-st"
- enable_mips_multilibs="yes"
- ;;
- mips64octeon*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
- target_cpu_default=MASK_SOFT_FLOAT_ABI
- enable_mips_multilibs="yes"
- ;;
- mipsisa64r6*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- default_mips_arch=mips64r6
- enable_mips_multilibs="yes"
- ;;
- mipsisa64r2*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- default_mips_arch=mips64r2
- enable_mips_multilibs="yes"
- ;;
- mips64*-*-linux* | mipsisa64*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- enable_mips_multilibs="yes"
- ;;
- esac
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-6.2/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index 6675ce34fa..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From 9f73c8918b63e6a1c9b79384fac411d1056eec1c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:24:50 +0400
-Subject: [PATCH 21/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
- relative to SYSTEMLIBS_DIR
-
-This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
-relative to SYSTEMLIBS_DIR which can be set in generated headers
-This breaks the assumption of hardcoded multilib in gcc
-Change is only for the supported architectures in OE including
-SH, sparc, alpha for possible future support (if any)
-
-Removes the do_headerfix task in metadata
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE configuration]
----
- gcc/config/alpha/linux-elf.h | 4 ++--
- gcc/config/arm/linux-eabi.h | 4 ++--
- gcc/config/arm/linux-elf.h | 2 +-
- gcc/config/i386/linux.h | 2 +-
- gcc/config/i386/linux64.h | 6 +++---
- gcc/config/linux.h | 8 ++++----
- gcc/config/mips/linux.h | 12 ++++++------
- gcc/config/rs6000/linux64.h | 16 ++++++----------
- gcc/config/sh/linux.h | 2 +-
- gcc/config/sparc/linux.h | 2 +-
- gcc/config/sparc/linux64.h | 4 ++--
- 11 files changed, 29 insertions(+), 33 deletions(-)
-
-diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index a0764d3..02f7a7c 100644
---- a/gcc/config/alpha/linux-elf.h
-+++ b/gcc/config/alpha/linux-elf.h
-@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index ace8481..4010435 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -68,8 +68,8 @@
- GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
-
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
--#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
- #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
-
- #define GLIBC_DYNAMIC_LINKER \
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index a94bd2d..0220628 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -62,7 +62,7 @@
-
- #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #define LINUX_TARGET_LINK_SPEC "%{h*} \
- %{static:-Bstatic} \
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index d37a875..edde586 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 73d22e3..f4b5615 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
- #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
--#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-
- #undef MUSL_DYNAMIC_LINKER32
- #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 9aeeb94..b055652 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
- GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
- supporting both 32-bit and 64-bit compilation. */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index fa253b6..da02c8d 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-
- #define GLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
-
- #undef UCLIBC_DYNAMIC_LINKER32
- #define UCLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- #undef UCLIBC_DYNAMIC_LINKER64
- #define UCLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
- #define UCLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
-
- #undef MUSL_DYNAMIC_LINKER32
- #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index fefa0c4..7173938 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -412,16 +412,11 @@ extern int dot_symbols;
- #undef LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
-
--#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
--
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
- #ifdef LINUX64_DEFAULT_ABI_ELFv2
--#define GLIBC_DYNAMIC_LINKER64 \
--"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
--":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
- #else
--#define GLIBC_DYNAMIC_LINKER64 \
--"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
--":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
- #endif
-
- #define MUSL_DYNAMIC_LINKER32 \
-@@ -429,8 +424,9 @@ extern int dot_symbols;
- #define MUSL_DYNAMIC_LINKER64 \
- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
-
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
- "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index 2a036ac..50fb735 100644
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
- "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
- "%{mfdpic:-fdpic}.so.1"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
-diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 9b32577..7bd66de 100644
---- a/gcc/config/sparc/linux.h
-+++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index a1ef325..3bae3d5 100644
---- a/gcc/config/sparc/linux64.h
-+++ b/gcc/config/sparc/linux64.h
-@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #ifdef SPARC_BI_ARCH
-
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0022-gcc-Fix-argument-list-too-long-error.patch b/meta/recipes-devtools/gcc/gcc-6.2/0022-gcc-Fix-argument-list-too-long-error.patch
deleted file mode 100644
index fab6e4aeb7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0022-gcc-Fix-argument-list-too-long-error.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From acce5157f6b3a1dc9a3676b7118ac887dc5693be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:26:37 +0400
-Subject: [PATCH 22/46] gcc: Fix argument list too long error.
-
-There would be an "Argument list too long" error when the
-build directory is longer than 200, this is caused by:
-
-headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
-
-The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
-it, use the $(sort list) of GNU make which can handle the too long list
-would fix the problem, the header would be short enough after sorted.
-The "tr ' ' '\012'" was used for translating the space to "\n", the
-$(sort list) doesn't need this.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 9a1d466..450cb79 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -3349,7 +3349,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
- # We keep the directory structure for files in config or c-family and .def
- # files. All other files are flattened to a single directory.
- $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
-- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
-+ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
- for file in $$headers; do \
- if [ -f $$file ] ; then \
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0023-Disable-sdt.patch b/meta/recipes-devtools/gcc/gcc-6.2/0023-Disable-sdt.patch
deleted file mode 100644
index 0efd890aa7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0023-Disable-sdt.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 6573aec00ada35c48c1838c8491ce8f7798ae993 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:28:10 +0400
-Subject: [PATCH 23/46] Disable sdt.
-
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
-It may or may not exist from preivous builds though. To be determinstic, disable
-sdt.h usage always. This avoids build failures if the header is removed after configure
-but before libgcc is compiled for example.
-
-RP 2012/8/7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Disable sdt for libstdc++-v3.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [hack]
----
- gcc/configure | 12 ++++++------
- gcc/configure.ac | 18 +++++++++---------
- libstdc++-v3/configure | 6 +++---
- libstdc++-v3/configure.ac | 2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 389b6d5..73c264d 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -28528,12 +28528,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
- $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
- have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
--
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--
--fi
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+#
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#
-+#fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
- $as_echo "$have_sys_sdt_h" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 91ac800..cecf121 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5514,15 +5514,15 @@ fi
- AC_SUBST([enable_default_ssp])
-
- # Test for <sys/sdt.h> on the target.
--GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
--AC_MSG_CHECKING(sys/sdt.h in the target C library)
--have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
-- AC_DEFINE(HAVE_SYS_SDT_H, 1,
-- [Define if your target C library provides sys/sdt.h])
--fi
--AC_MSG_RESULT($have_sys_sdt_h)
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+# AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+# [Define if your target C library provides sys/sdt.h])
-+#fi
-+#AC_MSG_RESULT($have_sys_sdt_h)
-
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 8a5481c..6a40e92 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -21735,11 +21735,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-- if test $glibcxx_cv_sys_sdt_h = yes; then
-+# if test $glibcxx_cv_sys_sdt_h = yes; then
-
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-
-- fi
-+# fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
- $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
-
-diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 9e19e99..0077ffd 100644
---- a/libstdc++-v3/configure.ac
-+++ b/libstdc++-v3/configure.ac
-@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
- GLIBCXX_CHECK_SC_NPROC_ONLN
- GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
- GLIBCXX_CHECK_SYSCTL_HW_NCPU
--GLIBCXX_CHECK_SDT_H
-+#GLIBCXX_CHECK_SDT_H
-
- # Check for available headers.
- AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0024-libtool.patch b/meta/recipes-devtools/gcc/gcc-6.2/0024-libtool.patch
deleted file mode 100644
index 1f73b5db5a..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0024-libtool.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6c0aa5c2538829248547197718037ff0b9788676 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:29:11 +0400
-Subject: [PATCH 24/46] libtool
-
-libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
-when running on am x86_64 build host.
-
-This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Arguably, it shouldn't be passing this into libtool in the first place but
-for now this resolves the nastiest problems this causes.
-
-func_normal_abspath would resolve an empty path to `pwd` so we need
-to filter the zero case.
-
-RP 2012/8/24
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- ltmain.sh | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..0121fba 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6359,6 +6359,10 @@ func_mode_link ()
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-+ if test -n "$install_libdir"; then
-+ func_normal_abspath "$install_libdir"
-+ install_libdir=$func_normal_abspath_result
-+ fi
-
- oldlibs=
- if test -z "$rpath"; then
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta/recipes-devtools/gcc/gcc-6.2/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index 3b7ee497f3..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b1263a48553ce75f8c3bed4fe12122af57845567 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:30:32 +0400
-Subject: [PATCH 25/46] gcc: armv4: pass fix-v4bx to linker to support EABI.
-
-The LINK_SPEC for linux gets overwritten by linux-eabi.h which
-means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
-the option is not passed to linker when chosing march=armv4
-This patch redefines this in linux-eabi.h and reinserts it
-for eabi defaulting toolchains.
-
-We might want to send it upstream.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-eabi.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 4010435..aaea1c9 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -94,10 +94,14 @@
- #define MUSL_DYNAMIC_LINKER \
- "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-
-+/* For armv4 we pass --fix-v4bx to linker to support EABI */
-+#undef TARGET_FIX_V4BX_SPEC
-+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
--#define LINK_SPEC EABI_LINK_SPEC \
-+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
- LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
- LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
-
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/meta/recipes-devtools/gcc/gcc-6.2/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index be25be6162..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From b5c305fc251299f2e328410b18cfb55c75b5f038 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:33:04 +0400
-Subject: [PATCH 26/46] Use the multilib config files from ${B} instead of
- using the ones from ${S}
-
-Use the multilib config files from ${B} instead of using the ones from ${S}
-so that the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 22 ++++++++++++++++++----
- gcc/configure.ac | 22 ++++++++++++++++++----
- 2 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 73c264d..377253e 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -12110,10 +12110,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -12124,6 +12134,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index cecf121..54e7619 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1863,10 +1863,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -1877,6 +1887,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/meta/recipes-devtools/gcc/gcc-6.2/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
deleted file mode 100644
index d1bbebc0a8..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From eb6178b7fb466ae429c56380c6dbc564a16d900a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:39:38 +0000
-Subject: [PATCH 27/46] Avoid using libdir from .la which usually points to a
- host path
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 0121fba..52bdbdb 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5628,6 +5628,9 @@ func_mode_link ()
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
-+ # Instead of using libdir from .la which usually points to a host path,
-+ # use the path the .la is contained in.
-+ libdir="$abs_ladir"
- dir="$libdir"
- absdir="$libdir"
- fi
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0028-export-CPP.patch b/meta/recipes-devtools/gcc/gcc-6.2/0028-export-CPP.patch
deleted file mode 100644
index c21253938c..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0028-export-CPP.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 617184f35e97934d9e6268e71378574e2b776c2b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:40:59 +0000
-Subject: [PATCH 28/46] export CPP
-
-The OE environment sets and exports CPP as being the target gcc. When
-building gcc-cross-canadian for a mingw targetted sdk, the following can be found
-in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
-
-configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
-configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5
-configure:3666: $? = 0
-configure:3698: result: no
-configure:3786: checking how to run the C preprocessor
-configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
-configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
-configure:3876: $? = 0
-
-Note this is a *build* target (in build-x86_64-linux) so it should be
-using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
-headers are very different, using the wrong cpp is a real problem. It is leaking
-into configure through the CPP variable. Ultimately this leads to build
-failures related to not being able to include a process.h file for pem-unix.c.
-
-The fix is to ensure we export a sane CPP value into the build
-environment when using build targets. We could define a CPP_FOR_BUILD value which may be
-the version which needs to be upstreamed but for now, this fix is good enough to
-avoid the problem.
-
-RP 22/08/2013
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 1522e39..beb9b9a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
-+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/meta/recipes-devtools/gcc/gcc-6.2/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
deleted file mode 100644
index 47b9c0d1b1..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From e140700976e3b7eb4250b1ffde9bc16494456903 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
-Date: Wed, 5 Feb 2014 16:52:31 +0200
-Subject: [PATCH 29/46] Enable SPE & AltiVec generation on powepc*linux target
-
-When is configured with --target=powerpc-linux, the resulting GCC will
-not be able to generate code for SPE targets (e500v1/v2).
-GCC configured with --target=powerpc-linuxspe will not be able to
-generate AltiVec instructions (for e6500).
-This patch modifies the configured file such that SPE or AltiVec code
-can be generated when gcc is configured with --target=powerpc-linux.
-The ABI and speciffic instructions can be selected through the
-"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
----
- gcc/config.gcc | 9 ++++++++-
- gcc/config/rs6000/linuxspe.h | 3 ---
- 2 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 9c6d156..18cff5a 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2392,7 +2392,14 @@ powerpc-*-rtems*)
- tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
- ;;
- powerpc*-*-linux*)
-- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+ case ${target} in
-+ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+ ;;
-+ *)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
-+ ;;
-+ esac
- extra_options="${extra_options} rs6000/sysv4.opt"
- tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
- extra_objs="$extra_objs rs6000-linux.o"
-diff --git a/gcc/config/rs6000/linuxspe.h b/gcc/config/rs6000/linuxspe.h
-index 35623cd..f74e00d 100644
---- a/gcc/config/rs6000/linuxspe.h
-+++ b/gcc/config/rs6000/linuxspe.h
-@@ -27,6 +27,3 @@
- #undef TARGET_DEFAULT
- #define TARGET_DEFAULT MASK_STRICT_ALIGN
- #endif
--
--#undef ASM_DEFAULT_SPEC
--#define ASM_DEFAULT_SPEC "-mppc -mspe -me500"
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/meta/recipes-devtools/gcc/gcc-6.2/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
deleted file mode 100644
index c09d0192ef..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 0ddcb95a86830766fd02122f19384fc929b377c5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:21:55 +0000
-Subject: [PATCH 30/46] 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.
-
-Upstream-Status: Inappropriate[OE-Specific]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/t-aarch64-linux | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index 1cfe9f3..d688ac9 100644
---- a/gcc/config/aarch64/t-aarch64-linux
-+++ b/gcc/config/aarch64/t-aarch64-linux
-@@ -21,8 +21,8 @@
- LIB1ASMSRC = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
-
--AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../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 = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-
--MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
-+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0031-Ensure-target-gcc-headers-can-be-included.patch b/meta/recipes-devtools/gcc/gcc-6.2/0031-Ensure-target-gcc-headers-can-be-included.patch
deleted file mode 100644
index fb1cd0f169..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0031-Ensure-target-gcc-headers-can-be-included.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From fc6621435a64a9d69aa251b70361da94cf2db6be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:25:11 +0000
-Subject: [PATCH 31/46] Ensure target gcc headers can be included
-
-There are a few headers installed as part of the OpenEmbedded
-gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
-built for the target architecture, these are within the target
-sysroot and not cross/nativesdk; thus they weren't able to be
-found by gcc with the existing search paths. Add support for
-picking up these headers under the sysroot supplied on the gcc
-command line in order to resolve this.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/Makefile.in | 2 ++
- gcc/cppdefault.c | 4 ++++
- gcc/defaults.h | 9 +++++++++
- gcc/gcc.c | 7 -------
- 4 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 450cb79..cc75536 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -593,6 +593,7 @@ libexecdir = @libexecdir@
-
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
-+libsubdir_target = gcc/$(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
- # Directory in which all plugin resources are installed
-@@ -2688,6 +2689,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
-
- PREPROCESSOR_DEFINES = \
- -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-+ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
- -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
- -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 54aaf06..7b4dd51 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
- /* This is the dir for gcc's private headers. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
-+#ifdef GCC_INCLUDE_SUBDIR_TARGET
-+ /* This is the dir for gcc's private headers under the specified sysroot. */
-+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+#endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-diff --git a/gcc/defaults.h b/gcc/defaults.h
-index 3e18338..0f317f2 100644
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1492,4 +1492,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
- #endif
-
-+/* Default prefixes to attach to command names. */
-+
-+#ifndef STANDARD_STARTFILE_PREFIX_1
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#endif
-+#ifndef STANDARD_STARTFILE_PREFIX_2
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#endif
-+
- #endif /* ! GCC_DEFAULTS_H */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 04fa81d..9750cc2 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1450,13 +1450,6 @@ static const char *gcc_libexec_prefix;
-
- /* Default prefixes to attach to command names. */
-
--#ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
--#endif
--#ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
--#endif
--
- #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
- #undef MD_EXEC_PREFIX
- #undef MD_STARTFILE_PREFIX
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/meta/recipes-devtools/gcc/gcc-6.2/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
deleted file mode 100644
index c0b001db51..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From ff939c5063d8f8d444bdb25651a0a48e608efaa4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 11:17:19 +0000
-Subject: [PATCH 32/46] gcc 4.8+ won't build with --disable-dependency-tracking
-
-since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
-
-This patch ensures we only use those compiler options when its enabled.
-
-Upstream-Status: Submitted
-
-(Problem was already reported upstream, attached this patch there
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
-
-RP
-2012/09/22
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libatomic/Makefile.am | 3 ++-
- libatomic/Makefile.in | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index b351244..399ce18 100644
---- a/libatomic/Makefile.am
-+++ b/libatomic/Makefile.am
-@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
-
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
-diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index a083d87..a92cfce 100644
---- a/libatomic/Makefile.in
-+++ b/libatomic/Makefile.in
-@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
- PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/meta/recipes-devtools/gcc/gcc-6.2/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
deleted file mode 100644
index e425d71463..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5092f5389d02e78cd59690cf3fca24b56a97aff2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 3 Mar 2015 08:21:19 +0000
-Subject: [PATCH 33/46] Don't search host directory during "relink" if
- $inst_prefix is provided
-
-http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
-
-Upstream-Status: Submitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 52bdbdb..82bcec3 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6004,12 +6004,13 @@ func_mode_link ()
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
-+ # Default if $libdir is not relative to the prefix:
- add_dir="-L$libdir"
-- # Try looking first in the location we're being installed to.
-+
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
-- add_dir="$add_dir -L$inst_prefix_dir$libdir"
-+ add_dir="-L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/meta/recipes-devtools/gcc/gcc-6.2/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
deleted file mode 100644
index 922a8555b6..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1faa6f69f93bb95af2b2b2bd24e181b50fb5b37c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:15:27 -0700
-Subject: [PATCH 34/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding
- base_libdir
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 5fcaa59..8588ac0 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,7 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0035-aarch64-Add-support-for-musl-ldso.patch b/meta/recipes-devtools/gcc/gcc-6.2/0035-aarch64-Add-support-for-musl-ldso.patch
deleted file mode 100644
index 9dfc47276f..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0035-aarch64-Add-support-for-musl-ldso.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3768468c1a6cc170fff88c03b808c975ac653811 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:18:39 -0700
-Subject: [PATCH 35/46] aarch64: Add support for musl ldso
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 8588ac0..946b3ca 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -24,7 +24,7 @@
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef MUSL_DYNAMIC_LINKER
--#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/meta/recipes-devtools/gcc/gcc-6.2/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
deleted file mode 100644
index f89a8860f9..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From f4d3c8e970d42a43cd3d2f751e13324efa936ff8 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 5 Jul 2015 20:25:18 -0700
-Subject: [PATCH 36/46] libcc1: fix libcc1's install path and rpath
-
-* Install libcc1.so and libcc1plugin.so into
- $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
- had done to lto-plugin.
-* Fix bad RPATH iussue:
- gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
- /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
- [rpaths]
-
-Upstream-Status: Inappropriate [OE configuration]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libcc1/Makefile.am | 4 ++--
- libcc1/Makefile.in | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
-index b40820b..32930c5 100644
---- a/libcc1/Makefile.am
-+++ b/libcc1/Makefile.am
-@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- $(Wc)$(libiberty_normal)))
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
-
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
-
- if ENABLE_PLUGIN
- plugin_LTLIBRARIES = libcc1plugin.la
-diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
-index 79d39d3..227ec22 100644
---- a/libcc1/Makefile.in
-+++ b/libcc1/Makefile.in
-@@ -291,8 +291,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- $(Wc)$(libiberty_normal)))
-
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
- @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
- @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
- BUILT_SOURCES = compiler-name.h
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0037-handle-sysroot-support-for-nativesdk-gcc.patch b/meta/recipes-devtools/gcc/gcc-6.2/0037-handle-sysroot-support-for-nativesdk-gcc.patch
deleted file mode 100644
index 15efcb12ed..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0037-handle-sysroot-support-for-nativesdk-gcc.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From 1475b941d7a9c9874b0fb0558d01805945467331 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:39:54 +0000
-Subject: [PATCH 37/46] handle sysroot support for nativesdk-gcc
-
-Being able to build a nativesdk gcc is useful, particularly in cases
-where the host compiler may be of an incompatible version (or a 32
-bit compiler is needed).
-
-Sadly, building nativesdk-gcc is not straight forward. We install
-nativesdk-gcc into a relocatable location and this means that its
-library locations can change. "Normal" sysroot support doesn't help
-in this case since the values of paths like "libdir" change, not just
-base root directory of the system.
-
-In order to handle this we do two things:
-
-a) Add %r into spec file markup which can be used for injected paths
- such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
-b) Add other paths which need relocation into a .gccrelocprefix section
- which the relocation code will notice and adjust automatically.
-
-Upstream-Status: Inappropriate
-RP 2015/7/28
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++-------------
- gcc/cppdefault.h | 3 ++-
- gcc/gcc.c | 20 ++++++++++++++------
- 3 files changed, 53 insertions(+), 20 deletions(-)
-
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 7b4dd51..9d1166c 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -35,6 +35,30 @@
- # undef CROSS_INCLUDE_DIR
- #endif
-
-+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
-+static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
-+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
-+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
-+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
-+#ifdef LOCAL_INCLUDE_DIR
-+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
-+#endif
-+#ifdef PREFIX_INCLUDE_DIR
-+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
-+#endif
-+#ifdef FIXED_INCLUDE_DIR
-+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
-+#endif
-+#ifdef CROSS_INCLUDE_DIR
-+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
-+#endif
-+#ifdef TOOL_INCLUDE_DIR
-+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
-+#endif
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
-+#endif
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
- = {
- #ifdef GPLUSPLUS_INCLUDE_DIR
- /* Pick up GNU C++ generic include files. */
-- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
- /* Pick up GNU C++ target-dependent include files. */
-- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
- #endif
- #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
- /* Pick up GNU C++ backward and deprecated include files. */
-- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GCC_INCLUDE_DIR
- /* This is the dir for gcc's private headers. */
-- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef GCC_INCLUDE_SUBDIR_TARGET
- /* This is the dir for gcc's private headers under the specified sysroot. */
-- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
- #endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
- #endif
- #ifdef PREFIX_INCLUDE_DIR
-- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
-+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
- #endif
- #ifdef FIXED_INCLUDE_DIR
- /* This is the dir for fixincludes. */
-- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
-+ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
- /* A multilib suffix needs adding if different multilibs use
- different headers. */
- #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
- #endif
- #ifdef CROSS_INCLUDE_DIR
- /* One place the target system's headers might be. */
-- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef TOOL_INCLUDE_DIR
- /* Another place the target system's headers might be. */
-- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
-+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
- #endif
- #ifdef NATIVE_SYSTEM_HEADER_DIR
- /* /usr/include comes dead last. */
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
- #endif
- { 0, 0, 0, 0, 0, 0 }
- };
-diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index 8a81b45..9759efd 100644
---- a/gcc/cppdefault.h
-+++ b/gcc/cppdefault.h
-@@ -33,7 +33,8 @@
-
- struct default_include
- {
-- const char *const fname; /* The name of the directory. */
-+ const char *fname; /* The name of the directory. */
-+
- const char *const component; /* The component containing the directory
- (see update_path in prefix.c) */
- const char cplusplus; /* Only look here if we're compiling C++. */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 9750cc2..94c240e 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -247,6 +247,8 @@ FILE *report_times_to_file = NULL;
- #endif
- static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
-
-+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
-+
- /* Nonzero means pass the updated target_system_root to the compiler. */
-
- static int target_system_root_changed;
-@@ -517,6 +519,7 @@ or with constant text in a single argument.
- %G process LIBGCC_SPEC as a spec.
- %R Output the concatenation of target_system_root and
- target_sysroot_suffix.
-+ %r Output the base path target_relocatable_prefix
- %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
- %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
- %C process CPP_SPEC as a spec.
-@@ -1473,10 +1476,10 @@ static const char *gcc_libexec_prefix;
- gcc_exec_prefix is set because, in that case, we know where the
- compiler has been installed, and use paths relative to that
- location instead. */
--static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
--static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
--static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
--static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
-+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
-+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
-+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-
- /* For native compilers, these are well-known paths containing
- components that may be provided by the system. For cross
-@@ -1484,9 +1487,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *md_exec_prefix = MD_EXEC_PREFIX;
- static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
- static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_1
-+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_2
-+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_2;
-
- /* A relative path to be used in finding the location of tools
-@@ -5762,6 +5765,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
- }
- break;
-
-+ case 'r':
-+ obstack_grow (&obstack, target_relocatable_prefix,
-+ strlen (target_relocatable_prefix));
-+ break;
-+
- case 'S':
- value = do_spec_1 (startfile_spec, 0, NULL);
- if (value != 0)
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/meta/recipes-devtools/gcc/gcc-6.2/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
deleted file mode 100644
index 89ee79db89..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 42e4cdcaad590536246866b0846ec279e124fa16 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:41:45 +0000
-Subject: [PATCH 38/46] Search target sysroot gcc version specific dirs with
- multilib.
-
-We install the gcc libraries (such as crtbegin.p) into
-<sysroot><libdir>/<target-sys>/5.2.0/
-which is a default search path for GCC (aka multi_suffix in the
-code below). <target-sys> is 'machine' in gcc's terminology. We use
-these directories so that multiple gcc versions could in theory
-co-exist on target.
-
-We only want to build one gcc-cross-canadian per arch and have this work
-for all multilibs. <target-sys> can be handled by mapping the multilib
-<target-sys> to the one used by gcc-cross-canadian, e.g.
-mips64-polkmllib32-linux
-is symlinked to by mips64-poky-linux.
-
-The default gcc search path in the target sysroot for a "lib64" mutlilib
-is:
-
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-which means that the lib32 crtbegin.o will be found and the lib64 ones
-will not which leads to compiler failures.
-
-This patch injects a multilib version of that path first so the lib64
-binaries can be found first. With this change the search path becomes:
-
-<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-Upstream-Status: Pending
-RP 2015/7/31
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
- 1 file changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 94c240e..2812819 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -2507,7 +2507,7 @@ for_each_path (const struct path_prefix *paths,
- if (path == NULL)
- {
- len = paths->max_len + extra_space + 1;
-- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
-+ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
- path = XNEWVEC (char, len);
- }
-
-@@ -2519,6 +2519,33 @@ for_each_path (const struct path_prefix *paths,
- /* Look first in MACHINE/VERSION subdirectory. */
- if (!skip_multi_dir)
- {
-+ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
-+ {
-+ const char *this_multi;
-+ size_t this_multi_len;
-+
-+ if (pl->os_multilib)
-+ {
-+ this_multi = multi_os_dir;
-+ this_multi_len = multi_os_dir_len;
-+ }
-+ else
-+ {
-+ this_multi = multi_dir;
-+ this_multi_len = multi_dir_len;
-+ }
-+
-+ /* Look in multilib MACHINE/VERSION subdirectory first */
-+ if (this_multi_len)
-+ {
-+ memcpy (path + len, this_multi, this_multi_len + 1);
-+ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
-+ ret = callback (path, callback_info);
-+ if (ret)
-+ break;
-+ }
-+ }
-+
- memcpy (path + len, multi_suffix, suffix_len + 1);
- ret = callback (path, callback_info);
- if (ret)
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0039-Fix-various-_FOR_BUILD-and-related-variables.patch b/meta/recipes-devtools/gcc/gcc-6.2/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
deleted file mode 100644
index 0ce7aec790..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 9ced49e459ccf1887feb58adf1e8836dcb4b1bdf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:42:45 +0000
-Subject: [PATCH 39/46] Fix various _FOR_BUILD and related variables
-
-When doing a FOR_BUILD thing, you have to override CFLAGS with
-CFLAGS_FOR_BUILD. And if you use C++, you also have to override
-CXXFLAGS with CXXFLAGS_FOR_BUILD.
-Without this, when building for mingw, you end up trying to use
-the mingw headers for a host build.
-
-The same goes for other variables as well, such as CPPFLAGS,
-CPP, and GMPINC.
-
-Upstream-Status: Pending
-
-Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 6 ++++++
- Makefile.tpl | 5 +++++
- gcc/Makefile.in | 2 +-
- gcc/configure | 2 +-
- gcc/configure.ac | 2 +-
- 5 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index beb9b9a..3e1c6bc 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
- CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -170,6 +171,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-@@ -713,6 +718,7 @@ BASE_FLAGS_TO_PASS = \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
-+ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
- "EXPECT=$(EXPECT)" \
- "FLEX=$(FLEX)" \
- "INSTALL=$(INSTALL)" \
-diff --git a/Makefile.tpl b/Makefile.tpl
-index 6b2eb6a..114e462 100644
---- a/Makefile.tpl
-+++ b/Makefile.tpl
-@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -172,6 +173,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index cc75536..0ad2dc8 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -780,7 +780,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
- BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
- BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
- BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
-+ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
-
- # Actual name to use when installing a native compiler.
- GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
-diff --git a/gcc/configure b/gcc/configure
-index 377253e..78fc64a 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11799,7 +11799,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 54e7619..a94666e 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1682,7 +1682,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/meta/recipes-devtools/gcc/gcc-6.2/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
deleted file mode 100644
index c9a6fd0ebc..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b0412c01c275aaeb6b458461cd2425120c8bcec8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 10:26:10 -0800
-Subject: [PATCH 40/46] nios2: Define MUSL_DYNAMIC_LINKER
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gcc/config/nios2/linux.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
-index 4ef55b5..62bc1e7 100644
---- a/gcc/config/nios2/linux.h
-+++ b/gcc/config/nios2/linux.h
-@@ -30,6 +30,7 @@
- #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1"
-
- #undef LINK_SPEC
- #define LINK_SPEC LINK_SPEC_ENDIAN \
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0041-ssp_nonshared.patch b/meta/recipes-devtools/gcc/gcc-6.2/0041-ssp_nonshared.patch
deleted file mode 100644
index 0744529741..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0041-ssp_nonshared.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 551a5db7acb56e085a101f1c222d51b2c1b039a4 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sat, 7 Nov 2015 14:58:40 +0000
-Subject: [PATCH 41/46] ssp_nonshared
-
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/gcc.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 2812819..9de96ee 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -863,7 +863,8 @@ proper position among the other output files. */
- #ifndef LINK_SSP_SPEC
- #ifdef TARGET_LIBC_PROVIDES_SSP
- #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-- "|fstack-protector-strong|fstack-protector-explicit:}"
-+ "|fstack-protector-strong|fstack-protector-explicit" \
-+ ":-lssp_nonshared}"
- #else
- #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
- "|fstack-protector-strong|fstack-protector-explicit" \
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch b/meta/recipes-devtools/gcc/gcc-6.2/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
deleted file mode 100644
index 861f0fd7f1..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From ba738cc411c9a54e389e336bcaa0a2428dd4a9d2 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 02:27:43 -0400
-Subject: [PATCH 42/46] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
-
-Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
-directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
-__builtin_FILE ().
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
-
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/c-family/c-opts.c | 13 +++++++
- gcc/c-family/c.opt | 4 +++
- gcc/dwarf2out.c | 1 +
- gcc/gimplify.c | 3 ++
- libcpp/Makefile.in | 10 +++---
- libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++
- libcpp/include/file-map.h | 30 ++++++++++++++++
- libcpp/macro.c | 2 ++
- 8 files changed, 150 insertions(+), 5 deletions(-)
- create mode 100644 libcpp/file-map.c
- create mode 100644 libcpp/include/file-map.h
-
-diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
-index fec58bc..7a0af43 100644
---- a/gcc/c-family/c-opts.c
-+++ b/gcc/c-family/c-opts.c
-@@ -38,6 +38,14 @@ along with GCC; see the file COPYING3. If not see
- #include "opts.h"
- #include "plugin.h" /* For PLUGIN_INCLUDE_FILE event. */
- #include "mkdeps.h"
-+#include "file-map.h"
-+#include "c-target.h"
-+#include "tm.h" /* For BYTES_BIG_ENDIAN,
-+ DOLLARS_IN_IDENTIFIERS,
-+ STDC_0_IN_SYSTEM_HEADERS,
-+ TARGET_FLT_EVAL_METHOD_NON_DEFAULT and
-+ TARGET_OPTF. */
-+#include "tm_p.h" /* For C_COMMON_OVERRIDE_OPTIONS. */
- #include "dumpfile.h"
-
- #ifndef DOLLARS_IN_IDENTIFIERS
-@@ -503,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
- cpp_opts->narrow_charset = arg;
- break;
-
-+ case OPT_ffile_prefix_map_:
-+ if (add_file_prefix_map (arg) < 0)
-+ error ("invalid argument %qs to -ffile-prefix-map", arg);
-+ break;
-+
- case OPT_fwide_exec_charset_:
- cpp_opts->wide_charset = arg;
- break;
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 660da6c..31f7b34 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1208,6 +1208,10 @@ fexec-charset=
- C ObjC C++ ObjC++ Joined RejectNegative
- -fexec-charset=<cset> Convert all strings and character constants to character set <cset>.
-
-+ffile-prefix-map=
-+C ObjC C++ ObjC++ Joined RejectNegative
-+-ffile-prefix-map=<old=new> Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
-+
- fextended-identifiers
- C ObjC C++ ObjC++
- Permit universal character names (\\u and \\U) in identifiers.
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 80f2df5..a2bfcc0 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -21672,6 +21672,7 @@ gen_producer_string (void)
- case OPT_fltrans_output_list_:
- case OPT_fresolution_:
- case OPT_fdebug_prefix_map_:
-+ case OPT_ffile_prefix_map_:
- /* Ignore these. */
- continue;
- default:
-diff --git a/gcc/gimplify.c b/gcc/gimplify.c
-index e223e59..1433c25 100644
---- a/gcc/gimplify.c
-+++ b/gcc/gimplify.c
-@@ -57,6 +57,8 @@ along with GCC; see the file COPYING3. If not see
- #include "gomp-constants.h"
- #include "tree-dump.h"
- #include "gimple-walk.h"
-+#include "file-map.h"
-+
- #include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */
- #include "builtins.h"
-
-@@ -2432,6 +2434,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
- case BUILT_IN_FILE:
- {
- const char *locfile = LOCATION_FILE (EXPR_LOCATION (*expr_p));
-+ locfile = remap_file_filename (locfile);
- *expr_p = build_string_literal (strlen (locfile) + 1, locfile);
- return GS_OK;
- }
-diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
-index a7d7828..3d29572 100644
---- a/libcpp/Makefile.in
-+++ b/libcpp/Makefile.in
-@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
-
-
- libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
-- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
-- mkdeps.o pch.o symtab.o traditional.o
-+ expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
-+ macro.o mkdeps.o pch.o symtab.o traditional.o
-
- libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
-- expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
-- mkdeps.c pch.c symtab.c traditional.c
-+ expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
-+ macro.c mkdeps.c pch.c symtab.c traditional.c
-
- all: libcpp.a $(USED_CATALOGS)
-
-@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
-
- TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
- include/line-map.h include/symtab.h include/cpp-id-data.h \
-- include/cpplib.h include/mkdeps.h system.h
-+ include/cpplib.h include/mkdeps.h system.h include/file-map.h
-
- TAGS: $(TAGS_SOURCES)
- cd $(srcdir) && etags $(TAGS_SOURCES)
-diff --git a/libcpp/file-map.c b/libcpp/file-map.c
-new file mode 100644
-index 0000000..18035ef
---- /dev/null
-+++ b/libcpp/file-map.c
-@@ -0,0 +1,92 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "file-map.h"
-+
-+/* Structure recording the mapping from source file and directory
-+ names at compile time to __FILE__ */
-+typedef struct file_prefix_map
-+{
-+ const char *old_prefix;
-+ const char *new_prefix;
-+ size_t old_len;
-+ size_t new_len;
-+ struct file_prefix_map *next;
-+} file_prefix_map;
-+
-+/* Linked list of such structures. */
-+static file_prefix_map *file_prefix_maps;
-+
-+/* Record prefix mapping of __FILE__. ARG is the argument to
-+ -ffile-prefix-map and must be of the form OLD=NEW. */
-+int
-+add_file_prefix_map (const char *arg)
-+{
-+ file_prefix_map *map;
-+ const char *p;
-+
-+ p = strchr (arg, '=');
-+ if (!p)
-+ {
-+ fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
-+ return -1;
-+ }
-+ map = XNEW (file_prefix_map);
-+ map->old_prefix = xstrndup (arg, p - arg);
-+ map->old_len = p - arg;
-+ p++;
-+ map->new_prefix = xstrdup (p);
-+ map->new_len = strlen (p);
-+ map->next = file_prefix_maps;
-+ file_prefix_maps = map;
-+
-+ return 0;
-+}
-+
-+/* Perform user-specified mapping of __FILE__ prefixes. Return
-+ the new name corresponding to filename. */
-+
-+const char *
-+remap_file_filename (const char *filename)
-+{
-+ file_prefix_map *map;
-+ char *s;
-+ const char *name;
-+ size_t name_len;
-+
-+ for (map = file_prefix_maps; map; map = map->next)
-+ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ break;
-+ if (!map)
-+ return filename;
-+ name = filename + map->old_len;
-+ name_len = strlen (name) + 1;
-+ s = (char *) alloca (name_len + map->new_len);
-+ memcpy (s, map->new_prefix, map->new_len);
-+ memcpy (s + map->new_len, name, name_len);
-+
-+ return xstrdup (s);
-+}
-+
-+
-diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
-new file mode 100644
-index 0000000..8750315
---- /dev/null
-+++ b/libcpp/include/file-map.h
-@@ -0,0 +1,30 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#ifndef LIBCPP_FILE_MAP_H
-+#define LIBCPP_FILE_MAP_H
-+
-+const char * remap_file_filename (const char *filename);
-+
-+int add_file_prefix_map (const char *arg);
-+
-+#endif /* !LIBCPP_FILE_MAP_H */
-diff --git a/libcpp/macro.c b/libcpp/macro.c
-index c251553..3ceec3d 100644
---- a/libcpp/macro.c
-+++ b/libcpp/macro.c
-@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see
- #include "system.h"
- #include "cpplib.h"
- #include "internal.h"
-+#include "file-map.h"
-
- typedef struct macro_arg macro_arg;
- /* This structure represents the tokens of a macro argument. These
-@@ -301,6 +302,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node,
- if (!name)
- abort ();
- }
-+ name = remap_file_filename (name);
- len = strlen (name);
- buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
- result = buf;
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/meta/recipes-devtools/gcc/gcc-6.2/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
deleted file mode 100644
index 0077f80e46..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 25c87c6cc40ec5cc6965f8bfb215bec01abd6d82 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 05:39:59 -0400
-Subject: [PATCH 43/46] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
-
-The oe-core may use external toolchain to compile,
-which may not support -ffile-prefix-map.
-
-Since we use -fdebug-prefix-map to do the same thing,
-so we could reuse it to replace -ffile-prefix-map.
-
-Upstream-Status: Inappropriate[oe-core specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/opts-global.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gcc/opts-global.c b/gcc/opts-global.c
-index b7e5232..121d7b9 100644
---- a/gcc/opts-global.c
-+++ b/gcc/opts-global.c
-@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
- #include "langhooks.h"
- #include "dbgcnt.h"
- #include "debug.h"
-+#include "file-map.h"
- #include "output.h"
- #include "plugin.h"
- #include "toplev.h"
-@@ -357,6 +358,9 @@ handle_common_deferred_options (void)
-
- case OPT_fdebug_prefix_map_:
- add_debug_prefix_map (opt->arg);
-+
-+ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
-+ add_file_prefix_map (opt->arg);
- break;
-
- case OPT_fdump_:
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/meta/recipes-devtools/gcc/gcc-6.2/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
deleted file mode 100644
index 5d41af44a4..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6ab23e88aef22bbabee7b9600c459ff39547bb66 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 24 Mar 2016 11:23:14 -0400
-Subject: [PATCH 44/46] gcc/final.c: -fdebug-prefix-map support to remap
- sources with relative path
-
-PR other/70428
-* final.c (remap_debug_filename): Use lrealpath to translate
-relative path before remapping
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/final.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/final.c b/gcc/final.c
-index 55cf509..23293e5 100644
---- a/gcc/final.c
-+++ b/gcc/final.c
-@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
- const char *name;
- size_t name_len;
-
-+ /* Support to remap filename with relative path */
-+ char *realpath = lrealpath (filename);
-+ if (realpath == NULL)
-+ return filename;
-+
- for (map = debug_prefix_maps; map; map = map->next)
-- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
- break;
- if (!map)
-- return filename;
-- name = filename + map->old_len;
-+ {
-+ free (realpath);
-+ return filename;
-+ }
-+ name = realpath + map->old_len;
- name_len = strlen (name) + 1;
- s = (char *) alloca (name_len + map->new_len);
- memcpy (s, map->new_prefix, map->new_len);
- memcpy (s + map->new_len, name, name_len);
-+ free (realpath);
- return ggc_strdup (s);
- }
-
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/meta/recipes-devtools/gcc/gcc-6.2/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
deleted file mode 100644
index c62b727d6e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 5a47d404ea29e2547269e3ddf38754462d93f903 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Apr 2016 20:03:28 +0000
-Subject: [PATCH 45/46] libgcc: Add knob to use ldbl-128 on ppc
-
-musl does not support ldbl 128 so we can not assume
-that linux as a whole supports ldbl-128 bits, instead
-act upon configure option passed to gcc and assume no
-on musl and yes otherwise if no option is passed since
-default behaviour is to assume ldbl128 it does not
-change the defaults
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libgcc/Makefile.in | 1 +
- libgcc/config/rs6000/t-linux | 5 ++++-
- libgcc/configure | 18 ++++++++++++++++++
- libgcc/configure.ac | 12 ++++++++++++
- 4 files changed, 35 insertions(+), 1 deletion(-)
- mode change 100644 => 100755 libgcc/configure
-
-diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
-index f09b39b..296cf0f 100644
---- a/libgcc/Makefile.in
-+++ b/libgcc/Makefile.in
-@@ -43,6 +43,7 @@ enable_vtable_verify = @enable_vtable_verify@
- enable_decimal_float = @enable_decimal_float@
- fixed_point = @fixed_point@
- with_aix_soname = @with_aix_soname@
-+with_ldbl128 = @with_ldbl128@
-
- host_noncanonical = @host_noncanonical@
- real_host_noncanonical = @real_host_noncanonical@
-diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
-index 4f6d4c4..c50dd94 100644
---- a/libgcc/config/rs6000/t-linux
-+++ b/libgcc/config/rs6000/t-linux
-@@ -1,3 +1,6 @@
- SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
-+ifeq ($(with_ldbl128),yes)
-+HOST_LIBGCC2_CFLAGS += -mlong-double-128
-+endif
-+HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
-diff --git a/libgcc/configure b/libgcc/configure
-old mode 100644
-new mode 100755
-index e7d6c75..e9a9019
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -614,6 +614,7 @@ build_vendor
- build_cpu
- build
- with_aix_soname
-+with_ldbl128
- enable_vtable_verify
- enable_shared
- libgcc_topdir
-@@ -663,6 +664,7 @@ with_cross_host
- with_ld
- enable_shared
- enable_vtable_verify
-+with_long_double_128
- with_aix_soname
- enable_version_specific_runtime_libs
- with_slibdir
-@@ -1319,6 +1321,7 @@ Optional Packages:
- --with-target-subdir=SUBDIR Configuring in a subdirectory for target
- --with-cross-host=HOST Configuring with a cross compiler
- --with-ld arrange to use the specified ld (full pathname)
-+ --with-long-double-128 use 128-bit long double by default
- --with-aix-soname=aix|svr4|both
- shared library versioning (aka "SONAME") variant to
- provide on AIX
-@@ -2201,6 +2204,21 @@ fi
-
-
-
-+# Check whether --with-long-double-128 was given.
-+if test "${with_long_double_128+set}" = set; then :
-+ withval=$with_long_double_128; with_ldbl128="$with_long_double_128"
-+else
-+ case "${host}" in
-+ power*-*-musl*)
-+ with_ldbl128="no";;
-+ *) with_ldbl128="yes";;
-+ esac
-+
-+fi
-+
-+
-+
-+
- # Check whether --with-aix-soname was given.
- if test "${with_aix_soname+set}" = set; then :
- withval=$with_aix_soname; case "${host}:${enable_shared}" in
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index 269997f..81dc3ba 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -77,6 +77,18 @@ AC_ARG_ENABLE(vtable-verify,
- [enable_vtable_verify=no])
- AC_SUBST(enable_vtable_verify)
-
-+AC_ARG_WITH(long-double-128,
-+[AS_HELP_STRING([--with-long-double-128],
-+ [use 128-bit long double by default])],
-+ with_ldbl128="$with_long_double_128",
-+[case "${host}" in
-+ power*-*-musl*)
-+ with_ldbl128="no";;
-+ *) with_ldbl128="yes";;
-+ esac
-+])
-+AC_SUBST(with_ldbl128)
-+
- AC_ARG_WITH(aix-soname,
- [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
- [shared library versioning (aka "SONAME") variant to provide on AIX])],
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/meta/recipes-devtools/gcc/gcc-6.2/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
deleted file mode 100644
index 390037f7b1..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 513bf3c33e2f551f08bd57605091d5ddeba3536b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 4 May 2016 21:11:34 -0700
-Subject: [PATCH 46/46] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
-
-Upstream-Status: Pending
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libgcc/config/t-slibgcc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
-index 8c5f890..29be909 100644
---- a/libgcc/config/t-slibgcc
-+++ b/libgcc/config/t-slibgcc
-@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
- $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
-
- SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-- $(SHLIB_LDFLAGS) \
-+ $(LDFLAGS) $(SHLIB_LDFLAGS) \
- -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
- $(SHLIB_OBJS) $(SHLIB_LC) && \
- rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/meta/recipes-devtools/gcc/gcc-6.2/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
deleted file mode 100644
index ed6cd6905c..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 0a9ed0479203cb7e69c3745b0c259007410f39ba Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sat, 24 Oct 2015 20:09:53 +0000
-Subject: [PATCH 47/47] libgcc_s: Use alias for __cpu_indicator_init instead of
- symver
-
-Adapter from
-
-https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
-
-This fix was debated but hasnt been applied gcc upstream since
-they expect musl to support '@' in symbol versioning which is
-a sun/gnu versioning extention. This patch however avoids the
-need for the '@' symbols at all
-
-libgcc/Changelog:
-
-2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
- (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
-
- * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
-
-gcc/Changelog:
-
-2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init
- call __cpu_indicator_init_local instead of __cpu_indicator_init.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Rejected
-
- gcc/config/i386/i386.c | 4 ++--
- libgcc/config/i386/cpuinfo.c | 6 +++---
- libgcc/config/i386/t-linux | 2 +-
- 3 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 861a029..1c97d72 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -40323,10 +40323,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
- {
- case IX86_BUILTIN_CPU_INIT:
- {
-- /* Make it call __cpu_indicator_init in libgcc. */
-+ /* Make it call __cpu_indicator_init_local in libgcc.a. */
- tree call_expr, fndecl, type;
- type = build_function_type_list (integer_type_node, NULL_TREE);
-- fndecl = build_fn_decl ("__cpu_indicator_init", type);
-+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
- call_expr = build_call_expr (fndecl, 0);
- return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
- }
-diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
-index 8c2248d..6c82f15 100644
---- a/libgcc/config/i386/cpuinfo.c
-+++ b/libgcc/config/i386/cpuinfo.c
-@@ -485,7 +485,7 @@ __cpu_indicator_init (void)
- return 0;
- }
-
--#if defined SHARED && defined USE_ELF_SYMVER
--__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
--__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
-+#ifndef SHARED
-+int __cpu_indicator_init_local (void)
-+ __attribute__ ((weak, alias ("__cpu_indicator_init")));
- #endif
-diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
-index 11bb46e..4f47f7b 100644
---- a/libgcc/config/i386/t-linux
-+++ b/libgcc/config/i386/t-linux
-@@ -3,4 +3,4 @@
- # t-slibgcc-elf-ver and t-linux
- SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
-+HOST_LIBGCC2_CFLAGS += -mlong-double-80
---
-2.9.0
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch b/meta/recipes-devtools/gcc/gcc-6.2/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch
deleted file mode 100644
index 9c39c7f7ad..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 84d2a5509892b65ed60d39e6e2f9719e3762e40e Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 31 May 2016 08:29:39 +0000
-Subject: [PATCH] [ARM] PR target/71056: Don't use vectorized builtins when
- NEON is not available
-
- PR target/71056
- * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Return
- NULL_TREE early if NEON is not available. Remove now redundant check
- in ARM_CHECK_BUILTIN_MODE.
-
- * gcc.target/arm/pr71056.c: New test.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@236910 138bc75d-0d04-0410-961f-82ee72b054a4
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gcc/ChangeLog | 7 +++++++
- gcc/config/arm/arm-builtins.c | 6 +++++-
- gcc/testsuite/ChangeLog | 5 +++++
- gcc/testsuite/gcc.target/arm/pr71056.c | 32 ++++++++++++++++++++++++++++++++
- 4 files changed, 49 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.target/arm/pr71056.c
-
-diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
-index 90fb40f..68b2839 100644
---- a/gcc/config/arm/arm-builtins.c
-+++ b/gcc/config/arm/arm-builtins.c
-@@ -2861,6 +2861,10 @@ arm_builtin_vectorized_function (unsigned int fn, tree type_out, tree type_in)
- int in_n, out_n;
- bool out_unsigned_p = TYPE_UNSIGNED (type_out);
-
-+ /* Can't provide any vectorized builtins when we can't use NEON. */
-+ if (!TARGET_NEON)
-+ return NULL_TREE;
-+
- if (TREE_CODE (type_out) != VECTOR_TYPE
- || TREE_CODE (type_in) != VECTOR_TYPE)
- return NULL_TREE;
-@@ -2875,7 +2879,7 @@ arm_builtin_vectorized_function (unsigned int fn, tree type_out, tree type_in)
- NULL_TREE is returned if no such builtin is available. */
- #undef ARM_CHECK_BUILTIN_MODE
- #define ARM_CHECK_BUILTIN_MODE(C) \
-- (TARGET_NEON && TARGET_FPU_ARMV8 \
-+ (TARGET_FPU_ARMV8 \
- && flag_unsafe_math_optimizations \
- && ARM_CHECK_BUILTIN_MODE_1 (C))
-
-diff --git a/gcc/testsuite/gcc.target/arm/pr71056.c b/gcc/testsuite/gcc.target/arm/pr71056.c
-new file mode 100644
-index 0000000..136754e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/arm/pr71056.c
-@@ -0,0 +1,32 @@
-+/* PR target/71056. */
-+/* { dg-do compile } */
-+/* { dg-require-effective-target arm_vfp3_ok } */
-+/* { dg-options "-O3 -mfpu=vfpv3" } */
-+
-+/* Check that compiling for a non-NEON target doesn't try to introduce
-+ a NEON vectorized builtin. */
-+
-+extern char *buff;
-+int f2 ();
-+struct T1
-+{
-+ int reserved[2];
-+ unsigned int ip;
-+ unsigned short cs;
-+ unsigned short rsrv2;
-+};
-+void
-+f3 (const char *p)
-+{
-+ struct T1 x;
-+ __builtin_memcpy (&x, p, sizeof (struct T1));
-+ x.reserved[0] = __builtin_bswap32 (x.reserved[0]);
-+ x.reserved[1] = __builtin_bswap32 (x.reserved[1]);
-+ x.ip = __builtin_bswap32 (x.ip);
-+ x.cs = x.cs << 8 | x.cs >> 8;
-+ x.rsrv2 = x.rsrv2 << 8 | x.rsrv2 >> 8;
-+ if (f2 ())
-+ {
-+ __builtin_memcpy (buff, "\n", 1);
-+ }
-+}
---
-2.9.0
-
diff --git a/meta/recipes-devtools/gcc/gcc-6.2/CVE-2016-4490.patch b/meta/recipes-devtools/gcc/gcc-6.2/CVE-2016-4490.patch
deleted file mode 100644
index f32e91d4fc..0000000000
--- a/meta/recipes-devtools/gcc/gcc-6.2/CVE-2016-4490.patch
+++ /dev/null
@@ -1,290 +0,0 @@
-From 7d235b1b5ea35352c54957ef5530d9a02c46962f Mon Sep 17 00:00:00 2001
-From: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 2 May 2016 17:06:40 +0000
-Subject: [PATCH] =?UTF-8?q?Demangler=20integer=20overflow=20fixes=20from?=
- =?UTF-8?q?=20Marcel=20B=C3=B6hme.?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
- PR c++/70498
- * cp-demangle.c: Parse numbers as integer instead of long to avoid
- overflow after sanity checks. Include <limits.h> if available.
- (INT_MAX): Define if necessary.
- (d_make_template_param): Takes integer argument instead of long.
- (d_make_function_param): Likewise.
- (d_append_num): Likewise.
- (d_identifier): Likewise.
- (d_number): Parse as and return integer.
- (d_compact_number): Handle overflow.
- (d_source_name): Change variable type to integer for parsed number.
- (d_java_resource): Likewise.
- (d_special_name): Likewise.
- (d_discriminator): Likewise.
- (d_unnamed_type): Likewise.
- * testsuite/demangle-expected: Add regression test cases.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235767 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-CVE: CVE-2016-4490
-[Yocto #9632]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- libiberty/ChangeLog | 19 +++++++++++++
- libiberty/cp-demangle.c | 52 ++++++++++++++++++++---------------
- libiberty/testsuite/demangle-expected | 14 ++++++++--
- 3 files changed, 61 insertions(+), 24 deletions(-)
-
-Index: git/libiberty/ChangeLog
-===================================================================
---- git.orig/libiberty/ChangeLog
-+++ git/libiberty/ChangeLog
-@@ -1,3 +1,22 @@
-+2016-05-02 Marcel Böhme <boehme.marcel@gmail.com>
-+
-+ PR c++/70498
-+ * cp-demangle.c: Parse numbers as integer instead of long to avoid
-+ overflow after sanity checks. Include <limits.h> if available.
-+ (INT_MAX): Define if necessary.
-+ (d_make_template_param): Takes integer argument instead of long.
-+ (d_make_function_param): Likewise.
-+ (d_append_num): Likewise.
-+ (d_identifier): Likewise.
-+ (d_number): Parse as and return integer.
-+ (d_compact_number): Handle overflow.
-+ (d_source_name): Change variable type to integer for parsed number.
-+ (d_java_resource): Likewise.
-+ (d_special_name): Likewise.
-+ (d_discriminator): Likewise.
-+ (d_unnamed_type): Likewise.
-+ * testsuite/demangle-expected: Add regression test cases.
-+
- 2016-04-27 Release Manager
-
- * GCC 6.1.0 released.
-Index: git/libiberty/cp-demangle.c
-===================================================================
---- git.orig/libiberty/cp-demangle.c
-+++ git/libiberty/cp-demangle.c
-@@ -128,6 +128,13 @@ extern char *alloca ();
- # endif /* alloca */
- #endif /* HAVE_ALLOCA_H */
-
-+#ifdef HAVE_LIMITS_H
-+#include <limits.h>
-+#endif
-+#ifndef INT_MAX
-+# define INT_MAX (int)(((unsigned int) ~0) >> 1) /* 0x7FFFFFFF */
-+#endif
-+
- #include "ansidecl.h"
- #include "libiberty.h"
- #include "demangle.h"
-@@ -398,7 +405,7 @@ d_make_dtor (struct d_info *, enum gnu_v
- struct demangle_component *);
-
- static struct demangle_component *
--d_make_template_param (struct d_info *, long);
-+d_make_template_param (struct d_info *, int);
-
- static struct demangle_component *
- d_make_sub (struct d_info *, const char *, int);
-@@ -421,9 +428,9 @@ static struct demangle_component *d_unqu
-
- static struct demangle_component *d_source_name (struct d_info *);
-
--static long d_number (struct d_info *);
-+static int d_number (struct d_info *);
-
--static struct demangle_component *d_identifier (struct d_info *, long);
-+static struct demangle_component *d_identifier (struct d_info *, int);
-
- static struct demangle_component *d_operator_name (struct d_info *);
-
-@@ -1119,7 +1126,7 @@ d_make_dtor (struct d_info *di, enum gnu
- /* Add a new template parameter. */
-
- static struct demangle_component *
--d_make_template_param (struct d_info *di, long i)
-+d_make_template_param (struct d_info *di, int i)
- {
- struct demangle_component *p;
-
-@@ -1135,7 +1142,7 @@ d_make_template_param (struct d_info *di
- /* Add a new function parameter. */
-
- static struct demangle_component *
--d_make_function_param (struct d_info *di, long i)
-+d_make_function_param (struct d_info *di, int i)
- {
- struct demangle_component *p;
-
-@@ -1620,7 +1627,7 @@ d_unqualified_name (struct d_info *di)
- static struct demangle_component *
- d_source_name (struct d_info *di)
- {
-- long len;
-+ int len;
- struct demangle_component *ret;
-
- len = d_number (di);
-@@ -1633,12 +1640,12 @@ d_source_name (struct d_info *di)
-
- /* number ::= [n] <(non-negative decimal integer)> */
-
--static long
-+static int
- d_number (struct d_info *di)
- {
- int negative;
- char peek;
-- long ret;
-+ int ret;
-
- negative = 0;
- peek = d_peek_char (di);
-@@ -1681,7 +1688,7 @@ d_number_component (struct d_info *di)
- /* identifier ::= <(unqualified source code identifier)> */
-
- static struct demangle_component *
--d_identifier (struct d_info *di, long len)
-+d_identifier (struct d_info *di, int len)
- {
- const char *name;
-
-@@ -1702,7 +1709,7 @@ d_identifier (struct d_info *di, long le
- /* Look for something which looks like a gcc encoding of an
- anonymous namespace, and replace it with a more user friendly
- name. */
-- if (len >= (long) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
-+ if (len >= (int) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
- && memcmp (name, ANONYMOUS_NAMESPACE_PREFIX,
- ANONYMOUS_NAMESPACE_PREFIX_LEN) == 0)
- {
-@@ -1870,7 +1877,7 @@ d_java_resource (struct d_info *di)
- {
- struct demangle_component *p = NULL;
- struct demangle_component *next = NULL;
-- long len, i;
-+ int len, i;
- char c;
- const char *str;
-
-@@ -2012,7 +2019,7 @@ d_special_name (struct d_info *di)
- case 'C':
- {
- struct demangle_component *derived_type;
-- long offset;
-+ int offset;
- struct demangle_component *base_type;
-
- derived_type = cplus_demangle_type (di);
-@@ -2946,10 +2953,10 @@ d_pointer_to_member_type (struct d_info
-
- /* <non-negative number> _ */
-
--static long
-+static int
- d_compact_number (struct d_info *di)
- {
-- long num;
-+ int num;
- if (d_peek_char (di) == '_')
- num = 0;
- else if (d_peek_char (di) == 'n')
-@@ -2957,7 +2964,7 @@ d_compact_number (struct d_info *di)
- else
- num = d_number (di) + 1;
-
-- if (! d_check_char (di, '_'))
-+ if (num < 0 || ! d_check_char (di, '_'))
- return -1;
- return num;
- }
-@@ -2969,7 +2976,7 @@ d_compact_number (struct d_info *di)
- static struct demangle_component *
- d_template_param (struct d_info *di)
- {
-- long param;
-+ int param;
-
- if (! d_check_char (di, 'T'))
- return NULL;
-@@ -3171,9 +3178,10 @@ d_expression_1 (struct d_info *di)
- }
- else
- {
-- index = d_compact_number (di) + 1;
-- if (index == 0)
-+ index = d_compact_number (di);
-+ if (index == INT_MAX || index == -1)
- return NULL;
-+ index ++;
- }
- return d_make_function_param (di, index);
- }
-@@ -3502,7 +3510,7 @@ d_local_name (struct d_info *di)
- static int
- d_discriminator (struct d_info *di)
- {
-- long discrim;
-+ int discrim;
-
- if (d_peek_char (di) != '_')
- return 1;
-@@ -3558,7 +3566,7 @@ static struct demangle_component *
- d_unnamed_type (struct d_info *di)
- {
- struct demangle_component *ret;
-- long num;
-+ int num;
-
- if (! d_check_char (di, 'U'))
- return NULL;
-@@ -4086,10 +4094,10 @@ d_append_string (struct d_print_info *dp
- }
-
- static inline void
--d_append_num (struct d_print_info *dpi, long l)
-+d_append_num (struct d_print_info *dpi, int l)
- {
- char buf[25];
-- sprintf (buf,"%ld", l);
-+ sprintf (buf,"%d", l);
- d_append_string (dpi, buf);
- }
-
-Index: git/libiberty/testsuite/demangle-expected
-===================================================================
---- git.orig/libiberty/testsuite/demangle-expected
-+++ git/libiberty/testsuite/demangle-expected
-@@ -4422,12 +4422,22 @@ void baz<int>(A<sizeof (foo((int)(), (fl
- _Z3fooI1FEN1XIXszdtcl1PclcvT__EEE5arrayEE4TypeEv
- X<sizeof ((P(((F)())())).array)>::Type foo<F>()
- #
--# Tests a use-after-free problem
-+# Tests a use-after-free problem PR70481
-
- _Q.__0
- ::Q.(void)
- #
--# Tests a use-after-free problem
-+# Tests a use-after-free problem PR70481
-
- _Q10-__9cafebabe.
- cafebabe.::-(void)
-+#
-+# Tests integer overflow problem PR70492
-+
-+__vt_90000000000cafebabe
-+__vt_90000000000cafebabe
-+#
-+# Tests write access violation PR70498
-+
-+_Z80800000000000000000000
-+_Z80800000000000000000000
diff --git a/meta/recipes-devtools/gcc/gcc-9.2.inc b/meta/recipes-devtools/gcc/gcc-9.2.inc
new file mode 100644
index 0000000000..c6395998d5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2.inc
@@ -0,0 +1,122 @@
+require gcc-common.inc
+
+# Third digit in PV should be incremented after a minor release
+
+PV = "9.2.0"
+
+# BINV should be incremented to a revision after a minor gcc release
+
+BINV = "9.2.0"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-9.2:${FILE_DIRNAME}/gcc-9.2/backport:"
+
+DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
+
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
+"
+
+BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
+#RELEASE ?= "5a5ca2d"
+#BASEURI ?= "https://repo.or.cz/official-gcc.git/snapshot/${RELEASE}.tar.gz;downloadfilename=gcc-${RELEASE}.tar.gz"
+SRC_URI = "\
+ ${BASEURI} \
+ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+ file://0002-gcc-poison-system-directories.patch \
+ file://0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0004-64-bit-multilib-hack.patch \
+ file://0005-optional-libstdc.patch \
+ file://0006-COLLECT_GCC_OPTIONS.patch \
+ file://0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0008-fortran-cross-compile-hack.patch \
+ file://0009-cpp-honor-sysroot.patch \
+ file://0010-MIPS64-Default-to-N64-ABI.patch \
+ file://0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0012-gcc-Fix-argument-list-too-long-error.patch \
+ file://0013-Disable-sdt.patch \
+ file://0014-libtool.patch \
+ file://0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
+ file://0018-export-CPP.patch \
+ file://0019-Ensure-target-gcc-headers-can-be-included.patch \
+ file://0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
+ file://0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
+ file://0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
+ file://0023-aarch64-Add-support-for-musl-ldso.patch \
+ file://0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
+ file://0025-handle-sysroot-support-for-nativesdk-gcc.patch \
+ file://0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
+ file://0027-Fix-various-_FOR_BUILD-and-related-variables.patch \
+ file://0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
+ file://0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
+ file://0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
+ file://0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
+ file://0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
+ file://0033-sync-gcc-stddef.h-with-musl.patch \
+ file://0034-fix-segmentation-fault-in-precompiled-header-generat.patch \
+ file://0035-Fix-for-testsuite-failure.patch \
+ file://0036-Re-introduce-spe-commandline-options.patch \
+ file://CVE-2019-14250.patch \
+ file://CVE-2019-15847_1.patch \
+ file://CVE-2019-15847_2.patch \
+ file://CVE-2019-15847_3.patch \
+"
+S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+SRC_URI[md5sum] = "3818ad8600447f05349098232c2ddc78"
+SRC_URI[sha256sum] = "ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206"
+
+# For dev release snapshotting
+#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/official-gcc-${RELEASE}"
+#B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+LTO = "--enable-lto"
+SSP ?= "--disable-libssp"
+SSP_mingw32 = "--enable-libssp"
+
+EXTRA_OECONF_BASE = "\
+ ${LTO} \
+ ${SSP} \
+ --enable-libitm \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --with-system-zlib \
+ ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \
+ --enable-linker-build-id \
+ --with-ppl=no \
+ --with-cloog=no \
+ --enable-checking=release \
+ --enable-cheaders=c_global \
+ --without-isl \
+"
+
+EXTRA_OECONF_INITIAL = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libitm \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --enable-linker-build-id \
+ --enable-decimal-float=no \
+ --without-isl \
+ --disable-libssp \
+"
+
+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-9.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-9.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000000..9065c304b5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -0,0 +1,42 @@
+From 863325ec3c6eb4987be63509ac407b2d13617342 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:37:11 +0400
+Subject: [PATCH 01/36] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index abd93a990a9..b121088d778 100755
+--- a/configure
++++ b/configure
+@@ -7603,7 +7603,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+diff --git a/configure.ac b/configure.ac
+index 9db4fd14aa2..aad93c4d183 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3119,7 +3119,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0002-gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc-9.2/0002-gcc-poison-system-directories.patch
new file mode 100644
index 0000000000..a1116e7509
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0002-gcc-poison-system-directories.patch
@@ -0,0 +1,203 @@
+From 68e78bc15de215fa15c7d8b56bd2e2b0539b34fa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:59:00 +0400
+Subject: [PATCH 02/36] gcc: poison-system-directories
+
+Add /sw/include and /opt/include based on the original
+zecke-no-host-includes.patch patch. The original patch checked for
+/usr/include, /sw/include and /opt/include and then triggered a failure and
+aborted.
+
+Instead, we add the two missing items to the current scan. If the user
+wants this to be a failure, they can add "-Werror=poison-system-directories".
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/common.opt | 4 ++++
+ gcc/config.in | 6 ++++++
+ gcc/configure | 16 ++++++++++++++++
+ gcc/configure.ac | 10 ++++++++++
+ gcc/doc/invoke.texi | 9 +++++++++
+ gcc/gcc.c | 2 ++
+ gcc/incpath.c | 21 +++++++++++++++++++++
+ 7 files changed, 68 insertions(+)
+
+diff --git a/gcc/common.opt b/gcc/common.opt
+index d342c4f3749..c64fd4a6c50 100644
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -684,6 +684,10 @@ Wreturn-local-addr
+ Common Var(warn_return_local_addr) Init(1) Warning
+ Warn about returning a pointer/reference to a local or temporary variable.
+
++Wpoison-system-directories
++Common Var(flag_poison_system_directories) Init(1) Warning
++Warn for -I and -L options using system directories if cross compiling
++
+ Wshadow
+ Common Var(warn_shadow) Warning
+ Warn when one variable shadows another. Same as -Wshadow=global.
+diff --git a/gcc/config.in b/gcc/config.in
+index a718ceaf3da..5713342efb1 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -200,6 +200,12 @@
+ #endif
+
+
++/* Define to warn for use of native system header directories */
++#ifndef USED_FOR_TARGET
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++#endif
++
++
+ /* Define if you want all operations on RTL (the basic data structure of the
+ optimizer and back end) to be checked for dynamic type safety at runtime.
+ This is quite expensive. */
+diff --git a/gcc/configure b/gcc/configure
+index 481071b4265..a6ea3a8a84c 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -995,6 +995,7 @@ with_system_zlib
+ enable_maintainer_mode
+ enable_link_mutex
+ enable_version_specific_runtime_libs
++enable_poison_system_directories
+ enable_plugin
+ enable_host_shared
+ enable_libquadmath_support
+@@ -1748,6 +1749,8 @@ Optional Features:
+ --enable-version-specific-runtime-libs
+ specify that runtime libraries should be installed
+ in a compiler-specific directory
++ --enable-poison-system-directories
++ warn for use of native system header directories
+ --enable-plugin enable plugin support
+ --enable-host-shared build host code as shared libraries
+ --disable-libquadmath-support
+@@ -29750,6 +29753,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+ fi
+
+
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++ enableval=$enable_poison_system_directories;
++else
++ enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
++
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
++
+ # Substitute configuration variables
+
+
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index ce2825580c6..d42bbd4fd1c 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -6378,6 +6378,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+ [specify that runtime libraries should be
+ installed in a compiler-specific directory])])
+
++AC_ARG_ENABLE([poison-system-directories],
++ AS_HELP_STRING([--enable-poison-system-directories],
++ [warn for use of native system header directories]),,
++ [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++ [1],
++ [Define to warn for use of native system header directories])
++fi
++
+ # Substitute configuration variables
+ AC_SUBST(subdirs)
+ AC_SUBST(srcdir)
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 6ef36ce02aa..09414d8cc05 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -332,6 +332,7 @@ Objective-C and Objective-C++ Dialects}.
+ -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
+ -Wparentheses -Wno-pedantic-ms-format @gol
+ -Wplacement-new -Wplacement-new=@var{n} @gol
++-Wno-poison-system-directories @gol
+ -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol
+ -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
+ -Wrestrict -Wno-return-local-addr @gol
+@@ -6289,6 +6290,14 @@ made up of data only and thus requires no special treatment. But, for
+ most targets, it is made up of code and thus requires the stack to be
+ made executable in order for the program to work properly.
+
++@item -Wno-poison-system-directories
++@opindex Wno-poison-system-directories
++Do not warn for @option{-I} or @option{-L} options using system
++directories such as @file{/usr/include} when cross compiling. This
++option is intended for use in chroot environments when such
++directories contain the correct headers and libraries for the target
++system rather than the host.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 4f57765b012..a2601a6bb06 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1042,6 +1042,8 @@ proper position among the other output files. */
+ "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+ "%X %{o*} %{e*} %{N} %{n} %{r}\
+ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
++ %{Wno-poison-system-directories:--no-poison-system-directories} \
++ %{Werror=poison-system-directories:--error-poison-system-directories} \
+ %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
+ VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
+ %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index bcbe2082905..5752298bbf2 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -26,6 +26,7 @@
+ #include "intl.h"
+ #include "incpath.h"
+ #include "cppdefault.h"
++#include "diagnostic-core.h"
+
+ /* Microsoft Windows does not natively support inodes.
+ VMS has non-numeric inodes. */
+@@ -393,6 +394,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+ }
+ fprintf (stderr, _("End of search list.\n"));
+ }
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++ if (flag_poison_system_directories)
++ {
++ struct cpp_dir *p;
++
++ for (p = heads[INC_QUOTE]; p; p = p->next)
++ {
++ if ((!strncmp (p->name, "/usr/include", 12))
++ || (!strncmp (p->name, "/usr/local/include", 18))
++ || (!strncmp (p->name, "/usr/X11R6/include", 18))
++ || (!strncmp (p->name, "/sw/include", 11))
++ || (!strncmp (p->name, "/opt/include", 12)))
++ warning (OPT_Wpoison_system_directories,
++ "include location \"%s\" is unsafe for "
++ "cross-compilation",
++ p->name);
++ }
++ }
++#endif
+ }
+
+ /* Use given -I paths for #include "..." but not #include <...>, and
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-9.2/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000000..23039d2123
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -0,0 +1,73 @@
+From f8d60c4114acb92361c7b2f4a4561d4661e8da9d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:08:31 +0400
+Subject: [PATCH 03/36] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
+
+Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
+
+This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
+
+Other changes I had to do include:
+
+- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
+
+- passing the right CFLAGS to configure scripts as exported environment variables
+
+I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
+
+Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
+
+Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ configure | 32 ++++++++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+diff --git a/configure b/configure
+index b121088d778..93aae5bb26f 100755
+--- a/configure
++++ b/configure
+@@ -6864,6 +6864,38 @@ fi
+
+
+
++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
++# We want to ensure that TARGET libraries (which we know are built with
++# gcc) are built with "-O2 -g", so include those options when setting
++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
++if test "x$CFLAGS_FOR_TARGET" = x; then
++ CFLAGS_FOR_TARGET=$CFLAGS
++ case " $CFLAGS " in
++ *" -O2 "*) ;;
++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
++ esac
++ case " $CFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
++ esac
++fi
++
++
++if test "x$CXXFLAGS_FOR_TARGET" = x; then
++ CXXFLAGS_FOR_TARGET=$CXXFLAGS
++ case " $CXXFLAGS " in
++ *" -O2 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
++ esac
++ case " $CXXFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
++ esac
++fi
++
++
+ # Handle --with-headers=XXX. If the value is not "yes", the contents of
+ # the named directory are copied to $(tooldir)/sys-include.
+ if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0004-64-bit-multilib-hack.patch b/meta/recipes-devtools/gcc/gcc-9.2/0004-64-bit-multilib-hack.patch
new file mode 100644
index 0000000000..a79c40c1aa
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0004-64-bit-multilib-hack.patch
@@ -0,0 +1,119 @@
+From c2081c51db589471ea713870c72f13999abda815 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:10:06 +0400
+Subject: [PATCH 04/36] 64-bit multilib hack.
+
+GCC has internal multilib handling code but it assumes a very specific rigid directory
+layout. The build system implementation of multilib layout is very generic and allows
+complete customisation of the library directories.
+
+This patch is a partial solution to allow any custom directories to be passed into gcc
+and handled correctly. It forces gcc to use the base_libdir (which is the current
+directory, "."). We need to do this for each multilib that is configured as we don't
+know which compiler options may be being passed into the compiler. Since we have a compiler
+per mulitlib at this point that isn't an issue.
+
+The one problem is the target compiler is only going to work for the default multlilib at
+this point. Ideally we'd figure out which multilibs were being enabled with which paths
+and be able to patch these entries with a complete set of correct paths but this we
+don't have such code at this point. This is something the target gcc recipe should do
+and override these platform defaults in its build config.
+
+Do same for riscv64 and aarch64
+
+RP 15/8/11
+
+Upstream-Status: Inappropriate[OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ gcc/config/aarch64/t-aarch64-linux | 8 ++++----
+ gcc/config/i386/t-linux64 | 6 ++----
+ gcc/config/mips/t-linux64 | 10 +++-------
+ gcc/config/riscv/t-linux | 6 ++++--
+ gcc/config/rs6000/t-linux64 | 5 ++---
+ 5 files changed, 15 insertions(+), 20 deletions(-)
+
+diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
+index 5ad670ba2ce..e26019e7157 100644
+--- a/gcc/config/aarch64/t-aarch64-linux
++++ b/gcc/config/aarch64/t-aarch64-linux
+@@ -21,8 +21,8 @@
+ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = mabi.lp64=../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 = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+
+-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
++#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
+index c686ab2f0d2..c82b60dadcd 100644
+--- a/gcc/config/i386/t-linux64
++++ b/gcc/config/i386/t-linux64
+@@ -32,7 +32,5 @@
+ #
+ comma=,
+ MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+-MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
+-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
++MULTILIB_DIRNAMES = . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
+index 3a2ff700d7d..13ef19576b5 100644
+--- a/gcc/config/mips/t-linux64
++++ b/gcc/config/mips/t-linux64
+@@ -17,10 +17,6 @@
+ # <http://www.gnu.org/licenses/>.
+
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+-MULTILIB_DIRNAMES = n32 32 64
+-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+-MULTILIB_OSDIRNAMES = \
+- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++MULTILIB_DIRNAMES = . . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
++
+diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux
+index 216d2776a18..e4d817621fc 100644
+--- a/gcc/config/riscv/t-linux
++++ b/gcc/config/riscv/t-linux
+@@ -1,3 +1,5 @@
+ # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
+-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
+-MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
++#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
++MULTILIB_DIRNAMES := . .
++#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
+index f3c6e2be1d9..bd0393155fa 100644
+--- a/gcc/config/rs6000/t-linux64
++++ b/gcc/config/rs6000/t-linux64
+@@ -26,10 +26,9 @@
+ # MULTILIB_OSDIRNAMES according to what is found on the target.
+
+ MULTILIB_OPTIONS := m64/m32
+-MULTILIB_DIRNAMES := 64 32
++MULTILIB_DIRNAMES := . .
+ MULTILIB_EXTRA_OPTS :=
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+
+ rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+ $(COMPILE) $<
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0005-optional-libstdc.patch b/meta/recipes-devtools/gcc/gcc-9.2/0005-optional-libstdc.patch
new file mode 100644
index 0000000000..f4fac91467
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0005-optional-libstdc.patch
@@ -0,0 +1,125 @@
+From e7e504f4a90cfa395e7f8ee779f8c3ed687802ca Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:12:56 +0400
+Subject: [PATCH 05/36] optional libstdc
+
+gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
+will not run correctly since by default the linker will try to link against libstdc++
+which shouldn't exist yet. We need an option to disable -lstdc++
+option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
+driver. This patch adds such an option which only disables the -lstdc++.
+
+A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
+do this officially, the likely answer is don't build libstdc++ separately.
+
+RP 29/6/10
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ gcc/c-family/c.opt | 4 ++++
+ gcc/cp/g++spec.c | 1 +
+ gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++-
+ gcc/gcc.c | 1 +
+ 4 files changed, 37 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index 916cc67b453..41619fa591c 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1952,6 +1952,10 @@ nostdinc++
+ C++ ObjC++
+ Do not search standard system include directories for C++.
+
++nostdlib++
++Driver
++Do not link standard C++ runtime library
++
+ o
+ C ObjC C++ ObjC++ Joined Separate
+ ; Documented in common.opt
+diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
+index 6c4574a837d..0e2657f00ee 100644
+--- a/gcc/cp/g++spec.c
++++ b/gcc/cp/g++spec.c
+@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
+ switch (decoded_options[i].opt_index)
+ {
+ case OPT_nostdlib:
++ case OPT_nostdlib__:
+ case OPT_nodefaultlibs:
+ library = -1;
+ break;
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 09414d8cc05..a43969bc9f0 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -228,6 +228,9 @@ in the following sections.
+ -fno-weak -nostdinc++ @gol
+ -fvisibility-inlines-hidden @gol
+ -fvisibility-ms-compat @gol
++-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
++-fvtv-counts -fvtv-debug @gol
++-nostdlib++ @gol
+ -fext-numeric-literals @gol
+ -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
+ -Wdelete-non-virtual-dtor -Wdeprecated-copy -Wdeprecated-copy-dtor @gol
+@@ -538,7 +541,7 @@ Objective-C and Objective-C++ Dialects}.
+ -pie -pthread -r -rdynamic @gol
+ -s -static -static-pie -static-libgcc -static-libstdc++ @gol
+ -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
+--shared -shared-libgcc -symbolic @gol
++-shared -shared-libgcc -symbolic -nostdlib++ @gol
+ -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
+ -u @var{symbol} -z @var{keyword}}
+
+@@ -13312,6 +13315,33 @@ Specify that the program entry point is @var{entry}. The argument is
+ interpreted by the linker; the GNU linker accepts either a symbol name
+ or an address.
+
++@item -nostdlib++
++@opindex nostdlib++
++Do not use the standard system C++ runtime libraries when linking.
++Only the libraries you specify will be passed to the linker.
++
++@cindex @option{-lgcc}, use with @option{-nostdlib}
++@cindex @option{-nostdlib} and unresolved references
++@cindex unresolved references and @option{-nostdlib}
++@cindex @option{-lgcc}, use with @option{-nodefaultlibs}
++@cindex @option{-nodefaultlibs} and unresolved references
++@cindex unresolved references and @option{-nodefaultlibs}
++One of the standard libraries bypassed by @option{-nostdlib} and
++@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
++which GCC uses to overcome shortcomings of particular machines, or special
++needs for some languages.
++(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
++Collection (GCC) Internals},
++for more discussion of @file{libgcc.a}.)
++In most cases, you need @file{libgcc.a} even when you want to avoid
++other standard libraries. In other words, when you specify @option{-nostdlib}
++or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
++This ensures that you have no unresolved references to internal GCC
++library subroutines.
++(An example of such an internal subroutine is @code{__main}, used to ensure C++
++constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
++GNU Compiler Collection (GCC) Internals}.)
++
+ @item -pie
+ @opindex pie
+ Produce a dynamically linked position independent executable on targets
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index a2601a6bb06..cd6c6fc95db 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1052,6 +1052,7 @@ proper position among the other output files. */
+ %(mflib) " STACK_SPLIT_SPEC "\
+ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
+ %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}}\
++ %{!nostdlib++:}\
+ %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} \n%(post_link) }}}}}}"
+ #endif
+
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0006-COLLECT_GCC_OPTIONS.patch b/meta/recipes-devtools/gcc/gcc-9.2/0006-COLLECT_GCC_OPTIONS.patch
new file mode 100644
index 0000000000..9f7e603f8c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0006-COLLECT_GCC_OPTIONS.patch
@@ -0,0 +1,38 @@
+From b9260cd3ac26b0302824ed466a548464c864d95f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:16:28 +0400
+Subject: [PATCH 06/36] COLLECT_GCC_OPTIONS
+
+This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
+invoke collect2.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/gcc.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index cd6c6fc95db..7da9c5d457b 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -4804,6 +4804,15 @@ set_collect_gcc_options (void)
+ sizeof ("COLLECT_GCC_OPTIONS=") - 1);
+
+ first_time = TRUE;
++#ifdef HAVE_LD_SYSROOT
++ if (target_system_root_changed && target_system_root)
++ {
++ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
++ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
++ obstack_grow (&collect_obstack, "'", 1);
++ first_time = FALSE;
++ }
++#endif
+ for (i = 0; (int) i < n_switches; i++)
+ {
+ const char *const *args;
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/gcc-9.2/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
new file mode 100644
index 0000000000..28f8fc2674
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -0,0 +1,96 @@
+From 88e728dad53d48c4a19f15e19f66fd23f4820b4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:17:25 +0400
+Subject: [PATCH 07/36] Use the defaults.h in ${B} instead of ${S}, and t-oe in
+ ${B}
+
+Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
+the source can be shared between gcc-cross-initial,
+gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+While compiling gcc-crosssdk-initial-x86_64 on some host, there is
+occasionally failure that test the existance of default.h doesn't
+work, the reason is tm_include_list='** defaults.h' rather than
+tm_include_list='** ./defaults.h'
+
+So we add the test condition for this situation.
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/Makefile.in | 2 +-
+ gcc/configure | 4 ++--
+ gcc/configure.ac | 4 ++--
+ gcc/mkconfig.sh | 4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 5f43d9de00e..41f0f592ff4 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -540,7 +540,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
+
+ xmake_file=@xmake_file@
+-tmake_file=@tmake_file@
++tmake_file=@tmake_file@ ./t-oe
+ TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
+ TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
+ TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
+diff --git a/gcc/configure b/gcc/configure
+index a6ea3a8a84c..e3bcf8abe9a 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12341,8 +12341,8 @@ for f in $tm_file; do
+ tm_include_list="${tm_include_list} $f"
+ ;;
+ defaults.h )
+- tm_file_list="${tm_file_list} \$(srcdir)/$f"
+- tm_include_list="${tm_include_list} $f"
++ tm_file_list="${tm_file_list} ./$f"
++ tm_include_list="${tm_include_list} ./$f"
+ ;;
+ * )
+ tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index d42bbd4fd1c..2ebc377a74d 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1968,8 +1968,8 @@ for f in $tm_file; do
+ tm_include_list="${tm_include_list} $f"
+ ;;
+ defaults.h )
+- tm_file_list="${tm_file_list} \$(srcdir)/$f"
+- tm_include_list="${tm_include_list} $f"
++ tm_file_list="${tm_file_list} ./$f"
++ tm_include_list="${tm_include_list} ./$f"
+ ;;
+ * )
+ tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
+diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
+index 308b87d0cc1..19068cbc24a 100644
+--- a/gcc/mkconfig.sh
++++ b/gcc/mkconfig.sh
+@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
+ if [ $# -ge 1 ]; then
+ echo '#ifdef IN_GCC' >> ${output}T
+ for file in "$@"; do
+- if test x"$file" = x"defaults.h"; then
++ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
+ postpone_defaults_h="yes"
+ else
+ echo "# include \"$file\"" >> ${output}T
+@@ -106,7 +106,7 @@ esac
+
+ # If we postponed including defaults.h, add the #include now.
+ if test x"$postpone_defaults_h" = x"yes"; then
+- echo "# include \"defaults.h\"" >> ${output}T
++ echo "# include \"./defaults.h\"" >> ${output}T
+ fi
+
+ # Add multiple inclusion protection guard, part two.
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0008-fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-9.2/0008-fortran-cross-compile-hack.patch
new file mode 100644
index 0000000000..24e3abe0bb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0008-fortran-cross-compile-hack.patch
@@ -0,0 +1,46 @@
+From 010f09f2963ede24e85134e5fab2fa627a9afa05 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:20:01 +0400
+Subject: [PATCH 08/36] fortran cross-compile hack.
+
+* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
+used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
+directory.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ libgfortran/configure | 2 +-
+ libgfortran/configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgfortran/configure b/libgfortran/configure
+index 60867b93d0e..3fc9fca5b7b 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -13071,7 +13071,7 @@ esac
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ ac_ext=${ac_fc_srcext-f}
+ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
+index 7cfce28ab69..6cd515ee1a4 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -250,7 +250,7 @@ AC_SUBST(enable_static)
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+
+ # extra LD Flags which are required for targets
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0009-cpp-honor-sysroot.patch b/meta/recipes-devtools/gcc/gcc-9.2/0009-cpp-honor-sysroot.patch
new file mode 100644
index 0000000000..6af0a0124a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0009-cpp-honor-sysroot.patch
@@ -0,0 +1,54 @@
+From 45e9cd39d9c62454d46b9e9473a0c1034ceca15d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:22:00 +0400
+Subject: [PATCH 09/36] cpp: honor sysroot.
+
+Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
+preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
+rather than the --sysroot option specified on the commandline. If access to that directory is
+permission denied (unreadable), gcc will error.
+
+This happens when ccache is in use due to the fact it uses preprocessed source files.
+
+The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
+-isystem, -isysroot happen and the correct sysroot is used.
+
+[YOCTO #2074]
+
+RP 2012/04/13
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/cp/lang-specs.h | 2 +-
+ gcc/gcc.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
+index c6e42eda283..e1ddf066467 100644
+--- a/gcc/cp/lang-specs.h
++++ b/gcc/cp/lang-specs.h
+@@ -66,5 +66,5 @@ along with GCC; see the file COPYING3. If not see
+ {".ii", "@c++-cpp-output", 0, 0, 0},
+ {"@c++-cpp-output",
+ "%{!E:%{!M:%{!MM:"
+- " cc1plus -fpreprocessed %i %(cc1_options) %2"
++ " cc1plus -fpreprocessed %i %I %(cc1_options) %2"
+ " %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 7da9c5d457b..4e7c45b268c 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1349,7 +1349,7 @@ static const struct compiler default_compilers[] =
+ %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
+ {".i", "@cpp-output", 0, 0, 0},
+ {"@cpp-output",
+- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {".s", "@assembler", 0, 0, 0},
+ {"@assembler",
+ "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0010-MIPS64-Default-to-N64-ABI.patch b/meta/recipes-devtools/gcc/gcc-9.2/0010-MIPS64-Default-to-N64-ABI.patch
new file mode 100644
index 0000000000..bc0c6d5bed
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0010-MIPS64-Default-to-N64-ABI.patch
@@ -0,0 +1,57 @@
+From 1ff4108d707b34e399e9dc418ad1ecc42f72676d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:23:08 +0400
+Subject: [PATCH 10/36] MIPS64: Default to N64 ABI
+
+MIPS64 defaults to n32 ABI, this patch makes it
+so that it defaults to N64 ABI
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [OE config specific]
+---
+ gcc/config.gcc | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index ddd3b8f4d9d..fdfc0bd3e82 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2282,29 +2282,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
+ default_mips_arch=mips32
+ ;;
+ mips64el-st-linux-gnu)
+- default_mips_abi=n32
++ default_mips_abi=64
+ tm_file="${tm_file} mips/st.h"
+ tmake_file="${tmake_file} mips/t-st"
+ enable_mips_multilibs="yes"
+ ;;
+ mips64octeon*-*-linux*)
+- default_mips_abi=n32
++ default_mips_abi=64
+ tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
+ target_cpu_default=MASK_SOFT_FLOAT_ABI
+ enable_mips_multilibs="yes"
+ ;;
+ mipsisa64r6*-*-linux*)
+- default_mips_abi=n32
++ default_mips_abi=64
+ default_mips_arch=mips64r6
+ enable_mips_multilibs="yes"
+ ;;
+ mipsisa64r2*-*-linux*)
+- default_mips_abi=n32
++ default_mips_abi=64
+ default_mips_arch=mips64r2
+ enable_mips_multilibs="yes"
+ ;;
+ mips64*-*-linux* | mipsisa64*-*-linux*)
+- default_mips_abi=n32
++ default_mips_abi=64
+ enable_mips_multilibs="yes"
+ ;;
+ esac
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
new file mode 100644
index 0000000000..66fb24d4cd
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -0,0 +1,243 @@
+From 72fc3975bcd720b2f8040fa87cd23d3db4c5975a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:24:50 +0400
+Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+ relative to SYSTEMLIBS_DIR
+
+This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+relative to SYSTEMLIBS_DIR which can be set in generated headers
+This breaks the assumption of hardcoded multilib in gcc
+Change is only for the supported architectures in OE including
+SH, sparc, alpha for possible future support (if any)
+
+Removes the do_headerfix task in metadata
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [OE configuration]
+---
+ gcc/config/alpha/linux-elf.h | 4 ++--
+ gcc/config/arm/linux-eabi.h | 4 ++--
+ gcc/config/arm/linux-elf.h | 2 +-
+ gcc/config/i386/linux.h | 2 +-
+ gcc/config/i386/linux64.h | 6 +++---
+ gcc/config/linux.h | 8 ++++----
+ gcc/config/mips/linux.h | 12 ++++++------
+ gcc/config/riscv/linux.h | 2 +-
+ gcc/config/rs6000/linux64.h | 15 +++++----------
+ gcc/config/sh/linux.h | 2 +-
+ gcc/config/sparc/linux.h | 2 +-
+ gcc/config/sparc/linux64.h | 4 ++--
+ 12 files changed, 29 insertions(+), 34 deletions(-)
+
+diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
+index 824861befec..6afacce3292 100644
+--- a/gcc/config/alpha/linux-elf.h
++++ b/gcc/config/alpha/linux-elf.h
+@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
+ #define EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index 66ec0ea3980..e4ade2e2ab0 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -65,8 +65,8 @@
+ GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
+
+ #undef GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
+-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
+ #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
+
+ #define GLIBC_DYNAMIC_LINKER \
+diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
+index 9a360defd21..98f6e960b64 100644
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -60,7 +60,7 @@
+
+ #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #define LINUX_TARGET_LINK_SPEC "%{h*} \
+ %{static:-Bstatic} \
+diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
+index 9a6e2d99896..31efbb73016 100644
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
+diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+index c08221c4210..dbb474d792b 100644
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
+ #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
+
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
+
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index c3c4a219e67..4b05d8e93d1 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -94,10 +94,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
+ GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+ supporting both 32-bit and 64-bit compilation. */
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
+diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
+index 6f79ac9c01a..25de96f9561 100644
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+
+ #define GLIBC_DYNAMIC_LINKER32 \
+- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKER64 \
+- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKERN32 \
+- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+
+ #undef UCLIBC_DYNAMIC_LINKER32
+ #define UCLIBC_DYNAMIC_LINKER32 \
+- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+ #undef UCLIBC_DYNAMIC_LINKER64
+ #define UCLIBC_DYNAMIC_LINKER64 \
+- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
+ #define UCLIBC_DYNAMIC_LINKERN32 \
+- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 \
+diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
+index 58dd18b89f3..112ba9cd764 100644
+--- a/gcc/config/riscv/linux.h
++++ b/gcc/config/riscv/linux.h
+@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see
+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
+ } while (0)
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
+
+ #define MUSL_ABI_SUFFIX \
+ "%{mabi=ilp32:-sf}" \
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index 9946d3fed94..45a9a7cae59 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -423,24 +423,19 @@ extern int dot_symbols;
+ #undef LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+
+-#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
+-
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
+ #ifdef LINUX64_DEFAULT_ABI_ELFv2
+-#define GLIBC_DYNAMIC_LINKER64 \
+-"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
+-":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
+ #else
+-#define GLIBC_DYNAMIC_LINKER64 \
+-"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
+-":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
+ #endif
+
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 \
+- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
++ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
+ #undef MUSL_DYNAMIC_LINKER64
+ #define MUSL_DYNAMIC_LINKER64 \
+- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
++ SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
+
+ #undef DEFAULT_ASM_ENDIAN
+ #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
+diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
+index c9897b7aca5..82f275319cc 100644
+--- a/gcc/config/sh/linux.h
++++ b/gcc/config/sh/linux.h
+@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
+ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
+ "%{mfdpic:-fdpic}.so.1"
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
+diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
+index 08476f1d94d..80440e712ad 100644
+--- a/gcc/config/sparc/linux.h
++++ b/gcc/config/sparc/linux.h
+@@ -84,7 +84,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
+ When the -shared link option is used a final link is not being
+ done. */
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
+index 789d1df4bd5..b920c680fb1 100644
+--- a/gcc/config/sparc/linux64.h
++++ b/gcc/config/sparc/linux64.h
+@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see
+ When the -shared link option is used a final link is not being
+ done. */
+
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #ifdef SPARC_BI_ARCH
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0012-gcc-Fix-argument-list-too-long-error.patch b/meta/recipes-devtools/gcc/gcc-9.2/0012-gcc-Fix-argument-list-too-long-error.patch
new file mode 100644
index 0000000000..60539795c5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0012-gcc-Fix-argument-list-too-long-error.patch
@@ -0,0 +1,40 @@
+From 2cb227cd8069c73242286f64183fb203f8d2618a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:26:37 +0400
+Subject: [PATCH 12/36] gcc: Fix argument list too long error.
+
+There would be an "Argument list too long" error when the
+build directory is longer than 200, this is caused by:
+
+headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
+
+The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
+it, use the $(sort list) of GNU make which can handle the too long list
+would fix the problem, the header would be short enough after sorted.
+The "tr ' ' '\012'" was used for translating the space to "\n", the
+$(sort list) doesn't need this.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 41f0f592ff4..0064a282488 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3537,7 +3537,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+ # We keep the directory structure for files in config or c-family and .def
+ # files. All other files are flattened to a single directory.
+ $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
+- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
++ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
+ for file in $$headers; do \
+ if [ -f $$file ] ; then \
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0013-Disable-sdt.patch b/meta/recipes-devtools/gcc/gcc-9.2/0013-Disable-sdt.patch
new file mode 100644
index 0000000000..a21a63c617
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0013-Disable-sdt.patch
@@ -0,0 +1,113 @@
+From aea5ffa9d704f4eb8fa93366884d3c26a1dbec49 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:28:10 +0400
+Subject: [PATCH 13/36] Disable sdt.
+
+We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
+It may or may not exist from preivous builds though. To be determinstic, disable
+sdt.h usage always. This avoids build failures if the header is removed after configure
+but before libgcc is compiled for example.
+
+RP 2012/8/7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Disable sdt for libstdc++-v3.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Inappropriate [hack]
+---
+ gcc/configure | 12 ++++++------
+ gcc/configure.ac | 18 +++++++++---------
+ libstdc++-v3/configure | 6 +++---
+ libstdc++-v3/configure.ac | 2 +-
+ 4 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index e3bcf8abe9a..1f1d22ca666 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -29332,12 +29332,12 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
+ $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
+ have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+- have_sys_sdt_h=yes
+-
+-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+-
+-fi
++#if test -f $target_header_dir/sys/sdt.h; then
++# have_sys_sdt_h=yes
++#
++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
++#
++#fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
+ $as_echo "$have_sys_sdt_h" >&6; }
+
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 2ebc377a74d..ddc85197588 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5995,15 +5995,15 @@ fi
+ AC_SUBST([enable_default_ssp])
+
+ # Test for <sys/sdt.h> on the target.
+-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
+-AC_MSG_CHECKING(sys/sdt.h in the target C library)
+-have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+- have_sys_sdt_h=yes
+- AC_DEFINE(HAVE_SYS_SDT_H, 1,
+- [Define if your target C library provides sys/sdt.h])
+-fi
+-AC_MSG_RESULT($have_sys_sdt_h)
++#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
++#AC_MSG_CHECKING(sys/sdt.h in the target C library)
++#have_sys_sdt_h=no
++#if test -f $target_header_dir/sys/sdt.h; then
++# have_sys_sdt_h=yes
++# AC_DEFINE(HAVE_SYS_SDT_H, 1,
++# [Define if your target C library provides sys/sdt.h])
++#fi
++#AC_MSG_RESULT($have_sys_sdt_h)
+
+ # Check if TFmode long double should be used by default or not.
+ # Some glibc targets used DFmode long double, but with glibc 2.4
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 5acf79cba54..191bc6c5796 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -22085,11 +22085,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+- if test $glibcxx_cv_sys_sdt_h = yes; then
++# if test $glibcxx_cv_sys_sdt_h = yes; then
+
+-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+
+- fi
++# fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
+ $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
+
+diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
+index dadd8827b49..6b1ce9957d3 100644
+--- a/libstdc++-v3/configure.ac
++++ b/libstdc++-v3/configure.ac
+@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
+ GLIBCXX_CHECK_SC_NPROC_ONLN
+ GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
+ GLIBCXX_CHECK_SYSCTL_HW_NCPU
+-GLIBCXX_CHECK_SDT_H
++#GLIBCXX_CHECK_SDT_H
+
+ # Check for available headers.
+ AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0014-libtool.patch b/meta/recipes-devtools/gcc/gcc-9.2/0014-libtool.patch
new file mode 100644
index 0000000000..7a8f3afecf
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0014-libtool.patch
@@ -0,0 +1,42 @@
+From 6c4d0c303ebc3e1c7e554d54a8bb807d77ed41fd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:29:11 +0400
+Subject: [PATCH 14/36] libtool
+
+libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
+when running on am x86_64 build host.
+
+This patch stops this speading to libdir in the libstdc++.la file within libtool.
+Arguably, it shouldn't be passing this into libtool in the first place but
+for now this resolves the nastiest problems this causes.
+
+func_normal_abspath would resolve an empty path to `pwd` so we need
+to filter the zero case.
+
+RP 2012/8/24
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ ltmain.sh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 79f9ba89af5..8e222f7c16b 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6359,6 +6359,10 @@ func_mode_link ()
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
++ if test -n "$install_libdir"; then
++ func_normal_abspath "$install_libdir"
++ install_libdir=$func_normal_abspath_result
++ fi
+
+ oldlibs=
+ if test -z "$rpath"; then
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta/recipes-devtools/gcc/gcc-9.2/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
new file mode 100644
index 0000000000..d06ae27028
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -0,0 +1,43 @@
+From c5662ff1e7dea2291b9cb7a83cfff3001dd31f53 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:30:32 +0400
+Subject: [PATCH 15/36] gcc: armv4: pass fix-v4bx to linker to support EABI.
+
+The LINK_SPEC for linux gets overwritten by linux-eabi.h which
+means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
+the option is not passed to linker when chosing march=armv4
+This patch redefines this in linux-eabi.h and reinserts it
+for eabi defaulting toolchains.
+
+We might want to send it upstream.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/config/arm/linux-eabi.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index e4ade2e2ab0..108863f69d2 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -91,10 +91,14 @@
+ #define MUSL_DYNAMIC_LINKER \
+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
+
++/* For armv4 we pass --fix-v4bx to linker to support EABI */
++#undef TARGET_FIX_V4BX_SPEC
++#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
+ #undef LINK_SPEC
+-#define LINK_SPEC EABI_LINK_SPEC \
++#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
+ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
+ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/meta/recipes-devtools/gcc/gcc-9.2/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
new file mode 100644
index 0000000000..310caec4a1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -0,0 +1,102 @@
+From e3b693b9d6dc9496f7c98a13b28182d23084215c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:33:04 +0400
+Subject: [PATCH 16/36] Use the multilib config files from ${B} instead of
+ using the ones from ${S}
+
+Use the multilib config files from ${B} instead of using the ones from ${S}
+so that the source can be shared between gcc-cross-initial,
+gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure | 22 ++++++++++++++++++----
+ gcc/configure.ac | 22 ++++++++++++++++++----
+ 2 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 1f1d22ca666..911de2cf017 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12321,10 +12321,20 @@ done
+ tmake_file_=
+ for f in ${tmake_file}
+ do
+- if test -f ${srcdir}/config/$f
+- then
+- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+- fi
++ case $f in
++ */t-linux64 )
++ if test -f ./config/$f
++ then
++ tmake_file_="${tmake_file_} ./config/$f"
++ fi
++ ;;
++ * )
++ if test -f ${srcdir}/config/$f
++ then
++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
++ fi
++ ;;
++ esac
+ done
+ tmake_file="${tmake_file_}"
+
+@@ -12335,6 +12345,10 @@ tm_file_list="options.h"
+ tm_include_list="options.h insn-constants.h"
+ for f in $tm_file; do
+ case $f in
++ */linux64.h )
++ tm_file_list="${tm_file_list} ./config/$f"
++ tm_include_list="${tm_include_list} ./config/$f"
++ ;;
+ ./* )
+ f=`echo $f | sed 's/^..//'`
+ tm_file_list="${tm_file_list} $f"
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index ddc85197588..b413ae9bf25 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1948,10 +1948,20 @@ done
+ tmake_file_=
+ for f in ${tmake_file}
+ do
+- if test -f ${srcdir}/config/$f
+- then
+- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+- fi
++ case $f in
++ */t-linux64 )
++ if test -f ./config/$f
++ then
++ tmake_file_="${tmake_file_} ./config/$f"
++ fi
++ ;;
++ * )
++ if test -f ${srcdir}/config/$f
++ then
++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
++ fi
++ ;;
++ esac
+ done
+ tmake_file="${tmake_file_}"
+
+@@ -1962,6 +1972,10 @@ tm_file_list="options.h"
+ tm_include_list="options.h insn-constants.h"
+ for f in $tm_file; do
+ case $f in
++ */linux64.h )
++ tm_file_list="${tm_file_list} ./config/$f"
++ tm_include_list="${tm_include_list} ./config/$f"
++ ;;
+ ./* )
+ f=`echo $f | sed 's/^..//'`
+ tm_file_list="${tm_file_list} $f"
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/meta/recipes-devtools/gcc/gcc-9.2/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
new file mode 100644
index 0000000000..ad1d1d4eb0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
@@ -0,0 +1,31 @@
+From 09d9ccc1d471020949d1285a5276f17504fd60dd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 09:39:38 +0000
+Subject: [PATCH 17/36] Avoid using libdir from .la which usually points to a
+ host path
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 8e222f7c16b..0a93b4e5c3b 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -5628,6 +5628,9 @@ func_mode_link ()
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
++ # Instead of using libdir from .la which usually points to a host path,
++ # use the path the .la is contained in.
++ libdir="$abs_ladir"
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0018-export-CPP.patch b/meta/recipes-devtools/gcc/gcc-9.2/0018-export-CPP.patch
new file mode 100644
index 0000000000..0f728ec542
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0018-export-CPP.patch
@@ -0,0 +1,53 @@
+From 987338cd847a723de533bb317e452a60b1e52165 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 09:40:59 +0000
+Subject: [PATCH 18/36] export CPP
+
+The OE environment sets and exports CPP as being the target gcc. When
+building gcc-cross-canadian for a mingw targetted sdk, the following can be found
+in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
+
+configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
+configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5
+configure:3666: $? = 0
+configure:3698: result: no
+configure:3786: checking how to run the C preprocessor
+configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
+configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
+configure:3876: $? = 0
+
+Note this is a *build* target (in build-x86_64-linux) so it should be
+using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
+headers are very different, using the wrong cpp is a real problem. It is leaking
+into configure through the CPP variable. Ultimately this leads to build
+failures related to not being able to include a process.h file for pem-unix.c.
+
+The fix is to ensure we export a sane CPP value into the build
+environment when using build targets. We could define a CPP_FOR_BUILD value which may be
+the version which needs to be upstreamed but for now, this fix is good enough to
+avoid the problem.
+
+RP 22/08/2013
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index 64e091ba71d..255822e3f27 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
+ AR="$(AR_FOR_BUILD)"; export AR; \
+ AS="$(AS_FOR_BUILD)"; export AS; \
+ CC="$(CC_FOR_BUILD)"; export CC; \
++ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0019-Ensure-target-gcc-headers-can-be-included.patch b/meta/recipes-devtools/gcc/gcc-9.2/0019-Ensure-target-gcc-headers-can-be-included.patch
new file mode 100644
index 0000000000..53f9e99d07
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0019-Ensure-target-gcc-headers-can-be-included.patch
@@ -0,0 +1,55 @@
+From d27ba49e2e5c608c43265462d6831363cc7f565b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 10:25:11 +0000
+Subject: [PATCH 19/36] Ensure target gcc headers can be included
+
+There are a few headers installed as part of the OpenEmbedded
+gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
+built for the target architecture, these are within the target
+sysroot and not cross/nativesdk; thus they weren't able to be
+found by gcc with the existing search paths. Add support for
+picking up these headers under the sysroot supplied on the gcc
+command line in order to resolve this.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/Makefile.in | 2 ++
+ gcc/cppdefault.c | 4 ++++
+ gcc/defaults.h | 9 +++++++++
+ gcc/gcc.c | 7 -------
+ 4 files changed, 15 insertions(+), 7 deletions(-)
+
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -618,6 +618,7 @@ libexecdir = @libexecdir@
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
++libsubdir_target = $(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
+ # Directory in which all plugin resources are installed
+@@ -2866,6 +2867,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localed
+
+ PREPROCESSOR_DEFINES = \
+ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
++ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
+ -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
+ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+ -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
+--- a/gcc/cppdefault.c
++++ b/gcc/cppdefault.c
+@@ -59,6 +59,10 @@ const struct default_include cpp_include
+ /* This is the dir for gcc's private headers. */
+ { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
+ #endif
++#ifdef GCC_INCLUDE_SUBDIR_TARGET
++ /* This is the dir for gcc's private headers under the specified sysroot. */
++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++#endif
+ #ifdef LOCAL_INCLUDE_DIR
+ /* /usr/local/include comes before the fixincluded header files. */
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/meta/recipes-devtools/gcc/gcc-9.2/0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
new file mode 100644
index 0000000000..b0f96d06d4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
@@ -0,0 +1,54 @@
+From 83bcd4cc47ae63971c888c117abd00dfd506532c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 11:17:19 +0000
+Subject: [PATCH 20/36] gcc 4.8+ won't build with --disable-dependency-tracking
+
+since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
+
+This patch ensures we only use those compiler options when its enabled.
+
+Upstream-Status: Submitted
+
+(Problem was already reported upstream, attached this patch there
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
+
+RP
+2012/09/22
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libatomic/Makefile.am | 3 ++-
+ libatomic/Makefile.in | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
+index c1b7c73934a..ef43d62c07a 100644
+--- a/libatomic/Makefile.am
++++ b/libatomic/Makefile.am
+@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS =
+ M_SIZE = -DN=$(PAT_N)
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE = $(PAT_BASE)_n.c
+diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
+index 29324e3e0ac..d5cdb4259ef 100644
+--- a/libatomic/Makefile.in
++++ b/libatomic/Makefile.in
+@@ -414,7 +414,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
+ PAT_S = $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS =
+ M_SIZE = -DN=$(PAT_N)
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE = $(PAT_BASE)_n.c
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/meta/recipes-devtools/gcc/gcc-9.2/0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch
new file mode 100644
index 0000000000..f36ca29b9e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch
@@ -0,0 +1,38 @@
+From 667cc8d43e8fb4ac09654ee408da482f96b09580 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 3 Mar 2015 08:21:19 +0000
+Subject: [PATCH 21/36] Don't search host directory during "relink" if
+ $inst_prefix is provided
+
+http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
+
+Upstream-Status: Submitted
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 0a93b4e5c3b..6de6ed2f9a0 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6004,12 +6004,13 @@ func_mode_link ()
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
++ # Default if $libdir is not relative to the prefix:
+ add_dir="-L$libdir"
+- # Try looking first in the location we're being installed to.
++
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+- add_dir="$add_dir -L$inst_prefix_dir$libdir"
++ add_dir="-L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/meta/recipes-devtools/gcc/gcc-9.2/0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
new file mode 100644
index 0000000000..d5b9150023
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
@@ -0,0 +1,29 @@
+From 279c4de48e3fd61e2f268787ed3f1d69ed9224f8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2015 23:15:27 -0700
+Subject: [PATCH 22/36] Use SYSTEMLIBS_DIR replacement instead of hardcoding
+ base_libdir
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/aarch64-linux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index 5e8b34ded03..7e628bf661e 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -21,7 +21,7 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0023-aarch64-Add-support-for-musl-ldso.patch b/meta/recipes-devtools/gcc/gcc-9.2/0023-aarch64-Add-support-for-musl-ldso.patch
new file mode 100644
index 0000000000..f811306c31
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0023-aarch64-Add-support-for-musl-ldso.patch
@@ -0,0 +1,28 @@
+From 1277d12058334087443828dfd57d44e3b1dfcc9a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2015 23:18:39 -0700
+Subject: [PATCH 23/36] aarch64: Add support for musl ldso
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/aarch64-linux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index 7e628bf661e..1717cbe5471 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -24,7 +24,7 @@
+ #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+
+ #undef MUSL_DYNAMIC_LINKER
+-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+
+ #undef ASAN_CC1_SPEC
+ #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/meta/recipes-devtools/gcc/gcc-9.2/0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch
new file mode 100644
index 0000000000..298b0962f6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -0,0 +1,54 @@
+From 4a0487ad75accd780dd155aa59086cc4b11cfc47 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 5 Jul 2015 20:25:18 -0700
+Subject: [PATCH 24/36] libcc1: fix libcc1's install path and rpath
+
+* Install libcc1.so and libcc1plugin.so into
+ $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
+ had done to lto-plugin.
+* Fix bad RPATH iussue:
+ gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
+ /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
+ [rpaths]
+
+Upstream-Status: Inappropriate [OE configuration]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ libcc1/Makefile.am | 4 ++--
+ libcc1/Makefile.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
+index 72c6aead475..42a87740b31 100644
+--- a/libcc1/Makefile.am
++++ b/libcc1/Makefile.am
+@@ -37,8 +37,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ $(Wc)$(libiberty_normal)))
+ libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
+
+-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
+-cc1libdir = $(libdir)/$(libsuffix)
++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
++plugindir = $(cc1libdir)
+
+ if ENABLE_PLUGIN
+ plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
+diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
+index 7104b649026..2103c477468 100644
+--- a/libcc1/Makefile.in
++++ b/libcc1/Makefile.in
+@@ -393,8 +393,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ $(Wc)$(libiberty_normal)))
+
+ libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
+-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
+-cc1libdir = $(libdir)/$(libsuffix)
++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
++plugindir = $(cc1libdir)
+ @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
+ @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
+ shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch b/meta/recipes-devtools/gcc/gcc-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch
new file mode 100644
index 0000000000..2e7a444b58
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -0,0 +1,346 @@
+From a183c82ea2af934a8d30055a791dc1d80c9067a9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:39:54 +0000
+Subject: [PATCH 25/36] handle sysroot support for nativesdk-gcc
+
+Being able to build a nativesdk gcc is useful, particularly in cases
+where the host compiler may be of an incompatible version (or a 32
+bit compiler is needed).
+
+Sadly, building nativesdk-gcc is not straight forward. We install
+nativesdk-gcc into a relocatable location and this means that its
+library locations can change. "Normal" sysroot support doesn't help
+in this case since the values of paths like "libdir" change, not just
+base root directory of the system.
+
+In order to handle this we do two things:
+
+a) Add %r into spec file markup which can be used for injected paths
+ such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
+b) Add other paths which need relocation into a .gccrelocprefix section
+ which the relocation code will notice and adjust automatically.
+
+Upstream-Status: Inappropriate
+RP 2015/7/28
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Added PREFIXVAR and EXEC_PREFIXVAR to support runtime relocation. Without
+these as part of the gccrelocprefix the system can't do runtime relocation
+if the executable is moved. (These paths were missed in the original
+implementation.)
+
+Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
+---
+ c-family/c-opts.c | 4 +--
+ cppdefault.c | 63 +++++++++++++++++++++++++++++++++---------------------
+ cppdefault.h | 13 ++++-------
+ gcc.c | 20 ++++++++++++-----
+ incpath.c | 12 +++++-----
+ prefix.c | 4 +--
+ 6 files changed, 68 insertions(+), 48 deletions(-)
+
+Index: gcc-9.2.0/gcc/cppdefault.c
+===================================================================
+--- gcc-9.2.0.orig/gcc/cppdefault.c
++++ gcc-9.2.0/gcc/cppdefault.c
+@@ -35,6 +35,30 @@
+ # undef CROSS_INCLUDE_DIR
+ #endif
+
++static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
++char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
++static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
++static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
++static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
++#ifdef LOCAL_INCLUDE_DIR
++static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
++#endif
++#ifdef PREFIX_INCLUDE_DIR
++static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
++#endif
++#ifdef FIXED_INCLUDE_DIR
++static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
++#endif
++#ifdef CROSS_INCLUDE_DIR
++static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
++#endif
++#ifdef TOOL_INCLUDE_DIR
++static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
++#endif
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
++#endif
++
+ const struct default_include cpp_include_defaults[]
+ #ifdef INCLUDE_DEFAULTS
+ = INCLUDE_DEFAULTS;
+@@ -42,38 +66,38 @@ const struct default_include cpp_include
+ = {
+ #ifdef GPLUSPLUS_INCLUDE_DIR
+ /* Pick up GNU C++ generic include files. */
+- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
++ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ #endif
+ #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
+ /* Pick up GNU C++ target-dependent include files. */
+- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
++ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
+ #endif
+ #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
+ /* Pick up GNU C++ backward and deprecated include files. */
+- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
++ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ #endif
+ #ifdef GCC_INCLUDE_DIR
+ /* This is the dir for gcc's private headers. */
+- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
++ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
+ #endif
+ #ifdef GCC_INCLUDE_SUBDIR_TARGET
+ /* This is the dir for gcc's private headers under the specified sysroot. */
+- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
+ #endif
+ #ifdef LOCAL_INCLUDE_DIR
+ /* /usr/local/include comes before the fixincluded header files. */
+- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
+ #endif
+ #ifdef PREFIX_INCLUDE_DIR
+- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
++ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
+ #endif
+ #ifdef FIXED_INCLUDE_DIR
+ /* This is the dir for fixincludes. */
+- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
++ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
+ /* A multilib suffix needs adding if different multilibs use
+ different headers. */
+ #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
+@@ -85,33 +109,24 @@ const struct default_include cpp_include
+ #endif
+ #ifdef CROSS_INCLUDE_DIR
+ /* One place the target system's headers might be. */
+- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
++ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
+ #endif
+ #ifdef TOOL_INCLUDE_DIR
+ /* Another place the target system's headers might be. */
+- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
++ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
+ #endif
+ #ifdef NATIVE_SYSTEM_HEADER_DIR
+ /* /usr/include comes dead last. */
+- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
+- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
+ #endif
+ { 0, 0, 0, 0, 0, 0 }
+ };
+ #endif /* no INCLUDE_DEFAULTS */
+
+-#ifdef GCC_INCLUDE_DIR
+-const char cpp_GCC_INCLUDE_DIR[] = GCC_INCLUDE_DIR;
+-const size_t cpp_GCC_INCLUDE_DIR_len = sizeof GCC_INCLUDE_DIR - 8;
+-#else
+-const char cpp_GCC_INCLUDE_DIR[] = "";
+-const size_t cpp_GCC_INCLUDE_DIR_len = 0;
+-#endif
+-
+ /* The configured prefix. */
+-const char cpp_PREFIX[] = PREFIX;
+-const size_t cpp_PREFIX_len = sizeof PREFIX - 1;
+-const char cpp_EXEC_PREFIX[] = STANDARD_EXEC_PREFIX;
++char PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX;
++char EXEC_PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
+
+ /* This value is set by cpp_relocated at runtime */
+ const char *gcc_exec_prefix;
+Index: gcc-9.2.0/gcc/cppdefault.h
+===================================================================
+--- gcc-9.2.0.orig/gcc/cppdefault.h
++++ gcc-9.2.0/gcc/cppdefault.h
+@@ -33,7 +33,8 @@
+
+ struct default_include
+ {
+- const char *const fname; /* The name of the directory. */
++ const char *fname; /* The name of the directory. */
++
+ const char *const component; /* The component containing the directory
+ (see update_path in prefix.c) */
+ const char cplusplus; /* Only look here if we're compiling C++. */
+@@ -50,17 +51,13 @@ struct default_include
+ };
+
+ extern const struct default_include cpp_include_defaults[];
+-extern const char cpp_GCC_INCLUDE_DIR[];
+-extern const size_t cpp_GCC_INCLUDE_DIR_len;
++extern char GCC_INCLUDE_DIRVAR[] __attribute__ ((section (".gccrelocprefix")));
+
+ /* The configure-time prefix, i.e., the value supplied as the argument
+ to --prefix=. */
+-extern const char cpp_PREFIX[];
++extern char PREFIXVAR[] __attribute__ ((section (".gccrelocprefix")));
+ /* The length of the configure-time prefix. */
+-extern const size_t cpp_PREFIX_len;
+-/* The configure-time execution prefix. This is typically the lib/gcc
+- subdirectory of cpp_PREFIX. */
+-extern const char cpp_EXEC_PREFIX[];
++extern char EXEC_PREFIXVAR[] __attribute__ ((section (".gccrelocprefix")));
+ /* The run-time execution prefix. This is typically the lib/gcc
+ subdirectory of the actual installation. */
+ extern const char *gcc_exec_prefix;
+Index: gcc-9.2.0/gcc/gcc.c
+===================================================================
+--- gcc-9.2.0.orig/gcc/gcc.c
++++ gcc-9.2.0/gcc/gcc.c
+@@ -253,6 +253,8 @@ FILE *report_times_to_file = NULL;
+ #endif
+ static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
+
++static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
++
+ /* Nonzero means pass the updated target_system_root to the compiler. */
+
+ static int target_system_root_changed;
+@@ -527,6 +529,7 @@ or with constant text in a single argume
+ %G process LIBGCC_SPEC as a spec.
+ %R Output the concatenation of target_system_root and
+ target_sysroot_suffix.
++ %r Output the base path target_relocatable_prefix
+ %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
+ %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
+ %C process CPP_SPEC as a spec.
+@@ -1500,10 +1503,10 @@ static const char *gcc_libexec_prefix;
+ gcc_exec_prefix is set because, in that case, we know where the
+ compiler has been installed, and use paths relative to that
+ location instead. */
+-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
+-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
+-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
+-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
++static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
++static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
++static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
++static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+
+ /* For native compilers, these are well-known paths containing
+ components that may be provided by the system. For cross
+@@ -1511,9 +1514,9 @@ static const char *const standard_startf
+ static const char *md_exec_prefix = MD_EXEC_PREFIX;
+ static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
+ static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
+-static const char *const standard_startfile_prefix_1
++static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
+ = STANDARD_STARTFILE_PREFIX_1;
+-static const char *const standard_startfile_prefix_2
++static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
+ = STANDARD_STARTFILE_PREFIX_2;
+
+ /* A relative path to be used in finding the location of tools
+@@ -5922,6 +5925,11 @@ do_spec_1 (const char *spec, int inswitc
+ }
+ break;
+
++ case 'r':
++ obstack_grow (&obstack, target_relocatable_prefix,
++ strlen (target_relocatable_prefix));
++ break;
++
+ case 'S':
+ value = do_spec_1 (startfile_spec, 0, NULL);
+ if (value != 0)
+Index: gcc-9.2.0/gcc/c-family/c-opts.c
+===================================================================
+--- gcc-9.2.0.orig/gcc/c-family/c-opts.c
++++ gcc-9.2.0/gcc/c-family/c-opts.c
+@@ -1382,8 +1382,8 @@ add_prefixed_path (const char *suffix, i
+ size_t prefix_len, suffix_len;
+
+ suffix_len = strlen (suffix);
+- prefix = iprefix ? iprefix : cpp_GCC_INCLUDE_DIR;
+- prefix_len = iprefix ? strlen (iprefix) : cpp_GCC_INCLUDE_DIR_len;
++ prefix = iprefix ? iprefix : GCC_INCLUDE_DIRVAR;
++ prefix_len = iprefix ? strlen (iprefix) : strlen(GCC_INCLUDE_DIRVAR) - 7;
+
+ path = (char *) xmalloc (prefix_len + suffix_len + 1);
+ memcpy (path, prefix, prefix_len);
+Index: gcc-9.2.0/gcc/incpath.c
+===================================================================
+--- gcc-9.2.0.orig/gcc/incpath.c
++++ gcc-9.2.0/gcc/incpath.c
+@@ -131,7 +131,7 @@ add_standard_paths (const char *sysroot,
+ int relocated = cpp_relocated ();
+ size_t len;
+
+- if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
++ if (iprefix && (len = strlen(GCC_INCLUDE_DIRVAR) - 7) != 0)
+ {
+ /* Look for directories that start with the standard prefix.
+ "Translate" them, i.e. replace /usr/local/lib/gcc... with
+@@ -145,7 +145,7 @@ add_standard_paths (const char *sysroot,
+ now. */
+ if (sysroot && p->add_sysroot)
+ continue;
+- if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
++ if (!filename_ncmp (p->fname, GCC_INCLUDE_DIRVAR, len))
+ {
+ char *str = concat (iprefix, p->fname + len, NULL);
+ if (p->multilib == 1 && imultilib)
+@@ -185,7 +185,7 @@ add_standard_paths (const char *sysroot,
+ free (sysroot_no_trailing_dir_separator);
+ }
+ else if (!p->add_sysroot && relocated
+- && !filename_ncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len))
++ && !filename_ncmp (p->fname, PREFIXVAR, strlen(PREFIXVAR)))
+ {
+ static const char *relocated_prefix;
+ char *ostr;
+@@ -202,12 +202,12 @@ add_standard_paths (const char *sysroot,
+ dummy = concat (gcc_exec_prefix, "dummy", NULL);
+ relocated_prefix
+ = make_relative_prefix (dummy,
+- cpp_EXEC_PREFIX,
+- cpp_PREFIX);
++ EXEC_PREFIXVAR,
++ PREFIXVAR);
+ free (dummy);
+ }
+ ostr = concat (relocated_prefix,
+- p->fname + cpp_PREFIX_len,
++ p->fname + strlen(PREFIXVAR),
+ NULL);
+ str = update_path (ostr, p->component);
+ free (ostr);
+Index: gcc-9.2.0/gcc/prefix.c
+===================================================================
+--- gcc-9.2.0.orig/gcc/prefix.c
++++ gcc-9.2.0/gcc/prefix.c
+@@ -72,7 +72,9 @@ License along with GCC; see the file COP
+ #include "prefix.h"
+ #include "common/common-target.h"
+
+-static const char *std_prefix = PREFIX;
++static const char PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX;
++
++static const char *std_prefix = PREFIXVAR;
+
+ static const char *get_key_value (char *);
+ static char *translate_name (char *);
+@@ -212,7 +214,7 @@ translate_name (char *name)
+ prefix = getenv (key);
+
+ if (prefix == 0)
+- prefix = PREFIX;
++ prefix = PREFIXVAR;
+
+ /* We used to strip trailing DIR_SEPARATORs here, but that can
+ sometimes yield a result with no separator when one was coded
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/meta/recipes-devtools/gcc/gcc-9.2/0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch
new file mode 100644
index 0000000000..fde206eb71
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch
@@ -0,0 +1,102 @@
+From dab4db14e319f3239a2b4c7d1fbf2971936e27ba Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:41:45 +0000
+Subject: [PATCH 26/36] Search target sysroot gcc version specific dirs with
+ multilib.
+
+We install the gcc libraries (such as crtbegin.p) into
+<sysroot><libdir>/<target-sys>/5.2.0/
+which is a default search path for GCC (aka multi_suffix in the
+code below). <target-sys> is 'machine' in gcc's terminology. We use
+these directories so that multiple gcc versions could in theory
+co-exist on target.
+
+We only want to build one gcc-cross-canadian per arch and have this work
+for all multilibs. <target-sys> can be handled by mapping the multilib
+<target-sys> to the one used by gcc-cross-canadian, e.g.
+mips64-polkmllib32-linux
+is symlinked to by mips64-poky-linux.
+
+The default gcc search path in the target sysroot for a "lib64" mutlilib
+is:
+
+<sysroot>/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/../lib64/
+<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/../lib64/
+<sysroot>/lib32/
+<sysroot>/usr/lib32/
+
+which means that the lib32 crtbegin.o will be found and the lib64 ones
+will not which leads to compiler failures.
+
+This patch injects a multilib version of that path first so the lib64
+binaries can be found first. With this change the search path becomes:
+
+<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/../lib64/
+<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/../lib64/
+<sysroot>/lib32/
+<sysroot>/usr/lib32/
+
+Upstream-Status: Pending
+RP 2015/7/31
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
+ 1 file changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index db0e2934038..1c21d1b08eb 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -2610,7 +2610,7 @@ for_each_path (const struct path_prefix *paths,
+ if (path == NULL)
+ {
+ len = paths->max_len + extra_space + 1;
+- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
++ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
+ path = XNEWVEC (char, len);
+ }
+
+@@ -2622,6 +2622,33 @@ for_each_path (const struct path_prefix *paths,
+ /* Look first in MACHINE/VERSION subdirectory. */
+ if (!skip_multi_dir)
+ {
++ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
++ {
++ const char *this_multi;
++ size_t this_multi_len;
++
++ if (pl->os_multilib)
++ {
++ this_multi = multi_os_dir;
++ this_multi_len = multi_os_dir_len;
++ }
++ else
++ {
++ this_multi = multi_dir;
++ this_multi_len = multi_dir_len;
++ }
++
++ /* Look in multilib MACHINE/VERSION subdirectory first */
++ if (this_multi_len)
++ {
++ memcpy (path + len, this_multi, this_multi_len + 1);
++ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
++ ret = callback (path, callback_info);
++ if (ret)
++ break;
++ }
++ }
++
+ memcpy (path + len, multi_suffix, suffix_len + 1);
+ ret = callback (path, callback_info);
+ if (ret)
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0027-Fix-various-_FOR_BUILD-and-related-variables.patch b/meta/recipes-devtools/gcc/gcc-9.2/0027-Fix-various-_FOR_BUILD-and-related-variables.patch
new file mode 100644
index 0000000000..5d89e8e7e2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0027-Fix-various-_FOR_BUILD-and-related-variables.patch
@@ -0,0 +1,137 @@
+From 8e84bb09d2b7a60487a30e438bb109f31c2c254b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:42:45 +0000
+Subject: [PATCH 27/36] Fix various _FOR_BUILD and related variables
+
+When doing a FOR_BUILD thing, you have to override CFLAGS with
+CFLAGS_FOR_BUILD. And if you use C++, you also have to override
+CXXFLAGS with CXXFLAGS_FOR_BUILD.
+Without this, when building for mingw, you end up trying to use
+the mingw headers for a host build.
+
+The same goes for other variables as well, such as CPPFLAGS,
+CPP, and GMPINC.
+
+Upstream-Status: Pending
+
+Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in | 6 ++++++
+ Makefile.tpl | 5 +++++
+ gcc/Makefile.in | 2 +-
+ gcc/configure | 2 +-
+ gcc/configure.ac | 2 +-
+ 5 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 255822e3f27..9dc0dff0474 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+@@ -171,6 +172,9 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
++ CPP="$(CC_FOR_BUILD) -E" \
++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
+@@ -188,6 +192,7 @@ HOST_SUBDIR = @host_subdir@
+ HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
++ CPP="$(CC) -E"; export CPP; \
+ ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+@@ -775,6 +780,7 @@ BASE_FLAGS_TO_PASS = \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
+ "EXPECT=$(EXPECT)" \
+ "FLEX=$(FLEX)" \
+ "INSTALL=$(INSTALL)" \
+diff --git a/Makefile.tpl b/Makefile.tpl
+index 41cae58a267..d3f6b79acdc 100644
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
+ CC="$(CC_FOR_BUILD)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+@@ -173,6 +174,9 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
++ CPP="$(CC_FOR_BUILD) -E" \
++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
+@@ -190,6 +194,7 @@ HOST_SUBDIR = @host_subdir@
+ HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
++ CPP="$(CC) -E"; export CPP; \
+ ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 21472745c2c..8c93f03ffdc 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -805,7 +805,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
+ BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
+ BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
+ BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
+- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
++ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
+
+ # Actual name to use when installing a native compiler.
+ GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
+diff --git a/gcc/configure b/gcc/configure
+index 911de2cf017..325ace34cdf 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11965,7 +11965,7 @@ else
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ ${realsrcdir}/configure \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index b413ae9bf25..72a6c95121b 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1743,7 +1743,7 @@ else
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ ${realsrcdir}/configure \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/meta/recipes-devtools/gcc/gcc-9.2/0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch
new file mode 100644
index 0000000000..84d92a337e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch
@@ -0,0 +1,28 @@
+From 5647f773e28b528a67800ef06ca44730f9f5dc7e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 2 Feb 2016 10:26:10 -0800
+Subject: [PATCH 28/36] nios2: Define MUSL_DYNAMIC_LINKER
+
+Upstream-Status: Pending
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/nios2/linux.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
+index 698734add35..eeee60ecfea 100644
+--- a/gcc/config/nios2/linux.h
++++ b/gcc/config/nios2/linux.h
+@@ -30,6 +30,7 @@
+ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC LINK_SPEC_ENDIAN \
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/meta/recipes-devtools/gcc/gcc-9.2/0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
new file mode 100644
index 0000000000..d19e5a08b9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
@@ -0,0 +1,87 @@
+From 474043ca7a064ca7b0a32308a0ed6f7c546f17b2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 18:10:54 -0700
+Subject: [PATCH 29/36] Add ssp_nonshared to link commandline for musl targets
+
+when -fstack-protector options are enabled we need to
+link with ssp_shared on musl since it does not provide
+the __stack_chk_fail_local() so essentially it provides
+libssp but not libssp_nonshared something like
+TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED
+ where-as for glibc the needed symbols
+are already present in libc_nonshared library therefore
+we do not need any library helper on glibc based systems
+but musl needs the libssp_noshared from gcc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/linux.h | 7 +++++++
+ gcc/config/rs6000/linux.h | 10 ++++++++++
+ gcc/config/rs6000/linux64.h | 10 ++++++++++
+ 3 files changed, 27 insertions(+)
+
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index 4b05d8e93d1..0ca117e2ed4 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -195,6 +195,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
+ { 0, 0, 0, 0, 0, 0 } \
+ }
++#ifdef TARGET_LIBC_PROVIDES_SSP
++#undef LINK_SSP_SPEC
++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
++ "|fstack-protector-strong|fstack-protector-explicit" \
++ ":-lssp_nonshared}"
++#endif
++
+ #endif
+
+ #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
+diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
+index ffceb32bf65..c82cb2ad05b 100644
+--- a/gcc/config/rs6000/linux.h
++++ b/gcc/config/rs6000/linux.h
+@@ -94,6 +94,16 @@
+ " -m elf32ppclinux")
+ #endif
+
++/* link libssp_nonshared.a with musl */
++#if DEFAULT_LIBC == LIBC_MUSL
++#ifdef TARGET_LIBC_PROVIDES_SSP
++#undef LINK_SSP_SPEC
++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
++ "|fstack-protector-strong|fstack-protector-explicit" \
++ ":-lssp_nonshared}"
++#endif
++#endif
++
+ #undef LINK_OS_LINUX_SPEC
+ #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
+ %{!static-pie: \
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index 45a9a7cae59..d1e88a40e82 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -456,6 +456,16 @@ extern int dot_symbols;
+ " -m elf64ppc")
+ #endif
+
++/* link libssp_nonshared.a with musl */
++#if DEFAULT_LIBC == LIBC_MUSL
++#ifdef TARGET_LIBC_PROVIDES_SSP
++#undef LINK_SSP_SPEC
++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
++ "|fstack-protector-strong|fstack-protector-explicit" \
++ ":-lssp_nonshared}"
++#endif
++#endif
++
+ #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
+ %{!static-pie: \
+ %{rdynamic:-export-dynamic} \
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/meta/recipes-devtools/gcc/gcc-9.2/0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
new file mode 100644
index 0000000000..38eab5a083
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
@@ -0,0 +1,79 @@
+From 47467f3ab0fb2f2fcede81060fe8bb339d0909eb Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Wed, 28 Feb 2018 00:54:05 +0000
+Subject: [PATCH 10/12] ldbl128 config
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/configure | 13 +++++++++++++
+ gcc/configure.ac | 16 ++++++++++++++--
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 6121e163259..07ff8597d48 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -29309,6 +29309,15 @@ if test "${with_long_double_128+set}" = set; then :
+ withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
+ else
+
++ case "$target" in
++ s390*-*-linux-musl*)
++ gcc_cv_target_ldbl128=yes
++ ;;
++ powerpc*-*-linux-musl*)
++ gcc_cv_target_ldbl128=no
++ ;;
++ *)
++
+ if test $glibc_version_major -gt 2 \
+ || ( test $glibc_version_major -eq 2 && test $glibc_version_minor -ge 4 ); then :
+ gcc_cv_target_ldbl128=yes
+@@ -29320,6 +29329,10 @@ else
+ && gcc_cv_target_ldbl128=yes
+
+ fi
++
++ ;;
++ esac
++
+ fi
+
+ ;;
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index b066cc609e1..6c15ed898c0 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5971,13 +5971,25 @@ case "$target" in
+ AC_ARG_WITH(long-double-128,
+ [AS_HELP_STRING([--with-long-double-128],
+ [use 128-bit long double by default])],
+- gcc_cv_target_ldbl128="$with_long_double_128",
++ gcc_cv_target_ldbl128="$with_long_double_128", [
++ case "$target" in
++ s390*-*-linux-musl*)
++ gcc_cv_target_ldbl128=yes
++ ;;
++ powerpc*-*-linux-musl*)
++ gcc_cv_target_ldbl128=no
++ ;;
++ *)]
+ [GCC_GLIBC_VERSION_GTE_IFELSE([2], [4], [gcc_cv_target_ldbl128=yes], [
+ [gcc_cv_target_ldbl128=no
+ grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
+ $target_header_dir/bits/wordsize.h > /dev/null 2>&1 \
+ && gcc_cv_target_ldbl128=yes
+- ]])])
++ ]])]
++ [
++ ;;
++ esac
++ ])
+ ;;
+ esac
+ if test x$gcc_cv_target_ldbl128 = xyes; then
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/meta/recipes-devtools/gcc/gcc-9.2/0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
new file mode 100644
index 0000000000..dc2141d70c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
@@ -0,0 +1,29 @@
+From 266dcc78e4d9d38de2809118977d97dc9270cf1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 4 May 2016 21:11:34 -0700
+Subject: [PATCH 31/36] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
+
+Upstream-Status: Pending
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libgcc/config/t-slibgcc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
+index 099bf23e62f..436b277a79f 100644
+--- a/libgcc/config/t-slibgcc
++++ b/libgcc/config/t-slibgcc
+@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
+ $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+
+ SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+- $(SHLIB_LDFLAGS) \
++ $(LDFLAGS) $(SHLIB_LDFLAGS) \
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+ $(SHLIB_OBJS) $(SHLIB_LC) && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/meta/recipes-devtools/gcc/gcc-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
new file mode 100644
index 0000000000..8dde016ce5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -0,0 +1,86 @@
+From 9975b6ed3570bbf7c7d2d82f4d5f733d24ccacf5 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sat, 24 Oct 2015 20:09:53 +0000
+Subject: [PATCH 32/36] libgcc_s: Use alias for __cpu_indicator_init instead of
+ symver
+
+Adapter from
+
+https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
+
+This fix was debated but hasnt been applied gcc upstream since
+they expect musl to support '@' in symbol versioning which is
+a sun/gnu versioning extention. This patch however avoids the
+need for the '@' symbols at all
+
+libgcc/Changelog:
+
+2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
+ (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
+
+ * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
+
+gcc/Changelog:
+
+2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init
+ call __cpu_indicator_init_local instead of __cpu_indicator_init.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/i386/i386.c | 4 ++--
+ libgcc/config/i386/cpuinfo.c | 6 +++---
+ libgcc/config/i386/t-linux | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 2b37296e537..dd380ddba88 100644
+--- a/gcc/config/i386/i386.c
++++ b/gcc/config/i386/i386.c
+@@ -36658,10 +36658,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
+ {
+ case IX86_BUILTIN_CPU_INIT:
+ {
+- /* Make it call __cpu_indicator_init in libgcc. */
++ /* Make it call __cpu_indicator_init_local in libgcc.a. */
+ tree call_expr, fndecl, type;
+ type = build_function_type_list (integer_type_node, NULL_TREE);
+- fndecl = build_fn_decl ("__cpu_indicator_init", type);
++ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
+ call_expr = build_call_expr (fndecl, 0);
+ return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
+ }
+diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
+index d6cb2de6265..ce04ef78205 100644
+--- a/libgcc/config/i386/cpuinfo.c
++++ b/libgcc/config/i386/cpuinfo.c
+@@ -504,7 +504,7 @@ __cpu_indicator_init (void)
+ return 0;
+ }
+
+-#if defined SHARED && defined USE_ELF_SYMVER
+-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
+-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
++#ifndef SHARED
++int __cpu_indicator_init_local (void)
++ __attribute__ ((weak, alias ("__cpu_indicator_init")));
+ #endif
+diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
+index 8506a635790..564296f788e 100644
+--- a/libgcc/config/i386/t-linux
++++ b/libgcc/config/i386/t-linux
+@@ -3,5 +3,5 @@
+ # t-slibgcc-elf-ver and t-linux
+ SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
++HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
+ CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0033-sync-gcc-stddef.h-with-musl.patch b/meta/recipes-devtools/gcc/gcc-9.2/0033-sync-gcc-stddef.h-with-musl.patch
new file mode 100644
index 0000000000..b99ac429a0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0033-sync-gcc-stddef.h-with-musl.patch
@@ -0,0 +1,91 @@
+From 39e2f61d262f9f6c7a91068998dea80791ef665e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Feb 2017 12:56:00 -0800
+Subject: [PATCH 33/36] sync gcc stddef.h with musl
+
+musl defines ptrdiff_t size_t and wchar_t
+so dont define them here if musl is definining them
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/ginclude/stddef.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
+index da692e1c01a..9a00c261adb 100644
+--- a/gcc/ginclude/stddef.h
++++ b/gcc/ginclude/stddef.h
+@@ -128,6 +128,7 @@ _TYPE_wchar_t;
+ #ifndef ___int_ptrdiff_t_h
+ #ifndef _GCC_PTRDIFF_T
+ #ifndef _PTRDIFF_T_DECLARED /* DragonFly */
++#ifndef __DEFINED_ptrdiff_t /* musl */
+ #define _PTRDIFF_T
+ #define _T_PTRDIFF_
+ #define _T_PTRDIFF
+@@ -137,10 +138,12 @@ _TYPE_wchar_t;
+ #define ___int_ptrdiff_t_h
+ #define _GCC_PTRDIFF_T
+ #define _PTRDIFF_T_DECLARED
++#define __DEFINED_ptrdiff_t /* musl */
+ #ifndef __PTRDIFF_TYPE__
+ #define __PTRDIFF_TYPE__ long int
+ #endif
+ typedef __PTRDIFF_TYPE__ ptrdiff_t;
++#endif /* __DEFINED_ptrdiff_t */
+ #endif /* _PTRDIFF_T_DECLARED */
+ #endif /* _GCC_PTRDIFF_T */
+ #endif /* ___int_ptrdiff_t_h */
+@@ -178,6 +181,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+ #ifndef _GCC_SIZE_T
+ #ifndef _SIZET_
+ #ifndef __size_t
++#ifndef __DEFINED_size_t /* musl */
+ #define __size_t__ /* BeOS */
+ #define __SIZE_T__ /* Cray Unicos/Mk */
+ #define _SIZE_T
+@@ -194,6 +198,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+ #define ___int_size_t_h
+ #define _GCC_SIZE_T
+ #define _SIZET_
++#define __DEFINED_size_t /* musl */
+ #if defined (__FreeBSD__) \
+ || defined(__DragonFly__) \
+ || defined(__FreeBSD_kernel__) \
+@@ -228,6 +233,7 @@ typedef long ssize_t;
+ #endif /* _SIZE_T */
+ #endif /* __SIZE_T__ */
+ #endif /* __size_t__ */
++#endif /* __DEFINED_size_t */
+ #undef __need_size_t
+ #endif /* _STDDEF_H or __need_size_t. */
+
+@@ -257,6 +263,7 @@ typedef long ssize_t;
+ #ifndef ___int_wchar_t_h
+ #ifndef __INT_WCHAR_T_H
+ #ifndef _GCC_WCHAR_T
++#ifndef __DEFINED_wchar_t /* musl */
+ #define __wchar_t__ /* BeOS */
+ #define __WCHAR_T__ /* Cray Unicos/Mk */
+ #define _WCHAR_T
+@@ -272,6 +279,7 @@ typedef long ssize_t;
+ #define __INT_WCHAR_T_H
+ #define _GCC_WCHAR_T
+ #define _WCHAR_T_DECLARED
++#define __DEFINED_wchar_t /* musl */
+
+ /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
+ instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
+@@ -337,6 +345,7 @@ typedef __WCHAR_TYPE__ wchar_t;
+ #endif
+ #endif /* __WCHAR_T__ */
+ #endif /* __wchar_t__ */
++#endif /* __DEFINED_wchar_t musl */
+ #undef __need_wchar_t
+ #endif /* _STDDEF_H or __need_wchar_t. */
+
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0034-fix-segmentation-fault-in-precompiled-header-generat.patch b/meta/recipes-devtools/gcc/gcc-9.2/0034-fix-segmentation-fault-in-precompiled-header-generat.patch
new file mode 100644
index 0000000000..06a3c9f884
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0034-fix-segmentation-fault-in-precompiled-header-generat.patch
@@ -0,0 +1,60 @@
+From aaa896a57b0004a74c1d474e74b21f41147a65cb Mon Sep 17 00:00:00 2001
+From: Juro Bystricky <juro.bystricky@intel.com>
+Date: Mon, 19 Mar 2018 22:31:20 -0700
+Subject: [PATCH 34/36] fix segmentation fault in precompiled header generation
+
+Prevent a segmentation fault which occurs when using incorrect
+structure trying to access name of some named operators, such as
+CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in
+those cases, as is may not be initialized at all.
+
+[YOCTO #11738]
+
+Upstream-Status: Pending
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libcpp/lex.c | 26 +++++++++++++++++++++-----
+ 1 file changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+index eedfcbb3146..15040a1b1f0 100644
+--- a/libcpp/lex.c
++++ b/libcpp/lex.c
+@@ -3280,11 +3280,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token,
+ spell_ident:
+ case SPELL_IDENT:
+ if (forstring)
+- {
+- memcpy (buffer, NODE_NAME (token->val.node.spelling),
+- NODE_LEN (token->val.node.spelling));
+- buffer += NODE_LEN (token->val.node.spelling);
+- }
++ {
++ if (token->type == CPP_NAME)
++ {
++ memcpy (buffer, NODE_NAME (token->val.node.spelling),
++ NODE_LEN (token->val.node.spelling));
++ buffer += NODE_LEN (token->val.node.spelling);
++ break;
++ }
++ /* NAMED_OP, cannot use node.spelling */
++ if (token->flags & NAMED_OP)
++ {
++ const char *str = cpp_named_operator2name (token->type);
++ if (str)
++ {
++ size_t len = strlen(str);
++ memcpy(buffer, str, len);
++ buffer += len;
++ }
++ break;
++ }
++ }
+ else
+ buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node);
+ break;
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0035-Fix-for-testsuite-failure.patch b/meta/recipes-devtools/gcc/gcc-9.2/0035-Fix-for-testsuite-failure.patch
new file mode 100644
index 0000000000..7470cbfcfc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0035-Fix-for-testsuite-failure.patch
@@ -0,0 +1,258 @@
+From 0f9d449c739df03782ce9d29f6b68d9af976a607 Mon Sep 17 00:00:00 2001
+From: RAGHUNATH LOLUR <raghunath.lolur@kpit.com>
+Date: Wed, 6 Dec 2017 22:52:26 -0800
+Subject: [PATCH 35/36] Fix for testsuite failure
+
+2017-11-16 Raghunath Lolur <raghunath.lolur@kpit.com>
+
+ * gcc.dg/pr56275.c: If SSE is disabled, ensure that
+ "-mfpmath" is not set to use SSE. Set "-mfpmath=387".
+ * gcc.dg/pr68306.c: Likewise
+ * gcc.dg/pr68306-2.c: Likewise
+ * gcc.dg/pr68306-3.c: Likewise
+ * gcc.dg/pr69634.c: Likewise
+ * gcc.target/i386/amd64-abi-1.c: Likewise
+ * gcc.target/i386/funcspec-6.c: Likewise
+ * gcc.target/i386/interrupt-387-err-1.c: Likewise
+ * gcc.target/i386/isa-14.c: Likewise
+ * gcc.target/i386/pr44948-2b.c: Likewise
+ * gcc.target/i386/pr53425-1.c: Likewise
+ * gcc.target/i386/pr53425-2.c: Likewise
+ * gcc.target/i386/pr55247.c: Likewise
+ * gcc.target/i386/pr59644.c: Likewise
+ * gcc.target/i386/pr62120.c: Likewise
+ * gcc.target/i386/pr70467-1.c: Likewise
+ * gcc.target/i386/warn-vect-op-1.c: Likewise
+
+If -Wall, -Werror are used during compilation various test cases fail
+to compile.
+
+If SSE is disabled, be sure to -mfpmath=387 to resolve this.
+
+This patch removes the changes to Changelog from the original patch.
+This will help us avoid conflicts.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ gcc/testsuite/gcc.dg/pr56275.c | 2 +-
+ gcc/testsuite/gcc.dg/pr68306-2.c | 2 +-
+ gcc/testsuite/gcc.dg/pr68306-3.c | 2 +-
+ gcc/testsuite/gcc.dg/pr68306.c | 2 +-
+ gcc/testsuite/gcc.dg/pr69634.c | 2 +-
+ gcc/testsuite/gcc.target/i386/amd64-abi-1.c | 2 +-
+ gcc/testsuite/gcc.target/i386/funcspec-6.c | 1 +
+ gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c | 2 +-
+ gcc/testsuite/gcc.target/i386/isa-14.c | 2 +-
+ gcc/testsuite/gcc.target/i386/pr44948-2b.c | 2 +-
+ gcc/testsuite/gcc.target/i386/pr53425-1.c | 2 +-
+ gcc/testsuite/gcc.target/i386/pr53425-2.c | 2 +-
+ gcc/testsuite/gcc.target/i386/pr55247.c | 2 +-
+ gcc/testsuite/gcc.target/i386/pr59644.c | 2 +-
+ gcc/testsuite/gcc.target/i386/pr62120.c | 2 +-
+ gcc/testsuite/gcc.target/i386/pr70467-1.c | 2 +-
+ gcc/testsuite/gcc.target/i386/warn-vect-op-1.c | 2 +-
+ 17 files changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/gcc/testsuite/gcc.dg/pr56275.c b/gcc/testsuite/gcc.dg/pr56275.c
+index b901bb2b199..a4f6c95e1a1 100644
+--- a/gcc/testsuite/gcc.dg/pr56275.c
++++ b/gcc/testsuite/gcc.dg/pr56275.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+-/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
++/* { dg-additional-options "-mno-sse -mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */
+
+ typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long))));
+
+diff --git a/gcc/testsuite/gcc.dg/pr68306-2.c b/gcc/testsuite/gcc.dg/pr68306-2.c
+index 4672ebe7987..2a368c484b6 100644
+--- a/gcc/testsuite/gcc.dg/pr68306-2.c
++++ b/gcc/testsuite/gcc.dg/pr68306-2.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O3" } */
+-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
+
+ struct {
+ int tz_minuteswest;
+diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c
+index f5a8c102cf8..df3390c64c2 100644
+--- a/gcc/testsuite/gcc.dg/pr68306-3.c
++++ b/gcc/testsuite/gcc.dg/pr68306-3.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O3" } */
+-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
+ /* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */
+
+ extern void fn2();
+diff --git a/gcc/testsuite/gcc.dg/pr68306.c b/gcc/testsuite/gcc.dg/pr68306.c
+index 54e5b40f221..0813389e2c1 100644
+--- a/gcc/testsuite/gcc.dg/pr68306.c
++++ b/gcc/testsuite/gcc.dg/pr68306.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O3" } */
+-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
+
+ enum powerpc_pmc_type { PPC_PMC_IBM };
+ struct {
+diff --git a/gcc/testsuite/gcc.dg/pr69634.c b/gcc/testsuite/gcc.dg/pr69634.c
+index 60a56149463..bcc23f9ccd6 100644
+--- a/gcc/testsuite/gcc.dg/pr69634.c
++++ b/gcc/testsuite/gcc.dg/pr69634.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -fno-dce -fschedule-insns -fno-tree-vrp -fcompare-debug -Wno-psabi" } */
+-/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */
++/* { dg-additional-options "-mno-sse -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
+ /* { dg-require-effective-target scheduling } */
+
+ typedef unsigned short u16;
+diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
+index 69fde57bf06..7f1f1c03edf 100644
+--- a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
++++ b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! ia32 } } } */
+-/* { dg-options "-mno-sse" } */
++/* { dg-options "-mno-sse -mfpmath=387" } */
+ /* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */
+
+ double foo(void) { return 0; } /* { dg-error "SSE disabled" } */
+diff --git a/gcc/testsuite/gcc.target/i386/funcspec-6.c b/gcc/testsuite/gcc.target/i386/funcspec-6.c
+index ea896b7ebfd..bf15569b826 100644
+--- a/gcc/testsuite/gcc.target/i386/funcspec-6.c
++++ b/gcc/testsuite/gcc.target/i386/funcspec-6.c
+@@ -1,6 +1,7 @@
+ /* Test whether all of the 64-bit function specific options are accepted
+ without error. */
+ /* { dg-do compile { target { ! ia32 } } } */
++/* { dg-additional-options "-mfpmath=387" } */
+
+ #include "funcspec-56.inc"
+
+diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
+index 8561a3c26d6..6377f814645 100644
+--- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
++++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387" } */
++/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387 -mfpmath=387" } */
+
+ typedef unsigned int uword_t __attribute__ ((mode (__word__)));
+
+diff --git a/gcc/testsuite/gcc.target/i386/isa-14.c b/gcc/testsuite/gcc.target/i386/isa-14.c
+index 5d49e6e77fe..1de2db92bdd 100644
+--- a/gcc/testsuite/gcc.target/i386/isa-14.c
++++ b/gcc/testsuite/gcc.target/i386/isa-14.c
+@@ -1,5 +1,5 @@
+ /* { dg-do run } */
+-/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse" } */
++/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse -mfpmath=387" } */
+
+ extern void abort (void);
+
+diff --git a/gcc/testsuite/gcc.target/i386/pr44948-2b.c b/gcc/testsuite/gcc.target/i386/pr44948-2b.c
+index fa1769b62fb..f79fb12726f 100644
+--- a/gcc/testsuite/gcc.target/i386/pr44948-2b.c
++++ b/gcc/testsuite/gcc.target/i386/pr44948-2b.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic" } */
++/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic -mfpmath=387" } */
+
+ struct A
+ {
+diff --git a/gcc/testsuite/gcc.target/i386/pr53425-1.c b/gcc/testsuite/gcc.target/i386/pr53425-1.c
+index 2e89ff7d81d..6339bf6b736 100644
+--- a/gcc/testsuite/gcc.target/i386/pr53425-1.c
++++ b/gcc/testsuite/gcc.target/i386/pr53425-1.c
+@@ -1,6 +1,6 @@
+ /* PR target/53425 */
+ /* { dg-do compile { target { ! ia32 } } } */
+-/* { dg-options "-O2 -mno-sse" } */
++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
+ /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
+
+ typedef double __v2df __attribute__ ((__vector_size__ (16)));
+diff --git a/gcc/testsuite/gcc.target/i386/pr53425-2.c b/gcc/testsuite/gcc.target/i386/pr53425-2.c
+index 61f6283dbe9..2c5a55f0ac3 100644
+--- a/gcc/testsuite/gcc.target/i386/pr53425-2.c
++++ b/gcc/testsuite/gcc.target/i386/pr53425-2.c
+@@ -1,6 +1,6 @@
+ /* PR target/53425 */
+ /* { dg-do compile { target { ! ia32 } } } */
+-/* { dg-options "-O2 -mno-sse" } */
++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
+ /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
+
+ typedef float __v2sf __attribute__ ((__vector_size__ (8)));
+diff --git a/gcc/testsuite/gcc.target/i386/pr55247.c b/gcc/testsuite/gcc.target/i386/pr55247.c
+index 23366d0909d..9810e3abb76 100644
+--- a/gcc/testsuite/gcc.target/i386/pr55247.c
++++ b/gcc/testsuite/gcc.target/i386/pr55247.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile { target { ! ia32 } } } */
+ /* { dg-require-effective-target maybe_x32 } */
+-/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */
++/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long -mfpmath=387" } */
+
+ typedef unsigned int uint32_t;
+ typedef uint32_t Elf32_Word;
+diff --git a/gcc/testsuite/gcc.target/i386/pr59644.c b/gcc/testsuite/gcc.target/i386/pr59644.c
+index 96006b3e338..4287e4538bf 100644
+--- a/gcc/testsuite/gcc.target/i386/pr59644.c
++++ b/gcc/testsuite/gcc.target/i386/pr59644.c
+@@ -1,6 +1,6 @@
+ /* PR target/59644 */
+ /* { dg-do run { target lp64 } } */
+-/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone" } */
++/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone -mfpmath=387" } */
+
+ /* This test uses __builtin_trap () instead of e.g. abort,
+ because due to -mpreferred-stack-boundary=3 it should not call
+diff --git a/gcc/testsuite/gcc.target/i386/pr62120.c b/gcc/testsuite/gcc.target/i386/pr62120.c
+index bfb8c4703eb..ed04cf181f3 100644
+--- a/gcc/testsuite/gcc.target/i386/pr62120.c
++++ b/gcc/testsuite/gcc.target/i386/pr62120.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-mno-sse" } */
++/* { dg-options "-mno-sse -mfpmath=387" } */
+
+ void foo ()
+ {
+diff --git a/gcc/testsuite/gcc.target/i386/pr70467-1.c b/gcc/testsuite/gcc.target/i386/pr70467-1.c
+index 4e112c88d07..bcfb396a68d 100644
+--- a/gcc/testsuite/gcc.target/i386/pr70467-1.c
++++ b/gcc/testsuite/gcc.target/i386/pr70467-1.c
+@@ -1,6 +1,6 @@
+ /* PR rtl-optimization/70467 */
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mno-sse" } */
++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
+
+ void foo (unsigned long long *);
+
+diff --git a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
+index 6cda1534311..26e37f5b8ba 100644
+--- a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
++++ b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! ia32 } } } */
+-/* { dg-options "-mno-sse -Wvector-operation-performance" } */
++/* { dg-options "-mno-sse -Wvector-operation-performance -mfpmath=387" } */
+ #define vector(elcount, type) \
+ __attribute__((vector_size((elcount)*sizeof(type)))) type
+
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0036-Re-introduce-spe-commandline-options.patch b/meta/recipes-devtools/gcc/gcc-9.2/0036-Re-introduce-spe-commandline-options.patch
new file mode 100644
index 0000000000..4dbcd98945
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0036-Re-introduce-spe-commandline-options.patch
@@ -0,0 +1,41 @@
+From 71e99c2b58a9eb00cdd65a04aeb6fb78227e3297 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Jun 2018 12:10:22 -0700
+Subject: [PATCH 36/36] Re-introduce spe commandline options
+
+This should ensure that we keep accepting
+spe options
+
+Upstream-Status: Inappropriate [SPE port is removed from rs600 port]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/rs6000/rs6000.opt | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
+index f4b5c91e11f..69869350fce 100644
+--- a/gcc/config/rs6000/rs6000.opt
++++ b/gcc/config/rs6000/rs6000.opt
+@@ -345,6 +345,18 @@ mdebug=
+ Target RejectNegative Joined
+ -mdebug= Enable debug output.
+
++mspe
++Target Var(rs6000_spe) Save
++Generate SPE SIMD instructions on E500.
++
++mabi=spe
++Target RejectNegative Var(rs6000_spe_abi) Save
++Use the SPE ABI extensions.
++
++mabi=no-spe
++Target RejectNegative Var(rs6000_spe_abi, 0)
++Do not use the SPE ABI extensions.
++
+ mabi=altivec
+ Target RejectNegative Var(rs6000_altivec_abi) Save
+ Use the AltiVec ABI extensions.
+--
+2.22.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-14250.patch b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-14250.patch
new file mode 100644
index 0000000000..65ea34558a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-14250.patch
@@ -0,0 +1,44 @@
+From 517b211a3d78366ca8d5929f580e8ca72fd2c004 Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 25 Jul 2019 10:46:54 +0000
+Subject: [PATCH] 2019-07-25 Richard Biener <rguenther@suse.de>
+
+ PR lto/90924
+ Backport from mainline
+ 2019-07-12 Ren Kimura <rkx1209dev@gmail.com>
+
+ * simple-object-elf.c (simple_object_elf_match): Check zero value
+ shstrndx.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@273793 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+Affectes: < 9.2
+CVE: CVE-2019-14250
+Dropped changelog
+Signed-off-by: Armin Kuster <Akustre@mvista.com>
+
+---
+ libiberty/simple-object-elf.c | 8 ++++++++
+ 2 files changed, 17 insertions(+)
+
+Index: gcc-9.2.0/libiberty/simple-object-elf.c
+===================================================================
+--- gcc-9.2.0.orig/libiberty/simple-object-elf.c
++++ gcc-9.2.0/libiberty/simple-object-elf.c
+@@ -557,6 +557,14 @@ simple_object_elf_match (unsigned char h
+ return NULL;
+ }
+
++ if (eor->shstrndx == 0)
++ {
++ *errmsg = "invalid ELF shstrndx == 0";
++ *err = 0;
++ XDELETE (eor);
++ return NULL;
++ }
++
+ return (void *) eor;
+ }
+
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_1.patch b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_1.patch
new file mode 100644
index 0000000000..227fd47c95
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_1.patch
@@ -0,0 +1,521 @@
+From 8c61566116d23063ff597271884f8e00d94ab1a1 Mon Sep 17 00:00:00 2001
+From: segher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 30 Aug 2019 13:48:48 +0000
+Subject: [PATCH] Backport from trunk 2019-08-22 Segher Boessenkool
+ <segher@kernel.crashing.org>
+
+ * config/rs6000/altivec.md (unspec): Delete UNSPEC_DARN, UNSPEC_DARN_32,
+ UNSPEC_DARN_RAW, UNSPEC_CMPRB, UNSPEC_CMPRB2, UNSPEC_CMPEQB; move to...
+ * config/rs6000/rs6000.md (unspec): ... here.
+ * config/rs6000/altivec.md (darn_32, darn_raw, darn, cmprb,
+ *cmprb_internal, setb_signed, setb_unsigned, cmprb2, *cmprb2_internal,
+ cmpeqb, *cmpeqb_internal): Delete, move to...
+ * config/rs6000/rs6000.md (darn_32, darn_raw, darn, cmprb,
+ *cmprb_internal, setb_signed, setb_unsigned, cmprb2, *cmprb2_internal,
+ cmpeqb, *cmpeqb_internal): ... here.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@275170 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+CVE: CVE-2019-15847 p1
+Affects <= 9.2.0
+Dropped Changelog changes
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ gcc/config/rs6000/altivec.md | 223 ----------------------------------
+ gcc/config/rs6000/rs6000.md | 224 +++++++++++++++++++++++++++++++++++
+ 3 files changed, 239 insertions(+), 223 deletions(-)
+
+Index: gcc-9.2.0/gcc/config/rs6000/altivec.md
+===================================================================
+--- gcc-9.2.0.orig/gcc/config/rs6000/altivec.md
++++ gcc-9.2.0/gcc/config/rs6000/altivec.md
+@@ -80,9 +80,6 @@
+ UNSPEC_VUPKHPX
+ UNSPEC_VUPKLPX
+ UNSPEC_CONVERT_4F32_8I16
+- UNSPEC_DARN
+- UNSPEC_DARN_32
+- UNSPEC_DARN_RAW
+ UNSPEC_DST
+ UNSPEC_DSTT
+ UNSPEC_DSTST
+@@ -161,9 +158,6 @@
+ UNSPEC_BCDADD
+ UNSPEC_BCDSUB
+ UNSPEC_BCD_OVERFLOW
+- UNSPEC_CMPRB
+- UNSPEC_CMPRB2
+- UNSPEC_CMPEQB
+ UNSPEC_VRLMI
+ UNSPEC_VRLNM
+ ])
+@@ -4101,223 +4095,6 @@
+ "bcd<bcd_add_sub>. %0,%1,%2,%3"
+ [(set_attr "type" "vecsimple")])
+
+-(define_insn "darn_32"
+- [(set (match_operand:SI 0 "register_operand" "=r")
+- (unspec:SI [(const_int 0)] UNSPEC_DARN_32))]
+- "TARGET_P9_MISC"
+- "darn %0,0"
+- [(set_attr "type" "integer")])
+-
+-(define_insn "darn_raw"
+- [(set (match_operand:DI 0 "register_operand" "=r")
+- (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))]
+- "TARGET_P9_MISC && TARGET_64BIT"
+- "darn %0,2"
+- [(set_attr "type" "integer")])
+-
+-(define_insn "darn"
+- [(set (match_operand:DI 0 "register_operand" "=r")
+- (unspec:DI [(const_int 0)] UNSPEC_DARN))]
+- "TARGET_P9_MISC && TARGET_64BIT"
+- "darn %0,1"
+- [(set_attr "type" "integer")])
+-
+-;; Test byte within range.
+-;;
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the range specified by operand 2.
+-;; The bytes of operand 2 are organized as xx:xx:hi:lo.
+-;;
+-;; Return in target register operand 0 a value of 1 if lo <= vv and
+-;; vv <= hi. Otherwise, set register operand 0 to 0.
+-;;
+-;; Though the instructions to which this expansion maps operate on
+-;; 64-bit registers, the current implementation only operates on
+-;; SI-mode operands as the high-order bits provide no information
+-;; that is not already available in the low-order bits. To avoid the
+-;; costs of data widening operations, future enhancements might allow
+-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
+-(define_expand "cmprb"
+- [(set (match_dup 3)
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:SI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPRB))
+- (set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (lt (match_dup 3)
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gt (match_dup 3)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC"
+-{
+- operands[3] = gen_reg_rtx (CCmode);
+-})
+-
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the range specified by operand 2.
+-;; The bytes of operand 2 are organized as xx:xx:hi:lo.
+-;;
+-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if
+-;; lo <= vv and vv <= hi. Otherwise, set the GT bit to 0. The other
+-;; 3 bits of the target CR register are all set to 0.
+-(define_insn "*cmprb_internal"
+- [(set (match_operand:CC 0 "cc_reg_operand" "=y")
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:SI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPRB))]
+- "TARGET_P9_MISC"
+- "cmprb %0,0,%1,%2"
+- [(set_attr "type" "logical")])
+-
+-;; Set operand 0 register to -1 if the LT bit (0x8) of condition
+-;; register operand 1 is on. Otherwise, set operand 0 register to 1
+-;; if the GT bit (0x4) of condition register operand 1 is on.
+-;; Otherwise, set operand 0 to 0. Note that the result stored into
+-;; register operand 0 is non-zero iff either the LT or GT bits are on
+-;; within condition register operand 1.
+-(define_insn "setb_signed"
+- [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (lt (match_operand:CC 1 "cc_reg_operand" "y")
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gt (match_dup 1)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC"
+- "setb %0,%1"
+- [(set_attr "type" "logical")])
+-
+-(define_insn "setb_unsigned"
+- [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (ltu (match_operand:CCUNS 1 "cc_reg_operand" "y")
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gtu (match_dup 1)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC"
+- "setb %0,%1"
+- [(set_attr "type" "logical")])
+-
+-;; Test byte within two ranges.
+-;;
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the range specified by operand 2.
+-;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2.
+-;;
+-;; Return in target register operand 0 a value of 1 if (lo_1 <= vv and
+-;; vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2). Otherwise, set register
+-;; operand 0 to 0.
+-;;
+-;; Though the instructions to which this expansion maps operate on
+-;; 64-bit registers, the current implementation only operates on
+-;; SI-mode operands as the high-order bits provide no information
+-;; that is not already available in the low-order bits. To avoid the
+-;; costs of data widening operations, future enhancements might allow
+-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
+-(define_expand "cmprb2"
+- [(set (match_dup 3)
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:SI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPRB2))
+- (set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (lt (match_dup 3)
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gt (match_dup 3)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC"
+-{
+- operands[3] = gen_reg_rtx (CCmode);
+-})
+-
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the ranges specified by operand 2.
+-;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2.
+-;;
+-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if
+-;; (lo_1 <= vv and vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2).
+-;; Otherwise, set the GT bit to 0. The other 3 bits of the target
+-;; CR register are all set to 0.
+-(define_insn "*cmprb2_internal"
+- [(set (match_operand:CC 0 "cc_reg_operand" "=y")
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:SI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPRB2))]
+- "TARGET_P9_MISC"
+- "cmprb %0,1,%1,%2"
+- [(set_attr "type" "logical")])
+-
+-;; Test byte membership within set of 8 bytes.
+-;;
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the set specified by operand 2.
+-;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7.
+-;;
+-;; Return in target register operand 0 a value of 1 if vv equals one
+-;; of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise, set
+-;; register operand 0 to 0. Note that the 8 byte values held within
+-;; operand 2 need not be unique.
+-;;
+-;; Though the instructions to which this expansion maps operate on
+-;; 64-bit registers, the current implementation requires that operands
+-;; 0 and 1 have mode SI as the high-order bits provide no information
+-;; that is not already available in the low-order bits. To avoid the
+-;; costs of data widening operations, future enhancements might allow
+-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
+-(define_expand "cmpeqb"
+- [(set (match_dup 3)
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:DI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPEQB))
+- (set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (lt (match_dup 3)
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gt (match_dup 3)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC && TARGET_64BIT"
+-{
+- operands[3] = gen_reg_rtx (CCmode);
+-})
+-
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the set specified by operand 2.
+-;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7.
+-;;
+-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if vv
+-;; equals one of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise,
+-;; set the GT bit to zero. The other 3 bits of the target CR register
+-;; are all set to 0.
+-(define_insn "*cmpeqb_internal"
+- [(set (match_operand:CC 0 "cc_reg_operand" "=y")
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:DI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPEQB))]
+- "TARGET_P9_MISC && TARGET_64BIT"
+- "cmpeqb %0,%1,%2"
+- [(set_attr "type" "logical")])
+-
+ (define_expand "bcd<bcd_add_sub>_<code>"
+ [(parallel [(set (reg:CCFP CR6_REGNO)
+ (compare:CCFP
+Index: gcc-9.2.0/gcc/config/rs6000/rs6000.md
+===================================================================
+--- gcc-9.2.0.orig/gcc/config/rs6000/rs6000.md
++++ gcc-9.2.0/gcc/config/rs6000/rs6000.md
+@@ -137,6 +137,12 @@
+ UNSPEC_LSQ
+ UNSPEC_FUSION_GPR
+ UNSPEC_STACK_CHECK
++ UNSPEC_DARN
++ UNSPEC_DARN_32
++ UNSPEC_DARN_RAW
++ UNSPEC_CMPRB
++ UNSPEC_CMPRB2
++ UNSPEC_CMPEQB
+ UNSPEC_ADD_ROUND_TO_ODD
+ UNSPEC_SUB_ROUND_TO_ODD
+ UNSPEC_MUL_ROUND_TO_ODD
+@@ -14322,7 +14328,225 @@
+ "xscmpuqp %0,%1,%2"
+ [(set_attr "type" "veccmp")
+ (set_attr "size" "128")])
++
++;; Miscellaneous ISA 3.0 (power9) instructions
++
++(define_insn "darn_32"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec:SI [(const_int 0)] UNSPEC_DARN_32))]
++ "TARGET_P9_MISC"
++ "darn %0,0"
++ [(set_attr "type" "integer")])
++
++(define_insn "darn_raw"
++ [(set (match_operand:DI 0 "register_operand" "=r")
++ (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))]
++ "TARGET_P9_MISC && TARGET_64BIT"
++ "darn %0,2"
++ [(set_attr "type" "integer")])
++
++(define_insn "darn"
++ [(set (match_operand:DI 0 "register_operand" "=r")
++ (unspec:DI [(const_int 0)] UNSPEC_DARN))]
++ "TARGET_P9_MISC && TARGET_64BIT"
++ "darn %0,1"
++ [(set_attr "type" "integer")])
++
++;; Test byte within range.
++;;
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the range specified by operand 2.
++;; The bytes of operand 2 are organized as xx:xx:hi:lo.
++;;
++;; Return in target register operand 0 a value of 1 if lo <= vv and
++;; vv <= hi. Otherwise, set register operand 0 to 0.
++;;
++;; Though the instructions to which this expansion maps operate on
++;; 64-bit registers, the current implementation only operates on
++;; SI-mode operands as the high-order bits provide no information
++;; that is not already available in the low-order bits. To avoid the
++;; costs of data widening operations, future enhancements might allow
++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
++(define_expand "cmprb"
++ [(set (match_dup 3)
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:SI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPRB))
++ (set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (lt (match_dup 3)
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gt (match_dup 3)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC"
++{
++ operands[3] = gen_reg_rtx (CCmode);
++})
++
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the range specified by operand 2.
++;; The bytes of operand 2 are organized as xx:xx:hi:lo.
++;;
++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if
++;; lo <= vv and vv <= hi. Otherwise, set the GT bit to 0. The other
++;; 3 bits of the target CR register are all set to 0.
++(define_insn "*cmprb_internal"
++ [(set (match_operand:CC 0 "cc_reg_operand" "=y")
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:SI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPRB))]
++ "TARGET_P9_MISC"
++ "cmprb %0,0,%1,%2"
++ [(set_attr "type" "logical")])
++
++;; Set operand 0 register to -1 if the LT bit (0x8) of condition
++;; register operand 1 is on. Otherwise, set operand 0 register to 1
++;; if the GT bit (0x4) of condition register operand 1 is on.
++;; Otherwise, set operand 0 to 0. Note that the result stored into
++;; register operand 0 is non-zero iff either the LT or GT bits are on
++;; within condition register operand 1.
++(define_insn "setb_signed"
++ [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (lt (match_operand:CC 1 "cc_reg_operand" "y")
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gt (match_dup 1)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC"
++ "setb %0,%1"
++ [(set_attr "type" "logical")])
+
++(define_insn "setb_unsigned"
++ [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (ltu (match_operand:CCUNS 1 "cc_reg_operand" "y")
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gtu (match_dup 1)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC"
++ "setb %0,%1"
++ [(set_attr "type" "logical")])
++
++;; Test byte within two ranges.
++;;
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the range specified by operand 2.
++;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2.
++;;
++;; Return in target register operand 0 a value of 1 if (lo_1 <= vv and
++;; vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2). Otherwise, set register
++;; operand 0 to 0.
++;;
++;; Though the instructions to which this expansion maps operate on
++;; 64-bit registers, the current implementation only operates on
++;; SI-mode operands as the high-order bits provide no information
++;; that is not already available in the low-order bits. To avoid the
++;; costs of data widening operations, future enhancements might allow
++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
++(define_expand "cmprb2"
++ [(set (match_dup 3)
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:SI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPRB2))
++ (set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (lt (match_dup 3)
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gt (match_dup 3)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC"
++{
++ operands[3] = gen_reg_rtx (CCmode);
++})
++
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the ranges specified by operand 2.
++;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2.
++;;
++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if
++;; (lo_1 <= vv and vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2).
++;; Otherwise, set the GT bit to 0. The other 3 bits of the target
++;; CR register are all set to 0.
++(define_insn "*cmprb2_internal"
++ [(set (match_operand:CC 0 "cc_reg_operand" "=y")
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:SI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPRB2))]
++ "TARGET_P9_MISC"
++ "cmprb %0,1,%1,%2"
++ [(set_attr "type" "logical")])
++
++;; Test byte membership within set of 8 bytes.
++;;
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the set specified by operand 2.
++;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7.
++;;
++;; Return in target register operand 0 a value of 1 if vv equals one
++;; of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise, set
++;; register operand 0 to 0. Note that the 8 byte values held within
++;; operand 2 need not be unique.
++;;
++;; Though the instructions to which this expansion maps operate on
++;; 64-bit registers, the current implementation requires that operands
++;; 0 and 1 have mode SI as the high-order bits provide no information
++;; that is not already available in the low-order bits. To avoid the
++;; costs of data widening operations, future enhancements might allow
++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
++(define_expand "cmpeqb"
++ [(set (match_dup 3)
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:DI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPEQB))
++ (set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (lt (match_dup 3)
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gt (match_dup 3)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC && TARGET_64BIT"
++{
++ operands[3] = gen_reg_rtx (CCmode);
++})
++
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the set specified by operand 2.
++;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7.
++;;
++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if vv
++;; equals one of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise,
++;; set the GT bit to zero. The other 3 bits of the target CR register
++;; are all set to 0.
++(define_insn "*cmpeqb_internal"
++ [(set (match_operand:CC 0 "cc_reg_operand" "=y")
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:DI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPEQB))]
++ "TARGET_P9_MISC && TARGET_64BIT"
++ "cmpeqb %0,%1,%2"
++ [(set_attr "type" "logical")])
+
+
+ (include "sync.md")
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_2.patch b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_2.patch
new file mode 100644
index 0000000000..de7a83c23f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_2.patch
@@ -0,0 +1,77 @@
+From 87bc784a7ca3a43182f7272241597a50d7491342 Mon Sep 17 00:00:00 2001
+From: segher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 30 Aug 2019 13:51:26 +0000
+Subject: [PATCH] Backport from trunk 2019-08-22 Segher Boessenkool
+ <segher@kernel.crashing.org>
+
+ PR target/91481
+ * config/rs6000/rs6000.md (unspec): Delete UNSPEC_DARN, UNSPEC_DARN_32,
+ and UNSPEC_DARN_RAW.
+ (unspecv): New enumerator values UNSPECV_DARN, UNSPECV_DARN_32, and
+ UNSPECV_DARN_RAW.
+ (darn_32): Use an unspec_volatile, and UNSPECV_DARN_32.
+ (darn_raw): Use an unspec_volatile, and UNSPECV_DARN_RAW.
+ (darn): Use an unspec_volatile, and UNSPECV_DARN.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@275175 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+CVE: CVE-2019-15847 p2
+Affects <= 9.2.0
+Dropped Changelog changes
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ gcc/config/rs6000/rs6000.md | 12 ++++++------
+ 2 files changed, 20 insertions(+), 6 deletions(-)
+
+Index: gcc-9.2.0/gcc/config/rs6000/rs6000.md
+===================================================================
+--- gcc-9.2.0.orig/gcc/config/rs6000/rs6000.md
++++ gcc-9.2.0/gcc/config/rs6000/rs6000.md
+@@ -137,9 +137,6 @@
+ UNSPEC_LSQ
+ UNSPEC_FUSION_GPR
+ UNSPEC_STACK_CHECK
+- UNSPEC_DARN
+- UNSPEC_DARN_32
+- UNSPEC_DARN_RAW
+ UNSPEC_CMPRB
+ UNSPEC_CMPRB2
+ UNSPEC_CMPEQB
+@@ -170,6 +167,9 @@
+ UNSPECV_EH_RR ; eh_reg_restore
+ UNSPECV_ISYNC ; isync instruction
+ UNSPECV_MFTB ; move from time base
++ UNSPECV_DARN ; darn 1 (deliver a random number)
++ UNSPECV_DARN_32 ; darn 2
++ UNSPECV_DARN_RAW ; darn 0
+ UNSPECV_NLGR ; non-local goto receiver
+ UNSPECV_MFFS ; Move from FPSCR
+ UNSPECV_MFFSL ; Move from FPSCR light instruction version
+@@ -14333,21 +14333,21 @@
+
+ (define_insn "darn_32"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+- (unspec:SI [(const_int 0)] UNSPEC_DARN_32))]
++ (unspec_volatile:SI [(const_int 0)] UNSPECV_DARN_32))]
+ "TARGET_P9_MISC"
+ "darn %0,0"
+ [(set_attr "type" "integer")])
+
+ (define_insn "darn_raw"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+- (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))]
++ (unspec_volatile:DI [(const_int 0)] UNSPECV_DARN_RAW))]
+ "TARGET_P9_MISC && TARGET_64BIT"
+ "darn %0,2"
+ [(set_attr "type" "integer")])
+
+ (define_insn "darn"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+- (unspec:DI [(const_int 0)] UNSPEC_DARN))]
++ (unspec_volatile:DI [(const_int 0)] UNSPECV_DARN))]
+ "TARGET_P9_MISC && TARGET_64BIT"
+ "darn %0,1"
+ [(set_attr "type" "integer")])
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_3.patch b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_3.patch
new file mode 100644
index 0000000000..ba7130ca7d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_3.patch
@@ -0,0 +1,62 @@
+From dc4c8dd9dbe70740ec7a684b0f35620249fb036a Mon Sep 17 00:00:00 2001
+From: segher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 30 Aug 2019 13:53:11 +0000
+Subject: [PATCH] Backport from trunk 2019-08-23 Segher Boessenkool
+ <segher@kernel.crashing.org>
+
+gcc/testsuite/
+ PR target/91481
+ * gcc.target/powerpc/darn-3.c: New testcase.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@275176 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+CVE: CVE-2019-15847 p3
+Affects <= 9.2.0
+Dropped Changelog changes
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ gcc/testsuite/ChangeLog | 6 ++++++
+ gcc/testsuite/gcc.target/powerpc/darn-3.c | 16 ++++++++++++++++
+ 2 files changed, 22 insertions(+)
+ create mode 100644 gcc/testsuite/gcc.target/powerpc/darn-3.c
+
+Index: gcc-9.2.0/gcc/testsuite/gcc.target/powerpc/darn-3.c
+===================================================================
+--- /dev/null
++++ gcc-9.2.0/gcc/testsuite/gcc.target/powerpc/darn-3.c
+@@ -0,0 +1,16 @@
++/* { dg-do compile { target { powerpc*-*-* } } } */
++/* { dg-skip-if "" { powerpc*-*-aix* } } */
++/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
++
++static int darn32(void) { return __builtin_darn_32(); }
++
++int four(void)
++{
++ int sum = 0;
++ int i;
++ for (i = 0; i < 4; i++)
++ sum += darn32();
++ return sum;
++}
++
++/* { dg-final { scan-assembler-times {(?n)\mdarn .*,0\M} 4 } } */
+Index: gcc-9.2.0/gcc/testsuite/ChangeLog
+===================================================================
+--- gcc-9.2.0.orig/gcc/testsuite/ChangeLog
++++ gcc-9.2.0/gcc/testsuite/ChangeLog
+@@ -1,3 +1,11 @@
++2019-08-30 Segher Boessenkool <segher@kernel.crashing.org>
++
++ Backport from trunk
++ 2019-08-23 Segher Boessenkool <segher@kernel.crashing.org>
++
++ PR target/91481
++ * gcc.target/powerpc/darn-3.c: New testcase.
++
+ 2019-08-12 Release Manager
+
+ * GCC 9.2.0 released.
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index f540b4d965..44cba287f3 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -5,40 +5,44 @@ LICENSE = "GPL"
NATIVEDEPS = ""
+CVE_PRODUCT = "gcc"
+
inherit autotools gettext texinfo
BPN = "gcc"
+COMPILERDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}gcc:do_gcc_stash_builddir"
+COMPILERDEP_class-nativesdk = "virtual/${TARGET_PREFIX}gcc-crosssdk:do_gcc_stash_builddir"
+
+python extract_stashed_builddir () {
+ src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}")
+ dest = d.getVar("B")
+ oe.path.copyhardlinktree(src, dest)
+ staging_processfixme([src + "/fixmepath"], dest, d.getVar("RECIPE_SYSROOT"), d.getVar("RECIPE_SYSROOT_NATIVE"), d)
+}
def get_gcc_float_setting(bb, d):
- if d.getVar('ARMPKGSFX_EABI', True) == "hf" and d.getVar('TRANSLATED_TARGET_ARCH', True) == "arm":
+ if d.getVar('ARMPKGSFX_EABI') == "hf" and d.getVar('TRANSLATED_TARGET_ARCH') == "arm":
return "--with-float=hard"
- if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
+ if d.getVar('TARGET_FPU') in [ 'soft' ]:
return "--with-float=soft"
- if d.getVar('TARGET_FPU', True) in [ 'ppc-efd' ]:
+ if d.getVar('TARGET_FPU') in [ 'ppc-efd' ]:
return "--enable-e500_double"
return ""
get_gcc_float_setting[vardepvalue] = "${@get_gcc_float_setting(bb, d)}"
def get_gcc_mips_plt_setting(bb, d):
- if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'mips', 'mipsel' ] and bb.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d):
+ if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'mips', 'mipsel' ] and bb.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d):
return "--with-mips-plt"
return ""
def get_gcc_ppc_plt_settings(bb, d):
- if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc' ] and not bb.utils.contains('DISTRO_FEATURES', 'bssplt', True, False, d):
+ if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and not bb.utils.contains('DISTRO_FEATURES', 'bssplt', True, False, d):
return "--enable-secureplt"
return ""
-def get_long_double_setting(bb, d):
- if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC', True) in [ 'uclibc', 'glibc' ]:
- return "--with-long-double-128"
- else:
- return "--without-long-double-128"
- return ""
-
def get_gcc_multiarch_setting(bb, d):
- target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
+ target_arch = d.getVar('TRANSLATED_TARGET_ARCH')
multiarch_options = {
"i586": "--enable-targets=all",
"i686": "--enable-targets=all",
@@ -54,26 +58,25 @@ def get_gcc_multiarch_setting(bb, d):
# this is used by the multilib setup of gcc
def get_tune_parameters(tune, d):
- availtunes = d.getVar('AVAILTUNES', True)
+ availtunes = d.getVar('AVAILTUNES')
if tune not in availtunes.split():
bb.error('The tune: %s is not one of the available tunes: %s' % (tune or None, availtunes))
localdata = bb.data.createCopy(d)
override = ':tune-' + tune
localdata.setVar('OVERRIDES', localdata.getVar('OVERRIDES', False) + override)
- bb.data.update_data(localdata)
retdict = {}
retdict['tune'] = tune
- retdict['ccargs'] = localdata.getVar('TUNE_CCARGS', True)
- retdict['features'] = localdata.getVar('TUNE_FEATURES', True)
+ retdict['ccargs'] = localdata.getVar('TUNE_CCARGS')
+ retdict['features'] = localdata.getVar('TUNE_FEATURES')
# BASELIB is used by the multilib code to change library paths
- retdict['baselib'] = localdata.getVar('BASE_LIB', True) or localdata.getVar('BASELIB', True)
- retdict['arch'] = localdata.getVar('TUNE_ARCH', True)
- retdict['abiextension'] = localdata.getVar('ABIEXTENSION', True)
- retdict['target_fpu'] = localdata.getVar('TARGET_FPU', True)
- retdict['pkgarch'] = localdata.getVar('TUNE_PKGARCH', True)
- retdict['package_extra_archs'] = localdata.getVar('PACKAGE_EXTRA_ARCHS', True)
+ retdict['baselib'] = localdata.getVar('BASE_LIB') or localdata.getVar('BASELIB')
+ retdict['arch'] = localdata.getVar('TUNE_ARCH')
+ retdict['abiextension'] = localdata.getVar('ABIEXTENSION')
+ retdict['target_fpu'] = localdata.getVar('TARGET_FPU')
+ retdict['pkgarch'] = localdata.getVar('TUNE_PKGARCH')
+ retdict['package_extra_archs'] = localdata.getVar('PACKAGE_EXTRA_ARCHS')
return retdict
get_tune_parameters[vardepsexclude] = "AVAILTUNES TUNE_CCARGS OVERRIDES TUNE_FEATURES BASE_LIB BASELIB TUNE_ARCH ABIEXTENSION TARGET_FPU TUNE_PKGARCH PACKAGE_EXTRA_ARCHS"
@@ -94,6 +97,7 @@ gcclibdir = "${libdir}/gcc"
BINV = "${PV}"
#S = "${WORKDIR}/gcc-${PV}"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
target_includedir ?= "${includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index b374c30acb..24ba8ce75f 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -5,30 +5,26 @@ require gcc-shared-source.inc
#
# These can be overridden by the version specific .inc file.
-# Java (gcj doesn't work on all architectures)
-JAVA ?= ",java"
-JAVA_arm ?= ""
-JAVA_armeb ?= ""
-JAVA_mipsel ?= ""
-JAVA_sh3 ?= ""
# gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
FORTRAN ?= ",f77"
-LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
+LANGUAGES ?= "c,c++${FORTRAN}"
EXTRA_OECONF_BASE ?= ""
EXTRA_OECONF_PATHS ?= ""
-EXTRA_OECONF_INITIAL ?= ""
GCCMULTILIB ?= "--disable-multilib"
GCCTHREADS ?= "posix"
+GCCPIE ??= ""
+
EXTRA_OECONF = "\
- ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
+ ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \
--with-gnu-ld \
--enable-shared \
--enable-languages=${LANGUAGES} \
--enable-threads=${GCCTHREADS} \
${GCCMULTILIB} \
+ ${GCCPIE} \
--enable-c99 \
--enable-long-long \
--enable-symvers=gnu \
@@ -40,10 +36,13 @@ EXTRA_OECONF = "\
${EXTRA_OECONF_PATHS} \
${@get_gcc_mips_plt_setting(bb, d)} \
${@get_gcc_ppc_plt_settings(bb, d)} \
- ${@get_long_double_setting(bb, d)} \
${@get_gcc_multiarch_setting(bb, d)} \
"
+# glibc version is a minimum controlling whether features are enabled.
+# Doesn't need to track glibc exactly
+EXTRA_OECONF_append_libc-glibc = " --with-glibc-version=2.28 "
+
# Set this here since GCC configure won't auto-detect and enable
# initfini-arry when cross compiling.
EXTRA_OECONF_append = " --enable-initfini-array"
@@ -53,22 +52,16 @@ export gcc_cv_collect2_libs = 'none required'
# in the config.log files (which might not get generated until do_compile
# hence being missed by the insane do_configure check).
-# Build uclibc compilers without cxa_atexit support
EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
-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
-# compatible architecture. armv6 and armv7a cover the minimum tune
-# features used in OE.
-EXTRA_OECONF_append_armv6 = " --with-arch=armv6"
-EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a"
-EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"
+EXTRA_OECONF_append_mipsisa32r6el = " --with-abi=32 --with-arch=mips32r6"
+EXTRA_OECONF_append_mipsisa32r6 = " --with-abi=32 --with-arch=mips32r6"
+EXTRA_OECONF_append_mipsisa64r6el = " --with-abi=64 --with-arch-64=mips64r6"
+EXTRA_OECONF_append_mipsisa64r6 = " --with-abi=64 --with-arch-64=mips64r6"
EXTRA_OECONF_GCC_FLOAT ??= ""
CPPFLAGS = ""
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index ec1d281800..f14cbf7152 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -3,7 +3,7 @@ inherit cross-canadian
SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc nativesdk-gettext flex-native virtual/libc"
GCCMULTILIB = "--enable-multilib"
@@ -60,11 +60,9 @@ do_configure () {
do_compile () {
oe_runmake all-host configure-target-libgcc
+ (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
}
-# Having anything auto depending on gcc-cross-sdk is a really bad idea...
-EXCLUDE_FROM_SHLIBS = "1"
-
PACKAGES = "${PN}-dbg ${PN} ${PN}-doc"
FILES_${PN} = "\
@@ -80,7 +78,7 @@ FILES_${PN} = "\
${includedir}/c++/${BINV} \
${prefix}/${TARGET_SYS}/bin/* \
${prefix}/${TARGET_SYS}/lib/* \
- ${prefix}/${TARGET_SYS}/usr/include/* \
+ ${prefix}/${TARGET_SYS}${target_includedir}/* \
"
INSANE_SKIP_${PN} += "dev-so"
@@ -96,7 +94,7 @@ EXEEXT = ""
BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
do_install () {
- ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h )
+ ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
oe_runmake 'DESTDIR=${D}' install-host
# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
@@ -153,20 +151,14 @@ ELFUTILS = "nativesdk-elfutils"
DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib"
RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
-SYSTEMHEADERS = "/usr/include"
+SYSTEMHEADERS = "${target_includedir}/"
SYSTEMLIBS = "${target_base_libdir}/"
SYSTEMLIBS1 = "${target_libdir}/"
EXTRA_OECONF += "--enable-poison-system-directories"
-
-EXTRA_OECONF += "\
- --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
- --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix} \
-"
-
-EXTRA_OECONF_append_libc-baremetal = " --without-headers"
-EXTRA_OECONF_remove_libc-baremetal = "--with-sysroot=/not/exist"
-EXTRA_OECONF_remove_libc-baremetal = "--with-build-sysroot=${STAGING_DIR_TARGET}"
-
+EXTRA_OECONF_remove_elf = "--with-sysroot=/not/exist"
+EXTRA_OECONF_remove_eabi = "--with-sysroot=/not/exist"
+EXTRA_OECONF_append_elf = "--without-headers --with-newlib"
+EXTRA_OECONF_append_eabi = "--without-headers --with-newlib"
# gcc 4.7 needs -isystem
export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET} -isystem=${target_includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_6.2.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_6.2.bb
deleted file mode 100644
index bf53c5cd78..0000000000
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian_6.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross-canadian.inc
-
-
-
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_9.2.bb
index bf53c5cd78..bf53c5cd78 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_9.2.bb
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
deleted file mode 100644
index dcf22710ae..0000000000
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ /dev/null
@@ -1,100 +0,0 @@
-DEPENDS = "virtual/${TARGET_PREFIX}binutils ${NATIVEDEPS}"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
-PACKAGES = ""
-
-INHIBIT_AUTOTOOLS_DEPS = "1"
-INHIBIT_DEFAULT_DEPS = "1"
-
-# We still need gnu-config-native
-DEPENDS_prepend = "gnu-config-native autoconf-native "
-
-PN = "gcc-cross-initial-${TARGET_ARCH}"
-
-CROSS_TARGET_SYS_DIR_append = ".${PN}"
-
-# This is intended to be a -very- basic config
-# sysroot is needed in case we use libc-initial
-EXTRA_OECONF = "\
- --with-newlib \
- --without-headers \
- --disable-shared \
- --disable-threads \
- --disable-multilib \
- --disable-__cxa_atexit \
- --enable-languages=c \
- --program-prefix=${TARGET_PREFIX} \
- --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)} \
- ${EXTRA_OECONF_GCC_FLOAT} \
- ${@get_gcc_ppc_plt_settings(bb, d)} \
-"
-
-EXTRA_OECONF += "--with-native-system-header-dir=${SYSTEMHEADERS}"
-
-GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot"
-
-do_configure_prepend () {
- sysr=${GCCCROSS_BUILDSYSROOT}${target_includedir}
- mkdir -p $sysr
- for t in linux asm asm-generic; do
- rm -f $sysr/$t
- ln -s ${STAGING_DIR_TARGET}${target_includedir}/$t $sysr/
- done
-}
-
-do_compile () {
- oe_runmake all-gcc configure-target-libgcc
-}
-do_install () {
- ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h )
- oe_runmake 'DESTDIR=${D}' install-gcc
-
- # We don't really need this (here shares/ contains man/, info/, locale/).
- rm -rf ${D}${datadir}/
-
- # We use libiberty from binutils
- find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
- find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
-
- # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
- # found. These need to be relative paths so they work in different locations.
- dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
- install -d $dest
- useld=${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '.bfd', '', d)}
- ln -sf ${BINRELPATH}/${TARGET_PREFIX}ld${useld} ${dest}ld
- for t in ar as nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
- ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
- done
- # fixed limits.h infact includes the so called real limits.h
- # which should come from libc but when we build libc-initial
- # then bunch of configure tests include fixed limits.h which in turn
- # includes real limits.h but this real limits.h is not staged yet
- # so we overwirte the generated include-fixed/limits.h for gcc-cross-initial
- # to get rid references to real limits.h
- cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include/limits.h
-
- # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
- case ${PN} in
- *gcc-cross-initial-${TARGET_ARCH}|*gcc-crosssdk-initial-${SDK_SYS})
- dest=${D}/${includedir}/gcc-build-internal-initial-${TARGET_SYS}
- hardlinkdir . $dest
- ;;
- esac
-}
-#
-# Override the default sysroot staging copy since this won't look like a target system
-#
-sysroot_stage_all() {
- sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
- install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/
- install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/
- mv ${SYSROOT_DESTDIR}${target_base_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/ || true
- mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true
-}
-
-do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/"
-do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/"
-
-inherit nopackages
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb b/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb
deleted file mode 100644
index 4c73e5ce61..0000000000
--- a/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-cross-initial.inc
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial_6.2.bb b/meta/recipes-devtools/gcc/gcc-cross-initial_6.2.bb
deleted file mode 100644
index 4c73e5ce61..0000000000
--- a/meta/recipes-devtools/gcc/gcc-cross-initial_6.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-cross-initial.inc
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 87a8de9a85..c68cdd5dc4 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -2,15 +2,18 @@ inherit cross
INHIBIT_DEFAULT_DEPS = "1"
EXTRADEPENDS = ""
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}"
+DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
python () {
- if d.getVar("TARGET_OS", True).startswith("linux"):
+ if d.getVar("TARGET_OS").startswith("linux"):
d.setVar("EXTRADEPENDS", "linux-libc-headers")
}
PN = "gcc-cross-${TARGET_ARCH}"
+# Ignore how TARGET_ARCH is computed.
+TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}"
+
require gcc-configure-common.inc
# While we want the 'gnu' hash style, we explicitly set it to sysv here to
@@ -25,13 +28,12 @@ EXTRA_OECONF_append_sh4 = " \
"
EXTRA_OECONF += "\
- --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
--with-system-zlib \
"
-DEPENDS_remove_libc-baremetal := "virtual/${TARGET_PREFIX}libc-for-gcc"
EXTRA_OECONF_append_libc-baremetal = " --without-headers"
EXTRA_OECONF_remove_libc-baremetal = "--enable-threads=posix"
+EXTRA_OECONF_remove_libc-newlib = "--enable-threads=posix"
EXTRA_OECONF_PATHS = "\
--with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
@@ -41,6 +43,12 @@ EXTRA_OECONF_PATHS = "\
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
+
+do_configure_prepend () {
+ install -d ${RECIPE_SYSROOT}${target_includedir}
+ touch ${RECIPE_SYSROOT}${target_includedir}/limits.h
+}
+
do_compile () {
export CC="${BUILD_CC}"
export AR_FOR_TARGET="${TARGET_SYS}-ar"
@@ -53,97 +61,22 @@ do_compile () {
export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
- oe_runmake all-host configure-target-libgcc
- # now generate script to drive testing
- echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc
- set >> ${B}/${TARGET_PREFIX}testgcc
- # prune out the unneeded vars
- sed -i -e "/^BASH/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^USER/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^OPT/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^DIRSTACK/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^EUID/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^FUNCNAME/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^GROUPS/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^HOST/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^HOME/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^IFS/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^LC_ALL/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^LOGNAME/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^MACHTYPE/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^OSTYPE/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^PIPE/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^SHELL/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^'/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^UID/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^TERM/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^PKG_/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^POSIXLY_/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^PPID/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^PS4/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^Q/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^SHLVL/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^STAGING/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${TARGET_PREFIX}testgcc
- sed -i -e "/^PSEUDO/d" ${B}/${TARGET_PREFIX}testgcc
-
- # append execution part of the script
-cat >> ${B}/${TARGET_PREFIX}testgcc << STOP
-target="\$1"
-usage () {
- echo "Usage:"
- echo "\$0 user@target 'extra options to dejagnu'"
- echo "\$0 target 'extra options to dejagnu'"
- echo "\$0 target"
- echo "e.g. \$0 192.168.7.2 ' dg.exp=visibility-d.c'"
- echo "will only run visibility-d.c test case"
- echo "e.g. \$0 192.168.7.2 '/-mthumb dg.exp=visibility-d.c'"
- echo "will only run visibility-d.c test case in thumb mode"
- echo "You need to have dejagnu autogen expect installed"
- echo "on the build host"
- }
-if [ "x\$target" = "x" ]
-then
- echo "Please specify the target machine and remote user in form of user@target\n"
- usage
- exit 1;
-fi
-
-shift
-
-echo "\$target" | grep "@" 2>&1 > /dev/null
-if [ "x\$?" = "x0" ]
-then
- user=\$(echo \$target | cut -d '@' -f 1)
- target=\$(echo \$target | cut -d '@' -f 2)
-else
- user=\$USER
-fi
-ssh \$user@\$target date 2>&1 > /dev/null
-if [ "x\$?" != "x0" ]
-then
- echo "Failed connecting to \$user@\$target it could be because"
- echo "you don't have passwordless ssh setup to access \$target"
- echo "or sometimes host key has been changed"
- echo "in such case do something like below on build host"
- echo "ssh-keygen -f "~/.ssh/known_hosts" -R \$target"
- echo "and then try ssh \$user@\$target"
-
- usage
- exit 1
-fi
- echo "lappend boards_dir [pwd]/../../.." > ${B}/site.exp
- echo "load_generic_config \"unix\"" > ${B}/${PACKAGE_ARCH}.exp
- echo "set_board_info username \$user" >> ${B}/${PACKAGE_ARCH}.exp
- echo "set_board_info rsh_prog ssh" >> ${B}/${PACKAGE_ARCH}.exp
- echo "set_board_info rcp_prog scp" >> ${B}/${PACKAGE_ARCH}.exp
- echo "set_board_info hostname \$target" >> ${B}/${PACKAGE_ARCH}.exp
- DEJAGNU=${B}/site.exp make -k check RUNTESTFLAGS="--target_board=${PACKAGE_ARCH}\$@"
-
-STOP
-
- chmod +x ${B}/${TARGET_PREFIX}testgcc
+ # Prevent native/host sysroot path from being used in configargs.h header,
+ # as it will be rewritten when used by other sysroots preventing support
+ # for gcc plugins
+ oe_runmake configure-gcc
+ sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h
+ sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h
+
+ # Prevent sysroot/workdir paths from being used in checksum-options.
+ # checksum-options is used to generate a checksum which is embedded into
+ # the output binary.
+ oe_runmake TARGET-gcc=checksum-options all-gcc
+ sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
+ sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/checksum-options
+ oe_runmake all-host configure-target-libgcc
+ (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
}
INHIBIT_PACKAGE_STRIP = "1"
@@ -152,22 +85,24 @@ INHIBIT_PACKAGE_STRIP = "1"
BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
do_install () {
- ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h )
+ ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
oe_runmake 'DESTDIR=${D}' install-host
install -d ${D}${target_base_libdir}
install -d ${D}${target_libdir}
-
+
# Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
# gfortran is fully backwards compatible. This is a safe and practical solution.
- ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
+ if [ -n "${@d.getVar('FORTRAN')}" ]; then
+ ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
+ fortsymlinks="g77 gfortran"
+ fi
-
# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
# found. These need to be relative paths so they work in different locations.
dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
install -d $dest
- for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
+ for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip gcc cpp $fortsymlinks; do
ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t
done
@@ -186,13 +121,7 @@ do_install () {
find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
- # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
- case ${PN} in
- *gcc-cross-${TARGET_ARCH}|*gcc-crosssdk-${SDK_SYS})
- dest=${D}/${includedir}/gcc-build-internal-${TARGET_SYS}
- hardlinkdir . $dest
- ;;
- esac
+ find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
}
do_package[noexec] = "1"
@@ -200,3 +129,32 @@ do_packagedata[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_rpm[noexec] = "1"
do_package_write_deb[noexec] = "1"
+
+inherit chrpath
+
+python gcc_stash_builddir_fixrpaths() {
+ # rewrite rpaths, breaking hardlinks as required
+ process_dir("/", d.getVar("BUILDDIRSTASH"), d, break_hardlinks = True)
+}
+
+BUILDDIRSTASH = "${WORKDIR}/stashed-builddir/build"
+do_gcc_stash_builddir[dirs] = "${B}"
+do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}"
+do_gcc_stash_builddir[postfuncs] += "gcc_stash_builddir_fixrpaths"
+do_gcc_stash_builddir () {
+ dest=${BUILDDIRSTASH}
+ hardlinkdir . $dest
+ # Makefile does move-if-change which can end up with 'timestamp' as file contents so break links to those files
+ rm $dest/gcc/include/*.h
+ cp gcc/include/*.h $dest/gcc/include/
+}
+addtask do_gcc_stash_builddir after do_compile before do_install
+SSTATETASKS += "do_gcc_stash_builddir"
+do_gcc_stash_builddir[sstate-inputdirs] = "${BUILDDIRSTASH}"
+do_gcc_stash_builddir[sstate-outputdirs] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}"
+do_gcc_stash_builddir[sstate-fixmedir] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}"
+
+python do_gcc_stash_builddir_setscene () {
+ sstate_setscene(d)
+}
+addtask do_gcc_stash_builddir_setscene
diff --git a/meta/recipes-devtools/gcc/gcc-cross_6.2.bb b/meta/recipes-devtools/gcc/gcc-cross_6.2.bb
deleted file mode 100644
index b43cca0c52..0000000000
--- a/meta/recipes-devtools/gcc/gcc-cross_6.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross.inc
-
diff --git a/meta/recipes-devtools/gcc/gcc-cross_5.4.bb b/meta/recipes-devtools/gcc/gcc-cross_9.2.bb
index b43cca0c52..b43cca0c52 100644
--- a/meta/recipes-devtools/gcc/gcc-cross_5.4.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross_9.2.bb
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc b/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
deleted file mode 100644
index 08eda5d4c7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-inherit crosssdk
-
-PN = "gcc-crosssdk-initial-${SDK_SYS}"
-
-SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
-SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
-SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native ${NATIVEDEPS}"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial-crosssdk"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb
deleted file mode 100644
index fd90e1140f..0000000000
--- a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
-require gcc-crosssdk-initial.inc
-
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.2.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.2.bb
deleted file mode 100644
index fd90e1140f..0000000000
--- a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
-require gcc-crosssdk-initial.inc
-
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk.inc b/meta/recipes-devtools/gcc/gcc-crosssdk.inc
index cda2927794..bd2e71d63f 100644
--- a/meta/recipes-devtools/gcc/gcc-crosssdk.inc
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk.inc
@@ -8,5 +8,5 @@ SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
GCCMULTILIB = "--disable-multilib"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk virtual/nativesdk-${TARGET_PREFIX}libc-for-gcc gettext-native ${NATIVEDEPS}"
+DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native ${NATIVEDEPS}"
PROVIDES = "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/${TARGET_PREFIX}g++-crosssdk"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk_6.2.bb b/meta/recipes-devtools/gcc/gcc-crosssdk_6.2.bb
deleted file mode 100644
index 40a6c4feff..0000000000
--- a/meta/recipes-devtools/gcc/gcc-crosssdk_6.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-crosssdk.inc
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb b/meta/recipes-devtools/gcc/gcc-crosssdk_9.2.bb
index 40a6c4feff..40a6c4feff 100644
--- a/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk_9.2.bb
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index a0a2ac09a7..31b8619be3 100644
--- a/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -21,8 +21,8 @@ python gcc_multilib_setup() {
import shutil
import glob
- srcdir = d.getVar('S', True)
- builddir = d.getVar('B', True)
+ srcdir = d.getVar('S')
+ builddir = d.getVar('B')
src_conf_dir = '%s/gcc/config' % srcdir
build_conf_dir = '%s/gcc/config' % builddir
@@ -43,12 +43,12 @@ python gcc_multilib_setup() {
bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir))
bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path))
- pn = d.getVar('PN', True)
- multilibs = (d.getVar('MULTILIB_VARIANTS', True) or '').split()
+ pn = d.getVar('PN')
+ multilibs = (d.getVar('MULTILIB_VARIANTS') or '').split()
if not multilibs and pn != "nativesdk-gcc":
return
- mlprefix = d.getVar('MLPREFIX', True)
+ mlprefix = d.getVar('MLPREFIX')
if ('%sgcc' % mlprefix) != pn and (not pn.startswith('gcc-cross-canadian')) and pn != "nativesdk-gcc":
return
@@ -155,10 +155,10 @@ python gcc_multilib_setup() {
libdirn32 = 'SYSTEMLIBS_DIR'
- target_arch = (d.getVar('TARGET_ARCH_MULTILIB_ORIGINAL', True) if mlprefix
- else d.getVar('TARGET_ARCH', True))
+ target_arch = (d.getVar('TARGET_ARCH_MULTILIB_ORIGINAL') if mlprefix
+ else d.getVar('TARGET_ARCH'))
if pn == "nativesdk-gcc":
- header_config_files = gcc_header_config_files[d.getVar("SDK_ARCH", True)]
+ header_config_files = gcc_header_config_files[d.getVar("SDK_ARCH")]
write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32)
return
@@ -188,7 +188,7 @@ python gcc_multilib_setup() {
optsets = []
for ml in ml_list:
- tune = d.getVar(ml, True)
+ tune = d.getVar(ml)
if not tune:
bb.warn("%s doesn't have a corresponding tune. Skipping..." % ml)
continue
@@ -212,7 +212,7 @@ python gcc_multilib_setup() {
# take out '-' mcpu='s and march='s from parameters
opts = []
- whitelist = (d.getVar("MULTILIB_OPTION_WHITELIST", True) or "").split()
+ whitelist = (d.getVar("MULTILIB_OPTION_WHITELIST") or "").split()
for i in d.expand(tune_parameters['ccargs']).split():
if i in whitelist:
# Need to strip '-' from option
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 9791e21434..d3f8ae8b9b 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -15,54 +15,79 @@ EXTRA_OECONF_PATHS = "\
"
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
+EXTRA_OECONF_append = " --cache-file=${B}/config.cache"
+
+# Disable ifuncs for libatomic on arm conflicts -march/-mcpu
+EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "
+
+# Building with thumb enabled on armv6t fails
+ARM_INSTRUCTION_SET_armv6 = "arm"
RUNTIMELIBITM = "libitm"
-RUNTIMELIBITM_mips = ""
-RUNTIMELIBITM_mipsel = ""
-RUNTIMELIBITM_mips64 = ""
-RUNTIMELIBITM_mips64el = ""
+RUNTIMELIBITM_arc = ""
+RUNTIMELIBITM_mipsarch = ""
RUNTIMELIBITM_nios2 = ""
RUNTIMELIBITM_microblaze = ""
+RUNTIMELIBITM_riscv32 = ""
+RUNTIMELIBITM_riscv64 = ""
+RUNTIMELIBSSP ?= ""
+RUNTIMELIBSSP_mingw32 ?= "libssp"
-RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
+RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
"
-# ?
# libiberty
# libmudflap
# libgfortran needs separate recipe due to libquadmath dependency
+SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
+DEBUG_PREFIX_MAP_class-target = " \
+ -fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \
+ -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
+ -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \
+ -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \
+ -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \
+ -fdebug-prefix-map=${B}=${SLIB_NEW} \
+ "
+
do_configure () {
export CXX="${CXX} -nostdinc++ -nostdlib++"
- mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
- hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
- rm -rf ${B}/$target/$d/
- mkdir -p ${B}/$target/$d/
- cd ${B}/$target/$d/
+ rm -rf ${B}/${TARGET_SYS}/$d/
+ mkdir -p ${B}/${TARGET_SYS}/$d/
+ cd ${B}/${TARGET_SYS}/$d/
chmod a+x ${S}/$d/configure
- relpath=${@os.path.relpath("${S}/$d", "${B}/$target/$d")}
+ relpath=${@os.path.relpath("${S}/$d", "${B}/${TARGET_SYS}/$d")}
$relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+ if [ "$d" = "libgcc" ]; then
+ (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
+ fi
done
}
+EXTRACONFFUNCS += "extract_stashed_builddir"
+do_configure[depends] += "${COMPILERDEP}"
do_compile () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
for d in libgcc ${RUNTIMETARGET}; do
- cd ${B}/$target/$d/
- oe_runmake MULTIBUILDTOP=${B}/$target/$d/
+ cd ${B}/${TARGET_SYS}/$d/
+ oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/
done
}
do_install () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
for d in ${RUNTIMETARGET}; do
- cd ${B}/$target/$d/
- oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+ cd ${B}/${TARGET_SYS}/$d/
+ oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install
done
+ if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then
+ install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include
+ mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include
+ rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include
+ fi
rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir
rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
@@ -72,10 +97,6 @@ do_install () {
if [ -d ${D}${infodir} ]; then
rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
fi
- if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
- ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
- fi
-
}
do_install_append_class-target () {
@@ -84,18 +105,35 @@ do_install_append_class-target () {
fi
if [ "${TARGET_OS}" = "linux-gnun32" ]; then
- if [ "${MULTILIBS}" != "" ]; then
- mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux
- ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux/32
+ if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32
+ elif [ "${MULTILIB_VARIANTS}" != "" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
+ else
+ ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ fi
+ elif [ "${TARGET_OS}" = "linux-gnux32" ]; then
+ if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32
+ elif [ "${MULTILIB_VARIANTS}" != "" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
else
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
fi
+ elif [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
+ ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits
+ ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext
fi
if [ "${TCLIBC}" != "glibc" ]; then
case "${TARGET_OS}" in
- "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";;
- "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";;
+ "linux-musl" | "linux-*spe") extra_target_os="linux";;
+ "linux-musleabi") extra_target_os="linux-gnueabi";;
*) extra_target_os="linux";;
esac
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
@@ -104,7 +142,7 @@ do_install_append_class-target () {
}
INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc virtual/${MLPREFIX}libc"
PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
BBCLASSEXTEND = "nativesdk"
@@ -136,13 +174,12 @@ PACKAGES = "\
libitm-dev \
libitm-staticdev \
"
-
# The base package doesn't exist, so we clear the recommends.
RRECOMMENDS_${PN}-dbg = ""
# include python debugging scripts
FILES_${PN}-dbg += "\
- ${libdir}/libstdc++.so.*-gdb.py \
+ ${libdir}/libstdc++.*-gdb.py \
${datadir}/gcc-${BINV}/python/libstdcxx \
"
@@ -179,7 +216,7 @@ FILES_libssp-dev = "\
${libdir}/libssp*.so \
${libdir}/libssp*_nonshared.a \
${libdir}/libssp*.la \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \
+ ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \
"
SUMMARY_libssp-dev = "GNU stack smashing protection library - development files"
FILES_libssp-staticdev = "${libdir}/libssp*.a"
@@ -188,7 +225,7 @@ SUMMARY_libssp-staticdev = "GNU stack smashing protection library - static devel
FILES_libquadmath = "${libdir}/libquadmath*.so.*"
SUMMARY_libquadmath = "GNU quad-precision math library"
FILES_libquadmath-dev = "\
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
+ ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \
${libdir}/libquadmath*.so \
${libdir}/libquadmath.la \
"
@@ -213,7 +250,8 @@ FILES_libgomp-dev = "\
${libdir}/libgomp*${SOLIBSDEV} \
${libdir}/libgomp*.la \
${libdir}/libgomp.spec \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
+ ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \
+ ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \
"
SUMMARY_libgomp-dev = "GNU OpenMP parallel programming library - development files"
FILES_libgomp-staticdev = "${libdir}/libgomp*.a"
@@ -240,6 +278,40 @@ SUMMARY_libitm-dev = "GNU transactional memory support library - development fil
FILES_libitm-staticdev = "${libdir}/libitm.a"
SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files"
-do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
-do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
-do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
+require gcc-testsuite.inc
+
+EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} "
+
+MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}"
+# prettyprinters and xmethods require gdb tooling
+MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp"
+MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'"
+
+# specific host and target dependencies required for test suite running
+do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot"
+do_check[depends] += "virtual/libc:do_populate_sysroot"
+# only depend on qemu if targeting linux user execution
+do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}"
+# extend the recipe sysroot to include the built libraries (for qemu usermode)
+do_check[prefuncs] += "extend_recipe_sysroot"
+do_check[prefuncs] += "check_prepare"
+do_check[dirs] = "${WORKDIR}/dejagnu ${B}"
+do_check[nostamp] = "1"
+do_check() {
+ export DEJAGNU="${WORKDIR}/dejagnu/site.exp"
+
+ # HACK: this works around the configure setting CXX with -nostd* args
+ sed -i 's/-nostdinc++ -nostdlib++//g' $(find ${B} -name testsuite_flags | head -1)
+
+ if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then
+ # qemu user has issues allocating large amounts of memory
+ export G_SLICE=always-malloc
+ # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory
+ ulimit -m 4194304
+ ulimit -v 10485760
+ fi
+
+ oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}"
+}
+addtask check after do_compile do_populate_sysroot
+
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb b/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb
deleted file mode 100644
index 8f31e7792e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-runtime.inc
-
-FILES_libgomp-dev += "\
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
-"
-
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb b/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb
deleted file mode 100644
index 8f31e7792e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-runtime.inc
-
-FILES_libgomp-dev += "\
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
-"
-
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_9.2.bb b/meta/recipes-devtools/gcc/gcc-runtime_9.2.bb
new file mode 100644
index 0000000000..dd430b57eb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-runtime_9.2.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-runtime.inc
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index df4e297a48..8b1d1c94bf 100644
--- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -12,36 +12,29 @@ EXTRA_OECONF_PATHS = "\
"
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/
- cd ${B}/$target/libsanitizer/
+ rm -rf ${B}/${TARGET_SYS}/libsanitizer/
+ mkdir -p ${B}/${TARGET_SYS}/libsanitizer/
+ cd ${B}/${TARGET_SYS}/libsanitizer/
chmod a+x ${S}/libsanitizer/configure
- relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/$target/libsanitizer")}
+ relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/${TARGET_SYS}/libsanitizer")}
$relpath/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
+ sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libsanitizer/libtool
# Link to the sysroot's libstdc++ instead of one gcc thinks it just built
- sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/$target/libsanitizer/*/Makefile
+ sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/${TARGET_SYS}/libsanitizer/*/Makefile
}
+EXTRACONFFUNCS += "extract_stashed_builddir"
+do_configure[depends] += "${COMPILERDEP}"
do_compile () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
- cd ${B}/$target/libsanitizer/
- oe_runmake MULTIBUILDTOP=${B}/$target/libsanitizer/
+ cd ${B}/${TARGET_SYS}/libsanitizer/
+ oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/
}
do_install () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
- cd ${B}/$target/libsanitizer/
- oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libsanitizer/ install
+ cd ${B}/${TARGET_SYS}/libsanitizer/
+ oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ install
if [ -d ${D}${infodir} ]; then
rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
fi
@@ -52,6 +45,9 @@ INHIBIT_DEFAULT_DEPS = "1"
ALLOW_EMPTY_${PN} = "1"
DEPENDS = "gcc-runtime virtual/${TARGET_PREFIX}gcc"
+# used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+DEBUG_OPTIMIZATION_append = " -Wno-error"
+
BBCLASSEXTEND = "nativesdk"
PACKAGES = "${PN} ${PN}-dbg"
@@ -68,15 +64,19 @@ 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"
+RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_powerpc64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_aarch64 = " liblsan libtsan"
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'
+# Only x86, powerpc, sparc, s390, arm, and aarch64 are supported
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64).*-linux'
+# musl is currently broken entirely
+COMPATIBLE_HOST_libc-musl = 'null'
FILES_libasan += "${libdir}/libasan.so.*"
FILES_libasan-dev += "\
@@ -97,6 +97,7 @@ FILES_liblsan += "${libdir}/liblsan.so.*"
FILES_liblsan-dev += "\
${libdir}/liblsan.so \
${libdir}/liblsan.la \
+ ${libdir}/liblsan_preinit.o \
"
FILES_liblsan-staticdev += "${libdir}/liblsan.a"
@@ -104,6 +105,7 @@ FILES_libtsan += "${libdir}/libtsan.so.*"
FILES_libtsan-dev += "\
${libdir}/libtsan.so \
${libdir}/libtsan.la \
+ ${libdir}/libtsan_*.o \
"
FILES_libtsan-staticdev += "${libdir}/libtsan.a"
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb
deleted file mode 100644
index 601f666023..0000000000
--- a/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-sanitizers.inc
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_6.2.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_6.2.bb
deleted file mode 100644
index 601f666023..0000000000
--- a/meta/recipes-devtools/gcc/gcc-sanitizers_6.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-sanitizers.inc
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_9.2.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_9.2.bb
new file mode 100644
index 0000000000..f3c7058114
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers_9.2.bb
@@ -0,0 +1,7 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-sanitizers.inc
+
+# Building with thumb enabled on armv4t armv5t fails with
+# sanitizer_linux.s:5749: Error: lo register required -- `ldr ip,[sp],#8'
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/meta/recipes-devtools/gcc/gcc-source.inc b/meta/recipes-devtools/gcc/gcc-source.inc
index 49bde92c49..03bab97815 100644
--- a/meta/recipes-devtools/gcc/gcc-source.inc
+++ b/meta/recipes-devtools/gcc/gcc-source.inc
@@ -3,7 +3,7 @@ deltask do_compile
deltask do_install
deltask do_populate_sysroot
deltask do_populate_lic
-deltask do_rm_work
+RM_WORK_EXCLUDE += "${PN}"
inherit nopackages
@@ -18,6 +18,8 @@ INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = ""
PACKAGES = ""
+
+# This needs to be Python to avoid lots of shell variables becoming dependencies.
python do_preconfigure () {
import subprocess
cmd = d.expand('cd ${S} && PATH=${PATH} gnu-configize')
@@ -26,6 +28,11 @@ python do_preconfigure () {
bb.utils.remove(d.expand("${S}/gcc/gengtype-lex.c"))
cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure")
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+
+ # Easiest way to stop bad RPATHs getting into the library since we have a
+ # broken libtool here (breaks cross-canadian and target at least)
+ cmd = d.expand("sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure")
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
}
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-source_6.2.bb b/meta/recipes-devtools/gcc/gcc-source_6.2.bb
deleted file mode 100644
index b890fa33ea..0000000000
--- a/meta/recipes-devtools/gcc/gcc-source_6.2.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require recipes-devtools/gcc/gcc-source.inc
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/meta/recipes-devtools/gcc/gcc-source_5.4.bb b/meta/recipes-devtools/gcc/gcc-source_9.2.bb
index b890fa33ea..b890fa33ea 100644
--- a/meta/recipes-devtools/gcc/gcc-source_5.4.bb
+++ b/meta/recipes-devtools/gcc/gcc-source_9.2.bb
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index f436fa24f4..18d078db0a 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -2,13 +2,24 @@ GCCMULTILIB = "--enable-multilib"
require gcc-configure-common.inc
EXTRA_OECONF_PATHS = "\
- --with-sysroot=/ \
--with-build-sysroot=${STAGING_DIR_TARGET} \
- --with-gxx-include-dir=${includedir}/c++/${BINV} \
"
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
+# Configure gcc running on the target to default to an architecture which will
+# be compatible with that of gcc-runtime (which is cross compiled to be target
+# specific). For example, for ARM, ARMv6+ adds atomic instructions that may
+# affect the ABI in the gcc-runtime libs. Since we can't rely on gcc on the
+# target to always be passed -march etc, its built-in default needs to be safe.
+
+ARMFPARCHEXT ?= ""
+
+EXTRA_OECONF_append_armv6 = " --with-arch=armv6${ARMFPARCHEXT}"
+EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${ARMFPARCHEXT}"
+EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${ARMFPARCHEXT}"
+EXTRA_OECONF_append_arc = " --with-cpu=${TUNE_PKGARCH}"
+
# libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is
# set in subdir gcc, so subdir libcc1 can't use it, export it here to
# fix the problem.
@@ -31,7 +42,7 @@ PACKAGES = "\
FILES_${PN} = "\
${bindir}/${TARGET_PREFIX}gcc* \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2* \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
@@ -46,6 +57,7 @@ RRECOMMENDS_${PN} += "\
libssp \
libssp-dev \
"
+RDEPENDS_${PN} += "cpp"
FILES_${PN}-dev = "\
${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
@@ -125,6 +137,21 @@ FILES_${PN}-doc = "\
"
do_compile () {
+ # Prevent full target sysroot path from being used in configargs.h header,
+ # as it will be rewritten when used by other sysroots preventing support
+ # for gcc plugins. Additionally the path is embeddeded into the output
+ # binary, this prevents building a reproducible binary.
+ oe_runmake configure-gcc
+ sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h
+ sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h
+
+ # Prevent sysroot/workdir paths from being used in checksum-options.
+ # checksum-options is used to generate a checksum which is embedded into
+ # the output binary.
+ oe_runmake TARGET-gcc=checksum-options all-gcc
+ sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
+ sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options
+
oe_runmake all-host
}
@@ -179,6 +206,8 @@ do_install () {
ln -sf ${TARGET_PREFIX}g++ g++
ln -sf ${TARGET_PREFIX}gcc gcc
ln -sf ${TARGET_PREFIX}cpp cpp
+ ln -sf ${TARGET_PREFIX}gcov gcov
+ ln -sf ${TARGET_PREFIX}gcov-tool gcov-tool
install -d ${D}${base_libdir}
ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
ln -sf g++ c++
diff --git a/meta/recipes-devtools/gcc/gcc-testsuite.inc b/meta/recipes-devtools/gcc/gcc-testsuite.inc
new file mode 100644
index 0000000000..f68fec58ed
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-testsuite.inc
@@ -0,0 +1,107 @@
+inherit qemu
+
+TOOLCHAIN_TEST_TARGET ??= "user"
+TOOLCHAIN_TEST_HOST ??= "localhost"
+TOOLCHAIN_TEST_HOST_USER ??= "root"
+TOOLCHAIN_TEST_HOST_PORT ??= "2222"
+
+MAKE_CHECK_BOARDFLAGS ??= ""
+MAKE_CHECK_BOARDARGS ??= "--target_board=${TOOLCHAIN_TEST_TARGET}${MAKE_CHECK_BOARDFLAGS}"
+
+python () {
+ # Provide the targets compiler args via targets options. This allows dejagnu to
+ # correctly mark incompatible tests as UNSUPPORTED (e.g. needs soft-float
+ # but running on hard-float target).
+ #
+ # These options are called "multilib_flags" within the gcc test suite. Most
+ # architectures handle these options in a sensible way such that tests that
+ # are incompatible with the provided multilib are marked as UNSUPPORTED.
+ #
+ # Note: multilib flags are added to the compile command after the args
+ # provided by any test (through dg-options), CFLAGS_FOR_TARGET is always
+ # added to the compile command before any other args but is not interpted
+ # as options like multilib flags.
+ #
+ # i686, x86-64 and aarch64 are special, since most toolchains built for
+ # these targets don't do multilib the tests do not get correctly marked as
+ # UNSUPPORTED. More importantly the test suite itself does not handle
+ # overriding the multilib flags where it could (like other archs do). As
+ # such do not pass the target compiler args for these targets.
+ args = d.getVar("TUNE_CCARGS").split()
+ if d.getVar("TUNE_ARCH") in ["i686", "x86_64", "aarch64"]:
+ args = []
+ d.setVar("MAKE_CHECK_BOARDFLAGS", ("/" + "/".join(args)) if len(args) != 0 else "")
+}
+
+python check_prepare() {
+ def generate_qemu_linux_user_config(d):
+ content = []
+ content.append('load_generic_config "sim"')
+ content.append('load_base_board_description "basic-sim"')
+ content.append('process_multilib_options ""')
+
+ # qemu args
+ qemu_binary = qemu_target_binary(d)
+ if not qemu_binary:
+ bb.fatal("Missing target qemu linux-user binary")
+
+ args = []
+ # QEMU_OPTIONS is not always valid due to -cross recipe
+ args += ["-r", d.getVar("OLDEST_KERNEL")]
+ # enable all valid instructions, since the test suite itself does not
+ # limit itself to the target cpu options.
+ # - valid for x86*, powerpc, arm, arm64
+ if qemu_binary.lstrip("qemu-") in ["x86_64", "i386", "ppc", "arm", "aarch64"]:
+ args += ["-cpu", "max"]
+
+ sysroot = d.getVar("RECIPE_SYSROOT")
+ args += ["-L", sysroot]
+ # lib paths are static here instead of using $libdir since this is used by a -cross recipe
+ libpaths = [sysroot + "/usr/lib", sysroot + "/lib"]
+ args += ["-E", "LD_LIBRARY_PATH={0}".format(":".join(libpaths))]
+
+ content.append('set_board_info is_simulator 1')
+ content.append('set_board_info sim "{0}"'.format(qemu_binary))
+ content.append('set_board_info sim,options "{0}"'.format(" ".join(args)))
+
+ # target build/test config
+ content.append('set_board_info target_install {%s}' % d.getVar("TARGET_SYS"))
+ content.append('set_board_info ldscript ""')
+ #content.append('set_board_info needs_status_wrapper 1') # qemu-linux-user return codes work, and abort works fine
+ content.append('set_board_info gcc,stack_size 16834')
+ content.append('set_board_info gdb,nosignals 1')
+ content.append('set_board_info gcc,timeout 60')
+
+ return "\n".join(content)
+
+ def generate_remote_ssh_linux_config(d):
+ content = []
+ content.append('load_generic_config "unix"')
+ content.append('process_multilib_options ""')
+ content.append("set_board_info hostname {0}".format(d.getVar("TOOLCHAIN_TEST_HOST")))
+ content.append("set_board_info username {0}".format(d.getVar("TOOLCHAIN_TEST_HOST_USER")))
+
+ port = d.getVar("TOOLCHAIN_TEST_HOST_PORT")
+ content.append("set_board_info rsh_prog \"/usr/bin/ssh -p {0} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"".format(port))
+ content.append("set_board_info rcp_prog \"/usr/bin/scp -P {0} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"".format(port))
+
+ return "\n".join(content)
+
+ dejagnudir = d.expand("${WORKDIR}/dejagnu")
+ if not os.path.isdir(dejagnudir):
+ os.makedirs(dejagnudir)
+
+ # write out target qemu board config
+ with open(os.path.join(dejagnudir, "user.exp"), "w") as f:
+ f.write(generate_qemu_linux_user_config(d))
+
+ # write out target ssh board config
+ with open(os.path.join(dejagnudir, "ssh.exp"), "w") as f:
+ f.write(generate_remote_ssh_linux_config(d))
+
+ # generate site.exp to provide boards
+ with open(os.path.join(dejagnudir, "site.exp"), "w") as f:
+ f.write("lappend boards_dir {0}\n".format(dejagnudir))
+ f.write("set CFLAGS_FOR_TARGET \"{0}\"\n".format(d.getVar("TOOLCHAIN_OPTIONS")))
+}
+
diff --git a/meta/recipes-devtools/gcc/gcc_5.4.bb b/meta/recipes-devtools/gcc/gcc_5.4.bb
deleted file mode 100644
index b0a523cae2..0000000000
--- a/meta/recipes-devtools/gcc/gcc_5.4.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-target.inc
-
-# Building with thumb enabled on armv4t fails with
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
-ARM_INSTRUCTION_SET_armv4 = "arm"
-
-do_configure_prepend() {
- # 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/' ${S}/libcc1/configure
-}
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/gcc/gcc_6.2.bb b/meta/recipes-devtools/gcc/gcc_6.2.bb
deleted file mode 100644
index b0a523cae2..0000000000
--- a/meta/recipes-devtools/gcc/gcc_6.2.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-target.inc
-
-# Building with thumb enabled on armv4t fails with
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
-ARM_INSTRUCTION_SET_armv4 = "arm"
-
-do_configure_prepend() {
- # 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/' ${S}/libcc1/configure
-}
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/gcc/gcc_9.2.bb b/meta/recipes-devtools/gcc/gcc_9.2.bb
new file mode 100644
index 0000000000..7d93590588
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc_9.2.bb
@@ -0,0 +1,14 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-target.inc
+
+# Building with thumb enabled on armv4t armv5t fails with
+# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
+# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+ARMFPARCHEXT_armv6 = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+ARMFPARCHEXT_armv7a = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+ARMFPARCHEXT_armv7ve = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index 4e4f0fd03b..d959566c3f 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -5,27 +5,25 @@ require gcc-configure-common.inc
INHIBIT_DEFAULT_DEPS = "1"
do_configure () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
install -d ${D}${base_libdir} ${D}${libdir}
- hardlinkdir ${STAGING_INCDIR_NATIVE}/${LIBGCCBUILDTREENAME}$target/ ${B}
mkdir -p ${B}/${BPN}
- mkdir -p ${B}/$target/${BPN}/
+ mkdir -p ${B}/${TARGET_SYS}/${BPN}/
cd ${B}/${BPN}
chmod a+x ${S}/${BPN}/configure
relpath=${@os.path.relpath("${S}/${BPN}", "${B}/${BPN}")}
$relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
}
+EXTRACONFFUNCS += "extract_stashed_builddir"
+do_configure[depends] += "${COMPILERDEP}"
do_compile () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
cd ${B}/${BPN}
- oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/
+ oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN}/
}
do_install () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
cd ${B}/${BPN}
- oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install
+ oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN}/ install
# Move libgcc_s into /lib
mkdir -p ${D}${base_libdir}
@@ -49,8 +47,13 @@ do_install () {
do_install_append_libc-baremetal () {
rmdir ${D}${base_libdir}
}
+do_install_append_libc-newlib () {
+ rmdir ${D}${base_libdir}
+}
+# No rpm package is actually created but -dev depends on it, avoid dnf error
RDEPENDS_${PN}-dev_libc-baremetal = ""
+RDEPENDS_${PN}-dev_libc-newlib = ""
BBCLASSEXTEND = "nativesdk"
@@ -64,18 +67,18 @@ addtask multilib_install after do_install before do_package do_populate_sysroot
fakeroot python do_multilib_install() {
import re
- multilibs = d.getVar('MULTILIB_VARIANTS', True)
+ multilibs = d.getVar('MULTILIB_VARIANTS')
if not multilibs or bb.data.inherits_class('nativesdk', d):
return
- binv = d.getVar('BINV', True)
+ binv = d.getVar('BINV')
- mlprefix = d.getVar('MLPREFIX', True)
- if ('%slibgcc' % mlprefix) != d.getVar('PN', True):
+ mlprefix = d.getVar('MLPREFIX')
+ if ('%slibgcc' % mlprefix) != d.getVar('PN'):
return
if mlprefix:
- orig_tune = d.getVar('DEFAULTTUNE_MULTILIB_ORIGINAL', True)
+ orig_tune = d.getVar('DEFAULTTUNE_MULTILIB_ORIGINAL')
orig_tune_params = get_tune_parameters(orig_tune, d)
orig_tune_baselib = orig_tune_params['baselib']
orig_tune_bitness = orig_tune_baselib.replace('lib', '')
@@ -83,10 +86,10 @@ fakeroot python do_multilib_install() {
orig_tune_bitness = '32'
src = '../../../' + orig_tune_baselib + '/' + \
- d.getVar('TARGET_SYS_MULTILIB_ORIGINAL', True) + '/' + binv + '/'
+ d.getVar('TARGET_SYS_MULTILIB_ORIGINAL') + '/' + binv + '/'
- dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + \
- d.getVar('TARGET_SYS', True) + '/' + binv + '/' + orig_tune_bitness
+ dest = d.getVar('D') + d.getVar('libdir') + '/' + \
+ d.getVar('TARGET_SYS') + '/' + binv + '/' + orig_tune_bitness
if os.path.lexists(dest):
os.unlink(dest)
@@ -95,7 +98,7 @@ fakeroot python do_multilib_install() {
for ml in multilibs.split():
- tune = d.getVar('DEFAULTTUNE_virtclass-multilib-' + ml, True)
+ tune = d.getVar('DEFAULTTUNE_virtclass-multilib-' + ml)
if not tune:
bb.warn('DEFAULTTUNE_virtclass-multilib-%s is not defined. Skipping...' % ml)
continue
@@ -111,35 +114,47 @@ fakeroot python do_multilib_install() {
if not tune_bitness:
tune_bitness = '32' # /lib => 32bit lib
+ tune_abiextension = tune_parameters['abiextension']
+ if tune_abiextension:
+ libcextension = '-gnu' + tune_abiextension
+ else:
+ libcextension = ''
+
src = '../../../' + tune_baselib + '/' + \
- tune_arch + d.getVar('TARGET_VENDOR', True) + 'ml' + ml + \
- '-' + d.getVar('TARGET_OS', True) + '/' + binv + '/'
+ tune_arch + d.getVar('TARGET_VENDOR') + 'ml' + ml + \
+ '-' + d.getVar('TARGET_OS') + libcextension + '/' + binv + '/'
- dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + \
- d.getVar('TARGET_SYS', True) + '/' + binv + '/' + tune_bitness
+ dest = d.getVar('D') + d.getVar('libdir') + '/' + \
+ d.getVar('TARGET_SYS') + '/' + binv + '/' + tune_bitness
if os.path.lexists(dest):
os.unlink(dest)
os.symlink(src, dest)
}
-def get_original_vendoros(d):
- vendoros = d.expand('${TARGET_VENDOR}-${TARGET_OS}')
- for suffix in [d.getVar('ABIEXTENSION', True), d.getVar('LIBCEXTENSION', True)]:
+def get_original_os(d):
+ vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_OS}')
+ for suffix in [d.getVar('ABIEXTENSION'), d.getVar('LIBCEXTENSION')]:
if suffix and vendoros.endswith(suffix):
vendoros = vendoros[:-len(suffix)]
+ # Arm must use linux-gnueabi not linux as only the former is accepted by gcc
+ if vendoros.startswith("arm-") and not vendoros.endswith("-gnueabi"):
+ vendoros = vendoros + "-gnueabi"
return vendoros
-ORIG_TARGET_VENDOROS := "${@get_original_vendoros(d)}"
-BASETARGET_SYS = "${TARGET_ARCH}${ORIG_TARGET_VENDOROS}"
+ORIG_TARGET_VENDOR := "${TARGET_VENDOR}"
+BASETARGET_SYS = "${@get_original_os(d)}"
addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
fakeroot python do_extra_symlinks() {
- targetsys = d.getVar('BASETARGET_SYS', True)
+ if bb.data.inherits_class('nativesdk', d):
+ return
+
+ targetsys = d.getVar('BASETARGET_SYS')
- if targetsys != d.getVar('TARGET_SYS', True):
- dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + targetsys
- src = d.getVar('TARGET_SYS', True)
- if not os.path.lexists(dest) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
+ if targetsys != d.getVar('TARGET_SYS'):
+ dest = d.getVar('D') + d.getVar('libdir') + '/' + targetsys
+ src = d.getVar('TARGET_SYS')
+ if not os.path.lexists(dest) and os.path.lexists(d.getVar('D') + d.getVar('libdir')):
os.symlink(src, dest)
}
diff --git a/meta/recipes-devtools/gcc/libgcc-initial.inc b/meta/recipes-devtools/gcc/libgcc-initial.inc
index 687a8a0b09..06bf224f73 100644
--- a/meta/recipes-devtools/gcc/libgcc-initial.inc
+++ b/meta/recipes-devtools/gcc/libgcc-initial.inc
@@ -1,19 +1,58 @@
+#
+# Notes on the way the OE cross toolchain now works
+#
+# We need a libgcc to build glibc. Tranditionally we therefore built
+# a non-threaded and non-shared compiler (gcc-cross-initial), then use
+# that to build libgcc-initial which is used to build glibc which we can
+# then build gcc-cross and libgcc against.
+#
+# We were able to drop the glibc dependency from gcc-cross, with two tweaks:
+
+# a) specify the minimum glibc version to support in a configure option
+# b) create a dummy limits.h file so that later when glibc creates one,
+# the headers structure has support for it. We can do this with a simple
+# empty file
+#
+# Once gcc-cross is libc independent, we can use it to build both
+# libgcc-initial and then later libgcc.
+#
+# libgcc-initial is tricky as we need to imitate the non-threaded and
+# non-shared case. We can do that by hacking the threading mode back to
+# "single" even if gcc reports "posix" and disable libc presence for the
+# libgcc-intial build. We have to create the dummy limits.h to avoid
+# compiler errors from a missing header.
+#
+# glibc will fail to link with libgcc-initial due to a missing "exception
+# handler" capable libgcc (libgcc_eh.a). Since we know glibc doesn't need
+# any exception handler, we can safely symlink to libgcc.a.
+#
+
require libgcc-common.inc
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc"
LICENSE = "GPL-3.0-with-GCC-exception"
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
-
PACKAGES = ""
EXTRA_OECONF += "--disable-shared"
-LIBGCCBUILDTREENAME = "gcc-build-internal-initial-"
+inherit nopackages
+
+# We really only want this built by things that need it, not any recrdeptask
+deltask do_build
-do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
+do_configure_prepend () {
+ install -d ${STAGING_INCDIR}
+ touch ${STAGING_INCDIR}/limits.h
+ sed -i -e 's#INHIBIT_LIBC_CFLAGS =.*#INHIBIT_LIBC_CFLAGS = -Dinhibit_libc#' ${B}/gcc/libgcc.mvars
+ sed -i -e 's#inhibit_libc = false#inhibit_libc = true#' ${B}/gcc/Makefile
+}
-inherit nopackages
+do_configure_append () {
+ sed -i -e 's#thread_header = .*#thread_header = gthr-single.h#' ${B}/${BPN}/Makefile
+}
+
+do_install_append () {
+ ln -s libgcc.a ${D}${libdir}/${TARGET_SYS}/${BINV}/libgcc_eh.a
+}
diff --git a/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb b/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb
deleted file mode 100644
index 19f253fce8..0000000000
--- a/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc-initial.inc
diff --git a/meta/recipes-devtools/gcc/libgcc-initial_6.2.bb b/meta/recipes-devtools/gcc/libgcc-initial_6.2.bb
deleted file mode 100644
index 19f253fce8..0000000000
--- a/meta/recipes-devtools/gcc/libgcc-initial_6.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc-initial.inc
diff --git a/meta/recipes-devtools/gcc/libgcc-initial_9.2.bb b/meta/recipes-devtools/gcc/libgcc-initial_9.2.bb
new file mode 100644
index 0000000000..0c698c26ec
--- /dev/null
+++ b/meta/recipes-devtools/gcc/libgcc-initial_9.2.bb
@@ -0,0 +1,5 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require libgcc-initial.inc
+
+# Building with thumb enabled on armv6t fails
+ARM_INSTRUCTION_SET_armv6 = "arm"
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index 4770394c42..e008d14f36 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -1,16 +1,23 @@
require libgcc-common.inc
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/${MLPREFIX}libc"
do_install_append_class-target () {
if [ "${TCLIBC}" != "glibc" ]; then
case "${TARGET_OS}" in
- "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";;
- "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";;
+ "linux-musl" | "linux-*spe") extra_target_os="linux";;
+ "linux-musleabi") extra_target_os="linux-gnueabi";;
*) extra_target_os="linux";;
esac
ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
fi
+ if [ -n "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" ]; then
+ case "${TARGET_OS}" in
+ "linux-musleabi") extra_target_os="linux-musleabihf";;
+ "linux-gnueabi") extra_target_os="linux-gnueabihf";;
+ esac
+ ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
+ fi
}
PACKAGES = "\
@@ -28,13 +35,11 @@ LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception"
FILES_${PN}-dev = "\
${base_libdir}/libgcc*.so \
- ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
+ ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
${libdir}/${TARGET_SYS}/${BINV}* \
${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
"
-LIBGCCBUILDTREENAME = "gcc-build-internal-"
-
do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
diff --git a/meta/recipes-devtools/gcc/libgcc_5.4.bb b/meta/recipes-devtools/gcc/libgcc_5.4.bb
deleted file mode 100644
index a5152f28e9..0000000000
--- a/meta/recipes-devtools/gcc/libgcc_5.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc.inc
diff --git a/meta/recipes-devtools/gcc/libgcc_6.2.bb b/meta/recipes-devtools/gcc/libgcc_6.2.bb
deleted file mode 100644
index a5152f28e9..0000000000
--- a/meta/recipes-devtools/gcc/libgcc_6.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc.inc
diff --git a/meta/recipes-devtools/gcc/libgcc_9.2.bb b/meta/recipes-devtools/gcc/libgcc_9.2.bb
new file mode 100644
index 0000000000..ea210a1130
--- /dev/null
+++ b/meta/recipes-devtools/gcc/libgcc_9.2.bb
@@ -0,0 +1,5 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require libgcc.inc
+
+# Building with thumb enabled on armv6t fails
+ARM_INSTRUCTION_SET_armv6 = "arm"
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc
index 58ceb2e073..7543585e6e 100644
--- a/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/meta/recipes-devtools/gcc/libgfortran.inc
@@ -6,32 +6,33 @@ EXTRA_OECONF_PATHS = "\
"
do_configure () {
- mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
- hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
-
- echo "Configuring libgfortran"
- rm -rf ${B}/$target/libgfortran/
- mkdir -p ${B}/$target/libgfortran/
- cd ${B}/$target/libgfortran/
- chmod a+x ${S}/libgfortran/configure
- relpath=${@os.path.relpath("${S}/libgfortran", "${B}/$target/libgfortran")}
- $relpath/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/libgfortran/libtool
+ for target in libbacktrace libgfortran
+ do
+ rm -rf ${B}/${TARGET_SYS}/$target/
+ mkdir -p ${B}/${TARGET_SYS}/$target/
+ cd ${B}/${TARGET_SYS}/$target/
+ chmod a+x ${S}/$target/configure
+ relpath=${@os.path.relpath("${S}", "${B}/${TARGET_SYS}")}
+ ../$relpath/$target/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_SYS}/$target/libtool
+ done
}
+EXTRACONFFUNCS += "extract_stashed_builddir"
+do_configure[depends] += "${COMPILERDEP}"
do_compile () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
- cd ${B}/$target/libgfortran/
- oe_runmake MULTIBUILDTOP=${B}/$target/libgfortran/
+ for target in libbacktrace libgfortran
+ do
+ cd ${B}/${TARGET_SYS}/$target/
+ oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$target/
+ done
}
do_install () {
- target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
- cd ${B}/$target/libgfortran/
- oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libgfortran/ install
+ cd ${B}/${TARGET_SYS}/libgfortran/
+ oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/ install
if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
fi
@@ -42,7 +43,7 @@ do_install () {
}
INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS = "gcc-runtime"
+DEPENDS = "gcc-runtime gcc-cross-${TARGET_ARCH}"
BBCLASSEXTEND = "nativesdk"
@@ -52,6 +53,11 @@ PACKAGES = "\
libgfortran-dev \
libgfortran-staticdev \
"
+
+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} = "${libdir}/libgfortran.so.*"
FILES_${PN}-dev = "\
${libdir}/libgfortran*.so \
@@ -59,6 +65,8 @@ FILES_${PN}-dev = "\
${libdir}/libgfortran.la \
${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ \
"
FILES_${PN}-staticdev = "${libdir}/libgfortran.a"
@@ -69,7 +77,7 @@ do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
python __anonymous () {
- f = d.getVar("FORTRAN", True)
+ f = d.getVar("FORTRAN")
if "fortran" not in f:
- raise bb.parse.SkipPackage("libgfortran needs fortran support to be enabled in the compiler")
+ raise bb.parse.SkipRecipe("libgfortran needs fortran support to be enabled in the compiler")
}
diff --git a/meta/recipes-devtools/gcc/libgfortran_6.2.bb b/meta/recipes-devtools/gcc/libgfortran_6.2.bb
deleted file mode 100644
index 71dd8b4bdc..0000000000
--- a/meta/recipes-devtools/gcc/libgfortran_6.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgfortran.inc
-
diff --git a/meta/recipes-devtools/gcc/libgfortran_5.4.bb b/meta/recipes-devtools/gcc/libgfortran_9.2.bb
index 71dd8b4bdc..71dd8b4bdc 100644
--- a/meta/recipes-devtools/gcc/libgfortran_5.4.bb
+++ b/meta/recipes-devtools/gcc/libgfortran_9.2.bb
diff --git a/meta/recipes-devtools/gdb/gdb-7.11.inc b/meta/recipes-devtools/gdb/gdb-7.11.inc
deleted file mode 100644
index a9267d5548..0000000000
--- a/meta/recipes-devtools/gdb/gdb-7.11.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
-
-SRC_URI[md5sum] = "b93a2721393e5fa226375b42d567d90b"
-SRC_URI[sha256sum] = "ff14f8050e6484508c73cbfa63731e57901478490ca1672dc0b5e2b03f6af622"
-
diff --git a/meta/recipes-devtools/gdb/gdb-8.3.1.inc b/meta/recipes-devtools/gdb/gdb-8.3.1.inc
new file mode 100644
index 0000000000..aec913f3ce
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-8.3.1.inc
@@ -0,0 +1,22 @@
+LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
+
+SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \
+ file://0001-gdbserver-ctrl-c-handling.patch \
+ file://0002-make-man-install-relative-to-DESTDIR.patch \
+ file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
+ file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
+ file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \
+ file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \
+ file://0007-use-asm-sgidefs.h.patch \
+ file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \
+ file://0009-Change-order-of-CFLAGS.patch \
+ file://0010-resolve-restrict-keyword-conflict.patch \
+ file://0011-Fix-invalid-sigprocmask-call.patch \
+ file://CVE-2019-1010180.patch \
+ "
+SRC_URI[md5sum] = "73b6a5d8141672c62bf851cd34c4aa83"
+SRC_URI[sha256sum] = "1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4"
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
index 09231434de..08f615addf 100644
--- a/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -1,55 +1,25 @@
SUMMARY = "GNU debugger"
HOMEPAGE = "http://www.gnu.org/software/gdb/"
-LICENSE = "GPLv3+"
SECTION = "devel"
-DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST}"
+DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST} bison-native"
LTTNGUST = "lttng-ust"
+LTTNGUST_arc = ""
LTTNGUST_aarch64 = ""
-LTTNGUST_libc-uclibc = ""
-LTTNGUST_mips = ""
-LTTNGUST_mipsel = ""
-LTTNGUST_mips64 = ""
-LTTNGUST_mips64el = ""
-LTTNGUST_mips64n32 = ""
-LTTNGUST_mips64eln32 = ""
+LTTNGUST_mipsarch = ""
LTTNGUST_sh4 = ""
-LTTNGUST_libc-musl = ""
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
inherit autotools texinfo
-SRCREV = "1a982b689ce4e20523bdf69e47fdd574c4f63934"
-
-SRC_URI = "git://sourceware.org/git/binutils-gdb.git;branch=gdb-7.11-branch \
- file://0001-include-sys-types.h-for-mode_t.patch \
- file://0002-make-man-install-relative-to-DESTDIR.patch \
- file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
- file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
- file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \
- file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \
- file://0007-use-asm-sgidefs.h.patch \
- file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \
- file://0009-Change-order-of-CFLAGS.patch \
- file://0010-resolve-restrict-keyword-conflict.patch \
- file://0011-avx_mpx.patch \
-"
-
UPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P<pver>.+)\-release"
-S = "${WORKDIR}/git"
-
B = "${WORKDIR}/build-${TARGET_SYS}"
EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils'"
EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
-EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
+EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \
--with-curses --disable-multilib --disable-sim \
--without-lzma --without-guile \
${GDBPROPREFIX} ${EXPAT} \
@@ -65,6 +35,8 @@ PACKAGECONFIG ??= "readline"
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
+# ncurses is already a hard DEPENDS, but would be added here if it weren't
+PACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
GDBPROPREFIX = "--program-prefix=''"
@@ -76,11 +48,12 @@ do_configure () {
}
# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
-# right bits installed by binutils.
+# right bits installed by binutils. Same for bfd.info -- also from binutils.
do_install_append() {
rm -rf ${D}${libdir}
rm -rf ${D}${includedir}
rm -rf ${D}${datadir}/locale
+ rm -f ${D}${infodir}/bfd.info
}
RRECOMMENDS_gdb_append_linux = " glibc-thread-db "
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index e53081d0c0..c9daf25a41 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -6,15 +6,16 @@ PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
BPN = "gdb"
DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext \
- virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc"
+ virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc"
GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
# Overrides PACKAGECONFIG variables in gdb-common.inc
PACKAGECONFIG ??= "python readline"
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
- nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \
- nativesdk-python3-codecs nativesdk-python3-netclient"
+ nativesdk-python3-core \
+ nativesdk-python3-codecs nativesdk-python3-netclient \
+ "
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
@@ -39,4 +40,3 @@ do_install_append() {
rm -rf ${D}${exec_prefix}/lib
cross_canadian_bindirlinks
}
-
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.1.bb
index 301035940c..301035940c 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc b/meta/recipes-devtools/gdb/gdb-cross.inc
index 5fa7c3367d..ebe329f6d3 100644
--- a/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -1,6 +1,6 @@
require gdb-common.inc
-DEPENDS = "expat-native ncurses-native"
+DEPENDS = "expat-native ncurses-native flex-native bison-native"
inherit python3native
@@ -21,7 +21,10 @@ GDBPROPREFIX = ""
PN = "gdb-cross-${TARGET_ARCH}"
BPN = "gdb"
+# Ignore how TARGET_ARCH is computed.
+TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}"
+
inherit cross
inherit gettext
-datadir .= "/gdb-${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
+datadir .= "/gdb-${TARGET_SYS}${TARGET_VENDOR}-${TARGET_OS}"
diff --git a/meta/recipes-devtools/gdb/gdb-cross_7.11.bb b/meta/recipes-devtools/gdb/gdb-cross_8.3.1.bb
index 50cf159fdb..50cf159fdb 100644
--- a/meta/recipes-devtools/gdb/gdb-cross_7.11.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross_8.3.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 52119a0aaa..249e24dc52 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -8,3 +8,7 @@ inherit gettext
# cross-canadian must not see this
PACKAGES =+ "gdbserver"
FILES_gdbserver = "${bindir}/gdbserver"
+
+ALLOW_EMPTY_gdbserver_riscv64 = "1"
+ALLOW_EMPTY_gdbserver_riscv32 = "1"
+
diff --git a/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch b/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch
new file mode 100644
index 0000000000..71fe7f83b6
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch
@@ -0,0 +1,26 @@
+This problem was created by the upstream commit 78708b7c8c
+After applying the commit, it will send SIGINT to the process group(-signal_pid).
+But if we use gdbserver send SIGINT, and the attached process is not a process
+group leader, then the "kill (-signal_pid, SIGINT)" returns error and fails to
+interrupt the attached process.
+
+Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=18945]
+
+Author: Josh Gao
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+
+Index: gdb-8.2/gdb/gdbserver/linux-low.c
+===================================================================
+--- gdb-8.2.orig/gdb/gdbserver/linux-low.c
++++ gdb-8.2/gdb/gdbserver/linux-low.c
+@@ -5940,9 +5940,7 @@ linux_look_up_symbols (void)
+ static void
+ linux_request_interrupt (void)
+ {
+- /* Send a SIGINT to the process group. This acts just like the user
+- typed a ^C on the controlling terminal. */
+- kill (-signal_pid, SIGINT);
++ kill (signal_pid, SIGINT);
+ }
+
+ /* Copy LEN bytes from inferior's auxiliary vector starting at OFFSET
diff --git a/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch b/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
deleted file mode 100644
index 0042c00634..0000000000
--- a/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From fddd7178915968acf680814411b8b3cb137d0587 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 19 Jan 2016 18:18:52 -0800
-Subject: [PATCH 01/10] include sys/types.h for mode_t
-
-mode_t is used in target.h, so we need to include sys/types.h to get the
-defintion
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gdb/gdbserver/target.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
-index 5af2051..f42c510 100644
---- a/gdb/gdbserver/target.h
-+++ b/gdb/gdbserver/target.h
-@@ -28,6 +28,7 @@
- #include "target/waitstatus.h"
- #include "mem-break.h"
- #include "btrace-common.h"
-+#include <sys/types.h>
-
- struct emit_ops;
- struct buffer;
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch b/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
index defed621f4..60479e5410 100644
--- a/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
+++ b/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
@@ -1,7 +1,7 @@
-From 3229cb09033eeb5003a08d91fa9d43be8ba4c86b Mon Sep 17 00:00:00 2001
+From b0209f282716bed2c230c7b496fbcc7af503d0cc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 02:27:55 +0000
-Subject: [PATCH 02/10] make man install relative to DESTDIR
+Subject: [PATCH 02/11] make man install relative to DESTDIR
Upstream-Status: Pending
@@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
-index a05f507..8d0fa64 100644
+index 227e4cfbc2..8c3457e0bd 100644
--- a/sim/common/Makefile.in
+++ b/sim/common/Makefile.in
@@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias)
@@ -24,5 +24,5 @@ index a05f507..8d0fa64 100644
includedir = @includedir@
--
-2.8.2
+2.18.0
diff --git a/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
index bac793964a..cf54c74c09 100644
--- a/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
+++ b/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
@@ -1,7 +1,7 @@
-From 88e67caed662d8344c8db56176c9f1221e6cd2a2 Mon Sep 17 00:00:00 2001
+From b14a57d90e1cdd8144cda4c8882bd1db44d26dab Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 23 Mar 2016 06:30:09 +0000
-Subject: [PATCH 03/10] mips-linux-nat: Define _ABIO32 if not defined
+Subject: [PATCH 03/11] mips-linux-nat: Define _ABIO32 if not defined
This helps building gdb on mips64 on musl, since
musl does not provide sgidefs.h this define is
@@ -9,29 +9,27 @@ only defined when GCC is using o32 ABI, in that
case gcc emits it as built-in define and hence
it works ok for mips32
+Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Pending
-
- gdb/mips-linux-nat.c | 5 +++++
- 1 file changed, 5 insertions(+)
+ gdb/mips-linux-nat.c | 4 ++++
+ 1 file changed, 4 insertions(+)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index bfe9fcb..449b43a 100644
+index 32835c16b2..68a7587af2 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
-@@ -46,6 +46,11 @@
+@@ -41,6 +41,10 @@
+ #ifndef PTRACE_GET_THREAD_AREA
#define PTRACE_GET_THREAD_AREA 25
#endif
-
+/* musl does not define and relies on compiler built-in macros for it */
+#ifndef _ABIO32
+#define _ABIO32 1
+#endif
-+
- /* Assume that we have PTRACE_GETREGS et al. support. If we do not,
- we'll clear this and use PTRACE_PEEKUSER instead. */
- static int have_ptrace_regsets = 1;
+
+ class mips_linux_nat_target final : public linux_nat_trad_target
+ {
--
-2.8.2
+2.18.0
diff --git a/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
index a5fe2a2793..170d512ef7 100644
--- a/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
+++ b/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -1,24 +1,24 @@
-From bec564eb454bc7fc6ecfcb573aa53040bf39c1d5 Mon Sep 17 00:00:00 2001
+From da30370c1e3ff7728a857e119e0529a9f097086e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 30 Apr 2016 16:46:03 +0000
-Subject: [PATCH 04/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
- systems
+Date: Sat, 30 Apr 2016 18:32:14 -0700
+Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
gdb/gdbserver/linux-ppc-low.c | 6 ++++++
gdb/nat/ppc-linux.h | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
-index 2145c50..777905d 100644
+index 1b695e53..1978347c 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
-@@ -21,7 +21,13 @@
- #include "linux-low.h"
-
+@@ -23,7 +23,13 @@
+ #include "elf/common.h"
+ #include <sys/uio.h>
#include <elf.h>
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
@@ -28,15 +28,15 @@ index 2145c50..777905d 100644
+# undef pt_regs
+#endif
- #include "nat/ppc-linux.h"
-
+ #include "arch/ppc-linux-common.h"
+ #include "arch/ppc-linux-tdesc.h"
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
-index 85fbcd8..cbec9c5 100644
+index f1561b3b..40399361 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
- #ifndef PPC_LINUX_H
- #define PPC_LINUX_H 1
+ #ifndef NAT_PPC_LINUX_H
+ #define NAT_PPC_LINUX_H
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
@@ -48,6 +48,3 @@ index 85fbcd8..cbec9c5 100644
#include <asm/cputable.h>
/* This sometimes isn't defined. */
---
-2.8.2
-
diff --git a/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch b/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
index 8809e6f8b2..f840cafe2e 100644
--- a/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
+++ b/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
@@ -1,7 +1,7 @@
-From 8c5fe58c5a0044ddb517a41b277ed27fb3d3bedc Mon Sep 17 00:00:00 2001
+From 215486b53a7a6dfca064cd2e9196a9de6ed6f0c2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 02:31:12 +0000
-Subject: [PATCH 05/10] Add support for Renesas SH (sh4) architecture.
+Subject: [PATCH 05/11] Add support for Renesas SH (sh4) architecture.
gdb (7.4-1~cvs20111117.2) experimental; urgency=low
.
@@ -13,11 +13,11 @@ Bug-Debian: http://bugs.debian.org/576242
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- gdb/Makefile.in | 1 +
+ gdb/Makefile.in | 2 +
gdb/configure.host | 1 +
- gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++++++++++
- gdb/sh-tdep.c | 54 ++--
- gdb/sh-tdep.h | 49 ++++
+ gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++
+ gdb/sh-tdep.c | 53 ++-
+ gdb/sh-tdep.h | 49 +++
gdb/testsuite/gdb.asm/asm-source.exp | 5 +
gdb/testsuite/gdb.asm/sh.inc | 3 +-
gdb/testsuite/gdb.base/annota1.c | 3 +
@@ -27,22 +27,23 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 files changed, 617 insertions(+), 29 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index ec2af52..df8e84d 100644
+index c76a4e4394..921fdadb49 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
-@@ -1736,6 +1736,7 @@ ALLDEPFILES = \
- score-tdep.c \
- ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
- sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
-+ sh-linux-tdep.c sh-linux-nat.c \
+@@ -2326,6 +2326,8 @@ ALLDEPFILES = \
+ sh-nbsd-nat.c \
+ sh-nbsd-tdep.c \
+ sh-tdep.c \
++ sh-linux-tdep.c \
++ sh-linux-nat.c \
sol2-tdep.c \
- solib-svr4.c \
- sparc-linux-nat.c sparc-linux-tdep.c \
+ solib-aix.c \
+ solib-spu.c \
diff --git a/gdb/configure.host b/gdb/configure.host
-index ef265eb..322a1e2 100644
+index 23a2f16399..39a886ec53 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
-@@ -149,6 +149,7 @@ powerpc*-*-linux*) gdb_host=linux ;;
+@@ -153,6 +153,7 @@ riscv*-*-linux*) gdb_host=linux ;;
s390*-*-linux*) gdb_host=linux ;;
@@ -51,7 +52,7 @@ index ef265eb..322a1e2 100644
gdb_host=nbsd ;;
sh*-*-openbsd*) gdb_host=nbsd ;;
diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
-index 2418d25..ac8ea9e 100644
+index db93967910..4109c549e8 100644
--- a/gdb/sh-linux-tdep.c
+++ b/gdb/sh-linux-tdep.c
@@ -18,14 +18,37 @@
@@ -599,7 +600,7 @@ index 2418d25..ac8ea9e 100644
/* GNU/Linux uses SVR4-style shared libraries. */
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
-index 336b48e..847b271 100644
+index fe64cf979a..4417114cd0 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -21,6 +21,9 @@
@@ -612,15 +613,7 @@ index 336b48e..847b271 100644
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
-@@ -35,6 +38,7 @@
- #include "arch-utils.h"
- #include "floatformat.h"
- #include "regcache.h"
-+#include "regset.h"
- #include "doublest.h"
- #include "osabi.h"
- #include "reggroups.h"
-@@ -67,23 +71,6 @@ static const char *const sh_cc_enum[] = {
+@@ -66,23 +69,6 @@ static const char *const sh_cc_enum[] = {
static const char *sh_active_calling_convention = sh_cc_gcc;
@@ -644,7 +637,7 @@ index 336b48e..847b271 100644
static int
sh_is_renesas_calling_convention (struct type *func_type)
{
-@@ -1043,7 +1030,7 @@ sh_treat_as_flt_p (struct type *type)
+@@ -1050,7 +1036,7 @@ sh_treat_as_flt_p (struct type *type)
return 0;
/* Otherwise if the type of that member is float, the whole type is
treated as float. */
@@ -653,7 +646,7 @@ index 336b48e..847b271 100644
return 1;
/* Otherwise it's not treated as float. */
return 0;
-@@ -1093,7 +1080,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
+@@ -1100,7 +1086,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
in four registers available. Loop thru args from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
@@ -662,7 +655,7 @@ index 336b48e..847b271 100644
len = TYPE_LENGTH (type);
val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
-@@ -1821,7 +1808,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
+@@ -1834,7 +1820,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
reg->how = DWARF2_FRAME_REG_UNDEFINED;
}
@@ -671,7 +664,7 @@ index 336b48e..847b271 100644
sh_alloc_frame_cache (void)
{
struct sh_frame_cache *cache;
-@@ -1848,7 +1835,7 @@ sh_alloc_frame_cache (void)
+@@ -1861,7 +1847,7 @@ sh_alloc_frame_cache (void)
return cache;
}
@@ -680,7 +673,7 @@ index 336b48e..847b271 100644
sh_frame_cache (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
-@@ -1915,9 +1902,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
+@@ -1928,9 +1914,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
return cache;
}
@@ -693,7 +686,7 @@ index 336b48e..847b271 100644
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
-@@ -1931,7 +1918,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
+@@ -1944,7 +1930,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
the current frame. Frob regnum so that we pull the value from
the correct place. */
if (regnum == gdbarch_pc_regnum (gdbarch))
@@ -702,7 +695,7 @@ index 336b48e..847b271 100644
if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
return frame_unwind_got_memory (this_frame, regnum,
-@@ -2240,8 +2227,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
+@@ -2255,8 +2241,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
static struct gdbarch *
sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -710,9 +703,9 @@ index 336b48e..847b271 100644
struct gdbarch_tdep *tdep;
+ struct gdbarch *gdbarch;
- /* SH5 is handled entirely in sh64-tdep.c. */
- if (info.bfd_arch_info->mach == bfd_mach_sh5)
-@@ -2257,6 +2244,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+ /* If there is already a candidate, use it. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+@@ -2268,6 +2254,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = XCNEW (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
@@ -731,7 +724,7 @@ index 336b48e..847b271 100644
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-@@ -2407,10 +2406,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+@@ -2422,10 +2420,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
}
@@ -745,7 +738,7 @@ index 336b48e..847b271 100644
frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
-index 666968f..62c65b5 100644
+index 59acd35b88..be3f998d84 100644
--- a/gdb/sh-tdep.h
+++ b/gdb/sh-tdep.h
@@ -21,6 +21,12 @@
@@ -828,7 +821,7 @@ index 666968f..62c65b5 100644
where each general-purpose register is stored inside the associated
core file section. */
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
-index 6d9aef8..5b66b42 100644
+index 9879f0ca47..cbc0e4d5f7 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -116,6 +116,11 @@ switch -glob -- [istarget] {
@@ -844,7 +837,7 @@ index 6d9aef8..5b66b42 100644
set asm-arch sh
set debug-flags "-gdwarf-2"
diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc
-index a4a5fc5..89efed7 100644
+index a4a5fc545e..89efed7795 100644
--- a/gdb/testsuite/gdb.asm/sh.inc
+++ b/gdb/testsuite/gdb.asm/sh.inc
@@ -40,9 +40,8 @@
@@ -859,7 +852,7 @@ index a4a5fc5..89efed7 100644
.align 1
.Lafterconst\@:
diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
-index 424e1b8..0de2e7b 100644
+index 424e1b8327..0de2e7b633 100644
--- a/gdb/testsuite/gdb.base/annota1.c
+++ b/gdb/testsuite/gdb.base/annota1.c
@@ -1,6 +1,9 @@
@@ -873,7 +866,7 @@ index 424e1b8..0de2e7b 100644
void
handle_USR1 (int sig)
diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
-index 424e1b8..952aaf21 100644
+index 424e1b8327..952aaf218a 100644
--- a/gdb/testsuite/gdb.base/annota3.c
+++ b/gdb/testsuite/gdb.base/annota3.c
@@ -1,6 +1,10 @@
@@ -888,7 +881,7 @@ index 424e1b8..952aaf21 100644
void
handle_USR1 (int sig)
diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c
-index 81f3b08..1574b2d 100644
+index 81f3b08d6b..1574b2d6cb 100644
--- a/gdb/testsuite/gdb.base/sigall.c
+++ b/gdb/testsuite/gdb.base/sigall.c
@@ -1,6 +1,9 @@
@@ -902,7 +895,7 @@ index 81f3b08..1574b2d 100644
/* Signal handlers, we set breakpoints in them to make sure that the
signals really get delivered. */
diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c
-index 7566068..1205a9b 100644
+index 756606880f..1205a9bc9c 100644
--- a/gdb/testsuite/gdb.base/signals.c
+++ b/gdb/testsuite/gdb.base/signals.c
@@ -3,6 +3,10 @@
@@ -917,5 +910,5 @@ index 7566068..1205a9b 100644
static int count = 0;
--
-2.8.2
+2.18.0
diff --git a/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch b/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
index 394d26d063..9ae3ee62be 100644
--- a/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
+++ b/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
@@ -1,7 +1,7 @@
-From f3932cb2960fd54655a448b13d5a5b80f356f8de Mon Sep 17 00:00:00 2001
+From 5fdd42acaa965be7c420a3f2ba12b77ea503c59b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 15:25:03 -0700
-Subject: [PATCH 06/10] Dont disable libreadline.a when using --disable-static
+Subject: [PATCH 06/11] Dont disable libreadline.a when using --disable-static
If gdb is configured with --disable-static then this is dutifully passed to
readline which then disables libreadline.a, which causes a problem when gdb
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile.def b/Makefile.def
-index ea8453e..0fc66c6 100644
+index 75063b6d12..c27bbe4d28 100644
--- a/Makefile.def
+++ b/Makefile.def
-@@ -104,7 +104,8 @@ host_modules= { module= libiconv;
+@@ -105,7 +105,8 @@ host_modules= { module= libiconv;
missing= install-html;
missing= install-info; };
host_modules= { module= m4; };
@@ -33,10 +33,10 @@ index ea8453e..0fc66c6 100644
host_modules= { module= sim; };
host_modules= { module= texinfo; no_install= true; };
diff --git a/Makefile.in b/Makefile.in
-index 2733c4d..3e04e80 100644
+index 7814fe745f..3b0dc7cbb0 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -25380,7 +25380,7 @@ configure-readline:
+@@ -25470,7 +25470,7 @@ configure-readline:
$$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
@@ -46,5 +46,5 @@ index 2733c4d..3e04e80 100644
@endif readline
--
-2.8.2
+2.18.0
diff --git a/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch b/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
index f32f8ee417..808f4bfa14 100644
--- a/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
+++ b/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
@@ -1,7 +1,7 @@
-From 048675a915a72989f2613386975730da016e7c5d Mon Sep 17 00:00:00 2001
+From d6e12d52f9cef7f5e6315003ceaa236f6cc7723b Mon Sep 17 00:00:00 2001
From: Andre McCurdy <amccurdy@gmail.com>
Date: Sat, 30 Apr 2016 15:29:06 -0700
-Subject: [PATCH 07/10] use <asm/sgidefs.h>
+Subject: [PATCH 07/11] use <asm/sgidefs.h>
Build fix for MIPS with musl libc
@@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index 449b43a..09603da 100644
+index 68a7587af2..2b77221372 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -31,7 +31,7 @@
@@ -30,7 +30,7 @@ index 449b43a..09603da 100644
+#include <asm/sgidefs.h>
#include "nat/gdb_ptrace.h"
#include <asm/ptrace.h>
-
+ #include "inf-ptrace.h"
--
-2.8.2
+2.18.0
diff --git a/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch b/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
index 7e58b617ad..95bec5fd60 100644
--- a/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
+++ b/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
@@ -1,7 +1,7 @@
-From e54ead9d81f4d38412751b815f909db3cb144bb1 Mon Sep 17 00:00:00 2001
+From bab0b34672727c50313eb98b8522355cbe1bde36 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 15:31:40 -0700
-Subject: [PATCH 08/10] Use exorted definitions of SIGRTMIN
+Subject: [PATCH] Use exorted definitions of SIGRTMIN
Define W_STOPCODE if not defined already
@@ -14,16 +14,17 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=13012
Upstream-Status: Submitted
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
gdb/linux-nat.c | 4 ++--
gdb/nat/linux-nat.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
-index 0829bcb..3b8a896 100644
+index 063afe26..fb1d2d5d 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
-@@ -4845,6 +4845,6 @@ lin_thread_get_thread_signals (sigset_t *set)
+@@ -4713,6 +4713,6 @@ lin_thread_get_thread_signals (sigset_t *set)
/* NPTL reserves the first two RT signals, but does not provide any
way for the debugger to query the signal numbers - fortunately
they don't change. */
@@ -33,18 +34,15 @@ index 0829bcb..3b8a896 100644
+ sigaddset (set, SIGRTMIN + 1);
}
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
-index 2b485db..d058afc 100644
+index 1e32dd9e..b886305d 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
-@@ -85,4 +85,8 @@ extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp);
+@@ -90,4 +90,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp);
- extern void linux_stop_lwp (struct lwp_info *lwp);
+ extern int lwp_is_stepping (struct lwp_info *lwp);
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+
- #endif /* LINUX_NAT_H */
---
-2.8.2
-
+ #endif /* NAT_LINUX_NAT_H */
diff --git a/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch b/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
index a230047af6..bc4bc26835 100644
--- a/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
+++ b/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
@@ -1,7 +1,7 @@
-From ba0bbf887d4911ccee9df57cb13eafb1de34bb31 Mon Sep 17 00:00:00 2001
+From ba6ffa461fe781d44d6dcbc0fbd569237b450fdc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 15:35:39 -0700
-Subject: [PATCH 09/10] Change order of CFLAGS
+Subject: [PATCH 09/11] Change order of CFLAGS
Lets us override Werror if need be
@@ -9,26 +9,22 @@ Upstream-Status: Inappropriate
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- gdb/gdbserver/Makefile.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ gdb/gdbserver/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
-index 1e874e3..91e8550 100644
+index f2f8a084bd..9528db1364 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
-@@ -138,10 +138,10 @@ CXXFLAGS = @CXXFLAGS@
- CPPFLAGS = @CPPFLAGS@
-
- # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
--INTERNAL_CFLAGS_BASE = ${COMPILER_CFLAGS} ${GLOBAL_CFLAGS} \
-+INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \
+@@ -143,7 +143,7 @@ CPPFLAGS = @CPPFLAGS@
+ INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
- INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
--INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
-+INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER
+ INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
+-INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
++INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER
# LDFLAGS is specifically reserved for setting from the command line
# when running make.
--
-2.8.2
+2.18.0
diff --git a/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch b/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
index 16c34c7035..809d52f250 100644
--- a/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
+++ b/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
@@ -1,7 +1,7 @@
-From 5a9ccb8c0728b658fc4f7f0f7b36873c64274f10 Mon Sep 17 00:00:00 2001
+From 19b581056c1709f7d2872cd76b977542a0fe6142 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 10 May 2016 08:47:05 -0700
-Subject: [PATCH 10/10] resolve restrict keyword conflict
+Subject: [PATCH 10/11] resolve restrict keyword conflict
GCC detects that we call 'restrict' as param name in function
signatures and complains since both params are called 'restrict'
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/gnulib/import/sys_time.in.h b/gdb/gnulib/import/sys_time.in.h
-index c556c5d..2a6107f 100644
+index b4a0e49c50..d22cea9aaf 100644
--- a/gdb/gnulib/import/sys_time.in.h
+++ b/gdb/gnulib/import/sys_time.in.h
@@ -93,20 +93,20 @@ struct timeval
@@ -42,7 +42,7 @@ index c556c5d..2a6107f 100644
+ (struct timeval *__restrict, void *__restrict));
# endif
_GL_CXXALIASWARN (gettimeofday);
- #elif defined GNULIB_POSIXCHECK
+ # if defined __cplusplus && defined GNULIB_NAMESPACE
--
-2.8.2
+2.18.0
diff --git a/meta/recipes-devtools/gdb/gdb/0011-Fix-invalid-sigprocmask-call.patch b/meta/recipes-devtools/gdb/gdb/0011-Fix-invalid-sigprocmask-call.patch
new file mode 100644
index 0000000000..bce025c391
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0011-Fix-invalid-sigprocmask-call.patch
@@ -0,0 +1,49 @@
+From b1985595e46721bb168ac38f4c841a915cc2f799 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Fri, 24 Mar 2017 10:36:03 +0800
+Subject: [PATCH 11/11] Fix invalid sigprocmask call
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The POSIX document says
+
+ The pthread_sigmask() and sigprocmask() functions shall fail if:
+
+ [EINVAL]
+ The value of the how argument is not equal to one of the defined values.
+
+and this is how musl-libc is currently doing. Fix the call to be safe
+and correct
+
+ [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html
+
+gdb/ChangeLog:
+2017-03-24 Yousong Zhou <yszhou4tech@gmail.com>
+
+ * common/signals-state-save-restore.c (save_original_signals_state):
+ Fix invalid sigprocmask call.
+
+Upstream-Status: Pending [not author, cherry-picked from LEDE https://bugs.lede-project.org/index.php?do=details&task_id=637&openedfrom=-1%2Bweek]
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/common/signals-state-save-restore.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdb/common/signals-state-save-restore.c b/gdb/common/signals-state-save-restore.c
+index 5bb66321bb..6597decbc6 100644
+--- a/gdb/common/signals-state-save-restore.c
++++ b/gdb/common/signals-state-save-restore.c
+@@ -41,7 +41,7 @@ save_original_signals_state (bool quiet)
+ int i;
+ int res;
+
+- res = sigprocmask (0, NULL, &original_signal_mask);
++ res = sigprocmask (SIG_BLOCK, NULL, &original_signal_mask);
+ if (res == -1)
+ perror_with_name (("sigprocmask"));
+
+--
+2.18.0
+
diff --git a/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch b/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch
deleted file mode 100644
index 209c4fcbdf..0000000000
--- a/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch
+++ /dev/null
@@ -1,2601 +0,0 @@
-gdb: Backport patch to support changes with AVX and MPX
-
-The current MPX target descriptions assume that MPX is always combined
-with AVX, however that's not correct. We can have machines with MPX
-and without AVX; or machines with AVX and without MPX.
-
-This patch adds new target descriptions for machines that support
-both MPX and AVX, as duplicates of the existing MPX descriptions.
-
-The following commit will remove AVX from the MPX-only descriptions.
-
-Upstream-Status: Backport
-
-Signed-off-by: bavery <brian.avery@intel.com>
-
-
-Orignal patch changelog and author attribution:
-
-2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
-
-gdb/ChangeLog:
-
- * amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
- New include.
- (amd64_linux_core_read_description): Add case for
- X86_XSTATE_AVX_MPX_MASK.
- (_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
- * amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
- * amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
- (amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
- (_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
- * common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
- (X86_XSTATE_AVX_MPX_MASK): New case.
- * features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
- (i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
- (i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
- (i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
- New expedites.
- * i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
- include.
- (i386_linux_core_read_description): Add case
- X86_XSTATE_AVX_MPX_MASK.
- (_initialize_i386_linux_tdep): Call
- initialize_tdesc_i386_avx_mpx_linux.
- * i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
- * i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
- (i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
- * x86-linux-nat.c (x86_linux_read_description): Add case for
- X86_XSTATE_AVX_MPX_MASK.
- * features/i386/amd64-avx-mpx-linux.xml: New file.
- * features/i386/i386-avx-mpx-linux.xml: New file.
- * features/i386/i386-avx-mpx.xml: New file.
- * features/i386/amd64-avx-mpx.xml: New file.
- * features/i386/amd64-avx-mpx-linux.c: Generated.
- * features/i386/amd64-avx-mpx.c: Generated.
- * features/i386/i386-avx-mpx-linux.c: Generated.
- * features/i386/i386-avx-mpx.c: Generated.
- * regformats/i386/amd64-avx-mpx-linux.dat: Generated.
- * regformats/i386/amd64-avx-mpx.dat: Generated.
- * regformats/i386/i386-avx-mpx-linux.dat: Generated.
- * regformats/i386/i386-avx-mpx.dat: Generated.
-
-gdb/gdbserver/ChangeLog:
-
- * Makefile.in (clean): Add removal for i386-avx-mpx.c,
- i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
- (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
- (amd64-avx-mpx-linux.c): New rules.
- (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
- * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
- (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
- (srv_amd64_regobj): Add amd64-avx-mpx.o.
- (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
- (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
- (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
- (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
- (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
- (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
- (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
- * linux-x86-low.c (x86_linux_read_description): Add case for
- X86_XSTATE_AVX_MPX_MASK.
- (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
- (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
- init_registers_i386_avx_mpx_linux.
- * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
- (initialize_low_tracepoint): Call
- init_registers_i386_avx_mpx_linux.
- * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
- (initialize_low_tracepoint): Call
- init_registers_amd64_avx_mpx_linux.
- * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
- (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
- (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
- declarations.
-
-
-
-
-diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
-index 21bcd99..5327f7c 100644
---- a/gdb/amd64-linux-tdep.c
-+++ b/gdb/amd64-linux-tdep.c
-@@ -43,6 +43,7 @@
- #include "features/i386/amd64-linux.c"
- #include "features/i386/amd64-avx-linux.c"
- #include "features/i386/amd64-mpx-linux.c"
-+#include "features/i386/amd64-avx-mpx-linux.c"
- #include "features/i386/amd64-avx512-linux.c"
-
- #include "features/i386/x32-linux.c"
-@@ -1590,6 +1591,11 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch,
- return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */
- else
- return tdesc_amd64_mpx_linux;
-+ case X86_XSTATE_AVX_MPX_MASK:
-+ if (gdbarch_ptr_bit (gdbarch) == 32)
-+ return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */
-+ else
-+ return tdesc_amd64_avx_mpx_linux;
- case X86_XSTATE_AVX_MASK:
- if (gdbarch_ptr_bit (gdbarch) == 32)
- return tdesc_x32_avx_linux;
-@@ -2285,6 +2291,7 @@ _initialize_amd64_linux_tdep (void)
- initialize_tdesc_amd64_linux ();
- initialize_tdesc_amd64_avx_linux ();
- initialize_tdesc_amd64_mpx_linux ();
-+ initialize_tdesc_amd64_avx_mpx_linux ();
- initialize_tdesc_amd64_avx512_linux ();
-
- initialize_tdesc_x32_linux ();
-diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h
-index 8673442..d64d5d6 100644
---- a/gdb/amd64-linux-tdep.h
-+++ b/gdb/amd64-linux-tdep.h
-@@ -35,6 +35,7 @@
- extern struct target_desc *tdesc_amd64_linux;
- extern struct target_desc *tdesc_amd64_avx_linux;
- extern struct target_desc *tdesc_amd64_mpx_linux;
-+extern struct target_desc *tdesc_amd64_avx_mpx_linux;
- extern struct target_desc *tdesc_amd64_avx512_linux;
-
- extern struct target_desc *tdesc_x32_linux;
-diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
-index fae92b2..88e3bf8 100644
---- a/gdb/amd64-tdep.c
-+++ b/gdb/amd64-tdep.c
-@@ -44,6 +44,7 @@
- #include "features/i386/amd64.c"
- #include "features/i386/amd64-avx.c"
- #include "features/i386/amd64-mpx.c"
-+#include "features/i386/amd64-avx-mpx.c"
- #include "features/i386/amd64-avx512.c"
-
- #include "features/i386/x32.c"
-@@ -3132,6 +3133,8 @@ amd64_target_description (uint64_t xcr0)
- return tdesc_amd64_avx512;
- case X86_XSTATE_MPX_MASK:
- return tdesc_amd64_mpx;
-+ case X86_XSTATE_AVX_MPX_MASK:
-+ return tdesc_amd64_avx_mpx;
- case X86_XSTATE_AVX_MASK:
- return tdesc_amd64_avx;
- default:
-@@ -3148,6 +3151,7 @@ _initialize_amd64_tdep (void)
- initialize_tdesc_amd64 ();
- initialize_tdesc_amd64_avx ();
- initialize_tdesc_amd64_mpx ();
-+ initialize_tdesc_amd64_avx_mpx ();
- initialize_tdesc_amd64_avx512 ();
-
- initialize_tdesc_x32 ();
-diff --git a/gdb/common/x86-xstate.h b/gdb/common/x86-xstate.h
-index 8386420..0aa9164 100644
---- a/gdb/common/x86-xstate.h
-+++ b/gdb/common/x86-xstate.h
-@@ -39,9 +39,10 @@
- #define X86_XSTATE_X87_MASK X86_XSTATE_X87
- #define X86_XSTATE_SSE_MASK (X86_XSTATE_X87 | X86_XSTATE_SSE)
- #define X86_XSTATE_AVX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_AVX)
--#define X86_XSTATE_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
-+#define X86_XSTATE_MPX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_MPX)
-+#define X86_XSTATE_AVX_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
- #define X86_XSTATE_AVX512_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_AVX512)
--#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_MPX_MASK | X86_XSTATE_AVX512)
-+#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_AVX_MPX_MASK | X86_XSTATE_AVX512)
-
- #define X86_XSTATE_ALL_MASK (X86_XSTATE_MPX_AVX512_MASK)
-
-diff --git a/gdb/features/Makefile b/gdb/features/Makefile
-index 10173cf..e5c5154 100644
---- a/gdb/features/Makefile
-+++ b/gdb/features/Makefile
-@@ -50,9 +50,11 @@ WHICH = aarch64 \
- i386/amd64 i386/amd64-linux \
- i386/i386-avx i386/i386-avx-linux \
- i386/i386-mpx i386/i386-mpx-linux \
-+ i386/i386-avx-mpx i386/i386-avx-mpx-linux \
- i386/i386-avx512 i386/i386-avx512-linux \
- i386/amd64-avx i386/amd64-avx-linux \
- i386/amd64-mpx i386/amd64-mpx-linux \
-+ i386/amd64-avx-mpx i386/amd64-avx-mpx-linux \
- i386/amd64-avx512 i386/amd64-avx512-linux \
- i386/x32 i386/x32-linux \
- i386/x32-avx i386/x32-avx-linux \
-@@ -83,7 +85,9 @@ i386/amd64-linux-expedite = rbp,rsp,rip
- i386/i386-avx-expedite = ebp,esp,eip
- i386/i386-avx-linux-expedite = ebp,esp,eip
- i386/i386-mpx-expedite = ebp,esp,eip
-+i386/i386-avx-mpx-expedite = ebp,esp,eip
- i386/i386-mpx-linux-expedite = ebp,esp,eip
-+i386/i386-avx-mpx-linux-expedite = ebp,esp,eip
- i386/i386-avx512-expedite = ebp,esp,eip
- i386/i386-avx512-linux-expedite = ebp,esp,eip
- i386/i386-mmx-expedite = ebp,esp,eip
-@@ -91,7 +95,9 @@ i386/i386-mmx-linux-expedite = ebp,esp,eip
- i386/amd64-avx-expedite = rbp,rsp,rip
- i386/amd64-avx-linux-expedite = rbp,rsp,rip
- i386/amd64-mpx-expedite = rbp,rsp,rip
-+i386/amd64-avx-mpx-expedite = rbp,rsp,rip
- i386/amd64-mpx-linux-expedite = rbp,rsp,rip
-+i386/amd64-avx-mpx-linux-expedite = rbp,rsp,rip
- i386/amd64-avx512-expedite = rbp,rsp,rip
- i386/amd64-avx512-linux-expedite = rbp,rsp,rip
- i386/x32-expedite = rbp,rsp,rip
-@@ -156,6 +162,8 @@ XMLTOC = \
- i386/amd64-linux.xml \
- i386/amd64-mpx-linux.xml \
- i386/amd64-mpx.xml \
-+ i386/amd64-avx-mpx-linux.xml \
-+ i386/amd64-avx-mpx.xml \
- i386/amd64.xml \
- i386/i386-avx-linux.xml \
- i386/i386-avx.xml \
-@@ -166,6 +174,8 @@ XMLTOC = \
- i386/i386-mmx.xml \
- i386/i386-mpx-linux.xml \
- i386/i386-mpx.xml \
-+ i386/i386-avx-mpx-linux.xml \
-+ i386/i386-avx-mpx.xml \
- i386/i386.xml \
- i386/x32-avx-linux.xml \
- i386/x32-avx.xml \
-@@ -271,6 +281,10 @@ $(outdir)/i386/i386-mpx.dat: i386/32bit-core.xml i386/32bit-avx.xml \
- i386/32bit-mpx.xml
- $(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
- i386/32bit-linux.xml i386/32bit-mpx.xml
-+$(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml \
-+ i386/32bit-linux.xml i386/32bit-mpx.xml
-+$(outdir)/i386/i386-avx-mpx-linux.dat: i386/32bit-core.xml \
-+ i386/32bit-linux.xml i386/32bit-mpx.xml
- $(outdir)/i386/i386-avx512.dat: i386/32bit-core.xml i386/32bit-avx.xml \
- i386/32bit-mpx.xml i386/32bit-avx512.xml
- $(outdir)/i386/i386-avx512-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
-@@ -282,8 +296,12 @@ $(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
- i386/64bit-linux.xml
- $(outdir)/i386/amd64-mpx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
- i386/64bit-linux.xml i386/64bit-mpx.xml
-+$(outdir)/i386/amd64-avx-mpx-linux.dat: i386/64bit-core.xml \
-+ i386/64bit-linux.xml i386/64bit-mpx.xml
- $(outdir)/i386/amd64-mpx.dat: i386/64bit-core.xml i386/64bit-avx.xml \
- i386/64bit-mpx.xml
-+$(outdir)/i386/amd64-avx-mpx.dat: i386/64bit-core.xml \
-+ i386/64bit-mpx.xml
- $(outdir)/i386/amd64-avx512.dat: i386/64bit-core.xml i386/64bit-avx.xml \
- i386/64bit-mpx.xml i386/64bit-avx512.xml
- $(outdir)/i386/amd64-avx512-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
-diff --git a/gdb/features/i386/amd64-avx-mpx-linux.c b/gdb/features/i386/amd64-avx-mpx-linux.c
-new file mode 100644
-index 0000000..37b4c81
---- /dev/null
-+++ b/gdb/features/i386/amd64-avx-mpx-linux.c
-@@ -0,0 +1,211 @@
-+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
-+ Original: amd64-avx-mpx-linux.xml */
-+
-+#include "defs.h"
-+#include "osabi.h"
-+#include "target-descriptions.h"
-+
-+struct target_desc *tdesc_amd64_avx_mpx_linux;
-+static void
-+initialize_tdesc_amd64_avx_mpx_linux (void)
-+{
-+ struct target_desc *result = allocate_target_description ();
-+ struct tdesc_feature *feature;
-+ struct tdesc_type *field_type;
-+ struct tdesc_type *type;
-+
-+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
-+
-+ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-+ tdesc_add_flag (field_type, 0, "CF");
-+ tdesc_add_flag (field_type, 1, "");
-+ tdesc_add_flag (field_type, 2, "PF");
-+ tdesc_add_flag (field_type, 4, "AF");
-+ tdesc_add_flag (field_type, 6, "ZF");
-+ tdesc_add_flag (field_type, 7, "SF");
-+ tdesc_add_flag (field_type, 8, "TF");
-+ tdesc_add_flag (field_type, 9, "IF");
-+ tdesc_add_flag (field_type, 10, "DF");
-+ tdesc_add_flag (field_type, 11, "OF");
-+ tdesc_add_flag (field_type, 14, "NT");
-+ tdesc_add_flag (field_type, 16, "RF");
-+ tdesc_add_flag (field_type, 17, "VM");
-+ tdesc_add_flag (field_type, 18, "AC");
-+ tdesc_add_flag (field_type, 19, "VIF");
-+ tdesc_add_flag (field_type, 20, "VIP");
-+ tdesc_add_flag (field_type, 21, "ID");
-+
-+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
-+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
-+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
-+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
-+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-+ field_type = tdesc_named_type (feature, "ieee_single");
-+ tdesc_create_vector (feature, "v4f", field_type, 4);
-+
-+ field_type = tdesc_named_type (feature, "ieee_double");
-+ tdesc_create_vector (feature, "v2d", field_type, 2);
-+
-+ field_type = tdesc_named_type (feature, "int8");
-+ tdesc_create_vector (feature, "v16i8", field_type, 16);
-+
-+ field_type = tdesc_named_type (feature, "int16");
-+ tdesc_create_vector (feature, "v8i16", field_type, 8);
-+
-+ field_type = tdesc_named_type (feature, "int32");
-+ tdesc_create_vector (feature, "v4i32", field_type, 4);
-+
-+ field_type = tdesc_named_type (feature, "int64");
-+ tdesc_create_vector (feature, "v2i64", field_type, 2);
-+
-+ type = tdesc_create_union (feature, "vec128");
-+ field_type = tdesc_named_type (feature, "v4f");
-+ tdesc_add_field (type, "v4_float", field_type);
-+ field_type = tdesc_named_type (feature, "v2d");
-+ tdesc_add_field (type, "v2_double", field_type);
-+ field_type = tdesc_named_type (feature, "v16i8");
-+ tdesc_add_field (type, "v16_int8", field_type);
-+ field_type = tdesc_named_type (feature, "v8i16");
-+ tdesc_add_field (type, "v8_int16", field_type);
-+ field_type = tdesc_named_type (feature, "v4i32");
-+ tdesc_add_field (type, "v4_int32", field_type);
-+ field_type = tdesc_named_type (feature, "v2i64");
-+ tdesc_add_field (type, "v2_int64", field_type);
-+ field_type = tdesc_named_type (feature, "uint128");
-+ tdesc_add_field (type, "uint128", field_type);
-+
-+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-+ tdesc_add_flag (field_type, 0, "IE");
-+ tdesc_add_flag (field_type, 1, "DE");
-+ tdesc_add_flag (field_type, 2, "ZE");
-+ tdesc_add_flag (field_type, 3, "OE");
-+ tdesc_add_flag (field_type, 4, "UE");
-+ tdesc_add_flag (field_type, 5, "PE");
-+ tdesc_add_flag (field_type, 6, "DAZ");
-+ tdesc_add_flag (field_type, 7, "IM");
-+ tdesc_add_flag (field_type, 8, "DM");
-+ tdesc_add_flag (field_type, 9, "ZM");
-+ tdesc_add_flag (field_type, 10, "OM");
-+ tdesc_add_flag (field_type, 11, "UM");
-+ tdesc_add_flag (field_type, 12, "PM");
-+ tdesc_add_flag (field_type, 15, "FZ");
-+
-+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
-+ tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-+ tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-+ type = tdesc_create_struct (feature, "br128");
-+ field_type = tdesc_named_type (feature, "uint64");
-+ tdesc_add_field (type, "lbound", field_type);
-+ field_type = tdesc_named_type (feature, "uint64");
-+ tdesc_add_field (type, "ubound_raw", field_type);
-+
-+ type = tdesc_create_struct (feature, "_bndstatus");
-+ tdesc_set_struct_size (type, 8);
-+ tdesc_add_bitfield (type, "bde", 2, 63);
-+ tdesc_add_bitfield (type, "error", 0, 1);
-+
-+ type = tdesc_create_union (feature, "status");
-+ field_type = tdesc_named_type (feature, "data_ptr");
-+ tdesc_add_field (type, "raw", field_type);
-+ field_type = tdesc_named_type (feature, "_bndstatus");
-+ tdesc_add_field (type, "status", field_type);
-+
-+ type = tdesc_create_struct (feature, "_bndcfgu");
-+ tdesc_set_struct_size (type, 8);
-+ tdesc_add_bitfield (type, "base", 12, 63);
-+ tdesc_add_bitfield (type, "reserved", 2, 11);
-+ tdesc_add_bitfield (type, "preserved", 1, 1);
-+ tdesc_add_bitfield (type, "enabled", 0, 0);
-+
-+ type = tdesc_create_union (feature, "cfgu");
-+ field_type = tdesc_named_type (feature, "data_ptr");
-+ tdesc_add_field (type, "raw", field_type);
-+ field_type = tdesc_named_type (feature, "_bndcfgu");
-+ tdesc_add_field (type, "config", field_type);
-+
-+ tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
-+ tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
-+
-+ tdesc_amd64_avx_mpx_linux = result;
-+}
-diff --git a/gdb/features/i386/amd64-avx-mpx-linux.xml b/gdb/features/i386/amd64-avx-mpx-linux.xml
-new file mode 100644
-index 0000000..526c700
---- /dev/null
-+++ b/gdb/features/i386/amd64-avx-mpx-linux.xml
-@@ -0,0 +1,19 @@
-+<?xml version="1.0"?>
-+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
-+
-+ Copying and distribution of this file, with or without modification,
-+ are permitted in any medium without royalty provided the copyright
-+ notice and this notice are preserved. -->
-+
-+<!-- AMD64 with AVX and MPX - Includes Linux-only special "register". -->
-+
-+<!DOCTYPE target SYSTEM "gdb-target.dtd">
-+<target>
-+ <architecture>i386:x86-64</architecture>
-+ <osabi>GNU/Linux</osabi>
-+ <xi:include href="64bit-core.xml"/>
-+ <xi:include href="64bit-sse.xml"/>
-+ <xi:include href="64bit-linux.xml"/>
-+ <xi:include href="64bit-avx.xml"/>
-+ <xi:include href="64bit-mpx.xml"/>
-+</target>
-diff --git a/gdb/features/i386/amd64-avx-mpx.c b/gdb/features/i386/amd64-avx-mpx.c
-new file mode 100644
-index 0000000..1279f73
---- /dev/null
-+++ b/gdb/features/i386/amd64-avx-mpx.c
-@@ -0,0 +1,206 @@
-+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
-+ Original: amd64-avx-mpx.xml */
-+
-+#include "defs.h"
-+#include "osabi.h"
-+#include "target-descriptions.h"
-+
-+struct target_desc *tdesc_amd64_avx_mpx;
-+static void
-+initialize_tdesc_amd64_avx_mpx (void)
-+{
-+ struct target_desc *result = allocate_target_description ();
-+ struct tdesc_feature *feature;
-+ struct tdesc_type *field_type;
-+ struct tdesc_type *type;
-+
-+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-+ tdesc_add_flag (field_type, 0, "CF");
-+ tdesc_add_flag (field_type, 1, "");
-+ tdesc_add_flag (field_type, 2, "PF");
-+ tdesc_add_flag (field_type, 4, "AF");
-+ tdesc_add_flag (field_type, 6, "ZF");
-+ tdesc_add_flag (field_type, 7, "SF");
-+ tdesc_add_flag (field_type, 8, "TF");
-+ tdesc_add_flag (field_type, 9, "IF");
-+ tdesc_add_flag (field_type, 10, "DF");
-+ tdesc_add_flag (field_type, 11, "OF");
-+ tdesc_add_flag (field_type, 14, "NT");
-+ tdesc_add_flag (field_type, 16, "RF");
-+ tdesc_add_flag (field_type, 17, "VM");
-+ tdesc_add_flag (field_type, 18, "AC");
-+ tdesc_add_flag (field_type, 19, "VIF");
-+ tdesc_add_flag (field_type, 20, "VIP");
-+ tdesc_add_flag (field_type, 21, "ID");
-+
-+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
-+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
-+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
-+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
-+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
-+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-+ field_type = tdesc_named_type (feature, "ieee_single");
-+ tdesc_create_vector (feature, "v4f", field_type, 4);
-+
-+ field_type = tdesc_named_type (feature, "ieee_double");
-+ tdesc_create_vector (feature, "v2d", field_type, 2);
-+
-+ field_type = tdesc_named_type (feature, "int8");
-+ tdesc_create_vector (feature, "v16i8", field_type, 16);
-+
-+ field_type = tdesc_named_type (feature, "int16");
-+ tdesc_create_vector (feature, "v8i16", field_type, 8);
-+
-+ field_type = tdesc_named_type (feature, "int32");
-+ tdesc_create_vector (feature, "v4i32", field_type, 4);
-+
-+ field_type = tdesc_named_type (feature, "int64");
-+ tdesc_create_vector (feature, "v2i64", field_type, 2);
-+
-+ type = tdesc_create_union (feature, "vec128");
-+ field_type = tdesc_named_type (feature, "v4f");
-+ tdesc_add_field (type, "v4_float", field_type);
-+ field_type = tdesc_named_type (feature, "v2d");
-+ tdesc_add_field (type, "v2_double", field_type);
-+ field_type = tdesc_named_type (feature, "v16i8");
-+ tdesc_add_field (type, "v16_int8", field_type);
-+ field_type = tdesc_named_type (feature, "v8i16");
-+ tdesc_add_field (type, "v8_int16", field_type);
-+ field_type = tdesc_named_type (feature, "v4i32");
-+ tdesc_add_field (type, "v4_int32", field_type);
-+ field_type = tdesc_named_type (feature, "v2i64");
-+ tdesc_add_field (type, "v2_int64", field_type);
-+ field_type = tdesc_named_type (feature, "uint128");
-+ tdesc_add_field (type, "uint128", field_type);
-+
-+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-+ tdesc_add_flag (field_type, 0, "IE");
-+ tdesc_add_flag (field_type, 1, "DE");
-+ tdesc_add_flag (field_type, 2, "ZE");
-+ tdesc_add_flag (field_type, 3, "OE");
-+ tdesc_add_flag (field_type, 4, "UE");
-+ tdesc_add_flag (field_type, 5, "PE");
-+ tdesc_add_flag (field_type, 6, "DAZ");
-+ tdesc_add_flag (field_type, 7, "IM");
-+ tdesc_add_flag (field_type, 8, "DM");
-+ tdesc_add_flag (field_type, 9, "ZM");
-+ tdesc_add_flag (field_type, 10, "OM");
-+ tdesc_add_flag (field_type, 11, "UM");
-+ tdesc_add_flag (field_type, 12, "PM");
-+ tdesc_add_flag (field_type, 15, "FZ");
-+
-+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-+ tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-+ type = tdesc_create_struct (feature, "br128");
-+ field_type = tdesc_named_type (feature, "uint64");
-+ tdesc_add_field (type, "lbound", field_type);
-+ field_type = tdesc_named_type (feature, "uint64");
-+ tdesc_add_field (type, "ubound_raw", field_type);
-+
-+ type = tdesc_create_struct (feature, "_bndstatus");
-+ tdesc_set_struct_size (type, 8);
-+ tdesc_add_bitfield (type, "bde", 2, 63);
-+ tdesc_add_bitfield (type, "error", 0, 1);
-+
-+ type = tdesc_create_union (feature, "status");
-+ field_type = tdesc_named_type (feature, "data_ptr");
-+ tdesc_add_field (type, "raw", field_type);
-+ field_type = tdesc_named_type (feature, "_bndstatus");
-+ tdesc_add_field (type, "status", field_type);
-+
-+ type = tdesc_create_struct (feature, "_bndcfgu");
-+ tdesc_set_struct_size (type, 8);
-+ tdesc_add_bitfield (type, "base", 12, 63);
-+ tdesc_add_bitfield (type, "reserved", 2, 11);
-+ tdesc_add_bitfield (type, "preserved", 1, 1);
-+ tdesc_add_bitfield (type, "enabled", 0, 0);
-+
-+ type = tdesc_create_union (feature, "cfgu");
-+ field_type = tdesc_named_type (feature, "data_ptr");
-+ tdesc_add_field (type, "raw", field_type);
-+ field_type = tdesc_named_type (feature, "_bndcfgu");
-+ tdesc_add_field (type, "config", field_type);
-+
-+ tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
-+ tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
-+
-+ tdesc_amd64_avx_mpx = result;
-+}
-diff --git a/gdb/features/i386/amd64-avx-mpx.xml b/gdb/features/i386/amd64-avx-mpx.xml
-new file mode 100644
-index 0000000..3eea6dd
---- /dev/null
-+++ b/gdb/features/i386/amd64-avx-mpx.xml
-@@ -0,0 +1,17 @@
-+<?xml version="1.0"?>
-+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
-+
-+ Copying and distribution of this file, with or without modification,
-+ are permitted in any medium without royalty provided the copyright
-+ notice and this notice are preserved. -->
-+
-+<!-- AMD64 with AVX and MPX -->
-+
-+<!DOCTYPE target SYSTEM "gdb-target.dtd">
-+<target>
-+ <architecture>i386:x86-64</architecture>
-+ <xi:include href="64bit-core.xml"/>
-+ <xi:include href="64bit-sse.xml"/>
-+ <xi:include href="64bit-avx.xml"/>
-+ <xi:include href="64bit-mpx.xml"/>
-+</target>
-diff --git a/gdb/features/i386/amd64-mpx-linux.c b/gdb/features/i386/amd64-mpx-linux.c
-index 86a1774..5c1584b 100644
---- a/gdb/features/i386/amd64-mpx-linux.c
-+++ b/gdb/features/i386/amd64-mpx-linux.c
-@@ -151,24 +151,6 @@ initialize_tdesc_amd64_mpx_linux (void)
- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
- tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
-
-- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-- tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
--
- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
- type = tdesc_create_struct (feature, "br128");
- field_type = tdesc_named_type (feature, "uint64");
-@@ -200,12 +182,12 @@ initialize_tdesc_amd64_mpx_linux (void)
- field_type = tdesc_named_type (feature, "_bndcfgu");
- tdesc_add_field (type, "config", field_type);
-
-- tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
-- tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
-+ tdesc_create_reg (feature, "bnd0raw", 58, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd1raw", 59, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd2raw", 60, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd3raw", 61, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bndcfgu", 62, 1, NULL, 64, "cfgu");
-+ tdesc_create_reg (feature, "bndstatus", 63, 1, NULL, 64, "status");
-
- tdesc_amd64_mpx_linux = result;
- }
-diff --git a/gdb/features/i386/amd64-mpx-linux.xml b/gdb/features/i386/amd64-mpx-linux.xml
-index 15e87b4..835126b 100644
---- a/gdb/features/i386/amd64-mpx-linux.xml
-+++ b/gdb/features/i386/amd64-mpx-linux.xml
-@@ -14,6 +14,5 @@
- <xi:include href="64bit-core.xml"/>
- <xi:include href="64bit-sse.xml"/>
- <xi:include href="64bit-linux.xml"/>
-- <xi:include href="64bit-avx.xml"/>
- <xi:include href="64bit-mpx.xml"/>
- </target>
-diff --git a/gdb/features/i386/amd64-mpx.c b/gdb/features/i386/amd64-mpx.c
-index 15ae5f7..4c852ef 100644
---- a/gdb/features/i386/amd64-mpx.c
-+++ b/gdb/features/i386/amd64-mpx.c
-@@ -146,24 +146,6 @@ initialize_tdesc_amd64_mpx (void)
- tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
- tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
-
-- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-- tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
--
- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
- type = tdesc_create_struct (feature, "br128");
- field_type = tdesc_named_type (feature, "uint64");
-@@ -195,12 +177,12 @@ initialize_tdesc_amd64_mpx (void)
- field_type = tdesc_named_type (feature, "_bndcfgu");
- tdesc_add_field (type, "config", field_type);
-
-- tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
-- tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
-+ tdesc_create_reg (feature, "bnd0raw", 57, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd1raw", 58, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd2raw", 59, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd3raw", 60, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bndcfgu", 61, 1, NULL, 64, "cfgu");
-+ tdesc_create_reg (feature, "bndstatus", 62, 1, NULL, 64, "status");
-
- tdesc_amd64_mpx = result;
- }
-diff --git a/gdb/features/i386/amd64-mpx.xml b/gdb/features/i386/amd64-mpx.xml
-index 21b6df3..e458736 100644
---- a/gdb/features/i386/amd64-mpx.xml
-+++ b/gdb/features/i386/amd64-mpx.xml
-@@ -12,6 +12,5 @@
- <architecture>i386:x86-64</architecture>
- <xi:include href="64bit-core.xml"/>
- <xi:include href="64bit-sse.xml"/>
-- <xi:include href="64bit-avx.xml"/>
- <xi:include href="64bit-mpx.xml"/>
- </target>
-diff --git a/gdb/features/i386/i386-avx-mpx-linux.c b/gdb/features/i386/i386-avx-mpx-linux.c
-new file mode 100644
-index 0000000..dd75403
---- /dev/null
-+++ b/gdb/features/i386/i386-avx-mpx-linux.c
-@@ -0,0 +1,187 @@
-+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
-+ Original: i386-avx-mpx-linux.xml */
-+
-+#include "defs.h"
-+#include "osabi.h"
-+#include "target-descriptions.h"
-+
-+struct target_desc *tdesc_i386_avx_mpx_linux;
-+static void
-+initialize_tdesc_i386_avx_mpx_linux (void)
-+{
-+ struct target_desc *result = allocate_target_description ();
-+ struct tdesc_feature *feature;
-+ struct tdesc_type *field_type;
-+ struct tdesc_type *type;
-+
-+ set_tdesc_architecture (result, bfd_scan_arch ("i386"));
-+
-+ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-+ tdesc_add_flag (field_type, 0, "CF");
-+ tdesc_add_flag (field_type, 1, "");
-+ tdesc_add_flag (field_type, 2, "PF");
-+ tdesc_add_flag (field_type, 4, "AF");
-+ tdesc_add_flag (field_type, 6, "ZF");
-+ tdesc_add_flag (field_type, 7, "SF");
-+ tdesc_add_flag (field_type, 8, "TF");
-+ tdesc_add_flag (field_type, 9, "IF");
-+ tdesc_add_flag (field_type, 10, "DF");
-+ tdesc_add_flag (field_type, 11, "OF");
-+ tdesc_add_flag (field_type, 14, "NT");
-+ tdesc_add_flag (field_type, 16, "RF");
-+ tdesc_add_flag (field_type, 17, "VM");
-+ tdesc_add_flag (field_type, 18, "AC");
-+ tdesc_add_flag (field_type, 19, "VIF");
-+ tdesc_add_flag (field_type, 20, "VIP");
-+ tdesc_add_flag (field_type, 21, "ID");
-+
-+ tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
-+ tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
-+ tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
-+ tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
-+ tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-+ field_type = tdesc_named_type (feature, "ieee_single");
-+ tdesc_create_vector (feature, "v4f", field_type, 4);
-+
-+ field_type = tdesc_named_type (feature, "ieee_double");
-+ tdesc_create_vector (feature, "v2d", field_type, 2);
-+
-+ field_type = tdesc_named_type (feature, "int8");
-+ tdesc_create_vector (feature, "v16i8", field_type, 16);
-+
-+ field_type = tdesc_named_type (feature, "int16");
-+ tdesc_create_vector (feature, "v8i16", field_type, 8);
-+
-+ field_type = tdesc_named_type (feature, "int32");
-+ tdesc_create_vector (feature, "v4i32", field_type, 4);
-+
-+ field_type = tdesc_named_type (feature, "int64");
-+ tdesc_create_vector (feature, "v2i64", field_type, 2);
-+
-+ type = tdesc_create_union (feature, "vec128");
-+ field_type = tdesc_named_type (feature, "v4f");
-+ tdesc_add_field (type, "v4_float", field_type);
-+ field_type = tdesc_named_type (feature, "v2d");
-+ tdesc_add_field (type, "v2_double", field_type);
-+ field_type = tdesc_named_type (feature, "v16i8");
-+ tdesc_add_field (type, "v16_int8", field_type);
-+ field_type = tdesc_named_type (feature, "v8i16");
-+ tdesc_add_field (type, "v8_int16", field_type);
-+ field_type = tdesc_named_type (feature, "v4i32");
-+ tdesc_add_field (type, "v4_int32", field_type);
-+ field_type = tdesc_named_type (feature, "v2i64");
-+ tdesc_add_field (type, "v2_int64", field_type);
-+ field_type = tdesc_named_type (feature, "uint128");
-+ tdesc_add_field (type, "uint128", field_type);
-+
-+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-+ tdesc_add_flag (field_type, 0, "IE");
-+ tdesc_add_flag (field_type, 1, "DE");
-+ tdesc_add_flag (field_type, 2, "ZE");
-+ tdesc_add_flag (field_type, 3, "OE");
-+ tdesc_add_flag (field_type, 4, "UE");
-+ tdesc_add_flag (field_type, 5, "PE");
-+ tdesc_add_flag (field_type, 6, "DAZ");
-+ tdesc_add_flag (field_type, 7, "IM");
-+ tdesc_add_flag (field_type, 8, "DM");
-+ tdesc_add_flag (field_type, 9, "ZM");
-+ tdesc_add_flag (field_type, 10, "OM");
-+ tdesc_add_flag (field_type, 11, "UM");
-+ tdesc_add_flag (field_type, 12, "PM");
-+ tdesc_add_flag (field_type, 15, "FZ");
-+
-+ tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
-+ tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-+ tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-+ type = tdesc_create_struct (feature, "br128");
-+ field_type = tdesc_named_type (feature, "uint64");
-+ tdesc_add_field (type, "lbound", field_type);
-+ field_type = tdesc_named_type (feature, "uint64");
-+ tdesc_add_field (type, "ubound_raw", field_type);
-+
-+ type = tdesc_create_struct (feature, "_bndstatus");
-+ tdesc_set_struct_size (type, 8);
-+ tdesc_add_bitfield (type, "bde", 2, 31);
-+ tdesc_add_bitfield (type, "error", 0, 1);
-+
-+ type = tdesc_create_union (feature, "status");
-+ field_type = tdesc_named_type (feature, "data_ptr");
-+ tdesc_add_field (type, "raw", field_type);
-+ field_type = tdesc_named_type (feature, "_bndstatus");
-+ tdesc_add_field (type, "status", field_type);
-+
-+ type = tdesc_create_struct (feature, "_bndcfgu");
-+ tdesc_set_struct_size (type, 8);
-+ tdesc_add_bitfield (type, "base", 12, 31);
-+ tdesc_add_bitfield (type, "reserved", 2, 11);
-+ tdesc_add_bitfield (type, "preserved", 1, 1);
-+ tdesc_add_bitfield (type, "enabled", 0, 1);
-+
-+ type = tdesc_create_union (feature, "cfgu");
-+ field_type = tdesc_named_type (feature, "data_ptr");
-+ tdesc_add_field (type, "raw", field_type);
-+ field_type = tdesc_named_type (feature, "_bndcfgu");
-+ tdesc_add_field (type, "config", field_type);
-+
-+ tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
-+ tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
-+
-+ tdesc_i386_avx_mpx_linux = result;
-+}
-diff --git a/gdb/features/i386/i386-avx-mpx-linux.xml b/gdb/features/i386/i386-avx-mpx-linux.xml
-new file mode 100644
-index 0000000..c9a1a61
---- /dev/null
-+++ b/gdb/features/i386/i386-avx-mpx-linux.xml
-@@ -0,0 +1,19 @@
-+<?xml version="1.0"?>
-+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
-+
-+ Copying and distribution of this file, with or without modification,
-+ are permitted in any medium without royalty provided the copyright
-+ notice and this notice are preserved. -->
-+
-+<!-- I386 with AVX and MPX- Includes Linux-only special "register". -->
-+
-+<!DOCTYPE target SYSTEM "gdb-target.dtd">
-+<target>
-+ <architecture>i386</architecture>
-+ <osabi>GNU/Linux</osabi>
-+ <xi:include href="32bit-core.xml"/>
-+ <xi:include href="32bit-sse.xml"/>
-+ <xi:include href="32bit-linux.xml"/>
-+ <xi:include href="32bit-avx.xml"/>
-+ <xi:include href="32bit-mpx.xml"/>
-+</target>
-diff --git a/gdb/features/i386/i386-avx-mpx.c b/gdb/features/i386/i386-avx-mpx.c
-new file mode 100644
-index 0000000..f104e4b
---- /dev/null
-+++ b/gdb/features/i386/i386-avx-mpx.c
-@@ -0,0 +1,182 @@
-+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
-+ Original: i386-avx-mpx.xml */
-+
-+#include "defs.h"
-+#include "osabi.h"
-+#include "target-descriptions.h"
-+
-+struct target_desc *tdesc_i386_avx_mpx;
-+static void
-+initialize_tdesc_i386_avx_mpx (void)
-+{
-+ struct target_desc *result = allocate_target_description ();
-+ struct tdesc_feature *feature;
-+ struct tdesc_type *field_type;
-+ struct tdesc_type *type;
-+
-+ set_tdesc_architecture (result, bfd_scan_arch ("i386"));
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-+ tdesc_add_flag (field_type, 0, "CF");
-+ tdesc_add_flag (field_type, 1, "");
-+ tdesc_add_flag (field_type, 2, "PF");
-+ tdesc_add_flag (field_type, 4, "AF");
-+ tdesc_add_flag (field_type, 6, "ZF");
-+ tdesc_add_flag (field_type, 7, "SF");
-+ tdesc_add_flag (field_type, 8, "TF");
-+ tdesc_add_flag (field_type, 9, "IF");
-+ tdesc_add_flag (field_type, 10, "DF");
-+ tdesc_add_flag (field_type, 11, "OF");
-+ tdesc_add_flag (field_type, 14, "NT");
-+ tdesc_add_flag (field_type, 16, "RF");
-+ tdesc_add_flag (field_type, 17, "VM");
-+ tdesc_add_flag (field_type, 18, "AC");
-+ tdesc_add_flag (field_type, 19, "VIF");
-+ tdesc_add_flag (field_type, 20, "VIP");
-+ tdesc_add_flag (field_type, 21, "ID");
-+
-+ tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
-+ tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
-+ tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
-+ tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
-+ tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
-+ tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
-+ tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
-+ tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-+ field_type = tdesc_named_type (feature, "ieee_single");
-+ tdesc_create_vector (feature, "v4f", field_type, 4);
-+
-+ field_type = tdesc_named_type (feature, "ieee_double");
-+ tdesc_create_vector (feature, "v2d", field_type, 2);
-+
-+ field_type = tdesc_named_type (feature, "int8");
-+ tdesc_create_vector (feature, "v16i8", field_type, 16);
-+
-+ field_type = tdesc_named_type (feature, "int16");
-+ tdesc_create_vector (feature, "v8i16", field_type, 8);
-+
-+ field_type = tdesc_named_type (feature, "int32");
-+ tdesc_create_vector (feature, "v4i32", field_type, 4);
-+
-+ field_type = tdesc_named_type (feature, "int64");
-+ tdesc_create_vector (feature, "v2i64", field_type, 2);
-+
-+ type = tdesc_create_union (feature, "vec128");
-+ field_type = tdesc_named_type (feature, "v4f");
-+ tdesc_add_field (type, "v4_float", field_type);
-+ field_type = tdesc_named_type (feature, "v2d");
-+ tdesc_add_field (type, "v2_double", field_type);
-+ field_type = tdesc_named_type (feature, "v16i8");
-+ tdesc_add_field (type, "v16_int8", field_type);
-+ field_type = tdesc_named_type (feature, "v8i16");
-+ tdesc_add_field (type, "v8_int16", field_type);
-+ field_type = tdesc_named_type (feature, "v4i32");
-+ tdesc_add_field (type, "v4_int32", field_type);
-+ field_type = tdesc_named_type (feature, "v2i64");
-+ tdesc_add_field (type, "v2_int64", field_type);
-+ field_type = tdesc_named_type (feature, "uint128");
-+ tdesc_add_field (type, "uint128", field_type);
-+
-+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-+ tdesc_add_flag (field_type, 0, "IE");
-+ tdesc_add_flag (field_type, 1, "DE");
-+ tdesc_add_flag (field_type, 2, "ZE");
-+ tdesc_add_flag (field_type, 3, "OE");
-+ tdesc_add_flag (field_type, 4, "UE");
-+ tdesc_add_flag (field_type, 5, "PE");
-+ tdesc_add_flag (field_type, 6, "DAZ");
-+ tdesc_add_flag (field_type, 7, "IM");
-+ tdesc_add_flag (field_type, 8, "DM");
-+ tdesc_add_flag (field_type, 9, "ZM");
-+ tdesc_add_flag (field_type, 10, "OM");
-+ tdesc_add_flag (field_type, 11, "UM");
-+ tdesc_add_flag (field_type, 12, "PM");
-+ tdesc_add_flag (field_type, 15, "FZ");
-+
-+ tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
-+ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-+ tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
-+ tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
-+
-+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-+ type = tdesc_create_struct (feature, "br128");
-+ field_type = tdesc_named_type (feature, "uint64");
-+ tdesc_add_field (type, "lbound", field_type);
-+ field_type = tdesc_named_type (feature, "uint64");
-+ tdesc_add_field (type, "ubound_raw", field_type);
-+
-+ type = tdesc_create_struct (feature, "_bndstatus");
-+ tdesc_set_struct_size (type, 8);
-+ tdesc_add_bitfield (type, "bde", 2, 31);
-+ tdesc_add_bitfield (type, "error", 0, 1);
-+
-+ type = tdesc_create_union (feature, "status");
-+ field_type = tdesc_named_type (feature, "data_ptr");
-+ tdesc_add_field (type, "raw", field_type);
-+ field_type = tdesc_named_type (feature, "_bndstatus");
-+ tdesc_add_field (type, "status", field_type);
-+
-+ type = tdesc_create_struct (feature, "_bndcfgu");
-+ tdesc_set_struct_size (type, 8);
-+ tdesc_add_bitfield (type, "base", 12, 31);
-+ tdesc_add_bitfield (type, "reserved", 2, 11);
-+ tdesc_add_bitfield (type, "preserved", 1, 1);
-+ tdesc_add_bitfield (type, "enabled", 0, 1);
-+
-+ type = tdesc_create_union (feature, "cfgu");
-+ field_type = tdesc_named_type (feature, "data_ptr");
-+ tdesc_add_field (type, "raw", field_type);
-+ field_type = tdesc_named_type (feature, "_bndcfgu");
-+ tdesc_add_field (type, "config", field_type);
-+
-+ tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
-+ tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
-+
-+ tdesc_i386_avx_mpx = result;
-+}
-diff --git a/gdb/features/i386/i386-avx-mpx.xml b/gdb/features/i386/i386-avx-mpx.xml
-new file mode 100644
-index 0000000..ab97367
---- /dev/null
-+++ b/gdb/features/i386/i386-avx-mpx.xml
-@@ -0,0 +1,17 @@
-+<?xml version="1.0"?>
-+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
-+
-+ Copying and distribution of this file, with or without modification,
-+ are permitted in any medium without royalty provided the copyright
-+ notice and this notice are preserved. -->
-+
-+<!-- I386 with AVX and MPX -->
-+
-+<!DOCTYPE target SYSTEM "gdb-target.dtd">
-+<target>
-+ <architecture>i386</architecture>
-+ <xi:include href="32bit-core.xml"/>
-+ <xi:include href="32bit-sse.xml"/>
-+ <xi:include href="32bit-avx.xml"/>
-+ <xi:include href="32bit-mpx.xml"/>
-+</target>
-diff --git a/gdb/features/i386/i386-mpx-linux.c b/gdb/features/i386/i386-mpx-linux.c
-index dbf8789..c6bafea 100644
---- a/gdb/features/i386/i386-mpx-linux.c
-+++ b/gdb/features/i386/i386-mpx-linux.c
-@@ -135,16 +135,6 @@ initialize_tdesc_i386_mpx_linux (void)
- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
- tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
-
-- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-- tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
--
- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
- type = tdesc_create_struct (feature, "br128");
- field_type = tdesc_named_type (feature, "uint64");
-@@ -176,12 +166,12 @@ initialize_tdesc_i386_mpx_linux (void)
- field_type = tdesc_named_type (feature, "_bndcfgu");
- tdesc_add_field (type, "config", field_type);
-
-- tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
-- tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
-+ tdesc_create_reg (feature, "bnd0raw", 42, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd1raw", 43, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd2raw", 44, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd3raw", 45, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bndcfgu", 46, 1, NULL, 64, "cfgu");
-+ tdesc_create_reg (feature, "bndstatus", 47, 1, NULL, 64, "status");
-
- tdesc_i386_mpx_linux = result;
- }
-diff --git a/gdb/features/i386/i386-mpx-linux.xml b/gdb/features/i386/i386-mpx-linux.xml
-index c4004d6..4228cf5 100644
---- a/gdb/features/i386/i386-mpx-linux.xml
-+++ b/gdb/features/i386/i386-mpx-linux.xml
-@@ -14,6 +14,5 @@
- <xi:include href="32bit-core.xml"/>
- <xi:include href="32bit-sse.xml"/>
- <xi:include href="32bit-linux.xml"/>
-- <xi:include href="32bit-avx.xml"/>
- <xi:include href="32bit-mpx.xml"/>
- </target>
-diff --git a/gdb/features/i386/i386-mpx.c b/gdb/features/i386/i386-mpx.c
-index 1e04afd..430db3f 100644
---- a/gdb/features/i386/i386-mpx.c
-+++ b/gdb/features/i386/i386-mpx.c
-@@ -130,16 +130,6 @@ initialize_tdesc_i386_mpx (void)
- tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
- tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
-
-- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-- tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
-- tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
--
- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
- type = tdesc_create_struct (feature, "br128");
- field_type = tdesc_named_type (feature, "uint64");
-@@ -171,12 +161,12 @@ initialize_tdesc_i386_mpx (void)
- field_type = tdesc_named_type (feature, "_bndcfgu");
- tdesc_add_field (type, "config", field_type);
-
-- tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
-- tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
-- tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
-+ tdesc_create_reg (feature, "bnd0raw", 41, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd1raw", 42, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd2raw", 43, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bnd3raw", 44, 1, NULL, 128, "br128");
-+ tdesc_create_reg (feature, "bndcfgu", 45, 1, NULL, 64, "cfgu");
-+ tdesc_create_reg (feature, "bndstatus", 46, 1, NULL, 64, "status");
-
- tdesc_i386_mpx = result;
- }
-diff --git a/gdb/features/i386/i386-mpx.xml b/gdb/features/i386/i386-mpx.xml
-index 52a68db..c1806cb 100644
---- a/gdb/features/i386/i386-mpx.xml
-+++ b/gdb/features/i386/i386-mpx.xml
-@@ -12,6 +12,5 @@
- <architecture>i386</architecture>
- <xi:include href="32bit-core.xml"/>
- <xi:include href="32bit-sse.xml"/>
-- <xi:include href="32bit-avx.xml"/>
- <xi:include href="32bit-mpx.xml"/>
- </target>
-diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
-index 1e874e3..dee2ea1 100644
---- a/gdb/gdbserver/Makefile.in
-+++ b/gdb/gdbserver/Makefile.in
-@@ -376,9 +376,11 @@ clean:
- rm -f xml-builtin.c stamp-xml
- rm -f i386-avx.c i386-avx-linux.c
- rm -f i386-mpx.c i386-mpx-linux.c
-+ rm -f i386-avx-mpx.c i386-avx-mpx-linux.c
- rm -f i386-avx512.c i386-avx512-linux.c
- rm -f amd64-avx.c amd64-avx-linux.c
- rm -f amd64-mpx.c amd64-mpx-linux.c
-+ rm -f amd64-avx-mpx.c amd64-avx-mpx-linux.c
- rm -f amd64-avx512.c amd64-avx512-linux.c
- rm -f i386-mmx.c i386-mmx-linux.c
- rm -f x32.c x32-linux.c
-@@ -495,6 +497,21 @@ regcache-ipa.o: regcache.c
- i386-linux-ipa.o: i386-linux.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-+i386-mmx-linux-ipa.o: i386-mmx-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
-+i386-avx-linux-ipa.o: i386-avx-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
-+i386-mpx-linux-ipa.o: i386-mpx-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
-+i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
-+i386-avx512-linux-ipa.o: i386-avx512-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
- linux-i386-ipa.o: linux-i386-ipa.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-@@ -504,6 +521,18 @@ linux-amd64-ipa.o: linux-amd64-ipa.c
- amd64-linux-ipa.o: amd64-linux.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-+amd64-avx-linux-ipa.o: amd64-avx-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
-+amd64-mpx-linux-ipa.o: amd64-mpx-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
-+amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
-+amd64-avx512-linux-ipa.o: amd64-avx512-linux.c
-+ $(IPAGENT_COMPILE) $<
-+ $(POSTCOMPILE)
- linux-aarch64-ipa.o: linux-aarch64-ipa.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-@@ -694,6 +723,10 @@ i386-mpx.c : $(srcdir)/../regformats/i386/i386-mpx.dat $(regdat_sh)
- $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx.dat i386-mpx.c
- i386-mpx-linux.c : $(srcdir)/../regformats/i386/i386-mpx-linux.dat $(regdat_sh)
- $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx-linux.dat i386-mpx-linux.c
-+i386-avx-mpx.c : $(srcdir)/../regformats/i386/i386-avx-mpx.dat $(regdat_sh)
-+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx.dat i386-avx-mpx.c
-+i386-avx-mpx-linux.c : $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat $(regdat_sh)
-+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat i386-avx-mpx-linux.c
- i386-mmx.c : $(srcdir)/../regformats/i386/i386-mmx.dat $(regdat_sh)
- $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mmx.dat i386-mmx.c
- i386-mmx-linux.c : $(srcdir)/../regformats/i386/i386-mmx-linux.dat $(regdat_sh)
-@@ -808,6 +841,10 @@ amd64-mpx.c : $(srcdir)/../regformats/i386/amd64-mpx.dat $(regdat_sh)
- $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx.dat amd64-mpx.c
- amd64-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-mpx-linux.dat $(regdat_sh)
- $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx-linux.dat amd64-mpx-linux.c
-+amd64-avx-mpx.c : $(srcdir)/../regformats/i386/amd64-avx-mpx.dat $(regdat_sh)
-+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx.dat amd64-avx-mpx.c
-+amd64-avx-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat $(regdat_sh)
-+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat amd64-avx-mpx-linux.c
- x32.c : $(srcdir)/../regformats/i386/x32.dat $(regdat_sh)
- $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32.dat x32.c
- x32-linux.c : $(srcdir)/../regformats/i386/x32-linux.dat $(regdat_sh)
-diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
-index a54b9e7..4935a36 100644
---- a/gdb/gdbserver/configure.srv
-+++ b/gdb/gdbserver/configure.srv
-@@ -24,20 +24,23 @@
- # Default hostio_last_error implementation
- srv_hostio_err_objs="hostio-errno.o"
-
--srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-mmx.o"
--srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-mmx-linux.o"
--srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o x32.o x32-avx.o x32-avx512.o"
--srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o"
-+srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-avx-mpx.o i386-mmx.o"
-+srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-avx-mpx-linux.o i386-mmx-linux.o"
-+srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o amd64-avx-mpx.o x32.o x32-avx.o x32-avx512.o"
-+srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o amd64-avx-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o"
-+
-+
-+ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o i386-avx-mpx-linux-ipa.o i386-avx512-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o"
-+ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx512-linux-ipa.o amd64-mpx-linux-ipa.o"
-
--ipa_i386_linux_regobj=i386-linux-ipa.o
--ipa_amd64_linux_regobj=amd64-linux-ipa.o
-
- srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml"
- srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml i386/64bit-avx512.xml i386/x32-core.xml i386/64bit-mpx.xml"
--srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
--srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml $srv_i386_64bit_xmlfiles"
--srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml $srv_i386_32bit_xmlfiles"
--srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles"
-+srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-avx-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
-+srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml i386/amd64-avx-mpx.xml $srv_i386_64bit_xmlfiles"
-+srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml i386/i386-avx-mpx-linux.xml $srv_i386_32bit_xmlfiles"
-+srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/amd64-avx-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles"
-+
-
-
- # Linux object files. This is so we don't have to repeat
-diff --git a/gdb/gdbserver/linux-aarch64-ipa.c b/gdb/gdbserver/linux-aarch64-ipa.c
-index 758708d..f1eaa70 100644
---- a/gdb/gdbserver/linux-aarch64-ipa.c
-+++ b/gdb/gdbserver/linux-aarch64-ipa.c
-@@ -143,9 +143,18 @@ gdb_agent_get_raw_reg (const unsigned char *raw_regs, int regnum)
- + aarch64_ft_collect_regmap[regnum] * FT_CR_SIZE);
- }
-
-+/* Return target_desc to use for IPA, given the tdesc index passed by
-+ gdbserver. Index is ignored, since we have only one tdesc
-+ at the moment. */
-+
-+const struct target_desc *
-+get_ipa_tdesc (int idx)
-+{
-+ return tdesc_aarch64;
-+}
-+
- void
- initialize_low_tracepoint (void)
- {
- init_registers_aarch64 ();
-- ipa_tdesc = tdesc_aarch64;
- }
-diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c
-index 2eeedcd..f9c72a0 100644
---- a/gdb/gdbserver/linux-amd64-ipa.c
-+++ b/gdb/gdbserver/linux-amd64-ipa.c
-@@ -20,6 +20,7 @@
-
- #include "server.h"
- #include "tracepoint.h"
-+#include "linux-x86-tdesc.h"
-
- /* Defined in auto-generated file amd64-linux.c. */
- void init_registers_amd64_linux (void);
-@@ -166,9 +167,37 @@ supply_static_tracepoint_registers (struct regcache *regcache,
-
- #endif /* HAVE_UST */
-
-+/* Return target_desc to use for IPA, given the tdesc index passed by
-+ gdbserver. */
-+
-+const struct target_desc *
-+get_ipa_tdesc (int idx)
-+{
-+ switch (idx)
-+ {
-+ case X86_TDESC_SSE:
-+ return tdesc_amd64_linux;
-+ case X86_TDESC_AVX:
-+ return tdesc_amd64_avx_linux;
-+ case X86_TDESC_MPX:
-+ return tdesc_amd64_mpx_linux;
-+ case X86_TDESC_AVX_MPX:
-+ return tdesc_amd64_avx_mpx_linux;
-+ case X86_TDESC_AVX512:
-+ return tdesc_amd64_avx512_linux;
-+ default:
-+ internal_error (__FILE__, __LINE__,
-+ "unknown ipa tdesc index: %d", idx);
-+ return tdesc_amd64_linux;
-+ }
-+}
-+
- void
- initialize_low_tracepoint (void)
- {
- init_registers_amd64_linux ();
-- ipa_tdesc = tdesc_amd64_linux;
-+ init_registers_amd64_avx_linux ();
-+ init_registers_amd64_avx_mpx_linux ();
-+ init_registers_amd64_mpx_linux ();
-+ init_registers_amd64_avx512_linux ();
- }
-diff --git a/gdb/gdbserver/linux-i386-ipa.c b/gdb/gdbserver/linux-i386-ipa.c
-index 11dc038..d7a8e7d 100644
---- a/gdb/gdbserver/linux-i386-ipa.c
-+++ b/gdb/gdbserver/linux-i386-ipa.c
-@@ -21,6 +21,7 @@
- #include "server.h"
- #include <sys/mman.h>
- #include "tracepoint.h"
-+#include "linux-x86-tdesc.h"
-
- /* GDB register numbers. */
-
-@@ -47,10 +48,6 @@ enum i386_gdb_regnum
-
- #define i386_num_regs 16
-
--/* Defined in auto-generated file i386-linux.c. */
--void init_registers_i386_linux (void);
--extern const struct target_desc *tdesc_i386_linux;
--
- #define FT_CR_EAX 15
- #define FT_CR_ECX 14
- #define FT_CR_EDX 13
-@@ -247,10 +244,40 @@ initialize_fast_tracepoint_trampoline_buffer (void)
- }
- }
-
-+/* Return target_desc to use for IPA, given the tdesc index passed by
-+ gdbserver. */
-+
-+const struct target_desc *
-+get_ipa_tdesc (int idx)
-+{
-+ switch (idx)
-+ {
-+ case X86_TDESC_MMX:
-+ return tdesc_i386_mmx_linux;
-+ case X86_TDESC_SSE:
-+ return tdesc_i386_linux;
-+ case X86_TDESC_AVX:
-+ return tdesc_i386_avx_linux;
-+ case X86_TDESC_MPX:
-+ return tdesc_i386_mpx_linux;
-+ case X86_TDESC_AVX_MPX:
-+ return tdesc_i386_avx_mpx_linux;
-+ case X86_TDESC_AVX512:
-+ return tdesc_i386_avx512_linux;
-+ default:
-+ internal_error (__FILE__, __LINE__,
-+ "unknown ipa tdesc index: %d", idx);
-+ return tdesc_i386_linux;
-+ }
-+}
-+
- void
- initialize_low_tracepoint (void)
- {
-+ init_registers_i386_mmx_linux ();
- init_registers_i386_linux ();
-- ipa_tdesc = tdesc_i386_linux;
-+ init_registers_i386_avx_linux ();
-+ init_registers_i386_mpx_linux ();
-+ init_registers_i386_avx512_linux ();
- initialize_fast_tracepoint_trampoline_buffer ();
- }
-diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
-index 8b025bd..a142c2c 100644
---- a/gdb/gdbserver/linux-low.c
-+++ b/gdb/gdbserver/linux-low.c
-@@ -6432,6 +6432,15 @@ linux_supports_catch_syscall (void)
- }
-
- static int
-+linux_get_ipa_tdesc_idx (void)
-+{
-+ if (the_low_target.get_ipa_tdesc_idx == NULL)
-+ return 0;
-+
-+ return (*the_low_target.get_ipa_tdesc_idx) ();
-+}
-+
-+static int
- linux_supports_tracepoints (void)
- {
- if (*the_low_target.supports_tracepoints == NULL)
-@@ -7408,6 +7417,7 @@ static struct target_ops linux_target_ops = {
- linux_breakpoint_kind_from_current_state,
- linux_supports_software_single_step,
- linux_supports_catch_syscall,
-+ linux_get_ipa_tdesc_idx,
- };
-
- #ifdef HAVE_LINUX_REGSETS
-diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
-index 4ec8550..d4946c1 100644
---- a/gdb/gdbserver/linux-low.h
-+++ b/gdb/gdbserver/linux-low.h
-@@ -246,6 +246,9 @@ struct linux_target_ops
- due to SYSCALL_SIGTRAP. */
- void (*get_syscall_trapinfo) (struct regcache *regcache,
- int *sysno, int *sysret);
-+
-+ /* See target.h. */
-+ int (*get_ipa_tdesc_idx) (void);
- };
-
- extern struct linux_target_ops the_low_target;
-diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
-index 0c4954a..2535959 100644
---- a/gdb/gdbserver/linux-x86-low.c
-+++ b/gdb/gdbserver/linux-x86-low.c
-@@ -45,57 +45,7 @@
- #include "nat/linux-nat.h"
- #include "nat/x86-linux.h"
- #include "nat/x86-linux-dregs.h"
--
--#ifdef __x86_64__
--/* Defined in auto-generated file amd64-linux.c. */
--void init_registers_amd64_linux (void);
--extern const struct target_desc *tdesc_amd64_linux;
--
--/* Defined in auto-generated file amd64-avx-linux.c. */
--void init_registers_amd64_avx_linux (void);
--extern const struct target_desc *tdesc_amd64_avx_linux;
--
--/* Defined in auto-generated file amd64-avx512-linux.c. */
--void init_registers_amd64_avx512_linux (void);
--extern const struct target_desc *tdesc_amd64_avx512_linux;
--
--/* Defined in auto-generated file amd64-mpx-linux.c. */
--void init_registers_amd64_mpx_linux (void);
--extern const struct target_desc *tdesc_amd64_mpx_linux;
--
--/* Defined in auto-generated file x32-linux.c. */
--void init_registers_x32_linux (void);
--extern const struct target_desc *tdesc_x32_linux;
--
--/* Defined in auto-generated file x32-avx-linux.c. */
--void init_registers_x32_avx_linux (void);
--extern const struct target_desc *tdesc_x32_avx_linux;
--
--/* Defined in auto-generated file x32-avx512-linux.c. */
--void init_registers_x32_avx512_linux (void);
--extern const struct target_desc *tdesc_x32_avx512_linux;
--
--#endif
--
--/* Defined in auto-generated file i386-linux.c. */
--void init_registers_i386_linux (void);
--extern const struct target_desc *tdesc_i386_linux;
--
--/* Defined in auto-generated file i386-mmx-linux.c. */
--void init_registers_i386_mmx_linux (void);
--extern const struct target_desc *tdesc_i386_mmx_linux;
--
--/* Defined in auto-generated file i386-avx-linux.c. */
--void init_registers_i386_avx_linux (void);
--extern const struct target_desc *tdesc_i386_avx_linux;
--
--/* Defined in auto-generated file i386-avx512-linux.c. */
--void init_registers_i386_avx512_linux (void);
--extern const struct target_desc *tdesc_i386_avx512_linux;
--
--/* Defined in auto-generated file i386-mpx-linux.c. */
--void init_registers_i386_mpx_linux (void);
--extern const struct target_desc *tdesc_i386_mpx_linux;
-+#include "linux-x86-tdesc.h"
-
- #ifdef __x86_64__
- static struct target_desc *tdesc_amd64_linux_no_xml;
-@@ -839,6 +789,9 @@ x86_linux_read_description (void)
- case X86_XSTATE_AVX512_MASK:
- return tdesc_amd64_avx512_linux;
-
-+ case X86_XSTATE_AVX_MPX_MASK:
-+ return tdesc_amd64_avx_mpx_linux;
-+
- case X86_XSTATE_MPX_MASK:
- return tdesc_amd64_mpx_linux;
-
-@@ -886,6 +839,9 @@ x86_linux_read_description (void)
- case (X86_XSTATE_MPX_MASK):
- return tdesc_i386_mpx_linux;
-
-+ case (X86_XSTATE_AVX_MPX_MASK):
-+ return tdesc_i386_avx_mpx_linux;
-+
- case (X86_XSTATE_AVX_MASK):
- return tdesc_i386_avx_linux;
-
-@@ -2891,6 +2847,42 @@ x86_supports_hardware_single_step (void)
- return 1;
- }
-
-+static int
-+x86_get_ipa_tdesc_idx (void)
-+{
-+ struct regcache *regcache = get_thread_regcache (current_thread, 0);
-+ const struct target_desc *tdesc = regcache->tdesc;
-+
-+#ifdef __x86_64__
-+ if (tdesc == tdesc_amd64_linux || tdesc == tdesc_amd64_linux_no_xml
-+ || tdesc == tdesc_x32_linux)
-+ return X86_TDESC_SSE;
-+ if (tdesc == tdesc_amd64_avx_linux || tdesc == tdesc_x32_avx_linux)
-+ return X86_TDESC_AVX;
-+ if (tdesc == tdesc_amd64_mpx_linux)
-+ return X86_TDESC_MPX;
-+ if (tdesc == tdesc_amd64_avx_mpx_linux)
-+ return X86_TDESC_AVX_MPX;
-+ if (tdesc == tdesc_amd64_avx512_linux || tdesc == tdesc_x32_avx512_linux)
-+ return X86_TDESC_AVX512;
-+#endif
-+
-+ if (tdesc == tdesc_i386_mmx_linux)
-+ return X86_TDESC_MMX;
-+ if (tdesc == tdesc_i386_linux || tdesc == tdesc_i386_linux_no_xml)
-+ return X86_TDESC_SSE;
-+ if (tdesc == tdesc_i386_avx_linux)
-+ return X86_TDESC_AVX;
-+ if (tdesc == tdesc_i386_mpx_linux)
-+ return X86_TDESC_MPX;
-+ if (tdesc == tdesc_i386_avx_mpx_linux)
-+ return X86_TDESC_AVX_MPX;
-+ if (tdesc == tdesc_i386_avx512_linux)
-+ return X86_TDESC_AVX512;
-+
-+ return 0;
-+}
-+
- /* This is initialized assuming an amd64 target.
- x86_arch_setup will correct it for i386 or amd64 targets. */
-
-@@ -2934,6 +2926,7 @@ struct linux_target_ops the_low_target =
- NULL, /* breakpoint_kind_from_current_state */
- x86_supports_hardware_single_step,
- x86_get_syscall_trapinfo,
-+ x86_get_ipa_tdesc_idx,
- };
-
- void
-@@ -2945,6 +2938,7 @@ initialize_low_arch (void)
- init_registers_amd64_avx_linux ();
- init_registers_amd64_avx512_linux ();
- init_registers_amd64_mpx_linux ();
-+ init_registers_amd64_avx_mpx_linux ();
-
- init_registers_x32_linux ();
- init_registers_x32_avx_linux ();
-@@ -2959,6 +2953,7 @@ initialize_low_arch (void)
- init_registers_i386_avx_linux ();
- init_registers_i386_avx512_linux ();
- init_registers_i386_mpx_linux ();
-+ init_registers_i386_avx_mpx_linux ();
-
- tdesc_i386_linux_no_xml = XNEW (struct target_desc);
- copy_target_description (tdesc_i386_linux_no_xml, tdesc_i386_linux);
-diff --git a/gdb/gdbserver/linux-x86-tdesc.h b/gdb/gdbserver/linux-x86-tdesc.h
-new file mode 100644
-index 0000000..720f50c
---- /dev/null
-+++ b/gdb/gdbserver/linux-x86-tdesc.h
-@@ -0,0 +1,98 @@
-+/* Low level support for x86 (i386 and x86-64), shared between gdbserver
-+ and IPA.
-+
-+ Copyright (C) 2016 Free Software Foundation, Inc.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-+
-+/* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64
-+ vs x32), it's sufficient to pass only the register set here. This,
-+ together with the ABI known at IPA compile time, maps to a tdesc. */
-+
-+enum x86_linux_tdesc {
-+ X86_TDESC_MMX = 0,
-+ X86_TDESC_SSE = 1,
-+ X86_TDESC_AVX = 2,
-+ X86_TDESC_MPX = 3,
-+ X86_TDESC_AVX_MPX = 4,
-+ X86_TDESC_AVX512 = 5,
-+};
-+
-+#ifdef __x86_64__
-+
-+#if defined __LP64__ || !defined IN_PROCESS_AGENT
-+/* Defined in auto-generated file amd64-linux.c. */
-+void init_registers_amd64_linux (void);
-+extern const struct target_desc *tdesc_amd64_linux;
-+
-+/* Defined in auto-generated file amd64-avx-linux.c. */
-+void init_registers_amd64_avx_linux (void);
-+extern const struct target_desc *tdesc_amd64_avx_linux;
-+
-+/* Defined in auto-generated file amd64-avx512-linux.c. */
-+void init_registers_amd64_avx512_linux (void);
-+extern const struct target_desc *tdesc_amd64_avx512_linux;
-+
-+/* Defined in auto-generated file amd64-avx-mpx-linux.c. */
-+void init_registers_amd64_avx_mpx_linux (void);
-+extern const struct target_desc *tdesc_amd64_avx_mpx_linux;
-+
-+/* Defined in auto-generated file amd64-mpx-linux.c. */
-+void init_registers_amd64_mpx_linux (void);
-+extern const struct target_desc *tdesc_amd64_mpx_linux;
-+#endif
-+
-+#if defined __ILP32__ || !defined IN_PROCESS_AGENT
-+/* Defined in auto-generated file x32-linux.c. */
-+void init_registers_x32_linux (void);
-+extern const struct target_desc *tdesc_x32_linux;
-+
-+/* Defined in auto-generated file x32-avx-linux.c. */
-+void init_registers_x32_avx_linux (void);
-+extern const struct target_desc *tdesc_x32_avx_linux;
-+
-+/* Defined in auto-generated file x32-avx512-linux.c. */
-+void init_registers_x32_avx512_linux (void);
-+extern const struct target_desc *tdesc_x32_avx512_linux;
-+#endif
-+
-+#endif
-+
-+#if defined __i386__ || !defined IN_PROCESS_AGENT
-+/* Defined in auto-generated file i386-linux.c. */
-+void init_registers_i386_linux (void);
-+extern const struct target_desc *tdesc_i386_linux;
-+
-+/* Defined in auto-generated file i386-mmx-linux.c. */
-+void init_registers_i386_mmx_linux (void);
-+extern const struct target_desc *tdesc_i386_mmx_linux;
-+
-+/* Defined in auto-generated file i386-avx-linux.c. */
-+void init_registers_i386_avx_linux (void);
-+extern const struct target_desc *tdesc_i386_avx_linux;
-+
-+/* Defined in auto-generated file i386-avx-mpx-linux.c. */
-+void init_registers_i386_avx_mpx_linux (void);
-+extern const struct target_desc *tdesc_i386_avx_mpx_linux;
-+
-+/* Defined in auto-generated file i386-avx512-linux.c. */
-+void init_registers_i386_avx512_linux (void);
-+extern const struct target_desc *tdesc_i386_avx512_linux;
-+
-+/* Defined in auto-generated file i386-mpx-linux.c. */
-+void init_registers_i386_mpx_linux (void);
-+extern const struct target_desc *tdesc_i386_mpx_linux;
-+#endif
-diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
-index 5af2051..4c14c20 100644
---- a/gdb/gdbserver/target.h
-+++ b/gdb/gdbserver/target.h
-@@ -471,6 +471,9 @@ struct target_ops
- /* Return 1 if the target supports catch syscall, 0 (or leave the
- callback NULL) otherwise. */
- int (*supports_catch_syscall) (void);
-+
-+ /* Return tdesc index for IPA. */
-+ int (*get_ipa_tdesc_idx) (void);
- };
-
- extern struct target_ops *the_target;
-@@ -550,6 +553,10 @@ int kill_inferior (int);
- (the_target->supports_catch_syscall ? \
- (*the_target->supports_catch_syscall) () : 0)
-
-+#define target_get_ipa_tdesc_idx() \
-+ (the_target->get_ipa_tdesc_idx \
-+ ? (*the_target->get_ipa_tdesc_idx) () : 0)
-+
- #define target_supports_tracepoints() \
- (the_target->supports_tracepoints \
- ? (*the_target->supports_tracepoints) () : 0)
-diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
-index 0671999..cc86677 100644
---- a/gdb/gdbserver/tracepoint.c
-+++ b/gdb/gdbserver/tracepoint.c
-@@ -134,6 +134,7 @@ trace_vdebug (const char *fmt, ...)
- # define ust_loaded IPA_SYM_EXPORTED_NAME (ust_loaded)
- # define helper_thread_id IPA_SYM_EXPORTED_NAME (helper_thread_id)
- # define cmd_buf IPA_SYM_EXPORTED_NAME (cmd_buf)
-+# define ipa_tdesc_idx IPA_SYM_EXPORTED_NAME (ipa_tdesc_idx)
- #endif
-
- #ifndef IN_PROCESS_AGENT
-@@ -171,6 +172,7 @@ struct ipa_sym_addresses
- CORE_ADDR addr_get_trace_state_variable_value;
- CORE_ADDR addr_set_trace_state_variable_value;
- CORE_ADDR addr_ust_loaded;
-+ CORE_ADDR addr_ipa_tdesc_idx;
- };
-
- static struct
-@@ -207,6 +209,7 @@ static struct
- IPA_SYM(get_trace_state_variable_value),
- IPA_SYM(set_trace_state_variable_value),
- IPA_SYM(ust_loaded),
-+ IPA_SYM(ipa_tdesc_idx),
- };
-
- static struct ipa_sym_addresses ipa_sym_addrs;
-@@ -3231,6 +3234,11 @@ cmd_qtstart (char *packet)
-
- *packet = '\0';
-
-+ /* Tell IPA about the correct tdesc. */
-+ if (write_inferior_integer (ipa_sym_addrs.addr_ipa_tdesc_idx,
-+ target_get_ipa_tdesc_idx ()))
-+ error ("Error setting ipa_tdesc_idx variable in lib");
-+
- /* Start out empty. */
- if (agent_loaded_p ())
- write_inferior_data_ptr (ipa_sym_addrs.addr_tracepoints, 0);
-@@ -4714,19 +4722,20 @@ collect_data_at_step (struct tracepoint_hit_ctx *ctx,
- #endif
-
- #ifdef IN_PROCESS_AGENT
--/* The target description used by the IPA. Given that the IPA library
-- is built for a specific architecture that is loaded into the
-- inferior, there only needs to be one such description per
-- build. */
--const struct target_desc *ipa_tdesc;
-+/* The target description index for IPA. Passed from gdbserver, used
-+ to select ipa_tdesc. */
-+EXTERN_C_PUSH
-+IP_AGENT_EXPORT_VAR int ipa_tdesc_idx;
-+EXTERN_C_POP
- #endif
-
- static struct regcache *
- get_context_regcache (struct tracepoint_hit_ctx *ctx)
- {
- struct regcache *regcache = NULL;
--
- #ifdef IN_PROCESS_AGENT
-+ const struct target_desc *ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
-+
- if (ctx->type == fast_tracepoint)
- {
- struct fast_tracepoint_ctx *fctx = (struct fast_tracepoint_ctx *) ctx;
-@@ -5799,11 +5808,13 @@ IP_AGENT_EXPORT_FUNC void
- gdb_collect (struct tracepoint *tpoint, unsigned char *regs)
- {
- struct fast_tracepoint_ctx ctx;
-+ const struct target_desc *ipa_tdesc;
-
- /* Don't do anything until the trace run is completely set up. */
- if (!tracing)
- return;
-
-+ ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
- ctx.base.type = fast_tracepoint;
- ctx.regs = regs;
- ctx.regcache_initted = 0;
-@@ -6660,6 +6671,7 @@ gdb_probe (const struct marker *mdata, void *probe_private,
- {
- struct tracepoint *tpoint;
- struct static_tracepoint_ctx ctx;
-+ const struct target_desc *ipa_tdesc;
-
- /* Don't do anything until the trace run is completely set up. */
- if (!tracing)
-@@ -6668,6 +6680,7 @@ gdb_probe (const struct marker *mdata, void *probe_private,
- return;
- }
-
-+ ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
- ctx.base.type = static_tracepoint;
- ctx.regcache_initted = 0;
- ctx.regs = regs;
-diff --git a/gdb/gdbserver/tracepoint.h b/gdb/gdbserver/tracepoint.h
-index cab89cf..e30f4f7 100644
---- a/gdb/gdbserver/tracepoint.h
-+++ b/gdb/gdbserver/tracepoint.h
-@@ -124,6 +124,7 @@ int handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc);
-
- #ifdef IN_PROCESS_AGENT
- void initialize_low_tracepoint (void);
-+const struct target_desc *get_ipa_tdesc (int idx);
- void supply_fast_tracepoint_registers (struct regcache *regcache,
- const unsigned char *regs);
- void supply_static_tracepoint_registers (struct regcache *regcache,
-@@ -131,9 +132,6 @@ void supply_static_tracepoint_registers (struct regcache *regcache,
- CORE_ADDR pc);
- void set_trampoline_buffer_space (CORE_ADDR begin, CORE_ADDR end,
- char *errmsg);
--
--extern const struct target_desc *ipa_tdesc;
--
- #else
- void stop_tracing (void);
-
-diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
-index af39e78..df47efd 100644
---- a/gdb/i386-linux-tdep.c
-+++ b/gdb/i386-linux-tdep.c
-@@ -47,6 +47,7 @@
- #include "features/i386/i386-linux.c"
- #include "features/i386/i386-mmx-linux.c"
- #include "features/i386/i386-mpx-linux.c"
-+#include "features/i386/i386-avx-mpx-linux.c"
- #include "features/i386/i386-avx-linux.c"
- #include "features/i386/i386-avx512-linux.c"
-
-@@ -630,6 +631,8 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
- return tdesc_i386_avx512_linux;
- case X86_XSTATE_MPX_MASK:
- return tdesc_i386_mpx_linux;
-+ case X86_XSTATE_AVX_MPX_MASK:
-+ return tdesc_i386_avx_mpx_linux;
- case X86_XSTATE_AVX_MASK:
- return tdesc_i386_avx_linux;
- case X86_XSTATE_SSE_MASK:
-@@ -1018,5 +1021,6 @@ _initialize_i386_linux_tdep (void)
- initialize_tdesc_i386_mmx_linux ();
- initialize_tdesc_i386_avx_linux ();
- initialize_tdesc_i386_mpx_linux ();
-+ initialize_tdesc_i386_avx_mpx_linux ();
- initialize_tdesc_i386_avx512_linux ();
- }
-diff --git a/gdb/i386-linux-tdep.h b/gdb/i386-linux-tdep.h
-index ecc9e31..0cb0c4d 100644
---- a/gdb/i386-linux-tdep.h
-+++ b/gdb/i386-linux-tdep.h
-@@ -42,6 +42,7 @@ extern struct target_desc *tdesc_i386_linux;
- extern struct target_desc *tdesc_i386_mmx_linux;
- extern struct target_desc *tdesc_i386_avx_linux;
- extern struct target_desc *tdesc_i386_mpx_linux;
-+extern struct target_desc *tdesc_i386_avx_mpx_linux;
- extern struct target_desc *tdesc_i386_avx512_linux;
-
- /* Format of XSAVE extended state is:
-diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
-index b706463..1ec0a08 100644
---- a/gdb/i386-tdep.c
-+++ b/gdb/i386-tdep.c
-@@ -53,6 +53,7 @@
- #include "features/i386/i386.c"
- #include "features/i386/i386-avx.c"
- #include "features/i386/i386-mpx.c"
-+#include "features/i386/i386-avx-mpx.c"
- #include "features/i386/i386-avx512.c"
- #include "features/i386/i386-mmx.c"
-
-@@ -8618,6 +8619,8 @@ i386_target_description (uint64_t xcr0)
- case X86_XSTATE_MPX_AVX512_MASK:
- case X86_XSTATE_AVX512_MASK:
- return tdesc_i386_avx512;
-+ case X86_XSTATE_AVX_MPX_MASK:
-+ return tdesc_i386_avx_mpx;
- case X86_XSTATE_MPX_MASK:
- return tdesc_i386_mpx;
- case X86_XSTATE_AVX_MASK:
-@@ -8957,6 +8960,7 @@ Show Intel Memory Protection Extensions specific variables."),
- initialize_tdesc_i386_mmx ();
- initialize_tdesc_i386_avx ();
- initialize_tdesc_i386_mpx ();
-+ initialize_tdesc_i386_avx_mpx ();
- initialize_tdesc_i386_avx512 ();
-
- /* Tell remote stub that we support XML target description. */
-diff --git a/gdb/regformats/i386/amd64-avx-mpx-linux.dat b/gdb/regformats/i386/amd64-avx-mpx-linux.dat
-new file mode 100644
-index 0000000..6d45324
---- /dev/null
-+++ b/gdb/regformats/i386/amd64-avx-mpx-linux.dat
-@@ -0,0 +1,85 @@
-+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
-+# Generated from: i386/amd64-avx-mpx-linux.xml
-+name:amd64_avx_mpx_linux
-+xmltarget:amd64-avx-mpx-linux.xml
-+expedite:rbp,rsp,rip
-+64:rax
-+64:rbx
-+64:rcx
-+64:rdx
-+64:rsi
-+64:rdi
-+64:rbp
-+64:rsp
-+64:r8
-+64:r9
-+64:r10
-+64:r11
-+64:r12
-+64:r13
-+64:r14
-+64:r15
-+64:rip
-+32:eflags
-+32:cs
-+32:ss
-+32:ds
-+32:es
-+32:fs
-+32:gs
-+80:st0
-+80:st1
-+80:st2
-+80:st3
-+80:st4
-+80:st5
-+80:st6
-+80:st7
-+32:fctrl
-+32:fstat
-+32:ftag
-+32:fiseg
-+32:fioff
-+32:foseg
-+32:fooff
-+32:fop
-+128:xmm0
-+128:xmm1
-+128:xmm2
-+128:xmm3
-+128:xmm4
-+128:xmm5
-+128:xmm6
-+128:xmm7
-+128:xmm8
-+128:xmm9
-+128:xmm10
-+128:xmm11
-+128:xmm12
-+128:xmm13
-+128:xmm14
-+128:xmm15
-+32:mxcsr
-+64:orig_rax
-+128:ymm0h
-+128:ymm1h
-+128:ymm2h
-+128:ymm3h
-+128:ymm4h
-+128:ymm5h
-+128:ymm6h
-+128:ymm7h
-+128:ymm8h
-+128:ymm9h
-+128:ymm10h
-+128:ymm11h
-+128:ymm12h
-+128:ymm13h
-+128:ymm14h
-+128:ymm15h
-+128:bnd0raw
-+128:bnd1raw
-+128:bnd2raw
-+128:bnd3raw
-+64:bndcfgu
-+64:bndstatus
-diff --git a/gdb/regformats/i386/amd64-avx-mpx.dat b/gdb/regformats/i386/amd64-avx-mpx.dat
-new file mode 100644
-index 0000000..d985641
---- /dev/null
-+++ b/gdb/regformats/i386/amd64-avx-mpx.dat
-@@ -0,0 +1,84 @@
-+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
-+# Generated from: i386/amd64-avx-mpx.xml
-+name:amd64_avx_mpx
-+xmltarget:amd64-avx-mpx.xml
-+expedite:rbp,rsp,rip
-+64:rax
-+64:rbx
-+64:rcx
-+64:rdx
-+64:rsi
-+64:rdi
-+64:rbp
-+64:rsp
-+64:r8
-+64:r9
-+64:r10
-+64:r11
-+64:r12
-+64:r13
-+64:r14
-+64:r15
-+64:rip
-+32:eflags
-+32:cs
-+32:ss
-+32:ds
-+32:es
-+32:fs
-+32:gs
-+80:st0
-+80:st1
-+80:st2
-+80:st3
-+80:st4
-+80:st5
-+80:st6
-+80:st7
-+32:fctrl
-+32:fstat
-+32:ftag
-+32:fiseg
-+32:fioff
-+32:foseg
-+32:fooff
-+32:fop
-+128:xmm0
-+128:xmm1
-+128:xmm2
-+128:xmm3
-+128:xmm4
-+128:xmm5
-+128:xmm6
-+128:xmm7
-+128:xmm8
-+128:xmm9
-+128:xmm10
-+128:xmm11
-+128:xmm12
-+128:xmm13
-+128:xmm14
-+128:xmm15
-+32:mxcsr
-+128:ymm0h
-+128:ymm1h
-+128:ymm2h
-+128:ymm3h
-+128:ymm4h
-+128:ymm5h
-+128:ymm6h
-+128:ymm7h
-+128:ymm8h
-+128:ymm9h
-+128:ymm10h
-+128:ymm11h
-+128:ymm12h
-+128:ymm13h
-+128:ymm14h
-+128:ymm15h
-+128:bnd0raw
-+128:bnd1raw
-+128:bnd2raw
-+128:bnd3raw
-+64:bndcfgu
-+64:bndstatus
-diff --git a/gdb/regformats/i386/amd64-mpx-linux.dat b/gdb/regformats/i386/amd64-mpx-linux.dat
-index 7a05cfe..523ae01 100644
---- a/gdb/regformats/i386/amd64-mpx-linux.dat
-+++ b/gdb/regformats/i386/amd64-mpx-linux.dat
-@@ -61,22 +61,6 @@ expedite:rbp,rsp,rip
- 128:xmm15
- 32:mxcsr
- 64:orig_rax
--128:ymm0h
--128:ymm1h
--128:ymm2h
--128:ymm3h
--128:ymm4h
--128:ymm5h
--128:ymm6h
--128:ymm7h
--128:ymm8h
--128:ymm9h
--128:ymm10h
--128:ymm11h
--128:ymm12h
--128:ymm13h
--128:ymm14h
--128:ymm15h
- 128:bnd0raw
- 128:bnd1raw
- 128:bnd2raw
-diff --git a/gdb/regformats/i386/amd64-mpx.dat b/gdb/regformats/i386/amd64-mpx.dat
-index 1b75f4d..43b8776 100644
---- a/gdb/regformats/i386/amd64-mpx.dat
-+++ b/gdb/regformats/i386/amd64-mpx.dat
-@@ -60,22 +60,6 @@ expedite:rbp,rsp,rip
- 128:xmm14
- 128:xmm15
- 32:mxcsr
--128:ymm0h
--128:ymm1h
--128:ymm2h
--128:ymm3h
--128:ymm4h
--128:ymm5h
--128:ymm6h
--128:ymm7h
--128:ymm8h
--128:ymm9h
--128:ymm10h
--128:ymm11h
--128:ymm12h
--128:ymm13h
--128:ymm14h
--128:ymm15h
- 128:bnd0raw
- 128:bnd1raw
- 128:bnd2raw
-diff --git a/gdb/regformats/i386/i386-avx-mpx-linux.dat b/gdb/regformats/i386/i386-avx-mpx-linux.dat
-new file mode 100644
-index 0000000..831c476
---- /dev/null
-+++ b/gdb/regformats/i386/i386-avx-mpx-linux.dat
-@@ -0,0 +1,61 @@
-+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
-+# Generated from: i386/i386-avx-mpx-linux.xml
-+name:i386_avx_mpx_linux
-+xmltarget:i386-avx-mpx-linux.xml
-+expedite:ebp,esp,eip
-+32:eax
-+32:ecx
-+32:edx
-+32:ebx
-+32:esp
-+32:ebp
-+32:esi
-+32:edi
-+32:eip
-+32:eflags
-+32:cs
-+32:ss
-+32:ds
-+32:es
-+32:fs
-+32:gs
-+80:st0
-+80:st1
-+80:st2
-+80:st3
-+80:st4
-+80:st5
-+80:st6
-+80:st7
-+32:fctrl
-+32:fstat
-+32:ftag
-+32:fiseg
-+32:fioff
-+32:foseg
-+32:fooff
-+32:fop
-+128:xmm0
-+128:xmm1
-+128:xmm2
-+128:xmm3
-+128:xmm4
-+128:xmm5
-+128:xmm6
-+128:xmm7
-+32:mxcsr
-+32:orig_eax
-+128:ymm0h
-+128:ymm1h
-+128:ymm2h
-+128:ymm3h
-+128:ymm4h
-+128:ymm5h
-+128:ymm6h
-+128:ymm7h
-+128:bnd0raw
-+128:bnd1raw
-+128:bnd2raw
-+128:bnd3raw
-+64:bndcfgu
-+64:bndstatus
-diff --git a/gdb/regformats/i386/i386-avx-mpx.dat b/gdb/regformats/i386/i386-avx-mpx.dat
-new file mode 100644
-index 0000000..8caef75
---- /dev/null
-+++ b/gdb/regformats/i386/i386-avx-mpx.dat
-@@ -0,0 +1,60 @@
-+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
-+# Generated from: i386/i386-avx-mpx.xml
-+name:i386_avx_mpx
-+xmltarget:i386-avx-mpx.xml
-+expedite:ebp,esp,eip
-+32:eax
-+32:ecx
-+32:edx
-+32:ebx
-+32:esp
-+32:ebp
-+32:esi
-+32:edi
-+32:eip
-+32:eflags
-+32:cs
-+32:ss
-+32:ds
-+32:es
-+32:fs
-+32:gs
-+80:st0
-+80:st1
-+80:st2
-+80:st3
-+80:st4
-+80:st5
-+80:st6
-+80:st7
-+32:fctrl
-+32:fstat
-+32:ftag
-+32:fiseg
-+32:fioff
-+32:foseg
-+32:fooff
-+32:fop
-+128:xmm0
-+128:xmm1
-+128:xmm2
-+128:xmm3
-+128:xmm4
-+128:xmm5
-+128:xmm6
-+128:xmm7
-+32:mxcsr
-+128:ymm0h
-+128:ymm1h
-+128:ymm2h
-+128:ymm3h
-+128:ymm4h
-+128:ymm5h
-+128:ymm6h
-+128:ymm7h
-+128:bnd0raw
-+128:bnd1raw
-+128:bnd2raw
-+128:bnd3raw
-+64:bndcfgu
-+64:bndstatus
-diff --git a/gdb/regformats/i386/i386-mpx-linux.dat b/gdb/regformats/i386/i386-mpx-linux.dat
-index b52b68d..1dcdce9 100644
---- a/gdb/regformats/i386/i386-mpx-linux.dat
-+++ b/gdb/regformats/i386/i386-mpx-linux.dat
-@@ -45,14 +45,6 @@ expedite:ebp,esp,eip
- 128:xmm7
- 32:mxcsr
- 32:orig_eax
--128:ymm0h
--128:ymm1h
--128:ymm2h
--128:ymm3h
--128:ymm4h
--128:ymm5h
--128:ymm6h
--128:ymm7h
- 128:bnd0raw
- 128:bnd1raw
- 128:bnd2raw
-diff --git a/gdb/regformats/i386/i386-mpx.dat b/gdb/regformats/i386/i386-mpx.dat
-index 0ea420b..dda5164 100644
---- a/gdb/regformats/i386/i386-mpx.dat
-+++ b/gdb/regformats/i386/i386-mpx.dat
-@@ -44,14 +44,6 @@ expedite:ebp,esp,eip
- 128:xmm6
- 128:xmm7
- 32:mxcsr
--128:ymm0h
--128:ymm1h
--128:ymm2h
--128:ymm3h
--128:ymm4h
--128:ymm5h
--128:ymm6h
--128:ymm7h
- 128:bnd0raw
- 128:bnd1raw
- 128:bnd2raw
-diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
-index 15ad7e7..3a94471 100644
---- a/gdb/testsuite/gdb.trace/ftrace.exp
-+++ b/gdb/testsuite/gdb.trace/ftrace.exp
-@@ -132,7 +132,6 @@ proc test_fast_tracepoints {} {
- gdb_test "tfind pc *set_point" "Found trace frame .*" \
- "tfind set_point frame, first time"
-
-- setup_kfail "gdb/13808" "x86_64-*-linux*"
- gdb_test "print globvar" " = 1"
-
- gdb_test "tfind pc *set_point" "Found trace frame .*" \
-diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c
-index 3cc18c1..107576f 100644
---- a/gdb/x86-linux-nat.c
-+++ b/gdb/x86-linux-nat.c
-@@ -215,6 +215,11 @@ x86_linux_read_description (struct target_ops *ops)
- return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
- else
- return tdesc_amd64_mpx_linux;
-+ case X86_XSTATE_AVX_MPX_MASK:
-+ if (is_x32)
-+ return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
-+ else
-+ return tdesc_amd64_avx_mpx_linux;
- case X86_XSTATE_AVX_MASK:
- if (is_x32)
- return tdesc_x32_avx_linux;
-@@ -237,6 +242,8 @@ x86_linux_read_description (struct target_ops *ops)
- return tdesc_i386_avx512_linux;
- case X86_XSTATE_MPX_MASK:
- return tdesc_i386_mpx_linux;
-+ case X86_XSTATE_AVX_MPX_MASK:
-+ return tdesc_i386_avx_mpx_linux;
- case X86_XSTATE_AVX_MASK:
- return tdesc_i386_avx_linux;
- default:
diff --git a/meta/recipes-devtools/gdb/gdb/CVE-2019-1010180.patch b/meta/recipes-devtools/gdb/gdb/CVE-2019-1010180.patch
new file mode 100644
index 0000000000..46b2b3a713
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/CVE-2019-1010180.patch
@@ -0,0 +1,132 @@
+From 950b74950f6020eda38647f22e9077ac7f68ca49 Mon Sep 17 00:00:00 2001
+From: Keith Seitz <keiths@redhat.com>
+Date: Wed, 16 Oct 2019 11:33:59 -0700
+Subject: [PATCH] DWARF reader: Reject sections with invalid sizes
+
+This is another fuzzer bug, gdb/23567. This time, the fuzzer has
+specifically altered the size of .debug_str:
+
+$ eu-readelf -S objdump
+Section Headers:
+[Nr] Name Type Addr Off Size ES Flags Lk Inf Al
+[31] .debug_str PROGBITS 0000000000000000 0057116d ffffffffffffffff 1 MS 0 0 1
+
+When this file is loaded into GDB, the DWARF reader crashes attempting
+to access the string table (or it may just store a bunch of nonsense):
+
+[gdb-8.3-6-fc30]
+$ gdb -nx -q objdump
+BFD: warning: /path/to/objdump has a corrupt section with a size (ffffffffffffffff) larger than the file size
+Reading symbols from /path/to/objdump...
+Segmentation fault (core dumped)
+
+Nick has already committed a BFD patch to issue the warning seen above.
+
+[gdb master 6acc1a0b]
+$ gdb -BFD: warning: /path/to/objdump has a corrupt section with a size (ffffffffffffffff) larger than the file size
+Reading symbols from /path/to/objdump...
+(gdb) inf func
+All defined functions:
+
+File ./../include/dwarf2.def:
+186: const
+
+ 8 *>(.:
+ ;'@�B);
+747: const
+
+ 8 *�(.:
+ ;'@�B);
+701: const
+
+ 8 *�D �
+ (.:
+ ;'@�B);
+71: const
+
+ 8 *(.:
+ ;'@�B);
+/* and more gibberish */
+
+Consider read_indirect_string_at_offset_from:
+
+static const char *
+read_indirect_string_at_offset_from (struct objfile *objfile,
+ bfd *abfd, LONGEST str_offset,
+ struct dwarf2_section_info *sect,
+ const char *form_name,
+ const char *sect_name)
+{
+ dwarf2_read_section (objfile, sect);
+ if (sect->buffer == NULL)
+ error (_("%s used without %s section [in module %s]"),
+ form_name, sect_name, bfd_get_filename (abfd));
+ if (str_offset >= sect->size)
+ error (_("%s pointing outside of %s section [in module %s]"),
+ form_name, sect_name, bfd_get_filename (abfd));
+ gdb_assert (HOST_CHAR_BIT == 8);
+ if (sect->buffer[str_offset] == '\0')
+ return NULL;
+ return (const char *) (sect->buffer + str_offset);
+}
+
+With sect_size being ginormous, the code attempts to access
+sect->buffer[GINORMOUS], and depending on the layout of memory,
+GDB either stores a bunch of gibberish strings or crashes.
+
+This is an attempt to mitigate this by implementing a similar approach
+used by BFD. In our case, we simply reject the section with the invalid
+length:
+
+$ ./gdb -nx -q objdump
+BFD: warning: /path/to/objdump has a corrupt section with a size (ffffffffffffffff) larger than the file size
+Reading symbols from /path/to/objdump...
+
+warning: Discarding section .debug_str which has a section size (ffffffffffffffff) larger than the file size [in module /path/to/objdump]
+DW_FORM_strp used without .debug_str section [in module /path/to/objdump]
+(No debugging symbols found in /path/to/objdump)
+(gdb)
+
+Unfortunately, I have not found a way to regression test this, since it
+requires poking ELF section headers.
+
+gdb/ChangeLog:
+2019-10-16 Keith Seitz <keiths@redhat.com>
+
+ PR gdb/23567
+ * dwarf2read.c (dwarf2_per_objfile::locate_sections): Discard
+ sections whose size is greater than the file size.
+
+Change-Id: I896ac3b4eb2207c54e8e05c16beab3051d9b4b2f
+
+CVE: CVE-2019-1010180
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=950b74950f6020eda38647f22e9077ac7f68ca49]
+[Removed Changelog entry]
+Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com>
+---
+ gdb/dwarf2read.c | 9 +++++++++
+ 2 files changed, 15 insertions(+)
+
+diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
+index 0443b55..a78f818 100644
+--- a/gdb/dwarf2read.c
++++ b/gdb/dwarf2read.c
+@@ -2338,6 +2338,15 @@ dwarf2_per_objfile::locate_sections (bfd *abfd, asection *sectp,
+ if ((aflag & SEC_HAS_CONTENTS) == 0)
+ {
+ }
++ else if (elf_section_data (sectp)->this_hdr.sh_size
++ > bfd_get_file_size (abfd))
++ {
++ bfd_size_type size = elf_section_data (sectp)->this_hdr.sh_size;
++ warning (_("Discarding section %s which has a section size (%s"
++ ") larger than the file size [in module %s]"),
++ bfd_section_name (abfd, sectp), phex_nz (size, sizeof (size)),
++ bfd_get_filename (abfd));
++ }
+ else if (section_is_p (sectp->name, &names.info))
+ {
+ this->info.s.section = sectp;
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/gdb/gdb_7.11.bb b/meta/recipes-devtools/gdb/gdb_7.11.bb
deleted file mode 100644
index 57cffc9983..0000000000
--- a/meta/recipes-devtools/gdb/gdb_7.11.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require gdb.inc
-require gdb-${PV}.inc
-
-inherit python3-dir
-
-EXTRA_OEMAKE_append_libc-musl = "\
- gt_cv_func_gnugettext1_libc=yes \
- gt_cv_func_gnugettext2_libc=yes \
- "
-
-do_configure_prepend() {
- if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
- cat > ${WORKDIR}/python << EOF
-#!/bin/sh
-case "\$2" in
- --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;;
- --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;;
- --exec-prefix) echo "${exec_prefix}" ;;
- *) exit 1 ;;
-esac
-exit 0
-EOF
- chmod +x ${WORKDIR}/python
- fi
-}
-CFLAGS_append_libc-musl = " -Drpl_gettimeofday=gettimeofday"
diff --git a/meta/recipes-devtools/gdb/gdb_8.3.1.bb b/meta/recipes-devtools/gdb/gdb_8.3.1.bb
new file mode 100644
index 0000000000..d70757a151
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb_8.3.1.bb
@@ -0,0 +1,28 @@
+require gdb.inc
+require gdb-${PV}.inc
+
+inherit python3-dir
+
+EXTRA_OEMAKE_append_libc-musl = "\
+ gt_cv_func_gnugettext1_libc=yes \
+ gt_cv_func_gnugettext2_libc=yes \
+ gl_cv_func_working_strerror=yes \
+ gl_cv_func_strerror_0_works=yes \
+ gl_cv_func_gettimeofday_clobber=no \
+ "
+
+do_configure_prepend() {
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
+ cat > ${WORKDIR}/python << EOF
+#!/bin/sh
+case "\$2" in
+ --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;;
+ --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;;
+ --exec-prefix) echo "${exec_prefix}" ;;
+ *) exit 1 ;;
+esac
+exit 0
+EOF
+ chmod +x ${WORKDIR}/python
+ fi
+}
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
index 753b0472a5..95ab397f6a 100644
--- a/meta/recipes-devtools/git/git.inc
+++ b/meta/recipes-devtools/git/git.inc
@@ -13,6 +13,12 @@ S = "${WORKDIR}/git-${PV}"
LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
+CVE_PRODUCT = "git-scm:git"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[cvsserver] = ""
+PACKAGECONFIG[svn] = ""
+
EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
--without-tcltk \
"
@@ -33,12 +39,12 @@ do_compile_prepend () {
do_install () {
oe_runmake install DESTDIR="${D}" bindir=${bindir} \
template_dir=${datadir}/git-core/templates
- 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/*
+
+ for section in man1 man5 man7; do
+ install -d ${D}/${mandir}/$section
+ install -t ${D}/${mandir}/$section ${WORKDIR}/$section/*
+ done
+
install -d ${D}/${datadir}/bash-completion/completions/
install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git
}
@@ -46,14 +52,23 @@ do_install () {
perl_native_fixup () {
sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
-e 's#${libdir}/perl-native/#${libdir}/#' \
- ${@d.getVar("PERLTOOLS", True).replace(' /',d.getVar('D', True) + '/')}
-
- # ${libdir} is not applicable here, perl-native files are always
- # installed to /usr/lib on both 32/64 bits targets.
-
- mkdir -p ${D}${libdir}
- mv ${D}${exec_prefix}/lib/perl-native/perl ${D}${libdir}
- rmdir -p ${D}${exec_prefix}/lib/perl-native || true
+ ${@d.getVar("PERLTOOLS").replace(' /',d.getVar('D') + '/')}
+
+ if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'cvsserver', d)}" ]; then
+ # Only install the git cvsserver command if explicitly requested
+ # as it requires the DBI Perl module, which does not exist in
+ # OE-Core.
+ rm ${D}${libexecdir}/git-core/git-cvsserver \
+ ${D}${bindir}/git-cvsserver
+ fi
+
+ if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'svn', d)}" ]; then
+ # Only install the git svn command and all Git::SVN Perl modules
+ # if explicitly requested as they require the SVN::Core Perl
+ # module, which does not exist in OE-Core.
+ rm -r ${D}${libexecdir}/git-core/git-svn \
+ ${D}${datadir}/perl5/Git/SVN*
+ fi
}
REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
@@ -79,23 +94,19 @@ do_install_append_class-nativesdk() {
FILES_${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
PERLTOOLS = " \
+ ${bindir}/git-cvsserver \
${libexecdir}/git-core/git-add--interactive \
${libexecdir}/git-core/git-archimport \
${libexecdir}/git-core/git-cvsexportcommit \
${libexecdir}/git-core/git-cvsimport \
${libexecdir}/git-core/git-cvsserver \
- ${bindir}/git-cvsserver \
- ${libexecdir}/git-core/git-difftool \
- ${libexecdir}/git-core/git-relink \
${libexecdir}/git-core/git-send-email \
${libexecdir}/git-core/git-svn \
${libexecdir}/git-core/git-instaweb \
- ${libexecdir}/git-core/git-submodule \
- ${libexecdir}/git-core/git-am \
- ${libexecdir}/git-core/git-request-pull \
${datadir}/gitweb/gitweb.cgi \
${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
${datadir}/git-core/templates/hooks/pre-rebase.sample \
+ ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \
"
# Git tools requiring perl
@@ -103,8 +114,9 @@ PACKAGES =+ "${PN}-perltools"
FILES_${PN}-perltools += " \
${PERLTOOLS} \
${libdir}/perl \
- ${datadir}/perl \
+ ${datadir}/perl5 \
"
+
RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
# git-tk package with gitk and git-gui
@@ -118,6 +130,6 @@ FILES_${PN}-tk = " \
PACKAGES =+ "gitweb"
FILES_gitweb = "${datadir}/gitweb/"
-
+RDEPENDS_gitweb = "perl"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/git/git_2.24.1.bb b/meta/recipes-devtools/git/git_2.24.1.bb
new file mode 100644
index 0000000000..daea31eab2
--- /dev/null
+++ b/meta/recipes-devtools/git/git_2.24.1.bb
@@ -0,0 +1,11 @@
+require git.inc
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
+ ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+ "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
+
+SRC_URI[tarball.md5sum] = "166bde96adbbc11c8843d4f8f4f9811b"
+SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02"
+SRC_URI[manpages.md5sum] = "31c2272a8979022497ba3d4202df145d"
+SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230"
diff --git a/meta/recipes-devtools/git/git_2.9.3.bb b/meta/recipes-devtools/git/git_2.9.3.bb
deleted file mode 100644
index d59f3d2830..0000000000
--- a/meta/recipes-devtools/git/git_2.9.3.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require git.inc
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
- ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
- "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
-
-SRC_URI[tarball.md5sum] = "c783361be894b8bfa5373811b1b65602"
-SRC_URI[tarball.sha256sum] = "a252b6636b12d5ba57732c8469701544c26c2b1689933bd1b425e603cbb247c0"
-SRC_URI[manpages.md5sum] = "66fafd61d65f9d2d99581133170eb186"
-SRC_URI[manpages.sha256sum] = "8ea1a55b048fafbf0c0c6fcbca4b5b0f5e9917893221fc7345c09051d65832ce"
diff --git a/meta/recipes-devtools/glide/glide_0.13.3.bb b/meta/recipes-devtools/glide/glide_0.13.3.bb
new file mode 100644
index 0000000000..ebad0ec60a
--- /dev/null
+++ b/meta/recipes-devtools/glide/glide_0.13.3.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Vendor Package Management for Golang"
+HOMEPAGE = "https://glide.sh"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=54905cf894f8cc416a92f4fc350c35b2"
+
+GO_IMPORT = "github.com/Masterminds/glide"
+SRC_URI = "git://${GO_IMPORT}"
+SRCREV = "8ed5b9292379d86c39592a7e6a58eb9c903877cf"
+
+inherit go
+
+RDEPENDS_${PN}-dev += "bash"
+RDEPENDS_${PN}-ptest += "bash"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# for x86 ends with textrel in ${PN}
+# http://errors.yoctoproject.org/Errors/Details/185631/
+# ERROR: QA Issue: ELF binary '/work/i586-oe-linux/glide/0.13.1-r0/packages-split/glide/usr/bin/glide' has relocations in .text [textrel]
+INSANE_SKIP_${PN} += "textrel"
+
+# for aarch64 ends with textrel in ${PN}-ptest
+# http://errors.yoctoproject.org/Errors/Details/185633/
+# ERROR: QA Issue: ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/glide.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/dependency/dependency.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/repo/repo.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/mirrors/mirrors.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/cfg/cfg.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/godep/strip/strip.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/path/path.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/tree/tree.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/util/util.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/action/action.test' has relocations in .text
+# ELF binary '/work/aarch64-oe-linux/glide/0.13.1-r0/packages-split/glide-ptest/usr/lib/glide/ptest/github.com/Masterminds/glide/cache/cache.test' has relocations in .text [textrel]
+INSANE_SKIP_${PN}-ptest += "textrel"
+
+# fails to run task compile_ptest_base on mips
+PTEST_ENABLED_mipsarch = "0"
diff --git a/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch b/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
deleted file mode 100644
index 2094116f0d..0000000000
--- a/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-Upstream-Status: Pending
-
-Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch.
-
-updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand)
-updated to 20080123 by Nitin A Kamble (by hand)
-updated to 20111001 by Saul Wold (by hand)
-updated to 20120818 by Marcin 'Hrw' Juszkiewicz (by hand)
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
----
- config.guess | 67 +++++++++++++++++++++++++++++++++++------------------------
- 1 file changed, 40 insertions(+), 27 deletions(-)
-
---- git.orig/config.guess
-+++ git/config.guess
-@@ -138,6 +138,19 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
- UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
- UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-+# Detect uclibc systems.
-+
-+LIBC="gnu"
-+if [ -f /usr/include/bits/uClibc_config.h ]
-+then
-+ LIBC=uclibc
-+ if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]
-+ then
-+ UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h`
-+ LIBC=$LIBC$UCLIBC_SUBVER
-+ fi
-+fi
-+
- # Note: order is significant - the case branches are not exclusive.
-
- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-@@ -886,15 +899,15 @@ EOF
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
-- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-+ if test "$?" = 0 ; then LIBC="gnulibc1" ; else LIBC="" ; fi
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
-@@ -906,19 +919,19 @@ EOF
- fi
- exit ;;
- avr32*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- cris:Linux:*:*)
-- echo ${UNAME_MACHINE}-axis-linux-gnu
-+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
- crisv32:Linux:*:*)
-- echo ${UNAME_MACHINE}-axis-linux-gnu
-+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
- frv:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- hexagon:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
-@@ -932,13 +945,13 @@ EOF
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- m32r*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- m68*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
-@@ -957,54 +970,54 @@ EOF
- #endif
- EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
- ;;
- or32:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- padre:Linux:*:*)
-- echo sparc-unknown-linux-gnu
-+ echo sparc-unknown-linux-${LIBC}
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
-- echo hppa64-unknown-linux-gnu
-+ echo hppa64-unknown-linux-${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-- PA7*) echo hppa1.1-unknown-linux-gnu ;;
-- PA8*) echo hppa2.0-unknown-linux-gnu ;;
-- *) echo hppa-unknown-linux-gnu ;;
-+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-+ *) echo hppa-unknown-linux-${LIBC} ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
-- echo powerpc64-unknown-linux-gnu
-+ echo powerpc64-unknown-linux-${LIBC}
- exit ;;
- ppc:Linux:*:*)
-- echo powerpc-unknown-linux-gnu
-+ echo powerpc-unknown-linux-${LIBC}
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- sh*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- tile*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- vax:Linux:*:*)
-- echo ${UNAME_MACHINE}-dec-linux-gnu
-+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
- exit ;;
- x86_64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- xtensa*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
diff --git a/meta/recipes-devtools/gnu-config/gnu-config/musl-support.patch b/meta/recipes-devtools/gnu-config/gnu-config/musl-support.patch
deleted file mode 100644
index 3147435a6e..0000000000
--- a/meta/recipes-devtools/gnu-config/gnu-config/musl-support.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-support musl
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gnu-config-20120814/config.sub
-===================================================================
---- gnu-config-20120814.orig/config.sub 2012-09-18 02:27:45.000000000 -0700
-+++ gnu-config-20120814/config.sub 2014-03-26 00:34:19.955996709 -0700
-@@ -123,6 +123,7 @@
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-+ linux-musl* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
-@@ -1365,6 +1366,7 @@
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
-+ | -linux-musl* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
diff --git a/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch b/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch
deleted file mode 100644
index 75fe100825..0000000000
--- a/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
---- config.sub.orig 2004-05-14 19:38:36.000000000 -0500
-+++ config.sub 2004-05-14 19:39:17.000000000 -0500
-@@ -118,7 +118,7 @@
- # Here we must recognize all the valid KERNEL-OS combinations.
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
-- nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
-+ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
-@@ -1135,7 +1135,8 @@
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-+ | -mingw32* | -linux-gnu* | -linux-uclibc* \
-+ | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb b/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
deleted file mode 100644
index 0d05e79fd5..0000000000
--- a/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "gnu-configize"
-DESCRIPTION = "Tool that installs the GNU config.guess / config.sub into a directory tree"
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://config.guess;endline=39;md5=b79a4663475f4d724846463277817e0d"
-
-DEPENDS_class-native = "hostperl-runtime-native"
-
-INHIBIT_DEFAULT_DEPS = "1"
-
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/gnu-config/gnu-config-${PV}.tar.bz2 \
- file://config-guess-uclibc.patch \
- file://musl-support.patch \
- file://gnu-configize.in"
-
-SRC_URI[md5sum] = "bcfca5a2bb39edad4aae5a65efc84094"
-SRC_URI[sha256sum] = "44f99a8e76f3e8e4fec0bb5ad4762f8e44366168554ce66cb85afbe2ed3efd8b"
-
-CLEANBROKEN = "1"
-
-do_compile[noexec] = "1"
-
-do_install () {
- install -d ${D}${datadir}/gnu-config \
- ${D}${bindir}
- cat ${WORKDIR}/gnu-configize.in | \
- sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \
- -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize
- # In the native case we want the system perl as perl-native can't have built yet
- if [ "${PN}" != "gnu-config-native" -a "${PN}" != "nativesdk-gnu-config" ]; then
- sed -i -e 's,/usr/bin/env,${bindir}/env,g' ${D}${bindir}/gnu-configize
- fi
- chmod 755 ${D}${bindir}/gnu-configize
- install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/
-}
-
-PACKAGES = "${PN}"
-FILES_${PN} = "${bindir} ${datadir}/gnu-config"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 072726f60d..1630c12823 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -2,19 +2,19 @@ SUMMARY = "gnu-configize"
DESCRIPTION = "Tool that installs the GNU config.guess / config.sub into a directory tree"
SECTION = "devel"
LICENSE = "GPL-3.0-with-autoconf-exception"
-LIC_FILES_CHKSUM = "file://config.guess;beginline=7;endline=27;md5=9bac8b1743c2240ae07cce6e546ac2f2"
+LIC_FILES_CHKSUM = "file://config.guess;beginline=7;endline=27;md5=b75d42f59f706ea56d6a8e00216fca6a"
DEPENDS_class-native = "hostperl-runtime-native"
INHIBIT_DEFAULT_DEPS = "1"
-SRCREV = "b576fa87c140b824466ef1638e945e87dc5c0343"
-PV = "20150728+git${SRCPV}"
+SRCREV = "b98424c249119b79d3f709e26eb86f2fd4d5e5f3"
+PV = "20190501+git${SRCPV}"
-SRC_URI = "git://git.sv.gnu.org/config.git \
+SRC_URI = "git://git.savannah.gnu.org/config.git \
file://gnu-configize.in"
-
S = "${WORKDIR}/git"
+UPSTREAM_CHECK_COMMITS = "1"
CLEANBROKEN = "1"
diff --git a/meta/recipes-devtools/go/go-1.13.inc b/meta/recipes-devtools/go/go-1.13.inc
new file mode 100644
index 0000000000..2afe8b69cd
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13.inc
@@ -0,0 +1,24 @@
+require go-common.inc
+
+GO_BASEVERSION = "1.13"
+GO_MINOR = ".3"
+PV .= "${GO_MINOR}"
+FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
+
+SRC_URI += "\
+ file://0001-allow-CC-and-CXX-to-have-multiple-words.patch \
+ file://0002-cmd-go-make-content-based-hash-generation-less-pedan.patch \
+ file://0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch \
+ file://0004-ld-add-soname-to-shareable-objects.patch \
+ file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \
+ file://0006-cmd-dist-separate-host-and-target-builds.patch \
+ file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
+ file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
+"
+SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
+
+SRC_URI[main.md5sum] = "94ae8bf6a4fe623e34cb8b0db2a71ec0"
+SRC_URI[main.sha256sum] = "4f7123044375d5c404280737fbd2d0b17064b66182a65919ffe20ffe8620e3df"
+
diff --git a/meta/recipes-devtools/go/go-1.13/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/meta/recipes-devtools/go/go-1.13/0001-allow-CC-and-CXX-to-have-multiple-words.patch
new file mode 100644
index 0000000000..ddfd5e41d1
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0001-allow-CC-and-CXX-to-have-multiple-words.patch
@@ -0,0 +1,38 @@
+From 9e3dc44cdfa58d96504d0a789dc82617dd5bef55 Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:01:13 +0430
+Subject: [PATCH 1/9] cmd/go: Allow CC and CXX to have multiple words
+
+Upstream-Status: Inappropriate [OE specific]
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Matt Madison <matt@madison.systems>.
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+
+---
+ src/cmd/go/internal/envcmd/env.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index 17852de..7b5ec5e 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -100,11 +100,11 @@ func MkEnv() []cfg.EnvVar {
+
+ cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch)
+ if env := strings.Fields(cfg.Getenv("CC")); len(env) > 0 {
+- cc = env[0]
++ cc = strings.Join(env, " ")
+ }
+ cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch)
+ if env := strings.Fields(cfg.Getenv("CXX")); len(env) > 0 {
+- cxx = env[0]
++ cxx = strings.Join(env, " ")
+ }
+ env = append(env, cfg.EnvVar{Name: "AR", Value: envOr("AR", "ar")})
+ env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-1.13/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/meta/recipes-devtools/go/go-1.13/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
new file mode 100644
index 0000000000..4eddd39809
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -0,0 +1,226 @@
+From a13ae484e41139094505d2834437e9262a5315f7 Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:14:22 +0430
+Subject: [PATCH 2/9] cmd/go: make content-based hash generation less pedantic
+
+Upstream-Status: Inappropriate [OE specific]
+
+Go 1.10's build tool now uses content-based hashes to
+determine when something should be built or re-built.
+This same mechanism is used to maintain a built-artifact
+cache for speeding up builds.
+
+However, the hashes it generates include information that
+doesn't work well with OE, nor with using a shared runtime
+library.
+
+First, it embeds path names to source files, unless
+building within GOROOT. This prevents the building
+of a package in GOPATH for later staging into GOROOT.
+
+This patch adds support for the environment variable
+GOPATH_OMIT_IN_ACTIONID. If present, path name
+embedding is disabled.
+
+Second, if cgo is enabled, the build ID for cgo-related
+packages will include the current value of the environment
+variables for invoking the compiler (CC, CXX, FC) and
+any CGO_xxFLAGS variables. Only if the settings used
+during a compilation exactly match, character for character,
+the values used for compiling runtime/cgo or any other
+cgo-enabled package being imported, will the tool
+decide that the imported package is up-to-date.
+
+This is done to help ensure correctness, but is overly
+simplistic and effectively prevents the reuse of built
+artifacts that use cgo (or shared runtime, which includes
+runtime/cgo).
+
+This patch filters out all compiler flags except those
+beginning with '-m'. The default behavior can be restored
+by setting the CGO_PEDANTIC environment variable.
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Matt Madison <matt@madison.systems>.
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+---
+ src/cmd/go/internal/envcmd/env.go | 2 +-
+ src/cmd/go/internal/work/exec.go | 66 ++++++++++++++++++++++---------
+ 2 files changed, 49 insertions(+), 19 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index 7b5ec5e..292f117 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -154,7 +154,7 @@ func ExtraEnvVars() []cfg.EnvVar {
+ func ExtraEnvVarsCostly() []cfg.EnvVar {
+ var b work.Builder
+ b.Init()
+- cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{})
++ cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{}, false)
+ if err != nil {
+ // Should not happen - b.CFlags was given an empty package.
+ fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err)
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index 7dd9a90..ccebaf8 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -32,6 +32,8 @@ import (
+ "time"
+ )
+
++var omitGopath = os.Getenv("GOPATH_OMIT_IN_ACTIONID") != ""
++
+ // actionList returns the list of actions in the dag rooted at root
+ // as visited in a depth-first post-order traversal.
+ func actionList(root *Action) []*Action {
+@@ -205,7 +207,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ // The compiler hides the exact value of $GOROOT
+ // when building things in GOROOT.
+ // Assume b.WorkDir is being trimmed properly.
+- if !p.Goroot && !cfg.BuildTrimpath && !strings.HasPrefix(p.Dir, b.WorkDir) {
++ if !p.Goroot && !omitGopath && !cfg.BuildTrimpath && !strings.HasPrefix(p.Dir, b.WorkDir) {
+ fmt.Fprintf(h, "dir %s\n", p.Dir)
+ }
+ fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
+@@ -219,13 +221,13 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ }
+ if len(p.CgoFiles)+len(p.SwigFiles) > 0 {
+ fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
+- cppflags, cflags, cxxflags, fflags, ldflags, _ := b.CFlags(p)
+- fmt.Fprintf(h, "CC=%q %q %q %q\n", b.ccExe(), cppflags, cflags, ldflags)
++ cppflags, cflags, cxxflags, fflags, ldflags, _ := b.CFlags(p, true)
++ fmt.Fprintf(h, "CC=%q %q %q %q\n", b.ccExe(true), cppflags, cflags, ldflags)
+ if len(p.CXXFiles)+len(p.SwigFiles) > 0 {
+- fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(), cxxflags)
++ fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(true), cxxflags)
+ }
+ if len(p.FFiles) > 0 {
+- fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(), fflags)
++ fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(true), fflags)
+ }
+ // TODO(rsc): Should we include the SWIG version or Fortran/GCC/G++/Objective-C compiler versions?
+ }
+@@ -2229,33 +2231,48 @@ var (
+ // gccCmd returns a gcc command line prefix
+ // defaultCC is defined in zdefaultcc.go, written by cmd/dist.
+ func (b *Builder) GccCmd(incdir, workdir string) []string {
+- return b.compilerCmd(b.ccExe(), incdir, workdir)
++ return b.compilerCmd(b.ccExe(false), incdir, workdir)
+ }
+
+ // gxxCmd returns a g++ command line prefix
+ // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
+ func (b *Builder) GxxCmd(incdir, workdir string) []string {
+- return b.compilerCmd(b.cxxExe(), incdir, workdir)
++ return b.compilerCmd(b.cxxExe(false), incdir, workdir)
+ }
+
+ // gfortranCmd returns a gfortran command line prefix.
+ func (b *Builder) gfortranCmd(incdir, workdir string) []string {
+- return b.compilerCmd(b.fcExe(), incdir, workdir)
++ return b.compilerCmd(b.fcExe(false), incdir, workdir)
+ }
+
+ // ccExe returns the CC compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) ccExe() []string {
+- return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch))
++func (b *Builder) ccExe(filtered bool) []string {
++ return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch), filtered)
+ }
+
+ // cxxExe returns the CXX compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) cxxExe() []string {
+- return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch))
++func (b *Builder) cxxExe(filtered bool) []string {
++ return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch), filtered)
+ }
+
+ // fcExe returns the FC compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) fcExe() []string {
+- return b.compilerExe(cfg.Getenv("FC"), "gfortran")
++func (b *Builder) fcExe(filtered bool) []string {
++ return b.compilerExe(os.Getenv("FC"), "gfortran", filtered)
++}
++
++var filterFlags = os.Getenv("CGO_PEDANTIC") == ""
++
++func filterCompilerFlags(flags []string) []string {
++ var newflags []string
++ if !filterFlags {
++ return flags
++ }
++ for _, flag := range flags {
++ if strings.HasPrefix(flag, "-m") {
++ newflags = append(newflags, flag)
++ }
++ }
++ return newflags
+ }
+
+ // compilerExe returns the compiler to use given an
+@@ -2264,11 +2281,16 @@ func (b *Builder) fcExe() []string {
+ // of the compiler but can have additional arguments if they
+ // were present in the environment value.
+ // For example if CC="gcc -DGOPHER" then the result is ["gcc", "-DGOPHER"].
+-func (b *Builder) compilerExe(envValue string, def string) []string {
++func (b *Builder) compilerExe(envValue string, def string, filtered bool) []string {
+ compiler := strings.Fields(envValue)
+ if len(compiler) == 0 {
+ compiler = []string{def}
+ }
++
++ if filtered {
++ return append(compiler[0:1], filterCompilerFlags(compiler[1:])...)
++ }
++
+ return compiler
+ }
+
+@@ -2429,7 +2451,7 @@ func envList(key, def string) []string {
+ }
+
+ // CFlags returns the flags to use when invoking the C, C++ or Fortran compilers, or cgo.
+-func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) {
++func (b *Builder) CFlags(p *load.Package, filtered bool) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) {
+ defaults := "-g -O2"
+
+ if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil {
+@@ -2448,6 +2470,14 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
+ return
+ }
+
++ if filtered {
++ cppflags = filterCompilerFlags(cppflags)
++ cflags = filterCompilerFlags(cflags)
++ cxxflags = filterCompilerFlags(cxxflags)
++ fflags = filterCompilerFlags(fflags)
++ ldflags = filterCompilerFlags(ldflags)
++ }
++
+ return
+ }
+
+@@ -2462,7 +2492,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`)
+
+ func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) {
+ p := a.Package
+- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p)
++ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p, false)
+ if err != nil {
+ return nil, nil, err
+ }
+@@ -2821,7 +2851,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) {
+
+ // Run SWIG on one SWIG input file.
+ func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) {
+- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p)
++ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p, false)
+ if err != nil {
+ return "", "", err
+ }
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-1.13/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/meta/recipes-devtools/go/go-1.13/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
new file mode 100644
index 0000000000..9aa0119ae9
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
@@ -0,0 +1,54 @@
+From 28ada8896b76d620240bafc22aa395071d601482 Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:15:37 +0430
+Subject: [PATCH 3/9] cmd/go: Allow GOTOOLDIR to be overridden in the environment
+
+to allow for split host/target build roots
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Matt Madison <matt@madison.systems>.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+---
+ src/cmd/dist/build.go | 4 +++-
+ src/cmd/go/internal/cfg/cfg.go | 6 +++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index 9e50311..683ca6f 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -244,7 +244,9 @@ func xinit() {
+ workdir = xworkdir()
+ xatexit(rmworkdir)
+
+- tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
++ if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
++ tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
++ }
+ }
+
+ // compilerEnv returns a map from "goos/goarch" to the
+diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
+index a3277a6..db96350 100644
+--- a/src/cmd/go/internal/cfg/cfg.go
++++ b/src/cmd/go/internal/cfg/cfg.go
+@@ -60,7 +60,11 @@ func defaultContext() build.Context {
+ // variables. This matches the initialization of ToolDir in
+ // go/build, except for using ctxt.GOROOT rather than
+ // runtime.GOROOT.
+- build.ToolDir = filepath.Join(ctxt.GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++ if s := os.Getenv("GOTOOLDIR"); s != "" {
++ build.ToolDir = filepath.Clean(s)
++ } else {
++ build.ToolDir = filepath.Join(ctxt.GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++ }
+ }
+
+ ctxt.GOPATH = envOr("GOPATH", ctxt.GOPATH)
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-1.13/0004-ld-add-soname-to-shareable-objects.patch b/meta/recipes-devtools/go/go-1.13/0004-ld-add-soname-to-shareable-objects.patch
new file mode 100644
index 0000000000..40763ad5b1
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0004-ld-add-soname-to-shareable-objects.patch
@@ -0,0 +1,50 @@
+From bf5cf5301ae5914498454c87293d1df2e1d8489f Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:16:32 +0430
+Subject: [PATCH 4/9] ld: add soname to shareable objects
+
+so that OE's shared library dependency handling
+can find them.
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Matt Madison <matt@madison.systems>.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+---
+ src/cmd/link/internal/ld/lib.go | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
+index 3fa258d..f96fb02 100644
+--- a/src/cmd/link/internal/ld/lib.go
++++ b/src/cmd/link/internal/ld/lib.go
+@@ -1215,6 +1215,7 @@ func (ctxt *Link) hostlink() {
+ argv = append(argv, "-Wl,-z,relro")
+ }
+ argv = append(argv, "-shared")
++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ if ctxt.HeadType != objabi.Hwindows {
+ // Pass -z nodelete to mark the shared library as
+ // non-closeable: a dlclose will do nothing.
+@@ -1226,6 +1227,7 @@ func (ctxt *Link) hostlink() {
+ argv = append(argv, "-Wl,-z,relro")
+ }
+ argv = append(argv, "-shared")
++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ case BuildModePlugin:
+ if ctxt.HeadType == objabi.Hdarwin {
+ argv = append(argv, "-dynamiclib")
+@@ -1234,6 +1236,7 @@ func (ctxt *Link) hostlink() {
+ argv = append(argv, "-Wl,-z,relro")
+ }
+ argv = append(argv, "-shared")
++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ }
+ }
+
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-1.13/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/meta/recipes-devtools/go/go-1.13/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
new file mode 100644
index 0000000000..4f2a46c6ce
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -0,0 +1,44 @@
+From f05ef3ded52b98537c10efd0b15cd9612471524d Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:17:16 +0430
+Subject: [PATCH 5/9] make.bash: override CC when building dist and
+ go_bootstrap
+
+for handling OE cross-canadian builds.
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Matt Madison <matt@madison.systems>.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+---
+ src/make.bash | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/make.bash b/src/make.bash
+index 92d1481..0c2822f 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -177,7 +177,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
+ exit 1
+ fi
+ rm -f cmd/dist/dist
+-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+
+ # -e doesn't propagate out of eval, so check success by hand.
+ eval $(./cmd/dist/dist env -p || echo FAIL=true)
+@@ -208,7 +208,7 @@ fi
+ # Run dist bootstrap to complete make.bash.
+ # Bootstrap installs a proper cmd/dist, built with the new toolchain.
+ # Throw ours, built with Go 1.4, away after bootstrap.
+-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
++CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
+ rm -f ./cmd/dist/dist
+
+ # DO NOT ADD ANY NEW CODE HERE.
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-1.13/0006-cmd-dist-separate-host-and-target-builds.patch b/meta/recipes-devtools/go/go-1.13/0006-cmd-dist-separate-host-and-target-builds.patch
new file mode 100644
index 0000000000..354aaca3a1
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0006-cmd-dist-separate-host-and-target-builds.patch
@@ -0,0 +1,279 @@
+From 10735bb84df17ba657f76835f483cd8543a879c1 Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:18:12 +0430
+Subject: [PATCH 6/9] cmd/dist: separate host and target builds
+
+Upstream-Status: Inappropriate [OE specific]
+
+Change the dist tool to allow for OE-style cross-
+and cross-canadian builds:
+
+ - command flags --host-only and --target only are added;
+ if one is present, the other changes mentioned below
+ take effect, and arguments may also be specified on
+ the command line to enumerate the package(s) to be
+ built.
+
+ - for OE cross builds, go_bootstrap is always built for
+ the current build host, and is moved, along with the supporting
+ toolchain (asm, compile, etc.) to a separate 'native_native'
+ directory under GOROOT/pkg/tool.
+
+ - go_bootstrap is not automatically removed after the build,
+ so it can be reused later (e.g., building both static and
+ shared runtime).
+
+Note that for --host-only builds, it would be nice to specify
+just the "cmd" package to build only the go commands/tools,
+the staleness checks in the dist tool will fail if the "std"
+library has not also been built. So host-only builds have to
+build everything anyway.
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Matt Madison <matt@madison.systems>.
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+---
+ src/cmd/dist/build.go | 155 ++++++++++++++++++++++++++++++------------
+ 1 file changed, 112 insertions(+), 43 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index 683ca6f..0ad082b 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -41,6 +41,7 @@ var (
+ goldflags string
+ workdir string
+ tooldir string
++ build_tooldir string
+ oldgoos string
+ oldgoarch string
+ exe string
+@@ -53,6 +54,7 @@ var (
+
+ rebuildall bool
+ defaultclang bool
++ crossBuild bool
+
+ vflag int // verbosity
+ )
+@@ -247,6 +249,8 @@ func xinit() {
+ if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
+ tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
+ }
++
++ build_tooldir = pathf("%s/pkg/tool/native_native", goroot)
+ }
+
+ // compilerEnv returns a map from "goos/goarch" to the
+@@ -478,8 +482,10 @@ func setup() {
+ p := pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch)
+ if rebuildall {
+ xremoveall(p)
++ xremoveall(build_tooldir)
+ }
+ xmkdirall(p)
++ xmkdirall(build_tooldir)
+
+ if goos != gohostos || goarch != gohostarch {
+ p := pathf("%s/pkg/%s_%s", goroot, goos, goarch)
+@@ -1207,12 +1213,29 @@ func cmdbootstrap() {
+
+ var noBanner bool
+ var debug bool
++ var hostOnly bool
++ var targetOnly bool
++ var toBuild = []string{"std", "cmd"}
++
+ flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
+ flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process")
+ flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner")
++ flag.BoolVar(&hostOnly, "host-only", hostOnly, "build only host binaries, not target")
++ flag.BoolVar(&targetOnly, "target-only", targetOnly, "build only target binaries, not host")
+
+- xflagparse(0)
++ xflagparse(-1)
+
++ if hostOnly && targetOnly {
++ fatalf("specify only one of --host-only or --target-only\n")
++ }
++ crossBuild = hostOnly || targetOnly
++ if flag.NArg() > 0 {
++ if crossBuild {
++ toBuild = flag.Args()
++ } else {
++ fatalf("package names not permitted without --host-only or --target-only\n")
++ }
++ }
+ // Set GOPATH to an internal directory. We shouldn't actually
+ // need to store files here, since the toolchain won't
+ // depend on modules outside of vendor directories, but if
+@@ -1266,8 +1289,13 @@ func cmdbootstrap() {
+ xprintf("\n")
+ }
+
+- gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
+- goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now
++ // For split host/target cross/cross-canadian builds, we don't
++ // want to be setting these flags until after we have compiled
++ // the toolchain that runs on the build host.
++ if !crossBuild {
++ gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
++ goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now
++ }
+ goBootstrap := pathf("%s/go_bootstrap", tooldir)
+ cmdGo := pathf("%s/go", gobin)
+ if debug {
+@@ -1296,7 +1324,11 @@ func cmdbootstrap() {
+ xprintf("\n")
+ }
+ xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
+- os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++ if crossBuild {
++ os.Setenv("CC", defaultcc[""])
++ } else {
++ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++ }
+ goInstall(goBootstrap, append([]string{"-i"}, toolchain...)...)
+ if debug {
+ run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
+@@ -1333,50 +1365,84 @@ func cmdbootstrap() {
+ }
+ checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
+
+- if goos == oldgoos && goarch == oldgoarch {
+- // Common case - not setting up for cross-compilation.
+- timelog("build", "toolchain")
+- if vflag > 0 {
+- xprintf("\n")
++ if crossBuild {
++ gogcflags = os.Getenv("GO_GCFLAGS")
++ goldflags = os.Getenv("GO_LDFLAGS")
++ tool_files, _ := filepath.Glob(pathf("%s/*", tooldir))
++ for _, f := range tool_files {
++ copyfile(pathf("%s/%s", build_tooldir, filepath.Base(f)), f, writeExec)
++ xremove(f)
++ }
++ os.Setenv("GOTOOLDIR", build_tooldir)
++ goBootstrap = pathf("%s/go_bootstrap", build_tooldir)
++ if hostOnly {
++ timelog("build", "host toolchain")
++ if vflag > 0 {
++ xprintf("\n")
++ }
++ xprintf("Building %s for host, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
++ goInstall(goBootstrap, toBuild...)
++ checkNotStale(goBootstrap, toBuild...)
++ // Skip cmdGo staleness checks here, since we can't necessarily run the cmdGo binary
++
++ timelog("build", "target toolchain")
++ if vflag > 0 {
++ xprintf("\n")
++ }
++ } else if targetOnly {
++ goos = oldgoos
++ goarch = oldgoarch
++ os.Setenv("GOOS", goos)
++ os.Setenv("GOARCH", goarch)
++ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++ xprintf("Building %s for target, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
++ goInstall(goBootstrap, toBuild...)
++ checkNotStale(goBootstrap, toBuild...)
++ // Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary
+ }
+- xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
+ } else {
+- // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
+- // Finish GOHOSTOS/GOHOSTARCH installation and then
+- // run GOOS/GOARCH installation.
+- timelog("build", "host toolchain")
+- if vflag > 0 {
+- xprintf("\n")
+- }
+- xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
++
++ if goos == oldgoos && goarch == oldgoarch {
++ // Common case - not setting up for cross-compilation.
++ timelog("build", "toolchain")
++ if vflag > 0 {
++ xprintf("\n")
++ }
++ xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
++ } else {
++ // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
++ // Finish GOHOSTOS/GOHOSTARCH installation and then
++ // run GOOS/GOARCH installation.
++ timelog("build", "host toolchain")
++ if vflag > 0 {
++ xprintf("\n")
++ }
++ xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
++ goInstall(goBootstrap, "std", "cmd")
++ checkNotStale(goBootstrap, "std", "cmd")
++ checkNotStale(cmdGo, "std", "cmd")
++
++ timelog("build", "target toolchain")
++ if vflag > 0 {
++ xprintf("\n")
++ }
++ goos = oldgoos
++ goarch = oldgoarch
++ os.Setenv("GOOS", goos)
++ os.Setenv("GOARCH", goarch)
++ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++ xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
++ }
+ goInstall(goBootstrap, "std", "cmd")
+ checkNotStale(goBootstrap, "std", "cmd")
+ checkNotStale(cmdGo, "std", "cmd")
+
+- timelog("build", "target toolchain")
+- if vflag > 0 {
+- xprintf("\n")
++ if debug {
++ run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
++ run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
++ checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
++ copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
+ }
+- goos = oldgoos
+- goarch = oldgoarch
+- os.Setenv("GOOS", goos)
+- os.Setenv("GOARCH", goarch)
+- os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
+- xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
+- }
+- targets := []string{"std", "cmd"}
+- if goos == "js" && goarch == "wasm" {
+- // Skip the cmd tools for js/wasm. They're not usable.
+- targets = targets[:1]
+- }
+- goInstall(goBootstrap, targets...)
+- checkNotStale(goBootstrap, targets...)
+- checkNotStale(cmdGo, targets...)
+- if debug {
+- run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
+- run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
+- checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
+- copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
+ }
+
+ // Check that there are no new files in $GOROOT/bin other than
+@@ -1393,8 +1459,11 @@ func cmdbootstrap() {
+ }
+ }
+
+- // Remove go_bootstrap now that we're done.
+- xremove(pathf("%s/go_bootstrap", tooldir))
++ // Except that for split host/target cross-builds, we need to
++ // keep it.
++ if !crossBuild {
++ xremove(pathf("%s/go_bootstrap", tooldir))
++ }
+
+ if goos == "android" {
+ // Make sure the exec wrapper will sync a fresh $GOROOT to the device.
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-1.13/0007-cmd-go-make-GOROOT-precious-by-default.patch b/meta/recipes-devtools/go/go-1.13/0007-cmd-go-make-GOROOT-precious-by-default.patch
new file mode 100644
index 0000000000..e232c79199
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0007-cmd-go-make-GOROOT-precious-by-default.patch
@@ -0,0 +1,113 @@
+From 9ba507e076c744f4d394418e4a849e68cd426a4a Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:18:56 +0430
+Subject: [PATCH 7/9] cmd/go: make GOROOT precious by default
+
+Upstream-Status: Inappropriate [OE specific]
+
+The go build tool normally rebuilds whatever it detects is
+stale. This can be a problem when GOROOT is intended to
+be read-only and the go runtime has been built as a shared
+library, since we don't want every application to be rebuilding
+the shared runtime - particularly in cross-build/packaging
+setups, since that would lead to 'abi mismatch' runtime errors.
+
+This patch prevents the install and linkshared actions from
+installing to GOROOT unless overridden with the GOROOT_OVERRIDE
+environment variable.
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Matt Madison <matt@madison.systems>.
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+---
+ src/cmd/go/internal/work/action.go | 3 +++
+ src/cmd/go/internal/work/build.go | 6 ++++++
+ src/cmd/go/internal/work/exec.go | 25 +++++++++++++++++++++++++
+ 3 files changed, 34 insertions(+)
+
+diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
+index 33b7818..7617b4c 100644
+--- a/src/cmd/go/internal/work/action.go
++++ b/src/cmd/go/internal/work/action.go
+@@ -662,6 +662,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) {
+ if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] {
+ continue
+ }
++ if goRootPrecious && (p1.Standard || p1.Goroot) {
++ continue
++ }
+ haveShlib[filepath.Base(p1.Shlib)] = true
+ // TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild,
+ // we'll end up building an overall library or executable that depends at runtime
+diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
+index 9305b2d..6560317 100644
+--- a/src/cmd/go/internal/work/build.go
++++ b/src/cmd/go/internal/work/build.go
+@@ -155,6 +155,8 @@ See also: go install, go get, go clean.
+
+ const concurrentGCBackendCompilationEnabledByDefault = true
+
++var goRootPrecious bool = true
++
+ func init() {
+ // break init cycle
+ CmdBuild.Run = runBuild
+@@ -167,6 +169,10 @@ func init() {
+
+ AddBuildFlags(CmdBuild)
+ AddBuildFlags(CmdInstall)
++
++ if x := os.Getenv("GOROOT_OVERRIDE"); x != "" {
++ goRootPrecious = false
++ }
+ }
+
+ // Note that flags consulted by other parts of the code
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index ccebaf8..59450d7 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -455,6 +455,23 @@ func (b *Builder) build(a *Action) (err error) {
+ return errors.New("binary-only packages are no longer supported")
+ }
+
++ if goRootPrecious && (a.Package.Standard || a.Package.Goroot) {
++ _, err := os.Stat(a.Package.Target)
++ if err == nil {
++ a.built = a.Package.Target
++ a.Target = a.Package.Target
++ a.buildID = b.fileHash(a.Package.Target)
++ a.Package.Stale = false
++ a.Package.StaleReason = "GOROOT-resident package"
++ return nil
++ }
++ a.Package.Stale = true
++ a.Package.StaleReason = "missing or invalid GOROOT-resident package"
++ if b.IsCmdList {
++ return nil
++ }
++ }
++
+ if err := b.Mkdir(a.Objdir); err != nil {
+ return err
+ }
+@@ -1499,6 +1516,14 @@ func BuildInstallFunc(b *Builder, a *Action) (err error) {
+ return nil
+ }
+
++ if goRootPrecious && a.Package != nil {
++ p := a.Package
++ if p.Standard || p.Goroot {
++ err := fmt.Errorf("attempting to install package %s into read-only GOROOT", p.ImportPath)
++ return err
++ }
++ }
++
+ if err := b.Mkdir(a.Objdir); err != nil {
+ return err
+ }
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-1.13/0008-use-GOBUILDMODE-to-set-buildmode.patch b/meta/recipes-devtools/go/go-1.13/0008-use-GOBUILDMODE-to-set-buildmode.patch
new file mode 100644
index 0000000000..68e132f30a
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0008-use-GOBUILDMODE-to-set-buildmode.patch
@@ -0,0 +1,47 @@
+From 971b5626339ce0c4d57f9721c9a81af566c5a044 Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:19:26 +0430
+Subject: [PATCH 8/9] cmd/go: Use GOBUILDMODE to set buildmode
+
+Upstream-Status: Denied [upstream choose antoher solution: `17a256b
+cmd/go: -buildmode=pie for android/arm']
+
+While building go itself, the go build system does not support
+to set `-buildmode=pie' from environment.
+
+Add GOBUILDMODE to support it which make PIE executables the default
+build mode, as PIE executables are required as of Yocto
+
+Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Hongxu Jia <hongxu.jia@windriver.com>
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+---
+ src/cmd/go/internal/work/build.go | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
+index 6560317..5f3a988 100644
+--- a/src/cmd/go/internal/work/build.go
++++ b/src/cmd/go/internal/work/build.go
+@@ -231,7 +231,13 @@ func AddBuildFlags(cmd *base.Command) {
+
+ cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "")
+ cmd.Flag.Var(buildCompiler{}, "compiler", "")
+- cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "")
++
++ if bm := os.Getenv("GOBUILDMODE"); bm != "" {
++ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", bm, "")
++ } else {
++ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "")
++ }
++
+ cmd.Flag.Var(&load.BuildGcflags, "gcflags", "")
+ cmd.Flag.Var(&load.BuildGccgoflags, "gccgoflags", "")
+ cmd.Flag.StringVar(&cfg.BuildMod, "mod", "", "")
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-1.13/0009-ld-replace-glibc-dynamic-linker-with-musl.patch b/meta/recipes-devtools/go/go-1.13/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
new file mode 100644
index 0000000000..4bb1106f09
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.13/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
@@ -0,0 +1,134 @@
+From 973251ae0c69a35721f6115345d3f57b2847979f Mon Sep 17 00:00:00 2001
+From: Alex Kube <alexander.j.kube@gmail.com>
+Date: Wed, 23 Oct 2019 21:20:13 +0430
+Subject: [PATCH 9/9] ld: replace glibc dynamic linker with musl
+
+Rework of patch by Khem Raj <raj.khem@gmail.com>
+for go 1.10. Should be applied conditionally on
+musl being the system C library.
+
+Adapted to Go 1.13 from patches originally submitted to
+the meta/recipes-devtools/go tree by
+Matt Madison <matt@madison.systems>.
+
+Upstream-Status: Inappropriate [Real fix should be portable across libcs]
+
+Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+---
+ src/cmd/link/internal/amd64/obj.go | 2 +-
+ src/cmd/link/internal/arm/obj.go | 2 +-
+ src/cmd/link/internal/arm64/obj.go | 2 +-
+ src/cmd/link/internal/mips/obj.go | 2 +-
+ src/cmd/link/internal/mips64/obj.go | 2 +-
+ src/cmd/link/internal/ppc64/obj.go | 2 +-
+ src/cmd/link/internal/s390x/obj.go | 2 +-
+ src/cmd/link/internal/x86/obj.go | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
+index 23741eb..8e74576 100644
+--- a/src/cmd/link/internal/amd64/obj.go
++++ b/src/cmd/link/internal/amd64/obj.go
+@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ PEreloc1: pereloc1,
+ TLSIEtoLE: tlsIEtoLE,
+
+- Linuxdynld: "/lib64/ld-linux-x86-64.so.2",
++ Linuxdynld: "/lib64/ld-musl-x86-64.so.1",
+ Freebsddynld: "/libexec/ld-elf.so.1",
+ Openbsddynld: "/usr/libexec/ld.so",
+ Netbsddynld: "/libexec/ld.elf_so",
+diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go
+index 45a406e..724d3e3 100644
+--- a/src/cmd/link/internal/arm/obj.go
++++ b/src/cmd/link/internal/arm/obj.go
+@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Machoreloc1: machoreloc1,
+ PEreloc1: pereloc1,
+
+- Linuxdynld: "/lib/ld-linux.so.3", // 2 for OABI, 3 for EABI
++ Linuxdynld: "/lib/ld-musl-armhf.so.1",
+ Freebsddynld: "/usr/libexec/ld-elf.so.1",
+ Openbsddynld: "/usr/libexec/ld.so",
+ Netbsddynld: "/libexec/ld.elf_so",
+diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
+index 7c66623..d8b1db1 100644
+--- a/src/cmd/link/internal/arm64/obj.go
++++ b/src/cmd/link/internal/arm64/obj.go
+@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Gentext: gentext,
+ Machoreloc1: machoreloc1,
+
+- Linuxdynld: "/lib/ld-linux-aarch64.so.1",
++ Linuxdynld: "/lib/ld-musl-aarch64.so.1",
+
+ Freebsddynld: "XXX",
+ Openbsddynld: "/usr/libexec/ld.so",
+diff --git a/src/cmd/link/internal/mips/obj.go b/src/cmd/link/internal/mips/obj.go
+index 231e1ff..631dd7a 100644
+--- a/src/cmd/link/internal/mips/obj.go
++++ b/src/cmd/link/internal/mips/obj.go
+@@ -60,7 +60,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Gentext: gentext,
+ Machoreloc1: machoreloc1,
+
+- Linuxdynld: "/lib/ld.so.1",
++ Linuxdynld: "/lib/ld-musl-mipsle.so.1",
+
+ Freebsddynld: "XXX",
+ Openbsddynld: "XXX",
+diff --git a/src/cmd/link/internal/mips64/obj.go b/src/cmd/link/internal/mips64/obj.go
+index 9604208..5ef3ffc 100644
+--- a/src/cmd/link/internal/mips64/obj.go
++++ b/src/cmd/link/internal/mips64/obj.go
+@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Gentext: gentext,
+ Machoreloc1: machoreloc1,
+
+- Linuxdynld: "/lib64/ld64.so.1",
++ Linuxdynld: "/lib64/ld-musl-mips64le.so.1",
+ Freebsddynld: "XXX",
+ Openbsddynld: "XXX",
+ Netbsddynld: "XXX",
+diff --git a/src/cmd/link/internal/ppc64/obj.go b/src/cmd/link/internal/ppc64/obj.go
+index 51d1791..b15da85 100644
+--- a/src/cmd/link/internal/ppc64/obj.go
++++ b/src/cmd/link/internal/ppc64/obj.go
+@@ -63,7 +63,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Xcoffreloc1: xcoffreloc1,
+
+ // TODO(austin): ABI v1 uses /usr/lib/ld.so.1,
+- Linuxdynld: "/lib64/ld64.so.1",
++ Linuxdynld: "/lib64/ld-musl-powerpc64le.so.1",
+
+ Freebsddynld: "XXX",
+ Openbsddynld: "XXX",
+diff --git a/src/cmd/link/internal/s390x/obj.go b/src/cmd/link/internal/s390x/obj.go
+index 3454476..42cc346 100644
+--- a/src/cmd/link/internal/s390x/obj.go
++++ b/src/cmd/link/internal/s390x/obj.go
+@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Gentext: gentext,
+ Machoreloc1: machoreloc1,
+
+- Linuxdynld: "/lib64/ld64.so.1",
++ Linuxdynld: "/lib64/ld-musl-s390x.so.1",
+
+ // not relevant for s390x
+ Freebsddynld: "XXX",
+diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go
+index f1fad20..d2ca10c 100644
+--- a/src/cmd/link/internal/x86/obj.go
++++ b/src/cmd/link/internal/x86/obj.go
+@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Machoreloc1: machoreloc1,
+ PEreloc1: pereloc1,
+
+- Linuxdynld: "/lib/ld-linux.so.2",
++ Linuxdynld: "/lib/ld-musl-i386.so.1",
+ Freebsddynld: "/usr/libexec/ld-elf.so.1",
+ Openbsddynld: "/usr/libexec/ld.so",
+ Netbsddynld: "/usr/libexec/ld.elf_so",
+--
+2.17.1 (Apple Git-112)
+
diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc
new file mode 100644
index 0000000000..f18d928c70
--- /dev/null
+++ b/meta/recipes-devtools/go/go-common.inc
@@ -0,0 +1,42 @@
+SUMMARY = "Go programming language compiler"
+DESCRIPTION = " The Go programming language is an open source project to make \
+ programmers more productive. Go is expressive, concise, clean, and\
+ efficient. Its concurrency mechanisms make it easy to write programs\
+ that get the most out of multicore and networked machines, while its\
+ novel type system enables flexible and modular program construction.\
+ Go compiles quickly to machine code yet has the convenience of\
+ garbage collection and the power of run-time reflection. It's a\
+ fast, statically typed, compiled language that feels like a\
+ dynamically typed, interpreted language."
+
+HOMEPAGE = " http://golang.org/"
+LICENSE = "BSD-3-Clause"
+
+inherit goarch
+
+SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main"
+S = "${WORKDIR}/go"
+B = "${S}"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.src\.tar"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+SSTATE_SCAN_CMD = "true"
+
+export GOROOT_OVERRIDE = "1"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+export CGO_ENABLED = "1"
+
+export GOHOSTOS ?= "${BUILD_GOOS}"
+export GOHOSTARCH ?= "${BUILD_GOARCH}"
+export GOROOT_BOOTSTRAP ?= "${STAGING_LIBDIR_NATIVE}/go"
+export GOOS ?= "${TARGET_GOOS}"
+export GOARCH ?= "${TARGET_GOARCH}"
+export GOARM ?= "${TARGET_GOARM}"
+export GO386 ?= "${TARGET_GO386}"
+export GOMIPS ?= "${TARGET_GOMIPS}"
+export GOROOT_FINAL ?= "${libdir}/go"
+
+do_compile_prepend() {
+ BUILD_CC=${BUILD_CC}
+}
diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc
new file mode 100644
index 0000000000..d49250a8e2
--- /dev/null
+++ b/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -0,0 +1,62 @@
+inherit cross-canadian
+
+DEPENDS = "go-native virtual/${HOST_PREFIX}go-crosssdk virtual/nativesdk-${HOST_PREFIX}go-runtime \
+ virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc \
+ virtual/nativesdk-${HOST_PREFIX}compilerlibs"
+PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+
+# it uses gcc on build machine during go-cross-canadian bootstrap, but
+# the gcc version may be old and not support option '-fmacro-prefix-map'
+# which is one of default values of DEBUG_PREFIX_MAP
+DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+ -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+ -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+ "
+
+export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS} ${HOST_CC_ARCH} ${LDFLAGS}"'
+
+do_configure[noexec] = "1"
+
+do_compile() {
+ export CC_FOR_${HOST_GOTUPLE}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+ export CXX_FOR_${HOST_GOTUPLE}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+ cd src
+ ./make.bash --host-only --no-banner
+ cd ${B}
+}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
+
+
+make_wrapper() {
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
+#!/bin/sh
+here=\`dirname \$0\`
+native_goroot=\`readlink -f \$here/../../lib/${TARGET_SYS}/go\`
+export GOARCH="${TARGET_GOARCH}"
+export GOOS="${TARGET_GOOS}"
+test -n "\$GOARM" || export GOARM="${TARGET_GOARM}"
+test -n "\$GO386" || export GO386="${TARGET_GO386}"
+test -n "\$GOMIPS" || export GOMIPS="${TARGET_GOMIPS}"
+export GOTOOLDIR="\$native_goroot/pkg/tool/${HOST_GOTUPLE}"
+test -n "\$GOROOT" || export GOROOT="\$OECORE_TARGET_SYSROOT/${target_libdir}/go"
+\$here/../../lib/${TARGET_SYS}/go/bin/$1 "\$@"
+END
+ chmod +x ${D}${bindir}/$2
+}
+
+do_install() {
+ install -d ${D}${libdir}/go/pkg/tool
+ cp --preserve=mode,timestamps -R ${B}/pkg/tool/${HOST_GOTUPLE} ${D}${libdir}/go/pkg/tool/
+ install -d ${D}${bindir} ${D}${libdir}/go/bin
+ for f in ${B}/${GO_BUILD_BINDIR}/*
+ do
+ base=`basename $f`
+ install -m755 $f ${D}${libdir}/go/bin
+ make_wrapper $base ${TARGET_PREFIX}$base
+ done
+}
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.13.bb b/meta/recipes-devtools/go/go-cross-canadian_1.13.bb
new file mode 100644
index 0000000000..7ac9449e47
--- /dev/null
+++ b/meta/recipes-devtools/go/go-cross-canadian_1.13.bb
@@ -0,0 +1,2 @@
+require go-cross-canadian.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc
new file mode 100644
index 0000000000..3d5803bf07
--- /dev/null
+++ b/meta/recipes-devtools/go/go-cross.inc
@@ -0,0 +1,53 @@
+inherit cross
+
+PROVIDES = "virtual/${TUNE_PKGARCH}-go"
+DEPENDS = "go-native"
+
+PN = "go-cross-${TUNE_PKGARCH}"
+
+export GOCACHE = "${B}/.cache"
+CC = "${@d.getVar('BUILD_CC').strip()}"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+ export CC_FOR_${TARGET_GOTUPLE}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+ export CXX_FOR_${TARGET_GOTUPLE}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+ cd src
+ ./make.bash --host-only --no-banner
+ cd ${B}
+}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
+
+make_wrapper() {
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
+#!/bin/bash
+here=\`dirname \$0\`
+export GOARCH="${TARGET_GOARCH}"
+export GOOS="${TARGET_GOOS}"
+export GOARM="\${GOARM:-${TARGET_GOARM}}"
+export GO386="\${GO386:-${TARGET_GO386}}"
+export GOMIPS="\${GOMIPS:-${TARGET_GOMIPS}}"
+\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
+END
+ chmod +x ${D}${bindir}/$2
+}
+
+do_install() {
+ install -d ${D}${libdir}/go
+ cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
+ install -d ${D}${libdir}/go/src
+ (cd ${S}/src; for d in *; do \
+ [ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
+ done)
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
+ install -d ${D}${bindir} ${D}${libdir}/go/bin
+ for f in ${B}/bin/*
+ do
+ base=`basename $f`
+ install -m755 $f ${D}${libdir}/go/bin
+ make_wrapper $base ${TARGET_PREFIX}$base
+ done
+}
diff --git a/meta/recipes-devtools/go/go-cross_1.13.bb b/meta/recipes-devtools/go/go-cross_1.13.bb
new file mode 100644
index 0000000000..80b5a03f6c
--- /dev/null
+++ b/meta/recipes-devtools/go/go-cross_1.13.bb
@@ -0,0 +1,2 @@
+require go-cross.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-crosssdk.inc b/meta/recipes-devtools/go/go-crosssdk.inc
new file mode 100644
index 0000000000..f0bec79719
--- /dev/null
+++ b/meta/recipes-devtools/go/go-crosssdk.inc
@@ -0,0 +1,43 @@
+inherit crosssdk
+
+DEPENDS = "go-native virtual/${TARGET_PREFIX}gcc-crosssdk virtual/nativesdk-${TARGET_PREFIX}compilerlibs virtual/${TARGET_PREFIX}binutils-crosssdk"
+PN = "go-crosssdk-${SDK_SYS}"
+PROVIDES = "virtual/${TARGET_PREFIX}go-crosssdk"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+ export CC_FOR_${TARGET_GOTUPLE}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
+ export CXX_FOR_${TARGET_GOTUPLE}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
+ cd src
+ ./make.bash --host-only --no-banner
+ cd ${B}
+}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
+
+make_wrapper() {
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
+#!/bin/bash
+here=\`dirname \$0\`
+export GOARCH="${TARGET_GOARCH}"
+export GOOS="${TARGET_GOOS}"
+\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
+END
+ chmod +x ${D}${bindir}/$2
+}
+
+do_install() {
+ install -d ${D}${libdir}/go
+ install -d ${D}${libdir}/go/bin
+ install -d ${D}${libdir}/go/pkg/tool
+ install -d ${D}${bindir}
+ cp --preserve=mode,timestamps -R ${S}/pkg/tool/${BUILD_GOTUPLE} ${D}${libdir}/go/pkg/tool/
+ for f in ${B}/bin/*
+ do
+ base=`basename $f`
+ install -m755 $f ${D}${libdir}/go/bin
+ make_wrapper $base ${TARGET_PREFIX}$base
+ done
+}
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.13.bb b/meta/recipes-devtools/go/go-crosssdk_1.13.bb
new file mode 100644
index 0000000000..1857c8a577
--- /dev/null
+++ b/meta/recipes-devtools/go/go-crosssdk_1.13.bb
@@ -0,0 +1,2 @@
+require go-crosssdk.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch b/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch
new file mode 100644
index 0000000000..34ec9876f8
--- /dev/null
+++ b/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch
@@ -0,0 +1,54 @@
+From f0fb80604385ae3266a472601ef685896b4cc0af Mon Sep 17 00:00:00 2001
+From: Vladimir Stefanovic <vladimir.stefanovic@imgtec.com>
+Date: Fri, 17 Feb 2017 20:44:43 +0100
+Subject: [PATCH] Add support for mips, mips64
+
+---
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ vendor/github.com/boltdb/bolt/bolt_mips64x.go | 12 ++++++++++++
+ vendor/github.com/boltdb/bolt/bolt_mipsx.go | 12 ++++++++++++
+ 2 files changed, 24 insertions(+)
+ create mode 100644 vendor/github.com/boltdb/bolt/bolt_mips64x.go
+ create mode 100644 vendor/github.com/boltdb/bolt/bolt_mipsx.go
+
+diff --git a/vendor/github.com/boltdb/bolt/bolt_mips64x.go b/vendor/github.com/boltdb/bolt/bolt_mips64x.go
+new file mode 100644
+index 00000000..134b578b
+--- /dev/null
++++ b/vendor/github.com/boltdb/bolt/bolt_mips64x.go
+@@ -0,0 +1,12 @@
++// +build mips64 mips64le
++
++package bolt
++
++// maxMapSize represents the largest mmap size supported by Bolt.
++const maxMapSize = 0x8000000000 // 512GB
++
++// maxAllocSize is the size used when creating array pointers.
++const maxAllocSize = 0x7FFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
+diff --git a/vendor/github.com/boltdb/bolt/bolt_mipsx.go b/vendor/github.com/boltdb/bolt/bolt_mipsx.go
+new file mode 100644
+index 00000000..d5ecb059
+--- /dev/null
++++ b/vendor/github.com/boltdb/bolt/bolt_mipsx.go
+@@ -0,0 +1,12 @@
++// +build mips mipsle
++
++package bolt
++
++// maxMapSize represents the largest mmap size supported by Bolt.
++const maxMapSize = 0x40000000 // 1GB
++
++// maxAllocSize is the size used when creating array pointers.
++const maxAllocSize = 0xFFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
+--
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-dep_0.5.4.bb b/meta/recipes-devtools/go/go-dep_0.5.4.bb
new file mode 100644
index 0000000000..ead87870e2
--- /dev/null
+++ b/meta/recipes-devtools/go/go-dep_0.5.4.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Dependency management tool for Golang"
+HOMEPAGE = "https://github.com/golang/dep"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1bad315647751fab0007812f70d42c0d"
+
+GO_IMPORT = "github.com/golang/dep"
+SRC_URI = "git://${GO_IMPORT} \
+ file://0001-Add-support-for-mips-mips64.patch;patchdir=src/github.com/golang/dep \
+ "
+
+SRCREV = "1f7c19e5f52f49ffb9f956f64c010be14683468b"
+
+inherit go
+
+GO_INSTALL = "${GO_IMPORT}/cmd/dep"
+
+RDEPENDS_${PN}-dev += "bash"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# For compiling ptest on mips and mips64, the current go-dep version fails with the go 1.11 toolchain.
+# error message: vet config not found
+PTEST_ENABLED_mips = "0"
+PTEST_ENABLED_mips64 = "0"
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc
new file mode 100644
index 0000000000..207708745e
--- /dev/null
+++ b/meta/recipes-devtools/go/go-native.inc
@@ -0,0 +1,55 @@
+inherit native
+
+SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4"
+SRC_URI[bootstrap.md5sum] = "dbf727a4b0e365bf88d97cbfde590016"
+SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52"
+
+export GOOS = "${BUILD_GOOS}"
+export GOARCH = "${BUILD_GOARCH}"
+CC = "${@d.getVar('BUILD_CC').strip()}"
+
+GOMAKEARGS ?= "--no-banner"
+
+do_configure() {
+ cd ${WORKDIR}/go1.4/go/src
+ CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
+}
+
+do_compile() {
+ export GOROOT_FINAL="${libdir_native}/go"
+ export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go"
+
+ cd src
+ ./make.bash ${GOMAKEARGS}
+ cd ${B}
+}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin"
+
+make_wrapper() {
+ rm -f ${D}${bindir}/$2$3
+ cat <<END >${D}${bindir}/$2$3
+#!/bin/bash
+here=\`dirname \$0\`
+export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}"
+\$here/../lib/go/bin/$1 "\$@"
+END
+ chmod +x ${D}${bindir}/$2
+}
+
+do_install() {
+ install -d ${D}${libdir}/go
+ cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
+ install -d ${D}${libdir}/go/src
+ (cd ${S}/src; for d in *; do \
+ [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
+ done)
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
+ install -d ${D}${bindir} ${D}${libdir}/go/bin
+ for f in ${B}/bin/*
+ do
+ base=`basename $f`
+ install -m755 $f ${D}${libdir}/go/bin
+ make_wrapper $base $base
+ done
+}
diff --git a/meta/recipes-devtools/go/go-native_1.13.bb b/meta/recipes-devtools/go/go-native_1.13.bb
new file mode 100644
index 0000000000..bbf3c0dd73
--- /dev/null
+++ b/meta/recipes-devtools/go/go-native_1.13.bb
@@ -0,0 +1,2 @@
+require ${PN}.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
new file mode 100644
index 0000000000..21179a83a0
--- /dev/null
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -0,0 +1,87 @@
+DEPENDS = "virtual/${TUNE_PKGARCH}-go go-native"
+DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk"
+PROVIDES = "virtual/${TARGET_PREFIX}go-runtime"
+
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_CPPFLAGS = "${CPPFLAGS}"
+export CGO_CXXFLAGS = "${CXXFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+export GOCACHE = "${B}/.cache"
+
+GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
+GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"'
+
+do_configure() {
+ :
+}
+
+do_configure_libc-musl() {
+ rm -f ${S}/src/runtime/race/*.syso
+}
+
+do_compile() {
+ export CC_FOR_${TARGET_GOTUPLE}="${CC}"
+ export CXX_FOR_${TARGET_GOTUPLE}="${CXX}"
+
+ cd src
+ ./make.bash --target-only --no-banner std
+ if [ -n "${GO_DYNLINK}" ]; then
+ export GOTOOLDIR="${B}/pkg/tool/native_native"
+ CC="$CC_FOR_${TARGET_GOTUPLE}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \
+ $GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_SHLIB_LDFLAGS} std
+ fi
+ cd ${B}
+}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
+
+do_install() {
+ install -d ${D}${libdir}/go/src
+ cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
+ if [ "${BUILD_GOTUPLE}" != "${TARGET_GOTUPLE}" ]; then
+ rm -rf ${D}${libdir}/go/pkg/${BUILD_GOTUPLE}
+ rm -rf ${D}${libdir}/go/pkg/obj/${BUILD_GOTUPLE}
+ fi
+ rm -rf ${D}${libdir}/go/pkg/tool
+ rm -rf ${D}${libdir}/go/pkg/obj
+ rm -rf ${D}${libdir}/go/pkg/bootstrap
+ find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
+ cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
+ done
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
+ rm -f ${D}${libdir}/go/src/cmd/dist/dist
+ rm -f ${D}${libdir}/go/src/cmd/cgo/zdefaultcc.go
+ rm -f ${D}${libdir}/go/src/cmd/go/internal/cfg/zdefaultcc.go
+
+}
+
+ALLOW_EMPTY_${PN} = "1"
+FILES_${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}"
+FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \
+"
+FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE}"
+
+# Go sources include some scripts and pre-built binaries for
+# multiple architectures. The static .a files for dynamically-linked
+# runtime are also required in -dev.
+INSANE_SKIP_${PN}-dev = "staticdev file-rdeps arch"
+
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_SYSROOT_STRIP = "1"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/go/go-runtime_1.13.bb b/meta/recipes-devtools/go/go-runtime_1.13.bb
new file mode 100644
index 0000000000..43b68b4e46
--- /dev/null
+++ b/meta/recipes-devtools/go/go-runtime_1.13.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-runtime.inc
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc
new file mode 100644
index 0000000000..316bf6f038
--- /dev/null
+++ b/meta/recipes-devtools/go/go-target.inc
@@ -0,0 +1,45 @@
+DEPENDS = "virtual/${TUNE_PKGARCH}-go go-native"
+DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
+
+export GOCACHE = "${B}/.cache"
+GO_LDFLAGS = ""
+GO_LDFLAGS_class-nativesdk = "-linkmode external"
+export GO_LDFLAGS
+
+CC_append_class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+ export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+ export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
+
+ cd src
+ ./make.bash --target-only --no-banner
+ cd ${B}
+}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
+
+do_install() {
+ install -d ${D}${libdir}/go/pkg/tool
+ cp --preserve=mode,timestamps -R ${B}/pkg/tool/${TARGET_GOTUPLE} ${D}${libdir}/go/pkg/tool/
+ install -d ${D}${libdir}/go/src
+ cp --preserve=mode,timestamps -R ${S}/src/cmd ${D}${libdir}/go/src/
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
+ install -d ${D}${libdir}/go/bin
+ install -d ${D}${bindir}
+ for f in ${B}/${GO_BUILD_BINDIR}/*; do
+ name=`basename $f`
+ install -m 0755 $f ${D}${libdir}/go/bin/
+ ln -sf ../${baselib}/go/bin/$name ${D}${bindir}/
+ done
+}
+
+PACKAGES = "${PN} ${PN}-dev"
+FILES_${PN} = "${libdir}/go/bin ${libdir}/go/pkg/tool/${TARGET_GOTUPLE} ${bindir}"
+FILES_${PN}-dev = "${libdir}/go"
+RDEPENDS_${PN}-dev = "perl bash"
+INSANE_SKIP_${PN} = "ldflags"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/go/go_1.13.bb b/meta/recipes-devtools/go/go_1.13.bb
new file mode 100644
index 0000000000..483e2e2cb7
--- /dev/null
+++ b/meta/recipes-devtools/go/go_1.13.bb
@@ -0,0 +1,14 @@
+require go-${PV}.inc
+require go-target.inc
+
+export GOBUILDMODE=""
+
+# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips
+# doesn't support -buildmode=pie, so skip the QA checking for mips and its
+# variants.
+python() {
+ if 'mips' in d.getVar('TARGET_ARCH',True):
+ d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel")
+ else:
+ d.setVar('GOBUILDMODE', 'pie')
+}
diff --git a/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch b/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
deleted file mode 100644
index 8e84747704..0000000000
--- a/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 76155065c70b5ab65c6c805423183b360141db84 Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Thu, 28 Jan 2016 04:46:23 +0100
-Subject: [PATCH] Recognize nios2 as compilation target
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Submitted [ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22480 ]
----
- module/system/base/target.scm | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/module/system/base/target.scm b/module/system/base/target.scm
---- a/module/system/base/target.scm
-+++ b/module/system/base/target.scm
-@@ -65,7 +65,7 @@
- (cond ((string-match "^i[0-9]86$" cpu)
- (endianness little))
- ((member cpu '("x86_64" "ia64"
-- "powerpcle" "powerpc64le" "mipsel" "mips64el" "sh4"))
-+ "powerpcle" "powerpc64le" "mipsel" "mips64el" "sh4" "nios2"))
- (endianness little))
- ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
- "mips" "mips64" "m68k" "s390x"))
-@@ -108,7 +108,7 @@
-
- ((string-match "64$" cpu) 8)
- ((string-match "64_?[lbe][lbe]$" cpu) 8)
-- ((member cpu '("sparc" "powerpc" "mips" "mipsel" "m68k" "sh4")) 4)
-+ ((member cpu '("sparc" "powerpc" "mips" "mipsel" "m68k" "sh4" "nios2")) 4)
- ((member cpu '("s390x")) 8)
- ((string-match "^arm.*" cpu) 4)
- (else (error "unknown CPU word size" cpu)))))
diff --git a/meta/recipes-devtools/guile/files/arm_aarch64.patch b/meta/recipes-devtools/guile/files/arm_aarch64.patch
deleted file mode 100644
index f1788b62fb..0000000000
--- a/meta/recipes-devtools/guile/files/arm_aarch64.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-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/arm_endianness.patch b/meta/recipes-devtools/guile/files/arm_endianness.patch
deleted file mode 100644
index ea4328b81d..0000000000
--- a/meta/recipes-devtools/guile/files/arm_endianness.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Support form ARM endianness
-
-Fixes Yocto bug# 2729
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-Index: guile-2.0.5/module/system/base/target.scm
-===================================================================
---- guile-2.0.5.orig/module/system/base/target.scm 2012-01-24 03:06:06.000000000 -0800
-+++ guile-2.0.5/module/system/base/target.scm 2012-07-12 13:05:44.372364103 -0700
-@@ -70,7 +70,9 @@
- ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
- "mips" "mips64"))
- (endianness big))
-- ((string-match "^arm.*el" cpu)
-+ ((string-match "^arm.*eb" cpu)
-+ (endianness big))
-+ ((string-match "^arm.*" cpu)
- (endianness little))
- (else
- (error "unknown CPU endianness" cpu)))))
diff --git a/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch b/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
deleted file mode 100644
index c7bf635ac7..0000000000
--- a/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Inappropriate [debian patch]
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-From e52bfcdbaca5dce498678d8f512381e3e39a4066 Mon Sep 17 00:00:00 2001
-From: Rob Browning <rlb@defaultvalue.org>
-Date: Sun, 18 Mar 2012 11:40:55 -0500
-Subject: Mark "Unused modules are removed" gc test as unresolved.
-
-As per discussion with upstream, mark this test as unresolved since it
-may produce false negatives, depending on the behavior/timing of the
-garbage collector.
----
- test-suite/tests/gc.test | 11 ++++++-----
- 1 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test
-index a969752..8c8e13e 100644
---- a/test-suite/tests/gc.test
-+++ b/test-suite/tests/gc.test
-@@ -84,11 +84,13 @@
- ;; one gc round. not sure why.
-
- (maybe-gc-flakiness
-- (= (let lp ((i 0))
-- (if (guard)
-- (lp (1+ i))
-- i))
-- total))))
-+ (or (= (let lp ((i 0))
-+ (if (guard)
-+ (lp (1+ i))
-+ i))
-+ total)
-+ (throw 'unresolved)))))
-+
-
- (pass-if "Lexical vars are collectable"
- (let ((l (compile
diff --git a/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch b/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
deleted file mode 100644
index d3faf3e01a..0000000000
--- a/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Inappropriate [debian patch]
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-From 848543091d55dddb54a85612155964506d712852 Mon Sep 17 00:00:00 2001
-From: Rob Browning <rlb@defaultvalue.org>
-Date: Sun, 18 Mar 2012 13:28:24 -0500
-Subject: Mark "mutex with owner not retained" threads test as unresolved.
-
-As per discussion with upstream, mark this test as unresolved since it
-may produce false negatives, depending on the behavior/timing of the
-garbage collector.
----
- test-suite/tests/threads.test | 6 ++++--
- 1 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/test-suite/tests/threads.test b/test-suite/tests/threads.test
-index 85a7c38..50899cb 100644
---- a/test-suite/tests/threads.test
-+++ b/test-suite/tests/threads.test
-@@ -414,8 +414,10 @@
-
- (gc) (gc)
- (let ((m (g)))
-- (and (mutex? m)
-- (eq? (mutex-owner m) (current-thread)))))))
-+ (or
-+ (and (mutex? m)
-+ (eq? (mutex-owner m) (current-thread)))
-+ (throw 'unresolved))))))
-
- ;;
- ;; mutex lock levels
diff --git a/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch b/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
deleted file mode 100644
index 5597bb21f1..0000000000
--- a/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Pending
-
-This fixes sed issue when prefix has / in it, like /usr/local
-
-autoreconf error avoided:
-| sed: -e expression #1, char 9: unknown option to `s'
-| configure.ac:39: error: AC_INIT should be called with package and version arguments
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/01
-
-Index: guile-2.0.5/build-aux/git-version-gen
-===================================================================
---- guile-2.0.5.orig/build-aux/git-version-gen
-+++ guile-2.0.5/build-aux/git-version-gen
-@@ -187,7 +187,7 @@ else
- v=UNKNOWN
- fi
-
--v=`echo "$v" |sed "s/^$prefix//"`
-+v=`echo "$v" |sed "s#^$prefix##"`
-
- # Test whether to append the "-dirty" suffix only if the version
- # string we're using came from git. I.e., skip the test if it's "UNKNOWN"
diff --git a/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch b/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
deleted file mode 100644
index 290b9d447d..0000000000
--- a/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-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 -> install-exec-hook
-
-It may install such a file:
-/usr/lib64/libguile-2.0*-gdb.scm
-
-This is because when there is no file in the directory:
-for f in libguile-2.0*; do
- [snip]
-done
-
-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 | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/libguile/Makefile.am b/libguile/Makefile.am
-index 5decd99..52645b7 100644
---- a/libguile/Makefile.am
-+++ b/libguile/Makefile.am
-@@ -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
- @$(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
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch b/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
deleted file mode 100644
index da69b5fd7b..0000000000
--- a/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Inappropriate [opensuse patch]
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Index: guile-2.0.3/libguile/hash.c
-===================================================================
---- guile-2.0.3.orig/libguile/hash.c 2011-07-06 15:49:59.000000000 -0700
-+++ guile-2.0.3/libguile/hash.c 2012-01-13 21:49:43.332844884 -0800
-@@ -270,7 +270,7 @@ scm_hasher(SCM obj, unsigned long n, siz
- unsigned long
- scm_ihashq (SCM obj, unsigned long n)
- {
-- return (SCM_UNPACK (obj) >> 1) % n;
-+ return ((unsigned long) SCM_UNPACK (obj) >> 1) % n;
- }
-
-
-@@ -306,7 +306,7 @@ scm_ihashv (SCM obj, unsigned long n)
- if (SCM_NUMP(obj))
- return (unsigned long) scm_hasher(obj, n, 10);
- else
-- return SCM_UNPACK (obj) % n;
-+ return (unsigned long) SCM_UNPACK (obj) % n;
- }
-
-
-Index: guile-2.0.3/libguile/struct.c
-===================================================================
---- guile-2.0.3.orig/libguile/struct.c 2011-07-06 15:50:00.000000000 -0700
-+++ guile-2.0.3/libguile/struct.c 2012-01-13 21:49:43.332844884 -0800
-@@ -942,7 +942,7 @@ scm_struct_ihashq (SCM obj, unsigned lon
- {
- /* The length of the hash table should be a relative prime it's not
- necessary to shift down the address. */
-- return SCM_UNPACK (obj) % n;
-+ return (unsigned long) SCM_UNPACK (obj) % n;
- }
-
- SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0,
diff --git a/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch b/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
deleted file mode 100644
index 6c348384a5..0000000000
--- a/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-libguile/vm-i-system.c: workaround ice ssa corruption while compiling with option -g -O
-
-While compiling with option -g -O, there was a ssa corruption:
-..
-Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE.
-sp_48(ab) and sp_3476(ab)
-guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine':
-guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption
- #define VM_NAME vm_debug_engine
- ^
-guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME'
- VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
- ^
-Please submit a full bug report,
-with preprocessed source if appropriate.
-See <http://gcc.gnu.org/bugs.html> for instructions.
-...
-
-Tweak libguile/vm-i-system.c to add boundary value check to workaround it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- libguile/vm-i-system.c | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
-
-diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
---- a/libguile/vm-i-system.c
-+++ b/libguile/vm-i-system.c
-@@ -625,10 +625,22 @@ VM_DEFINE_INSTRUCTION (47, bind_optionals_shuffle, "bind-optionals/shuffle", 6,
- /* now shuffle up, from walk to ntotal */
- {
- scm_t_ptrdiff nshuf = sp - walk + 1, i;
-- sp = (fp - 1) + ntotal + nshuf;
-- CHECK_OVERFLOW ();
-- for (i = 0; i < nshuf; i++)
-- sp[-i] = walk[nshuf-i-1];
-+ /* check the value of nshuf to workaround ice ssa corruption */
-+ /* while compiling with -O -g */
-+ if (nshuf > 0)
-+ {
-+ sp = (fp - 1) + ntotal + nshuf;
-+ CHECK_OVERFLOW ();
-+ for (i = 0; i < nshuf; i++)
-+ sp[-i] = walk[nshuf-i-1];
-+ }
-+ else
-+ {
-+ sp = (fp - 1) + ntotal + nshuf;
-+ CHECK_OVERFLOW ();
-+ for (i = 0; i < nshuf; i++)
-+ sp[-i] = walk[nshuf-i-1];
-+ }
- }
- /* and fill optionals & keyword args with SCM_UNDEFINED */
- while (walk <= (fp - 1) + ntotal)
---
-1.9.1
-
diff --git a/meta/recipes-devtools/guile/guile_2.0.12.bb b/meta/recipes-devtools/guile/guile_2.0.12.bb
deleted file mode 100644
index d2fe511ae4..0000000000
--- a/meta/recipes-devtools/guile/guile_2.0.12.bb
+++ /dev/null
@@ -1,121 +0,0 @@
-SUMMARY = "Guile is the GNU Ubiquitous Intelligent Language for Extensions"
-DESCRIPTION = "Guile is the GNU Ubiquitous Intelligent Language for Extensions,\
- the official extension language for the GNU operating system.\
- Guile is a library designed to help programmers create flexible applications.\
- Using Guile in an application allows the application's functionality to be\
- extended by users or other programmers with plug-ins, modules, or scripts.\
- Guile provides what might be described as 'practical software freedom,'\
- making it possible for users to customize an application to meet their\
- needs without digging into the application's internals."
-
-HOMEPAGE = "http://www.gnu.org/software/guile/"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
- file://debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch \
- file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \
- 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-hook.patch \
- file://0002-Recognize-nios2-as-compilation-target.patch \
- "
-
-SRC_URI[md5sum] = "081fdf80cd3a76f260a2a0d87f773d6b"
-SRC_URI[sha256sum] = "de8187736f9b260f2fa776ed39b52cb74dd389ccf7039c042f0606270196b7e9"
-
-inherit autotools gettext pkgconfig texinfo
-BBCLASSEXTEND = "native"
-
-DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline"
-# add guile-native only to the target recipe's DEPENDS
-DEPENDS_append_class-target = " guile-native libatomic-ops"
-
-# The comment of the script guile-config said it has been deprecated but we should
-# at least add the required dependency to make it work since we still provide the script.
-RDEPENDS_${PN} = "pkgconfig"
-
-RDEPENDS_${PN}_append_libc-glibc_class-target = " glibc-gconv-iso8859-1"
-
-EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without-libreadline-prefix', ''][bb.data.inherits_class('native',d)]}"
-
-EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \
- --with-libgmp-prefix=${STAGING_LIBDIR} \
- --with-libltdl-prefix=${STAGING_LIBDIR}"
-EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no "
-
-CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \
- -DHAVE_GC_GET_HEAP_USAGE_SAFE \
- -DHAVE_GC_GET_FREE_SPACE_DIVISOR \
- -DHAVE_GC_SET_FINALIZE_ON_DEMAND \
- "
-
-do_configure_prepend() {
- mkdir -p po
-}
-
-export GUILE_FOR_BUILD="${BUILD_SYS}-guile"
-
-do_install_append_class-native() {
- install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
-
- create_wrapper ${D}/${bindir}/guile \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
- create_wrapper ${D}${bindir}/${HOST_SYS}-guile \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
-}
-
-do_install_append_class-target() {
- # cleanup buildpaths in scripts
- sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}${bindir}/guile-config
- sed -i -e 's:${STAGING_DIR_HOST}::' ${D}${bindir}/guile-snarf
-
- sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc
-}
-
-do_install_append_libc-musl() {
- rm -f ${D}${libdir}/charset.alias
-}
-
-SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
-
-guile_cross_config() {
- # this is only for target recipe
- if [ "${PN}" = "guile" ]
- then
- # Create guile-config returning target values instead of native values
- install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
- echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
- > ${B}/guile-config.cross
- sed -n -e 's:^[ \t]*{[ \t]*": (:' \
- -e 's:",[ \t]*": . ":' \
- -e 's:" *}, *\\:"):' \
- -e 's:^.*cachedir.*$::' \
- -e '/^ (/p' \
- < ${B}/libguile/libpath.h >> ${B}/guile-config.cross
- echo '))' >> ${B}/guile-config.cross
- cat ${B}/meta/guile-config >> ${B}/guile-config.cross
- install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
- fi
-}
-
-# Guile needs the compiled files to be newer than the source, and it won't
-# auto-compile into the prefix even if it can write there, so touch them here as
-# sysroot is managed.
-SSTATEPOSTINSTFUNCS += "guile_sstate_postinst"
-guile_sstate_postinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- find ${STAGING_DIR_TARGET}/${libdir}/guile/2.0/ccache -type f | xargs touch
- fi
-}
-
-# http://errors.yoctoproject.org/Errors/Details/20491/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/meta/recipes-devtools/guilt/files/guilt-bash.patch b/meta/recipes-devtools/guilt/files/guilt-bash.patch
deleted file mode 100644
index 70a439e816..0000000000
--- a/meta/recipes-devtools/guilt/files/guilt-bash.patch
+++ /dev/null
@@ -1,288 +0,0 @@
-guilt: explicitly call for bash
-
-Running complex guilt stacks of patches/commits can cause interesting
-failures after ~20m of processing, with errors like "Bad substitution".
-
-These have been traced back to having /bin/sh --> /bin/dash on Ubuntu
-systems. Putting a shell that actually *works* (such as /bin/bash)
-in as /bin/sh makes the problem go away. So here we change the guilt
-scripts to explicitly call for bash to ensure we don't have a similar
-issue after deployment.
-
-Upstream-Status: Inappropriate [oe-specific]
-
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
----
- guilt | 2 +-
- guilt-add | 2 +-
- guilt-applied | 2 +-
- guilt-branch | 2 +-
- guilt-delete | 2 +-
- guilt-diff | 2 +-
- guilt-export | 2 +-
- guilt-files | 2 +-
- guilt-fold | 2 +-
- guilt-fork | 2 +-
- guilt-graph | 2 +-
- guilt-header | 2 +-
- guilt-help | 2 +-
- guilt-import | 2 +-
- guilt-import-commit | 2 +-
- guilt-init | 4 ++--
- guilt-new | 2 +-
- guilt-next | 2 +-
- guilt-patchbomb | 2 +-
- guilt-pop | 2 +-
- guilt-prev | 2 +-
- guilt-push | 2 +-
- guilt-rebase | 2 +-
- guilt-refresh | 2 +-
- guilt-rm | 2 +-
- guilt-series | 2 +-
- guilt-status | 2 +-
- guilt-top | 2 +-
- guilt-unapplied | 2 +-
- 29 files changed, 30 insertions(+), 30 deletions(-)
-
---- a/guilt
-+++ b/guilt
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006-2010
- #
---- a/guilt-add
-+++ b/guilt-add
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-applied
-+++ b/guilt-applied
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-branch
-+++ b/guilt-branch
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2007-2008
- #
---- a/guilt-delete
-+++ b/guilt-delete
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-diff
-+++ b/guilt-diff
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (C) 2007 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
- #
---- a/guilt-export
-+++ b/guilt-export
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Pierre Habouzit, 2007
- #
---- a/guilt-files
-+++ b/guilt-files
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (C) 2007 Yasushi SHOJI <yashi@atmark-techno.com>
- #
---- a/guilt-fold
-+++ b/guilt-fold
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-fork
-+++ b/guilt-fork
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2007
- #
---- a/guilt-graph
-+++ b/guilt-graph
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2007
- #
---- a/guilt-header
-+++ b/guilt-header
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006-2010
- #
---- a/guilt-help
-+++ b/guilt-help
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2007
- #
---- a/guilt-import
-+++ b/guilt-import
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2007
- #
---- a/guilt-import-commit
-+++ b/guilt-import-commit
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2007
- #
---- a/guilt-init
-+++ b/guilt-init
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
-@@ -31,7 +31,7 @@ touch "$GUILT_DIR/$branch/status"
-
- mkdir -p "$GIT_DIR/hooks/guilt"
- cat > "$GIT_DIR/hooks/guilt/delete" <<EOF
--#!/bin/sh
-+#!/bin/bash
- # Usage: <script> <patch being removed>
-
- echo "Removing patch '\$1'..."
---- a/guilt-new
-+++ b/guilt-new
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-next
-+++ b/guilt-next
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-patchbomb
-+++ b/guilt-patchbomb
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2007
- #
---- a/guilt-pop
-+++ b/guilt-pop
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-prev
-+++ b/guilt-prev
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-push
-+++ b/guilt-push
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-rebase
-+++ b/guilt-rebase
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2007
- #
---- a/guilt-refresh
-+++ b/guilt-refresh
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-rm
-+++ b/guilt-rm
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-series
-+++ b/guilt-series
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-status
-+++ b/guilt-status
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-top
-+++ b/guilt-top
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
---- a/guilt-unapplied
-+++ b/guilt-unapplied
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
- #
diff --git a/meta/recipes-devtools/guilt/guilt-native_git.bb b/meta/recipes-devtools/guilt/guilt-native_git.bb
deleted file mode 100644
index b63c68c4d8..0000000000
--- a/meta/recipes-devtools/guilt/guilt-native_git.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "quilt-like tool for Git"
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b6f3400dc1a01cebafe8a52b3f344135"
-
-inherit native
-
-SRC_URI = "git://repo.or.cz/guilt.git \
- file://guilt-bash.patch \
- "
-PV = "0.35+git${SRCPV}"
-SRCREV = "c2a5bae511c6d5354aa4e1cb59069c31df2b8eeb"
-
-S = "${WORKDIR}/git"
-
-# we don't compile, we just install
-do_compile() {
- :
-}
-
-do_install() {
- oe_runmake PREFIX=${D}/${prefix} install
-}
diff --git a/meta/recipes-devtools/help2man/help2man-native_1.47.11.bb b/meta/recipes-devtools/help2man/help2man-native_1.47.11.bb
new file mode 100644
index 0000000000..a60e851897
--- /dev/null
+++ b/meta/recipes-devtools/help2man/help2man-native_1.47.11.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Program for creating simple man pages"
+SECTION = "devel"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "autoconf-native automake-native"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "dd322adcaede5bd5eaed075ff8971bc1"
+SRC_URI[sha256sum] = "5985b257f86304c8791842c0c807a37541d0d6807ee973000cf8a3fe6ad47b88"
+
+inherit autotools native
+
+EXTRA_OECONF = "--disable-nls"
+
+# We don't want to reconfigure things as it would require 'perlnative' to be
+# used.
+do_configure() {
+ oe_runconf
+}
+
+do_install_append () {
+ # Make sure we use /usr/bin/env perl
+ sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
+}
diff --git a/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb b/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
deleted file mode 100644
index 64dc32cb96..0000000000
--- a/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Program for creating simple man pages"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "autoconf-native automake-native"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "544aca496a7d89de3e5d99e56a2f03d3"
-SRC_URI[sha256sum] = "d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d81667c0207753"
-
-inherit autotools native
-
-EXTRA_OECONF = "--disable-nls"
-
-# We don't want to reconfigure things as it would require 'perlnative' to be
-# used.
-do_configure() {
- oe_runconf
-}
-
-do_install_append () {
- # Make sure we use /usr/bin/env perl
- sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
-}
diff --git a/meta/recipes-devtools/i2c-tools/files/Module.mk b/meta/recipes-devtools/i2c-tools/files/Module.mk
deleted file mode 100644
index fcaf72f22a..0000000000
--- a/meta/recipes-devtools/i2c-tools/files/Module.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-# EEPROMER
-#
-# Licensed under the GNU General Public License.
-
-EEPROMER_DIR := eepromer
-
-EEPROMER_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
- -Wcast-align -Wwrite-strings -Wnested-externs -Winline \
- -W -Wundef -Wmissing-prototypes -Iinclude
-
-EEPROMER_TARGETS := eepromer eeprom eeprog
-
-#
-# Programs
-#
-
-$(EEPROMER_DIR)/eepromer: $(EEPROMER_DIR)/eepromer.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-$(EEPROMER_DIR)/eeprom: $(EEPROMER_DIR)/eeprom.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-$(EEPROMER_DIR)/eeprog: $(EEPROMER_DIR)/eeprog.o $(EEPROMER_DIR)/24cXX.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-#
-# Objects
-#
-
-$(EEPROMER_DIR)/eepromer.o: $(EEPROMER_DIR)/eepromer.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/eeprom.o: $(EEPROMER_DIR)/eeprom.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/eeprog.o: $(EEPROMER_DIR)/eeprog.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/24cXX.o: $(EEPROMER_DIR)/24cXX.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-#
-# Commands
-#
-
-all-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-
-strip-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
- strip $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-
-clean-eepromer:
- $(RM) $(addprefix $(EEPROMER_DIR)/,*.o $(EEPROMER_TARGETS))
-
-install-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
- $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
- for program in $(EEPROMER_TARGETS) ; do \
- $(INSTALL_PROGRAM) $(EEPROMER_DIR)/$$program $(DESTDIR)$(sbindir) ; done
-
-uninstall-eepromer:
- for program in $(EEPROMER_TARGETS) ; do \
- $(RM) $(DESTDIR)$(sbindir)/$$program ; \
- $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done
-
-all: all-eepromer
-
-strip: strip-eepromer
-
-clean: clean-eepromer
-
-install: install-eepromer
-
-uninstall: uninstall-eepromer
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
deleted file mode 100644
index 4d255423ea..0000000000
--- a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Set of i2c tools for linux"
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2 \
- file://Module.mk \
-"
-SRC_URI[md5sum] = "7104a1043d11a5e2c7b131614eb1b962"
-SRC_URI[sha256sum] = "db5e69f2e2a6e3aa2ecdfe6a5f490b149c504468770f58921c8c5b8a7860a441"
-
-inherit autotools-brokensep
-
-do_compile_prepend() {
- cp ${WORKDIR}/Module.mk ${S}/eepromer/
- sed -i 's#/usr/local#/usr#' ${S}/Makefile
- echo "include eepromer/Module.mk" >> ${S}/Makefile
-}
-
-do_install_append() {
- install -d ${D}${includedir}/linux
- install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
- rm -f ${D}${includedir}/linux/i2c-dev.h
-}
-
-PACKAGES =+ "${PN}-misc"
-FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
- ${bindir}/ddcmon \
- ${bindir}/decode-edid \
- ${bindir}/decode-dimms \
- ${bindir}/decode-vaio \
- "
-RDEPENDS_${PN}-misc = "${PN} perl"
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
new file mode 100644
index 0000000000..c5761170aa
--- /dev/null
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Set of i2c tools for linux"
+HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \
+"
+
+SRC_URI[md5sum] = "3536237a6b51fb10caacdc3b8a496237"
+SRC_URI[sha256sum] = "ef8f77afc70e7dbfd1171bfeae87a8a7f10074829370ce8d9ccd585a014e0073"
+
+inherit update-alternatives
+
+EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \
+ incdir=${includedir} libdir=${libdir} \
+ mandir=${mandir} \
+ EXTRA=eeprog"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "${PN}-misc"
+FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
+ ${bindir}/ddcmon \
+ ${bindir}/decode-edid \
+ ${bindir}/decode-dimms \
+ ${bindir}/decode-vaio \
+ "
+RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \
+ perl-module-constant perl-module-file-basename \
+ perl-module-fcntl perl-module-strict perl-module-vars \
+ perl-module-carp \
+ "
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "i2cdetect i2cdump i2cget i2cset i2ctransfer"
+ALTERNATIVE_LINK_NAME[i2cdetect] = "${sbindir}/i2cdetect"
+ALTERNATIVE_LINK_NAME[i2cdump] = "${sbindir}/i2cdump"
+ALTERNATIVE_LINK_NAME[i2cget] = "${sbindir}/i2cget"
+ALTERNATIVE_LINK_NAME[i2cset] = "${sbindir}/i2cset"
+ALTERNATIVE_LINK_NAME[i2ctransfer] = "${sbindir}/i2ctransfer"
diff --git a/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb b/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb
deleted file mode 100644
index f8f4aef392..0000000000
--- a/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "icecc environment setup script"
-DESCRIPTION = "This is a version of the icecc-create-env script that has \
-been modified in order to make it work with OE."
-SECTION = "base"
-# source file has just a "GPL" word, but upstream is GPLv2+.
-# most probably just GPL would be a mistake
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"
-
-PR = "r2"
-
-DEPENDS = ""
-INHIBIT_DEFAULT_DEPS = "1"
-
-inherit native
-
-# This is needed, because otherwise there is dependency loop from quilt-native
-# Dependency loop #1 found:
-# Task 10907 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_install) (dependent Tasks ['quilt-native, do_compile'])
-# Task 10908 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot) (dependent Tasks ['quilt-native, do_install'])
-# Task 10997 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_patch) (dependent Tasks ['icecc-create-env-native, do_unpack', 'quilt-native, do_populate_sysroot'])
-# Task 11001 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_configure) (dependent Tasks ['icecc-create-env-native, do_patch'])
-# Task 11002 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_compile) (dependent Tasks ['icecc-create-env-native, do_configure'])
-# Task 10998 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_install) (dependent Tasks ['icecc-create-env-native, do_compile'])
-# Task 10999 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_populate_sysroot) (dependent Tasks ['icecc-create-env-native, do_install'])
-# Task 10910 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_configure) (dependent Tasks ['quilt-native, do_patch', 'icecc-create-env-native, do_populate_sysroot'])
-# Task 10911 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_compile) (dependent Tasks ['quilt-native, do_configure'])
-PATCHTOOL = "patch"
-SRC_URI = "file://icecc-create-env"
-
-S = "${WORKDIR}"
-
-do_install() {
- install -d ${D}/${bindir}
- install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
-}
diff --git a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index 7e4dbc414e..64b5e20785 100755
--- a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -4,69 +4,208 @@
# Copyright (C) 2004 by the Icecream Authors
# GPL
-target_files=
+target_paths=
+target_aliases=
-is_contained ()
+# Always prints, optionally to a log file
+print_output ()
{
- case " $target_files " in
- *" $1 "* ) return 0 ;;
- *"=$1 "* ) return 0;;
- * ) return 1 ;;
- esac
+ if test -n "$log_path"; then
+ echo "$@" | tee -a "$log_path"
+ else
+ echo "$@"
+ fi
}
-add_file ()
+# Only prints if the debug flag is specified
+print_debug ()
+{
+ if test -n "$debug"; then
+ print_output "$@"
+ fi
+}
+
+is_dynamic_elf ()
+{
+ # Is the file an dynamically linked ELF executable?
+ (file -L "$1" | grep 'ELF' > /dev/null 2>&1) && (! file -L "$1" | grep 'static' > /dev/null 2>&1)
+}
+
+fix_rpath ()
+{
+ # Patches the RPATH for a file. When the program is executed in the chroot
+ # be iceccd, /proc is not mounted. As such, $ORIGIN can't be resolved. To
+ # work around this, replace all instances of $ORIGIN in RPATH with the
+ # known chroot path to the executables directory
+ local path="$1"
+ local origin="$2"
+ if ! is_dynamic_elf "$path"; then
+ return
+ fi
+ local old_rpath="`$PATCHELF --print-rpath "$path"`"
+ local new_rpath="`echo "$old_rpath" | \
+ sed 's/.*\[\(.*\)\]/\1/g' | \
+ sed "s,\\\$ORIGIN,/$origin,g"`"
+
+ if test -n "$new_rpath"; then
+ print_debug "Converting RPATH '$old_rpath' -> '$new_rpath'"
+ $PATCHELF --set-rpath "$new_rpath" "$path"
+ fi
+}
+
+add_path ()
{
- local name="$1"
- local path="$1";
- if test -n "$2"; then
- name="$2"
- fi
- test -z "$name" && return
- # ls -H isn't really the same as readlink, but
- # readlink is not portable enough.
- path=`ls -H $path`
- toadd="$name=$path"
- is_contained "$toadd" && return
- if test -z "$silent"; then
- echo "adding file $toadd"
- fi
- target_files="$target_files $toadd"
- if test -x "$path"; then
- # Only call ldd when it makes sense
- if file -L "$path" | grep 'ELF' > /dev/null 2>&1; then
- if ! file -L "$path" | grep 'static' > /dev/null 2>&1; then
- # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl based glibc
- # this regexp parse the outputs like:
- # ldd /usr/bin/gcc
- # linux-gate.so.1 => (0xffffe000)
- # libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
- # /lib/ld-linux.so.2 (0xb7fe8000)
- # covering both situations ( with => and without )
- for lib in `ldd "$path" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`; do
- test -f "$lib" || continue
- # Check wether the same library also exists in the parent directory,
- # and prefer that on the assumption that it is a more generic one.
- local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
- test -f "$baselib" && lib=$baselib
- add_file "$lib"
+ case " $target_paths " in
+ *" $1 "*)
+ return 1
+ ;;
+ *)
+ target_paths="$target_paths $1"
+ return 0
+ ;;
+ esac
+}
+
+add_alias ()
+{
+ if test "$1" != "$2"; then
+ local alias="$1=$2"
+ case " $target_aliases " in
+ *" $alias "*)
+ ;;
+ *)
+ print_debug "Adding alias '$2' -> '$1'"
+ target_aliases="$target_aliases $alias"
+ ;;
+ esac
+ fi
+}
+
+normalize_path ()
+{
+ # Normalizes the path to a file or directory, removing all "." and ".."
+ # entries. Use pwd -L to explicitly prevent symlink expansion
+ local path=$1
+ if test -f "$path"; then
+ pushd $(dirname $path) > /dev/null 2>&1
+ dir_path=$(pwd -L)
+ path=$dir_path/$(basename $path)
+ popd > /dev/null 2>&1
+ elif test -d "$path"; then
+ pushd $path > /dev/null 2>&1
+ path=$(pwd -L)
+ popd > /dev/null 2>&1
+ fi
+ echo $path
+}
+
+add_file_common()
+{
+ local p="$1"
+ local path="$2"
+ local alias="$3"
+
+ add_alias "$path" "$p"
+ if test -n "$alias"; then
+ add_alias "$path" "$alias"
+ fi
+
+ add_path "$path" || return 1
+ print_debug "Adding file '$path'"
+
+ return 0
+}
+
+add_deps()
+{
+ local path="$1"
+ local interp="$2"
+
+ if test -n "$interp" && test -x "$interp"; then
+ # Use the dynamic loaders --list argument to list the
+ # dependencies. The program may have a different program
+ # interpreter (typical when using uninative tarballs), which is
+ # why we can't just call ldd.
+ deps="`$interp --list "$path"`"
+ else
+ deps="`ldd "$path"`"
+ fi
+
+ print_debug "Dependencies are:"
+ print_debug "$deps"
+ if test -n "$deps"; then
+ for lib in $deps; do
+ # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl
+ # based glibc this regexp parse the outputs like:
+ # ldd /usr/bin/gcc
+ # linux-gate.so.1 => (0xffffe000)
+ # libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
+ # /lib/ld-linux.so.2 (0xb7fe8000)
+ # covering both situations ( with => and without )
+ lib="`echo "$lib" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`"
+
+ test -f "$lib" || continue
+ # Check whether the same library also exists in the parent
+ # directory, and prefer that on the assumption that it is a
+ # more generic one.
+ local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
+ test -f "$baselib" && lib=$baselib
+ add_dependency "$lib" "$interp"
done
- fi
fi
- fi
}
-# backward compat
-if test "$1" = "--respect-path"; then
- shift
-fi
+add_dependency()
+{
+ local p=`normalize_path $1`
+ # readlink is required for Yocto, so we can use it
+ local path=`readlink -f "$p"`
+ local interp="$2"
-#add a --silent switch to avoid "broken pipe" errors when calling this scipt from within OE
-if test "$1" = "--silent"; then
- silent=1
- shift
-fi
+ add_file_common "$p" "$path" || return
+
+ if test -x "$path" && is_dynamic_elf "$path"; then
+ add_deps "$path" "$interp"
+ fi
+}
+
+add_file ()
+{
+ local p=`normalize_path $1`
+ # readlink is required for Yocto, so we can use it
+ local path=`readlink -f "$p"`
+
+ add_file_common "$p" "$path" "$2" || return
+ if test -x "$path" && is_dynamic_elf "$path"; then
+ # Request the program interpeter (dynamic loader)
+ interp=`readelf -W -l "$path" | grep "Requesting program interpreter:" | sed "s/\s*\[Requesting program interpreter:\s*\(.*\)\]/\1/g"`
+ print_debug "Interpreter is '$interp'"
+
+ add_deps "$path" "$interp"
+ fi
+}
+
+while test -n "$1"; do
+ case "$1" in
+ --respect-path)
+ # Ignore for backward compatability
+ ;;
+ --debug)
+ debug=1
+ ;;
+ --log)
+ do_log=1
+ ;;
+ --extra=*)
+ extra_tools="$extra_tools ${1#--extra=}"
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
added_gcc=$1
shift
@@ -76,19 +215,35 @@ added_as=$1
shift
archive_name=$1
+if test -n "$do_log"; then
+ log_path="$archive_name.log"
+ rm -f "$log_path"
+fi
+
+if test -z "$PATCHELF"; then
+ PATCHELF=`which patchelf 2> /dev/null`
+fi
+if test -z "$PATCHELF"; then
+ PATCHELF=`which patchelf-uninative 2> /dev/null`
+fi
+if test -z "$PATCHELF"; then
+ print_output "patchelf is required"
+ exit 1
+fi
+
if test -z "$added_gcc" || test -z "$added_gxx" ; then
- echo "usage: $0 <gcc_path> <g++_path>"
- exit 1
+ print_output "usage: $0 <gcc_path> <g++_path>"
+ exit 1
fi
if ! test -x "$added_gcc" ; then
- echo "'$added_gcc' is no executable."
- exit 1
+ print_output "'$added_gcc' is not executable."
+ exit 1
fi
if ! test -x "$added_gxx" ; then
- echo "'$added_gcc' is no executable."
- exit 1
+ print_output "'$added_gcc' is not executable."
+ exit 1
fi
@@ -97,96 +252,131 @@ add_file $added_gcc /usr/bin/gcc
add_file $added_gxx /usr/bin/g++
if test -z "$added_as" ; then
- add_file /usr/bin/as /usr/bin/as
+ add_file /usr/bin/as /usr/bin/as
else
- if ! test -x "$added_as" ; then
- echo "'$added_as' is no executable."
- exit 1
- fi
+ if ! test -x "$added_as" ; then
+ print_output "'$added_as' is not executable."
+ exit 1
+ fi
- add_file $added_as /usr/bin/as
+ add_file $added_as /usr/bin/as
fi
add_file `$added_gcc -print-prog-name=cc1` /usr/bin/cc1
add_file `$added_gxx -print-prog-name=cc1plus` /usr/bin/cc1plus
specfile=`$added_gcc -print-file-name=specs`
if test -n "$specfile" && test -e "$specfile"; then
- add_file "$specfile"
+ add_file "$specfile"
fi
ltofile=`$added_gcc -print-prog-name=lto1`
-pluginfile="${ltofile%lto1}liblto_plugin.so"
+pluginfile=`normalize_path "${ltofile%lto1}liblto_plugin.so"`
if test -r "$pluginfile"
then
- add_file $pluginfile ${pluginfile#*usr}
- add_file $pluginfile /usr${pluginfile#*usr}
+ add_file $pluginfile ${pluginfile#*usr}
+ add_file $pluginfile /usr${pluginfile#*usr}
fi
+# for testing the environment is usable at all
+if test -x /bin/true; then
+ add_file /bin/true
+elif test -x /usr/bin/true; then
+ add_file /usr/bin/true /bin/true
+else
+ print_output "'true' not found"
+ exit 1
+fi
+
+for extra in $extra_tools; do
+ if test -x "$extra"; then
+ add_file "$extra"
+ else
+ print_output "'$extra' not found"
+ exit 1
+ fi
+done
+
+link_rel ()
+{
+ local target="$1"
+ local name="$2"
+ local base="$3"
+
+ local prefix=`dirname $name`
+
+ prefix=`echo $prefix | sed 's,[^/]\+,..,g' | sed 's,^/*,,g'`
+
+ ln -s $prefix/$target $base/$name
+}
+
tempdir=`mktemp -d /tmp/iceccenvXXXXXX`
-new_target_files=
-for i in $target_files; do
- case $i in
- *=/*)
+target_files=
+for path in $target_paths; do
+ mkdir -p $tempdir/`dirname $path`
+ cp -pH $path $tempdir/$path
+
+ if test -f $tempdir/$path -a -x $tempdir/$path; then
+ strip -s $tempdir/$path 2>/dev/null
+ fi
+
+ fix_rpath $tempdir/$path `dirname $path`
+ target_files="$target_files $path"
+done
+
+for i in $target_aliases; do
target=`echo $i | cut -d= -f1`
- path=`echo $i | cut -d= -f2`
- ;;
- *)
- path=$i
- target=$i
- ;;
- esac
- mkdir -p $tempdir/`dirname $target`
- cp -p $path $tempdir/$target
- if test -f $tempdir/$target -a -x $tempdir/$target; then
- strip -s $tempdir/$target 2>/dev/null
- fi
- target=`echo $target | cut -b2-`
- new_target_files="$new_target_files $target"
+ link_name=`echo $i | cut -d= -f2`
+
+ mkdir -p $tempdir/`dirname $link_name`
+ # Relative links are used because the files are checked for being
+ # executable outside the chroot
+ link_rel $target $link_name $tempdir
+
+ link_name=`echo $link_name | cut -b2-`
+ target_files="$target_files $link_name"
done
#sort the files
-target_files=`for i in $new_target_files; do echo $i; done | sort`
+target_files=`for i in $target_files; do echo $i; done | sort`
#test if an archive name was supplied
#if not use the md5 of all files as the archive name
if test -z "$archive_name"; then
- md5sum=NONE
- for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
- if test -x $file; then
- md5sum=$file
- break
- fi
- done
+ md5sum=NONE
+ for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
+ if test -x $file; then
+ md5sum=$file
+ break
+ fi
+ done
- #calculate md5 and use it as the archive name
- archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
- if test -z "$silent"; then
- echo "Couldn't compute MD5 sum."
- fi
- exit 2
- }
- mydir=`pwd`
+ #calculate md5 and use it as the archive name
+ archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
+ print_output "Couldn't compute MD5 sum."
+ exit 2
+ }
+ mydir=`pwd`
else
- mydir="`dirname "$archive_name"`"
+ mydir="`dirname "$archive_name"`"
- #check if we have a full path or only a filename
- if test "$mydir" = "." ; then
- mydir=`pwd`
- else
- mydir=""
- fi
+ #check if we have a full path or only a filename
+ if test "$mydir" = "." ; then
+ mydir=`pwd`
+ else
+ mydir=""
+ fi
fi
-if test -z "$silent"; then
-echo "creating $archive_name"
-fi
+print_output "creating $archive_name"
cd $tempdir
-tar -czhf "$mydir/$archive_name" $target_files || {
- if test -z "$silent"; then
- echo "Couldn't create archive"
- fi
- exit 3
+# Add everything in the temp directory. Tar doesn't like to be given files with
+# ".." in them, which frequently happens in $target_files, and will strip off
+# the path prefix past the offending "..". This makes the archive generate
+# incorrectly
+tar -czf "$mydir/$archive_name" . || {
+ print_output "Couldn't create archive"
+ exit 3
}
cd ..
rm -rf $tempdir
diff --git a/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb b/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
new file mode 100644
index 0000000000..231c1c20ec
--- /dev/null
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
@@ -0,0 +1,38 @@
+SUMMARY = "icecc environment setup script"
+DESCRIPTION = "This is a version of the icecc-create-env script that has \
+been modified in order to make it work with OE."
+SECTION = "base"
+# source file has just a "GPL" word, but upstream is GPLv2+.
+# most probably just GPL would be a mistake
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"
+
+PR = "r2"
+
+DEPENDS = ""
+INHIBIT_DEFAULT_DEPS = "1"
+
+# This is needed, because otherwise there is dependency loop from quilt-native
+# Dependency loop #1 found:
+# Task 10907 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_install) (dependent Tasks ['quilt-native, do_compile'])
+# Task 10908 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot) (dependent Tasks ['quilt-native, do_install'])
+# Task 10997 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_patch) (dependent Tasks ['icecc-create-env-native, do_unpack', 'quilt-native, do_populate_sysroot'])
+# Task 11001 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_configure) (dependent Tasks ['icecc-create-env-native, do_patch'])
+# Task 11002 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_compile) (dependent Tasks ['icecc-create-env-native, do_configure'])
+# Task 10998 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_install) (dependent Tasks ['icecc-create-env-native, do_compile'])
+# Task 10999 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_populate_sysroot) (dependent Tasks ['icecc-create-env-native, do_install'])
+# Task 10910 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_configure) (dependent Tasks ['quilt-native, do_patch', 'icecc-create-env-native, do_populate_sysroot'])
+# Task 10911 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_compile) (dependent Tasks ['quilt-native, do_configure'])
+PATCHTOOL = "patch"
+SRC_URI = "file://icecc-create-env"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/${bindir}
+ install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS_${PN}_class-nativesdk = "patchelf"
diff --git a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
new file mode 100644
index 0000000000..0dccc41c8a
--- /dev/null
+++ b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+if [ -z "$ICECC_PATH" ]; then
+ ICECC_PATH=$(which icecc 2> /dev/null || true)
+fi
+
+if [ -n "$ICECC_PATH" ]; then
+ # Default to disabling the caret workaround. If set to "1", icecc will
+ # locally recompile any files that have warnings, which can adversely
+ # affect performance.
+ #
+ # See: https://github.com/icecc/icecream/issues/190
+ if [ -z "$ICECC_CARET_WORKAROUND" ]; then
+ ICECC_CARET_WORKAROUND="0"
+ fi
+ if [ "$ICECC_CARET_WORKAROUND" != "1" ]; then
+ CFLAGS="$CFLAGS -fno-diagnostics-show-caret"
+ CXXFLAGS="$CXXFLAGS -fno-diagnostics-show-caret"
+ fi
+ export ICECC_PATH ICECC_CARET_WORKAROUND
+ export ICECC_VERSION="$(echo "$OECORE_NATIVE_SYSROOT/usr/share/${TARGET_PREFIX}icecream/@TOOLCHAIN_ENV@" | sed "s,@TARGET_PREFIX@,$TARGET_PREFIX,g")"
+ export ICECC="$(which ${CROSS_COMPILE}gcc)"
+ export ICECXX="$(which ${CROSS_COMPILE}g++)"
+ export ICEAS="$(which ${CROSS_COMPILE}as)"
+ export PATH="$OECORE_NATIVE_SYSROOT/usr/share/${TARGET_PREFIX}icecream/bin:$PATH"
+else
+ echo "Icecc not found. Disabling distributed compiling"
+fi
+
diff --git a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
new file mode 100644
index 0000000000..fbd9f038b8
--- /dev/null
+++ b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+# ICECC_PATH will have been found icecc-env.sh
+if [ -z "$ICECC_PATH" ]; then
+ exit 0
+fi
+
+echo "Setting up IceCream distributed compiling..."
+
+# Create the environment
+mkdir -p "`dirname $ICECC_VERSION`"
+icecc-create-env $ICECC $ICECXX $ICEAS $ICECC_VERSION || exit $?
+
+# Create symbolic links
+d="$OECORE_NATIVE_SYSROOT/usr/share/${TARGET_PREFIX}icecream/bin"
+mkdir -p "$d"
+ln -sf "$ICECC_PATH" "$d/${CROSS_COMPILE}gcc"
+ln -sf "$ICECC_PATH" "$d/${CROSS_COMPILE}g++"
diff --git a/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb b/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
new file mode 100644
index 0000000000..304ad7fec0
--- /dev/null
+++ b/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
@@ -0,0 +1,38 @@
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+# Released under the MIT license (see COPYING.MIT for the terms)
+SUMMARY = "Generates Icecream toolchain for SDK"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/icecc-env.sh;beginline=2;endline=20;md5=dd6b68c1efed8a9fb04e409b3b287d47"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "\
+ file://icecc-env.sh \
+ file://icecc-setup.sh \
+ "
+
+inherit nativesdk
+
+ENV_NAME="${DISTRO}-${TCLIBC}-${SDK_ARCH}-@TARGET_PREFIX@${DISTRO_VERSION}.tar.gz"
+
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${SDKPATHNATIVE}${datadir}/icecream/bin
+
+ install -d ${D}${SDKPATHNATIVE}/environment-setup.d/
+ install -m 0644 ${WORKDIR}/icecc-env.sh ${D}${SDKPATHNATIVE}/environment-setup.d/
+ sed -i ${D}${SDKPATHNATIVE}/environment-setup.d/icecc-env.sh \
+ -e 's,@TOOLCHAIN_ENV@,${ENV_NAME},g'
+
+ install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+ install -m 0755 ${WORKDIR}/icecc-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+ sed -i ${D}${SDKPATHNATIVE}/post-relocate-setup.d/icecc-setup.sh \
+ -e 's,@TOOLCHAIN_ENV@,${ENV_NAME},g'
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${SDKPATHNATIVE}"
+RDEPENDS_${PN} += "nativesdk-icecc-create-env"
+
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
deleted file mode 100644
index 6b356b0d44..0000000000
--- a/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Enables backwards compatibility with current desktop icon themes"
-DESCRIPTION = "A Perl script used for maintaining backwards \
-compatibility with current desktop icon themes, while migrating to the \
-names specified in the Icon Naming Specification. The Icon Naming \
-Utilities map the icon names used by the GNOME and KDE desktops to the \
-icon names proposed in the Icon Naming Specification, and generate the \
-icon files appropriate to the desktop environment you use. The Icon \
-Naming Specification provides a standard list of common icon contexts \
-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 = "r5"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = "http://tango.freedesktop.org/releases/icon-naming-utils-${PV}.tar.gz"
-SRC_URI[md5sum] = "2c5c7a418e5eb3268f65e21993277fba"
-SRC_URI[sha256sum] = "044ab2199ed8c6a55ce36fd4fcd8b8021a5e21f5bab028c0a7cdcf52a5902e1c"
-
-inherit autotools allarch perlnative
-
-do_configure_append() {
- # Make sure we use our nativeperl wrapper.
- sed -i -e "1s:#!.*:#!/usr/bin/env nativeperl:" ${S}/icon-name-mapping.pl.in
-}
-
-FILES_${PN} += "${datadir}/dtds"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch b/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
index eb52172e10..f1049e433e 100644
--- a/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
+++ b/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
@@ -10,9 +10,11 @@ Take a patch from Debian to solve this.
Upstream-Status: Submitted (https://bugs.launchpad.net/intltool/+bug/1465010)
Signed-off-by: Ross Burton <ross.burton@intel.com>
---- intltool-0.51.0-ORIG/intltool-update.in 2015-05-27 00:20:43.038379963 +0200
-+++ intltool-0.51.0/intltool-update.in 2015-05-27 00:23:53.309078052 +0200
-@@ -1062,7 +1062,7 @@
+Index: intltool-0.51.0/intltool-update.in
+===================================================================
+--- intltool-0.51.0.orig/intltool-update.in
++++ intltool-0.51.0/intltool-update.in
+@@ -1062,7 +1062,7 @@ sub SubstituteVariable
}
}
@@ -21,7 +23,7 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
{
my $rest = $3;
my $untouched = $1;
-@@ -1190,10 +1190,10 @@
+@@ -1190,10 +1190,10 @@ sub FindPackageName
$name =~ s/\(+$//g;
$version =~ s/\(+$//g;
@@ -36,7 +38,7 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
}
if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
-@@ -1219,11 +1219,11 @@
+@@ -1219,11 +1219,11 @@ sub FindPackageName
$version =~ s/\(+$//g;
$bugurl =~ s/\(+$//g if (defined $bugurl);
@@ -52,4 +54,4 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
+ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+\}?/);
}
- # \s makes this not work, why? \ No newline at end of file
+ # \s makes this not work, why?
diff --git a/meta/recipes-devtools/intltool/intltool_0.51.0.bb b/meta/recipes-devtools/intltool/intltool_0.51.0.bb
index a7ea3b727d..ecff2faf25 100644
--- a/meta/recipes-devtools/intltool/intltool_0.51.0.bb
+++ b/meta/recipes-devtools/intltool/intltool_0.51.0.bb
@@ -16,12 +16,13 @@ UPSTREAM_CHECK_URI = "https://launchpad.net/intltool/trunk/"
DEPENDS = "libxml-parser-perl-native"
RDEPENDS_${PN} = "gettext-dev libxml-parser-perl"
-DEPENDS_class-native = "libxml-parser-perl-native"
+DEPENDS_class-native = "libxml-parser-perl-native gettext-native"
inherit autotools pkgconfig perlnative
export PERL = "${bindir}/env perl"
PERL_class-native = "/usr/bin/env nativeperl"
+PERL_class-nativesdk = "/usr/bin/env perl"
# gettext is assumed to exist on the host
RDEPENDS_${PN}_class-native = "libxml-parser-perl-native"
@@ -33,4 +34,4 @@ FILES_${PN} += "${datadir}/aclocal"
INSANE_SKIP_${PN} += "dev-deps"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch b/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch
deleted file mode 100644
index bfe9d72313..0000000000
--- a/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 93582ad85ef48c18ac12f00a9a9e124989b1fcab Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Fri, 1 May 2015 12:52:18 +0200
-Subject: [PATCH] Link against libm when needed
-
-In certain C libraries (e.g uClibc), isnan() and related functions are
-implemented in libm, so json-c needs to link against it. This commit
-therefore adds an AC_TRY_LINK() test to check whether a program
-calling isnan() can be properly linked with no special flags. If not,
-we assume linking against libm is needed.
-
-The json-c.pc.in file is also adjusted so that in the case of static
-linking against json-c, -lm is also used.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
-Upstream-Status: Backport
-
- configure.ac | 4 ++++
- json-c.pc.in | 3 ++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index c50f81b..30e7174 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -50,6 +50,10 @@ AC_CHECK_DECLS([isinf], [], [], [[#include <math.h>]])
- AC_CHECK_DECLS([_isnan], [], [], [[#include <float.h>]])
- AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
-
-+if test "$ac_cv_have_decl_isnan" = "yes" ; then
-+ AC_TRY_LINK([#include <math.h>], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"])
-+fi
-+
- #check if .section.gnu.warning accepts long strings (for __warn_references)
- AC_LANG_PUSH([C])
-
-diff --git a/json-c.pc.in b/json-c.pc.in
-index 037739d..05bfbc8 100644
---- a/json-c.pc.in
-+++ b/json-c.pc.in
-@@ -6,6 +6,7 @@ includedir=@includedir@
- Name: json-c
- Description: JSON implementation in C
- Version: @VERSION@
--Requires:
-+Requires:
-+Libs.private: @LIBS@
- Libs: -L${libdir} -ljson-c
- Cflags: -I${includedir}/json-c
---
-2.8.1
-
diff --git a/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch b/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch
deleted file mode 100644
index d29d9118dc..0000000000
--- a/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 9be71700eb580c815688584a64621a38867c3fdd Mon Sep 17 00:00:00 2001
-From: James Myatt <james.myatt@tessella.com>
-Date: Thu, 5 Feb 2015 15:57:14 +0000
-Subject: [PATCH] json_tokener requires INF and NAN
-
----
-Upstream-Status: Backport
-
- json_tokener.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-Index: json-c-0.12/json_tokener.c
-===================================================================
---- json-c-0.12.orig/json_tokener.c
-+++ json-c-0.12/json_tokener.c
-@@ -16,6 +16,7 @@
- #include "config.h"
-
- #include <math.h>
-+#include "math_compat.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <stddef.h>
-@@ -352,12 +353,10 @@ struct json_object* json_tokener_parse_e
-
- case json_tokener_state_inf: /* aka starts with 'i' */
- {
-- int size;
-- int size_inf;
-+ size_t size_inf;
- int is_negative = 0;
-
- printbuf_memappend_fast(tok->pb, &c, 1);
-- size = json_min(tok->st_pos+1, json_null_str_len);
- size_inf = json_min(tok->st_pos+1, json_inf_str_len);
- char *infbuf = tok->pb->buf;
- if (*infbuf == '-')
diff --git a/meta/recipes-devtools/json-c/json-c/add-disable-werror-option-to-configure.patch b/meta/recipes-devtools/json-c/json-c/add-disable-werror-option-to-configure.patch
new file mode 100644
index 0000000000..0c20c8458a
--- /dev/null
+++ b/meta/recipes-devtools/json-c/json-c/add-disable-werror-option-to-configure.patch
@@ -0,0 +1,45 @@
+json-c: Backport --disable-werror patch to allow compilation under icecc
+
+icecc preprocesses source files locally before shipping them off to be compiled
+on remote hosts. This preprocessing removes comments, including /* fallthough */
+comments in switch statements that normally prevent an implicit-fallthrough
+warning, see https://github.com/icecc/icecream/issues/419
+
+Rather than turning off -Werror, the upstream project has implemented a
+configure option, --disable-werror, in response to Ross's
+https://github.com/json-c/json-c/issues/489
+
+This patch from
+https://github.com/json-c/json-c/commit/21c886534f8927fdc0fb5f8647394f3e0e0874b8
+
+Upstream-Status: Backport [Not yet released]
+Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
+
+From 21c886534f8927fdc0fb5f8647394f3e0e0874b8 Mon Sep 17 00:00:00 2001
+From: Pierce Lopez <pierce.lopez@gmail.com>
+Date: Sun, 9 Jun 2019 10:52:08 -0400
+Subject: [PATCH] build: add --disable-werror option to configure
+
+to omit -Werror compiler option
+---
+ configure.ac | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 272ea6af9c..798fd5b747 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -165,7 +165,12 @@ AS_IF([test "x$enable_Bsymbolic" = "xcheck"],
+ AS_IF([test "x$enable_Bsymbolic" = "xyes"], [JSON_BSYMBOLIC_LDFLAGS=-Wl[,]-Bsymbolic-functions])
+ AC_SUBST(JSON_BSYMBOLIC_LDFLAGS)
+
+-AX_APPEND_COMPILE_FLAGS([-Wall -Werror -Wcast-qual -Wno-error=deprecated-declarations])
++AC_ARG_ENABLE([werror],
++ AS_HELP_STRING([--disable-werror], [avoid treating compiler warnings as fatal errors]))
++
++AS_IF([test "x$enable_werror" != "xno"], [AX_APPEND_COMPILE_FLAGS([-Werror])])
++
++AX_APPEND_COMPILE_FLAGS([-Wall -Wcast-qual -Wno-error=deprecated-declarations])
+ AX_APPEND_COMPILE_FLAGS([-Wextra -Wwrite-string -Wno-unused-parameter])
+ AX_APPEND_COMPILE_FLAGS([-D_GNU_SOURCE])
+
diff --git a/meta/recipes-devtools/json-c/json-c_0.12.bb b/meta/recipes-devtools/json-c/json-c_0.12.bb
deleted file mode 100644
index d8c76dbf18..0000000000
--- a/meta/recipes-devtools/json-c/json-c_0.12.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "C bindings for apps which will manipulate JSON data"
-DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C."
-HOMEPAGE = "https://github.com/json-c/json-c/wiki"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
-
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
- file://0001-json_tokener-requires-INF-and-NAN.patch \
- file://0001-Link-against-libm-when-needed.patch \
- "
-
-SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491"
-SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f"
-
-UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+).tar"
-# json-c releases page is fetching the list of releases in some weird XML format
-# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
-#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
-RECIPE_UPSTREAM_VERSION = "0.12"
-RECIPE_UPSTREAM_DATE = "Apr 11, 2014"
-CHECK_DATE = "Dec 04, 2015"
-
-RPROVIDES_${PN} = "libjson"
-
-inherit autotools
-
-do_configure_prepend() {
- # Clean up autoconf cruft that should not be in the tarball
- rm -f ${S}/config.status
-}
diff --git a/meta/recipes-devtools/json-c/json-c_0.13.1.bb b/meta/recipes-devtools/json-c/json-c_0.13.1.bb
new file mode 100644
index 0000000000..522879f21f
--- /dev/null
+++ b/meta/recipes-devtools/json-c/json-c_0.13.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "C bindings for apps which will manipulate JSON data"
+DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C."
+HOMEPAGE = "https://github.com/json-c/json-c/wiki"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
+
+SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+ file://add-disable-werror-option-to-configure.patch \
+ "
+SRC_URI[md5sum] = "04969ad59cc37bddd83741a08b98f350"
+SRC_URI[sha256sum] = "b87e608d4d3f7bfdd36ef78d56d53c74e66ab278d318b71e6002a369d36f4873"
+
+UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
+UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
+
+RPROVIDES_${PN} = "libjson"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-werror"
+
+BBCLASSEXTEND = "native nativesdk"
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
deleted file mode 100644
index 9b65a991d4..0000000000
--- a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Linux kernel style configuration framework for other projects"
-DESCRIPTION = "The kconfig-frontends project aims at centralising \
-the effort of keeping an up-to-date, out-of-tree, packaging of the \
-kconfig infrastructure, ready for use by third-party projects. \
-The kconfig-frontends package provides the kconfig parser, as well as all \
-the frontends"
-HOMEPAGE = "http://ymorin.is-a-geek.org/projects/kconfig-frontends"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9b8cf60ff39767ff04b671fca8302408"
-SECTION = "devel"
-DEPENDS += "ncurses flex bison gperf-native"
-RDEPENDS_${PN} += "python bash"
-SRC_URI = "http://ymorin.is-a-geek.org/download/${BPN}/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "b939280dcc83f8feabd87a1d5f9b00c2"
-SRC_URI[sha256sum] = "ea2615a62c74bea6ce3b38402f00c7513858f307f6ba7aa9fdbf0bbc12bcf407"
-
-inherit autotools pkgconfig
-do_configure_prepend () {
- mkdir -p scripts/.autostuff/m4
-}
-
-do_install_append() {
- ln -s kconfig-conf ${D}${bindir}/conf
- ln -s kconfig-mconf ${D}${bindir}/mconf
-}
-
-EXTRA_OECONF += "--disable-gconf --disable-qconf"
-
-# Some packages have the version preceeding the .so instead properly
-# versioned .so.<version>, so we need to reorder and repackage.
-SOLIBS = "-${@d.getVar('PV', True)[:-2]}.so"
-FILES_SOLIBSDEV = "${libdir}/libkconfig-parser.so"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch b/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch
new file mode 100644
index 0000000000..ff90269a23
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch
@@ -0,0 +1,47 @@
+From 83407aa50e06d967d0a1095a140bd7b0e5d51d27 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 21 Nov 2018 13:09:05 +0100
+Subject: [PATCH] Add crc32.c to sources list
+
+Otherwise, there is a missing symbol runtime error under musl C library.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ libcomps/src/python/src/CMakeLists.txt | 4 ++--
+ libcomps/src/python/src/crc32.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libcomps/src/python/src/CMakeLists.txt b/libcomps/src/python/src/CMakeLists.txt
+index 6ed25bb..c15c8b2 100644
+--- a/libcomps/src/python/src/CMakeLists.txt
++++ b/libcomps/src/python/src/CMakeLists.txt
+@@ -9,13 +9,13 @@ set (pycomps_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set (pycomps_SRC pycomps.c pycomps_sequence.c
+ pycomps_envs.c pycomps_categories.c pycomps_groups.c
+ pycomps_gids.c pycomps_utils.c pycomps_dict.c pycomps_mdict.c
+- pycomps_hash.c pycomps_exc.c pycomps_lbw.c)
++ pycomps_hash.c pycomps_exc.c pycomps_lbw.c crc32.c)
+
+ set (pycomps_HEADERS pycomps_23macros.h pycomps_sequence.h
+ pycomps_envs.h pycomps_categories.h pycomps_groups.h
+ pycomps_gids.h pycomps_utils.h pycomps_dict.h pycomps_mdict.h
+ pycomps_hash.h pycomps_exc.h pycomps_lbw.h
+- pycomps_types.h)
++ pycomps_types.h crc32.h)
+
+ #set(TEST_FILES ../__init__.py __test.py test_merge_comps.py test_libcomps.py
+ # utest.py)
+diff --git a/libcomps/src/python/src/crc32.c b/libcomps/src/python/src/crc32.c
+index d8f5e34..f266067 100644
+--- a/libcomps/src/python/src/crc32.c
++++ b/libcomps/src/python/src/crc32.c
+@@ -41,7 +41,7 @@
+ */
+
+ #include <sys/param.h>
+-#include <sys/systm.h>
++#include <stdint.h>
+
+ static uint32_t crc32_tab[] = {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
diff --git a/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 0000000000..59c09aa70a
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,25 @@
+From b28859ea93110d52d8a87d7b5a6c8796d0d523ed Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:22:09 +0200
+Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ libcomps/src/python/src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcomps/src/python/src/CMakeLists.txt b/libcomps/src/python/src/CMakeLists.txt
+index fa590ae..6913214 100644
+--- a/libcomps/src/python/src/CMakeLists.txt
++++ b/libcomps/src/python/src/CMakeLists.txt
+@@ -117,7 +117,7 @@ IF (SKBUILD)
+ INSTALL(FILES libcomps/__init__.py DESTINATION libcomps/src/python/src/libcomps)
+ INSTALL(TARGETS pycomps LIBRARY DESTINATION libcomps/src/python/src/libcomps)
+ ELSE ()
+- EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++ #EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+
+ INSTALL(FILES ${pycomps_SRCDIR}/libcomps/__init__.py DESTINATION ${PYTHON_INSTALL_DIR}/libcomps)
+ #INSTALL(FILES ${pycomps_SRCDIR}/tests/__test.py DESTINATION
diff --git a/meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch b/meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch
new file mode 100644
index 0000000000..88469fb331
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch
@@ -0,0 +1,35 @@
+From 91a324f8771818b81017fdf4daaad0c8c4b6987c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 20 Mar 2017 11:38:54 -0700
+Subject: [PATCH] Make __comps_objmrtree_all() static inline
+
+This helps compilers to scope the symbol correctly
+and apply the inlining optimizations, clang e.g.
+emits the functions and calls in code which is
+suboptimal, therefore give a little help to compiler
+this function is not used anywhere else to have
+a global scope.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libcomps/src/comps_objmradix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcomps/src/comps_objmradix.c b/libcomps/src/comps_objmradix.c
+index 9be6648..55f7793 100644
+--- a/libcomps/src/comps_objmradix.c
++++ b/libcomps/src/comps_objmradix.c
+@@ -604,7 +604,7 @@ inline void comps_objmrtree_pair_destroy_v(void * pair) {
+ free(pair);
+ }
+
+-inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) {
++static inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) {
+ COMPS_HSList *to_process, *ret;
+ COMPS_HSListItem *hsit, *oldit;
+ size_t x;
+--
+2.12.0
+
diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb b/meta/recipes-devtools/libcomps/libcomps_git.bb
new file mode 100644
index 0000000000..34881bba37
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Libcomps is alternative for yum.comps library (which is for managing rpm package groups)."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/rpm-software-management/libcomps.git \
+ file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+ file://0001-Make-__comps_objmrtree_all-static-inline.patch \
+ file://0001-Add-crc32.c-to-sources-list.patch \
+ "
+
+PV = "0.1.12"
+SRCREV = "d0c8aa312dcab75c265ed6123f8afe0d7c8e91db"
+
+S = "${WORKDIR}/git"
+
+inherit cmake distutils3-base
+
+DEPENDS += "libxml2 expat libcheck"
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
+OECMAKE_SOURCEPATH = "${S}/libcomps"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
new file mode 100644
index 0000000000..3c87d4d8b3
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
@@ -0,0 +1,49 @@
+From e5a50db749b2b02e9e0cff9f7b639020e8ac76da Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 6 Nov 2018 13:54:43 +0100
+Subject: [PATCH] Add WITH_TESTS option
+
+This makes a dependency on cppunit optional.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ CMakeLists.txt | 3 +++
+ python/hawkey/CMakeLists.txt | 2 ++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ce88b9e3..7a99320a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -32,6 +32,7 @@ option(WITH_HTML "Enables hawkey HTML generation" ON)
+ option(WITH_MAN "Enables hawkey man page generation" ON)
+ option(ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF)
+ option(ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF)
++option(WITH_TESTS "Enables unit tests" ON)
+
+
+ # load pkg-config first; it's required by other modules
+@@ -158,8 +159,10 @@ endif()
+
+
+ # build tests
++IF (WITH_TESTS)
+ enable_testing()
+ add_subdirectory(tests)
++ENDIF()
+ if(WITH_BINDINGS)
+ add_subdirectory(python/hawkey)
+ endif()
+diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt
+index d9645346..84d17204 100644
+--- a/python/hawkey/CMakeLists.txt
++++ b/python/hawkey/CMakeLists.txt
+@@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY})
+ install(FILES __init__.py DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
+ install(TARGETS _hawkeymodule LIBRARY DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
+
++IF (WITH_TESTS)
+ add_subdirectory(tests)
++ENDIF()
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
new file mode 100644
index 0000000000..791a32e748
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
@@ -0,0 +1,31 @@
+From 9bb7630915c3e787732463a3e2064fe0e177101b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 24 Nov 2016 14:33:07 +0200
+Subject: [PATCH 1/4] FindGtkDoc.cmake: drop the requirement for
+ GTKDOC_SCANGOBJ_WRAPPER
+
+For some reason cmake is not able to find it when building in openembedded,
+and it's bundled with the source code anyway.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ cmake/modules/FindGtkDoc.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/FindGtkDoc.cmake b/cmake/modules/FindGtkDoc.cmake
+index 92b2cc7..39f34bd 100644
+--- a/cmake/modules/FindGtkDoc.cmake
++++ b/cmake/modules/FindGtkDoc.cmake
+@@ -52,7 +52,7 @@ find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml PATH "${GLIB_PREFIX}/bin")
+ find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref PATH "${GLIB_PREFIX}/bin")
+
+ find_package_handle_standard_args(GtkDoc
+- REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_SCANGOBJ_WRAPPER GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
++ REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
+ VERSION_VAR GtkDoc_VERSION)
+
+ # ::
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
new file mode 100644
index 0000000000..10450defbe
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -0,0 +1,27 @@
+From 9294cd19e5e3121fb8d37b44ee82dd7c4b3ab2c7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 7 Feb 2017 12:16:03 +0200
+Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is
+
+ using both)
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b722d4fb..ce88b9e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,7 +45,7 @@ endif()
+
+ # build dependencies
+ find_package(Gpgme REQUIRED)
+-PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
++PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
+ set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
+ find_package(OpenSSL REQUIRED)
+
diff --git a/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
new file mode 100644
index 0000000000..475c8f120b
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
@@ -0,0 +1,28 @@
+From 18c2c06017784cd641cc8a3deee5fc472008f7f4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:24:50 +0200
+Subject: [PATCH] Set libsolv variables with pkg-config (cmake's own module
+
+ doesn't work properly).
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 16b63308..b722d4fb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,7 +45,8 @@ endif()
+
+ # build dependencies
+ find_package(Gpgme REQUIRED)
+-find_package(LibSolv 0.6.30 REQUIRED COMPONENTS ext)
++PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
++set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
+ find_package(OpenSSL REQUIRED)
+
+
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
new file mode 100644
index 0000000000..3f11e0231f
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Library providing simplified C and Python API to libsolv"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://github.com/rpm-software-management/libdnf \
+ file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
+ file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
+ file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
+ file://0001-Add-WITH_TESTS-option.patch \
+ "
+
+SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd-v1 json-c swig-native"
+
+inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
+ -DWITH_TESTS=OFF \
+ "
+EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
+EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-devtools/libedit/libedit/stdc-predef.patch b/meta/recipes-devtools/libedit/libedit/stdc-predef.patch
new file mode 100644
index 0000000000..75ef308fad
--- /dev/null
+++ b/meta/recipes-devtools/libedit/libedit/stdc-predef.patch
@@ -0,0 +1,18 @@
+__STDC_ISO_10646__ is defined in stdc-predef.h
+therefore include it to see if its there on a platform
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libedit-20160903-3.1/src/chartype.h
+===================================================================
+--- libedit-20160903-3.1.orig/src/chartype.h
++++ libedit-20160903-3.1/src/chartype.h
+@@ -29,6 +29,7 @@
+ #ifndef _h_chartype_f
+ #define _h_chartype_f
+
++#include <stdc-predef.h>
+ /* Ideally we should also test the value of the define to see if it
+ * supports non-BMP code points without requiring UTF-16, but nothing
+ * seems to actually advertise this properly, despite Unicode 3.1 having
diff --git a/meta/recipes-devtools/libedit/libedit_20191025-3.1.bb b/meta/recipes-devtools/libedit/libedit_20191025-3.1.bb
new file mode 100644
index 0000000000..f810013a68
--- /dev/null
+++ b/meta/recipes-devtools/libedit/libedit_20191025-3.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "BSD replacement for libreadline"
+DESCRIPTION = "Command line editor library providing generic line editing, \
+history, and tokenization functions"
+HOMEPAGE = "http://www.thrysoee.dk/editline/"
+SECTION = "libs"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1e4228d0c5a9093b01aeaaeae6641533"
+
+DEPENDS = "ncurses"
+
+inherit autotools
+
+SRC_URI = "http://www.thrysoee.dk/editline/${BP}.tar.gz \
+ file://stdc-predef.patch \
+ "
+SRC_URI[md5sum] = "2d6568467080cfd75e715d045102b544"
+SRC_URI[sha256sum] = "6dff036660d478bfaa14e407fc5de26d22da1087118c897b1a3ad2e90cb7bf39"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch b/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch
new file mode 100644
index 0000000000..847b5f700b
--- /dev/null
+++ b/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch
@@ -0,0 +1,22 @@
+From 4e67f6049b3f822fe6f5af46790a51ace581bf82 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 6 Nov 2018 13:41:29 +0100
+Subject: [PATCH] spec_tmpl.sh: use /bin/sh, not /usr/bin/sh
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ spec_tmpl.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spec_tmpl.sh b/spec_tmpl.sh
+index 0238087..126853c 100755
+--- a/spec_tmpl.sh
++++ b/spec_tmpl.sh
+@@ -1,4 +1,4 @@
+-#!/usr/bin/sh
++#!/bin/sh
+
+ version=$1
+ template=$2
diff --git a/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb b/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb
new file mode 100644
index 0000000000..5409051d79
--- /dev/null
+++ b/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb
@@ -0,0 +1,25 @@
+SUMMARY = "C Library for manipulating module metadata files"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=25a3927bff3ee4f5b21bcb0ed3fcd6bb"
+
+SRC_URI = "git://github.com/fedora-modularity/libmodulemd;protocol=https;branch=1.x-maint \
+ file://0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch \
+ "
+
+PV = "1.8.16"
+SRCREV = "d0dcf7b373b3cf85cd39eb3bc23d31e06195a75a"
+UPSTREAM_CHECK_GITTAGREGEX = "libmodulemd-(?P<pver>1.*\d)"
+
+S = "${WORKDIR}/git"
+
+inherit meson gobject-introspection
+
+EXTRA_OEMESON = "-Ddeveloper_build=false -Dwith_docs=false"
+
+DEPENDS += "glib-2.0 libyaml glib-2.0-native python3"
+
+BBCLASSEXTEND = "native nativesdk"
+
+GIR_MESON_OPTION = 'skip_introspection'
+GIR_MESON_ENABLE_FLAG = 'false'
+GIR_MESON_DISABLE_FLAG = 'true'
diff --git a/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
new file mode 100644
index 0000000000..b61f0c9324
--- /dev/null
+++ b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
@@ -0,0 +1,53 @@
+From b08a3b71e716dd0485ef51036d32e4c304fb4e67 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:05:36 +0200
+Subject: [PATCH] Do not try to obtain PYTHON_INSTALL_DIR by running python.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ librepo/python/python2/CMakeLists.txt | 12 ++++++------
+ librepo/python/python3/CMakeLists.txt | 12 ++++++------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/librepo/python/python2/CMakeLists.txt b/librepo/python/python2/CMakeLists.txt
+index a0f1f9a..1665079 100644
+--- a/librepo/python/python2/CMakeLists.txt
++++ b/librepo/python/python2/CMakeLists.txt
+@@ -1,9 +1,9 @@
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from distutils import sysconfig
+-path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
++#from sys import stdout
++#from distutils import sysconfig
++#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#stdout.write(path)"
++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+diff --git a/librepo/python/python3/CMakeLists.txt b/librepo/python/python3/CMakeLists.txt
+index 52ba44e..da51e10 100644
+--- a/librepo/python/python3/CMakeLists.txt
++++ b/librepo/python/python3/CMakeLists.txt
+@@ -1,9 +1,9 @@
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from distutils import sysconfig
+-path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
++#from sys import stdout
++#from distutils import sysconfig
++#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#stdout.write(path)"
++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+
+ MESSAGE(STATUS "Python3 install dir is ${PYTHON_INSTALL_DIR}")
diff --git a/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch b/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
new file mode 100644
index 0000000000..73902e5f58
--- /dev/null
+++ b/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
@@ -0,0 +1,27 @@
+From f5a1dfe4c87c228165bc25e7fe464120d8139a3d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:23:27 +0200
+Subject: [PATCH] Set gpgme variables with pkg-config, not with cmake module
+ (which doesn't work properly)
+
+Upstream-Status: Inappropriate [gpgme upstream does not have pkg-config support and is not interested in it]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e949dbe..c954b2e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,7 +31,8 @@ PKG_CHECK_MODULES(GLIB2 glib-2.0 REQUIRED)
+ PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl)
+ PKG_CHECK_MODULES(LIBXML2 libxml-2.0 REQUIRED)
+ FIND_PACKAGE(CURL REQUIRED)
+-FIND_PACKAGE(Gpgme REQUIRED)
++PKG_CHECK_MODULES(GPGME gpgme REQUIRED)
++set(GPGME_VANILLA_LIBRARIES ${GPGME_LIBRARIES})
+
+
+ IF (WITH_ZCHUNK)
diff --git a/meta/recipes-devtools/librepo/librepo_1.11.0.bb b/meta/recipes-devtools/librepo/librepo_1.11.0.bb
new file mode 100644
index 0000000000..30c8a5c55d
--- /dev/null
+++ b/meta/recipes-devtools/librepo/librepo_1.11.0.bb
@@ -0,0 +1,27 @@
+SUMMARY = "A library providing C and Python (libcURL like) API \
+ for downloading linux repository metadata and packages."
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://github.com/rpm-software-management/librepo.git \
+ file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
+ file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
+ "
+
+SRCREV = "497f5eb2293662835bed6bdb0f43521788b2cebe"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "curl glib-2.0 openssl attr gpgme libxml2"
+
+inherit cmake distutils3-base pkgconfig
+
+EXTRA_OECMAKE = " \
+ -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} \
+ -DPYTHON_DESIRED=3 \
+ -DENABLE_TESTS=OFF \
+ -DENABLE_DOCS=OFF \
+ -DWITH_ZCHUNK=OFF \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/libtool/libtool-2.4.6.inc b/meta/recipes-devtools/libtool/libtool-2.4.6.inc
index f307a10751..8e17b56d46 100644
--- a/meta/recipes-devtools/libtool/libtool-2.4.6.inc
+++ b/meta/recipes-devtools/libtool/libtool-2.4.6.inc
@@ -20,6 +20,7 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
file://nohardcodepaths.patch \
file://unwind-opt-parsing.patch \
file://0001-libtool-Fix-support-for-NIOS2-processor.patch \
+ file://0001-libtool-Check-for-static-libs-for-internal-compiler-.patch \
"
SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e"
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
index b268310468..522bf3a0e9 100644
--- a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
@@ -13,11 +13,19 @@ do_configure_prepend () {
rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
}
+#
+# ccache may or may not be INHERITED, we remove references to it so the sstate
+# artefact works on a machine where its not present. libtool-cross isn't used
+# heavily so any performance issue is minor.
+# Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc"
+#
do_install () {
install -d ${D}${bindir_crossscripts}/
install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
sed -e 's@^\(predep_objects="\).*@\1"@' \
-e 's@^\(postdep_objects="\).*@\1"@' \
+ -e 's@^CC="ccache.@CC="@' \
+ -e 's@^LTCC="ccache.@LTCC="@' \
-i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
diff --git a/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch b/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch
new file mode 100644
index 0000000000..8c7c39feb6
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch
@@ -0,0 +1,37 @@
+From 40a2da75e6d95cc7c498ebda95ab19ae0db2ebfb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Jan 2019 12:54:26 -0800
+Subject: [PATCH] libtool: Check for static libs for internal compiler
+ libraries
+
+Libtool checks only for libraries linked as -l* when trying to
+find internal compiler libraries. Clang, however uses the absolute
+path to link its internal libraries e.g. compiler_rt. This patch
+handles clang's statically linked libraries when finding internal
+compiler libraries.
+
+https://crbug.com/749263
+
+Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ m4/libtool.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index d0389a0..9619c57 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -7536,7 +7536,7 @@ if AC_TRY_EVAL(ac_compile); then
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $prev$p in
+
+- -L* | -R* | -l*)
++ -L* | -R* | -l* | */libclang_rt.*.a)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test x-L = "$p" ||
+--
+2.20.1
+
diff --git a/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch b/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch
new file mode 100755
index 0000000000..5add0cca3b
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch
@@ -0,0 +1,21 @@
+libtool: remove host specific info from header file
+
+https://sources.debian.org/data/main/libt/libtool/2.4.6-10/debian/patches/
+ no_hostname.patch
+
+Upstream-Status: Inappropriate [not author]
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+Index: libtool-2.4.6/m4/libtool.m4
+===================================================================
+--- libtool-2.4.6.orig/m4/libtool.m4
++++ libtool-2.4.6/m4/libtool.m4
+@@ -728,7 +728,6 @@ _LT_CONFIG_SAVE_COMMANDS([
+ cat <<_LT_EOF >> "$cfgfile"
+ #! $SHELL
+ # Generated automatically by $as_me ($PACKAGE) $VERSION
+-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+ # Provide generalized library-building support services.
diff --git a/meta/recipes-devtools/libtool/libtool/multilib.patch b/meta/recipes-devtools/libtool/libtool/multilib.patch
new file mode 100644
index 0000000000..018f066652
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/multilib.patch
@@ -0,0 +1,23 @@
+Without this patch /usr/bin/libtoolize is different for each multilib
+since their host-triplets are different, despite there being no difference in
+the functionality of libtoolize itself.
+
+Ugly, but just patch this out. This fixes issues where libtool and
+libXX-libtool couldn't be installed into the same system.
+
+Upstream-Status: Inappropriate
+RP 2018/7/30
+
+Index: libtool-2.4.6/libtoolize.in
+===================================================================
+--- libtool-2.4.6.orig/libtoolize.in
++++ libtool-2.4.6/libtoolize.in
+@@ -113,7 +113,7 @@ You must 'cd' to the top directory of yo
+ When reporting a bug, please describe a test case to reproduce it and
+ include the following information:
+
+- host-triplet: @host_triplet@
++ host-triplet <redacted>
+ version: $progname (GNU @PACKAGE@) @VERSION@
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
diff --git a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
index b2239fbade..fcbce7286b 100644
--- a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
+++ b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
@@ -4,6 +4,8 @@ hardcoding paths.
RP 2015/2/3
+Upstream-Status: Inappropriate
+
Index: libtool-2.4.5/libtoolize.in
===================================================================
--- libtool-2.4.5.orig/libtoolize.in
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index 8858f6eef8..a5715faaa9 100644
--- a/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -1,5 +1,7 @@
require libtool-${PV}.inc
+SRC_URI += "file://multilib.patch file://debian-no_hostname.patch"
+
RDEPENDS_${PN} += "bash"
#
@@ -11,8 +13,11 @@ SYSROOT_DIRS_BLACKLIST += " \
${datadir}/libtool/build-aux \
"
+ACLOCALEXTRAPATH_class-target = ""
+
do_install_append () {
sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
+ -e "s@${DEBUG_PREFIX_MAP}@@g" \
-e 's@${STAGING_DIR_HOST}@@g' \
-e 's@${STAGING_DIR_NATIVE}@@g' \
-e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \
@@ -20,5 +25,10 @@ do_install_append () {
-e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \
-e 's@^\(predep_objects="\).*@\1"@' \
-e 's@^\(postdep_objects="\).*@\1"@' \
+ -e "s@${HOSTTOOLS_DIR}/@@g" \
-i ${D}${bindir}/libtool
}
+
+inherit multilib_script
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/libtool"
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb
deleted file mode 100644
index a5deb2e2d5..0000000000
--- a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Convert LinuxDoc SGML source into other formats"
-HOMEPAGE = "http://packages.debian.org/linuxdoc-tools"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=077ef64ec3ac257fb0d786531cf26931"
-
-DEPENDS = "groff-native openjade-native"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/l/${BPN}/${BPN}_${PV}.orig.tar.gz \
- file://disable_sgml2rtf.patch \
- file://disable_txt_doc.patch \
- file://disable_tex_doc.patch \
- file://disable_dvips_doc.patch"
-
-SRC_URI[md5sum] = "1d13d500918a7a145b0edc2f16f61dd1"
-SRC_URI[sha256sum] = "7103facee18a2ea97186ca459d743d22f7f89ad4b5cd1dfd1c34f83d6bfd4101"
-
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/l/linuxdoc-tools/"
-inherit autotools-brokensep native
-
-do_configure () {
- oe_runconf
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' 'TMPDIR=${T}' install
-}
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_dvips_doc.patch b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_dvips_doc.patch
deleted file mode 100644
index 490b367990..0000000000
--- a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_dvips_doc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Disable building documentation which requires the dvips utility.
-This patch should be dropped once we include a native version of
-dvips.
-
-Upstream-Status: Inappropriate [Other]
-Temporary workaround which disables documentation.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -urN linuxdoc-tools-0.9.66.orig/doc/Makedoc.sh linuxdoc-tools-0.9.66/doc/Makedoc.sh
---- linuxdoc-tools-0.9.66.orig/doc/Makedoc.sh 2011-02-25 15:26:41.142917782 -0800
-+++ linuxdoc-tools-0.9.66/doc/Makedoc.sh 2011-02-25 15:27:25.141917472 -0800
-@@ -52,13 +52,13 @@
- # $TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
- #fi
-
--if [ -n "`which dvips`" ]; then
-- echo " + dvips" >&2
-- dvips -t letter -o ./guide.ps ./guide.dvi
-- if [ -n "`which gzip`" -a -f ./guide.ps ]; then
-- gzip -fN ./guide.ps
-- fi
--fi
-+#if [ -n "`which dvips`" ]; then
-+# echo " + dvips" >&2
-+# dvips -t letter -o ./guide.ps ./guide.dvi
-+# if [ -n "`which gzip`" -a -f ./guide.ps ]; then
-+# gzip -fN ./guide.ps
-+# fi
-+#fi
-
-
- echo "- Building info docs" >&2
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_sgml2rtf.patch b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_sgml2rtf.patch
deleted file mode 100644
index 50c8a8f3fe..0000000000
--- a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_sgml2rtf.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 756f20e70a97ee2dea9b32c0955eabfc27f29be1 Mon Sep 17 00:00:00 2001
-From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
-Date: Wed, 29 May 2013 16:50:17 +0300
-Subject: [PATCH] The build of sgml2rtf is problematic due to the way it wants
- to link to a shared library version of flex. Flex only
- ships with a static lib. Rather than diverging from
- upstream flex, simply skip building this un-needed utility.
-
-Upstream-Status: Inappropriate [Other]
-Workaround which disables a feature.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
----
- Makefile.in | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 359f14e..fc04020 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -40,7 +40,7 @@ perl5lib_ddir = $(DESTDIR)$(perl5libdir)
- pkgdata_ddir = $(DESTDIR)$(pkgdatadir)
- tex_ddir = $(DESTDIR)$(texdir)
-
--progs := sgml2html sgml2info sgml2latex sgml2lyx sgml2rtf sgml2txt sgmlcheck
-+progs := sgml2html sgml2info sgml2latex sgml2lyx sgml2txt sgmlcheck
-
- PROFILE =
- INCLUDE =
-@@ -71,9 +71,9 @@ endif
- ( cd sgmlpre ; \
- $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LEX=flex sgmlpre || exit -1 )
-
-- @echo "Compiling RTF conversion tools (in rtf-fix/)..."
-- ( cd rtf-fix ; \
-- $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" || exit -1 )
-+# @echo "Compiling RTF conversion tools (in rtf-fix/)..."
-+# ( cd rtf-fix ; \
-+# $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" || exit -1 )
-
- @echo "making man pages in genman ..."
- if [ ! -d genman ]; then mkdir genman ; fi
-@@ -117,7 +117,7 @@ endif
-
- # -- Install auxiliary programs
- mkdir -p $(auxbin_ddir)
-- for ii in sgmlpre/sgmlpre rtf-fix/rtf2rtf; do \
-+ for ii in sgmlpre/sgmlpre; do \
- bn=`basename $$ii`; \
- $(INSTALL_PROGRAM) $$ii $(auxbin_ddir)/$$bn; \
- done
-@@ -206,7 +206,7 @@ bin/linuxdoc:: Makefile bin/linuxdoc.in
-
- clean::
- -rm -f *~ bin/*~ bin/linuxdoc
-- for d in $(DDIRS) $(MDIRS) rtf-fix; do $(MAKE) -C $$d clean; done
-+ for d in $(DDIRS) $(MDIRS); do $(MAKE) -C $$d clean; done
- (cd sgmlpre ; rm -f sgmlpre.o sgmlpre)
- -rm -rf genman/
-
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_tex_doc.patch b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_tex_doc.patch
deleted file mode 100644
index b62895c67d..0000000000
--- a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_tex_doc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Disable building documentation which requires the latex utility.
-This patch should be dropped once we include a native version of
-latex.
-
-Upstream-Status: Inappropriate [Other]
-Temporary workaround which disables documentation.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -urN linuxdoc-tools-0.9.66.orig/doc/Makedoc.sh linuxdoc-tools-0.9.66/doc/Makedoc.sh
---- linuxdoc-tools-0.9.66.orig/doc/Makedoc.sh 2009-11-09 11:58:25.000000000 -0800
-+++ linuxdoc-tools-0.9.66/doc/Makedoc.sh 2011-02-25 15:23:58.610016114 -0800
-@@ -46,11 +46,11 @@
- $TMPDIR/sgml2txt -b 1 ./guide
- fi
-
--if [ -n "`which latex`" ]; then
-- ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2latex
-- echo "- Building latex docs" >&2
-- $TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
--fi
-+#if [ -n "`which latex`" ]; then
-+# ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2latex
-+# echo "- Building latex docs" >&2
-+# $TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
-+#fi
-
- if [ -n "`which dvips`" ]; then
- echo " + dvips" >&2
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_txt_doc.patch b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_txt_doc.patch
deleted file mode 100644
index 8d784110db..0000000000
--- a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools/disable_txt_doc.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Disable building txt documentation. This is a temporary workaround,
-as I have found an Ubuntu 10.10 system which throws errors during
-building this that I'd like to ultimately fix. The error manifests
-itself from the end of LinuxDocTools.pm with the following messages
-during do_install:
-
-| - Building txt docs
-| Processing file ./guide
-| troff: fatal error: can't find macro file s
-| fmt_txt::postASP: Empty output file, error when calling groff. Aborting...
-
-Upstream-Status: Inappropriate [Other]
-Temporary workaround which disables documentation.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -urN linuxdoc-tools-0.9.66.orig//doc/Makedoc.sh linuxdoc-tools-0.9.66/doc/Makedoc.sh
---- linuxdoc-tools-0.9.66.orig//doc/Makedoc.sh 2009-11-09 11:58:25.000000000 -0800
-+++ linuxdoc-tools-0.9.66/doc/Makedoc.sh 2011-03-04 17:37:24.788923998 -0800
-@@ -40,11 +40,11 @@
-
- chmod u+x $TMPDIR/linuxdoc
-
--if [ -n "`which groff`" ]; then
-- ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2txt
-- echo "- Building txt docs" >&2
-- $TMPDIR/sgml2txt -b 1 ./guide
--fi
-+#if [ -n "`which groff`" ]; then
-+# ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2txt
-+# echo "- Building txt docs" >&2
-+# $TMPDIR/sgml2txt -b 1 ./guide
-+#fi
-
- if [ -n "`which latex`" ]; then
- ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2latex
diff --git a/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
new file mode 100644
index 0000000000..d02b7ba6ab
--- /dev/null
+++ b/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -0,0 +1,90 @@
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+From dbeecdb307be8b783b42cbc89dcb9c5e7f528989 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 21 May 2016 00:33:20 +0000
+Subject: [PATCH] llvm: TargetLibraryInfo: Undefine libc functions if they are macros
+
+musl defines some functions as macros and not inline functions
+if this is the case then make sure to undefine them
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ .../llvm/Analysis/TargetLibraryInfo.def | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+index afed404f04c..876888656f2 100644
+--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def
++++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+@@ -782,6 +782,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
+ TLI_DEFINE_ENUM_INTERNAL(fopen)
+ TLI_DEFINE_STRING_INTERNAL("fopen")
+ /// FILE *fopen64(const char *filename, const char *opentype)
++#ifdef fopen64
++#undef fopen64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(fopen64)
+ TLI_DEFINE_STRING_INTERNAL("fopen64")
+ /// int fork();
+@@ -829,6 +832,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
+ /// int fseeko(FILE *stream, off_t offset, int whence);
+ TLI_DEFINE_ENUM_INTERNAL(fseeko)
+ TLI_DEFINE_STRING_INTERNAL("fseeko")
++#ifdef fseeko64
++#undef fseeko64
++#endif
+ /// int fseeko64(FILE *stream, off64_t offset, int whence)
+ TLI_DEFINE_ENUM_INTERNAL(fseeko64)
+ TLI_DEFINE_STRING_INTERNAL("fseeko64")
+@@ -839,6 +845,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
+ TLI_DEFINE_ENUM_INTERNAL(fstat)
+ TLI_DEFINE_STRING_INTERNAL("fstat")
+ /// int fstat64(int filedes, struct stat64 *buf)
++#ifdef fstat64
++#undef fstat64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(fstat64)
+ TLI_DEFINE_STRING_INTERNAL("fstat64")
+ /// int fstatvfs(int fildes, struct statvfs *buf);
+@@ -854,6 +863,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
+ TLI_DEFINE_ENUM_INTERNAL(ftello)
+ TLI_DEFINE_STRING_INTERNAL("ftello")
+ /// off64_t ftello64(FILE *stream)
++#ifdef ftello64
++#undef ftello64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(ftello64)
+ TLI_DEFINE_STRING_INTERNAL("ftello64")
+ /// int ftrylockfile(FILE *file);
+@@ -980,6 +992,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
+ TLI_DEFINE_ENUM_INTERNAL(lstat)
+ TLI_DEFINE_STRING_INTERNAL("lstat")
+ /// int lstat64(const char *path, struct stat64 *buf);
++#ifdef lstat64
++#undef lstat64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(lstat64)
+ TLI_DEFINE_STRING_INTERNAL("lstat64")
+ /// void *malloc(size_t size);
+@@ -1205,6 +1220,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
+ TLI_DEFINE_ENUM_INTERNAL(stat)
+ TLI_DEFINE_STRING_INTERNAL("stat")
+ /// int stat64(const char *path, struct stat64 *buf);
++#ifdef stat64
++#undef stat64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(stat64)
+ TLI_DEFINE_STRING_INTERNAL("stat64")
+ /// int statvfs(const char *path, struct statvfs *buf);
+@@ -1340,6 +1358,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
+ TLI_DEFINE_ENUM_INTERNAL(tmpfile)
+ TLI_DEFINE_STRING_INTERNAL("tmpfile")
+ /// FILE *tmpfile64(void)
++#ifdef tmpfile64
++#undef tmpfile64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(tmpfile64)
+ TLI_DEFINE_STRING_INTERNAL("tmpfile64")
+ /// int toascii(int c);
diff --git a/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch b/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch
new file mode 100644
index 0000000000..b01b8647c9
--- /dev/null
+++ b/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+From 61b00e1e051e367f5483d7b5253b6c85a9e8a90f Mon Sep 17 00:00:00 2001
+From: Martin Kelly <mkelly@xevo.com>
+Date: Fri, 19 May 2017 00:22:57 -0700
+Subject: [PATCH] llvm: allow env override of exe path
+
+When using a native llvm-config from inside a sysroot, we need llvm-config to
+return the libraries, include directories, etc. from inside the sysroot rather
+than from the native sysroot. Thus provide an env override for calling
+llvm-config from a target sysroot.
+
+Signed-off-by: Martin Kelly <mkelly@xevo.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ llvm/tools/llvm-config/llvm-config.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
+index 7ef7c46a262..a4f7ed82c7b 100644
+--- a/llvm/tools/llvm-config/llvm-config.cpp
++++ b/llvm/tools/llvm-config/llvm-config.cpp
+@@ -225,6 +225,13 @@ Typical components:\n\
+
+ /// Compute the path to the main executable.
+ std::string GetExecutablePath(const char *Argv0) {
++ // Hack for Yocto: we need to override the root path when we are using
++ // llvm-config from within a target sysroot.
++ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH");
++ if (Sysroot != nullptr) {
++ return Sysroot;
++ }
++
+ // This just needs to be some symbol in the binary; C++ doesn't
+ // allow taking the address of ::main however.
+ void *P = (void *)(intptr_t)GetExecutablePath;
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
new file mode 100644
index 0000000000..cb2e1164cf
--- /dev/null
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -0,0 +1,182 @@
+# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "The LLVM Compiler Infrastructure"
+HOMEPAGE = "http://llvm.org"
+LICENSE = "Apache-2.0-with-LLVM-exception"
+SECTION = "devel"
+
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
+
+DEPENDS = "libffi libxml2 zlib libedit ninja-native llvm-native"
+
+COMPATIBLE_HOST_riscv64 = "null"
+COMPATIBLE_HOST_riscv32 = "null"
+
+RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"
+
+inherit cmake pkgconfig
+
+PROVIDES += "llvm${PV}"
+
+MAJOR_VERSION = "9"
+MINOR_VERSION = "0"
+PATCH_VERSION = "0"
+
+PV = "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
+
+LLVM_RELEASE = "${PV}"
+LLVM_DIR = "llvm${LLVM_RELEASE}"
+
+BRANCH = "release/${MAJOR_VERSION}.x"
+SRCREV = "0399d5a9682b3cef71c653373e38890c63c4c365"
+SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH} \
+ file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \
+ file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
+ "
+
+S = "${WORKDIR}/git/llvm"
+
+LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
+
+def get_llvm_arch(bb, d, arch_var):
+ import re
+ a = d.getVar(arch_var)
+ if re.match(r'(i.86|athlon|x86.64)$', a): return 'X86'
+ elif re.match(r'arm$', a): return 'ARM'
+ elif re.match(r'armeb$', a): return 'ARM'
+ elif re.match(r'aarch64$', a): return 'AArch64'
+ elif re.match(r'aarch64_be$', a): return 'AArch64'
+ elif re.match(r'mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips'
+ elif re.match(r'riscv(32|64)(eb|)$', a): return 'RISCV'
+ elif re.match(r'p(pc|owerpc)(|64)', a): return 'PowerPC'
+ else:
+ raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a)
+
+def get_llvm_host_arch(bb, d):
+ return get_llvm_arch(bb, d, 'HOST_ARCH')
+
+#
+# Default to build all OE-Core supported target arches (user overridable).
+#
+LLVM_TARGETS ?= "AMDGPU;${@get_llvm_host_arch(bb, d)}"
+
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv4t = "arm"
+
+EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
+ -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \
+ -DLLVM_ENABLE_PIC=ON \
+ -DLLVM_BINDINGS_LIST='' \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
+ -DLLVM_OPTIMIZED_TABLEGEN=ON \
+ -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS}' \
+ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
+ -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
+ -G Ninja"
+
+EXTRA_OECMAKE_append_class-target = "\
+ -DCMAKE_CROSSCOMPILING:BOOL=ON \
+ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
+ -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \
+ "
+
+EXTRA_OECMAKE_append_class-nativesdk = "\
+ -DCMAKE_CROSSCOMPILING:BOOL=ON \
+ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
+ -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \
+ "
+
+do_configure_prepend() {
+# Fix paths in llvm-config
+ sed -i "s|sys::path::parent_path(CurrentPath))\.str()|sys::path::parent_path(sys::path::parent_path(CurrentPath))).str()|g" ${S}/tools/llvm-config/llvm-config.cpp
+ sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" ${S}/tools/llvm-config/llvm-config.cpp
+ sed -ri "s#lib/${LLVM_DIR}#${baselib}/${LLVM_DIR}#g" ${S}/tools/llvm-config/llvm-config.cpp
+}
+
+do_compile() {
+ ninja -v ${PARALLEL_MAKE}
+}
+
+do_compile_class-native() {
+ ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
+}
+
+do_install() {
+ DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
+ install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config
+
+ install -d ${D}${bindir}/${LLVM_DIR}
+ cp -r ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/
+
+ install -d ${D}${includedir}/${LLVM_DIR}
+ cp -r ${LLVM_INSTALL_DIR}${includedir}/* ${D}${includedir}/${LLVM_DIR}/
+
+ install -d ${D}${libdir}/${LLVM_DIR}
+
+ # The LLVM sources have "/lib" embedded and so we cannot completely rely on the ${libdir} variable
+ if [ -d ${LLVM_INSTALL_DIR}${libdir}/ ]; then
+ cp -r ${LLVM_INSTALL_DIR}${libdir}/* ${D}${libdir}/${LLVM_DIR}/
+ elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib ]; then
+ cp -r ${LLVM_INSTALL_DIR}${prefix}/lib/* ${D}${libdir}/${LLVM_DIR}/
+ elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib64 ]; then
+ cp -r ${LLVM_INSTALL_DIR}${prefix}/lib64/* ${D}${libdir}/${LLVM_DIR}/
+ fi
+
+ # Remove unnecessary cmake files
+ rm -rf ${D}${libdir}/${LLVM_DIR}/cmake
+
+ ln -s ${LLVM_DIR}/libLLVM-${MAJOR_VERSION}${SOLIBSDEV} ${D}${libdir}/libLLVM-${MAJOR_VERSION}${SOLIBSDEV}
+
+ # We'll have to delete the libLLVM.so due to multiple reasons...
+ rm -rf ${D}${libdir}/${LLVM_DIR}/libLLVM.so
+ rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so
+}
+
+do_install_class-native() {
+ install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
+ install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
+ install -D -m 0755 ${B}/lib/libLLVM-${MAJOR_VERSION}.so ${D}${libdir}/libLLVM-${MAJOR_VERSION}.so
+}
+
+PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto"
+
+RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks"
+
+FILES_${PN}-bugpointpasses = "\
+ ${libdir}/${LLVM_DIR}/BugpointPasses.so \
+"
+
+FILES_${PN}-libllvm = "\
+ ${libdir}/${LLVM_DIR}/libLLVM-${MAJOR_VERSION}.so \
+ ${libdir}/libLLVM-${MAJOR_VERSION}.so \
+"
+
+FILES_${PN}-liblto += "\
+ ${libdir}/${LLVM_DIR}/libLTO.so.* \
+"
+
+FILES_${PN}-liboptremarks += "\
+ ${libdir}/${LLVM_DIR}/libRemarks.so.* \
+"
+
+FILES_${PN}-llvmhello = "\
+ ${libdir}/${LLVM_DIR}/LLVMHello.so \
+"
+
+FILES_${PN}-dev += " \
+ ${libdir}/${LLVM_DIR}/llvm-config \
+ ${libdir}/${LLVM_DIR}/libRemarks.so \
+ ${libdir}/${LLVM_DIR}/libLLVM-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}.so \
+"
+
+FILES_${PN}-staticdev += "\
+ ${libdir}/${LLVM_DIR}/*.a \
+"
+
+INSANE_SKIP_${PN}-libllvm += "dev-so"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/m4/m4-1.4.17.inc b/meta/recipes-devtools/m4/m4-1.4.17.inc
deleted file mode 100644
index 8ea4e04907..0000000000
--- a/meta/recipes-devtools/m4/m4-1.4.17.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-require m4.inc
-
-EXTRA_OECONF += "--without-libsigsegv-prefix"
-
-LICENSE = "GPLv3"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede"
-
-SRC_URI += "file://ac_config_links.patch \
- file://remove-gets.patch \
- "
-
-SRC_URI_append_class-target = "\
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-SRC_URI[md5sum] = "a5e9954b1dae036762f7b13673a2cf76"
-SRC_URI[sha256sum] = "3ce725133ee552b8b4baca7837fb772940b25e81b2a9dc92537aeaf733538c9e"
diff --git a/meta/recipes-devtools/m4/m4-1.4.18.inc b/meta/recipes-devtools/m4/m4-1.4.18.inc
new file mode 100644
index 0000000000..a9b63c1bf6
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4-1.4.18.inc
@@ -0,0 +1,62 @@
+SUMMARY = "Traditional Unix macro processor"
+HOMEPAGE = "https://www.gnu.org/software/m4/m4.html"
+DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \
+compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
+GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
+
+inherit autotools texinfo ptest
+
+SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
+ file://ac_config_links.patch \
+ file://m4-1.4.18-glibc-change-work-around.patch \
+ "
+SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://run-ptest \
+ file://serial-tests-config.patch \
+ file://0001-test-getopt-posix-fix.patch \
+ "
+
+SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
+SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
+
+LICENSE = "GPLv3"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede"
+
+# Fix "Argument list too long" error when len(TMPDIR) = 410
+acpaths = "-I ./m4"
+
+EXTRA_OECONF += "--without-libsigsegv-prefix"
+
+EXTRA_OEMAKE += "'infodir=${infodir}'"
+
+do_compile_ptest() {
+ cd ${B}/tests
+ sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile
+ oe_runmake buildtest-TESTS
+}
+
+do_install_ptest() {
+ cp -r ${B}/tests ${D}${PTEST_PATH}
+ cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
+ sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
+ sed -i -e "s;LOCALE_FR='fr_FR';LOCALE_FR='fr_FR.iso88591';g" \
+ -e "s;LOCALE_FR_UTF8='none';LOCALE_FR_UTF8='fr_FR.utf8';g" ${D}${PTEST_PATH}/tests/Makefile
+ find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
+ cp ${S}/build-aux/update-copyright ${D}${PTEST_PATH}/tests/
+ sed -i 's;update-copyright;./update-copyright;g' ${D}${PTEST_PATH}/tests/test-update-copyright.sh
+ chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \
+ ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \
+ ${D}${PTEST_PATH}/tests/test-xalloc-die
+}
+
+
+RDEPENDS_${PN}-ptest += "make coreutils diffutils"
+RDEPENDS_${PN}-ptest_append_libc-glibc = "\
+ locale-base-fr-fr.iso-8859-1 \
+"
+
+INSANE_SKIP_${PN}-ptest += "ldflags"
+INSANE_SKIP_${PN}-ptest += "rpaths"
+
diff --git a/meta/recipes-devtools/m4/m4-1.4.9.inc b/meta/recipes-devtools/m4/m4-1.4.9.inc
deleted file mode 100644
index aab2c1efa2..0000000000
--- a/meta/recipes-devtools/m4/m4-1.4.9.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-require m4.inc
-
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe\
- file://examples/COPYING;md5=1d49bd61dc590f014cae7173b43e3e5c"
-
-PR = "r2"
-SRC_URI += "file://fix_for_circular_dependency.patch"
-
-SRC_URI[md5sum] = "1ba8e147aff5e79bd2bfb983d86b53d5"
-SRC_URI[sha256sum] = "815ce53853fbf6493617f467389b799208b1ec98296b95be44a683f8bcfd7c47"
-
diff --git a/meta/recipes-devtools/m4/m4-native_1.4.17.bb b/meta/recipes-devtools/m4/m4-native_1.4.17.bb
deleted file mode 100644
index 06d8aa244e..0000000000
--- a/meta/recipes-devtools/m4/m4-native_1.4.17.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require m4-${PV}.inc
-
-inherit native
-
-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
-}
-
diff --git a/meta/recipes-devtools/m4/m4-native_1.4.18.bb b/meta/recipes-devtools/m4/m4-native_1.4.18.bb
new file mode 100644
index 0000000000..407ad89330
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4-native_1.4.18.bb
@@ -0,0 +1,14 @@
+require m4-${PV}.inc
+
+inherit native
+
+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
+}
+
+UPSTREAM_CHECK_URI = "${GNU_MIRROR}/m4/"
diff --git a/meta/recipes-devtools/m4/m4.inc b/meta/recipes-devtools/m4/m4.inc
deleted file mode 100644
index 4a83929f0c..0000000000
--- a/meta/recipes-devtools/m4/m4.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-SUMMARY = "Traditional Unix macro processor"
-DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \
-compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
-GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
-
-inherit autotools texinfo
-
-EXTRA_OEMAKE += "'infodir=${infodir}'"
-LDFLAGS_prepend_libc-uclibc = " -lrt "
-SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz"
diff --git a/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch b/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch
new file mode 100644
index 0000000000..11508ee0e2
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch
@@ -0,0 +1,41 @@
+From 75bea7c72a919859674f493548653de88f96c798 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 22 Apr 2019 10:36:13 +0800
+Subject: [PATCH] test-getopt-posix fix
+
+fix below problem:
+test-getopt.h:754: assertion 'strcmp (argv[1], "donald") == 0' failed
+
+get this patch from
+https://github.com/habitat-sh/core-plans/blob/master/m4/fix-test-getopt-posix-with-glibc-2.26.patch
+
+Upstream-Status: Pending
+
+have report this bug to m4-discuss@gnu.org
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ tests/test-getopt-posix.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tests/test-getopt-posix.c b/tests/test-getopt-posix.c
+index 5532271..2a3d511 100644
+--- a/tests/test-getopt-posix.c
++++ b/tests/test-getopt-posix.c
+@@ -22,6 +22,13 @@
+ ftell link warning if we are not using the gnulib ftell module. */
+ #define _GL_NO_LARGE_FILES
+
++/*
++ * Glibc 2.26 does hard include bits/getopt_posix.h which causes the system
++ * to use glibc's getopt but the tests expect gnulib behavior. Until a better
++ * fix is available this avoids that mis-resolution.
++ */
++#include <getopt.h>
++
+ /* POSIX and glibc provide the getopt() function in <unistd.h>, see
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+ https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/m4/m4/ac_config_links.patch b/meta/recipes-devtools/m4/m4/ac_config_links.patch
index 275c0b2e7d..71edf59512 100644
--- a/meta/recipes-devtools/m4/m4/ac_config_links.patch
+++ b/meta/recipes-devtools/m4/m4/ac_config_links.patch
@@ -14,10 +14,11 @@ Tested on x86_64_linux (Ubuntu 8.04 and 9.10).
2009-11-10 Esben Haabendal <eha@doredevelopment.dk>
-diff -urN m4-1.4.13.orig/configure m4-1.4.13/configure
---- m4-1.4.13.orig/configure 2009-11-10 10:54:00.301707097 +0100
-+++ m4-1.4.13/configure 2009-11-10 10:54:17.314206379 +0100
-@@ -14860,8 +14860,8 @@
+Index: m4-1.4.18/configure
+===================================================================
+--- m4-1.4.18.orig/configure
++++ m4-1.4.18/configure
+@@ -24415,8 +24415,8 @@ $as_echo "#define GNULIB_TEST_GETTIMEOFD
# only, it does not matter if we skip the link with older autoconf.
# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
# builds, so use a shell variable to bypass this.
@@ -27,4 +28,4 @@ diff -urN m4-1.4.13.orig/configure m4-1.4.13/configure
+ # ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
-
+ :
diff --git a/meta/recipes-devtools/m4/m4/fix_for_circular_dependency.patch b/meta/recipes-devtools/m4/m4/fix_for_circular_dependency.patch
deleted file mode 100644
index 98774535d5..0000000000
--- a/meta/recipes-devtools/m4/m4/fix_for_circular_dependency.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-The older GPLv2 m4 does not work well with newer autoconf. It causes the
-circular dependency as seen bellow.
- Removing this m4 file which was needed only forl older autoconf
-
-| configure.ac:34: error: AC_REQUIRE: circular dependency of AC_GNU_SOURCE
-| /build_disk/poky_build/build1/tmp/work/i586-poky-linux/m4-1.4.9-r0/m4-1.4.9/m4/extensions.m4:19: AC_USE_SYSTEM_EXTENSIONS is expanded from...
-| ../../lib/autoconf/specific.m4:310: AC_GNU_SOURCE is expanded from...
-| /build_disk/poky_build/build1/tmp/work/i586-poky-linux/m4-1.4.9-r0/m4-1.4.9/m4/gnulib-comp.m4:21: M4_EARLY is expanded from...
-| configure.ac:34: the top level
-| autom4te: /build_disk/poky_build/build1/tmp/sysroots/x86_64-linux/usr/bin/m4 failed with exit status: 1
-| aclocal: /build_disk/poky_build/build1/tmp/sysroots/x86_64-linux/usr/bin/autom4te failed with exit status: 1
-| autoreconf: aclocal failed with exit status: 1
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/03/16
-
-Index: m4-1.4.9/m4/extensions.m4
-===================================================================
---- m4-1.4.9.orig/m4/extensions.m4
-+++ m4-1.4.9/m4/extensions.m4
-@@ -6,53 +6,10 @@
- # gives unlimited permission to copy and/or distribute it,
- # with or without modifications, as long as this notice is preserved.
-
--# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
--# Autoconf. Perhaps we can remove this once we can assume Autoconf
--# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly
--# enough in this area it's likely we'll need to redefine
--# AC_USE_SYSTEM_EXTENSIONS for quite some time.
--
--# AC_USE_SYSTEM_EXTENSIONS
--# ------------------------
--# Enable extensions on systems that normally disable them,
--# typically due to standards-conformance issues.
--AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
--[
-- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-- AC_BEFORE([$0], [AC_RUN_IFELSE])
--
-- AC_REQUIRE([AC_GNU_SOURCE])
-- AC_REQUIRE([AC_AIX])
-- AC_REQUIRE([AC_MINIX])
--
-- AH_VERBATIM([__EXTENSIONS__],
--[/* Enable extensions on Solaris. */
--#ifndef __EXTENSIONS__
--# undef __EXTENSIONS__
--#endif
--#ifndef _POSIX_PTHREAD_SEMANTICS
--# undef _POSIX_PTHREAD_SEMANTICS
--#endif
--#ifndef _TANDEM_SOURCE
--# undef _TANDEM_SOURCE
--#endif])
-- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
-- [ac_cv_safe_to_define___extensions__],
-- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([
--# define __EXTENSIONS__ 1
-- AC_INCLUDES_DEFAULT])],
-- [ac_cv_safe_to_define___extensions__=yes],
-- [ac_cv_safe_to_define___extensions__=no])])
-- test $ac_cv_safe_to_define___extensions__ = yes &&
-- AC_DEFINE([__EXTENSIONS__])
-- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-- AC_DEFINE([_TANDEM_SOURCE])
--])
-
- # gl_USE_SYSTEM_EXTENSIONS
- # ------------------------
- # Enable extensions on systems that normally disable them,
- # typically due to standards-conformance issues.
- AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
-- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
-+ [])
diff --git a/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch b/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
new file mode 100644
index 0000000000..c10bcbf693
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
@@ -0,0 +1,130 @@
+update for glibc libio.h removal in 2.28+
+
+see
+https://src.fedoraproject.org/rpms/m4/c/814d592134fad36df757f9a61422d164ea2c6c9b?branch=master
+
+Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a718]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: m4-1.4.18/lib/fflush.c
+===================================================================
+--- m4-1.4.18.orig/lib/fflush.c
++++ m4-1.4.18/lib/fflush.c
+@@ -33,7 +33,7 @@
+ #undef fflush
+
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
+ static void
+@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
+
+ #endif
+
+-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
+
+ # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
+ if (stream == NULL || ! freading (stream))
+ return fflush (stream);
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ clear_ungetc_buffer_preserving_position (stream);
+
+Index: m4-1.4.18/lib/fpending.c
+===================================================================
+--- m4-1.4.18.orig/lib/fpending.c
++++ m4-1.4.18/lib/fpending.c
+@@ -32,7 +32,7 @@ __fpending (FILE *fp)
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ return fp->_IO_write_ptr - fp->_IO_write_base;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+Index: m4-1.4.18/lib/fpurge.c
+===================================================================
+--- m4-1.4.18.orig/lib/fpurge.c
++++ m4-1.4.18/lib/fpurge.c
+@@ -62,7 +62,7 @@ fpurge (FILE *fp)
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_IO_read_end = fp->_IO_read_ptr;
+ fp->_IO_write_ptr = fp->_IO_write_base;
+ /* Avoid memory leak when there is an active ungetc buffer. */
+Index: m4-1.4.18/lib/freadahead.c
+===================================================================
+--- m4-1.4.18.orig/lib/freadahead.c
++++ m4-1.4.18/lib/freadahead.c
+@@ -25,7 +25,7 @@
+ size_t
+ freadahead (FILE *fp)
+ {
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ if (fp->_IO_write_ptr > fp->_IO_write_base)
+ return 0;
+ return (fp->_IO_read_end - fp->_IO_read_ptr)
+Index: m4-1.4.18/lib/freading.c
+===================================================================
+--- m4-1.4.18.orig/lib/freading.c
++++ m4-1.4.18/lib/freading.c
+@@ -31,7 +31,7 @@ freading (FILE *fp)
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ return ((fp->_flags & _IO_NO_WRITES) != 0
+ || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+ && fp->_IO_read_base != NULL));
+Index: m4-1.4.18/lib/fseeko.c
+===================================================================
+--- m4-1.4.18.orig/lib/fseeko.c
++++ m4-1.4.18/lib/fseeko.c
+@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when
+ #endif
+
+ /* These tests are based on fpurge.c. */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ if (fp->_IO_read_end == fp->_IO_read_ptr
+ && fp->_IO_write_ptr == fp->_IO_write_base
+ && fp->_IO_save_base == NULL)
+@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when
+ return -1;
+ }
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_flags &= ~_IO_EOF_SEEN;
+ fp->_offset = pos;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+Index: m4-1.4.18/lib/stdio-impl.h
+===================================================================
+--- m4-1.4.18.orig/lib/stdio-impl.h
++++ m4-1.4.18/lib/stdio-impl.h
+@@ -18,6 +18,12 @@
+ the same implementation of stdio extension API, except that some fields
+ have different naming conventions, or their access requires some casts. */
+
++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
++ problem by defining it ourselves. FIXME: Do not rely on glibc
++ internals. */
++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
++# define _IO_IN_BACKUP 0x100
++#endif
+
+ /* BSD stdio derived implementations. */
+
diff --git a/meta/recipes-devtools/m4/m4/remove-gets.patch b/meta/recipes-devtools/m4/m4/remove-gets.patch
deleted file mode 100644
index effb353f11..0000000000
--- a/meta/recipes-devtools/m4/m4/remove-gets.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-eglibc has remove gets starting 2.16
-therefore check for its being there before
-undefining it.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: m4-1.4.17/lib/stdio.in.h
-===================================================================
---- m4-1.4.17.orig/lib/stdio.in.h 2013-10-16 14:41:01.678496227 +0300
-+++ m4-1.4.17/lib/stdio.in.h 2013-10-16 14:41:48.849427839 +0300
-@@ -717,10 +717,12 @@
- /* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning; besides, C11
- removed it. */
-+#if defined gets
- #undef gets
- #if HAVE_RAW_DECL_GETS
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- #endif
-+#endif
-
-
- #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
diff --git a/meta/recipes-devtools/m4/m4/run-ptest b/meta/recipes-devtools/m4/m4/run-ptest
new file mode 100644
index 0000000000..5c0fe93357
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+#This script is used to run m4 test suites
+cd tests
+make -k runtest-TESTS top_srcdir=.. srcdir=.
diff --git a/meta/recipes-devtools/m4/m4/serial-tests-config.patch b/meta/recipes-devtools/m4/m4/serial-tests-config.patch
new file mode 100644
index 0000000000..34e6ad801e
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/serial-tests-config.patch
@@ -0,0 +1,30 @@
+From ab8491111b4578db5b735c6466187775e1855f18 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 23 Apr 2019 15:35:00 +0800
+Subject: [PATCH] add a patch to use serial-tests config needed by ptest
+
+Add serial-tests support, ptest need it.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 78b8788..931fa6f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,7 @@ AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+ [bug-m4@gnu.org])
+ AC_CONFIG_AUX_DIR([build-aux])
+
+-AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests
++AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests serial-tests
+ silent-rules subdir-objects gnu])
+ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
+
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/m4/m4_1.4.17.bb b/meta/recipes-devtools/m4/m4_1.4.18.bb
index b12c0adf3a..b12c0adf3a 100644
--- a/meta/recipes-devtools/m4/m4_1.4.17.bb
+++ b/meta/recipes-devtools/m4/m4_1.4.18.bb
diff --git a/meta/recipes-devtools/m4/m4_1.4.9.bb b/meta/recipes-devtools/m4/m4_1.4.9.bb
deleted file mode 100644
index b12c0adf3a..0000000000
--- a/meta/recipes-devtools/m4/m4_1.4.9.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require m4-${PV}.inc
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch b/meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch
deleted file mode 100644
index 102fe79ab8..0000000000
--- a/meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| configure.in:48: error: automatic de-ANSI-fication support has been removed
-...
-| Makefile.am:19: error: automatic de-ANSI-fication support has been removed
-| autoreconf: automake failed with exit status: 1
-| ERROR: autoreconf execution failed.
-
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/04
-
-Index: make-3.81/configure.in
-===================================================================
---- make-3.81.orig/configure.in
-+++ make-3.81/configure.in
-@@ -44,9 +44,6 @@ AC_AIX
- AC_ISC_POSIX
- AC_MINIX
-
--# Needed for ansi2knr
--AM_C_PROTOTYPES
--
- # Enable gettext, in "external" mode.
-
- AM_GNU_GETTEXT_VERSION(0.14.1)
-Index: make-3.81/Makefile.am
-===================================================================
---- make-3.81.orig/Makefile.am
-+++ make-3.81/Makefile.am
-@@ -16,7 +16,7 @@
- # GNU Make; see the file COPYING. If not, write to the Free Software
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
--AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news ansi2knr
-+AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news
- ACLOCAL_AMFLAGS = -I config
-
- MAKE_HOST = @MAKE_HOST@
diff --git a/meta/recipes-devtools/make/make-3.81/makeinfo.patch b/meta/recipes-devtools/make/make-3.81/makeinfo.patch
deleted file mode 100644
index 5dd7604675..0000000000
--- a/meta/recipes-devtools/make/make-3.81/makeinfo.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Allow docs to build with makeinfo 5.X, fixing the error:
-
-doc/make.texi:8165: @itemx must follow @item
-
-Upstream-Status: Backport
-
-RP
-2014/03/29
-
-Index: make-3.81/doc/make.texi
-===================================================================
---- make-3.81.orig/doc/make.texi 2006-04-01 06:36:40.000000000 +0000
-+++ make-3.81/doc/make.texi 2014-03-29 09:39:51.007727012 +0000
-@@ -8162,7 +8162,7 @@
- rarely need to specify this option since @samp{make} does it for you;
- see @ref{-w Option, ,The @samp{--print-directory} Option}.)
-
--@itemx --no-print-directory
-+@item --no-print-directory
- @cindex @code{--no-print-directory}
- Disable printing of the working directory under @code{-w}.
- This option is useful when @code{-w} is turned on automatically,
diff --git a/meta/recipes-devtools/make/make.inc b/meta/recipes-devtools/make/make.inc
index 849b74299c..b8905bc6d3 100644
--- a/meta/recipes-devtools/make/make.inc
+++ b/meta/recipes-devtools/make/make.inc
@@ -5,7 +5,10 @@ called the makefile, which lists each of the non-source files and how to compute
HOMEPAGE = "http://www.gnu.org/software/make/"
SECTION = "devel"
-SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2"
+SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \
+ file://0001-glob-Do-not-assume-glibc-glob-internals.patch \
+ file://0002-glob-Do-not-assume-glibc-glob-internals.patch \
+ "
inherit autotools gettext pkgconfig texinfo
diff --git a/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch b/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
new file mode 100644
index 0000000000..2b6e4d40c3
--- /dev/null
+++ b/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
@@ -0,0 +1,70 @@
+From c90a7dda6c572f79b8e78da44b6ebf8704edef65 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 24 Sep 2017 09:12:58 -0400
+Subject: [PATCH 1/2] glob: Do not assume glibc glob internals.
+
+It has been proposed that glibc glob start using gl_lstat,
+which the API allows it to do. GNU 'make' should not get in
+the way of this. See:
+https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
+
+* dir.c (local_lstat): New function, like local_stat.
+(dir_setup_glob): Use it to initialize gl_lstat too, as the API
+requires.
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ dir.c | 29 +++++++++++++++++++++++++++--
+ 1 file changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/dir.c b/dir.c
+index f34bbf5..12eef30 100644
+--- a/dir.c
++++ b/dir.c
+@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf)
+ }
+ #endif
+
++/* Similarly for lstat. */
++#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
++# ifndef VMS
++# ifndef HAVE_SYS_STAT_H
++int lstat (const char *path, struct stat *sbuf);
++# endif
++# else
++ /* We are done with the fake lstat. Go back to the real lstat */
++# ifdef lstat
++# undef lstat
++# endif
++# endif
++# define local_lstat lstat
++#elif defined(WINDOWS32)
++/* Windows doesn't support lstat(). */
++# define local_lstat local_stat
++#else
++static int
++local_lstat (const char *path, struct stat *buf)
++{
++ int e;
++ EINTRLOOP (e, lstat (path, buf));
++ return e;
++}
++#endif
++
+ void
+ dir_setup_glob (glob_t *gl)
+ {
+ gl->gl_opendir = open_dirstream;
+ gl->gl_readdir = read_dirstream;
+ gl->gl_closedir = free;
++ gl->gl_lstat = local_lstat;
+ gl->gl_stat = local_stat;
+- /* We don't bother setting gl_lstat, since glob never calls it.
+- The slot is only there for compatibility with 4.4 BSD. */
+ }
+
+ void
+--
+2.16.1
+
diff --git a/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch b/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
new file mode 100644
index 0000000000..d49acd9f6e
--- /dev/null
+++ b/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
@@ -0,0 +1,38 @@
+From 9858702dbd1e137262c06765919937660879f63c Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 24 Sep 2017 09:12:58 -0400
+Subject: [PATCH 2/2] glob: Do not assume glibc glob internals.
+
+It has been proposed that glibc glob start using gl_lstat,
+which the API allows it to do. GNU 'make' should not get in
+the way of this. See:
+https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
+
+* dir.c (local_lstat): New function, like local_stat.
+(dir_setup_glob): Use it to initialize gl_lstat too, as the API
+requires.
+---
+Upstream-Status: Backport
+
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 64ec870..e87901c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -399,10 +399,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
+ #include <glob.h>
+ #include <fnmatch.h>
+
+-#define GLOB_INTERFACE_VERSION 1
+ #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+ # include <gnu-versions.h>
+-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
++if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
+ gnu glob
+ # endif
+ #endif],
+--
+2.16.1
+
diff --git a/meta/recipes-devtools/make/make_3.81.bb b/meta/recipes-devtools/make/make_3.81.bb
deleted file mode 100644
index b8a79b0eb2..0000000000
--- a/meta/recipes-devtools/make/make_3.81.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-PR = "r1"
-
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=361b6b837cad26c6900a926b62aada5f \
- file://tests/COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
- file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
-
-require make.inc
-
-SRC_URI += "file://make_fix_for_automake-1.12.patch"
-SRC_URI += "file://makeinfo.patch"
-
-SRC_URI[md5sum] = "354853e0b2da90c527e35aabb8d6f1e6"
-SRC_URI[sha256sum] = "f3e69023771e23908f5d5592954d8271d3d6af09693cecfd29cee6fde8550dc8"
-
diff --git a/meta/recipes-devtools/makedevs/makedevs/makedevs.c b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
index cba7681414..32b9872932 100644
--- a/meta/recipes-devtools/makedevs/makedevs/makedevs.c
+++ b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
@@ -230,7 +230,7 @@ static void add_new_directory(char *name, char *path,
unsigned long uid, unsigned long gid, unsigned long mode)
{
if (trace)
- fprintf(stderr, "Directory: %s %s UID: %ld GID %ld MODE: %04lo", path, name, uid, gid, mode);
+ fprintf(stderr, "Directory: %s %s UID: %lu GID %lu MODE: %04lo", path, name, uid, gid, mode);
if (mkdir(path, mode) < 0) {
if (EEXIST == errno) {
@@ -251,7 +251,7 @@ static void add_new_device(char *name, char *path, unsigned long uid,
struct stat sb;
if (trace) {
- fprintf(stderr, "Device: %s %s UID: %ld GID: %ld MODE: %04lo MAJOR: %d MINOR: %d",
+ fprintf(stderr, "Device: %s %s UID: %lu GID: %lu MODE: %04lo MAJOR: %d MINOR: %d",
path, name, uid, gid, mode, (short)(rdev >> 8), (short)(rdev & 0xff));
}
@@ -292,7 +292,7 @@ static void add_new_file(char *name, char *path, unsigned long uid,
unsigned long gid, unsigned long mode)
{
if (trace) {
- fprintf(stderr, "File: %s %s UID: %ld GID: %ld MODE: %04lo\n",
+ fprintf(stderr, "File: %s %s UID: %lu GID: %lu MODE: %04lo\n",
path, name, gid, uid, mode);
}
@@ -311,7 +311,7 @@ static void add_new_fifo(char *name, char *path, unsigned long uid,
unsigned long gid, unsigned long mode)
{
if (trace) {
- printf("Fifo: %s %s UID: %ld GID: %ld MODE: %04lo\n",
+ printf("Fifo: %s %s UID: %lu GID: %lu MODE: %04lo\n",
path, name, gid, uid, mode);
}
@@ -360,7 +360,7 @@ static int interpret_table_entry(char *line)
unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0;
unsigned long start = 0, increment = 1, count = 0;
- if (0 > sscanf(line, "%4095s %c %lo %40s %40s %lu %lu %lu %lu %lu", path,
+ if (0 > sscanf(line, "%4095s %c %lo %39s %39s %lu %lu %lu %lu %lu", path,
&type, &mode, usr_buf, grp_buf, &major, &minor, &start,
&increment, &count))
{
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
new file mode 100644
index 0000000000..84bcc8409d
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -0,0 +1,35 @@
+HOMEPAGE = "http://mesonbuild.com"
+SUMMARY = "A high performance build system"
+DESCRIPTION = "Meson is a build system designed to increase programmer \
+productivity. It does this by providing a fast, simple and easy to use \
+interface for modern software development tools and practices."
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz \
+ file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
+ file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
+ file://0003-native_bindir.patch \
+ file://0001-python-module-do-not-manipulate-the-environment-when.patch \
+ file://disable-rpath-handling.patch \
+ file://cross-prop-default.patch \
+ file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \
+ file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
+ file://dbc9e971bd320f3df15c1ee74f54858e6792b183.patch \
+ "
+SRC_URI[sha256sum] = "d60f75f0dedcc4fd249dbc7519d6f3ce6df490033d276ef1cf27453ef4938d32"
+SRC_URI[md5sum] = "7ea7772414dda8ae11072244bf7ba991"
+
+SRC_URI_append_class-native = " \
+ file://0001-Make-CPU-family-warnings-fatal.patch \
+ file://0002-Support-building-allarch-recipes-again.patch \
+"
+
+UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
+
+inherit setuptools3
+
+RDEPENDS_${PN} = "ninja python3-modules python3-pkg-resources"
+
+FILES_${PN} += "${datadir}/polkit-1"
diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
new file mode 100644
index 0000000000..fc55dcacf6
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
@@ -0,0 +1,41 @@
+From c07d29b715209cd5d75b142a00a540d45b00c36d Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 3 Jul 2018 13:59:09 +0100
+Subject: [PATCH] Make CPU family warnings fatal
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ mesonbuild/envconfig.py | 2 +-
+ mesonbuild/environment.py | 4 +---
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
+index a59cd89..17de654 100644
+--- a/mesonbuild/envconfig.py
++++ b/mesonbuild/envconfig.py
+@@ -186,7 +186,7 @@ class MachineInfo:
+
+ cpu_family = literal['cpu_family']
+ if cpu_family not in known_cpu_families:
+- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % cpu_family)
++ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % cpu_family)
+
+ endian = literal['endian']
+ if endian not in ('little', 'big'):
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index 3704921..f1988f2 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -251,9 +251,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
+ trial = 'parisc'
+
+ if trial not in known_cpu_families:
+- mlog.warning('Unknown CPU family {!r}, please report this at '
+- 'https://github.com/mesonbuild/meson/issues/new with the'
+- 'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial))
++ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
+
+ return trial
+
diff --git a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
new file mode 100644
index 0000000000..471f1500da
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -0,0 +1,36 @@
+From d3ef01a4208a801acad380a4aaceb6a21f8fa603 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:16:41 +0300
+Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling
+
+Specifically:
+1) Make it possible to specify a wrapper for executing binaries
+(usually, some kind of target hardware emulator, such as qemu)
+2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will
+try to guess them, incorrectly.
+3) If things break down, print the full command with arguments,
+not just the binary name.
+4) Correctly determine the compiler/linker executables and cross-options when cross-compiling
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index bcf77b9..6a4b472 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -974,6 +974,10 @@ This will become a hard error in the future.''')
+ args.append('--{}={}'.format(program_name, path))
+ if namespace:
+ args.append('--namespace=' + namespace)
++ gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None)
++ if gtkdoc_exe_wrapper is not None:
++ args.append('--run=' + gtkdoc_exe_wrapper)
++
+ args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
+ args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
+ args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)
diff --git a/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch b/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch
new file mode 100644
index 0000000000..f4456235fe
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch
@@ -0,0 +1,26 @@
+From a72dc2b1cddcf180ce782860896deae0b12d5000 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 25 Mar 2019 18:52:48 +0100
+Subject: [PATCH] mesonbuild/environment.py: check environment for various
+ binaries
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/environment.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index 9a029f4..0cfdf9c 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -448,7 +448,7 @@ class Environment:
+ config = MesonConfigFile.from_config_parser(
+ coredata.load_configs(self.coredata.cross_files))
+ properties.host = Properties(config.get('properties', {}), False)
+- binaries.host = BinaryTable(config.get('binaries', {}), False)
++ binaries.host = BinaryTable(config.get('binaries', {}), True)
+ if 'host_machine' in config:
+ machines.host = MachineInfo.from_literal(config['host_machine'])
+ if 'target_machine' in config:
diff --git a/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch b/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch
new file mode 100644
index 0000000000..a25c392270
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch
@@ -0,0 +1,44 @@
+From 1d178fb2928d325e339b15972890ceced863d3ec Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 18 Apr 2019 17:36:11 +0200
+Subject: [PATCH] modules/python.py: do not substitute python's install prefix
+ with meson's
+
+Not sure why this is being done, but it
+a) relies on Python's internal variable substitution which may break in the future
+b) shouldn't be necessary as Python's prefix ought to be correct in the first place
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/modules/python.py | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
+index 6e2c63b..f5a37ac 100644
+--- a/mesonbuild/modules/python.py
++++ b/mesonbuild/modules/python.py
+@@ -254,7 +254,7 @@ import sysconfig
+ import json
+ import sys
+
+-install_paths = sysconfig.get_paths(scheme='posix_prefix', vars={'base': '', 'platbase': '', 'installed_base': ''})
++install_paths = sysconfig.get_paths(scheme='posix_prefix')
+
+ def links_against_libpython():
+ from distutils.core import Distribution, Extension
+@@ -279,12 +279,11 @@ class PythonInstallation(ExternalProgramHolder):
+ ExternalProgramHolder.__init__(self, python)
+ self.interpreter = interpreter
+ self.subproject = self.interpreter.subproject
+- prefix = self.interpreter.environment.coredata.get_builtin_option('prefix')
+ self.variables = info['variables']
+ self.paths = info['paths']
+ install_paths = info['install_paths']
+- self.platlib_install_path = os.path.join(prefix, install_paths['platlib'][1:])
+- self.purelib_install_path = os.path.join(prefix, install_paths['purelib'][1:])
++ self.platlib_install_path = install_paths['platlib']
++ self.purelib_install_path = install_paths['purelib']
+ self.version = info['version']
+ self.platform = info['platform']
+ self.is_pypy = info['is_pypy']
diff --git a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
new file mode 100644
index 0000000000..bf715d1e9f
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
@@ -0,0 +1,43 @@
+From 3cb2c811dc6d4890342afa5b709cd30cf7b8f3ca Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 19 Nov 2018 14:24:26 +0100
+Subject: [PATCH] python module: do not manipulate the environment when calling
+ pkg-config
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/python.py | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
+index 9cfbd6f..3ff687a 100644
+--- a/mesonbuild/modules/python.py
++++ b/mesonbuild/modules/python.py
+@@ -75,11 +75,6 @@ class PythonDependency(ExternalDependency):
+ old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
+ old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
+
+- os.environ.pop('PKG_CONFIG_PATH', None)
+-
+- if pkg_libdir:
+- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
+-
+ try:
+ self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs)
+ mlog.debug('Found "python-{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_version, pkg_libdir))
+@@ -88,13 +83,6 @@ class PythonDependency(ExternalDependency):
+ mlog.debug('"python-{}" could not be found in LIBPC ({})'.format(pkg_version, pkg_libdir))
+ mlog.debug(e)
+
+- if old_pkg_path is not None:
+- os.environ['PKG_CONFIG_PATH'] = old_pkg_path
+-
+- if old_pkg_libdir is not None:
+- os.environ['PKG_CONFIG_LIBDIR'] = old_pkg_libdir
+- else:
+- os.environ.pop('PKG_CONFIG_LIBDIR', None)
+ else:
+ mlog.debug('"python-{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_version, pkg_libdir))
+
diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
new file mode 100644
index 0000000000..b8837d77b6
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
@@ -0,0 +1,26 @@
+From 263fc0e26e1fd92e25fa3ef93f4a549dcebc5887 Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Thu, 26 Jul 2018 16:32:49 +0200
+Subject: [PATCH] Support building allarch recipes again
+
+This registers "allarch" as a known CPU family.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+
+---
+ mesonbuild/envconfig.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
+index 17de654..2d2deef 100644
+--- a/mesonbuild/envconfig.py
++++ b/mesonbuild/envconfig.py
+@@ -36,6 +36,7 @@ _T = typing.TypeVar('_T')
+
+
+ known_cpu_families = (
++ 'allarch',
+ 'aarch64',
+ 'arc',
+ 'arm',
diff --git a/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
new file mode 100644
index 0000000000..61b26bb883
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
@@ -0,0 +1,40 @@
+From 9ccaed380780178c4dab3a681f652ac7cd27452d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:18:47 +0300
+Subject: [PATCH] gobject-introspection: determine g-ir-scanner and
+ g-ir-compiler paths from pkgconfig
+
+Do not hardcode the name of those binaries; gobject-introspection
+provides them via pkgconfig, and they can be set to something else
+(for example when cross-compiling).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 7c5a363..0002498 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -744,15 +744,15 @@ class GnomeModule(ExtensionModule):
+ if kwargs.get('install_dir'):
+ raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
+
+- giscanner = self.interpreter.find_program_impl('g-ir-scanner')
+- gicompiler = self.interpreter.find_program_impl('g-ir-compiler')
+-
+ girtargets = [self._unwrap_gir_target(arg, state) for arg in args]
+
+ if len(girtargets) > 1 and any([isinstance(el, build.Executable) for el in girtargets]):
+ raise MesonException('generate_gir only accepts a single argument when one of the arguments is an executable')
+
+ self.gir_dep, pkgargs = self._get_gir_dep(state)
++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
++
+
+ ns = kwargs.pop('namespace')
+ nsversion = kwargs.pop('nsversion')
diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
new file mode 100644
index 0000000000..76cc4931d6
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
@@ -0,0 +1,125 @@
+From 4a1d676522d6b56cbe9a45c3b040afaa27d37f78 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Wed, 15 Nov 2017 15:05:01 +0100
+Subject: [PATCH] native_bindir
+
+Some libraries, like QT, have pre-processors that convert their input
+files into something that the cross-compiler can process. We find the
+path of those pre-processors via pkg-config-native instead of
+pkg-config.
+
+This path forces the use of pkg-config-native for host_bins arguments.
+
+There are some discussions upstream to merge this patch, but I presonaly believe
+that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+
+---
+ mesonbuild/dependencies/base.py | 19 +++++++++++--------
+ mesonbuild/dependencies/ui.py | 6 +++---
+ 2 files changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
+index 3c55a56..eb52fd1 100644
+--- a/mesonbuild/dependencies/base.py
++++ b/mesonbuild/dependencies/base.py
+@@ -185,7 +185,7 @@ class Dependency:
+ def get_exe_args(self, compiler):
+ return []
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
+
+ def get_configtool_variable(self, variable_name):
+@@ -248,7 +248,7 @@ class InternalDependency(Dependency):
+ self.sources = sources
+ self.ext_deps = ext_deps
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ raise DependencyException('Method "get_pkgconfig_variable()" is '
+ 'invalid for an internal dependency')
+
+@@ -670,15 +670,18 @@ class PkgConfigDependency(ExternalDependency):
+ return s.format(self.__class__.__name__, self.name, self.is_found,
+ self.version_reqs)
+
+- def _call_pkgbin_real(self, args, env):
+- cmd = self.pkgbin.get_command() + args
++ def _call_pkgbin_real(self, args, env, use_native=False):
++ if use_native:
++ cmd = [self.pkgbin.get_command()[0] + "-native"] + args
++ else:
++ cmd = self.pkgbin.get_command() + args
+ p, out = Popen_safe(cmd, env=env)[0:2]
+ rc, out = p.returncode, out.strip()
+ call = ' '.join(cmd)
+ mlog.debug("Called `{}` -> {}\n{}".format(call, rc, out))
+ return rc, out
+
+- def _call_pkgbin(self, args, env=None):
++ def _call_pkgbin(self, args, env=None, use_native=False):
+ # Always copy the environment since we're going to modify it
+ # with pkg-config variables
+ if env is None:
+@@ -698,7 +701,7 @@ class PkgConfigDependency(ExternalDependency):
+ targs = tuple(args)
+ cache = PkgConfigDependency.pkgbin_cache
+ if (self.pkgbin, targs, fenv) not in cache:
+- cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env)
++ cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env, use_native)
+ return cache[(self.pkgbin, targs, fenv)]
+
+ def _convert_mingw_paths(self, args):
+@@ -926,7 +929,7 @@ class PkgConfigDependency(ExternalDependency):
+ mlog.warning('Could not determine complete list of dependencies for %s' % self.name)
+ self.link_args, self.raw_link_args = self._search_libs(out, out_raw, out_all)
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ options = ['--variable=' + variable_name, self.name]
+
+ if 'define_variable' in kwargs:
+@@ -939,7 +942,7 @@ class PkgConfigDependency(ExternalDependency):
+
+ options = ['--define-variable=' + '='.join(definition)] + options
+
+- ret, out = self._call_pkgbin(options)
++ ret, out = self._call_pkgbin(options, use_native=use_native)
+ variable = ''
+ if ret != 0:
+ if self.required:
+diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
+index 6d784e6..73a9e13 100644
+--- a/mesonbuild/dependencies/ui.py
++++ b/mesonbuild/dependencies/ui.py
+@@ -330,7 +330,7 @@ class QtBaseDependency(ExternalDependency):
+ self.bindir = self.get_pkgconfig_host_bins(core)
+ if not self.bindir:
+ # If exec_prefix is not defined, the pkg-config file is broken
+- prefix = core.get_pkgconfig_variable('exec_prefix', {})
++ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
+ if prefix:
+ self.bindir = os.path.join(prefix, 'bin')
+
+@@ -507,7 +507,7 @@ class Qt4Dependency(QtBaseDependency):
+ applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
+ for application in applications:
+ try:
+- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
++ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
+ except MesonException:
+ pass
+
+@@ -517,7 +517,7 @@ class Qt5Dependency(QtBaseDependency):
+ QtBaseDependency.__init__(self, 'qt5', env, kwargs)
+
+ def get_pkgconfig_host_bins(self, core):
+- return core.get_pkgconfig_variable('host_bins', {})
++ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
+
+ def get_private_includes(self, mod_inc_dir, module):
+ return _qt_get_private_includes(mod_inc_dir, module, self.version)
diff --git a/meta/recipes-devtools/meson/meson/cross-prop-default.patch b/meta/recipes-devtools/meson/meson/cross-prop-default.patch
new file mode 100644
index 0000000000..772395e879
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/cross-prop-default.patch
@@ -0,0 +1,23 @@
+meson.build files that use cc.run() in native builds can silently fallback to
+meson.get_cross_property() in cross builds without an exe-wrapper, but there's
+no way to know that this is happening.
+
+As the defaults may be pessimistic (for example, disabling the support for a
+feature that should be enabled) emit a warning when the default is used, so that
+the recipe can explicitly set the cross property as relevant.
+
+Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
+index 3c3cfae0..10e741ae 100644
+--- a/mesonbuild/interpreter.py
++++ b/mesonbuild/interpreter.py
+@@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject):
+ return props[propname]
+ except Exception:
+ if len(args) == 2:
++ mlog.warning('Cross property %s is using default value %s' % (propname, args[1]))
+ return args[1]
+ raise InterpreterException('Unknown cross property: %s.' % propname)
+
diff --git a/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch b/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch
new file mode 100644
index 0000000000..7ea8a133e6
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch
@@ -0,0 +1,95 @@
+From dbc9e971bd320f3df15c1ee74f54858e6792b183 Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Fri, 11 Oct 2019 11:01:22 -0400
+Subject: [PATCH] Remove duplicated object files in static libraries
+
+When a static library link_whole to a bunch of other static libraries,
+we have to extract all their objects recursively. But that could
+introduce duplicated objects. ar is dumb enough to allow this without
+error, but once the resulting static library is linked into an
+executable or shared library, the linker will complain about duplicated
+symbols.
+
+Upstream-Status: Backport
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+---
+ mesonbuild/backend/backends.py | 3 ++-
+ test cases/unit/69 static link/lib/func17.c | 4 ++++
+ test cases/unit/69 static link/lib/func18.c | 6 ++++++
+ test cases/unit/69 static link/lib/func19.c | 7 +++++++
+ test cases/unit/69 static link/lib/meson.build | 12 ++++++++++++
+ 5 files changed, 31 insertions(+), 1 deletion(-)
+ create mode 100644 test cases/unit/69 static link/lib/func17.c
+ create mode 100644 test cases/unit/69 static link/lib/func18.c
+ create mode 100644 test cases/unit/69 static link/lib/func19.c
+
+diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
+index 947be1cbef..e54809657f 100644
+--- a/mesonbuild/backend/backends.py
++++ b/mesonbuild/backend/backends.py
+@@ -281,7 +281,8 @@ def relpath(self, todir, fromdir):
+ os.path.join('dummyprefixdir', fromdir))
+
+ def flatten_object_list(self, target, proj_dir_to_build_root=''):
+- return self._flatten_object_list(target, target.get_objects(), proj_dir_to_build_root)
++ obj_list = self._flatten_object_list(target, target.get_objects(), proj_dir_to_build_root)
++ return list(dict.fromkeys(obj_list))
+
+ def _flatten_object_list(self, target, objects, proj_dir_to_build_root):
+ obj_list = []
+diff --git a/test cases/unit/69 static link/lib/func17.c b/test cases/unit/69 static link/lib/func17.c
+new file mode 100644
+index 0000000000..d1d8ec498c
+--- /dev/null
++++ b/test cases/unit/69 static link/lib/func17.c
+@@ -0,0 +1,4 @@
++int func17()
++{
++ return 1;
++}
+diff --git a/test cases/unit/69 static link/lib/func18.c b/test cases/unit/69 static link/lib/func18.c
+new file mode 100644
+index 0000000000..c149085ba4
+--- /dev/null
++++ b/test cases/unit/69 static link/lib/func18.c
+@@ -0,0 +1,6 @@
++int func17();
++
++int func18()
++{
++ return func17() + 1;
++}
+diff --git a/test cases/unit/69 static link/lib/func19.c b/test cases/unit/69 static link/lib/func19.c
+new file mode 100644
+index 0000000000..69120e4bf8
+--- /dev/null
++++ b/test cases/unit/69 static link/lib/func19.c
+@@ -0,0 +1,7 @@
++int func17();
++int func18();
++
++int func19()
++{
++ return func17() + func18();
++}
+diff --git a/test cases/unit/69 static link/lib/meson.build b/test cases/unit/69 static link/lib/meson.build
+index 5f04aab6a1..8f95fc4546 100644
+--- a/test cases/unit/69 static link/lib/meson.build
++++ b/test cases/unit/69 static link/lib/meson.build
+@@ -66,3 +66,15 @@ libfunc15 = static_library('func15', 'func15.c',
+ libfunc16 = static_library('func16', 'func16.c',
+ link_with : libfunc15,
+ install : true)
++
++# Verify func17.c.o gets included only once into libfunc19, otherwise
++# func19-shared would failed with duplicated symbol.
++libfunc17 = static_library('func17', 'func17.c',
++ install : false)
++libfunc18 = static_library('func18', 'func18.c',
++ link_with : libfunc17,
++ install : false)
++libfunc19 = static_library('func19', 'func19.c',
++ link_whole : [libfunc17, libfunc18],
++ install : false)
++shared_library('func19-shared', link_whole : [libfunc19])
diff --git a/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch b/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch
new file mode 100644
index 0000000000..4b1fb57dd4
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch
@@ -0,0 +1,26 @@
+We need to allow our rpaths generated through the compiler flags to make it into
+our binaries. Therefore disable the meson manipulations of these unless there
+is a specific directive to do something differently in the project.
+
+RP 2018/11/23
+
+Upstream-Status: Submitted [https://github.com/mesonbuild/meson/issues/2567]
+
+Index: meson-0.47.2/mesonbuild/minstall.py
+===================================================================
+--- meson-0.47.2.orig/mesonbuild/minstall.py
++++ meson-0.47.2/mesonbuild/minstall.py
+@@ -486,8 +486,11 @@ class Installer:
+ printed_symlink_error = True
+ if os.path.isfile(outname):
+ try:
+- depfixer.fix_rpath(outname, install_rpath, final_path,
+- install_name_mappings, verbose=False)
++ if install_rpath:
++ depfixer.fix_rpath(outname, install_rpath, final_path,
++ install_name_mappings, verbose=False)
++ else:
++ print("RPATH changes at install time disabled")
+ except SystemExit as e:
+ if isinstance(e.code, int) and e.code == 0:
+ pass
diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py b/meta/recipes-devtools/meson/meson/meson-setup.py
new file mode 100755
index 0000000000..808e2a062f
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/meson-setup.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python3
+
+import os
+import string
+import sys
+
+class Template(string.Template):
+ delimiter = "@"
+
+class Environ():
+ def __getitem__(self, name):
+ val = os.environ[name]
+ val = ["'%s'" % x for x in val.split()]
+ val = ', '.join(val)
+ val = '[%s]' % val
+ return val
+
+try:
+ sysroot = os.environ['OECORE_NATIVE_SYSROOT']
+except KeyError:
+ print("Not in environment setup, bailing")
+ sys.exit(1)
+
+template_file = os.path.join(sysroot, 'usr/share/meson/meson.cross.template')
+cross_file = os.path.join(sysroot, 'usr/share/meson/%smeson.cross' % os.environ["TARGET_PREFIX"])
+
+with open(template_file) as in_file:
+ template = in_file.read()
+ output = Template(template).substitute(Environ())
+ with open(cross_file, "w") as out_file:
+ out_file.write(output)
diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper
new file mode 100755
index 0000000000..d4ffe60f9a
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/meson-wrapper
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
+ echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2
+fi
+
+# If these are set to a cross-compile path, meson will get confused and try to
+# use them as native tools. Unset them to prevent this, as all the cross-compile
+# config is already in meson.cross.
+unset CC CXX CPP LD AR NM STRIP
+
+exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
+ --cross-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \
+ "$@"
diff --git a/meta/recipes-devtools/meson/meson_0.52.0.bb b/meta/recipes-devtools/meson/meson_0.52.0.bb
new file mode 100644
index 0000000000..897fa148d9
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson_0.52.0.bb
@@ -0,0 +1,3 @@
+include meson.inc
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.52.0.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.52.0.bb
new file mode 100644
index 0000000000..1756f342ce
--- /dev/null
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.52.0.bb
@@ -0,0 +1,66 @@
+include meson.inc
+
+inherit nativesdk
+inherit siteinfo
+
+SRC_URI += "file://meson-setup.py \
+ file://meson-wrapper"
+
+def meson_endian(prefix, d):
+ arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
+ sitedata = siteinfo_data_for_machine(arch, os, d)
+ if "endian-little" in sitedata:
+ return "little"
+ elif "endian-big" in sitedata:
+ return "big"
+ else:
+ bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
+
+# The cross file logic is similar but not identical to that in meson.bbclass,
+# since it's generating for an SDK rather than a cross-compile. Important
+# differences are:
+# - We can't set vars like CC, CXX, etc. yet because they will be filled in with
+# real paths by meson-setup.sh when the SDK is extracted.
+# - Some overrides aren't needed, since the SDK injects paths that take care of
+# them.
+do_install_append() {
+ install -d ${D}${datadir}/meson
+ cat >${D}${datadir}/meson/meson.cross.template <<EOF
+[binaries]
+c = @CC
+cpp = @CXX
+ar = @AR
+nm = @NM
+ld = @LD
+strip = @STRIP
+pkgconfig = 'pkg-config'
+
+[properties]
+needs_exe_wrapper = true
+c_args = @CFLAGS
+c_link_args = @LDFLAGS
+cpp_args = @CPPFLAGS
+cpp_link_args = @LDFLAGS
+
+[host_machine]
+system = '${SDK_OS}'
+cpu_family = '${SDK_ARCH}'
+cpu = '${SDK_ARCH}'
+endian = '${@meson_endian("SDK", d)}'
+EOF
+
+ install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
+ install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+
+ # We need to wrap the real meson with a thin env setup wrapper.
+ mv ${D}${bindir}/meson ${D}${bindir}/meson.real
+ install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson
+}
+
+RDEPENDS_${PN} += "\
+ nativesdk-ninja \
+ nativesdk-python3 \
+ nativesdk-python3-setuptools \
+ "
+
+FILES_${PN} += "${datadir}/meson ${SDKPATHNATIVE}"
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
deleted file mode 100644
index a162eb7d15..0000000000
--- a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 14 Jul 2012 14:14:07 -0700
-Subject: [PATCH] mkelfimage: Fix cross build
-
-Make the tool to be cross compilable, by separating the variables for build
-tools from those for the target. Also modified to obey LDFLAGS.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-
-Upstream-Status: Pending
-
----
- Makefile.conf.in | 3 +++
- configure.ac | 7 +++++--
- linux-i386/Makefile | 2 +-
- linux-ia64/Makefile | 2 +-
- main/Makefile | 4 ++--
- 5 files changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile.conf.in b/Makefile.conf.in
-index 4645e44..dcb6cf2 100644
---- a/Makefile.conf.in
-+++ b/Makefile.conf.in
-@@ -17,6 +17,9 @@ DEFS=@DEFS@
- LIBS=@LIBS@
- HOST_CC=@HOST_CC@
- HOST_CFLAGS=@HOST_CFLAGS@ $(DEFS)
-+CC=@CC@
-+CFLAGS=@CFLAGS@ $(DEFS)
-+LDFLAGS=@LDFLAGS@
-
- I386_CC =@I386_CC@
- I386_LD =@I386_LD@
-diff --git a/configure.ac b/configure.ac
-index 652b952..0f2ac72 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -70,6 +70,9 @@ if test "with_default" != no ; then
- AC_MSG_ERROR([cc not found])
- fi
- eval "${with_default}_CC='$CC'"
-+ if test "x$HOST_CC" = 'x'; then
-+ AC_CHECK_PROG([HOST_CC], [$CC], [$CC], [gcc], [$PATH])
-+ fi
- AC_PROG_CPP
- if test "$CPP" = no; then
- AC_MSG_ERROR([cpp not found])
-@@ -172,8 +175,8 @@ fi
-
- dnl ---Output variables...
-
--HOST_CC=$CC
--HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
-+CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)"
-+HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)"
-
- dnl TODO: figure out how to set these appropriately for compilers other than gcc
- I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
-diff --git a/linux-i386/Makefile b/linux-i386/Makefile
-index 51531d6..7e8aa3c 100644
---- a/linux-i386/Makefile
-+++ b/linux-i386/Makefile
-@@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
-
- $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+ $(CC) $(CFLAGS) -c -g $< -o $@
-
-
- ifdef I386_CC
-diff --git a/linux-ia64/Makefile b/linux-ia64/Makefile
-index 38f5d8c..5df8870 100644
---- a/linux-ia64/Makefile
-+++ b/linux-ia64/Makefile
-@@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile
-
- $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+ $(CC) $(CFLAGS) -c -g $< -o $@
-
- ifdef IA64_CC
-
-diff --git a/main/Makefile b/main/Makefile
-index 403b0a4..cd53613 100644
---- a/main/Makefile
-+++ b/main/Makefile
-@@ -4,11 +4,11 @@ MKELF_OBJS=$(OBJDIR)/main/mkelfImage.o \
-
- $(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-
- $(OBJDIR)/main/mkelfImage.o: main/mkelfImage.c include/mkelfImage.h $(DEPS)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
-+ $(CC) $(CFLAGS) -c $< -o $@
-
- $(OBJDIR)/man/man8/mkelfImage.8: main/mkelfImage.man
- $(MKDIR) -p $(@D)
---
-2.8.0
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch b/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
deleted file mode 100644
index 756a65cd92..0000000000
--- a/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Let makefile find libz and zlib.h by CFLAGS and LDFLAGS.
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Upstream-Status: Pending
----
-diff --git a/configure.ac b/configure.ac
-index d1acc36..6f865b0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -62,7 +62,7 @@ AC_CHECK_PROG([RPM], rpm, rpm, [], [$PATH])
- AC_CHECK_PROG([SED], sed, sed, [], [$PATH])
- AC_CHECK_PROG([FIND], find, find, [], [$PATH])
-
--AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS -lz"]))
-+AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS $LDFLAGS -lz"]))
-
- dnl Find the default programs
- if test "with_default" != no ; then
-@@ -175,7 +175,7 @@ fi
-
- dnl ---Output variables...
-
--HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
-+HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS) $CFLAGS"
-
- dnl TODO: figure out how to set these appropriately for compilers other than gcc
- I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
---
-1.7.10.4
-
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
deleted file mode 100644
index 2bcc8d7bd9..0000000000
--- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Utility for creating ELF boot images for ELF-based Linux kernel images"
-HOMEPAGE = "http://www.coreboot.org/Mkelfimage"
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a"
-
-SRCREV = "686a48a339b3200184c27e7f98d4c03180b2be6c"
-PV = "4.0+git${SRCPV}"
-RECIPE_NO_UPDATE_REASON = "mkelfimage has been removed in coreboot 4.1 release: \
-http://review.coreboot.org/gitweb?p=coreboot.git;a=commit;h=34fc4ab80b507739e2580d490dff67fcfdde11ea"
-
-
-DEPENDS += "zlib"
-
-SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
- file://cross-compile.patch \
- "
-SRC_URI_append_class-native = " \
- file://fix-makefile-to-find-libz.patch \
-"
-
-CLEANBROKEN = "1"
-
-S = "${WORKDIR}/git/util/mkelfImage"
-
-CFLAGS += "-fno-stack-protector"
-CACHED_CONFIGUREVARS += "\
- HOST_CC='${BUILD_CC}' \
- HOST_CFLAGS='${BUILD_CFLAGS}' \
- HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \
-"
-
-inherit autotools-brokensep
-
-do_install_append() {
- rmdir ${D}${datadir}/mkelfImage/elf32-i386
- rmdir ${D}${datadir}/mkelfImage
- chown root:root ${D}/${sbindir}/mkelfImage
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch b/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
index 7d6d62e773..17d9af4de4 100644
--- a/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
+++ b/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
@@ -1,7 +1,7 @@
-From f172101130604e4a9efa5746f4d8d30de99a0fdc Mon Sep 17 00:00:00 2001
+From dcb45256970b15b672d0004533826c94083356e5 Mon Sep 17 00:00:00 2001
From: Yuanjie Huang <yuanjie.huang@windriver.com>
Date: Fri, 17 Apr 2015 14:48:20 +0800
-Subject: [PATCH] avoid failure on symbol provided by application
+Subject: [PATCH 4/6] avoid failure on symbol provided by application
Upstream-Status: Pending
@@ -13,12 +13,13 @@ cannot be provided by libraries. It prevents false alarm on absence
of symbols.
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+
---
src/mklibs | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/mklibs b/src/mklibs
-index c5614ea..b0d9034 100755
+index a3533c0..66b7a09 100755
--- a/src/mklibs
+++ b/src/mklibs
@@ -133,9 +133,9 @@ class Symbol(object):
@@ -31,9 +32,9 @@ index c5614ea..b0d9034 100755
- self.weak, self.library = weak, library
+ self.weak, self.library, self.object = weak, library, object
- # Return undefined symbols in an object as a set of tuples (name, weakness)
- def undefined_symbols(obj):
-@@ -144,6 +144,11 @@ def undefined_symbols(obj):
+ def symbol_is_blacklisted(name):
+ # The ARM Embedded ABI spec states symbols under this namespace as
+@@ -152,6 +152,11 @@ def undefined_symbols(obj):
output = command("mklibs-readelf", "--print-symbols-undefined", obj)
@@ -45,7 +46,7 @@ index c5614ea..b0d9034 100755
result = []
for line in output:
name, weak_string, version_string, library_string = line.split()[:4]
-@@ -160,7 +165,7 @@ def undefined_symbols(obj):
+@@ -171,7 +176,7 @@ def undefined_symbols(obj):
if library_string.lower() != 'none':
library = library_string
@@ -54,7 +55,7 @@ index c5614ea..b0d9034 100755
return result
-@@ -495,12 +500,13 @@ while 1:
+@@ -498,12 +503,13 @@ while 1:
and re.search("^ps_", str(symbol)))
and not (re.search("ld-linux.so.3$", str(symbol)))
and not (re.search("^__gnu_local_gp", str(symbol)))):
@@ -68,8 +69,8 @@ index c5614ea..b0d9034 100755
+ present_symbol_progs = {}
checked_libs = small_libs
checked_libs.extend(available_libs)
- checked_libs.append(ldlib)
-@@ -510,6 +516,12 @@ while 1:
+ checked_libs.append(sysroot + ldlib)
+@@ -513,6 +519,12 @@ while 1:
names = symbol.base_names()
for name in names:
present_symbols[name] = symbol
@@ -82,7 +83,7 @@ index c5614ea..b0d9034 100755
# are we finished?
num_unresolved = 0
-@@ -565,6 +577,14 @@ while 1:
+@@ -568,6 +580,14 @@ while 1:
for name in needed_symbols:
if not name in symbol_provider:
if not needed_symbols[name].weak:
@@ -98,5 +99,5 @@ index c5614ea..b0d9034 100755
else:
lib = symbol_provider[name]
--
-1.8.5.2.233.g932f7e4
+2.16.1
diff --git a/meta/recipes-devtools/mklibs/mklibs-native_0.1.41.bb b/meta/recipes-devtools/mklibs/mklibs-native_0.1.41.bb
deleted file mode 100644
index a5da936128..0000000000
--- a/meta/recipes-devtools/mklibs/mklibs-native_0.1.41.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Shared library optimisation tool"
-DESCRIPTION = "mklibs produces cut-down shared libraries that contain only the routines required by a particular set of executables."
-HOMEPAGE = "https://launchpad.net/mklibs"
-SECTION = "devel"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
-DEPENDS = "python-native"
-
-SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.xz \
- file://ac_init_fix.patch\
- file://fix_STT_GNU_IFUNC.patch\
- file://sysrooted-ldso.patch \
- file://avoid-failure-on-symbol-provided-by-application.patch \
- file://show-GNU-unique-symbols-as-provided-symbols.patch \
- file://fix_cross_compile.patch \
-"
-
-SRC_URI[md5sum] = "6b2979876a611717df3d49e7f9cf291d"
-SRC_URI[sha256sum] = "058c7349f8ec8a03b529c546a95cd6426741bd819f1e1211f499273eb4bf5d89"
-
-inherit autotools gettext native pythonnative
diff --git a/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb b/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb
new file mode 100644
index 0000000000..1784af1f4c
--- /dev/null
+++ b/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Shared library optimisation tool"
+DESCRIPTION = "mklibs produces cut-down shared libraries that contain only the routines required by a particular set of executables."
+HOMEPAGE = "https://launchpad.net/mklibs"
+SECTION = "devel"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/m/mklibs/mklibs_${PV}.tar.xz \
+ file://ac_init_fix.patch\
+ file://fix_STT_GNU_IFUNC.patch\
+ file://sysrooted-ldso.patch \
+ file://avoid-failure-on-symbol-provided-by-application.patch \
+ file://show-GNU-unique-symbols-as-provided-symbols.patch \
+ file://fix_cross_compile.patch \
+"
+
+SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc"
+SRC_URI[sha256sum] = "3af0b6bd35e5b6fc58d8b68827fbae2ff6b7e20dd2b238ccb9b49d84722066c2"
+
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/m/mklibs/"
+
+inherit autotools gettext native
diff --git a/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch b/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch
new file mode 100644
index 0000000000..12707357b2
--- /dev/null
+++ b/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch
@@ -0,0 +1,32 @@
+From 04fbe6ddb5f1e02efbcae3cdf5beb16757a98948 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 10 May 2019 12:58:01 -0700
+Subject: [PATCH] mmc_cmd.c: Use extra braces when initializing subobjects
+
+clang warns with -Werror,-Wmissing-braces, as following error
+| mmc_cmds.c:1886:36: error: suggest braces around initialization of subobject [-Werror,-W
+missing-braces]
+| struct rpmb_frame frame_status = {0};
+| ^
+| {}
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ mmc_cmds.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mmc_cmds.c b/mmc_cmds.c
+index 19a9da1..838e8c3 100644
+--- a/mmc_cmds.c
++++ b/mmc_cmds.c
+@@ -1883,7 +1883,7 @@ static int do_rpmb_op(int fd,
+ u_int16_t rpmb_type;
+ struct mmc_ioc_multi_cmd *mioc;
+ struct mmc_ioc_cmd *ioc;
+- struct rpmb_frame frame_status = {0};
++ struct rpmb_frame frame_status = {{0}};
+
+ if (!frame_in || !frame_out || !out_cnt)
+ return -EINVAL;
diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb b/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 0a8da19e06..0c401c86fa 100644
--- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -4,17 +4,20 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
SRCBRANCH ?= "master"
-SRCREV = "bb779acfc385d135b32a6998c1d1fceef0491400"
+SRCREV = "aef913e31b659462fe6b9320d241676cba97f67b"
-PV = "0.1"
+PV = "0.1+git${SRCPV}"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \
+ file://0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch \
+ "
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
-CFLAGS_append_mips64 = " -D__SANE_USERSPACE_TYPES__"
-CFLAGS_append_mips64n32 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn32 = " -D__SANE_USERSPACE_TYPES__"
do_install() {
install -d ${D}${bindir}
diff --git a/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch b/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
deleted file mode 100644
index 305be5215d..0000000000
--- a/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From e16fa28bc57c29923ab60af2ac343da83e1992d8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Oct 2015 23:51:34 +0000
-Subject: [PATCH] Fix build with musl
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- mkfs.jffs2.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
- recv_image.c | 1 -
- serve_image.c | 1 -
- 3 files changed, 42 insertions(+), 4 deletions(-)
-
-diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
-index f09c0b2..ed2dc43 100644
---- a/mkfs.jffs2.c
-+++ b/mkfs.jffs2.c
-@@ -72,6 +72,7 @@
- #include <byteswap.h>
- #include <crc32.h>
- #include <inttypes.h>
-+#include <limits.h>
-
- #include "rbtree.h"
- #include "common.h"
---
-2.6.1
-
diff --git a/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
deleted file mode 100644
index 7d783e7a5c..0000000000
--- a/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Replace rpmatch() usage with checking first character of line
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- a/include/common.h
-+++ b/include/common.h
-@@ -122,10 +122,12 @@
- }
-
- if (strcmp("\n", line) != 0) {
-- switch (rpmatch(line)) {
-- case 0: ret = false; break;
-- case 1: ret = true; break;
-- case -1:
-+ switch (line[0]) {
-+ case 'N':
-+ case 'n': ret = false; break;
-+ case 'Y':
-+ case 'y': ret = true; break;
-+ default:
- puts("unknown response; please try again");
- continue;
- }
diff --git a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
index 57d6a30d82..5d874d9810 100644
--- a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
+++ b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
@@ -1,8 +1,10 @@
Upstream-Status: Pending
---- /tmp/mkfs.jffs2.c 2009-01-11 15:28:41.000000000 +0100
-+++ git/mkfs.jffs2.c 2009-01-11 15:59:29.000000000 +0100
-@@ -100,6 +100,11 @@
+Index: git/jffsX-utils/mkfs.jffs2.c
+===================================================================
+--- git.orig/jffsX-utils/mkfs.jffs2.c
++++ git/jffsX-utils/mkfs.jffs2.c
+@@ -100,6 +100,11 @@ struct filesystem_entry {
struct rb_node hardlink_rb;
};
@@ -14,7 +16,7 @@ Upstream-Status: Pending
struct rb_root hardlinks;
static int out_fd = -1;
static int in_fd = -1;
-@@ -408,7 +413,7 @@
+@@ -309,7 +314,7 @@ static struct filesystem_entry *recursiv
char *hpath, *tpath;
struct dirent *dp, **namelist;
struct filesystem_entry *entry;
@@ -22,8 +24,8 @@ Upstream-Status: Pending
+ struct ignorepath_entry* element = ignorepath;
if (lstat(hostpath, &sb)) {
- perror_msg_and_die("%s", hostpath);
-@@ -417,6 +422,15 @@
+ sys_errmsg_die("%s", hostpath);
+@@ -318,6 +323,15 @@ static struct filesystem_entry *recursiv
entry = add_host_filesystem_entry(targetpath, hostpath,
sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
@@ -38,8 +40,8 @@ Upstream-Status: Pending
+
n = scandir(hostpath, &namelist, 0, alphasort);
if (n < 0) {
- perror_msg_and_die("opening directory %s", hostpath);
-@@ -1453,6 +1467,7 @@
+ sys_errmsg_die("opening directory %s", hostpath);
+@@ -1359,6 +1373,7 @@ static struct option long_options[] = {
{"root", 1, NULL, 'r'},
{"pagesize", 1, NULL, 's'},
{"eraseblock", 1, NULL, 'e'},
@@ -47,15 +49,15 @@ Upstream-Status: Pending
{"output", 1, NULL, 'o'},
{"help", 0, NULL, 'h'},
{"verbose", 0, NULL, 'v'},
-@@ -1500,6 +1515,7 @@
- " -L, --list-compressors Show the list of the avaiable compressors\n"
+@@ -1409,6 +1424,7 @@ static const char helptext[] =
+ " -L, --list-compressors Show the list of the available compressors\n"
" -t, --test-compression Call decompress and compare with the original (for test)\n"
" -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
+" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
" -o, --output=FILE Output to FILE (default: stdout)\n"
" -l, --little-endian Create a little-endian filesystem\n"
" -b, --big-endian Create a big-endian filesystem\n"
-@@ -1666,6 +1682,7 @@
+@@ -1566,6 +1582,7 @@ int main(int argc, char **argv)
char *compr_name = NULL;
int compr_prior = -1;
int warn_page_size = 0;
@@ -63,7 +65,7 @@ Upstream-Status: Pending
page_size = sysconf(_SC_PAGESIZE);
if (page_size < 0) /* System doesn't know so ... */
-@@ -1676,7 +1693,7 @@
+@@ -1576,7 +1593,7 @@ int main(int argc, char **argv)
jffs2_compressors_init();
while ((opt = getopt_long(argc, argv,
@@ -72,7 +74,7 @@ Upstream-Status: Pending
{
switch (opt) {
case 'D':
-@@ -1700,6 +1717,28 @@
+@@ -1600,6 +1617,28 @@ int main(int argc, char **argv)
warn_page_size = 0; /* set by user, so don't need to warn */
break;
@@ -100,4 +102,4 @@ Upstream-Status: Pending
+
case 'o':
if (out_fd != -1) {
- error_msg_and_die("output filename specified more than once");
+ errmsg_die("output filename specified more than once");
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
deleted file mode 100644
index 05f1629d58..0000000000
--- a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Upstream-Status: Pending
-
-NEON instruction VLD1.64 was used to copy 64 bits data after type
-casting, and they will trigger alignment trap.
-This patch uses memcpy to avoid alignment problem.
-
-Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-
-diff --git a/mkfs.ubifs/key.h b/mkfs.ubifs/key.h
-index d3a02d4..e7e9218 100644
---- a/mkfs.ubifs/key.h
-+++ b/mkfs.ubifs/key.h
-@@ -141,10 +141,12 @@ static inline void data_key_init(union ubifs_key *key, ino_t inum,
- */
- static inline void key_write(const union ubifs_key *from, void *to)
- {
-- 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);
- }
-
-@@ -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)
- {
-- union ubifs_key *t = to;
-+ __le32 x[2];
-+
-+ 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/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
deleted file mode 100644
index 7207cfcb3a..0000000000
--- a/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-Upstream-Status: Pending
-From patchwork Mon Aug 8 08:16:43 2011
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command
-Date: Sun, 07 Aug 2011 22:16:43 -0000
-From: b35362@freescale.com
-X-Patchwork-Id: 108873
-Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com>
-To: <dwmw2@infradead.org>
-Cc: Liu Shuo <b35362@freescale.com>, Artem.Bityutskiy@nokia.com,
- Li Yang <leoli@freescale.com>, linux-mtd@lists.infradead.org
-
-From: Liu Shuo <b35362@freescale.com>
-
-Flash_erase -j should fill discrete freeoob areas with required bytes
-of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill
-the first freeoob area.
-
-The below is the result without this workaround:
-
-JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00004000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00008000 is not formatted. It will be erased
-JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00014000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00018000 is not formatted. It will be erased
-JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00020000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00024000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00028000 is not formatted. It will be erased
-...
-
-Signed-off-by: Liu Shuo <b35362@freescale.com>
-Signed-off-by: Li Yang <leoli@freescale.com>
-
-Updated for the new version
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
----
-v2 : get length of availble freeoob bytes from oobinfo information,
- not use the ioctl ECCGETLAYOUT which is being deprecated.
-
- flash_erase.c | 46 +++++++++++++++++++++++++++++++++++++++-------
- 1 files changed, 39 insertions(+), 7 deletions(-)
-
-diff --git a/flash_erase.c b/flash_erase.c
-index 933373a..4b9d84b 100644
---- a/flash_erase.c
-+++ b/flash_erase.c
-@@ -99,6 +99,7 @@ int main(int argc, char *argv[])
- bool isNAND;
- int error = 0;
- off_t offset = 0;
-+ void *oob_data = NULL;
-
- /*
- * Process user arguments
-@@ -201,15 +202,43 @@ int main(int argc, char *argv[])
- if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0)
- return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device);
-
-+ cleanmarker.totlen = cpu_to_je32(8);
- /* Check for autoplacement */
- if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) {
-- /* Get the position of the free bytes */
-- if (!oobinfo.oobfree[0][1])
-+ struct nand_ecclayout_user ecclayout;
-+ int i, oobavail;
-+
-+ for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++)
-+ oobavail += oobinfo.oobfree[i][1];
-+
-+ if (!oobavail)
- return errmsg(" Eeep. Autoplacement selected and no empty space in oob");
-+
-+ /* Get the position of the free bytes */
- clmpos = oobinfo.oobfree[0][0];
-- clmlen = oobinfo.oobfree[0][1];
-- if (clmlen > 8)
-- clmlen = 8;
-+ clmlen = MIN(oobavail, 8);
-+
-+ if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) {
-+ int left, n, last = 0;
-+ void *cm;
-+
-+ oob_data = malloc(mtd.oob_size);
-+ if (!oob_data)
-+ return -ENOMEM;
-+
-+ memset(oob_data, 0xff, mtd.oob_size);
-+ cm = &cleanmarker;
-+ for (i = 0, left = clmlen; left ; i++) {
-+ n = MIN(left, oobinfo.oobfree[i][1]);
-+ memcpy(oob_data + oobinfo.oobfree[i][0],
-+ cm, n);
-+ left -= n;
-+ cm += n;
-+ last = oobinfo.oobfree[i][0] + n;
-+ }
-+
-+ clmlen = last - clmpos;
-+ }
- } else {
- /* Legacy mode */
- switch (mtd.oob_size) {
-@@ -227,7 +256,6 @@ int main(int argc, char *argv[])
- break;
- }
- }
-- cleanmarker.totlen = cpu_to_je32(8);
- }
- cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4));
- }
-@@ -276,7 +304,8 @@ int main(int argc, char *argv[])
-
- /* write cleanmarker */
- if (isNAND) {
-- if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, &cleanmarker) != 0) {
-+ void *data = oob_data ? oob_data + clmpos : &cleanmarker;
-+ if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, data) != 0) {
- sys_errmsg("%s: MTD writeoob failure", mtd_device);
- continue;
- }
-@@ -291,5 +320,8 @@ int main(int argc, char *argv[])
- show_progress(&mtd, offset, eb, eb_start, eb_cnt);
- bareverbose(!quiet, "\n");
-
-+ if (oob_data)
-+ free(oob_data);
-+
- return 0;
- }
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 8a3afaf62b..810fe40f4e 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -5,39 +5,71 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
-DEPENDS = "zlib lzo e2fsprogs util-linux"
+inherit autotools pkgconfig update-alternatives
-PV = "1.5.2"
+DEPENDS = "zlib e2fsprogs util-linux"
+RDEPENDS_mtd-utils-tests += "bash"
-SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1"
+PV = "2.1.1"
+
+SRCREV = "4443221ce9b88440cd9f5bb78e6fe95621d36c8a"
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://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch \
- file://0001-Fix-build-with-musl.patch \
"
-SRC_URI_append_libc-musl = " file://010-fix-rpmatch.patch "
-
S = "${WORKDIR}/git/"
+EXTRA_OECONF += "--enable-install-tests"
+
# xattr support creates an additional compile-time dependency on acl because
# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
# regardless whether acl is enabled or disabled in the distro should be okay.
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)}"
-PACKAGECONFIG[xattr] = ",,acl,"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs"
+PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
+PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl"
+PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs"
+PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs"
+PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
+
+CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT"
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
+# Use higher priority than corresponding BusyBox-provided applets
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
+ALTERNATIVE_${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
+
+ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
+ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
+ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
+ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
+ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
+ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
+ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
+ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
+ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
+ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
+ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
+ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
+
do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
}
-PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
+PACKAGES =+ "mtd-utils-misc mtd-utils-tests"
+PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "", d)}"
+PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}"
FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
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"
+FILES_mtd-utils-tests = "${libexecdir}/mtd-utils/*"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch b/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch
deleted file mode 100644
index 1f8f8351c4..0000000000
--- a/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 5cc8d1f96ab6d3459e13631d8356f87381562352 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 2 Jun 2016 09:49:44 +0300
-Subject: [PATCH] Continue even if fs size is not divisible by
- sectors-per-track
-
-Filesystem with a size that is not divisible by sectors-per-track is
-not broken or invalid: it might be unoptimized on media where
-heads and cylinders actually matter but that should be it.
-
-Preserve the warning but make mtools continue even if fs size is not
-divisible by sectors-per-track.
-
-Upstream-Status: Submitted [info-mtools@gnu.org]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- init.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/init.c b/init.c
-index c9152e0..4e16a01 100644
---- a/init.c
-+++ b/init.c
-@@ -338,7 +338,6 @@ Stream_t *fs_init(char drive, int mode, int *isRop)
- fprintf(stderr,
- "Add mtools_skip_check=1 to your .mtoolsrc file "
- "to skip this test\n");
-- exit(1);
- }
-
- /* full cylinder buffering */
---
-2.1.4
-
diff --git a/meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch b/meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch
new file mode 100644
index 0000000000..6bb9d6a3da
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch
@@ -0,0 +1,17 @@
+Undefine UNUSED macros with clang
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: mtools-4.0.18/sysincludes.h
+===================================================================
+--- mtools-4.0.18.orig/sysincludes.h
++++ mtools-4.0.18/sysincludes.h
+@@ -101,7 +101,7 @@ typedef void *caddr_t;
+ #if defined __GNUC__ && defined __STDC__
+ /* gcc -traditional doesn't have PACKED, UNUSED and NORETURN */
+ # define PACKED __attribute__ ((packed))
+-# if __GNUC__ == 2 && __GNUC_MINOR__ > 6 || __GNUC__ >= 3
++# if (__GNUC__ == 2 && __GNUC_MINOR__ > 6 || __GNUC__ >= 3) && !defined(__clang__)
+ /* gcc 2.6.3 doesn't have "unused" */ /* mool */
+ # define UNUSED(x) x __attribute__ ((unused));x
+ # define UNUSEDP __attribute__ ((unused))
diff --git a/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
new file mode 100644
index 0000000000..464ccc4ca7
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
@@ -0,0 +1,32 @@
+From 5c24356762bc4274d3ca4930b0bc7754f4ffd19b Mon Sep 17 00:00:00 2001
+From: Ed Bartosh <ed.bartosh@linux.intel.com>
+Date: Tue, 13 Jun 2017 14:55:52 +0300
+Subject: [PATCH] Disabled reading host configs.
+
+Upstream-Status: Inappropriate [native]
+
+Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
+
+---
+ config.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/config.c b/config.c
+index f086883..1c3f9bd 100644
+--- a/config.c
++++ b/config.c
+@@ -701,14 +701,6 @@ void read_config(void)
+ memcpy(devices, const_devices,
+ nr_const_devices*sizeof(struct device));
+
+- (void) ((parse(CONF_FILE,1) |
+- parse(LOCAL_CONF_FILE,1) |
+- parse(SYS_CONF_FILE,1)) ||
+- (parse(OLD_CONF_FILE,1) |
+- parse(OLD_LOCAL_CONF_FILE,1)));
+- /* the old-name configuration files only get executed if none of the
+- * new-name config files were used */
+-
+ homedir = get_homedir();
+ if ( homedir ){
+ strncpy(conf_file, homedir, MAXPATHLEN );
diff --git a/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch b/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch
deleted file mode 100644
index cb454917ff..0000000000
--- a/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- Makefile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 8f9305a..694e837 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -251,6 +251,7 @@ install-scripts: ${DESTDIR}$(bindir)/mtools
- @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
- @for j in $(SCRIPTS) ; do \
- $(INSTALL_SCRIPT) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
-+ $(INSTALL_PROGRAM) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
- echo ${DESTDIR}$(bindir)/$$j ; \
- done
- rm -f ${DESTDIR}$(bindir)/lz
---
-2.0.0
-
diff --git a/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch b/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
index 2e2873a4fa..8ceb0af136 100644
--- a/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
+++ b/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
@@ -1,8 +1,10 @@
Upstream-Status: Inappropriate [licensing]
---- mtools-3.9.9/configure.in.orig 2006-04-14 16:05:54.337655192 -0600
-+++ mtools-3.9.9/configure.in 2006-04-14 16:12:29.736545424 -0600
-@@ -21,6 +21,33 @@
+Index: mtools-4.0.18/configure.in
+===================================================================
+--- mtools-4.0.18.orig/configure.in
++++ mtools-4.0.18/configure.in
+@@ -35,6 +35,33 @@ AC_CANONICAL_SYSTEM
AC_C_CONST
AC_C_INLINE
@@ -36,9 +38,11 @@ Upstream-Status: Inappropriate [licensing]
dnl Check for configuration options
dnl Enable OS/2 extended density format disks
---- mtools-3.9.9/Makefile.in.sav 2006-04-14 15:56:19.000000000 -0600
-+++ mtools-3.9.9/Makefile.in 2006-04-14 16:15:29.315245312 -0600
-@@ -11,10 +11,11 @@
+Index: mtools-4.0.18/Makefile.in
+===================================================================
+--- mtools-4.0.18.orig/Makefile.in
++++ mtools-4.0.18/Makefile.in
+@@ -26,10 +26,11 @@ USERCFLAGS =
USERLDFLAGS =
USERLDLIBS =
@@ -54,7 +58,7 @@ Upstream-Status: Inappropriate [licensing]
# do not edit below this line
-@@ -181,7 +182,7 @@
+@@ -198,7 +199,7 @@ dvi: mtools.dvi
ps: mtools.ps
%.ps: %.dvi
@@ -62,4 +66,4 @@ Upstream-Status: Inappropriate [licensing]
+ $(DVI2PS) -f < $< > $@
pdf: mtools.pdf
- %.pdf: %.texi
+ %.pdf: %.texi sysconfdir.texi
diff --git a/meta/recipes-devtools/mtools/mtools/mtools.patch b/meta/recipes-devtools/mtools/mtools/mtools.patch
deleted file mode 100644
index 15a32088d1..0000000000
--- a/meta/recipes-devtools/mtools/mtools/mtools.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-$NetBSD: patch-aa,v 1.10 2007/08/17 20:55:34 joerg Exp $
-
----
- Makefile.in | 74 ++++++++++++++++++++++++++----------------------------------
- 1 file changed, 33 insertions(+), 41 deletions(-)
-
-Upstream-Status: Inappropriate [licensing]
-
-Index: mtools-3.9.9/Makefile.in
-===================================================================
---- mtools-3.9.9.orig/Makefile.in 2007-10-12 11:18:46.000000000 +0100
-+++ mtools-3.9.9/Makefile.in 2007-10-12 11:28:14.000000000 +0100
-@@ -195,30 +195,22 @@ html: mtools.html mtools_toc.html
-
- # Don't cd, to avoid breaking install-sh references.
- install-info: info
-- $(top_srcdir)/mkinstalldirs $(infodir)
-+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(infodir)
- if test -f mtools.info; then \
- for i in mtools.info*; do \
-- $(INSTALL_DATA) $$i $(infodir)/$$i; \
-+ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/$$i; \
- done; \
- else \
- for i in $(srcdir)/mtools.info*; do \
-- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
-+ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
- done; \
- fi; \
-- if [ -n "$(INSTALL_INFO)" ] ; then \
-- if [ -f $(infodir)/dir.info ] ; then \
-- $(INSTALL_INFO) $(infodir)/mtools.info $(infodir)/dir.info; \
-- fi; \
-- if [ -f $(infodir)/dir ] ; then \
-- $(INSTALL_INFO) $(infodir)/mtools.info $(infodir)/dir; \
-- fi; \
-- fi
-
- uninstall-info:
- cd $(infodir) && rm -f mtools.info*
-
--install: $(bindir)/mtools @BINFLOPPYD@ install-man install-links \
-- $(bindir)/mkmanifest install-scripts install-info
-+install: ${DESTDIR}$(bindir)/mtools ${DESTDIR}$(bindir)/floppyd install-man install-links \
-+ ${DESTDIR}$(bindir)/mkmanifest install-scripts install-info
-
- uninstall: uninstall-bin uninstall-man uninstall-links \
- uninstall-scripts
-@@ -228,52 +220,52 @@ distclean: clean texclean
- maintainer-clean: distclean
-
-
--$(bindir)/floppyd: floppyd
-- $(top_srcdir)/mkinstalldirs $(bindir)
-- $(INSTALL_PROGRAM) floppyd $(bindir)/floppyd
-+${DESTDIR}$(bindir)/floppyd: floppyd
-+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
-+ $(INSTALL_PROGRAM) floppyd ${DESTDIR}$(bindir)/floppyd
-
--$(bindir)/floppyd_installtest: floppyd_installtest
-- $(top_srcdir)/mkinstalldirs $(bindir)
-- $(INSTALL_PROGRAM) floppyd_installtest $(bindir)/floppyd_installtest
-+${DESTDIR}$(bindir)/floppyd_installtest: floppyd_installtest
-+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
-+ $(INSTALL_PROGRAM) floppyd_installtest ${DESTDIR}$(bindir)/floppyd_installtest
-
--$(bindir)/mtools: mtools
-- $(top_srcdir)/mkinstalldirs $(bindir)
-- $(INSTALL_PROGRAM) mtools $(bindir)/mtools
-+${DESTDIR}$(bindir)/mtools: mtools
-+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
-+ $(INSTALL_PROGRAM) mtools ${DESTDIR}$(bindir)/mtools
-
--$(bindir)/mkmanifest: mkmanifest
-- $(top_srcdir)/mkinstalldirs $(bindir)
-- $(INSTALL_PROGRAM) mkmanifest $(bindir)/mkmanifest
-+${DESTDIR}$(bindir)/mkmanifest: mkmanifest
-+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
-+ $(INSTALL_PROGRAM) mkmanifest ${DESTDIR}$(bindir)/mkmanifest
-
- #$(ETCDIR)/mtools: mtools.etc
- # cp mtools.etc $(ETCDIR)/mtools
-
--install-links: $(bindir)/mtools
-+install-links: ${DESTDIR}$(bindir)/mtools
- @for j in $(LINKS); do \
-- rm -f $(bindir)/$$j ; \
-- $(LN_S) mtools $(bindir)/$$j ; \
-- echo $(bindir)/$$j ; \
-+ rm -f ${DESTDIR}$(bindir)/$$j ; \
-+ $(LN_S) mtools ${DESTDIR}$(bindir)/$$j ; \
-+ echo ${DESTDIR}$(bindir)/$$j ; \
- done
-
- ## "z" is the older version of "gz"; the name is just *too* short
--install-scripts: $(bindir)/mtools
-- @$(top_srcdir)/mkinstalldirs $(bindir)
-+install-scripts: ${DESTDIR}$(bindir)/mtools
-+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
- @for j in $(SCRIPTS) ; do \
-- $(INSTALL_PROGRAM) $(srcdir)/scripts/$$j $(bindir)/$$j ; \
-- echo $(bindir)/$$j ; \
-+ $(INSTALL_SCRIPT) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
-+ echo ${DESTDIR}$(bindir)/$$j ; \
- done
-- rm -f $(bindir)/lz
-- $(LN_S) uz $(bindir)/lz
-+ rm -f ${DESTDIR}$(bindir)/lz
-+ $(LN_S) uz ${DESTDIR}$(bindir)/lz
-
- install-man:
-- @$(top_srcdir)/mkinstalldirs $(MAN1DIR)
-+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(MAN1DIR)
- @for j in $(MAN1); do \
-- $(INSTALL_DATA) $(srcdir)/$$j $(MAN1DIR)/$$j ; \
-- echo $(MAN1DIR)/$$j ; \
-+ $(INSTALL_DATA) $(srcdir)/$$j ${DESTDIR}$(MAN1DIR)/$$j ; \
-+ echo ${DESTDIR}$(MAN1DIR)/$$j ; \
- done
-- @$(top_srcdir)/mkinstalldirs $(MAN5DIR)
-+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(MAN5DIR)
- @for j in $(MAN5); do \
-- $(INSTALL_DATA) $(srcdir)/$$j $(MAN5DIR)/$$j ; \
-- echo $(MAN5DIR)/$$j ; \
-+ $(INSTALL_DATA) $(srcdir)/$$j ${DESTDIR}$(MAN5DIR)/$$j ; \
-+ echo ${DESTDIR}$(MAN5DIR)/$$j ; \
- done
-
- uninstall-bin:
diff --git a/meta/recipes-devtools/mtools/mtools/no-x11.patch b/meta/recipes-devtools/mtools/mtools/no-x11.patch
deleted file mode 100644
index 705b62944d..0000000000
--- a/meta/recipes-devtools/mtools/mtools/no-x11.patch
+++ /dev/null
@@ -1,21 +0,0 @@
----
- Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Upstream-Status: Inappropriate [licensing]
-
---- mtools-3.9.9.orig/Makefile.in
-+++ mtools-3.9.9/Makefile.in
-@@ -128,11 +128,11 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
- X_PRE_LIBS = @X_PRE_LIBS@
- CFLAGS = $(CPPFLAGS) $(DEFS) $(MYCFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
- CXXFLAGS = $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
- LINK = $(CC) $(LDFLAGS) $(USERLDFLAGS) @extralibdir@
- ALLLIBS = $(USERLDLIBS) $(MACHDEPLIBS) $(SHLIB) $(LIBS)
--X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lXau -lX11 $(LIBS)
-+X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) $(LIBS)
- X_CCFLAGS = $(X_CFLAGS) $(CFLAGS)
-
- all: mtools $(LINKS) mkmanifest @FLOPPYD@
-
- %.o: %.c
diff --git a/meta/recipes-devtools/mtools/mtools_3.9.9.bb b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
deleted file mode 100644
index 2904ff4f98..0000000000
--- a/meta/recipes-devtools/mtools/mtools_3.9.9.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "Utilities to access MS-DOS disks without mounting them"
-DESCRIPTION = "Mtools is a collection of utilities to access MS-DOS disks from GNU and Unix without mounting them."
-HOMEPAGE = "http://www.gnu.org/software/mtools/"
-SECTION = "optional"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=92b58ec77696788ce278b044d2a8e9d3"
-PR = "r6"
-
-DEPENDS += "virtual/libiconv"
-
-RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
-RRECOMMENDS_${PN}_libc-glibc = "\
- glibc-gconv-ibm437 \
- glibc-gconv-ibm737 \
- glibc-gconv-ibm775 \
- glibc-gconv-ibm851 \
- glibc-gconv-ibm852 \
- glibc-gconv-ibm855 \
- glibc-gconv-ibm857 \
- glibc-gconv-ibm860 \
- glibc-gconv-ibm861 \
- glibc-gconv-ibm862 \
- glibc-gconv-ibm863 \
- glibc-gconv-ibm865 \
- glibc-gconv-ibm866 \
- glibc-gconv-ibm869 \
- "
-SRC_URI[md5sum] = "3e68b857b4e1f3a6521d1dfefbd30a36"
-SRC_URI[sha256sum] = "af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e"
-
-#http://mtools.linux.lu/mtools-${PV}.tar.gz
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/mtools-${PV}.tar.gz \
- file://mtools-makeinfo.patch \
- file://mtools.patch \
- file://no-x11.patch \
- file://fix-broken-lz.patch \
- file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
- "
-
-inherit autotools texinfo
-
-EXTRA_OECONF = "--without-x"
-
-LDFLAGS_append_libc-uclibc = " -liconv "
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[libbsd] = "ac_cv_lib_bsd_main=yes,ac_cv_lib_bsd_main=no,libbsd"
-
-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
deleted file mode 100644
index b0efc9ecfe..0000000000
--- a/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Utilities to access MS-DOS disks without mounting them"
-DESCRIPTION = "Mtools is a collection of utilities to access MS-DOS disks from GNU and Unix without mounting them."
-HOMEPAGE = "http://www.gnu.org/software/mtools/"
-SECTION = "optional"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS += "virtual/libiconv"
-
-RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
-RRECOMMENDS_${PN}_libc-glibc = "\
- glibc-gconv-ibm437 \
- glibc-gconv-ibm737 \
- glibc-gconv-ibm775 \
- glibc-gconv-ibm851 \
- glibc-gconv-ibm852 \
- glibc-gconv-ibm855 \
- glibc-gconv-ibm857 \
- glibc-gconv-ibm860 \
- glibc-gconv-ibm861 \
- glibc-gconv-ibm862 \
- glibc-gconv-ibm863 \
- glibc-gconv-ibm865 \
- glibc-gconv-ibm866 \
- glibc-gconv-ibm869 \
- "
-SRC_URI[md5sum] = "a23646617546bf6ad56f061d8b283c85"
-SRC_URI[sha256sum] = "59e9cf80885399c4f229e5d87e49c0c2bfeec044e1386d59fcd0b0aead6b2f85"
-
-SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
- file://mtools-makeinfo.patch \
- file://no-x11.gplv3.patch \
- file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
- "
-
-
-inherit autotools texinfo
-
-EXTRA_OECONF = "--without-x"
-
-LDFLAGS_append_libc-uclibc = " -liconv "
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[libbsd] = "ac_cv_lib_bsd_main=yes,ac_cv_lib_bsd_main=no,libbsd"
-
-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.23.bb b/meta/recipes-devtools/mtools/mtools_4.0.23.bb
new file mode 100644
index 0000000000..2093d80dba
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools_4.0.23.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Utilities to access MS-DOS disks without mounting them"
+DESCRIPTION = "Mtools is a collection of utilities to access MS-DOS disks from GNU and Unix without mounting them."
+HOMEPAGE = "http://www.gnu.org/software/mtools/"
+SECTION = "optional"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS += "virtual/libiconv"
+
+RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
+RRECOMMENDS_${PN}_libc-glibc = "\
+ glibc-gconv-ibm437 \
+ glibc-gconv-ibm737 \
+ glibc-gconv-ibm775 \
+ glibc-gconv-ibm851 \
+ glibc-gconv-ibm852 \
+ glibc-gconv-ibm855 \
+ glibc-gconv-ibm857 \
+ glibc-gconv-ibm860 \
+ glibc-gconv-ibm861 \
+ glibc-gconv-ibm862 \
+ glibc-gconv-ibm863 \
+ glibc-gconv-ibm865 \
+ glibc-gconv-ibm866 \
+ glibc-gconv-ibm869 \
+ "
+SRC_URI[md5sum] = "1d17b58c53a46b29c7f521d4a55ccef1"
+SRC_URI[sha256sum] = "f188db26751aeb5692a79b2380b440ecc05fd1848a52f869d7ca1193f2ef8ee3"
+
+SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
+ file://mtools-makeinfo.patch \
+ file://no-x11.gplv3.patch \
+ file://clang_UNUSED.patch \
+ "
+
+SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch"
+
+inherit autotools texinfo features_check
+
+EXTRA_OECONF = "--without-x"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libbsd] = "ac_cv_lib_bsd_main=yes,ac_cv_lib_bsd_main=no,libbsd"
+
+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/0001-stdlib-Add-strlcat.patch b/meta/recipes-devtools/nasm/nasm/0001-stdlib-Add-strlcat.patch
new file mode 100644
index 0000000000..d94fd3290e
--- /dev/null
+++ b/meta/recipes-devtools/nasm/nasm/0001-stdlib-Add-strlcat.patch
@@ -0,0 +1,117 @@
+From 8a204171004fa0d7d21389530c744d215e99efb0 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Tue, 19 Nov 2019 12:47:30 -0600
+Subject: [PATCH 1/2] stdlib: Add strlcat
+
+Adds strlcat which can be used to safely concatenate strings
+
+Upstream-Status: Submitted [https://bugzilla.nasm.us/show_bug.cgi?id=3392635]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ Makefile.in | 2 +-
+ configure.ac | 2 ++
+ include/compiler.h | 4 ++++
+ stdlib/strlcat.c | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 50 insertions(+), 1 deletion(-)
+ create mode 100644 stdlib/strlcat.c
+
+diff --git a/Makefile.in b/Makefile.in
+index 32ef3d91..ff7eb447 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -93,7 +93,7 @@ NASM = asm/nasm.$(O)
+ NDISASM = disasm/ndisasm.$(O)
+
+ LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
+- stdlib/strnlen.$(O) stdlib/strrchrnul.$(O) \
++ stdlib/strnlen.$(O) stdlib/strrchrnul.$(O) stdlib/strlcat.$(O) \
+ \
+ nasmlib/ver.$(O) \
+ nasmlib/crc64.$(O) nasmlib/malloc.$(O) nasmlib/errfile.$(O) \
+diff --git a/configure.ac b/configure.ac
+index 38b3b596..b4e88778 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -152,6 +152,7 @@ AC_CHECK_FUNCS([vsnprintf _vsnprintf])
+ AC_CHECK_FUNCS([snprintf _snprintf])
+ AC_CHECK_FUNCS([strlcpy])
+ AC_CHECK_FUNCS([strrchrnul])
++AC_CHECK_FUNCS([strlcat])
+
+ dnl These types are POSIX-specific, and Windows does it differently...
+ AC_CHECK_TYPES([struct _stati64])
+@@ -170,6 +171,7 @@ AC_CHECK_DECLS(strsep)
+ AC_CHECK_DECLS(strlcpy)
+ AC_CHECK_DECLS(strnlen)
+ AC_CHECK_DECLS(strrchrnul)
++AC_CHECK_DECLS(strlcat)
+
+ dnl Check for missing types
+ AC_TYPE_UINTPTR_T
+diff --git a/include/compiler.h b/include/compiler.h
+index 4178c98e..8153d297 100644
+--- a/include/compiler.h
++++ b/include/compiler.h
+@@ -159,6 +159,10 @@ size_t strlcpy(char *, const char *, size_t);
+ char *strrchrnul(const char *, int);
+ #endif
+
++#if !defined(HAVE_STRLCAT) || !HAVE_DECL_STRLCAT
++size_t strlcat(char *, const char *, size_t);
++#endif
++
+ #ifndef __cplusplus /* C++ has false, true, bool as keywords */
+ # ifdef HAVE_STDBOOL_H
+ # include <stdbool.h>
+diff --git a/stdlib/strlcat.c b/stdlib/strlcat.c
+new file mode 100644
+index 00000000..7084d460
+--- /dev/null
++++ b/stdlib/strlcat.c
+@@ -0,0 +1,43 @@
++/*
++ * Copyright (c) 2019 Garmin Ltd. or its subsidiaries
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include "compiler.h"
++
++/*
++ * Concatenate src string to dest of size size. The destination buffer will
++ * have no more than size-1 character when the operation finishes. Always NUL
++ * terminates, unless size == 0 or dest has no NUL terminator. Returns
++ * strlen(initial dest) + strlen(src); if retval >= size, truncation occurred.
++ */
++#ifndef HAVE_STRLCAT
++
++size_t strlcat(char *dest, const char *src, size_t size)
++{
++ size_t n;
++
++ /* find the NULL terminator in dest */
++ for (n = 0; i < size && dest[n] != '\0'; n++)
++ ;
++
++ /* destination was not NULL terminated. Return the initial size */
++ if (n == size)
++ return size;
++
++ return strlcpy(&dest[n], src, size - n) + n;
++}
++
++#endif
++
+--
+2.23.0
+
diff --git a/meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch b/meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch
new file mode 100644
index 0000000000..bbfae2e8a5
--- /dev/null
+++ b/meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch
@@ -0,0 +1,325 @@
+From fa677c1caf6b8192971920cf5c1aa8cb33c74605 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Tue, 19 Nov 2019 13:12:17 -0600
+Subject: [PATCH 2/2] Add --debug-prefix-map option
+
+Adds an option to remap file prefixes in output object files. This is
+analogous to the "-fdebug-prefix-map" option in GCC, and allows files to
+be built in a reproducible manner regardless of the build directory.
+
+Upstream-Status: Submitted [https://bugzilla.nasm.us/show_bug.cgi?id=3392635]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ asm/nasm.c | 28 ++++++++++++++++++++++++++--
+ include/nasmlib.h | 9 +++++++++
+ nasm.txt | 4 ++++
+ nasmlib/filename.c | 20 ++++++++++++++++++++
+ output/outas86.c | 4 +++-
+ output/outcoff.c | 4 ++--
+ output/outelf.c | 8 ++++----
+ output/outieee.c | 2 +-
+ output/outobj.c | 2 +-
+ stdlib/strlcat.c | 2 +-
+ test/elfdebugprefix.asm | 6 ++++++
+ test/performtest.pl | 12 ++++++++++--
+ 12 files changed, 87 insertions(+), 14 deletions(-)
+ create mode 100644 test/elfdebugprefix.asm
+
+diff --git a/asm/nasm.c b/asm/nasm.c
+index 1c5a5fc5..5d45103c 100644
+--- a/asm/nasm.c
++++ b/asm/nasm.c
+@@ -841,7 +841,8 @@ enum text_options {
+ OPT_BEFORE,
+ OPT_LIMIT,
+ OPT_KEEP_ALL,
+- OPT_NO_LINE
++ OPT_NO_LINE,
++ OPT_DEBUG_PREFIX_MAP
+ };
+ struct textargs {
+ const char *label;
+@@ -866,6 +867,7 @@ static const struct textargs textopts[] = {
+ {"limit-", OPT_LIMIT, true, 0},
+ {"keep-all", OPT_KEEP_ALL, false, 0},
+ {"no-line", OPT_NO_LINE, false, 0},
++ {"debug-prefix-map", OPT_DEBUG_PREFIX_MAP, true, 0},
+ {NULL, OPT_BOGUS, false, 0}
+ };
+
+@@ -1217,6 +1219,26 @@ static bool process_arg(char *p, char *q, int pass)
+ case OPT_NO_LINE:
+ pp_noline = true;
+ break;
++ case OPT_DEBUG_PREFIX_MAP: {
++ struct debug_prefix_list *d;
++ char *c;
++ c = strchr(param, '=');
++
++ if (!c) {
++ nasm_error(ERR_NONFATAL | ERR_NOFILE | ERR_USAGE,
++ "option `--%s' must be of the form `BASE=DEST'", p);
++ break;
++ }
++
++ *c = '\0';
++ d = nasm_malloc(sizeof(*d));
++ d->next = debug_prefixes;
++ d->base = nasm_strdup(param);
++ d->dest = nasm_strdup(c + 1);
++ debug_prefixes = d;
++ *c = '=';
++ }
++ break;
+ case OPT_HELP:
+ help(0);
+ exit(0);
+@@ -2010,7 +2032,9 @@ static void help(const char xopt)
+ " --lpostfix str append the given string to all other symbols\n"
+ " --keep-all output files will not be removed even if an error happens\n"
+ " --no-line ignore %%line directives in input\n"
+- " --limit-X val set execution limit X\n");
++ " --limit-X val set execution limit X\n"
++ " --debug-prefix-map base=dest\n"
++ " remap paths starting with 'base' to 'dest' in output files\n");
+
+ for (i = 0; i <= LIMIT_MAX; i++) {
+ printf(" %-15s %s (default ",
+diff --git a/include/nasmlib.h b/include/nasmlib.h
+index e57d0e6d..cf921547 100644
+--- a/include/nasmlib.h
++++ b/include/nasmlib.h
+@@ -195,10 +195,19 @@ int64_t readstrnum(char *str, int length, bool *warn);
+ */
+ int32_t seg_alloc(void);
+
++struct debug_prefix_list {
++ struct debug_prefix_list *next;
++ char *base;
++ char *dest;
++};
++
++extern struct debug_prefix_list *debug_prefixes;
++
+ /*
+ * Add/replace or remove an extension to the end of a filename
+ */
+ const char *filename_set_extension(const char *inname, const char *extension);
++char *filename_debug_remap(char *dest, char const *inname, size_t len);
+
+ /*
+ * Utility macros...
+diff --git a/nasm.txt b/nasm.txt
+index a28202f9..443c06b2 100644
+--- a/nasm.txt
++++ b/nasm.txt
+@@ -147,6 +147,10 @@ OPTIONS
+ Prepend or append (respectively) the given argument to all global or
+ extern variables.
+
++--debug-prefix-map 'BASE=DEST'::
++ Map file names beginning with 'BASE' to 'DEST' when encoding them in
++ output object files.
++
+ SYNTAX
+ ------
+ This man page does not fully describe the syntax of *nasm*'s assembly language,
+diff --git a/nasmlib/filename.c b/nasmlib/filename.c
+index 172ae0bc..fda2be41 100644
+--- a/nasmlib/filename.c
++++ b/nasmlib/filename.c
+@@ -39,6 +39,8 @@
+ #include "nasmlib.h"
+ #include "error.h"
+
++struct debug_prefix_list *debug_prefixes = NULL;
++
+ /*
+ * Add/modify a filename extension, assumed to be a period-delimited
+ * field at the very end of the filename. Returns a newly allocated
+@@ -61,3 +63,21 @@ const char *filename_set_extension(const char *inname, const char *extension)
+
+ return p;
+ }
++
++char *filename_debug_remap(char *dest, char const *in, size_t len)
++{
++ struct debug_prefix_list *d;
++ size_t n;
++
++ for (d = debug_prefixes; d != NULL; d = d->next) {
++ n = strlen(d->base);
++ if (strncmp(in, d->base, n) == 0) {
++ strlcpy(dest, d->dest, len);
++ strlcat(dest, &in[n], len);
++ return dest;
++ }
++ }
++
++ strlcpy(dest, in, len);
++ return dest;
++}
+diff --git a/output/outas86.c b/output/outas86.c
+index 3f9867b9..d5f4f966 100644
+--- a/output/outas86.c
++++ b/output/outas86.c
+@@ -113,6 +113,8 @@ static void as86_sect_write(struct Section *, const uint8_t *,
+
+ static void as86_init(void)
+ {
++ char filename[FILENAME_MAX];
++
+ stext.data = saa_init(1L);
+ stext.datalen = 0L;
+ stext.head = stext.last = NULL;
+@@ -134,7 +136,7 @@ static void as86_init(void)
+ strslen = 0;
+
+ /* as86 module name = input file minus extension */
+- as86_add_string(filename_set_extension(inname, ""));
++ as86_add_string(filename_debug_remap(filename, filename_set_extension(inname, ""), sizeof(filename)));
+ }
+
+ static void as86_cleanup(void)
+diff --git a/output/outcoff.c b/output/outcoff.c
+index a2fd302c..bcf576fb 100644
+--- a/output/outcoff.c
++++ b/output/outcoff.c
+@@ -1070,14 +1070,14 @@ static void coff_symbol(char *name, int32_t strpos, int32_t value,
+
+ static void coff_write_symbols(void)
+ {
+- char filename[18];
++ char filename[19];
+ uint32_t i;
+
+ /*
+ * The `.file' record, and the file name auxiliary record.
+ */
+ coff_symbol(".file", 0L, 0L, -2, 0, 0x67, 1);
+- strncpy(filename, inname, 18);
++ filename_debug_remap(filename, inname, 19);
+ nasm_write(filename, 18, ofile);
+
+ /*
+diff --git a/output/outelf.c b/output/outelf.c
+index de99d076..203b5dc0 100644
+--- a/output/outelf.c
++++ b/output/outelf.c
+@@ -1,5 +1,5 @@
+ /* ----------------------------------------------------------------------- *
+- *
++ *
+ * Copyright 1996-2017 The NASM Authors - All Rights Reserved
+ * See the file AUTHORS included with the NASM distribution for
+ * the specific copyright holders.
+@@ -14,7 +14,7 @@
+ * 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 COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+@@ -315,7 +315,7 @@ elf_directive(enum directive directive, char *value, int pass)
+
+ static void elf_init(void)
+ {
+- strlcpy(elf_module, inname, sizeof(elf_module));
++ filename_debug_remap(elf_module, inname, sizeof(elf_module));
+ sects = NULL;
+ nsects = sectlen = 0;
+ syms = saa_init((int32_t)sizeof(struct elf_symbol));
+@@ -868,7 +868,7 @@ static void elf32_out(int32_t segto, const void *data,
+ " segment base references");
+ } else {
+ if (wrt == NO_SEG) {
+- /*
++ /*
+ * The if() is a hack to deal with compilers which
+ * don't handle switch() statements with 64-bit
+ * expressions.
+diff --git a/output/outieee.c b/output/outieee.c
+index 3a28942d..f61824e4 100644
+--- a/output/outieee.c
++++ b/output/outieee.c
+@@ -209,7 +209,7 @@ static void ieee_unqualified_name(char *, char *);
+ */
+ static void ieee_init(void)
+ {
+- strlcpy(ieee_infile, inname, sizeof(ieee_infile));
++ filename_debug_remap(ieee_infile, inname, sizeof(ieee_infile));
+ any_segs = false;
+ fpubhead = NULL;
+ fpubtail = &fpubhead;
+diff --git a/output/outobj.c b/output/outobj.c
+index b4f2c499..55bba4a1 100644
+--- a/output/outobj.c
++++ b/output/outobj.c
+@@ -640,7 +640,7 @@ static enum directive_result obj_directive(enum directive, char *, int);
+
+ static void obj_init(void)
+ {
+- strlcpy(obj_infile, inname, sizeof(obj_infile));
++ filename_debug_remap(obj_infile, inname, sizeof(obj_infile));
+ first_seg = seg_alloc();
+ any_segs = false;
+ fpubhead = NULL;
+diff --git a/stdlib/strlcat.c b/stdlib/strlcat.c
+index 7084d460..ee93dea3 100644
+--- a/stdlib/strlcat.c
++++ b/stdlib/strlcat.c
+@@ -29,7 +29,7 @@ size_t strlcat(char *dest, const char *src, size_t size)
+ size_t n;
+
+ /* find the NULL terminator in dest */
+- for (n = 0; i < size && dest[n] != '\0'; n++)
++ for (n = 0; n < size && dest[n] != '\0'; n++)
+ ;
+
+ /* destination was not NULL terminated. Return the initial size */
+diff --git a/test/elfdebugprefix.asm b/test/elfdebugprefix.asm
+new file mode 100644
+index 00000000..a67ba29c
+--- /dev/null
++++ b/test/elfdebugprefix.asm
+@@ -0,0 +1,6 @@
++;Testname=unoptimized; Arguments=-O0 --debug-prefix-map elf=ELF -felf -oelfdebugprefix.o; Files=stdout stderr elfdebugprefix.o; Validate=readelf --wide --symbols elfdebugprefix.o | grep 'FILE.*ELFdebugprefix.asm'
++
++ SECTION .text
++test: ; [1]
++ ret
++
+diff --git a/test/performtest.pl b/test/performtest.pl
+index f7865b39..096f9604 100755
+--- a/test/performtest.pl
++++ b/test/performtest.pl
+@@ -42,14 +42,22 @@ sub perform {
+ TEST:
+ while(<TESTFILE>) {
+ #See if there is a test case
+- last unless /Testname=(.*);\s*Arguments=(.*);\s*Files=(.*)/;
+- my ($subname, $arguments, $files) = ($1, $2, $3);
++ last unless /Testname=(.*);\s*Arguments=(.*);\s*Files=([^;]*)(?:;\s*Validate=(.*))?/;
++ my ($subname, $arguments, $files, $validate) = ($1, $2, $3, $4);
++ chomp $files;
+ debugprint("$subname | $arguments | $files");
+
+ #Call nasm with this test case
+ system("$nasm $arguments $testpath > $stdoutfile 2> $stderrfile");
+ debugprint("$nasm $arguments $testpath > $stdoutfile 2> $stderrfile ----> $?");
+
++ if($validate) {
++ if(system("$validate >> $stdoutfile 2>> $stderrfile") != 0) {
++ print "Test $testname/$subname validation failed\n";
++ $globalresult = 1;
++ }
++ }
++
+ #Move the output to the test dir
+ mkpath("$outputdir/$testname/$subname");
+ foreach(split / /,$files) {
+--
+2.23.0
+
diff --git a/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch b/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch
new file mode 100644
index 0000000000..6e3f909d0f
--- /dev/null
+++ b/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch
@@ -0,0 +1,116 @@
+From 3079f7966dbed4497e36d5067cbfd896a90358cb Mon Sep 17 00:00:00 2001
+From: Cyrill Gorcunov <gorcunov@gmail.com>
+Date: Wed, 14 Nov 2018 10:03:42 +0300
+Subject: [PATCH] preproc: Fix malformed parameter count
+
+readnum returns 64bit number which may become
+a negative integer upon conversion which in
+turn lead to out of bound array access.
+
+Fix it by explicit conversion with bounds check
+
+ | POC6:2: error: parameter count `2222222222' is out of bounds [0; 2147483647]
+
+https://bugzilla.nasm.us/show_bug.cgi?id=3392528
+
+Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
+
+Upstream-Status: Backport
+CVE: CVE-2018-19755
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ asm/preproc.c | 43 +++++++++++++++++++++----------------------
+ 1 file changed, 21 insertions(+), 22 deletions(-)
+
+diff --git a/asm/preproc.c b/asm/preproc.c
+index b6afee3..e5ad05a 100644
+--- a/asm/preproc.c
++++ b/asm/preproc.c
+@@ -1650,6 +1650,23 @@ smacro_defined(Context * ctx, const char *name, int nparam, SMacro ** defn,
+ return false;
+ }
+
++/* param should be a natural number [0; INT_MAX] */
++static int read_param_count(const char *str)
++{
++ int result;
++ bool err;
++
++ result = readnum(str, &err);
++ if (result < 0 || result > INT_MAX) {
++ result = 0;
++ nasm_error(ERR_NONFATAL, "parameter count `%s' is out of bounds [%d; %d]",
++ str, 0, INT_MAX);
++ } else if (err) {
++ nasm_error(ERR_NONFATAL, "unable to parse parameter count `%s'", str);
++ }
++ return result;
++}
++
+ /*
+ * Count and mark off the parameters in a multi-line macro call.
+ * This is called both from within the multi-line macro expansion
+@@ -1871,11 +1888,7 @@ static bool if_condition(Token * tline, enum preproc_token ct)
+ pp_directives[ct]);
+ } else {
+ searching.nparam_min = searching.nparam_max =
+- readnum(tline->text, &j);
+- if (j)
+- nasm_error(ERR_NONFATAL,
+- "unable to parse parameter count `%s'",
+- tline->text);
++ read_param_count(tline->text);
+ }
+ if (tline && tok_is_(tline->next, "-")) {
+ tline = tline->next->next;
+@@ -1886,11 +1899,7 @@ static bool if_condition(Token * tline, enum preproc_token ct)
+ "`%s' expects a parameter count after `-'",
+ pp_directives[ct]);
+ else {
+- searching.nparam_max = readnum(tline->text, &j);
+- if (j)
+- nasm_error(ERR_NONFATAL,
+- "unable to parse parameter count `%s'",
+- tline->text);
++ searching.nparam_max = read_param_count(tline->text);
+ if (searching.nparam_min > searching.nparam_max) {
+ nasm_error(ERR_NONFATAL,
+ "minimum parameter count exceeds maximum");
+@@ -2079,8 +2088,6 @@ static void undef_smacro(Context *ctx, const char *mname)
+ */
+ static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
+ {
+- bool err;
+-
+ tline = tline->next;
+ skip_white_(tline);
+ tline = expand_id(tline);
+@@ -2103,11 +2110,7 @@ static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
+ if (!tok_type_(tline, TOK_NUMBER)) {
+ nasm_error(ERR_NONFATAL, "`%s' expects a parameter count", directive);
+ } else {
+- def->nparam_min = def->nparam_max =
+- readnum(tline->text, &err);
+- if (err)
+- nasm_error(ERR_NONFATAL,
+- "unable to parse parameter count `%s'", tline->text);
++ def->nparam_min = def->nparam_max = read_param_count(tline->text);
+ }
+ if (tline && tok_is_(tline->next, "-")) {
+ tline = tline->next->next;
+@@ -2117,11 +2120,7 @@ static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
+ nasm_error(ERR_NONFATAL,
+ "`%s' expects a parameter count after `-'", directive);
+ } else {
+- def->nparam_max = readnum(tline->text, &err);
+- if (err) {
+- nasm_error(ERR_NONFATAL, "unable to parse parameter count `%s'",
+- tline->text);
+- }
++ def->nparam_max = read_param_count(tline->text);
+ if (def->nparam_min > def->nparam_max) {
+ nasm_error(ERR_NONFATAL, "minimum parameter count exceeds maximum");
+ def->nparam_max = def->nparam_min;
+--
+2.10.5.GIT
+
diff --git a/meta/recipes-devtools/nasm/nasm/CVE-2019-14248.patch b/meta/recipes-devtools/nasm/nasm/CVE-2019-14248.patch
new file mode 100644
index 0000000000..d45d2cb465
--- /dev/null
+++ b/meta/recipes-devtools/nasm/nasm/CVE-2019-14248.patch
@@ -0,0 +1,43 @@
+From 93d41d82963b2cfd0b24c906f5a8daf53281b559 Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
+Date: Fri, 16 Aug 2019 01:12:54 -0700
+Subject: [PATCH] BR 3392576: don't segfault on a bad %pragma limit
+
+Don't segfault on a bad %pragma limit. Instead treat a NULL pointer as
+an empty string.
+
+Reported-by: Ren Kimura <rkx1209dev@gmail.com>
+Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
+
+CVE: CVE-2019-14248
+Upstream-Status: Backport [https://repo.or.cz/nasm.git/commit/93d41d82963b2cfd0b24c906f5a8daf53281b559]
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ asm/nasm.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/asm/nasm.c b/asm/nasm.c
+index c84d675..65116ab 100644
+--- a/asm/nasm.c
++++ b/asm/nasm.c
+@@ -212,6 +212,11 @@ nasm_set_limit(const char *limit, const char *valstr)
+ bool rn_error;
+ int errlevel;
+
++ if (!limit)
++ limit = "";
++ if (!valstr)
++ valstr = "";
++
+ for (i = 0; i <= LIMIT_MAX; i++) {
+ if (!nasm_stricmp(limit, limit_info[i].name))
+ break;
+@@ -204,7 +209,7 @@ nasm_set_limit(const char *limit, const char *valstr)
+ errlevel = ERR_WARNING|ERR_NOFILE|ERR_USAGE;
+ else
+ errlevel = ERR_WARNING|ERR_PASS1|WARN_UNKNOWN_PRAGMA;
+- nasm_error(errlevel, "unknown limit: `%s'", limit);
++ nasm_error(errlevel, "invalid limit value: `%s'", valstr);
+ return DIRR_ERROR;
+ }
+
diff --git a/meta/recipes-devtools/nasm/nasm_2.12.02.bb b/meta/recipes-devtools/nasm/nasm_2.12.02.bb
deleted file mode 100644
index 9c4b60f846..0000000000
--- a/meta/recipes-devtools/nasm/nasm_2.12.02.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "General-purpose x86 assembler"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
-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] = "d15843c3fb7db39af80571ee27ec6fad"
-SRC_URI[sha256sum] = "00b0891c678c065446ca59bcee64719d0096d54d6886e6e472aeee2e170ae324"
-
-inherit autotools-brokensep
-
-do_configure_prepend () {
- if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then
- mv ${S}/aclocal.m4 ${S}/acinclude.m4
- fi
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -d ${D}${mandir}/man1
-
- oe_runmake 'INSTALLROOT=${D}' install
-}
-
-BBCLASSEXTEND = "native"
-
-DEPENDS = "groff-native"
diff --git a/meta/recipes-devtools/nasm/nasm_2.14.02.bb b/meta/recipes-devtools/nasm/nasm_2.14.02.bb
new file mode 100644
index 0000000000..f8a8d76e99
--- /dev/null
+++ b/meta/recipes-devtools/nasm/nasm_2.14.02.bb
@@ -0,0 +1,25 @@
+SUMMARY = "General-purpose x86 assembler"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
+
+SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
+ file://CVE-2018-19755.patch \
+ file://CVE-2019-14248.patch \
+ file://0001-stdlib-Add-strlcat.patch \
+ file://0002-Add-debug-prefix-map-option.patch \
+ "
+
+SRC_URI[md5sum] = "3f489aa48ad2aa1f967dc5e293bbd06f"
+SRC_URI[sha256sum] = "34fd26c70a277a9fdd54cb5ecf389badedaf48047b269d1008fbc819b24e80bc"
+
+# brokensep since this uses autoconf but not automake
+inherit autotools-brokensep
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+BBCLASSEXTEND = "native"
+
+DEPENDS = "groff-native"
+
+CVE_PRODUCT = "netwide_assembler"
diff --git a/meta/recipes-devtools/ninja/ninja/fix-musl.patch b/meta/recipes-devtools/ninja/ninja/fix-musl.patch
new file mode 100644
index 0000000000..7fd779110d
--- /dev/null
+++ b/meta/recipes-devtools/ninja/ninja/fix-musl.patch
@@ -0,0 +1,46 @@
+From e92a915183f8bff268f74c8cd00d986301a2bbf8 Mon Sep 17 00:00:00 2001
+From: makepost <makepost@firemail.cc>
+Date: Mon, 24 Dec 2018 03:13:16 +0200
+Subject: [PATCH] Use st_mtim if st_mtime is macro, fix #1510
+
+In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward
+compatibility macro. Should help avoid hardcoding platform detection.
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+
+Upstream-Status: Pending
+---
+ src/disk_interface.cc | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/src/disk_interface.cc b/src/disk_interface.cc
+index d4c2fb0..dc297c4 100644
+--- a/src/disk_interface.cc
++++ b/src/disk_interface.cc
+@@ -202,19 +202,13 @@ TimeStamp RealDiskInterface::Stat(const string& path, string* err) const {
+ // that it doesn't exist.
+ if (st.st_mtime == 0)
+ return 1;
+-#if defined(__APPLE__) && !defined(_POSIX_C_SOURCE)
++#if defined(_AIX)
++ return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n;
++#elif defined(__APPLE__)
+ return ((int64_t)st.st_mtimespec.tv_sec * 1000000000LL +
+ st.st_mtimespec.tv_nsec);
+-#elif (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || \
+- defined(__BIONIC__) || (defined (__SVR4) && defined (__sun)) || defined(__FreeBSD__))
+- // For glibc, see "Timestamp files" in the Notes of http://www.kernel.org/doc/man-pages/online/pages/man2/stat.2.html
+- // newlib, uClibc and musl follow the kernel (or Cygwin) headers and define the right macro values above.
+- // For bsd, see https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h and similar
+- // For bionic, C and POSIX API is always enabled.
+- // For solaris, see https://docs.oracle.com/cd/E88353_01/html/E37841/stat-2.html.
++#elif defined(st_mtime) // A macro, so we're likely on modern POSIX.
+ return (int64_t)st.st_mtim.tv_sec * 1000000000LL + st.st_mtim.tv_nsec;
+-#elif defined(_AIX)
+- return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n;
+ #else
+ return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec;
+ #endif
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/ninja/ninja_1.9.0.bb b/meta/recipes-devtools/ninja/ninja_1.9.0.bb
new file mode 100644
index 0000000000..f1236e8ac8
--- /dev/null
+++ b/meta/recipes-devtools/ninja/ninja_1.9.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Ninja is a small build system with a focus on speed."
+HOMEPAGE = "http://martine.github.com/ninja/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"
+
+DEPENDS = "re2c-native ninja-native"
+
+SRCREV = "b25c08bda4949192c69cea4cee057887341a2ffc"
+
+SRC_URI = "git://github.com/ninja-build/ninja.git;branch=release \
+ file://fix-musl.patch \
+"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
+
+S = "${WORKDIR}/git"
+
+do_configure[noexec] = "1"
+
+do_compile_class-native() {
+ python3 ./configure.py --bootstrap
+}
+
+do_compile() {
+ python3 ./configure.py
+ ninja
+}
+
+do_install() {
+ install -D -m 0755 ${S}/ninja ${D}${bindir}/ninja
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/openjade/openjade-1.3.2/fix-regex.patch b/meta/recipes-devtools/openjade/openjade-1.3.2/fix-regex.patch
deleted file mode 100644
index 6b40afdad8..0000000000
--- a/meta/recipes-devtools/openjade/openjade-1.3.2/fix-regex.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 55f6fd8f1958aa36584eefeecce782a505963c88 Mon Sep 17 00:00:00 2001
-From: benvm <benvm@yow-gmoffatt-lx2.wrs.com>
-Date: Wed, 9 Jan 2013 12:14:06 -0500
-Subject: [PATCH] Fix Makefile regular expression
-
-This patch modifies a regular expression within a Makefile to stop builds
-from failing in the case where the path contains the characters ".a".
-
-Upstream-Status: Submitted
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
----
- Makefile.prog.in | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/Makefile.prog.in b/Makefile.prog.in
-index 76310c9..44c3534 100644
---- a/Makefile.prog.in
-+++ b/Makefile.prog.in
-@@ -12,7 +12,7 @@ LINKFLAGS = @LINKFLAGS@
-
- ALL_LIBS = $(XLIBS) $(LIBS)
- Makefile.lt:
-- echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt
-+ echo 'LT_LIBS='`echo $(ALL_LIBS) | sed 's/\.a\s/\.la /g' | sed s/\.a$$/\.la/` > Makefile.lt
-
- PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@')
-
---
-1.7.0.4
-
diff --git a/meta/recipes-devtools/openjade/openjade-1.3.2/makefile.patch b/meta/recipes-devtools/openjade/openjade-1.3.2/makefile.patch
deleted file mode 100644
index 968b9b47cf..0000000000
--- a/meta/recipes-devtools/openjade/openjade-1.3.2/makefile.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-This patch fixes libtool QA issues with WORKDIR creeping in to
-libospgrove.la and libostyle.la. Patch obtained from OpenEmbedded.
-
-Upstream-Status: Inappropriate [Other]
-Workaround is specific to our build system.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: openjade-1.3.2/spgrove/Makefile.sub
-===================================================================
---- openjade-1.3.2.orig/spgrove/Makefile.sub
-+++ openjade-1.3.2/spgrove/Makefile.sub
-@@ -1,8 +1,8 @@
- LTVERSION=0:1:0
- LIB=ospgrove
- INCLUDE=-I$(srcdir)/../grove
--DEPLIBS=-lm -L$(TOP)/grove -L$(TOP)/grove/.libs \
-- -L$(TOP)/lib -L$(TOP)/lib/.libs \
-+DEPLIBS=-lm $(TOP)/grove \
-+ $(TOP)/lib \
- $(LIB_THREADS)
- OBJS=GroveApp.o GroveBuilder.o SdNode.o
- GENSRCS=grove_inst.cxx
-Index: openjade-1.3.2/style/Makefile.sub
-===================================================================
---- openjade-1.3.2.orig/style/Makefile.sub
-+++ openjade-1.3.2/style/Makefile.sub
-@@ -1,8 +1,8 @@
- LTVERSION=0:1:0
- LIB=ostyle
--DEPLIBS=-lm -L$(TOP)/grove -L$(TOP)/grove/.libs \
-- -L$(TOP)/lib -L$(TOP)/lib/.libs \
-- -L$(TOP)/spgrove -L$(TOP)/spgrove/.libs
-+DEPLIBS=-lm $(TOP)/grove \
-+ $(TOP)/lib \
-+ $(TOP)/spgrove
- OBJS=LangObj.o \
- Collector.o \
- DssslApp.o \
diff --git a/meta/recipes-devtools/openjade/openjade-1.3.2/msggen.pl.patch b/meta/recipes-devtools/openjade/openjade-1.3.2/msggen.pl.patch
deleted file mode 100644
index b47fd4655f..0000000000
--- a/meta/recipes-devtools/openjade/openjade-1.3.2/msggen.pl.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-commit fcc5b94f118495b1a467edcda6c6f631691c3f69
-Author: Dennis Lan <dennis.yxun@gmail.com>
-Date: Tue Jul 3 09:25:42 2012 +0800
-
- openjade: fix undefined Getopts error, use std namespace
-
- Using Gentoo Linux as the build host, it fails without this patch
- Use Getopt::Std in place of getopts.pl.
-
- Upstream-Status: Inappropriate [no upstream]
- Original-Author-By: Mike Gilbert <floppym@gentoo.org>
- Signed-off-by: Dennis Lan <dennis.yxun@gmail.com>
-
-diff --git a/msggen.pl b/msggen.pl
-index 0c33968..2ee3f66 100644
---- a/msggen.pl
-+++ b/msggen.pl
-@@ -4,6 +4,7 @@
- # See the file COPYING for copying permission.
-
- use POSIX;
-+use Getopt::Std;
-
- # Package and version.
- $package = 'openjade';
-@@ -18,8 +19,7 @@ $gen_c = 0;
- undef $opt_l;
- undef $opt_p;
- undef $opt_t;
--do 'getopts.pl';
--&Getopts('l:p:t:');
-+getopts('l:p:t:');
- $module = $opt_l;
- $pot_file = $opt_p;
-
-@@ -72,7 +72,7 @@ while (<DEF>) {
- else {
- $field[0] =~ /^[IWQXE][0-9]$/ || &error("invalid first field");;
- $type[$num] = substr($field[0], 0, 1);
-- $argc = int(substr($field[0], 1, 1));
-+ $argc = substr($field[0], 1, 1);
- }
- $nargs[$num] = $argc;
- $field[1] =~ /^[a-zA-Z_][a-zA-Z0-9_]+$/ || &error("invalid tag");
diff --git a/meta/recipes-devtools/openjade/openjade-1.3.2/no-libtool.patch b/meta/recipes-devtools/openjade/openjade-1.3.2/no-libtool.patch
deleted file mode 100644
index 2f57c000f6..0000000000
--- a/meta/recipes-devtools/openjade/openjade-1.3.2/no-libtool.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-The openjade build is fairly unique in auto-generating explicit dependencies to
-installed .la files. As some distributions may delete these files unless
-clearly required, change the Makefile fragment to depend on the .so instead.
-
-Patch originally by Phil Blundell <philb@brightsign.biz>.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Upstream-Status: Inappropriate
-
---- openjade-1.3.2/Makefile.prog.in~ 2013-05-14 11:42:02.646782318 +0100
-+++ openjade-1.3.2/Makefile.prog.in 2013-05-14 11:54:55.051728343 +0100
-@@ -12,7 +12,7 @@
-
- ALL_LIBS = $(XLIBS) $(LIBS)
- Makefile.lt:
-- echo 'LT_LIBS='`echo $(ALL_LIBS) | sed 's/\.a\s/\.la /g' | sed s/\.a$$/\.la/` > Makefile.lt
-+ echo 'LT_LIBS='`for d in $(ALL_LIBS); do case $$d in ../*) echo $$d | sed s/\.a$$/.la/g ;; *) echo $$d | sed s/\.a$$/.so/g ;; esac ; done` >Makefile.lt
-
- PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@')
-
diff --git a/meta/recipes-devtools/openjade/openjade-1.3.2/reautoconf.patch b/meta/recipes-devtools/openjade/openjade-1.3.2/reautoconf.patch
deleted file mode 100644
index 1a23a4a685..0000000000
--- a/meta/recipes-devtools/openjade/openjade-1.3.2/reautoconf.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Ensure we reautoconf the packag
-
-Currently since configure.in in is in a subdirectory, we don't reautoconf the
-recipe. We really need to do this, to update things like the libtool script used
-and fix various issues such as those that could creep in if a reautoconf is
-triggered for some reason. Since this source only calls AM_INIT_AUTOMAKE to
-gain the PACKAGE and VERSION definitions and that macro now errors if Makefile.am
-doesn't exist, we need to add these definitions manually.
-
-These changes avoid failures like:
-----
-| ...
-| DssslApp.cxx:117:36: error: 'PACKAGE' was not declared in this scope
-| DssslApp.cxx:118:36: error: 'VERSION' was not declared in this scope
-| make[2]: *** [DssslApp.lo] Error 1 ----
-
-Upstream-Status: Pending
-
-RP 2012/6/12
-
-Index: openjade-1.3.2/acinclude.m4
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openjade-1.3.2/acinclude.m4 2012-06-12 12:48:54.871365344 +0000
-@@ -0,0 +1,39 @@
-+dnl Configure-time switch with default
-+dnl
-+dnl Each switch defines an --enable-FOO and --disable-FOO option in
-+dnl the resulting configure script.
-+dnl
-+dnl Usage:
-+dnl smr_SWITCH(name, description, default, pos-def, neg-def)
-+dnl
-+dnl where:
-+dnl
-+dnl name name of switch; generates --enable-name & --disable-name
-+dnl options
-+dnl description help string is set to this prefixed by "enable" or
-+dnl "disable", whichever is the non-default value
-+dnl default either "on" or "off"; specifies default if neither
-+dnl --enable-name nor --disable-name is specified
-+dnl pos-def a symbol to AC_DEFINE if switch is on (optional)
-+dnl neg-def a symbol to AC_DEFINE if switch is off (optional)
-+dnl
-+AC_DEFUN(smr_SWITCH, [
-+ AC_MSG_CHECKING(whether to enable $2)
-+ AC_ARG_ENABLE(
-+ $1,
-+ ifelse($3, on,
-+ [ --disable-[$1] disable [$2]],
-+ [ --enable-[$1] enable [$2]]),
-+ [ if test "$enableval" = yes; then
-+ AC_MSG_RESULT(yes)
-+ ifelse($4, , , AC_DEFINE($4))
-+ else
-+ AC_MSG_RESULT(no)
-+ ifelse($5, , , AC_DEFINE($5))
-+ fi ],
-+ ifelse($3, on,
-+ [ AC_MSG_RESULT(yes)
-+ ifelse($4, , , AC_DEFINE($4)) ],
-+ [ AC_MSG_RESULT(no)
-+ ifelse($5, , , AC_DEFINE($5))]))])
-+
-Index: openjade-1.3.2/config/configure.in
-===================================================================
---- openjade-1.3.2.orig/config/configure.in 2012-06-12 12:47:20.735365445 +0000
-+++ openjade-1.3.2/config/configure.in 2012-06-12 12:48:17.507364080 +0000
-@@ -12,9 +12,12 @@
- dnl Credits: this autoconf script was largely "inspired" <g> by the
- dnl autoconf script around SP made by Henry Thompson.
- dnl
--AC_INIT(dsssl)
-+AC_INIT([openjade], [1.3.2])
- AC_CONFIG_AUX_DIR(config)
--AM_INIT_AUTOMAKE( openjade, 1.3.2)
-+AC_SUBST([PACKAGE], [openjade])
-+AC_SUBST([VERSION], [1.3.2])
-+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-+AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
- TOP=`pwd`
- AC_SUBST(TOP)
- dnl
diff --git a/meta/recipes-devtools/openjade/openjade-1.3.2/user-declared-default-constructor.patch b/meta/recipes-devtools/openjade/openjade-1.3.2/user-declared-default-constructor.patch
deleted file mode 100644
index 073af46fc5..0000000000
--- a/meta/recipes-devtools/openjade/openjade-1.3.2/user-declared-default-constructor.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-In GCC 4.6 the compiler no longer allows objects of const-qualified type to
-be default initialized unless the type has a user-declared default
-constructor.
-
-Patch from Gentoo bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=358021
-
-Gentoo Bugzilla description follows:
-"If a class or struct has no user-defined default constructor, C++ doesn't
-allow you to default construct a const instance of it.
-
-https://bugs.gentoo.org/358021
-http://clang.llvm.org/compatibility.html#default_init_const
-http://gcc.gnu.org/PR44499"
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- a/jade/TeXFOTBuilder.cxx
-+++ b/jade/TeXFOTBuilder.cxx
-@@ -88,6 +88,8 @@ public:
- value.convertString(nic_.placement);
- }
- ExtensionFlowObj *copy() const { return new PageFloatFlowObj(*this); }
-+ public:
-+ PageFloatFlowObj() {}
- private:
- PageFloatNIC nic_;
- StringC name_;
-@@ -101,6 +103,8 @@ public:
- fotb.endPageFootnote();
- }
- ExtensionFlowObj *copy() const { return new PageFootnoteFlowObj(*this); }
-+ public:
-+ PageFootnoteFlowObj() {}
- private:
- };
- //////////////////////////////////////////////////////////////////////
---- a/jade/TransformFOTBuilder.cxx
-+++ b/jade/TransformFOTBuilder.cxx
-@@ -41,6 +41,7 @@ public:
- };
- class EntityRefFlowObj : public TransformExtensionFlowObj {
- public:
-+ EntityRefFlowObj() {}
- void atomic(TransformFOTBuilder &fotb, const NodePtr &) const {
- fotb.entityRef(name_);
- }
-@@ -56,6 +57,7 @@ public:
- };
- class ProcessingInstructionFlowObj : public TransformExtensionFlowObj {
- public:
-+ ProcessingInstructionFlowObj() {}
- void atomic(TransformFOTBuilder &fotb, const NodePtr &) const {
- fotb.processingInstruction(data_);
- }
-@@ -98,6 +100,8 @@ public:
- }
- }
- ExtensionFlowObj *copy() const { return new EmptyElementFlowObj(*this); }
-+ public:
-+ EmptyElementFlowObj() {}
- private:
- ElementNIC nic_;
- };
-@@ -133,6 +137,8 @@ public:
- }
- }
- ExtensionFlowObj *copy() const { return new ElementFlowObj(*this); }
-+ public:
-+ ElementFlowObj() {}
- private:
- ElementNIC nic_;
- };
-@@ -150,6 +156,8 @@ public:
- value.convertString(systemId_);
- }
- ExtensionFlowObj *copy() const { return new EntityFlowObj(*this); }
-+ public:
-+ EntityFlowObj() {}
- private:
- StringC systemId_;
- };
-@@ -174,6 +182,8 @@ public:
- }
- }
- ExtensionFlowObj *copy() const { return new DocumentTypeFlowObj(*this); }
-+ public:
-+ DocumentTypeFlowObj() {}
- private:
- DocumentTypeNIC nic_;
- };
diff --git a/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb b/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
deleted file mode 100644
index 8b15b0c7ec..0000000000
--- a/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
+++ /dev/null
@@ -1,121 +0,0 @@
-SUMMARY = "Tools for working with DSSSL stylesheets for SGML and XML documents"
-DESCRIPTION = "OpenJade is a suite of tools for validating, \
-processing, and applying DSSSL (Document Style Semantics and \
-Specification Language) stylesheets to SGML and XML documents."
-HOMEPAGE = "http://openjade.sourceforge.net"
-SECTION = "base"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=641ff1e4511f0a87044ad42f87cb1045"
-
-PR = "r5"
-
-DEPENDS = "opensp-native sgml-common-native"
-RDEPENDS_${PN} = "sgml-common-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/openjade/openjade-${PV}.tar.gz \
- file://makefile.patch \
- file://msggen.pl.patch \
- file://reautoconf.patch \
- file://user-declared-default-constructor.patch \
- file://fix-regex.patch \
- file://no-libtool.patch"
-
-SRC_URI[md5sum] = "7df692e3186109cc00db6825b777201e"
-SRC_URI[sha256sum] = "1d2d7996cc94f9b87d0c51cf0e028070ac177c4123ecbfd7ac1cb8d0b7d322d1"
-
-UPSTREAM_CHECK_URI = "http://openjade.sourceforge.net/download.html"
-
-inherit autotools-brokensep native
-
-# Statically link local libs to avoid gold link issue [YOCTO #2972]
-PACKAGECONFIG ?= "static-only-libs"
-PACKAGECONFIG[static-only-libs] = "--enable-static --disable-shared,--enable-static --enable-shared,,"
-
-EXTRA_OECONF = "--enable-spincludedir=${STAGING_INCDIR}/OpenSP \
- --enable-splibdir=${STAGING_LIBDIR}"
-
-# We need to set datadir explicitly, but adding it to EXTRA_OECONF
-# results in it being specified twice when configure is run.
-CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--datadir=${datadir}', '--datadir=${STAGING_DATADIR}/sgml/openjade-${PV}')}"
-
-# CONFIGUREOPTS has hard coded paths so we need to ignore it's vardeps
-# there are other bits in there too but they are picked up by other variable
-# dependencies so it all works out
-oe_runconf[vardepsexclude] += "CONFIGUREOPTS"
-
-CFLAGS =+ "-I${S}/include"
-CXXFLAGS += "-fno-tree-dse"
-
-SSTATEPOSTINSTFUNCS += "openjade_sstate_postinst"
-SYSROOT_PREPROCESS_FUNCS += "openjade_sysroot_preprocess"
-
-# configure.in needs to be reloacted to trigger reautoconf
-do_extraunpack () {
- cp ${S}/config/configure.in ${S}/
-}
-addtask extraunpack after do_patch before do_configure
-
-# We need to do this else the source interdependencies aren't generated and
-# build failures can result (e.g. zero size style/Makefile.dep file)
-do_compile_prepend () {
- oe_runmake depend
-}
-
-do_install() {
- # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/openjade.html
- # for details.
- install -d ${D}${bindir} ${D}${libdir}
- if ${@bb.utils.contains('PACKAGECONFIG', 'static-only-libs', 'true', 'false', d)}; then
- install -m 0755 jade/openjade ${D}${bindir}/openjade
- oe_libinstall -a -C style libostyle ${D}${libdir}
- oe_libinstall -a -C spgrove libospgrove ${D}${libdir}
- oe_libinstall -a -C grove libogrove ${D}${libdir}
- else
- install -m 0755 jade/.libs/openjade ${D}${bindir}/openjade
- oe_libinstall -a -so -C style libostyle ${D}${libdir}
- oe_libinstall -a -so -C spgrove libospgrove ${D}${libdir}
- oe_libinstall -a -so -C grove libogrove ${D}${libdir}
- fi
- ln -sf openjade ${D}${bindir}/jade
-
- install -d ${D}${datadir}/sgml/openjade-${PV}
- install -m 644 dsssl/catalog ${D}${datadir}/sgml/openjade-${PV}
- install -m 644 dsssl/*.dtd ${D}${datadir}/sgml/openjade-${PV}
- install -m 644 dsssl/*.dsl ${D}${datadir}/sgml/openjade-${PV}
- install -m 644 dsssl/*.sgm ${D}${datadir}/sgml/openjade-${PV}
-
- install -d ${datadir}/sgml/openjade-${PV}
- install -m 644 dsssl/catalog ${datadir}/sgml/openjade-${PV}/catalog
-
- install -d ${D}${sysconfdir}/sgml
- echo "CATALOG ${datadir}/sgml/openjade-${PV}/catalog" > \
- ${D}${sysconfdir}/sgml/openjade-${PV}.cat
-}
-
-openjade_sstate_postinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is installed from sstate cache.
- ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade \
- --add ${sysconfdir}/sgml/sgml-docbook.bak \
- ${sysconfdir}/sgml/openjade-${PV}.cat
- ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade \
- --add ${sysconfdir}/sgml/sgml-docbook.cat \
- ${sysconfdir}/sgml/openjade-${PV}.cat
- cat << EOF > ${SSTATE_INST_POSTRM}
-#!/bin/sh
-# Ensure that the catalog file sgml-docbook.cat is properly
-# updated when the package is removed from sstate cache.
-files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
-for f in \$files; do
- [ ! -f \$f ] || sed -i '/\/sgml\/openjade-${PV}.cat/d' \$f
-done
-EOF
- fi
-}
-
-openjade_sysroot_preprocess () {
- install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
- install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade
-}
diff --git a/meta/recipes-devtools/opensp/opensp-1.5.2/obsolete_automake_macros.patch b/meta/recipes-devtools/opensp/opensp-1.5.2/obsolete_automake_macros.patch
deleted file mode 100644
index 42218a6d68..0000000000
--- a/meta/recipes-devtools/opensp/opensp-1.5.2/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Submitted [https://sourceforge.net/tracker/?func=detail&aid=3599291&group_id=2115&atid=102115]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd OpenSP-1.5.2/configure.in OpenSP-1.5.2/configure.in
---- OpenSP-1.5.2/configure.in 2005-12-23 16:15:21.000000000 +0200
-+++ OpenSP-1.5.2/configure.in 2013-01-03 09:04:51.922645689 +0200
-@@ -16,7 +16,7 @@
- AM_INIT_AUTOMAKE(OpenSP, 1.5.2, no-define)
- AM_MAINTAINER_MODE
- AC_PREREQ(2.53)
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
- AM_SANITY_CHECK
-
- dnl Autoheader definitions
diff --git a/meta/recipes-devtools/opensp/opensp_1.5.2.bb b/meta/recipes-devtools/opensp/opensp_1.5.2.bb
deleted file mode 100644
index 60a7d2e47e..0000000000
--- a/meta/recipes-devtools/opensp/opensp_1.5.2.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "An SGML parser"
-DESCRIPTION = "An SGML parser used by the OpenJade suite of utilities."
-HOMEPAGE = "http://openjade.sourceforge.net"
-SECTION = "libs"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=641ff1e4511f0a87044ad42f87cb1045"
-
-PR = "r1"
-
-# At -Os it encounters calls to some inline functions which are then
-# not found in any other objects with gcc 4.5
-FULL_OPTIMIZATION += "-O2"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/openjade/OpenSP-${PV}.tar.gz \
- file://obsolete_automake_macros.patch \
-"
-
-SRC_URI[md5sum] = "670b223c5d12cee40c9137be86b6c39b"
-SRC_URI[sha256sum] = "57f4898498a368918b0d49c826aa434bb5b703d2c3b169beb348016ab25617ce"
-
-S = "${WORKDIR}/OpenSP-${PV}"
-
-inherit autotools gettext
-
-EXTRA_OECONF = "--disable-doc-build"
-
-EXTRA_OECONF_class-native = "\
- --disable-doc-build \
- --enable-default-catalog=${sysconfdir}/sgml/catalog \
- --enable-default-search-path=${datadir}/sgml \
- "
-
-do_install_append() {
- # Set up symlinks to often-used alternate names. See
- # http://www.linuxfromscratch.org/blfs/view/stable/pst/opensp.html
- cd ${D}${libdir}
- ln -sf libosp.so libsp.so
-
- cd ${D}${bindir}
- for util in nsgmls sgmlnorm spam spcat spent sx; do
- ln -sf o$util $util
- done
- ln -sf osx sgml2xml
-}
-
-do_install_append_class-native() {
- for util in nsgmls sgmlnorm spam spcat spent sx; do
- create_cmdline_wrapper ${D}/${bindir}/$util \
- -D ${sysconfdir}/sgml
- done
-}
-
-FILES_${PN} += "${datadir}/OpenSP/"
-
-BBCLASSEXTEND = "native"
-
-# http://errors.yoctoproject.org/Errors/Details/20489/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch
new file mode 100644
index 0000000000..691ed50c2b
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch
@@ -0,0 +1,113 @@
+From d42b23f4fb5d6bd58e92e995fe5befc76efbae0c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 27 Apr 2017 15:47:58 +0300
+Subject: [PATCH] Switch all scripts to use Python 3.x
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ makePackage | 2 +-
+ opkg-compare-indexes | 2 +-
+ opkg-graph-deps | 2 +-
+ opkg-list-fields | 2 +-
+ opkg-make-index | 2 +-
+ opkg-show-deps | 2 +-
+ opkg-unbuild | 2 +-
+ opkg-update-index | 2 +-
+ opkg.py | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/makePackage b/makePackage
+index 4bdfc56..02124dd 100755
+--- a/makePackage
++++ b/makePackage
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+
+ # The general algorithm this program follows goes like this:
+ # Run tar to extract control from control.tar.gz from the package.
+diff --git a/opkg-compare-indexes b/opkg-compare-indexes
+index b60d20a..80c1263 100755
+--- a/opkg-compare-indexes
++++ b/opkg-compare-indexes
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-graph-deps b/opkg-graph-deps
+index 6653fd5..f1e376a 100755
+--- a/opkg-graph-deps
++++ b/opkg-graph-deps
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-list-fields b/opkg-list-fields
+index c14a90f..24f7955 100755
+--- a/opkg-list-fields
++++ b/opkg-list-fields
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-make-index b/opkg-make-index
+index 3f757f6..2988f9f 100755
+--- a/opkg-make-index
++++ b/opkg-make-index
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ Utility to create opkg compatible indexes
+ """
+
+diff --git a/opkg-show-deps b/opkg-show-deps
+index 153f21e..4e18b4f 100755
+--- a/opkg-show-deps
++++ b/opkg-show-deps
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-unbuild b/opkg-unbuild
+index 4f36bec..57642c9 100755
+--- a/opkg-unbuild
++++ b/opkg-unbuild
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-update-index b/opkg-update-index
+index 341c1c2..7bff8a1 100755
+--- a/opkg-update-index
++++ b/opkg-update-index
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+
+ import sys, os
+diff --git a/opkg.py b/opkg.py
+index 2ecac8a..7e64de4 100644
+--- a/opkg.py
++++ b/opkg.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Copyright (C) 2001 Alexander S. Guy <a7r@andern.org>
+ # Andern Research Labs
+ #
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch
new file mode 100644
index 0000000000..a181169d47
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch
@@ -0,0 +1,44 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 59da5577bf8df441c6ca958e50fcb83228702764 Mon Sep 17 00:00:00 2001
+From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Date: Thu, 12 Sep 2019 10:24:58 -0500
+Subject: [PATCH] opkg-build: clamp mtimes to SOURCE_DATE_EPOCH
+
+For reproducible builds, clamp mtimes bigger than SOURCE_DATE_EPOCH to
+SOURCE_DATE_EPOCH (build generated files, usually).
+
+Fixes bugzilla 13450
+
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ opkg-build | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/opkg-build b/opkg-build
+index dcd2d68..2517a2b 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -297,9 +297,16 @@ mkdir $tmp_dir
+
+ build_date="${SOURCE_DATE_EPOCH:-$(date +%s)}"
+
++mtime_args=""
++# --clamp-mtime requires tar > 1.28. Only use it if SOURCE_DATE_EPOCH is set, to avoid having a generic case dependency on tar > 1.28.
++# this setting will make sure files generated at build time have consistent mtimes, for reproducible builds.
++if [ ! -z "$SOURCE_DATE_EPOCH" ]; then
++ mtime_args="--mtime=@$build_date --clamp-mtime"
++fi
++
+ ( cd $pkg_dir/$CONTROL && find . -type f > $tmp_dir/control_list )
+ ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -print > $tmp_dir/file_list )
+-( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion $mtime_args -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+ ( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --no-recursion --mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/file_list
+ rm $tmp_dir/control_list
+--
+2.20.1
+
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch
new file mode 100644
index 0000000000..55ddcc1fd2
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch
@@ -0,0 +1,31 @@
+We need opkg-build to fail if for example the tar command is passed invalid
+options. Without this, we see silently created empty packaged where data.tar
+is zero bytes in size. This creates hard to debug problems.
+
+An example is when reproducible builds are enabled and run on old hosts like
+centos7 which has tar < 1.28:
+
+Subprocess output:tar: unrecognized option '--clamp-mtime'
+Try `tar --help' or `tar --usage' for more information.
+
+Upstream-Status: Pending
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: opkg-utils-0.4.1/opkg-build
+===================================================================
+--- opkg-utils-0.4.1.orig/opkg-build
++++ opkg-utils-0.4.1/opkg-build
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ : <<=cut
+ =head1 NAME
+@@ -12,6 +12,7 @@ opkg-build - construct an .opk from a di
+ # Updated to work on Familiar Pre0.7rc1, with busybox tar.
+ # Note it Requires: binutils-ar (since the busybox ar can't create)
+ set -e
++set -o pipefail
+
+ version=1.0
+
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
deleted file mode 100644
index 4dddb08c96..0000000000
--- a/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-If a the number of hard links decreases or increases while creating
-the tar files used for an ipk package, tar fails with error code 1:
-
-| DEBUG: Executing python function do_package_ipk
-| tar: ./usr/src/debug/gperf/3.0.4-r0/gperf-3.0.4/src/main.cc: file changed as we read it
-NOTE: recipe gperf-3.0.4-r0: task do_package_write_ipk: Failed
-ERROR: Task 6539 (recipes-extended/gperf/gperf_3.0.4.bb, do_package_write_ipk) failed with exit code '1'
-
-
-We detect if the error code produced by tar is 1 and in this case ignore it.
-
-This a similar behavior to the one on dpkg:
-http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40731942515ec8d80c727ad561174986d4f05818
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-
-Index: git/opkg-build
-===================================================================
---- git.orig/opkg-build
-+++ git/opkg-build
-@@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
- mkdir $tmp_dir
-
- echo $CONTROL > $tmp_dir/tarX
--( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . )
--( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . )
-+
-+
-+# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
-+rc=0
-+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . ) || rc=$?
-+if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
-+ exit $rc
-+fi
-+
-+rc=0
-+( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
-+if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
-+ exit $rc
-+fi
-+
- rm $tmp_dir/tarX
-
- echo "2.0" > $tmp_dir/debian-binary
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb
new file mode 100644
index 0000000000..eb6c7a3a6a
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb
@@ -0,0 +1,67 @@
+SUMMARY = "Additional utilities for the opkg package manager"
+SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system"
+SECTION = "base"
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35"
+PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
+
+SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
+ file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
+ file://0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch \
+ file://pipefail.patch \
+"
+UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
+
+
+SRC_URI[md5sum] = "8c140f835b694a0c27cfb23d2426a02b"
+SRC_URI[sha256sum] = "9ea9efdd9fe13661ad251e3a2860c1c93045adcfaa6659c3e86d9748ecda3b6e"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+RDEPENDS_${PN} += "bash"
+
+# For native builds we use the host Python
+PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold"
+PYTHONRDEPS_class-native = ""
+
+PACKAGECONFIG = "python update-alternatives"
+PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
+PACKAGECONFIG[update-alternatives] = ",,,"
+
+do_install() {
+ oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
+ rm -f "${D}${bindir}/update-alternatives"
+ fi
+
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
+ grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm
+ fi
+}
+
+do_install_append_class-target() {
+ if [ -e "${D}${bindir}/update-alternatives" ]; then
+ sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g'
+ fi
+}
+
+# These are empty and will pull python3-dev into images where it wouldn't
+# have been otherwise, so don't generate them.
+PACKAGES_remove = "${PN}-dev ${PN}-staticdev"
+
+PACKAGES =+ "update-alternatives-opkg"
+FILES_update-alternatives-opkg = "${bindir}/update-alternatives"
+RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth"
+RREPLACES_update-alternatives-opkg = "update-alternatives-cworth"
+RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth"
+
+pkg_postrm_update-alternatives-opkg() {
+ rm -rf $D${nonarch_libdir}/opkg/alternatives
+ rmdir $D${nonarch_libdir}/opkg || true
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+CLEANBROKEN = "1"
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
deleted file mode 100644
index a7aec45f8d..0000000000
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "Additional utilities for the opkg package manager"
-SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system"
-SECTION = "base"
-HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
-PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
-
-SRCREV = "3ffece9bf19a844edacc563aa092fd1fbfcffeee"
-PV = "0.3.2+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/opkg-utils"
-SRC_URI_append_class-native = " file://tar_ignore_error.patch"
-
-S = "${WORKDIR}/git"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-PYTHONRDEPS = "python python-shell python-io python-math python-crypt python-logging python-fcntl python-subprocess python-pickle python-compression python-textutils python-stringold"
-PYTHONRDEPS_class-native = ""
-
-PACKAGECONFIG = "python update-alternatives"
-PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
-PACKAGECONFIG[update-alternatives] = ",,,"
-
-do_install() {
- oe_runmake PREFIX=${prefix} DESTDIR=${D} install
- if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
- rm -f "${D}${bindir}/update-alternatives"
- fi
-}
-
-do_install_append_class-target() {
- if [ -e "${D}${bindir}/update-alternatives" ]; then
- sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g'
- fi
-}
-
-PACKAGES =+ "update-alternatives-opkg"
-FILES_update-alternatives-opkg = "${bindir}/update-alternatives"
-RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth"
-RREPLACES_update-alternatives-opkg = "update-alternatives-cworth"
-RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb b/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb
index ace3de4f42..0c2dbc9e32 100644
--- a/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb
+++ b/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb
@@ -1,6 +1,6 @@
SUMMARY = "Architecture-dependent configuration for opkg"
+HOMEPAGE = "http://code.google.com/p/opkg/"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PACKAGE_ARCH = "${MACHINE_ARCH}"
PR = "r1"
diff --git a/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb b/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
index 18d6abdded..a20e316a3d 100644
--- a/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
+++ b/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
@@ -35,14 +35,6 @@ 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
+pkg_postinst_ontarget_${PN} () {
+opkg-key populate
}
diff --git a/meta/recipes-devtools/opkg/opkg/0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch b/meta/recipes-devtools/opkg/opkg/0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch
index 255021b4b7..e94a4123dd 100644
--- a/meta/recipes-devtools/opkg/opkg/0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch
+++ b/meta/recipes-devtools/opkg/opkg/0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch
@@ -21,10 +21,10 @@ index 7bca948..5a1bc44 100644
--- a/libopkg/opkg_conf.h
+++ b/libopkg/opkg_conf.h
@@ -40,7 +40,7 @@ extern "C" {
- #define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
- #define OPKG_CONF_DEFAULT_CACHE_DIR "/var/cache/opkg"
- #define OPKG_CONF_DEFAULT_CONF_FILE_DIR "/etc/opkg"
--#define OPKG_CONF_DEFAULT_LOCK_FILE "/var/run/opkg.lock"
+ #define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status"
+ #define OPKG_CONF_DEFAULT_CACHE_DIR VARDIR "/cache/opkg"
+ #define OPKG_CONF_DEFAULT_CONF_FILE_DIR SYSCONFDIR "/opkg"
+-#define OPKG_CONF_DEFAULT_LOCK_FILE VARDIR "/run/opkg.lock"
+#define OPKG_CONF_DEFAULT_LOCK_FILE "/run/opkg.lock"
/* In case the config file defines no dest */
diff --git a/meta/recipes-devtools/opkg/opkg/open_inner.patch b/meta/recipes-devtools/opkg/opkg/open_inner.patch
new file mode 100644
index 0000000000..278e099e3a
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/open_inner.patch
@@ -0,0 +1,46 @@
+From alejandro.delcastillo@ni.com Wed Nov 20 22:35:02 2019
+From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org>
+CC: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Subject: [opkg][PATCH 2/2] open_inner: add support for empty payloads
+Date: Wed, 20 Nov 2019 16:34:48 -0600
+Message-ID: <20191120223448.26522-3-alejandro.delcastillo@ni.com>
+X-Mailer: git-send-email 2.22.0
+In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com>
+References: <20191120223448.26522-1-alejandro.delcastillo@ni.com>
+MIME-Version: 1.0
+Content-Type: text/plain
+Content-Transfer-Encoding: 8bit
+
+Support for empty compressed payloads need to be explicitly enabled on
+libarchive.
+
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+
+Upstream-Status: Backport
+---
+ libopkg/opkg_archive.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
+index 0e9ccea..f19cece 100644
+--- a/libopkg/opkg_archive.c
++++ b/libopkg/opkg_archive.c
+@@ -618,6 +618,13 @@ static struct archive *open_inner(struct archive *outer)
+ goto err_cleanup;
+ }
+
++ r = archive_read_support_format_empty(inner);
++ if (r != ARCHIVE_OK) {
++ opkg_msg(ERROR, "Empty format not supported: %s\n",
++ archive_error_string(inner));
++ goto err_cleanup;
++ }
++
+ r = archive_read_open(inner, data, NULL, inner_read, inner_close);
+ if (r != ARCHIVE_OK) {
+ opkg_msg(ERROR, "Failed to open inner archive: %s\n",
+--
+2.22.0
+
+
diff --git a/meta/recipes-devtools/opkg/opkg/opkg-configure.service b/meta/recipes-devtools/opkg/opkg/opkg-configure.service
deleted file mode 100644
index 8e74026ec2..0000000000
--- a/meta/recipes-devtools/opkg/opkg/opkg-configure.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=Opkg first boot configure
-DefaultDependencies=no
-After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
-Before=sysinit.target
-
-[Service]
-Type=oneshot
-EnvironmentFile=-@SYSCONFDIR@/default/postinst
-ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/opkg configure > $LOGFILE 2>&1; else @BINDIR@/opkg configure; fi"
-ExecStartPost=@BASE_BINDIR@/systemctl disable opkg-configure.service
-StandardOutput=syslog
-RemainAfterExit=No
-
-[Install]
-WantedBy=basic.target
-WantedBy=sysinit.target
diff --git a/meta/recipes-devtools/opkg/opkg/opkg_archive.patch b/meta/recipes-devtools/opkg/opkg/opkg_archive.patch
new file mode 100644
index 0000000000..3e1ebae953
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/opkg_archive.patch
@@ -0,0 +1,54 @@
+From alejandro.delcastillo@ni.com Wed Nov 20 22:35:01 2019
+Return-Path: <richard.purdie+caf_=rpurdie=rpsys.net@linuxfoundation.org>
+From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org>
+CC: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Subject: [opkg][PATCH 1/2] opkg_archive.c: avoid double free on uncompress
+ error
+Date: Wed, 20 Nov 2019 16:34:47 -0600
+Message-ID: <20191120223448.26522-2-alejandro.delcastillo@ni.com>
+X-Mailer: git-send-email 2.22.0
+In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com>
+References: <20191120223448.26522-1-alejandro.delcastillo@ni.com>
+MIME-Version: 1.0
+Content-Type: text/plain
+Content-Transfer-Encoding: 8bit
+
+The open-inner function calls archive_read_open. On error,
+archive_read_open calls inner_close, which also closes the outter
+archive. On error, return NULL directly to avoid double free.
+
+
+Upstream-Status: Backport
+
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+ libopkg/opkg_archive.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
+index 3d87db1..0e9ccea 100644
+--- a/libopkg/opkg_archive.c
++++ b/libopkg/opkg_archive.c
+@@ -622,7 +622,7 @@ static struct archive *open_inner(struct archive *outer)
+ if (r != ARCHIVE_OK) {
+ opkg_msg(ERROR, "Failed to open inner archive: %s\n",
+ archive_error_string(inner));
+- goto err_cleanup;
++ return NULL;
+ }
+
+ return inner;
+@@ -683,7 +683,7 @@ static struct archive *extract_outer(const char *filename, const char *arname)
+
+ inner = open_inner(outer);
+ if (!inner)
+- goto err_cleanup;
++ return NULL;
+
+ return inner;
+
+--
+2.22.0
+
+
diff --git a/meta/recipes-devtools/opkg/opkg/run-ptest b/meta/recipes-devtools/opkg/opkg/run-ptest
new file mode 100644
index 0000000000..5fb7077eec
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+OPKG_PATH=$(which opkg)
+
+make OPKG_PATH=$OPKG_PATH run-tests
diff --git a/meta/recipes-devtools/opkg/opkg_0.3.3.bb b/meta/recipes-devtools/opkg/opkg_0.3.3.bb
deleted file mode 100644
index bce72fcd26..0000000000
--- a/meta/recipes-devtools/opkg/opkg_0.3.3.bb
+++ /dev/null
@@ -1,73 +0,0 @@
-SUMMARY = "Open Package Manager"
-SUMMARY_libopkg = "Open Package Manager library"
-SECTION = "base"
-HOMEPAGE = "http://code.google.com/p/opkg/"
-BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
-
-DEPENDS = "libarchive"
-
-PE = "1"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://opkg-configure.service \
- file://opkg.conf \
- file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
-"
-
-SRC_URI[md5sum] = "a4613038c8afc7d8d482f5c53f137bdf"
-SRC_URI[sha256sum] = "19db9e73121a5e4c91fa228b0a6a4c55cc3591056130cfb3c66c30aa32f8d00e"
-
-inherit autotools pkgconfig systemd
-
-SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
-
-target_localstatedir := "${localstatedir}"
-OPKGLIBDIR = "${target_localstatedir}/lib"
-
-PACKAGECONFIG ??= ""
-
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
-PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
-PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
-
-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/lists" >>${D}${sysconfdir}/opkg/opkg.conf
-
- # We need to create the lock directory
- install -d ${D}${OPKGLIBDIR}/opkg
-
- 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' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BINDIR@,${bindir},g' \
- -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
- ${D}${systemd_unitdir}/system/opkg-configure.service
- fi
-}
-
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
-RCONFLICTS_${PN} = "opkg-collateral"
-RPROVIDES_${PN} = "opkg-collateral"
-
-PACKAGES =+ "libopkg"
-
-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/opkg/opkg_0.4.1.bb b/meta/recipes-devtools/opkg/opkg_0.4.1.bb
new file mode 100644
index 0000000000..00ae9c74c2
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg_0.4.1.bb
@@ -0,0 +1,86 @@
+SUMMARY = "Open Package Manager"
+SUMMARY_libopkg = "Open Package Manager library"
+SECTION = "base"
+HOMEPAGE = "http://code.google.com/p/opkg/"
+BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://src/opkg.c;beginline=4;endline=18;md5=9f5a1ad5395378a807d6d591e2f92d25"
+
+DEPENDS = "libarchive"
+
+PE = "1"
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+ file://opkg.conf \
+ file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+ file://opkg_archive.patch \
+ file://open_inner.patch \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "ba0c21305fc93b26e844981ef100dc85"
+SRC_URI[sha256sum] = "45ac1e037d3877f635d883f8a555e172883a25d3eeb7986c75890fdd31250a43"
+
+# This needs to be before ptest inherit, otherwise all ptest files end packaged
+# in libopkg package if OPKGLIBDIR == libdir, because default
+# PTEST_PATH ?= "${libdir}/${BPN}/ptest"
+PACKAGES =+ "libopkg"
+
+inherit autotools pkgconfig ptest
+
+target_localstatedir := "${localstatedir}"
+OPKGLIBDIR ??= "${target_localstatedir}/lib"
+
+PACKAGECONFIG ??= "libsolv"
+
+PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
+ gnupg gpgme libgpg-error,\
+ ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
+ "
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
+PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
+PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
+
+EXTRA_OECONF += " --disable-pathfinder"
+EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
+
+# Release tarball has unused binaries on the tests folder, automatically created by automake.
+# For now, delete them to avoid packaging errors (wrong architecture)
+do_unpack_append () {
+ bb.build.exec_func('remove_test_binaries', d)
+}
+
+remove_test_binaries () {
+ rm ${WORKDIR}/opkg-${PV}/tests/libopkg_test*
+}
+
+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/lists" >>${D}${sysconfdir}/opkg/opkg.conf
+
+ # We need to create the lock directory
+ install -d ${D}${OPKGLIBDIR}/opkg
+}
+
+do_install_ptest () {
+ sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile
+ sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
+}
+
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
+RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression"
+RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
+RCONFLICTS_${PN} = "opkg-collateral"
+RPROVIDES_${PN} = "opkg-collateral"
+
+FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
+
+BBCLASSEXTEND = "native nativesdk"
+
+CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/meta/recipes-devtools/orc/orc_0.4.25.bb b/meta/recipes-devtools/orc/orc_0.4.25.bb
deleted file mode 100644
index 897493a7de..0000000000
--- a/meta/recipes-devtools/orc/orc_0.4.25.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Optimised Inner Loop Runtime Compiler"
-HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
-LICENSE = "BSD-2-Clause & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "8582a28b15f53110c88d8043d9f55bcf"
-SRC_URI[sha256sum] = "c1b1d54a58f26d483f0b3881538984789fe5d5460ab8fab74a1cacbd3d1c53d1"
-
-inherit autotools pkgconfig gtk-doc
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGES =+ "orc-examples"
-PACKAGES_DYNAMIC += "^liborc-.*"
-FILES_orc-examples = "${libdir}/orc/*"
-FILES_${PN} = "${bindir}/*"
-
-python populate_packages_prepend () {
- libdir = d.expand('${libdir}')
- do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
-}
-
-do_compile_prepend_class-native () {
- sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
-}
diff --git a/meta/recipes-devtools/orc/orc_0.4.31.bb b/meta/recipes-devtools/orc/orc_0.4.31.bb
new file mode 100644
index 0000000000..cd4dc31d70
--- /dev/null
+++ b/meta/recipes-devtools/orc/orc_0.4.31.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Optimised Inner Loop Runtime Compiler"
+HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
+LICENSE = "BSD-2-Clause & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
+SRC_URI[md5sum] = "b6b95a47eff713e91873e2c2b1a5b3ad"
+SRC_URI[sha256sum] = "a0ab5f10a6a9ae7c3a6b4218246564c3bf00d657cbdf587e6d34ec3ef0616075"
+
+inherit meson pkgconfig gtk-doc
+
+GTKDOC_MESON_OPTION = "gtk_doc"
+GTKDOC_MESON_ENABLE_FLAG = "enabled"
+GTKDOC_MESON_DISABLE_FLAG = "disabled"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "orc-examples"
+PACKAGES_DYNAMIC += "^liborc-.*"
+FILES_orc-examples = "${libdir}/orc/*"
+FILES_${PN} = "${bindir}/*"
+
+python populate_packages_prepend () {
+ libdir = d.expand('${libdir}')
+ do_split_packages(d, libdir, r'^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
+}
+
+do_compile_prepend_class-native () {
+ sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
+}
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch
deleted file mode 100644
index ed67c501cb..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From: Piotr Roszatycki <dexter@debian.org>
-Date: Wed, 27 Jan 2010 16:53:11 +0100
-Subject: [PATCH] Change library name
-
-The soname was changed to ossp-uuid to prevend the name clash with e2fsprogs's
-uuid library.
----
- Makefile.in | 6 +++---
- perl/Makefile.PL | 12 ++++++------
- php/config.m4 | 2 +-
- uuid-config.in | 2 +-
- uuid.pc.in | 4 ++--
- 5 files changed, 13 insertions(+), 13 deletions(-)
-
-----
-Upstream-Status: Inappropriate [not author]
-
-This patch is from debian ossp-uuid 1.6.2 integration.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff --git a/Makefile.in b/Makefile.in
-index d28f4be..c2ba99d 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -62,13 +62,13 @@ PERL = @PERL@
- PHP = @PHP@
- PG_CONFIG = @PG_CONFIG@
-
--LIB_NAME = libuuid.la
-+LIB_NAME = libossp-uuid.la
- LIB_OBJS = uuid.lo uuid_md5.lo uuid_sha1.lo uuid_prng.lo uuid_mac.lo uuid_time.lo uuid_ui64.lo uuid_ui128.lo uuid_str.lo
-
--DCE_NAME = libuuid_dce.la
-+DCE_NAME = libossp-uuid_dce.la
- DCE_OBJS = uuid_dce.lo $(LIB_OBJS)
-
--CXX_NAME = libuuid++.la
-+CXX_NAME = libossp-uuid++.la
- CXX_OBJS = uuid++.lo $(LIB_OBJS)
-
- PRG_NAME = uuid
-diff --git a/perl/Makefile.PL b/perl/Makefile.PL
-index 92f4494..9c6fee6 100644
---- a/perl/Makefile.PL
-+++ b/perl/Makefile.PL
-@@ -33,9 +33,9 @@ use Config;
- use ExtUtils::MakeMaker;
-
- # determine source directory
--my ($srcdir) = map { my $d = $_; $d =~ s/\/libuuid\.la$//; $d }
-- grep { -f $_ } ("../libuuid.la", glob("../*/libuuid.la"))
-- or die "no source directory found (where libuuid.la is located)";
-+my ($srcdir) = map { my $d = $_; $d =~ s/\/libossp-uuid\.la$//; $d }
-+ grep { -f $_ } ("../libossp-uuid.la", glob("../*/libossp-uuid.la"))
-+ or die "no source directory found (where libossp-uuid.la is located)";
-
- # determine extra build options
- my $compat = 0;
-@@ -47,15 +47,15 @@ WriteMakefile(
- VERSION_FROM => 'uuid.pm',
- ABSTRACT_FROM => 'uuid.pod',
- PREREQ_PM => {},
-- LIBS => [ "-L$srcdir/.libs -L$srcdir -luuid" ],
-+ LIBS => [ "-L$srcdir/.libs -L$srcdir -lossp-uuid" ],
- DEFINE => '',
- INC => "-I. -I$srcdir",
- PM => { 'uuid.pm' => '$(INST_LIBDIR)/uuid.pm',
- 'uuid.pod' => '$(INST_LIBDIR)/uuid.pod',
- ($compat ? ('uuid_compat.pm' => '$(INST_LIBDIR)/../Data/UUID.pm') : ()),
- ($compat ? ('uuid_compat.pod' => '$(INST_LIBDIR)/../Data/UUID.pod') : ()), },
-- MAN3PODS => { 'uuid.pod' => '$(INST_MAN3DIR)/OSSP::uuid.3',
-- ($compat ? ('uuid_compat.pod' => '$(INST_MAN3DIR)/Data::UUID.3') : ()), },
-+ MAN3PODS => { 'uuid.pod' => '$(INST_MAN3DIR)/OSSP::uuid.3pm',
-+ ($compat ? ('uuid_compat.pod' => '$(INST_MAN3DIR)/Data::UUID.3pm') : ()), },
- TYPEMAPS => [ 'uuid.tm' ],
- test => { TESTS => 'uuid.ts' . ($compat ? ' uuid_compat.ts' : '') },
- NO_META => 1,
-diff --git a/php/config.m4 b/php/config.m4
-index 5091b96..969b457 100644
---- a/php/config.m4
-+++ b/php/config.m4
-@@ -34,7 +34,7 @@ if test "$PHP_UUID" != "no"; then
- PHP_NEW_EXTENSION(uuid, uuid.c, $ext_shared)
- AC_DEFINE(HAVE_UUID, 1, [Have OSSP uuid library])
- PHP_ADD_LIBPATH([..], )
-- PHP_ADD_LIBRARY([uuid],, UUID_SHARED_LIBADD)
-+ PHP_ADD_LIBRARY([ossp-uuid],, UUID_SHARED_LIBADD)
- PHP_ADD_INCLUDE([..])
- PHP_SUBST(UUID_SHARED_LIBADD)
-
-diff --git a/uuid-config.in b/uuid-config.in
-index 8d2a063..5b58812 100644
---- a/uuid-config.in
-+++ b/uuid-config.in
-@@ -121,7 +121,7 @@ do
- output_extra="$output_extra $uuid_ldflags"
- ;;
- --libs)
-- output="$output -luuid"
-+ output="$output -lossp-uuid"
- output_extra="$output_extra $uuid_libs"
- ;;
- * )
-diff --git a/uuid.pc.in b/uuid.pc.in
-index c76ad1e..de00c2f 100644
---- a/uuid.pc.in
-+++ b/uuid.pc.in
-@@ -36,7 +36,7 @@ Name: OSSP uuid
- Description: Universally Unique Identifier (UUID) Library
- Version: @UUID_VERSION_RAW@
- URL: http://www.ossp.org/pkg/lib/uuid/
--Cflags: -I${includedir}
--Libs: -L${libdir} -luuid
-+Cflags: -I${includedir}/ossp
-+Libs: -L${libdir} -lossp-uuid
- Libs.private: @LIBS@
-
---
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0002-uuid-preserve-m-option-status-in-v-option-handling.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0002-uuid-preserve-m-option-status-in-v-option-handling.patch
deleted file mode 100644
index 804a62731d..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0002-uuid-preserve-m-option-status-in-v-option-handling.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: Marco Nenciarini <marco.nenciarini@devise.it>
-Date: Wed, 27 Jan 2010 19:46:21 +0100
-Subject: [PATCH] uuid: preserve -m option status in -v option handling
-
-Bug: 531396
----
- uuid_cli.c | 19 ++++++++++---------
- 1 files changed, 10 insertions(+), 9 deletions(-)
-
-----
-Upstream-Status: Inappropriate [not author]
-
-This patch is from debian ossp-uuid 1.6.2 integration.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff --git a/uuid_cli.c b/uuid_cli.c
-index d1b0b11..14a67fe 100644
---- a/uuid_cli.c
-+++ b/uuid_cli.c
-@@ -140,11 +140,12 @@ int main(int argc, char *argv[])
- i = strtol(optarg, &p, 10);
- if (*p != '\0')
- usage("invalid argument to option 'v'");
-+ version &= ~(UUID_MAKE_V1|UUID_MAKE_V3|UUID_MAKE_V4|UUID_MAKE_V5);
- switch (i) {
-- case 1: version = UUID_MAKE_V1; break;
-- case 3: version = UUID_MAKE_V3; break;
-- case 4: version = UUID_MAKE_V4; break;
-- case 5: version = UUID_MAKE_V5; break;
-+ case 1: version |= UUID_MAKE_V1; break;
-+ case 3: version |= UUID_MAKE_V3; break;
-+ case 4: version |= UUID_MAKE_V4; break;
-+ case 5: version |= UUID_MAKE_V5; break;
- default:
- usage("invalid version on option 'v'");
- break;
-@@ -213,10 +214,10 @@ int main(int argc, char *argv[])
- }
- else {
- /* encoding */
-- if ( (version == UUID_MAKE_V1 && argc != 0)
-- || (version == UUID_MAKE_V3 && argc != 2)
-- || (version == UUID_MAKE_V4 && argc != 0)
-- || (version == UUID_MAKE_V5 && argc != 2))
-+ if ( (version & UUID_MAKE_V1 && argc != 0)
-+ || (version & UUID_MAKE_V3 && argc != 2)
-+ || (version & UUID_MAKE_V4 && argc != 0)
-+ || (version & UUID_MAKE_V5 && argc != 2))
- usage("invalid number of arguments");
- if ((rc = uuid_create(&uuid)) != UUID_RC_OK)
- error(1, "uuid_create: %s", uuid_error(rc));
-@@ -232,7 +233,7 @@ int main(int argc, char *argv[])
- if ((rc = uuid_load(uuid, "nil")) != UUID_RC_OK)
- error(1, "uuid_load: %s", uuid_error(rc));
- }
-- if (version == UUID_MAKE_V3 || version == UUID_MAKE_V5) {
-+ if (version & UUID_MAKE_V3 || version & UUID_MAKE_V5) {
- if ((rc = uuid_create(&uuid_ns)) != UUID_RC_OK)
- error(1, "uuid_create: %s", uuid_error(rc));
- if ((rc = uuid_load(uuid_ns, argv[0])) != UUID_RC_OK) {
---
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0003-Fix-whatis-entries.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0003-Fix-whatis-entries.patch
deleted file mode 100644
index 13cbb59896..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0003-Fix-whatis-entries.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: Marco Nenciarini <marco.nenciarini@devise.it>
-Date: Tue, 2 Feb 2010 12:16:49 +0100
-Subject: [PATCH] Fix whatis entries
-
-Fix whatis entry of uuid.1, uuid.3ossp and uuid++.3ossp manpages
----
- uuid++.pod | 2 +-
- uuid.pod | 2 +-
- uuid_cli.pod | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-----
-Upstream-Status: Inappropriate [not author]
-
-This patch is from debian ossp-uuid 1.6.2 integration.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff --git a/uuid++.pod b/uuid++.pod
-index 8b5a4b1..89c5efb 100644
---- a/uuid++.pod
-+++ b/uuid++.pod
-@@ -31,7 +31,7 @@
-
- =head1 NAME
-
--B<OSSP uuid> - B<Universally Unique Identifier> (C++ API)
-+B<uuid++> - B<Universally Unique Identifier> (C++ API)
-
- =head1 VERSION
-
-diff --git a/uuid.pod b/uuid.pod
-index 4ad3742..0179a46 100644
---- a/uuid.pod
-+++ b/uuid.pod
-@@ -31,7 +31,7 @@
-
- =head1 NAME
-
--B<OSSP uuid> - B<Universally Unique Identifier>
-+B<uuid> - B<Universally Unique Identifier>
-
- =head1 VERSION
-
-diff --git a/uuid_cli.pod b/uuid_cli.pod
-index ddec6bb..df9dc83 100644
---- a/uuid_cli.pod
-+++ b/uuid_cli.pod
-@@ -31,7 +31,7 @@
-
- =head1 NAME
-
--B<OSSP uuid> - B<Universally Unique Identifier Command-Line Tool>
-+B<uuid> - B<Universally Unique Identifier Command-Line Tool>
-
- =head1 VERSION
-
---
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
deleted file mode 100644
index bc5e111ee5..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Description: Support dash-less args to from_string.
-Author: Tim Retout <diocles@debian.org>
-Bug-Debian: http://bugs.debian.org/635607
-
-The module Data::GUID depends on Data::UUID supporting this behaviour.
-
-----
-Upstream-Status: Inappropriate [not author]
-
-This patch is from debian ossp-uuid 1.6.2 integration.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
---- a/perl/uuid_compat.pm
-+++ b/perl/uuid_compat.pm
-@@ -93,7 +93,9 @@
- $uuid->import('str',
- $str =~ /^0x/
- ? join '-', unpack('x2 a8 a4 a4 a4 a12', $str)
-- : $str
-+ : $str =~ /-/
-+ ? $str
-+ : join '-', unpack('A8 A4 A4 A4 A12', $str)
- );
- return $uuid->export('bin');
- }
---- a/perl/uuid_compat.ts
-+++ b/perl/uuid_compat.ts
-@@ -28,7 +28,7 @@
- ## uuid_compat.ts: Data::UUID Backward Compatibility Perl API (Perl test suite part)
- ##
-
--use Test::More tests => 14;
-+use Test::More tests => 16;
-
- BEGIN {
- use_ok('Data::UUID');
-@@ -53,3 +53,5 @@
- ok($uuid8 = $ug->from_string("6ba7b811-9dad-11d1-80b4-00c04fd430c8"));
- ok($ug->compare($uuid7, $uuid8) == 0);
-
-+ok($uuid9 = $ug->from_string("6ba7b8119dad11d180b400c04fd430c8"));
-+ok($ug->compare($uuid7, $uuid9) == 0);
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch
deleted file mode 100644
index 63b80f6a14..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-uuid.pc is generated at build time so should be installed from the current
-directory, and not $S.
-
-Upstream-Status: Pending [should be submitted]
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-Index: uuid-1.6.2/Makefile.in
-===================================================================
---- uuid-1.6.2.orig/Makefile.in 2012-11-13 16:58:28.624156000 +0000
-+++ uuid-1.6.2/Makefile.in 2012-11-13 17:05:24.224158670 +0000
-@@ -232,7 +232,7 @@
- $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
- $(SHTOOL) install -c -m 755 uuid-config $(DESTDIR)$(bindir)/
- $(SHTOOL) install -c -m 644 $(S)/uuid-config.1 $(DESTDIR)$(mandir)/man1/
-- $(SHTOOL) install -c -m 644 $(S)/uuid.pc $(DESTDIR)$(libdir)/pkgconfig/
-+ $(SHTOOL) install -c -m 644 uuid.pc $(DESTDIR)$(libdir)/pkgconfig/
- $(SHTOOL) install -c -m 644 uuid.h $(DESTDIR)$(includedir)/
- -@if [ ".$(WITH_DCE)" = .yes ]; then \
- echo "$(SHTOOL) install -c -m 644 $(S)/uuid_dce.h $(DESTDIR)$(includedir)/"; \
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch
deleted file mode 100644
index 4dfc1370c1..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Obey LDFLAGS
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
-
---- uuid-1.6.2.orig/Makefile.in
-+++ uuid-1.6.2/Makefile.in
-@@ -113,15 +113,15 @@ all: $(TARGETS)
- @$(LIBTOOL) --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
-
- $(LIB_NAME): $(LIB_OBJS)
-- @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \
-+ @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \
- -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
-
- $(DCE_NAME): $(DCE_OBJS)
-- @$(LIBTOOL) --mode=link $(CC) -o $(DCE_NAME) $(DCE_OBJS) -rpath $(libdir) \
-+ @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(DCE_NAME) $(DCE_OBJS) -rpath $(libdir) \
- -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
-
- $(CXX_NAME): $(CXX_OBJS)
-- @$(LIBTOOL) --mode=link $(CXX) -o $(CXX_NAME) $(CXX_OBJS) -rpath $(libdir) \
-+ @$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $(CXX_NAME) $(CXX_OBJS) -rpath $(libdir) \
- -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
-
- $(PRG_NAME): $(PRG_OBJS) $(LIB_NAME)
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-libtool.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-libtool.patch
deleted file mode 100644
index 4bc91b86ee..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-libtool.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Remove hardcoded libtool name, fall back to generated name
-
-Upstream-Status: Inappropriate [no upstream]
-The project appears to no longer be accepting changes.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff -ur uuid-1.6.2.orig/Makefile.in uuid-1.6.2/Makefile.in
---- uuid-1.6.2.orig/Makefile.in 2012-05-14 14:37:19.579672930 -0500
-+++ uuid-1.6.2/Makefile.in 2012-05-14 14:37:49.112733787 -0500
-@@ -32,6 +32,7 @@
- VPATH = @srcdir@
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
-+top_builddir = @top_builddir@
- S = $(srcdir)
- C = .
-
-@@ -55,7 +56,7 @@
- CP = cp
- RMDIR = rmdir
- SHTOOL = $(S)/shtool
--LIBTOOL = $(C)/libtool
-+LIBTOOL = @LIBTOOL@
- TRUE = true
- POD2MAN = pod2man
- PERL = @PERL@
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-nostrip.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-nostrip.patch
deleted file mode 100644
index d806b5fb70..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-nostrip.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-We don't want anything stripped
-
-Upstream-Status: Inappropriate [no upstream]
-The project appears to no longer be accepting changes.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff -ur uuid-1.6.2.orig/Makefile.in uuid-1.6.2/Makefile.in
---- uuid-1.6.2.orig/Makefile.in 2012-05-14 14:42:42.225789456 -0500
-+++ uuid-1.6.2/Makefile.in 2012-05-14 15:03:03.119733400 -0500
-@@ -254,7 +254,7 @@
- -@if [ ".$(WITH_CXX)" = .yes ]; then \
- $(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(CXX_NAME) $(DESTDIR)$(libdir)/; \
- fi
-- @$(LIBTOOL) --mode=install $(SHTOOL) install -c -s -m 755 uuid $(DESTDIR)$(bindir)/
-+ @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 755 uuid $(DESTDIR)$(bindir)/
- $(SHTOOL) install -c -m 644 $(S)/uuid.1 $(DESTDIR)$(mandir)/man1/
- -@if [ ".$(WITH_PERL)" = .yes ]; then \
- (cd $(S)/perl && $(MAKE) $(MFLAGS) install DESTDIR=$(DESTDIR)); \
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb b/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
deleted file mode 100644
index 85a1bcf5ca..0000000000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
+++ /dev/null
@@ -1,64 +0,0 @@
-SUMMARY = "Universally Unique Identifier (UUID) library"
-DESCRIPTION = "OSSP uuid is a ISO-C:1999 application programming interface \
-(API) and corresponding command line interface (CLI) for the generation of \
-DCE 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique \
-Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 (time \
-and node based), version 3 (name based, MD5), version 4 (random number \
-based) and version 5 (name based, SHA-1)."
-DESCRIPTION_uuid = "This package contains a tool to create Universally \
-Unique Identifiers (UUID) from the command-line."
-
-HOMEPAGE = "http://www.ossp.org/pkg/lib/uuid/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://README;beginline=30;endline=55;md5=b394fadb039bbfca6ad9d9d769ee960e \
- file://uuid_md5.c;beginline=1;endline=28;md5=9c1f4b2218546deae24c91be1dcf00dd"
-
-PR = "r2"
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/o/ossp-uuid/"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/o/${BPN}/${BPN}_${PV}.orig.tar.gz \
- file://0001-Change-library-name.patch \
- file://0002-uuid-preserve-m-option-status-in-v-option-handling.patch \
- file://0003-Fix-whatis-entries.patch \
- file://0004-fix-data-uuid-from-string.patch \
- file://uuid-libtool.patch \
- file://uuid-nostrip.patch \
- file://install-pc.patch \
- file://ldflags.patch \
- "
-SRC_URI[md5sum] = "5db0d43a9022a6ebbbc25337ae28942f"
-SRC_URI[sha256sum] = "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0"
-
-S = "${WORKDIR}/uuid-${PV}"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF = "--without-dce --without-cxx --without-perl --without-perl-compat --without-php --without-pgsql"
-EXTRA_OECONF = "--includedir=${includedir}/ossp"
-
-do_configure_prepend() {
- # This package has a completely custom aclocal.m4, which should be acinclude.m4.
- if [ ! -e ${S}/acinclude.m4 ]; then
- mv ${S}/aclocal.m4 ${S}/acinclude.m4
- fi
-
- rm -f ${S}/libtool.m4
-}
-
-do_install_append() {
- mkdir -p ${D}${includedir}/ossp
- mv ${D}${libdir}/pkgconfig/uuid.pc ${D}${libdir}/pkgconfig/ossp-uuid.pc
-}
-
-PACKAGES =+ "uuid"
-FILES_uuid = "${bindir}/uuid"
-FILES_${PN} = "${libdir}/libossp-uuid.so.16*"
-FILES_${PN}-dev += "${bindir}/uuid-config"
-
-BBCLASSEXTEND = "native nativesdk"
-
-ALTERNATIVE_${PN}-doc = "uuid.3"
-ALTERNATIVE_PRIORITY_${PN}-doc = "200"
-ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3"
diff --git a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch b/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch
new file mode 100644
index 0000000000..78345e925e
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch
@@ -0,0 +1,94 @@
+From 7f770b9c20da1a192dad8cb572a6391f2773285a Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Thu, 3 May 2018 14:31:55 +0200
+Subject: [PATCH 1/2] Don't leak temporary file on failed ed-style patch
+
+Now that we write ed-style patches to a temporary file before we
+apply them, we need to ensure that the temporary file is removed
+before we leave, even on fatal error.
+
+* src/pch.c (do_ed_script): Use global TMPEDNAME instead of local
+ tmpname. Don't unlink the file directly, instead tag it for removal
+ at exit time.
+* src/patch.c (cleanup): Unlink TMPEDNAME at exit.
+
+This closes bug #53820:
+https://savannah.gnu.org/bugs/index.php?53820
+
+Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)")
+
+CVE: CVE-2018-1000156
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=19599883ffb6a450d2884f081f8ecf68edbed7ee]
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ src/common.h | 2 ++
+ src/pch.c | 12 +++++-------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/common.h b/src/common.h
+index ec50b40..22238b5 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -94,10 +94,12 @@ XTERN char const *origsuff;
+ XTERN char const * TMPINNAME;
+ XTERN char const * TMPOUTNAME;
+ XTERN char const * TMPPATNAME;
++XTERN char const * TMPEDNAME;
+
+ XTERN bool TMPINNAME_needs_removal;
+ XTERN bool TMPOUTNAME_needs_removal;
+ XTERN bool TMPPATNAME_needs_removal;
++XTERN bool TMPEDNAME_needs_removal;
+
+ #ifdef DEBUGGING
+ XTERN int debug;
+diff --git a/src/pch.c b/src/pch.c
+index 16e001a..c1a62cf 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2392,7 +2392,6 @@ do_ed_script (char const *inname, char const *outname,
+ file_offset beginning_of_this_line;
+ size_t chars_read;
+ FILE *tmpfp = 0;
+- char const *tmpname;
+ int tmpfd;
+ pid_t pid;
+
+@@ -2404,12 +2403,13 @@ do_ed_script (char const *inname, char const *outname,
+ invalid commands and treats the next line as a new command, which
+ can lead to arbitrary command execution. */
+
+- tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
++ tmpfd = make_tempfile (&TMPEDNAME, 'e', NULL, O_RDWR | O_BINARY, 0);
+ if (tmpfd == -1)
+- pfatal ("Can't create temporary file %s", quotearg (tmpname));
++ pfatal ("Can't create temporary file %s", quotearg (TMPEDNAME));
++ TMPEDNAME_needs_removal = true;
+ tmpfp = fdopen (tmpfd, "w+b");
+ if (! tmpfp)
+- pfatal ("Can't open stream for file %s", quotearg (tmpname));
++ pfatal ("Can't open stream for file %s", quotearg (TMPEDNAME));
+ }
+
+ for (;;) {
+@@ -2449,8 +2449,7 @@ do_ed_script (char const *inname, char const *outname,
+ write_fatal ();
+
+ if (lseek (tmpfd, 0, SEEK_SET) == -1)
+- pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
+-
++ pfatal ("Can't rewind to the beginning of file %s", quotearg (TMPEDNAME));
+ if (! dry_run && ! skip_rest_of_patch) {
+ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+ *outname_needs_removal = true;
+@@ -2482,7 +2481,6 @@ do_ed_script (char const *inname, char const *outname,
+ }
+
+ fclose (tmpfp);
+- safe_unlink (tmpname);
+
+ if (ofp)
+ {
+--
+2.17.0
+
diff --git a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch b/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch
new file mode 100644
index 0000000000..8ffffef47e
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch
@@ -0,0 +1,81 @@
+From 369dcccdfa6336e5a873d6d63705cfbe04c55727 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Mon, 7 May 2018 15:14:45 +0200
+Subject: Don't leak temporary file on failed multi-file ed-style patch
+
+The previous fix worked fine with single-file ed-style patches, but
+would still leak temporary files in the case of multi-file ed-style
+patch. Fix that case as well, and extend the test case to check for
+it.
+
+* src/patch.c (main): Unlink TMPEDNAME if needed before moving to
+ the next file in a patch.
+
+This closes bug #53820:
+https://savannah.gnu.org/bugs/index.php?53820
+
+Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)")
+Fixes: 19599883ffb6 ("Don't leak temporary file on failed ed-style patch")
+
+CVE: CVE-2018-1000156
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=369dcccdfa6336e5a873d6d63705cfbe04c55727]
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ src/patch.c | 1 +
+ tests/ed-style | 31 +++++++++++++++++++++++++++++++
+ 2 files changed, 32 insertions(+)
+
+diff --git a/src/patch.c b/src/patch.c
+index 9146597..81c7a02 100644
+--- a/src/patch.c
++++ b/src/patch.c
+@@ -236,6 +236,7 @@ main (int argc, char **argv)
+ }
+ remove_if_needed (TMPOUTNAME, &TMPOUTNAME_needs_removal);
+ }
++ remove_if_needed (TMPEDNAME, &TMPEDNAME_needs_removal);
+
+ if (! skip_rest_of_patch && ! file_type)
+ {
+diff --git a/tests/ed-style b/tests/ed-style
+index 6b6ef9d..504e6e5 100644
+--- a/tests/ed-style
++++ b/tests/ed-style
+@@ -38,3 +38,34 @@ EOF
+ check 'cat foo' <<EOF
+ foo
+ EOF
++
++# Test the case where one ed-style patch modifies several files
++
++cat > ed3.diff <<EOF
++--- foo
+++++ foo
++1c
++bar
++.
++--- baz
+++++ baz
++0a
++baz
++.
++EOF
++
++# Apparently we can't create a file with such a patch, while it works fine
++# when the file name is provided on the command line
++cat > baz <<EOF
++EOF
++
++check 'patch -e -i ed3.diff' <<EOF
++EOF
++
++check 'cat foo' <<EOF
++bar
++EOF
++
++check 'cat baz' <<EOF
++baz
++EOF
+--
+cgit v1.0-41-gc330
+
diff --git a/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch b/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch
new file mode 100644
index 0000000000..049149eb9e
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch
@@ -0,0 +1,36 @@
+From 9c986353e420ead6e706262bf204d6e03322c300 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 17 Aug 2018 13:35:40 +0200
+Subject: [PATCH] Fix swapping fake lines in pch_swap
+
+* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a
+blank line in the middle of a context-diff hunk: that empty line stays
+in the middle of the hunk and isn't swapped.
+
+Fixes: https://savannah.gnu.org/bugs/index.php?53133
+Signed-off-by: Andreas Gruenbacher <agruen@gnu.org>
+
+Upstream-Status: Backport [https://git.savannah.gnu.org/git/patch.git]
+CVE: CVE-2018-6952
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ src/pch.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index e92bc64..a500ad9 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2122,7 +2122,7 @@ pch_swap (void)
+ }
+ if (p_efake >= 0) { /* fix non-freeable ptr range */
+ if (p_efake <= i)
+- n = p_end - i + 1;
++ n = p_end - p_ptrn_lines;
+ else
+ n = -i;
+ p_efake += n;
+--
+2.10.2
+
diff --git a/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch b/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch
new file mode 100644
index 0000000000..d13d419f51
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch
@@ -0,0 +1,44 @@
+From 3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 19:36:15 +0200
+Subject: [PATCH] Invoke ed directly instead of using the shell
+
+* src/pch.c (do_ed_script): Invoke ed directly instead of using a shell
+command to avoid quoting vulnerabilities.
+
+CVE: CVE-2019-13638 CVE-2018-20969
+Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0]
+Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
+
+---
+ src/pch.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+
+diff --git a/src/pch.c b/src/pch.c
+index 4fd5a05..16e001a 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname,
+ *outname_needs_removal = true;
+ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
+ }
+- sprintf (buf, "%s %s%s", editor_program,
+- verbosity == VERBOSE ? "" : "- ",
+- outname);
+ fflush (stdout);
+
+ pid = fork();
+@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname,
+ else if (pid == 0)
+ {
+ dup2 (tmpfd, 0);
+- execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
++ assert (outname[0] != '!' && outname[0] != '-');
++ execlp (editor_program, editor_program, "-", outname, (char *) NULL);
+ _exit (2);
+ }
+ else
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch b/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
new file mode 100644
index 0000000000..b0bd6fa83a
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
@@ -0,0 +1,35 @@
+From f290f48a621867084884bfff87f8093c15195e6a Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Mon, 12 Feb 2018 16:48:24 +0100
+Subject: [PATCH] Fix segfault with mangled rename patch
+
+http://savannah.gnu.org/bugs/?53132
+* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
+for renames and copies (fix the existing check).
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f290f48a621867084884bfff87f8093c15195e6a]
+CVE: CVE-2018-6951
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ src/pch.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index ff9ed2c..bc6278c 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
+ if ((pch_rename () || pch_copy ())
+ && ! inname
+ && ! ((i == OLD || i == NEW) &&
+- p_name[! reverse] &&
++ p_name[reverse] && p_name[! reverse] &&
++ name_is_valid (p_name[reverse]) &&
+ name_is_valid (p_name[! reverse])))
+ {
+ say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy");
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch b/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
new file mode 100644
index 0000000000..2a09d0c03b
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
@@ -0,0 +1,38 @@
+From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 11:34:51 +0200
+Subject: [PATCH] Allow input files to be missing for ed-style patches
+
+* src/pch.c (do_ed_script): Allow input files to be missing so that new
+files will be created as with non-ed-style patches.
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=b5a91a01e5d0897facdd0f49d64b76b0f02b43e1]
+CVE: CVE-2018-1000156
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pch.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index bc6278c..0c5cc26 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname,
+
+ if (! dry_run && ! skip_rest_of_patch) {
+ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- assert (! inerrno);
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
+ sprintf (buf, "%s %s%s", editor_program,
+ verbosity == VERBOSE ? "" : "- ",
+ outname);
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch b/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
new file mode 100644
index 0000000000..d74c2f182e
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
@@ -0,0 +1,215 @@
+From 123eaff0d5d1aebe128295959435b9ca5909c26d Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 12:14:49 +0200
+Subject: [PATCH] Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)
+
+* src/pch.c (do_ed_script): Write ed script to a temporary file instead
+of piping it to ed: this will cause ed to abort on invalid commands
+instead of rejecting them and carrying on.
+* tests/ed-style: New test case.
+* tests/Makefile.am (TESTS): Add test case.
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=123eaff0d5d1aebe128295959435b9ca5909c26d]
+CVE: CVE-2018-1000156
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pch.c | 91 ++++++++++++++++++++++++++++++++++++++++---------------
+ tests/Makefile.am | 1 +
+ tests/ed-style | 41 +++++++++++++++++++++++++
+ 3 files changed, 108 insertions(+), 25 deletions(-)
+ create mode 100644 tests/ed-style
+
+diff --git a/src/pch.c b/src/pch.c
+index 0c5cc26..4fd5a05 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -33,6 +33,7 @@
+ # include <io.h>
+ #endif
+ #include <safe.h>
++#include <sys/wait.h>
+
+ #define INITHUNKMAX 125 /* initial dynamic allocation size */
+
+@@ -2389,24 +2390,28 @@ do_ed_script (char const *inname, char const *outname,
+ static char const editor_program[] = EDITOR_PROGRAM;
+
+ file_offset beginning_of_this_line;
+- FILE *pipefp = 0;
+ size_t chars_read;
++ FILE *tmpfp = 0;
++ char const *tmpname;
++ int tmpfd;
++ pid_t pid;
++
++ if (! dry_run && ! skip_rest_of_patch)
++ {
++ /* Write ed script to a temporary file. This causes ed to abort on
++ invalid commands such as when line numbers or ranges exceed the
++ number of available lines. When ed reads from a pipe, it rejects
++ invalid commands and treats the next line as a new command, which
++ can lead to arbitrary command execution. */
++
++ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
++ if (tmpfd == -1)
++ pfatal ("Can't create temporary file %s", quotearg (tmpname));
++ tmpfp = fdopen (tmpfd, "w+b");
++ if (! tmpfp)
++ pfatal ("Can't open stream for file %s", quotearg (tmpname));
++ }
+
+- if (! dry_run && ! skip_rest_of_patch) {
+- int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- if (inerrno != ENOENT)
+- {
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
+- }
+- sprintf (buf, "%s %s%s", editor_program,
+- verbosity == VERBOSE ? "" : "- ",
+- outname);
+- fflush (stdout);
+- pipefp = popen(buf, binary_transput ? "wb" : "w");
+- if (!pipefp)
+- pfatal ("Can't open pipe to %s", quotearg (buf));
+- }
+ for (;;) {
+ char ed_command_letter;
+ beginning_of_this_line = file_tell (pfp);
+@@ -2417,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname,
+ }
+ ed_command_letter = get_ed_command_letter (buf);
+ if (ed_command_letter) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (ed_command_letter != 'd' && ed_command_letter != 's') {
+ p_pass_comments_through = true;
+ while ((chars_read = get_line ()) != 0) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (chars_read == 2 && strEQ (buf, ".\n"))
+ break;
+@@ -2437,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname,
+ break;
+ }
+ }
+- if (!pipefp)
++ if (!tmpfp)
+ return;
+- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0
+- || fflush (pipefp) != 0)
++ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0
++ || fflush (tmpfp) != 0)
+ write_fatal ();
+- if (pclose (pipefp) != 0)
+- fatal ("%s FAILED", editor_program);
++
++ if (lseek (tmpfd, 0, SEEK_SET) == -1)
++ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
++
++ if (! dry_run && ! skip_rest_of_patch) {
++ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
++ *outname_needs_removal = true;
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
++ sprintf (buf, "%s %s%s", editor_program,
++ verbosity == VERBOSE ? "" : "- ",
++ outname);
++ fflush (stdout);
++
++ pid = fork();
++ if (pid == -1)
++ pfatal ("Can't fork");
++ else if (pid == 0)
++ {
++ dup2 (tmpfd, 0);
++ execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
++ _exit (2);
++ }
++ else
++ {
++ int wstatus;
++ if (waitpid (pid, &wstatus, 0) == -1
++ || ! WIFEXITED (wstatus)
++ || WEXITSTATUS (wstatus) != 0)
++ fatal ("%s FAILED", editor_program);
++ }
++ }
++
++ fclose (tmpfp);
++ safe_unlink (tmpname);
+
+ if (ofp)
+ {
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 6b6df63..16f8693 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -32,6 +32,7 @@ TESTS = \
+ crlf-handling \
+ dash-o-append \
+ deep-directories \
++ ed-style \
+ empty-files \
+ false-match \
+ fifo \
+diff --git a/tests/ed-style b/tests/ed-style
+new file mode 100644
+index 0000000..d8c0689
+--- /dev/null
++++ b/tests/ed-style
+@@ -0,0 +1,41 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++
++cat > ed1.diff <<EOF
++0a
++foo
++.
++EOF
++
++check 'patch -e foo -i ed1.diff' <<EOF
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
++
++cat > ed2.diff <<EOF
++1337a
++r !echo bar
++,p
++EOF
++
++check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
++?
++Status: 2
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch b/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch
new file mode 100644
index 0000000000..9f8b6db0b9
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch
@@ -0,0 +1,113 @@
+From dce4683cbbe107a95f1f0d45fabc304acfb5d71a Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Mon, 15 Jul 2019 16:21:48 +0200
+Subject: Don't follow symlinks unless --follow-symlinks is given
+
+* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file,
+append_to_file): Unless the --follow-symlinks option is given, open files with
+the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing
+that consistently for input files.
+* src/util.c (create_backup): When creating empty backup files, (re)create them
+with O_CREAT | O_EXCL to avoid following symlinks in that case as well.
+
+CVE: CVE-2019-13636
+Upstream-Status: Backport[https://git.savannah.gnu.org/cgit/patch.git/patch/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71a]
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+---
+ src/inp.c | 12 ++++++++++--
+ src/util.c | 14 +++++++++++---
+ 2 files changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/src/inp.c b/src/inp.c
+index 32d0919..22d7473 100644
+--- a/src/inp.c
++++ b/src/inp.c
+@@ -238,8 +238,13 @@ plan_a (char const *filename)
+ {
+ if (S_ISREG (instat.st_mode))
+ {
+- int ifd = safe_open (filename, O_RDONLY|binary_transput, 0);
++ int flags = O_RDONLY | binary_transput;
+ size_t buffered = 0, n;
++ int ifd;
++
++ if (! follow_symlinks)
++ flags |= O_NOFOLLOW;
++ ifd = safe_open (filename, flags, 0);
+ if (ifd < 0)
+ pfatal ("can't open file %s", quotearg (filename));
+
+@@ -340,6 +345,7 @@ plan_a (char const *filename)
+ static void
+ plan_b (char const *filename)
+ {
++ int flags = O_RDONLY | binary_transput;
+ int ifd;
+ FILE *ifp;
+ int c;
+@@ -353,7 +359,9 @@ plan_b (char const *filename)
+
+ if (instat.st_size == 0)
+ filename = NULL_DEVICE;
+- if ((ifd = safe_open (filename, O_RDONLY | binary_transput, 0)) < 0
++ if (! follow_symlinks)
++ flags |= O_NOFOLLOW;
++ if ((ifd = safe_open (filename, flags, 0)) < 0
+ || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r")))
+ pfatal ("Can't open file %s", quotearg (filename));
+ if (TMPINNAME_needs_removal)
+diff --git a/src/util.c b/src/util.c
+index 1cc08ba..fb38307 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original)
+
+ try_makedirs_errno = ENOENT;
+ safe_unlink (bakname);
+- while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0)
++ while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)) < 0)
+ {
+ if (errno != try_makedirs_errno)
+ pfatal ("Can't create file %s", quotearg (bakname));
+@@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode,
+ static void
+ copy_to_fd (const char *from, int tofd)
+ {
++ int from_flags = O_RDONLY | O_BINARY;
+ int fromfd;
+ ssize_t i;
+
+- if ((fromfd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0)
++ if (! follow_symlinks)
++ from_flags |= O_NOFOLLOW;
++ if ((fromfd = safe_open (from, from_flags, 0)) < 0)
+ pfatal ("Can't reopen file %s", quotearg (from));
+ while ((i = read (fromfd, buf, bufsize)) != 0)
+ {
+@@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost,
+ else
+ {
+ assert (S_ISREG (mode));
++ if (! follow_symlinks)
++ to_flags |= O_NOFOLLOW;
+ tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode,
+ to_dir_known_to_exist);
+ copy_to_fd (from, tofd);
+@@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost,
+ void
+ append_to_file (char const *from, char const *to)
+ {
++ int to_flags = O_WRONLY | O_APPEND | O_BINARY;
+ int tofd;
+
+- if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0)
++ if (! follow_symlinks)
++ to_flags |= O_NOFOLLOW;
++ if ((tofd = safe_open (to, to_flags, 0)) < 0)
+ pfatal ("Can't reopen file %s", quotearg (to));
+ copy_to_fd (from, tofd);
+ if (close (tofd) != 0)
+--
+cgit v1.0-41-gc330
+
diff --git a/meta/recipes-devtools/patch/patch/debian.patch b/meta/recipes-devtools/patch/patch/debian.patch
deleted file mode 100644
index 1a07646591..0000000000
--- a/meta/recipes-devtools/patch/patch/debian.patch
+++ /dev/null
@@ -1,10426 +0,0 @@
-Upstream-Status: Inappropriate [debian patch]
-
---- patch-2.5.9.orig/m4/hash.m4
-+++ patch-2.5.9/m4/hash.m4
-@@ -0,0 +1,15 @@
-+# hash.m4 serial 1
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+AC_DEFUN([gl_HASH],
-+[
-+ dnl Prerequisites of lib/hash.c.
-+ AC_CHECK_HEADERS_ONCE(stdlib.h)
-+ AC_HEADER_STDBOOL
-+ AC_CHECK_DECLS_ONCE(free malloc)
-+])
---- patch-2.5.9.orig/m4/nanosecond_stat.m4
-+++ patch-2.5.9/m4/nanosecond_stat.m4
-@@ -0,0 +1,35 @@
-+AC_DEFUN([ag_CHECK_NANOSECOND_STAT],
-+ [AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
-+ [ac_cv_stat_nsec],
-+ [AC_TRY_COMPILE(
-+ [
-+ #include <sys/types.h>
-+ #include <sys/stat.h>
-+ #include <unistd.h>
-+ struct stat st;
-+ ],
-+ [ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec; ],
-+ [ac_cv_stat_nsec=yes],
-+ [ac_cv_stat_nsec=no])
-+ ])
-+ if test $ac_cv_stat_nsec = yes; then
-+ AC_DEFINE(HAVE_STAT_NSEC, 1, [Define to 1 if struct stat has nanosecond timestamps.])
-+ fi
-+
-+ AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
-+ [ac_cv_stat_timeval],
-+ [AC_TRY_COMPILE(
-+ [
-+ #include <time.h>
-+ #include <sys/types.h>
-+ #include <sys/stat.h>
-+ #include <unistd.h>
-+ struct stat st;
-+ ],
-+ [ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec; ],
-+ [ac_cv_stat_timeval=yes],
-+ [ac_cv_stat_timeval=no])
-+ ])
-+ if test $ac_cv_stat_timeval = yes; then
-+ AC_DEFINE(HAVE_STAT_TIMEVAL, 1, [Define to 1 if struct stat comtains struct timeval's.])
-+ fi])
---- patch-2.5.9.orig/Makefile.in
-+++ patch-2.5.9/Makefile.in
-@@ -62,7 +62,7 @@
- SHELL = /bin/sh
-
- LIBSRCS = error.c malloc.c memchr.c mkdir.c \
-- realloc.c rmdir.c strcasecmp.c strncasecmp.c
-+ realloc.c rmdir.c strcasecmp.c strncasecmp.c hash.c
- SRCS = $(LIBSRCS) \
- addext.c argmatch.c backupfile.c \
- basename.c dirname.c \
-@@ -78,12 +78,12 @@
- maketime.$(OBJEXT) partime.$(OBJEXT) \
- patch.$(OBJEXT) pch.$(OBJEXT) \
- quote.$(OBJEXT) quotearg.$(OBJEXT) quotesys.$(OBJEXT) \
-- util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT)
-+ util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT) hash.$(OBJEXT)
- HDRS = argmatch.h backupfile.h common.h dirname.h \
- error.h getopt.h gettext.h \
- inp.h maketime.h partime.h pch.h \
- quote.h quotearg.h quotesys.h \
-- unlocked-io.h util.h version.h xalloc.h
-+ unlocked-io.h util.h version.h xalloc.h hash.h
- MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
- aclocal.m4 \
- config.hin configure configure.ac \
---- patch-2.5.9.orig/aclocal.m4
-+++ patch-2.5.9/aclocal.m4
-@@ -1,3 +1,1058 @@
-+dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-+
-+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-+dnl This file is free software; the Free Software Foundation
-+dnl gives unlimited permission to copy and/or distribute it,
-+dnl with or without modifications, as long as this notice is preserved.
-+
-+dnl This program is distributed in the hope that it will be useful,
-+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-+dnl PARTICULAR PURPOSE.
-+
-+# lib-prefix.m4 serial 3 (gettext-0.13)
-+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-+dnl require excessive bracketing.
-+ifdef([AC_HELP_STRING],
-+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-+
-+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-+dnl to access previously installed libraries. The basic assumption is that
-+dnl a user will want packages to use other packages he previously installed
-+dnl with the same --prefix option.
-+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-+dnl libraries, but is otherwise very convenient.
-+AC_DEFUN([AC_LIB_PREFIX],
-+[
-+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
-+ AC_REQUIRE([AC_PROG_CC])
-+ AC_REQUIRE([AC_CANONICAL_HOST])
-+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-+ dnl By default, look in $includedir and $libdir.
-+ use_additional=yes
-+ AC_LIB_WITH_FINAL_PREFIX([
-+ eval additional_includedir=\"$includedir\"
-+ eval additional_libdir=\"$libdir\"
-+ ])
-+ AC_LIB_ARG_WITH([lib-prefix],
-+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
-+ --without-lib-prefix don't search for libraries in includedir and libdir],
-+[
-+ if test "X$withval" = "Xno"; then
-+ use_additional=no
-+ else
-+ if test "X$withval" = "X"; then
-+ AC_LIB_WITH_FINAL_PREFIX([
-+ eval additional_includedir=\"$includedir\"
-+ eval additional_libdir=\"$libdir\"
-+ ])
-+ else
-+ additional_includedir="$withval/include"
-+ additional_libdir="$withval/lib"
-+ fi
-+ fi
-+])
-+ if test $use_additional = yes; then
-+ dnl Potentially add $additional_includedir to $CPPFLAGS.
-+ dnl But don't add it
-+ dnl 1. if it's the standard /usr/include,
-+ dnl 2. if it's already present in $CPPFLAGS,
-+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
-+ dnl 4. if it doesn't exist as a directory.
-+ if test "X$additional_includedir" != "X/usr/include"; then
-+ haveit=
-+ for x in $CPPFLAGS; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-I$additional_includedir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test "X$additional_includedir" = "X/usr/local/include"; then
-+ if test -n "$GCC"; then
-+ case $host_os in
-+ linux*) haveit=yes;;
-+ esac
-+ fi
-+ fi
-+ if test -z "$haveit"; then
-+ if test -d "$additional_includedir"; then
-+ dnl Really add $additional_includedir to $CPPFLAGS.
-+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
-+ fi
-+ fi
-+ fi
-+ fi
-+ dnl Potentially add $additional_libdir to $LDFLAGS.
-+ dnl But don't add it
-+ dnl 1. if it's the standard /usr/lib,
-+ dnl 2. if it's already present in $LDFLAGS,
-+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
-+ dnl 4. if it doesn't exist as a directory.
-+ if test "X$additional_libdir" != "X/usr/lib"; then
-+ haveit=
-+ for x in $LDFLAGS; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-L$additional_libdir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test "X$additional_libdir" = "X/usr/local/lib"; then
-+ if test -n "$GCC"; then
-+ case $host_os in
-+ linux*) haveit=yes;;
-+ esac
-+ fi
-+ fi
-+ if test -z "$haveit"; then
-+ if test -d "$additional_libdir"; then
-+ dnl Really add $additional_libdir to $LDFLAGS.
-+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
-+ fi
-+ fi
-+ fi
-+ fi
-+ fi
-+])
-+
-+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-+dnl acl_final_exec_prefix, containing the values to which $prefix and
-+dnl $exec_prefix will expand at the end of the configure script.
-+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-+[
-+ dnl Unfortunately, prefix and exec_prefix get only finally determined
-+ dnl at the end of configure.
-+ if test "X$prefix" = "XNONE"; then
-+ acl_final_prefix="$ac_default_prefix"
-+ else
-+ acl_final_prefix="$prefix"
-+ fi
-+ if test "X$exec_prefix" = "XNONE"; then
-+ acl_final_exec_prefix='${prefix}'
-+ else
-+ acl_final_exec_prefix="$exec_prefix"
-+ fi
-+ acl_save_prefix="$prefix"
-+ prefix="$acl_final_prefix"
-+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-+ prefix="$acl_save_prefix"
-+])
-+
-+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-+dnl variables prefix and exec_prefix bound to the values they will have
-+dnl at the end of the configure script.
-+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-+[
-+ acl_save_prefix="$prefix"
-+ prefix="$acl_final_prefix"
-+ acl_save_exec_prefix="$exec_prefix"
-+ exec_prefix="$acl_final_exec_prefix"
-+ $1
-+ exec_prefix="$acl_save_exec_prefix"
-+ prefix="$acl_save_prefix"
-+])
-+
-+# lib-link.m4 serial 4 (gettext-0.12)
-+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-+dnl the libraries corresponding to explicit and implicit dependencies.
-+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-+dnl augments the CPPFLAGS variable.
-+AC_DEFUN([AC_LIB_LINKFLAGS],
-+[
-+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-+ AC_REQUIRE([AC_LIB_RPATH])
-+ define([Name],[translit([$1],[./-], [___])])
-+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
-+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
-+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
-+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
-+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
-+ ])
-+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
-+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
-+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
-+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-+ AC_SUBST([LIB]NAME)
-+ AC_SUBST([LTLIB]NAME)
-+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
-+ dnl results of this search when this library appears as a dependency.
-+ HAVE_LIB[]NAME=yes
-+ undefine([Name])
-+ undefine([NAME])
-+])
-+
-+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-+dnl searches for libname and the libraries corresponding to explicit and
-+dnl implicit dependencies, together with the specified include files and
-+dnl the ability to compile and link the specified testcode. If found, it
-+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-+[
-+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-+ AC_REQUIRE([AC_LIB_RPATH])
-+ define([Name],[translit([$1],[./-], [___])])
-+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-+
-+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
-+ dnl accordingly.
-+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
-+
-+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
-+ dnl because if the user has installed lib[]Name and not disabled its use
-+ dnl via --without-lib[]Name-prefix, he wants to use it.
-+ ac_save_CPPFLAGS="$CPPFLAGS"
-+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-+
-+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
-+ ac_save_LIBS="$LIBS"
-+ LIBS="$LIBS $LIB[]NAME"
-+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
-+ LIBS="$ac_save_LIBS"
-+ ])
-+ if test "$ac_cv_lib[]Name" = yes; then
-+ HAVE_LIB[]NAME=yes
-+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
-+ AC_MSG_CHECKING([how to link with lib[]$1])
-+ AC_MSG_RESULT([$LIB[]NAME])
-+ else
-+ HAVE_LIB[]NAME=no
-+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
-+ dnl $INC[]NAME either.
-+ CPPFLAGS="$ac_save_CPPFLAGS"
-+ LIB[]NAME=
-+ LTLIB[]NAME=
-+ fi
-+ AC_SUBST([HAVE_LIB]NAME)
-+ AC_SUBST([LIB]NAME)
-+ AC_SUBST([LTLIB]NAME)
-+ undefine([Name])
-+ undefine([NAME])
-+])
-+
-+dnl Determine the platform dependent parameters needed to use rpath:
-+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-+dnl hardcode_direct, hardcode_minus_L.
-+AC_DEFUN([AC_LIB_RPATH],
-+[
-+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
-+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
-+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
-+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
-+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-+ . ./conftest.sh
-+ rm -f ./conftest.sh
-+ acl_cv_rpath=done
-+ ])
-+ wl="$acl_cv_wl"
-+ libext="$acl_cv_libext"
-+ shlibext="$acl_cv_shlibext"
-+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-+ hardcode_direct="$acl_cv_hardcode_direct"
-+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
-+ dnl Determine whether the user wants rpath handling at all.
-+ AC_ARG_ENABLE(rpath,
-+ [ --disable-rpath do not hardcode runtime library paths],
-+ :, enable_rpath=yes)
-+])
-+
-+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-+dnl the libraries corresponding to explicit and implicit dependencies.
-+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-+[
-+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-+ dnl By default, look in $includedir and $libdir.
-+ use_additional=yes
-+ AC_LIB_WITH_FINAL_PREFIX([
-+ eval additional_includedir=\"$includedir\"
-+ eval additional_libdir=\"$libdir\"
-+ ])
-+ AC_LIB_ARG_WITH([lib$1-prefix],
-+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
-+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-+[
-+ if test "X$withval" = "Xno"; then
-+ use_additional=no
-+ else
-+ if test "X$withval" = "X"; then
-+ AC_LIB_WITH_FINAL_PREFIX([
-+ eval additional_includedir=\"$includedir\"
-+ eval additional_libdir=\"$libdir\"
-+ ])
-+ else
-+ additional_includedir="$withval/include"
-+ additional_libdir="$withval/lib"
-+ fi
-+ fi
-+])
-+ dnl Search the library and its dependencies in $additional_libdir and
-+ dnl $LDFLAGS. Using breadth-first-seach.
-+ LIB[]NAME=
-+ LTLIB[]NAME=
-+ INC[]NAME=
-+ rpathdirs=
-+ ltrpathdirs=
-+ names_already_handled=
-+ names_next_round='$1 $2'
-+ while test -n "$names_next_round"; do
-+ names_this_round="$names_next_round"
-+ names_next_round=
-+ for name in $names_this_round; do
-+ already_handled=
-+ for n in $names_already_handled; do
-+ if test "$n" = "$name"; then
-+ already_handled=yes
-+ break
-+ fi
-+ done
-+ if test -z "$already_handled"; then
-+ names_already_handled="$names_already_handled $name"
-+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
-+ dnl or AC_LIB_HAVE_LINKFLAGS call.
-+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-+ eval value=\"\$HAVE_LIB$uppername\"
-+ if test -n "$value"; then
-+ if test "$value" = yes; then
-+ eval value=\"\$LIB$uppername\"
-+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
-+ eval value=\"\$LTLIB$uppername\"
-+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
-+ else
-+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
-+ dnl that this library doesn't exist. So just drop it.
-+ :
-+ fi
-+ else
-+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
-+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
-+ found_dir=
-+ found_la=
-+ found_so=
-+ found_a=
-+ if test $use_additional = yes; then
-+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
-+ found_dir="$additional_libdir"
-+ found_so="$additional_libdir/lib$name.$shlibext"
-+ if test -f "$additional_libdir/lib$name.la"; then
-+ found_la="$additional_libdir/lib$name.la"
-+ fi
-+ else
-+ if test -f "$additional_libdir/lib$name.$libext"; then
-+ found_dir="$additional_libdir"
-+ found_a="$additional_libdir/lib$name.$libext"
-+ if test -f "$additional_libdir/lib$name.la"; then
-+ found_la="$additional_libdir/lib$name.la"
-+ fi
-+ fi
-+ fi
-+ fi
-+ if test "X$found_dir" = "X"; then
-+ for x in $LDFLAGS $LTLIB[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ case "$x" in
-+ -L*)
-+ dir=`echo "X$x" | sed -e 's/^X-L//'`
-+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
-+ found_dir="$dir"
-+ found_so="$dir/lib$name.$shlibext"
-+ if test -f "$dir/lib$name.la"; then
-+ found_la="$dir/lib$name.la"
-+ fi
-+ else
-+ if test -f "$dir/lib$name.$libext"; then
-+ found_dir="$dir"
-+ found_a="$dir/lib$name.$libext"
-+ if test -f "$dir/lib$name.la"; then
-+ found_la="$dir/lib$name.la"
-+ fi
-+ fi
-+ fi
-+ ;;
-+ esac
-+ if test "X$found_dir" != "X"; then
-+ break
-+ fi
-+ done
-+ fi
-+ if test "X$found_dir" != "X"; then
-+ dnl Found the library.
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
-+ if test "X$found_so" != "X"; then
-+ dnl Linking with a shared library. We attempt to hardcode its
-+ dnl directory into the executable's runpath, unless it's the
-+ dnl standard /usr/lib.
-+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
-+ dnl No hardcoding is needed.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-+ else
-+ dnl Use an explicit option to hardcode DIR into the resulting
-+ dnl binary.
-+ dnl Potentially add DIR to ltrpathdirs.
-+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-+ haveit=
-+ for x in $ltrpathdirs; do
-+ if test "X$x" = "X$found_dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ ltrpathdirs="$ltrpathdirs $found_dir"
-+ fi
-+ dnl The hardcoding into $LIBNAME is system dependent.
-+ if test "$hardcode_direct" = yes; then
-+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
-+ dnl resulting binary.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-+ else
-+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-+ dnl Use an explicit option to hardcode DIR into the resulting
-+ dnl binary.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-+ dnl Potentially add DIR to rpathdirs.
-+ dnl The rpathdirs will be appended to $LIBNAME at the end.
-+ haveit=
-+ for x in $rpathdirs; do
-+ if test "X$x" = "X$found_dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ rpathdirs="$rpathdirs $found_dir"
-+ fi
-+ else
-+ dnl Rely on "-L$found_dir".
-+ dnl But don't add it if it's already contained in the LDFLAGS
-+ dnl or the already constructed $LIBNAME
-+ haveit=
-+ for x in $LDFLAGS $LIB[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-L$found_dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
-+ fi
-+ if test "$hardcode_minus_L" != no; then
-+ dnl FIXME: Not sure whether we should use
-+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-+ dnl here.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-+ else
-+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
-+ dnl here, because this doesn't fit in flags passed to the
-+ dnl compiler. So give up. No hardcoding. This affects only
-+ dnl very old systems.
-+ dnl FIXME: Not sure whether we should use
-+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-+ dnl here.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-+ fi
-+ fi
-+ fi
-+ fi
-+ else
-+ if test "X$found_a" != "X"; then
-+ dnl Linking with a static library.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
-+ else
-+ dnl We shouldn't come here, but anyway it's good to have a
-+ dnl fallback.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
-+ fi
-+ fi
-+ dnl Assume the include files are nearby.
-+ additional_includedir=
-+ case "$found_dir" in
-+ */lib | */lib/)
-+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
-+ additional_includedir="$basedir/include"
-+ ;;
-+ esac
-+ if test "X$additional_includedir" != "X"; then
-+ dnl Potentially add $additional_includedir to $INCNAME.
-+ dnl But don't add it
-+ dnl 1. if it's the standard /usr/include,
-+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
-+ dnl 3. if it's already present in $CPPFLAGS or the already
-+ dnl constructed $INCNAME,
-+ dnl 4. if it doesn't exist as a directory.
-+ if test "X$additional_includedir" != "X/usr/include"; then
-+ haveit=
-+ if test "X$additional_includedir" = "X/usr/local/include"; then
-+ if test -n "$GCC"; then
-+ case $host_os in
-+ linux*) haveit=yes;;
-+ esac
-+ fi
-+ fi
-+ if test -z "$haveit"; then
-+ for x in $CPPFLAGS $INC[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-I$additional_includedir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test -d "$additional_includedir"; then
-+ dnl Really add $additional_includedir to $INCNAME.
-+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
-+ fi
-+ fi
-+ fi
-+ fi
-+ fi
-+ dnl Look for dependencies.
-+ if test -n "$found_la"; then
-+ dnl Read the .la file. It defines the variables
-+ dnl dlname, library_names, old_library, dependency_libs, current,
-+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
-+ save_libdir="$libdir"
-+ case "$found_la" in
-+ */* | *\\*) . "$found_la" ;;
-+ *) . "./$found_la" ;;
-+ esac
-+ libdir="$save_libdir"
-+ dnl We use only dependency_libs.
-+ for dep in $dependency_libs; do
-+ case "$dep" in
-+ -L*)
-+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
-+ dnl But don't add it
-+ dnl 1. if it's the standard /usr/lib,
-+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
-+ dnl 3. if it's already present in $LDFLAGS or the already
-+ dnl constructed $LIBNAME,
-+ dnl 4. if it doesn't exist as a directory.
-+ if test "X$additional_libdir" != "X/usr/lib"; then
-+ haveit=
-+ if test "X$additional_libdir" = "X/usr/local/lib"; then
-+ if test -n "$GCC"; then
-+ case $host_os in
-+ linux*) haveit=yes;;
-+ esac
-+ fi
-+ fi
-+ if test -z "$haveit"; then
-+ haveit=
-+ for x in $LDFLAGS $LIB[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-L$additional_libdir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test -d "$additional_libdir"; then
-+ dnl Really add $additional_libdir to $LIBNAME.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
-+ fi
-+ fi
-+ haveit=
-+ for x in $LDFLAGS $LTLIB[]NAME; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X-L$additional_libdir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ if test -d "$additional_libdir"; then
-+ dnl Really add $additional_libdir to $LTLIBNAME.
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
-+ fi
-+ fi
-+ fi
-+ fi
-+ ;;
-+ -R*)
-+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
-+ if test "$enable_rpath" != no; then
-+ dnl Potentially add DIR to rpathdirs.
-+ dnl The rpathdirs will be appended to $LIBNAME at the end.
-+ haveit=
-+ for x in $rpathdirs; do
-+ if test "X$x" = "X$dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ rpathdirs="$rpathdirs $dir"
-+ fi
-+ dnl Potentially add DIR to ltrpathdirs.
-+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-+ haveit=
-+ for x in $ltrpathdirs; do
-+ if test "X$x" = "X$dir"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ ltrpathdirs="$ltrpathdirs $dir"
-+ fi
-+ fi
-+ ;;
-+ -l*)
-+ dnl Handle this in the next round.
-+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-+ ;;
-+ *.la)
-+ dnl Handle this in the next round. Throw away the .la's
-+ dnl directory; it is already contained in a preceding -L
-+ dnl option.
-+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-+ ;;
-+ *)
-+ dnl Most likely an immediate library name.
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
-+ ;;
-+ esac
-+ done
-+ fi
-+ else
-+ dnl Didn't find the library; assume it is in the system directories
-+ dnl known to the linker and runtime loader. (All the system
-+ dnl directories known to the linker should also be known to the
-+ dnl runtime loader, otherwise the system is severely misconfigured.)
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
-+ fi
-+ fi
-+ fi
-+ done
-+ done
-+ if test "X$rpathdirs" != "X"; then
-+ if test -n "$hardcode_libdir_separator"; then
-+ dnl Weird platform: only the last -rpath option counts, the user must
-+ dnl pass all path elements in one option. We can arrange that for a
-+ dnl single library, but not when more than one $LIBNAMEs are used.
-+ alldirs=
-+ for found_dir in $rpathdirs; do
-+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
-+ done
-+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
-+ acl_save_libdir="$libdir"
-+ libdir="$alldirs"
-+ eval flag=\"$hardcode_libdir_flag_spec\"
-+ libdir="$acl_save_libdir"
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-+ else
-+ dnl The -rpath options are cumulative.
-+ for found_dir in $rpathdirs; do
-+ acl_save_libdir="$libdir"
-+ libdir="$found_dir"
-+ eval flag=\"$hardcode_libdir_flag_spec\"
-+ libdir="$acl_save_libdir"
-+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-+ done
-+ fi
-+ fi
-+ if test "X$ltrpathdirs" != "X"; then
-+ dnl When using libtool, the option that works for both libraries and
-+ dnl executables is -R. The -R options are cumulative.
-+ for found_dir in $ltrpathdirs; do
-+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
-+ done
-+ fi
-+])
-+
-+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-+dnl unless already present in VAR.
-+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-+dnl contains two or three consecutive elements that belong together.
-+AC_DEFUN([AC_LIB_APPENDTOVAR],
-+[
-+ for element in [$2]; do
-+ haveit=
-+ for x in $[$1]; do
-+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-+ if test "X$x" = "X$element"; then
-+ haveit=yes
-+ break
-+ fi
-+ done
-+ if test -z "$haveit"; then
-+ [$1]="${[$1]}${[$1]:+ }$element"
-+ fi
-+ done
-+])
-+
-+# lib-ld.m4 serial 3 (gettext-0.13)
-+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl Subroutines of libtool.m4,
-+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-+dnl with libtool.m4.
-+
-+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-+AC_DEFUN([AC_LIB_PROG_LD_GNU],
-+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-+case `$LD -v 2>&1 </dev/null` in
-+*GNU* | *'with BFD'*)
-+ acl_cv_prog_gnu_ld=yes ;;
-+*)
-+ acl_cv_prog_gnu_ld=no ;;
-+esac])
-+with_gnu_ld=$acl_cv_prog_gnu_ld
-+])
-+
-+dnl From libtool-1.4. Sets the variable LD.
-+AC_DEFUN([AC_LIB_PROG_LD],
-+[AC_ARG_WITH(gnu-ld,
-+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-+AC_REQUIRE([AC_PROG_CC])dnl
-+AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+# Prepare PATH_SEPARATOR.
-+# The user is always right.
-+if test "${PATH_SEPARATOR+set}" != set; then
-+ echo "#! /bin/sh" >conf$$.sh
-+ echo "exit 0" >>conf$$.sh
-+ chmod +x conf$$.sh
-+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-+ PATH_SEPARATOR=';'
-+ else
-+ PATH_SEPARATOR=:
-+ fi
-+ rm -f conf$$.sh
-+fi
-+ac_prog=ld
-+if test "$GCC" = yes; then
-+ # Check if gcc -print-prog-name=ld gives a path.
-+ AC_MSG_CHECKING([for ld used by GCC])
-+ case $host in
-+ *-*-mingw*)
-+ # gcc leaves a trailing carriage return which upsets mingw
-+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-+ *)
-+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-+ esac
-+ case $ac_prog in
-+ # Accept absolute paths.
-+ [[\\/]* | [A-Za-z]:[\\/]*)]
-+ [re_direlt='/[^/][^/]*/\.\./']
-+ # Canonicalize the path of ld
-+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-+ done
-+ test -z "$LD" && LD="$ac_prog"
-+ ;;
-+ "")
-+ # If it fails, then pretend we aren't using GCC.
-+ ac_prog=ld
-+ ;;
-+ *)
-+ # If it is relative, then search for the first ld in PATH.
-+ with_gnu_ld=unknown
-+ ;;
-+ esac
-+elif test "$with_gnu_ld" = yes; then
-+ AC_MSG_CHECKING([for GNU ld])
-+else
-+ AC_MSG_CHECKING([for non-GNU ld])
-+fi
-+AC_CACHE_VAL(acl_cv_path_LD,
-+[if test -z "$LD"; then
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-+ for ac_dir in $PATH; do
-+ test -z "$ac_dir" && ac_dir=.
-+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-+ acl_cv_path_LD="$ac_dir/$ac_prog"
-+ # Check to see if the program is GNU ld. I'd rather use --version,
-+ # but apparently some GNU ld's only accept -v.
-+ # Break only if it was the GNU/non-GNU ld that we prefer.
-+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-+ *GNU* | *'with BFD'*)
-+ test "$with_gnu_ld" != no && break ;;
-+ *)
-+ test "$with_gnu_ld" != yes && break ;;
-+ esac
-+ fi
-+ done
-+ IFS="$ac_save_ifs"
-+else
-+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
-+fi])
-+LD="$acl_cv_path_LD"
-+if test -n "$LD"; then
-+ AC_MSG_RESULT($LD)
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-+AC_LIB_PROG_LD_GNU
-+])
-+
-+# isc-posix.m4 serial 2 (gettext-0.11.2)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
-+
-+# This test replaces the one in autoconf.
-+# Currently this macro should have the same name as the autoconf macro
-+# because gettext's gettext.m4 (distributed in the automake package)
-+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-+# give these diagnostics:
-+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-+
-+undefine([AC_ISC_POSIX])
-+
-+AC_DEFUN([AC_ISC_POSIX],
-+ [
-+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
-+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
-+ ]
-+)
-+
-+# Check for stdbool.h that conforms to C99.
-+
-+# Copyright (C) 2002-2003 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2, or (at your option)
-+# any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-+# 02111-1307, USA.
-+
-+# Prepare for substituting <stdbool.h> if it is not supported.
-+
-+AC_DEFUN([AM_STDBOOL_H],
-+[
-+ AC_REQUIRE([AC_HEADER_STDBOOL])
-+
-+ # Define two additional variables used in the Makefile substitution.
-+
-+ if test "$ac_cv_header_stdbool_h" = yes; then
-+ STDBOOL_H=''
-+ else
-+ STDBOOL_H='stdbool.h'
-+ fi
-+ AC_SUBST([STDBOOL_H])
-+
-+ if test "$ac_cv_type__Bool" = yes; then
-+ HAVE__BOOL=1
-+ else
-+ HAVE__BOOL=0
-+ fi
-+ AC_SUBST([HAVE__BOOL])
-+])
-+
-+# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
-+# have this macro built-in.
-+
-+AC_DEFUN([AC_HEADER_STDBOOL],
-+ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
-+ [ac_cv_header_stdbool_h],
-+ [AC_TRY_COMPILE(
-+ [
-+ #include <stdbool.h>
-+ #ifndef bool
-+ "error: bool is not defined"
-+ #endif
-+ #ifndef false
-+ "error: false is not defined"
-+ #endif
-+ #if false
-+ "error: false is not 0"
-+ #endif
-+ #ifndef true
-+ "error: false is not defined"
-+ #endif
-+ #if true != 1
-+ "error: true is not 1"
-+ #endif
-+ #ifndef __bool_true_false_are_defined
-+ "error: __bool_true_false_are_defined is not defined"
-+ #endif
-+
-+ struct s { _Bool s: 1; _Bool t; } s;
-+
-+ char a[true == 1 ? 1 : -1];
-+ char b[false == 0 ? 1 : -1];
-+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-+ char d[(bool) -0.5 == true ? 1 : -1];
-+ bool e = &s;
-+ char f[(_Bool) -0.0 == false ? 1 : -1];
-+ char g[true];
-+ char h[sizeof (_Bool)];
-+ char i[sizeof s.t];
-+ ],
-+ [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
-+ [ac_cv_header_stdbool_h=yes],
-+ [ac_cv_header_stdbool_h=no])])
-+ AC_CHECK_TYPES([_Bool])
-+ if test $ac_cv_header_stdbool_h = yes; then
-+ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
-+ fi])
-+
-+#serial 5
-+
-+dnl From Jim Meyering
-+
-+dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
-+dnl usually in <utime.h>.
-+dnl Some systems have utime.h but don't declare the struct anywhere.
-+
-+AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
-+[
-+ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
-+ AC_REQUIRE([AC_HEADER_TIME])
-+ AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
-+ [AC_TRY_COMPILE(
-+ [
-+#ifdef TIME_WITH_SYS_TIME
-+# include <sys/time.h>
-+# include <time.h>
-+#else
-+# ifdef HAVE_SYS_TIME_H
-+# include <sys/time.h>
-+# else
-+# include <time.h>
-+# endif
-+#endif
-+#ifdef HAVE_UTIME_H
-+# include <utime.h>
-+#endif
-+ ],
-+ [static struct utimbuf x; x.actime = x.modtime;],
-+ fu_cv_sys_struct_utimbuf=yes,
-+ fu_cv_sys_struct_utimbuf=no)
-+ ])
-+
-+ if test $fu_cv_sys_struct_utimbuf = yes; then
-+ AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
-+ [Define if struct utimbuf is declared -- usually in <utime.h>.
-+ Some systems have utime.h but don't declare the struct anywhere. ])
-+ fi
-+])
-+
-+# onceonly.m4 serial 3
-+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl This file defines some "once only" variants of standard autoconf macros.
-+dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
-+dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
-+dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
-+dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
-+dnl The advantage is that the check for each of the headers/functions/decls
-+dnl will be put only once into the 'configure' file. It keeps the size of
-+dnl the 'configure' file down, and avoids redundant output when 'configure'
-+dnl is run.
-+dnl The drawback is that the checks cannot be conditionalized. If you write
-+dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
-+dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
-+dnl empty, and the check will be inserted before the body of the AC_DEFUNed
-+dnl function.
-+
-+dnl Autoconf version 2.57 or newer is recommended.
-+AC_PREREQ(2.54)
-+
-+# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
-+# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
-+AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
-+ :
-+ AC_FOREACH([gl_HEADER_NAME], [$1], [
-+ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
-+ [-./], [___])), [
-+ AC_CHECK_HEADERS(gl_HEADER_NAME)
-+ ])
-+ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
-+ [-./], [___])))
-+ ])
-+])
-+
-+# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
-+# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
-+AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
-+ :
-+ AC_FOREACH([gl_FUNC_NAME], [$1], [
-+ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
-+ AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
-+ ])
-+ AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
-+ ])
-+])
-+
-+# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
-+# AC_CHECK_DECLS(DECL1, DECL2, ...).
-+AC_DEFUN([AC_CHECK_DECLS_ONCE], [
-+ :
-+ AC_FOREACH([gl_DECL_NAME], [$1], [
-+ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
-+ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
-+ ])
-+ AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
-+ ])
-+])
-+
- # backupfile.m4 serial 1
- dnl Copyright (C) 2002 Free Software Foundation, Inc.
- dnl This file is free software, distributed under the terms of the GNU
-@@ -21,6 +1076,7 @@
- AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
- AC_CHECK_FUNCS(pathconf)
- ])
-+
- #serial 5
-
- dnl From Jim Meyering.
-@@ -63,31 +1119,7 @@
- fi
- ]
- )
--# dirname.m4 serial 1
--dnl Copyright (C) 2002 Free Software Foundation, Inc.
--dnl This file is free software, distributed under the terms of the GNU
--dnl General Public License. As a special exception to the GNU General
--dnl Public License, this file may be distributed as part of a program
--dnl that contains a configuration script generated by Autoconf, under
--dnl the same distribution terms as the rest of that program.
-
--AC_DEFUN([gl_DIRNAME],
--[
-- dnl Prerequisites of lib/dirname.h.
-- AC_REQUIRE([jm_AC_DOS])
--
-- dnl Prerequisites of lib/dirname.c.
-- AC_REQUIRE([AC_HEADER_STDC])
-- AC_CHECK_HEADERS_ONCE(string.h)
--
-- dnl Prerequisites of lib/basename.c.
-- AC_REQUIRE([AC_HEADER_STDC])
-- AC_CHECK_HEADERS_ONCE(string.h)
--
-- dnl Prerequisites of lib/stripslash.c.
-- AC_REQUIRE([AC_HEADER_STDC])
-- AC_CHECK_HEADERS_ONCE(string.h)
--])
- #serial 5
-
- # Define some macros required for proper operation of code in lib/*.c
-@@ -141,6 +1173,33 @@
- [Define if the backslash character may also serve as a file name
- component separator.])
- ])
-+
-+# dirname.m4 serial 1
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+AC_DEFUN([gl_DIRNAME],
-+[
-+ dnl Prerequisites of lib/dirname.h.
-+ AC_REQUIRE([jm_AC_DOS])
-+
-+ dnl Prerequisites of lib/dirname.c.
-+ AC_REQUIRE([AC_HEADER_STDC])
-+ AC_CHECK_HEADERS_ONCE(string.h)
-+
-+ dnl Prerequisites of lib/basename.c.
-+ AC_REQUIRE([AC_HEADER_STDC])
-+ AC_CHECK_HEADERS_ONCE(string.h)
-+
-+ dnl Prerequisites of lib/stripslash.c.
-+ AC_REQUIRE([AC_HEADER_STDC])
-+ AC_CHECK_HEADERS_ONCE(string.h)
-+])
-+
- #serial 7
-
- AC_DEFUN([gl_ERROR],
-@@ -159,7 +1218,67 @@
- AC_CHECK_DECLS([strerror])
- AC_FUNC_STRERROR_R
- ])
--# getopt.m4 serial 1
-+
-+# memchr.m4 serial 1
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+AC_DEFUN([gl_FUNC_MEMCHR],
-+[
-+ AC_REPLACE_FUNCS(memchr)
-+ if test $ac_cv_func_memchr = no; then
-+ jm_PREREQ_MEMCHR
-+ fi
-+])
-+
-+# Prerequisites of lib/memchr.c.
-+AC_DEFUN([jm_PREREQ_MEMCHR], [
-+ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
-+ AC_CHECK_HEADERS(bp-sym.h)
-+])
-+
-+# rmdir.m4 serial 1
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+AC_DEFUN([gl_FUNC_RMDIR],
-+[
-+ AC_REPLACE_FUNCS(rmdir)
-+ if test $ac_cv_func_rmdir = no; then
-+ gl_PREREQ_RMDIR
-+ fi
-+])
-+
-+# Prerequisites of lib/rmdir.c.
-+AC_DEFUN([gl_PREREQ_RMDIR], [
-+ AC_REQUIRE([AC_HEADER_STAT])
-+ :
-+])
-+
-+
-+# getopt.m4 serial 1
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+AC_DEFUN([gl_GETOPT],
-+[
-+ dnl Prerequisites of lib/getopt.c.
-+ AC_CHECK_HEADERS_ONCE(string.h)
-+])
-+
-+# xalloc.m4 serial 1
- dnl Copyright (C) 2002 Free Software Foundation, Inc.
- dnl This file is free software, distributed under the terms of the GNU
- dnl General Public License. As a special exception to the GNU General
-@@ -167,11 +1286,25 @@
- dnl that contains a configuration script generated by Autoconf, under
- dnl the same distribution terms as the rest of that program.
-
--AC_DEFUN([gl_GETOPT],
-+AC_DEFUN([gl_XALLOC],
- [
-- dnl Prerequisites of lib/getopt.c.
-+ gl_PREREQ_XMALLOC
-+ gl_PREREQ_XSTRDUP
-+])
-+
-+# Prerequisites of lib/xmalloc.c.
-+AC_DEFUN([gl_PREREQ_XMALLOC], [
-+ AC_REQUIRE([AC_HEADER_STDC])
-+ AC_REQUIRE([jm_FUNC_MALLOC])
-+ AC_REQUIRE([jm_FUNC_REALLOC])
-+])
-+
-+# Prerequisites of lib/xstrdup.c.
-+AC_DEFUN([gl_PREREQ_XSTRDUP], [
-+ AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS_ONCE(string.h)
- ])
-+
- # malloc.m4 serial 7
- dnl Copyright (C) 2002 Free Software Foundation, Inc.
- dnl This file is free software, distributed under the terms of the GNU
-@@ -197,66 +1330,8 @@
- AC_DEFUN([gl_PREREQ_MALLOC], [
- :
- ])
--# mbrtowc.m4 serial 5
--dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
--dnl This file is free software, distributed under the terms of the GNU
--dnl General Public License. As a special exception to the GNU General
--dnl Public License, this file may be distributed as part of a program
--dnl that contains a configuration script generated by Autoconf, under
--dnl the same distribution terms as the rest of that program.
--
--dnl From Paul Eggert
--
--dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
--dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
--
--AC_DEFUN([jm_FUNC_MBRTOWC],
--[
-- AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
-- jm_cv_func_mbrtowc,
-- [AC_TRY_LINK(
-- [#include <wchar.h>],
-- [mbstate_t state; return ! (sizeof state && mbrtowc);],
-- jm_cv_func_mbrtowc=yes,
-- jm_cv_func_mbrtowc=no)])
-- if test $jm_cv_func_mbrtowc = yes; then
-- AC_DEFINE(HAVE_MBRTOWC, 1,
-- [Define to 1 if mbrtowc and mbstate_t are properly declared.])
-- fi
--])
--# mbstate_t.m4 serial 9
--dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
--dnl This file is free software, distributed under the terms of the GNU
--dnl General Public License. As a special exception to the GNU General
--dnl Public License, this file may be distributed as part of a program
--dnl that contains a configuration script generated by Autoconf, under
--dnl the same distribution terms as the rest of that program.
--
--# From Paul Eggert.
--
--# BeOS 5 has <wchar.h> but does not define mbstate_t,
--# so you can't declare an object of that type.
--# Check for this incompatibility with Standard C.
-
--# AC_TYPE_MBSTATE_T
--# -----------------
--AC_DEFUN([AC_TYPE_MBSTATE_T],
-- [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
-- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM(
-- [AC_INCLUDES_DEFAULT
--# include <wchar.h>],
-- [mbstate_t x; return sizeof x;])],
-- [ac_cv_type_mbstate_t=yes],
-- [ac_cv_type_mbstate_t=no])])
-- if test $ac_cv_type_mbstate_t = yes; then
-- AC_DEFINE([HAVE_MBSTATE_T], 1,
-- [Define to 1 if <wchar.h> declares mbstate_t.])
-- else
-- AC_DEFINE([mbstate_t], int,
-- [Define to a type if <wchar.h> does not define.])
-- fi])
--# memchr.m4 serial 1
-+# realloc.m4 serial 7
- dnl Copyright (C) 2002 Free Software Foundation, Inc.
- dnl This file is free software, distributed under the terms of the GNU
- dnl General Public License. As a special exception to the GNU General
-@@ -264,116 +1339,24 @@
- dnl that contains a configuration script generated by Autoconf, under
- dnl the same distribution terms as the rest of that program.
-
--AC_DEFUN([gl_FUNC_MEMCHR],
-+dnl From Jim Meyering.
-+dnl Determine whether realloc works when both arguments are 0.
-+dnl If it doesn't, arrange to use the replacement function.
-+
-+AC_DEFUN([jm_FUNC_REALLOC],
- [
-- AC_REPLACE_FUNCS(memchr)
-- if test $ac_cv_func_memchr = no; then
-- jm_PREREQ_MEMCHR
-+ AC_REQUIRE([AC_FUNC_REALLOC])
-+ dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
-+ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
-+ gl_PREREQ_REALLOC
- fi
- ])
-
--# Prerequisites of lib/memchr.c.
--AC_DEFUN([jm_PREREQ_MEMCHR], [
-- AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
-- AC_CHECK_HEADERS(bp-sym.h)
--])
--#serial 1
--
--dnl From Mumit Khan and Paul Eggert
--dnl Determine whether mkdir accepts only one argument instead of the usual two.
--
--AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
-- [AC_CHECK_FUNCS(mkdir)
-- AC_CACHE_CHECK([whether mkdir takes only one argument],
-- patch_cv_mkdir_takes_one_arg,
-- [patch_cv_mkdir_takes_one_arg=no
-- if test $ac_cv_func_mkdir = yes; then
-- AC_TRY_COMPILE([
--#include <sys/types.h>
--#include <sys/stat.h>
-- ],
-- [mkdir (".", 0);],
-- ,
-- [AC_TRY_COMPILE([
--#include <sys/types.h>
--#include <sys/stat.h>
-- ],
-- [mkdir (".");],
-- patch_cv_mkdir_takes_one_arg=yes
-- )]
-- )
-- fi
-- ]
-- )
-- if test $patch_cv_mkdir_takes_one_arg = yes; then
-- AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
-- [Define if mkdir takes only one argument.])
-- fi
-- ]
--)
--# onceonly.m4 serial 3
--dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
--dnl This file is free software, distributed under the terms of the GNU
--dnl General Public License. As a special exception to the GNU General
--dnl Public License, this file may be distributed as part of a program
--dnl that contains a configuration script generated by Autoconf, under
--dnl the same distribution terms as the rest of that program.
--
--dnl This file defines some "once only" variants of standard autoconf macros.
--dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
--dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
--dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
--dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
--dnl The advantage is that the check for each of the headers/functions/decls
--dnl will be put only once into the 'configure' file. It keeps the size of
--dnl the 'configure' file down, and avoids redundant output when 'configure'
--dnl is run.
--dnl The drawback is that the checks cannot be conditionalized. If you write
--dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
--dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
--dnl empty, and the check will be inserted before the body of the AC_DEFUNed
--dnl function.
--
--dnl Autoconf version 2.57 or newer is recommended.
--AC_PREREQ(2.54)
--
--# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
--# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
--AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
-- :
-- AC_FOREACH([gl_HEADER_NAME], [$1], [
-- AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
-- [-./], [___])), [
-- AC_CHECK_HEADERS(gl_HEADER_NAME)
-- ])
-- AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
-- [-./], [___])))
-- ])
--])
--
--# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
--# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
--AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
-+# Prerequisites of lib/realloc.c.
-+AC_DEFUN([gl_PREREQ_REALLOC], [
- :
-- AC_FOREACH([gl_FUNC_NAME], [$1], [
-- AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
-- AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
-- ])
-- AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
-- ])
- ])
-
--# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
--# AC_CHECK_DECLS(DECL1, DECL2, ...).
--AC_DEFUN([AC_CHECK_DECLS_ONCE], [
-- :
-- AC_FOREACH([gl_DECL_NAME], [$1], [
-- AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
-- AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
-- ])
-- AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
-- ])
--])
- # quote.m4 serial 1
- dnl Copyright (C) 2002 Free Software Foundation, Inc.
- dnl This file is free software, distributed under the terms of the GNU
-@@ -387,6 +1370,7 @@
- dnl Prerequisites of lib/quote.c.
- AC_CHECK_HEADERS_ONCE(stddef.h)
- ])
-+
- # quotearg.m4 serial 1
- dnl Copyright (C) 2002 Free Software Foundation, Inc.
- dnl This file is free software, distributed under the terms of the GNU
-@@ -403,32 +1387,69 @@
- AC_TYPE_MBSTATE_T
- jm_FUNC_MBRTOWC
- ])
--# realloc.m4 serial 7
--dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+
-+# mbstate_t.m4 serial 9
-+dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
- dnl This file is free software, distributed under the terms of the GNU
- dnl General Public License. As a special exception to the GNU General
- dnl Public License, this file may be distributed as part of a program
- dnl that contains a configuration script generated by Autoconf, under
- dnl the same distribution terms as the rest of that program.
-
--dnl From Jim Meyering.
--dnl Determine whether realloc works when both arguments are 0.
--dnl If it doesn't, arrange to use the replacement function.
-+# From Paul Eggert.
-
--AC_DEFUN([jm_FUNC_REALLOC],
-+# BeOS 5 has <wchar.h> but does not define mbstate_t,
-+# so you can't declare an object of that type.
-+# Check for this incompatibility with Standard C.
-+
-+# AC_TYPE_MBSTATE_T
-+# -----------------
-+AC_DEFUN([AC_TYPE_MBSTATE_T],
-+ [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
-+ [AC_COMPILE_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [AC_INCLUDES_DEFAULT
-+# include <wchar.h>],
-+ [mbstate_t x; return sizeof x;])],
-+ [ac_cv_type_mbstate_t=yes],
-+ [ac_cv_type_mbstate_t=no])])
-+ if test $ac_cv_type_mbstate_t = yes; then
-+ AC_DEFINE([HAVE_MBSTATE_T], 1,
-+ [Define to 1 if <wchar.h> declares mbstate_t.])
-+ else
-+ AC_DEFINE([mbstate_t], int,
-+ [Define to a type if <wchar.h> does not define.])
-+ fi])
-+
-+# mbrtowc.m4 serial 5
-+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert
-+
-+dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
-+dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
-+
-+AC_DEFUN([jm_FUNC_MBRTOWC],
- [
-- AC_REQUIRE([AC_FUNC_REALLOC])
-- dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
-- if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
-- gl_PREREQ_REALLOC
-+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
-+ jm_cv_func_mbrtowc,
-+ [AC_TRY_LINK(
-+ [#include <wchar.h>],
-+ [mbstate_t state; return ! (sizeof state && mbrtowc);],
-+ jm_cv_func_mbrtowc=yes,
-+ jm_cv_func_mbrtowc=no)])
-+ if test $jm_cv_func_mbrtowc = yes; then
-+ AC_DEFINE(HAVE_MBRTOWC, 1,
-+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
- fi
- ])
-
--# Prerequisites of lib/realloc.c.
--AC_DEFUN([gl_PREREQ_REALLOC], [
-- :
--])
--# rmdir.m4 serial 1
-+# hash.m4 serial 1
- dnl Copyright (C) 2002 Free Software Foundation, Inc.
- dnl This file is free software, distributed under the terms of the GNU
- dnl General Public License. As a special exception to the GNU General
-@@ -436,18 +1457,71 @@
- dnl that contains a configuration script generated by Autoconf, under
- dnl the same distribution terms as the rest of that program.
-
--AC_DEFUN([gl_FUNC_RMDIR],
-+AC_DEFUN([gl_HASH],
- [
-- AC_REPLACE_FUNCS(rmdir)
-- if test $ac_cv_func_rmdir = no; then
-- gl_PREREQ_RMDIR
-- fi
-+ dnl Prerequisites of lib/hash.c.
-+ AC_CHECK_HEADERS_ONCE(stdlib.h)
-+ AC_HEADER_STDBOOL
-+ AC_CHECK_DECLS_ONCE(free malloc)
- ])
-
--# Prerequisites of lib/rmdir.c.
--AC_DEFUN([gl_PREREQ_RMDIR], [
-- AC_REQUIRE([AC_HEADER_STAT])
-- :
-+AC_DEFUN([ag_CHECK_NANOSECOND_STAT],
-+ [AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
-+ [ac_cv_stat_nsec],
-+ [AC_TRY_COMPILE(
-+ [
-+ #include <sys/types.h>
-+ #include <sys/stat.h>
-+ #include <unistd.h>
-+ struct stat st;
-+ ],
-+ [ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec; ],
-+ [ac_cv_stat_nsec=yes],
-+ [ac_cv_stat_nsec=no])
-+ ])
-+ if test $ac_cv_stat_nsec = yes; then
-+ AC_DEFINE(HAVE_STAT_NSEC, 1, [Define to 1 if struct stat has nanosecond timestamps.])
-+ fi
-+
-+ AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
-+ [ac_cv_stat_timeval],
-+ [AC_TRY_COMPILE(
-+ [
-+ #include <time.h>
-+ #include <sys/types.h>
-+ #include <sys/stat.h>
-+ #include <unistd.h>
-+ struct stat st;
-+ ],
-+ [ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec; ],
-+ [ac_cv_stat_timeval=yes],
-+ [ac_cv_stat_timeval=no])
-+ ])
-+ if test $ac_cv_stat_timeval = yes; then
-+ AC_DEFINE(HAVE_STAT_TIMEVAL, 1, [Define to 1 if struct stat comtains struct timeval's.])
-+ fi])
-+
-+#serial 7 -*- autoconf -*-
-+
-+dnl From Jim Meyering.
-+dnl
-+dnl See if the glibc *_unlocked I/O macros or functions are available.
-+dnl Use only those *_unlocked macros or functions that are declared
-+dnl (because some of them were declared in Solaris 2.5.1 but were removed
-+dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
-+dnl on Solaris 2.6).
-+
-+AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
-+[
-+ dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
-+ dnl etc.
-+ AC_REQUIRE([AC_GNU_SOURCE])
-+
-+ AC_CHECK_DECLS_ONCE(
-+ [clearerr_unlocked feof_unlocked ferror_unlocked
-+ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
-+ fread_unlocked fwrite_unlocked getc_unlocked
-+ getchar_unlocked putc_unlocked putchar_unlocked])
- ])
-
- # Check for setmode, DOS style.
-@@ -488,180 +1562,39 @@
- AC_DEFINE(HAVE_SETMODE_DOS, 1,
- [Define to 1 if you have the DOS-style `setmode' function.])
- fi])
--# Check for stdbool.h that conforms to C99.
--
--# Copyright (C) 2002-2003 Free Software Foundation, Inc.
--
--# This program is free software; you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation; either version 2, or (at your option)
--# any later version.
--
--# This program is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--# GNU General Public License for more details.
--
--# You should have received a copy of the GNU General Public License
--# along with this program; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
--# 02111-1307, USA.
--
--# Prepare for substituting <stdbool.h> if it is not supported.
--
--AC_DEFUN([AM_STDBOOL_H],
--[
-- AC_REQUIRE([AC_HEADER_STDBOOL])
--
-- # Define two additional variables used in the Makefile substitution.
--
-- if test "$ac_cv_header_stdbool_h" = yes; then
-- STDBOOL_H=''
-- else
-- STDBOOL_H='stdbool.h'
-- fi
-- AC_SUBST([STDBOOL_H])
--
-- if test "$ac_cv_type__Bool" = yes; then
-- HAVE__BOOL=1
-- else
-- HAVE__BOOL=0
-- fi
-- AC_SUBST([HAVE__BOOL])
--])
--
--# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
--# have this macro built-in.
--
--AC_DEFUN([AC_HEADER_STDBOOL],
-- [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
-- [ac_cv_header_stdbool_h],
-- [AC_TRY_COMPILE(
-- [
-- #include <stdbool.h>
-- #ifndef bool
-- "error: bool is not defined"
-- #endif
-- #ifndef false
-- "error: false is not defined"
-- #endif
-- #if false
-- "error: false is not 0"
-- #endif
-- #ifndef true
-- "error: false is not defined"
-- #endif
-- #if true != 1
-- "error: true is not 1"
-- #endif
-- #ifndef __bool_true_false_are_defined
-- "error: __bool_true_false_are_defined is not defined"
-- #endif
--
-- struct s { _Bool s: 1; _Bool t; } s;
--
-- char a[true == 1 ? 1 : -1];
-- char b[false == 0 ? 1 : -1];
-- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-- char d[(bool) -0.5 == true ? 1 : -1];
-- bool e = &s;
-- char f[(_Bool) -0.0 == false ? 1 : -1];
-- char g[true];
-- char h[sizeof (_Bool)];
-- char i[sizeof s.t];
-- ],
-- [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
-- [ac_cv_header_stdbool_h=yes],
-- [ac_cv_header_stdbool_h=no])])
-- AC_CHECK_TYPES([_Bool])
-- if test $ac_cv_header_stdbool_h = yes; then
-- AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
-- fi])
--#serial 7 -*- autoconf -*-
--
--dnl From Jim Meyering.
--dnl
--dnl See if the glibc *_unlocked I/O macros or functions are available.
--dnl Use only those *_unlocked macros or functions that are declared
--dnl (because some of them were declared in Solaris 2.5.1 but were removed
--dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
--dnl on Solaris 2.6).
--
--AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
--[
-- dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
-- dnl etc.
-- AC_REQUIRE([AC_GNU_SOURCE])
--
-- AC_CHECK_DECLS_ONCE(
-- [clearerr_unlocked feof_unlocked ferror_unlocked
-- fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
-- fread_unlocked fwrite_unlocked getc_unlocked
-- getchar_unlocked putc_unlocked putchar_unlocked])
--])
--#serial 5
--
--dnl From Jim Meyering
--
--dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
--dnl usually in <utime.h>.
--dnl Some systems have utime.h but don't declare the struct anywhere.
--
--AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
--[
-- AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
-- AC_REQUIRE([AC_HEADER_TIME])
-- AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
-- [AC_TRY_COMPILE(
-- [
--#ifdef TIME_WITH_SYS_TIME
--# include <sys/time.h>
--# include <time.h>
--#else
--# ifdef HAVE_SYS_TIME_H
--# include <sys/time.h>
--# else
--# include <time.h>
--# endif
--#endif
--#ifdef HAVE_UTIME_H
--# include <utime.h>
--#endif
-- ],
-- [static struct utimbuf x; x.actime = x.modtime;],
-- fu_cv_sys_struct_utimbuf=yes,
-- fu_cv_sys_struct_utimbuf=no)
-- ])
-
-- if test $fu_cv_sys_struct_utimbuf = yes; then
-- AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
-- [Define if struct utimbuf is declared -- usually in <utime.h>.
-- Some systems have utime.h but don't declare the struct anywhere. ])
-- fi
--])
--# xalloc.m4 serial 1
--dnl Copyright (C) 2002 Free Software Foundation, Inc.
--dnl This file is free software, distributed under the terms of the GNU
--dnl General Public License. As a special exception to the GNU General
--dnl Public License, this file may be distributed as part of a program
--dnl that contains a configuration script generated by Autoconf, under
--dnl the same distribution terms as the rest of that program.
-+#serial 1
-
--AC_DEFUN([gl_XALLOC],
--[
-- gl_PREREQ_XMALLOC
-- gl_PREREQ_XSTRDUP
--])
-+dnl From Mumit Khan and Paul Eggert
-+dnl Determine whether mkdir accepts only one argument instead of the usual two.
-
--# Prerequisites of lib/xmalloc.c.
--AC_DEFUN([gl_PREREQ_XMALLOC], [
-- AC_REQUIRE([AC_HEADER_STDC])
-- AC_REQUIRE([jm_FUNC_MALLOC])
-- AC_REQUIRE([jm_FUNC_REALLOC])
--])
-+AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
-+ [AC_CHECK_FUNCS(mkdir)
-+ AC_CACHE_CHECK([whether mkdir takes only one argument],
-+ patch_cv_mkdir_takes_one_arg,
-+ [patch_cv_mkdir_takes_one_arg=no
-+ if test $ac_cv_func_mkdir = yes; then
-+ AC_TRY_COMPILE([
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+ ],
-+ [mkdir (".", 0);],
-+ ,
-+ [AC_TRY_COMPILE([
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+ ],
-+ [mkdir (".");],
-+ patch_cv_mkdir_takes_one_arg=yes
-+ )]
-+ )
-+ fi
-+ ]
-+ )
-+ if test $patch_cv_mkdir_takes_one_arg = yes; then
-+ AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
-+ [Define if mkdir takes only one argument.])
-+ fi
-+ ]
-+)
-
--# Prerequisites of lib/xstrdup.c.
--AC_DEFUN([gl_PREREQ_XSTRDUP], [
-- AC_REQUIRE([AC_HEADER_STDC])
-- AC_CHECK_HEADERS_ONCE(string.h)
--])
---- patch-2.5.9.orig/configure
-+++ patch-2.5.9/configure
-@@ -1,11 +1,10 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.57 for patch 2.5.9.
-+# Generated by GNU Autoconf 2.59 for patch 2.5.9.
- #
- # Report bugs to <bug-patch@gnu.org>.
- #
--# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
--# Free Software Foundation, Inc.
-+# Copyright (C) 2003 Free Software Foundation, Inc.
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## --------------------- ##
-@@ -22,9 +21,10 @@
- elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
- fi
-+DUALCASE=1; export DUALCASE # for MKS sh
-
- # Support unset when possible.
--if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
-+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
- else
- as_unset=false
-@@ -43,7 +43,7 @@
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
- do
-- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
-+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
-@@ -220,16 +220,17 @@
- if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
- else
-+ test -d ./-p && rmdir ./-p
- as_mkdir_p=false
- fi
-
- as_executable_p="test -f"
-
- # Sed expression to map a string onto a valid CPP name.
--as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
-+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
- # Sed expression to map a string onto a valid variable name.
--as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
-+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
- # IFS
-@@ -669,7 +670,7 @@
-
- # Be sure to have absolute paths.
- for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-- localstatedir libdir includedir oldincludedir infodir mandir
-+ localstatedir libdir includedir oldincludedir infodir mandir
- do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
-@@ -709,10 +710,10 @@
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
- $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-- X"$0" : 'X\(//\)[^/]' \| \
-- X"$0" : 'X\(//\)$' \| \
-- X"$0" : 'X\(/\)' \| \
-- . : '\(.\)' 2>/dev/null ||
-+ X"$0" : 'X\(//\)[^/]' \| \
-+ X"$0" : 'X\(//\)$' \| \
-+ X"$0" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
- echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-@@ -804,9 +805,9 @@
- cat <<_ACEOF
- Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
-- [$ac_default_prefix]
-+ [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-- [PREFIX]
-+ [PREFIX]
-
- By default, \`make install' will install all the files in
- \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-@@ -896,12 +897,45 @@
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
- esac
--# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
--# absolute.
--ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
--ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
--ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
--ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
-+
-+# Do not use `cd foo && pwd` to compute absolute paths, because
-+# the directories may not exist.
-+case `pwd` in
-+.) ac_abs_builddir="$ac_dir";;
-+*)
-+ case "$ac_dir" in
-+ .) ac_abs_builddir=`pwd`;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_builddir=${ac_top_builddir}.;;
-+*)
-+ case ${ac_top_builddir}. in
-+ .) ac_abs_top_builddir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_srcdir=$ac_srcdir;;
-+*)
-+ case $ac_srcdir in
-+ .) ac_abs_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_srcdir=$ac_top_srcdir;;
-+*)
-+ case $ac_top_srcdir in
-+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-+ esac;;
-+esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
-@@ -912,13 +946,13 @@
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
-- test -f $ac_srcdir/configure.in; then
-+ test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
-- cd $ac_popdir
-+ cd "$ac_popdir"
- done
- fi
-
-@@ -926,10 +960,9 @@
- if $ac_init_version; then
- cat <<\_ACEOF
- patch configure 2.5.9
--generated by GNU Autoconf 2.57
-+generated by GNU Autoconf 2.59
-
--Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
--Free Software Foundation, Inc.
-+Copyright (C) 2003 Free Software Foundation, Inc.
- This configure script is free software; the Free Software Foundation
- gives unlimited permission to copy, distribute and modify it.
- _ACEOF
-@@ -941,7 +974,7 @@
- running configure, to aid debugging if configure makes a mistake.
-
- It was created by patch $as_me 2.5.9, which was
--generated by GNU Autoconf 2.57. Invocation command line was
-+generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-@@ -1018,19 +1051,19 @@
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
-- ac_must_keep_next=false # Got value, back to normal.
-+ ac_must_keep_next=false # Got value, back to normal.
- else
-- case $ac_arg in
-- *=* | --config-cache | -C | -disable-* | --disable-* \
-- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-- | -with-* | --with-* | -without-* | --without-* | --x)
-- case "$ac_configure_args0 " in
-- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-- esac
-- ;;
-- -* ) ac_must_keep_next=true ;;
-- esac
-+ case $ac_arg in
-+ *=* | --config-cache | -C | -disable-* | --disable-* \
-+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-+ | -with-* | --with-* | -without-* | --without-* | --x)
-+ case "$ac_configure_args0 " in
-+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-+ esac
-+ ;;
-+ -* ) ac_must_keep_next=true ;;
-+ esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
-@@ -1064,12 +1097,12 @@
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
-- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
-- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
- }
-@@ -1098,7 +1131,7 @@
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
-- echo "$ac_var='"'"'$ac_val'"'"'"
-+ echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-@@ -1117,7 +1150,7 @@
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
-- rm -f core core.* *.core &&
-+ rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-@@ -1197,7 +1230,7 @@
- # value.
- ac_cache_corrupted=false
- for ac_var in `(set) 2>&1 |
-- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
-+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-@@ -1214,13 +1247,13 @@
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
-- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
- echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
- echo "$as_me: former value: $ac_old_val" >&2;}
-- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
- echo "$as_me: current value: $ac_new_val" >&2;}
-- ac_cache_corrupted=:
-+ ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
-@@ -1629,7 +1662,6 @@
- (exit $ac_status); }
-
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -1649,8 +1681,8 @@
- # Try to create an executable without -o first, disregard a.out.
- # It will help us diagnose broken compilers, and finding out an intuition
- # of exeext.
--echo "$as_me:$LINENO: checking for C compiler default output" >&5
--echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
-+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
- ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
- if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
-@@ -1670,23 +1702,23 @@
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
-- ;;
-+ ;;
- conftest.$ac_ext )
-- # This is the source file.
-- ;;
-+ # This is the source file.
-+ ;;
- [ab].out )
-- # We found the default executable, but exeext='' is most
-- # certainly right.
-- break;;
-+ # We found the default executable, but exeext='' is most
-+ # certainly right.
-+ break;;
- *.* )
-- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-- # FIXME: I believe we export ac_cv_exeext for Libtool,
-- # but it would be cool to find out if it's true. Does anybody
-- # maintain Libtool? --akim.
-- export ac_cv_exeext
-- break;;
-+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-+ # FIXME: I believe we export ac_cv_exeext for Libtool,
-+ # but it would be cool to find out if it's true. Does anybody
-+ # maintain Libtool? --akim.
-+ export ac_cv_exeext
-+ break;;
- * )
-- break;;
-+ break;;
- esac
- done
- else
-@@ -1760,8 +1792,8 @@
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-- export ac_cv_exeext
-- break;;
-+ export ac_cv_exeext
-+ break;;
- * ) break;;
- esac
- done
-@@ -1786,7 +1818,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -1837,7 +1868,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -1857,11 +1887,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -1874,7 +1913,7 @@
-
- ac_compiler_gnu=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
- fi
-@@ -1890,7 +1929,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -1907,11 +1945,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -1924,7 +1971,7 @@
-
- ac_cv_prog_cc_g=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
- echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-@@ -1951,7 +1998,6 @@
- ac_cv_prog_cc_stdc=no
- ac_save_CC=$CC
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -1979,6 +2025,16 @@
- va_end (v);
- return s;
- }
-+
-+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
-+ function prototypes and stuff, but not '\xHH' hex character constants.
-+ These don't provoke an error unfortunately, instead are silently treated
-+ as 'x'. The following induces an error, until -std1 is added to get
-+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
-+ array size at least. It's necessary to write '\x00'==0 to get something
-+ that's true only with -std1. */
-+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-+
- int test (int i, double x);
- struct s1 {int (*f) (int a);};
- struct s2 {int (*f) (double a);};
-@@ -2005,11 +2061,20 @@
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -2022,7 +2087,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext
-+rm -f conftest.err conftest.$ac_objext
- done
- rm -f conftest.$ac_ext conftest.$ac_objext
- CC=$ac_save_CC
-@@ -2050,19 +2115,27 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
-- ''\
-- '#include <stdlib.h>' \
-+ '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
-@@ -2070,14 +2143,13 @@
- 'void exit (int);'
- do
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
--#include <stdlib.h>
- $ac_declaration
-+#include <stdlib.h>
- int
- main ()
- {
-@@ -2088,11 +2160,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -2105,9 +2186,8 @@
-
- continue
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2124,11 +2204,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -2140,7 +2229,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- rm -f conftest*
- if test -n "$ac_declaration"; then
-@@ -2154,7 +2243,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-@@ -2189,7 +2278,6 @@
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2200,7 +2288,7 @@
- #else
- # include <assert.h>
- #endif
-- Syntax error
-+ Syntax error
- _ACEOF
- if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-@@ -2212,6 +2300,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -2232,7 +2321,6 @@
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2250,6 +2338,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -2296,7 +2385,6 @@
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2307,7 +2395,7 @@
- #else
- # include <assert.h>
- #endif
-- Syntax error
-+ Syntax error
- _ACEOF
- if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-@@ -2319,6 +2407,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -2339,7 +2428,6 @@
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2357,6 +2445,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -2431,6 +2520,7 @@
- # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
- # AFS /usr/afsws/bin/install, which mishandles nonexistent args
- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-+# OS/2's system install, which has a completely different semantic
- # ./install, which can be erroneously created by make from ./install.sh.
- echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
- echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-@@ -2447,6 +2537,7 @@
- case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
-@@ -2454,20 +2545,20 @@
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
-- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-- if test $ac_prog = install &&
-- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-- # AIX install. It has an incompatible calling convention.
-- :
-- elif test $ac_prog = install &&
-- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-- # program-specific install script used by HP pwplus--don't use.
-- :
-- else
-- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-- break 3
-- fi
-- fi
-+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-+ if test $ac_prog = install &&
-+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-+ # AIX install. It has an incompatible calling convention.
-+ :
-+ elif test $ac_prog = install &&
-+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-+ # program-specific install script used by HP pwplus--don't use.
-+ :
-+ else
-+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-+ break 3
-+ fi
-+ fi
- done
- done
- ;;
-@@ -2499,7 +2590,7 @@
-
- echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
- echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
--set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
-+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
- if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-@@ -2596,7 +2687,6 @@
- echo "$as_me:$LINENO: checking for AIX" >&5
- echo $ECHO_N "checking for AIX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2628,7 +2718,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2649,11 +2738,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -2666,12 +2764,11 @@
-
- ac_cv_header_stdc=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
- if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2693,7 +2790,6 @@
- if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2718,7 +2814,6 @@
- :
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2730,9 +2825,9 @@
- # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #else
- # define ISLOWER(c) \
-- (('a' <= (c) && (c) <= 'i') \
-- || ('j' <= (c) && (c) <= 'r') \
-- || ('s' <= (c) && (c) <= 'z'))
-+ (('a' <= (c) && (c) <= 'i') \
-+ || ('j' <= (c) && (c) <= 'r') \
-+ || ('s' <= (c) && (c) <= 'z'))
- # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
- #endif
-
-@@ -2743,7 +2838,7 @@
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
-- || toupper (i) != TOUPPER (i))
-+ || toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
- }
-@@ -2768,7 +2863,7 @@
- ( exit $ac_status )
- ac_cv_header_stdc=no
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- fi
-@@ -2793,7 +2888,7 @@
-
-
- for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-- inttypes.h stdint.h unistd.h
-+ inttypes.h stdint.h unistd.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-@@ -2802,7 +2897,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2814,11 +2908,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -2831,7 +2934,7 @@
-
- eval "$as_ac_Header=no"
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -2858,7 +2961,6 @@
- echo "$as_me:$LINENO: checking minix/config.h usability" >&5
- echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2869,11 +2971,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -2886,7 +2997,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -2894,7 +3005,6 @@
- echo "$as_me:$LINENO: checking minix/config.h presence" >&5
- echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -2912,6 +3022,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -2931,33 +3042,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
- echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -3000,15 +3110,15 @@
- fi
-
-
--echo "$as_me:$LINENO: checking for library containing strerror" >&5
--echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
--if test "${ac_cv_search_strerror+set}" = set; then
-+
-+ echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
-+echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
-+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- ac_func_search_save_LIBS=$LIBS
--ac_cv_search_strerror=no
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lcposix $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3032,79 +3142,43 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); }; }; then
-- ac_cv_search_strerror="none required"
--else
-- echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
--if test "$ac_cv_search_strerror" = no; then
-- for ac_lib in cposix; do
-- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
-- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--
--/* Override any gcc2 internal prototype to avoid an error. */
--#ifdef __cplusplus
--extern "C"
--#endif
--/* We use char because int might match the return type of a gcc2
-- builtin and then its argument prototype would still apply. */
--char strerror ();
--int
--main ()
--{
--strerror ();
-- ;
-- return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-- ac_status=$?
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-- ac_cv_search_strerror="-l$ac_lib"
--break
-+ ac_cv_lib_cposix_strerror=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-
-+ac_cv_lib_cposix_strerror=no
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-- done
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
- fi
--LIBS=$ac_func_search_save_LIBS
-+echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
-+echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
-+if test $ac_cv_lib_cposix_strerror = yes; then
-+ LIBS="$LIBS -lcposix"
- fi
--echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
--echo "${ECHO_T}$ac_cv_search_strerror" >&6
--if test "$ac_cv_search_strerror" != no; then
-- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
--fi
-+
-
- # Check whether --enable-largefile or --disable-largefile was given.
- if test "${enable_largefile+set}" = set; then
-@@ -3124,8 +3198,7 @@
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
-- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
-+ cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3150,11 +3223,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3166,15 +3248,24 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext
-+rm -f conftest.err conftest.$ac_objext
- CC="$CC -n32"
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3186,8 +3277,8 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext
-- break
-+rm -f conftest.err conftest.$ac_objext
-+ break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
-@@ -3207,7 +3298,6 @@
- while :; do
- ac_cv_sys_file_offset_bits=no
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3232,11 +3322,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3248,9 +3347,8 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3276,11 +3374,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3292,7 +3399,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- break
- done
- fi
-@@ -3314,7 +3421,6 @@
- while :; do
- ac_cv_sys_large_files=no
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3339,11 +3445,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3355,9 +3470,8 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3383,11 +3497,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3399,7 +3522,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- break
- done
- fi
-@@ -3443,7 +3566,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3506,11 +3628,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3523,7 +3654,7 @@
-
- ac_cv_c_const=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
- echo "${ECHO_T}$ac_cv_c_const" >&6
-@@ -3550,7 +3681,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3570,11 +3700,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3587,7 +3726,7 @@
-
- eval "$as_ac_Header=no"
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -3610,7 +3749,6 @@
- ac_func_search_save_LIBS=$LIBS
- ac_cv_search_opendir=no
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3634,11 +3772,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3650,12 +3797,12 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- if test "$ac_cv_search_opendir" = no; then
- for ac_lib in dir; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3679,11 +3826,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3696,7 +3852,8 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- done
- fi
- LIBS=$ac_func_search_save_LIBS
-@@ -3717,7 +3874,6 @@
- ac_func_search_save_LIBS=$LIBS
- ac_cv_search_opendir=no
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3741,11 +3897,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3757,12 +3922,12 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- if test "$ac_cv_search_opendir" = no; then
- for ac_lib in x; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3786,11 +3951,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3803,7 +3977,8 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- done
- fi
- LIBS=$ac_func_search_save_LIBS
-@@ -3823,7 +3998,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3844,11 +4018,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -3861,12 +4044,11 @@
-
- ac_cv_header_stdc=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
- if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3888,7 +4070,6 @@
- if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3913,7 +4094,6 @@
- :
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -3925,9 +4105,9 @@
- # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #else
- # define ISLOWER(c) \
-- (('a' <= (c) && (c) <= 'i') \
-- || ('j' <= (c) && (c) <= 'r') \
-- || ('s' <= (c) && (c) <= 'z'))
-+ (('a' <= (c) && (c) <= 'i') \
-+ || ('j' <= (c) && (c) <= 'r') \
-+ || ('s' <= (c) && (c) <= 'z'))
- # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
- #endif
-
-@@ -3938,7 +4118,7 @@
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
-- || toupper (i) != TOUPPER (i))
-+ || toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
- }
-@@ -3963,7 +4143,7 @@
- ( exit $ac_status )
- ac_cv_header_stdc=no
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- fi
-@@ -3999,7 +4179,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4010,11 +4189,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4027,7 +4215,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -4035,7 +4223,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4053,6 +4240,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -4072,33 +4260,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-- ;;
-- no:yes )
-- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
--echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -4109,7 +4296,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -4131,7 +4318,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4151,11 +4337,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4168,7 +4363,7 @@
-
- ac_cv_type_mode_t=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
- echo "${ECHO_T}$ac_cv_type_mode_t" >&6
-@@ -4188,7 +4383,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4208,11 +4402,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4225,7 +4428,7 @@
-
- ac_cv_type_off_t=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
- echo "${ECHO_T}$ac_cv_type_off_t" >&6
-@@ -4245,7 +4448,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4265,11 +4467,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4282,7 +4493,7 @@
-
- ac_cv_type_pid_t=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
- echo "${ECHO_T}$ac_cv_type_pid_t" >&6
-@@ -4302,7 +4513,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4329,11 +4539,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4346,7 +4565,7 @@
-
- ac_cv_type_signal=int
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
- echo "${ECHO_T}$ac_cv_type_signal" >&6
-@@ -4362,7 +4581,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4382,11 +4600,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4399,7 +4626,7 @@
-
- ac_cv_type_size_t=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
- echo "${ECHO_T}$ac_cv_type_size_t" >&6
-@@ -4419,7 +4646,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4468,11 +4694,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4485,7 +4720,7 @@
-
- ac_cv_header_stdbool_h=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
- echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
-@@ -4495,7 +4730,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4515,11 +4749,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4532,7 +4775,7 @@
-
- ac_cv_type__Bool=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
- echo "${ECHO_T}$ac_cv_type__Bool" >&6
-@@ -4589,7 +4832,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4600,11 +4842,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4617,7 +4868,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -4625,7 +4876,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4643,6 +4893,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -4662,33 +4913,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -4699,7 +4949,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -4733,7 +4983,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4744,11 +4993,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4761,7 +5019,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -4769,7 +5027,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4787,6 +5044,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -4806,33 +5064,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -4843,7 +5100,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -4865,7 +5122,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4886,11 +5142,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4903,7 +5168,7 @@
-
- ac_cv_header_time=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
- echo "${ECHO_T}$ac_cv_header_time" >&6
-@@ -4933,7 +5198,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4964,11 +5228,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -4981,7 +5254,7 @@
-
- fu_cv_sys_struct_utimbuf=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
- fi
- echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5
-@@ -5005,7 +5278,6 @@
- ac_cv_func_closedir_void=yes
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5045,7 +5317,7 @@
- ( exit $ac_status )
- ac_cv_func_closedir_void=yes
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
-@@ -5076,7 +5348,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5087,11 +5358,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -5104,7 +5384,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -5112,7 +5392,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5130,6 +5409,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -5149,33 +5429,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -5186,7 +5465,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -5220,7 +5499,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5231,11 +5509,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -5248,7 +5535,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -5256,7 +5543,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5274,6 +5560,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -5293,33 +5580,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -5330,7 +5616,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -5364,7 +5650,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5375,11 +5660,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -5392,7 +5686,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -5400,7 +5694,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5418,6 +5711,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -5437,33 +5731,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -5474,7 +5767,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -5497,7 +5790,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5517,11 +5809,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -5534,7 +5835,7 @@
-
- ac_cv_have_decl_getenv=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
- echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
-@@ -5562,7 +5863,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5582,11 +5882,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -5599,7 +5908,7 @@
-
- ac_cv_have_decl_malloc=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
- echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
-@@ -5628,7 +5937,6 @@
- else
-
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5647,11 +5955,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -5664,7 +5981,7 @@
-
- ac_cv_win_or_dos=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
- fi
- echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
-@@ -5714,7 +6031,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5725,11 +6041,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -5742,7 +6067,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -5750,7 +6075,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5768,6 +6092,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -5787,33 +6112,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -5824,7 +6148,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -5872,7 +6196,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -5905,11 +6228,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -5922,7 +6254,8 @@
-
- jm_cv_struct_dirent_d_ino=no
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-
-
- fi
-@@ -6011,21 +6344,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -6056,11 +6396,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6073,7 +6422,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -6126,21 +6476,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -6171,11 +6528,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6188,7 +6554,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -6203,21 +6570,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define _doprnt innocuous__doprnt
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef _doprnt
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -6248,11 +6622,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6265,7 +6648,8 @@
-
- ac_cv_func__doprnt=no
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
- echo "${ECHO_T}$ac_cv_func__doprnt" >&6
-@@ -6288,13 +6672,12 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
--
-+$ac_includes_default
- int
- main ()
- {
-@@ -6305,11 +6688,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6322,12 +6714,20 @@
-
- ac_cv_lib_error_at_line=no
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
- echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
- if test $ac_cv_lib_error_at_line = no; then
-- LIBOBJS="$LIBOBJS error.$ac_objext"
-+ case $LIBOBJS in
-+ "error.$ac_objext" | \
-+ *" error.$ac_objext" | \
-+ "error.$ac_objext "* | \
-+ *" error.$ac_objext "* ) ;;
-+ *) LIBOBJS="$LIBOBJS error.$ac_objext" ;;
-+esac
-+
- fi
-
-
-@@ -6343,21 +6743,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -6388,11 +6795,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6405,7 +6821,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -6423,7 +6840,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -6443,11 +6859,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6460,7 +6885,7 @@
-
- ac_cv_have_decl_strerror=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
- echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
-@@ -6486,7 +6911,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -6506,11 +6930,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6523,7 +6956,7 @@
-
- ac_cv_have_decl_strerror_r=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
- echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
-@@ -6553,21 +6986,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -6598,11 +7038,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6615,7 +7064,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -6636,7 +7086,6 @@
- ac_cv_func_strerror_r_char_p=no
- if test $ac_cv_have_decl_strerror_r = yes; then
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -6657,11 +7106,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6673,7 +7131,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- else
- # strerror_r is not declared. Choose between
- # systems that have relatively inaccessible declarations for the
-@@ -6685,7 +7143,6 @@
- :
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -6721,7 +7178,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
-
-@@ -6749,21 +7206,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -6794,11 +7258,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6811,7 +7284,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -6821,7 +7295,14 @@
- _ACEOF
-
- else
-- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
-+ case $LIBOBJS in
-+ "$ac_func.$ac_objext" | \
-+ *" $ac_func.$ac_objext" | \
-+ "$ac_func.$ac_objext "* | \
-+ *" $ac_func.$ac_objext "* ) ;;
-+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-+esac
-+
- fi
- done
-
-@@ -6855,7 +7336,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -6866,11 +7346,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -6883,7 +7372,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -6891,7 +7380,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -6909,6 +7397,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -6928,33 +7417,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -6965,7 +7453,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -6989,7 +7477,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7053,21 +7540,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -7098,11 +7592,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -7115,7 +7618,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -7125,7 +7629,14 @@
- _ACEOF
-
- else
-- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
-+ case $LIBOBJS in
-+ "$ac_func.$ac_objext" | \
-+ *" $ac_func.$ac_objext" | \
-+ "$ac_func.$ac_objext "* | \
-+ *" $ac_func.$ac_objext "* ) ;;
-+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-+esac
-+
- fi
- done
-
-@@ -7163,7 +7674,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7174,11 +7684,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -7191,7 +7710,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -7199,7 +7718,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7217,6 +7735,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -7236,33 +7755,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -7273,7 +7791,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -7297,7 +7815,6 @@
- ac_cv_func_malloc_0_nonnull=no
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7337,7 +7854,7 @@
- ( exit $ac_status )
- ac_cv_func_malloc_0_nonnull=no
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
-@@ -7353,7 +7870,14 @@
- #define HAVE_MALLOC 0
- _ACEOF
-
-- LIBOBJS="$LIBOBJS malloc.$ac_objext"
-+ case $LIBOBJS in
-+ "malloc.$ac_objext" | \
-+ *" malloc.$ac_objext" | \
-+ "malloc.$ac_objext "* | \
-+ *" malloc.$ac_objext "* ) ;;
-+ *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
-+esac
-+
-
- cat >>confdefs.h <<\_ACEOF
- #define malloc rpl_malloc
-@@ -7388,7 +7912,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7399,11 +7922,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -7416,7 +7948,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -7424,7 +7956,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7442,6 +7973,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -7461,33 +7993,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -7498,7 +8029,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -7522,7 +8053,6 @@
- ac_cv_func_realloc_0_nonnull=no
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7562,7 +8092,7 @@
- ( exit $ac_status )
- ac_cv_func_realloc_0_nonnull=no
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
-@@ -7578,7 +8108,14 @@
- #define HAVE_REALLOC 0
- _ACEOF
-
-- LIBOBJS="$LIBOBJS realloc.$ac_objext"
-+ case $LIBOBJS in
-+ "realloc.$ac_objext" | \
-+ *" realloc.$ac_objext" | \
-+ "realloc.$ac_objext "* | \
-+ *" realloc.$ac_objext "* ) ;;
-+ *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;;
-+esac
-+
-
- cat >>confdefs.h <<\_ACEOF
- #define realloc rpl_realloc
-@@ -7619,7 +8156,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7630,11 +8166,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -7647,7 +8192,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -7655,7 +8200,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7673,6 +8217,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -7692,33 +8237,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -7729,7 +8273,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -7772,7 +8316,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7783,11 +8326,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -7800,7 +8352,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -7808,7 +8360,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7826,6 +8377,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -7845,33 +8397,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -7882,7 +8433,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -7916,7 +8467,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7927,11 +8477,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -7944,7 +8503,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -7952,7 +8511,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -7970,6 +8528,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -7989,33 +8548,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -8026,7 +8584,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -8053,21 +8611,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -8098,11 +8663,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8115,7 +8689,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -8139,21 +8714,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -8184,11 +8766,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8201,7 +8792,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -8241,7 +8833,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -8259,11 +8850,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8276,7 +8876,7 @@
-
- ac_cv_type_mbstate_t=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
- echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
-@@ -8300,7 +8900,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -8317,11 +8916,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8334,7 +8942,8 @@
-
- jm_cv_func_mbrtowc=no
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $jm_cv_func_mbrtowc" >&5
- echo "${ECHO_T}$jm_cv_func_mbrtowc" >&6
-@@ -8348,69 +8957,465 @@
-
-
-
--
--
--
--
--for ac_func in pathconf
--do
--as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
--echo "$as_me:$LINENO: checking for $ac_func" >&5
--echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
--if eval "test \"\${$as_ac_var+set}\" = set"; then
-+ echo "$as_me:$LINENO: checking whether free is declared" >&5
-+echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
-+if test "${ac_cv_have_decl_free+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
--/* System header to define __stub macros and hopefully few prototypes,
-- which can conflict with char $ac_func (); below.
-- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-- <limits.h> exists even on freestanding compilers. */
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
--/* Override any gcc2 internal prototype to avoid an error. */
--#ifdef __cplusplus
--extern "C"
--{
--#endif
--/* We use char because int might match the return type of a gcc2
-- builtin and then its argument prototype would still apply. */
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
-- to always fail with ENOSYS. Some functions are actually named
-- something starting with __ and the normal name is an alias. */
--#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
--choke me
--#else
--char (*f) () = $ac_func;
--#endif
--#ifdef __cplusplus
--}
--#endif
--
-+$ac_includes_default
- int
- main ()
- {
--return f != $ac_func;
-+#ifndef free
-+ char *p = (char *) free;
-+#endif
-+
- ;
- return 0;
- }
- _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_have_decl_free=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_have_decl_free=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
-+echo "${ECHO_T}$ac_cv_have_decl_free" >&6
-+if test $ac_cv_have_decl_free = yes; then
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_FREE 1
-+_ACEOF
-+
-+
-+else
-+ cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_FREE 0
-+_ACEOF
-+
-+
-+fi
-+
-+
-+
-+
-+
-+ :
-+
-+
-+
-+
-+
-+ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
-+echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
-+if test "${ac_cv_header_stdbool_h+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+ #include <stdbool.h>
-+ #ifndef bool
-+ "error: bool is not defined"
-+ #endif
-+ #ifndef false
-+ "error: false is not defined"
-+ #endif
-+ #if false
-+ "error: false is not 0"
-+ #endif
-+ #ifndef true
-+ "error: false is not defined"
-+ #endif
-+ #if true != 1
-+ "error: true is not 1"
-+ #endif
-+ #ifndef __bool_true_false_are_defined
-+ "error: __bool_true_false_are_defined is not defined"
-+ #endif
-+
-+ struct s { _Bool s: 1; _Bool t; } s;
-+
-+ char a[true == 1 ? 1 : -1];
-+ char b[false == 0 ? 1 : -1];
-+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-+ char d[(bool) -0.5 == true ? 1 : -1];
-+ bool e = &s;
-+ char f[(_Bool) -0.0 == false ? 1 : -1];
-+ char g[true];
-+ char h[sizeof (_Bool)];
-+ char i[sizeof s.t];
-+
-+int
-+main ()
-+{
-+ return !a + !b + !c + !d + !e + !f + !g + !h + !i;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_header_stdbool_h=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_header_stdbool_h=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
-+echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
-+ echo "$as_me:$LINENO: checking for _Bool" >&5
-+echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
-+if test "${ac_cv_type__Bool+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+int
-+main ()
-+{
-+if ((_Bool *) 0)
-+ return 0;
-+if (sizeof (_Bool))
-+ return 0;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_type__Bool=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_type__Bool=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
-+echo "${ECHO_T}$ac_cv_type__Bool" >&6
-+if test $ac_cv_type__Bool = yes; then
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE__BOOL 1
-+_ACEOF
-+
-+
-+fi
-+
-+ if test $ac_cv_header_stdbool_h = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_STDBOOL_H 1
-+_ACEOF
-+
-+ fi
-+
-+ :
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+echo "$as_me:$LINENO: checking for nanosecond timestamps in struct stat" >&5
-+echo $ECHO_N "checking for nanosecond timestamps in struct stat... $ECHO_C" >&6
-+if test "${ac_cv_stat_nsec+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+ #include <sys/types.h>
-+ #include <sys/stat.h>
-+ #include <unistd.h>
-+ struct stat st;
-+
-+int
-+main ()
-+{
-+ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_stat_nsec=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_stat_nsec=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_stat_nsec" >&5
-+echo "${ECHO_T}$ac_cv_stat_nsec" >&6
-+ if test $ac_cv_stat_nsec = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_STAT_NSEC 1
-+_ACEOF
-+
-+ fi
-+
-+ echo "$as_me:$LINENO: checking for nanosecond timestamps in struct stat" >&5
-+echo $ECHO_N "checking for nanosecond timestamps in struct stat... $ECHO_C" >&6
-+if test "${ac_cv_stat_timeval+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+ #include <time.h>
-+ #include <sys/types.h>
-+ #include <sys/stat.h>
-+ #include <unistd.h>
-+ struct stat st;
-+
-+int
-+main ()
-+{
-+ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_stat_timeval=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_stat_timeval=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_stat_timeval" >&5
-+echo "${ECHO_T}$ac_cv_stat_timeval" >&6
-+ if test $ac_cv_stat_timeval = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_STAT_TIMEVAL 1
-+_ACEOF
-+
-+ fi
-+
-+
-+
-+
-+
-+for ac_func in pathconf
-+do
-+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+echo "$as_me:$LINENO: checking for $ac_func" >&5
-+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_var+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
-+/* System header to define __stub macros and hopefully few prototypes,
-+ which can conflict with char $ac_func (); below.
-+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ <limits.h> exists even on freestanding compilers. */
-+
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+
-+#undef $ac_func
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char $ac_func ();
-+/* The GNU C library defines this for functions which it implements
-+ to always fail with ENOSYS. Some functions are actually named
-+ something starting with __ and the normal name is an alias. */
-+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-+choke me
-+#else
-+char (*f) () = $ac_func;
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+int
-+main ()
-+{
-+return f != $ac_func;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8423,7 +9428,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -8454,7 +9460,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -8465,11 +9470,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8482,7 +9496,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -8490,7 +9504,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -8508,6 +9521,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -8527,33 +9541,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -8564,7 +9577,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -8587,7 +9600,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -8607,11 +9619,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8624,7 +9645,7 @@
-
- ac_cv_have_decl_free=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
- echo "${ECHO_T}$ac_cv_have_decl_free" >&6
-@@ -8648,7 +9669,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -8668,11 +9688,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8685,7 +9714,7 @@
-
- ac_cv_have_decl_getenv=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
- echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
-@@ -8709,7 +9738,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -8729,11 +9757,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8746,7 +9783,7 @@
-
- ac_cv_have_decl_malloc=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
- echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
-@@ -8770,7 +9807,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -8790,11 +9826,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8807,7 +9852,7 @@
-
- ac_cv_have_decl_mktemp=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_mktemp" >&5
- echo "${ECHO_T}$ac_cv_have_decl_mktemp" >&6
-@@ -8849,21 +9894,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -8894,11 +9946,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8911,7 +9972,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -8934,21 +9996,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -8979,11 +10048,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -8996,7 +10074,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -9006,7 +10085,14 @@
- _ACEOF
-
- else
-- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
-+ case $LIBOBJS in
-+ "$ac_func.$ac_objext" | \
-+ *" $ac_func.$ac_objext" | \
-+ "$ac_func.$ac_objext "* | \
-+ *" $ac_func.$ac_objext "* ) ;;
-+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-+esac
-+
- fi
- done
-
-@@ -9019,7 +10105,6 @@
- while :; do
- ac_cv_sys_largefile_source=no
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9036,11 +10121,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9052,9 +10146,8 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9072,11 +10165,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9088,7 +10190,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- break
- done
- fi
-@@ -9112,7 +10214,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9129,11 +10230,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9146,7 +10256,8 @@
-
- ac_cv_func_fseeko=no
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
- echo "${ECHO_T}$ac_cv_func_fseeko" >&6
-@@ -9165,7 +10276,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9185,11 +10295,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9202,7 +10321,7 @@
-
- ac_cv_have_decl_clearerr_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
-@@ -9230,7 +10349,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9250,11 +10368,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9267,7 +10394,7 @@
-
- ac_cv_have_decl_feof_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
-@@ -9295,7 +10422,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9315,11 +10441,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9332,7 +10467,7 @@
-
- ac_cv_have_decl_ferror_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
-@@ -9360,7 +10495,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9380,11 +10514,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9397,7 +10540,7 @@
-
- ac_cv_have_decl_fflush_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
-@@ -9425,7 +10568,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9445,11 +10587,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9462,7 +10613,7 @@
-
- ac_cv_have_decl_fgets_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
-@@ -9490,7 +10641,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9510,11 +10660,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9527,7 +10686,7 @@
-
- ac_cv_have_decl_fputc_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
-@@ -9555,7 +10714,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9575,11 +10733,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9592,7 +10759,7 @@
-
- ac_cv_have_decl_fputs_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
-@@ -9620,7 +10787,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9640,11 +10806,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9657,7 +10832,7 @@
-
- ac_cv_have_decl_fread_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
-@@ -9685,7 +10860,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9705,11 +10879,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9722,7 +10905,7 @@
-
- ac_cv_have_decl_fwrite_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
-@@ -9750,7 +10933,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9770,11 +10952,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9787,7 +10978,7 @@
-
- ac_cv_have_decl_getc_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
-@@ -9815,7 +11006,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9835,11 +11025,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9852,7 +11051,7 @@
-
- ac_cv_have_decl_getchar_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
-@@ -9880,7 +11079,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9900,11 +11098,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9917,7 +11124,7 @@
-
- ac_cv_have_decl_putc_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
-@@ -9945,7 +11152,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -9965,11 +11171,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -9982,7 +11197,7 @@
-
- ac_cv_have_decl_putchar_unlocked=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
- echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
-@@ -10075,7 +11290,6 @@
- ac_cv_func_closedir_void=yes
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -10115,7 +11329,7 @@
- ( exit $ac_status )
- ac_cv_func_closedir_void=yes
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
-@@ -10146,7 +11360,6 @@
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -10157,11 +11370,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -10174,7 +11396,7 @@
-
- ac_header_compiler=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
-@@ -10182,7 +11404,6 @@
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -10200,6 +11421,7 @@
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-@@ -10219,33 +11441,32 @@
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
--case $ac_header_compiler:$ac_header_preproc in
-- yes:no )
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-- (
-- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
-- ) |
-- sed "s/^/$as_me: WARNING: /" >&2
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
- ;;
-- no:yes )
-+ no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
-+## -------------------------------- ##
-+## Report this to bug-patch@gnu.org ##
-+## -------------------------------- ##
- _ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
-@@ -10256,7 +11477,7 @@
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- eval "$as_ac_Header=$ac_header_preproc"
-+ eval "$as_ac_Header=\$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-@@ -10277,7 +11498,6 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -10300,11 +11520,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -10317,7 +11546,8 @@
-
- ac_cv_func_setmode_dos=no
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func_setmode_dos" >&5
- echo "${ECHO_T}$ac_cv_func_setmode_dos" >&6
-@@ -10338,21 +11568,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -10383,11 +11620,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -10400,7 +11646,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -10415,21 +11662,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define _doprnt innocuous__doprnt
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef _doprnt
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -10460,11 +11714,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -10477,7 +11740,8 @@
-
- ac_cv_func__doprnt=no
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
- echo "${ECHO_T}$ac_cv_func__doprnt" >&6
-@@ -10503,21 +11767,28 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-+
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-+
-+#undef $ac_func
-+
- /* Override any gcc2 internal prototype to avoid an error. */
- #ifdef __cplusplus
- extern "C"
-@@ -10548,11 +11819,20 @@
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
-+ (eval $ac_link) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest$ac_exeext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -10565,7 +11845,8 @@
-
- eval "$as_ac_var=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-@@ -10585,7 +11866,6 @@
- patch_cv_mkdir_takes_one_arg=no
- if test $ac_cv_func_mkdir = yes; then
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -10605,11 +11885,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -10621,7 +11910,6 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -10641,11 +11929,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -10658,10 +11955,10 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
-
-@@ -10686,7 +11983,6 @@
- else
-
- cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -10705,11 +12001,20 @@
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-- (eval $ac_compile) 2>&5
-+ (eval $ac_compile) 2>conftest.er1
- ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
-- { ac_try='test -s conftest.$ac_objext'
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
-@@ -10722,7 +12027,7 @@
-
- ac_cv_win_or_dos=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
- fi
- echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
-@@ -10834,13 +12139,13 @@
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
-- "s/'/'\\\\''/g;
-- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-+ "s/'/'\\\\''/g;
-+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
-- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
- } |
-@@ -10870,13 +12175,13 @@
- # trailing colons and then remove the whole line if VPATH becomes empty
- # (actually we leave an empty line to preserve line numbers).
- if test "x$srcdir" = x.; then
-- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
- s/:*\$(srcdir):*/:/;
- s/:*\${srcdir}:*/:/;
- s/:*@srcdir@:*/:/;
--s/^\([^=]*=[ ]*\):*/\1/;
-+s/^\([^=]*=[ ]*\):*/\1/;
- s/:*$//;
--s/^[^=]*=[ ]*$//;
-+s/^[^=]*=[ ]*$//;
- }'
- fi
-
-@@ -10887,7 +12192,7 @@
- for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
-- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-@@ -10931,9 +12236,10 @@
- elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
- fi
-+DUALCASE=1; export DUALCASE # for MKS sh
-
- # Support unset when possible.
--if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
-+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
- else
- as_unset=false
-@@ -10952,7 +12258,7 @@
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
- do
-- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
-+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
-@@ -11131,16 +12437,17 @@
- if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
- else
-+ test -d ./-p && rmdir ./-p
- as_mkdir_p=false
- fi
-
- as_executable_p="test -f"
-
- # Sed expression to map a string onto a valid CPP name.
--as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
-+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
- # Sed expression to map a string onto a valid variable name.
--as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
-+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
- # IFS
-@@ -11167,7 +12474,7 @@
- cat >&5 <<_CSEOF
-
- This file was extended by patch $as_me 2.5.9, which was
--generated by GNU Autoconf 2.57. Invocation command line was
-+generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
-@@ -11211,9 +12518,9 @@
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
-- instantiate the configuration file FILE
-+ instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
-- instantiate the configuration header FILE
-+ instantiate the configuration header FILE
-
- Configuration files:
- $config_files
-@@ -11227,11 +12534,10 @@
- cat >>$CONFIG_STATUS <<_ACEOF
- ac_cs_version="\\
- patch config.status 2.5.9
--configured by $0, generated by GNU Autoconf 2.57,
-+configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
--Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
--Free Software Foundation, Inc.
-+Copyright (C) 2003 Free Software Foundation, Inc.
- This config.status script is free software; the Free Software Foundation
- gives unlimited permission to copy, distribute and modify it."
- srcdir=$srcdir
-@@ -11463,9 +12769,9 @@
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
-- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
-- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
-@@ -11483,21 +12789,21 @@
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
-- cat >$tmp/stdin
-- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-+ cat >$tmp/stdin
-+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
- $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-- X"$ac_file" : 'X\(//\)[^/]' \| \
-- X"$ac_file" : 'X\(//\)$' \| \
-- X"$ac_file" : 'X\(/\)' \| \
-- . : '\(.\)' 2>/dev/null ||
-+ X"$ac_file" : 'X\(//\)[^/]' \| \
-+ X"$ac_file" : 'X\(//\)$' \| \
-+ X"$ac_file" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
- echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-@@ -11513,10 +12819,10 @@
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
- $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-- X"$as_dir" : 'X\(//\)[^/]' \| \
-- X"$as_dir" : 'X\(//\)$' \| \
-- X"$as_dir" : 'X\(/\)' \| \
-- . : '\(.\)' 2>/dev/null ||
-+ X"$as_dir" : 'X\(//\)[^/]' \| \
-+ X"$as_dir" : 'X\(//\)$' \| \
-+ X"$as_dir" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
- echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-@@ -11554,12 +12860,45 @@
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
- esac
--# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
--# absolute.
--ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
--ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
--ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
--ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
-+
-+# Do not use `cd foo && pwd` to compute absolute paths, because
-+# the directories may not exist.
-+case `pwd` in
-+.) ac_abs_builddir="$ac_dir";;
-+*)
-+ case "$ac_dir" in
-+ .) ac_abs_builddir=`pwd`;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_builddir=${ac_top_builddir}.;;
-+*)
-+ case ${ac_top_builddir}. in
-+ .) ac_abs_top_builddir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_srcdir=$ac_srcdir;;
-+*)
-+ case $ac_srcdir in
-+ .) ac_abs_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_srcdir=$ac_top_srcdir;;
-+*)
-+ case $ac_top_srcdir in
-+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-+ esac;;
-+esac
-
-
- case $INSTALL in
-@@ -11567,11 +12906,6 @@
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
-- if test x"$ac_file" != x-; then
-- { echo "$as_me:$LINENO: creating $ac_file" >&5
--echo "$as_me: creating $ac_file" >&6;}
-- rm -f "$ac_file"
-- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
-@@ -11581,7 +12915,7 @@
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
-- sed 's,.*/,,'` by configure."
-+ sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
-@@ -11590,26 +12924,32 @@
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
-- # Absolute (can't be DOS-style, as IFS=:)
-- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-+ # Absolute (can't be DOS-style, as IFS=:)
-+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
- echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
-- echo $f;;
-+ echo "$f";;
- *) # Relative
-- if test -f "$f"; then
-- # Build tree
-- echo $f
-- elif test -f "$srcdir/$f"; then
-- # Source tree
-- echo $srcdir/$f
-- else
-- # /dev/null tree
-- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-+ if test -f "$f"; then
-+ # Build tree
-+ echo "$f"
-+ elif test -f "$srcdir/$f"; then
-+ # Source tree
-+ echo "$srcdir/$f"
-+ else
-+ # /dev/null tree
-+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
- echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
-- fi;;
-+ fi;;
- esac
- done` || { (exit 1); exit 1; }
-+
-+ if test x"$ac_file" != x-; then
-+ { echo "$as_me:$LINENO: creating $ac_file" >&5
-+echo "$as_me: creating $ac_file" >&6;}
-+ rm -f "$ac_file"
-+ fi
- _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-@@ -11649,12 +12989,12 @@
- # NAME is the cpp macro being defined and VALUE is the value it is being given.
- #
- # ac_d sets the value in "#define NAME VALUE" lines.
--ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
--ac_dB='[ ].*$,\1#\2'
-+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-+ac_dB='[ ].*$,\1#\2'
- ac_dC=' '
- ac_dD=',;t'
- # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
--ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- ac_uB='$,\1#\2define\3'
- ac_uC=' '
- ac_uD=',;t'
-@@ -11663,11 +13003,11 @@
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
-- cat >$tmp/stdin
-- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-+ cat >$tmp/stdin
-+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
-@@ -11681,28 +13021,29 @@
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
-- # Absolute (can't be DOS-style, as IFS=:)
-- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-+ # Absolute (can't be DOS-style, as IFS=:)
-+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
- echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
-- echo $f;;
-+ # Do quote $f, to prevent DOS paths from being IFS'd.
-+ echo "$f";;
- *) # Relative
-- if test -f "$f"; then
-- # Build tree
-- echo $f
-- elif test -f "$srcdir/$f"; then
-- # Source tree
-- echo $srcdir/$f
-- else
-- # /dev/null tree
-- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-+ if test -f "$f"; then
-+ # Build tree
-+ echo "$f"
-+ elif test -f "$srcdir/$f"; then
-+ # Source tree
-+ echo "$srcdir/$f"
-+ else
-+ # /dev/null tree
-+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
- echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
-- fi;;
-+ fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
-- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
- _ACEOF
-
-@@ -11725,9 +13066,9 @@
- s,[\\$`],\\&,g
- t clear
- : clear
--s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
- t end
--s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
- : end
- _ACEOF
- # If some macros were called several times there might be several times
-@@ -11741,13 +13082,13 @@
- # example, in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- cat >>conftest.undefs <<\_ACEOF
--s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
- _ACEOF
-
- # Break up conftest.defines because some shells have a limit on the size
- # of here documents, and old seds have small limits too (100 cmds).
- echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
--echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
- echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
- echo ' :' >>$CONFIG_STATUS
- rm -f conftest.tail
-@@ -11756,7 +13097,7 @@
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
-- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
-+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
-@@ -11783,7 +13124,7 @@
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
-- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
-+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
-@@ -11817,10 +13158,10 @@
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
- $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-- X"$ac_file" : 'X\(//\)[^/]' \| \
-- X"$ac_file" : 'X\(//\)$' \| \
-- X"$ac_file" : 'X\(/\)' \| \
-- . : '\(.\)' 2>/dev/null ||
-+ X"$ac_file" : 'X\(//\)[^/]' \| \
-+ X"$ac_file" : 'X\(//\)$' \| \
-+ X"$ac_file" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
- echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-@@ -11836,10 +13177,10 @@
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
- $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-- X"$as_dir" : 'X\(//\)[^/]' \| \
-- X"$as_dir" : 'X\(//\)$' \| \
-- X"$as_dir" : 'X\(/\)' \| \
-- . : '\(.\)' 2>/dev/null ||
-+ X"$as_dir" : 'X\(//\)[^/]' \| \
-+ X"$as_dir" : 'X\(//\)$' \| \
-+ X"$as_dir" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
- echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
---- patch-2.5.9.orig/configure.ac
-+++ patch-2.5.9/configure.ac
-@@ -64,6 +64,9 @@
- gl_PREREQ_XMALLOC
- gl_QUOTE
- gl_QUOTEARG
-+gl_HASH
-+
-+ag_CHECK_NANOSECOND_STAT
-
- dnl This should be in gnulib, but isn't for some reason.
- AC_DEFUN([jm_PREREQ_ADDEXT],
---- patch-2.5.9.orig/pch.c
-+++ patch-2.5.9/pch.c
-@@ -1,6 +1,6 @@
- /* reading patches */
-
--/* $Id: pch.c,v 1.44 2003/05/20 14:03:17 eggert Exp $ */
-+/* $Id: pch.c,v 1.45 2003/07/02 22:19:21 eggert Exp $ */
-
- /* Copyright (C) 1986, 1987, 1988 Larry Wall
-
-@@ -366,10 +366,16 @@
- if (!stars_last_line && strnEQ(s, "*** ", 4))
- name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
- else if (strnEQ(s, "+++ ", 4))
-+ {
- /* Swap with NEW below. */
- name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
-+ p_strip_trailing_cr = strip_trailing_cr;
-+ }
- else if (strnEQ(s, "Index:", 6))
-+ {
- name[INDEX] = fetchname (s+6, strippath, (time_t *) 0);
-+ p_strip_trailing_cr = strip_trailing_cr;
-+ }
- else if (strnEQ(s, "Prereq:", 7)) {
- for (t = s + 7; ISSPACE ((unsigned char) *t); t++)
- continue;
-@@ -409,6 +415,7 @@
- p_timestamp[NEW] = timestamp;
- p_rfc934_nesting = (t - s) >> 1;
- }
-+ p_strip_trailing_cr = strip_trailing_cr;
- }
- }
- if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&
---- patch-2.5.9.orig/util.c
-+++ patch-2.5.9/util.c
-@@ -45,9 +45,17 @@
- # define raise(sig) kill (getpid (), sig)
- #endif
-
-+#if defined(HAVE_STAT_TIMEVAL)
-+#include <time.h>
-+#endif
-+
- #include <stdarg.h>
-+#include <hash.h>
-
- static void makedirs (char *);
-+static bool fid_search (const char *, const struct stat *, bool);
-+# define fid_exists(name, pst) fid_search (name, pst, false)
-+# define insert_fid(name) fid_search (name, NULL, true)
-
- /* Move a file FROM (where *FROM_NEEDS_REMOVAL is nonzero if FROM
- needs removal when cleaning up at the end of execution)
-@@ -64,7 +72,7 @@
- struct stat to_st;
- int to_errno = ! backup ? -1 : stat (to, &to_st) == 0 ? 0 : errno;
-
-- if (backup)
-+ if (backup && (to_errno || ! fid_exists (to, &to_st)))
- {
- int try_makedirs_errno = 0;
- char *bakname;
-@@ -165,6 +173,7 @@
- if (! to_dir_known_to_exist)
- makedirs (to);
- copy_file (from, to, 0, mode);
-+ insert_fid (to);
- return;
- }
-
-@@ -173,6 +182,7 @@
- }
-
- rename_succeeded:
-+ insert_fid (to);
- /* Do not clear *FROM_NEEDS_REMOVAL if it's possible that the
- rename returned zero because FROM and TO are hard links to
- the same file. */
-@@ -1011,3 +1021,105 @@
- if (file_seek (stream, offset, ptrname) != 0)
- pfatal ("fseek");
- }
-+
-+typedef struct
-+{
-+ dev_t fid_dev;
-+ ino_t fid_ino;
-+ time_t fid_mtime;
-+ unsigned long fid_mtimensec;
-+} file_id;
-+
-+unsigned
-+file_id_hasher (file_id *entry, unsigned table_size)
-+{
-+ return ((unsigned long) entry->fid_ino +
-+ (unsigned long) entry->fid_dev +
-+ (unsigned long) entry->fid_mtime +
-+ (unsigned long) entry->fid_mtimensec) % table_size;
-+}
-+
-+bool
-+file_id_comparator (file_id *entry1, file_id *entry2)
-+{
-+ return (entry1->fid_dev == entry2->fid_dev &&
-+ entry1->fid_ino == entry2->fid_ino &&
-+ entry1->fid_mtime == entry2->fid_mtime &&
-+ entry1->fid_mtimensec == entry2->fid_mtimensec);
-+}
-+
-+void
-+file_id_freer (file_id *entry)
-+{
-+ free (entry);
-+}
-+
-+Hash_table *file_id_hash;
-+
-+/* Check if the file identified by FILENAME and PST was already seen. If the
-+ file was already seen, returns TRUE. If the file has not yet been seen
-+ and INSERT is TRUE, it is inserted. PST or FILENAME may be NULL (but not
-+ both of them). */
-+
-+static bool
-+fid_search (const char *filename, const struct stat *pst, bool insert)
-+{
-+ struct stat st;
-+
-+ if (!file_id_hash)
-+ {
-+ file_id_hash = hash_initialize (0, NULL, (Hash_hasher) file_id_hasher,
-+ (Hash_comparator) file_id_comparator,
-+ (Hash_data_freer) file_id_freer);
-+ if (!file_id_hash)
-+ pfatal ("hash_initialize");
-+ }
-+
-+ if (!pst)
-+ {
-+ if (stat (filename, &st) != 0)
-+ pfatal ("%s", quotearg (filename));
-+ pst = &st;
-+ }
-+
-+ if (insert)
-+ {
-+ file_id *pfid = xmalloc (sizeof (file_id)), *old_pfid;
-+ pfid->fid_dev = pst->st_dev;
-+ pfid->fid_ino = pst->st_ino;
-+ pfid->fid_mtime = pst->st_mtime;
-+#if defined(HAVE_STAT_NSEC)
-+ pfid->fid_mtimensec = pst->st_mtimensec;
-+#elif defined(HAVE_STAT_TIMEVAL)
-+ pfid->fid_mtimensec = pst->st_mtim.tv_nsec;
-+#else
-+ pfid->fid_mtimensec = 0;
-+#endif
-+ old_pfid = hash_insert (file_id_hash, pfid);
-+ if (!old_pfid)
-+ pfatal ("hash_insert");
-+ else if (old_pfid != pfid)
-+ {
-+ free (pfid);
-+ return true;
-+ }
-+ else
-+ return false;
-+ }
-+ else
-+ {
-+ file_id fid;
-+ fid.fid_dev = pst->st_dev;
-+ fid.fid_ino = pst->st_ino;
-+ fid.fid_mtime = pst->st_mtime;
-+#if defined(HAVE_STAT_NSEC)
-+ fid.fid_mtimensec = pst->st_mtimensec;
-+#elif defined(HAVE_STAT_TIMEVAL)
-+ fid.fid_mtimensec = pst->st_mtim.tv_nsec;
-+#else
-+ fid.fid_mtimensec = 0;
-+#endif
-+ return hash_lookup (file_id_hash, &fid) != 0;
-+ }
-+}
-+
---- patch-2.5.9.orig/hash.c
-+++ patch-2.5.9/hash.c
-@@ -0,0 +1,1051 @@
-+/* hash - hashing table processing.
-+
-+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
-+ Foundation, Inc.
-+
-+ Written by Jim Meyering, 1992.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software Foundation,
-+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+
-+/* A generic hash table package. */
-+
-+/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead
-+ of malloc. If you change USE_OBSTACK, you have to recompile! */
-+
-+#if HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+#if HAVE_STDLIB_H
-+# include <stdlib.h>
-+#endif
-+
-+#include <limits.h>
-+#include <stdbool.h>
-+#include <stdio.h>
-+
-+#ifndef HAVE_DECL_FREE
-+"this configure-time declaration test was not run"
-+#endif
-+#if !HAVE_DECL_FREE
-+void free ();
-+#endif
-+
-+#ifndef HAVE_DECL_MALLOC
-+"this configure-time declaration test was not run"
-+#endif
-+#if !HAVE_DECL_MALLOC
-+char *malloc ();
-+#endif
-+
-+#if USE_OBSTACK
-+# include "obstack.h"
-+# ifndef obstack_chunk_alloc
-+# define obstack_chunk_alloc malloc
-+# endif
-+# ifndef obstack_chunk_free
-+# define obstack_chunk_free free
-+# endif
-+#endif
-+
-+#include "hash.h"
-+
-+struct hash_table
-+ {
-+ /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1,
-+ for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets
-+ are not empty, there are N_ENTRIES active entries in the table. */
-+ struct hash_entry *bucket;
-+ struct hash_entry *bucket_limit;
-+ unsigned n_buckets;
-+ unsigned n_buckets_used;
-+ unsigned n_entries;
-+
-+ /* Tuning arguments, kept in a physicaly separate structure. */
-+ const Hash_tuning *tuning;
-+
-+ /* Three functions are given to `hash_initialize', see the documentation
-+ block for this function. In a word, HASHER randomizes a user entry
-+ into a number up from 0 up to some maximum minus 1; COMPARATOR returns
-+ true if two user entries compare equally; and DATA_FREER is the cleanup
-+ function for a user entry. */
-+ Hash_hasher hasher;
-+ Hash_comparator comparator;
-+ Hash_data_freer data_freer;
-+
-+ /* A linked list of freed struct hash_entry structs. */
-+ struct hash_entry *free_entry_list;
-+
-+#if USE_OBSTACK
-+ /* Whenever obstacks are used, it is possible to allocate all overflowed
-+ entries into a single stack, so they all can be freed in a single
-+ operation. It is not clear if the speedup is worth the trouble. */
-+ struct obstack entry_stack;
-+#endif
-+ };
-+
-+/* A hash table contains many internal entries, each holding a pointer to
-+ some user provided data (also called a user entry). An entry indistinctly
-+ refers to both the internal entry and its associated user entry. A user
-+ entry contents may be hashed by a randomization function (the hashing
-+ function, or just `hasher' for short) into a number (or `slot') between 0
-+ and the current table size. At each slot position in the hash table,
-+ starts a linked chain of entries for which the user data all hash to this
-+ slot. A bucket is the collection of all entries hashing to the same slot.
-+
-+ A good `hasher' function will distribute entries rather evenly in buckets.
-+ In the ideal case, the length of each bucket is roughly the number of
-+ entries divided by the table size. Finding the slot for a data is usually
-+ done in constant time by the `hasher', and the later finding of a precise
-+ entry is linear in time with the size of the bucket. Consequently, a
-+ larger hash table size (that is, a larger number of buckets) is prone to
-+ yielding shorter chains, *given* the `hasher' function behaves properly.
-+
-+ Long buckets slow down the lookup algorithm. One might use big hash table
-+ sizes in hope to reduce the average length of buckets, but this might
-+ become inordinate, as unused slots in the hash table take some space. The
-+ best bet is to make sure you are using a good `hasher' function (beware
-+ that those are not that easy to write! :-), and to use a table size
-+ larger than the actual number of entries. */
-+
-+/* If an insertion makes the ratio of nonempty buckets to table size larger
-+ than the growth threshold (a number between 0.0 and 1.0), then increase
-+ the table size by multiplying by the growth factor (a number greater than
-+ 1.0). The growth threshold defaults to 0.8, and the growth factor
-+ defaults to 1.414, meaning that the table will have doubled its size
-+ every second time 80% of the buckets get used. */
-+#define DEFAULT_GROWTH_THRESHOLD 0.8
-+#define DEFAULT_GROWTH_FACTOR 1.414
-+
-+/* If a deletion empties a bucket and causes the ratio of used buckets to
-+ table size to become smaller than the shrink threshold (a number between
-+ 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a
-+ number greater than the shrink threshold but smaller than 1.0). The shrink
-+ threshold and factor default to 0.0 and 1.0, meaning that the table never
-+ shrinks. */
-+#define DEFAULT_SHRINK_THRESHOLD 0.0
-+#define DEFAULT_SHRINK_FACTOR 1.0
-+
-+/* Use this to initialize or reset a TUNING structure to
-+ some sensible values. */
-+static const Hash_tuning default_tuning =
-+ {
-+ DEFAULT_SHRINK_THRESHOLD,
-+ DEFAULT_SHRINK_FACTOR,
-+ DEFAULT_GROWTH_THRESHOLD,
-+ DEFAULT_GROWTH_FACTOR,
-+ false
-+ };
-+
-+/* Information and lookup. */
-+
-+/* The following few functions provide information about the overall hash
-+ table organization: the number of entries, number of buckets and maximum
-+ length of buckets. */
-+
-+/* Return the number of buckets in the hash table. The table size, the total
-+ number of buckets (used plus unused), or the maximum number of slots, are
-+ the same quantity. */
-+
-+unsigned
-+hash_get_n_buckets (const Hash_table *table)
-+{
-+ return table->n_buckets;
-+}
-+
-+/* Return the number of slots in use (non-empty buckets). */
-+
-+unsigned
-+hash_get_n_buckets_used (const Hash_table *table)
-+{
-+ return table->n_buckets_used;
-+}
-+
-+/* Return the number of active entries. */
-+
-+unsigned
-+hash_get_n_entries (const Hash_table *table)
-+{
-+ return table->n_entries;
-+}
-+
-+/* Return the length of the longest chain (bucket). */
-+
-+unsigned
-+hash_get_max_bucket_length (const Hash_table *table)
-+{
-+ struct hash_entry *bucket;
-+ unsigned max_bucket_length = 0;
-+
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ if (bucket->data)
-+ {
-+ struct hash_entry *cursor = bucket;
-+ unsigned bucket_length = 1;
-+
-+ while (cursor = cursor->next, cursor)
-+ bucket_length++;
-+
-+ if (bucket_length > max_bucket_length)
-+ max_bucket_length = bucket_length;
-+ }
-+ }
-+
-+ return max_bucket_length;
-+}
-+
-+/* Do a mild validation of a hash table, by traversing it and checking two
-+ statistics. */
-+
-+bool
-+hash_table_ok (const Hash_table *table)
-+{
-+ struct hash_entry *bucket;
-+ unsigned n_buckets_used = 0;
-+ unsigned n_entries = 0;
-+
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ if (bucket->data)
-+ {
-+ struct hash_entry *cursor = bucket;
-+
-+ /* Count bucket head. */
-+ n_buckets_used++;
-+ n_entries++;
-+
-+ /* Count bucket overflow. */
-+ while (cursor = cursor->next, cursor)
-+ n_entries++;
-+ }
-+ }
-+
-+ if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries)
-+ return true;
-+
-+ return false;
-+}
-+
-+void
-+hash_print_statistics (const Hash_table *table, FILE *stream)
-+{
-+ unsigned n_entries = hash_get_n_entries (table);
-+ unsigned n_buckets = hash_get_n_buckets (table);
-+ unsigned n_buckets_used = hash_get_n_buckets_used (table);
-+ unsigned max_bucket_length = hash_get_max_bucket_length (table);
-+
-+ fprintf (stream, "# entries: %u\n", n_entries);
-+ fprintf (stream, "# buckets: %u\n", n_buckets);
-+ fprintf (stream, "# buckets used: %u (%.2f%%)\n", n_buckets_used,
-+ (100.0 * n_buckets_used) / n_buckets);
-+ fprintf (stream, "max bucket length: %u\n", max_bucket_length);
-+}
-+
-+/* If ENTRY matches an entry already in the hash table, return the
-+ entry from the table. Otherwise, return NULL. */
-+
-+void *
-+hash_lookup (const Hash_table *table, const void *entry)
-+{
-+ struct hash_entry *bucket
-+ = table->bucket + table->hasher (entry, table->n_buckets);
-+ struct hash_entry *cursor;
-+
-+ if (! (bucket < table->bucket_limit))
-+ abort ();
-+
-+ if (bucket->data == NULL)
-+ return NULL;
-+
-+ for (cursor = bucket; cursor; cursor = cursor->next)
-+ if (table->comparator (entry, cursor->data))
-+ return cursor->data;
-+
-+ return NULL;
-+}
-+
-+/* Walking. */
-+
-+/* The functions in this page traverse the hash table and process the
-+ contained entries. For the traversal to work properly, the hash table
-+ should not be resized nor modified while any particular entry is being
-+ processed. In particular, entries should not be added or removed. */
-+
-+/* Return the first data in the table, or NULL if the table is empty. */
-+
-+void *
-+hash_get_first (const Hash_table *table)
-+{
-+ struct hash_entry *bucket;
-+
-+ if (table->n_entries == 0)
-+ return NULL;
-+
-+ for (bucket = table->bucket; ; bucket++)
-+ if (! (bucket < table->bucket_limit))
-+ abort ();
-+ else if (bucket->data)
-+ return bucket->data;
-+}
-+
-+/* Return the user data for the entry following ENTRY, where ENTRY has been
-+ returned by a previous call to either `hash_get_first' or `hash_get_next'.
-+ Return NULL if there are no more entries. */
-+
-+void *
-+hash_get_next (const Hash_table *table, const void *entry)
-+{
-+ struct hash_entry *bucket
-+ = table->bucket + table->hasher (entry, table->n_buckets);
-+ struct hash_entry *cursor;
-+
-+ if (! (bucket < table->bucket_limit))
-+ abort ();
-+
-+ /* Find next entry in the same bucket. */
-+ for (cursor = bucket; cursor; cursor = cursor->next)
-+ if (cursor->data == entry && cursor->next)
-+ return cursor->next->data;
-+
-+ /* Find first entry in any subsequent bucket. */
-+ while (++bucket < table->bucket_limit)
-+ if (bucket->data)
-+ return bucket->data;
-+
-+ /* None found. */
-+ return NULL;
-+}
-+
-+/* Fill BUFFER with pointers to active user entries in the hash table, then
-+ return the number of pointers copied. Do not copy more than BUFFER_SIZE
-+ pointers. */
-+
-+unsigned
-+hash_get_entries (const Hash_table *table, void **buffer,
-+ unsigned buffer_size)
-+{
-+ unsigned counter = 0;
-+ struct hash_entry *bucket;
-+ struct hash_entry *cursor;
-+
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ if (bucket->data)
-+ {
-+ for (cursor = bucket; cursor; cursor = cursor->next)
-+ {
-+ if (counter >= buffer_size)
-+ return counter;
-+ buffer[counter++] = cursor->data;
-+ }
-+ }
-+ }
-+
-+ return counter;
-+}
-+
-+/* Call a PROCESSOR function for each entry of a hash table, and return the
-+ number of entries for which the processor function returned success. A
-+ pointer to some PROCESSOR_DATA which will be made available to each call to
-+ the processor function. The PROCESSOR accepts two arguments: the first is
-+ the user entry being walked into, the second is the value of PROCESSOR_DATA
-+ as received. The walking continue for as long as the PROCESSOR function
-+ returns nonzero. When it returns zero, the walking is interrupted. */
-+
-+unsigned
-+hash_do_for_each (const Hash_table *table, Hash_processor processor,
-+ void *processor_data)
-+{
-+ unsigned counter = 0;
-+ struct hash_entry *bucket;
-+ struct hash_entry *cursor;
-+
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ if (bucket->data)
-+ {
-+ for (cursor = bucket; cursor; cursor = cursor->next)
-+ {
-+ if (!(*processor) (cursor->data, processor_data))
-+ return counter;
-+ counter++;
-+ }
-+ }
-+ }
-+
-+ return counter;
-+}
-+
-+/* Allocation and clean-up. */
-+
-+/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1.
-+ This is a convenience routine for constructing other hashing functions. */
-+
-+#if USE_DIFF_HASH
-+
-+/* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see
-+ B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm,
-+ Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash
-+ algorithms tend to be domain-specific, so what's good for [diffutils'] io.c
-+ may not be good for your application." */
-+
-+unsigned
-+hash_string (const char *string, unsigned n_buckets)
-+{
-+# define ROTATE_LEFT(Value, Shift) \
-+ ((Value) << (Shift) | (Value) >> ((sizeof (unsigned) * CHAR_BIT) - (Shift)))
-+# define HASH_ONE_CHAR(Value, Byte) \
-+ ((Byte) + ROTATE_LEFT (Value, 7))
-+
-+ unsigned value = 0;
-+
-+ for (; *string; string++)
-+ value = HASH_ONE_CHAR (value, *(const unsigned char *) string);
-+ return value % n_buckets;
-+
-+# undef ROTATE_LEFT
-+# undef HASH_ONE_CHAR
-+}
-+
-+#else /* not USE_DIFF_HASH */
-+
-+/* This one comes from `recode', and performs a bit better than the above as
-+ per a few experiments. It is inspired from a hashing routine found in the
-+ very old Cyber `snoop', itself written in typical Greg Mansfield style.
-+ (By the way, what happened to this excellent man? Is he still alive?) */
-+
-+unsigned
-+hash_string (const char *string, unsigned n_buckets)
-+{
-+ unsigned value = 0;
-+
-+ while (*string)
-+ value = ((value * 31 + (int) *(const unsigned char *) string++)
-+ % n_buckets);
-+ return value;
-+}
-+
-+#endif /* not USE_DIFF_HASH */
-+
-+/* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd
-+ number at least equal to 11. */
-+
-+static bool
-+is_prime (unsigned long candidate)
-+{
-+ unsigned long divisor = 3;
-+ unsigned long square = divisor * divisor;
-+
-+ while (square < candidate && (candidate % divisor))
-+ {
-+ divisor++;
-+ square += 4 * divisor;
-+ divisor++;
-+ }
-+
-+ return (candidate % divisor ? true : false);
-+}
-+
-+/* Round a given CANDIDATE number up to the nearest prime, and return that
-+ prime. Primes lower than 10 are merely skipped. */
-+
-+static unsigned long
-+next_prime (unsigned long candidate)
-+{
-+ /* Skip small primes. */
-+ if (candidate < 10)
-+ candidate = 10;
-+
-+ /* Make it definitely odd. */
-+ candidate |= 1;
-+
-+ while (!is_prime (candidate))
-+ candidate += 2;
-+
-+ return candidate;
-+}
-+
-+void
-+hash_reset_tuning (Hash_tuning *tuning)
-+{
-+ *tuning = default_tuning;
-+}
-+
-+/* For the given hash TABLE, check the user supplied tuning structure for
-+ reasonable values, and return true if there is no gross error with it.
-+ Otherwise, definitively reset the TUNING field to some acceptable default
-+ in the hash table (that is, the user loses the right of further modifying
-+ tuning arguments), and return false. */
-+
-+static bool
-+check_tuning (Hash_table *table)
-+{
-+ const Hash_tuning *tuning = table->tuning;
-+
-+ if (tuning->growth_threshold > 0.0
-+ && tuning->growth_threshold < 1.0
-+ && tuning->growth_factor > 1.0
-+ && tuning->shrink_threshold >= 0.0
-+ && tuning->shrink_threshold < 1.0
-+ && tuning->shrink_factor > tuning->shrink_threshold
-+ && tuning->shrink_factor <= 1.0
-+ && tuning->shrink_threshold < tuning->growth_threshold)
-+ return true;
-+
-+ table->tuning = &default_tuning;
-+ return false;
-+}
-+
-+/* Allocate and return a new hash table, or NULL upon failure. The initial
-+ number of buckets is automatically selected so as to _guarantee_ that you
-+ may insert at least CANDIDATE different user entries before any growth of
-+ the hash table size occurs. So, if have a reasonably tight a-priori upper
-+ bound on the number of entries you intend to insert in the hash table, you
-+ may save some table memory and insertion time, by specifying it here. If
-+ the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
-+ argument has its meaning changed to the wanted number of buckets.
-+
-+ TUNING points to a structure of user-supplied values, in case some fine
-+ tuning is wanted over the default behavior of the hasher. If TUNING is
-+ NULL, the default tuning parameters are used instead.
-+
-+ The user-supplied HASHER function should be provided. It accepts two
-+ arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a
-+ slot number for that entry which should be in the range 0..TABLE_SIZE-1.
-+ This slot number is then returned.
-+
-+ The user-supplied COMPARATOR function should be provided. It accepts two
-+ arguments pointing to user data, it then returns true for a pair of entries
-+ that compare equal, or false otherwise. This function is internally called
-+ on entries which are already known to hash to the same bucket index.
-+
-+ The user-supplied DATA_FREER function, when not NULL, may be later called
-+ with the user data as an argument, just before the entry containing the
-+ data gets freed. This happens from within `hash_free' or `hash_clear'.
-+ You should specify this function only if you want these functions to free
-+ all of your `data' data. This is typically the case when your data is
-+ simply an auxiliary struct that you have malloc'd to aggregate several
-+ values. */
-+
-+Hash_table *
-+hash_initialize (unsigned candidate, const Hash_tuning *tuning,
-+ Hash_hasher hasher, Hash_comparator comparator,
-+ Hash_data_freer data_freer)
-+{
-+ Hash_table *table;
-+ struct hash_entry *bucket;
-+
-+ if (hasher == NULL || comparator == NULL)
-+ return NULL;
-+
-+ table = (Hash_table *) malloc (sizeof (Hash_table));
-+ if (table == NULL)
-+ return NULL;
-+
-+ if (!tuning)
-+ tuning = &default_tuning;
-+ table->tuning = tuning;
-+ if (!check_tuning (table))
-+ {
-+ /* Fail if the tuning options are invalid. This is the only occasion
-+ when the user gets some feedback about it. Once the table is created,
-+ if the user provides invalid tuning options, we silently revert to
-+ using the defaults, and ignore further request to change the tuning
-+ options. */
-+ free (table);
-+ return NULL;
-+ }
-+
-+ table->n_buckets
-+ = next_prime (tuning->is_n_buckets ? candidate
-+ : (unsigned) (candidate / tuning->growth_threshold));
-+
-+ table->bucket = (struct hash_entry *)
-+ malloc (table->n_buckets * sizeof (struct hash_entry));
-+ if (table->bucket == NULL)
-+ {
-+ free (table);
-+ return NULL;
-+ }
-+ table->bucket_limit = table->bucket + table->n_buckets;
-+
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ bucket->data = NULL;
-+ bucket->next = NULL;
-+ }
-+ table->n_buckets_used = 0;
-+ table->n_entries = 0;
-+
-+ table->hasher = hasher;
-+ table->comparator = comparator;
-+ table->data_freer = data_freer;
-+
-+ table->free_entry_list = NULL;
-+#if USE_OBSTACK
-+ obstack_init (&table->entry_stack);
-+#endif
-+ return table;
-+}
-+
-+/* Make all buckets empty, placing any chained entries on the free list.
-+ Apply the user-specified function data_freer (if any) to the datas of any
-+ affected entries. */
-+
-+void
-+hash_clear (Hash_table *table)
-+{
-+ struct hash_entry *bucket;
-+
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ if (bucket->data)
-+ {
-+ struct hash_entry *cursor;
-+ struct hash_entry *next;
-+
-+ /* Free the bucket overflow. */
-+ for (cursor = bucket->next; cursor; cursor = next)
-+ {
-+ if (table->data_freer)
-+ (*table->data_freer) (cursor->data);
-+ cursor->data = NULL;
-+
-+ next = cursor->next;
-+ /* Relinking is done one entry at a time, as it is to be expected
-+ that overflows are either rare or short. */
-+ cursor->next = table->free_entry_list;
-+ table->free_entry_list = cursor;
-+ }
-+
-+ /* Free the bucket head. */
-+ if (table->data_freer)
-+ (*table->data_freer) (bucket->data);
-+ bucket->data = NULL;
-+ bucket->next = NULL;
-+ }
-+ }
-+
-+ table->n_buckets_used = 0;
-+ table->n_entries = 0;
-+}
-+
-+/* Reclaim all storage associated with a hash table. If a data_freer
-+ function has been supplied by the user when the hash table was created,
-+ this function applies it to the data of each entry before freeing that
-+ entry. */
-+
-+void
-+hash_free (Hash_table *table)
-+{
-+ struct hash_entry *bucket;
-+ struct hash_entry *cursor;
-+ struct hash_entry *next;
-+
-+ /* Call the user data_freer function. */
-+ if (table->data_freer && table->n_entries)
-+ {
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ if (bucket->data)
-+ {
-+ for (cursor = bucket; cursor; cursor = cursor->next)
-+ {
-+ (*table->data_freer) (cursor->data);
-+ }
-+ }
-+ }
-+ }
-+
-+#if USE_OBSTACK
-+
-+ obstack_free (&table->entry_stack, NULL);
-+
-+#else
-+
-+ /* Free all bucket overflowed entries. */
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ for (cursor = bucket->next; cursor; cursor = next)
-+ {
-+ next = cursor->next;
-+ free (cursor);
-+ }
-+ }
-+
-+ /* Also reclaim the internal list of previously freed entries. */
-+ for (cursor = table->free_entry_list; cursor; cursor = next)
-+ {
-+ next = cursor->next;
-+ free (cursor);
-+ }
-+
-+#endif
-+
-+ /* Free the remainder of the hash table structure. */
-+ free (table->bucket);
-+ free (table);
-+}
-+
-+/* Insertion and deletion. */
-+
-+/* Get a new hash entry for a bucket overflow, possibly by reclying a
-+ previously freed one. If this is not possible, allocate a new one. */
-+
-+static struct hash_entry *
-+allocate_entry (Hash_table *table)
-+{
-+ struct hash_entry *new;
-+
-+ if (table->free_entry_list)
-+ {
-+ new = table->free_entry_list;
-+ table->free_entry_list = new->next;
-+ }
-+ else
-+ {
-+#if USE_OBSTACK
-+ new = (struct hash_entry *)
-+ obstack_alloc (&table->entry_stack, sizeof (struct hash_entry));
-+#else
-+ new = (struct hash_entry *) malloc (sizeof (struct hash_entry));
-+#endif
-+ }
-+
-+ return new;
-+}
-+
-+/* Free a hash entry which was part of some bucket overflow,
-+ saving it for later recycling. */
-+
-+static void
-+free_entry (Hash_table *table, struct hash_entry *entry)
-+{
-+ entry->data = NULL;
-+ entry->next = table->free_entry_list;
-+ table->free_entry_list = entry;
-+}
-+
-+/* This private function is used to help with insertion and deletion. When
-+ ENTRY matches an entry in the table, return a pointer to the corresponding
-+ user data and set *BUCKET_HEAD to the head of the selected bucket.
-+ Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in
-+ the table, unlink the matching entry. */
-+
-+static void *
-+hash_find_entry (Hash_table *table, const void *entry,
-+ struct hash_entry **bucket_head, bool delete)
-+{
-+ struct hash_entry *bucket
-+ = table->bucket + table->hasher (entry, table->n_buckets);
-+ struct hash_entry *cursor;
-+
-+ if (! (bucket < table->bucket_limit))
-+ abort ();
-+
-+ *bucket_head = bucket;
-+
-+ /* Test for empty bucket. */
-+ if (bucket->data == NULL)
-+ return NULL;
-+
-+ /* See if the entry is the first in the bucket. */
-+ if ((*table->comparator) (entry, bucket->data))
-+ {
-+ void *data = bucket->data;
-+
-+ if (delete)
-+ {
-+ if (bucket->next)
-+ {
-+ struct hash_entry *next = bucket->next;
-+
-+ /* Bump the first overflow entry into the bucket head, then save
-+ the previous first overflow entry for later recycling. */
-+ *bucket = *next;
-+ free_entry (table, next);
-+ }
-+ else
-+ {
-+ bucket->data = NULL;
-+ }
-+ }
-+
-+ return data;
-+ }
-+
-+ /* Scan the bucket overflow. */
-+ for (cursor = bucket; cursor->next; cursor = cursor->next)
-+ {
-+ if ((*table->comparator) (entry, cursor->next->data))
-+ {
-+ void *data = cursor->next->data;
-+
-+ if (delete)
-+ {
-+ struct hash_entry *next = cursor->next;
-+
-+ /* Unlink the entry to delete, then save the freed entry for later
-+ recycling. */
-+ cursor->next = next->next;
-+ free_entry (table, next);
-+ }
-+
-+ return data;
-+ }
-+ }
-+
-+ /* No entry found. */
-+ return NULL;
-+}
-+
-+/* For an already existing hash table, change the number of buckets through
-+ specifying CANDIDATE. The contents of the hash table are preserved. The
-+ new number of buckets is automatically selected so as to _guarantee_ that
-+ the table may receive at least CANDIDATE different user entries, including
-+ those already in the table, before any other growth of the hash table size
-+ occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
-+ exact number of buckets desired. */
-+
-+bool
-+hash_rehash (Hash_table *table, unsigned candidate)
-+{
-+ Hash_table *new_table;
-+ struct hash_entry *bucket;
-+ struct hash_entry *cursor;
-+ struct hash_entry *next;
-+
-+ new_table = hash_initialize (candidate, table->tuning, table->hasher,
-+ table->comparator, table->data_freer);
-+ if (new_table == NULL)
-+ return false;
-+
-+ /* Merely reuse the extra old space into the new table. */
-+#if USE_OBSTACK
-+ obstack_free (&new_table->entry_stack, NULL);
-+ new_table->entry_stack = table->entry_stack;
-+#endif
-+ new_table->free_entry_list = table->free_entry_list;
-+
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ if (bucket->data)
-+ for (cursor = bucket; cursor; cursor = next)
-+ {
-+ void *data = cursor->data;
-+ struct hash_entry *new_bucket
-+ = (new_table->bucket
-+ + new_table->hasher (data, new_table->n_buckets));
-+
-+ if (! (new_bucket < new_table->bucket_limit))
-+ abort ();
-+
-+ next = cursor->next;
-+
-+ if (new_bucket->data)
-+ {
-+ if (cursor == bucket)
-+ {
-+ /* Allocate or recycle an entry, when moving from a bucket
-+ header into a bucket overflow. */
-+ struct hash_entry *new_entry = allocate_entry (new_table);
-+
-+ if (new_entry == NULL)
-+ return false;
-+
-+ new_entry->data = data;
-+ new_entry->next = new_bucket->next;
-+ new_bucket->next = new_entry;
-+ }
-+ else
-+ {
-+ /* Merely relink an existing entry, when moving from a
-+ bucket overflow into a bucket overflow. */
-+ cursor->next = new_bucket->next;
-+ new_bucket->next = cursor;
-+ }
-+ }
-+ else
-+ {
-+ /* Free an existing entry, when moving from a bucket
-+ overflow into a bucket header. Also take care of the
-+ simple case of moving from a bucket header into a bucket
-+ header. */
-+ new_bucket->data = data;
-+ new_table->n_buckets_used++;
-+ if (cursor != bucket)
-+ free_entry (new_table, cursor);
-+ }
-+ }
-+
-+ free (table->bucket);
-+ table->bucket = new_table->bucket;
-+ table->bucket_limit = new_table->bucket_limit;
-+ table->n_buckets = new_table->n_buckets;
-+ table->n_buckets_used = new_table->n_buckets_used;
-+ table->free_entry_list = new_table->free_entry_list;
-+ /* table->n_entries already holds its value. */
-+#if USE_OBSTACK
-+ table->entry_stack = new_table->entry_stack;
-+#endif
-+ free (new_table);
-+
-+ return true;
-+}
-+
-+/* If ENTRY matches an entry already in the hash table, return the pointer
-+ to the entry from the table. Otherwise, insert ENTRY and return ENTRY.
-+ Return NULL if the storage required for insertion cannot be allocated. */
-+
-+void *
-+hash_insert (Hash_table *table, const void *entry)
-+{
-+ void *data;
-+ struct hash_entry *bucket;
-+
-+ /* The caller cannot insert a NULL entry. */
-+ if (! entry)
-+ abort ();
-+
-+ /* If there's a matching entry already in the table, return that. */
-+ if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL)
-+ return data;
-+
-+ /* ENTRY is not matched, it should be inserted. */
-+
-+ if (bucket->data)
-+ {
-+ struct hash_entry *new_entry = allocate_entry (table);
-+
-+ if (new_entry == NULL)
-+ return NULL;
-+
-+ /* Add ENTRY in the overflow of the bucket. */
-+
-+ new_entry->data = (void *) entry;
-+ new_entry->next = bucket->next;
-+ bucket->next = new_entry;
-+ table->n_entries++;
-+ return (void *) entry;
-+ }
-+
-+ /* Add ENTRY right in the bucket head. */
-+
-+ bucket->data = (void *) entry;
-+ table->n_entries++;
-+ table->n_buckets_used++;
-+
-+ /* If the growth threshold of the buckets in use has been reached, increase
-+ the table size and rehash. There's no point in checking the number of
-+ entries: if the hashing function is ill-conditioned, rehashing is not
-+ likely to improve it. */
-+
-+ if (table->n_buckets_used
-+ > table->tuning->growth_threshold * table->n_buckets)
-+ {
-+ /* Check more fully, before starting real work. If tuning arguments
-+ became invalid, the second check will rely on proper defaults. */
-+ check_tuning (table);
-+ if (table->n_buckets_used
-+ > table->tuning->growth_threshold * table->n_buckets)
-+ {
-+ const Hash_tuning *tuning = table->tuning;
-+ unsigned candidate
-+ = (unsigned) (tuning->is_n_buckets
-+ ? (table->n_buckets * tuning->growth_factor)
-+ : (table->n_buckets * tuning->growth_factor
-+ * tuning->growth_threshold));
-+
-+ /* If the rehash fails, arrange to return NULL. */
-+ if (!hash_rehash (table, candidate))
-+ entry = NULL;
-+ }
-+ }
-+
-+ return (void *) entry;
-+}
-+
-+/* If ENTRY is already in the table, remove it and return the just-deleted
-+ data (the user may want to deallocate its storage). If ENTRY is not in the
-+ table, don't modify the table and return NULL. */
-+
-+void *
-+hash_delete (Hash_table *table, const void *entry)
-+{
-+ void *data;
-+ struct hash_entry *bucket;
-+
-+ data = hash_find_entry (table, entry, &bucket, true);
-+ if (!data)
-+ return NULL;
-+
-+ table->n_entries--;
-+ if (!bucket->data)
-+ {
-+ table->n_buckets_used--;
-+
-+ /* If the shrink threshold of the buckets in use has been reached,
-+ rehash into a smaller table. */
-+
-+ if (table->n_buckets_used
-+ < table->tuning->shrink_threshold * table->n_buckets)
-+ {
-+ /* Check more fully, before starting real work. If tuning arguments
-+ became invalid, the second check will rely on proper defaults. */
-+ check_tuning (table);
-+ if (table->n_buckets_used
-+ < table->tuning->shrink_threshold * table->n_buckets)
-+ {
-+ const Hash_tuning *tuning = table->tuning;
-+ unsigned candidate
-+ = (unsigned) (tuning->is_n_buckets
-+ ? table->n_buckets * tuning->shrink_factor
-+ : (table->n_buckets * tuning->shrink_factor
-+ * tuning->growth_threshold));
-+
-+ hash_rehash (table, candidate);
-+ }
-+ }
-+ }
-+
-+ return data;
-+}
-+
-+/* Testing. */
-+
-+#if TESTING
-+
-+void
-+hash_print (const Hash_table *table)
-+{
-+ struct hash_entry *bucket;
-+
-+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
-+ {
-+ struct hash_entry *cursor;
-+
-+ if (bucket)
-+ printf ("%d:\n", bucket - table->bucket);
-+
-+ for (cursor = bucket; cursor; cursor = cursor->next)
-+ {
-+ char *s = (char *) cursor->data;
-+ /* FIXME */
-+ if (s)
-+ printf (" %s\n", s);
-+ }
-+ }
-+}
-+
-+#endif /* TESTING */
---- patch-2.5.9.orig/hash.h
-+++ patch-2.5.9/hash.h
-@@ -0,0 +1,93 @@
-+/* hash - hashing table processing.
-+ Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
-+ Written by Jim Meyering <meyering@ascend.com>, 1998.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software Foundation,
-+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-+
-+/* A generic hash table package. */
-+
-+/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
-+ obstacks instead of malloc, and recompile `hash.c' with same setting. */
-+
-+#ifndef HASH_H_
-+# define HASH_H_
-+
-+# ifndef PARAMS
-+# if PROTOTYPES || __STDC__
-+# define PARAMS(Args) Args
-+# else
-+# define PARAMS(Args) ()
-+# endif
-+# endif
-+
-+typedef unsigned (*Hash_hasher) PARAMS ((const void *, unsigned));
-+typedef bool (*Hash_comparator) PARAMS ((const void *, const void *));
-+typedef void (*Hash_data_freer) PARAMS ((void *));
-+typedef bool (*Hash_processor) PARAMS ((void *, void *));
-+
-+struct hash_entry
-+ {
-+ void *data;
-+ struct hash_entry *next;
-+ };
-+
-+struct hash_tuning
-+ {
-+ /* This structure is mainly used for `hash_initialize', see the block
-+ documentation of `hash_reset_tuning' for more complete comments. */
-+
-+ float shrink_threshold; /* ratio of used buckets to trigger a shrink */
-+ float shrink_factor; /* ratio of new smaller size to original size */
-+ float growth_threshold; /* ratio of used buckets to trigger a growth */
-+ float growth_factor; /* ratio of new bigger size to original size */
-+ bool is_n_buckets; /* if CANDIDATE really means table size */
-+ };
-+
-+typedef struct hash_tuning Hash_tuning;
-+
-+struct hash_table;
-+
-+typedef struct hash_table Hash_table;
-+
-+/* Information and lookup. */
-+unsigned hash_get_n_buckets PARAMS ((const Hash_table *));
-+unsigned hash_get_n_buckets_used PARAMS ((const Hash_table *));
-+unsigned hash_get_n_entries PARAMS ((const Hash_table *));
-+unsigned hash_get_max_bucket_length PARAMS ((const Hash_table *));
-+bool hash_table_ok PARAMS ((const Hash_table *));
-+void hash_print_statistics PARAMS ((const Hash_table *, FILE *));
-+void *hash_lookup PARAMS ((const Hash_table *, const void *));
-+
-+/* Walking. */
-+void *hash_get_first PARAMS ((const Hash_table *));
-+void *hash_get_next PARAMS ((const Hash_table *, const void *));
-+unsigned hash_get_entries PARAMS ((const Hash_table *, void **, unsigned));
-+unsigned hash_do_for_each PARAMS ((const Hash_table *, Hash_processor, void *));
-+
-+/* Allocation and clean-up. */
-+unsigned hash_string PARAMS ((const char *, unsigned));
-+void hash_reset_tuning PARAMS ((Hash_tuning *));
-+Hash_table *hash_initialize PARAMS ((unsigned, const Hash_tuning *,
-+ Hash_hasher, Hash_comparator,
-+ Hash_data_freer));
-+void hash_clear PARAMS ((Hash_table *));
-+void hash_free PARAMS ((Hash_table *));
-+
-+/* Insertion and deletion. */
-+bool hash_rehash PARAMS ((Hash_table *, unsigned));
-+void *hash_insert PARAMS ((Hash_table *, const void *));
-+void *hash_delete PARAMS ((Hash_table *, const void *));
-+
-+#endif
diff --git a/meta/recipes-devtools/patch/patch/global-reject-file.diff b/meta/recipes-devtools/patch/patch/global-reject-file.diff
deleted file mode 100644
index bb7ca79123..0000000000
--- a/meta/recipes-devtools/patch/patch/global-reject-file.diff
+++ /dev/null
@@ -1,203 +0,0 @@
-Upstream-Status: Inappropriate [debian patch]
-
-Index: patch-2.5.9/patch.man
-===================================================================
---- patch-2.5.9.orig/patch.man
-+++ patch-2.5.9/patch.man
-@@ -520,6 +520,15 @@ file.
- \fB\*=reject\-unified\fP
- Produce unified reject files. The default is to produce context type reject files.
- .TP
-+.BI \*=global\-reject\-file= rejectfile
-+Put all rejects into
-+.I rejectfile
-+instead of creating separate reject files for all files that have rejects. The
-+.I rejectfile
-+will contain headers that identify which file each reject refers to. Note that
-+the global reject file is created even if \-\-dry\-run is specified (while
-+non-global reject files will only be created without \-\-dry\-run).
-+.TP
- \fB\-R\fP or \fB\*=reverse\fP
- Assume that this patch was created with the old and new files swapped.
- (Yes, I'm afraid that does happen occasionally, human nature being what it
-Index: patch-2.5.9/patch.c
-===================================================================
---- patch-2.5.9.orig/patch.c
-+++ patch-2.5.9/patch.c
-@@ -67,6 +67,7 @@ static bool similar (char const *, size_
- static bool spew_output (struct outstate *);
- static char const *make_temp (char);
- static int numeric_string (char const *, bool, char const *);
-+static void reject_header (const char *filename);
- static void abort_hunk (void);
- static void cleanup (void);
- static void get_some_switches (void);
-@@ -98,6 +99,7 @@ static int Argc;
- static char * const *Argv;
-
- static FILE *rejfp; /* reject file pointer */
-+static char *global_reject;
-
- static char const *patchname;
- static char *rejname;
-@@ -172,6 +174,10 @@ main (int argc, char **argv)
- /* Make sure we clean up in case of disaster. */
- set_signals (false);
-
-+ /* initialize global reject file */
-+ if (global_reject)
-+ init_reject ();
-+
- for (
- open_patch_file (patchname);
- there_is_another_patch();
-@@ -208,8 +214,9 @@ main (int argc, char **argv)
- init_output (TMPOUTNAME, exclusive, &outstate);
- }
-
-- /* initialize reject file */
-- init_reject ();
-+ /* initialize per-patch reject file */
-+ if (!global_reject)
-+ init_reject ();
-
- /* find out where all the lines are */
- if (!skip_rest_of_patch)
-@@ -278,6 +285,8 @@ main (int argc, char **argv)
-
- newwhere = pch_newfirst() + last_offset;
- if (skip_rest_of_patch) {
-+ if (!failed)
-+ reject_header(outname);
- abort_hunk();
- failed++;
- if (verbosity == VERBOSE)
-@@ -292,6 +301,8 @@ main (int argc, char **argv)
- say ("Patch attempted to create file %s, which already exists.\n",
- quotearg (inname));
-
-+ if (!failed)
-+ reject_header(outname);
- abort_hunk();
- failed++;
- if (verbosity != SILENT)
-@@ -299,6 +310,8 @@ main (int argc, char **argv)
- format_linenum (numbuf, newwhere));
- }
- else if (! apply_hunk (&outstate, where)) {
-+ if (!failed)
-+ reject_header(outname);
- abort_hunk ();
- failed++;
- if (verbosity != SILENT)
-@@ -332,7 +345,8 @@ main (int argc, char **argv)
- fclose (outstate.ofp);
- outstate.ofp = 0;
- }
-- fclose (rejfp);
-+ if (!global_reject)
-+ fclose (rejfp);
- continue;
- }
-
-@@ -412,13 +426,13 @@ main (int argc, char **argv)
- }
- }
- if (diff_type != ED_DIFF) {
-- if (fclose (rejfp) != 0)
-+ if (!global_reject && fclose (rejfp) != 0)
- write_fatal ();
- if (failed) {
- somefailed = true;
- say ("%d out of %d hunk%s %s", failed, hunk, "s" + (hunk == 1),
- skip_rest_of_patch ? "ignored" : "FAILED");
-- if (outname) {
-+ if (!global_reject && outname) {
- char *rej = rejname;
- if (!rejname) {
- rej = xmalloc (strlen (outname) + 5);
-@@ -445,6 +459,20 @@ main (int argc, char **argv)
- }
- set_signals (true);
- }
-+ if (global_reject)
-+ {
-+ if (fclose (rejfp) != 0)
-+ write_fatal ();
-+ if (somefailed)
-+ {
-+ say (" -- saving rejects to file %s\n", quotearg (global_reject));
-+ /*if (! dry_run)
-+ {*/
-+ move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
-+ global_reject, 0644, false);
-+ /*}*/
-+ }
-+ }
- if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
- write_fatal ();
- cleanup ();
-@@ -523,6 +551,7 @@ static struct option const longopts[] =
- {"posix", no_argument, NULL, CHAR_MAX + 7},
- {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
- {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
-+ {"global-reject-file", required_argument, NULL, CHAR_MAX + 10},
- {NULL, no_argument, NULL, 0}
- };
-
-@@ -582,6 +611,7 @@ static char const *const option_help[] =
- " --dry-run Do not actually change any files; just print what would happen.",
- " --posix Conform to the POSIX standard.",
- " --unified-reject-files Create unified reject files.",
-+" --global-reject-file=file Put all rejects into one file.",
- "",
- " -d DIR --directory=DIR Change the working directory to DIR first.",
- #if HAVE_SETMODE_DOS
-@@ -784,6 +814,9 @@ get_some_switches (void)
- case CHAR_MAX + 9:
- unified_reject_files = true;
- break;
-+ case CHAR_MAX + 10:
-+ global_reject = savestr (optarg);
-+ break;
- default:
- usage (stderr, 2);
- }
-@@ -933,6 +966,37 @@ locate_hunk (LINENUM fuzz)
- }
-
- static char *
-+format_timestamp (char timebuf[37], bool which)
-+{
-+ time_t ts = pch_timestamp(which);
-+ if (ts != -1)
-+ {
-+ struct tm *tm = localtime(&ts);
-+ strftime(timebuf, 37, "\t%Y-%m-%d %H:%M:%S.000000000 %z", tm);
-+ }
-+ else
-+ timebuf[0] = 0;
-+ return timebuf;
-+}
-+
-+/* Write a header in a reject file that combines multiple hunks. */
-+static void
-+reject_header (const char *outname)
-+{
-+ char timebuf0[37], timebuf1[37];
-+ if (!global_reject)
-+ return;
-+ if (diff_type == UNI_DIFF)
-+ fprintf(rejfp, "--- %s.orig%s\n+++ %s%s\n",
-+ outname, format_timestamp(timebuf0, reverse),
-+ outname, format_timestamp(timebuf1, !reverse));
-+ else
-+ fprintf(rejfp, "*** %s.orig%s\n--- %s%s\n",
-+ outname, format_timestamp(timebuf0, reverse),
-+ outname, format_timestamp(timebuf1, !reverse));
-+}
-+
-+static char *
- format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
- LINENUM first, LINENUM lines)
- {
diff --git a/meta/recipes-devtools/patch/patch/install.patch b/meta/recipes-devtools/patch/patch/install.patch
deleted file mode 100644
index 0354ec8f04..0000000000
--- a/meta/recipes-devtools/patch/patch/install.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Index: patch-2.5.4/Makefile.in
-===================================================================
---- patch-2.5.4.orig/Makefile.in 2005-03-09 07:23:54.779311824 -0500
-+++ patch-2.5.4/Makefile.in 2005-03-09 07:26:09.616813408 -0500
-@@ -43,10 +43,11 @@
- PACKAGE_NAME = @PACKAGE_NAME@
- PACKAGE_VERSION = @PACKAGE_VERSION@
-
-+DESTDIR =
- prefix = @prefix@
- exec_prefix = @exec_prefix@
-
--bindir = $(exec_prefix)/bin
-+bindir = @bindir@
-
- # Where to put the manual pages.
- mandir = @mandir@
-@@ -112,18 +113,18 @@
- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
-
- install:: all installdirs
-- $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT)
-- -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext)
-+ $(INSTALL_PROGRAM) patch$(EXEEXT) $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
-+ -$(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
-
- installdirs::
-- $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
-+ $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
-
- install-strip::
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
-
- uninstall::
-- rm -f $(bindir)/$(patch_name)$(EXEEXT)
-- rm -f $(man1dir)/$(patch_name)$(man1ext)
-+ rm -f $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
-+ rm -f $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
-
- Makefile: Makefile.in $(CONFIG_STATUS)
- $(SHELL) $(CONFIG_STATUS)
diff --git a/meta/recipes-devtools/patch/patch/unified-reject-files.diff b/meta/recipes-devtools/patch/patch/unified-reject-files.diff
deleted file mode 100644
index 4b59212dba..0000000000
--- a/meta/recipes-devtools/patch/patch/unified-reject-files.diff
+++ /dev/null
@@ -1,307 +0,0 @@
-Upstream-Status: Inappropriate [debian patch]
-
-Generate unified diff style reject files. Also include the C function names
-in reject files whenever possible.
-
- $ cat > f.orig
- < a() {
- < 2
- < 3
- <
- < 5
- < 6
- < }
-
- $ sed -e 's/5/5a/' f.orig > f
- $ diff -U2 -p f.orig f > f.diff
- $ sed -e 's/5/5a/' -e 's/6/6x/' f.orig > f
- $ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f.diff
- > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
-
- $ cat f.rej
- > @@ -3,5 +3,5 @@ a() {
- > 3
- >
- > -5
- > +5a
- > 6
- > }
-
- $ ./patch -F0 -s --no-backup-if-mismatch f < f.diff
- > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
-
- $ cat f.rej
- > *************** a() {
- > *** 3,7 ****
- > 3
- >
- > - 5
- > 6
- > }
- > --- 3,7 ----
- > 3
- >
- > + 5a
- > 6
- > }
-
- $ diff -Nu -p /dev/null f.orig > f2.diff
- $ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f2.diff
- > Patch attempted to create file f, which already exists.
- > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
-
- $ cat f.rej
- > @@ -0,0 +1,7 @@
- > +a() {
- > +2
- > +3
- > +
- > +5
- > +6
- > +}
-
- $ rm -f f f.orig f.rej f.diff f2.diff
-
-Index: patch-2.5.9/pch.c
-===================================================================
---- patch-2.5.9.orig/pch.c
-+++ patch-2.5.9/pch.c
-@@ -68,6 +68,7 @@ static LINENUM p_sline; /* and the lin
- static LINENUM p_hunk_beg; /* line number of current hunk */
- static LINENUM p_efake = -1; /* end of faked up lines--don't free */
- static LINENUM p_bfake = -1; /* beg of faked up lines */
-+static char *p_c_function; /* the C function a hunk is in */
-
- enum nametype { OLD, NEW, INDEX, NONE };
-
-@@ -888,6 +889,19 @@ another_hunk (enum diff difftype, bool r
- next_intuit_at(line_beginning,p_input_line);
- return chars_read == (size_t) -1 ? -1 : 0;
- }
-+ s = buf;
-+ while (*s == '*')
-+ s++;
-+ if (*s == ' ')
-+ {
-+ p_c_function = s;
-+ while (*s != '\n')
-+ s++;
-+ *s = '\0';
-+ p_c_function = savestr (p_c_function);
-+ }
-+ else
-+ p_c_function = NULL;
- p_hunk_beg = p_input_line + 1;
- while (p_end < p_max) {
- chars_read = get_line ();
-@@ -1277,8 +1291,18 @@ another_hunk (enum diff difftype, bool r
- else
- p_repl_lines = 1;
- if (*s == ' ') s++;
-- if (*s != '@')
-+ if (*s++ != '@')
- malformed ();
-+ if (*s++ == '@' && *s == ' ' && *s != '\0')
-+ {
-+ p_c_function = s;
-+ while (*s != '\n')
-+ s++;
-+ *s = '\0';
-+ p_c_function = savestr (p_c_function);
-+ }
-+ else
-+ p_c_function = NULL;
- if (!p_ptrn_lines)
- p_first++; /* do append rather than insert */
- if (!p_repl_lines)
-@@ -1884,6 +1908,12 @@ pch_hunk_beg (void)
- return p_hunk_beg;
- }
-
-+char const *
-+pch_c_function (void)
-+{
-+ return p_c_function;
-+}
-+
- /* Is the newline-terminated line a valid `ed' command for patch
- input? If so, return the command character; if not, return 0.
- This accepts accepts just a subset of the valid commands, but it's
-Index: patch-2.5.9/pch.h
-===================================================================
---- patch-2.5.9.orig/pch.h
-+++ patch-2.5.9/pch.h
-@@ -25,6 +25,7 @@
- LINENUM pch_end (void);
- LINENUM pch_first (void);
- LINENUM pch_hunk_beg (void);
-+char const *pch_c_function (void);
- LINENUM pch_newfirst (void);
- LINENUM pch_prefix_context (void);
- LINENUM pch_ptrn_lines (void);
-Index: patch-2.5.9/patch.man
-===================================================================
---- patch-2.5.9.orig/patch.man
-+++ patch-2.5.9/patch.man
-@@ -517,6 +517,9 @@ instead of the default
- .B \&.rej
- file.
- .TP
-+\fB\*=reject\-unified\fP
-+Produce unified reject files. The default is to produce context type reject files.
-+.TP
- \fB\-R\fP or \fB\*=reverse\fP
- Assume that this patch was created with the old and new files swapped.
- (Yes, I'm afraid that does happen occasionally, human nature being what it
-Index: patch-2.5.9/common.h
-===================================================================
---- patch-2.5.9.orig/common.h
-+++ patch-2.5.9/common.h
-@@ -146,6 +146,7 @@ XTERN int invc;
- XTERN struct stat instat;
- XTERN bool dry_run;
- XTERN bool posixly_correct;
-+XTERN bool unified_reject_files;
-
- XTERN char const *origprae;
- XTERN char const *origbase;
-Index: patch-2.5.9/patch.c
-===================================================================
---- patch-2.5.9.orig/patch.c
-+++ patch-2.5.9/patch.c
-@@ -522,6 +522,7 @@ static struct option const longopts[] =
- {"no-backup-if-mismatch", no_argument, NULL, CHAR_MAX + 6},
- {"posix", no_argument, NULL, CHAR_MAX + 7},
- {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
-+ {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
- {NULL, no_argument, NULL, 0}
- };
-
-@@ -580,6 +581,7 @@ static char const *const option_help[] =
- " --verbose Output extra information about the work being done.",
- " --dry-run Do not actually change any files; just print what would happen.",
- " --posix Conform to the POSIX standard.",
-+" --unified-reject-files Create unified reject files.",
- "",
- " -d DIR --directory=DIR Change the working directory to DIR first.",
- #if HAVE_SETMODE_DOS
-@@ -779,6 +781,9 @@ get_some_switches (void)
- (enum quoting_style) i);
- }
- break;
-+ case CHAR_MAX + 9:
-+ unified_reject_files = true;
-+ break;
- default:
- usage (stderr, 2);
- }
-@@ -927,6 +932,24 @@ locate_hunk (LINENUM fuzz)
- return 0;
- }
-
-+static char *
-+format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
-+ LINENUM first, LINENUM lines)
-+{
-+ if (lines == 1)
-+ rangebuf = format_linenum (rangebuf, first);
-+ else
-+ {
-+ char *rb;
-+ rangebuf = format_linenum (rangebuf + LINENUM_LENGTH_BOUND + 1, lines);
-+ rb = rangebuf-1;
-+ rangebuf = format_linenum (rangebuf - LINENUM_LENGTH_BOUND - 1,
-+ (lines > 0) ? first : 0);
-+ *rb = ',';
-+ }
-+ return rangebuf;
-+}
-+
- /* We did not find the pattern, dump out the hunk so they can handle it. */
-
- static void
-@@ -943,8 +966,83 @@ abort_hunk (void)
- (int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ****" : "";
- char const *minuses =
- (int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ----" : " -----";
-+ char const *function = pch_c_function();
-+ if (function == NULL)
-+ function = "";
-+
-+ if (unified_reject_files)
-+ {
-+ /* produce unified reject files */
-+ char rangebuf0[LINENUM_LENGTH_BOUND*2 + 2];
-+ char rangebuf1[LINENUM_LENGTH_BOUND*2 + 2];
-+ LINENUM j;
-+
-+ /* Find the beginning of the remove and insert section. */
-+ for (j = 0; j <= pat_end; j++)
-+ if (pch_char (j) == '=')
-+ break;
-+ for (i = j+1; i <= pat_end; i++)
-+ if (pch_char (i) == '^')
-+ break;
-+ if (pch_char (0) != '*' || j > pat_end || i > pat_end+1)
-+ fatal ("internal error in abort_hunk");
-+ i = 1; j++;
-+
-+ /* @@ -from,lines +to,lines @@ */
-+ fprintf (rejfp, "@@ -%s +%s @@%s\n",
-+ format_linerange (rangebuf0, oldfirst, pch_ptrn_lines()),
-+ format_linerange (rangebuf1, newfirst, pch_repl_lines()),
-+ function);
-+
-+ while ( (i <= pat_end && pch_char (i) != '=')
-+ || (j <= pat_end && pch_char (j) != '^'))
-+ {
-+ if (i <= pat_end
-+ && (pch_char (i) == '-' || pch_char (i) == '!'))
-+ {
-+ fputc('-', rejfp);
-+ pch_write_line (i++, rejfp);
-+ }
-+ else if (j <= pat_end
-+ && (pch_char (j) == '+' || pch_char (j) == '!'))
-+ {
-+ fputc('+', rejfp);
-+ pch_write_line (j++, rejfp);
-+ }
-+ else if ((i <= pat_end
-+ && (pch_char (i) == ' ' || pch_char (i) == '\n')) &&
-+ (j > pat_end
-+ || (pch_char (j) == ' ' || pch_char (j) == '\n')))
-+ {
-+ /* Unless j is already past the end, lines i and j
-+ must be equal here. */
-+
-+ if (pch_char (i) == ' ')
-+ fputc(' ', rejfp);
-+ pch_write_line (i++, rejfp);
-+ if (j <= pat_end)
-+ j++;
-+ }
-+ else if ((j <= pat_end &&
-+ (pch_char (j) == ' ' || pch_char (j) == '\n')) &&
-+ (pch_char (i) == '='))
-+ {
-+ if (pch_char (j) == ' ')
-+ fputc(' ', rejfp);
-+ pch_write_line (j++, rejfp);
-+ }
-+ else
-+ fatal ("internal error in abort_hunk");
-+ }
-+
-+ if (ferror (rejfp))
-+ write_fatal ();
-+ return;
-+ }
-
-- fprintf(rejfp, "***************\n");
-+ /* produce context type reject files */
-+
-+ fprintf(rejfp, "***************%s\n", function);
- for (i=0; i<=pat_end; i++) {
- char numbuf0[LINENUM_LENGTH_BOUND + 1];
- char numbuf1[LINENUM_LENGTH_BOUND + 1];
diff --git a/meta/recipes-devtools/patch/patch_2.5.9.bb b/meta/recipes-devtools/patch/patch_2.5.9.bb
deleted file mode 100644
index c29b240756..0000000000
--- a/meta/recipes-devtools/patch/patch_2.5.9.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require patch.inc
-LICENSE = "GPLv2"
-
-SRC_URI += " file://debian.patch \
- file://install.patch \
- file://unified-reject-files.diff \
- file://global-reject-file.diff "
-PR = "r3"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-SRC_URI[md5sum] = "dacfb618082f8d3a2194601193cf8716"
-SRC_URI[sha256sum] = "ecb5c6469d732bcf01d6ec1afe9e64f1668caba5bfdb103c28d7f537ba3cdb8a"
diff --git a/meta/recipes-devtools/patch/patch_2.7.5.bb b/meta/recipes-devtools/patch/patch_2.7.5.bb
deleted file mode 100644
index f3fcf5e86d..0000000000
--- a/meta/recipes-devtools/patch/patch_2.7.5.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require patch.inc
-LICENSE = "GPLv3"
-
-SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
-
-SRC_URI[md5sum] = "ed4d5674ef4543b4eb463db168886dc7"
-SRC_URI[sha256sum] = "7436f5a19f93c3ca83153ce9c5cbe4847e97c5d956e57a220121e741f6e7968f"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-acpaths = "-I ${S}/m4 "
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)}"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-
diff --git a/meta/recipes-devtools/patch/patch_2.7.6.bb b/meta/recipes-devtools/patch/patch_2.7.6.bb
new file mode 100644
index 0000000000..5d7f55f8dc
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch_2.7.6.bb
@@ -0,0 +1,24 @@
+require patch.inc
+LICENSE = "GPLv3"
+
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://0002-Fix-segfault-with-mangled-rename-patch.patch \
+ file://0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch \
+ file://0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch \
+ file://0001-Fix-swapping-fake-lines-in-pch_swap.patch \
+ file://CVE-2019-13636.patch \
+ file://0001-Invoke-ed-directly-instead-of-using-the-shell.patch \
+ file://0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch \
+ file://0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch \
+"
+
+SRC_URI[md5sum] = "4c68cee989d83c87b00a3860bcd05600"
+SRC_URI[sha256sum] = "8cf86e00ad3aaa6d26aca30640e86b0e3e1f395ed99f189b06d4c9f74bc58a4e"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+acpaths = "-I ${S}/m4 "
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+
diff --git a/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch b/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch
deleted file mode 100644
index 49050a18d2..0000000000
--- a/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e3658740ec100e4c8cf83295460b032979e1a99a Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Fri, 9 Sep 2016 18:21:32 -0300
-Subject: [PATCH] Increase maxSize to 64MB
-Organization: O.S. Systems Software LTDA.
-
-Fix error:
-
-/
-|ERROR: qemu-native-2.5.0-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
-|'--set-interpreter', '../build/tmp/sysroots-uninative/x86_64-linux/lib/
-|ld-linux-x86-64.so.2', '../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
-|sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64')'
-|failed with exit code 1 and the following output:
-|warning: working around a Linux kernel bug by creating a hole of 36032512
-|bytes in ‘../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
-|sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64’
-|maximum file size exceeded
-\
-
-Similar issue is discussed here:
-https://github.com/NixOS/patchelf/issues/47
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- src/patchelf.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/patchelf.cc b/src/patchelf.cc
-index a59c12d..0fd7355 100644
---- a/src/patchelf.cc
-+++ b/src/patchelf.cc
-@@ -279,7 +279,7 @@ static void readFile(string fileName)
- struct stat st;
- if (stat(fileName.c_str(), &st) != 0) error("stat");
- fileSize = st.st_size;
-- maxSize = fileSize + 32 * 1024 * 1024;
-+ maxSize = fileSize + 64 * 1024 * 1024;
-
- contents = (unsigned char *) malloc(fileSize + maxSize);
- if (!contents) abort();
---
-2.1.4
-
diff --git a/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch b/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch
deleted file mode 100644
index 9ee8a554a7..0000000000
--- a/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 73526cb546ae6b00ea6169e40b01fb7b5f0dbb50 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Thu, 28 Jul 2016 11:05:06 -0300
-Subject: [PATCH] Skip empty section (fixes #66)
-Organization: O.S. Systems Software LTDA.
-
-Upstream-Status: Pending
-
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- src/patchelf.cc | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/patchelf.cc b/src/patchelf.cc
-index 136098f..2677a26 100644
---- a/src/patchelf.cc
-+++ b/src/patchelf.cc
-@@ -684,6 +684,9 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsExecutable()
- for (unsigned int i = 1; i <= lastReplaced; ++i) {
- Elf_Shdr & shdr(shdrs[i]);
- string sectionName = getSectionName(shdr);
-+ if (sectionName == "") {
-+ continue;
-+ }
- debug("looking at section `%s'\n", sectionName.c_str());
- /* !!! Why do we stop after a .dynstr section? I can't
- remember! */
---
-2.1.4
-
diff --git a/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch b/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch
new file mode 100644
index 0000000000..a0988423fe
--- /dev/null
+++ b/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch
@@ -0,0 +1,45 @@
+From 1630d3f846c7721b1e7cd3b005bb2b34816e1d0f Mon Sep 17 00:00:00 2001
+From: Ed Bartosh <ed.bartosh@linux.intel.com>
+Date: Fri, 21 Jul 2017 12:33:53 +0300
+Subject: [PATCH] patchelf: fix segfault for binaries linked by gold
+
+commit 1cc234fea5600190d872329aca60e2365cefc39e
+
+fix adjusting startPage
+
+startPage is adjusted unconditionally for all executables.
+This results in incorrect addresses assigned to INTERP and LOAD
+program headers, which breaks patched executable.
+
+Adjusting startPage variable only when startOffset > startPage
+should fix this.
+
+This change is related to the issue NixOS#10
+
+Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
+
+Github PR: https://github.com/NixOS/patchelf/pull/127
+
+Upstream-Status: Submitted
+
+---
+ src/patchelf.cc | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/patchelf.cc b/src/patchelf.cc
+index a63e3a11c61f..2483d25d78f1 100644
+--- a/src/patchelf.cc
++++ b/src/patchelf.cc
+@@ -756,10 +756,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
+ since DYN executables tend to start at virtual address 0, so
+ rewriteSectionsExecutable() won't work because it doesn't have
+ any virtual address space to grow downwards into. */
+- if (isExecutable) {
+- if (startOffset >= startPage) {
+- debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage);
+- }
++ if (isExecutable && startOffset > startPage) {
++ debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage);
+ startPage = startOffset;
+ }
+
diff --git a/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch b/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
index 9fafec4b59..03b0d18a89 100644
--- a/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
+++ b/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
@@ -1,26 +1,26 @@
-From 2a603acb65993698c21f1c6eb7664f93ad830d52 Mon Sep 17 00:00:00 2001
+From 7f1fd10cfebd5ea2f3e1938abe1bd1c4828164a7 Mon Sep 17 00:00:00 2001
From: Fabio Berton <fabio.berton@ossystems.com.br>
Date: Fri, 9 Sep 2016 16:00:42 -0300
Subject: [PATCH] handle read-only files
-Organization: O.S. Systems Software LTDA.
Patch from:
https://github.com/darealshinji/patchelf/commit/40e66392bc4b96e9b4eda496827d26348a503509
-Upstream-Status: Pending
+Upstream-Status: Denied [https://github.com/NixOS/patchelf/pull/89]
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+
---
src/patchelf.cc | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/patchelf.cc b/src/patchelf.cc
-index 136098f..aea360e 100644
+index 0b4965adff83..b5db2aef0e8a 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
-@@ -388,7 +388,17 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
+@@ -497,7 +497,17 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
- static void writeFile(string fileName)
+ static void writeFile(std::string fileName, FileContents contents)
{
- int fd = open(fileName.c_str(), O_TRUNC | O_WRONLY);
+ struct stat st;
@@ -37,7 +37,7 @@ index 136098f..aea360e 100644
if (fd == -1)
error("open");
-@@ -397,6 +407,10 @@ static void writeFile(string fileName)
+@@ -511,6 +521,10 @@ static void writeFile(std::string fileName, FileContents contents)
if (close(fd) != 0)
error("close");
@@ -48,6 +48,3 @@ index 136098f..aea360e 100644
}
---
-2.1.4
-
diff --git a/meta/recipes-devtools/patchelf/patchelf_0.10.bb b/meta/recipes-devtools/patchelf/patchelf_0.10.bb
new file mode 100644
index 0000000000..cc983e033a
--- /dev/null
+++ b/meta/recipes-devtools/patchelf/patchelf_0.10.bb
@@ -0,0 +1,16 @@
+SRC_URI = "https://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
+ file://handle-read-only-files.patch \
+ file://fix-adjusting-startPage.patch \
+ "
+
+LICENSE = "GPLv3"
+SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
+
+SRC_URI[md5sum] = "6c3f3a06a95705870d129494a6880106"
+SRC_URI[sha256sum] = "f670cd462ac7161588c28f45349bc20fb9bd842805e3f71387a320e7a9ddfcf3"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/patchelf/patchelf_0.9.bb b/meta/recipes-devtools/patchelf/patchelf_0.9.bb
deleted file mode 100644
index 54e654bdcb..0000000000
--- a/meta/recipes-devtools/patchelf/patchelf_0.9.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
- file://Skip-empty-section-fixes-66.patch \
- file://handle-read-only-files.patch \
- file://Increase-maxSize-to-64MB.patch \
-"
-
-LICENSE = "GPLv3"
-SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
-
-SRC_URI[md5sum] = "d02687629c7e1698a486a93a0d607947"
-SRC_URI[sha256sum] = "a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-inherit autotools
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/pax-utils/pax-utils_1.1.6.bb b/meta/recipes-devtools/pax-utils/pax-utils_1.1.6.bb
deleted file mode 100644
index 5cc546301c..0000000000
--- a/meta/recipes-devtools/pax-utils/pax-utils_1.1.6.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Security-focused ELF files checking tool"
-DESCRIPTION = "This is a small set of various PaX aware and related \
-utilities for ELF binaries. It can check ELF binary files and running \
-processes for issues that might be relevant when using ELF binaries \
-along with PaX, such as non-PIC code or executable stack and heap."
-HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-
-SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz \
-"
-
-SRC_URI[md5sum] = "96f56a5a10ed50f2448c5ccebd27764f"
-SRC_URI[sha256sum] = "f5436c517bea40f7035ec29a6f34034c739b943f2e3a080d76df5dfd7fd41b12"
-
-RDEPENDS_${PN} += "bash"
-
-do_configure_prepend() {
- touch ${S}/NEWS ${S}/AUTHORS ${S}/ChangeLog ${S}/README
-}
-
-do_install() {
- oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
-}
-
-BBCLASSEXTEND = "native"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
-"
-PACKAGECONFIG[libcap] = "--with-caps, --without-caps, libcap"
-PACKAGECONFIG[libseccomp] = "--with-seccomp, --without-seccomp, libseccomp"
-PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
-PACKAGECONFIG[pyelftools] = "--with-python, --without-python,, pyelftools"
diff --git a/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch b/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch
new file mode 100644
index 0000000000..7d5c079b2d
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch
@@ -0,0 +1,26 @@
+From 2f74a899474f428a4a5368a94accf801c5f97ae4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 4 Jun 2018 18:33:50 +0300
+Subject: [PATCH] ExtUtils-MakeMaker: add $(LDFLAGS) when linking binary
+ modules
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+index fe53be1..249c048 100644
+--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
++++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+@@ -1050,7 +1050,7 @@ sub xs_make_dynamic_lib {
+ }
+
+ push @m, sprintf <<'MAKE', $ld_run_path_shell, $ldrun, $dlsyms_arg, $ldfrom, $self->xs_obj_opt('$@'), $libs, $exportlist;
+- %s$(LD) %s $(LDDLFLAGS) %s %s $(OTHERLDFLAGS) %s $(MYEXTLIB) \
++ %s$(LD) %s $(LDDLFLAGS) %s %s $(LDFLAGS) $(OTHERLDFLAGS) %s $(MYEXTLIB) \
+ $(PERL_ARCHIVE) %s $(PERL_ARCHIVE_AFTER) %s \
+ $(INST_DYNAMIC_FIX)
+ $(CHMOD) $(PERM_RWX) $@
diff --git a/meta/recipes-devtools/perl/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch b/meta/recipes-devtools/perl/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch
new file mode 100644
index 0000000000..ed8ec1d416
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch
@@ -0,0 +1,34 @@
+From e8e095b9c71c58f8197d6315359446b6b084cb2b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 5 Jun 2018 14:58:42 +0300
+Subject: [PATCH] Somehow this module breaks through the perl wrapper and
+ declares perl binary to be 'perl.real'. This patch forces it back to perl.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+index 948c476..f537526 100644
+--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
++++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+@@ -1110,6 +1110,9 @@ WARNING
+ }
+
+ foreach my $name (@$names){
++ # Getting MakeMaker.pm use perl wrapper instead of 'perl.real' directly
++ $name =~ s/perl\.real/perl/ if ($name =~ /perl\.real/);
++
+ my ($abs, $use_dir);
+ if ($self->file_name_is_absolute($name)) { # /foo/bar
+ $abs = $name;
+@@ -2006,6 +2009,7 @@ sub init_PERL {
+
+ $self->{PERL} ||=
+ $self->find_perl(5.0, \@perls, \@defpath, $Verbose );
++
+
+ my $perl = $self->{PERL};
+ $perl =~ s/^"//;
diff --git a/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch b/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
new file mode 100644
index 0000000000..3b0fc453e5
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
@@ -0,0 +1,69 @@
+From 19c1987b455998d2959a5fdf3d1ed911d35e70f2 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 2 Jan 2019 17:55:35 +0100
+Subject: [PATCH] configure_path.sh: do not hardcode $prefix/lib as library
+ path
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ cnf/configure_args.sh | 2 +-
+ cnf/configure_path.sh | 11 ++++++-----
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/cnf/configure_args.sh b/cnf/configure_args.sh
+index 29ca4f5..3297fb3 100644
+--- a/cnf/configure_args.sh
++++ b/cnf/configure_args.sh
+@@ -155,7 +155,7 @@ while [ $i -le $# -o -n "$n" ]; do
+ help) mode="help" ;;
+ regen|regenerate) mode="regen" ;;
+ keeplog) defuser "$a" 1 ;;
+- prefix|html[13]dir|libsdir) defuser $a "$v" ;;
++ prefix|html[13]dir|libsdir|libdir) defuser $a "$v" ;;
+ man[13]dir|otherlibsdir) defuser $a "$v" ;;
+ siteprefix|sitehtml[13]dir) defuser $a "$v" ;;
+ siteman[13]dir|vendorman[13]dir)defuser $a "$v" ;;
+diff --git a/cnf/configure_path.sh b/cnf/configure_path.sh
+index fe7eac7..bcba8b8 100644
+--- a/cnf/configure_path.sh
++++ b/cnf/configure_path.sh
+@@ -30,6 +30,7 @@ definst() {
+ define "$1" "$installpath$v"
+ }
+
++define libdir "$prefix/lib"
+ define sharedir "$prefix/share"
+ define html1dir "$sharedir/doc/$perlname/html"
+ define html3dir "$sharedir/doc/$perlname/html"
+@@ -38,16 +39,16 @@ define man1ext "1"
+ define man3dir "$sharedir/man/man3"
+ define man3ext "3"
+ define bin "$prefix/bin"
+-define lib "$prefix/lib"
++define lib "$libdir"
+ define scriptdir "$prefix/bin"
+ define libsdirs ' '
+-defrel privlib "$prefix/lib/$package/$version"
+-defrel archlib "$prefix/lib/$package/$version/$archname"
++defrel privlib "$libdir/$package/$version"
++defrel archlib "$libdir/$package/$version/$archname"
+ define perlpath "$prefix/bin/$perlname"
+ define d_archlib 'define'
+
+ define sitebin "$prefix/bin"
+-defrel sitelib_stem "$prefix/lib/$package/site_perl"
++defrel sitelib_stem "$libdir/$package/site_perl"
+ define sitelib "$sitelib_stem/$version"
+ define sitearch "$sitelib_stem/$version/$archname"
+ define siteprefix "$prefix"
+@@ -145,7 +146,7 @@ vendortest() {
+ }
+
+ vendorpath vendorbin "$vendorprefix/bin"
+-vendorpath vendorlib_stem "$vendorprefix/lib/$package/vendor_perl"
++vendorpath vendorlib_stem "$libdir/$package/vendor_perl"
+ vendorpath vendorlib "$vendorlib_stem/$version"
+ vendorpath vendorarch "$vendorlib_stem/$version/$archname"
+ vendorpath vendorscript "$vendorprefix/bin"
diff --git a/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch b/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
new file mode 100644
index 0000000000..0aaeaa29eb
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
@@ -0,0 +1,29 @@
+From a66811c487ecf8ba8724879c253bb10dfa82aeb5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 1 Jun 2018 19:57:32 +0300
+Subject: [PATCH] configure_tool.sh: do not quote the argument to 'command'
+
+As it seems to break things if the argument has spaces and arguments in it.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ cnf/configure_tool.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cnf/configure_tool.sh b/cnf/configure_tool.sh
+index 32201c0..461bc68 100644
+--- a/cnf/configure_tool.sh
++++ b/cnf/configure_tool.sh
+@@ -2,7 +2,7 @@
+
+ tryprog() {
+ log "trying $1=$2"
+- if command -v "$2" 1>/dev/null 2>/dev/null; then
++ if command -v $2 1>/dev/null 2>/dev/null; then
+ define "$1" "$2"
+ result "$2"
+ return 0
+--
+2.17.0
+
diff --git a/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch b/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
new file mode 100644
index 0000000000..3a41820f46
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
@@ -0,0 +1,30 @@
+From 31a2c5555f9ef32f35d7d5ce1fd09a010ba5f5c6 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Mon, 17 Jun 2019 10:47:15 -0500
+Subject: [PATCH 1/2] enc2xs: Add environment variable to suppress comments
+
+Comment generation in enc2xs can now be suppressed by setting the
+ENC2XS_NO_COMMENTS environment variable. This allows enc2xs to produce
+reproducible output by omitting the name of the generating program.
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+Upstream-Status: Accepted [https://github.com/dankogai/p5-encode/pull/145]
+---
+ cpan/Encode/bin/enc2xs | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
+index 619b64b757..bfce9ee735 100644
+--- a/cpan/Encode/bin/enc2xs
++++ b/cpan/Encode/bin/enc2xs
+@@ -144,6 +144,7 @@ getopts('CM:SQqOo:f:n:v',\%opt);
+ $opt{M} and make_makefile_pl($opt{M}, @ARGV);
+ $opt{C} and make_configlocal_pm($opt{C}, @ARGV);
+ $opt{v} ||= $ENV{ENC2XS_VERBOSE};
++$opt{q} ||= $ENV{ENC2XS_NO_COMMENTS};
+
+ sub verbose {
+ print STDERR @_ if $opt{v};
+--
+2.21.0
+
diff --git a/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch b/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
new file mode 100644
index 0000000000..e7985036a0
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
@@ -0,0 +1,27 @@
+From f824cbec9ac8f113a4ae35d57bd18625d415a71b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 27 Nov 2018 15:37:40 +0100
+Subject: [PATCH] perl-cross: add LDFLAGS when linking libperl
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 01644cd..be811a7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -180,7 +180,7 @@ endif
+
+ ifeq ($(useshrplib),true)
+ $(LIBPERL):
+- $(CC) $(LDDLFLAGS) -o $@ $(filter %$o,$^) $(LIBS)
++ $(CC) $(LDFLAGS) $(LDDLFLAGS) -o $@ $(filter %$o,$^) $(LIBS)
+ else
+ $(LIBPERL):
+ $(AR) cru $@ $(filter %$o,$^)
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch b/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
new file mode 100644
index 0000000000..686cc7167b
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
@@ -0,0 +1,32 @@
+From 260ebd15e16cd86b9b58e5c5f3a496b3853ca46d Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Mon, 17 Jun 2019 10:47:23 -0500
+Subject: [PATCH 2/2] Constant: Fix up shebang
+
+The instructions indicate that the script should be explicitly passed to
+"perl -x", so automatically setting the #! to be ^X is unnecessary and
+makes the file non-reproducible when building because ^X could be the
+absolute path to miniperl.
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+Upstream-Status: Submitted [https://rt.cpan.org/Public/Bug/Display.html?id=129866]
+---
+ cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
+index 14eb809714..d4d074e121 100644
+--- a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
++++ b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
+@@ -219,7 +219,7 @@ sub dogfood {
+ Regenerate these constant functions by feeding this entire source file to
+ perl -x
+
+-#!$^X -w
++#!/usr/bin/env perl -x -w
+ use ExtUtils::Constant qw (constant_types C_constant XS_constant);
+
+ EOT
+--
+2.21.0
+
diff --git a/meta/recipes-devtools/perl/files/errno_ver.diff b/meta/recipes-devtools/perl/files/errno_ver.diff
new file mode 100644
index 0000000000..a965fbeeec
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/errno_ver.diff
@@ -0,0 +1,37 @@
+From 8e1efba7560d8d55524c7a0f1b0539ddce419b86 Mon Sep 17 00:00:00 2001
+From: Brendan O'Dea <bod@debian.org>
+Date: Fri, 16 Dec 2005 01:32:14 +1100
+Subject: [PATCH 6/8] Remove Errno version check due to upgrade problems with
+ long-running processes.
+
+Bug-Debian: http://bugs.debian.org/343351
+
+Remove version check which can cause problems for long running
+processes embedding perl when upgrading to a newer version,
+compatible, but built on a different machine.
+
+Patch-Name: debian/errno_ver.diff
+Upstream-Status: Pending
+---
+ ext/Errno/Errno_pm.PL | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
+index 6251a3c..eeed445 100644
+--- a/ext/Errno/Errno_pm.PL
++++ b/ext/Errno/Errno_pm.PL
+@@ -294,11 +294,6 @@ EDQ
+ # they've already declared perl doesn't need to worry about this risk.
+ if(!$ENV{'PERL_BUILD_EXPAND_CONFIG_VARS'}) {
+ print <<"CONFIG_CHECK_END";
+-use Config;
+-"\$Config{'archname'}-\$Config{'osvers'}" eq
+-"$archname-$Config{'osvers'}" or
+- die "Errno architecture ($archname-$Config{'osvers'}) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})";
+-
+ CONFIG_CHECK_END
+ }
+
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/perl/perl/native-perlinc.patch b/meta/recipes-devtools/perl/files/native-perlinc.patch
index f0bb1f6596..a2e1aefd41 100644
--- a/meta/recipes-devtools/perl/perl/native-perlinc.patch
+++ b/meta/recipes-devtools/perl/files/native-perlinc.patch
@@ -1,4 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
===================================================================
diff --git a/meta/recipes-devtools/perl/files/perl-configpm-switch.patch b/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
new file mode 100644
index 0000000000..3c2cecb8c1
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
@@ -0,0 +1,57 @@
+From 7f313cac31c55cbe62a4d0cdfa8321cc05a8eb3a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sun, 27 May 2007 21:04:11 +0000
+Subject: [PATCH] perl: 5.8.7 -> 5.8.8 (from OE)
+
+This patch is used for perl-native only. It enables the switching of
+configuration files between Config_heavy.pl and
+Config_heavy-target.pl by setting the environment variables
+PERLCONFIGTARGET - the later containing settings for the target while
+the former contains those for the host. This will allow cpan.bbclass
+to use the settings appropriate for the native and/or target builds
+as required. This also disables the use of the cache since the cached
+values would be valid for the host only.
+
+Upstream-Status: Inappropriate [native]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ configpm | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/configpm b/configpm
+index 09c4a3b..6a0a680 100755
+--- a/configpm
++++ b/configpm
+@@ -687,7 +687,7 @@ sub FETCH {
+ my($self, $key) = @_;
+
+ # check for cached value (which may be undef so we use exists not defined)
+- return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
++ return $self->fetch_string($key);
+ }
+
+ ENDOFEND
+@@ -845,7 +845,21 @@ $config_txt .= sprintf <<'ENDOFTIE', $fast_config;
+ sub DESTROY { }
+
+ sub AUTOLOAD {
+- require 'Config_heavy.pl';
++ my $cfgfile = 'Config_heavy.pl';
++ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
++ {
++ $cfgfile = 'Config_heavy-target.pl';
++ }
++ if (defined $ENV{PERL_ARCHLIB})
++ {
++ push @INC, $ENV{PERL_ARCHLIB};
++ require $cfgfile;
++ pop @INC;
++ }
++ else
++ {
++ require $cfgfile;
++ }
+ goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
+ die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
+ }
diff --git a/meta/recipes-devtools/perl/files/perl-dynloader.patch b/meta/recipes-devtools/perl/files/perl-dynloader.patch
new file mode 100644
index 0000000000..6bb832a426
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/perl-dynloader.patch
@@ -0,0 +1,38 @@
+Upstream-Status:Inappropriate [embedded specific]
+
+Allow the location that .so files are searched for for dynamic
+loading to be changed via an environment variable. This is to allow
+us to load .so's from the host system while building for the target
+system.
+
+Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
+
+Index: perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
+===================================================================
+--- perl-5.24.1.orig/dist/XSLoader/XSLoader_pm.PL
++++ perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
+@@ -52,6 +52,24 @@ sub load {
+ my ($caller, $modlibname) = caller();
+ my $module = $caller;
+
++ # OE: Allow env to form dynamic loader to look in a different place
++ # This is so it finds the host .so files, not the targets
++ if (defined $ENV{PERLHOSTLIB})
++ {
++ my $hostlib = $ENV{PERLHOSTLIB};
++ my $hostarchlib = $ENV{PERLHOSTARCHLIB};
++ print STDERR "*** Module name IN: $modlibname\n";
++ ($p1, $p2, $p3, $p4, $p5, $p6, $p7) = $modlibname =~ m/(^(.*lib\w*\/)?)((perl5\/[0-9\.]*\/)?)(([^\/]*)\/)?(.*)$/;
++ print STDERR "*** p1: $p1 p3: $p3 p5: $p5 p7: $p7\n";
++ if ( $p1 ne "" ) {
++ $modlibname = $hostlib.$p7;
++ }
++ if ( $p6 ne "" ) {
++ $modlibname = $hostarchlib.$p7;
++ }
++ print STDERR "*** Module name OUT: $modlibname\n";
++ }
++
+ if (@_) {
+ $module = $_[0];
+ } else {
diff --git a/meta/recipes-devtools/perl/files/perl-rdepends.txt b/meta/recipes-devtools/perl/files/perl-rdepends.txt
new file mode 100644
index 0000000000..331a44d308
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/perl-rdepends.txt
@@ -0,0 +1,4467 @@
+RDEPENDS_perl-module-anydbm-file += "perl-module-strict"
+RDEPENDS_perl-module-anydbm-file += "perl-module-warnings"
+RDEPENDS_perl-module-app-cpan += "perl-module-config"
+RDEPENDS_perl-module-app-cpan += "perl-module-constant"
+RDEPENDS_perl-module-app-cpan += "perl-module-cpan"
+RDEPENDS_perl-module-app-cpan += "perl-module-cwd"
+RDEPENDS_perl-module-app-cpan += "perl-module-data-dumper"
+RDEPENDS_perl-module-app-cpan += "perl-module-file-basename"
+RDEPENDS_perl-module-app-cpan += "perl-module-file-find"
+RDEPENDS_perl-module-app-cpan += "perl-module-getopt-std"
+RDEPENDS_perl-module-app-cpan += "perl-module-if"
+RDEPENDS_perl-module-app-cpan += "perl-module-net-ping"
+RDEPENDS_perl-module-app-cpan += "perl-module-strict"
+RDEPENDS_perl-module-app-cpan += "perl-module-user-pwent"
+RDEPENDS_perl-module-app-cpan += "perl-module-vars"
+RDEPENDS_perl-module-app-cpan += "perl-module-warnings"
+RDEPENDS_perl-module-app-prove += "perl-module-app-prove-state"
+RDEPENDS_perl-module-app-prove += "perl-module-base"
+RDEPENDS_perl-module-app-prove += "perl-module-constant"
+RDEPENDS_perl-module-app-prove += "perl-module-getopt-long"
+RDEPENDS_perl-module-app-prove += "perl-module-strict"
+RDEPENDS_perl-module-app-prove += "perl-module-tap-harness"
+RDEPENDS_perl-module-app-prove += "perl-module-tap-harness-env"
+RDEPENDS_perl-module-app-prove += "perl-module-text-parsewords"
+RDEPENDS_perl-module-app-prove += "perl-module-warnings"
+RDEPENDS_perl-module-app-prove-state += "perl-module-app-prove-state-result"
+RDEPENDS_perl-module-app-prove-state += "perl-module-base"
+RDEPENDS_perl-module-app-prove-state += "perl-module-constant"
+RDEPENDS_perl-module-app-prove-state += "perl-module-file-find"
+RDEPENDS_perl-module-app-prove-state += "perl-module-strict"
+RDEPENDS_perl-module-app-prove-state += "perl-module-tap-parser-yamlish-reader"
+RDEPENDS_perl-module-app-prove-state += "perl-module-tap-parser-yamlish-writer"
+RDEPENDS_perl-module-app-prove-state += "perl-module-warnings"
+RDEPENDS_perl-module-app-prove-state-result += "perl-module-app-prove-state-result-test"
+RDEPENDS_perl-module-app-prove-state-result += "perl-module-constant"
+RDEPENDS_perl-module-app-prove-state-result += "perl-module-strict"
+RDEPENDS_perl-module-app-prove-state-result += "perl-module-warnings"
+RDEPENDS_perl-module-app-prove-state-result-test += "perl-module-strict"
+RDEPENDS_perl-module-app-prove-state-result-test += "perl-module-warnings"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-constant"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-exporter"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-io-compress-bzip2"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-strict"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-time-local"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-warnings"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-archive-tar"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-archive-tar-constant"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-file-basename"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-io-file"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-strict"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-vars"
+RDEPENDS_perl-module-archive-tar += "perl-module-archive-tar-constant"
+RDEPENDS_perl-module-archive-tar += "perl-module-archive-tar-file"
+RDEPENDS_perl-module-archive-tar += "perl-module-config"
+RDEPENDS_perl-module-archive-tar += "perl-module-cwd"
+RDEPENDS_perl-module-archive-tar += "perl-module-exporter"
+RDEPENDS_perl-module-archive-tar += "perl-module-file-path"
+RDEPENDS_perl-module-archive-tar += "perl-module-io-file"
+RDEPENDS_perl-module-archive-tar += "perl-module-io-zlib"
+RDEPENDS_perl-module-archive-tar += "perl-module-strict"
+RDEPENDS_perl-module-archive-tar += "perl-module-vars"
+RDEPENDS_perl-module-arybase += "perl-module-xsloader"
+RDEPENDS_perl-module-attribute-handlers += "perl-module-strict"
+RDEPENDS_perl-module-attribute-handlers += "perl-module-warnings"
+RDEPENDS_perl-module-attributes += "perl-module-exporter"
+RDEPENDS_perl-module-attributes += "perl-module-strict"
+RDEPENDS_perl-module-attributes += "perl-module-warnings"
+RDEPENDS_perl-module-attributes += "perl-module-xsloader"
+RDEPENDS_perl-module-autodie-exception += "perl-module-constant"
+RDEPENDS_perl-module-autodie-exception += "perl-module-fatal"
+RDEPENDS_perl-module-autodie-exception += "perl-module-fcntl"
+RDEPENDS_perl-module-autodie-exception += "perl-module-overload"
+RDEPENDS_perl-module-autodie-exception += "perl-module-strict"
+RDEPENDS_perl-module-autodie-exception += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-exception-system += "perl-module-parent"
+RDEPENDS_perl-module-autodie-exception-system += "perl-module-strict"
+RDEPENDS_perl-module-autodie-exception-system += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-hints += "perl-module-b"
+RDEPENDS_perl-module-autodie-hints += "perl-module-constant"
+RDEPENDS_perl-module-autodie-hints += "perl-module-strict"
+RDEPENDS_perl-module-autodie-hints += "perl-module-warnings"
+RDEPENDS_perl-module-autodie += "perl-module-constant"
+RDEPENDS_perl-module-autodie += "perl-module-lib"
+RDEPENDS_perl-module-autodie += "perl-module-parent"
+RDEPENDS_perl-module-autodie += "perl-module-strict"
+RDEPENDS_perl-module-autodie += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-scope-guard += "perl-module-strict"
+RDEPENDS_perl-module-autodie-scope-guard += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-scope-guardstack += "perl-module-autodie-scope-guard"
+RDEPENDS_perl-module-autodie-scope-guardstack += "perl-module-strict"
+RDEPENDS_perl-module-autodie-scope-guardstack += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-skip += "perl-module-strict"
+RDEPENDS_perl-module-autodie-skip += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-util += "perl-module-autodie-scope-guardstack"
+RDEPENDS_perl-module-autodie-util += "perl-module-exporter"
+RDEPENDS_perl-module-autodie-util += "perl-module-strict"
+RDEPENDS_perl-module-autodie-util += "perl-module-warnings"
+RDEPENDS_perl-module-autoloader += "perl-module-strict"
+RDEPENDS_perl-module-autosplit += "perl-module-config"
+RDEPENDS_perl-module-autosplit += "perl-module-exporter"
+RDEPENDS_perl-module-autosplit += "perl-module-file-basename"
+RDEPENDS_perl-module-autosplit += "perl-module-file-path"
+RDEPENDS_perl-module-autosplit += "perl-module-strict"
+RDEPENDS_perl-module-base += "perl-module-strict"
+RDEPENDS_perl-module-b-concise += "perl-module-b"
+RDEPENDS_perl-module-b-concise += "perl-module-b-op-private"
+RDEPENDS_perl-module-b-concise += "perl-module-config"
+RDEPENDS_perl-module-b-concise += "perl-module-exporter"
+RDEPENDS_perl-module-b-concise += "perl-module-feature"
+RDEPENDS_perl-module-b-concise += "perl-module-strict"
+RDEPENDS_perl-module-b-concise += "perl-module-warnings"
+RDEPENDS_perl-module-b-debug += "perl-module-b"
+RDEPENDS_perl-module-b-debug += "perl-module-config"
+RDEPENDS_perl-module-b-debug += "perl-module-strict"
+RDEPENDS_perl-module-benchmark += "perl-module-exporter"
+RDEPENDS_perl-module-benchmark += "perl-module-strict"
+RDEPENDS_perl-module-bigint += "perl-module-constant"
+RDEPENDS_perl-module-bigint += "perl-module-exporter"
+RDEPENDS_perl-module-bigint += "perl-module-math-bigint"
+RDEPENDS_perl-module-bigint += "perl-module-math-bigint-trace"
+RDEPENDS_perl-module-bigint += "perl-module-overload"
+RDEPENDS_perl-module-bigint += "perl-module-strict"
+RDEPENDS_perl-module-bigint += "perl-module-warnings"
+RDEPENDS_perl-module-bignum += "perl-module-bigint"
+RDEPENDS_perl-module-bignum += "perl-module-exporter"
+RDEPENDS_perl-module-bignum += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-bignum += "perl-module-math-bigfloat-trace"
+RDEPENDS_perl-module-bignum += "perl-module-math-bigint"
+RDEPENDS_perl-module-bignum += "perl-module-math-bigint-trace"
+RDEPENDS_perl-module-bignum += "perl-module-overload"
+RDEPENDS_perl-module-bignum += "perl-module-strict"
+RDEPENDS_perl-module-bignum += "perl-module-warnings"
+RDEPENDS_perl-module-bigrat += "perl-module-bigint"
+RDEPENDS_perl-module-bigrat += "perl-module-exporter"
+RDEPENDS_perl-module-bigrat += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-bigrat += "perl-module-math-bigint"
+RDEPENDS_perl-module-bigrat += "perl-module-math-bigint-trace"
+RDEPENDS_perl-module-bigrat += "perl-module-math-bigrat"
+RDEPENDS_perl-module-bigrat += "perl-module-overload"
+RDEPENDS_perl-module-bigrat += "perl-module-strict"
+RDEPENDS_perl-module-bigrat += "perl-module-warnings"
+RDEPENDS_perl-module-blib += "perl-module-cwd"
+RDEPENDS_perl-module-b += "perl-module-exporter"
+RDEPENDS_perl-module-b += "perl-module-xsloader"
+RDEPENDS_perl-module-b-showlex += "perl-module-b"
+RDEPENDS_perl-module-b-showlex += "perl-module-b-concise"
+RDEPENDS_perl-module-b-showlex += "perl-module-b-terse"
+RDEPENDS_perl-module-b-showlex += "perl-module-strict"
+RDEPENDS_perl-module-b-terse += "perl-module-b"
+RDEPENDS_perl-module-b-terse += "perl-module-b-concise"
+RDEPENDS_perl-module-b-terse += "perl-module-strict"
+RDEPENDS_perl-module-b-xref += "perl-module-b"
+RDEPENDS_perl-module-b-xref += "perl-module-config"
+RDEPENDS_perl-module-b-xref += "perl-module-strict"
+RDEPENDS_perl-module-bytes += "perl-module-bytes-heavy"
+RDEPENDS_perl-module-carp += "perl-module-exporter"
+RDEPENDS_perl-module-carp += "perl-module-strict"
+RDEPENDS_perl-module-carp += "perl-module-warnings"
+RDEPENDS_perl-module--charnames += "perl-module-bytes"
+RDEPENDS_perl-module-charnames += "perl-module-bytes"
+RDEPENDS_perl-module-charnames += "perl-module--charnames"
+RDEPENDS_perl-module--charnames += "perl-module-re"
+RDEPENDS_perl-module-charnames += "perl-module-re"
+RDEPENDS_perl-module--charnames += "perl-module-strict"
+RDEPENDS_perl-module-charnames += "perl-module-strict"
+RDEPENDS_perl-module--charnames += "perl-module-warnings"
+RDEPENDS_perl-module-charnames += "perl-module-warnings"
+RDEPENDS_perl-module-class-struct += "perl-module-exporter"
+RDEPENDS_perl-module-class-struct += "perl-module-strict"
+RDEPENDS_perl-module-class-struct += "perl-module-warnings-register"
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-bytes "
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-constant"
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-dynaloader"
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-exporter"
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-strict "
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-warnings "
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-xsloader"
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-bytes "
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-constant"
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-dynaloader"
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-exporter"
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-strict "
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-warnings "
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-xsloader"
+RDEPENDS_perl-module-compress-zlib += "perl-module-bytes "
+RDEPENDS_perl-module-compress-zlib += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-compress-zlib += "perl-module-constant"
+RDEPENDS_perl-module-compress-zlib += "perl-module-exporter"
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-compress-gzip"
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-compress-gzip-constants"
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-handle "
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-uncompress-gunzip"
+RDEPENDS_perl-module-compress-zlib += "perl-module-strict "
+RDEPENDS_perl-module-compress-zlib += "perl-module-warnings "
+RDEPENDS_perl-module-config-extensions += "perl-module-config"
+RDEPENDS_perl-module-config-extensions += "perl-module-exporter"
+RDEPENDS_perl-module-config-extensions += "perl-module-strict"
+RDEPENDS_perl-module-config += "perl-module-strict"
+RDEPENDS_perl-module-config += "perl-module-warnings"
+RDEPENDS_perl-module-config-perl-v += "perl-module-config"
+RDEPENDS_perl-module-config-perl-v += "perl-module-exporter"
+RDEPENDS_perl-module-config-perl-v += "perl-module-strict"
+RDEPENDS_perl-module-config-perl-v += "perl-module-vars"
+RDEPENDS_perl-module-config-perl-v += "perl-module-warnings"
+RDEPENDS_perl-module-constant += "perl-module-strict"
+RDEPENDS_perl-module-constant += "perl-module-warnings-register"
+RDEPENDS_perl-module-corelist += "perl-module-list-util"
+RDEPENDS_perl-module-corelist += "perl-module-corelist"
+RDEPENDS_perl-module-corelist += "perl-module-strict"
+RDEPENDS_perl-module-corelist += "perl-module-version"
+RDEPENDS_perl-module-corelist += "perl-module-warnings"
+RDEPENDS_perl-module-cpan += "perl-module-b"
+RDEPENDS_perl-module-cpan += "perl-module-config"
+RDEPENDS_perl-module-cpan += "perl-module-cwd"
+RDEPENDS_perl-module-cpan += "perl-module-data-dumper"
+RDEPENDS_perl-module-cpan += "perl-module-dirhandle"
+RDEPENDS_perl-module-cpan += "perl-module-errno"
+RDEPENDS_perl-module-cpan += "perl-module-exporter"
+RDEPENDS_perl-module-cpan += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-cpan += "perl-module-extutils-manifest"
+RDEPENDS_perl-module-cpan += "perl-module-fcntl"
+RDEPENDS_perl-module-cpan += "perl-module-file-basename"
+RDEPENDS_perl-module-cpan += "perl-module-file-copy"
+RDEPENDS_perl-module-cpan += "perl-module-file-find"
+RDEPENDS_perl-module-cpan += "perl-module-filehandle"
+RDEPENDS_perl-module-cpan += "perl-module-file-path"
+RDEPENDS_perl-module-cpan += "perl-module-lib"
+RDEPENDS_perl-module-cpan += "perl-module-net-ping"
+RDEPENDS_perl-module-cpan += "perl-module-overload"
+RDEPENDS_perl-module-cpan += "perl-module-posix"
+RDEPENDS_perl-module-cpan += "perl-module-safe"
+RDEPENDS_perl-module-cpan += "perl-module-strict"
+RDEPENDS_perl-module-cpan += "perl-module-sys-hostname"
+RDEPENDS_perl-module-cpan += "perl-module-term-readline"
+RDEPENDS_perl-module-cpan += "perl-module-text-parsewords"
+RDEPENDS_perl-module-cpan += "perl-module-text-wrap"
+RDEPENDS_perl-module-cpan += "perl-module-time-local"
+RDEPENDS_perl-module-cpan += "perl-module-vars"
+RDEPENDS_perl-module-cpan += "perl-module-warnings"
+RDEPENDS_perl-module-cwd += "perl-module-errno"
+RDEPENDS_perl-module-cwd += "perl-module-exporter"
+RDEPENDS_perl-module-cwd += "perl-module-strict"
+RDEPENDS_perl-module-cwd += "perl-module-xsloader"
+RDEPENDS_perl-module-data-dumper += "perl-module-bytes"
+RDEPENDS_perl-module-data-dumper += "perl-module-config"
+RDEPENDS_perl-module-data-dumper += "perl-module-constant"
+RDEPENDS_perl-module-data-dumper += "perl-module-exporter"
+RDEPENDS_perl-module-data-dumper += "perl-module-xsloader"
+RDEPENDS_perl-module-dbm-filter-compress += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-compress += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter-encode += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-encode += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter-int32 += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-int32 += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter-null += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-null += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-warnings"
+RDEPENDS_perl-module-db += "perl-module-strict"
+RDEPENDS_perl-module-deprecate += "perl-module-strict"
+RDEPENDS_perl-module-deprecate += "perl-module-warnings"
+RDEPENDS_perl-module-devel-peek += "perl-module-exporter"
+RDEPENDS_perl-module-devel-peek += "perl-module-xsloader"
+RDEPENDS_perl-module-devel-ppport += "perl-module-file-find"
+RDEPENDS_perl-module-devel-ppport += "perl-module-getopt-long"
+RDEPENDS_perl-module-devel-ppport += "perl-module-strict"
+RDEPENDS_perl-module-devel-ppport += "perl-module-vars"
+RDEPENDS_perl-module-devel-selfstubber += "perl-module-selfloader"
+RDEPENDS_perl-module-diagnostics += "perl-module-config"
+RDEPENDS_perl-module-diagnostics += "perl-module-getopt-std"
+RDEPENDS_perl-module-diagnostics += "perl-module-strict"
+RDEPENDS_perl-module-diagnostics += "perl-module-text-tabs"
+RDEPENDS_perl-module-digest-base += "perl-module-mime-base64"
+RDEPENDS_perl-module-digest-base += "perl-module-strict"
+RDEPENDS_perl-module-digest-base += "perl-module-vars"
+RDEPENDS_perl-module-digest-file += "perl-module-digest"
+RDEPENDS_perl-module-digest-file += "perl-module-exporter"
+RDEPENDS_perl-module-digest-file += "perl-module-strict"
+RDEPENDS_perl-module-digest-file += "perl-module-vars"
+RDEPENDS_perl-module-digest-md5 += "perl-module-digest-base"
+RDEPENDS_perl-module-digest-md5 += "perl-module-exporter"
+RDEPENDS_perl-module-digest-md5 += "perl-module-strict"
+RDEPENDS_perl-module-digest-md5 += "perl-module-vars"
+RDEPENDS_perl-module-digest-md5 += "perl-module-xsloader"
+RDEPENDS_perl-module-digest += "perl-module-strict"
+RDEPENDS_perl-module-digest += "perl-module-vars"
+RDEPENDS_perl-module-digest-sha += "perl-module-digest-base"
+RDEPENDS_perl-module-digest-sha += "perl-module-dynaloader"
+RDEPENDS_perl-module-digest-sha += "perl-module-exporter"
+RDEPENDS_perl-module-digest-sha += "perl-module-fcntl"
+RDEPENDS_perl-module-digest-sha += "perl-module-integer"
+RDEPENDS_perl-module-digest-sha += "perl-module-strict"
+RDEPENDS_perl-module-digest-sha += "perl-module-vars"
+RDEPENDS_perl-module-digest-sha += "perl-module-warnings"
+RDEPENDS_perl-module-digest-sha += "perl-module-xsloader"
+RDEPENDS_perl-module-dynaloader += "perl-module-config"
+RDEPENDS_perl-module-encode-alias += "perl-module-constant"
+RDEPENDS_perl-module-encode-alias += "perl-module-encode"
+RDEPENDS_perl-module-encode-alias += "perl-module-exporter"
+RDEPENDS_perl-module-encode-alias += "perl-module-strict"
+RDEPENDS_perl-module-encode-alias += "perl-module-warnings"
+RDEPENDS_perl-module-encode-byte += "perl-module-encode"
+RDEPENDS_perl-module-encode-byte += "perl-module-strict"
+RDEPENDS_perl-module-encode-byte += "perl-module-warnings"
+RDEPENDS_perl-module-encode-byte += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-exporter"
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-strict"
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-warnings"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-encode"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-parent"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-strict"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-utf8"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-vars"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-warnings"
+RDEPENDS_perl-module-encode-cn += "perl-module-encode"
+RDEPENDS_perl-module-encode-cn += "perl-module-encode-cn-hz"
+RDEPENDS_perl-module-encode-cn += "perl-module-strict"
+RDEPENDS_perl-module-encode-cn += "perl-module-warnings"
+RDEPENDS_perl-module-encode-cn += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-config += "perl-module-strict"
+RDEPENDS_perl-module-encode-config += "perl-module-warnings"
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-encode"
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-strict"
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-warnings"
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-encoder += "perl-module-constant"
+RDEPENDS_perl-module-encode-encoder += "perl-module-encode"
+RDEPENDS_perl-module-encode-encoder += "perl-module-exporter"
+RDEPENDS_perl-module-encode-encoder += "perl-module-overload"
+RDEPENDS_perl-module-encode-encoder += "perl-module-strict"
+RDEPENDS_perl-module-encode-encoder += "perl-module-warnings"
+RDEPENDS_perl-module-encode-encoding += "perl-module-constant"
+RDEPENDS_perl-module-encode-encoding += "perl-module-encode"
+RDEPENDS_perl-module-encode-encoding += "perl-module-encode-mime-name"
+RDEPENDS_perl-module-encode-encoding += "perl-module-strict"
+RDEPENDS_perl-module-encode-encoding += "perl-module-warnings"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-encode"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-parent"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-strict"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-utf8"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-vars"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-warnings"
+RDEPENDS_perl-module-encode-guess += "perl-module-bytes"
+RDEPENDS_perl-module-encode-guess += "perl-module-constant"
+RDEPENDS_perl-module-encode-guess += "perl-module-encode"
+RDEPENDS_perl-module-encode-guess += "perl-module-encode-unicode"
+RDEPENDS_perl-module-encode-guess += "perl-module-parent"
+RDEPENDS_perl-module-encode-guess += "perl-module-strict"
+RDEPENDS_perl-module-encode-guess += "perl-module-warnings"
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-encode-cjkconstants"
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-strict"
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-vars"
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-warnings"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-bytes"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode-cjkconstants"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode-jp-h2z"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-parent"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-strict"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-warnings"
+RDEPENDS_perl-module-encode-jp += "perl-module-encode"
+RDEPENDS_perl-module-encode-jp += "perl-module-encode-jp-jis7"
+RDEPENDS_perl-module-encode-jp += "perl-module-strict"
+RDEPENDS_perl-module-encode-jp += "perl-module-warnings"
+RDEPENDS_perl-module-encode-jp += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-encode"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-encode-cjkconstants"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-parent"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-strict"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-warnings"
+RDEPENDS_perl-module-encode-kr += "perl-module-encode"
+RDEPENDS_perl-module-encode-kr += "perl-module-encode-kr-2022-kr"
+RDEPENDS_perl-module-encode-kr += "perl-module-strict"
+RDEPENDS_perl-module-encode-kr += "perl-module-warnings"
+RDEPENDS_perl-module-encode-kr += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-constant"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-encode-cjkconstants"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-parent"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-strict"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-warnings"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-encode"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-mime-base64"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-parent"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-strict"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-warnings"
+RDEPENDS_perl-module-encode-mime-name += "perl-module-strict"
+RDEPENDS_perl-module-encode-mime-name += "perl-module-warnings"
+RDEPENDS_perl-module-encode += "perl-module-bytes"
+RDEPENDS_perl-module-encode += "perl-module-constant"
+RDEPENDS_perl-module-encode += "perl-module-encode-alias"
+RDEPENDS_perl-module-encode += "perl-module-encode-config"
+RDEPENDS_perl-module-encode += "perl-module-encode-configlocal-pm"
+RDEPENDS_perl-module-encode += "perl-module-encode-mime-name"
+RDEPENDS_perl-module-encode += "perl-module-exporter"
+RDEPENDS_perl-module-encode += "perl-module-parent"
+RDEPENDS_perl-module-encode += "perl-module-storable"
+RDEPENDS_perl-module-encode += "perl-module-strict"
+RDEPENDS_perl-module-encode += "perl-module-warnings"
+RDEPENDS_perl-module-encode += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-symbol += "perl-module-encode"
+RDEPENDS_perl-module-encode-symbol += "perl-module-strict"
+RDEPENDS_perl-module-encode-symbol += "perl-module-warnings"
+RDEPENDS_perl-module-encode-symbol += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-tw += "perl-module-encode"
+RDEPENDS_perl-module-encode-tw += "perl-module-strict"
+RDEPENDS_perl-module-encode-tw += "perl-module-warnings"
+RDEPENDS_perl-module-encode-tw += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-unicode += "perl-module-encode"
+RDEPENDS_perl-module-encode-unicode += "perl-module-parent"
+RDEPENDS_perl-module-encode-unicode += "perl-module-strict"
+RDEPENDS_perl-module-encode-unicode += "perl-module-warnings"
+RDEPENDS_perl-module-encode-unicode += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-encode"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-mime-base64"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-parent"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-re"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-strict"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-warnings"
+RDEPENDS_perl-module-encoding += "perl-module-config"
+RDEPENDS_perl-module-encoding += "perl-module-constant"
+RDEPENDS_perl-module-encoding += "perl-module-encode"
+RDEPENDS_perl-module-encoding += "perl-module-filter-util-call"
+RDEPENDS_perl-module-encoding += "perl-module-i18n-langinfo"
+RDEPENDS_perl-module-encoding += "perl-module-posix"
+RDEPENDS_perl-module-encoding += "perl-module-strict"
+RDEPENDS_perl-module-encoding += "perl-module-utf8"
+RDEPENDS_perl-module-encoding += "perl-module-warnings"
+RDEPENDS_perl-module-encoding-warnings += "perl-module-strict"
+RDEPENDS_perl-module-encoding-warnings += "perl-module-warnings"
+RDEPENDS_perl-module-english += "perl-module-exporter"
+RDEPENDS_perl-module-env += "perl-module-config"
+RDEPENDS_perl-module-env += "perl-module-tie-array"
+RDEPENDS_perl-module-errno += "perl-module-exporter"
+RDEPENDS_perl-module-errno += "perl-module-strict"
+RDEPENDS_perl-module-experimental += "perl-module-strict"
+RDEPENDS_perl-module-experimental += "perl-module-version"
+RDEPENDS_perl-module-experimental += "perl-module-warnings"
+RDEPENDS_perl-module-exporter-heavy += "perl-module-exporter"
+RDEPENDS_perl-module-exporter-heavy += "perl-module-strict"
+RDEPENDS_perl-module-exporter += "perl-module-exporter-heavy"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-config"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-dynaloader"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-extutils-mksymlists"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-file-temp"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-ipc-cmd"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-text-parsewords"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-extutils-cbuilder-base"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-aix += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-aix += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-aix += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-android += "perl-module-config"
+RDEPENDS_perl-module-extutils-cbuilder-platform-android += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-android += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-android += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-cygwin += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-cygwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-cygwin += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-darwin += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-darwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-darwin += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-dec-osf += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-dec-osf += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-dec-osf += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-os2 += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-os2 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-os2 += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-unix += "perl-module-extutils-cbuilder-base"
+RDEPENDS_perl-module-extutils-cbuilder-platform-unix += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-unix += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-vms += "perl-module-config"
+RDEPENDS_perl-module-extutils-cbuilder-platform-vms += "perl-module-extutils-cbuilder-base"
+RDEPENDS_perl-module-extutils-cbuilder-platform-vms += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-vms += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-bcc += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-bcc += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-gcc += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-gcc += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-msvc += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-msvc += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-extutils-cbuilder-base"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-io-file"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-extutils-command"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-extutils-install"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-getopt-long"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-strict"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-test-harness"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-command += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-command += "perl-module-file-copy"
+RDEPENDS_perl-module-extutils-command += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-command += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-command += "perl-module-strict"
+RDEPENDS_perl-module-extutils-command += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-constant"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-extutils-constant-utils"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-text-wrap"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-proxysubs"
+RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-utils"
+RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-xs"
+RDEPENDS_perl-module-extutils-constant += "perl-module-filehandle"
+RDEPENDS_perl-module-extutils-constant += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant-proxysubs += "perl-module-extutils-constant-utils"
+RDEPENDS_perl-module-extutils-constant-proxysubs += "perl-module-extutils-constant-xs"
+RDEPENDS_perl-module-extutils-constant-proxysubs += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant-proxysubs += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-constant"
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-posix"
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-data-dumper"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant-base"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant-utils"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-vars"
+RDEPENDS_perl-module-extutils-embed += "perl-module-config"
+RDEPENDS_perl-module-extutils-embed += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-embed += "perl-module-extutils-liblist"
+RDEPENDS_perl-module-extutils-embed += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-embed += "perl-module-getopt-std"
+RDEPENDS_perl-module-extutils-embed += "perl-module-strict"
+RDEPENDS_perl-module-extutils-installed += "perl-module-config"
+RDEPENDS_perl-module-extutils-installed += "perl-module-data-dumper"
+RDEPENDS_perl-module-extutils-installed += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-installed += "perl-module-extutils-packlist"
+RDEPENDS_perl-module-extutils-installed += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-installed += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-installed += "perl-module-strict"
+RDEPENDS_perl-module-extutils-installed += "perl-module-vars"
+RDEPENDS_perl-module-extutils-install += "perl-module-autosplit"
+RDEPENDS_perl-module-extutils-install += "perl-module-config"
+RDEPENDS_perl-module-extutils-install += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-install += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-install += "perl-module-extutils-packlist"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-compare"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-copy"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-install += "perl-module-strict"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-strict"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-text-parsewords"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-liblist += "perl-module-extutils-liblist-kid"
+RDEPENDS_perl-module-extutils-liblist += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker-config += "perl-module-config"
+RDEPENDS_perl-module-extutils-makemaker-config += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-base"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-encode"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-encode-alias"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-i18n-langinfo"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-b"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-cpan"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-makemaker-version"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-manifest"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-mm"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-my"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-version"
+RDEPENDS_perl-module-extutils-makemaker-version += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker-version += "perl-module-vars"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-config"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-copy"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-strict"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-miniperl += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-miniperl += "perl-module-extutils-embed"
+RDEPENDS_perl-module-extutils-miniperl += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-config"
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-dynaloader"
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-config"
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-aix += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-aix += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-aix += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-autosplit"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-cpan"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-data-dumper"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-version"
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-mm-win32"
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-darwin += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-darwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-mm-win32"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-liblist"
+RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-qnx += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-qnx += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-encode"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-liblist"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-vars"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-version"
+RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-liblist-kid"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-vos += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-vos += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-extutils-mm-win32"
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-my += "perl-module-extutils-mm"
+RDEPENDS_perl-module-extutils-my += "perl-module-strict"
+RDEPENDS_perl-module-extutils-packlist += "perl-module-config"
+RDEPENDS_perl-module-extutils-packlist += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-packlist += "perl-module-strict"
+RDEPENDS_perl-module-extutils-packlist += "perl-module-vars"
+RDEPENDS_perl-module-extutils-parsexs-constants += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-constants += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-parsexs-countlines += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-eval += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-eval += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-config"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-extutils-parsexs-constants"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-extutils-parsexs-countlines"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-extutils-parsexs-eval"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-extutils-parsexs-utilities"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-re"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-extutils-parsexs-constants"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-extutils-typemaps"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-testlib += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-testlib += "perl-module-lib"
+RDEPENDS_perl-module-extutils-testlib += "perl-module-strict"
+RDEPENDS_perl-module-extutils-testlib += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps-cmd += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-typemaps-cmd += "perl-module-extutils-typemaps"
+RDEPENDS_perl-module-extutils-typemaps-cmd += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps-cmd += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps-inputmap += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps-inputmap += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps-outputmap += "perl-module-re"
+RDEPENDS_perl-module-extutils-typemaps-outputmap += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps-outputmap += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-parsexs"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-parsexs-constants"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-typemaps-inputmap"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-typemaps-outputmap"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-typemaps-type"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps-type += "perl-module-extutils-typemaps"
+RDEPENDS_perl-module-extutils-typemaps-type += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps-type += "perl-module-warnings"
+RDEPENDS_perl-module-fatal += "perl-module-autodie"
+RDEPENDS_perl-module-fatal += "perl-module-autodie-exception-system"
+RDEPENDS_perl-module-fatal += "perl-module-autodie-hints"
+RDEPENDS_perl-module-fatal += "perl-module-autodie-util"
+RDEPENDS_perl-module-fatal += "perl-module-config"
+RDEPENDS_perl-module-fatal += "perl-module-constant"
+RDEPENDS_perl-module-fatal += "perl-module-fcntl"
+RDEPENDS_perl-module-fatal += "perl-module-posix"
+RDEPENDS_perl-module-fatal += "perl-module-strict"
+RDEPENDS_perl-module-fatal += "perl-module-tie-refhash"
+RDEPENDS_perl-module-fatal += "perl-module-warnings"
+RDEPENDS_perl-module-fcntl += "perl-module-exporter"
+RDEPENDS_perl-module-fcntl += "perl-module-strict"
+RDEPENDS_perl-module-fcntl += "perl-module-xsloader"
+RDEPENDS_perl-module-fields += "perl-module-base"
+RDEPENDS_perl-module-fields += "perl-module-hash-util"
+RDEPENDS_perl-module-fields += "perl-module-strict"
+RDEPENDS_perl-module-file-basename += "perl-module-exporter"
+RDEPENDS_perl-module-file-basename += "perl-module-re"
+RDEPENDS_perl-module-file-basename += "perl-module-strict"
+RDEPENDS_perl-module-file-basename += "perl-module-warnings"
+RDEPENDS_perl-module-filecache += "perl-module-parent"
+RDEPENDS_perl-module-filecache += "perl-module-strict"
+RDEPENDS_perl-module-file-compare += "perl-module-exporter"
+RDEPENDS_perl-module-file-compare += "perl-module-strict"
+RDEPENDS_perl-module-file-compare += "perl-module-warnings"
+RDEPENDS_perl-module-file-copy += "perl-module-config"
+RDEPENDS_perl-module-file-copy += "perl-module-exporter"
+RDEPENDS_perl-module-file-copy += "perl-module-file-basename"
+RDEPENDS_perl-module-file-copy += "perl-module-strict"
+RDEPENDS_perl-module-file-copy += "perl-module-warnings"
+RDEPENDS_perl-module-file-dosglob += "perl-module-strict"
+RDEPENDS_perl-module-file-dosglob += "perl-module-text-parsewords"
+RDEPENDS_perl-module-file-dosglob += "perl-module-warnings"
+RDEPENDS_perl-module-file-dosglob += "perl-module-xsloader"
+RDEPENDS_perl-module-file-fetch += "perl-module-constant"
+RDEPENDS_perl-module-file-fetch += "perl-module-cwd"
+RDEPENDS_perl-module-file-fetch += "perl-module-file-basename"
+RDEPENDS_perl-module-file-fetch += "perl-module-file-copy"
+RDEPENDS_perl-module-file-fetch += "perl-module-filehandle"
+RDEPENDS_perl-module-file-fetch += "perl-module-file-path"
+RDEPENDS_perl-module-file-fetch += "perl-module-file-temp"
+RDEPENDS_perl-module-file-fetch += "perl-module-ipc-cmd"
+RDEPENDS_perl-module-file-fetch += "perl-module-locale-maketext-simple"
+RDEPENDS_perl-module-file-fetch += "perl-module-load"
+RDEPENDS_perl-module-file-fetch += "perl-module-params-check"
+RDEPENDS_perl-module-file-fetch += "perl-module-strict"
+RDEPENDS_perl-module-file-fetch += "perl-module-vars"
+RDEPENDS_perl-module-file-find += "perl-module-config"
+RDEPENDS_perl-module-file-find += "perl-module-cwd"
+RDEPENDS_perl-module-file-find += "perl-module-exporter"
+RDEPENDS_perl-module-file-find += "perl-module-file-basename"
+RDEPENDS_perl-module-file-find += "perl-module-strict"
+RDEPENDS_perl-module-file-find += "perl-module-warnings"
+RDEPENDS_perl-module-file-find += "perl-module-warnings-register"
+RDEPENDS_perl-module-file-globmapper += "perl-module-file-glob"
+RDEPENDS_perl-module-file-globmapper += "perl-module-strict"
+RDEPENDS_perl-module-file-globmapper += "perl-module-warnings"
+RDEPENDS_perl-module-file-glob += "perl-module-exporter"
+RDEPENDS_perl-module-file-glob += "perl-module-strict"
+RDEPENDS_perl-module-file-glob += "perl-module-warnings"
+RDEPENDS_perl-module-file-glob += "perl-module-xsloader"
+RDEPENDS_perl-module-filehandle += "perl-module-exporter"
+RDEPENDS_perl-module-filehandle += "perl-module-fcntl"
+RDEPENDS_perl-module-filehandle += "perl-module-io-file"
+RDEPENDS_perl-module-filehandle += "perl-module-strict"
+RDEPENDS_perl-module-file-path += "perl-module-cwd"
+RDEPENDS_perl-module-file-path += "perl-module-exporter"
+RDEPENDS_perl-module-file-path += "perl-module-file-basename"
+RDEPENDS_perl-module-file-path += "perl-module-strict"
+RDEPENDS_perl-module-file-path += "perl-module-vars"
+RDEPENDS_perl-module-file-spec += "perl-module-constant"
+RDEPENDS_perl-module-file-spec += "perl-module-cwd"
+RDEPENDS_perl-module-file-spec += "perl-module-strict"
+RDEPENDS_perl-module-file-spec += "perl-module-file-spec-unix"
+RDEPENDS_perl-module-file-stat += "perl-module-class-struct"
+RDEPENDS_perl-module-file-stat += "perl-module-constant"
+RDEPENDS_perl-module-file-stat += "perl-module-exporter"
+RDEPENDS_perl-module-file-stat += "perl-module-fcntl"
+RDEPENDS_perl-module-file-stat += "perl-module-overload "
+RDEPENDS_perl-module-file-stat += "perl-module-strict"
+RDEPENDS_perl-module-file-stat += "perl-module-warnings"
+RDEPENDS_perl-module-file-stat += "perl-module-warnings-register"
+RDEPENDS_perl-module-file-temp += "perl-module-carp"
+RDEPENDS_perl-module-file-temp += "perl-module-constant"
+RDEPENDS_perl-module-file-temp += "perl-module-cwd"
+RDEPENDS_perl-module-file-temp += "perl-module-errno"
+RDEPENDS_perl-module-file-temp += "perl-module-exporter"
+RDEPENDS_perl-module-file-temp += "perl-module-fcntl"
+RDEPENDS_perl-module-file-temp += "perl-module-file-path"
+RDEPENDS_perl-module-file-temp += "perl-module-file-spec"
+RDEPENDS_perl-module-file-temp += "perl-module-io-seekable"
+RDEPENDS_perl-module-file-temp += "perl-module-overload"
+RDEPENDS_perl-module-file-temp += "perl-module-parent"
+RDEPENDS_perl-module-file-temp += "perl-module-posix"
+RDEPENDS_perl-module-file-temp += "perl-module-scalar-util"
+RDEPENDS_perl-module-file-temp += "perl-module-strict"
+RDEPENDS_perl-module-file-temp += "perl-module-vars"
+RDEPENDS_perl-module-filter-simple += "perl-module-filter-util-call"
+RDEPENDS_perl-module-filter-simple += "perl-module-text-balanced"
+RDEPENDS_perl-module-filter-util-call += "perl-module-exporter"
+RDEPENDS_perl-module-filter-util-call += "perl-module-strict"
+RDEPENDS_perl-module-filter-util-call += "perl-module-warnings"
+RDEPENDS_perl-module-filter-util-call += "perl-module-xsloader"
+RDEPENDS_perl-module-findbin += "perl-module-cwd"
+RDEPENDS_perl-module-findbin += "perl-module-exporter"
+RDEPENDS_perl-module-findbin += "perl-module-file-basename"
+RDEPENDS_perl-module-getopt-long += "perl-module-constant"
+RDEPENDS_perl-module-getopt-long += "perl-module-exporter"
+RDEPENDS_perl-module-getopt-long += "perl-module-overload"
+RDEPENDS_perl-module-getopt-long += "perl-module-pod-usage"
+RDEPENDS_perl-module-getopt-long += "perl-module-strict"
+RDEPENDS_perl-module-getopt-long += "perl-module-text-parsewords"
+RDEPENDS_perl-module-getopt-long += "perl-module-vars"
+RDEPENDS_perl-module-getopt-long += "perl-module-warnings"
+RDEPENDS_perl-module-getopt-std += "perl-module-exporter"
+RDEPENDS_perl-module-hash-util-fieldhash += "perl-module-exporter"
+RDEPENDS_perl-module-hash-util-fieldhash += "perl-module-strict"
+RDEPENDS_perl-module-hash-util-fieldhash += "perl-module-warnings"
+RDEPENDS_perl-module-hash-util-fieldhash += "perl-module-xsloader"
+RDEPENDS_perl-module-hash-util += "perl-module-exporter"
+RDEPENDS_perl-module-hash-util += "perl-module-hash-util-fieldhash"
+RDEPENDS_perl-module-hash-util += "perl-module-strict"
+RDEPENDS_perl-module-hash-util += "perl-module-warnings"
+RDEPENDS_perl-module-hash-util += "perl-module-warnings-register"
+RDEPENDS_perl-module-hash-util += "perl-module-xsloader"
+RDEPENDS_perl-module-i18n-collate += "perl-module-exporter"
+RDEPENDS_perl-module-i18n-collate += "perl-module-overload"
+RDEPENDS_perl-module-i18n-collate += "perl-module-posix"
+RDEPENDS_perl-module-i18n-collate += "perl-module-strict"
+RDEPENDS_perl-module-i18n-collate += "perl-module-warnings-register"
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-exporter"
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-strict"
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-warnings"
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-xsloader"
+RDEPENDS_perl-module-i18n-langtags-detect += "perl-module-i18n-langtags"
+RDEPENDS_perl-module-i18n-langtags-detect += "perl-module-strict"
+RDEPENDS_perl-module-i18n-langtags-list += "perl-module-strict"
+RDEPENDS_perl-module-i18n-langtags += "perl-module-exporter"
+RDEPENDS_perl-module-i18n-langtags += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-compress-raw-bzip2"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-adapter-identity += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-adapter-identity += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-adapter-identity += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-adapter-identity += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-constant"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-encode"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-file-globmapper"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-utf8"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-base += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-base += "perl-module-io-file"
+RDEPENDS_perl-module-io-compress-base += "perl-module-io-handle "
+RDEPENDS_perl-module-io-compress-base += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-base += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-io-compress-adapter-bzip2"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-io-compress-base"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-io-compress-adapter-deflate"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-io-compress-rawdeflate"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-io-compress-zlib-constants"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-constant"
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-adapter-deflate"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-gzip-constants"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-rawdeflate"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-zlib-extra"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-fcntl"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-io-compress-adapter-deflate"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-io-compress-base"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-zip-constants += "perl-module-constant"
+RDEPENDS_perl-module-io-compress-zip-constants += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-zip-constants += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-zip-constants += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-config"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-zip += "perl-module-fcntl"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-adapter-deflate"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-adapter-identity"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-bzip2 "
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-rawdeflate"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-zip-constants"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-zlib-extra"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-zip += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-constant"
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-zlib-extra += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-zlib-extra += "perl-module-io-compress-gzip-constants"
+RDEPENDS_perl-module-io-compress-zlib-extra += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-zlib-extra += "perl-module-warnings"
+RDEPENDS_perl-module-io-dir += "perl-module-exporter"
+RDEPENDS_perl-module-io-dir += "perl-module-file-stat"
+RDEPENDS_perl-module-io-dir += "perl-module-io-file"
+RDEPENDS_perl-module-io-dir += "perl-module-strict"
+RDEPENDS_perl-module-io-dir += "perl-module-tie-hash"
+RDEPENDS_perl-module-io-file += "perl-module-carp"
+RDEPENDS_perl-module-io-file += "perl-module-exporter"
+RDEPENDS_perl-module-io-file += "perl-module-fcntl"
+RDEPENDS_perl-module-io-file += "perl-module-io-seekable"
+RDEPENDS_perl-module-io-file += "perl-module-selectsaver"
+RDEPENDS_perl-module-io-file += "perl-module-strict"
+RDEPENDS_perl-module-io-file += "perl-module-symbol"
+RDEPENDS_perl-module-io-handle += "perl-module-exporter"
+RDEPENDS_perl-module-io-handle += "perl-module-io"
+RDEPENDS_perl-module-io-handle += "perl-module-io-file"
+RDEPENDS_perl-module-io-handle += "perl-module-selectsaver"
+RDEPENDS_perl-module-io-handle += "perl-module-strict"
+RDEPENDS_perl-module-io += "perl-module-strict"
+RDEPENDS_perl-module-io += "perl-module-warnings"
+RDEPENDS_perl-module-io += "perl-module-xsloader"
+RDEPENDS_perl-module-io-pipe += "perl-module-fcntl"
+RDEPENDS_perl-module-io-pipe += "perl-module-io-handle"
+RDEPENDS_perl-module-io-pipe += "perl-module-strict"
+RDEPENDS_perl-module-io-poll += "perl-module-exporter"
+RDEPENDS_perl-module-io-poll += "perl-module-io-handle"
+RDEPENDS_perl-module-io-poll += "perl-module-strict"
+RDEPENDS_perl-module-io-seekable += "perl-module-exporter"
+RDEPENDS_perl-module-io-seekable += "perl-module-fcntl"
+RDEPENDS_perl-module-io-seekable += "perl-module-io-handle"
+RDEPENDS_perl-module-io-seekable += "perl-module-strict"
+RDEPENDS_perl-module-io-select += "perl-module-exporter"
+RDEPENDS_perl-module-io-select += "perl-module-strict"
+RDEPENDS_perl-module-io-select += "perl-module-warnings-register"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-errno"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-exporter"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-io-socket"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-socket"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-strict"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-base"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-constant"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-errno"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-posix"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-socket"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-strict"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-warnings"
+RDEPENDS_perl-module-io-socket += "perl-module-errno"
+RDEPENDS_perl-module-io-socket += "perl-module-exporter"
+RDEPENDS_perl-module-io-socket += "perl-module-io-handle"
+RDEPENDS_perl-module-io-socket += "perl-module-io-select"
+RDEPENDS_perl-module-io-socket += "perl-module-io-socket-inet"
+RDEPENDS_perl-module-io-socket += "perl-module-io-socket-unix"
+RDEPENDS_perl-module-io-socket += "perl-module-socket"
+RDEPENDS_perl-module-io-socket += "perl-module-strict"
+RDEPENDS_perl-module-io-socket-unix += "perl-module-io-socket"
+RDEPENDS_perl-module-io-socket-unix += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-compress-raw-bzip2"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-io-compress-zip-constants "
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-adapter-inflate"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-base"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-gunzip"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-inflate"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-rawinflate"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-unzip"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-io-uncompress-base"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-constant"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-io-file "
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-list-util"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-io-uncompress-adapter-bunzip2"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-io-uncompress-base"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-io-compress-gzip-constants"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-io-compress-zlib-extra"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-io-uncompress-rawinflate"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-io-compress-zlib-constants"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-io-uncompress-rawinflate"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-io-uncompress-adapter-inflate"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-io-uncompress-base"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-constant"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-fcntl"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-compress-zip-constants"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-compress-zlib-extra"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-file"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-uncompress-adapter-identity"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-uncompress-adapter-inflate"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-uncompress-rawinflate"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-posix"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-warnings"
+RDEPENDS_perl-module-io-zlib += "perl-module-fcntl"
+RDEPENDS_perl-module-io-zlib += "perl-module-io-handle"
+RDEPENDS_perl-module-io-zlib += "perl-module-strict"
+RDEPENDS_perl-module-io-zlib += "perl-module-tie-handle"
+RDEPENDS_perl-module-io-zlib += "perl-module-vars"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-constant"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-exporter"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-filehandle"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-io-handle"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-io-select"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-ipc-open3"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-locale-maketext-simple"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-load"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-params-check"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-posix"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-socket"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-strict"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-text-parsewords"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-time-hires"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-vars"
+RDEPENDS_perl-module-ipc-msg += "perl-module-class-struct"
+RDEPENDS_perl-module-ipc-msg += "perl-module-ipc-sysv"
+RDEPENDS_perl-module-ipc-msg += "perl-module-strict"
+RDEPENDS_perl-module-ipc-msg += "perl-module-vars"
+RDEPENDS_perl-module-ipc-open2 += "perl-module-exporter"
+RDEPENDS_perl-module-ipc-open2 += "perl-module-ipc-open3"
+RDEPENDS_perl-module-ipc-open2 += "perl-module-strict"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-constant"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-exporter"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-fcntl"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-io-pipe"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-posix"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-strict"
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-class-struct"
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-ipc-sysv"
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-strict"
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-vars"
+RDEPENDS_perl-module-ipc-sharedmem += "perl-module-class-struct"
+RDEPENDS_perl-module-ipc-sharedmem += "perl-module-ipc-sysv"
+RDEPENDS_perl-module-ipc-sharedmem += "perl-module-strict"
+RDEPENDS_perl-module-ipc-sharedmem += "perl-module-vars"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-config"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-dynaloader"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-exporter"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-strict"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-vars"
+RDEPENDS_perl-module-json-pp-boolean += "perl-module-overload"
+RDEPENDS_perl-module-json-pp-boolean += "perl-module-strict"
+RDEPENDS_perl-module-json-pp += "perl-module-b"
+RDEPENDS_perl-module-json-pp += "perl-module-bytes"
+RDEPENDS_perl-module-json-pp += "perl-module-constant"
+RDEPENDS_perl-module-json-pp += "perl-module-encode"
+RDEPENDS_perl-module-json-pp += "perl-module-exporter"
+RDEPENDS_perl-module-json-pp += "perl-module-json-pp-boolean"
+RDEPENDS_perl-module-json-pp += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-json-pp += "perl-module-math-bigint"
+RDEPENDS_perl-module-json-pp += "perl-module-overload"
+RDEPENDS_perl-module-json-pp += "perl-module-strict"
+RDEPENDS_perl-module-json-pp += "perl-module-subs"
+RDEPENDS_perl-module-less += "perl-module-strict"
+RDEPENDS_perl-module-less += "perl-module-warnings"
+RDEPENDS_perl-module-lib += "perl-module-config"
+RDEPENDS_perl-module-lib += "perl-module-strict"
+RDEPENDS_perl-module-list-util += "perl-module-exporter"
+RDEPENDS_perl-module-list-util += "perl-module-strict"
+RDEPENDS_perl-module-list-util += "perl-module-warnings"
+RDEPENDS_perl-module-list-util += "perl-module-xsloader"
+RDEPENDS_perl-module-list-util-xs += "perl-module-list-util"
+RDEPENDS_perl-module-list-util-xs += "perl-module-strict"
+RDEPENDS_perl-module-list-util-xs += "perl-module-warnings"
+RDEPENDS_perl-module-loaded += "perl-module-strict"
+RDEPENDS_perl-module-loaded += "perl-module-vars"
+RDEPENDS_perl-module-load += "perl-module-config"
+RDEPENDS_perl-module-load += "perl-module-constant"
+RDEPENDS_perl-module-load += "perl-module-exporter"
+RDEPENDS_perl-module-load += "perl-module-filehandle"
+RDEPENDS_perl-module-load += "perl-module-locale-maketext-simple"
+RDEPENDS_perl-module-load += "perl-module-corelist"
+RDEPENDS_perl-module-load += "perl-module-load"
+RDEPENDS_perl-module-load += "perl-module-params-check"
+RDEPENDS_perl-module-load += "perl-module-strict"
+RDEPENDS_perl-module-load += "perl-module-vars"
+RDEPENDS_perl-module-load += "perl-module-version"
+RDEPENDS_perl-module-load += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-constants += "perl-module-constant"
+RDEPENDS_perl-module-locale-codes-constants += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-constants += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-constants += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-country-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-country-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-country-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-country-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-country-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-country-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-currency-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-currency-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-currency-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-currency-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-currency-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-currency-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langext-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langext-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langext-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langext-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langext-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langext-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langfam-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langfam-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langfam-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langfam-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langfam-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-language-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-language-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-language-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-language-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-language-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-language-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langvar-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langvar-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langvar-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langvar-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langvar-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langvar-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes += "perl-module-if"
+RDEPENDS_perl-module-locale-codes += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-script-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-script-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-script-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-script-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-script-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-script-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-country += "perl-module-exporter"
+RDEPENDS_perl-module-locale-country += "perl-module-if"
+RDEPENDS_perl-module-locale-country += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-country += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-country += "perl-module-strict"
+RDEPENDS_perl-module-locale-country += "perl-module-warnings"
+RDEPENDS_perl-module-locale-currency += "perl-module-exporter"
+RDEPENDS_perl-module-locale-currency += "perl-module-if"
+RDEPENDS_perl-module-locale-currency += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-currency += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-currency += "perl-module-strict"
+RDEPENDS_perl-module-locale-currency += "perl-module-warnings"
+RDEPENDS_perl-module-locale-language += "perl-module-exporter"
+RDEPENDS_perl-module-locale-language += "perl-module-if"
+RDEPENDS_perl-module-locale-language += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-language += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-language += "perl-module-strict"
+RDEPENDS_perl-module-locale-language += "perl-module-warnings"
+RDEPENDS_perl-module-locale-maketext-gutsloader += "perl-module-locale-maketext"
+RDEPENDS_perl-module-locale-maketext-guts += "perl-module-locale-maketext"
+RDEPENDS_perl-module-locale-maketext += "perl-module-i18n-langtags"
+RDEPENDS_perl-module-locale-maketext += "perl-module-i18n-langtags-detect"
+RDEPENDS_perl-module-locale-maketext += "perl-module-integer"
+RDEPENDS_perl-module-locale-maketext += "perl-module-strict"
+RDEPENDS_perl-module-locale-maketext-simple += "perl-module-base"
+RDEPENDS_perl-module-locale-maketext-simple += "perl-module-strict"
+RDEPENDS_perl-module-locale += "perl-module-config"
+RDEPENDS_perl-module-locale-script += "perl-module-exporter"
+RDEPENDS_perl-module-locale-script += "perl-module-if"
+RDEPENDS_perl-module-locale-script += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-script += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-script += "perl-module-strict"
+RDEPENDS_perl-module-locale-script += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-exporter"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-math-bigint"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-math-complex"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-overload"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-strict"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-exporter"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-overload"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-strict"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-calcemu += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-calcemu += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-constant"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-integer"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-math-bigint-lib"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-fastcalc += "perl-module-math-bigint-calc"
+RDEPENDS_perl-module-math-bigint-fastcalc += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-fastcalc += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-fastcalc += "perl-module-xsloader"
+RDEPENDS_perl-module-math-bigint-lib += "perl-module-overload"
+RDEPENDS_perl-module-math-bigint-lib += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-lib += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint += "perl-module-exporter"
+RDEPENDS_perl-module-math-bigint += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-math-bigint += "perl-module-math-complex"
+RDEPENDS_perl-module-math-bigint += "perl-module-overload"
+RDEPENDS_perl-module-math-bigint += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-exporter"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-math-bigint"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-overload"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigrat += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-math-bigrat += "perl-module-math-bigint"
+RDEPENDS_perl-module-math-bigrat += "perl-module-overload"
+RDEPENDS_perl-module-math-bigrat += "perl-module-strict"
+RDEPENDS_perl-module-math-bigrat += "perl-module-warnings"
+RDEPENDS_perl-module-math-complex += "perl-module-config"
+RDEPENDS_perl-module-math-complex += "perl-module-exporter"
+RDEPENDS_perl-module-math-complex += "perl-module-overload"
+RDEPENDS_perl-module-math-complex += "perl-module-strict"
+RDEPENDS_perl-module-math-complex += "perl-module-warnings"
+RDEPENDS_perl-module-math-trig += "perl-module-exporter"
+RDEPENDS_perl-module-math-trig += "perl-module-math-complex"
+RDEPENDS_perl-module-math-trig += "perl-module-strict"
+RDEPENDS_perl-module-metadata += "perl-module-version"
+RDEPENDS_perl-module-memoize-anydbm-file += "perl-module-vars"
+RDEPENDS_perl-module-memoize += "perl-module-config"
+RDEPENDS_perl-module-memoize += "perl-module-exporter"
+RDEPENDS_perl-module-memoize += "perl-module-strict"
+RDEPENDS_perl-module-memoize += "perl-module-vars"
+RDEPENDS_perl-module-memoize-sdbm-file += "perl-module-sdbm-file"
+RDEPENDS_perl-module-memoize-storable += "perl-module-storable"
+RDEPENDS_perl-module-mime-base64 += "perl-module-exporter"
+RDEPENDS_perl-module-mime-base64 += "perl-module-strict"
+RDEPENDS_perl-module-mime-base64 += "perl-module-vars"
+RDEPENDS_perl-module-mime-base64 += "perl-module-xsloader"
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-exporter"
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-mime-base64"
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-strict"
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-vars"
+RDEPENDS_perl-module-mro += "perl-module-strict"
+RDEPENDS_perl-module-mro += "perl-module-warnings"
+RDEPENDS_perl-module-mro += "perl-module-xsloader"
+RDEPENDS_perl-module-net-cmd += "perl-module-constant"
+RDEPENDS_perl-module-net-cmd += "perl-module-errno"
+RDEPENDS_perl-module-net-cmd += "perl-module-exporter"
+RDEPENDS_perl-module-net-cmd += "perl-module-strict"
+RDEPENDS_perl-module-net-cmd += "perl-module-warnings"
+RDEPENDS_perl-module-net-config += "perl-module-exporter"
+RDEPENDS_perl-module-net-config += "perl-module-socket"
+RDEPENDS_perl-module-net-config += "perl-module-strict"
+RDEPENDS_perl-module-net-config += "perl-module-warnings"
+RDEPENDS_perl-module-net-domain += "perl-module-exporter"
+RDEPENDS_perl-module-net-domain += "perl-module-net-config"
+RDEPENDS_perl-module-net-domain += "perl-module-posix"
+RDEPENDS_perl-module-net-domain += "perl-module-socket"
+RDEPENDS_perl-module-net-domain += "perl-module-strict"
+RDEPENDS_perl-module-net-domain += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-a += "perl-module-net-ftp-dataconn"
+RDEPENDS_perl-module-net-ftp-a += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-a += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-errno"
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-e += "perl-module-net-ftp-i"
+RDEPENDS_perl-module-net-ftp-e += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-e += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-i += "perl-module-net-ftp-dataconn"
+RDEPENDS_perl-module-net-ftp-i += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-i += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-l += "perl-module-net-ftp-i"
+RDEPENDS_perl-module-net-ftp-l += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-l += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp += "perl-module-constant"
+RDEPENDS_perl-module-net-ftp += "perl-module-fcntl"
+RDEPENDS_perl-module-net-ftp += "perl-module-file-basename"
+RDEPENDS_perl-module-net-ftp += "perl-module-io-socket"
+RDEPENDS_perl-module-net-ftp += "perl-module-io-socket-ip"
+RDEPENDS_perl-module-net-ftp += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-ftp += "perl-module-net-config"
+RDEPENDS_perl-module-net-ftp += "perl-module-net-ftp-a"
+RDEPENDS_perl-module-net-ftp += "perl-module-net-netrc"
+RDEPENDS_perl-module-net-ftp += "perl-module-socket"
+RDEPENDS_perl-module-net-ftp += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp += "perl-module-time-local"
+RDEPENDS_perl-module-net-ftp += "perl-module-warnings"
+RDEPENDS_perl-module-net-hostent += "perl-module-class-struct"
+RDEPENDS_perl-module-net-hostent += "perl-module-exporter"
+RDEPENDS_perl-module-net-hostent += "perl-module-socket"
+RDEPENDS_perl-module-net-hostent += "perl-module-strict"
+RDEPENDS_perl-module-net-netent += "perl-module-class-struct"
+RDEPENDS_perl-module-net-netent += "perl-module-exporter"
+RDEPENDS_perl-module-net-netent += "perl-module-socket"
+RDEPENDS_perl-module-net-netent += "perl-module-strict"
+RDEPENDS_perl-module-net-netrc += "perl-module-filehandle"
+RDEPENDS_perl-module-net-netrc += "perl-module-strict"
+RDEPENDS_perl-module-net-netrc += "perl-module-warnings"
+RDEPENDS_perl-module-net-nntp += "perl-module-io-socket"
+RDEPENDS_perl-module-net-nntp += "perl-module-io-socket-ip"
+RDEPENDS_perl-module-net-nntp += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-nntp += "perl-module-net-config"
+RDEPENDS_perl-module-net-nntp += "perl-module-strict"
+RDEPENDS_perl-module-net-nntp += "perl-module-time-local"
+RDEPENDS_perl-module-net-nntp += "perl-module-warnings"
+RDEPENDS_perl-module-net-ping += "perl-module-constant"
+RDEPENDS_perl-module-net-ping += "perl-module-exporter"
+RDEPENDS_perl-module-net-ping += "perl-module-fcntl"
+RDEPENDS_perl-module-net-ping += "perl-module-filehandle"
+RDEPENDS_perl-module-net-ping += "perl-module-io-socket-inet"
+RDEPENDS_perl-module-net-ping += "perl-module-posix"
+RDEPENDS_perl-module-net-ping += "perl-module-socket"
+RDEPENDS_perl-module-net-ping += "perl-module-strict"
+RDEPENDS_perl-module-net-ping += "perl-module-time-hires"
+RDEPENDS_perl-module-net-pop3 += "perl-module-io-socket"
+RDEPENDS_perl-module-net-pop3 += "perl-module-io-socket-ip"
+RDEPENDS_perl-module-net-pop3 += "perl-module-mime-base64"
+RDEPENDS_perl-module-net-pop3 += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-pop3 += "perl-module-net-config"
+RDEPENDS_perl-module-net-pop3 += "perl-module-net-netrc"
+RDEPENDS_perl-module-net-pop3 += "perl-module-strict"
+RDEPENDS_perl-module-net-pop3 += "perl-module-warnings"
+RDEPENDS_perl-module-net-protoent += "perl-module-class-struct"
+RDEPENDS_perl-module-net-protoent += "perl-module-exporter"
+RDEPENDS_perl-module-net-protoent += "perl-module-strict"
+RDEPENDS_perl-module-net-servent += "perl-module-class-struct"
+RDEPENDS_perl-module-net-servent += "perl-module-exporter"
+RDEPENDS_perl-module-net-servent += "perl-module-strict"
+RDEPENDS_perl-module-net-smtp += "perl-module-io-socket"
+RDEPENDS_perl-module-net-smtp += "perl-module-io-socket-ip"
+RDEPENDS_perl-module-net-smtp += "perl-module-mime-base64"
+RDEPENDS_perl-module-net-smtp += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-smtp += "perl-module-net-config"
+RDEPENDS_perl-module-net-smtp += "perl-module-socket"
+RDEPENDS_perl-module-net-smtp += "perl-module-strict"
+RDEPENDS_perl-module-net-smtp += "perl-module-warnings"
+RDEPENDS_perl-module-net-time += "perl-module-exporter"
+RDEPENDS_perl-module-net-time += "perl-module-io-select"
+RDEPENDS_perl-module-net-time += "perl-module-io-socket"
+RDEPENDS_perl-module-net-time += "perl-module-net-config"
+RDEPENDS_perl-module-net-time += "perl-module-strict"
+RDEPENDS_perl-module-net-time += "perl-module-warnings"
+RDEPENDS_perl-module-next += "perl-module-overload"
+RDEPENDS_perl-module-next += "perl-module-strict"
+RDEPENDS_perl-module-next += "perl-module-warnings"
+RDEPENDS_perl-module-ok += "perl-module-strict"
+RDEPENDS_perl-module-ok += "perl-module-test-more"
+RDEPENDS_perl-module-opcode += "perl-module-exporter"
+RDEPENDS_perl-module-opcode += "perl-module-strict"
+RDEPENDS_perl-module-opcode += "perl-module-subs"
+RDEPENDS_perl-module-opcode += "perl-module-xsloader"
+RDEPENDS_perl-module-open += "perl-module-encode"
+RDEPENDS_perl-module-open += "perl-module-encoding"
+RDEPENDS_perl-module-open += "perl-module-warnings"
+RDEPENDS_perl-module-o += "perl-module-b"
+RDEPENDS_perl-module-ops += "perl-module-opcode"
+RDEPENDS_perl-module-overloading += "perl-module-overload-numbers"
+RDEPENDS_perl-module-overloading += "perl-module-warnings"
+RDEPENDS_perl-module-overload += "perl-module-mro"
+RDEPENDS_perl-module-overload += "perl-module-warnings-register"
+RDEPENDS_perl-module-overload += "perl-module-overloading"
+RDEPENDS_perl-module-params-check += "perl-module-exporter"
+RDEPENDS_perl-module-params-check += "perl-module-locale-maketext-simple"
+RDEPENDS_perl-module-params-check += "perl-module-strict"
+RDEPENDS_perl-module-params-check += "perl-module-vars"
+RDEPENDS_perl-module-parent += "perl-module-strict"
+RDEPENDS_perl-module-parent += "perl-module-vars"
+RDEPENDS_perl-module-perlfaq += "perl-module-strict"
+RDEPENDS_perl-module-perlfaq += "perl-module-warnings"
+RDEPENDS_perl-module-perlio-encoding += "perl-module-strict"
+RDEPENDS_perl-module-perlio-encoding += "perl-module-xsloader"
+RDEPENDS_perl-module-perlio-mmap += "perl-module-strict"
+RDEPENDS_perl-module-perlio-mmap += "perl-module-warnings"
+RDEPENDS_perl-module-perlio-mmap += "perl-module-xsloader"
+RDEPENDS_perl-module-perlio-scalar += "perl-module-xsloader"
+RDEPENDS_perl-module-perlio-via += "perl-module-xsloader"
+RDEPENDS_perl-module-perlio-via-quotedprint += "perl-module-mime-quotedprint"
+RDEPENDS_perl-module-perlio-via-quotedprint += "perl-module-strict"
+RDEPENDS_perl-module-pod-checker += "perl-module-base"
+RDEPENDS_perl-module-pod-checker += "perl-module-exporter"
+RDEPENDS_perl-module-pod-checker += "perl-module-strict"
+RDEPENDS_perl-module-pod-checker += "perl-module-warnings"
+RDEPENDS_perl-module-pod-escapes += "perl-module-exporter"
+RDEPENDS_perl-module-pod-escapes += "perl-module-strict"
+RDEPENDS_perl-module-pod-escapes += "perl-module-vars"
+RDEPENDS_perl-module-pod-escapes += "perl-module-warnings"
+RDEPENDS_perl-module-pod-find += "perl-module-config"
+RDEPENDS_perl-module-pod-find += "perl-module-cwd"
+RDEPENDS_perl-module-pod-find += "perl-module-exporter"
+RDEPENDS_perl-module-pod-find += "perl-module-file-find"
+RDEPENDS_perl-module-pod-find += "perl-module-strict"
+RDEPENDS_perl-module-pod-find += "perl-module-vars"
+RDEPENDS_perl-module-pod-functions += "perl-module-exporter"
+RDEPENDS_perl-module-pod-functions += "perl-module-strict"
+RDEPENDS_perl-module-pod-inputobjects += "perl-module-strict"
+RDEPENDS_perl-module-pod-inputobjects += "perl-module-vars"
+RDEPENDS_perl-module-pod-man += "perl-module-file-basename"
+RDEPENDS_perl-module-pod-man += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-man += "perl-module-strict"
+RDEPENDS_perl-module-pod-man += "perl-module-subs"
+RDEPENDS_perl-module-pod-man += "perl-module-vars"
+RDEPENDS_perl-module-pod-man += "perl-module-warnings"
+RDEPENDS_perl-module-pod-parselink += "perl-module-exporter"
+RDEPENDS_perl-module-pod-parselink += "perl-module-strict"
+RDEPENDS_perl-module-pod-parselink += "perl-module-vars"
+RDEPENDS_perl-module-pod-parselink += "perl-module-warnings"
+RDEPENDS_perl-module-pod-parser += "perl-module-exporter"
+RDEPENDS_perl-module-pod-parser += "perl-module-pod-inputobjects"
+RDEPENDS_perl-module-pod-parser += "perl-module-strict"
+RDEPENDS_perl-module-pod-parser += "perl-module-vars"
+RDEPENDS_perl-module-pod-parseutils += "perl-module-strict"
+RDEPENDS_perl-module-pod-parseutils += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-config"
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-getoptsoo += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-getoptsoo += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-config"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-encode"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-fcntl"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-file-basename"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-file-temp"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-pod-perldoc-getoptsoo"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-text-parsewords"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-pod-text-color"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-pod-checker"
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-encode"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-io-handle"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-io-select"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-ipc-open3"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-pod-man"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-pod-perldoc-topod"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-pod-man"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-pod-text-termcap"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-pod-text"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-warnings"
+RDEPENDS_perl-module-pod-plaintext += "perl-module-pod-select"
+RDEPENDS_perl-module-pod-plaintext += "perl-module-strict"
+RDEPENDS_perl-module-pod-plaintext += "perl-module-vars"
+RDEPENDS_perl-module-pod-select += "perl-module-pod-parser"
+RDEPENDS_perl-module-pod-select += "perl-module-strict"
+RDEPENDS_perl-module-pod-select += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-integer"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-pod-simple-transcode"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-pod-simple-methody"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-text-wrap"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-debug += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-debug += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-debug += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-dumpastext += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-dumpastext += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-dumpasxml += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-dumpasxml += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-dumpasxml += "perl-module-text-wrap"
+RDEPENDS_perl-module-pod-simple-linksection += "perl-module-overload"
+RDEPENDS_perl-module-pod-simple-linksection += "perl-module-pod-simple-blackbox"
+RDEPENDS_perl-module-pod-simple-linksection += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-linksection += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-methody += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-methody += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-methody += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple += "perl-module-integer"
+RDEPENDS_perl-module-pod-simple += "perl-module-pod-escapes"
+RDEPENDS_perl-module-pod-simple += "perl-module-pod-simple-blackbox"
+RDEPENDS_perl-module-pod-simple += "perl-module-pod-simple-linksection"
+RDEPENDS_perl-module-pod-simple += "perl-module-pod-simple-tiedoutfh"
+RDEPENDS_perl-module-pod-simple += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-progress += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparserendtoken += "perl-module-pod-simple-pullparsertoken"
+RDEPENDS_perl-module-pod-simple-pullparserendtoken += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparserendtoken += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-pod-simple-pullparserendtoken"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-pod-simple-pullparserstarttoken"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-pod-simple-pullparsertexttoken"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparserstarttoken += "perl-module-pod-simple-pullparsertoken"
+RDEPENDS_perl-module-pod-simple-pullparserstarttoken += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparserstarttoken += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-pullparsertexttoken += "perl-module-pod-simple-pullparsertoken"
+RDEPENDS_perl-module-pod-simple-pullparsertexttoken += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparsertexttoken += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-pullparsertoken += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-rtf += "perl-module-integer"
+RDEPENDS_perl-module-pod-simple-rtf += "perl-module-pod-simple-pullparser"
+RDEPENDS_perl-module-pod-simple-rtf += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-rtf += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-config"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-cwd"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-file-basename"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-simpletree += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-simpletree += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-simpletree += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-textcontent += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-textcontent += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-textcontent += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-pod-simple-methody"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-text-wrap"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-tiedoutfh += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-tiedoutfh += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-transcodedumb += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-transcodedumb += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-transcode += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-transcode += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-encode"
+RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-xmloutstream += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-xmloutstream += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-xmloutstream += "perl-module-vars"
+RDEPENDS_perl-module-pod-text-color += "perl-module-pod-text"
+RDEPENDS_perl-module-pod-text-color += "perl-module-strict"
+RDEPENDS_perl-module-pod-text-color += "perl-module-term-ansicolor"
+RDEPENDS_perl-module-pod-text-color += "perl-module-vars"
+RDEPENDS_perl-module-pod-text-color += "perl-module-warnings"
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-pod-text"
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-strict"
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-vars"
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-warnings"
+RDEPENDS_perl-module-pod-text += "perl-module-encode"
+RDEPENDS_perl-module-pod-text += "perl-module-exporter"
+RDEPENDS_perl-module-pod-text += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-text += "perl-module-strict"
+RDEPENDS_perl-module-pod-text += "perl-module-vars"
+RDEPENDS_perl-module-pod-text += "perl-module-warnings"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-pod-text"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-posix"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-strict"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-term-cap"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-vars"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-warnings"
+RDEPENDS_perl-module-pod-usage += "perl-module-config"
+RDEPENDS_perl-module-pod-usage += "perl-module-exporter"
+RDEPENDS_perl-module-pod-usage += "perl-module-strict"
+RDEPENDS_perl-module-pod-usage += "perl-module-vars"
+RDEPENDS_perl-module-posix += "perl-module-exporter"
+RDEPENDS_perl-module-posix += "perl-module-fcntl"
+RDEPENDS_perl-module-posix += "perl-module-strict"
+RDEPENDS_perl-module-posix += "perl-module-tie-hash"
+RDEPENDS_perl-module-posix += "perl-module-warnings"
+RDEPENDS_perl-module-posix += "perl-module-xsloader"
+RDEPENDS_perl-module-re += "perl-module-exporter"
+RDEPENDS_perl-module-re += "perl-module-strict"
+RDEPENDS_perl-module-re += "perl-module-term-cap"
+RDEPENDS_perl-module-re += "perl-module-warnings"
+RDEPENDS_perl-module-re += "perl-module-xsloader"
+RDEPENDS_perl-module-safe += "perl-module-b"
+RDEPENDS_perl-module-safe += "perl-module-opcode"
+RDEPENDS_perl-module-safe += "perl-module-strict"
+RDEPENDS_perl-module-safe += "perl-module-utf8"
+RDEPENDS_perl-module-scalar-util += "perl-module-carp"
+RDEPENDS_perl-module-scalar-util += "perl-module-exporter"
+RDEPENDS_perl-module-scalar-util += "perl-module-list-util"
+RDEPENDS_perl-module-scalar-util += "perl-module-strict"
+RDEPENDS_perl-module-scalar-util += "perl-module-warnings"
+RDEPENDS_perl-module-sdbm-file += "perl-module-exporter"
+RDEPENDS_perl-module-sdbm-file += "perl-module-strict"
+RDEPENDS_perl-module-sdbm-file += "perl-module-tie-hash"
+RDEPENDS_perl-module-sdbm-file += "perl-module-warnings"
+RDEPENDS_perl-module-sdbm-file += "perl-module-xsloader"
+RDEPENDS_perl-module-search-dict += "perl-module-exporter"
+RDEPENDS_perl-module-search-dict += "perl-module-feature"
+RDEPENDS_perl-module-search-dict += "perl-module-strict"
+RDEPENDS_perl-module-selfloader += "perl-module-exporter"
+RDEPENDS_perl-module-selfloader += "perl-module-io-handle"
+RDEPENDS_perl-module-selfloader += "perl-module-strict"
+RDEPENDS_perl-module-socket += "perl-module-exporter"
+RDEPENDS_perl-module-socket += "perl-module-strict"
+RDEPENDS_perl-module-socket += "perl-module-warnings-register"
+RDEPENDS_perl-module-socket += "perl-module-xsloader"
+RDEPENDS_perl-module-sort += "perl-module-strict"
+RDEPENDS_perl-module-storable += "perl-module-exporter"
+RDEPENDS_perl-module-storable += "perl-module-io-file"
+RDEPENDS_perl-module-storable += "perl-module-xsloader"
+RDEPENDS_perl-module-sub-util += "perl-module-exporter"
+RDEPENDS_perl-module-sub-util += "perl-module-list-util"
+RDEPENDS_perl-module-sub-util += "perl-module-strict"
+RDEPENDS_perl-module-sub-util += "perl-module-warnings"
+RDEPENDS_perl-module-sys-hostname += "perl-module-exporter"
+RDEPENDS_perl-module-sys-hostname += "perl-module-posix"
+RDEPENDS_perl-module-sys-hostname += "perl-module-strict"
+RDEPENDS_perl-module-sys-hostname += "perl-module-warnings"
+RDEPENDS_perl-module-sys-hostname += "perl-module-xsloader"
+RDEPENDS_perl-module-sys-syslog += "perl-module-config"
+RDEPENDS_perl-module-sys-syslog += "perl-module-constant"
+RDEPENDS_perl-module-sys-syslog += "perl-module-dynaloader"
+RDEPENDS_perl-module-sys-syslog += "perl-module-exporter"
+RDEPENDS_perl-module-sys-syslog += "perl-module-fcntl"
+RDEPENDS_perl-module-sys-syslog += "perl-module-file-basename"
+RDEPENDS_perl-module-sys-syslog += "perl-module-posix"
+RDEPENDS_perl-module-sys-syslog += "perl-module-socket"
+RDEPENDS_perl-module-sys-syslog += "perl-module-strict"
+RDEPENDS_perl-module-sys-syslog += "perl-module-sys-hostname"
+RDEPENDS_perl-module-sys-syslog += "perl-module-vars"
+RDEPENDS_perl-module-sys-syslog += "perl-module-warnings"
+RDEPENDS_perl-module-sys-syslog += "perl-module-warnings-register"
+RDEPENDS_perl-module-sys-syslog += "perl-module-xsloader"
+RDEPENDS_perl-module-tap-base += "perl-module-base"
+RDEPENDS_perl-module-tap-base += "perl-module-constant"
+RDEPENDS_perl-module-tap-base += "perl-module-strict"
+RDEPENDS_perl-module-tap-base += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-base += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-posix"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-tap-formatter-color"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-color += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-color += "perl-module-constant"
+RDEPENDS_perl-module-tap-formatter-color += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-color += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-constant"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-file-path"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-console += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-console += "perl-module-posix"
+RDEPENDS_perl-module-tap-formatter-console += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-console += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-console-session += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-console-session += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-console-session += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-posix"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-tap-formatter-file-session"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-file-session += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-file-session += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-file-session += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-session += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-session += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-session += "perl-module-warnings"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-constant"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-strict"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-text-parsewords"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-warnings"
+RDEPENDS_perl-module-tap-harness += "perl-module-base"
+RDEPENDS_perl-module-tap-harness += "perl-module-carp"
+RDEPENDS_perl-module-tap-harness += "perl-module-file-path"
+RDEPENDS_perl-module-tap-harness += "perl-module-file-spec"
+RDEPENDS_perl-module-tap-harness += "perl-module-io-handle"
+RDEPENDS_perl-module-tap-harness += "perl-module-strict"
+RDEPENDS_perl-module-tap-harness += "perl-module-tap-base"
+RDEPENDS_perl-module-tap-harness += "perl-module-warnings"
+RDEPENDS_perl-module-tap-object += "perl-module-strict"
+RDEPENDS_perl-module-tap-object += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-benchmark"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-tap-parser-resultfactory"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-tap-parser-yamlish-reader"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-tap-parser-iterator"
+RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-carp"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-file-basename"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iterator += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iterator += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-iterator += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-config"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-io-handle"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-tap-parser-iterator"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-tap-parser-iterator"
+RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-io-select"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser += "perl-module-base"
+RDEPENDS_perl-module-tap-parser += "perl-module-carp"
+RDEPENDS_perl-module-tap-parser += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-grammar"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-iterator"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-resultfactory"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-source"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-executable"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-file"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-handle"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-perl"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-rawtap"
+RDEPENDS_perl-module-tap-parser += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-bailout"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-comment"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-plan"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-pragma"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-test"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-unknown"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-version"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-yaml"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-result += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-test += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-test += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-test += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser-result-test += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-version += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-version += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-version += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser-result-version += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler-job += "perl-module-carp"
+RDEPENDS_perl-module-tap-parser-scheduler-job += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-scheduler-job += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-carp"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-tap-parser-scheduler-job"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-tap-parser-scheduler-spinner"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler-spinner += "perl-module-carp"
+RDEPENDS_perl-module-tap-parser-scheduler-spinner += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-scheduler-spinner += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-tap-parser-iterator-process"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-tap-parser-sourcehandler"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-tap-parser-iterator-stream"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-tap-parser-sourcehandler"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-tap-parser-iterator-stream"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-tap-parser-sourcehandler"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-tap-parser-iterator"
+RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-config"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-iterator-process"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-sourcehandler-executable"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-text-parsewords"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-tap-parser-iterator-array"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-tap-parser-sourcehandler"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-file-basename"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-warnings"
+RDEPENDS_perl-module-term-ansicolor += "perl-module-exporter"
+RDEPENDS_perl-module-term-ansicolor += "perl-module-strict"
+RDEPENDS_perl-module-term-ansicolor += "perl-module-warnings"
+RDEPENDS_perl-module-term-cap += "perl-module-strict"
+RDEPENDS_perl-module-term-cap += "perl-module-vars"
+RDEPENDS_perl-module-term-complete += "perl-module-exporter"
+RDEPENDS_perl-module-term-complete += "perl-module-strict"
+RDEPENDS_perl-module-term-readline += "perl-module-strict"
+RDEPENDS_perl-module-term-readline += "perl-module-term-cap"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-warnings"
+RDEPENDS_perl-module-test-builder-module += "perl-module-exporter"
+RDEPENDS_perl-module-test-builder-module += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-module += "perl-module-test-builder"
+RDEPENDS_perl-module-test-builder += "perl-module-data-dumper"
+RDEPENDS_perl-module-test-builder += "perl-module-list-util"
+RDEPENDS_perl-module-test-builder += "perl-module-overload"
+RDEPENDS_perl-module-test-builder += "perl-module-strict"
+RDEPENDS_perl-module-test-builder += "perl-module-scalar-util"
+RDEPENDS_perl-module-test-builder += "perl-module-test-builder-formatter"
+RDEPENDS_perl-module-test-builder += "perl-module-test-builder-tododiag"
+RDEPENDS_perl-module-test-builder += "perl-module-test2-api"
+RDEPENDS_perl-module-test-builder += "perl-module-test2-util"
+RDEPENDS_perl-module-test-builder += "perl-module-warnings"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-test2-formatter"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-test2-formatter-tap"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-warnings"
+RDEPENDS_perl-module-test-builder-tester-color += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-tester-color += "perl-module-test-builder-tester"
+RDEPENDS_perl-module-test-builder-tester += "perl-module-exporter"
+RDEPENDS_perl-module-test-builder-tester += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-tester += "perl-module-test-builder"
+RDEPENDS_perl-module-test-builder-tododiag += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-tododiag += "perl-module-warnings"
+RDEPENDS_perl-module-test-harness += "perl-module-base"
+RDEPENDS_perl-module-test-harness += "perl-module-config"
+RDEPENDS_perl-module-test-harness += "perl-module-constant"
+RDEPENDS_perl-module-test-harness += "perl-module-strict"
+RDEPENDS_perl-module-test-harness += "perl-module-tap-harness"
+RDEPENDS_perl-module-test-harness += "perl-module-tap-parser-aggregator"
+RDEPENDS_perl-module-test-harness += "perl-module-tap-parser-source"
+RDEPENDS_perl-module-test-harness += "perl-module-tap-parser-sourcehandler-perl"
+RDEPENDS_perl-module-test-harness += "perl-module-text-parsewords"
+RDEPENDS_perl-module-test-harness += "perl-module-warnings"
+RDEPENDS_perl-module-test-more += "perl-module-file-temp"
+RDEPENDS_perl-module-test-more += "perl-module-strict"
+RDEPENDS_perl-module-test-more += "perl-module-test-builder-module"
+RDEPENDS_perl-module-test-more += "perl-module-warnings"
+RDEPENDS_perl-module-test += "perl-module-exporter"
+RDEPENDS_perl-module-test += "perl-module-file-temp"
+RDEPENDS_perl-module-test += "perl-module-strict"
+RDEPENDS_perl-module-test-simple += "perl-module-strict"
+RDEPENDS_perl-module-test-simple += "perl-module-test-builder-module"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-config"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-strict"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-test-builder"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-threads-shared"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-vars"
+RDEPENDS_perl-module-test-tester-capturerunner += "perl-module-exporter"
+RDEPENDS_perl-module-test-tester-capturerunner += "perl-module-strict"
+RDEPENDS_perl-module-test-tester-capturerunner += "perl-module-test-tester-capture"
+RDEPENDS_perl-module-test-tester-delegate += "perl-module-strict"
+RDEPENDS_perl-module-test-tester-delegate += "perl-module-vars"
+RDEPENDS_perl-module-test-tester-delegate += "perl-module-warnings"
+RDEPENDS_perl-module-test-tester += "perl-module-exporter"
+RDEPENDS_perl-module-test-tester += "perl-module-strict"
+RDEPENDS_perl-module-test-tester += "perl-module-test-builder"
+RDEPENDS_perl-module-test-tester += "perl-module-test-tester-capturerunner"
+RDEPENDS_perl-module-test-tester += "perl-module-test-tester-delegate"
+RDEPENDS_perl-module-test-tester += "perl-module-vars"
+RDEPENDS_perl-module-test2-api += "perl-module-carp"
+RDEPENDS_perl-module-test2-api += "perl-module-exporter"
+RDEPENDS_perl-module-test2-api += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-api += "perl-module-strict"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-api-context"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-api-instance"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-api-stack"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-bail"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-diag"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-exception"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-fail"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-note"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-ok"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-plan"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-skip"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-subtest"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-waiting"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-eventfacet-trace"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-hub"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-hub-interceptor"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-hub-interceptor-terminator"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-hub-subtest"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-util-trace"
+RDEPENDS_perl-module-test2-api += "perl-module-warnings"
+RDEPENDS_perl-module-test2-api-context += "perl-module-carp"
+RDEPENDS_perl-module-test2-api-context += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-api-context += "perl-module-strict"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-api"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-event-v2"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-eventfacet"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-eventfacet-trace"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-util-externalmeta"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-api-context += "perl-module-warnings"
+RDEPENDS_perl-module-test2-event += "perl-module-carp"
+RDEPENDS_perl-module-test2-event += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-event += "perl-module-strict"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-about"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-amnesty"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-assert"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-control"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-error"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-hub"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-info"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-meta"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-parent"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-plan"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-trace"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-util-externalmeta"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-util-trace"
+RDEPENDS_perl-module-test2-event += "perl-module-warnings"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-carp"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-test2-util-facets2legacy"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-strict"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-warnings"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-carp"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-strict"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-warnings"
+RDEPENDS_perl-module-test2-hub += "perl-module-carp"
+RDEPENDS_perl-module-test2-hub += "perl-module-list-util"
+RDEPENDS_perl-module-test2-hub += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-hub += "perl-module-strict"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-event-ok"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-event-pass"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-event-plan"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-util-externalmeta"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-hub += "perl-module-warnings"
+RDEPENDS_perl-module-test2-util += "perl-module-carp"
+RDEPENDS_perl-module-test2-util += "perl-module-config"
+RDEPENDS_perl-module-test2-util += "perl-module-posix"
+RDEPENDS_perl-module-test2-util += "perl-module-strict"
+RDEPENDS_perl-module-test2-util += "perl-module-warnings"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-base"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-carp"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-exporter"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-strict"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-warnings"
+RDEPENDS_perl-module-test2-util-hashbase += "perl-module-carp"
+RDEPENDS_perl-module-test2-util-hashbase += "perl-module-mro"
+RDEPENDS_perl-module-test2-util-hashbase += "perl-module-strict"
+RDEPENDS_perl-module-test2-util-hashbase += "perl-module-warnings"
+RDEPENDS_perl-module-text-abbrev += "perl-module-exporter"
+RDEPENDS_perl-module-text-balanced += "perl-module-exporter"
+RDEPENDS_perl-module-text-balanced += "perl-module-overload"
+RDEPENDS_perl-module-text-balanced += "perl-module-selfloader"
+RDEPENDS_perl-module-text-balanced += "perl-module-strict"
+RDEPENDS_perl-module-text-balanced += "perl-module-vars"
+RDEPENDS_perl-module-text-parsewords += "perl-module-exporter"
+RDEPENDS_perl-module-text-parsewords += "perl-module-strict"
+RDEPENDS_perl-module-text-tabs += "perl-module-exporter"
+RDEPENDS_perl-module-text-tabs += "perl-module-strict"
+RDEPENDS_perl-module-text-tabs += "perl-module-vars"
+RDEPENDS_perl-module-text-wrap += "perl-module-exporter"
+RDEPENDS_perl-module-text-wrap += "perl-module-re"
+RDEPENDS_perl-module-text-wrap += "perl-module-strict"
+RDEPENDS_perl-module-text-wrap += "perl-module-text-tabs"
+RDEPENDS_perl-module-text-wrap += "perl-module-vars"
+RDEPENDS_perl-module-text-wrap += "perl-module-warnings-register"
+RDEPENDS_perl-module-thread += "perl-module-config"
+RDEPENDS_perl-module-thread += "perl-module-exporter"
+RDEPENDS_perl-module-thread += "perl-module-strict"
+RDEPENDS_perl-module-thread += "perl-module-threads"
+RDEPENDS_perl-module-thread += "perl-module-threads-shared"
+RDEPENDS_perl-module-thread += "perl-module-warnings"
+RDEPENDS_perl-module-thread-queue += "perl-module-strict"
+RDEPENDS_perl-module-thread-queue += "perl-module-threads-shared"
+RDEPENDS_perl-module-thread-queue += "perl-module-warnings"
+RDEPENDS_perl-module-thread-semaphore += "perl-module-strict"
+RDEPENDS_perl-module-thread-semaphore += "perl-module-threads-shared"
+RDEPENDS_perl-module-thread-semaphore += "perl-module-warnings"
+RDEPENDS_perl-module-threads += "perl-module-config"
+RDEPENDS_perl-module-threads += "perl-module-overload"
+RDEPENDS_perl-module-threads += "perl-module-strict"
+RDEPENDS_perl-module-threads += "perl-module-warnings"
+RDEPENDS_perl-module-threads += "perl-module-xsloader"
+RDEPENDS_perl-module-threads-shared += "perl-module-strict"
+RDEPENDS_perl-module-threads-shared += "perl-module-warnings"
+RDEPENDS_perl-module-threads-shared += "perl-module-xsloader"
+RDEPENDS_perl-module-tie-array += "perl-module-strict"
+RDEPENDS_perl-module-tie-file += "perl-module-fcntl"
+RDEPENDS_perl-module-tie-file += "perl-module-posix"
+RDEPENDS_perl-module-tie-file += "perl-module-strict"
+RDEPENDS_perl-module-tie-handle += "perl-module-tie-stdhandle"
+RDEPENDS_perl-module-tie-handle += "perl-module-warnings-register"
+RDEPENDS_perl-module-tie-hash-namedcapture += "perl-module-strict"
+RDEPENDS_perl-module-tie-hash-namedcapture += "perl-module-xsloader"
+RDEPENDS_perl-module-tie-hash += "perl-module-warnings-register"
+RDEPENDS_perl-module-tie-memoize += "perl-module-strict"
+RDEPENDS_perl-module-tie-memoize += "perl-module-tie-hash"
+RDEPENDS_perl-module-tie-refhash += "perl-module-config"
+RDEPENDS_perl-module-tie-refhash += "perl-module-overload"
+RDEPENDS_perl-module-tie-refhash += "perl-module-strict"
+RDEPENDS_perl-module-tie-refhash += "perl-module-tie-hash"
+RDEPENDS_perl-module-tie-refhash += "perl-module-vars"
+RDEPENDS_perl-module-tie-scalar += "perl-module-warnings-register"
+RDEPENDS_perl-module-tie-stdhandle += "perl-module-strict"
+RDEPENDS_perl-module-tie-stdhandle += "perl-module-tie-handle"
+RDEPENDS_perl-module-tie-substrhash += "perl-module-integer"
+RDEPENDS_perl-module-time-gmtime += "perl-module-exporter"
+RDEPENDS_perl-module-time-gmtime += "perl-module-strict"
+RDEPENDS_perl-module-time-gmtime += "perl-module-time-tm"
+RDEPENDS_perl-module-time-hires += "perl-module-exporter"
+RDEPENDS_perl-module-time-hires += "perl-module-strict"
+RDEPENDS_perl-module-time-hires += "perl-module-xsloader"
+RDEPENDS_perl-module-time-local += "perl-module-config"
+RDEPENDS_perl-module-time-local += "perl-module-constant"
+RDEPENDS_perl-module-time-local += "perl-module-exporter"
+RDEPENDS_perl-module-time-local += "perl-module-parent"
+RDEPENDS_perl-module-time-local += "perl-module-strict"
+RDEPENDS_perl-module-time-localtime += "perl-module-exporter"
+RDEPENDS_perl-module-time-localtime += "perl-module-strict"
+RDEPENDS_perl-module-time-localtime += "perl-module-time-tm"
+RDEPENDS_perl-module-time-piece += "perl-module-constant"
+RDEPENDS_perl-module-time-piece += "perl-module-exporter"
+RDEPENDS_perl-module-time-piece += "perl-module-integer"
+RDEPENDS_perl-module-time-piece += "perl-module-overload"
+RDEPENDS_perl-module-time-piece += "perl-module-strict"
+RDEPENDS_perl-module-time-piece += "perl-module-time-local"
+RDEPENDS_perl-module-time-piece += "perl-module-time-seconds"
+RDEPENDS_perl-module-time-piece += "perl-module-xsloader"
+RDEPENDS_perl-module-time-seconds += "perl-module-constant"
+RDEPENDS_perl-module-time-seconds += "perl-module-exporter"
+RDEPENDS_perl-module-time-seconds += "perl-module-overload"
+RDEPENDS_perl-module-time-seconds += "perl-module-strict"
+RDEPENDS_perl-module-time-tm += "perl-module-class-struct"
+RDEPENDS_perl-module-time-tm += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-big5 += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-big5 += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-gb2312 += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-gb2312 += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-jisx0208 += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-jisx0208 += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-korean += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-korean += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-pinyin += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-pinyin += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-stroke += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-stroke += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-zhuyin += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-zhuyin += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-locale += "perl-module-base"
+RDEPENDS_perl-module-unicode-collate-locale += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-locale += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate += "perl-module-constant"
+RDEPENDS_perl-module-unicode-collate += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate += "perl-module-xsloader"
+RDEPENDS_perl-module-unicode-normalize += "perl-module-exporter"
+RDEPENDS_perl-module-unicode-normalize += "perl-module-strict"
+RDEPENDS_perl-module-unicode-normalize += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-normalize += "perl-module-xsloader"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-charnames"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-exporter"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-feature"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-if"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-integer"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-strict"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-unicode-normalize"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-utf8-heavy"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-warnings"
+RDEPENDS_perl-module-user-grent += "perl-module-class-struct"
+RDEPENDS_perl-module-user-grent += "perl-module-exporter"
+RDEPENDS_perl-module-user-grent += "perl-module-strict"
+RDEPENDS_perl-module-user-pwent += "perl-module-class-struct"
+RDEPENDS_perl-module-user-pwent += "perl-module-config"
+RDEPENDS_perl-module-user-pwent += "perl-module-exporter"
+RDEPENDS_perl-module-user-pwent += "perl-module-strict"
+RDEPENDS_perl-module-user-pwent += "perl-module-warnings"
+RDEPENDS_perl-module-utf8 += "perl-module-utf8-heavy"
+RDEPENDS_perl-module-version += "perl-module-strict"
+RDEPENDS_perl-module-version += "perl-module-version-regex"
+RDEPENDS_perl-module-version += "perl-module-warnings-register"
+RDEPENDS_perl-module-version-regex += "perl-module-strict"
+RDEPENDS_perl-module-xsloader += "perl-module-dynaloader"
+RDEPENDS_perl-module-anydbm-file += "perl-module-strict"
+RDEPENDS_perl-module-anydbm-file += "perl-module-warnings"
+RDEPENDS_perl-module-app-cpan += "perl-module-config"
+RDEPENDS_perl-module-app-cpan += "perl-module-constant"
+RDEPENDS_perl-module-app-cpan += "perl-module-cpan"
+RDEPENDS_perl-module-app-cpan += "perl-module-cwd"
+RDEPENDS_perl-module-app-cpan += "perl-module-data-dumper"
+RDEPENDS_perl-module-app-cpan += "perl-module-file-basename"
+RDEPENDS_perl-module-app-cpan += "perl-module-file-find"
+RDEPENDS_perl-module-app-cpan += "perl-module-getopt-std"
+RDEPENDS_perl-module-app-cpan += "perl-module-if"
+RDEPENDS_perl-module-app-cpan += "perl-module-net-ping"
+RDEPENDS_perl-module-app-cpan += "perl-module-strict"
+RDEPENDS_perl-module-app-cpan += "perl-module-user-pwent"
+RDEPENDS_perl-module-app-cpan += "perl-module-vars"
+RDEPENDS_perl-module-app-cpan += "perl-module-warnings"
+RDEPENDS_perl-module-app-prove += "perl-module-app-prove-state"
+RDEPENDS_perl-module-app-prove += "perl-module-base"
+RDEPENDS_perl-module-app-prove += "perl-module-constant"
+RDEPENDS_perl-module-app-prove += "perl-module-getopt-long"
+RDEPENDS_perl-module-app-prove += "perl-module-strict"
+RDEPENDS_perl-module-app-prove += "perl-module-tap-harness"
+RDEPENDS_perl-module-app-prove += "perl-module-tap-harness-env"
+RDEPENDS_perl-module-app-prove += "perl-module-text-parsewords"
+RDEPENDS_perl-module-app-prove += "perl-module-warnings"
+RDEPENDS_perl-module-app-prove-state += "perl-module-app-prove-state-result"
+RDEPENDS_perl-module-app-prove-state += "perl-module-base"
+RDEPENDS_perl-module-app-prove-state += "perl-module-constant"
+RDEPENDS_perl-module-app-prove-state += "perl-module-file-find"
+RDEPENDS_perl-module-app-prove-state += "perl-module-strict"
+RDEPENDS_perl-module-app-prove-state += "perl-module-tap-parser-yamlish-reader"
+RDEPENDS_perl-module-app-prove-state += "perl-module-tap-parser-yamlish-writer"
+RDEPENDS_perl-module-app-prove-state += "perl-module-warnings"
+RDEPENDS_perl-module-app-prove-state-result += "perl-module-app-prove-state-result-test"
+RDEPENDS_perl-module-app-prove-state-result += "perl-module-constant"
+RDEPENDS_perl-module-app-prove-state-result += "perl-module-strict"
+RDEPENDS_perl-module-app-prove-state-result += "perl-module-warnings"
+RDEPENDS_perl-module-app-prove-state-result-test += "perl-module-strict"
+RDEPENDS_perl-module-app-prove-state-result-test += "perl-module-warnings"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-constant"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-exporter"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-io-compress-bzip2"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-strict"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-time-local"
+RDEPENDS_perl-module-archive-tar-constant += "perl-module-warnings"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-archive-tar"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-archive-tar-constant"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-file-basename"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-io-file"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-strict"
+RDEPENDS_perl-module-archive-tar-file += "perl-module-vars"
+RDEPENDS_perl-module-archive-tar += "perl-module-archive-tar-constant"
+RDEPENDS_perl-module-archive-tar += "perl-module-archive-tar-file"
+RDEPENDS_perl-module-archive-tar += "perl-module-config"
+RDEPENDS_perl-module-archive-tar += "perl-module-cwd"
+RDEPENDS_perl-module-archive-tar += "perl-module-exporter"
+RDEPENDS_perl-module-archive-tar += "perl-module-file-path"
+RDEPENDS_perl-module-archive-tar += "perl-module-io-file"
+RDEPENDS_perl-module-archive-tar += "perl-module-io-zlib"
+RDEPENDS_perl-module-archive-tar += "perl-module-strict"
+RDEPENDS_perl-module-archive-tar += "perl-module-vars"
+RDEPENDS_perl-module-arybase += "perl-module-xsloader"
+RDEPENDS_perl-module-attribute-handlers += "perl-module-strict"
+RDEPENDS_perl-module-attribute-handlers += "perl-module-warnings"
+RDEPENDS_perl-module-attributes += "perl-module-exporter"
+RDEPENDS_perl-module-attributes += "perl-module-strict"
+RDEPENDS_perl-module-attributes += "perl-module-warnings"
+RDEPENDS_perl-module-attributes += "perl-module-xsloader"
+RDEPENDS_perl-module-autodie-exception += "perl-module-constant"
+RDEPENDS_perl-module-autodie-exception += "perl-module-fatal"
+RDEPENDS_perl-module-autodie-exception += "perl-module-fcntl"
+RDEPENDS_perl-module-autodie-exception += "perl-module-overload"
+RDEPENDS_perl-module-autodie-exception += "perl-module-strict"
+RDEPENDS_perl-module-autodie-exception += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-exception-system += "perl-module-parent"
+RDEPENDS_perl-module-autodie-exception-system += "perl-module-strict"
+RDEPENDS_perl-module-autodie-exception-system += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-hints += "perl-module-b"
+RDEPENDS_perl-module-autodie-hints += "perl-module-constant"
+RDEPENDS_perl-module-autodie-hints += "perl-module-strict"
+RDEPENDS_perl-module-autodie-hints += "perl-module-warnings"
+RDEPENDS_perl-module-autodie += "perl-module-constant"
+RDEPENDS_perl-module-autodie += "perl-module-lib"
+RDEPENDS_perl-module-autodie += "perl-module-parent"
+RDEPENDS_perl-module-autodie += "perl-module-strict"
+RDEPENDS_perl-module-autodie += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-scope-guard += "perl-module-strict"
+RDEPENDS_perl-module-autodie-scope-guard += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-scope-guardstack += "perl-module-autodie-scope-guard"
+RDEPENDS_perl-module-autodie-scope-guardstack += "perl-module-strict"
+RDEPENDS_perl-module-autodie-scope-guardstack += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-skip += "perl-module-strict"
+RDEPENDS_perl-module-autodie-skip += "perl-module-warnings"
+RDEPENDS_perl-module-autodie-util += "perl-module-autodie-scope-guardstack"
+RDEPENDS_perl-module-autodie-util += "perl-module-exporter"
+RDEPENDS_perl-module-autodie-util += "perl-module-strict"
+RDEPENDS_perl-module-autodie-util += "perl-module-warnings"
+RDEPENDS_perl-module-autoloader += "perl-module-strict"
+RDEPENDS_perl-module-autosplit += "perl-module-config"
+RDEPENDS_perl-module-autosplit += "perl-module-exporter"
+RDEPENDS_perl-module-autosplit += "perl-module-file-basename"
+RDEPENDS_perl-module-autosplit += "perl-module-file-path"
+RDEPENDS_perl-module-autosplit += "perl-module-strict"
+RDEPENDS_perl-module-base += "perl-module-strict"
+RDEPENDS_perl-module-b-concise += "perl-module-b"
+RDEPENDS_perl-module-b-concise += "perl-module-b-op-private"
+RDEPENDS_perl-module-b-concise += "perl-module-config"
+RDEPENDS_perl-module-b-concise += "perl-module-exporter"
+RDEPENDS_perl-module-b-concise += "perl-module-feature"
+RDEPENDS_perl-module-b-concise += "perl-module-strict"
+RDEPENDS_perl-module-b-concise += "perl-module-warnings"
+RDEPENDS_perl-module-b-debug += "perl-module-b"
+RDEPENDS_perl-module-b-debug += "perl-module-config"
+RDEPENDS_perl-module-b-debug += "perl-module-strict"
+RDEPENDS_perl-module-benchmark += "perl-module-exporter"
+RDEPENDS_perl-module-benchmark += "perl-module-strict"
+RDEPENDS_perl-module-bigint += "perl-module-constant"
+RDEPENDS_perl-module-bigint += "perl-module-exporter"
+RDEPENDS_perl-module-bigint += "perl-module-math-bigint"
+RDEPENDS_perl-module-bigint += "perl-module-math-bigint-trace"
+RDEPENDS_perl-module-bigint += "perl-module-overload"
+RDEPENDS_perl-module-bigint += "perl-module-strict"
+RDEPENDS_perl-module-bigint += "perl-module-warnings"
+RDEPENDS_perl-module-bignum += "perl-module-bigint"
+RDEPENDS_perl-module-bignum += "perl-module-exporter"
+RDEPENDS_perl-module-bignum += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-bignum += "perl-module-math-bigfloat-trace"
+RDEPENDS_perl-module-bignum += "perl-module-math-bigint"
+RDEPENDS_perl-module-bignum += "perl-module-math-bigint-trace"
+RDEPENDS_perl-module-bignum += "perl-module-overload"
+RDEPENDS_perl-module-bignum += "perl-module-strict"
+RDEPENDS_perl-module-bignum += "perl-module-warnings"
+RDEPENDS_perl-module-bigrat += "perl-module-bigint"
+RDEPENDS_perl-module-bigrat += "perl-module-exporter"
+RDEPENDS_perl-module-bigrat += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-bigrat += "perl-module-math-bigint"
+RDEPENDS_perl-module-bigrat += "perl-module-math-bigint-trace"
+RDEPENDS_perl-module-bigrat += "perl-module-math-bigrat"
+RDEPENDS_perl-module-bigrat += "perl-module-overload"
+RDEPENDS_perl-module-bigrat += "perl-module-strict"
+RDEPENDS_perl-module-bigrat += "perl-module-warnings"
+RDEPENDS_perl-module-blib += "perl-module-cwd"
+RDEPENDS_perl-module-b += "perl-module-exporter"
+RDEPENDS_perl-module-b += "perl-module-xsloader"
+RDEPENDS_perl-module-b-showlex += "perl-module-b"
+RDEPENDS_perl-module-b-showlex += "perl-module-b-concise"
+RDEPENDS_perl-module-b-showlex += "perl-module-b-terse"
+RDEPENDS_perl-module-b-showlex += "perl-module-strict"
+RDEPENDS_perl-module-b-terse += "perl-module-b"
+RDEPENDS_perl-module-b-terse += "perl-module-b-concise"
+RDEPENDS_perl-module-b-terse += "perl-module-strict"
+RDEPENDS_perl-module-b-xref += "perl-module-b"
+RDEPENDS_perl-module-b-xref += "perl-module-config"
+RDEPENDS_perl-module-b-xref += "perl-module-strict"
+RDEPENDS_perl-module-bytes += "perl-module-bytes-heavy"
+RDEPENDS_perl-module--charnames += "perl-module-bytes"
+RDEPENDS_perl-module-charnames += "perl-module-bytes"
+RDEPENDS_perl-module-charnames += "perl-module--charnames"
+RDEPENDS_perl-module--charnames += "perl-module-re"
+RDEPENDS_perl-module-charnames += "perl-module-re"
+RDEPENDS_perl-module--charnames += "perl-module-strict"
+RDEPENDS_perl-module-charnames += "perl-module-strict"
+RDEPENDS_perl-module--charnames += "perl-module-warnings"
+RDEPENDS_perl-module-charnames += "perl-module-warnings"
+RDEPENDS_perl-module-class-struct += "perl-module-exporter"
+RDEPENDS_perl-module-class-struct += "perl-module-strict"
+RDEPENDS_perl-module-class-struct += "perl-module-warnings-register"
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-bytes "
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-constant"
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-dynaloader"
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-exporter"
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-strict "
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-warnings "
+RDEPENDS_perl-module-compress-raw-bzip2 += "perl-module-xsloader"
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-bytes "
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-constant"
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-dynaloader"
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-exporter"
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-strict "
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-warnings "
+RDEPENDS_perl-module-compress-raw-zlib += "perl-module-xsloader"
+RDEPENDS_perl-module-compress-zlib += "perl-module-bytes "
+RDEPENDS_perl-module-compress-zlib += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-compress-zlib += "perl-module-constant"
+RDEPENDS_perl-module-compress-zlib += "perl-module-exporter"
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-compress-gzip"
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-compress-gzip-constants"
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-handle "
+RDEPENDS_perl-module-compress-zlib += "perl-module-io-uncompress-gunzip"
+RDEPENDS_perl-module-compress-zlib += "perl-module-strict "
+RDEPENDS_perl-module-compress-zlib += "perl-module-warnings "
+RDEPENDS_perl-module-config-extensions += "perl-module-config"
+RDEPENDS_perl-module-config-extensions += "perl-module-exporter"
+RDEPENDS_perl-module-config-extensions += "perl-module-strict"
+RDEPENDS_perl-module-config += "perl-module-strict"
+RDEPENDS_perl-module-config += "perl-module-warnings"
+RDEPENDS_perl-module-config-perl-v += "perl-module-config"
+RDEPENDS_perl-module-config-perl-v += "perl-module-exporter"
+RDEPENDS_perl-module-config-perl-v += "perl-module-strict"
+RDEPENDS_perl-module-config-perl-v += "perl-module-vars"
+RDEPENDS_perl-module-config-perl-v += "perl-module-warnings"
+RDEPENDS_perl-module-constant += "perl-module-strict"
+RDEPENDS_perl-module-constant += "perl-module-warnings-register"
+RDEPENDS_perl-module-corelist += "perl-module-list-util"
+RDEPENDS_perl-module-corelist += "perl-module-corelist"
+RDEPENDS_perl-module-corelist += "perl-module-strict"
+RDEPENDS_perl-module-corelist += "perl-module-version"
+RDEPENDS_perl-module-corelist += "perl-module-warnings"
+RDEPENDS_perl-module-cpan += "perl-module-b"
+RDEPENDS_perl-module-cpan += "perl-module-config"
+RDEPENDS_perl-module-cpan += "perl-module-cwd"
+RDEPENDS_perl-module-cpan += "perl-module-data-dumper"
+RDEPENDS_perl-module-cpan += "perl-module-dirhandle"
+RDEPENDS_perl-module-cpan += "perl-module-errno"
+RDEPENDS_perl-module-cpan += "perl-module-exporter"
+RDEPENDS_perl-module-cpan += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-cpan += "perl-module-extutils-manifest"
+RDEPENDS_perl-module-cpan += "perl-module-fcntl"
+RDEPENDS_perl-module-cpan += "perl-module-file-basename"
+RDEPENDS_perl-module-cpan += "perl-module-file-copy"
+RDEPENDS_perl-module-cpan += "perl-module-file-find"
+RDEPENDS_perl-module-cpan += "perl-module-filehandle"
+RDEPENDS_perl-module-cpan += "perl-module-file-path"
+RDEPENDS_perl-module-cpan += "perl-module-json-pp"
+RDEPENDS_perl-module-cpan += "perl-module-lib"
+RDEPENDS_perl-module-cpan += "perl-module-net-ping"
+RDEPENDS_perl-module-cpan += "perl-module-overload"
+RDEPENDS_perl-module-cpan += "perl-module-parse-cpan-meta"
+RDEPENDS_perl-module-cpan += "perl-module-posix"
+RDEPENDS_perl-module-cpan += "perl-module-safe"
+RDEPENDS_perl-module-cpan += "perl-module-strict"
+RDEPENDS_perl-module-cpan += "perl-module-sys-hostname"
+RDEPENDS_perl-module-cpan += "perl-module-term-readline"
+RDEPENDS_perl-module-cpan += "perl-module-text-parsewords"
+RDEPENDS_perl-module-cpan += "perl-module-text-wrap"
+RDEPENDS_perl-module-cpan += "perl-module-time-local"
+RDEPENDS_perl-module-cpan += "perl-module-vars"
+RDEPENDS_perl-module-cpan += "perl-module-warnings"
+RDEPENDS_perl-module-cwd += "perl-module-errno"
+RDEPENDS_perl-module-cwd += "perl-module-exporter"
+RDEPENDS_perl-module-cwd += "perl-module-strict"
+RDEPENDS_perl-module-cwd += "perl-module-xsloader"
+RDEPENDS_perl-module-data-dumper += "perl-module-config"
+RDEPENDS_perl-module-data-dumper += "perl-module-constant"
+RDEPENDS_perl-module-data-dumper += "perl-module-exporter"
+RDEPENDS_perl-module-data-dumper += "perl-module-xsloader"
+RDEPENDS_perl-module-dbm-filter-compress += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-compress += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter-encode += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-encode += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter-int32 += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-int32 += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter-null += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-null += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter += "perl-module-warnings"
+RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-strict"
+RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-warnings"
+RDEPENDS_perl-module-db += "perl-module-strict"
+RDEPENDS_perl-module-deprecate += "perl-module-strict"
+RDEPENDS_perl-module-deprecate += "perl-module-warnings"
+RDEPENDS_perl-module-devel-peek += "perl-module-exporter"
+RDEPENDS_perl-module-devel-peek += "perl-module-xsloader"
+RDEPENDS_perl-module-devel-ppport += "perl-module-file-find"
+RDEPENDS_perl-module-devel-ppport += "perl-module-getopt-long"
+RDEPENDS_perl-module-devel-ppport += "perl-module-strict"
+RDEPENDS_perl-module-devel-ppport += "perl-module-vars"
+RDEPENDS_perl-module-devel-selfstubber += "perl-module-selfloader"
+RDEPENDS_perl-module-diagnostics += "perl-module-config"
+RDEPENDS_perl-module-diagnostics += "perl-module-getopt-std"
+RDEPENDS_perl-module-diagnostics += "perl-module-strict"
+RDEPENDS_perl-module-diagnostics += "perl-module-text-tabs"
+RDEPENDS_perl-module-digest-base += "perl-module-mime-base64"
+RDEPENDS_perl-module-digest-base += "perl-module-strict"
+RDEPENDS_perl-module-digest-base += "perl-module-vars"
+RDEPENDS_perl-module-digest-file += "perl-module-digest"
+RDEPENDS_perl-module-digest-file += "perl-module-exporter"
+RDEPENDS_perl-module-digest-file += "perl-module-strict"
+RDEPENDS_perl-module-digest-file += "perl-module-vars"
+RDEPENDS_perl-module-digest-md5 += "perl-module-digest-base"
+RDEPENDS_perl-module-digest-md5 += "perl-module-exporter"
+RDEPENDS_perl-module-digest-md5 += "perl-module-strict"
+RDEPENDS_perl-module-digest-md5 += "perl-module-vars"
+RDEPENDS_perl-module-digest-md5 += "perl-module-xsloader"
+RDEPENDS_perl-module-digest += "perl-module-strict"
+RDEPENDS_perl-module-digest += "perl-module-vars"
+RDEPENDS_perl-module-digest-sha += "perl-module-digest-base"
+RDEPENDS_perl-module-digest-sha += "perl-module-dynaloader"
+RDEPENDS_perl-module-digest-sha += "perl-module-exporter"
+RDEPENDS_perl-module-digest-sha += "perl-module-fcntl"
+RDEPENDS_perl-module-digest-sha += "perl-module-integer"
+RDEPENDS_perl-module-digest-sha += "perl-module-strict"
+RDEPENDS_perl-module-digest-sha += "perl-module-vars"
+RDEPENDS_perl-module-digest-sha += "perl-module-warnings"
+RDEPENDS_perl-module-digest-sha += "perl-module-xsloader"
+RDEPENDS_perl-module-dynaloader += "perl-module-config"
+RDEPENDS_perl-module-encode-alias += "perl-module-constant"
+RDEPENDS_perl-module-encode-alias += "perl-module-encode"
+RDEPENDS_perl-module-encode-alias += "perl-module-exporter"
+RDEPENDS_perl-module-encode-alias += "perl-module-strict"
+RDEPENDS_perl-module-encode-alias += "perl-module-warnings"
+RDEPENDS_perl-module-encode-byte += "perl-module-encode"
+RDEPENDS_perl-module-encode-byte += "perl-module-strict"
+RDEPENDS_perl-module-encode-byte += "perl-module-warnings"
+RDEPENDS_perl-module-encode-byte += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-exporter"
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-strict"
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-warnings"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-encode"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-parent"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-strict"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-utf8"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-vars"
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-warnings"
+RDEPENDS_perl-module-encode-cn += "perl-module-encode"
+RDEPENDS_perl-module-encode-cn += "perl-module-encode-cn-hz"
+RDEPENDS_perl-module-encode-cn += "perl-module-strict"
+RDEPENDS_perl-module-encode-cn += "perl-module-warnings"
+RDEPENDS_perl-module-encode-cn += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-config += "perl-module-strict"
+RDEPENDS_perl-module-encode-config += "perl-module-warnings"
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-encode"
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-strict"
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-warnings"
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-encoder += "perl-module-constant"
+RDEPENDS_perl-module-encode-encoder += "perl-module-encode"
+RDEPENDS_perl-module-encode-encoder += "perl-module-exporter"
+RDEPENDS_perl-module-encode-encoder += "perl-module-overload"
+RDEPENDS_perl-module-encode-encoder += "perl-module-strict"
+RDEPENDS_perl-module-encode-encoder += "perl-module-warnings"
+RDEPENDS_perl-module-encode-encoding += "perl-module-constant"
+RDEPENDS_perl-module-encode-encoding += "perl-module-encode"
+RDEPENDS_perl-module-encode-encoding += "perl-module-encode-mime-name"
+RDEPENDS_perl-module-encode-encoding += "perl-module-strict"
+RDEPENDS_perl-module-encode-encoding += "perl-module-warnings"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-encode"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-parent"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-strict"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-utf8"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-vars"
+RDEPENDS_perl-module-encode-gsm0338 += "perl-module-warnings"
+RDEPENDS_perl-module-encode-guess += "perl-module-bytes"
+RDEPENDS_perl-module-encode-guess += "perl-module-constant"
+RDEPENDS_perl-module-encode-guess += "perl-module-encode"
+RDEPENDS_perl-module-encode-guess += "perl-module-encode-unicode"
+RDEPENDS_perl-module-encode-guess += "perl-module-parent"
+RDEPENDS_perl-module-encode-guess += "perl-module-strict"
+RDEPENDS_perl-module-encode-guess += "perl-module-warnings"
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-encode-cjkconstants"
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-strict"
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-vars"
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-warnings"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-bytes"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode-cjkconstants"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode-jp-h2z"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-parent"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-strict"
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-warnings"
+RDEPENDS_perl-module-encode-jp += "perl-module-encode"
+RDEPENDS_perl-module-encode-jp += "perl-module-encode-jp-jis7"
+RDEPENDS_perl-module-encode-jp += "perl-module-strict"
+RDEPENDS_perl-module-encode-jp += "perl-module-warnings"
+RDEPENDS_perl-module-encode-jp += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-encode"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-encode-cjkconstants"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-parent"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-strict"
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-warnings"
+RDEPENDS_perl-module-encode-kr += "perl-module-encode"
+RDEPENDS_perl-module-encode-kr += "perl-module-encode-kr-2022-kr"
+RDEPENDS_perl-module-encode-kr += "perl-module-strict"
+RDEPENDS_perl-module-encode-kr += "perl-module-warnings"
+RDEPENDS_perl-module-encode-kr += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-constant"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-encode-cjkconstants"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-parent"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-strict"
+RDEPENDS_perl-module-encode-mime-header-iso-2022-jp += "perl-module-warnings"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-encode"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-mime-base64"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-parent"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-strict"
+RDEPENDS_perl-module-encode-mime-header += "perl-module-warnings"
+RDEPENDS_perl-module-encode-mime-name += "perl-module-strict"
+RDEPENDS_perl-module-encode-mime-name += "perl-module-warnings"
+RDEPENDS_perl-module-encode += "perl-module-bytes"
+RDEPENDS_perl-module-encode += "perl-module-constant"
+RDEPENDS_perl-module-encode += "perl-module-encode-alias"
+RDEPENDS_perl-module-encode += "perl-module-encode-config"
+RDEPENDS_perl-module-encode += "perl-module-encode-configlocal-pm"
+RDEPENDS_perl-module-encode += "perl-module-encode-encoding"
+RDEPENDS_perl-module-encode += "perl-module-encode-mime-name"
+RDEPENDS_perl-module-encode += "perl-module-exporter"
+RDEPENDS_perl-module-encode += "perl-module-parent"
+RDEPENDS_perl-module-encode += "perl-module-storable"
+RDEPENDS_perl-module-encode += "perl-module-strict"
+RDEPENDS_perl-module-encode += "perl-module-warnings"
+RDEPENDS_perl-module-encode += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-symbol += "perl-module-encode"
+RDEPENDS_perl-module-encode-symbol += "perl-module-strict"
+RDEPENDS_perl-module-encode-symbol += "perl-module-warnings"
+RDEPENDS_perl-module-encode-symbol += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-tw += "perl-module-encode"
+RDEPENDS_perl-module-encode-tw += "perl-module-strict"
+RDEPENDS_perl-module-encode-tw += "perl-module-warnings"
+RDEPENDS_perl-module-encode-tw += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-unicode += "perl-module-encode"
+RDEPENDS_perl-module-encode-unicode += "perl-module-parent"
+RDEPENDS_perl-module-encode-unicode += "perl-module-strict"
+RDEPENDS_perl-module-encode-unicode += "perl-module-warnings"
+RDEPENDS_perl-module-encode-unicode += "perl-module-xsloader"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-encode"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-mime-base64"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-parent"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-re"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-strict"
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-warnings"
+RDEPENDS_perl-module-encoding += "perl-module-config"
+RDEPENDS_perl-module-encoding += "perl-module-constant"
+RDEPENDS_perl-module-encoding += "perl-module-encode"
+RDEPENDS_perl-module-encoding += "perl-module-filter-util-call"
+RDEPENDS_perl-module-encoding += "perl-module-i18n-langinfo"
+RDEPENDS_perl-module-encoding += "perl-module-posix"
+RDEPENDS_perl-module-encoding += "perl-module-strict"
+RDEPENDS_perl-module-encoding += "perl-module-utf8"
+RDEPENDS_perl-module-encoding += "perl-module-warnings"
+RDEPENDS_perl-module-encoding-warnings += "perl-module-strict"
+RDEPENDS_perl-module-encoding-warnings += "perl-module-warnings"
+RDEPENDS_perl-module-english += "perl-module-exporter"
+RDEPENDS_perl-module-env += "perl-module-config"
+RDEPENDS_perl-module-env += "perl-module-tie-array"
+RDEPENDS_perl-module-errno += "perl-module-exporter"
+RDEPENDS_perl-module-errno += "perl-module-strict"
+RDEPENDS_perl-module-experimental += "perl-module-strict"
+RDEPENDS_perl-module-experimental += "perl-module-version"
+RDEPENDS_perl-module-experimental += "perl-module-warnings"
+RDEPENDS_perl-module-exporter-heavy += "perl-module-exporter"
+RDEPENDS_perl-module-exporter-heavy += "perl-module-strict"
+RDEPENDS_perl-module-exporter += "perl-module-exporter-heavy"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-config"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-dynaloader"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-extutils-mksymlists"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-file-temp"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-ipc-cmd"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-text-parsewords"
+RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-aix += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-aix += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-aix += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-android += "perl-module-config"
+RDEPENDS_perl-module-extutils-cbuilder-platform-android += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-android += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-android += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-cygwin += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-cygwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-cygwin += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-darwin += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-darwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-darwin += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-dec-osf += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-dec-osf += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-dec-osf += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-os2 += "perl-module-extutils-cbuilder-platform-unix"
+RDEPENDS_perl-module-extutils-cbuilder-platform-os2 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-os2 += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-unix += "perl-module-extutils-cbuilder-base"
+RDEPENDS_perl-module-extutils-cbuilder-platform-unix += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-unix += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-vms += "perl-module-config"
+RDEPENDS_perl-module-extutils-cbuilder-platform-vms += "perl-module-extutils-cbuilder-base"
+RDEPENDS_perl-module-extutils-cbuilder-platform-vms += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-vms += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-bcc += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-bcc += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-gcc += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-gcc += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-msvc += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows-msvc += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-extutils-cbuilder-base"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-io-file"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-strict"
+RDEPENDS_perl-module-extutils-cbuilder-platform-windows += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-extutils-command"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-extutils-install"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-getopt-long"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-strict"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-test-harness"
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-command += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-command += "perl-module-file-copy"
+RDEPENDS_perl-module-extutils-command += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-command += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-command += "perl-module-strict"
+RDEPENDS_perl-module-extutils-command += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-constant"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-extutils-constant-utils"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-text-wrap"
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-proxysubs"
+RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-utils"
+RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-xs"
+RDEPENDS_perl-module-extutils-constant += "perl-module-filehandle"
+RDEPENDS_perl-module-extutils-constant += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant-proxysubs += "perl-module-extutils-constant-utils"
+RDEPENDS_perl-module-extutils-constant-proxysubs += "perl-module-extutils-constant-xs"
+RDEPENDS_perl-module-extutils-constant-proxysubs += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant-proxysubs += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-constant"
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-posix"
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-vars"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-data-dumper"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant-base"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant-utils"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-strict"
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-vars"
+RDEPENDS_perl-module-extutils-embed += "perl-module-config"
+RDEPENDS_perl-module-extutils-embed += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-embed += "perl-module-extutils-liblist"
+RDEPENDS_perl-module-extutils-embed += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-embed += "perl-module-getopt-std"
+RDEPENDS_perl-module-extutils-embed += "perl-module-strict"
+RDEPENDS_perl-module-extutils-installed += "perl-module-config"
+RDEPENDS_perl-module-extutils-installed += "perl-module-data-dumper"
+RDEPENDS_perl-module-extutils-installed += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-installed += "perl-module-extutils-packlist"
+RDEPENDS_perl-module-extutils-installed += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-installed += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-installed += "perl-module-strict"
+RDEPENDS_perl-module-extutils-installed += "perl-module-vars"
+RDEPENDS_perl-module-extutils-install += "perl-module-autosplit"
+RDEPENDS_perl-module-extutils-install += "perl-module-config"
+RDEPENDS_perl-module-extutils-install += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-install += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-install += "perl-module-extutils-packlist"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-compare"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-copy"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-install += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-install += "perl-module-strict"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-strict"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-text-parsewords"
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-liblist += "perl-module-extutils-liblist-kid"
+RDEPENDS_perl-module-extutils-liblist += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker-config += "perl-module-config"
+RDEPENDS_perl-module-extutils-makemaker-config += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-base"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-encode"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-encode-alias"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-i18n-langinfo"
+RDEPENDS_perl-module-extutils-makemaker-locale += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-b"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-cpan"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-makemaker-version"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-manifest"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-mm"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-my"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-version"
+RDEPENDS_perl-module-extutils-makemaker-version += "perl-module-strict"
+RDEPENDS_perl-module-extutils-makemaker-version += "perl-module-vars"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-config"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-copy"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-path"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-strict"
+RDEPENDS_perl-module-extutils-manifest += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-miniperl += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-miniperl += "perl-module-extutils-embed"
+RDEPENDS_perl-module-extutils-miniperl += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-config"
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-dynaloader"
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-config"
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-aix += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-aix += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-aix += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-autosplit"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-cpan"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-data-dumper"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-version"
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-mm-win32"
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-darwin += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-darwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-mm-win32"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-liblist"
+RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-qnx += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-qnx += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-encode"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-liblist"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-vars"
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-version"
+RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-liblist-kid"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-file-find"
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-vos += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-vos += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-mm-any"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-mm-unix"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-extutils-makemaker-config"
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-extutils-mm-win32"
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-strict"
+RDEPENDS_perl-module-extutils-my += "perl-module-extutils-mm"
+RDEPENDS_perl-module-extutils-my += "perl-module-strict"
+RDEPENDS_perl-module-extutils-packlist += "perl-module-config"
+RDEPENDS_perl-module-extutils-packlist += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-packlist += "perl-module-strict"
+RDEPENDS_perl-module-extutils-packlist += "perl-module-vars"
+RDEPENDS_perl-module-extutils-parsexs-constants += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-constants += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-parsexs-countlines += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-eval += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-eval += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-config"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-extutils-parsexs-constants"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-extutils-parsexs-countlines"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-extutils-parsexs-eval"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-extutils-parsexs-utilities"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-file-basename"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-re"
+RDEPENDS_perl-module-extutils-parsexs += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-extutils-parsexs-constants"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-extutils-typemaps"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-strict"
+RDEPENDS_perl-module-extutils-parsexs-utilities += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-testlib += "perl-module-cwd"
+RDEPENDS_perl-module-extutils-testlib += "perl-module-lib"
+RDEPENDS_perl-module-extutils-testlib += "perl-module-strict"
+RDEPENDS_perl-module-extutils-testlib += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps-cmd += "perl-module-exporter"
+RDEPENDS_perl-module-extutils-typemaps-cmd += "perl-module-extutils-typemaps"
+RDEPENDS_perl-module-extutils-typemaps-cmd += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps-cmd += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps-inputmap += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps-inputmap += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps-outputmap += "perl-module-re"
+RDEPENDS_perl-module-extutils-typemaps-outputmap += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps-outputmap += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-parsexs"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-parsexs-constants"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-typemaps-inputmap"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-typemaps-outputmap"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-extutils-typemaps-type"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-typemaps-type += "perl-module-extutils-typemaps"
+RDEPENDS_perl-module-extutils-typemaps-type += "perl-module-strict"
+RDEPENDS_perl-module-extutils-typemaps-type += "perl-module-warnings"
+RDEPENDS_perl-module-fatal += "perl-module-autodie"
+RDEPENDS_perl-module-fatal += "perl-module-autodie-exception-system"
+RDEPENDS_perl-module-fatal += "perl-module-autodie-hints"
+RDEPENDS_perl-module-fatal += "perl-module-autodie-util"
+RDEPENDS_perl-module-fatal += "perl-module-config"
+RDEPENDS_perl-module-fatal += "perl-module-constant"
+RDEPENDS_perl-module-fatal += "perl-module-fcntl"
+RDEPENDS_perl-module-fatal += "perl-module-posix"
+RDEPENDS_perl-module-fatal += "perl-module-strict"
+RDEPENDS_perl-module-fatal += "perl-module-tie-refhash"
+RDEPENDS_perl-module-fatal += "perl-module-warnings"
+RDEPENDS_perl-module-fcntl += "perl-module-exporter"
+RDEPENDS_perl-module-fcntl += "perl-module-strict"
+RDEPENDS_perl-module-fcntl += "perl-module-xsloader"
+RDEPENDS_perl-module-fields += "perl-module-base"
+RDEPENDS_perl-module-fields += "perl-module-hash-util"
+RDEPENDS_perl-module-fields += "perl-module-strict"
+RDEPENDS_perl-module-file-basename += "perl-module-exporter"
+RDEPENDS_perl-module-file-basename += "perl-module-re"
+RDEPENDS_perl-module-file-basename += "perl-module-strict"
+RDEPENDS_perl-module-file-basename += "perl-module-warnings"
+RDEPENDS_perl-module-filecache += "perl-module-parent"
+RDEPENDS_perl-module-filecache += "perl-module-strict"
+RDEPENDS_perl-module-file-compare += "perl-module-exporter"
+RDEPENDS_perl-module-file-compare += "perl-module-strict"
+RDEPENDS_perl-module-file-compare += "perl-module-warnings"
+RDEPENDS_perl-module-file-copy += "perl-module-config"
+RDEPENDS_perl-module-file-copy += "perl-module-exporter"
+RDEPENDS_perl-module-file-copy += "perl-module-file-basename"
+RDEPENDS_perl-module-file-copy += "perl-module-strict"
+RDEPENDS_perl-module-file-copy += "perl-module-warnings"
+RDEPENDS_perl-module-file-dosglob += "perl-module-strict"
+RDEPENDS_perl-module-file-dosglob += "perl-module-text-parsewords"
+RDEPENDS_perl-module-file-dosglob += "perl-module-warnings"
+RDEPENDS_perl-module-file-dosglob += "perl-module-xsloader"
+RDEPENDS_perl-module-file-fetch += "perl-module-constant"
+RDEPENDS_perl-module-file-fetch += "perl-module-cwd"
+RDEPENDS_perl-module-file-fetch += "perl-module-file-basename"
+RDEPENDS_perl-module-file-fetch += "perl-module-file-copy"
+RDEPENDS_perl-module-file-fetch += "perl-module-filehandle"
+RDEPENDS_perl-module-file-fetch += "perl-module-file-path"
+RDEPENDS_perl-module-file-fetch += "perl-module-file-temp"
+RDEPENDS_perl-module-file-fetch += "perl-module-ipc-cmd"
+RDEPENDS_perl-module-file-fetch += "perl-module-locale-maketext-simple"
+RDEPENDS_perl-module-file-fetch += "perl-module-load"
+RDEPENDS_perl-module-file-fetch += "perl-module-params-check"
+RDEPENDS_perl-module-file-fetch += "perl-module-strict"
+RDEPENDS_perl-module-file-fetch += "perl-module-vars"
+RDEPENDS_perl-module-file-find += "perl-module-config"
+RDEPENDS_perl-module-file-find += "perl-module-cwd"
+RDEPENDS_perl-module-file-find += "perl-module-exporter"
+RDEPENDS_perl-module-file-find += "perl-module-file-basename"
+RDEPENDS_perl-module-file-find += "perl-module-strict"
+RDEPENDS_perl-module-file-find += "perl-module-warnings"
+RDEPENDS_perl-module-file-find += "perl-module-warnings-register"
+RDEPENDS_perl-module-file-globmapper += "perl-module-file-glob"
+RDEPENDS_perl-module-file-globmapper += "perl-module-strict"
+RDEPENDS_perl-module-file-globmapper += "perl-module-warnings"
+RDEPENDS_perl-module-file-glob += "perl-module-exporter"
+RDEPENDS_perl-module-file-glob += "perl-module-strict"
+RDEPENDS_perl-module-file-glob += "perl-module-warnings"
+RDEPENDS_perl-module-file-glob += "perl-module-xsloader"
+RDEPENDS_perl-module-filehandle += "perl-module-exporter"
+RDEPENDS_perl-module-filehandle += "perl-module-fcntl"
+RDEPENDS_perl-module-filehandle += "perl-module-io-file"
+RDEPENDS_perl-module-filehandle += "perl-module-strict"
+RDEPENDS_perl-module-file-path += "perl-module-cwd"
+RDEPENDS_perl-module-file-path += "perl-module-exporter"
+RDEPENDS_perl-module-file-path += "perl-module-file-basename"
+RDEPENDS_perl-module-file-path += "perl-module-strict"
+RDEPENDS_perl-module-file-path += "perl-module-vars"
+RDEPENDS_perl-module-file-stat += "perl-module-class-struct"
+RDEPENDS_perl-module-file-stat += "perl-module-constant"
+RDEPENDS_perl-module-file-stat += "perl-module-exporter"
+RDEPENDS_perl-module-file-stat += "perl-module-fcntl"
+RDEPENDS_perl-module-file-stat += "perl-module-overload "
+RDEPENDS_perl-module-file-stat += "perl-module-strict"
+RDEPENDS_perl-module-file-stat += "perl-module-warnings"
+RDEPENDS_perl-module-file-stat += "perl-module-warnings-register"
+RDEPENDS_perl-module-file-temp += "perl-module-constant"
+RDEPENDS_perl-module-file-temp += "perl-module-cwd"
+RDEPENDS_perl-module-file-temp += "perl-module-errno"
+RDEPENDS_perl-module-file-temp += "perl-module-exporter"
+RDEPENDS_perl-module-file-temp += "perl-module-fcntl"
+RDEPENDS_perl-module-file-temp += "perl-module-file-path"
+RDEPENDS_perl-module-file-temp += "perl-module-io-seekable"
+RDEPENDS_perl-module-file-temp += "perl-module-overload"
+RDEPENDS_perl-module-file-temp += "perl-module-parent"
+RDEPENDS_perl-module-file-temp += "perl-module-posix"
+RDEPENDS_perl-module-file-temp += "perl-module-file-spec"
+RDEPENDS_perl-module-file-temp += "perl-module-strict"
+RDEPENDS_perl-module-file-temp += "perl-module-vars"
+RDEPENDS_perl-module-filter-simple += "perl-module-filter-util-call"
+RDEPENDS_perl-module-filter-simple += "perl-module-text-balanced"
+RDEPENDS_perl-module-filter-util-call += "perl-module-exporter"
+RDEPENDS_perl-module-filter-util-call += "perl-module-strict"
+RDEPENDS_perl-module-filter-util-call += "perl-module-warnings"
+RDEPENDS_perl-module-filter-util-call += "perl-module-xsloader"
+RDEPENDS_perl-module-findbin += "perl-module-cwd"
+RDEPENDS_perl-module-findbin += "perl-module-exporter"
+RDEPENDS_perl-module-findbin += "perl-module-file-basename"
+RDEPENDS_perl-module-getopt-long += "perl-module-constant"
+RDEPENDS_perl-module-getopt-long += "perl-module-exporter"
+RDEPENDS_perl-module-getopt-long += "perl-module-overload"
+RDEPENDS_perl-module-getopt-long += "perl-module-pod-usage"
+RDEPENDS_perl-module-getopt-long += "perl-module-strict"
+RDEPENDS_perl-module-getopt-long += "perl-module-text-parsewords"
+RDEPENDS_perl-module-getopt-long += "perl-module-vars"
+RDEPENDS_perl-module-getopt-long += "perl-module-warnings"
+RDEPENDS_perl-module-getopt-std += "perl-module-exporter"
+RDEPENDS_perl-module-hash-util-fieldhash += "perl-module-exporter"
+RDEPENDS_perl-module-hash-util-fieldhash += "perl-module-strict"
+RDEPENDS_perl-module-hash-util-fieldhash += "perl-module-warnings"
+RDEPENDS_perl-module-hash-util-fieldhash += "perl-module-xsloader"
+RDEPENDS_perl-module-hash-util += "perl-module-exporter"
+RDEPENDS_perl-module-hash-util += "perl-module-hash-util-fieldhash"
+RDEPENDS_perl-module-hash-util += "perl-module-strict"
+RDEPENDS_perl-module-hash-util += "perl-module-warnings"
+RDEPENDS_perl-module-hash-util += "perl-module-warnings-register"
+RDEPENDS_perl-module-hash-util += "perl-module-xsloader"
+RDEPENDS_perl-module-i18n-collate += "perl-module-exporter"
+RDEPENDS_perl-module-i18n-collate += "perl-module-overload"
+RDEPENDS_perl-module-i18n-collate += "perl-module-posix"
+RDEPENDS_perl-module-i18n-collate += "perl-module-strict"
+RDEPENDS_perl-module-i18n-collate += "perl-module-warnings-register"
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-exporter"
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-strict"
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-warnings"
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-xsloader"
+RDEPENDS_perl-module-i18n-langtags-detect += "perl-module-i18n-langtags"
+RDEPENDS_perl-module-i18n-langtags-detect += "perl-module-strict"
+RDEPENDS_perl-module-i18n-langtags-list += "perl-module-strict"
+RDEPENDS_perl-module-i18n-langtags += "perl-module-exporter"
+RDEPENDS_perl-module-i18n-langtags += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-compress-raw-bzip2"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-adapter-bzip2 += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-adapter-deflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-adapter-identity += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-adapter-identity += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-adapter-identity += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-adapter-identity += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-constant"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-encode"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-file-globmapper"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-strict"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-utf8"
+RDEPENDS_perl-module-io-compress-base-common += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-base += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-base += "perl-module-io-file"
+RDEPENDS_perl-module-io-compress-base += "perl-module-io-handle "
+RDEPENDS_perl-module-io-compress-base += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-base += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-io-compress-adapter-bzip2"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-io-compress-base"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-bzip2 += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-io-compress-adapter-deflate"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-io-compress-rawdeflate"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-io-compress-zlib-constants"
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-deflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-constant"
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-gzip-constants += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-adapter-deflate"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-gzip-constants"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-rawdeflate"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-io-compress-zlib-extra"
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-gzip += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-fcntl"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-io-compress-adapter-deflate"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-io-compress-base"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-rawdeflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-zip-constants += "perl-module-constant"
+RDEPENDS_perl-module-io-compress-zip-constants += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-zip-constants += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-zip-constants += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-config"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-exporter "
+RDEPENDS_perl-module-io-compress-zip += "perl-module-fcntl"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-adapter-deflate"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-adapter-identity"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-bzip2 "
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-rawdeflate"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-zip-constants"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-io-compress-zlib-extra"
+RDEPENDS_perl-module-io-compress-zip += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-zip += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-constant"
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-exporter"
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-zlib-constants += "perl-module-warnings"
+RDEPENDS_perl-module-io-compress-zlib-extra += "perl-module-bytes"
+RDEPENDS_perl-module-io-compress-zlib-extra += "perl-module-io-compress-gzip-constants"
+RDEPENDS_perl-module-io-compress-zlib-extra += "perl-module-strict "
+RDEPENDS_perl-module-io-compress-zlib-extra += "perl-module-warnings"
+RDEPENDS_perl-module-io-dir += "perl-module-exporter"
+RDEPENDS_perl-module-io-dir += "perl-module-file-stat"
+RDEPENDS_perl-module-io-dir += "perl-module-io-file"
+RDEPENDS_perl-module-io-dir += "perl-module-strict"
+RDEPENDS_perl-module-io-dir += "perl-module-tie-hash"
+RDEPENDS_perl-module-io-file += "perl-module-exporter"
+RDEPENDS_perl-module-io-file += "perl-module-fcntl"
+RDEPENDS_perl-module-io-file += "perl-module-io-seekable"
+RDEPENDS_perl-module-io-file += "perl-module-selectsaver"
+RDEPENDS_perl-module-io-file += "perl-module-strict"
+RDEPENDS_perl-module-io-handle += "perl-module-exporter"
+RDEPENDS_perl-module-io-handle += "perl-module-io"
+RDEPENDS_perl-module-io-handle += "perl-module-io-file"
+RDEPENDS_perl-module-io-handle += "perl-module-selectsaver"
+RDEPENDS_perl-module-io-handle += "perl-module-strict"
+RDEPENDS_perl-module-io += "perl-module-strict"
+RDEPENDS_perl-module-io += "perl-module-warnings"
+RDEPENDS_perl-module-io += "perl-module-xsloader"
+RDEPENDS_perl-module-io-pipe += "perl-module-fcntl"
+RDEPENDS_perl-module-io-pipe += "perl-module-io-handle"
+RDEPENDS_perl-module-io-pipe += "perl-module-strict"
+RDEPENDS_perl-module-io-poll += "perl-module-exporter"
+RDEPENDS_perl-module-io-poll += "perl-module-io-handle"
+RDEPENDS_perl-module-io-poll += "perl-module-strict"
+RDEPENDS_perl-module-io-seekable += "perl-module-exporter"
+RDEPENDS_perl-module-io-seekable += "perl-module-fcntl"
+RDEPENDS_perl-module-io-seekable += "perl-module-io-handle"
+RDEPENDS_perl-module-io-seekable += "perl-module-strict"
+RDEPENDS_perl-module-io-select += "perl-module-exporter"
+RDEPENDS_perl-module-io-select += "perl-module-strict"
+RDEPENDS_perl-module-io-select += "perl-module-warnings-register"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-errno"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-exporter"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-io-socket"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-socket"
+RDEPENDS_perl-module-io-socket-inet += "perl-module-strict"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-base"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-constant"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-errno"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-posix"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-socket"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-strict"
+RDEPENDS_perl-module-io-socket-ip += "perl-module-warnings"
+RDEPENDS_perl-module-io-socket += "perl-module-errno"
+RDEPENDS_perl-module-io-socket += "perl-module-exporter"
+RDEPENDS_perl-module-io-socket += "perl-module-io-handle"
+RDEPENDS_perl-module-io-socket += "perl-module-io-select"
+RDEPENDS_perl-module-io-socket += "perl-module-io-socket-inet"
+RDEPENDS_perl-module-io-socket += "perl-module-io-socket-unix"
+RDEPENDS_perl-module-io-socket += "perl-module-socket"
+RDEPENDS_perl-module-io-socket += "perl-module-strict"
+RDEPENDS_perl-module-io-socket-unix += "perl-module-io-socket"
+RDEPENDS_perl-module-io-socket-unix += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-compress-raw-bzip2"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-adapter-bunzip2 += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-io-compress-zip-constants "
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-adapter-identity += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-adapter-inflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-adapter-inflate"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-base"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-gunzip"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-inflate"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-rawinflate"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-io-uncompress-unzip"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-anyinflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-io-uncompress-base"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-strict"
+RDEPENDS_perl-module-io-uncompress-anyuncompress += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-constant"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-io-file "
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-list-util"
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-base += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-io-uncompress-adapter-bunzip2"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-io-uncompress-base"
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-bunzip2 += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-io-compress-gzip-constants"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-io-compress-zlib-extra"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-io-uncompress-rawinflate"
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-gunzip += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-io-compress-zlib-constants"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-io-uncompress-rawinflate"
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-inflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-io-uncompress-adapter-inflate"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-io-uncompress-base"
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-rawinflate += "perl-module-warnings"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-bytes"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-compress-raw-zlib"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-constant"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-exporter "
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-fcntl"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-compress-base-common"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-compress-zip-constants"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-compress-zlib-extra"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-file"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-uncompress-adapter-identity"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-uncompress-adapter-inflate"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-io-uncompress-rawinflate"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-posix"
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-strict "
+RDEPENDS_perl-module-io-uncompress-unzip += "perl-module-warnings"
+RDEPENDS_perl-module-io-zlib += "perl-module-fcntl"
+RDEPENDS_perl-module-io-zlib += "perl-module-io-handle"
+RDEPENDS_perl-module-io-zlib += "perl-module-strict"
+RDEPENDS_perl-module-io-zlib += "perl-module-tie-handle"
+RDEPENDS_perl-module-io-zlib += "perl-module-vars"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-constant"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-exporter"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-extutils-makemaker"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-filehandle"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-io-handle"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-io-select"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-ipc-open3"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-locale-maketext-simple"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-load"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-params-check"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-posix"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-socket"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-strict"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-text-parsewords"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-time-hires"
+RDEPENDS_perl-module-ipc-cmd += "perl-module-vars"
+RDEPENDS_perl-module-ipc-msg += "perl-module-class-struct"
+RDEPENDS_perl-module-ipc-msg += "perl-module-ipc-sysv"
+RDEPENDS_perl-module-ipc-msg += "perl-module-strict"
+RDEPENDS_perl-module-ipc-msg += "perl-module-vars"
+RDEPENDS_perl-module-ipc-open2 += "perl-module-exporter"
+RDEPENDS_perl-module-ipc-open2 += "perl-module-ipc-open3"
+RDEPENDS_perl-module-ipc-open2 += "perl-module-strict"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-constant"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-exporter"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-fcntl"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-io-pipe"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-posix"
+RDEPENDS_perl-module-ipc-open3 += "perl-module-strict"
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-class-struct"
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-ipc-sysv"
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-strict"
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-vars"
+RDEPENDS_perl-module-ipc-sharedmem += "perl-module-class-struct"
+RDEPENDS_perl-module-ipc-sharedmem += "perl-module-ipc-sysv"
+RDEPENDS_perl-module-ipc-sharedmem += "perl-module-strict"
+RDEPENDS_perl-module-ipc-sharedmem += "perl-module-vars"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-config"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-dynaloader"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-exporter"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-strict"
+RDEPENDS_perl-module-ipc-sysv += "perl-module-vars"
+RDEPENDS_perl-module-json-pp-boolean += "perl-module-overload"
+RDEPENDS_perl-module-json-pp-boolean += "perl-module-strict"
+RDEPENDS_perl-module-json-pp += "perl-module-b"
+RDEPENDS_perl-module-json-pp += "perl-module-bytes"
+RDEPENDS_perl-module-json-pp += "perl-module-constant"
+RDEPENDS_perl-module-json-pp += "perl-module-encode"
+RDEPENDS_perl-module-json-pp += "perl-module-exporter"
+RDEPENDS_perl-module-json-pp += "perl-module-json-pp-boolean"
+RDEPENDS_perl-module-json-pp += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-json-pp += "perl-module-math-bigint"
+RDEPENDS_perl-module-json-pp += "perl-module-overload"
+RDEPENDS_perl-module-json-pp += "perl-module-strict"
+RDEPENDS_perl-module-json-pp += "perl-module-subs"
+RDEPENDS_perl-module-less += "perl-module-strict"
+RDEPENDS_perl-module-less += "perl-module-warnings"
+RDEPENDS_perl-module-lib += "perl-module-config"
+RDEPENDS_perl-module-lib += "perl-module-strict"
+RDEPENDS_perl-module-list-util += "perl-module-exporter"
+RDEPENDS_perl-module-list-util += "perl-module-strict"
+RDEPENDS_perl-module-list-util += "perl-module-warnings"
+RDEPENDS_perl-module-list-util += "perl-module-xsloader"
+RDEPENDS_perl-module-list-util-xs += "perl-module-list-util"
+RDEPENDS_perl-module-list-util-xs += "perl-module-strict"
+RDEPENDS_perl-module-list-util-xs += "perl-module-warnings"
+RDEPENDS_perl-module-loaded += "perl-module-strict"
+RDEPENDS_perl-module-loaded += "perl-module-vars"
+RDEPENDS_perl-module-load += "perl-module-config"
+RDEPENDS_perl-module-load += "perl-module-constant"
+RDEPENDS_perl-module-load += "perl-module-exporter"
+RDEPENDS_perl-module-load += "perl-module-filehandle"
+RDEPENDS_perl-module-load += "perl-module-locale-maketext-simple"
+RDEPENDS_perl-module-load += "perl-module-corelist"
+RDEPENDS_perl-module-load += "perl-module-load"
+RDEPENDS_perl-module-load += "perl-module-params-check"
+RDEPENDS_perl-module-load += "perl-module-strict"
+RDEPENDS_perl-module-load += "perl-module-vars"
+RDEPENDS_perl-module-load += "perl-module-version"
+RDEPENDS_perl-module-load += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-constants += "perl-module-constant"
+RDEPENDS_perl-module-locale-codes-constants += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-constants += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-constants += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-country-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-country-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-country-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-country += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-country-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-country-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-country-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-currency-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-currency-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-currency-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-currency += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-currency-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-currency-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-currency-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langext-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langext-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langext-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langext += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langext-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langext-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langext-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langfam-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langfam-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langfam-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langfam += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langfam-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langfam-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-language-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-language-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-language-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-language += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-language-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-language-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-language-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langvar-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langvar-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langvar-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langvar += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-langvar-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-langvar-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-langvar-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes += "perl-module-if"
+RDEPENDS_perl-module-locale-codes += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-script-codes += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-script-codes += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-script-codes += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-exporter"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-if"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-script += "perl-module-warnings"
+RDEPENDS_perl-module-locale-codes-script-retired += "perl-module-strict"
+RDEPENDS_perl-module-locale-codes-script-retired += "perl-module-utf8"
+RDEPENDS_perl-module-locale-codes-script-retired += "perl-module-warnings"
+RDEPENDS_perl-module-locale-country += "perl-module-exporter"
+RDEPENDS_perl-module-locale-country += "perl-module-if"
+RDEPENDS_perl-module-locale-country += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-country += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-country += "perl-module-strict"
+RDEPENDS_perl-module-locale-country += "perl-module-warnings"
+RDEPENDS_perl-module-locale-currency += "perl-module-exporter"
+RDEPENDS_perl-module-locale-currency += "perl-module-if"
+RDEPENDS_perl-module-locale-currency += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-currency += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-currency += "perl-module-strict"
+RDEPENDS_perl-module-locale-currency += "perl-module-warnings"
+RDEPENDS_perl-module-locale-language += "perl-module-exporter"
+RDEPENDS_perl-module-locale-language += "perl-module-if"
+RDEPENDS_perl-module-locale-language += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-language += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-language += "perl-module-strict"
+RDEPENDS_perl-module-locale-language += "perl-module-warnings"
+RDEPENDS_perl-module-locale-maketext-gutsloader += "perl-module-locale-maketext"
+RDEPENDS_perl-module-locale-maketext-guts += "perl-module-locale-maketext"
+RDEPENDS_perl-module-locale-maketext += "perl-module-i18n-langtags"
+RDEPENDS_perl-module-locale-maketext += "perl-module-i18n-langtags-detect"
+RDEPENDS_perl-module-locale-maketext += "perl-module-integer"
+RDEPENDS_perl-module-locale-maketext += "perl-module-strict"
+RDEPENDS_perl-module-locale-maketext-simple += "perl-module-base"
+RDEPENDS_perl-module-locale-maketext-simple += "perl-module-strict"
+RDEPENDS_perl-module-locale += "perl-module-config"
+RDEPENDS_perl-module-locale-script += "perl-module-exporter"
+RDEPENDS_perl-module-locale-script += "perl-module-if"
+RDEPENDS_perl-module-locale-script += "perl-module-locale-codes"
+RDEPENDS_perl-module-locale-script += "perl-module-locale-codes-constants"
+RDEPENDS_perl-module-locale-script += "perl-module-strict"
+RDEPENDS_perl-module-locale-script += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-exporter"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-math-bigint"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-math-complex"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-overload"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-strict"
+RDEPENDS_perl-module-math-bigfloat += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-exporter"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-overload"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-strict"
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-calcemu += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-calcemu += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-constant"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-integer"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-math-bigint-lib"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-fastcalc += "perl-module-math-bigint-calc"
+RDEPENDS_perl-module-math-bigint-fastcalc += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-fastcalc += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-fastcalc += "perl-module-xsloader"
+RDEPENDS_perl-module-math-bigint-lib += "perl-module-overload"
+RDEPENDS_perl-module-math-bigint-lib += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-lib += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint += "perl-module-exporter"
+RDEPENDS_perl-module-math-bigint += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-math-bigint += "perl-module-math-complex"
+RDEPENDS_perl-module-math-bigint += "perl-module-overload"
+RDEPENDS_perl-module-math-bigint += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-exporter"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-math-bigint"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-overload"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-strict"
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-warnings"
+RDEPENDS_perl-module-math-bigrat += "perl-module-math-bigfloat"
+RDEPENDS_perl-module-math-bigrat += "perl-module-math-bigint"
+RDEPENDS_perl-module-math-bigrat += "perl-module-overload"
+RDEPENDS_perl-module-math-bigrat += "perl-module-strict"
+RDEPENDS_perl-module-math-bigrat += "perl-module-warnings"
+RDEPENDS_perl-module-math-complex += "perl-module-config"
+RDEPENDS_perl-module-math-complex += "perl-module-exporter"
+RDEPENDS_perl-module-math-complex += "perl-module-overload"
+RDEPENDS_perl-module-math-complex += "perl-module-strict"
+RDEPENDS_perl-module-math-complex += "perl-module-warnings"
+RDEPENDS_perl-module-math-trig += "perl-module-exporter"
+RDEPENDS_perl-module-math-trig += "perl-module-math-complex"
+RDEPENDS_perl-module-math-trig += "perl-module-strict"
+RDEPENDS_perl-module-memoize-anydbm-file += "perl-module-vars"
+RDEPENDS_perl-module-memoize += "perl-module-config"
+RDEPENDS_perl-module-memoize += "perl-module-exporter"
+RDEPENDS_perl-module-memoize += "perl-module-strict"
+RDEPENDS_perl-module-memoize += "perl-module-vars"
+RDEPENDS_perl-module-memoize-sdbm-file += "perl-module-sdbm-file"
+RDEPENDS_perl-module-memoize-storable += "perl-module-storable"
+RDEPENDS_perl-module-mime-base64 += "perl-module-exporter"
+RDEPENDS_perl-module-mime-base64 += "perl-module-strict"
+RDEPENDS_perl-module-mime-base64 += "perl-module-vars"
+RDEPENDS_perl-module-mime-base64 += "perl-module-xsloader"
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-exporter"
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-mime-base64"
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-strict"
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-vars"
+RDEPENDS_perl-module-mro += "perl-module-strict"
+RDEPENDS_perl-module-mro += "perl-module-warnings"
+RDEPENDS_perl-module-mro += "perl-module-xsloader"
+RDEPENDS_perl-module-net-cmd += "perl-module-constant"
+RDEPENDS_perl-module-net-cmd += "perl-module-errno"
+RDEPENDS_perl-module-net-cmd += "perl-module-exporter"
+RDEPENDS_perl-module-net-cmd += "perl-module-strict"
+RDEPENDS_perl-module-net-cmd += "perl-module-warnings"
+RDEPENDS_perl-module-net-config += "perl-module-exporter"
+RDEPENDS_perl-module-net-config += "perl-module-socket"
+RDEPENDS_perl-module-net-config += "perl-module-strict"
+RDEPENDS_perl-module-net-config += "perl-module-warnings"
+RDEPENDS_perl-module-net-domain += "perl-module-exporter"
+RDEPENDS_perl-module-net-domain += "perl-module-net-config"
+RDEPENDS_perl-module-net-domain += "perl-module-posix"
+RDEPENDS_perl-module-net-domain += "perl-module-socket"
+RDEPENDS_perl-module-net-domain += "perl-module-strict"
+RDEPENDS_perl-module-net-domain += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-a += "perl-module-net-ftp-dataconn"
+RDEPENDS_perl-module-net-ftp-a += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-a += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-errno"
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-e += "perl-module-net-ftp-i"
+RDEPENDS_perl-module-net-ftp-e += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-e += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-i += "perl-module-net-ftp-dataconn"
+RDEPENDS_perl-module-net-ftp-i += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-i += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp-l += "perl-module-net-ftp-i"
+RDEPENDS_perl-module-net-ftp-l += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp-l += "perl-module-warnings"
+RDEPENDS_perl-module-net-ftp += "perl-module-constant"
+RDEPENDS_perl-module-net-ftp += "perl-module-fcntl"
+RDEPENDS_perl-module-net-ftp += "perl-module-file-basename"
+RDEPENDS_perl-module-net-ftp += "perl-module-io-socket"
+RDEPENDS_perl-module-net-ftp += "perl-module-io-socket-ip"
+RDEPENDS_perl-module-net-ftp += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-ftp += "perl-module-net-config"
+RDEPENDS_perl-module-net-ftp += "perl-module-net-ftp-a"
+RDEPENDS_perl-module-net-ftp += "perl-module-net-netrc"
+RDEPENDS_perl-module-net-ftp += "perl-module-socket"
+RDEPENDS_perl-module-net-ftp += "perl-module-strict"
+RDEPENDS_perl-module-net-ftp += "perl-module-time-local"
+RDEPENDS_perl-module-net-ftp += "perl-module-warnings"
+RDEPENDS_perl-module-net-hostent += "perl-module-class-struct"
+RDEPENDS_perl-module-net-hostent += "perl-module-exporter"
+RDEPENDS_perl-module-net-hostent += "perl-module-socket"
+RDEPENDS_perl-module-net-hostent += "perl-module-strict"
+RDEPENDS_perl-module-net-netent += "perl-module-class-struct"
+RDEPENDS_perl-module-net-netent += "perl-module-exporter"
+RDEPENDS_perl-module-net-netent += "perl-module-socket"
+RDEPENDS_perl-module-net-netent += "perl-module-strict"
+RDEPENDS_perl-module-net-netrc += "perl-module-filehandle"
+RDEPENDS_perl-module-net-netrc += "perl-module-strict"
+RDEPENDS_perl-module-net-netrc += "perl-module-warnings"
+RDEPENDS_perl-module-net-nntp += "perl-module-io-socket"
+RDEPENDS_perl-module-net-nntp += "perl-module-io-socket-ip"
+RDEPENDS_perl-module-net-nntp += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-nntp += "perl-module-net-config"
+RDEPENDS_perl-module-net-nntp += "perl-module-strict"
+RDEPENDS_perl-module-net-nntp += "perl-module-time-local"
+RDEPENDS_perl-module-net-nntp += "perl-module-warnings"
+RDEPENDS_perl-module-net-ping += "perl-module-constant"
+RDEPENDS_perl-module-net-ping += "perl-module-exporter"
+RDEPENDS_perl-module-net-ping += "perl-module-fcntl"
+RDEPENDS_perl-module-net-ping += "perl-module-filehandle"
+RDEPENDS_perl-module-net-ping += "perl-module-io-socket-inet"
+RDEPENDS_perl-module-net-ping += "perl-module-posix"
+RDEPENDS_perl-module-net-ping += "perl-module-socket"
+RDEPENDS_perl-module-net-ping += "perl-module-strict"
+RDEPENDS_perl-module-net-ping += "perl-module-time-hires"
+RDEPENDS_perl-module-net-pop3 += "perl-module-io-socket"
+RDEPENDS_perl-module-net-pop3 += "perl-module-io-socket-ip"
+RDEPENDS_perl-module-net-pop3 += "perl-module-mime-base64"
+RDEPENDS_perl-module-net-pop3 += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-pop3 += "perl-module-net-config"
+RDEPENDS_perl-module-net-pop3 += "perl-module-net-netrc"
+RDEPENDS_perl-module-net-pop3 += "perl-module-strict"
+RDEPENDS_perl-module-net-pop3 += "perl-module-warnings"
+RDEPENDS_perl-module-net-protoent += "perl-module-class-struct"
+RDEPENDS_perl-module-net-protoent += "perl-module-exporter"
+RDEPENDS_perl-module-net-protoent += "perl-module-strict"
+RDEPENDS_perl-module-net-servent += "perl-module-class-struct"
+RDEPENDS_perl-module-net-servent += "perl-module-exporter"
+RDEPENDS_perl-module-net-servent += "perl-module-strict"
+RDEPENDS_perl-module-net-smtp += "perl-module-io-socket"
+RDEPENDS_perl-module-net-smtp += "perl-module-io-socket-ip"
+RDEPENDS_perl-module-net-smtp += "perl-module-mime-base64"
+RDEPENDS_perl-module-net-smtp += "perl-module-net-cmd"
+RDEPENDS_perl-module-net-smtp += "perl-module-net-config"
+RDEPENDS_perl-module-net-smtp += "perl-module-socket"
+RDEPENDS_perl-module-net-smtp += "perl-module-strict"
+RDEPENDS_perl-module-net-smtp += "perl-module-warnings"
+RDEPENDS_perl-module-net-time += "perl-module-exporter"
+RDEPENDS_perl-module-net-time += "perl-module-io-select"
+RDEPENDS_perl-module-net-time += "perl-module-io-socket"
+RDEPENDS_perl-module-net-time += "perl-module-net-config"
+RDEPENDS_perl-module-net-time += "perl-module-strict"
+RDEPENDS_perl-module-net-time += "perl-module-warnings"
+RDEPENDS_perl-module-next += "perl-module-overload"
+RDEPENDS_perl-module-next += "perl-module-strict"
+RDEPENDS_perl-module-next += "perl-module-warnings"
+RDEPENDS_perl-module-ok += "perl-module-strict"
+RDEPENDS_perl-module-ok += "perl-module-test-more"
+RDEPENDS_perl-module-opcode += "perl-module-exporter"
+RDEPENDS_perl-module-opcode += "perl-module-strict"
+RDEPENDS_perl-module-opcode += "perl-module-subs"
+RDEPENDS_perl-module-opcode += "perl-module-xsloader"
+RDEPENDS_perl-module-open += "perl-module-encode"
+RDEPENDS_perl-module-open += "perl-module-encoding"
+RDEPENDS_perl-module-open += "perl-module-warnings"
+RDEPENDS_perl-module-o += "perl-module-b"
+RDEPENDS_perl-module-ops += "perl-module-opcode"
+RDEPENDS_perl-module-overloading += "perl-module-overload-numbers"
+RDEPENDS_perl-module-overloading += "perl-module-warnings"
+RDEPENDS_perl-module-overload += "perl-module-mro"
+RDEPENDS_perl-module-overload += "perl-module-warnings-register"
+RDEPENDS_perl-module-params-check += "perl-module-exporter"
+RDEPENDS_perl-module-params-check += "perl-module-locale-maketext-simple"
+RDEPENDS_perl-module-params-check += "perl-module-strict"
+RDEPENDS_perl-module-params-check += "perl-module-vars"
+RDEPENDS_perl-module-parent += "perl-module-strict"
+RDEPENDS_perl-module-parent += "perl-module-vars"
+RDEPENDS_perl-module-perlfaq += "perl-module-strict"
+RDEPENDS_perl-module-perlfaq += "perl-module-warnings"
+RDEPENDS_perl-module-perlio-encoding += "perl-module-strict"
+RDEPENDS_perl-module-perlio-encoding += "perl-module-xsloader"
+RDEPENDS_perl-module-perlio-mmap += "perl-module-strict"
+RDEPENDS_perl-module-perlio-mmap += "perl-module-warnings"
+RDEPENDS_perl-module-perlio-mmap += "perl-module-xsloader"
+RDEPENDS_perl-module-perlio-scalar += "perl-module-xsloader"
+RDEPENDS_perl-module-perlio-via += "perl-module-xsloader"
+RDEPENDS_perl-module-perlio-via-quotedprint += "perl-module-mime-quotedprint"
+RDEPENDS_perl-module-perlio-via-quotedprint += "perl-module-strict"
+RDEPENDS_perl-module-pod-checker += "perl-module-base"
+RDEPENDS_perl-module-pod-checker += "perl-module-exporter"
+RDEPENDS_perl-module-pod-checker += "perl-module-strict"
+RDEPENDS_perl-module-pod-checker += "perl-module-warnings"
+RDEPENDS_perl-module-pod-escapes += "perl-module-exporter"
+RDEPENDS_perl-module-pod-escapes += "perl-module-strict"
+RDEPENDS_perl-module-pod-escapes += "perl-module-vars"
+RDEPENDS_perl-module-pod-escapes += "perl-module-warnings"
+RDEPENDS_perl-module-pod-find += "perl-module-config"
+RDEPENDS_perl-module-pod-find += "perl-module-cwd"
+RDEPENDS_perl-module-pod-find += "perl-module-exporter"
+RDEPENDS_perl-module-pod-find += "perl-module-file-find"
+RDEPENDS_perl-module-pod-find += "perl-module-strict"
+RDEPENDS_perl-module-pod-find += "perl-module-vars"
+RDEPENDS_perl-module-pod-functions += "perl-module-exporter"
+RDEPENDS_perl-module-pod-functions += "perl-module-strict"
+RDEPENDS_perl-module-pod-inputobjects += "perl-module-strict"
+RDEPENDS_perl-module-pod-inputobjects += "perl-module-vars"
+RDEPENDS_perl-module-pod-man += "perl-module-file-basename"
+RDEPENDS_perl-module-pod-man += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-man += "perl-module-strict"
+RDEPENDS_perl-module-pod-man += "perl-module-subs"
+RDEPENDS_perl-module-pod-man += "perl-module-vars"
+RDEPENDS_perl-module-pod-man += "perl-module-warnings"
+RDEPENDS_perl-module-pod-parselink += "perl-module-exporter"
+RDEPENDS_perl-module-pod-parselink += "perl-module-strict"
+RDEPENDS_perl-module-pod-parselink += "perl-module-vars"
+RDEPENDS_perl-module-pod-parselink += "perl-module-warnings"
+RDEPENDS_perl-module-pod-parser += "perl-module-exporter"
+RDEPENDS_perl-module-pod-parser += "perl-module-pod-inputobjects"
+RDEPENDS_perl-module-pod-parser += "perl-module-strict"
+RDEPENDS_perl-module-pod-parser += "perl-module-vars"
+RDEPENDS_perl-module-pod-parseutils += "perl-module-strict"
+RDEPENDS_perl-module-pod-parseutils += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-config"
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-getoptsoo += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-getoptsoo += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-config"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-encode"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-fcntl"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-file-basename"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-file-temp"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-pod-perldoc-getoptsoo"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-text-parsewords"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-pod-text-color"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-toansi += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-pod-checker"
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-encode"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-io-handle"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-io-select"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-ipc-open3"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-pod-man"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-pod-perldoc-topod"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-pod-man"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-pod-text-termcap"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-toterm += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-pod-text"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-warnings"
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-parent"
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-strict"
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-vars"
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-warnings"
+RDEPENDS_perl-module-pod-plaintext += "perl-module-pod-select"
+RDEPENDS_perl-module-pod-plaintext += "perl-module-strict"
+RDEPENDS_perl-module-pod-plaintext += "perl-module-vars"
+RDEPENDS_perl-module-pod-select += "perl-module-pod-parser"
+RDEPENDS_perl-module-pod-select += "perl-module-strict"
+RDEPENDS_perl-module-pod-select += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-integer"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-pod-simple-transcode"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-blackbox += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-pod-simple-methody"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-text-wrap"
+RDEPENDS_perl-module-pod-simple-checker += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-debug += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-debug += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-debug += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-dumpastext += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-dumpastext += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-dumpasxml += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-dumpasxml += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-dumpasxml += "perl-module-text-wrap"
+RDEPENDS_perl-module-pod-simple-linksection += "perl-module-overload"
+RDEPENDS_perl-module-pod-simple-linksection += "perl-module-pod-simple-blackbox"
+RDEPENDS_perl-module-pod-simple-linksection += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-linksection += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-methody += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-methody += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-methody += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple += "perl-module-integer"
+RDEPENDS_perl-module-pod-simple += "perl-module-pod-escapes"
+RDEPENDS_perl-module-pod-simple += "perl-module-pod-simple-blackbox"
+RDEPENDS_perl-module-pod-simple += "perl-module-pod-simple-linksection"
+RDEPENDS_perl-module-pod-simple += "perl-module-pod-simple-tiedoutfh"
+RDEPENDS_perl-module-pod-simple += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-progress += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparserendtoken += "perl-module-pod-simple-pullparsertoken"
+RDEPENDS_perl-module-pod-simple-pullparserendtoken += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparserendtoken += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-pod-simple-pullparserendtoken"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-pod-simple-pullparserstarttoken"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-pod-simple-pullparsertexttoken"
+RDEPENDS_perl-module-pod-simple-pullparser += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparserstarttoken += "perl-module-pod-simple-pullparsertoken"
+RDEPENDS_perl-module-pod-simple-pullparserstarttoken += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparserstarttoken += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-pullparsertexttoken += "perl-module-pod-simple-pullparsertoken"
+RDEPENDS_perl-module-pod-simple-pullparsertexttoken += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-pullparsertexttoken += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-pullparsertoken += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-rtf += "perl-module-integer"
+RDEPENDS_perl-module-pod-simple-rtf += "perl-module-pod-simple-pullparser"
+RDEPENDS_perl-module-pod-simple-rtf += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-rtf += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-config"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-cwd"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-file-basename"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-search += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-simpletree += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-simpletree += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-simpletree += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-textcontent += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-textcontent += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-textcontent += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-pod-simple-methody"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-text-wrap"
+RDEPENDS_perl-module-pod-simple-text += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-tiedoutfh += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-tiedoutfh += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-transcodedumb += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-transcodedumb += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-transcode += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-transcode += "perl-module-pod-simple-transcodedumb"
+RDEPENDS_perl-module-pod-simple-transcode += "perl-module-pod-simple-transcodesmart"
+RDEPENDS_perl-module-pod-simple-transcode += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-encode"
+RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-vars"
+RDEPENDS_perl-module-pod-simple-xmloutstream += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-simple-xmloutstream += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-xmloutstream += "perl-module-vars"
+RDEPENDS_perl-module-pod-text-color += "perl-module-pod-text"
+RDEPENDS_perl-module-pod-text-color += "perl-module-strict"
+RDEPENDS_perl-module-pod-text-color += "perl-module-term-ansicolor"
+RDEPENDS_perl-module-pod-text-color += "perl-module-vars"
+RDEPENDS_perl-module-pod-text-color += "perl-module-warnings"
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-pod-text"
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-strict"
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-vars"
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-warnings"
+RDEPENDS_perl-module-pod-text += "perl-module-encode"
+RDEPENDS_perl-module-pod-text += "perl-module-exporter"
+RDEPENDS_perl-module-pod-text += "perl-module-pod-simple"
+RDEPENDS_perl-module-pod-text += "perl-module-strict"
+RDEPENDS_perl-module-pod-text += "perl-module-vars"
+RDEPENDS_perl-module-pod-text += "perl-module-warnings"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-pod-text"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-posix"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-strict"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-term-cap"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-vars"
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-warnings"
+RDEPENDS_perl-module-pod-usage += "perl-module-config"
+RDEPENDS_perl-module-pod-usage += "perl-module-exporter"
+RDEPENDS_perl-module-pod-usage += "perl-module-strict"
+RDEPENDS_perl-module-pod-usage += "perl-module-vars"
+RDEPENDS_perl-module-posix += "perl-module-exporter"
+RDEPENDS_perl-module-posix += "perl-module-fcntl"
+RDEPENDS_perl-module-posix += "perl-module-strict"
+RDEPENDS_perl-module-posix += "perl-module-tie-hash"
+RDEPENDS_perl-module-posix += "perl-module-warnings"
+RDEPENDS_perl-module-posix += "perl-module-xsloader"
+RDEPENDS_perl-module-re += "perl-module-exporter"
+RDEPENDS_perl-module-re += "perl-module-strict"
+RDEPENDS_perl-module-re += "perl-module-term-cap"
+RDEPENDS_perl-module-re += "perl-module-warnings"
+RDEPENDS_perl-module-re += "perl-module-xsloader"
+RDEPENDS_perl-module-safe += "perl-module-b"
+RDEPENDS_perl-module-safe += "perl-module-opcode"
+RDEPENDS_perl-module-safe += "perl-module-strict"
+RDEPENDS_perl-module-safe += "perl-module-utf8"
+RDEPENDS_perl-module-sdbm-file += "perl-module-exporter"
+RDEPENDS_perl-module-sdbm-file += "perl-module-strict"
+RDEPENDS_perl-module-sdbm-file += "perl-module-tie-hash"
+RDEPENDS_perl-module-sdbm-file += "perl-module-warnings"
+RDEPENDS_perl-module-sdbm-file += "perl-module-xsloader"
+RDEPENDS_perl-module-search-dict += "perl-module-exporter"
+RDEPENDS_perl-module-search-dict += "perl-module-feature"
+RDEPENDS_perl-module-search-dict += "perl-module-strict"
+RDEPENDS_perl-module-selfloader += "perl-module-exporter"
+RDEPENDS_perl-module-selfloader += "perl-module-io-handle"
+RDEPENDS_perl-module-selfloader += "perl-module-strict"
+RDEPENDS_perl-module-socket += "perl-module-exporter"
+RDEPENDS_perl-module-socket += "perl-module-strict"
+RDEPENDS_perl-module-socket += "perl-module-warnings-register"
+RDEPENDS_perl-module-socket += "perl-module-xsloader"
+RDEPENDS_perl-module-sort += "perl-module-strict"
+RDEPENDS_perl-module-storable += "perl-module-exporter"
+RDEPENDS_perl-module-storable += "perl-module-io-file"
+RDEPENDS_perl-module-storable += "perl-module-xsloader"
+RDEPENDS_perl-module-sub-util += "perl-module-exporter"
+RDEPENDS_perl-module-sub-util += "perl-module-list-util"
+RDEPENDS_perl-module-sub-util += "perl-module-strict"
+RDEPENDS_perl-module-sub-util += "perl-module-warnings"
+RDEPENDS_perl-module-sys-hostname += "perl-module-exporter"
+RDEPENDS_perl-module-sys-hostname += "perl-module-posix"
+RDEPENDS_perl-module-sys-hostname += "perl-module-strict"
+RDEPENDS_perl-module-sys-hostname += "perl-module-warnings"
+RDEPENDS_perl-module-sys-hostname += "perl-module-xsloader"
+RDEPENDS_perl-module-sys-syslog += "perl-module-config"
+RDEPENDS_perl-module-sys-syslog += "perl-module-constant"
+RDEPENDS_perl-module-sys-syslog += "perl-module-dynaloader"
+RDEPENDS_perl-module-sys-syslog += "perl-module-exporter"
+RDEPENDS_perl-module-sys-syslog += "perl-module-fcntl"
+RDEPENDS_perl-module-sys-syslog += "perl-module-file-basename"
+RDEPENDS_perl-module-sys-syslog += "perl-module-posix"
+RDEPENDS_perl-module-sys-syslog += "perl-module-socket"
+RDEPENDS_perl-module-sys-syslog += "perl-module-strict"
+RDEPENDS_perl-module-sys-syslog += "perl-module-sys-hostname"
+RDEPENDS_perl-module-sys-syslog += "perl-module-vars"
+RDEPENDS_perl-module-sys-syslog += "perl-module-warnings"
+RDEPENDS_perl-module-sys-syslog += "perl-module-warnings-register"
+RDEPENDS_perl-module-sys-syslog += "perl-module-xsloader"
+RDEPENDS_perl-module-tap-base += "perl-module-base"
+RDEPENDS_perl-module-tap-base += "perl-module-constant"
+RDEPENDS_perl-module-tap-base += "perl-module-strict"
+RDEPENDS_perl-module-tap-base += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-base += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-posix"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-tap-formatter-color"
+RDEPENDS_perl-module-tap-formatter-base += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-color += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-color += "perl-module-constant"
+RDEPENDS_perl-module-tap-formatter-color += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-color += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-constant"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-file-path"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-console-parallelsession += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-console += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-console += "perl-module-posix"
+RDEPENDS_perl-module-tap-formatter-console += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-console += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-console-session += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-console-session += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-console-session += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-posix"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-tap-formatter-base"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-tap-formatter-file-session"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-tap-formatter-session"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-file-session += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-file-session += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-file-session += "perl-module-warnings"
+RDEPENDS_perl-module-tap-formatter-session += "perl-module-base"
+RDEPENDS_perl-module-tap-formatter-session += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-session += "perl-module-warnings"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-constant"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-strict"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-tap-object"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-text-parsewords"
+RDEPENDS_perl-module-tap-harness-env += "perl-module-warnings"
+RDEPENDS_perl-module-tap-harness += "perl-module-base"
+RDEPENDS_perl-module-tap-harness += "perl-module-file-path"
+RDEPENDS_perl-module-tap-harness += "perl-module-io-handle"
+RDEPENDS_perl-module-tap-harness += "perl-module-strict"
+RDEPENDS_perl-module-tap-harness += "perl-module-tap-formatter-file"
+RDEPENDS_perl-module-tap-harness += "perl-module-warnings"
+RDEPENDS_perl-module-tap-object += "perl-module-strict"
+RDEPENDS_perl-module-tap-object += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-benchmark"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-tap-parser-resultfactory"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-tap-parser-yamlish-reader"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-file-basename"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iterator += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iterator += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-config"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-io-handle"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-io-select"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser += "perl-module-base"
+RDEPENDS_perl-module-tap-parser += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-grammar"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-iterator"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-result"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-resultfactory"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-source"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-executable"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-file"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-handle"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-perl"
+RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-rawtap"
+RDEPENDS_perl-module-tap-parser += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-bailout"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-comment"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-plan"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-pragma"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-test"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-unknown"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-version"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-yaml"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-test += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-test += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-test += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-version += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-version += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-version += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler-job += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-scheduler-job += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-tap-parser-scheduler-job"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-tap-parser-scheduler-spinner"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler-spinner += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-scheduler-spinner += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-tap-parser-iterator-process"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-tap-parser-iterator-stream"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-tap-parser-iterator-stream"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-tap-parser-iterator"
+RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-config"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-iterator-process"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-sourcehandler-executable"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-text-parsewords"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-tap-parser-iterator-array"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-constant"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-file-basename"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-warnings"
+RDEPENDS_perl-module-term-ansicolor += "perl-module-exporter"
+RDEPENDS_perl-module-term-ansicolor += "perl-module-strict"
+RDEPENDS_perl-module-term-ansicolor += "perl-module-warnings"
+RDEPENDS_perl-module-term-cap += "perl-module-strict"
+RDEPENDS_perl-module-term-cap += "perl-module-vars"
+RDEPENDS_perl-module-term-complete += "perl-module-exporter"
+RDEPENDS_perl-module-term-complete += "perl-module-strict"
+RDEPENDS_perl-module-term-readline += "perl-module-strict"
+RDEPENDS_perl-module-term-readline += "perl-module-term-cap"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-warnings"
+RDEPENDS_perl-module-test-builder-module += "perl-module-exporter"
+RDEPENDS_perl-module-test-builder-module += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-module += "perl-module-test-builder"
+RDEPENDS_perl-module-test-builder += "perl-module-data-dumper"
+RDEPENDS_perl-module-test-builder += "perl-module-overload"
+RDEPENDS_perl-module-test-builder += "perl-module-strict"
+RDEPENDS_perl-module-test-builder += "perl-module-test-builder-formatter"
+RDEPENDS_perl-module-test-builder += "perl-module-test-builder-tododiag"
+RDEPENDS_perl-module-test-builder += "perl-module-warnings"
+RDEPENDS_perl-module-test-builder-tester-color += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-tester-color += "perl-module-test-builder-tester"
+RDEPENDS_perl-module-test-builder-tester += "perl-module-exporter"
+RDEPENDS_perl-module-test-builder-tester += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-tester += "perl-module-test-builder"
+RDEPENDS_perl-module-test-builder-tododiag += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-tododiag += "perl-module-warnings"
+RDEPENDS_perl-module-test-harness += "perl-module-base"
+RDEPENDS_perl-module-test-harness += "perl-module-config"
+RDEPENDS_perl-module-test-harness += "perl-module-constant"
+RDEPENDS_perl-module-test-harness += "perl-module-strict"
+RDEPENDS_perl-module-test-harness += "perl-module-tap-harness"
+RDEPENDS_perl-module-test-harness += "perl-module-tap-parser-aggregator"
+RDEPENDS_perl-module-test-harness += "perl-module-tap-parser-source"
+RDEPENDS_perl-module-test-harness += "perl-module-tap-parser-sourcehandler-perl"
+RDEPENDS_perl-module-test-harness += "perl-module-text-parsewords"
+RDEPENDS_perl-module-test-harness += "perl-module-warnings"
+RDEPENDS_perl-module-test-more += "perl-module-strict"
+RDEPENDS_perl-module-test-more += "perl-module-test-builder-module"
+RDEPENDS_perl-module-test-more += "perl-module-warnings"
+RDEPENDS_perl-module-test += "perl-module-exporter"
+RDEPENDS_perl-module-test += "perl-module-file-temp"
+RDEPENDS_perl-module-test += "perl-module-strict"
+RDEPENDS_perl-module-test-simple += "perl-module-strict"
+RDEPENDS_perl-module-test-simple += "perl-module-test-builder-module"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-config"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-strict"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-test-builder"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-threads-shared"
+RDEPENDS_perl-module-test-tester-capture += "perl-module-vars"
+RDEPENDS_perl-module-test-tester-capturerunner += "perl-module-exporter"
+RDEPENDS_perl-module-test-tester-capturerunner += "perl-module-strict"
+RDEPENDS_perl-module-test-tester-capturerunner += "perl-module-test-tester-capture"
+RDEPENDS_perl-module-test-tester-delegate += "perl-module-strict"
+RDEPENDS_perl-module-test-tester-delegate += "perl-module-vars"
+RDEPENDS_perl-module-test-tester-delegate += "perl-module-warnings"
+RDEPENDS_perl-module-test-tester += "perl-module-exporter"
+RDEPENDS_perl-module-test-tester += "perl-module-strict"
+RDEPENDS_perl-module-test-tester += "perl-module-test-builder"
+RDEPENDS_perl-module-test-tester += "perl-module-test-tester-capturerunner"
+RDEPENDS_perl-module-test-tester += "perl-module-test-tester-delegate"
+RDEPENDS_perl-module-test-tester += "perl-module-vars"
+RDEPENDS_perl-module-text-abbrev += "perl-module-exporter"
+RDEPENDS_perl-module-text-balanced += "perl-module-exporter"
+RDEPENDS_perl-module-text-balanced += "perl-module-overload"
+RDEPENDS_perl-module-text-balanced += "perl-module-selfloader"
+RDEPENDS_perl-module-text-balanced += "perl-module-strict"
+RDEPENDS_perl-module-text-balanced += "perl-module-vars"
+RDEPENDS_perl-module-text-parsewords += "perl-module-exporter"
+RDEPENDS_perl-module-text-parsewords += "perl-module-strict"
+RDEPENDS_perl-module-text-tabs += "perl-module-exporter"
+RDEPENDS_perl-module-text-tabs += "perl-module-strict"
+RDEPENDS_perl-module-text-tabs += "perl-module-vars"
+RDEPENDS_perl-module-text-wrap += "perl-module-exporter"
+RDEPENDS_perl-module-text-wrap += "perl-module-re"
+RDEPENDS_perl-module-text-wrap += "perl-module-strict"
+RDEPENDS_perl-module-text-wrap += "perl-module-text-tabs"
+RDEPENDS_perl-module-text-wrap += "perl-module-vars"
+RDEPENDS_perl-module-text-wrap += "perl-module-warnings-register"
+RDEPENDS_perl-module-thread += "perl-module-config"
+RDEPENDS_perl-module-thread += "perl-module-exporter"
+RDEPENDS_perl-module-thread += "perl-module-strict"
+RDEPENDS_perl-module-thread += "perl-module-threads"
+RDEPENDS_perl-module-thread += "perl-module-threads-shared"
+RDEPENDS_perl-module-thread += "perl-module-warnings"
+RDEPENDS_perl-module-thread-queue += "perl-module-strict"
+RDEPENDS_perl-module-thread-queue += "perl-module-threads-shared"
+RDEPENDS_perl-module-thread-queue += "perl-module-warnings"
+RDEPENDS_perl-module-thread-semaphore += "perl-module-strict"
+RDEPENDS_perl-module-thread-semaphore += "perl-module-threads-shared"
+RDEPENDS_perl-module-thread-semaphore += "perl-module-warnings"
+RDEPENDS_perl-module-threads += "perl-module-config"
+RDEPENDS_perl-module-threads += "perl-module-overload"
+RDEPENDS_perl-module-threads += "perl-module-strict"
+RDEPENDS_perl-module-threads += "perl-module-warnings"
+RDEPENDS_perl-module-threads += "perl-module-xsloader"
+RDEPENDS_perl-module-threads-shared += "perl-module-strict"
+RDEPENDS_perl-module-threads-shared += "perl-module-warnings"
+RDEPENDS_perl-module-threads-shared += "perl-module-xsloader"
+RDEPENDS_perl-module-tie-array += "perl-module-strict"
+RDEPENDS_perl-module-tie-file += "perl-module-fcntl"
+RDEPENDS_perl-module-tie-file += "perl-module-posix"
+RDEPENDS_perl-module-tie-file += "perl-module-strict"
+RDEPENDS_perl-module-tie-handle += "perl-module-tie-stdhandle"
+RDEPENDS_perl-module-tie-handle += "perl-module-warnings-register"
+RDEPENDS_perl-module-tie-hash-namedcapture += "perl-module-strict"
+RDEPENDS_perl-module-tie-hash-namedcapture += "perl-module-xsloader"
+RDEPENDS_perl-module-tie-hash += "perl-module-warnings-register"
+RDEPENDS_perl-module-tie-memoize += "perl-module-strict"
+RDEPENDS_perl-module-tie-memoize += "perl-module-tie-hash"
+RDEPENDS_perl-module-tie-refhash += "perl-module-config"
+RDEPENDS_perl-module-tie-refhash += "perl-module-overload"
+RDEPENDS_perl-module-tie-refhash += "perl-module-strict"
+RDEPENDS_perl-module-tie-refhash += "perl-module-tie-hash"
+RDEPENDS_perl-module-tie-refhash += "perl-module-vars"
+RDEPENDS_perl-module-tie-scalar += "perl-module-warnings-register"
+RDEPENDS_perl-module-tie-stdhandle += "perl-module-strict"
+RDEPENDS_perl-module-tie-stdhandle += "perl-module-tie-handle"
+RDEPENDS_perl-module-tie-substrhash += "perl-module-integer"
+RDEPENDS_perl-module-time-gmtime += "perl-module-exporter"
+RDEPENDS_perl-module-time-gmtime += "perl-module-strict"
+RDEPENDS_perl-module-time-gmtime += "perl-module-time-tm"
+RDEPENDS_perl-module-time-hires += "perl-module-exporter"
+RDEPENDS_perl-module-time-hires += "perl-module-strict"
+RDEPENDS_perl-module-time-hires += "perl-module-xsloader"
+RDEPENDS_perl-module-time-local += "perl-module-config"
+RDEPENDS_perl-module-time-local += "perl-module-constant"
+RDEPENDS_perl-module-time-local += "perl-module-exporter"
+RDEPENDS_perl-module-time-local += "perl-module-parent"
+RDEPENDS_perl-module-time-local += "perl-module-strict"
+RDEPENDS_perl-module-time-localtime += "perl-module-exporter"
+RDEPENDS_perl-module-time-localtime += "perl-module-strict"
+RDEPENDS_perl-module-time-localtime += "perl-module-time-tm"
+RDEPENDS_perl-module-time-piece += "perl-module-constant"
+RDEPENDS_perl-module-time-piece += "perl-module-exporter"
+RDEPENDS_perl-module-time-piece += "perl-module-integer"
+RDEPENDS_perl-module-time-piece += "perl-module-overload"
+RDEPENDS_perl-module-time-piece += "perl-module-strict"
+RDEPENDS_perl-module-time-piece += "perl-module-time-local"
+RDEPENDS_perl-module-time-piece += "perl-module-time-seconds"
+RDEPENDS_perl-module-time-piece += "perl-module-xsloader"
+RDEPENDS_perl-module-time-seconds += "perl-module-constant"
+RDEPENDS_perl-module-time-seconds += "perl-module-exporter"
+RDEPENDS_perl-module-time-seconds += "perl-module-overload"
+RDEPENDS_perl-module-time-seconds += "perl-module-strict"
+RDEPENDS_perl-module-time-tm += "perl-module-class-struct"
+RDEPENDS_perl-module-time-tm += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-big5 += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-big5 += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-gb2312 += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-gb2312 += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-jisx0208 += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-jisx0208 += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-korean += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-korean += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-pinyin += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-pinyin += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-stroke += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-stroke += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-cjk-zhuyin += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-cjk-zhuyin += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate-locale += "perl-module-base"
+RDEPENDS_perl-module-unicode-collate-locale += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate-locale += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate += "perl-module-constant"
+RDEPENDS_perl-module-unicode-collate += "perl-module-strict"
+RDEPENDS_perl-module-unicode-collate += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-collate += "perl-module-xsloader"
+RDEPENDS_perl-module-unicode-normalize += "perl-module-exporter"
+RDEPENDS_perl-module-unicode-normalize += "perl-module-strict"
+RDEPENDS_perl-module-unicode-normalize += "perl-module-warnings"
+RDEPENDS_perl-module-unicode-normalize += "perl-module-xsloader"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-charnames"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-exporter"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-feature"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-if"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-integer"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-strict"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-unicode-normalize"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-utf8-heavy"
+RDEPENDS_perl-module-unicode-ucd += "perl-module-warnings"
+RDEPENDS_perl-module-user-grent += "perl-module-class-struct"
+RDEPENDS_perl-module-user-grent += "perl-module-exporter"
+RDEPENDS_perl-module-user-grent += "perl-module-strict"
+RDEPENDS_perl-module-user-pwent += "perl-module-class-struct"
+RDEPENDS_perl-module-user-pwent += "perl-module-config"
+RDEPENDS_perl-module-user-pwent += "perl-module-exporter"
+RDEPENDS_perl-module-user-pwent += "perl-module-strict"
+RDEPENDS_perl-module-user-pwent += "perl-module-warnings"
+RDEPENDS_perl-module-utf8 += "perl-module-utf8-heavy"
+RDEPENDS_perl-module-version += "perl-module-strict"
+RDEPENDS_perl-module-version += "perl-module-version-regex"
+RDEPENDS_perl-module-version += "perl-module-warnings-register"
+RDEPENDS_perl-module-version-regex += "perl-module-strict"
+RDEPENDS_perl-module-xsloader += "perl-module-dynaloader"
diff --git a/meta/recipes-devtools/perl/files/run-ptest b/meta/recipes-devtools/perl/files/run-ptest
new file mode 100644
index 0000000000..dad4d42916
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+cd t && PERL_BUILD_PACKAGING=1 ./TEST | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'
diff --git a/meta/recipes-devtools/perl/liberror-perl_0.17024.bb b/meta/recipes-devtools/perl/liberror-perl_0.17024.bb
deleted file mode 100644
index 6ae0e7e6f3..0000000000
--- a/meta/recipes-devtools/perl/liberror-perl_0.17024.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Error - Error/exception handling in an OO-ish way"
-DESCRIPTION = "The Error package provides two interfaces. Firstly \
-Error provides a procedural interface to exception handling. \
-Secondly Error is a base class for errors/exceptions that can \
-either be thrown, for subsequent catch, or can simply be recorded."
-
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8f3499d09ee74a050c0319391ff9d100"
-
-DEPENDS += "perl"
-
-SRC_URI = "http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Error-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "7e3676a7fb14f65f568f12d4b40a2a72"
-SRC_URI[sha256sum] = "074db7c783a67b0667eca64a4f6a0c3de94998afc92c01d6453163eb04b9150d"
-
-S = "${WORKDIR}/Error-${PV}"
-
-inherit cpan
-
-do_compile() {
- export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
- cpan_do_compile
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/liberror-perl_0.17028.bb b/meta/recipes-devtools/perl/liberror-perl_0.17028.bb
new file mode 100644
index 0000000000..8c6bbcba94
--- /dev/null
+++ b/meta/recipes-devtools/perl/liberror-perl_0.17028.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Error - Error/exception handling in an OO-ish way"
+DESCRIPTION = "The Error package provides two interfaces. Firstly \
+Error provides a procedural interface to exception handling. \
+Secondly Error is a base class for errors/exceptions that can \
+either be thrown, for subsequent catch, or can simply be recorded."
+HOMEPAGE = "https://github.com/shlomif/perl-error.pm"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8f3499d09ee74a050c0319391ff9d100"
+
+DEPENDS += "perl"
+
+RDEPENDS_${PN} += " \
+ perl-module-carp \
+ perl-module-exporter \
+ perl-module-scalar-util \
+ perl-module-overload \
+ perl-module-strict \
+ perl-module-vars \
+ perl-module-warnings \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ perl-module-base \
+ perl-module-file-spec \
+ perl-module-io-handle \
+ perl-module-ipc-open3 \
+ perl-module-lib \
+ perl-module-test-more \
+"
+
+SRC_URI = "http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Error-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "ec3522c60a43a368f19c0f89e2205cb1"
+SRC_URI[sha256sum] = "3ad85c5e58b31c8903006298424a51bba39f1840e324f5ae612eabc8b935e960"
+
+S = "${WORKDIR}/Error-${PV}"
+
+inherit cpan ptest-perl
+
+do_install_prepend() {
+ # test requires "-T" (taint) command line option
+ rm -rf ${B}/t/pod-coverage.t
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/libmodule-build-perl/run-ptest b/meta/recipes-devtools/perl/libmodule-build-perl/run-ptest
new file mode 100644
index 0000000000..0d63d1513b
--- /dev/null
+++ b/meta/recipes-devtools/perl/libmodule-build-perl/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+ perl -I inc -I blib -Mblib $case >$case.output 2>&1
+ ret=$?
+ cat $case.output
+ if [ $ret -ne 0 ]; then
+ echo "FAIL: ${case%.t}"
+ elif grep -i 'SKIP' $case.output; then
+ echo "SKIP: ${case%.t}"
+ else
+ echo "PASS: ${case%.t}"
+ fi
+
+ rm -f $case.output
+done
diff --git a/meta/recipes-devtools/perl/libmodule-build-perl_0.4229.bb b/meta/recipes-devtools/perl/libmodule-build-perl_0.4229.bb
new file mode 100644
index 0000000000..f759f862fb
--- /dev/null
+++ b/meta/recipes-devtools/perl/libmodule-build-perl_0.4229.bb
@@ -0,0 +1,103 @@
+SUMMARY = "Module::Build - Build and install Perl modules"
+DESCRIPTION = "Many Perl distributions use a Build.PL file instead of a \
+Makefile.PL file to drive distribution configuration, build, test and \
+installation. Traditionally, Build.PL uses Module::Build as the underlying \
+build system. This module provides a simple, lightweight, drop-in replacement. \
+Whereas Module::Build has over 6,700 lines of code; this module has less than \
+120, yet supports the features needed by most distributions."
+
+SECTION = "libs"
+
+HOMEPAGE = "https://metacpan.org/release/Module-Build"
+
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=949;endline=954;md5=624c06db56a2af4d70cf9edc29fcae1b"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Module-Build-${PV}.tar.gz \
+ file://run-ptest \
+ "
+SRC_URI[md5sum] = "1447d9e02e63f7a1643986789a8f1ba9"
+SRC_URI[sha256sum] = "1fe491a6cda914b01bc8e592faa2b5404e9f35915ca15322f8f2a8d8f9008c18"
+
+S = "${WORKDIR}/Module-Build-${PV}"
+
+inherit cpan_build ptest-perl
+
+# From:
+# https://github.com/rehsack/meta-cpan/blob/master/recipes-devel/module-build-perl/module-build-perl_0.4216.bb
+#
+do_patch_module_build () {
+ cd ${S}
+ sed -i -e 's,my $interpreter = $self->{properties}{perl};,my $interpreter = "${bindir}/perl";,g' lib/Module/Build/Base.pm
+}
+
+do_patch[postfuncs] += "do_patch_module_build"
+
+do_install_ptest() {
+ cp -r ${B}/inc ${D}${PTEST_PATH}
+ cp -r ${B}/blib ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}
+}
+
+RDEPENDS_${PN} += " \
+ perl-module-carp \
+ perl-module-cpan \
+ perl-module-config \
+ perl-module-cwd \
+ perl-module-data-dumper \
+ perl-module-encode \
+ perl-module-extutils-cbuilder \
+ perl-module-extutils-command \
+ perl-module-extutils-install \
+ perl-module-extutils-installed \
+ perl-module-extutils-mkbootstrap \
+ perl-module-extutils-packlist \
+ perl-module-extutils-parsexs \
+ perl-module-file-basename \
+ perl-module-file-compare \
+ perl-module-file-copy \
+ perl-module-file-find \
+ perl-module-file-glob \
+ perl-module-file-path \
+ perl-module-file-spec \
+ perl-module-file-spec-functions \
+ perl-module-getopt-long \
+ perl-module-metadata \
+ perl-module-perl-ostype \
+ perl-module-pod-man \
+ perl-module-tap-harness \
+ perl-module-text-abbrev \
+ perl-module-text-parsewords \
+ perl-module-utf8 \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ gcc \
+ make \
+ perl-module-blib \
+ perl-module-file-temp \
+ perl-module-lib \
+ perl-module-perlio \
+ perl-module-perlio-encoding \
+ perl-module-pod-text \
+ perl-module-tap-harness-env \
+ perl-module-tap-parser \
+ perl-module-tap-parser-scheduler \
+ perl-module-test-harness \
+ perl-module-test-more \
+"
+
+RPROVIDES_${PN} += "\
+ libmodule-build-base-perl \
+ libmodule-build-compat-perl \
+ libmodule-build-config-perl \
+ libmodule-build-cookbook-perl \
+ libmodule-build-dumper-perl \
+ libmodule-build-notes-perl \
+ libmodule-build-ppmaker-perl \
+ libmodule-build-platform-default-perl \
+ libmodule-build-platform-unix-perl \
+ libmodule-build-podparser-perl \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb b/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
new file mode 100644
index 0000000000..c44ee6340c
--- /dev/null
+++ b/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Skip tests when modules not available"
+DESCRIPTION = "Skip test scripts if modules are not available. \
+The requested modules will be loaded, and optionally have their versions \
+checked. If the module is missing, the test script will be skipped. Modules \
+that are found but fail to compile will exit with an error rather than skip."
+
+HOMEPAGE = "https://metacpan.org/release/Test-Needs"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+CPAN_NAME = "Test-Needs"
+CPAN_AUTHOR = "HAARG"
+
+LIC_FILES_CHKSUM = "file://README;md5=3f3ccd21a0a48aa313db212cc3b1bc09;beginline=88;endline=89"
+
+DEPENDS += "perl"
+
+SRC_URI = "https://cpan.metacpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "d5c96d51d8d5510f7c0b7f354c49af1c"
+SRC_URI[sha256sum] = "77f9fff0c96c5e09f34d0416b3533c3319f7cd0bb1f7fe8f8072ad59f433f0e5"
+
+S = "${WORKDIR}/${CPAN_NAME}-${PV}"
+
+inherit cpan ptest-perl
+
+RDEPENDS_${PN}-ptest += "perl-module-test-more perl-module-ipc-open3 perl-module-lib perl-module-version"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/liburi-perl_1.60.bb b/meta/recipes-devtools/perl/liburi-perl_1.60.bb
deleted file mode 100644
index 8809a44fc0..0000000000
--- a/meta/recipes-devtools/perl/liburi-perl_1.60.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Perl module to manipulate and access URI strings"
-DESCRIPTION = "This package contains the URI.pm module with friends. \
-The module implements the URI class. URI objects can be used to access \
-and manipulate the various components that make up these strings."
-
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://README;beginline=26;endline=30;md5=6c33ae5c87fd1c4897714e122dd9c23d"
-
-DEPENDS += "perl"
-
-SRC_URI = "http://www.cpan.org/authors/id/G/GA/GAAS/URI-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "70f739be8ce28b8baba7c5920ffee4dc"
-SRC_URI[sha256sum] = "1f92d3dc64acb8845e9917c945e22b9a5275aeb9ff924eb7873c3b7a5c0d2377"
-
-S = "${WORKDIR}/URI-${PV}"
-
-EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-
-inherit cpan
-
-do_compile() {
- export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
- cpan_do_compile
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/liburi-perl_1.74.bb b/meta/recipes-devtools/perl/liburi-perl_1.74.bb
new file mode 100644
index 0000000000..c27765bcbc
--- /dev/null
+++ b/meta/recipes-devtools/perl/liburi-perl_1.74.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Perl module to manipulate and access URI strings"
+DESCRIPTION = "This package contains the URI.pm module with friends. \
+The module implements the URI class. URI objects can be used to access \
+and manipulate the various components that make up these strings."
+
+HOMEPAGE = "http://search.cpan.org/dist/URI/"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "892f7183b178af40f205ba37128225db"
+SRC_URI[sha256sum] = "a9c254f45f89cb1dd946b689dfe433095404532a4543bdaab0b71ce0fdcdd53d"
+
+S = "${WORKDIR}/URI-${PV}"
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
+
+inherit cpan ptest-perl
+
+do_compile() {
+ export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+ cpan_do_compile
+}
+
+do_install_prepend() {
+ # these tests require "-T" (taint) command line option
+ rm -rf ${B}/t/cwd.t
+ rm -rf ${B}/t/file.t
+}
+
+RDEPENDS_${PN} += "perl-module-integer perl-module-mime-base64"
+RDEPENDS_${PN}-ptest += " \
+ libtest-needs-perl \
+ perl-module-test-more \
+ perl-module-test \
+ perl-module-utf8 \
+ perl-module-extutils-makemaker \
+ perl-module-net-domain \
+ perl-module-encode \
+ perl-module-extutils-mm-unix \
+ perl-module-file-spec-functions \
+ perl-module-perlio \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index 9561a59554..7c9b7696a7 100644
--- a/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
+++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -1,9 +1,10 @@
SUMMARY = "XML::Parser - A perl module for parsing XML documents"
+HOMEPAGE = "https://libexpat.github.io/"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1"
-DEPENDS += "expat expat-native"
+DEPENDS += "expat"
SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
SRC_URI[md5sum] = "af4813fe3952362451201ced6fbce379"
@@ -13,13 +14,22 @@ S = "${WORKDIR}/XML-Parser-${PV}"
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
-inherit cpan
+inherit cpan ptest-perl
# fix up sub MakeMaker project as arguments don't get propagated though
# see https://rt.cpan.org/Public/Bug/Display.html?id=28632
+do_configure_append_class-target() {
+ sed -E \
+ -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' \
+ -i Makefile Expat/Makefile
+}
+
do_configure_append() {
- sed 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' -i Makefile Expat/Makefile
+ sed -e 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' \
+ -i Makefile Expat/Makefile
sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile
+ # make sure these two do not build in parallel
+ sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i Expat/Makefile
}
do_compile() {
@@ -31,5 +41,15 @@ do_compile_class-native() {
cpan_do_compile
}
-BBCLASSEXTEND="native"
+do_install_ptest() {
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
+ cp -r ${B}/samples ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}/samples
+}
+
+RDEPENDS_${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more"
+BBCLASSEXTEND="native nativesdk"
diff --git a/meta/recipes-devtools/perl/libxml-perl_0.08.bb b/meta/recipes-devtools/perl/libxml-perl_0.08.bb
index 2c01976cad..818ae3d571 100644
--- a/meta/recipes-devtools/perl/libxml-perl_0.08.bb
+++ b/meta/recipes-devtools/perl/libxml-perl_0.08.bb
@@ -2,6 +2,7 @@ DESCRIPTION = "libxml-perl is a collection of smaller Perl modules, scripts, and
documents for working with XML in Perl. libxml-perl software \
works in combination with XML::Parser, PerlSAX, XML::DOM, \
XML::Grove and others."
+HOMEPAGE = "http://search.cpan.org/dist/libxml-perl/"
SUMMARY = "Collection of Perl modules for working with XML"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0+"
@@ -18,10 +19,12 @@ SRC_URI[sha256sum] = "4571059b7b5d48b7ce52b01389e95d798bf5cf2020523c153ff27b4981
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-inherit cpan
+inherit cpan ptest-perl
do_compile() {
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
cpan_do_compile
}
+RDEPENDS_${PN} += "perl-module-carp perl-module-overload perl-module-universal perl-module-io-handle"
+RDEPENDS_${PN}-ptest += "libxml-parser-perl perl-module-file-glob"
diff --git a/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb b/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb
deleted file mode 100644
index 2243bb2c26..0000000000
--- a/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Perl module for reading and writing XML"
-DESCRIPTION = "The XML::Simple Perl module provides a simple API layer \
-on top of an underlying XML parsing module to maintain XML files \
-(especially configuration files). It is a blunt rewrite of XML::Simple \
-(by Grant McLean) to use the XML::LibXML parser for XML structures, \
-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+"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fa1187fceda00eee10b62961407ea7be"
-DEPENDS += "libxml-parser-perl"
-
-SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "0914abddfce749453ed89b54029f2643"
-SRC_URI[sha256sum] = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49"
-
-S = "${WORKDIR}/XML-Simple-${PV}"
-
-EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/libxml-simple-perl_2.25.bb b/meta/recipes-devtools/perl/libxml-simple-perl_2.25.bb
new file mode 100644
index 0000000000..53788d5585
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-simple-perl_2.25.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Perl module for reading and writing XML"
+DESCRIPTION = "The XML::Simple Perl module provides a simple API layer \
+on top of an underlying XML parsing module to maintain XML files \
+(especially configuration files). It is a blunt rewrite of XML::Simple \
+(by Grant McLean) to use the XML::LibXML parser for XML structures, \
+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+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=cf206df8c9fe775f1d4c484386491eac"
+DEPENDS += "libxml-parser-perl"
+
+SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "bb841dce889a26c89a1c2739970e9fbc"
+SRC_URI[sha256sum] = "531fddaebea2416743eb5c4fdfab028f502123d9a220405a4100e68fc480dbf8"
+
+S = "${WORKDIR}/XML-Simple-${PV}"
+
+EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
+
+inherit cpan ptest-perl
+
+RDEPENDS_${PN} += " \
+ libxml-namespacesupport-perl \
+ libxml-parser-perl \
+ libxml-sax-perl \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ perl-module-file-temp \
+ perl-module-test-more \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/perl-native_5.22.1.bb b/meta/recipes-devtools/perl/perl-native_5.22.1.bb
deleted file mode 100644
index 1c21522be1..0000000000
--- a/meta/recipes-devtools/perl/perl-native_5.22.1.bb
+++ /dev/null
@@ -1,128 +0,0 @@
-require perl.inc
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-SRC_URI += "\
- file://Configure-multilib.patch \
- file://perl-configpm-switch.patch \
- file://native-nopacklist.patch \
- file://native-perlinc.patch \
- file://MM_Unix.pm.patch \
- file://debian/errno_ver.diff \
- file://dynaloaderhack.patch \
- file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
- file://perl-remove-nm-from-libswanted.patch \
- "
-
-SRC_URI[md5sum] = "6671e4829cbaf9cecafa9a84f141b0a3"
-SRC_URI[sha256sum] = "9e87317d693ce828095204be0d09af8d60b8785533fadea1a82b6f0e071e5c79"
-
-inherit native
-
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
-export LD="${CCLD}"
-
-do_configure () {
- ./Configure \
- -Dcc="${CC}" \
- -Dcflags="${CFLAGS}" \
- -Dldflags="${LDFLAGS}" \
- -Dcf_by="Open Embedded" \
- -Dprefix=${prefix} \
- -Dvendorprefix=${prefix} \
- -Dsiteprefix=${prefix} \
- \
- -Dbin=${STAGING_BINDIR}/${PN} \
- -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
- -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
- -Dvendorlib=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \
- -Dvendorarch=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \
- -Dsitelib=${STAGING_LIBDIR}/perl/site_perl/${PV} \
- -Dsitearch=${STAGING_LIBDIR}/perl/site_perl/${PV} \
- \
- -Duseshrplib \
- -Dusethreads \
- -Duseithreads \
- -Duselargefiles \
- -Dnoextensions=ODBM_File \
- -Ud_dosuid \
- -Ui_db \
- -Ui_ndbm \
- -Ui_gdbm \
- -Ui_gdbm_ndbm \
- -Ui_gdbmndbm \
- -Di_shadow \
- -Di_syslog \
- -Duseperlio \
- -Dman3ext=3pm \
- -Dsed=/bin/sed \
- -Uafs \
- -Ud_csh \
- -Uusesfio \
- -Uusenm -des
-}
-
-do_install () {
- oe_runmake 'DESTDIR=${D}' install
-
- # We need a hostperl link for building perl
- ln -sf perl${PV} ${D}${bindir}/hostperl
-
- ln -sf perl ${D}${libdir}/perl5
-
- install -d ${D}${libdir}/perl/${PV}/CORE \
- ${D}${datadir}/perl/${PV}/ExtUtils
-
- # Save native config
- install config.sh ${D}${libdir}/perl
- install lib/Config.pm ${D}${libdir}/perl/${PV}/
- install lib/ExtUtils/typemap ${D}${libdir}/perl/${PV}/ExtUtils/
-
- # perl shared library headers
- # reference perl 5.20.0-1 in debian:
- # https://packages.debian.org/experimental/i386/perl/filelist
- for i in av.h bitcount.h charclass_invlists.h config.h cop.h cv.h dosish.h \
- embed.h embedvar.h EXTERN.h fakesdio.h feature.h form.h git_version.h \
- gv.h handy.h hv_func.h hv.h inline.h INTERN.h intrpvar.h iperlsys.h \
- keywords.h l1_char_class_tab.h malloc_ctl.h metaconfig.h mg_data.h \
- mg.h mg_raw.h mg_vtable.h mydtrace.h nostdio.h opcode.h op.h \
- opnames.h op_reg_common.h overload.h pad.h parser.h patchlevel.h \
- perlapi.h perl.h perlio.h perliol.h perlsdio.h perlvars.h perly.h \
- pp.h pp_proto.h proto.h reentr.h regcharclass.h regcomp.h regexp.h \
- regnodes.h scope.h sv.h thread.h time64_config.h time64.h uconfig.h \
- unicode_constants.h unixish.h utf8.h utfebcdic.h util.h uudmap.h \
- vutil.h warnings.h XSUB.h
- do
- install $i ${D}${libdir}/perl/${PV}/CORE
- done
-
- # Those wrappers mean that perl installed from sstate (which may change
- # path location) works and that in the nativesdk case, the SDK can be
- # installed to a different location from the one it was built for.
- create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}'
- create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}'
-
- # Use /usr/bin/env nativeperl for the perl script.
- for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
- sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
- done
-}
-
-SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
-
-perl_sysroot_create_wrapper () {
- mkdir -p ${SYSROOT_DESTDIR}${bindir}
- # Create a wrapper that /usr/bin/env perl will use to get perl-native.
- # This MUST live in the normal bindir.
- cat > ${SYSROOT_DESTDIR}${bindir}/../nativeperl << EOF
-#!/bin/sh
-realpath=\`readlink -fn \$0\`
-exec \`dirname \$realpath\`/perl-native/perl "\$@"
-EOF
- chmod 0755 ${SYSROOT_DESTDIR}${bindir}/../nativeperl
- cat ${SYSROOT_DESTDIR}${bindir}/../nativeperl
-}
-
-# Fix the path in sstate
-SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
index d136c5c0e4..7152057762 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -3,27 +3,45 @@ inherit ptest
SRC_URI += "file://run-ptest \
"
+DEBUG_PREFIX_MAP_REGEX = "${@'\\|'.join(d.getVar('DEBUG_PREFIX_MAP').split())}"
+
do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/*
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
- tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
- --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x )
+ tar -c --exclude=try --exclude=a.out --exclude='*.o' --exclude=libperl.so* --exclude=Makefile --exclude=makefile --exclude=hostperl \
+ --exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx --exclude=symbian --exclude=haiku \
+ --exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4 --exclude=buildcustomize.pl \
+ --exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 --exclude=perlplan9.pod --exclude=Configure \
+ --exclude=veryclean.sh --exclude=realclean.sh --exclude=getioctlsizes \
+ --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=makefile.old \
+ --exclude=miniperl --exclude=generate_uudmap --exclude=patches --exclude='config.log' * | ( cd ${D}${PTEST_PATH} && tar -x )
+
+ ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
- sed -i -e "s,${D},,g" \
+ # Remove build host references from various scattered files...
+ find "${D}${PTEST_PATH}" \
+ \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \
+ -o -name 'h2xs' -o -name 'h2ph' \
+ -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man' -o -name 'pod2text' -o -name 'Makefile.config' \) \
+ -type f -exec sed -i \
+ -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
-e "s,-isystem${STAGING_INCDIR} ,,g" \
+ -e 's^${DEBUG_PREFIX_MAP_REGEX}^^g' \
+ -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_LIBDIR},${libdir},g" \
-e "s,${STAGING_BINDIR},${bindir},g" \
-e "s,${STAGING_INCDIR},${includedir},g" \
- -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_BINDIR_NATIVE}/,,g" \
-e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
- ${D}${PTEST_PATH}/lib/Config.pm
-
- ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ {} +
+ # Remove a useless timestamp...
+ sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst
}
python populate_packages_prepend() {
@@ -31,8 +49,12 @@ python populate_packages_prepend() {
# do_split_packages requires a pair of () in the regex, but we have nothing
# to match, so use an empty pair.
if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
- do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()',
+ do_split_packages(d, d.expand('${libdir}/perl/${PV}'), r'.*\.t()',
'${PN}-ptest%s', '%s', recursive=True, match_path=True)
}
-RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc sed libssp"
+RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc sed"
+
+# The perl-ptest package contains Perl internal modules and generating file
+# dependencies for it causes problems.
+SKIP_FILEDEPS_${PN}-ptest = '1'
diff --git a/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc b/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc
deleted file mode 100644
index 2c497fe6ab..0000000000
--- a/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc
+++ /dev/null
@@ -1,2563 +0,0 @@
-# To create/update the perl-rdepends_${PV}.inc use this piece of ugly script (modified for your arch/paths etc):
-
-#jiahongxu:5.20.0-r1$ pwd
-#/home/jiahongxu/yocto/build-20140618-perl/tmp/work/i586-poky-linux/perl/5.20.0-r1
-
-#1 cp -r packages-split packages-split.new && cd packages-split.new
-#2 find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
-#3 egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm"
-#| sed "s/\/.*\.pm: */ += /g;s/[\"\']//g;s/;.*/\"/g;s/+= .*\(require\|use\)\> */+= \"perl-module-/g;s/CPANPLUS::.*/cpanplus/g;s/CPAN::.*/cpan/g;s/::/-/g;s/ [^+\"].*//g;s/_/-/g;s/\.pl\"$/\"/;s/\"\?\$/\"/;s/(//;" | tr [:upper:] [:lower:]
-#| awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'
-#| grep -v -e "\-vms\-" -e module-5 -e "^$" -e "\\$" -e your -e tk -e autoperl -e html -e http -e parse-cpan -e perl-ostype -e ndbm-file -e module-mac -e fcgi -e lwp -e dbd -e dbix
-#| sort -u
-#| sed 's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;'
-#| egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-text-unidecode|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' > /tmp/perl-rdepends
-
-RDEPENDS_perl-misc += "perl perl-modules"
-RDEPENDS_${PN}-pod += "perl"
-
-# Some additional dependencies that the above doesn't manage to figure out
-RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes"
-RDEPENDS_${PN}-module-overload += "${PN}-module-overloading"
-
-
-# Depends list
-# copy contents of /tmp/perl-rdepends in this file
-RDEPENDS_${PN}-module-anydbm-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-anydbm-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-carp"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-config"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-constant"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-cpan"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-getopt-std"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-if"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-net-ping"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-user-pwent"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-vars"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-app-prove-state"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-base"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-carp"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-constant"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-getopt-long"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-harness"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-harness-env"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-app-prove-state-result"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-base"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-carp"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-constant"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-tap-parser-yamlish-reader"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-tap-parser-yamlish-writer"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-app-prove-state-result-test"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-carp"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-constant"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-prove-state-result-test += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-prove-state-result-test += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-constant"
-RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-io-compress-bzip2"
-RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-archive-tar"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-archive-tar-constant"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-carp"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-vars"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-archive-tar-constant"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-archive-tar-file"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-carp"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-config"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-io-zlib"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-strict"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-vars"
-RDEPENDS_${PN}-module-arybase += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-carp"
-RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-strict"
-RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-vars"
-RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-carp"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-constant"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-fatal"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-overload"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-parent"
-RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-b"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-constant"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-constant"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-lib"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-parent"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-scope-guard += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-scope-guard += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-autodie-scope-guard"
-RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-autodie-scope-guardstack"
-RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-skip += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-skip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autoloader += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autoloader += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-config"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autouse += "${PN}-module-carp"
-RDEPENDS_${PN}-module-base += "${PN}-module-carp"
-RDEPENDS_${PN}-module-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-base += "${PN}-module-vars"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-b-op-private"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-config"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-b-debug += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-debug += "${PN}-module-config"
-RDEPENDS_${PN}-module-b-debug += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-carp"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-feature"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-overloading"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-re"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-vars"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-benchmark += "${PN}-module-carp"
-RDEPENDS_${PN}-module-benchmark += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-benchmark += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-carp"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-constant"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-math-bigint-trace"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-overload"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-vars"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-bigint"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-carp"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigfloat-trace"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigint-trace"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-overload"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-vars"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-bigint"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-carp"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigint-trace"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigrat"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-overload"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-vars"
-RDEPENDS_${PN}-module-blib += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-blib += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-blib += "${PN}-module-vars"
-RDEPENDS_${PN}-module-b += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-b += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b-concise"
-RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b-terse"
-RDEPENDS_${PN}-module-b-showlex += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-terse += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-terse += "${PN}-module-b-concise"
-RDEPENDS_${PN}-module-b-terse += "${PN}-module-carp"
-RDEPENDS_${PN}-module-b-terse += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-xref += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-xref += "${PN}-module-config"
-RDEPENDS_${PN}-module-b-xref += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bytes += "${PN}-module-bytes-heavy"
-RDEPENDS_${PN}-module-bytes += "${PN}-module-carp"
-RDEPENDS_${PN}-module-carp-heavy += "${PN}-module-carp"
-RDEPENDS_${PN}-module-carp += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-carp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-carp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-carp"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-re"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-strict"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-class-struct += "${PN}-module-carp"
-RDEPENDS_${PN}-module-class-struct += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-class-struct += "${PN}-module-strict"
-RDEPENDS_${PN}-module-class-struct += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-bytes "
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-carp "
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-constant"
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-strict "
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-warnings "
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-bytes "
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-carp "
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-constant"
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-strict "
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-warnings "
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-bytes "
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-carp "
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-constant"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-gzip"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-gzip-constants"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-handle "
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-uncompress-gunzip"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-strict "
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-warnings "
-RDEPENDS_${PN}-module-config-extensions += "${PN}-module-config"
-RDEPENDS_${PN}-module-config-extensions += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-config-extensions += "${PN}-module-strict"
-RDEPENDS_${PN}-module-config-extensions += "${PN}-module-vars"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-config"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-strict"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-vars"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-constant += "${PN}-module-carp"
-RDEPENDS_${PN}-module-constant += "${PN}-module-strict"
-RDEPENDS_${PN}-module-constant += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-strict"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-vars"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-version"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-b"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-carp"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-config"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-dirhandle"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-manifest"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-lib"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ping"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-overload"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-posix"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-safe"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-strict"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-sys-hostname"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-term-readline"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-vars"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-vars"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-b-deparse"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-carp"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-config"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-constant"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-overload"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter-int32 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-int32 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter-null += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-null += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-db += "${PN}-module-strict"
-RDEPENDS_${PN}-module-deprecate += "${PN}-module-carp"
-RDEPENDS_${PN}-module-deprecate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-deprecate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-devel-peek += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-devel-peek += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-getopt-long"
-RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-strict"
-RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-vars"
-RDEPENDS_${PN}-module-devel-selfstubber += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-devel-selfstubber += "${PN}-module-selfloader"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-carp"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-config"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-getopt-std"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-strict"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-text-tabs"
-RDEPENDS_${PN}-module-digest-base += "${PN}-module-carp"
-RDEPENDS_${PN}-module-digest-base += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-digest-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest-base += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-carp"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-digest"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-digest-base"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-digest += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-carp"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-digest-base"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-integer"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dirhandle += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dirhandle += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-dynaloader += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dynaloader += "${PN}-module-config"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-byte += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-byte += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-byte += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-byte += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-vars"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-encode-cn-hz"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-config += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-config += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-overload"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-encode-mime-name"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-encode-unicode"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-encode-cjkconstants"
-RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-vars"
-RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode-cjkconstants"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode-jp-h2z"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-encode-jp-jis7"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-encode-cjkconstants"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-encode-kr-2022-kr"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-encode-cjkconstants"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-mime-name += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-mime-name += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-encode += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode += "${PN}-module-encode-alias"
-RDEPENDS_${PN}-module-encode += "${PN}-module-encode-config"
-RDEPENDS_${PN}-module-encode += "${PN}-module-encode-configlocal-pm"
-RDEPENDS_${PN}-module-encode += "${PN}-module-encode-encoding"
-RDEPENDS_${PN}-module-encode += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-encode += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-tw += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-tw += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-tw += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-tw += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-re"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-config"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-filter-util-call"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-i18n-langinfo"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encoding-warnings += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encoding-warnings += "${PN}-module-strict"
-RDEPENDS_${PN}-module-english += "${PN}-module-carp "
-RDEPENDS_${PN}-module-english += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-env += "${PN}-module-config"
-RDEPENDS_${PN}-module-env += "${PN}-module-tie-array"
-RDEPENDS_${PN}-module-errno += "${PN}-module-carp"
-RDEPENDS_${PN}-module-errno += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-errno += "${PN}-module-strict"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-carp"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-feature"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-strict"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-version"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-carp"
-RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-strict"
-RDEPENDS_${PN}-module-exporter += "${PN}-module-exporter-heavy"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-extutils-mksymlists"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-temp"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-ipc-cmd"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-extutils-cbuilder-base"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-extutils-cbuilder-base"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-extutils-cbuilder-base"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-extutils-command"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-extutils-install"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-getopt-long"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-test-harness"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-constant"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-extutils-constant-utils"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-proxysubs"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-utils"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-xs"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-extutils-constant-utils"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-extutils-constant-xs"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-constant"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-posix"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant-base"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant-utils"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-extutils-liblist"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-getopt-std"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-extutils-packlist"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-autosplit"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-extutils-packlist"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-compare"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-extutils-liblist-kid"
-RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-config += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-makemaker-config += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-base"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-encode"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-encode-alias"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-i18n-langinfo"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-b"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-makemaker-version"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-manifest"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-mm"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-my"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-version"
-RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-extutils-makemaker-version-regex"
-RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-makemaker-version-regex += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-version-regex += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-b"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-extutils-makemaker-version-regex"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-locale"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-overload"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-universal"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-extutils-embed"
-RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-autosplit"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-cpan"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-version"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-mm-win32"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-darwin += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-darwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-macos += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-mm-win32"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-liblist"
-RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-qnx += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-qnx += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-dirhandle"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-encode"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-liblist"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-version"
-RDEPENDS_${PN}-module-extutils-mm-uwin += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-uwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-liblist-kid"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-vos += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-vos += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-extutils-mm-win32"
-RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-my += "${PN}-module-extutils-mm"
-RDEPENDS_${PN}-module-extutils-my += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-parsexs-countlines += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs-eval += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs-eval += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-constants"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-countlines"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-eval"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-utilities"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-re"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-extutils-parsexs-constants"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-extutils-typemaps"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-lib"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-extutils-typemaps"
-RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps-inputmap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps-inputmap += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-re"
-RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-parsexs"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-parsexs-constants"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-inputmap"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-outputmap"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-type"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-extutils-typemaps"
-RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-exception-system"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-hints"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-scopeutil"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-carp"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-config"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-constant"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-posix"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-strict"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-tie-refhash"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-fcntl += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-fcntl += "${PN}-module-strict"
-RDEPENDS_${PN}-module-fcntl += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-feature += "${PN}-module-carp"
-RDEPENDS_${PN}-module-fields += "${PN}-module-base"
-RDEPENDS_${PN}-module-fields += "${PN}-module-carp"
-RDEPENDS_${PN}-module-fields += "${PN}-module-hash-util"
-RDEPENDS_${PN}-module-fields += "${PN}-module-strict"
-RDEPENDS_${PN}-module-fields += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-re"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-filecache += "${PN}-module-carp"
-RDEPENDS_${PN}-module-filecache += "${PN}-module-parent"
-RDEPENDS_${PN}-module-filecache += "${PN}-module-strict"
-RDEPENDS_${PN}-module-filecache += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-compare += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-compare += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-compare += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-compare += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-config"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-constant"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-temp"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-ipc-cmd"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-locale-maketext-simple"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-load"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-params-check"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-config"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-file-glob"
-RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-glob += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-glob += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-glob += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-filehandle += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-filehandle += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-filehandle += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-filehandle += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-constant"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-cwd "
-RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-constant"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-overload "
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-errno"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-io-seekable"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-overload"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-parent"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-posix"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-vars"
-RDEPENDS_${PN}-module-filter-simple += "${PN}-module-carp"
-RDEPENDS_${PN}-module-filter-simple += "${PN}-module-filter-util-call"
-RDEPENDS_${PN}-module-filter-simple += "${PN}-module-text-balanced"
-RDEPENDS_${PN}-module-filter-simple += "${PN}-module-vars"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-carp "
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-strict"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-vars"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-carp"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-constant"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-overload"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-pod-usage"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-strict"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-vars"
-RDEPENDS_${PN}-module-getopt-std += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-strict"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-carp"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-hash-util-fieldhash"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-strict"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-overload"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-posix"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-carp"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-i18n-langtags"
-RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-vars"
-RDEPENDS_${PN}-module-i18n-langtags-list += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-langtags-list += "${PN}-module-vars"
-RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-vars"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-compress-raw-bzip2"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-encode"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-file-globmapper"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-handle "
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-adapter-bzip2"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-base"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-adapter-deflate"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-rawdeflate"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-zlib-constants"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-adapter-deflate"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-gzip-constants"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-rawdeflate"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-zlib-extra"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-adapter-deflate"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-base"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-config"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-adapter-deflate"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-adapter-identity"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-bzip2 "
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-rawdeflate"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-zip-constants"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-zlib-extra"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-io-compress-gzip-constants"
-RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-file-stat"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-io-seekable"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-selectsaver"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-io"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-selectsaver"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-poll += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-poll += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-poll += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-select += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-select += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-select += "${PN}-module-vars"
-RDEPENDS_${PN}-module-io-select += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-errno"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-socket"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-base"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-errno"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-posix"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-socket"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-errno"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-socket-inet"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-socket-unix"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-socket"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-compress-raw-bzip2"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-io-compress-zip-constants "
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-adapter-inflate"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-base"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-gunzip"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-inflate"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-rawinflate"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-unzip"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-io-uncompress-base"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-carp "
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-io-file "
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-uncompress-adapter-bunzip2"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-uncompress-base"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-gzip-constants"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-zlib-extra"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-uncompress-rawinflate"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-compress-zlib-constants"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-uncompress-rawinflate"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-uncompress-adapter-inflate"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-uncompress-base"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-zip-constants"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-zlib-extra"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-adapter-identity"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-adapter-inflate"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-rawinflate"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-posix"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-tie-handle"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-constant"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-ipc-open3"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-locale-maketext-simple"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-load"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-params-check"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-posix"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-socket"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-time-hires"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-ipc-sysv"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-ipc-open3"
-RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-constant"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-io-pipe"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-posix"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-ipc-sysv"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-ipc-sysv"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-config"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-vars"
-RDEPENDS_${PN}-module-json-pp-boolean += "${PN}-module-json-pp"
-RDEPENDS_${PN}-module-json-pp-boolean += "${PN}-module-strict"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-b"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-base"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-encode"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-overload"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-subs"
-RDEPENDS_${PN}-module-less += "${PN}-module-strict"
-RDEPENDS_${PN}-module-less += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-lib += "${PN}-module-carp"
-RDEPENDS_${PN}-module-lib += "${PN}-module-config"
-RDEPENDS_${PN}-module-lib += "${PN}-module-strict"
-RDEPENDS_${PN}-module-list-util += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-list-util += "${PN}-module-strict"
-RDEPENDS_${PN}-module-list-util += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-list-util-xs += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-list-util-xs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-loaded += "${PN}-module-carp"
-RDEPENDS_${PN}-module-loaded += "${PN}-module-strict"
-RDEPENDS_${PN}-module-loaded += "${PN}-module-vars"
-RDEPENDS_${PN}-module-load += "${PN}-module-carp"
-RDEPENDS_${PN}-module-load += "${PN}-module-config"
-RDEPENDS_${PN}-module-load += "${PN}-module-constant"
-RDEPENDS_${PN}-module-load += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-load += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-load += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-load += "${PN}-module-locale-maketext-simple"
-RDEPENDS_${PN}-module-load += "${PN}-module-corelist"
-RDEPENDS_${PN}-module-load += "${PN}-module-params-check"
-RDEPENDS_${PN}-module-load += "${PN}-module-strict"
-RDEPENDS_${PN}-module-load += "${PN}-module-vars"
-RDEPENDS_${PN}-module-load += "${PN}-module-version"
-RDEPENDS_${PN}-module-load += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-constant"
-RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-country-codes"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-country-retired"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-currency-codes"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-currency-retired"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-langext-codes"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-langext-retired"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-langfam-codes"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-langfam-retired"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langfam-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langfam-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-language-codes"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-language-retired"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-langvar-codes"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-langvar-retired"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-script-codes"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-script-retired"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-country += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-country += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-country += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-currency += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-currency += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-currency += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-language += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-language += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-language += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-maketext-gutsloader += "${PN}-module-locale-maketext"
-RDEPENDS_${PN}-module-locale-maketext-guts += "${PN}-module-locale-maketext"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-i18n-langtags"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-i18n-langtags-detect"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-integer"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-vars"
-RDEPENDS_${PN}-module-locale-maketext-simple += "${PN}-module-base"
-RDEPENDS_${PN}-module-locale-maketext-simple += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale += "${PN}-module-config"
-RDEPENDS_${PN}-module-locale-script += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-script += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-script += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-carp"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigint-calcemu += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint-calcemu += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-carp"
-RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-constant"
-RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-integer"
-RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-math-bigint-calc"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-carp"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-carp"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-config"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-math-trig += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-trig += "${PN}-module-math-complex"
-RDEPENDS_${PN}-module-math-trig += "${PN}-module-strict"
-RDEPENDS_${PN}-module-memoize-anydbm-file += "${PN}-module-vars"
-RDEPENDS_${PN}-module-memoize-expirefile += "${PN}-module-carp"
-RDEPENDS_${PN}-module-memoize-expire += "${PN}-module-carp"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-carp"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-config"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-strict"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-vars"
-RDEPENDS_${PN}-module-memoize-sdbm-file += "${PN}-module-sdbm-file"
-RDEPENDS_${PN}-module-memoize-storable += "${PN}-module-carp"
-RDEPENDS_${PN}-module-memoize-storable += "${PN}-module-storable"
-RDEPENDS_${PN}-module-meta-notation += "${PN}-module-strict"
-RDEPENDS_${PN}-module-meta-notation += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-strict"
-RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-vars"
-RDEPENDS_${PN}-module-mro += "${PN}-module-strict"
-RDEPENDS_${PN}-module-mro += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-mro += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-constant"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-config += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-config += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-config += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-config += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-posix"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-net-ftp-dataconn"
-RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-errno"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-net-ftp-i"
-RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-net-ftp-dataconn"
-RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-net-ftp-i"
-RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-io-socket-ip"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-ftp-a"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-netrc"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-netrc += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-netrc += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-net-netrc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-netrc += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-io-socket-ip"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-constant"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-posix"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-time-hires"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-io-socket-ip"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-netrc"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-protoent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-net-protoent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-protoent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-protoent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-servent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-net-servent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-servent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-servent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-io-socket-ip"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-next += "${PN}-module-carp"
-RDEPENDS_${PN}-module-next += "${PN}-module-overload"
-RDEPENDS_${PN}-module-next += "${PN}-module-strict"
-RDEPENDS_${PN}-module-odbm-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-odbm-file += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-odbm-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-odbm-file += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-ok += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ok += "${PN}-module-test-more"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-carp"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-strict"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-subs"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-open += "${PN}-module-carp"
-RDEPENDS_${PN}-module-open += "${PN}-module-encode"
-RDEPENDS_${PN}-module-open += "${PN}-module-encoding"
-RDEPENDS_${PN}-module-open += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-o += "${PN}-module-b"
-RDEPENDS_${PN}-module-o += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ops += "${PN}-module-opcode"
-RDEPENDS_${PN}-module-overloading += "${PN}-module-overload-numbers"
-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-params-check += "${PN}-module-carp"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-locale-maketext-simple"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-strict"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-vars"
-RDEPENDS_${PN}-module-parent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-parent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-perlfaq += "${PN}-module-strict"
-RDEPENDS_${PN}-module-perlfaq += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-perlio-encoding += "${PN}-module-strict"
-RDEPENDS_${PN}-module-perlio-encoding += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-perlio-scalar += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-perlio-via += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-perlio-via-quotedprint += "${PN}-module-mime-quotedprint"
-RDEPENDS_${PN}-module-perlio-via-quotedprint += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-pod-parser"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-pod-parseutils"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-functions += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-functions += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-inputobjects += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-inputobjects += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-subs"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-pod-inputobjects"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-getoptsoo += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-getoptsoo += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-temp"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-pod-perldoc-getoptsoo"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-pod-text-color"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-pod-checker"
-RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-ipc-open3"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-pod-man"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-pod-perldoc-topod"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-pod-man"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-pod-text-termcap"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-pod-text"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-pod-select"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-select += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-select += "${PN}-module-pod-parser"
-RDEPENDS_${PN}-module-pod-select += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-select += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-integer"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-pod-simple-transcode"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-pod-simple-methody"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-overload"
-RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-pod-simple-blackbox"
-RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-integer"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-escapes"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-blackbox"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-linksection"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-tiedoutfh"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-progress += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-pod-simple-pullparsertoken"
-RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparserendtoken"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparserstarttoken"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparsertexttoken"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-pod-simple-pullparsertoken"
-RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-pod-simple-pullparsertoken"
-RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-pullparsertoken += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-integer"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-pod-simple-pullparser"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-pod-simple-methody"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-transcodedumb += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-transcodedumb += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-transcode += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-pod-text"
-RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-term-ansicolor"
-RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-pod-text"
-RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-pod-text"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-posix"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-term-cap"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-vars"
-RDEPENDS_${PN}-module-posix += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-posix += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-posix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-posix += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-posix += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-posix += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-re += "${PN}-module-carp"
-RDEPENDS_${PN}-module-re += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-re += "${PN}-module-strict"
-RDEPENDS_${PN}-module-re += "${PN}-module-term-cap"
-RDEPENDS_${PN}-module-re += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-re += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-safe += "${PN}-module-b"
-RDEPENDS_${PN}-module-safe += "${PN}-module-carp"
-RDEPENDS_${PN}-module-safe += "${PN}-module-carp-heavy"
-RDEPENDS_${PN}-module-safe += "${PN}-module-opcode"
-RDEPENDS_${PN}-module-safe += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-safe += "${PN}-module-strict"
-RDEPENDS_${PN}-module-safe += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-scalar-util += "${PN}-module-carp"
-RDEPENDS_${PN}-module-scalar-util += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-scalar-util += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-scalar-util += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-search-dict += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-search-dict += "${PN}-module-feature"
-RDEPENDS_${PN}-module-search-dict += "${PN}-module-strict"
-RDEPENDS_${PN}-module-selectsaver += "${PN}-module-carp"
-RDEPENDS_${PN}-module-selectsaver += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-selfloader += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-selfloader += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-selfloader += "${PN}-module-strict"
-RDEPENDS_${PN}-module-selfloader += "${PN}-module-vars"
-RDEPENDS_${PN}-module-sigtrap += "${PN}-module-carp"
-RDEPENDS_${PN}-module-sigtrap += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-socket += "${PN}-module-carp"
-RDEPENDS_${PN}-module-socket += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-socket += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-socket += "${PN}-module-strict"
-RDEPENDS_${PN}-module-socket += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-socket += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-sort += "${PN}-module-carp"
-RDEPENDS_${PN}-module-sort += "${PN}-module-strict"
-RDEPENDS_${PN}-module-storable += "${PN}-module-carp"
-RDEPENDS_${PN}-module-storable += "${PN}-module-config"
-RDEPENDS_${PN}-module-storable += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-storable += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-storable += "${PN}-module-vars"
-RDEPENDS_${PN}-module-storable += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-sub-util += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sub-util += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-sub-util += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sub-util += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-symbol += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-carp"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-posix"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-carp"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-posix"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-socket"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-sys-hostname"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-vars"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-tap-base += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-base += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-base += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-posix"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-tap-formatter-color"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-posix"
-RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-posix"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-tap-formatter-file-session"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-tap-object"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-object += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-object += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-object += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-benchmark"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-tap-parser-resultfactory"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-tap-parser-yamlish-reader"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-config"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-grammar"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-iterator"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-result"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-resultfactory"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-source"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-executable"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-file"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-handle"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-perl"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-rawtap"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-bailout"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-comment"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-plan"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-pragma"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-test"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-unknown"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-version"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-yaml"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-tap-parser-scheduler-job"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-tap-parser-scheduler-spinner"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-tap-parser-iterator-process"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-tap-parser-iterator-stream"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-tap-parser-iterator-stream"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-tap-parser-iterator"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-config"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-tap-parser-iterator-process"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-tap-parser-iterator-array"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-carp"
-RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-strict"
-RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-term-cap += "${PN}-module-carp"
-RDEPENDS_${PN}-module-term-cap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-term-cap += "${PN}-module-vars"
-RDEPENDS_${PN}-module-term-complete += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-term-complete += "${PN}-module-strict"
-RDEPENDS_${PN}-module-term-readline += "${PN}-module-strict"
-RDEPENDS_${PN}-module-term-readline += "${PN}-module-term-cap"
-RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-test-builder"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-config"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-perlio"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-test-builder-tester-color += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-builder-tester-color += "${PN}-module-test-builder-tester"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-carp"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-test-builder"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-base"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-config"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-constant"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-harness"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-aggregator"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-source"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-sourcehandler-perl"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-test-builder-module"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-test += "${PN}-module-carp"
-RDEPENDS_${PN}-module-test += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test += "${PN}-module-file-temp"
-RDEPENDS_${PN}-module-test += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test += "${PN}-module-vars"
-RDEPENDS_${PN}-module-test-simple += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-simple += "${PN}-module-test-builder-module"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-config"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-test-builder"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-vars"
-RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-test-tester-capture"
-RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-vars"
-RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-builder"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-tester-capturerunner"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-tester-delegate"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-vars"
-RDEPENDS_${PN}-module-text-abbrev += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-carp"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-overload"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-selfloader"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-strict"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-vars"
-RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-carp"
-RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-strict"
-RDEPENDS_${PN}-module-text-tabs += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-tabs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-text-tabs += "${PN}-module-vars"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-re"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-text-tabs"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-vars"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-thread += "${PN}-module-config"
-RDEPENDS_${PN}-module-thread += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-thread += "${PN}-module-strict"
-RDEPENDS_${PN}-module-thread += "${PN}-module-threads"
-RDEPENDS_${PN}-module-thread += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-thread += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-carp"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-strict"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-carp"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-strict"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-threads += "${PN}-module-carp"
-RDEPENDS_${PN}-module-threads += "${PN}-module-config"
-RDEPENDS_${PN}-module-threads += "${PN}-module-overload"
-RDEPENDS_${PN}-module-threads += "${PN}-module-strict"
-RDEPENDS_${PN}-module-threads += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-threads += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-carp"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-strict"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-tie-array += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-array += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-array += "${PN}-module-vars"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-posix"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-tie-handle += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-handle += "${PN}-module-tie-stdhandle"
-RDEPENDS_${PN}-module-tie-handle += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-tie-hash-namedcapture += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-hash-namedcapture += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-tie-hash += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-hash += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-tie-memoize += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-memoize += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-config"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-overload"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-vars"
-RDEPENDS_${PN}-module-tie-scalar += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-scalar += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-tie-handle"
-RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-vars"
-RDEPENDS_${PN}-module-tie-substrhash += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-substrhash += "${PN}-module-integer"
-RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-time-tm"
-RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-vars"
-RDEPENDS_${PN}-module-time-hires += "${PN}-module-carp"
-RDEPENDS_${PN}-module-time-hires += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-time-hires += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-hires += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-carp"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-config"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-constant"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-vars"
-RDEPENDS_${PN}-module-time-localtime += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-localtime += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-localtime += "${PN}-module-time-tm"
-RDEPENDS_${PN}-module-time-localtime += "${PN}-module-vars"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-carp"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-constant"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-integer"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-overload"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-time-seconds"
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-constant"
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-overload "
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-vars"
-RDEPENDS_${PN}-module-time-tm += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-time-tm += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-big5 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-big5 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-gb2312 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-gb2312 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-jisx0208 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-jisx0208 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-unicode-collate"
-RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-pinyin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-pinyin += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-stroke += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-stroke += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-zhuyin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-zhuyin += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-base"
-RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-carp"
-RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-carp"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-constant"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-carp"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-constant"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-carp"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-charnames"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-feature"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-if"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-integer"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-unicode-normalize"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-unicore"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-utf8-heavy"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicore += "${PN}-module-integer"
-RDEPENDS_${PN}-module-universal += "${PN}-module-carp"
-RDEPENDS_${PN}-module-user-grent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-user-grent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-user-grent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-user-grent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-carp"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-config"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-utf8 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-utf8 += "${PN}-module-utf8-heavy"
-RDEPENDS_${PN}-module-version += "${PN}-module-strict"
-RDEPENDS_${PN}-module-version += "${PN}-module-vars"
-RDEPENDS_${PN}-module-version += "${PN}-module-version-regex"
-RDEPENDS_${PN}-module-version-regex += "${PN}-module-strict"
-RDEPENDS_${PN}-module-version-regex += "${PN}-module-vars"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-b"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-config"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-if"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-overload"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-posix"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-universal"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-vars"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-version-regex"
-RDEPENDS_${PN}-module-xsloader += "${PN}-module-carp"
-RDEPENDS_${PN}-module-xsloader += "${PN}-module-dynaloader"
diff --git a/meta/recipes-devtools/perl/perl.inc b/meta/recipes-devtools/perl/perl.inc
deleted file mode 100644
index 3313a9436b..0000000000
--- a/meta/recipes-devtools/perl/perl.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-SUMMARY = "Perl scripting language"
-HOMEPAGE = "http://www.perl.org/"
-SECTION = "devel"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
- file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
-
-SRC_URI = "http://www.cpan.org/src/5.0/${BP}.tar.xz"
-
-inherit upstream-version-is-even
diff --git a/meta/recipes-devtools/perl/perl/Configure-multilib.patch b/meta/recipes-devtools/perl/perl/Configure-multilib.patch
deleted file mode 100644
index 9625b0b84e..0000000000
--- a/meta/recipes-devtools/perl/perl/Configure-multilib.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status:Pending
-
-Index: perl-5.12.3/Configure
-===================================================================
---- perl-5.12.3.orig/Configure
-+++ perl-5.12.3/Configure
-@@ -1316,8 +1316,9 @@ loclibpth="/usr/local/lib /opt/local/lib
- loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
-
- : general looking path for locating libraries
--glibpth="/lib /usr/lib $xlibpth"
-+glibpth="/lib /usr/lib /lib64 /usr/lib64 $xlibpth"
- glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
-+test -f /usr/lib/*-linux-gnu/libc.so && glibpth="/usr/lib/*-linux-gnu $glibpth"
- test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
- test -f /shlib/libc.so && glibpth="/shlib $glibpth"
- test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
diff --git a/meta/recipes-devtools/perl/perl/MM_Unix.pm.patch b/meta/recipes-devtools/perl/perl/MM_Unix.pm.patch
deleted file mode 100644
index eb92ccb678..0000000000
--- a/meta/recipes-devtools/perl/perl/MM_Unix.pm.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status:Pending
-
-The perl-native should be relocatable while re-use sstate-cache from
-another build, especially the original build was renamed/removed.
-
-To get the MakeMaker.pm works in this case, we need perl wrapper here
-instead of real perl binary.
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-===================================================================
---- perl-5.12.3/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm.orig 2011-08-12 16:07:30.000000000 +0800
-+++ perl-5.12.3/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2011-08-12 16:08:56.000000000 +0800
-@@ -1019,6 +1019,9 @@
- }
-
- foreach my $name (@$names){
-+ # Getting MakeMaker.pm use perl wrapper instead of 'perl.real' directly
-+ $name =~ s/perl\.real/perl/ if ($name =~ /perl\.real/);
-+
- foreach my $dir (@$dirs){
- next unless defined $dir; # $self->{PERL_SRC} may be undefined
- my ($abs, $val);
diff --git a/meta/recipes-devtools/perl/perl/Makefile.SH.patch b/meta/recipes-devtools/perl/perl/Makefile.SH.patch
deleted file mode 100644
index edf49d60e4..0000000000
--- a/meta/recipes-devtools/perl/perl/Makefile.SH.patch
+++ /dev/null
@@ -1,375 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- Makefile.SH | 145 +++++++++++++++++++++++++++--------------------------------
- 1 file changed, 67 insertions(+), 78 deletions(-)
-
-Index: perl-5.22.1/Makefile.SH
-===================================================================
---- perl-5.22.1.orig/Makefile.SH
-+++ perl-5.22.1/Makefile.SH
-@@ -39,10 +39,10 @@ case "$useshrplib" in
- true)
- # Prefix all runs of 'miniperl' and 'perl' with
- # $ldlibpth so that ./perl finds *this* shared libperl.
-- case "$LD_LIBRARY_PATH" in
-- '') ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `" ;;
-- *) ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `:` quote "$LD_LIBRARY_PATH" `" ;;
-- esac
-+ #case "$LD_LIBRARY_PATH" in
-+ #'') ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `" ;;
-+ #*) ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `:` quote "$LD_LIBRARY_PATH" `" ;;
-+ #esac
-
- pldlflags="$cccdlflags"
- static_ldflags=''
-@@ -122,10 +122,11 @@ true)
- *)
- eval "ldlibpthval=\"\$$ldlibpthname\""
-
-- case "$ldlibpthval" in
-- '') ldlibpth="$ldlibpthname=` quote "$pwd" `" ;;
-- *) ldlibpth="$ldlibpthname=` quote "$pwd" `:` quote "$ldlibpthval" `" ;;
-- esac
-+# We compile in the library path in OE from cross-compile, so lets not do this
-+# case "$ldlibpthval" in
-+# '') ldlibpth="$ldlibpthname=` quote "$pwd" `" ;;
-+# *) ldlibpth="$ldlibpthname=` quote "$pwd" `:` quote "$ldlibpthval" `" ;;
-+# esac
-
- ;;
- esac
-@@ -141,18 +142,7 @@ true)
- # INSTALL file, under "Building a shared perl library".
- # If there is no pre-existing $libperl, we don't need
- # to do anything further.
-- if test -f $archlib/CORE/$libperl; then
-- rm -f preload
-- cat <<'EOT' > preload
--#! /bin/sh
--lib=$1
--shift
--test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD"
--exec "$@"
--EOT
-- chmod 755 preload
-- ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl"
-- fi
-+ echo linux libraries overwritten by cross-compile patches
- ;;
- os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
- ;;
-@@ -566,13 +556,23 @@ splintfiles = $(c1)
- @echo `$(CCCMDSRC)` -S $*.c
- @`$(CCCMDSRC)` -S $*.c
-
--all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
-- @echo " ";
-- @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
--
--$(MANIFEST_SRT): MANIFEST $(PERL_EXE)
-- @$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
-- $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
-+#all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
-+# @echo " ";
-+# @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
-+
-+all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) miniperl $(unidatafiles)
-+
-+more: $(generated_pods) $(private) $(public)
-+
-+more2: $(dynamic_ext)
-+
-+more3: $(nonxs_ext)
-+
-+more4: extras.make $(MANIFEST_SRT)
-+
-+$(MANIFEST_SRT): MANIFEST
-+ @$(MINIPERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
-+ $(MINIPERL) Porting/manisort -q -o MANIFEST; sh -c true)
- @touch $(MANIFEST_SRT)
-
- .PHONY: all utilities
-@@ -581,7 +581,7 @@ $(MANIFEST_SRT): MANIFEST $(PERL_EXE)
- # by make_patchnum.pl.
- git_version.h: lib/Config_git.pl
-
--lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl
-+lib/Config_git.pl: make_patchnum.pl
- $(MINIPERL) make_patchnum.pl
-
- # make sure that we recompile perl.c if the git version changes
-@@ -594,7 +594,7 @@ perl$(OBJ_EXT): git_version.h
- # loading, we need to build perl first.
- case "$usedl$static_cwd" in
- defineundef)
-- util_deps='$(MINIPERL_EXE) $(CONFIGPM) lib/auto/Cwd/Cwd$(DLSUFFIX) FORCE'
-+ util_deps='$(CONFIGPM) lib/auto/Cwd/Cwd$(DLSUFFIX) FORCE'
- ;;
- definedefine)
- util_deps='$(PERL_EXE) $(CONFIGPM) FORCE'
-@@ -604,7 +604,7 @@ definedefine)
- esac
-
- $spitshell >>$Makefile <<!GROK!THIS!
--utils/Makefile: \$(MINIPERL_EXE) \$(CONFIGPM) utils/Makefile.PL
-+utils/Makefile: \$(CONFIGPM) utils/Makefile.PL
- \$(MINIPERL) -Ilib utils/Makefile.PL
-
- utilities: utils/Makefile $util_deps
-@@ -699,7 +699,7 @@ esac
-
-
- $spitshell >>$Makefile <<'!NO!SUBS!'
--perlmain.c: $(MINIPERL_EXE) ext/ExtUtils-Miniperl/pm_to_blib
-+perlmain.c: ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
- $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(\"perlmain.c", @ARGV)' DynaLoader $(static_ext)
-
- # The file ext.libs is a list of libraries that must be linked in
-@@ -760,7 +760,7 @@ PERLEXPORT = perl.exp
- ;;
- esac
- $spitshell >>$Makefile <<'!NO!SUBS!'
--perl.exp: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH)
-+perl.exp: makedef.pl $(CONFIGPM) $(SYM) $(SYMH)
- ./$(MINIPERLEXP) makedef.pl --sort-fold PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" > perl.exp
-
- !NO!SUBS!
-@@ -769,7 +769,7 @@ os2)
- $spitshell >>$Makefile <<'!NO!SUBS!'
- MINIPERLEXP = miniperl
-
--perl5.def: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) miniperl.map
-+perl5.def: makedef.pl $(CONFIGPM) $(SYM) $(SYMH) miniperl.map
- ./$(MINIPERLEXP) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
-
- !NO!SUBS!
-@@ -829,7 +829,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI
- true)
- $spitshell >>$Makefile <<'!NO!SUBS!'
- rm -f $@
-- $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
-+ $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) -Wl,-soname,libperl.so.5
- !NO!SUBS!
- case "$osname" in
- aix)
-@@ -877,7 +877,9 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
- $spitshell >>$Makefile <<'!NO!SUBS!'
- lib/buildcustomize.pl: $& $(mini_obj)
- $(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(mini_obj) $(libs)
-- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-+ mv -f miniperl miniperl-target
-+ ln -s hostperl miniperl
-+ #$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- $(MINIPERL) -f write_buildcustomize.pl
- !NO!SUBS!
- ;;
-@@ -885,7 +887,9 @@ lib/buildcustomize.pl: $& $(mini_obj)
- $spitshell >>$Makefile <<'!NO!SUBS!'
- lib/buildcustomize.pl: $& $(mini_obj) write ldcustomize.pl
- $(CC) -o $(MINIPERL_EXE) $(mini_obj libs)
-- $(LDLIBPTH) ./miniperl$(HOST _EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-+ mv -f miniperl miniperl-target
-+ ln -s hostperl miniperl
-+ #$(LDLIBPTH) ./miniperl$(HOST _EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- $(MINIPERL) -f write_buildcustomize.pl
- !NO!SUBS!
- ;;
-@@ -907,7 +911,9 @@ lib/buildcustomize.pl: $& $(mini_obj) wr
- -@rm -f miniperl.xok
- $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
- $(mini_obj) $(libs)
-- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-+ mv -f miniperl miniperl-target
-+ ln -s hostperl miniperl
-+ #$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- $(MINIPERL) -f write_buildcustomize.pl
- !NO!SUBS!
- ;;
-@@ -918,7 +924,9 @@ lib/buildcustomize.pl: \$& \$(mini_obj)
- -@rm -f miniperl.xok
- -@rm \$(MINIPERL_EXE)
- \$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
-- \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-+ mv -f miniperl miniperl-target
-+ ln -s hostperl miniperl
-+ #\$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
- !GROK!THIS!
- else
-@@ -927,7 +935,9 @@ lib/buildcustomize.pl: $& $(mini_obj) wr
- -@rm -f miniperl.xok
- $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
- $(mini_obj) $(libs)
-- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-+ mv -f miniperl miniperl-target
-+ ln -s hostperl miniperl
-+ #$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- $(MINIPERL) -f write_buildcustomize.pl
- !NO!SUBS!
- fi
-@@ -971,7 +981,7 @@ case "${osname}" in
- catamount)
- $spitshell >>$Makefile <<!GROK!THIS!
- .PHONY: makeppport
--makeppport: \$(MINIPERL_EXE) \$(CONFIGPM)
-+makeppport: \$(CONFIGPM)
- -@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \
- (cd ext/Devel-PPPort && `pwd`/run.sh ../../$(MINIPERL_EXE) -I../../lib \$\$f); \
- done
-@@ -981,7 +991,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM
- *)
- $spitshell >>$Makefile <<'!NO!SUBS!'
- .PHONY: makeppport
--makeppport: $(MINIPERL_EXE) $(CONFIGPM) $(nonxs_ext)
-+makeppport: $(CONFIGPM) $(nonxs_ext)
- $(MINIPERL) mkppport
-
- !NO!SUBS!
-@@ -991,16 +1001,16 @@ esac
- $spitshell >>$Makefile <<'!NO!SUBS!'
-
- .PHONY: preplibrary
--preplibrary: $(MINIPERL_EXE) $(CONFIGPM) $(PREPLIBRARY_LIBPERL)
-+preplibrary: $(CONFIGPM) $(PREPLIBRARY_LIBPERL)
-
- $(CONFIGPM_FROM_CONFIG_SH): $(CONFIGPOD)
-
--$(CONFIGPOD): config.sh $(MINIPERL_EXE) configpm Porting/Glossary lib/Config_git.pl
-+$(CONFIGPOD): config.sh configpm Porting/Glossary lib/Config_git.pl
- $(MINIPERL) configpm
-
- unidatafiles $(unidatafiles) pod/perluniprops.pod: uni.data
-
--uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
-+uni.data: $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
- $(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
- # Commented out so always runs, mktables looks at far more files than we
- # can in this makefile to decide if needs to run or not
-@@ -1009,12 +1019,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) li
- # $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
- # But also this ensures that all extensions are built before we try to scan
- # them, which picks up Devel::PPPort's documentation.
--pod/perltoc.pod: $(perltoc_pod_prereqs) $(PERL_EXE) $(ext) pod/buildtoc
-- $(RUN_PERL) -f pod/buildtoc -q
-+pod/perltoc.pod: $(perltoc_pod_prereqs) $(ext) pod/buildtoc
-+ $(MINIPERL) -f pod/buildtoc -q
-
- pod/perlapi.pod: pod/perlintern.pod
-
--pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc
-+pod/perlintern.pod: autodoc.pl embed.fnc
- $(MINIPERL) autodoc.pl
-
- pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
-@@ -1024,7 +1034,7 @@ pod/perl5221delta.pod: pod/perldelta.pod
- $(RMS) pod/perl5221delta.pod
- $(LNS) perldelta.pod pod/perl5221delta.pod
-
--extra.pods: $(MINIPERL_EXE)
-+extra.pods:
- -@test ! -f extra.pods || rm -f `cat extra.pods`
- -@rm -f extra.pods
- -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
-@@ -1068,8 +1078,7 @@ EOT
- $spitshell >>$Makefile <<EOT
-
- install_$name install-$name: \$(INSTALL_DEPENDENCE) installperl all installman
-- \$(RUN_PERL) installperl --destdir=\$(DESTDIR) $flags \$(INSTALLFLAGS) \$(STRIPFLAGS)
-- \$(RUN_PERL) installman --destdir=\$(DESTDIR) $flags
-+ ./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=\$(DESTDIR) $flags \$(INSTALLFLAGS) \$(STRIPFLAGS)
- EOT
- fi
-
-@@ -1079,11 +1088,7 @@ done
- if test "X$hostperl" != X; then
- $spitshell >>$Makefile <<'!NO!SUBS!'
- install.perl: $(INSTALL_DEPENDENCE) installperl
-- $(HOST_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
-- -@test ! -s extras.lst || $(MAKE) extras.install
--
--install.man: all installman
-- $(HOST_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
-+ ./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
-
- # XXX Experimental. Hardwired values, but useful for testing.
- # Eventually Configure could ask for some of these values.
-@@ -1101,24 +1106,8 @@ install.html: all installhtml
- else
- $spitshell >>$Makefile <<'!NO!SUBS!'
- install.perl: $(INSTALL_DEPENDENCE) installperl
-- $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
-- -@test ! -s extras.lst || PATH="`pwd`:\${PATH}" PERL5LIB="`pwd`/lib" \$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
--
--install.man: all installman
-- $(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
-+ ./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
-
--# XXX Experimental. Hardwired values, but useful for testing.
--# Eventually Configure could ask for some of these values.
--install.html: all installhtml
-- -@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd ..
-- $(RUN_PERL) installhtml \
-- --podroot=. --podpath=. --recurse \
-- --htmldir=$(privlib)/html \
-- --htmlroot=$(privlib)/html \
-- --splithead=pod/perlipc \
-- --splititem=pod/perlfunc \
-- --ignore=Porting/Maintainers.pm,Porting/pumpkin.pod,Porting/repository.pod \
-- --verbose
- !NO!SUBS!
- fi
-
-@@ -1210,13 +1199,13 @@ manicheck: FORCE
- #
- # DynaLoader may be needed for extensions that use Makefile.PL.
-
--$(DYNALOADER): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE $(nonxs_ext)
-+$(DYNALOADER): lib/buildcustomize.pl preplibrary FORCE $(nonxs_ext)
- $(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
-
--d_dummy $(dynamic_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE $(PERLEXPORT) $(LIBPERL)
-+d_dummy $(dynamic_ext): lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE $(PERLEXPORT) $(LIBPERL)
- $(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
-
--s_dummy $(static_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE
-+s_dummy $(static_ext): lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE
- $(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
-
- n_dummy $(nonxs_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE
-@@ -1405,14 +1394,14 @@ test_prep_pre: preplibrary utilities $(n
-
- case "$targethost" in
- '') $spitshell >>$Makefile <<'!NO!SUBS!'
--test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
-+test_prep test-prep: test_prep_pre $(unidatafiles) $(PERL_EXE) \
- $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods)
- cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
-
- !NO!SUBS!
- ;;
- *) $spitshell >>$Makefile <<!GROK!THIS!
--test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE) \
-+test_prep test-prep: test_prep_pre \$(unidatafiles) \$(PERL_EXE) \
- \$(dynamic_ext) \$(TEST_PERL_DLL) runtests \
- \$(generated_pods)
- $to libperl.*
-@@ -1465,7 +1454,7 @@ test_prep test-prep: test_prep_pre \$(MI
- esac
-
- $spitshell >>$Makefile <<'!NO!SUBS!'
--test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
-+test_prep_reonly: $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
- $(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
- cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
- !NO!SUBS!
-@@ -1526,7 +1515,7 @@ minitest_prep:
-
- MINITEST_TESTS = base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t
-
--minitest: $(MINIPERL_EXE) minitest_prep
-+minitest: minitest_prep
- - cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) </dev/tty
-
- minitest-notty minitest_notty: $(MINIPERL_EXE) minitest_prep
diff --git a/meta/recipes-devtools/perl/perl/Makefile.patch b/meta/recipes-devtools/perl/perl/Makefile.patch
deleted file mode 100644
index 858e2e10fb..0000000000
--- a/meta/recipes-devtools/perl/perl/Makefile.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Index: perl-5.14.2/Cross/Makefile
-===================================================================
---- perl-5.14.2.orig/Cross/Makefile
-+++ perl-5.14.2/Cross/Makefile
-@@ -1,6 +1,7 @@
- ## Toplevel Makefile for cross-compilation of perl
-
--export TOPDIR=${shell pwd}
-+override TOPDIR=${shell pwd}
-+export TOPDIR
- include $(TOPDIR)/config
- export CFLAGS
- export SYS=$(ARCH)-$(OS)
-@@ -10,7 +11,7 @@ export OPTIMIZATION = -O2
-
- export CC = $(CROSS)gcc
- export CXX = $(CROSS)g++
--export LD = $(CROSS)ld
-+export LD = $(CC)
- export STRIP = $(CROSS)strip
- export AR = $(CROSS)ar
- export RANLIB = $(CROSS)ranlib
-@@ -32,17 +33,6 @@ CFLAGS+=$(FULL_OPTIMIZATION)
- all:
- @echo Please read the README file before doing anything else.
-
--gen_patch:
-- diff -Bbur ../Makefile.SH Makefile.SH > Makefile.SH.patch
-- diff -Bbur ../installperl installperl > installperl.patch
--
--patch:
-- cd .. ; if [ ! -e ./CROSS_PATCHED ] ; then \
-- patch -p1 < Cross/Makefile.SH.patch; \
-- patch -p1 < Cross/installperl.patch ; mv installperl installperl-patched; \
-- sed -e 's/XXSTRIPXX/$(SYS)/' installperl-patched > installperl; \
-- touch CROSS_PATCHED ; fi
--
- perl:
- @echo Perl cross-build directory is $(TOPDIR)
- @echo Target arch is $(SYS)
-@@ -52,11 +42,11 @@ perl:
- $(TOPDIR)/generate_config_sh config.sh-$(SYS) > $(TOPDIR)/../config.sh
- cd $(TOPDIR)/.. ; ./Configure -S ; make depend ; make ; make more
- cd $(TOPDIR)/.. ; mkdir -p fake_config_library ; cp lib/Config.pm lib/Config_heavy.pl fake_config_library
-- cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
-- cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
-- cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
-+ cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
-+ cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
-+ cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
- cd $(TOPDIR)/.. ; rm -rf install_me_here
-- cd $(TOPDIR)/.. ; make install-strip
-+# cd $(TOPDIR)/.. ; make install-strip
- cd $(TOPDIR)/.. ; sh -x Cross/warp
-
-
diff --git a/meta/recipes-devtools/perl/perl/config.sh b/meta/recipes-devtools/perl/perl/config.sh
deleted file mode 100644
index b2a7f2cc4c..0000000000
--- a/meta/recipes-devtools/perl/perl/config.sh
+++ /dev/null
@@ -1,1221 +0,0 @@
-#!/bin/sh
-#
-# This file was produced by running the Configure script. It holds all the
-# definitions figured out by Configure. Should you modify one of these values,
-# do not forget to propagate your changes by running "Configure -der". You may
-# instead choose to run each of the .SH files by yourself, or "Configure -S".
-#
-
-# Package name : perl5
-# Source directory : .
-# Configuration time: Fri May 6 20:13:46 PDT 2016
-# Configured by : Open Embedded
-# Target system : linux qemux86-64 3.19.5-yocto-standard #1 smp preempt tue jun 16 00:28:17 pdt 2015 x86_64 gnulinux
-
-: Configure command line arguments.
-config_arg0='Configure'
-config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded -Dinstallprefix=@EXECPREFIX@ -Dprefix=@EXECPREFIX@ -Dvendorprefix=@EXECPREFIX@ -Dsiteprefix=@EXECPREFIX@ -Dotherlibdirs=@LIBDIR@/perl/5.22.1 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=@USRBIN@/less -isr'
-config_argc=28
-config_arg1='-des'
-config_arg2='-Doptimize=-O2'
-config_arg3='-Dmyhostname=localhost'
-config_arg4='-Dperladmin=root@localhost'
-config_arg5='-Dcc=gcc'
-config_arg6='-Dcf_by=Open Embedded'
-config_arg7='-Dinstallprefix=@EXECPREFIX@'
-config_arg8='-Dprefix=@EXECPREFIX@'
-config_arg9='-Dvendorprefix=@EXECPREFIX@'
-config_arg10='-Dsiteprefix=@EXECPREFIX@'
-config_arg11='-Dotherlibdirs=@LIBDIR@/perl/5.22.1'
-config_arg12='-Duseshrplib'
-config_arg13='-Dusethreads'
-config_arg14='-Duseithreads'
-config_arg15='-Duselargefiles'
-config_arg16='-Ud_dosuid'
-config_arg17='-Dd_semctl_semun'
-config_arg18='-Ui_db'
-config_arg19='-Ui_ndbm'
-config_arg20='-Ui_gdbm'
-config_arg21='-Di_shadow'
-config_arg22='-Di_syslog'
-config_arg23='-Dman3ext=3pm'
-config_arg24='-Duseperlio'
-config_arg25='-Dinstallusrbinperl'
-config_arg26='-Ubincompat5005'
-config_arg27='-Uversiononly'
-config_arg28='-Dpager=@USRBIN@/less -isr'
-
-Author=''
-Date=''
-Header=''
-Id=''
-Locker=''
-Log=''
-RCSfile=''
-Revision=''
-Source=''
-State=''
-_a='.a'
-_exe=''
-_o='.o'
-afs='false'
-afsroot='/afs'
-alignbytes='8'
-ansi2knr=''
-aphostname=''
-api_revision='5'
-api_subversion='0'
-api_version='22'
-api_versionstring='5.22.0'
-ar='ar'
-archlib='@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
-archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
-archlib_exp='@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
-archname64=''
-archname='@ARCH@-thread-multi'
-archobjs=''
-asctime_r_proto='REENTRANT_PROTO_B_SB'
-awk='awk'
-baserev='5.0'
-bash=''
-bin='@USRBIN@'
-bin_ELF='define'
-binexp='@USRBIN@'
-bison='bison'
-byacc='byacc'
-c=''
-castflags='0'
-cat='cat'
-cc='gcc'
-cccdlflags='-fPIC'
-ccdlflags='-Wl,-E -Wl,-rpath,@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi/CORE'
-ccflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
-ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
-ccname='gcc'
-ccsymbols=''
-ccversion=''
-cf_by='Open Embedded'
-cf_email='Open Embedded@localhost.localdomain'
-cf_time='Fri May 6 20:13:46 PDT 2016'
-charbits='8'
-charsize='1'
-chgrp=''
-chmod='chmod'
-chown=''
-clocktype='clock_t'
-comm='comm'
-compress=''
-contains='grep'
-cp='cp'
-cpio=''
-cpp='cpp'
-cpp_stuff='42'
-cppccsymbols=''
-cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe'
-cpplast='-'
-cppminus='-'
-cpprun='gcc -E'
-cppstdin='gcc -E'
-crypt_r_proto='REENTRANT_PROTO_B_CCS'
-cryptlib=''
-csh='csh'
-ctermid_r_proto='0'
-ctime_r_proto='REENTRANT_PROTO_B_SB'
-d_Gconvert='gcvt((x),(n),(b))'
-d_PRIEUldbl='define'
-d_PRIFUldbl='define'
-d_PRIGUldbl='define'
-d_PRIXU64='define'
-d_PRId64='define'
-d_PRIeldbl='define'
-d_PRIfldbl='define'
-d_PRIgldbl='define'
-d_PRIi64='define'
-d_PRIo64='define'
-d_PRIu64='define'
-d_PRIx64='define'
-d_SCNfldbl='define'
-d__fwalk='undef'
-d_access='define'
-d_accessx='undef'
-d_acosh='define'
-d_aintl='undef'
-d_alarm='define'
-d_archlib='define'
-d_asctime64='undef'
-d_asctime_r='define'
-d_asinh='define'
-d_atanh='define'
-d_atolf='undef'
-d_atoll='define'
-d_attribute_deprecated='define'
-d_attribute_format='define'
-d_attribute_malloc='define'
-d_attribute_nonnull='define'
-d_attribute_noreturn='define'
-d_attribute_pure='define'
-d_attribute_unused='define'
-d_attribute_warn_unused_result='define'
-d_backtrace='define'
-d_bcmp='define'
-d_bcopy='define'
-d_bsd='undef'
-d_bsdgetpgrp='undef'
-d_bsdsetpgrp='undef'
-d_builtin_choose_expr='define'
-d_builtin_expect='define'
-d_bzero='define'
-d_c99_variadic_macros='define'
-d_casti32='define'
-d_castneg='define'
-d_cbrt='define'
-d_charvspr='undef'
-d_chown='define'
-d_chroot='define'
-d_chsize='undef'
-d_class='undef'
-d_clearenv='define'
-d_closedir='define'
-d_cmsghdr_s='define'
-d_const='define'
-d_copysign='define'
-d_copysignl='define'
-d_cplusplus='undef'
-d_crypt='define'
-d_crypt_r='define'
-d_csh='undef'
-d_ctermid='define'
-d_ctermid_r='undef'
-d_ctime64='undef'
-d_ctime_r='define'
-d_cuserid='define'
-d_dbl_dig='define'
-d_dbminitproto='define'
-d_difftime64='undef'
-d_difftime='define'
-d_dir_dd_fd='undef'
-d_dirfd='define'
-d_dirnamlen='undef'
-d_dladdr='define'
-d_dlerror='define'
-d_dlopen='define'
-d_dlsymun='undef'
-d_dosuid='undef'
-d_drand48_r='define'
-d_drand48proto='define'
-d_dup2='define'
-d_eaccess='define'
-d_endgrent='define'
-d_endgrent_r='undef'
-d_endhent='define'
-d_endhostent_r='undef'
-d_endnent='define'
-d_endnetent_r='undef'
-d_endpent='define'
-d_endprotoent_r='undef'
-d_endpwent='define'
-d_endpwent_r='undef'
-d_endsent='define'
-d_endservent_r='undef'
-d_eofnblk='define'
-d_erf='define'
-d_erfc='define'
-d_eunice='undef'
-d_exp2='define'
-d_expm1='define'
-d_faststdio='undef'
-d_fchdir='define'
-d_fchmod='define'
-d_fchown='define'
-d_fcntl='define'
-d_fcntl_can_lock='define'
-d_fd_macros='define'
-d_fd_set='define'
-d_fdim='define'
-d_fds_bits='define'
-d_fegetround='define'
-d_fgetpos='define'
-d_finite='define'
-d_finitel='define'
-d_flexfnam='define'
-d_flock='define'
-d_flockproto='define'
-d_fma='define'
-d_fmax='define'
-d_fmin='define'
-d_fork='define'
-d_fp_class='undef'
-d_fp_classify='undef'
-d_fp_classl='undef'
-d_fpathconf='define'
-d_fpclass='undef'
-d_fpclassify='define'
-d_fpclassl='undef'
-d_fpgetround='undef'
-d_fpos64_t='undef'
-d_frexpl='define'
-d_fs_data_s='undef'
-d_fseeko='define'
-d_fsetpos='define'
-d_fstatfs='define'
-d_fstatvfs='define'
-d_fsync='define'
-d_ftello='define'
-d_ftime='undef'
-d_futimes='define'
-d_gdbm_ndbm_h_uses_prototypes='undef'
-d_gdbmndbm_h_uses_prototypes='define'
-d_getaddrinfo='define'
-d_getcwd='define'
-d_getespwnam='undef'
-d_getfsstat='undef'
-d_getgrent='define'
-d_getgrent_r='define'
-d_getgrgid_r='define'
-d_getgrnam_r='define'
-d_getgrps='define'
-d_gethbyaddr='define'
-d_gethbyname='define'
-d_gethent='define'
-d_gethname='define'
-d_gethostbyaddr_r='define'
-d_gethostbyname_r='define'
-d_gethostent_r='define'
-d_gethostprotos='define'
-d_getitimer='define'
-d_getlogin='define'
-d_getlogin_r='define'
-d_getmnt='undef'
-d_getmntent='define'
-d_getnameinfo='define'
-d_getnbyaddr='define'
-d_getnbyname='define'
-d_getnent='define'
-d_getnetbyaddr_r='define'
-d_getnetbyname_r='define'
-d_getnetent_r='define'
-d_getnetprotos='define'
-d_getpagsz='define'
-d_getpbyname='define'
-d_getpbynumber='define'
-d_getpent='define'
-d_getpgid='define'
-d_getpgrp2='undef'
-d_getpgrp='define'
-d_getppid='define'
-d_getprior='define'
-d_getprotobyname_r='define'
-d_getprotobynumber_r='define'
-d_getprotoent_r='define'
-d_getprotoprotos='define'
-d_getprpwnam='undef'
-d_getpwent='define'
-d_getpwent_r='define'
-d_getpwnam_r='define'
-d_getpwuid_r='define'
-d_getsbyname='define'
-d_getsbyport='define'
-d_getsent='define'
-d_getservbyname_r='define'
-d_getservbyport_r='define'
-d_getservent_r='define'
-d_getservprotos='define'
-d_getspnam='define'
-d_getspnam_r='define'
-d_gettimeod='define'
-d_gmtime64='undef'
-d_gmtime_r='define'
-d_gnulibc='define'
-d_grpasswd='define'
-d_hasmntopt='define'
-d_htonl='define'
-d_hypot='define'
-d_ilogb='define'
-d_ilogbl='define'
-d_inc_version_list='undef'
-d_index='undef'
-d_inetaton='define'
-d_inetntop='define'
-d_inetpton='define'
-d_int64_t='define'
-d_ip_mreq='define'
-d_ip_mreq_source='define'
-d_ipv6_mreq='define'
-d_ipv6_mreq_source='undef'
-d_isascii='define'
-d_isblank='define'
-d_isfinite='define'
-d_isfinitel='undef'
-d_isinf='define'
-d_isinfl='define'
-d_isless='undef'
-d_isnan='define'
-d_isnanl='define'
-d_isnormal='define'
-d_j0='define'
-d_j0l='define'
-d_killpg='define'
-d_lc_monetary_2008='define'
-d_lchown='define'
-d_ldbl_dig='define'
-d_ldexpl='define'
-d_lgamma='define'
-d_lgamma_r='define'
-d_libm_lib_version='define'
-d_libname_unique='undef'
-d_link='define'
-d_llrint='define'
-d_llrintl='define'
-d_llround='define'
-d_llroundl='define'
-d_localtime64='undef'
-d_localtime_r='define'
-d_localtime_r_needs_tzset='define'
-d_locconv='define'
-d_lockf='define'
-d_log1p='define'
-d_log2='define'
-d_logb='define'
-d_longdbl='define'
-d_longlong='define'
-d_lrint='define'
-d_lrintl='define'
-d_lround='define'
-d_lroundl='define'
-d_lseekproto='define'
-d_lstat='define'
-d_madvise='define'
-d_malloc_good_size='undef'
-d_malloc_size='undef'
-d_mblen='define'
-d_mbstowcs='define'
-d_mbtowc='define'
-d_memchr='define'
-d_memcmp='define'
-d_memcpy='define'
-d_memmove='define'
-d_memset='define'
-d_mkdir='define'
-d_mkdtemp='define'
-d_mkfifo='define'
-d_mkstemp='define'
-d_mkstemps='define'
-d_mktime64='undef'
-d_mktime='define'
-d_mmap='define'
-d_modfl='define'
-d_modfl_pow32_bug='undef'
-d_modflproto='define'
-d_mprotect='define'
-d_msg='define'
-d_msg_ctrunc='define'
-d_msg_dontroute='define'
-d_msg_oob='define'
-d_msg_peek='define'
-d_msg_proxy='define'
-d_msgctl='define'
-d_msgget='define'
-d_msghdr_s='define'
-d_msgrcv='define'
-d_msgsnd='define'
-d_msync='define'
-d_munmap='define'
-d_mymalloc='undef'
-d_nan='define'
-d_ndbm='define'
-d_ndbm_h_uses_prototypes='undef'
-d_nearbyint='define'
-d_nextafter='define'
-d_nexttoward='define'
-d_nice='define'
-d_nl_langinfo='define'
-d_nv_preserves_uv='undef'
-d_nv_zero_is_allbits_zero='define'
-d_off64_t='define'
-d_old_pthread_create_joinable='undef'
-d_oldpthreads='undef'
-d_oldsock='undef'
-d_open3='define'
-d_pathconf='define'
-d_pause='define'
-d_perl_otherlibdirs='define'
-d_phostname='undef'
-d_pipe='define'
-d_poll='define'
-d_portable='define'
-d_prctl='define'
-d_prctl_set_name='define'
-d_printf_format_null='undef'
-d_procselfexe='define'
-d_pseudofork='undef'
-d_pthread_atfork='define'
-d_pthread_attr_setscope='define'
-d_pthread_yield='define'
-d_ptrdiff_t='define'
-d_pwage='undef'
-d_pwchange='undef'
-d_pwclass='undef'
-d_pwcomment='undef'
-d_pwexpire='undef'
-d_pwgecos='define'
-d_pwpasswd='define'
-d_pwquota='undef'
-d_qgcvt='define'
-d_quad='define'
-d_random_r='define'
-d_re_comp='undef'
-d_readdir64_r='define'
-d_readdir='define'
-d_readdir_r='define'
-d_readlink='define'
-d_readv='define'
-d_recvmsg='define'
-d_regcmp='undef'
-d_regcomp='define'
-d_remainder='define'
-d_remquo='define'
-d_rename='define'
-d_rewinddir='define'
-d_rint='define'
-d_rmdir='define'
-d_round='define'
-d_safebcpy='undef'
-d_safemcpy='undef'
-d_sanemcmp='define'
-d_sbrkproto='define'
-d_scalbn='define'
-d_scalbnl='define'
-d_sched_yield='define'
-d_scm_rights='define'
-d_seekdir='define'
-d_select='define'
-d_sem='define'
-d_semctl='define'
-d_semctl_semid_ds='define'
-d_semctl_semun='define'
-d_semget='define'
-d_semop='define'
-d_sendmsg='define'
-d_setegid='define'
-d_seteuid='define'
-d_setgrent='define'
-d_setgrent_r='undef'
-d_setgrps='define'
-d_sethent='define'
-d_sethostent_r='undef'
-d_setitimer='define'
-d_setlinebuf='define'
-d_setlocale='define'
-d_setlocale_r='undef'
-d_setnent='define'
-d_setnetent_r='undef'
-d_setpent='define'
-d_setpgid='define'
-d_setpgrp2='undef'
-d_setpgrp='define'
-d_setprior='define'
-d_setproctitle='undef'
-d_setprotoent_r='undef'
-d_setpwent='define'
-d_setpwent_r='undef'
-d_setregid='define'
-d_setresgid='define'
-d_setresuid='define'
-d_setreuid='define'
-d_setrgid='undef'
-d_setruid='undef'
-d_setsent='define'
-d_setservent_r='undef'
-d_setsid='define'
-d_setvbuf='define'
-d_shm='define'
-d_shmat='define'
-d_shmatprototype='define'
-d_shmctl='define'
-d_shmdt='define'
-d_shmget='define'
-d_sigaction='define'
-d_signbit='define'
-d_sigprocmask='define'
-d_sigsetjmp='define'
-d_sin6_scope_id='define'
-d_sitearch='define'
-d_snprintf='define'
-d_sockaddr_in6='define'
-d_sockaddr_sa_len='undef'
-d_sockatmark='define'
-d_sockatmarkproto='define'
-d_socket='define'
-d_socklen_t='define'
-d_sockpair='define'
-d_socks5_init='undef'
-d_sprintf_returns_strlen='define'
-d_sqrtl='define'
-d_srand48_r='define'
-d_srandom_r='define'
-d_sresgproto='define'
-d_sresuproto='define'
-d_stat='define'
-d_statblks='define'
-d_statfs_f_flags='define'
-d_statfs_s='define'
-d_static_inline='define'
-d_statvfs='define'
-d_stdio_cnt_lval='undef'
-d_stdio_ptr_lval='undef'
-d_stdio_ptr_lval_nochange_cnt='undef'
-d_stdio_ptr_lval_sets_cnt='undef'
-d_stdio_stream_array='undef'
-d_stdiobase='undef'
-d_stdstdio='undef'
-d_strchr='define'
-d_strcoll='define'
-d_strctcpy='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
-d_strerror_r='define'
-d_strftime='define'
-d_strlcat='undef'
-d_strlcpy='undef'
-d_strtod='define'
-d_strtol='define'
-d_strtold='define'
-d_strtoll='define'
-d_strtoq='define'
-d_strtoul='define'
-d_strtoull='define'
-d_strtouq='define'
-d_strxfrm='define'
-d_suidsafe='undef'
-d_symlink='define'
-d_syscall='define'
-d_syscallproto='define'
-d_sysconf='define'
-d_sysernlst=''
-d_syserrlst='define'
-d_system='define'
-d_tcgetpgrp='define'
-d_tcsetpgrp='define'
-d_telldir='define'
-d_telldirproto='define'
-d_tgamma='define'
-d_time='define'
-d_timegm='define'
-d_times='define'
-d_tm_tm_gmtoff='define'
-d_tm_tm_zone='define'
-d_tmpnam_r='define'
-d_trunc='define'
-d_truncate='define'
-d_truncl='define'
-d_ttyname_r='define'
-d_tzname='define'
-d_u32align='define'
-d_ualarm='define'
-d_umask='define'
-d_uname='define'
-d_union_semun='undef'
-d_unordered='undef'
-d_unsetenv='define'
-d_usleep='define'
-d_usleepproto='define'
-d_ustat='define'
-d_vendorarch='define'
-d_vendorbin='define'
-d_vendorlib='define'
-d_vendorscript='define'
-d_vfork='undef'
-d_void_closedir='undef'
-d_voidsig='define'
-d_voidtty=''
-d_volatile='define'
-d_vprintf='define'
-d_vsnprintf='define'
-d_wait4='define'
-d_waitpid='define'
-d_wcscmp='define'
-d_wcstombs='define'
-d_wcsxfrm='define'
-d_wctomb='define'
-d_writev='define'
-d_xenix='undef'
-date='date'
-db_hashtype='u_int32_t'
-db_prefixtype='size_t'
-db_version_major=''
-db_version_minor=''
-db_version_patch=''
-direntrytype='struct dirent'
-dlext='so'
-dlsrc='dl_dlopen.xs'
-doublekind='3'
-doublesize='8'
-drand01='Perl_drand48()'
-drand48_r_proto='REENTRANT_PROTO_I_ST'
-dtrace=''
-dynamic_ext='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate XS/APItest XS/Typemap arybase attributes mro re threads threads/shared'
-eagain='EAGAIN'
-ebcdic='undef'
-echo='echo'
-egrep='egrep'
-emacs=''
-endgrent_r_proto='0'
-endhostent_r_proto='0'
-endnetent_r_proto='0'
-endprotoent_r_proto='0'
-endpwent_r_proto='0'
-endservent_r_proto='0'
-eunicefix=':'
-exe_ext=''
-expr='expr'
-extensions='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate XS/APItest XS/Typemap arybase attributes mro re threads threads/shared Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local Unicode/Normalize XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators version'
-extern_C='extern'
-extras=''
-fflushNULL='define'
-fflushall='undef'
-find=''
-firstmakefile='makefile'
-flex=''
-fpossize='16'
-fpostype='fpos_t'
-freetype='void'
-from=':'
-full_ar='ar'
-full_csh='csh'
-full_sed='sed'
-gccansipedantic=''
-gccosandvers=''
-gccversion='4.9.2'
-getgrent_r_proto='REENTRANT_PROTO_I_SBWR'
-getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR'
-getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-gethostbyaddr_r_proto='REENTRANT_PROTO_I_TsISBWRE'
-gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
-gethostent_r_proto='REENTRANT_PROTO_I_SBWRE'
-getlogin_r_proto='REENTRANT_PROTO_I_BW'
-getnetbyaddr_r_proto='REENTRANT_PROTO_I_uISBWRE'
-getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
-getnetent_r_proto='REENTRANT_PROTO_I_SBWRE'
-getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR'
-getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR'
-getprotoent_r_proto='REENTRANT_PROTO_I_SBWR'
-getpwent_r_proto='REENTRANT_PROTO_I_SBWR'
-getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR'
-getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR'
-getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR'
-getservent_r_proto='REENTRANT_PROTO_I_SBWR'
-getspnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-gidformat='"u"'
-gidsign='1'
-gidsize='4'
-gidtype='gid_t'
-glibpth='@EXECPREFIX@/shlib @BASELIBDIR@ @LIBDIR@ @LIBDIR@/386 @BASELIBDIR@386 @EXECPREFIX@/ccs@BASELIBDIR@ @EXECPREFIX@/ucblib @EXECPREFIX@/local@BASELIBDIR@ @BASELIBDIR@ @LIBDIR@ @EXECPREFIX@/local@BASELIBDIR@ '
-gmake='gmake'
-gmtime_r_proto='REENTRANT_PROTO_S_TS'
-gnulibc_version='2.21'
-grep='grep'
-groupcat='cat /etc/group'
-groupstype='gid_t'
-gzip='gzip'
-h_fcntl='false'
-h_sysfile='true'
-hint='recommended'
-hostcat='cat /etc/hosts'
-hostgenerate=''
-hostosname=''
-hostperl=''
-html1dir=' '
-html1direxp=''
-html3dir=' '
-html3direxp=''
-i16size='2'
-i16type='short'
-i32size='4'
-i32type='int'
-i64size='8'
-i64type='long'
-i8size='1'
-i8type='signed char'
-i_arpainet='define'
-i_assert='define'
-i_bfd='define'
-i_bsdioctl=''
-i_crypt='define'
-i_db='undef'
-i_dbm='define'
-i_dirent='define'
-i_dlfcn='define'
-i_execinfo='define'
-i_fcntl='undef'
-i_fenv='define'
-i_float='define'
-i_fp='undef'
-i_fp_class='undef'
-i_gdbm='undef'
-i_gdbm_ndbm='undef'
-i_gdbmndbm='define'
-i_grp='define'
-i_ieeefp='undef'
-i_inttypes='define'
-i_langinfo='define'
-i_libutil='undef'
-i_limits='define'
-i_locale='define'
-i_machcthr='undef'
-i_malloc='define'
-i_mallocmalloc='undef'
-i_math='define'
-i_memory='undef'
-i_mntent='define'
-i_ndbm='undef'
-i_netdb='define'
-i_neterrno='undef'
-i_netinettcp='define'
-i_niin='define'
-i_poll='define'
-i_prot='undef'
-i_pthread='define'
-i_pwd='define'
-i_quadmath='undef'
-i_rpcsvcdbm='undef'
-i_sgtty='undef'
-i_shadow='define'
-i_socks='undef'
-i_stdarg='define'
-i_stdbool='define'
-i_stddef='define'
-i_stdint='define'
-i_stdlib='define'
-i_string='define'
-i_sunmath='undef'
-i_sysaccess='undef'
-i_sysdir='define'
-i_sysfile='define'
-i_sysfilio='undef'
-i_sysin='undef'
-i_sysioctl='define'
-i_syslog='define'
-i_sysmman='define'
-i_sysmode='undef'
-i_sysmount='define'
-i_sysndir='undef'
-i_sysparam='define'
-i_syspoll='define'
-i_sysresrc='define'
-i_syssecrt='undef'
-i_sysselct='define'
-i_syssockio='undef'
-i_sysstat='define'
-i_sysstatfs='define'
-i_sysstatvfs='define'
-i_systime='define'
-i_systimek='undef'
-i_systimes='define'
-i_systypes='define'
-i_sysuio='define'
-i_sysun='define'
-i_sysutsname='define'
-i_sysvfs='define'
-i_syswait='define'
-i_termio='undef'
-i_termios='define'
-i_time='define'
-i_unistd='define'
-i_ustat='define'
-i_utime='define'
-i_values='define'
-i_varargs='undef'
-i_varhdr='stdarg.h'
-i_vfork='undef'
-ignore_versioned_solibs='y'
-inc_version_list=' '
-inc_version_list_init='0'
-incpath=''
-inews=''
-initialinstalllocation='@USRBIN@'
-installarchlib='@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
-installbin='@USRBIN@'
-installhtml1dir=''
-installhtml3dir=''
-installman1dir=''
-installman3dir=''
-installprefix='@EXECPREFIX@'
-installprefixexp='@EXECPREFIX@'
-installprivlib='@LIBDIR@/perl/5.22.1'
-installscript='@USRBIN@'
-installsitearch='@LIBDIR@/perl/site_perl/5.22.1/@ARCH@-thread-multi'
-installsitebin='@USRBIN@'
-installsitehtml1dir=''
-installsitehtml3dir=''
-installsitelib='@LIBDIR@/perl/site_perl/5.22.1'
-installsiteman1dir=''
-installsiteman3dir=''
-installsitescript='@USRBIN@'
-installstyle='lib/perl'
-installusrbinperl='define'
-installvendorarch='@LIBDIR@/perl/vendor_perl/5.22.1/@ARCH@-thread-multi'
-installvendorbin='@USRBIN@'
-installvendorhtml1dir=''
-installvendorhtml3dir=''
-installvendorlib='@LIBDIR@/perl/vendor_perl/5.22.1'
-installvendorman1dir=''
-installvendorman3dir=''
-installvendorscript='@USRBIN@'
-intsize='4'
-issymlink='test -h'
-ivdformat='"ld"'
-ivsize='8'
-ivtype='long'
-known_extensions='Archive/Tar Attribute/Handlers AutoLoader B B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Compress/Raw/Bzip2 Compress/Raw/Zlib Config/Perl/V Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Devel/SelfStubber Digest Digest/MD5 Digest/SHA Dumpvalue Encode Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS Fcntl File/DosGlob File/Fetch File/Find File/Glob File/Path File/Temp FileCache Filter/Simple Filter/Util/Call GDBM_File Getopt/Long HTTP/Tiny Hash/Util Hash/Util/FieldHash I18N/Collate I18N/LangTags I18N/Langinfo IO IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 IPC/SysV JSON/PP List/Util Locale/Codes Locale/Maketext Locale/Maketext/Simple MIME/Base64 Math/BigInt Math/BigInt/FastCalc Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NDBM_File NEXT Net/Ping ODBM_File Opcode POSIX Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage SDBM_File Safe Search/Dict SelfLoader Socket Storable Sys/Hostname Sys/Syslog Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Hash/NamedCapture Tie/Memoize Tie/RefHash Time/HiRes Time/Local Time/Piece Unicode/Collate Unicode/Normalize VMS/DCLsym VMS/Filespec VMS/Stdio Win32 Win32API/File Win32CORE XS/APItest XS/Typemap XSLoader arybase attributes autodie autouse base bignum constant encoding/warnings experimental if lib libnet mro parent perlfaq podlators re threads threads/shared version '
-ksh=''
-ld='gcc'
-ld_can_script='define'
-lddlflags='-shared -O2'
-ldflags=''
-ldflags_uselargefiles=''
-ldlibpthname='LD_LIBRARY_PATH'
-less='less'
-lib_ext='.a'
-libc='libc-2.21.so'
-libperl='libperl.so'
-libpth='@LIBDIR@ @BASELIBDIR@'
-libs='-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat'
-libsdirs=' @LIBDIR@'
-libsfiles=' libpthread.so libnsl.so libgdbm.so libdb.so libdl.so libm.so libcrypt.so libutil.so libc.so libgdbm_compat.so'
-libsfound=' @LIBDIR@/libpthread.so @LIBDIR@/libnsl.so @LIBDIR@/libgdbm.so @LIBDIR@/libdb.so @LIBDIR@/libdl.so @LIBDIR@/libm.so @LIBDIR@/libcrypt.so @LIBDIR@/libutil.so @LIBDIR@/libc.so @LIBDIR@/libgdbm_compat.so'
-libspath=' @LIBDIR@ @BASELIBDIR@'
-libswanted='cl pthread socket inet nsl nm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat'
-libswanted_uselargefiles=''
-line=''
-lint=''
-lkflags=''
-ln='ln'
-lns='/bin/ln -s'
-localtime_r_proto='REENTRANT_PROTO_S_TS'
-locincpth='@EXECPREFIX@/local/include /opt/local/include @EXECPREFIX@/gnu/include /opt/gnu/include @EXECPREFIX@/GNU/include /opt/GNU/include'
-loclibpth='@EXECPREFIX@/local@BASELIBDIR@ /opt/local@BASELIBDIR@ @EXECPREFIX@/gnu@BASELIBDIR@ /opt/gnu@BASELIBDIR@ @EXECPREFIX@/GNU@BASELIBDIR@ /opt/GNU@BASELIBDIR@'
-longdblkind='3'
-longdblsize='16'
-longlongsize='8'
-longsize='8'
-lp=''
-lpr=''
-ls='ls'
-lseeksize='8'
-lseektype='off_t'
-mail=''
-mailx=''
-make='make'
-make_set_make='#'
-mallocobj=''
-mallocsrc=''
-malloctype='void *'
-man1dir=' '
-man1direxp=''
-man1ext='0'
-man3dir=' '
-man3direxp=''
-man3ext='0'
-mips_type=''
-mistrustnm=''
-mkdir='mkdir'
-mmaptype='void *'
-modetype='mode_t'
-more='more'
-multiarch='undef'
-mv=''
-myarchname='@ARCH@'
-mydomain='.localdomain'
-myhostname='localhost'
-myuname='linux qemux86-64 3.19.5-yocto-standard #1 smp preempt tue jun 16 00:28:17 pdt 2015 x86_64 gnulinux '
-n='-n'
-need_va_copy='define'
-netdb_hlen_type='size_t'
-netdb_host_type='char *'
-netdb_name_type='const char *'
-netdb_net_type='in_addr_t'
-nm='nm'
-nm_opt=''
-nm_so_opt='--dynamic'
-nonxs_ext='Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local Unicode/Normalize XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators version'
-nroff='nroff'
-nvEUformat='"E"'
-nvFUformat='"F"'
-nvGUformat='"G"'
-nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
-nv_preserves_uv_bits='53'
-nveformat='"e"'
-nvfformat='"f"'
-nvgformat='"g"'
-nvsize='8'
-nvtype='double'
-o_nonblock='O_NONBLOCK'
-obj_ext='.o'
-old_pthread_create_joinable=''
-optimize='-O2'
-orderlib='false'
-osname='linux'
-osvers='3.19.5-yocto-standard'
-otherlibdirs='@LIBDIR@/perl/5.22.1'
-package='perl'
-pager='/usr/bin/less -isr'
-passcat='cat /etc/passwd'
-patchlevel='22'
-path_sep=':'
-perl5='@USRBIN@/perl'
-perl='perl'
-perl_patchlevel=''
-perl_static_inline='static __inline__'
-perladmin='root@localhost'
-perllibs='-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc'
-perlpath='@USRBIN@/perl'
-pg='pg'
-phostname=''
-pidtype='pid_t'
-plibpth='@LIBDIR@ @BASELIBDIR@'
-pmake=''
-pr=''
-prefix='@EXECPREFIX@'
-prefixexp='@EXECPREFIX@'
-privlib='@LIBDIR@/perl/5.22.1'
-privlibexp='@LIBDIR@/perl/5.22.1'
-procselfexe='"/proc/self/exe"'
-prototype='define'
-ptrsize='8'
-quadkind='2'
-quadtype='long'
-randbits='48'
-randfunc='Perl_drand48'
-random_r_proto='REENTRANT_PROTO_I_St'
-randseedtype='U32'
-ranlib=':'
-rd_nodata='-1'
-readdir64_r_proto='REENTRANT_PROTO_I_TSR'
-readdir_r_proto='REENTRANT_PROTO_I_TSR'
-revision='5'
-rm='rm'
-rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*'
-rmail=''
-run=''
-runnm='false'
-sGMTIME_max='67768036191676799'
-sGMTIME_min='-62167219200'
-sLOCALTIME_max='67768036191676799'
-sLOCALTIME_min='-62167219200'
-sPRIEUldbl='"LE"'
-sPRIFUldbl='"LF"'
-sPRIGUldbl='"LG"'
-sPRIXU64='"lX"'
-sPRId64='"ld"'
-sPRIeldbl='"Le"'
-sPRIfldbl='"Lf"'
-sPRIgldbl='"Lg"'
-sPRIi64='"li"'
-sPRIo64='"lo"'
-sPRIu64='"lu"'
-sPRIx64='"lx"'
-sSCNfldbl='"Lf"'
-sched_yield='sched_yield()'
-scriptdir='@USRBIN@'
-scriptdirexp='@USRBIN@'
-sed='sed'
-seedfunc='Perl_drand48_init'
-selectminbits='64'
-selecttype='fd_set *'
-sendmail=''
-setgrent_r_proto='0'
-sethostent_r_proto='0'
-setlocale_r_proto='0'
-setnetent_r_proto='0'
-setprotoent_r_proto='0'
-setpwent_r_proto='0'
-setservent_r_proto='0'
-sh='/bin/sh'
-shar=''
-sharpbang='#!'
-shmattype='void *'
-shortsize='2'
-shrpenv=''
-shsharp='true'
-sig_count='65'
-sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS NUM32 NUM33 RTMIN NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 NUM63 RTMAX IOT CLD POLL UNUSED '
-sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "NUM32", "NUM33", "RTMIN", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "NUM63", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 6 17 29 31 '
-sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0'
-sig_size='69'
-signal_t='void'
-sitearch='@LIBDIR@/perl/site_perl/5.22.1/@ARCH@-thread-multi'
-sitearchexp='@LIBDIR@/perl/site_perl/5.22.1/@ARCH@-thread-multi'
-sitebin='@USRBIN@'
-sitebinexp='@USRBIN@'
-sitehtml1dir=''
-sitehtml1direxp=''
-sitehtml3dir=''
-sitehtml3direxp=''
-sitelib='@LIBDIR@/perl/site_perl/5.22.1'
-sitelib_stem='@LIBDIR@/perl/site_perl'
-sitelibexp='@LIBDIR@/perl/site_perl/5.22.1'
-siteman1dir=''
-siteman1direxp=''
-siteman3dir=''
-siteman3direxp=''
-siteprefix='@EXECPREFIX@'
-siteprefixexp='@EXECPREFIX@'
-sitescript='@USRBIN@'
-sitescriptexp='@USRBIN@'
-sizesize='8'
-sizetype='size_t'
-sleep=''
-smail=''
-so='so'
-sockethdr=''
-socketlib=''
-socksizetype='socklen_t'
-sort='sort'
-spackage='Perl5'
-spitshell='cat'
-srand48_r_proto='REENTRANT_PROTO_I_LS'
-srandom_r_proto='REENTRANT_PROTO_I_TS'
-src='.'
-ssizetype='ssize_t'
-st_ino_sign='1'
-st_ino_size='8'
-startperl='#!@USRBIN@/perl'
-startsh='#!/bin/sh'
-static_ext=' '
-stdchar='char'
-stdio_base='((fp)->_IO_read_base)'
-stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)'
-stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
-stdio_filbuf=''
-stdio_ptr='((fp)->_IO_read_ptr)'
-stdio_stream_array=''
-strerror_r_proto='REENTRANT_PROTO_B_IBW'
-strings='@INCLUDEDIR@/string.h'
-submit=''
-subversion='0'
-sysman='@EXECPREFIX@/share/man/man1'
-sysroot=''
-tail=''
-tar=''
-targetarch=''
-targetdir=''
-targetenv=''
-targethost=''
-targetmkdir=''
-targetport=''
-targetsh='/bin/sh'
-tbl=''
-tee=''
-test='test'
-timeincl='@INCLUDEDIR@/sys/time.h @INCLUDEDIR@/time.h '
-timetype='time_t'
-tmpnam_r_proto='REENTRANT_PROTO_B_B'
-to=':'
-touch='touch'
-tr='tr'
-trnl='\n'
-troff=''
-ttyname_r_proto='REENTRANT_PROTO_I_IBW'
-u16size='2'
-u16type='unsigned short'
-u32size='4'
-u32type='unsigned int'
-u64size='8'
-u64type='unsigned long'
-u8size='1'
-u8type='unsigned char'
-uidformat='"u"'
-uidsign='1'
-uidsize='4'
-uidtype='uid_t'
-uname='uname'
-uniq='uniq'
-uquadtype='unsigned long'
-use5005threads='undef'
-use64bitall='define'
-use64bitint='define'
-usecbacktrace='undef'
-usecrosscompile='define'
-usedevel='undef'
-usedl='define'
-usedtrace='undef'
-usefaststdio='undef'
-useithreads='define'
-usekernprocpathname='undef'
-uselargefiles='define'
-uselongdouble='undef'
-usemallocwrap='define'
-usemorebits='undef'
-usemultiplicity='define'
-usemymalloc='n'
-usenm='false'
-usensgetexecutablepath='undef'
-useopcode='true'
-useperlio='define'
-useposix='true'
-usequadmath='undef'
-usereentrant='undef'
-userelocatableinc='undef'
-useshrplib='true'
-usesitecustomize='undef'
-usesocks='undef'
-usethreads='define'
-usevendorprefix='define'
-useversionedarchname='undef'
-usevfork='false'
-usrinc='@INCLUDEDIR@'
-uuname=''
-uvXUformat='"lX"'
-uvoformat='"lo"'
-uvsize='8'
-uvtype='unsigned long'
-uvuformat='"lu"'
-uvxformat='"lx"'
-vaproto='define'
-vendorarch='@LIBDIR@/perl/vendor_perl/5.22.1/@ARCH@-thread-multi'
-vendorarchexp='@LIBDIR@/perl/vendor_perl/5.22.1/@ARCH@-thread-multi'
-vendorbin='@USRBIN@'
-vendorbinexp='@USRBIN@'
-vendorhtml1dir=' '
-vendorhtml1direxp=''
-vendorhtml3dir=' '
-vendorhtml3direxp=''
-vendorlib='@LIBDIR@/perl/vendor_perl/5.22.1'
-vendorlib_stem='@LIBDIR@/perl/vendor_perl'
-vendorlibexp='@LIBDIR@/perl/vendor_perl/5.22.1'
-vendorman1dir=' '
-vendorman1direxp=''
-vendorman3dir=' '
-vendorman3direxp=''
-vendorprefix='@EXECPREFIX@'
-vendorprefixexp='@EXECPREFIX@'
-vendorscript='@USRBIN@'
-vendorscriptexp='@USRBIN@'
-version='5.22.1'
-version_patchlevel_string='version 22 subversion 1'
-versiononly='undef'
-vi=''
-xlibpth='@LIBDIR@/386 @BASELIBDIR@386'
-yacc='yacc'
-yaccflags=''
-zcat=''
-zip='zip'
-PERL_REVISION=5
-PERL_VERSION=22
-PERL_SUBVERSION=1
-PERL_API_REVISION=5
-PERL_API_VERSION=22
-PERL_API_SUBVERSION=0
-PERL_PATCHLEVEL=''
-PERL_CONFIG_SH=true
-: Variables propagated from previous config.sh file.
-libdb_needs_pthread='N'
-
-# for Time-HiRes
-d_clock_nanosleep='define'
-d_clock_gettime='define'
-d_clock_getres='define'
-d_clock='define'
-d_nanosleep='define'
diff --git a/meta/recipes-devtools/perl/perl/config.sh-32 b/meta/recipes-devtools/perl/perl/config.sh-32
deleted file mode 100644
index 7259a0c6ae..0000000000
--- a/meta/recipes-devtools/perl/perl/config.sh-32
+++ /dev/null
@@ -1,38 +0,0 @@
-alignbytes='4'
-cf_time='Thu Dec 23 03:57:51 UTC 2010'
-cppsymbols='_FILE_OFFSET_BITS=64 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=200809L _POSIX_SOURCE=1 _REENTRANT=1 _XOPEN_SOURCE=700 _XOPEN_SOURCE_EXTENDED=1 __BIGGEST_ALIGNMENT__=16 __CHAR16_TYPE__=short\ unsigned\ int __CHAR32_TYPE__=unsigned\ int __CHAR_BIT__=8 __DBL_DENORM_MIN__=((double)4.94065645841246544177e-324L) __DBL_DIG__=15 __DBL_EPSILON__=((double)2.22044604925031308085e-16L) __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=((double)1.79769313486231570815e+308L) __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=((double)2.22507385850720138309e-308L) __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6145 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6142) __DEC128_MIN__=1E-6143DL __DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=97 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-94) __DEC32_MIN__=1E-95DF __DEC32_SUBNORMAL_MIN__=0.000001E-95DF __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=385 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-382) __DEC64_MIN__=1E-383DD __DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD __DECIMAL_BID_FORMAT__=1 __DECIMAL_DIG__=21 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLT_DENORM_MIN__=1.40129846432481707092e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209289550781250000e-7F __FLT_EVAL_METHOD__=2 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282346638528859812e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435082228750797e-38F __FLT_RADIX__=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __GLIBC_MINOR__=12 __GLIBC__=2 __GNUC_GNU_INLINE__=1 __GNUC_MINOR__=5 __GNUC_PATCHLEVEL__=1 __GNUC__=4 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1002 __INT16_C(c)=c __INT16_MAX__=32767 __INT16_TYPE__=short\ int __INT32_C(c)=c __INT32_MAX__=2147483647 __INT32_TYPE__=int __INT64_C(c)=cLL __INT64_MAX__=9223372036854775807LL __INT64_TYPE__=long\ long\ int __INT8_C(c)=c __INT8_MAX__=127 __INT8_TYPE__=signed\ char __INTMAX_C(c)=cLL __INTMAX_MAX__=9223372036854775807LL __INTMAX_TYPE__=long\ long\ int __INTPTR_MAX__=2147483647 __INTPTR_TYPE__=int __INT_FAST16_MAX__=2147483647 __INT_FAST16_TYPE__=int __INT_FAST32_MAX__=2147483647 __INT_FAST32_TYPE__=int __INT_FAST64_MAX__=9223372036854775807LL __INT_FAST64_TYPE__=long\ long\ int __INT_FAST8_MAX__=127 __INT_FAST8_TYPE__=signed\ char __INT_LEAST16_MAX__=32767 __INT_LEAST16_TYPE__=short\ int __INT_LEAST32_MAX__=2147483647 __INT_LEAST32_TYPE__=int __INT_LEAST64_MAX__=9223372036854775807LL __INT_LEAST64_TYPE__=long\ long\ int __INT_LEAST8_MAX__=127 __INT_LEAST8_TYPE__=signed\ char __INT_MAX__=2147483647 __LDBL_DENORM_MIN__=3.64519953188247460253e-4951L __LDBL_DIG__=18 __LDBL_EPSILON__=1.08420217248550443401e-19L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=64 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176502e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626e-4932L __LONG_LONG_MAX__=9223372036854775807LL __LONG_MAX__=2147483647L __PRAGMA_REDEFINE_EXTNAME=1 __PTRDIFF_MAX__=2147483647 __PTRDIFF_TYPE__=int __REGISTER_PREFIX__= __SCHAR_MAX__=127 __SHRT_MAX__=32767 __SIG_ATOMIC_MAX__=2147483647 __SIG_ATOMIC_MIN__=(-2147483647\ -\ 1) __SIG_ATOMIC_TYPE__=int __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=12 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=4 __SIZEOF_POINTER__=4 __SIZEOF_PTRDIFF_T__=4 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=4 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_MAX__=4294967295U __SIZE_TYPE__=unsigned\ int __STDC_HOSTED__=1 __STDC__=1 __UINT16_C(c)=c __UINT16_MAX__=65535 __UINT16_TYPE__=short\ unsigned\ int __UINT32_C(c)=cU __UINT32_MAX__=4294967295U __UINT32_TYPE__=unsigned\ int __UINT64_C(c)=cULL __UINT64_MAX__=18446744073709551615ULL __UINT64_TYPE__=long\ long\ unsigned\ int __UINT8_C(c)=c __UINT8_MAX__=255 __UINT8_TYPE__=unsigned\ char __UINTMAX_C(c)=cULL __UINTMAX_MAX__=18446744073709551615ULL __UINTMAX_TYPE__=long\ long\ unsigned\ int __UINTPTR_MAX__=4294967295U __UINTPTR_TYPE__=unsigned\ int __UINT_FAST16_MAX__=4294967295U __UINT_FAST16_TYPE__=unsigned\ int __UINT_FAST32_MAX__=4294967295U __UINT_FAST32_TYPE__=unsigned\ int __UINT_FAST64_MAX__=18446744073709551615ULL __UINT_FAST64_TYPE__=long\ long\ unsigned\ int __UINT_FAST8_MAX__=255 __UINT_FAST8_TYPE__=unsigned\ char __UINT_LEAST16_MAX__=65535 __UINT_LEAST16_TYPE__=short\ unsigned\ int __UINT_LEAST32_MAX__=4294967295U __UINT_LEAST32_TYPE__=unsigned\ int __UINT_LEAST64_MAX__=18446744073709551615ULL __UINT_LEAST64_TYPE__=long\ long\ unsigned\ int __UINT_LEAST8_MAX__=255 __UINT_LEAST8_TYPE__=unsigned\ char __USER_LABEL_PREFIX__= __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_REENTRANT=1 __USE_SVID=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 __VERSION__="4.5.1" __WCHAR_MAX__=2147483647L __WCHAR_MIN__=(-2147483647L\ -\ 1) __WCHAR_TYPE__=long\ int __WINT_MAX__=4294967295U __WINT_MIN__=0U __WINT_TYPE__=unsigned\ int __gnu_linux__=1 __i386=1 __i386__=1 __i586=1 __i586__=1 __linux=1 __linux__=1 __pentium=1 __pentium__=1 __tune_i586__=1 __tune_pentium__=1 __unix=1 __unix__=1 i386=1 linux=1 unix=1'
-d_nv_preserves_uv='define'
-d_printf_format_null='define'
-d_u32align='undef'
-gidformat='"lu"'
-i32type='long'
-i64type='long long'
-ivsize='4'
-longdblsize='12'
-longsize='4'
-myuname='linux qemux86 2.6.37-rc5-yocto-standard+ #1 preempt mon dec 20 14:21:27 pst 2010 i686 gnulinux '
-need_va_copy='undef'
-netdb_host_type='const void *'
-nv_preserves_uv_bits='32'
-ptrsize='4'
-quadkind='3'
-quadtype='long long'
-sGMTIME_max='2147483647'
-sGMTIME_min='-2147483648'
-sLOCALTIME_max='2147483647'
-sLOCALTIME_min='-2147483648'
-sPRIXU64='"LX"'
-sPRId64='"Ld"'
-sPRIi64='"Li"'
-sPRIo64='"Lo"'
-sPRIu64='"Lu"'
-sPRIx64='"Lx"'
-selectminbits='32'
-sizesize='4'
-u32type='unsigned long'
-u64type='unsigned long long'
-uidformat='"lu"'
-uquadtype='unsigned long long'
-use64bitall='undef'
-use64bitint='undef'
-uvsize='4'
diff --git a/meta/recipes-devtools/perl/perl/config.sh-32-be b/meta/recipes-devtools/perl/perl/config.sh-32-be
deleted file mode 100644
index a59a9abb5e..0000000000
--- a/meta/recipes-devtools/perl/perl/config.sh-32-be
+++ /dev/null
@@ -1 +0,0 @@
-byteorder='4321'
diff --git a/meta/recipes-devtools/perl/perl/config.sh-32-le b/meta/recipes-devtools/perl/perl/config.sh-32-le
deleted file mode 100644
index 10e4226567..0000000000
--- a/meta/recipes-devtools/perl/perl/config.sh-32-le
+++ /dev/null
@@ -1 +0,0 @@
-byteorder='1234'
diff --git a/meta/recipes-devtools/perl/perl/config.sh-64 b/meta/recipes-devtools/perl/perl/config.sh-64
deleted file mode 100644
index 6929d3a09d..0000000000
--- a/meta/recipes-devtools/perl/perl/config.sh-64
+++ /dev/null
@@ -1,38 +0,0 @@
-alignbytes='8'
-cf_time='Thu Dec 23 02:06:42 UTC 2010'
-cppsymbols='_FILE_OFFSET_BITS=64 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 _LP64=1 _POSIX_C_SOURCE=200809L _POSIX_SOURCE=1 _REENTRANT=1 _XOPEN_SOURCE=700 _XOPEN_SOURCE_EXTENDED=1 __BIGGEST_ALIGNMENT__=16 __CHAR16_TYPE__=short\ unsigned\ int __CHAR32_TYPE__=unsigned\ int __CHAR_BIT__=8 __DBL_DENORM_MIN__=((double)4.94065645841246544177e-324L) __DBL_DIG__=15 __DBL_EPSILON__=((double)2.22044604925031308085e-16L) __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=((double)1.79769313486231570815e+308L) __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=((double)2.22507385850720138309e-308L) __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6145 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6142) __DEC128_MIN__=1E-6143DL __DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=97 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-94) __DEC32_MIN__=1E-95DF __DEC32_SUBNORMAL_MIN__=0.000001E-95DF __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=385 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-382) __DEC64_MIN__=1E-383DD __DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD __DECIMAL_BID_FORMAT__=1 __DECIMAL_DIG__=21 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLT_DENORM_MIN__=1.40129846432481707092e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209289550781250000e-7F __FLT_EVAL_METHOD__=0 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282346638528859812e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435082228750797e-38F __FLT_RADIX__=2 __GCC_HAVE_DWARF2_CFI_ASM=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __GLIBC_MINOR__=12 __GLIBC__=2 __GNUC_GNU_INLINE__=1 __GNUC_MINOR__=5 __GNUC_PATCHLEVEL__=1 __GNUC__=4 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1002 __INT16_C(c)=c __INT16_MAX__=32767 __INT16_TYPE__=short\ int __INT32_C(c)=c __INT32_MAX__=2147483647 __INT32_TYPE__=int __INT64_C(c)=cL __INT64_MAX__=9223372036854775807L __INT64_TYPE__=long\ int __INT8_C(c)=c __INT8_MAX__=127 __INT8_TYPE__=signed\ char __INTMAX_C(c)=cL __INTMAX_MAX__=9223372036854775807L __INTMAX_TYPE__=long\ int __INTPTR_MAX__=9223372036854775807L __INTPTR_TYPE__=long\ int __INT_FAST16_MAX__=9223372036854775807L __INT_FAST16_TYPE__=long\ int __INT_FAST32_MAX__=9223372036854775807L __INT_FAST32_TYPE__=long\ int __INT_FAST64_MAX__=9223372036854775807L __INT_FAST64_TYPE__=long\ int __INT_FAST8_MAX__=127 __INT_FAST8_TYPE__=signed\ char __INT_LEAST16_MAX__=32767 __INT_LEAST16_TYPE__=short\ int __INT_LEAST32_MAX__=2147483647 __INT_LEAST32_TYPE__=int __INT_LEAST64_MAX__=9223372036854775807L __INT_LEAST64_TYPE__=long\ int __INT_LEAST8_MAX__=127 __INT_LEAST8_TYPE__=signed\ char __INT_MAX__=2147483647 __LDBL_DENORM_MIN__=3.64519953188247460253e-4951L __LDBL_DIG__=18 __LDBL_EPSILON__=1.08420217248550443401e-19L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=64 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176502e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626e-4932L __LONG_LONG_MAX__=9223372036854775807LL __LONG_MAX__=9223372036854775807L __LP64__=1 __MMX__=1 __PRAGMA_REDEFINE_EXTNAME=1 __PTRDIFF_MAX__=9223372036854775807L __PTRDIFF_TYPE__=long\ int __REGISTER_PREFIX__= __SCHAR_MAX__=127 __SHRT_MAX__=32767 __SIG_ATOMIC_MAX__=2147483647 __SIG_ATOMIC_MIN__=(-2147483647\ -\ 1) __SIG_ATOMIC_TYPE__=int __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=8 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_MAX__=18446744073709551615UL __SIZE_TYPE__=long\ unsigned\ int __SSE2_MATH__=1 __SSE2__=1 __SSE_MATH__=1 __SSE__=1 __STDC_HOSTED__=1 __STDC__=1 __UINT16_C(c)=c __UINT16_MAX__=65535 __UINT16_TYPE__=short\ unsigned\ int __UINT32_C(c)=cU __UINT32_MAX__=4294967295U __UINT32_TYPE__=unsigned\ int __UINT64_C(c)=cUL __UINT64_MAX__=18446744073709551615UL __UINT64_TYPE__=long\ unsigned\ int __UINT8_C(c)=c __UINT8_MAX__=255 __UINT8_TYPE__=unsigned\ char __UINTMAX_C(c)=cUL __UINTMAX_MAX__=18446744073709551615UL __UINTMAX_TYPE__=long\ unsigned\ int __UINTPTR_MAX__=18446744073709551615UL __UINTPTR_TYPE__=long\ unsigned\ int __UINT_FAST16_MAX__=18446744073709551615UL __UINT_FAST16_TYPE__=long\ unsigned\ int __UINT_FAST32_MAX__=18446744073709551615UL __UINT_FAST32_TYPE__=long\ unsigned\ int __UINT_FAST64_MAX__=18446744073709551615UL __UINT_FAST64_TYPE__=long\ unsigned\ int __UINT_FAST8_MAX__=255 __UINT_FAST8_TYPE__=unsigned\ char __UINT_LEAST16_MAX__=65535 __UINT_LEAST16_TYPE__=short\ unsigned\ int __UINT_LEAST32_MAX__=4294967295U __UINT_LEAST32_TYPE__=unsigned\ int __UINT_LEAST64_MAX__=18446744073709551615UL __UINT_LEAST64_TYPE__=long\ unsigned\ int __UINT_LEAST8_MAX__=255 __UINT_LEAST8_TYPE__=unsigned\ char __USER_LABEL_PREFIX__= __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_REENTRANT=1 __USE_SVID=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 __VERSION__="4.5.1" __WCHAR_MAX__=2147483647 __WCHAR_MIN__=(-2147483647\ -\ 1) __WCHAR_TYPE__=int __WINT_MAX__=4294967295U __WINT_MIN__=0U __WINT_TYPE__=unsigned\ int __amd64=1 __amd64__=1 __gnu_linux__=1 __k8=1 __k8__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 __x86_64=1 __x86_64__=1 linux=1 unix=1'
-d_nv_preserves_uv='undef'
-d_printf_format_null='undef'
-d_u32align='define'
-gidformat='"u"'
-i32type='int'
-i64type='long'
-ivsize='8'
-longdblsize='16'
-longsize='8'
-myuname='linux qemux86-64 2.6.37-rc5-yocto-standard+ #1 smp preempt mon dec 20 17:19:50 pst 2010 x86_64 gnulinux '
-need_va_copy='define'
-netdb_host_type='char *'
-nv_preserves_uv_bits='53'
-ptrsize='8'
-quadkind='2'
-quadtype='long'
-sGMTIME_max='67768036191676799'
-sGMTIME_min='-62167219200'
-sLOCALTIME_max='67768036191676799'
-sLOCALTIME_min='-62167219200'
-sPRIXU64='"lX"'
-sPRId64='"ld"'
-sPRIi64='"li"'
-sPRIo64='"lo"'
-sPRIu64='"lu"'
-sPRIx64='"lx"'
-selectminbits='64'
-sizesize='8'
-u32type='unsigned int'
-u64type='unsigned long'
-uidformat='"u"'
-uquadtype='unsigned long'
-use64bitall='define'
-use64bitint='define'
-uvsize='8'
diff --git a/meta/recipes-devtools/perl/perl/config.sh-64-be b/meta/recipes-devtools/perl/perl/config.sh-64-be
deleted file mode 100644
index c08ce3c431..0000000000
--- a/meta/recipes-devtools/perl/perl/config.sh-64-be
+++ /dev/null
@@ -1 +0,0 @@
-byteorder='87654321'
diff --git a/meta/recipes-devtools/perl/perl/config.sh-64-le b/meta/recipes-devtools/perl/perl/config.sh-64-le
deleted file mode 100644
index 277d2a9bee..0000000000
--- a/meta/recipes-devtools/perl/perl/config.sh-64-le
+++ /dev/null
@@ -1 +0,0 @@
-byteorder='12345678'
diff --git a/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch b/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
deleted file mode 100644
index a00ad61d90..0000000000
--- a/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Index: perl-5.14.2/Makefile.SH
-===================================================================
---- perl-5.14.2.orig/Makefile.SH
-+++ perl-5.14.2/Makefile.SH
-@@ -622,7 +622,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
- $(RUN) ./generate_uudmap$(HOST_EXE_EXT) uudmap.h bitcount.h
-
- generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
-- $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
-+ $(BUILD_CC) -o generate_uudmap$(EXE_EXT) generate_uudmap.c
-
- miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
- $(CCCMD) $(PLDLFLAGS) $*.c
diff --git a/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff b/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff
deleted file mode 100644
index a63b968317..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff
+++ /dev/null
@@ -1,62 +0,0 @@
-From d33d46963035ef726144dc66be2ae9c00aec0333 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Tue, 16 Oct 2012 23:07:56 +0300
-Subject: Fix CPAN::FirstTime defaults with nonexisting site dirs if a parent
- is writable
-
-The site directories do not exist on a typical Debian system. The build
-systems will create them when necessary, so there's no need for a prompt
-suggesting local::lib if the first existing parent directory is writable.
-
-Also, writability of the core directories is not interesting as we
-explicitly tell CPAN not to touch those with INSTALLDIRS=site.
-
-Bug-Debian: http://bugs.debian.org/688842
-Patch-Name: debian/cpan-missing-site-dirs.diff
----
- cpan/CPAN/lib/CPAN/FirstTime.pm | 31 +++++++++++++++++++++++++++----
- 1 file changed, 27 insertions(+), 4 deletions(-)
-
-diff --git a/cpan/CPAN/lib/CPAN/FirstTime.pm b/cpan/CPAN/lib/CPAN/FirstTime.pm
-index 33054cd..7b0becf 100644
---- a/cpan/CPAN/lib/CPAN/FirstTime.pm
-+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
-@@ -2057,11 +2057,34 @@ sub _print_urllist {
- };
- }
-
-+# Debian modification: return true if this directory
-+# or the first existing one upwards is writable
-+sub _can_write_to_this_or_parent {
-+ my ($dir) = @_;
-+ my @parts = File::Spec->splitdir($dir);
-+ while (@parts) {
-+ my $cur = File::Spec->catdir(@parts);
-+ return 1 if -w $cur;
-+ return 0 if -e _;
-+ pop @parts;
-+ }
-+ return 0;
-+}
-+
-+# Debian specific modification: the site directories don't necessarily
-+# exist on the system, but the build systems create them when necessary,
-+# so return true if the first existing directory upwards is writable
-+#
-+# Furthermore, on Debian, only test the site directories
-+# (installsite*, expanded to /usr/local/{share,lib}/perl),
-+# not the core ones
-+# (install*lib, expanded to /usr/{share,lib}/perl).
-+# We pass INSTALLDIRS=site by default to keep CPAN from touching
-+# the core directories.
-+
- sub _can_write_to_libdirs {
-- return -w $Config{installprivlib}
-- && -w $Config{installarchlib}
-- && -w $Config{installsitelib}
-- && -w $Config{installsitearch}
-+ return _can_write_to_this_or_parent($Config{installsitelib})
-+ && _can_write_to_this_or_parent($Config{installsitearch})
- }
-
- sub _using_installbase {
diff --git a/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff b/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff
deleted file mode 100644
index 6b5295045c..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5ff1f21484aab68efe321ff4ba5d35928f72af96 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Provide a sensible INSTALLDIRS default for modules installed from
- CPAN.
-
-Some modules which are included in core set INSTALLDIRS => 'perl'
-explicitly in Makefile.PL or Build.PL. This makes sense for the normal @INC
-ordering, but not ours.
-
-Patch-Name: debian/cpan_definstalldirs.diff
----
- cpan/CPAN/lib/CPAN/FirstTime.pm | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cpan/CPAN/lib/CPAN/FirstTime.pm b/cpan/CPAN/lib/CPAN/FirstTime.pm
-index 918e009..33054cd 100644
---- a/cpan/CPAN/lib/CPAN/FirstTime.pm
-+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
-@@ -1024,7 +1024,7 @@ sub init {
- my_prompt_loop(prefer_installer => 'MB', $matcher, 'MB|EUMM|RAND');
-
- if (!$matcher or 'makepl_arg make_arg' =~ /$matcher/) {
-- my_dflt_prompt(makepl_arg => "", $matcher);
-+ my_dflt_prompt(makepl_arg => "INSTALLDIRS=site", $matcher);
- my_dflt_prompt(make_arg => "", $matcher);
- if ( $CPAN::Config->{makepl_arg} =~ /LIBS=|INC=/ ) {
- $CPAN::Frontend->mywarn(
-@@ -1056,7 +1056,7 @@ sub init {
- my_dflt_prompt(make_install_arg => $CPAN::Config->{make_arg} || "",
- $matcher);
-
-- my_dflt_prompt(mbuildpl_arg => "", $matcher);
-+ my_dflt_prompt(mbuildpl_arg => "--installdirs site", $matcher);
- my_dflt_prompt(mbuild_arg => "", $matcher);
-
- if (exists $CPAN::HandleConfig::keys{mbuild_install_build_command}
diff --git a/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff b/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff
deleted file mode 100644
index 280bf11706..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff
+++ /dev/null
@@ -1,34 +0,0 @@
-From 01421f8a80d5c623959695ba2b8167f30112d333 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Fri, 16 Dec 2005 01:32:14 +1100
-Subject: Remove overly restrictive DB_File version check.
-
-Bug-Debian: http://bugs.debian.org/340047
-
-Package dependencies ensure the correct library is linked at run-time.
-
-Patch-Name: debian/db_file_ver.diff
----
- cpan/DB_File/version.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/cpan/DB_File/version.c b/cpan/DB_File/version.c
-index e01f6f6..544e6ee 100644
---- a/cpan/DB_File/version.c
-+++ b/cpan/DB_File/version.c
-@@ -48,6 +48,7 @@ __getBerkeleyDBInfo()
-
- (void)db_version(&Major, &Minor, &Patch) ;
-
-+#ifndef DEBIAN
- /* Check that the versions of db.h and libdb.a are the same */
- if (Major != DB_VERSION_MAJOR || Minor != DB_VERSION_MINOR )
- /* || Patch != DB_VERSION_PATCH) */
-@@ -55,6 +56,7 @@ __getBerkeleyDBInfo()
- croak("\nDB_File was build with libdb version %d.%d.%d,\nbut you are attempting to run it with libdb version %d.%d.%d\n",
- DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
- Major, Minor, Patch) ;
-+#endif /* DEBIAN */
-
- /* check that libdb is recent enough -- we need 2.3.4 or greater */
- if (Major == 2 && (Minor < 3 || (Minor == 3 && Patch < 4)))
diff --git a/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff b/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff
deleted file mode 100644
index 601ee4c304..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff
+++ /dev/null
@@ -1,56 +0,0 @@
-From def4aa3817f98aae625e601b791ef068276f05d5 Mon Sep 17 00:00:00 2001
-From: Dominic Hargreaves <dom@earth.li>
-Date: Mon, 17 May 2010 13:23:07 +0300
-Subject: Point users to Debian packages of deprecated core modules
-
-Bug-Debian: http://bugs.debian.org/747628
-
-Several modules are being deprecated with perl 5.20.
-To get a clean transition, perl/perl-modules is going to recommend the
-separate Debian packages of these for one release cycle so that they will be
-pulled in by default on upgrades. This is taking place for perl 5.20/jessie.
-
-However, on systems configured to ignore recommendations the deprecation
-warnings will still be useful, so modify them slightly to point to the
-separate packages instead.
-
-Patch-Name: debian/deprecate-with-apt.diff
----
- lib/deprecate.pm | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/lib/deprecate.pm b/lib/deprecate.pm
-index 47bc112..b0c61df 100644
---- a/lib/deprecate.pm
-+++ b/lib/deprecate.pm
-@@ -7,6 +7,13 @@ our $VERSION = 0.03;
- our %Config;
- unless (%Config) { require Config; *Config = \%Config::Config; }
-
-+# Debian-specific change: recommend the separate Debian packages of
-+# deprecated modules where available
-+
-+our %DEBIAN_PACKAGES = (
-+ # None for the perl 5.22 cycle
-+);
-+
- # This isn't a public API. It's internal to code maintained by the perl-porters
- # If you would like it to be a public API, please send a patch with
- # documentation and tests. Until then, it may change without warning.
-@@ -58,9 +65,15 @@ EOM
- if (defined $callers_bitmask
- && (vec($callers_bitmask, $warnings::Offsets{deprecated}, 1)
- || vec($callers_bitmask, $warnings::Offsets{all}, 1))) {
-- warn <<"EOM";
-+ if (my $deb = $DEBIAN_PACKAGES{$package}) {
-+ warn <<"EOM";
-+$package will be removed from the Perl core distribution in the next major release. Please install the separate $deb package. It is being used at $call_file, line $call_line.
-+EOM
-+ } else {
-+ warn <<"EOM";
- $package will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at $call_file, line $call_line.
- EOM
-+ }
- }
- }
- }
diff --git a/meta/recipes-devtools/perl/perl/debian/doc_info.diff b/meta/recipes-devtools/perl/perl/debian/doc_info.diff
deleted file mode 100644
index fbea2ee228..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/doc_info.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-From e18f81e69c55d698abd293e71063d6b6b275cc07 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Fri, 18 Mar 2005 22:22:25 +1100
-Subject: Replace generic man(1) instructions with Debian-specific information.
-
-Indicate that the user needs to install the perl-doc package.
-
-Patch-Name: debian/doc_info.diff
----
- pod/perl.pod | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/pod/perl.pod b/pod/perl.pod
-index 364e957..f97e103 100644
---- a/pod/perl.pod
-+++ b/pod/perl.pod
-@@ -291,8 +291,16 @@ aux c2ph h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp
-
- =for buildtoc __END__
-
--On a Unix-like system, these documentation files will usually also be
--available as manpages for use with the F<man> program.
-+On Debian systems, you need to install the B<perl-doc> package which
-+contains the majority of the standard Perl documentation and the
-+F<perldoc> program.
-+
-+Extensive additional documentation for Perl modules is available, both
-+those distributed with Perl and third-party modules which are packaged
-+or locally installed.
-+
-+You should be able to view Perl's documentation with your man(1)
-+program or perldoc(1).
-
- Some documentation is not available as man pages, so if a
- cross-reference is not found by man, try it with L<perldoc>. Perldoc can
diff --git a/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff b/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff
deleted file mode 100644
index e074b20fdf..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff
+++ /dev/null
@@ -1,70 +0,0 @@
-From 7fe59a3d0601c6d8634eae4f99dae3024cd02a92 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Tweak enc2xs to follow symlinks and ignore missing @INC directories.
-
-Bug-Debian: http://bugs.debian.org/290336
-
-- ignore missing directories,
-- follow symlinks (/usr/share/perl/5.8 -> 5.8.4).
-- filter "." out when running "enc2xs -C", it's unnecessary and causes
- issues with follow => 1 (see #603686 and [rt.cpan.org #64585])
-
-Patch-Name: debian/enc2xs_inc.diff
----
- cpan/Encode/bin/enc2xs | 8 ++++----
- t/porting/customized.t | 3 +++
- 2 files changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
-index 19f2b2b..4d64e38 100644
---- a/cpan/Encode/bin/enc2xs
-+++ b/cpan/Encode/bin/enc2xs
-@@ -944,11 +944,11 @@ use vars qw(
- sub find_e2x{
- eval { require File::Find; };
- my (@inc, %e2x_dir);
-- for my $inc (@INC){
-+ for my $inc (grep -d, @INC){
- push @inc, $inc unless $inc eq '.'; #skip current dir
- }
- File::Find::find(
-- sub {
-+ { wanted => sub {
- my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
- $atime,$mtime,$ctime,$blksize,$blocks)
- = lstat($_) or return;
-@@ -958,7 +958,7 @@ sub find_e2x{
- $e2x_dir{$File::Find::dir} ||= $mtime;
- }
- return;
-- }, @inc);
-+ }, follow => 1}, @inc);
- warn join("\n", keys %e2x_dir), "\n";
- for my $d (sort {$e2x_dir{$a} <=> $e2x_dir{$b}} keys %e2x_dir){
- $_E2X = $d;
-@@ -1025,7 +1025,7 @@ sub make_configlocal_pm {
- $LocalMod{$enc} ||= $mod;
- }
- };
-- File::Find::find({wanted => $wanted}, @INC);
-+ File::Find::find({wanted => $wanted, follow => 1}, grep -d && !/^\./, @INC);
- $_ModLines = "";
- for my $enc ( sort keys %LocalMod ) {
- $_ModLines .=
-diff --git a/t/porting/customized.t b/t/porting/customized.t
-index 45fcafb..3bd6adb 100644
---- a/t/porting/customized.t
-+++ b/t/porting/customized.t
-@@ -101,8 +101,11 @@ foreach my $module ( sort keys %Modules ) {
- print $data_fh join(' ', $module, $file, $id), "\n";
- next;
- }
-+SKIP: {
-+ skip("$file modified for Debian", 1) if $file eq 'cpan/Encode/bin/enc2xs';
- my $should_be = $customised{ $module }->{ $file };
- is( $id, $should_be, "SHA for $file matches stashed SHA" );
-+}
- }
- }
-
diff --git a/meta/recipes-devtools/perl/perl/debian/errno_ver.diff b/meta/recipes-devtools/perl/perl/debian/errno_ver.diff
deleted file mode 100644
index bcb59c69e0..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/errno_ver.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-From 827eee225897c35ec97194a5971bf4bfcf250748 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Fri, 16 Dec 2005 01:32:14 +1100
-Subject: Remove Errno version check due to upgrade problems with long-running
- processes.
-
-Bug-Debian: http://bugs.debian.org/343351
-
-Remove version check which can cause problems for long running
-processes embedding perl when upgrading to a newer version,
-compatible, but built on a different machine.
-
-Patch-Name: debian/errno_ver.diff
----
- ext/Errno/Errno_pm.PL | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
-index c6bfa06..519e5c7 100644
---- a/ext/Errno/Errno_pm.PL
-+++ b/ext/Errno/Errno_pm.PL
-@@ -278,13 +278,8 @@ sub write_errno_pm {
-
- package Errno;
- require Exporter;
--use Config;
- use strict;
-
--"\$Config{'archname'}-\$Config{'osvers'}" eq
--"$archname-$Config{'osvers'}" or
-- die "Errno architecture ($archname-$Config{'osvers'}) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})";
--
- our \$VERSION = "$VERSION";
- \$VERSION = eval \$VERSION;
- our \@ISA = 'Exporter';
diff --git a/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff b/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff
deleted file mode 100644
index adb4bd9910..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff
+++ /dev/null
@@ -1,37 +0,0 @@
-From 431275078b0490d2e092442d9582be06bb95b354 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Sat, 10 May 2014 23:34:14 +0300
-Subject: EU:MM: set location of libperl.a under /usr/lib
-
-The Debian packaging moves libperl.a a couple of levels up from the
-CORE directory to match other static libraries.
-
-Patch-Name: debian/extutils_set_libperl_path.diff
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +-
- pp.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index 5f1b87f..570a631 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -2505,7 +2505,7 @@ MAP_PRELIBS = $Config{perllibs} $Config{cryptlib}
- ($lperl = $libperl) =~ s/\$\(A\)/$self->{LIB_EXT}/;
- }
- unless ($libperl && -f $lperl) { # Ilya's code...
-- my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
-+ my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/../..";
- $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
- $libperl ||= "libperl$self->{LIB_EXT}";
- $libperl = "$dir/$libperl";
-diff --git a/pp.c b/pp.c
-index 42f156a..77c1279 100644
---- a/pp.c
-+++ b/pp.c
-@@ -1,4 +1,4 @@
--/* pp.c
-+ /* pp.c
- *
- * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- * 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Larry Wall and others
diff --git a/meta/recipes-devtools/perl/perl/debian/fakeroot.diff b/meta/recipes-devtools/perl/perl/debian/fakeroot.diff
deleted file mode 100644
index ec461cfe52..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fakeroot.diff
+++ /dev/null
@@ -1,42 +0,0 @@
-From 27ae7b18078d801a2c943aa6de2f7e9808177251 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Fri, 18 Mar 2005 22:22:25 +1100
-Subject: Postpone LD_LIBRARY_PATH evaluation to the binary targets.
-
-Modify the setting of LD_LIBRARY_PATH to append pre-existing values at the
-time the rule is evaluated rather than when the Makefile is created.
-
-This is required when building packages with dpkg-buildpackage and fakeroot,
-since fakeroot (which now sets LD_LIBRARY_PATH) is not used for the "build"
-rule where the Makefile is created, but is for the clean/binary* targets.
-
-Patch-Name: debian/fakeroot.diff
----
- Makefile.SH | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/Makefile.SH b/Makefile.SH
-index 034d812..04dd7d5 100755
---- a/Makefile.SH
-+++ b/Makefile.SH
-@@ -39,10 +39,7 @@ case "$useshrplib" in
- true)
- # Prefix all runs of 'miniperl' and 'perl' with
- # $ldlibpth so that ./perl finds *this* shared libperl.
-- case "$LD_LIBRARY_PATH" in
-- '') ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `" ;;
-- *) ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `:` quote "$LD_LIBRARY_PATH" `" ;;
-- esac
-+ ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `"'$${LD_LIBRARY_PATH:+:}$$LD_LIBRARY_PATH'
-
- pldlflags="$cccdlflags"
- static_ldflags=''
-@@ -113,7 +110,7 @@ true)
- ;;
- esac
- case "$ldlibpthname" in
-- '') ;;
-+ ''|LD_LIBRARY_PATH) ;;
- *)
- case "$osname" in
- os2)
diff --git a/meta/recipes-devtools/perl/perl/debian/find_html2text.diff b/meta/recipes-devtools/perl/perl/debian/find_html2text.diff
deleted file mode 100644
index d319e7518b..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/find_html2text.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-From c81dbdedff9e9b4fb75ac028aa718838c0292d2f Mon Sep 17 00:00:00 2001
-From: Andreas Marschke <andreas.marschke@googlemail.com>
-Date: Sat, 17 Sep 2011 11:38:42 +0100
-Subject: Configure CPAN::Distribution with correct name of html2text
-
-Bug-Debian: http://bugs.debian.org/640479
-Patch-Name: debian/find_html2text.diff
-
-If you use cpan from Debian you usually wind up trying to read online
-documentation through it. Unfortunately cpan can't find the
-html2text.pl script even though it is installed using the Debian
-package 'html2text'.
-
-Please see the attached patch for a quick fix of this issue.
-
-[Maintainer's note: html2text in Debian is not the same implementation
-as the html2text.pl which is expected, but should provide similar
-functionality].
----
- cpan/CPAN/lib/CPAN/Distribution.pm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cpan/CPAN/lib/CPAN/Distribution.pm b/cpan/CPAN/lib/CPAN/Distribution.pm
-index 092b781..5c2bae1 100644
---- a/cpan/CPAN/lib/CPAN/Distribution.pm
-+++ b/cpan/CPAN/lib/CPAN/Distribution.pm
-@@ -4099,7 +4099,7 @@ sub _display_url {
- if $CPAN::DEBUG;
-
- # should we define it in the config instead?
-- my $html_converter = "html2text.pl";
-+ my $html_converter = "html2text";
-
- my $web_browser = $CPAN::Config->{'lynx'} || undef;
- my $web_browser_out = $web_browser
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff b/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff
deleted file mode 100644
index 61a92712e7..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-From 9faf6dcc3a5c4154484d812eb3cc3dd78b35563b Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Mon, 30 May 2011 22:54:24 +0300
-Subject: Document that CCFLAGS should include $Config{ccflags}
-
-Bug: https://rt.cpan.org/Public/Bug/Display.html?id=68613
-Bug-Debian: http://bugs.debian.org/628522
-
-Compiling XS extensions without $Config{ccflags} can break the
-binary interface on some platforms.
-
-Patch-Name: fixes/document_makemaker_ccflags.diff
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
-index fe95b27..90403e8 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
-@@ -1774,6 +1774,10 @@ currently used by MakeMaker but may be handy in Makefile.PLs.
- String that will be included in the compiler call command line between
- the arguments INC and OPTIMIZE.
-
-+The default value is taken from $Config{ccflags}. When overriding
-+CCFLAGS, make sure to include the $Config{ccflags} settings to avoid
-+binary incompatibilities.
-+
- =item CONFIG
-
- Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff b/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff
deleted file mode 100644
index 525f962c1a..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff
+++ /dev/null
@@ -1,110 +0,0 @@
-From 55d430eb02fc116581847304ca20321687978269 Mon Sep 17 00:00:00 2001
-From: Jonathan Nieder <jrnieder@gmail.com>
-Date: Fri, 27 Jul 2012 10:35:07 -0500
-Subject: Memoize::Storable: respect 'nstore' option not respected
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Memoize(3perl) says:
-
- tie my %cache => 'Memoize::Storable', $filename, 'nstore';
- memoize 'function', SCALAR_CACHE => [HASH => \%cache];
-
- Include the ‘nstore’ option to have the "Storable" database
- written in ‘network order’. (See Storable for more details
- about this.)
-
-In fact the "nstore" option does no such thing. Option parsing looks
-like this:
-
- @options{@_} = ();
-
-$self->{OPTIONS}{'nstore'} is accordingly set to undef. Later
-Memoize::Storable checks if the option is true, and since undef is
-not true, the "else" branch is always taken.
-
- if ($self->{OPTIONS}{'nstore'}) {
- Storable::nstore($self->{H}, $self->{FILENAME});
- } else {
- Storable::store($self->{H}, $self->{FILENAME});
- }
-
-Correcting the condition to (exists $self->{OPTIONS}{'nstore'}) fixes
-it.
-
-Noticed because git-svn, which uses the 'nstore' option for its
-on-disk caches, was producing
-
- Byte order is not compatible at ../../lib/Storable.pm
-
-when run using a perl with a different integer size (and hence
-byteorder).
-
-Reported by Tim Retout (RT#77790)
-
-Bug-Debian: http://bugs.debian.org/587650
-Bug: https://rt.cpan.org/Public/Bug/Display.html?id=77790
-Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=77790
-Patch-Name: fixes/memoize_storable_nstore.diff
----
- cpan/Memoize/Memoize/Storable.pm | 2 +-
- cpan/Memoize/t/tie_storable.t | 24 ++++++++++++++++++++----
- 2 files changed, 21 insertions(+), 5 deletions(-)
-
-diff --git a/cpan/Memoize/Memoize/Storable.pm b/cpan/Memoize/Memoize/Storable.pm
-index 1314797..87876f2 100644
---- a/cpan/Memoize/Memoize/Storable.pm
-+++ b/cpan/Memoize/Memoize/Storable.pm
-@@ -55,7 +55,7 @@ sub DESTROY {
- require Carp if $Verbose;
- my $self= shift;
- print STDERR "Memoize::Storable::DESTROY(@_)\n" if $Verbose;
-- if ($self->{OPTIONS}{'nstore'}) {
-+ if (exists $self->{OPTIONS}{'nstore'}) {
- Storable::nstore($self->{H}, $self->{FILENAME});
- } else {
- Storable::store($self->{H}, $self->{FILENAME});
-diff --git a/cpan/Memoize/t/tie_storable.t b/cpan/Memoize/t/tie_storable.t
-index de3b8dc..a624238 100644
---- a/cpan/Memoize/t/tie_storable.t
-+++ b/cpan/Memoize/t/tie_storable.t
-@@ -31,18 +31,34 @@ if ($@) {
- exit 0;
- }
-
--print "1..4\n";
-+print "1..9\n";
-
- $file = "storable$$";
- 1 while unlink $file;
- tryout('Memoize::Storable', $file, 1); # Test 1..4
- 1 while unlink $file;
-+tryout('Memoize::Storable', $file, 5, 'nstore'); # Test 5..8
-+assert_netorder($file, 9); # Test 9
-+1 while unlink $file;
-+
-+
-+sub assert_netorder {
-+ my ($file, $testno) = @_;
-+
-+ my $netorder = Storable::file_magic($file)->{'netorder'};
-+ print ($netorder ? "ok $testno\n" : "not ok $testno\n");
-+}
-
- sub tryout {
-- my ($tiepack, $file, $testno) = @_;
-+ my ($tiepack, $file, $testno, $option) = @_;
-
-- tie my %cache => $tiepack, $file
-- or die $!;
-+ if (defined $option) {
-+ tie my %cache => $tiepack, $file, $option
-+ or die $!;
-+ } else {
-+ tie my %cache => $tiepack, $file
-+ or die $!;
-+ }
-
- memoize 'c5',
- SCALAR_CACHE => [HASH => \%cache],
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff b/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff
deleted file mode 100644
index 3c31972c64..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-From fa085fedd9c406edcd4a1a256c025d5ff7f6c6de Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Thu, 20 Sep 2007 19:47:14 +1000
-Subject: Document the Net::SMTP 'Port' option
-
-Bug-Debian: http://bugs.debian.org/100195
-Bug: http://rt.cpan.org/Public/Bug/Display.html?id=36038
-
-Patch-Name: fixes/net_smtp_docs.diff
----
- cpan/libnet/lib/Net/SMTP.pm | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/cpan/libnet/lib/Net/SMTP.pm b/cpan/libnet/lib/Net/SMTP.pm
-index afd017a..6ae7d9e 100644
---- a/cpan/libnet/lib/Net/SMTP.pm
-+++ b/cpan/libnet/lib/Net/SMTP.pm
-@@ -738,6 +738,7 @@ Net::SMTP will attempt to extract the address from the value passed.
-
- B<Debug> - Enable debugging information
-
-+B<Port> - Select a port on the remote host to connect to (default is 25)
-
- Example:
-
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff b/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff
deleted file mode 100644
index b5564fdbc0..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff
+++ /dev/null
@@ -1,73 +0,0 @@
-From 0ecf83f259db09cb38cb37c9b22e72be185afa8f Mon Sep 17 00:00:00 2001
-From: Hugo van der Sanden <hv@crypt.org>
-Date: Thu, 11 Jun 2015 12:25:40 +0100
-Subject: fix -Cnn parsing
-
-Commit 22ff313068 for [perl #123814] inadvertently changed the logic when
-parsing a numeric parameter to the -C option, such that the successfully
-parsed number was not saved as the option value if it parsed to the end
-of the argument.
-
-Bug: https://rt.perl.org/Ticket/Display.html?id=125381
-Bug-Debian: https://bugs.debian.org/788636
-Origin: upstream, http://perl5.git.perl.org/perl.git/commit/89d84ff965
-Patch-Name: fixes/perl-Cnn.diff
----
- t/run/switchC.t | 7 ++++++-
- util.c | 17 ++++++++---------
- 2 files changed, 14 insertions(+), 10 deletions(-)
-
-diff --git a/t/run/switchC.t b/t/run/switchC.t
-index f6aa868..4f63c3b 100644
---- a/t/run/switchC.t
-+++ b/t/run/switchC.t
-@@ -11,7 +11,7 @@ BEGIN {
- skip_all_if_miniperl('-C and $ENV{PERL_UNICODE} are disabled on miniperl');
- }
-
--plan(tests => 13);
-+plan(tests => 14);
-
- my $r;
-
-@@ -25,6 +25,11 @@ $r = runperl( switches => [ '-CO', '-w' ],
- stderr => 1 );
- like( $r, qr/^$b(?:\r?\n)?$/s, '-CO: no warning on UTF-8 output' );
-
-+$r = runperl( switches => [ '-C2', '-w' ],
-+ prog => 'print chr(256)',
-+ stderr => 1 );
-+like( $r, qr/^$b(?:\r?\n)?$/s, '-C2: no warning on UTF-8 output' );
-+
- SKIP: {
- if (exists $ENV{PERL_UNICODE} &&
- ($ENV{PERL_UNICODE} eq "" || $ENV{PERL_UNICODE} =~ /[SO]/)) {
-diff --git a/util.c b/util.c
-index 8cf62f5..ee23314 100644
---- a/util.c
-+++ b/util.c
-@@ -4420,16 +4420,15 @@ Perl_parse_unicode_opts(pTHX_ const char **popt)
- if (isDIGIT(*p)) {
- const char* endptr;
- UV uv;
-- if (grok_atoUV(p, &uv, &endptr)
-- && uv <= U32_MAX
-- && (p = endptr)
-- && *p && *p != '\n' && *p != '\r'
-- ) {
-+ if (grok_atoUV(p, &uv, &endptr) && uv <= U32_MAX) {
- opt = (U32)uv;
-- if (isSPACE(*p))
-- goto the_end_of_the_opts_parser;
-- else
-- Perl_croak(aTHX_ "Unknown Unicode option letter '%c'", *p);
-+ p = endptr;
-+ if (p && *p && *p != '\n' && *p != '\r') {
-+ if (isSPACE(*p))
-+ goto the_end_of_the_opts_parser;
-+ else
-+ Perl_croak(aTHX_ "Unknown Unicode option letter '%c'", *p);
-+ }
- }
- }
- else {
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff b/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff
deleted file mode 100644
index 7c9ca867a9..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff
+++ /dev/null
@@ -1,170 +0,0 @@
-From 9057adc106d6bbef53c9e706523cd94f1a7a08d4 Mon Sep 17 00:00:00 2001
-From: Russ Allbery <rra@debian.org>
-Date: Sat, 30 Aug 2014 15:10:41 -0700
-Subject: Support POD_MAN_DATE in Pod::Man for the left-hand footer
-
-Honor the environment variable POD_MAN_DATE and use its contents, if
-set, as the value of the left-hand footer if the date option is not
-set, overriding the timestamp of the input file. This is primarily
-useful to ensure reproducible builds of the same output file given the
-same souce and Pod::Man version, even when file timestamps may not be
-consistent. Thanks, Niko Tyni.
-
-Bug-Debian: http://bugs.debian.org/759405
-Origin: upstream
-Patch-Name: fixes/pod_man_reproducible_date.diff
----
- cpan/podlators/lib/Pod/Man.pm | 69 +++++++++++++++++++++++++++++++-----------
- cpan/podlators/t/devise-date.t | 29 +++++++++++++-----
- 2 files changed, 72 insertions(+), 26 deletions(-)
-
-diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
-index 72ca9ff..0536662 100644
---- a/cpan/podlators/lib/Pod/Man.pm
-+++ b/cpan/podlators/lib/Pod/Man.pm
-@@ -876,25 +876,42 @@ sub devise_title {
- }
-
- # Determine the modification date and return that, properly formatted in ISO
--# format. If we can't get the modification date of the input, instead use the
--# current time. Pod::Simple returns a completely unuseful stringified file
--# handle as the source_filename for input from a file handle, so we have to
--# deal with that as well.
-+# format.
-+#
-+# If POD_MAN_DATE is set, that overrides anything else. This can be used for
-+# reproducible generation of the same file even if the input file timestamps
-+# are unpredictable or the POD coms from standard input.
-+#
-+# Otherwise, use the modification date of the input if we can stat it. Be
-+# aware that Pod::Simple returns the stringification of the file handle as
-+# source_filename for input from a file handle, so we'll stat some random ref
-+# string in that case. If that fails, instead use the current time.
-+#
-+# $self - Pod::Man object, used to get the source file
-+#
-+# Returns: YYYY-MM-DD date suitable for the left-hand footer
- sub devise_date {
- my ($self) = @_;
-+
-+ # If POD_MAN_DATE is set, always use it.
-+ if ($ENV{POD_MAN_DATE}) {
-+ return $ENV{POD_MAN_DATE};
-+ }
-+
-+ # Otherwise, get the input filename and try to stat it. If that fails,
-+ # use the current time.
- my $input = $self->source_filename;
- my $time;
- if ($input) {
-- $time = (stat $input)[9] || time;
-+ $time = (stat($input))[9] || time();
- } else {
-- $time = time;
-+ $time = time();
- }
-
-- # Can't use POSIX::strftime(), which uses Fcntl, because MakeMaker
-- # uses this and it has to work in the core which can't load dynamic
-- # libraries.
-- my ($year, $month, $day) = (localtime $time)[5,4,3];
-- return sprintf ("%04d-%02d-%02d", $year + 1900, $month + 1, $day);
-+ # Can't use POSIX::strftime(), which uses Fcntl, because MakeMaker uses
-+ # this and it has to work in the core which can't load dynamic libraries.
-+ my ($year, $month, $day) = (localtime($time))[5,4,3];
-+ return sprintf("%04d-%02d-%02d", $year + 1900, $month + 1, $day);
- }
-
- # Print out the preamble and the title. The meaning of the arguments to .TH
-@@ -1632,6 +1649,15 @@ argument.
- Sets the centered page header to use instead of "User Contributed Perl
- Documentation".
-
-+=item date
-+
-+Sets the left-hand footer. If this option is not set, the contents of the
-+environment variable POD_MAN_DATE, if set, will be used. Failing that,
-+the modification date of the input file will be used, or the current time
-+if stat() can't find that file (which will be the case if the input is
-+from C<STDIN>). If obtained from the file modification date or the
-+current time, he date will be formatted as C<YYYY-MM-DD>.
-+
- =item errors
-
- How to report errors. C<die> says to throw an exception on any POD
-@@ -1642,13 +1668,6 @@ POD errors entirely, as much as possible.
-
- The default is C<pod>.
-
--=item date
--
--Sets the left-hand footer. By default, the modification date of the input
--file will be used, or the current date if stat() can't find that file (the
--case if the input is from C<STDIN>), and the date will be formatted as
--C<YYYY-MM-DD>.
--
- =item fixed
-
- The fixed-width font to use for verbatim text and code. Defaults to
-@@ -1810,6 +1829,20 @@ option was set to C<die>.
-
- =back
-
-+=head1 ENVIRONMENT
-+
-+=over 4
-+
-+=item POD_MAN_DATE
-+
-+If set, this will be used as the value of the left-hand footer unless the
-+C<date> option is explicitly set, overriding the timestamp of the input
-+file or the current time. This is primarily useful to ensure reproducible
-+builds of the same output file given the same souce and Pod::Man version,
-+even when file timestamps may not be consistent.
-+
-+=back
-+
- =head1 BUGS
-
- Encoding handling assumes that PerlIO is available and does not work
-diff --git a/cpan/podlators/t/devise-date.t b/cpan/podlators/t/devise-date.t
-index 3cce9f5..c610dd9 100644
---- a/cpan/podlators/t/devise-date.t
-+++ b/cpan/podlators/t/devise-date.t
-@@ -1,15 +1,28 @@
--#!/usr/bin/perl -w
--
--# In order for MakeMaker to build in the core, nothing can use
--# Fcntl which includes POSIX. devise_date()'s use of strftime()
--# was replaced. This tests that it's identical.
-+#!/usr/bin/perl
-+#
-+# In order for MakeMaker to build in the core, nothing can use Fcntl which
-+# includes POSIX. devise_date()'s use of strftime() was replaced. This tests
-+# that it's identical. It also tests special handling of the POD_MAN_DATE
-+# environment variable.
-
-+use 5.006;
- use strict;
--
--use Test::More tests => 1;
-+use warnings;
-
- use Pod::Man;
- use POSIX qw(strftime);
-
-+use Test::More tests => 2;
-+
-+# Check that the results of device_date matches strftime. There is no input
-+# file name, so this will use the current time.
- my $parser = Pod::Man->new;
--is $parser->devise_date, strftime("%Y-%m-%d", localtime);
-+is(
-+ $parser->devise_date,
-+ strftime('%Y-%m-%d', localtime()),
-+ 'devise_date matches strftime'
-+);
-+
-+# Set the override environment variable and ensure that it's honored.
-+local $ENV{POD_MAN_DATE} = '2014-01-01';
-+is($parser->devise_date, '2014-01-01', 'devise_date honors POD_MAN_DATE');
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff b/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff
deleted file mode 100644
index 7ebbf9c602..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff
+++ /dev/null
@@ -1,51 +0,0 @@
-From 183bb4af7ad862a2cf31d0dcb3dd45c100f76776 Mon Sep 17 00:00:00 2001
-From: Russ Allbery <rra@cpan.org>
-Date: Wed, 15 Apr 2015 22:21:25 -0700
-Subject: Support an empty POD_MAN_DATE environment variable
-
-One may want to set this to an empty string. Handle that correctly.
-
-(backported to Perl 5.20.2 by Niko Tyni <ntyni@debian.org>)
-
-Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=e0e9fcb53e8fc954b2b1955385eea18c27f869af
-Bug-Debian: https://bugs.debian.org/780259
-Patch-Name: fixes/podman-empty-date.diff
----
- cpan/podlators/lib/Pod/Man.pm | 2 +-
- cpan/podlators/t/devise-date.t | 6 +++++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
-index 365892e..8997a15 100644
---- a/cpan/podlators/lib/Pod/Man.pm
-+++ b/cpan/podlators/lib/Pod/Man.pm
-@@ -894,7 +894,7 @@ sub devise_date {
- my ($self) = @_;
-
- # If POD_MAN_DATE is set, always use it.
-- if ($ENV{POD_MAN_DATE}) {
-+ if (defined($ENV{POD_MAN_DATE})) {
- return $ENV{POD_MAN_DATE};
- }
-
-diff --git a/cpan/podlators/t/devise-date.t b/cpan/podlators/t/devise-date.t
-index 9da9d1b..27271d9 100644
---- a/cpan/podlators/t/devise-date.t
-+++ b/cpan/podlators/t/devise-date.t
-@@ -12,7 +12,7 @@ use warnings;
- use Pod::Man;
- use POSIX qw(strftime);
-
--use Test::More tests => 2;
-+use Test::More tests => 3;
-
- # Check that the results of device_date matches strftime. There is no input
- # file name, so this will use the current time.
-@@ -26,3 +26,7 @@ is(
- # Set the override environment variable and ensure that it's honored.
- local $ENV{POD_MAN_DATE} = '2014-01-01';
- is($parser->devise_date, '2014-01-01', 'devise_date honors POD_MAN_DATE');
-+
-+# Check that an empty environment variable is honored.
-+local $ENV{POD_MAN_DATE} = q{};
-+is($parser->devise_date, q{}, 'devise_date honors empty POD_MAN_DATE');
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff b/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff
deleted file mode 100644
index 1a60361160..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff
+++ /dev/null
@@ -1,109 +0,0 @@
-From 7671d101baa75d7a79bfbd8c75c1595fbb3f53ba Mon Sep 17 00:00:00 2001
-From: Russ Allbery <rra@cpan.org>
-Date: Sat, 7 Feb 2015 19:03:34 -0800
-Subject: Better errors for man pages from standard input
-
-[Pod::Man] Attempt to detect if the input came from a pipe and
-therefore has a completely unhelpful (and nonreproducible) source file
-name, and diagnose this as an error. Document that the name option
-(--name to pod2man) is required when processing POD source from
-standard input. (Debian Bug#777405)
-
-(backported to Perl 5.20.2 by Niko Tyni <ntyni@debian.org>)
-
-Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=d98872e46c93861b7aba14949e1258712087dc55
-Bug-Debian: https://bugs.debian.org/777405
-Patch-Name: fixes/podman-pipe.diff
----
- cpan/podlators/lib/Pod/Man.pm | 15 +++++++++++++++
- cpan/podlators/scripts/pod2man.PL | 4 ++++
- cpan/podlators/t/devise-title.t | 32 ++++++++++++++++++++++++++++++++
- 3 files changed, 51 insertions(+)
- create mode 100755 cpan/podlators/t/devise-title.t
-
-diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
-index 8997a15..969eaff 100644
---- a/cpan/podlators/lib/Pod/Man.pm
-+++ b/cpan/podlators/lib/Pod/Man.pm
-@@ -828,6 +828,17 @@ sub devise_title {
- $section = 3 if (!$$self{section} && $name =~ /\.pm\z/i);
- $name =~ s/\.p(od|[lm])\z//i;
-
-+ # If Pod::Parser gave us an IO::File reference as the source file name,
-+ # convert that to the empty string as well. Then, if we don't have a
-+ # valid name, emit a warning and convert it to STDIN.
-+ if ($name =~ /^IO::File(?:=\w+)\(0x[\da-f]+\)$/i) {
-+ $name = '';
-+ }
-+ if ($name eq '') {
-+ $self->whine (1, 'No name given for document');
-+ $name = 'STDIN';
-+ }
-+
- # If the section isn't 3, then the name defaults to just the basename of
- # the file. Otherwise, assume we're dealing with a module. We want to
- # figure out the full module name from the path to the file, but we don't
-@@ -1705,6 +1716,10 @@ module path. If it is, a path like C<.../lib/Pod/Man.pm> is converted into
- a name like C<Pod::Man>. This option, if given, overrides any automatic
- determination of the name.
-
-+If generating a manual page from standard input, this option is required,
-+since there's otherwise no way for Pod::Man to know what to use for the
-+manual page name.
-+
- =item nourls
-
- Normally, LZ<><> formatting codes with a URL but anchor text are formatted
-diff --git a/cpan/podlators/scripts/pod2man.PL b/cpan/podlators/scripts/pod2man.PL
-index 38695f8..43e35df 100644
---- a/cpan/podlators/scripts/pod2man.PL
-+++ b/cpan/podlators/scripts/pod2man.PL
-@@ -236,6 +236,10 @@ Note that this option is probably not useful when converting multiple POD
- files at once. The convention for Unix man pages for commands is for the
- man page title to be in all-uppercase even if the command isn't.
-
-+When converting POD source from standard input, this option is required,
-+since there's otherwise no way to know what to use as the name of the
-+manual page.
-+
- =item B<--nourls>
-
- Normally, LZ<><> formatting codes with a URL but anchor text are formatted
-diff --git a/cpan/podlators/t/devise-title.t b/cpan/podlators/t/devise-title.t
-new file mode 100755
-index 0000000..8639441
---- /dev/null
-+++ b/cpan/podlators/t/devise-title.t
-@@ -0,0 +1,32 @@
-+#!/usr/bin/perl
-+#
-+# Tests for the automatic determination of the manual page title if not
-+# specified via options to pod2man or the Pod::Man constructor.
-+
-+use 5.006;
-+use strict;
-+use warnings;
-+
-+use File::Spec;
-+use IO::File;
-+use Test::More tests => 3;
-+
-+BEGIN {
-+ use_ok('Pod::Man');
-+}
-+
-+# Create a parser and set it up with an input source. There isn't a way to do
-+# this in Pod::Simple without actually parsing the document, so send the
-+# output to a string that we'll ignore.
-+my $path = File::Spec->catdir('t', 'data', 'basic.pod');
-+my $handle = IO::File->new($path, 'r');
-+my $parser = Pod::Man->new(errors => 'pod');
-+my $output;
-+$parser->output_string(\$output);
-+$parser->parse_file($handle);
-+
-+# Check the results of devise_title for this. We should get back STDIN, and
-+# we should have reported an error.
-+my ($name, $section) = $parser->devise_title;
-+is($name, 'STDIN', 'devise_title uses STDIN for file handle input');
-+ok($parser->errors_seen, '...and errors were seen');
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff b/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff
deleted file mode 100644
index 0cdfeffd1f..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff
+++ /dev/null
@@ -1,86 +0,0 @@
-From 6198856b5323d6204094293f01b890472618f182 Mon Sep 17 00:00:00 2001
-From: Russ Allbery <rra@cpan.org>
-Date: Wed, 15 Apr 2015 20:49:07 -0700
-Subject: Documentation and test suite updates for UTC fix
-
-Update the Pod::Man and pod2man documentation and the test suite
-for the new UTC-based default page footer, and add a Changes
-entry.
-
-(backported to Perl 5.20.2 by Niko Tyni <ntyni@debian.org>)
-
-Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=52db93bf80e4a06f8497e4ebade0506b6ee0e70d
-Bug-Debian: https://bugs.debian.org/780259
-Patch-Name: fixes/podman-utc-docs.diff
----
- cpan/podlators/lib/Pod/Man.pm | 6 +++++-
- cpan/podlators/scripts/pod2man.PL | 11 ++++++-----
- cpan/podlators/t/devise-date.t | 2 +-
- 3 files changed, 12 insertions(+), 7 deletions(-)
-
-diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
-index c3ba201..365892e 100644
---- a/cpan/podlators/lib/Pod/Man.pm
-+++ b/cpan/podlators/lib/Pod/Man.pm
-@@ -910,6 +910,8 @@ sub devise_date {
-
- # Can't use POSIX::strftime(), which uses Fcntl, because MakeMaker uses
- # this and it has to work in the core which can't load dynamic libraries.
-+ # Use gmtime instead of localtime so that the generated man page does not
-+ # depend on the local time zone setting and is more reproducible
- my ($year, $month, $day) = (gmtime($time))[5,4,3];
- return sprintf("%04d-%02d-%02d", $year + 1900, $month + 1, $day);
- }
-@@ -1656,7 +1658,9 @@ environment variable POD_MAN_DATE, if set, will be used. Failing that,
- the modification date of the input file will be used, or the current time
- if stat() can't find that file (which will be the case if the input is
- from C<STDIN>). If obtained from the file modification date or the
--current time, he date will be formatted as C<YYYY-MM-DD>.
-+current time, the date will be formatted as C<YYYY-MM-DD> and will be based
-+on UTC (so that the output will be reproducible regardless of local time
-+zone).
-
- =item errors
-
-diff --git a/cpan/podlators/scripts/pod2man.PL b/cpan/podlators/scripts/pod2man.PL
-index 6af3474..38695f8 100644
---- a/cpan/podlators/scripts/pod2man.PL
-+++ b/cpan/podlators/scripts/pod2man.PL
-@@ -174,9 +174,10 @@ Contributed Perl Documentation", but also see B<--official> below.
-
- =item B<-d> I<string>, B<--date>=I<string>
-
--Set the left-hand footer string to this value. By default, the modification
--date of the input file will be used, or the current date if input comes from
--C<STDIN>.
-+Set the left-hand footer string to this value. By default, the
-+modification date of the input file will be used, or the current date if
-+input comes from C<STDIN>, and will be based on UTC (so that the output
-+will be reproducible regardless of local time zone).
-
- =item B<-errors>=I<style>
-
-@@ -383,8 +384,8 @@ B<pod2man> by Larry Wall and Tom Christiansen.
-
- =head1 COPYRIGHT AND LICENSE
-
--Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013 Russ
--Allbery <rra@stanford.edu>.
-+Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014,
-+2015 Russ Allbery <rra@cpan.org>.
-
- This program is free software; you may redistribute it and/or modify it
- under the same terms as Perl itself.
-diff --git a/cpan/podlators/t/devise-date.t b/cpan/podlators/t/devise-date.t
-index c610dd9..9da9d1b 100644
---- a/cpan/podlators/t/devise-date.t
-+++ b/cpan/podlators/t/devise-date.t
-@@ -19,7 +19,7 @@ use Test::More tests => 2;
- my $parser = Pod::Man->new;
- is(
- $parser->devise_date,
-- strftime('%Y-%m-%d', localtime()),
-+ strftime('%Y-%m-%d', gmtime()),
- 'devise_date matches strftime'
- );
-
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff b/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff
deleted file mode 100644
index fbd7b9db99..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff
+++ /dev/null
@@ -1,33 +0,0 @@
-From c796775cdbd2cce06acbb7ac355187d4063017a2 Mon Sep 17 00:00:00 2001
-From: Chris Lamb <lamby@debian.org>
-Date: Wed, 15 Apr 2015 20:42:53 -0700
-Subject: Make the embedded date from Pod::Man reproducible
-
-While working on the "reproducible builds" effort, we have noticed
-that Pod::Man generates output that varies depending on the current
-timezone.
-
-The attached patch fixes this by using GMT (~UTC) dates instead.
-
-(backported to Perl 5.20.2 by Niko Tyni <ntyni@debian.org>)
-
-Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=913fbb2bd2ce071e20128629302ae2852554cad4
-Bug-Debian: https://bugs.debian.org/780259
-Patch-Name: fixes/podman-utc.diff
----
- cpan/podlators/lib/Pod/Man.pm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
-index 0536662..c3ba201 100644
---- a/cpan/podlators/lib/Pod/Man.pm
-+++ b/cpan/podlators/lib/Pod/Man.pm
-@@ -910,7 +910,7 @@ sub devise_date {
-
- # Can't use POSIX::strftime(), which uses Fcntl, because MakeMaker uses
- # this and it has to work in the core which can't load dynamic libraries.
-- my ($year, $month, $day) = (localtime($time))[5,4,3];
-+ my ($year, $month, $day) = (gmtime($time))[5,4,3];
- return sprintf("%04d-%02d-%02d", $year + 1900, $month + 1, $day);
- }
-
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff b/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff
deleted file mode 100644
index d1b498b527..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff
+++ /dev/null
@@ -1,153 +0,0 @@
-From d9d535ef97f57af6e9728075944c33f3b0b5372f Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Respect umask during installation
-
-This is needed to satisfy Debian policy regarding group-writable
-site directories.
-
-Patch-Name: fixes/respect_umask.diff
----
- cpan/ExtUtils-Install/lib/ExtUtils/Install.pm | 18 +++++++++---------
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 18 +++++++++---------
- 2 files changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm b/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm
-index 1e8ac4c..3e79121 100644
---- a/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm
-+++ b/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm
-@@ -451,7 +451,7 @@ sub _can_write_dir {
-
- =pod
-
--=item _mkpath($dir,$show,$mode,$verbose,$dry_run)
-+=item _mkpath($dir,$show,$verbose,$dry_run)
-
- Wrapper around File::Path::mkpath() to handle errors.
-
-@@ -468,13 +468,13 @@ writable.
- =cut
-
- sub _mkpath {
-- my ($dir,$show,$mode,$verbose,$dry_run)=@_;
-+ my ($dir,$show,$verbose,$dry_run)=@_;
- if ( $verbose && $verbose > 1 && ! -d $dir) {
- $show= 1;
-- printf "mkpath(%s,%d,%#o)\n", $dir, $show, $mode;
-+ printf "mkpath(%s,%d)\n", $dir, $show;
- }
- if (!$dry_run) {
-- if ( ! eval { File::Path::mkpath($dir,$show,$mode); 1 } ) {
-+ if ( ! eval { File::Path::mkpath($dir,$show); 1 } ) {
- _choke("Can't create '$dir'","$@");
- }
-
-@@ -783,7 +783,7 @@ sub install { #XXX OS-SPECIFIC
- _chdir($cwd);
- }
- foreach my $targetdir (sort keys %check_dirs) {
-- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run );
-+ _mkpath( $targetdir, 0, $verbose, $dry_run );
- }
- foreach my $found (@found_files) {
- my ($diff, $ffd, $origfile, $mode, $size, $atime, $mtime,
-@@ -797,7 +797,7 @@ sub install { #XXX OS-SPECIFIC
- $targetfile= _unlink_or_rename( $targetfile, 'tryhard', 'install' )
- unless $dry_run;
- } elsif ( ! -d $targetdir ) {
-- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run );
-+ _mkpath( $targetdir, 0, $verbose, $dry_run );
- }
- print "Installing $targetfile\n";
-
-@@ -837,7 +837,7 @@ sub install { #XXX OS-SPECIFIC
-
- if ($pack{'write'}) {
- $dir = install_rooted_dir(dirname($pack{'write'}));
-- _mkpath( $dir, 0, 0755, $verbose, $dry_run );
-+ _mkpath( $dir, 0, $verbose, $dry_run );
- print "Writing $pack{'write'}\n" if $verbose;
- $packlist->write(install_rooted_file($pack{'write'})) unless $dry_run;
- }
-@@ -1180,7 +1180,7 @@ environment variable will silence this output.
- sub pm_to_blib {
- my($fromto,$autodir,$pm_filter) = @_;
-
-- _mkpath($autodir,0,0755);
-+ _mkpath($autodir,0);
- while(my($from, $to) = each %$fromto) {
- if( -f $to && -s $from == -s $to && -M $to < -M $from ) {
- print "Skip $to (unchanged)\n" unless $INSTALL_QUIET;
-@@ -1203,7 +1203,7 @@ sub pm_to_blib {
- # we wont try hard here. its too likely to mess things up.
- forceunlink($to);
- } else {
-- _mkpath(dirname($to),0,0755);
-+ _mkpath(dirname($to),0);
- }
- if ($need_filtering) {
- run_filter($pm_filter, $from, $to);
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index f63145c..197f102 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -2118,7 +2118,7 @@ doc__install : doc_site_install
- $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-
- pure_perl_install :: all
-- $(NOECHO) $(MOD_INSTALL) \
-+ $(NOECHO) umask 022; $(MOD_INSTALL) \
- };
-
- push @m,
-@@ -2138,7 +2138,7 @@ q{ "$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \
-
-
- pure_site_install :: all
-- $(NOECHO) $(MOD_INSTALL) \
-+ $(NOECHO) umask 022; $(MOD_INSTALL) \
- };
- push @m,
- q{ read "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \
-@@ -2156,7 +2156,7 @@ q{ "$(INST_LIB)" "$(DESTINSTALLSITELIB)" \
- "}.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{"
-
- pure_vendor_install :: all
-- $(NOECHO) $(MOD_INSTALL) \
-+ $(NOECHO) umask 022; $(MOD_INSTALL) \
- };
- push @m,
- q{ read "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \
-@@ -2188,8 +2188,8 @@ doc_vendor_install :: all
- push @m, q{
- doc_perl_install :: all
- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
-- -$(NOECHO) $(DOC_INSTALL) \
-+ -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)"
-+ -$(NOECHO) umask 022; $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" $(INSTALLPRIVLIB) \
- LINKTYPE "$(LINKTYPE)" \
-@@ -2199,8 +2199,8 @@ doc_perl_install :: all
-
- doc_site_install :: all
- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
-- -$(NOECHO) $(DOC_INSTALL) \
-+ -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)"
-+ -$(NOECHO) umask 022; $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" $(INSTALLSITELIB) \
- LINKTYPE "$(LINKTYPE)" \
-@@ -2210,8 +2210,8 @@ doc_site_install :: all
-
- doc_vendor_install :: all
- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
-- -$(NOECHO) $(DOC_INSTALL) \
-+ -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)"
-+ -$(NOECHO) umask 022; $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" $(INSTALLVENDORLIB) \
- LINKTYPE "$(LINKTYPE)" \
diff --git a/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff b/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff
deleted file mode 100644
index a62c746e94..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff
+++ /dev/null
@@ -1,27 +0,0 @@
-From 26209b55201a1b2d25252ac3b425bc49081299de Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Debian policy doesn't install .packlist files for core or vendor.
-
-Patch-Name: debian/instmodsh_doc.diff
----
- cpan/ExtUtils-MakeMaker/bin/instmodsh | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/bin/instmodsh b/cpan/ExtUtils-MakeMaker/bin/instmodsh
-index 8b9aa95..e551434 100644
---- a/cpan/ExtUtils-MakeMaker/bin/instmodsh
-+++ b/cpan/ExtUtils-MakeMaker/bin/instmodsh
-@@ -18,9 +18,11 @@ instmodsh - A shell to examine installed modules
-
- =head1 DESCRIPTION
-
--A little interface to ExtUtils::Installed to examine installed modules,
-+A little interface to ExtUtils::Installed to examine locally* installed modules,
- validate your packlists and even create a tarball from an installed module.
-
-+*On Debian system, B<core> and B<vendor> modules are managed by C<dpkg>.
-+
- =head1 SEE ALSO
-
- ExtUtils::Installed
diff --git a/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff b/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff
deleted file mode 100644
index d80f86c21a..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff
+++ /dev/null
@@ -1,24 +0,0 @@
-From 53ce69085918232a1b7e26e7762c1b2f70b1eb4a Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Fri, 18 Mar 2005 22:22:25 +1100
-Subject: Remove standard libs from LD_RUN_PATH as per Debian policy.
-
-Patch-Name: debian/ld_run_path.diff
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-index 37bcfd4..bd66e65 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-@@ -56,6 +56,9 @@ sub _unix_os2_ext {
- my ( $pwd ) = cwd(); # from Cwd.pm
- my ( $found ) = 0;
-
-+ # Debian-specific: don't use LD_RUN_PATH for standard dirs
-+ $ld_run_path_seen{$_}++ for @libpath;
-+
- foreach my $thislib ( split ' ', $potential_libs ) {
- my ( $custom_name ) = '';
-
diff --git a/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff b/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff
deleted file mode 100644
index 54ef9640ec..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff
+++ /dev/null
@@ -1,37 +0,0 @@
-From a7f6d453e60256d329469a75b642cca854cebea1 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Set location of libnet.cfg to /etc/perl/Net as /usr may not be
- writable.
-
-Patch-Name: debian/libnet_config_path.diff
----
- cpan/libnet/lib/Net/Config.pm | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/cpan/libnet/lib/Net/Config.pm b/cpan/libnet/lib/Net/Config.pm
-index 953a826..61ba12a 100644
---- a/cpan/libnet/lib/Net/Config.pm
-+++ b/cpan/libnet/lib/Net/Config.pm
-@@ -68,9 +68,8 @@ my %nc = (
- TRY_INTERNET_CONFIG
- }
-
--my $file = __FILE__;
-+my $file = '/etc/perl/Net/libnet.cfg';
- my $ref;
--$file =~ s/Config.pm/libnet.cfg/;
- if (-f $file) {
- $ref = eval { local $SIG{__DIE__}; do $file };
- if (ref($ref) eq 'HASH') {
-@@ -142,8 +141,8 @@ Net::Config - Local configuration data for libnet
- C<Net::Config> holds configuration data for the modules in the libnet
- distribution. During installation you will be asked for these values.
-
--The configuration data is held globally in a file in the perl installation
--tree, but a user may override any of these values by providing their own. This
-+The configuration data is held globally in C</etc/perl/Net/libnet.cfg>,
-+but a user may override any of these values by providing their own. This
- can be done by having a C<.libnetrc> file in their home directory. This file
- should return a reference to a HASH containing the keys described below.
- For example
diff --git a/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff b/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff
deleted file mode 100644
index 76b805451c..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-From fb8bdbb4bf56382de099e62c2564286b9dfda46d Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Note that libperl-dev package is required for embedded linking
-
-Bug-Debian: http://bugs.debian.org/186778
-
-Patch-Name: debian/libperl_embed_doc.diff
----
- lib/ExtUtils/Embed.pm | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm
-index 3f983c1..0ec8a67 100644
---- a/lib/ExtUtils/Embed.pm
-+++ b/lib/ExtUtils/Embed.pm
-@@ -296,6 +296,9 @@ and extensions in your C/C++ applications.
- Typically, an application F<Makefile> will invoke C<ExtUtils::Embed>
- functions while building your application.
-
-+Note that on Debian systems the B<libperl-dev> package is required for
-+compiling applications which embed an interpreter.
-+
- =head1 @EXPORT
-
- C<ExtUtils::Embed> exports the following functions:
diff --git a/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff b/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff
deleted file mode 100644
index fd471ed7a5..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff
+++ /dev/null
@@ -1,52 +0,0 @@
-From 289eaf87f8de4d9ebfd661d4e4299c2952435243 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Fri, 10 Apr 2015 10:19:51 +0300
-Subject: Make t/run/locale.t survive missing locales masked by LC_ALL
-
-If LC_ALL is set to a valid locale but another LC_* setting like LC_CTYPE
-isn't, t/run/locale.t would fail because it explicitly unsets LC_ALL,
-unmasking the problem underneath. All the other tests survive such
-a scenario.
-
-While this is clearly an error in the build environment, it's easy to make
-the test more robust by first clearing all the locale relevant variables.
-
-Bug: https://rt.perl.org/Ticket/Display.html?id=124310
-Bug-Debian: https://bugs.debian.org/782068
-Patch-Name: debian/locale-robustness.diff
----
- t/run/locale.t | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/t/run/locale.t b/t/run/locale.t
-index bd1a034..2105339 100644
---- a/t/run/locale.t
-+++ b/t/run/locale.t
-@@ -27,6 +27,9 @@ my @locales = eval { find_locales( [ &LC_ALL, &LC_CTYPE, &LC_NUMERIC ],
- ) };
- skip_all("no locales available") unless @locales;
-
-+# reset the locale environment
-+local @ENV{'LANG', (grep /^LC_/, keys %ENV)};
-+
- plan tests => &last;
-
- my $non_C_locale;
-@@ -58,9 +61,6 @@ EOF
- SKIP: {
- skip("Windows stores locale defaults in the registry", 1 )
- if $^O eq 'MSWin32';
-- local $ENV{LC_NUMERIC}; # So not taken as a default
-- local $ENV{LC_ALL}; # so it never overrides LC_NUMERIC
-- local $ENV{LANG}; # So not taken as a default
- fresh_perl_is("for (qw(@locales)) {\n" . <<'EOF',
- use POSIX qw(locale_h);
- use locale;
-@@ -348,7 +348,6 @@ EOF
-
- {
- local $ENV{LC_NUMERIC} = $different;
-- local $ENV{LC_ALL}; # so it never overrides LC_NUMERIC
- fresh_perl_is(<<"EOF",
- use POSIX qw(locale_h);
-
diff --git a/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff b/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff
deleted file mode 100644
index fa0f9daf96..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-From 593dd52f535b1f439dfd0afe52211ae8960e980a Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Sun, 24 Aug 2014 12:56:11 -0700
-Subject: Pass LD settings through to subdirectories
-
-[rt.cpan.org #28632] fixed most issues with passing LD down to
-subdirectory Makefile.PL files. However, there are some distributions
-(including Wx, Par::Packer, and Verilog-Perl) that explicitly set
-LD. Those still can't be overridden from the command line. Adding LD to
-the PASTHRU list fixes this.
-
-Bug-Debian: https://bugs.debian.org/758471
-Patch-Name: debian/makemaker-pasthru.diff
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index 4a8e14c..548d98e 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -2793,7 +2793,7 @@ sub pasthru {
- my($sep) = $Is{VMS} ? ',' : '';
- $sep .= "\\\n\t";
-
-- foreach my $key (qw(LIB LIBPERL_A LINKTYPE OPTIMIZE
-+ foreach my $key (qw(LIB LIBPERL_A LINKTYPE OPTIMIZE LD
- PREFIX INSTALL_BASE)
- )
- {
diff --git a/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff b/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff
deleted file mode 100644
index b1b4cb9a68..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff
+++ /dev/null
@@ -1,42 +0,0 @@
-From 634449066a9c810e81506425d2ca925b2fd72ab2 Mon Sep 17 00:00:00 2001
-From: Dominic Hargreaves <dom@earth.li>
-Date: Sat, 23 May 2015 21:15:06 +0200
-Subject: Update t/porting/customized.dat for files patched in Debian
-
-Patch-Name: debian/makemaker_customized.diff
----
- t/porting/customized.dat | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/t/porting/customized.dat b/t/porting/customized.dat
-index 7df398d..f857bd2 100644
---- a/t/porting/customized.dat
-+++ b/t/porting/customized.dat
-@@ -1,7 +1,7 @@
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm 7f4dfd0fe884bd42412bcf04ca80ef97b39c1d54
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm bef099988b15fb0b2a1f5ac48c01af1f7f36d329
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm 8168e18f0e3ce3ece4bb7e7c72d57ec07c67c402
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 7115e97a53559cb3ec061dd6f7f344e522724c4a
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm 3493ae6f93264e967f58dedaa3dbf3dbcb249853
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 3d7abd674b15ed323f743594ef0bd09db76b1aee
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm f8db8d4245bf0684b8210c811f50d7cfb1a27d78
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod 757bffb47857521311f8f3bde43ebe165f8d5191
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm 82be06851deb84c6419ad003ce9b6d1957f395f3
-@@ -13,7 +13,7 @@ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm 58872d66
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm ab80029ab16d38d4f2e41dc88d2ceb9f3790e477
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm 453e0abbc4bb38db4c0820ad5c4846f313b66291
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm c1b1babda8f43ae7a2caba1cb4f70f92af5a0e34
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm 6f90d94ad3e7aa0045a3b1a10a1bb18391f89f57
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm 21bde53290bf1a4da4457290b65bd1b0ca6f1d16
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm cab2b3ce08b71a4ce89aa630f236eb08b852439d
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm 61fced0faf518bf87c265fcb51ed330ba354623f
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm ae0ef51a7b6dd0b05aa61c779df7167dda5f5119
-@@ -22,7 +22,7 @@ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm 0544301f712
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm 433135eecb85b4b1d90d3027432f329436c78447
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm 1fbb5605bfb47feee4083feba8aa85e659628f70
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm 5b66d1f485a6034d96fc24ba1665b1bad9e447f1
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 8cef99a9bd370ecfd07ddb0efbdcbb4101255e45
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm c455c915fb7dc3eeb1200ed1cd19048e6f21e6b1
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm 939572fde3d59ba77c2e677fe2df2bed4bed5898
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm 09c2049bfd25b735e2a5bcf56a6cff7b4827f9c8
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm d65d63f8217a55c36f62e249814988974f593c79
diff --git a/meta/recipes-devtools/perl/perl/debian/mod_paths.diff b/meta/recipes-devtools/perl/perl/debian/mod_paths.diff
deleted file mode 100644
index ae15907609..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/mod_paths.diff
+++ /dev/null
@@ -1,99 +0,0 @@
-From 6c6cf14e204f3c031372bfd9604ad524d5691186 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Fri, 18 Mar 2005 22:22:25 +1100
-Subject: Tweak @INC ordering for Debian
-
-Our order is:
-
- etc (for config files)
- site (5.8.1)
- vendor (all)
- core (5.8.1)
- site (version-indep)
- site (pre-5.8.1)
-
-The rationale being that an admin (via site), or module packager
-(vendor) can chose to shadow core modules when there is a newer
-version than is included in core.
-
-Patch-Name: debian/mod_paths.diff
----
- perl.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 58 insertions(+)
-
-diff --git a/perl.c b/perl.c
-index 086645b..e64f1f4 100644
---- a/perl.c
-+++ b/perl.c
-@@ -4373,6 +4373,11 @@ S_init_perllib(pTHX)
- INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
- #endif
-
-+#ifdef DEBIAN
-+ /* for configuration where /usr is mounted ro (CPAN::Config, Net::Config) */
-+ S_incpush_use_sep(aTHX_ STR_WITH_LEN("/etc/perl"), 0x0);
-+#endif
-+
- #ifdef SITEARCH_EXP
- /* sitearch is always relative to sitelib on Windows for
- * DLL-based path intuition to work correctly */
-@@ -4490,6 +4495,59 @@ S_init_perllib(pTHX)
- INCPUSH_ADD_OLD_VERS|INCPUSH_CAN_RELOCATE);
- #endif
-
-+#ifdef DEBIAN
-+ /* Non-versioned site directory for local modules and for
-+ compatability with the previous packages' site dirs */
-+ S_incpush_use_sep(aTHX_ STR_WITH_LEN("/usr/local/lib/site_perl"),
-+ INCPUSH_ADD_SUB_DIRS);
-+
-+#ifdef PERL_INC_VERSION_LIST
-+ {
-+ struct stat s;
-+
-+ /* add small buffer in case old versions are longer than the
-+ current version */
-+ char sitearch[sizeof(SITEARCH_EXP)+16] = SITEARCH_EXP;
-+ char sitelib[sizeof(SITELIB_EXP)+16] = SITELIB_EXP;
-+ char const *vers[] = { PERL_INC_VERSION_LIST };
-+ char const **p;
-+
-+ char *arch_vers = strrchr(sitearch, '/');
-+ char *lib_vers = strrchr(sitelib, '/');
-+
-+ if (arch_vers && isdigit(*++arch_vers))
-+ *arch_vers = 0;
-+ else
-+ arch_vers = 0;
-+
-+ if (lib_vers && isdigit(*++lib_vers))
-+ *lib_vers = 0;
-+ else
-+ lib_vers = 0;
-+
-+ /* there is some duplication here as incpush does something
-+ similar internally, but required as sitearch is not a
-+ subdirectory of sitelib */
-+ for (p = vers; *p; p++)
-+ {
-+ if (arch_vers)
-+ {
-+ strcpy(arch_vers, *p);
-+ if (PerlLIO_stat(sitearch, &s) >= 0 && S_ISDIR(s.st_mode))
-+ S_incpush_use_sep(aTHX_ sitearch, strlen(sitearch), 0x0);
-+ }
-+
-+ if (lib_vers)
-+ {
-+ strcpy(lib_vers, *p);
-+ if (PerlLIO_stat(sitelib, &s) >= 0 && S_ISDIR(s.st_mode))
-+ S_incpush_use_sep(aTHX_ sitelib, strlen(sitelib), 0x0);
-+ }
-+ }
-+ }
-+#endif
-+#endif
-+
- #ifdef PERL_OTHERLIBDIRS
- S_incpush_use_sep(aTHX_ STR_WITH_LEN(PERL_OTHERLIBDIRS),
- INCPUSH_ADD_OLD_VERS|INCPUSH_ADD_ARCHONLY_SUB_DIRS
diff --git a/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff b/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff
deleted file mode 100644
index b911fd2762..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff
+++ /dev/null
@@ -1,92 +0,0 @@
-From 240f2f4aeb3850bc0c5370b9fbc3909573bed9b3 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Don't install .packlist or perllocal.pod for perl or vendor
-
-Patch-Name: debian/no_packlist_perllocal.diff
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 35 +++----------------------
- 1 file changed, 3 insertions(+), 32 deletions(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index 570a631..391dc22 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -2122,11 +2122,6 @@ pure_perl_install :: all
- };
-
- push @m,
--q{ read "}.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{" \
-- write "}.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{" \
--} unless $self->{NO_PACKLIST};
--
-- push @m,
- q{ "$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \
- "$(INST_ARCHLIB)" "$(DESTINSTALLARCHLIB)" \
- "$(INST_BIN)" "$(DESTINSTALLBIN)" \
-@@ -2158,10 +2153,6 @@ q{ "$(INST_LIB)" "$(DESTINSTALLSITELIB)" \
- pure_vendor_install :: all
- $(NOECHO) umask 022; $(MOD_INSTALL) \
- };
-- push @m,
--q{ read "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \
-- write "}.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{" \
--} unless $self->{NO_PACKLIST};
-
- push @m,
- q{ "$(INST_LIB)" "$(DESTINSTALLVENDORLIB)" \
-@@ -2187,37 +2178,19 @@ doc_vendor_install :: all
-
- push @m, q{
- doc_perl_install :: all
-- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)"
-- -$(NOECHO) umask 022; $(DOC_INSTALL) \
-- "Module" "$(NAME)" \
-- "installed into" $(INSTALLPRIVLIB) \
-- LINKTYPE "$(LINKTYPE)" \
-- VERSION "$(VERSION)" \
-- EXE_FILES "$(EXE_FILES)" \
-- >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
-
- doc_site_install :: all
-- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) umask 02; $(MKPATH) "$(DESTINSTALLARCHLIB)"
-+ $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLSITEARCH)/perllocal.pod"
-+ -$(NOECHO) umask 02; $(MKPATH) "$(DESTINSTALLSITEARCH)"
- -$(NOECHO) umask 02; $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" $(INSTALLSITELIB) \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
-- >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
-+ >> "}.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{"
-
- doc_vendor_install :: all
-- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)"
-- -$(NOECHO) umask 022; $(DOC_INSTALL) \
-- "Module" "$(NAME)" \
-- "installed into" $(INSTALLVENDORLIB) \
-- LINKTYPE "$(LINKTYPE)" \
-- VERSION "$(VERSION)" \
-- EXE_FILES "$(EXE_FILES)" \
-- >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
-
- } unless $self->{NO_PERLLOCAL};
-
-@@ -2226,13 +2199,11 @@ uninstall :: uninstall_from_$(INSTALLDIRS)dirs
- $(NOECHO) $(NOOP)
-
- uninstall_from_perldirs ::
-- $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{"
-
- uninstall_from_sitedirs ::
- $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{"
-
- uninstall_from_vendordirs ::
-- $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{"
- };
-
- join("",@m);
diff --git a/meta/recipes-devtools/perl/perl/debian/patchlevel.diff b/meta/recipes-devtools/perl/perl/debian/patchlevel.diff
deleted file mode 100644
index 8656b027e8..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/patchlevel.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-From b517c5e15d0871e36d0f1187661fe1dd28ddf820 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Sun, 15 May 2011 19:35:58 +0300
-Subject: List packaged patches in patchlevel.h
-
-Origin: vendor
-Bug-Debian: http://bugs.debian.org/567489
-
-The list of packaged patches is in patchlevel-debian.h, which is generated
-from the debian/patches/ directory when building the package.
-
-Patch-Name: debian/patchlevel.diff
----
- patchlevel.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/patchlevel.h b/patchlevel.h
-index a0ad78b..01367b7 100644
---- a/patchlevel.h
-+++ b/patchlevel.h
-@@ -137,6 +137,9 @@ static const char * const local_patches[] = {
- ,"uncommitted-changes"
- #endif
- PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */
-+#ifdef DEBIAN
-+#include "patchlevel-debian.h"
-+#endif
- ,NULL
- };
-
diff --git a/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch b/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch
deleted file mode 100644
index 533952cac7..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From c99c61e8f863a508a0793168011c98dc74abbd05 Mon Sep 17 00:00:00 2001
-From: Dominic Hargreaves <dom@earth.li>
-Date: Sat, 14 Apr 2012 11:34:05 +0100
-Subject: Invoke x-terminal-emulator rather than xterm in perl5db.pl
-
-In Debian systems, xterm might not exist or might not be the preferred
-terminal emulator. Use x-terminal-emulator instead
-
-Bug-Debian: http://bugs.debian.org/668490
-Forwarded: not-needed
-
-Patch-Name: debian/perl5db-x-terminal-emulator.patch
----
- lib/perl5db.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/perl5db.pl b/lib/perl5db.pl
-index 7e7194e..c466bf3 100644
---- a/lib/perl5db.pl
-+++ b/lib/perl5db.pl
-@@ -6960,7 +6960,7 @@ properly set up.
- sub xterm_get_fork_TTY {
- ( my $name = $0 ) =~ s,^.*[/\\],,s;
- open XT,
--qq[3>&1 xterm -title "Daughter Perl debugger $pids $name" -e sh -c 'tty 1>&3;\
-+qq[3>&1 x-terminal-emulator -T "Daughter Perl debugger $pids $name" -e sh -c 'tty 1>&3;\
- sleep 10000000' |];
-
- # Get the output from 'tty' and clean it up a little.
diff --git a/meta/recipes-devtools/perl/perl/debian/perlivp.diff b/meta/recipes-devtools/perl/perl/debian/perlivp.diff
deleted file mode 100644
index 2c1eab9709..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/perlivp.diff
+++ /dev/null
@@ -1,39 +0,0 @@
-From fbfbeb7a690d703a3cdc56f923e89eb7b7997d31 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Fri, 9 Jan 2009 18:54:47 +0200
-Subject: Make perlivp skip include directories in /usr/local
-
-Bug-Debian: http://bugs.debian.org/510895
-
-On Sat, Jan 10, 2009 at 12:37:18AM +1100, Brendan O'Dea wrote:
-> On Wed, Jan 7, 2009 at 12:21 AM, Niko Tyni <ntyni@debian.org> wrote:
-
-> > We could create the directories in a postinst script, but I'm not sure
-> > I see the point. They will be created automatically when installing
-> > CPAN modules.
->
-> The directories are intentionally not created, as this way they are
-> excluded from the search path at start-up, saving a bunch of wasted
-> stats at use/require time in the common case that the user has not
-> installed any local packages. As Niko points out, they will be
-> created as required.
-
-Signed-off-by: Niko Tyni <ntyni@debian.org>
-
-Patch-Name: debian/perlivp.diff
----
- utils/perlivp.PL | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/utils/perlivp.PL b/utils/perlivp.PL
-index c2f0a11..cc49f96 100644
---- a/utils/perlivp.PL
-+++ b/utils/perlivp.PL
-@@ -153,6 +153,7 @@ my $INC_total = 0;
- my $INC_there = 0;
- foreach (@INC) {
- next if $_ eq '.'; # skip -d test here
-+ next if m|/usr/local|; # not shipped on Debian
- if (-d $_) {
- print "## Perl \@INC directory '$_' exists.\n" if $opt{'v'};
- $INC_there++;
diff --git a/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff b/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff
deleted file mode 100644
index 6270b87318..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-From 27a4952c2e531947dc9f2f02e2063d117e2e699a Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Sat, 18 Apr 2015 17:39:32 +0300
-Subject: Update porting/customized.dat for pod2man modifications
-
-Patch-Name: debian/pod2man-customized.diff
----
- t/porting/customized.dat | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/t/porting/customized.dat b/t/porting/customized.dat
-index 0eed9f7..7df398d 100644
---- a/t/porting/customized.dat
-+++ b/t/porting/customized.dat
-@@ -42,7 +42,7 @@ Win32API::File cpan/Win32API-File/Makefile.PL 605d0aee31aebe84a99408f9ab5f644db5
- Win32API::File cpan/Win32API-File/t/file.t 124e64aa77e755235eb297644a87fac5388d3d78
- Win32API::File cpan/Win32API-File/t/tie.t 712ea7edd0cc805ce1c0b8172c01b03dd19b583d
- Win32API::File cpan/Win32API-File/typemap 24bff088babeadac0873e8df390d1666d9d9db4a
--podlators cpan/podlators/scripts/pod2man.PL f81acf53f3ff46cdcc5ebdd661c5d13eb35d20d6
-+podlators cpan/podlators/scripts/pod2man.PL 761f35d3fcf91c1bc2f9e024a9fa5c62fd3fc338
- podlators cpan/podlators/scripts/pod2text.PL b4693fcfe4a0a1b38a215cfb8985a65d5d025d69
- version cpan/version/lib/version.pm d0923b895d57f1d669ae36fcf85c87b16db341d1
- version vutil.c 668f17ca43e2527645674d29ba772b86330d5663
diff --git a/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff b/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff
deleted file mode 100644
index c41efbe3e8..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff
+++ /dev/null
@@ -1,118 +0,0 @@
-From 914948f026efce02cf0abff8b0312aaad96592ed Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Fiddle with *PREFIX and variables written to the makefile
-
-Fiddle with *PREFIX and variables written to the makefile so that
-install directories may be changed when make is run by passing
-PREFIX= to the "make install" command (used when packaging
-modules).
-
-Patch-Name: debian/prefix_changes.diff
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 12 ++++++------
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 3 +--
- cpan/ExtUtils-MakeMaker/t/INST.t | 4 +---
- cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t | 10 +++++-----
- 4 files changed, 13 insertions(+), 16 deletions(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
-index 4c00129..1ea2035 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
-@@ -902,8 +902,6 @@ all POD files in MAN1PODS and MAN3PODS.
- sub manifypods_target {
- my($self) = shift;
-
-- my $man1pods = '';
-- my $man3pods = '';
- my $dependencies = '';
-
- # populate manXpods & dependencies:
-@@ -919,7 +917,7 @@ END
- foreach my $section (qw(1 3)) {
- my $pods = $self->{"MAN${section}PODS"};
- my $p2m = sprintf <<CMD, $] > 5.008 ? " -u" : "";
-- \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW)%s
-+ \$(NOECHO) \$(POD2MAN) --section=\$(MAN${section}EXT) --perm_rw=\$(PERM_RW)%s
- CMD
- push @man_cmds, $self->split_command($p2m, map {($_,$pods->{$_})} sort keys %$pods);
- }
-@@ -1875,9 +1873,11 @@ sub init_INSTALL_from_PREFIX {
- $self->{SITEPREFIX} ||= $sprefix;
- $self->{VENDORPREFIX} ||= $vprefix;
-
-- # Lots of MM extension authors like to use $(PREFIX) so we
-- # put something sensible in there no matter what.
-- $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
-+ my $p = $self->{PREFIX} = $self->{PERLPREFIX};
-+ for my $t (qw/PERL SITE VENDOR/)
-+ {
-+ $self->{"${t}PREFIX"} =~ s!^\Q$p\E(?=/|$)!\$(PREFIX)!;
-+ }
- }
-
- my $arch = $Config{archname};
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index 391dc22..4a8e14c 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -3077,8 +3077,7 @@ sub prefixify {
- warn " prefixify $var => $path\n" if $Verbose >= 2;
- warn " from $sprefix to $rprefix\n" if $Verbose >= 2;
-
-- if( $self->{ARGS}{PREFIX} &&
-- $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
-+ if( $path !~ s{^\Q$sprefix\E\b}{$rprefix}s && $self->{ARGS}{PREFIX} )
- {
-
- warn " cannot prefix, using default.\n" if $Verbose >= 2;
-diff --git a/cpan/ExtUtils-MakeMaker/t/INST.t b/cpan/ExtUtils-MakeMaker/t/INST.t
-index 91058bb..e399ced 100644
---- a/cpan/ExtUtils-MakeMaker/t/INST.t
-+++ b/cpan/ExtUtils-MakeMaker/t/INST.t
-@@ -65,9 +65,7 @@ isa_ok( $mm, 'ExtUtils::MakeMaker' );
- is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
- is( $mm->{VERSION}, 0.01, 'VERSION' );
-
--my $config_prefix = $Config{installprefixexp} || $Config{installprefix} ||
-- $Config{prefixexp} || $Config{prefix};
--is( $mm->{PERLPREFIX}, $config_prefix, 'PERLPREFIX' );
-+is( $mm->{PERLPREFIX}, '$(PREFIX)', 'PERLPREFIX' );
-
- is( !!$mm->{PERL_CORE}, !!$ENV{PERL_CORE}, 'PERL_CORE' );
-
-diff --git a/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t b/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t
-index e8de7c6..3fb3f12 100644
---- a/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t
-+++ b/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t
-@@ -10,7 +10,7 @@ BEGIN {
- }
-
- use strict;
--use Test::More tests => 52;
-+use Test::More tests => 47;
- use MakeMaker::Test::Utils;
- use MakeMaker::Test::Setup::BFD;
- use ExtUtils::MakeMaker;
-@@ -62,16 +62,16 @@ like( $stdout->read, qr{
- (?:Writing\ MYMETA.yml\ and\ MYMETA.json\n)?
- }x );
-
--is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
-+#is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
-
- isa_ok( $mm, 'ExtUtils::MakeMaker' );
-
- is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
- is( $mm->{VERSION}, 0.01, 'VERSION' );
-
--foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
-- unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
--}
-+#foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
-+# unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
-+#}
-
-
- my $PREFIX = File::Spec->catdir('foo', 'bar');
diff --git a/meta/recipes-devtools/perl/perl/debian/prune_libs.diff b/meta/recipes-devtools/perl/perl/debian/prune_libs.diff
deleted file mode 100644
index b4443f6476..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/prune_libs.diff
+++ /dev/null
@@ -1,38 +0,0 @@
-From 21bc033755f0b609f9bb2aa9e98b10d58424406f Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Fri, 18 Mar 2005 22:22:25 +1100
-Subject: Prune the list of libraries wanted to what we actually need.
-
-Bug-Debian: http://bugs.debian.org/128355
-
-We want to keep the dependencies on perl-base as small as possible,
-and some of the original list may be present on buildds (see Bug#128355).
-
-Patch-Name: debian/prune_libs.diff
----
- Configure | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/Configure b/Configure
-index 0a405d3..6fcc3bc 100755
---- a/Configure
-+++ b/Configure
-@@ -1454,8 +1454,7 @@ libswanted_uselargefiles=''
- : set usesocks on the Configure command line to enable socks.
- : List of libraries we want.
- : If anyone needs extra -lxxx, put those in a hint file.
--libswanted="cl pthread socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld"
--libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
-+libswanted='gdbm gdbm_compat db dl m c crypt'
- : We probably want to search /usr/shlib before most other libraries.
- : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
- glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
-@@ -23593,7 +23592,7 @@ sunos*X4*)
- ;;
- *) case "$usedl" in
- $define|true|[yY]*)
-- set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
-+ set X `echo " $libs " | sed -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldb @ @'`
- shift
- perllibs="$*"
- ;;
diff --git a/meta/recipes-devtools/perl/perl/debian/regen-skip.diff b/meta/recipes-devtools/perl/perl/debian/regen-skip.diff
deleted file mode 100644
index 8a3fc9912c..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/regen-skip.diff
+++ /dev/null
@@ -1,27 +0,0 @@
-From cb3e98e17a666896150b109694e9eb9278620845 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Sat, 17 May 2014 14:57:01 +0300
-Subject: Skip a regeneration check in unrelated git repositories
-
-If the test is run in a git repository without lib/.gitignore,
-for instance because the repository only imported the Perl tarball,
-the regeneration check is broken because lib/.gitignore is missing.
-
-Patch-Name: debian/regen-skip.diff
----
- regen/lib_cleanup.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/regen/lib_cleanup.pl b/regen/lib_cleanup.pl
-index c9d6e43..fece1ed 100644
---- a/regen/lib_cleanup.pl
-+++ b/regen/lib_cleanup.pl
-@@ -159,7 +159,7 @@ foreach ('win32/Makefile', 'win32/makefile.mk') {
- }
-
- # This must come last as it can exit early:
--if ($TAP && !-d '.git' && !-f 'lib/.gitignore') {
-+if ($TAP && !-d '.git' || !-f 'lib/.gitignore') {
- print "ok # skip not being run from a git checkout, hence no lib/.gitignore\n";
- exit 0;
- }
diff --git a/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff b/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff
deleted file mode 100644
index ecfc0bc62f..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-From 42853af65a28066b119d23d96e964e94b55a8541 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Fri, 5 Aug 2011 10:50:18 +0300
-Subject: Skip a crashing test case in t/op/threads.t on GNU/kFreeBSD
-
-Bug: http://rt.perl.org/rt3/Ticket/Display.html?id=96272
-Bug-Debian: http://bugs.debian.org/628493
-
-The crash is not a regression in 5.14, it just gets triggered there by
-a new unrelated test case.
-
-Skip the test until the culprit is found.
-
-Patch-Name: debian/skip-kfreebsd-crash.diff
----
- t/op/threads.t | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/t/op/threads.t b/t/op/threads.t
-index e76c956..bec210b 100644
---- a/t/op/threads.t
-+++ b/t/op/threads.t
-@@ -376,6 +376,9 @@ EOF
- }
-
-
-+SKIP: {
-+ skip "[perl #96272] avoid crash on GNU/kFreeBSD", 1
-+ if $^O eq 'gnukfreebsd';
- # [perl #78494] Pipes shared between threads block when closed
- {
- my $perl = which_perl;
-@@ -384,6 +387,7 @@ EOF
- threads->create(sub { })->join;
- ok(1, "Pipes shared between threads do not block when closed");
- }
-+}
-
- # [perl #105208] Typeglob clones should not be cloned again during a join
- {
diff --git a/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff b/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff
deleted file mode 100644
index 4c87104cce..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff
+++ /dev/null
@@ -1,28 +0,0 @@
-From ae9b645d6da2990fd055368eca2c67c449474e38 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Fri, 22 Apr 2011 11:15:32 +0300
-Subject: Skip tests specific to the upstream Git repository
-
-These tests fail if run from a different git repository than
-upstream. This complicates things needlessly for downstream packagers.
-
-Skip the tests altogether even if the .git directory exists.
-
-Patch-Name: debian/skip-upstream-git-tests.diff
----
- t/test.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/t/test.pl b/t/test.pl
-index cda3840..af579a2 100644
---- a/t/test.pl
-+++ b/t/test.pl
-@@ -174,7 +174,7 @@ sub skip_all_without_unicode_tables { # (but only under miniperl)
-
- sub find_git_or_skip {
- my ($source_dir, $reason);
-- if (-d '.git') {
-+ if (-d '.git' && ! -d 'debian') {
- $source_dir = '.';
- } elsif (-l 'MANIFEST' && -l 'AUTHORS') {
- my $where = readlink 'MANIFEST';
diff --git a/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff b/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff
deleted file mode 100644
index cb31457761..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff
+++ /dev/null
@@ -1,56 +0,0 @@
-From 487a6d6ada0b08e6a7276520ebc61cd851005e7c Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Sun, 3 Oct 2010 21:36:17 +0300
-Subject: Squelch locale warnings in Debian package maintainer scripts
-
-Bug-Debian: http://bugs.debian.org/508764
-
-The system locales are rather frequently out of sync with the C library
-during package upgrades, causing a huge amount of useless Perl locale
-warnings. Squelch them when running package maintainer scripts, detected
-by the DPKG_RUNNING_VERSION environment variable.
-
-Any real locale problem will show up after the system upgrade too, and
-the warning will be triggered normally again at that point.
-
-Patch-Name: debian/squelch-locale-warnings.diff
----
- locale.c | 5 ++++-
- pod/perllocale.pod | 8 ++++++++
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/locale.c b/locale.c
-index 7a4a418..fdf911d 100644
---- a/locale.c
-+++ b/locale.c
-@@ -674,7 +674,10 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
-
- const bool locwarn = (printwarn > 1
- || (printwarn
-- && (! bad_lang_use_once
-+ &&
-+ /* Debian specific change - see http://bugs.debian.org/508764 */
-+ (!PerlEnv_getenv("DPKG_RUNNING_VERSION")) &&
-+ (! bad_lang_use_once
- || (
- /* disallow with "" or "0" */
- *bad_lang_use_once
-diff --git a/pod/perllocale.pod b/pod/perllocale.pod
-index 701b422..58cabaf 100644
---- a/pod/perllocale.pod
-+++ b/pod/perllocale.pod
-@@ -1217,6 +1217,14 @@ B<NOTE>: C<PERL_BADLANG> only gives you a way to hide the warning message.
- The message tells about some problem in your system's locale support,
- and you should investigate what the problem is.
-
-+=item DPKG_RUNNING_VERSION
-+
-+On Debian systems, if the DPKG_RUNNING_VERSION environment variable is
-+set (to any value), the locale failure warnings will be suppressed just
-+like with a zero PERL_BADLANG setting. This is done to avoid floods
-+of spurious warnings during system upgrades.
-+See L<http://bugs.debian.org/508764>.
-+
- =back
-
- The following environment variables are not specific to Perl: They are
diff --git a/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff b/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff
deleted file mode 100644
index 53adc2f4db..0000000000
--- a/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff
+++ /dev/null
@@ -1,36 +0,0 @@
-From 591c1f9b7d4755bfc59d9665bab1f2ca410de765 Mon Sep 17 00:00:00 2001
-From: Brendan O'Dea <bod@debian.org>
-Date: Tue, 8 Mar 2005 19:30:38 +1100
-Subject: Set umask approproately for site install directories
-
-Policy requires group writable site directories
-
-Patch-Name: debian/writable_site_dirs.diff
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index 197f102..5f1b87f 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -2138,7 +2138,7 @@ q{ "$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \
-
-
- pure_site_install :: all
-- $(NOECHO) umask 022; $(MOD_INSTALL) \
-+ $(NOECHO) umask 02; $(MOD_INSTALL) \
- };
- push @m,
- q{ read "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \
-@@ -2199,8 +2199,8 @@ doc_perl_install :: all
-
- doc_site_install :: all
- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)"
-- -$(NOECHO) umask 022; $(DOC_INSTALL) \
-+ -$(NOECHO) umask 02; $(MKPATH) "$(DESTINSTALLARCHLIB)"
-+ -$(NOECHO) umask 02; $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" $(INSTALLSITELIB) \
- LINKTYPE "$(LINKTYPE)" \
diff --git a/meta/recipes-devtools/perl/perl/dynaloaderhack.patch b/meta/recipes-devtools/perl/perl/dynaloaderhack.patch
deleted file mode 100644
index 3df593346c..0000000000
--- a/meta/recipes-devtools/perl/perl/dynaloaderhack.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Hack the dynamic module loader so that we use native modules since we can't load
-the target ones.
-
-Upstream-Status: Inappropriate
-
-RP
-2013/01/13
-
-Index: perl-5.14.2/ext/DynaLoader/DynaLoader_pm.PL
-===================================================================
---- perl-5.14.2.orig/ext/DynaLoader/DynaLoader_pm.PL 2011-09-19 13:18:22.000000000 +0000
-+++ perl-5.14.2/ext/DynaLoader/DynaLoader_pm.PL 2013-01-19 16:09:51.020584945 +0000
-@@ -310,6 +310,10 @@
- foreach (@INC) {
- <<$^O-eq-VMS>>chop($_ = VMS::Filespec::unixpath($_));<</$^O-eq-VMS>>
- my $dir = "$_/auto/$modpname";
-+
-+ if (defined $ENV{PERL_LIB} and defined $ENV{PERLHOSTLIB}) {
-+ $dir =~ s/$ENV{PERL_LIB}/$ENV{PERLHOSTLIB}/g;
-+ }
-
- next unless -d $dir; # skip over uninteresting directories
-
diff --git a/meta/recipes-devtools/perl/perl/ext-ODBM_File-hints-linux.pl-link-libgdbm_compat.patch b/meta/recipes-devtools/perl/perl/ext-ODBM_File-hints-linux.pl-link-libgdbm_compat.patch
deleted file mode 100644
index 994ef7013c..0000000000
--- a/meta/recipes-devtools/perl/perl/ext-ODBM_File-hints-linux.pl-link-libgdbm_compat.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From ba4ed0b5b7baad5353c1e65b655f41d45e01c990 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 22 Jun 2015 20:00:11 -0700
-Subject: [PATCH] ext/ODBM_File/hints/linux.pl: link libgdbm_compat
-
-Fixed for test case ../ext/ODBM_File/t/odbm.t:
-ok 1 - use ODBM_File;
-ok 2 - use Fcntl;
-./perl: symbol lookup error: /usr/lib/perl/5.22.0/auto/ODBM_File/ODBM_File.so: undefined symbol: dbminit
-
-The checking "if -e $_.'/libgdbm_compat.so'" doesn't work when cross
-build, so always link libgdbm_compat, since perl depends on gdbm and we
-always have libgdbm_compat.
-
-Upstream-Status:Inappropriate [embedded specific]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- ext/ODBM_File/hints/linux.pl | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/ext/ODBM_File/hints/linux.pl b/ext/ODBM_File/hints/linux.pl
-index 204bba0..9271b45 100644
---- a/ext/ODBM_File/hints/linux.pl
-+++ b/ext/ODBM_File/hints/linux.pl
-@@ -1,8 +1,2 @@
- # uses GDBM dbm compatibility feature - at least on SuSE 8.0
--$self->{LIBS} = ['-lgdbm'];
--
--# Debian/Ubuntu have libgdbm_compat.so but not this file,
--# so linking may fail
--foreach (split / /, $Config{libpth}) {
-- $self->{LIBS}->[0] .= ' -lgdbm_compat' if -e $_.'/libgdbm_compat.so';
--}
-+$self->{LIBS} = ['-lgdbm -lgdbm_compat'];
diff --git a/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch b/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch
deleted file mode 100644
index 6b05b877fb..0000000000
--- a/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b842e1de7798a1f7df770bb3f185ad3356e490e6 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 22 Jun 2015 20:06:56 -0700
-Subject: [PATCH] ext/ODBM_File/t/odbm.t: fix the path of dbmt_common.pl
-
-It should be lib/dbmt_common.pl when run by run-ptest.
-
-Fixed:
-Can't locate ../../t/lib/dbmt_common.pl in @INC
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- ext/ODBM_File/t/odbm.t | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ext/ODBM_File/t/odbm.t b/ext/ODBM_File/t/odbm.t
-index 079b9f1..250b991 100644
---- a/ext/ODBM_File/t/odbm.t
-+++ b/ext/ODBM_File/t/odbm.t
-@@ -2,7 +2,7 @@
-
- our $DBM_Class = 'ODBM_File';
-
--require '../../t/lib/dbmt_common.pl';
-+require 'lib/dbmt_common.pl';
-
- if ($^O eq 'hpux') {
- print <<EOM;
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch b/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
deleted file mode 100644
index 76501283ed..0000000000
--- a/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/07/01
-
-Fix these Package QA warnings before they are converted into fetal errors:
-
-WARNING: QA Issue: package perl-module-compress contains bad RPATH /build_disk/poky_build/build0/tmp/sysroots/qemux86/usr/lib in file /build_disk/poky_build/build0/tmp/work/i586-poky-linux/perl-5.12.3-r1/packages-split/perl-module-compress/usr/lib/perl/5.12.3/auto/Compress/Raw/Zlib/Zlib.so
-
-This fixes this warning for perl recipe as well as libxml-parser-perl recipe.
-It is a fix to MakeMaker within perl, so all such perl recipes will get
-fixed with this perl fix.
-
-Index: perl-5.14.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-===================================================================
---- perl-5.14.2.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-+++ perl-5.14.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-@@ -55,6 +55,7 @@ sub _unix_os2_ext {
- my($found) = 0;
-
- # Debian-specific: don't use LD_RUN_PATH for standard dirs
-+ push(@libpath, "SYSROOTLIB");
- $ld_run_path_seen{$_}++ for @libpath;
-
- foreach my $thislib (split ' ', $potential_libs) {
diff --git a/meta/recipes-devtools/perl/perl/generate-sh.patch b/meta/recipes-devtools/perl/perl/generate-sh.patch
deleted file mode 100644
index 27f6e691c0..0000000000
--- a/meta/recipes-devtools/perl/perl/generate-sh.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Use the ld flags from the supplied configuration file. For sh we need the
-flags that specify to build PIC code so that the shared libraries work.
-
-Index: perl-5.14.2/Cross/generate_config_sh
-===================================================================
---- perl-5.14.2.orig/Cross/generate_config_sh 2010-12-30 04:07:14.000000000 +0200
-+++ perl-5.14.2/Cross/generate_config_sh 2012-11-22 15:58:49.852852805 +0200
-@@ -19,10 +19,10 @@
- $callbacks->{'ar'} = [\&simple_process, ["AR", "arm-linux-ar"]];
- $callbacks->{'archname'} = [\&simple_process, ["SYS", "armv4l-linux"]];
- $callbacks->{'cc'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
--$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
--$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
--$callbacks->{'ccflags'} = [\&simple_process, ["CFLAGS", "-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
--$callbacks->{'ccflags_uselargefiles'} = [\&simple_process, ["CFLAGS", "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
-+#$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
-+#$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
-+$callbacks->{'ccflags'} = [\&simple_process_insert, ["CFLAGS", "-fno-strict-aliasing -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
-+$callbacks->{'ccflags_uselargefiles'} = [\&simple_process_insert, ["CFLAGS", "-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
- $callbacks->{'ccname'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
- $callbacks->{'cpp'} = [\&simple_process, ["CCP", "arm-linux-cpp"]];
- $callbacks->{'cppflags'} = [\&simple_process, ["CCPFLAGS", "-fno-strict-aliasing"]];
-@@ -30,6 +30,7 @@
- $callbacks->{'cppstdin'} = [\&simple_process_append, ["CC", "arm-linux-gcc -E", "-E"]];
- $callbacks->{'full_ar'} = [\&backtick, ["AR", "which $ENV{AR}", "/usr/local/arm/2.95.3/bin/arm-linux-ar"]];
- $callbacks->{'ld'} = [\&simple_process, ["LD", "arm-linux-ld"]];
-+$callbacks->{'lddlflags'} = [\&simple_process, ["LDDLFLAGS", ""]];
- $callbacks->{'ldflags'} = [\&simple_process, ["LDFLAGS", ""]];
- $callbacks->{'ldflags_uselargefiles'} = [\&simple_process, ["LDFLAGS", ""]];
- $callbacks->{'myarchname'} = [\&simple_process, ["SYS", "armv4l-linux"]];
-@@ -105,6 +106,23 @@
-
- }
-
-+# Insert env var into the variables value
-+sub simple_process_insert {
-+ my $key = shift;
-+ my $value = shift;
-+ my $envvar = $callbacks->{$key}->[1][0];
-+
-+ if ($ENV{$envvar}) {
-+ # Strip quotes from value
-+ $value =~ s/^\'//;
-+ $value =~ s/\'$//;
-+ # Remove -I/usr/local/... from the value
-+ $value =~ s#\W-I/usr/local/\w+\W# #g;
-+ # Prepend env var (OE setting) to value
-+ print("$key=\'$ENV{$envvar} $value\'\n");
-+ }
-+}
-+
- sub library_munge {
- my $key = shift;
- my $value = shift;
diff --git a/meta/recipes-devtools/perl/perl/installperl.patch b/meta/recipes-devtools/perl/perl/installperl.patch
deleted file mode 100644
index 456012376e..0000000000
--- a/meta/recipes-devtools/perl/perl/installperl.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Index: perl-5.12.3/installperl
-===================================================================
---- perl-5.12.3.orig/installperl
-+++ perl-5.12.3/installperl
-@@ -3,8 +3,8 @@
- BEGIN {
- require 5.004;
- chdir '..' if !-d 'lib' and -d '../lib';
-- @INC = 'lib';
-- $ENV{PERL5LIB} = 'lib';
-+# @INC = 'lib';
-+# $ENV{PERL5LIB} = 'lib';
-
- # This needs to be at BEGIN time, before any use of Config
- require './install_lib.pl';
diff --git a/meta/recipes-devtools/perl/perl/letgcc-find-errno.patch b/meta/recipes-devtools/perl/perl/letgcc-find-errno.patch
deleted file mode 100644
index 5161e4c8b6..0000000000
--- a/meta/recipes-devtools/perl/perl/letgcc-find-errno.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-This removes all the logic that perl uses to locate an appropriate
-errno.h for the target. Instead we simple create a file that does
-
- #include "errno.h"
-
-and use that as the file to parse. This is needed when using an
-external toolchain since perl will search in ${STAGING_INCDIR} for
-errno.h (when using gcc) and that isn't where it's located - its
-wherever the external toolchain keeps it's headers.
-
-Index: perl-5.12.3/ext/Errno/Errno_pm.PL
-===================================================================
---- perl-5.12.3.orig/ext/Errno/Errno_pm.PL
-+++ perl-5.12.3/ext/Errno/Errno_pm.PL
-@@ -17,8 +17,18 @@ unlink "Errno.tmp" if -f "Errno.tmp";
- open OUT, ">Errno.tmp" or die "Cannot open Errno.tmp: $!";
- select OUT;
- my $file;
--my @files = get_files();
--if ($Config{gccversion} ne '' && $^O eq 'MSWin32') {
-+#my @files = get_files();
-+my @files = ("errno.h");
-+
-+if (1) {
-+ open INCS, '>includes.c' or
-+ die "Cannot open includes.c";
-+ print INCS qq[#include "errno.h"\n];
-+ close INCS;
-+ process_file('includes.c');
-+ unlink 'includes.c';
-+}
-+elsif ($Config{gccversion} ne '' && $^O eq 'MSWin32') {
- # MinGW complains "warning: #pragma system_header ignored outside include
- # file" if the header files are processed individually, so include them
- # all in .c file and process that instead.
-@@ -53,7 +63,7 @@ sub process_file {
- chomp($file = `cygpath -w "$file"`);
- }
-
-- return unless defined $file and -f $file;
-+# return unless defined $file and -f $file;
- # warn "Processing $file\n";
-
- local *FH;
diff --git a/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch b/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
deleted file mode 100644
index de6f65294c..0000000000
--- a/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-make_ext.pl: fix regenerate makefile failed while $cc changed
-
-While $cc changed, the existance of 'xdefine' caused makefile
-regeneration failed.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- make_ext.pl | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/make_ext.pl b/make_ext.pl
-index b433762..9fc1a36 100644
---- a/make_ext.pl
-+++ b/make_ext.pl
-@@ -335,6 +335,10 @@ sub build_extension {
- print "Deleting non-Cross makefile\n";
- close $mfh or die "close $makefile: $!";
- _unlink($makefile);
-+ if(-e 'xdefine') {
-+ print "Deleting xdefine for regenerate makefile\n";
-+ _unlink('xdefine');
-+ }
- }
- }
- }
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/perl/perl/native-nopacklist.patch b/meta/recipes-devtools/perl/perl/native-nopacklist.patch
deleted file mode 100644
index 5482dcb79c..0000000000
--- a/meta/recipes-devtools/perl/perl/native-nopacklist.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Upstream-Status:Inappropriate [debian patch]
-
-Part of 52_debian_extutils_hacks.patch just to exclude the installation of .packlist files
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 35 ++---------------------
- 1 file changed, 3 insertions(+), 32 deletions(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index f63145c..a589710 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -2122,11 +2122,6 @@ pure_perl_install :: all
- };
-
- push @m,
--q{ read "}.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{" \
-- write "}.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{" \
--} unless $self->{NO_PACKLIST};
--
-- push @m,
- q{ "$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \
- "$(INST_ARCHLIB)" "$(DESTINSTALLARCHLIB)" \
- "$(INST_BIN)" "$(DESTINSTALLBIN)" \
-@@ -2158,10 +2153,6 @@ q{ "$(INST_LIB)" "$(DESTINSTALLSITELIB)" \
- pure_vendor_install :: all
- $(NOECHO) $(MOD_INSTALL) \
- };
-- push @m,
--q{ read "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \
-- write "}.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{" \
--} unless $self->{NO_PACKLIST};
-
- push @m,
- q{ "$(INST_LIB)" "$(DESTINSTALLVENDORLIB)" \
-@@ -2187,37 +2178,19 @@ doc_vendor_install :: all
-
- push @m, q{
- doc_perl_install :: all
-- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
-- -$(NOECHO) $(DOC_INSTALL) \
-- "Module" "$(NAME)" \
-- "installed into" $(INSTALLPRIVLIB) \
-- LINKTYPE "$(LINKTYPE)" \
-- VERSION "$(VERSION)" \
-- EXE_FILES "$(EXE_FILES)" \
-- >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
-
- doc_site_install :: all
-- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
-+ $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLSITEARCH)/perllocal.pod"
-+ -$(NOECHO) $(MKPATH) "$(DESTINSTALLSITEARCH)"
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" $(INSTALLSITELIB) \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
-- >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
-+ >> "}.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{"
-
- doc_vendor_install :: all
-- $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
-- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
-- -$(NOECHO) $(DOC_INSTALL) \
-- "Module" "$(NAME)" \
-- "installed into" $(INSTALLVENDORLIB) \
-- LINKTYPE "$(LINKTYPE)" \
-- VERSION "$(VERSION)" \
-- EXE_FILES "$(EXE_FILES)" \
-- >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
-
- } unless $self->{NO_PERLLOCAL};
-
-@@ -2226,13 +2199,11 @@ uninstall :: uninstall_from_$(INSTALLDIRS)dirs
- $(NOECHO) $(NOOP)
-
- uninstall_from_perldirs ::
-- $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{"
-
- uninstall_from_sitedirs ::
- $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{"
-
- uninstall_from_vendordirs ::
-- $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{"
- };
-
- join("",@m);
diff --git a/meta/recipes-devtools/perl/perl/perl-PathTools-don-t-filter-out-blib-from-INC.patch b/meta/recipes-devtools/perl/perl/perl-PathTools-don-t-filter-out-blib-from-INC.patch
deleted file mode 100644
index 7dd904140a..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-PathTools-don-t-filter-out-blib-from-INC.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 90c252cecc38aed5d5faedb30485dd6eee2e54eb Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Wed, 11 Feb 2015 15:14:40 +0800
-Subject: [PATCH] perl / PathTools: don't filter out blib from @INC
-
-If $TOPDIR includes the string "blib", filter it out from @INC may empty
-the @INC and cause build errors like:
-
- Can't locate ExtUtils/MakeMaker.pm in @INC \
- (you may need to install the ExtUtils::MakeMaker module) \
- (@INC contains: .) at Makefile.PL
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- dist/PathTools/Makefile.PL | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/dist/PathTools/Makefile.PL b/dist/PathTools/Makefile.PL
-index 1b21de4..f562cb2 100644
---- a/dist/PathTools/Makefile.PL
-+++ b/dist/PathTools/Makefile.PL
-@@ -1,6 +1,3 @@
--
--BEGIN { @INC = grep {!/blib/} @INC }
--
- require 5.005;
- use ExtUtils::MakeMaker;
- WriteMakefile
---
-1.9.1
-
diff --git a/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch b/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
deleted file mode 100644
index d912d0031e..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-perl: add archlib_exp variable used to generate ARCHLIB_EXP in config.h
-
-perl.c uses an ARCHLIB_EXP define to generate compile-time code that
-adds the archlibexp path to @INC during run-time initialization of a
-new perl interpreter.
-
-Because we've changed this value in a temporary way to make it
-possible to use ExtUtils::Embed in the target build (the temporary
-value in config.sh gets re-stripped out during packaging), the
-ARCHLIB_EXP value that gets generated still uses the temporary version
-instead of the original expected version (i.e. becauses it's in the
-generated config.h, it doesn't get stripped out during packaging like
-the others in config.sh).
-
-This creates an unmodified version called archlib_exp that gets used
-by a modified config_h.SH to get the correct value into config.h
-
-This patch uses an unmodified version of archlibexp called
-archlib_exp, introduced to config.sh, which is used to generate the
-correct value of ARCHLIB_EXP into config.h
-
-See YOCTO #3099 for more info.
-
-Upstream-Status:Inappropriate [embedded specific]
-
-Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-
-Index: perl-5.14.2/config_h.SH
-===================================================================
---- perl-5.14.2.orig/config_h.SH
-+++ perl-5.14.2/config_h.SH
-@@ -996,7 +996,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
- #$d_archlib ARCHLIB "$archlib" /**/
--#$d_archlib ARCHLIB_EXP "$archlibexp" /**/
-+#$d_archlib ARCHLIB_EXP "$archlib_exp" /**/
-
- /* ARCHNAME:
- * This symbol holds a string representing the architecture name.
diff --git a/meta/recipes-devtools/perl/perl/perl-configpm-switch.patch b/meta/recipes-devtools/perl/perl/perl-configpm-switch.patch
deleted file mode 100644
index c6cc15c93f..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-configpm-switch.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Upstream-Status:Inappropriate [native]
-
-This patch is used for perl-native only. It enables the switching of
-configuration files between Config_heavy.pl and
-Config_heavy-target.pl by setting the environment variables
-PERLCONFIGTARGET - the later containing settings for the target while
-the former contains those for the host. This will allow cpan.bbclass
-to use the settings appropriate for the native and/or target builds
-as required. This also disables the use of the cache since the cached
-values would be valid for the host only.
-
-Index: perl-5.14.2/configpm
-===================================================================
---- perl-5.14.2.orig/configpm
-+++ perl-5.14.2/configpm
-@@ -658,7 +658,7 @@ sub FETCH {
- my($self, $key) = @_;
-
- # check for cached value (which may be undef so we use exists not defined)
-- return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
-+ return $self->fetch_string($key);
- }
-
- ENDOFEND
-@@ -816,7 +816,21 @@ $config_txt .= sprintf <<'ENDOFTIE', $fa
- sub DESTROY { }
-
- sub AUTOLOAD {
-- require 'Config_heavy.pl';
-+ my $cfgfile = 'Config_heavy.pl';
-+ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
-+ {
-+ $cfgfile = 'Config_heavy-target.pl';
-+ }
-+ if (defined $ENV{PERL_ARCHLIB})
-+ {
-+ push @INC, $ENV{PERL_ARCHLIB};
-+ require $cfgfile;
-+ pop @INC;
-+ }
-+ else
-+ {
-+ require $cfgfile;
-+ }
- goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
- die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
- }
diff --git a/meta/recipes-devtools/perl/perl/perl-configure.sh b/meta/recipes-devtools/perl/perl/perl-configure.sh
deleted file mode 100755
index 25e7f8b96b..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-configure.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-
-#
-# Generate the common perl configuration
-# Needs to be run on a host that matches the bitsize of the target platform
-#
-
-echo sh Configure -des \
- -Doptimize=-O2 \
- -Dmyhostname=localhost \
- -Dperladmin=root@localhost \
- -Dcc=gcc \
- -Dcf_by='Open Embedded' \
- -Dinstallprefix=@DESTDIR@ \
- -Dprefix=/usr \
- -Dvendorprefix=/usr \
- -Dsiteprefix=/usr \
- -Dotherlibdirs=/usr/lib/perl5/5.22.1 \
- -Duseshrplib \
- -Dusethreads \
- -Duseithreads \
- -Duselargefiles \
- -Ud_dosuid \
- -Dd_semctl_semun \
- -Ui_db \
- -Ui_ndbm \
- -Ui_gdbm \
- -Di_shadow \
- -Di_syslog \
- -Dman3ext=3pm \
- -Duseperlio \
- -Dinstallusrbinperl \
- -Ubincompat5005 \
- -Uversiononly \
- -Dpager='/usr/bin/less -isr'
-
-cp -f config.sh config.sh.COMMON
-
-TARGETOS=$(grep myarchname config.sh.COMMON | sed "s#.*'\(.*\)'.*#\1#")
-
-sed -r -i config.sh.COMMON \
- -e "s#(install.*=')(/usr)/local(.*')#\1@DESTDIR@\2\3#g" \
- -e 's#'$TARGETOS'#@ARCH@#g'
diff --git a/meta/recipes-devtools/perl/perl/perl-dynloader.patch b/meta/recipes-devtools/perl/perl/perl-dynloader.patch
deleted file mode 100644
index 035beba66a..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-dynloader.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Allow the location that .so files are searched for for dynamic
-loading to be changed via an environment variable. This is to allow
-us to load .so's from the host system while building for the target
-system.
-
-Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
-
-Index: perl-5.14.2/dist/XSLoader/XSLoader_pm.PL
-===================================================================
---- perl-5.14.2.orig/dist/XSLoader/XSLoader_pm.PL
-+++ perl-5.14.2/dist/XSLoader/XSLoader_pm.PL
-@@ -28,6 +28,20 @@ sub load {
-
- my ($module, $modlibname) = caller();
-
-+ # OE: Allow env to form dynamic loader to look in a different place
-+ # This is so it finds the host .so files, not the targets
-+ if (defined $ENV{PERLHOSTLIB})
-+ {
-+ my $hostlib = $ENV{PERLHOSTLIB};
-+ print STDERR "*** Module name IN: $modlibname\n";
-+ ($p1, $p2, $p3, $p4, $p5) = $modlibname =~ m/(^(.*lib\w*\/)?)((perl\/[0-9\.]*\/)?)(.*)$/;
-+ print STDERR "*** p1: $p1 p3: $p3 p5: $p5\n";
-+ if ( $p1 ne "" ) {
-+ $modlibname = $hostlib.$p5;
-+ }
-+ print STDERR "*** Module name OUT: $modlibname\n";
-+ }
-+
- if (@_) {
- $module = $_[0];
- } else {
diff --git a/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch b/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch
deleted file mode 100644
index aa83fca5ae..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Index: perl-5.8.8/config_h.SH
-===================================================================
---- perl-5.8.8.orig/config_h.SH 2005-11-01 02:13:05.000000000 +0800
-+++ perl-5.8.8/config_h.SH 2010-11-01 17:06:07.215219738 +0800
-@@ -709,6 +709,12 @@
- */
- #$i_float I_FLOAT /**/
-
-+/* I_GDBM:
-+ * This symbol, if defined, indicates that <gdbm.h> exists and should
-+ * be included.
-+ */
-+#$i_gdbm I_GDBM /**/
-+
- /* I_LIMITS:
- * This symbol, if defined, indicates to the C program that it should
- * include <limits.h> to get definition of symbols like WORD_BIT or
diff --git a/meta/recipes-devtools/perl/perl/perl-errno-generation-gcc5.patch b/meta/recipes-devtools/perl/perl/perl-errno-generation-gcc5.patch
deleted file mode 100644
index 7379d8b814..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-errno-generation-gcc5.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-The upstream code assumes that the compiler version used to compiler miniperl/perl-native
-is the same as the one being used to build the perl binary. Since most people are not running
-systems with gcc 5, it is unlikely that it will work on any supported host. Switch out gccversion
-for the version extracted from $CC --version.
-
-Jeremy Puhlman <jpuhlman@mvista.com>
-
-Fix spaces in brackets while running $CC --version
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- ext/Errno/Errno_pm.PL | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
-index 1fd29d0..7976ea2 100644
---- a/ext/Errno/Errno_pm.PL
-+++ b/ext/Errno/Errno_pm.PL
-@@ -224,9 +224,13 @@ sub write_errno_pm {
-
- { # BeOS (support now removed) did not enter this block
- # invoke CPP and read the output
-+ my $compiler = $ENV{'CC'};
-+ my $compiler_out = `$compiler --version`;
-+ $compiler_out =~ s/\(.*\)/;/;
-+ my @compiler_version = split / /,$compiler_out;
-
- my $inhibit_linemarkers = '';
-- if ($Config{gccversion} =~ /\A(\d+)\./ and $1 >= 5) {
-+ if (@compiler_version[2] =~ /\A(\d+)\./ and $1 >= 5) {
- # GCC 5.0 interleaves expanded macros with line numbers breaking
- # each line into multiple lines. RT#123784
- $inhibit_linemarkers = ' -P';
---
-1.9.1
-
diff --git a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch b/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch
deleted file mode 100644
index 7b4a0015cb..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 652c8d4852a69f1bb4d387946f9b76350a1f0d0e Mon Sep 17 00:00:00 2001
-From: Tony Cook <tony@develop-help.com>
-Date: Tue, 15 Dec 2015 10:56:54 +1100
-Subject: [PATCH] perl: fix CVE-2015-8607
-
-ensure File::Spec::canonpath() preserves taint
-
-Previously the unix specific XS implementation of canonpath() would
-return an untainted path when supplied a tainted path.
-
-For the empty string case, newSVpvs() already sets taint as needed on
-its result.
-
-This issue was assigned CVE-2015-8607. [perl #126862]
-
-Backport patch from http://perl5.git.perl.org/perl.git/commitdiff/0b6f93036de171c12ba95d415e264d9cf7f4e1fd
-
-Upstream-Status: Backport
-CVE: CVE-2015-8607
-Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
----
- dist/PathTools/Cwd.xs | 1 +
- dist/PathTools/t/taint.t | 19 ++++++++++++++++++-
- 2 files changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/dist/PathTools/Cwd.xs b/dist/PathTools/Cwd.xs
-index 9d4dcf0..3d018dc 100644
---- a/dist/PathTools/Cwd.xs
-+++ b/dist/PathTools/Cwd.xs
-@@ -535,6 +535,7 @@ THX_unix_canonpath(pTHX_ SV *path)
- *o = 0;
- SvPOK_on(retval);
- SvCUR_set(retval, o - SvPVX(retval));
-+ SvTAINT(retval);
- return retval;
- }
-
-diff --git a/dist/PathTools/t/taint.t b/dist/PathTools/t/taint.t
-index 309b3e5..48f8c5b 100644
---- a/dist/PathTools/t/taint.t
-+++ b/dist/PathTools/t/taint.t
-@@ -12,7 +12,7 @@ use Test::More;
- BEGIN {
- plan(
- ${^TAINT}
-- ? (tests => 17)
-+ ? (tests => 21)
- : (skip_all => "A perl without taint support")
- );
- }
-@@ -34,3 +34,20 @@ foreach my $func (@Functions) {
-
- # Previous versions of Cwd tainted $^O
- is !tainted($^O), 1, "\$^O should not be tainted";
-+
-+{
-+ # [perl #126862] canonpath() loses taint
-+ my $tainted = substr($ENV{PATH}, 0, 0);
-+ # yes, getcwd()'s result should be tainted, and is tested above
-+ # but be sure
-+ ok tainted(File::Spec->canonpath($tainted . Cwd::getcwd)),
-+ "canonpath() keeps taint on non-empty string";
-+ ok tainted(File::Spec->canonpath($tainted)),
-+ "canonpath() keeps taint on empty string";
-+
-+ (Cwd::getcwd() =~ /^(.*)/);
-+ my $untainted = $1;
-+ ok !tainted($untainted), "make sure our untainted value is untainted";
-+ ok !tainted(File::Spec->canonpath($untainted)),
-+ "canonpath() doesn't add taint to untainted string";
-+}
---
-2.8.1
-
diff --git a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch b/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch
deleted file mode 100644
index 730ef178ad..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch
+++ /dev/null
@@ -1,352 +0,0 @@
-From 9987be3d24286d96d9dccec0433253ee8ad894b4 Mon Sep 17 00:00:00 2001
-From: Tony Cook <tony@develop-help.com>
-Date: Tue, 21 Jun 2016 10:02:02 +1000
-Subject: [PATCH] perl: fix CVE-2016-1238
-
-(perl #127834) remove . from the end of @INC if complex modules are loaded
-
-While currently Encode and Storable are know to attempt to load modules
-not included in the core, updates to other modules may lead to those
-also attempting to load new modules, so be safe and remove . for those
-as well.
-
-Backport patch from http://perl5.git.perl.org/perl.git/commitdiff/cee96d52c39b1e7b36e1c62d38bcd8d86e9a41ab
-
-Upstream-Status: Backport
-CVE: CVE-2016-1238
-Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
----
- cpan/Archive-Tar/bin/ptar | 1 +
- cpan/Archive-Tar/bin/ptardiff | 1 +
- cpan/Archive-Tar/bin/ptargrep | 1 +
- cpan/CPAN/scripts/cpan | 1 +
- cpan/Digest-SHA/shasum | 1 +
- cpan/Encode/bin/enc2xs | 1 +
- cpan/Encode/bin/encguess | 1 +
- cpan/Encode/bin/piconv | 1 +
- cpan/Encode/bin/ucmlint | 1 +
- cpan/Encode/bin/unidump | 1 +
- cpan/ExtUtils-MakeMaker/bin/instmodsh | 1 +
- cpan/IO-Compress/bin/zipdetails | 1 +
- cpan/JSON-PP/bin/json_pp | 1 +
- cpan/Test-Harness/bin/prove | 1 +
- dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp | 1 +
- dist/Module-CoreList/corelist | 1 +
- ext/Pod-Html/bin/pod2html | 1 +
- utils/c2ph.PL | 1 +
- utils/h2ph.PL | 2 ++
- utils/h2xs.PL | 2 ++
- utils/libnetcfg.PL | 1 +
- utils/perlbug.PL | 1 +
- utils/perldoc.PL | 5 ++++-
- utils/perlivp.PL | 2 ++
- utils/splain.PL | 6 ++++++
- 25 files changed, 36 insertions(+), 1 deletion(-)
-
-diff --git a/cpan/Archive-Tar/bin/ptar b/cpan/Archive-Tar/bin/ptar
-index 0eaffa7..9dc6402 100644
---- a/cpan/Archive-Tar/bin/ptar
-+++ b/cpan/Archive-Tar/bin/ptar
-@@ -1,6 +1,7 @@
- #!/usr/bin/perl
- use strict;
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use File::Find;
- use Getopt::Std;
- use Archive::Tar;
-diff --git a/cpan/Archive-Tar/bin/ptardiff b/cpan/Archive-Tar/bin/ptardiff
-index 66bd859..4668fa6 100644
---- a/cpan/Archive-Tar/bin/ptardiff
-+++ b/cpan/Archive-Tar/bin/ptardiff
-@@ -1,5 +1,6 @@
- #!/usr/bin/perl
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use Archive::Tar;
- use Getopt::Std;
-diff --git a/cpan/Archive-Tar/bin/ptargrep b/cpan/Archive-Tar/bin/ptargrep
-index 1a320f1..8dc6b4f 100644
---- a/cpan/Archive-Tar/bin/ptargrep
-+++ b/cpan/Archive-Tar/bin/ptargrep
-@@ -4,6 +4,7 @@
- # archive. See 'ptargrep --help' for more documentation.
- #
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use warnings;
-
-diff --git a/cpan/CPAN/scripts/cpan b/cpan/CPAN/scripts/cpan
-index 5f4320e..ccba47e 100644
---- a/cpan/CPAN/scripts/cpan
-+++ b/cpan/CPAN/scripts/cpan
-@@ -1,5 +1,6 @@
- #!/usr/local/bin/perl
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use vars qw($VERSION);
-
-diff --git a/cpan/Digest-SHA/shasum b/cpan/Digest-SHA/shasum
-index 14ddd60..62a2b0e 100644
---- a/cpan/Digest-SHA/shasum
-+++ b/cpan/Digest-SHA/shasum
-@@ -13,6 +13,7 @@
- ## "-0" option for reading bit strings, and
- ## "-p" option for portable digests (to be deprecated).
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use warnings;
- use Fcntl;
-diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
-index 4d64e38..473a15c 100644
---- a/cpan/Encode/bin/enc2xs
-+++ b/cpan/Encode/bin/enc2xs
-@@ -4,6 +4,7 @@ BEGIN {
- # with $ENV{PERL_CORE} set
- # In case we need it in future...
- require Config; import Config;
-+ pop @INC if $INC[-1] eq '.';
- }
- use strict;
- use warnings;
-diff --git a/cpan/Encode/bin/encguess b/cpan/Encode/bin/encguess
-index 5d7ac80..0be5c7c 100644
---- a/cpan/Encode/bin/encguess
-+++ b/cpan/Encode/bin/encguess
-@@ -1,5 +1,6 @@
- #!./perl
- use 5.008001;
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use warnings;
- use Encode;
-diff --git a/cpan/Encode/bin/piconv b/cpan/Encode/bin/piconv
-index c1dad9e..60b2a59 100644
---- a/cpan/Encode/bin/piconv
-+++ b/cpan/Encode/bin/piconv
-@@ -1,6 +1,7 @@
- #!./perl
- # $Id: piconv,v 2.7 2014/05/31 09:48:48 dankogai Exp $
- #
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use 5.8.0;
- use strict;
- use Encode ;
-diff --git a/cpan/Encode/bin/ucmlint b/cpan/Encode/bin/ucmlint
-index 622376d..25e0d67 100644
---- a/cpan/Encode/bin/ucmlint
-+++ b/cpan/Encode/bin/ucmlint
-@@ -3,6 +3,7 @@
- # $Id: ucmlint,v 2.2 2008/03/12 09:51:11 dankogai Exp $
- #
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- our $VERSION = do { my @r = (q$Revision: 2.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
-
-diff --git a/cpan/Encode/bin/unidump b/cpan/Encode/bin/unidump
-index ae0da30..f190827 100644
---- a/cpan/Encode/bin/unidump
-+++ b/cpan/Encode/bin/unidump
-@@ -1,5 +1,6 @@
- #!./perl
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use Encode;
- use Getopt::Std;
-diff --git a/cpan/ExtUtils-MakeMaker/bin/instmodsh b/cpan/ExtUtils-MakeMaker/bin/instmodsh
-index e551434..b3b109f 100644
---- a/cpan/ExtUtils-MakeMaker/bin/instmodsh
-+++ b/cpan/ExtUtils-MakeMaker/bin/instmodsh
-@@ -1,5 +1,6 @@
- #!/usr/bin/perl -w
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use IO::File;
- use ExtUtils::Packlist;
-diff --git a/cpan/IO-Compress/bin/zipdetails b/cpan/IO-Compress/bin/zipdetails
-index 0249850..1b9c70a 100644
---- a/cpan/IO-Compress/bin/zipdetails
-+++ b/cpan/IO-Compress/bin/zipdetails
-@@ -5,6 +5,7 @@
- # Display info on the contents of a Zip file
- #
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use warnings ;
-
-diff --git a/cpan/JSON-PP/bin/json_pp b/cpan/JSON-PP/bin/json_pp
-index df9d243..896cd2f 100644
---- a/cpan/JSON-PP/bin/json_pp
-+++ b/cpan/JSON-PP/bin/json_pp
-@@ -1,5 +1,6 @@
- #!/usr/bin/perl
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use Getopt::Long;
-
-diff --git a/cpan/Test-Harness/bin/prove b/cpan/Test-Harness/bin/prove
-index 6637cc4..d71b238 100644
---- a/cpan/Test-Harness/bin/prove
-+++ b/cpan/Test-Harness/bin/prove
-@@ -1,5 +1,6 @@
- #!/usr/bin/perl -w
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use warnings;
- use App::Prove;
-diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp b/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp
-index e2ac71a..d596cdf 100644
---- a/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp
-+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp
-@@ -1,5 +1,6 @@
- #!perl
- use 5.006;
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- eval {
- require ExtUtils::ParseXS;
-diff --git a/dist/Module-CoreList/corelist b/dist/Module-CoreList/corelist
-index aa4a945..bbe61cc 100644
---- a/dist/Module-CoreList/corelist
-+++ b/dist/Module-CoreList/corelist
-@@ -130,6 +130,7 @@ requested perl versions.
-
- =cut
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use Module::CoreList;
- use Getopt::Long qw(:config no_ignore_case);
- use Pod::Usage;
-diff --git a/ext/Pod-Html/bin/pod2html b/ext/Pod-Html/bin/pod2html
-index b022859..7d1d232 100644
---- a/ext/Pod-Html/bin/pod2html
-+++ b/ext/Pod-Html/bin/pod2html
-@@ -216,6 +216,7 @@ This program is distributed under the Artistic License.
-
- =cut
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use Pod::Html;
-
- pod2html @ARGV;
-diff --git a/utils/c2ph.PL b/utils/c2ph.PL
-index 13389ec..cef0b5c 100644
---- a/utils/c2ph.PL
-+++ b/utils/c2ph.PL
-@@ -280,6 +280,7 @@ Anyway, here it is. Should run on perl v4 or greater. Maybe less.
-
- $RCSID = '$Id: c2ph,v 1.7 95/10/28 10:41:47 tchrist Exp Locker: tchrist $';
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use File::Temp;
-
- ######################################################################
-diff --git a/utils/h2ph.PL b/utils/h2ph.PL
-index 55c1f72..300b756 100644
---- a/utils/h2ph.PL
-+++ b/utils/h2ph.PL
-@@ -36,6 +36,8 @@ $Config{startperl}
-
- print OUT <<'!NO!SUBS!';
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
-+
- use strict;
-
- use Config;
-diff --git a/utils/h2xs.PL b/utils/h2xs.PL
-index 268f680..f95ee0c 100644
---- a/utils/h2xs.PL
-+++ b/utils/h2xs.PL
-@@ -35,6 +35,8 @@ $Config{startperl}
-
- print OUT <<'!NO!SUBS!';
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
-+
- use warnings;
-
- =head1 NAME
-diff --git a/utils/libnetcfg.PL b/utils/libnetcfg.PL
-index 59a2de8..26d2f99 100644
---- a/utils/libnetcfg.PL
-+++ b/utils/libnetcfg.PL
-@@ -97,6 +97,7 @@ Jarkko Hietaniemi, conversion into libnetcfg for inclusion into Perl 5.8.
-
- # $Id: Configure,v 1.8 1997/03/04 09:22:32 gbarr Exp $
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use strict;
- use IO::File;
- use Getopt::Std;
-diff --git a/utils/perlbug.PL b/utils/perlbug.PL
-index 885785a..ae8c343 100644
---- a/utils/perlbug.PL
-+++ b/utils/perlbug.PL
-@@ -57,6 +57,7 @@ print OUT <<'!NO!SUBS!';
- my @patches = Config::local_patches();
- my $patch_tags = join "", map /(\S+)/ ? "+$1 " : (), @patches;
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
- use warnings;
- use strict;
- use Config;
-diff --git a/utils/perldoc.PL b/utils/perldoc.PL
-index e201de9..cd60bd4 100644
---- a/utils/perldoc.PL
-+++ b/utils/perldoc.PL
-@@ -44,7 +44,10 @@ $Config{startperl}
- # This "$file" file was generated by "$0"
-
- require 5;
--BEGIN { \$^W = 1 if \$ENV{'PERLDOCDEBUG'} }
-+BEGIN {
-+ \$^W = 1 if \$ENV{'PERLDOCDEBUG'};
-+ pop \@INC if \$INC[-1] eq '.';
-+}
- use Pod::Perldoc;
- exit( Pod::Perldoc->run() );
-
-diff --git a/utils/perlivp.PL b/utils/perlivp.PL
-index cc49f96..696a44e 100644
---- a/utils/perlivp.PL
-+++ b/utils/perlivp.PL
-@@ -39,6 +39,8 @@ print OUT "\n# perlivp $^V\n";
-
- print OUT <<'!NO!SUBS!';
-
-+BEGIN { pop @INC if $INC[-1] eq '.' }
-+
- sub usage {
- warn "@_\n" if @_;
- print << " EOUSAGE";
-diff --git a/utils/splain.PL b/utils/splain.PL
-index 9c70b61..cae84a0 100644
---- a/utils/splain.PL
-+++ b/utils/splain.PL
-@@ -38,6 +38,12 @@ $Config{startperl}
- if \$running_under_some_shell;
- !GROK!THIS!
-
-+print <<'!NO!SUBS!';
-+
-+BEGIN { pop @INC if $INC[-1] eq '.' }
-+
-+!NO!SUBS!
-+
- while (<IN>) {
- print OUT unless /^package diagnostics/;
- }
---
-2.8.1
-
diff --git a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-2381.patch b/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-2381.patch
deleted file mode 100644
index 99fa8d9a6a..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-2381.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-CVE: CVE-2016-2381
-Upstream-Status: Backport
-
-Backport patch to fix CVE-2016-2381 from
-
-http://perl5.git.perl.org/perl.git/commitdiff/ae37b791a73a9e78dedb89fb2429d2628cf58076
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From: Tony Cook <tony@develop-help.com>
-Date: Wed, 27 Jan 2016 00:52:15 +0000 (+1100)
-Subject: remove duplicate environment variables from environ
-X-Git-Tag: v5.23.9~170
-X-Git-Url: http://perl5.git.perl.org/perl.git/commitdiff_plain/ae37b791a73a9e78dedb89fb2429d2628cf58076
-
-remove duplicate environment variables from environ
-
-If we see duplicate environment variables while iterating over
-environ[]:
-
-a) make sure we use the same value in %ENV that getenv() returns.
-
-Previously on a duplicate, %ENV would have the last entry for the name
-from environ[], but a typical getenv() would return the first entry.
-
-Rather than assuming all getenv() implementations return the first entry
-explicitly call getenv() to ensure they agree.
-
-b) remove duplicate entries from environ
-
-Previously if there was a duplicate definition for a name in environ[]
-setting that name in %ENV could result in an unsafe value being passed
-to a child process, so ensure environ[] has no duplicates.
-
-CVE-2016-2381
----
-
-diff --git a/perl.c b/perl.c
-index 4a324c6..5c71fd0 100644
---- a/perl.c
-+++ b/perl.c
-@@ -4329,23 +4329,70 @@ S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env)
- }
- if (env) {
- char *s, *old_var;
-+ STRLEN nlen;
- SV *sv;
-+ HV *dups = newHV();
-+
- for (; *env; env++) {
- old_var = *env;
-
- if (!(s = strchr(old_var,'=')) || s == old_var)
- continue;
-+ nlen = s - old_var;
-
- #if defined(MSDOS) && !defined(DJGPP)
- *s = '\0';
- (void)strupr(old_var);
- *s = '=';
- #endif
-- sv = newSVpv(s+1, 0);
-- (void)hv_store(hv, old_var, s - old_var, sv, 0);
-+ if (hv_exists(hv, old_var, nlen)) {
-+ const char *name = savepvn(old_var, nlen);
-+
-+ /* make sure we use the same value as getenv(), otherwise code that
-+ uses getenv() (like setlocale()) might see a different value to %ENV
-+ */
-+ sv = newSVpv(PerlEnv_getenv(name), 0);
-+
-+ /* keep a count of the dups of this name so we can de-dup environ later */
-+ if (hv_exists(dups, name, nlen))
-+ ++SvIVX(*hv_fetch(dups, name, nlen, 0));
-+ else
-+ (void)hv_store(dups, name, nlen, newSViv(1), 0);
-+
-+ Safefree(name);
-+ }
-+ else {
-+ sv = newSVpv(s+1, 0);
-+ }
-+ (void)hv_store(hv, old_var, nlen, sv, 0);
- if (env_is_not_environ)
- mg_set(sv);
- }
-+ if (HvKEYS(dups)) {
-+ /* environ has some duplicate definitions, remove them */
-+ HE *entry;
-+ hv_iterinit(dups);
-+ while ((entry = hv_iternext_flags(dups, 0))) {
-+ STRLEN nlen;
-+ const char *name = HePV(entry, nlen);
-+ IV count = SvIV(HeVAL(entry));
-+ IV i;
-+ SV **valp = hv_fetch(hv, name, nlen, 0);
-+
-+ assert(valp);
-+
-+ /* try to remove any duplicate names, depending on the
-+ * implementation used in my_setenv() the iteration might
-+ * not be necessary, but let's be safe.
-+ */
-+ for (i = 0; i < count; ++i)
-+ my_setenv(name, 0);
-+
-+ /* and set it back to the value we set $ENV{name} to */
-+ my_setenv(name, SvPV_nolen(*valp));
-+ }
-+ }
-+ SvREFCNT_dec_NN(dups);
- }
- #endif /* USE_ENVIRON_ARRAY */
- #endif /* !PERL_MICRO */
diff --git a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch b/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch
deleted file mode 100644
index 2722af35bc..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 7cedaa8bc2ca9e63369d0e2d4c4c23af9febb93a Mon Sep 17 00:00:00 2001
-From: Father Chrysostomos <sprout@cpan.org>
-Date: Sat, 2 Jul 2016 22:56:51 -0700
-Subject: [PATCH] perl: fix CVE-2016-6185
-MIME-Version: 1.0
-
-Don't let XSLoader load relative paths
-
-[rt.cpan.org #115808]
-
-The logic in XSLoader for determining the library goes like this:
-
- my $c = () = split(/::/,$caller,-1);
- $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
- my $file = "$modlibname/auto/$modpname/$modfname.bundle";
-
-(That last line varies by platform.)
-
-$caller is the calling package. $modlibname is the calling file. It
-removes as many path segments from $modlibname as there are segments
-in $caller. So if you have Foo/Bar/XS.pm calling XSLoader from the
-Foo::Bar package, the $modlibname will end up containing the path in
-@INC where XS.pm was found, followed by "/Foo". Usually the fallback
-to Dynaloader::bootstrap_inherit, which does an @INC search, makes
-things Just Work.
-
-But if our hypothetical Foo/Bar/XS.pm actually calls
-XSLoader::load from inside a string eval, then path ends up being
-"(eval 1)/auto/Foo/Bar/Bar.bundle".
-
-So if someone creates a directory named '(eval 1)' with a naughty
-binary file in it, it will be loaded if a script using Foo::Bar is run
-in the parent directory.
-
-This commit makes XSLoader fall back to Dynaloader's @INC search if
-the calling file has a relative path that is not found in @INC.
-
-Backport patch from http://perl5.git.perl.org/perl.git/commitdiff/08e3451d7
-
-Upstream-Status: Backport
-CVE: CVE-2016-6185
-Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
----
- dist/XSLoader/XSLoader_pm.PL | 25 +++++++++++++++++++++++++
- dist/XSLoader/t/XSLoader.t | 27 ++++++++++++++++++++++++++-
- 2 files changed, 51 insertions(+), 1 deletion(-)
-
-diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL
-index 668411d..778e46b 100644
---- a/dist/XSLoader/XSLoader_pm.PL
-+++ b/dist/XSLoader/XSLoader_pm.PL
-@@ -104,6 +104,31 @@ print OUT <<'EOT';
- my $modpname = join('/',@modparts);
- my $c = () = split(/::/,$caller,-1);
- $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
-+ # Does this look like a relative path?
-+ if ($modlibname !~ m|^[\\/]|) {
-+ # Someone may have a #line directive that changes the file name, or
-+ # may be calling XSLoader::load from inside a string eval. We cer-
-+ # tainly do not want to go loading some code that is not in @INC,
-+ # as it could be untrusted.
-+ #
-+ # We could just fall back to DynaLoader here, but then the rest of
-+ # this function would go untested in the perl core, since all @INC
-+ # paths are relative during testing. That would be a time bomb
-+ # waiting to happen, since bugs could be introduced into the code.
-+ #
-+ # So look through @INC to see if $modlibname is in it. A rela-
-+ # tive $modlibname is not a common occurrence, so this block is
-+ # not hot code.
-+ FOUND: {
-+ for (@INC) {
-+ if ($_ eq $modlibname) {
-+ last FOUND;
-+ }
-+ }
-+ # Not found. Fall back to DynaLoader.
-+ goto \&XSLoader::bootstrap_inherit;
-+ }
-+ }
- EOT
-
- my $dl_dlext = quotemeta($Config::Config{'dlext'});
-diff --git a/dist/XSLoader/t/XSLoader.t b/dist/XSLoader/t/XSLoader.t
-index 2ff11fe..1e86faa 100644
---- a/dist/XSLoader/t/XSLoader.t
-+++ b/dist/XSLoader/t/XSLoader.t
-@@ -33,7 +33,7 @@ my %modules = (
- 'Time::HiRes'=> q| ::can_ok( 'Time::HiRes' => 'usleep' ) |, # 5.7.3
- );
-
--plan tests => keys(%modules) * 3 + 9;
-+plan tests => keys(%modules) * 3 + 10;
-
- # Try to load the module
- use_ok( 'XSLoader' );
-@@ -125,3 +125,28 @@ XSLoader::load("Devel::Peek");
- EOS
- or ::diag $@;
- }
-+
-+SKIP: {
-+ skip "File::Path not available", 1
-+ unless eval { require File::Path };
-+ my $name = "phooo$$";
-+ File::Path::make_path("$name/auto/Foo/Bar");
-+ open my $fh,
-+ ">$name/auto/Foo/Bar/Bar.$Config::Config{'dlext'}";
-+ close $fh;
-+ my $fell_back;
-+ local *XSLoader::bootstrap_inherit = sub {
-+ $fell_back++;
-+ # Break out of the calling subs
-+ goto the_test;
-+ };
-+ eval <<END;
-+#line 1 $name
-+package Foo::Bar;
-+XSLoader::load("Foo::Bar");
-+END
-+ the_test:
-+ ok $fell_back,
-+ 'XSLoader will not load relative paths based on (caller)[1]';
-+ File::Path::remove_tree($name);
-+}
---
-2.8.1
-
diff --git a/meta/recipes-devtools/perl/perl/perl-fix-conflict-between-skip_all-and-END.patch b/meta/recipes-devtools/perl/perl/perl-fix-conflict-between-skip_all-and-END.patch
deleted file mode 100644
index de946dbec7..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-fix-conflict-between-skip_all-and-END.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-Some Perl tests fail when run on a cross-compiled target machine. Apply
-a slightly tweaked upstream patch to fix the problems. Notes:
- 1. as of 2 Jun 2016, the original patch has been applied to the current
- EUMM releases, but has not made it into perl core yet.
- 2. when the base perl package is upgraded in Yocto, this patch may need
- to be replaced by the original upstream version to correctly apply
- to the current version of ExtUtils-MakeMaker at that time.
-
-[YOCTO #8656]
-
-Upstream-Status: Backport
-
-Signed-off-by: Bill Randle <william.c.randle@intel.com>
-
-From 4a07a3bd18363986112cf2b39dec3c2985353ffb Mon Sep 17 00:00:00 2001
-From: Francois Perrad <francois.perrad@gadz.org>
-Date: Mon, 22 Dec 2014 19:04:34 +0100
-Subject: [PATCH] fix conflict between skip_all and END section
-
-since the commit 430de781809a6be3bcd25a349dc40ce54405ab53
-the test suite fails in cross-compil environment (perl-5.21.6 & perl-5.21.7)
-like this :
-
- $ ./perl harness -v ../cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
- ../cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t ..
- 1..0 # SKIP cross-compiling and make not available
- ok 1 - chdir updir
- ok 2 - teardown
- # Looks like you planned 0 tests but ran 2.
- skipped: cross-compiling and make not available
-
-this commit restores the implicit call of plan() at import time of Test::More
-
-Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
----
- cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t | 7 ++++---
- cpan/ExtUtils-MakeMaker/t/PL_FILES.t | 4 ++--
- cpan/ExtUtils-MakeMaker/t/basic.t | 4 ++--
- cpan/ExtUtils-MakeMaker/t/echo.t | 6 +++---
- cpan/ExtUtils-MakeMaker/t/min_perl_version.t | 4 ++--
- cpan/ExtUtils-MakeMaker/t/pm_to_blib.t | 4 ++--
- cpan/ExtUtils-MakeMaker/t/recurs.t | 4 ++--
- cpan/ExtUtils-MakeMaker/t/several_authors.t | 4 ++--
- 8 files changed, 19 insertions(+), 18 deletions(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t b/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
-index f27b62c..3bbb3a6 100644
---- a/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
-+++ b/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
-@@ -15,12 +15,13 @@ $CLEANUP &&= 1; # so always 1 or numerically 0
-
- use MakeMaker::Test::Utils;
- use MakeMaker::Test::Setup::BFD;
--use Test::More;
- use Config;
- use ExtUtils::MM;
--plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
-+use Test::More
-+ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
- ? (skip_all => "cross-compiling and make not available")
-- : (tests => 3 + $CLEANUP + @INSTDIRS * (15 + $CLEANUP));
-+ : ();
-+plan tests => 3 + $CLEANUP + @INSTDIRS * (15 + $CLEANUP);
-
- my $Is_VMS = $^O eq 'VMS';
-
-diff --git a/cpan/ExtUtils-MakeMaker/t/PL_FILES.t b/cpan/ExtUtils-MakeMaker/t/PL_FILES.t
-index 0779dbb..85d53a5 100644
---- a/cpan/ExtUtils-MakeMaker/t/PL_FILES.t
-+++ b/cpan/ExtUtils-MakeMaker/t/PL_FILES.t
-@@ -11,9 +11,9 @@ use File::Temp qw[tempdir];
- use MakeMaker::Test::Setup::PL_FILES;
- use MakeMaker::Test::Utils;
- use Config;
--use Test::More;
- use ExtUtils::MM;
--plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
-+use Test::More
-+ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
- ? (skip_all => "cross-compiling and make not available")
- : (tests => 9);
-
-diff --git a/cpan/ExtUtils-MakeMaker/t/basic.t b/cpan/ExtUtils-MakeMaker/t/basic.t
-index 3dd66ad..eddf2e9 100644
---- a/cpan/ExtUtils-MakeMaker/t/basic.t
-+++ b/cpan/ExtUtils-MakeMaker/t/basic.t
-@@ -20,9 +20,9 @@ use utf8;
- use MakeMaker::Test::Utils;
- use MakeMaker::Test::Setup::BFD;
- use Config;
--use Test::More;
- use ExtUtils::MM;
--plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
-+use Test::More
-+ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
- ? (skip_all => "cross-compiling and make not available")
- : (tests => 171);
- use File::Find;
-diff --git a/cpan/ExtUtils-MakeMaker/t/echo.t b/cpan/ExtUtils-MakeMaker/t/echo.t
-index 789b85f..c43bc47 100644
---- a/cpan/ExtUtils-MakeMaker/t/echo.t
-+++ b/cpan/ExtUtils-MakeMaker/t/echo.t
-@@ -14,11 +14,11 @@ use MakeMaker::Test::Utils;
- use File::Temp;
- use Cwd 'abs_path';
-
--use Test::More;
- use ExtUtils::MM;
--plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
-+use Test::More
-+ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
- ? (skip_all => "cross-compiling and make not available")
-- : ();
-+ : (tests => 18);
-
- #--------------------- Setup
-
-diff --git a/cpan/ExtUtils-MakeMaker/t/min_perl_version.t b/cpan/ExtUtils-MakeMaker/t/min_perl_version.t
-index c5d78d6..2ef118d 100644
---- a/cpan/ExtUtils-MakeMaker/t/min_perl_version.t
-+++ b/cpan/ExtUtils-MakeMaker/t/min_perl_version.t
-@@ -13,9 +13,9 @@ use TieOut;
- use MakeMaker::Test::Utils;
- use MakeMaker::Test::Setup::MPV;
- use Config;
--use Test::More;
- use ExtUtils::MM;
--plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
-+use Test::More
-+ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
- ? (skip_all => "cross-compiling and make not available")
- : (tests => 36);
- use File::Path;
-diff --git a/cpan/ExtUtils-MakeMaker/t/pm_to_blib.t b/cpan/ExtUtils-MakeMaker/t/pm_to_blib.t
-index f1e348e..ebfa26c 100644
---- a/cpan/ExtUtils-MakeMaker/t/pm_to_blib.t
-+++ b/cpan/ExtUtils-MakeMaker/t/pm_to_blib.t
-@@ -12,9 +12,9 @@ use ExtUtils::MakeMaker;
- use MakeMaker::Test::Utils;
- use MakeMaker::Test::Setup::BFD;
- use Config;
--use Test::More;
- use ExtUtils::MM;
--plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
-+use Test::More
-+ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
- ? (skip_all => "cross-compiling and make not available")
- : 'no_plan';
-
-diff --git a/cpan/ExtUtils-MakeMaker/t/recurs.t b/cpan/ExtUtils-MakeMaker/t/recurs.t
-index 84c09a2..661e0db 100644
---- a/cpan/ExtUtils-MakeMaker/t/recurs.t
-+++ b/cpan/ExtUtils-MakeMaker/t/recurs.t
-@@ -14,9 +14,9 @@ use File::Temp qw[tempdir];
- use MakeMaker::Test::Utils;
- use MakeMaker::Test::Setup::Recurs;
- use Config;
--use Test::More;
- use ExtUtils::MM;
--plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
-+use Test::More
-+ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
- ? (skip_all => "cross-compiling and make not available")
- : (tests => 26);
-
-diff --git a/cpan/ExtUtils-MakeMaker/t/several_authors.t b/cpan/ExtUtils-MakeMaker/t/several_authors.t
-index 1a75a3e..869e9f0 100644
---- a/cpan/ExtUtils-MakeMaker/t/several_authors.t
-+++ b/cpan/ExtUtils-MakeMaker/t/several_authors.t
-@@ -13,9 +13,9 @@ use TieOut;
- use MakeMaker::Test::Utils;
- use MakeMaker::Test::Setup::SAS;
- use Config;
--use Test::More;
- use ExtUtils::MM;
--plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
-+use Test::More
-+ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
- ? (skip_all => "cross-compiling and make not available")
- : (tests => 20);
- use File::Path;
diff --git a/meta/recipes-devtools/perl/perl/perl-moreconfig.patch b/meta/recipes-devtools/perl/perl/perl-moreconfig.patch
deleted file mode 100644
index 59ce85a7a3..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-moreconfig.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-We need ld in the fake config library, but it's not included by default. So
-expand the number of items included. While this works it indicates that the
-rest of the config items are not being picked up and/or are being picked up
-from the host. More investigation needed.
-
---- perl-5.8.8/configpm 2007/04/20 09:48:05 1.1
-+++ perl-5.8.8/configpm 2007/04/20 09:57:12
-@@ -2,7 +2,7 @@
- use strict;
- use vars qw(%Config $Config_SH_expanded);
-
--my $how_many_common = 22;
-+my $how_many_common = 50;
-
- # commonly used names to precache (and hence lookup fastest)
- my %Common;
diff --git a/meta/recipes-devtools/perl/perl/perl-remove-nm-from-libswanted.patch b/meta/recipes-devtools/perl/perl/perl-remove-nm-from-libswanted.patch
deleted file mode 100644
index c489f05bfe..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-remove-nm-from-libswanted.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 4732711e2548b6d734ca831d65dbcf501a89774e Mon Sep 17 00:00:00 2001
-From: Andreas Koenig <andk@cpan.org>
-Date: Sun, 3 Jan 2016 08:40:33 +0100
-Subject: [PATCH] Remove nm from libswanted
-
-Nm stood for "New Math" library in the context of 1994. 2014 a conflicting
-library libnm appeared that has a network manager context.
-
-Upstream-Status: Backport [commit 4732711e on branch blead, tag v5.25.0]
-
----
- Configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Configure b/Configure
-index 0e71b4b..cfbdaa1 100755
---- a/Configure
-+++ b/Configure
-@@ -1464,7 +1464,7 @@ libswanted_uselargefiles=''
- : set usesocks on the Configure command line to enable socks.
- : List of libraries we want.
- : If anyone needs extra -lxxx, put those in a hint file.
--libswanted="cl pthread socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld"
-+libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
- libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
- : We probably want to search /usr/shlib before most other libraries.
- : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
---
-2.9.2
-
diff --git a/meta/recipes-devtools/perl/perl/perl-test-customized.patch b/meta/recipes-devtools/perl/perl/perl-test-customized.patch
deleted file mode 100644
index 84b0b88f29..0000000000
--- a/meta/recipes-devtools/perl/perl/perl-test-customized.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-The OE core recipies customize some ExtUtils-MakeMaker modules,
-which causes their MD5 sum to mismatch the provided table and the
-corresponding tests to fail. Also, we patch several test files with
-a backported patch. Update list of hashes to reflect the patched files.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Bill Randle <william.c.randle@intel.com>
-
-Index: perl-5.22.1/t/porting/customized.dat
-===================================================================
---- perl-5.22.1.orig/t/porting/customized.dat 2015-10-31 13:36:16.000000000 +0000
-+++ perl-5.22.1/t/porting/customized.dat 2016-06-02 12:50:10.381030204 -0700
-@@ -1,8 +1,8 @@
- CPAN cpan/CPAN/lib/CPAN.pm ce62c43d72f101c011184dbbc59e21c2790826f0
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm 7f4dfd0fe884bd42412bcf04ca80ef97b39c1d54
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm bef099988b15fb0b2a1f5ac48c01af1f7f36d329
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm 8168e18f0e3ce3ece4bb7e7c72d57ec07c67c402
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 7115e97a53559cb3ec061dd6f7f344e522724c4a
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm a08ecf80c8f0a234243817713b2a5ab0dcae3c0a
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 3d7abd674b15ed323f743594ef0bd09db76b1aee
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm f8db8d4245bf0684b8210c811f50d7cfb1a27d78
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod 757bffb47857521311f8f3bde43ebe165f8d5191
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm 82be06851deb84c6419ad003ce9b6d1957f395f3
-@@ -14,7 +14,7 @@
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm ab80029ab16d38d4f2e41dc88d2ceb9f3790e477
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm 453e0abbc4bb38db4c0820ad5c4846f313b66291
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm c1b1babda8f43ae7a2caba1cb4f70f92af5a0e34
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm 6f90d94ad3e7aa0045a3b1a10a1bb18391f89f57
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm 21bde53290bf1a4da4457290b65bd1b0ca6f1d16
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm cab2b3ce08b71a4ce89aa630f236eb08b852439d
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm 61fced0faf518bf87c265fcb51ed330ba354623f
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm ae0ef51a7b6dd0b05aa61c779df7167dda5f5119
-@@ -23,7 +23,7 @@
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm 433135eecb85b4b1d90d3027432f329436c78447
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm 1fbb5605bfb47feee4083feba8aa85e659628f70
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm 5b66d1f485a6034d96fc24ba1665b1bad9e447f1
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 8cef99a9bd370ecfd07ddb0efbdcbb4101255e45
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 860d520234d7c9036d91f0b143a1dddf2a5e8cb7
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm 939572fde3d59ba77c2e677fe2df2bed4bed5898
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm 09c2049bfd25b735e2a5bcf56a6cff7b4827f9c8
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm d65d63f8217a55c36f62e249814988974f593c79
-@@ -31,8 +31,16 @@
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm 12df38eacceeed73cab94c423236bfaed0fbbfec
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm 22fe9596a0237252f45399a36abc83b7813bc328
- ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm 7fbc42ca2ebc6c677b79ae5fd5647243cf069463
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/basic.t 6cdc7701b50e586bc9c4cfb1616de8eb0b1baf34
--ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/pm_to_blib.t 71ebcee355691ce374fcad251b12d8b2412462b3
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/basic.t d78fdec7a4512dc8d2a7abd62b8104530af8ecf9
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/echo.t 9427f4adebbb13b57b4a76fef2972adf63c9bd96
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t ef356c196bb5c3c428ae309d7f989bdd6d79b86d
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t 3e6d4d6eb2eab42e983ac70eb5737a759af0916f
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/INST.t e553fa0d53c894c8d36aafb69edd55b38a9355f8
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/min_perl_version.t e930ec9217de5a1785d0247c30b159e6f7f5673f
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/PL_FILES.t 7e49ab6c4d467826d22023fa03d77b85f935b58e
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/pm_to_blib.t a04c96eecfab17e4094604e0fb998dd93cf93b93
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/recurs.t 94cce3bff875a878ed27816b3f5df2ca4225c714
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/several_authors.t f811d993c0835c66dc501ed55083acb29bf33bf7
- Text::ParseWords cpan/Text-ParseWords/t/ParseWords.t 9bae51c9b944cd5c0bbabe9d397e573976a2be8e
- Win32API::File cpan/Win32API-File/buffers.h 02d230ac9ac7091365128161a0ed671898baefae
- Win32API::File cpan/Win32API-File/cFile.h fca7e383e76979c3ac3adf12d11d1bcd2618e489
diff --git a/meta/recipes-devtools/perl/perl/run-ptest b/meta/recipes-devtools/perl/perl/run-ptest
deleted file mode 100644
index 1e2dd1b66d..0000000000
--- a/meta/recipes-devtools/perl/perl/run-ptest
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-cd t && ./TEST | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'
diff --git a/meta/recipes-devtools/perl/perl/t-run-switches.t-perl5-perl.patch b/meta/recipes-devtools/perl/perl/t-run-switches.t-perl5-perl.patch
deleted file mode 100644
index 03fdf4ab98..0000000000
--- a/meta/recipes-devtools/perl/perl/t-run-switches.t-perl5-perl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1561549ea36e37cc25706f094a195de4928f4211 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Fri, 19 Jun 2015 01:23:46 -0700
-Subject: [PATCH] t/run/switches.t: perl5 -> perl
-
-We call it perl rather than perl5 in oe.
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- t/run/switches.t | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/t/run/switches.t b/t/run/switches.t
-index 78915e0..e9e4b45 100644
---- a/t/run/switches.t
-+++ b/t/run/switches.t
-@@ -269,7 +269,7 @@ is runperl(stderr => 1, prog => '#!perl -M'),
- '-V generates 20+ lines' );
-
- like( runperl( switches => ['-V'] ),
-- qr/\ASummary of my perl5 .*configuration:/,
-+ qr/\ASummary of my perl .*configuration:/,
- '-V looks okay' );
-
- # lookup a known config var
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/perl/perl/test/dist-threads-t-join.t-adjust-ps-option.patch b/meta/recipes-devtools/perl/perl/test/dist-threads-t-join.t-adjust-ps-option.patch
deleted file mode 100644
index c8293c3d6a..0000000000
--- a/meta/recipes-devtools/perl/perl/test/dist-threads-t-join.t-adjust-ps-option.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-dist/threads/t/join.t: adjust ps option
-
-The ps's option '-f' is not supported by busybox in oe.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- dist/threads/t/join.t | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/dist/threads/t/join.t b/dist/threads/t/join.t
---- a/dist/threads/t/join.t
-+++ b/dist/threads/t/join.t
-@@ -118,7 +118,7 @@ if ($^O eq 'linux') {
- })->join;
- #print "# mainthread: \$0 = $0\n";
- #print "# pid = $$\n";
-- if (open PS, "ps -f |") { # Note: must work in (all) systems.
-+ if (open PS, "ps |") { # Note: must work in (all) systems.
- my ($sawpid, $sawexe);
- while (<PS>) {
- chomp;
-@@ -135,10 +135,10 @@ if ($^O eq 'linux') {
- if ($sawpid) {
- ok($sawpid && $sawexe, 'altering $0 is effective');
- } else {
-- skip("\$0 check: did not see pid $$ in 'ps -f |'");
-+ skip("\$0 check: did not see pid $$ in 'ps |'");
- }
- } else {
-- skip("\$0 check: opening 'ps -f |' failed: $!");
-+ skip("\$0 check: opening 'ps |' failed: $!");
- }
- } else {
- skip("\$0 check: only on Linux");
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/perl/perl/test/ext-DynaLoader-t-DynaLoader.t-fix-calling-dl_findfil.patch b/meta/recipes-devtools/perl/perl/test/ext-DynaLoader-t-DynaLoader.t-fix-calling-dl_findfil.patch
deleted file mode 100644
index ce577fe5f8..0000000000
--- a/meta/recipes-devtools/perl/perl/test/ext-DynaLoader-t-DynaLoader.t-fix-calling-dl_findfil.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-ext/DynaLoader/t/DynaLoader.t: fix calling dl_findfile() failed
-
-Use '$Config{libc}' as the libc file name
-
-Upstream-Status: Inappropriate
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- ext/DynaLoader/t/DynaLoader.t | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ext/DynaLoader/t/DynaLoader.t b/ext/DynaLoader/t/DynaLoader.t
-index ade1f8e..3567afe 100644
---- a/ext/DynaLoader/t/DynaLoader.t
-+++ b/ext/DynaLoader/t/DynaLoader.t
-@@ -106,7 +106,7 @@ ok( defined $dlerr, "dl_error() returning an error message: '$dlerr'" );
- # ... dl_findfile()
- SKIP: {
- my @files = ();
-- eval { @files = DynaLoader::dl_findfile("c") };
-+ eval { @files = DynaLoader::dl_findfile($Config{libc}) };
- is( $@, '', "calling dl_findfile()" );
- # Some platforms are known to not have a "libc"
- # (not at least by that name) that the dl_findfile()
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/perl/perl_5.22.1.bb b/meta/recipes-devtools/perl/perl_5.22.1.bb
deleted file mode 100644
index 792a65b5b2..0000000000
--- a/meta/recipes-devtools/perl/perl_5.22.1.bb
+++ /dev/null
@@ -1,375 +0,0 @@
-require perl.inc
-
-# We need gnugrep (for -I)
-DEPENDS = "virtual/db grep-native"
-DEPENDS += "gdbm zlib"
-
-# Pick up patches from debian
-# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz
-SRC_URI += " \
- file://debian/cpan_definstalldirs.diff \
- file://debian/db_file_ver.diff \
- file://debian/doc_info.diff \
- file://debian/enc2xs_inc.diff \
- file://debian/errno_ver.diff \
- file://debian/libperl_embed_doc.diff \
- file://debian/fixes/respect_umask.diff \
- file://debian/writable_site_dirs.diff \
- file://debian/extutils_set_libperl_path.diff \
- file://debian/no_packlist_perllocal.diff \
- file://debian/prefix_changes.diff \
- file://debian/instmodsh_doc.diff \
- file://debian/ld_run_path.diff \
- file://debian/libnet_config_path.diff \
- file://debian/mod_paths.diff \
- file://debian/prune_libs.diff \
- file://debian/fixes/net_smtp_docs.diff \
- file://debian/perlivp.diff \
- file://debian/squelch-locale-warnings.diff \
- file://debian/skip-upstream-git-tests.diff \
- file://debian/skip-kfreebsd-crash.diff \
- file://debian/fixes/document_makemaker_ccflags.diff \
- file://debian/find_html2text.diff \
- file://debian/perl5db-x-terminal-emulator.patch \
- file://debian/cpan-missing-site-dirs.diff \
- file://debian/fixes/memoize_storable_nstore.diff \
- file://debian/regen-skip.diff \
-"
-
-SRC_URI += " \
- file://Makefile.patch \
- file://Makefile.SH.patch \
- file://installperl.patch \
- file://perl-dynloader.patch \
- file://perl-moreconfig.patch \
- file://letgcc-find-errno.patch \
- file://generate-sh.patch \
- file://native-perlinc.patch \
- file://perl-enable-gdbm.patch \
- file://cross-generate_uudmap.patch \
- file://fix_bad_rpath.patch \
- file://perl-archlib-exp.patch \
- file://dynaloaderhack.patch \
- file://config.sh \
- file://config.sh-32 \
- file://config.sh-32-le \
- file://config.sh-32-be \
- file://config.sh-64 \
- file://config.sh-64-le \
- file://config.sh-64-be \
- file://make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch \
- file://t-run-switches.t-perl5-perl.patch \
- file://ext-ODBM_File-hints-linux.pl-link-libgdbm_compat.patch \
- file://ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch \
- file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
- file://perl-errno-generation-gcc5.patch \
- file://perl-fix-conflict-between-skip_all-and-END.patch \
- file://perl-test-customized.patch \
- file://perl-fix-CVE-2016-2381.patch \
- file://perl-fix-CVE-2016-6185.patch \
- file://perl-fix-CVE-2015-8607.patch \
- file://perl-fix-CVE-2016-1238.patch \
-"
-
-# Fix test case issues
-SRC_URI_append_class-target = " \
- file://test/dist-threads-t-join.t-adjust-ps-option.patch \
- file://test/ext-DynaLoader-t-DynaLoader.t-fix-calling-dl_findfil.patch \
- "
-
-SRC_URI[md5sum] = "6671e4829cbaf9cecafa9a84f141b0a3"
-SRC_URI[sha256sum] = "9e87317d693ce828095204be0d09af8d60b8785533fadea1a82b6f0e071e5c79"
-
-inherit perlnative siteinfo
-
-# Where to find the native perl
-HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
-
-# Where to find .so files - use the -native versions not those from the target build
-export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
-
-# Where to find perl @INC/#include files
-# - use the -native versions not those from the target build
-export PERL_LIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
-export PERL_ARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-# LDFLAGS for shared libraries
-export LDDLFLAGS = "${LDFLAGS} -shared"
-
-LDFLAGS_append = " -fstack-protector"
-
-# We're almost Debian, aren't we?
-CFLAGS += "-DDEBIAN"
-
-do_nolargefile() {
- sed -i -e "s,\(uselargefiles=\)'define',\1'undef',g" \
- -e "s,\(d_readdir64_r=\)'define',\1'undef',g" \
- -e "s,\(readdir64_r_proto=\)'\w+',\1'0',g" \
- -e "/ccflags_uselargefiles/d" \
- -e "s/-Duselargefiles//" \
- -e "s/-D_FILE_OFFSET_BITS=64//" \
- -e "s/-D_LARGEFILE_SOURCE//" \
- ${S}/Cross/config.sh-${TARGET_ARCH}-${TARGET_OS}
-}
-
-do_configure() {
- # Make hostperl in build directory be the native perl
- ln -sf ${HOSTPERL} hostperl
-
- if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
- if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a -e Makefile ]; then
- ${MAKE} clean
- fi
- find ${S} -name *.so -delete
- fi
- if [ -n "${CONFIGURESTAMPFILE}" ]; then
- echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
- fi
-
- # Do our work in the cross subdir
- cd Cross
-
- # Generate configuration
- rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
- for i in ${WORKDIR}/config.sh \
- ${WORKDIR}/config.sh-${SITEINFO_BITS} \
- ${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do
- cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
- done
-
- # Fixups for uclibc
- if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
- sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
- -e "s,\(d_futimes=\)'define',\1'undef',g" \
- -e "s,\(d_finitel=\)'define',\1'undef',g" \
- -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \
- -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
- -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
- -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
- -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
- -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
- -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
- -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
- -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
- -e "s,\(d_eaccess=\)'define',\1'undef',g" \
- -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
- -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
- -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
- -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
- -e "s,-fstack-protector,-fno-stack-protector,g" \
- config.sh-${TARGET_ARCH}-${TARGET_OS}
- fi
- # Fixups for musl
- if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" ]; then
- sed -i -e "s,\(d_libm_lib_version=\)'define',\1'undef',g" \
- -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
- -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
- -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
- -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
- -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
- -e "s,\(d_finitel=\)'define',\1'undef',g" \
- -e "s,\(getprotobyname_r=\)'define',\1'undef',g" \
- -e "s,\(getpwent_r=\)'define',\1'undef',g" \
- -e "s,\(getservent_r=\)'define',\1'undef',g" \
- -e "s,\(gethostent_r=\)'define',\1'undef',g" \
- -e "s,\(getnetent_r=\)'define',\1'undef',g" \
- -e "s,\(getnetbyaddr_r=\)'define',\1'undef',g" \
- -e "s,\(getprotoent_r=\)'define',\1'undef',g" \
- -e "s,\(getprotobynumber_r=\)'define',\1'undef',g" \
- -e "s,\(getgrent_r=\)'define',\1'undef',g" \
- -e "s,\(i_fcntl=\)'undef',\1'define',g" \
- -e "s,\(h_fcntl=\)'false',\1'true',g" \
- -e "s,-fstack-protector,-fno-stack-protector,g" \
- -e "s,-lnsl,,g" \
- config.sh-${TARGET_ARCH}-${TARGET_OS}
- fi
-
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)}
-
- # Update some paths in the configuration
- sed -i -e 's,@ARCH@-thread-multi,,g' \
- -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
- -e 's,@STAGINGDIR@,${STAGING_DIR_HOST},g' \
- -e "s,@INCLUDEDIR@,${STAGING_INCDIR},g" \
- -e "s,@LIBDIR@,${libdir},g" \
- -e "s,@BASELIBDIR@,${base_libdir},g" \
- -e "s,@EXECPREFIX@,${exec_prefix},g" \
- -e 's,@USRBIN@,${bindir},g' \
- config.sh-${TARGET_ARCH}-${TARGET_OS}
-
- case "${TARGET_ARCH}" in
- x86_64 | powerpc | s390)
- sed -i -e "s,\(need_va_copy=\)'undef',\1'define',g" \
- config.sh-${TARGET_ARCH}-${TARGET_OS}
- ;;
- arm)
- sed -i -e "s,\(d_u32align=\)'undef',\1'define',g" \
- config.sh-${TARGET_ARCH}-${TARGET_OS}
- ;;
- esac
- # These are strewn all over the source tree
- for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do
- echo Fixing: $foo
- sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo
- done
-
- rm -f config
- echo "ARCH = ${TARGET_ARCH}" > config
- echo "OS = ${TARGET_OS}" >> config
-}
-
-do_compile() {
- # Fix to avoid recursive substitution of path
- sed -i -e 's|(@libpath, ".*"|(@libpath, "${STAGING_LIBDIR}"|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-
- cd Cross
- oe_runmake perl LD="${CCLD}"
-}
-
-do_install() {
- #export hostperl="${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
- oe_runmake install DESTDIR=${D}
- # Add perl pointing at current version
- ln -sf perl${PV} ${D}${bindir}/perl
-
- ln -sf perl ${D}/${libdir}/perl5
-
- # Remove unwanted file and empty directories
- rm -f ${D}/${libdir}/perl/${PV}/.packlist
- rmdir ${D}/${libdir}/perl/site_perl/${PV}
- rmdir ${D}/${libdir}/perl/site_perl
-
- # Fix up shared library
- mv ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
- ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
- ln -sf ../../../libperl.so.${PV} ${D}/${libdir}/perl/${PV}/CORE/libperl.so
-
- # target config, used by cpan.bbclass to extract version information
- install config.sh ${D}${libdir}/perl
-
- ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
-}
-
-do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/perl \
- PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
-}
-
-PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
-
-perl_package_preprocess () {
- # Fix up installed configuration
- sed -i -e "s,${D},,g" \
- -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
- -e "s,-isystem${STAGING_INCDIR} ,,g" \
- -e "s,${STAGING_LIBDIR},${libdir},g" \
- -e "s,${STAGING_BINDIR},${bindir},g" \
- -e "s,${STAGING_INCDIR},${includedir},g" \
- -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
- -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
- -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
- ${PKGD}${bindir}/h2xs \
- ${PKGD}${bindir}/h2ph \
- ${PKGD}${bindir}/pod2man \
- ${PKGD}${bindir}/pod2text \
- ${PKGD}${bindir}/pod2usage \
- ${PKGD}${bindir}/podchecker \
- ${PKGD}${bindir}/podselect \
- ${PKGD}${libdir}/perl/${PV}/CORE/config.h \
- ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
- ${PKGD}${libdir}/perl/${PV}/CORE/pp.h \
- ${PKGD}${libdir}/perl/${PV}/Config.pm \
- ${PKGD}${libdir}/perl/${PV}/Config.pod \
- ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
- ${PKGD}${libdir}/perl/${PV}/ExtUtils/Liblist/Kid.pm \
- ${PKGD}${libdir}/perl/${PV}/FileCache.pm \
- ${PKGD}${libdir}/perl/${PV}/pod/*.pod \
- ${PKGD}${libdir}/perl/config.sh
-}
-
-PACKAGES = "perl-dbg perl perl-misc perl-dev perl-pod perl-doc perl-lib \
- perl-module-cpan perl-module-cpanplus perl-module-unicore"
-FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV} \
- ${libdir}/perl/${PV}/Config.pm \
- ${libdir}/perl/${PV}/strict.pm \
- ${libdir}/perl/${PV}/warnings.pm \
- ${libdir}/perl/${PV}/warnings \
- ${libdir}/perl/${PV}/vars.pm \
- "
-FILES_${PN}_append_class-nativesdk = " ${bindir}/perl.real"
-RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
- perl-module-warnings-register"
-FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
-FILES_${PN}-lib = "${libdir}/libperl.so* \
- ${libdir}/perl5 \
- ${libdir}/perl/config.sh \
- ${libdir}/perl/${PV}/Config_heavy.pl \
- ${libdir}/perl/${PV}/Config_heavy-target.pl"
-FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
- ${libdir}/perl/${PV}/*.pod \
- ${libdir}/perl/${PV}/*/*.pod \
- ${libdir}/perl/${PV}/*/*/*.pod "
-FILES_perl-misc = "${bindir}/*"
-FILES_${PN}-doc = "${libdir}/perl/${PV}/*/*.txt \
- ${libdir}/perl/${PV}/*/*/*.txt \
- ${libdir}/perl/${PV}/auto/XS/Typemap \
- ${libdir}/perl/${PV}/B/assemble \
- ${libdir}/perl/${PV}/B/cc_harness \
- ${libdir}/perl/${PV}/B/disassemble \
- ${libdir}/perl/${PV}/B/makeliblinks \
- ${libdir}/perl/${PV}/CGI/eg \
- ${libdir}/perl/${PV}/CPAN/PAUSE2003.pub \
- ${libdir}/perl/${PV}/CPAN/SIGNATURE \
- ${libdir}/perl/${PV}/CPANPLUS/Shell/Default/Plugins/HOWTO.pod \
- ${libdir}/perl/${PV}/Encode/encode.h \
- ${libdir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
- ${libdir}/perl/${PV}/ExtUtils/NOTES \
- ${libdir}/perl/${PV}/ExtUtils/PATCHING \
- ${libdir}/perl/${PV}/ExtUtils/typemap \
- ${libdir}/perl/${PV}/ExtUtils/xsubpp \
- ${libdir}/perl/${PV}/ExtUtils/Changes_EU-Install \
- ${libdir}/perl/${PV}/Net/*.eg \
- ${libdir}/perl/${PV}/unicore/mktables \
- ${libdir}/perl/${PV}/unicore/mktables.lst \
- ${libdir}/perl/${PV}/unicore/version "
-
-FILES_perl-module-cpan += "${libdir}/perl/${PV}/CPAN \
- ${libdir}/perl/${PV}/CPAN.pm"
-FILES_perl-module-cpanplus += "${libdir}/perl/${PV}/CPANPLUS \
- ${libdir}/perl/${PV}/CPANPLUS.pm"
-FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore"
-
-# Create a perl-modules package recommending all the other perl
-# packages (actually the non modules packages and not created too)
-ALLOW_EMPTY_perl-modules = "1"
-PACKAGES_append = " perl-modules "
-
-PACKAGESPLITFUNCS_prepend = "split_perl_packages "
-
-python split_perl_packages () {
- libdir = d.expand('${libdir}/perl/${PV}')
- do_split_packages(d, libdir, 'auto/([^.]*)/[^/]*\.(so|ld|ix|al)', 'perl-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
- do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
- do_split_packages(d, libdir, 'Module/([^\/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
- do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
-
- # perl-modules should recommend every perl module, and only the
- # modules. Don't attempt to use the result of do_split_packages() as some
- # modules are manually split (eg. perl-module-unicore).
- packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES', True).split())
- d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
-}
-
-PACKAGES_DYNAMIC += "^perl-module-.*"
-PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*"
-
-RPROVIDES_perl-lib = "perl-lib"
-
-require perl-rdepends_${PV}.inc
-require perl-ptest.inc
-
-SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/perl/perl_5.30.1.bb b/meta/recipes-devtools/perl/perl_5.30.1.bb
new file mode 100644
index 0000000000..9b1f1af072
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl_5.30.1.bb
@@ -0,0 +1,336 @@
+SUMMARY = "Perl scripting language"
+HOMEPAGE = "http://www.perl.org/"
+SECTION = "devel"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
+ file://Artistic;md5=71a4d5d9acc18c0952a6df2218bb68da \
+ "
+
+
+SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
+ https://github.com/arsv/perl-cross/releases/download/1.3.1/perl-cross-1.3.1.tar.gz;name=perl-cross \
+ file://perl-rdepends.txt \
+ file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \
+ file://0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch \
+ file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
+ file://errno_ver.diff \
+ file://native-perlinc.patch \
+ file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
+ file://perl-dynloader.patch \
+ file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
+ file://0001-enc2xs-Add-environment-variable-to-suppress-comments.patch \
+ file://0002-Constant-Fix-up-shebang.patch \
+ "
+SRC_URI_append_class-native = " \
+ file://perl-configpm-switch.patch \
+"
+
+SRC_URI[perl.md5sum] = "6438eb7b8db9bbde28e01086de376a46"
+SRC_URI[perl.sha256sum] = "bf3d25571ff1ee94186177c2cdef87867fd6a14aa5a84f0b1fb7bf798f42f964"
+SRC_URI[perl-cross.md5sum] = "1e463b105cfa56d251a86979af23e3a7"
+SRC_URI[perl-cross.sha256sum] = "edce0b0c2f725e2db3f203d6d8e9f3f7161256f5d1590551e40694f21200141d"
+
+S = "${WORKDIR}/perl-${PV}"
+
+inherit upstream-version-is-even
+
+DEPENDS += "zlib virtual/crypt"
+
+PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
+
+PACKAGECONFIG ??= "bdb gdbm"
+PACKAGECONFIG[bdb] = ",-Ui_db,db"
+PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
+
+# Don't generate comments in enc2xs output files. They are not reproducible
+export ENC2XS_NO_COMMENTS = "1"
+
+do_unpack_append() {
+ bb.build.exec_func('do_copy_perlcross', d)
+}
+
+do_copy_perlcross() {
+ cp -rfp ${WORKDIR}/perl-cross*/* ${S}
+}
+
+do_configure_class-target() {
+ ./configure --prefix=${prefix} --libdir=${libdir} \
+ --target=${TARGET_SYS} \
+ -Duseshrplib \
+ -Dsoname=libperl.so.5 \
+ -Dvendorprefix=${prefix} \
+ -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
+ ${PACKAGECONFIG_CONFARGS}
+
+ #perl.c uses an ARCHLIB_EXP define to generate compile-time code that
+ #adds the archlibexp path to @INC during run-time initialization of a
+ #new perl interpreter.
+
+ #Because we've changed this value in a temporary way to make it
+ #possible to use ExtUtils::Embed in the target build (the temporary
+ #value in config.sh gets re-stripped out during packaging), the
+ #ARCHLIB_EXP value that gets generated still uses the temporary version
+ #instead of the original expected version (i.e. becauses it's in the
+ #generated config.h, it doesn't get stripped out during packaging like
+ #the others in config.sh).
+
+ sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
+}
+
+do_configure_class-nativesdk() {
+ ./configure --prefix=${prefix} \
+ --target=${TARGET_SYS} \
+ -Duseshrplib \
+ -Dsoname=libperl.so.5 \
+ -Dvendorprefix=${prefix} \
+ -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
+ ${PACKAGECONFIG_CONFARGS}
+
+ # See the comment above
+ sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
+}
+
+do_configure_class-native() {
+ ./configure --prefix=${prefix} \
+ -Dbin=${bindir}/perl-native \
+ -Duseshrplib \
+ -Dsoname=libperl.so.5 \
+ -Dvendorprefix=${prefix} \
+ -Ui_xlocale \
+ ${PACKAGECONFIG_CONFARGS}
+}
+
+do_configure_append() {
+ if [ -n "$SOURCE_DATE_EPOCH" ]; then
+ PERL_BUILD_DATE="$(${PYTHON} -c "\
+from datetime import datetime, timezone; \
+print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \
+ ")"
+ echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h
+ fi
+}
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+
+ install -d ${D}${libdir}/perl5
+ install -d ${D}${libdir}/perl5/${PV}/
+ install -d ${D}${libdir}/perl5/${PV}/ExtUtils/
+
+ # Save native config
+ install config.sh ${D}${libdir}/perl5
+ install lib/Config.pm ${D}${libdir}/perl5/${PV}/
+ install lib/ExtUtils/typemap ${D}${libdir}/perl5/${PV}/ExtUtils/
+
+ # Fix up shared library
+ rm ${D}/${libdir}/perl5/${PV}/*/CORE/libperl.so
+ ln -sf ../../../../libperl.so.${PERL_LIB_VER} $(echo ${D}/${libdir}/perl5/${PV}/*/CORE)/libperl.so
+}
+
+do_install_append_class-target() {
+ # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
+ ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
+
+}
+
+do_install_append_class-nativesdk() {
+ # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
+ ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
+
+ create_wrapper ${D}${bindir}/perl \
+ PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl5/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl5/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl5/${PV}'
+}
+
+do_install_append_class-native () {
+ # Those wrappers mean that perl installed from sstate (which may change
+ # path location) works and that in the nativesdk case, the SDK can be
+ # installed to a different location from the one it was built for.
+ create_wrapper ${D}${bindir}/perl-native/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl5/site_perl/${PV}:${STAGING_LIBDIR}/perl5/vendor_perl/${PV}:${STAGING_LIBDIR}/perl5/${PV}'
+
+ # Use /usr/bin/env nativeperl for the perl script.
+ for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
+ sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
+ done
+}
+
+PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
+
+perl_package_preprocess () {
+ # Fix up installed configuration
+ sed -i -e "s,${D},,g" \
+ -e "s,${DEBUG_PREFIX_MAP},,g" \
+ -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
+ -e "s,-isystem${STAGING_INCDIR} ,,g" \
+ -e "s,${STAGING_LIBDIR},${libdir},g" \
+ -e "s,${STAGING_BINDIR},${bindir},g" \
+ -e "s,${STAGING_INCDIR},${includedir},g" \
+ -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
+ -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
+ -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ ${PKGD}${bindir}/h2xs \
+ ${PKGD}${bindir}/h2ph \
+ ${PKGD}${bindir}/pod2man \
+ ${PKGD}${bindir}/pod2text \
+ ${PKGD}${bindir}/pod2usage \
+ ${PKGD}${bindir}/podchecker \
+ ${PKGD}${bindir}/podselect \
+ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \
+ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \
+ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \
+ ${PKGD}${libdir}/perl5/${PV}/Config.pm \
+ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
+ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
+ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
+ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
+ ${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
+ ${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
+ ${PKGD}${libdir}/perl5/${PV}/pod/*.pod \
+ ${PKGD}${libdir}/perl5/config.sh
+}
+
+require perl-ptest.inc
+
+FILES_${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
+ ${libdir}/perl5/site_perl \
+ ${libdir}/perl5/${PV}/Config.pm \
+ ${libdir}/perl5/${PV}/*/Config_git.pl \
+ ${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
+ ${libdir}/perl5/config.sh \
+ ${libdir}/perl5/${PV}/strict.pm \
+ ${libdir}/perl5/${PV}/warnings.pm \
+ ${libdir}/perl5/${PV}/warnings \
+ ${libdir}/perl5/${PV}/vars.pm \
+ ${libdir}/perl5/site_perl \
+ "
+RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
+ perl-module-warnings-register"
+
+FILES_${PN}-staticdev_append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a"
+
+FILES_${PN}-dev_append = " ${libdir}/perl5/${PV}/*/CORE"
+
+FILES_${PN}-doc_append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \
+ ${libdir}/perl5/${PV}/*/.packlist \
+ ${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \
+ ${libdir}/perl5/${PV}/ExtUtils/xsubpp \
+ ${libdir}/perl5/${PV}/ExtUtils/typemap \
+ ${libdir}/perl5/${PV}/Encode/encode.h \
+ "
+PACKAGES += "${PN}-misc"
+
+FILES_${PN}-misc = "${bindir}/*"
+
+PACKAGES += "${PN}-pod"
+
+FILES_${PN}-pod = "${libdir}/perl5/${PV}/pod \
+ ${libdir}/perl5/${PV}/*.pod \
+ ${libdir}/perl5/${PV}/*/*.pod \
+ ${libdir}/perl5/${PV}/*/*/*.pod \
+ ${libdir}/perl5/${PV}/*/*/*/*.pod \
+ "
+
+PACKAGES += "${PN}-module-cpan ${PN}-module-unicore"
+
+FILES_${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
+ "
+FILES_${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
+
+# Create a perl-modules package recommending all the other perl
+# packages (actually the non modules packages and not created too)
+ALLOW_EMPTY_${PN}-modules = "1"
+PACKAGES += "${PN}-modules "
+
+PACKAGESPLITFUNCS_prepend = "split_perl_packages "
+
+python split_perl_packages () {
+ libdir = d.expand('${libdir}/perl5/${PV}')
+ do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+
+ # perl-modules should recommend every perl module, and only the
+ # modules. Don't attempt to use the result of do_split_packages() as some
+ # modules are manually split (eg. perl-module-unicore).
+ packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split())
+ d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
+
+ # Read the pre-generated dependency file, and use it to set module dependecies
+ for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
+ splitline = line.split()
+ if bb.data.inherits_class('native', d):
+ module = splitline[0] + '-native'
+ depends = "perl-native"
+ else:
+ module = splitline[0].replace("RDEPENDS_perl", "RDEPENDS_${PN}")
+ depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
+ d.appendVar(d.expand(module), " " + depends)
+}
+
+python() {
+ if d.getVar('CLASSOVERRIDE') == "class-target":
+ d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*(?<!native)$")
+ elif d.getVar('CLASSOVERRIDE') == "class-native":
+ d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
+ elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
+ d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
+}
+
+RDEPENDS_${PN}-misc += "perl perl-modules"
+RDEPENDS_${PN}-pod += "perl"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
+
+do_create_rdepends_inc() {
+ cd ${WORKDIR}
+ cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc
+
+# Some additional dependencies that the above doesn't manage to figure out
+RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
+RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes"
+RDEPENDS_${PN}-module-overload += "${PN}-module-overloading"
+
+# Generated depends list beyond this line
+EOPREAMBLE
+ test -e packages-split.new && rm -rf packages-split.new
+ cp -r packages-split packages-split.new && cd packages-split.new
+ find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
+ egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \
+ sed "s/\/.*\.pm: */ += /g;s/[\"\']//g;s/;.*/\"/g;s/+= .*\(require\|use\)\> */+= \"perl-module-/g;s/CPANPLUS::.*/cpanplus/g;s/CPAN::.*/cpan/g;s/::/-/g;s/ [^+\"].*//g;s/_/-/g;s/\.pl\"$/\"/;s/\"\?\$/\"/;s/(//;" | tr [:upper:] [:lower:] | \
+ awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \
+ grep -v -e "\-vms\-" -e module-5 -e "^$" -e "\\$" -e your -e tk -e autoperl -e html -e http -e parse-cpan -e perl-ostype -e ndbm-file -e module-mac -e fcgi -e lwp -e dbd -e dbix | \
+ sort -u | \
+ sed 's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \
+ egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-socket-inet6|module-io-socket-ssl|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-test2|module-text-unidecode|module-unicore|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' | \
+ egrep -wv '=>|module-algorithm-diff|module-carp|module-c<extutils-mm-unix>|module-encode-hanextra|module-extutils-makemaker-version-regex|module-file-spec|module-io-compress-lzma|module-locale-maketext-lexicon|module-log-agent|module-meta-notation|module-net-localcfg|module-net-ping-external|module-b-deparse|module-scalar-util|module-some-module|module-symbol|module-uri|module-win32api-file' >> ${WORKDIR}/perl-rdepends.generated
+ cp ${WORKDIR}/perl-rdepends.generated ${THISDIR}/files/perl-rdepends.txt
+}
+
+# bitbake perl -c create_rdepends_inc
+addtask do_create_rdepends_inc
+
+SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
+
+perl_sysroot_create_wrapper () {
+ mkdir -p ${SYSROOT_DESTDIR}${bindir}
+ # Create a wrapper that /usr/bin/env perl will use to get perl-native.
+ # This MUST live in the normal bindir.
+ cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF
+#!/bin/sh
+realpath=\`readlink -fn \$0\`
+exec \`dirname \$realpath\`/perl-native/perl "\$@"
+EOF
+ chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl
+ cat ${SYSROOT_DESTDIR}${bindir}/nativeperl
+}
+
diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in
new file mode 100644
index 0000000000..4fc9b0a4a7
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Orignal pkg-config-native action when called as pkg-config-native
+# NO Change here
+if [ "pkg-config-native" = "`basename $0`" ] ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+else
+ # in this case check if we are in the esdk
+ if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then
+ parentpid=`ps -o ppid= -p $$`
+ parentpid_info=`ps -wo comm= -o args= -p $parentpid`
+
+ # check if we are being called from the kernel's make menuconfig
+ if ( echo $parentpid_info | grep -q check-lxdialog ) ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+ fi
+ fi
+fi
+
+pkg-config.real "$@"
diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in
new file mode 100644
index 0000000000..9ed30a0d80
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+PKG_CONFIG_PATH="@PATH_NATIVE@"
+unset PKG_CONFIG_SYSROOT_DIR
+
+pkg-config "$@"
diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper
new file mode 100755
index 0000000000..695f349566
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper
@@ -0,0 +1,16 @@
+#!/bin/sh
+# pkgconf wrapper to deal with pkg-config/pkgconf compatibility issues
+#
+# Copyright (C) 2015 Christopher Larson <chris_larson@mentor.com>
+# License: MIT (see COPYING.MIT at the root of the repository for terms)
+
+for arg; do
+ case "$arg" in
+ --variable|--variable=*)
+ # pkg-config doesn't sysroot-prefix user variables
+ unset PKG_CONFIG_SYSROOT_DIR
+ ;;
+ esac
+done
+
+exec pkgconf "$@"
diff --git a/meta/recipes-devtools/pkgconf/pkgconf_1.6.3.bb b/meta/recipes-devtools/pkgconf/pkgconf_1.6.3.bb
new file mode 100644
index 0000000000..94bc112b9f
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf_1.6.3.bb
@@ -0,0 +1,69 @@
+SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
+DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
+flags for development frameworks. It is similar to pkg-config from \
+freedesktop.org, providing additional functionality while also maintaining \
+compatibility."
+HOMEPAGE = "http://pkgconf.org"
+BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
+SECTION = "devel"
+PROVIDES += "pkgconfig"
+RPROVIDES_${PN} += "pkgconfig"
+DEFAULT_PREFERENCE = "-1"
+
+# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
+# ISC, but has different wording, so needs its own name.
+LICENSE = "pkgconf"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0"
+
+SRC_URI = "\
+ https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
+ file://pkg-config-wrapper \
+ file://pkg-config-native.in \
+ file://pkg-config-esdk.in \
+"
+SRC_URI[md5sum] = "f93fb1be95a5cb62e43c219c82b5791a"
+SRC_URI[sha256sum] = "61f0b31b0d5ea0e862b454a80c170f57bad47879c0c42bd8de89200ff62ea210"
+
+inherit autotools
+
+EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
+
+do_install_append () {
+ # Install a wrapper which deals, as much as possible with pkgconf vs
+ # pkg-config compatibility issues.
+ install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
+}
+
+do_install_append_class-native () {
+ # Install a pkg-config-native wrapper that will use the native sysroot instead
+ # of the MACHINE sysroot, for using pkg-config when building native tools.
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
+ install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+ < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
+ install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
+}
+
+# When using the RPM generated automatic package dependencies, some packages
+# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
+# specifying an appropriate provide.
+RPROVIDES_${PN} += "pkgconfig(pkg-config)"
+
+# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
+FILES_${PN}-dev_remove = "${datadir}/aclocal"
+FILES_${PN} += "${datadir}/aclocal"
+
+BBCLASSEXTEND += "native nativesdk"
+
+pkgconf_sstate_fixup_esdk () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
+ pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
+ mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
+ lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+ sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
+ fi
+}
+
+SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch b/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch
deleted file mode 100644
index 14c8293a5e..0000000000
--- a/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 946d36266d8a30f04fe34d3183bf4929141934d2 Mon Sep 17 00:00:00 2001
-From: coypu <coypu@sdf.org>
-Date: Wed, 2 Mar 2016 19:38:48 +0200
-Subject: [PATCH] gdate: Move warning pragma outside of function
-
-Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on
-older versions of GCC, which don't allow pragma inside functions.
-
-https://bugzilla.gnome.org/761550
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- glib/glib/gdate.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/glib/glib/gdate.c b/glib/glib/gdate.c
-index 1978cf7..20e6c4a 100644
---- a/glib/glib/gdate.c
-+++ b/glib/glib/gdate.c
-@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
- *
- * Returns: number of characters written to the buffer, or 0 the buffer was too small
- */
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
-+
- gsize
- g_date_strftime (gchar *s,
- gsize slen,
-@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
- return retval;
- #endif
- }
-+
-+#pragma GCC diagnostic pop
---
-1.9.1
-
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
new file mode 100644
index 0000000000..4fc9b0a4a7
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Orignal pkg-config-native action when called as pkg-config-native
+# NO Change here
+if [ "pkg-config-native" = "`basename $0`" ] ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+else
+ # in this case check if we are in the esdk
+ if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then
+ parentpid=`ps -o ppid= -p $$`
+ parentpid_info=`ps -wo comm= -o args= -p $parentpid`
+
+ # check if we are being called from the kernel's make menuconfig
+ if ( echo $parentpid_info | grep -q check-lxdialog ) ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+ fi
+ fi
+fi
+
+pkg-config.real "$@"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in
index 5e44bb435c..a9324de4cf 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in
@@ -1,7 +1,7 @@
#! /bin/sh
-PKG_CONFIG_PATH="@PATH_NATIVE@"
-PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+export PKG_CONFIG_PATH="@PATH_NATIVE@"
+export PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
unset PKG_CONFIG_SYSROOT_DIR
pkg-config "$@"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index ff8254cfcd..52ef2a9779 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -8,17 +8,13 @@ SECTION = "console/utils"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "glib-2.0"
-DEPENDS_class-native = ""
-DEPENDS_class-nativesdk = ""
-
-SRCREV = "87152c05be88ca8be71a3a563f275b3686d32c28"
-PV = "0.29.1+git${SRCPV}"
+SRCREV = "edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b"
+PV = "0.29.2+git${SRCPV}"
SRC_URI = "git://anongit.freedesktop.org/pkg-config \
+ file://pkg-config-esdk.in \
file://pkg-config-native.in \
file://fix-glib-configure-libtool-usage.patch \
- file://0001-gdate-Move-warning-pragma-outside-of-function.patch \
file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
"
@@ -26,9 +22,16 @@ S = "${WORKDIR}/git"
inherit autotools
-EXTRA_OECONF = "--without-internal-glib"
-EXTRA_OECONF_class-native = "--with-internal-glib"
-EXTRA_OECONF_class-nativesdk = "--with-internal-glib"
+# Because of a faulty test, the current auto mode always evaluates to no,
+# so just continue that behaviour.
+#
+EXTRA_OECONF += "--disable-indirect-deps"
+
+PACKAGECONFIG ??= "glib"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[glib] = "--without-internal-glib,--with-internal-glib,glib-2.0 pkgconfig-native"
acpaths = "-I ."
@@ -52,4 +55,19 @@ do_install_append_class-native () {
-e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
< ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+ < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
+ install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
+}
+
+pkgconfig_sstate_fixup_esdk () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
+ pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
+ mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
+ lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+ sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
+ fi
}
+
+SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconfig_sstate_fixup_esdk"
diff --git a/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb b/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
deleted file mode 100644
index 7dc45c68f2..0000000000
--- a/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Postinstall scriptlets"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-FILES_${PN}_append = " ${datadir}/postinst-intercepts/*"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-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/
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_icon_cache ${D}${datadir}/postinst-intercepts/
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
-}
-
-inherit nativesdk
-INHIBIT_DEFAULT_DEPS = "1"
diff --git a/meta/recipes-devtools/prelink/prelink/0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch b/meta/recipes-devtools/prelink/prelink/0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch
new file mode 100644
index 0000000000..b1688243af
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch
@@ -0,0 +1,51 @@
+From 2136969e3e196b9cf7f4788340efa4b1d9b39565 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 11 Oct 2018 10:05:52 +0800
+Subject: [PATCH] src/arch-mips.c: check info->resolvetls before use its member
+
+The info->resolvetls might be NULL according to src/prelink.c:
+[snip]
+ /* Dynamic linker does not depend on any other library,
+ all symbols resolve to themselves with the exception
+ of SHN_UNDEF symbols which resolve to 0. */
+if (info->symtab[r_sym].st_shndx == SHN_UNDEF)
+ {
+ info->resolveent = NULL;
+ info->resolvetls = NULL;
+[snip]
+
+So we must check it before use its members, otherwise, there might be
+Segmentation fault error.
+
+Fixed:
+MACHINE = "qemumips"
+IMAGE_INSTALL_append = " qemu"
+$ bitbake core-image-minimal
+[snip]
+| /path/to/qemumips-poky-linux/core-image-minimal/1.0-r0/temp/run.prelink_image.1000: line 111: 1010 Segmentation fault (core dumped)
+[snip]
+
+Upstream-Status: Submitted [https://lists.yoctoproject.org/pipermail/yocto/2018-October/042812.html]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ src/arch-mips.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/arch-mips.c b/src/arch-mips.c
+index ccb1834..02c608f 100644
+--- a/src/arch-mips.c
++++ b/src/arch-mips.c
+@@ -567,7 +567,8 @@ mips_prelink_reloc (struct prelink_info *info, GElf_Addr r_offset,
+ if (dso->ehdr.e_type == ET_EXEC)
+ {
+ value = info->resolve (info, r_sym, r_type);
+- value += info->resolvetls->offset - TLS_TP_OFFSET;
++ if (info->resolvetls != NULL)
++ value += info->resolvetls->offset - TLS_TP_OFFSET;
+ if (r_type == R_MIPS_TLS_TPREL32)
+ mips_prelink_32bit_reloc (dso, rela, value);
+ else
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 0856b1c667..f0946de2cc 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -3,12 +3,13 @@ SECTION = "devel"
# Would need transfig-native for documentation if it wasn't disabled
DEPENDS = "elfutils binutils"
SUMMARY = "An ELF prelinking utility"
+HOMEPAGE = "http://git.yoctoproject.org/cgit.cgi/prelink-cross/about/"
DESCRIPTION = "The prelink package contains a utility which modifies ELF shared libraries \
and executables, so that far fewer relocations need to be resolved at \
runtime and thus programs come up faster."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
-SRCREV = "ef20628dd78b92e1a3123afc67b64cf010bdd9e4"
+SRCREV = "a853a5d715d84eec93aa68e8f2df26b7d860f5b2"
PV = "1.0+git${SRCPV}"
#
@@ -26,11 +27,17 @@ FILES_${PN}-cron = "${sysconfdir}/cron.daily ${sysconfdir}/default"
PACKAGES =+ "${PN}-cron"
-SRC_URI = "git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink \
+SRC_URI = "git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink_staging \
file://prelink.conf \
file://prelink.cron.daily \
file://prelink.default \
- file://macros.prelink"
+ file://macros.prelink \
+ file://0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch \
+"
+UPSTREAM_CHECK_COMMITS = "1"
+
+# error: error.h: No such file or directory
+COMPATIBLE_HOST_libc-musl = 'null'
TARGET_OS_ORIG := "${TARGET_OS}"
OVERRIDES_append = ":${TARGET_OS_ORIG}"
@@ -132,7 +139,7 @@ python do_linkerpaths () {
}
python () {
- overrides = d.getVar("OVERRIDES", True).split(":")
+ overrides = d.getVar("OVERRIDES").split(":")
if "class-target" in overrides:
bb.build.addtask('do_linkerpaths', 'do_configure', 'do_patch', d)
}
@@ -150,13 +157,15 @@ do_install_append () {
install -m 0644 ${WORKDIR}/macros.prelink ${D}${sysconfdir}/rpm/macros.prelink
}
-# If we're using image-prelink, we want to skip this on the host side
-# but still do it if the package is installed on the target...
+# If we ae doing a cross install, we want to avoid prelinking.
+# Prelinking during a cross install should be handled by the image-prelink
+# bbclass. If the user desires this to run on the target at first boot
+# they will need to create a custom boot script.
pkg_postinst_prelink() {
#!/bin/sh
if [ "x$D" != "x" ]; then
- ${@bb.utils.contains('USER_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)}
+ exit 0
fi
prelink -a
diff --git a/meta/recipes-devtools/pseudo/files/0001-Add-statx.patch b/meta/recipes-devtools/pseudo/files/0001-Add-statx.patch
new file mode 100644
index 0000000000..f01e699de7
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/0001-Add-statx.patch
@@ -0,0 +1,106 @@
+From 4e41a05de1f34ba00a68ca4f20fb49c4d1cbd2d0 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Wed, 6 Nov 2019 12:17:46 +0000
+Subject: [PATCH] Add statx glibc/syscall support
+
+Modern distros (e.g. fedora30) are starting to use the new statx() syscall through
+the newly exposed glibc wrapper function in software like coreutils (e.g. the ls
+command). Add support to intercept this to pseudo.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Submitted [Emailed to seebs]
+---
+ ports/linux/guts/statx.c | 48 ++++++++++++++++++++++++++++++++++++++++
+ ports/linux/portdefs.h | 1 +
+ ports/linux/wrapfuncs.in | 1 +
+ 3 files changed, 50 insertions(+)
+ create mode 100644 ports/linux/guts/statx.c
+
+diff --git a/ports/linux/statx/guts/statx.c b/ports/linux/statx/guts/statx.c
+new file mode 100644
+index 0000000..a3259c4
+--- /dev/null
++++ b/ports/linux/statx/guts/statx.c
+@@ -0,0 +1,42 @@
++/*
++ * Copyright (c) 2019 Linux Foundation
++ * Author: Richard Purdie
++ *
++ * SPDX-License-Identifier: LGPL-2.1-only
++ *
++ * int
++ * statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf) {
++ * int rc = -1;
++ */
++ pseudo_msg_t *msg;
++ PSEUDO_STATBUF buf;
++ int save_errno;
++
++ rc = real_statx(dirfd, pathname, flags, mask, statxbuf);
++ save_errno = errno;
++ if (rc == -1) {
++ return rc;
++ }
++
++ buf.st_uid = statxbuf->stx_uid;
++ buf.st_gid = statxbuf->stx_gid;
++ buf.st_dev = makedev(statxbuf->stx_dev_major, statxbuf->stx_dev_minor);
++ buf.st_ino = statxbuf->stx_ino;
++ buf.st_mode = statxbuf->stx_mode;
++ buf.st_rdev = makedev(statxbuf->stx_rdev_major, statxbuf->stx_rdev_minor);
++ buf.st_nlink = statxbuf->stx_nlink;
++ msg = pseudo_client_op(OP_STAT, 0, -1, dirfd, pathname, &buf);
++ if (msg && msg->result == RESULT_SUCCEED) {
++ pseudo_debug(PDBGF_FILE, "statx(path %s), flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid);
++ statxbuf->stx_uid = msg->uid;
++ statxbuf->stx_gid = msg->gid;
++ statxbuf->stx_mode = msg->mode;
++ statxbuf->stx_rdev_major = major(msg->rdev);
++ statxbuf->stx_rdev_minor = minor(msg->rdev);
++ } else {
++ pseudo_debug(PDBGF_FILE, "statx(path %s) failed, flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid);
++ }
++ errno = save_errno;
++/* return rc;
++ * }
++ */
+diff --git a/ports/linux/statx/portdefs.h b/ports/linux/statx/portdefs.h
+new file mode 100644
+index 0000000..bf934dc
+--- /dev/null
++++ b/ports/linux/statx/portdefs.h
+@@ -0,0 +1,6 @@
++/*
++ * SPDX-License-Identifier: LGPL-2.1-only
++ *
++ */
++#include <sys/stat.h>
++#include <sys/sysmacros.h>
+diff --git a/ports/linux/statx/wrapfuncs.in b/ports/linux/statx/wrapfuncs.in
+new file mode 100644
+index 0000000..c9cd4c3
+--- /dev/null
++++ b/ports/linux/statx/wrapfuncs.in
+@@ -0,0 +1 @@
++int statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf);
+diff --git a/ports/linux/subports b/ports/linux/subports
+index a29044a..49081bf 100755
+--- a/ports/linux/subports
++++ b/ports/linux/subports
+@@ -54,3 +54,13 @@ else
+ fi
+ rm -f dummy.c dummy.o
+
++cat > dummy.c <<EOF
++#define _GNU_SOURCE
++#include <sys/stat.h>
++struct statx x;
++EOF
++if ${CC} -c -o dummy.o dummy.c >/dev/null 2>&1; then
++ echo "linux/statx"
++fi
++rm -f dummy.c dummy.o
++
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch b/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch
deleted file mode 100644
index 6c694ceb0d..0000000000
--- a/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae Mon Sep 17 00:00:00 2001
-From: Seebs <seebs@seebs.net>
-Date: Thu, 22 Sep 2016 14:35:04 -0500
-Subject: [PATCH] Don't send SIGUSR1 to init.
-
-If the parent exits due to child process being slow, getppid() will return
-1, and we'll send SIGUSR1 to init, which can break things like dumbinit
-which aren't adequately protected against non-root processes sending them
-signals.
-
-Signed-off-by: Seebs <seebs@seebs.net>
-
-Upstream-Status: Backport (commit befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae)
-
-[YOCTO #10324]
-
-This resolves an issue where a docker container running builds would die
-due to it's 'mini init' being signaled by pseudo.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
- pseudo_server.c | 11 ++++++++---
-
-diff --git a/pseudo_server.c b/pseudo_server.c
-index 65102dd..8731d20 100644
---- a/pseudo_server.c
-+++ b/pseudo_server.c
-@@ -358,9 +358,14 @@ pseudo_server_start(int daemonize) {
- signal(SIGTERM, quit_now);
- /* tell parent process to stop waiting */
- if (daemonize) {
-- pseudo_diag("Setup complete, sending SIGUSR1 to pid %d.\n",
-- getppid());
-- kill(getppid(), SIGUSR1);
-+ pid_t ppid = getppid();
-+ if (ppid == 1) {
-+ pseudo_diag("Setup complete, but parent is init, not sending SIGUSR1.\n");
-+ } else {
-+ pseudo_diag("Setup complete, sending SIGUSR1 to pid %d.\n",
-+ ppid);
-+ kill(ppid, SIGUSR1);
-+ }
- }
- pseudo_server_loop();
- return 0;
---
-2.5.5
-
diff --git a/meta/recipes-devtools/pseudo/files/0001-maketables-wrappers-use-Python-3.patch b/meta/recipes-devtools/pseudo/files/0001-maketables-wrappers-use-Python-3.patch
new file mode 100644
index 0000000000..b2dbdad278
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/0001-maketables-wrappers-use-Python-3.patch
@@ -0,0 +1,34 @@
+From dbd34b1b2af8fbf44a0d5c37abe3448405819823 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 28 Aug 2019 19:20:29 +0200
+Subject: [PATCH] maketables/wrappers: use Python 3
+
+Changelog indicates they should be compatible.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ maketables | 2 +-
+ makewrappers | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/maketables b/maketables
+index a211772..52285e2 100755
+--- a/maketables
++++ b/maketables
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # Copyright (c) 2008-2010, 2013 Wind River Systems, Inc.
+ #
+diff --git a/makewrappers b/makewrappers
+index e84607d..b34f7eb 100755
+--- a/makewrappers
++++ b/makewrappers
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # Copyright (c) 2008-2011,2013 Wind River Systems, Inc.
+ #
diff --git a/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch b/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch
new file mode 100644
index 0000000000..17829ef3ac
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch
@@ -0,0 +1,57 @@
+From 86c9a5610e3333ad6aaadb1ac1e8b5a2c948d119 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 25 Nov 2019 18:46:45 +0800
+Subject: [PATCH] realpath.c: Remove trailing slashes
+
+Linux system's realpath() remove trailing slashes, but pseudo's doesn't, need
+make them identical.
+
+E.g., the following code (rel.c) prints '/tmp' with system's realpath, but
+pseudo's realpath prints '/tmp/':
+
+ #include <stdio.h>
+ #include <limits.h>
+ #include <stdlib.h>
+
+ int main() {
+ char out[PATH_MAX];
+ printf("%s\n", realpath("/tmp/", out));
+ return 0;
+ }
+
+$ bitbake base-passwd -cdevshell # For pseudo env
+$ gcc rel.c
+$ ./a.out
+/tmp/ (but should be /tmp)
+
+This patch fixes the problem.
+
+Upstream-Status: Submitted [https://lists.yoctoproject.org/g/poky/message/11879]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ ports/unix/guts/realpath.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/ports/unix/guts/realpath.c b/ports/unix/guts/realpath.c
+--- a/ports/unix/guts/realpath.c
++++ b/ports/unix/guts/realpath.c
+@@ -14,7 +14,14 @@
+ errno = ENAMETOOLONG;
+ return NULL;
+ }
+- if ((len = strlen(rname)) >= pseudo_sys_path_max()) {
++ len = strlen(rname);
++ char *ep = rname + len - 1;
++ while (ep > rname && *ep == '/') {
++ --len;
++ *(ep--) = '\0';
++ }
++
++ if (len >= pseudo_sys_path_max()) {
+ errno = ENAMETOOLONG;
+ return NULL;
+ }
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/pseudo/files/Fix-xattr-performance.patch b/meta/recipes-devtools/pseudo/files/Fix-xattr-performance.patch
deleted file mode 100644
index 4e072e6c40..0000000000
--- a/meta/recipes-devtools/pseudo/files/Fix-xattr-performance.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 0d9071f3090bbd7880558f3b488b236ac19b44fc Mon Sep 17 00:00:00 2001
-From: seebs <seebs@seebs.net>
-Date: Thu, 28 Jul 2016 14:02:12 -0500
-Subject: [PATCH 1/2] Fix xattr performance
-
-When deleting files, we *do* know the inode and attribute, most of the
-time, so we pass those in whenever possible. The full purge of unmatched
-xattrs should not happen when the correct dev/ino are believed to be known.
-
-Signed-off-by: Seebs <seebs@seebs.net>
-
-[YOCTO #9929]
-Upstream-Status: Backport (0d9071f3090bbd7880558f3b488b236ac19b44fc)
-Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
----
- ChangeLog.txt | 3 +++
- pseudo.c | 11 ++++++++---
- pseudo_db.c | 15 +++++++++------
- pseudo_db.h | 2 +-
- 4 files changed, 21 insertions(+), 10 deletions(-)
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index 131f163..d6359ca 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,6 @@
-+2016-07-28:
-+ * (seebs) Fix performance issue on deletion with xattr changes.
-+
- 2016-07-08:
- * (RP) release 1.8.1
- * (joshuagl) Fix log table creation issue
-diff --git a/pseudo.c b/pseudo.c
-index 52f649f..db1c400 100644
---- a/pseudo.c
-+++ b/pseudo.c
-@@ -600,7 +600,12 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
- if (by_path.deleting != 0) {
- pseudo_debug(PDBGF_FILE, "inode mismatch for '%s' -- old one was marked for deletion, deleting.\n",
- msg->path);
-- pdb_did_unlink_file(msg->path, by_path.deleting);
-+ /* in this case, we don't trust the
-+ * existing entries, so we will do the
-+ * more expensive sweep for stray
-+ * xattrs.
-+ */
-+ pdb_did_unlink_file(msg->path, NULL, by_path.deleting);
- } else {
- pseudo_diag("inode mismatch: '%s' ino %llu in db, %llu in request.\n",
- msg->path,
-@@ -698,7 +703,7 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
- if (by_ino.deleting != 0) {
- pseudo_debug(PDBGF_FILE, "inode mismatch for '%s' -- old one was marked for deletion, deleting.\n",
- msg->path);
-- pdb_did_unlink_file(path_by_ino, by_ino.deleting);
-+ pdb_did_unlink_file(path_by_ino, &by_ino, by_ino.deleting);
- } else {
- pseudo_diag("path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n",
- msg->nlink,
-@@ -930,7 +935,7 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
- }
- break;
- case OP_DID_UNLINK:
-- pdb_did_unlink_file(msg->path, msg->client);
-+ pdb_did_unlink_file(msg->path, msg, msg->client);
- break;
- case OP_CANCEL_UNLINK:
- pdb_cancel_unlink_file(msg);
-diff --git a/pseudo_db.c b/pseudo_db.c
-index 289bb29..e7dd193 100644
---- a/pseudo_db.c
-+++ b/pseudo_db.c
-@@ -1848,7 +1848,7 @@ pdb_did_unlink_files(int deleting) {
-
- /* confirm deletion of a specific file by a given client */
- int
--pdb_did_unlink_file(char *path, int deleting) {
-+pdb_did_unlink_file(char *path, pseudo_msg_t *msg, int deleting) {
- static sqlite3_stmt *delete_exact;
- int rc, exact;
- char *sql_delete_exact = "DELETE FROM files WHERE path = ? AND deleting = ?;";
-@@ -1878,11 +1878,14 @@ pdb_did_unlink_file(char *path, int deleting) {
- exact = sqlite3_changes(file_db);
- pseudo_debug(PDBGF_DB, "(exact %d)\n", exact);
- sqlite3_reset(delete_exact);
-- sqlite3_clear_bindings(delete_exact);
-- /* we have to clean everything because we don't know for sure the
-- * device/inode...
-- */
-- pdb_clear_unused_xattrs();
-+ if (msg) {
-+ pdb_clear_xattrs(msg);
-+ } else {
-+ /* we have to clean everything because we don't know for sure the
-+ * device/inode...
-+ */
-+ pdb_clear_unused_xattrs();
-+ }
- return rc != SQLITE_DONE;
- }
-
-diff --git a/pseudo_db.h b/pseudo_db.h
-index a54f3c1..1b2599c 100644
---- a/pseudo_db.h
-+++ b/pseudo_db.h
-@@ -39,7 +39,7 @@ typedef struct {
-
- extern int pdb_maybe_backup(void);
- extern int pdb_cancel_unlink_file(pseudo_msg_t *msg);
--extern int pdb_did_unlink_file(char *path, int deleting);
-+extern int pdb_did_unlink_file(char *path, pseudo_msg_t *msg, int deleting);
- extern int pdb_did_unlink_files(int deleting);
- extern int pdb_link_file(pseudo_msg_t *msg);
- extern int pdb_may_unlink_file(pseudo_msg_t *msg, int deleting);
---
-2.7.4
-
diff --git a/meta/recipes-devtools/pseudo/files/fallback-passwd b/meta/recipes-devtools/pseudo/files/fallback-passwd
index 0889c5704c..08611baaf4 100644
--- a/meta/recipes-devtools/pseudo/files/fallback-passwd
+++ b/meta/recipes-devtools/pseudo/files/fallback-passwd
@@ -1,2 +1,3 @@
root::0:0:root:/home/root:/bin/sh
+pseudopasswd:*:1:1:this-is-the-pseudo-passwd:/nonexistent:/bin/sh
nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
diff --git a/meta/recipes-devtools/pseudo/files/toomanyfiles.patch b/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
new file mode 100644
index 0000000000..bda7e4b202
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
@@ -0,0 +1,71 @@
+From b0b25fbc041a148d1de09f5a6503cd95973ec77c Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 25 Apr 2017 15:25:54 +0100
+Subject: [PATCH 3/3] pseudo: Handle too many files deadlock
+
+Currently if we max out the maximum number of files, pseudo can deadlock, unable to
+accept new connections yet unable to move forward and unblock the other processes
+waiting either.
+
+Rather than hang, when this happens, close out inactive connections, allowing us
+to accept the new ones. The disconnected clients will simply reconnect. There is
+a small risk of data loss here sadly but its better than hanging.
+
+RP
+2017/4/25
+
+Upstream-Status: Submitted [Peter is aware of the issue]
+
+---
+ pseudo_server.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/pseudo_server.c b/pseudo_server.c
+index dac3258..15a3e8f 100644
+--- a/pseudo_server.c
++++ b/pseudo_server.c
+@@ -802,6 +802,7 @@ pseudo_server_loop(void) {
+ struct sigaction eat_usr2 = {
+ .sa_handler = set_do_list_clients
+ };
++ int hitmaxfiles;
+
+ clients = malloc(16 * sizeof(*clients));
+
+@@ -820,6 +821,7 @@ pseudo_server_loop(void) {
+ active_clients = 1;
+ max_clients = 16;
+ highest_client = 0;
++ hitmaxfiles = 0;
+
+ pseudo_debug(PDBGF_SERVER, "server loop started.\n");
+ if (listen_fd < 0) {
+@@ -878,10 +880,15 @@ pseudo_server_loop(void) {
+ } else {
+ serve_client(i);
+ }
++ } else if (hitmaxfiles) {
++ /* Only close one per loop iteration in the interests of caution */
++ close_client(i);
++ hitmaxfiles = 0;
+ }
+ if (die_forcefully)
+ break;
+ }
++ hitmaxfiles = 0;
+ if (!die_forcefully &&
+ (FD_ISSET(clients[0].fd, &events) ||
+ FD_ISSET(clients[0].fd, &reads))) {
+@@ -903,6 +910,9 @@ pseudo_server_loop(void) {
+ */
+ pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
+ die_peacefully = 0;
++ } else if (errno == EMFILE) {
++ hitmaxfiles = 1;
++ pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n");
+ }
+ }
+ pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients);
+--
+2.15.1
+
diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
index 18ce9f9259..7ff8e449e9 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -4,7 +4,7 @@
SUMMARY = "Pseudo gives fake root capabilities to a normal user"
HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/pseudo"
-LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a1d8023a6f953ac6ea4af765ff62d574"
SECTION = "base"
LICENSE = "LGPL2.1"
DEPENDS = "sqlite3 attr"
@@ -17,7 +17,7 @@ PROVIDES += "virtual/fakeroot"
MAKEOPTS = ""
-inherit siteinfo
+inherit siteinfo pkgconfig
do_configure () {
:
@@ -26,14 +26,14 @@ do_configure () {
NO32LIBS ??= "1"
NO32LIBS_class-nativesdk = "1"
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback --enable-epoll --enable-xattr"
# Compile for the local machine arch...
do_compile () {
if [ "${SITEINFO_BITS}" = "64" ]; then
- ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+ ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath
else
- ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+ ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath
fi
oe_runmake ${MAKEOPTS}
}
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb
deleted file mode 100644
index cec214986e..0000000000
--- a/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require pseudo.inc
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
- file://0001-configure-Prune-PIE-flags.patch \
- file://fallback-passwd \
- file://fallback-group \
- file://moreretries.patch \
- file://Fix-xattr-performance.patch \
- file://0001-Don-t-send-SIGUSR1-to-init.patch \
- "
-
-SRC_URI[md5sum] = "ee38e4fb62ff88ad067b1a5a3825bac7"
-SRC_URI[sha256sum] = "dac4ad2d21228053151121320f629d41dd5c0c87695ac4e7aea286c414192ab5"
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 8110b1a193..7c75293ef1 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,15 +1,19 @@
require pseudo.inc
-SRCREV = "befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae"
-PV = "1.8.1+git${SRCPV}"
-
-DEFAULT_PREFERENCE = "-1"
-
SRC_URI = "git://git.yoctoproject.org/pseudo \
file://0001-configure-Prune-PIE-flags.patch \
file://fallback-passwd \
file://fallback-group \
- file://moreretries.patch"
+ file://moreretries.patch \
+ file://toomanyfiles.patch \
+ file://0001-maketables-wrappers-use-Python-3.patch \
+ file://0001-Add-statx.patch \
+ file://0001-realpath.c-Remove-trailing-slashes.patch \
+ "
+SRCREV = "060058bb29f70b244e685b3c704eb0641b736f73"
S = "${WORKDIR}/git"
+PV = "1.9.0+git${SRCPV}"
+# error: use of undeclared identifier '_STAT_VER'
+COMPATIBLE_HOST_libc-musl = 'null'
diff --git a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index 5b134edf07..98a9705831 100644
--- a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
+++ b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -1,23 +1,25 @@
-From cc2ce6d8b6a3e6e2c8874896c10897034a80cd4f Mon Sep 17 00:00:00 2001
+From 672a75c8417ce08db9e31fc415ec445479231d5a Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 10 Dec 2015 13:20:30 +0200
-Subject: [PATCH] Don't search /usr and so on for libraries by default to avoid
- host contamination.
+Subject: [PATCH] Don't search /usr and so on for libraries by default to
+
+ avoid host contamination.
Upstream-Status: Inappropriate (As the code stands, this is a hack)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
- numpy/distutils/system_info.py | 50 +++++-------------------------------------
- 1 file changed, 6 insertions(+), 44 deletions(-)
+ numpy/distutils/system_info.py | 42 ++++------------------------------
+ 1 file changed, 5 insertions(+), 37 deletions(-)
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
-index 9dd48e2..80e197a 100644
+index ba2b1f4..f94dce1 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
-@@ -204,51 +204,13 @@ if sys.platform == 'win32':
- default_x11_lib_dirs = []
- default_x11_include_dirs = []
+@@ -278,45 +278,13 @@ if sys.platform == 'win32':
+ add_system_root(os.path.join(conda_dir, 'Library'))
+
else:
- default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
- '/opt/local/lib', '/sw/lib'], platform_bits)
@@ -43,36 +45,26 @@ index 9dd48e2..80e197a 100644
- default_x11_include_dirs.extend(['/usr/lib/X11/include',
- '/usr/include/X11'])
-
-- import subprocess as sp
-- tmp = None
-- try:
-- # Explicitly open/close file to avoid ResourceWarning when
-- # tests are run in debug mode Python 3.
-- tmp = open(os.devnull, 'w')
-- p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
-- stderr=tmp)
-- except (OSError, DistutilsError):
-- # OSError if gcc is not installed, or SandboxViolation (DistutilsError
-- # subclass) if an old setuptools bug is triggered (see gh-3160).
-- pass
-- else:
-- triplet = str(p.communicate()[0].decode().strip())
-- if p.returncode == 0:
-- # gcc supports the "-print-multiarch" option
-- default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
-- default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
-- finally:
-- if tmp is not None:
-- tmp.close()
+- with open(os.devnull, 'w') as tmp:
+- try:
+- p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE,
+- stderr=tmp)
+- except (OSError, DistutilsError):
+- # OSError if gcc is not installed, or SandboxViolation (DistutilsError
+- # subclass) if an old setuptools bug is triggered (see gh-3160).
+- pass
+- else:
+- triplet = str(p.communicate()[0].decode().strip())
+- if p.returncode == 0:
+- # gcc supports the "-print-multiarch" option
+- default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
+- default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
+ default_include_dirs = ['/deaddir/include']
+ default_src_dirs = ['.', '/deaddir/src']
-+
+
+ default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
+ default_x11_include_dirs = ['/deaddir/include']
if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
---
-2.6.2
-
diff --git a/meta/recipes-devtools/python-numpy/files/0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch b/meta/recipes-devtools/python-numpy/files/0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch
new file mode 100644
index 0000000000..9da6a2b3da
--- /dev/null
+++ b/meta/recipes-devtools/python-numpy/files/0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch
@@ -0,0 +1,32 @@
+From b881e0b2ba9cf1a4aa351a1c1ea90b1e1776ce21 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 12 Aug 2019 15:37:36 +0200
+Subject: [PATCH] numpy/random/setup.py: remove the detection of x86 targets
+ via uname()
+
+This was badly breaking compilation for ARM targets (and possibly
+other non-x86 targets); if -msse2 is desirable for x86 builds it has
+to be passed through another channel.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ numpy/random/setup.py | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/numpy/random/setup.py b/numpy/random/setup.py
+index a1bf3b8..60fb534 100644
+--- a/numpy/random/setup.py
++++ b/numpy/random/setup.py
+@@ -49,11 +49,6 @@ def configuration(parent_package='', top_path=None):
+ elif not is_msvc:
+ # Some bit generators require c99
+ EXTRA_COMPILE_ARGS += ['-std=c99']
+- INTEL_LIKE = any(arch in platform.machine()
+- for arch in ('x86', 'i686', 'i386', 'amd64'))
+- if INTEL_LIKE:
+- # Assumes GCC or GCC-like compiler
+- EXTRA_COMPILE_ARGS += ['-msse2']
+
+ # Use legacy integer variable sizes
+ LEGACY_DEFS = [('NP_RANDOM_LEGACY', '1')]
diff --git a/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h b/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h
deleted file mode 100644
index 109deb0435..0000000000
--- a/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#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_SIZEOF_OFF_T 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_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_USE_C99_FORMATS 1
-#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
-#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/meta/recipes-devtools/python-numpy/files/aarch64/config.h b/meta/recipes-devtools/python-numpy/files/aarch64/config.h
deleted file mode 100644
index c30b868f2f..0000000000
--- a/meta/recipes-devtools/python-numpy/files/aarch64/config.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#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-numpy/files/arm/config.h b/meta/recipes-devtools/python-numpy/files/arm/config.h
deleted file mode 100644
index 17ef186d56..0000000000
--- a/meta/recipes-devtools/python-numpy/files/arm/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* ./src.linux-i686-2.5/numpy/core/include/numpy/config.h */
-/* #define SIZEOF_SHORT 2 */
-/* #define SIZEOF_INT 4 */
-/* #define SIZEOF_LONG 4 */
-/* #define SIZEOF_FLOAT 4 */
-/* #define SIZEOF_DOUBLE 8 */
-#define SIZEOF_LONG_DOUBLE 12
-#define SIZEOF_PY_INTPTR_T 4
-/* #define SIZEOF_LONG_LONG 8 */
-#define SIZEOF_PY_LONG_LONG 8
-/* #define CHAR_BIT 8 */
-#define MATHLIB m
-#define HAVE_FLOAT_FUNCS
-#define HAVE_LOG1P
-#define HAVE_EXPM1
-#define HAVE_INVERSE_HYPERBOLIC
-#define HAVE_INVERSE_HYPERBOLIC_FLOAT
-#define HAVE_ISNAN
-#define HAVE_ISINF
-#define HAVE_RINT
-
diff --git a/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h b/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h
deleted file mode 100644
index c4bf6547f0..0000000000
--- a/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* cat ./src.linux-i686-2.5/numpy/core/include/numpy/numpyconfig.h */
-/*
- * * This file is generated by numpy/core/setup.pyc. DO NOT EDIT
- * */
-#define NPY_SIZEOF_SHORT 2
-#define NPY_SIZEOF_INT 4
-#define NPY_SIZEOF_LONG 4
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_LONGDOUBLE 12
-#define NPY_SIZEOF_PY_INTPTR_T 4
-#define NPY_NO_SMP 0
-
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-/* #define CHAR_BIT 8 */
-
diff --git a/meta/recipes-devtools/python-numpy/files/armeb/config.h b/meta/recipes-devtools/python-numpy/files/armeb/config.h
deleted file mode 100644
index 17ef186d56..0000000000
--- a/meta/recipes-devtools/python-numpy/files/armeb/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* ./src.linux-i686-2.5/numpy/core/include/numpy/config.h */
-/* #define SIZEOF_SHORT 2 */
-/* #define SIZEOF_INT 4 */
-/* #define SIZEOF_LONG 4 */
-/* #define SIZEOF_FLOAT 4 */
-/* #define SIZEOF_DOUBLE 8 */
-#define SIZEOF_LONG_DOUBLE 12
-#define SIZEOF_PY_INTPTR_T 4
-/* #define SIZEOF_LONG_LONG 8 */
-#define SIZEOF_PY_LONG_LONG 8
-/* #define CHAR_BIT 8 */
-#define MATHLIB m
-#define HAVE_FLOAT_FUNCS
-#define HAVE_LOG1P
-#define HAVE_EXPM1
-#define HAVE_INVERSE_HYPERBOLIC
-#define HAVE_INVERSE_HYPERBOLIC_FLOAT
-#define HAVE_ISNAN
-#define HAVE_ISINF
-#define HAVE_RINT
-
diff --git a/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h b/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h
deleted file mode 100644
index c4bf6547f0..0000000000
--- a/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* cat ./src.linux-i686-2.5/numpy/core/include/numpy/numpyconfig.h */
-/*
- * * This file is generated by numpy/core/setup.pyc. DO NOT EDIT
- * */
-#define NPY_SIZEOF_SHORT 2
-#define NPY_SIZEOF_INT 4
-#define NPY_SIZEOF_LONG 4
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_LONGDOUBLE 12
-#define NPY_SIZEOF_PY_INTPTR_T 4
-#define NPY_NO_SMP 0
-
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-/* #define CHAR_BIT 8 */
-
diff --git a/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch b/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch
deleted file mode 100644
index 8be6e4d21f..0000000000
--- a/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Avoids using python from the HOSTs native sysroot for f2py,
-uses TARGET env python instead.
-
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: numpy-1.11.0/numpy/f2py/setup.py
-===================================================================
---- numpy-1.11.0.orig/numpy/f2py/setup.py
-+++ numpy-1.11.0/numpy/f2py/setup.py
-@@ -37,10 +37,13 @@ def _get_f2py_shebang():
- should be ``#!python`` rather than ``#!`` followed by the contents of
- ``sys.executable``.
- """
-- if set(('bdist_wheel', 'bdist_egg', 'bdist_wininst',
-- 'bdist_rpm')).intersection(sys.argv):
-- return '#!python'
-- return '#!' + sys.executable
-+ #if set(('bdist_wheel', 'bdist_egg', 'bdist_wininst',
-+ # 'bdist_rpm')).intersection(sys.argv):
-+ # return '#!python'
-+ #return '#!' + sys.executable
-+
-+ # On OE, we need to avoid using the HOSTs python-native, we return env python instead
-+ return '#!/usr/bin/env python'
-
-
- def configuration(parent_package='', top_path=None):
diff --git a/meta/recipes-devtools/python-numpy/files/mips/_numpyconfig.h b/meta/recipes-devtools/python-numpy/files/mips/_numpyconfig.h
deleted file mode 100644
index 4c465c216c..0000000000
--- a/meta/recipes-devtools/python-numpy/files/mips/_numpyconfig.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#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 8
-#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
-#define NPY_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_SIZEOF_PY_INTPTR_T 4
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_SIZEOF_OFF_T 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 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/meta/recipes-devtools/python-numpy/files/mips/config.h b/meta/recipes-devtools/python-numpy/files/mips/config.h
deleted file mode 100644
index 2f6135adce..0000000000
--- a/meta/recipes-devtools/python-numpy/files/mips/config.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#define HAVE_ENDIAN_H 1
-#define SIZEOF_PY_INTPTR_T 4
-#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_DOUBLE_BE 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-numpy/files/mips64/_numpyconfig.h b/meta/recipes-devtools/python-numpy/files/mips64/_numpyconfig.h
deleted file mode 100644
index debb390094..0000000000
--- a/meta/recipes-devtools/python-numpy/files/mips64/_numpyconfig.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#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_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_SIZEOF_PY_INTPTR_T 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_SIZEOF_OFF_T 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 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/meta/recipes-devtools/python-numpy/files/mips64/config.h b/meta/recipes-devtools/python-numpy/files/mips64/config.h
deleted file mode 100644
index c30b868f2f..0000000000
--- a/meta/recipes-devtools/python-numpy/files/mips64/config.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#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-numpy/files/mips64n32/_numpyconfig.h b/meta/recipes-devtools/python-numpy/files/mips64n32/_numpyconfig.h
deleted file mode 100644
index 8e2b5d0940..0000000000
--- a/meta/recipes-devtools/python-numpy/files/mips64n32/_numpyconfig.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#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_ENABLE_SEPARATE_COMPILATION 1
-#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 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/meta/recipes-devtools/python-numpy/files/mips64n32/config.h b/meta/recipes-devtools/python-numpy/files/mips64n32/config.h
deleted file mode 100644
index c30b868f2f..0000000000
--- a/meta/recipes-devtools/python-numpy/files/mips64n32/config.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#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-numpy/files/mipsel/config.h b/meta/recipes-devtools/python-numpy/files/mipsel/config.h
deleted file mode 100644
index 17ef186d56..0000000000
--- a/meta/recipes-devtools/python-numpy/files/mipsel/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* ./src.linux-i686-2.5/numpy/core/include/numpy/config.h */
-/* #define SIZEOF_SHORT 2 */
-/* #define SIZEOF_INT 4 */
-/* #define SIZEOF_LONG 4 */
-/* #define SIZEOF_FLOAT 4 */
-/* #define SIZEOF_DOUBLE 8 */
-#define SIZEOF_LONG_DOUBLE 12
-#define SIZEOF_PY_INTPTR_T 4
-/* #define SIZEOF_LONG_LONG 8 */
-#define SIZEOF_PY_LONG_LONG 8
-/* #define CHAR_BIT 8 */
-#define MATHLIB m
-#define HAVE_FLOAT_FUNCS
-#define HAVE_LOG1P
-#define HAVE_EXPM1
-#define HAVE_INVERSE_HYPERBOLIC
-#define HAVE_INVERSE_HYPERBOLIC_FLOAT
-#define HAVE_ISNAN
-#define HAVE_ISINF
-#define HAVE_RINT
-
diff --git a/meta/recipes-devtools/python-numpy/files/mipsel/numpyconfig.h b/meta/recipes-devtools/python-numpy/files/mipsel/numpyconfig.h
deleted file mode 100644
index 0b7cd51af4..0000000000
--- a/meta/recipes-devtools/python-numpy/files/mipsel/numpyconfig.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* cat ./src.linux-i686-2.5/numpy/core/include/numpy/numpyconfig.h */
-/*
- * * This file is generated by numpy/core/setup.pyc. DO NOT EDIT
- * */
-#define NPY_SIZEOF_SHORT 2
-#define NPY_SIZEOF_INT 4
-#define NPY_SIZEOF_LONG 4
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_LONGDOUBLE 12
-#define NPY_SIZEOF_PY_INTPTR_T 4
-#define NPY_NO_SMP 0
-
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_OFF_T 8
-/* #define CHAR_BIT 8 */
-
diff --git a/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h b/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h
deleted file mode 100644
index 6e7262ad91..0000000000
--- a/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#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_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_SIZEOF_PY_INTPTR_T 4
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_SIZEOF_OFF_T 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 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/meta/recipes-devtools/python-numpy/files/powerpc/config.h b/meta/recipes-devtools/python-numpy/files/powerpc/config.h
deleted file mode 100644
index f65d39d5de..0000000000
--- a/meta/recipes-devtools/python-numpy/files/powerpc/config.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#define HAVE_ENDIAN_H 1
-#define SIZEOF_PY_INTPTR_T 4
-#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_DOUBLE_DOUBLE_BE 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-numpy/files/powerpc64/_numpyconfig.h b/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h
deleted file mode 100644
index debb390094..0000000000
--- a/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#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_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_SIZEOF_PY_INTPTR_T 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_SIZEOF_OFF_T 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 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/meta/recipes-devtools/python-numpy/files/powerpc64/config.h b/meta/recipes-devtools/python-numpy/files/powerpc64/config.h
deleted file mode 100644
index c30b868f2f..0000000000
--- a/meta/recipes-devtools/python-numpy/files/powerpc64/config.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#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-numpy/files/remove-build-path-in-comments.patch b/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
deleted file mode 100644
index eb8a71a2e2..0000000000
--- a/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c560abff71f98a39a7401f08c2c13dad9ae7f15f Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 25 Feb 2016 01:23:32 -0500
-Subject: [PATCH] remove build path in comments
-
-It has build path in comments, so remove it.
-
-Upstream-Status: Inappropriate [openembedded specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- numpy/distutils/misc_util.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
-index 345e60f..dafb068 100644
---- a/numpy/distutils/misc_util.py
-+++ b/numpy/distutils/misc_util.py
-@@ -2254,7 +2254,7 @@ def generate_config_py(target):
- from distutils.dir_util import mkpath
- mkpath(os.path.dirname(target))
- f = open(target, 'w')
-- f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0])))
-+ f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0]).replace(os.path.abspath('../'),'')))
- f.write('# It contains system_info results at the time of building this package.\n')
- f.write('__all__ = ["get_info","show"]\n\n')
- for k, i in system_info.saved_results.items():
---
-1.9.1
-
diff --git a/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h b/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h
deleted file mode 100644
index b330361649..0000000000
--- a/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#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_OFF_T 8
-#define NPY_SIZEOF_COMPLEX_DOUBLE 16
-#define NPY_SIZEOF_LONGDOUBLE 16
-#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
-#define NPY_ENABLE_SEPARATE_COMPILATION 1
-#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 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/meta/recipes-devtools/python-numpy/files/x86-64/config.h b/meta/recipes-devtools/python-numpy/files/x86-64/config.h
deleted file mode 100644
index 0ce63b7d22..0000000000
--- a/meta/recipes-devtools/python-numpy/files/x86-64/config.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#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_INTEL_EXTENDED_16_BYTES_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-numpy/files/x86/config.h b/meta/recipes-devtools/python-numpy/files/x86/config.h
deleted file mode 100644
index 08e41e3d99..0000000000
--- a/meta/recipes-devtools/python-numpy/files/x86/config.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#define SIZEOF_PY_INTPTR_T 4
-#define SIZEOF_PY_LONG_LONG 8
-#define MATHLIB m
-#define HAVE_SIN
-#define HAVE_COS
-#define HAVE_TAN
-#define HAVE_SINH
-#define HAVE_COSH
-#define HAVE_TANH
-#define HAVE_FABS
-#define HAVE_FLOOR
-#define HAVE_CEIL
-#define HAVE_SQRT
-#define HAVE_LOG10
-#define HAVE_LOG
-#define HAVE_EXP
-#define HAVE_ASIN
-#define HAVE_ACOS
-#define HAVE_ATAN
-#define HAVE_FMOD
-#define HAVE_MODF
-#define HAVE_FREXP
-#define HAVE_LDEXP
-#define HAVE_RINT
-#define HAVE_TRUNC
-#define HAVE_EXP2
-#define HAVE_LOG2
-#define HAVE_ATAN2
-#define HAVE_POW
-#define HAVE_NEXTAFTER
-#define HAVE_SINF
-#define HAVE_COSF
-#define HAVE_TANF
-#define HAVE_SINHF
-#define HAVE_COSHF
-#define HAVE_TANHF
-#define HAVE_FABSF
-#define HAVE_FLOORF
-#define HAVE_CEILF
-#define HAVE_RINTF
-#define HAVE_TRUNCF
-#define HAVE_SQRTF
-#define HAVE_LOG10F
-#define HAVE_LOGF
-#define HAVE_LOG1PF
-#define HAVE_EXPF
-#define HAVE_EXPM1F
-#define HAVE_ASINF
-#define HAVE_ACOSF
-#define HAVE_ATANF
-#define HAVE_ASINHF
-#define HAVE_ACOSHF
-#define HAVE_ATANHF
-#define HAVE_HYPOTF
-#define HAVE_ATAN2F
-#define HAVE_POWF
-#define HAVE_FMODF
-#define HAVE_MODFF
-#define HAVE_FREXPF
-#define HAVE_LDEXPF
-#define HAVE_EXP2F
-#define HAVE_LOG2F
-#define HAVE_COPYSIGNF
-#define HAVE_NEXTAFTERF
-#define HAVE_SINL
-#define HAVE_COSL
-#define HAVE_TANL
-#define HAVE_SINHL
-#define HAVE_COSHL
-#define HAVE_TANHL
-#define HAVE_FABSL
-#define HAVE_FLOORL
-#define HAVE_CEILL
-#define HAVE_RINTL
-#define HAVE_TRUNCL
-#define HAVE_SQRTL
-#define HAVE_LOG10L
-#define HAVE_LOGL
-#define HAVE_LOG1PL
-#define HAVE_EXPL
-#define HAVE_EXPM1L
-#define HAVE_ASINL
-#define HAVE_ACOSL
-#define HAVE_ATANL
-#define HAVE_ASINHL
-#define HAVE_ACOSHL
-#define HAVE_ATANHL
-#define HAVE_HYPOTL
-#define HAVE_ATAN2L
-#define HAVE_POWL
-#define HAVE_FMODL
-#define HAVE_MODFL
-#define HAVE_FREXPL
-#define HAVE_LDEXPL
-#define HAVE_EXP2L
-#define HAVE_LOG2L
-#define HAVE_COPYSIGNL
-#define HAVE_NEXTAFTERL
-#define HAVE_DECL_SIGNBIT
-#define HAVE_COMPLEX_H
-#define HAVE_LDOUBLE_INTEL_EXTENDED_12_BYTES_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-numpy/files/x86/numpyconfig.h b/meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h
deleted file mode 100644
index ff7938cd96..0000000000
--- a/meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _NPY_NUMPYCONFIG_H_
-#define _NPY_NUMPYCONFIG_H_
-
-#include "_numpyconfig.h"
-
-/*
- * On Mac OS X, because there is only one configuration stage for all the archs
- * in universal builds, any macro which depends on the arch needs to be
- * harcoded
- */
-#ifdef __APPLE__
- #undef NPY_SIZEOF_LONG
- #undef NPY_SIZEOF_PY_INTPTR_T
-
- #ifdef __LP64__
- #define NPY_SIZEOF_LONG 8
- #define NPY_SIZEOF_PY_INTPTR_T 8
- #else
- #define NPY_SIZEOF_LONG 4
- #define NPY_SIZEOF_PY_INTPTR_T 4
- #endif
-#endif
-
-#endif
diff --git a/meta/recipes-devtools/python-numpy/python-numpy.inc b/meta/recipes-devtools/python-numpy/python-numpy.inc
new file mode 100644
index 0000000000..8413434af9
--- /dev/null
+++ b/meta/recipes-devtools/python-numpy/python-numpy.inc
@@ -0,0 +1,52 @@
+SUMMARY = "A sophisticated Numeric Processing Package for Python"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & BSD & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1a32aba007a415aa8a1c708a0e2b86a1"
+
+SRCNAME = "numpy"
+
+SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
+ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
+ file://0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch \
+ "
+SRC_URI[md5sum] = "9147c3ee75e58d657b5b8b5a4f3564e0"
+SRC_URI[sha256sum] = "fb0415475e673cb9a6dd816df999e0ab9f86fa3af2b1770944e7288d2bea4ac9"
+
+UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+# Needed for building with gcc 4.x from centos 7
+CFLAGS_append_class-native = " -std=c99"
+
+S = "${WORKDIR}/numpy-${PV}"
+
+CLEANBROKEN = "1"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
+
+# install what is needed for numpy.test()
+RDEPENDS_${PN} = "${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-difflib \
+ ${PYTHON_PN}-pprint \
+ ${PYTHON_PN}-pickle \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-nose \
+ ${PYTHON_PN}-doctest \
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-distutils \
+ ${PYTHON_PN}-misc \
+ ${PYTHON_PN}-mmap \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-numbers \
+ ${PYTHON_PN}-pydoc \
+ ${PYTHON_PN}-pkgutil \
+ ${PYTHON_PN}-email \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-ctypes \
+ ${PYTHON_PN}-threading \
+ ${PYTHON_PN}-multiprocessing \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python-numpy/python-numpy_1.11.1.bb b/meta/recipes-devtools/python-numpy/python-numpy_1.11.1.bb
deleted file mode 100644
index c5af720a9c..0000000000
--- a/meta/recipes-devtools/python-numpy/python-numpy_1.11.1.bb
+++ /dev/null
@@ -1,104 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0"
-
-SRCNAME = "numpy"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
- file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
- file://remove-build-path-in-comments.patch \
- file://fix_shebang_f2py.patch \
- ${CONFIGFILESURI} "
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/"
-
-CONFIGFILESURI ?= ""
-
-CONFIGFILESURI_aarch64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_arm = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_armeb = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_mipsel = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86 = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86-64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips64n32 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit setuptools
-
-# Make the build fail and replace *config.h with proper one
-# This is a ugly, ugly hack - Koen
-do_compile_prepend_class-target() {
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
- true
- cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
-}
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-
-SRC_URI[md5sum] = "2f44a895a8104ffac140c3a70edbd450"
-SRC_URI[sha256sum] = "dc4082c43979cc856a2bf352a8297ea109ccb3244d783ae067eb2ee5b0d577cd"
-
-# install what is needed for numpy.test()
-RDEPENDS_${PN} = "python-unittest \
- python-difflib \
- python-pprint \
- python-pickle \
- python-shell \
- python-nose \
- python-doctest \
- python-datetime \
- python-distutils \
- python-misc \
- python-mmap \
- python-netclient \
- python-numbers \
- python-pydoc \
- python-pkgutil \
- python-email \
- python-subprocess \
- python-compression \
- python-ctypes \
- python-threading \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python-numpy/python3-numpy_1.11.0.bb b/meta/recipes-devtools/python-numpy/python3-numpy_1.11.0.bb
deleted file mode 100644
index 3cca2239d9..0000000000
--- a/meta/recipes-devtools/python-numpy/python3-numpy_1.11.0.bb
+++ /dev/null
@@ -1,105 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0"
-
-SRCNAME = "numpy"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
- file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
- file://remove-build-path-in-comments.patch \
- file://fix_shebang_f2py.patch \
- ${CONFIGFILESURI} "
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/"
-
-CONFIGFILESURI ?= ""
-
-CONFIGFILESURI_aarch64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_arm = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_armeb = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_mipsel = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86 = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86-64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips64n32 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit setuptools3
-
-# Make the build fail and replace *config.h with proper one
-# This is a ugly, ugly hack - Koen
-do_compile_prepend_class-target() {
- ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build ${DISTUTILS_BUILD_ARGS} || \
- true
- cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
-}
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-
-SRC_URI[md5sum] = "bc56fb9fc2895aa4961802ffbdb31d0b"
-SRC_URI[sha256sum] = "a1d1268d200816bfb9727a7a27b78d8e37ecec2e4d5ebd33eb64e2789e0db43e"
-
-# install what is needed for numpy.test()
-RDEPENDS_${PN} = "python3-unittest \
- python3-difflib \
- python3-pprint \
- python3-pickle \
- python3-shell \
- python3-nose \
- python3-doctest \
- python3-datetime \
- python3-distutils \
- python3-misc \
- python3-mmap \
- python3-netclient \
- python3-numbers \
- python3-pydoc \
- python3-pkgutil \
- python3-email \
- python3-subprocess \
- python3-compression \
- python3-ctypes \
- python3-threading \
- python3-textutils \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python-numpy/python3-numpy_1.17.4.bb b/meta/recipes-devtools/python-numpy/python3-numpy_1.17.4.bb
new file mode 100644
index 0000000000..d388e88d25
--- /dev/null
+++ b/meta/recipes-devtools/python-numpy/python3-numpy_1.17.4.bb
@@ -0,0 +1,3 @@
+inherit setuptools3
+require python-numpy.inc
+
diff --git a/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch b/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
new file mode 100644
index 0000000000..169d1b155b
--- /dev/null
+++ b/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
@@ -0,0 +1,32 @@
+From 5bba4f57f048016aa92ce5909e9e372db619554e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 17 Jul 2018 10:13:38 +0800
+Subject: [PATCH] conditionally do not fetch code by easy_install
+
+If var-NO_FETCH_BUILD is set, do not allow to fetch code from
+internet by easy_install.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ setuptools/command/easy_install.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
+index 05508ce..945e118 100755
+--- a/setuptools/command/easy_install.py
++++ b/setuptools/command/easy_install.py
+@@ -640,6 +640,11 @@ class easy_install(Command):
+ os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))
+
+ def easy_install(self, spec, deps=False):
++ if os.environ.get('NO_FETCH_BUILD', None):
++ log.error("ERROR: Do not try to fetch `%s' for building. "
++ "Please add its native recipe to DEPENDS." % spec)
++ return None
++
+ if not self.editable:
+ self.install_site_py()
+
diff --git a/meta/recipes-devtools/python/python-2.7-manifest.inc b/meta/recipes-devtools/python/python-2.7-manifest.inc
deleted file mode 100644
index 189689d4c4..0000000000
--- a/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ /dev/null
@@ -1,288 +0,0 @@
-
-# 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>
-# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
-
-
-
-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}-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}-plistlib ${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}-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}-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}-plistlib ${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.* "
-
-SUMMARY_${PN}-bsddb="Python bindings for the Berkeley Database"
-RDEPENDS_${PN}-bsddb="${PN}-core"
-FILES_${PN}-bsddb="${libdir}/python2.7/bsddb ${libdir}/python2.7/lib-dynload/_bsddb.so "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python2.7/codecs.* ${libdir}/python2.7/encodings ${libdir}/python2.7/gettext.* ${libdir}/python2.7/locale.* ${libdir}/python2.7/lib-dynload/_locale.so ${libdir}/python2.7/lib-dynload/_codecs* ${libdir}/python2.7/lib-dynload/_multibytecodec.so ${libdir}/python2.7/lib-dynload/unicodedata.so ${libdir}/python2.7/stringprep.* ${libdir}/python2.7/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python2.7/py_compile.* ${libdir}/python2.7/compileall.* "
-
-SUMMARY_${PN}-compiler="Python compiler support"
-RDEPENDS_${PN}-compiler="${PN}-core"
-FILES_${PN}-compiler="${libdir}/python2.7/compiler "
-
-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/ast.* ${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"
-FILES_${PN}-crypt="${libdir}/python2.7/hashlib.* ${libdir}/python2.7/md5.* ${libdir}/python2.7/sha.* ${libdir}/python2.7/lib-dynload/crypt.so ${libdir}/python2.7/lib-dynload/_hashlib.so ${libdir}/python2.7/lib-dynload/_sha256.so ${libdir}/python2.7/lib-dynload/_sha512.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core"
-FILES_${PN}-ctypes="${libdir}/python2.7/ctypes ${libdir}/python2.7/lib-dynload/_ctypes.so ${libdir}/python2.7/lib-dynload/_ctypes_test.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python2.7/curses ${libdir}/python2.7/lib-dynload/_curses.so ${libdir}/python2.7/lib-dynload/_curses_panel.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python2.7/_strptime.* ${libdir}/python2.7/calendar.* ${libdir}/python2.7/lib-dynload/datetime.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python2.7/anydbm.* ${libdir}/python2.7/dumbdbm.* ${libdir}/python2.7/whichdb.* "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint"
-FILES_${PN}-debugger="${libdir}/python2.7/bdb.* ${libdir}/python2.7/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python2.7/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python2.7/config ${libdir}/python2.7/distutils "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python2.7/config/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python2.7/doctest.* "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python2.7/imaplib.* ${libdir}/python2.7/email "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python2.7/lib-dynload/fcntl.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python2.7/lib-dynload/gdbm.so "
-
-SUMMARY_${PN}-hotshot="Python hotshot performance profiler"
-RDEPENDS_${PN}-hotshot="${PN}-core"
-FILES_${PN}-hotshot="${libdir}/python2.7/hotshot ${libdir}/python2.7/lib-dynload/_hotshot.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python2.7/formatter.* ${libdir}/python2.7/htmlentitydefs.* ${libdir}/python2.7/htmllib.* ${libdir}/python2.7/markupbase.* ${libdir}/python2.7/sgmllib.* ${libdir}/python2.7/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python2.7/idlelib "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python2.7/colorsys.* ${libdir}/python2.7/imghdr.* ${libdir}/python2.7/lib-dynload/imageop.so ${libdir}/python2.7/lib-dynload/rgbimg.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core"
-FILES_${PN}-importlib="${libdir}/python2.7/importlib "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib"
-FILES_${PN}-io="${libdir}/python2.7/lib-dynload/_socket.so ${libdir}/python2.7/lib-dynload/_io.so ${libdir}/python2.7/lib-dynload/_ssl.so ${libdir}/python2.7/lib-dynload/select.so ${libdir}/python2.7/lib-dynload/termios.so ${libdir}/python2.7/lib-dynload/cStringIO.so ${libdir}/python2.7/pipes.* ${libdir}/python2.7/socket.* ${libdir}/python2.7/ssl.* ${libdir}/python2.7/tempfile.* ${libdir}/python2.7/StringIO.* ${libdir}/python2.7/io.* ${libdir}/python2.7/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re ${PN}-codecs"
-FILES_${PN}-json="${libdir}/python2.7/json ${libdir}/python2.7/lib-dynload/_json.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core"
-FILES_${PN}-lang="${libdir}/python2.7/lib-dynload/_bisect.so ${libdir}/python2.7/lib-dynload/_collections.so ${libdir}/python2.7/lib-dynload/_heapq.so ${libdir}/python2.7/lib-dynload/_weakref.so ${libdir}/python2.7/lib-dynload/_functools.so ${libdir}/python2.7/lib-dynload/array.so ${libdir}/python2.7/lib-dynload/itertools.so ${libdir}/python2.7/lib-dynload/operator.so ${libdir}/python2.7/lib-dynload/parser.so ${libdir}/python2.7/atexit.* ${libdir}/python2.7/bisect.* ${libdir}/python2.7/code.* ${libdir}/python2.7/codeop.* ${libdir}/python2.7/collections.* ${libdir}/python2.7/dis.* ${libdir}/python2.7/functools.* ${libdir}/python2.7/heapq.* ${libdir}/python2.7/inspect.* ${libdir}/python2.7/keyword.* ${libdir}/python2.7/opcode.* ${libdir}/python2.7/symbol.* ${libdir}/python2.7/repr.* ${libdir}/python2.7/token.* ${libdir}/python2.7/tokenize.* ${libdir}/python2.7/traceback.* ${libdir}/python2.7/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python2.7/logging "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python2.7/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python2.7/lib-dynload/cmath.so ${libdir}/python2.7/lib-dynload/math.so ${libdir}/python2.7/lib-dynload/_random.so ${libdir}/python2.7/random.* ${libdir}/python2.7/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python2.7/mimetools.* ${libdir}/python2.7/uu.* ${libdir}/python2.7/quopri.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python2.7/lib-dynload/mmap.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python2.7/lib-dynload/_multiprocessing.so ${libdir}/python2.7/multiprocessing "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
-FILES_${PN}-netclient="${libdir}/python2.7/*Cookie*.* ${libdir}/python2.7/base64.* ${libdir}/python2.7/cookielib.* ${libdir}/python2.7/ftplib.* ${libdir}/python2.7/gopherlib.* ${libdir}/python2.7/hmac.* ${libdir}/python2.7/httplib.* ${libdir}/python2.7/mimetypes.* ${libdir}/python2.7/nntplib.* ${libdir}/python2.7/poplib.* ${libdir}/python2.7/smtplib.* ${libdir}/python2.7/telnetlib.* ${libdir}/python2.7/urllib.* ${libdir}/python2.7/urllib2.* ${libdir}/python2.7/urlparse.* ${libdir}/python2.7/uuid.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python2.7/cgi.* ${libdir}/python2.7/*HTTPServer.* ${libdir}/python2.7/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python2.7/decimal.* ${libdir}/python2.7/fractions.* ${libdir}/python2.7/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python2.7/pickle.* ${libdir}/python2.7/shelve.* ${libdir}/python2.7/lib-dynload/cPickle.so ${libdir}/python2.7/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python2.7/pkgutil.* "
-
-SUMMARY_${PN}-plistlib="Generate and parse Mac OS X .plist files"
-RDEPENDS_${PN}-plistlib="${PN}-core ${PN}-datetime ${PN}-io"
-FILES_${PN}-plistlib="${libdir}/python2.7/plistlib.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python2.7/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python2.7/profile.* ${libdir}/python2.7/pstats.* ${libdir}/python2.7/cProfile.* ${libdir}/python2.7/lib-dynload/_lsprof.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python2.7/pydoc.* ${libdir}/python2.7/pydoc_data "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python2.7/re.* ${libdir}/python2.7/sre.* ${libdir}/python2.7/sre_compile.* ${libdir}/python2.7/sre_constants* ${libdir}/python2.7/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python2.7/lib-dynload/readline.so ${libdir}/python2.7/rlcompleter.* "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python2.7/lib-dynload/resource.so "
-
-SUMMARY_${PN}-robotparser="Python robots.txt parser"
-RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient"
-FILES_${PN}-robotparser="${libdir}/python2.7/robotparser.* "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
-FILES_${PN}-shell="${libdir}/python2.7/cmd.* ${libdir}/python2.7/commands.* ${libdir}/python2.7/dircache.* ${libdir}/python2.7/fnmatch.* ${libdir}/python2.7/glob.* ${libdir}/python2.7/popen2.* ${libdir}/python2.7/shlex.* ${libdir}/python2.7/shutil.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python2.7/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib"
-FILES_${PN}-sqlite3="${libdir}/python2.7/lib-dynload/_sqlite3.so ${libdir}/python2.7/sqlite3/dbapi2.* ${libdir}/python2.7/sqlite3/__init__.* ${libdir}/python2.7/sqlite3/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python2.7/sqlite3/test "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python2.7/lib-dynload/strop.so ${libdir}/python2.7/string.* ${libdir}/python2.7/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
-FILES_${PN}-subprocess="${libdir}/python2.7/subprocess.* "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python2.7/lib-dynload/syslog.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python2.7/pty.* ${libdir}/python2.7/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core"
-FILES_${PN}-tests="${libdir}/python2.7/test "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python2.7/lib-dynload/_csv.so ${libdir}/python2.7/csv.* ${libdir}/python2.7/optparse.* ${libdir}/python2.7/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python2.7/_threading_local.* ${libdir}/python2.7/dummy_thread.* ${libdir}/python2.7/dummy_threading.* ${libdir}/python2.7/mutex.* ${libdir}/python2.7/threading.* ${libdir}/python2.7/Queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python2.7/lib-dynload/_tkinter.so ${libdir}/python2.7/lib-tk "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python2.7/unittest/ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python2.7/lib-dynload/nis.so ${libdir}/python2.7/lib-dynload/grp.so ${libdir}/python2.7/lib-dynload/pwd.so ${libdir}/python2.7/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python2.7/lib-dynload/_elementtree.so ${libdir}/python2.7/lib-dynload/pyexpat.so ${libdir}/python2.7/xml ${libdir}/python2.7/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
-FILES_${PN}-xmlrpc="${libdir}/python2.7/xmlrpclib.* ${libdir}/python2.7/SimpleXMLRPCServer.* ${libdir}/python2.7/DocXMLRPCServer.* "
-
-SUMMARY_${PN}-zlib="Python zlib compression support"
-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}-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}-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}-plistlib ${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-3.5-manifest.inc b/meta/recipes-devtools/python/python-3.5-manifest.inc
deleted file mode 100644
index 304611432e..0000000000
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ /dev/null
@@ -1,280 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../../../scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (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}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${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}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${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}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${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 "
-
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${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}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${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}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${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}-modules"
-
-SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
-RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 "
-
-SUMMARY_${PN}-argparse="Python command line argument parser"
-RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
-FILES_${PN}-argparse="${libdir}/python3.5/argparse.* "
-
-SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks"
-RDEPENDS_${PN}-asyncio="${PN}-core"
-FILES_${PN}-asyncio="${libdir}/python3.5/asyncio "
-
-SUMMARY_${PN}-audio="Python Audio Handling"
-RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python3.5/wave.* ${libdir}/python3.5/chunk.* ${libdir}/python3.5/sndhdr.* ${libdir}/python3.5/lib-dynload/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/audioop.*.so ${libdir}/python3.5/audiodev.* ${libdir}/python3.5/sunaudio.* ${libdir}/python3.5/sunau.* ${libdir}/python3.5/toaiff.* "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python3.5/codecs.* ${libdir}/python3.5/encodings ${libdir}/python3.5/gettext.* ${libdir}/python3.5/locale.* ${libdir}/python3.5/lib-dynload/_locale.*.so ${libdir}/python3.5/lib-dynload/_codecs* ${libdir}/python3.5/lib-dynload/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/unicodedata.*.so ${libdir}/python3.5/stringprep.* ${libdir}/python3.5/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/compileall.* "
-
-SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell"
-FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so "
-
-SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
-FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
-
-SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
-RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core ${PN}-subprocess"
-FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/lib-dynload/_curses.*.so ${libdir}/python3.5/lib-dynload/_curses_panel.*.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/datetime.* ${libdir}/python3.5/lib-dynload/_datetime.*.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python3.5/anydbm.* ${libdir}/python3.5/dumbdbm.* ${libdir}/python3.5/whichdb.* ${libdir}/python3.5/dbm ${libdir}/python3.5/lib-dynload/_dbm.*.so "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil"
-FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python3.5/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python3.5/config ${libdir}/python3.5/distutils "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python3.5/config/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python3.5/doctest.* "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/email "
-
-SUMMARY_${PN}-enum="Python support for enumerations"
-RDEPENDS_${PN}-enum="${PN}-core"
-FILES_${PN}-enum="${libdir}/python3.5/enum.* "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python3.5/formatter.* ${libdir}/python3.5/htmlentitydefs.* ${libdir}/python3.5/htmllib.* ${libdir}/python3.5/markupbase.* ${libdir}/python3.5/sgmllib.* ${libdir}/python3.5/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.5/idlelib "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so ${libdir}/python3.5/lib-dynload/_io.*.so ${libdir}/python3.5/lib-dynload/_ssl.*.so ${libdir}/python3.5/lib-dynload/select.*.so ${libdir}/python3.5/lib-dynload/termios.*.so ${libdir}/python3.5/lib-dynload/cStringIO.*.so ${libdir}/python3.5/pipes.* ${libdir}/python3.5/socket.* ${libdir}/python3.5/ssl.* ${libdir}/python3.5/tempfile.* ${libdir}/python3.5/StringIO.* ${libdir}/python3.5/io.* ${libdir}/python3.5/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
-FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/lib-dynload/_json.*.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core ${PN}-importlib"
-FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/contextlib.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/operator.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python3.5/logging "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python3.5/mimetools.* ${libdir}/python3.5/uu.* ${libdir}/python3.5/quopri.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python3.5/lib-dynload/mmap.*.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so ${libdir}/python3.5/multiprocessing "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
-FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* ${libdir}/python3.5/base64.* ${libdir}/python3.5/cookielib.* ${libdir}/python3.5/ftplib.* ${libdir}/python3.5/gopherlib.* ${libdir}/python3.5/hmac.* ${libdir}/python3.5/httplib.* ${libdir}/python3.5/mimetypes.* ${libdir}/python3.5/nntplib.* ${libdir}/python3.5/poplib.* ${libdir}/python3.5/smtplib.* ${libdir}/python3.5/telnetlib.* ${libdir}/python3.5/urllib ${libdir}/python3.5/uuid.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python3.5/cgi.* ${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python3.5/decimal.* ${libdir}/python3.5/fractions.* ${libdir}/python3.5/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python3.5/pickle.* ${libdir}/python3.5/shelve.* ${libdir}/python3.5/lib-dynload/cPickle.*.so ${libdir}/python3.5/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python3.5/pkgutil.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python3.5/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python3.5/profile.* ${libdir}/python3.5/pstats.* ${libdir}/python3.5/cProfile.* ${libdir}/python3.5/lib-dynload/_lsprof.*.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.5/pydoc.* ${libdir}/python3.5/pydoc_data "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python3.5/re.* ${libdir}/python3.5/sre.* ${libdir}/python3.5/sre_compile.* ${libdir}/python3.5/sre_constants* ${libdir}/python3.5/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python3.5/lib-dynload/readline.*.so ${libdir}/python3.5/rlcompleter.* "
-
-SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
-RDEPENDS_${PN}-reprlib="${PN}-core"
-FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so "
-
-SUMMARY_${PN}-selectors="Python High-level I/O multiplexing"
-RDEPENDS_${PN}-selectors="${PN}-core"
-FILES_${PN}-selectors="${libdir}/python3.5/selectors.* "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re ${PN}-compression"
-FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/shutil.* "
-
-SUMMARY_${PN}-signal="Python set handlers for asynchronous events support"
-RDEPENDS_${PN}-signal="${PN}-core ${PN}-enum"
-FILES_${PN}-signal="${libdir}/python3.5/signal.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.5/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading"
-FILES_${PN}-sqlite3="${libdir}/python3.5/lib-dynload/_sqlite3.*.so ${libdir}/python3.5/sqlite3/dbapi2.* ${libdir}/python3.5/sqlite3/__init__.* ${libdir}/python3.5/sqlite3/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python3.5/sqlite3/test "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors"
-FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* ${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python3.5/lib-dynload/syslog.*.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core"
-FILES_${PN}-tests="${libdir}/python3.5/test "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/python3.5/csv.* ${libdir}/python3.5/optparse.* ${libdir}/python3.5/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so ${libdir}/python3.5/lib-tk ${libdir}/python3.5/tkinter "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python3.5/unittest/ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python3.5/lib-dynload/nis.*.so ${libdir}/python3.5/lib-dynload/grp.*.so ${libdir}/python3.5/lib-dynload/pwd.*.so ${libdir}/python3.5/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python3.5/lib-dynload/_elementtree.*.so ${libdir}/python3.5/lib-dynload/pyexpat.*.so ${libdir}/python3.5/xml ${libdir}/python3.5/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
-FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc "
-
-SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${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}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${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 "
-ALLOW_EMPTY_${PN}-modules = "1"
-
-
diff --git a/meta/recipes-devtools/python/python-async.inc b/meta/recipes-devtools/python/python-async.inc
index 2c5cb4d191..af887dc4e5 100644
--- a/meta/recipes-devtools/python/python-async.inc
+++ b/meta/recipes-devtools/python/python-async.inc
@@ -1,15 +1,14 @@
SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
HOMEPAGE = "http://github.com/gitpython-developers/async"
SECTION = "devel/python"
-LICENSE = "BSD"
+LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
-SRC_URI = "https://files.pythonhosted.org/packages/source/a/async/async-${PV}.tar.gz"
+inherit pypi
+
SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/async/"
-
-S = "${WORKDIR}/async-${PV}"
+RDEPENDS_${PN} += "${PYTHON_PN}-threading"
-BBCLASSEXTEND = "nativesdk"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-async_0.6.2.bb b/meta/recipes-devtools/python/python-async_0.6.2.bb
deleted file mode 100644
index d855e42a79..0000000000
--- a/meta/recipes-devtools/python/python-async_0.6.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require python-async.inc
-
-inherit setuptools
-
-RDEPENDS_${PN} += "python-threading python-lang"
diff --git a/meta/recipes-devtools/python/python-extras.inc b/meta/recipes-devtools/python/python-extras.inc
new file mode 100644
index 0000000000..b5e11b711a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-extras.inc
@@ -0,0 +1,12 @@
+SUMMARY = "Useful extra bits for Python - things that should be in the standard library"
+HOMEPAGE = "https://pypi.python.org/pypi/extras/"
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6d108f338b2f68fe48ac366c4650bd8b"
+
+inherit pypi
+
+SRC_URI[md5sum] = "3a63ad60cf8f0186c9e3a02f55ec5b14"
+SRC_URI[sha256sum] = "132e36de10b9c91d5d4cc620160a476e0468a88f16c9431817a6729611a81b4e"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python-git.inc b/meta/recipes-devtools/python/python-git.inc
deleted file mode 100644
index 13c097abf6..0000000000
--- a/meta/recipes-devtools/python/python-git.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Python library used to interact with Git repositories"
-DESCRIPTION = "GitPython provides object model read and write access to \
-a git repository. Access repository information conveniently, alter the \
-index directly, handle remotes, or go down to low-level object database \
-access with big-files support."
-HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "aa0ba9df0abe4c8f35dd7bb9be85d56e"
-SRC_URI[sha256sum] = "d8e7adaacceedd3d043e6cd2544f57dbe00c53fc26374880b7cea67f3188aa68"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/"
-UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/GitPython-${PV}"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python-git_2.0.7.bb b/meta/recipes-devtools/python/python-git_2.0.7.bb
deleted file mode 100644
index e49dbea544..0000000000
--- a/meta/recipes-devtools/python/python-git_2.0.7.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-git.inc
-
-DEPENDS = "python-gitdb"
-
-inherit setuptools
-
-RDEPENDS_${PN} += "python-gitdb python-lang python-io python-shell python-math python-re python-subprocess python-stringold python-unixadmin"
diff --git a/meta/recipes-devtools/python/python-gitdb.inc b/meta/recipes-devtools/python/python-gitdb.inc
index 08193fbf25..633752fd1b 100644
--- a/meta/recipes-devtools/python/python-gitdb.inc
+++ b/meta/recipes-devtools/python/python-gitdb.inc
@@ -4,13 +4,21 @@ SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
-SRC_URI = "https://files.pythonhosted.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
+inherit pypi
-SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a"
-SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
+PYPI_PACKAGE = "gitdb2"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/gitdb/"
+SRC_URI[md5sum] = "94e59e5fb00960541f6e137b1456ab0a"
+SRC_URI[sha256sum] = "83361131a1836661a155172932a13c08bda2db3674e4caa32368aa6eb02f38c2"
-S = "${WORKDIR}/gitdb-${PV}"
+DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
-BBCLASSEXTEND = "nativesdk"
+RDEPENDS_${PN} += "${PYTHON_PN}-async \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-crypt \
+ ${PYTHON_PN}-io \
+ ${PYTHON_PN}-mmap \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-smmap \
+"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-gitdb_0.6.4.bb b/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
deleted file mode 100644
index 1777395793..0000000000
--- a/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-gitdb.inc
-
-DEPENDS = "python-async python-smmap"
-
-inherit distutils
-
-RDEPENDS_${PN} += "python-smmap python-async python-mmap python-lang python-zlib python-io python-shell"
diff --git a/meta/recipes-devtools/python/python-mako.inc b/meta/recipes-devtools/python/python-mako.inc
deleted file mode 100644
index 85ec21768e..0000000000
--- a/meta/recipes-devtools/python/python-mako.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "Templating library for Python"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "c5fc31a323dd4990683d2f2da02d4e20"
-SRC_URI[sha256sum] = "fed99dbe4d0ddb27a33ee4910d8708aca9ef1fe854e668387a9ab9a90cbf9059"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
-UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/Mako-${PV}"
-
diff --git a/meta/recipes-devtools/python/python-mako_1.0.4.bb b/meta/recipes-devtools/python/python-mako_1.0.4.bb
deleted file mode 100644
index 230044e1a2..0000000000
--- a/meta/recipes-devtools/python/python-mako_1.0.4.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require python-mako.inc
-
-inherit setuptools
-
-RDEPENDS_${PN} = "python-threading \
- python-netclient \
- python-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
-
-# The same utility is packaged in python3-mako, so it would conflict
-do_install_append() {
- rm -f ${D}${bindir}/mako-render
- rmdir ${D}${bindir}
-}
diff --git a/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch b/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch
new file mode 100644
index 0000000000..707ee596fa
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch
@@ -0,0 +1,40 @@
+From 6cbb7529cf7ff0da3ca649fb3486facd9620d625 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 25 Oct 2018 07:32:14 +0000
+Subject: [PATCH] python-native: fix one do_populate_sysroot warning
+
+Fix below warning:
+WARNING: Skipping RPATH /usr/lib64 as is a standard search path for
+work/x86_64-linux/python-native/2.7.15-r1.1/recipe-sysroot-native/
+usr/lib/python2.7/lib-dynload/_bsddb.so
+
+setup.py will check db.h under include_dirs, for native build,
+/usr/lib64 will be insert to postion 0 of include_dirs, so
+it's priority is higher then our sysroot, cause db.h sysroot
+is ignored, and rpath set to /usr/lib64. and this cause warning
+when do_populate_sysroot. use append to fix it.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index a2c8127..22f9e23 100644
+--- a/setup.py
++++ b/setup.py
+@@ -47,7 +47,7 @@ def add_dir_to_list(dirlist, dir):
+ else:
+ dir_exists = os.path.isdir(dir)
+ if dir_exists:
+- dirlist.insert(0, dir)
++ dirlist.append(dir)
+
+ MACOS_SDK_ROOT = None
+
+--
+2.17.1
+
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
deleted file mode 100644
index a592ea40a1..0000000000
--- a/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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/debug.patch b/meta/recipes-devtools/python/python-native/debug.patch
deleted file mode 100644
index 3617882640..0000000000
--- a/meta/recipes-devtools/python/python-native/debug.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-
-Index: Python-2.7.12/Lib/distutils/unixccompiler.py
-===================================================================
---- Python-2.7.12.orig/Lib/distutils/unixccompiler.py
-+++ Python-2.7.12/Lib/distutils/unixccompiler.py
-@@ -278,6 +278,8 @@ class UnixCCompiler(CCompiler):
-
-
-
-+ print "Looking in %s for %s" % (lib, dirs)
-+
- for dir in dirs:
- shared = os.path.join(dir, shared_f)
- dylib = os.path.join(dir, dylib_f)
-@@ -298,12 +300,16 @@ class UnixCCompiler(CCompiler):
- # assuming that *all* Unix C compilers do. And of course I'm
- # ignoring even GCC's "-static" option. So sue me.
- if os.path.exists(dylib):
-+ print "Found %s" % (dylib)
- return dylib
- elif os.path.exists(xcode_stub):
-+ print "Found %s" % (xcode_stub)
- return xcode_stub
- elif os.path.exists(shared):
-+ print "Found %s" % (shared)
- return shared
- elif os.path.exists(static):
-+ print "Found %s" % (static)
- return static
-
- # Oops, didn't find it in *any* of 'dirs'
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch
index 916b40f4ab..af0f173c6d 100644
--- a/meta/recipes-devtools/python/python-native/multilib.patch
+++ b/meta/recipes-devtools/python/python-native/multilib.patch
@@ -12,10 +12,10 @@ Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: Python-2.7.12/Include/pythonrun.h
+Index: Python-2.7.14/Include/pythonrun.h
===================================================================
---- Python-2.7.12.orig/Include/pythonrun.h
-+++ Python-2.7.12/Include/pythonrun.h
+--- Python-2.7.14.orig/Include/pythonrun.h
++++ Python-2.7.14/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -24,10 +24,10 @@ Index: Python-2.7.12/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.12/Lib/distutils/command/install.py
+Index: Python-2.7.14/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.12.orig/Lib/distutils/command/install.py
-+++ Python-2.7.12/Lib/distutils/command/install.py
+--- Python-2.7.14.orig/Lib/distutils/command/install.py
++++ Python-2.7.14/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -46,23 +46,23 @@ Index: Python-2.7.12/Lib/distutils/command/install.py
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.12/Lib/pydoc.py
+Index: Python-2.7.14/Lib/pydoc.py
===================================================================
---- Python-2.7.12.orig/Lib/pydoc.py
-+++ Python-2.7.12/Lib/pydoc.py
-@@ -384,7 +384,7 @@ class Doc:
-
- docloc = os.environ.get("PYTHONDOCS",
- "http://docs.python.org/library")
-- basedir = os.path.join(sys.exec_prefix, "lib",
-+ basedir = os.path.join(sys.exec_prefix, sys.lib,
- "python"+sys.version[0:3])
- if (isinstance(object, type(os)) and
- (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-2.7.12/Lib/site.py
+--- Python-2.7.14.orig/Lib/pydoc.py
++++ Python-2.7.14/Lib/pydoc.py
+@@ -375,7 +375,7 @@ class Doc:
+ docmodule = docclass = docroutine = docother = docproperty = docdata = fail
+
+ def getdocloc(self, object,
+- basedir=os.path.join(sys.exec_prefix, "lib",
++ basedir=os.path.join(sys.exec_prefix, "sys.lib",
+ "python"+sys.version[0:3])):
+ """Return the location of module docs or None"""
+
+Index: Python-2.7.14/Lib/site.py
===================================================================
---- Python-2.7.12.orig/Lib/site.py
-+++ Python-2.7.12/Lib/site.py
+--- Python-2.7.14.orig/Lib/site.py
++++ Python-2.7.14/Lib/site.py
@@ -288,13 +288,19 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -83,13 +83,13 @@ Index: Python-2.7.12/Lib/site.py
sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
- if sys.platform == "darwin":
- # for framework builds *only* we add the standard Apple
- # locations.
-Index: Python-2.7.12/Lib/test/test_dl.py
+ return sitepackages
+
+ def addsitepackages(known_paths):
+Index: Python-2.7.14/Lib/test/test_dl.py
===================================================================
---- Python-2.7.12.orig/Lib/test/test_dl.py
-+++ Python-2.7.12/Lib/test/test_dl.py
+--- Python-2.7.14.orig/Lib/test/test_dl.py
++++ Python-2.7.14/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -104,10 +104,10 @@ Index: Python-2.7.12/Lib/test/test_dl.py
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.12/Lib/trace.py
+Index: Python-2.7.14/Lib/trace.py
===================================================================
---- Python-2.7.12.orig/Lib/trace.py
-+++ Python-2.7.12/Lib/trace.py
+--- Python-2.7.14.orig/Lib/trace.py
++++ Python-2.7.14/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -121,11 +121,11 @@ Index: Python-2.7.12/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.12/Makefile.pre.in
+Index: Python-2.7.14/Makefile.pre.in
===================================================================
---- Python-2.7.12.orig/Makefile.pre.in
-+++ Python-2.7.12/Makefile.pre.in
-@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -133,7 +133,7 @@ Index: Python-2.7.12/Makefile.pre.in
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -111,7 +112,7 @@ LIBDIR= @libdir@
+@@ -110,7 +111,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -142,7 +142,7 @@ Index: Python-2.7.12/Makefile.pre.in
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -669,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -644,6 +645,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -150,8 +150,8 @@ Index: Python-2.7.12/Makefile.pre.in
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -720,7 +722,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -692,7 +694,7 @@ regen-ast:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -159,10 +159,10 @@ Index: Python-2.7.12/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.12/Modules/getpath.c
+Index: Python-2.7.14/Modules/getpath.c
===================================================================
---- Python-2.7.12.orig/Modules/getpath.c
-+++ Python-2.7.12/Modules/getpath.c
+--- Python-2.7.14.orig/Modules/getpath.c
++++ Python-2.7.14/Modules/getpath.c
@@ -100,6 +100,13 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -186,10 +186,10 @@ Index: Python-2.7.12/Modules/getpath.c
static void
reduce(char *dir)
-Index: Python-2.7.12/Python/getplatform.c
+Index: Python-2.7.14/Python/getplatform.c
===================================================================
---- Python-2.7.12.orig/Python/getplatform.c
-+++ Python-2.7.12/Python/getplatform.c
+--- Python-2.7.14.orig/Python/getplatform.c
++++ Python-2.7.14/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -204,10 +204,10 @@ Index: Python-2.7.12/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-2.7.12/Python/sysmodule.c
+Index: Python-2.7.14/Python/sysmodule.c
===================================================================
---- Python-2.7.12.orig/Python/sysmodule.c
-+++ Python-2.7.12/Python/sysmodule.c
+--- Python-2.7.14.orig/Python/sysmodule.c
++++ Python-2.7.14/Python/sysmodule.c
@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
@@ -217,11 +217,11 @@ Index: Python-2.7.12/Python/sysmodule.c
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.12/configure.ac
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.12.orig/configure.ac
-+++ Python-2.7.12/configure.ac
-@@ -756,6 +756,11 @@ SunOS*)
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -758,6 +758,11 @@ SunOS*)
;;
esac
diff --git a/meta/recipes-devtools/python/python-native_2.7.12.bb b/meta/recipes-devtools/python/python-native_2.7.12.bb
deleted file mode 100644
index de83cbd76a..0000000000
--- a/meta/recipes-devtools/python/python-native_2.7.12.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-require python.inc
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native"
-PR = "${INC_PR}.1"
-
-SRC_URI += "\
- file://05-enable-ctypes-cross-build.patch \
- file://10-distutils-fix-swig-parameter.patch \
- file://11-distutils-never-modify-shebang-line.patch \
- file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.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 \
- "
-
-S = "${WORKDIR}/Python-${PV}"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
-
-inherit native
-
-RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-codecs-native python-core-native python-unittest-native"
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
-
-EXTRA_OEMAKE = '\
- LIBC="" \
- STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
- STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
-'
-
-do_configure_append() {
- autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
- install -d ${D}${bindir}/${PN}
- install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
- # Make sure we use /usr/bin/env python
- for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
- sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
- done
-
- # Add a symlink to the native Python so that scripts can just invoke
- # "nativepython" and get the right one without needing absolute paths
- # (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-native_2.7.17.bb b/meta/recipes-devtools/python/python-native_2.7.17.bb
new file mode 100644
index 0000000000..72aa34c234
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native_2.7.17.bb
@@ -0,0 +1,90 @@
+require python.inc
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
+
+SRC_URI += "\
+ file://05-enable-ctypes-cross-build.patch \
+ file://10-distutils-fix-swig-parameter.patch \
+ file://11-distutils-never-modify-shebang-line.patch \
+ file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
+ file://unixccompiler.patch \
+ file://nohostlibs.patch \
+ file://multilib.patch \
+ file://add-md5module-support.patch \
+ file://0001-python-Resolve-intermediate-staging-issues.patch \
+ file://parallel-makeinst-create-bindir.patch \
+ file://revert_use_of_sysconfigdata.patch \
+ file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \
+ "
+
+S = "${WORKDIR}/Python-${PV}"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
+
+inherit native
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
+
+EXTRA_OEMAKE = '\
+ LIBC="" \
+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+'
+
+do_configure_append() {
+ autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+# Cross-compiling Python needs a native pgen, build it here for use later.
+do_compile_append() {
+ oe_runmake Parser/pgen
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ install -d ${D}${bindir}/${PN}
+ install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+ # Make sure we use /usr/bin/env python
+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+ done
+
+ # Add a symlink to the native Python so that scripts can just invoke
+ # "nativepython" and get the right one without needing absolute paths
+ # (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
+}
+
+python(){
+
+ # Read JSON manifest
+ import json
+ pythondir = d.getVar('THISDIR')
+ with open(pythondir+'/python/python2-manifest.json') as manifest_file:
+ manifest_str = manifest_file.read()
+ json_start = manifest_str.find('# EOC') + 6
+ manifest_file.seek(json_start)
+ manifest_str = manifest_file.read()
+ python_manifest = json.loads(manifest_str)
+
+ rprovides = d.getVar('RPROVIDES').split()
+
+ # Hardcoded since it cant be python-native-foo, should be python-foo-native
+ pn = 'python'
+
+ # ${PN}-misc-native is not in the manifest
+ rprovides.append(pn + '-misc-native')
+
+ for key in python_manifest:
+ pypackage = pn + '-' + key + '-native'
+ if pypackage not in rprovides:
+ rprovides.append(pypackage)
+
+ d.setVar('RPROVIDES', ' '.join(rprovides))
+}
diff --git a/meta/recipes-devtools/python/python-nose.inc b/meta/recipes-devtools/python/python-nose.inc
new file mode 100644
index 0000000000..ccec68a0e1
--- /dev/null
+++ b/meta/recipes-devtools/python/python-nose.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Extends Python unittest to make testing easier"
+HOMEPAGE = "http://readthedocs.org/docs/nose/"
+DESCRIPTION = "nose extends the test loading and running features of unittest, \
+making it easier to write, find and run tests."
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
+SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
+
+inherit pypi
+
+RDEPENDS_${PN} = "\
+ ${PYTHON_PN}-unittest \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-nose_1.3.7.bb b/meta/recipes-devtools/python/python-nose_1.3.7.bb
deleted file mode 100644
index 3757f3a8b7..0000000000
--- a/meta/recipes-devtools/python/python-nose_1.3.7.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-unittest \
- "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-pbr.inc b/meta/recipes-devtools/python/python-pbr.inc
new file mode 100644
index 0000000000..0e64501c32
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pbr.inc
@@ -0,0 +1,12 @@
+SUMMARY = "Python Build Reasonableness"
+DESCRIPTION = "PBR is a library that injects some useful and sensible default behaviors into your setuptools run"
+HOMEPAGE = "https://pypi.python.org/pypi/pbr"
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
+
+inherit pypi
+
+RDEPENDS_${PN} += "${PYTHON_PN}-pip"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-pexpect_4.2.0.bb b/meta/recipes-devtools/python/python-pexpect_4.2.0.bb
deleted file mode 100644
index 82e0fa8863..0000000000
--- a/meta/recipes-devtools/python/python-pexpect_4.2.0.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-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=1c7a725251880af8c6a148181665385b"
-
-SRCNAME = "pexpect"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "8071ec5df0f3d515daedafad672d1632"
-SRC_URI[sha256sum] = "bf6816b8cc8d301a499e7adf338828b39bc7548eb64dbed4dd410ed93d95f853"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect"
-
-S = "${WORKDIR}/pexpect-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-core \
- python-io \
- python-terminal \
- python-resource \
- python-fcntl \
- python-ptyprocess \
-"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb b/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb
deleted file mode 100644
index 931e5a7d49..0000000000
--- a/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Run a subprocess in a pseudo terminal"
-HOMEPAGE = "http://ptyprocess.readthedocs.io/en/latest/"
-SECTION = "devel/python"
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cfdcd51fa7d5808da4e74346ee394490"
-
-SRCNAME = "ptyprocess"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "94e537122914cc9ec9c1eadcd36e73a1"
-SRC_URI[sha256sum] = "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/ptyprocess"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-core \
-"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
deleted file mode 100644
index 212779ca37..0000000000
--- a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur pycurl-7.19.5.2-orig/setup.py pycurl-7.19.5.2/setup.py
---- pycurl-7.19.5.2-orig/setup.py 2015-11-02 15:42:24.000000000 +0200
-+++ pycurl-7.19.5.2/setup.py 2015-11-02 17:59:36.121527273 +0200
-@@ -154,7 +154,7 @@
- optbuf = ''
- sslhintbuf = ''
- errtext = ''
-- for option in ["--libs", "--static-libs"]:
-+ for option in ["--libs"]:
- p = subprocess.Popen((CURL_CONFIG, option),
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- stdout, stderr = p.communicate()
diff --git a/meta/recipes-devtools/python/python-pycurl_7.21.5.bb b/meta/recipes-devtools/python/python-pycurl_7.21.5.bb
deleted file mode 100644
index 7b41f6d33d..0000000000
--- a/meta/recipes-devtools/python/python-pycurl_7.21.5.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Python bindings for libcurl"
-HOMEPAGE = "http://pycurl.sourceforge.net/"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1+ | MIT"
-LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=182;md5=a84a1caa65b89d4584b693d3680062fb \
- file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \
- file://COPYING-MIT;md5=b7e434aeb228ed731c00bcf177e79b19"
-
-DEPENDS = "curl python"
-RDEPENDS_${PN} = "python-core curl"
-SRCNAME = "pycurl"
-
-SRC_URI = "\
- http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \
- file://no-static-link.patch \
-"
-
-SRC_URI[archive.md5sum] = "bca7bf47320082588db544ced2ba8717"
-SRC_URI[archive.sha256sum] = "8a1e0eb55573388275a1d6c2534ca4cfca5d7fa772b99b505c08fa149b27aed0"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils
-
-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-scons-native_2.5.0.bb b/meta/recipes-devtools/python/python-scons-native_2.5.0.bb
deleted file mode 100644
index dae89ab5d2..0000000000
--- a/meta/recipes-devtools/python/python-scons-native_2.5.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require python-scons_${PV}.bb
-inherit native pythonnative
-DEPENDS = "python-native"
-RDEPENDS_${PN} = ""
-
-do_install_append() {
- create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
-}
diff --git a/meta/recipes-devtools/python/python-scons_2.5.0.bb b/meta/recipes-devtools/python/python-scons_2.5.0.bb
deleted file mode 100644
index 8543c4182f..0000000000
--- a/meta/recipes-devtools/python/python-scons_2.5.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a885dff6d14e4cd876d9008a09a42de"
-SRCNAME = "scons"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "bda5530a70a41a7831d83c8b191c021e"
-SRC_URI[sha256sum] = "01f1b3d6023516a8e1b5e77799e5a82a23b32953b1102d339059ffeca8600493"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/SCons/"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-fcntl \
- python-io \
- python-json \
- python-subprocess \
- "
diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc
index 92ca9a0028..d8bce7145e 100644
--- a/meta/recipes-devtools/python/python-setuptools.inc
+++ b/meta/recipes-devtools/python/python-setuptools.inc
@@ -2,20 +2,49 @@ SUMMARY = "Download, build, install, upgrade, and uninstall Python packages"
HOMEPAGE = "https://pypi.python.org/pypi/setuptools"
SECTION = "devel/python"
LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158"
-LIC_FILES_CHKSUM = "file://setup.py;beginline=134;endline=134;md5=3e8df024d6c1442d18e84acf8fbbc475"
+PYPI_PACKAGE_EXT = "zip"
-SRCNAME = "setuptools"
+inherit pypi
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
-SRC_URI[md5sum] = "869f3029dcc66a64ba39875e2a2f044a"
-SRC_URI[sha256sum] = "19aad19471052d5daefe96f2c1fa2e88dcdb17488bf8708d7e6356881ea833cb"
+SRC_URI[md5sum] = "5ac69b66a6f7d4785517017f37df28e9"
+SRC_URI[sha256sum] = "c5b372090d7c8709ce79a6a66872a91e518f7d65af97fca78135e1cb10d4b940"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
+DEPENDS += "${PYTHON_PN}"
+RDEPENDS_${PN} = "\
+ ${PYTHON_PN}-compile \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-ctypes \
+ ${PYTHON_PN}-distutils \
+ ${PYTHON_PN}-email \
+ ${PYTHON_PN}-html \
+ ${PYTHON_PN}-netserver \
+ ${PYTHON_PN}-numbers \
+ ${PYTHON_PN}-pkgutil \
+ ${PYTHON_PN}-plistlib \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-stringold \
+ ${PYTHON_PN}-threading \
+ ${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-xml \
+"
do_install_prepend() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
}
+
+BBCLASSEXTEND = "native nativesdk"
+
+# The pkg-resources module can be used by itself, without the package downloader
+# and easy_install. Ship it in a separate package so that it can be used by
+# minimal distributions.
+PACKAGES =+ "${PYTHON_PN}-pkg-resources "
+FILES_${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*"
+# Due to the way OE-Core implemented native recipes, the native class cannot
+# have a dependency on something that is not a recipe name. Work around that by
+# manually setting RPROVIDES.
+RDEPENDS_${PN}_append = " ${PYTHON_PN}-pkg-resources"
+RPROVIDES_append_class-native = " ${PYTHON_PN}-pkg-resources-native"
diff --git a/meta/recipes-devtools/python/python-setuptools_22.0.5.bb b/meta/recipes-devtools/python/python-setuptools_22.0.5.bb
deleted file mode 100644
index 526474c7ea..0000000000
--- a/meta/recipes-devtools/python/python-setuptools_22.0.5.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require python-setuptools.inc
-
-PROVIDES = "python-distribute"
-
-DEPENDS += "python"
-DEPENDS_class-native += "python-native"
-
-inherit distutils
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
-
-RDEPENDS_${PN} = "\
- python-stringold \
- python-email \
- python-shell \
- python-distutils \
- python-compression \
- python-pkgutil \
- python-plistlib \
- python-numbers \
- python-html \
- python-netserver \
- python-ctypes \
- python-subprocess \
- python-unittest \
- python-compile \
-"
-
-RDEPENDS_${PN}_class-native = "\
- python-distutils \
- python-compression \
-"
-
-RREPLACES_${PN} = "python-distribute"
-RPROVIDES_${PN} = "python-distribute"
-RCONFLICTS_${PN} = "python-distribute"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-setuptools_42.0.2.bb b/meta/recipes-devtools/python/python-setuptools_42.0.2.bb
new file mode 100644
index 0000000000..cf9440495b
--- /dev/null
+++ b/meta/recipes-devtools/python/python-setuptools_42.0.2.bb
@@ -0,0 +1,9 @@
+require python-setuptools.inc
+
+PROVIDES = "python-distribute"
+
+inherit setuptools
+
+RREPLACES_${PN} = "python-distribute"
+RPROVIDES_${PN} = "python-distribute"
+RCONFLICTS_${PN} = "python-distribute"
diff --git a/meta/recipes-devtools/python/python-six.inc b/meta/recipes-devtools/python/python-six.inc
index bd12fa94a1..c386090b4b 100644
--- a/meta/recipes-devtools/python/python-six.inc
+++ b/meta/recipes-devtools/python/python-six.inc
@@ -2,15 +2,13 @@ SUMMARY = "Python 2 and 3 compatibility library"
HOMEPAGE = "https://pypi.python.org/pypi/six/"
SECTION = "devel/python"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6f00d4a50713fa859858dd9abaa35b21"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f82eb3a1a7fade60bda5980935084b62"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/six/six-${PV}.tar.gz"
-SRC_URI[md5sum] = "34eed507548117b2ab523ab14b2f8b55"
-SRC_URI[sha256sum] = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
+SRC_URI[md5sum] = "e92c23c882c7d5564ce5773fe31b2771"
+SRC_URI[sha256sum] = "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/six/"
-UPSTREAM_CHECK_REGEX = "/six/(?P<pver>(\d+[\.\-_]*)+)"
+inherit pypi
-BBCLASSEXTEND = "native nativesdk"
+RDEPENDS_${PN} = "${PYTHON_PN}-io"
-S = "${WORKDIR}/six-${PV}"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-six_1.10.0.bb b/meta/recipes-devtools/python/python-six_1.10.0.bb
deleted file mode 100644
index 4350485f73..0000000000
--- a/meta/recipes-devtools/python/python-six_1.10.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools
-require python-six.inc
-
-RDEPENDS_${PN} += "python-io"
diff --git a/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch b/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
deleted file mode 100644
index 2f14a124ef..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-channels/rpm_sys: use md5sum instead of mtime as the digest
-
-Use the internal getFileDigest() function (which defaults to md5) instead of
-mtime for getting the file digest. On some systems mtime proved to be
-unreliable because of delayed update. This caused smart to miss rpm db updates
-and thus get its understanding of installed packages out of sync.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- smart/channels/rpm_sys.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/smart/channels/rpm_sys.py b/smart/channels/rpm_sys.py
-index b9fda27..6f1fe94 100644
---- a/smart/channels/rpm_sys.py
-+++ b/smart/channels/rpm_sys.py
-@@ -22,6 +22,7 @@
- from smart.backends.rpm.header import RPMDBLoader
- from smart.backends.rpm.base import getTS, rpm_join_dbpath
- from smart.channel import PackageChannel
-+from smart.util.filetools import getFileDigest
- from smart import *
- import os
-
-@@ -35,7 +36,7 @@ class RPMSysChannel(PackageChannel):
- dbdir = rpm_join_dbpath(sysconf.get("rpm-root", "/"),
- sysconf.get("rpm-dbpath", "var/lib/rpm"))
- path = os.path.join(dbdir, "Packages")
-- digest = os.path.getmtime(path)
-+ digest = getFileDigest(path)
- if digest == self._digest:
- return True
- self.removeLoaders()
---
-2.6.6
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch b/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
deleted file mode 100644
index 5e80804bf4..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 01e51afd03131947f8d74b9a23fdbc0078249499 Mon Sep 17 00:00:00 2001
-From: Mariano Lopez <mariano.lopez@linux.intel.com>
-Date: Wed, 3 Aug 2016 07:47:09 +0000
-Subject: [PATCH] fetcher.py: Add debugging when targetpath is empty
-
-There are several errors when openining files or manipulating
-path strings, those errors point targetpath passed to
-setSucceeded() is empty. This patch won't solve the problems,
-but will add debugging to give an idea why is failing.
-
-Upstream-Status: Inappropriate [debugging]
-
-Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
----
- smart/fetcher.py | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/smart/fetcher.py b/smart/fetcher.py
-index dd3ff6b..64aa979 100644
---- a/smart/fetcher.py
-+++ b/smart/fetcher.py
-@@ -594,6 +594,22 @@ class FetchItem(object):
- self._eta = None
-
- def setSucceeded(self, targetpath, fetchedsize=0):
-+ # It seems the in some odd cases targetpath here
-+ # is empty, this will lead to bugs in several places
-+ if not targetpath:
-+ import traceback
-+ tb_str = ""
-+ for threadId, stack in sys._current_frames().items():
-+ tb_str += '\nThreadID: %s' % threadId
-+ for filename, lineno, name, line in traceback.extract_stack(stack):
-+ tb_str += '\nFile: "%s", line %d, in %s' % (filename, lineno, name)
-+ if line:
-+ tb_str += "\n %s" % line.strip()
-+ error_string = ["No file path specified",
-+ "URL: %s" % self._url,
-+ "Status: %s" % self._status,
-+ "Traceback: %s" % tb_str]
-+ raise Error, _("\n".join(error_string))
- if self._status is not FAILED:
- self._status = SUCCEEDED
- self._targetpath = targetpath
---
-2.6.6
-
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
deleted file mode 100644
index fe98d070d3..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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(+)
-
-Index: git/smart/backends/rpm/pm.py
-===================================================================
---- git.orig/smart/backends/rpm/pm.py
-+++ git/smart/backends/rpm/pm.py
-@@ -233,6 +233,11 @@ class RPMPackageManager(PackageManager):
- if sysconf.get("rpm-order"):
- ts.order()
- probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
-+
-+ 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
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch b/meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
deleted file mode 100644
index 9055555cd0..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From a74a9a9eb9d75964a0e978950e8b191d7a18d763 Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Fri, 5 Jun 2015 17:07:16 +0100
-Subject: [PATCH] smart: change "is already installed" message from warning to
- info
-
-This doesn't need to be a warning.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- smart/commands/install.py | 4 ++--
- smart/interfaces/text/interactive.py | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/smart/commands/install.py b/smart/commands/install.py
-index 6ef9682..80d456b 100644
---- a/smart/commands/install.py
-+++ b/smart/commands/install.py
-@@ -152,7 +152,7 @@ def main(ctrl, opts):
- for obj in results:
- for pkg in obj.packages:
- if pkg.installed:
-- iface.warning(_("%s (for %s) is already installed")
-+ iface.info(_("%s (for %s) is already installed")
- % (pkg, arg))
- installed = True
- break
-@@ -184,7 +184,7 @@ def main(ctrl, opts):
- for name in names:
- pkg = names[name][0]
- if pkg.installed:
-- iface.warning(_("%s is already installed") % pkg)
-+ iface.info(_("%s is already installed") % pkg)
- else:
- trans.enqueue(pkg, INSTALL)
-
-diff --git a/smart/interfaces/text/interactive.py b/smart/interfaces/text/interactive.py
-index 9865584..190867b 100644
---- a/smart/interfaces/text/interactive.py
-+++ b/smart/interfaces/text/interactive.py
-@@ -278,7 +278,7 @@ class Interpreter(Cmd):
- for name in names:
- pkg = names[name][0]
- if pkg.installed:
-- iface.warning(_("%s is already installed") % pkg)
-+ iface.info(_("%s is already installed") % pkg)
- else:
- found = True
- transaction.enqueue(pkg, INSTALL)
---
-2.1.0
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch
deleted file mode 100644
index 6e672b3321..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-Sadly, smart is not deterministic so the same build can go down multiple different
-pathways. We'd expect to see the same warnings however depending on the pathway
-taken, it may or may not warn, particularly with Recommends since they're optional.
-
-For example, where a Recommended package is available but has Conflicts, we'd expect
-to see an warning that we couldn't install it. Some code paths silently hide this
-(its a LOCKED_CONFLICT). We add printing of warnings for this case.
-
-Also, if there are two compatible feeds available (e.g. i586 and core2_32), this
-changes the code path from direct _install() to _pending() since there are multiple
-providers. This patch adds warning handling to _pending() so we don't hit hard
-failures there. This is as seen with the mysterious libspeexdsp failures for x86-lsb
-on the autobuilder.
-
-Upstream-Status: Pending
-RP
-2015/7/16
-
-Index: git/smart/transaction.py
-===================================================================
---- git.orig/smart/transaction.py
-+++ git/smart/transaction.py
-@@ -651,13 +651,14 @@ class Transaction(object):
-
- if not prvpkgs:
- # No packages provide it at all. Give up.
-+
-+ reasons = []
-+ for prv in req.providedby:
-+ for prvpkg in prv.packages:
-+ lockedres = lockedpkgs.get(prvpkg, None)
-+ if lockedres:
-+ reasons.append(lock_reason(prvpkg, lockedres))
- if reqrequired:
-- reasons = []
-- for prv in req.providedby:
-- for prvpkg in prv.packages:
-- lockedres = lockedpkgs.get(prvpkg, None)
-- if lockedres:
-- reasons.append(lock_reason(prvpkg, lockedres))
- if reasons:
- raise Failed, _("Can't install %s: unable to install provider for %s:\n %s") % \
- (pkg, req, '\n '.join(reasons))
-@@ -665,7 +666,11 @@ class Transaction(object):
- raise Failed, _("Can't install %s: no package provides %s") % \
- (pkg, req)
- else:
-+ if reasons:
-+ iface.warning(_("Can't install %s: unable to install provider for %s:\n %s") % \
-+ (pkg, req, '\n '.join(reasons)))
-+
- # It's only a recommend, skip
- continue
-
- if len(prvpkgs) == 1:
-@@ -846,6 +852,14 @@ class Transaction(object):
- isinst = changeset.installed
- getweight = self._policy.getWeight
-
-+ attempt = sysconf.has("attempt-install", soft=True)
-+
-+ def handle_failure(msg):
-+ if attempt:
-+ iface.warning(msg)
-+ else:
-+ raise Failed, msg
-+
- updown = []
- while pending:
- item = pending.pop(0)
-@@ -870,8 +884,9 @@ class Transaction(object):
-
- if not prvpkgs:
- # No packages provide it at all. Give up.
-- raise Failed, _("Can't install %s: no package "
-- "provides %s") % (pkg, req)
-+ handle_failure(_("Can't install %s: no package "
-+ "provides %s") % (pkg, req))
-+ continue
-
- if len(prvpkgs) > 1:
- # More than one package provide it. We use _pending here,
-@@ -894,9 +909,10 @@ class Transaction(object):
- keeporder, cs, lk))
- keeporder += 0.000001
- if not alternatives:
-- raise Failed, _("Can't install %s: all packages "
-+ handle_failure(_("Can't install %s: all packages "
- "providing %s failed to install:\n%s")\
-- % (pkg, req, "\n".join(failures))
-+ % (pkg, req, "\n".join(failures)))
-+ continue
- alternatives.sort()
- changeset.setState(alternatives[0][1])
- if len(alternatives) == 1:
-@@ -954,18 +970,20 @@ class Transaction(object):
-
- for reqpkg in reqpkgs:
- if reqpkg in locked and isinst(reqpkg):
-- raise Failed, _("Can't remove %s: requiring "
-+ handle_failure(_("Can't remove %s: requiring "
- "package %s is locked") % \
-- (pkg, reqpkg)
-+ (pkg, reqpkg))
-+ continue
- for reqpkg in reqpkgs:
- # We check again, since other actions may have
- # changed their state.
- if not isinst(reqpkg):
- continue
- if reqpkg in locked:
-- raise Failed, _("Can't remove %s: requiring "
-+ handle_failure(_("Can't remove %s: requiring "
- "package %s is locked") % \
-- (pkg, reqpkg)
-+ (pkg, reqpkg))
-+ continue
- self._remove(reqpkg, changeset, locked,
- pending, depth)
- continue
-@@ -978,12 +996,14 @@ class Transaction(object):
- try:
- for reqpkg in reqpkgs:
- if reqpkg in locked and isinst(reqpkg):
-- raise Failed, _("%s is locked") % reqpkg
-+ handle_failure(_("%s is locked") % reqpkg)
-+ continue
- for reqpkg in reqpkgs:
- if not cs.installed(reqpkg):
- continue
- if reqpkg in lk:
-- raise Failed, _("%s is locked") % reqpkg
-+ handle_failure(_("%s is locked") % reqpkg)
-+ continue
- self._remove(reqpkg, cs, lk, None, depth)
- except Failed, e:
- failures.append(unicode(e))
-@@ -991,9 +1011,10 @@ class Transaction(object):
- alternatives.append((getweight(cs), cs, lk))
-
- if not alternatives:
-- raise Failed, _("Can't install %s: all packages providing "
-+ handle_failure(_("Can't install %s: all packages providing "
- "%s failed to install:\n%s") \
-- % (pkg, prv, "\n".join(failures))
-+ % (pkg, prv, "\n".join(failures)))
-+ continue
-
- alternatives.sort()
- changeset.setState(alternatives[0][1])
-@@ -1246,6 +1267,7 @@ class Transaction(object):
- changeset.setRequested(pkg, True)
- except Failed, e:
- if sysconf.has("attempt-install", soft=True):
-+ iface.warning(_("Can't install %s: %s") % (pkg, str(e)))
- if pkg in changeset:
- del changeset[pkg]
- continue
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
deleted file mode 100644
index 5aedc88266..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From b105e7fe812da3ccaf7155c0fe14c8728b0d39a5 Mon Sep 17 00:00:00 2001
-From: Mark Hatle <mark.hatle@windriver.com>
-Date: Mon, 20 Jan 2014 14:30:52 +0000
-Subject: [PATCH] Add mechanism to attempt install without failing
-
-In OpenEmbedded, for complementary and 'attemptonly' package processing,
-we need a way to instruct smart to try to install, but ignore any
-failures (usually conflicts).
-
-This option only works for the install operation.
-
-If a complementary install fails, an actual error occurred, one that
-we can't ignore without losing the entire attempted transaction. Keep
-this as an error so that we can catch these cases in the futre.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- backends/rpm/pm.py | 35 ++++++++++++++++++++++++++++++++++-
- transaction.py | 50 +++++++++++++++++++++++++++++++++++++-------------
- 2 files changed, 71 insertions(+), 14 deletions(-)
-
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index 9bbd952..ba6405a 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -241,15 +241,48 @@ class RPMPackageManager(PackageManager):
- cb = RPMCallback(prog, upgradednames)
- cb.grabOutput(True)
- probs = None
-+ retry = 0
- try:
- probs = ts.run(cb, None)
- finally:
- del getTS.ts
- cb.grabOutput(False)
-+ if (probs is not None) and sysconf.has("attempt-install", soft=True):
-+ def remove_conflict(pkgNEVR):
-+ for key in changeset.keys():
-+ if pkgNEVR == str(key):
-+ del changeset[key]
-+ del pkgpaths[key]
-+ iface.warning("Removing %s due to file %s conflicting with %s" % (pkgNEVR, fname, altNEVR))
-+ break
-+
-+ retry = 1
-+ for prob in probs:
-+ if prob[1][0] == rpm.RPMPROB_NEW_FILE_CONFLICT:
-+ msg = prob[0].split()
-+ fname = msg[1]
-+ pkgNEVR = msg[7]
-+ altNEVR = msg[9]
-+ pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
-+ altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
-+ remove_conflict(pkgNEVR)
-+ elif prob[1][0] == rpm.RPMPROB_FILE_CONFLICT:
-+ msg = prob[0].split()
-+ fname = msg[1]
-+ pkgNEVR = msg[5]
-+ altNEVR = msg[11]
-+ pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
-+ altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
-+ remove_conflict(pkgNEVR)
-+ else:
-+ retry = 0
-+
- prog.setDone()
-- if probs is not None:
-+ if (probs is not None) and (not retry):
- raise Error, "\n".join([x[0] for x in probs])
- prog.stop()
-+ if retry and len(changeset):
-+ self.commit(changeset, pkgpaths)
-
- class RPMCallback:
- def __init__(self, prog, upgradednames):
-diff --git a/smart/transaction.py b/smart/transaction.py
-index 4b90cb7..3e043e9 100644
---- a/smart/transaction.py
-+++ b/smart/transaction.py
-@@ -555,6 +555,8 @@ class Transaction(object):
- changeset.set(pkg, INSTALL)
- isinst = changeset.installed
-
-+ attempt = sysconf.has("attempt-install", soft=True)
-+
- # Remove packages conflicted by this one.
- for cnf in pkg.conflicts:
- for prv in cnf.providedby:
-@@ -564,11 +566,16 @@ class Transaction(object):
- if not isinst(prvpkg):
- locked[prvpkg] = (LOCKED_CONFLICT_BY, pkg)
- continue
-- if prvpkg in locked:
-- raise Failed, _("Can't install %s: conflicted package "
-- "%s is locked") % (pkg, prvpkg)
-- self._remove(prvpkg, changeset, locked, pending, depth)
-- pending.append((PENDING_UPDOWN, prvpkg))
-+ if attempt:
-+ del changeset[pkg]
-+ raise Failed, _("Can't install %s: it conflicts with package "
-+ "%s") % (pkg, prvpkg)
-+ else:
-+ if prvpkg in locked:
-+ raise Failed, _("Can't install %s: conflicted package "
-+ "%s is locked") % (pkg, prvpkg)
-+ self._remove(prvpkg, changeset, locked, pending, depth)
-+ pending.append((PENDING_UPDOWN, prvpkg))
-
- # Remove packages conflicting with this one.
- for prv in pkg.provides:
-@@ -579,12 +586,18 @@ class Transaction(object):
- if not isinst(cnfpkg):
- locked[cnfpkg] = (LOCKED_CONFLICT, pkg)
- continue
-- if cnfpkg in locked:
-+ if attempt:
-+ del changeset[pkg]
- raise Failed, _("Can't install %s: it's conflicted by "
-- "the locked package %s") \
-- % (pkg, cnfpkg)
-- self._remove(cnfpkg, changeset, locked, pending, depth)
-- pending.append((PENDING_UPDOWN, cnfpkg))
-+ "the package %s") \
-+ % (pkg, cnfpkg)
-+ else:
-+ if cnfpkg in locked:
-+ raise Failed, _("Can't install %s: it's conflicted by "
-+ "the locked package %s") \
-+ % (pkg, cnfpkg)
-+ self._remove(cnfpkg, changeset, locked, pending, depth)
-+ pending.append((PENDING_UPDOWN, cnfpkg))
-
- # Remove packages with the same name that can't
- # coexist with this one.
-@@ -594,10 +607,15 @@ class Transaction(object):
- if not isinst(namepkg):
- locked[namepkg] = (LOCKED_NO_COEXIST, pkg)
- continue
-- if namepkg in locked:
-+ if attempt:
-+ del changeset[pkg]
- raise Failed, _("Can't install %s: it can't coexist "
- "with %s") % (pkg, namepkg)
-- self._remove(namepkg, changeset, locked, pending, depth)
-+ else:
-+ if namepkg in locked:
-+ raise Failed, _("Can't install %s: it can't coexist "
-+ "with %s") % (pkg, namepkg)
-+ self._remove(namepkg, changeset, locked, pending, depth)
-
- # Install packages required by this one.
- for req in pkg.requires + pkg.recommends:
-@@ -1176,6 +1194,8 @@ class Transaction(object):
-
- self._policy.runStarting()
-
-+ attempt = sysconf.has("attempt-install", soft=True)
-+
- try:
- changeset = self._changeset.copy()
- isinst = changeset.installed
-@@ -1190,7 +1210,11 @@ class Transaction(object):
- locked[pkg] = (LOCKED_KEEP, None)
- elif op is INSTALL:
- if not isinst(pkg) and pkg in locked:
-- raise Failed, _("Can't install %s: it's locked") % pkg
-+ if attempt:
-+ iface.warning(_("Can't install %s: it's locked") % pkg)
-+ del changeset[pkg]
-+ else:
-+ raise Failed, _("Can't install %s: it's locked") % pkg
- changeset.set(pkg, INSTALL)
- locked[pkg] = (LOCKED_INSTALL, None)
- elif op is REMOVE:
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch b/meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch
deleted file mode 100644
index 225b02f964..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From ee05e55e84b53f4bb0d0baba13ca47a8f84b7cb4 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 30 Sep 2015 01:12:52 -0700
-Subject: [PATCH] smart:cache.py: getPackages() matches name + arch
-
-It only matched name ony in the past, for example:
-smart install busybox (matched)
-but:
-smart install busybox@core2_64 (didn't match)
-
-The installation is very slow when no match since it would seach all the
-packages in the repo
-This patch makes it match both.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- smart/cache.py | 3 ++-
- smart/ccache.c | 9 ++++++++-
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/smart/control.py b/smart/control.py
-index d44abe7..f23a604 100644
---- a/smart/control.py
-+++ b/smart/control.py
-@@ -876,9 +876,13 @@ class Control(object):
- objects = []
-
- # If we find packages with exactly the given
-- # name or name-version, use them.
-- for pkg in self._cache.getPackages(s):
-- if pkg.name == s or "%s-%s" % (pkg.name, pkg.version) == s:
-+ # name, name-version, or name@arch, use them.
-+ s_name = s
-+ if "@" in s:
-+ s_name = s.split("@")[0]
-+ for pkg in self._cache.getPackages(s_name):
-+ if pkg.name == s or "%s-%s" % (pkg.name, pkg.version) == s \
-+ or "%s@%s" % (pkg.name, pkg.version.split('@')[1]) == s:
- objects.append((1.0, pkg))
-
- if not objects:
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch b/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
deleted file mode 100644
index da23e7ce42..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6d2363a705697f615d9e5af5d6703b291e618b46 Mon Sep 17 00:00:00 2001
-From: Daniel Klauer <daniel.klauer@gin.de>
-Date: Thu, 12 May 2016 17:55:01 +0200
-Subject: [PATCH] Fix channel command --remove-all option parsing
-
-Option.take_action() stores a list of options given for validation later.
-It strips leading dashes and turns remaining dashes into underscores.
-This list is what ensure_action() will compare its arguments against,
-thus we must use underscores here.
-
-Upstream-Status: Pending
-
-Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
----
- smart/commands/channel.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/smart/commands/channel.py b/smart/commands/channel.py
-index 108f3f1..6234f69 100644
---- a/smart/commands/channel.py
-+++ b/smart/commands/channel.py
-@@ -164,7 +164,7 @@ def main(ctrl, opts):
- opts.check_args_of_option("edit", 0)
- opts.check_args_of_option("enable", -1)
- opts.check_args_of_option("disable", -1)
-- opts.ensure_action("channel", ["add", "set", "remove", "remove-all",
-+ opts.ensure_action("channel", ["add", "set", "remove", "remove_all",
- "list", "show", "yaml", "enable", "disable"])
- opts.check_remaining_args()
-
---
-1.9.1
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch b/meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch
deleted file mode 100644
index e621b33875..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Make CHANNELSDIR in smart empty, since this causes host contamination issues
-on some RPM-based hosts on which smart is already installed.
-
-[YOCTO #3881]
-
-Upstream-Status: Inappropriate [embedded specific]
-
-diff --git a/smart/plugins/channelsync.py b/smart/plugins/channelsync.py
-index 3ba95ff..646d696 100644
---- a/smart/plugins/channelsync.py
-+++ b/smart/plugins/channelsync.py
-@@ -23,7 +23,11 @@ from smart.channel import *
- from smart import *
- import os
-
--CHANNELSDIR = "/etc/smart/channels/"
-+# For now, we leave the definition of CHANNELSDIR empty. This prevents smart
-+# from erroneously consider the build host's channels while setting up its
-+# channels [YOCTO #3881]. If this feature will be used in the future, CHANNELSDIR
-+# should be set to a proper value.
-+CHANNELSDIR = ""
-
- def syncChannels(channelsdir, force=None):
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-locale.patch b/meta/recipes-devtools/python/python-smartpm/smart-locale.patch
deleted file mode 100644
index 0f1dfb91d5..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-locale.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-rpm or commands run by rpm can use output which isn't strictly acsii such
-as quotation characters around expression which are character 0xe2.
-
-Use utf-8 as an encoding rather than whatever the system suggests to
-ensure smart copes with this rather than erroring with unicode errors.
-
-RP 2016/5/19
-Upstream-Status: Pending
-
-
-Index: git/smart/backends/rpm/pm.py
-===================================================================
---- git.orig/smart/backends/rpm/pm.py
-+++ git/smart/backends/rpm/pm.py
-@@ -32,11 +32,7 @@ from smart.pm import PackageManager
- from smart import sysconf, iface, Error, _
-
-
--try:
-- ENCODING = locale.getpreferredencoding()
--except locale.Error:
-- ENCODING = "ascii"
--
-+ENCODING = "utf-8"
-
- def get_public_key(header):
- return header.sprintf("%|DSAHEADER?{%{DSAHEADER:pgpsig}}:"
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-recommends.patch b/meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
deleted file mode 100644
index d607fc4752..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
+++ /dev/null
@@ -1,381 +0,0 @@
-Handle recommended packages in core and rpm backends
-
-Identify and store recommended packages in the cache, add a query option
-to read them and ignore them if they are not present when installing.
-
-Initial identification code from Mark Hatle <mark.hatle@windriver.com>.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
-index 9332ea0..4fcfbee 100644
---- a/smart/backends/rpm/base.py
-+++ b/smart/backends/rpm/base.py
-@@ -225,6 +225,52 @@ class RPMPackage(Package):
- break
- else:
- return False
-+ srecs = fk(self.recommends)
-+ orecs = fk(other.recommends)
-+ if srecs != orecs:
-+ for srec in srecs:
-+ if srec.name[0] == "/" or srec in orecs:
-+ continue
-+ for orec in orecs:
-+ if (srec.name == orec.name and
-+ srec.relation == orec.relation and
-+ checkver(srec.version, orec.version)):
-+ break
-+ else:
-+ return False
-+ for orec in orecs:
-+ if orec.name[0] == "/" or orec in srecs:
-+ continue
-+ for srec in srecs:
-+ if (srec.name == orec.name and
-+ srec.relation == orec.relation and
-+ checkver(srec.version, orec.version)):
-+ break
-+ else:
-+ return False
-+ srecs = fk(self.recommends)
-+ orecs = fk(other.recommends)
-+ if srecs != orecs:
-+ for srec in srecs:
-+ if srec.name[0] == "/" or srec in orecs:
-+ continue
-+ for orec in orecs:
-+ if (srec.name == orec.name and
-+ srec.relation == orec.relation and
-+ checkver(srec.version, orec.version)):
-+ break
-+ else:
-+ return False
-+ for orec in orecs:
-+ if orec.name[0] == "/" or orec in srecs:
-+ continue
-+ for srec in srecs:
-+ if (srec.name == orec.name and
-+ srec.relation == orec.relation and
-+ checkver(srec.version, orec.version)):
-+ break
-+ else:
-+ return False
- return True
-
- def coexists(self, other):
-diff --git a/smart/ccache.c b/smart/ccache.c
-index 7193185..8b66515 100644
---- a/smart/ccache.c
-+++ b/smart/ccache.c
-@@ -500,6 +500,46 @@ Package_equals(PackageObject *self, PackageObject *other)
- }
- }
-
-+ ilen = 0;
-+ jlen = 0;
-+ for (i = 0; i != PyList_GET_SIZE(self->recommends); i++) {
-+ PyObject *item = PyList_GET_ITEM(self->recommends, i);
-+ if (!PyObject_IsInstance(item, (PyObject *)&Depends_Type)) {
-+ PyErr_SetString(PyExc_TypeError, "Depends instance expected");
-+ return NULL;
-+ }
-+ if (STR(((DependsObject *)item)->name)[0] != '/')
-+ ilen += 1;
-+ }
-+ for (j = 0; j != PyList_GET_SIZE(other->recommends); j++) {
-+ PyObject *item = PyList_GET_ITEM(other->recommends, j);
-+ if (!PyObject_IsInstance(item, (PyObject *)&Depends_Type)) {
-+ PyErr_SetString(PyExc_TypeError, "Depends instance expected");
-+ return NULL;
-+ }
-+ if (STR(((DependsObject *)item)->name)[0] != '/')
-+ jlen += 1;
-+ }
-+ if (ilen != jlen) {
-+ ret = Py_False;
-+ goto exit;
-+ }
-+
-+ ilen = PyList_GET_SIZE(self->recommends);
-+ jlen = PyList_GET_SIZE(other->recommends);
-+ for (i = 0; i != ilen; i++) {
-+ PyObject *item = PyList_GET_ITEM(self->recommends, i);
-+ if (STR(((DependsObject *)item)->name)[0] != '/') {
-+ for (j = 0; j != jlen; j++)
-+ if (item == PyList_GET_ITEM(other->recommends, j))
-+ break;
-+ if (j == jlen) {
-+ ret = Py_False;
-+ goto exit;
-+ }
-+ }
-+ }
-+
- exit:
- Py_INCREF(ret);
- return ret;
-@@ -1813,6 +1853,59 @@ Loader_buildPackage(LoaderObject *self, PyObject *args)
- }
- }
-
-+ /* if recargs: */
-+ if (recargs) {
-+ int i = 0;
-+ int len = PyList_GET_SIZE(recargs);
-+ /* pkg.recommends = [] */
-+ Py_DECREF(pkgobj->recommends);
-+ pkgobj->recommends = PyList_New(len);
-+ /* for args in recargs: */
-+ for (; i != len; i++) {
-+ PyObject *args = PyList_GET_ITEM(recargs, i);
-+ DependsObject *recobj;
-+ PyObject *rec;
-+
-+ if (!PyTuple_Check(args)) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "Item in recargs is not a tuple");
-+ return NULL;
-+ }
-+
-+ /* rec = cache._objmap.get(args) */
-+ rec = PyDict_GetItem(cache->_objmap, args);
-+ recobj = (DependsObject *)rec;
-+
-+ /* if not rec: */
-+ if (!rec) {
-+ if (!PyTuple_Check(args) || PyTuple_GET_SIZE(args) < 2) {
-+ PyErr_SetString(PyExc_ValueError, "Invalid recargs tuple");
-+ return NULL;
-+ }
-+ /* rec = args[0](*args[1:]) */
-+ callargs = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args));
-+ rec = PyObject_CallObject(PyTuple_GET_ITEM(args, 0), callargs);
-+ Py_DECREF(callargs);
-+ if (!rec) return NULL;
-+ recobj = (DependsObject *)rec;
-+
-+ /* cache._objmap[args] = rec */
-+ PyDict_SetItem(cache->_objmap, args, rec);
-+ Py_DECREF(rec);
-+
-+ /* cache._recommends.append(rec) */
-+ PyList_Append(cache->_recommends, rec);
-+ }
-+
-+ /* relpkgs.append(rec.packages) */
-+ PyList_Append(relpkgs, recobj->packages);
-+
-+ /* pkg.recommends.append(rec) */
-+ Py_INCREF(rec);
-+ PyList_SET_ITEM(pkgobj->recommends, i, rec);
-+ }
-+ }
-+
- /* if upgargs: */
- if (upgargs) {
- int i = 0;
-@@ -2592,6 +2685,16 @@ Cache_reset(CacheObject *self, PyObject *args)
- if (PyList_Check(reqobj->providedby))
- LIST_CLEAR(reqobj->providedby);
- }
-+ len = PyList_GET_SIZE(self->_recommends);
-+ for (i = 0; i != len; i++) {
-+ DependsObject *reqobj;
-+ PyObject *req;
-+ req = PyList_GET_ITEM(self->_recommends, i);
-+ reqobj = (DependsObject *)req;
-+ LIST_CLEAR(reqobj->packages);
-+ if (PyList_Check(reqobj->providedby))
-+ LIST_CLEAR(reqobj->providedby);
-+ }
- len = PyList_GET_SIZE(self->_upgrades);
- for (i = 0; i != len; i++) {
- DependsObject *upgobj;
-@@ -2834,6 +2937,30 @@ Cache__reload(CacheObject *self, PyObject *args)
- }
-
- /*
-+ for rec in pkg.recommends:
-+ rec.packages.append(pkg)
-+ if rec not in recommends:
-+ recommends[rec] = True
-+ objmap[rec.getInitArgs()] = rec
-+ */
-+ if (PyList_Check(pkg->recommends)) {
-+ klen = PyList_GET_SIZE(pkg->recommends);
-+ for (k = 0; k != klen; k++) {
-+ PyObject *rec = PyList_GET_ITEM(pkg->recommends, k);
-+ PyList_Append(((DependsObject *)rec)->packages,
-+ (PyObject *)pkg);
-+ if (!PyDict_GetItem(recommends, rec)) {
-+ PyDict_SetItem(recommends, rec, Py_True);
-+ args = PyObject_CallMethod(rec, "getInitArgs",
-+ NULL);
-+ if (!args) return NULL;
-+ PyDict_SetItem(objmap, args, rec);
-+ Py_DECREF(args);
-+ }
-+ }
-+ }
-+
-+ /*
- for upg in pkg.upgrades:
- upg.packages.append(pkg)
- if upg not in upgrades:
-@@ -3097,6 +3224,47 @@ Cache_linkDeps(CacheObject *self, PyObject *args)
- Py_DECREF(seq);
- }
-
-+ /* recnames = {} */
-+ recnames = PyDict_New();
-+ /* for rec in self._recommends: */
-+ len = PyList_GET_SIZE(self->_recommends);
-+ for (i = 0; i != len; i++) {
-+ PyObject *rec = PyList_GET_ITEM(self->_recommends, i);
-+
-+ /* for name in rec.getMatchNames(): */
-+ PyObject *names = PyObject_CallMethod(rec, "getMatchNames", NULL);
-+ PyObject *seq = PySequence_Fast(names, "getMatchNames() returned "
-+ "non-sequence object");
-+ int nameslen;
-+ if (!seq) return NULL;
-+ nameslen = PySequence_Fast_GET_SIZE(seq);
-+ for (j = 0; j != nameslen; j++) {
-+ PyObject *name = PySequence_Fast_GET_ITEM(seq, j);
-+
-+ /* lst = recnames.get(name) */
-+ lst = PyDict_GetItem(recnames, name);
-+
-+ /*
-+ if lst:
-+ lst.append(rec)
-+ else:
-+ recnames[name] = [rec]
-+ */
-+ if (lst) {
-+ PyList_Append(lst, rec);
-+ } else {
-+ lst = PyList_New(1);
-+ Py_INCREF(rec);
-+ PyList_SET_ITEM(lst, 0, rec);
-+ PyDict_SetItem(recnames, name, lst);
-+ Py_DECREF(lst);
-+ }
-+ }
-+
-+ Py_DECREF(names);
-+ Py_DECREF(seq);
-+ }
-+
- /* upgnames = {} */
- upgnames = PyDict_New();
- /* for upg in self._upgrades: */
-@@ -3286,6 +3454,56 @@ Cache_linkDeps(CacheObject *self, PyObject *args)
- }
- }
-
-+ /* lst = recnames.get(prv.name) */
-+ lst = PyDict_GetItem(recnames, prv->name);
-+
-+ /* if lst: */
-+ if (lst) {
-+ /* for rec in lst: */
-+ int reclen = PyList_GET_SIZE(lst);
-+ for (j = 0; j != reclen; j++) {
-+ DependsObject *rec = (DependsObject *)PyList_GET_ITEM(lst, j);
-+ /* if rec.matches(prv): */
-+ PyObject *ret = PyObject_CallMethod((PyObject *)rec, "matches",
-+ "O", (PyObject *)prv);
-+ if (!ret) return NULL;
-+ if (PyObject_IsTrue(ret)) {
-+ /*
-+ if rec.providedby:
-+ rec.providedby.append(prv)
-+ else:
-+ rec.providedby = [prv]
-+ */
-+ if (PyList_Check(rec->providedby)) {
-+ PyList_Append(rec->providedby, (PyObject *)prv);
-+ } else {
-+ PyObject *_lst = PyList_New(1);
-+ Py_INCREF(prv);
-+ PyList_SET_ITEM(_lst, 0, (PyObject *)prv);
-+ Py_DECREF(rec->providedby);
-+ rec->providedby = _lst;
-+ }
-+
-+ /*
-+ if prv.recommendedby:
-+ prv.recommendedby.append(prv)
-+ else:
-+ prv.recommendedby = [prv]
-+ */
-+ if (PyList_Check(prv->recommendedby)) {
-+ PyList_Append(prv->recommendedby, (PyObject *)rec);
-+ } else {
-+ PyObject *_lst = PyList_New(1);
-+ Py_INCREF(rec);
-+ PyList_SET_ITEM(_lst, 0, (PyObject *)rec);
-+ Py_DECREF(prv->recommendedby);
-+ prv->recommendedby = _lst;
-+ }
-+ }
-+ Py_DECREF(ret);
-+ }
-+ }
-+
- /* lst = upgnames.get(prv.name) */
- lst = PyDict_GetItem(upgnames, prv->name);
-
-@@ -3821,6 +4094,21 @@ Cache__setstate__(CacheObject *self, PyObject *state)
- }
-
- /*
-+ for rec in pkg.recommends:
-+ rec.packages.append(pkg)
-+ recommends[rec] = True
-+ */
-+ if (PyList_Check(pkgobj->recommends)) {
-+ jlen = PyList_GET_SIZE(pkgobj->recommends);
-+ for (j = 0; j != jlen; j++) {
-+ PyObject *rec = PyList_GET_ITEM(pkgobj->recommends, j);
-+ DependsObject *recobj = (DependsObject *)rec;
-+ PyList_Append(recobj->packages, pkg);
-+ PyDict_SetItem(recommends, rec, Py_True);
-+ }
-+ }
-+
-+ /*
- for upg in pkg.upgrades:
- upg.packages.append(pkg)
- upgrades[upg] = True
-diff --git a/smart/commands/query.py b/smart/commands/query.py
-index 9265cd9..b6f5697 100644
---- a/smart/commands/query.py
-+++ b/smart/commands/query.py
-@@ -750,6 +750,22 @@ class TextOutput(NullOutput):
- name = str(prvpkg)
- print " ", "%s (%s)" % (name, prv)
-
-+ def showRecommends(self, pkg, rec):
-+ if self._firstrecommends:
-+ self._firstrecommends = False
-+ print " ", _("Recommends:")
-+ print " ", rec
-+
-+ def showRecommendsProvidedBy(self, pkg, req, prv, prvpkg):
-+ if self._firstrecommendsprovidedby:
-+ self._firstrecommendsprovidedby = False
-+ print " ", _("Provided By:")
-+ if self.opts.hide_version:
-+ name = prvpkg.name
-+ else:
-+ name = str(prvpkg)
-+ print " ", "%s (%s)" % (name, prv)
-+
- def showUpgrades(self, pkg, upg):
- if self._firstupgrades:
- self._firstupgrades = False
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch b/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
deleted file mode 100644
index bb8c3afdb7..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 0c55d7e18f40465e95e8e4bf22af01f5d4477d3c Mon Sep 17 00:00:00 2001
-From: Daniel Klauer <daniel.klauer@gin.de>
-Date: Wed, 11 May 2016 17:22:49 +0200
-Subject: [PATCH] rpm: Don't ignore transaction error with empty problems list
-
-SmartPM could misinterpret RPM transaction error as success,
-if ts.run() (RPM Python API) returns an empty problems list,
-because of incorrect check for None which treated empty list
-to be the same as None when it has different meaning.
-
-ts.run() returns:
-* None in case of success
-* problems list in case of error, may be empty
-(look at rpmts_Run() in rpm-5.4.14/python/rpmts-py.c [1])
-
-"if mylist" is not good enough to check for error here, because it will
-treat an empty list as "false" because its len() == 0 [2].
-
-ts.check() seems to be different (it's ok for it to return an empty list),
-but for consistency it should be made clear that it can return either None,
-an empty list or a non-empty list.
-
-[1] http://rpm5.org/cvs/fileview?f=rpm/python/rpmts-py.c&v=1.111.2.3
-[2] https://docs.python.org/2/library/stdtypes.html#truth-value-testing
-
-Upstream-Status: Pending
-
-Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
----
- smart/backends/rpm/pm.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index 9bbd952..635f726 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -208,7 +208,7 @@ class RPMPackageManager(PackageManager):
- force = sysconf.get("rpm-force", False)
- if not force:
- probs = ts.check()
-- if probs:
-+ if (probs is not None) and (len(probs) != 0):
- problines = []
- for prob in probs:
- name1 = "%s-%s-%s" % prob[0]
-@@ -247,7 +247,7 @@ class RPMPackageManager(PackageManager):
- del getTS.ts
- cb.grabOutput(False)
- prog.setDone()
-- if probs:
-+ if probs is not None:
- raise Error, "\n".join([x[0] for x in probs])
- prog.stop()
-
---
-1.9.1
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch b/meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
deleted file mode 100644
index 2885998acc..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Set NOPROGRESS for pycurl just as same as default operation in pycurl module itself.
-If set NOPROGRESS with 0 for pycurl, it causes dead lock issue of Python GIL when
-call smart library by python gui just like pygtk.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff -u smart-1.4.1/smart.orig/fetcher.py smart-1.4.1/smart/fetcher.py
---- smart-1.4.1/smart.orig/fetcher.py 2014-07-15 16:42:19.240437080 +0800
-+++ smart-1.4.1/smart/fetcher.py 2014-07-15 17:02:37.812470289 +0800
-@@ -1720,7 +1720,7 @@
- handle.setopt(pycurl.OPT_FILETIME, 1)
- handle.setopt(pycurl.LOW_SPEED_LIMIT, 1)
- handle.setopt(pycurl.LOW_SPEED_TIME, SOCKETTIMEOUT)
-- handle.setopt(pycurl.NOPROGRESS, 0)
-+ handle.setopt(pycurl.NOPROGRESS, 1)
- handle.setopt(pycurl.PROGRESSFUNCTION, progress)
- handle.setopt(pycurl.WRITEDATA, local)
- handle.setopt(pycurl.FOLLOWLOCATION, 1)
diff --git a/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch b/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
deleted file mode 100644
index 4067a90a08..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 5b79e28bd70a0ec5b34c5ff19b66cbbdd1e48835 Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Fri, 18 Mar 2016 13:34:07 +0800
-Subject: [PATCH] Make smartpm to support check signatures of rpmv5.
-
-The original support for 'rpm-check-signatures' has been
-disabled for the RPMv5 does not support '_RPMVSF_NOSIGNATURES'
-now. This fix replaces the '_RPMVSF_NOSIGNATURES' with
-rpm VS flags set:RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|
-RPMVSF_NODSA|RPMVSF_NORSA.
-
-Upstream-Status: Pending
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
----
- smart/backends/rpm/base.py | 43 +++++++++++++++++++++++++++++++----------
- smart/backends/rpm/pm.py | 2 +-
- smart/plugins/yumchannelsync.py | 5 +++--
- 3 files changed, 37 insertions(+), 13 deletions(-)
-
-diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
-index 85f4d49..dbd6165 100644
---- a/smart/backends/rpm/base.py
-+++ b/smart/backends/rpm/base.py
-@@ -63,11 +63,23 @@ def getTS(new=False):
- if sysconf.get("rpm-dbpath"):
- rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
- getTS.ts = rpm.ts(getTS.root)
-- if not sysconf.get("rpm-check-signatures", False):
-- if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-- getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-- else:
-- raise Error, _("rpm requires checking signatures")
-+
-+ # _RPMVSF_NOSIGNATURES is not supported in RPMv5, so here uses
-+ # RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|RPMVSF_NODSA|RPMVSF_NORSA
-+ # to replace '_RPMVSF_NOSIGNATURES' to continue to support check
-+ # rpm signatures
-+
-+ #if not sysconf.get("rpm-check-signatures", False):
-+ # if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-+ # getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-+ # else:
-+ # raise Error, _("rpm requires checking signatures")
-+ if sysconf.get("rpm-check-signatures") == False:
-+ getTS.ts.setVSFlags(rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER|\
-+ rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA)
-+ else:
-+ getTS.ts.setVSFlags(0)
-+
- rpm_dbpath = sysconf.get("rpm-dbpath", "var/lib/rpm")
- dbdir = rpm_join_dbpath(getTS.root, rpm_dbpath)
- if not os.path.isdir(dbdir):
-@@ -89,11 +101,22 @@ def getTS(new=False):
- if sysconf.get("rpm-dbpath"):
- rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
- ts = rpm.ts(getTS.root)
-- if not sysconf.get("rpm-check-signatures", False):
-- if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-- ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-- else:
-- raise Error, _("rpm requires checking signatures")
-+
-+ # _RPMVSF_NOSIGNATURES is not supported in RPMv5, so here uses
-+ # RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|RPMVSF_NODSA|RPMVSF_NORSA
-+ # to replace '_RPMVSF_NOSIGNATURES' to continue to support check
-+ # rpm signatures
-+
-+ #if not sysconf.get("rpm-check-signatures", False):
-+ # if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-+ # ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-+ # else:
-+ # raise Error, _("rpm requires checking signatures")
-+ if sysconf.get("rpm-check-signatures") == False:
-+ ts.setVSFlags(rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER|\
-+ rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA)
-+ else:
-+ ts.setVSFlags(0)
- return ts
- else:
- return getTS.ts
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index b57a844..7b651b5 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -180,7 +180,7 @@ class RPMPackageManager(PackageManager):
- fd = os.open(path, os.O_RDONLY)
- try:
- h = ts.hdrFromFdno(fd)
-- if sysconf.get("rpm-check-signatures", False):
-+ if sysconf.get("rpm-check-signatures", True):
- if get_public_key(h) == '(none)':
- raise rpm.error('package is not signed')
- except rpm.error, e:
-diff --git a/smart/plugins/yumchannelsync.py b/smart/plugins/yumchannelsync.py
-index f8107e6..2dc5482 100644
---- a/smart/plugins/yumchannelsync.py
-+++ b/smart/plugins/yumchannelsync.py
-@@ -56,8 +56,9 @@ def _getreleasever():
-
- rpmroot = sysconf.get("rpm-root", "/")
- ts = rpmUtils.transaction.initReadOnlyTransaction(root=rpmroot)
-- if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'):
-- ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-+ #_RPMVSF_NOSIGNATURES is not supported in RPMv5
-+ #if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'):
-+ # ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
- releasever = None
- # HACK: we're hard-coding the most used distros, will add more if needed
- idx = ts.dbMatch('provides', 'fedora-release')
---
-1.9.1
-
diff --git a/meta/recipes-devtools/python/python-smartpm_git.bb b/meta/recipes-devtools/python/python-smartpm_git.bb
deleted file mode 100644
index 861910cc29..0000000000
--- a/meta/recipes-devtools/python/python-smartpm_git.bb
+++ /dev/null
@@ -1,141 +0,0 @@
-SUMMARY = "The Smart Package Manager"
-DESCRIPTION = "The Smart Package Manager project has the ambitious objective of creating \
-smart and portable algorithms for solving adequately the problem of managing software \
-upgrades and installation."
-
-HOMEPAGE = "http://labix.org/smart/"
-SECTION = "devel/python"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
-
-DEPENDS = "python rpm gettext-native python-rpm"
-SRCNAME = "smart"
-
-SRC_URI = "\
- git://github.com/smartpm/smart.git \
- file://smart-recommends.patch \
- file://smart-channelsdir.patch \
- file://smart-rpm-transaction-failure-check.patch \
- file://smart-attempt.patch \
- file://smart-attempt-fix.patch \
- file://smart-add-for-rpm-ignoresize-check.patch \
- file://smart-already-installed-message.patch \
- file://smart-set-noprogress-for-pycurl.patch \
- file://smart-cache.py-getPackages-matches-name-version.patch \
- file://smart-channel-remove-all.patch \
- file://smart-locale.patch \
- file://smartpm-rpm5-support-check-signatures.patch \
- file://smart-add-deugging-when-targetpath-is-empty.patch \
- file://channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch \
- "
-
-SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"
-PV = "1.5+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-# Options - rpm, qt4, gtk
-PACKAGECONFIG ??= "rpm"
-
-RPM_RDEP = "${PN}-backend-rpm"
-QT_RDEP = "${PN}-interface-qt4"
-GTK_RDEP = "${PN}-interface-gtk"
-
-RPM_RDEP_class-native = ""
-QT_RDEP_class-native = ""
-GTK_RDEP_class-native = ""
-
-RPM_RDEP_class-nativesdk = ""
-QT_RDEP_class-nativesdk = ""
-GTK_RDEP_class-nativesdk = ""
-
-PACKAGECONFIG[rpm] = ",,rpm,${RPM_RDEP}"
-PACKAGECONFIG[qt4] = ",,qt4-x11,${QT_RDEP}"
-PACKAGECONFIG[gtk] = ",,gtk+,${GTK_RDEP}"
-
-inherit distutils
-
-do_install_append() {
- # We don't support the following items
- rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/slack
- rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/arch
- rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt
-
- # Temporary, debian support in OE is missing the python module
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/aptchannelsync.py*
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/debdir.py*
- rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/deb
-
- # Disable automatic channel detection
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/detectsys.py*
-
- # Disable landscape support
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/landscape.py*
-
- # Disable urpmi channel support
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/urpmichannelsync.py*
-
- # Disable yum channel support
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/yumchannelsync.py*
-
- # Disable zypper channel support
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/zyppchannelsync.py*
-
- if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'rpm', 'rpm', '', d)}" ]; then
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/rpmdir.py*
- rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm
- fi
-
- if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'qt4', 'qt4', '', d)}" ]; then
- rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4
- fi
-
- if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'gtk', '', d)}" ]; then
- rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk
- fi
-}
-
-add_native_wrapper() {
- create_wrapper ${D}/${bindir}/smart \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-}
-
-do_install_append_class-native() {
- sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' ${D}${bindir}/smart
- add_native_wrapper
-}
-
-do_install_append_class-nativesdk() {
- add_native_wrapper
-}
-
-PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-doc smartpm \
- ${@bb.utils.contains('PACKAGECONFIG', 'rpm', '${PN}-backend-rpm', '', d)} \
- ${@bb.utils.contains('PACKAGECONFIG', 'qt4', '${PN}-interface-qt4', '', d)} \
- ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '${PN}-interface-gtk', '', d)} \
- ${PN}-interface-images ${PN}"
-
-RDEPENDS_smartpm = "${PN}"
-
-RDEPENDS_${PN} += "${PN}-backend-rpm python-codecs python-textutils python-xml python-fcntl \
- python-pickle python-crypt python-compression python-shell \
- python-resource python-netclient python-threading python-unixadmin python-pprint"
-RDEPENDS_${PN}_class-native = ""
-
-RDEPENDS_${PN}-backend-rpm = "python-rpm"
-
-RDEPENDS_${PN}-interface-qt4 = "qt4-x11 ${PN}-interface-images"
-RDEPENDS_${PN}-interface-gtk = "gtk+ ${PN}-interface-images"
-
-FILES_smartpm = "${bindir}/smart"
-
-FILES_${PN}-backend-rpm = "${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm"
-
-FILES_${PN}-interface-qt4 = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4"
-FILES_${PN}-interface-gtk = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk"
-FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/meta/recipes-devtools/python/python-smmap.inc b/meta/recipes-devtools/python/python-smmap.inc
index d67e6b5412..b878b4b399 100644
--- a/meta/recipes-devtools/python/python-smmap.inc
+++ b/meta/recipes-devtools/python/python-smmap.inc
@@ -4,16 +4,17 @@ help unifying memory mapped access on 32 and 64 bit systems and to help \
managing resources more efficiently."
HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
SECTION = "devel/python"
-LICENSE = "BSD"
+LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665b9a75d6afb7709"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/smmap/smmap-${PV}.tar.gz"
-SRC_URI[md5sum] = "d7932d5ace206bf4ae15198cf36fb6ab"
-SRC_URI[sha256sum] = "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
+inherit pypi
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/smmap/"
-UPSTREAM_CHECK_REGEX = "/smmap/(?P<pver>(\d+[\.\-_]*)+)"
+PYPI_PACKAGE = "smmap2"
-S = "${WORKDIR}/smmap-${PV}"
+SRC_URI[md5sum] = "1c59a985be5aa645c4c5a4e063a40dd5"
+SRC_URI[sha256sum] = "29a9ffa0497e7f2be94ca0ed1ca1aa3cd4cf25a1f6b4f5f87f74b46ed91d609a"
-BBCLASSEXTEND = "nativesdk"
+RDEPENDS_${PN} += "${PYTHON_PN}-codecs \
+ ${PYTHON_PN}-mmap \
+"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-smmap_0.9.0.bb b/meta/recipes-devtools/python/python-smmap_0.9.0.bb
deleted file mode 100644
index c118dd8d63..0000000000
--- a/meta/recipes-devtools/python/python-smmap_0.9.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require python-smmap.inc
-
-inherit setuptools
-
-RDEPENDS_${PN} += "python-codecs python-mmap python-lang"
diff --git a/meta/recipes-devtools/python/python-subunit.inc b/meta/recipes-devtools/python/python-subunit.inc
new file mode 100644
index 0000000000..afaaa51fa5
--- /dev/null
+++ b/meta/recipes-devtools/python/python-subunit.inc
@@ -0,0 +1,14 @@
+SUMMARY = "Python implementation of subunit test streaming protocol"
+HOMEPAGE = "https://pypi.python.org/pypi/python-subunit/"
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://README.rst;beginline=1;endline=20;md5=909c08e291647fd985fbe5d9836d51b6"
+
+PYPI_PACKAGE = "python-subunit"
+
+SRC_URI[md5sum] = "16d468a3aeafe6c60a0c3b2b9132d65b"
+SRC_URI[sha256sum] = "9607edbee4c1e5a30ff88549ce8d9feb0b9bcbcb5e55033a9d76e86075465cbb"
+
+inherit pypi
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python-testtools.inc b/meta/recipes-devtools/python/python-testtools.inc
new file mode 100644
index 0000000000..d0b2e46d7b
--- /dev/null
+++ b/meta/recipes-devtools/python/python-testtools.inc
@@ -0,0 +1,28 @@
+SUMMARY = "Extensions to the Python standard library unit testing framework"
+HOMEPAGE = "https://pypi.python.org/pypi/testtools/"
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e2c9d3e8ba7141c83bfef190e0b9379a"
+
+inherit pypi
+
+SRC_URI[md5sum] = "0f0feb915497816cb99e39437494217e"
+SRC_URI[sha256sum] = "5827ec6cf8233e0f29f51025addd713ca010061204fdea77484a2934690a0559"
+
+DEPENDS += " \
+ ${PYTHON_PN}-pbr \
+ "
+
+# Satisfy setup.py 'setup_requires'
+DEPENDS += " \
+ ${PYTHON_PN}-pbr-native \
+ "
+
+RDEPENDS_${PN} += "\
+ ${PYTHON_PN}-doctest \
+ ${PYTHON_PN}-extras \
+ ${PYTHON_PN}-pbr \
+ ${PYTHON_PN}-six \
+ "
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc
index 79a431c7ea..110ec315d9 100644
--- a/meta/recipes-devtools/python/python.inc
+++ b/meta/recipes-devtools/python/python.inc
@@ -5,20 +5,33 @@ SECTION = "devel/python"
# bump this on every change in contrib/python/generate-manifest-2.7.py
INC_PR = "r1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+ "
-SRC_URI[md5sum] = "57dffcee9cee8bb2ab5f82af1d8e9a69"
-SRC_URI[sha256sum] = "d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978"
+SRC_URI[md5sum] = "b3b6d2c92f42a60667814358ab9f0cfd"
+SRC_URI[sha256sum] = "4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41"
# python recipe is actually python 2.x
# also, exclude pre-releases for both python 2.x and 3.x
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>2(\.\d+)+).tar"
+CVE_PRODUCT = "python"
+
+# Upstream agreement is that these are not security issues:
+# https://bugs.python.org/issue32367
+CVE_CHECK_WHITELIST += "CVE-2017-17522"
+# https://bugs.python.org/issue32056
+CVE_CHECK_WHITELIST += "CVE-2017-18207"
+
+# Windows-only, "It was determined that this is a longtime behavior
+# of Python that cannot really be altered at this point."
+CVE_CHECK_WHITELIST += "CVE-2015-5652"
+
PYTHON_MAJMIN = "2.7"
-inherit autotools
+inherit autotools pkgconfig
EXTRA_OECONF = "\
--with-threads \
@@ -28,5 +41,16 @@ EXTRA_OECONF = "\
--enable-shared \
--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \
ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no \
- ${PYTHONLSBOPTS} \
"
+
+do_configure_prepend() {
+ libdirleaf="$(echo ${libdir} | sed -e 's:${prefix}/::')"
+ sed -i -e "s:SEDMELIBLEAF:${libdirleaf}:g" \
+ ${S}/configure.ac
+}
+
+do_install_append () {
+ sed -i -e 's:${HOSTTOOLS_DIR}/install:install:g' \
+ -e 's:${HOSTTOOLS_DIR}/mkdir:mkdir:g' \
+ ${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+}
diff --git a/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch b/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
new file mode 100644
index 0000000000..2ff2ccc43d
--- /dev/null
+++ b/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
@@ -0,0 +1,59 @@
+From 77bcb3238b2853d511714544e0f84a37be6c79bf Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Wed, 14 Nov 2012 14:31:24 +0000
+Subject: [PATCH] python: Resolve intermediate staging issues
+
+When cross compiling python, we used to need to install the Makefile, pyconfig.h
+and the python library to their final location before being able to compile the
+rest of python. This change allows us to point python at its own source when
+building, avoiding a variety of sysroot staging issues and simplifying the main
+python recipe.
+
+Upstream-Status: Inappropriate
+RP 2012/11/13
+
+---
+ Lib/distutils/sysconfig.py | 3 +++
+ Lib/sysconfig.py | 5 ++++-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index 2f4b8ca..15bceb5 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -31,6 +31,9 @@ else:
+ # sys.executable can be empty if argv[0] has been changed and Python is
+ # unable to retrieve the real program name
+ project_base = os.getcwd()
++_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
++if _PYTHONBUILDDIR:
++ project_base = _PYTHONBUILDDIR
+ 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
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index 9c8350d..bddbe2e 100644
+--- a/Lib/sysconfig.py
++++ b/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
++_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
+
+ def _safe_realpath(path):
+ try:
+@@ -100,7 +101,9 @@ def _safe_realpath(path):
+ except OSError:
+ return path
+
+-if sys.executable:
++if _PYTHONBUILDDIR:
++ _PROJECT_BASE = _PYTHONBUILDDIR
++elif sys.executable:
+ _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
+ else:
+ # sys.executable can be empty if argv[0] has been changed and Python is
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch b/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch
new file mode 100644
index 0000000000..6e4f820913
--- /dev/null
+++ b/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch
@@ -0,0 +1,114 @@
+From 3f49be81e31c164654aeb10b65ebade982ca2ed8 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 22 Oct 2018 15:24:48 +0800
+Subject: [PATCH] python2: use cc_basename to replace CC for checking compiler
+
+When working path contains "clang"/"gcc"/"icc", it might be part of $CC
+because of the "--sysroot" parameter. That could cause judgement error
+about clang/gcc/icc compilers. e.g.
+When "icc" is containded in working path, below errors are reported when
+compiling python:
+x86_64-wrs-linux-gcc: error: strict: No such file or directory
+x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'
+
+Here use cc_basename to replace CC for checking compiler to avoid such
+kind of issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+
+Patch orignally from Li Zhou, I just rework it to new version
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.ac | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index db1c940..dfcd89a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -684,7 +684,7 @@ AC_MSG_RESULT($with_cxx_main)
+ preset_cxx="$CXX"
+ if test -z "$CXX"
+ then
+- case "$CC" in
++ case "$cc_basename" in
+ gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
+ cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
+ esac
+@@ -757,14 +757,14 @@ rmdir CaseSensitiveTestDir
+
+ case $MACHDEP in
+ bsdos*)
+- case $CC in
++ case $cc_basename in
+ gcc) CC="$CC -D_HAVE_BSDI";;
+ esac;;
+ esac
+
+ case $ac_sys_system in
+ hp*|HP*)
+- case $CC in
++ case $cc_basename in
+ cc|*/cc) CC="$CC -Ae";;
+ esac;;
+ SunOS*)
+@@ -1084,7 +1084,7 @@ then
+ fi
+
+ # Clang also needs -fwrapv
+- case $CC in
++ case $cc_basename in
+ *clang*) WRAP="-fwrapv"
+ ;;
+ esac
+@@ -1304,7 +1304,7 @@ yes)
+ esac
+
+ # ICC needs -fp-model strict or floats behave badly
+-case "$CC" in
++case "$cc_basename" in
+ *icc*)
+ BASECFLAGS="$BASECFLAGS -fp-model strict"
+ ;;
+@@ -1443,7 +1443,7 @@ else
+ fi],
+ [AC_MSG_RESULT(no)])
+ if test "$Py_LTO" = 'true' ; then
+- case $CC in
++ case $cc_basename in
+ *clang*)
+ # Any changes made here should be reflected in the GCC+Darwin case below
+ LTOFLAGS="-flto"
+@@ -1508,7 +1508,7 @@ then
+ fi
+ fi
+ LLVM_PROF_ERR=no
+-case $CC in
++case $cc_basename in
+ *clang*)
+ # Any changes made here should be reflected in the GCC+Darwin case below
+ PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+@@ -2322,7 +2322,7 @@ then
+ then CCSHARED="-fPIC"
+ else CCSHARED="-Kpic -belf"
+ fi;;
+- IRIX*/6*) case $CC in
++ IRIX*/6*) case $cc_basename in
+ *gcc*) CCSHARED="-shared";;
+ *) CCSHARED="";;
+ esac;;
+@@ -2366,7 +2366,7 @@ then
+ then
+ LINKFORSHARED="-Wl,--export-dynamic"
+ fi;;
+- SunOS/5*) case $CC in
++ SunOS/5*) case $cc_basename in
+ *gcc*)
+ if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
+ then
+--
+2.7.4
+
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 b2a8c3b5a3..b02c09458f 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
@@ -9,19 +9,14 @@ 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.12/Makefile.pre.in
+Rebased for python-2.7.14
+Signed-off-by: Derek Straka <derek@asterius.io>
+
+Index: Python-2.7.13/Makefile.pre.in
===================================================================
---- Python-2.7.12.orig/Makefile.pre.in
-+++ Python-2.7.12/Makefile.pre.in
-@@ -246,6 +246,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
- ##########################################################################
- # Parser
- PGEN= Parser/pgen$(EXE)
-+HOSTPGEN= $(PGEN)$(EXE)
-
- PSRCS= \
- Parser/acceler.c \
-@@ -513,7 +514,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
+--- Python-2.7.13.orig/Makefile.pre.in
++++ Python-2.7.13/Makefile.pre.in
+@@ -512,7 +513,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON) pybuilddir.txt
@@ -30,53 +25,10 @@ Index: Python-2.7.12/Makefile.pre.in
# Create build directory and generate the sysconfig build-time data there.
# pybuilddir.txt contains the name of the build dir and is used for
-@@ -684,7 +685,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
- @$(MKDIR_P) Include
- # Avoid copying the file onto itself for an in-tree build
- if test "$(cross_compiling)" != "yes"; then \
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
- else \
- cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \
- mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \
-@@ -1133,27 +1134,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
- $(DESTDIR)$(LIBDEST)/distutils/tests ; \
- fi
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(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) \
-- $(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) \
-- $(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) \
-- $(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) \
-- $(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):
-Index: Python-2.7.12/setup.py
+Index: Python-2.7.13/setup.py
===================================================================
---- Python-2.7.12.orig/setup.py
-+++ Python-2.7.12/setup.py
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
@@ -350,6 +350,7 @@ class PyBuildExt(build_ext):
self.failed.append(ext.name)
self.announce('*** WARNING: renaming "%s" since importing it'
diff --git a/meta/recipes-devtools/python/python/CVE-2016-5636.patch b/meta/recipes-devtools/python/python/CVE-2016-5636.patch
deleted file mode 100644
index 9a37471459..0000000000
--- a/meta/recipes-devtools/python/python/CVE-2016-5636.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1453357424 28800
-# Node ID 985fc64c60d6adffd1138b6cc46df388ca91ca5d
-# Parent 7ec954b9fc54448a35b56d271340ba109eb381b9
-prevent buffer overflow in get_data (closes #26171)
-
-Upstream-Status: Backport
-https://hg.python.org/cpython/rev/985fc64c60d6
-
-CVE: CVE-2016-5636
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: Python-2.7.11/Misc/NEWS
-===================================================================
---- Python-2.7.11.orig/Misc/NEWS
-+++ Python-2.7.11/Misc/NEWS
-@@ -7,6 +7,9 @@ What's New in Python 2.7.11?
-
- *Release date: 2015-12-05*
-
-+- Issue #26171: Fix possible integer overflow and heap corruption in
-+ zipimporter.get_data().
-+
- Library
- -------
-
-Index: Python-2.7.11/Modules/zipimport.c
-===================================================================
---- Python-2.7.11.orig/Modules/zipimport.c
-+++ Python-2.7.11/Modules/zipimport.c
-@@ -895,6 +895,11 @@ get_data(char *archive, PyObject *toc_en
- PyMarshal_ReadShortFromFile(fp); /* local header size */
- file_offset += l; /* Start of file data */
-
-+ if (data_size > LONG_MAX - 1) {
-+ fclose(fp);
-+ PyErr_NoMemory();
-+ return NULL;
-+ }
- raw_data = PyString_FromStringAndSize((char *)NULL, compress == 0 ?
- data_size : data_size + 1);
- if (raw_data == NULL) {
diff --git a/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index a97ff6b250..329734064b 100644
--- a/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -13,11 +13,11 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: Python-2.7.11/configure.ac
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.11.orig/configure.ac
-+++ Python-2.7.11/configure.ac
-@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -36,7 +36,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
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
deleted file mode 100644
index 8012245afe..0000000000
--- a/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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 3347321fde..287095f615 100644
--- a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@ Upstream-Status: Inappropriate [distribution]
Also simply disable the tk module since its not in DEPENDS.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.13/setup.py
===================================================================
---- 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 @@
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
+@@ -1783,10 +1783,12 @@ class PyBuildExt(build_ext):
+ self.extensions.extend(exts)
+
# 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')
@@ -22,18 +25,5 @@ Index: Python-2.7.2/setup.py
+ #if '_tkinter' not in [e.name for e in self.extensions]:
+ # missing.append('_tkinter')
- return missing
-
-diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
-index b4633b9..d7588c0 100644
---- Python-3.5.1.orig/setup.py
-+++ Python-3.5.1/setup.py
-@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
- self.extensions.extend(exts)
-
- # Call the method for detecting whether _tkinter can be compiled
-- self.detect_tkinter(inc_dirs, lib_dirs)
-+ # self.detect_tkinter(inc_dirs, lib_dirs)
-
- # tkinter module will not be avalaible as yocto
- # doesn't have tk integrated (yet)
+ ## # Uncomment these lines if you want to play with xxmodule.c
+ ## ext = Extension('xx', ['xxmodule.c'])
diff --git a/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch b/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
index 337e0e3e29..8ba5823014 100644
--- a/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
+++ b/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
@@ -5,12 +5,12 @@ Upstream-Status: Inappropriate [distribution]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.13/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 22:29:18.049196608 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 22:29:57.505195453 +0300
-@@ -1522,8 +1522,9 @@
- if platform == 'sunos5':
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
+@@ -1671,8 +1671,9 @@ class PyBuildExt(build_ext):
+ if host_platform == 'sunos5':
# SunOS specific modules
exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
- else:
@@ -19,5 +19,5 @@ Index: Python-2.7.2/setup.py
+ #else:
+ # missing.append('sunaudiodev')
- if platform == 'darwin':
+ if host_platform == 'darwin':
# _scproxy
diff --git a/meta/recipes-devtools/python/python/builddir.patch b/meta/recipes-devtools/python/python/builddir.patch
deleted file mode 100644
index ad629a022e..0000000000
--- a/meta/recipes-devtools/python/python/builddir.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-When cross compiling python, we used to need to install the Makefile, pyconfig.h
-and the python library to their final location before being able to compile the
-rest of python. This change allows us to point python at its own source when
-building, avoiding a variety of sysroot staging issues and simplifying the main
-python recipe.
-
-Upstream-Status: Inappropriate
-RP 2012/11/13
-
-Index: Python-2.7.9/Lib/sysconfig.py
-===================================================================
---- 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
-+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
-
- def _safe_realpath(path):
- try:
-@@ -100,7 +101,9 @@ def _safe_realpath(path):
- except OSError:
- return path
-
--if sys.executable:
-+if _PYTHONBUILDDIR:
-+ _PROJECT_BASE = _PYTHONBUILDDIR
-+elif sys.executable:
- _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.9/Lib/distutils/sysconfig.py
-===================================================================
---- 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))
-+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
-+if _PYTHONBUILDDIR:
-+ project_base = _PYTHONBUILDDIR
- 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
diff --git a/meta/recipes-devtools/python/python/create_manifest2.py b/meta/recipes-devtools/python/python/create_manifest2.py
new file mode 100644
index 0000000000..34659515cb
--- /dev/null
+++ b/meta/recipes-devtools/python/python/create_manifest2.py
@@ -0,0 +1,298 @@
+# This script is used as a bitbake task to create a new python manifest
+# $ bitbake python -c create_manifest
+#
+# Our goal is to keep python-core as small as posible and add other python
+# packages only when the user needs them, hence why we split upstream python
+# into several packages.
+#
+# In a very simplistic way what this does is:
+# Launch python and see specifically what is required for it to run at a minimum
+#
+# Go through the python-manifest file and launch a separate task for every single
+# one of the files on each package, this task will check what was required for that
+# specific module to run, these modules will be called dependencies.
+# The output of such task will be a list of the modules or dependencies that were
+# found for that file.
+#
+# Such output will be parsed by this script, we will look for each dependency on the
+# manifest and if we find that another package already includes it, then we will add
+# that package as an RDEPENDS to the package we are currently checking; in case we dont
+# find the current dependency on any other package we will add it to the current package
+# as part of FILES.
+#
+#
+# This way we will create a new manifest from the data structure that was built during
+# this process, on this new manifest each package will contain specifically only
+# what it needs to run.
+#
+# There are some caveats which we try to deal with, such as repeated files on different
+# packages, packages that include folders, wildcards, and special packages.
+# Its also important to note that this method only works for python files, and shared
+# libraries. Static libraries, header files and binaries need to be dealt with manually.
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29 at gmail dot com>
+
+
+import sys
+import subprocess
+import json
+import os
+import collections
+
+# Hack to get native python search path (for folders), not fond of it but it works for now
+pivot='recipe-sysroot-native'
+for p in sys.path:
+ if pivot in p:
+ nativelibfolder=p[:p.find(pivot)+len(pivot)]
+
+# Empty dict to hold the whole manifest
+new_manifest = collections.OrderedDict()
+
+# Check for repeated files, folders and wildcards
+allfiles=[]
+repeated=[]
+wildcards=[]
+
+hasfolders=[]
+allfolders=[]
+
+def isFolder(value):
+ if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+ return True
+ else:
+ return False
+
+def prepend_comments(comments, json_manifest):
+ with open(json_manifest, 'r+') as manifest:
+ json_contents = manifest.read()
+ manifest.seek(0, 0)
+ manifest.write(comments + json_contents)
+
+# Read existing JSON manifest
+with open('python2-manifest.json') as manifest:
+ # The JSON format doesn't allow comments so we hack the call to keep the comments using a marker
+ manifest_str = manifest.read()
+ json_start = manifest_str.find('# EOC') + 6 # EOC + \n
+ manifest.seek(0)
+ comments = manifest.read(json_start)
+ manifest_str = manifest.read()
+ old_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
+
+# First pass to get core-package functionality, because we base everything on the fact that core is actually working
+# Not exactly the same so it should not be a function
+print ("Getting dependencies for core package:")
+
+# Special call to check for core package
+output = subprocess.check_output([sys.executable, 'get_module_deps2.py', 'python-core-package'])
+for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if item not in old_manifest['core']['files']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['files'].append(item)
+
+for value in old_manifest['core']['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass it directly
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ # Ignore binaries, since we don't import those, assume it was added correctly (manually)
+ if '${bindir}' in value:
+ # Pass it directly
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Get module name , shouldnt be affected by libdir/bindir
+ value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('Getting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
+ for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if item not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(item)
+
+# We check which packages include folders
+for key in old_manifest:
+ for value in old_manifest[key]['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ print ('%s is a folder' % value)
+ if key not in hasfolders:
+ hasfolders.append(key)
+ if value not in allfolders:
+ allfolders.append(value)
+
+for key in old_manifest:
+ # Use an empty dict as data structure to hold data for each package and fill it up
+ new_manifest[key] = collections.OrderedDict()
+ new_manifest[key]['summary'] = old_manifest[key]['summary']
+ new_manifest[key]['rdepends']=[]
+ new_manifest[key]['files'] = []
+
+ # All packages should depend on core
+ if key != 'core':
+ new_manifest[key]['rdepends'].append('core')
+
+ # Handle special cases, we assume that when they were manually added
+ # to the manifest we knew what we were doing.
+ print ('Handling package %s' % key)
+ special_packages=['misc', 'modules', 'tests', 'dev']
+ if key in special_packages or 'staticdev' in key:
+ print('Passing %s package directly' % key)
+ new_manifest[key]=old_manifest[key]
+ continue
+
+ for value in old_manifest[key]['files']:
+ # We already handled core on the first pass
+ if key == 'core':
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass folders directly
+ new_manifest[key]['files'].append(value)
+ # Ignore binaries, since we don't import those
+ if '${bindir}' in value:
+ # Pass it directly to the new manifest data structure
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+ # Get module name , shouldnt be affected by libdir/bindir
+ value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('Getting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
+
+ # We can print dependencies for debugging purposes
+ #print (output)
+ # Output will have all dependencies
+ for item in output.split():
+
+ # Warning: This first part is ugly
+ # One of the dependencies that was found, could be inside of one of the folders included by another package
+ # We need to check if this happens so we can add the package containing the folder as an RDEPENDS
+ # e.g. Folder encodings contained in codecs
+ # This would be solved if no packages included any folders
+
+ # This can be done in two ways:
+ # 1 - We assume that if we take out the filename from the path we would get
+ # the folder string, then we would check if folder string is in the list of folders
+ # This would not work if a package contains a folder which contains another folder
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # folder_string would not match any value contained in the list of folders
+ #
+ # 2 - We do it the other way around, checking if the folder is contained in the path
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # is folder_string inside path/folder1/folder2/filename?,
+ # Yes, it works, but we waste a couple of milliseconds.
+
+ inFolders=False
+ for folder in allfolders:
+ # The module could have a directory named after it, e.g. xml, if we take out the filename from the path
+ # we'll end up with ${libdir}, and we want ${libdir}/xml
+ if isFolder(item):
+ check_path = item
+ else:
+ check_path = os.path.dirname(item)
+ if folder in check_path :
+ inFolders = True # Did we find a folder?
+ folderFound = False # Second flag to break inner for
+ # Loop only through packages which contain folders
+ for keyfolder in hasfolders:
+ if (folderFound == False):
+ #print("Checking folder %s on package %s" % (item,keyfolder))
+ for file_folder in old_manifest[keyfolder]['files']:
+ if file_folder==folder:
+ print ('%s found in %s' % (folder, keyfolder))
+ folderFound = True
+ if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
+ new_manifest[key]['rdepends'].append(keyfolder)
+ else:
+ break
+
+ # A folder was found so we're done with this item, we can go on
+ if inFolders:
+ continue
+
+ # We might already have it on the dictionary since it could depend on a (previously checked) module
+ if item not in new_manifest[key]['files']:
+ # Handle core as a special package, we already did it so we pass it to NEW data structure directly
+ if key=='core':
+ print('Adding %s to %s FILES' % (item, key))
+ if item.endswith('*'):
+ wildcards.append(item)
+ new_manifest[key]['files'].append(item)
+
+ # Check for repeated files
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+ else:
+
+ # Check if this dependency is already contained on another package, so we add it
+ # as an RDEPENDS, or if its not, it means it should be contained on the current
+ # package, so we should add it to FILES
+ for newkey in old_manifest:
+ # Debug
+ #print("Checking %s " % item + " in %s" % newkey)
+ if item in old_manifest[newkey]['files']:
+ # Since were nesting, we need to check its not the same key
+ if(newkey!=key):
+ if newkey not in new_manifest[key]['rdepends']:
+ # Add it to the new manifest data struct
+ # Debug
+ print('Adding %s to %s RDEPENDS, because it contains %s' % (newkey, key, item))
+ new_manifest[key]['rdepends'].append(newkey)
+ break
+ else:
+ # Debug
+ print('Adding %s to %s FILES' % (item, key))
+ # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
+ new_manifest[key]['files'].append(item)
+ if item.endswith('*'):
+ wildcards.append(item)
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+print ('The following files are repeated (contained in more than one package), please check which package should get it:')
+print (repeated)
+print('The following files contain wildcards, please check they are necessary')
+print(wildcards)
+print('The following files contain folders, please check they are necessary')
+print(hasfolders)
+
+# Sort it just so it looks nice
+for key in new_manifest:
+ new_manifest[key]['files'].sort()
+ new_manifest[key]['rdepends'].sort()
+
+# Create the manifest from the data structure that was built
+with open('python2-manifest.json.new','w') as outfile:
+ json.dump(new_manifest,outfile, indent=4)
+
+prepend_comments(comments,'python2-manifest.json.new')
diff --git a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
deleted file mode 100644
index 669112dab0..0000000000
--- a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Add 'build-test' and 'runtest-TESTS' targets to Makefile, to build and run tests
-cross-compiled.
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
----
-diff -ruN a/Makefile.pre.in b/Makefile.pre.in
---- a/Makefile.pre.in 2013-06-27 10:44:11.033840532 +0200
-+++ b/Makefile.pre.in 2013-06-27 10:44:39.572635273 +0200
-@@ -709,14 +709,19 @@
- # generated bytecode. This is sometimes a very shy bug needing a lot of
- # sample data.
-
--TESTOPTS= -l $(EXTRATESTOPTS)
-+TESTOPTS= -l -v $(EXTRATESTOPTS)
- TESTPROG= $(srcdir)/Lib/test/regrtest.py
--TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
--test: all platform
-- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-+TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
-+test: build-test
-+ $(MAKE) runtest-TESTS
-+
-+runtest-TESTS:
-+ -find $(srcdir) -name '*.py[co]' -print | xargs rm -f
- -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
- $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-
-+build-test: all platform
-+
- testall: all platform
- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
- $(TESTPYTHON) $(srcdir)/Lib/compileall.py
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 5f7309367c..d41b6cfc74 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
@@ -41,37 +41,37 @@ Index: Python-2.7.9/Makefile.pre.in
===================================================================
--- 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
+@@ -1037,27 +1037,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) \
- $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ $(PYTHON_FOR_BUILD) -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 $(DESTDIR)$(LIBDEST)/compileall.py \
++ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -tt -O $(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 $(DESTDIR)$(LIBDEST)/compileall.py \
+ $(PYTHON_FOR_BUILD) -Wi -t $(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 -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ $(PYTHON_FOR_BUILD) -Wi -t -O $(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) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+ $(PYTHON_FOR_BUILD) -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
+ $(PYTHON_FOR_BUILD) -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/float-endian.patch b/meta/recipes-devtools/python/python/float-endian.patch
new file mode 100644
index 0000000000..8a5c90aec4
--- /dev/null
+++ b/meta/recipes-devtools/python/python/float-endian.patch
@@ -0,0 +1,216 @@
+Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles,
+and falls back onto "I don't know" if it can't run code. This results in
+crippled floating point numbers in Python, and the regression tests fail.
+
+Instead of running code, take a macro from autoconf-archive which compiles C
+with a special double in which has an ASCII representation, and then greps the
+binary to identify the format.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 253f47b28120c42cfe53a4e2f5ed0ab0ed469deb Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross@burtonini.com>
+Date: Wed, 19 Sep 2018 07:25:48 +0100
+Subject: [PATCH] closes bpo-34585: Don't do runtime test to get float byte
+ order. (GH-9085)
+
+Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly.
+
+Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary.
+
+RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ .../Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst | 3 +
+ configure.ac | 76 ++++----------------
+ m4/ax_c_float_words_bigendian.m4 | 83 ++++++++++++++++++++++
+ 3 files changed, 99 insertions(+), 63 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst
+ create mode 100644 m4/ax_c_float_words_bigendian.m4
+
+diff --git a/configure.ac b/configure.ac
+index 913d5469d0..7672735396 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3835,74 +3835,24 @@ fi],
+ # * Check for various properties of floating point *
+ # **************************************************
+
+-AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_little_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_little_endian_double=yes],
+-[ac_cv_little_endian_double=no],
+-[ac_cv_little_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_little_endian_double)
+-if test "$ac_cv_little_endian_double" = yes
+-then
+- AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
+- [Define if C doubles are 64-bit IEEE 754 binary format, stored
+- with the least significant byte first])
+-fi
+-
+-AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_big_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_big_endian_double=yes],
+-[ac_cv_big_endian_double=no],
+-[ac_cv_big_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_big_endian_double)
+-if test "$ac_cv_big_endian_double" = yes
++AX_C_FLOAT_WORDS_BIGENDIAN
++if test "$ax_cv_c_float_words_bigendian" = "yes"
+ then
+ AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
+ [Define if C doubles are 64-bit IEEE 754 binary format, stored
+ with the most significant byte first])
+-fi
+-
+-# Some ARM platforms use a mixed-endian representation for doubles.
+-# While Python doesn't currently have full support for these platforms
+-# (see e.g., issue 1762561), we can at least make sure that float <-> string
+-# conversions work.
+-AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_mixed_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_mixed_endian_double=yes],
+-[ac_cv_mixed_endian_double=no],
+-[ac_cv_mixed_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_mixed_endian_double)
+-if test "$ac_cv_mixed_endian_double" = yes
++elif test "$ax_cv_c_float_words_bigendian" = "no"
+ then
++ AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
++ [Define if C doubles are 64-bit IEEE 754 binary format, stored
++ with the least significant byte first])
++else
++ # Some ARM platforms use a mixed-endian representation for doubles.
++ # While Python doesn't currently have full support for these platforms
++ # (see e.g., issue 1762561), we can at least make sure that float <-> string
++ # conversions work.
++ # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
++ # or little, then it must be this?
+ AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
+ [Define if C doubles are 64-bit IEEE 754 binary format, stored
+ in ARM mixed-endian order (byte order 45670123)])
+diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4
+new file mode 100644
+index 0000000000..216b90d803
+--- /dev/null
++++ b/m4/ax_c_float_words_bigendian.m4
+@@ -0,0 +1,83 @@
++# ===============================================================================
++# https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html
++# ===============================================================================
++#
++# SYNOPSIS
++#
++# AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
++#
++# DESCRIPTION
++#
++# Checks the ordering of words within a multi-word float. This check is
++# necessary because on some systems (e.g. certain ARM systems), the float
++# word ordering can be different from the byte ordering. In a multi-word
++# float context, "big-endian" implies that the word containing the sign
++# bit is found in the memory location with the lowest address. This
++# implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
++#
++# The endianness is detected by first compiling C code that contains a
++# special double float value, then grepping the resulting object file for
++# certain strings of ASCII values. The double is specially crafted to have
++# a binary representation that corresponds with a simple string. In this
++# implementation, the string "noonsees" was selected because the
++# individual word values ("noon" and "sees") are palindromes, thus making
++# this test byte-order agnostic. If grep finds the string "noonsees" in
++# the object file, the target platform stores float words in big-endian
++# order. If grep finds "seesnoon", float words are in little-endian order.
++# If neither value is found, the user is instructed to specify the
++# ordering.
++#
++# LICENSE
++#
++# Copyright (c) 2008 Daniel Amelang <dan@amelang.net>
++#
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice
++# and this notice are preserved. This file is offered as-is, without any
++# warranty.
++
++#serial 11
++
++AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
++ [AC_CACHE_CHECK(whether float word ordering is bigendian,
++ ax_cv_c_float_words_bigendian, [
++
++ax_cv_c_float_words_bigendian=unknown
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
++
++double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
++
++]])], [
++
++if grep noonsees conftest.$ac_objext >/dev/null ; then
++ ax_cv_c_float_words_bigendian=yes
++fi
++if grep seesnoon conftest.$ac_objext >/dev/null ; then
++ if test "$ax_cv_c_float_words_bigendian" = unknown; then
++ ax_cv_c_float_words_bigendian=no
++ else
++ ax_cv_c_float_words_bigendian=unknown
++ fi
++fi
++
++])])
++
++case $ax_cv_c_float_words_bigendian in
++ yes)
++ m4_default([$1],
++ [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
++ [Define to 1 if your system stores words within floats
++ with the most significant word first])]) ;;
++ no)
++ $2 ;;
++ *)
++ m4_default([$3],
++ [AC_MSG_ERROR([
++
++Unknown float word ordering. You need to manually preset
++ax_cv_c_float_words_bigendian=no (or yes) according to your system.
++
++ ])]) ;;
++esac
++
++])# AX_C_FLOAT_WORDS_BIGENDIAN
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/python/python/get_module_deps2.py b/meta/recipes-devtools/python/python/get_module_deps2.py
new file mode 100644
index 0000000000..73e7c6f6dc
--- /dev/null
+++ b/meta/recipes-devtools/python/python/get_module_deps2.py
@@ -0,0 +1,112 @@
+# This script is launched on separate task for each python module
+# It checks for dependencies for that specific module and prints
+# them out, the output of this execution will have all dependencies
+# for a specific module, which will be parsed an dealt on create_manifest.py
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+# We can get a log per module, for all the dependencies that were found, but its messy.
+debug=False
+
+import sys
+
+# We can get a list of the modules which are currently required to run python
+# so we run python-core and get its modules, we then import what we need
+# and check what modules are currently running, if we substract them from the
+# modules we had initially, we get the dependencies for the module we imported.
+
+# We use importlib to achieve this, so we also need to know what modules importlib needs
+import importlib
+
+core_deps=set(sys.modules)
+
+def fix_path(dep_path):
+ import os
+ # We DONT want the path on our HOST system
+ pivot='recipe-sysroot-native'
+ dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+
+ if '/usr/bin' in dep_path:
+ dep_path = dep_path.replace('/usr/bin''${bindir}')
+
+ # Handle multilib, is there a better way?
+ if '/usr/lib32' in dep_path:
+ dep_path = dep_path.replace('/usr/lib32','${libdir}')
+ if '/usr/lib64' in dep_path:
+ dep_path = dep_path.replace('/usr/lib64','${libdir}')
+ if '/usr/lib' in dep_path:
+ dep_path = dep_path.replace('/usr/lib','${libdir}')
+ if '/usr/include' in dep_path:
+ dep_path = dep_path.replace('/usr/include','${includedir}')
+ if '__init__.' in dep_path:
+ dep_path = os.path.split(dep_path)[0]
+
+ # If a *.pyc file was imported, we replace it with *.py (since we deal with PYCs on create_manifest)
+ if '.pyc' in dep_path:
+ dep_path = dep_path.replace('.pyc','.py')
+
+ return dep_path
+
+# Module to import was passed as an argument
+current_module = str(sys.argv[1]).rstrip()
+if(debug==True):
+ log = open('log_%s' % current_module,'w')
+ log.write('Module %s generated the following dependencies:\n' % current_module)
+try:
+ importlib.import_module('%s' % current_module)
+except ImportError as e:
+ if (debug==True):
+ log.write('Module was not found')
+ pass
+
+
+# Get current module dependencies, dif will contain a list of specific deps for this module
+module_deps=set(sys.modules)
+
+# We handle the core package (1st pass on create_manifest.py) as a special case
+if current_module == 'python-core-package':
+ dif = core_deps
+else:
+ dif = module_deps-core_deps
+
+
+# Check where each dependency came from
+for item in dif:
+ dep_path=''
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+ dep_path = sys.modules['%s' % item].__file__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __file__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'dep_path' is not defined
+ # because module is not found (wasn't compiled?), e.g. bddsm
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+
+ # Site-customize is a special case since we (OpenEmbedded) put it there manually
+ if 'sitecustomize' in dep_path:
+ dep_path = '${libdir}/python2.7/sitecustomize.py'
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+ continue
+
+ dep_path = fix_path(dep_path)
+
+ if (debug==True):
+ log.write(dep_path+'\n')
+
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+
+if debug==True:
+ log.close()
diff --git a/meta/recipes-devtools/python/python/multilib.patch b/meta/recipes-devtools/python/python/multilib.patch
index b169133d7d..d24bc15f01 100644
--- a/meta/recipes-devtools/python/python/multilib.patch
+++ b/meta/recipes-devtools/python/python/multilib.patch
@@ -1,25 +1,25 @@
Rebased for python-2.7.9
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: Python-2.7.12/configure.ac
+Upstream-Status: Pending
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.12.orig/configure.ac
-+++ Python-2.7.12/configure.ac
-@@ -756,6 +756,10 @@ SunOS*)
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -758,6 +758,10 @@ SunOS*)
;;
esac
+AC_SUBST(LIB)
+AC_MSG_CHECKING(LIB)
-+LIB=`basename ${libdir}`
++LIB="SEDMELIBLEAF"
+AC_MSG_RESULT($LIB)
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
-Index: Python-2.7.12/Include/pythonrun.h
+Index: Python-2.7.14/Include/pythonrun.h
===================================================================
---- Python-2.7.12.orig/Include/pythonrun.h
-+++ Python-2.7.12/Include/pythonrun.h
+--- Python-2.7.14.orig/Include/pythonrun.h
++++ Python-2.7.14/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -28,10 +28,10 @@ Index: Python-2.7.12/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.12/Lib/distutils/command/install.py
+Index: Python-2.7.14/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.12.orig/Lib/distutils/command/install.py
-+++ Python-2.7.12/Lib/distutils/command/install.py
+--- Python-2.7.14.orig/Lib/distutils/command/install.py
++++ Python-2.7.14/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -41,19 +41,21 @@ Index: Python-2.7.12/Lib/distutils/command/install.py
if sys.version < "2.2":
WINDOWS_SCHEME = {
'purelib': '$base',
-@@ -42,7 +44,7 @@ else:
+@@ -41,8 +43,8 @@ else:
+
INSTALL_SCHEMES = {
'unix_prefix': {
- 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.12/Lib/distutils/sysconfig.py
+Index: Python-2.7.14/Lib/distutils/sysconfig.py
===================================================================
---- Python-2.7.12.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.12/Lib/distutils/sysconfig.py
+--- Python-2.7.14.orig/Lib/distutils/sysconfig.py
++++ Python-2.7.14/Lib/distutils/sysconfig.py
@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -68,23 +70,23 @@ Index: Python-2.7.12/Lib/distutils/sysconfig.py
if standard_lib:
return libpython
else:
-Index: Python-2.7.12/Lib/pydoc.py
+Index: Python-2.7.14/Lib/pydoc.py
===================================================================
---- Python-2.7.12.orig/Lib/pydoc.py
-+++ Python-2.7.12/Lib/pydoc.py
-@@ -384,7 +384,7 @@ class Doc:
+--- Python-2.7.14.orig/Lib/pydoc.py
++++ Python-2.7.14/Lib/pydoc.py
+@@ -375,7 +375,7 @@ class Doc:
+ docmodule = docclass = docroutine = docother = docproperty = docdata = fail
+
+ def getdocloc(self, object,
+- basedir=os.path.join(sys.exec_prefix, "lib",
++ basedir=os.path.join(sys.exec_prefix, "sys.lib",
+ "python"+sys.version[0:3])):
+ """Return the location of module docs or None"""
- docloc = os.environ.get("PYTHONDOCS",
- "http://docs.python.org/library")
-- basedir = os.path.join(sys.exec_prefix, "lib",
-+ basedir = os.path.join(sys.exec_prefix, sys.lib,
- "python"+sys.version[0:3])
- if (isinstance(object, type(os)) and
- (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-2.7.12/Lib/site.py
+Index: Python-2.7.14/Lib/site.py
===================================================================
---- Python-2.7.12.orig/Lib/site.py
-+++ Python-2.7.12/Lib/site.py
+--- Python-2.7.14.orig/Lib/site.py
++++ Python-2.7.14/Lib/site.py
@@ -288,13 +288,18 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -104,13 +106,13 @@ Index: Python-2.7.12/Lib/site.py
sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
- if sys.platform == "darwin":
- # for framework builds *only* we add the standard Apple
- # locations.
-Index: Python-2.7.12/Lib/sysconfig.py
+ return sitepackages
+
+ def addsitepackages(known_paths):
+Index: Python-2.7.14/Lib/sysconfig.py
===================================================================
---- Python-2.7.12.orig/Lib/sysconfig.py
-+++ Python-2.7.12/Lib/sysconfig.py
+--- Python-2.7.14.orig/Lib/sysconfig.py
++++ Python-2.7.14/Lib/sysconfig.py
@@ -7,10 +7,10 @@ from os.path import pardir, realpath
_INSTALL_SCHEMES = {
@@ -139,10 +141,10 @@ Index: Python-2.7.12/Lib/sysconfig.py
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
-Index: Python-2.7.12/Lib/test/test_dl.py
+Index: Python-2.7.14/Lib/test/test_dl.py
===================================================================
---- Python-2.7.12.orig/Lib/test/test_dl.py
-+++ Python-2.7.12/Lib/test/test_dl.py
+--- Python-2.7.14.orig/Lib/test/test_dl.py
++++ Python-2.7.14/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -157,14 +159,14 @@ Index: Python-2.7.12/Lib/test/test_dl.py
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.12/Lib/test/test_site.py
+Index: Python-2.7.14/Lib/test/test_site.py
===================================================================
---- Python-2.7.12.orig/Lib/test/test_site.py
-+++ Python-2.7.12/Lib/test/test_site.py
-@@ -246,12 +246,16 @@ class HelperFunctionsTests(unittest.Test
- self.assertEqual(dirs[2], wanted)
+--- Python-2.7.14.orig/Lib/test/test_site.py
++++ Python-2.7.14/Lib/test/test_site.py
+@@ -252,12 +252,16 @@ class HelperFunctionsTests(unittest.Test
+ self.assertEqual(dirs[0], wanted)
elif os.sep == '/':
- # OS X non-framwework builds, Linux, FreeBSD, etc
+ # OS X, Linux, FreeBSD, etc
- self.assertEqual(len(dirs), 2)
wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
'site-packages')
@@ -181,10 +183,10 @@ Index: Python-2.7.12/Lib/test/test_site.py
else:
# other platforms
self.assertEqual(len(dirs), 2)
-Index: Python-2.7.12/Lib/trace.py
+Index: Python-2.7.14/Lib/trace.py
===================================================================
---- Python-2.7.12.orig/Lib/trace.py
-+++ Python-2.7.12/Lib/trace.py
+--- Python-2.7.14.orig/Lib/trace.py
++++ Python-2.7.14/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -198,11 +200,11 @@ Index: Python-2.7.12/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.12/Makefile.pre.in
+Index: Python-2.7.14/Makefile.pre.in
===================================================================
---- Python-2.7.12.orig/Makefile.pre.in
-+++ Python-2.7.12/Makefile.pre.in
-@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -210,7 +212,7 @@ Index: Python-2.7.12/Makefile.pre.in
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -111,7 +112,7 @@ LIBDIR= @libdir@
+@@ -110,7 +111,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -219,7 +221,7 @@ Index: Python-2.7.12/Makefile.pre.in
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -670,6 +671,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -645,6 +646,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -227,8 +229,8 @@ Index: Python-2.7.12/Makefile.pre.in
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -721,7 +723,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -693,7 +695,7 @@ regen-ast:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -236,10 +238,10 @@ Index: Python-2.7.12/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.12/Modules/getpath.c
+Index: Python-2.7.14/Modules/getpath.c
===================================================================
---- Python-2.7.12.orig/Modules/getpath.c
-+++ Python-2.7.12/Modules/getpath.c
+--- Python-2.7.14.orig/Modules/getpath.c
++++ Python-2.7.14/Modules/getpath.c
@@ -100,6 +100,13 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -263,10 +265,10 @@ Index: Python-2.7.12/Modules/getpath.c
static void
reduce(char *dir)
-Index: Python-2.7.12/Python/getplatform.c
+Index: Python-2.7.14/Python/getplatform.c
===================================================================
---- Python-2.7.12.orig/Python/getplatform.c
-+++ Python-2.7.12/Python/getplatform.c
+--- Python-2.7.14.orig/Python/getplatform.c
++++ Python-2.7.14/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -281,10 +283,10 @@ Index: Python-2.7.12/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-2.7.12/Python/sysmodule.c
+Index: Python-2.7.14/Python/sysmodule.c
===================================================================
---- Python-2.7.12.orig/Python/sysmodule.c
-+++ Python-2.7.12/Python/sysmodule.c
+--- Python-2.7.14.orig/Python/sysmodule.c
++++ Python-2.7.14/Python/sysmodule.c
@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
diff --git a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch b/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
index 951cb466ff..abab41e957 100644
--- a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
+++ b/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
@@ -8,12 +8,12 @@ Upstream-Status: Pending
--- Python-2.7.3.orig/Makefile.pre.in
+++ Python-2.7.3/Makefile.pre.in
-@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config
+@@ -1187,7 +1187,7 @@
LIBPC= $(LIBDIR)/pkgconfig
-
- libainstall: all python-config
+
+ libainstall: @DEF_MAKE_RULE@ python-config
- @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \
- do \
- if test ! -d $(DESTDIR)$$i; then \
- echo "Creating directory $$i"; \
+ do \
+ if test ! -d $(DESTDIR)$$i; then \
+ echo "Creating directory $$i"; \
diff --git a/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch
new file mode 100644
index 0000000000..44fcaacf30
--- /dev/null
+++ b/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch
@@ -0,0 +1,82 @@
+From 71447f04979b267f8866573b67a4340b2719d799 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 4 Aug 2017 14:10:43 +0800
+Subject: [PATCH] setup.py: pass missing libraries to Extension for multiprocessing module
+
+In the following commit:
+...
+commit e711cafab13efc9c1fe6c5cd75826401445eb585
+Author: Benjamin Peterson <benjamin@python.org>
+Date: Wed Jun 11 16:44:04 2008 +0000
+
+ Merged revisions 64104,64117 via svnmerge from
+ svn+ssh://pythondev@svn.python.org/python/trunk
+...
+(see diff in setup.py)
+It assigned libraries for multiprocessing module according
+the host_platform, but not pass it to Extension.
+
+In glibc, the following commit caused two definition of
+sem_getvalue are different.
+https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524
+(see diff in nptl/sem_getvalue.c for detail)
+`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1
+and `__old_sem_getvalue' is to compat the old version
+sem_getvalue@GLIBC_2.0.
+
+To build python for embedded Linux systems:
+http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html
+If not explicitly link to library pthread (-lpthread), it will
+load glibc's sem_getvalue randomly at runtime.
+
+Such as build python on linux x86_64 host and run the python
+on linux x86_32 target. If not link library pthread, it caused
+multiprocessing bounded semaphore could not work correctly.
+...
+>>> import multiprocessing
+>>> pool_sema = multiprocessing.BoundedSemaphore(value=1)
+>>> pool_sema.acquire()
+True
+>>> pool_sema.release()
+Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ValueError: semaphore or lock released too many times
+...
+
+And the semaphore issue also caused multiprocessing.Queue().put() hung.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ setup.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 54054c2..9646bfc 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1586,8 +1586,10 @@ class PyBuildExt(build_ext):
+ elif host_platform.startswith('netbsd'):
+ macros = dict()
+ libraries = []
+-
+- else: # Linux and other unices
++ elif host_platform.startswith(('linux')):
++ macros = dict()
++ libraries = ['pthread']
++ else: # Other unices
+ macros = dict()
+ libraries = ['rt']
+
+@@ -1610,6 +1612,7 @@ class PyBuildExt(build_ext):
+ if sysconfig.get_config_var('WITH_THREAD'):
+ exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
+ define_macros=macros.items(),
++ libraries=libraries,
+ include_dirs=["Modules/_multiprocessing"]))
+ else:
+ missing.append('_multiprocessing')
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/python/python/python-fix-CVE-2016-1000110.patch b/meta/recipes-devtools/python/python/python-fix-CVE-2016-1000110.patch
deleted file mode 100644
index 97888e2b08..0000000000
--- a/meta/recipes-devtools/python/python/python-fix-CVE-2016-1000110.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From cb25fbd5abc0f4eb07dbb8ea819e9c26bda4fc99 Mon Sep 17 00:00:00 2001
-From: Senthil Kumaran <senthil@uthcode.com>
-Date: Sat, 30 Jul 2016 05:49:53 -0700
-Subject: [PATCH] python: fix CVE-2016-1000110
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Prevent HTTPoxy attack (CVE-2016-1000110)
-
-Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which
-indicates that the script is in CGI mode.
-
-Issue reported and patch contributed by Rémi Rampin.
-
-Backport patch from https://hg.python.org/cpython/rev/ba915d561667/
-
-Upstream-Status: Backport
-CVE: CVE-2016-1000110
-Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
----
- Doc/howto/urllib2.rst | 5 +++++
- Doc/library/urllib.rst | 10 ++++++++++
- Doc/library/urllib2.rst | 5 +++++
- Lib/test/test_urllib.py | 12 ++++++++++++
- Lib/urllib.py | 9 +++++++++
- Misc/ACKS | 1 +
- Misc/NEWS | 4 ++++
- 7 files changed, 46 insertions(+)
-
-diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
-index 6bb06d4..5cf2c0c 100644
---- a/Doc/howto/urllib2.rst
-+++ b/Doc/howto/urllib2.rst
-@@ -525,6 +525,11 @@ setting up a `Basic Authentication`_ handler: ::
- through a proxy. However, this can be enabled by extending urllib2 as
- shown in the recipe [#]_.
-
-+.. note::
-+
-+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see
-+ the documentation on :func:`~urllib.getproxies`.
-+
-
- Sockets and Layers
- ==================
-diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst
-index 3b5dc16..bddcba9 100644
---- a/Doc/library/urllib.rst
-+++ b/Doc/library/urllib.rst
-@@ -295,6 +295,16 @@ Utility functions
- If both lowercase and uppercase environment variables exist (and disagree),
- lowercase is preferred.
-
-+ .. note::
-+
-+ If the environment variable ``REQUEST_METHOD`` is set, which usually
-+ indicates your script is running in a CGI environment, the environment
-+ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
-+ because that variable can be injected by a client using the "Proxy:"
-+ HTTP header. If you need to use an HTTP proxy in a CGI environment,
-+ either use ``ProxyHandler`` explicitly, or make sure the variable name
-+ is in lowercase (or at least the ``_proxy`` suffix).
-+
- .. note::
- urllib also exposes certain utility functions like splittype, splithost and
- others parsing URL into various components. But it is recommended to use
-diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst
-index 8a4c80e..b808b98 100644
---- a/Doc/library/urllib2.rst
-+++ b/Doc/library/urllib2.rst
-@@ -229,6 +229,11 @@ The following classes are provided:
-
- To disable autodetected proxy pass an empty dictionary.
-
-+ .. note::
-+
-+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set;
-+ see the documentation on :func:`~urllib.getproxies`.
-+
-
- .. class:: HTTPPasswordMgr()
-
-diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
-index 434d533..27a1d38 100644
---- a/Lib/test/test_urllib.py
-+++ b/Lib/test/test_urllib.py
-@@ -170,6 +170,18 @@ class ProxyTests(unittest.TestCase):
- self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com:8888'))
- self.assertTrue(urllib.proxy_bypass_environment('newdomain.com:1234'))
-
-+ def test_proxy_cgi_ignore(self):
-+ try:
-+ self.env.set('HTTP_PROXY', 'http://somewhere:3128')
-+ proxies = urllib.getproxies_environment()
-+ self.assertEqual('http://somewhere:3128', proxies['http'])
-+ self.env.set('REQUEST_METHOD', 'GET')
-+ proxies = urllib.getproxies_environment()
-+ self.assertNotIn('http', proxies)
-+ finally:
-+ self.env.unset('REQUEST_METHOD')
-+ self.env.unset('HTTP_PROXY')
-+
- def test_proxy_bypass_environment_host_match(self):
- bypass = urllib.proxy_bypass_environment
- self.env.set('NO_PROXY',
-diff --git a/Lib/urllib.py b/Lib/urllib.py
-index 139fab9..c3ba2c9 100644
---- a/Lib/urllib.py
-+++ b/Lib/urllib.py
-@@ -1380,12 +1380,21 @@ def getproxies_environment():
- If you need a different way, you can pass a proxies dictionary to the
- [Fancy]URLopener constructor.
- """
-+ # Get all variables
- proxies = {}
- for name, value in os.environ.items():
- name = name.lower()
- if value and name[-6:] == '_proxy':
- proxies[name[:-6]] = value
-
-+ # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY
-+ # (non-all-lowercase) as it may be set from the web server by a "Proxy:"
-+ # header from the client
-+ # If "proxy" is lowercase, it will still be used thanks to the next block
-+ if 'REQUEST_METHOD' in os.environ:
-+ proxies.pop('http', None)
-+
-+ # Get lowercase variables
- for name, value in os.environ.items():
- if name[-6:] == '_proxy':
- name = name.lower()
-diff --git a/Misc/ACKS b/Misc/ACKS
-index ee3a465..9c374b7 100644
---- a/Misc/ACKS
-+++ b/Misc/ACKS
-@@ -1121,6 +1121,7 @@ Burton Radons
- Jeff Ramnani
- Varpu Rantala
- Brodie Rao
-+Rémi Rampin
- Senko Rasic
- Antti Rasinen
- Nikolaus Rath
-diff --git a/Misc/NEWS b/Misc/NEWS
-index 4ab3a70..cc2f65b 100644
---- a/Misc/NEWS
-+++ b/Misc/NEWS
-@@ -187,6 +187,10 @@ Library
- - Issue #26644: Raise ValueError rather than SystemError when a negative
- length is passed to SSLSocket.recv() or read().
-
-+- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
-+ HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
-+ that the script is in CGI mode.
-+
- - Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
- instead of up to 1024.
-
---
-2.8.1
-
diff --git a/meta/recipes-devtools/python/python/python2-manifest.json b/meta/recipes-devtools/python/python/python2-manifest.json
new file mode 100644
index 0000000000..eb52e862ab
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python2-manifest.json
@@ -0,0 +1,1138 @@
+# DO NOT (entirely) modify this file manually, please read.
+#
+# IMPORTANT NOTE:
+# Please keep in mind that the create_manifest task relies on the fact the the
+# target and native Python packages are the same, and it also needs to be executed
+# with a fully working native package (with all the PACKAGECONFIGs enabled and all
+# and all the modules should be working, check log.do_compile), otherwise the script
+# will fail to find dependencies correctly, this note is valid either if you are
+# upgrading to a new Python version or adding a new package.
+#
+#
+# If you are adding a new package please follow the next steps:
+# How to add a new package:
+# - If a user wants to add a new package all that has to be done is:
+# Modify the python2-manifest.json file, and add the required file(s) to the FILES list,
+# fill up the SUMMARY section as well, the script should handle all the rest.
+#
+# Real example:
+# We want to add a web browser package, including the file webbrowser.py
+# which at the moment is on python-misc.
+# "webbrowser": {
+# "files": ["${libdir}/python2.7/lib-dynload/webbrowser.py"],
+# "rdepends": [],
+# "summary": "Python Web Browser support"}
+#
+# * Note that the rdepends field was left empty
+#
+# We run $ bitbake python -c create_manifest and the resulting manifest
+# should be completed after a few seconds, showing something like:
+# "webbrowser": {
+# "files": ["${libdir}/python2.7/webbrowser.py"],
+# "rdepends": ["core","fcntl","io","pickle","shell","subprocess"],
+# "summary": "Python Web Browser support"}
+#
+#
+# If you are upgrading Python to a new version please follow the next steps:
+# After each Python upgrade, the create_manifest task should be executed, because we
+# don't control what changes on upstream Python, so, some module dependency
+# might have changed without us realizing it, a certain module can either have
+# more or less dependencies, or could be depending on a new file that was just
+# created on the new release and for obvious reasons we wouldn't have it on our
+# old manifest, all of these issues would cause runtime errors on our system.
+#
+# - Upgrade both the native and target Python packages to a new version
+# - Run the create_manifest task for the target Python package as its shown below:
+#
+# $ bitbake python -c create_manifest
+#
+# This will automatically replace your manifest file located under the Python directory
+# with an new one, which contains the new dependencies (if any).
+#
+# Several things could have gone wrong here, I will try to explain a few:
+#
+# a) A new file was introduced on this release, e.g. sha3*.so:
+# The task will check what its needed to import every module, more than one module would
+# would probably depend on sha3*.so, although only one module should contain it.
+#
+# After running the task, the new manifest will have the sha3*.so file on more than one
+# module, you need to manually decide which one of them should get it and delete it from
+# the others, for example sha3*.so should likely be on ${PN}-crypt.
+# Once you have deleted from the others you need to run the create_manifest task again,
+# this will populate the other module's rdepends fields, with ${PN}-crypt and you should be
+# good to go.
+#
+# b) The native package wasn't built correctly and its missing a certain module:
+# As mentioned before, you need to make sure the native package was built with all the modules
+# because it is used as base to build the manifest file, you need to manually check log.do_compile
+# since it won't error out the compile function if its only missing a couple of modules.
+#
+# e.g. missing the _uuid module, log.do_compile would show the following:
+# Python build finished successfully!
+# The necessary bits to build these optional modules were not found:
+# _uuid
+#
+# What will happen here is that the new manifest would not be aware that the _uuid module exists, so
+# not only we won't know of any dependencies to it, but also, the _uuid* files will be packaged on
+# the misc package (which is where any file that doesn't belong anywhere else ends up).
+#
+# This will eventually cause runtime errors on our system if we don't include the misc package on
+# on our image, because the _uuid files will be missing.
+# If we build the _uuid module correctly and run the create_manifest task the _uuid files will be
+# detected correctly along with its dependencies, and we will get a working manifest.
+#
+# This is the reason why it is important to make sure we have a fully working native build,
+# so we can avoid these errors.
+#
+#
+#
+# DO NOT MODIFY THE NEXT LINE!, IT IS USED AS A MARKER FOR THE ACTUAL JSON MANIFEST
+# EOC
+{
+ "tests": {
+ "summary": "Python test suite",
+ "rdepends": [
+ "core",
+ "modules"
+ ],
+ "files": [
+ "${libdir}/python2.7/*/test",
+ "${libdir}/python2.7/*/tests",
+ "${libdir}/python2.7/idlelib/idle_test/",
+ "${libdir}/python2.7/test"
+ ],
+ "cached": []
+ },
+ "2to3": {
+ "summary": "Python automated Python 2 to 3 code translator",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${bindir}/2to3*",
+ "${libdir}/python2.7/lib2to3"
+ ]
+ },
+ "argparse": {
+ "summary": "Python command line argument parser",
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "textutils"
+ ],
+ "files": [
+ "${libdir}/python2.7/argparse.py"
+ ]
+ },
+ "audio": {
+ "summary": "Python Audio Handling",
+ "rdepends": [
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "math"
+ ],
+ "files": [
+ "${libdir}/python2.7/audiodev.py",
+ "${libdir}/python2.7/chunk.py",
+ "${libdir}/python2.7/lib-dynload/audioop.so",
+ "${libdir}/python2.7/lib-dynload/ossaudiodev.so",
+ "${libdir}/python2.7/sndhdr.py",
+ "${libdir}/python2.7/sunau.py",
+ "${libdir}/python2.7/sunaudio.py",
+ "${libdir}/python2.7/toaiff.py",
+ "${libdir}/python2.7/wave.py"
+ ]
+ },
+ "bsddb": {
+ "summary": "Python bindings for the Berkeley Database",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/bsddb",
+ "${libdir}/python2.7/lib-dynload/_bsddb.so"
+ ]
+ },
+ "codecs": {
+ "summary": "Python codec",
+ "rdepends": [
+ "core",
+ "io",
+ "lang"
+ ],
+ "files": [
+ "${libdir}/python2.7/gettext.py",
+ "${libdir}/python2.7/lib-dynload/_codecs_cn.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_hk.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_iso2022.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_jp.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_kr.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_tw.so",
+ "${libdir}/python2.7/lib-dynload/_multibytecodec.so",
+ "${libdir}/python2.7/lib-dynload/unicodedata.so",
+ "${libdir}/python2.7/locale.py",
+ "${libdir}/python2.7/stringprep.py",
+ "${libdir}/python2.7/xdrlib.py"
+ ]
+ },
+ "compile": {
+ "summary": "Python bytecode compilation support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/compileall.py",
+ "${libdir}/python2.7/py_compile.py"
+ ]
+ },
+ "compiler": {
+ "summary": "Python compiler support",
+ "rdepends": [
+ "core",
+ "io",
+ "lang"
+ ],
+ "files": [
+ "${libdir}/python2.7/compiler"
+ ]
+ },
+ "compression": {
+ "summary": "Python high-level compression support",
+ "rdepends": [
+ "core",
+ "io",
+ "shell",
+ "unixadmin",
+ "zlib"
+ ],
+ "files": [
+ "${libdir}/python2.7/gzip.py",
+ "${libdir}/python2.7/lib-dynload/bz2.so",
+ "${libdir}/python2.7/tarfile.py",
+ "${libdir}/python2.7/zipfile.py"
+ ]
+ },
+ "contextlib": {
+ "summary": "Python utilities for with-statementcontexts.",
+ "rdepends": [
+ "core",
+ "lang"
+ ],
+ "files": [
+ "${libdir}/python2.7/contextlib.py"
+ ]
+ },
+ "core": {
+ "summary": "Python interpreter and core modules",
+ "rdepends": [],
+ "files": [
+ "${bindir}/python*",
+ "${includedir}/python2.7/pyconfig*.h",
+ "${libdir}/python2.7/ConfigParser.py",
+ "${libdir}/python2.7/UserDict.py",
+ "${libdir}/python2.7/UserList.py",
+ "${libdir}/python2.7/UserString.py",
+ "${libdir}/python2.7/__future__.py",
+ "${libdir}/python2.7/_abcoll.py",
+ "${libdir}/python2.7/_sysconfigdata.py",
+ "${libdir}/python2.7/_weakrefset.py",
+ "${libdir}/python2.7/abc.py",
+ "${libdir}/python2.7/ast.py",
+ "${libdir}/python2.7/atexit.py",
+ "${libdir}/python2.7/codecs.py",
+ "${libdir}/python2.7/collections.py",
+ "${libdir}/python2.7/copy.py",
+ "${libdir}/python2.7/copy_reg.py",
+ "${libdir}/python2.7/encodings",
+ "${libdir}/python2.7/encodings/aliases.py",
+ "${libdir}/python2.7/encodings/utf_8.py",
+ "${libdir}/python2.7/genericpath.py",
+ "${libdir}/python2.7/getopt.py",
+ "${libdir}/python2.7/heapq.py",
+ "${libdir}/python2.7/importlib",
+ "${libdir}/python2.7/keyword.py",
+ "${libdir}/python2.7/lib-dynload/_collections.so",
+ "${libdir}/python2.7/lib-dynload/_heapq.so",
+ "${libdir}/python2.7/lib-dynload/_locale.so",
+ "${libdir}/python2.7/lib-dynload/_struct.so",
+ "${libdir}/python2.7/lib-dynload/binascii.so",
+ "${libdir}/python2.7/lib-dynload/itertools.so",
+ "${libdir}/python2.7/lib-dynload/operator.so",
+ "${libdir}/python2.7/lib-dynload/readline.so",
+ "${libdir}/python2.7/lib-dynload/strop.so",
+ "${libdir}/python2.7/lib-dynload/time.so",
+ "${libdir}/python2.7/lib-dynload/xreadlines.so",
+ "${libdir}/python2.7/linecache.py",
+ "${libdir}/python2.7/new.py",
+ "${libdir}/python2.7/os.py",
+ "${libdir}/python2.7/platform.py",
+ "${libdir}/python2.7/posixpath.py",
+ "${libdir}/python2.7/re.py",
+ "${libdir}/python2.7/rlcompleter.py",
+ "${libdir}/python2.7/site.py",
+ "${libdir}/python2.7/sitecustomize.py",
+ "${libdir}/python2.7/sre_compile.py",
+ "${libdir}/python2.7/sre_constants.py",
+ "${libdir}/python2.7/sre_parse.py",
+ "${libdir}/python2.7/stat.py",
+ "${libdir}/python2.7/string.py",
+ "${libdir}/python2.7/struct.py",
+ "${libdir}/python2.7/sysconfig.py",
+ "${libdir}/python2.7/traceback.py",
+ "${libdir}/python2.7/types.py",
+ "${libdir}/python2.7/warnings.py",
+ "${libdir}/python2.7/weakref.py"
+ ]
+ },
+ "crypt": {
+ "summary": "Python basic cryptographic and hashing support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/hashlib.py",
+ "${libdir}/python2.7/lib-dynload/_hashlib.so",
+ "${libdir}/python2.7/lib-dynload/crypt.so",
+ "${libdir}/python2.7/md5.py",
+ "${libdir}/python2.7/sha.py"
+ ]
+ },
+ "ctypes": {
+ "summary": "Python C types support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/ctypes",
+ "${libdir}/python2.7/lib-dynload/_ctypes.so",
+ "${libdir}/python2.7/lib-dynload/_ctypes_test.so"
+ ]
+ },
+ "curses": {
+ "summary": "Python curses support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/curses",
+ "${libdir}/python2.7/lib-dynload/_curses.so",
+ "${libdir}/python2.7/lib-dynload/_curses_panel.so"
+ ]
+ },
+ "datetime": {
+ "summary": "Python calendar and time support",
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang"
+ ],
+ "files": [
+ "${libdir}/python2.7/_strptime.py",
+ "${libdir}/python2.7/calendar.py",
+ "${libdir}/python2.7/lib-dynload/datetime.so"
+ ]
+ },
+ "db": {
+ "summary": "Python file-based database support",
+ "rdepends": [
+ "bsddb",
+ "core",
+ "gdbm"
+ ],
+ "files": [
+ "${libdir}/python2.7/anydbm.py",
+ "${libdir}/python2.7/dbhash.py",
+ "${libdir}/python2.7/dumbdbm.py",
+ "${libdir}/python2.7/lib-dynload/dbm.so",
+ "${libdir}/python2.7/whichdb.py"
+ ]
+ },
+ "debugger": {
+ "summary": "Python debugger",
+ "rdepends": [
+ "core",
+ "io",
+ "lang",
+ "pprint",
+ "shell"
+ ],
+ "files": [
+ "${libdir}/python2.7/bdb.py",
+ "${libdir}/python2.7/pdb.py"
+ ]
+ },
+ "dev": {
+ "files": [
+ "${base_libdir}/*.a",
+ "${base_libdir}/*.o",
+ "${datadir}/aclocal",
+ "${datadir}/pkgconfig",
+ "${includedir}",
+ "${libdir}/*.a",
+ "${libdir}/*.la",
+ "${libdir}/*.o",
+ "${libdir}/lib*${SOLIBSDEV}",
+ "${libdir}/pkgconfig",
+ "${libdir}/python2.7/config/Makefile"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python development package"
+ },
+ "difflib": {
+ "summary": "Python helpers for computing deltas between objects",
+ "rdepends": [
+ "core",
+ "lang"
+ ],
+ "files": [
+ "${libdir}/python2.7/difflib.py"
+ ]
+ },
+ "distutils-staticdev": {
+ "files": [
+ "${libdir}/python2.7/config/lib*.a"
+ ],
+ "rdepends": [
+ "distutils"
+ ],
+ "summary": "Python distribution utilities (static libraries)"
+ },
+ "distutils": {
+ "summary": "Python Distribution Utilities",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/config",
+ "${libdir}/python2.7/distutils"
+ ]
+ },
+ "doctest": {
+ "summary": "Python framework for running examples in docstrings",
+ "rdepends": [
+ "core",
+ "crypt",
+ "debugger",
+ "difflib",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "pprint",
+ "shell",
+ "unittest"
+ ],
+ "files": [
+ "${libdir}/python2.7/doctest.py"
+ ]
+ },
+ "email": {
+ "summary": "Python email support",
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "netclient",
+ "pickle",
+ "subprocess",
+ "textutils",
+ "threading"
+ ],
+ "files": [
+ "${libdir}/python2.7/email",
+ "${libdir}/python2.7/imaplib.py"
+ ]
+ },
+ "fcntl": {
+ "summary": "Python's fcntl interface",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/fcntl.so"
+ ]
+ },
+ "gdbm": {
+ "summary": "Python GNU database support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/gdbm.so"
+ ]
+ },
+ "hotshot": {
+ "summary": "Python hotshot performance profiler",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/hotshot",
+ "${libdir}/python2.7/lib-dynload/_hotshot.so"
+ ]
+ },
+ "html": {
+ "summary": "Python HTML processing support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/HTMLParser.py",
+ "${libdir}/python2.7/formatter.py",
+ "${libdir}/python2.7/htmlentitydefs.py",
+ "${libdir}/python2.7/htmllib.py",
+ "${libdir}/python2.7/markupbase.py",
+ "${libdir}/python2.7/sgmllib.py"
+ ]
+ },
+ "idle": {
+ "summary": "Python Integrated Development Environment",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${bindir}/idle",
+ "${libdir}/python2.7/idlelib"
+ ]
+ },
+ "image": {
+ "summary": "Python graphical image handling",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/colorsys.py",
+ "${libdir}/python2.7/imghdr.py"
+ ]
+ },
+ "io": {
+ "summary": "Python low-level I/O",
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "lang",
+ "math",
+ "netclient",
+ "textutils"
+ ],
+ "files": [
+ "${libdir}/python2.7/StringIO.py",
+ "${libdir}/python2.7/_pyio.py",
+ "${libdir}/python2.7/io.py",
+ "${libdir}/python2.7/lib-dynload/_io.so",
+ "${libdir}/python2.7/lib-dynload/_socket.so",
+ "${libdir}/python2.7/lib-dynload/_ssl.so",
+ "${libdir}/python2.7/lib-dynload/cStringIO.so",
+ "${libdir}/python2.7/lib-dynload/select.so",
+ "${libdir}/python2.7/lib-dynload/termios.so",
+ "${libdir}/python2.7/pipes.py",
+ "${libdir}/python2.7/socket.py",
+ "${libdir}/python2.7/ssl.py",
+ "${libdir}/python2.7/tempfile.py"
+ ]
+ },
+ "json": {
+ "summary": "Python JSON support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/json",
+ "${libdir}/python2.7/lib-dynload/_json.so"
+ ]
+ },
+ "lang": {
+ "summary": "Python low-level language support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/bisect.py",
+ "${libdir}/python2.7/code.py",
+ "${libdir}/python2.7/codeop.py",
+ "${libdir}/python2.7/dis.py",
+ "${libdir}/python2.7/functools.py",
+ "${libdir}/python2.7/inspect.py",
+ "${libdir}/python2.7/lib-dynload/_bisect.so",
+ "${libdir}/python2.7/lib-dynload/_functools.so",
+ "${libdir}/python2.7/lib-dynload/array.so",
+ "${libdir}/python2.7/lib-dynload/parser.so",
+ "${libdir}/python2.7/opcode.py",
+ "${libdir}/python2.7/repr.py",
+ "${libdir}/python2.7/symbol.py",
+ "${libdir}/python2.7/token.py",
+ "${libdir}/python2.7/tokenize.py"
+ ]
+ },
+ "logging": {
+ "summary": "Python logging support",
+ "rdepends": [
+ "core",
+ "io",
+ "threading"
+ ],
+ "files": [
+ "${libdir}/python2.7/logging"
+ ]
+ },
+ "mailbox": {
+ "summary": "Python mailbox format support",
+ "rdepends": [
+ "codecs",
+ "contextlib",
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "textutils"
+ ],
+ "files": [
+ "${libdir}/python2.7/mailbox.py"
+ ]
+ },
+ "math": {
+ "summary": "Python math support",
+ "rdepends": [
+ "core",
+ "crypt"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_random.so",
+ "${libdir}/python2.7/lib-dynload/cmath.so",
+ "${libdir}/python2.7/lib-dynload/math.so",
+ "${libdir}/python2.7/random.py",
+ "${libdir}/python2.7/sets.py"
+ ]
+ },
+ "mime": {
+ "summary": "Python MIME handling APIs",
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "netclient",
+ "textutils"
+ ],
+ "files": [
+ "${libdir}/python2.7/MimeWriter.py",
+ "${libdir}/python2.7/mimetools.py",
+ "${libdir}/python2.7/mimetypes.py",
+ "${libdir}/python2.7/quopri.py",
+ "${libdir}/python2.7/rfc822.py",
+ "${libdir}/python2.7/uu.py"
+ ]
+ },
+ "mmap": {
+ "summary": "Python memory-mapped file support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/mmap.so"
+ ]
+ },
+ "modules": {
+ "files": [],
+ "rdepends": [
+ "2to3",
+ "argparse",
+ "audio",
+ "bsddb",
+ "codecs",
+ "compile",
+ "compiler",
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "ctypes",
+ "curses",
+ "datetime",
+ "db",
+ "debugger",
+ "difflib",
+ "distutils",
+ "doctest",
+ "email",
+ "fcntl",
+ "gdbm",
+ "hotshot",
+ "html",
+ "idle",
+ "image",
+ "io",
+ "json",
+ "lang",
+ "logging",
+ "mailbox",
+ "math",
+ "mime",
+ "mmap",
+ "multiprocessing",
+ "netclient",
+ "netserver",
+ "numbers",
+ "pickle",
+ "pkgutil",
+ "plistlib",
+ "pprint",
+ "profile",
+ "pydoc",
+ "re",
+ "resource",
+ "robotparser",
+ "runpy",
+ "shell",
+ "smtpd",
+ "sqlite3",
+ "sqlite3",
+ "stringold",
+ "subprocess",
+ "syslog",
+ "terminal",
+ "textutils",
+ "threading",
+ "tkinter",
+ "unittest",
+ "unixadmin",
+ "xml",
+ "xmlrpc",
+ "zlib"
+ ],
+ "summary": "All Python modules"
+ },
+ "multiprocessing": {
+ "summary": "Python multiprocessing support",
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "pickle",
+ "subprocess",
+ "threading"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_multiprocessing.so",
+ "${libdir}/python2.7/multiprocessing"
+ ]
+ },
+ "netclient": {
+ "summary": "Python Internet Protocol clients",
+ "rdepends": [
+ "codecs",
+ "contextlib",
+ "core",
+ "crypt",
+ "ctypes",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "pickle",
+ "subprocess",
+ "textutils",
+ "threading"
+ ],
+ "files": [
+ "${libdir}/python2.7/Cookie.py",
+ "${libdir}/python2.7/_LWPCookieJar.py",
+ "${libdir}/python2.7/_MozillaCookieJar.py",
+ "${libdir}/python2.7/base64.py",
+ "${libdir}/python2.7/cookielib.py",
+ "${libdir}/python2.7/ftplib.py",
+ "${libdir}/python2.7/hmac.py",
+ "${libdir}/python2.7/httplib.py",
+ "${libdir}/python2.7/nntplib.py",
+ "${libdir}/python2.7/poplib.py",
+ "${libdir}/python2.7/smtplib.py",
+ "${libdir}/python2.7/telnetlib.py",
+ "${libdir}/python2.7/urllib.py",
+ "${libdir}/python2.7/urllib2.py",
+ "${libdir}/python2.7/urlparse.py",
+ "${libdir}/python2.7/uuid.py"
+ ]
+ },
+ "netserver": {
+ "summary": "Python Internet Protocol servers",
+ "rdepends": [
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "shell",
+ "textutils",
+ "threading",
+ "unixadmin",
+ "zlib"
+ ],
+ "files": [
+ "${libdir}/python2.7/BaseHTTPServer.py",
+ "${libdir}/python2.7/CGIHTTPServer.py",
+ "${libdir}/python2.7/SimpleHTTPServer.py",
+ "${libdir}/python2.7/SocketServer.py",
+ "${libdir}/python2.7/cgi.py"
+ ]
+ },
+ "numbers": {
+ "summary": "Python number APIs",
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "math",
+ "threading"
+ ],
+ "files": [
+ "${libdir}/python2.7/decimal.py",
+ "${libdir}/python2.7/fractions.py",
+ "${libdir}/python2.7/numbers.py"
+ ]
+ },
+ "pickle": {
+ "summary": "Python serialisation/persistence support",
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/cPickle.so",
+ "${libdir}/python2.7/pickle.py",
+ "${libdir}/python2.7/pickletools.py",
+ "${libdir}/python2.7/shelve.py"
+ ]
+ },
+ "pkgutil": {
+ "summary": "Python package extension utility support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/pkgutil.py"
+ ]
+ },
+ "plistlib": {
+ "summary": "Generate and parse Mac OS X .plist files",
+ "rdepends": [
+ "core",
+ "datetime",
+ "io"
+ ],
+ "files": [
+ "${libdir}/python2.7/plistlib.py"
+ ]
+ },
+ "pprint": {
+ "summary": "Python pretty-print support",
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "files": [
+ "${libdir}/python2.7/pprint.py"
+ ]
+ },
+ "profile": {
+ "summary": "Python basic performance profiling support",
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "resource",
+ "textutils"
+ ],
+ "files": [
+ "${libdir}/python2.7/cProfile.py",
+ "${libdir}/python2.7/lib-dynload/_lsprof.so",
+ "${libdir}/python2.7/profile.py",
+ "${libdir}/python2.7/pstats.py"
+ ]
+ },
+ "pydoc": {
+ "summary": "Python interactive help support",
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "pkgutil"
+ ],
+ "files": [
+ "${bindir}/pydoc",
+ "${libdir}/python2.7/pydoc.py",
+ "${libdir}/python2.7/pydoc_data"
+ ]
+ },
+ "re": {
+ "summary": "Python Regular Expression APIs",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/sre.py"
+ ]
+ },
+ "resource": {
+ "summary": "Python resource control interface",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/resource.so"
+ ]
+ },
+ "robotparser": {
+ "summary": "Python robots.txt parser",
+ "rdepends": [
+ "contextlib",
+ "core",
+ "io",
+ "lang",
+ "netclient",
+ "textutils"
+ ],
+ "files": [
+ "${libdir}/python2.7/robotparser.py"
+ ]
+ },
+ "runpy": {
+ "summary": "Python helper for locating/executing scripts in module namespace",
+ "rdepends": [
+ "core",
+ "pkgutil"
+ ],
+ "files": [
+ "${libdir}/python2.7/runpy.py"
+ ]
+ },
+ "shell": {
+ "summary": "Python shell-like functionality",
+ "rdepends": [
+ "compression",
+ "core",
+ "io",
+ "unixadmin",
+ "zlib"
+ ],
+ "files": [
+ "${libdir}/python2.7/cmd.py",
+ "${libdir}/python2.7/commands.py",
+ "${libdir}/python2.7/dircache.py",
+ "${libdir}/python2.7/fnmatch.py",
+ "${libdir}/python2.7/glob.py",
+ "${libdir}/python2.7/popen2.py",
+ "${libdir}/python2.7/shlex.py",
+ "${libdir}/python2.7/shutil.py"
+ ]
+ },
+ "smtpd": {
+ "summary": "Python Simple Mail Transport Daemon",
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "lang"
+ ],
+ "files": [
+ "${bindir}/smtpd.py",
+ "${libdir}/python2.7/asynchat.py",
+ "${libdir}/python2.7/asyncore.py",
+ "${libdir}/python2.7/smtpd.py"
+ ]
+ },
+ "sqlite3": {
+ "summary": "Python Sqlite3 database support",
+ "rdepends": [
+ "core",
+ "datetime"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_sqlite3.so",
+ "${libdir}/python2.7/sqlite3"
+ ]
+ },
+ "stringold": {
+ "summary": "Python string APIs [deprecated]",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/stringold.py"
+ ]
+ },
+ "subprocess": {
+ "summary": "Python subprocess support",
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "pickle",
+ "threading"
+ ],
+ "files": [
+ "${libdir}/python2.7/subprocess.py"
+ ]
+ },
+ "syslog": {
+ "summary": "Python syslog interface",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/syslog.so"
+ ]
+ },
+ "terminal": {
+ "summary": "Python terminal controlling support",
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "files": [
+ "${libdir}/python2.7/pty.py",
+ "${libdir}/python2.7/tty.py"
+ ]
+ },
+ "textutils": {
+ "summary": "Python option parsin",
+ "rdepends": [
+ "codecs",
+ "core",
+ "io",
+ "lang"
+ ],
+ "files": [
+ "${libdir}/python2.7/csv.py",
+ "${libdir}/python2.7/lib-dynload/_csv.so",
+ "${libdir}/python2.7/optparse.py",
+ "${libdir}/python2.7/textwrap.py"
+ ]
+ },
+ "threading": {
+ "summary": "Python threading & synchronization support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/Queue.py",
+ "${libdir}/python2.7/_threading_local.py",
+ "${libdir}/python2.7/dummy_thread.py",
+ "${libdir}/python2.7/dummy_threading.py",
+ "${libdir}/python2.7/mutex.py",
+ "${libdir}/python2.7/threading.py"
+ ]
+ },
+ "tkinter": {
+ "summary": "Python Tcl/Tk bindings",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.so",
+ "${libdir}/python2.7/lib-tk"
+ ]
+ },
+ "unittest": {
+ "summary": "Python unit testing framework",
+ "rdepends": [
+ "core",
+ "difflib",
+ "io",
+ "lang",
+ "pprint",
+ "shell"
+ ],
+ "files": [
+ "${libdir}/python2.7/unittest"
+ ]
+ },
+ "unixadmin": {
+ "summary": "Python Unix administration support",
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "files": [
+ "${libdir}/python2.7/getpass.py",
+ "${libdir}/python2.7/lib-dynload/grp.so",
+ "${libdir}/python2.7/lib-dynload/nis.so"
+ ]
+ },
+ "xml": {
+ "summary": "Python basic XML support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_elementtree.so",
+ "${libdir}/python2.7/lib-dynload/pyexpat.so",
+ "${libdir}/python2.7/xml"
+ ]
+ },
+ "xmlrpc": {
+ "summary": "Python XML-RPC support",
+ "rdepends": [
+ "codecs",
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "datetime",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "netserver",
+ "pkgutil",
+ "pydoc",
+ "textutils",
+ "threading",
+ "xml",
+ "zlib"
+ ],
+ "files": [
+ "${libdir}/python2.7/DocXMLRPCServer.py",
+ "${libdir}/python2.7/SimpleXMLRPCServer.py",
+ "${libdir}/python2.7/xmlrpclib.py"
+ ]
+ },
+ "zlib": {
+ "summary": "Python zlib compression support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python2.7/lib-dynload/zlib.so"
+ ]
+ }
+}
diff --git a/meta/recipes-devtools/python/python/run-ptest b/meta/recipes-devtools/python/python/run-ptest
index a2f9eed444..c7002a4560 100644
--- a/meta/recipes-devtools/python/python/run-ptest
+++ b/meta/recipes-devtools/python/python/run-ptest
@@ -1,5 +1,3 @@
#!/bin/sh
-#
-#This script is used to run python test suites
-make -f LIBDIR/python/ptest/Makefile -k runtest-TESTS srcdir=LIBDIR/python2.7 TESTPROG=LIBDIR/python2.7/test/regrtest.py | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python -mtest -W | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/meta/recipes-devtools/python/python/sitecustomize.py b/meta/recipes-devtools/python/python/sitecustomize.py
index 273901898a..4c8b5e2ba3 100644
--- a/meta/recipes-devtools/python/python/sitecustomize.py
+++ b/meta/recipes-devtools/python/python/sitecustomize.py
@@ -27,19 +27,11 @@ def __enableReadlineSupport():
except IOError:
pass
-def __enableDefaultEncoding():
- import sys
- try:
- sys.setdefaultencoding( "utf8" )
- except LookupError:
- pass
-
import sys
try:
import rlcompleter, readline
except ImportError:
pass
else:
- __enableDefaultEncoding()
__registerExitHandler()
__enableReadlineSupport()
diff --git a/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch b/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch
new file mode 100644
index 0000000000..12651798ee
--- /dev/null
+++ b/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch
@@ -0,0 +1,34 @@
+The compiled .pyc files contain time stamp corresponding to the compile time.
+This prevents binary reproducibility. This patch allows to achieve binary
+reproducibility by overriding the build time stamp by the value
+exported via SOURCE_DATE_EPOCH.
+
+Patch by Bernhard M. Wiedemann
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+Fri Feb 24 17:08:25 UTC 2017 - bwiedemann@suse.com
+
+- Add reproducible.patch to allow reproducible builds of various
+ python packages like python-amqp
+ Upstream: https://github.com/python/cpython/pull/296
+
+
+@@ -0,0 +1,15 @@
+Index: Python-2.7.13/Lib/py_compile.py
+===================================================================
+--- Python-2.7.13.orig/Lib/py_compile.py
++++ Python-2.7.13/Lib/py_compile.py
+@@ -108,6 +108,10 @@ def compile(file, cfile=None, dfile=None
+ timestamp = long(os.fstat(f.fileno()).st_mtime)
+ except AttributeError:
+ timestamp = long(os.stat(file).st_mtime)
++ sde = os.environ.get('SOURCE_DATE_EPOCH')
++ if sde and timestamp > int(sde):
++ timestamp = int(sde)
++ os.utime(file, (timestamp, timestamp))
+ codestring = f.read()
+ try:
+ codeobject = __builtin__.compile(codestring, dfile or file,'exec')
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
index 2c657861c8..fb4a3bcf95 100644
--- 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
@@ -2,6 +2,7 @@ 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
+Upstream-Status: Pending
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
diff --git a/meta/recipes-devtools/python/python3-async_0.6.2.bb b/meta/recipes-devtools/python/python3-async_0.6.2.bb
index 54a30f5498..0da5fdecdc 100644
--- a/meta/recipes-devtools/python/python3-async_0.6.2.bb
+++ b/meta/recipes-devtools/python/python3-async_0.6.2.bb
@@ -1,6 +1,2 @@
-require python-async.inc
-
inherit setuptools3
-
-RDEPENDS_${PN} += "python3-threading python3-lang"
-
+require python-async.inc
diff --git a/meta/recipes-devtools/python/python3-dbus_1.2.14.bb b/meta/recipes-devtools/python/python3-dbus_1.2.14.bb
new file mode 100644
index 0000000000..04ebea9d9c
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-dbus_1.2.14.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Python bindings for the DBus inter-process communication system"
+SECTION = "devel/python"
+HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b03240518994df6d8c974675675e5ca4"
+DEPENDS = "expat dbus glib-2.0 virtual/libintl"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "c8739234fca9fba26368d1a337abe830"
+SRC_URI[sha256sum] = "b10206ba3dd641e4e46411ab91471c88e0eec1749860e4285193ee68df84ac31"
+
+S = "${WORKDIR}/dbus-python-${PV}"
+
+inherit distutils3-base autotools pkgconfig
+
+# documentation needs python3-sphinx, which is not in oe-core or meta-python for now
+# change to use PACKAGECONFIG when python3-sphinx is added to oe-core
+EXTRA_OECONF += "--disable-documentation"
+
+
+RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
+
+FILES_${PN}-dev += "${libdir}/pkgconfig"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python3-dbus_1.2.4.bb b/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
deleted file mode 100644
index de5a01c7f2..0000000000
--- a/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Python bindings for the DBus inter-process communication system"
-SECTION = "devel/python"
-HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a"
-DEPENDS = "expat dbus dbus-glib virtual/libintl"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "7372a588c83a7232b4e08159bfd48fe5"
-SRC_URI[sha256sum] = "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
-S = "${WORKDIR}/dbus-python-${PV}"
-
-inherit distutils3-base autotools pkgconfig
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
-PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
-
-RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
-
-FILES_${PN}-dev += "${libdir}/pkgconfig"
diff --git a/meta/recipes-devtools/python/python3-docutils_0.12.bb b/meta/recipes-devtools/python/python3-docutils_0.12.bb
deleted file mode 100644
index e78fa3bbc8..0000000000
--- a/meta/recipes-devtools/python/python3-docutils_0.12.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Text processing system for documentation"
-HOMEPAGE = "http://docutils.sourceforge.net"
-SECTION = "devel/python"
-LICENSE = "PSF & BSD-2-Clause & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=a722fbdc20347db7b69223594dd54574"
-
-DEPENDS = "python3"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "4622263b62c5c771c03502afa3157768"
-SRC_URI[sha256sum] = "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa"
-
-S = "${WORKDIR}/docutils-${PV}"
-
-inherit distutils3
-
-BBCLASSEXTEND = "native"
-
diff --git a/meta/recipes-devtools/python/python3-docutils_0.15.bb b/meta/recipes-devtools/python/python3-docutils_0.15.bb
new file mode 100644
index 0000000000..f5c3f5d707
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-docutils_0.15.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Text processing system for documentation"
+HOMEPAGE = "http://docutils.sourceforge.net"
+SECTION = "devel/python"
+LICENSE = "PSF & BSD-2-Clause & GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=35a23d42b615470583563132872c97d6"
+
+DEPENDS = "python3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
+SRC_URI[md5sum] = "f51729f19e70a9dc4837433193a5e798"
+SRC_URI[sha256sum] = "c35e87e985f70106f6f97e050f3bed990641e0e104566134b9cd23849a460e96"
+
+S = "${WORKDIR}/docutils-${PV}"
+
+inherit distutils3
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/python/python3-extras_1.0.0.bb b/meta/recipes-devtools/python/python3-extras_1.0.0.bb
new file mode 100644
index 0000000000..76f87f2640
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-extras_1.0.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-extras.inc
diff --git a/meta/recipes-devtools/python/python3-git_2.0.7.bb b/meta/recipes-devtools/python/python3-git_2.0.7.bb
deleted file mode 100644
index c9fe9baa20..0000000000
--- a/meta/recipes-devtools/python/python3-git_2.0.7.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-git.inc
-
-DEPENDS = "python3-gitdb"
-
-inherit setuptools3
-
-RDEPENDS_${PN} += "python3-gitdb python3-lang python3-io python3-shell python3-math python3-re python3-subprocess python3-stringold python3-unixadmin python3-enum python3-logging python3-datetime python3-netclient"
diff --git a/meta/recipes-devtools/python/python3-git_3.0.2.bb b/meta/recipes-devtools/python/python3-git_3.0.2.bb
new file mode 100644
index 0000000000..9dd753db4f
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-git_3.0.2.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Python library used to interact with Git repositories"
+DESCRIPTION = "GitPython provides object model read and write access to \
+a git repository. Access repository information conveniently, alter the \
+index directly, handle remotes, or go down to low-level object database \
+access with big-files support."
+HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
+
+PYPI_PACKAGE = "GitPython"
+
+inherit pypi setuptools3
+
+SRC_URI[md5sum] = "ccec14a5c9f18702406122983d80032c"
+SRC_URI[sha256sum] = "d2f4945f8260f6981d724f5957bc076398ada55cb5d25aaee10108bcdc894100"
+
+DEPENDS += " ${PYTHON_PN}-gitdb"
+
+RDEPENDS_${PN} += " \
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-gitdb \
+ ${PYTHON_PN}-io \
+ ${PYTHON_PN}-logging \
+ ${PYTHON_PN}-math \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-stringold \
+ ${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-unixadmin \
+ git \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb b/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
deleted file mode 100644
index 80d9d469af..0000000000
--- a/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-gitdb.inc
-
-DEPENDS = "python3-async python3-smmap"
-
-inherit distutils3
-
-RDEPENDS_${PN} += "python3-smmap python3-async python3-mmap python3-lang python3-io python3-shell python3-crypt python3-compression"
diff --git a/meta/recipes-devtools/python/python3-gitdb_2.0.5.bb b/meta/recipes-devtools/python/python3-gitdb_2.0.5.bb
new file mode 100644
index 0000000000..fe158327cb
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-gitdb_2.0.5.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-gitdb.inc
diff --git a/meta/recipes-devtools/python/python3-iniparse/0001-Add-python-3-compatibility.patch b/meta/recipes-devtools/python/python3-iniparse/0001-Add-python-3-compatibility.patch
new file mode 100644
index 0000000000..44090a20d0
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-iniparse/0001-Add-python-3-compatibility.patch
@@ -0,0 +1,552 @@
+From 8a98e4d44a5e59439a4b6bd95368cc362412c995 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 24 Mar 2017 18:06:08 +0200
+Subject: [PATCH] Add python 3 compatibility.
+
+Taken from
+http://pkgs.fedoraproject.org/cgit/rpms/python-iniparse.git/tree/python-iniparse-python3-compat.patch
+
+Upstream-Status: Inappropriate [upstream is defunct]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ iniparse/__init__.py | 20 ++++++++++----------
+ iniparse/compat.py | 30 ++++++++++++++++--------------
+ iniparse/config.py | 16 ++++++++--------
+ iniparse/configparser.py | 7 +++++++
+ iniparse/ini.py | 20 ++++++++++++--------
+ iniparse/utils.py | 4 ++--
+ tests/__init__.py | 14 +++++++-------
+ tests/test_compat.py | 23 +++++++++++++++--------
+ tests/test_fuzz.py | 18 +++++++++---------
+ tests/test_ini.py | 8 ++++----
+ tests/test_misc.py | 4 ++--
+ tests/test_tidy.py | 2 +-
+ tests/test_unicode.py | 10 +++++-----
+ 13 files changed, 98 insertions(+), 78 deletions(-)
+ create mode 100644 iniparse/configparser.py
+
+diff --git a/iniparse/__init__.py b/iniparse/__init__.py
+index 8de756f..7193f92 100644
+--- a/iniparse/__init__.py
++++ b/iniparse/__init__.py
+@@ -3,17 +3,17 @@
+ # Copyright (c) 2007 Tim Lauridsen <tla@rasmil.dk>
+ # All Rights Reserved. See LICENSE-PSF & LICENSE for details.
+
+-from ini import INIConfig, change_comment_syntax
+-from config import BasicConfig, ConfigNamespace
+-from compat import RawConfigParser, ConfigParser, SafeConfigParser
+-from utils import tidy
++from .ini import INIConfig, change_comment_syntax
++from .config import BasicConfig, ConfigNamespace
++from .compat import RawConfigParser, ConfigParser, SafeConfigParser
++from .utils import tidy
+
+-from ConfigParser import DuplicateSectionError, \
+- NoSectionError, NoOptionError, \
+- InterpolationMissingOptionError, \
+- InterpolationDepthError, \
+- InterpolationSyntaxError, \
+- DEFAULTSECT, MAX_INTERPOLATION_DEPTH
++from .configparser import DuplicateSectionError, \
++ NoSectionError, NoOptionError, \
++ InterpolationMissingOptionError, \
++ InterpolationDepthError, \
++ InterpolationSyntaxError, \
++ DEFAULTSECT, MAX_INTERPOLATION_DEPTH
+
+ __all__ = [
+ 'BasicConfig', 'ConfigNamespace',
+diff --git a/iniparse/compat.py b/iniparse/compat.py
+index db89ed8..f95c25c 100644
+--- a/iniparse/compat.py
++++ b/iniparse/compat.py
+@@ -12,19 +12,21 @@ The underlying INIConfig object can be accessed as cfg.data
+ """
+
+ import re
+-from ConfigParser import DuplicateSectionError, \
+- NoSectionError, NoOptionError, \
+- InterpolationMissingOptionError, \
+- InterpolationDepthError, \
+- InterpolationSyntaxError, \
+- DEFAULTSECT, MAX_INTERPOLATION_DEPTH
++from .configparser import DuplicateSectionError, \
++ NoSectionError, NoOptionError, \
++ InterpolationMissingOptionError, \
++ InterpolationDepthError, \
++ InterpolationSyntaxError, \
++ DEFAULTSECT, MAX_INTERPOLATION_DEPTH
+
+ # These are imported only for compatiability.
+ # The code below does not reference them directly.
+-from ConfigParser import Error, InterpolationError, \
+- MissingSectionHeaderError, ParsingError
++from .configparser import Error, InterpolationError, \
++ MissingSectionHeaderError, ParsingError
+
+-import ini
++import six
++
++from . import ini
+
+ class RawConfigParser(object):
+ def __init__(self, defaults=None, dict_type=dict):
+@@ -56,7 +58,7 @@ class RawConfigParser(object):
+ # The default section is the only one that gets the case-insensitive
+ # treatment - so it is special-cased here.
+ if section.lower() == "default":
+- raise ValueError, 'Invalid section name: %s' % section
++ raise ValueError('Invalid section name: %s' % section)
+
+ if self.has_section(section):
+ raise DuplicateSectionError(section)
+@@ -88,7 +90,7 @@ class RawConfigParser(object):
+ filename may also be given.
+ """
+ files_read = []
+- if isinstance(filenames, basestring):
++ if isinstance(filenames, six.string_types):
+ filenames = [filenames]
+ for filename in filenames:
+ try:
+@@ -143,7 +145,7 @@ class RawConfigParser(object):
+ def getboolean(self, section, option):
+ v = self.get(section, option)
+ if v.lower() not in self._boolean_states:
+- raise ValueError, 'Not a boolean: %s' % v
++ raise ValueError('Not a boolean: %s' % v)
+ return self._boolean_states[v.lower()]
+
+ def has_option(self, section, option):
+@@ -234,7 +236,7 @@ class ConfigParser(RawConfigParser):
+ if "%(" in value:
+ try:
+ value = value % vars
+- except KeyError, e:
++ except KeyError as e:
+ raise InterpolationMissingOptionError(
+ option, section, rawval, e.args[0])
+ else:
+@@ -283,7 +285,7 @@ class SafeConfigParser(ConfigParser):
+ _badpercent_re = re.compile(r"%[^%]|%$")
+
+ def set(self, section, option, value):
+- if not isinstance(value, basestring):
++ if not isinstance(value, six.string_types):
+ raise TypeError("option values must be strings")
+ # check for bad percent signs:
+ # first, replace all "good" interpolations
+diff --git a/iniparse/config.py b/iniparse/config.py
+index 5cfa2ea..3b28549 100644
+--- a/iniparse/config.py
++++ b/iniparse/config.py
+@@ -143,7 +143,7 @@ class BasicConfig(ConfigNamespace):
+
+ >>> n.aaa = 42
+ >>> del n.x
+- >>> print n
++ >>> print(n)
+ aaa = 42
+ name.first = paramjit
+ name.last = oberoi
+@@ -152,7 +152,7 @@ class BasicConfig(ConfigNamespace):
+
+ >>> isinstance(n.name, ConfigNamespace)
+ True
+- >>> print n.name
++ >>> print(n.name)
+ first = paramjit
+ last = oberoi
+ >>> sorted(list(n.name))
+@@ -160,7 +160,7 @@ class BasicConfig(ConfigNamespace):
+
+ Finally, values can be read from a file as follows:
+
+- >>> from StringIO import StringIO
++ >>> from six import StringIO
+ >>> sio = StringIO('''
+ ... # comment
+ ... ui.height = 100
+@@ -171,7 +171,7 @@ class BasicConfig(ConfigNamespace):
+ ... ''')
+ >>> n = BasicConfig()
+ >>> n._readfp(sio)
+- >>> print n
++ >>> print(n)
+ complexity = medium
+ data.secret.password = goodness=gracious me
+ have_python
+@@ -199,7 +199,7 @@ class BasicConfig(ConfigNamespace):
+
+ def __str__(self, prefix=''):
+ lines = []
+- keys = self._data.keys()
++ keys = list(self._data.keys())
+ keys.sort()
+ for name in keys:
+ value = self._data[name]
+@@ -258,7 +258,7 @@ def update_config(target, source):
+ >>> n.ui.display_clock = True
+ >>> n.ui.display_qlength = True
+ >>> n.ui.width = 150
+- >>> print n
++ >>> print(n)
+ playlist.expand_playlist = True
+ ui.display_clock = True
+ ui.display_qlength = True
+@@ -267,7 +267,7 @@ def update_config(target, source):
+ >>> from iniparse import ini
+ >>> i = ini.INIConfig()
+ >>> update_config(i, n)
+- >>> print i
++ >>> print(i)
+ [playlist]
+ expand_playlist = True
+ <BLANKLINE>
+@@ -277,7 +277,7 @@ def update_config(target, source):
+ width = 150
+
+ """
+- for name in source:
++ for name in sorted(source):
+ value = source[name]
+ if isinstance(value, ConfigNamespace):
+ if name in target:
+diff --git a/iniparse/configparser.py b/iniparse/configparser.py
+new file mode 100644
+index 0000000..c543d50
+--- /dev/null
++++ b/iniparse/configparser.py
+@@ -0,0 +1,7 @@
++try:
++ from ConfigParser import *
++ # not all objects get imported with __all__
++ from ConfigParser import Error, InterpolationMissingOptionError
++except ImportError:
++ from configparser import *
++ from configparser import Error, InterpolationMissingOptionError
+diff --git a/iniparse/ini.py b/iniparse/ini.py
+index 408354d..052d9e9 100644
+--- a/iniparse/ini.py
++++ b/iniparse/ini.py
+@@ -7,7 +7,7 @@
+
+ Example:
+
+- >>> from StringIO import StringIO
++ >>> from six import StringIO
+ >>> sio = StringIO('''# configure foo-application
+ ... [foo]
+ ... bar1 = qualia
+@@ -16,14 +16,14 @@ Example:
+ ... special = 1''')
+
+ >>> cfg = INIConfig(sio)
+- >>> print cfg.foo.bar1
++ >>> print(cfg.foo.bar1)
+ qualia
+- >>> print cfg['foo-ext'].special
++ >>> print(cfg['foo-ext'].special)
+ 1
+ >>> cfg.foo.newopt = 'hi!'
+ >>> cfg.baz.enabled = 0
+
+- >>> print cfg
++ >>> print(cfg)
+ # configure foo-application
+ [foo]
+ bar1 = qualia
+@@ -42,9 +42,11 @@ Example:
+ # Backward-compatiable with ConfigParser
+
+ import re
+-from ConfigParser import DEFAULTSECT, ParsingError, MissingSectionHeaderError
++from .configparser import DEFAULTSECT, ParsingError, MissingSectionHeaderError
+
+-import config
++import six
++
++from . import config
+
+ class LineType(object):
+ line = None
+@@ -278,6 +280,8 @@ class LineContainer(object):
+ value = property(get_value, set_value)
+
+ def __str__(self):
++ for c in self.contents:
++ pass#print(c.__str__())
+ s = [x.__str__() for x in self.contents]
+ return '\n'.join(s)
+
+@@ -465,7 +469,7 @@ class INIConfig(config.ConfigNamespace):
+ self._sections = {}
+ if defaults is None: defaults = {}
+ self._defaults = INISection(LineContainer(), optionxformsource=self)
+- for name, value in defaults.iteritems():
++ for name, value in defaults.items():
+ self._defaults[name] = value
+ if fp is not None:
+ self._readfp(fp)
+@@ -551,7 +555,7 @@ class INIConfig(config.ConfigNamespace):
+
+ for line in readline_iterator(fp):
+ # Check for BOM on first line
+- if linecount == 0 and isinstance(line, unicode):
++ if linecount == 0 and isinstance(line, six.text_type):
+ if line[0] == u'\ufeff':
+ line = line[1:]
+ self._bom = True
+diff --git a/iniparse/utils.py b/iniparse/utils.py
+index 829fc28..f8b773a 100644
+--- a/iniparse/utils.py
++++ b/iniparse/utils.py
+@@ -1,5 +1,5 @@
+-import compat
+-from ini import LineContainer, EmptyLine
++from . import compat
++from .ini import LineContainer, EmptyLine
+
+ def tidy(cfg):
+ """Clean up blank lines.
+diff --git a/tests/__init__.py b/tests/__init__.py
+index f1fa321..88689fb 100644
+--- a/tests/__init__.py
++++ b/tests/__init__.py
+@@ -1,12 +1,12 @@
+ import unittest, doctest
+
+-import test_ini
+-import test_misc
+-import test_fuzz
+-import test_compat
+-import test_unicode
+-import test_tidy
+-import test_multiprocessing
++from . import test_ini
++from . import test_misc
++from . import test_fuzz
++from . import test_compat
++from . import test_unicode
++from . import test_tidy
++from . import test_multiprocessing
+ from iniparse import config
+ from iniparse import ini
+
+diff --git a/tests/test_compat.py b/tests/test_compat.py
+index b8da3d5..b6dfb5c 100644
+--- a/tests/test_compat.py
++++ b/tests/test_compat.py
+@@ -1,9 +1,16 @@
+ from iniparse import compat as ConfigParser
+-import StringIO
++from six import StringIO
++try:
++ import UserDict
++except ImportError:
++ import collections as UserDict
+ import unittest
+-import UserDict
+
+-from test import test_support
++import sys
++if sys.version_info[0] < 3:
++ from test import test_support
++else:
++ from test import support as test_support
+
+ class SortedDict(UserDict.UserDict):
+ def items(self):
+@@ -35,7 +42,7 @@ class TestCaseBase(unittest.TestCase):
+
+ def fromstring(self, string, defaults=None):
+ cf = self.newconfig(defaults)
+- sio = StringIO.StringIO(string)
++ sio = StringIO(string)
+ cf.readfp(sio)
+ return cf
+
+@@ -161,7 +168,7 @@ class TestCaseBase(unittest.TestCase):
+ "No Section!\n")
+
+ def parse_error(self, exc, src):
+- sio = StringIO.StringIO(src)
++ sio = StringIO(src)
+ self.assertRaises(exc, self.cf.readfp, sio)
+
+ def test_query_errors(self):
+@@ -181,7 +188,7 @@ class TestCaseBase(unittest.TestCase):
+ def get_error(self, exc, section, option):
+ try:
+ self.cf.get(section, option)
+- except exc, e:
++ except exc as e:
+ return e
+ else:
+ self.fail("expected exception type %s.%s"
+@@ -227,7 +234,7 @@ class TestCaseBase(unittest.TestCase):
+ "foo: another very\n"
+ " long line"
+ )
+- output = StringIO.StringIO()
++ output = StringIO()
+ cf.write(output)
+ self.assertEqual(
+ output.getvalue(),
+@@ -465,7 +472,7 @@ class SortedTestCase(RawConfigParserTestCase):
+ "o1=4\n"
+ "[a]\n"
+ "k=v\n")
+- output = StringIO.StringIO()
++ output = StringIO()
+ self.cf.write(output)
+ self.assertEquals(output.getvalue(),
+ "[a]\n"
+diff --git a/tests/test_fuzz.py b/tests/test_fuzz.py
+index 5420dcc..b219500 100644
+--- a/tests/test_fuzz.py
++++ b/tests/test_fuzz.py
+@@ -1,9 +1,10 @@
+ import re
+ import os
+ import random
++import sys
+ import unittest
+-import ConfigParser
+-from StringIO import StringIO
++from six import StringIO
++from six.moves import configparser
+ from iniparse import compat, ini, tidy
+
+ # TODO:
+@@ -96,24 +97,25 @@ class test_fuzz(unittest.TestCase):
+ s = '\n'.join(good_lines)
+ cc = compat.RawConfigParser()
+ cc.readfp(StringIO(s))
+- cc_py = ConfigParser.RawConfigParser()
++ cc_py = configparser.RawConfigParser()
+ cc_py.readfp(StringIO(s))
+ # compare the two configparsers
+ self.assertEqualConfig(cc_py, cc)
+ # check that tidy does not change semantics
+ tidy(cc)
+- cc_tidy = ConfigParser.RawConfigParser()
++ cc_tidy = configparser.RawConfigParser()
+ cc_tidy.readfp(StringIO(str(cc.data)))
+ self.assertEqualConfig(cc_py, cc_tidy)
+ except AssertionError:
+ fname = 'fuzz-test-iter-%d.ini' % fuzz_iter
+- print 'Fuzz test failed at iteration', fuzz_iter
+- print 'Writing out failing INI file as', fname
++ print('Fuzz test failed at iteration', fuzz_iter)
++ print('Writing out failing INI file as', fname)
+ f = open(fname, 'w')
+ f.write(s)
+ f.close()
+ raise
+
++ @unittest.skipIf(sys.version_info[0] > 2, 'http://code.google.com/p/iniparse/issues/detail?id=22#c9')
+ def assertEqualConfig(self, c1, c2):
+ self.assertEqualSorted(c1.sections(), c2.sections())
+ self.assertEqualSorted(c1.defaults().items(), c2.defaults().items())
+@@ -123,9 +125,7 @@ class test_fuzz(unittest.TestCase):
+ self.assertEqual(c1.get(sec, opt), c2.get(sec, opt))
+
+ def assertEqualSorted(self, l1, l2):
+- l1.sort()
+- l2.sort()
+- self.assertEqual(l1, l2)
++ self.assertEqual(sorted(l1), sorted(l2))
+
+ class suite(unittest.TestSuite):
+ def __init__(self):
+diff --git a/tests/test_ini.py b/tests/test_ini.py
+index 6a76edb..07d4f4e 100644
+--- a/tests/test_ini.py
++++ b/tests/test_ini.py
+@@ -1,5 +1,5 @@
+ import unittest
+-from StringIO import StringIO
++from six import StringIO
+
+ from iniparse import ini
+ from iniparse import compat
+@@ -196,13 +196,13 @@ but = also me
+ self.assertEqual(p._data.find('section2').find('just').value, 'kidding')
+
+ itr = p._data.finditer('section1')
+- v = itr.next()
++ v = next(itr)
+ self.assertEqual(v.find('help').value, 'yourself')
+ self.assertEqual(v.find('but').value, 'also me')
+- v = itr.next()
++ v = next(itr)
+ self.assertEqual(v.find('help').value, 'me')
+ self.assertEqual(v.find('I\'m').value, 'desperate')
+- self.assertRaises(StopIteration, itr.next)
++ self.assertRaises(StopIteration, next, itr)
+
+ self.assertRaises(KeyError, p._data.find, 'section')
+ self.assertRaises(KeyError, p._data.find('section2').find, 'ahem')
+diff --git a/tests/test_misc.py b/tests/test_misc.py
+index 31cf4da..96ef035 100644
+--- a/tests/test_misc.py
++++ b/tests/test_misc.py
+@@ -1,9 +1,9 @@
+ import re
+ import unittest
+ import pickle
+-import ConfigParser
++from six.moves import configparser
++from six import StringIO
+ from textwrap import dedent
+-from StringIO import StringIO
+ from iniparse import compat, ini
+
+ class CaseSensitiveConfigParser(compat.ConfigParser):
+diff --git a/tests/test_tidy.py b/tests/test_tidy.py
+index 7304747..26b6cde 100644
+--- a/tests/test_tidy.py
++++ b/tests/test_tidy.py
+@@ -1,6 +1,6 @@
+ import unittest
+ from textwrap import dedent
+-from StringIO import StringIO
++from six import StringIO
+
+ from iniparse import tidy,INIConfig
+ from iniparse.ini import EmptyLine
+diff --git a/tests/test_unicode.py b/tests/test_unicode.py
+index a56fcab..14d4fbd 100644
+--- a/tests/test_unicode.py
++++ b/tests/test_unicode.py
+@@ -1,5 +1,5 @@
+ import unittest
+-from StringIO import StringIO
++import six
+ from iniparse import compat, ini
+
+ class test_unicode(unittest.TestCase):
+@@ -17,14 +17,14 @@ baz = Marc-Andr\202
+ """
+
+ def basic_tests(self, s, strable):
+- f = StringIO(s)
++ f = six.StringIO(s)
+ i = ini.INIConfig(f)
+- self.assertEqual(unicode(i), s)
+- self.assertEqual(type(i.foo.bar), unicode)
++ self.assertEqual(six.text_type(i), s)
++ self.assertEqual(type(i.foo.bar), six.text_type)
+ if strable:
+ self.assertEqual(str(i), str(s))
+ else:
+- self.assertRaises(UnicodeEncodeError, lambda: str(i))
++ self.assertRaises(UnicodeEncodeError, lambda: six.text_type(i).encode('ascii'))
+ return i
+
+ def test_ascii(self):
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/python/python3-iniparse_0.4.bb b/meta/recipes-devtools/python/python3-iniparse_0.4.bb
new file mode 100644
index 0000000000..4eba9ecd34
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-iniparse_0.4.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Accessing and Modifying INI files"
+HOMEPAGE = "https://pypi.python.org/pypi/iniparse/"
+LICENSE = "MIT & PSF"
+LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
+ file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
+
+SRC_URI = "file://0001-Add-python-3-compatibility.patch "
+
+SRC_URI[md5sum] = "5e573e9e9733d97623881ce9bbe5eca6"
+SRC_URI[sha256sum] = "abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054"
+
+inherit pypi distutils3
+
+RDEPENDS_${PN} += "python3-core python3-six"
+DEPENDS += "python3-six"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python3-mako_1.0.4.bb b/meta/recipes-devtools/python/python3-mako_1.0.4.bb
deleted file mode 100644
index 2b50ffd08a..0000000000
--- a/meta/recipes-devtools/python/python3-mako_1.0.4.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require python-mako.inc
-
-inherit setuptools3
-
-RDEPENDS_${PN} = "python3-threading \
- python3-netclient \
- python3-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python3-mako_1.1.0.bb b/meta/recipes-devtools/python/python3-mako_1.1.0.bb
new file mode 100644
index 0000000000..b139e5ab00
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-mako_1.1.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Templating library for Python"
+HOMEPAGE = "http://www.makotemplates.org/"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=df7e6c7c82990acf0228a55e00d29bc9"
+
+PYPI_PACKAGE = "Mako"
+
+inherit pypi setuptools3
+
+SRC_URI[md5sum] = "6c3f2da0b74af529a4c4a537d0848bf2"
+SRC_URI[sha256sum] = "a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"
+
+RDEPENDS_${PN} = "${PYTHON_PN}-html \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-threading \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python3-native_3.5.2.bb b/meta/recipes-devtools/python/python3-native_3.5.2.bb
deleted file mode 100644
index 594f15c7c6..0000000000
--- a/meta/recipes-devtools/python/python3-native_3.5.2.bb
+++ /dev/null
@@ -1,98 +0,0 @@
-require recipes-devtools/python/python.inc
-
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.5"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://12-distutils-prefix-is-inside-staging-area.patch \
-file://python-config.patch \
-file://000-cross-compile.patch \
-file://020-dont-compile-python-files.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://python-3.3-multilib.patch \
-file://03-fix-tkinter-detection.patch \
-file://avoid_warning_about_tkinter.patch \
-file://shutil-follow-symlink-fix.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://sysroot-include-headers.patch \
-file://unixccompiler.patch \
-${DISTRO_SRC_URI} \
-file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
-file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
-file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
-"
-
-SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e"
-SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
-
-# exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-S = "${WORKDIR}/Python-${PV}"
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
-
-inherit native
-
-RPROVIDES += " \
- python3-compression-native \
- python3-core-native \
- python3-distutils-native \
- python3-email-native \
- python3-importlib-native \
- python3-io-native \
- python3-json-native \
- python3-lang-native \
- python3-misc-native \
- python3-netclient-native \
- python3-netserver-native \
- python3-numbers-native \
- python3-pkgutil-native \
- python3-pprint-native \
- python3-re-native \
- python3-shell-native \
- python3-subprocess-native \
- python3-textutils-native \
- python3-threading-native \
- python3-unittest-native \
-"
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
-
-EXTRA_OEMAKE = '\
- LIBC="" \
- STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
- STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
-'
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
- autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_install() {
- install -d ${D}${libdir}/pkgconfig
- oe_runmake 'DESTDIR=${D}' install
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
- install -d ${D}${bindir}/${PN}
- install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
- # Make sure we use /usr/bin/env python
- for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
- sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
- done
-}
diff --git a/meta/recipes-devtools/python/python3-nose_1.3.7.bb b/meta/recipes-devtools/python/python3-nose_1.3.7.bb
index 99bba4403f..13dbf96179 100644
--- a/meta/recipes-devtools/python/python3-nose_1.3.7.bb
+++ b/meta/recipes-devtools/python/python3-nose_1.3.7.bb
@@ -1,24 +1,2 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
inherit setuptools3
-
-RDEPENDS_${PN}_class-target = "\
- python3-unittest \
- "
-
-BBCLASSEXTEND = "native nativesdk"
+require python-nose.inc
diff --git a/meta/recipes-devtools/python/python3-pbr_5.4.4.bb b/meta/recipes-devtools/python/python3-pbr_5.4.4.bb
new file mode 100644
index 0000000000..6f335ea341
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pbr_5.4.4.bb
@@ -0,0 +1,5 @@
+inherit setuptools3
+require python-pbr.inc
+
+SRC_URI[md5sum] = "65cdc32e1a1ff56d481fc15aa8caf988"
+SRC_URI[sha256sum] = "139d2625547dbfa5fb0b81daebb39601c478c21956dc57e2e07b74450a8c506b"
diff --git a/meta/recipes-devtools/python/python3-pip_19.3.1.bb b/meta/recipes-devtools/python/python3-pip_19.3.1.bb
new file mode 100644
index 0000000000..d27e6fce5c
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pip_19.3.1.bb
@@ -0,0 +1,31 @@
+SUMMARY = "The PyPA recommended tool for installing Python packages"
+HOMEPAGE = "https://pypi.python.org/pypi/pip"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8ba06d529c955048e5ddd7c45459eb2e"
+
+DEPENDS += "python3 python3-setuptools-native"
+
+SRC_URI[md5sum] = "1aaaf90fbafc50e7ba1e66ffceb00960"
+SRC_URI[sha256sum] = "21207d76c1031e517668898a6b46a9fb1501c7a4710ef5dfd6a40ad9e6757ea7"
+
+inherit pypi distutils3
+
+do_install_append() {
+ # Install as pip3 and leave pip2 as default
+ rm ${D}/${bindir}/pip
+}
+
+RDEPENDS_${PN} = "\
+ python3-compile \
+ python3-io \
+ python3-html \
+ python3-json \
+ python3-netserver \
+ python3-setuptools \
+ python3-unixadmin \
+ python3-xmlrpc \
+ python3-pickle \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python3-pip_8.1.2.bb b/meta/recipes-devtools/python/python3-pip_8.1.2.bb
deleted file mode 100644
index eefb4cb796..0000000000
--- a/meta/recipes-devtools/python/python3-pip_8.1.2.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "The PyPA recommended tool for installing Python packages"
-sHOMEPAGEsss = "https://pypi.python.org/pypi/pip"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
-
-SRCNAME = "pip"
-DEPENDS += "python3 python3-setuptools-native"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "87083c0b9867963b29f7aba3613e8f4a"
-SRC_URI[sha256sum] = "4d24b03ffa67638a3fa931c09fd9e0273ffa904e95ebebe7d4b1a54c93d7b732"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils3
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
-
-do_install_prepend() {
- install -d ${D}${PYTHON_SITEPACKAGES_DIR}
-}
-
-# Use setuptools site.py instead, avoid shared state issue
-do_install_append() {
- rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py
- rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc
-
- # Install as pip3 and leave pip2 as default
- rm ${D}/${bindir}/pip
-
- # Installed eggs need to be passed directly to the interpreter via a pth file
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth
-}
-
-RDEPENDS_${PN} = "\
- python3-compile \
- python3-io \
- python3-json \
- python3-netserver \
- python3-setuptools \
- python3-unixadmin \
- python3-xmlrpc \
-"
diff --git a/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb b/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
deleted file mode 100644
index f9031b3bca..0000000000
--- a/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Python bindings for the Cairo canvas library"
-HOMEPAGE = "http://cairographics.org/pycairo"
-BUGTRACKER = "http://bugs.freedesktop.org"
-SECTION = "python-devel"
-LICENSE = "LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-# cairo >= 1.8.8
-DEPENDS = "cairo"
-PR = "r2"
-
-SRC_URI = "http://cairographics.org/releases/pycairo-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "e6fd3f2f1e6a72e0db0868c4985669c5"
-SRC_URI[sha256sum] = "9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be"
-
-S = "${WORKDIR}/pycairo-${PV}"
-
-inherit distutils3 pkgconfig
-
-BBCLASSEXTEND = "native"
-
-do_configure() {
- PYTHON=${PYTHON} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
-}
-
-do_compile() {
- ./waf build ${PARALLEL_MAKE}
-}
-
-do_install() {
- ./waf install
- sed \
- -e 's:@prefix@:${prefix}:' \
- -e 's:@VERSION@:${PV}:' \
- -e 's:@includedir@:${includedir}:' \
- py3cairo.pc.in > py3cairo.pc
- install -m 0644 py3cairo.pc ${D}${libdir}/pkgconfig/
-}
diff --git a/meta/recipes-devtools/python/python3-pycairo_1.18.2.bb b/meta/recipes-devtools/python/python3-pycairo_1.18.2.bb
new file mode 100644
index 0000000000..3aedf3d142
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pycairo_1.18.2.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Python bindings for the Cairo canvas library"
+HOMEPAGE = "http://cairographics.org/pycairo"
+BUGTRACKER = "http://bugs.freedesktop.org"
+SECTION = "python-devel"
+LICENSE = "LGPLv2.1 & MPLv1.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \
+ file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \
+ file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
+
+# cairo >= 1.14
+DEPENDS = "cairo python3"
+
+SRC_URI = "https://github.com/pygobject/pycairo/releases/download/v${PV}/pycairo-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "https://github.com/pygobject/pycairo/releases/"
+
+SRC_URI[md5sum] = "be2ba51f234270dec340f28f1695a95e"
+SRC_URI[sha256sum] = "dcb853fd020729516e8828ad364084e752327d4cff8505d20b13504b32b16531"
+
+S = "${WORKDIR}/pycairo-${PV}"
+
+inherit meson pkgconfig
+
+CFLAGS += "-fPIC"
+
+BBCLASSEXTEND = "native"
+
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
diff --git a/meta/recipes-devtools/python/python3-pygments_2.4.2.bb b/meta/recipes-devtools/python/python3-pygments_2.4.2.bb
new file mode 100644
index 0000000000..35c0ac6a57
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pygments_2.4.2.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Pygments is a syntax highlighting package written in Python."
+DESCRIPTION = "Pygments is a syntax highlighting package written in Python."
+HOMEPAGE = "http://pygments.org/"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1d7b7bffbfeaa14083fd2bd3236aea8"
+
+inherit setuptools3
+SRC_URI[md5sum] = "5ecc3fbb2a783e917b369271fc0e6cd1"
+SRC_URI[sha256sum] = "881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297"
+
+DEPENDS += "\
+ ${PYTHON_PN} \
+ "
+
+PYPI_PACKAGE = "Pygments"
+
+inherit pypi
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-devtools/python/python3-pygobject/0001-Do-not-build-tests.patch b/meta/recipes-devtools/python/python3-pygobject/0001-Do-not-build-tests.patch
new file mode 100644
index 0000000000..0f2465bb52
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pygobject/0001-Do-not-build-tests.patch
@@ -0,0 +1,30 @@
+From c125a806de951359ab7e302b0584f7c92fa451ad Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 12 Apr 2019 16:25:58 +0200
+Subject: [PATCH] Do not build tests
+
+They require installing tests from g-i, which we do not do.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 278fa16f..aacbd4a2 100644
+--- a/meson.build
++++ b/meson.build
+@@ -175,6 +175,6 @@ configure_file(input : 'PKG-INFO.in',
+ subdir('gi')
+ subdir('pygtkcompat')
+ with_tests = get_option('tests')
+-if with_tests
+-subdir('tests')
+-endif
++#if with_tests
++#subdir('tests')
++#endif
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch b/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
deleted file mode 100644
index a391f7e74e..0000000000
--- a/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5e5350d730f85957a42c6d846d347d080e7dd996 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 23 Oct 2015 12:40:34 +0300
-Subject: [PATCH] configure.ac: add sysroot path to GI_DATADIR; don't set
- introspection scanner and compiler paths
-
-Upstream-Status: Pending [review on oe-core maillist]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 8 +-------
- 1 file changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2c0cfbd..cfcb3bf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -194,7 +194,7 @@ PKG_CHECK_MODULES(GI,
- gobject-introspection-1.0 >= introspection_required_version
- )
-
--GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
-+GI_DATADIR=$PKG_CONFIG_SYSROOT_DIR$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
- AC_SUBST(GI_DATADIR)
-
- if test "$enable_cairo" != no; then
-@@ -219,12 +219,6 @@ AC_ARG_WITH(common,
- with_common=yes)
- AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
-
--INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
--INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
--
--AC_SUBST(INTROSPECTION_SCANNER)
--AC_SUBST(INTROSPECTION_COMPILER)
--
- # compiler warnings, errors, required cflags, and code coverage support
- GNOME_COMPILE_WARNINGS([maximum])
- AC_MSG_CHECKING(for Gnome code coverage support)
---
-2.1.4
-
diff --git a/meta/recipes-devtools/python/python3-pygobject_3.20.1.bb b/meta/recipes-devtools/python/python3-pygobject_3.20.1.bb
deleted file mode 100644
index cda16f17ae..0000000000
--- a/meta/recipes-devtools/python/python3-pygobject_3.20.1.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Python GObject bindings"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-
-inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even
-
-DEPENDS += "python3 glib-2.0"
-
-SRCNAME="pygobject"
-SRC_URI = " \
- http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
- file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
-"
-
-SRC_URI[md5sum] = "4354c6283b135f859563b72457f6a321"
-SRC_URI[sha256sum] = "3d261005d6fed6a92ac4c25f283792552f7dad865d1b7e0c03c2b84c04dbd745"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--disable-cairo"
-
-RDEPENDS_${PN} += "python3-setuptools python3-importlib"
diff --git a/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb b/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb
new file mode 100644
index 0000000000..6babf0cae8
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Python GObject bindings"
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even
+
+DEPENDS += "python3 glib-2.0"
+
+SRCNAME="pygobject"
+
+SRC_URI = " \
+ http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
+ file://0001-Do-not-build-tests.patch \
+"
+SRC_URI[md5sum] = "ca1dc4f31c1d6d283758e8f315a88ab6"
+SRC_URI[sha256sum] = "87e2c9aa785f352ef111dcc5f63df9b85cf6e05e52ff04f803ffbebdacf5271a"
+
+UNKNOWN_CONFIGURE_WHITELIST = "introspection"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
+
+RDEPENDS_${PN} += "python3-pkgutil"
+
+# python3-pycairo is checked on configuration -> DEPENDS
+# we don't link against python3-pycairo -> RDEPENDS
+PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo"
+
+BBCLASSEXTEND = "native"
+PACKAGECONFIG_class-native = ""
diff --git a/meta/recipes-devtools/python/python3-scons-native_3.1.1.bb b/meta/recipes-devtools/python/python3-scons-native_3.1.1.bb
new file mode 100644
index 0000000000..5cd5956625
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-scons-native_3.1.1.bb
@@ -0,0 +1,8 @@
+require python3-scons_${PV}.bb
+inherit native python3native
+DEPENDS = "python3-native"
+RDEPENDS_${PN} = ""
+
+do_install_append() {
+ create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' PYTHONNOUSERSITE='1'
+}
diff --git a/meta/recipes-devtools/python/python3-scons_3.1.1.bb b/meta/recipes-devtools/python/python3-scons_3.1.1.bb
new file mode 100644
index 0000000000..0c7aaeaeee
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-scons_3.1.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=37bb53a08e6beaea0c90e7821d731284"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
+SRC_URI[md5sum] = "35b2a3993313bbedd221d4d5758fd2fd"
+SRC_URI[sha256sum] = "4cea417fdd7499a36f407923d03b4b7000b0f9e8fd7b31b316b9ce7eba9143a5"
+
+S = "${WORKDIR}/scons-${PV}"
+
+UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit setuptools3
+
+do_install_prepend() {
+ sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${S}/script/*
+}
+
+RDEPENDS_${PN} = "\
+ python3-core \
+ python3-fcntl \
+ python3-io \
+ python3-json \
+ python3-shell \
+ python3-pickle \
+ python3-pprint \
+ "
diff --git a/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb b/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
deleted file mode 100644
index 65af6f0dad..0000000000
--- a/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-require python-setuptools.inc
-
-DEPENDS += "python3"
-DEPENDS_class-native += "python3-native"
-
-inherit distutils3
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
-
-# The installer puts the wrong path in the setuptools.pth file. Correct it.
-do_install_append() {
- rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
- mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
-}
-
-RDEPENDS_${PN} = "\
- python3-distutils \
- python3-compression \
-"
-RDEPENDS_${PN}_class-target = "\
- python3-ctypes \
- python3-distutils \
- python3-email \
- python3-importlib \
- python3-numbers \
- python3-compression \
- python3-shell \
- python3-subprocess \
- python3-textutils \
- python3-pkgutil \
- python3-threading \
- python3-misc \
- python3-unittest \
- python3-xml \
-"
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/python/python3-setuptools_42.0.2.bb b/meta/recipes-devtools/python/python3-setuptools_42.0.2.bb
new file mode 100644
index 0000000000..0dc1ed8622
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-setuptools_42.0.2.bb
@@ -0,0 +1,6 @@
+require python-setuptools.inc
+inherit setuptools3
+
+do_install_append() {
+ mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
+}
diff --git a/meta/recipes-devtools/python/python3-six_1.10.0.bb b/meta/recipes-devtools/python/python3-six_1.10.0.bb
deleted file mode 100644
index 38a47b77dd..0000000000
--- a/meta/recipes-devtools/python/python3-six_1.10.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools3
-require python-six.inc
-
-RDEPENDS_${PN} += "python3-io"
diff --git a/meta/recipes-devtools/python/python3-six_1.13.0.bb b/meta/recipes-devtools/python/python3-six_1.13.0.bb
new file mode 100644
index 0000000000..8795313bec
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-six_1.13.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-six.inc
diff --git a/meta/recipes-devtools/python/python3-smmap_0.9.0.bb b/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
deleted file mode 100644
index 9f8a26d79e..0000000000
--- a/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require python-smmap.inc
-
-inherit setuptools3
-
-RDEPENDS_${PN} += "python3-codecs python3-mmap python3-lang"
diff --git a/meta/recipes-devtools/python/python3-smmap_2.0.5.bb b/meta/recipes-devtools/python/python3-smmap_2.0.5.bb
new file mode 100644
index 0000000000..e87b8df8c5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-smmap_2.0.5.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-smmap.inc
diff --git a/meta/recipes-devtools/python/python3-subunit_1.3.0.bb b/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
new file mode 100644
index 0000000000..55066e2d0f
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
@@ -0,0 +1,4 @@
+inherit setuptools3
+require python-subunit.inc
+
+RDEPENDS_${PN} = " python3-testtools"
diff --git a/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch b/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch
new file mode 100644
index 0000000000..594510342b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch
@@ -0,0 +1,23 @@
+traceback2 adds traceback for python2. Rather than depend on traceback2, we're
+python3 only so just use traceback.
+This caused breakage in oe-selftest -j which uses testtools on the autobuilder
+using buildtools-tarball.
+
+Upstream-Status: Inappropriate [Our recipe is python3 specific]
+(Once py2 is EOL upstream probably could/should take this)
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: testtools-2.3.0/testtools/content.py
+===================================================================
+--- testtools-2.3.0.orig/testtools/content.py
++++ testtools-2.3.0/testtools/content.py
+@@ -19,8 +19,7 @@ import os
+ import sys
+
+ from extras import try_import
+-# To let setup.py work, make this a conditional import.
+-traceback = try_import('traceback2')
++import traceback
+
+ from testtools.compat import (
+ _b,
diff --git a/meta/recipes-devtools/python/python3-testtools_2.3.0.bb b/meta/recipes-devtools/python/python3-testtools_2.3.0.bb
new file mode 100644
index 0000000000..a254b90a75
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-testtools_2.3.0.bb
@@ -0,0 +1,4 @@
+inherit setuptools3
+require python-testtools.inc
+
+SRC_URI += "file://no_traceback2.patch"
diff --git a/meta/recipes-devtools/python/python3/000-cross-compile.patch b/meta/recipes-devtools/python/python3/000-cross-compile.patch
deleted file mode 100644
index 2d822218f4..0000000000
--- a/meta/recipes-devtools/python/python3/000-cross-compile.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-We cross compile python. This patch uses tools from host/native
-python instead of in-tree tools
-
--Khem
-
-Upstream-Status: Inappropriate[Configuration Specific]
-
----
- Makefile.pre.in | 25 +++++++++++++------------
- 1 file changed, 13 insertions(+), 12 deletions(-)
-
-Index: Python-3.5.2/Makefile.pre.in
-===================================================================
---- Python-3.5.2.orig/Makefile.pre.in
-+++ Python-3.5.2/Makefile.pre.in
-@@ -220,6 +220,7 @@ LIBOBJS= @LIBOBJS@
-
- PYTHON= python$(EXE)
- BUILDPYTHON= python$(BUILDEXE)
-+HOSTPYTHON= $(BUILDPYTHON)
-
- cross_compiling=@cross_compiling@
- PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
-@@ -279,6 +280,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
- ##########################################################################
- # Parser
- PGEN= Parser/pgen$(EXE)
-+HOSTPGEN= $(PGEN)$(EXE)
-
- PSRCS= \
- Parser/acceler.c \
-@@ -509,7 +511,7 @@ build_all_generate_profile:
-
- run_profile_task:
- : # FIXME: can't run for a cross build
-- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
-+ $(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true
-
- build_all_merge_profile:
- $(LLVM_PROF_MERGER)
-@@ -792,7 +794,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
- @$(MKDIR_P) Include
- # Avoid copying the file onto itself for an in-tree build
- if test "$(cross_compiling)" != "yes"; then \
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
- else \
- cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \
- mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \
-@@ -990,7 +992,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/pyth
- ######################################################################
-
- TESTOPTS= $(EXTRATESTOPTS)
--TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
-+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS)
- TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
- TESTTIMEOUT= 3600
-
-@@ -1481,7 +1483,7 @@ frameworkinstallstructure: $(LDLIBRARY)
- fi; \
- done
- $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
-- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
-+ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
- $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
- $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
- $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1547,7 +1549,7 @@ config.status: $(srcdir)/configure
-
- # Run reindent on the library
- reindent:
-- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
-+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
-
- # Rerun configure with the same options as it was run last time,
- # provided the config.status script exists
-@@ -1683,7 +1685,7 @@ funny:
-
- # Perform some verification checks on any modified files.
- patchcheck: all
-- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-+ $(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-
- # Dependencies
-
diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch b/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
new file mode 100644
index 0000000000..09f279ba1d
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
@@ -0,0 +1,25 @@
+From 23294c6ba6896115828293fdb7e67b47b38ba675 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 25 Jan 2019 19:04:13 +0100
+Subject: [PATCH] Do not add /usr/lib/termcap to linker flags to avoid host
+ contamination
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index b4357e3..fbec00d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -856,7 +856,6 @@ class PyBuildExt(build_ext):
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ else:
diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch b/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch
new file mode 100644
index 0000000000..ea75262c4f
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch
@@ -0,0 +1,196 @@
+From 0fbdad1eaf541a8e92be81f39514cd249b3b0801 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 5 Feb 2019 15:52:02 +0100
+Subject: [PATCH] Do not hardcode "lib" as location for modules, site-packages
+ and lib-dynload
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ Include/pythonrun.h | 2 ++
+ Lib/site.py | 4 ++--
+ Makefile.pre.in | 5 +++--
+ Modules/getpath.c | 18 ++++++++++++------
+ Python/getplatform.c | 10 ++++++++++
+ Python/sysmodule.c | 2 ++
+ 6 files changed, 31 insertions(+), 10 deletions(-)
+
+diff --git a/Include/pythonrun.h b/Include/pythonrun.h
+index 6f0c6fc..0a17edd 100644
+--- a/Include/pythonrun.h
++++ b/Include/pythonrun.h
+@@ -7,6 +7,8 @@
+ extern "C" {
+ #endif
+
++PyAPI_FUNC(const char *) Py_GetLib(void);
++
+ #ifndef Py_LIMITED_API
+ PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
+ PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
+diff --git a/Lib/site.py b/Lib/site.py
+index ffd132b..b55f6d8 100644
+--- a/Lib/site.py
++++ b/Lib/site.py
+@@ -334,12 +334,12 @@ def getsitepackages(prefixes=None):
+ seen.add(prefix)
+
+ if os.sep == '/':
+- sitepackages.append(os.path.join(prefix, "lib",
++ sitepackages.append(os.path.join(prefix, sys.lib,
+ "python%d.%d" % sys.version_info[:2],
+ "site-packages"))
+ else:
+ sitepackages.append(prefix)
+- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
++ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
+ return sitepackages
+
+ def addsitepackages(known_paths, prefixes=None):
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 6e81b2f..671a20e 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -142,7 +142,7 @@ LIBDIR= @libdir@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ CONFINCLUDEDIR= $(exec_prefix)/include
+-SCRIPTDIR= $(prefix)/lib
++SCRIPTDIR= @libdir@
+ ABIFLAGS= @ABIFLAGS@
+
+ # Detailed destination directories
+@@ -768,6 +768,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
+ -DEXEC_PREFIX='"$(exec_prefix)"' \
+ -DVERSION='"$(VERSION)"' \
+ -DVPATH='"$(VPATH)"' \
++ -DLIB='"$(LIB)"' \
+ -o $@ $(srcdir)/Modules/getpath.c
+
+ Programs/python.o: $(srcdir)/Programs/python.c
+@@ -856,7 +857,7 @@ regen-opcode:
+ Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o Parser/parsetok.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
+
+ Python/getplatform.o: $(srcdir)/Python/getplatform.c
+- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
++ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
+
+ Python/importdl.o: $(srcdir)/Python/importdl.c
+ $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
+diff --git a/Modules/getpath.c b/Modules/getpath.c
+index e6a3e8e..0c62af6 100644
+--- a/Modules/getpath.c
++++ b/Modules/getpath.c
+@@ -123,6 +123,7 @@ typedef struct {
+ wchar_t *exec_prefix; /* EXEC_PREFIX define */
+
+ wchar_t *lib_python; /* "lib/pythonX.Y" */
++ wchar_t *multilib_python; /* "lib[suffix]/pythonX.Y" */
+ wchar_t argv0_path[MAXPATHLEN+1];
+ wchar_t zip_path[MAXPATHLEN+1]; /* ".../lib/pythonXY.zip" */
+
+@@ -314,7 +315,7 @@ search_for_prefix(const _PyCoreConfig *core_config,
+ if (delim) {
+ *delim = L'\0';
+ }
+- joinpath(prefix, calculate->lib_python);
++ joinpath(prefix, calculate->multilib_python);
+ joinpath(prefix, LANDMARK);
+ return 1;
+ }
+@@ -343,7 +344,7 @@ search_for_prefix(const _PyCoreConfig *core_config,
+ copy_absolute(prefix, calculate->argv0_path, MAXPATHLEN+1);
+ do {
+ n = wcslen(prefix);
+- joinpath(prefix, calculate->lib_python);
++ joinpath(prefix, calculate->multilib_python);
+ joinpath(prefix, LANDMARK);
+ if (ismodule(prefix)) {
+ return 1;
+@@ -355,7 +356,7 @@ search_for_prefix(const _PyCoreConfig *core_config,
+ /* Look at configure's PREFIX */
+ wcsncpy(prefix, calculate->prefix, MAXPATHLEN);
+ prefix[MAXPATHLEN] = L'\0';
+- joinpath(prefix, calculate->lib_python);
++ joinpath(prefix, calculate->multilib_python);
+ joinpath(prefix, LANDMARK);
+ if (ismodule(prefix)) {
+ return 1;
+@@ -427,7 +428,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config,
+ wcsncpy(exec_prefix, core_config->home, MAXPATHLEN);
+ }
+ exec_prefix[MAXPATHLEN] = L'\0';
+- joinpath(exec_prefix, calculate->lib_python);
++ joinpath(exec_prefix, calculate->multilib_python);
+ joinpath(exec_prefix, L"lib-dynload");
+ return 1;
+ }
+@@ -464,7 +465,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config,
+ copy_absolute(exec_prefix, calculate->argv0_path, MAXPATHLEN+1);
+ do {
+ n = wcslen(exec_prefix);
+- joinpath(exec_prefix, calculate->lib_python);
++ joinpath(exec_prefix, calculate->multilib_python);
+ joinpath(exec_prefix, L"lib-dynload");
+ if (isdir(exec_prefix)) {
+ return 1;
+@@ -476,7 +477,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config,
+ /* Look at configure's EXEC_PREFIX */
+ wcsncpy(exec_prefix, calculate->exec_prefix, MAXPATHLEN);
+ exec_prefix[MAXPATHLEN] = L'\0';
+- joinpath(exec_prefix, calculate->lib_python);
++ joinpath(exec_prefix, calculate->multilib_python);
+ joinpath(exec_prefix, L"lib-dynload");
+ if (isdir(exec_prefix)) {
+ return 1;
+@@ -871,6 +872,10 @@ calculate_init(PyCalculatePath *calculate,
+ if (!calculate->lib_python) {
+ return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
+ }
++ calculate->multilib_python = Py_DecodeLocale(LIB "/python" VERSION, &len);
++ if (!calculate->multilib_python) {
++ return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
++ }
+ return _Py_INIT_OK();
+ }
+
+@@ -882,6 +887,7 @@ calculate_free(PyCalculatePath *calculate)
+ PyMem_RawFree(calculate->prefix);
+ PyMem_RawFree(calculate->exec_prefix);
+ PyMem_RawFree(calculate->lib_python);
++ PyMem_RawFree(calculate->multilib_python);
+ PyMem_RawFree(calculate->path_env);
+ }
+
+diff --git a/Python/getplatform.c b/Python/getplatform.c
+index 81a0f7a..d55396b 100644
+--- a/Python/getplatform.c
++++ b/Python/getplatform.c
+@@ -10,3 +10,13 @@ Py_GetPlatform(void)
+ {
+ return PLATFORM;
+ }
++
++#ifndef LIB
++#define LIB "lib"
++#endif
++
++const char *
++Py_GetLib(void)
++{
++ return LIB;
++}
+diff --git a/Python/sysmodule.c b/Python/sysmodule.c
+index efe5b29..de77b17 100644
+--- a/Python/sysmodule.c
++++ b/Python/sysmodule.c
+@@ -2319,6 +2319,8 @@ _PySys_BeginInit(PyObject **sysmod)
+ PyUnicode_FromString(Py_GetCopyright()));
+ SET_SYS_FROM_STRING("platform",
+ PyUnicode_FromString(Py_GetPlatform()));
++ SET_SYS_FROM_STRING("lib",
++ PyUnicode_FromString(Py_GetLib()));
+ SET_SYS_FROM_STRING("maxsize",
+ PyLong_FromSsize_t(PY_SSIZE_T_MAX));
+ SET_SYS_FROM_STRING("float_info",
diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
index b7e0ac6354..83fd52d87f 100644
--- a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
+++ b/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
@@ -1,6 +1,6 @@
-From 045c99b5f1eb6e4e0d8ad1ef9f0ba6574f738150 Mon Sep 17 00:00:00 2001
+From 148861fa16f2aaacd518770f337ea54b5182f981 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 23 Oct 2015 12:25:09 +0300
+Date: Tue, 29 Jan 2019 15:03:01 +0100
Subject: [PATCH] Do not use the shell version of python-config that was
introduced in 3.4
@@ -14,25 +14,22 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
-index d7fc9a0..47e60bc 100644
+index 2d2e11f..cc19942 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1270,12 +1270,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
+@@ -1431,12 +1431,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
- # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
- sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
-- # On Darwin, always use the python version of the script, the shell
-- # version doesn't use the compiler customizations that are provided
-- # in python (_osx_support.py).
-- if test `uname -s` = Darwin; then \
+ @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
+ LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
+- @ # On Darwin, always use the python version of the script, the shell
+- @ # version doesn't use the compiler customizations that are provided
+- @ # in python (_osx_support.py).
+- @if test `uname -s` = Darwin; then \
- cp python-config.py python-config; \
- fi
-+ # In OpenEmbedded, always use the python version of the script, the shell
-+ # version is broken in multiple ways, and doesn't return correct directories
++ @ # In OpenEmbedded, always use the python version of the script, the shell
++ @ # version is broken in multiple ways, and doesn't return correct directories
+ cp python-config.py python-config
# Install the include files
---
-2.1.4
-
diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch
new file mode 100644
index 0000000000..b97583682a
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch
@@ -0,0 +1,31 @@
+From a21f4f8fa5e5c0601898740b4ac08ec84f41e190 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 18 Apr 2019 17:11:06 +0200
+Subject: [PATCH] Lib/sysconfig.py: fix another place where 'lib' is hardcoded
+ as the library path
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Lib/sysconfig.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index d15cec8..87fa5e6 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -20,10 +20,10 @@ __all__ = [
+
+ _INSTALL_SCHEMES = {
+ 'posix_prefix': {
+- 'stdlib': '{installed_base}/lib/python{py_version_short}',
+- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++ 'stdlib': '{LIBDEST}',
++ 'platstdlib': '{LIBDEST}',
++ 'purelib': '{LIBDEST}/site-packages',
++ 'platlib': '{LIBDEST}/site-packages',
+ 'include':
+ '{installed_base}/include/python{py_version_short}{abiflags}',
+ 'platinclude':
diff --git a/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch b/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch
new file mode 100644
index 0000000000..237645bc60
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch
@@ -0,0 +1,34 @@
+From 840fda32c82550259d02a7a56a78a9c05162b1a1 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 8 May 2019 16:10:29 +0800
+Subject: [PATCH] Makefile: fix Issue36464 (parallel build race problem)
+
+When using make -j with the 'install' target, it's possible for altbininstall
+(which normally creates BINDIR) and libainstall (which doesn't, though it
+installs python-config there) to race, resulting in a failure due to
+attempting to install python-config into a nonexistent BINDIR. Ensure it also
+exists in the libainstall target.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/13186]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ Makefile.pre.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 15f3687..7e9f173 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1456,7 +1456,7 @@ LIBPL= @LIBPL@
+ LIBPC= $(LIBDIR)/pkgconfig
+
+ libainstall: @DEF_MAKE_RULE@ python-config
+- @for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
++ @for i in $(LIBDIR) $(LIBPL) $(LIBPC) $(BINDIR); \
+ do \
+ if test ! -d $(DESTDIR)$$i; then \
+ echo "Creating directory $$i"; \
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
new file mode 100644
index 0000000000..fa7735ff93
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
@@ -0,0 +1,25 @@
+From cf6a9100902484e4d028ee88742dd2487b014a98 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 30 Jan 2019 12:41:04 +0100
+Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.pre.in | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index a3a02a7..d5503dd 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -507,8 +507,7 @@ build_all_generate_profile:
+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
+
+ run_profile_task:
+- @ # FIXME: can't run for a cross build
+- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
++ ./pgo-wrapper ./python -m test.regrtest --pgo test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_support || true
+
+ build_all_merge_profile:
+ $(LLVM_PROF_MERGER)
diff --git a/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch b/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch
new file mode 100644
index 0000000000..957839bf3e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch
@@ -0,0 +1,35 @@
+From 6c8ea7c1dacd42f3ba00440231ec0e6b1a38300d Mon Sep 17 00:00:00 2001
+From: Inada Naoki <songofacandy@gmail.com>
+Date: Sat, 14 Jul 2018 00:46:11 +0900
+Subject: [PATCH] Use FLAG_REF always for interned strings
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/8226]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ Python/marshal.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/Python/marshal.c b/Python/marshal.c
+index 6d06266c6a..51db2e3b2e 100644
+--- a/Python/marshal.c
++++ b/Python/marshal.c
+@@ -275,9 +275,14 @@ w_ref(PyObject *v, char *flag, WFILE *p)
+ if (p->version < 3 || p->hashtable == NULL)
+ return 0; /* not writing object references */
+
+- /* if it has only one reference, it definitely isn't shared */
+- if (Py_REFCNT(v) == 1)
++ /* If it has only one reference, it definitely isn't shared.
++ * But we use TYPE_REF always for interned string, to PYC file stable
++ * as possible.
++ */
++ if (Py_REFCNT(v) == 1 &&
++ !(PyUnicode_CheckExact(v) && PyUnicode_CHECK_INTERNED(v))) {
+ return 0;
++ }
+
+ entry = _Py_HASHTABLE_GET_ENTRY(p->hashtable, v);
+ if (entry != NULL) {
+--
+2.21.0
+
diff --git a/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch b/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
new file mode 100644
index 0000000000..e7af88654d
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
@@ -0,0 +1,201 @@
+From 7535c39951b9d15dd64c4669092a8582ba555466 Mon Sep 17 00:00:00 2001
+From: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
+Date: Fri, 31 May 2019 15:34:34 +0200
+Subject: [PATCH] bpo-36852: proper detection of mips architecture for soft
+ float
+
+When (cross) compiling for softfloat mips, __mips_hard_float will not be
+defined and detection of OS triplet in configure.ac / configure will fail.
+
+This also has to do with the custom detection of the build triplet. Trying
+to do this in a more autoconf/autotools manner.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/13196]
+Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
+---
+ configure.ac | 169 ++++++---------------------------------------------
+ 1 file changed, 17 insertions(+), 152 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a7de901e08..a73e2de51b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -727,158 +727,23 @@ fi
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+ AC_SUBST(MULTIARCH)
+
+-AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
+-cat >> conftest.c <<EOF
+-#undef bfin
+-#undef cris
+-#undef fr30
+-#undef linux
+-#undef hppa
+-#undef hpux
+-#undef i386
+-#undef mips
+-#undef powerpc
+-#undef sparc
+-#undef unix
+-#if defined(__ANDROID__)
+- # Android is not a multiarch system.
+-#elif defined(__linux__)
+-# if defined(__x86_64__) && defined(__LP64__)
+- x86_64-linux-gnu
+-# elif defined(__x86_64__) && defined(__ILP32__)
+- x86_64-linux-gnux32
+-# elif defined(__i386__)
+- i386-linux-gnu
+-# elif defined(__aarch64__) && defined(__AARCH64EL__)
+-# if defined(__ILP32__)
+- aarch64_ilp32-linux-gnu
+-# else
+- aarch64-linux-gnu
+-# endif
+-# elif defined(__aarch64__) && defined(__AARCH64EB__)
+-# if defined(__ILP32__)
+- aarch64_be_ilp32-linux-gnu
+-# else
+- aarch64_be-linux-gnu
+-# endif
+-# elif defined(__alpha__)
+- alpha-linux-gnu
+-# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
+-# if defined(__ARMEL__)
+- arm-linux-gnueabihf
+-# else
+- armeb-linux-gnueabihf
+-# endif
+-# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
+-# if defined(__ARMEL__)
+- arm-linux-gnueabi
+-# else
+- armeb-linux-gnueabi
+-# endif
+-# elif defined(__hppa__)
+- hppa-linux-gnu
+-# elif defined(__ia64__)
+- ia64-linux-gnu
+-# elif defined(__m68k__) && !defined(__mcoldfire__)
+- m68k-linux-gnu
+-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
+-# if _MIPS_SIM == _ABIO32
+- mipsisa32r6el-linux-gnu
+-# elif _MIPS_SIM == _ABIN32
+- mipsisa64r6el-linux-gnuabin32
+-# elif _MIPS_SIM == _ABI64
+- mipsisa64r6el-linux-gnuabi64
+-# else
+-# error unknown platform triplet
+-# endif
+-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
+-# if _MIPS_SIM == _ABIO32
+- mipsisa32r6-linux-gnu
+-# elif _MIPS_SIM == _ABIN32
+- mipsisa64r6-linux-gnuabin32
+-# elif _MIPS_SIM == _ABI64
+- mipsisa64r6-linux-gnuabi64
+-# else
+-# error unknown platform triplet
+-# endif
+-# elif defined(__mips_hard_float) && defined(_MIPSEL)
+-# if _MIPS_SIM == _ABIO32
+- mipsel-linux-gnu
+-# elif _MIPS_SIM == _ABIN32
+- mips64el-linux-gnuabin32
+-# elif _MIPS_SIM == _ABI64
+- mips64el-linux-gnuabi64
+-# else
+-# error unknown platform triplet
+-# endif
+-# elif defined(__mips_hard_float)
+-# if _MIPS_SIM == _ABIO32
+- mips-linux-gnu
+-# elif _MIPS_SIM == _ABIN32
+- mips64-linux-gnuabin32
+-# elif _MIPS_SIM == _ABI64
+- mips64-linux-gnuabi64
+-# else
+-# error unknown platform triplet
+-# endif
+-# elif defined(__or1k__)
+- or1k-linux-gnu
+-# elif defined(__powerpc__) && defined(__SPE__)
+- powerpc-linux-gnuspe
+-# elif defined(__powerpc64__)
+-# if defined(__LITTLE_ENDIAN__)
+- powerpc64le-linux-gnu
+-# else
+- powerpc64-linux-gnu
+-# endif
+-# elif defined(__powerpc__)
+- powerpc-linux-gnu
+-# elif defined(__s390x__)
+- s390x-linux-gnu
+-# elif defined(__s390__)
+- s390-linux-gnu
+-# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
+- sh4-linux-gnu
+-# elif defined(__sparc__) && defined(__arch64__)
+- sparc64-linux-gnu
+-# elif defined(__sparc__)
+- sparc-linux-gnu
+-# elif defined(__riscv)
+-# if __riscv_xlen == 32
+- riscv32-linux-gnu
+-# elif __riscv_xlen == 64
+- riscv64-linux-gnu
+-# else
+-# error unknown platform triplet
+-# endif
+-# else
+-# error unknown platform triplet
+-# endif
+-#elif defined(__FreeBSD_kernel__)
+-# if defined(__LP64__)
+- x86_64-kfreebsd-gnu
+-# elif defined(__i386__)
+- i386-kfreebsd-gnu
+-# else
+-# error unknown platform triplet
+-# endif
+-#elif defined(__gnu_hurd__)
+- i386-gnu
+-#elif defined(__APPLE__)
+- darwin
+-#else
+-# error unknown platform triplet
+-#endif
+-
+-EOF
+-
+-if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
+- PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
+- AC_MSG_RESULT([$PLATFORM_TRIPLET])
+-else
+- AC_MSG_RESULT([none])
+-fi
+-rm -f conftest.c conftest.out
++AC_CANONICAL_TARGET
++## Not using $target to filter out vendor
++## Need to handle macos, vxworks and hurd special (?) :-/
++case ${target_os} in
++ darwin*)
++ PLATFORM_TRIPLET=darwin
++ ;;
++ hurd*)
++ PLATFORM_TRIPLET=i386-gnu
++ ;;
++ vxworks*)
++ PLATFORM_TRIPLET=vxworks
++ ;;
++ *)
++ PLATFORM_TRIPLET=${target_cpu}-${target_os}
++ ;;
++esac
+
+ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
+ if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
+--
+2.21.0
+
diff --git a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch b/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch
new file mode 100644
index 0000000000..1709011be8
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch
@@ -0,0 +1,42 @@
+From eff903c600f4c40f5753e95ab1557126fc6e0c9c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 31 Jan 2019 16:46:30 +0100
+Subject: [PATCH] distutils/sysconfig: append
+ STAGING_LIBDIR/python-sysconfigdata to sys.path
+
+So that target configuration can be used when running native python
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ Lib/distutils/sysconfig.py | 2 ++
+ Lib/sysconfig.py | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index 0a034ee..3dfd0a3 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -439,6 +439,8 @@ def _init_posix():
+ platform=sys.platform,
+ multiarch=getattr(sys.implementation, '_multiarch', ''),
+ ))
++ if 'STAGING_LIBDIR' in os.environ:
++ sys.path.append(os.environ['STAGING_LIBDIR']+'/python-sysconfigdata')
+ _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
+ build_time_vars = _temp.build_time_vars
+ global _config_vars
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index 87fa5e6..756a41c 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -419,6 +419,8 @@ def _init_posix(vars):
+ """Initialize the module as appropriate for POSIX systems."""
+ # _sysconfigdata is generated at build time, see _generate_posix_vars()
+ name = _get_sysconfigdata_name()
++ if 'STAGING_LIBDIR' in os.environ:
++ sys.path.append(os.environ['STAGING_LIBDIR']+'/python-sysconfigdata')
+ _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
+ build_time_vars = _temp.build_time_vars
+ vars.update(build_time_vars)
diff --git a/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch b/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch
deleted file mode 100644
index dd6b24fe92..0000000000
--- a/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 2f5a4c708d90fa8db21f446ae879cff79387448d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 20 May 2013 21:03:16 -0700
-Subject: [PATCH] h2py: Fix issue 13032 where it fails with UnicodeDecodeError
-
-use utf-8 to open the files
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- Tools/scripts/h2py.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
-index 4f871d9..a53fbe0 100755
---- a/Tools/scripts/h2py.py
-+++ b/Tools/scripts/h2py.py
-@@ -69,13 +69,13 @@ def main():
- sys.stdout.write('# Generated by h2py from stdin\n')
- process(sys.stdin, sys.stdout)
- else:
-- fp = open(filename, 'r')
-+ fp = open(filename, 'r', encoding='utf-8')
- outfile = os.path.basename(filename)
- i = outfile.rfind('.')
- if i > 0: outfile = outfile[:i]
- modname = outfile.upper()
- outfile = modname + '.py'
-- outfp = open(outfile, 'w')
-+ outfp = open(outfile, 'w', encoding='utf-8')
- outfp.write('# Generated by h2py from %s\n' % filename)
- filedict = {}
- for dir in searchdirs:
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch b/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
new file mode 100644
index 0000000000..a146c747f8
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
@@ -0,0 +1,47 @@
+From 5ce3ac59531828ff682646fbba59b2126b28a8aa Mon Sep 17 00:00:00 2001
+From: Jaewon Lee <jaewon.lee@xilinx.com>
+Date: Thu, 25 Apr 2019 15:34:26 -0700
+Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME
+
+There is one variable PYTHONHOME to determine where libraries are coming
+from for both python2 and python3. This becomes an issue if only one has
+libraries in the specified PYTHONHOME path, but they are using the same
+PYTHONHOME. Creating another variable OEPYTHON3HOME to allow for a way
+to set a different path for python3
+
+Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
+
+Upstream-Status: Inappropriate [OE specific configuration]
+
+---
+ Modules/main.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/Modules/main.c b/Modules/main.c
+index acc59c6..407085a 100644
+--- a/Modules/main.c
++++ b/Modules/main.c
+@@ -1834,10 +1834,19 @@ config_init_home(_PyCoreConfig *config)
+ }
+ return _Py_INIT_OK();
+ }
+-
+- int res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME");
+- if (res < 0) {
+- return DECODE_LOCALE_ERR("PYTHONHOME", res);
++ int res;
++ const char *oepython3home = config_get_env_var("OEPYTHON3HOME");
++ if (oepython3home) {
++ res = config_get_env_var_dup(&home, L"OEPYTHON3HOME", "OEPYTHON3HOME");
++ if (res < 0) {
++ return DECODE_LOCALE_ERR("OEPYTHON3HOME", res);
++ }
++ }
++ else {
++ res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME");
++ if (res < 0) {
++ return DECODE_LOCALE_ERR("PYTHONHOME", res);
++ }
+ }
+ config->home = home;
+ return _Py_INIT_OK();
diff --git a/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
new file mode 100644
index 0000000000..a0ea897f4e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
@@ -0,0 +1,120 @@
+From 2645317fef09afe31b01bb2c1d4fe5b9afdbb11a Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 22 Oct 2018 15:19:51 +0800
+Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler
+
+When working path contains "clang"/"gcc"/"icc", it might be part of $CC
+because of the "--sysroot" parameter. That could cause judgement error
+about clang/gcc/icc compilers. e.g.
+When "icc" is containded in working path, below errors are reported when
+compiling python3:
+x86_64-wrs-linux-gcc: error: strict: No such file or directory
+x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'
+
+Here use cc_basename to replace CC for checking compiler to avoid such
+kind of issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+
+patch originally from Li Zhou, I just rework it to new version
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.ac | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a7de901..4a3681f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h)
+ AC_CANONICAL_HOST
+ AC_SUBST(build)
+ AC_SUBST(host)
++LT_INIT
+
+ # pybuilddir.txt will be created by --generate-posix-vars in the Makefile
+ rm -f pybuilddir.txt
+@@ -695,7 +696,7 @@ AC_MSG_RESULT($with_cxx_main)
+ preset_cxx="$CXX"
+ if test -z "$CXX"
+ then
+- case "$CC" in
++ case "$cc_basename" in
+ gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
+ cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
+ clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
+@@ -979,7 +980,7 @@ rmdir CaseSensitiveTestDir
+
+ case $ac_sys_system in
+ hp*|HP*)
+- case $CC in
++ case $cc_basename in
+ cc|*/cc) CC="$CC -Ae";;
+ esac;;
+ esac
+@@ -1336,7 +1337,7 @@ else
+ fi],
+ [AC_MSG_RESULT(no)])
+ if test "$Py_LTO" = 'true' ; then
+- case $CC in
++ case $cc_basename in
+ *clang*)
+ AC_SUBST(LLVM_AR)
+ AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
+@@ -1426,7 +1427,7 @@ then
+ fi
+ fi
+ LLVM_PROF_ERR=no
+-case $CC in
++case $cc_basename in
+ *clang*)
+ # Any changes made here should be reflected in the GCC+Darwin case below
+ PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+@@ -1500,7 +1501,7 @@ then
+ WRAP="-fwrapv"
+ fi
+
+- case $CC in
++ case $cc_basename in
+ *clang*)
+ cc_is_clang=1
+ ;;
+@@ -1623,7 +1624,7 @@ yes)
+
+ # ICC doesn't recognize the option, but only emits a warning
+ ## XXX does it emit an unused result warning and can it be disabled?
+- case "$CC" in
++ case "$cc_basename" in
+ *icc*)
+ ac_cv_disable_unused_result_warning=no
+ ;;
+@@ -1965,7 +1966,7 @@ yes)
+ esac
+
+ # ICC needs -fp-model strict or floats behave badly
+-case "$CC" in
++case "$cc_basename" in
+ *icc*)
+ CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
+ ;;
+@@ -2727,7 +2728,7 @@ then
+ then
+ LINKFORSHARED="-Wl,--export-dynamic"
+ fi;;
+- SunOS/5*) case $CC in
++ SunOS/5*) case $cc_basename in
+ *gcc*)
+ if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
+ then
+@@ -5429,7 +5430,7 @@ if test "$have_gcc_asm_for_x87" = yes; then
+ # Some versions of gcc miscompile inline asm:
+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
+ # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
+- case $CC in
++ case $cc_basename in
+ *gcc*)
+ AC_MSG_CHECKING(for gcc ipa-pure-const bug)
+ saved_cflags="$CFLAGS"
diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
new file mode 100644
index 0000000000..35b7e0c480
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
@@ -0,0 +1,46 @@
+From b94995e0c694ec9561efec0d1a59b323340e6105 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Mon, 5 Aug 2019 15:57:39 +0800
+Subject: [PATCH] test_locale.py: correct the test output format
+
+Before this patch:
+ # python3 -m test -v test_locale
+ [snip]
+ test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9') ok
+ [snip]
+
+ After this patch:
+ # python3 -m test -v test_locale
+ [snip]
+ test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9')... ok
+ [snip]
+
+ Make the test ended with "... ok" is common in python
+ unittest world, we should make it keep consistent
+ with other test cases in case it may be ignored to
+ record in the report if we use the common filter
+ "... ok".
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/15132]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ Lib/test/test_locale.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
+index e2c2178..558d63c 100644
+--- a/Lib/test/test_locale.py
++++ b/Lib/test/test_locale.py
+@@ -527,7 +527,7 @@ class TestMiscellaneous(unittest.TestCase):
+ self.skipTest('test needs Turkish locale')
+ loc = locale.getlocale(locale.LC_CTYPE)
+ if verbose:
+- print('testing with %a' % (loc,), end=' ', flush=True)
++ print('testing with %a...' % (loc,), end=' ', flush=True)
+ locale.setlocale(locale.LC_CTYPE, loc)
+ self.assertEqual(loc, locale.getlocale(locale.LC_CTYPE))
+
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch b/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch
new file mode 100644
index 0000000000..58ab709028
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch
@@ -0,0 +1,199 @@
+From fa96a7fd19e17b9c6b4dd01c3c3774fb382dddc6 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 5 Sep 2018 11:45:52 +0100
+Subject: [PATCH] Don't do runtime test to get float byte order
+
+Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles,
+and falls back onto "I don't know" if it can't run code. This results in
+crippled floating point numbers in Python, and the regression tests fail.
+
+Instead of running code, take a macro from autoconf-archive which compiles C
+with a special double in which has an ASCII representation, and then greps the
+binary to identify the format.
+
+Upstream-Status: Backport [2a9c3805ddedf282881ef7811a561c70b74f80b1]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ configure.ac | 72 +++------------------------
+ m4/ax_c_float_words_bigendian.m4 | 83 ++++++++++++++++++++++++++++++++
+ 2 files changed, 90 insertions(+), 65 deletions(-)
+ create mode 100644 m4/ax_c_float_words_bigendian.m4
+
+diff --git a/configure.ac b/configure.ac
+index 4a3681f..4ab19a6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4328,77 +4328,19 @@ fi
+ # * Check for various properties of floating point *
+ # **************************************************
+
+-AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_little_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_little_endian_double=yes],
+-[ac_cv_little_endian_double=no],
+-[ac_cv_little_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_little_endian_double)
+-if test "$ac_cv_little_endian_double" = yes
+-then
+- AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
+- [Define if C doubles are 64-bit IEEE 754 binary format, stored
+- with the least significant byte first])
+-fi
+-
+-AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_big_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_big_endian_double=yes],
+-[ac_cv_big_endian_double=no],
+-[ac_cv_big_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_big_endian_double)
+-if test "$ac_cv_big_endian_double" = yes
++AX_C_FLOAT_WORDS_BIGENDIAN
++if test "$ax_cv_c_float_words_bigendian" = "yes"
+ then
+ AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
+ [Define if C doubles are 64-bit IEEE 754 binary format, stored
+ with the most significant byte first])
+-fi
+-
+-# Some ARM platforms use a mixed-endian representation for doubles.
+-# While Python doesn't currently have full support for these platforms
+-# (see e.g., issue 1762561), we can at least make sure that float <-> string
+-# conversions work.
+-AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_mixed_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_mixed_endian_double=yes],
+-[ac_cv_mixed_endian_double=no],
+-[ac_cv_mixed_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_mixed_endian_double)
+-if test "$ac_cv_mixed_endian_double" = yes
++elif test "$ax_cv_c_float_words_bigendian" = "no"
+ then
+- AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
++ AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
+ [Define if C doubles are 64-bit IEEE 754 binary format, stored
+- in ARM mixed-endian order (byte order 45670123)])
++ with the least significant byte first])
++else
++ AC_MSG_ERROR([Cannot identify floating point byte order])
+ fi
+
+ # The short float repr introduced in Python 3.1 requires the
+diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4
+new file mode 100644
+index 0000000..216b90d
+--- /dev/null
++++ b/m4/ax_c_float_words_bigendian.m4
+@@ -0,0 +1,83 @@
++# ===============================================================================
++# https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html
++# ===============================================================================
++#
++# SYNOPSIS
++#
++# AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
++#
++# DESCRIPTION
++#
++# Checks the ordering of words within a multi-word float. This check is
++# necessary because on some systems (e.g. certain ARM systems), the float
++# word ordering can be different from the byte ordering. In a multi-word
++# float context, "big-endian" implies that the word containing the sign
++# bit is found in the memory location with the lowest address. This
++# implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
++#
++# The endianness is detected by first compiling C code that contains a
++# special double float value, then grepping the resulting object file for
++# certain strings of ASCII values. The double is specially crafted to have
++# a binary representation that corresponds with a simple string. In this
++# implementation, the string "noonsees" was selected because the
++# individual word values ("noon" and "sees") are palindromes, thus making
++# this test byte-order agnostic. If grep finds the string "noonsees" in
++# the object file, the target platform stores float words in big-endian
++# order. If grep finds "seesnoon", float words are in little-endian order.
++# If neither value is found, the user is instructed to specify the
++# ordering.
++#
++# LICENSE
++#
++# Copyright (c) 2008 Daniel Amelang <dan@amelang.net>
++#
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice
++# and this notice are preserved. This file is offered as-is, without any
++# warranty.
++
++#serial 11
++
++AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
++ [AC_CACHE_CHECK(whether float word ordering is bigendian,
++ ax_cv_c_float_words_bigendian, [
++
++ax_cv_c_float_words_bigendian=unknown
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
++
++double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
++
++]])], [
++
++if grep noonsees conftest.$ac_objext >/dev/null ; then
++ ax_cv_c_float_words_bigendian=yes
++fi
++if grep seesnoon conftest.$ac_objext >/dev/null ; then
++ if test "$ax_cv_c_float_words_bigendian" = unknown; then
++ ax_cv_c_float_words_bigendian=no
++ else
++ ax_cv_c_float_words_bigendian=unknown
++ fi
++fi
++
++])])
++
++case $ax_cv_c_float_words_bigendian in
++ yes)
++ m4_default([$1],
++ [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
++ [Define to 1 if your system stores words within floats
++ with the most significant word first])]) ;;
++ no)
++ $2 ;;
++ *)
++ m4_default([$3],
++ [AC_MSG_ERROR([
++
++Unknown float word ordering. You need to manually preset
++ax_cv_c_float_words_bigendian=no (or yes) according to your system.
++
++ ])]) ;;
++esac
++
++])# AX_C_FLOAT_WORDS_BIGENDIAN
diff --git a/meta/recipes-devtools/python/python3/0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python3/0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
new file mode 100644
index 0000000000..b9d5bc9c51
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
@@ -0,0 +1,80 @@
+From b881a79adcd4ae5ac8fe4f49d0fc77c47f777919 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 4 Aug 2017 11:16:14 +0800
+Subject: [PATCH] setup.py: pass missing libraries to Extension for
+ multiprocessing module
+
+In the following commit:
+...
+commit e711cafab13efc9c1fe6c5cd75826401445eb585
+Author: Benjamin Peterson <benjamin@python.org>
+Date: Wed Jun 11 16:44:04 2008 +0000
+
+ Merged revisions 64104,64117 via svnmerge from
+ svn+ssh://pythondev@svn.python.org/python/trunk
+...
+(see diff in setup.py)
+It assigned libraries for multiprocessing module according
+the host_platform, but not pass it to Extension.
+
+In glibc, the following commit caused two definition of
+sem_getvalue are different.
+https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524
+(see diff in nptl/sem_getvalue.c for detail)
+`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1
+and `__old_sem_getvalue' is to compat the old version
+sem_getvalue@GLIBC_2.0.
+
+To build python for embedded Linux systems:
+http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html
+If not explicitly link to library pthread (-lpthread), it will
+load glibc's sem_getvalue randomly at runtime.
+
+Such as build python on linux x86_64 host and run the python
+on linux x86_32 target. If not link library pthread, it caused
+multiprocessing bounded semaphore could not work correctly.
+...
+>>> import multiprocessing
+>>> pool_sema = multiprocessing.BoundedSemaphore(value=1)
+>>> pool_sema.acquire()
+True
+>>> pool_sema.release()
+Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ValueError: semaphore or lock released too many times
+...
+
+And the semaphore issue also caused multiprocessing.Queue().put() hung.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ setup.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index b7a36a6..658ead3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1584,8 +1584,10 @@ class PyBuildExt(build_ext):
+ elif host_platform.startswith('netbsd'):
+ macros = dict()
+ libraries = []
+-
+- else: # Linux and other unices
++ elif host_platform.startswith(('linux')):
++ macros = dict()
++ libraries = ['pthread']
++ else: # Other unices
+ macros = dict()
+ libraries = ['rt']
+
+@@ -1603,6 +1605,7 @@ class PyBuildExt(build_ext):
+
+ exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
+ define_macros=list(macros.items()),
++ libraries=libraries,
+ include_dirs=["Modules/_multiprocessing"]))
+ # End multiprocessing
+
diff --git a/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
new file mode 100644
index 0000000000..c15295c034
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
@@ -0,0 +1,31 @@
+From e3b59cb9658e1d3efa3535840939a0fa92a70a5a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 7 Oct 2019 13:22:14 +0200
+Subject: [PATCH] setup.py: do not report missing dependencies for disabled
+ modules
+
+Reporting those missing dependencies is misleading as the modules would not
+have been built anyway. This particularly matters in oe-core's automated
+build completeness checker which relies on the report.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ setup.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index 4b53668..0097643 100644
+--- a/setup.py
++++ b/setup.py
+@@ -365,6 +365,10 @@ class PyBuildExt(build_ext):
+ print("%-*s %-*s %-*s" % (longest, e, longest, f,
+ longest, g))
+
++ # There is no need to report missing module dependencies,
++ # if the modules have been disabled in the first place.
++ missing = list(set(missing) - set(sysconf_dis))
++
+ if missing:
+ print()
+ print("Python build finished successfully!")
diff --git a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
deleted file mode 100644
index 819ba69eda..0000000000
--- a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Dont cross compile site packages
-
--Khem
-
-Upstream-Status: Inappropriate[Embedded-Specific]
-
----
- Makefile.pre.in | 16 ----------------
- 1 file changed, 16 deletions(-)
-
-Index: Python-3.5.0/Makefile.pre.in
-===================================================================
---- Python-3.5.0.orig/Makefile.pre.in
-+++ Python-3.5.0/Makefile.pre.in
-@@ -1262,33 +1262,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL
- $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
- $(DESTDIR)$(LIBDEST)/distutils/tests ; \
- fi
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
diff --git a/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch
deleted file mode 100644
index fddfd2b2f6..0000000000
--- a/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-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>
-
-Index: Python-3.3.0rc2/setup.py
-===================================================================
---- Python-3.3.0rc2.orig/setup.py 2012-09-20 15:24:14.009124003 -0700
-+++ Python-3.3.0rc2/setup.py 2012-09-20 15:25:08.449124963 -0700
-@@ -1620,7 +1620,7 @@
- dotversion = dotversion[:-1] + '.' + dotversion[-1]
- tcl_include_sub = []
- tk_include_sub = []
-- for dir in inc_dirs:
-+ for dir in [os.getenv("STAGING_INCDIR")]:
- tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
- tk_include_sub += [dir + os.sep + "tk" + dotversion]
- tk_include_sub += tcl_include_sub
-@@ -1639,22 +1639,6 @@
- if dir not in include_dirs:
- include_dirs.append(dir)
-
-- # Check for various platform-specific directories
-- if host_platform == 'sunos5':
-- include_dirs.append('/usr/openwin/include')
-- added_lib_dirs.append('/usr/openwin/lib')
-- elif os.path.exists('/usr/X11R6/include'):
-- include_dirs.append('/usr/X11R6/include')
-- added_lib_dirs.append('/usr/X11R6/lib64')
-- added_lib_dirs.append('/usr/X11R6/lib')
-- elif os.path.exists('/usr/X11R5/include'):
-- include_dirs.append('/usr/X11R5/include')
-- added_lib_dirs.append('/usr/X11R5/lib')
-- else:
-- # Assume default location for X11
-- include_dirs.append('/usr/X11/include')
-- added_lib_dirs.append('/usr/X11/lib')
--
- # If Cygwin, then verify that X is installed before proceeding
- if host_platform == 'cygwin':
- x11_inc = find_file('X11/Xlib.h', [], include_dirs)
diff --git a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
deleted file mode 100644
index 6beac7b805..0000000000
--- a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Do not hardcode /usr into include paths when cross compiling
-
--Khem
-
-Upstream-Status: Pending
-
----
- setup.py | 15 ++-------------
- 1 file changed, 2 insertions(+), 13 deletions(-)
-
-Index: Python-3.3.2/setup.py
-===================================================================
---- Python-3.3.2.orig/setup.py
-+++ Python-3.3.2/setup.py
-@@ -444,7 +444,8 @@ class PyBuildExt(build_ext):
- # only change this for cross builds for 3.3, issues on Mageia
- if cross_compiling:
- self.add_gcc_paths()
-- self.add_multiarch_paths()
-+ if not cross_compiling:
-+ self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
- # CPPFLAGS for header and library files.
-@@ -480,7 +481,7 @@ class PyBuildExt(build_ext):
- for directory in reversed(options.dirs):
- add_dir_to_list(dir_list, directory)
-
-- if os.path.normpath(sys.base_prefix) != '/usr' \
-+ if not cross_compiling and os.path.normpath(sys.base_prefix) != '/usr' \
- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
- # (PYTHONFRAMEWORK is set) to avoid # linking problems when
diff --git a/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
deleted file mode 100644
index 789929b715..0000000000
--- a/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-consider opkg directories when cleaning up
-
--Khem
-
-Upstream-Status: Inappropriate [OE specific]
-
----
- Makefile.pre.in | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1306,8 +1306,8 @@ touch:
- # Sanitation targets -- clean leaves libraries, executables and tags
- # files, which clobber removes as well
- pycremoval:
-- -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';'
-- -find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
-+ -find $(srcdir) ! -path './ipkg-install/*' -depth -name '__pycache__' -exec rm -rf {} ';'
-+ -find $(srcdir) ! -path './ipkg-install/*' -name '*.py[co]' -exec rm -f {} ';'
-
- rmtestturds:
- -rm -f *BAD *GOOD *SKIPPED
-@@ -1321,9 +1321,9 @@ docclean:
- -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
-
- clean: pycremoval
-- find . -name '*.[oa]' -exec rm -f {} ';'
-- find . -name '*.s[ol]' -exec rm -f {} ';'
-- find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
-+ find . ! -path './ipkg-install/*' -name '*.[oa]' -exec rm -f {} ';'
-+ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';'
-+ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
- find build -name 'fficonfig.h' -exec rm -f {} ';' || true
- find build -name 'fficonfig.py' -exec rm -f {} ';' || true
- -rm -f Lib/lib2to3/*Grammar*.pickle
diff --git a/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
deleted file mode 100644
index b96419a638..0000000000
--- a/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-do not "adjust" python files before copying
-
--Khem
-
-Upstream-Status: Inappropriate [Embedded-Specific]
-
----
- Lib/distutils/command/build_scripts.py | 43 +++------------------------------
- 1 file changed, 4 insertions(+), 39 deletions(-)
-
---- a/Lib/distutils/command/build_scripts.py
-+++ b/Lib/distutils/command/build_scripts.py
-@@ -51,10 +51,7 @@ class build_scripts(Command):
-
-
- def copy_scripts(self):
-- """Copy each script listed in 'self.scripts'; if it's marked as a
-- Python script in the Unix way (first line matches 'first_line_re',
-- ie. starts with "\#!" and contains "python"), then adjust the first
-- line to refer to the current Python interpreter as we copy.
-+ """Copy each script listed in 'self.scripts'
- """
- self.mkpath(self.build_dir)
- outfiles = []
-@@ -78,64 +75,10 @@ class build_scripts(Command):
- if not self.dry_run:
- raise
- f = None
-- else:
-- encoding, lines = tokenize.detect_encoding(f.readline)
-- f.seek(0)
-- first_line = f.readline()
-- if not first_line:
-- self.warn("%s is an empty file (skipping)" % script)
-- continue
--
-- match = first_line_re.match(first_line)
-- if match:
-- adjust = True
-- post_interp = match.group(1) or b''
--
-- if adjust:
-- log.info("copying and adjusting %s -> %s", script,
-- self.build_dir)
-- updated_files.append(outfile)
-- if not self.dry_run:
-- if not sysconfig.python_build:
-- executable = self.executable
-- else:
-- executable = os.path.join(
-- sysconfig.get_config_var("BINDIR"),
-- "python%s%s" % (sysconfig.get_config_var("VERSION"),
-- sysconfig.get_config_var("EXE")))
-- executable = os.fsencode(executable)
-- shebang = b"#!" + executable + post_interp + b"\n"
-- # Python parser starts to read a script using UTF-8 until
-- # it gets a #coding:xxx cookie. The shebang has to be the
-- # first line of a file, the #coding:xxx cookie cannot be
-- # written before. So the shebang has to be decodable from
-- # UTF-8.
-- try:
-- shebang.decode('utf-8')
-- except UnicodeDecodeError:
-- raise ValueError(
-- "The shebang ({!r}) is not decodable "
-- "from utf-8".format(shebang))
-- # If the script is encoded to a custom encoding (use a
-- # #coding:xxx cookie), the shebang has to be decodable from
-- # the script encoding too.
-- try:
-- shebang.decode(encoding)
-- except UnicodeDecodeError:
-- raise ValueError(
-- "The shebang ({!r}) is not decodable "
-- "from the script encoding ({})"
-- .format(shebang, encoding))
-- with open(outfile, "wb") as outf:
-- outf.write(shebang)
-- outf.writelines(f.readlines())
-- if f:
-- f.close()
-- else:
-- if f:
-+ if f:
- f.close()
-- updated_files.append(outfile)
-- self.copy_file(script, outfile)
-+ updated_files.append(outfile)
-+ self.copy_file(script, outfile)
-
- if os.name == 'posix':
- for file in outfiles:
diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
index c53ec0cfc8..d49604ba4d 100644
--- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
+++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
@@ -1,7 +1,7 @@
-From 7630ab22578746d3d790d0598c0d279cf7afed97 Mon Sep 17 00:00:00 2001
+From a274ba778838824efcacaba57c415b7262f779ec Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 14 May 2013 15:00:26 -0700
-Subject: [PATCH 01/20] python3: Add target and native recipes
+Subject: [PATCH] python3: Add target and native recipes
Upstream-Status: Inappropriate [embedded specific]
@@ -14,36 +14,40 @@ Upstream-Status: Inappropriate [embedded specific]
# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
- Lib/distutils/sysconfig.py | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
+ Lib/distutils/sysconfig.py | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 573724d..390c485 100644
+index 3dfd0a3..6c6b09a 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
-@@ -84,7 +84,9 @@ def get_python_inc(plat_specific=0, prefix=None):
+@@ -97,7 +97,9 @@ def get_python_inc(plat_specific=0, prefix=None):
If 'prefix' is supplied, use it instead of sys.base_prefix or
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
"""
- if prefix is None:
-+ if prefix is None and os.environ['STAGING_INCDIR'] != "":
++ if prefix is None and os.environ.get('STAGING_INCDIR', ""):
+ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
+ elif prefix is None:
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
if os.name == "posix":
if python_build:
-@@ -125,6 +127,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
+@@ -140,7 +142,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
If 'prefix' is supplied, use it instead of sys.base_prefix or
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
"""
-+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
-+ if prefix is None and os.environ['STAGING_LIBDIR'] != "":
+- if prefix is None:
++ if os.environ.get('STAGING_LIBDIR', ""):
++ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
++ else:
++ lib_basename = "lib"
++ if prefix is None and os.environ.get('STAGING_LIBDIR', ""):
+ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
-+
- if prefix is None:
++ elif prefix is None:
if standard_lib:
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
-@@ -133,7 +139,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
+ else:
+@@ -148,7 +156,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
if os.name == "posix":
libpython = os.path.join(prefix,
@@ -52,6 +56,3 @@ index 573724d..390c485 100644
if standard_lib:
return libpython
else:
---
-2.8.0.rc3
-
diff --git a/meta/recipes-devtools/python/python3/130-readline-setup.patch b/meta/recipes-devtools/python/python3/130-readline-setup.patch
deleted file mode 100644
index c805652d69..0000000000
--- a/meta/recipes-devtools/python/python3/130-readline-setup.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-package python-readline
-
--Khem
-
-Upstream-Status: Inappropriate [Embedded Specific]
-
---- a/setup.py
-+++ b/setup.py
-@@ -666,45 +666,7 @@ class PyBuildExt(build_ext):
- # readline
- do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
- readline_termcap_library = ""
-- curses_library = ""
-- # Cannot use os.popen here in py3k.
-- tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib')
-- if not os.path.exists(self.build_temp):
-- os.makedirs(self.build_temp)
-- # Determine if readline is already linked against curses or tinfo.
-- if do_readline:
-- if cross_compiling:
-- ret = os.system("%s -d %s | grep '(NEEDED)' > %s" \
-- % (sysconfig.get_config_var('READELF'),
-- do_readline, tmpfile))
-- elif find_executable('ldd'):
-- ret = os.system("ldd %s > %s" % (do_readline, tmpfile))
-- else:
-- ret = 256
-- if ret >> 8 == 0:
-- with open(tmpfile) as fp:
-- for ln in fp:
-- if 'curses' in ln:
-- readline_termcap_library = re.sub(
-- r'.*lib(n?cursesw?)\.so.*', r'\1', ln
-- ).rstrip()
-- break
-- # termcap interface split out from ncurses
-- if 'tinfo' in ln:
-- readline_termcap_library = 'tinfo'
-- break
-- if os.path.exists(tmpfile):
-- os.unlink(tmpfile)
-- # Issue 7384: If readline is already linked against curses,
-- # use the same library for the readline and curses modules.
-- if 'curses' in readline_termcap_library:
-- curses_library = readline_termcap_library
-- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
-- curses_library = 'ncursesw'
-- elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
-- curses_library = 'ncurses'
-- elif self.compiler.find_library_file(lib_dirs, 'curses'):
-- curses_library = 'curses'
-+ curses_library = "ncurses"
-
- if host_platform == 'darwin':
- os_release = int(os.uname()[2].split('.')[0])
diff --git a/meta/recipes-devtools/python/python3/150-fix-setupterm.patch b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
deleted file mode 100644
index 78d7c78670..0000000000
--- a/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fix warning with newer compiler
-
--Khem
-
-Upstream-Status: Pending
-
---- a/Modules/_cursesmodule.c
-+++ b/Modules/_cursesmodule.c
-@@ -116,7 +116,7 @@ char *PyCursesVersion = "2.2";
- #defines many common symbols (such as "lines") which breaks the
- curses module in other ways. So the code will just specify
- explicit prototypes here. */
--extern int setupterm(char *,int,int *);
-+//extern int setupterm(char *,int,int *);
- #ifdef __sgi
- #include <term.h>
- #endif
diff --git a/meta/recipes-devtools/python/python3/CVE-2016-5636.patch b/meta/recipes-devtools/python/python3/CVE-2016-5636.patch
deleted file mode 100644
index 0d494d20f4..0000000000
--- a/meta/recipes-devtools/python/python3/CVE-2016-5636.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1453357506 28800
-# Node ID 10dad6da1b28ea4af78ad9529e469fdbf4ebbc8f
-# Parent a3ac2cd93db9d5336dfd7b5b27efde2c568d8794# Parent 01ddd608b85c85952537d95a43bbabf4fb655057
-merge 3.4 (#26171)
-
-Upstream-Status: Backport
-CVE: CVE-2016-5636
-
-https://hg.python.org/cpython/raw-rev/10dad6da1b28
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: Python-3.5.1/Misc/NEWS
-===================================================================
---- Python-3.5.1.orig/Misc/NEWS
-+++ Python-3.5.1/Misc/NEWS
-@@ -91,6 +91,9 @@ Core and Builtins
- Python.h header to fix a compilation error with OpenMP. PyThreadState_GET()
- becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies.
-
-+- Issue #26171: Fix possible integer overflow and heap corruption in
-+ zipimporter.get_data().
-+
- Library
- -------
-
-Index: Python-3.5.1/Modules/zipimport.c
-===================================================================
---- Python-3.5.1.orig/Modules/zipimport.c
-+++ Python-3.5.1/Modules/zipimport.c
-@@ -1112,6 +1112,11 @@ get_data(PyObject *archive, PyObject *to
- }
- file_offset += l; /* Start of file data */
-
-+ if (data_size > LONG_MAX - 1) {
-+ fclose(fp);
-+ PyErr_NoMemory();
-+ return NULL;
-+ }
- bytes_size = compress == 0 ? data_size : data_size + 1;
- if (bytes_size == 0)
- bytes_size++;
diff --git a/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch b/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch
deleted file mode 100644
index f29ae53371..0000000000
--- a/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Pending
-
-We should make sure that sysroot is used by gcc instead of assuming
-hardcoded locations for include paths
-
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: Python-3.4.2/configure.ac
-===================================================================
---- Python-3.4.2.orig/configure.ac
-+++ Python-3.4.2/configure.ac
-@@ -4434,7 +4434,7 @@ fi
-
- # first curses header 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/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
index 3347321fde..24e67b4ca1 100644
--- a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
+++ b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -1,19 +1,29 @@
-_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.
+From fead48c8b501a8d7c3db21df2e599f90f38f11d3 Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Mon, 28 Jan 2019 15:57:54 +0000
+Subject: [PATCH] _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.
Upstream-Status: Inappropriate [distribution]
Also simply disable the tk module since its not in DEPENDS.
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 23:18:38.500136647 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300
-@@ -1634,8 +1634,10 @@
+---
+ setup.py | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index fbec00d..b7a36a6 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1623,10 +1623,12 @@ class PyBuildExt(build_ext):
+ self.extensions.extend(exts)
+
# 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')
@@ -22,18 +32,5 @@ Index: Python-2.7.2/setup.py
+ #if '_tkinter' not in [e.name for e in self.extensions]:
+ # missing.append('_tkinter')
- return missing
-
-diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
-index b4633b9..d7588c0 100644
---- Python-3.5.1.orig/setup.py
-+++ Python-3.5.1/setup.py
-@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
- self.extensions.extend(exts)
-
- # Call the method for detecting whether _tkinter can be compiled
-- self.detect_tkinter(inc_dirs, lib_dirs)
-+ # self.detect_tkinter(inc_dirs, lib_dirs)
-
- # tkinter module will not be avalaible as yocto
- # doesn't have tk integrated (yet)
+ # Build the _uuid module if possible
+ uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"])
diff --git a/meta/recipes-devtools/python/python3/cgi_py.patch b/meta/recipes-devtools/python/python3/cgi_py.patch
index de504f9dcf..6c4ba54320 100644
--- a/meta/recipes-devtools/python/python3/cgi_py.patch
+++ b/meta/recipes-devtools/python/python3/cgi_py.patch
@@ -1,11 +1,20 @@
-Lib/cgi.py: Update the script as mentioned in the comment
+From 62336285cba38017b35cb761c03f0c7e80a671a3 Mon Sep 17 00:00:00 2001
+From: Mark Hatle <mark.hatle@windriver.com>
+Date: Wed, 21 Sep 2011 20:55:33 -0500
+Subject: [PATCH] Lib/cgi.py: Update the script as mentioned in the comment
Upstream-Status: Inappropriate [distribution]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---- Python-2.6.6/Lib/cgi.py.orig 2010-08-01 22:14:27.000000000 -0500
-+++ Python-2.6.6/Lib/cgi.py 2011-09-21 15:28:40.478208631 -0500
+---
+ Lib/cgi.py | 11 +----------
+ 1 file changed, 1 insertion(+), 10 deletions(-)
+
+diff --git a/Lib/cgi.py b/Lib/cgi.py
+index 8cf6687..094c7b4 100755
+--- a/Lib/cgi.py
++++ b/Lib/cgi.py
@@ -1,13 +1,4 @@
-#! /usr/local/bin/python
-
diff --git a/meta/recipes-devtools/python/python3/check_build_completeness.py b/meta/recipes-devtools/python/python3/check_build_completeness.py
new file mode 100755
index 0000000000..a1eace3f57
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/check_build_completeness.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+import sys
+logfile = open(sys.argv[1]).read()
+
+necessary_bits = logfile.find("The necessary bits to build these optional modules were not found")
+to_find_bits = logfile.find("To find the necessary bits, look in setup.py in detect_modules() for the module's name.")
+if necessary_bits != -1:
+ print("%s" %(logfile[necessary_bits:to_find_bits]))
+
+failed_to_build = logfile.find("Failed to build these modules:")
+if failed_to_build != -1:
+ failed_to_build_end = logfile.find("\n\n", failed_to_build)
+ print("%s" %(logfile[failed_to_build:failed_to_build_end]))
+
+if necessary_bits != -1 or failed_to_build != -1:
+ sys.exit(1)
+
diff --git a/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch b/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch
deleted file mode 100644
index 97214f9aa4..0000000000
--- a/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 7c4f8d87473d6238c120ec6031b58f83a17a39a5 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 28 Dec 2015 22:52:06 -0800
-Subject: [PATCH] configure.ac: fix LIBPL
-
-Use LIBDIR rather than prefix/lib, so that it would work when lib64.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 63aef8e..aefb27f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -4366,7 +4366,7 @@ AC_MSG_RESULT($LDVERSION)
-
- dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
- AC_SUBST(PY_ENABLE_SHARED)
--LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
-+LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}"
- AC_SUBST(LIBPL)
-
- # Check whether right shifting a negative integer extends the sign bit
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py
new file mode 100644
index 0000000000..4da02a2991
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -0,0 +1,433 @@
+# This script is used as a bitbake task to create a new python manifest
+# $ bitbake python -c create_manifest
+#
+# Our goal is to keep python-core as small as posible and add other python
+# packages only when the user needs them, hence why we split upstream python
+# into several packages.
+#
+# In a very simplistic way what this does is:
+# Launch python and see specifically what is required for it to run at a minimum
+#
+# Go through the python-manifest file and launch a separate task for every single
+# one of the files on each package, this task will check what was required for that
+# specific module to run, these modules will be called dependencies.
+# The output of such task will be a list of the modules or dependencies that were
+# found for that file.
+#
+# Such output will be parsed by this script, we will look for each dependency on the
+# manifest and if we find that another package already includes it, then we will add
+# that package as an RDEPENDS to the package we are currently checking; in case we dont
+# find the current dependency on any other package we will add it to the current package
+# as part of FILES.
+#
+#
+# This way we will create a new manifest from the data structure that was built during
+# this process, on this new manifest each package will contain specifically only
+# what it needs to run.
+#
+# There are some caveats which we try to deal with, such as repeated files on different
+# packages, packages that include folders, wildcards, and special packages.
+# Its also important to note that this method only works for python files, and shared
+# libraries. Static libraries, header files and binaries need to be dealt with manually.
+#
+# This script differs from its python2 version mostly on how shared libraries are handled
+# The manifest file for python3 has an extra field which contains the cached files for
+# each package.
+# Tha method to handle cached files does not work when a module includes a folder which
+# itself contains the pycache folder, gladly this is almost never the case.
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29 at gmail dot com>
+
+
+import sys
+import subprocess
+import json
+import os
+import collections
+
+# Get python version from ${PYTHON_MAJMIN}
+pyversion = str(sys.argv[1])
+
+# Hack to get native python search path (for folders), not fond of it but it works for now
+pivot = 'recipe-sysroot-native'
+for p in sys.path:
+ if pivot in p:
+ nativelibfolder = p[:p.find(pivot)+len(pivot)]
+
+# Empty dict to hold the whole manifest
+new_manifest = collections.OrderedDict()
+
+# Check for repeated files, folders and wildcards
+allfiles = []
+repeated = []
+wildcards = []
+
+hasfolders = []
+allfolders = []
+
+def isFolder(value):
+ value = value.replace('${PYTHON_MAJMIN}',pyversion)
+ if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+ return True
+ else:
+ return False
+
+def isCached(item):
+ if '__pycache__' in item:
+ return True
+ else:
+ return False
+
+def prepend_comments(comments, json_manifest):
+ with open(json_manifest, 'r+') as manifest:
+ json_contents = manifest.read()
+ manifest.seek(0, 0)
+ manifest.write(comments + json_contents)
+
+# Read existing JSON manifest
+with open('python3-manifest.json') as manifest:
+ # The JSON format doesn't allow comments so we hack the call to keep the comments using a marker
+ manifest_str = manifest.read()
+ json_start = manifest_str.find('# EOC') + 6 # EOC + \n
+ manifest.seek(0)
+ comments = manifest.read(json_start)
+ manifest_str = manifest.read()
+ old_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
+
+#
+# First pass to get core-package functionality, because we base everything on the fact that core is actually working
+# Not exactly the same so it should not be a function
+#
+
+print ('Getting dependencies for package: core')
+
+
+# This special call gets the core dependencies and
+# appends to the old manifest so it doesnt hurt what it
+# currently holds.
+# This way when other packages check for dependencies
+# on the new core package, they will still find them
+# even when checking the old_manifest
+
+output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package']).decode('utf8')
+for coredep in output.split():
+ coredep = coredep.replace(pyversion,'${PYTHON_MAJMIN}')
+ if isCached(coredep):
+ if coredep not in old_manifest['core']['cached']:
+ old_manifest['core']['cached'].append(coredep)
+ else:
+ if coredep not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(coredep)
+
+
+# The second step is to loop through the existing files contained in the core package
+# according to the old manifest, identify if they are modules, or some other type
+# of file that we cant import (directories, binaries, configs) in which case we
+# can only assume they were added correctly (manually) so we ignore those and
+# pass them to the manifest directly.
+
+for filedep in old_manifest['core']['files']:
+ if isFolder(filedep):
+ if isCached(filedep):
+ if filedep not in old_manifest['core']['cached']:
+ old_manifest['core']['cached'].append(filedep)
+ else:
+ if filedep not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(filedep)
+ continue
+ if '${bindir}' in filedep:
+ if filedep not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(filedep)
+ continue
+ if filedep == '':
+ continue
+ if '${includedir}' in filedep:
+ if filedep not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(filedep)
+ continue
+
+ # Get actual module name , shouldnt be affected by libdir/bindir, etc.
+ pymodule = os.path.splitext(os.path.basename(os.path.normpath(filedep)))[0]
+
+
+ # We now know that were dealing with a python module, so we can import it
+ # and check what its dependencies are.
+ # We launch a separate task for each module for deterministic behavior.
+ # Each module will only import what is necessary for it to work in specific.
+ # The output of each task will contain each module's dependencies
+
+ print ('Getting dependencies for module: %s' % pymodule)
+ output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule]).decode('utf8')
+ print ('The following dependencies were found for module %s:\n' % pymodule)
+ print (output)
+
+
+ for pymodule_dep in output.split():
+ pymodule_dep = pymodule_dep.replace(pyversion,'${PYTHON_MAJMIN}')
+
+ if isCached(pymodule_dep):
+ if pymodule_dep not in old_manifest['core']['cached']:
+ old_manifest['core']['cached'].append(pymodule_dep)
+ else:
+ if pymodule_dep not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(pymodule_dep)
+
+
+# At this point we are done with the core package.
+# The old_manifest dictionary is updated only for the core package because
+# all others will use this a base.
+
+
+# To improve the script speed, we check which packages contain directories
+# since we will be looping through (only) those later.
+for pypkg in old_manifest:
+ for filedep in old_manifest[pypkg]['files']:
+ if isFolder(filedep):
+ print ('%s is a folder' % filedep)
+ if pypkg not in hasfolders:
+ hasfolders.append(pypkg)
+ if filedep not in allfolders:
+ allfolders.append(filedep)
+
+
+
+# This is the main loop that will handle each package.
+# It works in a similar fashion than the step before, but
+# we will now be updating a new dictionary that will eventually
+# become the new manifest.
+#
+# The following loops though all packages in the manifest,
+# through all files on each of them, and checks whether or not
+# they are modules and can be imported.
+# If they can be imported, then it checks for dependencies for
+# each of them by launching a separate task.
+# The output of that task is then parsed and the manifest is updated
+# accordingly, wether it should add the module on FILES for the current package
+# or if that module already belongs to another package then the current one
+# will RDEPEND on it
+
+for pypkg in old_manifest:
+ # Use an empty dict as data structure to hold data for each package and fill it up
+ new_manifest[pypkg] = collections.OrderedDict()
+ new_manifest[pypkg]['summary'] = old_manifest[pypkg]['summary']
+ new_manifest[pypkg]['rdepends'] = []
+ new_manifest[pypkg]['files'] = []
+ new_manifest[pypkg]['cached'] = old_manifest[pypkg]['cached']
+
+ # All packages should depend on core
+ if pypkg != 'core':
+ new_manifest[pypkg]['rdepends'].append('core')
+ new_manifest[pypkg]['cached'] = []
+
+ print('\n')
+ print('--------------------------')
+ print ('Handling package %s' % pypkg)
+ print('--------------------------')
+
+ # Handle special cases, we assume that when they were manually added
+ # to the manifest we knew what we were doing.
+ special_packages = ['misc', 'modules', 'dev', 'tests']
+ if pypkg in special_packages or 'staticdev' in pypkg:
+ print('Passing %s package directly' % pypkg)
+ new_manifest[pypkg] = old_manifest[pypkg]
+ continue
+
+ for filedep in old_manifest[pypkg]['files']:
+ # We already handled core on the first pass, we can ignore it now
+ if pypkg == 'core':
+ if filedep not in new_manifest[pypkg]['files']:
+ new_manifest[pypkg]['files'].append(filedep)
+ continue
+
+ # Handle/ignore what we cant import
+ if isFolder(filedep):
+ new_manifest[pypkg]['files'].append(filedep)
+ # Asyncio (and others) are both the package and the folder name, we should not skip those...
+ path,mod = os.path.split(filedep)
+ if mod != pypkg:
+ continue
+ if '${bindir}' in filedep:
+ if filedep not in new_manifest[pypkg]['files']:
+ new_manifest[pypkg]['files'].append(filedep)
+ continue
+ if filedep == '':
+ continue
+ if '${includedir}' in filedep:
+ if filedep not in new_manifest[pypkg]['files']:
+ new_manifest[pypkg]['files'].append(filedep)
+ continue
+
+ # Get actual module name , shouldnt be affected by libdir/bindir, etc.
+ # We need to check if the imported module comes from another (e.g. sqlite3.dump)
+ path,pymodule = os.path.split(filedep)
+ path = os.path.basename(path)
+ pymodule = os.path.splitext(os.path.basename(pymodule))[0]
+
+ # If this condition is met, it means we need to import it from another module
+ # or its the folder itself (e.g. unittest)
+ if path == pypkg:
+ if pymodule:
+ pymodule = path + '.' + pymodule
+ else:
+ pymodule = path
+
+
+
+ # We now know that were dealing with a python module, so we can import it
+ # and check what its dependencies are.
+ # We launch a separate task for each module for deterministic behavior.
+ # Each module will only import what is necessary for it to work in specific.
+ # The output of each task will contain each module's dependencies
+
+ print ('\nGetting dependencies for module: %s' % pymodule)
+ output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule]).decode('utf8')
+ print ('The following dependencies were found for module %s:\n' % pymodule)
+ print (output)
+
+ reportFILES = []
+ reportRDEPS = []
+
+ for pymodule_dep in output.split():
+
+ # Warning: This first part is ugly
+ # One of the dependencies that was found, could be inside of one of the folders included by another package
+ # We need to check if this happens so we can add the package containing the folder as an rdependency
+ # e.g. Folder encodings contained in codecs
+ # This would be solved if no packages included any folders
+
+ # This can be done in two ways:
+ # 1 - We assume that if we take out the filename from the path we would get
+ # the folder string, then we would check if folder string is in the list of folders
+ # This would not work if a package contains a folder which contains another folder
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # folder_string would not match any value contained in the list of folders
+ #
+ # 2 - We do it the other way around, checking if the folder is contained in the path
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # is folder_string inside path/folder1/folder2/filename?,
+ # Yes, it works, but we waste a couple of milliseconds.
+
+ pymodule_dep = pymodule_dep.replace(pyversion,'${PYTHON_MAJMIN}')
+ inFolders = False
+ for folder in allfolders:
+ # The module could have a directory named after it, e.g. xml, if we take out the filename from the path
+ # we'll end up with ${libdir}, and we want ${libdir}/xml
+ if isFolder(pymodule_dep):
+ check_path = pymodule_dep
+ else:
+ check_path = os.path.dirname(pymodule_dep)
+ if folder in check_path :
+ inFolders = True # Did we find a folder?
+ folderFound = False # Second flag to break inner for
+ # Loop only through packages which contain folders
+ for pypkg_with_folder in hasfolders:
+ if (folderFound == False):
+ # print('Checking folder %s on package %s' % (pymodule_dep,pypkg_with_folder))
+ for folder_dep in old_manifest[pypkg_with_folder]['files'] or folder_dep in old_manifest[pypkg_with_folder]['cached']:
+ if folder_dep == folder:
+ print ('%s folder found in %s' % (folder, pypkg_with_folder))
+ folderFound = True
+ if pypkg_with_folder not in new_manifest[pypkg]['rdepends'] and pypkg_with_folder != pypkg:
+ new_manifest[pypkg]['rdepends'].append(pypkg_with_folder)
+ else:
+ break
+
+ # A folder was found so we're done with this item, we can go on
+ if inFolders:
+ continue
+
+
+
+ # No directories beyond this point
+ # We might already have this module on the dictionary since it could depend on a (previously checked) module
+ if pymodule_dep not in new_manifest[pypkg]['files'] and pymodule_dep not in new_manifest[pypkg]['cached']:
+ # Handle core as a special package, we already did it so we pass it to NEW data structure directly
+ if pypkg == 'core':
+ print('Adding %s to %s FILES' % (pymodule_dep, pypkg))
+ if pymodule_dep.endswith('*'):
+ wildcards.append(pymodule_dep)
+ if isCached(pymodule_dep):
+ new_manifest[pypkg]['cached'].append(pymodule_dep)
+ else:
+ new_manifest[pypkg]['files'].append(pymodule_dep)
+
+ # Check for repeated files
+ if pymodule_dep not in allfiles:
+ allfiles.append(pymodule_dep)
+ else:
+ if pymodule_dep not in repeated:
+ repeated.append(pymodule_dep)
+ else:
+
+
+ # Last step: Figure out if we this belongs to FILES or RDEPENDS
+ # We check if this module is already contained on another package, so we add that one
+ # as an RDEPENDS, or if its not, it means it should be contained on the current
+ # package, and we should add it to FILES
+ for possible_rdep in old_manifest:
+ # Debug
+ # print('Checking %s ' % pymodule_dep + ' in %s' % possible_rdep)
+ if pymodule_dep in old_manifest[possible_rdep]['files'] or pymodule_dep in old_manifest[possible_rdep]['cached']:
+ # Since were nesting, we need to check its not the same pypkg
+ if(possible_rdep != pypkg):
+ if possible_rdep not in new_manifest[pypkg]['rdepends']:
+ # Add it to the new manifest data struct as RDEPENDS since it contains something this module needs
+ reportRDEPS.append('Adding %s to %s RDEPENDS, because it contains %s\n' % (possible_rdep, pypkg, pymodule_dep))
+ new_manifest[pypkg]['rdepends'].append(possible_rdep)
+ break
+ else:
+
+ # Since this module wasnt found on another package, it is not an RDEP,
+ # so we add it to FILES for this package.
+ # A module shouldn't contain itself (${libdir}/python3/sqlite3 shouldnt be on sqlite3 files)
+ if os.path.basename(pymodule_dep) != pypkg:
+ reportFILES.append(('Adding %s to %s FILES\n' % (pymodule_dep, pypkg)))
+ if isCached(pymodule_dep):
+ new_manifest[pypkg]['cached'].append(pymodule_dep)
+ else:
+ new_manifest[pypkg]['files'].append(pymodule_dep)
+ if pymodule_dep.endswith('*'):
+ wildcards.append(pymodule_dep)
+ if pymodule_dep not in allfiles:
+ allfiles.append(pymodule_dep)
+ else:
+ if pymodule_dep not in repeated:
+ repeated.append(pymodule_dep)
+
+ print('\n')
+ print('#################################')
+ print('Summary for module %s' % pymodule)
+ print('FILES found for module %s:' % pymodule)
+ print(''.join(reportFILES))
+ print('RDEPENDS found for module %s:' % pymodule)
+ print(''.join(reportRDEPS))
+ print('#################################')
+
+print('The following FILES contain wildcards, please check if they are necessary')
+print(wildcards)
+print('The following FILES contain folders, please check if they are necessary')
+print(hasfolders)
+
+
+# Sort it just so it looks nicer
+for pypkg in new_manifest:
+ new_manifest[pypkg]['files'].sort()
+ new_manifest[pypkg]['cached'].sort()
+ new_manifest[pypkg]['rdepends'].sort()
+
+# Create the manifest from the data structure that was built
+with open('python3-manifest.json.new','w') as outfile:
+ json.dump(new_manifest,outfile, indent=4)
+ outfile.write('\n')
+
+prepend_comments(comments,'python3-manifest.json.new')
+
+if (repeated):
+ error_msg = '\n\nERROR:\n'
+ error_msg += 'The following files are repeated (contained in more than one package),\n'
+ error_msg += 'this is likely to happen when new files are introduced after an upgrade,\n'
+ error_msg += 'please check which package should get it,\n modify the manifest accordingly and re-run the create_manifest task:\n'
+ error_msg += '\n'.join(repeated)
+ error_msg += '\n'
+ sys.exit(error_msg)
+
diff --git a/meta/recipes-devtools/python/python3/crosspythonpath.patch b/meta/recipes-devtools/python/python3/crosspythonpath.patch
new file mode 100644
index 0000000000..d789ab57d4
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/crosspythonpath.patch
@@ -0,0 +1,25 @@
+configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD
+
+When building x86->x86 the system will try to execute .so and related items
+from the default PYTHONPATH. This will fail if the target CPU contains
+instructions that the host CPU does not have, add CROSSPYTHONPATH
+into PYTHONPATH so we can prepend the list to find correct libs.
+
+Upstream-Status: Inappropriate [OE-Core integration specific]
+
+Credits-to: Mark Hatle <mark.hatle@windriver.com>
+Credits-to: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
+diff --git a/configure.ac b/configure.ac
+index 4ab19a6..7036a53 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -76,7 +76,7 @@ if test "$cross_compiling" = yes; then
+ 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 _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
+ fi
+ elif test "$cross_compiling" = maybe; then
+ AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
diff --git a/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch b/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch
deleted file mode 100644
index 0610565d3c..0000000000
--- a/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Upstream-Status: Inappropriate [Embedded specific]
-
-This patch fixes issuing with different libdir like lib64.
-This patch makes the native python binary modules findable
-in the install process of the host python.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2012/03/14
-
-Updated for python 2.7.3
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2012/05/01
-
-Index: Python-3.3.0rc2/Lib/sysconfig.py
-===================================================================
---- Python-3.3.0rc2.orig/Lib/sysconfig.py 2012-09-20 22:50:11.000000000 -0700
-+++ Python-3.3.0rc2/Lib/sysconfig.py 2012-09-20 22:53:01.561123396 -0700
-@@ -21,9 +21,9 @@
-
- _INSTALL_SCHEMES = {
- 'posix_prefix': {
-- 'stdlib': '{installed_base}/'+sys.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',
-+ 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages',
- 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
- 'include':
- '{installed_base}/include/python{py_version_short}{abiflags}',
-@@ -83,7 +83,7 @@
- 'posix_user': {
- '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',
-+ 'purelib': '{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',
-Index: Python-3.3.0rc2/Makefile.pre.in
-===================================================================
---- Python-3.3.0rc2.orig/Makefile.pre.in 2012-09-20 22:50:11.000000000 -0700
-+++ Python-3.3.0rc2/Makefile.pre.in 2012-09-20 22:50:54.245123997 -0700
-@@ -1080,9 +1080,9 @@
- $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
- $(DESTDIR)$(LIBDEST)/distutils/tests ; \
- fi
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -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/python3/get_module_deps3.py b/meta/recipes-devtools/python/python3/get_module_deps3.py
new file mode 100644
index 0000000000..fd12baad84
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -0,0 +1,146 @@
+# This script is launched on separate task for each python module
+# It checks for dependencies for that specific module and prints
+# them out, the output of this execution will have all dependencies
+# for a specific module, which will be parsed an dealt on create_manifest.py
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+# We can get a log per module, for all the dependencies that were found, but its messy.
+debug=False
+
+import sys
+
+# We can get a list of the modules which are currently required to run python
+# so we run python-core and get its modules, we then import what we need
+# and check what modules are currently running, if we substract them from the
+# modules we had initially, we get the dependencies for the module we imported.
+
+# We use importlib to achieve this, so we also need to know what modules importlib needs
+import importlib
+
+core_deps=set(sys.modules)
+
+def fix_path(dep_path):
+ import os
+ # We DONT want the path on our HOST system
+ pivot='recipe-sysroot-native'
+ dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+
+ if '/usr/bin' in dep_path:
+ dep_path = dep_path.replace('/usr/bin''${bindir}')
+
+ # Handle multilib, is there a better way?
+ if '/usr/lib32' in dep_path:
+ dep_path = dep_path.replace('/usr/lib32','${libdir}')
+ if '/usr/lib64' in dep_path:
+ dep_path = dep_path.replace('/usr/lib64','${libdir}')
+ if '/usr/lib' in dep_path:
+ dep_path = dep_path.replace('/usr/lib','${libdir}')
+ if '/usr/include' in dep_path:
+ dep_path = dep_path.replace('/usr/include','${includedir}')
+ if '__init__.' in dep_path:
+ dep_path = os.path.split(dep_path)[0]
+ return dep_path
+
+
+# Module to import was passed as an argument
+current_module = str(sys.argv[1]).rstrip()
+if(debug==True):
+ log = open('log_%s' % current_module,'w')
+ log.write('Module %s generated the following dependencies:\n' % current_module)
+try:
+ importlib.import_module('%s' % current_module)
+except ImportError as e:
+ if (debug==True):
+ log.write('Module was not found')
+ pass
+
+
+# Get current module dependencies, dif will contain a list of specific deps for this module
+module_deps=set(sys.modules)
+
+# We handle the core package (1st pass on create_manifest.py) as a special case
+if current_module == 'python-core-package':
+ dif = core_deps
+else:
+ # We know this is not the core package, so there must be a difference.
+ dif = module_deps-core_deps
+
+
+# Check where each dependency came from
+for item in dif:
+ dep_path=''
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+ dep_path = sys.modules['%s' % item].__file__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __file__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'dep_path' is not defined
+ # because module is not found (wasn't compiled?), e.g. bddsm
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+
+ # Site-customize is a special case since we (OpenEmbedded) put it there manually
+ if 'sitecustomize' in dep_path:
+ dep_path = '${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py'
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+ continue
+
+ dep_path = fix_path(dep_path)
+
+ import sysconfig
+ soabi=sysconfig.get_config_var('SOABI')
+ # Check if its a shared library and deconstruct it
+ if soabi in dep_path:
+ if (debug==True):
+ log.write('Shared library found in %s' % dep_path)
+ dep_path = dep_path.replace(soabi,'*')
+ print (dep_path)
+ continue
+
+ if (debug==True):
+ log.write(dep_path+'\n')
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+
+
+ import imp
+ cpython_tag = imp.get_tag()
+ cached=''
+ # Theres no naive way to find *.pyc files on python3
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__cached__\n')
+ cached = sys.modules['%s' % item].__cached__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __cached__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'cached' is not defined
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+ if cached is not None:
+ if (debug==True):
+ log.write(cached)
+ cached = fix_path(cached)
+ cached = cached.replace(cpython_tag,'*')
+ print (cached)
+
+if debug==True:
+ log.close()
diff --git a/meta/recipes-devtools/python/python3/host_include_contamination.patch b/meta/recipes-devtools/python/python3/host_include_contamination.patch
deleted file mode 100644
index ef2054d9a9..0000000000
--- a/meta/recipes-devtools/python/python3/host_include_contamination.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-when building python for qemux86-64 on ubuntu 11.10/64bit
-it gropes into host includes and then mixes them with cross
-includes and as a result some modules fail to compile and link
-one of the modules is python-elementtree which is then not
-found during image creation
-
-Proble is that setup.py tries to add native includes that newer
-ubuntu has introduced for multiarch support. But that should
-only happen for native builds and not cross building python
-so we add a check here.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: Python-3.3.0rc2/setup.py
-===================================================================
---- Python-3.3.0rc2.orig/setup.py 2012-09-20 21:54:50.000000000 -0700
-+++ Python-3.3.0rc2/setup.py 2012-09-20 21:57:35.029123858 -0700
-@@ -402,6 +402,9 @@
-
- if not find_executable('dpkg-architecture'):
- return
-+ if cross_compiling:
-+ return
-+
- opt = ''
- if cross_compiling:
- opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
deleted file mode 100644
index 056e8e7631..0000000000
--- a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-Upstream-Status: Pending
-
-get the sys.lib from python itself and do not use hardcoded value of 'lib'
-
-02/2015 Rebased for 3.4.2
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: Python-3.5.2/Include/pythonrun.h
-===================================================================
---- Python-3.5.2.orig/Include/pythonrun.h
-+++ Python-3.5.2/Include/pythonrun.h
-@@ -23,6 +23,9 @@ typedef struct {
- } PyCompilerFlags;
- #endif
-
-+PyAPI_FUNC(const char *) Py_GetArch(void);
-+PyAPI_FUNC(const char *) Py_GetLib(void);
-+
- #ifndef Py_LIMITED_API
- PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
- PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
-Index: Python-3.5.2/Lib/distutils/command/install.py
-===================================================================
---- Python-3.5.2.orig/Lib/distutils/command/install.py
-+++ Python-3.5.2/Lib/distutils/command/install.py
-@@ -19,6 +19,8 @@ from site import USER_BASE
- from site import USER_SITE
- HAS_USER_SITE = True
-
-+libname = sys.lib
-+
- WINDOWS_SCHEME = {
- 'purelib': '$base/Lib/site-packages',
- 'platlib': '$base/Lib/site-packages',
-@@ -30,7 +32,7 @@ WINDOWS_SCHEME = {
- INSTALL_SCHEMES = {
- 'unix_prefix': {
- 'purelib': '$base/lib/python$py_version_short/site-packages',
-- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
-+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
- 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
- 'scripts': '$base/bin',
- 'data' : '$base',
-Index: Python-3.5.2/Lib/pydoc.py
-===================================================================
---- Python-3.5.2.orig/Lib/pydoc.py
-+++ Python-3.5.2/Lib/pydoc.py
-@@ -384,7 +384,7 @@ class Doc:
- docmodule = docclass = docroutine = docother = docproperty = docdata = fail
-
- def getdocloc(self, object,
-- basedir=os.path.join(sys.base_exec_prefix, "lib",
-+ basedir=os.path.join(sys.base_exec_prefix, sys.lib,
- "python%d.%d" % sys.version_info[:2])):
- """Return the location of module docs or None"""
-
-Index: Python-3.5.2/Lib/trace.py
-===================================================================
---- Python-3.5.2.orig/Lib/trace.py
-+++ Python-3.5.2/Lib/trace.py
-@@ -749,10 +749,10 @@ def main(argv=None):
- # should I also call expanduser? (after all, could use $HOME)
-
- s = s.replace("$prefix",
-- os.path.join(sys.base_prefix, "lib",
-+ os.path.join(sys.base_prefix, sys.lib,
- "python" + sys.version[:3]))
- s = s.replace("$exec_prefix",
-- os.path.join(sys.base_exec_prefix, "lib",
-+ os.path.join(sys.base_exec_prefix, sys.lib,
- "python" + sys.version[:3]))
- s = os.path.normpath(s)
- ignore_dirs.append(s)
-Index: Python-3.5.2/Makefile.pre.in
-===================================================================
---- Python-3.5.2.orig/Makefile.pre.in
-+++ Python-3.5.2/Makefile.pre.in
-@@ -106,6 +106,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS
-
- # Machine-dependent subdirectories
- MACHDEP= @MACHDEP@
-+LIB= @LIB@
-+ARCH= @ARCH@
-
- # Multiarch directory (may be empty)
- MULTIARCH= @MULTIARCH@
-@@ -125,7 +127,7 @@ LIBDIR= @libdir@
- MANDIR= @mandir@
- INCLUDEDIR= @includedir@
- CONFINCLUDEDIR= $(exec_prefix)/include
--SCRIPTDIR= $(prefix)/lib
-+SCRIPTDIR= @libdir@
- ABIFLAGS= @ABIFLAGS@
-
- # Detailed destination directories
-@@ -755,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
- -DEXEC_PREFIX='"$(exec_prefix)"' \
- -DVERSION='"$(VERSION)"' \
- -DVPATH='"$(VPATH)"' \
-+ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \
- -o $@ $(srcdir)/Modules/getpath.c
-
- Programs/python.o: $(srcdir)/Programs/python.c
-@@ -835,7 +838,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(O
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
-
- Python/getplatform.o: $(srcdir)/Python/getplatform.c
-- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
-+ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
-
- Python/importdl.o: $(srcdir)/Python/importdl.c
- $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-3.5.2/Modules/getpath.c
-===================================================================
---- Python-3.5.2.orig/Modules/getpath.c
-+++ Python-3.5.2/Modules/getpath.c
-@@ -105,6 +105,13 @@
- #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
- #endif
-
-+#define LIB_PYTHON LIB "/python" VERSION
-+
-+#ifndef PYTHONPATH
-+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
-+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
-+#endif
-+
- #ifndef LANDMARK
- #define LANDMARK L"os.py"
- #endif
-@@ -113,6 +120,7 @@ static wchar_t prefix[MAXPATHLEN+1];
- static wchar_t exec_prefix[MAXPATHLEN+1];
- static wchar_t progpath[MAXPATHLEN+1];
- static wchar_t *module_search_path = NULL;
-+static wchar_t *lib_python = L"" LIB_PYTHON;
-
- /* Get file status. Encode the path to the locale encoding. */
-
-Index: Python-3.5.2/Python/getplatform.c
-===================================================================
---- Python-3.5.2.orig/Python/getplatform.c
-+++ Python-3.5.2/Python/getplatform.c
-@@ -10,3 +10,23 @@ Py_GetPlatform(void)
- {
- return PLATFORM;
- }
-+
-+#ifndef ARCH
-+#define ARCH "unknown"
-+#endif
-+
-+const char *
-+Py_GetArch(void)
-+{
-+ return ARCH;
-+}
-+
-+#ifndef LIB
-+#define LIB "lib"
-+#endif
-+
-+const char *
-+Py_GetLib(void)
-+{
-+ return LIB;
-+}
-Index: Python-3.5.2/Python/sysmodule.c
-===================================================================
---- Python-3.5.2.orig/Python/sysmodule.c
-+++ Python-3.5.2/Python/sysmodule.c
-@@ -1790,6 +1790,10 @@ _PySys_Init(void)
- PyUnicode_FromString(Py_GetCopyright()));
- SET_SYS_FROM_STRING("platform",
- PyUnicode_FromString(Py_GetPlatform()));
-+ SET_SYS_FROM_STRING("arch",
-+ PyUnicode_FromString(Py_GetArch()));
-+ SET_SYS_FROM_STRING("lib",
-+ PyUnicode_FromString(Py_GetLib()));
- SET_SYS_FROM_STRING("executable",
- PyUnicode_FromWideChar(
- Py_GetProgramFullPath(), -1));
-Index: Python-3.5.2/setup.py
-===================================================================
---- Python-3.5.2.orig/setup.py
-+++ Python-3.5.2/setup.py
-@@ -492,7 +492,7 @@ class PyBuildExt(build_ext):
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
- if not cross_compiling:
-- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+ add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib))
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- # only change this for cross builds for 3.3, issues on Mageia
- if cross_compiling:
-@@ -550,8 +550,7 @@ class PyBuildExt(build_ext):
- # be assumed that no additional -I,-L directives are needed.
- if not cross_compiling:
- lib_dirs = self.compiler.library_dirs + [
-- '/lib64', '/usr/lib64',
-- '/lib', '/usr/lib',
-+ '/' + sys.lib, '/usr/' + sys.lib,
- ]
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
- else:
-@@ -743,11 +742,11 @@ class PyBuildExt(build_ext):
- elif curses_library:
- readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
-+ ['/usr/'+sys.lib+'/termcap'],
- 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
-- library_dirs=['/usr/lib/termcap'],
-+ library_dirs=['/usr/'+sys.lib+'/termcap'],
- extra_link_args=readline_extra_link_args,
- libraries=readline_libs) )
- else:
-Index: Python-3.5.2/Lib/sysconfig.py
-===================================================================
---- Python-3.5.2.orig/Lib/sysconfig.py
-+++ Python-3.5.2/Lib/sysconfig.py
-@@ -20,10 +20,10 @@ __all__ = [
-
- _INSTALL_SCHEMES = {
- 'posix_prefix': {
-- 'stdlib': '{installed_base}/lib/python{py_version_short}',
-- 'platstdlib': '{platbase}/lib/python{py_version_short}',
-+ 'stdlib': '{installed_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':
- '{installed_base}/include/python{py_version_short}{abiflags}',
- 'platinclude':
-@@ -32,10 +32,10 @@ _INSTALL_SCHEMES = {
- 'data': '{base}',
- },
- 'posix_home': {
-- 'stdlib': '{installed_base}/lib/python',
-- 'platstdlib': '{base}/lib/python',
-+ 'stdlib': '{installed_base}/'+sys.lib+'/python',
-+ 'platstdlib': '{base}/'+sys.lib+'/python',
- 'purelib': '{base}/lib/python',
-- 'platlib': '{base}/lib/python',
-+ 'platlib': '{base}/'+sys.lib+'/python',
- 'include': '{installed_base}/include/python',
- 'platinclude': '{installed_base}/include/python',
- 'scripts': '{base}/bin',
-@@ -61,10 +61,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-3.5.2/configure.ac
-===================================================================
---- Python-3.5.2.orig/configure.ac
-+++ Python-3.5.2/configure.ac
-@@ -876,6 +876,41 @@ PLATDIR=plat-$MACHDEP
- AC_SUBST(PLATDIR)
- AC_SUBST(PLATFORM_TRIPLET)
-
-+AC_SUBST(ARCH)
-+AC_MSG_CHECKING(ARCH)
-+ARCH=`uname -m`
-+case $ARCH in
-+i?86) ARCH=i386;;
-+esac
-+AC_MSG_RESULT($ARCH)
-+
-+AC_SUBST(LIB)
-+AC_MSG_CHECKING(LIB)
-+case $ac_sys_system in
-+Linux*)
-+ # Test if the compiler is 64bit
-+ echo 'int i;' > conftest.$ac_ext
-+ python_cv_cc_64bit_output=no
-+ if AC_TRY_EVAL(ac_compile); then
-+ case `/usr/bin/file conftest.$ac_objext` in
-+ *"ELF 64"*)
-+ python_cv_cc_64bit_output=yes
-+ ;;
-+ esac
-+ fi
-+ rm -rf conftest*
-+ ;;
-+esac
-+
-+case $ARCH:$python_cv_cc_64bit_output in
-+ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
-+ LIB="lib64"
-+ ;;
-+*:*)
-+ LIB="lib"
-+ ;;
-+esac
-+AC_MSG_RESULT($LIB)
-
- AC_MSG_CHECKING([for -Wl,--no-as-needed])
- save_LDFLAGS="$LDFLAGS"
diff --git a/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch b/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch
deleted file mode 100644
index ab1b7230ea..0000000000
--- a/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From aab3e8c432b90508ac14755128f5a687be2fdf43 Mon Sep 17 00:00:00 2001
-From: Mingli Yu <Mingli.Yu@windriver.com>
-Date: Thu, 22 Sep 2016 16:39:49 +0800
-Subject: [PATCH] python3: fix CVE-2016-1000110
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which
-indicates that the script is in CGI mode.
-
-Issue #27568 Reported and patch contributed by Rémi Rampin. [#27568]
-
-Backport patch from https://hg.python.org/cpython/rev/a0ac52ed8f79
-
-Upstream-Status: Backport
-CVE: CVE-2016-1000110
-Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
----
- Doc/howto/urllib2.rst | 5 +++++
- Doc/library/urllib.request.rst | 17 ++++++++++++++++-
- Lib/test/test_urllib.py | 14 +++++++++++++-
- Lib/urllib/request.py | 6 ++++++
- Misc/NEWS | 4 ++++
- 5 files changed, 44 insertions(+), 2 deletions(-)
-
-diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
-index 24a4156..d2c7991 100644
---- a/Doc/howto/urllib2.rst
-+++ b/Doc/howto/urllib2.rst
-@@ -538,6 +538,11 @@ setting up a `Basic Authentication`_ handler: ::
- through a proxy. However, this can be enabled by extending urllib.request as
- shown in the recipe [#]_.
-
-+.. note::
-+
-+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see
-+ the documentation on :func:`~urllib.request.getproxies`.
-+
-
- Sockets and Layers
- ==================
-diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
-index 1338906..1291aeb 100644
---- a/Doc/library/urllib.request.rst
-+++ b/Doc/library/urllib.request.rst
-@@ -173,6 +173,16 @@ The :mod:`urllib.request` module defines the following functions:
- If both lowercase and uppercase environment variables exist (and disagree),
- lowercase is preferred.
-
-+ .. note::
-+
-+ If the environment variable ``REQUEST_METHOD`` is set, which usually
-+ indicates your script is running in a CGI environment, the environment
-+ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
-+ because that variable can be injected by a client using the "Proxy:" HTTP
-+ header. If you need to use an HTTP proxy in a CGI environment, either use
-+ ``ProxyHandler`` explicitly, or make sure the variable name is in
-+ lowercase (or at least the ``_proxy`` suffix).
-+
-
- The following classes are provided:
-
-@@ -280,6 +290,11 @@ The following classes are provided:
- list of hostname suffixes, optionally with ``:port`` appended, for example
- ``cern.ch,ncsa.uiuc.edu,some.host:8080``.
-
-+ .. note::
-+
-+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set;
-+ see the documentation on :func:`~urllib.request.getproxies`.
-+
-
- .. class:: HTTPPasswordMgr()
-
-@@ -1138,7 +1153,7 @@ the returned bytes object to string once it determines or guesses
- the appropriate encoding.
-
- The following W3C document, https://www.w3.org/International/O-charset\ , lists
--the various ways in which a (X)HTML or a XML document could have specified its
-+the various ways in which an (X)HTML or an XML document could have specified its
- encoding information.
-
- As the python.org website uses *utf-8* encoding as specified in its meta tag, we
-diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
-index 5d05f8d..247598a 100644
---- a/Lib/test/test_urllib.py
-+++ b/Lib/test/test_urllib.py
-@@ -1,4 +1,4 @@
--"""Regresssion tests for what was in Python 2's "urllib" module"""
-+"""Regression tests for what was in Python 2's "urllib" module"""
-
- import urllib.parse
- import urllib.request
-@@ -232,6 +232,18 @@ class ProxyTests(unittest.TestCase):
- self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com:8888'))
- self.assertTrue(urllib.request.proxy_bypass_environment('newdomain.com:1234'))
-
-+ def test_proxy_cgi_ignore(self):
-+ try:
-+ self.env.set('HTTP_PROXY', 'http://somewhere:3128')
-+ proxies = urllib.request.getproxies_environment()
-+ self.assertEqual('http://somewhere:3128', proxies['http'])
-+ self.env.set('REQUEST_METHOD', 'GET')
-+ proxies = urllib.request.getproxies_environment()
-+ self.assertNotIn('http', proxies)
-+ finally:
-+ self.env.unset('REQUEST_METHOD')
-+ self.env.unset('HTTP_PROXY')
-+
- def test_proxy_bypass_environment_host_match(self):
- bypass = urllib.request.proxy_bypass_environment
- self.env.set('NO_PROXY',
-diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
-index 1731fe3..3be327d 100644
---- a/Lib/urllib/request.py
-+++ b/Lib/urllib/request.py
-@@ -2412,6 +2412,12 @@ def getproxies_environment():
- name = name.lower()
- if value and name[-6:] == '_proxy':
- proxies[name[:-6]] = value
-+ # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY
-+ # (non-all-lowercase) as it may be set from the web server by a "Proxy:"
-+ # header from the client
-+ # If "proxy" is lowercase, it will still be used thanks to the next block
-+ if 'REQUEST_METHOD' in os.environ:
-+ proxies.pop('http', None)
- for name, value in os.environ.items():
- if name[-6:] == '_proxy':
- name = name.lower()
-diff --git a/Misc/NEWS b/Misc/NEWS
-index 4ad2551..2fcc95b 100644
---- a/Misc/NEWS
-+++ b/Misc/NEWS
-@@ -329,6 +329,10 @@ Library
- - Issue #26644: Raise ValueError rather than SystemError when a negative
- length is passed to SSLSocket.recv() or read().
-
-+- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
-+ HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
-+ that the script is in CGI mode.
-+
- - Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
- instead of up to 1024.
-
---
-2.8.1
-
diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json
new file mode 100644
index 0000000000..dba92b0e39
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -0,0 +1,1222 @@
+# DO NOT (entirely) modify this file manually, please read.
+#
+# IMPORTANT NOTE:
+# Please keep in mind that the create_manifest task relies on the fact the the
+# target and native Python packages are the same, and it also needs to be executed
+# with a fully working native package (with all the PACKAGECONFIGs enabled and all
+# and all the modules should be working, check log.do_compile), otherwise the script
+# will fail to find dependencies correctly, this note is valid either if you are
+# upgrading to a new Python version or adding a new package.
+#
+#
+# If you are adding a new package please follow the next steps:
+# How to add a new package:
+# - If a user wants to add a new package all that has to be done is:
+# Modify the python3-manifest.json file, and add the required file(s) to the FILES list,
+# fill up the SUMMARY section as well, the script should handle all the rest.
+#
+# Real example:
+# We want to add a web browser package, including the file webbrowser.py
+# which at the moment is on python3-misc.
+# "webbrowser": {
+# "files": ["${libdir}/python${PYTHON_MAJMIN}/lib-dynload/webbrowser.py"],
+# "rdepends": [],
+# "summary": "Python Web Browser support"}
+#
+# * Note that the rdepends field was left empty
+#
+# We run $ bitbake python3 -c create_manifest and the resulting manifest
+# should be completed after a few seconds, showing something like:
+# "webbrowser": {
+# "files": ["${libdir}/python${PYTHON_MAJMIN}/webbrowser.py"],
+# "rdepends": ["core","fcntl","io","pickle","shell","subprocess"],
+# "summary": "Python Web Browser support"}
+#
+#
+# If you are upgrading Python to a new version please follow the next steps:
+# After each Python upgrade, the create_manifest task should be executed, because we
+# don't control what changes on upstream Python, so, some module dependency
+# might have changed without us realizing it, a certain module can either have
+# more or less dependencies, or could be depending on a new file that was just
+# created on the new release and for obvious reasons we wouldn't have it on our
+# old manifest, all of these issues would cause runtime errors on our system.
+#
+# - Upgrade both the native and target Python packages to a new version
+# - Run the create_manifest task for the target Python package as its shown below:
+#
+# $ bitbake python3 -c create_manifest
+#
+# This will automatically replace your manifest file located under the Python directory
+# with an new one, which contains the new dependencies (if any).
+#
+# Several things could have gone wrong here, I will try to explain a few:
+#
+# a) A new file was introduced on this release, e.g. sha3*.so:
+# The task will check what its needed to import every module, more than one module would
+# would probably depend on sha3*.so, although only one module should contain it.
+#
+# After running the task, the new manifest will have the sha3*.so file on more than one
+# module, you need to manually decide which one of them should get it and delete it from
+# the others, for example sha3*.so should likely be on ${PN}-crypt.
+# Once you have deleted from the others you need to run the create_manifest task again,
+# this will populate the other module's rdepends fields, with ${PN}-crypt and you should be
+# good to go.
+#
+# b) The native package wasn't built correctly and its missing a certain module:
+# As mentioned before, you need to make sure the native package was built with all the modules
+# because it is used as base to build the manifest file, you need to manually check log.do_compile
+# since it won't error out the compile function if its only missing a couple of modules.
+#
+# e.g. missing the _uuid module, log.do_compile would show the following:
+# Python build finished successfully!
+# The necessary bits to build these optional modules were not found:
+# _uuid
+#
+# What will happen here is that the new manifest would not be aware that the _uuid module exists, so
+# not only we won't know of any dependencies to it, but also, the _uuid* files will be packaged on
+# the misc package (which is where any file that doesn't belong anywhere else ends up).
+#
+# This will eventually cause runtime errors on our system if we don't include the misc package on
+# on our image, because the _uuid files will be missing.
+# If we build the _uuid module correctly and run the create_manifest task the _uuid files will be
+# detected correctly along with its dependencies, and we will get a working manifest.
+#
+# This is the reason why it is important to make sure we have a fully working native build,
+# so we can avoid these errors.
+#
+#
+#
+# DO NOT MODIFY THE NEXT LINE!, IT IS USED AS A MARKER FOR THE ACTUAL JSON MANIFEST
+# EOC
+{
+ "tests": {
+ "summary": "Python test suite",
+ "rdepends": [
+ "core",
+ "modules"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/*/test",
+ "${libdir}/python${PYTHON_MAJMIN}/*/tests",
+ "${libdir}/python${PYTHON_MAJMIN}/idlelib/idle_test/",
+ "${libdir}/python${PYTHON_MAJMIN}/test"
+ ],
+ "cached": []
+ },
+ "2to3": {
+ "summary": "Python automated Python 2 to 3 code translator",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${bindir}/2to3*",
+ "${libdir}/python${PYTHON_MAJMIN}/lib2to3"
+ ],
+ "cached": []
+ },
+ "asyncio": {
+ "summary": "Python Asynchronous I/O",
+ "rdepends": [
+ "core",
+ "io",
+ "logging",
+ "netclient",
+ "numbers",
+ "stringold"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/asyncio",
+ "${libdir}/python${PYTHON_MAJMIN}/concurrent",
+ "${libdir}/python${PYTHON_MAJMIN}/concurrent/futures",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_asyncio.*.so"
+ ],
+ "cached": []
+ },
+ "audio": {
+ "summary": "Python Audio Handling",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/chunk.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/audioop.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/ossaudiodev.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/sndhdr.py",
+ "${libdir}/python${PYTHON_MAJMIN}/sunau.py",
+ "${libdir}/python${PYTHON_MAJMIN}/wave.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/chunk.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sndhdr.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sunau.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc"
+ ]
+ },
+ "codecs": {
+ "summary": "Python codec",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_multibytecodec.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/xdrlib.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/xdrlib.*.pyc"
+ ]
+ },
+ "compile": {
+ "summary": "Python bytecode compilation support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/compileall.py",
+ "${libdir}/python${PYTHON_MAJMIN}/py_compile.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/compileall.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/py_compile.*.pyc"
+ ]
+ },
+ "compression": {
+ "summary": "Python high-level compression support",
+ "rdepends": [
+ "core",
+ "shell",
+ "unixadmin"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/_compression.py",
+ "${libdir}/python${PYTHON_MAJMIN}/bz2.py",
+ "${libdir}/python${PYTHON_MAJMIN}/gzip.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/zlib.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lzma.py",
+ "${libdir}/python${PYTHON_MAJMIN}/tarfile.py",
+ "${libdir}/python${PYTHON_MAJMIN}/zipfile.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bz2.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/lzma.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipfile.*.pyc"
+ ]
+ },
+ "core": {
+ "summary": "Python interpreter and core modules",
+ "rdepends": [],
+ "files": [
+ "${bindir}/python3",
+ "${bindir}/python${PYTHON_MAJMIN}",
+ "${bindir}/python${PYTHON_MAJMIN}.real",
+ "${bindir}/python${PYTHON_BINABI}",
+ "${includedir}/python${PYTHON_BINABI}/pyconfig*.h",
+ "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]",
+ "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
+ "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
+ "${libdir}/python${PYTHON_MAJMIN}/UserString.py",
+ "${libdir}/python${PYTHON_MAJMIN}/__future__.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_abcoll.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_bootlocale.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_weakrefset.py",
+ "${libdir}/python${PYTHON_MAJMIN}/abc.py",
+ "${libdir}/python${PYTHON_MAJMIN}/argparse.py",
+ "${libdir}/python${PYTHON_MAJMIN}/ast.py",
+ "${libdir}/python${PYTHON_MAJMIN}/bisect.py",
+ "${libdir}/python${PYTHON_MAJMIN}/code.py",
+ "${libdir}/python${PYTHON_MAJMIN}/codecs.py",
+ "${libdir}/python${PYTHON_MAJMIN}/codeop.py",
+ "${libdir}/python${PYTHON_MAJMIN}/collections",
+ "${libdir}/python${PYTHON_MAJMIN}/collections/abc.py",
+ "${libdir}/python${PYTHON_MAJMIN}/configparser.py",
+ "${libdir}/python${PYTHON_MAJMIN}/contextlib.py",
+ "${libdir}/python${PYTHON_MAJMIN}/copy.py",
+ "${libdir}/python${PYTHON_MAJMIN}/copyreg.py",
+ "${libdir}/python${PYTHON_MAJMIN}/csv.py",
+ "${libdir}/python${PYTHON_MAJMIN}/dis.py",
+ "${libdir}/python${PYTHON_MAJMIN}/encodings",
+ "${libdir}/python${PYTHON_MAJMIN}/encodings/aliases.py",
+ "${libdir}/python${PYTHON_MAJMIN}/encodings/latin_1.py",
+ "${libdir}/python${PYTHON_MAJMIN}/encodings/utf_8.py",
+ "${libdir}/python${PYTHON_MAJMIN}/enum.py",
+ "${libdir}/python${PYTHON_MAJMIN}/functools.py",
+ "${libdir}/python${PYTHON_MAJMIN}/genericpath.py",
+ "${libdir}/python${PYTHON_MAJMIN}/getopt.py",
+ "${libdir}/python${PYTHON_MAJMIN}/gettext.py",
+ "${libdir}/python${PYTHON_MAJMIN}/heapq.py",
+ "${libdir}/python${PYTHON_MAJMIN}/imp.py",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/_bootstrap.py",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/_bootstrap_external.py",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/abc.py",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/machinery.py",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/util.py",
+ "${libdir}/python${PYTHON_MAJMIN}/inspect.py",
+ "${libdir}/python${PYTHON_MAJMIN}/io.py",
+ "${libdir}/python${PYTHON_MAJMIN}/keyword.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/_struct.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/binascii.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/time.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/xreadlines.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bisect.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixsubprocess.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_struct.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/math.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/parser.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/readline.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/select.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/time.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/unicodedata.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/xreadlines.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/linecache.py",
+ "${libdir}/python${PYTHON_MAJMIN}/locale.py",
+ "${libdir}/python${PYTHON_MAJMIN}/new.py",
+ "${libdir}/python${PYTHON_MAJMIN}/ntpath.py",
+ "${libdir}/python${PYTHON_MAJMIN}/opcode.py",
+ "${libdir}/python${PYTHON_MAJMIN}/operator.py",
+ "${libdir}/python${PYTHON_MAJMIN}/optparse.py",
+ "${libdir}/python${PYTHON_MAJMIN}/os.py",
+ "${libdir}/python${PYTHON_MAJMIN}/platform.py",
+ "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
+ "${libdir}/python${PYTHON_MAJMIN}/re.py",
+ "${libdir}/python${PYTHON_MAJMIN}/reprlib.py",
+ "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
+ "${libdir}/python${PYTHON_MAJMIN}/runpy.py",
+ "${libdir}/python${PYTHON_MAJMIN}/selectors.py",
+ "${libdir}/python${PYTHON_MAJMIN}/signal.py",
+ "${libdir}/python${PYTHON_MAJMIN}/site.py",
+ "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py",
+ "${libdir}/python${PYTHON_MAJMIN}/sre_compile.py",
+ "${libdir}/python${PYTHON_MAJMIN}/sre_constants.py",
+ "${libdir}/python${PYTHON_MAJMIN}/sre_parse.py",
+ "${libdir}/python${PYTHON_MAJMIN}/stat.py",
+ "${libdir}/python${PYTHON_MAJMIN}/stringprep.py",
+ "${libdir}/python${PYTHON_MAJMIN}/struct.py",
+ "${libdir}/python${PYTHON_MAJMIN}/subprocess.py",
+ "${libdir}/python${PYTHON_MAJMIN}/symbol.py",
+ "${libdir}/python${PYTHON_MAJMIN}/sysconfig.py",
+ "${libdir}/python${PYTHON_MAJMIN}/textwrap.py",
+ "${libdir}/python${PYTHON_MAJMIN}/threading.py",
+ "${libdir}/python${PYTHON_MAJMIN}/token.py",
+ "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
+ "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
+ "${libdir}/python${PYTHON_MAJMIN}/types.py",
+ "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
+ "${libdir}/python${PYTHON_MAJMIN}/weakref.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/__future__.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_bootlocale.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_collections_abc.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/abc.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/argparse.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ast.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bisect.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/code.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/codecs.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/codeop.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/configparser.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextlib.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/copy.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/copyreg.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/csv.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/dis.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/enum.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/functools.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/genericpath.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getopt.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gettext.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/heapq.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imp.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/inspect.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/io.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/keyword.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/linecache.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/locale.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/opcode.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/operator.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/optparse.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/os.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/reprlib.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/runpy.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/selectors.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/signal.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/site.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sre_compile.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sre_constants.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sre_parse.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/stat.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/stringprep.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/struct.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/subprocess.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/symbol.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sysconfig.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/textwrap.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/threading.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/token.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tokenize.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/types.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/warnings.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/weakref.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/collections/__pycache__",
+ "${libdir}/python${PYTHON_MAJMIN}/collections/__pycache__/abc.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/encodings/__pycache__",
+ "${libdir}/python${PYTHON_MAJMIN}/encodings/__pycache__/aliases.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/encodings/__pycache__/latin_1.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/encodings/__pycache__/utf_8.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/abc.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/machinery.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/util.*.pyc"
+ ]
+ },
+ "crypt": {
+ "summary": "Python basic cryptographic and hashing support",
+ "rdepends": [
+ "core",
+ "math",
+ "stringold"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/crypt.py",
+ "${libdir}/python${PYTHON_MAJMIN}/hashlib.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_crypt.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha256.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha512.*.so"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/crypt.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hashlib.*.pyc"
+ ]
+ },
+ "ctypes": {
+ "summary": "Python C types support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/ctypes",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_ctypes.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_ctypes_test.*.so"
+ ],
+ "cached": []
+ },
+ "curses": {
+ "summary": "Python curses support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/curses",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_curses.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_curses_panel.*.so"
+ ],
+ "cached": []
+ },
+ "datetime": {
+ "summary": "Python calendar and time support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/_strptime.py",
+ "${libdir}/python${PYTHON_MAJMIN}/calendar.py",
+ "${libdir}/python${PYTHON_MAJMIN}/datetime.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_datetime.*.so"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_strptime.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/calendar.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/datetime.*.pyc"
+ ]
+ },
+ "db": {
+ "summary": "Python file-based database support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/dbm",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_dbm.*.so"
+ ],
+ "cached": []
+ },
+ "debugger": {
+ "summary": "Python debugger",
+ "rdepends": [
+ "core",
+ "pprint",
+ "shell",
+ "stringold"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/bdb.py",
+ "${libdir}/python${PYTHON_MAJMIN}/pdb.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bdb.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pdb.*.pyc"
+ ]
+ },
+ "dev": {
+ "cached": [],
+ "files": [
+ "${base_libdir}/*.a",
+ "${base_libdir}/*.o",
+ "${bindir}/python*-config*",
+ "${datadir}/aclocal",
+ "${datadir}/pkgconfig",
+ "${includedir}",
+ "${libdir}/*.a",
+ "${libdir}/*.la",
+ "${libdir}/*.o",
+ "${libdir}/lib*${SOLIBSDEV}",
+ "${libdir}/pkgconfig"
+ ],
+ "rdepends": [
+ "core",
+ "distutils"
+ ],
+ "summary": "Python development package"
+ },
+ "difflib": {
+ "summary": "Python helpers for computing deltas between objects",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/difflib.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc"
+ ]
+ },
+ "distutils-windows": {
+ "cached": [],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/distutils/command/wininst-*.exe"
+ ],
+ "rdepends": [
+ "distutils"
+ ],
+ "summary": "Python distribution utilities (Windows installer stubs)"
+ },
+ "distutils": {
+ "summary": "Python Distribution Utilities",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/distutils"
+ ],
+ "cached": []
+ },
+ "doctest": {
+ "summary": "Python framework for running examples in docstrings",
+ "rdepends": [
+ "core",
+ "debugger",
+ "difflib",
+ "logging",
+ "pprint",
+ "shell",
+ "stringold",
+ "unittest"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/doctest.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/doctest.*.pyc"
+ ]
+ },
+ "email": {
+ "summary": "Python email support",
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "io",
+ "math",
+ "netclient"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/email",
+ "${libdir}/python${PYTHON_MAJMIN}/imaplib.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imaplib.*.pyc"
+ ]
+ },
+ "fcntl": {
+ "summary": "Python's fcntl interface",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so"
+ ],
+ "cached": []
+ },
+ "gdbm": {
+ "summary": "Python GNU database support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_gdbm.*.so"
+ ],
+ "cached": []
+ },
+ "html": {
+ "summary": "Python HTML processing support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/formatter.py",
+ "${libdir}/python${PYTHON_MAJMIN}/html"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/formatter.*.pyc"
+ ]
+ },
+ "idle": {
+ "summary": "Python Integrated Development Environment",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${bindir}/idle*",
+ "${libdir}/python${PYTHON_MAJMIN}/idlelib"
+ ],
+ "cached": []
+ },
+ "image": {
+ "summary": "Python graphical image handling",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/colorsys.py",
+ "${libdir}/python${PYTHON_MAJMIN}/imghdr.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/colorsys.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imghdr.*.pyc"
+ ]
+ },
+ "io": {
+ "summary": "Python low-level I/O",
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "math",
+ "netclient",
+ "shell",
+ "unixadmin"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/_pyio.py",
+ "${libdir}/python${PYTHON_MAJMIN}/ipaddress.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_socket.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_ssl.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/termios.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/pipes.py",
+ "${libdir}/python${PYTHON_MAJMIN}/socket.py",
+ "${libdir}/python${PYTHON_MAJMIN}/ssl.py",
+ "${libdir}/python${PYTHON_MAJMIN}/tempfile.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ipaddress.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pipes.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tempfile.*.pyc"
+ ]
+ },
+ "json": {
+ "summary": "Python JSON support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/json",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_json.*.so"
+ ],
+ "cached": []
+ },
+ "logging": {
+ "summary": "Python logging support",
+ "rdepends": [
+ "core",
+ "stringold"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/logging"
+ ],
+ "cached": []
+ },
+ "mailbox": {
+ "summary": "Python mailbox format support",
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "stringold"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/mailbox.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mailbox.*.pyc"
+ ]
+ },
+ "math": {
+ "summary": "Python math support",
+ "rdepends": [
+ "core",
+ "crypt"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_random.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/cmath.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/random.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/random.*.pyc"
+ ]
+ },
+ "mime": {
+ "summary": "Python MIME handling APIs",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/quopri.py",
+ "${libdir}/python${PYTHON_MAJMIN}/uu.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/quopri.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uu.*.pyc"
+ ]
+ },
+ "mmap": {
+ "summary": "Python memory-mapped file support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/mmap.*.so"
+ ],
+ "cached": []
+ },
+ "modules": {
+ "cached": [],
+ "files": [],
+ "rdepends": [
+ "2to3",
+ "asyncio",
+ "audio",
+ "codecs",
+ "compile",
+ "compression",
+ "core",
+ "crypt",
+ "ctypes",
+ "curses",
+ "datetime",
+ "db",
+ "debugger",
+ "difflib",
+ "distutils",
+ "doctest",
+ "email",
+ "fcntl",
+ "html",
+ "idle",
+ "image",
+ "io",
+ "json",
+ "logging",
+ "mailbox",
+ "math",
+ "mime",
+ "mmap",
+ "multiprocessing",
+ "netclient",
+ "netserver",
+ "numbers",
+ "pickle",
+ "pkgutil",
+ "plistlib",
+ "pprint",
+ "profile",
+ "pydoc",
+ "resource",
+ "shell",
+ "smtpd",
+ "sqlite3",
+ "stringold",
+ "syslog",
+ "terminal",
+ "threading",
+ "tkinter",
+ "typing",
+ "unittest",
+ "unixadmin",
+ "venv",
+ "xml",
+ "xmlrpc"
+ ],
+ "rrecommends": [
+ "distutils-windows"
+ ],
+ "summary": "All Python modules"
+ },
+ "multiprocessing": {
+ "summary": "Python multiprocessing support",
+ "rdepends": [
+ "core",
+ "io",
+ "pickle"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_multiprocessing.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/multiprocessing"
+ ],
+ "cached": []
+ },
+ "netclient": {
+ "summary": "Python Internet Protocol clients",
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "io",
+ "math",
+ "mime",
+ "stringold"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/base64.py",
+ "${libdir}/python${PYTHON_MAJMIN}/ftplib.py",
+ "${libdir}/python${PYTHON_MAJMIN}/hmac.py",
+ "${libdir}/python${PYTHON_MAJMIN}/http",
+ "${libdir}/python${PYTHON_MAJMIN}/http/__pycache__",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_uuid.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/mimetypes.py",
+ "${libdir}/python${PYTHON_MAJMIN}/nntplib.py",
+ "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
+ "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
+ "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
+ "${libdir}/python${PYTHON_MAJMIN}/urllib",
+ "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
+ "${libdir}/python${PYTHON_MAJMIN}/uuid.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/base64.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ftplib.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hmac.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/nntplib.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/telnetlib.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc"
+ ]
+ },
+ "netserver": {
+ "summary": "Python Internet Protocol servers",
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "html",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "shell",
+ "stringold",
+ "unixadmin"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/cgi.py",
+ "${libdir}/python${PYTHON_MAJMIN}/socketserver.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cgi.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socketserver.*.pyc"
+ ]
+ },
+ "numbers": {
+ "summary": "Python number APIs",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/_pydecimal.py",
+ "${libdir}/python${PYTHON_MAJMIN}/contextvars.py",
+ "${libdir}/python${PYTHON_MAJMIN}/decimal.py",
+ "${libdir}/python${PYTHON_MAJMIN}/fractions.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_contextvars.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_decimal.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/numbers.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pydecimal.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextvars.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/decimal.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fractions.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/numbers.*.pyc"
+ ]
+ },
+ "pickle": {
+ "summary": "Python serialisation/persistence support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/_compat_pickle.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_pickle.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/pickle.py",
+ "${libdir}/python${PYTHON_MAJMIN}/pickletools.py",
+ "${libdir}/python${PYTHON_MAJMIN}/shelve.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compat_pickle.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickle.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickletools.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shelve.*.pyc"
+ ]
+ },
+ "pkgutil": {
+ "summary": "Python package extension utility support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc"
+ ]
+ },
+ "plistlib": {
+ "summary": "Generate and parse Mac OS X .plist files",
+ "rdepends": [
+ "core",
+ "datetime",
+ "xml"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/plistlib.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/plistlib.*.pyc"
+ ]
+ },
+ "pprint": {
+ "summary": "Python pretty-print support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/pprint.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pprint.*.pyc"
+ ]
+ },
+ "profile": {
+ "summary": "Python basic performance profiling support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/cProfile.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lsprof.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/profile.py",
+ "${libdir}/python${PYTHON_MAJMIN}/pstats.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cProfile.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/profile.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc"
+ ]
+ },
+ "pydoc": {
+ "summary": "Python interactive help support",
+ "rdepends": [
+ "core",
+ "netclient",
+ "pkgutil"
+ ],
+ "files": [
+ "${bindir}/pydoc*",
+ "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
+ "${libdir}/python${PYTHON_MAJMIN}/pydoc_data"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc"
+ ]
+ },
+ "resource": {
+ "summary": "Python resource control interface",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/resource.*.so"
+ ],
+ "cached": []
+ },
+ "shell": {
+ "summary": "Python shell-like functionality",
+ "rdepends": [
+ "compression",
+ "core",
+ "stringold",
+ "unixadmin"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/cmd.py",
+ "${libdir}/python${PYTHON_MAJMIN}/fnmatch.py",
+ "${libdir}/python${PYTHON_MAJMIN}/glob.py",
+ "${libdir}/python${PYTHON_MAJMIN}/shlex.py",
+ "${libdir}/python${PYTHON_MAJMIN}/shutil.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fnmatch.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/glob.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shutil.*.pyc"
+ ]
+ },
+ "smtpd": {
+ "summary": "Python Simple Mail Transport Daemon",
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "stringold"
+ ],
+ "files": [
+ "${bindir}/smtpd.py",
+ "${libdir}/python${PYTHON_MAJMIN}/asynchat.py",
+ "${libdir}/python${PYTHON_MAJMIN}/asyncore.py",
+ "${libdir}/python${PYTHON_MAJMIN}/smtpd.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/asynchat.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/asyncore.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtpd.*.pyc"
+ ]
+ },
+ "sqlite3": {
+ "summary": "Python Sqlite3 database support",
+ "rdepends": [
+ "core",
+ "datetime"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sqlite3.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/sqlite3"
+ ],
+ "cached": []
+ },
+ "stringold": {
+ "summary": "Python string APIs [deprecated]",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/string.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/string.*.pyc"
+ ]
+ },
+ "syslog": {
+ "summary": "Python syslog interface",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/syslog.*.so"
+ ],
+ "cached": []
+ },
+ "terminal": {
+ "summary": "Python terminal controlling support",
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/pty.py",
+ "${libdir}/python${PYTHON_MAJMIN}/tty.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pty.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tty.*.pyc"
+ ]
+ },
+ "threading": {
+ "summary": "Python threading & synchronization support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/_dummy_thread.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_threading_local.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/queue.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_dummy_thread.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc"
+ ]
+ },
+ "tkinter": {
+ "summary": "Python Tcl/Tk bindings",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/tkinter"
+ ],
+ "cached": []
+ },
+ "typing": {
+ "summary": "Python typing support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/typing.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/typing.*.pyc"
+ ]
+ },
+ "unittest": {
+ "summary": "Python unit testing framework",
+ "rdepends": [
+ "core",
+ "difflib",
+ "logging",
+ "pprint",
+ "shell",
+ "stringold"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/unittest",
+ "${libdir}/python${PYTHON_MAJMIN}/unittest/",
+ "${libdir}/python${PYTHON_MAJMIN}/unittest/__pycache__"
+ ],
+ "cached": []
+ },
+ "unixadmin": {
+ "summary": "Python Unix administration support",
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/getpass.py",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/grp.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/nis.*.so"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc"
+ ]
+ },
+ "venv": {
+ "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.",
+ "rdepends": [
+ "compression",
+ "core",
+ "logging",
+ "shell",
+ "stringold",
+ "unixadmin"
+ ],
+ "files": [
+ "${bindir}/pyvenv*",
+ "${libdir}/python${PYTHON_MAJMIN}/venv"
+ ],
+ "cached": []
+ },
+ "xml": {
+ "summary": "Python basic XML support",
+ "rdepends": [
+ "core"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_elementtree.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/pyexpat.*.so",
+ "${libdir}/python${PYTHON_MAJMIN}/xml"
+ ],
+ "cached": []
+ },
+ "xmlrpc": {
+ "summary": "Python XML-RPC support",
+ "rdepends": [
+ "core",
+ "xml"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/xmlrpc",
+ "${libdir}/python${PYTHON_MAJMIN}/xmlrpc/__pycache__"
+ ],
+ "cached": []
+ }
+}
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
deleted file mode 100644
index 2bc8b8c460..0000000000
--- a/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 43238e1ac13e32984d015c92a5841f3de1fe1d15 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Tue, 18 Nov 2014 00:07:07 -0500
-Subject: [PATCH] setup.py: no host headers libs
-
-When we are cross-compiling, setup.py should never look in /usr
-or /usr/local to find headers or libraries.
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- setup.py | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index f020b28..e8339cd 100644
---- a/setup.py
-+++ b/setup.py
-@@ -444,10 +444,7 @@ class PyBuildExt(build_ext):
- if not cross_compiling:
- add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib))
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-- # only change this for cross builds for 3.3, issues on Mageia
-- if cross_compiling:
- 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
deleted file mode 100644
index 74490d93a5..0000000000
--- a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 53ed216d7bf70dd2a925432b6805a701e5fc3e0e Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Mon, 17 Nov 2014 06:44:47 +0000
-Subject: [PATCH] python3 use CROSSPYTHONPATH for PYTHON_FOR_BUILD
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-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_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/reformat_sysconfig.py b/meta/recipes-devtools/python/python3/reformat_sysconfig.py
new file mode 100644
index 0000000000..c4164313e8
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/reformat_sysconfig.py
@@ -0,0 +1,21 @@
+#! /usr/bin/env python3
+#
+# SPDX-License-Identifier: MIT
+#
+# Copyright 2019 by Garmin Ltd. or its subsidiaries
+#
+# A script to reformat python sysconfig
+
+import sys
+import pprint
+l = {}
+g = {}
+with open(sys.argv[1], 'r') as f:
+ exec(f.read(), g, l)
+
+with open(sys.argv[1], 'w') as f:
+ for k in sorted(l.keys()):
+ f.write('%s = ' % k)
+ pprint.pprint(l[k], stream=f, width=sys.maxsize)
+ f.write('\n')
+
diff --git a/meta/recipes-devtools/python/python3/run-ptest b/meta/recipes-devtools/python/python3/run-ptest
new file mode 100644
index 0000000000..3e45d3918c
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+python3 -m test -v | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
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
deleted file mode 100644
index fc2e12dfe5..0000000000
--- a/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-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/setup.py-find-libraries-in-staging-dirs.patch b/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
deleted file mode 100644
index f26bd38b02..0000000000
--- a/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Patch setup.py so that the detect_modules() function looks for required
-libraries and headers in STAGING_LIBDIR / STAGING_INCDIR.
-
-Without this patch, several extension modules are not built, even though
-their dependencies are present in the compiler's search paths.
-The result is the following warning, and ultimately incomplete packages:
-
-| The necessary bits to build these optional modules were not found:
-| _bz2 _curses_panel _dbm
-| _gdbm _lzma _sqlite3
-| nis readline zlib
-| To find the necessary bits, look in setup.py in detect_modules() for the module's name.
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
-
-Index: Python-3.4.3/setup.py
-===================================================================
---- Python-3.4.3.orig/setup.py
-+++ Python-3.4.3/setup.py
-@@ -521,6 +521,8 @@ class PyBuildExt(build_ext):
- else:
- lib_dirs = self.compiler.library_dirs[:]
- inc_dirs = self.compiler.include_dirs[:]
-+ lib_dirs.append(os.environ.get('STAGING_LIBDIR'))
-+ inc_dirs.append(os.environ.get('STAGING_INCDIR'))
- exts = []
- missing = []
-
diff --git a/meta/recipes-devtools/python/python3/setuptweaks.patch b/meta/recipes-devtools/python/python3/setuptweaks.patch
deleted file mode 100644
index 3a91b1916c..0000000000
--- a/meta/recipes-devtools/python/python3/setuptweaks.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-This patch removes various ways native system options can pass into the python
-compilation and somehow break C modules.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-RP 2012/04/23
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-23 20:03:47.295582553 +0000
-+++ Python-2.7.2/setup.py 2012-04-23 20:03:15.000000000 +0000
-@@ -231,7 +231,13 @@
- # compilers
- if compiler is not None:
- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
-- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
-+ # Need to filter out -isysroot from the flags. Ideally should
-+ # figure out target flags here.
-+ flags = []
-+ for f in cflags.split():
-+ if not f.startswith("-isystem"):
-+ flags.append(f)
-+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + ' '.join(flags)
- self.compiler.set_executables(**args)
-
- build_ext.build_extensions(self)
-@@ -393,7 +399,6 @@
- # into configure and stored in the Makefile (issue found on OS X 10.3).
- for env_var, arg_name, dir_list in (
- ('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 env_val:
-@@ -419,16 +424,16 @@
- for directory in reversed(options.dirs):
- add_dir_to_list(dir_list, directory)
-
-- if os.path.normpath(sys.prefix) != '/usr' \
-- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-+# if os.path.normpath(sys.prefix) != '/usr' \
-+# and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
- # (PYTHONFRAMEWORK is set) to avoid # linking problems when
- # building a framework with different architectures than
- # the one that is currently installed (issue #7473)
-- add_dir_to_list(self.compiler.library_dirs,
-- sysconfig.get_config_var("LIBDIR"))
-- add_dir_to_list(self.compiler.include_dirs,
-- sysconfig.get_config_var("INCLUDEDIR"))
-+# add_dir_to_list(self.compiler.library_dirs,
-+# sysconfig.get_config_var("LIBDIR"))
-+# add_dir_to_list(self.compiler.include_dirs,
-+# sysconfig.get_config_var("INCLUDEDIR"))
-
- try:
- have_unicode = unicode
diff --git a/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch b/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
deleted file mode 100644
index 802b1c7203..0000000000
--- a/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-shutils should consider symlinks
-
--Khem
-
-Upstream-Status: Pending
-
---- a/Lib/shutil.py 2013-01-29 12:31:06.926555779 -0800
-+++ b/Lib/shutil.py 2013-01-29 16:31:39.097554182 -0800
-@@ -132,7 +132,7 @@ def copymode(src, dst, *, follow_symlink
- st = stat_func(src)
- chmod_func(dst, stat.S_IMODE(st.st_mode))
-
--if hasattr(os, 'listxattr'):
-+if hasattr(os, 'listxattr') and os.listxattr in os.supports_follow_symlinks:
- def _copyxattr(src, dst, *, follow_symlinks=True):
- """Copy extended filesystem attributes from `src` to `dst`.
-
diff --git a/meta/recipes-devtools/python/python3/sitecustomize.py b/meta/recipes-devtools/python/python3/sitecustomize.py
deleted file mode 100644
index 4c8b5e2ba3..0000000000
--- a/meta/recipes-devtools/python/python3/sitecustomize.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# GPLv2 or later
-# Version: 20081123
-# Features:
-# * set proper default encoding
-# * enable readline completion in the interactive interpreter
-# * load command line history on startup
-# * save command line history on exit
-
-import os
-
-def __exithandler():
- try:
- readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
- except IOError:
- pass
-
-def __registerExitHandler():
- import atexit
- atexit.register( __exithandler )
-
-def __enableReadlineSupport():
- readline.set_history_length( 1000 )
- readline.parse_and_bind( "tab: complete" )
- try:
- readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
- except IOError:
- pass
-
-import sys
-try:
- import rlcompleter, readline
-except ImportError:
- pass
-else:
- __registerExitHandler()
- __enableReadlineSupport()
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
deleted file mode 100644
index de07643f2b..0000000000
--- a/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-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/sysroot-include-headers.patch b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch
deleted file mode 100644
index 785b5567f2..0000000000
--- a/meta/recipes-devtools/python/python3/sysroot-include-headers.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Dont search hardcoded paths, we might be doing a cross-build
-Use '=' in-front to let compiler append sysroot, if it can
-
-Should fix things like
-
-configure:6972: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -DNDEBUG -fno-inline -D__SOFTFP__ --sysroot=/build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone -c -O2 -pipe -g -feliminate-unused-debug-types -I/usr/include/ncursesw conftest.c >&5
-cc1: warning: include location "/usr/include/ncursesw" is unsafe for cross-compilation [-Wpoison-system-directories]
-
-
-Signed-off-by: Khem Raj
-Upstream-Status: Pending
-
-
-Index: Python-3.3.2/setup.py
-===================================================================
---- Python-3.3.2.orig/setup.py 2013-07-30 01:30:48.000000000 -0700
-+++ Python-3.3.2/setup.py 2013-07-30 01:41:11.697862723 -0700
-@@ -1210,7 +1210,7 @@
- panel_library = 'panel'
- if curses_library == 'ncursesw':
- curses_defines.append(('HAVE_NCURSESW', '1'))
-- curses_includes.append('/usr/include/ncursesw')
-+ curses_includes.append('=/usr/include/ncursesw')
- # Bug 1464056: If _curses.so links with ncursesw,
- # _curses_panel.so must link with panelw.
- panel_library = 'panelw'
-@@ -1819,7 +1819,7 @@
- if host_platform == 'darwin':
- # OS X 10.5 comes with libffi.dylib; the include files are
- # in /usr/include/ffi
-- inc_dirs.append('/usr/include/ffi')
-+ inc_dirs.append('=/usr/include/ffi')
-
- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
- if not ffi_inc or ffi_inc[0] == '':
diff --git a/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch b/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch
deleted file mode 100644
index 8d037278bd..0000000000
--- a/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 5d6509313198ec9b686cad50b002212e4344004b Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Fri, 11 Mar 2016 01:15:45 -0500
-Subject: [PATCH] configure.ac: tweak MULTIARCH for powerpc-linux-gnuspe
-
-For p1022ds bsp, the MULTIARCH is powerpc-linux-gnuspev1 and
-python3 did not recognize the extra 'v1' which caused python3
-configure error for the platform triplet.
-
-Q:Why Python3 check platform triplet?
-
-A:Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include
-the architecture triplet in the extension name, to make it easy to
-test builds for different ABIs in the same working tree.
-
-Here is the generated C extensions which take platform triplet into account.
-...
-|image/usr/lib/python3.5/lib-dynload/_datetime.cpython-35m-powerpc-linux-gnuspe.so
-...
-
-https://bugs.python.org/issue22980
-https://www.python.org/dev/peps/pep-3149/
-https://bugs.python.org/review/22980/patch/14593/54808
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- configure.ac | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 9eb3d22..c34a9a0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -724,6 +724,13 @@ fi
-
-
- MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-+
-+# Tweak MULTIARCH
-+if test x$MULTIARCH = xpowerpc-linux-gnuspev1
-+then
-+ MULTIARCH="powerpc-linux-gnuspe"
-+fi
-+
- AC_SUBST(MULTIARCH)
-
- AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
---
-1.9.1
-
diff --git a/meta/recipes-devtools/python/python3/unixccompiler.patch b/meta/recipes-devtools/python/python3/unixccompiler.patch
deleted file mode 100644
index 3e2b1d1c2e..0000000000
--- a/meta/recipes-devtools/python/python3/unixccompiler.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Pending
-
-The CC variable,sometimes like:"x86_64-poky-linux-gcc -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information.
-This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name.
-
-Secondly add -L=<path> this way linker will be able to resolve /usr/lib w.r.t sysroot and not
-use hardcoded /usr/lib to look for libs which is wrong in cross compile environment and this will work
-ok on native systems too since sysroot for native compilers is /
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: Python-3.3.2/Lib/distutils/unixccompiler.py
-===================================================================
---- Python-3.3.2.orig/Lib/distutils/unixccompiler.py 2013-05-15 09:32:54.000000000 -0700
-+++ Python-3.3.2/Lib/distutils/unixccompiler.py 2013-08-01 00:58:18.629056286 -0700
-@@ -202,7 +202,9 @@
- # ccompiler.py.
-
- def library_dir_option(self, dir):
-- return "-L" + dir
-+ if dir.startswith("/"):
-+ return "-L=" + dir
-+ return "-L" + dir
-
- def _is_gcc(self, compiler_name):
- return "gcc" in compiler_name or "g++" in compiler_name
-@@ -221,7 +221,7 @@
- # this time, there's no way to determine this information from
- # the configuration data stored in the Python installation, so
- # we use this hack.
-- compiler = os.path.basename(sysconfig.get_config_var("CC"))
-+ compiler = sysconfig.get_config_var("CC")
- if sys.platform[:6] == "darwin":
- # MacOSX's linker doesn't understand the -R flag at all
- return "-L" + dir
diff --git a/meta/recipes-devtools/python/python3/use_packed_importlib.patch b/meta/recipes-devtools/python/python3/use_packed_importlib.patch
deleted file mode 100644
index 70708a0adc..0000000000
--- a/meta/recipes-devtools/python/python3/use_packed_importlib.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Upstream-Status: Inappropriate [embedded specific]
-
-The binary _freeze_importlib is built and also used during build time to generate
-importlib*.h files, this is impossible to do on a cross-compile environment,
-this avoids executing the binary and forces it to use the packed importlib*.h files.
-
-
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: Python-3.5.0/Makefile.pre.in
-===================================================================
---- Python-3.5.0.orig/Makefile.pre.in
-+++ Python-3.5.0/Makefile.pre.in
-@@ -700,12 +700,12 @@ Programs/_freeze_importlib.o: Programs/_
- Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
- $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-
--Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
-- ./Programs/_freeze_importlib \
-+#Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
-+# ./Programs/_freeze_importlib \
- $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
-
--Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
-- ./Programs/_freeze_importlib \
-+#Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
-+# ./Programs/_freeze_importlib \
- $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
-
-
diff --git a/meta/recipes-devtools/python/python3_3.5.2.bb b/meta/recipes-devtools/python/python3_3.5.2.bb
deleted file mode 100644
index e6cbb9c56d..0000000000
--- a/meta/recipes-devtools/python/python3_3.5.2.bb
+++ /dev/null
@@ -1,224 +0,0 @@
-require recipes-devtools/python/python.inc
-
-DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.5"
-PYTHON_BINABI= "${PYTHON_MAJMIN}m"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://python-config.patch \
-file://000-cross-compile.patch \
-file://020-dont-compile-python-files.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
-${DISTRO_SRC_URI} \
-"
-
-SRC_URI += "\
- file://03-fix-tkinter-detection.patch \
- file://avoid_warning_about_tkinter.patch \
- file://cgi_py.patch \
- file://host_include_contamination.patch \
- file://python-3.3-multilib.patch \
- file://shutil-follow-symlink-fix.patch \
- file://sysroot-include-headers.patch \
- file://unixccompiler.patch \
- 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 \
- file://setup.py-find-libraries-in-staging-dirs.patch \
- file://configure.ac-fix-LIBPL.patch \
- file://python3-fix-CVE-2016-1000110.patch \
- "
-SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e"
-SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
-
-# exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python3native pkgconfig
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
- ac_cv_have_lchflags=no \
- ac_cv_have_long_long_format=yes \
- ac_cv_buggy_getaddrinfo=no \
- ac_cv_file__dev_ptmx=yes \
- ac_cv_file__dev_ptc=no \
-"
-
-TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
-SDK_CC_ARCH += "-DNDEBUG -fno-inline"
-EXTRA_OEMAKE += "CROSS_COMPILE=yes"
-EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
-
-export CROSS_COMPILE = "${TARGET_PREFIX}"
-export _PYTHON_PROJECT_BASE = "${B}"
-export _PYTHON_PROJECT_SRC = "${S}"
-export CCSHARED = "-fPIC"
-
-# Fix cross compilation of different modules
-export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
- rm -f ${S}/Makefile.orig
- 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 ${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 \
- ${STAGING_INCDIR}/linux/cdrom.h \
- ${STAGING_INCDIR}/netinet/in.h \
- ${STAGING_INCDIR}/sys/types.h
- sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
- cd -
-
-
- # remove any bogus LD_LIBRARY_PATH
- sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
- if [ ! -f Makefile.orig ]; then
- install -m 0644 Makefile Makefile.orig
- fi
- sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
- -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
- -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
- -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
- -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
- -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
- -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
- Makefile
- # save copy of it now, because if we do it in do_install and
- # then call do_install twice we get Makefile.orig == Makefile.sysroot
- install -m 0644 Makefile Makefile.sysroot
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- OPT="${CFLAGS}" libpython3.so
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- OPT="${CFLAGS}"
-}
-
-do_install() {
- # make install needs the original Makefile, or otherwise the inclues would
- # go to ${D}${STAGING...}/...
- install -m 0644 Makefile.orig Makefile
-
- install -d ${D}${libdir}/pkgconfig
- install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
-
- # rerun the build once again with original makefile this time
- # run install in a separate step to avoid compile/install race
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- DESTDIR=${D} LIBDIR=${libdir}
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- DESTDIR=${D} LIBDIR=${libdir} install
-
- # avoid conflict with 2to3 from Python 2
- rm -f ${D}/${bindir}/2to3
-
- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
-
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
-
- oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
-}
-
-do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
- # copy back the old Makefile to fix target package
- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
- # Remove references to buildmachine paths in target Makefile and _sysconfigdata
- sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-crypt = "openssl"
-RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
-
-FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
-FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
-
-PACKAGES =+ "${PN}-pyvenv"
-FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
-
-# package libpython3
-PACKAGES =+ "libpython3 libpython3-staticdev"
-FILES_libpython3 = "${libdir}/libpython*.so.*"
-FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
-INSANE_SKIP_${PN}-dev += "dev-elf"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs ${PN}-textutils ${PN}-argparse"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python3_3.7.5.bb b/meta/recipes-devtools/python/python3_3.7.5.bb
new file mode 100644
index 0000000000..57eaaea5e7
--- /dev/null
+++ b/meta/recipes-devtools/python/python3_3.7.5.bb
@@ -0,0 +1,343 @@
+SUMMARY = "The Python Programming Language"
+HOMEPAGE = "http://www.python.org"
+LICENSE = "PSFv2"
+SECTION = "devel/python"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
+
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+ file://run-ptest \
+ file://create_manifest3.py \
+ file://get_module_deps3.py \
+ file://python3-manifest.json \
+ file://check_build_completeness.py \
+ file://cgi_py.patch \
+ file://0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch \
+ ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
+ file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
+ file://python-config.patch \
+ file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \
+ file://0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch \
+ file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \
+ file://0002-Don-t-do-runtime-test-to-get-float-byte-order.patch \
+ file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
+ file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \
+ file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
+ file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
+ file://crosspythonpath.patch \
+ file://reformat_sysconfig.py \
+ file://0001-Use-FLAG_REF-always-for-interned-strings.patch \
+ file://0001-test_locale.py-correct-the-test-output-format.patch \
+ file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \
+ "
+
+SRC_URI_append_class-native = " \
+ file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \
+ file://12-distutils-prefix-is-inside-staging-area.patch \
+ "
+SRC_URI_append_class-nativesdk = " \
+ file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \
+ "
+
+SRC_URI[md5sum] = "08ed8030b1183107c48f2092e79a87e2"
+SRC_URI[sha256sum] = "e85a76ea9f3d6c485ec1780fca4e500725a4a7bbc63c78ebc44170de9b619d94"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+CVE_PRODUCT = "python"
+
+PYTHON_MAJMIN = "3.7"
+PYTHON_BINABI = "${PYTHON_MAJMIN}m"
+
+S = "${WORKDIR}/Python-${PV}"
+
+BBCLASSEXTEND = "native nativesdk"
+
+inherit autotools pkgconfig qemu ptest multilib_header update-alternatives
+
+MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
+
+ALTERNATIVE_${PN}-dev = "python3-config"
+ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_BINABI}-config"
+ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}"
+
+
+DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2"
+DEPENDS_append_class-target = " python3-native"
+DEPENDS_append_class-nativesdk = " python3-native"
+
+EXTRA_OECONF = " --without-ensurepip --enable-shared"
+EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}"
+
+export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
+
+EXTRANATIVEPATH += "python3-native"
+
+CACHED_CONFIGUREVARS = " \
+ ac_cv_file__dev_ptmx=yes \
+ ac_cv_file__dev_ptc=no \
+ ac_cv_working_tzset=yes \
+"
+python() {
+ # PGO currently causes builds to not be reproducible, so disable it for
+ # now. See YOCTO #13407
+ if bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d) and d.getVar('BUILD_REPRODUCIBLE_BINARIES') != '1':
+ d.setVar('PACKAGECONFIG_PGO', 'pgo')
+ else:
+ d.setVar('PACKAGECONFIG_PGO', '')
+}
+
+PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO} gdbm"
+PACKAGECONFIG_class-native ??= "readline gdbm"
+PACKAGECONFIG_class-nativesdk ??= "readline gdbm"
+PACKAGECONFIG[readline] = ",,readline"
+# Use profile guided optimisation by running PyBench inside qemu-user
+PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
+PACKAGECONFIG[tk] = ",,tk"
+PACKAGECONFIG[gdbm] = ",,gdbm"
+
+do_configure_prepend () {
+ mkdir -p ${B}/Modules
+ cat > ${B}/Modules/Setup.local << EOF
+*disabled*
+${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)}
+${@bb.utils.contains('PACKAGECONFIG', 'readline', '', 'readline', d)}
+EOF
+}
+
+CPPFLAGS_append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid"
+
+EXTRA_OEMAKE = '\
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ LIB=${baselib} \
+'
+
+do_compile_prepend_class-target() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then
+ qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}"
+ cat >pgo-wrapper <<EOF
+#!/bin/sh
+cd ${B}
+$qemu_binary "\$@"
+EOF
+ chmod +x pgo-wrapper
+ fi
+}
+
+do_install_prepend() {
+ ${WORKDIR}/check_build_completeness.py ${T}/log.do_compile
+}
+
+do_install_append_class-target() {
+ oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
+}
+
+do_install_append_class-native() {
+ # Make sure we use /usr/bin/env python
+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
+ done
+ # Add a symlink to the native Python so that scripts can just invoke
+ # "nativepython" and get the right one without needing absolute paths
+ # (these often end up too long for the #! parser in the kernel as the
+ # buffer is 128 bytes long).
+ ln -s python3-native/python3 ${D}${bindir}/nativepython3
+}
+
+do_install_append() {
+ mkdir -p ${D}${libdir}/python-sysconfigdata
+ sysconfigfile=`find ${D} -name _sysconfig*.py`
+ cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
+
+ sed -i \
+ -e "s,^ 'LIBDIR'.*, 'LIBDIR': '${STAGING_LIBDIR}'\,,g" \
+ -e "s,^ 'INCLUDEDIR'.*, 'INCLUDEDIR': '${STAGING_INCDIR}'\,,g" \
+ -e "s,^ 'CONFINCLUDEDIR'.*, 'CONFINCLUDEDIR': '${STAGING_INCDIR}'\,,g" \
+ -e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \
+ -e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \
+ ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
+}
+
+do_install_append_class-nativesdk () {
+ create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} OEPYTHON3HOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
+}
+
+SSTATE_SCAN_FILES += "Makefile _sysconfigdata.py"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+ # Remove references to buildmachine paths in target Makefile and _sysconfigdata
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${PKGD}/${prefix}/lib/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py \
+ ${PKGD}/${bindir}/python${PYTHON_BINABI}-config
+
+ # Reformat _sysconfigdata after modifying it so that it remains
+ # reproducible
+ for c in ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py; do
+ python3 ${WORKDIR}/reformat_sysconfig.py $c
+ done
+
+ # Recompile _sysconfigdata after modifying it
+ cd ${PKGD}
+ sysconfigfile=`find . -name _sysconfigdata_*.py`
+ ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ -c "from py_compile import compile; compile('$sysconfigfile')"
+ ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ -c "from py_compile import compile; compile('$sysconfigfile', optimize=1)"
+ ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ -c "from py_compile import compile; compile('$sysconfigfile', optimize=2)"
+ cd -
+
+ mv ${PKGD}/${bindir}/python${PYTHON_BINABI}-config ${PKGD}/${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}
+
+ #Remove the unneeded copy of target sysconfig data
+ rm -rf ${PKGD}/${libdir}/python-sysconfigdata
+}
+
+# We want bytecode precompiled .py files (.pyc's) by default
+# but the user may set it on their own conf
+INCLUDE_PYCS ?= "1"
+
+python(){
+ import collections, json
+
+ filename = os.path.join(d.getVar('THISDIR'), 'python3', 'python3-manifest.json')
+ # This python changes the datastore based on the contents of a file, so mark
+ # that dependency.
+ bb.parse.mark_dependency(d, filename)
+
+ with open(filename) as manifest_file:
+ manifest_str = manifest_file.read()
+ json_start = manifest_str.find('# EOC') + 6
+ manifest_file.seek(json_start)
+ manifest_str = manifest_file.read()
+ python_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
+
+ # First set RPROVIDES for -native case
+ # Hardcoded since it cant be python3-native-foo, should be python3-foo-native
+ pn = 'python3'
+ rprovides = d.getVar('RPROVIDES').split()
+
+ # ${PN}-misc-native is not in the manifest
+ rprovides.append(pn + '-misc-native')
+
+ for key in python_manifest:
+ pypackage = pn + '-' + key + '-native'
+ if pypackage not in rprovides:
+ rprovides.append(pypackage)
+
+ d.setVar('RPROVIDES_class-native', ' '.join(rprovides))
+
+ # Then work on the target
+ include_pycs = d.getVar('INCLUDE_PYCS')
+
+ packages = d.getVar('PACKAGES').split()
+ pn = d.getVar('PN')
+
+ newpackages=[]
+ for key in python_manifest:
+ pypackage = pn + '-' + key
+
+ if pypackage not in packages:
+ # We need to prepend, otherwise python-misc gets everything
+ # so we use a new variable
+ newpackages.append(pypackage)
+
+ # "Build" python's manifest FILES, RDEPENDS and SUMMARY
+ d.setVar('FILES_' + pypackage, '')
+ for value in python_manifest[key]['files']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+
+ # Add cached files
+ if include_pycs == '1':
+ for value in python_manifest[key]['cached']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+
+ for value in python_manifest[key]['rdepends']:
+ # Make it work with or without $PN
+ if '${PN}' in value:
+ value=value.split('-', 1)[1]
+ d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+
+ for value in python_manifest[key].get('rrecommends', ()):
+ if '${PN}' in value:
+ value=value.split('-', 1)[1]
+ d.appendVar('RRECOMMENDS_' + pypackage, ' ' + pn + '-' + value)
+
+ d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
+
+ # Prepending so to avoid python-misc getting everything
+ packages = newpackages + packages
+ d.setVar('PACKAGES', ' '.join(packages))
+ d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+}
+
+# Files needed to create a new manifest
+
+do_create_manifest() {
+ # This task should be run with every new release of Python.
+ # We must ensure that PACKAGECONFIG enables everything when creating
+ # a new manifest, this is to base our new manifest on a complete
+ # native python build, containing all dependencies, otherwise the task
+ # wont be able to find the required files.
+ # e.g. BerkeleyDB is an optional build dependency so it may or may not
+ # be present, we must ensure it is.
+
+ cd ${WORKDIR}
+ # This needs to be executed by python-native and NOT by HOST's python
+ nativepython3 create_manifest3.py ${PYTHON_MAJMIN}
+ cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json
+}
+
+# bitbake python -c create_manifest
+addtask do_create_manifest
+
+# Make sure we have native python ready when we create a new manifest
+do_create_manifest[depends] += "${PN}:do_prepare_recipe_sysroot"
+do_create_manifest[depends] += "${PN}:do_patch"
+
+# manual dependency additions
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules"
+RRECOMMENDS_${PN}-crypt_append_class-target = " openssl ca-certificates"
+RRECOMMENDS_${PN}-crypt_append_class-nativesdk = " openssl ca-certificates"
+
+# For historical reasons PN is empty and provided by python3-modules
+FILES_${PN} = ""
+RPROVIDES_${PN}-modules = "${PN}"
+
+FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
+FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
+
+# provide python-pyvenv from python3-venv
+RPROVIDES_${PN}-venv += "python3-pyvenv"
+
+# package libpython3
+PACKAGES =+ "libpython3 libpython3-staticdev"
+FILES_libpython3 = "${libdir}/libpython*.so.*"
+FILES_libpython3-staticdev += "${prefix}/lib/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-*/libpython${PYTHON_BINABI}.a"
+INSANE_SKIP_${PN}-dev += "dev-elf"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-modules_append_class-target = " python3-misc"
+RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9"
+RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
+RDEPENDS_${PN}-dev = ""
+
diff --git a/meta/recipes-devtools/python/python_2.7.12.bb b/meta/recipes-devtools/python/python_2.7.12.bb
deleted file mode 100644
index 9fe35db2de..0000000000
--- a/meta/recipes-devtools/python/python_2.7.12.bb
+++ /dev/null
@@ -1,171 +0,0 @@
-require python.inc
-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://06-avoid_usr_lib_termcap_path_in_linking.patch \
- ${DISTRO_SRC_URI} \
- file://multilib.patch \
- file://cgi_py.patch \
- file://setup_py_skip_cross_import_check.patch \
- file://add-md5module-support.patch \
- file://host_include_contamination.patch \
- file://fix_for_using_different_libdir.patch \
- file://setuptweaks.patch \
- file://check-if-target-is-64b-not-host.patch \
- 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-remove-bsdb-rpath.patch \
- file://fix-makefile-for-ptest.patch \
- file://run-ptest \
- file://parallel-makeinst-create-bindir.patch \
- file://use_sysroot_ncurses_instead_of_host.patch \
- file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
- file://python-fix-CVE-2016-1000110.patch \
-"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python-dir pythonnative
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
-
-do_configure_append() {
- rm -f ${S}/Makefile.orig
- 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 ${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 \
- ${STAGING_INCDIR}/linux/cdrom.h \
- ${STAGING_INCDIR}/netinet/in.h \
- ${STAGING_INCDIR}/sys/types.h
- sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
- cd -
-
- # remove any bogus LD_LIBRARY_PATH
- sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
- if [ ! -f Makefile.orig ]; then
- install -m 0644 Makefile Makefile.orig
- fi
- sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
- -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
- -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
- -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
- -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
- -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
- -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
- Makefile
- # save copy of it now, because if we do it in do_install and
- # then call do_install twice we get Makefile.orig == Makefile.sysroot
- install -m 0644 Makefile Makefile.sysroot
-
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${B}"
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- OPT="${CFLAGS}"
-}
-
-do_install() {
- # make install needs the original Makefile, or otherwise the inclues would
- # go to ${D}${STAGING...}/...
- install -m 0644 Makefile.orig Makefile
-
- export CROSS_COMPILE="${TARGET_PREFIX}"
- 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
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- DESTDIR=${D} LIBDIR=${libdir}
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- DESTDIR=${D} LIBDIR=${libdir} install
-
- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
-
- oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
-}
-
-do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
- # copy back the old Makefile to fix target package
- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
- # Remove references to buildmachine paths in target Makefile and _sysconfigdata
- sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
- python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
-RRECOMMENDS_${PN}-crypt = "openssl"
-
-# package libpython2
-PACKAGES =+ "lib${BPN}2"
-FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-RDEPENDS_${PN}-ptest = "${PN}-modules"
-#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
-
-# This must come after inherit ptest for the override to take effect
-do_install_ptest() {
- cp ${B}/Makefile ${D}${PTEST_PATH}
- sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
- -e s:LIBDIR:${libdir}:g \
- -i ${D}${PTEST_PATH}/run-ptest
-}
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.17.bb
new file mode 100644
index 0000000000..be7c6d2d2b
--- /dev/null
+++ b/meta/recipes-devtools/python/python_2.7.17.bb
@@ -0,0 +1,260 @@
+require python.inc
+
+DEPENDS = "libffi bzip2 gdbm openssl \
+ readline sqlite3 zlib virtual/crypt"
+
+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://06-avoid_usr_lib_termcap_path_in_linking.patch \
+ ${DISTRO_SRC_URI} \
+ file://multilib.patch \
+ file://cgi_py.patch \
+ file://setup_py_skip_cross_import_check.patch \
+ file://add-md5module-support.patch \
+ file://host_include_contamination.patch \
+ file://fix_for_using_different_libdir.patch \
+ file://setuptweaks.patch \
+ file://check-if-target-is-64b-not-host.patch \
+ file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
+ ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
+ file://avoid_warning_for_sunos_specific_module.patch \
+ file://python-2.7.3-remove-bsdb-rpath.patch \
+ file://run-ptest \
+ file://parallel-makeinst-create-bindir.patch \
+ file://use_sysroot_ncurses_instead_of_host.patch \
+ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+ file://pass-missing-libraries-to-Extension-for-mul.patch \
+ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
+ file://float-endian.patch \
+ file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \
+"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python-dir pythonnative ptest
+
+EXTRA_OECONF += "--with-system-ffi"
+
+CACHED_CONFIGUREVARS = "ac_cv_file__dev_ptmx=yes \
+ ac_cv_file__dev_ptc=no \
+ ac_cv_working_tzset=yes"
+
+PACKAGECONFIG ??= "bdb"
+PACKAGECONFIG[bdb] = ",,db"
+PACKAGECONFIG[tk] = ",,tk"
+
+# pgen isn't needed in the current build, but use the binary from python-native just in case.
+EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ "
+
+do_configure_append() {
+ rm -f ${S}/Makefile.orig
+ 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 ${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 \
+ ${STAGING_INCDIR}/linux/cdrom.h \
+ ${STAGING_INCDIR}/netinet/in.h \
+ ${STAGING_INCDIR}/sys/types.h
+ sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+ cd -
+
+ # remove any bogus LD_LIBRARY_PATH
+ sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+ if [ ! -f Makefile.orig ]; then
+ install -m 0644 Makefile Makefile.orig
+ fi
+ sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
+ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+ Makefile
+ # save copy of it now, because if we do it in do_install and
+ # then call do_install twice we get Makefile.orig == Makefile.sysroot
+ install -m 0644 Makefile Makefile.sysroot
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+ export PYTHONBUILDDIR="${B}"
+
+ oe_runmake OPT="${CFLAGS}"
+}
+
+do_install() {
+ # make install needs the original Makefile, or otherwise the inclues would
+ # go to ${D}${STAGING...}/...
+ install -m 0644 Makefile.orig Makefile
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+ 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
+ oe_runmake DESTDIR=${D} LIBDIR=${libdir}
+
+ oe_runmake DESTDIR=${D} LIBDIR=${libdir} install
+
+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+
+ oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+
+ if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
+ rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
+ fi
+
+ # Python 3.x version of 2to3 is now the default
+ mv ${D}/${bindir}/2to3 ${D}/${bindir}/2to3-${PYTHON_MAJMIN}
+}
+
+do_install_append_class-nativesdk () {
+ create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+ # copy back the old Makefile to fix target package
+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+ # Remove references to buildmachine paths in target Makefile and _sysconfigdata
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+ (cd ${PKGD}; python -m py_compile ./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py)
+}
+
+PACKAGES_remove = "${PN}"
+
+# manual dependency additions
+RPROVIDES_${PN}-modules = "${PN}"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
+RRECOMMENDS_${PN}-crypt = "openssl"
+
+# package libpython2
+PACKAGES =+ "lib${BPN}2"
+FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+
+# ptest
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip tzdata-europe coreutils sed"
+RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+# Nasty but if bdb isn't enabled the package won't be generated
+RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
+
+RDEPENDS_${PN}-dev = ""
+
+BBCLASSEXTEND = "nativesdk"
+
+# We want bytecode precompiled .py files (.pyc's) by default
+# but the user may set it on their own conf
+
+INCLUDE_PYCS ?= "1"
+
+python(){
+ import collections, json
+
+ filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json')
+ # This python changes the datastore based on the contents of a file, so mark
+ # that dependency.
+ bb.parse.mark_dependency(d, filename)
+
+ with open(filename) as manifest_file:
+ manifest_str = manifest_file.read()
+ json_start = manifest_str.find('# EOC') + 6
+ manifest_file.seek(json_start)
+ manifest_str = manifest_file.read()
+ python_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
+
+ include_pycs = d.getVar('INCLUDE_PYCS')
+
+ packages = d.getVar('PACKAGES').split()
+ pn = d.getVar('PN')
+
+ newpackages=[]
+
+ for key in python_manifest:
+ pypackage= pn + '-' + key
+
+ if pypackage not in packages:
+ # We need to prepend, otherwise python-misc gets everything
+ # so we use a new variable
+ newpackages.append(pypackage)
+
+ # "Build" python's manifest FILES, RDEPENDS and SUMMARY
+ d.setVar('FILES_' + pypackage, '')
+ for value in python_manifest[key]['files']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+ if include_pycs == '1':
+ if value.endswith('.py'):
+ d.appendVar('FILES_' + pypackage, ' ' + value + '?')
+
+ for value in python_manifest[key]['rdepends']:
+ # Make it work with or without $PN
+ if '${PN}' in value:
+ value=value.split('-')[1]
+ d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+ d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
+
+ # Prepending so to avoid python-misc getting everything
+ packages = newpackages + packages
+ d.setVar('PACKAGES', ' '.join(packages))
+ d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+}
+
+# Files needed to create a new manifest
+SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json"
+
+do_create_manifest() {
+ # This task should be run with every new release of Python.
+ # We must ensure that PACKAGECONFIG enables everything when creating
+ # a new manifest, this is to base our new manifest on a complete
+ # native python build, containing all dependencies, otherwise the task
+ # wont be able to find the required files.
+ # e.g. BerkeleyDB is an optional build dependency so it may or may not
+ # be present, we must ensure it is.
+
+ cd ${WORKDIR}
+ # This needs to be executed by python-native and NOT by HOST's python
+ nativepython create_manifest2.py
+ cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json
+}
+
+# bitbake python -c create_manifest
+addtask do_create_manifest
+
+# Make sure we have native python ready when we create a new manifest
+do_create_manifest[depends] += "python:do_prepare_recipe_sysroot"
+do_create_manifest[depends] += "python:do_patch"
diff --git a/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb b/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
index 943ca5f89d..ca1ad964dc 100644
--- a/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
+++ b/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
@@ -1,13 +1,13 @@
SUMMARY = "Qemu helper scripts"
LICENSE = "GPLv2"
-RDEPENDS_${PN} = "nativesdk-qemu nativesdk-python3-subprocess \
- nativesdk-python3-shell nativesdk-python3-fcntl \
+RDEPENDS_${PN} = "nativesdk-qemu \
+ nativesdk-python3-shell nativesdk-python3-fcntl nativesdk-python3-logging \
"
PR = "r9"
LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999 \
- file://${COREBASE}/scripts/runqemu;endline=19;md5=a8ad1905c709a2deaa057608ebaf705a"
+ file://${COREBASE}/scripts/runqemu;beginline=5;endline=10;md5=ac2b489a58739c7628a2604698db5e7f"
SRC_URI = "file://${COREBASE}/scripts/runqemu \
diff --git a/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
index 8d27c4db61..372eebd886 100644
--- a/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
@@ -1,6 +1,6 @@
SUMMARY = "Helper utilities needed by the runqemu script"
LICENSE = "GPLv2"
-RDEPENDS_${PN} = "qemu-native"
+RDEPENDS_${PN} = "qemu-system-native"
PR = "r1"
LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999"
@@ -12,10 +12,13 @@ S = "${WORKDIR}"
inherit native
do_compile() {
- ${CC} tunctl.c -o tunctl
+ ${CC} ${CFLAGS} ${LDFLAGS} -Wall tunctl.c -o tunctl
}
do_install() {
install -d ${D}${bindir}
install tunctl ${D}${bindir}/
}
+
+DEPENDS += "qemu-system-native"
+addtask addto_recipe_sysroot after do_populate_sysroot before do_build
diff --git a/meta/recipes-devtools/qemu/qemu-helper/tunctl.c b/meta/recipes-devtools/qemu/qemu-helper/tunctl.c
index 16e24a2add..d745dd06cb 100644
--- a/meta/recipes-devtools/qemu/qemu-helper/tunctl.c
+++ b/meta/recipes-devtools/qemu/qemu-helper/tunctl.c
@@ -19,7 +19,7 @@
#define TUNSETGROUP _IOW('T', 206, int)
#endif
-static void Usage(char *name)
+static void Usage(char *name, int status)
{
fprintf(stderr, "Create: %s [-b] [-u owner] [-g group] [-t device-name] "
"[-f tun-clone-device]\n", name);
@@ -28,7 +28,7 @@ static void Usage(char *name)
fprintf(stderr, "The default tun clone device is /dev/net/tun - some systems"
" use\n/dev/misc/net/tun instead\n\n");
fprintf(stderr, "-b will result in brief output (just the device name)\n");
- exit(1);
+ exit(status);
}
int main(int argc, char **argv)
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
int tap_fd, opt, delete = 0, brief = 0;
char *tun = "", *file = "/dev/net/tun", *name = argv[0], *end;
- while((opt = getopt(argc, argv, "bd:f:t:u:g:")) > 0){
+ while((opt = getopt(argc, argv, "bd:f:t:u:g:h")) > 0){
switch(opt) {
case 'b':
brief = 1;
@@ -63,7 +63,7 @@ int main(int argc, char **argv)
if(*end != '\0'){
fprintf(stderr, "'%s' is neither a username nor a numeric uid.\n",
optarg);
- Usage(name);
+ Usage(name, 1);
}
break;
case 'g':
@@ -76,7 +76,7 @@ int main(int argc, char **argv)
if(*end != '\0'){
fprintf(stderr, "'%s' is neither a groupname nor a numeric group.\n",
optarg);
- Usage(name);
+ Usage(name, 1);
}
break;
@@ -84,8 +84,10 @@ int main(int argc, char **argv)
tun = optarg;
break;
case 'h':
+ Usage(name, 0);
+ break;
default:
- Usage(name);
+ Usage(name, 1);
}
}
@@ -93,7 +95,7 @@ int main(int argc, char **argv)
argc -= optind;
if(argc > 0)
- Usage(name);
+ Usage(name, 1);
if((tap_fd = open(file, O_RDWR)) < 0){
fprintf(stderr, "Failed to open '%s' : ", file);
diff --git a/meta/recipes-devtools/qemu/qemu-native.inc b/meta/recipes-devtools/qemu/qemu-native.inc
new file mode 100644
index 0000000000..69c2c43e6b
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-native.inc
@@ -0,0 +1,16 @@
+inherit native
+
+require qemu.inc
+
+SRC_URI_append = " \
+ file://0010-fix-libcap-header-issue-on-some-distro.patch \
+ file://0011-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \
+ "
+
+EXTRA_OEMAKE_append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
+
+LDFLAGS_append = " -fuse-ld=bfd"
+
+do_install_append() {
+ ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
+}
diff --git a/meta/recipes-devtools/qemu/qemu-native_4.1.0.bb b/meta/recipes-devtools/qemu/qemu-native_4.1.0.bb
new file mode 100644
index 0000000000..c8acff8e19
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-native_4.1.0.bb
@@ -0,0 +1,9 @@
+BPN = "qemu"
+
+DEPENDS = "glib-2.0-native zlib-native"
+
+require qemu-native.inc
+
+EXTRA_OECONF_append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent"
+
+PACKAGECONFIG ??= ""
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_4.1.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_4.1.0.bb
new file mode 100644
index 0000000000..d83ee59375
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-system-native_4.1.0.bb
@@ -0,0 +1,24 @@
+BPN = "qemu"
+
+require qemu-native.inc
+
+# As some of the files installed by qemu-native and qemu-system-native
+# are the same, we depend on qemu-native to get the full installation set
+# and avoid file clashes
+DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native"
+
+EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
+
+PACKAGECONFIG ??= "fdt alsa kvm"
+
+# Handle distros such as CentOS 5 32-bit that do not have kvm support
+PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
+
+do_install_append() {
+ install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
+
+ # The following is also installed by qemu-native
+ rm -f ${D}${datadir}/qemu/trace-events-all
+ rm -rf ${D}${datadir}/qemu/keymaps
+ rm -rf ${D}${datadir}/icons/
+}
diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc
index a3e46a894e..8184ef5781 100644
--- a/meta/recipes-devtools/qemu/qemu-targets.inc
+++ b/meta/recipes-devtools/qemu/qemu-targets.inc
@@ -1,18 +1,19 @@
-# possible arch values are arm aarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64abi32
-# ppcemb armeb alpha sparc32plus i386 x86_64 cris m68k microblaze sparc sparc32
-# sparc32plus
+# possible arch values are:
+# aarch64 arm armeb alpha cris i386 x86_64 m68k microblaze
+# mips mipsel mips64 mips64el ppc ppc64 ppc64abi32 ppcemb
+# riscv32 riscv64 sparc sparc32 sparc32plus
def get_qemu_target_list(d):
import bb
- archs = d.getVar('QEMU_TARGETS', True).split()
- tos = d.getVar('HOST_OS', True)
+ archs = d.getVar('QEMU_TARGETS').split()
+ tos = d.getVar('HOST_OS')
softmmuonly = ""
- for arch in ['ppcemb']:
+ for arch in ['ppcemb', 'lm32']:
if arch in archs:
softmmuonly += arch + "-softmmu,"
archs.remove(arch)
linuxuseronly = ""
- for arch in ['armeb', 'alpha', 'ppc64abi32', 'sparc32plus']:
+ for arch in ['armeb', 'alpha', 'ppc64abi32', 'sparc32plus', 'aarch64_be']:
if arch in archs:
linuxuseronly += arch + "-linux-user,"
archs.remove(arch)
@@ -20,3 +21,8 @@ def get_qemu_target_list(d):
return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+def get_qemu_usermode_target_list(d):
+ return ",".join(filter(lambda i: "-linux-user" in i, get_qemu_target_list(d).split(',')))
+
+def get_qemu_system_target_list(d):
+ return ",".join(filter(lambda i: "-linux-user" not in i, get_qemu_target_list(d).split(',')))
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index b46e7f72e2..601fc2286b 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -1,43 +1,88 @@
SUMMARY = "Fast open source processor emulator"
+DESCRIPTION = "QEMU is a hosted virtual machine monitor: it emulates the \
+machine's processor through dynamic binary translation and provides a set \
+of different hardware and device models for the machine, enabling it to run \
+a variety of guest operating systems"
HOMEPAGE = "http://qemu.org"
LICENSE = "GPLv2 & LGPLv2.1"
-DEPENDS = "glib-2.0 zlib pixman"
-RDEPENDS_${PN}_class-target += "bash"
+
RDEPENDS_${PN}-ptest = "bash make"
require qemu-targets.inc
-inherit autotools ptest
-BBCLASSEXTEND = "native nativesdk"
+inherit pkgconfig ptest
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
+
+SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
+ file://powerpc_rom.bin \
+ file://run-ptest \
+ file://0001-qemu-Add-missing-wacom-HID-descriptor.patch \
+ file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \
+ file://0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
+ file://0004-qemu-disable-Valgrind.patch \
+ file://0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch \
+ file://0006-chardev-connect-socket-to-a-spawned-command.patch \
+ file://0007-apic-fixup-fallthrough-to-PIC.patch \
+ file://0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
+ file://0009-Fix-webkitgtk-builds.patch \
+ file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
+ file://CVE-2019-15890.patch \
+ file://CVE-2019-12068.patch \
+ "
+UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
+
+SRC_URI[md5sum] = "cdf2b5ca52b9abac9bacb5842fa420f8"
+SRC_URI[sha256sum] = "656e60218689bdeec69903087fd7582d5d3e72238d02f4481d8dc6d79fd909c6"
+
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
-PR = "r1"
+do_install_append() {
+ # Prevent QA warnings about installed ${localstatedir}/run
+ if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
+}
-# QEMU_TARGETS is overridable variable
-QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
-
-SRC_URI = "\
- file://powerpc_rom.bin \
- file://disable-grabs.patch \
- file://exclude-some-arm-EABI-obsolete-syscalls.patch \
- file://wacom.patch \
- file://add-ptest-in-makefile.patch \
- file://run-ptest \
- file://0001-target-mips-add-24KEc-CPU-definition.patch \
- "
+do_compile_ptest() {
+ make buildtest-TESTS
+}
-SRC_URI_append_class-native = "\
- file://fix-libcap-header-issue-on-some-distro.patch \
- file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
- "
+do_install_ptest() {
+ cp -rL ${B}/tests ${D}${PTEST_PATH}
+ find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
-EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'"
+ cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
+ # Don't check the file genreated by configure
+ sed -i -e '/wildcard config-host.mak/d' \
+ -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include
+}
-EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror"
+# QEMU_TARGETS is overridable variable
+QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc ppc64 riscv32 riscv64 sh4 x86_64"
+
+EXTRA_OECONF = " \
+ --prefix=${prefix} \
+ --bindir=${bindir} \
+ --includedir=${includedir} \
+ --libdir=${libdir} \
+ --mandir=${mandir} \
+ --datadir=${datadir} \
+ --docdir=${docdir}/${BPN} \
+ --sysconfdir=${sysconfdir} \
+ --libexecdir=${libexecdir} \
+ --localstatedir=${localstatedir} \
+ --with-confsuffix=/${BPN} \
+ --disable-strip \
+ --disable-werror \
+ --extra-cflags='${CFLAGS}' \
+ ${PACKAGECONFIG_CONFARGS} \
+ "
-EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
+export LIBTOOL="${HOST_SYS}-libtool"
-LDFLAGS_append_class-native = " -fuse-ld=bfd"
+B = "${WORKDIR}/build"
-export LIBTOOL="${HOST_SYS}-libtool"
+EXTRA_OECONF_append = " --python=${HOSTTOOLS_DIR}/python3"
do_configure_prepend_class-native() {
# Append build host pkg-config paths for native target since the host may provide sdl
@@ -45,45 +90,16 @@ do_configure_prepend_class-native() {
if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
fi
-
- # Alter target makefiles to accept CFLAGS set via env
- sed -i -r \
- -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
- "${S}"/Makefile "${S}"/Makefile.target
}
-KVMENABLE = "--enable-kvm"
-KVMENABLE_darwin = "--disable-kvm"
-KVMENABLE_mingw32 = "--disable-kvm"
-
do_configure() {
- # Handle distros such as CentOS 5 32-bit that do not have kvm support
- KVMOPTS="--disable-kvm"
- if [ "${PN}" != "qemu-native" -a "${PN}" != "nativesdk-qemu" ] \
- || [ -f /usr/include/linux/kvm.h ] ; then
- KVMOPTS="${KVMENABLE}"
- fi
-
- ${S}/configure --prefix=${prefix} --sysconfdir=${sysconfdir} --libexecdir=${libexecdir} --localstatedir=${localstatedir} --disable-strip ${EXTRA_OECONF} $KVMOPTS
- test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
-}
-
-do_compile_ptest() {
- make buildtest-TESTS
-}
-
-do_install_ptest() {
- cp -rL ${B}/tests ${D}${PTEST_PATH}
- find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
-
- cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
+ ${S}/configure ${EXTRA_OECONF}
}
+do_configure[cleandirs] += "${B}"
do_install () {
- export STRIP="true"
- autotools_do_install
- install -d ${D}${datadir}/qemu
- install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
+ export STRIP=""
+ oe_runmake 'DESTDIR=${D}' install
}
# The following fragment will create a wrapper for qemu-mips user emulation
@@ -100,15 +116,22 @@ do_install_append() {
}
# END of qemu-mips workaround
-PACKAGECONFIG ??= " \
- fdt sdl \
- ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen', '', d)} \
- "
-PACKAGECONFIG_class-native ??= "fdt alsa uuid"
-PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
+make_qemu_wrapper() {
+ gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0`
-PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
+ for tool in `ls ${D}${bindir}/qemu-system-*`; do
+ create_wrapper $tool \
+ GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
+ FONTCONFIG_PATH=/etc/fonts \
+ GTK_THEME=Adwaita
+ done
+}
+
+# Disable kvm/virgl/mesa on targets that do not support it
+PACKAGECONFIG_remove_darwin = "kvm virglrenderer glx gtk+"
+PACKAGECONFIG_remove_mingw32 = "kvm virglrenderer glx gtk+"
+
+PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2"
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,"
@@ -116,24 +139,33 @@ PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen,xen-libxenstore xen-libxenc
PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg,"
PACKAGECONFIG[vnc-png] = "--enable-vnc --enable-vnc-png,--disable-vnc-png,libpng,"
-PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
+PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl,"
PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
-PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
-PACKAGECONFIG[gtk+] = "--enable-gtk --with-gtkabi=3.0 --enable-vte,--disable-gtk --disable-vte,gtk+3 vte"
+PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native"
+PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native"
PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
-PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
-PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,gcrypt,"
+PACKAGECONFIG[ssh] = "--enable-libssh,--disable-libssh,libssh,"
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt,"
PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle"
PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
-PACKAGECONFIG[alsa] = ",,alsa-lib"
+PACKAGECONFIG[alsa] = "--audio-drv-list='oss alsa',,alsa-lib"
PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,mesa"
PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
-
-EXTRA_OECONF += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', '--audio-drv-list=oss,alsa', '', d)}"
+PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,bluez5"
+PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
+PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
+PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer"
+# spice will be in meta-networking layer
+PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice"
+# usbredir will be in meta-networking layer
+PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir"
+PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy"
INSANE_SKIP_${PN} = "arch"
+
+FILES_${PN} += "${datadir}/icons"
diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
new file mode 100644
index 0000000000..9478102ae5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
@@ -0,0 +1,139 @@
+From 4655dc18074e0be9d239f51dac32b61435da8549 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 27 Nov 2014 14:04:29 +0000
+Subject: [PATCH] qemu: Add missing wacom HID descriptor
+
+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
+real wcom device.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Upstream-Status: Submitted
+2014/11/27
+
+---
+ hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 93 insertions(+), 1 deletion(-)
+
+diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c
+index 8c43db93..3ff8ca28 100644
+--- a/hw/usb/dev-wacom.c
++++ b/hw/usb/dev-wacom.c
+@@ -74,6 +74,89 @@ static const USBDescStrings desc_strings = {
+ [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) */
++ 0x09, 0x01, /* Usage (Pointer) */
++ 0xa1, 0x00, /* Collection (Physical) */
++ 0x05, 0x09, /* Usage Page (Button) */
++ 0x19, 0x01, /* Usage Minimum (1) */
++ 0x29, 0x05, /* Usage Maximum (5) */
++ 0x15, 0x00, /* Logical Minimum (0) */
++ 0x25, 0x01, /* Logical Maximum (1) */
++ 0x95, 0x05, /* Report Count (5) */
++ 0x75, 0x01, /* Report Size (1) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0x95, 0x01, /* Report Count (1) */
++ 0x75, 0x03, /* Report Size (3) */
++ 0x81, 0x01, /* Input (Constant) */
++ 0x05, 0x01, /* Usage Page (Generic Desktop) */
++ 0x09, 0x30, /* Usage (X) */
++ 0x09, 0x31, /* Usage (Y) */
++ 0x15, 0x81, /* Logical Minimum (-127) */
++ 0x25, 0x7f, /* Logical Maximum (127) */
++ 0x75, 0x08, /* Report Size (8) */
++ 0x95, 0x02, /* Report Count (2) */
++ 0x81, 0x06, /* Input (Data, Variable, Relative) */
++ 0xc0, /* End Collection */
++ 0xc0, /* End Collection */
++ 0x05, 0x0d, /* Usage Page (Digitizer) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0xa1, 0x01, /* Collection (Application) */
++ 0x85, 0x02, /* Report ID (2) */
++ 0xa1, 0x00, /* Collection (Physical) */
++ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0x15, 0x00, /* Logical Minimum (0) */
++ 0x26, 0xff, 0x00, /* Logical Maximum (255) */
++ 0x75, 0x08, /* Report Size (8) */
++ 0x95, 0x08, /* Report Count (8) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0xc0, /* End Collection */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 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) */
++ 0x05, 0x0d, /* Usage Page (Digitizer) */
++ 0x09, 0x22, /* Usage (Finger) */
++ 0xa1, 0x00, /* Collection (Physical) */
++ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0x15, 0x00, /* Logical Minimum (0) */
++ 0x26, 0xff, 0x00, /* Logical Maximum */
++ 0x75, 0x08, /* Report Size (8) */
++ 0x95, 0x02, /* Report Count (2) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0x05, 0x01, /* Usage Page (Generic Desktop) */
++ 0x09, 0x30, /* Usage (X) */
++ 0x35, 0x00, /* Physical Minimum */
++ 0x46, 0xe0, 0x2e, /* Physical Maximum */
++ 0x26, 0xe0, 0x01, /* Logical Maximum */
++ 0x75, 0x10, /* Report Size (16) */
++ 0x95, 0x01, /* Report Count (1) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0x09, 0x31, /* Usage (Y) */
++ 0x46, 0x40, 0x1f, /* Physical Maximum */
++ 0x26, 0x40, 0x01, /* Logical Maximum */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0x26, 0xff, 0x00, /* Logical Maximum */
++ 0x75, 0x08, /* Report Size (8) */
++ 0x95, 0x0d, /* Report Count (13) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0xc0, /* End Collection */
++ 0xc0, /* End Collection */
++};
++
++
+ static const USBDescIface desc_iface_wacom = {
+ .bInterfaceNumber = 0,
+ .bNumEndpoints = 1,
+@@ -91,7 +174,7 @@ static const USBDescIface desc_iface_wacom = {
+ 0x00, /* u8 country_code */
+ 0x01, /* u8 num_descriptors */
+ 0x22, /* u8 type: Report */
+- 0x6e, 0, /* u16 len */
++ sizeof(qemu_tablet_hid_report_descriptor), 0, /* u16 len */
+ },
+ },
+ },
+@@ -271,6 +354,15 @@ static void usb_wacom_handle_control(USBDevice *dev, USBPacket *p,
+ }
+
+ switch (request) {
++ case InterfaceRequest | USB_REQ_GET_DESCRIPTOR:
++ switch (value >> 8) {
++ case 0x22:
++ memcpy(data, qemu_tablet_hid_report_descriptor,
++ sizeof(qemu_tablet_hid_report_descriptor));
++ p->actual_length = sizeof(qemu_tablet_hid_report_descriptor);
++ break;
++ }
++ break;
+ case WACOM_SET_REPORT:
+ if (s->mouse_grabbed) {
+ qemu_remove_mouse_event_handler(s->eh_entry);
diff --git a/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch b/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch
deleted file mode 100644
index c4dbee7d71..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 926bc194f918d46bd93557b15da8153b6a94a1d5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
-Date: Mon, 25 Jul 2016 23:58:22 +0100
-Subject: [PATCH] target-mips: add 24KEc CPU definition
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Define a new CPU definition supporting 24KEc cores, similar to
-the existing 24Kc, but with added support for DSP instructions
-and MIPS16e (and without FPU).
-
-Signed-off-by: André Draszik <git@andred.net>
----
-Upstream-Status: Submitted [http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg05778.html]
- target-mips/translate_init.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c
-index 39ed5c4..6ae23e4 100644
---- a/target-mips/translate_init.c
-+++ b/target-mips/translate_init.c
-@@ -256,6 +256,28 @@ static const mips_def_t mips_defs[] =
- .mmu_type = MMU_TYPE_R4000,
- },
- {
-+ .name = "24KEc",
-+ .CP0_PRid = 0x00019600,
-+ .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) |
-+ (MMU_TYPE_R4000 << CP0C0_MT),
-+ .CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU) |
-+ (0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
-+ (0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA) |
-+ (1 << CP0C1_CA),
-+ .CP0_Config2 = MIPS_CONFIG2,
-+ .CP0_Config3 = MIPS_CONFIG3 | (1 << CP0C3_DSPP) | (0 << CP0C3_VInt),
-+ .CP0_LLAddr_rw_bitmask = 0,
-+ .CP0_LLAddr_shift = 4,
-+ .SYNCI_Step = 32,
-+ .CCRes = 2,
-+ /* we have a DSP, but no FPU */
-+ .CP0_Status_rw_bitmask = 0x1378FF1F,
-+ .SEGBITS = 32,
-+ .PABITS = 32,
-+ .insn_flags = CPU_MIPS32R2 | ASE_MIPS16 | ASE_DSP,
-+ .mmu_type = MMU_TYPE_R4000,
-+ },
-+ {
- .name = "24Kf",
- .CP0_PRid = 0x00019300,
- .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) |
---
-2.8.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch b/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
new file mode 100644
index 0000000000..2ccddd53cf
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
@@ -0,0 +1,33 @@
+From 67751f3a23e3db3012f391b3b3b73a4484488ce9 Mon Sep 17 00:00:00 2001
+From: Juro Bystricky <juro.bystricky@intel.com>
+Date: Thu, 31 Aug 2017 11:06:56 -0700
+Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for
+ qemu.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+---
+ tests/Makefile.include | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/tests/Makefile.include b/tests/Makefile.include
+index fd7fdb86..83b7f409 100644
+--- a/tests/Makefile.include
++++ b/tests/Makefile.include
+@@ -1183,4 +1183,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
+ -include $(wildcard tests/*.d)
+ -include $(wildcard tests/libqos/*.d)
+
++buildtest-TESTS: $(check-unit-y)
++
++runtest-TESTS:
++ for f in $(check-unit-y); do \
++ nf=$$(echo $$f | sed 's/tests\//\.\//g'); \
++ $$nf; \
++ done
++
+ endif
diff --git a/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
new file mode 100644
index 0000000000..5c42d68030
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -0,0 +1,33 @@
+From 235b94f1188597873c8776b019fed49947983392 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Fri, 28 Mar 2014 17:42:43 +0800
+Subject: [PATCH] qemu: Add addition environment space to boot loader
+ qemu-system-mips
+
+Upstream-Status: Inappropriate - OE uses deep paths
+
+If you create a project with very long directory names like 128 characters
+deep and use NFS, the kernel arguments will be truncated. The kernel will
+accept longer strings such as 1024 bytes, but the qemu boot loader defaulted
+to only 256 bytes. This patch expands the limit.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+---
+ hw/mips/mips_malta.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
+index 20e019bf..d150b01c 100644
+--- a/hw/mips/mips_malta.c
++++ b/hw/mips/mips_malta.c
+@@ -60,7 +60,7 @@
+
+ #define ENVP_ADDR 0x80002000l
+ #define ENVP_NB_ENTRIES 16
+-#define ENVP_ENTRY_SIZE 256
++#define ENVP_ENTRY_SIZE 1024
+
+ /* Hardware addresses */
+ #define FLASH_ADDRESS 0x1e000000ULL
diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
new file mode 100644
index 0000000000..0ac4ab40b1
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
@@ -0,0 +1,34 @@
+From 3ad7a375015d47fdf5016e03e11fa93440d6d8bd Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 20 Oct 2015 22:19:08 +0100
+Subject: [PATCH] qemu: disable Valgrind
+
+There isn't an option to enable or disable valgrind support, so disable it to avoid non-deterministic builds.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ configure | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/configure b/configure
+index 714e7fb6..dad4fc59 100755
+--- a/configure
++++ b/configure
+@@ -5335,15 +5335,6 @@ fi
+ # check if we have valgrind/valgrind.h
+
+ valgrind_h=no
+-cat > $TMPC << EOF
+-#include <valgrind/valgrind.h>
+-int main(void) {
+- return 0;
+-}
+-EOF
+-if compile_prog "" "" ; then
+- valgrind_h=yes
+-fi
+
+ ########################################
+ # check if environ is declared
diff --git a/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
new file mode 100644
index 0000000000..a73681510e
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
@@ -0,0 +1,26 @@
+From 80e6070bcdfe636b103a13598e6c38ad0d0e7624 Mon Sep 17 00:00:00 2001
+From: Stephen Arnold <sarnold@vctlabs.com>
+Date: Sun, 12 Jun 2016 18:09:56 -0700
+Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment
+
+Upstream-Status: Pending
+
+---
+ configure | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/configure b/configure
+index dad4fc59..685bbe5e 100755
+--- a/configure
++++ b/configure
+@@ -5971,10 +5971,6 @@ write_c_skeleton
+ if test "$gcov" = "yes" ; then
+ CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
+ LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
+-elif test "$fortify_source" = "yes" ; then
+- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
+-elif test "$debug" = "no"; then
+- CFLAGS="-O2 $CFLAGS"
+ fi
+
+ if test "$have_asan" = "yes"; then
diff --git a/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch b/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
new file mode 100644
index 0000000000..a42385530f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
@@ -0,0 +1,239 @@
+From ad853601e75f6d0dd09672bcca05fbe4fac766a4 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Thu, 21 Dec 2017 11:35:16 -0800
+Subject: [PATCH] chardev: connect socket to a spawned command
+
+The command is started in a shell (sh -c) with stdin connect to QEMU
+via a Unix domain stream socket. QEMU then exchanges data via its own
+end of the socket, just like it normally does.
+
+"-chardev socket" supports some ways of connecting via protocols like
+telnet, but that is only a subset of the functionality supported by
+tools socat. To use socat instead, for example to connect via a socks
+proxy, use:
+
+ -chardev 'socket,id=socat,cmd=exec socat FD:0 SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \
+ -device usb-serial,chardev=socat
+
+Beware that commas in the command must be escaped as double commas.
+
+Or interactively in the console:
+ (qemu) chardev-add socket,id=cat,cmd=cat
+ (qemu) device_add usb-serial,chardev=cat
+ ^ac
+ # cat >/dev/ttyUSB0
+ hello
+ hello
+
+Another usage is starting swtpm from inside QEMU. swtpm will
+automatically shut down once it looses the connection to the parent
+QEMU, so there is no risk of lingering processes:
+
+ -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \
+ -tpmdev emulator,id=tpm0,chardev=chrtpm0 \
+ -device tpm-tis,tpmdev=tpm0
+
+The patch was discussed upstream, but QEMU developers believe that the
+code calling QEMU should be responsible for managing additional
+processes. In OE-core, that would imply enhancing runqemu and
+oeqa. This patch is a simpler solution.
+
+Because it is not going upstream, the patch was written so that it is
+as simple as possible.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+
+---
+ chardev/char-socket.c | 101 ++++++++++++++++++++++++++++++++++++++++++
+ chardev/char.c | 3 ++
+ qapi/char.json | 5 +++
+ 3 files changed, 109 insertions(+)
+
+diff --git a/chardev/char-socket.c b/chardev/char-socket.c
+index 7ca5d97a..207fae4a 100644
+--- a/chardev/char-socket.c
++++ b/chardev/char-socket.c
+@@ -1278,6 +1278,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
+ return true;
+ }
+
++#ifndef _WIN32
++static void chardev_open_socket_cmd(Chardev *chr,
++ const char *cmd,
++ Error **errp)
++{
++ int fds[2] = { -1, -1 };
++ QIOChannelSocket *sioc = NULL;
++ pid_t pid = -1;
++ const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
++
++ /*
++ * We need a Unix domain socket for commands like swtpm and a single
++ * connection, therefore we cannot use qio_channel_command_new_spawn()
++ * without patching it first. Duplicating the functionality is easier.
++ */
++ if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) {
++ error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC)");
++ goto error;
++ }
++
++ pid = qemu_fork(errp);
++ if (pid < 0) {
++ goto error;
++ }
++
++ if (!pid) {
++ /* child */
++ dup2(fds[1], STDIN_FILENO);
++ execv(argv[0], (char * const *)argv);
++ _exit(1);
++ }
++
++ /*
++ * Hand over our end of the socket pair to the qio channel.
++ *
++ * We don't reap the child because it is expected to keep
++ * running. We also don't support the "reconnect" option for the
++ * same reason.
++ */
++ sioc = qio_channel_socket_new_fd(fds[0], errp);
++ if (!sioc) {
++ goto error;
++ }
++ fds[0] = -1;
++
++ g_free(chr->filename);
++ chr->filename = g_strdup_printf("cmd:%s", cmd);
++ tcp_chr_new_client(chr, sioc);
++
++ error:
++ if (fds[0] >= 0) {
++ close(fds[0]);
++ }
++ if (fds[1] >= 0) {
++ close(fds[1]);
++ }
++ if (sioc) {
++ object_unref(OBJECT(sioc));
++ }
++}
++#endif
+
+ static void qmp_chardev_open_socket(Chardev *chr,
+ ChardevBackend *backend,
+@@ -1286,6 +1347,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
+ {
+ SocketChardev *s = SOCKET_CHARDEV(chr);
+ ChardevSocket *sock = backend->u.socket.data;
++#ifndef _WIN32
++ const char *cmd = sock->cmd;
++#endif
+ bool do_nodelay = sock->has_nodelay ? sock->nodelay : false;
+ bool is_listen = sock->has_server ? sock->server : true;
+ bool is_telnet = sock->has_telnet ? sock->telnet : false;
+@@ -1351,6 +1415,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
+
+ update_disconnected_filename(s);
+
++#ifndef _WIN32
++ if (cmd) {
++ chardev_open_socket_cmd(chr, cmd, errp);
++
++ /* everything ready (or failed permanently) before we return */
++ *be_opened = true;
++ } else
++#endif
+ if (s->is_listen) {
+ if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
+ is_waitconnect, errp) < 0) {
+@@ -1370,9 +1442,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
+ const char *host = qemu_opt_get(opts, "host");
+ const char *port = qemu_opt_get(opts, "port");
+ const char *fd = qemu_opt_get(opts, "fd");
++#ifndef _WIN32
++ const char *cmd = qemu_opt_get(opts, "cmd");
++#endif
+ SocketAddressLegacy *addr;
+ ChardevSocket *sock;
+
++#ifndef _WIN32
++ if (cmd) {
++ /*
++ * Here we have to ensure that no options are set which are incompatible with
++ * spawning a command, otherwise unmodified code that doesn't know about
++ * command spawning (like socket_reconnect_timeout()) might get called.
++ */
++ if (path || sock->server || sock->has_telnet || sock->has_tn3270 || sock->reconnect || host || port || sock->tls_creds) {
++ error_setg(errp, "chardev: socket: cmd does not support any additional options");
++ return;
++ }
++ } else
++#endif
++
+ if ((!!path + !!fd + !!host) != 1) {
+ error_setg(errp,
+ "Exactly one of 'path', 'fd' or 'host' required");
+@@ -1415,12 +1504,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
+ sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
+ sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
+
++#ifndef _WIN32
++ sock->cmd = g_strdup(cmd);
++#endif
++
+ addr = g_new0(SocketAddressLegacy, 1);
++#ifndef _WIN32
++ if (path || cmd) {
++#else
+ if (path) {
++#endif
+ UnixSocketAddress *q_unix;
+ addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
+ q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
++#ifndef _WIN32
++ q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
++#else
+ q_unix->path = g_strdup(path);
++#endif
+ } else if (host) {
+ addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
+ addr->u.inet.data = g_new(InetSocketAddress, 1);
+diff --git a/chardev/char.c b/chardev/char.c
+index 7b6b2cb1..0c2ca64b 100644
+--- a/chardev/char.c
++++ b/chardev/char.c
+@@ -837,6 +837,9 @@ QemuOptsList qemu_chardev_opts = {
+ },{
+ .name = "path",
+ .type = QEMU_OPT_STRING,
++ },{
++ .name = "cmd",
++ .type = QEMU_OPT_STRING,
+ },{
+ .name = "host",
+ .type = QEMU_OPT_STRING,
+diff --git a/qapi/char.json b/qapi/char.json
+index a6e81ac7..517962c6 100644
+--- a/qapi/char.json
++++ b/qapi/char.json
+@@ -247,6 +247,10 @@
+ #
+ # @addr: socket address to listen on (server=true)
+ # or connect to (server=false)
++# @cmd: command to run via "sh -c" with stdin as one end of
++# a AF_UNIX SOCK_DSTREAM socket pair. The other end
++# is used by the chardev. Either an addr or a cmd can
++# be specified, but not both.
+ # @tls-creds: the ID of the TLS credentials object (since 2.6)
+ # @tls-authz: the ID of the QAuthZ authorization object against which
+ # the client's x509 distinguished name will be validated. This
+@@ -272,6 +276,7 @@
+ ##
+ { 'struct': 'ChardevSocket',
+ 'data': { 'addr': 'SocketAddressLegacy',
++ '*cmd': 'str',
+ '*tls-creds': 'str',
+ '*tls-authz' : 'str',
+ '*server': 'bool',
diff --git a/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
new file mode 100644
index 0000000000..b50e8c2545
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
@@ -0,0 +1,44 @@
+From f51e49e7d7d87b7254242b7360f99c2df94a5a2d Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Tue, 26 Feb 2013 11:43:28 -0500
+Subject: [PATCH] apic: fixup fallthrough to PIC
+
+Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
+interrupts through the local APIC if the local APIC config says so.]
+missed a check to ensure the local APIC is enabled. Since if the local
+APIC is disabled it doesn't matter what the local APIC config says.
+
+If this check isn't done and the guest has disabled the local APIC the
+guest will receive a general protection fault, similar to what is seen
+here:
+
+https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html
+
+The GPF is caused by an attempt to service interrupt 0xffffffff. This
+comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr()
+(with the local APIC disabled apic_get_interrupt() returns -1).
+apic_accept_pic_intr() returns 0 and thus the interrupt number which
+is returned from cpu_get_pic_interrupt(), and which is attempted to be
+serviced, is -1.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+
+---
+ hw/intc/apic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/intc/apic.c b/hw/intc/apic.c
+index bce89911..df4b582e 100644
+--- a/hw/intc/apic.c
++++ b/hw/intc/apic.c
+@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev)
+ APICCommonState *s = APIC(dev);
+ uint32_t lvt0;
+
+- if (!s)
++ if (!s || !(s->spurious_vec & APIC_SV_ENABLE))
+ return -1;
+
+ lvt0 = s->lvt[APIC_LVT_LINT0];
diff --git a/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
new file mode 100644
index 0000000000..e562f25bec
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -0,0 +1,33 @@
+From 25a064f91f73630e5dff2a6aeb23d953c469cea6 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Wed, 17 Jan 2018 10:51:49 -0800
+Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
+
+Since commit "linux-user: Tidy and enforce reserved_va initialization"
+(18e80c55bb6ec17c05ec0ba717ec83933c2bfc07) the Yocto webkitgtk build
+hangs when cross compiling for 32-bit x86 on a 64-bit x86 machine using
+musl.
+
+To fix the issue reduce the MAX_RESERVED_VA macro to be a closer match
+to what it was before the problematic commit.
+
+Upstream-Status: Submitted http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
+Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
+
+---
+ linux-user/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux-user/main.c b/linux-user/main.c
+index 8ffc5251..4067e739 100644
+--- a/linux-user/main.c
++++ b/linux-user/main.c
+@@ -77,7 +77,7 @@ int have_guest_base;
+ (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
+ /* There are a number of places where we assign reserved_va to a variable
+ of type abi_ulong and expect it to fit. Avoid the last page. */
+-# define MAX_RESERVED_VA (0xfffffffful & TARGET_PAGE_MASK)
++# define MAX_RESERVED_VA (0x7ffffffful & TARGET_PAGE_MASK)
+ # else
+ # define MAX_RESERVED_VA (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
+ # endif
diff --git a/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch b/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
new file mode 100644
index 0000000000..4072d9455f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
@@ -0,0 +1,137 @@
+From b633b9a1813fcd715dce44659a89293f1c64ae8c Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@lge.com>
+Date: Fri, 1 Jun 2018 08:41:07 +0000
+Subject: [PATCH] Fix webkitgtk builds
+
+This is a partial revert of "linux-user: fix mmap/munmap/mprotect/mremap/shmat".
+
+This patch fixes qemu-i386 hangs during gobject-introspection in webkitgtk build
+when musl is used on qemux86. This is the same issue that
+0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch was
+fixing in the 2.11 release.
+
+This patch also fixes a build failure when building webkitgtk for
+qemumips. A QEMU assert is seen while building webkitgtk:
+page_check_range: Assertion `start < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS)' failed.
+
+This reverts commit ebf9a3630c911d0cfc9c20f7cafe9ba4f88cf583.
+
+Upstream-Status: Pending
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+---
+ include/exec/cpu-all.h | 6 +-----
+ include/exec/cpu_ldst.h | 5 ++++-
+ linux-user/mmap.c | 17 ++++-------------
+ linux-user/syscall.c | 5 +----
+ 4 files changed, 10 insertions(+), 23 deletions(-)
+
+diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
+index 536ea58f81..4c63a6a2e4 100644
+--- a/include/exec/cpu-all.h
++++ b/include/exec/cpu-all.h
+@@ -162,12 +162,8 @@ extern unsigned long guest_base;
+ extern int have_guest_base;
+ extern unsigned long reserved_va;
+
+-#if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS
+-#define GUEST_ADDR_MAX (~0ul)
+-#else
+-#define GUEST_ADDR_MAX (reserved_va ? reserved_va - 1 : \
++#define GUEST_ADDR_MAX (reserved_va ? reserved_va : \
+ (1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1)
+-#endif
+ #else
+
+ #include "exec/hwaddr.h"
+diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
+index 9151fdb042..cb2b8f329f 100644
+--- a/include/exec/cpu_ldst.h
++++ b/include/exec/cpu_ldst.h
+@@ -65,7 +65,10 @@ typedef uint64_t abi_ptr;
+ #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS
+ #define guest_addr_valid(x) (1)
+ #else
+-#define guest_addr_valid(x) ((x) <= GUEST_ADDR_MAX)
++#define guest_addr_valid(x) ({ \
++ ((x) < (1ul << TARGET_VIRT_ADDR_SPACE_BITS)) && \
++ (!reserved_va || ((x) < reserved_va)); \
++})
+ #endif
+ #define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base)
+
+diff --git a/linux-user/mmap.c b/linux-user/mmap.c
+index 46a6e3a761..7735465462 100644
+--- a/linux-user/mmap.c
++++ b/linux-user/mmap.c
+@@ -78,7 +78,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
+ return -TARGET_EINVAL;
+ len = TARGET_PAGE_ALIGN(len);
+ end = start + len;
+- if (!guest_range_valid(start, len)) {
++ if (end < start) {
+ return -TARGET_ENOMEM;
+ }
+ prot &= PROT_READ | PROT_WRITE | PROT_EXEC;
+@@ -495,8 +495,8 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
+ * It can fail only on 64-bit host with 32-bit target.
+ * On any other target/host host mmap() handles this error correctly.
+ */
+- if (!guest_range_valid(start, len)) {
+- errno = ENOMEM;
++ if ((unsigned long)start + len - 1 > (abi_ulong) -1) {
++ errno = EINVAL;
+ goto fail;
+ }
+
+@@ -636,10 +636,8 @@ int target_munmap(abi_ulong start, abi_ulong len)
+ if (start & ~TARGET_PAGE_MASK)
+ return -TARGET_EINVAL;
+ len = TARGET_PAGE_ALIGN(len);
+- if (len == 0 || !guest_range_valid(start, len)) {
++ if (len == 0)
+ return -TARGET_EINVAL;
+- }
+-
+ mmap_lock();
+ end = start + len;
+ real_start = start & qemu_host_page_mask;
+@@ -694,13 +692,6 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
+ int prot;
+ void *host_addr;
+
+- if (!guest_range_valid(old_addr, old_size) ||
+- ((flags & MREMAP_FIXED) &&
+- !guest_range_valid(new_addr, new_size))) {
+- errno = ENOMEM;
+- return -1;
+- }
+-
+ mmap_lock();
+
+ if (flags & MREMAP_FIXED) {
+diff --git a/linux-user/syscall.c b/linux-user/syscall.c
+index 8b41a03901..bc5d85de02 100644
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -4031,9 +4031,6 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env,
+ return -TARGET_EINVAL;
+ }
+ }
+- if (!guest_range_valid(shmaddr, shm_info.shm_segsz)) {
+- return -TARGET_EINVAL;
+- }
+
+ mmap_lock();
+
+@@ -6881,7 +6878,7 @@ static int open_self_maps(void *cpu_env, int fd)
+ }
+ if (h2g_valid(min)) {
+ int flags = page_get_flags(h2g(min));
+- max = h2g_valid(max - 1) ? max : (uintptr_t)g2h(GUEST_ADDR_MAX) + 1;
++ max = h2g_valid(max - 1) ? max : (uintptr_t)g2h(GUEST_ADDR_MAX);
+ if (page_check_range(h2g(min), max - min, flags) == -1) {
+ continue;
+ }
+--
+2.22.0
+
diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
new file mode 100644
index 0000000000..a8ab7daa42
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -0,0 +1,93 @@
+From 5214dd4461f2090ef0965b4d2518f49927d61cbc Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 28 Aug 2019 19:56:28 +0800
+Subject: [Qemu-devel] [PATCH] configure: Add pkg-config handling for libgcrypt
+
+libgcrypt may also be controlled by pkg-config, this patch adds pkg-config
+handling for libgcrypt.
+
+Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html]
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ configure | 48 ++++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 40 insertions(+), 8 deletions(-)
+
+diff --git a/configure b/configure
+index e44e454..0f362a7 100755
+--- a/configure
++++ b/configure
+@@ -2875,6 +2875,30 @@ has_libgcrypt() {
+ return 0
+ }
+
++has_libgcrypt_pkgconfig() {
++ if ! has $pkg_config ; then
++ return 1
++ fi
++
++ if ! $pkg_config --list-all | grep libgcrypt > /dev/null 2>&1 ; then
++ return 1
++ fi
++
++ if test -n "$cross_prefix" ; then
++ host=$($pkg_config --variable=host libgcrypt)
++ if test "${host%-gnu}-" != "${cross_prefix%-gnu}" ; then
++ print_error "host($host) does not match cross_prefix($cross_prefix)"
++ return 1
++ fi
++ fi
++
++ if ! $pkg_config --atleast-version=1.5.0 libgcrypt ; then
++ print_error "libgcrypt version is $($pkg_config --modversion libgcrypt)"
++ return 1
++ fi
++
++ return 0
++}
+
+ if test "$nettle" != "no"; then
+ pass="no"
+@@ -2902,7 +2926,14 @@ fi
+
+ if test "$gcrypt" != "no"; then
+ pass="no"
+- if has_libgcrypt; then
++ if has_libgcrypt_pkgconfig; then
++ gcrypt_cflags=$($pkg_config --cflags libgcrypt)
++ if test "$static" = "yes" ; then
++ gcrypt_libs=$($pkg_config --libs --static libgcrypt)
++ else
++ gcrypt_libs=$($pkg_config --libs libgcrypt)
++ fi
++ elif has_libgcrypt; then
+ gcrypt_cflags=$(libgcrypt-config --cflags)
+ gcrypt_libs=$(libgcrypt-config --libs)
+ # Debian has removed -lgpg-error from libgcrypt-config
+@@ -2912,15 +2943,16 @@ if test "$gcrypt" != "no"; then
+ then
+ gcrypt_libs="$gcrypt_libs -lgpg-error"
+ fi
++ fi
+
+- # Link test to make sure the given libraries work (e.g for static).
+- write_c_skeleton
+- if compile_prog "" "$gcrypt_libs" ; then
+- LIBS="$gcrypt_libs $LIBS"
+- QEMU_CFLAGS="$QEMU_CFLAGS $gcrypt_cflags"
+- pass="yes"
+- fi
++ # Link test to make sure the given libraries work (e.g for static).
++ write_c_skeleton
++ if compile_prog "" "$gcrypt_libs" ; then
++ LIBS="$gcrypt_libs $LIBS"
++ QEMU_CFLAGS="$QEMU_CFLAGS $gcrypt_cflags"
++ pass="yes"
+ fi
++
+ if test "$pass" = "yes"; then
+ gcrypt="yes"
+ cat > $TMPC << EOF
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/qemu/qemu/0010-fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/0010-fix-libcap-header-issue-on-some-distro.patch
new file mode 100644
index 0000000000..3a7d7bbd33
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0010-fix-libcap-header-issue-on-some-distro.patch
@@ -0,0 +1,86 @@
+From 9125afb733d8c96416bb83c5adad39bb8d0803a1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 12 Mar 2013 09:54:06 +0800
+Subject: [PATCH] fix libcap header issue on some distro
+
+1, When build qemu-native on SLED 11.2, there is an error:
+...
+| In file included from /usr/include/bits/sigcontext.h:28,
+| from /usr/include/signal.h:339,
+| from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/
+qemu-1.4.0/include/qemu-common.h:42,
+| from fsdev/virtfs-proxy-helper.c:23:
+| /usr/include/asm/sigcontext.h:28: error: expected specifier-
+qualifier-list before '__u64'
+| /usr/include/asm/sigcontext.h:191: error: expected specifier-
+qualifier-list before '__u64'
+...
+
+2, The virtfs-proxy-helper.c includes <sys/capability.h> and
+qemu-common.h in sequence. The header include map is:
+(`-->' presents `include')
+...
+"virtfs-proxy-helper.c" --> <sys/capability.h>
+...
+"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
+<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
+<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h>
+...
+
+3, The bug is found on SLED 11.2 x86. In libcap header file
+/usr/include/sys/capability.h, it does evil stuff like this:
+...
+ 25 /*
+ 26 * Make sure we can be included from userland by preventing
+ 27 * capability.h from including other kernel headers
+ 28 */
+ 29 #define _LINUX_TYPES_H
+ 30 #define _LINUX_FS_H
+ 31 #define __LINUX_COMPILER_H
+ 32 #define __user
+ 33
+ 34 typedef unsigned int __u32;
+ 35 typedef __u32 __le32;
+...
+This completely prevents including /usr/include/linux/types.h.
+The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
+and '__u64' is defined in <asm-generic/int-ll64.h>.
+
+4, Modify virtfs-proxy-helper.c to include <sys/capability.h>
+last to workaround the issue.
+
+http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
+http://patchwork.linuxtv.org/patch/12748/
+
+Upstream-Status: Pending
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ fsdev/virtfs-proxy-helper.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
+index 6f132c5f..8329950c 100644
+--- a/fsdev/virtfs-proxy-helper.c
++++ b/fsdev/virtfs-proxy-helper.c
+@@ -13,7 +13,6 @@
+ #include <sys/resource.h>
+ #include <getopt.h>
+ #include <syslog.h>
+-#include <sys/capability.h>
+ #include <sys/fsuid.h>
+ #include <sys/vfs.h>
+ #include <sys/ioctl.h>
+@@ -27,7 +26,11 @@
+ #include "9p-iov-marshal.h"
+ #include "hw/9pfs/9p-proxy.h"
+ #include "fsdev/9p-iov-marshal.h"
+-
++/*
++ * Include this one last due to some versions of it being buggy:
++ * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
++ */
++#include <sys/capability.h>
+ #define PROGNAME "virtfs-proxy-helper"
+
+ #ifndef XFS_SUPER_MAGIC
diff --git a/meta/recipes-devtools/qemu/qemu/0011-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch b/meta/recipes-devtools/qemu/qemu/0011-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
new file mode 100644
index 0000000000..e5ebfc1267
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0011-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
@@ -0,0 +1,74 @@
+From 0a53e906510cce1f32bc04a11e81ea40f834dac4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Wed, 12 Aug 2015 15:11:30 -0500
+Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add custom_debug.h with function for print backtrace information.
+When pthread_kill fails in qemu_cpu_kick_thread display backtrace and
+current cpu information.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+---
+ cpus.c | 5 +++++
+ custom_debug.h | 24 ++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+)
+ create mode 100644 custom_debug.h
+
+diff --git a/cpus.c b/cpus.c
+index e83f72b4..e6e2576e 100644
+--- a/cpus.c
++++ b/cpus.c
+@@ -1769,6 +1769,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
+ return NULL;
+ }
+
++#include "custom_debug.h"
++
+ static void qemu_cpu_kick_thread(CPUState *cpu)
+ {
+ #ifndef _WIN32
+@@ -1781,6 +1783,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
+ err = pthread_kill(cpu->thread->thread, SIG_IPI);
+ if (err && err != ESRCH) {
+ fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
++ fprintf(stderr, "CPU #%d:\n", cpu->cpu_index);
++ cpu_dump_state(cpu, stderr, 0);
++ backtrace_print();
+ exit(1);
+ }
+ #else /* _WIN32 */
+diff --git a/custom_debug.h b/custom_debug.h
+new file mode 100644
+index 00000000..f029e455
+--- /dev/null
++++ b/custom_debug.h
+@@ -0,0 +1,24 @@
++#include <execinfo.h>
++#include <stdio.h>
++#define BACKTRACE_MAX 128
++static void backtrace_print(void)
++{
++ int nfuncs = 0;
++ void *buf[BACKTRACE_MAX];
++ char **symbols;
++ int i;
++
++ nfuncs = backtrace(buf, BACKTRACE_MAX);
++
++ symbols = backtrace_symbols(buf, nfuncs);
++ if (symbols == NULL) {
++ fprintf(stderr, "backtrace_print failed to get symbols");
++ return;
++ }
++
++ fprintf(stderr, "Backtrace ...\n");
++ for (i = 0; i < nfuncs; i++)
++ fprintf(stderr, "%s\n", symbols[i]);
++
++ free(symbols);
++}
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch b/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch
new file mode 100644
index 0000000000..f1655e407f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch
@@ -0,0 +1,108 @@
+From de594e47659029316bbf9391efb79da0a1a08e08 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Wed, 14 Aug 2019 17:35:21 +0530
+Subject: [PATCH] scsi: lsi: exit infinite loop while executing script
+ (CVE-2019-12068)
+
+When executing script in lsi_execute_script(), the LSI scsi adapter
+emulator advances 's->dsp' index to read next opcode. This can lead
+to an infinite loop if the next opcode is empty. Move the existing
+loop exit after 10k iterations so that it covers no-op opcodes as
+well.
+
+Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=de594e47659029316bbf9391efb79da0a1a08e08]
+CVE: CVE-2019-12068
+
+Reported-by: Bugs SysSec <bugs-syssec@rub.de>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ hw/scsi/lsi53c895a.c | 41 +++++++++++++++++++++++++++--------------
+ 1 file changed, 27 insertions(+), 14 deletions(-)
+
+diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
+index 222a286..ec53b14 100644
+--- a/hw/scsi/lsi53c895a.c
++++ b/hw/scsi/lsi53c895a.c
+@@ -186,6 +186,9 @@ static const char *names[] = {
+ /* Flag set if this is a tagged command. */
+ #define LSI_TAG_VALID (1 << 16)
+
++/* Maximum instructions to process. */
++#define LSI_MAX_INSN 10000
++
+ typedef struct lsi_request {
+ SCSIRequest *req;
+ uint32_t tag;
+@@ -1133,7 +1136,21 @@ static void lsi_execute_script(LSIState *s)
+
+ s->istat1 |= LSI_ISTAT1_SRUN;
+ again:
+- insn_processed++;
++ if (++insn_processed > LSI_MAX_INSN) {
++ /* Some windows drivers make the device spin waiting for a memory
++ location to change. If we have been executed a lot of code then
++ assume this is the case and force an unexpected device disconnect.
++ This is apparently sufficient to beat the drivers into submission.
++ */
++ if (!(s->sien0 & LSI_SIST0_UDC)) {
++ qemu_log_mask(LOG_GUEST_ERROR,
++ "lsi_scsi: inf. loop with UDC masked");
++ }
++ lsi_script_scsi_interrupt(s, LSI_SIST0_UDC, 0);
++ lsi_disconnect(s);
++ trace_lsi_execute_script_stop();
++ return;
++ }
+ insn = read_dword(s, s->dsp);
+ if (!insn) {
+ /* If we receive an empty opcode increment the DSP by 4 bytes
+@@ -1570,19 +1587,7 @@ again:
+ }
+ }
+ }
+- if (insn_processed > 10000 && s->waiting == LSI_NOWAIT) {
+- /* Some windows drivers make the device spin waiting for a memory
+- location to change. If we have been executed a lot of code then
+- assume this is the case and force an unexpected device disconnect.
+- This is apparently sufficient to beat the drivers into submission.
+- */
+- if (!(s->sien0 & LSI_SIST0_UDC)) {
+- qemu_log_mask(LOG_GUEST_ERROR,
+- "lsi_scsi: inf. loop with UDC masked");
+- }
+- lsi_script_scsi_interrupt(s, LSI_SIST0_UDC, 0);
+- lsi_disconnect(s);
+- } else if (s->istat1 & LSI_ISTAT1_SRUN && s->waiting == LSI_NOWAIT) {
++ if (s->istat1 & LSI_ISTAT1_SRUN && s->waiting == LSI_NOWAIT) {
+ if (s->dcntl & LSI_DCNTL_SSM) {
+ lsi_script_dma_interrupt(s, LSI_DSTAT_SSI);
+ } else {
+@@ -1970,6 +1975,10 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
+ case 0x2f: /* DSP[24:31] */
+ s->dsp &= 0x00ffffff;
+ s->dsp |= val << 24;
++ /*
++ * FIXME: if s->waiting != LSI_NOWAIT, this will only execute one
++ * instruction. Is this correct?
++ */
+ if ((s->dmode & LSI_DMODE_MAN) == 0
+ && (s->istat1 & LSI_ISTAT1_SRUN) == 0)
+ lsi_execute_script(s);
+@@ -1988,6 +1997,10 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
+ break;
+ case 0x3b: /* DCNTL */
+ s->dcntl = val & ~(LSI_DCNTL_PFF | LSI_DCNTL_STD);
++ /*
++ * FIXME: if s->waiting != LSI_NOWAIT, this will only execute one
++ * instruction. Is this correct?
++ */
+ if ((val & LSI_DCNTL_STD) && (s->istat1 & LSI_ISTAT1_SRUN) == 0)
+ lsi_execute_script(s);
+ break;
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2019-15890.patch b/meta/recipes-devtools/qemu/qemu/CVE-2019-15890.patch
new file mode 100644
index 0000000000..1d89431be6
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2019-15890.patch
@@ -0,0 +1,48 @@
+From 4fc0d23e8f6d795c679623d2ed2cbe6a7a17b9c7 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Tue, 10 Sep 2019 20:02:15 -0700
+Subject: [PATCH] ip_reass: Fix use after free
+
+Using ip_deq after m_free might read pointers from an allocation reuse.
+
+This would be difficult to exploit, but that is still related with
+CVE-2019-14378 which generates fragmented IP packets that would trigger this
+issue and at least produce a DoS.
+
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+Upstream-Status: Backport
+CVE: CVE-2019-15890
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ slirp/src/ip_input.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/slirp/src/ip_input.c b/slirp/src/ip_input.c
+index 8c75d914..c07d7d40 100644
+--- a/slirp/src/ip_input.c
++++ b/slirp/src/ip_input.c
+@@ -292,6 +292,7 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
+ */
+ while (q != (struct ipasfrag *)&fp->frag_link &&
+ ip->ip_off + ip->ip_len > q->ipf_off) {
++ struct ipasfrag *prev;
+ i = (ip->ip_off + ip->ip_len) - q->ipf_off;
+ if (i < q->ipf_len) {
+ q->ipf_len -= i;
+@@ -299,9 +300,10 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
+ m_adj(dtom(slirp, q), i);
+ break;
+ }
++ prev = q;
+ q = q->ipf_next;
+- m_free(dtom(slirp, q->ipf_prev));
+- ip_deq(q->ipf_prev);
++ ip_deq(prev);
++ m_free(dtom(slirp, prev));
+ }
+
+ insert:
+--
+2.23.0
+
diff --git a/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch b/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
deleted file mode 100644
index 1a6cf5119b..0000000000
--- a/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 896fa02c24347e6e9259812cfda187b1d6ca6199 Mon Sep 17 00:00:00 2001
-From: Jiang Lu <lu.jiang@windriver.com>
-Date: Wed, 13 Nov 2013 10:38:08 +0800
-Subject: [PATCH] Qemu:Arm:versatilepb: Add memory size checking
-
-The machine can not work with memory over 256M, so add a checking
-at startup. If the memory size exceed 256M, just stop emulation then
-throw out warning about memory limitation.
-
-Upstream-Status: Pending
-
-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>
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
----
- hw/arm/versatilepb.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
-index 6c69f4e..9278d90 100644
---- a/hw/arm/versatilepb.c
-+++ b/hw/arm/versatilepb.c
-@@ -204,6 +204,13 @@ static void versatile_init(MachineState *machine, int board_id)
- exit(1);
- }
-
-+ if (machine->ram_size > (256 << 20)) {
-+ fprintf(stderr,
-+ "qemu: Too much memory for this machine: %d MB, maximum 256 MB\n",
-+ ((unsigned int)ram_size / (1 << 20)));
-+ exit(1);
-+ }
-+
- cpuobj = object_new(object_class_get_name(cpu_oc));
-
- /* By default ARM1176 CPUs have EL3 enabled. This board does not
---
-2.1.0
-
diff --git a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
deleted file mode 100644
index 2ce3478e4a..0000000000
--- a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Pending
-
-Add subpackage -ptest which runs all unit test cases for qemu.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- tests/Makefile.include | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/tests/Makefile.include b/tests/Makefile.include
-index 14be491..0fce37a 100644
---- a/tests/Makefile.include
-+++ b/tests/Makefile.include
-@@ -776,3 +776,11 @@ all: $(QEMU_IOTESTS_HELPERS-y)
-
- -include $(wildcard tests/*.d)
- -include $(wildcard tests/libqos/*.d)
-+
-+buildtest-TESTS: $(check-unit-y)
-+
-+runtest-TESTS:
-+ for f in $(check-unit-y); do \
-+ nf=$$(echo $$f | sed 's/tests\//\.\//g'); \
-+ $$nf; \
-+ done
---
-2.9.0
-
diff --git a/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch b/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
deleted file mode 100644
index 59cdc1c304..0000000000
--- a/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
-
-From 9ac096d8eccf2d56ece646320c282c8369f8337c Mon Sep 17 00:00:00 2001
-From: Cristian Iorga <cristian.iorga@intel.com>
-Date: Tue, 29 Jul 2014 18:35:59 +0300
-Subject: [PATCH] configure: fix Darwin target detection
-
-fix Darwin target detection for qemu
-cross-compilation.
-
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
----
- configure | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure b/configure
-index 283c71c..1c66a11 100755
---- a/configure
-+++ b/configure
-@@ -444,6 +444,8 @@ elif check_define __sun__ ; then
- targetos='SunOS'
- elif check_define __HAIKU__ ; then
- targetos='Haiku'
-+elif check_define __APPLE__ ; then
-+ targetos='Darwin'
- else
- targetos=`uname -s`
- fi
---
-1.9.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
deleted file mode 100644
index 6822132541..0000000000
--- a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 697a834c35d19447b7dcdb9e1d9434bc6ce17c21 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
-Date: Wed, 12 Aug 2015 15:11:30 -0500
-Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Add custom_debug.h with function for print backtrace information.
-When pthread_kill fails in qemu_cpu_kick_thread display backtrace and
-current cpu information.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
----
- cpus.c | 5 +++++
- custom_debug.h | 24 ++++++++++++++++++++++++
- 2 files changed, 29 insertions(+)
- create mode 100644 custom_debug.h
-
-diff --git a/cpus.c b/cpus.c
-index a822ce3..7e4786e 100644
---- a/cpus.c
-+++ b/cpus.c
-@@ -1080,6 +1080,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
- return NULL;
- }
-
-+#include "custom_debug.h"
-+
- static void qemu_cpu_kick_thread(CPUState *cpu)
- {
- #ifndef _WIN32
-@@ -1088,6 +1090,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
- err = pthread_kill(cpu->thread->thread, SIG_IPI);
- if (err) {
- fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
-+ fprintf(stderr, "CPU #%d:\n", cpu->cpu_index);
-+ cpu_dump_state(cpu, stderr, fprintf, 0);
-+ backtrace_print();
- exit(1);
- }
- #else /* _WIN32 */
-diff --git a/custom_debug.h b/custom_debug.h
-new file mode 100644
-index 0000000..f029e45
---- /dev/null
-+++ b/custom_debug.h
-@@ -0,0 +1,24 @@
-+#include <execinfo.h>
-+#include <stdio.h>
-+#define BACKTRACE_MAX 128
-+static void backtrace_print(void)
-+{
-+ int nfuncs = 0;
-+ void *buf[BACKTRACE_MAX];
-+ char **symbols;
-+ int i;
-+
-+ nfuncs = backtrace(buf, BACKTRACE_MAX);
-+
-+ symbols = backtrace_symbols(buf, nfuncs);
-+ if (symbols == NULL) {
-+ fprintf(stderr, "backtrace_print failed to get symbols");
-+ return;
-+ }
-+
-+ fprintf(stderr, "Backtrace ...\n");
-+ for (i = 0; i < nfuncs; i++)
-+ fprintf(stderr, "%s\n", symbols[i]);
-+
-+ free(symbols);
-+}
---
-1.9.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
deleted file mode 100644
index 123833f824..0000000000
--- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls
-XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already
-a pointer grab (screen is locked, a menu is open) then qemu will hang until the
-grab can be taken. In the specific case of a headless X server on an autobuilder, once
-the screensaver has kicked in any qemu instance that appears underneath the
-pointer will hang.
-
-I'm not entirely sure why pointer grabs are required (the documentation
-explicitly says it doesn't do grabs when using a tablet, which we are) so wrap
-them in a conditional that can be set by the autobuilder environment, preserving
-the current grabbing behaviour for everyone else.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 18 Sep 2013 14:04:54 +0100
-Subject: [PATCH] sdl.c: allow user to disable pointer grabs
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Signed-off-by: Eric Bénard <eric@eukrea.com>
----
- ui/sdl.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/ui/sdl.c b/ui/sdl.c
-index 39a42d6..9b8abe5 100644
---- a/ui/sdl.c
-+++ b/ui/sdl.c
-@@ -59,6 +59,10 @@ static SDL_Cursor *guest_sprite = NULL;
- static int scaling_active = 0;
- static Notifier mouse_mode_notifier;
- static int idle_counter;
-+#ifndef True
-+#define True 1
-+#endif
-+static doing_grabs = True;
-
- static void sdl_update(DisplayChangeListener *dcl,
- int x, int y, int w, int h)
-@@ -384,14 +388,16 @@ static void sdl_grab_start(void)
- }
- } else
- sdl_hide_cursor();
-- SDL_WM_GrabInput(SDL_GRAB_ON);
-+ if (doing_grabs)
-+ SDL_WM_GrabInput(SDL_GRAB_ON);
- gui_grab = 1;
- sdl_update_caption();
- }
-
- static void sdl_grab_end(void)
- {
-- SDL_WM_GrabInput(SDL_GRAB_OFF);
-+ if (doing_grabs)
-+ SDL_WM_GrabInput(SDL_GRAB_OFF);
- gui_grab = 0;
- sdl_show_cursor();
- sdl_update_caption();
-@@ -909,6 +915,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
- * This requires SDL >= 1.2.14. */
- setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
-
-+ doing_grabs = (getenv("QEMU_DONT_GRAB") == NULL);
-+
- flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
- if (SDL_Init (flags)) {
- fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
---
-1.8.3.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch b/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
deleted file mode 100644
index 171bda7e95..0000000000
--- a/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-[PATCH] exclude some arm EABI obsolete syscalls
-
-Upstream-Status: Pending
-
-some syscalls are obsolete and no longer available for EABI, exclude them to
-fix the below error:
- In file included from qemu-seccomp.c:16:0:
- qemu-seccomp.c:28:7: error: '__NR_select' undeclared here (not in a function)
- { SCMP_SYS(select), 252 },
- ^
- qemu-seccomp.c:36:7: error: '__NR_mmap' undeclared here (not in a function)
- { SCMP_SYS(mmap), 247 },
- ^
- qemu-seccomp.c:57:7: error: '__NR_getrlimit' undeclared here (not in a function)
- { SCMP_SYS(getrlimit), 245 },
- ^
- qemu-seccomp.c:96:7: error: '__NR_time' undeclared here (not in a function)
- { SCMP_SYS(time), 245 },
- ^
- qemu-seccomp.c:185:7: error: '__NR_alarm' undeclared here (not in a function)
- { SCMP_SYS(alarm), 241 },
-
-please refer source files:
- arch/arm/include/uapi/asm/unistd.h
-or kernel header:
- /usr/include/asm/unistd.h
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- qemu-seccomp.c | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/qemu-seccomp.c b/qemu-seccomp.c
-index caa926e..5a78502 100644
---- a/qemu-seccomp.c
-+++ b/qemu-seccomp.c
-@@ -25,15 +25,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(timer_settime), 255 },
- { SCMP_SYS(timer_gettime), 254 },
- { SCMP_SYS(futex), 253 },
-+#if !defined(__ARM_EABI__)
- { SCMP_SYS(select), 252 },
-+ { SCMP_SYS(time), 245 },
-+ { SCMP_SYS(alarm), 241 },
-+ { SCMP_SYS(getrlimit), 245 },
-+ { SCMP_SYS(mmap), 247 },
-+ { SCMP_SYS(socketcall), 250 },
-+ { SCMP_SYS(ipc), 245 },
-+#endif
- { SCMP_SYS(recvfrom), 251 },
- { SCMP_SYS(sendto), 250 },
-- { SCMP_SYS(socketcall), 250 },
- { SCMP_SYS(read), 249 },
- { SCMP_SYS(io_submit), 249 },
- { SCMP_SYS(brk), 248 },
- { SCMP_SYS(clone), 247 },
-- { SCMP_SYS(mmap), 247 },
- { SCMP_SYS(mprotect), 246 },
- { SCMP_SYS(execve), 245 },
- { SCMP_SYS(open), 245 },
-@@ -48,13 +54,11 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(bind), 245 },
- { SCMP_SYS(listen), 245 },
- { SCMP_SYS(semget), 245 },
-- { SCMP_SYS(ipc), 245 },
- { SCMP_SYS(gettimeofday), 245 },
- { SCMP_SYS(readlink), 245 },
- { SCMP_SYS(access), 245 },
- { SCMP_SYS(prctl), 245 },
- { SCMP_SYS(signalfd), 245 },
-- { SCMP_SYS(getrlimit), 245 },
- { SCMP_SYS(set_tid_address), 245 },
- { SCMP_SYS(statfs), 245 },
- { SCMP_SYS(unlink), 245 },
-@@ -93,7 +97,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(times), 245 },
- { SCMP_SYS(exit), 245 },
- { SCMP_SYS(clock_gettime), 245 },
-- { SCMP_SYS(time), 245 },
- { SCMP_SYS(restart_syscall), 245 },
- { SCMP_SYS(pwrite64), 245 },
- { SCMP_SYS(nanosleep), 245 },
-@@ -182,7 +185,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(lstat64), 241 },
- { SCMP_SYS(sendfile64), 241 },
- { SCMP_SYS(ugetrlimit), 241 },
-- { SCMP_SYS(alarm), 241 },
- { SCMP_SYS(rt_sigsuspend), 241 },
- { SCMP_SYS(rt_sigqueueinfo), 241 },
- { SCMP_SYS(rt_tgsigqueueinfo), 241 },
---
-1.9.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
deleted file mode 100644
index cee6a676ab..0000000000
--- a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-fix libcap header issue on some distro
-
-1, When build qemu-native on SLED 11.2, there is an error:
-...
-| In file included from /usr/include/bits/sigcontext.h:28,
-| from /usr/include/signal.h:339,
-| from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/
-qemu-1.4.0/include/qemu-common.h:42,
-| from fsdev/virtfs-proxy-helper.c:23:
-| /usr/include/asm/sigcontext.h:28: error: expected specifier-
-qualifier-list before '__u64'
-| /usr/include/asm/sigcontext.h:191: error: expected specifier-
-qualifier-list before '__u64'
-...
-
-2, The virtfs-proxy-helper.c includes <sys/capability.h> and
-qemu-common.h in sequence. The header include map is:
-(`-->' presents `include')
-...
-"virtfs-proxy-helper.c" --> <sys/capability.h>
-...
-"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
-<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
-<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h>
-...
-
-3, The bug is found on SLED 11.2 x86. In libcap header file
-/usr/include/sys/capability.h, it does evil stuff like this:
-...
- 25 /*
- 26 * Make sure we can be included from userland by preventing
- 27 * capability.h from including other kernel headers
- 28 */
- 29 #define _LINUX_TYPES_H
- 30 #define _LINUX_FS_H
- 31 #define __LINUX_COMPILER_H
- 32 #define __user
- 33
- 34 typedef unsigned int __u32;
- 35 typedef __u32 __le32;
-...
-This completely prevents including /usr/include/linux/types.h.
-The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
-and '__u64' is defined in <asm-generic/int-ll64.h>.
-
-4, Modify virtfs-proxy-helper.c to include <sys/capability.h>
-last to workaround the issue.
-
-http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
-http://patchwork.linuxtv.org/patch/12748/
-
-Upstream-Status: Pending
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- fsdev/virtfs-proxy-helper.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
---- a/fsdev/virtfs-proxy-helper.c
-+++ b/fsdev/virtfs-proxy-helper.c
-@@ -12,7 +12,6 @@
- #include <sys/resource.h>
- #include <getopt.h>
- #include <syslog.h>
--#include <sys/capability.h>
- #include <sys/fsuid.h>
- #include <sys/vfs.h>
- #include <sys/ioctl.h>
-@@ -26,7 +25,11 @@
- #include "9p-iov-marshal.h"
- #include "hw/9pfs/9p-proxy.h"
- #include "fsdev/9p-iov-marshal.h"
--
-+/*
-+ * Include this one last due to some versions of it being buggy:
-+ * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
-+ */
-+#include <sys/capability.h>
- #define PROGNAME "virtfs-proxy-helper"
-
- #ifndef XFS_SUPER_MAGIC
---
-1.7.10.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
deleted file mode 100644
index 91f728042d..0000000000
--- a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-There isn't an option to enable or disable valgrind support, so disable it to avoid non-deterministic builds.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure b/configure
-index b3c4f51..4d3929e 100755
---- a/configure
-+++ b/configure
-@@ -4193,9 +4192,0 @@ valgrind_h=no
--cat > $TMPC << EOF
--#include <valgrind/valgrind.h>
--int main(void) {
-- return 0;
--}
--EOF
--if compile_prog "" "" ; then
-- valgrind_h=yes
--fi
diff --git a/meta/recipes-devtools/qemu/qemu/pathlimit.patch b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
deleted file mode 100644
index 57ab981c61..0000000000
--- a/meta/recipes-devtools/qemu/qemu/pathlimit.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-By default qemu builds a complete list of directories within the user
-emulation sysroot (-L option). The OE sysroot directory is large and
-this is confusing, for example it indexes all pkgdata. In particular this
-confuses strace of qemu binaries with tons of irrelevant paths.
-
-This patch stops the code indexing up front and instead only indexes
-things if/as/when it needs to. This drastically reduces the files it
-reads and reduces memory usage and cleans up strace.
-
-It would also avoid the infinite directory traversal bug in [YOCTO #6996]
-although the code could still be vulnerable if it parsed those specific
-paths.
-
-RP
-2016/3/9
-Upstream-Status: Pending
-
-Index: qemu-2.5.0/util/path.c
-===================================================================
---- qemu-2.5.0.orig/util/path.c
-+++ qemu-2.5.0/util/path.c
-@@ -19,6 +19,7 @@ struct pathelem
- char *name;
- /* Full path name, eg. /usr/gnemul/x86-linux/lib. */
- char *pathname;
-+ int populated_entries;
- struct pathelem *parent;
- /* Children */
- unsigned int num_entries;
-@@ -49,6 +50,7 @@ static struct pathelem *new_entry(const
- new->name = g_strdup(name);
- new->pathname = g_strdup_printf("%s/%s", root, name);
- new->num_entries = 0;
-+ new->populated_entries = 0;
- return new;
- }
-
-@@ -57,15 +59,16 @@ static struct pathelem *new_entry(const
- /* Not all systems provide this feature */
- #if defined(DT_DIR) && defined(DT_UNKNOWN) && defined(DT_LNK)
- # define dirent_type(dirent) ((dirent)->d_type)
--# define is_dir_maybe(type) \
-- ((type) == DT_DIR || (type) == DT_UNKNOWN || (type) == DT_LNK)
-+# define is_not_dir(type) \
-+ ((type) != DT_DIR && (type) != DT_UNKNOWN && (type) != DT_LNK)
- #else
- # define dirent_type(dirent) (1)
--# define is_dir_maybe(type) (type)
-+# define is_not_dir(type) (0)
- #endif
-
- static struct pathelem *add_dir_maybe(struct pathelem *path)
- {
-+ unsigned int i;
- DIR *dir;
-
- if ((dir = opendir(path->pathname)) != NULL) {
-@@ -78,6 +81,11 @@ static struct pathelem *add_dir_maybe(st
- }
- closedir(dir);
- }
-+
-+ for (i = 0; i < path->num_entries; i++)
-+ (path->entries[i])->parent = path;
-+
-+ path->populated_entries = 1;
- return path;
- }
-
-@@ -93,26 +101,16 @@ static struct pathelem *add_entry(struct
- e = &root->entries[root->num_entries-1];
-
- *e = new_entry(root->pathname, root, name);
-- if (is_dir_maybe(type)) {
-- *e = add_dir_maybe(*e);
-+ if (is_not_dir(type)) {
-+ (*e)->populated_entries = 1;
- }
-
- return root;
- }
-
--/* This needs to be done after tree is stabilized (ie. no more reallocs!). */
--static void set_parents(struct pathelem *child, struct pathelem *parent)
--{
-- unsigned int i;
--
-- child->parent = parent;
-- for (i = 0; i < child->num_entries; i++)
-- set_parents(child->entries[i], child);
--}
--
- /* FIXME: Doesn't handle DIR/.. where DIR is not in emulated dir. */
- static const char *
--follow_path(const struct pathelem *cursor, const char *name)
-+follow_path(struct pathelem *cursor, struct pathelem **source, const char *name)
- {
- unsigned int i, namelen;
-
-@@ -123,14 +121,18 @@ follow_path(const struct pathelem *curso
- return cursor->pathname;
-
- if (strneq(name, namelen, ".."))
-- return follow_path(cursor->parent, name + namelen);
-+ return follow_path(cursor->parent, &cursor->parent, name + namelen);
-
- if (strneq(name, namelen, "."))
-- return follow_path(cursor, name + namelen);
-+ return follow_path(cursor, source, name + namelen);
-+
-+ if (!cursor->populated_entries)
-+ *source = add_dir_maybe(cursor);
-+ cursor = *source;
-
- for (i = 0; i < cursor->num_entries; i++)
- if (strneq(name, namelen, cursor->entries[i]->name))
-- return follow_path(cursor->entries[i], name + namelen);
-+ return follow_path(cursor->entries[i], &cursor->entries[i], name + namelen);
-
- /* Not found */
- return NULL;
-@@ -164,8 +166,6 @@ void init_paths(const char *prefix)
- g_free(base->name);
- g_free(base);
- base = NULL;
-- } else {
-- set_parents(base, base);
- }
- }
-
-@@ -177,5 +177,5 @@ const char *path(const char *name)
- if (!base || !name || name[0] != '/')
- return name;
-
-- return follow_path(base, name) ?: name;
-+ return follow_path(base, &base, name) ?: name;
- }
diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
deleted file mode 100644
index 173394fd02..0000000000
--- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -4468,10 +4468,6 @@ fi
- if test "$gcov" = "yes" ; then
- CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
- LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
--elif test "$fortify_source" = "yes" ; then
-- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
--elif test "$debug" = "no"; then
-- CFLAGS="-O2 $CFLAGS"
- fi
-
- ##########################################
diff --git a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
deleted file mode 100644
index c7425ab8d4..0000000000
--- a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-qemu: Add addition environment space to boot loader qemu-system-mips
-
-Upstream-Status: Inappropriate - OE uses deep paths
-
-If you create a project with very long directory names like 128 characters
-deep and use NFS, the kernel arguments will be truncated. The kernel will
-accept longer strings such as 1024 bytes, but the qemu boot loader defaulted
-to only 256 bytes. This patch expands the limit.
-
-Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- hw/mips/mips_malta.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
-index 9d521cc..17c0391 100644
---- a/hw/mips/mips_malta.c
-+++ b/hw/mips/mips_malta.c
-@@ -53,7 +53,7 @@
-
- #define ENVP_ADDR 0x80002000l
- #define ENVP_NB_ENTRIES 16
--#define ENVP_ENTRY_SIZE 256
-+#define ENVP_ENTRY_SIZE 1024
-
- /* Hardware addresses */
- #define FLASH_ADDRESS 0x1e000000ULL
---
-1.7.10.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/run-ptest b/meta/recipes-devtools/qemu/qemu/run-ptest
index f4b8e97e1e..2206b31922 100644
--- a/meta/recipes-devtools/qemu/qemu/run-ptest
+++ b/meta/recipes-devtools/qemu/qemu/run-ptest
@@ -1,8 +1,10 @@
#!/bin/sh
#
#This script is used to run qemu test suites
-ptestdir=$(pwd)
-cd tests
+#
+ptestdir=$(dirname "$(readlink -f "$0")")
export SRC_PATH=$ptestdir
-make -k runtest-TESTS | sed '/: OK/ s/^/PASS: /g'
+
+cd $ptestdir/tests
+make -f Makefile.include -k runtest-TESTS | sed '/: OK/ s/^/PASS: /g'
diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch b/meta/recipes-devtools/qemu/qemu/wacom.patch
deleted file mode 100644
index cd06aa4ac6..0000000000
--- a/meta/recipes-devtools/qemu/qemu/wacom.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-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
-real wcom device.
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-
-Upstream-Status: Submitted
-2014/11/27
-
-Index: qemu-2.1.0/hw/usb/dev-wacom.c
-===================================================================
---- qemu-2.1.0.orig/hw/usb/dev-wacom.c 2014-08-01 15:12:17.000000000 +0100
-+++ qemu-2.1.0/hw/usb/dev-wacom.c 2014-10-12 12:13:30.540306042 +0100
-@@ -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) */
-+ 0x09, 0x01, /* Usage (Pointer) */
-+ 0xa1, 0x00, /* Collection (Physical) */
-+ 0x05, 0x09, /* Usage Page (Button) */
-+ 0x19, 0x01, /* Usage Minimum (1) */
-+ 0x29, 0x05, /* Usage Maximum (5) */
-+ 0x15, 0x00, /* Logical Minimum (0) */
-+ 0x25, 0x01, /* Logical Maximum (1) */
-+ 0x95, 0x05, /* Report Count (5) */
-+ 0x75, 0x01, /* Report Size (1) */
-+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
-+ 0x95, 0x01, /* Report Count (1) */
-+ 0x75, 0x03, /* Report Size (3) */
-+ 0x81, 0x01, /* Input (Constant) */
-+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
-+ 0x09, 0x30, /* Usage (X) */
-+ 0x09, 0x31, /* Usage (Y) */
-+ 0x15, 0x81, /* Logical Minimum (-127) */
-+ 0x25, 0x7f, /* Logical Maximum (127) */
-+ 0x75, 0x08, /* Report Size (8) */
-+ 0x95, 0x02, /* Report Count (2) */
-+ 0x81, 0x06, /* Input (Data, Variable, Relative) */
-+ 0xc0, /* End Collection */
-+ 0xc0, /* End Collection */
-+ 0x05, 0x0d, /* Usage Page (Digitizer) */
-+ 0x09, 0x01, /* Usage (Digitizer) */
-+ 0xa1, 0x01, /* Collection (Application) */
-+ 0x85, 0x02, /* Report ID (2) */
-+ 0xa1, 0x00, /* Collection (Physical) */
-+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
-+ 0x09, 0x01, /* Usage (Digitizer) */
-+ 0x15, 0x00, /* Logical Minimum (0) */
-+ 0x26, 0xff, 0x00, /* Logical Maximum (255) */
-+ 0x75, 0x08, /* Report Size (8) */
-+ 0x95, 0x08, /* Report Count (8) */
-+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
-+ 0xc0, /* End Collection */
-+ 0x09, 0x01, /* Usage (Digitizer) */
-+ 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) */
-+ 0x05, 0x0d, /* Usage Page (Digitizer) */
-+ 0x09, 0x22, /* Usage (Finger) */
-+ 0xa1, 0x00, /* Collection (Physical) */
-+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
-+ 0x09, 0x01, /* Usage (Digitizer) */
-+ 0x15, 0x00, /* Logical Minimum (0) */
-+ 0x26, 0xff, 0x00, /* Logical Maximum */
-+ 0x75, 0x08, /* Report Size (8) */
-+ 0x95, 0x02, /* Report Count (2) */
-+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
-+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
-+ 0x09, 0x30, /* Usage (X) */
-+ 0x35, 0x00, /* Physical Minimum */
-+ 0x46, 0xe0, 0x2e, /* Physical Maximum */
-+ 0x26, 0xe0, 0x01, /* Logical Maximum */
-+ 0x75, 0x10, /* Report Size (16) */
-+ 0x95, 0x01, /* Report Count (1) */
-+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
-+ 0x09, 0x31, /* Usage (Y) */
-+ 0x46, 0x40, 0x1f, /* Physical Maximum */
-+ 0x26, 0x40, 0x01, /* Logical Maximum */
-+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
-+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
-+ 0x09, 0x01, /* Usage (Digitizer) */
-+ 0x26, 0xff, 0x00, /* Logical Maximum */
-+ 0x75, 0x08, /* Report Size (8) */
-+ 0x95, 0x0d, /* Report Count (13) */
-+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
-+ 0xc0, /* End Collection */
-+ 0xc0, /* End Collection */
-+};
-+
-+
- static const USBDescIface desc_iface_wacom = {
- .bInterfaceNumber = 0,
- .bNumEndpoints = 1,
-@@ -85,7 +168,7 @@
- 0x00, /* u8 country_code */
- 0x01, /* u8 num_descriptors */
- 0x22, /* u8 type: Report */
-- 0x6e, 0, /* u16 len */
-+ sizeof(qemu_tablet_hid_report_descriptor), 0, /* u16 len */
- },
- },
- },
-@@ -265,6 +350,15 @@
- }
-
- switch (request) {
-+ case InterfaceRequest | USB_REQ_GET_DESCRIPTOR:
-+ switch (value >> 8) {
-+ case 0x22:
-+ memcpy(data, qemu_tablet_hid_report_descriptor,
-+ sizeof(qemu_tablet_hid_report_descriptor));
-+ p->actual_length = sizeof(qemu_tablet_hid_report_descriptor);
-+ break;
-+ }
-+ break;
- case WACOM_SET_REPORT:
- if (s->mouse_grabbed) {
- qemu_remove_mouse_event_handler(s->eh_entry);
diff --git a/meta/recipes-devtools/qemu/qemu_2.7.0.bb b/meta/recipes-devtools/qemu/qemu_2.7.0.bb
deleted file mode 100644
index 619b8ed449..0000000000
--- a/meta/recipes-devtools/qemu/qemu_2.7.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require qemu.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
- file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-
-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://no-valgrind.patch \
- file://pathlimit.patch \
- file://qemu-2.5.0-cflags.patch \
-"
-
-SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
-SRC_URI[md5sum] = "08d4d06d1cb598efecd796137f4844ab"
-SRC_URI[sha256sum] = "326e739506ba690daf69fc17bd3913a6c313d9928d743bd8eddb82f403f81e53"
-
-COMPATIBLE_HOST_class-target_mips64 = "null"
-
-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/qemu_4.1.0.bb b/meta/recipes-devtools/qemu/qemu_4.1.0.bb
new file mode 100644
index 0000000000..f0c1daabe1
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu_4.1.0.bb
@@ -0,0 +1,25 @@
+BBCLASSEXTEND = "nativesdk"
+
+require qemu.inc
+
+# error: a parameter list without types is only allowed in a function definition
+# void (*_function)(sigval_t);
+COMPATIBLE_HOST_libc-musl = 'null'
+
+DEPENDS = "glib-2.0 zlib pixman bison-native"
+
+RDEPENDS_${PN}_class-target += "bash"
+
+EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}"
+EXTRA_OECONF_append_class-target_mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
+EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
+
+do_install_append_class-nativesdk() {
+ ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
+}
+
+PACKAGECONFIG ??= " \
+ fdt sdl kvm \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
+"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index 53b302d657..a0448a1803 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -1,46 +1,39 @@
SUMMARY = "QEMU wrapper script"
+HOMEPAGE = "http://qemu.org"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
S = "${WORKDIR}"
+DEPENDS += "qemu-native"
+
inherit qemu
+do_populate_sysroot[depends] = ""
+
do_install () {
install -d ${D}${bindir_crossscripts}/
- echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper
qemu_binary=${@qemu_target_binary(d)}
- qemu_options='${QEMU_OPTIONS}'
- echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper
- fallback_qemu_bin=
- case $qemu_binary in
- "qemu-i386")
- fallback_qemu_bin=qemu-x86_64
- ;;
- "qemu-x86_64")
- fallback_qemu_bin=qemu-i386
- ;;
- *)
- ;;
- esac
-
- if [ -n "$fallback_qemu_bin" ]; then
-
- cat >> ${D}${bindir_crossscripts}/qemuwrapper << EOF
-rc=\$?
-if [ \$rc = 255 ]; then
- $fallback_qemu_bin "\$@"
- rc=\$?
+ qemu_options='${QEMU_OPTIONS} -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir}'
+
+ cat >> ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper << EOF
+#!/bin/sh
+set -x
+
+if [ ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)} = False -a "${PN}" != "nativesdk-qemuwrapper-cross" ]; then
+ echo "qemuwrapper: qemu usermode is not supported"
+ exit 1
fi
-exit \$rc
-EOF
- fi
- chmod +x ${D}${bindir_crossscripts}/qemuwrapper
+$qemu_binary $qemu_options "\$@"
+EOF
+
+ chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper
}
SYSROOT_DIRS += "${bindir_crossscripts}"
INHIBIT_DEFAULT_DEPS = "1"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/quilt/quilt-native.inc b/meta/recipes-devtools/quilt/quilt-native.inc
deleted file mode 100644
index 5c4b0a217e..0000000000
--- a/meta/recipes-devtools/quilt/quilt-native.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native util-linux-native"
-
-INHIBIT_AUTOTOOLS_DEPS = "1"
-
-inherit native
-
-PATCHTOOL = "patch"
-EXTRA_OECONF = "--disable-nls"
-
-do_configure () {
- oe_runconf
-}
-
-do_install_append () {
- # Dummy quiltrc file for patch.bbclass
- install -d ${D}${sysconfdir}/
- touch ${D}${sysconfdir}/quiltrc
-}
diff --git a/meta/recipes-devtools/quilt/quilt-native_0.64.bb b/meta/recipes-devtools/quilt/quilt-native_0.64.bb
deleted file mode 100644
index 6bc7dcdb7a..0000000000
--- a/meta/recipes-devtools/quilt/quilt-native_0.64.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require quilt.inc
-require quilt-native.inc
diff --git a/meta/recipes-devtools/quilt/quilt-native_0.66.bb b/meta/recipes-devtools/quilt/quilt-native_0.66.bb
new file mode 100644
index 0000000000..22374425fa
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt-native_0.66.bb
@@ -0,0 +1,2 @@
+require quilt.inc
+inherit native
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
index 512b798d73..d6d06c049c 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -1,48 +1,65 @@
SUMMARY = "Tool for working with series of patches"
+DESCRIPTION = "Quilt is a tool to manage large sets of patches by keeping \
+track of the changes each patch makes. Patches can be applied, un-applied,\
+refreshed, etc."
HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/"
SECTION = "devel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
- file://install.patch \
file://run-ptest \
file://Makefile \
- file://test.sh \
+ file://test.sh \
+ file://0001-tests-Allow-different-output-from-mv.patch \
"
-SRC_URI[md5sum] = "fc0310db5868a0873d602d4332a76d43"
-SRC_URI[sha256sum] = "c4bfd3282214a288e8d3e921ae4d52e73e24c4fead72b5446752adee99a7affd"
+SRC_URI_append_class-target = " file://gnu_patch_test_fix_target.patch"
+
+SRC_URI[md5sum] = "6800c2404a2c0598ab2eff92a636ba70"
+SRC_URI[sha256sum] = "314b319a6feb13bf9d0f9ffa7ce6683b06919e734a41275087ea457cc9dc6e07"
inherit autotools-brokensep ptest
-EXTRA_OECONF_darwin += "--without-date \
- --without-getopt \
- "
+INHIBIT_AUTOTOOLS_DEPS_class-native = "1"
+PATCHTOOL_class-native = "patch"
CLEANBROKEN = "1"
-PACKAGES += "guards guards-doc"
-FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
- ${bindir}/quilt ${libdir}/quilt"
-FILES_guards = "${bindir}/guards"
-FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}"
-FILES_guards-doc = "${mandir}/man1/guards.1"
+EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch"
+EXTRA_OECONF_append_class-native = " --disable-nls"
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash"
-RDEPENDS_${PN} = "bash"
+# Make sure we don't have "-w" in shebang lines: it breaks using
+# "/usr/bin/env perl" as parser
+do_configure_prepend () {
+ find ${S} -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \;
+}
-EXTRA_OE_MAKE_ARGS_darwin ?= ""
-EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}"
+# Don't setup symlinks to host utilities, we don't need them
+do_configure_append () {
+ sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i ${S}/Makefile
+}
-CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash"
+do_configure_class-native () {
+ oe_runconf
+}
-# quilt ignores DESTDIR
+# quilt Makefiles install to BUILD_ROOT instead of DESTDIR
do_install () {
- oe_runmake ${EXTRA_OE_MAKE_ARGS} install
+ oe_runmake 'BUILD_ROOT=${D}' install
# cleanup unpackaged files
rm -rf ${D}/${datadir}/emacs
}
+do_install_append_class-native () {
+ # Dummy quiltrc file for patch.bbclass
+ install -d ${D}${sysconfdir}/
+ touch ${D}${sysconfdir}/quiltrc
+}
+
do_compile_ptest() {
oe_runmake bin/patch-wrapper test/.depend
}
@@ -56,9 +73,20 @@ do_install_ptest() {
cp ${WORKDIR}/test.sh ${D}${PTEST_PATH}
}
+PACKAGES += "guards guards-doc"
+
+FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
+ ${bindir}/quilt ${libdir}/quilt"
+FILES_guards = "${bindir}/guards"
+FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}"
+FILES_guards-doc = "${mandir}/man1/guards.1"
+
+RDEPENDS_${PN} = "bash patch diffstat bzip2 util-linux less"
+RDEPENDS_${PN}_class-native = "diffstat-native patch-native bzip2-native"
+
RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \
perl-module-filehandle perl-module-getopt-std \
perl-module-posix perl-module-file-temp \
perl-module-text-parsewords perl-module-overloading \
- bash util-linux-getopt \
+ bash util-linux-getopt patch \
"
diff --git a/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch b/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
new file mode 100644
index 0000000000..6d0f4aedfd
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
@@ -0,0 +1,29 @@
+From e9fa816677993e520adff8bba26cb3e71f5a6665 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 29 Mar 2017 15:11:59 +0300
+Subject: [PATCH] tests: Allow different output from mv
+
+busybox mv has different error messages: fix the test
+
+Upstream-Status: Inappropriate [embedded]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ test/failbackup.test | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/failbackup.test b/test/failbackup.test
+index 5f0f54f..0902b12 100644
+--- a/test/failbackup.test
++++ b/test/failbackup.test
+@@ -16,7 +16,7 @@ What happens when refresh fails because of a permission error?
+ $ cat > test.txt
+ < This is updated test.txt.
+ $ quilt refresh --backup
+- >~ mv: cannot move [`']?patches/test.diff'? to [`']?patches/test.diff~'?: Permission denied
++ >~ mv: .*: Permission denied
+ $ echo %{?}
+ > 1
+
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/quilt/quilt/Makefile b/meta/recipes-devtools/quilt/quilt/Makefile
index 7b3ac8a492..1f6cd2479c 100644
--- a/meta/recipes-devtools/quilt/quilt/Makefile
+++ b/meta/recipes-devtools/quilt/quilt/Makefile
@@ -2,7 +2,8 @@ PATH := $(CURDIR)/bin:$(CURDIR)/compat:$(PATH)
QUILT_DIR := $(CURDIR)/quilt
QUILTRC := $(CURDIR)/test/test.quiltrc
export QUILT_DIR QUILTRC
-CHECK_ENV := P=patches/; _P=../patches/; export P _P
+CHECK_ENV := P=patches/; _P=../patches/; export P _P;
+CHECK_ENV += QUILT_PC=.pc; export QUILT_PC
-include test/.depend
check-% : test/%.test
diff --git a/meta/recipes-devtools/quilt/quilt/aclocal.patch b/meta/recipes-devtools/quilt/quilt/aclocal.patch
deleted file mode 100644
index daf44295ec..0000000000
--- a/meta/recipes-devtools/quilt/quilt/aclocal.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-Upstream-Status: Pending
-
-Add the aclocal.m4 as acinclude.m4
-
-Index: quilt-0.47/acinclude.m4
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ quilt-0.47/acinclude.m4 2006-10-10 17:05:56.000000000 +0100
-@@ -0,0 +1,119 @@
-+dnl Allow configure to specify a specific binary
-+dnl 1: Environment variable
-+dnl 2: binary name
-+dnl 3: optional list of alternative binary names
-+dnl 4: optional list of additional search directories
-+AC_DEFUN([QUILT_COMPAT_PROG_PATH],[
-+ m4_define([internal_$2_cmd],[esyscmd(ls compat/$2.in 2>/dev/null)])
-+
-+ AC_ARG_WITH($2, AC_HELP_STRING(
-+ [--with-$2], [name of the $2 executable to use]
-+ m4_if(internal_$2_cmd,[],[],[ (use --without-$2
-+ to use an internal mechanism)])),
-+ [
-+ if test x"$withval" = xnone; then
-+ AC_MSG_ERROR([Invalid configure argument. use --without-$2])
-+ fi
-+ if test x"$withval" != xno; then
-+ AC_MSG_CHECKING(for $2)
-+ $1="$withval"
-+ if test -e "$$1"; then
-+ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
-+ AC_MSG_ERROR([$$1 is not an executable file])
-+ fi
-+ fi
-+ AC_MSG_RESULT([$$1])
-+ if test ! -e "$$1"; then
-+ AC_MSG_WARN([$$1 does not exist])
-+ fi
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ],[
-+ m4_if([$3],[],[
-+ AC_PATH_PROG($1,$2,,$PATH:$4)
-+ ],[
-+ AC_PATH_PROGS($1,$3,,$PATH:$4)
-+ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ])
-+ m4_if([$4],[],[],[
-+ if test -n "$$1"; then
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+ for dir in "$4"; do
-+ if test "`dirname $$1`" = "$dir"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ break
-+ fi
-+ done
-+ IFS="$as_save_IFS"
-+ fi
-+ ])
-+ ])
-+ if test -z "$$1"; then
-+ m4_if(internal_$2_cmd,[],[
-+ AC_MSG_ERROR([Please specify the location of $2 with the option '--with-$2'])
-+ ],[
-+ AC_MSG_WARN([Using internal $2 mechanism. Use option '--with-$2' to override])
-+ COMPAT_PROGRAMS="$COMPAT_PROGRAMS $2"
-+ $1=$2
-+ INTERNAL_$1=1
-+ ])
-+ fi
-+ AC_SUBST($1)
-+])
-+
-+dnl Allow configure to specify a specific binary
-+dnl This variant is for optional binaries.
-+dnl 1: Environment variable
-+dnl 2: binary name
-+dnl 3: optional list of alternative binary names
-+dnl 4: optional list of additional search directories
-+AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[
-+ AC_ARG_WITH($2, AC_HELP_STRING(
-+ [--with-$2], [name of the $2 executable to use]),
-+ [
-+ if test x"$withval" != xno; then
-+ AC_MSG_CHECKING(for $2)
-+ $1="$withval"
-+ if test -e "$$1"; then
-+ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
-+ AC_MSG_ERROR([$$1 is not an executable file])
-+ fi
-+ fi
-+ AC_MSG_RESULT([$$1])
-+ if test ! -e "$$1"; then
-+ AC_MSG_WARN([$$1 does not exist])
-+ fi
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ],[
-+ m4_if([$3],[],[
-+ AC_PATH_PROG($1,$2,,$PATH:$4)
-+ ],[
-+ AC_PATH_PROGS($1,$3,,$PATH:$4)
-+ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ])
-+ m4_if([$4],[],[],[
-+ if test -n "$$1"; then
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+ for dir in "$4"; do
-+ if test "`dirname $$1`" = "$dir"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ break
-+ fi
-+ done
-+ IFS="$as_save_IFS"
-+ fi
-+ ])
-+ if test -z "$$1"; then
-+ AC_MSG_WARN([$2 not found, some optional functionalities will be missing])
-+ fi
-+ ])
-+ if test -z "$$1"; then
-+ $1=$2
-+ fi
-+ AC_SUBST($1)
-+])
diff --git a/meta/recipes-devtools/quilt/quilt/install.patch b/meta/recipes-devtools/quilt/quilt/install.patch
deleted file mode 100644
index e2a7af6550..0000000000
--- a/meta/recipes-devtools/quilt/quilt/install.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Pending
-
---- quilt-0.47/Makefile.in 2008-12-31 19:09:13.000000000 +0000
-+++ quilt-0.47/Makefile.in.orig 2008-08-21 13:21:32.000000000 +0100
-@@ -13,7 +13,7 @@
- mandir := @mandir@
- localedir := $(datadir)/locale
- emacsdir := $(datadir)/emacs/site-lisp
--etcdir := $(subst /usr/etc,/etc,$(prefix)/etc)
-+etcdir := @sysconfdir@
-
- INSTALL := @INSTALL@
- POD2MAN := @POD2MAN@
diff --git a/meta/recipes-devtools/quilt/quilt/run-ptest b/meta/recipes-devtools/quilt/quilt/run-ptest
index 4b808aee4f..d2de5c855a 100755
--- a/meta/recipes-devtools/quilt/quilt/run-ptest
+++ b/meta/recipes-devtools/quilt/quilt/run-ptest
@@ -2,7 +2,7 @@
THIS_SH=/bin/sh
ln -sf /bin/ed /usr/bin/ed
-/usr/sbin/adduser --disabled-password quilttest
+/usr/sbin/adduser --disabled-password --gecos "" quilttest
su -c "${THIS_SH} ./test.sh" quilttest
/usr/sbin/deluser quilttest
rm -f /usr/bin/ed
diff --git a/meta/recipes-devtools/quilt/quilt_0.64.bb b/meta/recipes-devtools/quilt/quilt_0.64.bb
deleted file mode 100644
index 00f900a112..0000000000
--- a/meta/recipes-devtools/quilt/quilt_0.64.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require quilt.inc
-inherit gettext
-RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
-SRC_URI += "file://aclocal.patch \
- file://gnu_patch_test_fix_target.patch \
- "
-
-# fix build-distro specific perl path in the target perl scripts
-do_install_append() {
- for perlscript in ${D}${datadir}/quilt/scripts/remove-trailing-ws ${D}${datadir}/quilt/scripts/dependency-graph ${D}${datadir}/quilt/scripts/edmail ${D}${bindir}/guards
- do
- if [ -f $perlscript ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' $perlscript
- fi
- done
-}
diff --git a/meta/recipes-devtools/quilt/quilt_0.66.bb b/meta/recipes-devtools/quilt/quilt_0.66.bb
new file mode 100644
index 0000000000..ff9726576e
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt_0.66.bb
@@ -0,0 +1,2 @@
+require quilt.inc
+inherit gettext
diff --git a/meta/recipes-devtools/remake/remake.inc b/meta/recipes-devtools/remake/remake.inc
deleted file mode 100644
index df889fcf9f..0000000000
--- a/meta/recipes-devtools/remake/remake.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Makefile debugger which is gnumake compatible"
-DESCRIPTION = "remake is a patched and modernized version of GNU make \
-utility that adds improved error reporting, the ability to trace \
-execution in a comprehensible way, and a debugger."
-
-HOMEPAGE = "http://bashdb.sourceforge.net/remake/"
-SECTION = "devel"
-
-SRC_URI = "git://github.com/rocky/remake.git"
-
-inherit autotools gettext update-alternatives pkgconfig
-
-ALTERNATIVE_${PN} = "make"
-ALTERNATIVE_LINK_NAME[make] = "${bindir}/make"
-ALTERNATIVE_TARGET[make] = "${bindir}/remake"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-devtools/remake/remake/version-remake.texi.patch b/meta/recipes-devtools/remake/remake/version-remake.texi.patch
deleted file mode 100644
index fa6329e067..0000000000
--- a/meta/recipes-devtools/remake/remake/version-remake.texi.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-version-remake.texi is not there but it is required by remake.texi,
-just add it for getting the 'make remake.info' works.
-
-==============================================================
-diff --git a/doc/version-remake.texi b/doc/version-remake.texi
-new file mode 100644
-index 0000000..2a3b72b
---- /dev/null
-+++ b/doc/version-remake.texi
-@@ -0,0 +1,4 @@
-+@set UPDATED 10 June 2012
-+@set UPDATED-MONTH June 2012
-+@set EDITION 3.82+dbg-0.9git
-+@set VERSION 3.82+dbg-0.9git
diff --git a/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb b/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb
deleted file mode 100644
index 8eab7e3a0d..0000000000
--- a/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
-require remake.inc
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+)\+dbg.+)"
-SRC_URI += "file://version-remake.texi.patch \
- "
-SRCREV = "cf54641d50a0165bb17622b3e9770f426ccbc561"
-S = "${WORKDIR}/git"
-
-DEPENDS += "readline guile"
-# Need to add "gettext-native" dependency to remake-native.
-# By default only "gettext-minimal-native" is added
-# when inherit gettext.
-DEPENDS_class-native += "gettext-native"
-PROVIDES += "virtual/make"
-
-do_configure_prepend() {
- # remove the default LINGUAS since we are not going to generate languages
- rm ${S}/po/LINGUAS
- touch ${S}/po/LINGUAS
- # create config.rpath which required by configure.ac
- ( cd ${S}; autopoint || touch config.rpath )
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
new file mode 100644
index 0000000000..ac6dcaf101
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
@@ -0,0 +1,40 @@
+From e3eff024826550aec4a6a5baef7210a29faf299d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 9 Mar 2017 18:54:02 +0200
+Subject: [PATCH] Add a color setting for mips64_n32 binaries
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ build/rpmfc.c | 1 +
+ rpmrc.in | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/build/rpmfc.c b/build/rpmfc.c
+index d38a10916..c8e2f876a 100644
+--- a/build/rpmfc.c
++++ b/build/rpmfc.c
+@@ -622,6 +622,7 @@ exit:
+ static const struct rpmfcTokens_s rpmfcTokens[] = {
+ { "directory", RPMFC_INCLUDE },
+
++ { "N32 MIPS64", RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
+ { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE },
+ { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE },
+
+diff --git a/rpmrc.in b/rpmrc.in
+index abc08fc31..f5bc820d8 100644
+--- a/rpmrc.in
++++ b/rpmrc.in
+@@ -133,6 +133,8 @@ archcolor: mipsr6el 1
+ archcolor: mips64r6 2
+ archcolor: mips64r6el 2
+
++archcolor: mips64_n32 4
++
+ archcolor: m68k 1
+
+ archcolor: m68kmint 1
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
new file mode 100644
index 0000000000..80e2f0fad7
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
@@ -0,0 +1,33 @@
+From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 9 Jan 2017 18:52:11 +0200
+Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
+ a short-circuited way.
+
+Upstream permits short-circuiting only for local testing; Yocto on the other
+hand produces rpms that way by design.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ build/pack.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index 1261cdbba..bb2d6f4f6 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+ headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
+ }
+
+- if (cheating) {
+- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
+- }
+-
+ { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
+ char *binRpm, *binDir;
+ binRpm = headerFormat(pkg->header, binFormat, &errorString);
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
new file mode 100644
index 0000000000..82e7328757
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -0,0 +1,58 @@
+From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 27 Feb 2017 09:43:30 +0200
+Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
+ default configuration and macros.
+
+Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ configure.ac | 2 +-
+ macros.in | 2 +-
+ rpm.am | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 09af7c4..9bd6903 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1055,7 +1055,7 @@ else
+ usrprefix=$prefix
+ fi
+
+-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
++RPMCONFIGDIR="`echo ${libdir}/rpm`"
+ AC_SUBST(RPMCONFIGDIR)
+
+ AC_SUBST(OBJDUMP)
+diff --git a/macros.in b/macros.in
+index a3aa7a9..62cee5c 100644
+--- a/macros.in
++++ b/macros.in
+@@ -970,7 +970,7 @@ package or when debugging this package.\
+ %_sharedstatedir %{_prefix}/com
+ %_localstatedir %{_prefix}/var
+ %_lib lib
+-%_libdir %{_exec_prefix}/%{_lib}
++%_libdir @libdir@
+ %_includedir %{_prefix}/include
+ %_infodir %{_datadir}/info
+ %_mandir %{_datadir}/man
+diff --git a/rpm.am b/rpm.am
+index 82c2d7c..6341b51 100644
+--- a/rpm.am
++++ b/rpm.am
+@@ -1,10 +1,10 @@
+ # Internal binaries
+ ## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
+-rpmlibexecdir = $(prefix)/lib/rpm
++rpmlibexecdir = $(libdir)/rpm
+
+ # Host independent config files
+ ## HACK: it probably should be $(datadir)/rpm
+-rpmconfigdir = $(prefix)/lib/rpm
++rpmconfigdir = $(libdir)/rpm
+
+ # Libtool version (current-revision-age) for all our libraries
+ rpm_version_info = 9:0:1
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
new file mode 100644
index 0000000000..96eb418952
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
@@ -0,0 +1,38 @@
+From 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 10 Jan 2017 14:11:30 +0200
+Subject: [PATCH] Do not read config files from $HOME
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmrc.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c
+index 4ed991321..19fe80f98 100644
+--- a/lib/rpmrc.c
++++ b/lib/rpmrc.c
+@@ -458,8 +458,7 @@ static void setDefaults(void)
+ if (!defrcfiles) {
+ defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
+ confdir, "/" RPMCANONVENDOR "/rpmrc", ":",
+- SYSCONFDIR "/rpmrc", ":",
+- "~/.rpmrc", NULL);
++ SYSCONFDIR "/rpmrc", ":");
+ }
+
+ #ifndef MACROFILES
+@@ -471,8 +470,7 @@ static void setDefaults(void)
+ confdir, "/" RPMCANONVENDOR "/macros", ":",
+ SYSCONFDIR "/rpm/macros.*", ":",
+ SYSCONFDIR "/rpm/macros", ":",
+- SYSCONFDIR "/rpm/%{_target}/macros", ":",
+- "~/.rpmmacros", NULL);
++ SYSCONFDIR "/rpm/%{_target}/macros", ":");
+ }
+ #else
+ macrofiles = MACROFILES;
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
new file mode 100644
index 0000000000..41cdf6ed77
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
@@ -0,0 +1,28 @@
+From a674b9cc7af448d7c6748bc163bf37dc14a57f09 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 20 Jan 2017 13:32:06 +0200
+Subject: [PATCH] Do not reset the PATH environment variable before running
+ scriptlets.
+
+We add lots of native stuff into it and scriptlets rely on that.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ lib/rpmscript.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 6a31e0d..2b0e438 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -184,7 +184,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
+ if (ipath && ipath[5] != '%')
+ path = ipath;
+
+- xx = setenv("PATH", path, 1);
++ //xx = setenv("PATH", path, 1);
+ free(ipath);
+ }
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch b/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
new file mode 100644
index 0000000000..0b1d6298a9
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
@@ -0,0 +1,48 @@
+From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 27 Feb 2017 14:43:21 +0200
+Subject: [PATCH 1/9] Fix build with musl C library.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ configure.ac | 3 ++-
+ rpmio/digest_nss.c | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c04a2e8d1..c9d9ac16d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
+ # Check for libelf library. Prefer external, otherwise none.
+ WITH_LIBELF_LIB=
+ AC_CHECK_HEADER([libelf.h])
++AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes])
+ AC_CHECK_HEADERS([gelf.h], [
+ AC_CHECK_LIB(elf, gelf_getvernaux, [
+ AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
+@@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [
+ ])
+ ])
+ AC_SUBST(WITH_LIBELF_LIB)
+-AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes])
++AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes])
+
+ AC_CHECK_HEADERS([dwarf.h], [
+ WITH_LIBDWARF=yes
+diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
+index 992d9acf6..e11920e3e 100644
+--- a/rpmio/digest_nss.c
++++ b/rpmio/digest_nss.c
+@@ -1,5 +1,6 @@
+ #include "system.h"
+
++#include <signal.h>
+ #include <pthread.h>
+ #include <nss.h>
+ #include <sechash.h>
+--
+2.14.2
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
new file mode 100644
index 0000000000..6e44f0b7fc
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
@@ -0,0 +1,84 @@
+From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 25 May 2017 18:15:27 +0300
+Subject: [PATCH 1/4] Split binary package building into a separate function
+
+So that it can be run as a thread pool task.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ build/pack.c | 33 +++++++++++++++++++++------------
+ 1 file changed, 21 insertions(+), 12 deletions(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index 518f4e92a..ccfd614cc 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
+ return RPMRC_OK;
+ }
+
+-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
+ {
+- rpmRC rc;
+- const char *errorString;
+- Package pkg;
+- char *pkglist = NULL;
+-
+- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+- char *fn;
++ const char *errorString;
++ rpmRC rc = RPMRC_OK;
+
+ if (pkg->fileList == NULL)
+- continue;
++ return rc;
+
+ if ((rc = processScriptFiles(spec, pkg)))
+ return rc;
+@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+ headerGetString(pkg->header, RPMTAG_NAME), errorString);
+ return RPMRC_FAIL;
+ }
+- fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
++ *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
+ if ((binDir = strchr(binRpm, '/')) != NULL) {
+ struct stat st;
+ char *dn;
+@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+ free(binRpm);
+ }
+
+- rc = writeRPM(pkg, NULL, fn, NULL);
++ rc = writeRPM(pkg, NULL, *filename, NULL);
+ if (rc == RPMRC_OK) {
+ /* Do check each written package if enabled */
+- char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
++ char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
+ if (pkgcheck[0] != ' ') {
+ rc = checkPackages(pkgcheck);
+ }
+ free(pkgcheck);
++ }
++ return rc;
++}
++
++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++{
++ rpmRC rc;
++ Package pkg;
++ char *pkglist = NULL;
++
++ for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
++ char *fn = NULL;
++ rc = packageBinary(spec, pkg, cookie, cheating, &fn);
++ if (rc == RPMRC_OK) {
+ rstrcat(&pkglist, fn);
+ rstrcat(&pkglist, " ");
+ }
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
new file mode 100644
index 0000000000..4020a31092
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
@@ -0,0 +1,62 @@
+From a89daa75ac970d8e247edc762d1181e9a5b0c5d0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 17 Jan 2017 14:07:17 +0200
+Subject: [PATCH] When cross-installing, execute package scriptlets without
+ chrooting into destination rootfs
+
+This is triggered only when RPM_NO_CHROOT_FOR_SCRIPTS environment variable is defined.
+Otherwise they will trigger an explosion of failures, obviously.
+
+Amended 2018-07-03 by Olof Johansson <olofjn@axis.com>:
+
+ Remove leaking temporary scriptlet files
+
+ Since we tell dnf to run rpm with debug output, this will result in rpm not
+ cleaning up written temporary scriptlet files (same flag controls both
+ behaviors). This wouldn't have been a problem since we normally would use the
+ target sysroot also for temporary files, but we need to chroot out to be able
+ to actually run the rpm scriptlets (purpose of this patch), so the temporary
+ files are written to the host's /var/tmp/ directory, causing a gradual
+ resource leakage on the host system for every RPM based do_rootfs task
+ executed.
+
+ Signed-off-by: Olof Johansson <olofjn@axis.com>
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmscript.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index cc98c4885..f8bd3df04 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -394,8 +394,7 @@ exit:
+ Fclose(out); /* XXX dup'd STDOUT_FILENO */
+
+ if (fn) {
+- if (!rpmIsDebug())
+- unlink(fn);
++ unlink(fn);
+ free(fn);
+ }
+ free(mline);
+@@ -428,7 +427,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
+
+ if (rc != RPMRC_FAIL) {
+ if (script_type & RPMSCRIPTLET_EXEC) {
+- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
++ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) {
++ rpmChrootOut();
++ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
++ rpmChrootIn();
++ } else {
++ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
++ }
+ } else {
+ rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
+ }
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch b/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
new file mode 100644
index 0000000000..24aa4c7fff
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
@@ -0,0 +1,58 @@
+From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 27 Aug 2019 17:42:34 +0200
+Subject: [PATCH] mono-find-provides/requires: do not use monodis from the host
+
+There was a host contamination issue here: if monodis was installed
+on the host, do_package would use that to resolve dependencies
+of mono libraries (and often fail in that). Without monodis,
+no dependencies are resolved, which is seemingly how things
+are supposed to work.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ scripts/mono-find-provides | 8 ++++----
+ scripts/mono-find-requires | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
+index 9348457d3..b28872ffb 100644
+--- a/scripts/mono-find-provides
++++ b/scripts/mono-find-provides
+@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
+ build_bindir="$2/usr/bin"
+ build_libdir="$2$3"
+
+-if [ -x $build_bindir/monodis ]; then
+- monodis="$build_bindir/monodis"
++if [ -x $build_bindir/monodis.bogus ]; then
++ monodis="$build_bindir/monodis.bogus"
+ export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+-elif [ -x /usr/bin/monodis ]; then
+- monodis="/usr/bin/monodis"
++elif [ -x /usr/bin/monodis.bogus ]; then
++ monodis="/usr/bin/monodis.bogus"
+ else
+ exit 0;
+ fi
+diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
+index ea58cae48..d270169e1 100644
+--- a/scripts/mono-find-requires
++++ b/scripts/mono-find-requires
+@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
+ build_bindir="$2/usr/bin"
+ build_libdir="$2$3"
+
+-if [ -x $build_bindir/monodis ]; then
+- monodis="$build_bindir/monodis"
++if [ -x $build_bindir/monodis.bogus ]; then
++ monodis="$build_bindir/monodis.bogus"
+ export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+-elif [ -x /usr/bin/monodis ]; then
+- monodis="/usr/bin/monodis"
++elif [ -x /usr/bin/monodis.bogus ]; then
++ monodis="/usr/bin/monodis.bogus"
+ else
+ exit 0;
+ fi
diff --git a/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch b/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch
new file mode 100644
index 0000000000..a6c58699d3
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch
@@ -0,0 +1,32 @@
+perl: disable auto requires
+
+When generating automatic requirements, it's possible for perl scripts to
+declare 'optional' dependencies. These seem to often be incorrect and will
+cause installation failures in OE. Instead of fixing the perl scripts, it
+was decided it is better to simply disable the automatic dependency
+generation. This matches the behavior from the previous RPM5 implementation.
+
+Upstream-Status: Inappropriate [OE specific configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: git/fileattrs/perl.attr
+===================================================================
+--- git.orig/fileattrs/perl.attr
++++ git/fileattrs/perl.attr
+@@ -1,3 +1,3 @@
+-%__perl_requires %{_rpmconfigdir}/perl.req
++#__perl_requires %{_rpmconfigdir}/perl.req
+ %__perl_magic ^.*[Pp]erl .*$
+ %__perl_flags exeonly
+Index: git/fileattrs/perllib.attr
+===================================================================
+--- git.orig/fileattrs/perllib.attr
++++ git/fileattrs/perllib.attr
+@@ -1,5 +1,5 @@
+ %__perllib_provides %{_rpmconfigdir}/perl.prov
+-%__perllib_requires %{_rpmconfigdir}/perl.req
++#__perllib_requires %{_rpmconfigdir}/perl.req
+ %__perllib_magic ^Perl[[:digit:]] module source.*
+ %__perllib_path \\.pm$
+ %__perllib_flags magic_and_path
diff --git a/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch b/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch
new file mode 100644
index 0000000000..6454785254
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch
@@ -0,0 +1,65 @@
+From 0066b862bb3a09f39295abd5d972a53ac8dc1555 Mon Sep 17 00:00:00 2001
+From: Peter Bergin <peter@berginkonsult.se>
+Date: Wed, 19 Sep 2018 15:12:31 +0200
+Subject: [PATCH] rpm/rpmio.c: restrict virtual memory usage if limit set
+
+A solution to avoid OOM situation when the virtual memory is restricted
+for a user (ulimit -v). As the lzopen_internal function is run in parallel
+one instance per CPU thread the available virtual memory is limited per
+CPU thread.
+
+Upstream-Status: Pending [merge of multithreading patches to upstream]
+
+Signed-off-by: Peter Bergin <peter@berginkonsult.se>
+---
+ rpmio/rpmio.c | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index e051c98..b3c56b6 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -845,6 +845,40 @@ static LZFILE *lzopen_internal(const char *mode, int fd, int xz)
+ }
+ #endif
+
++ struct rlimit virtual_memory;
++ getrlimit(RLIMIT_AS, &virtual_memory);
++ if (virtual_memory.rlim_cur != RLIM_INFINITY) {
++ const uint64_t virtual_memlimit = virtual_memory.rlim_cur;
++ const uint64_t virtual_memlimit_per_cpu_thread =
++ virtual_memlimit / lzma_cputhreads();
++ uint64_t memory_usage_virt;
++ rpmlog(RPMLOG_NOTICE, "XZ: virtual memory restricted to %lu and "
++ "per CPU thread %lu\n", virtual_memlimit, virtual_memlimit_per_cpu_thread);
++ /* keep reducing the number of compression threads until memory
++ usage falls below the limit per CPU thread*/
++ while ((memory_usage_virt = lzma_stream_encoder_mt_memusage(&mt_options)) >
++ virtual_memlimit_per_cpu_thread) {
++ /* If number of threads goes down to zero lzma_stream_encoder will
++ * will return UINT64_MAX. We must check here to avoid an infinite loop.
++ * If we get into situation that one thread requires more virtual memory
++ * than available we set one thread, print error message and try anyway. */
++ if (--mt_options.threads == 0) {
++ mt_options.threads = 1;
++ rpmlog(RPMLOG_WARNING,
++ "XZ: Could not adjust number of threads to get below "
++ "virtual memory limit %lu. usage %lu\n",
++ virtual_memlimit_per_cpu_thread, memory_usage_virt);
++ break;
++ }
++ }
++ if (threads != (int)mt_options.threads)
++ rpmlog(RPMLOG_NOTICE,
++ "XZ: Adjusted the number of threads from %d to %d to not "
++ "exceed the memory usage limit of %lu bytes\n",
++ threads, mt_options.threads, virtual_memlimit);
++
++ }
++
+ ret = lzma_stream_encoder_mt(&lzfile->strm, &mt_options);
+ }
+ #endif
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
new file mode 100644
index 0000000000..b3dbc319b6
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
@@ -0,0 +1,72 @@
+From 383c0b097b7eba16801a9e3c4b8e36a4b6de74ab Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 20 Jan 2017 13:33:05 +0200
+Subject: [PATCH 2/2] Add support for prefixing /etc from RPM_ETCCONFIGDIR
+ environment variable
+
+This is needed so that rpm can pick up target-specific configuration
+from target rootfs instead of its own native sysroot.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmrc.c | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c
+index 19fe80f98..6b27b3941 100644
+--- a/lib/rpmrc.c
++++ b/lib/rpmrc.c
+@@ -455,10 +455,14 @@ const char * lookupInDefaultTable(const char * name,
+ static void setDefaults(void)
+ {
+ const char *confdir = rpmConfigDir();
++ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
++ if (etcconfdir == NULL)
++ etcconfdir = "";
++
+ if (!defrcfiles) {
+ defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
+ confdir, "/" RPMCANONVENDOR "/rpmrc", ":",
+- SYSCONFDIR "/rpmrc", ":");
++ etcconfdir, SYSCONFDIR "/rpmrc", ":", NULL);
+ }
+
+ #ifndef MACROFILES
+@@ -468,9 +472,9 @@ static void setDefaults(void)
+ confdir, "/platform/%{_target}/macros", ":",
+ confdir, "/fileattrs/*.attr", ":",
+ confdir, "/" RPMCANONVENDOR "/macros", ":",
+- SYSCONFDIR "/rpm/macros.*", ":",
+- SYSCONFDIR "/rpm/macros", ":",
+- SYSCONFDIR "/rpm/%{_target}/macros", ":");
++ etcconfdir, SYSCONFDIR "/rpm/macros.*", ":",
++ etcconfdir, SYSCONFDIR "/rpm/macros", ":",
++ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", ":", NULL);
+ }
+ #else
+ macrofiles = MACROFILES;
+@@ -989,7 +993,11 @@ static void read_auxv(void)
+ */
+ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
+ {
+- const char * const platform_path = SYSCONFDIR "/rpm/platform";
++ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
++ if (etcconfdir == NULL)
++ etcconfdir = "";
++
++ const char * const platform_path = rstrscat(NULL, etcconfdir, SYSCONFDIR "/rpm/platform", NULL);
+ static struct utsname un;
+ char * chptr;
+ canonEntry canon;
+@@ -1286,6 +1294,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
+
+ if (arch) *arch = un.machine;
+ if (os) *os = un.sysname;
++ free(platform_path);
+ }
+
+ static
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch b/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
new file mode 100644
index 0000000000..d10041c2e1
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
@@ -0,0 +1,127 @@
+From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 25 May 2017 19:30:20 +0300
+Subject: [PATCH 1/3] Run binary package creation via thread pools.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
+ configure.ac | 3 +++
+ 2 files changed, 70 insertions(+), 14 deletions(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index ccfd614cc..ed5b9ab4e 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+ return rc;
+ }
+
+-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++struct binaryPackageTaskData
+ {
+- rpmRC rc;
+ Package pkg;
++ char *filename;
++ rpmRC result;
++ struct binaryPackageTaskData *next;
++};
++
++static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
++{
++ struct binaryPackageTaskData *tasks = NULL;
++ struct binaryPackageTaskData *task = NULL;
++ struct binaryPackageTaskData *prev = NULL;
++
++ for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
++ task = rcalloc(1, sizeof(*task));
++ task->pkg = pkg;
++ if (pkg == spec->packages) {
++ // the first package needs to be processed ahead of others, as they copy
++ // changelog data from it, and so otherwise data races would happen
++ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
++ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
++ tasks = task;
++ }
++ if (prev != NULL) {
++ prev->next = task;
++ }
++ prev = task;
++ }
++
++ #pragma omp parallel
++ #pragma omp single
++ // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults
++ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
++ if (task != tasks)
++ #pragma omp task
++ {
++ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
++ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
++ }
++ }
++
++ return tasks;
++}
++
++static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
++{
++ while (tasks != NULL) {
++ struct binaryPackageTaskData* next = tasks->next;
++ rfree(tasks->filename);
++ rfree(tasks);
++ tasks = next;
++ }
++}
++
++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++{
+ char *pkglist = NULL;
+
+- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+- char *fn = NULL;
+- rc = packageBinary(spec, pkg, cookie, cheating, &fn);
+- if (rc == RPMRC_OK) {
+- rstrcat(&pkglist, fn);
+- rstrcat(&pkglist, " ");
+- }
+- free(fn);
+- if (rc != RPMRC_OK) {
+- pkglist = _free(pkglist);
+- return rc;
+- }
++ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
++
++ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
++ if (task->result == RPMRC_OK) {
++ rstrcat(&pkglist, task->filename);
++ rstrcat(&pkglist, " ");
++ } else {
++ _free(pkglist);
++ freeBinaryPackageTasks(tasks);
++ return RPMRC_FAIL;
++ }
+ }
++ freeBinaryPackageTasks(tasks);
+
+ /* Now check the package set if enabled */
+ if (pkglist != NULL) {
+diff --git a/configure.ac b/configure.ac
+index a506ec819..59fa0acaf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
+
+ PKG_PROG_PKG_CONFIG
+
++AC_OPENMP
++RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
++
+ dnl Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_AWK
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch b/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
new file mode 100644
index 0000000000..c348ae5330
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
@@ -0,0 +1,207 @@
+From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 30 May 2017 13:58:30 +0300
+Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
+ thread-safe
+
+Otherwise multithreaded rpm building explodes in various ways due
+to data races.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 47 insertions(+), 9 deletions(-)
+
+diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
+index 30a57eb10..58ba95a02 100644
+--- a/rpmio/rpmstrpool.c
++++ b/rpmio/rpmstrpool.c
+@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
+ return ht;
+ }
+
++static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid);
++
+ static void poolHashResize(rpmstrPool pool, int numBuckets)
+ {
+ poolHash ht = pool->hash;
+@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets)
+
+ for (int i=0; i<ht->numBuckets; i++) {
+ if (!ht->buckets[i].keyid) continue;
+- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
++ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
+ for (unsigned int j=0;;j++) {
+ unsigned int hash = hashbucket(keyHash, j) % numBuckets;
+ if (!buckets[hash].keyid) {
+@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke
+ ht->buckets[hash].keyid = keyid;
+ ht->keyCount++;
+ break;
+- } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) {
++ } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) {
+ return;
+ }
+ }
+@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
+ int maxcollisions = 0;
+
+ for (i=0; i<ht->numBuckets; i++) {
+- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
++ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
+ for (unsigned int j=0;;j++) {
+ unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets;
+ if (hash==i) {
+@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
+
+ pool->hash = poolHashCreate(sizehint);
+ for (int i = 1; i <= pool->offs_size; i++)
+- poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
++ poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
+ }
+
+ rpmstrPool rpmstrPoolCreate(void)
+@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
+
+ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
+ {
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool) {
+ if (pool->nrefs > 1) {
+ pool->nrefs--;
+@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
+ free(pool);
+ }
+ }
++ }
+ return NULL;
+ }
+
+ rpmstrPool rpmstrPoolLink(rpmstrPool pool)
+ {
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool)
+ pool->nrefs++;
++ }
+ return pool;
+ }
+
+ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
+ {
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool && !pool->frozen) {
+ if (!keephash) {
+ pool->hash = poolHashFree(pool->hash);
+@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
+ pool->offs_alloced * sizeof(*pool->offs));
+ pool->frozen = 1;
+ }
++ }
+ }
+
+ void rpmstrPoolUnfreeze(rpmstrPool pool)
+ {
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool) {
+ if (pool->hash == NULL) {
+ rpmstrPoolRehash(pool);
+ }
+ pool->frozen = 0;
+ }
++ }
+ }
+
+ static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash)
+@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen,
+ return 0;
+ }
+
+- s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
++ s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
+ /* pool string could be longer than keylen, require exact matche */
+ if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
+ return ht->buckets[hash].keyid;
+@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen,
+ rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create)
+ {
+ rpmsid sid = 0;
+-
++ #pragma omp critical(rpmstrpool)
++ {
+ if (s != NULL) {
+ unsigned int hash = rstrnhash(s, slen);
+ sid = strn2id(pool, s, slen, hash, create);
+ }
++ }
+ return sid;
+ }
+
+ rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
+ {
+ rpmsid sid = 0;
+-
++ #pragma omp critical(rpmstrpool)
++ {
+ if (s != NULL) {
+ size_t slen;
+ unsigned int hash = rstrlenhash(s, &slen);
+ sid = strn2id(pool, s, slen, hash, create);
+ }
++ }
+ return sid;
+ }
+
+-const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
++static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
+ {
+ const char *s = NULL;
+ if (pool && sid > 0 && sid <= pool->offs_size)
+@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
+ return s;
+ }
+
++const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
++{
++ const char *s = NULL;
++ #pragma omp critical(rpmstrpool)
++ {
++ s = rpmstrPoolStrNoLock(pool, sid);
++ }
++ return s;
++}
++
+ size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
+ {
+ size_t slen = 0;
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool && sid > 0 && sid <= pool->offs_size) {
+ slen = strlen(pool->offs[sid]);
+ }
++ }
+ return slen;
+ }
+
+@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
+
+ rpmsid rpmstrPoolNumStr(rpmstrPool pool)
+ {
+- return (pool != NULL) ? pool->offs_size : 0;
++ rpmsid id = 0;
++ #pragma omp critical(rpmstrpool)
++ {
++ if (pool) {
++ id = pool->offs_size;
++ }
++ }
++ return id;
+ }
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
new file mode 100644
index 0000000000..652e30b3e4
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
@@ -0,0 +1,336 @@
+From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 8 Jun 2017 17:08:09 +0300
+Subject: [PATCH] build/pack.c: remove static local variables from buildHost()
+ and getBuildTime()
+
+Their use is causing difficult to diagnoze data races when building multiple
+packages in parallel, and is a bad idea in general, as it also makes it more
+difficult to reason about code.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ build/build.c | 54 ++++++++++++++++++++++++++++--
+ build/pack.c | 84 +++++++++--------------------------------------
+ build/rpmbuild_internal.h | 8 +++--
+ 3 files changed, 74 insertions(+), 72 deletions(-)
+
+diff --git a/build/build.c b/build/build.c
+index 13c3df2..b154f08 100644
+--- a/build/build.c
++++ b/build/build.c
+@@ -6,6 +6,8 @@
+ #include "system.h"
+
+ #include <errno.h>
++#include <netdb.h>
++#include <time.h>
+ #include <sys/wait.h>
+
+ #include <rpm/rpmlog.h>
+@@ -16,6 +18,50 @@
+
+ #include "debug.h"
+
++static rpm_time_t getBuildTime(void)
++{
++ rpm_time_t buildTime = 0;
++ char *srcdate;
++ time_t epoch;
++ char *endptr;
++
++ srcdate = getenv("SOURCE_DATE_EPOCH");
++ if (srcdate) {
++ errno = 0;
++ epoch = strtol(srcdate, &endptr, 10);
++ if (srcdate == endptr || *endptr || errno != 0)
++ rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
++ else
++ buildTime = (int32_t) epoch;
++ } else
++ buildTime = (int32_t) time(NULL);
++
++ return buildTime;
++}
++
++static char * buildHost(void)
++{
++ char* hostname;
++ struct hostent *hbn;
++ char *bhMacro;
++
++ bhMacro = rpmExpand("%{?_buildhost}", NULL);
++ if (strcmp(bhMacro, "") != 0) {
++ rasprintf(&hostname, "%s", bhMacro);
++ } else {
++ hostname = rcalloc(1024, sizeof(*hostname));
++ (void) gethostname(hostname, 1024);
++ hbn = gethostbyname(hostname);
++ if (hbn)
++ strcpy(hostname, hbn->h_name);
++ else
++ rpmlog(RPMLOG_WARNING,
++ _("Could not canonicalize hostname: %s\n"), hostname);
++ }
++ free(bhMacro);
++ return(hostname);
++}
++
+ /**
+ */
+ static rpmRC doRmSource(rpmSpec spec)
+@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+ rpmRC rc = RPMRC_OK;
+ int test = (what & RPMBUILD_NOBUILD);
+ char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
++ const char* host = buildHost();
++ rpm_time_t buildTime = getBuildTime();
++
+
+ if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
+ getenv("SOURCE_DATE_EPOCH") == NULL) {
+@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+ goto exit;
+
+ if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
+- (rc = packageSources(spec, &cookie)))
++ (rc = packageSources(spec, &cookie, buildTime, host)))
+ goto exit;
+
+ if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
+- (rc = packageBinaries(spec, cookie, (didBuild == 0))))
++ (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host)))
+ goto exit;
+
+ if ((what & RPMBUILD_CLEAN) &&
+@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+ (void) unlink(spec->specFile);
+
+ exit:
++ free(host);
+ free(cookie);
+ spec->rootDir = NULL;
+ if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
+diff --git a/build/pack.c b/build/pack.c
+index df15876..17a4b09 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -6,8 +6,6 @@
+ #include "system.h"
+
+ #include <errno.h>
+-#include <netdb.h>
+-#include <time.h>
+ #include <sys/wait.h>
+
+ #include <rpm/rpmlib.h> /* RPMSIGTAG*, rpmReadPackageFile */
+@@ -152,57 +150,6 @@ exit:
+ return rc;
+ }
+
+-static rpm_time_t * getBuildTime(void)
+-{
+- static rpm_time_t buildTime[1];
+- char *srcdate;
+- time_t epoch;
+- char *endptr;
+-
+- if (buildTime[0] == 0) {
+- srcdate = getenv("SOURCE_DATE_EPOCH");
+- if (srcdate) {
+- errno = 0;
+- epoch = strtol(srcdate, &endptr, 10);
+- if (srcdate == endptr || *endptr || errno != 0)
+- rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
+- else
+- buildTime[0] = (int32_t) epoch;
+- } else
+- buildTime[0] = (int32_t) time(NULL);
+- }
+-
+- return buildTime;
+-}
+-
+-static const char * buildHost(void)
+-{
+- static char hostname[1024];
+- static int oneshot = 0;
+- struct hostent *hbn;
+- char *bhMacro;
+-
+- if (! oneshot) {
+- bhMacro = rpmExpand("%{?_buildhost}", NULL);
+- if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
+- strcpy(hostname, bhMacro);
+- } else {
+- if (strcmp(bhMacro, "") != 0)
+- rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n"));
+- (void) gethostname(hostname, sizeof(hostname));
+- hbn = gethostbyname(hostname);
+- if (hbn)
+- strcpy(hostname, hbn->h_name);
+- else
+- rpmlog(RPMLOG_WARNING,
+- _("Could not canonicalize hostname: %s\n"), hostname);
+- }
+- free(bhMacro);
+- oneshot = 1;
+- }
+- return(hostname);
+-}
+-
+ static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
+ {
+ struct TriggerFileEntry *p;
+@@ -476,7 +423,8 @@ exit:
+ * order to how the RPM format is laid on disk.
+ */
+ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
+- const char *fileName, char **cookie)
++ const char *fileName, char **cookie,
++ rpm_time_t buildTime, const char* buildHost)
+ {
+ FD_t fd = NULL;
+ char * rpmio_flags = NULL;
+@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
+
+ /* Create and add the cookie */
+ if (cookie) {
+- rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
++ rasprintf(cookie, "%s %d", buildHost, buildTime);
+ headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
+ }
+
+@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
+ return RPMRC_OK;
+ }
+
+-static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
++static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost)
+ {
+ const char *errorString;
+ rpmRC rc = RPMRC_OK;
+@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+ headerCopyTags(spec->packages->header, pkg->header, copyTags);
+
+ headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
+- headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
+- headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
++ headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
++ headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
+
+ if (spec->sourcePkgId != NULL) {
+ headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
+@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+ free(binRpm);
+ }
+
+- rc = writeRPM(pkg, NULL, *filename, NULL);
++ rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost);
+ if (rc == RPMRC_OK) {
+ /* Do check each written package if enabled */
+ char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
+@@ -719,7 +667,7 @@ struct binaryPackageTaskData
+ struct binaryPackageTaskData *next;
+ };
+
+-static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
++static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
+ {
+ struct binaryPackageTaskData *tasks = NULL;
+ struct binaryPackageTaskData *task = NULL;
+@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
+ if (pkg == spec->packages) {
+ // the first package needs to be processed ahead of others, as they copy
+ // changelog data from it, and so otherwise data races would happen
+- task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
++ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
+ tasks = task;
+ }
+@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
+ if (task != tasks)
+ #pragma omp task
+ {
+- task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
++ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
+ }
+ }
+@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
+ }
+ }
+
+-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
+ {
+ char *pkglist = NULL;
+
+- struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
++ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);
+
+ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
+ if (task->result == RPMRC_OK) {
+@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+ return RPMRC_OK;
+ }
+
+-rpmRC packageSources(rpmSpec spec, char **cookie)
++rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost)
+ {
+ Package sourcePkg = spec->sourcePackage;
+ rpmRC rc;
+@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
+
+ /* Add some cruft */
+ headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
+- headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost());
+- headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
++ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
++ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
+ headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
+
+ /* XXX this should be %_srpmdir */
+@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
+ char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
+
+ spec->sourcePkgId = NULL;
+- rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
++ rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost);
+
+ /* Do check SRPM package if enabled */
+ if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
+diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
+index 439b7d3..07e8338 100644
+--- a/build/rpmbuild_internal.h
++++ b/build/rpmbuild_internal.h
+@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
+ * @param spec spec file control structure
+ * @param cookie build identifier "cookie" or NULL
+ * @param cheating was build shortcircuited?
++ * @param buildTime the build timestamp that goes into packages
++ * @param buildHost the hostname where the build is happening
+ * @return RPMRC_OK on success
+ */
+ RPM_GNUC_INTERNAL
+-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating);
++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost);
+
+ /** \ingroup rpmbuild
+ * Generate source package.
+ * @param spec spec file control structure
+ * @retval cookie build identifier "cookie" or NULL
++ * @param buildTime the build timestamp that goes into packages
++ * @param buildHost the hostname where the build is happening
+ * @return RPMRC_OK on success
+ */
+ RPM_GNUC_INTERNAL
+-rpmRC packageSources(rpmSpec spec, char **cookie);
++rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost);
+
+ RPM_GNUC_INTERNAL
+ int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
diff --git a/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch b/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
new file mode 100644
index 0000000000..4ac5c38f06
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
@@ -0,0 +1,33 @@
+From 5141d50d7b3d3c209a22c53deedb4ceef014401d Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Mon, 15 May 2017 10:21:08 +0200
+Subject: [PATCH 09/15] Do not require that ELF binaries are executable to be
+ identifiable
+
+There is nothing that requires, e.g., a DSO to be executable, but it
+is still an ELF binary and should be identified as such.
+
+Upstream probably expects all ELF binaries to be marked as executable,
+but rather than imposing such a limitation for OE, allow any file to
+be identified as an ELF binary regardless of whether it is executable
+or not.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+
+---
+ fileattrs/elf.attr | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr
+index 5805dd0ee..3516f309d 100644
+--- a/fileattrs/elf.attr
++++ b/fileattrs/elf.attr
+@@ -1,4 +1,3 @@
+ %__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
+ %__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
+ %__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
+-%__elf_flags exeonly
+--
+2.14.2
+
diff --git a/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
new file mode 100644
index 0000000000..43e9859ef3
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
@@ -0,0 +1,55 @@
+From 989e425d416474c191b020d0825895e3df4bd033 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 10 Jan 2019 18:14:18 +0100
+Subject: [PATCH] rpmscript.c: change logging level around scriptlets to INFO
+ from DEBUG
+
+That way we can debug scriptlet failures without writing lots of
+irrelevant noise to rootfs logs.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmscript.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 2b0e43862..e319673f1 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -226,7 +226,7 @@ static char * writeScript(const char *cmd, const char *script)
+ if (Ferror(fd))
+ goto exit;
+
+- if (rpmIsDebug() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) {
++ if (rpmIsVerbose() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) {
+ static const char set_x[] = "set -x\n";
+ /* Assume failures will be caught by the write below */
+ Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
+@@ -258,7 +258,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
+ char *mline = NULL;
+ rpmRC rc = RPMRC_FAIL;
+
+- rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname);
++ rpmlog(RPMLOG_INFO, "%s: scriptlet start\n", sname);
+
+ if (script) {
+ fn = writeScript(*argvp[0], script);
+@@ -310,7 +310,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
+ sname, strerror(errno));
+ goto exit;
+ } else if (pid == 0) {/* Child */
+- rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n",
++ rpmlog(RPMLOG_INFO, "%s: execv(%s) pid %d\n",
+ sname, *argvp[0], (unsigned)getpid());
+
+ fclose(in);
+@@ -353,7 +353,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
+ reaped = waitpid(pid, &status, 0);
+ } while (reaped == -1 && errno == EINTR);
+
+- rpmlog(RPMLOG_DEBUG, "%s: waitpid(%d) rc %d status %x\n",
++ rpmlog(RPMLOG_INFO, "%s: waitpid(%d) rc %d status %x\n",
+ sname, (unsigned)pid, (unsigned)reaped, status);
+
+ if (reaped < 0) {
diff --git a/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch b/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
deleted file mode 100644
index e9b73b8bfc..0000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 06967a50f20095f5ca30b8214f4c98ba0f5262bf Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Sun, 3 Apr 2016 06:55:25 +0200
-Subject: [PATCH] Disable __sync_add_and_fetch_8 on nios2
-
-The NIOS2 softcore does not implement the __sync_add_and_fetch_8,
-so disable it accordingly.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Submitted
----
- rpmio/bson.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rpmio/bson.h b/rpmio/bson.h
-index 57023f1..60c7d02 100644
---- a/rpmio/bson.h
-+++ b/rpmio/bson.h
-@@ -880,7 +880,7 @@ BSON_END_DECLS
- BSON_BEGIN_DECLS
-
- /* Some architectures do not support __sync_add_and_fetch_8 */
--#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
-+#if (__mips == 32) || (__nios2__) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
- # define __BSON_NEED_ATOMIC_64 1
- #endif
-
---
-2.8.0.rc3
-
diff --git a/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch b/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
deleted file mode 100644
index c9fb268687..0000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-[PATCH] define EM_AARCH64
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-EM_AARCH64 maybe not be defined due to old version elf.h, and lead to
-that debugedit can not work on aarch64 elf object files, since there is
-no other dependence, except these two macro, define them to make
-debugedit work on aarch64 elf files.
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- tools/debugedit.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/tools/debugedit.c b/tools/debugedit.c
-index de693ed..d16a641 100644
---- a/tools/debugedit.c
-+++ b/tools/debugedit.c
-@@ -35,6 +35,13 @@
-
- #include <gelf.h>
-
-+#ifndef EM_AARCH64
-+#define EM_AARCH64 183 /* ARM AARCH64 */
-+#endif
-+#ifndef R_AARCH64_ABS32
-+#define R_AARCH64_ABS32 258
-+#endif
-+
- /* some defines taken from the dwarf standard */
-
- #define DW_TAG_compile_unit 0x11
---
-1.9.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch b/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
deleted file mode 100644
index 70dd4ff532..0000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-From 0af17c2ae86c1e8e42b96f6dface08f535bb55ad Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 14 Feb 2016 08:33:24 +0000
-Subject: [PATCH] rpm: Fix build on musl
-
-Provide alternatives to assumptions about glibc
-on linux
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Updated to 5.4.16 (CVS)
-
-The patch will likely need additional rework before it can be accepted upsteam
-due to the way MUSL changes are patched in.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
----
-Upstream-Status: Pending
-
- lib/poptALL.c | 2 ++
- rpmio/fts.c | 4 ++++
- rpmio/poptIO.c | 2 ++
- rpmqv.c | 2 ++
- system.h | 13 ++++++-------
- tools/debugedit.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
- tools/rpm2cpio.c | 2 ++
- tools/rpmcache.c | 2 ++
- tools/rpmcmp.c | 2 ++
- tools/rpmdeps-oecore.c | 2 ++
- tools/rpmdeps.c | 2 ++
- tools/rpmdigest.c | 2 ++
- tools/rpmfind.c | 6 +++---
- 13 files changed, 78 insertions(+), 10 deletions(-)
-
-Index: rpm-5.4.15/rpmio/fts.c
-===================================================================
---- rpm-5.4.15.orig/rpmio/fts.c
-+++ rpm-5.4.15/rpmio/fts.c
-@@ -124,6 +124,10 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
- # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
- #endif
-
-+#ifndef _STAT_VER
-+# define _STAT_VER 0
-+#endif
-+
- #if !defined(_D_EXACT_NAMLEN)
- # define _D_EXACT_NAMLEN(d) (strlen((d)->d_name))
- #endif
-Index: rpm-5.4.15/tools/debugedit.c
-===================================================================
---- rpm-5.4.15.orig/tools/debugedit.c
-+++ rpm-5.4.15/tools/debugedit.c
-@@ -22,7 +22,12 @@
- #include <byteswap.h>
- #include <endian.h>
- #include <errno.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#else
-+#include <stdarg.h>
-+void error(int, int, const char *, ...);
-+#endif
- #include <limits.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -1535,6 +1540,48 @@ handle_build_id (DSO *dso, Elf_Data *bui
- puts (hex);
- }
- }
-+#ifndef __GLIBC__
-+extern char *__progname;
-+
-+void (*error_print_progname)(void) = 0;
-+unsigned int error_message_count = 0;
-+int error_one_per_line = 0;
-+
-+static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
-+{
-+ if (file && error_one_per_line) {
-+ static const char *oldfile;
-+ static unsigned int oldline;
-+ if (line == oldline && strcmp(file, oldfile) == 0)
-+ return;
-+ oldfile = file;
-+ oldline = line;
-+ }
-+ if (error_print_progname)
-+ error_print_progname();
-+ else
-+ fprintf(stderr, "%s: ", __progname);
-+ if (file)
-+ fprintf(stderr, "%s:%u: ", file, line);
-+ vfprintf(stderr, fmt, ap);
-+ if (e)
-+ fprintf(stderr, ": %s", strerror(e));
-+ putc('\n', stderr);
-+ fflush(stderr);
-+ error_message_count++;
-+ if (status)
-+ exit(status);
-+}
-+
-+void error(int status, int e, const char *fmt, ...)
-+{
-+ va_list ap;
-+ va_start(ap,fmt);
-+ eprint(status, e, 0, 0, fmt, ap);
-+ va_end(ap);
-+}
-+
-+#endif
-
- /* It avoided the segment fault while file's bss offset have a large number.
- See https://bugzilla.redhat.com/show_bug.cgi?id=1019707
-Index: rpm-5.4.15/tools/rpmfind.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmfind.c
-+++ rpm-5.4.15/tools/rpmfind.c
-@@ -1175,7 +1175,7 @@ find_parsenum(PLAN *plan, const char *op
- * and endchar points to the beginning of the string we know we have
- * a syntax error.
- */
--#if defined(__sun)
-+#if defined(__sun) || !defined(__GLIBC_)
- value = strtoll(str, &endchar, 10);
- #else
- value = strtoq(str, &endchar, 10);
-@@ -1215,7 +1215,7 @@ find_parsetime(PLAN *plan, const char *o
- break;
- }
-
--#if defined(__sun)
-+#if defined(__sun) || !defined(__GLIBC_)
- value = strtoll(str, &unit, 10);
- #else
- value = strtoq(str, &unit, 10);
-@@ -1253,7 +1253,7 @@ find_parsetime(PLAN *plan, const char *o
- str = unit + 1;
- if (*str == '\0') /* EOS */
- break;
--#if defined(__sun)
-+#if defined(__sun) || !defined(__GLIBC_)
- value = strtoll(str, &unit, 10);
- #else
- value = strtoq(str, &unit, 10);
-Index: rpm-5.4.15/system.h
-===================================================================
---- rpm-5.4.15.orig/system.h
-+++ rpm-5.4.15/system.h
-@@ -372,16 +372,15 @@ extern int _tolower(int) __THROW /*@*/;
- #define __progname __assert_program_name
- #endif
- #define setprogname(pn)
-+/*@unchecked@*/
-+extern const char *__progname;
- #else
--#define __progname program_name
--#define setprogname(pn) \
-- { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
-- else __progname = pn; \
-- }
--#endif
-+#define setprogname(pn)
-+#define progname __progname
-
- /*@unchecked@*/
--extern const char *__progname;
-+extern char *__progname;
-+#endif
-
- /* -- Retrofit missing prototypes (if needed). */
- #ifdef __cplusplus
-Index: rpm-5.4.15/rpmio/poptIO.c
-===================================================================
---- rpm-5.4.15.orig/rpmio/poptIO.c
-+++ rpm-5.4.15/rpmio/poptIO.c
-@@ -65,7 +65,9 @@ extern int _rpmsvn_debug;
- GENfree(rpmioP)
- #endif /* __cplusplus */
-
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
-
- #if !defined(POPT_ARGFLAG_TOGGLE) /* XXX compat with popt < 1.15 */
- #define POPT_ARGFLAG_TOGGLE 0
-Index: rpm-5.4.15/lib/poptALL.c
-===================================================================
---- rpm-5.4.15.orig/lib/poptALL.c
-+++ rpm-5.4.15/lib/poptALL.c
-@@ -4,7 +4,9 @@
- */
-
- #include "system.h"
-+#ifdef __GLIBC__
- extern const char *__progname;
-+#endif
-
- #if defined(RPM_VENDOR_WINDRIVER)
- const char *__usrlibrpm = USRLIBRPM;
-Index: rpm-5.4.15/tools/rpm2cpio.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpm2cpio.c
-+++ rpm-5.4.15/tools/rpm2cpio.c
-@@ -1,7 +1,9 @@
- /* rpmarchive: spit out the main archive portion of a package */
-
- #include "system.h"
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
-
- #include <rpmio.h>
- #include <rpmiotypes.h> /* XXX fnpyKey */
-Index: rpm-5.4.15/tools/rpmcache.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmcache.c
-+++ rpm-5.4.15/tools/rpmcache.c
-@@ -3,7 +3,9 @@
- */
-
- #include "system.h"
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
-
- #include <fnmatch.h>
- #include <fts.h>
-Index: rpm-5.4.15/tools/rpmdeps-oecore.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmdeps-oecore.c
-+++ rpm-5.4.15/tools/rpmdeps-oecore.c
-@@ -1,5 +1,7 @@
- #include "system.h"
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
-
- #include <rpmio.h>
- #include <rpmiotypes.h>
-Index: rpm-5.4.15/tools/rpmdeps.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmdeps.c
-+++ rpm-5.4.15/tools/rpmdeps.c
-@@ -1,5 +1,7 @@
- #include "system.h"
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
-
- #include <rpmio.h>
- #include <rpmiotypes.h>
-Index: rpm-5.4.15/tools/rpmdigest.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmdigest.c
-+++ rpm-5.4.15/tools/rpmdigest.c
-@@ -1,6 +1,8 @@
- #include "system.h"
-+#ifdef __GLIBC__
- /*@unchecked@*/
- extern const char * __progname;
-+#endif
-
- #define _RPMIOB_INTERNAL
- #include <rpmiotypes.h>
-Index: rpm-5.4.15/tools/rpmcmp.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmcmp.c
-+++ rpm-5.4.15/tools/rpmcmp.c
-@@ -13,8 +13,10 @@
-
- #include "debug.h"
-
-+#ifdef __GLIBC__
- const char *__progname;
- #define progname __progname
-+#endif
-
- static int pointRpmEVR(ARGV_t av)
- {
-Index: rpm-5.4.15/rpmqv.c
-===================================================================
---- rpm-5.4.15.orig/rpmqv.c
-+++ rpm-5.4.15/rpmqv.c
-@@ -1,5 +1,7 @@
- #include "system.h"
-+#ifdef __GLIBC__
- extern const char *__progname;
-+#endif
-
- /* Copyright (C) 1998-2002 - Red Hat, Inc. */
-
diff --git a/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch b/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch
deleted file mode 100644
index 77dc5b67d2..0000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d8fcc3cbeec4defb5babde5bd09ea294dd3fd08b Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 3 Jul 2016 19:01:59 -0700
-Subject: [PATCH] system.h/query.c: support nosignature
-
-* Define SUPPORT_NOSIGNATURES to 1 in system.h
-* !QVA_ISSET(qva->qva_flags, SIGNATURE) -> QVA_ISSET(qva->qva_flags, SIGNATURE),
- otherwise, when use --nosignature would read database and verify
- signature, this is not expected.
-
-Upstream-Status: Submitted [Sent email to rpm-devel@rpm5.org]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- lib/query.c | 6 +++---
- system.h | 4 ++--
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/lib/query.c b/lib/query.c
-index 50a7453..b761d76 100644
---- a/lib/query.c
-+++ b/lib/query.c
-@@ -954,19 +954,19 @@ JBJDEBUG((stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, qva, argv));
- vsflags = (rpmVSFlags) rpmExpandNumeric("%{?_vsflags_query}");
- vsflags = (rpmVSFlags) 0; /* XXX FIXME: ignore default disablers. */
- #if defined(SUPPORT_NOSIGNATURES)
-- if (!QVA_ISSET(qva->qva_flags, DIGEST)) {
-+ if (QVA_ISSET(qva->qva_flags, DIGEST)) {
- VSF_SET(vsflags, NOSHA1HEADER);
- VSF_SET(vsflags, NOMD5HEADER);
- VSF_SET(vsflags, NOSHA1);
- VSF_SET(vsflags, NOMD5);
- }
-- if (!QVA_ISSET(qva->qva_flags, SIGNATURE)) {
-+ if (QVA_ISSET(qva->qva_flags, SIGNATURE)) {
- VSF_SET(vsflags, NODSAHEADER);
- VSF_SET(vsflags, NORSAHEADER);
- VSF_SET(vsflags, NODSA);
- VSF_SET(vsflags, NORSA);
- }
-- if (!QVA_ISSET(qva->qva_flags, HDRCHK)) {
-+ if (QVA_ISSET(qva->qva_flags, HDRCHK)) {
- VSF_SET(vsflags, NOHDRCHK);
- }
- VSF_CLR(vsflags, NEEDPAYLOAD); /* XXX needed? */
-diff --git a/system.h b/system.h
-index 2ff8906..ad4619a 100644
---- a/system.h
-+++ b/system.h
-@@ -787,9 +787,9 @@ static inline const char *rcsid(const char *p) { \
- #define SUPPORT_I18NSTRING_TYPE 1
-
- /**
-- * Eliminate signature/digest disablers.
-+ * Signature/digest disablers.
- */
--#undef SUPPORT_NOSIGNATURES
-+#define SUPPORT_NOSIGNATURES 1
-
- /**
- * Permit ar(1) payloads. Disabled while rpmio/iosm.c is under development.
---
-2.9.0
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
deleted file mode 100644
index 7128250093..0000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 64851c6622aff64787a9fcea26cccde183b7c743 Mon Sep 17 00:00:00 2001
-From: "Roy.Li" <rongqing.li@windriver.com>
-Date: Tue, 11 Nov 2014 16:28:22 +0800
-Subject: [PATCH] using poptParseArgvString to parse the
- _gpg_check_password_cmd
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Both __gpg_check_password_cmd and __gpg_sign_cmd include "%{_gpg_name}", but
-strace shows that gpg_name has a quote when run _gpg_check_password,
-but not when run __gpg_sign_cmd; for example, if gpg_name is "tester"
-
- execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose",
- "--passphrase-fd", "3", "-u", "\"tester\"", "-so", "-"], [/* 20 vars */]) = 0
-
- execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose", "--no-armor",
- "--passphrase-fd", "3", "--no-secmem-warning", "-u", "tester", "-sbo"..,) = 0
-
-it can be fixed by removing the quote around %{gpg_name} when define
-__gpg_check_password_cmd in macros/macros, like below, but if gpg_name includes
-space, it will not work.
-
- %__gpg_check_password_cmd %{__gpg} \
- gpg --batch --no-verbose --passphrase-fd 3 -u %{_gpg_name} -so -
-
-The poptParseArgvString function is used to parse _gpg_sign_cmd, so using
-poptParseArgvString to parse __gpg_check_password_cmd to fix this issue.
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- rpmdb/signature.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rpmdb/signature.c b/rpmdb/signature.c
-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);
-- rc = argvSplit(&av, cmd, NULL);
-+ rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
- if (!rc)
- rc = execve(av[0], (char *const *)av+1, environ);
-
---
-1.9.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch b/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch
deleted file mode 100644
index 7894a4263d..0000000000
--- a/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-configure.ac: search for both gpg2 and gpg
-
-On some platforms the GnuPG binary is named 'gpg2' whereas others have 'gpg'.
-This patch increases compatibility by searching for 'gpg' in addition to
-'gpg2'.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 6746b4c..f6922ae 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -562,7 +562,7 @@ AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH)
- AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH)
- AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH)
- AC_PATH_PROG(__GIT, git, %{_bindir}/git, $MYPATH)
--AC_PATH_PROG(__GPG, gpg2, %{_bindir}/gpg2, $MYPATH)
-+AC_PATH_PROGS(__GPG, [gpg2 gpg], %{_bindir}/gpg2, $MYPATH)
- AC_PATH_PROG(__GSR, gsr, %{_bindir}/gsr, $MYPATH)
- AC_PATH_PROG(__GST_INSPECT, gst-inspect-0.10, %{_bindir}/gst-inspect-0.10, $MYPATH)
- AC_PATH_PROG(__GZIP, gzip, /bin/gzip, $MYPATH)
---
-2.1.4
-
diff --git a/meta/recipes-devtools/rpm/rpm/dbconvert.patch b/meta/recipes-devtools/rpm/rpm/dbconvert.patch
deleted file mode 100644
index 1fdbf0908a..0000000000
--- a/meta/recipes-devtools/rpm/rpm/dbconvert.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Inappropriate
-
-Hack to prevent unneeded demo app from building on older libc
-where it will break the build
-
-Index: rpm-5.4.14/tools/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/tools/Makefile.am
-+++ rpm-5.4.14/tools/Makefile.am
-@@ -29,7 +29,7 @@ EXTRA_PROGRAMS = nix-copy-closure nix-en
- xiu-instantiate xiu-store
- noinst_PROGRAMS =
-
--EXTRA_PROGRAMS += augtool cudftool dbconvert debugedit \
-+EXTRA_PROGRAMS += augtool cudftool debugedit \
- nix-build nix-channel nix-collect-garbage \
- nix-log2xml nix-prefetch-url nix-pull nix-push \
- xiu-echo xiu-hash \
-@@ -64,7 +64,7 @@ pkgbin_PROGRAMS = \
- rpmcache rpmdigest rpmrepo rpmspecdump \
- rpmcmp rpmdeps rpmdeps-oecore sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@
- if WITH_DB
--pkgbin_PROGRAMS += dbconvert
-+pkgbin_PROGRAMS +=
- endif
- dist_man_MANS = rpmgrep.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch b/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
deleted file mode 100644
index c83c8b5f3f..0000000000
--- a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-During the recalculation of the buildid, it's necessary to change the word
-back to the original endian. However, if we do this in-place, we've also
-affected the headers that we're also working on. The side effect of this is
-we can no longer rely on 'sh_type' as it may have been changed.
-
-This patch ensures that any time we translate the loaded data to the machine
-format, we only do it in a backup copy and never the original copy.
-
-Note: in all other places a backup copy was used, just not buildid processing.
-
-Also the process (...) function was modified to verify the data is not
-NULL as well. This is an extra check and is not strictly necessary.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/tools/debugedit.c
-===================================================================
---- rpm.orig/tools/debugedit.c
-+++ rpm/tools/debugedit.c
-@@ -1403,7 +1403,8 @@ static inline void process (hashFunction
- const void *data, size_t size)
- {
- memchunk chunk = { .data = (void *) data, .size = size };
-- hashFunctionContextUpdateMC (ctx, &chunk);
-+ if (data != NULL && size != 0)
-+ hashFunctionContextUpdateMC (ctx, &chunk);
- }
-
- /* Compute a fresh build ID bit-string from the editted file contents. */
-@@ -1456,14 +1457,16 @@ handle_build_id (DSO *dso, Elf_Data *bui
- GElf_Ehdr ehdr;
- GElf_Phdr phdr;
- GElf_Shdr shdr;
-- } u;
-- Elf_Data x = { .d_version = EV_CURRENT, .d_buf = &u };
--
-- x.d_type = ELF_T_EHDR;
-- x.d_size = sizeof u.ehdr;
-- u.ehdr = dso->ehdr;
-- u.ehdr.e_phoff = u.ehdr.e_shoff = 0;
-- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
-+ } u1, u2;
-+ Elf_Data src = { .d_version = EV_CURRENT, .d_buf = &u1 };
-+ Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 };
-+
-+ src.d_type = ELF_T_EHDR;
-+ src.d_size = sizeof u1.ehdr;
-+ dest.d_size = sizeof u2.ehdr;
-+ u1.ehdr = dso->ehdr;
-+ u1.ehdr.e_phoff = u1.ehdr.e_shoff = 0;
-+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
- {
- bad:
- fprintf (stderr, "Failed to compute header checksum: %s\n",
-@@ -1471,29 +1474,31 @@ handle_build_id (DSO *dso, Elf_Data *bui
- exit (1);
- }
-
-- x.d_type = ELF_T_PHDR;
-- x.d_size = sizeof u.phdr;
-+ src.d_type = ELF_T_PHDR;
-+ src.d_size = sizeof u1.phdr;
-+ dest.d_size = sizeof u2.phdr;
- for (i = 0; i < dso->ehdr.e_phnum; ++i)
- {
-- if (gelf_getphdr (dso->elf, i, &u.phdr) == NULL)
-+ if (gelf_getphdr (dso->elf, i, &u1.phdr) == NULL)
- goto bad;
-- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
-+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
- goto bad;
-- process (&ctx, x.d_buf, x.d_size);
-+ process (&ctx, dest.d_buf, dest.d_size);
- }
-
-- x.d_type = ELF_T_SHDR;
-- x.d_size = sizeof u.shdr;
-+ src.d_type = ELF_T_SHDR;
-+ src.d_size = sizeof u1.shdr;
-+ dest.d_size = sizeof u2.shdr;
- for (i = 0; i < dso->ehdr.e_shnum; ++i)
- if (dso->scn[i] != NULL)
- {
-- u.shdr = dso->shdr[i];
-- u.shdr.sh_offset = 0;
-- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
-+ u1.shdr = dso->shdr[i];
-+ u1.shdr.sh_offset = 0;
-+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
- goto bad;
-- process (&ctx, x.d_buf, x.d_size);
-+ process (&ctx, dest.d_buf, dest.d_size);
-
-- if (u.shdr.sh_type != SHT_NOBITS)
-+ if (u1.shdr.sh_type != SHT_NOBITS)
- {
- Elf_Data *d = elf_rawdata (dso->scn[i], NULL);
- if (d == NULL)
diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch b/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
deleted file mode 100644
index 8040482536..0000000000
--- a/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-debugedit: fix segment fault while file's bss offset have a large number
-
-While ELF_C_RDWR_MMAP was used, elf_begin invoked mmap() to map file
-into memory. While the file's bss Offset has a large number, elf_update
-caculated file size by __elf64_updatenull_wrlock and the size was
-enlarged.
-
-In this situation, elf_update invoked ftruncate to enlarge the file,
-and memory size (elf->maximum_size) also was incorrectly updated.
-There was segment fault in elf_end which invoked munmap with the
-length is the enlarged file size, not the mmap's length.
-
-Before the above operations, invoke elf_begin/elf_update/elf_end
-with ELF_C_RDWR and ELF_F_LAYOUT set to enlarge the above file, it
-could make sure the file is safe for the following elf operations.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- tools/debugedit.c | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-Index: rpm-5.4.14/tools/debugedit.c
-===================================================================
---- rpm-5.4.14.orig/tools/debugedit.c
-+++ rpm-5.4.14/tools/debugedit.c
-@@ -1525,6 +1525,28 @@ handle_build_id (DSO *dso, Elf_Data *bui
- }
- }
-
-+/* It avoided the segment fault while file's bss offset have a large number.
-+ See https://bugzilla.redhat.com/show_bug.cgi?id=1019707
-+ https://bugzilla.redhat.com/show_bug.cgi?id=1020842 for detail. */
-+void valid_file(int fd)
-+{
-+ Elf *elf = elf_begin (fd, ELF_C_RDWR, NULL);
-+ if (elf == NULL)
-+ {
-+ error (1, 0, "elf_begin: %s", elf_errmsg (-1));
-+ return;
-+ }
-+
-+ elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT);
-+
-+ if (elf_update (elf, ELF_C_WRITE) < 0)
-+ error (1, 0, "elf_update: %s", elf_errmsg (-1));
-+
-+ elf_end (elf);
-+
-+ return;
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -1621,6 +1643,9 @@ main (int argc, char *argv[])
- exit (1);
- }
-
-+ /* Make sure the file is valid. */
-+ valid_file(fd);
-+
- dso = fdopen_dso (fd, file);
- if (dso == NULL)
- exit (1);
diff --git a/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch b/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
deleted file mode 100644
index 0a372c6dad..0000000000
--- a/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-gcc6 has fixed a long standing c++ include issue where <cheader>
-was different from <header.h> inclusion via
-
-https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html
-
-and its also descibed in https://gcc.gnu.org/gcc-6/porting_to.html
-rpmio component uses some .cpp and .cc fies which need to use
-C stdlib.h from C library and not the C++ libstdc++ header
-therefore we pass _GLIBCXX_INCLUDE_NEXT_C_HEADERS so that it
-keeps the old behavior
-
-/a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/cstdlib:143:11: error: '::getenv' has not been declared
- using ::getenv;
- ^~~~~~
-In file included from ../../rpm-5.4.15/system.h:201:0,
- from ../../rpm-5.4.15/rpmio/rpmjs.cpp:1:
-/a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/stdlib.h:62:12: error: 'std::getenv' has not been declared
- using std::getenv;
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: rpm-5.4.15/rpmio/Makefile.am
-===================================================================
---- rpm-5.4.15.orig/rpmio/Makefile.am
-+++ rpm-5.4.15/rpmio/Makefile.am
-@@ -151,7 +151,7 @@ librpmio_la_SOURCES = \
- groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c radiogatun.c\
- salsa10.c salsa20.c shabal.c shavite3.c simd.c skein.c tib3.c tiger.c \
- rpmgit.c rpmio-stub.c \
-- rpmjs.cpp rpmjsio.c rpmkeyring.c \
-+ rpmjni.cc rpmjs.cpp rpmjsio.c rpmkeyring.c \
- rpmnix.c rpmodbc.c rpmsql.c set.c \
- ar.c \
- argv.c \
-@@ -195,7 +195,6 @@ librpmio_la_SOURCES = \
- rpmhook.c \
- rpmio.c \
- rpmiob.c \
-- rpmjni.cc \
- rpmku.c \
- rpmlog.c \
- rpmltc.c \
-@@ -279,7 +278,9 @@ keccak.lo: $(top_srcdir)/rpmio/keccak.c
- #rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.c
- # @$(LTCOMPILE) -O0 -c $<
- rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp
-- @$(LTCOMPILE) -O0 -c $<
-+ @$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $<
-+rpmjni.lo: $(top_srcdir)/rpmio/rpmjni.cc
-+ @$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $<
-
- YACC = byacc -d
- getdate.c: getdate.y
diff --git a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch b/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
deleted file mode 100644
index e72df45b5a..0000000000
--- a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Update two rpm headers to include other headers.
-
-Using rpmdb.h w/o including errno.h may result in a warning.
-
-Using rpmtag.h w/o also adding stdint.h will result in numerous failures
-about unknown types on modern compilers.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Qing He <qing.he@intel.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/rpmdb/rpmdb.h
-===================================================================
---- rpm-5.4.14.orig/rpmdb/rpmdb.h
-+++ rpm-5.4.14/rpmdb/rpmdb.h
-@@ -9,6 +9,7 @@
-
- #include <assert.h>
- #include <mire.h>
-+#include <errno.h>
-
- #include <rpmtypes.h>
- #include <rpmtag.h> /* XXX Header typedef */
-Index: rpm-5.4.14/rpmdb/rpmtag.h
-===================================================================
---- rpm-5.4.14.orig/rpmdb/rpmtag.h
-+++ rpm-5.4.14/rpmdb/rpmtag.h
-@@ -7,6 +7,7 @@
-
- #include <rpmiotypes.h>
- #include <rpmsw.h>
-+#include <stdint.h>
-
- #ifdef __cplusplus
- extern "C" {
diff --git a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch b/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
deleted file mode 100644
index 5d936db5a3..0000000000
--- a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-rpm: Resolve parallel install issue when installing lua
-
-When lua is being installed on some systems that are being run with high levels
-of parallelization there are cases where install-data-am and install-exec-hook
-are processed at the same or a very short time apart. This causes
-install-pkgbinPROGRAMS, which is a dependency of both, to be run at around the
-same time This sometimes causes file contention and will sometimes be in a state
-where install-exec-hook is looking for a file that is being installed or both
-install-pkgbinPROGRAMS being run are installing the same file and fail because
-it cannon create a new file.
-
-This patch allows install-exec-hook to be called by install-data-am instead of
-install-exec-am. It also removed the dependency in install-data-hook on
-install-pkgbinPROGRAMS. This means install-pkgbinPROGRAMS will only be run once
-so there whould be any file contention.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Morgan Little <morgan.little@windriver.com>
-
-Index: rpm-5.4.14/lua/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/lua/Makefile.am
-+++ rpm-5.4.14/lua/Makefile.am
-@@ -326,7 +326,7 @@ clean-local:
- # XXX Build & install as rpmlua/rpmluac with hardlinks to lua/luac post install.
- # XXX CVS has lua/luac sub-directories in the Attic that collide with the
- # XXX lua/luac executable names when using cvs update.
--install-exec-hook: install-pkgbinPROGRAMS
-+install-data-hook:
- mkdir -p $(DESTDIR)$(pkgbindir)
- $(__RM) -f $(DESTDIR)$(pkgbindir)/lua
- $(__LN) $(DESTDIR)$(pkgbindir)/rpmlua $(DESTDIR)$(pkgbindir)/lua
diff --git a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch b/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch
deleted file mode 100644
index 410623fab2..0000000000
--- a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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/perfile_rpmdeps.sh b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
deleted file mode 100755
index b72c9f0265..0000000000
--- a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-: ${RPMDEPS:=rpmdeps}
-
-process() {
- while read file_name ; do
- printf "%s\t" ${file_name}
- if [ ! -d $file_name ]; then
- printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g')
- fi
- printf "\n"
- done
-}
-
-usage() {
- echo "$0 {-P|--provides} {-R|--requires} FILE ..."
-}
-
-while [ $# -gt 0 ]; do
- case "$1" in
- --rpmdeps)
- RPMDEPS=$2
- shift
- shift
- ;;
- -R|--requires)
- process_type=--requires
- shift
- ;;
- -P|--provides)
- process_type=--provides
- shift
- ;;
- *)
- break;
- ;;
- esac
-done
-
-if [ -z "$process_type" ]; then
- usage
- exit 1
-fi
-
-if [ $# -gt 0 ]; then
- find "$@" | process $process_type
- exit $?
-fi
-
-process $process_type
diff --git a/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch b/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
deleted file mode 100644
index bcad8dcb73..0000000000
--- a/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-popt: Disable default stack protection on internal version of popt
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/popt/configure.ac
-===================================================================
---- rpm-5.4.15.orig/popt/configure.ac
-+++ rpm-5.4.15/popt/configure.ac
-@@ -123,7 +123,6 @@ AS_IF([test "x$popt_gcc_warnings" = xyes
- popt_CFLAGS_ADD([-Wjump-misses-init],[POPT_CFLAGS])
- popt_CFLAGS_ADD([-Wno-format-nonliteral],[POPT_CFLAGS])
- popt_CFLAGS_ADD([-Wframe-larger-than=$MAX_STACK_SIZE],[POPT_CFLAGS])
-- popt_CFLAGS_ADD([-fstack-protector-all],[POPT_CFLAGS])
- popt_CFLAGS_ADD([-fasynchronous-unwind-tables],[POPT_CFLAGS])
- popt_CFLAGS_ADD([-fdiagnostics-show-option],[POPT_CFLAGS])
- popt_CFLAGS_ADD([-funit-at-a-time],[POPT_CFLAGS])
-@@ -203,7 +202,7 @@ AC_SUBST([POPT_LDFLAGS])
- # -fno-delete-null-pointer as the kernel does http://patchwork.kernel.org/patch/36060/
- # GNU GCC (usually "gcc")
- AS_IF([test "x$GCC" != x],
-- [ for c in -fno-delete-null-pointer-checks -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -fexceptions
-+ [ for c in -fno-delete-null-pointer-checks -fexceptions
- do
- popt_CFLAGS_ADD([$c], [POPT_CFLAGS])
- done
diff --git a/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch b/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
deleted file mode 100644
index 590f58d893..0000000000
--- a/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-rpmmodule.c: Export a few additional RPMSENSE values
-
-We want to see the RPMSENSE_SCRIPT values for use with SMART. We also
-want to see the MISSINGOK value so we can avoid recommended packages causing
-failures.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/python/rpmmodule.c
-===================================================================
---- rpm.orig/python/rpmmodule.c
-+++ rpm/python/rpmmodule.c
-@@ -525,12 +525,15 @@ static int initModule(PyObject *m)
- REGISTER_ENUM(RPMSENSE_PREREQ);
- REGISTER_ENUM(RPMSENSE_PRETRANS);
- REGISTER_ENUM(RPMSENSE_INTERP);
-+#else
-+ #if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
- REGISTER_ENUM(RPMSENSE_SCRIPT_PRE);
- REGISTER_ENUM(RPMSENSE_SCRIPT_POST);
- REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN);
- REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN);
- REGISTER_ENUM(RPMSENSE_SCRIPT_VERIFY);
--#else
-+ REGISTER_ENUM(RPMSENSE_MISSINGOK);
-+ #endif
- REGISTER_ENUM(RPMSENSE_NOTEQUAL);
- #endif
- REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
diff --git a/meta/recipes-devtools/rpm/rpm/pythondeps.sh b/meta/recipes-devtools/rpm/rpm/pythondeps.sh
deleted file mode 100755
index 083b174f17..0000000000
--- a/meta/recipes-devtools/rpm/rpm/pythondeps.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-[ $# -ge 1 ] || {
- cat > /dev/null
- exit 0
-}
-
-case $1 in
--R|--requires)
- shift
- grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python"
- exit 0
- ;;
-esac
-
-exit 0
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch b/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
deleted file mode 100644
index cc241f4f16..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Some architectures do not have __sync_add_and_fetch_8 implemented.
-
-MIPS (32-bit) and some PPC systems do not have sync_add_and_fetch_8.
-
-Provide an alternative. This alternative function is based on code from:
- https://github.com/mongodb/libbson/blob/master/src/bson/bson-atomic.c
-
-Code is under an Apache 2.0 License.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/rpmio/bson.h
-===================================================================
---- rpm-5.4.15.orig/rpmio/bson.h
-+++ rpm-5.4.15/rpmio/bson.h
-@@ -879,10 +879,18 @@ BSON_END_DECLS
-
- BSON_BEGIN_DECLS
-
-+/* Some architectures do not support __sync_add_and_fetch_8 */
-+#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
-+# define __BSON_NEED_ATOMIC_64 1
-+#endif
-
- #if defined(__GNUC__)
- # define bson_atomic_int_add(p, v) (__sync_add_and_fetch(p, v))
--# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
-+#ifndef __BSON_NEED_ATOMIC_64
-+# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
-+# else
-+ int64_t bson_atomic_int64_add (volatile int64_t *p, int64_t n);
-+# endif
- # define bson_memory_barrier __sync_synchronize
- #elif defined(_MSC_VER) || defined(_WIN32)
- # define bson_atomic_int_add(p, v) (InterlockedExchangeAdd((long int *)(p), v))
-Index: rpm-5.4.15/rpmio/bson.c
-===================================================================
---- rpm-5.4.15.orig/rpmio/bson.c
-+++ rpm-5.4.15/rpmio/bson.c
-@@ -3863,13 +3863,30 @@ _bson_context_get_oid_seq64_threadsafe (
- #elif defined BSON_OS_WIN32
- uint64_t seq = InterlockedIncrement64 ((int64_t *)&context->seq64);
- #else
-- uint64_t seq = __sync_fetch_and_add_8 (&context->seq64, 1);
-+ uint64_t seq = bson_atomic_int64_add (&context->seq64, 1);
- #endif
-
- seq = BSON_UINT64_TO_BE (seq);
- memcpy (&oid->bytes[4], &seq, 8);
- }
-
-+#ifdef __BSON_NEED_ATOMIC_64
-+#include <pthread.h>
-+static pthread_mutex_t gSync64 = PTHREAD_MUTEX_INITIALIZER;
-+int64_t
-+bson_atomic_int64_add (volatile int64_t *p,
-+ int64_t n)
-+{
-+ int64_t ret;
-+
-+ pthread_mutex_lock (&gSync64);
-+ *p += n;
-+ ret = *p;
-+ pthread_mutex_unlock (&gSync64);
-+
-+ return ret;
-+}
-+#endif
-
- /**
- * bson_context_new:
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch b/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
deleted file mode 100644
index 258a7f6e72..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-In order to enable musl or other libc support, force update the config.guess
-
-In order to reliably replace config.guess and config.sub, we need to remove
-them prior to the call to automake. Adding the --force-missing is likely
-not necessary, but matching normal OE autoreconf usage.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/autogen.sh
-+++ rpm-5.4.15/autogen.sh
-@@ -73,7 +73,8 @@ rm -f aclocal.m4
- aclocal -I m4
- autoheader -I m4
- echo "---> generate files via GNU automake (automake)"
--automake -Wall -Wno-override -a -c
-+rm -f config.guess config.sub
-+automake -Wall -Wno-override -a -c --force-missing
- echo "---> generate files via GNU autoconf (autoconf)"
- autoconf -I m4
- echo "<=== rpm"
-Index: rpm-5.4.15/beecrypt/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/beecrypt/autogen.sh
-+++ rpm-5.4.15/beecrypt/autogen.sh
-@@ -25,6 +25,7 @@ libtoolize () {
-
- libtoolize --force --copy
- aclocal
--automake -a -c
-+rm -f config.guess config.sub
-+automake -a -c --force-missing
- autoconf
- autoheader
-Index: rpm-5.4.15/libtpm/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/libtpm/autogen.sh
-+++ rpm-5.4.15/libtpm/autogen.sh
-@@ -46,7 +46,8 @@ echo "---> generate files via GNU autoco
- aclocal
- autoheader
- echo "---> generate files via GNU automake (automake)"
--automake -Wall -Wno-override -a -c
-+rm -f config.guess config.sub
-+automake -Wall -Wno-override -a -c --force-missing
- echo "---> generate files via GNU autoconf (autoconf)"
- autoconf
-
-Index: rpm-5.4.15/neon/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/neon/autogen.sh
-+++ rpm-5.4.15/neon/autogen.sh
-@@ -63,7 +63,8 @@ echo "---> generate files via GNU autoco
- ${ACLOCAL:-aclocal} -I macros
- ${AUTOHEADER:-autoheader}
- echo "---> generate files via GNU automake (automake)"
--${AUTOMAKE:-automake} -Wall -Wno-override -a -c
-+rm -f config.guess config.sub
-+${AUTOMAKE:-automake} -Wall -Wno-override -a -c --force-missing
- echo "---> generate files via GNU autoconf (autoconf)"
- ${AUTOCONF:-autoconf} -Wall
-
-Index: rpm-5.4.15/syck/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/syck/autogen.sh
-+++ rpm-5.4.15/syck/autogen.sh
-@@ -40,6 +40,7 @@ echo "---> generate files via GNU autoco
- aclocal
- autoheader
- echo "---> generate files via GNU automake (automake)"
--automake -Wall -Wno-override -a -c
-+rm -f config.guess config.sub
-+automake -Wall -Wno-override -a -c --force-missing
- echo "---> generate files via GNU autoconf (autoconf)"
- autoconf
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch b/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch
deleted file mode 100644
index 8771235d30..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Remove the sanity checking from the rpm autogen.sh. This is required because
-we may have slightly different, but yet compatible versions. If we do end
-up breaking things, we'll deal with it at that time.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/syck/autogen.sh
-===================================================================
---- rpm-5.4.14.orig/syck/autogen.sh
-+++ rpm-5.4.14/syck/autogen.sh
-@@ -34,12 +34,6 @@ libtoolize () {
- eval $_libtoolize $_libtoolize_args
- }
-
--# requirements sanity check
--[ "`automake --version | head -1`" != "$AMV" ] && echo "$USAGE" # && exit 1
--[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1
--[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1
--[ "`gettextize --version | head -1 | sed -e 's;^.*/\\(gettextize\\);\\1;'`" != "$GTT" ] && echo "$USAGE" # && exit 1
--
- echo "---> generate files via GNU libtool (libtoolize)"
- libtoolize --quiet --copy --force --install
- echo "---> generate files via GNU autoconf (aclocal, autoheader)"
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch b/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
deleted file mode 100644
index 81fc84937a..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-lib/rpmrc.c: Update --target processing to support full GNU canonical arch
-
-Prior to this patch, when using --target, RPM supported the format:
- <arch>
- <arch>-<os>
- <arch>-<os>-gnu
- <arch>-<arbitrary items>-<os>
- <arch>-<arbitrary items>-<os>-gnu
-
-This patch changes the list of supported items to:
- <arch>
- <arch>-<os>
- <arch>-<os>-gnu
- <arch>-<vendor>-<os>
- <arch>-<vendor>-<os>-<extension>
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -925,8 +925,8 @@ static void getMachineInfo(int type, /*@
-
- static void rpmRebuildTargetVars(const char ** target, const char ** canontarget)
- {
--
-- char *ca = NULL, *co = NULL, *ct = NULL;
-+ /* ca = arch, cv = vendor, co = os, ce = extension, ct = canon target */
-+ char *ca = NULL, *cv = NULL, *co = NULL, *ce = NULL, *ct = NULL;
- int x;
-
- /* Rebuild the compat table to recalculate the current target arch. */
-@@ -936,23 +936,60 @@ static void rpmRebuildTargetVars(const c
- rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS);
-
- if (target && *target) {
-+ /* GNU canonical format is:
-+ * <arch>-<vendor>-<os>[-extension]
-+ *
-+ * We support the both the GNU canonical format
-+ * as well as the traditional RPM formats:
-+ * <arch>
-+ * <arch>-<os>[-gnu]
-+ */
- char *c;
- /* Set arch and os from specified build target */
- ca = xstrdup(*target);
-- if ((c = strchr(ca, '-')) != NULL) {
-+ if ((c = strchr(ca, '-')) == NULL) {
-+ /* Format is <arch> */
-+ ;
-+ } else {
- *c++ = '\0';
--
-- if ((co = strrchr(c, '-')) == NULL) {
-- co = c;
-+ cv = c;
-+
-+ if ((c = strchr(c, '-')) == NULL) {
-+ /* Format is <arch>-<os> */
-+ co = cv;
-+ cv = NULL;
- } else {
-- if (!xstrcasecmp(co, "-gnu"))
-- *co = '\0';
-- if ((co = strrchr(c, '-')) == NULL)
-- co = c;
-- else
-- co++;
-+ *c++ = '\0';
-+ co = c;
-+
-+ if ((c = strchr(c, '-')) == NULL) {
-+ /* Might be:
-+ * <arch>-<vendor>-<os>
-+ * <arch>-<os>-gnu
-+ */
-+ if (!xstrcasecmp(co, "gnu")) {
-+ /* Format was <arch>-<os>-gnu */
-+ ce = co;
-+ co = cv;
-+ cv = NULL;
-+ }
-+ } else {
-+ /* Format was <arch>-<vendor>-<os>-<extension> */
-+ *c++ = '\0';
-+ ce = c;
-+ }
- }
-+ if (cv != NULL) cv = xstrdup(cv);
- if (co != NULL) co = xstrdup(co);
-+ if (ce != NULL) {
-+ /* We need to prefix it with a "-" */
-+ char * lce = NULL;
-+
-+ lce = xmalloc(strlen(ce) + sizeof("-"));
-+ sprintf(lce, "-%s", ce);
-+
-+ ce = lce;
-+ }
- }
- } else {
- const char *a = NULL;
-@@ -995,8 +1032,16 @@ static void rpmRebuildTargetVars(const c
- addMacro(NULL, "_target", NULL, ct, RMIL_RPMRC);
- delMacro(NULL, "_target_cpu");
- addMacro(NULL, "_target_cpu", NULL, ca, RMIL_RPMRC);
-+ if (cv) {
-+ delMacro(NULL, "_target_vendor");
-+ addMacro(NULL, "_target_vendor", NULL, cv, RMIL_RPMRC);
-+ }
- delMacro(NULL, "_target_os");
- addMacro(NULL, "_target_os", NULL, co, RMIL_RPMRC);
-+ if (ce) {
-+ delMacro(NULL, "_gnu");
-+ addMacro(NULL, "_gnu", NULL, ce, RMIL_RPMRC);
-+ }
-
- if (canontarget)
- *canontarget = ct;
-@@ -1004,8 +1049,12 @@ static void rpmRebuildTargetVars(const c
- ct = _free(ct);
- ca = _free(ca);
- /*@-usereleased@*/
-+ cv = _free(cv);
-+ /*@-usereleased@*/
- co = _free(co);
- /*@=usereleased@*/
-+ ce = _free(ce);
-+ /*@-usereleased@*/
- }
-
- void rpmFreeRpmrc(void)
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch b/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch
deleted file mode 100644
index 3d8d645a77..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-rpm: check if the argument(rootpath) exists or be writable
-
-When user execute the command "rpm -qai --root=$dir",if $dir doesn't
-exist or is unwritable as result of making a typo in rootpath,then
-it will create dirent $dir and subdirectory.
-So we should add the check function to fix it before creating relational
-subdirectory,and warn the incorrect rootpath to user. It just checks the
-rootpath reasonableness when the user input the argument(--root=/-r=).
-
-Upstream-Status: Pending
-
-Signed-off-by: Zhixiong Chi <zchi@windriver.com>
----
- rpmqv.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 45 insertions(+)
-
-diff --git a/rpmqv.c b/rpmqv.c
-index 40c42bd..88d85ab 100644
---- a/rpmqv.c
-+++ b/rpmqv.c
-@@ -206,6 +206,8 @@ static struct poptOption optionsTable[] = {
- POPT_TABLEEND
- };
-
-+static int _rpmqv_rootpath_state = 0;
-+
- #ifdef __MINT__
- /* MiNT cannot dynamically increase the stack. */
- long _stksize = 64 * 1024L;
-@@ -427,6 +429,41 @@ static void integrity_check(const char *progname, enum modes progmode_num)
- }
- #endif
-
-+/*check if the rootdir is writable or exists */
-+int access_file(const char *rootdir)
-+{
-+ int ret,rootdir_len;
-+
-+ if(rootdir == NULL) {
-+ return -1;
-+ }
-+
-+ rootdir_len = strlen(rootdir);
-+ /*make sure that dirent argument trailing is "/" */
-+ if(!(rootdir_len && rootdir[rootdir_len - 1] == '/')){
-+ char *t = (char *)malloc(rootdir_len + 2);
-+ *t = '\0';
-+ (void)stpcpy(stpcpy(t,rootdir),"/");
-+ ret = access(t,F_OK|W_OK);
-+ free(t);
-+ }else{
-+ ret = access(rootdir,F_OK|W_OK);
-+ }
-+ return ret;
-+}
-+
-+/*check if input the argument "--root/-r" */
-+void check_argument_root(int argc,char * const argv[])
-+{
-+ int i;
-+ for (i = 0; i < argc; i++) {
-+ if(strncmp(argv[i],"--root=",7) == 0 || strncmp(argv[i],"-r=",3) == 0) {
-+ _rpmqv_rootpath_state = 1;
-+ break;
-+ }
-+ }
-+}
-+
- /*@-bounds@*/ /* LCL: segfault */
- /*@-mods@*/ /* FIX: shrug */
- #if !defined(__GLIBC__) && !defined(__LCLINT__)
-@@ -476,6 +513,8 @@ int main(int argc, const char ** argv)
- int xx;
- #endif
-
-+ check_argument_root(argc,(char *const *)argv);
-+
- #if !defined(__GLIBC__) && !defined(__LCLINT__)
- environ = envp;
- #else
-@@ -715,6 +754,12 @@ int main(int argc, const char ** argv)
- argerror(_("arguments to --root (-r) must begin with a /"));
- break;
- }
-+ if (_rpmqv_rootpath_state) {
-+ if (access_file(rpmioRootDir)) {
-+ fprintf(stderr, _("Invalid directory:%s, ensure it exists or be writable\n"),rpmioRootDir);
-+ exit(EXIT_FAILURE);
-+ }
-+ }
- }
-
- #if defined(RPM_VENDOR_OPENPKG) /* integrity-checking */
---
-1.9.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch b/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch
deleted file mode 100644
index c869376538..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Change cache size to reduce the usage of disk space from 62MB to 26MB.
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-
-Index: rpm-5.4.14/rpmdb/DB_CONFIG.in
-===================================================================
---- rpm-5.4.14.orig/rpmdb/DB_CONFIG.in
-+++ rpm-5.4.14/rpmdb/DB_CONFIG.in
-@@ -29,7 +29,7 @@ set_thread_count 64
-
- # ================ Memory Pool
- #XXX initializing dbenv with set_cachesize has unimplemented prerequsites
--#set_cachesize 0 1048576 0
-+set_cachesize 0 1048576 0
- set_mp_mmapsize 268435456
-
- # ================ Locking
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch b/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
deleted file mode 100644
index 5d08d279ae..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 7bad268de8b32281e2a12ccd88038b3ec5eb1be3 Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-Date: Tue, 15 Dec 2015 18:50:21 +0800
-Subject: [PATCH] Support both db5 and db6.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
----
- configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++-------------
- 1 file changed, 81 insertions(+), 22 deletions(-)
-
-Index: rpm/configure.ac
-===================================================================
---- rpm.orig/configure.ac
-+++ rpm/configure.ac
-@@ -871,8 +871,6 @@ else
- MYPATH=$PATH
- fi
-
--DBXY=db61
--
- AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH)
- AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH)
- AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
-@@ -884,22 +882,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/
- AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
- AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH)
- AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH)
--AC_PATH_PROG(__DB_ARCHIVE, ${DBXY}_archive, %{_bindir}/${DBXY}_archive, $MYPATH)
--AC_PATH_PROG(__DB_CHECKPOINT, ${DBXY}_checkpoint, %{_bindir}/${DBXY}_checkpoint, $MYPATH)
--AC_PATH_PROG(__DB_DEADLOCK, ${DBXY}_deadlock, %{_bindir}/${DBXY}_deadlock, $MYPATH)
--AC_PATH_PROG(__DB_DUMP, ${DBXY}_dump, %{_bindir}/${DBXY}_dump, $MYPATH)
--AC_PATH_PROG(__DB_HOTBACKUP, ${DBXY}_hotbackup, %{_bindir}/${DBXY}_hotbackup, $MYPATH)
--AC_PATH_PROG(__DB_LOAD, ${DBXY}_load, %{_bindir}/${DBXY}_load, $MYPATH)
--AC_PATH_PROG(__DB_LOG_VERIFY, ${DBXY}_log_verify, %{_bindir}/${DBXY}_log_verify, $MYPATH)
--AC_PATH_PROG(__DB_PRINTLOG, ${DBXY}_printlog, %{_bindir}/${DBXY}_printlog, $MYPATH)
--AC_PATH_PROG(__DB_RECOVER, ${DBXY}_recover, %{_bindir}/${DBXY}_recover, $MYPATH)
--AC_PATH_PROG(__DB_REPLICATE, ${DBXY}_replicate, %{_bindir}/${DBXY}_replicate, $MYPATH)
--AC_PATH_PROG(__DBSQL, ${DBXY}sql, %{_bindir}/${DBXY}sql, $MYPATH)
--AC_PATH_PROG(__DB_SQL_CODEGEN, ${DBXY}_sql_codegen, %{_bindir}/${DBXY}_sql_codegen, $MYPATH)
--AC_PATH_PROG(__DB_STAT, ${DBXY}_stat, %{_bindir}/${DBXY}_stat, $MYPATH)
--AC_PATH_PROG(__DB_TUNER, ${DBXY}_tuner, %{_bindir}/${DBXY}_tuner, $MYPATH)
--AC_PATH_PROG(__DB_UPGRADE, ${DBXY}_upgrade, %{_bindir}/${DBXY}_upgrade, $MYPATH)
--AC_PATH_PROG(__DB_VERIFY, ${DBXY}_verify, %{_bindir}/${DBXY}_verify, $MYPATH)
- AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH)
- AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH)
- AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH)
-@@ -2050,13 +2032,46 @@ RPM_CHECK_LIB(
-
- dnl # Berkeley-DB & SQLite
- DBLIBSRCS=""
-+DBXY=db
-+
- # XXX won't handle --includedir override
--CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}"
--RPM_CHECK_LIB(
-+CPPFLAGS_save="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS_save}"
-+with_db_save="${with_db}"
-+
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+#include <db.h>
-+]],
-+[[
-+#if DB_VERSION_MAJOR < 6
-+#error DB_VERSION_MAJOR is below 6
-+#endif
-+]])],
-+[RPM_CHECK_LIB(
- [Berkeley-DB], [db],
- [db-6.1], [db_create], [db.h],
-- [yes,external], [db3],
-+ [yes,external], [db6],
- [ DBLIBSRCS="$DBLIBSRCS db3.c"
-+ DBXY=db61
-+ AM_CONDITIONAL(WITH_DB, [ true ])
-+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
-+ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-+ AC_DEFINE(HAVE_DB_H, 1, [Have <db.h> header])
-+ else
-+ WITH_DB_SUBDIR=""
-+ fi
-+ ],
-+ [ AM_CONDITIONAL(WITH_DB, [ false ])
-+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
-+ ])],
-+[with_db="${with_db_save}"
-+ CPPFLAGS="${CPPFLAGS_save}"
-+ RPM_CHECK_LIB(
-+ [Berkeley-DB], [db],
-+ [db-5.3], [db_create], [db.h],
-+ [yes,external], [db53],
-+ [ DBLIBSRCS="$DBLIBSRCS db3.c"
-+ DBXY=db53
- AM_CONDITIONAL(WITH_DB, [ true ])
- AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
- if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-@@ -2068,6 +2083,11 @@ RPM_CHECK_LIB(
- [ AM_CONDITIONAL(WITH_DB, [ false ])
- AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
- ])
-+])
-+
-+if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
-+ CPPFLAGS="${CPPFLAGS_save}"
-+fi
-
- dnl # Sqlite external
- RPM_CHECK_LIB(
-@@ -2078,10 +2098,11 @@ RPM_CHECK_LIB(
- [])
-
- dnl # Sqlite 3.8.3.1 from db-6.1.19
-+if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
- RPM_CHECK_LIB(
- [Berkeley-DB (+SQLite3)], [dbsql],
- [db_sql-6.1], [sqlite3_open], [dbsql.h],
-- [yes,external], [db3/sql],
-+ [yes,external], [db6/sql],
- [
- AM_CONDITIONAL(WITH_DBSQL, [ true ])
- AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library])
-@@ -2095,12 +2116,50 @@ RPM_CHECK_LIB(
- ], [
- AM_CONDITIONAL(WITH_DBSQL, [ false ])
- ])
-+elif test ".$ac_cv_lib_db_5_3_db_create" = .yes; then
-+RPM_CHECK_LIB(
-+ [Berkeley-DB (+SQLite3)], [dbsql],
-+ [db_sql-5.3], [sqlite3_open], [dbsql.h],
-+ [yes,external], [db53/sql],
-+ [
-+ AM_CONDITIONAL(WITH_DBSQL, [ true ])
-+ AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library])
-+ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-+ WITH_DB_CPPFLAGS="${WITH_DB_CPPFLAGS} -I\$(top_srcdir)/db/sql/generated"
-+ WITH_DB_LIBS="${WITH_DBSQL_LIBS}"
-+ DBLIBSRCS="$DBLIBSRCS sqlite.c"
-+ else
-+ WITH_DBSQL_SUBDIR=""
-+ fi
-+ ], [
-+ AM_CONDITIONAL(WITH_DBSQL, [ false ])
-+ ])
-+else
-+AM_CONDITIONAL(WITH_DBSQL, [ false ])
-+fi
-
- DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"`
-
- AC_SUBST(DBLIBSRCS)
- AC_SUBST(DBLIBOBJS)
-
-+AC_PATH_PROG(__DB_ARCHIVE, ${DBXY}_archive, %{_bindir}/${DBXY}_archive, $MYPATH)
-+AC_PATH_PROG(__DB_CHECKPOINT, ${DBXY}_checkpoint, %{_bindir}/${DBXY}_checkpoint, $MYPATH)
-+AC_PATH_PROG(__DB_DEADLOCK, ${DBXY}_deadlock, %{_bindir}/${DBXY}_deadlock, $MYPATH)
-+AC_PATH_PROG(__DB_DUMP, ${DBXY}_dump, %{_bindir}/${DBXY}_dump, $MYPATH)
-+AC_PATH_PROG(__DB_HOTBACKUP, ${DBXY}_hotbackup, %{_bindir}/${DBXY}_hotbackup, $MYPATH)
-+AC_PATH_PROG(__DB_LOAD, ${DBXY}_load, %{_bindir}/${DBXY}_load, $MYPATH)
-+AC_PATH_PROG(__DB_LOG_VERIFY, ${DBXY}_log_verify, %{_bindir}/${DBXY}_log_verify, $MYPATH)
-+AC_PATH_PROG(__DB_PRINTLOG, ${DBXY}_printlog, %{_bindir}/${DBXY}_printlog, $MYPATH)
-+AC_PATH_PROG(__DB_RECOVER, ${DBXY}_recover, %{_bindir}/${DBXY}_recover, $MYPATH)
-+AC_PATH_PROG(__DB_REPLICATE, ${DBXY}_replicate, %{_bindir}/${DBXY}_replicate, $MYPATH)
-+AC_PATH_PROG(__DBSQL, ${DBXY}sql, %{_bindir}/${DBXY}sql, $MYPATH)
-+AC_PATH_PROG(__DB_SQL_CODEGEN, ${DBXY}_sql_codegen, %{_bindir}/${DBXY}_sql_codegen, $MYPATH)
-+AC_PATH_PROG(__DB_STAT, ${DBXY}_stat, %{_bindir}/${DBXY}_stat, $MYPATH)
-+AC_PATH_PROG(__DB_TUNER, ${DBXY}_tuner, %{_bindir}/${DBXY}_tuner, $MYPATH)
-+AC_PATH_PROG(__DB_UPGRADE, ${DBXY}_upgrade, %{_bindir}/${DBXY}_upgrade, $MYPATH)
-+AC_PATH_PROG(__DB_VERIFY, ${DBXY}_verify, %{_bindir}/${DBXY}_verify, $MYPATH)
-+
- AC_ARG_WITH(db-largefile, AS_HELP_STRING([--with-db-largefile], [build Berkeley-DB with LARGEFILE support]))
- AC_ARG_WITH(db-mutex, AS_HELP_STRING([--with-db-mutex=ARG], [build Berkeley-DB with MUTEX type ARG]))
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db60.patch b/meta/recipes-devtools/rpm/rpm/rpm-db60.patch
deleted file mode 100644
index b4df8b751b..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-db60.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Set the DB 6 version to match oe-core db 6.0.30
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/configure.ac
-===================================================================
---- rpm.orig/configure.ac
-+++ rpm/configure.ac
-@@ -2049,10 +2049,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- ]])],
- [RPM_CHECK_LIB(
- [Berkeley-DB], [db],
-- [db-6.1], [db_create], [db.h],
-+ [db-6.0], [db_create], [db.h],
- [yes,external], [db6],
- [ DBLIBSRCS="$DBLIBSRCS db3.c"
-- DBXY=db61
-+ DBXY=db60
- AM_CONDITIONAL(WITH_DB, [ true ])
- AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
- if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-@@ -2085,7 +2085,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- ])
- ])
-
--if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
-+if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
- CPPFLAGS="${CPPFLAGS_save}"
- fi
-
-@@ -2097,11 +2097,11 @@ RPM_CHECK_LIB(
- [ DBLIBSRCS="$DBLIBSRCS sqlite.c" ],
- [])
-
--dnl # Sqlite 3.8.3.1 from db-6.1.19
--if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
-+dnl # Sqlite 3.8.3.1 from db-6.0.30
-+if test ".$ac_cv_lib_db_6_0_db_create" = .yes; then
- RPM_CHECK_LIB(
- [Berkeley-DB (+SQLite3)], [dbsql],
-- [db_sql-6.1], [sqlite3_open], [dbsql.h],
-+ [db_sql-6.0], [sqlite3_open], [dbsql.h],
- [yes,external], [db6/sql],
- [
- AM_CONDITIONAL(WITH_DBSQL, [ true ])
-@@ -2253,7 +2253,7 @@ AC_SUBST(WITH_RUBY_CPPFLAGS)
- AC_SUBST(WITH_RUBY_SUBDIR)
- AC_SUBST(WITH_RUBY_VENDORARCHDIR)
-
--dnl # Java prerequisites (swiped from db-6.1.19/dist/aclocal_java et al)
-+dnl # Java prerequisites (swiped from db-6.0.30/dist/aclocal_java et al)
- WITH_JAVA=no
- AC_ARG_WITH([java],
- AS_HELP_STRING([--with-java], [build RPM with java support]),
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch b/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch
deleted file mode 100644
index 16b8e30a1d..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-In certain cases with BerkleyDB 5.3.x we are getting the error:
-
-db3.c:1443: dbcursor->pget(-30999): BDB0063 DB_BUFFER_SMALL: User memory too small for return value
-
-See https://bugs.launchpad.net/rpm/+bug/934420 for more information.
-
-It appears to be some type of a bug in the BerkleyDB 5.3.x. In an attempt
-to workaround the problem, when we encounter this situation we attempt
-to adjust the size of the mmap buffer until the call works, or we
-end up trying 10 times. The new size is either the updated vp->size
-from the failed pget call, or the previous size + 1024.
-
-If DBI debugging is enabled, additional diagnostics are printed, otherwise
-a basic retry and success message is added to show that the failure was
-resolved.
-
-Upstream-Status: Inappropriate (workaround)
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/rpmdb/rpmdb.c
-===================================================================
---- rpm-5.4.14.orig/rpmdb/rpmdb.c
-+++ rpm-5.4.14/rpmdb/rpmdb.c
-@@ -2212,8 +2212,12 @@ static int rpmmiGet(dbiIndex dbi, DBC *
- vp->flags |= DB_DBT_USERMEM;
- rc = dbiGet(dbi, dbcursor, kp, vp, flags);
- if (rc == DB_BUFFER_SMALL) {
-+ int retry = 0;
-+ size_t origlen = vp->size;
- size_t uhlen = vp->size;
-- void * uh = mmap(NULL, uhlen, _prot, _flags, _fdno, _off);
-+ void * uh;
-+retry_get:
-+ uh = mmap(NULL, uhlen, _prot, _flags, _fdno, _off);
- if (uh == NULL || uh == (void *)-1)
- fprintf(stderr,
- "==> mmap(%p[%u], 0x%x, 0x%x, %d, 0x%x) error(%d): %s\n",
-@@ -2235,6 +2239,25 @@ static int rpmmiGet(dbiIndex dbi, DBC *
- if (munmap(uh, uhlen) != 0)
- fprintf(stderr, "==> munmap(%p[%u]) error(%d): %s\n",
- uh, (unsigned)uhlen, errno, strerror(errno));
-+ /* We want to be sure to limit the number of retry attempts to avoid a loop! */
-+ if (rc == DB_BUFFER_SMALL && retry < 10) {
-+ /* If we got a largr vp-size back, use that, otherwise increment the size by 1k */
-+ uhlen = vp->size > uhlen ? vp->size : uhlen + 1024;
-+ retry++;
-+ if ((dbi)->dbi_debug)
-+ fprintf(stderr, "==> DB_BUFFER_SMALL orig requested (%d), configured (%d), forcing larger buffer (%d), new size (%d)\n",
-+ origlen, vp->ulen, uhlen, vp->size);
-+ else
-+ fprintf(stderr, "==> retry (%d) db3cpget (%d)\n", retry, uhlen);
-+ goto retry_get;
-+ }
-+ }
-+ if (retry) {
-+ if ((dbi)->dbi_debug)
-+ fprintf(stderr, "==> success orig requested (%d), configured buffer (%d), buffer (%d), size after dbiGet (%d)\n",
-+ origlen, vp->ulen, uhlen, vp->size);
-+ else
-+ fprintf(stderr, "==> success\n");
- }
- }
- } else
-Index: rpm-5.4.14/rpmdb/db3.c
-===================================================================
---- rpm-5.4.14.orig/rpmdb/db3.c
-+++ rpm-5.4.14/rpmdb/db3.c
-@@ -1509,7 +1509,7 @@ assert(db != NULL);
- #endif
- }
-
--DBIDEBUG(dbi, (stderr, "<-- %s(%p,%p,%p,%p,%p,0x%x) rc %d %s%s\n", __FUNCTION__, dbi, dbcursor, key, pkey, data, flags, rc, _DBCFLAGS(flags), _KEYDATA(key, pkey, data, NULL)));
-+DBIDEBUG(dbi, (stderr, "<-- %s(%p,%p,%p,%p,%p,0x%x) rc %d %s%s\n", __FUNCTION__, dbi, dbcursor, key, pkey, data, flags, rc, _DBCFLAGS(flags), _KEYDATA(key, pkey, rc == DB_BUFFER_SMALL ? NULL : data, NULL)));
- return rc;
- }
- /*@=mustmod@*/
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
deleted file mode 100644
index 2eb6e0f26b..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Debug the platform score generation...
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -465,6 +465,8 @@ static rpmRC rpmPlatform(const char * pl
-
- rc = (rpmRC) rpmiobSlurp(platform, &iob);
-
-+ fprintf(stderr, "D: rpmPlatform file %s\n", platform);
-+
- if (rc || iob == NULL) {
- rc = RPMRC_FAIL;
- goto exit;
-@@ -486,6 +488,7 @@ static rpmRC rpmPlatform(const char * pl
- while (--t > p && xisspace(*t))
- *t = '\0';
- if (t > p) {
-+ fprintf(stderr, "D: rpmPlatform mireAppend REGEX %s\n", p);
- xx = mireAppend(RPMMIRE_REGEX, 0, p, NULL, &mi_re, &mi_nre);
- }
- continue;
-@@ -503,6 +506,11 @@ static rpmRC rpmPlatform(const char * pl
- _gnu = rpmExpand("-", cvog->gnu, NULL);
-
- addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1);
-+ fprintf(stderr, "D: rpmPlatform addMacro %s-%s-%s(%s)\n",
-+ rpmExpand("%{_platform_cpu}", NULL),
-+ rpmExpand("%{_platform_vendor}", NULL),
-+ rpmExpand("%{_platform_os}", NULL),
-+ rpmExpand("%{_platform_gnu}", NULL));
- #else
- addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
- addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
-@@ -510,6 +518,7 @@ static rpmRC rpmPlatform(const char * pl
- #endif
- }
-
-+ fprintf(stderr, "D: rpmPlatform mireAppend STRCMP %s -- ", p);
- #if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */
- #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
- /* do not use vendor and GNU attribution */
-@@ -519,6 +528,7 @@ static rpmRC rpmPlatform(const char * pl
- (cvog && *cvog->gnu ? "-" : NULL),
- (cvog ? cvog->gnu : NULL), NULL);
- #endif
-+ fprintf(stderr, "%s\n", p);
- xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
- p = _free(p);
- #endif
-@@ -688,9 +698,12 @@ int rpmPlatformScore(const char * platfo
-
- if ((mire = (miRE) mi_re) != NULL)
- for (i = 0; i < mi_nre; i++) {
-- if (mireRegexec(mire + i, platform, 0) >= 0)
-+ if (mireRegexec(mire + i, platform, 0) >= 0) {
-+ fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, i + 1);
- return (i + 1);
-+ }
- }
-+ fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, 0);
- return 0;
- }
- /*@=onlytrans@*/
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
deleted file mode 100644
index 124606c0d1..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Make security switches manual settings
-
-RPM checks for the availability of the stack protector switch and
-transactional-memory support. If supported it unconditionally
-enables the compiler options which can cause errors if the support has
-not been built into the compiler.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/configure.ac
-===================================================================
---- rpm-5.4.15.orig/configure.ac
-+++ rpm-5.4.15/configure.ac
-@@ -425,7 +425,7 @@ dnl # rpm_CFLAGS_ADD([-fstack-arrays],[
- dnl # build RPM instrumented for extra optimization/security (GCC only)
- dnl # --- other optimizations
- rpm_CFLAGS_ADD([-fexceptions], [RPM_CFLAGS])
-- rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
-+dnl rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
- dnl # rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
-
- if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
deleted file mode 100644
index adbef6df88..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-rpmio: Disable building of the tblake2 test(s).
-
-There is some type of a dependency fault here that can occasionally result in:
-
-gcc: error: tblake2b.o: No such file or directory
-or
-gcc: error: tblake2bp.o: No such file or directory
-
-These items are simply test cases that are not packaged, so they can be
-safely disabled to resolve the dependency issue.
-
-Upstream-Status: Inappropriate [workaround]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/rpmio/Makefile.am
-===================================================================
---- rpm-5.4.15.orig/rpmio/Makefile.am
-+++ rpm-5.4.15/rpmio/Makefile.am
-@@ -29,7 +29,7 @@ EXTRA_PROGRAMS += bsdiff bspatch pcrsed
- tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \
- dumpasn1 lookup3 trel twitter github tmicrojson duk
-
--noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
-+#noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
- if WITH_LIBGIT2
- noinst_PROGRAMS += tgit
- else
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch b/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
deleted file mode 100644
index 63af100245..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-We need to call rpmcliInit to ensure the rpm relocation code is called
-and it correctly honours the relocation environmental variables.
-
-when we export the wrsdk and source the sdk, then execute rpm2cpio xxx.rpm|cpio -t.
-we will get the following error :
-"rpm-5.4.14/rpmdb/dbconfig.c:493:
-db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed.
-
-Upstream-Status: Pending
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
-Index: rpm-5.4.15/tools/rpm2cpio.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpm2cpio.c 2012-04-27 01:46:51.000000000 +0800
-+++ rpm-5.4.15/tools/rpm2cpio.c 2016-09-05 11:07:30.419903338 +0800
-@@ -87,6 +87,8 @@
- #endif
- (void) rpmtsSetVSFlags(ts, vsflags);
-
-+ rpmcliInit(argc, argv, NULL);
-+
- /*@-mustmod@*/ /* LCL: segfault */
- rc = rpmReadPackageFile(ts, fdi, "rpm2cpio", &h);
- /*@=mustmod@*/
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch b/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch
deleted file mode 100644
index b1db6fff72..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-rpmfc.c: Always generate per-file information
-
-Even when the per-file dependency generate is disabled, we want to generate
-per file classification and other associated data.
-
-Note: this is a temporary workaround. Eventually we will want to have a way
-to seed per-file dependency and other information in order to generate a
-package from previously determined information.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmfc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmfc.c
-+++ rpm-5.4.14/lib/rpmfc.c
-@@ -1734,7 +1734,6 @@ rpmRC rpmfcGenerateDepends(void * _spec,
- /* ... then generate dependencies using %{__find_requires} et al. */
- rc = rpmfcGenerateDependsHelper(spec, pkg, fi);
- printDeps(pkg->header);
-- return rc;
- }
-
- /* Generate scriptlet Dependencies. */
-@@ -1762,8 +1761,8 @@ rpmRC rpmfcGenerateDepends(void * _spec,
- av[ac] = NULL;
-
- fc = rpmfcNew();
-- fc->skipProv = !pkg->autoProv;
-- fc->skipReq = !pkg->autoReq;
-+ fc->skipProv = !pkg->autoProv || !internaldeps;
-+ fc->skipReq = !pkg->autoReq || !internaldeps;
- fc->tracked = 0;
-
- { const char * buildRootURL;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
deleted file mode 100644
index 290ec1aa14..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Occasionally the cp -p fails with a non-zero return code. This will cause
-the system abort the build.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmdb/Makefile.am
-===================================================================
---- rpm.orig/rpmdb/Makefile.am
-+++ rpm/rpmdb/Makefile.am
-@@ -234,11 +234,14 @@ lcov-report:
- #lcov-upload: lcov
- # rsync -rvz -e ssh --delete lcov/* ???
-
-+$(builddir)/logio_recover_template: $(srcdir)/logio_recover_template
-+ @if test ".$(builddir)" != ".$(srcdir)"; then \
-+ cp -fp $(srcdir)/logio_recover_template \
-+ $(builddir)/logio_recover_template ; \
-+ fi
-+
- logio_BUILT = logio_auto.c logio_autop.c logio_auto.h logio_template
--$(logio_BUILT): logio.awk logio.src logio_recover_template
-- @test -e $(builddir)/logio_recover_template || \
-- cp -p $(srcdir)/logio_recover_template \
-- $(builddir)/logio_recover_template
-+$(logio_BUILT): logio.awk logio.src $(builddir)/logio_recover_template
- @rm -f $(logio_BUILT)
- @$(AWK) -f $(srcdir)/logio.awk \
- -v header_file=logio_auto.h \
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
deleted file mode 100644
index 1a08243ab1..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Pending
-
-Subject: lua: fix to build test libs correctly
-
-This patch fixes errors like below.
-
- | gcc: error: lib21.c: No such file or directory
- | gcc: fatal error: no input files
-
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- lua/tests/libs/Makefile.am | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/lua/tests/libs/Makefile.am b/lua/tests/libs/Makefile.am
-index 19d1a0b..1e5de72 100644
---- a/lua/tests/libs/Makefile.am
-+++ b/lua/tests/libs/Makefile.am
-@@ -28,16 +28,16 @@ clean:
- rm -f lib1.so lib11.so lib2.so lib21.so lib2-v2.so
-
- lib1.so: lib1.c
-- $(CC) $(CFLAGS) -o lib1.so lib1.c
-+ $(CC) $(CFLAGS) -o lib1.so $(top_srcdir)/lua/tests/libs/lib1.c
-
- lib11.so: lib11.c
-- $(CC) $(CFLAGS) -o lib11.so lib11.c
-+ $(CC) $(CFLAGS) -o lib11.so $(top_srcdir)/lua/tests/libs/lib11.c
-
- lib2.so: lib2.c
-- $(CC) $(CFLAGS) -o lib2.so lib2.c
-+ $(CC) $(CFLAGS) -o lib2.so $(top_srcdir)/lua/tests/libs/lib2.c
-
- lib21.so: lib21.c
-- $(CC) $(CFLAGS) -o lib21.so lib21.c
-+ $(CC) $(CFLAGS) -o lib21.so $(top_srcdir)/lua/tests/libs/lib21.c
-
- lib2-v2.so: lib2.so
- mv lib2.so ./lib2-v2.so
---
-1.9.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
deleted file mode 100644
index c57f24cd72..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix an issue where parseEmbedded is not defined, but is still used.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmio/macro.c
-===================================================================
---- rpm.orig/rpmio/macro.c
-+++ rpm/rpmio/macro.c
-@@ -1616,8 +1616,6 @@ exit:
- * @retval *avp invocation args
- * @return script string
- */
--#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_MOZJS) || defined(WITH_JNIEMBED) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_MRUBY_EMBED) || defined(WITH_SQLITE) || defined(WITH_SQUIRREL) || defined(WITH_TCL)
--
- static char _FIXME_embedded_interpreter_eval_returned_null[] =
- "FIXME: embedded interpreter eval returned null.";
-
-@@ -1668,7 +1666,6 @@ bingo:
- script[nb] = '\0';
- return script;
- }
--#endif
-
- /**
- * The main macro recursion loop.
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch b/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
deleted file mode 100644
index 36a418fc6a..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-configure.ac: Check if the current compiler supports the transactions
-
-Some distributions appear to have compilers that are built without support
-for transactions, even though they are GCC 4.7 or newer.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/configure.ac
-===================================================================
---- rpm-5.4.15.orig/configure.ac
-+++ rpm-5.4.15/configure.ac
-@@ -425,9 +425,34 @@ dnl # --- other optimizations
- rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
- dnl # rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
-
-- if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
-- rpm_CFLAGS_ADD([-fgnu-tm], [RPM_CFLAGS])
-- fi
-+dnl # Check if the current gcc supports -fgnu-tm and __transaction_atomic
-+AC_MSG_CHECKING([If the compiler supports __transaction_atomic])
-+save_CFLAGS="$CFLAGS"
-+save_LDFLAGS="$LDFLAGS"
-+CFLAGS="${CFLAGS} -fgnu-tm -litm"
-+LDFLAGS="${LDFLAGS} -litm"
-+AC_LINK_IFELSE([AC_LANG_SOURCE([[
-+int
-+main()
-+{
-+#if !__clang__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) /* XXX gud enuf? */
-+ int i = 0;
-+ __transaction_atomic { i++; }
-+#else
-+# error Compiler does not support __transaction_atomic
-+#endif
-+ return 0;
-+}
-+]])], [
-+ AC_DEFINE([HAVE_GNUC_TM_ATOMIC], [1],
-+ [Define to 1 if the compiler supports __transaction_atomic.])
-+ AC_MSG_RESULT([yes])
-+], [
-+ CFLAGS="$save_CFLAGS"
-+ LDFLAGS="$save_LDFLAGS"
-+ AC_MSG_RESULT([no])
-+])
-+
-
- dnl # --- options below are added to RPM_CFLAGS but _NOT_ added to CFLAGS
- CPPFLAGS="$CPPFLAGS $RPM_CPPFLAGS"
-Index: rpm-5.4.15/rpmio/rpmutil.h
-===================================================================
---- rpm-5.4.15.orig/rpmio/rpmutil.h
-+++ rpm-5.4.15/rpmio/rpmutil.h
-@@ -105,7 +105,7 @@
- # define RPM_GNUC_INTERNAL
- #endif
-
--#if !__clang__ && __GNUC__ == 4 && __GNUC_MINOR__ >= 7 /* XXX gud enuf? */
-+#ifdef HAVE_GNUC_TM_ATOMIC
- # define RPM_GNUC_TM_SAFE __attribute__((transaction_safe))
- # define RPM_GNUC_TM_PURE __attribute__((transaction_pure))
- # define RPM_GNUC_TM_CALLABLE __attribute__((transaction_callable))
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
deleted file mode 100644
index 057925fb64..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-We need to sanity check that the nlink size and our linksLeft counter
-do match. If an rpm is badly constructed with identical inode values
-for multiple hardlinked files, such an rpm will otherwise access memory
-out of array bounds and cause memory corruption and crashes.
-
-The fix is to add in the sanity check and exit if bad circumstances
-are found. We need to fix the caller to check the return code too.
-
-RP 2014/6/10
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Index: rpm-5.4.14/lib/fsm.c
-===================================================================
---- rpm-5.4.14.orig/lib/fsm.c
-+++ rpm-5.4.14/lib/fsm.c
-@@ -495,6 +495,11 @@ static int saveHardLink(/*@special@*/ /*
- }
-
- if (fsm->goal == IOSM_PKGBUILD) --fsm->li->linksLeft;
-+ if (fsm->li->linksLeft > st->st_nlink) {
-+ rpmlog(RPMLOG_ERR, _("Corrupted hardlinks found (count %d does not match %d), exiting.\n"), fsm->li->linksLeft, st->st_nlink);
-+ return -1;
-+ }
-+
- fsm->li->filex[fsm->li->linksLeft] = fsm->ix;
- /*@-observertrans -dependenttrans@*/
- fsm->li->nsuffix[fsm->li->linksLeft] = fsm->nsuffix;
-@@ -1878,8 +1883,13 @@ if (!(fsmGetFi(fsm)->mapflags & IOSM_PAY
- fsm->postpone = iosmFileActionSkipped(fsm->action);
- if (fsm->goal == IOSM_PKGINSTALL || fsm->goal == IOSM_PKGBUILD) {
- /*@-evalorder@*/ /* FIX: saveHardLink can modify fsm */
-- if (S_ISREG(st->st_mode) && st->st_nlink > 1)
-+ if (S_ISREG(st->st_mode) && st->st_nlink > 1) {
- fsm->postpone = saveHardLink(fsm);
-+ if (fsm->postpone < 0) {
-+ rc = RPMRC_FAIL;
-+ break;
-+ }
-+ }
- /*@=evalorder@*/
- }
- if (fsmGetFi(fsm)->mapflags & IOSM_PAYLOAD_LIST) fsm->postpone = 1;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch b/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
deleted file mode 100644
index 72884d4ad4..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-rpm - rpmio/keccak.c: make SSE/MMX dependent upon gcc config
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/rpmio/keccak.c
-===================================================================
---- rpm-5.4.15.orig/rpmio/keccak.c
-+++ rpm-5.4.15/rpmio/keccak.c
-@@ -17,9 +17,13 @@ http://keccak.noekeon.org/
- #if OPTIMIZED == 64
- /* ===== "KeccakOpt64-settings.h" */
- #define Unrolling 18
--//#define UseBebigokimisa
--#define UseSSE
--//#define UseMMX
-+#if defined(__SSE2__)
-+ #define UseSSE
-+#elif defined(__MMX__)
-+ #define UseMMX
-+#else
-+ #define UseBebigokimisa
-+#endif
- /* ===== */
- #endif
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
deleted file mode 100644
index 1a48db63c6..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 2 Dec 2015 00:56:07 -0800
-Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
-
-The following error can occur:
- smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
-error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
-error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32
-
-This was because:
-transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64)
-FColor = Current file color (001) & transaction_color (111)
-oFcolor = Previous file color (100) & transaction_color (111)
-
-There are two places where the conflict comparisons occur. In both places
-the 'else' clause was too restrictive (opposite of the 'positive' clause).
-This caused the system to only permit a binary comparison - "new preferred" or
-"old preferred". It did not permissing "neither preferred". By removing the
-else comparison the system will now perform a 'last-in-wins' resolution when
-"neither is preferred".
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
- lib/transaction.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-Index: rpm-5.4.14/lib/transaction.c
-===================================================================
---- rpm-5.4.14.orig/lib/transaction.c
-+++ rpm-5.4.14/lib/transaction.c
-@@ -154,7 +154,7 @@ static int handleInstInstalledFile(const
- fi->actions[fx] = FA_SKIPCOLOR;
- #endif
- rConflicts = 0;
-- } else if (FColor & prefcolor) {
-+ } else {
- #ifdef REFERENCE
- rpmfsSetAction(fs, fx, FA_CREATE);
- #else
-@@ -420,7 +420,7 @@ assert(otherFi != NULL);
- fi->actions[i] = FA_SKIPCOLOR;
- rConflicts = 0;
- } else
-- if (FColor == 0 && oFColor == 0) {
-+ {
- /* ... otherwise, do both, last in wins. */
- otherFi->actions[otherFileNum] = FA_CREATE;
- fi->actions[i] = FA_CREATE;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
deleted file mode 100644
index e87e02b69b..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-During installation, the libtool relink attempts to link to -lrpm...
-The problem is that it hasn't been installed yet! So small change causes
-the libtool to instead use the build version.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/lib/Makefile.am
-+++ rpm-5.4.14/lib/Makefile.am
-@@ -120,6 +120,9 @@ librpm.la: $(librpm_la_OBJECTS) $(librpm
- #libsql_la_SOURCES = libsql.c
- #libsql_la_LIBADD = librpm.la $(RPMDB_LDADD_COMMON)
-
-+# pkglib libraries needs to have usrlib libraries already installed!
-+install-pkglibLTLIBRARIES: install-usrlibLTLIBRARIES
-+
- install-data-hook:
- if !ENABLE_BUILD_LAFILES
- -for l in $(usrlib_LTLIBRARIES); do \
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch b/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch
deleted file mode 100644
index 3153f7a386..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: rpm-5.4.14/rpmdb/DB_CONFIG.in
-===================================================================
---- rpm-5.4.14.orig/rpmdb/DB_CONFIG.in
-+++ rpm-5.4.14/rpmdb/DB_CONFIG.in
-@@ -4,6 +4,7 @@ set_data_dir .
- set_create_dir .
- set_lg_dir ./log
- set_tmp_dir ./tmp
-+set_flags db_log_autoremove on
-
- # -- thread_count must be >= 8
- set_thread_count 64
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch b/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
deleted file mode 100644
index a87518ba3a..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Enable platform tag matching workaround in OE.
-
-When installing some LSB packages the 'platform' field in the package
-appears to be invalid. Instead of relying solely on the platform comparison
-we also want to generate a perceived platform based on the valid rpm contents
-of arch and os.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/depends.c
-===================================================================
---- rpm-5.4.14.orig/lib/depends.c
-+++ rpm-5.4.14/lib/depends.c
-@@ -595,7 +595,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea
- platform = rpmExpand(arch, "-unknown-", os, NULL);
-
- rc = rpmPlatformScore(platform, platpat, nplatpat);
--#if defined(RPM_VENDOR_MANDRIVA)
-+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE)
- /*
- * If no match on platform tag, we'll try again with arch tag
- * in case platform tag is inconsistent with it, which is the case
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch b/meta/recipes-devtools/rpm/rpm/rpm-lua.patch
deleted file mode 100644
index a9930d6705..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Add support for cross compiling lua
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/configure.ac
-===================================================================
---- rpm-5.4.14.orig/configure.ac
-+++ rpm-5.4.14/configure.ac
-@@ -121,6 +121,9 @@ AC_PROG_YACC
-
- AC_PATH_PROG(AS, as, as)
-
-+CC_FOR_BUILD=${CC_FOR_BUILD-\$(CC)}
-+AC_SUBST(CC_FOR_BUILD)
-+
- dnl # GCC specifics
- AC_PROG_GCC_TRADITIONAL
- AC_ARG_ENABLE(build-pic,
-Index: rpm-5.4.14/lua/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/lua/Makefile.am
-+++ rpm-5.4.14/lua/Makefile.am
-@@ -41,7 +41,7 @@ rpmluac_LDADD = liblua.la
-
- # --- bin2c doesn't need anything but a compiler
- bin2c$(EXEEXT): bin2c.c
-- $(CC) -o $@ $<
-+ $(CC_FOR_BUILD) -o $@ $<
-
- liblua_la_SOURCES =
- liblua_la_CFLAGS = @WITH_LUA_SUBDIR_DEF@
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
deleted file mode 100644
index a08412aa91..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-disable external key server
-
-Upstream-Status: Pending
-
-When RPM experiences a signed package, with a signature that it does NOT know.
-By default it will send the -fingerprint- (and only the 16 digit fingerprint) to
-an external HKP server, trying to get the key down.
-
-This is probably not a reasonable default behavior for the system to do, instead
-it should simply fail the key lookup. If someone wants to enable the HKP server
-it's easy enough to do by enabling the necessary macros.
-
-Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Index: rpm/macros/macros.in
-===================================================================
---- rpm.orig/macros/macros.in
-+++ rpm/macros/macros.in
-@@ -563,10 +563,10 @@ $_arbitrary_tags_tests Foo:Bar
-
- # Horowitz Key Protocol server configuration
- #
--%_hkp_keyserver hkp://keys.rpm5.org
-+#%_hkp_keyserver hkp://keys.rpm5.org
- #%_hkp_keyserver hkp://keys.n3npq.net
- #%_hkp_keyserver hkp://pool.sks-keyservers.net
--%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=
-+#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=
-
-
- # NSS_InitContext() parameter configuration
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-macros.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.patch
deleted file mode 100644
index c7ab2d2bb7..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-macros.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-macros/macros.in: Revert settings to the same as RPM 5.4.0
-
-Enable a reasonable set of rpmdeps dependency helper macros. These sets
-were used by RPM 5.4.0.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/macros/macros.in
-===================================================================
---- rpm-5.4.14.orig/macros/macros.in
-+++ rpm-5.4.14/macros/macros.in
-@@ -1022,7 +1022,7 @@ $_arbitrary_tags_tests Foo:Bar
-
- #==============================================================================
- # ---- rpmbuild macros.
--#%%{load:%{_usrlibrpm}/macros.rpmbuild}
-+%{load:%{_usrlibrpm}/macros.rpmbuild}
-
- #------------------------------------------------------------------------
- # cmake(...) configuration
-@@ -1038,15 +1038,15 @@ $_arbitrary_tags_tests Foo:Bar
-
- #------------------------------------------------------------------------
- # perl(...) configuration
--#%%{load:%{_usrlibrpm}/macros.d/perl}
-+%{load:%{_usrlibrpm}/macros.d/perl}
-
- #------------------------------------------------------------------------
- # python(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/python}
-+%{load:%{_usrlibrpm}/macros.d/python}
-
- #------------------------------------------------------------------------
- # php(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/php}
-+%{load:%{_usrlibrpm}/macros.d/php}
-
- #------------------------------------------------------------------------
- # java(...) configuration.
-@@ -1054,11 +1054,11 @@ $_arbitrary_tags_tests Foo:Bar
-
- #------------------------------------------------------------------------
- # libtool(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/libtool}
-+%{load:%{_usrlibrpm}/macros.d/libtool}
-
- #------------------------------------------------------------------------
- # pkgconfig(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/pkgconfig}
-+%{load:%{_usrlibrpm}/macros.d/pkgconfig}
-
- #------------------------------------------------------------------------
- # mono(...) configuration.
-@@ -1070,7 +1070,7 @@ $_arbitrary_tags_tests Foo:Bar
-
- #------------------------------------------------------------------------
- # tcl(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/tcl}
-+%{load:%{_usrlibrpm}/macros.d/tcl}
-
- #------------------------------------------------------------------------
- # typelib(...) configuration.
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch b/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
deleted file mode 100644
index 6c3e4718b9..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Fix errors when building with sasl2 disabled
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmio/mongoc.c
-===================================================================
---- rpm.orig/rpmio/mongoc.c
-+++ rpm/rpmio/mongoc.c
-@@ -39,8 +39,10 @@
- # include <winerror.h>
- #endif
-
-+#ifdef HAVE_LIBSASL2
- #include <sasl/sasl.h>
- #include <sasl/saslutil.h>
-+#endif
-
- #include <openssl/bio.h>
- #include <openssl/ssl.h>
-@@ -14228,6 +14230,7 @@ mongoc_read_prefs_copy (const mongoc_rea
- return ret;
- }
-
-+#ifdef MONGOC_ENABLE_SASL
- /*==============================================================*/
- /* --- mongoc-sasl.c */
-
-@@ -14555,6 +14558,7 @@ _mongoc_sasl_step (mongoc_sasl_t *sasl,
-
- return true;
- }
-+#endif
-
- /*==============================================================*/
- /* --- mongoc-socket.c */
-Index: rpm/rpmio/mongoc.h
-===================================================================
---- rpm.orig/rpmio/mongoc.h
-+++ rpm/rpmio/mongoc.h
-@@ -38,8 +38,10 @@
- # include <sys/un.h>
- #endif
-
-+#ifdef HAVE_LIBSASL2
- #include <sasl/sasl.h>
- #include <sasl/saslutil.h>
-+#endif
-
- #include <openssl/bio.h>
- #include <openssl/ssl.h>
-@@ -2455,6 +2457,8 @@ BSON_END_DECLS
- /*==============================================================*/
- /* --- mongoc-sasl-private.h */
-
-+#ifdef MONGOC_ENABLE_SASL
-+
- BSON_BEGIN_DECLS
-
-
-@@ -2498,6 +2502,7 @@ bool _mongoc_sasl_step (mong
-
-
- BSON_END_DECLS
-+#endif
-
- /*==============================================================*/
- /* --- mongoc-ssl-private.h */
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch b/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
deleted file mode 100644
index e58cc13a6f..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-lib/order.c: Make the dependency loop messages into debug msgs
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/order.c
-===================================================================
---- rpm-5.4.14.orig/lib/order.c
-+++ rpm-5.4.14/lib/order.c
-@@ -2175,7 +2175,7 @@ rescan:
- const char * dp;
- rpmlogLvl msglvl = (anaconda || (rpmtsDFlags(ts) & RPMDEPS_FLAG_DEPLOOPS))
- ? RPMLOG_WARNING : RPMLOG_ERR;
--#if defined(RPM_VENDOR_MANDRIVA) /* loop-detection-optional-loglevel */
-+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE) /* loop-detection-optional-loglevel */
- // Report loops as debug-level message by default (7 = RPMLOG_DEBUG), overridable
- msglvl = rpmExpandNumeric("%{?_loop_detection_loglevel}%{?!_loop_detection_loglevel:7}");
- #endif
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch b/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch
deleted file mode 100644
index 58182296cf..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Disable perl-URPM support
-
-This causes a configure failure when perl-URPM is not used.
-
-| configure.ac:1159: required file `perl-URPM/Makefile.PL.in' not found
-| configure.ac:1159: required file `perl-URPM/Makefile.in' not found
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/configure.ac
-===================================================================
---- rpm-5.4.14.orig/configure.ac
-+++ rpm-5.4.14/configure.ac
-@@ -1186,30 +1186,10 @@ AC_SUBST(WITH_PERL_SUBDIR)
- AC_SUBST(WITH_PERL_SUBPACKAGE)
- AC_SUBST(WITH_PERL_LIBS)
-
--dnl # optional Perl-URPM language bindings
-+dnl # disable Perl-URPM language bindings
- WITH_PERL_URPM_SUBDIR=""
- WITH_PERL_URPM_SUBPACKAGE=0
- WITH_PERL_URPM_LIBS=""
--if test ".$WITH_PTHREADS" = .yes; then
-- WITH_PERL_URPM_LIBS="$LIBS"
--fi
--AC_ARG_WITH(perl-urpm, AS_HELP_STRING([--with-perl-urpm], [build with Perl URPM language bindings]), [
-- if test ".$withval" != .no; then
-- PERL_URPM_INSTALLDIRS=""
-- if test "$withval" == "vendor"; then
-- PERL_URPM_INSTALLDIRS="'INSTALLDIRS' => 'vendor',"
-- fi
-- if test "$withval" == "site"; then
-- PERL_URPM_INSTALLDIRS="'INSTALLDIRS' => 'site',"
-- fi
-- AC_DEFINE_UNQUOTED([PERL_URPM_INSTALLDIRS], [$PERL_URPM_INSTALLDIRS], [Perl install directory (vendor/site)])
-- AC_SUBST(PERL_URPM_INSTALLDIRS)
-- WITH_PERL_URPM_SUBDIR=perl-URPM
-- WITH_PERL_URPM_SUBPACKAGE=1
-- AC_CONFIG_FILES([perl-URPM/Makefile.PL])
-- AC_CONFIG_FILES([perl-URPM/Makefile])
-- fi
--])
- AC_SUBST(WITH_PERL_URPM_SUBDIR)
- AC_SUBST(WITH_PERL_URPM_SUBPACKAGE)
- AC_SUBST(WITH_PERL_URPM_LIBS)
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch b/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
deleted file mode 100644
index e2191245f8..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-rpm: opendb before rpmverifyscript to avoid null point input
-
-If the command is "rpm -V" and the return value of (headerIsEntry(h, RPMTAG_VERIFYSCRIPT)
-|| headerIsEntry(h, RPMTAG_SANITYCHECK)) located in /lib/verify.c is true, it will call
-rpmpsmStage function(rpmVerifyScript->rpmpsmScriptStage->rpmpsmStage) and occur segment
-fault because of null point(rpmtsGetRdb(ts) == NULL and rpmtsGetRdb(ts)->db_txn).
-So we open rpmdb to avoid bad input when find headerIsEntry true.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
-Index: rpm-5.4.14/lib/verify.c
-===================================================================
---- rpm-5.4.14.orig/lib/verify.c 2015-07-22 22:09:59.992895355 +0800
-+++ rpm-5.4.14/lib/verify.c 2015-08-13 10:20:33.752177906 +0800
-@@ -613,6 +613,8 @@
- {
- FD_t fdo = fdDup(STDOUT_FILENO);
-
-+ rpmtsOpenDB(ts, O_RDONLY); /*Open the DB to avoid null point input in function rpmpsmStage()*/
-+
- rc = rpmfiSetHeader(fi, h);
- if ((rc = rpmVerifyScript(qva, ts, fi, fdo)) != 0)
- ec += rc;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch b/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch
deleted file mode 100644
index 691aba9ea3..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Fix integration of ossp-uuid
-
-We need to avoid including the util-linux uuid library, instead
-we need ossp-uuid. There is a related hack in do_configure to
-make sure that we use the right .pc file as well.
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/configure.ac
-===================================================================
---- rpm-5.4.14.orig/configure.ac
-+++ rpm-5.4.14/configure.ac
-@@ -1951,7 +1951,7 @@ grep -v 'define HAVE_UNISTD_H' confdefs.
- esac
- RPM_CHECK_LIB(
- [OSSP uuid], [uuid],
-- [ossp-uuid uuid], [uuid_import], [uuid.h],
-+ [ossp-uuid], [uuid_import], [uuid.h],
- [no,external:none], [],
- [ dnl # enable OSSP uuid native API support for embedded Lua
- if test ".$WITH_LUA" = .yes; then
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch b/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
deleted file mode 100644
index 57fc6ce88c..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Add the ability to query the packageorigin
-
-Written by jbj at rpm5.org
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/rpmdb/hdrfmt.c
-===================================================================
---- rpm-5.4.14.orig/rpmdb/hdrfmt.c
-+++ rpm-5.4.14/rpmdb/hdrfmt.c
-@@ -2409,8 +2409,10 @@ static int pkgoriginTag(Header h, HE_t h
- int rc = 1;
-
- he->tag = RPMTAG_PACKAGEORIGIN;
-- if (!headerGet(h, he, HEADERGET_NOEXTENSION)
-- && (origin = headerGetOrigin(h)) != NULL)
-+ /* XXX two sources for tag data: what search precedence? */
-+ if (headerGet(h, he, HEADERGET_NOEXTENSION))
-+ rc = 0;
-+ else if ((origin = headerGetOrigin(h)) != NULL)
- {
- he->t = RPM_STRING_TYPE;
- he->p.str = xstrdup(origin);
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch b/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
deleted file mode 100644
index af643b1c62..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-If we run builds on a filesystem with 64 bit inodes like XFS, we need to
-map the inode numbers to something 32 bit since the cpio header only allows
-for 32 bit inode values. If we don't do this:
-
-#define SET_NUM_FIELD(phys, val, space) \
- sprintf(space, "%8.8lx", (unsigned long) (val)); \
- memcpy(phys, space, 8)
-
-from cpio.c will print larger that 8 character values and then truncate the
-LSBs. This generates cpio files where hardlinked files may have the same
-inode number. The resulting rpms are then corrupted.
-
-There is a separate patch for the crash the identical inode numbers causes
-when extracting the rpm.
-
-Patch taken from http://git.pld-linux.org/?p=packages/rpm.git;a=commitdiff;h=10526c23aac60b7b636e4c93862887dbef8e8f15
-
-RP 2014/6/10
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Index: rpm-5.4.14/build/files.c
-===================================================================
---- rpm-5.4.14.orig/build/files.c
-+++ rpm-5.4.14/build/files.c
-@@ -1328,6 +1328,26 @@ static rpmuint32_t getDigestAlgo(Header
- return dalgo;
- }
-
-+static int isHardLink(FileListRec flp, FileListRec tlp)
-+{
-+ return ((S_ISREG(flp->fl_mode) && S_ISREG(tlp->fl_mode)) &&
-+ ((flp->fl_nlink > 1) && (flp->fl_nlink == tlp->fl_nlink)) &&
-+ (flp->fl_ino == tlp->fl_ino) &&
-+ (flp->fl_dev == tlp->fl_dev));
-+}
-+
-+static int seenHardLink(FileList fl, FileListRec flp, ino_t *fileid)
-+{
-+ FileListRec ilp;
-+ for (ilp = fl->fileList; ilp < flp; ilp++) {
-+ if (isHardLink(flp, ilp)) {
-+ *fileid = ilp - fl->fileList;
-+ return 1;
-+ }
-+ }
-+ return 0;
-+}
-+
- /**
- * Add file entries to header.
- * @todo Should directories have %doc/%config attributes? (#14531)
-@@ -1374,6 +1394,7 @@ memset(buf, 0, sizeof(buf)); /* XXX valg
-
- for (i = 0, flp = fl->fileList; i < fl->fileListRecsUsed; i++, flp++) {
- const char *s;
-+ ino_t fileid = flp - fl->fileList;
-
- /* Merge duplicate entries. */
- while (i < (fl->fileListRecsUsed - 1) &&
-@@ -1436,6 +1457,13 @@ memset(buf, 0, sizeof(buf)); /* XXX valg
- /* Leave room for both dirname and basename NUL's */
- dpathlen += (strlen(flp->diskURL) + 2);
-
-+ /* Excludes and dupes have been filtered out by now. */
-+ if (S_ISREG(flp->fl_mode)) {
-+ if (flp->fl_nlink == 1 || !seenHardLink(fl, flp, &fileid)) {
-+ fl->totalFileSize += flp->fl_size;
-+ }
-+ }
-+
- /*
- * Make the header, the OLDFILENAMES will get converted to a
- * compressed file list write before we write the actual package to
-@@ -1518,7 +1546,11 @@ memset(buf, 0, sizeof(buf)); /* XXX valg
-
- /* XXX Hash instead of 64b->32b truncate to prevent aliasing. */
- { ino_t _ino = flp->fl_ino;
-+ /* don't use hash here, as hash collisions which happen on large packages
-+ cause bus errors in rpmbuild
- ui32 = hashFunctionString(0, &_ino, sizeof(_ino));
-+ */
-+ ui32 = fileid + 1;
- }
- he->tag = RPMTAG_FILEINODES;
- he->t = RPM_UINT32_TYPE;
-@@ -1751,39 +1783,6 @@ if (_rpmbuildFlags & 4) {
- IOSM_MAP_TYPE | IOSM_MAP_MODE | IOSM_MAP_UID | IOSM_MAP_GID;
- if (isSrc)
- fi->fmapflags[i] |= IOSM_FOLLOW_SYMLINKS;
--
-- if (S_ISREG(flp->fl_mode)) {
-- int bingo = 1;
-- /* Hard links need be tallied only once. */
-- if (flp->fl_nlink > 1) {
-- FileListRec jlp = flp + 1;
-- int j = i + 1;
-- for (; (unsigned)j < fi->fc; j++, jlp++) {
-- /* follow outer loop logic */
-- while (((jlp - fl->fileList) < (fl->fileListRecsUsed - 1)) &&
-- !strcmp(jlp->fileURL, jlp[1].fileURL))
-- jlp++;
-- if (jlp->flags & RPMFILE_EXCLUDE) {
-- j--;
-- /*@innercontinue@*/ continue;
-- }
-- if (jlp->flags & RPMFILE_GHOST)
-- /*@innercontinue@*/ continue;
-- if (!S_ISREG(jlp->fl_mode))
-- /*@innercontinue@*/ continue;
-- if (flp->fl_nlink != jlp->fl_nlink)
-- /*@innercontinue@*/ continue;
-- if (flp->fl_ino != jlp->fl_ino)
-- /*@innercontinue@*/ continue;
-- if (flp->fl_dev != jlp->fl_dev)
-- /*@innercontinue@*/ continue;
-- bingo = 0; /* don't tally hardlink yet. */
-- /*@innerbreak@*/ break;
-- }
-- }
-- if (bingo)
-- fl->totalFileSize += flp->fl_size;
-- }
- }
-
- ui32 = fl->totalFileSize;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch b/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
deleted file mode 100644
index 656de86d70..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-pkgconfigdeps.sh: Change to restricting pkgconfig to the local directory
-
-Using PKG_CONFIG_PATH will allow pkg-config to fall back to the system paths,
-we don't want this as it may lead to inaccurate results in some corner cases.
-
-PKG_CONFIG_LIBDIR will ensure pkg-config stays within the install directory.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/scripts/pkgconfigdeps.sh
-===================================================================
---- rpm.orig/scripts/pkgconfigdeps.sh
-+++ rpm/scripts/pkgconfigdeps.sh
-@@ -18,8 +18,8 @@ case $1 in
- *.pc)
- # Query the dependencies of the package.
- DIR=$(dirname ${filename})
-- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
-- export PKG_CONFIG_PATH
-+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
-+ export PKG_CONFIG_LIBDIR
- $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do
- [ -n "$n" ] || continue
- # We have a dependency. Make a note that we need the pkgconfig
-@@ -42,8 +42,8 @@ case $1 in
- [ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
- # Query the dependencies of the package.
- DIR=$(dirname ${filename})
-- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
-- export PKG_CONFIG_PATH
-+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
-+ export PKG_CONFIG_LIBDIR
- $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
- [ -n "$n" ] || continue
- if [ -n "$r" ] && [ -n "$v" ]; then
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
deleted file mode 100644
index 200964f39d..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Don't add the first line of /etc/rpm/platform to the list of patterns
-to match when computing an arch score, use it just for getting
-information about the platform (cpu/vendor/os). Fixes #3864.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -510,6 +510,7 @@ static rpmRC rpmPlatform(const char * pl
- #endif
- }
-
-+#if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */
- #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
- /* do not use vendor and GNU attribution */
- p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
-@@ -520,7 +521,8 @@ static rpmRC rpmPlatform(const char * pl
- #endif
- xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
- p = _free(p);
--
-+#endif
-+
- init_platform++;
- }
- rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
deleted file mode 100644
index 3b40fea0eb..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-Fix up platform and related sysinfo file loading.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-This ensures that RPM knows the compatible set of package types at all times.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/depends.c
-===================================================================
---- rpm-5.4.14.orig/lib/depends.c
-+++ rpm-5.4.14/lib/depends.c
-@@ -250,7 +250,7 @@ static int rpmtsAddUpgrades(rpmts ts, rp
- he->p.ptr = _free(he->p.ptr);
- }
-
--#if defined(RPM_VENDOR_WINDRIVER)
-+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
- /*
- * If we're capable of installing multiple colors
- * but at least one of the packages are white (0), we
-@@ -507,7 +507,7 @@ assert(lastx >= 0 && lastx < ts->orderCo
- return 0;
- }
-
--#if defined(RPM_VENDOR_WINDRIVER)
-+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
- /* Is "compat" compatible w/ arch? */
- int _isCompatibleArch(const char * arch, const char * compat)
- {
-@@ -663,7 +663,7 @@ assert(he->p.str != NULL);
-
- if (arch == NULL || (parch = rpmteA(p)) == NULL)
- continue;
--#if defined(RPM_VENDOR_WINDRIVER)
-+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
- /* XXX hackery for alias matching. */
- if (!_isCompatibleArch(arch, parch))
- continue;
-@@ -829,6 +829,12 @@ int rpmtsAddEraseElement(rpmts ts, Heade
- return rc;
- }
-
-+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
-+#define _ETC_RPM_SYSINFO "%{_etcrpm}/sysinfo"
-+#else
-+#define _ETC_RPM_SYSINFO SYSCONFIGDIR "/sysinfo"
-+#endif
-+
- /*@only@*/ /*@null@*/ /*@unchecked@*/
- static char *sysinfo_path = NULL;
-
-@@ -1311,7 +1317,7 @@ retry:
- sysinfo_path = rpmExpand("%{?_rpmds_sysinfo_path}", NULL);
- if (!(sysinfo_path != NULL && *sysinfo_path == '/')) {
- sysinfo_path = _free(sysinfo_path);
-- sysinfo_path = xstrdup(SYSCONFIGDIR "/sysinfo");
-+ sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL);
- }
- }
-
-Index: rpm-5.4.14/lib/rpmds.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmds.c
-+++ rpm-5.4.14/lib/rpmds.c
-@@ -1759,7 +1759,7 @@ int rpmdsSysinfo(rpmPRCO PRCO, const cha
- /*@-observertrans @*/
- _sysinfo_path = _free(_sysinfo_path);
- /*@=observertrans @*/
-- _sysinfo_path = xstrdup(_ETC_RPM_SYSINFO);
-+ _sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL);
- }
- }
- /*@=modobserver@*/
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -38,7 +38,13 @@
- static const char * configTarget = NULL;
-
- /*@observer@*/ /*@unchecked@*/
--static const char * platform = SYSCONFIGDIR "/platform";
-+#if defined(RPM_VENDOR_WINDRIVER)
-+#define _ETC_RPM_PLATFORM "%{_etcrpm}/platform"
-+#else
-+#define _ETC_RPM_PLATFORM SYSCONFIGDIR "/platform"
-+#endif
-+
-+static const char * _platform = NULL;
-
- /*@only@*/ /*@relnull@*/ /*@unchecked@*/
- void * platpat = NULL;
-@@ -694,16 +700,17 @@ static void defaultMachine(/*@out@*/ con
- int rc;
-
- while (!gotDefaults) {
--#if defined(RPM_VENDOR_WINDRIVER)
-- const char * _platform = rpmGetPath(__etcrpm, "/platform", NULL);
--#else
-- const char * _platform = platform;
--#endif
-+ if (_platform == NULL) {
-+ _platform = rpmExpand("%{?_rpmrc_platform_path}", NULL);
-+ /* XXX may need to validate path existence somewhen. */
-+ if (!(_platform != NULL && *_platform == '/')) {
-+ _platform = _free(_platform);
-+ _platform = rpmExpand(_ETC_RPM_PLATFORM, NULL);
-+ }
-+ }
- CVOG_t cvog = NULL;
- #if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */
- const char *cp;
--#endif
--#if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */
- /* utsname fields on some platforms (like HP-UX) are very small
- (just about 8 characters). This is too small for OpenPKG, so cheat! */
- rc = uname(&un_real);
-@@ -780,9 +787,7 @@ static void defaultMachine(/*@out@*/ con
- if (cp != NULL && cp != _platform)
- cp = _free(cp);
- #endif
--#if defined(RPM_VENDOR_WINDRIVER)
- _platform = _free(_platform);
--#endif
-
- if (configTarget && !parseCVOG(configTarget, &cvog) && cvog != NULL) {
- gotDefaults = 1;
-@@ -1101,6 +1106,8 @@ int rpmReadConfigFiles(/*@unused@*/ cons
-
- #ifdef PREMACROFILES
- if (rpmReadRC(PREMACROFILES)) return -1;
-+#else
-+ if (rpmReadRC(NULL)) return -1;
- #endif
-
- /* Reset umask to its default umask(2) value. */
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
deleted file mode 100644
index b9675c71be..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Fix up platform and related sysinfo file loading (part 2).
-
-We need to ensure that we set the _gnu flag somehow. We do this by reading
-from the platform file, and setting a new _platform_gnu and related vars.
-
-The default values of _host_cpu, _host_vendor and _host_os are changed to
-reference either the automatically determined _target_... or _platform_...
-values. The macros file uses the configure time defaults in _platform_...
-versions have not been defined. This preserves existing behavior, but
-ensures reasonable defaults are always available.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -328,10 +328,15 @@ static void setDefaults(void)
- /*@modifies rpmGlobalMacroContext, internalState @*/
- {
-
--#if defined(RPM_VENDOR_WINDRIVER)
-+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
- addMacro(NULL, "_usrlibrpm", NULL, __usrlibrpm, RMIL_DEFAULT);
- addMacro(NULL, "_etcrpm", NULL, __etcrpm, RMIL_DEFAULT);
- addMacro(NULL, "_vendor", NULL, "%{?_host_vendor}%{!?_host_vendor:wrs}", RMIL_DEFAULT);
-+
-+ addMacro(NULL, "_host_cpu", NULL, "%{?_platform_cpu}%{!?_platform_cpu:%{?_target_cpu}}", RMIL_DEFAULT);
-+ addMacro(NULL, "_host_vendor", NULL, "%{?_platform_vendor}%{!?_platform_cpu:%{?_target_vendor}}", RMIL_DEFAULT);
-+ addMacro(NULL, "_host_os", NULL, "%{?_platform_os}%{!?_platform_os:%{?_target_os}}", RMIL_DEFAULT);
-+ addMacro(NULL, "_host_gnu", NULL, "%{?_platform_gnu}%{!?_platform_gnu:%{?_gnu}}", RMIL_DEFAULT);
- #endif
-
- addMacro(NULL, "_usr", NULL, USRPREFIX, RMIL_DEFAULT);
-@@ -487,9 +492,22 @@ static rpmRC rpmPlatform(const char * pl
- }
-
- if (!parseCVOG(p, &cvog) && cvog != NULL) {
-+#if defined(RPM_VENDOR_OE)
-+ char * _gnu = NULL;
-+
-+ addMacro(NULL, "_platform_cpu", NULL, cvog->cpu, -1);
-+ addMacro(NULL, "_platform_vendor", NULL, cvog->vendor, -1);
-+ addMacro(NULL, "_platform_os", NULL, cvog->os, -1);
-+
-+ if (cvog->gnu && cvog->gnu[0] != '\0')
-+ _gnu = rpmExpand("-", cvog->gnu, NULL);
-+
-+ addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1);
-+#else
- addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
- addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
- addMacro(NULL, "_host_os", NULL, cvog->os, -1);
-+#endif
- }
-
- #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
-Index: rpm-5.4.14/macros/macros.in
-===================================================================
---- rpm-5.4.14.orig/macros/macros.in
-+++ rpm-5.4.14/macros/macros.in
-@@ -900,9 +900,9 @@ $_arbitrary_tags_tests Foo:Bar
- %_os @RPMCANONOS@
- %_gnu @RPMCANONGNU@
-
--%_host_platform %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}
--%_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_gnu}
--%_target_platform %{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_gnu}
-+%_host_platform %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
-+%_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
-+%_target_platform %{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
-
- #==============================================================================
- # ---- configure macros.
-@@ -945,9 +945,10 @@ $_arbitrary_tags_tests Foo:Bar
- %_build_os %{_host_os}
- %_host @host@
- %_host_alias @host_alias@%{nil}
--%_host_cpu @host_cpu@
--%_host_vendor @host_vendor@
--%_host_os @host_os@
-+%_host_cpu %{?_platform_cpu}%{!?_platform_cpu:%{_arch}}
-+%_host_vendor %{?_platform_vendor}%{!?_platform_vendor:%{_vendor}}
-+%_host_os %{?_platform_os}%{!?_platform_os:%{_os}}
-+%_host_gnu %{?_platform_gnu}%{!?_platform_gnu:%{_gnu}}
- %_target %{_host}
- %_target_alias %{_host_alias}
- %_target_cpu %{_host_cpu}
-Index: rpm-5.4.14/python/rpmmodule.c
-===================================================================
---- rpm-5.4.14.orig/python/rpmmodule.c
-+++ rpm-5.4.14/python/rpmmodule.c
-@@ -65,8 +65,8 @@ static PyObject * archScore(PyObject * s
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &arch))
- return NULL;
-
--#if defined(RPM_VENDOR_WINDRIVER)
-- platform = rpmExpand(arch, "-%{_host_vendor}", "-%{_host_os}%{?_gnu}", NULL);
-+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
-+ platform = rpmExpand(arch, "-%{_host_vendor}", "-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}", NULL);
- #else
- platform = rpmExpand(arch, "-", "%{_vendor}", "-", "%{_os}", NULL);
- #endif
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
deleted file mode 100644
index 92ef1dc50e..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-python/rpmmodules.c: Change the way the python module loads the RPM config
-
-In order to support the RPM_VENDOR_WINDRIVER enhancement of dynamic
-runtime relocation paths, we need to call rpmcliInit instead of
-rpmReadConfigFiles. The rpmcliInit will end up calling rpmReadConfigFiles
-after the necessary relocation processing (if enabled).
-
-Code derived from changes suggested by Paul Eggleton.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/python/rpmmodule.c
-===================================================================
---- rpm.orig/python/rpmmodule.c
-+++ rpm/python/rpmmodule.c
-@@ -382,9 +382,8 @@ static int initModule(PyObject *m)
- /* XXX add --noparentdirs --nolinktos to rpmtsCheck() */
- global_depFlags = (RPMDEPS_FLAG_NOPARENTDIRS | RPMDEPS_FLAG_NOLINKTOS);
-
-- /* failure to initialize rpm (crypto and all) is rather fatal too... */
-- if (rpmReadConfigFiles(NULL, NULL) == -1)
-- return 0;
-+ const char *argv[1] = {"rpmmodule", 0};
-+ rpmcliInit(1, argv, NULL);
-
- d = PyModule_GetDict(m);
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
deleted file mode 100644
index df6f4722ee..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-rpm/python: The RPM5 API requires a hdrNum to be passed in
-
-The former behavior of passing in -1 as the hdrNum resulting in erase
-operations that did not complete, but also did not error. Changing to
-using the header instance resolves this problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/python/rpmts-py.c
-===================================================================
---- rpm-5.4.15.orig/python/rpmts-py.c
-+++ rpm-5.4.15/python/rpmts-py.c
-@@ -241,12 +241,19 @@ static PyObject *
- rpmts_AddErase(rpmtsObject * s, PyObject * args)
- {
- Header h;
-+ uint32_t hdrNum;
-
- if (!PyArg_ParseTuple(args, "O&:AddErase", hdrFromPyObject, &h))
- return NULL;
-
--SPEW((stderr, "*** %s(%p,%p) ts %p\n", __FUNCTION__, s, h, s->ts));
-+ hdrNum = headerGetInstance(h);
-+
-+SPEW((stderr, "*** %s(%p,%p) ts %p hdrNum %ld\n", __FUNCTION__, s, h, s->ts, hdrNum));
-+#ifdef REFERENCE /* this doesn't work, RPM5 requires a unique hdrNum */
- return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, -1) == 0);
-+#else
-+ return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, hdrNum) == 0);
-+#endif
- }
-
- static int
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
deleted file mode 100644
index 7a473db1ad..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Fix an issue where the PACKAGEORIGIN is not properly stored.
-
-Restore the rpmtsCallback fdSetOpen call and related code.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/python/rpmts-py.c
-===================================================================
---- rpm.orig/python/rpmts-py.c
-+++ rpm/python/rpmts-py.c
-@@ -672,6 +672,8 @@ rpmtsCallback(const void * hd, const rpm
- Header h = (Header) hd;
- struct rpmtsCallbackType_s * cbInfo = data;
- PyObject * pkgObj = (PyObject *) pkgKey;
-+ PyObject * oh = NULL;
-+ const char * origin = NULL;
- PyObject * args, * result;
- static FD_t fd;
-
-@@ -693,8 +695,16 @@ rpmtsCallback(const void * hd, const rpm
- pkgObj = Py_None;
- Py_INCREF(pkgObj);
- }
-- } else
-+ } else {
- Py_INCREF(pkgObj);
-+ /* XXX yum has (h, rpmloc) tuple as pkgKey. Extract the path. */
-+ if (!(PyTuple_Check(pkgObj) && PyArg_ParseTuple(pkgObj, "|Os", &oh, &origin)))
-+ origin = NULL;
-+ /* XXX clean up the path, yum paths start "//..." */
-+ if (origin && origin[0] == '/' && origin[1] == '/')
-+ origin++;
-+ }
-+
-
- PyEval_RestoreThread(cbInfo->_save);
-
-@@ -723,6 +733,9 @@ SPEW((stderr, "\t%p = fdDup(%d)\n", fd,
-
- fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC);
-
-+ if (origin != NULL)
-+ (void) fdSetOpen(fd, origin, 0, 0);
-+
- return fd;
- } else
- if (what == RPMCALLBACK_INST_CLOSE_FILE) {
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
deleted file mode 100644
index dfb551377e..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-rpm-python-module: Change the extension tag from PyCObject to PyInt
-
-Use the tagValue to determine the custom PyInt value to use for the extension
-tag. Without this, any custom tag extensions will be returned in a format
-that the tagNumFromPyObject and related functions like hdr_subscript will
-failed to process. Usually the failure is error: expected a string or integer
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/python/rpmmodule.c
-===================================================================
---- rpm-5.4.15.orig/python/rpmmodule.c
-+++ rpm-5.4.15/python/rpmmodule.c
-@@ -316,7 +316,7 @@ static void addRpmTags(PyObject *module)
- {
- if (ext->name == NULL || ext->type != HEADER_EXT_TAG)
- continue;
-- PyDict_SetItemString(d, (char *) ext->name, to=PyCObject_FromVoidPtr((void *)ext, NULL));
-+ PyDict_SetItemString(d, (char *) ext->name, to=PyInt_FromLong(tagValue(ext->name)));
- Py_XDECREF(to);
- PyDict_SetItem(dict, to, o=PyString_FromString(ext->name + 7));
- Py_XDECREF(o);
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
deleted file mode 100644
index a810123ba8..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-chroot: realpath is required before expanding _dbpath
-
-_usr turned out to be a relative path to support dyanmic config, but it's
-being used somewhere as a indicator to locate substrings, so we must get
-the real path of it in advance.
-
-Upstream-Status: Inappropriate (OpenEmbedded specific)
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
-
-diff -urpN a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c
---- 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 * 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);
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch b/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch
deleted file mode 100644
index 59fe524df3..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-macros: Use dyanmic config vs hard coded settings
-
-When the dynamic, runtime relocation is enables we need to make sure that the
-RPM macro file does not override the dynamic settings. Fix this by forcing the
-dynamic version to be used in all cases.
-
-Upstream-Status: Inappropriate (OpenEmbedded specific)
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/macros/macros.in
-===================================================================
---- rpm-5.4.14.orig/macros/macros.in
-+++ rpm-5.4.14/macros/macros.in
-@@ -27,11 +27,12 @@
- #==============================================================================
- # ---- filesystem macros.
- #
--%_usr @usrprefix@
-+%_usr %{_usrlibrpm}/../..
- %_usrsrc %{_usr}/src
--%_var @varprefix@
--%_usrlibrpm @USRLIBRPM@
--%_etcrpm @SYSCONFIGDIR@
-+%_var %{_usr}/../var
-+# The dynamic relocation code sets the following two items
-+#%_usrlibrpm @USRLIBRPM@
-+#%_etcrpm @SYSCONFIGDIR@
-
- %__objext @objext@
- %__libext @libext@
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch b/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
deleted file mode 100644
index 526106d1e3..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-lib/rpmts.c: Ensure that we check both providename and filepaths
-
-When looking up a missing dependencies, such as /bin/sh, we need to lookup
-in both the providename and filepaths DB, not just the filepaths DB.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmts.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmts.c
-+++ rpm-5.4.14/lib/rpmts.c
-@@ -410,8 +410,8 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __
- if (sdb == NULL)
- continue;
-
-- /* Look for a matching Provides: in suggested universe. */
-- rpmtag = (*keyp == '/' ? RPMTAG_FILEPATHS : RPMTAG_PROVIDENAME);
-+ rpmtag = RPMTAG_PROVIDENAME;
-+ do {
- mi = rpmmiInit(sdb, rpmtag, keyp, keylen);
- while ((h = rpmmiNext(mi)) != NULL) {
- size_t hnamelen;
-@@ -446,6 +446,15 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __
- bhnamelen = hnamelen;
- }
- mi = rpmmiFree(mi);
-+
-+ if (bh == NULL && *keyp == '/' && rpmtag == RPMTAG_PROVIDENAME) {
-+ rpmtag = RPMTAG_FILEPATHS;
-+ continue;
-+ }
-+
-+ break;
-+ } while (1);
-+
- }
-
- /* Is there a suggested resolution? */
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
deleted file mode 100644
index 71dae4939a..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-Disable various items that do not cross compile well.
-
-Upstream-Status: Inappropriate [Configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmdb/Makefile.am
-===================================================================
---- rpm.orig/rpmdb/Makefile.am
-+++ rpm/rpmdb/Makefile.am
-@@ -34,10 +34,10 @@ EXTRA_DIST = \
- db3.c sqlite.c db_emu.h librpmdb.vers bdb.sql libsqldb.c \
- logio.awk logio.src logio_recover_template logio_template logio.c \
- logio_rec.c logio_auto.c logio_autop.c logio_auto.h \
-- qf.l qf.y qf.inp tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
-+ tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
-
--EXTRA_PROGRAMS = qfcalc qfgraph logio tjfn tqf # tbdb
--noinst_PROGRAMS = json
-+EXTRA_PROGRAMS = qfcalc qfgraph logio # tjfn tqf tbdb
-+noinst_PROGRAMS = # json
-
- RPMMISC_LDADD_COMMON = \
- $(top_builddir)/misc/librpmmisc.la \
-@@ -321,54 +321,39 @@ BUILT_SOURCES += .syntastic_c_config
- .syntastic_c_config: Makefile
- @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
-
--tjfn_SOURCES = tjfn.c
--tjfn_LDADD = $(mylibs)
--
--LEX = flex
--LFLAGS= -d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
--YACC = bison
--YFLAGS= -Dapi.pure -t -d -v --report=all
--
--BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
--Jgrammar.c: grammar.y
-- $(YACC) $(YFLAGS) -o $@ $<
--Jscanner.c: scanner.l
-- $(LEX) -R -o $@ $<
--json_SOURCES = Jgrammar.c Jscanner.c json.c
--
--testjson: json1.js json
-- ./json json1.js
--
--BUILT_SOURCES += Qgrammar.c Qgrammar.h Qscanner.c
--Qgrammar.c: qf.y
-- $(YACC) $(YFLAGS) -o $@ $<
--Qscanner.c: qf.l
-- $(LEX) -R -o $@ $<
--qfcalc_SOURCES = Qgrammar.c Qscanner.c interpreter.c
--qfgraph_SOURCES = Qgrammar.c Qscanner.c graph.c
--
--testqf: qfcalc qfgraph
-- ./qfcalc < qf.inp
-- ./qfgraph < qf.inp
--
--BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
--Tgrammar.c Tgrammar.h: tqf.y
-- $(YACC) $(YFLAGS) -o $@ $<
--Tscanner.c Tscanner.h: tqf.l
-- $(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
--tqf_SOURCES = Tgrammar.c Tscanner.c tgraph.c
--tqf_CFLAGS = $(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
--tqf_LDADD = ../lib/librpm.la \
-- ./librpmdb.la \
-- ../popt/libpopt.la
--
--testdir = $(abs_top_builddir)/tests
--foo: tqf
-- -../libtool --mode=execute \
-- ./tqf \
-- --dbpath=$(testdir) \
-- -r $(testdir)/fodder/*.rpm \
-- $(testdir)/fodder/fmtmod.qf
-+#tjfn_SOURCES = tjfn.c
-+#tjfn_LDADD = $(mylibs)
-+#
-+#LFLAGS= -d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
-+#
-+#BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
-+#Jgrammar.c Jgrammar.h: grammar.y
-+# $(YACC) $(YFLAGS) -t -d -v -o $@ $<
-+#Jscanner.c: scanner.l
-+# $(LEX) -R -o $@ $<
-+#json_SOURCES = Jgrammar.c Jscanner.c json.c
-+#
-+#testjson: json1.js json
-+# ./json json1.js
-+#
-+#BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
-+#Tgrammar.c Tgrammar.h: tqf.y
-+# $(YACC) $(YFLAGS) -t -d -v -o $@ $<
-+#Tscanner.c Tscanner.h: tqf.l
-+# $(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
-+#tqf_SOURCES = Tgrammar.c Tscanner.c tgraph.c
-+#tqf_CFLAGS = $(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
-+#tqf_LDADD = ../lib/librpm.la \
-+# ./librpmdb.la \
-+# ../popt/libpopt.la
-+
-+#testdir = $(abs_top_builddir)/tests
-+#foo: tqf
-+# -../libtool --mode=execute \
-+# ./tqf \
-+# --dbpath=$(testdir) \
-+# -r $(testdir)/fodder/*.rpm \
-+# $(testdir)/fodder/fmtmod.qf
-
- #tbdb_SOURCES = tbdb.c bdb.c
- #tbdb_LDADD = $(mylibs)
-Index: rpm/configure.ac
-===================================================================
---- rpm.orig/configure.ac
-+++ rpm/configure.ac
-@@ -119,6 +119,7 @@ AC_PROG_MAKE_SET
- AC_PROG_LIBTOOL
- AC_PROG_RANLIB
- AC_PROG_YACC
-+AM_PROG_LEX
-
- AC_PATH_PROG(AS, as, as)
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
deleted file mode 100644
index b9a2cbce25..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 26 Nov 2015 01:36:40 -0800
-Subject: [PATCH] lib/rpmfc.c: fix for N32 MIPS64
-
-It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows:
-$ file image/usr/bin/getent
-getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]
-
-And "rpm -qp --filecolor" was wrong (it was 1, but should be 4).
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- lib/rpmfc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/rpmfc.c b/lib/rpmfc.c
-index fde00c7..49779f8 100644
---- a/lib/rpmfc.c
-+++ b/lib/rpmfc.c
-@@ -575,7 +575,7 @@ static struct rpmfcTokens_s rpmfcTokens[] = {
- { " not stripped", RPMFC_NOTSTRIPPED },
- { " archive", RPMFC_ARCHIVE },
-
-- { "MIPS, N32 MIPS32", RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
-+ { "MIPS, N32 MIPS64", RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
- { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE },
- { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE },
-
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
deleted file mode 100644
index 93645766c2..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Fix a typo in the rpmio Makefile.am
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmio/Makefile.am
-===================================================================
---- rpm.orig/rpmio/Makefile.am
-+++ rpm/rpmio/Makefile.am
-@@ -121,7 +121,7 @@ luaLPATHdir = ${pkgsharedir)/lua
-
- pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
- pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
-- rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h
-+ rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h \
- rpmpgp.h rpmsw.h rpmutil.h
- noinst_HEADERS = \
- ar.h bcon.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
deleted file mode 100644
index 915d7efe6f..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-rpmpgp.h: We do not require the popt header in order to use rpmpgp functions
-
-This can cause failures if the internal libpopt is used, as it's header is
-not exported.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/rpmio/rpmpgp.h
-===================================================================
---- rpm-5.4.14.orig/rpmio/rpmpgp.h
-+++ rpm-5.4.14/rpmio/rpmpgp.h
-@@ -11,11 +11,11 @@
- */
-
- #include <string.h>
--#include <popt.h>
- #include <rpmiotypes.h>
- #include <yarn.h>
-
- #if defined(_RPMPGP_INTERNAL)
-+#include <popt.h>
- #include <rpmsw.h>
-
- /*@unchecked@*/
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
deleted file mode 100644
index b55fe22c6a..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-Enable a cross-install scriptlet helper.
-
-The helper is called from outside of the chroot with the arguments:
-
-<root> <prog> <script> <arg1> [<arg2> ... <argN>]
-
-The helper script is used by oe-core to facilitate shell script actions that
-can not be run from within a chroot on a foreign target system during a
-cross install.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/lib/psm.c
-===================================================================
---- rpm.orig/lib/psm.c
-+++ rpm/lib/psm.c
-@@ -846,6 +846,9 @@ static rpmRC runScript(rpmpsm psm, Heade
- pid_t pid;
- int xx;
- int i;
-+#ifdef RPM_VENDOR_OE
-+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+#endif
-
- #ifdef __clang__
- #pragma clang diagnostic push
-@@ -923,14 +926,29 @@ assert(he->p.str != NULL);
- (F_ISSET(psm, UNORDERED) ? "a" : ""));
-
- if (Phe->p.argv == NULL) {
-- argv = (const char **) alloca(5 * sizeof(*argv));
-- argv[0] = "/bin/sh";
-- argc = 1;
-+ argv = (const char **) alloca(7 * sizeof(*argv));
-+ argc = 0;
-+ } else {
-+ argv = (const char **) alloca((Phe->c + 6) * sizeof(*argv));
-+ argc = 0;
-+ }
-+
-+#ifdef RPM_VENDOR_OE
-+ if (scriptletWrapper && *scriptletWrapper) {
-+ argv[argc++] = scriptletWrapper;
-+ argv[argc] = rpmtsRootDir(ts);
-+ if (!argv[argc] || !*argv[argc])
-+ argv[argc] = "/";
-+ argc++;
-+ }
-+#endif
-+
-+ if (Phe->p.argv == NULL) {
-+ argv[argc++] = "/bin/sh";
- ldconfig_done = 0;
- } else {
-- argv = (const char **) alloca((Phe->c + 4) * sizeof(*argv));
-- memcpy(argv, Phe->p.argv, Phe->c * sizeof(*argv));
-- argc = Phe->c;
-+ memcpy((argv + argc), Phe->p.argv, Phe->c * sizeof(*argv));
-+ argc += Phe->c;
- ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path)
- ? 1 : 0);
- }
-@@ -981,7 +999,12 @@ assert(he->p.str != NULL);
- goto exit;
-
- if (rpmIsDebug() &&
-- (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash")))
-+ (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash"))
-+#ifdef RPM_VENDOR_OE
-+ || (scriptletWrapper && *scriptletWrapper && !strcmp(argv[1], "/bin/sh"))
-+ || (scriptletWrapper && *scriptletWrapper && !strcmp(argv[1], "/bin/bash"))
-+#endif
-+ )
- {
- static const char set_x[] = "set -x\n";
- nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
-@@ -1116,12 +1139,22 @@ assert(he->p.str != NULL);
-
- { const char * rootDir = rpmtsRootDir(ts);
- if (!rpmtsChrootDone(ts) && rootDir != NULL &&
-+#ifdef RPM_VENDOR_OE
-+ !(scriptletWrapper && *scriptletWrapper) &&
-+#endif
- !(rootDir[0] == '/' && rootDir[1] == '\0'))
- {
- /*@-modobserver@*/
- xx = Chroot(rootDir);
- /*@=modobserver@*/
- }
-+#ifdef RPM_VENDOR_OE
-+ if (!rpmtsChrootDone(ts) && rootDir != NULL &&
-+ (scriptletWrapper && *scriptletWrapper) &&
-+ !(rootDir[0] == '/' && rootDir[1] == '\0'))
-+ xx = Chdir(rootDir);
-+ else
-+#endif
- xx = Chdir("/");
- rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"),
- psm->stepName, sln, NVRA,
-@@ -3052,6 +3085,13 @@ assert(psm->te != NULL);
- case PSM_SCRIPT: /* Run current package scriptlets. */
- /* XXX running %verifyscript/%sanitycheck doesn't have psm->te */
- { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL);
-+
-+#ifdef RPM_VENDOR_OE
-+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+ if (scriptletWrapper && *scriptletWrapper)
-+ rc = rpmpsmNext(psm, PSM_CHROOT_OUT);
-+#endif
-+
- xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
- rc = runInstScript(psm);
- if (rc)
-@@ -3059,11 +3099,24 @@ assert(psm->te != NULL);
- else
- xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
- rpmtsGetRdb(ts)->db_txn = NULL;
-+#ifdef RPM_VENDOR_OE
-+ if (scriptletWrapper && *scriptletWrapper)
-+ rc = rpmpsmNext(psm, PSM_CHROOT_IN);
-+#endif
- } break;
- case PSM_TRIGGERS:
- /* Run triggers in other package(s) this package sets off. */
- if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST) break;
-+#ifdef RPM_VENDOR_OE
-+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+ if (scriptletWrapper && *scriptletWrapper)
-+ rc = rpmpsmNext(psm, PSM_CHROOT_OUT);
-+#endif
- rc = runTriggers(psm);
-+#ifdef RPM_VENDOR_OE
-+ if (scriptletWrapper && *scriptletWrapper)
-+ rc = rpmpsmNext(psm, PSM_CHROOT_IN);
-+#endif
- break;
- case PSM_IMMED_TRIGGERS:
- /* Run triggers in this package other package(s) set off. */
-@@ -3073,7 +3126,18 @@ assert(psm->te != NULL);
- F_SET(psm, GOTTRIGGERS);
- }
- if (psm->triggers != NULL)
-+#ifdef RPM_VENDOR_OE
-+ {
-+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+ if (scriptletWrapper && *scriptletWrapper)
-+ rc = rpmpsmNext(psm, PSM_CHROOT_OUT);
-+#endif
- rc = runImmedTriggers(psm);
-+#ifdef RPM_VENDOR_OE
-+ if (scriptletWrapper && *scriptletWrapper)
-+ rc = rpmpsmNext(psm, PSM_CHROOT_IN);
-+ }
-+#endif
- break;
-
- case PSM_RPMIO_FLAGS:
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch b/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch
deleted file mode 100644
index ec38b95f2e..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Workaround for a memory leak in --showrc.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -1228,11 +1228,15 @@ int rpmShowRC(FILE * fp)
- if (DNEVR != NULL)
- fprintf(fp, " %s\n", DNEVR+2);
- }
-+#if 0
- (void)rpmdsFree(ds);
- ds = NULL;
-+#endif
- fprintf(fp, "\n");
- }
-+#if 0
- PRCO = rpmdsFreePRCO(PRCO);
-+#endif
- }
-
- if (rpmIsVerbose()) {
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch b/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
deleted file mode 100644
index d6493c197e..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
+++ /dev/null
@@ -1,1081 +0,0 @@
-Fix the syck/lib/gram.y
-
-This resolves a problem during compilation:
-
-../../../rpm/syck/lib/gram.y:66:27: error: 'parser' undeclared (first use in this function)
- ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, $1 );
- ^
-../../../rpm/syck/lib/gram.y:66:27: note: each undeclared identifier is reported only once for each function it appears in
-../../../rpm/syck/lib/syck.c: In function 'syck_parse':
-../../../rpm/syck/lib/syck.c:516:5: warning: implicit declaration of function 'syckparse' [-Wimplicit-function-declaration]
- syckparse( p );
- ^
-
-This patch was generated by reverting the grammer back to a previous
-version.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/syck/lib/gram.y
-===================================================================
---- rpm.orig/syck/lib/gram.y
-+++ rpm/syck/lib/gram.y
-@@ -9,18 +9,10 @@
-
- %start doc
- %pure-parser
--%parse-param {void* parser}
--%lex-param {void* parser}
-
-
- %{
-
--#define YYDEBUG 1
--#define YYERROR_VERBOSE 1
--#ifndef YYSTACK_USE_ALLOCA
--#define YYSTACK_USE_ALLOCA 0
--#endif
--
- #include "system.h"
- #include "syck.h"
- #include "debug.h"
-@@ -28,6 +20,9 @@
- void apply_seq_in_map( SyckParser *parser, SyckNode *n )
- /*@*/;
-
-+#define YYPARSE_PARAM parser
-+#define YYLEX_PARAM parser
-+
- #define NULL_NODE(parser, node) \
- SyckNode *node = syck_new_str( "", scalar_plain ); \
- if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
-Index: rpm/syck/lib/Makefile.am
-===================================================================
---- rpm.orig/syck/lib/Makefile.am
-+++ rpm/syck/lib/Makefile.am
-@@ -49,25 +49,25 @@ SYCK_SPLINT_SRCS = \
- token.c \
- implicit.c
-
--#gram.c: gram.y
--# $(YACC) -d -t -v -p syck -o $@ $<
--# -@if test -f gram.c; then \
--# { echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
--# echo "/*@-noeffect -noeffectuncon @*/";\
--# echo "/*@-nullassign @*/";\
--# echo "/*@-readonlytrans @*/";\
--# echo "/*@-uniondef @*/";\
--# echo "/*@-warnlintcomments @*/";\
--# cat gram.c;\
--# echo "/*@=warnlintcomments @*/";\
--# echo "/*@=uniondef @*/";\
--# echo "/*@=readonlytrans @*/";\
--# echo "/*@=nullassign @*/";\
--# echo "/*@=noeffect =noeffectuncon @*/";\
--# echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
--# } > _gram.c ;\
--# mv -f _gram.c gram.c; \
--# fi
-+gram.c: gram.y
-+ $(YACC) -d -t -v -p syck -o $@ $<
-+ -@if test -f gram.c; then \
-+ { echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
-+ echo "/*@-noeffect -noeffectuncon @*/";\
-+ echo "/*@-nullassign @*/";\
-+ echo "/*@-readonlytrans @*/";\
-+ echo "/*@-uniondef @*/";\
-+ echo "/*@-warnlintcomments @*/";\
-+ cat gram.c;\
-+ echo "/*@=warnlintcomments @*/";\
-+ echo "/*@=uniondef @*/";\
-+ echo "/*@=readonlytrans @*/";\
-+ echo "/*@=nullassign @*/";\
-+ echo "/*@=noeffect =noeffectuncon @*/";\
-+ echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
-+ } > _gram.c ;\
-+ mv -f _gram.c gram.c; \
-+ fi
-
- BUILT_SOURCES = gram.c gram.h
-
-Index: rpm/syck/lib/implicit.c
-===================================================================
---- rpm.orig/syck/lib/implicit.c
-+++ rpm/syck/lib/implicit.c
-@@ -19,11 +19,6 @@
- #define YYLIMIT limit
- #define YYFILL(n)
-
--#ifdef __clang__
--#pragma clang diagnostic push
--#pragma clang diagnostic ignored "-Wempty-body"
--#endif
--
- void
- try_tag_implicit( SyckNode *n, int taguri )
- {
-@@ -3000,8 +2995,4 @@ yy270: ++YYCURSOR;
-
- }
-
--#ifdef __clang__
--#pragma clang diagnostic pop
--#endif
--
- /*@=noret@*/
-Index: rpm/syck/lib/syck.c
-===================================================================
---- rpm.orig/syck/lib/syck.c
-+++ rpm/syck/lib/syck.c
-@@ -519,7 +519,7 @@ syck_parse( SyckParser *p )
- }
-
- void
--syck_default_error_handler( SyckParser *p, const char *msg )
-+syck_default_error_handler( SyckParser *p, char *msg )
- {
- printf( "Error at [Line %d, Col %ld]: %s\n",
- p->linect,
-Index: rpm/syck/lib/syck.h
-===================================================================
---- rpm.orig/syck/lib/syck.h
-+++ rpm/syck/lib/syck.h
-@@ -175,7 +175,7 @@ typedef struct _syck_str SyckIoStr;
- typedef struct _syck_level SyckLevel;
-
- typedef SYMID (*SyckNodeHandler)(SyckParser *p, SyckNode *n);
--typedef void (*SyckErrorHandler)(SyckParser *p, const char *);
-+typedef void (*SyckErrorHandler)(SyckParser *p, char *);
- typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *p, char *);
- typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long);
- typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);
-@@ -546,7 +546,7 @@ long syck_parser_readlen( SyckParser *p,
- SYMID syck_parse( SyckParser *p )
- /*@globals fileSystem @*/
- /*@modifies p, fileSystem @*/;
--void syck_default_error_handler( SyckParser *p, const char * )
-+void syck_default_error_handler( SyckParser *p, char * )
- /*@globals fileSystem @*/
- /*@modifies p, fileSystem @*/;
- SYMID syck_yaml2byte_handler( SyckParser *p, SyckNode *n )
-@@ -619,7 +619,7 @@ long syck_seq_count( SyckNode *seq )
- /*
- * Lexer prototypes
- */
--void syckerror( void *, const char *msg )
-+void syckerror( char *msg )
- /*@*/;
- /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */
- int sycklex( void *_sycklval, SyckParser *parser )
-Index: rpm/syck/lib/token.c
-===================================================================
---- rpm.orig/syck/lib/token.c
-+++ rpm/syck/lib/token.c
-@@ -270,11 +270,11 @@ sycklex( void * _sycklval, SyckParser *p
- return sycklex_yaml_utf8( sycklval, parser );
-
- case syck_yaml_utf16:
-- syckerror( parser, "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
-+ syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
- break;
-
- case syck_yaml_utf32:
-- syckerror( parser, "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
-+ syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
- break;
-
- case syck_bytecode_utf8:
-@@ -2739,15 +2739,14 @@ syckwrap(void)
- }
-
- void
--syckerror( void *p, const char *msg )
-+syckerror( char *msg )
- {
-- SyckParser * parser = (SyckParser *)p;
- /*@-mods@*/
-- if ( parser->error_handler == NULL )
-- parser->error_handler = syck_default_error_handler;
-+ if ( syck_parser_ptr->error_handler == NULL )
-+ syck_parser_ptr->error_handler = syck_default_error_handler;
-
-- parser->root = parser->root_on_error;
-+ syck_parser_ptr->root = syck_parser_ptr->root_on_error;
- /*@=mods@*/
-- (parser->error_handler)(parser, msg);
-+ (syck_parser_ptr->error_handler)(syck_parser_ptr, msg);
- }
-
-Index: rpm/syck/lib/bytecode.c
-===================================================================
---- rpm.orig/syck/lib/bytecode.c
-+++ rpm/syck/lib/bytecode.c
-@@ -1,10 +1,10 @@
--/* Generated by re2c 0.9.12 on Tue Mar 14 00:14:53 2006 */
-+/* Generated by re2c 0.13.5 on Tue Feb 23 12:04:00 2016 */
- #line 1 "bytecode.re"
- /*
- * bytecode.re
- *
- * $Author: why $
-- * $Date: 2005-09-20 08:21:06 +0300 (Tue, 20 Sep 2005) $
-+ * $Date: 2005/09/20 05:21:06 $
- *
- * Copyright (C) 2003 why the lucky stiff
- */
-@@ -27,14 +27,11 @@
- #define YYLINEPTR parser->lineptr
- #define YYLINECTPTR parser->linectptr
- #define YYLINE parser->linect
--#define YYFILL(n) (void) syck_parser_read(parser)
-+#define YYFILL(n) syck_parser_read(parser)
-
--/*@unchecked@*/ /*@null@*/
- extern SyckParser *syck_parser_ptr;
-
--/*@null@*/
--char *get_inline( SyckParser *parser )
-- /*@modifies parser @*/;
-+char *get_inline( SyckParser *parser );
-
- /*
- * Repositions the cursor at `n' offset from the token start.
-@@ -137,14 +134,12 @@ char *get_inline( SyckParser *parser )
- */
- int
- sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
-- /*@globals syck_parser_ptr @*/
-- /*@modifies sycklval, parser, syck_parser_ptr @*/
- {
- SyckLevel *lvl;
- syck_parser_ptr = parser;
- if ( YYCURSOR == NULL )
- {
-- (void) syck_parser_read( parser );
-+ syck_parser_read( parser );
- }
-
- if ( parser->force_token != 0 )
-@@ -171,42 +166,37 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval
- #line 165 "<stdout>"
- {
- YYCTYPE yych;
-- unsigned int yyaccept = 0;
-- goto yy0;
-- /*@notreached@*/
-- ++YYCURSOR;
--yy0:
-- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
-+
-+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
-- switch(yych){
-+ switch (yych) {
- case 0x00: goto yy2;
- case 'D': goto yy3;
- default: goto yy5;
- }
--yy2: YYCURSOR = YYMARKER;
-- switch(yyaccept){
-- case 0: goto yy4;
-- }
--yy3: yyaccept = 0;
-+yy2:
-+ YYCURSOR = YYMARKER;
-+ goto yy4;
-+yy3:
- yych = *(YYMARKER = ++YYCURSOR);
-- switch(yych){
-- case 0x0A: goto yy6;
-- case 0x0D: goto yy8;
-+ switch (yych) {
-+ case '\n': goto yy6;
-+ case '\r': goto yy8;
- default: goto yy4;
- }
- yy4:
- #line 199 "bytecode.re"
--{ YYPOS(0);
-+ { YYPOS(0);
- goto Document;
- }
--#line 195 "<stdout>"
--yy5: yych = *++YYCURSOR;
-+#line 191 "<stdout>"
-+yy5:
-+ yych = *++YYCURSOR;
- goto yy4;
--yy6: ++YYCURSOR;
-- goto yy7;
--yy7:
-+yy6:
-+ ++YYCURSOR;
- #line 186 "bytecode.re"
--{ if ( lvl->status == syck_lvl_header )
-+ { if ( lvl->status == syck_lvl_header )
- {
- CHK_NL(YYCURSOR);
- goto Directive;
-@@ -218,10 +208,11 @@ yy7:
- return 0;
- }
- }
--#line 214 "<stdout>"
--yy8: ++YYCURSOR;
-- switch((yych = *YYCURSOR)) {
-- case 0x0A: goto yy6;
-+#line 210 "<stdout>"
-+yy8:
-+ ++YYCURSOR;
-+ switch ((yych = *YYCURSOR)) {
-+ case '\n': goto yy6;
- default: goto yy2;
- }
- }
-@@ -239,19 +230,15 @@ Document:
- YYTOKEN = YYCURSOR;
-
-
--#line 235 "<stdout>"
-+#line 232 "<stdout>"
- {
- YYCTYPE yych;
-- goto yy9;
-- /*@notreached@*/
-- ++YYCURSOR;
--yy9:
-- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
-+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
-- switch(yych){
-+ switch (yych) {
- case 0x00: goto yy30;
-- case 0x0A: goto yy27;
-- case 0x0D: goto yy29;
-+ case '\n': goto yy27;
-+ case '\r': goto yy29;
- case 'A': goto yy19;
- case 'D': goto yy12;
- case 'E': goto yy16;
-@@ -264,71 +251,73 @@ yy9:
- case 'c': goto yy25;
- default: goto yy11;
- }
--yy11:yy12: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy41;
-- case 0x0D: goto yy44;
-+yy11:
-+yy12:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy41;
-+ case '\r': goto yy44;
- default: goto yy11;
- }
--yy13: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy41;
-- case 0x0D: goto yy43;
-+yy13:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy41;
-+ case '\r': goto yy43;
- default: goto yy11;
- }
--yy14: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy38;
-- case 0x0D: goto yy40;
-+yy14:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy38;
-+ case '\r': goto yy40;
- default: goto yy11;
- }
--yy15: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy35;
-- case 0x0D: goto yy37;
-+yy15:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy35;
-+ case '\r': goto yy37;
- default: goto yy11;
- }
--yy16: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy32;
-- case 0x0D: goto yy34;
-+yy16:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy32;
-+ case '\r': goto yy34;
- default: goto yy11;
- }
--yy17: ++YYCURSOR;
-- goto yy18;
--yy18:
-+yy17:
-+ ++YYCURSOR;
- #line 288 "bytecode.re"
--{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
-+ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
- goto Scalar;
- }
--#line 296 "<stdout>"
--yy19: ++YYCURSOR;
-- goto yy20;
--yy20:
-+#line 295 "<stdout>"
-+yy19:
-+ ++YYCURSOR;
- #line 292 "bytecode.re"
--{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
-+ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
- sycklval->name = get_inline( parser );
- syck_hdlr_remove_anchor( parser, sycklval->name );
- CHK_NL(YYCURSOR);
- return YAML_ANCHOR;
- }
--#line 307 "<stdout>"
--yy21: ++YYCURSOR;
-- goto yy22;
--yy22:
-+#line 305 "<stdout>"
-+yy21:
-+ ++YYCURSOR;
- #line 299 "bytecode.re"
--{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
-+ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
- sycklval->name = get_inline( parser );
- POP_LEVEL();
- if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
- return YAML_ALIAS;
- }
--#line 318 "<stdout>"
--yy23: ++YYCURSOR;
-- goto yy24;
--yy24:
-+#line 315 "<stdout>"
-+yy23:
-+ ++YYCURSOR;
- #line 306 "bytecode.re"
--{ char *qstr;
-+ { char *qstr;
- ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
- qstr = get_inline( parser );
- CHK_NL(YYCURSOR);
-@@ -387,18 +376,16 @@ yy24:
- sycklval->name = qstr;
- return YAML_TAGURI;
- }
--#line 382 "<stdout>"
--yy25: ++YYCURSOR;
-- goto yy26;
--yy26:
-+#line 378 "<stdout>"
-+yy25:
-+ ++YYCURSOR;
- #line 366 "bytecode.re"
--{ goto Comment; }
--#line 388 "<stdout>"
--yy27: ++YYCURSOR;
-- goto yy28;
--yy28:
-+ { goto Comment; }
-+#line 383 "<stdout>"
-+yy27:
-+ ++YYCURSOR;
- #line 368 "bytecode.re"
--{ CHK_NL(YYCURSOR);
-+ { CHK_NL(YYCURSOR);
- if ( lvl->status == syck_lvl_seq )
- {
- return YAML_INDENT;
-@@ -410,26 +397,25 @@ yy28:
- }
- goto Document;
- }
--#line 405 "<stdout>"
--yy29: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy27;
-+#line 399 "<stdout>"
-+yy29:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy27;
- default: goto yy11;
- }
--yy30: ++YYCURSOR;
-- goto yy31;
--yy31:
-+yy30:
-+ ++YYCURSOR;
- #line 381 "bytecode.re"
--{ ENSURE_YAML_IEND(lvl, -1);
-+ { ENSURE_YAML_IEND(lvl, -1);
- YYPOS(0);
- return 0;
- }
--#line 419 "<stdout>"
--yy32: ++YYCURSOR;
-- goto yy33;
--yy33:
-+#line 413 "<stdout>"
-+yy32:
-+ ++YYCURSOR;
- #line 252 "bytecode.re"
--{ if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
-+ { if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
- {
- lvl->ncount++;
- YYPOS(0);
-@@ -464,17 +450,17 @@ yy33:
- CHK_NL(YYCURSOR);
- return YAML_IEND;
- }
--#line 459 "<stdout>"
--yy34: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy32;
-+#line 452 "<stdout>"
-+yy34:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy32;
- default: goto yy11;
- }
--yy35: ++YYCURSOR;
-- goto yy36;
--yy36:
-+yy35:
-+ ++YYCURSOR;
- #line 237 "bytecode.re"
--{ int complex = 0;
-+ { int complex = 0;
- if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
- {
- complex = 1;
-@@ -488,17 +474,17 @@ yy36:
- }
- return YAML_IOPEN;
- }
--#line 483 "<stdout>"
--yy37: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy35;
-+#line 476 "<stdout>"
-+yy37:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy35;
- default: goto yy11;
- }
--yy38: ++YYCURSOR;
-- goto yy39;
--yy39:
-+yy38:
-+ ++YYCURSOR;
- #line 222 "bytecode.re"
--{ int complex = 0;
-+ { int complex = 0;
- if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
- {
- complex = 1;
-@@ -512,29 +498,31 @@ yy39:
- }
- return YAML_IOPEN;
- }
--#line 507 "<stdout>"
--yy40: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy38;
-+#line 500 "<stdout>"
-+yy40:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy38;
- default: goto yy11;
- }
--yy41: ++YYCURSOR;
-- goto yy42;
--yy42:
-+yy41:
-+ ++YYCURSOR;
- #line 217 "bytecode.re"
--{ ENSURE_YAML_IEND(lvl, -1);
-+ { ENSURE_YAML_IEND(lvl, -1);
- YYPOS(0);
- return 0;
- }
--#line 521 "<stdout>"
--yy43: yych = *++YYCURSOR;
-- switch(yych){
-- case 0x0A: goto yy41;
-+#line 514 "<stdout>"
-+yy43:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
-+ case '\n': goto yy41;
- default: goto yy11;
- }
--yy44: ++YYCURSOR;
-- switch((yych = *YYCURSOR)) {
-- case 0x0A: goto yy41;
-+yy44:
-+ ++YYCURSOR;
-+ switch ((yych = *YYCURSOR)) {
-+ case '\n': goto yy41;
- default: goto yy11;
- }
- }
-@@ -548,28 +536,22 @@ Directive:
- YYTOKEN = YYCURSOR;
-
-
--#line 543 "<stdout>"
-+#line 538 "<stdout>"
- {
- YYCTYPE yych;
-- unsigned int yyaccept = 0;
-- goto yy45;
-- /*@notreached@*/
-- ++YYCURSOR;
--yy45:
-- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
-- switch(yych){
-+ switch (yych) {
- case 0x00: goto yy47;
- case 'V': goto yy48;
- default: goto yy50;
- }
--yy47: YYCURSOR = YYMARKER;
-- switch(yyaccept){
-- case 0: goto yy49;
-- }
--yy48: yyaccept = 0;
-+yy47:
-+ YYCURSOR = YYMARKER;
-+ goto yy49;
-+yy48:
- yych = *(YYMARKER = ++YYCURSOR);
-- switch(yych){
-+ switch (yych) {
- case '.':
- case '/':
- case '0':
-@@ -619,7 +601,8 @@ yy48: yyaccept = 0;
- case '\\':
- case ']':
- case '^':
-- case '_': case 'a':
-+ case '_':
-+ case 'a':
- case 'b':
- case 'c':
- case 'd':
-@@ -649,17 +632,18 @@ yy48: yyaccept = 0;
- }
- yy49:
- #line 399 "bytecode.re"
--{ YYCURSOR = YYTOKEN;
-+ { YYCURSOR = YYTOKEN;
- return YAML_DOCSEP;
- }
--#line 646 "<stdout>"
--yy50: yych = *++YYCURSOR;
-+#line 637 "<stdout>"
-+yy50:
-+ yych = *++YYCURSOR;
- goto yy49;
--yy51: ++YYCURSOR;
-- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+yy51:
-+ ++YYCURSOR;
-+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
-- goto yy52;
--yy52: switch(yych){
-+ switch (yych) {
- case '.':
- case '/':
- case '0':
-@@ -671,7 +655,8 @@ yy52: switch(yych){
- case '6':
- case '7':
- case '8':
-- case '9': case ';':
-+ case '9':
-+ case ';':
- case '<':
- case '=':
- case '>':
-@@ -707,7 +692,8 @@ yy52: switch(yych){
- case '\\':
- case ']':
- case '^':
-- case '_': case 'a':
-+ case '_':
-+ case 'a':
- case 'b':
- case 'c':
- case 'd':
-@@ -736,8 +722,9 @@ yy52: switch(yych){
- case ':': goto yy53;
- default: goto yy47;
- }
--yy53: yych = *++YYCURSOR;
-- switch(yych){
-+yy53:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
- case '.':
- case '/':
- case '0':
-@@ -787,7 +774,8 @@ yy53: yych = *++YYCURSOR;
- case '\\':
- case ']':
- case '^':
-- case '_': case 'a':
-+ case '_':
-+ case 'a':
- case 'b':
- case 'c':
- case 'd':
-@@ -815,13 +803,13 @@ yy53: yych = *++YYCURSOR;
- case 'z': goto yy54;
- default: goto yy47;
- }
--yy54: ++YYCURSOR;
-- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+yy54:
-+ ++YYCURSOR;
-+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
-- goto yy55;
--yy55: switch(yych){
-- case 0x0A: goto yy56;
-- case 0x0D: goto yy58;
-+ switch (yych) {
-+ case '\n': goto yy56;
-+ case '\r': goto yy58;
- case '.':
- case '/':
- case '0':
-@@ -871,7 +859,8 @@ yy55: switch(yych){
- case '\\':
- case ']':
- case '^':
-- case '_': case 'a':
-+ case '_':
-+ case 'a':
- case 'b':
- case 'c':
- case 'd':
-@@ -899,16 +888,16 @@ yy55: switch(yych){
- case 'z': goto yy54;
- default: goto yy47;
- }
--yy56: ++YYCURSOR;
-- goto yy57;
--yy57:
-+yy56:
-+ ++YYCURSOR;
- #line 396 "bytecode.re"
--{ CHK_NL(YYCURSOR);
-+ { CHK_NL(YYCURSOR);
- goto Directive; }
--#line 899 "<stdout>"
--yy58: ++YYCURSOR;
-- switch((yych = *YYCURSOR)) {
-- case 0x0A: goto yy56;
-+#line 895 "<stdout>"
-+yy58:
-+ ++YYCURSOR;
-+ switch ((yych = *YYCURSOR)) {
-+ case '\n': goto yy56;
- default: goto yy47;
- }
- }
-@@ -922,40 +911,40 @@ Comment:
- YYTOKEN = YYCURSOR;
-
-
--#line 916 "<stdout>"
-+#line 913 "<stdout>"
- {
- YYCTYPE yych;
-- goto yy59;
-- /*@notreached@*/
-- ++YYCURSOR;
--yy59:
-- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
-- switch(yych){
-+ switch (yych) {
- case 0x00: goto yy61;
-- case 0x0A: goto yy62;
-- case 0x0D: goto yy64;
-+ case '\n': goto yy62;
-+ case '\r': goto yy64;
- default: goto yy66;
- }
--yy61:yy62: ++YYCURSOR;
-- goto yy63;
-+yy61:
-+yy62:
-+ ++YYCURSOR;
- yy63:
- #line 412 "bytecode.re"
--{ CHK_NL(YYCURSOR);
-+ { CHK_NL(YYCURSOR);
- goto Document; }
--#line 936 "<stdout>"
--yy64: ++YYCURSOR;
-- switch((yych = *YYCURSOR)) {
-- case 0x0A: goto yy67;
-+#line 931 "<stdout>"
-+yy64:
-+ ++YYCURSOR;
-+ switch ((yych = *YYCURSOR)) {
-+ case '\n': goto yy67;
- default: goto yy65;
- }
- yy65:
- #line 415 "bytecode.re"
--{ goto Comment; }
--#line 945 "<stdout>"
--yy66: yych = *++YYCURSOR;
-+ { goto Comment; }
-+#line 941 "<stdout>"
-+yy66:
-+ yych = *++YYCURSOR;
- goto yy65;
--yy67: ++YYCURSOR;
-+yy67:
-+ ++YYCURSOR;
- yych = *YYCURSOR;
- goto yy63;
- }
-@@ -977,23 +966,20 @@ Scalar2:
- tok = YYCURSOR;
-
-
--#line 970 "<stdout>"
-+#line 968 "<stdout>"
- {
- YYCTYPE yych;
-- goto yy68;
-- /*@notreached@*/
-- ++YYCURSOR;
--yy68:
-- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
-+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
-- switch(yych){
-+ switch (yych) {
- case 0x00: goto yy74;
-- case 0x0A: goto yy70;
-- case 0x0D: goto yy72;
-+ case '\n': goto yy70;
-+ case '\r': goto yy72;
- default: goto yy76;
- }
--yy70: ++YYCURSOR;
-- switch((yych = *YYCURSOR)) {
-+yy70:
-+ ++YYCURSOR;
-+ switch ((yych = *YYCURSOR)) {
- case 'C': goto yy78;
- case 'N': goto yy80;
- case 'Z': goto yy83;
-@@ -1001,50 +987,51 @@ yy70: ++YYCURSOR;
- }
- yy71:
- #line 461 "bytecode.re"
--{ YYCURSOR = tok;
-+ { YYCURSOR = tok;
- goto ScalarEnd;
- }
--#line 996 "<stdout>"
--yy72: ++YYCURSOR;
-- switch((yych = *YYCURSOR)) {
-- case 0x0A: goto yy77;
-+#line 992 "<stdout>"
-+yy72:
-+ ++YYCURSOR;
-+ switch ((yych = *YYCURSOR)) {
-+ case '\n': goto yy77;
- default: goto yy73;
- }
- yy73:
- #line 469 "bytecode.re"
--{ CAT(str, cap, idx, tok[0]);
-+ { CAT(str, cap, idx, tok[0]);
- goto Scalar2;
- }
--#line 1007 "<stdout>"
--yy74: ++YYCURSOR;
-- goto yy75;
--yy75:
-+#line 1004 "<stdout>"
-+yy74:
-+ ++YYCURSOR;
- #line 465 "bytecode.re"
--{ YYCURSOR = tok;
-+ { YYCURSOR = tok;
- goto ScalarEnd;
- }
--#line 1015 "<stdout>"
--yy76: yych = *++YYCURSOR;
-+#line 1011 "<stdout>"
-+yy76:
-+ yych = *++YYCURSOR;
- goto yy73;
--yy77: yych = *++YYCURSOR;
-- switch(yych){
-+yy77:
-+ yych = *++YYCURSOR;
-+ switch (yych) {
- case 'C': goto yy78;
- case 'N': goto yy80;
- case 'Z': goto yy83;
- default: goto yy71;
- }
--yy78: ++YYCURSOR;
-- goto yy79;
--yy79:
-+yy78:
-+ ++YYCURSOR;
- #line 435 "bytecode.re"
--{ CHK_NL(tok+1);
-+ { CHK_NL(tok+1);
- goto Scalar2; }
--#line 1031 "<stdout>"
--yy80: ++YYCURSOR;
-- if(YYLIMIT == YYCURSOR) YYFILL(1);
-+#line 1028 "<stdout>"
-+yy80:
-+ ++YYCURSOR;
-+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-- goto yy81;
--yy81: switch(yych){
-+ switch (yych) {
- case '0':
- case '1':
- case '2':
-@@ -1059,7 +1046,7 @@ yy81: switch(yych){
- }
- yy82:
- #line 438 "bytecode.re"
--{ CHK_NL(tok+1);
-+ { CHK_NL(tok+1);
- if ( tok + 2 < YYCURSOR )
- {
- char *count = tok + 2;
-@@ -1076,16 +1063,15 @@ yy82:
- }
- goto Scalar2;
- }
--#line 1068 "<stdout>"
--yy83: ++YYCURSOR;
-- goto yy84;
--yy84:
-+#line 1065 "<stdout>"
-+yy83:
-+ ++YYCURSOR;
- #line 456 "bytecode.re"
--{ CHK_NL(tok+1);
-+ { CHK_NL(tok+1);
- CAT(str, cap, idx, '\0');
- goto Scalar2;
- }
--#line 1077 "<stdout>"
-+#line 1073 "<stdout>"
- }
- #line 473 "bytecode.re"
-
-@@ -1122,50 +1108,48 @@ Inline:
- tok = YYCURSOR;
-
-
--#line 1114 "<stdout>"
-+#line 1110 "<stdout>"
- {
- YYCTYPE yych;
-- goto yy85;
-- /*@notreached@*/
-- ++YYCURSOR;
--yy85:
-- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
-- switch(yych){
-+ switch (yych) {
- case 0x00: goto yy91;
-- case 0x0A: goto yy87;
-- case 0x0D: goto yy89;
-+ case '\n': goto yy87;
-+ case '\r': goto yy89;
- default: goto yy93;
- }
--yy87: ++YYCURSOR;
-- goto yy88;
-+yy87:
-+ ++YYCURSOR;
- yy88:
- #line 508 "bytecode.re"
--{ CHK_NL(YYCURSOR);
-+ { CHK_NL(YYCURSOR);
- return str; }
--#line 1134 "<stdout>"
--yy89: ++YYCURSOR;
-- switch((yych = *YYCURSOR)) {
-- case 0x0A: goto yy94;
-+#line 1127 "<stdout>"
-+yy89:
-+ ++YYCURSOR;
-+ switch ((yych = *YYCURSOR)) {
-+ case '\n': goto yy94;
- default: goto yy90;
- }
- yy90:
- #line 515 "bytecode.re"
--{ CAT(str, cap, idx, tok[0]);
-+ { CAT(str, cap, idx, tok[0]);
- goto Inline;
- }
--#line 1145 "<stdout>"
--yy91: ++YYCURSOR;
-- goto yy92;
--yy92:
-+#line 1139 "<stdout>"
-+yy91:
-+ ++YYCURSOR;
- #line 511 "bytecode.re"
--{ YYCURSOR = tok;
-+ { YYCURSOR = tok;
- return str;
- }
--#line 1153 "<stdout>"
--yy93: yych = *++YYCURSOR;
-+#line 1146 "<stdout>"
-+yy93:
-+ yych = *++YYCURSOR;
- goto yy90;
--yy94: ++YYCURSOR;
-+yy94:
-+ ++YYCURSOR;
- yych = *YYCURSOR;
- goto yy88;
- }
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
deleted file mode 100644
index 5fb40b6fef..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-fix a endian incompatible error in generating rpm tag
-
-A flaw was found in the way rpm generating arbitrary tags, which leads to a
-incorrect query result, this issue is introduced by a incompatible endianess
-when the generating process is executed on different architectures.
-
-This patch resolves it by taking the byte order that host uses.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
----
- tagname.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-Index: rpm-5.4.14/rpmdb/tagname.c
-===================================================================
---- rpm-5.4.14.orig/rpmdb/tagname.c
-+++ rpm-5.4.14/rpmdb/tagname.c
-@@ -3,6 +3,19 @@
- */
-
- #include "system.h"
-+#include <endian.h>
-+
-+/* Don't redefine this macro if it already exists */
-+#ifndef le32toh
-+#ifdef __USE_BSD
-+#include <byteswap.h>
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+#define le32toh(x) (x)
-+#else
-+#define le32toh(x) __bswap_32(x)
-+#endif
-+#endif /* __USE_BSD */
-+#endif /* le32toh */
-
- #include <rpmio_internal.h> /* XXX DIGEST_CTX, xtolower, xstrcasecmp */
- #include <rpmmacro.h>
-@@ -152,7 +165,10 @@ static rpmTag _tagGenerate(const char *s
- xx = rpmDigestUpdate(ctx, s, nb);
- xx = rpmDigestFinal(ctx, &digest, &digestlen, 0);
- if (digest && digestlen > 4) {
-+ /* The tag is stored in a uniform byte order for cross-endian compatibility.
-+ Swap to the host uses. */
- memcpy(&tag, digest + (digestlen - 4), 4);
-+ tag = le32toh(tag);
- tag = (rpmTag) (tag & 0x3fffffff);
- tag = (rpmTag) (tag | 0x40000000);
- }
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch b/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
deleted file mode 100644
index 9eb675ba29..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-rpmdb/tagname.c: Add the 0x54aafb71 (filenames) type to rpmTagGetType
-
-There is already a workaround in the _tagName function to show that the
-special 'filenames' item is value. This adds a similar patch to the
-_tagType to return the proper type, otherwise it comes back as a simple
-RPM_STRING_ARRAY_TYPE which limits the response to the first element.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/rpmdb/tagname.c
-===================================================================
---- rpm-5.4.15.orig/rpmdb/tagname.c
-+++ rpm-5.4.15/rpmdb/tagname.c
-@@ -353,6 +353,9 @@ static unsigned int _tagType(rpmTag tag)
- case RPMDBI_RECNO:
- case RPMDBI_HEAP:
- break;
-+ /* XXX make sure that h.['filenames'] in python "works". */
-+ case 0x54aafb71:
-+ return (RPM_STRING_ARRAY_TYPE + RPM_ARRAY_RETURN_TYPE);
- default:
- if (_rpmTags.byValue == NULL)
- break;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch b/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
deleted file mode 100644
index 72d3509291..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Source: None
-Upstream-Status: Submitted [RPM5 maintainer]
-Author: Khem Raj <raj.khem@gmail.com>
-Date: 2011-03-03
-Description:
-This patch fixes build issue found when compiling rpm-native on ubuntu
-11.04-alpha. Problem is that linker does not get correct set of dependent
-libraries when linking mtree binary which results in undefined symbols
-in librpmio.so. This patch adds correct flags to mtree_LDADD to account
-for rpmio deps
-
-Index: rpm-5.4.14/tools/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/tools/Makefile.am
-+++ rpm-5.4.14/tools/Makefile.am
-@@ -186,7 +186,7 @@ grep_LDADD = $(RPMIO_LDADD_COMMON)
-
- mtree_SOURCES = rpmmtree.c
- mtree_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
--mtree_LDADD = $(RPM_LDADD_COMMON)
-+mtree_LDADD = $(RPMIO_LDADD_COMMON)
-
- rpmrepo_SOURCES = rpmrepo.c
- rpmrepo_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/scripts -I$(top_builddir)/scripts $(CPPFLAGS)
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch b/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch
deleted file mode 100644
index 713f84ee27..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-A patch to fix a problem when compiling with uuid.
-
-When attempting to build with uuid and all tests compiling will error because
-uuid.h doesn't exist in the rpm tarball. Fix this by changing the include to
-use the one in ossp which solves the issue.
-
-The recipe already depends on ossp so ossp/uuid.h will be there when rpm-native
-is built.
-
-Upstream-Status: Pending
-
-Signed-off-by: Morgan Little <morgan.little@windriver.com>
-
-
-Index: rpm-5.4.14/lua/local/luuid.c
-===================================================================
---- rpm-5.4.14.orig/lua/local/luuid.c
-+++ rpm-5.4.14/lua/local/luuid.c
-@@ -21,7 +21,7 @@
-
- #ifdef LUA_USE_UUID
-
--#include "uuid.h"
-+#include <ossp/uuid.h>
-
- /* Lua method: <uuid> = uuid.generate(<version>[, <uuid-namespace>, <data>]) */
- static int luuid_generate(lua_State *L)
-Index: rpm-5.4.14/rpmio/rpmuuid.c
-===================================================================
---- rpm-5.4.14.orig/rpmio/rpmuuid.c
-+++ rpm-5.4.14/rpmio/rpmuuid.c
-@@ -16,7 +16,7 @@
- #include "rpmlog.h"
- #include "rpmuuid.h"
- #ifdef WITH_UUID
--#include "uuid.h"
-+#include <ossp/uuid.h>
- #endif
- #include "debug.h"
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm2cpio b/meta/recipes-devtools/rpm/rpm/rpm2cpio
deleted file mode 100755
index 6bcef6a4ce..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm2cpio
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# Prevent gawk >= 4.0.x from getting funny ideas wrt UTF in printf()
-LANG=C
-
-pkg=$1
-if [ "$pkg" = "" -o ! -e "$pkg" ]; then
- echo "no package supplied" 1>&2
- exit 1
-fi
-
-leadsize=96
-o=`expr $leadsize + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "sig il: $il dl: $dl"
-
-sigsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "hdr il: $il dl: $dl"
-
-hdrsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $hdrsize`
-comp=`dd if=$pkg ibs=$o skip=1 count=1 2>/dev/null | dd bs=3 count=1 2> /dev/null`
-
-gz="`echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }'`"
-lzma="`echo . | awk '{ printf("%cLZ", 0xff); }'`"
-xz="`echo . | awk '{ printf("%c7z", 0xfd); }'`"
-case "$comp" in
- BZh) dd if="$pkg" ibs=$o skip=1 2>/dev/null | bunzip2 ;;
- "$gz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;;
- "$xz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | xzcat ;;
- "$lzma"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | unlzma ;;
- *) echo "Unrecognized rpm file: $pkg"; exit 1 ;;
-esac
diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
deleted file mode 100644
index 9bbf580e46..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmatch.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Create a compatable macro if rpmatch() is not provided by the C library.
-
-This uses an existing configure check.
-
-This is needed for uclibc since it does not have the above function
-implemented.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Updated to rpm 5.4.15+.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/system.h
-===================================================================
---- rpm.orig/system.h
-+++ rpm/system.h
-@@ -358,6 +358,14 @@ extern int _tolower(int) __THROW /*@*/;
- #include <libgen.h>
- #endif
-
-+#ifndef HAVE_RPMATCH
-+#define rpmatch(line) \
-+ ( (line == NULL)? -1 : \
-+ (*line == 'y' || *line == 'Y')? 1 : \
-+ (*line == 'n' || *line == 'N')? 0 : \
-+ -1 )
-+#endif
-+
- /* -- Retrofit glibc __progname */
- #if defined __GLIBC__ && __GLIBC__ >= 2
- #if __GLIBC_MINOR__ >= 1
diff --git a/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch b/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
deleted file mode 100644
index 809e54e9cb..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-rpmdb: more verbose error logging in rpmTempFile()
-
-Upstream-Status: Inappropriate [debugging]
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-
-diff --git a/rpmdb/signature.c b/rpmdb/signature.c
-index dce6c4e..a1d0f06 100644
---- a/rpmdb/signature.c
-+++ b/rpmdb/signature.c
-@@ -37,6 +37,7 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
- int temput;
- FD_t fd = NULL;
- unsigned int ran;
-+ int ret = 0;
-
- if (!prefix) prefix = "";
-
-@@ -44,8 +45,11 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
- if (!_initialized) {
- _initialized = 1;
- tempfn = rpmGenPath(prefix, tpmacro, NULL);
-- if (rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1))
-- goto errxit;
-+ ret = rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1);
-+ if (ret) {
-+ rpmlog(RPMLOG_ERR, _("error creating temporary directory %s: %d\n"), tempfn, ret);
-+ goto errxit;
-+ }
- }
-
- /* XXX should probably use mkstemp here */
-@@ -68,12 +72,16 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
- #endif
-
- temput = urlPath(tempfn, &tfn);
-- if (*tfn == '\0') goto errxit;
-+ if (*tfn == '\0') {
-+ rpmlog(RPMLOG_ERR, _("error creating tempfile: empty filename\n"));
-+ goto errxit;
-+ }
-
- switch (temput) {
- case URL_IS_DASH:
- case URL_IS_HKP:
- case URL_IS_MONGO: /* XXX FIXME */
-+ rpmlog(RPMLOG_ERR, _("error creating temporary file, invalid uri type: %d\n"), temput);
- goto errxit;
- /*@notreached@*/ /*@switchbreak@*/ break;
- case URL_IS_HTTPS:
---
-2.6.6
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch b/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch
deleted file mode 100644
index 9bdd1d4908..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-Add an "rpmdeps-oecore" binary which allows batch processing of individual file
-dependencies in a similar manner to rpmdeps --provides --requires -v, prefixing
-each line of output with the filename that has the dependency.
-
-This is much faster than individually calling rpmdeps on each file.
-
-This binary is used by package.bbclass.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-RP 2012/2/7
-
----
- tools/Makefile.am | 6 ++-
- tools/rpmdeps-oecore.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 152 insertions(+), 1 deletions(-)
- create mode 100644 tools/rpmdeps-oecore.c
-
-Index: rpm-5.4.14/tools/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/tools/Makefile.am
-+++ rpm-5.4.14/tools/Makefile.am
-@@ -62,7 +62,7 @@ pkgbin_PROGRAMS = \
- @WITH_AUGEAS_AUGTOOL@ chroot cp @WITH_CUDF_CUDFTOOL@ find mtree \
- @WITH_SEMANAGE_SEMODULE@ wget \
- rpmcache rpmdigest rpmrepo rpmspecdump \
-- rpmcmp rpmdeps sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@
-+ rpmcmp rpmdeps rpmdeps-oecore sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@
- if WITH_DB
- pkgbin_PROGRAMS += dbconvert
- endif
-@@ -172,6 +172,10 @@ rpmdeps_SOURCES = rpmdeps.c
- rpmdeps_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
- rpmdeps_LDADD = $(RPM_LDADD_COMMON)
-
-+rpmdeps_oecore_SOURCES = rpmdeps-oecore.c
-+rpmdeps_oecore_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
-+rpmdeps_oecore_LDADD = $(RPM_LDADD_COMMON)
-+
- rpmdigest_SOURCES = rpmdigest.c
- rpmdigest_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
- rpmdigest_LDADD = $(RPMIO_LDADD_COMMON)
-Index: rpm-5.4.14/tools/rpmdeps-oecore.c
-===================================================================
---- /dev/null
-+++ rpm-5.4.14/tools/rpmdeps-oecore.c
-@@ -0,0 +1,147 @@
-+#include "system.h"
-+const char *__progname;
-+
-+#include <rpmio.h>
-+#include <rpmiotypes.h>
-+#include <rpmcb.h>
-+#include <argv.h>
-+#include <rpmtypes.h>
-+#include <rpmtag.h>
-+
-+#include <rpmds.h>
-+#define _RPMFC_INTERNAL /* XXX for debugging */
-+#include <rpmfc.h>
-+
-+#include <rpmcli.h>
-+
-+#include "debug.h"
-+
-+/*@unchecked@*/
-+char *progname;
-+
-+#define RPMDEP_RPMFC 1
-+
-+static int rpmdepPrint(char *filename, rpmds ds, FILE * fp)
-+{
-+ if (fp == NULL) fp = stderr;
-+
-+ ds = rpmdsInit(ds);
-+ while (rpmdsNext(ds) >= 0) {
-+ fprintf(fp, "%s %s: %s\n", filename, rpmdsType(ds), rpmdsDNEVR(ds)+2);
-+ }
-+ return 0;
-+}
-+
-+static struct poptOption optionsTable[] = {
-+
-+ { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0,
-+ N_("Common options:"),
-+ NULL },
-+
-+ POPT_AUTOALIAS
-+ POPT_AUTOHELP
-+ POPT_TABLEEND
-+};
-+
-+
-+int
-+main(int argc, char *argv[])
-+{
-+ poptContext optCon;
-+ ARGV_t av = NULL;
-+ rpmfc fc = NULL;
-+ FILE * fp = NULL;
-+ int flags = 0;
-+ int ac = 0;
-+ int ec = 1;
-+ int xx;
-+ int i;
-+ char buf[BUFSIZ];
-+ int nddict;
-+ const char * s;
-+ char * se;
-+ const char * fn;
-+ const char * N;
-+ const char * EVR;
-+ evrFlags Flags;
-+ unsigned char deptype;
-+ int ix;
-+ rpmds ds;
-+
-+/*@-modobserver@*/
-+ if ((progname = strrchr(argv[0], '/')) != NULL)
-+ progname++;
-+ else
-+ progname = argv[0];
-+/*@=modobserver@*/
-+
-+ optCon = rpmcliInit(argc, argv, optionsTable);
-+ if (optCon == NULL)
-+ goto exit;
-+
-+ av = poptGetArgs(optCon);
-+ ac = argvCount(av);
-+
-+ if (ac == 0) {
-+ av = NULL;
-+ xx = argvFgets(&av, NULL);
-+ ac = argvCount(av);
-+ }
-+
-+ /* Make sure file names are sorted. */
-+ xx = argvSort(av, NULL);
-+
-+ /* Build file class dictionary. */
-+ fc = rpmfcNew();
-+ xx = rpmfcClassify(fc, av, NULL);
-+
-+ /* Build file/package dependency dictionary. */
-+ xx = rpmfcApply(fc);
-+
-+ /* Generate per-file indices into package dependencies. */
-+ nddict = argvCount(fc->ddict);
-+
-+ for (i = 0; i < nddict; i++) {
-+ s = fc->ddict[i];
-+
-+ /* Parse out (file#,deptype,N,EVR,Flags) */
-+ ix = strtol(s, &se, 10);
-+ assert(se != NULL);
-+ deptype = *se++;
-+ se++;
-+ N = se;
-+ while (*se && *se != ' ')
-+ se++;
-+ *se++ = '\0';
-+ EVR = se;
-+ while (*se && *se != ' ')
-+ se++;
-+ *se++ = '\0';
-+ Flags = strtol(se, NULL, 16);
-+
-+ switch (deptype) {
-+ default:
-+ /*@switchbreak@*/ break;
-+ case 'P':
-+ ds = rpmdsSingle(RPMTAG_PROVIDENAME, N, EVR, Flags);
-+ rpmdepPrint((char *)fc->fn[ix], ds, stdout);
-+ (void)rpmdsFree(ds);
-+ ds = NULL;
-+ /*@switchbreak@*/ break;
-+ case 'R':
-+ ds = rpmdsSingle(RPMTAG_REQUIRENAME, N, EVR, Flags);
-+ rpmdepPrint((char *)fc->fn[ix], ds, stdout);
-+ (void)rpmdsFree(ds);
-+ ds = NULL;
-+ /*@switchbreak@*/ break;
-+ }
-+ }
-+
-+ fc = rpmfcFree(fc);
-+
-+ ec = 0;
-+
-+exit:
-+ optCon = rpmcliFini(optCon);
-+ return ec;
-+}
diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch b/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
deleted file mode 100644
index c68681c1ed..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From bb48dbc88a58bc05a43d71a3375fb05358119ec5 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 20 Mar 2016 20:20:16 -0700
-Subject: [PATCH] rpmqv.c: check _gpg_passphrase before ask for input
-
-rpm always asked for pass phrasae when add signature, which made it
-can't work non-interactively, this patch fix the problem. It will work
-non-interactively if _gpg_passphrase is defined, and work as before if
-not.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- macros/macros.in | 7 +++++--
- rpmqv.c | 17 ++++++++++-------
- 2 files changed, 15 insertions(+), 9 deletions(-)
-
-diff --git a/macros/macros.in b/macros/macros.in
-index 2e5b07d..01b3aad 100644
---- a/macros/macros.in
-+++ b/macros/macros.in
-@@ -520,15 +520,18 @@ $_arbitrary_tags_tests Foo:Bar
- # Macro(s) to hold the arguments passed to GPG/PGP for package
- # signing and verification.
- #
-+
-+%_gpg_passphrase_way %{?_gpg_passphrase:--passphrase "%{_gpg_passphrase}"}%{!?_gpg_passphrase:--passphrase-fd 3}
-+
- %__gpg_check_password_cmd %{__gpg} \
-- gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
-+ gpg --batch --no-verbose %{_gpg_passphrase_way} -u "%{_gpg_name}" -so -
- #%__pgp_check_password_cmd %{__pgp} \
- # pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
- #%__pgp5_check_password_cmd %{__pgp} \
- # pgps +batchmode=on +verbose=0 +armor=off "%{_pgp_name}" -f
-
- %__gpg_sign_cmd %{__gpg} \
-- gpg --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning \
-+ gpg --batch --no-verbose --no-armor %{_gpg_passphrase_way} --no-secmem-warning \
- -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
- #%__pgp_sign_cmd %{__pgp} \
- # pgp +batchmode=on +verbose=0 +armor=off \
-diff --git a/rpmqv.c b/rpmqv.c
-index b306486..7604396 100644
---- a/rpmqv.c
-+++ b/rpmqv.c
-@@ -831,13 +831,16 @@ int main(int argc, const char ** argv)
- #endif
- )
- {
-- passPhrase = Getpass(_("Enter pass phrase: "));
-- if (rpmCheckPassPhrase(passPhrase)) {
-- fprintf(stderr, _("Pass phrase check failed\n"));
-- ec = EXIT_FAILURE;
-- goto exit;
-+ passPhrase = rpmExpand("%{?_gpg_passphrase}", NULL);
-+ if (passPhrase == NULL || passPhrase[0] == '\0') {
-+ passPhrase = Getpass(_("Enter pass phrase: "));
-+ if (rpmCheckPassPhrase(passPhrase)) {
-+ fprintf(stderr, _("Pass phrase check failed\n"));
-+ ec = EXIT_FAILURE;
-+ goto exit;
-+ }
-+ fprintf(stderr, _("Pass phrase is good.\n"));
- }
-- fprintf(stderr, _("Pass phrase is good.\n"));
- /* XXX Getpass() should realloc instead. */
- passPhrase = xstrdup(passPhrase);
- }
diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
deleted file mode 100644
index b2437a8723..0000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From e8bae261615e19ff8a28683765c9539cfb22a086 Mon Sep 17 00:00:00 2001
-From: Joe Slater <jslater@windriver.com>
-Date: Thu, 17 Jul 2014 18:14:54 -0700
-Subject: [PATCH 1/9] rpm: compile rpmqv.c instead of rpmqv.cc
-
-Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0
-into rpm.o and rpmbuild.o. This means we must link with g++, and the Makefile we
-generate does not.
-
-So, go back to using rpmqv.c (which is currently identical to rpmqv.cc).
-
-Upstream-Status: Inappropriate [other]
-
- When linking with g++ is really necessary, the upstream package will do that.
-
-Also instead of symlinking files in two places, which can and does race in
-parallel builds, simply refer to the file's full location [RB]
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
----
- Makefile.am | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 1dade0a..55f8669 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -201,15 +201,13 @@ rpm_SOURCES = build.c
- rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
- rpm_LDADD = rpm.o $(myLDADD)
- rpm.o: $(top_srcdir)/rpmqv.c
-- ln -sf $< rpmqv.cc
-- $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.cc
-+ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $^
-
- rpmbuild_SOURCES = build.c
- rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
- rpmbuild_LDADD = rpmbuild.o $(myLDADD)
- rpmbuild.o: $(top_srcdir)/rpmqv.c
-- ln -sf $< rpmqv.cc
-- $(COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.cc
-+ $(COMPILE) -DIAM_RPMBT -o $@ -c $^
-
- .syntastic_c_config: Makefile
- @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
---
-2.7.0
-
diff --git a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
deleted file mode 100644
index dc7b0488a5..0000000000
--- a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Define the x* wrappers for uclibc as well
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: rpm/rpmio/rpmio.h
-===================================================================
---- rpm.orig/rpmio/rpmio.h
-+++ rpm/rpmio/rpmio.h
-@@ -23,7 +23,8 @@
- */
- /*@{*/
- #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
-- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
-+ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \
-+ !defined(__UCLIBC__)
- #define USE_COOKIE_SEEK_POINTER 1
- typedef _IO_off64_t _libio_off_t;
- typedef _libio_off_t * _libio_pos_t;
-Index: rpm/system.h
-===================================================================
---- rpm.orig/system.h
-+++ rpm/system.h
-@@ -489,7 +489,7 @@ extern void muntrace (void)
- #endif /* defined(__LCLINT__) */
-
- /* Memory allocation via macro defs to get meaningful locations from mtrace() */
--#if defined(__GNUC__)
-+#if defined(__GNUC__) || defined(__UCLIBC__)
- #define xmalloc(_size) (malloc(_size) ? : vmefail(_size))
- #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size))
- #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size))
-Index: rpm/lib/librpm.vers
-===================================================================
---- rpm.orig/lib/librpm.vers
-+++ rpm/lib/librpm.vers
-@@ -406,6 +406,10 @@ LIBRPM_0
- specedit;
- strict_erasures;
- XrpmtsiInit;
-+ xmalloc;
-+ xrealloc;
-+ xcalloc;
-+ xstrdup;
- local:
- *;
- };
-Index: rpm/rpmio/librpmio.vers
-===================================================================
---- rpm.orig/rpmio/librpmio.vers
-+++ rpm/rpmio/librpmio.vers
-@@ -1455,6 +1455,10 @@ LIBRPMIO_0
- _mongoc_write_result_init;
- _mongoc_write_result_merge;
- _mongoc_write_result_merge_legacy;
-+ xmalloc;
-+ xrealloc;
-+ xcalloc;
-+ xstrdup;
- local:
- *;
- };
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
new file mode 100644
index 0000000000..c37330eb4c
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
@@ -0,0 +1,153 @@
+SUMMARY = "The RPM package management system"
+DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
+package management system capable of installing, uninstalling, \
+verifying, querying, and updating software packages. Each software \
+package consists of an archive of files along with information about \
+the package like its version, a description, etc."
+
+SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
+DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
+development files will simplify the process of writing programs that \
+manipulate RPM packages and databases. These files are intended to \
+simplify the process of creating graphical package managers or any \
+other tools that need an intimate knowledge of RPM packages in order \
+to function."
+
+SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages"
+DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \
+written in the Python programming language to use the interface \
+supplied by the RPM Package Manager libraries."
+
+HOMEPAGE = "http://www.rpm.org"
+
+# libraries are also LGPL - how to express this?
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
+
+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
+ file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
+ file://0001-Do-not-read-config-files-from-HOME.patch \
+ file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
+ file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
+ file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
+ file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
+ file://0001-Fix-build-with-musl-C-library.patch \
+ file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
+ file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
+ file://0001-Split-binary-package-building-into-a-separate-functi.patch \
+ file://0002-Run-binary-package-creation-via-thread-pools.patch \
+ file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
+ file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
+ file://0001-perl-disable-auto-reqs.patch \
+ file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
+ file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
+ file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
+ "
+
+PE = "1"
+SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3"
+DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
+
+inherit autotools gettext pkgconfig python3native
+export PYTHON_ABI
+
+# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
+EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
+
+EXTRA_OECONF_append = " --without-lua --enable-python"
+EXTRA_OECONF_append_libc-musl = " --disable-nls"
+
+# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
+#
+# --localstatedir prevents rpm from writing its database to native sysroot when building images
+#
+# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
+# Also disable plugins by default for native.
+EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
+EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
+
+ASNEEDED = ""
+
+# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
+# libmagic also has sysroot path contamination, so override it
+
+WRAPPER_TOOLS = " \
+ ${bindir}/rpm \
+ ${bindir}/rpm2archive \
+ ${bindir}/rpm2cpio \
+ ${bindir}/rpmbuild \
+ ${bindir}/rpmdb \
+ ${bindir}/rpmgraph \
+ ${bindir}/rpmkeys \
+ ${bindir}/rpmsign \
+ ${bindir}/rpmspec \
+ ${libdir}/rpm/rpmdeps \
+"
+
+do_install_append_class-native() {
+ for tool in ${WRAPPER_TOOLS}; do
+ create_wrapper ${D}$tool \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+ MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+ done
+}
+
+do_install_append_class-nativesdk() {
+ for tool in ${WRAPPER_TOOLS}; do
+ create_wrapper ${D}$tool \
+ RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
+ RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \
+ MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+ done
+
+ rm -rf ${D}/var
+}
+
+# Rpm's make install creates var/tmp which clashes with base-files packaging
+do_install_append_class-target() {
+ rm -rf ${D}/var
+}
+
+do_install_append () {
+ sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
+ ${D}/${libdir}/rpm/macros
+
+ sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
+ ${D}${libdir}/rpm/pythondistdeps.py \
+ ${D}${libdir}/rpm/python-macro-helper
+}
+
+FILES_${PN} += "${libdir}/rpm-plugins/*.so \
+ "
+
+FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
+ "
+
+PACKAGES += "python3-rpm"
+PROVIDES += "python3-rpm"
+FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
+
+# rpm 5.x was packaging the rpm build tools separately
+RPROVIDES_${PN} += "rpm-build"
+
+RDEPENDS_${PN} = "bash perl python3-core"
+
+PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
+
+# Do not specify a sysroot when compiling on a target.
+rpm_package_preprocess () {
+ sed -i -e 's:--sysroot[^ ]*::g' \
+ ${PKGD}/${libdir}/rpm/macros
+}
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
deleted file mode 100644
index dd6e103b22..0000000000
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ /dev/null
@@ -1,707 +0,0 @@
-SUMMARY = "The RPM package management system"
-DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
-package management system capable of installing, uninstalling, \
-verifying, querying, and updating software packages. Each software \
-package consists of an archive of files along with information about \
-the package like its version, a description, etc."
-
-SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages"
-DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
-
-SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
-DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
-development files will simplify the process of writing programs that \
-manipulate RPM packages and databases. These files are intended to \
-simplify the process of creating graphical package managers or any \
-other tools that need an intimate knowledge of RPM packages in order \
-to function."
-
-SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration"
-DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \
-and configuration common between RPM Package Manager."
-
-SUMMARY_${PN}-build = "Scripts and executable programs used to build packages"
-DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \
-that are used to build packages using the RPM Package Manager."
-
-SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
-DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
-written in the Python programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages"
-DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \
-written in the Perl programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-HOMEPAGE = "http://rpm5.org/"
-LICENSE = "LGPLv2.1 & Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
-LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
-
-# We must have gettext-native, we need gettextize, which may not be provided
-DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
-DEPENDS_append_class-native = " file-replacement-native"
-
-# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
-# in order to extract the distribution SRPM into a format we can extract...
-
-# There is no official 5.4.16 release yet, so start w/ 5.4.15 and patch it
-# based on CVS
-S = "${WORKDIR}/rpm-5.4.15"
-
-SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm;name=srpm;extract=rpm-5.4.15.tar.gz \
- http://downloads.yoctoproject.org/releases/rpm5/rpm-5.4.15-to-5.4.16-20160225.patch.gz;name=rpm-patch \
- http://downloads.yoctoproject.org/releases/rpm5/syck-5.4.15-to-5.4.16-20160225.patch.gz;name=syck-patch \
- http://downloads.yoctoproject.org/releases/rpm5/beecrypt-5.4.15-to-5.4.16-20160225.patch.gz;name=beecrypt-patch \
- http://downloads.yoctoproject.org/releases/rpm5/lua-5.4.15-to-5.4.16-20160225.patch.gz;name=lua-patch \
- file://perfile_rpmdeps.sh \
- file://pythondeps.sh \
-"
-
-SRC_URI[srpm.md5sum] = "d53782842ac11b3100a43fb2958c9bc0"
-SRC_URI[srpm.sha256sum] = "d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee"
-
-SRC_URI[rpm-patch.md5sum] = "8b7deb1c9574d3d47ed8ba8c690fd8bf"
-SRC_URI[rpm-patch.sha256sum] = "1c1983d001b04eaa23eb2c8d9598b9d0899acb0a89f54a2d4c4e974086fd17a5"
-
-SRC_URI[syck-patch.md5sum] = "f31d7a32105a364688354419ec3559e4"
-SRC_URI[syck-patch.sha256sum] = "4dd1d04489206d8b5d1970f2a8d143a002f2895cefbe15d73459785096545e8a"
-
-SRC_URI[beecrypt-patch.md5sum] = "9e71ee3ccb0a52985a071dd250279132"
-SRC_URI[beecrypt-patch.sha256sum] ="df7c0708a7fab9bdf6d46194519b42e736f99cb0599dcc1c3c1bf1b228705cde"
-
-SRC_URI[lua-patch.md5sum] = "ca10d03d83b1fc1c31a0b50819534cd7"
-SRC_URI[lua-patch.sha256sum] = "6bde435cc827a7d4b2520e8f3e1c9bd2ca74375de0a4402aa99ef4d48eab9a7e"
-
-# Bug fixes
-SRC_URI += " \
- file://header-include-fix.patch \
- file://rpm-libsql-fix.patch \
- file://rpm-platform.patch \
- file://rpm-platform2.patch \
- file://rpm-tools-mtree-LDFLAGS.patch \
- file://rpm-canonarch.patch \
- file://rpm-no-loopmsg.patch \
- file://rpm-resolvedep.patch \
- file://rpm-packageorigin.patch \
- file://uclibc-support.patch \
- file://rpmatch.patch \
- file://makefile-am-exec-hook.patch \
- file://python-rpm-rpmsense.patch \
- file://debugedit-segv.patch \
- file://debugedit-valid-file-to-fix-segment-fault.patch \
- file://rpm-platform-file-fix.patch \
- file://rpm-lsb-compatibility.patch \
- file://rpm-tag-generate-endian-conversion-fix.patch \
- file://rpm-hardlink-segfault-fix.patch \
- file://rpm-payload-use-hashed-inode.patch \
- file://rpm-fix-logio-cp.patch \
- file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
- file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
- file://0001-define-EM_AARCH64.patch \
- file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
- file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
- file://rpm-mongodb-sasl.patch \
- file://rpm-fix-parseEmbedded.patch \
- file://rpm-rpmio-headers.patch \
- file://rpm-python-restore-origin.patch \
- file://rpm-keccak-sse-intrin.patch \
- file://rpm-atomic-ops.patch \
- file://rpm-gnu-atomic.patch \
- file://rpm-tagname-type.patch \
- file://rpm-python-tagname.patch \
- file://rpm-python-AddErase.patch \
- file://rpm-rpmpgp-popt.patch \
- file://rpm-fix-lua-tests-compilation-failure.patch \
- file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \
- file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
- file://gcc6-stdlib.patch \
- file://0001-system.h-query.c-support-nosignature.patch \
- file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \
-"
-
-# OE specific changes
-SRC_URI += " \
- file://rpm-log-auto-rm.patch \
- file://rpm-db-reduce.patch \
- file://rpm-autogen.patch \
- file://rpm-showrc.patch \
- file://rpm-fileclass.patch \
- file://rpm-scriptletexechelper.patch \
- file://rpmdeps-oecore.patch \
- file://rpm-no-perl-urpm.patch \
- file://rpm-macros.patch \
- file://rpm-lua.patch \
- file://rpm-ossp-uuid.patch \
- file://rpm-uuid-include.patch \
- file://rpm-pkgconfigdeps.patch \
- file://no-ldflags-in-pkgconfig.patch \
- file://dbconvert.patch \
- file://rpm-db_buffer_small.patch \
- file://rpm-py-init.patch \
- file://rpm-reloc-macros.patch \
- file://rpm-db5-or-db6.patch \
- file://rpm-db60.patch \
- file://rpmqv_cc_b_gone.patch \
- file://rpm-realpath.patch \
- file://rpm-check-rootpath-reasonableness.patch \
- file://rpm-macros.in-disable-external-key-server.patch \
- file://configure.ac-check-for-both-gpg2-and-gpg.patch \
- file://rpm-disable-auto-stack-protector.patch \
- file://popt-disable-auto-stack-protector.patch \
- file://rpm-syck-fix-gram.patch \
- file://rpm-rpmdb-grammar.patch \
- file://rpm-disable-blaketest.patch \
- file://rpm-autogen-force.patch \
- file://rpmdb-more-verbose-error-logging-in-rpmTempFile.patch \
-"
-
-SRC_URI_append_libc-musl = "\
- file://0001-rpm-Fix-build-on-musl.patch \
-"
-# Uncomment the following line to enable platform score debugging
-# This is useful when identifying issues with Smart being unable
-# to process certain package feeds.
-#SRC_URI += "file://rpm-debug-platform.patch"
-
-UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$"
-
-inherit autotools gettext python-dir
-
-acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
-
-# The local distribution macro directory
-distromacrodir = "${libdir}/rpm/poky"
-
-# Specify the default rpm macros in terms of adjustable variables
-rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
-
-# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
-
-# Set the digest algorithm used for verifying file integrity
-# If this value changes, and two different packages have different values
-# the "same file" validation (two packages have a non-conflict file)
-# will fail. This may lead to upgrade problems. You should treat this
-# value as a distribution wide setting, and only change it when you intend
-# a full system upgrade!
-#
-# Defined file digest algorithm values (note: not all are available!):
-# 1 MD5 (legacy RPM default)
-# 2 SHA1
-# 3 RIPEMD-160
-# 5 MD2
-# 6 TIGER-192
-# 8 SHA256
-# 9 SHA384
-# 10 SHA512
-# 11 SHA224
-# 104 MD4
-# 105 RIPEMD-128
-# 106 CRC-32
-# 107 ADLER-32
-# 108 CRC-64 (ECMA-182 polynomial, untested uint64_t problems)
-# 109 Jenkins lookup3.c hashlittle()
-# 111 RIPEMD-256
-# 112 RIPEMD-320
-# 188 BLAKE2B
-# 189 BLAKE2BP
-# 190 BLAKE2S
-# 191 BLAKE2SP
-RPM_FILE_DIGEST_ALGO ?= "1"
-
-# All packages build with RPM5 contain a non-repudiable signature.
-# The purpose of this signature is not to show authenticity of a package,
-# but instead act as a secondary package wide validation that shows it
-# wasn't damaged by accident in transport. (When later you sign the package,
-# this signature may or may not be replaced as there are three signature
-# slots, one for DSA/RSA, one for ECSDA, and one reserved.)
-#
-# There is a known issue w/ RSA signatures that if they start with an 0x00
-# the signing and validation may fail.
-#
-# The following is the list of choices for the non-rpudiable signature
-# (note: not all of these are implemented):
-# DSA (default)
-# RSA (implies SHA1)
-# ECDSA (implies SHA256)
-# DSA/SHA1
-# DSA/SHA224
-# DSA/SHA256
-# DSA/SHA384
-# DSA/SHA512
-# RSA/SHA1
-# RSA/SHA224
-# RSA/SHA256
-# RSA/SHA384
-# RSA/SHA512
-# ECDSA/SHA224 (using NIST P-224)
-# ECDSA/SHA256 (using NIST P-256)
-# ECDSA/SHA384 (using NIST P-384)
-# ECDSA/SHA512 (using NIST P-521)
-RPM_SELF_SIGN_ALGO ?= "DSA"
-
-# Note: perl and sqlite w/o db specified does not currently work.
-# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python"
-
-# Note: switching to internal popt may not work, as it will generate
-# a shared library which will intentionally not be packaged.
-#
-# If you intend to use the internal version, additional work may be required.
-PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
-
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
-PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
-PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
-
-WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
- --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
- --with-python-lib-dir=${PYTHON_SITEPACKAGES_DIR} \
- --without-pythonembed"
-PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
-
-# Perl modules are not built, but they could be enabled fairly easily
-# the perl module creation and installation would need to be patched.
-# (currently has host perl contamination issues)
-WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm"
-WITHOUT_PERL = "--without-perl --without-perl-urpm"
-PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl,"
-
-# The --with-dbsql will only tell RPM to check for support, db
-# may or may not be built w/ the dbsql support.
-WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated"
-PACKAGECONFIG[db] = "${WITH_DB},--without-db,db,"
-
-PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3,"
-
-# This switch simply disables external beecrypt, RPM5 always uses beecrypt
-# for base64 processing and various digest algorithms.
-# Beecrypt is only the preferred crypto engine if it's the only engine enabled.
-PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt,"
-
-# --with-usecrypto= setting defined the item as the preferred system
-# crypto engine, which will take priority over the included beecrypt
-PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl,"
-PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss,"
-PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt,"
-
-PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
-PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
-
-WITH_SELINUX = "--with-selinux --with-sepol --with-semanage"
-WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage"
-PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux,"
-
-WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi"
-WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi"
-PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat,"
-
-PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat,"
-PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl,"
-
-PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
-
-EXTRA_OECONF += "--verbose \
- --sysconfdir=${sysconfdir} \
- --with-file \
- --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \
- --with-syck=internal \
- --without-readline \
- --without-libtasn1 \
- --without-pakchois \
- --without-gnutls \
- --with-pcre \
- --enable-utf8 \
- --with-uuid \
- --with-attr \
- --with-acl \
- --with-pthreads \
- --without-cudf \
- --without-ficl \
- --without-aterm \
- --without-nix \
- --without-bash \
- --without-rc \
- --without-js \
- --without-gpsee \
- --without-ruby \
- --without-squirrel \
- --without-sasl2 \
- --without-tomcrypt \
- --with-build-extlibdep \
- --with-build-maxextlibdep \
- --without-valgrind \
- --disable-openmp \
- --enable-build-pic \
- --enable-build-versionscript \
- --enable-build-warnings \
- --enable-build-debug \
- --enable-maintainer-mode \
- --with-path-macros=${rpm_macros} \
- --with-path-lib=${libdir}/rpm \
- --with-bugreport=http://bugzilla.yoctoproject.org \
- --program-prefix= \
- YACC=byacc"
-
-CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"
-
-LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
-
-PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale"
-
-SOLIBS = "5.4.so"
-
-# Based on %files section in the rpm.spec
-
-FILES_${PN} = "${bindir}/rpm \
- ${bindir}/rpmconstant \
- ${libdir}/rpm/rpm.* \
- ${libdir}/rpm/tgpg \
- ${libdir}/rpm/macros \
- ${libdir}/rpm/rpmpopt \
- ${libdir}/rpm/rpm2cpio \
- ${libdir}/rpm/vcheck \
- ${libdir}/rpm/helpers \
- ${libdir}/rpm/qf \
- ${libdir}/rpm/cpuinfo.yaml \
- ${libdir}/rpm/bin/mtree \
- ${libdir}/rpm/bin/rpmkey \
- ${libdir}/rpm/bin/rpmrepo \
- ${libdir}/rpm/bin/rpmrepo.real \
- ${libdir}/rpm/bin/rpmspecdump \
- ${libdir}/rpm/bin/rpmspecdump.real \
- ${libdir}/rpm/bin/wget \
- ${localstatedir}/cache \
- ${localstatedir}/cache/rpm \
- ${localstatedir}/cache/wdj \
- ${localstatedir}/lib \
- ${localstatedir}/lib/rpm \
- ${localstatedir}/lib/wdj \
- ${bindir}/rpm.real \
- ${bindir}/rpmconstant.real \
- ${bindir}/rpm2cpio.real \
- "
-
-FILES_${PN}-common = "${bindir}/rpm2cpio \
- ${bindir}/gendiff \
- ${sysconfdir}/rpm \
- ${localstatedir}/spool/repackage \
- "
-
-FILES_${PN}-libs = "${libdir}/librpm-*.so \
- ${libdir}/librpmconstant-*.so \
- ${libdir}/librpmdb-*.so \
- ${libdir}/librpmio-*.so \
- ${libdir}/librpmmisc-*.so \
- ${libdir}/librpmbuild-*.so \
- "
-
-FILES_${PN}-build = "${prefix}/src/rpm \
- ${bindir}/rpmbuild \
- ${bindir}/rpmbuild.real \
- ${libdir}/rpm/brp-* \
- ${libdir}/rpm/check-files \
- ${libdir}/rpm/cross-build \
- ${libdir}/rpm/find-debuginfo.sh \
- ${libdir}/rpm/find-lang.sh \
- ${libdir}/rpm/find-prov.pl \
- ${libdir}/rpm/find-provides.perl \
- ${libdir}/rpm/find-req.pl \
- ${libdir}/rpm/find-requires.perl \
- ${libdir}/rpm/getpo.sh \
- ${libdir}/rpm/http.req \
- ${libdir}/rpm/javadeps.sh \
- ${libdir}/rpm/mono-find-provides \
- ${libdir}/rpm/mono-find-requires \
- ${libdir}/rpm/executabledeps.sh \
- ${libdir}/rpm/libtooldeps.sh \
- ${libdir}/rpm/osgideps.pl \
- ${libdir}/rpm/perldeps.pl \
- ${libdir}/rpm/perl.prov \
- ${libdir}/rpm/perl.req \
- ${libdir}/rpm/php.prov \
- ${libdir}/rpm/php.req \
- ${libdir}/rpm/pkgconfigdeps.sh \
- ${libdir}/rpm/pythondeps.sh \
- ${libdir}/rpm/bin/debugedit \
- ${libdir}/rpm/bin/debugedit.real \
- ${libdir}/rpm/bin/rpmcache \
- ${libdir}/rpm/bin/rpmcache.real \
- ${libdir}/rpm/bin/rpmcmp \
- ${libdir}/rpm/bin/rpmcmp.real \
- ${libdir}/rpm/bin/rpmdeps \
- ${libdir}/rpm/bin/rpmdeps.real \
- ${libdir}/rpm/bin/rpmdeps-oecore \
- ${libdir}/rpm/bin/rpmdeps-oecore.real \
- ${libdir}/rpm/bin/rpmdigest \
- ${libdir}/rpm/bin/rpmdigest.real \
- ${libdir}/rpm/bin/abi-compliance-checker.pl \
- ${libdir}/rpm/bin/api-sanity-autotest.pl \
- ${libdir}/rpm/bin/chroot \
- ${libdir}/rpm/bin/cp \
- ${libdir}/rpm/bin/dbsql \
- ${libdir}/rpm/bin/find \
- ${libdir}/rpm/bin/install-sh \
- ${libdir}/rpm/bin/lua \
- ${libdir}/rpm/bin/luac \
- ${libdir}/rpm/bin/mkinstalldirs \
- ${libdir}/rpm/bin/rpmlua \
- ${libdir}/rpm/bin/rpmluac \
- ${libdir}/rpm/bin/sqlite3 \
- ${libdir}/rpm/macros.d/cmake \
- ${libdir}/rpm/macros.d/java \
- ${libdir}/rpm/macros.d/libtool \
- ${libdir}/rpm/macros.d/mandriva \
- ${libdir}/rpm/macros.d/mono \
- ${libdir}/rpm/macros.d/perl \
- ${libdir}/rpm/macros.d/php \
- ${libdir}/rpm/macros.d/pkgconfig \
- ${libdir}/rpm/macros.d/python \
- ${libdir}/rpm/macros.d/ruby \
- ${libdir}/rpm/macros.d/selinux \
- ${libdir}/rpm/macros.d/tcl \
- ${libdir}/rpm/macros.rpmbuild \
- ${libdir}/rpm/u_pkg.sh \
- ${libdir}/rpm/vpkg-provides.sh \
- ${libdir}/rpm/vpkg-provides2.sh \
- ${libdir}/rpm/perfile_rpmdeps.sh \
- ${distromacrodir} \
- "
-RDEPENDS_${PN} = "base-files run-postinsts"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-build = "file bash perl"
-
-RDEPENDS_python-rpm = "${PN} python"
-
-FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm"
-PROVIDES += "python-rpm"
-
-FILES_perl-module-rpm = "${libdir}/perl/*/* \
- "
-
-RDEPENDS_${PN}-dev += "bash"
-
-FILES_${PN}-dev = "${includedir}/rpm \
- ${libdir}/librpm.la \
- ${libdir}/librpm.so \
- ${libdir}/librpmconstant.la \
- ${libdir}/librpmconstant.so \
- ${libdir}/librpmdb.la \
- ${libdir}/librpmdb.so \
- ${libdir}/librpmio.la \
- ${libdir}/librpmio.so \
- ${libdir}/librpmmisc.la \
- ${libdir}/librpmmisc.so \
- ${libdir}/librpmbuild.la \
- ${libdir}/librpmbuild.so \
- ${libdir}/rpm/lib/liblua.la \
- ${libdir}/pkgconfig/rpm.pc \
- ${libdir}/rpm/rpmdb_loadcvt \
- ${libdir}/rpm/include \
- "
-
-FILES_${PN}-staticdev = " \
- ${libdir}/librpm.a \
- ${libdir}/librpmconstant.a \
- ${libdir}/librpmdb.a \
- ${libdir}/librpmio.a \
- ${libdir}/librpmmisc.a \
- ${libdir}/librpmbuild.a \
- ${libdir}/rpm/lib/liblua.a \
- ${PYTHON_SITEPACKAGES_DIR}/rpm/*.a \
- "
-
-do_configure() {
- # Disable tests!
- echo "all:" > ${S}/tests/Makefile.am
- sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in
-
- ( cd ${S}; ${S}/autogen.sh )
-
- # NASTY hack to make sure configure files the right pkg-config file...
- sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \
- -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure
-
- ( cd ${S}/syck ; set +e ; rm -- -l* ; rm Makefile config.h config.status lib/Makefile libtool stamp-h1 tests/.deps tests/Makefile ) || :
-
- export varprefix=${localstatedir}
- oe_runconf
-}
-
-do_install_append() {
- # Configure -distribution wide- package crypto settings
- # If these change, effectively all packages have to be upgraded!
- sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
- sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
-
- sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
- sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
- sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
- sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
- sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
-
- # Enable MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.)
- sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
-
- # Enable Debian style arbitrary tags...
- sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
-
- install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
- install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
-
- rm -f ${D}/${includedir}/popt.h
- rm -f ${D}/${libdir}/libpopt.*
- rm -f ${D}/${libdir}/pkgconfig/popt.pc
- rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
- rm -f ${D}/${mandir}/man3/popt.3
-
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.a
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.la
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.a
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.la
-
- rm -f ${D}/${libdir}/rpm/dbconvert.sh
- rm -f ${D}/${libdir}/rpm/libsqldb.*
-
- rm -f ${D}/${libdir}/rpm/gstreamer.sh
- rm -f ${D}/${libdir}/rpm/gem_helper.rb
- rm -f ${D}/${libdir}/rpm/rubygems.rb
- rm -f ${D}/${libdir}/rpm/kmod-deps.sh
- rm -f ${D}/${libdir}/rpm/pythoneggs.py
- rm -f ${D}/${libdir}/rpm/macros.d/kernel
- rm -f ${D}/${libdir}/rpm/macros.d/gstreamer
- rm -f ${D}/${libdir}/rpm/bin/mgo
- rm -f ${D}/${libdir}/rpm/bin/pom2spec
-
- rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
- rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
-}
-
-do_install_append_class-target() {
- # Create and install distribution specific macros
- mkdir -p ${D}/${distromacrodir}
- cat << EOF > ${D}/${distromacrodir}/macros
-%_defaultdocdir ${docdir}
-
-%_prefix ${prefix}
-%_exec_prefix ${exec_prefix}
-%_datarootdir ${datadir}
-%_bindir ${bindir}
-%_sbindir ${sbindir}
-%_libexecdir %{_libdir}/%{name}
-%_datadir ${datadir}
-%_sysconfdir ${sysconfdir}
-%_sharedstatedir ${sharedstatedir}
-%_localstatedir ${localstatedir}
-%_lib lib
-%_libdir %{_exec_prefix}/%{_lib}
-%_includedir ${includedir}
-%_oldincludedir ${oldincludedir}
-%_infodir ${infodir}
-%_mandir ${mandir}
-%_localedir %{_libdir}/locale
-EOF
-
- # Create and install multilib specific macros
- ${@multilib_rpmmacros(d)}
-}
-
-do_install_append_class-native () {
- sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
-}
-
-do_install_append_class-nativesdk () {
- sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
-}
-
-def multilib_rpmmacros(d):
- localdata = d.createCopy()
- # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
- localdata.delVar('TOOLCHAIN_OPTIONS')
-
- # Set 'localdata' values to be consistent with 'd' values.
- localdata.setVar('distromacrodir', d.getVar('distromacrodir', True))
- localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
-
- ret = gen_arch_macro(localdata)
-
- variants = d.getVar("MULTILIB_VARIANTS", True) or ""
- for item in variants.split():
- # Load overrides from 'd' to avoid having to reset the value...
- localdata = d.createCopy()
- overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- localdata.setVar("MLPREFIX", item + "-")
- bb.data.update_data(localdata)
- ret += gen_arch_macro(localdata)
- return ret
-
-def gen_arch_macro(d):
- # Generate shell script to produce the file as part of do_install
- val = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
- val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
- val += "%_lib ${baselib}\n"
- val += "%_libdir ${libdir}\n"
- val += "%_localedir ${localedir}\n"
- val += "\n"
- val += "# Toolchain configuration\n"
- val += "%TOOLCHAIN_OPTIONS %{nil}\n"
- val += "%__ar ${@d.getVar('AR', True).replace('$','%')}\n"
- val += "%__as ${@d.getVar('AS', True).replace('$','%')}\n"
- val += "%__cc ${@d.getVar('CC', True).replace('$','%')}\n"
- val += "%__cpp ${@d.getVar('CPP', True).replace('$','%')}\n"
- val += "%__cxx ${@d.getVar('CXX', True).replace('$','%')}\n"
- val += "%__ld ${@d.getVar('LD', True).replace('$','%')}\n"
- val += "%__nm ${@d.getVar('NM', True).replace('$','%')}\n"
- val += "%__objcopy ${@d.getVar('OBJCOPY', True).replace('$','%')}\n"
- val += "%__objdump ${@d.getVar('OBJDUMP', True).replace('$','%')}\n"
- val += "%__ranlib ${@d.getVar('RANLIB', True).replace('$','%')}\n"
- val += "%__strip ${@d.getVar('STRIP', True).replace('$','%')}\n"
- val += "EOF\n"
- val += "\n"
- return d.expand(val)
-
-
-add_native_wrapper() {
- create_wrapper ${D}/${bindir}/rpm \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
- create_wrapper ${D}/${bindir}/rpm2cpio \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
- create_wrapper ${D}/${bindir}/rpmbuild \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
- create_wrapper ${D}/${bindir}/rpmconstant \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
- for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do
- create_wrapper $rpm_binary \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
- done
-}
-
-do_install_append_class-native() {
- add_native_wrapper
-}
-
-do_install_append_class-nativesdk() {
- add_native_wrapper
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
deleted file mode 100644
index c0b4d567fb..0000000000
--- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/* OpenEmbedded RPM resolver utility
-
- Written by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
- Copyright 2012 Intel Corporation
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-*/
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#include <rpmdb.h>
-#include <rpmtypes.h>
-#include <rpmtag.h>
-#include <rpmts.h>
-#include <rpmmacro.h>
-#include <rpmcb.h>
-#include <rpmlog.h>
-#include <argv.h>
-#include <mire.h>
-
-int debugmode;
-FILE *outf;
-
-int getPackageStr(rpmts ts, const char *NVRA, rpmTag tag, char **value)
-{
- int rc = -1;
- rpmmi mi = rpmmiInit(rpmtsGetRdb(ts), RPMTAG_NVRA, NVRA, 0);
- Header h;
- if ((h = rpmmiNext(mi)) != NULL) {
- HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
- he->tag = tag;
- rc = (headerGet(h, he, 0) != 1);
- if(rc==0)
- *value = strdup((char *)he->p.ptr);
- }
- (void)rpmmiFree(mi);
- return rc;
-}
-
-int loadTs(rpmts **ts, int *tsct, const char *dblistfn)
-{
- int count = 0;
- int sz = 5;
- int rc = 0;
- int listfile = 1;
- struct stat st_buf;
-
- rc = stat(dblistfn, &st_buf);
- if(rc != 0) {
- perror("stat");
- return 1;
- }
- if(S_ISDIR(st_buf.st_mode))
- listfile = 0;
-
- if(listfile) {
- if(debugmode)
- printf("DEBUG: reading database list file '%s'\n", dblistfn);
- *ts = malloc(sz * sizeof(rpmts));
- FILE *f = fopen(dblistfn, "r" );
- if(f) {
- char line[2048];
- while(fgets(line, sizeof(line), f)) {
- int len = strlen(line) - 1;
- if(len > 0)
- // Trim trailing whitespace
- while(len > 0 && isspace(line[len]))
- line[len--] = '\0';
-
- if(len > 0) {
- // Expand array if needed
- if(count == sz) {
- sz += 5;
- *ts = (rpmts *)realloc(*ts, sz);
- }
-
- if(debugmode)
- printf("DEBUG: opening database '%s'\n", line);
- char *dbpathm = malloc(strlen(line) + 10);
- sprintf(dbpathm, "_dbpath %s", line);
- rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE);
- free(dbpathm);
-
- rpmts tsi = rpmtsCreate();
- (*ts)[count] = tsi;
- rc = rpmtsOpenDB(tsi, O_RDONLY);
- if( rc ) {
- fprintf(stderr, "Failed to open database %s\n", line);
- rc = -1;
- break;
- }
-
- count++;
- }
- }
- fclose(f);
- *tsct = count;
- }
- else {
- perror(dblistfn);
- rc = -1;
- }
- }
- else {
- if(debugmode)
- printf("DEBUG: opening database '%s'\n", dblistfn);
- // Load from single database
- *ts = malloc(sizeof(rpmts));
- char *dbpathm = malloc(strlen(dblistfn) + 10);
- sprintf(dbpathm, "_dbpath %s", dblistfn);
- rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE);
- free(dbpathm);
-
- rpmts tsi = rpmtsCreate();
- (*ts)[0] = tsi;
- rc = rpmtsOpenDB(tsi, O_RDONLY);
- if( rc ) {
- fprintf(stderr, "Failed to open database %s\n", dblistfn);
- rc = -1;
- }
- *tsct = 1;
- }
-
- return rc;
-}
-
-int processPackages(rpmts *ts, int tscount, const char *packagelistfn, int ignoremissing)
-{
- int rc = 0;
- int count = 0;
- int sz = 100;
- int i = 0;
- int missing = 0;
-
- FILE *f = fopen(packagelistfn, "r" );
- if(f) {
- char line[255];
- while(fgets(line, sizeof(line), f)) {
- int len = strlen(line) - 1;
- if(len > 0)
- // Trim trailing whitespace
- while(len > 0 && isspace(line[len]))
- line[len--] = '\0';
-
- if(len > 0) {
- int found = 0;
- for(i=0; i<tscount; i++) {
- ARGV_t keys = NULL;
- rpmdb db = rpmtsGetRdb(ts[i]);
- rc = rpmdbMireApply(db, RPMTAG_NAME,
- RPMMIRE_STRCMP, line, &keys);
- if (keys) {
- int nkeys = argvCount(keys);
- if( nkeys == 1 ) {
- char *value = NULL;
- rc = getPackageStr(ts[i], keys[0], RPMTAG_PACKAGEORIGIN, &value);
- if(rc == 0)
- fprintf(outf, "%s\n", value);
- else
- fprintf(stderr, "Failed to get package origin for %s\n", line);
- found = 1;
- }
- else if( nkeys > 1 ) {
- int keyindex = 0;
- fprintf(stderr, "Multiple matches for %s:\n", line);
- for( keyindex=0; keyindex<nkeys; keyindex++) {
- char *value = NULL;
- rc = getPackageStr(ts[i], keys[keyindex], RPMTAG_PACKAGEORIGIN, &value);
- if(rc == 0)
- fprintf(stderr, " %s\n", value);
- else
- fprintf(stderr, " (%s)\n", keys[keyindex]);
- }
- }
- }
- if(found)
- break;
- }
-
- if( !found ) {
- if( ignoremissing ) {
- fprintf(stderr, "Unable to resolve package %s - ignoring\n", line);
- }
- else {
- fprintf(stderr, "Unable to resolve package %s\n", line);
- missing = 1;
- }
- }
- }
- count++;
- }
- fclose(f);
-
- if( missing ) {
- fprintf(stderr, "ERROR: some packages were missing\n");
- rc = 1;
- }
- }
- else {
- perror(packagelistfn);
- rc = -1;
- }
-
- return rc;
-}
-
-int lookupProvider(rpmts ts, const char *req, char **provider)
-{
- int rc = 0;
- rpmmi provmi = rpmmiInit(rpmtsGetRdb(ts), RPMTAG_PROVIDENAME, req, 0);
- if(provmi) {
- Header h;
- if ((h = rpmmiNext(provmi)) != NULL) {
- HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
- he->tag = RPMTAG_NAME;
- rc = (headerGet(h, he, 0) != 1);
- if(rc==0)
- *provider = strdup((char *)he->p.ptr);
- }
- (void)rpmmiFree(provmi);
- }
- else {
- rc = -1;
- }
- return rc;
-}
-
-int printDepList(rpmts *ts, int tscount)
-{
- int rc = 0;
-
- if( tscount > 1 )
- fprintf(stderr, ">1 database specified with dependency list, using first only\n");
-
- /* Get list of names */
- rpmdb db = rpmtsGetRdb(ts[0]);
- ARGV_t names = NULL;
- rc = rpmdbMireApply(db, RPMTAG_NAME,
- RPMMIRE_STRCMP, NULL, &names);
- int nnames = argvCount(names);
-
- /* Get list of NVRAs */
- ARGV_t keys = NULL;
- rc = rpmdbMireApply(db, RPMTAG_NVRA,
- RPMMIRE_STRCMP, NULL, &keys);
- if (keys) {
- int i, j;
- HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
- int nkeys = argvCount(keys);
- for(i=0; i<nkeys; i++) {
- rpmmi mi = rpmmiInit(db, RPMTAG_NVRA, keys[i], 0);
- Header h;
- if ((h = rpmmiNext(mi)) != NULL) {
- /* Get name of package */
- he->tag = RPMTAG_NAME;
- rc = (headerGet(h, he, 0) != 1);
- char *name = strdup((char *)he->p.ptr);
- /* Get its requires */
- he->tag = RPMTAG_REQUIRENAME;
- if (rc = (headerGet(h, he, 0) != 1)) {
- if (debugmode) {
- printf("DEBUG: %s requires null\n", name);
- }
- rc = 0;
- free(name);
- (void)rpmmiFree(mi);
- continue;
- }
- ARGV_t reqs = (ARGV_t)he->p.ptr;
- /* Get its requireflags */
- he->tag = RPMTAG_REQUIREFLAGS;
- rc = (headerGet(h, he, 0) != 1);
- rpmuint32_t *reqflags = (rpmuint32_t *)he->p.ui32p;
- for(j=0; j<he->c; j++) {
- int k;
- char *prov = NULL;
- for(k=0; k<nnames; k++) {
- if(strcmp(names[k], reqs[j]) == 0) {
- prov = names[k];
- break;
- }
- }
- if(prov) {
- if((int)reqflags[j] & 0x80000)
- fprintf(outf, "%s|%s [REC]\n", name, prov);
- else
- fprintf(outf, "%s|%s\n", name, prov);
- }
- else {
- rc = lookupProvider(ts[0], reqs[j], &prov);
- if(rc==0 && prov) {
- if((int)reqflags[j] & 0x80000)
- fprintf(outf, "%s|%s [REC]\n", name, prov);
- else
- fprintf(outf, "%s|%s\n", name, prov);
- free(prov);
- }
- }
- }
- free(name);
- }
- (void)rpmmiFree(mi);
- }
- }
-
- return rc;
-}
-
-void usage()
-{
- fprintf(stderr, "OpenEmbedded rpm resolver utility\n");
- fprintf(stderr, "syntax: rpmresolve [-i] [-d] [-t] <dblistfile> <packagelistfile>\n");
-}
-
-int main(int argc, char **argv)
-{
- rpmts *ts = NULL;
- int tscount = 0;
- int rc = 0;
- int i;
- int c;
- int ignoremissing = 0;
- int deplistmode = 0;
- char *outfile = NULL;
-
- debugmode = 0;
- outf = stdout;
-
- opterr = 0;
- while ((c = getopt (argc, argv, "itdo:")) != -1) {
- switch (c) {
- case 'i':
- ignoremissing = 1;
- break;
- case 't':
- deplistmode = 1;
- break;
- case 'd':
- debugmode = 1;
- break;
- case 'o':
- outfile = strdup(optarg);
- break;
- case '?':
- if(isprint(optopt))
- fprintf(stderr, "Unknown option `-%c'.\n", optopt);
- else
- fprintf(stderr, "Unknown option character `\\x%x'.\n",
- optopt);
- usage();
- return 1;
- default:
- abort();
- }
- }
-
- if( argc - optind < 1 ) {
- usage();
- return 1;
- }
-
- if( outfile ) {
- if(debugmode)
- printf("DEBUG: Using output file %s\n", outfile);
- outf = fopen(outfile, "w");
- }
-
- const char *dblistfn = argv[optind];
-
- rpmcliInit(argc, argv, NULL);
-
- if(debugmode)
- rpmSetVerbosity(RPMLOG_DEBUG);
-
- rpmDefineMacro(NULL, "__dbi_txn create nofsync", RMIL_CMDLINE);
-
- rc = loadTs(&ts, &tscount, dblistfn);
- if( rc )
- return 1;
- if( tscount == 0 ) {
- fprintf(stderr, "Please specify database list file or database location\n");
- return 1;
- }
-
- if(deplistmode) {
- rc = printDepList(ts, tscount);
- }
- else {
- if( argc - optind < 2 ) {
- fprintf(stderr, "Please specify package list file\n");
- }
- else {
- const char *pkglistfn = argv[optind+1];
- rc = processPackages(ts, tscount, pkglistfn, ignoremissing);
- }
- }
-
- for(i=0; i<tscount; i++)
- (void)rpmtsFree(ts[i]);
- free(ts);
-
- if( outfile ) {
- fclose(outf);
- free(outfile);
- }
-
- return rc;
-}
diff --git a/meta/recipes-devtools/rpm/rpmresolve_1.0.bb b/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
deleted file mode 100644
index 0c13a67107..0000000000
--- a/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "OpenEmbedded RPM resolver utility"
-DESCRIPTION = "OpenEmbedded RPM resolver - performs RPM database lookups in batches to avoid \
- repeated invocations of rpm on the command line."
-DEPENDS = "rpm"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
-PR = "r2"
-
-SRC_URI = "file://rpmresolve.c"
-
-S = "${WORKDIR}"
-
-do_compile() {
- ${CC} ${CFLAGS} -ggdb -I${STAGING_INCDIR}/rpm ${LDFLAGS} rpmresolve.c -o rpmresolve -lrpmbuild -lrpm -lrpmio -lrpmdb
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 rpmresolve ${D}${bindir}
-}
-
-do_install_append_class-native() {
- create_wrapper ${D}/${bindir}/rpmresolve \
- RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
- RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/rsync/files/CVE-2016-9840.patch b/meta/recipes-devtools/rsync/files/CVE-2016-9840.patch
new file mode 100644
index 0000000000..7581887790
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/CVE-2016-9840.patch
@@ -0,0 +1,75 @@
+From 6a043145ca6e9c55184013841a67b2fef87e44c0 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Wed, 21 Sep 2016 23:35:50 -0700
+Subject: [PATCH] Remove offset pointer optimization in inftrees.c.
+
+inftrees.c was subtracting an offset from a pointer to an array,
+in order to provide a pointer that allowed indexing starting at
+the offset. This is not compliant with the C standard, for which
+the behavior of a pointer decremented before its allocated memory
+is undefined. Per the recommendation of a security audit of the
+zlib code by Trail of Bits and TrustInSoft, in support of the
+Mozilla Foundation, this tiny optimization was removed, in order
+to avoid the possibility of undefined behavior.
+
+CVE: CVE-2016-9840
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ inftrees.c | 18 ++++++++----------
+ 1 file changed, 8 insertions(+), 10 deletions(-)
+
+diff --git a/zlib/inftrees.c b/zlib/inftrees.c
+index 22fcd666..0d2670d5 100644
+--- a/zlib/inftrees.c
++++ b/zlib/inftrees.c
+@@ -54,7 +54,7 @@ unsigned short FAR *work;
+ code FAR *next; /* next available space in table */
+ const unsigned short FAR *base; /* base value table to use */
+ const unsigned short FAR *extra; /* extra bits table to use */
+- int end; /* use base and extra for symbol > end */
++ unsigned match; /* use base and extra for symbol >= match */
+ unsigned short count[MAXBITS+1]; /* number of codes of each length */
+ unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
+ static const unsigned short lbase[31] = { /* Length codes 257..285 base */
+@@ -181,19 +181,17 @@ unsigned short FAR *work;
+ switch (type) {
+ case CODES:
+ base = extra = work; /* dummy value--not used */
+- end = 19;
++ match = 20;
+ break;
+ case LENS:
+ base = lbase;
+- base -= 257;
+ extra = lext;
+- extra -= 257;
+- end = 256;
++ match = 257;
+ break;
+ default: /* DISTS */
+ base = dbase;
+ extra = dext;
+- end = -1;
++ match = 0;
+ }
+
+ /* initialize state for loop */
+@@ -216,13 +214,13 @@ unsigned short FAR *work;
+ for (;;) {
+ /* create table entry */
+ here.bits = (unsigned char)(len - drop);
+- if ((int)(work[sym]) < end) {
++ if (work[sym] + 1 < match) {
+ here.op = (unsigned char)0;
+ here.val = work[sym];
+ }
+- else if ((int)(work[sym]) > end) {
+- here.op = (unsigned char)(extra[work[sym]]);
+- here.val = base[work[sym]];
++ else if (work[sym] >= match) {
++ here.op = (unsigned char)(extra[work[sym] - match]);
++ here.val = base[work[sym] - match];
+ }
+ else {
+ here.op = (unsigned char)(32 + 64); /* end of block */
diff --git a/meta/recipes-devtools/rsync/files/CVE-2016-9841.patch b/meta/recipes-devtools/rsync/files/CVE-2016-9841.patch
new file mode 100644
index 0000000000..3942176de5
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/CVE-2016-9841.patch
@@ -0,0 +1,228 @@
+From 9aaec95e82117c1cb0f9624264c3618fc380cecb Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Wed, 21 Sep 2016 22:25:21 -0700
+Subject: [PATCH] Use post-increment only in inffast.c.
+
+An old inffast.c optimization turns out to not be optimal anymore
+with modern compilers, and furthermore was not compliant with the
+C standard, for which decrementing a pointer before its allocated
+memory is undefined. Per the recommendation of a security audit of
+the zlib code by Trail of Bits and TrustInSoft, in support of the
+Mozilla Foundation, this "optimization" was removed, in order to
+avoid the possibility of undefined behavior.
+
+CVE: CVE-2016-9841
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ zlib/inffast.c | 81 +++++++++++++++++++++----------------------------------
+ 1 file changed, 31 insertions(+), 50 deletions(-)
+
+diff --git a/zlib/inffast.c b/zlib/inffast.c
+index bda59ceb..f0d163db 100644
+--- a/zlib/inffast.c
++++ b/zlib/inffast.c
+@@ -10,25 +10,6 @@
+
+ #ifndef ASMINF
+
+-/* Allow machine dependent optimization for post-increment or pre-increment.
+- Based on testing to date,
+- Pre-increment preferred for:
+- - PowerPC G3 (Adler)
+- - MIPS R5000 (Randers-Pehrson)
+- Post-increment preferred for:
+- - none
+- No measurable difference:
+- - Pentium III (Anderson)
+- - M68060 (Nikl)
+- */
+-#ifdef POSTINC
+-# define OFF 0
+-# define PUP(a) *(a)++
+-#else
+-# define OFF 1
+-# define PUP(a) *++(a)
+-#endif
+-
+ /*
+ Decode literal, length, and distance codes and write out the resulting
+ literal and match bytes until either not enough input or output is
+@@ -96,9 +77,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+
+ /* copy state to local variables */
+ state = (struct inflate_state FAR *)strm->state;
+- in = strm->next_in - OFF;
++ in = strm->next_in;
+ last = in + (strm->avail_in - 5);
+- out = strm->next_out - OFF;
++ out = strm->next_out;
+ beg = out - (start - strm->avail_out);
+ end = out + (strm->avail_out - 257);
+ #ifdef INFLATE_STRICT
+@@ -119,9 +100,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+ input data or output space */
+ do {
+ if (bits < 15) {
+- hold += (unsigned long)(PUP(in)) << bits;
++ hold += (unsigned long)(*in++) << bits;
+ bits += 8;
+- hold += (unsigned long)(PUP(in)) << bits;
++ hold += (unsigned long)(*in++) << bits;
+ bits += 8;
+ }
+ here = lcode[hold & lmask];
+@@ -134,14 +115,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+ "inflate: literal '%c'\n" :
+ "inflate: literal 0x%02x\n", here.val));
+- PUP(out) = (unsigned char)(here.val);
++ *out++ = (unsigned char)(here.val);
+ }
+ else if (op & 16) { /* length base */
+ len = (unsigned)(here.val);
+ op &= 15; /* number of extra bits */
+ if (op) {
+ if (bits < op) {
+- hold += (unsigned long)(PUP(in)) << bits;
++ hold += (unsigned long)(*in++) << bits;
+ bits += 8;
+ }
+ len += (unsigned)hold & ((1U << op) - 1);
+@@ -150,9 +131,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+ }
+ Tracevv((stderr, "inflate: length %u\n", len));
+ if (bits < 15) {
+- hold += (unsigned long)(PUP(in)) << bits;
++ hold += (unsigned long)(*in++) << bits;
+ bits += 8;
+- hold += (unsigned long)(PUP(in)) << bits;
++ hold += (unsigned long)(*in++) << bits;
+ bits += 8;
+ }
+ here = dcode[hold & dmask];
+@@ -165,10 +146,10 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+ dist = (unsigned)(here.val);
+ op &= 15; /* number of extra bits */
+ if (bits < op) {
+- hold += (unsigned long)(PUP(in)) << bits;
++ hold += (unsigned long)(*in++) << bits;
+ bits += 8;
+ if (bits < op) {
+- hold += (unsigned long)(PUP(in)) << bits;
++ hold += (unsigned long)(*in++) << bits;
+ bits += 8;
+ }
+ }
+@@ -196,30 +177,30 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+ #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ if (len <= op - whave) {
+ do {
+- PUP(out) = 0;
++ *out++ = 0;
+ } while (--len);
+ continue;
+ }
+ len -= op - whave;
+ do {
+- PUP(out) = 0;
++ *out++ = 0;
+ } while (--op > whave);
+ if (op == 0) {
+ from = out - dist;
+ do {
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ } while (--len);
+ continue;
+ }
+ #endif
+ }
+- from = window - OFF;
++ from = window;
+ if (wnext == 0) { /* very common case */
+ from += wsize - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+@@ -230,14 +211,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+ if (op < len) { /* some from end of window */
+ len -= op;
+ do {
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ } while (--op);
+- from = window - OFF;
++ from = window;
+ if (wnext < len) { /* some from start of window */
+ op = wnext;
+ len -= op;
+ do {
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+@@ -248,35 +229,35 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ while (len > 2) {
+- PUP(out) = PUP(from);
+- PUP(out) = PUP(from);
+- PUP(out) = PUP(from);
++ *out++ = *from++;
++ *out++ = *from++;
++ *out++ = *from++;
+ len -= 3;
+ }
+ if (len) {
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ if (len > 1)
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ }
+ }
+ else {
+ from = out - dist; /* copy direct from output */
+ do { /* minimum length is three */
+- PUP(out) = PUP(from);
+- PUP(out) = PUP(from);
+- PUP(out) = PUP(from);
++ *out++ = *from++;
++ *out++ = *from++;
++ *out++ = *from++;
+ len -= 3;
+ } while (len > 2);
+ if (len) {
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ if (len > 1)
+- PUP(out) = PUP(from);
++ *out++ = *from++;
+ }
+ }
+ }
+@@ -313,8 +294,8 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+ hold &= (1U << bits) - 1;
+
+ /* update state and return */
+- strm->next_in = in + OFF;
+- strm->next_out = out + OFF;
++ strm->next_in = in;
++ strm->next_out = out;
+ strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
+ strm->avail_out = (unsigned)(out < end ?
+ 257 + (end - out) : 257 - (out - end));
diff --git a/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch b/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch
new file mode 100644
index 0000000000..810d8a3fdb
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch
@@ -0,0 +1,33 @@
+From e54e1299404101a5a9d0cf5e45512b543967f958 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Sat, 5 Sep 2015 17:45:55 -0700
+Subject: [PATCH] Avoid shifts of negative values inflateMark().
+
+The C standard says that bit shifts of negative integers is
+undefined. This casts to unsigned values to assure a known
+result.
+
+CVE: CVE-2016-9842
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ inflate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/zlib/inflate.c b/zlib/inflate.c
+index 2889e3a0..a7184167 100644
+--- a/zlib/inflate.c
++++ b/zlib/inflate.c
+@@ -1506,9 +1506,10 @@ z_streamp strm;
+ {
+ struct inflate_state FAR *state;
+
+- if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
++ if (strm == Z_NULL || strm->state == Z_NULL)
++ return (long)(((unsigned long)0 - 1) << 16);
+ state = (struct inflate_state FAR *)strm->state;
+- return ((long)(state->back) << 16) +
++ return (long)(((unsigned long)((long)state->back)) << 16) +
+ (state->mode == COPY ? state->length :
+ (state->mode == MATCH ? state->was - state->length : 0));
+ }
diff --git a/meta/recipes-devtools/rsync/files/CVE-2016-9843.patch b/meta/recipes-devtools/rsync/files/CVE-2016-9843.patch
new file mode 100644
index 0000000000..ea2e42fe76
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/CVE-2016-9843.patch
@@ -0,0 +1,53 @@
+From d1d577490c15a0c6862473d7576352a9f18ef811 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Wed, 28 Sep 2016 20:20:25 -0700
+Subject: [PATCH] Avoid pre-decrement of pointer in big-endian CRC calculation.
+
+There was a small optimization for PowerPCs to pre-increment a
+pointer when accessing a word, instead of post-incrementing. This
+required prefacing the loop with a decrement of the pointer,
+possibly pointing before the object passed. This is not compliant
+with the C standard, for which decrementing a pointer before its
+allocated memory is undefined. When tested on a modern PowerPC
+with a modern compiler, the optimization no longer has any effect.
+Due to all that, and per the recommendation of a security audit of
+the zlib code by Trail of Bits and TrustInSoft, in support of the
+Mozilla Foundation, this "optimization" was removed, in order to
+avoid the possibility of undefined behavior.
+
+CVE: CVE-2016-9843
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ crc32.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/zlib/crc32.c b/zlib/crc32.c
+index 979a7190..05733f4e 100644
+--- a/zlib/crc32.c
++++ b/zlib/crc32.c
+@@ -278,7 +278,7 @@ local unsigned long crc32_little(crc, buf, len)
+ }
+
+ /* ========================================================================= */
+-#define DOBIG4 c ^= *++buf4; \
++#define DOBIG4 c ^= *buf4++; \
+ c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
+ crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
+ #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
+@@ -300,7 +300,6 @@ local unsigned long crc32_big(crc, buf, len)
+ }
+
+ buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
+- buf4--;
+ while (len >= 32) {
+ DOBIG32;
+ len -= 32;
+@@ -309,7 +308,6 @@ local unsigned long crc32_big(crc, buf, len)
+ DOBIG4;
+ len -= 4;
+ }
+- buf4++;
+ buf = (const unsigned char FAR *)buf4;
+
+ if (len) do {
diff --git a/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch b/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch
deleted file mode 100644
index bea325ea05..0000000000
--- a/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Upstream-Status: Backport [ The patch is rsync-2.6.9 specific ]
-CVE: CVE-2007-4091
-
-The patch is from https://issues.rpath.com/browse/RPL-1647 and is used to
-address http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-4091
-
-Date: Tue May 10 10:07:36 2011 +0800
-Dexuan Cui <dexuan.cui@intel.com>
-
-diff --git a/sender.c b/sender.c
-index 6fcaa65..053a8f1 100644
---- a/sender.c
-+++ b/sender.c
-@@ -123,6 +123,7 @@ void successful_send(int ndx)
- char fname[MAXPATHLEN];
- struct file_struct *file;
- unsigned int offset;
-+ size_t l = 0;
-
- if (ndx < 0 || ndx >= the_file_list->count)
- return;
-@@ -133,6 +134,20 @@ void successful_send(int ndx)
- file->dir.root, "/", NULL);
- } else
- offset = 0;
-+
-+ l = offset + 1;
-+ if (file) {
-+ if (file->dirname)
-+ l += strlen(file->dirname);
-+ if (file->basename)
-+ l += strlen(file->basename);
-+ }
-+
-+ if (l >= sizeof(fname)) {
-+ rprintf(FERROR, "Overlong pathname\n");
-+ exit_cleanup(RERR_FILESELECT);
-+ }
-+
- f_name(file, fname + offset);
- if (remove_source_files) {
- if (do_unlink(fname) == 0) {
-@@ -224,6 +239,7 @@ void send_files(struct file_list *flist, int f_out, int f_in)
- enum logcode log_code = log_before_transfer ? FLOG : FINFO;
- int f_xfer = write_batch < 0 ? batch_fd : f_out;
- int i, j;
-+ size_t l = 0;
-
- if (verbose > 2)
- rprintf(FINFO, "send_files starting\n");
-@@ -259,6 +275,20 @@ void send_files(struct file_list *flist, int f_out, int f_in)
- fname[offset++] = '/';
- } else
- offset = 0;
-+
-+ l = offset + 1;
-+ if (file) {
-+ if (file->dirname)
-+ l += strlen(file->dirname);
-+ if (file->basename)
-+ l += strlen(file->basename);
-+ }
-+
-+ if (l >= sizeof(fname)) {
-+ rprintf(FERROR, "Overlong pathname\n");
-+ exit_cleanup(RERR_FILESELECT);
-+ }
-+
- fname2 = f_name(file, fname + offset);
-
- if (verbose > 2)
diff --git a/meta/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf b/meta/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf
deleted file mode 100644
index 845f5b33f5..0000000000
--- a/meta/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-# /etc/rsyncd.conf
-
-# Minimal configuration file for rsync daemon
-# See rsync(1) and rsyncd.conf(5) man pages for help
-
-# This file is required by rsync --daemon
-pid file = /var/run/rsyncd.pid
-use chroot = yes
-read only = yes
-
-# Simple example for enabling your own local rsync server
-#[everything]
-# path = /
-# comment = Everything except /etc exposed
-# exclude = /etc
diff --git a/meta/recipes-devtools/rsync/rsync.inc b/meta/recipes-devtools/rsync/rsync.inc
deleted file mode 100644
index 37897aba80..0000000000
--- a/meta/recipes-devtools/rsync/rsync.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "File synchronization tool"
-HOMEPAGE = "http://rsync.samba.org/"
-BUGTRACKER = "http://rsync.samba.org/bugzilla.html"
-SECTION = "console/network"
-
-DEPENDS = "popt"
-
-SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \
- file://rsyncd.conf"
-
-inherit autotools
-
-do_install_append() {
- install -d ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/rsyncd.conf ${D}${sysconfdir}
-}
-
-EXTRA_OEMAKE='STRIP=""'
-
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-devtools/rsync/rsync_2.6.9.bb b/meta/recipes-devtools/rsync/rsync_2.6.9.bb
deleted file mode 100644
index efdf255a07..0000000000
--- a/meta/recipes-devtools/rsync/rsync_2.6.9.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require rsync.inc
-
-SRC_URI += "file://rsync-2.6.9-fname-obo.patch \
- file://rsyncd.conf \
-"
-
-SRC_URI[md5sum] = "996d8d8831dbca17910094e56dcb5942"
-SRC_URI[sha256sum] = "ca437301becd890e73300bc69a39189ff1564baa761948ff149b3dd7bde633f9"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6d5a9d4c4d3af25cd68fd83e8a8cb09c"
-
-PR = "r4"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/meta/recipes-devtools/rsync/rsync_3.1.2.bb
deleted file mode 100644
index c6cb3310fc..0000000000
--- a/meta/recipes-devtools/rsync/rsync_3.1.2.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-require rsync.inc
-
-SRC_URI += "file://makefile-no-rebuild.patch"
-
-SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb"
-SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2"
-
-# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-PACKAGECONFIG ??= "acl attr \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-"
-PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
-PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
-
-# By default, if crosscompiling, rsync disables a number of
-# capabilities, hardlinking symlinks and special files (i.e. devices)
-CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes"
-
-# rsync 3.0 uses configure.sh instead of configure, and
-# makefile checks the existence of configure.sh
-do_configure_prepend () {
- rm -f ${S}/configure ${S}/configure.sh
-}
-
-do_configure_append () {
- cp -f ${S}/configure ${S}/configure.sh
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.3.bb b/meta/recipes-devtools/rsync/rsync_3.1.3.bb
new file mode 100644
index 0000000000..ffb1d061c0
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync_3.1.3.bb
@@ -0,0 +1,54 @@
+SUMMARY = "File synchronization tool"
+HOMEPAGE = "http://rsync.samba.org/"
+BUGTRACKER = "http://rsync.samba.org/bugzilla.html"
+SECTION = "console/network"
+# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "popt"
+
+SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
+ file://rsyncd.conf \
+ file://makefile-no-rebuild.patch \
+ file://CVE-2016-9840.patch \
+ file://CVE-2016-9841.patch \
+ file://CVE-2016-9842.patch \
+ file://CVE-2016-9843.patch \
+"
+
+SRC_URI[md5sum] = "1581a588fde9d89f6bc6201e8129afaf"
+SRC_URI[sha256sum] = "55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0"
+
+inherit autotools
+
+PACKAGECONFIG ??= "acl attr \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+
+PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
+PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# By default, if crosscompiling, rsync disables a number of
+# capabilities, hardlinking symlinks and special files (i.e. devices)
+CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes"
+
+EXTRA_OEMAKE = 'STRIP=""'
+
+# rsync 3.0 uses configure.sh instead of configure, and
+# makefile checks the existence of configure.sh
+do_configure_prepend () {
+ rm -f ${S}/configure ${S}/configure.sh
+}
+
+do_configure_append () {
+ cp -f ${S}/configure ${S}/configure.sh
+}
+
+do_install_append() {
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/rsyncd.conf ${D}${sysconfdir}
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc
index fde67e9407..ce1b02f012 100644
--- a/meta/recipes-devtools/ruby/ruby.inc
+++ b/meta/recipes-devtools/ruby/ruby.inc
@@ -6,24 +6,25 @@ It is simple, straight-forward, and extensible. \
"
HOMEPAGE = "http://www.ruby-lang.org/"
SECTION = "devel/ruby"
-LICENSE = "Ruby | BSD | GPLv2"
+LICENSE = "Ruby | BSD-2-Clause | BSD-3-Clause | GPLv2 | ISC | MIT"
LIC_FILES_CHKSUM = "\
- file://COPYING;md5=837b32593517ae48b9c3b5c87a5d288c \
+ file://COPYING;md5=340948e1882e579731841bf49cdc22c1 \
file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\
file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\
- file://LEGAL;md5=c440adb575ba4e6e2344c2630b6a5584\
+ file://LEGAL;md5=4ac0b84d1f7f420bca282e1adefc7f99 \
"
-DEPENDS = "ruby-native zlib openssl tcl libyaml db gdbm readline"
-DEPENDS_class-native = "openssl-native libyaml-native"
+DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline libffi"
+DEPENDS_class-native = "openssl-native libyaml-native readline-native zlib-native"
SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
- file://extmk.patch \
+ file://0001-extmk-fix-cross-compilation-of-external-gems.patch \
file://0002-Obey-LDFLAGS-for-the-link-of-libruby.patch \
"
+UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
-inherit autotools
+inherit autotools ptest
# This snippet lets compiled extensions which rely on external libraries,
@@ -34,6 +35,6 @@ inherit autotools
# built.
do_configure_prepend() {
- sed -i "s#%%TARGET_CFLAGS%%#$TARGET_CFLAGS#; s#%%TARGET_LDFLAGS%%#$TARGET_LDFLAGS#" ${S}/common.mk
+ sed -i "s#%%TARGET_CFLAGS%%#$CFLAGS#; s#%%TARGET_LDFLAGS%%#$LDFLAGS#" ${S}/common.mk
rm -rf ${S}/ruby/
}
diff --git a/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch b/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch
new file mode 100644
index 0000000000..2e3156880e
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch
@@ -0,0 +1,34 @@
+From a6e12b25a54d112c899b70c89c0bec9c5e5ebf3c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Mon, 30 Sep 2019 16:57:01 +0100
+Subject: [PATCH 1/3] extmk: fix cross-compilation of external gems
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Note that I (André) didn't actually write this patch, I
+only updated it so that git-am works.
+
+Upstream-Status: Pending
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ ext/extmk.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/extmk.rb b/ext/extmk.rb
+index 1389dc4117..e4d923d7a7 100755
+--- a/ext/extmk.rb
++++ b/ext/extmk.rb
+@@ -413,8 +413,8 @@ def $mflags.defined?(var)
+ end
+ $ruby = [$ruby]
+ $ruby << "-I'$(topdir)'"
++$ruby << "-I'$(top_srcdir)/lib'"
+ unless CROSS_COMPILING
+- $ruby << "-I'$(top_srcdir)/lib'"
+ $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout
+ ENV["RUBYLIB"] = "-"
+ end
+--
+2.23.0.rc1
+
diff --git a/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
index b0114ba28b..5979d8bd73 100644
--- a/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
+++ b/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
@@ -1,28 +1,27 @@
-Upstream-Status: Pending
-
-From 306e95a9818d39d3349075aac9609e062b0f19ce Mon Sep 17 00:00:00 2001
+From 6d608326970b1613633d7715ebb7d628dfcd16ee Mon Sep 17 00:00:00 2001
From: Christopher Larson <chris_larson@mentor.com>
Date: Thu, 5 May 2016 10:59:07 -0700
-Subject: [PATCH 2/2] Obey LDFLAGS for the link of libruby
+Subject: [PATCH 2/3] Obey LDFLAGS for the link of libruby
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-Status: Pending
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
-index 7da2488..5b4aea1 100644
+index fa1e19ef37..bbd07fa34b 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -75,7 +75,7 @@ EXTLIBS =
- LIBS = @LIBS@ $(EXTLIBS)
- MISSING = @LIBOBJS@ @ALLOCA@
+@@ -109,7 +109,7 @@ MISSING = @LIBOBJS@ @ALLOCA@
+ ENABLE_SHARED = @ENABLE_SHARED@
LDSHARED = @LIBRUBY_LDSHARED@
+ DLDSHARED = @DLDSHARED@
-DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
+DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
SOLIBS = @SOLIBS@
+ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@
MAINLIBS = @MAINLIBS@
- ARCHMINIOBJS = @MINIOBJS@
--
-2.8.0
+2.23.0.rc1
diff --git a/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch b/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
new file mode 100644
index 0000000000..1a8cff3e8c
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
@@ -0,0 +1,103 @@
+From bd71b698bf733e6e93282cd2b1b93f51e1a33c7c Mon Sep 17 00:00:00 2001
+From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
+Date: Fri, 8 Feb 2019 07:22:55 +0000
+Subject: [PATCH 3/3] configure.ac: check finite,isinf,isnan as macros first
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[ruby-core:91487] [Bug #15595]
+
+git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
+
+---
+Upstream-Status: Backport [https://github.com/ruby/ruby/commit/74f94b3e6ebf15b76f3b357e754095412b006e94]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ aclocal.m4 | 1 +
+ configure.ac | 13 ++++---------
+ tool/m4/ruby_replace_funcs.m4 | 13 +++++++++++++
+ 3 files changed, 18 insertions(+), 9 deletions(-)
+ create mode 100644 tool/m4/ruby_replace_funcs.m4
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index b0fe3eb959..ed7d14ef63 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -35,6 +35,7 @@ m4_include([tool/m4/ruby_func_attribute.m4])
+ m4_include([tool/m4/ruby_mingw32.m4])
+ m4_include([tool/m4/ruby_prepend_option.m4])
+ m4_include([tool/m4/ruby_prog_gnu_ld.m4])
++m4_include([tool/m4/ruby_replace_funcs.m4])
+ m4_include([tool/m4/ruby_replace_type.m4])
+ m4_include([tool/m4/ruby_rm_recursive.m4])
+ m4_include([tool/m4/ruby_setjmp_type.m4])
+diff --git a/configure.ac b/configure.ac
+index 2c4d2888d2..2691da6a3c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -946,9 +946,6 @@ main()
+ ac_cv_func_fsync=yes
+ ac_cv_func_seekdir=yes
+ ac_cv_func_telldir=yes
+- ac_cv_func_isinf=yes
+- ac_cv_func_isnan=yes
+- ac_cv_func_finite=yes
+ ac_cv_func_lchown=yes
+ ac_cv_func_link=yes
+ ac_cv_func_readlink=yes
+@@ -999,9 +996,6 @@ main()
+ [netbsd*], [ LIBS="-lm $LIBS"
+ ],
+ [dragonfly*], [ LIBS="-lm $LIBS"
+- # isinf() and isnan() are macros on DragonFly.
+- ac_cv_func_isinf=yes
+- ac_cv_func_isnan=yes
+ ],
+ [aix*],[ LIBS="-lm $LIBS"
+ ac_cv_func_round=no
+@@ -1724,11 +1718,8 @@ AC_REPLACE_FUNCS(dup2)
+ AC_REPLACE_FUNCS(erf)
+ AC_REPLACE_FUNCS(explicit_bzero)
+ AC_REPLACE_FUNCS(ffs)
+-AC_REPLACE_FUNCS(finite)
+ AC_REPLACE_FUNCS(flock)
+ AC_REPLACE_FUNCS(hypot)
+-AC_REPLACE_FUNCS(isinf)
+-AC_REPLACE_FUNCS(isnan)
+ AC_REPLACE_FUNCS(lgamma_r)
+ AC_REPLACE_FUNCS(memmove)
+ AC_REPLACE_FUNCS(nan)
+@@ -1741,6 +1732,10 @@ AC_REPLACE_FUNCS(strlcpy)
+ AC_REPLACE_FUNCS(strstr)
+ AC_REPLACE_FUNCS(tgamma)
+
++RUBY_REPLACE_FUNC([finite], [@%:@include <math.h>])
++RUBY_REPLACE_FUNC([isinf], [@%:@include <math.h>])
++RUBY_REPLACE_FUNC([isnan], [@%:@include <math.h>])
++
+ # for missing/setproctitle.c
+ AS_CASE(["$target_os"],
+ [aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)],
+diff --git a/tool/m4/ruby_replace_funcs.m4 b/tool/m4/ruby_replace_funcs.m4
+new file mode 100644
+index 0000000000..d0612e29a0
+--- /dev/null
++++ b/tool/m4/ruby_replace_funcs.m4
+@@ -0,0 +1,13 @@
++# -*- Autoconf -*-
++dnl RUBY_REPLACE_FUNC [func] [included]
++AC_DEFUN([RUBY_REPLACE_FUNC], [dnl
++ AC_CHECK_DECL([$1],dnl
++ [AC_DEFINE(AS_TR_CPP(HAVE_[$1]))],dnl
++ [AC_REPLACE_FUNCS($1)],dnl
++ [$2])dnl
++])
++
++dnl RUBY_REPLACE_FUNCS [funcs] [included]
++AC_DEFUN([RUBY_REPLACE_FUNCS] [dnl
++ m4_map_args_w([$1], [RUBY_REPLACE_FUNC(], [), [$2]])dnl
++])
+--
+2.23.0.rc1
+
diff --git a/meta/recipes-devtools/ruby/ruby/extmk.patch b/meta/recipes-devtools/ruby/ruby/extmk.patch
deleted file mode 100644
index 8b68450341..0000000000
--- a/meta/recipes-devtools/ruby/ruby/extmk.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ru ruby-1.8.7-p248.orig/ext/extmk.rb ruby-1.8.7-p248/ext/extmk.rb
---- ruby-1.8.7-p248.orig/ext/extmk.rb 2009-12-24 03:01:58.000000000 -0600
-+++ ruby-1.8.7-p248/ext/extmk.rb 2010-02-12 15:55:27.370061558 -0600
-@@ -354,8 +354,8 @@
- $ruby = '$(topdir)/miniruby' + EXEEXT
- end
- $ruby << " -I'$(topdir)'"
-+$ruby << " -I'$(top_srcdir)/lib'"
- unless CROSS_COMPILING
-- $ruby << " -I'$(top_srcdir)/lib'"
- $ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
- $ruby << " -I./- -I'$(top_srcdir)/ext' -rpurelib.rb"
- ENV["RUBYLIB"] = "-"
diff --git a/meta/recipes-devtools/ruby/ruby/run-ptest b/meta/recipes-devtools/ruby/ruby/run-ptest
new file mode 100644
index 0000000000..de7c415aba
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/run-ptest
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+test_fullname=`find test -name test_*.rb`
+
+for i in ${test_fullname}; do
+ ruby ./test/runner.rb ${i} 2>&1 > /dev/null
+ ret=$?
+ if [ $ret != 0 ]; then
+ echo "FAIL: ${i}"
+ else
+ echo "PASS: ${i}"
+ fi
+done
diff --git a/meta/recipes-devtools/ruby/ruby_2.2.5.bb b/meta/recipes-devtools/ruby/ruby_2.2.5.bb
deleted file mode 100644
index 5a645821ba..0000000000
--- a/meta/recipes-devtools/ruby/ruby_2.2.5.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-require ruby.inc
-
-SRC_URI[md5sum] = "bd8e349d4fb2c75d90817649674f94be"
-SRC_URI[sha256sum] = "30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03ca335e3"
-
-# it's unknown to configure script, but then passed to extconf.rb
-# maybe it's not really needed as we're hardcoding the result with
-# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
-UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-
-PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
-PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp"
-PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
-
-EXTRA_OECONF = "\
- --disable-versioned-paths \
- --disable-rpath \
- --disable-dtrace \
- --enable-shared \
- --enable-load-relative \
-"
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
-
-PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
-
-SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
-RDEPENDS_${PN}-ri-docs = "${PN}"
-FILES_${PN}-ri-docs += "${datadir}/ri"
-
-SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
-RDEPENDS_${PN}-rdoc = "${PN}"
-FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
-
-FILES_${PN} += "${datadir}/rubygems"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/ruby/ruby_2.6.5.bb b/meta/recipes-devtools/ruby/ruby_2.6.5.bb
new file mode 100644
index 0000000000..1828f65d51
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby_2.6.5.bb
@@ -0,0 +1,77 @@
+require ruby.inc
+
+SRC_URI += " \
+ file://0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "8754bfb36d52c2bf1fb3d3ddc7101606"
+SRC_URI[sha256sum] = "66976b716ecc1fd34f9b7c3c2b07bbd37631815377a2e3e85a5b194cfdcbed7d"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
+PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
+PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6,"
+
+EXTRA_OECONF = "\
+ --disable-versioned-paths \
+ --disable-rpath \
+ --disable-dtrace \
+ --enable-shared \
+ --enable-load-relative \
+ --with-pkg-config=pkg-config \
+"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+do_install_append_class-target () {
+ # Find out rbconfig.rb from .installed.list
+ rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list`
+ # Remove build host directories
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+ -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${D}$rbconfig_rb
+}
+
+do_install_ptest () {
+ cp -rf ${S}/test ${D}${PTEST_PATH}/
+ # install test-binaries
+ find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \
+ | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \
+ | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf -
+ # adjust path to not assume build directory layout
+ sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \
+ -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb
+
+ cp -r ${S}/include ${D}/${libdir}/ruby/
+ test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list`
+ sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb
+}
+
+PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
+
+SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
+RDEPENDS_${PN}-ri-docs = "${PN}"
+FILES_${PN}-ri-docs += "${datadir}/ri"
+
+SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
+RDEPENDS_${PN}-rdoc = "${PN}"
+FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
+
+FILES_${PN} += "${datadir}/rubygems"
+
+FILES_${PN}-ptest_append_class-target = "\
+ ${libdir}/ruby/include \
+ ${libdir}/ruby/${SHRT_VER}.0/*/-test- \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 04ba3941bc..f84a7e18c8 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -6,7 +6,8 @@
#
# The following script will run all the scriptlets found in #SYSCONFDIR#/deb-postinsts,
-# #SYSCONFDIR#/ipk-postinsts or #SYSCONFDIR#/rpm-postinsts.
+# #SYSCONFDIR#/ipk-postinsts or #SYSCONFDIR#/rpm-postinsts or the package manager in
+# case available.
# the order of this list is important, do not change!
backend_list="rpm deb ipk"
@@ -14,10 +15,7 @@ backend_list="rpm deb ipk"
pm_installed=false
for pm in $backend_list; do
- pi_dir="#SYSCONFDIR#/$pm-postinsts"
-
- [ -d $pi_dir ] && break
-
+ # found the package manager, it has postinsts
case $pm in
"deb")
if [ -s "#LOCALSTATEDIR#/lib/dpkg/status" ]; then
@@ -27,12 +25,19 @@ for pm in $backend_list; do
;;
"ipk")
- if [ -s "/var/lib/opkg/status" ]; then
+ if [ -s "#LOCALSTATEDIR#/lib/opkg/status" ]; then
pm_installed=true
break
fi
;;
esac
+
+ pi_dir="#SYSCONFDIR#/$pm-postinsts"
+
+ # found postinsts directory
+ if [ -d $pi_dir ]; then
+ break
+ fi
done
remove_rcsd_link () {
@@ -41,11 +46,14 @@ remove_rcsd_link () {
fi
}
-if [ -z "$pi_dir" ]; then
+if ! [ -d $pi_dir ] && ! $pm_installed; then
remove_rcsd_link
exit 0
fi
+echo "Configuring packages on first boot...."
+echo " (This may take several minutes. Please do not power off the machine.)"
+
[ -e #SYSCONFDIR#/default/postinst ] && . #SYSCONFDIR#/default/postinst
if [ "$POSTINST_LOGGING" = "1" ]; then
@@ -59,7 +67,7 @@ exec_postinst_scriptlets() {
echo "Running postinst $i..."
[ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log
if [ -x $i ]; then
- eval sh -c $i $append_log
+ (sh -c $i $append_log)
rm $i
else
echo "ERROR: postinst $i failed."
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
index 85a043949e..d42addf510 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
@@ -3,12 +3,11 @@ Description=Run pending postinsts
DefaultDependencies=no
After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
Before=sysinit.target
-ConditionPathExistsGlob=#SYSCONFDIR#/*-postinsts
[Service]
Type=oneshot
ExecStart=#SBINDIR#/run-postinsts
-ExecStartPost=#BASE_BINDIR#/systemctl disable run-postinsts.service
+ExecStartPost=#BASE_BINDIR#/systemctl --no-reload disable run-postinsts.service
RemainAfterExit=No
TimeoutSec=0
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 11c94e57d8..85b3fc867e 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -1,9 +1,8 @@
SUMMARY = "Runs postinstall scripts on first boot of the target device"
SECTION = "devel"
-PR = "r9"
+PR = "r10"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://run-postinsts \
file://run-postinsts.init \
diff --git a/meta/recipes-devtools/sgml-common/sgml-common-0.6.3/autohell.patch b/meta/recipes-devtools/sgml-common/sgml-common-0.6.3/autohell.patch
deleted file mode 100644
index 1f39b03300..0000000000
--- a/meta/recipes-devtools/sgml-common/sgml-common-0.6.3/autohell.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Patch obtained from OpenEmbedded.
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- sgml-common-0.6.3/bin/Makefile.am~autohell.patch 2001-01-30 15:42:21.000000000 +0100
-+++ sgml-common-0.6.3/bin/Makefile.am 2004-06-17 11:51:11.000000000 +0200
-@@ -1,6 +1,5 @@
- primitive_scripts = sgmlwhich
-
--bindir = $(prefix)/bin
- bin_SCRIPTS = install-catalog $(primitive_scripts)
-
- EXTRA_DIST = install-catalog.in $(primitive_scripts)
---- /dev/null 2003-09-23 19:59:22.000000000 +0200
-+++ sgml-common-0.6.3/bin/sgmlwhich.in 2004-06-17 11:51:11.000000000 +0200
-@@ -0,0 +1,7 @@
-+#!/bin/sh
-+# Location of the main configuration file for consistency with non-LSB platforms
-+# Send any comments to Eric Bischoff <eric@caldera.de>
-+# This program is under GPL license. See LICENSE file for details.
-+
-+echo "@sysconfdir@/sgml/sgml.conf"
-+# Simple, isn't it? ;-)
---- /dev/null 2003-09-23 19:59:22.000000000 +0200
-+++ sgml-common-0.6.3/config/sgml.conf.in 2004-06-17 11:51:11.000000000 +0200
-@@ -0,0 +1,2 @@
-+SGML_BASE_DIR=@datadir@/sgml
-+SGML_CATALOGS_DIR=@sysconfdir@/sgml
---- sgml-common-0.6.3/configure.in~autohell.patch 2001-05-25 18:40:54.000000000 +0200
-+++ sgml-common-0.6.3/configure.in 2004-06-17 11:53:22.000000000 +0200
-@@ -3,11 +3,6 @@
-
- AM_INIT_AUTOMAKE(sgml-common, 0.6.3)
-
--docdir='$(prefix)/doc'
--AC_SUBST(docdir)
--
--dnl Checks for programs.
--
- dnl Checks for libraries.
-
- dnl Checks for header files.
-@@ -18,6 +13,5 @@
-
- AC_OUTPUT(Makefile \
- bin/Makefile bin/install-catalog \
-- config/Makefile \
-- doc/Makefile doc/HTML/Makefile doc/man/Makefile doc/refentry/Makefile \
-+ config/Makefile config/sgml.conf bin/sgmlwhich \
- sgml-iso-entities/Makefile xml-iso-entities/Makefile)
-
---- sgml-common-0.6.3/Makefile.am~no-docs 2001-05-25 18:22:01.000000000 +0200
-+++ sgml-common-0.6.3/Makefile.am 2004-06-17 11:49:09.000000000 +0200
-@@ -1,4 +1,4 @@
--SUBDIRS = bin config doc sgml-iso-entities xml-iso-entities
-+SUBDIRS = bin config sgml-iso-entities xml-iso-entities
-
- sgmlcodir = $(prefix)/share/sgml
- sgmlco_DATA = xml.dcl
diff --git a/meta/recipes-devtools/sgml-common/sgml-common-0.6.3/license.patch b/meta/recipes-devtools/sgml-common/sgml-common-0.6.3/license.patch
deleted file mode 100644
index 54b3f54494..0000000000
--- a/meta/recipes-devtools/sgml-common/sgml-common-0.6.3/license.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-The COPYING file sgml-common ships with is just a symlink to
-/usr/share/automake/COPYING, which means we can't verify it
-using our normal means. We workaround this by using this patch
-to create our own license file.
-
-Upstream was notified about this on 2011-01-24. When upgrading
-this recipe, this should be fixed and you should remove this
-patch.
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -urN sgml-common-0.6.3.orig/LICENSE-GPLv2 sgml-common-0.6.3/LICENSE-GPLv2
---- sgml-common-0.6.3.orig/LICENSE-GPLv2 1969-12-31 16:00:00.000000000 -0800
-+++ sgml-common-0.6.3/LICENSE-GPLv2 2011-01-28 17:05:17.299528001 -0800
-@@ -0,0 +1,12 @@
-+Copyright (C) 1997 Christian Schwarz <schwarz@debian.org>.
-+Copyright (C) 2001-2004 Ardo van Rangelrooij <ardo@debian.org>
-+
-+This is free software; you may redistribute it and/or modify it under
-+the terms of the GNU General Public License as published by the Free
-+Software Foundation; either version 2, or (at your option) any later
-+version.
-+
-+This 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.
diff --git a/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb b/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb
deleted file mode 100644
index 97b308a88b..0000000000
--- a/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb
+++ /dev/null
@@ -1,70 +0,0 @@
-SUMMARY = "Base utilities for working with SGML and XML"
-DESCRIPTION = "The sgml-common package gathers very basic \
-stuff necessary to work with SGML and XML, such as xml.dcl, \
-a SGML declaration of XML; iso-entities, a list of the basic \
-SGML ISO entities; and install-catalog, a script used to \
-add entries to (or remove entries from) centralized catalogs \
-whose entries are pointers to SGML open catalogs, \
-as defined by OASIS."
-HOMEPAGE = "http://sources.redhat.com/docbook-tools/"
-LICENSE = "GPLv2+"
-# See the comments in license.patch when upgrading this recipe.
-# This is inteded to be a temporary workaround.
-LIC_FILES_CHKSUM = "file://LICENSE-GPLv2;md5=ab8a50abe86dfc859e148baae043c89b"
-SECTION = "base"
-
-PR = "r1"
-
-require sgml-common_${PV}.bb
-inherit native
-
-S = "${WORKDIR}/sgml-common-${PV}"
-
-SYSROOT_PREPROCESS_FUNCS += "sgml_common_native_mangle"
-SSTATEPOSTINSTFUNCS += "sgml_common_sstate_postinst"
-
-do_install_append() {
- # install-catalog script contains hard-coded references to
- # {sysconfdir}. Change it to ${D}${sysconfdir}.
- sed -i -e "s|${sysconfdir}/sgml|${D}${sysconfdir}/sgml|g" ${D}${bindir}/install-catalog
-
- ${D}${bindir}/install-catalog \
- --add ${D}${sysconfdir}/sgml/sgml-ent.cat \
- ${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
-
- # The sgml-docbook.cat will be regenerated by sstate_postinst
- rm -f ${D}${sysconfdir}/sgml/sgml-docbook.cat
-}
-
-sgml_common_native_mangle () {
- # Revert back to ${sysconfdir} path in install-catalog
- sed -i -e "s|${D}${sysconfdir}/sgml|${sysconfdir}/sgml|g" ${SYSROOT_DESTDIR}${STAGING_BINDIR}/install-catalog
- # Change path from ${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog to ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog in sgml-ent.cat
- sed -i -e "s|${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog|${datadir}/sgml/sgml-iso-entities-8879.1986/catalog|g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/sgml-ent.cat
- # Remove ${D} path from catalog file created by install-catalog script
- sed -i -e "s|${D}||g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/catalog
-}
-
-sgml_common_sstate_postinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- ${bindir}/install-catalog --add ${sysconfdir}/sgml/sgml-docbook.cat ${sysconfdir}/sgml/sgml-ent.cat
- if [ -e ${sysconfdir}/sgml/sgml-docbook.bak ]; then
- for catalog in `awk '{print $2}' ${sysconfdir}/sgml/sgml-docbook.bak`; do
- if [ ! `grep $catalog ${sysconfdir}/sgml/sgml-docbook.cat 1> /dev/null 2>&1` ]; then
- ${bindir}/install-catalog \
- --add ${sysconfdir}/sgml/sgml-docbook.cat $catalog
- fi
- done
- fi
- cat << EOF > ${SSTATE_INST_POSTRM}
-#!/bin/sh
-
-# Ensure that the catalog file sgml-docbook.cat is properly
-# updated when the package is removed from sstate cache.
-if [ -f ${sysconfdir}/sgml/sgml-docbook.cat ]; then
- sed -i '/\/sgml\/sgml-ent.cat/d' ${sysconfdir}/sgml/sgml-docbook.cat
-fi
-EOF
- fi
-}
diff --git a/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb b/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
deleted file mode 100644
index 6098673a35..0000000000
--- a/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
+++ /dev/null
@@ -1,68 +0,0 @@
-SUMMARY = "Base utilities for working with SGML and XML"
-DESCRIPTION = "The sgml-common package gathers very basic \
-stuff necessary to work with SGML and XML, such as xml.dcl, \
-a SGML declaration of XML; iso-entities, a list of the basic \
-SGML ISO entities; and install-catalog, a script used to \
-add entries to (or remove entries from) centralized catalogs \
-whose entries are pointers to SGML open catalogs, \
-as defined by OASIS."
-HOMEPAGE = "http://sources.redhat.com/docbook-tools/"
-LICENSE = "GPLv2+"
-# See the comments in license.patch when upgrading this recipe.
-# This is inteded to be a temporary workaround.
-LIC_FILES_CHKSUM = "file://LICENSE-GPLv2;md5=ab8a50abe86dfc859e148baae043c89b"
-SECTION = "base"
-
-PR = "r1"
-
-SRC_URI = "ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/sgml-common-${PV}.tgz \
- file://autohell.patch \
- file://license.patch"
-
-SRC_URI[md5sum] = "103c9828f24820df86e55e7862e28974"
-SRC_URI[sha256sum] = "7dc418c1d361123ffc5e45d61f1b97257940a8eb35d0bfbbc493381cc5b1f959"
-
-inherit autotools
-
-do_compile_append() {
- # install-catalog script contains hardcoded references to /etc/sgml
- sed -i -e 's|\([ "]\+\)/etc/sgml|\1${sysconfdir}/sgml|g' bin/install-catalog
-}
-
-FILES_${PN} += "${datadir}/sgml"
-
-pkg_postinst_${PN}() {
- if [ "x$D" = "x" ]; then
- install-catalog \
- --add ${sysconfdir}/sgml/sgml-ent.cat \
- ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
-
- install-catalog \
- --add ${sysconfdir}/sgml/sgml-docbook.cat \
- ${sysconfdir}/sgml/sgml-ent.cat
- else
- if ! grep -q ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog $D${sysconfdir}/sgml/sgml-ent.cat; then
- echo "CATALOG ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog" >> $D${sysconfdir}/sgml/sgml-ent.cat
- fi
- if ! grep -q ${sysconfdir}/sgml/sgml-ent.cat $D${sysconfdir}/sgml/catalog; then
- echo "CATALOG ${sysconfdir}/sgml/sgml-ent.cat" >> $D${sysconfdir}/sgml/catalog
- fi
-
- if ! grep -q ${sysconfdir}/sgml/sgml-ent.cat $D${sysconfdir}/sgml/sgml-docbook.cat; then
- echo "CATALOG ${sysconfdir}/sgml/sgml-ent.cat" >> $D${sysconfdir}/sgml/sgml-docbook.cat
- fi
- if ! grep -q ${sysconfdir}/sgml/sgml-docbook.cat $D${sysconfdir}/sgml/catalog; then
- echo "CATALOG ${sysconfdir}/sgml/sgml-docbook.cat" >> $D${sysconfdir}/sgml/catalog
- fi
- fi
-}
-
-pkg_postrm_${PN}() {
- install-catalog \
- --remove ${sysconfdir}/sgml/sgml-ent.cat \
- ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
-
- install-catalog \
- --remove ${sysconfdir}/sgml/sgml-docbook.cat \
- ${sysconfdir}/sgml/sgml-ent.cat
-}
diff --git a/meta/recipes-devtools/sgmlspl/sgmlspl-native_git.bb b/meta/recipes-devtools/sgmlspl/sgmlspl-native_git.bb
deleted file mode 100644
index 01581c14cc..0000000000
--- a/meta/recipes-devtools/sgmlspl/sgmlspl-native_git.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "A simple post-processor for SGMLS and NSGMLS"
-HOMEPAGE = "https://github.com/gitpan/SGMLSpm"
-SECTION = "libs"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRC_URI = "git://github.com/gitpan/SGMLSpm \
- "
-
-SRCREV = "71595b9b5e36bfc00046995e058926bd27793fef"
-
-PV = "1.1+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-inherit native cpan
-
-do_install_append() {
- ln -s sgmlspl.pl ${D}${bindir}/sgmlspl
-}
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-mksquashfs.c-get-inline-functions-work-with-C99.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-mksquashfs.c-get-inline-functions-work-with-C99.patch
deleted file mode 100644
index a5bab05448..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-mksquashfs.c-get-inline-functions-work-with-C99.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From ac6268e843c43286eebff2a1052182c2393cdb2e Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Mon, 14 Sep 2015 12:31:42 +0800
-Subject: [PATCH] mksquashfs.c: get inline functions work with both gnu11 and gnu89
-
-Upstream-Status: Pending
-
-After gcc upgraded to gcc5, and if the codes is compiled without optimization(-O0),
-and the below error will happen:
-
-| mksquashfs.o: In function `create_inode':
-| git/squashfs-tools/mksquashfs.c:897: undefined reference to `get_inode_no'
-| git/squashfs-tools/mksquashfs.c:960: undefined reference to `get_parent_no'
-| git/squashfs-tools/mksquashfs.c:983: undefined reference to `get_parent_no'
-| mksquashfs.o: In function `reader_read_process':
-| git/squashfs-tools/mksquashfs.c:2132: undefined reference to `is_fragment'
-| mksquashfs.o: In function `reader_read_file':
-| git/squashfs-tools/mksquashfs.c:2228: undefined reference to `is_fragment'
-| mksquashfs.o: In function `dir_scan':
-| git/squashfs-tools/mksquashfs.c:3101: undefined reference to `create_dir_entry'
-
-gcc5 defaults to -std=gnu11 instead of -std=gnu89, and it requires that exactly one C
-source file has the callable copy of the inline function. Consider the following
-program:
-
- inline int
- foo (void)
- {
- return 42;
- }
-
- int
- main (void)
- {
- return foo ();
- }
-
-The program above will not link with the C99 inline semantics, because no out-of-line
-function foo is generated. To fix this, either mark the function foo as static, or
-add the following declaration:
- static inline int foo (void);
-
-more information refer to: https://gcc.gnu.org/gcc-5/porting_to.html;
-
-but the use of "extern inline" will lead to the compilation issue if gcc is not
-gcc5, as the commit in oe-core d0af30c92fde [alsa-lib: Change function type to
-"static __inline__"]
- "extern __inline__ function()" is the inlined version that
- can be used in this compilation unit, but there will be another
- definition of this function somewhere, so compiler will not emit
- any code for the function body. This causes problem in -O0,
- where functions are never inlined, the function call is preserved,
- but linker can't find the symbol, thus the error happens.
-
-so replace "inline" with "static inline" to make it work with both gnu11 and gnu89
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- squashfs-tools/mksquashfs.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
-index d221c35..6bba1d2 100644
---- a/squashfs-tools/mksquashfs.c
-+++ b/squashfs-tools/mksquashfs.c
-@@ -828,13 +828,13 @@ char *subpathname(struct dir_ent *dir_ent)
- }
-
-
--inline unsigned int get_inode_no(struct inode_info *inode)
-+static inline unsigned int get_inode_no(struct inode_info *inode)
- {
- return inode->inode_number;
- }
-
-
--inline unsigned int get_parent_no(struct dir_info *dir)
-+static inline unsigned int get_parent_no(struct dir_info *dir)
- {
- return dir->depth ? get_inode_no(dir->dir_ent->inode) : inode_no;
- }
-@@ -2027,7 +2027,7 @@ struct file_info *duplicate(long long file_size, long long bytes,
- }
-
-
--inline int is_fragment(struct inode_info *inode)
-+static inline int is_fragment(struct inode_info *inode)
- {
- off_t file_size = inode->buf.st_size;
-
-@@ -2996,13 +2996,13 @@ struct inode_info *lookup_inode2(struct stat *buf, int pseudo, int id)
- }
-
-
--inline struct inode_info *lookup_inode(struct stat *buf)
-+static inline struct inode_info *lookup_inode(struct stat *buf)
- {
- return lookup_inode2(buf, 0, 0);
- }
-
-
--inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
-+static inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
- {
- if (inode->inode_number == 0) {
- inode->inode_number = use_this ? : inode_no ++;
-@@ -3013,7 +3013,7 @@ inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
- }
-
-
--inline struct dir_ent *create_dir_entry(char *name, char *source_name,
-+static inline struct dir_ent *create_dir_entry(char *name, char *source_name,
- char *nonstandard_pathname, struct dir_info *dir)
- {
- struct dir_ent *dir_ent = malloc(sizeof(struct dir_ent));
-@@ -3031,7 +3031,7 @@ inline struct dir_ent *create_dir_entry(char *name, char *source_name,
- }
-
-
--inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
-+static inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
- struct inode_info *inode_info)
- {
- struct dir_info *dir = dir_ent->our_dir;
-@@ -3047,7 +3047,7 @@ inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
- }
-
-
--inline void add_dir_entry2(char *name, char *source_name,
-+static inline void add_dir_entry2(char *name, char *source_name,
- char *nonstandard_pathname, struct dir_info *sub_dir,
- struct inode_info *inode_info, struct dir_info *dir)
- {
-@@ -3059,7 +3059,7 @@ inline void add_dir_entry2(char *name, char *source_name,
- }
-
-
--inline void free_dir_entry(struct dir_ent *dir_ent)
-+static inline void free_dir_entry(struct dir_ent *dir_ent)
- {
- if(dir_ent->name)
- free(dir_ent->name);
-@@ -3080,7 +3080,7 @@ inline void free_dir_entry(struct dir_ent *dir_ent)
- }
-
-
--inline void add_excluded(struct dir_info *dir)
-+static inline void add_excluded(struct dir_info *dir)
- {
- dir->excluded ++;
- }
---
-1.9.1
-
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
deleted file mode 100644
index d545146912..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Define FNM_EXTMATCH if not defined its glibc specific define
-include missing sys/stat.h for stat* function declarations
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: squashfs-tools/action.c
-===================================================================
---- squashfs-tools.orig/action.c
-+++ squashfs-tools/action.c
-@@ -44,6 +44,10 @@
- #include "action.h"
- #include "error.h"
-
-+#if !defined(FNM_EXTMATCH)
-+#define FNM_EXTMATCH 0
-+#endif
-+
- /*
- * code to parse actions
- */
-Index: squashfs-tools/mksquashfs.c
-===================================================================
---- squashfs-tools.orig/mksquashfs.c
-+++ squashfs-tools/mksquashfs.c
-@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
- dir_size + 3, directory_block, directory_offset, NULL, NULL,
- dir, 0);
-
-+#if !defined(FNM_EXTMATCH)
-+#define FNM_EXTMATCH 0
-+#endif
-+
- #ifdef SQUASHFS_TRACE
- {
- unsigned char *dirp;
-Index: squashfs-tools/pseudo.c
-===================================================================
---- squashfs-tools.orig/pseudo.c
-+++ squashfs-tools/pseudo.c
-@@ -32,6 +32,7 @@
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/wait.h>
-+#include <sys/stat.h>
- #include <ctype.h>
-
- #include "pseudo.h"
-Index: squashfs-tools/unsquashfs.c
-===================================================================
---- squashfs-tools.orig/unsquashfs.c
-+++ squashfs-tools/unsquashfs.c
-@@ -38,6 +38,10 @@
- #include <limits.h>
- #include <ctype.h>
-
-+#ifndef FNM_EXTMATCH
-+#define FNM_EXTMATCH 0
-+#endif
-+
- struct cache *fragment_cache, *data_cache;
- struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
- pthread_t *thread, *inflator_thread;
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index 33ed09ae8a..4fd33f8048 100644
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -2,38 +2,43 @@
# and I don't think the kernel supports it any more.
SUMMARY = "Tools for manipulating SquashFS filesystems"
SECTION = "base"
-LICENSE = "GPL-2 & PD"
-LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \
-"
-DEPENDS = "attr zlib xz lzo lz4"
+LICENSE = "GPL-2"
+LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-PV = "4.3+gitr${SRCPV}"
-SRCREV = "9c1db6d13a51a2e009f0027ef336ce03624eac0d"
+PV = "4.4"
+SRCREV = "52eb4c279cd283ed9802dd1ceb686560b22ffb67"
SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
- http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \
- file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \
- file://fix-compat.patch \
"
-SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
-SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
S = "${WORKDIR}/git/squashfs-tools"
-# EXTRA_OEMAKE is typically: -e MAKEFLAGS=
-# the -e causes problems as CFLAGS is modified in the Makefile, so
-# we redefine EXTRA_OEMAKE here
-EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1"
+# needs FNM_EXTMATCH
+COMPATIBLE_HOST_libc-musl = 'null'
+
+EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}"
+
+PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr reproducible"
+PACKAGECONFIG[gzip] = "GZIP_SUPPORT=1,GZIP_SUPPORT=0,zlib"
+PACKAGECONFIG[xz] = "XZ_SUPPORT=1,XZ_SUPPORT=0,xz"
+PACKAGECONFIG[lzo] = "LZO_SUPPORT=1,LZO_SUPPORT=0,lzo"
+PACKAGECONFIG[lz4] = "LZ4_SUPPORT=1,LZ4_SUPPORT=0,lz4"
+PACKAGECONFIG[lzma] = "LZMA_XZ_SUPPORT=1,LZMA_XZ_SUPPORT=0,xz"
+PACKAGECONFIG[xattr] = "XATTR_SUPPORT=1,XATTR_SUPPORT=0,attr"
+PACKAGECONFIG[zstd] = "ZSTD_SUPPORT=1,ZSTD_SUPPORT=0,zstd"
+PACKAGECONFIG[reproducible] = "REPRODUCIBLE_DEFAULT=1,REPRODUCIBLE_DEFAULT=0,"
do_compile() {
- oe_runmake mksquashfs unsquashfs
+ oe_runmake all
}
-do_install () {
- install -d ${D}${sbindir}
- install -m 0755 mksquashfs ${D}${sbindir}/
- install -m 0755 unsquashfs ${D}${sbindir}/
+
+do_install() {
+ oe_runmake install INSTALL_DIR=${D}${sbindir}
}
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
BBCLASSEXTEND = "native nativesdk"
+
+CVE_PRODUCT = "squashfs"
diff --git a/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch b/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch
deleted file mode 100644
index 7f59210ca9..0000000000
--- a/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 1f0c22b79045cfcdc976643f383c1d09589d3087 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 30 Apr 2016 16:23:56 +0000
-Subject: [PATCH] Fix build when using non-glibc libc implementation on ppc
-
-glibc includes the kernel header into its own header for macros
-musl does not
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ptrace.h | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/ptrace.h b/ptrace.h
-index d8af976..4978a69 100644
---- a/ptrace.h
-+++ b/ptrace.h
-@@ -52,7 +52,13 @@ extern long ptrace(int, int, char *, long);
- # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
- #endif
-
--#include <linux/ptrace.h>
-+#if defined(POWERPC) && !defined(__GLIBC__)
-+#define pt_regs uapi_pt_regs
-+#endif
-+# include <linux/ptrace.h>
-+#if defined(POWERPC) && !defined(__GLIBC__)
-+# undef pt_regs
-+#endif
-
- #ifdef HAVE_STRUCT_IA64_FPREG
- # undef ia64_fpreg
---
-1.8.3.1
-
diff --git a/meta/recipes-devtools/strace/strace/0001-caps-abbrev.awk-fix-gawk-s-path.patch b/meta/recipes-devtools/strace/strace/0001-caps-abbrev.awk-fix-gawk-s-path.patch
new file mode 100644
index 0000000000..52d2cdcdc5
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-caps-abbrev.awk-fix-gawk-s-path.patch
@@ -0,0 +1,47 @@
+From d225aaa8841f47ba8aa7b353b0ac3028d5913efe Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 9 Feb 2017 01:27:49 -0800
+Subject: [PATCH] caps-abbrev.awk: fix gawk's path
+
+It should be /usr/bin/gawk as other scripts use in this package.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+---
+ tests-m32/caps-abbrev.awk | 2 +-
+ tests-mx32/caps-abbrev.awk | 2 +-
+ tests/caps-abbrev.awk | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests-m32/caps-abbrev.awk b/tests-m32/caps-abbrev.awk
+index c00023b..a56cd56 100644
+--- a/tests-m32/caps-abbrev.awk
++++ b/tests-m32/caps-abbrev.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # This file is part of caps strace test.
+ #
+diff --git a/tests-mx32/caps-abbrev.awk b/tests-mx32/caps-abbrev.awk
+index c00023b..a56cd56 100644
+--- a/tests-mx32/caps-abbrev.awk
++++ b/tests-mx32/caps-abbrev.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # This file is part of caps strace test.
+ #
+diff --git a/tests/caps-abbrev.awk b/tests/caps-abbrev.awk
+index c00023b..a56cd56 100644
+--- a/tests/caps-abbrev.awk
++++ b/tests/caps-abbrev.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # This file is part of caps strace test.
+ #
diff --git a/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch b/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch
new file mode 100644
index 0000000000..95d85bf34a
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch
@@ -0,0 +1,32 @@
+From 879ae71c472ce522f1b3514d2abf6ad49b4acc07 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 18 Sep 2017 22:51:32 -0700
+Subject: [PATCH] tests/sigaction: Check for mips and alpha before using
+ sa_restorer
+
+local structure does not define restorer member for mips and alpha
+in definition, we need to match that assumption here where they are
+being set
+
+Fixes
+| ../../strace-4.18/tests/sigaction.c:177:36: error: 'struct_set_sa {aka struct set_sa}' has no member named 'restorer'
+| # define SA_RESTORER_ARGS , new_act->restorer
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ tests/sigaction.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tests/sigaction.c
++++ b/tests/sigaction.c
+@@ -156,7 +156,7 @@ main(void)
+ sigdelset(mask.libc, SIGHUP);
+
+ memcpy(new_act->mask, mask.old, sizeof(mask.old));
+-# ifdef SA_RESTORER
++#if defined(SA_RESTORER) && !defined(MIPS) && !defined(ALPHA)
+ new_act->flags = SA_RESTORER;
+ new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL;
+ # define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx"
diff --git a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index 2b76e8a111..08fa5c53b8 100644
--- a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -1,34 +1,34 @@
-strace: Add ptest
+From ef5040b4f15006a22ac63a3bacfceac36ffc2045 Mon Sep 17 00:00:00 2001
+From: Gabriel Barbu <gabriel.barbu@enea.com>
+Date: Thu, 25 Jul 2013 15:28:33 +0200
+Subject: [PATCH] strace: Add ptest
Upstream-Status: Inappropriate
Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
---
- configure.ac | 2 +-
- tests/Makefile.am | 18 ++++++++++++++++++
- 2 files changed, 19 insertions(+), 1 deletion(-)
+ tests/Makefile.am | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -36,7 +36,7 @@ AC_INIT([strace],
- AC_CONFIG_SRCDIR([strace.c])
- AC_CONFIG_AUX_DIR([.])
- AC_CONFIG_HEADERS([config.h])
--AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
-+AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests])
- AM_MAINTAINER_MODE
- AC_CANONICAL_HOST
-
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 9023029..e1917fa 100644
+index 825c989..4623c48 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
-@@ -784,3 +784,21 @@ ksysent.h: $(srcdir)/ksysent.sed
+@@ -14,6 +14,7 @@ SIZEOF_LONG = @SIZEOF_LONG@
+ MPERS_NAME =
+ MPERS_CC_FLAGS =
+ ARCH_MFLAGS =
++TEST_SUITE_LOG = test-suite.log
+ AM_CFLAGS = $(WARN_CFLAGS)
+ AM_CPPFLAGS = $(ARCH_MFLAGS) \
+ -I$(builddir) \
+@@ -477,3 +478,21 @@ BUILT_SOURCES = ksysent.h
+ CLEANFILES = ksysent.h
- BUILT_SOURCES = ksysent.h
- CLEANFILES = ksysent.h $(TESTS:=.tmp)
+ include ../scno.am
+
+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
+
@@ -46,4 +46,4 @@ index 9023029..e1917fa 100644
+ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
+ done
-+ for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done
++ for i in net scm_rights-fd rt_sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done
diff --git a/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch b/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
index 7bc143635f..5fefff33e9 100644
--- a/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
+++ b/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
@@ -1,20 +1,37 @@
-The git-version-gen script is not included in tarball releases,
-so we need to avoid attempts to call it when running autoreconf.
+From 3bc47502ab011ea8d7c9cd724b25174ecd9506bc Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Mon, 18 Jan 2016 13:33:50 -0800
+Subject: [PATCH] strace: remove need for scripts
+
+git-version-gen copyright-year-gen file-date-gen are not included in
+tarball releases, so we need to avoid attempts to call them.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
-Index: strace-4.10/configure.ac
-===================================================================
---- strace-4.10.orig/configure.ac
-+++ strace-4.10/configure.ac
-@@ -1,7 +1,7 @@
- dnl Process this file with autoconf to create configure. Use autoreconf.
+diff --git a/configure.ac b/configure.ac
+index 949b058..4ba989c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,12 +12,12 @@
+
AC_PREREQ(2.57)
AC_INIT([strace],
-- m4_esyscmd([./git-version-gen .tarball-version]),
+- st_esyscmd_s([./git-version-gen .tarball-version]),
+ m4_esyscmd_s([cat .tarball-version]),
- [strace-devel@lists.sourceforge.net])
+ [strace-devel@lists.strace.io],
+ [strace],
+ [https://strace.io])
+-m4_define([copyright_year], st_esyscmd_s([./copyright-year-gen .year]))
+-m4_define([manpage_date], st_esyscmd_s([./file-date-gen strace.1.in]))
++m4_define([copyright_year], m4_esyscmd_s([cat .year]))
++m4_define([manpage_date], m4_esyscmd_s([cat .strace.1.in.date]))
+ AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])
AC_CONFIG_SRCDIR([strace.c])
AC_CONFIG_AUX_DIR([.])
diff --git a/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch b/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch
index b24378bfee..0d3192b345 100644
--- a/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch
+++ b/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch
@@ -1,3 +1,8 @@
+From 20c184a7ab3fb7be67fb7626c411e756ea61d2f5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 7 Aug 2016 23:47:57 -0700
+Subject: [PATCH] strace: Fix build with mips/mips64 on musl
+
SIGEMT is not defined everywhere e.g musl does
not define it. Therefore check it being defined
before using it.
@@ -8,11 +13,15 @@ Fixes errors e.g.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: strace-4.13/tests/signal2name.c
-===================================================================
---- strace-4.13.orig/tests/signal2name.c
-+++ strace-4.13/tests/signal2name.c
-@@ -42,7 +42,9 @@ signal2name(int sig)
+---
+ tests/signal2name.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/signal2name.c b/tests/signal2name.c
+index 1d8e7c5..6722aa1 100644
+--- a/tests/signal2name.c
++++ b/tests/signal2name.c
+@@ -49,7 +49,9 @@ signal2name(int sig)
CASE(SIGEMT);
CASE(SIGLOST);
#elif defined MIPS
diff --git a/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch b/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch
index 756cd8bb82..a9bd900da8 100644
--- a/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch
+++ b/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch
@@ -1,4 +1,4 @@
-From 154af50ed7ed8b91838d713052ebf29b0b14f765 Mon Sep 17 00:00:00 2001
+From cc97307e8e39a81999c6a365d057487a02e6128e Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Mon, 18 Jan 2016 11:00:00 -0800
Subject: [PATCH] mpers.m4: more robust test for -m32/-mx32 compile support
@@ -18,29 +18,28 @@ detects the limitations of the OE toolchain.
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
---
m4/mpers.m4 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/m4/mpers.m4 b/m4/mpers.m4
-index 1fe8a8e..d72c717 100644
+index 13725d7..d8578ea 100644
--- a/m4/mpers.m4
+++ b/m4/mpers.m4
-@@ -53,12 +53,14 @@ case "$arch" in
- CFLAGS="$CFLAGS CFLAG $IFLAG"
- AC_CACHE_CHECK([for CFLAG compile support], [st_cv_cc],
+@@ -88,6 +88,7 @@ case "$arch" in
+ CFLAGS="$CFLAGS MPERS_CFLAGS $IFLAG"
+ AC_CACHE_CHECK([for mpers_name personality compile support], [st_cv_cc],
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
+ #include <sys/syscall.h>
int main(){return 0;}]])],
[st_cv_cc=yes],
[st_cv_cc=no])])
- if test $st_cv_cc = yes; then
- AC_CACHE_CHECK([for CFLAG runtime support], [st_cv_runtime],
+@@ -95,6 +96,7 @@ case "$arch" in
+ AC_CACHE_CHECK([for mpers_name personality runtime support],
+ [st_cv_runtime],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
+ #include <sys/syscall.h>
int main(){return 0;}]])],
[st_cv_runtime=yes],
[st_cv_runtime=no],
---
-1.9.1
-
diff --git a/meta/recipes-devtools/strace/strace/ptest-spacesave.patch b/meta/recipes-devtools/strace/strace/ptest-spacesave.patch
new file mode 100644
index 0000000000..3e32cc388c
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/ptest-spacesave.patch
@@ -0,0 +1,19 @@
+If the test is successful, remove the log and exp files. This stops strace
+using around 600MB of disk space and running our ptest images out of space.
+
+RP 2019/5/29
+
+Upstream-Status: Inappropriate [specific to OE image space issues]
+
+Index: strace-4.26/tests/gen_tests.sh
+===================================================================
+--- strace-4.26.orig/tests/gen_tests.sh
++++ strace-4.26/tests/gen_tests.sh
+@@ -62,6 +62,7 @@ while read -r name arg0 args; do {
+ $hdr
+ . "\${srcdir=.}/init.sh"
+ run_strace_match_diff $arg0 $args
++ rm -rf log exp
+ EOF
+ ;;
+
diff --git a/meta/recipes-devtools/strace/strace/run-ptest b/meta/recipes-devtools/strace/strace/run-ptest
index 133cf92d02..2fed984e90 100755
--- a/meta/recipes-devtools/strace/strace/run-ptest
+++ b/meta/recipes-devtools/strace/strace/run-ptest
@@ -1,2 +1,3 @@
#!/bin/sh
-make -C tests -k runtest-TESTS
+export TIMEOUT_DURATION=30
+make -B -C tests -k test-suite.log
diff --git a/meta/recipes-devtools/strace/strace/sys_headers.patch b/meta/recipes-devtools/strace/strace/sys_headers.patch
new file mode 100644
index 0000000000..e46f2c350d
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/sys_headers.patch
@@ -0,0 +1,25 @@
+Remove configure checks for few sys/ headers
+
+sys/ipc.h, sys/sem.h, sys/shm.h, and sys/msg.h are actually wrappers
+for kernel headers in libc if available, here strace is trying to match
+traced process's APIs to syscalls kernel structures
+
+Removing the checks makes it default to right kernel UAPI headers under linux/
+
+Upstream-Status: Submitted [https://lists.strace.io/pipermail/strace-devel/2019-November/009222.html]
+Suggested-by: Rich Felker <dalias@aerifal.cx>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/configure.ac
++++ b/configure.ac
+@@ -439,11 +439,7 @@ AC_CHECK_HEADERS(m4_normalize([
+ sys/conf.h
+ sys/eventfd.h
+ sys/fanotify.h
+- sys/ipc.h
+- sys/msg.h
+ sys/quota.h
+- sys/sem.h
+- sys/shm.h
+ sys/signalfd.h
+ sys/xattr.h
+ ustat.h
diff --git a/meta/recipes-devtools/strace/strace/uintptr_t.patch b/meta/recipes-devtools/strace/strace/uintptr_t.patch
new file mode 100644
index 0000000000..6d3dd6fb98
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/uintptr_t.patch
@@ -0,0 +1,17 @@
+include stdint.h for getting uintptr_t definition
+
+fixes do_compile_ptest_base
+tests/fanotify_mark.c:191:23: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'?
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/tests/fanotify_mark.c
++++ b/tests/fanotify_mark.c
+@@ -18,6 +18,7 @@
+
+ # include <limits.h>
+ # include <stdio.h>
++# include <stdint.h>
+ # include <unistd.h>
+ # include <sys/fanotify.h>
+
diff --git a/meta/recipes-devtools/strace/strace/update-gawk-paths.patch b/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
index 94ee53c7fc..7077048c75 100644
--- a/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
+++ b/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
@@ -1,4 +1,4 @@
-From 3836518c46bd5bb3e71371b1b18274bf2d487133 Mon Sep 17 00:00:00 2001
+From f0d7ebf48441e0b090c3e6053b8c845d0a4a3b18 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Mon, 18 Jan 2016 11:01:00 -0800
Subject: [PATCH] update gawk paths, /bin/gawk -> /usr/bin/gawk
@@ -11,21 +11,22 @@ from #!/bin/gawk to #!/usr/bin/gawk. Fixes missing RDPENDS QA tests:
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
---
- mpers.awk | 2 +-
- tests-m32/caps.awk | 2 +-
- tests-m32/match.awk | 2 +-
- tests-m32/sigaction.awk | 2 +-
- tests-mx32/caps.awk | 2 +-
- tests-mx32/match.awk | 2 +-
- tests-mx32/sigaction.awk | 2 +-
- tests/caps.awk | 2 +-
- tests/match.awk | 2 +-
- tests/sigaction.awk | 2 +-
+ mpers.awk | 2 +-
+ tests-m32/caps.awk | 2 +-
+ tests-m32/match.awk | 2 +-
+ tests-m32/rt_sigaction.awk | 2 +-
+ tests-mx32/caps.awk | 2 +-
+ tests-mx32/match.awk | 2 +-
+ tests-mx32/rt_sigaction.awk | 2 +-
+ tests/caps.awk | 2 +-
+ tests/match.awk | 2 +-
+ tests/rt_sigaction.awk | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/mpers.awk b/mpers.awk
-index 99248c5..ff10520 100644
+index 17f8f2b..d69dcd5 100644
--- a/mpers.awk
+++ b/mpers.awk
@@ -1,4 +1,4 @@
@@ -35,7 +36,7 @@ index 99248c5..ff10520 100644
# Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
# Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
diff --git a/tests-m32/caps.awk b/tests-m32/caps.awk
-index 67003ac..a66f1f0 100644
+index 941564a..0bcc3ff 100644
--- a/tests-m32/caps.awk
+++ b/tests-m32/caps.awk
@@ -1,4 +1,4 @@
@@ -45,27 +46,27 @@ index 67003ac..a66f1f0 100644
# This file is part of caps strace test.
#
diff --git a/tests-m32/match.awk b/tests-m32/match.awk
-index abfbae9..f2740bf 100644
+index d91c518..ee5d908 100644
--- a/tests-m32/match.awk
+++ b/tests-m32/match.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
- # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # Copyright (c) 2014-2018 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests-m32/sigaction.awk b/tests-m32/sigaction.awk
-index 5c6b6d0..3e14464 100644
---- a/tests-m32/sigaction.awk
-+++ b/tests-m32/sigaction.awk
+diff --git a/tests-m32/rt_sigaction.awk b/tests-m32/rt_sigaction.awk
+index 81dd813..9cd9549 100644
+--- a/tests-m32/rt_sigaction.awk
++++ b/tests-m32/rt_sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
- # All rights reserved.
+ # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com>
diff --git a/tests-mx32/caps.awk b/tests-mx32/caps.awk
-index 67003ac..a66f1f0 100644
+index 941564a..0bcc3ff 100644
--- a/tests-mx32/caps.awk
+++ b/tests-mx32/caps.awk
@@ -1,4 +1,4 @@
@@ -75,27 +76,27 @@ index 67003ac..a66f1f0 100644
# This file is part of caps strace test.
#
diff --git a/tests-mx32/match.awk b/tests-mx32/match.awk
-index abfbae9..f2740bf 100644
+index d91c518..ee5d908 100644
--- a/tests-mx32/match.awk
+++ b/tests-mx32/match.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
- # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # Copyright (c) 2014-2018 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests-mx32/sigaction.awk b/tests-mx32/sigaction.awk
-index 5c6b6d0..3e14464 100644
---- a/tests-mx32/sigaction.awk
-+++ b/tests-mx32/sigaction.awk
+diff --git a/tests-mx32/rt_sigaction.awk b/tests-mx32/rt_sigaction.awk
+index 81dd813..9cd9549 100644
+--- a/tests-mx32/rt_sigaction.awk
++++ b/tests-mx32/rt_sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
- # All rights reserved.
+ # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com>
diff --git a/tests/caps.awk b/tests/caps.awk
-index 67003ac..a66f1f0 100644
+index 941564a..0bcc3ff 100644
--- a/tests/caps.awk
+++ b/tests/caps.awk
@@ -1,4 +1,4 @@
@@ -105,22 +106,22 @@ index 67003ac..a66f1f0 100644
# This file is part of caps strace test.
#
diff --git a/tests/match.awk b/tests/match.awk
-index abfbae9..f2740bf 100644
+index d91c518..ee5d908 100644
--- a/tests/match.awk
+++ b/tests/match.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
- # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # Copyright (c) 2014-2018 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests/sigaction.awk b/tests/sigaction.awk
-index 5c6b6d0..3e14464 100644
---- a/tests/sigaction.awk
-+++ b/tests/sigaction.awk
+diff --git a/tests/rt_sigaction.awk b/tests/rt_sigaction.awk
+index 81dd813..9cd9549 100644
+--- a/tests/rt_sigaction.awk
++++ b/tests/rt_sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
- # All rights reserved.
+ # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com>
diff --git a/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch b/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
deleted file mode 100644
index db83d1130e..0000000000
--- a/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 2995245d7e3f46e8b3995002995ebd28beca7d55 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Fri, 5 Feb 2016 14:00:00 -0800
-Subject: [PATCH] use <asm/sgidefs.h>
-
-Build fix for MIPS with musl libc.
-
-The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
-but not by musl. Regardless of the libc, the kernel headers provide
-<asm/sgidefs.h> which provides the same definitions, so use that
-instead.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- configure.ac | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1524b9b..287e03d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -196,20 +196,20 @@ AC_SUBST(arch_mx32)
- if test "$arch" = mips; then
- AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM],
- [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM],
-- [#include <sgidefs.h>],
-+ [#include <asm/sgidefs.h>],
- [AC_MSG_ERROR([_MIPS_SIM cannot be determined])])])
-
- AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi],
- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
-+ [AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
- [[int i[_MIPS_SIM == _MIPS_SIM_ABI32 ? 1 : - 1];]])],
- [st_cv_mips_abi=o32],
- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
-+ [AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
- [[int i[_MIPS_SIM == _MIPS_SIM_NABI32 ? 1 : - 1];]])],
- [st_cv_mips_abi=n32],
- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
-+ [AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
- [[int i[_MIPS_SIM == _MIPS_SIM_ABI64 ? 1 : - 1];]])],
- [st_cv_mips_abi=n64],
- [st_cv_mips_abi=unknown])])])])
---
-1.9.1
-
diff --git a/meta/recipes-devtools/strace/strace_4.13.bb b/meta/recipes-devtools/strace/strace_4.13.bb
deleted file mode 100644
index cae7f2138e..0000000000
--- a/meta/recipes-devtools/strace/strace_4.13.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "System call tracing tool"
-HOMEPAGE = "http://strace.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
- file://disable-git-version-gen.patch \
- file://more-robust-test-for-m32-mx32-compile-support.patch \
- file://update-gawk-paths.patch \
- file://use-asm-sgidefs.h.patch \
- file://Makefile-ptest.patch \
- file://run-ptest \
- file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
- file://mips-SIGEMT.patch \
- "
-
-SRC_URI[md5sum] = "4b78c7febdd24c79d5147824d1a080a3"
-SRC_URI[sha256sum] = "d48f732576c91ece36a5843d63f9be054c40ef59f1e4773986042636861625d7"
-
-inherit autotools ptest bluetooth
-
-RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
-
-PACKAGECONFIG_class-target ??= "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
-"
-
-PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-
-TESTDIR = "tests"
-
-do_install_append() {
- # We don't ship strace-graph here because it needs perl
- rm ${D}${bindir}/strace-graph
-}
-
-do_compile_ptest() {
- oe_runmake -C ${TESTDIR} buildtest-TESTS
-}
-
-do_install_ptest() {
- oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
- sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
-}
-
-BBCLASSEXTEND = "native"
-TOOLCHAIN = "gcc"
diff --git a/meta/recipes-devtools/strace/strace_5.3.bb b/meta/recipes-devtools/strace/strace_5.3.bb
new file mode 100644
index 0000000000..b000afb30b
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace_5.3.bb
@@ -0,0 +1,58 @@
+SUMMARY = "System call tracing tool"
+HOMEPAGE = "http://strace.io"
+SECTION = "console/utils"
+LICENSE = "LGPL-2.1+ & GPL-2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0169a04810830e94f4b1cfb823c9f592"
+
+SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
+ file://disable-git-version-gen.patch \
+ file://more-robust-test-for-m32-mx32-compile-support.patch \
+ file://update-gawk-paths.patch \
+ file://Makefile-ptest.patch \
+ file://run-ptest \
+ file://mips-SIGEMT.patch \
+ file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
+ file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
+ file://ptest-spacesave.patch \
+ file://uintptr_t.patch \
+ file://sys_headers.patch \
+ "
+SRC_URI[md5sum] = "84f5e72de813c9b1bb6057ee8ab428d8"
+SRC_URI[sha256sum] = "6c131198749656401fe3efd6b4b16a07ea867e8f530867ceae8930bbc937a047"
+
+inherit autotools ptest
+
+PACKAGECONFIG_class-target ??= "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+"
+
+PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5"
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+
+EXTRA_OECONF += "--enable-mpers=no"
+
+CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext"
+
+TESTDIR = "tests"
+PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)"
+
+do_install_append() {
+ # We don't ship strace-graph here because it needs perl
+ rm ${D}${bindir}/strace-graph
+}
+
+do_compile_ptest() {
+ oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+ oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+ install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
+ install -m 644 ${B}/config.h ${D}${PTEST_PATH}
+ sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
+}
+
+RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
+
+BBCLASSEXTEND = "native"
+TOOLCHAIN = "gcc"
diff --git a/meta/recipes-devtools/subversion/subversion/disable_macos.patch b/meta/recipes-devtools/subversion/subversion/disable_macos.patch
index ec3be496f3..8d2d635992 100644
--- a/meta/recipes-devtools/subversion/subversion/disable_macos.patch
+++ b/meta/recipes-devtools/subversion/subversion/disable_macos.patch
@@ -1,15 +1,25 @@
-These tests don't work in cross compiling, just disable them for now, we don't
-build subversion on OS-X at this time.
+From 9c350c037ca3489dbeece6ecc2d7e2e5dbb177e9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 15:21:46 +0800
+Subject: [PATCH] These tests don't work in cross compiling, just disable them
+ for now, we don't build subversion on OS-X at this time.
RP 1014/7/16
Upstream-Status: Pending [needs a rewrite to support a cache value]
-Index: subversion-1.8.9/build/ac-macros/macosx.m4
-===================================================================
---- subversion-1.8.9.orig/build/ac-macros/macosx.m4 2012-11-26 03:04:27.000000000 +0000
-+++ subversion-1.8.9/build/ac-macros/macosx.m4 2014-07-16 12:28:58.357300403 +0000
-@@ -24,21 +24,7 @@
+Rebase to 1.12.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ build/ac-macros/macosx.m4 | 31 +------------------------------
+ 1 file changed, 1 insertion(+), 30 deletions(-)
+
+diff --git a/build/ac-macros/macosx.m4 b/build/ac-macros/macosx.m4
+index 92fa58e..a568e1c 100644
+--- a/build/ac-macros/macosx.m4
++++ b/build/ac-macros/macosx.m4
+@@ -24,21 +24,7 @@ dnl Check for _dyld_image_name and _dyld_image_header availability
AC_DEFUN(SVN_LIB_MACHO_ITERATE,
[
AC_MSG_CHECKING([for Mach-O dynamic module iteration functions])
@@ -31,7 +41,7 @@ Index: subversion-1.8.9/build/ac-macros/macosx.m4
])
dnl SVN_LIB_MACOS_PLIST
-@@ -46,34 +32,7 @@
+@@ -46,23 +32,8 @@ dnl Assign variables for Mac OS property list support
AC_DEFUN(SVN_LIB_MACOS_PLIST,
[
AC_MSG_CHECKING([for Mac OS property list utilities])
@@ -44,25 +54,18 @@ Index: subversion-1.8.9/build/ac-macros/macosx.m4
- #error ProperyList API unavailable.
- #endif
- ]],[[]])],[
-- dnl ### Hack. We should only need to pass the -framework options when
-- dnl linking libsvn_subr, since it is the only library that uses Keychain.
-- dnl
-- dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
-- dnl OS X frameworks like it does for normal libraries, so we need to
-- dnl explicitly pass the option to all the users of libsvn_subr to allow
-- dnl static builds to link successfully.
-- dnl
-- dnl This does mean that all executables we link will be linked directly
-- dnl to these frameworks - even when building shared libraries - but that
-- dnl shouldn't cause any problems.
--
-- LIBS="$LIBS -framework CoreFoundation"
+- SVN_MACOS_PLIST_LIBS="-framework CoreFoundation"
+- AC_SUBST(SVN_MACOS_PLIST_LIBS)
- AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
- [Is Mac OS property list API available?])
- AC_MSG_RESULT([yes])
- ],[
++ AC_SUBST([SVN_MACOS_PLIST_LIBS], [""])
AC_MSG_RESULT([no])
- ])
])
dnl SVN_LIB_MACOS_KEYCHAIN
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/subversion/subversion/serf.m4-Regex-modified-to-allow-D-in-paths.patch b/meta/recipes-devtools/subversion/subversion/serf.m4-Regex-modified-to-allow-D-in-paths.patch
deleted file mode 100644
index 9fed3cf6c8..0000000000
--- a/meta/recipes-devtools/subversion/subversion/serf.m4-Regex-modified-to-allow-D-in-paths.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f1b6e49f12a18eabe88eb732b578a16281d09499 Mon Sep 17 00:00:00 2001
-From: Jose Lamego <jose.a.lamego@linux.intel.com>
-Date: Thu, 2 Jul 2015 11:37:43 +0000
-Subject: [PATCH] serf.m4: Regex modified to allow '-D' in paths
-
-Upstream-Status: Accepted
-
-The patch is merged by subversion upstream with replacing '[[:space:]]' with ' '.
-
-http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/serf.m4?r1=1594156&r2=1689824
-
-Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
----
- build/ac-macros/serf.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/ac-macros/serf.m4 b/build/ac-macros/serf.m4
-index ae11e75..ff8cbae 100644
---- a/build/ac-macros/serf.m4
-+++ b/build/ac-macros/serf.m4
-@@ -168,7 +168,7 @@
- if $PKG_CONFIG $serf_pc_arg --atleast-version=$serf_check_version; then
- AC_MSG_RESULT([yes])
- serf_found=yes
-- SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags | $SED -e 's/-D[^ ]*//g'`]
-+ SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags | $SED -e 's/ -D[^ ]*//g' -e 's/^-D[^ ]*//g'`]
- SVN_SERF_LIBS=`$PKG_CONFIG $serf_pc_arg --libs-only-l`
- dnl don't use --libs-only-L because then we might miss some options
- LDFLAGS=["$LDFLAGS `$PKG_CONFIG $serf_pc_arg --libs | $SED -e 's/-l[^ ]*//g'`"]
---
-1.8.4.5
-
diff --git a/meta/recipes-devtools/subversion/subversion/serfmacro.patch b/meta/recipes-devtools/subversion/subversion/serfmacro.patch
new file mode 100644
index 0000000000..507de0f08b
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion/serfmacro.patch
@@ -0,0 +1,31 @@
+The existing sed expression can match expressions like
+--sysroot=/some/path/xxx-linux/ which clearly isn't intended and injects
+incorrect paths into LDFLAGS.
+
+Fix this in the same way we address the problem in CFLAGS.
+
+RP 2016/12/7
+Upstream-Status: Pending
+
+Rebase 1.12.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ build/ac-macros/serf.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/ac-macros/serf.m4 b/build/ac-macros/serf.m4
+index 0a549b3..3a069ac 100644
+--- a/build/ac-macros/serf.m4
++++ b/build/ac-macros/serf.m4
+@@ -171,7 +171,7 @@ AC_DEFUN(SVN_SERF_PKG_CONFIG,
+ SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags-only-I`]
+ SVN_SERF_LIBS=[`$PKG_CONFIG $serf_pc_arg --libs-only-l`]
+ dnl don't use --libs-only-L because then we might miss some options
+- LDFLAGS=["$LDFLAGS `$PKG_CONFIG $serf_pc_arg --libs | $SED -e 's/-l[^ ]*//g'`"]
++ LDFLAGS=["$LDFLAGS `$PKG_CONFIG $serf_pc_arg --libs | $SED -e 's/ -l[^ ]*//g' -e 's/^-l[^ ]*//g'`"]
+ break
+ else
+ AC_MSG_RESULT([no])
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/subversion/subversion_1.12.2.bb b/meta/recipes-devtools/subversion/subversion_1.12.2.bb
new file mode 100644
index 0000000000..4ffa1c584e
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion_1.12.2.bb
@@ -0,0 +1,61 @@
+SUMMARY = "Subversion (svn) version control system client"
+HOMEPAGE = "http://subversion.apache.org"
+SECTION = "console/network"
+LICENSE = "Apache-2 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6487ae7094d359fa90fb9c4096e52e2b"
+
+DEPENDS = "apr-util serf sqlite3 file lz4"
+DEPENDS_append_class-native = " file-replacement-native"
+
+SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://disable_macos.patch \
+ file://0001-Fix-libtool-name-in-configure.ac.patch \
+ file://serfmacro.patch \
+ "
+
+SRC_URI[md5sum] = "1ff249f848f834ded88536543e031975"
+SRC_URI[sha256sum] = "3bd0b5c8e4c5175263dc9a92fd9aef94ce917e80af034f26fe5c45fde7e0f771"
+
+inherit autotools pkgconfig gettext
+
+CVE_PRODUCT = "apache:subversion"
+
+PACKAGECONFIG ?= ""
+
+PACKAGECONFIG[boost] = "--with-boost=${RECIPE_SYSROOT}${exec_prefix},--without-boost,boost"
+PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
+PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
+
+EXTRA_OECONF = " \
+ --with-apr=${STAGING_BINDIR_CROSS} \
+ --with-apr-util=${STAGING_BINDIR_CROSS} \
+ --without-apxs \
+ --without-berkeley-db \
+ --without-swig \
+ --disable-keychain \
+ --with-utf8proc=internal \
+ ac_cv_path_RUBY=none \
+"
+
+acpaths = "-I build/ -I build/ac-macros/"
+
+CPPFLAGS += "-P"
+BUILD_CPPFLAGS += "-P"
+
+do_configure_prepend () {
+ rm -f ${S}/libtool
+ rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
+ rm -f ${S}/aclocal.m4
+ sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
+}
+
+#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
+#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
+#| make: *** [install-serf-lib] Error 1
+PARALLEL_MAKEINST = ""
+
+RDEPENDS_${PN} = "serf"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/subversion/subversion_1.9.4.bb b/meta/recipes-devtools/subversion/subversion_1.9.4.bb
deleted file mode 100644
index 3ce83c1da4..0000000000
--- a/meta/recipes-devtools/subversion/subversion_1.9.4.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Subversion (svn) version control system client"
-SECTION = "console/network"
-DEPENDS = "apr-util serf sqlite3 file"
-DEPENDS_append_class-native = " file-replacement-native"
-RDEPENDS_${PN} = "serf"
-LICENSE = "Apache-2"
-HOMEPAGE = "http://subversion.tigris.org"
-
-BBCLASSEXTEND = "native"
-
-inherit gettext
-
-SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://disable_macos.patch \
- file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
- file://0001-Fix-libtool-name-in-configure.ac.patch \
- "
-
-SRC_URI[md5sum] = "29121a038f87641055a8183f49e9739f"
-SRC_URI[sha256sum] = "1267f9e2ab983f260623bee841e6c9cc458bf4bf776238ed5f100983f79e9299"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
-
-PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
-PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
-
-EXTRA_OECONF = " \
- --without-berkeley-db --without-apxs \
- --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
- --with-apr-util=${STAGING_BINDIR_CROSS} \
- --disable-keychain \
- ac_cv_path_RUBY=none"
-
-inherit autotools
-
-export LDFLAGS += " -L${STAGING_LIBDIR} "
-CPPFLAGS += "-P"
-BUILD_CPPFLAGS += "-P"
-
-acpaths = "-I build/ -I build/ac-macros/"
-
-do_configure_prepend () {
- rm -f ${S}/libtool
- rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
- rm -f ${S}/aclocal.m4
- sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
-}
-
-#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
-#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
-#| make: *** [install-serf-lib] Error 1
-PARALLEL_MAKEINST = ""
diff --git a/meta/recipes-devtools/swig/swig.inc b/meta/recipes-devtools/swig/swig.inc
index 704bb27b92..e62718c508 100644
--- a/meta/recipes-devtools/swig/swig.inc
+++ b/meta/recipes-devtools/swig/swig.inc
@@ -1,4 +1,7 @@
SUMMARY = "SWIG - Simplified Wrapper and Interface Generator"
+DESCRIPTION = "SWIG is a compiler that makes it easy to integrate C and C++ \
+code with other languages including Perl, Tcl, Ruby, Python, Java, Guile, \
+Mzscheme, Chicken, OCaml, Pike, and C#."
HOMEPAGE = "http://swig.sourceforge.net/"
LICENSE = "BSD & GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
@@ -7,11 +10,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
SECTION = "devel"
-DEPENDS = "libpcre python3"
+DEPENDS = "libpcre bison-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-inherit autotools python3native
+inherit autotools python3native pkgconfig
EXTRA_OECONF = " \
--with-python3=${PYTHON} \
@@ -38,14 +41,14 @@ EXTRA_OECONF = " \
--without-tcl \
"
+EXTRA_AUTORECONF += "-I Tools/config"
+
BBCLASSEXTEND = "native nativesdk"
-do_configure() {
- install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/Tools/config
- install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/Tools/config
- install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
- install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
- oe_runconf
+# necessary together with bison dependency until a new upstream version after
+# 3.0.12 includes 0001-Fix-generated-code-for-constant-expressions-containi.patch
+do_configure_append() {
+ mkdir -p ${B}/Source/CParse
}
do_install_append_class-nativesdk() {
@@ -54,8 +57,8 @@ do_install_append_class-nativesdk() {
}
def swiglib_relpath(d):
- swiglib = d.getVar('datadir', True) + "/" + d.getVar('BPN', True) + "/" + d.getVar('PV', True)
- return os.path.relpath(swiglib, d.getVar('bindir', True))
+ swiglib = d.getVar('datadir') + "/" + d.getVar('BPN') + "/" + d.getVar('PV')
+ return os.path.relpath(swiglib, d.getVar('bindir'))
do_install_append_class-native() {
create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}
diff --git a/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch b/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
new file mode 100644
index 0000000000..885c395614
--- /dev/null
+++ b/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
@@ -0,0 +1,330 @@
+From 1a5aadcd66e85c63d228bfd811a521d617c22a38 Mon Sep 17 00:00:00 2001
+From: Patrick Schneider <patrick.schneider@meetnow.eu>
+Date: Thu, 13 Apr 2017 15:02:53 +0200
+Subject: [PATCH] Add Node 7.x aka V8 5.2+ support
+
+* Use WeakCallbackInfo instead of WeakCallbackData
+* Use GetPrivate instead of GetHiddenValue
+* Adopted new signature for SetWeak to support destructor calling
+* SetAccessor deprecation fixed
+* Proper version checks where applicable
+
+Upstream-Status: Submitted [https://github.com/swig/swig/pull/968]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ Lib/javascript/v8/javascriptcode.swg | 27 +++++++++++++++++-----
+ Lib/javascript/v8/javascripthelpers.swg | 29 +++++++++++++++++++++---
+ Lib/javascript/v8/javascriptinit.swg | 16 +++++++++++--
+ Lib/javascript/v8/javascriptrun.swg | 40 ++++++++++++++++++++++++++++-----
+ 4 files changed, 95 insertions(+), 17 deletions(-)
+
+diff --git a/Lib/javascript/v8/javascriptcode.swg b/Lib/javascript/v8/javascriptcode.swg
+index fb7d55c..b8c5089 100644
+--- a/Lib/javascript/v8/javascriptcode.swg
++++ b/Lib/javascript/v8/javascriptcode.swg
+@@ -133,10 +133,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++ static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -147,7 +150,9 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ }
+ delete proxy;
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
++#endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+ object.Dispose();
+@@ -155,7 +160,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ object.Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
+ object->Dispose(isolate);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object->Dispose();
+ #endif
+ }
+@@ -177,10 +182,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -197,7 +205,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
+ #endif
+ }
+@@ -211,7 +219,11 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ * ----------------------------------------------------------------------------- */
+ %fragment("js_getter", "templates")
+ %{
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static SwigV8ReturnValue $jswrapper(v8::Local<v8::String> property, const SwigV8PropertyCallbackInfo &info) {
++#else
++static SwigV8ReturnValue $jswrapper(v8::Local<v8::Name> property, const SwigV8PropertyCallbackInfo &info) {
++#endif
+ SWIGV8_HANDLESCOPE();
+
+ v8::Handle<v8::Value> jsresult;
+@@ -233,8 +245,11 @@ fail:
+ * ----------------------------------------------------------------------------- */
+ %fragment("js_setter", "templates")
+ %{
+-static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+- const SwigV8PropertyCallbackInfoVoid &info) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#else
++static void $jswrapper(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#endif
+ SWIGV8_HANDLESCOPE();
+
+ $jslocals
+diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
+index 091467d..7461079 100644
+--- a/Lib/javascript/v8/javascripthelpers.swg
++++ b/Lib/javascript/v8/javascripthelpers.swg
+@@ -6,11 +6,16 @@ typedef v8::InvocationCallback SwigV8FunctionCallback;
+ typedef v8::AccessorGetter SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetter SwigV8AccessorSetterCallback;
+ typedef v8::AccessorInfo SwigV8PropertyCallbackInfoVoid;
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ typedef v8::FunctionCallback SwigV8FunctionCallback;
+ typedef v8::AccessorGetterCallback SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetterCallback SwigV8AccessorSetterCallback;
+ typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
++#else
++typedef v8::FunctionCallback SwigV8FunctionCallback;
++typedef v8::AccessorNameGetterCallback SwigV8AccessorGetterCallback;
++typedef v8::AccessorNameSetterCallback SwigV8AccessorSetterCallback;
++typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
+ #endif
+
+ /**
+@@ -65,18 +70,36 @@ SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle<v8::Object> obj, const char
+ */
+ SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle<v8::Object> obj, const char* symbol,
+ SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ obj->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#else
++ obj->SetAccessor(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#endif
+ }
+
+-SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+- const SwigV8PropertyCallbackInfoVoid& info)
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#else
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#endif
+ {
+ char buffer[256];
+ char msg[512];
+ int res;
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ property->WriteUtf8(buffer, 256);
+ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++#else
++ v8::Local<v8::String> sproperty;
++ if (property->ToString(SWIGV8_CURRENT_CONTEXT()).ToLocal(&sproperty)) {
++ sproperty->WriteUtf8(buffer, 256);
++ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++ }
++ else {
++ res = -1;
++ }
++#endif
+
+ if(res<0) {
+ SWIG_exception(SWIG_ERROR, "Tried to write read-only variable.");
+diff --git a/Lib/javascript/v8/javascriptinit.swg b/Lib/javascript/v8/javascriptinit.swg
+index 34befa7..86008d9 100644
+--- a/Lib/javascript/v8/javascriptinit.swg
++++ b/Lib/javascript/v8/javascriptinit.swg
+@@ -7,15 +7,27 @@ SWIG_V8_SetModule(void *, swig_module_info *swig_module) {
+ v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
+ v8::Local<v8::External> mod = SWIGV8_EXTERNAL_NEW(swig_module);
+ assert(!mod.IsEmpty());
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ global_obj->SetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"), mod);
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++ global_obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, mod);
++#endif
+ }
+
+ SWIGRUNTIME swig_module_info *
+ SWIG_V8_GetModule(void *) {
+ v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ v8::Local<v8::Value> moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++ v8::Local<v8::Value> moduleinfo;
++ if (!global_obj->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&moduleinfo))
++ return 0;
++#endif
+
+- if (moduleinfo.IsEmpty())
++ if (moduleinfo.IsEmpty() || moduleinfo->IsNull() || moduleinfo->IsUndefined())
+ {
+ // It's not yet loaded
+ return 0;
+@@ -23,7 +35,7 @@ SWIG_V8_GetModule(void *) {
+
+ v8::Local<v8::External> moduleinfo_extern = v8::Local<v8::External>::Cast(moduleinfo);
+
+- if (moduleinfo_extern.IsEmpty())
++ if (moduleinfo_extern.IsEmpty() || moduleinfo_extern->IsNull() || moduleinfo_extern->IsUndefined())
+ {
+ // Something's not right
+ return 0;
+diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
+index 5ac52a5..30002c0 100644
+--- a/Lib/javascript/v8/javascriptrun.swg
++++ b/Lib/javascript/v8/javascriptrun.swg
+@@ -193,8 +193,10 @@ public:
+ void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Value> object, void *parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
++#else
++ void (*dtor) (const v8::WeakCallbackInfo<SWIGV8_Proxy> &data);
+ #endif
+ };
+
+@@ -241,9 +243,12 @@ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Val
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ delete proxy;
+@@ -312,12 +317,18 @@ SWIGRUNTIME void SWIGV8_SetPrivateData(v8::Handle<v8::Object> obj, void *ptr, sw
+ } else {
+ cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+ }
+-#else
++#elifif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
+ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor);
+ } else {
+ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+ }
++#else
++ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
++ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor, v8::WeakCallbackType::kParameter);
++ } else {
++ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor, v8::WeakCallbackType::kParameter);
++ }
+ #endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+@@ -470,7 +481,14 @@ int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
+
+ v8::Handle<v8::Object> objRef = valRef->ToObject();
+ if(objRef->InternalFieldCount() < 1) return false;
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ v8::Handle<v8::Value> flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++ v8::Local<v8::Value> flag;
++ if (!objRef->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&flag))
++ return false;
++#endif
+ return (flag->IsBoolean() && flag->BooleanValue());
+ }
+
+@@ -519,10 +537,13 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persist
+ SwigV8PackedData *cdata = static_cast<SwigV8PackedData *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SwigV8PackedData *cdata) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SwigV8PackedData *cdata = data.GetParameter();
++#else
++SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackInfo<SwigV8PackedData> &data) {
++ SwigV8PackedData *cdata = data.GetParameter();
+ #endif
+
+ delete cdata;
+@@ -537,7 +558,7 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Ob
+ object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
+ #endif
+ }
+@@ -550,7 +571,12 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ // v8::Handle<v8::Object> obj = SWIGV8_OBJECT_NEW();
+ v8::Local<v8::Object> obj = SWIGV8_OBJECT_NEW();
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ obj->SetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"), SWIGV8_BOOLEAN_NEW(true));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++ obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, SWIGV8_BOOLEAN_NEW(true));
++#endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031511)
+ obj->SetPointerInInternalField(0, cdata);
+@@ -573,9 +599,11 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, _wrap_SwigV8PackedData_delete);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
+ // v8::V8::SetWeak(&cdata->handle, cdata, _wrap_SwigV8PackedData_delete);
++#else
++ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete, v8::WeakCallbackType::kParameter);
+ #endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+--
+2.9.5
+
diff --git a/meta/recipes-devtools/swig/swig/0001-Fix-generated-code-for-constant-expressions-containi.patch b/meta/recipes-devtools/swig/swig/0001-Fix-generated-code-for-constant-expressions-containi.patch
new file mode 100644
index 0000000000..f4ed782a82
--- /dev/null
+++ b/meta/recipes-devtools/swig/swig/0001-Fix-generated-code-for-constant-expressions-containi.patch
@@ -0,0 +1,179 @@
+From 90ba174fcea1618af57aa594199541d47a89b7f6 Mon Sep 17 00:00:00 2001
+From: William S Fulton <wsf@fultondesigns.co.uk>
+Date: Sun, 17 Sep 2017 19:02:55 +0100
+Subject: [PATCH 1/2] Fix generated code for constant expressions containing
+ wchar_t L literals.
+
+Such as:
+ # define __WCHAR_MAX (0x7fffffff + L'\0')
+
+Reported on swig-user mailing list.
+---
+ CHANGES.current | 5 +++++
+ Examples/test-suite/csharp/preproc_constants_c_runme.cs | 3 ++-
+ Examples/test-suite/csharp/preproc_constants_runme.cs | 2 ++
+ Examples/test-suite/d/preproc_constants_c_runme.1.d | 2 ++
+ Examples/test-suite/d/preproc_constants_c_runme.2.d | 2 ++
+ Examples/test-suite/d/preproc_constants_runme.1.d | 2 ++
+ Examples/test-suite/d/preproc_constants_runme.2.d | 2 ++
+ Examples/test-suite/php/preproc_constants_c_runme.php | 2 ++
+ Examples/test-suite/php/preproc_constants_runme.php | 2 ++
+ Examples/test-suite/php5/preproc_constants_c_runme.php | 2 ++
+ Examples/test-suite/php5/preproc_constants_runme.php | 2 ++
+ Examples/test-suite/preproc_constants.i | 3 +++
+ Source/CParse/parser.y | 2 +-
+ 13 files changed, 29 insertions(+), 2 deletions(-)
+
+Upstream-Status: Backport
+[https://github.com/swig/swig/commit/90ba174fcea1618af57aa594199541d47a89b7f6]
+Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
+
+diff --git a/Examples/test-suite/csharp/preproc_constants_c_runme.cs b/Examples/test-suite/csharp/preproc_constants_c_runme.cs
+index 76c684d..1c28e49 100644
+--- a/Examples/test-suite/csharp/preproc_constants_c_runme.cs
++++ b/Examples/test-suite/csharp/preproc_constants_c_runme.cs
+@@ -61,7 +61,8 @@ public class runme {
+ assert( typeof(int) == preproc_constants_c.EXPR_LAND.GetType() );
+ assert( typeof(int) == preproc_constants_c.EXPR_LOR.GetType() );
+ assert( typeof(double) == preproc_constants_c.EXPR_CONDITIONAL.GetType() );
+-
++ assert( typeof(int) == preproc_constants_c.EXPR_WCHAR_MAX.GetType() );
++ assert( typeof(int) == preproc_constants_c.EXPR_WCHAR_MIN.GetType() );
+ }
+ static void assert(bool assertion) {
+ if (!assertion)
+diff --git a/Examples/test-suite/csharp/preproc_constants_runme.cs b/Examples/test-suite/csharp/preproc_constants_runme.cs
+index 9fae591..6b02e30 100644
+--- a/Examples/test-suite/csharp/preproc_constants_runme.cs
++++ b/Examples/test-suite/csharp/preproc_constants_runme.cs
+@@ -60,6 +60,8 @@ public class runme {
+ assert( typeof(bool) == preproc_constants.EXPR_LAND.GetType() );
+ assert( typeof(bool) == preproc_constants.EXPR_LOR.GetType() );
+ assert( typeof(double) == preproc_constants.EXPR_CONDITIONAL.GetType() );
++ assert( typeof(int) == preproc_constants.EXPR_WCHAR_MAX.GetType() );
++ assert( typeof(int) == preproc_constants.EXPR_WCHAR_MIN.GetType() );
+
+ }
+ static void assert(bool assertion) {
+diff --git a/Examples/test-suite/d/preproc_constants_c_runme.1.d b/Examples/test-suite/d/preproc_constants_c_runme.1.d
+index d846c71..2b349af 100644
+--- a/Examples/test-suite/d/preproc_constants_c_runme.1.d
++++ b/Examples/test-suite/d/preproc_constants_c_runme.1.d
+@@ -61,4 +61,6 @@ void main() {
+ static assert(is(int == typeof(EXPR_LAND())));
+ static assert(is(int == typeof(EXPR_LOR())));
+ static assert(is(double == typeof(EXPR_CONDITIONAL())));
++ static assert(is(int == typeof(EXPR_WCHAR_MAX())));
++ static assert(is(int == typeof(EXPR_WCHAR_MIN())));
+ }
+diff --git a/Examples/test-suite/d/preproc_constants_c_runme.2.d b/Examples/test-suite/d/preproc_constants_c_runme.2.d
+index 9bdbb93..1bac525 100644
+--- a/Examples/test-suite/d/preproc_constants_c_runme.2.d
++++ b/Examples/test-suite/d/preproc_constants_c_runme.2.d
+@@ -61,4 +61,6 @@ void main() {
+ static assert(is(int == typeof(EXPR_LAND())));
+ static assert(is(int == typeof(EXPR_LOR())));
+ static assert(is(double == typeof(EXPR_CONDITIONAL())));
++ static assert(is(int == typeof(EXPR_WCHAR_MAX())));
++ static assert(is(int == typeof(EXPR_WCHAR_MIN())));
+ }
+diff --git a/Examples/test-suite/d/preproc_constants_runme.1.d b/Examples/test-suite/d/preproc_constants_runme.1.d
+index 009405f..f743f48 100644
+--- a/Examples/test-suite/d/preproc_constants_runme.1.d
++++ b/Examples/test-suite/d/preproc_constants_runme.1.d
+@@ -60,4 +60,6 @@ void main() {
+ static assert(is(bool == typeof(EXPR_LAND())));
+ static assert(is(bool == typeof(EXPR_LOR())));
+ static assert(is(double == typeof(EXPR_CONDITIONAL())));
++ static assert(is(int == typeof(EXPR_WCHAR_MAX())));
++ static assert(is(int == typeof(EXPR_WCHAR_MIN())));
+ }
+diff --git a/Examples/test-suite/d/preproc_constants_runme.2.d b/Examples/test-suite/d/preproc_constants_runme.2.d
+index 2d92ef0..0d96c37 100644
+--- a/Examples/test-suite/d/preproc_constants_runme.2.d
++++ b/Examples/test-suite/d/preproc_constants_runme.2.d
+@@ -60,4 +60,6 @@ void main() {
+ static assert(is(bool == typeof(EXPR_LAND())));
+ static assert(is(bool == typeof(EXPR_LOR())));
+ static assert(is(double == typeof(EXPR_CONDITIONAL())));
++ static assert(is(int == typeof(EXPR_WCHAR_MAX())));
++ static assert(is(int == typeof(EXPR_WCHAR_MIN())));
+ }
+diff --git a/Examples/test-suite/php/preproc_constants_c_runme.php b/Examples/test-suite/php/preproc_constants_c_runme.php
+index af9b76e..e59fe18 100644
+--- a/Examples/test-suite/php/preproc_constants_c_runme.php
++++ b/Examples/test-suite/php/preproc_constants_c_runme.php
+@@ -62,5 +62,7 @@ check::equal(gettype(preproc_constants_c::EXPR_OR), "integer", "preproc_constant
+ check::equal(gettype(preproc_constants_c::EXPR_LAND), "integer", "preproc_constants.EXPR_LAND has unexpected type");
+ check::equal(gettype(preproc_constants_c::EXPR_LOR), "integer", "preproc_constants.EXPR_LOR has unexpected type");
+ check::equal(gettype(preproc_constants_c::EXPR_CONDITIONAL), "double", "preproc_constants.EXPR_CONDITIONAL has unexpected type");
++check::equal(gettype(preproc_constants_c::EXPR_WCHAR_MAX), "integer", "preproc_constants.EXPR_WCHAR_MAX has unexpected type");
++check::equal(gettype(preproc_constants_c::EXPR_WCHAR_MIN), "integer", "preproc_constants.EXPR_WCHAR_MIN has unexpected type");
+
+ ?>
+diff --git a/Examples/test-suite/php/preproc_constants_runme.php b/Examples/test-suite/php/preproc_constants_runme.php
+index 5c9119b..8e117ea 100644
+--- a/Examples/test-suite/php/preproc_constants_runme.php
++++ b/Examples/test-suite/php/preproc_constants_runme.php
+@@ -61,5 +61,7 @@ check::equal(gettype(preproc_constants::EXPR_OR), "integer", "preproc_constants.
+ check::equal(gettype(preproc_constants::EXPR_LAND), "boolean", "preproc_constants.EXPR_LAND has unexpected type");
+ check::equal(gettype(preproc_constants::EXPR_LOR), "boolean", "preproc_constants.EXPR_LOR has unexpected type");
+ check::equal(gettype(preproc_constants::EXPR_CONDITIONAL), "double", "preproc_constants.EXPR_CONDITIONAL has unexpected type");
++check::equal(gettype(preproc_constants::EXPR_WCHAR_MAX), "integer", "preproc_constants.EXPR_WCHAR_MAX has unexpected type");
++check::equal(gettype(preproc_constants::EXPR_WCHAR_MIN), "integer", "preproc_constants.EXPR_WCHAR_MIN has unexpected type");
+
+ ?>
+diff --git a/Examples/test-suite/php5/preproc_constants_c_runme.php b/Examples/test-suite/php5/preproc_constants_c_runme.php
+index 1ea0195..d978fab 100644
+--- a/Examples/test-suite/php5/preproc_constants_c_runme.php
++++ b/Examples/test-suite/php5/preproc_constants_c_runme.php
+@@ -62,5 +62,7 @@ check::equal(gettype(preproc_constants_c::EXPR_OR), "integer", "preproc_constant
+ check::equal(gettype(preproc_constants_c::EXPR_LAND), "integer", "preproc_constants.EXPR_LAND has unexpected type");
+ check::equal(gettype(preproc_constants_c::EXPR_LOR), "integer", "preproc_constants.EXPR_LOR has unexpected type");
+ check::equal(gettype(preproc_constants_c::EXPR_CONDITIONAL), "double", "preproc_constants.EXPR_CONDITIONAL has unexpected type");
++check::equal(gettype(preproc_constants_c::EXPR_WCHAR_MAX), "integer", "preproc_constants.EXPR_WCHAR_MAX has unexpected type");
++check::equal(gettype(preproc_constants_c::EXPR_WCHAR_MIN), "integer", "preproc_constants.EXPR_WCHAR_MIN has unexpected type");
+
+ ?>
+diff --git a/Examples/test-suite/php5/preproc_constants_runme.php b/Examples/test-suite/php5/preproc_constants_runme.php
+index fb9ee4f..7527026 100644
+--- a/Examples/test-suite/php5/preproc_constants_runme.php
++++ b/Examples/test-suite/php5/preproc_constants_runme.php
+@@ -70,5 +70,7 @@ check::equal(gettype(preproc_constants::EXPR_LAND), "integer", "preproc_constant
+ check::equal(gettype(preproc_constants::EXPR_LOR), "integer", "preproc_constants.EXPR_LOR has unexpected type");
+
+ check::equal(gettype(preproc_constants::EXPR_CONDITIONAL), "double", "preproc_constants.EXPR_CONDITIONAL has unexpected type");
++check::equal(gettype(preproc_constants::EXPR_WCHAR_MAX), "integer", "preproc_constants.EXPR_WCHAR_MAX has unexpected type");
++check::equal(gettype(preproc_constants::EXPR_WCHAR_MIN), "integer", "preproc_constants.EXPR_WCHAR_MIN has unexpected type");
+
+ ?>
+diff --git a/Examples/test-suite/preproc_constants.i b/Examples/test-suite/preproc_constants.i
+index 3a999ad..16b44c9 100644
+--- a/Examples/test-suite/preproc_constants.i
++++ b/Examples/test-suite/preproc_constants.i
+@@ -87,6 +87,9 @@
+ #define EXPR_LOR 0xFF || 1
+ #define EXPR_CONDITIONAL true ? 2 : 2.2
+
++#define EXPR_WCHAR_MAX (0x7fffffff + L'\0')
++#define EXPR_WCHAR_MIN (-EXPR_WCHAR_MAX - 1)
++
+ #define EXPR_CHAR_COMPOUND_ADD 'A' + 12
+ #define EXPR_CHAR_COMPOUND_LSHIFT 'B' << 6
+ #define H_SUPPRESS_SCALING_MAGIC (('s'<<24) | ('u'<<16) | ('p'<<8) | 'p')
+diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
+index 2e92cd0..273dadb 100644
+--- a/Source/CParse/parser.y
++++ b/Source/CParse/parser.y
+@@ -194,7 +194,7 @@ int SWIG_cparse_template_reduce(int treduce) {
+ * ----------------------------------------------------------------------------- */
+
+ static int promote_type(int t) {
+- if (t <= T_UCHAR || t == T_CHAR) return T_INT;
++ if (t <= T_UCHAR || t == T_CHAR || t == T_WCHAR) return T_INT;
+ return t;
+ }
+
+--
+2.9.5
+
diff --git a/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch b/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch
new file mode 100644
index 0000000000..a91385916c
--- /dev/null
+++ b/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch
@@ -0,0 +1,191 @@
+From b6c0ef4b8f6e5c089ac7104b3aaba8f1d17b8b82 Mon Sep 17 00:00:00 2001
+From: Olly Betts <olly@survex.com>
+Date: Mon, 11 Jun 2018 15:51:53 +1200
+Subject: [PATCH] [Python] Fix new GCC8 warnings in generated code
+
+Avoid casts between incompatible function types where possible (when
+keyword args are in use, it is not possible to avoid such warnings as
+they are inherent in the design of Python's C API in that particular
+case). Fixes #1259.
+
+Upstream-Status: Backport
+[https://github.com/swig/swig/commit/7f9883011029674553a2a4b623d459f02b512458]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ Lib/python/pyinit.swg | 4 ++--
+ Lib/python/pyrun.swg | 34 ++++++++++++++++++++++++++--------
+ Source/Modules/python.cxx | 26 +++++++++++++-------------
+ 3 files changed, 41 insertions(+), 23 deletions(-)
+
+diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg
+index 2cc5828..6bf68c1 100644
+--- a/Lib/python/pyinit.swg
++++ b/Lib/python/pyinit.swg
+@@ -368,8 +368,8 @@ SWIG_init(void) {
+ (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
+ };
+ static SwigPyGetSet thisown_getset_closure = {
+- (PyCFunction) SwigPyObject_own,
+- (PyCFunction) SwigPyObject_own
++ SwigPyObject_own,
++ SwigPyObject_own
+ };
+ static PyGetSetDef thisown_getset_def = {
+ (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
+diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
+index ab1237f..3d0b1b3 100644
+--- a/Lib/python/pyrun.swg
++++ b/Lib/python/pyrun.swg
+@@ -465,6 +465,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
+ return repr;
+ }
+
++/* We need a version taking two PyObject* parameters so it's a valid
++ * PyCFunction to use in swigobject_methods[]. */
++SWIGRUNTIME PyObject *
++SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
++{
++ return SwigPyObject_repr((SwigPyObject*)v);
++}
++
+ SWIGRUNTIME int
+ SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
+ {
+@@ -594,11 +602,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
+ }
+
+ SWIGRUNTIME PyObject*
+-#ifdef METH_NOARGS
+-SwigPyObject_next(PyObject* v)
+-#else
+ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+-#endif
+ {
+ SwigPyObject *sobj = (SwigPyObject *) v;
+ if (sobj->next) {
+@@ -633,6 +637,20 @@ SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+ return SWIG_Py_Void();
+ }
+
++#ifdef METH_NOARGS
++static PyObject*
++SwigPyObject_disown2(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
++{
++ return SwigPyObject_disown(v);
++}
++
++static PyObject*
++SwigPyObject_acquire2(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
++{
++ return SwigPyObject_acquire(v);
++}
++#endif
++
+ SWIGINTERN PyObject*
+ SwigPyObject_own(PyObject *v, PyObject *args)
+ {
+@@ -673,12 +691,12 @@ SwigPyObject_own(PyObject *v, PyObject *args)
+ #ifdef METH_O
+ static PyMethodDef
+ swigobject_methods[] = {
+- {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
+- {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
++ {(char *)"disown", (PyCFunction)SwigPyObject_disown2, METH_NOARGS, (char *)"releases ownership of the pointer"},
++ {(char *)"acquire", (PyCFunction)SwigPyObject_acquire2,METH_NOARGS, (char *)"acquires ownership of the pointer"},
+ {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+ {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
+ {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
+- {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
++ {(char *)"__repr__",(PyCFunction)SwigPyObject_repr2, METH_NOARGS, (char *)"returns object representation"},
+ {0, 0, 0, 0}
+ };
+ #else
+@@ -689,7 +707,7 @@ swigobject_methods[] = {
+ {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+ {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
+ {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
+- {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
++ {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
+ {0, 0, 0, 0}
+ };
+ #endif
+diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
+index a6801fc..72eaa77 100644
+--- a/Source/Modules/python.cxx
++++ b/Source/Modules/python.cxx
+@@ -1109,7 +1109,7 @@ public:
+ * ------------------------------------------------------------ */
+ int add_pyinstancemethod_new() {
+ String *name = NewString("SWIG_PyInstanceMethod_New");
+- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_O, NULL},\n", name, name);
++ Printf(methods, "\t { \"%s\", %s, METH_O, NULL},\n", name, name);
+ Delete(name);
+ return 0;
+ }
+@@ -2479,17 +2479,17 @@ public:
+ if (!kw) {
+ if (n && funpack) {
+ if (num_required == 0 && num_arguments == 0) {
+- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_NOARGS, ", name, function);
++ Printf(methods, "\t { \"%s\", %s, METH_NOARGS, ", name, function);
+ } else if (num_required == 1 && num_arguments == 1) {
+- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_O, ", name, function);
++ Printf(methods, "\t { \"%s\", %s, METH_O, ", name, function);
+ } else {
+- Printf(methods, "\t { (char *)\"%s\", %s, METH_VARARGS, ", name, function);
++ Printf(methods, "\t { \"%s\", %s, METH_VARARGS, ", name, function);
+ }
+ } else {
+- Printf(methods, "\t { (char *)\"%s\", %s, METH_VARARGS, ", name, function);
++ Printf(methods, "\t { \"%s\", %s, METH_VARARGS, ", name, function);
+ }
+ } else {
+- Printf(methods, "\t { (char *)\"%s\", (PyCFunction) %s, METH_VARARGS | METH_KEYWORDS, ", name, function);
++ Printf(methods, "\t { \"%s\", (PyCFunction)%s, METH_VARARGS|METH_KEYWORDS, ", name, function);
+ }
+
+ if (!n) {
+@@ -3857,7 +3857,7 @@ public:
+ if (shadow) {
+ if (builtin) {
+ String *rname = SwigType_namestr(real_classname);
+- Printf(builtin_methods, " { \"__disown__\", (PyCFunction) Swig::Director::swig_pyobj_disown< %s >, METH_NOARGS, \"\" },\n", rname);
++ Printf(builtin_methods, " { \"__disown__\", Swig::Director::swig_pyobj_disown< %s >, METH_NOARGS, \"\" },\n", rname);
+ Delete(rname);
+ } else {
+ String *symname = Getattr(n, "sym:name");
+@@ -4694,13 +4694,13 @@ public:
+ int argcount = Getattr(n, "python:argcount") ? atoi(Char(Getattr(n, "python:argcount"))) : 2;
+ String *ds = have_docstring(n) ? cdocstring(n, AUTODOC_FUNC) : NewString("");
+ if (check_kwargs(n)) {
+- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_VARARGS|METH_KEYWORDS, (char *) \"%s\" },\n", symname, wname, ds);
++ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, METH_VARARGS|METH_KEYWORDS, \"%s\" },\n", symname, wname, ds);
+ } else if (argcount == 0) {
+- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_NOARGS, (char *) \"%s\" },\n", symname, wname, ds);
++ Printf(builtin_methods, " { \"%s\", %s, METH_NOARGS, \"%s\" },\n", symname, wname, ds);
+ } else if (argcount == 1) {
+- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_O, (char *) \"%s\" },\n", symname, wname, ds);
++ Printf(builtin_methods, " { \"%s\", %s, METH_O, \"%s\" },\n", symname, wname, ds);
+ } else {
+- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_VARARGS, (char *) \"%s\" },\n", symname, wname, ds);
++ Printf(builtin_methods, " { \"%s\", %s, METH_VARARGS, \"%s\" },\n", symname, wname, ds);
+ }
+ Delete(fullname);
+ Delete(wname);
+@@ -4801,10 +4801,10 @@ public:
+ Append(pyflags, "METH_VARARGS");
+ if (have_docstring(n)) {
+ String *ds = cdocstring(n, AUTODOC_STATICFUNC);
+- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, %s, (char *) \"%s\" },\n", symname, wname, pyflags, ds);
++ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, %s, \"%s\" },\n", symname, wname, pyflags, ds);
+ Delete(ds);
+ } else {
+- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, %s, \"\" },\n", symname, wname, pyflags);
++ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, %s, \"\" },\n", symname, wname, pyflags);
+ }
+ Delete(fullname);
+ Delete(wname);
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch b/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch
new file mode 100644
index 0000000000..10e4afd1ba
--- /dev/null
+++ b/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch
@@ -0,0 +1,36 @@
+From 9825fcbab5c4ddd867432f9922bebfbec7b78af0 Mon Sep 17 00:00:00 2001
+From: Mark Dufour <m.dufour@kopano.com>
+Date: Tue, 14 Feb 2017 10:34:37 +0100
+Subject: [PATCH] [Coverity] fix issue reported for SWIG_Python_FixMethods
+
+Fix Coverity issue reported for SWIG_Python_FixMethods:
+
+"buffer_size: Calling strncpy with a source string whose length
+(10 chars) is greater than or equal to the size argument (10)
+will fail to null-terminate buff."
+
+The issue is only reported for the "swig_ptr: " line, but for
+consistency we replace both occurrences of strncpy with memcpy.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/swig/swig/pull/898]
+
+ Lib/python/pyinit.swg | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: swig-3.0.12/Lib/python/pyinit.swg
+===================================================================
+--- swig-3.0.12.orig/Lib/python/pyinit.swg
++++ swig-3.0.12/Lib/python/pyinit.swg
+@@ -306,9 +306,9 @@ SWIG_Python_FixMethods(PyMethodDef *meth
+ char *ndoc = (char*)malloc(ldoc + lptr + 10);
+ if (ndoc) {
+ char *buff = ndoc;
+- strncpy(buff, methods[i].ml_doc, ldoc);
++ memcpy(buff, methods[i].ml_doc, ldoc);
+ buff += ldoc;
+- strncpy(buff, "swig_ptr: ", 10);
++ memcpy(buff, "swig_ptr: ", 10);
+ buff += 10;
+ SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+ methods[i].ml_doc = ndoc;
diff --git a/meta/recipes-devtools/swig/swig_3.0.12.bb b/meta/recipes-devtools/swig/swig_3.0.12.bb
new file mode 100644
index 0000000000..45026c9700
--- /dev/null
+++ b/meta/recipes-devtools/swig/swig_3.0.12.bb
@@ -0,0 +1,12 @@
+require ${BPN}.inc
+
+SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
+ file://0001-configure-use-pkg-config-for-pcre-detection.patch \
+ file://0001-Add-Node-7.x-aka-V8-5.2-support.patch \
+ file://swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch \
+ file://Python-Fix-new-GCC8-warnings-in-generated-code.patch \
+ file://0001-Fix-generated-code-for-constant-expressions-containi.patch \
+ "
+SRC_URI[md5sum] = "82133dfa7bba75ff9ad98a7046be687c"
+SRC_URI[sha256sum] = "7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d"
+
diff --git a/meta/recipes-devtools/swig/swig_3.0.8.bb b/meta/recipes-devtools/swig/swig_3.0.8.bb
deleted file mode 100644
index c1b820e0d0..0000000000
--- a/meta/recipes-devtools/swig/swig_3.0.8.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
- file://0001-configure-use-pkg-config-for-pcre-detection.patch \
- "
-SRC_URI[md5sum] = "c96a1d5ecb13d38604d7e92148c73c97"
-SRC_URI[sha256sum] = "58a475dbbd4a4d7075e5fe86d4e54c9edde39847cdb96a3053d87cb64a23a453"
-
diff --git a/meta/recipes-devtools/syslinux/syslinux/0001-install-don-t-install-obsolete-file-com32.ld.patch b/meta/recipes-devtools/syslinux/syslinux/0001-install-don-t-install-obsolete-file-com32.ld.patch
new file mode 100644
index 0000000000..bfd7f41b13
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0001-install-don-t-install-obsolete-file-com32.ld.patch
@@ -0,0 +1,32 @@
+From bf6db5b48ec25f83939f1fdebb59028bc3c40b00 Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
+Date: Wed, 6 Feb 2019 11:30:51 -0800
+Subject: [PATCH] install: don't install obsolete file com32.ld
+
+com32.ld has been obsolete for a long time, and has been removed now;
+don't install it either.
+
+Reported-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
+Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
+
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ com32/lib/Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/com32/lib/Makefile b/com32/lib/Makefile
+index 74fff149..6a931492 100644
+--- a/com32/lib/Makefile
++++ b/com32/lib/Makefile
+@@ -113,7 +113,6 @@ spotless: clean
+
+ install: all
+ mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR)
+- install -m 644 $(SRC)/com32.ld $(INSTALLROOT)$(COM32DIR)
+ -rm -rf $(INSTALLROOT)$(COM32DIR)/include
+ cp -r $(SRC)/../include $(INSTALLROOT)$(COM32DIR)
+
+--
+2.17.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
index 2400c98d6a..f1d01fa43c 100644
--- 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
@@ -1,8 +1,7 @@
-From 78d76b87a4b855e6b661ae457283a63f385c04c9 Mon Sep 17 00:00:00 2001
+From efce87e5ab98664c57e5f4e3955a2f3747df5737 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()
+Subject: [PATCH] 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
@@ -12,17 +11,21 @@ Upstream-Status: Submitted
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Tested-by: Du Dolpher <dolpher.du@intel.com>
+
+Edited to include sysmacros.h
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
extlinux/Makefile | 3 +-
- extlinux/main.c | 167 +-------------------------------------------
- libinstaller/syslinuxext.c | 170 +++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 175 insertions(+), 165 deletions(-)
+ extlinux/main.c | 167 +-----------------------------------
+ libinstaller/syslinuxext.c | 171 +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 176 insertions(+), 165 deletions(-)
diff --git a/extlinux/Makefile b/extlinux/Makefile
-index 02d1db5..90dd92f 100644
+index 1721ee54..62a49728 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
-@@ -31,7 +31,8 @@ SRCS = main.c \
+@@ -32,7 +32,8 @@ SRCS = main.c \
../libinstaller/advio.c \
../libinstaller/bootsect_bin.c \
../libinstaller/ldlinuxc32_bin.c \
@@ -33,10 +36,10 @@ index 02d1db5..90dd92f 100644
.SUFFIXES: .c .o .i .s .S
diff --git a/extlinux/main.c b/extlinux/main.c
-index 09740bd..6fe026e 100644
+index ebff7eae..9add50fb 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
-@@ -60,6 +60,7 @@
+@@ -62,6 +62,7 @@
#include "setadv.h"
#include "syslxopt.h" /* unified options */
#include "mountinfo.h"
@@ -44,7 +47,7 @@ index 09740bd..6fe026e 100644
#ifdef DEBUG
# define dprintf printf
-@@ -67,10 +68,6 @@
+@@ -69,10 +70,6 @@
# define dprintf(...) ((void)0)
#endif
@@ -55,10 +58,11 @@ index 09740bd..6fe026e 100644
/* 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];
+@@ -93,136 +90,6 @@ static char subvol[BTRFS_SUBVOL_MAX];
+ #define BTRFS_ADV_OFFSET (BTRFS_BOOT_AREA_A_OFFSET + BTRFS_BOOT_AREA_A_SIZE \
- 2*ADV_SIZE)
- /*
+-/*
- * Get the size of a block device
- */
-static uint64_t get_size(int devfd)
@@ -188,11 +192,10 @@ index 09740bd..6fe026e 100644
- 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:
+@@ -233,11 +100,8 @@ ok:
static int patch_file_and_bootblock(int fd, const char *dir, int devfd)
{
struct stat dirst, xdst;
@@ -204,7 +207,7 @@ index 09740bd..6fe026e 100644
char *dirpath, *subpath, *xdirpath;
int rv;
-@@ -279,33 +143,8 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd)
+@@ -281,33 +145,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);
@@ -241,14 +244,15 @@ index 09740bd..6fe026e 100644
/* Construct the boot file map */
diff --git a/libinstaller/syslinuxext.c b/libinstaller/syslinuxext.c
-index bb54cef..5a4423b 100644
+index bb54cefc..9ae82884 100644
--- a/libinstaller/syslinuxext.c
+++ b/libinstaller/syslinuxext.c
-@@ -1,7 +1,177 @@
+@@ -1,7 +1,178 @@
#define _GNU_SOURCE
+#include <sys/stat.h>
+#include <sys/types.h>
++#include <sys/sysmacros.h>
+#include <getopt.h>
+#include <ext2fs/ext2fs.h>
+
@@ -423,5 +427,5 @@ index bb54cef..5a4423b 100644
}
--
-1.9.1
+2.17.1
diff --git a/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch b/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch
deleted file mode 100644
index 6279258c2e..0000000000
--- a/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-don't break with old compilers and -DGNU_EFI_USE_MS_ABI
-It's entirely legitimate to request GNU_EFI_USE_MS_ABI even if the current
-compiler doesn't support it, and gnu-efi should transparently fall back to
-using legacy techniques to set the calling convention. We don't get type
-checking, but at least it will still compile.
-
-Adapted from gnu-efi
-
-Author: Steve Langasek <steve.langasek@ubuntu.com>
-Upstream-Status: Pending
-
-Index: syslinux-6.03/efi64/include/efi/x86_64/efibind.h
-===================================================================
---- syslinux-6.03.orig/efi64/include/efi/x86_64/efibind.h
-+++ syslinux-6.03/efi64/include/efi/x86_64/efibind.h
-@@ -25,8 +25,6 @@ Revision History
- #if defined(GNU_EFI_USE_MS_ABI)
- #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
- #define HAVE_USE_MS_ABI 1
-- #else
-- #error Compiler is too old for GNU_EFI_USE_MS_ABI
- #endif
- #endif
-
-Index: syslinux-6.03/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h
-===================================================================
---- syslinux-6.03.orig/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h
-+++ syslinux-6.03/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h
-@@ -25,8 +25,6 @@ Revision History
- #if defined(GNU_EFI_USE_MS_ABI)
- #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
- #define HAVE_USE_MS_ABI 1
-- #else
-- #error Compiler is too old for GNU_EFI_USE_MS_ABI
- #endif
- #endif
-
diff --git a/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch b/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch
deleted file mode 100644
index 443c1ccc58..0000000000
--- a/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0f3d83c25491951f1fa84c7957358ef3d1bcd8a9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Sep 2015 17:39:22 +0000
-Subject: [PATCH] mk: -MMD does not take any arguments
-
-Specify -Wp for each option, clang seems to not accept
--Wp,-x,y,-a,b
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- mk/syslinux.mk | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: syslinux-6.03/mk/syslinux.mk
-===================================================================
---- syslinux-6.03.orig/mk/syslinux.mk
-+++ syslinux-6.03/mk/syslinux.mk
-@@ -82,11 +82,11 @@ ARCH ?= $(strip $(SUBARCH))
- GCCWARN = -W -Wall -Wstrict-prototypes $(DEBUGOPT)
-
- # Common stanza to make gcc generate .*.d dependency files
--MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d
-+MAKEDEPS = -MT $@ -MD
-
- # Dependencies that exclude system headers; use whenever we use
- # header files from the platform.
--UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d
-+UMAKEDEPS = -MT $@ -MMD
-
- # Items that are only appropriate during development; this file is
- # removed when tarballs are generated.
diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch
deleted file mode 100644
index 312b1e8aed..0000000000
--- a/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-syslinux-native: fix parallel building issue
-
-There might be an error when parallel build:
-
-[snip]
-cp: cannot create directory `tmp/sysroots/x86_64-linux/usr/share/
-syslinux/com32/include/gplinclude': No such file or directory
-make[4]: *** [install] Error 1
-make[3]: *** [gpllib] Error 2
-[snip]
-
-This is a potential issue. In ${S}/com32/gpllib/Makefile file,
-install target wants to copy $(SRC)/../gplinclude to
-$(INSTALLROOT)$(COM32DIR)/include/ directory, but in ${S}/com32/lib/Makefile
-file, the install target will remove $(INSTALLROOT)$(COM32DIR)/include
-directory. We need to do com32/lib first.
-
-The patch make com32/gpllib depends on com32/lib to fix this issue.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- com32/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-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: lib libutil libupload gpllib
- lua/src: cmenu modules
-+gpllib: lib
diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
deleted file mode 100644
index c0714b5175..0000000000
--- a/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 490fc3bbd65c2c252c1fdf3da0fac9898aa9eea6 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Fri, 15 Aug 2014 21:09:16 -0700
-Subject: [PATCH] com32/Makefile: fix parallel issue
-
-Fixed:
-cp -r syslinux-6.01/com32/libupload/*.h image/usr/share/syslinux/com32/include/
-[snip]
-rm -rf image/usr/share/syslinux/com32/include
-[snip]
-cp: cannot create regular file `image/usr/share/syslinux/com32/include/serial.h': No such file or directory
-
-The cp is happened in the "libupload" dir, while "rm -fr" is happend in
-"lib" dir, let "libupload" depend "lib" will fix the problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- com32/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/com32/Makefile b/com32/Makefile
-index 9a1721b..f172db2 100644
---- a/com32/Makefile
-+++ b/com32/Makefile
-@@ -21,3 +21,4 @@ rosh: lib libutil
- samples: libutil elflink/ldlinux
- sysdump: libupload gpllib
- gpllib: lib
-+libupload: lib
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.03.bb b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
deleted file mode 100644
index ab8a51a23f..0000000000
--- a/meta/recipes-devtools/syslinux/syslinux_6.03.bb
+++ /dev/null
@@ -1,89 +0,0 @@
-SUMMARY = "Multi-purpose linux bootloader"
-HOMEPAGE = "http://syslinux.zytor.com/"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a"
-
-# 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 e2fsprogs"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/syslinux-${PV}.tar.xz \
- file://syslinux-fix-parallel-building-issue.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 \
- file://0010-gcc46-compatibility.patch \
- file://0011-mk-MMD-does-not-take-any-arguments.patch \
- "
-
-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
-INSANE_SKIP_${PN}-misc = "arch"
-INSANE_SKIP_${PN}-chain = "arch"
-
-EXTRA_OEMAKE = " \
- BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
- DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
-"
-
-do_configure() {
- # drop win32 targets or build fails
- sed -e 's,win32/\S*,,g' -i Makefile
-
- # clean installer executables included in source tarball
- oe_runmake clean firmware="efi32" EFIINC="${includedir}"
- # NOTE: There is a temporary work around above to specify
- # the efi32 as the firmware else the pre-built bios
- # files get erased contrary to the doc/distib.txt
- # In the future this should be "bios" and not "efi32".
-}
-
-do_compile() {
- # Make sure the recompile is OK.
- # Though the ${B} should always exist, still check it before find and rm.
- [ -d "${B}" ] && find ${B} -name '.*.d' -type f -exec rm -f {} \;
-
- # Rebuild only the installer; keep precompiled bootloaders
- # as per author's request (doc/distrib.txt)
- oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
-}
-
-do_install() {
- oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" install INSTALLROOT="${D}" firmware="bios"
-
- install -d ${D}${datadir}/syslinux/
- install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
- install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/
- install -m 755 ${S}/bios/linux/syslinux-nomtools ${D}${bindir}/
-}
-
-PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
-
-RDEPENDS_${PN} += "mtools"
-RDEPENDS_${PN}-nomtools += "libext2fs"
-RDEPENDS_${PN}-misc += "perl"
-
-FILES_${PN} = "${bindir}/syslinux"
-FILES_${PN}-nomtools = "${bindir}/syslinux-nomtools"
-FILES_${PN}-extlinux = "${sbindir}/extlinux"
-FILES_${PN}-mbr = "${datadir}/${BPN}/mbr.bin"
-FILES_${PN}-chain = "${datadir}/${BPN}/chain.c32"
-FILES_${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin"
-FILES_${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0"
-FILES_${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld"
-FILES_${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a"
-FILES_${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
new file mode 100644
index 0000000000..e9dbefb930
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
@@ -0,0 +1,106 @@
+SUMMARY = "Multi-purpose linux bootloader"
+HOMEPAGE = "http://www.syslinux.org/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a"
+
+# 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 e2fsprogs"
+PV = "6.04-pre2"
+
+SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz \
+ 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 \
+ file://0001-install-don-t-install-obsolete-file-com32.ld.patch \
+ "
+
+SRC_URI[md5sum] = "2b31c78f087f99179feb357da312d7ec"
+SRC_URI[sha256sum] = "4441a5d593f85bb6e8d578cf6653fb4ec30f9e8f4a2315a3d8f2d0a8b3fadf94"
+
+UPSTREAM_CHECK_URI = "https://www.zytor.com/pub/syslinux/"
+UPSTREAM_CHECK_REGEX = "syslinux-(?P<pver>.+)\.tar"
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
+# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
+INSANE_SKIP_${PN}-misc = "arch"
+INSANE_SKIP_${PN}-chain = "arch"
+
+EXTRA_OEMAKE = " \
+ BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
+ DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
+"
+
+do_configure() {
+ # drop win32 targets or build fails
+ sed -e 's,win32/\S*,,g' -i Makefile
+
+ # clean installer executables included in source tarball
+ oe_runmake clean firmware="efi32" EFIINC="${includedir}"
+ # NOTE: There is a temporary work around above to specify
+ # the efi32 as the firmware else the pre-built bios
+ # files get erased contrary to the doc/distib.txt
+ # In the future this should be "bios" and not "efi32".
+}
+
+do_compile() {
+ # Make sure the recompile is OK.
+ # Though the ${B} should always exist, still check it before find and rm.
+ [ -d "${B}" ] && find ${B} -name '.*.d' -type f -exec rm -f {} \;
+
+ # Rebuild only the installer; keep precompiled bootloaders
+ # as per author's request (doc/distrib.txt)
+ oe_runmake CC="${CC} ${CFLAGS}" \
+ LD="${LD}" LDFLAGS="${LDFLAGS}" \
+ OBJDUMP="${OBJDUMP}" \
+ OBJCOPY="${OBJCOPY}" \
+ AR="${AR}" \
+ STRIP="${STRIP}" \
+ NM="${NM}" \
+ RANLIB="${RANLIB}" \
+ firmware="bios" installer
+}
+
+do_install() {
+ oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" \
+ OBJDUMP="${OBJDUMP}" \
+ OBJCOPY="${OBJCOPY}" \
+ AR="${AR}" \
+ STRIP="${STRIP}" \
+ NM="${NM}" \
+ RANLIB="${RANLIB}" \
+ firmware="bios" install INSTALLROOT="${D}"
+
+ install -d ${D}${datadir}/syslinux/
+ install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
+ install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/
+ install -m 755 ${S}/bios/linux/syslinux-nomtools ${D}${bindir}/
+}
+
+PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
+
+RDEPENDS_${PN} += "mtools"
+RDEPENDS_${PN}-nomtools += "libext2fs"
+RDEPENDS_${PN}-misc += "perl"
+
+FILES_${PN} = "${bindir}/syslinux"
+FILES_${PN}-nomtools = "${bindir}/syslinux-nomtools"
+FILES_${PN}-extlinux = "${sbindir}/extlinux"
+FILES_${PN}-mbr = "${datadir}/${BPN}/mbr.bin"
+FILES_${PN}-chain = "${datadir}/${BPN}/chain.c32"
+FILES_${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin"
+FILES_${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0"
+FILES_${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld"
+FILES_${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a"
+FILES_${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch
new file mode 100644
index 0000000000..fc03812bb9
--- /dev/null
+++ b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch
@@ -0,0 +1,45 @@
+From 4a6ace0a965965ea15e88c3418c7158ca5cc9f8f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Nov 2019 10:12:05 -0800
+Subject: [PATCH] architecture: Recognise RISCV-32/RISCV-64
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/171b53380085b1288b03b19a2b978f36a5c003d0]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/architecture.h | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/src/architecture.h b/src/architecture.h
+index 26679e2..89c7d32 100644
+--- a/src/architecture.h
++++ b/src/architecture.h
+@@ -57,6 +57,8 @@ enum {
+ ARCHITECTURE_M68K,
+ ARCHITECTURE_TILEGX,
+ ARCHITECTURE_CRIS,
++ ARCHITECTURE_RISCV32,
++ ARCHITECTURE_RISCV64,
+ _ARCHITECTURE_MAX,
+ _ARCHITECTURE_INVALID = -1
+ };
+@@ -194,6 +196,17 @@ int uname_architecture(void);
+ #elif defined(__cris__)
+ # define native_architecture() ARCHITECTURE_CRIS
+ # error "Missing LIB_ARCH_TUPLE for CRIS"
++#elif defined(__riscv)
++# if __SIZEOF_POINTER__ == 4
++# define native_architecture() ARCHITECTURE_RISCV32
++# define LIB_ARCH_TUPLE "riscv32-linux-gnu"
++# elif __SIZEOF_POINTER__ == 8
++# define native_architecture() ARCHITECTURE_RISCV64
++# define LIB_ARCH_TUPLE "riscv64-linux-gnu"
++# else
++# error "Unrecognized riscv architecture variant"
++# endif
++# define PROC_CPUINFO_MODEL "cpu model"
+ #else
+ # error "Please register your architecture here!"
+ #endif
+--
+2.24.0
+
diff --git a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
new file mode 100644
index 0000000000..f392ceafcc
--- /dev/null
+++ b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -0,0 +1,36 @@
+From 45b401a947af944c20b3c451a35dfe53bca5ef3b Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 21:24:57 -0800
+Subject: [PATCH 1/3] comparison_fn_t is glibc specific, use raw signature in
+ function pointer
+
+Make it work with musl where comparison_fn_t is not provided
+
+Reuse the approach from systemd:
+systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
+
+Based on work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ src/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util.h b/src/util.h
+index 561f9e7..e9cfd81 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -57,7 +57,7 @@ extern char **saved_argv;
+ * Normal qsort requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
++static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
+ if (nmemb <= 1)
+ return;
+
+--
+2.13.6
+
diff --git a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
new file mode 100644
index 0000000000..196272f7a2
--- /dev/null
+++ b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
@@ -0,0 +1,423 @@
+From 6f9454184a02310802b1ed3e40287958b524a495 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 21:39:51 -0800
+Subject: [PATCH 2/3] musl does not provide printf.h
+
+Reuse the approach from systemd:
+systemd/0001-add-fallback-parse_printf_format-implementation.patch
+
+Original patch author: Emil Renner Berthing <systemd@esmil.dk>
+Includes work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ Makefile.am | 4 +
+ configure.ac | 3 +
+ src/log.c | 1 +
+ src/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++++++++
+ src/parse-printf-format.h | 57 ++++++++++
+ src/stdio-util.h | 1 -
+ 6 files changed, 338 insertions(+), 1 deletion(-)
+ create mode 100644 src/parse-printf-format.c
+ create mode 100644 src/parse-printf-format.h
+
+diff --git a/Makefile.am b/Makefile.am
+index 9bbc8fa..b887d16 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -169,6 +169,10 @@ libutils_la_SOURCES = \
+ src/util.c \
+ src/util.h
+
++if !HAVE_PRINTF_H
++libutils_la_SOURCES += src/parse-printf-format.c
++endif
++
+ libutils_la_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(LIBSYSTEMD_CFLAGS)
+diff --git a/configure.ac b/configure.ac
+index 7f74bac..062e310 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -73,6 +73,9 @@ AS_IF([test "x$with_libsystemd" != xno],
+ )]
+ )
+
++AC_CHECK_HEADERS([printf.h], [], [])
++AM_CONDITIONAL(HAVE_PRINTF_H, [test "x$ac_cv_header_print_h" = xyes])
++
+ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+ -pipe \
+ -Wall \
+diff --git a/src/log.c b/src/log.c
+index 15dec83..aecf231 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -28,6 +28,7 @@
+ #include <sys/uio.h>
+ #include <unistd.h>
+
++#include "parse-printf-format.h"
+ #include "sd-messages.h"
+
+ #include "fd-util.h"
+diff --git a/src/parse-printf-format.c b/src/parse-printf-format.c
+new file mode 100644
+index 0000000..49437e5
+--- /dev/null
++++ b/src/parse-printf-format.c
+@@ -0,0 +1,273 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the musl C library
++ Copyright 2005-2014 Rich Felker, et al.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#include <stddef.h>
++#include <string.h>
++
++#include "parse-printf-format.h"
++
++static const char *consume_nonarg(const char *fmt)
++{
++ do {
++ if (*fmt == '\0')
++ return fmt;
++ } while (*fmt++ != '%');
++ return fmt;
++}
++
++static const char *consume_num(const char *fmt)
++{
++ for (;*fmt >= '0' && *fmt <= '9'; fmt++)
++ /* do nothing */;
++ return fmt;
++}
++
++static const char *consume_argn(const char *fmt, size_t *arg)
++{
++ const char *p = fmt;
++ size_t val = 0;
++
++ if (*p < '1' || *p > '9')
++ return fmt;
++ do {
++ val = 10*val + (*p++ - '0');
++ } while (*p >= '0' && *p <= '9');
++
++ if (*p != '$')
++ return fmt;
++ *arg = val;
++ return p+1;
++}
++
++static const char *consume_flags(const char *fmt)
++{
++ while (1) {
++ switch (*fmt) {
++ case '#':
++ case '0':
++ case '-':
++ case ' ':
++ case '+':
++ case '\'':
++ case 'I':
++ fmt++;
++ continue;
++ }
++ return fmt;
++ }
++}
++
++enum state {
++ BARE,
++ LPRE,
++ LLPRE,
++ HPRE,
++ HHPRE,
++ BIGLPRE,
++ ZTPRE,
++ JPRE,
++ STOP
++};
++
++enum type {
++ NONE,
++ PTR,
++ INT,
++ UINT,
++ ULLONG,
++ LONG,
++ ULONG,
++ SHORT,
++ USHORT,
++ CHAR,
++ UCHAR,
++ LLONG,
++ SIZET,
++ IMAX,
++ UMAX,
++ PDIFF,
++ UIPTR,
++ DBL,
++ LDBL,
++ MAXTYPE
++};
++
++static const short pa_types[MAXTYPE] = {
++ [NONE] = PA_INT,
++ [PTR] = PA_POINTER,
++ [INT] = PA_INT,
++ [UINT] = PA_INT,
++ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [LONG] = PA_INT | PA_FLAG_LONG,
++ [ULONG] = PA_INT | PA_FLAG_LONG,
++ [SHORT] = PA_INT | PA_FLAG_SHORT,
++ [USHORT] = PA_INT | PA_FLAG_SHORT,
++ [CHAR] = PA_CHAR,
++ [UCHAR] = PA_CHAR,
++ [LLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [SIZET] = PA_INT | PA_FLAG_LONG,
++ [IMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [UMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG,
++ [UIPTR] = PA_INT | PA_FLAG_LONG,
++ [DBL] = PA_DOUBLE,
++ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
++};
++
++#define S(x) [(x)-'A']
++#define E(x) (STOP + (x))
++
++static const unsigned char states[]['z'-'A'+1] = {
++ { /* 0: bare types */
++ S('d') = E(INT), S('i') = E(INT),
++ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(CHAR),S('C') = E(INT),
++ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
++ S('m') = E(NONE),
++ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE,
++ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE
++ }, { /* 1: l-prefixed */
++ S('d') = E(LONG), S('i') = E(LONG),
++ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR),
++ S('l') = LLPRE
++ }, { /* 2: ll-prefixed */
++ S('d') = E(LLONG), S('i') = E(LLONG),
++ S('o') = E(ULLONG),S('u') = E(ULLONG),
++ S('x') = E(ULLONG),S('X') = E(ULLONG),
++ S('n') = E(PTR)
++ }, { /* 3: h-prefixed */
++ S('d') = E(SHORT), S('i') = E(SHORT),
++ S('o') = E(USHORT),S('u') = E(USHORT),
++ S('x') = E(USHORT),S('X') = E(USHORT),
++ S('n') = E(PTR),
++ S('h') = HHPRE
++ }, { /* 4: hh-prefixed */
++ S('d') = E(CHAR), S('i') = E(CHAR),
++ S('o') = E(UCHAR),S('u') = E(UCHAR),
++ S('x') = E(UCHAR),S('X') = E(UCHAR),
++ S('n') = E(PTR)
++ }, { /* 5: L-prefixed */
++ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
++ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
++ S('n') = E(PTR)
++ }, { /* 6: z- or t-prefixed (assumed to be same size) */
++ S('d') = E(PDIFF),S('i') = E(PDIFF),
++ S('o') = E(SIZET),S('u') = E(SIZET),
++ S('x') = E(SIZET),S('X') = E(SIZET),
++ S('n') = E(PTR)
++ }, { /* 7: j-prefixed */
++ S('d') = E(IMAX), S('i') = E(IMAX),
++ S('o') = E(UMAX), S('u') = E(UMAX),
++ S('x') = E(UMAX), S('X') = E(UMAX),
++ S('n') = E(PTR)
++ }
++};
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types)
++{
++ size_t i = 0;
++ size_t last = 0;
++
++ memset(types, 0, n);
++
++ while (1) {
++ size_t arg;
++ unsigned int state;
++
++ fmt = consume_nonarg(fmt);
++ if (*fmt == '\0')
++ break;
++ if (*fmt == '%') {
++ fmt++;
++ continue;
++ }
++ arg = 0;
++ fmt = consume_argn(fmt, &arg);
++ /* flags */
++ fmt = consume_flags(fmt);
++ /* width */
++ if (*fmt == '*') {
++ size_t warg = 0;
++ fmt = consume_argn(fmt+1, &warg);
++ if (warg == 0)
++ warg = ++i;
++ if (warg > last)
++ last = warg;
++ if (warg <= n && types[warg-1] == NONE)
++ types[warg-1] = INT;
++ } else
++ fmt = consume_num(fmt);
++ /* precision */
++ if (*fmt == '.') {
++ fmt++;
++ if (*fmt == '*') {
++ size_t parg = 0;
++ fmt = consume_argn(fmt+1, &parg);
++ if (parg == 0)
++ parg = ++i;
++ if (parg > last)
++ last = parg;
++ if (parg <= n && types[parg-1] == NONE)
++ types[parg-1] = INT;
++ } else {
++ if (*fmt == '-')
++ fmt++;
++ fmt = consume_num(fmt);
++ }
++ }
++ /* length modifier and conversion specifier */
++ state = BARE;
++ do {
++ unsigned char c = *fmt++;
++
++ if (c < 'A' || c > 'z')
++ continue;
++ state = states[state]S(c);
++ if (state == 0)
++ continue;
++ } while (state < STOP);
++
++ if (state == E(NONE))
++ continue;
++
++ if (arg == 0)
++ arg = ++i;
++ if (arg > last)
++ last = arg;
++ if (arg <= n)
++ types[arg-1] = state - STOP;
++ }
++
++ if (last > n)
++ last = n;
++ for (i = 0; i < last; i++)
++ types[i] = pa_types[types[i]];
++
++ return last;
++}
+diff --git a/src/parse-printf-format.h b/src/parse-printf-format.h
+new file mode 100644
+index 0000000..4371177
+--- /dev/null
++++ b/src/parse-printf-format.h
+@@ -0,0 +1,57 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the GNU C Library
++ Copyright 1991-2014 Free Software Foundation, Inc.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#pragma once
++
++#include "config.h"
++
++#ifdef HAVE_PRINTF_H
++#include <printf.h>
++#else
++
++#include <stddef.h>
++
++enum { /* C type: */
++ PA_INT, /* int */
++ PA_CHAR, /* int, cast to char */
++ PA_WCHAR, /* wide char */
++ PA_STRING, /* const char *, a '\0'-terminated string */
++ PA_WSTRING, /* const wchar_t *, wide character string */
++ PA_POINTER, /* void * */
++ PA_FLOAT, /* float */
++ PA_DOUBLE, /* double */
++ PA_LAST
++};
++
++/* Flag bits that can be set in a type returned by `parse_printf_format'. */
++#define PA_FLAG_MASK 0xff00
++#define PA_FLAG_LONG_LONG (1 << 8)
++#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
++#define PA_FLAG_LONG (1 << 9)
++#define PA_FLAG_SHORT (1 << 10)
++#define PA_FLAG_PTR (1 << 11)
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types);
++
++#endif /* HAVE_PRINTF_H */
+diff --git a/src/stdio-util.h b/src/stdio-util.h
+index 0a67557..21cc515 100644
+--- a/src/stdio-util.h
++++ b/src/stdio-util.h
+@@ -19,7 +19,6 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <printf.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+--
+2.13.6
+
diff --git a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
new file mode 100644
index 0000000000..7670d95f07
--- /dev/null
+++ b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
@@ -0,0 +1,33 @@
+From 79396449d264bde58b4daa3ef6dd99f0f0652429 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 22:10:58 -0800
+Subject: [PATCH 3/3] musl does not provide canonicalize_file_name
+
+Reuse the approach from systemd:
+systemd/0007-check-for-missing-canonicalize_file_name.patch
+
+Based on work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ src/path-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/path-util.c b/src/path-util.c
+index 2fb6366..12e2e17 100644
+--- a/src/path-util.c
++++ b/src/path-util.c
+@@ -63,7 +63,7 @@ char **path_strv_resolve(char **l, const char *prefix) {
+ t = *s;
+
+ errno = 0;
+- u = canonicalize_file_name(t);
++ u = realpath(t, NULL);
+ if (!u) {
+ if (errno == ENOENT) {
+ if (prefix) {
+--
+2.13.6
+
diff --git a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_230.bb b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_230.bb
deleted file mode 100644
index 9ce629a2b2..0000000000
--- a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_230.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-LICENSE = "LGPLv2.1 & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
- file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https"
-
-# Modify these as desired
-PV = "230+git${SRCPV}"
-SRCREV = "dcb246b46239259ec99b3c6e6ab7d27e1a5a8a84"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "systemd libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native intltool"
-
-inherit pkgconfig autotools systemd distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "systemd"
-
-SYSTEMD_SERVICE_${PN} = "systemd-bootchart.service"
-
-do_configure_prepend() {
- # intltool.m4 is a soft link to /usr/share/aclocal/m4, delete it and use the one in our sysroot
- rm -f ${S}/m4/intltool.m4
-}
-
-FILES_${PN} += "${systemd_unitdir}/systemd-bootchart"
-
-EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
- --with-rootlibdir=${base_libdir}"
diff --git a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
new file mode 100644
index 0000000000..960edc75e6
--- /dev/null
+++ b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
@@ -0,0 +1,38 @@
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
+ file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \
+ file://0001-architecture-Recognise-RISCV-32-RISCV-64.patch \
+"
+
+SRC_URI_append_libc-musl = " \
+ file://0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
+ file://0002-musl-does-not-provide-printf-h.patch \
+ file://0003-musl-does-not-provide-canonicalize_file_name.patch \
+ "
+
+
+# Modify these as desired
+PV = "233+git${SRCPV}"
+SRCREV = "fe1c5e41e6bdb78043dad8fa863fc2df66d1dadf"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "systemd libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native intltool"
+
+inherit pkgconfig autotools systemd features_check
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SYSTEMD_SERVICE_${PN} = "systemd-bootchart.service"
+
+do_configure_prepend() {
+ # intltool.m4 is a soft link to /usr/share/aclocal/m4, delete it and use the one in our sysroot
+ rm -f ${S}/m4/intltool.m4
+}
+
+FILES_${PN} += "${systemd_unitdir}/systemd-bootchart"
+
+EXTRA_OECONF = " --with-rootprefix=${root_prefix} \
+ --with-rootlibdir=${base_libdir}"
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch b/meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch
deleted file mode 100644
index 5f93c46f29..0000000000
--- a/meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 23a3759b74d081b3b2849b0d37a0e5219f37813e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 22:37:48 +0000
-Subject: [PATCH] canonicalize_file_name is specific to glibc
-
-When on Linux and not using glibc then we need to define
-canonicalize_file_name() API, therefore add a check for finding out if
-its not glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- agent/tcf/framework/mdep.c | 2 +-
- agent/tcf/framework/mdep.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/agent/tcf/framework/mdep.c b/agent/tcf/framework/mdep.c
-index 2b52ca8..7d09655 100644
---- a/agent/tcf/framework/mdep.c
-+++ b/agent/tcf/framework/mdep.c
-@@ -1042,7 +1042,7 @@ char * canonicalize_file_name(const char * path) {
- return strdup(res);
- }
-
--#elif defined(__UCLIBC__)
-+#elif defined(__UCLIBC__) || !defined(__GLIBC__)
-
- char * canonicalize_file_name(const char * path) {
- return realpath(path, NULL);
-diff --git a/agent/tcf/framework/mdep.h b/agent/tcf/framework/mdep.h
-index 1e718a2..187c399 100644
---- a/agent/tcf/framework/mdep.h
-+++ b/agent/tcf/framework/mdep.h
-@@ -276,7 +276,7 @@ extern int loc_clock_gettime(int, struct timespec *);
-
- #define O_BINARY 0
-
--#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || !defined(__GLIBC__)
- # define O_LARGEFILE 0
- extern char ** environ;
- extern char * canonicalize_file_name(const char * path);
---
-2.7.0
-
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
index 5d704567c8..abd33babeb 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
@@ -1,14 +1,17 @@
-Upstream-Status: Inappropriate [poky-specific fix]
+Actually pass the arguments to RANLIB.
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Index: agent/Makefile.inc
+===================================================================
--- a/Makefile.inc
+++ b/Makefile.inc
-@@ -57,6 +57,9 @@
- ifeq ($(NO_UUID),)
- LIBS += -luuid
+@@ -92,6 +92,7 @@ ifeq ($(OPSYS),GNU/Linux)
+ OPTS += -DUSE_uuid_generate=0
endif
-+ ifneq ($(RANLIB),)
-+ RANLIB += $@
-+ endif
+ OPTS += -DENABLE_arch_$(shell uname -m)
++ RANLIB += $@
endif
-
+
ifneq ($(OPSYS),Windows)
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
index 6303280aae..f90208555b 100755
--- a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
@@ -33,16 +33,7 @@ case "$1" in
stop)
echo -n "Stopping $DAEMON_NAME: "
- count=0
- while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do
- killproc $DAEMON_PATH >& /dev/null
- sleep 1
- RETVAL=$?
- if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then
- sleep 3
- fi
- count=`expr $count + 1`
- done
+ start-stop-daemon -K -q -x $DAEMON_PATH -s USR2
rm -f /var/lock/subsys/$DAEMON_NAME
if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
echo "FAIL"
@@ -72,4 +63,3 @@ case "$1" in
esac
exit $RETVAL
-
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
index fd9a6c4d56..a486ac7bad 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
@@ -5,6 +5,8 @@ After=network.target
[Service]
Type=forking
ExecStart=@SBINDIR@/tcf-agent -d -L- -l0
+KillSignal=USR2
+SuccessExitStatus=USR2
[Install]
WantedBy=multi-user.target
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index e5e41f148e..b4bd4ca63c 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -5,14 +5,13 @@ BUGTRACKER = "https://bugs.eclipse.org/bugs/"
LICENSE = "EPL-1.0 | EDL-1.0"
LIC_FILES_CHKSUM = "file://edl-v10.html;md5=522a390a83dc186513f0500543ad3679"
-SRCREV = "2dddd5f440a15d5406032fac20f206484513646f"
-PV = "1.4.0+git${SRCPV}"
+SRCREV = "a022ef2f1acfd9209a1bf792dda14ae4b0d1b60f"
+PV = "1.7.0+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent;branch=1.4_neon_bugfix \
+SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent \
file://fix_ranlib.patch \
file://ldflags.patch \
- file://0001-canonicalize_file_name-is-specific-to-glibc.patch;striplevel=2 \
file://tcf-agent.init \
file://tcf-agent.service \
"
@@ -30,16 +29,24 @@ INITSCRIPT_NAME = "tcf-agent"
INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
# mangling needed for make
-MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686,`"
+MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64.*,a64,`"
MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`"
EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'"
-# They don't build on ARM and we don't need them actually.
-CFLAGS += "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \
+LCL_STOP_SERVICES = "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \
-DSERVICE_Memory=0 -DSERVICE_Registers=0 -DSERVICE_MemoryMap=0 \
- -DSERVICE_StackTrace=0 -DSERVICE_Symbols=0 -DSERVICE_LineNumbers=0 \
- -DSERVICE_Expressions=0"
+ -DSERVICE_StackTrace=0 -DSERVICE_Expressions=0"
+
+
+# These features don't compile for several cases.
+#
+CFLAGS_append_arc = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_mips = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_mips64 = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_libc-musl = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_powerpc64 = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_riscv64 = " ${LCL_STOP_SERVICES}"
do_install() {
oe_runmake install INSTALLROOT=${D}
diff --git a/meta/recipes-devtools/tcltk/tcl/0001-Fix-abd4abedd2-Failed-to-build-tk-8.6.10-with-cross-.patch b/meta/recipes-devtools/tcltk/tcl/0001-Fix-abd4abedd2-Failed-to-build-tk-8.6.10-with-cross-.patch
new file mode 100644
index 0000000000..3cd34155ee
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/0001-Fix-abd4abedd2-Failed-to-build-tk-8.6.10-with-cross-.patch
@@ -0,0 +1,44 @@
+From f7fa48c4c75a1e748dc5071e709c0b62ff739eaa Mon Sep 17 00:00:00 2001
+From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
+Date: Mon, 9 Dec 2019 10:02:20 +0000
+Subject: [PATCH] Fix [abd4abedd2]: Failed to build tk 8.6.10 with cross
+ compile
+
+Upstream-Status: Backport
+[https://github.com/tcltk/tcl/commit/f7fa48c4c75a1e748dc5071e709c0b62ff739eaa]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ compat/strtol.c | 2 +-
+ compat/strtoul.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/compat/strtol.c b/compat/strtol.c
+index b7f69196c..811006a64 100644
+--- a/compat/strtol.c
++++ b/compat/strtol.c
+@@ -53,7 +53,7 @@ strtol(
+ */
+
+ p = string;
+- while (TclIsSpaceProc(*p)) {
++ while (isspace(UCHAR(*p))) {
+ p += 1;
+ }
+
+diff --git a/compat/strtoul.c b/compat/strtoul.c
+index e37eb05f8..15587f1da 100644
+--- a/compat/strtoul.c
++++ b/compat/strtoul.c
+@@ -74,7 +74,7 @@ strtoul(
+ */
+
+ p = string;
+- while (TclIsSpaceProc(*p)) {
++ while (isspace(UCHAR(*p))) {
+ p += 1;
+ }
+ if (*p == '-') {
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/tcltk/tcl/alter-includedir.patch b/meta/recipes-devtools/tcltk/tcl/alter-includedir.patch
index c8530e1f58..86632d9144 100644
--- a/meta/recipes-devtools/tcltk/tcl/alter-includedir.patch
+++ b/meta/recipes-devtools/tcltk/tcl/alter-includedir.patch
@@ -8,6 +8,7 @@ Signed-off-by: Khem Raj <raj.khem@gmai.com>
Fixed the TCL_INCLUDE_SPEC
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
Makefile.in | 2 +-
configure | 4 ++--
@@ -34,7 +35,7 @@ index 3e78b49..24b3f92 100755
@@ -19134,7 +19134,7 @@ eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
- TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
+ test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
-PRIVATE_INCLUDE_DIR='$(includedir)'
+PRIVATE_INCLUDE_DIR='$(includedir)/tcl$(VERSION)'
HTML_DIR='$(DISTDIR)/html'
@@ -56,7 +57,7 @@ index 0e28b14..62d9b41 100755
@@ -791,7 +791,7 @@ eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
- TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
+ test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
-PRIVATE_INCLUDE_DIR='$(includedir)'
+PRIVATE_INCLUDE_DIR='$(includedir)/tcl$(VERSION)'
HTML_DIR='$(DISTDIR)/html'
diff --git a/meta/recipes-devtools/tcltk/tcl/run-ptest b/meta/recipes-devtools/tcltk/tcl/run-ptest
index dadba655f2..22bb69ae0d 100644
--- a/meta/recipes-devtools/tcltk/tcl/run-ptest
+++ b/meta/recipes-devtools/tcltk/tcl/run-ptest
@@ -1,8 +1,13 @@
#!/bin/sh
-for i in `ls tests/*.test |awk -F/ '{print $2}'`; \
- do TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i >$i.tmp 2>&1; \
- grep -q "^Files with failing tests:" $i.tmp; \
- if [ $? -eq 0 ]; then echo "FAIL: $i"; \
- else echo "PASS: $i"; rm -f $i.tmp; fi; \
+for i in `ls tests/*.test | awk -F/ '{print $2}'`; do
+ TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i >$i.log 2>&1
+ grep -q "^Files with failing tests:" $i.log
+ if [ $? -eq 0 ]; then
+ echo "FAIL: $i"
+ cat $i.log
+ else
+ echo "PASS: $i"
+ fi
+ rm -f $i.log
done
diff --git a/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch b/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
index 96276eab0e..d1fc9b92e5 100644
--- a/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
+++ b/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
@@ -11,7 +11,7 @@ Index: unix/configure
+ # following line added by CW for Debian GNU/Linux
+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
+
- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
Index: unix/tcl.m4
@@ -25,7 +25,7 @@ Index: unix/tcl.m4
+ # following line added by CW for Debian GNU/Linux
+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
+
- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
Index: unix/Makefile.in
diff --git a/meta/recipes-devtools/tcltk/tcl/tcl-remove-hardcoded-install-path.patch b/meta/recipes-devtools/tcltk/tcl/tcl-remove-hardcoded-install-path.patch
index 16f7c80516..17d251d554 100644
--- a/meta/recipes-devtools/tcltk/tcl/tcl-remove-hardcoded-install-path.patch
+++ b/meta/recipes-devtools/tcltk/tcl/tcl-remove-hardcoded-install-path.patch
@@ -14,10 +14,11 @@ Upstream-Status: Inappropriate [configuration]
Signed-off-by: Song.Li <Song.Li@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ configure | 2 +-
+ configure.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
Index: unix/configure
===================================================================
@@ -27,8 +28,8 @@ Index: unix/configure
eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
--TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
-+TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
+-test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
++test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
PRIVATE_INCLUDE_DIR='$(includedir)'
HTML_DIR='$(DISTDIR)/html'
@@ -40,8 +41,8 @@ Index: unix/configure.in
eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
--TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
-+TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
+-test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
++test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
PRIVATE_INCLUDE_DIR='$(includedir)'
HTML_DIR='$(DISTDIR)/html'
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.10.bb b/meta/recipes-devtools/tcltk/tcl_8.6.10.bb
new file mode 100644
index 0000000000..284f20e27a
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl_8.6.10.bb
@@ -0,0 +1,102 @@
+SUMMARY = "Tool Command Language"
+HOMEPAGE = "http://tcl.sourceforge.net"
+SECTION = "devel/tcltk"
+
+# http://www.tcl.tk/software/tcltk/license.html
+LICENSE = "tcl & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+"
+
+DEPENDS = "tcl-native zlib"
+
+BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
+ file://tcl-add-soname.patch"
+SRC_URI = "${BASE_SRC_URI} \
+ file://fix_non_native_build_issue.patch \
+ file://fix_issue_with_old_distro_glibc.patch \
+ file://no_packages.patch \
+ file://tcl-remove-hardcoded-install-path.patch \
+ file://alter-includedir.patch \
+ file://0001-Fix-abd4abedd2-Failed-to-build-tk-8.6.10-with-cross-.patch;patchdir=.. \
+ file://run-ptest \
+"
+SRC_URI[md5sum] = "97c55573f8520bcab74e21bfd8d0aadc"
+SRC_URI[sha256sum] = "5196dbf6638e3df8d5c87b5815c8c2b758496eb6f0e41446596c9a4e638d87ed"
+
+SRC_URI_class-native = "${BASE_SRC_URI}"
+
+S = "${WORKDIR}/${BPN}${PV}/unix"
+
+VER = "${PV}"
+
+inherit autotools ptest binconfig
+
+EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
+
+do_compile_prepend() {
+ echo > ${S}/../compat/fixstrtod.c
+}
+
+do_install() {
+ autotools_do_install
+ oe_runmake 'DESTDIR=${D}' install-private-headers
+ ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
+ ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
+ sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh
+ sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh
+ install -d ${D}${bindir_crossscripts}
+ install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
+ install -m 0755 tclConfig.sh ${D}${libdir}
+ for dir in compat generic unix; do
+ install -d ${D}${includedir}/${BPN}${VER}/$dir
+ install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
+ done
+}
+
+SYSROOT_DIRS += "${bindir_crossscripts}"
+
+PACKAGES =+ "tcl-lib"
+FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
+FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
+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 nativesdk"
+
+do_compile_ptest() {
+ oe_runmake tcltest
+}
+
+do_install_ptest() {
+ cp ${B}/tcltest ${D}${PTEST_PATH}
+ cp -r ${S}/../library ${D}${PTEST_PATH}
+ cp -r ${S}/../tests ${D}${PTEST_PATH}
+}
+
+# Fix some paths that might be used by Tcl extensions
+BINCONFIG_GLOB = "*Config.sh"
+
+# Fix the path in sstate
+SSTATE_SCAN_FILES += "*Config.sh"
+
+# Cleanup host path from ${libdir}/tclConfig.sh and remove the
+# ${bindir_crossscripts}/tclConfig.sh from target
+PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
+tcl_package_preprocess() {
+ sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
+ -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
+ -e "s;${STAGING_INCDIR};${includedir};g" \
+ -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
+ ${PKGD}${libdir}/tclConfig.sh
+
+ rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh
+}
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.6.bb b/meta/recipes-devtools/tcltk/tcl_8.6.6.bb
deleted file mode 100644
index 2dd0a7ae98..0000000000
--- a/meta/recipes-devtools/tcltk/tcl_8.6.6.bb
+++ /dev/null
@@ -1,97 +0,0 @@
-SUMMARY = "Tool Command Language"
-HOMEPAGE = "http://tcl.sourceforge.net"
-SECTION = "devel/tcltk"
-
-# http://www.tcl.tk/software/tcltk/license.html
-LICENSE = "tcl & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-"
-
-DEPENDS = "tcl-native zlib"
-
-BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
- file://tcl-add-soname.patch"
-SRC_URI = "${BASE_SRC_URI} \
- file://fix_non_native_build_issue.patch \
- file://fix_issue_with_old_distro_glibc.patch \
- file://no_packages.patch \
- file://tcl-remove-hardcoded-install-path.patch \
- file://alter-includedir.patch \
- file://run-ptest \
-"
-SRC_URI[md5sum] = "5193aea8107839a79df8ac709552ecb7"
-SRC_URI[sha256sum] = "a265409781e4b3edcc4ef822533071b34c3dc6790b893963809b9fe221befe07"
-
-SRC_URI_class-native = "${BASE_SRC_URI}"
-
-S = "${WORKDIR}/${BPN}${PV}/unix"
-
-VER = "${PV}"
-
-inherit autotools ptest binconfig
-
-DEPENDS_class-native = "zlib-native"
-
-EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
-
-do_configure() {
- cd ${S}
- gnu-configize
- cd ${B}
- oe_runconf
-}
-
-do_compile_prepend() {
- echo > ${S}/../compat/fixstrtod.c
-}
-
-do_install() {
- autotools_do_install install-private-headers
- ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
- ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
- sed -i "s+-L${B}+-L${STAGING_LIBDIR}+g" tclConfig.sh
- sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh
- install -d ${D}${bindir_crossscripts}
- install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
- install -m 0755 tclConfig.sh ${D}${libdir}
- cd ..
- for dir in compat generic unix; do
- install -d ${D}${includedir}/${BPN}${VER}/$dir
- install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
- done
-}
-
-SYSROOT_DIRS += "${bindir_crossscripts}"
-
-PACKAGES =+ "tcl-lib"
-FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
-FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
-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"
-
-do_compile_ptest() {
- oe_runmake tcltest
-}
-
-do_install_ptest() {
- cp ${B}/tcltest ${D}${PTEST_PATH}
- cp -r ${S}/../library ${D}${PTEST_PATH}
- cp -r ${S}/../tests ${D}${PTEST_PATH}
-}
-
-# Fix some paths that might be used by Tcl extensions
-BINCONFIG_GLOB = "*Config.sh"
-
-# Fix the path in sstate
-SSTATE_SCAN_FILES += "*Config.sh"
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch b/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch
new file mode 100644
index 0000000000..e9b9d3df46
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch
@@ -0,0 +1,54 @@
+From b42ab8e1aca951dd06c113159491b3fd5cf06f2e Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Thu, 24 Oct 2019 09:39:04 +0800
+Subject: [PATCH] Add "listen" action for a tcp socket which does not call
+ 'listen' after 'bind'
+
+It is found that /usr/bin/unfsd customus 100% cpu after starting qemu with 'nfs'
+option, and below lots of error messages shows when strace the process:
+
+poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},
+{fd=5, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},{fd=6, events =POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}],
+4, 2000) = 2 ([{fd=4, revents=POLLHUP},{fd=6, revents=POLLHUP}])
+accept(4, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument)
+accept(6, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument)
+
+% time seconds usecs/call calls errors syscall
+------ ----------- ----------- --------- --------- ----------------
+ 70.87 0.005392 0 513886 513886 accept
+ 29.13 0.002216 0 256943 poll
+ 0.00 0.000000 0 4 read
+
+The root cause is that 'listen' is not called for the binded
+socket. The depended libtipc does not call 'listen' if found
+the incomming socket is binded, so 'accept' reports the error
+in the 'for' loop and cpu consumed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ daemon.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/daemon.c b/daemon.c
+index 028a181..4c85903 100644
+--- a/daemon.c
++++ b/daemon.c
+@@ -814,6 +814,13 @@ static SVCXPRT *create_tcp_transport(unsigned int port)
+ fprintf(stderr, "Couldn't bind to tcp port %d\n", port);
+ exit(1);
+ }
++
++ if (listen(sock, SOMAXCONN) < 0) {
++ perror("listen");
++ fprintf(stderr, "Couldn't listen on the address \n");
++ close(sock);
++ exit(1);
++ }
+ }
+
+ transp = svctcp_create(sock, 0, 0);
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch b/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch
new file mode 100644
index 0000000000..6957d102b8
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch
@@ -0,0 +1,85 @@
+From 3f4fcb62661059bad77a2e957b4621137797bc2f Mon Sep 17 00:00:00 2001
+From: Rui Wang <rui.wang@windriver.com>
+Date: Fri, 15 Jun 2018 14:19:10 +0800
+Subject: [PATCH] attr: fix utime for symlink
+
+unfs3 has an old defect that it can not change the timestamps of a
+symlink file because it only uses utime(), which will follow the
+symlink. This will not cause an error if the symlink points to an
+existent file. But under some special situation, such as installing
+a rpm package, rpm tool will create the symlink first and try to
+modify the timestamps of it, when the target file is non-existent.
+This will cause an ESTALE error. Making rpm tool ignore this error
+is a solution, but not the best one. An acceptable approach is
+Making unfs3 support lutimes(), which can modify the symlink file
+itself. Considering not every system support this function, so a
+function checking is necessary.
+
+Upstream-Status: Submitted [https://sourceforge.net/p/unfs3/bugs/12/]
+
+Signed-off-by: Rui Wang <rui.wang@windriver.com>
+---
+ attr.c | 15 +++++++++++----
+ backend_unix.h | 2 ++
+ configure.ac | 1 +
+ 3 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/attr.c b/attr.c
+index 73e5c75..427d0e2 100644
+--- a/attr.c
++++ b/attr.c
+@@ -280,7 +280,7 @@ post_op_attr get_post_cached(struct svc_req * req)
+ static nfsstat3 set_time(const char *path, backend_statstruct buf, sattr3 new)
+ {
+ time_t new_atime, new_mtime;
+- struct utimbuf utim;
++ struct timeval stamps[2];
+ int res;
+
+ /* set atime and mtime */
+@@ -302,10 +302,17 @@ static nfsstat3 set_time(const char *path, backend_statstruct buf, sattr3 new)
+ else /* DONT_CHANGE */
+ new_mtime = buf.st_mtime;
+
+- utim.actime = new_atime;
+- utim.modtime = new_mtime;
++ stamps[0].tv_sec = new_atime;
++ stamps[0].tv_usec = 0;
++ stamps[1].tv_sec = new_mtime;
++ stamps[1].tv_usec = 0;
++
++#if HAVE_LUTIMES
++ res = backend_lutimes(path, stamps);
++#else
++ res = backend_utimes(path, stamps);
++#endif
+
+- res = backend_utime(path, &utim);
+ if (res == -1)
+ return setattr_err();
+ }
+diff --git a/backend_unix.h b/backend_unix.h
+index fbc2af3..813ffd3 100644
+--- a/backend_unix.h
++++ b/backend_unix.h
+@@ -61,6 +61,8 @@
+ #define backend_symlink symlink
+ #define backend_truncate truncate
+ #define backend_utime utime
++#define backend_utimes utimes
++#define backend_lutimes lutimes
+ #define backend_statstruct struct stat
+ #define backend_dirstream DIR
+ #define backend_statvfsstruct struct statvfs
+diff --git a/configure.ac b/configure.ac
+index aeec598..ea7f167 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,6 +37,7 @@ AC_CHECK_FUNCS(setresuid setresgid)
+ AC_CHECK_FUNCS(vsyslog)
+ AC_CHECK_FUNCS(lchown)
+ AC_CHECK_FUNCS(setgroups)
++AC_CHECK_FUNCS(lutimes)
+ UNFS3_SOLARIS_RPC
+ UNFS3_PORTMAP_DEFINE
+ UNFS3_COMPILE_WARNINGS
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch b/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch
new file mode 100644
index 0000000000..6eee6748f9
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch
@@ -0,0 +1,37 @@
+From c7a2a65d6c2a433312540c207860740d6e4e7629 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 11 Mar 2018 17:32:54 -0700
+Subject: [PATCH] daemon.c: Libtirpc porting fixes
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ daemon.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/daemon.c b/daemon.c
+index 22f30f6..028a181 100644
+--- a/daemon.c
++++ b/daemon.c
+@@ -117,7 +117,7 @@ void logmsg(int prio, const char *fmt, ...)
+ */
+ struct in_addr get_remote(struct svc_req *rqstp)
+ {
+- return (svc_getcaller(rqstp->rq_xprt))->sin_addr;
++ return ((struct sockaddr_in*)svc_getcaller(rqstp->rq_xprt))->sin_addr;
+ }
+
+ /*
+@@ -125,7 +125,7 @@ struct in_addr get_remote(struct svc_req *rqstp)
+ */
+ short get_port(struct svc_req *rqstp)
+ {
+- return (svc_getcaller(rqstp->rq_xprt))->sin_port;
++ return ((struct sockaddr_in*)svc_getcaller(rqstp->rq_xprt))->sin_port;
+ }
+
+ /*
+--
+2.16.2
+
diff --git a/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
deleted file mode 100644
index e7574fb72a..0000000000
--- a/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Userspace NFS server v3 protocol"
-SECTION = "console/network"
-LICENSE = "unfs3"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=9475885294e17c0cc0067820d042792e"
-
-# SVN support for upstream version check isn't implemented yet
-RECIPE_UPSTREAM_VERSION = "0.9.22.r497"
-RECIPE_UPSTREAM_DATE = "Oct 08, 2015"
-CHECK_DATE = "Dec 10, 2015"
-
-DEPENDS = "flex-native bison-native flex"
-DEPENDS_append_libc-musl = " libtirpc"
-DEPENDS_append_class-nativesdk = " flex-nativesdk"
-
-MOD_PV = "497"
-S = "${WORKDIR}/trunk"
-SRC_URI = "svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV};protocol=http \
- file://unfs3_parallel_build.patch \
- file://alternate_rpc_ports.patch \
- file://fix_pid_race_parent_writes_child_pid.patch \
- file://fix_compile_warning.patch \
- file://rename_fh_cache.patch \
- file://relative_max_socket_path_len.patch \
- file://tcp_no_delay.patch \
- "
-SRC_URI[md5sum] = "3687acc4ee992e536472365dd99712a7"
-SRC_URI[sha256sum] = "274b43ada9c6eea1da26eb7010d72889c5278984ba0b50dff4e093057d4d64f8"
-
-BBCLASSEXTEND = "native nativesdk"
-
-inherit autotools
-EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
-
-# Turn off these header detects else the inode search
-# will walk entire file systems and this is a real problem
-# if you have 2 TB of files to walk in your file system
-CACHED_CONFIGUREVARS = "ac_cv_header_mntent_h=no ac_cv_header_sys_mnttab_h=no"
diff --git a/meta/recipes-devtools/unfs3/unfs3_git.bb b/meta/recipes-devtools/unfs3/unfs3_git.bb
new file mode 100644
index 0000000000..d60cee87c9
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3_git.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Userspace NFS server v3 protocol"
+DESCRIPTION = "UNFS3 is a user-space implementation of the NFSv3 server \
+specification. It provides a daemon for the MOUNT and NFS protocols, which \
+are used by NFS clients for accessing files on the server."
+SECTION = "console/network"
+LICENSE = "unfs3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9475885294e17c0cc0067820d042792e"
+
+DEPENDS = "flex-native bison-native flex"
+DEPENDS += "libtirpc"
+DEPENDS_append_class-nativesdk = " flex-nativesdk"
+
+ASNEEDED = ""
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https \
+ file://unfs3_parallel_build.patch \
+ file://alternate_rpc_ports.patch \
+ file://fix_pid_race_parent_writes_child_pid.patch \
+ file://fix_compile_warning.patch \
+ file://rename_fh_cache.patch \
+ file://relative_max_socket_path_len.patch \
+ file://tcp_no_delay.patch \
+ file://0001-daemon.c-Libtirpc-porting-fixes.patch \
+ file://0001-attr-fix-utime-for-symlink.patch \
+ file://0001-Add-listen-action-for-a-tcp-socket.patch \
+ "
+SRCREV = "c12a5c69a8d59be6916cbd0e0f41c159f1962425"
+UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P<pver>.+)"
+
+PV = "0.9.22+${SRCPV}"
+
+BBCLASSEXTEND = "native nativesdk"
+
+inherit autotools
+EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
+CFLAGS_append = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS_append = " -ltirpc"
+
+# Turn off these header detects else the inode search
+# will walk entire file systems and this is a real problem
+# if you have 2 TB of files to walk in your file system
+CACHED_CONFIGUREVARS = "ac_cv_header_mntent_h=no ac_cv_header_sys_mnttab_h=no"
diff --git a/meta/recipes-devtools/unifdef/unifdef_2.11.bb b/meta/recipes-devtools/unifdef/unifdef_2.11.bb
index 1d13b9a6bf..1ffc11e76b 100644
--- a/meta/recipes-devtools/unifdef/unifdef_2.11.bb
+++ b/meta/recipes-devtools/unifdef/unifdef_2.11.bb
@@ -10,6 +10,8 @@ SRC_URI = "http://dotat.at/prog/${BPN}/${BP}.tar.xz"
SRC_URI[md5sum] = "337053fd8a7d9ab3adf5e50f88af95b7"
SRC_URI[sha256sum] = "828ffc270ac262b88fe011136acef2780c05b0dc3c5435d005651740788d4537"
+UPSTREAM_CHECK_REGEX = "unifdef-(?P<pver>((\d+\.*)+)(?![a-f0-9]{6,})).tar"
+
do_install() {
oe_runmake install DESTDIR=${D} prefix=${prefix}
}
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc
index 34c9db931d..703ed1aa8d 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala.inc
@@ -2,7 +2,12 @@ SUMMARY = "C#-like programming language for easing GObject programming"
DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \
Vala compiles to plain C and has no runtime environment nor penalities whatsoever."
SECTION = "devel"
-DEPENDS = "bison-native flex-native libxslt-native glib-2.0"
+DEPENDS = "bison-native flex-native glib-2.0"
+
+# Appending libxslt-native to dependencies has an effect
+# of rebuilding the manual, which is very slow. Let's do this
+# only when api-documentation distro feature is enabled.
+DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}"
# vala-native contains a native version of vapigen, which we use instead of the target one
DEPENDS_append_class-target = " vala-native"
@@ -11,7 +16,7 @@ HOMEPAGE = "http://vala-project.org"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
inherit autotools pkgconfig upstream-version-is-even
@@ -19,16 +24,21 @@ inherit autotools pkgconfig upstream-version-is-even
FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
FILES_${PN}-doc += "${datadir}/devhelp"
+# .gir files from gobject-introspection are installed to ${libdir} when multilib is enabled
+GIRDIR_OPT = "${@'--girdir=${STAGING_LIBDIR}/gir-1.0' if d.getVar('MULTILIBS') else ''}"
+
do_configure_prepend_class-target() {
# Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot
# The wrapper will call a native vapigen
cat > ${B}/vapigen-wrapper << EOF
#!/bin/sh
-vapigen-${SHRT_VER} "\$@"
+vapigen-${SHRT_VER} ${GIRDIR_OPT} "\$@"
EOF
chmod +x ${B}/vapigen-wrapper
}
+EXTRA_OECONF += " --disable-valadoc"
+
# Vapigen wrapper needs to be available system-wide, because it will be used
# to build vapi files from all other packages with vala support
do_install_append_class-target() {
@@ -46,5 +56,7 @@ vapigen_sysroot_preprocess() {
# up our wrapper.
sed -i \
-e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \
- ${SYSROOT_DESTDIR}${datadir}/pkgconfig/vapigen-${SHRT_VER}.pc
+ ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc
}
+
+SSTATE_SCAN_FILES += "vapigen-wrapper"
diff --git a/meta/recipes-devtools/vala/vala_0.32.1.bb b/meta/recipes-devtools/vala/vala_0.32.1.bb
deleted file mode 100644
index b34086e20c..0000000000
--- a/meta/recipes-devtools/vala/vala_0.32.1.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
- file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
-"
-
-SRC_URI[md5sum] = "755881770bffac020b5ea5f625fbe528"
-SRC_URI[sha256sum] = "dd0d47e548a34cfb1e4b04149acd082a86414c49057ffb79902eb9a508a161a9"
diff --git a/meta/recipes-devtools/vala/vala_0.46.4.bb b/meta/recipes-devtools/vala/vala_0.46.4.bb
new file mode 100644
index 0000000000..c4cd6dd410
--- /dev/null
+++ b/meta/recipes-devtools/vala/vala_0.46.4.bb
@@ -0,0 +1,8 @@
+require ${BPN}.inc
+
+SRC_URI += "file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
+ file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
+ "
+
+SRC_URI[md5sum] = "b79bbaf8929ec8ed35911b3571f5a248"
+SRC_URI[sha256sum] = "4bb9b60fc0230b0db2c8a0e2a80ec29f1c10b43dc78355abba78adedbc2e03a1"
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch
new file mode 100644
index 0000000000..81ab29f3be
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch
@@ -0,0 +1,36 @@
+From 1b5b6f827ac1153a41fc93e78bf34ccdf5720b9b Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Fri, 19 Oct 2018 10:31:12 -0400
+Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc
+
+Upstream-Status: Submitted https://bugs.kde.org/show_bug.cgi?id=400162
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ memcheck/tests/linux/sys-statx.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/memcheck/tests/linux/sys-statx.c b/memcheck/tests/linux/sys-statx.c
+index fe9f9ba45..473c2cd7f 100644
+--- a/memcheck/tests/linux/sys-statx.c
++++ b/memcheck/tests/linux/sys-statx.c
+@@ -7,11 +7,16 @@
+ #include <assert.h>
+ #include <string.h>
+ #include <sys/syscall.h>
++
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2,28)
+ /* struct statx provided in sys/stat.h */
+ #else
+ #include <linux/stat.h>
+ #endif
++#else
++#include <linux/stat.h>
++#endif
+ #include <errno.h>
+
+ int check_stat2;
+--
+2.17.0
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch
new file mode 100644
index 0000000000..8d2ca5733e
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch
@@ -0,0 +1,182 @@
+From 2155c1b2cf00e744e280c493eb74bf457dfcc3b1 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Sun, 21 Oct 2018 15:09:31 -0400
+Subject: [PATCH] Make local functions static to avoid assembler error
+
+Avoid mips32 x-compiler warnings such as:
+
+| ../../../valgrind-3.14.0/helgrind/tests/annotate_hbefore.c:360:6: warning: no previous prototype for 'do_signal' [-Wmissing-prototypes]
+| void do_signal ( UWord* w )
+| ^~~~~~~~~
+
+by making functions and global variables that are file scope be static
+and more importantly also avoid an assembler error:
+
+/tmp/cce22iiw.s: Assembler messages:
+/tmp/cce22iiw.s:446: Error: symbol `exit_0' is already defined
+/tmp/cce22iiw.s:448: Error: symbol `exit' is already defined
+/tmp/cce22iiw.s:915: Error: symbol `exit_0' is already defined
+/tmp/cce22iiw.s:917: Error: symbol `exit' is already defined
+
+Upstream-Status: Submitted https://bugs.kde.org/show_bug.cgi?id=400164
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ helgrind/tests/annotate_hbefore.c | 34 +++++++++++++++----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/helgrind/tests/annotate_hbefore.c b/helgrind/tests/annotate_hbefore.c
+index e311714f7..f55514e45 100644
+--- a/helgrind/tests/annotate_hbefore.c
++++ b/helgrind/tests/annotate_hbefore.c
+@@ -24,7 +24,7 @@ typedef unsigned long int UWord;
+
+ // ppc64
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+ {
+ UWord old, success;
+
+@@ -57,7 +57,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+
+ // ppc32
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+ {
+ UWord old, success;
+
+@@ -90,7 +90,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+
+ // amd64
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+ {
+ UWord block[4] = { (UWord)addr, expected, nyu, 2 };
+ __asm__ __volatile__(
+@@ -113,7 +113,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+
+ // x86
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+ {
+ UWord block[4] = { (UWord)addr, expected, nyu, 2 };
+ __asm__ __volatile__(
+@@ -138,7 +138,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+
+ // arm
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+ {
+ UWord old, success;
+ UWord block[2] = { (UWord)addr, nyu };
+@@ -171,7 +171,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+
+ // arm64
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+ {
+ UWord old, success;
+ UWord block[2] = { (UWord)addr, nyu };
+@@ -204,7 +204,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+
+ // s390x
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW(UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW(UWord* addr, UWord expected, UWord nyu )
+ {
+ int cc;
+
+@@ -223,7 +223,7 @@ UWord do_acasW(UWord* addr, UWord expected, UWord nyu )
+
+ // mips32
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+ {
+ UWord success;
+ UWord block[3] = { (UWord)addr, nyu, expected};
+@@ -256,7 +256,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+
+ // mips64
+ /* return 1 if success, 0 if failure */
+-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+ {
+ UWord success;
+ UWord block[3] = { (UWord)addr, nyu, expected};
+@@ -287,7 +287,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+
+ #endif
+
+-void atomic_incW ( UWord* w )
++static void atomic_incW ( UWord* w )
+ {
+ while (1) {
+ UWord old = *w;
+@@ -301,7 +301,7 @@ void atomic_incW ( UWord* w )
+
+ #define NNN 1000000
+
+-void* thread_fn ( void* arg )
++static void* thread_fn ( void* arg )
+ {
+ UWord* w = (UWord*)arg;
+ int i;
+@@ -331,10 +331,10 @@ int main ( void )
+
+ #endif
+
+-int shared_var = 0; // is not raced upon
++static int shared_var = 0; // is not raced upon
+
+
+-void delayXms ( int i )
++static void delayXms ( int i )
+ {
+ struct timespec ts = { 0, 1 * 1000 * 1000 };
+ // We do the sleep in small pieces to have scheduling
+@@ -348,7 +348,7 @@ void delayXms ( int i )
+ }
+ }
+
+-void do_wait ( UWord* w )
++static void do_wait ( UWord* w )
+ {
+ UWord w0 = *w;
+ UWord volatile * wV = w;
+@@ -357,7 +357,7 @@ void do_wait ( UWord* w )
+ ANNOTATE_HAPPENS_AFTER(w);
+ }
+
+-void do_signal ( UWord* w )
++static void do_signal ( UWord* w )
+ {
+ ANNOTATE_HAPPENS_BEFORE(w);
+ atomic_incW(w);
+@@ -365,7 +365,7 @@ void do_signal ( UWord* w )
+
+
+
+-void* thread_fn1 ( void* arg )
++static void* thread_fn1 ( void* arg )
+ {
+ UWord* w = (UWord*)arg;
+ delayXms(500); // ensure t2 gets to its wait first
+@@ -376,7 +376,7 @@ void* thread_fn1 ( void* arg )
+ return NULL;
+ }
+
+-void* thread_fn2 ( void* arg )
++static void* thread_fn2 ( void* arg )
+ {
+ UWord* w = (UWord*)arg;
+ do_wait(w); // wait for h-b edge from first thread
+--
+2.17.0
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch
new file mode 100644
index 0000000000..e7af5efecc
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch
@@ -0,0 +1,27 @@
+From 5eebdefd2251803e7d21081745018fcb16b2ba71 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Wed, 8 May 2019 20:16:52 -0400
+Subject: [PATCH] Return a valid exit_code from vg_regtest
+
+Upstream-Status: Pending
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ tests/vg_regtest.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
+index 909af3be8..f2799c4e3 100755
+--- a/tests/vg_regtest.in
++++ b/tests/vg_regtest.in
+@@ -403,6 +403,7 @@ sub mysystem($)
+ exit 1;
+ }
+ }
++ return $exit_code;
+ }
+ # if $keepunfiltered, copies $1 to $1.unfiltered.out
+ # renames $0 tp $1
+--
+2.17.0
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch b/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch
new file mode 100644
index 0000000000..4bc4bb086c
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch
@@ -0,0 +1,40 @@
+From bf63e35c3036e6040c8cfecabc7160b1f36b0591 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Wed, 28 Aug 2019 12:31:15 -0400
+Subject: [PATCH] adjust path filter for 2 memcheck tests
+
+Test executables produced when cross-compiling can contain
+relative paths such as:
+ coregrind/tests/../../../valgrind-3.15.0/coregrind/
+Use the --fullpath-after option to match and therefore
+suppress more of the prefix to enable test to pass.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ memcheck/tests/badfree3.vgtest | 2 +-
+ memcheck/tests/varinfo5.vgtest | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/memcheck/tests/badfree3.vgtest b/memcheck/tests/badfree3.vgtest
+index 3dfc5fd8a..57eec21f3 100644
+--- a/memcheck/tests/badfree3.vgtest
++++ b/memcheck/tests/badfree3.vgtest
+@@ -1,3 +1,3 @@
+ prog: badfree
+-vgopts: -q --fullpath-after=memcheck/ --fullpath-after=coregrind/
++vgopts: -q --fullpath-after=/valgrind-3.15.0/memcheck/ --fullpath-after=/valgrind-3.15.0/coregrind/
+ stderr_filter_args: badfree.c
+diff --git a/memcheck/tests/varinfo5.vgtest b/memcheck/tests/varinfo5.vgtest
+index 063d00dce..6907bb2f6 100644
+--- a/memcheck/tests/varinfo5.vgtest
++++ b/memcheck/tests/varinfo5.vgtest
+@@ -1,3 +1,3 @@
+ prog: varinfo5
+-vgopts: --fullpath-after=memcheck/ --fullpath-after=coregrind/ --read-var-info=yes --read-inline-info=yes -q
++vgopts: --fullpath-after=/valgrind-3.15.0/memcheck/ --fullpath-after=/valgrind-3.15.0/coregrind/ --read-var-info=yes --read-inline-info=yes -q
+ stderr_filter: filter_varinfo3
+--
+2.22.0
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch b/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch
deleted file mode 100644
index dc6feff7ff..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 1b1a024efd18d44294e184e792c1e039cab02bfe Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 14 Feb 2016 09:14:12 +0000
-Subject: [PATCH] fix build for musl targets
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 2 --
- coregrind/vg_preloaded.c | 2 +-
- include/pub_tool_redir.h | 7 +++++--
- 3 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9366dc7..679f514 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1066,8 +1066,6 @@ case "${GLIBC_VERSION}" in
- ;;
- 2.0|2.1|*)
- AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
-- AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,])
-- AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc])
- ;;
- esac
-
-diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c
-index 2ea7a7a..e49c832 100644
---- a/coregrind/vg_preloaded.c
-+++ b/coregrind/vg_preloaded.c
-@@ -56,7 +56,7 @@
- void VG_NOTIFY_ON_LOAD(freeres)( void );
- void VG_NOTIFY_ON_LOAD(freeres)( void )
- {
--# if !defined(__UCLIBC__) \
-+# if !defined(__UCLIBC__) && defined(__GLIBC__) \
- && !defined(VGPV_arm_linux_android) \
- && !defined(VGPV_x86_linux_android) \
- && !defined(VGPV_mips32_linux_android) \
-diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h
-index bac00d7..fbb2ef2 100644
---- a/include/pub_tool_redir.h
-+++ b/include/pub_tool_redir.h
-@@ -242,8 +242,7 @@
- /* --- Soname of the standard C library. --- */
-
- #if defined(VGO_linux) || defined(VGO_solaris)
--# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so*
--
-+# define VG_Z_LIBC_SONAME libcZdZa // libc.*
- #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6)
- # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib
-
-@@ -274,7 +273,11 @@
- /* --- Soname of the pthreads library. --- */
-
- #if defined(VGO_linux)
-+# if defined(__GLIBC__) || defined(__UCLIBC__)
- # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0
-+# else
-+# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.*
-+#endif
- #elif defined(VGO_darwin)
- # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib
- #elif defined(VGO_solaris)
---
-2.7.1
-
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch b/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch
new file mode 100644
index 0000000000..39b624d9f6
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch
@@ -0,0 +1,82 @@
+From fb5362f205b37c5060fcd764a7ed393abe4f2f3d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 27 Jul 2018 17:39:37 +0800
+Subject: [PATCH 1/2] fix opcode not supported on mips32-linux
+
+While build tests(`make check') on mips32-linux, there are
+serial failures such as:
+[snip]
+| mips-wrsmllib32-linux-gcc -meb -mabi=32 -mhard-float -c
+-o atomic_incs-atomic_incs.o `test -f 'atomic_incs.c' || echo
+'../../../valgrind-3.13.0/memcheck/tests/'`atomic_incs.c
+| /tmp/ccqrmINN.s: Assembler messages:
+| /tmp/ccqrmINN.s:247: Error: opcode not supported on this
+processor: mips1 (mips1) `ll $t3,0($t1)'
+| /tmp/ccqrmINN.s:249: Error: opcode not supported on this
+processor: mips1 (mips1) `sc $t3,0($t1)'
+[snip]
+
+Since the following commit applied, it defines CLFAGS for mips32,
+but missed to pass them to tests which caused the above failure
+...
+3e344c57f Merge in a port for mips32-linux
+...
+
+Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=396905]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ helgrind/tests/Makefile.am | 5 +++++
+ memcheck/tests/Makefile.am | 5 +++++
+ none/tests/mips32/Makefile.am | 4 ++++
+ 3 files changed, 14 insertions(+)
+
+diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
+index ad1af191a..6209d35a7 100644
+--- a/helgrind/tests/Makefile.am
++++ b/helgrind/tests/Makefile.am
+@@ -214,6 +214,11 @@ check_PROGRAMS += annotate_rwlock
+ endif
+
+ AM_CFLAGS += $(AM_FLAG_M3264_PRI)
++
++if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX
++AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX)
++endif
++
+ AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
+
+ LDADD = -lpthread
+diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am
+index 84e49405f..aff861a32 100644
+--- a/memcheck/tests/Makefile.am
++++ b/memcheck/tests/Makefile.am
+@@ -443,6 +443,11 @@ check_PROGRAMS += reach_thread_register
+ endif
+
+ AM_CFLAGS += $(AM_FLAG_M3264_PRI)
++
++if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX
++AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX)
++endif
++
+ AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
+
+ if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
+diff --git a/none/tests/mips32/Makefile.am b/none/tests/mips32/Makefile.am
+index d11591d45..602cd26f6 100644
+--- a/none/tests/mips32/Makefile.am
++++ b/none/tests/mips32/Makefile.am
+@@ -99,6 +99,10 @@ check_PROGRAMS = \
+ round_fpu64 \
+ fpu_branches
+
++if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX
++AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX)
++endif
++
+ AM_CFLAGS += @FLAG_M32@
+ AM_CXXFLAGS += @FLAG_M32@
+ AM_CCASFLAGS += @FLAG_M32@
+--
+2.17.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch b/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch
new file mode 100644
index 0000000000..9f1da7bac6
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch
@@ -0,0 +1,108 @@
+From 715cf122388f3527afa5649cebf9f1522c240693 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 20 Apr 2017 10:11:16 -0700
+Subject: [PATCH] makefiles: Drop setting -mcpu to cortex-a8 on arm
+ architecture
+
+We can not assume that all arches armv7+ are cortex-a8 only
+it fails to build for rpi which is armv7ve based (cortex-a8) cpu
+implementation.
+Fixes
+| cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.all.am | 6 +++---
+ helgrind/tests/Makefile.am | 6 +++---
+ none/tests/arm/Makefile.am | 18 +++++++++---------
+ 3 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/Makefile.all.am b/Makefile.all.am
+index 02059a3..c7c4700 100644
+--- a/Makefile.all.am
++++ b/Makefile.all.am
+@@ -197,11 +197,11 @@ AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g
+
+ AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@
+ AM_CFLAGS_ARM_LINUX = @FLAG_M32@ \
+- $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8
++ $(AM_CFLAGS_BASE) -marm
+ AM_CFLAGS_PSO_ARM_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) \
+- -marm -mcpu=cortex-a8 $(AM_CFLAGS_PSO_BASE)
++ -marm $(AM_CFLAGS_PSO_BASE)
+ AM_CCASFLAGS_ARM_LINUX = @FLAG_M32@ \
+- -marm -mcpu=cortex-a8 -g
++ -marm -g
+
+ AM_FLAG_M3264_ARM64_LINUX = @FLAG_M64@
+ AM_CFLAGS_ARM64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE)
+diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
+index df82169..07eb66a 100644
+--- a/helgrind/tests/Makefile.am
++++ b/helgrind/tests/Makefile.am
+@@ -189,9 +189,9 @@ if ! VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
+ endif
+
+ if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
+-annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
+-tc07_hbl1_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
+-tc08_hbl2_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
++annotate_hbefore_CFLAGS = $(AM_CFLAGS)
++tc07_hbl1_CFLAGS = $(AM_CFLAGS)
++tc08_hbl2_CFLAGS = $(AM_CFLAGS)
+ else
+ annotate_hbefore_CFLAGS = $(AM_CFLAGS)
+ tc07_hbl1_CFLAGS = $(AM_CFLAGS)
+diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
+index 024eb6d..ccecb90 100644
+--- a/none/tests/arm/Makefile.am
++++ b/none/tests/arm/Makefile.am
+@@ -52,10 +52,10 @@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
+ # need special helping w.r.t -mfpu and -mfloat-abi, though.
+ # Also force -O0 since -O takes hundreds of MB of memory
+ # for v6intThumb.c.
+-v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm
+-v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
++v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -marm
++v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
+
+-v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
++v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
+
+ v8crypto_a_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -marm
+ v8crypto_t_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -mthumb
+@@ -65,23 +65,23 @@ v8memory_a_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ v8memory_t_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mthumb
+
+-vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
++vfp_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ -mfpu=neon \
+ -mthumb
+
+
+-neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
++neon128_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ -mfpu=neon \
+ -mthumb
+
+-neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
++neon64_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ -mfpu=neon \
+ -mthumb
+
+ intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb
+-ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
+-ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
++ldrt_CFLAGS = $(AM_CFLAGS) -g -mthumb
++ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -marm
+
+-vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mfpu=vfpv3
+
+ vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm
+--
+2.12.2
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch
new file mode 100644
index 0000000000..a48d7db070
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch
@@ -0,0 +1,32 @@
+From 3409dc35c15bb14c8a525239806322648e079ab1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Jul 2017 17:12:43 -0700
+Subject: [PATCH 1/3] memcheck/arm64: Define __THROW if not already defined
+
+Helps compiling with musl where __THROW is not available
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ memcheck/tests/arm64-linux/scalar.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h
+index 9008816..8ef050f 100644
+--- a/memcheck/tests/arm64-linux/scalar.h
++++ b/memcheck/tests/arm64-linux/scalar.h
+@@ -12,6 +12,10 @@
+ #include <sys/types.h>
+ #include <sys/mman.h>
+
++#ifndef __THROW
++#define __THROW
++#endif
++
+ // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
+ // declare this ourselves.
+ extern long int syscall (long int __sysno, ...) __THROW;
+--
+2.13.2
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch
new file mode 100644
index 0000000000..27366153f7
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch
@@ -0,0 +1,31 @@
+From 64ad2744acfb4fa40b1c114633a053f87125a203 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 00:46:39 -0700
+Subject: [PATCH 1/6] sigqueue: Rename _sifields to __si_fields on musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ memcheck/tests/linux/sigqueue.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/memcheck/tests/linux/sigqueue.c b/memcheck/tests/linux/sigqueue.c
+index d18bd72..acb7cba 100644
+--- a/memcheck/tests/linux/sigqueue.c
++++ b/memcheck/tests/linux/sigqueue.c
+@@ -8,6 +8,11 @@
+ #include <syscall.h>
+ #include <unistd.h>
+
++/* musl libc defines siginfo_t __si_fields instead of _sifields */
++#if defined(__linux__) && !defined(__GLIBC__)
++#define _sifields __si_fields
++#endif
++
+ int main(int argc, char **argv)
+ {
+ siginfo_t *si;
+--
+2.13.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch b/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch
new file mode 100644
index 0000000000..185b8f9e60
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch
@@ -0,0 +1,39 @@
+From de692e359801a1f0488c76267e4f904dd2efe754 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 00:39:07 -0700
+Subject: [PATCH] str_tester.c: Limit rawmemchr() test to glibc
+
+rawmemchr() is a GNU extention therefore mark it so
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ memcheck/tests/str_tester.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c
+index 9f7790a..47e4b4a 100644
+--- a/memcheck/tests/str_tester.c
++++ b/memcheck/tests/str_tester.c
+@@ -504,7 +504,7 @@ test_strchrnul (void)
+ #endif
+
+ // DDD: better done by testing for the function.
+-#if !defined(__APPLE__) && !defined(__sun)
++#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+ static void
+ test_rawmemchr (void)
+ {
+@@ -1442,7 +1442,7 @@ main (void)
+ test_strchrnul ();
+ # endif
+
+-# if !defined(__APPLE__) && !defined(__sun)
++# if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+ /* rawmemchr. */
+ test_rawmemchr ();
+ # endif
+--
+2.13.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
new file mode 100644
index 0000000000..bf0f0ded21
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
@@ -0,0 +1,39 @@
+From d1dea3c2bcf1e22baab39e2c0b8ca59db8a5bc37 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Mon, 13 May 2019 17:12:21 -0400
+Subject: [PATCH 1/2] valgrind: filter_xml_frames: do not filter /usr
+
+filter_xml_frames is intended to filter system paths under
+'/usr' that vary from platform to platform. In the ptest case
+for Yocto's valgrind, the ptest executables are placed under:
+ /usr/lib/valgrind/ptest
+and if these frames are filtered out, then the 'drd' tests fail
+the comparision between exepected and actual output.
+
+Changing this filter allows the comparison to succeed without
+any negative impact.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ tests/filter_xml_frames | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/filter_xml_frames b/tests/filter_xml_frames
+index f1fa3f070..04fbc82de 100755
+--- a/tests/filter_xml_frames
++++ b/tests/filter_xml_frames
+@@ -47,7 +47,8 @@ while (my $line = <>)
+ $has_function_name = 1 if ($line =~ /<fn>/);
+ # This may require tweaking; currently /lib and /usr/lib are matched
+ $has_system_obj = 1 if ($line =~ /<obj>\/lib/);
+- $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
++# for Yocto, skip /usr since tests are under /usr/lib/...
++# $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
+ }
+ }
+
+--
+2.17.0
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
new file mode 100644
index 0000000000..480fe33247
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
@@ -0,0 +1,52 @@
+From bd4e926e7e14747b3cd4d7b2a1bd5410b22f3ea2 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Tue, 16 Oct 2018 21:27:46 -0400
+Subject: [PATCH] context APIs are not available on musl
+
+Upstream-Status: Pending
+
+Updated patch for valgrind-3.14
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ memcheck/tests/linux/stack_changes.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
+index 7f97b90a5..a26cb4ae6 100644
+--- a/memcheck/tests/linux/stack_changes.c
++++ b/memcheck/tests/linux/stack_changes.c
+@@ -10,6 +10,7 @@
+ // This test is checking the libc context calls (setcontext, etc.) and
+ // checks that Valgrind notices their stack changes properly.
+
++#ifdef __GLIBC__
+ typedef ucontext_t mycontext;
+
+ mycontext ctx1, ctx2, oldc;
+@@ -51,9 +52,11 @@ int init_context(mycontext *uc)
+
+ return ret;
+ }
++#endif
+
+ int main(int argc, char **argv)
+ {
++#ifdef __GLIBC__
+ int c1 = init_context(&ctx1);
+ int c2 = init_context(&ctx2);
+
+@@ -66,6 +69,8 @@ int main(int argc, char **argv)
+ //free(ctx1.uc_stack.ss_sp);
+ VALGRIND_STACK_DEREGISTER(c2);
+ //free(ctx2.uc_stack.ss_sp);
+-
++#else
++ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
++#endif
+ return 0;
+ }
+--
+2.17.0
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch b/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch
new file mode 100644
index 0000000000..5433472291
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch
@@ -0,0 +1,32 @@
+From 67d199dbdcbb3feff5f8928f87725fc64c0307d7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Jul 2017 17:36:42 -0700
+Subject: [PATCH 2/3] memcheck/x86: Define __THROW if not defined
+
+musl does not have __THROW, therefore make it null
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ memcheck/tests/x86-linux/scalar.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h
+index ef28b03..52f742e 100644
+--- a/memcheck/tests/x86-linux/scalar.h
++++ b/memcheck/tests/x86-linux/scalar.h
+@@ -11,6 +11,10 @@
+ #include <sys/types.h>
+ #include <sys/mman.h>
+
++#ifndef __THROW
++#define __THROW
++#endif
++
+ // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
+ // declare this ourselves.
+ extern long int syscall (long int __sysno, ...) __THROW;
+--
+2.13.2
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch b/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
deleted file mode 100644
index e9112da0cb..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f96cf1f4eaa72860ab8b5e18ad10fdc704d78c5f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 15 Dec 2015 15:01:34 +0200
-Subject: [PATCH 2/5] remove rpath
-
-Upstream-Status: Inappropriate [embedded config]
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- none/tests/Makefile.am | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
-index 54f2a7e..25b0f49 100644
---- a/none/tests/Makefile.am
-+++ b/none/tests/Makefile.am
-@@ -326,7 +326,6 @@ threadederrno_CFLAGS += --std=c99
- endif
- 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
-@@ -334,7 +333,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
---
-2.6.2
-
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch b/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
new file mode 100644
index 0000000000..a82972ec1b
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
@@ -0,0 +1,32 @@
+From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Mon, 13 May 2019 17:26:26 -0400
+Subject: [PATCH 2/2] valgrind: adjust std_list expected output
+
+The run-ptest script uses a custom --yocto-ptest option
+to change the summary statistics that valgrind issues
+to a format that matches what ptest-runner expects.
+
+Only this std_list test which checks that strcpy() works
+properly on Ubuntu-12.04 and later is affected by this change.
+It's normal output when called with --yocto-ptest is a blank
+line so adjust the expected output.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ drd/tests/std_list.stderr.exp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drd/tests/std_list.stderr.exp b/drd/tests/std_list.stderr.exp
+index d18786f80..8b1378917 100644
+--- a/drd/tests/std_list.stderr.exp
++++ b/drd/tests/std_list.stderr.exp
+@@ -1,3 +1 @@
+
+-
+-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+--
+2.17.0
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch b/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch
new file mode 100644
index 0000000000..c2965c40df
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch
@@ -0,0 +1,45 @@
+From ecbdea7bd8b08205f1bc3f6b72d4b4a80f313fcb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:03:17 -0700
+Subject: [PATCH 3/6] correct include directive path for config.h
+
+when building out of source tree, it can not find
+the generated config.h otherwise
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ memcheck/tests/linux/syscalls-2007.c | 2 +-
+ memcheck/tests/linux/syslog-syscall.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/memcheck/tests/linux/syscalls-2007.c b/memcheck/tests/linux/syscalls-2007.c
+index b61c6d5..cc3fd62 100644
+--- a/memcheck/tests/linux/syscalls-2007.c
++++ b/memcheck/tests/linux/syscalls-2007.c
+@@ -10,7 +10,7 @@
+
+ #define _GNU_SOURCE
+
+-#include "../../config.h"
++#include "config.h"
+ #include <fcntl.h>
+ #include <signal.h>
+ #include <stdint.h>
+diff --git a/memcheck/tests/linux/syslog-syscall.c b/memcheck/tests/linux/syslog-syscall.c
+index 1143722..21e758b 100644
+--- a/memcheck/tests/linux/syslog-syscall.c
++++ b/memcheck/tests/linux/syslog-syscall.c
+@@ -6,7 +6,7 @@
+ * klogctl().
+ */
+
+-#include "../../config.h"
++#include "config.h"
+ #include <stdio.h>
+ #if defined(HAVE_SYS_KLOG_H)
+ #include <sys/klog.h>
+--
+2.13.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch
new file mode 100644
index 0000000000..fa1344c853
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch
@@ -0,0 +1,68 @@
+From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Jul 2017 17:37:56 -0700
+Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall()
+
+__modify_ldt() is specific to glibc, replacing it with syscall()
+makes it more portable.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ none/tests/x86-linux/seg_override.c | 15 ++++++---------
+ 1 file changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c
+index b7619c9..c89874b 100644
+--- a/none/tests/x86-linux/seg_override.c
++++ b/none/tests/x86-linux/seg_override.c
+@@ -2,6 +2,8 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
++#include <syscall.h>
+
+ /* Stuff from Wine. */
+
+@@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent )
+ /* our copy of the ldt */
+ LDT_ENTRY ldt_copy[8192];
+
+-/* System call to set LDT entry. */
+-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
+-extern int __modify_ldt (int, void *, size_t);
+-
+ void print_ldt ( void )
+ {
+ int res;
+- res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
++ /* System call to set LDT entry. */
++ res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
+ printf("got %d bytes\n", res );
+ perror("error is");
+ }
+@@ -83,9 +82,6 @@ struct modify_ldt_ldt_s
+ unsigned int empty:25;
+ };
+
+-/* System call to set LDT entry. */
+-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
+-
+ void set_ldt1 ( void* base )
+ {
+ int stat;
+@@ -102,7 +98,8 @@ void set_ldt1 ( void* base )
+ ldt_entry.read_exec_only = 0;
+ ldt_entry.limit_in_pages = 0;
+ ldt_entry.seg_not_present = 0;
+- stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry));
++ /* System call to set LDT entry. */
++ stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry));
+ printf("stat = %d\n", stat);
+ }
+
+--
+2.13.2
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
index ed313d6444..75bb0aa7cb 100644
--- a/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
@@ -1,7 +1,7 @@
-From 38ae233b6893a4eec7f9ed6d8ad02392bca8eaed Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 15 Dec 2015 15:31:50 +0200
-Subject: [PATCH 1/2] Fix out of tree builds.
+From 8f916dcb395fe5a2429f2867ba4daf8ef3af073a Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Tue, 16 Oct 2018 21:01:04 -0400
+Subject: [PATCH] Fix out of tree builds.
The paths to these files need to be fully specified in
the out of tree build case. glibc-2.X.supp is a generated file so the full path
@@ -9,25 +9,28 @@ is deliberately not specified in that case.
RP 2013/03/23
+Patch refreshed for valgrind-3.14.0.
+
Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
- configure.ac | 64 ++++++++++++++++++++++++++++++------------------------------
- 1 file changed, 32 insertions(+), 32 deletions(-)
+ configure.ac | 68 ++++++++++++++++++++++++++--------------------------
+ 1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 8ab7f9b..9366dc7 100644
+index c18ae5f2a..99667ce57 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -377,44 +377,44 @@ case "${host_os}" in
+@@ -392,50 +392,50 @@ case "${host_os}" in
9.*)
AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard])
AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version])
- DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}"
;;
10.*)
AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard])
@@ -77,16 +80,26 @@ index 8ab7f9b..9366dc7 100644
+ DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
;;
- *)
- AC_MSG_RESULT([unsupported (${kernel})])
-@@ -426,13 +426,13 @@ case "${host_os}" in
- solaris2.11*)
- AC_MSG_RESULT([ok (${host_os})])
- VGCONF_OS="solaris"
-- DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/solaris11.supp ${DEFAULT_SUPP}"
+ 16.*)
+ AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra])
+ AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version])
+- DEFAULT_SUPP="darwin16.supp ${DEFAULT_SUPP}"
+- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
+ ;;
+ 17.*)
+ AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra])
+@@ -460,7 +460,7 @@ case "${host_os}" in
+ DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}"
+ ;;
+ *)
+- DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/solaris11.supp ${DEFAULT_SUPP}"
+ ;;
+ esac
;;
-
+@@ -468,7 +468,7 @@ case "${host_os}" in
solaris2.12*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="solaris"
@@ -95,7 +108,7 @@ index 8ab7f9b..9366dc7 100644
;;
*)
-@@ -1015,29 +1015,29 @@ AC_MSG_CHECKING([the glibc version])
+@@ -1051,29 +1051,29 @@ AC_MSG_CHECKING([the glibc version])
case "${GLIBC_VERSION}" in
2.2)
AC_MSG_RESULT(${GLIBC_VERSION} family)
@@ -135,7 +148,7 @@ index 8ab7f9b..9366dc7 100644
;;
2.*)
AC_MSG_RESULT(${GLIBC_VERSION} family)
-@@ -1046,8 +1046,8 @@ case "${GLIBC_VERSION}" in
+@@ -1082,8 +1082,8 @@ case "${GLIBC_VERSION}" in
AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1,
[Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)])
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
@@ -146,7 +159,7 @@ index 8ab7f9b..9366dc7 100644
;;
darwin)
AC_MSG_RESULT(Darwin)
-@@ -1057,7 +1057,7 @@ case "${GLIBC_VERSION}" in
+@@ -1093,7 +1093,7 @@ case "${GLIBC_VERSION}" in
bionic)
AC_MSG_RESULT(Bionic)
AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
@@ -155,7 +168,7 @@ index 8ab7f9b..9366dc7 100644
;;
solaris)
AC_MSG_RESULT(Solaris)
-@@ -1079,11 +1079,11 @@ if test "$VGCONF_OS" != "solaris"; then
+@@ -1120,11 +1120,11 @@ if test "$VGCONF_OS" != "solaris"; then
# attempt to detect whether such libraries are installed on the
# build machine (or even if any X facilities are present); just
# add the suppressions antidisirregardless.
@@ -171,5 +184,5 @@ index 8ab7f9b..9366dc7 100644
--
-2.6.2
+2.17.0
diff --git a/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch
new file mode 100644
index 0000000000..1cb7062545
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch
@@ -0,0 +1,37 @@
+From fb77fef4f866dac7bcc6d1ae025da60564869f84 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:06:11 -0700
+Subject: [PATCH 4/6] pth_atfork1.c: Define error() API for musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ none/tests/pth_atfork1.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/pth_atfork1.c b/none/tests/pth_atfork1.c
+index 34201ef..b7f5f2d 100644
+--- a/none/tests/pth_atfork1.c
++++ b/none/tests/pth_atfork1.c
+@@ -18,7 +18,7 @@
+ Boston, MA 02111-1307, USA. */
+
+ #include <errno.h>
+-#if !defined(__APPLE__) && !defined(__sun)
++#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+ # include <error.h>
+ #endif
+ #include <stdlib.h>
+@@ -27,7 +27,7 @@
+ #include <sys/wait.h>
+ #include <stdio.h>
+
+-#if defined(__APPLE__) || defined(__sun)
++#if defined(__APPLE__) || defined(__sun) || (defined(__linux__) && !defined(__GLIBC__))
+ #include <string.h> /* strerror */
+ static void error (int status, int errnum, char* msg)
+ {
+--
+2.13.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch b/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
index f5ac989fbf..7985308e41 100644
--- a/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
@@ -100,7 +100,7 @@ index a441f42..cb05b52 100755
unlink("$name.$mid.out");
unlink(<$name.$mid.diff*>);
- return;
-+ return 1;
++ return 0;
}
}
}
@@ -113,7 +113,7 @@ index a441f42..cb05b52 100755
print "Failure encountered, stopping to loop\n";
exit 1
}
-+ return 0;
++ return 1;
}
sub do_one_test($$)
diff --git a/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch
new file mode 100644
index 0000000000..6176640e42
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch
@@ -0,0 +1,30 @@
+From b4b9f072c22f96844e02cb9d68f7ff2408680817 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:07:59 -0700
+Subject: [PATCH 5/6] tc20_verifywrap.c: Fake __GLIBC_PREREQ with musl
+
+similar to sun
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ helgrind/tests/tc20_verifywrap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c
+index c110000..a311a49 100644
+--- a/helgrind/tests/tc20_verifywrap.c
++++ b/helgrind/tests/tc20_verifywrap.c
+@@ -20,7 +20,7 @@
+
+ #if !defined(__APPLE__)
+
+-#if defined(__sun__)
++#if defined(__sun__) || (defined(__linux__) && !defined(__GLIBC__))
+ /* Fake __GLIBC_PREREQ on Solaris. Pretend glibc >= 2.4. */
+ # define __GLIBC_PREREQ
+ #else
+--
+2.13.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch b/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
new file mode 100644
index 0000000000..05886c743d
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
@@ -0,0 +1,32 @@
+From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:20:32 -0700
+Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding
+ offset to it
+
+Fixes
+error: invalid use of undefined type 'struct __pthread'
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ drd/tests/pth_detached3.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
+index c02eef1..35d43a6 100644
+--- a/drd/tests/pth_detached3.c
++++ b/drd/tests/pth_detached3.c
+@@ -21,7 +21,7 @@ int main(int argc, char** argv)
+ pthread_detach(thread);
+
+ /* Invoke pthread_detach() with an invalid thread ID. */
+- pthread_detach(thread + 8);
++ pthread_detach((pthread_t*)(&thread + 8));
+
+ fprintf(stderr, "Finished.\n");
+
+--
+2.13.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch b/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch
deleted file mode 100644
index ecb33b8cb3..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Debian fix for MIPS: mmap(0x400000, 32768) failed in UME with error 22 (Invalid argument)
-
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777704
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-
-Description: Disable the MIPS linker workarounds when using -Ttext-section
-Origin: vendor
-Bug-Debian: http://bugs.debian.org/777704
-Author: James Cowgill <james410@cowgill.org.uk>
-Last-Update: 2015-04-25
-
---- a/coregrind/link_tool_exe_linux.in
-+++ b/coregrind/link_tool_exe_linux.in
-@@ -76,12 +76,13 @@
- my $arch = substr($x, 0, index($x, "'"));
-
- my $extra_args;
--if (($arch eq 'mips') || ($arch eq 'mipsel')
-- || ($arch eq 'mipsisa32r2el')) {
-- $extra_args = "-static -Wl,--section-start=.reginfo=$ala";
--} elsif (($arch eq 'mips64') || ($arch eq 'mips64el') ||
-- ($arch eq 'mipsisa64el')) {
-- $extra_args = "-static -Wl,--section-start=.MIPS.options=$ala";
-+if ($arch =~ /^mips/ && "@FLAG_T_TEXT@" eq '-Ttext') {
-+ # We only need to use the special mips options when using -Ttext
-+ if ($arch =~ /^mips(64|isa64)/) {
-+ $extra_args = "-static -Wl,--section-start=.MIPS.options=$ala";
-+ } else {
-+ $extra_args = "-static -Wl,--section-start=.reginfo=$ala";
-+ }
- } else {
- $extra_args = "-static -Wl,@FLAG_T_TEXT@=$ala";
- }
diff --git a/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch b/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
index b054d05f7f..b431d3356e 100644
--- a/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
@@ -1,3 +1,8 @@
+From 67e7a690107efb16d6d5aebfe420b64a552accdf Mon Sep 17 00:00:00 2001
+From: Qing He <qing.he@intel.com>
+Date: Tue, 31 Aug 2010 22:51:58 +0800
+Subject: [PATCH] valgrind: fix perl scripts
+
this is a temporary patch to workaround cross compilation.
otherwise @PERL@ will be replaced to perl-native binary,
this creates unusable scripts and fails FILERDEPENDS mechanism
@@ -11,8 +16,16 @@ a better fix would need:
Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ cachegrind/cg_annotate.in | 2 +-
+ cachegrind/cg_diff.in | 2 +-
+ massif/ms_print.in | 2 +-
+ perf/vg_perf.in | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in
-index 9dc9565..cc4ef05 100644
+index 69365e8..978265d 100644
--- a/cachegrind/cg_annotate.in
+++ b/cachegrind/cg_annotate.in
@@ -1,4 +1,4 @@
@@ -22,7 +35,7 @@ index 9dc9565..cc4ef05 100644
##--------------------------------------------------------------------##
##--- Cachegrind's annotator. cg_annotate.in ---##
diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in
-index 951066e..84c2dde 100644
+index 395460b..05873cc 100755
--- a/cachegrind/cg_diff.in
+++ b/cachegrind/cg_diff.in
@@ -1,4 +1,4 @@
@@ -32,7 +45,7 @@ index 951066e..84c2dde 100644
##--------------------------------------------------------------------##
##--- Cachegrind's differencer. cg_diff.in ---##
diff --git a/massif/ms_print.in b/massif/ms_print.in
-index e6ffdbf..fb45906 100755
+index e6fae89..3b85b40 100755
--- a/massif/ms_print.in
+++ b/massif/ms_print.in
@@ -1,4 +1,4 @@
@@ -42,7 +55,7 @@ index e6ffdbf..fb45906 100755
##--------------------------------------------------------------------##
##--- Massif's results printer ms_print.in ---##
diff --git a/perf/vg_perf.in b/perf/vg_perf.in
-index 2188a31..83ad024 100644
+index 7a80cb0..28f6156 100644
--- a/perf/vg_perf.in
+++ b/perf/vg_perf.in
@@ -1,4 +1,4 @@
@@ -51,3 +64,15 @@ index 2188a31..83ad024 100644
##--------------------------------------------------------------------##
##--- Valgrind performance testing script vg_perf ---##
##--------------------------------------------------------------------##
+diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
+index cb05b52..032e947 100755
+--- a/tests/vg_regtest.in
++++ b/tests/vg_regtest.in
+@@ -1,4 +1,4 @@
+-#! @PERL@
++#! /usr/bin/perl
+ ##--------------------------------------------------------------------##
+ ##--- Valgrind regression testing script vg_regtest ---##
+ ##--------------------------------------------------------------------##
+---
+2.4.0
diff --git a/meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch b/meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch
deleted file mode 100644
index 76bc821872..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-backport fix from upstream to fix build errors with gcc 6
-
-http://valgrind.10908.n7.nabble.com/Valgrind-r15773-in-trunk-configure-ac-drd-tests-std-thread-cpp-drd-tests-std-thread2-cpp-td56109.html
-
-../../../valgrind-3.11.0/drd/tests/std_thread.cpp:30:3: error: '_Impl_base' is not a member of 'std::thread'
- std::thread::_Impl_base* __t = static_cast<std::thread::_Impl_base*>(__p);
- ^~~
-../../../valgrind-3.11.0/drd/tests/std_thread.cpp:30:28: error: '__t' was not declared in this scope
- std::thread::_Impl_base* __t = static_cast<std::thread::_Impl_base*>(__p);
- ^~~
-../../../valgrind-3.11.0/drd/tests/std_thread.cpp:30:59: error: '_Impl_base' in 'class std::thread' does not name a type
- std::thread::_Impl_base* __t = static_cast<std::thread::_Impl_base*>(__p);
- ^~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport
-
-Index: configure.ac
-===================================================================
---- a/configure.ac (revision 15772)
-+++ b/configure.ac (revision 15773)
-@@ -160,7 +160,7 @@
- icc-1[[3-9]].*)
- AC_MSG_RESULT([ok (ICC version ${gcc_version})])
- ;;
-- notclang-[[3-9]].*|notclang-[[1-9][0-9]]*)
-+ notclang-[[3-9]]|notclang-[[3-9]].*|notclang-[[1-9][0-9]]*)
- AC_MSG_RESULT([ok (${gcc_version})])
- ;;
- clang-2.9|clang-[[3-9]].*|clang-[[1-9][0-9]]*)
-Index: drd/tests/std_thread2.cpp
-===================================================================
---- a/drd/tests/std_thread2.cpp (revision 15772)
-+++ b/drd/tests/std_thread2.cpp (revision 15773)
-@@ -26,6 +26,7 @@
- return 0;
- }
-
-+#if defined(__GNUC__) && __GNUC__ -0 < 6
- //
- // From libstdc++-v3/src/c++11/thread.cc
- //
-@@ -70,3 +71,4 @@
- }
- }
- }
-+#endif
-Index: drd/tests/std_thread.cpp
-===================================================================
---- a/drd/tests/std_thread.cpp (revision 15772)
-+++ b/drd/tests/std_thread.cpp (revision 15773)
-@@ -21,6 +21,7 @@
- return 0;
- }
-
-+#if defined(__GNUC__) && __GNUC__ -0 < 6
- //
- // From libstdc++-v3/src/c++11/thread.cc
- //
-@@ -65,3 +66,4 @@
- }
- }
- }
-+#endif
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 b/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
new file mode 100644
index 0000000000..acf4fd1bc1
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
@@ -0,0 +1,236 @@
+cachegrind/tests/ann1
+callgrind/tests/simwork1
+callgrind/tests/simwork2
+callgrind/tests/simwork3
+callgrind/tests/simwork-both
+callgrind/tests/simwork-cache
+callgrind/tests/threads
+callgrind/tests/threads-use
+drd/tests/annotate_barrier
+drd/tests/annotate_barrier_xml
+drd/tests/annotate_hbefore
+drd/tests/annotate_hb_err
+drd/tests/annotate_hb_race
+drd/tests/annotate_ignore_read
+drd/tests/annotate_ignore_rw
+drd/tests/annotate_ignore_rw2
+drd/tests/annotate_ignore_write
+drd/tests/annotate_ignore_write2
+drd/tests/annotate_order_1
+drd/tests/annotate_order_2
+drd/tests/annotate_order_3
+drd/tests/annotate_publish_hg
+drd/tests/annotate_rwlock
+drd/tests/annotate_rwlock_hg
+drd/tests/annotate_sem
+drd/tests/annotate_smart_pointer
+drd/tests/annotate_smart_pointer2
+drd/tests/annotate_spinlock
+drd/tests/annotate_static
+drd/tests/annotate_trace_memory
+drd/tests/annotate_trace_memory_xml
+drd/tests/atomic_var
+drd/tests/bar_bad
+drd/tests/bar_bad_xml
+drd/tests/bar_trivial
+drd/tests/bug-235681
+drd/tests/bug322621
+drd/tests/circular_buffer
+drd/tests/concurrent_close
+drd/tests/custom_alloc
+drd/tests/custom_alloc_fiw
+drd/tests/dlopen
+drd/tests/fork-parallel
+drd/tests/fork-serial
+drd/tests/fp_race
+drd/tests/fp_race2
+drd/tests/fp_race_xml
+drd/tests/free_is_write
+drd/tests/free_is_write2
+drd/tests/hg01_all_ok
+drd/tests/hg02_deadlock
+drd/tests/hg03_inherit
+drd/tests/hg04_race
+drd/tests/hg05_race2
+drd/tests/hg06_readshared
+drd/tests/hold_lock_1
+drd/tests/hold_lock_2
+drd/tests/linuxthreads_det
+drd/tests/matinv
+drd/tests/memory_allocation
+drd/tests/monitor_example
+drd/tests/new_delete
+drd/tests/pth_barrier
+drd/tests/pth_barrier2
+drd/tests/pth_barrier3
+drd/tests/pth_barrier_race
+drd/tests/pth_barrier_reinit
+drd/tests/pth_barrier_thr_cr
+drd/tests/pth_broadcast
+drd/tests/pth_cancel_locked
+drd/tests/pth_cleanup_handler
+drd/tests/pth_cond_race
+drd/tests/pth_cond_race2
+drd/tests/pth_detached2
+drd/tests/pth_detached3
+drd/tests/pth_detached_sem
+drd/tests/pth_inconsistent_cond_wait
+drd/tests/pth_mutex_reinit
+drd/tests/pth_once
+drd/tests/pth_process_shared_mutex
+drd/tests/pth_spinlock
+drd/tests/pth_uninitialized_cond
+drd/tests/read_and_free_race
+drd/tests/recursive_mutex
+drd/tests/rwlock_race
+drd/tests/rwlock_test
+drd/tests/rwlock_type_checking
+drd/tests/sem_as_mutex
+drd/tests/sem_as_mutex2
+drd/tests/sem_as_mutex3
+drd/tests/sem_open
+drd/tests/sem_open2
+drd/tests/sem_open3
+drd/tests/sem_open_traced
+drd/tests/sem_wait
+drd/tests/sigalrm
+drd/tests/sigaltstack
+drd/tests/std_atomic
+drd/tests/std_string
+drd/tests/std_thread
+drd/tests/std_thread2
+drd/tests/str_tester
+drd/tests/tc01_simple_race
+drd/tests/tc02_simple_tls
+drd/tests/tc03_re_excl
+drd/tests/tc04_free_lock
+drd/tests/tc05_simple_race
+drd/tests/tc06_two_races
+drd/tests/tc07_hbl1
+drd/tests/tc08_hbl2
+drd/tests/tc09_bad_unlock
+drd/tests/tc10_rec_lock
+drd/tests/tc11_XCHG
+drd/tests/tc12_rwl_trivial
+drd/tests/tc13_laog1
+drd/tests/tc15_laog_lockdel
+drd/tests/tc16_byterace
+drd/tests/tc17_sembar
+drd/tests/tc18_semabuse
+drd/tests/tc19_shadowmem
+drd/tests/tc21_pthonce
+drd/tests/tc22_exit_w_lock
+drd/tests/tc23_bogus_condwait
+helgrind/tests/annotate_rwlock
+helgrind/tests/annotate_smart_pointer
+helgrind/tests/bar_bad
+helgrind/tests/bar_trivial
+helgrind/tests/bug322621
+helgrind/tests/cond_init_destroy
+helgrind/tests/cond_timedwait_invalid
+helgrind/tests/cond_timedwait_test
+helgrind/tests/free_is_write
+helgrind/tests/hg01_all_ok
+helgrind/tests/hg03_inherit
+helgrind/tests/hg04_race
+helgrind/tests/hg05_race2
+helgrind/tests/hg06_readshared
+helgrind/tests/locked_vs_unlocked1_fwd
+helgrind/tests/locked_vs_unlocked1_rev
+helgrind/tests/locked_vs_unlocked2
+helgrind/tests/locked_vs_unlocked3
+helgrind/tests/pth_barrier1
+helgrind/tests/pth_barrier2
+helgrind/tests/pth_barrier3
+helgrind/tests/pth_destroy_cond
+helgrind/tests/rwlock_race
+helgrind/tests/rwlock_test
+helgrind/tests/shmem_abits
+helgrind/tests/stackteardown
+helgrind/tests/t2t_laog
+helgrind/tests/tc01_simple_race
+helgrind/tests/tc02_simple_tls
+helgrind/tests/tc03_re_excl
+helgrind/tests/tc04_free_lock
+helgrind/tests/tc05_simple_race
+helgrind/tests/tc06_two_races
+helgrind/tests/tc06_two_races_xml
+helgrind/tests/tc07_hbl1
+helgrind/tests/tc08_hbl2
+helgrind/tests/tc09_bad_unlock
+helgrind/tests/tc10_rec_lock
+helgrind/tests/tc11_XCHG
+helgrind/tests/tc12_rwl_trivial
+helgrind/tests/tc13_laog1
+helgrind/tests/tc14_laog_dinphils
+helgrind/tests/tc15_laog_lockdel
+helgrind/tests/tc16_byterace
+helgrind/tests/tc17_sembar
+helgrind/tests/tc18_semabuse
+helgrind/tests/tc19_shadowmem
+helgrind/tests/tc20_verifywrap
+helgrind/tests/tc21_pthonce
+helgrind/tests/tc22_exit_w_lock
+helgrind/tests/tc23_bogus_condwait
+helgrind/tests/tc24_nonzero_sem
+helgrind/tests/tls_threads
+memcheck/tests/accounting
+memcheck/tests/addressable
+memcheck/tests/arm64-linux/scalar
+memcheck/tests/atomic_incs
+memcheck/tests/badaddrvalue
+memcheck/tests/badfree
+memcheck/tests/badfree-2trace
+memcheck/tests/badfree3
+memcheck/tests/badjump
+memcheck/tests/badjump2
+memcheck/tests/badloop
+memcheck/tests/badpoll
+memcheck/tests/badrw
+memcheck/tests/big_blocks_freed_list
+memcheck/tests/brk2
+memcheck/tests/dw4
+memcheck/tests/err_disable4
+memcheck/tests/err_disable_arange1
+memcheck/tests/leak-autofreepool-5
+memcheck/tests/leak_cpp_interior
+memcheck/tests/linux/lsframe1
+memcheck/tests/linux/lsframe2
+memcheck/tests/linux/with-space
+memcheck/tests/origin5-bz2
+memcheck/tests/origin6-fp
+memcheck/tests/overlap
+memcheck/tests/partial_load_dflt
+memcheck/tests/pdb-realloc2
+memcheck/tests/sh-mem
+memcheck/tests/sh-mem-random
+memcheck/tests/sigaltstack
+memcheck/tests/sigkill
+memcheck/tests/signal2
+memcheck/tests/supp_unknown
+memcheck/tests/threadname
+memcheck/tests/threadname_xml
+memcheck/tests/unit_oset
+memcheck/tests/varinfo1
+memcheck/tests/varinfo2
+memcheck/tests/varinfo3
+memcheck/tests/varinfo4
+memcheck/tests/varinfo5
+memcheck/tests/varinfo6
+memcheck/tests/varinforestrict
+memcheck/tests/vcpu_bz2
+memcheck/tests/vcpu_fbench
+memcheck/tests/vcpu_fnfns
+memcheck/tests/wcs
+memcheck/tests/wrap1
+memcheck/tests/wrap2
+memcheck/tests/wrap3
+memcheck/tests/wrap4
+memcheck/tests/wrap5
+memcheck/tests/wrap6
+memcheck/tests/wrap7
+memcheck/tests/wrap8
+memcheck/tests/wrapmalloc
+memcheck/tests/wrapmallocstatic
+memcheck/tests/writev1
+memcheck/tests/xml1
diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest
index f9a72ec4a9..97b0a85dbf 100755
--- a/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -2,11 +2,57 @@
# run-ptest - 'ptest' test infrastructure shell script that
# wraps the valgrind regression script vg_regtest.
-# Must be run in the /usr/lib/valgrind/ptest directory.
#
# Dave Lerner <dave.lerner@windriver.com>
+# Randy MacLeod <Randy.MacLeod@windriver.com>
###############################################################
-VALGRINDLIB=@libdir@/valgrind
-tests/vg_regtest --all \
- --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \
- --yocto-ptest
+VALGRIND_LIB=@libdir@/valgrind
+VALGRIND_BIN=@bindir@/valgrind
+
+LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"
+
+TOOLS="memcheck cachegrind callgrind helgrind drd massif dhat lackey none"
+EXP_TOOLS="exp-bbv exp-dhat exp-sgcheck"
+
+GDB_BIN=@bindir@/gdb
+cd ${VALGRIND_LIB}/ptest && ./gdbserver_tests/make_local_links ${GDB_BIN}
+
+arch=`arch`
+if [ "$arch" = "aarch64" ]; then
+ echo "Aarch64: Hide valgrind tests that result in defunct process and then out of memory"
+ for i in `cat remove-for-aarch64`; do
+ mv $i.vgtest $i.IGNORE;
+ done
+fi
+
+cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \
+ --valgrind=${VALGRIND_BIN} \
+ --valgrind-lib=${VALGRIND_LIB} \
+ --yocto-ptest \
+ gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
+ 2>&1|tee ${LOG}
+
+cd ${VALGRIND_LIB}/ptest && \
+ ./tests/post_regtest_checks $(pwd) \
+ gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
+ 2>&1|tee -a ${LOG}
+
+if [ "$arch" = "aarch64" ]; then
+ echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory"
+ for i in `cat remove-for-aarch64`; do
+ mv $i.IGNORE $i.vgtest;
+ done
+fi
+
+
+passed=`grep PASS: ${LOG}|wc -l`
+failed=`grep FAIL: ${LOG}|wc -l`
+skipped=`grep SKIP: ${LOG}|wc -l`
+all=$((passed + failed + skipped))
+
+( echo "=== Test Summary ==="
+ echo "TOTAL: ${all}"
+ echo "PASSED: ${passed}"
+ echo "FAILED: ${failed}"
+ echo "SKIPPED: ${skipped}"
+) | tee -a /${LOG}
diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch
new file mode 100644
index 0000000000..d04297dca8
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch
@@ -0,0 +1,45 @@
+From 005bd11809a1ce65e9f2c28e884354a4741650b9 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 13 Dec 2016 11:29:55 +0800
+Subject: [PATCH] make ld-XXX.so strlen intercept optional
+
+Hack: Depending on how glibc was compiled (e.g. optimised for size or
+built with _FORTIFY_SOURCE enabled) the strlen symbol might not be
+found in ld-XXX.so. Therefore although we should still try to
+intercept it, don't make it mandatory to do so.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ coregrind/m_redir.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c
+index ff35009..d7d6816 100644
+--- a/coregrind/m_redir.c
++++ b/coregrind/m_redir.c
+@@ -1275,7 +1275,18 @@ static void add_hardwired_spec (const HChar* sopatt, const HChar* fnpatt,
+ spec->to_addr = to_addr;
+ spec->isWrap = False;
+ spec->isGlobal = False;
+- spec->mandatory = mandatory;
++
++ /* Hack: Depending on how glibc was compiled (e.g. optimised for size or
++ built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found.
++ Therefore although we should still try to intercept it, don't make it
++ mandatory to do so. We over-ride "mandatory" here to avoid the need to
++ patch the many different architecture specific callers to
++ add_hardwired_spec(). */
++ if (0==VG_(strcmp)("strlen", fnpatt))
++ spec->mandatory = NULL;
++ else
++ spec->mandatory = mandatory;
++
+ /* VARIABLE PARTS */
+ spec->mark = False; /* not significant */
+ spec->done = False; /* not significant */
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
deleted file mode 100644
index 42fd27f537..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
+++ /dev/null
@@ -1,123 +0,0 @@
-SUMMARY = "Valgrind memory debugger and instrumentation framework"
-HOMEPAGE = "http://valgrind.org/"
-BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
-LICENSE = "GPLv2 & GPLv2+ & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://include/pub_tool_basics.h;beginline=1;endline=29;md5=ebb8e640ef633f940c425686c873f9fa \
- file://include/valgrind.h;beginline=1;endline=56;md5=4b5e24908e53016ea561c45f4234a327 \
- file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56"
-
-X11DEPENDS = "virtual/libx11"
-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://run-ptest \
- file://11_mips-link-tool.patch \
- file://0002-remove-rpath.patch \
- file://0004-Fix-out-of-tree-builds.patch \
- file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
- file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
- file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
- file://avoid-neon-for-targets-which-don-t-support-it.patch \
- file://gcc5-port.patch \
-"
-SRC_URI_append_libc-musl = "\
- file://0001-fix-build-for-musl-targets.patch \
-"
-SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
-SRC_URI[sha256sum] = "6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42"
-
-COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
-
-# valgrind supports armv7 and above
-COMPATIBLE_HOST_armv4 = 'null'
-COMPATIBLE_HOST_armv5 = 'null'
-COMPATIBLE_HOST_armv6 = 'null'
-
-# valgrind doesn't like mips soft float
-COMPATIBLE_HOST_mips = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}"
-COMPATIBLE_HOST_mipsel = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}"
-
-inherit autotools ptest
-
-EXTRA_OECONF = "--enable-tls --without-mpicc"
-EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS', True) != '32']}"
-
-# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
-EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
-
-EXTRA_OEMAKE = "-w"
-
-# valgrind likes to control its own optimisation flags. It generally defaults
-# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
-# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it
-# which fixes build path issue in DWARF.
-SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
-
-CFLAGS_append_libc-uclibc = " -D__UCLIBC__ "
-
-do_install_append () {
- install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
-}
-
-RDEPENDS_${PN} += "perl"
-
-# valgrind needs debug information for ld.so at runtime in order to
-# redirect functions like strlen.
-RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-
-RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob"
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
-
-# One of the tests contains a bogus interpreter path on purpose.
-# Skip file dependency check
-SKIP_FILEDEPS_${PN}-ptest = '1'
-
-do_compile_ptest() {
- oe_runmake check
-}
-
-do_install_ptest() {
- chmod +x ${B}/tests/vg_regtest
-
- # The test application binaries are not automatically installed.
- # Grab them from the build directory.
- #
- # The regression tests require scripts and data files that are not
- # copied to the build directory. They must be copied from the
- # source directory.
- saved_dir=$PWD
- for parent_dir in ${S} ${B} ; do
- cd $parent_dir
-
- # exclude shell or the package won't install
- rm -rf none/tests/shell* 2>/dev/null
-
- subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests"
-
- # Get the vg test scripts, filters, and expected files
- for dir in $subdirs ; do
- find $dir | cpio -pvdu ${D}${PTEST_PATH}
- done
- cd $saved_dir
- done
-
- # clean out build artifacts before building the rpm
- find ${D}${PTEST_PATH} \
- \( -name "Makefile*" \
- -o -name "*.o" \
- -o -name "*.c" \
- -o -name "*.S" \
- -o -name "*.h" \) \
- -exec rm {} \;
-
- # needed by massif tests
- cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
-
- # handle multilib
- sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
-}
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
new file mode 100644
index 0000000000..63f972945d
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
@@ -0,0 +1,206 @@
+SUMMARY = "Valgrind memory debugger and instrumentation framework"
+HOMEPAGE = "http://valgrind.org/"
+BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
+LICENSE = "GPLv2 & GPLv2+ & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://include/pub_tool_basics.h;beginline=6;endline=29;md5=d4de0407239381463cf01dd276d7c22e \
+ file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \
+ file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56"
+
+DEPENDS = " \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
+ "
+
+SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
+ file://fixed-perl-path.patch \
+ file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
+ file://run-ptest \
+ file://remove-for-aarch64 \
+ file://0004-Fix-out-of-tree-builds.patch \
+ file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
+ file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
+ file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
+ file://avoid-neon-for-targets-which-don-t-support-it.patch \
+ file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
+ file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \
+ file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \
+ file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \
+ file://0002-context-APIs-are-not-available-on-musl.patch \
+ file://0003-correct-include-directive-path-for-config.h.patch \
+ file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \
+ file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \
+ file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \
+ file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
+ file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
+ file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
+ file://0001-fix-opcode-not-supported-on-mips32-linux.patch \
+ file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
+ file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
+ file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \
+ file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
+ file://0002-valgrind-adjust-std_list-expected-output.patch \
+ file://0001-adjust-path-filter-for-2-memcheck-tests.patch \
+ "
+SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975"
+SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"
+UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
+
+COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
+
+# valgrind supports armv7 and above
+COMPATIBLE_HOST_armv4 = 'null'
+COMPATIBLE_HOST_armv5 = 'null'
+COMPATIBLE_HOST_armv6 = 'null'
+
+# X32 isn't supported by valgrind at this time
+COMPATIBLE_HOST_linux-gnux32 = 'null'
+COMPATIBLE_HOST_linux-muslx32 = 'null'
+
+# Disable for some MIPS variants
+COMPATIBLE_HOST_mipsarchr6 = 'null'
+COMPATIBLE_HOST_linux-gnun32 = 'null'
+
+# Disable for powerpc64 with musl
+COMPATIBLE_HOST_libc-musl_powerpc64 = 'null'
+
+inherit autotools ptest multilib_header
+
+EXTRA_OECONF = "--enable-tls --without-mpicc"
+EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}"
+
+# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
+EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
+
+EXTRA_OEMAKE = "-w"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
+
+# valgrind likes to control its own optimisation flags. It generally defaults
+# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
+# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it
+# which fixes build path issue in DWARF.
+SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
+
+do_configure_prepend () {
+ rm -rf ${S}/config.h
+ sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am
+ sed -i -e 's:$(top_builddir):$(pkglibdir)/ptest:g' ${S}/memcheck/tests/Makefile.am
+}
+
+do_install_append () {
+ install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
+ oe_multilib_header valgrind/config.h
+}
+
+VALGRINDARCH ?= "${TARGET_ARCH}"
+VALGRINDARCH_aarch64 = "arm64"
+VALGRINDARCH_x86-64 = "amd64"
+VALGRINDARCH_x86 = "x86"
+VALGRINDARCH_mips = "mips32"
+VALGRINDARCH_mipsel = "mips32"
+VALGRINDARCH_mips64el = "mips64"
+VALGRINDARCH_powerpc = "ppc"
+VALGRINDARCH_powerpc64 = "ppc64"
+VALGRINDARCH_powerpc64el = "ppc64le"
+
+INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so"
+
+RDEPENDS_${PN} += "perl"
+
+# valgrind needs debug information for ld.so at runtime in order to
+# redirect functions like strlen.
+RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
+
+RDEPENDS_${PN}-ptest += " bash coreutils file \
+ gdb libgomp \
+ perl \
+ perl-module-getopt-long perl-module-file-basename perl-module-file-glob \
+ procps sed ${PN}-dbg"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
+
+# One of the tests contains a bogus interpreter path on purpose.
+# Skip file dependency check
+SKIP_FILEDEPS_${PN}-ptest = '1'
+INSANE_SKIP_${PN}-ptest = "debug-deps"
+
+do_compile_ptest() {
+ oe_runmake check
+}
+
+do_install_ptest() {
+ chmod +x ${B}/tests/vg_regtest
+
+ # The test application binaries are not automatically installed.
+ # Grab them from the build directory.
+ #
+ # The regression tests require scripts and data files that are not
+ # copied to the build directory. They must be copied from the
+ # source directory.
+ saved_dir=$PWD
+ for parent_dir in ${S} ${B} ; do
+ cd $parent_dir
+
+ subdirs=" \
+ .in_place \
+ cachegrind/tests \
+ callgrind/tests \
+ dhat/tests \
+ drd/tests \
+ gdbserver_tests \
+ helgrind/tests \
+ lackey/tests \
+ massif/tests \
+ memcheck/tests \
+ none/tests \
+ tests \
+ exp-bbv/tests \
+ exp-dhat/tests \
+ exp-sgcheck/tests \
+ "
+ # Get the vg test scripts, filters, and expected files
+ for dir in $subdirs ; do
+ find $dir | cpio -pvdu ${D}${PTEST_PATH}
+ done
+ cd $saved_dir
+ done
+
+ # The scripts reference config.h so add it to the top ptest dir.
+ cp ${B}/config.h ${D}${PTEST_PATH}
+ install -D ${WORKDIR}/remove-for-aarch64 ${D}${PTEST_PATH}
+
+ # Add an executable need by none/tests/bigcode
+ mkdir ${D}${PTEST_PATH}/perf
+ cp ${B}/perf/bigcode ${D}${PTEST_PATH}/perf
+
+ # Add an executable needed by memcheck/tests/vcpu_bz2
+ cp ${B}/perf/bz2 ${D}${PTEST_PATH}/perf
+
+ # Make the ptest dir look like the top level valgrind src dir
+ # This is checked by the gdbserver_tests/make_local_links script
+ mkdir ${D}${PTEST_PATH}/coregrind
+ cp ${B}/coregrind/vgdb ${D}${PTEST_PATH}/coregrind
+
+ # Add an executable needed by massif tests
+ cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
+
+ find ${D}${PTEST_PATH} \
+ \( \
+ -name "Makefile*" \
+ -o -name "*.o" \
+ \) \
+ -exec rm {} \;
+
+ # These files need to be newer so touch them.
+ touch ${D}${PTEST_PATH}/cachegrind/tests/a.c -r ${D}${PTEST_PATH}/cachegrind/tests/cgout-test
+
+ # find *_annotate in ${bindir} for yocto build
+ sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann1.vgtest
+ sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann2.vgtest
+
+ sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest
+ sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest
+
+ # handle multilib
+ sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
+ sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest
+}
diff --git a/meta/recipes-devtools/xmlto/files/catalog.xml b/meta/recipes-devtools/xmlto/files/catalog.xml
deleted file mode 100644
index 6b8833d871..0000000000
--- a/meta/recipes-devtools/xmlto/files/catalog.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
-<delegateSystem systemIdStartString="http://docbook.org/xml/" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//OASIS//DTD XML Exchange Table Model 19990315" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//Norman Walsh//DTD CALS Table Model XML" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//Norman Walsh//ELEMENTS DocBk XML" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBook XML" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBk XML" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBk XML" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//Normal Walsh//Exchange Table Model 19960430" catalog="./docbook-xml.xml"/>
-<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/" catalog="./docbook-xml.xml"/>
-<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model" catalog="./docbook-xml.xml"/>
-<delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="./docbook-xsl.xml"/>
-<delegateSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/" catalog="./docbook-xsl.xml"/>
-</catalog>
diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
index 886e7b4b93..df798dfcdd 100644
--- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
@@ -1,40 +1,40 @@
SUMMARY = "A shell-script tool for converting XML files to various formats"
-HOMEPAGE = "https://fedorahosted.org/xmlto/"
+HOMEPAGE = "https://releases.pagure.org/xmlto/"
SECTION = "docs/xmlto"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-SRC_URI = "https://fedorahosted.org/releases/x/m/xmlto/xmlto-${PV}.tar.gz \
+SRC_URI = "https://releases.pagure.org/xmlto/xmlto-${PV}.tar.gz \
file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \
- file://catalog.xml \
"
SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
inherit autotools
-# xmlto needs getopt/xmllint/xsltproc/bash/tail at runtime
+DEPENDS = "libxml2-native"
+
RDEPENDS_${PN} = "docbook-xml-dtd4 \
docbook-xsl-stylesheets \
util-linux \
libxml2 \
+ libxslt \
bash \
"
RDEPENDS_${PN}_append_class-target = " \
+ libxml2-utils \
libxslt-bin \
coreutils \
"
-CACHED_CONFIGUREVARS += "ac_cv_path_TAIL=${bindir}/tail"
+CACHED_CONFIGUREVARS += "ac_cv_path_TAIL=tail"
BBCLASSEXTEND = "native"
EXTRA_OECONF_append = " BASH=/bin/bash GCP=/bin/cp XMLLINT=xmllint XSLTPROC=xsltproc"
-do_install_append() {
- install -d ${D}${sysconfdir}/xml/
- install -m 755 ${WORKDIR}/catalog.xml ${D}${sysconfdir}/xml/catalog.xml
- create_wrapper ${D}/${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
+do_install_append_class-native() {
+ create_wrapper ${D}${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog
}
do_populate_sysroot[rdeptask] = "do_populate_sysroot"
diff --git a/meta/recipes-devtools/yasm/yasm_1.3.0.bb b/meta/recipes-devtools/yasm/yasm_1.3.0.bb
deleted file mode 100644
index 78702ed20b..0000000000
--- a/meta/recipes-devtools/yasm/yasm_1.3.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "x86 (SSE) assembler supporting NASM and GAS-syntaxes"
-LICENSE = "BSD"
-HOMEPAGE = "http://www.tortall.net/projects/yasm/"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a12d8903508fb6bfd49d8d82c6170dd9"
-
-SRC_URI = "http://www.tortall.net/projects/yasm/releases/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "fc9e586751ff789b34b1f21d572d96af"
-SRC_URI[sha256sum] = "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f"
-
-inherit autotools gettext
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb b/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
deleted file mode 100644
index 021c05839c..0000000000
--- a/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-# zisofs-tools-native OE build file
-# Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-SUMMARY = "Utilities for creating compressed CD-ROM filesystems"
-HOMEPAGE = "http://freecode.com/projects/zisofs-tools"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "zlib-native"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/zisofs-tools/zisofs-tools-${PV}.tar.bz2/2d0ed8c9a1f60b45f949b136f9be1f6c/zisofs-tools-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "2d0ed8c9a1f60b45f949b136f9be1f6c"
-SRC_URI[sha256sum] = "ae4e53e4914934d41660248fb59d3c8761f1f1fd180d5ec993c17ddb3afd04f3"
-
-inherit native
-
-do_install() {
- oe_runmake install INSTALLROOT=${D} bindir=${bindir}
-}
diff --git a/meta/recipes-extended/acpica/acpica_20191018.bb b/meta/recipes-extended/acpica/acpica_20191018.bb
new file mode 100644
index 0000000000..04732bbfe3
--- /dev/null
+++ b/meta/recipes-extended/acpica/acpica_20191018.bb
@@ -0,0 +1,49 @@
+SUMMARY = "ACPICA tools for the development and debug of ACPI tables"
+DESCRIPTION = "The ACPI Component Architecture (ACPICA) project provides an \
+OS-independent reference implementation of the Advanced Configuration and \
+Power Interface Specification (ACPI). ACPICA code contains those portions of \
+ACPI meant to be directly integrated into the host OS as a kernel-resident \
+subsystem, and a small set of tools to assist in developing and debugging \
+ACPI tables."
+
+HOMEPAGE = "http://www.acpica.org/"
+SECTION = "console/tools"
+
+LICENSE = "Intel | BSD | GPLv2"
+LIC_FILES_CHKSUM = "file://source/compiler/aslcompile.c;beginline=7;endline=150;md5=b5690d9ef8d54b2b1e1cc98aad64cd87"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+DEPENDS = "m4-native flex-native bison-native"
+
+SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz"
+SRC_URI[md5sum] = "539a0252bcb42c383ceeaeb12ae9a60d"
+SRC_URI[sha256sum] = "029db4014600e4b771b11a84276d2d76eb40fb26eabc85864852ef1f962be95f"
+UPSTREAM_CHECK_URI = "https://acpica.org/downloads"
+
+S = "${WORKDIR}/acpica-unix-${PV}"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "acpixtract acpidump"
+
+EXTRA_OEMAKE = "CC='${CC}' \
+ OPT_CFLAGS=-Wall \
+ DESTDIR=${D} \
+ PREFIX=${prefix} \
+ INSTALLDIR=${bindir} \
+ INSTALLFLAGS= \
+ "
+
+do_install() {
+ oe_runmake install
+}
+
+# iasl*.bb is a subset of this recipe, so RREPLACE it
+PROVIDES = "iasl"
+RPROVIDES_${PN} += "iasl"
+RREPLACES_${PN} += "iasl"
+RCONFLICTS_${PN} += "iasl"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch b/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch
new file mode 100644
index 0000000000..ca170db00f
--- /dev/null
+++ b/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch
@@ -0,0 +1,53 @@
+If SGML_CATALOG_FILES is in the environment, pass --catalogs to xmllint and
+xsltproc. Also pass --nonet to xsltproc to detect future missing stylesheet
+problems.
+
+An earlier version of this patch was filed upstream at
+https://github.com/asciidoc/asciidoc-py3/issues/61 so depending on how that goes
+this could get merged.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/a2x.py b/a2x.py
+index 2d7699a..582d809 100755
+--- a/a2x.py
++++ b/a2x.py
+@@ -57,6 +57,10 @@ LYNX_OPTS = '-dump'
+ W3M_OPTS = '-dump -cols 70 -T text/html -no-graph'
+ XSLTPROC_OPTS = ''
+
++if "SGML_CATALOG_FILES" in os.environ:
++ XMLLINT += " --catalogs"
++ XSLTPROC += " --catalogs"
++
+ ######################################################################
+ # End of configuration file parameters.
+ ######################################################################
+@@ -298,7 +302,7 @@ def exec_xsltproc(xsl_file, xml_file, dst_dir, opts = ''):
+ cwd = os.getcwd()
+ shell_cd(dst_dir)
+ try:
+- shell('"%s" %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file))
++ shell('%s %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file))
+ finally:
+ shell_cd(cwd)
+
+@@ -483,7 +487,7 @@ class A2X(AttrDict):
+ self.asciidoc_opts += ' --doctype %s' % self.doctype
+ for attr in self.attributes:
+ self.asciidoc_opts += ' --attribute "%s"' % attr
+-# self.xsltproc_opts += ' --nonet'
++ self.xsltproc_opts += ' --nonet'
+ if self.verbose:
+ self.asciidoc_opts += ' --verbose'
+ self.dblatex_opts += ' -V'
+@@ -634,7 +638,7 @@ class A2X(AttrDict):
+ shell('"%s" --backend docbook -a "a2x-format=%s" %s --out-file "%s" "%s"' %
+ (self.asciidoc, self.format, self.asciidoc_opts, docbook_file, self.asciidoc_file))
+ if not self.no_xmllint and XMLLINT:
+- shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file))
++ shell('%s --nonet --noout --valid "%s"' % (XMLLINT, docbook_file))
+
+ def to_xhtml(self):
+ self.to_docbook()
diff --git a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
index 1cd1454213..751bf0f19f 100644
--- a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
+++ b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
@@ -8,17 +8,25 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
file://COPYRIGHT;md5=029ad5428ba5efa20176b396222d4069"
-SRC_URI = "http://downloads.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz"
-SRC_URI[md5sum] = "c59018f105be8d022714b826b0be130a"
-SRC_URI[sha256sum] = "78db9d0567c8ab6570a6eff7ffdf84eadd91f2dfc0a92a2d0105d323cab4e1f0"
+SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https \
+ file://auto-catalogs.patch"
+SRCREV = "618f6e6f6b558ed1e5f2588cd60a5a6b4f881ca0"
+PV .= "+py3-git${SRCPV}"
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/asciidoc/files/"
+DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-inherit distutils autotools-brokensep
+S = "${WORKDIR}/git"
-export DESTDIR = "${D}"
-DEPENDS_class-native = "docbook-xml-dtd4-native"
-RDEPENDS_${PN} += "python"
-BBCLASSEXTEND = "native"
+# Tell xmllint where to find the DocBook XML catalogue, because right now it
+# opens /etc/xml/catalog on the host. Depends on auto-catalogs.patch
+export SGML_CATALOG_FILES="file://${STAGING_ETCDIR_NATIVE}/xml/catalog"
+# Not using automake
+inherit autotools-brokensep
CLEANBROKEN = "1"
+
+# target and nativesdk needs python3, but for native we can use the host.
+RDEPENDS_${PN} += "python3"
+RDEPENDS_remove_class-native = "python3"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch b/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
index 53ae28b5ed..7fdecc7fd1 100644
--- a/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
+++ b/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
@@ -1,6 +1,6 @@
-From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 16:35:30 -0700
+From f446686916e503dfb9fb928252d1b72a07573b29 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Tue, 18 Jul 2017 03:42:56 -0400
Subject: [PATCH] remove glibc assumption
glibc time.h header has an undocumented __isleap macro
@@ -9,9 +9,11 @@ Since it is undocumented & does not appear
on any other libc, stop using it and just define the macro in
locally instead.
-Upstream-Status: Pending
+Upstream-Status: Submitted [ https://lists.debian.org/debian-accessibility/2017/07/msg00044.html ]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
parsetime.y | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
@@ -53,5 +55,5 @@ index 7005e88..324e6d3 100644
{
yyerror("Error in day of month");
--
-2.1.4
+2.8.1
diff --git a/meta/recipes-extended/at/at/fix_parallel_build_error.patch b/meta/recipes-extended/at/at/fix_parallel_build_error.patch
index 100f8898e0..30d2324126 100644
--- a/meta/recipes-extended/at/at/fix_parallel_build_error.patch
+++ b/meta/recipes-extended/at/at/fix_parallel_build_error.patch
@@ -1,3 +1,8 @@
+From 24ef2a6544f9c7ec01bc7ae73dffa2974a1e251d Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 5 Dec 2018 09:46:22 +0800
+Subject: [PATCH] fix parallel build error
+
make -j was failing sometimesa like this
| ccache i586-poky-linux-gcc -march=i586 --sysroot=/home/nitin/build/build0/tmp/sysroots/i586-poky-linux -I. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -o atd atd.o daemon.o -lfl -lpam -Wl,-O1 -Wl,--as-needed
| parsetime.l:5:19: fatal error: y.tab.h: No such file or directory
@@ -12,24 +17,24 @@ Nitin <nitin.a.kamble@intel.com>
Upstream-Status: Pending
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
Makefile.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile.in b/Makefile.in
-index dd3c2f8..7897e45 100644
+index 4c11913..18ecc23 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -82,6 +82,8 @@ y.tab.c y.tab.h: parsetime.y
+@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y
lex.yy.c: parsetime.l
$(LEX) -i parsetime.l
+parsetime.l: y.tab.h
+
atd.service: atd.service.in
- sed -e 's![@]sbindir[@]!$(sbindir)!g' < $< > $@
+ cat $< | sed -e 's![@]sbindir[@]!$(sbindir)!g' | sed -e 's![@]atjobdir[@]!$(atjobdir)!g' > $@
--
-1.9.1
+2.7.4
diff --git a/meta/recipes-extended/at/at/makefile-fix-parallel.patch b/meta/recipes-extended/at/at/makefile-fix-parallel.patch
index 932a4c0bfe..d6056dceff 100644
--- a/meta/recipes-extended/at/at/makefile-fix-parallel.patch
+++ b/meta/recipes-extended/at/at/makefile-fix-parallel.patch
@@ -15,13 +15,13 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
-diff --git a/Makefile.in b/Makefile.in
-index 2a9b918..aa7c04a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -75,7 +75,9 @@ at: $(ATOBJECTS)
+Index: at-3.1.20/Makefile.in
+===================================================================
+--- at-3.1.20.orig/Makefile.in
++++ at-3.1.20/Makefile.in
+@@ -76,7 +76,9 @@ at: $(ATOBJECTS)
atd: $(RUNOBJECTS)
- $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB)
+ $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB)
-y.tab.c y.tab.h: parsetime.y
+y.tab.h: y.tab.c
@@ -30,6 +30,3 @@ index 2a9b918..aa7c04a 100644
$(YACC) -d parsetime.y
lex.yy.c: parsetime.l
---
-1.7.9.5
-
diff --git a/meta/recipes-extended/at/at/pam.conf.patch b/meta/recipes-extended/at/at/pam.conf.patch
index b5ceb9ae82..38e7fc1b7d 100644
--- a/meta/recipes-extended/at/at/pam.conf.patch
+++ b/meta/recipes-extended/at/at/pam.conf.patch
@@ -1,27 +1,35 @@
+From 8c8a0b6ba199327d2eafefd6611353e1c483a854 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 5 Dec 2018 10:00:36 +0800
+Subject: [PATCH] fix pam.conf
+
oe doesn't support "@include", use the concrete directive instead.
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-Index: at-3.1.15/pam.conf
-===================================================================
---- at-3.1.15.orig/pam.conf
-+++ at-3.1.15/pam.conf
-@@ -1,10 +1,11 @@
- #
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ pam.conf | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pam.conf b/pam.conf
+index 3674c0a..2f8d586 100644
+--- a/pam.conf
++++ b/pam.conf
+@@ -2,9 +2,9 @@
# The PAM configuration file for the at daemon
#
-+
-+auth required pam_env.so
-+auth include common-auth
-+account include common-account
-+session include common-session-noninteractive
-+session required pam_limits.so
-+session required pam_loginuid.so
--auth required pam_env.so
-@include common-auth
-@include common-account
--session required pam_loginuid.so
++auth include common-auth
++account include common-account
+ session required pam_loginuid.so
-@include common-session-noninteractive
--session required pam_limits.so
++session include common-session-noninteractive
+ session required pam_limits.so
+ auth required pam_env.so user_readenv=1
+--
+2.7.4
+
diff --git a/meta/recipes-extended/at/at_3.1.20.bb b/meta/recipes-extended/at/at_3.1.20.bb
deleted file mode 100644
index 85459b6403..0000000000
--- a/meta/recipes-extended/at/at_3.1.20.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "Delayed job execution and batch processing"
-DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \
-the system load levels drop to a particular level."
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
-DEPENDS = "flex flex-native \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
-"
-
-PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
-
-RCONFLICTS_${PN} = "atd"
-RREPLACES_${PN} = "atd"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \
- file://fix_parallel_build_error.patch \
- file://posixtm.c \
- file://posixtm.h \
- file://file_replacement_with_gplv2.patch \
- file://atd.init \
- file://atd.service \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://makefile-fix-parallel.patch \
- file://0001-remove-glibc-assumption.patch \
- "
-
-PAM_SRC_URI = "file://pam.conf.patch \
- file://configure-add-enable-pam.patch"
-
-SRC_URI[md5sum] = "e7bd7b785b2cbb17e133d6bdc0fb099e"
-SRC_URI[sha256sum] = "0871923cab73050b98ace020664eb2ddc1e669e4166b5abb64d864d02fcefab9"
-
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/at/"
-
-EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
- --with-daemon_username=root \
- --with-daemon_groupname=root \
- --with-jobdir=/var/spool/at/jobs \
- --with-atspool=/var/spool/at/spool \
- ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
-
-inherit autotools-brokensep systemd update-rc.d
-
-INITSCRIPT_NAME = "atd"
-INITSCRIPT_PARAMS = "defaults"
-
-SYSTEMD_SERVICE_${PN} = "atd.service"
-
-copy_sources() {
- cp -f ${WORKDIR}/posixtm.[ch] ${S}
-}
-do_patch[postfuncs] += "copy_sources"
-
-do_install () {
- oe_runmake -e "IROOT=${D}" install
-
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
-
- # install systemd unit files
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
-
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
- fi
-}
diff --git a/meta/recipes-extended/at/at_3.1.23.bb b/meta/recipes-extended/at/at_3.1.23.bb
new file mode 100644
index 0000000000..b74882d342
--- /dev/null
+++ b/meta/recipes-extended/at/at_3.1.23.bb
@@ -0,0 +1,78 @@
+SUMMARY = "Delayed job execution and batch processing"
+HOMEPAGE = "http://blog.calhariz.com/"
+DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \
+the system load levels drop to a particular level."
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
+DEPENDS = "flex flex-native bison-native \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+PACKAGECONFIG ?= "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+"
+
+PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux,"
+
+RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
+"
+
+PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
+
+RCONFLICTS_${PN} = "atd"
+RREPLACES_${PN} = "atd"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20180825T090248Z/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \
+ file://fix_parallel_build_error.patch \
+ file://posixtm.c \
+ file://posixtm.h \
+ file://file_replacement_with_gplv2.patch \
+ file://atd.init \
+ file://atd.service \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://makefile-fix-parallel.patch \
+ file://0001-remove-glibc-assumption.patch \
+ "
+
+PAM_SRC_URI = "file://pam.conf.patch \
+ file://configure-add-enable-pam.patch"
+
+SRC_URI[md5sum] = "1cec945506b5ddf1d776c92c315fc581"
+SRC_URI[sha256sum] = "97450aa954aaa8a70218cc8e61a33df9fee9f86527e9f861de302fb7a3c81710"
+
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/at/"
+
+EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
+ --with-daemon_username=root \
+ --with-daemon_groupname=root \
+ --with-jobdir=/var/spool/at/jobs \
+ --with-atspool=/var/spool/at/spool \
+ ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
+
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "atd"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "atd.service"
+
+copy_sources() {
+ cp -f ${WORKDIR}/posixtm.[ch] ${S}
+}
+do_patch[postfuncs] += "copy_sources"
+
+do_install () {
+ oe_runmake -e "IROOT=${D}" install
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
+
+ # install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
+
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
+ fi
+}
diff --git a/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
deleted file mode 100644
index e63457cf2b..0000000000
--- a/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Add 'ptest' target to Makefile, to run tests without checking dependencies.
-
-Signed-off-by: Anders Roxell <anders.roxell@enea.com>
-Upstream-Status: Pending
----
-diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in
---- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500
-+++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500
-@@ -803,17 +803,31 @@
- fi
-
- recho$(EXEEXT): $(SUPPORT_SRC)recho.c
-- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
-+ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
-
- zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c
-- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
-+ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
-
- printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c
-- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
-+ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
-
--test tests check: force $(Program) $(TESTS_SUPPORT)
-+test tests check:
-+ @$(MAKE) install-test
-+ @$(MAKE) runtest
-+
-+install-test: buildtest
-+ifeq ($(origin INSTALL_TEST_DIR), undefined)
- @-test -d tests || mkdir tests
- @cp $(TESTS_SUPPORT) tests
-+else
-+ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
-+ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
-+ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
-+endif
-+
-+buildtest: force $(Program) $(TESTS_SUPPORT)
-+
-+runtest:
- @( cd $(srcdir)/tests && \
- PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
-
diff --git a/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch b/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch
deleted file mode 100644
index ee756dc9e3..0000000000
--- a/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 933bd886af49667e88e2385409449ab598813dab Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Wed, 15 Jul 2015 00:54:33 -0700
-Subject: [PATCH] dont include target CFLAGS in host LDFLAGS
-
-Building the host tool 'mkbuiltins' will fail if the target CFLAGS
-contains an option which isn't supported by the host's gcc. To prevent
-the issue, define LDFLAGS_FOR_BUILD based on CFLAGS_FOR_BUILD instead
-of CFLAGS.
-
-Upstream-Status: Inappropriate [required for bash 3.2.57 (GPLv2) recipe only]
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- builtins/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/builtins/Makefile.in b/builtins/Makefile.in
-index e027f7a..ebfddf3 100644
---- a/builtins/Makefile.in
-+++ b/builtins/Makefile.in
-@@ -63,7 +63,7 @@ LOCAL_DEFS = @LOCAL_DEFS@
-
- LIBS = @LIBS@
- LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
--LDFLAGS_FOR_BUILD = $(LDFLAGS)
-+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
- LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
- #LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
- LIBS_FOR_BUILD = $(LIBS)
---
-1.9.1
-
diff --git a/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch
deleted file mode 100644
index c4229a7ed9..0000000000
--- a/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by
-the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers
-use the STRING() macro from unistd.h. A header in the bash sources overrides
-the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the
-wrappers to generate calls to 'xread' and 'xopen', which do not exist,
-resulting in a failure to link.
-
-Assume we have stringize support when cross-compiling, which works around the
-issue.
-
-It may be best for upstream to either give up on supporting compilers without
-stringize support, or to not define STRING() at all when FORTIFY_SOURCES is
-defined, letting the unistd.h one be used, instead.
-
-Upstream-Status: Pending
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
---- bash-4.2.orig/builtins/mkbuiltins.c
-+++ bash-4.2/builtins/mkbuiltins.c
-@@ -28,6 +28,7 @@
- # define HAVE_STDLIB_H
-
- # define HAVE_RENAME
-+# define HAVE_STRINGIZE
- #endif /* CROSS_COMPILING */
-
- #if defined (HAVE_UNISTD_H)
diff --git a/meta/recipes-extended/bash/bash-3.2.48/run-ptest b/meta/recipes-extended/bash/bash-3.2.48/run-ptest
deleted file mode 100644
index 8dd3b9981d..0000000000
--- a/meta/recipes-extended/bash/bash-3.2.48/run-ptest
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
diff --git a/meta/recipes-extended/bash/bash-3.2.48/string-format.patch b/meta/recipes-extended/bash/bash-3.2.48/string-format.patch
deleted file mode 100644
index eda39649d9..0000000000
--- a/meta/recipes-extended/bash/bash-3.2.48/string-format.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix a string format warning when using security flags:
-
-| ../bash-3.2.48/print_cmd.c:1152:3: error: format not a string literal and no format arguments [-Werror=format-security]
-| cprintf (indentation_string);
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/print_cmd.c b/print_cmd.c
-index d1dfd1a..956db53 100644
---- a/print_cmd.c
-+++ b/print_cmd.c
-@@ -1149,7 +1149,7 @@ indent (amount)
- for (i = 0; amount > 0; amount--)
- indentation_string[i++] = ' ';
- indentation_string[i] = '\0';
-- cprintf (indentation_string);
-+ cprintf ("%s", indentation_string);
- }
-
- static void
diff --git a/meta/recipes-extended/bash/bash-3.2.48/test-output.patch b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch
deleted file mode 100644
index 2b09b7d977..0000000000
--- a/meta/recipes-extended/bash/bash-3.2.48/test-output.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Add FAIL/PASS output to test output.
-
-Signed-off-by: Björn Stenberg <bjst@enea.com>
-Upstream-Status: Pending
----
-diff -uNr a/tests/run-all b/tests/run-all
---- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200
-+++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200
-@@ -22,7 +22,15 @@
- case $x in
- $0|run-minimal|run-gprof) ;;
- *.orig|*~) ;;
-- *) echo $x ; sh $x ;;
-+ *) echo $x
-+ output=`sh $x`
-+ if [ -n "$output" ]; then
-+ echo "$output"
-+ echo "FAIL: $x"
-+ else
-+ echo "PASS: $x"
-+ fi
-+ ;;
- esac
- done
-
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 1d08526c9e..1ebb33bdcd 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -6,30 +6,42 @@ DEPENDS = "ncurses bison-native virtual/libiconv"
inherit autotools gettext texinfo update-alternatives ptest
-EXTRA_AUTORECONF += "--exclude=autoheader"
-EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
+EXTRA_AUTORECONF += "--exclude=autoheader --exclude=aclocal"
+EXTRA_OECONF = "--enable-job-control --without-bash-malloc bash_cv_wexitstatus_offset=8"
# If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
# startup files, even if they are not interactive.
# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
-ALTERNATIVE_${PN} = "sh"
+ALTERNATIVE_${PN} = "bash sh"
+ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
+ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
-ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
+ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}"
ALTERNATIVE_PRIORITY = "100"
RDEPENDS_${PN} += "base-files"
RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make coreutils perl sed shadow util-linux-setpriv"
-USERADD_PACKAGES = "${PN}-ptest"
-USERADD_PARAM_${PN}-ptest = "--create-home --user-group test"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " \
+ glibc-gconv-big5hkscs \
+ glibc-gconv-iso8859-1 \
+ glibc-utils \
+ locale-base-de-de \
+ locale-base-en-us \
+ locale-base-fr-fr \
+ locale-base-fr-fr.iso-8859-1 \
+ locale-base-zh-hk.big5-hkscs \
+ "
-do_configure_prepend () {
- if [ ! -e ${S}/acinclude.m4 ]; then
- cat ${S}/aclocal.m4 > ${S}/acinclude.m4
- fi
+CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
+
+do_compile_prepend() {
+ # Remove any leftover .build files. This ensures that bash always has the
+ # same version number and keeps builds reproducible
+ rm -f ${B}/.build
}
do_compile_ptest () {
@@ -44,17 +56,39 @@ do_install_append () {
fi
}
do_install_append_class-target () {
- # Clean host path in bashbug
+ # Clean buildhost references in bashbug
sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
- -e "s,-I${WORKDIR}/\S* ,,g" ${D}${bindir}/bashbug
+ -e "s,-I${WORKDIR}/\S* ,,g" \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ ${D}${bindir}/bashbug
+
+ # Clean buildhost references in bash.pc
+ sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+ ${D}${libdir}/pkgconfig/bash.pc
+
+ # Clean buildhost references in Makefile.inc
+ sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${D}${libdir}/bash/Makefile.inc
}
do_install_ptest () {
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
cp ${B}/Makefile ${D}${PTEST_PATH}
+ install -D ${WORKDIR}/run-bash-ptests ${D}${PTEST_PATH}/run-bash-ptests
sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
- -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" ${D}${PTEST_PATH}/Makefile
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${UNINATIVE_LOADER}:${base_bindir}/false:g' \
+ ${D}${PTEST_PATH}/Makefile
}
+# The uninative loader is different on i386 & x86_64 hosts. Since it is only
+# being replaced with /bin/false anyway, it doesn't need to be part of the task
+# hash
+do_install_ptest[vardepsexclude] += "UNINATIVE_LOADER"
pkg_postinst_${PN} () {
grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
@@ -63,3 +97,13 @@ pkg_postinst_${PN} () {
pkg_postrm_${PN} () {
printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
}
+
+PACKAGES += "${PN}-bashbug"
+FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash"
+FILES_${PN}-bashbug = "${bindir}/bashbug"
+
+PACKAGE_BEFORE_PN += "${PN}-loadable"
+RDEPENDS_${PN}-loadable += "${PN}"
+FILES_${PN}-loadable += "${libdir}/bash/*"
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}"
diff --git a/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch b/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
deleted file mode 100644
index 5405c84c78..0000000000
--- a/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From e5837a42f8f48a6a721805ff8f7fcd32861d09ca Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Tue, 26 Jul 2016 13:09:47 +0100
-Subject: [PATCH] help: fix printf() format security warning
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def: In function 'help_builtin':
-| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def:130:7: error: format not a string literal and no format arguments [-Werror=format-security]
-| printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
-| ^~~~~~
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
-Upstream-Status: Pending
- builtins/help.def | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/builtins/help.def b/builtins/help.def
-index 1894f17..cf624c6 100644
---- a/builtins/help.def
-+++ b/builtins/help.def
-@@ -127,7 +127,7 @@ help_builtin (list)
-
- if (glob_pattern_p (list->word->word))
- {
-- printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
-+ printf ("%s", ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
- print_word_list (list, ", ");
- printf ("'\n\n");
- }
---
-2.8.1
-
diff --git a/meta/recipes-extended/bash/bash/build-tests.patch b/meta/recipes-extended/bash/bash/build-tests.patch
index 73a81b60da..5f2dae94a1 100644
--- a/meta/recipes-extended/bash/bash/build-tests.patch
+++ b/meta/recipes-extended/bash/bash/build-tests.patch
@@ -2,15 +2,18 @@ Add 'ptest' target to Makefile, to run tests without checking dependencies.
Upstream-Status: Pending
Signed-off-by: Anders Roxell <anders.roxell@enea.com>
+
+Rebase to 5.0
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
Makefile.in | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/Makefile.in b/Makefile.in
+index 5fcb44b..de1c255 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -848,20 +848,34 @@ maybe-clean:
+@@ -932,20 +932,34 @@ maybe-clean:
fi
recho$(EXEEXT): $(SUPPORT_SRC)recho.c
@@ -51,5 +54,5 @@ diff --git a/Makefile.in b/Makefile.in
PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
--
-1.8.1.2
+2.7.4
diff --git a/meta/recipes-extended/bash/bash/execute_cmd.patch b/meta/recipes-extended/bash/bash/execute_cmd.patch
index 81f8f0a9cd..7a9e9a902f 100644
--- a/meta/recipes-extended/bash/bash/execute_cmd.patch
+++ b/meta/recipes-extended/bash/bash/execute_cmd.patch
@@ -1,8 +1,16 @@
Upstream-Status: Inappropriate [embedded specific]
---- execute_cmd.c.orig Fri Jun 3 13:34:42 2011
-+++ execute_cmd.c Fri Jun 3 13:36:41 2011
-@@ -2202,7 +2202,11 @@
+Rebase to 5.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ execute_cmd.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/execute_cmd.c b/execute_cmd.c
+index f1d74bf..31674b4 100644
+--- a/execute_cmd.c
++++ b/execute_cmd.c
+@@ -2567,7 +2567,11 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close)
/* If the `lastpipe' option is set with shopt, and job control is not
enabled, execute the last element of non-async pipelines in the
current shell environment. */
@@ -13,5 +21,8 @@ Upstream-Status: Inappropriate [embedded specific]
+#endif
+ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
{
- lstdin = move_to_high_fd (0, 0, 255);
+ lstdin = move_to_high_fd (0, 1, -1);
if (lstdin > 0)
+--
+2.7.4
+
diff --git a/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch b/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
deleted file mode 100644
index 7f099ae0c6..0000000000
--- a/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From 2c30dff8ea8b17ad5ba9881e35ad1eba9c515f13 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 26 Nov 2015 22:09:07 -0500
-Subject: [PATCH] fix run-coproc/run-heredoc/run-execscript/run-test/ failed
-
-FAIL: run-coproc
-update test case:tests/coproc.right, tests/coproc.tests
-git://git.sv.gnu.org/bash.git bash-4.4-testing
-
-FAIL: run-heredoc
-update test case: tests/heredoc.right tests/heredoc3.sub
-git://git.sv.gnu.org/bash.git bash-4.4-testing
-
-FAIL: run-execscript:
-the test suite should not be run as root
-
-FAIL: run-test
-the test suite should not be run as root
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- tests/coproc.right | 5 +----
- tests/coproc.tests | 30 +++++++++++++++++++++++++-----
- tests/heredoc.right | 5 ++---
- tests/heredoc3.sub | 3 ++-
- tests/run-execscript | 3 ++-
- tests/run-test | 3 ++-
- 6 files changed, 34 insertions(+), 15 deletions(-)
-
-diff --git a/tests/coproc.right b/tests/coproc.right
-index 6d9deaa..94b001c 100644
---- a/tests/coproc.right
-+++ b/tests/coproc.right
-@@ -1,11 +1,8 @@
--84575
- 63 60
- a b c
--84577
- 63 60
- flop
--./coproc.tests: line 22: 84577 Terminated coproc REFLECT { cat -; }
--84579
-+coproc.tests: REFLECT: status 143
- 63 60
- FOO
- 63 60
-diff --git a/tests/coproc.tests b/tests/coproc.tests
-index 8be3563..d347eb7 100644
---- a/tests/coproc.tests
-+++ b/tests/coproc.tests
-@@ -1,6 +1,13 @@
-+: ${TMPDIR:=/tmp}
-+TMPOUT=${TMPDIR}/coproc-wait-$BASHPID
-+
- coproc { echo a b c; sleep 2; }
-
--echo $COPROC_PID
-+case $COPROC_PID in
-+[0-9]*) ;;
-+*) echo COPROC_PID not integer ;;
-+esac
-+
- echo ${COPROC[@]}
-
- read LINE <&${COPROC[0]}
-@@ -10,7 +17,11 @@ wait $COPROC_PID
-
- coproc REFLECT { cat - ; }
-
--echo $REFLECT_PID
-+case $REFLECT_PID in
-+[0-9]*) ;;
-+*) echo REFLECT_PID not integer ;;
-+esac
-+
- echo ${REFLECT[@]}
-
- echo flop >&${REFLECT[1]}
-@@ -18,12 +29,21 @@ read LINE <&${REFLECT[0]}
-
- echo $LINE
-
--kill $REFLECT_PID
--wait $REFLECT_PID
-+{ sleep 1; kill $REFLECT_PID; } &
-+wait $REFLECT_PID >$TMPOUT 2>&1 || echo "coproc.tests: REFLECT: status $?"
-+grep 'Terminated.*coproc.*REFLECT' < $TMPOUT >/dev/null 2>&1 || {
-+ echo "coproc.tests: wait for REFLECT failed" >&2
-+}
-+rm -f $TMPOUT
-+exec 2>&1
-
- coproc xcase -n -u
-
--echo $COPROC_PID
-+case $COPROC_PID in
-+[0-9]*) ;;
-+*) echo COPROC_PID not integer ;;
-+esac
-+
- echo ${COPROC[@]}
-
- echo foo >&${COPROC[1]}
-diff --git a/tests/heredoc.right b/tests/heredoc.right
-index 6abaa1f..8df91c5 100644
---- a/tests/heredoc.right
-+++ b/tests/heredoc.right
-@@ -76,15 +76,14 @@ ENDEND
- end ENDEND
- hello
- end hello
--x star x
- end x*x
- helloEND
- end helloEND
- hello
- \END
- end hello<NL>\END
--./heredoc3.sub: line 74: warning: here-document at line 72 delimited by end-of-file (wanted `EOF')
--./heredoc3.sub: line 75: syntax error: unexpected end of file
-+./heredoc3.sub: line 75: warning: here-document at line 73 delimited by end-of-file (wanted `EOF')
-+./heredoc3.sub: line 76: syntax error: unexpected end of file
- comsub here-string
- ./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF')
- hi
-diff --git a/tests/heredoc3.sub b/tests/heredoc3.sub
-index 73a111e..9d3d846 100644
---- a/tests/heredoc3.sub
-+++ b/tests/heredoc3.sub
-@@ -49,9 +49,10 @@ hello
- END
- echo end hello
-
--cat <<x*x & touch 'x*x'
-+cat <<x*x >/dev/null & touch 'x*x'
- x star x
- x*x
-+wait $!
- echo end 'x*x'
- rm 'x*x'
-
-diff --git a/tests/run-execscript b/tests/run-execscript
-index f97ab21..0d00a1b 100644
---- a/tests/run-execscript
-+++ b/tests/run-execscript
-@@ -5,5 +5,6 @@ echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory"
- echo "warning: produce diff output, please do not consider this a test failure" >&2
- echo "warning: if diff output differing only in the location of the bash" >&2
- echo "warning: binary appears, please do not consider this a test failure" >&2
--${THIS_SH} ./execscript > /tmp/xx 2>&1
-+rm -f /tmp/xx
-+su -c "${THIS_SH} ./execscript > /tmp/xx 2>&1" test
- diff /tmp/xx exec.right && rm -f /tmp/xx
-diff --git a/tests/run-test b/tests/run-test
-index b2482c3..2e8f049 100644
---- a/tests/run-test
-+++ b/tests/run-test
-@@ -1,4 +1,5 @@
- unset GROUPS UID 2>/dev/null
-
--${THIS_SH} ./test.tests >/tmp/xx 2>&1
-+rm -f /tmp/xx
-+su -c "${THIS_SH} ./test.tests >/tmp/xx 2>&1" test
- diff /tmp/xx test.right && rm -f /tmp/xx
---
-1.9.1
-
diff --git a/meta/recipes-extended/bash/bash/fix-run-intl.patch b/meta/recipes-extended/bash/bash/fix-run-intl.patch
deleted file mode 100644
index d4a3409ec6..0000000000
--- a/meta/recipes-extended/bash/bash/fix-run-intl.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From a00d3161fd7b6a698bdd2ed5f0ac5faac580ee2a Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 3 Aug 2016 23:13:00 -0400
-Subject: [PATCH] fix run-intl failed
-
-1. Filter extra white space of intl.right
-
- Due to the extra white space of intl.right, when the result of
- sub-test unicode2.sub of intl.tests compared to it, the test
- failed.
-
- So we need to filter the extra white space of intl.right.
-
- Import this patch for intl.right from bash devel branch:
-
- http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel
-
- commit is:
-
- 85ec0778f9d778e1820fb8c0e3e996f2d1103b45
-
-2. Change intl.right correspond to the unicode3.sub's output
-
- In sub-test unicode3.sub of intl.tests, the payload value is:
-
- payload=$'\065\247\100\063\231\053\306\123\070\237\242\352\263'
-
- It used quoted string expansion(escaped octal) to assign ASCII
- characters to variables. So when the test run the following:
-
- printf %q "$payload"
-
- It produced:
-
- $'5\247@3\231+\306S8\237\242\352\263'
-
- When compared to the intl.right(contain the converted character), it failed.
-
- Import parts of patch for intl.right from bash devel branch:
-
- http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel
-
- commit is:
-
- 74b8cbb41398b4453d8ba04d0cdd1b25f9dcb9e3
-
-Upstream-Status: Backport
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- tests/intl.right | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/tests/intl.right b/tests/intl.right
-index acf108a..1efdfbe 100644
---- a/tests/intl.right
-+++ b/tests/intl.right
-@@ -18,34 +18,34 @@ aéb
- 1.0000
- 1,0000
- Passed all 1378 Unicode tests
--0000000 303 277 012
-+0000000 303 277 012
- 0000003
--0000000 303 277 012
-+0000000 303 277 012
- 0000003
--0000000 303 277 012
-+0000000 303 277 012
- 0000003
--0000000 303 277 012
-+0000000 303 277 012
- 0000003
--0000000 357 277 277 012
-+0000000 357 277 277 012
- 0000004
--0000000 357 277 277 012
-+0000000 357 277 277 012
- 0000004
--0000000 012
-+0000000 012
- 0000001
--0000000 012
-+0000000 012
- 0000001
--0000000 012
-+0000000 012
- 0000001
--0000000 012
-+0000000 012
- 0000001
--0000000 303 277 012
-+0000000 303 277 012
- 0000003
--0000000 303 277 012
-+0000000 303 277 012
- 0000003
--0000000 303 277 012
-+0000000 303 277 012
- 0000003
--0000000 101 040 302 243 040 305 222 012
-+0000000 101 040 302 243 040 305 222 012
- 0000010
- ./unicode3.sub: line 2: 5§@3™+ÆS8Ÿ¢ê³: command not found
--5§@3™+ÆS8Ÿ¢ê³
-+$'5\247@3\231+\306S8\237\242\352\263'
- + : $'5\247@3\231+\306S8\237\242\352\263'
---
-2.8.1
-
diff --git a/meta/recipes-extended/bash/bash/run-bash-ptests b/meta/recipes-extended/bash/bash/run-bash-ptests
new file mode 100644
index 0000000000..d73a27224d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/run-bash-ptests
@@ -0,0 +1,4 @@
+#!/bin/sh
+cd "$(dirname "$0")"
+make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest
+
diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest
index c61fabd020..738ad3c42c 100644
--- a/meta/recipes-extended/bash/bash/run-ptest
+++ b/meta/recipes-extended/bash/bash/run-ptest
@@ -19,4 +19,8 @@ then
echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it."
fi
-make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest
+useradd bashtest
+chown -R bashtest:bashtest tests
+setpriv --reuid bashtest --rgid bashtest --clear-groups --reset-env $(dirname "$0")/run-bash-ptests
+chown -R root:root tests
+userdel -r bashtest
diff --git a/meta/recipes-extended/bash/bash/test-output.patch b/meta/recipes-extended/bash/bash/test-output.patch
index 2b09b7d977..0ffcc24587 100644
--- a/meta/recipes-extended/bash/bash/test-output.patch
+++ b/meta/recipes-extended/bash/bash/test-output.patch
@@ -1,25 +1,42 @@
-Add FAIL/PASS output to test output.
+From 28eb06047ebd2deaa8c7cd2bf6655ef6a469dc14 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 10:01:56 +0800
+Subject: [PATCH 1/2] Add FAIL/PASS output to test output.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
Signed-off-by: Björn Stenberg <bjst@enea.com>
Upstream-Status: Pending
+
+Rebase to 4.4
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
-diff -uNr a/tests/run-all b/tests/run-all
---- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200
-+++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200
-@@ -22,7 +22,15 @@
+ tests/run-all | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/tests/run-all b/tests/run-all
+index 2882fe0..e21d026 100644
+--- a/tests/run-all
++++ b/tests/run-all
+@@ -33,7 +33,16 @@ do
case $x in
$0|run-minimal|run-gprof) ;;
*.orig|*~) ;;
-- *) echo $x ; sh $x ;;
-+ *) echo $x
-+ output=`sh $x`
-+ if [ -n "$output" ]; then
-+ echo "$output"
-+ echo "FAIL: $x"
-+ else
-+ echo "PASS: $x"
-+ fi
-+ ;;
+- *) echo $x ; sh $x ; rm -f ${BASH_TSTOUT} ;;
++ *) echo $x
++ output=`sh $x`
++ if [ -n "$output" ]; then
++ echo "$output"
++ echo "FAIL: $x"
++ else
++ echo "PASS: $x"
++ fi
++ rm -f ${BASH_TSTOUT}
++ ;;
esac
done
+--
+1.8.3.1
+
diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb
deleted file mode 100644
index 6b4028df11..0000000000
--- a/meta/recipes-extended/bash/bash_3.2.48.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-require bash.inc
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a"
-
-PR = "r11"
-
-SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch049 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch050 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch051 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-052;apply=yes;striplevel=0;name=patch052 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-053;apply=yes;striplevel=0;name=patch053 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-054;apply=yes;striplevel=0;name=patch054 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-055;apply=yes;striplevel=0;name=patch055 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-056;apply=yes;striplevel=0;name=patch056 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-057;apply=yes;striplevel=0;name=patch057 \
- file://mkbuiltins_have_stringize.patch \
- file://build-tests.patch \
- file://test-output.patch \
- file://run-ptest \
- file://dont-include-target-CFLAGS-in-host-LDFLAGS.patch \
- file://string-format.patch \
- "
-
-SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
-SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
-SRC_URI[patch049.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
-SRC_URI[patch049.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
-SRC_URI[patch050.md5sum] = "8443d4385d73ec835abe401d90591377"
-SRC_URI[patch050.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
-SRC_URI[patch051.md5sum] = "15c6653042e9814aa87120098fc7a849"
-SRC_URI[patch051.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
-SRC_URI[patch052.md5sum] = "691023a944bbb9003cc92ad462d91fa1"
-SRC_URI[patch052.sha256sum] = "a0eccf9ceda50871db10d21efdd74b99e35efbd55c970c400eeade012816bb61"
-SRC_URI[patch053.md5sum] = "eb97d1c9230a55283d9dac69d3de2e46"
-SRC_URI[patch053.sha256sum] = "fe6f0e96e0b966eaed9fb5e930ca12891f4380f30f9e0a773d200ff2063a864e"
-SRC_URI[patch054.md5sum] = "1107744058c43b247f597584b88ba0a6"
-SRC_URI[patch054.sha256sum] = "c6dab911e85688c542ce75afc175dbb4e5011de5102758e19a4a80dac1e79359"
-SRC_URI[patch055.md5sum] = "05d201176d3499e2dfa4a73d09d42f05"
-SRC_URI[patch055.sha256sum] = "c0e816700837942ed548da74e5917f74b70cbbbb10c9f2caf73e8e06a0713d0a"
-SRC_URI[patch056.md5sum] = "222eaa3a2c26f54a15aa5e08817a534a"
-SRC_URI[patch056.sha256sum] = "063a8d8d74e4407bf07a32b965b8ef6d213a66abdb6af26cc3584a437a56bbb4"
-SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913"
-SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0"
-
-PARALLEL_MAKE = ""
diff --git a/meta/recipes-extended/bash/bash_4.3.30.bb b/meta/recipes-extended/bash/bash_4.3.30.bb
deleted file mode 100644
index 765562fbdd..0000000000
--- a/meta/recipes-extended/bash/bash_4.3.30.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-require bash.inc
-
-# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-031;apply=yes;striplevel=0;name=patch031 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-032;apply=yes;striplevel=0;name=patch032 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-033;apply=yes;striplevel=0;name=patch033 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-034;apply=yes;striplevel=0;name=patch034 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-035;apply=yes;striplevel=0;name=patch035 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-036;apply=yes;striplevel=0;name=patch036 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-037;apply=yes;striplevel=0;name=patch037 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-038;apply=yes;striplevel=0;name=patch038 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-039;apply=yes;striplevel=0;name=patch039 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-040;apply=yes;striplevel=0;name=patch040 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-041;apply=yes;striplevel=0;name=patch041 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-042;apply=yes;striplevel=0;name=patch042 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-043;apply=yes;striplevel=0;name=patch043 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-044;apply=yes;striplevel=0;name=patch044 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-045;apply=yes;striplevel=0;name=patch045 \
- ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-046;apply=yes;striplevel=0;name=patch046 \
- file://execute_cmd.patch;striplevel=0 \
- file://mkbuiltins_have_stringize.patch \
- file://build-tests.patch \
- file://test-output.patch \
- file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
- file://run-ptest \
- file://fix-run-builtins.patch \
- file://0001-help-fix-printf-format-security-warning.patch \
- file://fix-run-intl.patch \
- "
-
-SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447"
-SRC_URI[tarball.sha256sum] = "317881019bbf2262fb814b7dd8e40632d13c3608d2f237800a8828fbb8a640dd"
-
-SRC_URI[patch031.md5sum] = "236df1ac1130a033ed0dbe2d2115f28f"
-SRC_URI[patch031.sha256sum] = "cd529f59dd0f2fdd49d619fe34691da6f0affedf87cc37cd460a9f3fe812a61d"
-SRC_URI[patch032.md5sum] = "2360f7e79cfb28526f80021025ea5909"
-SRC_URI[patch032.sha256sum] = "889357d29a6005b2c3308ca5b6286cb223b5e9c083219e5db3156282dd554f4a"
-SRC_URI[patch033.md5sum] = "b551c4ee7b8713759e4143499d0bbd48"
-SRC_URI[patch033.sha256sum] = "fb2a7787a13fbe027a7335aca6eb3c21cdbd813e9edc221274b6a9d8692eaa16"
-SRC_URI[patch034.md5sum] = "c9a56fbe0348e05a886dff97f2872b74"
-SRC_URI[patch034.sha256sum] = "f1694f04f110defe1330a851cc2768e7e57ddd2dfdb0e3e350ca0e3c214ff889"
-SRC_URI[patch035.md5sum] = "e564e8ab44ed1ca3a4e315a9f6cabdc9"
-SRC_URI[patch035.sha256sum] = "370d85e51780036f2386dc18c5efe996eba8e652fc1973f0f4f2ab55a993c1e3"
-SRC_URI[patch036.md5sum] = "b00ff66c41a7c0f06e191200981980b0"
-SRC_URI[patch036.sha256sum] = "ac5f82445b36efdb543dbfae64afed63f586d7574b833e9aa9cd5170bc5fd27c"
-SRC_URI[patch037.md5sum] = "be2a7b05f6ae560313f3c9d5f7127bda"
-SRC_URI[patch037.sha256sum] = "33f170dd7400ab3418d749c55c6391b1d161ef2de7aced1873451b3a3fca5813"
-SRC_URI[patch038.md5sum] = "61e0522830b24fbe8c0d1b010f132470"
-SRC_URI[patch038.sha256sum] = "adbeaa500ca7a82535f0e88d673661963f8a5fcdc7ad63445e68bf5b49786367"
-SRC_URI[patch039.md5sum] = "a4775487abe958536751c8ce53cdf6f9"
-SRC_URI[patch039.sha256sum] = "ab94dced2215541097691f60c3eb323cc28ef2549463e6a5334bbcc1e61e74ec"
-SRC_URI[patch040.md5sum] = "80d3587c58854e226055ef099ffeb535"
-SRC_URI[patch040.sha256sum] = "84bb396b9262992ca5424feab6ed3ec39f193ef5c76dfe4a62b551bd8dd9d76b"
-SRC_URI[patch041.md5sum] = "20bf63eef7cb441c0b1cc49ef3191d03"
-SRC_URI[patch041.sha256sum] = "4ec432966e4198524a7e0cd685fe222e96043769c9613e66742ac475db132c1a"
-SRC_URI[patch042.md5sum] = "70790646ae61e207c995e44931390e50"
-SRC_URI[patch042.sha256sum] = "ac219322db2791da87a496ee6e8e5544846494bdaaea2626270c2f73c1044919"
-SRC_URI[patch043.md5sum] = "855a46955cb251534e80b4732b748e37"
-SRC_URI[patch043.sha256sum] = "47a8a3c005b46e25821f4d8f5ccb04c1d653b1c829cb40568d553dc44f7a6180"
-SRC_URI[patch044.md5sum] = "29623d3282fcbb37e1158136509b5bb8"
-SRC_URI[patch044.sha256sum] = "9338820630bf67373b44d8ea68409f65162ea7a47b9b29ace06a0aed12567f99"
-SRC_URI[patch045.md5sum] = "4473244ca5abfd4b018ea26dc73e7412"
-SRC_URI[patch045.sha256sum] = "ba6ec3978e9eaa1eb3fabdaf3cc6fdf8c4606ac1c599faaeb4e2d69864150023"
-SRC_URI[patch046.md5sum] = "7e5fb09991c077076b86e0e057798913"
-SRC_URI[patch046.sha256sum] = "b3b456a6b690cd293353f17e22d92a202b3c8bce587ae5f2667c20c9ab6f688f"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-extended/bash/bash_5.0.bb b/meta/recipes-extended/bash/bash_5.0.bb
new file mode 100644
index 0000000000..eadc82279d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash_5.0.bb
@@ -0,0 +1,45 @@
+require bash.inc
+
+# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
+ ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-001;apply=yes;striplevel=0;name=patch001 \
+ ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-002;apply=yes;striplevel=0;name=patch002 \
+ ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-003;apply=yes;striplevel=0;name=patch003 \
+ ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-004;apply=yes;striplevel=0;name=patch004 \
+ ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-005;apply=yes;striplevel=0;name=patch005 \
+ ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-006;apply=yes;striplevel=0;name=patch006 \
+ ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-007;apply=yes;striplevel=0;name=patch007 \
+ file://execute_cmd.patch \
+ file://mkbuiltins_have_stringize.patch \
+ file://build-tests.patch \
+ file://test-output.patch \
+ file://run-ptest \
+ file://run-bash-ptests \
+ file://fix-run-builtins.patch \
+ "
+
+SRC_URI[tarball.md5sum] = "2b44b47b905be16f45709648f671820b"
+SRC_URI[tarball.sha256sum] = "b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d"
+
+SRC_URI[patch001.md5sum] = "b026862ab596a5883bb4f0d1077a3819"
+SRC_URI[patch001.sha256sum] = "f2fe9e1f0faddf14ab9bfa88d450a75e5d028fedafad23b88716bd657c737289"
+SRC_URI[patch002.md5sum] = "2f4a7787365790ae57f36b311701ea7e"
+SRC_URI[patch002.sha256sum] = "87e87d3542e598799adb3e7e01c8165bc743e136a400ed0de015845f7ff68707"
+SRC_URI[patch003.md5sum] = "af7f2dd93fd5429fb5e9a642ff74f87d"
+SRC_URI[patch003.sha256sum] = "4eebcdc37b13793a232c5f2f498a5fcbf7da0ecb3da2059391c096db620ec85b"
+SRC_URI[patch004.md5sum] = "b60545b273bfa4e00a760f2c648bed9c"
+SRC_URI[patch004.sha256sum] = "14447ad832add8ecfafdce5384badd933697b559c4688d6b9e3d36ff36c62f08"
+SRC_URI[patch005.md5sum] = "875a0bedf48b74e453e3997c84b5d8a4"
+SRC_URI[patch005.sha256sum] = "5bf54dd9bd2c211d2bfb34a49e2c741f2ed5e338767e9ce9f4d41254bf9f8276"
+SRC_URI[patch006.md5sum] = "4a8ee95adb72c3aba03d9e8c9f96ece6"
+SRC_URI[patch006.sha256sum] = "d68529a6ff201b6ff5915318ab12fc16b8a0ebb77fda3308303fcc1e13398420"
+SRC_URI[patch007.md5sum] = "411560d81fde2dc5b17b83c3f3b58c6f"
+SRC_URI[patch007.sha256sum] = "17b41e7ee3673d8887dd25992417a398677533ab8827938aa41fad70df19af9b"
+
+DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch b/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch
new file mode 100644
index 0000000000..1ef797dd66
--- /dev/null
+++ b/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch
@@ -0,0 +1,44 @@
+From e174b6e7d195d5a7465575641b7f68581f162574 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 27 Jun 2019 13:10:47 +0800
+Subject: [PATCH] dc: fix exit code of q command
+
+The exit code for "echo q | dc" is 1 for dc-1.4.1;
+while the exit code for "echo q | dc" is 0 for dc-1.4.
+
+Here is the answer from ken@gnu.org:
+dc-1.4 was right. There was a rewrite of a chunk of code for 1.4.1 to
+fix a corner case in the Q command, and somehow the placement of the
+clean-up label for the 'q' command got misplaced on the error-handling
+branch instead of the clean-exit branch. The patch below fixes this
+(it is committed for whenever the next bc/dc release gets made).
+
+Thanks for the report,
+ --Ken Pizzini
+
+Upstream-Status: Backport [Got the solution from maintainer]
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ dc/eval.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dc/eval.c b/dc/eval.c
+index 05a3d9e..bcab8db 100644
+--- a/dc/eval.c
++++ b/dc/eval.c
+@@ -814,10 +814,10 @@ error_fail:
+ fprintf(stderr, "%s: ", progname);
+ perror("error reading input");
+ return DC_FAIL;
+-reset_and_exit_quit:
+ reset_and_exit_fail:
+ signal(SIGINT, sigint_default);
+ return DC_FAIL;
++reset_and_exit_quit:
+ reset_and_exit_success:
+ signal(SIGINT, sigint_default);
+ return DC_SUCCESS;
+--
+1.9.1
+
diff --git a/meta/recipes-extended/bc/bc/libmath.h b/meta/recipes-extended/bc/bc/libmath.h
new file mode 100644
index 0000000000..63e1acb9ef
--- /dev/null
+++ b/meta/recipes-extended/bc/bc/libmath.h
@@ -0,0 +1,46 @@
+{"@iK20:s2:p@r",
+"@iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:",
+"s14:pl7:s0:pl14:RN1:l5:0<Z2:1s12:pl5:ns5:pN2:l2:s15:pK6:l15:+",
+"K.44:l5:*+s13:pl5:cS1+s2:pN3:l5:1>Z4:l10:1+s10:pl5:K2:/s5:pl2:",
+"1+s2:pJ3:N4:l13:s2:p1l5:+s14:pl5:s6:p1s8:pK2:s11:pN6:1B7:J5:N8:",
+"l11:i11:pJ6:N7:l6:l5:*s6:l8:l11:*s8:/s9:pl9:0=Z9:l10:0>Z10:N11:",
+"l10:d10:Z12:l14:l14:*s14:pJ11:N12:N10:l15:s2:pl12:Z13:1l14:/R",
+"N13:l14:1/RN9:l14:l9:+s14:pJ8:N5:0R]@r",
+"@iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:",
+"s14:pl7:s0:pl14:RN1:l5:0{Z2:1K10:l2:^-1/RN2:l2:s15:pK6:l2:+s2:",
+"pK2:s10:p0s11:pN3:l5:K2:}Z4:l10:K2:*s10:pl5:cRs5:pJ3:N4:N5:l5:",
+"K.5:{Z6:l10:K2:*s10:pl5:cRs5:pJ5:N6:l5:1-l5:1+/s13:s14:pl13:l13:",
+"*s12:pK3:s11:pN8:1B9:J7:N10:l11:K2:+s11:pJ8:N9:l13:l12:*s13:l11:",
+"/s9:pl9:0=Z11:l10:l14:*s14:pl15:s2:pl14:1/RN11:l14:l9:+s14:pJ10:N7:",
+"0R]@r",
+"@iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:",
+"s14:pl7:s0:pl14:RN1:l2:s15:pK1.1:l15:*K2:+s2:p1C4,0:s14:pl5:0",
+"<Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:",
+"*-s5:pl13:K2:%Z3:l5:ns5:pN3:l15:K2:+s2:pl5:s9:s14:pl5:nl5:*s16:",
+"pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*",
+"s9:pl9:0=Z8:l15:s2:pl12:Z9:l14:n1/RN9:l14:1/RN8:l14:l9:+s14:p",
+"J7:N4:0R]@r",
+"@iF5,5.7,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C5,0:s14:pl7:s0:pl14:",
+"RN1:l2:s15:pl2:K1.2:*s2:pl5:1C4,0:K2:*+C3,0:s14:pl15:s2:pl14:",
+"1/R0R]@r",
+"@iF4,5.6,7,9,10,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:",
+"C4,0:s14:pl7:s0:pl14:RN1:1s12:pl5:0<Z2:1ns12:pl5:ns5:pN2:l5:1",
+"=Z3:l2:K25:{Z4:K.7853981633974483096156608:l12:/RN4:l2:K40:{Z5:",
+"K.7853981633974483096156608458198757210492:l12:/RN5:l2:K60:{Z6:",
+"K.785398163397448309615660845819875721049292349843776455243736",
+":l12:/RN6:N3:l5:K.2:=Z7:l2:K25:{Z8:K.1973955598498807583700497",
+":l12:/RN8:l2:K40:{Z9:K.1973955598498807583700497651947902934475",
+":l12:/RN9:l2:K60:{Z10:K.197395559849880758370049765194790293447585103787852101517688",
+":l12:/RN10:N7:l2:s15:pl5:K.2:>Z11:l15:K5:+s2:pK.2:C4,0:s6:pN11:",
+"l15:K3:+s2:pN12:l5:K.2:>Z13:l10:1+s10:pl5:K.2:-1l5:K.2:*+/s5:",
+"pJ12:N13:l5:s13:s14:pl5:nl5:*s16:pK3:s11:pN15:1B16:J14:N17:l11:",
+"K2:+s11:pJ15:N16:l13:l16:*s13:l11:/s9:pl9:0=Z18:l15:s2:pl10:l6:",
+"*l14:+l12:/RN18:l14:l9:+s14:pJ17:N14:0R]@r",
+"@iF6,13,5.6,7,8,9,10,11,12,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl13:",
+"l5:C6,00:s14:pl7:s0:pl14:RN1:l2:s15:p0s2:pl13:1/s13:pl13:0<Z2:",
+"l13:ns13:pl13:K2:%1=Z3:1s12:pN3:N2:1s10:pK2:s11:pN5:l11:l13:{",
+"B6:J4:N7:l11:i11:pJ5:N6:l10:l11:*s10:pJ7:N4:K1.5:l15:*s2:pl5:",
+"l13:^K2:l13:^/l10:/s10:p1s9:s14:pl5:nl5:*K4:/s16:pK1.5:l15:*l10:",
+"cL+l10:cS-s2:p1s11:pN9:1B10:J8:N11:l11:i11:pJ9:N10:l9:l16:*l11:",
+"/l13:l11:+/s9:pl9:0=Z12:l15:s2:pl12:Z13:l10:nl14:*1/RN13:l10:",
+"l14:*1/RN12:l14:l9:+s14:pJ11:N8:0R]@r",0}
diff --git a/meta/recipes-extended/bc/bc/no-gen-libmath.patch b/meta/recipes-extended/bc/bc/no-gen-libmath.patch
new file mode 100644
index 0000000000..c4cce58759
--- /dev/null
+++ b/meta/recipes-extended/bc/bc/no-gen-libmath.patch
@@ -0,0 +1,24 @@
+These rules are not cross-friendly so delete them and we'll generate the file offline.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/bc/Makefile.am b/bc/Makefile.am
+index d9d412e..f244241 100644
+--- a/bc/Makefile.am
++++ b/bc/Makefile.am
+@@ -31,14 +31,6 @@ global.o: libmath.h
+
+ fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o
+
+-libmath.h: libmath.b $(fbcOBJ) $(LIBBC)
+- echo '{0}' > libmath.h
+- $(MAKE) global.o
+- $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS)
+- ./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h
+- $(srcdir)/fix-libmath_h
+- rm -f ./fbc ./global.o
+-
+ sbcOBJ = main.o sbc.o scan.o execute.o global.o load.o storage.o util.o \
+ warranty.o
+ sbc.o: sbc.c
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
deleted file mode 100644
index d8c8a860f8..0000000000
--- a/meta/recipes-extended/bc/bc_1.06.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Arbitrary precision calculator language"
-HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
-
-LICENSE = "GPLv2+ & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
- file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \
- file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \
- file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199"
-
-SECTION = "base"
-DEPENDS = "flex"
-PR = "r3"
-
-SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
- file://fix-segment-fault.patch "
-
-SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
-SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
-
-inherit autotools texinfo update-alternatives
-
-ALTERNATIVE_${PN} = "dc"
-ALTERNATIVE_PRIORITY = "100"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/bc/bc_1.07.1.bb b/meta/recipes-extended/bc/bc_1.07.1.bb
new file mode 100644
index 0000000000..4a51302492
--- /dev/null
+++ b/meta/recipes-extended/bc/bc_1.07.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Arbitrary precision calculator language"
+HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://bc/bcdefs.h;endline=17;md5=4295c06df9e833519a342f7b5d43db06 \
+ file://dc/dc.h;endline=18;md5=36b8c600b63ee8c3aeade2764f6b2a4b \
+ file://lib/number.c;endline=20;md5=cf43068cc88f837731dc53240456cfaf"
+
+SECTION = "base"
+DEPENDS = "flex-native"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+ file://no-gen-libmath.patch \
+ file://libmath.h \
+ file://0001-dc-fix-exit-code-of-q-command.patch"
+SRC_URI[md5sum] = "cda93857418655ea43590736fc3ca9fc"
+SRC_URI[sha256sum] = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a"
+
+inherit autotools texinfo update-alternatives
+
+PACKAGECONFIG ??= "readline"
+PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
+PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
+
+do_compile_prepend() {
+ cp -f ${WORKDIR}/libmath.h ${B}/bc/libmath.h
+}
+
+ALTERNATIVE_${PN} = "bc dc"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/bc/files/fix-segment-fault.patch b/meta/recipes-extended/bc/files/fix-segment-fault.patch
deleted file mode 100644
index 20c0da2ebe..0000000000
--- a/meta/recipes-extended/bc/files/fix-segment-fault.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Pending
-
-when run command such as 'echo "a = 13" | bc -l', it segmentation faults.
-This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
---- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000
-+++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000
-@@ -34,6 +34,7 @@
- #include <number.h>
- #include <assert.h>
- #include <stdlib.h>
-+#include <string.h>
- #include <ctype.h>/* Prototypes needed for external utility routines. */
-
- #define bc_rt_warn rt_warn
---- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000
-+++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000
-@@ -156,7 +156,7 @@
- long label_no;
- long vaf_name; /* variable, array or function number. */
- long func;
-- program_counter save_adr;
-+ static program_counter save_adr;
-
- /* Initialize. */
- str = code;
diff --git a/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch b/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch
index fee368dac2..25a2fabe15 100644
--- a/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch
+++ b/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch
@@ -7,7 +7,7 @@ This patch is taken from
ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
Upstream-Status: Inappropriate [upstream is dead]
-Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
blktool.8 | 4 ++--
diff --git a/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch b/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch
index d08aba5f05..401e41e3ed 100644
--- a/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch
+++ b/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch
@@ -7,7 +7,7 @@ This patch is taken from
ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
Upstream-Status: Inappropriate [upstream is dead]
-Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
util.c | 2 +-
diff --git a/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch b/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch
index d7ed0b9f4d..d1f1e797fe 100644
--- a/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch
+++ b/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch
@@ -14,7 +14,7 @@ This patch is taken from
ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
Upstream-Status: Inappropriate [upstream is dead]
-Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
blktool.c | 11 +++++++++--
diff --git a/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch b/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch
new file mode 100644
index 0000000000..65bca65100
--- /dev/null
+++ b/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch
@@ -0,0 +1,19 @@
+Description: Fix FTBFS with glibc 2.28
+Author: Adrian Bunk <bunk@debian.org>
+Bug-Debian: https://bugs.debian.org/917055
+
+This patch is taken from
+http://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.1.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+--- blktool-4.orig/blktool.c
++++ blktool-4/blktool.c
+@@ -18,6 +18,7 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
++#include <sys/sysmacros.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <getopt.h>
diff --git a/meta/recipes-extended/blktool/blktool_4-7.1.bb b/meta/recipes-extended/blktool/blktool_4-7.1.bb
new file mode 100644
index 0000000000..ff2eaa5352
--- /dev/null
+++ b/meta/recipes-extended/blktool/blktool_4-7.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Tune low-level block device parameters"
+DESCRIPTION = "blktool is used for querying and/or changing settings \
+of a block device. It is like hdparm but a more general tool, as it \
+works on SCSI, IDE and SATA devices."
+HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/b/${BPN}/${BPN}_4.orig.tar.gz;name=tarball \
+ file://0001-fix-typos-in-manpage.patch \
+ file://0002-fix-string-error.patch \
+ file://0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch \
+ file://0004-fix-ftbfs-glibc-2.28.patch \
+ "
+
+SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40"
+SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
+
+# for this package we're mostly interested in tracking debian patches,
+# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/blktool/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
+
+S = "${WORKDIR}/${BPN}-4.orig"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-extended/blktool/blktool_4-7.bb b/meta/recipes-extended/blktool/blktool_4-7.bb
deleted file mode 100644
index 4551c3233e..0000000000
--- a/meta/recipes-extended/blktool/blktool_4-7.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Tune low-level block device parameters"
-DESCRIPTION = "blktool is used for querying and/or changing settings \
-of a block device. It is like hdparm but a more general tool, as it \
-works on SCSI, IDE and SATA devices."
-HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/b/${BPN}/${BPN}_4.orig.tar.gz;name=tarball \
- file://0001-fix-typos-in-manpage.patch \
- file://0002-fix-string-error.patch \
- file://0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch \
- "
-
-SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40"
-SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
-
-# for this package we're mostly interested in tracking debian patches,
-# and not in the upstream version where all development has effectively stopped
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/blktool/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
-
-S = "${WORKDIR}/${BPN}-4.orig"
-
-inherit autotools pkgconfig
diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc
deleted file mode 100644
index f9f8d6b5f0..0000000000
--- a/meta/recipes-extended/byacc/byacc.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Berkeley LALR Yacc parser generator"
-DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \
-parser for it. The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \
-programming language."
-SECTION = "devel"
-LICENSE = "PD"
-
-SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \
- file://byacc-open.patch"
-
-EXTRA_OECONF += "--program-transform-name='s,^,b,'"
-
-BBCLASSEXTEND = "native"
-
-inherit autotools
-
-do_configure() {
- install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
- install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
- oe_runconf
-}
diff --git a/meta/recipes-extended/byacc/byacc/byacc-open.patch b/meta/recipes-extended/byacc/byacc/byacc-open.patch
deleted file mode 100644
index 005831130b..0000000000
--- a/meta/recipes-extended/byacc/byacc/byacc-open.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Ubuntu defaults to passing _FORTIFY_SOURCE=2 which breaks byacc as it doesn't
-pass enough arguments to open():
-
- inlined from 'open_tmpfile' at byacc-20150711/main.c:588:5:
- /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error:
- open with O_CREAT in second argument needs 3 arguments
-
-Add a mode of 0666 to fix this.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/main.c b/main.c
-index 620ce3f..82071a4 100644
---- a/main.c
-+++ b/main.c
-@@ -526,7 +526,7 @@ my_mkstemp(char *temp)
- }
- if ((name = tempnam(dname, fname)) != 0)
- {
-- fd = open(name, O_CREAT | O_EXCL | O_RDWR);
-+ fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0666);
- strcpy(temp, name);
- }
- else
diff --git a/meta/recipes-extended/byacc/byacc_20160606.bb b/meta/recipes-extended/byacc/byacc_20160606.bb
deleted file mode 100644
index 98129d0ec4..0000000000
--- a/meta/recipes-extended/byacc/byacc_20160606.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-# Sigh. This is one of those places where everyone licenses it differently. Someone
-# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
-# "I've found no reliable source which states that byacc must bear a UCB copyright."
-# Setting to PD as this is what the upstream has it as.
-
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=74533d32ffd38bca4cbf1f1305f8bc60"
-require byacc.inc
-
-
-SRC_URI[md5sum] = "d527c811b360f04a8c5f5a0a90625966"
-SRC_URI[sha256sum] = "cc8fdced486cb70cec7a7c9358de836bfd267d19d6456760bb4721ccfea5ac91"
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch b/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch
deleted file mode 100644
index 1d0c3a6dd3..0000000000
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Backport
-https://bugzilla.suse.com/attachment.cgi?id=681334
-
-CVE: CVE-2016-3189
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: bzip2-1.0.6/bzip2recover.c
-===================================================================
---- bzip2-1.0.6.orig/bzip2recover.c
-+++ bzip2-1.0.6/bzip2recover.c
-@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv )
- bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
- bsPutUInt32 ( bsWr, blockCRC );
- bsClose ( bsWr );
-+ outFile = NULL;
- }
- if (wrBlock >= rbCtr) break;
- wrBlock++;
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
deleted file mode 100644
index e2bf1bf110..0000000000
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
+++ /dev/null
@@ -1,11 +0,0 @@
-AC_PREREQ([2.57])
-
-AC_INIT(bzip2, 1.0.6)
-AM_INIT_AUTOMAKE(foreign)
-AM_MAINTAINER_MODE
-
-AC_PROG_CC
-AC_PROG_LIBTOOL
-
-AC_OUTPUT([Makefile])
-
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch b/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
deleted file mode 100644
index ece90d94e6..0000000000
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 8068659388127e8e63f2d2297ba2348c72b20705 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Mon, 12 Oct 2015 03:19:51 -0400
-Subject: [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives
-
-"bzip2 -t FILE" returns 2 if FILE exists, but is not a valid bzip2 file.
-"bzip2 -qt FILE" returns 0 when this happens, although it does print out
-an error message as is does so.
-
-This has been fix by Debian, just port changes from Debian patch file
-"20-legacy.patch".
-
-Debian defect:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279025
-
-Fix item from changelog:
-http://archive.debian.net/changelogs/pool/main/b/bzip2/bzip2_1.0.2-7/changelog
-
- * Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- bzip2.c | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/bzip2.c b/bzip2.c
-index 6de9d1d..f2ce668 100644
---- a/bzip2.c
-+++ b/bzip2.c
-@@ -2003,12 +2003,14 @@ IntNative main ( IntNative argc, Char *argv[] )
- testf ( aa->name );
- }
- }
-- if (testFailsExist && noisy) {
-- fprintf ( stderr,
-- "\n"
-- "You can use the `bzip2recover' program to attempt to recover\n"
-- "data from undamaged sections of corrupted files.\n\n"
-- );
-+ if (testFailsExist) {
-+ if (noisy) {
-+ fprintf ( stderr,
-+ "\n"
-+ "You can use the `bzip2recover' program to attempt to recover\n"
-+ "data from undamaged sections of corrupted files.\n\n"
-+ );
-+ }
- setExit(2);
- exit(exitValue);
- }
---
-1.9.1
-
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/meta/recipes-extended/bzip2/bzip2/Makefile.am
index 05d389fc7d..dcf64584d9 100644
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
+++ b/meta/recipes-extended/bzip2/bzip2/Makefile.am
@@ -48,7 +48,8 @@ runtest:
else echo "FAIL: sample3 decompress"; fi
install-ptest:
- cp $(srcdir)/Makefile $(DESTDIR)/
+ sed -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
+ $(srcdir)/Makefile.am > $(DESTDIR)/Makefile
cp $(srcdir)/sample1.ref $(DESTDIR)/
cp $(srcdir)/sample2.ref $(DESTDIR)/
cp $(srcdir)/sample3.ref $(DESTDIR)/
diff --git a/meta/recipes-extended/bzip2/bzip2/configure.ac b/meta/recipes-extended/bzip2/bzip2/configure.ac
new file mode 100644
index 0000000000..b8abade2d9
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2/configure.ac
@@ -0,0 +1,11 @@
+AC_PREREQ([2.57])
+
+AC_INIT(bzip2, %BZIP2_VERSION%)
+AM_INIT_AUTOMAKE(foreign)
+AM_MAINTAINER_MODE
+
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+AC_OUTPUT([Makefile])
+
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest b/meta/recipes-extended/bzip2/bzip2/run-ptest
index 3b20fce1ee..3b20fce1ee 100644
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
+++ b/meta/recipes-extended/bzip2/bzip2/run-ptest
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
deleted file mode 100644
index ef7bc89765..0000000000
--- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Very high-quality data compression program"
-DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \
-Huffman coding. Compression is generally considerably better than that achieved by more conventional \
-LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
-HOMEPAGE = "http://www.bzip.org/"
-SECTION = "console/utils"
-LICENSE = "bzip2"
-LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
-PR = "r5"
-
-SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \
- file://fix-bunzip2-qt-returns-0-for-corrupt-archives.patch \
- file://configure.ac;subdir=${BP} \
- file://Makefile.am;subdir=${BP} \
- file://run-ptest \
- file://CVE-2016-3189.patch \
- "
-
-SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
-SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
-
-UPSTREAM_CHECK_URI = "http://www.bzip.org/downloads.html"
-
-PACKAGES =+ "libbz2"
-
-CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
-
-inherit autotools update-alternatives ptest
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "bunzip2 bzcat"
-
-#install binaries to bzip2-native under sysroot for replacement-native
-EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
-
-do_install_ptest () {
- cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile
- sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
-}
-
-FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
-
-PROVIDES_append_class-native = " bzip2-replacement-native"
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
new file mode 100644
index 0000000000..8e9b779e67
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Very high-quality data compression program"
+DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \
+Huffman coding. Compression is generally considerably better than that achieved by more conventional \
+LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
+HOMEPAGE = "https://sourceware.org/bzip2/"
+SECTION = "console/utils"
+LICENSE = "bzip2"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"
+
+SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
+ file://configure.ac;subdir=${BP} \
+ file://Makefile.am;subdir=${BP} \
+ file://run-ptest \
+ "
+SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5"
+SRC_URI[sha256sum] = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
+
+UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
+
+PACKAGES =+ "libbz2"
+
+CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
+
+inherit autotools update-alternatives ptest relative_symlinks
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "bunzip2 bzcat bzip2"
+
+#install binaries to bzip2-native under sysroot for replacement-native
+EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
+
+do_configure_prepend () {
+ sed -i -e "s|%BZIP2_VERSION%|${PV}|" ${S}/configure.ac
+}
+
+do_install_ptest () {
+ sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
+}
+
+FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
+
+RDEPENDS_${PN}-ptest += "make"
+
+PROVIDES_append_class-native = " bzip2-replacement-native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
index c0f7f1674f..87fa8eb605 100644
--- a/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
+++ b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
@@ -21,7 +21,7 @@ inherit native
# into the sysroot, as we may use them to construct the rootfs. As such, we
# only adjust the paths to match the metadata for the target, not native.
obey_variables () {
- sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' alternatives.c
+ sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' ${S}/alternatives.c
}
do_compile () {
diff --git a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
index e8390264ce..d21dd69704 100644
--- a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
+++ b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
@@ -6,7 +6,7 @@ of the drudgery of manually editing the symbolic links."
RECIPE_NO_UPDATE_REASON = "Version 1.5 requires selinux"
-HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig"
+HOMEPAGE = "https://github.com/fedora-sysv"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
@@ -16,12 +16,16 @@ PROVIDES += "virtual/update-alternatives"
PR = "r7"
-SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2 \
+S = "${WORKDIR}/${BPN}-${BPN}-${PV}"
+
+SRC_URI = "git://github.com/fedora-sysv/chkconfig.git \
file://replace_caddr_t.patch \
"
-SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
-SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"
+SRCREV = "3e0b3909ff6328d232b27b9c32f1a9309c6cd0a4"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
inherit gettext
diff --git a/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch b/meta/recipes-extended/cpio/cpio-2.13/0001-Fix-CVE-2015-1197.patch
index 5c999197ff..5c999197ff 100644
--- a/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch
+++ b/meta/recipes-extended/cpio/cpio-2.13/0001-Fix-CVE-2015-1197.patch
diff --git a/meta/recipes-extended/cpio/cpio-2.12/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch
index 6ae213942c..6ae213942c 100644
--- a/meta/recipes-extended/cpio/cpio-2.12/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ b/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
deleted file mode 100644
index a31573510a..0000000000
--- a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
-CVE: CVE-2010-0624
-
-This patch avoids heap overflow reported by :
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
-
-This is a clean patch for the GPLv2 tar recipe.
-
-the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio
-recipe, as they share code.
-
-Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
-
-Index: tar-1.17/lib/rtapelib.c
-===================================================================
---- tar-1.17.orig/lib/rtapelib.c
-+++ tar-1.17/lib/rtapelib.c
-@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
-
- sprintf (command_buffer, "R%lu\n", (unsigned long) length);
- if (do_command (handle, command_buffer) == -1
-- || (status = get_status (handle)) == SAFE_READ_ERROR)
-+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
- return SAFE_READ_ERROR;
-
- for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch
deleted file mode 100644
index 0148e70797..0000000000
--- a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch
+++ /dev/null
@@ -1,217 +0,0 @@
-cpio: Fix memory overrun on reading improperly created link records
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
-http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
-
- * src/copyin.c (get_link_name): New function.
- (list_file, copyin_link): use get_link_name
-
- * tests/symlink-bad-length.at: New file.
- * tests/symlink-long.at: New file.
- * tests/Makefile.am: Add new files.
- * tests/testsuite.at: Likewise.
-
- See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-
-Upstream-Status: Backport
-
-Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua>
-
-diff -Nurp cpio-2.8.orig/src/copyin.c cpio-2.8/src/copyin.c
---- cpio-2.8.orig/src/copyin.c 2007-06-07 19:58:03.000000000 +0800
-+++ cpio-2.8/src/copyin.c 2014-12-08 11:30:01.159791484 +0800
-@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, int
- }
-
-
-+static char *
-+get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
-+{
-+ off_t n = file_hdr->c_filesize + 1;
-+ char *link_name;
-+
-+ if (n == 0 || n > SIZE_MAX)
-+ {
-+ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
-+ link_name = NULL;
-+ }
-+ else
-+ {
-+ link_name = xmalloc (n);
-+ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
-+ link_name[file_hdr->c_filesize] = '\0';
-+ tape_skip_padding (in_file_des, file_hdr->c_filesize);
-+ }
-+ return link_name;
-+}
-+
-+
- static void
- list_file(struct cpio_file_stat* file_hdr, int in_file_des)
- {
-@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
- {
- if (archive_format != arf_tar && archive_format != arf_ustar)
- {
-- char *link_name = NULL; /* Name of hard and symbolic links. */
--
-- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
-- link_name[file_hdr->c_filesize] = '\0';
-- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
-- long_format (file_hdr, link_name);
-- free (link_name);
-- tape_skip_padding (in_file_des, file_hdr->c_filesize);
-- return;
-+ char *link_name = get_link_name (file_hdr, in_file_des);
-+ if (link_name)
-+ {
-+ long_format (file_hdr, link_name);
-+ free (link_name);
-+ }
- }
- else
-- {
- long_format (file_hdr, file_hdr->c_tar_linkname);
-- return;
-- }
-+ return;
- }
- else
- #endif
-@@ -732,10 +749,7 @@ copyin_link(struct cpio_file_stat *file_
-
- if (archive_format != arf_tar && archive_format != arf_ustar)
- {
-- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
-- link_name[file_hdr->c_filesize] = '\0';
-- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
-- tape_skip_padding (in_file_des, file_hdr->c_filesize);
-+ link_name = get_link_name (file_hdr, in_file_des);
- }
- else
- {
-diff -Nurp cpio-2.8.orig/tests/Makefile.am cpio-2.8/tests/Makefile.am
---- cpio-2.8.orig/tests/Makefile.am 2006-10-24 18:32:13.000000000 +0800
-+++ cpio-2.8/tests/Makefile.am 2014-12-08 11:30:52.387789482 +0800
-@@ -45,6 +45,8 @@ TESTSUITE_AT = \
- testsuite.at\
- inout.at\
- symlink.at\
-+ symlink-bad-length.at\
-+ symlink-long.at\
- version.at
-
- TESTSUITE = $(srcdir)/testsuite
-diff -Nurp cpio-2.8.orig/tests/symlink-bad-length.at cpio-2.8/tests/symlink-bad-length.at
---- cpio-2.8.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800
-+++ cpio-2.8/tests/symlink-bad-length.at 2014-12-08 11:33:25.283783507 +0800
-@@ -0,0 +1,49 @@
-+# Process this file with autom4te to create testsuite. -*- Autotest -*-
-+# Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301 USA.
-+
-+# Cpio v2.11 did segfault with badly set symlink length.
-+# References:
-+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-+
-+AT_SETUP([symlink-bad-length])
-+AT_KEYWORDS([symlink-long copyout])
-+
-+AT_DATA([ARCHIVE.base64],
-+[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
-+JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
-+UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
-+])
-+
-+AT_CHECK([
-+base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
-+cpio -ntv < ARCHIVE
-+test $? -eq 2
-+],
-+[0],
-+[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE
-+],[cpio: LINK: stored filename length too big
-+cpio: premature end of file
-+])
-+
-+AT_CLEANUP
-diff -Nurp cpio-2.8.orig/tests/symlink-long.at cpio-2.8/tests/symlink-long.at
---- cpio-2.8.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800
-+++ cpio-2.8/tests/symlink-long.at 2014-12-08 11:34:28.807781024 +0800
-@@ -0,0 +1,46 @@
-+# Process this file with autom4te to create testsuite. -*- Autotest -*-
-+# Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301 USA.
-+
-+# Cpio v2.11.90 changed the way symlink name is read from archive.
-+# References:
-+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-+
-+AT_SETUP([symlink-long])
-+AT_KEYWORDS([symlink-long copyout])
-+
-+AT_CHECK([
-+
-+# len(dirname) > READBUFSIZE
-+dirname=
-+for i in {1..52}; do
-+ dirname="xxxxxxxxx/$dirname"
-+ mkdir "$dirname"
-+done
-+ln -s "$dirname" x || AT_SKIP_TEST
-+
-+echo x | cpio -o > ar
-+list=`cpio -tv < ar | sed 's|.*-> ||'`
-+test "$list" = "$dirname" && echo success || echo fail
-+],
-+[0],
-+[success
-+],[2 blocks
-+2 blocks
-+])
-+
-+AT_CLEANUP
-diff -Nurp cpio-2.8.orig/tests/testsuite.at cpio-2.8/tests/testsuite.at
---- cpio-2.8.orig/tests/testsuite.at 2006-10-24 18:32:13.000000000 +0800
-+++ cpio-2.8/tests/testsuite.at 2014-12-08 11:34:56.515779942 +0800
-@@ -31,3 +31,5 @@ m4_include([version.at])
-
- m4_include([inout.at])
- m4_include([symlink.at])
-+m4_include([symlink-bad-length.at])
-+m4_include([symlink-long.at])
diff --git a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
deleted file mode 100644
index e16585dd3f..0000000000
--- a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
-# This is needed to configure correctly with newer versions of autoconf.
-
-diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4
---- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700
-+++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700
-@@ -1,4 +1,4 @@
--# serial 4 -*- Autoconf -*-
-+# serial 5 -*- Autoconf -*-
- # Enable extensions on systems that normally disable them.
-
- # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
-@@ -16,6 +16,7 @@
- # ------------------------
- # Enable extensions on systems that normally disable them,
- # typically due to standards-conformance issues.
-+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
- AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
- [
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-@@ -48,7 +49,7 @@
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
--])
-+])])
-
- # gl_USE_SYSTEM_EXTENSIONS
- # ------------------------
diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
deleted file mode 100644
index a00799fea9..0000000000
--- a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-# Avoid multiple stat definitions
-# Patch taken from cpio mailing list posting 2010-03-19
-
-diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
---- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
-+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
-@@ -82,4 +82,6 @@
- #define lstat stat
- #endif
- int lstat ();
-+#ifndef stat
- int stat ();
-+#endif
diff --git a/meta/recipes-extended/cpio/cpio_2.12.bb b/meta/recipes-extended/cpio/cpio_2.12.bb
deleted file mode 100644
index e7439996bb..0000000000
--- a/meta/recipes-extended/cpio/cpio_2.12.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-include cpio_v2.inc
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-
-SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://0001-Fix-CVE-2015-1197.patch \
- "
-
-SRC_URI[md5sum] = "fc207561a86b63862eea4b8300313e86"
-SRC_URI[sha256sum] = "08a35e92deb3c85d269a0059a27d4140a9667a6369459299d08c17f713a92e73"
diff --git a/meta/recipes-extended/cpio/cpio_2.13.bb b/meta/recipes-extended/cpio/cpio_2.13.bb
new file mode 100644
index 0000000000..69615a9a0f
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.13.bb
@@ -0,0 +1,49 @@
+SUMMARY = "GNU cpio is a program to manage archives of files"
+DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
+another. It handles a number of cpio formats as well as reading and writing tar files."
+HOMEPAGE = "http://www.gnu.org/software/cpio/"
+SECTION = "base"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://0001-Fix-CVE-2015-1197.patch \
+ "
+
+SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"
+SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88"
+
+inherit autotools gettext texinfo
+
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
+
+do_install () {
+ autotools_do_install
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ install -d ${D}${base_bindir}/
+ mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio"
+ rmdir ${D}${bindir}/
+ fi
+
+ # Avoid conflicts with the version from tar
+ mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8"
+}
+
+PACKAGES =+ "${PN}-rmt"
+
+FILES_${PN}-rmt = "${sbindir}/rmt*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "cpio"
+ALTERNATIVE_${PN}-rmt = "rmt"
+
+ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
+
+ALTERNATIVE_PRIORITY[rmt] = "50"
+ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
deleted file mode 100644
index 624906b134..0000000000
--- a/meta/recipes-extended/cpio/cpio_2.8.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require cpio_v2.inc
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
-
-PR = "r4"
-
-SRC_URI += " \
- file://statdef.patch \
- file://m4extensions.patch \
- file://avoid_heap_overflow.patch \
- file://fix-memory-overrun.patch \
- "
-
-SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
-SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
-
-# Required to build with gcc 4.3 and later:
-CFLAGS += "-fgnu89-inline"
diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc
deleted file mode 100644
index 31adb717d4..0000000000
--- a/meta/recipes-extended/cpio/cpio_v2.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "GNU cpio is a program to manage archives of files"
-DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
-another. It handles a number of cpio formats as well as reading and writing tar files."
-HOMEPAGE = "http://www.gnu.org/software/cpio/"
-SECTION = "base"
-
-DEPENDS = "texinfo-native"
-
-SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
- "
-
-inherit autotools gettext texinfo
-
-S = "${WORKDIR}/cpio-${PV}"
-
-EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
-
-do_install () {
- autotools_do_install
- if [ "${base_bindir}" != "${bindir}" ]; then
- install -d ${D}${base_bindir}/
- mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio"
- rmdir ${D}${bindir}/
- fi
-}
-
-PACKAGES =+ "${PN}-rmt"
-
-FILES_${PN}-rmt = "${base_sbindir}/rmt*"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "cpio"
-ALTERNATIVE_${PN}-rmt = "rmt"
-
-ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
-
-ALTERNATIVE_PRIORITY[rmt] = "50"
-ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/cronie/cronie/crond_pam_config.patch b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
index 6c928165cd..c374790d1d 100644
--- a/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
+++ b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
@@ -4,19 +4,19 @@ configure files instead.
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-Index: cronie-1.5.1/pam/crond
-===================================================================
---- cronie-1.5.1.orig/pam/crond
-+++ cronie-1.5.1/pam/crond
+diff --git a/pam/crond b/pam/crond
+index 560529d..95a6457 100644
+--- a/pam/crond
++++ b/pam/crond
@@ -4,8 +4,8 @@
#
# Although no PAM authentication is called, auth modules
# are used for credential setting
--auth include password-auth
+-auth include system-auth
+auth include common-auth
account required pam_access.so
--account include password-auth
-+account include common-account
+-account include system-auth
++account include common-auth
session required pam_loginuid.so
--session include password-auth
+-session include system-auth
+session include common-session-noninteractive
diff --git a/meta/recipes-extended/cronie/cronie_1.5.1.bb b/meta/recipes-extended/cronie/cronie_1.5.1.bb
deleted file mode 100644
index 99b2bb5c83..0000000000
--- a/meta/recipes-extended/cronie/cronie_1.5.1.bb
+++ /dev/null
@@ -1,81 +0,0 @@
-SUMMARY = "Cron daemon for executing programs at set times"
-DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
-specified programs at scheduled times and related tools. It is based on the \
-original cron and has security and configuration enhancements like the \
-ability to use pam and SELinux."
-HOMEPAGE = "https://fedorahosted.org/cronie/"
-BUGTRACKER = "https://bugzilla.redhat.com"
-
-# Internet Systems Consortium License
-LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
- file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
- file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
-
-SECTION = "utils"
-
-SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
- file://crond.init \
- file://crontab \
- file://crond.service \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
-
-PAM_SRC_URI = "file://crond_pam_config.patch"
-PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
-
-SRC_URI[md5sum] = "910e6effcc032998b0a49fbd46322e18"
-SRC_URI[sha256sum] = "6c73666102a6b5d35e2eaf1bd06925f2d4b0cef8d3323c37286dda3089a85338"
-
-inherit autotools update-rc.d useradd systemd
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
-
-PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
-PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
-
-INITSCRIPT_NAME = "crond"
-INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system crontab"
-
-SYSTEMD_SERVICE_${PN} = "crond.service"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/sysconfig/
- install -d ${D}${sysconfdir}/init.d/
- install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
- install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
-
- # install systemd unit files
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SBINDIR@,${sbindir},g' \
- ${D}${systemd_unitdir}/system/crond.service
-
- # below are necessary for a complete cron environment
- install -d ${D}${localstatedir}/spool/cron
- install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
- mkdir -p ${D}${sysconfdir}/cron.d
- mkdir -p ${D}${sysconfdir}/cron.hourly
- mkdir -p ${D}${sysconfdir}/cron.daily
- mkdir -p ${D}${sysconfdir}/cron.weekly
- mkdir -p ${D}${sysconfdir}/cron.monthly
- touch ${D}${sysconfdir}/cron.deny
-
- # below setting is necessary to allow normal user using crontab
-
- # setgid for crontab binary
- chown root:crontab ${D}${bindir}/crontab
- chmod 2755 ${D}${bindir}/crontab
-
- # allow 'crontab' group write to /var/spool/cron
- chown root:crontab ${D}${localstatedir}/spool/cron
- chmod 770 ${D}${localstatedir}/spool/cron
-
- chmod 600 ${D}${sysconfdir}/crontab
-}
-
-FILES_${PN} += "${sysconfdir}/cron*"
-CONFFILES_${PN} += "${sysconfdir}/crontab"
diff --git a/meta/recipes-extended/cronie/cronie_1.5.5.bb b/meta/recipes-extended/cronie/cronie_1.5.5.bb
new file mode 100644
index 0000000000..0def4a187d
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie_1.5.5.bb
@@ -0,0 +1,84 @@
+SUMMARY = "Cron daemon for executing programs at set times"
+DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
+specified programs at scheduled times and related tools. It is based on the \
+original cron and has security and configuration enhancements like the \
+ability to use pam and SELinux."
+HOMEPAGE = "https://github.com/cronie-crond/cronie/"
+BUGTRACKER = "https://bugzilla.redhat.com"
+
+# Internet Systems Consortium License
+LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
+ file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
+ file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
+
+SECTION = "utils"
+
+UPSTREAM_CHECK_URI = "https://github.com/cronie-crond/${BPN}/releases/"
+
+SRC_URI = "https://github.com/cronie-crond/cronie/releases/download/cronie-${PV}/cronie-${PV}.tar.gz \
+ file://crond.init \
+ file://crontab \
+ file://crond.service \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+PAM_SRC_URI = "file://crond_pam_config.patch"
+PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
+
+SRC_URI[md5sum] = "351a37d0b5bd0144816724b4482747ad"
+SRC_URI[sha256sum] = "be34c79505e5544323281854744b9955ff16b160ee569f9df7c0dddae5720eac"
+
+inherit autotools update-rc.d useradd systemd
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+
+PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
+PACKAGECONFIG[anacron] = "--enable-anacron,--disable-anacron,anacron"
+
+INITSCRIPT_NAME = "crond"
+INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system crontab"
+
+SYSTEMD_SERVICE_${PN} = "crond.service"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/sysconfig/
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
+ install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
+
+ # install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ ${D}${systemd_unitdir}/system/crond.service
+
+ # below are necessary for a complete cron environment
+ install -d ${D}${localstatedir}/spool/cron
+ install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
+ mkdir -p ${D}${sysconfdir}/cron.d
+ mkdir -p ${D}${sysconfdir}/cron.hourly
+ mkdir -p ${D}${sysconfdir}/cron.daily
+ mkdir -p ${D}${sysconfdir}/cron.weekly
+ mkdir -p ${D}${sysconfdir}/cron.monthly
+ touch ${D}${sysconfdir}/cron.deny
+
+ # below setting is necessary to allow normal user using crontab
+
+ # setgid for crontab binary
+ chown root:crontab ${D}${bindir}/crontab
+ chmod 2755 ${D}${bindir}/crontab
+
+ # allow 'crontab' group write to /var/spool/cron
+ chown root:crontab ${D}${localstatedir}/spool/cron
+ chmod 770 ${D}${localstatedir}/spool/cron
+
+ chmod 600 ${D}${sysconfdir}/crontab
+}
+
+FILES_${PN} += "${sysconfdir}/cron*"
+CONFFILES_${PN} += "${sysconfdir}/crontab"
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index 02b6358afe..2149cbe4cf 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -1,13 +1,19 @@
SUMMARY = "An Internet printing system for Unix"
+DESCRIPTION = "The Common UNIX Printing System is a printing system and \
+general replacement for lpd and the like. It supports the Internet Printing \
+Protocol (IPP), and has its own filtering driver model for handling various \
+document types."
+HOMEPAGE = "https://www.cups.org/"
SECTION = "console/utils"
LICENSE = "GPLv2 & LGPLv2"
-DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
+DEPENDS = "gnutls libpng jpeg dbus zlib libusb1"
-SRC_URI = "https://github.com/apple/cups/releases/download/release-${PV}/${BP}-source.tar.gz \
+SRC_URI = "https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \
file://use_echo_only_in_init.patch \
file://0001-don-t-try-to-run-generated-binaries.patch \
file://cups_serverbin.patch \
- "
+ file://cups-avoid-install-file-conflicts.patch \
+ "
UPSTREAM_CHECK_URI = "https://github.com/apple/cups/releases"
UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar"
@@ -16,7 +22,7 @@ LEAD_SONAME = "libcupsdriver.so"
CLEANBROKEN = "1"
-inherit autotools-brokensep binconfig useradd systemd
+inherit autotools-brokensep binconfig useradd systemd pkgconfig
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system lpadmin"
@@ -24,11 +30,10 @@ GROUPADD_PARAM_${PN} = "--system lpadmin"
SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket org.cups.cups-lpd@.service"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}"
PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
-PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
+PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam"
PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
@@ -66,7 +71,7 @@ do_install () {
# Remove /var/run from package as cupsd will populate it on startup
rm -fr ${D}/${localstatedir}/run
- rmdir ${D}/${libdir}/${BPN}/driver
+ rmdir ${D}/${libexecdir}/${BPN}/driver
# Fix the pam configuration file permissions
if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
@@ -80,13 +85,6 @@ do_install () {
fi
}
-python do_package_append() {
- import subprocess
- # Change permissions back the way they were, they probably had a reason...
- workdir = d.getVar('WORKDIR', True)
- subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True)
-}
-
PACKAGES =+ "${PN}-lib ${PN}-libimage"
RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
diff --git a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
index 5379eb6aa2..d6a69f2833 100644
--- a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
+++ b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
@@ -1,21 +1,22 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
+From 1fb07162a9ed187cccf06e34c9bf841d15c6e64e Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Sun, 30 Jan 2011 16:37:27 +0100
Subject: [PATCH] don't try to run generated binaries
+Upstream-Status: Inappropriate [embedded specific]
+
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
---
- ppdc/Makefile | 30 +++++++++++++++---------------
- 1 files changed, 15 insertions(+), 15 deletions(-)
+ ppdc/Makefile | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
-Index: cups-2.0.0/ppdc/Makefile
-===================================================================
---- cups-2.0.0.orig/ppdc/Makefile
-+++ cups-2.0.0/ppdc/Makefile
-@@ -242,8 +242,8 @@ genstrings: genstrings.o libcupsppdc.a
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
+diff --git a/ppdc/Makefile b/ppdc/Makefile
+index e563988..973dd3f 100644
+--- a/ppdc/Makefile
++++ b/ppdc/Makefile
+@@ -189,8 +189,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \
+ $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
- echo Generating localization strings...
@@ -25,10 +26,10 @@ Index: cups-2.0.0/ppdc/Makefile
#
-@@ -260,9 +260,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
+@@ -209,9 +209,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) foo.drv foo-fr.po
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
+ $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
- echo Testing PPD compiler...
- ./ppdc-static -l en,fr -I ../data foo.drv
- ./ppdc-static -l en,fr -z -I ../data foo.drv
@@ -38,10 +39,10 @@ Index: cups-2.0.0/ppdc/Makefile
#
-@@ -288,17 +288,17 @@ ppdi-static: ppdc-static ppdi.o libcups
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
+@@ -240,17 +240,17 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC)
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
+ $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
- echo Testing PPD importer...
- $(RM) -r ppd ppd2 sample-import.drv
- ./ppdc-static -l en -I ../data sample.drv
diff --git a/meta/recipes-extended/cups/cups/cups-avoid-install-file-conflicts.patch b/meta/recipes-extended/cups/cups/cups-avoid-install-file-conflicts.patch
new file mode 100644
index 0000000000..68885fa4db
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups-avoid-install-file-conflicts.patch
@@ -0,0 +1,21 @@
+@CUPS_SERVERBIN@ is ${libdir} related that causes multilib install file
+conflict. Remove @CUPS_SERVERBIN@ from the comment line of cups-files.conf to
+avoid the conflict.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in
+index 4a78ba6..03c6582 100644
+--- a/conf/cups-files.conf.in
++++ b/conf/cups-files.conf.in
+@@ -73,7 +73,7 @@ PageLog @CUPS_LOGDIR@/page_log
+ #RequestRoot @CUPS_REQUESTS@
+
+ # Location of helper programs...
+-#ServerBin @CUPS_SERVERBIN@
++#ServerBin
+
+ # SSL/TLS keychain for the scheduler...
+ #ServerKeychain @CUPS_SERVERKEYCHAIN@
diff --git a/meta/recipes-extended/cups/cups/cups_serverbin.patch b/meta/recipes-extended/cups/cups/cups_serverbin.patch
index f7b44a7bc1..85c6af1071 100644
--- a/meta/recipes-extended/cups/cups/cups_serverbin.patch
+++ b/meta/recipes-extended/cups/cups/cups_serverbin.patch
@@ -4,6 +4,12 @@ e.g. ppc64 where base libdir is lib64 this does not go well
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Inappropriate [OE config specific]
+Update on 20190904:
+Redefine CUPS_SERVERBIN to "$libexecdir/cups" which solves file confliction
+when multilib is enabled.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
Index: cups-1.4.6/config-scripts/cups-directories.m4
===================================================================
--- cups-1.4.6.orig/config-scripts/cups-directories.m4 2009-04-12 16:04:51.000000000 -0700
@@ -13,7 +19,7 @@ Index: cups-1.4.6/config-scripts/cups-directories.m4
# All others
INSTALL_SYSV="install-sysv"
- CUPS_SERVERBIN="$exec_prefix/lib/cups"
-+ CUPS_SERVERBIN="$libdir/cups"
++ CUPS_SERVERBIN="$libexecdir/cups"
;;
esac
@@ -26,7 +32,7 @@ Index: cups-1.4.6/configure
# All others
INSTALL_SYSV="install-sysv"
- CUPS_SERVERBIN="$exec_prefix/lib/cups"
-+ CUPS_SERVERBIN="$libdir/cups"
++ CUPS_SERVERBIN="$libexecdir/cups"
;;
esac
diff --git a/meta/recipes-extended/cups/cups_2.1.4.bb b/meta/recipes-extended/cups/cups_2.1.4.bb
deleted file mode 100644
index 0fab806f99..0000000000
--- a/meta/recipes-extended/cups/cups_2.1.4.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
-
-SRC_URI[md5sum] = "9f9bf6e3b9c20a3519b4dc409666d6e7"
-SRC_URI[sha256sum] = "4b14fd833180ac529ebebea766a09094c2568bf8426e219cb3a1715304ef728d"
diff --git a/meta/recipes-extended/cups/cups_2.2.12.bb b/meta/recipes-extended/cups/cups_2.2.12.bb
new file mode 100644
index 0000000000..8e5534a979
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_2.2.12.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
+
+SRC_URI[md5sum] = "e763689f7735d3fe95a2943397189e40"
+SRC_URI[sha256sum] = "0f61ab449e4748a24c6ab355b481ff7691247a140d327b2b7526fce34b7f9aa8"
diff --git a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
deleted file mode 100644
index f8638bbffe..0000000000
--- a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| configure.ac:90: error: automatic de-ANSI-fication support has been removed
-| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
-| /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/diffutils-2.8.1-r4/diffutils-2.8.1/m4/prereq.m4:110: jm_PREREQ_QUOTEARG is expanded from...
-| configure.ac:90: the top level
-| autom4te: m4 failed with exit status: 1
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/04
-
-Index: diffutils-2.8.1/m4/prereq.m4
-===================================================================
---- diffutils-2.8.1.orig/m4/prereq.m4
-+++ diffutils-2.8.1/m4/prereq.m4
-@@ -115,7 +115,6 @@ AC_DEFUN([jm_PREREQ_QUOTEARG],
- AC_HEADER_STDC
- AC_C_BACKSLASH_A
- AC_MBSTATE_T
-- AM_C_PROTOTYPES
- ])
-
- AC_DEFUN([jm_PREREQ_REGEX],
diff --git a/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch b/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch
deleted file mode 100644
index f915287fe7..0000000000
--- a/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fixes to allow diffutils to build with gcc v6.
-
-RP
-2016/5/25
-
-Index: diffutils-2.8.1/lib/posix/regex.h
-===================================================================
---- diffutils-2.8.1.orig/lib/posix/regex.h
-+++ diffutils-2.8.1/lib/posix/regex.h
-@@ -529,7 +529,9 @@ extern int re_exec _RE_ARGS ((const char
- /* For now unconditionally define __restrict_arr to expand to nothing.
- Ideally we would have a test for the compiler which allows defining
- it to restrict. */
-+#ifndef __restrict_arr
- #define __restrict_arr
-+#endif
-
- /* POSIX compatibility. */
- extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
-Index: diffutils-2.8.1/src/diff.c
-===================================================================
---- diffutils-2.8.1.orig/src/diff.c
-+++ diffutils-2.8.1/src/diff.c
-@@ -71,6 +71,7 @@ static void usage (void);
- static bool recursive;
-
- /* In context diffs, show previous lines that match these regexps. */
-+struct re_pattern_buffer function_regexp;
- static struct regexp_list function_regexp_list;
-
- /* Ignore changes affecting only lines that match these regexps. */
diff --git a/meta/recipes-extended/diffutils/diffutils-3.4/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/diffutils/diffutils-3.4/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c..0000000000
--- a/meta/recipes-extended/diffutils/diffutils-3.4/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gnulib.mk b/lib/gnulib.mk
-index e1d74db..c0e92dd 100644
---- a/lib/gnulib.mk
-+++ b/lib/gnulib.mk
-@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
---
-2.1.4
-
diff --git a/meta/recipes-extended/diffutils/diffutils-3.4/run-ptest b/meta/recipes-extended/diffutils/diffutils-3.4/run-ptest
deleted file mode 100644
index 695c5e8a7b..0000000000
--- a/meta/recipes-extended/diffutils/diffutils-3.4/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-make -C tests check-TESTS
diff --git a/meta/recipes-extended/diffutils/diffutils.inc b/meta/recipes-extended/diffutils/diffutils.inc
index 243341aa9c..c9e3130587 100644
--- a/meta/recipes-extended/diffutils/diffutils.inc
+++ b/meta/recipes-extended/diffutils/diffutils.inc
@@ -1,4 +1,5 @@
SUMMARY = "Diffutils contains tools used for finding differences between files"
+HOMEPAGE = "https://www.gnu.org/software/diffutils/diffutils.html"
DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
sdiff, and cmp utilities. These programs are usually \
used for creating patch files."
@@ -6,13 +7,7 @@ SECTION = "base"
inherit autotools texinfo update-alternatives gettext
-# diffutils assumes non-glibc compilation with uclibc and
-# this causes it to generate its own implementations of
-# standard functionality. regex.c actually breaks compilation
-# because it uses __mempcpy, there are other things (TBD:
-# see diffutils.mk in buildroot)
-EXTRA_OECONF_libc-uclibc = "--without-included-regex"
-
ALTERNATIVE_${PN} = "diff cmp"
ALTERNATIVE_PRIORITY = "100"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/diffutils/diffutils/0001-Skip-strip-trailing-cr-test-case.patch b/meta/recipes-extended/diffutils/diffutils/0001-Skip-strip-trailing-cr-test-case.patch
new file mode 100644
index 0000000000..aac1c43465
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils/0001-Skip-strip-trailing-cr-test-case.patch
@@ -0,0 +1,35 @@
+From bd7fb8be2ae2d75347cf7733302d5093046ffa85 Mon Sep 17 00:00:00 2001
+From: Peiran Hong <peiran.hong@windriver.com>
+Date: Thu, 5 Sep 2019 15:42:22 -0400
+Subject: [PATCH] Skip strip-trailing-cr test case
+
+Skip the test "strip-trailing-cr" since it requires valgrind to
+work, but valgrind is considered too heavy-weight for diffutils
+package.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
+---
+ tests/Makefile.am | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 83a7c9d..04d51b5 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -21,8 +21,10 @@ TESTS = \
+ stdin \
+ strcoll-0-names \
+ filename-quoting \
+- strip-trailing-cr \
+ colors
++# Skipping this test since it requires valgrind
++# and thus is too heavy for diffutils package
++# strip-trailing-cr
+
+ XFAIL_TESTS = large-subopt
+
+--
+2.21.0
+
diff --git a/meta/recipes-extended/diffutils/diffutils/run-ptest b/meta/recipes-extended/diffutils/diffutils/run-ptest
new file mode 100644
index 0000000000..ad467d9bd0
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils/run-ptest
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+abs_ptestdir=`echo "$(cd "$(dirname "$0")"; pwd)"`
+make -C $abs_ptestdir/tests check-TESTS abs_top_srcdir="$abs_ptestdir"
diff --git a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
deleted file mode 100644
index fe56f9ce5f..0000000000
--- a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-require diffutils.inc
-
-PR = "r7.0"
-
-SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \
- file://diffutils_fix_for_automake-1.12.patch \
- file://fix_gcc6.patch"
-
-SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428"
-SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a"
-
-do_configure_prepend () {
- chmod u+w ${S}/po/Makefile.in.in
-}
diff --git a/meta/recipes-extended/diffutils/diffutils_3.4.bb b/meta/recipes-extended/diffutils/diffutils_3.4.bb
deleted file mode 100644
index cb7092b514..0000000000
--- a/meta/recipes-extended/diffutils/diffutils_3.4.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-require diffutils.inc
-
-SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://run-ptest \
-"
-
-EXTRA_OECONF += "--without-libsigsegv-prefix"
-
-do_configure_prepend () {
- # Need to remove gettext macros with weird mix of versions
- for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do
- rm -f ${S}/m4/$i
- done
-}
-
-SRC_URI[md5sum] = "df9ca465f30307cffd03da176a43a5d4"
-SRC_URI[sha256sum] = "db53c025f2ac3d217bcf753dad6dee7b410b33d0948495ff015aaf8b91189ce2"
-
-inherit ptest
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}
- install -D ${S}/build-aux/test-driver $t/build-aux/test-driver
- cp -r ${S}/tests $t/
- install ${B}/tests/Makefile $t/tests/
- sed -e 's|^Makefile:|_Makefile:|' \
- -e 's|bash|sh|' \
- -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \
- -e 's|^srcdir = \(.*\)|srcdir = .|' \
- -e 's|"`$(built_programs)`"|diff|' \
- -e 's|gawk|awk|g' \
- -i $t/tests/Makefile
-}
diff --git a/meta/recipes-extended/diffutils/diffutils_3.7.bb b/meta/recipes-extended/diffutils/diffutils_3.7.bb
new file mode 100644
index 0000000000..8111ae6065
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils_3.7.bb
@@ -0,0 +1,40 @@
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+require diffutils.inc
+
+SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
+ file://run-ptest \
+ file://0001-Skip-strip-trailing-cr-test-case.patch \
+"
+
+SRC_URI[md5sum] = "4824adc0e95dbbf11dfbdfaad6a1e461"
+SRC_URI[sha256sum] = "b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26"
+
+EXTRA_OECONF += "ac_cv_path_PR_PROGRAM=${bindir}/pr --without-libsigsegv-prefix"
+
+# Fix "Argument list too long" error when len(TMPDIR) = 410
+acpaths = "-I ./m4"
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest += "make perl"
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ install -D ${S}/build-aux/test-driver $t/build-aux/test-driver
+ cp -r ${S}/tests $t/
+ install ${B}/tests/Makefile $t/tests/
+ sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ -e 's|^Makefile:|_Makefile:|' \
+ -e 's|bash|sh|' \
+ -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \
+ -e 's|^srcdir = \(.*\)|srcdir = .|' \
+ -e 's|"`$(built_programs)`"|diff|' \
+ -e 's|gawk|awk|g' \
+ -i $t/tests/Makefile
+}
diff --git a/meta/recipes-extended/ed/ed_0.5.bb b/meta/recipes-extended/ed/ed_0.5.bb
deleted file mode 100644
index e2df13f4bc..0000000000
--- a/meta/recipes-extended/ed/ed_0.5.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Line-oriented text editor"
-HOMEPAGE = "http://www.gnu.org/software/ed/"
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
- file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
-
-PR = "r2"
-SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
-SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
-
-inherit autotools texinfo
-
-EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
-
-CONFIGUREOPTS_remove = "--disable-dependency-tracking"
-CONFIGUREOPTS_remove = "--disable-silent-rules"
-EXTRA_OECONF_remove = "--disable-static"
diff --git a/meta/recipes-extended/ed/ed_1.15.bb b/meta/recipes-extended/ed/ed_1.15.bb
new file mode 100644
index 0000000000..886c3ddcab
--- /dev/null
+++ b/meta/recipes-extended/ed/ed_1.15.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Line-oriented text editor"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \
+ file://ed.h;endline=20;md5=8af8e7dc7275dca05ce6c9e7ece7aec8 \
+ file://main.c;endline=17;md5=d4dd6a62c502712358ca18551f978781 \
+ "
+
+SECTION = "base"
+
+CVE_PRODUCT = "gnu:ed"
+
+# LSB states that ed should be in /bin/
+bindir = "${base_bindir}"
+
+# Upstream regularly removes previous releases from https://ftp.gnu.org/gnu/ed/
+SRC_URI = "${GNU_MIRROR}/ed/${BP}.tar.lz"
+UPSTREAM_CHECK_URI = "${GNU_MIRROR}/ed/"
+
+SRC_URI[md5sum] = "d3aaeb5eb032142948d7a2f98a24899b"
+SRC_URI[sha256sum] = "ad4489c0ad7a108c514262da28e6c2a426946fb408a3977ef1ed34308bdfd174"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+inherit texinfo
+
+do_configure() {
+ ${S}/configure
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ # Info dir listing isn't interesting at this point so remove it if it exists.
+ if [ -e "${D}${infodir}/dir" ]; then
+ rm -f ${D}${infodir}/dir
+ fi
+}
diff --git a/meta/recipes-extended/ed/ed_1.9.bb b/meta/recipes-extended/ed/ed_1.9.bb
deleted file mode 100644
index f2ec42ad1a..0000000000
--- a/meta/recipes-extended/ed/ed_1.9.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Line-oriented text editor"
-HOMEPAGE = "http://www.gnu.org/software/ed/"
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
- file://ed.h;endline=20;md5=375a20cc2545ac1115eeb7b323c60ae3 \
- file://main.c;endline=17;md5=14dbb325c1f2d4daf50e0aa5c5038e96"
-
-SECTION = "base"
-
-# LSB states that ed should be in /bin/
-bindir = "${base_bindir}"
-
-SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "565b6d1d5a9a8816b9b304fc4ed9405d"
-SRC_URI[sha256sum] = "d5b372cfadf073001823772272fceac2cfa87552c5cd5a8efc1c8aae61f45a88"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-inherit texinfo
-
-do_configure() {
- ${S}/configure
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
- # Info dir listing isn't interesting at this point so remove it if it exists.
- if [ -e "${D}${infodir}/dir" ]; then
- rm -f ${D}${infodir}/dir
- fi
-}
diff --git a/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
index bf66267e81..153ea55060 100644
--- a/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
+++ b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
@@ -1,3 +1,8 @@
+From f8333f7759717b4d163cfe8e3ef8861c5a667324 Mon Sep 17 00:00:00 2001
+From: Tudor Florea <tudor.florea@enea.com>
+Date: Wed, 28 May 2014 18:59:54 +0200
+Subject: [PATCH] ethtool: use serial-tests config needed by ptest.
+
ptest needs buildtest-TESTS and runtest-TESTS targets.
serial-tests is required to generate those targets.
@@ -5,11 +10,16 @@ Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Inappropriate
(default automake behavior incompatible with ptest)
-diff -ruN a/configure.ac b/configure.ac
---- a/configure.ac 2014-05-28 18:19:13.513980977 +0200
-+++ b/configure.ac 2014-05-28 18:19:21.129660215 +0200
-@@ -2,7 +2,7 @@
- AC_INIT(ethtool, 3.14, netdev@vger.kernel.org)
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2127fdb..4910e6f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(ethtool, 5.3, netdev@vger.kernel.org)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR([ethtool.c])
-AM_INIT_AUTOMAKE([gnu])
diff --git a/meta/recipes-extended/ethtool/ethtool_4.6.bb b/meta/recipes-extended/ethtool/ethtool_4.6.bb
deleted file mode 100644
index 788d4ea351..0000000000
--- a/meta/recipes-extended/ethtool/ethtool_4.6.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Display or change ethernet card settings"
-DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
-HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
-SECTION = "console/network"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
- file://run-ptest \
- file://avoid_parallel_tests.patch \
- "
-
-SRC_URI[md5sum] = "1186dd83a0384109b92c6cd40a7bb0e5"
-SRC_URI[sha256sum] = "ad45620887f7e61312fc2f9ca3fd50d49ac7737ed874b0b02845d07e0fa3ca49"
-
-inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
-
-do_compile_ptest() {
- oe_runmake buildtest-TESTS
-}
-
-do_install_ptest () {
- cp ${B}/Makefile ${D}${PTEST_PATH}
- install ${B}/test-cmdline ${D}${PTEST_PATH}
- install ${B}/test-features ${D}${PTEST_PATH}
- install ${B}/ethtool ${D}${PTEST_PATH}/ethtool
- sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
-}
diff --git a/meta/recipes-extended/ethtool/ethtool_5.3.bb b/meta/recipes-extended/ethtool/ethtool_5.3.bb
new file mode 100644
index 0000000000..401331be39
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool_5.3.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Display or change ethernet card settings"
+DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
+HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
+ file://run-ptest \
+ file://avoid_parallel_tests.patch \
+ "
+
+SRC_URI[md5sum] = "63d1c835b861912ea0dfd52cf66a2da4"
+SRC_URI[sha256sum] = "cd2d8ea360431a2ea35ff61c276bcf2afee1ad901668a0b50ae9f1c5814756bd"
+
+UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/software/network/ethtool/"
+
+inherit autotools ptest bash-completion
+
+RDEPENDS_${PN}-ptest += "make"
+
+do_compile_ptest() {
+ oe_runmake buildtest-TESTS
+}
+
+do_install_ptest () {
+ cp ${B}/Makefile ${D}${PTEST_PATH}
+ install ${B}/test-cmdline ${D}${PTEST_PATH}
+ install ${B}/test-features ${D}${PTEST_PATH}
+ install ${B}/ethtool ${D}${PTEST_PATH}/ethtool
+ sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
+}
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch
deleted file mode 100644
index 2076e44097..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Tue, 17 Sep 2013 16:11:16 +0800
-Subject: [PATCH] findutils: fix doc build error
-
-Upstream-Status: Backport
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- doc/find.texi | 6 +++---
- 1 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/doc/find.texi b/doc/find.texi
-index 5b5f0cf..b3d9c6b 100644
---- a/doc/find.texi
-+++ b/doc/find.texi
-@@ -63,7 +63,7 @@ translation approved by the Foundation.
-
- @page
- @vskip 0pt plus 1filll
--@insertcopying{}
-+@insertcopying
- @end titlepage
-
- @contents
-@@ -1466,6 +1466,7 @@ no output is ever sent to it.
- * Escapes::
- * Format Directives::
- * Time Formats::
-+* Formatting Flags::
- @end menu
-
- @node Escapes
-@@ -1534,7 +1535,6 @@ from the novel you are reading.
- * Size Directives::
- * Location Directives::
- * Time Directives::
--* Formatting Flags::
- @end menu
-
- @node Name Directives
-@@ -1780,7 +1780,7 @@ setting the TZ environment variable). This is a GNU extension.
- @end table
-
- @node Formatting Flags
--@subsubsection Formatting Flags
-+@subsection Formatting Flags
-
- The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
- and @samp{+} flags, but the other directives do not, even if they
---
-1.7.4.1
-
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
deleted file mode 100644
index 1b7f8cfb99..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| configure.in:75: error: automatic de-ANSI-fication support has been removed
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/04
-
-Index: findutils-4.2.31/configure.in
-===================================================================
---- findutils-4.2.31.orig/configure.in
-+++ findutils-4.2.31/configure.in
-@@ -72,7 +72,6 @@ dnl gl_EARLY calls AC_GNU_SOURCE anyway.
-
-
- AC_ISC_POSIX
--AM_C_PROTOTYPES
-
- AC_PROG_INSTALL
- AC_PROG_RANLIB
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch
deleted file mode 100644
index 65bd64277c..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Upstream-Status: Inappropriate [legacy version]
-
-the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE
-
-against 4.2.31
-07/08/2010 - qhe
-
-diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
-index 143a9e5..0f27ceb 100644
---- a/gnulib/m4/extensions.m4
-+++ b/gnulib/m4/extensions.m4
-@@ -12,44 +12,6 @@
- # enough in this area it's likely we'll need to redefine
- # AC_USE_SYSTEM_EXTENSIONS for quite some time.
-
--# AC_USE_SYSTEM_EXTENSIONS
--# ------------------------
--# Enable extensions on systems that normally disable them,
--# typically due to standards-conformance issues.
--AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
--[
-- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-- AC_BEFORE([$0], [AC_RUN_IFELSE])
--
-- AC_REQUIRE([AC_GNU_SOURCE])
-- AC_REQUIRE([AC_AIX])
-- AC_REQUIRE([AC_MINIX])
--
-- AH_VERBATIM([__EXTENSIONS__],
--[/* Enable extensions on Solaris. */
--#ifndef __EXTENSIONS__
--# undef __EXTENSIONS__
--#endif
--#ifndef _POSIX_PTHREAD_SEMANTICS
--# undef _POSIX_PTHREAD_SEMANTICS
--#endif
--#ifndef _TANDEM_SOURCE
--# undef _TANDEM_SOURCE
--#endif])
-- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
-- [ac_cv_safe_to_define___extensions__],
-- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([
--# define __EXTENSIONS__ 1
-- AC_INCLUDES_DEFAULT])],
-- [ac_cv_safe_to_define___extensions__=yes],
-- [ac_cv_safe_to_define___extensions__=no])])
-- test $ac_cv_safe_to_define___extensions__ = yes &&
-- AC_DEFINE([__EXTENSIONS__])
-- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-- AC_DEFINE([_TANDEM_SOURCE])
--])
--
- # gl_USE_SYSTEM_EXTENSIONS
- # ------------------------
- # Enable extensions on systems that normally disable them,
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc
index bfedf874be..ad3642923c 100644
--- a/meta/recipes-extended/findutils/findutils.inc
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -13,11 +13,4 @@ inherit autotools gettext texinfo update-alternatives upstream-version-is-even
ALTERNATIVE_${PN} = "find xargs"
ALTERNATIVE_PRIORITY = "100"
-# diffutils assumes non-glibc compilation with uclibc and
-# this causes it to generate its own implementations of
-# standard functionality. regex.c actually breaks compilation
-# because it uses __mempcpy, there are other things (TBD:
-# see diffutils.mk in buildroot)
-EXTRA_OECONF_libc-uclibc = "--without-included-regex"
-
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
index 8729e1b447..6064d18854 100644
--- a/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ b/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -1,4 +1,4 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From 86db2a5f3b7ef8113e5384b4e02d2b299c87a047 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 13 Apr 2015 17:02:13 -0700
Subject: [PATCH] Unset need_charset_alias when building for musl
@@ -11,15 +11,16 @@ coreutils
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
- lib/gnulib.mk | 2 +-
+ gl/lib/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: findutils-4.5.14/gl/lib/Makefile.am
-===================================================================
---- findutils-4.5.14.orig/gl/lib/Makefile.am
-+++ findutils-4.5.14/gl/lib/Makefile.am
-@@ -1220,7 +1220,7 @@ install-exec-localcharset: all-local
+diff --git a/gl/lib/Makefile.am b/gl/lib/Makefile.am
+index a9e2fe4..1c6ea9c 100644
+--- a/gl/lib/Makefile.am
++++ b/gl/lib/Makefile.am
+@@ -1234,7 +1234,7 @@ install-exec-localcharset: all-local
case '$(host_os)' in \
darwin[56]*) \
need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/findutils/findutils/0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch b/meta/recipes-extended/findutils/findutils/0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch
new file mode 100644
index 0000000000..a570473ccb
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch
@@ -0,0 +1,144 @@
+From a3f4821c4a3f723d21c9298d54bee8a656bfd7fb Mon Sep 17 00:00:00 2001
+From: Bernhard Voelker <mail@bernhard-voelker.de>
+Date: Tue, 30 Jan 2018 23:30:09 +0100
+Subject: [PATCH] find: make -delete honour the -ignore_readdir_race option
+
+* find/pred.c (pred_delete): Return true when the -ignore_readdir_race
+option is active and unlinkat() came back with ENOENT.
+* doc/find.texi (Option -ignore_readdir_race): Document the change.
+(Action -delete): Likewise.
+* find/find.1: Likewise.
+* NEWS (Bug Fixes): Mention the fix.
+
+For now, it seems a bit hard to add a proper test for this,
+so the following shell snippet demonstrates the race:
+
+ $ seq 10 | xargs touch
+ $ env time -f 'find exit status: %x\nfind time: %e' \
+ find -ignore_readdir_race -type f \
+ -delete \
+ -exec sh -c 'sleep $(basename {})' \; \
+ -printf 'find deleted: %p\n' \
+ & \
+ sleep 20; \
+ seq 10 | xargs rm -fv; \
+ wait $!
+
+Reported by Alexander Golubev in
+https://savannah.gnu.org/bugs/?52981
+
+Upstream-Status: Backport
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+
+---
+ NEWS | 4 ++++
+ doc/find.texi | 15 ++++++++++++++-
+ find/find.1 | 22 ++++++++++++++++++++++
+ find/pred.c | 6 ++++++
+ 4 files changed, 46 insertions(+), 1 deletion(-)
+
+diff --git a/NEWS b/NEWS
+index 660c241..b86ec1e 100644
+--- a/NEWS
++++ b/NEWS
+@@ -42,6 +42,10 @@ Updated the Danish translation.
+
+ ** Bug Fixes:
+
++#52981: find: the '-delete' action no longer complains about disappeared files
++ when the '-ignore_readdir_race' option is given, too. That action will
++ also returns true in such a case now.
++
+ Applied patch #8688: Spelling fixes.
+
+ * Major changes in release 4.5.18, 2015-12-27
+diff --git a/doc/find.texi b/doc/find.texi
+index fdeb841..247c19a 100644
+--- a/doc/find.texi
++++ b/doc/find.texi
+@@ -1418,7 +1418,15 @@ gives a significant increase in search speed.
+ If a file disappears after its name has been read from a directory but
+ before @code{find} gets around to examining the file with @code{stat},
+ don't issue an error message. If you don't specify this option, an
+-error message will be issued. This option can be useful in system
++error message will be issued.
++
++Furthermore, @code{find} with the @samp{-ignore_readdir_race} option
++will ignore errors of the @samp{-delete} action in the case the file
++has disappeared since the parent directory was read: it will not output
++an error diagnostic, and the return code of the @samp{-delete} action
++will be true.
++
++This option can be useful in system
+ scripts (cron scripts, for example) that examine areas of the
+ filesystem that change frequently (mail queues, temporary directories,
+ and so forth), because this scenario is common for those sorts of
+@@ -2779,6 +2787,11 @@ explicitly.
+
+ If @samp{-delete} fails, @code{find}'s exit status will be nonzero
+ (when it eventually exits).
++
++Together with the @samp{-ignore_readdir_race} option, @code{find} will
++ignore errors of the @samp{-delete} action in the case the file has disappeared
++since the parent directory was read: it will not output an error diagnostic, and
++the return code of the @samp{-delete} action will be true.
+ @end deffn
+
+ @node Adding Tests
+diff --git a/find/find.1 b/find/find.1
+index 7b141b8..0eec41c 100644
+--- a/find/find.1
++++ b/find/find.1
+@@ -479,6 +479,17 @@ one part of the filesystem with this option on and part of it with this option
+ off (if you need to do that, you will need to issue two \fBfind\fR commands
+ instead, one with the option and one without it).
+
++Furthermore,
++.B find
++with the
++.B \-ignore_readdir_race
++option will ignore errors of the
++.B \-delete
++action in the case the file has disappeared since the parent directory was read:
++it will not output an error diagnostic, and the return code of the
++.B \-delete
++action will be true.
++
+ .IP "\-maxdepth \fIlevels\fR"
+ Descend at most \fIlevels\fR (a non-negative integer) levels of
+ directories below the starting-points.
+@@ -1030,6 +1041,17 @@ and
+ .B \-delete
+ together.
+
++Together with the
++.B \-ignore_readdir_race
++option,
++.B find
++will ignore errors of the
++.B \-delete
++action in the case the file has disappeared since the parent directory was
++read: it will not output an error diagnostic, and the return code of the
++.B \-delete
++action will be true.
++
+ .IP "\-exec \fIcommand\fR ;"
+ Execute \fIcommand\fR; true if 0 status is returned. All following
+ arguments to
+diff --git a/find/pred.c b/find/pred.c
+index 32938fb..431f065 100644
+--- a/find/pred.c
++++ b/find/pred.c
+@@ -324,6 +324,12 @@ pred_delete (const char *pathname, struct stat *stat_buf, struct predicate *pred
+ }
+ else
+ {
++ if (ENOENT == errno && options.ignore_readdir_race)
++ {
++ /* Ignore unlink() error for vanished files. */
++ errno = 0;
++ return true;
++ }
+ if (EISDIR == errno)
+ {
+ if ((flags & AT_REMOVEDIR) == 0)
diff --git a/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch b/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch
new file mode 100644
index 0000000000..d13e8ed3cf
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch
@@ -0,0 +1,140 @@
+From 80cdfba079627e15129a926a133825b961d41e36 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Mon, 5 Mar 2018 10:56:29 -0800
+Subject: [PATCH] fflush: adjust to glibc 2.28 libio.h removal
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Problem reported by Daniel P. Berrangé in:
+https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
+* lib/fflush.c (clear_ungetc_buffer_preserving_position)
+(disable_seek_optimization, rpl_fflush):
+* lib/fpurge.c (fpurge):
+* lib/freadahead.c (freadahead):
+* lib/freading.c (freading):
+* lib/fseeko.c (fseeko):
+* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
+Define if not already defined.
+
+Upstream-commit: 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+Upstream-Status: Backport [4af4a4a71827c0bc5e0ec67af23edef4f15cee8e]
+---
+ gl/lib/fflush.c | 6 +++---
+ gl/lib/fpurge.c | 2 +-
+ gl/lib/freadahead.c | 2 +-
+ gl/lib/freading.c | 2 +-
+ gl/lib/fseeko.c | 4 ++--
+ gl/lib/stdio-impl.h | 6 ++++++
+ 6 files changed, 14 insertions(+), 8 deletions(-)
+
+Index: findutils-4.6.0/gl/lib/fflush.c
+===================================================================
+--- findutils-4.6.0.orig/gl/lib/fflush.c
++++ findutils-4.6.0/gl/lib/fflush.c
+@@ -33,7 +33,7 @@
+ #undef fflush
+
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
+ static void
+@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
+
+ #endif
+
+-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
+
+ # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
+ if (stream == NULL || ! freading (stream))
+ return fflush (stream);
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ clear_ungetc_buffer_preserving_position (stream);
+
+Index: findutils-4.6.0/gl/lib/fpurge.c
+===================================================================
+--- findutils-4.6.0.orig/gl/lib/fpurge.c
++++ findutils-4.6.0/gl/lib/fpurge.c
+@@ -62,7 +62,7 @@ fpurge (FILE *fp)
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_IO_read_end = fp->_IO_read_ptr;
+ fp->_IO_write_ptr = fp->_IO_write_base;
+ /* Avoid memory leak when there is an active ungetc buffer. */
+Index: findutils-4.6.0/gl/lib/freadahead.c
+===================================================================
+--- findutils-4.6.0.orig/gl/lib/freadahead.c
++++ findutils-4.6.0/gl/lib/freadahead.c
+@@ -25,7 +25,7 @@
+ size_t
+ freadahead (FILE *fp)
+ {
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ if (fp->_IO_write_ptr > fp->_IO_write_base)
+ return 0;
+ return (fp->_IO_read_end - fp->_IO_read_ptr)
+Index: findutils-4.6.0/gl/lib/freading.c
+===================================================================
+--- findutils-4.6.0.orig/gl/lib/freading.c
++++ findutils-4.6.0/gl/lib/freading.c
+@@ -31,7 +31,7 @@ freading (FILE *fp)
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ return ((fp->_flags & _IO_NO_WRITES) != 0
+ || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+ && fp->_IO_read_base != NULL));
+Index: findutils-4.6.0/gl/lib/fseeko.c
+===================================================================
+--- findutils-4.6.0.orig/gl/lib/fseeko.c
++++ findutils-4.6.0/gl/lib/fseeko.c
+@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when
+ #endif
+
+ /* These tests are based on fpurge.c. */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ if (fp->_IO_read_end == fp->_IO_read_ptr
+ && fp->_IO_write_ptr == fp->_IO_write_base
+ && fp->_IO_save_base == NULL)
+@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when
+ return -1;
+ }
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_flags &= ~_IO_EOF_SEEN;
+ fp->_offset = pos;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+Index: findutils-4.6.0/gl/lib/stdio-impl.h
+===================================================================
+--- findutils-4.6.0.orig/gl/lib/stdio-impl.h
++++ findutils-4.6.0/gl/lib/stdio-impl.h
+@@ -18,6 +18,12 @@
+ the same implementation of stdio extension API, except that some fields
+ have different naming conventions, or their access requires some casts. */
+
++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
++ problem by defining it ourselves. FIXME: Do not rely on glibc
++ internals. */
++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
++# define _IO_IN_BACKUP 0x100
++#endif
+
+ /* BSD stdio derived implementations. */
+
diff --git a/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch b/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch
new file mode 100644
index 0000000000..0fb3953cf3
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch
@@ -0,0 +1,78 @@
+From 80628047a6cc83f82e0c410a82b8f7facd9d50f2 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Wed, 14 Sep 2016 19:21:42 -0500
+Subject: [PATCH] mountlist: include sysmacros.h for glibc
+
+On Fedora rawhide (glibc 2.25), './gnulib-tool --test mountlist'
+reports:
+../../gllib/mountlist.c: In function 'read_file_system_list':
+../../gllib/mountlist.c:534:13: warning: '__makedev_from_sys_types' is deprecated:
+ In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
+ For historical compatibility, it is currently defined by
+ <sys/types.h> as well, but we plan to remove this soon.
+ To use `makedev', include <sys/sysmacros.h> directly.
+ If you did not intend to use a system-defined macro `makedev',
+ you should #undef it after including <sys/types.h>.
+ [-Wdeprecated-declarations]
+ me->me_dev = makedev (devmaj, devmin);
+ ^~
+In file included from /usr/include/features.h:397:0,
+ from /usr/include/sys/types.h:25,
+ from ./sys/types.h:28,
+ from ../../gllib/mountlist.h:23,
+ from ../../gllib/mountlist.c:20:
+/usr/include/sys/sysmacros.h:89:1: note: declared here
+ __SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_FST_IMPL_TEMPL)
+ ^
+
+Fix it by including the right headers. We also need a fix to
+autoconf's AC_HEADER_MAJOR, but that's a separate patch.
+
+* m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include
+AC_HEADER_MAJOR.
+* lib/mountlist.c (includes): Use correct headers.
+
+Signed-off-by: Eric Blake <eblake@redhat.com>
+
+Upstream-commit: 4da63c5881f60f71999a943612da9112232b9161
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+Upstream-Status: Backport [4da63c5881f60f71999a943612da9112232b9161]
+---
+ gl/lib/mountlist.c | 6 ++++++
+ gl/m4/mountlist.m4 | 3 ++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+Index: findutils-4.6.0/gl/lib/mountlist.c
+===================================================================
+--- findutils-4.6.0.orig/gl/lib/mountlist.c
++++ findutils-4.6.0/gl/lib/mountlist.c
+@@ -37,6 +37,12 @@
+ # include <sys/param.h>
+ #endif
+
++#if MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#elif MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
++
+ #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */
+ # if HAVE_SYS_UCRED_H
+ # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS,
+Index: findutils-4.6.0/gl/m4/mountlist.m4
+===================================================================
+--- findutils-4.6.0.orig/gl/m4/mountlist.m4
++++ findutils-4.6.0/gl/m4/mountlist.m4
+@@ -1,4 +1,4 @@
+-# serial 11
++# serial 12
+ dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -15,5 +15,6 @@ AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA],
+ [
+ dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h.
+ AC_CHECK_HEADERS([sys/mntent.h])
++ AC_HEADER_MAJOR()dnl for use of makedev ()
+ gl_FSTYPENAME
+ ])
diff --git a/meta/recipes-extended/findutils/findutils_4.2.31.bb b/meta/recipes-extended/findutils/findutils_4.2.31.bb
deleted file mode 100644
index 7dee018834..0000000000
--- a/meta/recipes-extended/findutils/findutils_4.2.31.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-PR = "r4"
-
-require findutils.inc
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
- file://gnulib-extension.patch \
- file://findutils_fix_for_automake-1.12.patch \
- file://findutils-fix-doc-build-error.patch \
- "
-
-SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a"
-SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204"
diff --git a/meta/recipes-extended/findutils/findutils_4.6.0.bb b/meta/recipes-extended/findutils/findutils_4.6.0.bb
index 072d3b3c05..3b62ed9962 100644
--- a/meta/recipes-extended/findutils/findutils_4.6.0.bb
+++ b/meta/recipes-extended/findutils/findutils_4.6.0.bb
@@ -6,12 +6,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
DEPENDS = "bison-native"
-SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch \
+ file://findutils-4.6.0-gnulib-fflush.patch \
+ file://findutils-4.6.0-gnulib-makedev.patch \
+"
SRC_URI[md5sum] = "9936aa8009438ce185bea2694a997fc1"
SRC_URI[sha256sum] = "ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d"
# http://savannah.gnu.org/bugs/?27299
-CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
+CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes"
EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
index 3f439e7130..742c9a5cf2 100644
--- a/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
+++ b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
@@ -1,4 +1,5 @@
SUMMARY = "OpenPrinting printer support - filters"
+HOMEPAGE = "https://wiki.linuxfoundation.org/openprinting/start"
DESCRIPTION = "Foomatic is a printer database designed to make it easier to set up \
common printers for use with UNIX-like operating systems.\
It provides the "glue" between a print spooler (like CUPS or lpr) and \
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch b/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch
deleted file mode 100644
index bc9201b631..0000000000
--- a/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 53496e2e306b16ac59801553f775bcca164e6a39 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
-Date: Wed, 14 Sep 2016 16:20:37 +0100
-Subject: [PATCH] fix gcc >= 4 compilation
-
-| ../gawk-3.1.5/hard-locale.h: In function 'hard_locale':
-| ../gawk-3.1.5/hard-locale.h:43:20: error: invalid storage class for function 'xmalloc'
-| static ptr_t xmalloc PARAMS ((size_t n));
-| ^~~~~~~
-
-| ../gawk-3.1.5/hard-locale.h:45:22: warning: implicit declaration of function 'xmalloc' [-Wimplicit-function-declaration]
-| char *locale = xmalloc (strlen (p) + 1);
-| ^~~~~~~
-| ../gawk-3.1.5/hard-locale.h:45:22: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
-| ../gawk-3.1.5/dfa.c: At top level:
-| ../gawk-3.1.5/dfa.c:125:14: error: conflicting types for 'xmalloc'
-| static ptr_t xmalloc PARAMS ((size_t n));
-| ^~~~~~~
-| In file included from ../gawk-3.1.5/dfa.c:112:0:
-| ../gawk-3.1.5/hard-locale.h:45:22: note: previous implicit declaration of 'xmalloc' was here
-| char *locale = xmalloc (strlen (p) + 1);
-| ^~~~~~~
-
-Upstream-Status: Inappropriate [required for gawk 3.1.5 (GPLv2) recipe only]
-
-Signed-off-by: André Draszik <git@andred.net>
----
- dfa.c | 2 +-
- hard-locale.h | 2 --
- 2 files changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/dfa.c b/dfa.c
-index 71e3736..97f6045 100644
---- a/dfa.c
-+++ b/dfa.c
-@@ -109,6 +109,7 @@ extern void free();
-
- #include "regex.h"
- #include "dfa.h"
-+static ptr_t xmalloc PARAMS ((size_t n));
- #include "hard-locale.h"
-
- /* HPUX, define those as macros in sys/param.h */
-@@ -122,7 +123,6 @@ extern void free();
- static void dfamust PARAMS ((struct dfa *dfa));
-
- static ptr_t xcalloc PARAMS ((size_t n, size_t s));
--static ptr_t xmalloc PARAMS ((size_t n));
- static ptr_t xrealloc PARAMS ((ptr_t p, size_t n));
- #ifdef DEBUG
- static void prtok PARAMS ((token t));
-diff --git a/hard-locale.h b/hard-locale.h
-index 0f4986b..9ee57e0 100644
---- a/hard-locale.h
-+++ b/hard-locale.h
-@@ -40,8 +40,6 @@ hard_locale (int category)
- if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
- hard = 0;
- # else
-- static ptr_t xmalloc PARAMS ((size_t n));
--
- char *locale = xmalloc (strlen (p) + 1);
- strcpy (locale, p);
-
---
-2.9.3
-
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
deleted file mode 100644
index c42c33c420..0000000000
--- a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| configure.ac:127: error: automatic de-ANSI-fication support has been removed
-| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
-| configure.ac:127: the top level
-| autom4te: m4 failed with exit status: 1
-...
-| Makefile.am:27: error: automatic de-ANSI-fication support has been removed
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/04
-
-Index: gawk-3.1.5/configure.ac
-===================================================================
---- gawk-3.1.5.orig/configure.ac
-+++ gawk-3.1.5/configure.ac
-@@ -124,7 +124,6 @@ fi
-
- dnl check for C compiler for automake
- AM_PROG_CC_STDC
--AM_C_PROTOTYPES
-
- dnl Cygwin doesn't like to get libs with full paths
- dnl since that overrides linking against DLLs.
-Index: gawk-3.1.5/Makefile.am
-===================================================================
---- gawk-3.1.5.orig/Makefile.am
-+++ gawk-3.1.5/Makefile.am
-@@ -24,7 +24,7 @@
- ## process this file with automake to produce Makefile.in
-
- # Automatic de-ANSI-fication if needed, make .bz2 files also.
--AUTOMAKE_OPTIONS = ansi2knr dist-bzip2
-+AUTOMAKE_OPTIONS = dist-bzip2
-
- # This undocumented variable insures that aclocal runs
- # correctly after changing configure.ac
diff --git a/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest b/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest
deleted file mode 100644
index d23f0bf6d7..0000000000
--- a/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-cd test
-for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \
- do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \
- make -f Maketests $i >$i.tmp 2>&1; \
- grep -q "Error" $i.tmp; \
- if [ $? -eq 0 ]; then echo "FAIL: $i"; \
- else echo "PASS: $i"; rm -f $i.tmp; fi; \
-done
diff --git a/meta/recipes-extended/gawk/gawk/run-ptest b/meta/recipes-extended/gawk/gawk/run-ptest
new file mode 100644
index 0000000000..f67a95874f
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk/run-ptest
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+cd test
+for i in `grep -E "^[a-z0-9_-]*:$" Maketests |awk -F: '{print $1}'`; do
+ #LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C}
+ srcdir=`pwd` AWKPROG=gawk AWK=gawk CMP=cmp make -f Maketests $i >$i.tmp 2>&1
+ if [ -e _$i ]; then
+ cat _$i
+ grep -q "support not compiled in" _$i
+ if [ $? -eq 0 ]; then
+ echo "SKIP: $i"
+ continue
+ fi
+ fi
+ grep -q "Error" $i.tmp
+ if [ $? -eq 0 ]; then
+ echo "FAIL: $i"
+ else
+ echo "PASS: $i"
+ rm -f $i.tmp
+ fi
+done
diff --git a/meta/recipes-extended/gawk/gawk_3.1.5.bb b/meta/recipes-extended/gawk/gawk_3.1.5.bb
deleted file mode 100644
index 63fd32f4b9..0000000000
--- a/meta/recipes-extended/gawk/gawk_3.1.5.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "GNU awk text processing utility"
-DESCRIPTION = "The GNU version of awk, a text processing utility. \
-Awk interprets a special-purpose programming language to do \
-quick and easy text pattern matching and reformatting jobs."
-HOMEPAGE = "www.gnu.org/software/gawk"
-BUGTRACKER = "bug-gawk@gnu.org"
-SECTION = "console/utils"
-
-# gawk <= 3.1.5: GPLv2
-# gawk >= 3.1.6: GPLv3
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-RDEPENDS_gawk += "gawk-common"
-RDEPENDS_pgawk += "gawk-common"
-PR = "r2"
-
-SRC_URI = "\
- ${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
- file://gawk-3.1.5_fix_for_automake-1.12.patch \
- file://0001-gawk-fix-non-glibc-gcc-4-compilation.patch \
-"
-
-SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30"
-SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8"
-
-inherit autotools gettext texinfo update-alternatives
-
-PACKAGES += "gawk-common pgawk"
-
-FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
-FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
-FILES_pgawk = "${bindir}/pgawk*"
-
-ALTERNATIVE_${PN} = "awk"
-ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
-ALTERNATIVE_PRIORITY = "100"
-
-CFLAGS += "-D PROTOTYPES"
-
-do_install_append() {
- # remove the link since we don't package it
- rm ${D}${bindir}/awk
-}
diff --git a/meta/recipes-extended/gawk/gawk_4.1.3.bb b/meta/recipes-extended/gawk/gawk_4.1.3.bb
deleted file mode 100644
index 6ca7f3ef45..0000000000
--- a/meta/recipes-extended/gawk/gawk_4.1.3.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "GNU awk text processing utility"
-DESCRIPTION = "The GNU version of awk, a text processing utility. \
-Awk interprets a special-purpose programming language to do \
-quick and easy text pattern matching and reformatting jobs."
-HOMEPAGE = "https://www.gnu.org/software/gawk/"
-BUGTRACKER = "bug-gawk@gnu.org"
-SECTION = "console/utils"
-
-# gawk <= 3.1.5: GPLv2
-# gawk >= 3.1.6: GPLv3
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS += "readline"
-
-PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
-
-SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
- file://run-ptest \
-"
-
-SRC_URI[md5sum] = "55d37f4069502677f25d1340df8eec97"
-SRC_URI[sha256sum] = "524effa5b9ecd4ed940f2581c5d3c1df4e4bd7e6f768aa033c1916f47dfc6e29"
-
-inherit autotools gettext texinfo update-alternatives
-
-FILES_${PN} += "${datadir}/awk"
-FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
-
-ALTERNATIVE_${PN} = "awk"
-ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
-ALTERNATIVE_PRIORITY = "100"
-
-do_install_append() {
- # remove the link since we don't package it
- rm ${D}${bindir}/awk
-}
-
-inherit ptest
-
-do_install_ptest() {
- mkdir ${D}${PTEST_PATH}/test
- for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests; \
- do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
- done
-}
diff --git a/meta/recipes-extended/gawk/gawk_5.0.1.bb b/meta/recipes-extended/gawk/gawk_5.0.1.bb
new file mode 100644
index 0000000000..eaba6c78ed
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_5.0.1.bb
@@ -0,0 +1,53 @@
+SUMMARY = "GNU awk text processing utility"
+DESCRIPTION = "The GNU version of awk, a text processing utility. \
+Awk interprets a special-purpose programming language to do \
+quick and easy text pattern matching and reformatting jobs."
+HOMEPAGE = "https://www.gnu.org/software/gawk/"
+BUGTRACKER = "bug-gawk@gnu.org"
+SECTION = "console/utils"
+
+# gawk <= 3.1.5: GPLv2
+# gawk >= 3.1.6: GPLv3
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PACKAGECONFIG ??= "readline"
+PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
+PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+
+SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "c5441c73cc451764055ee65e9a4292bb"
+SRC_URI[sha256sum] = "625bf3718e25a84dc4486135d5cb5388174682362c70107fd13f21572f5603bb"
+
+inherit autotools gettext texinfo update-alternatives
+
+FILES_${PN} += "${datadir}/awk"
+FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
+
+ALTERNATIVE_${PN} = "awk"
+ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install_append() {
+ # remove the link since we don't package it
+ rm ${D}${bindir}/awk
+}
+
+inherit ptest
+
+do_install_ptest() {
+ mkdir ${D}${PTEST_PATH}/test
+ ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk
+ for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \
+ do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
+ done
+ sed -i -e 's|/usr/local/bin|${bindir}|g' \
+ -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk
+}
+
+RDEPENDS_${PN}-ptest += "make"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch b/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
index c3e44fe86a..5834ffaf9f 100644
--- a/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
+++ b/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
@@ -1,7 +1,7 @@
-From 5ef8b85bc98f3bd9a15d5f47e24d3e23ae27c265 Mon Sep 17 00:00:00 2001
+From a954bf29a5f906b3151dffbecb5856e02e1565da Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 18 Jan 2016 01:00:30 -0500
-Subject: [PATCH] configure.ac: do not check local png source
+Subject: [PATCH 03/10] configure.ac: do not check local png source
In oe-core, it did not need to compile local libpng
source in ghostscript, so do not check local png
@@ -16,10 +16,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
-index bf6d3f5..01df03f 100644
+index 9341930..80a60b1 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -930,11 +930,11 @@ AC_SUBST(ZLIBDIR)
+@@ -1114,11 +1114,11 @@ AC_SUBST(ZLIBDIR)
AC_SUBST(FT_SYS_ZLIB)
dnl png for the png output device; it also requires zlib
@@ -34,5 +34,5 @@ index bf6d3f5..01df03f 100644
SHARE_LIBPNG=0
LIBPNGDIR=$srcdir/libpng
--
-2.8.1
+1.8.3.1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14869-0001.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14869-0001.patch
new file mode 100644
index 0000000000..715ec1c450
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14869-0001.patch
@@ -0,0 +1,70 @@
+From 485904772c5f0aa1140032746e5a0abfc40f4cef Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Tue, 5 Nov 2019 09:45:27 +0000
+Subject: [PATCH] Bug 701841: remove .forceput from /.charkeys
+
+When loading Type 1 or Truetype fonts from disk, we attempt to extend the glyph
+name table to include all identifiable glyph names from the Adobe Glyph List.
+
+In the case of Type 1 fonts, the font itself (almost always) marks the
+CharStrings dictionary as read-only, hence we have to use .forceput for that
+case.
+
+But for Truetype fonts, the CharStrings dictionary is created internally and is
+not read-only until *after* we have fully populated it (including the extended
+glyph names from the AGL), hence there is no need for .forceput, and no need to
+carry the security risk of using it.
+
+Replace with regular put.
+
+CVE: CVE-2019-14869
+Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git]
+
+Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
+---
+ Resource/Init/gs_ttf.ps | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Resource/Init/gs_ttf.ps b/Resource/Init/gs_ttf.ps
+index e34967d..5354ff0 100644
+--- a/Resource/Init/gs_ttf.ps
++++ b/Resource/Init/gs_ttf.ps
+@@ -1301,7 +1301,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef
+ TTFDEBUG { (\n1 setting alias: ) print dup ==only
+ ( to be the same as ) print 2 index //== exec } if
+
+- 7 index 2 index 3 -1 roll exch .forceput
++ 7 index 2 index 3 -1 roll exch put
+ } forall
+ pop pop pop
+ }
+@@ -1319,7 +1319,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef
+ exch pop
+ TTFDEBUG { (\n2 setting alias: ) print 1 index ==only
+ ( to use glyph index: ) print dup //== exec } if
+- 5 index 3 1 roll .forceput
++ 5 index 3 1 roll put
+ //false
+ }
+ {
+@@ -1336,7 +1336,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef
+ { % CharStrings(dict) isunicode(boolean) cmap(dict) RAGL(dict) gname(name) codep(integer) gindex(integer)
+ TTFDEBUG { (\3 nsetting alias: ) print 1 index ==only
+ ( to be index: ) print dup //== exec } if
+- exch pop 5 index 3 1 roll .forceput
++ exch pop 5 index 3 1 roll put
+ }
+ {
+ pop pop
+@@ -1366,7 +1366,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef
+ } ifelse
+ ]
+ TTFDEBUG { (Encoding: ) print dup === flush } if
+-} .bind executeonly odef % hides .forceput
++} .bind odef
+
+ % ---------------- CIDFontType 2 font loading ---------------- %
+
+--
+2.20.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
new file mode 100644
index 0000000000..e8cb16c36b
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
@@ -0,0 +1,33 @@
+From 0ccbaa134093bf6afc79f2d20d061bca5a8754ed Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Thu, 29 Mar 2018 16:02:05 +0800
+Subject: [PATCH 04/10] avoid host contamination
+
+Remove hardcode path refer to host to avoid host contamination.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+Rebase to 9.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ devices/devs.mak | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/devices/devs.mak b/devices/devs.mak
+index 846aa50..9570182 100644
+--- a/devices/devs.mak
++++ b/devices/devs.mak
+@@ -393,7 +393,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) $(math__h) $(memory__h)\
+ ### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT
+
+ $(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS)
+- $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS)
++ $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS)
+
+ ###### --------------- Memory-buffered printer devices --------------- ######
+
+--
+1.8.3.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch
index d97d4ecd7d..7d80066a80 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch
@@ -1,4 +1,8 @@
-base/genht.c: add a preprocessor define to allow fopen calling
+From 9ca6f795409b988d38dd98bc2a6ecb68a9392312 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 29 Mar 2018 16:37:40 +0800
+Subject: [PATCH 10/10] base/genht.c: add a preprocessor define to allow fopen
+ calling
The commit in upstream:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643
@@ -7,17 +11,19 @@ Replace all fopen calls with gp_fopen and add a preprocessor define so
that any unintential calls directly to fopen will cause an error.
Only exceptions are those in the platform specific code, and mkromfs.c.
-This patch add a preprocessor define to allow fopen calling in base/genht.c.
+This patch add a preprocessor define to allow fopen calling in
+base/genht.c.
Upstream-Status: Pending
+Rebase to 9.23
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
base/genht.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/base/genht.c b/base/genht.c
-index 4b04085..cc82fff 100644
+index e597e72..e96bfb5 100644
--- a/base/genht.c
+++ b/base/genht.c
@@ -16,6 +16,10 @@
@@ -32,5 +38,5 @@ index 4b04085..cc82fff 100644
#include "string_.h"
#include "gscdefs.h"
--
-1.8.1.2
+1.8.3.1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
index a1c9368cc9..4c9bb22fa2 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
@@ -1,6 +1,12 @@
-Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it
+From 9129eb7fa9dc160d64a7d9df9279a3b1dae4d793 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 29 Mar 2018 16:16:18 +0800
+Subject: [PATCH 08/10] cups no gcrypt
-Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
+Don't build-depend on libgcrypt, as nothing is used from it
+
+Backported from
+http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
This addresses the cryto dependency seen during build.
@@ -8,7 +14,7 @@ Upstream-Status: Backport
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
-Rebase the patch to ghostscript-9.15
+Rebase to 9.23
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
cups/libs/cups/http-private.h | 1 -
@@ -27,5 +33,5 @@ index 99a85c3..a674852 100644
# include <CoreFoundation/CoreFoundation.h>
# include <Security/Security.h>
--
-1.9.1
+1.8.3.1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
index e28a949bf7..7b70bb8e2c 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
@@ -1,23 +1,30 @@
-Import patch from windriver linux for cross compilation, and split patches
-into oe way under different directories such as i586, powerpc etc according
-to Richard's opinion.
+From c076d0fc970f190f723018258790c79b59daba2e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 21:20:27 +0800
+Subject: [PATCH] not generate objarch.h at compile time
+
+Import patch from windriver linux for cross compilation, and split
+patches into oe way under different directories such as i586, powerpc etc
+according to Richard's opinion.
Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-# Author: Chi Xu <chi.xu@windriver.com>
-# Date: Feb 26 2010
-# Summary: Generate arch.h for ppc32
-#
+Rebase to 9.27
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/lib.mak | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
-diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
---- ghostscript-8.64.orig/base/lib.mak 2010-02-10 10:30:02.000000000 +0800
-+++ ghostscript-8.64/base/lib.mak 2010-02-10 10:56:21.000000000 +0800
-@@ -67,8 +67,8 @@
- stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
- stdint__h=$(GLSRC)stdint_.h $(std_h)
+diff --git a/base/lib.mak b/base/lib.mak
+index 3ed088a..5af2b43 100644
+--- a/base/lib.mak
++++ b/base/lib.mak
+@@ -87,8 +87,8 @@ arch_h=$(GLGEN)arch.h
+ stdpre_h=$(GLSRC)stdpre.h
+ stdint__h=$(GLSRC)stdint_.h
-$(GLGEN)arch.h : $(GENARCH_XE)
- $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE)
@@ -26,3 +33,6 @@ diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
# Platform interfaces
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
deleted file mode 100644
index e709195d8c..0000000000
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-Just use commands provided by ghostscript-native, preventing recompile them when
-compile ghostscript.
-Way to enable cross compile.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kang Kai <kai.kang@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-
-Rebase to 9.19
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- base/unix-aux.mak | 64 +++++++++++++++++++++++++++----------------------------
- 1 file changed, 32 insertions(+), 32 deletions(-)
-
-diff --git a/base/unix-aux.mak b/base/unix-aux.mak
-index 0110667..e2eb1a1 100644
---- a/base/unix-aux.mak
-+++ b/base/unix-aux.mak
-@@ -71,44 +71,44 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\
-
- # -------------------------- Auxiliary programs --------------------------- #
-
--$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
-- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
--
-+#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
-+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
-+#
- # On the RS/6000 (at least), compiling genarch.c with gcc with -O
- # produces a buggy executable.
--$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
-- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
--
--$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
-- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
--
--$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
-- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
--
--$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
-- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
--
-+#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
-+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
-+#
-+#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
-+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
-+#
-+#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
-+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
-+#
-+#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
-+# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
-+#
- # To get GS to use the system zlib, you remove/hide the gs/zlib directory
- # which means that the mkromfs build can't find the zlib source it needs.
- # So it's split into two targets, one using the zlib source directly.....
--MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
-- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
-- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
--
--$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS)
-- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
--
-+#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
-+# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
-+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
-+#
-+#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS)
-+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
-+#
- # .... and one using the zlib library linked via the command line
--MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
-- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
-- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
-- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
--
--$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS)
-- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
--
--$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS)
-- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
-+#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
-+# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
-+# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
-+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
-+#
-+#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS)
-+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
-+#
-+#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS)
-+# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
-
- # Query the environment to construct gconfig_.h.
- # These are all defined conditionally (except the JasPER one), so that
---
-2.8.1
-
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch
index 797b8947cf..ffa269e3b2 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch
@@ -1,40 +1,38 @@
-From be1e1b33191afdcfe3c2ecc4ff3e361a5859e9c6 Mon Sep 17 00:00:00 2001
+From 84bb692d6b047c09266de154f404af9817fa04aa Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
-Date: Fri, 30 Jan 2015 00:40:22 -0800
-Subject: [PATCH] contrib.mak: fix for parallel build
-
-Fixed:
-rm: cannot remove `/usr/share/ghostscript/9.15/lib': Is a directory
-
-Create lib before install to fix the race issue.
+Date: Thu, 29 Mar 2018 15:59:05 +0800
+Subject: [PATCH 01/10] contrib.mak: fix for parallel build
Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Rebase to 9.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
- contrib/contrib.mak | 2 ++
+ contrib/contrib.mak | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/contrib.mak b/contrib/contrib.mak
-index 08a80d1..de2e20d 100644
+index f5a2fa4..4999752 100644
--- a/contrib/contrib.mak
+++ b/contrib/contrib.mak
-@@ -947,6 +947,7 @@ $(DEVOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h
+@@ -1067,6 +1067,7 @@ $(DEVOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h \
$(DEVCC) $(O_)$@ $(C_) $(JAPSRC)dviprlib.c
- extra-dmprt-install:
+ extra-dmprt-install: install-libdata
+ mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib
$(INSTALL_DATA) $(JAPSRC)dmp_init.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
$(INSTALL_DATA) $(JAPSRC)dmp_site.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
$(INSTALL_DATA) $(JAPSRC)escp_24.src $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
-@@ -1088,6 +1089,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH)
+@@ -1235,6 +1236,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) \
### ----------------- Additional .upp files ---------------- ###
- extra-upp-install:
+ extra-upp-install: install-libdata
+ mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib
for f in $(CONTRIBSRC)uniprint$(D)*.upp; do \
$(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \
done
--
-1.7.9.5
+1.8.3.1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch
index d786482007..8c4a5d44e3 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch
@@ -1,7 +1,7 @@
-From 5d5c83c89be0cff29dde2267fa168e6f7146be8c Mon Sep 17 00:00:00 2001
+From c481b055cd464734a3c2d80719ead4c1c92a40c9 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Mon, 4 May 2015 22:31:48 -0700
-Subject: [PATCH] base/gendev.c: fix for -Werror=return-type
+Subject: [PATCH 02/10] base/gendev.c: fix for -Werror=return-type
Fixed:
base/gendev.c:80:1: error: return type defaults to 'int' [-Werror=return-type]
@@ -10,11 +10,11 @@ Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- base/gendev.c | 1 +
+ base/gendev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/base/gendev.c b/base/gendev.c
-index 68a745f..8058b5a 100644
+index 59d5999..7766b08 100644
--- a/base/gendev.c
+++ b/base/gendev.c
@@ -77,6 +77,7 @@ static const char *indent_item = "";
@@ -26,5 +26,5 @@ index 68a745f..8058b5a 100644
{
config conf;
--
-1.7.9.5
+1.8.3.1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch
new file mode 100644
index 0000000000..a382c7f891
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch
@@ -0,0 +1,47 @@
+From 0124b1c29b9cfe46d73ae82ce023dd7c5b055744 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 29 Mar 2018 16:36:12 +0800
+Subject: [PATCH 09/10] ghostscript-native:fix disable-system-libtiff
+
+Modify configure to add the check to make sure
+ghostscrip could work while system-libtiff is
+disabled.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Rebase to ghostscript 9.25.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+---
+ configure.ac | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 80a60b1..f3e9efb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1319,6 +1319,7 @@ AC_TRY_COMPILE([], [return 0;],
+ CFLAGS=$CGLAGS_STORE
+
+ if test x"$SHARE_LIBTIFF" = x"0" ; then
++ if test -e $LIBTIFFDIR/configure; then
+ echo "Running libtiff configure script..."
+ olddir=`pwd`
+ if ! test -d "$LIBTIFFCONFDIR" ; then
+@@ -1337,6 +1338,10 @@ if test x"$SHARE_LIBTIFF" = x"0" ; then
+
+ echo
+ echo "Continuing with Ghostscript configuration..."
++ else
++ AC_MSG_NOTICE([Could not find local copy of libtiff.
++Disabling tiff output devices.])
++ fi
+ fi
+
+ AC_SUBST(SHARE_LIBTIFF)
+--
+1.8.3.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch
new file mode 100644
index 0000000000..c76915fb81
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch
@@ -0,0 +1,78 @@
+From 239d681306a8d97ed10954788d32ba2f4b55f77c Mon Sep 17 00:00:00 2001
+From: Kang Kai <kai.kang@windriver.com>
+Date: Thu, 29 Mar 2018 16:10:16 +0800
+Subject: [PATCH 06/10] prevent recompiling
+
+Just use commands provided by ghostscript-native, preventing recompile
+them when compile ghostscript. Way to enable cross compile.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+Rebase to 9.25
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+---
+ base/unix-aux.mak | 44 --------------------------------------------
+ 1 file changed, 44 deletions(-)
+
+diff --git a/base/unix-aux.mak b/base/unix-aux.mak
+index 5bf72e9..9cb39d7 100644
+--- a/base/unix-aux.mak
++++ b/base/unix-aux.mak
+@@ -54,50 +54,6 @@ $(AUX)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.
+ $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
+ $(GLCCAUX) $(AUXO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c
+
+-# -------------------------- Auxiliary programs --------------------------- #
+-
+-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
+-
+-$(PACKPS_XE): $(GLSRC)pack_ps.c $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(PACKPS_XE) $(GLSRC)pack_ps.c $(AUXEXTRALIBS)
+-
+-# On the RS/6000 (at least), compiling genarch.c with gcc with -O
+-# produces a buggy executable.
+-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
+-
+-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
+-
+-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
+-
+-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
+-
+-# To get GS to use the system zlib, you remove/hide the gs/zlib directory
+-# which means that the mkromfs build can't find the zlib source it needs.
+-# So it's split into two targets, one using the zlib source directly.....
+-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
+-
+-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
+-
+-# .... and one using the zlib library linked via the command line
+-MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
+- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
+-
+-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
+-
+-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
+-
+ # Query the environment to construct gconfig_.h.
+ # These are all defined conditionally (except the JasPER one), so that
+ # they can be overridden by settings from the configure script.
+--
+1.8.3.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch
deleted file mode 100644
index 9158117d01..0000000000
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-ghostscript-native:fix disable-system-libtiff
-
-Modify configure to add the check to make sure
-ghostscrip could work while system-libtiff is
-disabled.
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Upstream-Status: Pending
----
- configure.ac | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -1055,6 +1055,7 @@ Disabling tiff output devices.])
- esac
-
- if test $SHARE_LIBTIFF -eq 0; then
-+ if test -e $LIBTIFFDIR/configure; then
- echo
- echo "Running libtiff configure script..."
- olddir=`pwd`
-@@ -1069,6 +1070,10 @@ if test $SHARE_LIBTIFF -eq 0; then
- cd "$olddir"
- echo
- echo "Continuing with Ghostscript configuration..."
-+ else
-+ AC_MSG_NOTICE([Could not find local copy of libtiff.
-+Disabling tiff output devices.])
-+ fi
- fi
-
- AC_SUBST(SHARE_LIBTIFF)
---
-1.8.1.2
-
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32eb/objarch.h
index 0d0a16bfa3..0d0a16bfa3 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h
+++ b/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32eb/objarch.h
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32el/objarch.h
index a05de29def..a05de29def 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h
+++ b/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32el/objarch.h
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64eb/objarch.h
index 0d0a16bfa3..0d0a16bfa3 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h
+++ b/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64eb/objarch.h
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64el/objarch.h
index a05de29def..a05de29def 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h
+++ b/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64el/objarch.h
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32eb/objarch.h
index b8b637cca2..b8b637cca2 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h
+++ b/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32eb/objarch.h
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32el/objarch.h
index 29f90ddf85..29f90ddf85 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h
+++ b/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32el/objarch.h
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch
new file mode 100644
index 0000000000..3e6d3e3c48
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch
@@ -0,0 +1,50 @@
+From 2b23026f8e2a352417fb1c4da94bf69b19bef267 Mon Sep 17 00:00:00 2001
+From: Joe Slater <joe.slater@windriver.com>
+Date: Thu, 29 Mar 2018 16:04:32 +0800
+Subject: [PATCH 05/10] ghostscript: allow directories to be created more than
+ once
+
+When doing parallel builds, we might try to create directories
+more than once. This should not cause an error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+Rebase to 9.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/unix-end.mak | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/base/unix-end.mak b/base/unix-end.mak
+index 9ce599a..feff5a6 100644
+--- a/base/unix-end.mak
++++ b/base/unix-end.mak
+@@ -17,15 +17,14 @@
+ UNIX_END_MAK=$(GLSRC)unix-end.mak $(TOP_MAKEFILES)
+ # Define the rule for building standard configurations.
+ directories: $(UNIX_END_MAK)
+- @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir $(BINDIR); fi
+- @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi
+- @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir $(GLOBJDIR); fi
+- @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir $(DEVGENDIR); fi
+- @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir $(DEVOBJDIR); fi
+- @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir $(AUXDIR); fi
+- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR); then mkdir $(PSGENDIR); fi
+- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir $(PSGENDIR)/cups; fi
+- @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir $(PSOBJDIR); fi
++ @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir -p $(BINDIR); fi
++ @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir -p $(GLGENDIR); fi
++ @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir -p $(GLOBJDIR); fi
++ @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir -p $(DEVGENDIR); fi
++ @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir -p $(DEVOBJDIR); fi
++ @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir -p $(AUXDIR); fi
++ @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir -p $(PSGENDIR)/cups; fi
++ @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir -p $(PSOBJDIR); fi
+
+
+ gs: .gssubtarget $(UNIX_END_MAK)
+--
+1.8.3.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch b/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch
deleted file mode 100644
index 8b84986ef2..0000000000
--- a/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-ghostscript: add dependency for pnglibconf.h
-
-When using parallel make jobs, we need to be sure that
-pnglibconf.h is created before we try to reference it,
-so add a rule to png.mak.
-
-Upstream-Status: Pending
-
-Signed-off-by: Joe Slater <jslater@windriver.com>
-
-Rebase to 9.19
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- base/png.mak | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/base/png.mak b/base/png.mak
-index fe5c6e2..8abb53a 100644
---- a/base/png.mak
-+++ b/base/png.mak
-@@ -74,6 +74,8 @@ png.clean-not-config-clean :
-
- pnglibconf_h=$(PNGGENDIR)$(D)pnglibconf.h
-
-+$(MAKEDIRS) : $(pnglibconf_h)
-+
- png.config-clean :
- $(RM_) $(pnglibconf_h)
- $(RM_) $(PNGGEN)lpg*.dev
---
-2.8.1
-
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.19.bb b/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
deleted file mode 100644
index fe2016b15a..0000000000
--- a/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
+++ /dev/null
@@ -1,106 +0,0 @@
-SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
-DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
-a back-end to a program such as ghostview, it can display PostScript and PDF \
-documents in an X11 environment. \
-\
-Furthermore, it can render PostScript and PDF files as graphics to be printed \
-on non-PostScript printers. Supported printers include common \
-dot-matrix, inkjet and laser models. \
-"
-HOMEPAGE = "http://www.ghostscript.com"
-SECTION = "console/utils"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a"
-
-DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng"
-DEPENDS_class-native = "libpng-native"
-
-UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases"
-
-SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs919/${BPN}-${PV}.tar.gz \
- file://ghostscript-9.15-parallel-make.patch \
- file://ghostscript-9.16-Werror-return-type.patch \
- file://png_mak.patch \
- file://do-not-check-local-libpng-source.patch \
-"
-
-SRC_URI = "${SRC_URI_BASE} \
- file://ghostscript-9.02-prevent_recompiling.patch \
- file://ghostscript-9.02-genarch.patch \
- file://objarch.h \
- file://cups-no-gcrypt.patch \
- "
-
-SRC_URI_class-native = "${SRC_URI_BASE} \
- file://ghostscript-native-fix-disable-system-libtiff.patch \
- file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
- "
-
-SRC_URI[md5sum] = "c9682ce6b852f9197c69905a43928907"
-SRC_URI[sha256sum] = "cf3c0dce67db1557a87366969945f9c5235887989c0b585e037af366dc035989"
-
-EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
- --with-fontpath=${datadir}/fonts \
- --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
- --with-cups-datadir=${datadir}/cups \
- "
-
-EXTRA_OECONF_append_mips = " --with-large_color_index=0"
-EXTRA_OECONF_append_mipsel = " --with-large_color_index=0"
-
-# Explicity disable libtiff, fontconfig,
-# freetype, cups for ghostscript-native
-EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
- --without-jbig2dec \
- --with-fontpath=${datadir}/fonts \
- --without-libidn --disable-fontconfig \
- --disable-freetype --disable-cups"
-
-# This has been fixed upstream but for now we need to subvert the check for time.h
-# http://bugs.ghostscript.com/show_bug.cgi?id=692443
-# http://bugs.ghostscript.com/show_bug.cgi?id=692426
-CFLAGS += "-DHAVE_SYS_TIME_H=1"
-BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
-
-inherit autotools
-
-do_configure_prepend () {
- mkdir -p obj
- mkdir -p soobj
- if [ -e ${WORKDIR}/objarch.h ]; then
- cp ${WORKDIR}/objarch.h obj/arch.h
- fi
-}
-
-do_configure_append () {
- # copy tools from the native ghostscript build
- if [ "${PN}" != "ghostscript-native" ]; then
- mkdir -p obj/aux soobj
- for i in genarch genconf mkromfs echogs gendev genht; do
- cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
- done
- fi
-}
-
-do_install_append () {
- mkdir -p ${D}${datadir}/ghostscript/${PV}/
- cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
- cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
-}
-
-do_compile_class-native () {
- mkdir -p obj
- for i in genarch genconf mkromfs echogs gendev genht; do
- oe_runmake obj/aux/$i
- done
-}
-
-do_install_class-native () {
- install -d ${D}${bindir}/ghostscript-${PV}
- for i in genarch genconf mkromfs echogs gendev genht; do
- install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
- done
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.50.bb b/meta/recipes-extended/ghostscript/ghostscript_9.50.bb
new file mode 100644
index 0000000000..39c32644db
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.50.bb
@@ -0,0 +1,129 @@
+SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
+DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
+a back-end to a program such as ghostview, it can display PostScript and PDF \
+documents in an X11 environment. \
+\
+Furthermore, it can render PostScript and PDF files as graphics to be printed \
+on non-PostScript printers. Supported printers include common \
+dot-matrix, inkjet and laser models. \
+"
+HOMEPAGE = "http://www.ghostscript.com"
+SECTION = "console/utils"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=70dc2bac4d0ce4448da873cd86b123fc"
+
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng"
+DEPENDS_class-native = "libpng-native"
+
+UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs950/${BPN}-${PV}.tar.gz \
+ file://ghostscript-9.15-parallel-make.patch \
+ file://ghostscript-9.16-Werror-return-type.patch \
+ file://do-not-check-local-libpng-source.patch \
+ file://avoid-host-contamination.patch \
+ file://mkdir-p.patch \
+ file://CVE-2019-14869-0001.patch \
+"
+
+SRC_URI = "${SRC_URI_BASE} \
+ file://ghostscript-9.21-prevent_recompiling.patch \
+ file://ghostscript-9.02-genarch.patch \
+ file://objarch.h \
+ file://cups-no-gcrypt.patch \
+ "
+
+SRC_URI_class-native = "${SRC_URI_BASE} \
+ file://ghostscript-9.21-native-fix-disable-system-libtiff.patch \
+ file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
+ "
+
+SRC_URI[md5sum] = "00970cf622bd5b46f68eec9383753870"
+SRC_URI[sha256sum] = "0f53e89fd647815828fc5171613e860e8535b68f7afbc91bf89aee886769ce89"
+
+# Put something like
+#
+# PACKAGECONFIG_append_pn-ghostscript = " x11"
+#
+# in local.conf to enable building with X11. Be careful. The order
+# of the overrides matters!
+#
+#PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG_class-native = ""
+
+PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \
+ --without-x, virtual/libx11 libxext libxt gtk+3\
+ "
+
+EXTRA_OECONF = "--without-libpaper --with-system-libtiff --without-jbig2dec \
+ --with-fontpath=${datadir}/fonts \
+ --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
+ --with-cups-datadir=${datadir}/cups \
+ CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \
+ "
+
+EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0"
+
+# Explicity disable libtiff, fontconfig,
+# freetype, cups for ghostscript-native
+EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
+ --without-jbig2dec --without-libpaper \
+ --with-fontpath=${datadir}/fonts \
+ --without-libidn --disable-fontconfig \
+ --disable-freetype --disable-cups"
+
+# This has been fixed upstream but for now we need to subvert the check for time.h
+# http://bugs.ghostscript.com/show_bug.cgi?id=692443
+# http://bugs.ghostscript.com/show_bug.cgi?id=692426
+CFLAGS += "-DHAVE_SYS_TIME_H=1"
+BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
+
+inherit autotools
+
+do_configure_prepend () {
+ mkdir -p obj
+ mkdir -p soobj
+ if [ -e ${WORKDIR}/objarch.h ]; then
+ cp ${WORKDIR}/objarch.h obj/arch.h
+ fi
+}
+
+do_configure_append () {
+ # copy tools from the native ghostscript build
+ if [ "${PN}" != "ghostscript-native" ]; then
+ mkdir -p obj/aux soobj
+ for i in genarch genconf mkromfs echogs gendev genht packps; do
+ cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
+ done
+ fi
+}
+
+do_install_append () {
+ mkdir -p ${D}${datadir}/ghostscript/${PV}/
+ cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
+ cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
+}
+
+do_compile_class-native () {
+ mkdir -p obj
+ for i in genarch genconf mkromfs echogs gendev genht packps; do
+ oe_runmake obj/aux/$i
+ done
+}
+
+do_install_class-native () {
+ install -d ${D}${bindir}/ghostscript-${PV}
+ for i in genarch genconf mkromfs echogs gendev genht packps; do
+ install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
+ done
+}
+
+BBCLASSEXTEND = "native"
+
+# ghostscript does not supports "arc"
+COMPATIBLE_HOST = "^(?!arc).*"
+
+# some entries in NVD uses gpl_ghostscript
+CVE_PRODUCT = "ghostscript gpl_ghostscript"
diff --git a/meta/recipes-extended/go-examples/go-helloworld_0.1.bb b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
new file mode 100644
index 0000000000..ab70ea98a3
--- /dev/null
+++ b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "This is a simple example recipe that cross-compiles a Go program."
+SECTION = "examples"
+HOMEPAGE = "https://golang.org/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "git://${GO_IMPORT}"
+SRCREV = "46695d81d1fae905a270fb7db8a4d11a334562fe"
+UPSTREAM_CHECK_COMMITS = "1"
+
+GO_IMPORT = "github.com/golang/example"
+GO_INSTALL = "${GO_IMPORT}/hello"
+
+inherit go
+
+# This is just to make clear where this example is
+do_install_append() {
+ mv ${D}${bindir}/hello ${D}${bindir}/${BPN}
+}
diff --git a/meta/recipes-extended/gperf/gperf.inc b/meta/recipes-extended/gperf/gperf.inc
deleted file mode 100644
index a8ce230f65..0000000000
--- a/meta/recipes-extended/gperf/gperf.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "GNU gperf is a perfect hash function generator"
-HOMEPAGE = "http://www.gnu.org/software/gperf"
-SUMMARY = "Generate a perfect hash function from a set of keywords"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
-
-SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz"
-
-inherit autotools
-
-# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of
-# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal
-EXTRA_AUTORECONF += " -I ${S}"
-
-do_configure_prepend() {
- if [ ! -e ${S}/acinclude.m4 ]; then
- cat ${S}/aclocal.m4 > ${S}/acinclude.m4
- fi
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gperf/gperf_3.0.3.bb b/meta/recipes-extended/gperf/gperf_3.0.3.bb
deleted file mode 100644
index 772886121b..0000000000
--- a/meta/recipes-extended/gperf/gperf_3.0.3.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require gperf.inc
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \
- file://src/main.cc;beginline=8;endline=19;md5=72a3034a19e72f08ee48ef8244a121fd"
-
-PR = "r1"
-
-SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00"
-SRC_URI[sha256sum] = "63287527c8d9e27e801cf0804436f3494bd569db05d49dcdd2a942ae72fa9055"
diff --git a/meta/recipes-extended/gperf/gperf_3.0.4.bb b/meta/recipes-extended/gperf/gperf_3.0.4.bb
deleted file mode 100644
index 64003fc0bb..0000000000
--- a/meta/recipes-extended/gperf/gperf_3.0.4.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require gperf.inc
-
-
-SRC_URI[md5sum] = "c1f1db32fb6598d6a93e6e88796a8632"
-SRC_URI[sha256sum] = "767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e"
diff --git a/meta/recipes-extended/gperf/gperf_3.1.bb b/meta/recipes-extended/gperf/gperf_3.1.bb
new file mode 100644
index 0000000000..f61b2a329a
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf_3.1.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "GNU gperf is a perfect hash function generator"
+HOMEPAGE = "http://www.gnu.org/software/gperf"
+SUMMARY = "Generate a perfect hash function from a set of keywords"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
+SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e"
+SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2"
+
+inherit autotools
+
+# The nested configures don't find the parent aclocal.m4 out of the box, so tell
+# it where to look explicitly (mirroring the behaviour of upstream's Makefile.devel).
+EXTRA_AUTORECONF += " -I ${S} --exclude=aclocal"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/Makevars b/meta/recipes-extended/grep/grep-2.5.1a/Makevars
deleted file mode 100644
index 8b09f53b0f..0000000000
--- a/meta/recipes-extended/grep/grep-2.5.1a/Makevars
+++ /dev/null
@@ -1,25 +0,0 @@
-# Makefile variables for PO directory in any package using GNU gettext.
-
-# Usually the message domain is the same as the package name.
-DOMAIN = $(PACKAGE)
-
-# These two variables depend on the location of this directory.
-subdir = po
-top_builddir = ..
-
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
-
-# This is the copyright holder that gets inserted into the header of the
-# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
-# package. (Note that the msgstr strings, extracted from the package's
-# sources, belong to the copyright holder of the package.) Translators are
-# expected to transfer the copyright for their translations to this person
-# or entity, or to disclaim their copyright. The empty string stands for
-# the public domain; in this case the translators are expected to disclaim
-# their copyright.
-COPYRIGHT_HOLDER = Free Software Foundation, Inc.
-
-# This is the list of locale categories, beyond LC_MESSAGES, for which the
-# message catalogs shall be used. It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
deleted file mode 100644
index ce595099f4..0000000000
--- a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Inappropriate [Poky Specific this is gplv2 version]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: grep-2.5.1a/doc/grep.texi
-===================================================================
---- grep-2.5.1a.orig/doc/grep.texi
-+++ grep-2.5.1a/doc/grep.texi
-@@ -288,7 +288,7 @@ This version number should be included i
- Print a usage message briefly summarizing these command-line options
- and the bug-reporting address, then exit.
-
--@itemx --binary-files=@var{type}
-+@item --binary-files=@var{type}
- @opindex --binary-files
- @cindex binary files
- If the first few bytes of a file indicate that the file contains binary
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
deleted file mode 100644
index 3b91520fb2..0000000000
--- a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure
-Upstream-Status: Inappropriate [ old version that will not be maintained ]
-Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com>
-
-diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c
---- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200
-+++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200
-@@ -38,9 +38,7 @@
- # endif
- #endif
-
--#if HAVE_LOCALE_H
- # include <locale.h>
--#endif
-
- #if HAVE_STRING_H
- # include <string.h>
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch
deleted file mode 100644
index 57463355a7..0000000000
--- a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Enable operation with later versions of gettext.
-
-Upstream-Status: Inappropriate
-RP 2012/10/19
-
-Index: grep-2.5.1a/configure.in
-===================================================================
---- grep-2.5.1a.orig/configure.in 2012-10-19 12:57:51.646970204 +0000
-+++ grep-2.5.1a/configure.in 2012-10-19 12:59:49.946968803 +0000
-@@ -140,4 +140,4 @@
- AC_CHECK_LIB(pcre, pcre_exec)
- fi
-
--AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; echo timestamp > stamp-h])
-+AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [echo timestamp > stamp-h])
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
deleted file mode 100644
index a40a9f30bc..0000000000
--- a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-The patch to fix CVE-2012-5667
-Reference: https://bugzilla.redhat.com/attachment.cgi?id=686605&action=diff
-
-Multiple integer overflows in GNU Grep before 2.11 might allow
-context-dependent attackers to execute arbitrary code via vectors
-involving a long input line that triggers a heap-based buffer overflow.
-
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5667
-
-Upstream-Status: Inappropriate [other]
-This version of GNU Grep has been abandoned upstream and they are no longer
-accepting patches. This is not a backport.
-CVE: CVE-2012-5667
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
----
- grep.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
---- a/src/grep.c 2013-05-15 13:39:33.359191769 +0800
-+++ a/src/grep.c 2013-05-15 13:50:22.609191882 +0800
-@@ -306,6 +306,11 @@ fillbuf (size_t save, struct stats const
- int cc = 1;
- char *readbuf;
- size_t readsize;
-+ const size_t max_save = INT_MAX / 2;
-+
-+ /* Limit the amount of saved data to INT_MAX to fix CVE-2012-5667 */
-+ if (save > max_save)
-+ error (2, 0, _("line too long"));
-
- /* Offset from start of buffer to start of old stuff
- that we want to save. */
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch
deleted file mode 100644
index 327ee56402..0000000000
--- a/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch
+++ /dev/null
@@ -1,1342 +0,0 @@
-From c884dd12ec062569335702848fc5f29f436c28fa Mon Sep 17 00:00:00 2001
-From: Li xin <lixin.fnst@cn.fujitsu.com>
-Date: Mon, 25 May 2015 10:15:57 +0900
-Subject: [PATCH] grep egrep fgrep: Fix LSB NG cases.
-
-The LSB core test requires grep egrep and fgrep can
-perform pattern matching in searches without regard
-to case if -i option is specified.
-
-Upstream-Status: backport.
-
-Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
----
- lib/posix/regex.h | 4 +
- src/dfa.c | 22 +-
- src/grep.c | 96 ++++---
- src/search.c | 833 +++++++++++++++++++++++++++++++++++++++++++++---------
- 4 files changed, 768 insertions(+), 187 deletions(-)
-
-diff --git a/lib/posix/regex.h b/lib/posix/regex.h
-index 63c2fef..7bb2b0e 100644
---- a/lib/posix/regex.h
-+++ b/lib/posix/regex.h
-@@ -109,6 +109,10 @@ typedef unsigned long int reg_syntax_t;
- If not set, \{, \}, {, and } are literals. */
- #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
-
-+/* If this bit is set, then ignore case when matching.
-+ If not set, then case is significant. */
-+#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
-+
- /* If this bit is set, +, ? and | aren't recognized as operators.
- If not set, they are. */
- #define RE_LIMITED_OPS (RE_INTERVALS << 1)
-diff --git a/src/dfa.c b/src/dfa.c
-index 590bfa7..27c876a 100644
---- a/src/dfa.c
-+++ b/src/dfa.c
-@@ -414,7 +414,7 @@ update_mb_len_index (unsigned char const *p, int len)
-
- /* This function fetch a wide character, and update cur_mb_len,
- used only if the current locale is a multibyte environment. */
--static wchar_t
-+static wint_t
- fetch_wc (char const *eoferr)
- {
- wchar_t wc;
-@@ -423,7 +423,7 @@ fetch_wc (char const *eoferr)
- if (eoferr != 0)
- dfaerror (eoferr);
- else
-- return -1;
-+ return WEOF;
- }
-
- cur_mb_len = mbrtowc(&wc, lexptr, lexleft, &mbs);
-@@ -459,7 +459,7 @@ fetch_wc (char const *eoferr)
- static void
- parse_bracket_exp_mb ()
- {
-- wchar_t wc, wc1, wc2;
-+ wint_t wc, wc1, wc2;
-
- /* Work area to build a mb_char_classes. */
- struct mb_char_classes *work_mbc;
-@@ -496,7 +496,7 @@ parse_bracket_exp_mb ()
- work_mbc->invert = 0;
- do
- {
-- wc1 = -1; /* mark wc1 is not initialized". */
-+ wc1 = WEOF; /* mark wc1 is not initialized". */
-
- /* Note that if we're looking at some other [:...:] construct,
- we just treat it as a bunch of ordinary characters. We can do
-@@ -586,7 +586,7 @@ parse_bracket_exp_mb ()
- work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem;
- }
- }
-- wc = -1;
-+ wc1 = wc = WEOF;
- }
- else
- /* We treat '[' as a normal character here. */
-@@ -600,7 +600,7 @@ parse_bracket_exp_mb ()
- wc = fetch_wc(("Unbalanced ["));
- }
-
-- if (wc1 == -1)
-+ if (wc1 == WEOF)
- wc1 = fetch_wc(_("Unbalanced ["));
-
- if (wc1 == L'-')
-@@ -630,17 +630,17 @@ parse_bracket_exp_mb ()
- }
- REALLOC_IF_NECESSARY(work_mbc->range_sts, wchar_t,
- range_sts_al, work_mbc->nranges + 1);
-- work_mbc->range_sts[work_mbc->nranges] = wc;
-+ work_mbc->range_sts[work_mbc->nranges] = (wchar_t)wc;
- REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t,
- range_ends_al, work_mbc->nranges + 1);
-- work_mbc->range_ends[work_mbc->nranges++] = wc2;
-+ work_mbc->range_ends[work_mbc->nranges++] = (wchar_t)wc2;
- }
-- else if (wc != -1)
-+ else if (wc != WEOF)
- /* build normal characters. */
- {
- REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al,
- work_mbc->nchars + 1);
-- work_mbc->chars[work_mbc->nchars++] = wc;
-+ work_mbc->chars[work_mbc->nchars++] = (wchar_t)wc;
- }
- }
- while ((wc = wc1) != L']');
-@@ -2552,6 +2552,8 @@ match_mb_charset (struct dfa *d, int s, position pos, int index)
- }
-
- /* match with a character? */
-+ if (case_fold)
-+ wc = towlower (wc);
- for (i = 0; i<work_mbc->nchars; i++)
- {
- if (wc == work_mbc->chars[i])
-diff --git a/src/grep.c b/src/grep.c
-index 2fb2fac..3fd4b47 100644
---- a/src/grep.c
-+++ b/src/grep.c
-@@ -30,6 +30,12 @@
- # include <sys/time.h>
- # include <sys/resource.h>
- #endif
-+#if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC
-+/* We can handle multibyte string. */
-+# define MBS_SUPPORT
-+# include <wchar.h>
-+# include <wctype.h>
-+#endif
- #include <stdio.h>
- #include "system.h"
- #include "getopt.h"
-@@ -255,19 +261,6 @@ reset (int fd, char const *file, struct stats *stats)
- bufbeg[-1] = eolbyte;
- bufdesc = fd;
-
-- if (fstat (fd, &stats->stat) != 0)
-- {
-- error (0, errno, "fstat");
-- return 0;
-- }
-- if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
-- return 0;
--#ifndef DJGPP
-- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode)))
--#else
-- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode)))
--#endif
-- return 0;
- if (S_ISREG (stats->stat.st_mode))
- {
- if (file)
-@@ -558,33 +551,6 @@ prline (char const *beg, char const *lim, int sep)
- {
- size_t match_size;
- size_t match_offset;
-- if(match_icase)
-- {
-- /* Yuck, this is tricky */
-- char *buf = (char*) xmalloc (lim - beg);
-- char *ibeg = buf;
-- char *ilim = ibeg + (lim - beg);
-- int i;
-- for (i = 0; i < lim - beg; i++)
-- ibeg[i] = tolower (beg[i]);
-- while ((match_offset = (*execute) (ibeg, ilim-ibeg, &match_size, 1))
-- != (size_t) -1)
-- {
-- char const *b = beg + match_offset;
-- if (b == lim)
-- break;
-- fwrite (beg, sizeof (char), match_offset, stdout);
-- printf ("\33[%sm", grep_color);
-- fwrite (b, sizeof (char), match_size, stdout);
-- fputs ("\33[00m", stdout);
-- beg = b + match_size;
-- ibeg = ibeg + match_offset + match_size;
-- }
-- fwrite (beg, 1, lim - beg, stdout);
-- free (buf);
-- lastout = lim;
-- return;
-- }
- while (lim-beg && (match_offset = (*execute) (beg, lim - beg, &match_size, 1))
- != (size_t) -1)
- {
-@@ -601,6 +567,7 @@ prline (char const *beg, char const *lim, int sep)
- fputs ("\33[00m", stdout);
- beg = b + match_size;
- }
-+ fputs ("\33[K", stdout);
- }
- fwrite (beg, 1, lim - beg, stdout);
- if (ferror (stdout))
-@@ -623,7 +590,7 @@ prpending (char const *lim)
- size_t match_size;
- --pending;
- if (outleft
-- || (((*execute) (lastout, nl - lastout, &match_size, 0) == (size_t) -1)
-+ || (((*execute) (lastout, nl + 1 - lastout, &match_size, 0) == (size_t) -1)
- == !out_invert))
- prline (lastout, nl + 1, '-');
- else
-@@ -895,6 +862,19 @@ grepfile (char const *file, struct stats *stats)
- }
- else
- {
-+ if (stat (file, &stats->stat) != 0)
-+ {
-+ suppressible_error (file, errno);
-+ return 1;
-+ }
-+ if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
-+ return 1;
-+#ifndef DJGPP
-+ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode)))
-+#else
-+ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode)))
-+#endif
-+ return 1;
- while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR)
- continue;
-
-@@ -1681,9 +1661,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"))
- out_invert ^= 1;
- match_lines = match_words = 0;
- }
-- else
-- /* Strip trailing newline. */
-- --keycc;
- }
- else
- if (optind < argc)
-@@ -1697,6 +1674,37 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"))
- if (!install_matcher (matcher) && !install_matcher ("default"))
- abort ();
-
-+#ifdef MBS_SUPPORT
-+ if (MB_CUR_MAX != 1 && match_icase)
-+ {
-+ wchar_t wc;
-+ mbstate_t cur_state, prev_state;
-+ int i, len = strlen(keys);
-+
-+ memset(&cur_state, 0, sizeof(mbstate_t));
-+ for (i = 0; i <= len ;)
-+ {
-+ size_t mbclen;
-+ mbclen = mbrtowc(&wc, keys + i, len - i, &cur_state);
-+ if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0)
-+ {
-+ /* An invalid sequence, or a truncated multibyte character.
-+ We treat it as a singlebyte character. */
-+ mbclen = 1;
-+ }
-+ else
-+ {
-+ if (iswupper((wint_t)wc))
-+ {
-+ wc = towlower((wint_t)wc);
-+ wcrtomb(keys + i, wc, &cur_state);
-+ }
-+ }
-+ i += mbclen;
-+ }
-+ }
-+#endif /* MBS_SUPPORT */
-+
- (*compile)(keys, keycc);
-
- if ((argc - optind > 1 && !no_filenames) || with_filenames)
-diff --git a/src/search.c b/src/search.c
-index 7bd233f..3c6a485 100644
---- a/src/search.c
-+++ b/src/search.c
-@@ -18,9 +18,13 @@
-
- /* Written August 1992 by Mike Haertel. */
-
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-+#include <assert.h>
- #include <sys/types.h>
- #if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC
- /* We can handle multibyte string. */
-@@ -31,7 +35,7 @@
-
- #include "system.h"
- #include "grep.h"
--#include "regex.h"
-+#include <regex.h>
- #include "dfa.h"
- #include "kwset.h"
- #include "error.h"
-@@ -39,6 +43,9 @@
- #ifdef HAVE_LIBPCRE
- # include <pcre.h>
- #endif
-+#ifdef HAVE_LANGINFO_CODESET
-+# include <langinfo.h>
-+#endif
-
- #define NCHAR (UCHAR_MAX + 1)
-
-@@ -70,9 +77,10 @@ static kwset_t kwset;
- call the regexp matcher at all. */
- static int kwset_exact_matches;
-
--#if defined(MBS_SUPPORT)
--static char* check_multibyte_string PARAMS ((char const *buf, size_t size));
--#endif
-+/* UTF-8 encoding allows some optimizations that we can't otherwise
-+ assume in a multibyte encoding. */
-+static int using_utf8;
-+
- static void kwsinit PARAMS ((void));
- static void kwsmusts PARAMS ((void));
- static void Gcompile PARAMS ((char const *, size_t));
-@@ -84,6 +92,15 @@ static void Pcompile PARAMS ((char const *, size_t ));
- static size_t Pexecute PARAMS ((char const *, size_t, size_t *, int));
-
- void
-+check_utf8 (void)
-+{
-+#ifdef HAVE_LANGINFO_CODESET
-+ if (strcmp (nl_langinfo (CODESET), "UTF-8") == 0)
-+ using_utf8 = 1;
-+#endif
-+}
-+
-+void
- dfaerror (char const *mesg)
- {
- error (2, 0, mesg);
-@@ -141,38 +158,6 @@ kwsmusts (void)
- }
- }
-
--#ifdef MBS_SUPPORT
--/* This function allocate the array which correspond to "buf".
-- Then this check multibyte string and mark on the positions which
-- are not singlebyte character nor the first byte of a multibyte
-- character. Caller must free the array. */
--static char*
--check_multibyte_string(char const *buf, size_t size)
--{
-- char *mb_properties = malloc(size);
-- mbstate_t cur_state;
-- int i;
-- memset(&cur_state, 0, sizeof(mbstate_t));
-- memset(mb_properties, 0, sizeof(char)*size);
-- for (i = 0; i < size ;)
-- {
-- size_t mbclen;
-- mbclen = mbrlen(buf + i, size - i, &cur_state);
--
-- if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0)
-- {
-- /* An invalid sequence, or a truncated multibyte character.
-- We treat it as a singlebyte character. */
-- mbclen = 1;
-- }
-- mb_properties[i] = mbclen;
-- i += mbclen;
-- }
--
-- return mb_properties;
--}
--#endif
--
- static void
- Gcompile (char const *pattern, size_t size)
- {
-@@ -181,7 +166,8 @@ Gcompile (char const *pattern, size_t size)
- size_t total = size;
- char const *motif = pattern;
-
-- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE);
-+ check_utf8 ();
-+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0));
- dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte);
-
- /* For GNU regex compiler we have to pass the patterns separately to detect
-@@ -218,6 +204,10 @@ Gcompile (char const *pattern, size_t size)
- motif = sep;
- } while (sep && total != 0);
-
-+ /* Strip trailing newline. */
-+ if (size && pattern[size - 1] == '\n')
-+ size--;
-+
- /* In the match_words and match_lines cases, we use a different pattern
- for the DFA matcher that will quickly throw out cases that won't work.
- Then if DFA succeeds we do some hairy stuff using the regex matcher
-@@ -233,7 +223,7 @@ Gcompile (char const *pattern, size_t size)
- static char const line_end[] = "\\)$";
- static char const word_beg[] = "\\(^\\|[^[:alnum:]_]\\)\\(";
- static char const word_end[] = "\\)\\([^[:alnum:]_]\\|$\\)";
-- char *n = malloc (sizeof word_beg - 1 + size + sizeof word_end);
-+ char *n = xmalloc (sizeof word_beg - 1 + size + sizeof word_end);
- size_t i;
- strcpy (n, match_lines ? line_beg : word_beg);
- i = strlen (n);
-@@ -257,14 +247,15 @@ Ecompile (char const *pattern, size_t size)
- size_t total = size;
- char const *motif = pattern;
-
-+ check_utf8 ();
- if (strcmp (matcher, "awk") == 0)
- {
-- re_set_syntax (RE_SYNTAX_AWK);
-+ re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0));
- dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte);
- }
- else
- {
-- re_set_syntax (RE_SYNTAX_POSIX_EGREP);
-+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | (match_icase ? RE_ICASE : 0));
- dfasyntax (RE_SYNTAX_POSIX_EGREP, match_icase, eolbyte);
- }
-
-@@ -301,6 +292,10 @@ Ecompile (char const *pattern, size_t size)
- motif = sep;
- } while (sep && total != 0);
-
-+ /* Strip trailing newline. */
-+ if (size && pattern[size - 1] == '\n')
-+ size--;
-+
- /* In the match_words and match_lines cases, we use a different pattern
- for the DFA matcher that will quickly throw out cases that won't work.
- Then if DFA succeeds we do some hairy stuff using the regex matcher
-@@ -316,7 +311,7 @@ Ecompile (char const *pattern, size_t size)
- static char const line_end[] = ")$";
- static char const word_beg[] = "(^|[^[:alnum:]_])(";
- static char const word_end[] = ")([^[:alnum:]_]|$)";
-- char *n = malloc (sizeof word_beg - 1 + size + sizeof word_end);
-+ char *n = xmalloc (sizeof word_beg - 1 + size + sizeof word_end);
- size_t i;
- strcpy (n, match_lines ? line_beg : word_beg);
- i = strlen(n);
-@@ -339,15 +334,34 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
- char eol = eolbyte;
- int backref, start, len;
- struct kwsmatch kwsm;
-- size_t i;
-+ size_t i, ret_val;
-+ static int use_dfa;
-+ static int use_dfa_checked = 0;
- #ifdef MBS_SUPPORT
-- char *mb_properties = NULL;
-+ int mb_cur_max = MB_CUR_MAX;
-+ mbstate_t mbs;
-+ memset (&mbs, '\0', sizeof (mbstate_t));
- #endif /* MBS_SUPPORT */
-
-+ if (!use_dfa_checked)
-+ {
-+ char *grep_use_dfa = getenv ("GREP_USE_DFA");
-+ if (!grep_use_dfa)
-+ {
- #ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1 && kwset)
-- mb_properties = check_multibyte_string(buf, size);
-+ /* Turn off DFA when processing multibyte input. */
-+ use_dfa = (MB_CUR_MAX == 1);
-+#else
-+ use_dfa = 1;
- #endif /* MBS_SUPPORT */
-+ }
-+ else
-+ {
-+ use_dfa = atoi (grep_use_dfa);
-+ }
-+
-+ use_dfa_checked = 1;
-+ }
-
- buflim = buf + size;
-
-@@ -358,47 +372,120 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
- if (kwset)
- {
- /* Find a possible match using the KWset matcher. */
-- size_t offset = kwsexec (kwset, beg, buflim - beg, &kwsm);
-+#ifdef MBS_SUPPORT
-+ size_t bytes_left = 0;
-+#endif /* MBS_SUPPORT */
-+ size_t offset;
-+#ifdef MBS_SUPPORT
-+ /* kwsexec doesn't work with match_icase and multibyte input. */
-+ if (match_icase && mb_cur_max > 1)
-+ /* Avoid kwset */
-+ offset = 0;
-+ else
-+#endif /* MBS_SUPPORT */
-+ offset = kwsexec (kwset, beg, buflim - beg, &kwsm);
- if (offset == (size_t) -1)
-- {
-+ goto failure;
- #ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1)
-- free(mb_properties);
--#endif
-- return (size_t)-1;
-+ if (mb_cur_max > 1 && !using_utf8)
-+ {
-+ bytes_left = offset;
-+ while (bytes_left)
-+ {
-+ size_t mlen = mbrlen (beg, bytes_left, &mbs);
-+ if (mlen == (size_t) -1 || mlen == 0)
-+ {
-+ /* Incomplete character: treat as single-byte. */
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ beg++;
-+ bytes_left--;
-+ continue;
-+ }
-+
-+ if (mlen == (size_t) -2)
-+ /* Offset points inside multibyte character:
-+ * no good. */
-+ break;
-+
-+ beg += mlen;
-+ bytes_left -= mlen;
-+ }
- }
-+ else
-+#endif /* MBS_SUPPORT */
- beg += offset;
- /* Narrow down to the line containing the candidate, and
- run it through DFA. */
- end = memchr(beg, eol, buflim - beg);
- end++;
- #ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1 && mb_properties[beg - buf] == 0)
-+ if (mb_cur_max > 1 && bytes_left)
- continue;
--#endif
-+#endif /* MBS_SUPPORT */
- while (beg > buf && beg[-1] != eol)
- --beg;
-- if (kwsm.index < kwset_exact_matches)
-- goto success;
-- if (dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1)
-+ if (
-+#ifdef MBS_SUPPORT
-+ !(match_icase && mb_cur_max > 1) &&
-+#endif /* MBS_SUPPORT */
-+ (kwsm.index < kwset_exact_matches))
-+ goto success_in_beg_and_end;
-+ if (use_dfa &&
-+ dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1)
- continue;
- }
- else
- {
- /* No good fixed strings; start with DFA. */
-- size_t offset = dfaexec (&dfa, beg, buflim - beg, &backref);
-+#ifdef MBS_SUPPORT
-+ size_t bytes_left = 0;
-+#endif /* MBS_SUPPORT */
-+ size_t offset = 0;
-+ if (use_dfa)
-+ offset = dfaexec (&dfa, beg, buflim - beg, &backref);
- if (offset == (size_t) -1)
- break;
- /* Narrow down to the line we've found. */
-+#ifdef MBS_SUPPORT
-+ if (mb_cur_max > 1 && !using_utf8)
-+ {
-+ bytes_left = offset;
-+ while (bytes_left)
-+ {
-+ size_t mlen = mbrlen (beg, bytes_left, &mbs);
-+ if (mlen == (size_t) -1 || mlen == 0)
-+ {
-+ /* Incomplete character: treat as single-byte. */
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ beg++;
-+ bytes_left--;
-+ continue;
-+ }
-+
-+ if (mlen == (size_t) -2)
-+ /* Offset points inside multibyte character:
-+ * no good. */
-+ break;
-+
-+ beg += mlen;
-+ bytes_left -= mlen;
-+ }
-+ }
-+ else
-+#endif /* MBS_SUPPORT */
- beg += offset;
- end = memchr (beg, eol, buflim - beg);
- end++;
-+#ifdef MBS_SUPPORT
-+ if (mb_cur_max > 1 && bytes_left)
-+ continue;
-+#endif /* MBS_SUPPORT */
- while (beg > buf && beg[-1] != eol)
- --beg;
- }
- /* Successful, no backreferences encountered! */
-- if (!backref)
-- goto success;
-+ if (use_dfa && !backref)
-+ goto success_in_beg_and_end;
- }
- else
- end = beg + size;
-@@ -413,14 +500,11 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
- end - beg - 1, &(patterns[i].regs))))
- {
- len = patterns[i].regs.end[0] - start;
-- if (exact)
-- {
-- *match_size = len;
-- return start;
-- }
-+ if (exact && !match_words)
-+ goto success_in_start_and_len;
- if ((!match_lines && !match_words)
- || (match_lines && len == end - beg - 1))
-- goto success;
-+ goto success_in_beg_and_end;
- /* If -w, check if the match aligns with word boundaries.
- We do this iteratively because:
- (a) the line may contain more than one occurence of the
-@@ -431,10 +515,114 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
- if (match_words)
- while (start >= 0)
- {
-- if ((start == 0 || !WCHAR ((unsigned char) beg[start - 1]))
-- && (len == end - beg - 1
-- || !WCHAR ((unsigned char) beg[start + len])))
-- goto success;
-+ int lword_match = 0;
-+ if (start == 0)
-+ lword_match = 1;
-+ else
-+ {
-+ assert (start > 0);
-+#ifdef MBS_SUPPORT
-+ if (mb_cur_max > 1)
-+ {
-+ const char *s;
-+ size_t mr;
-+ wchar_t pwc;
-+
-+ /* Locate the start of the multibyte character
-+ before the match position (== beg + start). */
-+ if (using_utf8)
-+ {
-+ /* UTF-8 is a special case: scan backwards
-+ until we find a 7-bit character or a
-+ lead byte. */
-+ s = beg + start - 1;
-+ while (s > buf
-+ && (unsigned char) *s >= 0x80
-+ && (unsigned char) *s <= 0xbf)
-+ --s;
-+ }
-+ else
-+ {
-+ /* Scan forwards to find the start of the
-+ last complete character before the
-+ match position. */
-+ size_t bytes_left = start - 1;
-+ s = beg;
-+ while (bytes_left > 0)
-+ {
-+ mr = mbrlen (s, bytes_left, &mbs);
-+ if (mr == (size_t) -1 || mr == 0)
-+ {
-+ memset (&mbs, '\0', sizeof (mbs));
-+ s++;
-+ bytes_left--;
-+ continue;
-+ }
-+ if (mr == (size_t) -2)
-+ {
-+ memset (&mbs, '\0', sizeof (mbs));
-+ break;
-+ }
-+ s += mr;
-+ bytes_left -= mr;
-+ }
-+ }
-+ mr = mbrtowc (&pwc, s, beg + start - s, &mbs);
-+ if (mr == (size_t) -2 || mr == (size_t) -1 ||
-+ mr == 0)
-+ {
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ lword_match = 1;
-+ }
-+ else if (!(iswalnum (pwc) || pwc == L'_')
-+ && mr == beg + start - s)
-+ lword_match = 1;
-+ }
-+ else
-+#endif /* MBS_SUPPORT */
-+ if (!WCHAR ((unsigned char) beg[start - 1]))
-+ lword_match = 1;
-+ }
-+
-+ if (lword_match)
-+ {
-+ int rword_match = 0;
-+ if (start + len == end - beg - 1)
-+ rword_match = 1;
-+ else
-+ {
-+#ifdef MBS_SUPPORT
-+ if (mb_cur_max > 1)
-+ {
-+ wchar_t nwc;
-+ int mr;
-+
-+ mr = mbtowc (&nwc, beg + start + len,
-+ end - beg - start - len - 1);
-+ if (mr <= 0)
-+ {
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ rword_match = 1;
-+ }
-+ else if (!iswalnum (nwc) && nwc != L'_')
-+ rword_match = 1;
-+ }
-+ else
-+#endif /* MBS_SUPPORT */
-+ if (!WCHAR ((unsigned char) beg[start + len]))
-+ rword_match = 1;
-+ }
-+
-+ if (rword_match)
-+ {
-+ if (!exact)
-+ /* Returns the whole line. */
-+ goto success_in_beg_and_end;
-+ else
-+ /* Returns just this word match. */
-+ goto success_in_start_and_len;
-+ }
-+ }
- if (len > 0)
- {
- /* Try a shorter length anchored at the same place. */
-@@ -461,26 +649,154 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
- }
- } /* for Regex patterns. */
- } /* for (beg = end ..) */
--#ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1 && mb_properties)
-- free (mb_properties);
--#endif /* MBS_SUPPORT */
-+
-+ failure:
- return (size_t) -1;
-
-- success:
--#ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1 && mb_properties)
-- free (mb_properties);
--#endif /* MBS_SUPPORT */
-- *match_size = end - beg;
-- return beg - buf;
-+ success_in_beg_and_end:
-+ len = end - beg;
-+ start = beg - buf;
-+ /* FALLTHROUGH */
-+
-+ success_in_start_and_len:
-+ *match_size = len;
-+ return start;
- }
-
-+#ifdef MBS_SUPPORT
-+static int f_i_multibyte; /* whether we're using the new -Fi MB method */
-+static struct
-+{
-+ wchar_t **patterns;
-+ size_t count, maxlen;
-+ unsigned char *match;
-+} Fimb;
-+#endif
-+
- static void
- Fcompile (char const *pattern, size_t size)
- {
-+ int mb_cur_max = MB_CUR_MAX;
- char const *beg, *lim, *err;
-
-+ check_utf8 ();
-+#ifdef MBS_SUPPORT
-+ /* Support -F -i for UTF-8 input. */
-+ if (match_icase && mb_cur_max > 1)
-+ {
-+ mbstate_t mbs;
-+ wchar_t *wcpattern = xmalloc ((size + 1) * sizeof (wchar_t));
-+ const char *patternend = pattern;
-+ size_t wcsize;
-+ kwset_t fimb_kwset = NULL;
-+ char *starts = NULL;
-+ wchar_t *wcbeg, *wclim;
-+ size_t allocated = 0;
-+
-+ memset (&mbs, '\0', sizeof (mbs));
-+# ifdef __GNU_LIBRARY__
-+ wcsize = mbsnrtowcs (wcpattern, &patternend, size, size, &mbs);
-+ if (patternend != pattern + size)
-+ wcsize = (size_t) -1;
-+# else
-+ {
-+ char *patterncopy = xmalloc (size + 1);
-+
-+ memcpy (patterncopy, pattern, size);
-+ patterncopy[size] = '\0';
-+ patternend = patterncopy;
-+ wcsize = mbsrtowcs (wcpattern, &patternend, size, &mbs);
-+ if (patternend != patterncopy + size)
-+ wcsize = (size_t) -1;
-+ free (patterncopy);
-+ }
-+# endif
-+ if (wcsize + 2 <= 2)
-+ {
-+fimb_fail:
-+ free (wcpattern);
-+ free (starts);
-+ if (fimb_kwset)
-+ kwsfree (fimb_kwset);
-+ free (Fimb.patterns);
-+ Fimb.patterns = NULL;
-+ }
-+ else
-+ {
-+ if (!(fimb_kwset = kwsalloc (NULL)))
-+ error (2, 0, _("memory exhausted"));
-+
-+ starts = xmalloc (mb_cur_max * 3);
-+ wcbeg = wcpattern;
-+ do
-+ {
-+ int i;
-+ size_t wclen;
-+
-+ if (Fimb.count >= allocated)
-+ {
-+ if (allocated == 0)
-+ allocated = 128;
-+ else
-+ allocated *= 2;
-+ Fimb.patterns = xrealloc (Fimb.patterns,
-+ sizeof (wchar_t *) * allocated);
-+ }
-+ Fimb.patterns[Fimb.count++] = wcbeg;
-+ for (wclim = wcbeg;
-+ wclim < wcpattern + wcsize && *wclim != L'\n'; ++wclim)
-+ *wclim = towlower (*wclim);
-+ *wclim = L'\0';
-+ wclen = wclim - wcbeg;
-+ if (wclen > Fimb.maxlen)
-+ Fimb.maxlen = wclen;
-+ if (wclen > 3)
-+ wclen = 3;
-+ if (wclen == 0)
-+ {
-+ if ((err = kwsincr (fimb_kwset, "", 0)) != 0)
-+ error (2, 0, err);
-+ }
-+ else
-+ for (i = 0; i < (1 << wclen); i++)
-+ {
-+ char *p = starts;
-+ int j, k;
-+
-+ for (j = 0; j < wclen; ++j)
-+ {
-+ wchar_t wc = wcbeg[j];
-+ if (i & (1 << j))
-+ {
-+ wc = towupper (wc);
-+ if (wc == wcbeg[j])
-+ continue;
-+ }
-+ k = wctomb (p, wc);
-+ if (k <= 0)
-+ goto fimb_fail;
-+ p += k;
-+ }
-+ if ((err = kwsincr (fimb_kwset, starts, p - starts)) != 0)
-+ error (2, 0, err);
-+ }
-+ if (wclim < wcpattern + wcsize)
-+ ++wclim;
-+ wcbeg = wclim;
-+ }
-+ while (wcbeg < wcpattern + wcsize);
-+ f_i_multibyte = 1;
-+ kwset = fimb_kwset;
-+ free (starts);
-+ Fimb.match = xmalloc (Fimb.count);
-+ if ((err = kwsprep (kwset)) != 0)
-+ error (2, 0, err);
-+ return;
-+ }
-+ }
-+#endif /* MBS_SUPPORT */
-+
-+
- kwsinit ();
- beg = pattern;
- do
-@@ -499,6 +815,76 @@ Fcompile (char const *pattern, size_t size)
- error (2, 0, err);
- }
-
-+#ifdef MBS_SUPPORT
-+static int
-+Fimbexec (const char *buf, size_t size, size_t *plen, int exact)
-+{
-+ size_t len, letter, i;
-+ int ret = -1;
-+ mbstate_t mbs;
-+ wchar_t wc;
-+ int patterns_left;
-+
-+ assert (match_icase && f_i_multibyte == 1);
-+ assert (MB_CUR_MAX > 1);
-+
-+ memset (&mbs, '\0', sizeof (mbs));
-+ memset (Fimb.match, '\1', Fimb.count);
-+ letter = len = 0;
-+ patterns_left = 1;
-+ while (patterns_left && len <= size)
-+ {
-+ size_t c;
-+
-+ patterns_left = 0;
-+ if (len < size)
-+ {
-+ c = mbrtowc (&wc, buf + len, size - len, &mbs);
-+ if (c + 2 <= 2)
-+ return ret;
-+
-+ wc = towlower (wc);
-+ }
-+ else
-+ {
-+ c = 1;
-+ wc = L'\0';
-+ }
-+
-+ for (i = 0; i < Fimb.count; i++)
-+ {
-+ if (Fimb.match[i])
-+ {
-+ if (Fimb.patterns[i][letter] == L'\0')
-+ {
-+ /* Found a match. */
-+ *plen = len;
-+ if (!exact && !match_words)
-+ return 0;
-+ else
-+ {
-+ /* For -w or exact look for longest match. */
-+ ret = 0;
-+ Fimb.match[i] = '\0';
-+ continue;
-+ }
-+ }
-+
-+ if (Fimb.patterns[i][letter] == wc)
-+ patterns_left = 1;
-+ else
-+ Fimb.match[i] = '\0';
-+ }
-+ }
-+
-+ len += c;
-+ letter++;
-+ }
-+
-+ return ret;
-+}
-+#endif /* MBS_SUPPORT */
-+
- static size_t
- Fexecute (char const *buf, size_t size, size_t *match_size, int exact)
- {
-@@ -506,88 +892,268 @@ Fexecute (char const *buf, size_t size, size_t *match_size, int exact)
- register size_t len;
- char eol = eolbyte;
- struct kwsmatch kwsmatch;
-+ size_t ret_val;
- #ifdef MBS_SUPPORT
-- char *mb_properties;
-- if (MB_CUR_MAX > 1)
-- mb_properties = check_multibyte_string (buf, size);
-+ int mb_cur_max = MB_CUR_MAX;
-+ mbstate_t mbs;
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ const char *last_char = NULL;
- #endif /* MBS_SUPPORT */
-
-- for (beg = buf; beg <= buf + size; ++beg)
-+ for (beg = buf; beg < buf + size; ++beg)
- {
-- size_t offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch);
-+ size_t offset;
-+ offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch);
-+
- if (offset == (size_t) -1)
-- {
-+ goto failure;
- #ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1)
-- free(mb_properties);
--#endif /* MBS_SUPPORT */
-- return offset;
-+ if (mb_cur_max > 1 && !using_utf8)
-+ {
-+ size_t bytes_left = offset;
-+ while (bytes_left)
-+ {
-+ size_t mlen = mbrlen (beg, bytes_left, &mbs);
-+
-+ last_char = beg;
-+ if (mlen == (size_t) -1 || mlen == 0)
-+ {
-+ /* Incomplete character: treat as single-byte. */
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ beg++;
-+ bytes_left--;
-+ continue;
-+ }
-+
-+ if (mlen == (size_t) -2)
-+ /* Offset points inside multibyte character: no good. */
-+ break;
-+
-+ beg += mlen;
-+ bytes_left -= mlen;
-+ }
-+
-+ if (bytes_left)
-+ continue;
- }
--#ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1 && mb_properties[offset+beg-buf] == 0)
-- continue; /* It is a part of multibyte character. */
-+ else
- #endif /* MBS_SUPPORT */
- beg += offset;
-- len = kwsmatch.size[0];
-- if (exact)
-- {
-- *match_size = len;
- #ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1)
-- free (mb_properties);
-+ /* For f_i_multibyte, the string at beg now matches first 3 chars of
-+ one of the search strings (less if there are shorter search strings).
-+ See if this is a real match. */
-+ if (f_i_multibyte
-+ && Fimbexec (beg, buf + size - beg, &kwsmatch.size[0], exact))
-+ goto next_char;
- #endif /* MBS_SUPPORT */
-- return beg - buf;
-- }
-+ len = kwsmatch.size[0];
-+ if (exact && !match_words)
-+ goto success_in_beg_and_len;
- if (match_lines)
- {
- if (beg > buf && beg[-1] != eol)
-- continue;
-+ goto next_char;
- if (beg + len < buf + size && beg[len] != eol)
-- continue;
-+ goto next_char;
- goto success;
- }
- else if (match_words)
-- for (try = beg; len; )
-- {
-- if (try > buf && WCHAR((unsigned char) try[-1]))
-- break;
-- if (try + len < buf + size && WCHAR((unsigned char) try[len]))
-- {
-- offset = kwsexec (kwset, beg, --len, &kwsmatch);
-- if (offset == (size_t) -1)
-- {
-+ {
-+ while (len)
-+ {
-+ int word_match = 0;
-+ if (beg > buf)
-+ {
- #ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1)
-- free (mb_properties);
-+ if (mb_cur_max > 1)
-+ {
-+ const char *s;
-+ int mr;
-+ wchar_t pwc;
-+
-+ if (using_utf8)
-+ {
-+ s = beg - 1;
-+ while (s > buf
-+ && (unsigned char) *s >= 0x80
-+ && (unsigned char) *s <= 0xbf)
-+ --s;
-+ }
-+ else
-+ s = last_char;
-+ mr = mbtowc (&pwc, s, beg - s);
-+ if (mr <= 0)
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ else if ((iswalnum (pwc) || pwc == L'_')
-+ && mr == (int) (beg - s))
-+ goto next_char;
-+ }
-+ else
- #endif /* MBS_SUPPORT */
-- return offset;
-- }
-- try = beg + offset;
-- len = kwsmatch.size[0];
-- }
-- else
-- goto success;
-- }
-+ if (WCHAR ((unsigned char) beg[-1]))
-+ goto next_char;
-+ }
-+#ifdef MBS_SUPPORT
-+ if (mb_cur_max > 1)
-+ {
-+ wchar_t nwc;
-+ int mr;
-+
-+ mr = mbtowc (&nwc, beg + len, buf + size - beg - len);
-+ if (mr <= 0)
-+ {
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ word_match = 1;
-+ }
-+ else if (!iswalnum (nwc) && nwc != L'_')
-+ word_match = 1;
-+ }
-+ else
-+#endif /* MBS_SUPPORT */
-+ if (beg + len >= buf + size || !WCHAR ((unsigned char) beg[len]))
-+ word_match = 1;
-+ if (word_match)
-+ {
-+ if (!exact)
-+ /* Returns the whole line now we know there's a word match. */
-+ goto success;
-+ else
-+ /* Returns just this word match. */
-+ goto success_in_beg_and_len;
-+ }
-+ if (len > 0)
-+ {
-+ /* Try a shorter length anchored at the same place. */
-+ --len;
-+ offset = kwsexec (kwset, beg, len, &kwsmatch);
-+
-+ if (offset == -1)
-+ goto next_char; /* Try a different anchor. */
-+#ifdef MBS_SUPPORT
-+ if (mb_cur_max > 1 && !using_utf8)
-+ {
-+ size_t bytes_left = offset;
-+ while (bytes_left)
-+ {
-+ size_t mlen = mbrlen (beg, bytes_left, &mbs);
-+
-+ last_char = beg;
-+ if (mlen == (size_t) -1 || mlen == 0)
-+ {
-+ /* Incomplete character: treat as single-byte. */
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ beg++;
-+ bytes_left--;
-+ continue;
-+ }
-+
-+ if (mlen == (size_t) -2)
-+ {
-+ /* Offset points inside multibyte character:
-+ * no good. */
-+ break;
-+ }
-+
-+ beg += mlen;
-+ bytes_left -= mlen;
-+ }
-+
-+ if (bytes_left)
-+ {
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ goto next_char; /* Try a different anchor. */
-+ }
-+ }
-+ else
-+#endif /* MBS_SUPPORT */
-+ beg += offset;
-+#ifdef MBS_SUPPORT
-+ /* The string at beg now matches first 3 chars of one of
-+ the search strings (less if there are shorter search
-+ strings). See if this is a real match. */
-+ if (f_i_multibyte
-+ && Fimbexec (beg, len - offset, &kwsmatch.size[0],
-+ exact))
-+ goto next_char;
-+#endif /* MBS_SUPPORT */
-+ len = kwsmatch.size[0];
-+ }
-+ }
-+ }
- else
- goto success;
-- }
--
-+next_char:;
- #ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1)
-- free (mb_properties);
-+ /* Advance to next character. For MB_CUR_MAX == 1 case this is handled
-+ by ++beg above. */
-+ if (mb_cur_max > 1)
-+ {
-+ if (using_utf8)
-+ {
-+ unsigned char c = *beg;
-+ if (c >= 0xc2)
-+ {
-+ if (c < 0xe0)
-+ ++beg;
-+ else if (c < 0xf0)
-+ beg += 2;
-+ else if (c < 0xf8)
-+ beg += 3;
-+ else if (c < 0xfc)
-+ beg += 4;
-+ else if (c < 0xfe)
-+ beg += 5;
-+ }
-+ }
-+ else
-+ {
-+ size_t l = mbrlen (beg, buf + size - beg, &mbs);
-+
-+ last_char = beg;
-+ if (l + 2 >= 2)
-+ beg += l - 1;
-+ else
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ }
-+ }
- #endif /* MBS_SUPPORT */
-+ }
-+
-+ failure:
- return -1;
-
- success:
-+#ifdef MBS_SUPPORT
-+ if (mb_cur_max > 1 && !using_utf8)
-+ {
-+ end = beg + len;
-+ while (end < buf + size)
-+ {
-+ size_t mlen = mbrlen (end, buf + size - end, &mbs);
-+ if (mlen == (size_t) -1 || mlen == (size_t) -2 || mlen == 0)
-+ {
-+ memset (&mbs, '\0', sizeof (mbstate_t));
-+ mlen = 1;
-+ }
-+ if (mlen == 1 && *end == eol)
-+ break;
-+
-+ end += mlen;
-+ }
-+ }
-+ else
-+#endif /* MBS_SUPPORT */
- end = memchr (beg + len, eol, (buf + size) - (beg + len));
-+
- end++;
- while (buf < beg && beg[-1] != eol)
- --beg;
-- *match_size = end - beg;
--#ifdef MBS_SUPPORT
-- if (MB_CUR_MAX > 1)
-- free (mb_properties);
--#endif /* MBS_SUPPORT */
-+ len = end - beg;
-+ /* FALLTHROUGH */
-+
-+ success_in_beg_and_len:
-+ *match_size = len;
- return beg - buf;
- }
-
-@@ -701,8 +1267,9 @@ Pexecute (char const *buf, size_t size, size_t *match_size, int exact)
- char eol = eolbyte;
- if (!exact)
- {
-- end = memchr (end, eol, buflim - end);
-- end++;
-+ while (end < buflim)
-+ if (*end++ == eol)
-+ break;
- while (buf < beg && beg[-1] != eol)
- --beg;
- }
---
-1.8.4.2
-
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
deleted file mode 100644
index d9b1e35e72..0000000000
--- a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| configure.in:33: error: automatic de-ANSI-fication support has been removed
-| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
-| configure.in:33: the top level
-| autom4te: m4 failed with exit status: 1
-...
-| lib/Makefile.am:2: error: automatic de-ANSI-fication support has been removed
-| src/Makefile.am:2: error: automatic de-ANSI-fication support has been removed
-| autoreconf: automake failed with exit status: 1
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/04
-
-Index: grep-2.5.1a/configure.in
-===================================================================
---- grep-2.5.1a.orig/configure.in
-+++ grep-2.5.1a/configure.in
-@@ -30,7 +30,6 @@ AC_PROG_RANLIB
-
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_SYS_LARGEFILE
--AM_C_PROTOTYPES
- AC_TYPE_SIZE_T
- AC_CHECK_TYPE(ssize_t, int)
- AC_C_CONST
-Index: grep-2.5.1a/lib/Makefile.am
-===================================================================
---- grep-2.5.1a.orig/lib/Makefile.am
-+++ grep-2.5.1a/lib/Makefile.am
-@@ -1,5 +1,5 @@
- #
--AUTOMAKE_OPTIONS = ../src/ansi2knr
-+AUTOMAKE_OPTIONS =
-
- SUBDIRS = posix
-
-Index: grep-2.5.1a/src/Makefile.am
-===================================================================
---- grep-2.5.1a.orig/src/Makefile.am
-+++ grep-2.5.1a/src/Makefile.am
-@@ -1,5 +1,5 @@
- ## Process this file with automake to create Makefile.in
--AUTOMAKE_OPTIONS = ansi2knr no-dependencies
-+AUTOMAKE_OPTIONS = no-dependencies
-
- LN = ln
-
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch
deleted file mode 100644
index de054fc755..0000000000
--- a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
-# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have
-# mempcpy, we'll just use that instead.
-# Patch source: OpenEmbedded
-
-Index: grep-2.5.1/intl/localealias.c
-===================================================================
---- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100
-+++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000
-@@ -65,7 +65,7 @@
- # define strcasecmp __strcasecmp
-
- # ifndef mempcpy
--# define mempcpy __mempcpy
-+# error "mempcpy not detected"
- # endif
- # define HAVE_MEMPCPY 1
- # define HAVE___FSETLOCKING 1
-Index: grep-2.5.1/lib/getopt.c
-===================================================================
---- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100
-+++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000
-@@ -326,7 +326,7 @@
- nonoption_flags_len = nonoption_flags_max_len = 0;
- else
- {
-- memset (__mempcpy (new_str, __getopt_nonoption_flags,
-+ memset (mempcpy (new_str, __getopt_nonoption_flags,
- nonoption_flags_max_len),
- '\0', top + 1 - nonoption_flags_max_len);
- nonoption_flags_max_len = top + 1;
-@@ -437,7 +437,7 @@
- if (__getopt_nonoption_flags == NULL)
- nonoption_flags_max_len = -1;
- else
-- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
-+ memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', nonoption_flags_max_len - len);
- }
- }
-Index: grep-2.5.1/lib/regex.c
-===================================================================
---- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000
-+++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000
-@@ -7842,7 +7842,7 @@
- if (msg_size > errbuf_size)
- {
- #if defined HAVE_MEMPCPY || defined _LIBC
-- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
-+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
- #else
- memcpy (errbuf, msg, errbuf_size - 1);
- errbuf[errbuf_size - 1] = 0;
diff --git a/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c..0000000000
--- a/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gnulib.mk b/lib/gnulib.mk
-index e1d74db..c0e92dd 100644
---- a/lib/gnulib.mk
-+++ b/lib/gnulib.mk
-@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
---
-2.1.4
-
diff --git a/meta/recipes-extended/grep/grep_2.25.bb b/meta/recipes-extended/grep/grep_2.25.bb
deleted file mode 100644
index 9720d9f942..0000000000
--- a/meta/recipes-extended/grep/grep_2.25.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "GNU grep utility"
-HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
-BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
-SECTION = "console/utils"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
-
-SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
-SRC_URI[md5sum] = "04e96b0e6f0fe6a180ae62c88fcd0af6"
-SRC_URI[sha256sum] = "e21e83bac50450e0d0d61a42c154ee0dceaacdbf4f604ef6e79071cb8e596830"
-
-inherit autotools gettext texinfo
-
-EXTRA_OECONF = "--disable-perl-regexp"
-
-do_configure_prepend () {
- rm -f ${S}/m4/init.m4
-}
-
-do_install () {
- autotools_do_install
- if [ "${base_bindir}" != "${bindir}" ]; then
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/grep ${D}${base_bindir}/grep
- mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
- mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
- rmdir ${D}${bindir}/
- fi
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "grep egrep fgrep"
-ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
-ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
-ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
-
-export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
deleted file mode 100644
index 5a2da28327..0000000000
--- a/meta/recipes-extended/grep/grep_2.5.1a.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "Pattern matching utilities"
-DESCRIPTION = "The GNU versions of commonly used grep utilities. The grep command searches one or more input \
-files for lines containing a match to a specified pattern."
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
- file://uclibc-fix.patch \
- file://grep_fix_for_automake-1.12.patch \
- file://gettext.patch \
- file://fix64-int-to-pointer.patch \
- file://Makevars \
- file://grep-CVE-2012-5667.patch \
- file://fix-for-texinfo-5.1.patch \
- file://grep-egrep-fgrep-Fix-LSB-NG-cases.patch \
- "
-
-SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"
-SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132"
-
-inherit autotools gettext texinfo
-
-EXTRA_OECONF_INCLUDED_REGEX = "--without-included-regex"
-EXTRA_OECONF_INCLUDED_REGEX_libc-musl = "--with-included-regex"
-
-EXTRA_OECONF = "--disable-perl-regexp \
- ${EXTRA_OECONF_INCLUDED_REGEX}"
-
-CFLAGS += "-D PROTOTYPES"
-do_configure_prepend () {
- rm -f ${S}/m4/init.m4
- cp -f ${WORKDIR}/Makevars ${S}/po/
-}
-
-do_install () {
- autotools_do_install
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/grep ${D}${base_bindir}/grep
- mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
- mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
- rmdir ${D}${bindir}/
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "grep egrep fgrep"
-ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
-ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
-ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
-
-export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/grep/grep_3.3.bb b/meta/recipes-extended/grep/grep_3.3.bb
new file mode 100644
index 0000000000..704a3ecd06
--- /dev/null
+++ b/meta/recipes-extended/grep/grep_3.3.bb
@@ -0,0 +1,45 @@
+SUMMARY = "GNU grep utility"
+HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
+BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
+SECTION = "console/utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
+
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "05d0718a1b7cc706a4bdf8115363f1ed"
+SRC_URI[sha256sum] = "b960541c499619efd6afe1fa795402e4733c8e11ebf9fafccc0bb4bccdc5b514"
+
+inherit autotools gettext texinfo pkgconfig
+
+# Fix "Argument list too long" error when len(TMPDIR) = 410
+acpaths = "-I ./m4"
+
+do_configure_prepend () {
+ rm -f ${S}/m4/init.m4
+}
+
+do_install () {
+ autotools_do_install
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/grep ${D}${base_bindir}/grep
+ mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
+ mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
+ rmdir ${D}${bindir}/
+ fi
+}
+
+inherit update-alternatives
+
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre"
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "grep egrep fgrep"
+ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
+ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
+ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/groff/files/0001-Include-config.h.patch b/meta/recipes-extended/groff/files/0001-Include-config.h.patch
new file mode 100644
index 0000000000..348a61d9df
--- /dev/null
+++ b/meta/recipes-extended/groff/files/0001-Include-config.h.patch
@@ -0,0 +1,1228 @@
+From 6cfa9f8126c1d6ec26f120d273e714fb19108873 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 4 Aug 2019 16:32:41 -0700
+Subject: [PATCH] Include config.h
+
+This helps avoid the include conflicts where <stdlib.h> is including
+<math.h> and since -I./lib is used and a local math.h wrapper is
+residing in there, the build breaks since stdlib.h really wants the
+standard system math.h to be included, this ensures that right macros
+are predefined and included before stdlib.h is included
+
+fixes
+In file included from src/libs/libgroff/assert.cpp:20:
+In file included from TOPDIR/build/tmp/work/aarch64-yoe-linux-musl/groff/1.22.4-r0/recipe-sysroot/usr/include/c++/v1/stdlib.h:100:
+./lib/math.h:38:3: error: "Please include config.h first."
+ #error "Please include config.h first."
+ ^
+./lib/math.h:40:1: error: unknown type name '_GL_INLINE_HEADER_BEGIN'
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libs/libgroff/assert.cpp | 4 +
+ src/libs/libgroff/curtime.cpp | 4 +
+ src/libs/libgroff/device.cpp | 4 +
+ src/libs/libgroff/error.cpp | 4 +
+ src/libs/libgroff/fatal.cpp | 4 +
+ src/libs/libgroff/string.cpp | 4 +
+ src/libs/libgroff/strsave.cpp | 4 +
+ src/preproc/eqn/eqn.cpp | 450 ++++++++++++++++++----------------
+ src/preproc/eqn/eqn.hpp | 12 +-
+ src/preproc/eqn/eqn.ypp | 4 +
+ src/preproc/eqn/other.cpp | 4 +
+ src/preproc/eqn/text.cpp | 4 +
+ src/preproc/pic/object.cpp | 4 +
+ 13 files changed, 285 insertions(+), 221 deletions(-)
+
+diff --git a/src/libs/libgroff/assert.cpp b/src/libs/libgroff/assert.cpp
+index aceed05..97780d6 100644
+--- a/src/libs/libgroff/assert.cpp
++++ b/src/libs/libgroff/assert.cpp
+@@ -16,6 +16,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "assert.h"
+diff --git a/src/libs/libgroff/curtime.cpp b/src/libs/libgroff/curtime.cpp
+index 72fe067..9ddba08 100644
+--- a/src/libs/libgroff/curtime.cpp
++++ b/src/libs/libgroff/curtime.cpp
+@@ -15,6 +15,10 @@ for more details.
+ The GNU General Public License version 2 (GPL2) is available in the
+ internet at <http://www.gnu.org/licenses/gpl-2.0.txt>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <errno.h>
+ #include <limits.h>
+ #include <stdlib.h>
+diff --git a/src/libs/libgroff/device.cpp b/src/libs/libgroff/device.cpp
+index 0d28b85..c211f85 100644
+--- a/src/libs/libgroff/device.cpp
++++ b/src/libs/libgroff/device.cpp
+@@ -17,6 +17,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdlib.h>
+ #include "device.h"
+ #include "defs.h"
+diff --git a/src/libs/libgroff/error.cpp b/src/libs/libgroff/error.cpp
+index 9a18803..7b63d3d 100644
+--- a/src/libs/libgroff/error.cpp
++++ b/src/libs/libgroff/error.cpp
+@@ -17,6 +17,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/libs/libgroff/fatal.cpp b/src/libs/libgroff/fatal.cpp
+index c0dcb35..fd6003e 100644
+--- a/src/libs/libgroff/fatal.cpp
++++ b/src/libs/libgroff/fatal.cpp
+@@ -16,6 +16,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdlib.h>
+
+ #define FATAL_ERROR_EXIT_CODE 3
+diff --git a/src/libs/libgroff/string.cpp b/src/libs/libgroff/string.cpp
+index 46c015c..449f3a6 100644
+--- a/src/libs/libgroff/string.cpp
++++ b/src/libs/libgroff/string.cpp
+@@ -17,6 +17,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdlib.h>
+
+ #include "lib.h"
+diff --git a/src/libs/libgroff/strsave.cpp b/src/libs/libgroff/strsave.cpp
+index f95c05e..d875045 100644
+--- a/src/libs/libgroff/strsave.cpp
++++ b/src/libs/libgroff/strsave.cpp
+@@ -17,6 +17,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <string.h>
+ #include <stdlib.h>
+
+diff --git a/src/preproc/eqn/eqn.cpp b/src/preproc/eqn/eqn.cpp
+index 4ede465..fdd9484 100644
+--- a/src/preproc/eqn/eqn.cpp
++++ b/src/preproc/eqn/eqn.cpp
+@@ -1,8 +1,9 @@
+-/* A Bison parser, made by GNU Bison 3.2. */
++/* A Bison parser, made by GNU Bison 3.4.1. */
+
+ /* Bison implementation for Yacc-like parsers in C
+
+- Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
++ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
++ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -47,7 +48,7 @@
+ #define YYBISON 1
+
+ /* Bison version. */
+-#define YYBISON_VERSION "3.2"
++#define YYBISON_VERSION "3.4.1"
+
+ /* Skeleton name. */
+ #define YYSKELETON_NAME "yacc.c"
+@@ -65,7 +66,11 @@
+
+
+ /* First part of user prologue. */
+-#line 18 "../src/preproc/eqn/eqn.ypp" /* yacc.c:338 */
++#line 18 "src/preproc/eqn/eqn.ypp"
++
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
+
+ #include <stdio.h>
+ #include <string.h>
+@@ -77,7 +82,8 @@ extern int non_empty_flag;
+ int yylex();
+ void yyerror(const char *);
+
+-#line 81 "src/preproc/eqn/eqn.cpp" /* yacc.c:338 */
++#line 86 "src/preproc/eqn/eqn.cpp"
++
+ # ifndef YY_NULLPTR
+ # if defined __cplusplus
+ # if 201103L <= __cplusplus
+@@ -98,8 +104,8 @@ void yyerror(const char *);
+ # define YYERROR_VERBOSE 0
+ #endif
+
+-/* In a future release of Bison, this section will be replaced
+- by #include "y.tab.h". */
++/* Use api.header.include to #include this header
++ instead of duplicating it here. */
+ #ifndef YY_YY_SRC_PREPROC_EQN_EQN_HPP_INCLUDED
+ # define YY_YY_SRC_PREPROC_EQN_EQN_HPP_INCLUDED
+ /* Debug traces. */
+@@ -237,10 +243,9 @@ extern int yydebug;
+
+ /* Value type. */
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+-
+ union YYSTYPE
+ {
+-#line 30 "../src/preproc/eqn/eqn.ypp" /* yacc.c:353 */
++#line 34 "src/preproc/eqn/eqn.ypp"
+
+ char *str;
+ box *b;
+@@ -249,9 +254,9 @@ union YYSTYPE
+ int n;
+ column *col;
+
+-#line 253 "src/preproc/eqn/eqn.cpp" /* yacc.c:353 */
+-};
++#line 258 "src/preproc/eqn/eqn.cpp"
+
++};
+ typedef union YYSTYPE YYSTYPE;
+ # define YYSTYPE_IS_TRIVIAL 1
+ # define YYSTYPE_IS_DECLARED 1
+@@ -366,6 +371,8 @@ typedef short yytype_int16;
+ #endif
+
+
++#define YY_ASSERT(E) ((void) (0 && (E)))
++
+ #if ! defined yyoverflow || YYERROR_VERBOSE
+
+ /* The parser invokes alloca or malloc; define the necessary symbols. */
+@@ -508,16 +515,16 @@ union yyalloc
+ /* YYNSTATES -- Number of states. */
+ #define YYNSTATES 142
+
+-/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+- by yylex, with out-of-bounds checking. */
+ #define YYUNDEFTOK 2
+ #define YYMAXUTOK 315
+
++/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
++ as returned by yylex, with out-of-bounds checking. */
+ #define YYTRANSLATE(YYX) \
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+ /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+- as returned by yylex, without out-of-bounds checking. */
++ as returned by yylex. */
+ static const yytype_uint8 yytranslate[] =
+ {
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 63,
+@@ -558,14 +565,14 @@ static const yytype_uint8 yytranslate[] =
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+ static const yytype_uint16 yyrline[] =
+ {
+- 0, 121, 121, 123, 128, 130, 141, 143, 145, 150,
+- 152, 154, 156, 158, 163, 165, 167, 169, 174, 176,
+- 181, 183, 185, 190, 192, 194, 196, 198, 200, 202,
+- 204, 206, 208, 210, 212, 214, 216, 218, 220, 222,
+- 224, 226, 228, 230, 232, 234, 236, 238, 240, 242,
+- 244, 246, 248, 250, 252, 254, 259, 269, 271, 276,
+- 278, 283, 285, 290, 292, 297, 299, 304, 306, 308,
+- 310, 314, 316, 321, 323, 325
++ 0, 125, 125, 127, 132, 134, 145, 147, 149, 154,
++ 156, 158, 160, 162, 167, 169, 171, 173, 178, 180,
++ 185, 187, 189, 194, 196, 198, 200, 202, 204, 206,
++ 208, 210, 212, 214, 216, 218, 220, 222, 224, 226,
++ 228, 230, 232, 234, 236, 238, 240, 242, 244, 246,
++ 248, 250, 252, 254, 256, 258, 263, 273, 275, 280,
++ 282, 287, 289, 294, 296, 301, 303, 308, 310, 312,
++ 314, 318, 320, 325, 327, 329
+ };
+ #endif
+
+@@ -818,22 +825,22 @@ static const yytype_uint8 yyr2[] =
+
+ #define YYRECOVERING() (!!yyerrstatus)
+
+-#define YYBACKUP(Token, Value) \
+-do \
+- if (yychar == YYEMPTY) \
+- { \
+- yychar = (Token); \
+- yylval = (Value); \
+- YYPOPSTACK (yylen); \
+- yystate = *yyssp; \
+- goto yybackup; \
+- } \
+- else \
+- { \
+- yyerror (YY_("syntax error: cannot back up")); \
+- YYERROR; \
+- } \
+-while (0)
++#define YYBACKUP(Token, Value) \
++ do \
++ if (yychar == YYEMPTY) \
++ { \
++ yychar = (Token); \
++ yylval = (Value); \
++ YYPOPSTACK (yylen); \
++ yystate = *yyssp; \
++ goto yybackup; \
++ } \
++ else \
++ { \
++ yyerror (YY_("syntax error: cannot back up")); \
++ YYERROR; \
++ } \
++ while (0)
+
+ /* Error token number */
+ #define YYTERROR 1
+@@ -948,7 +955,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+- &(yyvsp[(yyi + 1) - (yynrhs)])
++ &yyvsp[(yyi + 1) - (yynrhs)]
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+@@ -1052,7 +1059,10 @@ yytnamerr (char *yyres, const char *yystr)
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+- /* Fall through. */
++ else
++ goto append;
++
++ append:
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+@@ -1148,10 +1158,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+- if (! (yysize <= yysize1
+- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
++ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
++ yysize = yysize1;
++ else
+ return 2;
+- yysize = yysize1;
+ }
+ }
+ }
+@@ -1175,9 +1185,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
++ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
++ yysize = yysize1;
++ else
+ return 2;
+- yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+@@ -1303,23 +1314,33 @@ yyparse (void)
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
++
+ /*------------------------------------------------------------.
+-| yynewstate -- Push a new state, which is found in yystate. |
++| yynewstate -- push a new state, which is found in yystate. |
+ `------------------------------------------------------------*/
+- yynewstate:
++yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+- yysetstate:
++
++/*--------------------------------------------------------------------.
++| yynewstate -- set current state (the top of the stack) to yystate. |
++`--------------------------------------------------------------------*/
++yysetstate:
++ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
++ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
+ *yyssp = (yytype_int16) yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
++#if !defined yyoverflow && !defined YYSTACK_RELOCATE
++ goto yyexhaustedlab;
++#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
+
+-#ifdef yyoverflow
++# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+@@ -1338,10 +1359,7 @@ yyparse (void)
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+-#else /* no yyoverflow */
+-# ifndef YYSTACK_RELOCATE
+- goto yyexhaustedlab;
+-# else
++# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+@@ -1357,12 +1375,11 @@ yyparse (void)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+-# undef YYSTACK_RELOCATE
++# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+ # endif
+-#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+@@ -1373,19 +1390,18 @@ yyparse (void)
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+-
+- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
++#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
++
+ /*-----------.
+ | yybackup. |
+ `-----------*/
+ yybackup:
+-
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+@@ -1443,7 +1459,6 @@ yybackup:
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+-
+ goto yynewstate;
+
+
+@@ -1458,7 +1473,7 @@ yydefault:
+
+
+ /*-----------------------------.
+-| yyreduce -- Do a reduction. |
++| yyreduce -- do a reduction. |
+ `-----------------------------*/
+ yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+@@ -1478,20 +1493,20 @@ yyreduce:
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+- case 3:
+-#line 124 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++ case 3:
++#line 128 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].b)->top_level(); non_empty_flag = 1; }
+-#line 1485 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1500 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 4:
+-#line 129 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 133 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = (yyvsp[0].b); }
+-#line 1491 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1506 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 5:
+-#line 131 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 135 "src/preproc/eqn/eqn.ypp"
+ {
+ list_box *lb = (yyvsp[-1].b)->to_list_box();
+ if (!lb)
+@@ -1499,436 +1514,437 @@ yyreduce:
+ lb->append((yyvsp[0].b));
+ (yyval.b) = lb;
+ }
+-#line 1503 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1518 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 6:
+-#line 142 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 146 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = (yyvsp[0].b); }
+-#line 1509 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1524 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 7:
+-#line 144 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 148 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_mark_box((yyvsp[0].b)); }
+-#line 1515 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1530 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 8:
+-#line 146 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 150 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_lineup_box((yyvsp[0].b)); }
+-#line 1521 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1536 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 9:
+-#line 151 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 155 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = (yyvsp[0].b); }
+-#line 1527 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1542 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 10:
+-#line 153 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 157 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_limit_box((yyvsp[-2].b), 0, (yyvsp[0].b)); }
+-#line 1533 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1548 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 11:
+-#line 155 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 159 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_limit_box((yyvsp[-2].b), (yyvsp[0].b), 0); }
+-#line 1539 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1554 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 12:
+-#line 157 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 161 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_limit_box((yyvsp[-4].b), (yyvsp[-2].b), (yyvsp[0].b)); }
+-#line 1545 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1560 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 13:
+-#line 159 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 163 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_limit_box((yyvsp[-4].b), make_limit_box((yyvsp[-2].b), (yyvsp[0].b), 0), 0); }
+-#line 1551 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1566 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 14:
+-#line 164 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 168 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = (yyvsp[0].b); }
+-#line 1557 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1572 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 15:
+-#line 166 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 170 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_sqrt_box((yyvsp[0].b)); }
+-#line 1563 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1578 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 16:
+-#line 168 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 172 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_over_box((yyvsp[-2].b), (yyvsp[0].b)); }
+-#line 1569 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1584 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 17:
+-#line 170 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 174 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_small_over_box((yyvsp[-2].b), (yyvsp[0].b)); }
+-#line 1575 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1590 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 18:
+-#line 175 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 179 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = (yyvsp[0].b); }
+-#line 1581 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1596 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 19:
+-#line 177 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 181 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_script_box((yyvsp[-2].b), 0, (yyvsp[0].b)); }
+-#line 1587 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1602 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 20:
+-#line 182 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 186 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = (yyvsp[0].b); }
+-#line 1593 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1608 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 21:
+-#line 184 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 188 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_script_box((yyvsp[-2].b), (yyvsp[0].b), 0); }
+-#line 1599 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1614 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 22:
+-#line 186 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 190 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_script_box((yyvsp[-4].b), (yyvsp[-2].b), (yyvsp[0].b)); }
+-#line 1605 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1620 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 23:
+-#line 191 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 195 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = split_text((yyvsp[0].str)); }
+-#line 1611 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1626 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 24:
+-#line 193 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 197 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new quoted_text_box((yyvsp[0].str)); }
+-#line 1617 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1632 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 25:
+-#line 195 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 199 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = split_text((yyvsp[0].str)); }
+-#line 1623 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1638 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 26:
+-#line 197 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 201 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new quoted_text_box((yyvsp[0].str)); }
+-#line 1629 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1644 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 27:
+-#line 199 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 203 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new half_space_box; }
+-#line 1635 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1650 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 28:
+-#line 201 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 205 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new space_box; }
+-#line 1641 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1656 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 29:
+-#line 203 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 207 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new tab_box; }
+-#line 1647 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1662 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 30:
+-#line 205 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 209 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = (yyvsp[-1].b); }
+-#line 1653 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1668 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 31:
+-#line 207 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 211 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[0].pb); }
+-#line 1659 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1674 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 32:
+-#line 209 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 213 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].pb)->set_alignment(LEFT_ALIGN); (yyval.b) = (yyvsp[0].pb); }
+-#line 1665 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1680 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 33:
+-#line 211 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 215 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].pb)->set_alignment(RIGHT_ALIGN); (yyval.b) = (yyvsp[0].pb); }
+-#line 1671 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1686 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 34:
+-#line 213 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 217 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[0].pb); }
+-#line 1677 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1692 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 35:
+-#line 215 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 219 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = (yyvsp[-1].mb); }
+-#line 1683 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1698 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 36:
+-#line 217 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 221 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_delim_box((yyvsp[-3].str), (yyvsp[-2].b), (yyvsp[0].str)); }
+-#line 1689 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1704 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 37:
+-#line 219 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 223 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_delim_box((yyvsp[-1].str), (yyvsp[0].b), 0); }
+-#line 1695 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1710 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 38:
+-#line 221 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 225 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_overline_box((yyvsp[-1].b)); }
+-#line 1701 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1716 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 39:
+-#line 223 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 227 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_underline_box((yyvsp[-1].b)); }
+-#line 1707 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1722 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 40:
+-#line 225 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 229 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_prime_box((yyvsp[-1].b)); }
+-#line 1713 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1728 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 41:
+-#line 227 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 231 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_accent_box((yyvsp[-2].b), (yyvsp[0].b)); }
+-#line 1719 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1734 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 42:
+-#line 229 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 233 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_uaccent_box((yyvsp[-2].b), (yyvsp[0].b)); }
+-#line 1725 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1740 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 43:
+-#line 231 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 235 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new font_box(strsave(get_grfont()), (yyvsp[0].b)); }
+-#line 1731 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1746 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 44:
+-#line 233 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 237 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new font_box(strsave(get_gbfont()), (yyvsp[0].b)); }
+-#line 1737 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1752 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 45:
+-#line 235 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 239 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new font_box(strsave(get_gfont()), (yyvsp[0].b)); }
+-#line 1743 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1758 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 46:
+-#line 237 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 241 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new fat_box((yyvsp[0].b)); }
+-#line 1749 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1764 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 47:
+-#line 239 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 243 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new font_box((yyvsp[-1].str), (yyvsp[0].b)); }
+-#line 1755 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1770 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 48:
+-#line 241 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 245 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new size_box((yyvsp[-1].str), (yyvsp[0].b)); }
+-#line 1761 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1776 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 49:
+-#line 243 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 247 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new hmotion_box((yyvsp[-1].n), (yyvsp[0].b)); }
+-#line 1767 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1782 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 50:
+-#line 245 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 249 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new hmotion_box(-(yyvsp[-1].n), (yyvsp[0].b)); }
+-#line 1773 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1788 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 51:
+-#line 247 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 251 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new vmotion_box((yyvsp[-1].n), (yyvsp[0].b)); }
+-#line 1779 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1794 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 52:
+-#line 249 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 253 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new vmotion_box(-(yyvsp[-1].n), (yyvsp[0].b)); }
+-#line 1785 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1800 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 53:
+-#line 251 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 255 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].b)->set_spacing_type((yyvsp[-1].str)); (yyval.b) = (yyvsp[0].b); }
+-#line 1791 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1806 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 54:
+-#line 253 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 257 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = new vcenter_box((yyvsp[0].b)); }
+-#line 1797 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1812 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 55:
+-#line 255 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 259 "src/preproc/eqn/eqn.ypp"
+ { (yyval.b) = make_special_box((yyvsp[-1].str), (yyvsp[0].b)); }
+-#line 1803 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1818 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 56:
+-#line 260 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 264 "src/preproc/eqn/eqn.ypp"
+ {
+ int n;
+ if (sscanf((yyvsp[0].str), "%d", &n) == 1)
+ (yyval.n) = n;
+ a_delete (yyvsp[0].str);
+ }
+-#line 1814 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1829 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 57:
+-#line 270 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 274 "src/preproc/eqn/eqn.ypp"
+ { (yyval.pb) = new pile_box((yyvsp[0].b)); }
+-#line 1820 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1835 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 58:
+-#line 272 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 276 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[-2].pb)->append((yyvsp[0].b)); (yyval.pb) = (yyvsp[-2].pb); }
+-#line 1826 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1841 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 59:
+-#line 277 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 281 "src/preproc/eqn/eqn.ypp"
+ { (yyval.pb) = (yyvsp[-1].pb); }
+-#line 1832 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1847 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 60:
+-#line 279 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 283 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[-1].pb)->set_space((yyvsp[-3].n)); (yyval.pb) = (yyvsp[-1].pb); }
+-#line 1838 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1853 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 61:
+-#line 284 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 288 "src/preproc/eqn/eqn.ypp"
+ { (yyval.mb) = new matrix_box((yyvsp[0].col)); }
+-#line 1844 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1859 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 62:
+-#line 286 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 290 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[-1].mb)->append((yyvsp[0].col)); (yyval.mb) = (yyvsp[-1].mb); }
+-#line 1850 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1865 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 63:
+-#line 291 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 295 "src/preproc/eqn/eqn.ypp"
+ { (yyval.col) = new column((yyvsp[0].b)); }
+-#line 1856 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1871 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 64:
+-#line 293 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 297 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[-2].col)->append((yyvsp[0].b)); (yyval.col) = (yyvsp[-2].col); }
+-#line 1862 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1877 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 65:
+-#line 298 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 302 "src/preproc/eqn/eqn.ypp"
+ { (yyval.col) = (yyvsp[-1].col); }
+-#line 1868 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1883 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 66:
+-#line 300 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 304 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[-1].col)->set_space((yyvsp[-3].n)); (yyval.col) = (yyvsp[-1].col); }
+-#line 1874 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1889 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 67:
+-#line 305 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 309 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[0].col); }
+-#line 1880 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1895 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 68:
+-#line 307 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 311 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].col)->set_alignment(LEFT_ALIGN); (yyval.col) = (yyvsp[0].col); }
+-#line 1886 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1901 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 69:
+-#line 309 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 313 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].col)->set_alignment(RIGHT_ALIGN); (yyval.col) = (yyvsp[0].col); }
+-#line 1892 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1907 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 70:
+-#line 311 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 315 "src/preproc/eqn/eqn.ypp"
+ { (yyvsp[0].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[0].col); }
+-#line 1898 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1913 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 71:
+-#line 315 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 319 "src/preproc/eqn/eqn.ypp"
+ { (yyval.str) = (yyvsp[0].str); }
+-#line 1904 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1919 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 72:
+-#line 317 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 321 "src/preproc/eqn/eqn.ypp"
+ { (yyval.str) = (yyvsp[0].str); }
+-#line 1910 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1925 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 73:
+-#line 322 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 326 "src/preproc/eqn/eqn.ypp"
+ { (yyval.str) = (yyvsp[0].str); }
+-#line 1916 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1931 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 74:
+-#line 324 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 328 "src/preproc/eqn/eqn.ypp"
+ { (yyval.str) = strsave("{"); }
+-#line 1922 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1937 "src/preproc/eqn/eqn.cpp"
+ break;
+
+ case 75:
+-#line 326 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */
++#line 330 "src/preproc/eqn/eqn.ypp"
+ { (yyval.str) = strsave("}"); }
+-#line 1928 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1943 "src/preproc/eqn/eqn.cpp"
+ break;
+
+
+-#line 1932 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */
++#line 1947 "src/preproc/eqn/eqn.cpp"
++
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+@@ -2042,12 +2058,10 @@ yyerrlab:
+ | yyerrorlab -- error raised explicitly by YYERROR. |
+ `---------------------------------------------------*/
+ yyerrorlab:
+-
+- /* Pacify compilers like GCC when the user code never invokes
+- YYERROR and the label yyerrorlab therefore never appears in user
+- code. */
+- if (/*CONSTCOND*/ 0)
+- goto yyerrorlab;
++ /* Pacify compilers when the user code never invokes YYERROR and the
++ label yyerrorlab therefore never appears in user code. */
++ if (0)
++ YYERROR;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+@@ -2109,6 +2123,7 @@ yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
++
+ /*-----------------------------------.
+ | yyabortlab -- YYABORT comes here. |
+ `-----------------------------------*/
+@@ -2116,6 +2131,7 @@ yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
++
+ #if !defined yyoverflow || YYERROR_VERBOSE
+ /*-------------------------------------------------.
+ | yyexhaustedlab -- memory exhaustion comes here. |
+@@ -2126,6 +2142,10 @@ yyexhaustedlab:
+ /* Fall through. */
+ #endif
+
++
++/*-----------------------------------------------------.
++| yyreturn -- parsing is finished, return the result. |
++`-----------------------------------------------------*/
+ yyreturn:
+ if (yychar != YYEMPTY)
+ {
+@@ -2155,5 +2175,5 @@ yyreturn:
+ #endif
+ return yyresult;
+ }
+-#line 329 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1903 */
++#line 333 "src/preproc/eqn/eqn.ypp"
+
+diff --git a/src/preproc/eqn/eqn.hpp b/src/preproc/eqn/eqn.hpp
+index 32a32a5..9a092c1 100644
+--- a/src/preproc/eqn/eqn.hpp
++++ b/src/preproc/eqn/eqn.hpp
+@@ -1,8 +1,9 @@
+-/* A Bison parser, made by GNU Bison 3.2. */
++/* A Bison parser, made by GNU Bison 3.4.1. */
+
+ /* Bison interface for Yacc-like parsers in C
+
+- Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
++ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
++ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -170,10 +171,9 @@ extern int yydebug;
+
+ /* Value type. */
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+-
+ union YYSTYPE
+ {
+-#line 30 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1906 */
++#line 34 "src/preproc/eqn/eqn.ypp"
+
+ char *str;
+ box *b;
+@@ -182,9 +182,9 @@ union YYSTYPE
+ int n;
+ column *col;
+
+-#line 186 "src/preproc/eqn/eqn.hpp" /* yacc.c:1906 */
+-};
++#line 186 "src/preproc/eqn/eqn.hpp"
+
++};
+ typedef union YYSTYPE YYSTYPE;
+ # define YYSTYPE_IS_TRIVIAL 1
+ # define YYSTYPE_IS_DECLARED 1
+diff --git a/src/preproc/eqn/eqn.ypp b/src/preproc/eqn/eqn.ypp
+index fb318c3..b7b647e 100644
+--- a/src/preproc/eqn/eqn.ypp
++++ b/src/preproc/eqn/eqn.ypp
+@@ -16,6 +16,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ %{
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+diff --git a/src/preproc/eqn/other.cpp b/src/preproc/eqn/other.cpp
+index 8db993f..38db396 100644
+--- a/src/preproc/eqn/other.cpp
++++ b/src/preproc/eqn/other.cpp
+@@ -17,6 +17,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdlib.h>
+
+ #include "eqn.h"
+diff --git a/src/preproc/eqn/text.cpp b/src/preproc/eqn/text.cpp
+index f3d06f9..3b244d5 100644
+--- a/src/preproc/eqn/text.cpp
++++ b/src/preproc/eqn/text.cpp
+@@ -17,6 +17,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <ctype.h>
+ #include <stdlib.h>
+ #include "eqn.h"
+diff --git a/src/preproc/pic/object.cpp b/src/preproc/pic/object.cpp
+index d8ba610..f26a831 100644
+--- a/src/preproc/pic/object.cpp
++++ b/src/preproc/pic/object.cpp
+@@ -17,6 +17,10 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdlib.h>
+
+ #include "pic.h"
+--
+2.22.0
+
diff --git a/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
new file mode 100644
index 0000000000..eda6a40f51
--- /dev/null
+++ b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
@@ -0,0 +1,106 @@
+From 6821a23e6cf34df37c351b45be413a8da9115f9f Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 11 May 2019 17:03:03 +0800
+Subject: [PATCH 1/2] replace "perl -w" with "use warnings"
+
+The shebang's max length is usually 128 as defined in
+/usr/include/linux/binfmts.h:
+ #define BINPRM_BUF_SIZE 128
+
+There would be errors when @PERL@ is longer than 128, use
+'/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w'
+doesn't work:
+
+/usr/bin/env: perl -w: No such file or directory
+
+So replace "perl -w" with "use warnings" to make it work.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Rebase to 1.22.4.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ font/devpdf/util/BuildFoundries.pl | 3 ++-
+ src/devices/gropdf/gropdf.pl | 3 ++-
+ src/devices/gropdf/pdfmom.pl | 3 ++-
+ src/utils/afmtodit/afmtodit.pl | 3 ++-
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl
+index f8af826..9584e28 100644
+--- a/font/devpdf/util/BuildFoundries.pl
++++ b/font/devpdf/util/BuildFoundries.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/perl
+ #
+ # BuildFoundries : Given a Foundry file generate groff and download files
+ # Deri James : Monday 07 Feb 2011
+@@ -22,6 +22,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ use strict;
++use warnings;
+
+ (my $progname = $0) =~s @.*/@@;
+ my $where=shift||'';
+diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
+index 2ec52d0..ce5a06f 100644
+--- a/src/devices/gropdf/gropdf.pl
++++ b/src/devices/gropdf/gropdf.pl
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!@PERL@
+ #
+ # gropdf : PDF post processor for groff
+ #
+@@ -21,6 +21,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ use strict;
++use warnings;
+ use Getopt::Long qw(:config bundling);
+
+ use constant
+diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl
+index c9b08b2..61124f3 100644
+--- a/src/devices/gropdf/pdfmom.pl
++++ b/src/devices/gropdf/pdfmom.pl
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!@PERL@
+ #
+ # pdfmom : Frontend to run groff -mom to produce PDFs
+ # Deri James : Friday 16 Mar 2012
+@@ -23,6 +23,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ use strict;
++use warnings;
+ use File::Temp qw/tempfile/;
+ my @cmd;
+ my $dev='pdf';
+diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
+index 954c58e..81a6c97 100644
+--- a/src/utils/afmtodit/afmtodit.pl
++++ b/src/utils/afmtodit/afmtodit.pl
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl -w
++#! /usr/bin/perl
+ # -*- Perl -*-
+ # Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ # Written by James Clark (jjc@jclark.com)
+@@ -19,6 +19,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ use strict;
++use warnings;
+
+ @afmtodit.tables@
+
+--
+2.7.4
+
diff --git a/meta/recipes-extended/groff/files/0001-support-musl.patch b/meta/recipes-extended/groff/files/0001-support-musl.patch
new file mode 100644
index 0000000000..a837b11b1b
--- /dev/null
+++ b/meta/recipes-extended/groff/files/0001-support-musl.patch
@@ -0,0 +1,41 @@
+From 695965c27be74acb5968f19d51af86065c4b71a9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 13 May 2019 09:48:14 +0800
+Subject: [PATCH] support musl
+
+...
+|./lib/math.h:2877:1: error: 'int signbit(float)' conflicts with a previous declaration
+| _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
+| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+|In file included from recipe-sysroot/usr/include/c++/8.3.0/math.h:36,
+| from ./lib/math.h:27,
+| from ./src/include/driver.h:27,
+| from src/devices/grodvi/dvi.cpp:20:
+|recipe-sysroot/usr/include/c++/8.3.0/cmath:661:3: note: previous declaration 'constexpr bool std::signbit(float)'
+| signbit(float __x)
+| ^~~~~~~
+...
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=453ff940449bbbde9ec00f0bbf82a359c5598fc7]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gnulib_m4/signbit.m4 | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gnulib_m4/signbit.m4 b/gnulib_m4/signbit.m4
+index 9e7884d..8b9c70c 100644
+--- a/gnulib_m4/signbit.m4
++++ b/gnulib_m4/signbit.m4
+@@ -31,6 +31,8 @@ AC_DEFUN([gl_SIGNBIT],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
++ # Guess yes on musl systems.
++ *-musl*) gl_cv_func_signbit="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_signbit="guessing yes" ;;
+ # If we don't know, assume the worst.
+--
+2.7.4
+
diff --git a/meta/recipes-extended/groff/files/groff-not-search-fonts-on-build-host.patch b/meta/recipes-extended/groff/files/groff-not-search-fonts-on-build-host.patch
new file mode 100644
index 0000000000..c80a2a5c38
--- /dev/null
+++ b/meta/recipes-extended/groff/files/groff-not-search-fonts-on-build-host.patch
@@ -0,0 +1,32 @@
+From 75761ae7adc88412de4379d1cf5484b055cd5f18 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 17:06:29 +0800
+Subject: [PATCH 2/2] groff searchs fonts which are provided by ghostscript on
+ build host. It causes non-determinism issue. So not search font dirs on host.
+
+Upstream-Status: Inappropriate [cross build specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+Rebase to 1.22.4
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ font/devpdf/Foundry.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/font/devpdf/Foundry.in b/font/devpdf/Foundry.in
+index 93e9b66..235b23b 100644
+--- a/font/devpdf/Foundry.in
++++ b/font/devpdf/Foundry.in
+@@ -65,7 +65,7 @@ ZD|Y||||Dingbats!d050000l.pfb
+ #======================================================================
+
+ #Foundry|Name|Searchpath
+-foundry|U|(gs):@urwfontsdir@ :/usr/share/fonts/type1/gsfonts :/opt/local/share/fonts/urw-fonts # the URW fonts delivered with ghostscript (may be different)
++foundry|U|(gs) # the URW fonts delivered with ghostscript (may be different)
+ #Define Flags for afmtodit
+
+ r=-i 0 -m
+--
+2.7.4
+
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch b/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch
deleted file mode 100644
index 4b0176fcdd..0000000000
--- a/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From fc289ab69c6d7e4ad489172509a85f68afec43ea Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Fri, 29 Jul 2016 03:19:39 -0400
-Subject: [PATCH] fix narrowing conversion error
-
-While gcc6 used, build old groff (for anti-GPLv3 reasons) failed:
-.....
-|groff-1.18.1.4/src/devices/grolbp/charset.h:69:1: error: narrowing
-conversion of '130' from 'int' to 'char' inside { } [-Wnarrowing]
-......
-
-In upstream git://git.savannah.gnu.org/groff.git,
-the following commit fix the issue, but the license is GPLV3,
-we could not backport it to the old groff which license is GPLV2.
-...
-commit d180038ae0da19655bc2760ae2043efa0550a76c
-Author: Werner LEMBERG <wl@gnu.org>
-Date: Wed Apr 16 21:11:07 2003 +0000
- * src/devices/grolbp/charset.h (symset): Use `unsigned char'.
-...
-
-We use another different way to fix the issue.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- src/devices/grolbp/charset.h | 2 +-
- src/devices/grolbp/lbp.cc | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/devices/grolbp/charset.h b/src/devices/grolbp/charset.h
-index adc76f4..e9c6c5b 100644
---- a/src/devices/grolbp/charset.h
-+++ b/src/devices/grolbp/charset.h
-@@ -1,6 +1,6 @@
- // Definition of the WP54 character set
-
--char symset[] = {
-+int symset[] = {
- 0x57,0x50,0x35,0x34,0x00,0x41,0x76,0x61,0x6e,0x74,0x47,0x61,
- 0x72,0x64,0x65,0x2d,0x42,0x6f,0x6f,0x6b,0x00,0x41,0x76,
- 0x61,0x6e,0x74,0x47,0x61,0x72,0x64,0x65,0x2d,0x44,0x65,
-diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc
-index 76db32a..00d4ca7 100644
---- a/src/devices/grolbp/lbp.cc
-+++ b/src/devices/grolbp/lbp.cc
-@@ -152,8 +152,8 @@ static void wp54charset()
- {
- unsigned int i;
- lbpputs("\033[714;100;29;0;32;120.}");
-- for (i = 0; i < sizeof(symset); i++)
-- lbpputc(symset[i]);
-+ for (i = 0; i < sizeof(symset)/sizeof(symset[0]); i++)
-+ lbpputc((char)symset[i]&0xFF);
- lbpputs("\033[100;0 D");
- return;
- }
---
-2.8.1
-
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch
deleted file mode 100644
index 559ae72898..0000000000
--- a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Inappropriate [embedded]
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
----
- Makefile.sub | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
---- a/contrib/groffer/Makefile.sub
-+++ b/contrib/groffer/Makefile.sub
-@@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version.
- $(RM) $@;
- sed \
- -e "s|@g@|$(g)|g" \
-- -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
-+ -e "s|@BINDIR@|$(bindir)|g" \
- -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
- -e "s|@VERSION@|$(version)$(revision)|g" \
- $(srcdir)/groffer.sh >$@;
- chmod +x $@
-
- install_data: groffer
-- -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
-- -$(RM) $(DESTDIR)$(bindir)/groffer
-- $(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer
-+ -test -d $(bindir) || $(mkinstalldirs) $(bindir)
-+ -$(RM) $(bindir)/groffer
-+ $(INSTALL_SCRIPT) groffer $(bindir)/groffer
- -test -d $(DESTDIR)$(libdir)/groff/groffer || \
- $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer
- -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
-@@ -58,7 +58,7 @@ install_data: groffer
- $(DESTDIR)$(libdir)/groff/groffer/version.sh
-
- uninstall_sub:
-- -$(RM) $(DESTDIR)$(bindir)/groffer
-+ -$(RM) $(bindir)/groffer
- -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
- -$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh
- -rmdir $(DESTDIR)$(libdir)/groff/groffer
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch
deleted file mode 100644
index c24eff9af5..0000000000
--- a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-
-Upstream-Status: Inappropriate [embedded]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- groff-1.18.1.4/Makefile.in | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -460,27 +460,22 @@ OTHERDIRS=\
- src/roff/grog \
- src/roff/nroff \
- contrib/mm \
- contrib/pic2graph \
- contrib/eqn2graph \
-- contrib/groffer \
-- contrib/mom \
-- doc
-+ contrib/groffer
- ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
- $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
- EXTRADIRS=\
- font/devps/generate \
- font/devdvi/generate \
- font/devlj4/generate \
-- src/xditview \
- doc
- NOMAKEDIRS=\
- arch/djgpp \
- contrib/mm/examples \
- contrib/mm/mm \
-- contrib/mom/examples \
-- contrib/mom/momdoc \
- src/libs/snprintf
- DISTDIRS=\
- $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \
- $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS)
- TARGETS=all install install_bin install_data clean distclean mostlyclean \
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch
deleted file mode 100644
index e3f1aa6a48..0000000000
--- a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Upstream-Status: Inappropriate [embedded]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: groff-1.18.1.4/tmac/man.local
-===================================================================
---- groff-1.18.1.4.orig/tmac/man.local 2000-10-26 22:15:17.000000000 +0800
-+++ groff-1.18.1.4/tmac/man.local 2010-08-24 14:17:52.070006664 +0800
-@@ -1,2 +1,27 @@
- .\" This file is loaded after an-old.tmac.
- .\" Put any local modifications to an-old.tmac here.
-+.
-+.if n \{\
-+. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other
-+. \" than utf8.
-+. if !'\*[.T]'utf8' \
-+. tr \[oq]'
-+.
-+. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by
-+. \" grotty.
-+. if '\V[GROFF_SGR]'' \
-+. output x X tty: sgr 0
-+.
-+. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make
-+. \" searching in man pages easier.
-+. if '\*[.T]'utf8' \
-+. char \- \N'45'
-+.
-+. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such
-+. \" as those in command-line options. This is a bug in those pages, but
-+. \" too many fonts are missing the Unicode HYPHEN character, so we render
-+. \" this as the ASCII-compatible HYPHEN-MINUS instead.
-+. if '\*[.T]'utf8' \
-+. char - \N'45'
-+.\}
-+
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch
deleted file mode 100644
index 409c1a5a18..0000000000
--- a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Upstream-Status: Inappropriate [embedded]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: groff-1.18.1.4/tmac/mdoc.local
-===================================================================
---- groff-1.18.1.4.orig/tmac/mdoc.local 2001-03-23 08:17:51.000000000 +0800
-+++ groff-1.18.1.4/tmac/mdoc.local 2010-08-24 14:20:22.014006846 +0800
-@@ -1,2 +1,26 @@
- .\" This file is loaded after doc.tmac.
- .\" Put any local modifications to doc.tmac here.
-+.
-+.if n \{\
-+. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other
-+. \" than utf8.
-+. if !'\*[.T]'utf8' \
-+. tr \[oq]'
-+.
-+. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by
-+. \" grotty.
-+. if '\V[GROFF_SGR]'' \
-+. output x X tty: sgr 0
-+.
-+. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make
-+. \" searching in man pages easier.
-+. if '\*[.T]'utf8' \
-+. char \- \N'45'
-+.
-+. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such
-+. \" as those in command-line options. This is a bug in those pages, but
-+. \" too many fonts are missing the Unicode HYPHEN character, so we render
-+. \" this as the ASCII-compatible HYPHEN-MINUS instead.
-+. if '\*[.T]'utf8' \
-+. char - \N'45'
-+.\}
diff --git a/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index b61b432818..0000000000
--- a/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: groff-1.22.3/src/libs/gnulib/lib/Makefile.am
-===================================================================
---- groff-1.22.3.orig/src/libs/gnulib/lib/Makefile.am
-+++ groff-1.22.3/src/libs/gnulib/lib/Makefile.am
-@@ -113,7 +113,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch b/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch
deleted file mode 100644
index c73328a186..0000000000
--- a/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Correct the install path of man.local to fix following error:
- /yocto/build/tmp/sysroots/x86_64-linux/usr/share/groff/1.22.2/tmac/an-old.tmac:690: warning: can't find macro file `man.local'
-
-Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
-Upstream-Status: Pending
-
-diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
-index 1506232..f1468c5 100644
---- a/tmac/Makefile.sub
-+++ b/tmac/Makefile.sub
-@@ -121,9 +121,9 @@ install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
- $(RM) $(DESTDIR)$(mdocdir)/$$f; \
- $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \
- done
-- -test -f $(DESTDIR)$(localtmacdir)/man.local \
-+ -test -f $(DESTDIR)$(tmacdir)/man.local \
- || $(INSTALL_DATA) $(srcdir)/man.local \
-- $(DESTDIR)$(localtmacdir)/man.local
-+ $(DESTDIR)$(tmacdir)/man.local
- -test -f $(DESTDIR)$(localtmacdir)/mdoc.local \
- || $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local
-
-@@ -164,9 +164,9 @@ uninstall_sub:
- $(RM) $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
- $(RM) $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
- $(RM) $(DESTDIR)$(tmacdir)/www.tmac
-- -if cmp -s $(DESTDIR)$(localtmacdir)/man.local \
-+ -if cmp -s $(DESTDIR)$(tmacdir)/man.local \
- $(srcdir)/man.local; then \
-- $(RM) $(DESTDIR)$(localtmacdir)/man.local; \
-+ $(RM) $(DESTDIR)$(tmacdir)/man.local; \
- fi
- -if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \
- $(srcdir)/mdoc.local; then \
diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb
deleted file mode 100644
index fc7eb44781..0000000000
--- a/meta/recipes-extended/groff/groff_1.18.1.4.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "GNU Troff software"
-DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
-formatting commands and produces formatted output."
-SECTION = "console/utils"
-HOMEPAGE = "http://www.gnu.org/software/groff/"
-LICENSE = "GPLv2"
-PR = "r1"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/old/${BP}.tar.gz \
- file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \
- file://man-local.patch \
- file://mdoc-local.patch \
- file://groff-1.18.1.4-fix-bindir.patch \
- file://fix-narrowing-conversion-error.patch \
-"
-
-inherit autotools texinfo
-
-EXTRA_OECONF="--without-x --prefix=${D} --exec-prefix=${D} --bindir=${D}${bindir} --datadir=${D}${datadir} --mandir=${D}${datadir}/man --infodir=${D}${datadir}info --with-appresdir=${D}${datadir}"
-
-SRC_URI[md5sum] = "ceecb81533936d251ed015f40e5f7287"
-SRC_URI[sha256sum] = "ff3c7c3b6cae5e8cc5062a144de5eff0022e8e970e1774529cc2d5dde46ce50d"
-PARALLEL_MAKE = ""
-
-do_configure (){
- oe_runconf
-}
-
-do_install_append() {
- # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
- # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
- for i in afmtodit mmroff; do
- if [ -f ${D}${bindir}/$i ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
- fi
- done
-
- mkdir -p ${D}${sysconfdir}/groff
- cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${sysconfdir}/groff/
- cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${datadir}/groff/${PV}/tmac/
-}
-
-pkg_postinst_${PN}() {
- ln -s tbl $D${bindir}/gtbl
- echo "export GROFF_FONT_PATH=/usr/share/groff/${PV}/font" >> $D${sysconfdir}/profile
- echo "export GROFF_TMAC_PATH=/usr/share/groff/${PV}/tmac" >> $D${sysconfdir}/profile
-}
-
diff --git a/meta/recipes-extended/groff/groff_1.22.3.bb b/meta/recipes-extended/groff/groff_1.22.3.bb
deleted file mode 100644
index dd241f3f84..0000000000
--- a/meta/recipes-extended/groff/groff_1.22.3.bb
+++ /dev/null
@@ -1,81 +0,0 @@
-SUMMARY = "GNU Troff software"
-DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
-formatting commands and produces formatted output."
-SECTION = "base"
-HOMEPAGE = "http://www.gnu.org/software/groff/"
-LICENSE = "GPLv3"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
- file://groff-1.22.2-correct-man.local-install-path.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-"
-
-SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
-SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5"
-
-DEPENDS = "groff-native"
-DEPENDS_class-native = ""
-RDEPENDS_${PN} += "perl sed"
-
-inherit autotools texinfo
-
-EXTRA_OECONF = "--without-x"
-PARALLEL_MAKE = ""
-
-do_configure_prepend() {
- if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
- sed -i \
- -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \
- -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \
- -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
- -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
- ${S}/contrib/*/Makefile.sub \
- ${S}/doc/Makefile.in \
- ${S}/doc/Makefile.sub
- fi
-}
-
-do_configure_append() {
- # generate gnulib configure script
- olddir=`pwd`
- cd ${S}/src/libs/gnulib/
- ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
- cd ${olddir}
-}
-
-do_install_append() {
- # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
- # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
- for i in afmtodit mmroff gropdf pdfmom grog; do
- if [ -f ${D}${bindir}/$i ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
- fi
- done
- if [ -e ${D}${libdir}/charset.alias ]; then
- rm -rf ${D}${libdir}/charset.alias
- fi
-
- # awk is located at /usr/bin/, not /bin/
- SPECIAL_AWK=`find ${D} -name special.awk`
- if [ -f ${SPECIAL_AWK} ]; then
- sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK}
- fi
-
- # not ship /usr/bin/glilypond and its releated files in embedded target system
- rm -rf ${D}${bindir}/glilypond
- rm -rf ${D}${libdir}/groff/glilypond
- rm -rf ${D}${mandir}/man1/glilypond*
-}
-
-do_install_append_class-native() {
- create_cmdline_wrapper ${D}/${bindir}/groff \
- -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
- -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
-}
-
-FILES_${PN} += "${libdir}/${BPN}/site-tmac \
- ${libdir}/${BPN}/groffer/"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/groff/groff_1.22.4.bb b/meta/recipes-extended/groff/groff_1.22.4.bb
new file mode 100644
index 0000000000..082597f693
--- /dev/null
+++ b/meta/recipes-extended/groff/groff_1.22.4.bb
@@ -0,0 +1,65 @@
+SUMMARY = "GNU Troff software"
+DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
+formatting commands and produces formatted output."
+SECTION = "base"
+HOMEPAGE = "http://www.gnu.org/software/groff/"
+LICENSE = "GPLv3"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
+ file://0001-replace-perl-w-with-use-warnings.patch \
+ file://groff-not-search-fonts-on-build-host.patch \
+ file://0001-support-musl.patch \
+ file://0001-Include-config.h.patch \
+"
+
+SRC_URI[md5sum] = "08fb04335e2f5e73f23ea4c3adbf0c5f"
+SRC_URI[sha256sum] = "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293"
+
+DEPENDS = "bison-native"
+RDEPENDS_${PN} += "perl sed"
+
+inherit autotools-brokensep texinfo multilib_script pkgconfig
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/groffer ${PN}:${bindir}/grog"
+
+EXTRA_OECONF = "--without-x --without-doc"
+PARALLEL_MAKE = ""
+
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl' ac_cv_path_BASH_PROG='no'"
+
+do_install_append() {
+ # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
+ # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
+ for i in afmtodit mmroff gropdf pdfmom grog; do
+ if [ -f ${D}${bindir}/$i ]; then
+ sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
+ fi
+ done
+ if [ -e ${D}${libdir}/charset.alias ]; then
+ rm -rf ${D}${libdir}/charset.alias
+ fi
+
+ # awk is located at /usr/bin/, not /bin/
+ SPECIAL_AWK=`find ${D} -name special.awk`
+ if [ -f ${SPECIAL_AWK} ]; then
+ sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK}
+ fi
+
+ # not ship /usr/bin/glilypond and its releated files in embedded target system
+ rm -rf ${D}${bindir}/glilypond
+ rm -rf ${D}${libdir}/groff/glilypond
+ rm -rf ${D}${mandir}/man1/glilypond*
+}
+
+do_install_append_class-native() {
+ create_cmdline_wrapper ${D}/${bindir}/groff \
+ -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
+ -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
+}
+
+FILES_${PN} += "${libdir}/${BPN}/site-tmac \
+ ${libdir}/${BPN}/groffer/"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gzip/files/run-ptest b/meta/recipes-extended/gzip/files/run-ptest
new file mode 100644
index 0000000000..cf7c64949a
--- /dev/null
+++ b/meta/recipes-extended/gzip/files/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd src/tests
+
+make check
+
diff --git a/meta/recipes-extended/gzip/gzip-1.10/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.10/wrong-path-fix.patch
new file mode 100644
index 0000000000..7c37bc8d2d
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.10/wrong-path-fix.patch
@@ -0,0 +1,36 @@
+fix MakeMaker issues with using wrong SHELL/GREP
+
+A set of substitution is being processed to all target scripts with sed by
+replacing some key words with the detected values at configure time, this
+is exactly not compliant with cross compling, and will cause missing path
+errors at run time like:
+"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
+
+Fixed by removing unneeded substitution and using real runtime paths
+instead.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+Upstream-Status: Pending
+
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d4ecc3f..e4657d2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -82,8 +82,7 @@ SUFFIXES = .in
+ .in:
+ $(AM_V_GEN)rm -f $@-t $@ \
+ && sed \
+- -e 's|/bin/sh|$(SHELL)|g' \
+- -e 's|[@]GREP@|$(GREP)|g' \
++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
+ -e 's|[@]VERSION@|$(VERSION)|g' \
+ $(srcdir)/$@.in >$@-t \
+ && chmod a=rx $@-t \
+--
+2.7.4
+
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch
deleted file mode 100644
index d9e8d212bf..0000000000
--- a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict.
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Upstream-Status: Inappropriate [licensing]
-
-Index: gzip-1.3.12/gzip.c
-===================================================================
---- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800
-+++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800
-@@ -1637,7 +1637,7 @@
- }
- }
-
-- if (futimens (ofd, ofname, timespec) != 0)
-+ if (futimens_gnulib (ofd, ofname, timespec) != 0)
- {
- int e = errno;
- WARN ((stderr, "%s: ", program_name));
-Index: gzip-1.3.12/lib/utimens.c
-===================================================================
---- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800
-+++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800
-@@ -75,7 +75,7 @@
- Return 0 on success, -1 (setting errno) on failure. */
-
- int
--futimens (int fd ATTRIBUTE_UNUSED,
-+futimens_gnulib (int fd ATTRIBUTE_UNUSED,
- char const *file, struct timespec const timespec[2])
- {
- /* Some Linux-based NFS clients are buggy, and mishandle time stamps
-@@ -185,5 +185,5 @@
- int
- utimens (char const *file, struct timespec const timespec[2])
- {
-- return futimens (-1, file, timespec);
-+ return futimens_gnulib (-1, file, timespec);
- }
-Index: gzip-1.3.12/lib/utimens.h
-===================================================================
---- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800
-+++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800
-@@ -1,3 +1,3 @@
- #include <time.h>
--int futimens (int, char const *, struct timespec const [2]);
-+int futimens_gnulib (int, char const *, struct timespec const [2]);
- int utimens (char const *, struct timespec const [2]);
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch
deleted file mode 100644
index 6b2f69870e..0000000000
--- a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular
-dependency of AC_GNU_SOURCE"
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Upstream-Status: Inappropriate [licensing]
-
-Index: gzip-1.3.12/m4/extensions.m4
-===================================================================
---- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800
-+++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800
-@@ -12,44 +12,6 @@
- # enough in this area it's likely we'll need to redefine
- # AC_USE_SYSTEM_EXTENSIONS for quite some time.
-
--# AC_USE_SYSTEM_EXTENSIONS
--# ------------------------
--# Enable extensions on systems that normally disable them,
--# typically due to standards-conformance issues.
--AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
--[
-- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-- AC_BEFORE([$0], [AC_RUN_IFELSE])
--
-- AC_REQUIRE([AC_GNU_SOURCE])
-- AC_REQUIRE([AC_AIX])
-- AC_REQUIRE([AC_MINIX])
--
-- AH_VERBATIM([__EXTENSIONS__],
--[/* Enable extensions on Solaris. */
--#ifndef __EXTENSIONS__
--# undef __EXTENSIONS__
--#endif
--#ifndef _POSIX_PTHREAD_SEMANTICS
--# undef _POSIX_PTHREAD_SEMANTICS
--#endif
--#ifndef _TANDEM_SOURCE
--# undef _TANDEM_SOURCE
--#endif])
-- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
-- [ac_cv_safe_to_define___extensions__],
-- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([
--# define __EXTENSIONS__ 1
-- AC_INCLUDES_DEFAULT])],
-- [ac_cv_safe_to_define___extensions__=yes],
-- [ac_cv_safe_to_define___extensions__=no])])
-- test $ac_cv_safe_to_define___extensions__ = yes &&
-- AC_DEFINE([__EXTENSIONS__])
-- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-- AC_DEFINE([_TANDEM_SOURCE])
--])
--
- # gl_USE_SYSTEM_EXTENSIONS
- # ------------------------
- # Enable extensions on systems that normally disable them,
diff --git a/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch
deleted file mode 100644
index 4dc10002ed..0000000000
--- a/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-fix MakeMaker issues with using wrong SHELL/GREP
-
-A set of substitution is being processed to all target scripts with sed by
-replacing some key words with the detected values at configure time, this
-is exactly not compliant with cross compling, and will cause missing path
-errors at run time like:
-"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
-
-Fixed by removing unneeded substitution and using real runtime paths
-instead.
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
-
-Upstream-Status: Pending
-
-Index: gzip-1.8/Makefile.am
-===================================================================
---- gzip-1.8.orig/Makefile.am
-+++ gzip-1.8/Makefile.am
-@@ -81,8 +81,7 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
- SUFFIXES = .in
- .in:
- $(AM_V_GEN)sed \
-- -e 's|/bin/sh|$(SHELL)|g' \
-- -e 's|[@]GREP@|$(GREP)|g' \
-+ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
- -e 's|[@]VERSION@|$(VERSION)|g' \
- $(srcdir)/$@.in >$@-t \
- && chmod a+x $@-t \
diff --git a/meta/recipes-extended/gzip/gzip_1.10.bb b/meta/recipes-extended/gzip/gzip_1.10.bb
new file mode 100644
index 0000000000..50dad7bf58
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip_1.10.bb
@@ -0,0 +1,40 @@
+require gzip.inc
+
+LICENSE = "GPLv3+"
+
+SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \
+ file://run-ptest \
+ "
+SRC_URI_append_class-target = " file://wrong-path-fix.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
+
+PROVIDES_append_class-native = " gzip-replacement-native"
+
+RDEPENDS_${PN}-ptest += "make perl perl-ptest grep diffutils"
+
+BBCLASSEXTEND = "native nativesdk"
+
+inherit ptest
+
+do_install_ptest() {
+ mkdir -p ${D}${PTEST_PATH}/src/build-aux
+ cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/src/build-aux/
+ mkdir -p ${D}${PTEST_PATH}/src/tests
+ cp -r ${S}/tests/* ${D}${PTEST_PATH}/src/tests
+ sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \
+ -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \
+ -e 's/^GREP = ..*/GREP = grep/' \
+ -e 's/^AWK = ..*/AWK = awk/' \
+ -e 's/^srcdir = ..*/srcdir = \./' \
+ -e 's/^Makefile: ..*/Makefile: /' \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile
+}
+
+SRC_URI[md5sum] = "cf9ee51aff167ff69844d5d7d71c8b20"
+SRC_URI[sha256sum] = "c91f74430bf7bc20402e1f657d0b252cb80aa66ba333a25704512af346633c68"
diff --git a/meta/recipes-extended/gzip/gzip_1.3.12.bb b/meta/recipes-extended/gzip/gzip_1.3.12.bb
deleted file mode 100644
index e4062827bd..0000000000
--- a/meta/recipes-extended/gzip/gzip_1.3.12.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require gzip.inc
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \
- file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 "
-
-SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \
- file://m4-extensions-fix.patch \
- file://dup-def-fix.patch"
-
-SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1"
-SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af"
-
-PR = "r2"
diff --git a/meta/recipes-extended/gzip/gzip_1.8.bb b/meta/recipes-extended/gzip/gzip_1.8.bb
deleted file mode 100644
index a19b965399..0000000000
--- a/meta/recipes-extended/gzip/gzip_1.8.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require gzip.inc
-
-LICENSE = "GPLv3+"
-
-SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
-SRC_URI_append_class-target = " file://wrong-path-fix.patch"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
-
-PROVIDES_append_class-native = " gzip-replacement-native"
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "732553152814b22dc35aa0267df5286c"
-SRC_URI[sha256sum] = "1ff7aedb3d66a0d73f442f6261e4b3860df6fd6c94025c2cb31a202c9c60fe0e"
-
diff --git a/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch b/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch
new file mode 100644
index 0000000000..4af1b617ed
--- /dev/null
+++ b/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch
@@ -0,0 +1,38 @@
+From e233006ee212109d2a1401dac37a9a851cc493d8 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 14 Dec 2017 15:23:47 +0800
+Subject: [PATCH] wiper.sh: fix stat path
+
+Fix the stat path for OE.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ wiper/wiper.sh | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/wiper/wiper.sh b/wiper/wiper.sh
+index 79eddc8..9ef2840 100755
+--- a/wiper/wiper.sh
++++ b/wiper/wiper.sh
+@@ -97,7 +97,6 @@ function find_prog(){
+ hash -r ## Refresh bash's cached PATH entries
+ HDPARM=`find_prog /sbin/hdparm` || exit 1
+ FIND=`find_prog /usr/bin/find` || exit 1
+-STAT=`find_prog /usr/bin/stat` || exit 1
+ GAWK=`find_prog /usr/bin/gawk` || exit 1
+ BLKID=`find_prog /sbin/blkid` || exit 1
+ GREP=`find_prog /bin/grep` || exit 1
+@@ -105,7 +104,7 @@ ID=`find_prog /usr/bin/id` || exit 1
+ LS=`find_prog /bin/ls` || exit 1
+ DF=`find_prog /bin/df` || exit 1
+ RM=`find_prog /bin/rm` || exit 1
+-STAT=`find_prog /usr/bin/stat` || exit 1
++STAT=`find_prog /bin/stat` || exit 1
+
+ [ $verbose -gt 1 ] && HDPARM="$HDPARM --verbose"
+
+--
+2.7.4
+
diff --git a/meta/recipes-extended/hdparm/hdparm_9.48.bb b/meta/recipes-extended/hdparm/hdparm_9.48.bb
deleted file mode 100644
index cd85776cf8..0000000000
--- a/meta/recipes-extended/hdparm/hdparm_9.48.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
-DESCRIPTION = "hdparm is a Linux shell utility for viewing \
-and manipulating various IDE drive and driver parameters."
-SECTION = "console/utils"
-
-LICENSE = "BSD & GPLv2"
-LICENSE_${PN} = "BSD"
-LICENSE_${PN}-dbg = "BSD"
-LICENSE_wiper = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
- file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
- file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
- file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
-
-
-PACKAGES =+ "wiper"
-
-FILES_wiper = "${bindir}/wiper.sh"
-
-RDEPENDS_wiper = "bash gawk stat"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz "
-
-SRC_URI[md5sum] = "213efdbe7471fad3408198918e164354"
-SRC_URI[sha256sum] = "ce97b4a71cb04146f54cf6f69787e7f97ddfda9836dc803b459d3b3df3a4fbee"
-
-EXTRA_OEMAKE = '-e MAKEFLAGS= STRIP="echo"'
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "hdparm"
-ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm"
-ALTERNATIVE_PRIORITY = "100"
-
-do_install () {
- install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
- oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
- cp ${S}/wiper/wiper.sh ${D}/${bindir}
-}
diff --git a/meta/recipes-extended/hdparm/hdparm_9.58.bb b/meta/recipes-extended/hdparm/hdparm_9.58.bb
new file mode 100644
index 0000000000..e47dedae89
--- /dev/null
+++ b/meta/recipes-extended/hdparm/hdparm_9.58.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
+HOMEPAGE = "http://sourceforge.net/projects/hdparm/"
+DESCRIPTION = "hdparm is a Linux shell utility for viewing \
+and manipulating various IDE drive and driver parameters."
+SECTION = "console/utils"
+
+LICENSE = "BSD & GPLv2"
+LICENSE_${PN} = "BSD"
+LICENSE_${PN}-dbg = "BSD"
+LICENSE_wiper = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=495d03e50dc6c89d6a30107ab0df5b03 \
+ file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
+ file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
+ file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
+
+
+PACKAGES =+ "wiper"
+
+FILES_wiper = "${bindir}/wiper.sh"
+
+RDEPENDS_wiper = "bash gawk coreutils"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz \
+ file://wiper.sh-fix-stat-path.patch \
+ "
+
+SRC_URI[md5sum] = "4652c49cf096a64683c05f54b4fa4679"
+SRC_URI[sha256sum] = "9ae78e883f3ce071d32ee0f1b9a2845a634fc4dd94a434e653fdbef551c5e10f"
+
+EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"'
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "hdparm"
+ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install () {
+ install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
+ oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
+ cp ${S}/wiper/wiper.sh ${D}/${bindir}
+}
diff --git a/meta/recipes-extended/images/core-image-kernel-dev.bb b/meta/recipes-extended/images/core-image-kernel-dev.bb
index a40b3aa955..4d16da1ea8 100644
--- a/meta/recipes-extended/images/core-image-kernel-dev.bb
+++ b/meta/recipes-extended/images/core-image-kernel-dev.bb
@@ -11,6 +11,7 @@ KERNEL_DEV_MODULE ?= "kernel-modules"
CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
${KERNEL_DEV_UTILS} \
${KERNEL_DEV_TOOLS} \
+ systemtap \
"
# We need extra space for things like kernel builds, etc.
@@ -18,3 +19,5 @@ IMAGE_ROOTFS_EXTRA_SPACE_append = " + 3000000"
# Let's define our own subset to test, we can later add a on-target kernel build even!
DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date parselogs"
+
+IMAGE_FEATURES += "tools-profile"
diff --git a/meta/recipes-extended/images/core-image-lsb-dev.bb b/meta/recipes-extended/images/core-image-lsb-dev.bb
deleted file mode 100644
index d2dc9e2b53..0000000000
--- a/meta/recipes-extended/images/core-image-lsb-dev.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require core-image-lsb.bb
-
-DESCRIPTION = "Basic image without X support suitable for development work. It \
-can be used for customization and implementations that conform to Linux \
-Standard Base (LSB)."
-
-IMAGE_FEATURES += "dev-pkgs"
diff --git a/meta/recipes-extended/images/core-image-lsb-sdk.bb b/meta/recipes-extended/images/core-image-lsb-sdk.bb
deleted file mode 100644
index c3b6e7c827..0000000000
--- a/meta/recipes-extended/images/core-image-lsb-sdk.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require core-image-lsb.bb
-
-DESCRIPTION = "Basic image without X support suitable for Linux Standard Base \
-(LSB) implementations. It includes the full meta-toolchain, plus development \
-headers and libraries to form a standalone SDK."
-
-IMAGE_FEATURES += "tools-sdk dev-pkgs tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks"
-
-IMAGE_INSTALL += "kernel-devsrc"
diff --git a/meta/recipes-extended/images/core-image-lsb.bb b/meta/recipes-extended/images/core-image-lsb.bb
deleted file mode 100644
index ab61c6e6df..0000000000
--- a/meta/recipes-extended/images/core-image-lsb.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-DESCRIPTION = "An image containing packages that are required to conform \
-to the Linux Standard Base (LSB) specification."
-
-IMAGE_FEATURES += "splash ssh-server-openssh hwcodecs package-management"
-
-IMAGE_INSTALL = "\
- ${CORE_IMAGE_BASE_INSTALL} \
- packagegroup-core-full-cmdline \
- packagegroup-core-lsb \
- "
-
-inherit core-image distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "pam"
diff --git a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
index b711b7aa36..03c36ccbc2 100644
--- a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
+++ b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
@@ -1,4 +1,7 @@
-[PATCH] configure: Add option to enable/disable libnfnetlink
+From c46db7c2e1f63ec525835553587e70c635565310 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 21 Feb 2017 11:16:31 +0200
+Subject: [PATCH] configure: Add option to enable/disable libnfnetlink
This changes the configure behaviour from autodetecting
for libnfnetlink to having an option to disable it explicitly
@@ -8,20 +11,24 @@ Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
-diff -Naur iptables-1.6.0-old/configure.ac iptables-1.6.0/configure.ac
---- iptables-1.6.0-old/configure.ac 2015-12-28 18:40:35.255417976 +0200
-+++ iptables-1.6.0/configure.ac 2015-12-29 13:01:12.388840200 +0200
-@@ -63,6 +63,9 @@
+ configure.ac | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index eda7871..03ddc50 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -63,6 +63,9 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
AC_ARG_ENABLE([nftables],
AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]),
[enable_nftables="$enableval"], [enable_nftables="yes"])
+AC_ARG_ENABLE([libnfnetlink],
+ AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
+ [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
-
- libiptc_LDFLAGS2="";
- AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed],
-@@ -123,9 +126,10 @@
+ AC_ARG_ENABLE([connlabel],
+ AS_HELP_STRING([--disable-connlabel],
+ [Do not build libnetfilter_conntrack]),
+@@ -115,9 +118,10 @@ if test "x$enable_bpfc" = "xyes" || test "x$enable_nfsynproxy" = "xyes"; then
AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler or nfsynproxy tool))
fi
@@ -35,3 +42,6 @@ diff -Naur iptables-1.6.0-old/configure.ac iptables-1.6.0/configure.ac
if test "x$enable_nftables" = "xyes"; then
PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
+--
+2.4.0
+
diff --git a/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
deleted file mode 100644
index f1f85a6fa0..0000000000
--- a/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-[PATCH] fix build with musl
-
-Define additional TCOPTS if not there
-u_initX types are in sys/types.h be explicit about it
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c
---- iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c 2015-12-09 14:55:06.000000000 +0200
-+++ iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c 2015-12-29 14:44:32.585327077 +0200
-@@ -12,6 +12,21 @@
- #ifndef TCPOPT_MD5SIG
- # define TCPOPT_MD5SIG 19
- #endif
-+#ifndef TCPOPT_MAXSEG
-+#define TCPOPT_MAXSEG 2
-+#endif
-+#ifndef TCPOPT_WINDOW
-+#define TCPOPT_WINDOW 3
-+#endif
-+#ifndef TCPOPT_SACK_PERMITTED
-+#define TCPOPT_SACK_PERMITTED 4
-+#endif
-+#ifndef TCPOPT_SACK
-+#define TCPOPT_SACK 5
-+#endif
-+#ifndef TCPOPT_TIMESTAMP
-+#define TCPOPT_TIMESTAMP 8
-+#endif
-
- enum {
- O_STRIP_OPTION = 0,
-diff -Naur iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h
---- iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h 2015-12-09 14:55:06.000000000 +0200
-+++ iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h 2015-12-29 14:40:21.250469195 +0200
-@@ -15,6 +15,7 @@
- #ifndef _IPTABLES_H
- #define _IPTABLES_H
-
-+#include <sys/types.h>
- #include <linux/types.h>
-
- #include <linux/netfilter_ipv4.h>
diff --git a/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch b/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch
index 89ad8f6668..7842c6408a 100644
--- a/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch
+++ b/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch
@@ -1,34 +1,51 @@
+From 26090b3dbcdf6a11e60535da949b726a6e86426d Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 21 Feb 2017 11:49:07 +0200
+Subject: [PATCH] configure.ac:
+ only-check-conntrack-when-libnfnetlink-enabled.patch
+
Package libnetfilter-conntrack depends on package libnfnetlink. iptables
checks package libnetfilter-conntrack whatever its package config
libnfnetlink is enabled or not. When libnfnetlink is disabled but
package libnetfilter-conntrack exists, it fails randomly with:
-| In file included from .../iptables/1.4.21-r0/iptables-1.4.21/extensions/libxt_connlabel.c:8:0:
-| .../tmp/sysroots/qemumips/usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h:14:42: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
-| compilation terminated.
-| GNUmakefile:96: recipe for target 'libxt_connlabel.oo' failed
+In file included from
+.../iptables/1.4.21-r0/iptables-1.4.21/extensions/libxt_connlabel.c:8:0:
+
+.../tmp/sysroots/qemumips/usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h:14:42:
+fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
+compilation terminated.
+GNUmakefile:96: recipe for target 'libxt_connlabel.oo' failed
Only check libnetfilter-conntrack when libnfnetlink is enabled to fix it.
Upstream-Status: Pending
Signed-off-by: Kai Kang <kai.kang@windriver.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure.ac | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 5d7e62b..e331ee7 100644
+index 03ddc50..523caea 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -88,8 +88,12 @@ if test "$ac_cv_header_linux_ip_vs_h" != "yes"; then
- blacklist_modules="$blacklist_modules ipvs";
- fi;
+@@ -172,10 +172,12 @@ if test "$nftables" != 1; then
+ fi
--PKG_CHECK_MODULES([libnetfilter_conntrack], [libnetfilter_conntrack >= 1.0.4],
-+nfconntrack=0
-+AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
-+ PKG_CHECK_MODULES([libnetfilter_conntrack], [libnetfilter_conntrack >= 1.0.4],
- [nfconntrack=1], [nfconntrack=0])
-+ ])
-+
- AM_CONDITIONAL([HAVE_LIBNETFILTER_CONNTRACK], [test "$nfconntrack" = 1])
-
- if test "$nfconntrack" -ne 1; then
+ if test "x$enable_connlabel" = "xyes"; then
+- PKG_CHECK_MODULES([libnetfilter_conntrack],
++ nfconntrack=0
++ AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
++ PKG_CHECK_MODULES([libnetfilter_conntrack],
+ [libnetfilter_conntrack >= 1.0.6],
+ [nfconntrack=1], [nfconntrack=0])
+-
++ ])
+ if test "$nfconntrack" -ne 1; then
+ blacklist_modules="$blacklist_modules connlabel";
+ echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built";
+--
+2.4.0
+
diff --git a/meta/recipes-extended/iptables/iptables/ip6tables.rules b/meta/recipes-extended/iptables/iptables/ip6tables.rules
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/ip6tables.rules
diff --git a/meta/recipes-extended/iptables/iptables/ip6tables.service b/meta/recipes-extended/iptables/iptables/ip6tables.service
new file mode 100644
index 0000000000..6c059fca49
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/ip6tables.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=IPv6 Packet Filtering Framework
+Before=network-pre.target
+Wants=network-pre.target
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/ip6tables-restore -w -- @RULESDIR@/ip6tables.rules
+ExecReload=@SBINDIR@/ip6tables-restore -w -- @RULESDIR@/ip6tables.rules
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/iptables/iptables/iptables.rules b/meta/recipes-extended/iptables/iptables/iptables.rules
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/iptables.rules
diff --git a/meta/recipes-extended/iptables/iptables/iptables.service b/meta/recipes-extended/iptables/iptables/iptables.service
new file mode 100644
index 0000000000..0eb3c343de
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/iptables.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=IPv4 Packet Filtering Framework
+Before=network-pre.target
+Wants=network-pre.target
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/iptables-restore -w -- @RULESDIR@/iptables.rules
+ExecReload=@SBINDIR@/iptables-restore -w -- @RULESDIR@/iptables.rules
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
deleted file mode 100644
index 24ee29e2d1..0000000000
--- a/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@windriver.com>
-Date: Fri, 23 Mar 2012 14:27:20 -0400
-Subject: [PATCH] types.h: add defines that are required for if_packet.h
-
-The iptables local linux/types.h overrides the kernel/sysroot
-types.h. As such, we need to provide some defines that are required
-to build against 3.2+ kernel headers.
-
-ifndef protection is provided for the defines to ensure that
-configuration that already have these defines are still buildable.
-
-This commit is temporary until a new version of iptables can be
-used that contains the defines.
-
-This is similar to the commit in the iptables git repository:
-
- https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b
-
-Upstream-Status: Backport
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- include/linux/types.h | 10 ++++++++++
- 1 files changed, 10 insertions(+), 0 deletions(-)
-
-diff --git a/include/linux/types.h b/include/linux/types.h
-index 8b483c8..ebf6432 100644
---- a/include/linux/types.h
-+++ b/include/linux/types.h
-@@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64;
- typedef __u16 __bitwise __sum16;
- typedef __u32 __bitwise __wsum;
-
-+#ifndef __aligned_u64
-+#define __aligned_u64 __u64 __attribute__((aligned(8)))
-+#endif
-+#ifndef __aligned_be64
-+#define __aligned_be64 __be64 __attribute__((aligned(8)))
-+#endif
-+#ifndef __aligned_le64
-+#define __aligned_le64 __le64 __attribute__((aligned(8)))
-+#endif
-+
- #endif /* __ASSEMBLY__ */
- #endif /* _LINUX_TYPES_H */
---
-1.7.0.4
-
diff --git a/meta/recipes-extended/iptables/iptables_1.6.0.bb b/meta/recipes-extended/iptables/iptables_1.6.0.bb
deleted file mode 100644
index fbbe4186b2..0000000000
--- a/meta/recipes-extended/iptables/iptables_1.6.0.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "Tools for managing kernel packet filtering capabilities"
-DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
-filtering code in Linux."
-HOMEPAGE = "http://www.netfilter.org/"
-BUGTRACKER = "http://bugzilla.netfilter.org/"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
- file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
-
-RRECOMMENDS_${PN} = "kernel-module-x-tables \
- kernel-module-ip-tables \
- kernel-module-iptable-filter \
- kernel-module-iptable-nat \
- kernel-module-nf-defrag-ipv4 \
- kernel-module-nf-conntrack \
- kernel-module-nf-conntrack-ipv4 \
- kernel-module-nf-nat \
- kernel-module-ipt-masquerade"
-FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
-
-SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
- file://types.h-add-defines-that-are-required-for-if_packet.patch \
- file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
- file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
- "
-SRC_URI_append_libc-musl = " file://0001-fix-build-with-musl.patch"
-
-SRC_URI[md5sum] = "27ba3451cb622467fc9267a176f19a31"
-SRC_URI[sha256sum] = "4bb72a0a0b18b5a9e79e87631ddc4084528e5df236bc7624472dcaa8480f1c60"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
- "
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
- "
-
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-# libnfnetlink recipe is in meta-networking layer
-PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
-
-# libnftnl recipe is in meta-networking layer(previously known as libnftables)
-PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
-
-do_configure_prepend() {
- # Remove some libtool m4 files
- # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
- rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
-}
diff --git a/meta/recipes-extended/iptables/iptables_1.8.3.bb b/meta/recipes-extended/iptables/iptables_1.8.3.bb
new file mode 100644
index 0000000000..96d195d9d0
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables_1.8.3.bb
@@ -0,0 +1,108 @@
+SUMMARY = "Tools for managing kernel packet filtering capabilities"
+DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
+filtering code in Linux."
+HOMEPAGE = "http://www.netfilter.org/"
+BUGTRACKER = "http://bugzilla.netfilter.org/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc \
+"
+
+SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
+ file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
+ file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
+ file://iptables.service \
+ file://iptables.rules \
+ file://ip6tables.service \
+ file://ip6tables.rules \
+"
+SRC_URI[md5sum] = "29de711d15c040c402cf3038c69ff513"
+SRC_URI[sha256sum] = "a23cac034181206b4545f4e7e730e76e08b5f3dd78771ba9645a6756de9cdd80"
+
+SYSTEMD_SERVICE_${PN} = "\
+ iptables.service \
+ ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'ip6tables.service', '', d)} \
+"
+
+inherit autotools pkgconfig systemd
+
+EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# libnfnetlink recipe is in meta-networking layer
+PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
+
+# libnftnl recipe is in meta-networking layer(previously known as libnftables)
+PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
+
+do_configure_prepend() {
+ # Remove some libtool m4 files
+ # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
+ rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
+}
+
+IPTABLES_RULES_DIR ?= "${sysconfdir}/${BPN}"
+
+do_install_append() {
+ install -d ${D}${IPTABLES_RULES_DIR}
+ install -m 0644 ${WORKDIR}/iptables.rules ${D}${IPTABLES_RULES_DIR}
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/iptables.service ${D}${systemd_system_unitdir}
+
+ sed -i \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \
+ ${D}${systemd_system_unitdir}/iptables.service
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'true', 'false', d)} ; then
+ install -m 0644 ${WORKDIR}/ip6tables.rules ${D}${IPTABLES_RULES_DIR}
+ install -m 0644 ${WORKDIR}/ip6tables.service ${D}${systemd_system_unitdir}
+
+ sed -i \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \
+ ${D}${systemd_system_unitdir}/ip6tables.service
+ fi
+}
+
+PACKAGES += "${PN}-modules"
+PACKAGES_DYNAMIC += "^${PN}-module-.*"
+
+python populate_packages_prepend() {
+ modules = do_split_packages(d, '${libdir}/xtables', r'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='')
+ if modules:
+ metapkg = d.getVar('PN') + '-modules'
+ d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules))
+}
+
+RDEPENDS_${PN} = "${PN}-module-xt-standard"
+RRECOMMENDS_${PN} = " \
+ ${PN}-modules \
+ kernel-module-x-tables \
+ kernel-module-ip-tables \
+ kernel-module-iptable-filter \
+ kernel-module-iptable-nat \
+ kernel-module-nf-defrag-ipv4 \
+ kernel-module-nf-conntrack \
+ kernel-module-nf-conntrack-ipv4 \
+ kernel-module-nf-nat \
+ kernel-module-ipt-masquerade \
+ ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', '\
+ kernel-module-ip6table-filter \
+ kernel-module-ip6-tables \
+ ', '', d)} \
+"
+
+FILES_${PN} += "${datadir}/xtables"
+
+# Include the symlinks as well in respective packages
+FILES_${PN}-module-xt-conntrack += "${libdir}/xtables/libxt_state.so"
+FILES_${PN}-module-xt-ct += "${libdir}/xtables/libxt_NOTRACK.so"
+
+ALLOW_EMPTY_${PN}-modules = "1"
+
+INSANE_SKIP_${PN}-module-xt-conntrack = "dev-so"
+INSANE_SKIP_${PN}-module-xt-ct = "dev-so"
diff --git a/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch b/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
deleted file mode 100644
index 20ef07e44a..0000000000
--- a/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From be0bb81d72fea4d20da74f4f2236aa145684f332 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 14:14:22 -0800
-Subject: [PATCH] Fix header inclusion for musl
-
-Fix errors e.g.
-
-In file included from tracepath.c:17:0:
-/usr/include/linux/errqueue.h:33:18:
-error: array type has incomplete element type 'struct timespec'
- struct timespec ts[3];
- ^
-tracepath.c: In function 'main':
-tracepath.c:329:16: error: 'INT_MAX' undeclared (first use in this
-function)
- overhead, INT_MAX);
- ^
-tracepath.c:329:16: note: each undeclared identifier is reported only
-once for each function it appears in
-Makefile:131: recipe for target 'tracepath.o' failed
-make: *** [tracepath.o] Error 1
-
-ping_common.c: In function 'main_loop':
-ping_common.c:756:15: error: 'HZ' undeclared (first use in this
-function)
- if (1000 % HZ == 0 ? next <= 1000 / HZ : (next < INT_MAX / HZ &&
-next * HZ <= 1000)) {
-
-protocols/timed.h is not needed and is absent in musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- clockdiff.c | 1 -
- ping_common.c | 1 +
- tracepath.c | 2 ++
- tracepath6.c | 1 +
- 4 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/clockdiff.c b/clockdiff.c
-index 7c1ea1b..1d6341e 100644
---- a/clockdiff.c
-+++ b/clockdiff.c
-@@ -14,7 +14,6 @@
- #include <netinet/ip.h>
- #include <netinet/ip_icmp.h>
- #define TSPTYPES
--#include <protocols/timed.h>
- #include <fcntl.h>
- #include <netdb.h>
- #include <arpa/inet.h>
-diff --git a/ping_common.c b/ping_common.c
-index 7f82851..3ce699d 100644
---- a/ping_common.c
-+++ b/ping_common.c
-@@ -2,6 +2,7 @@
- #include <ctype.h>
- #include <sched.h>
- #include <math.h>
-+#include <asm-generic/param.h>
-
- int options;
-
-diff --git a/tracepath.c b/tracepath.c
-index 89e6d16..c9d6ddd 100644
---- a/tracepath.c
-+++ b/tracepath.c
-@@ -12,6 +12,8 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#include <limits.h>
-+#include <time.h>
- #include <sys/socket.h>
- #include <linux/types.h>
- #include <linux/errqueue.h>
-diff --git a/tracepath6.c b/tracepath6.c
-index 126fadf..9d5745c 100644
---- a/tracepath6.c
-+++ b/tracepath6.c
-@@ -12,6 +12,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#include <limits.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netinet/icmp6.h>
---
-2.6.4
-
diff --git a/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch b/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
deleted file mode 100644
index 6da01dc616..0000000000
--- a/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 000629f74908a2a95f6104444c77ad93cf40d62d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 08:50:50 +0000
-Subject: [PATCH] Intialize struct elements by name
-
-makes it portable across glibc and musl
-
-Fixes errors
-
-| ping.c: In function 'send_probe':
-| ping.c:735:19: warning: initialization makes integer from pointer
-without a cast [-Wint-conversion]
-| &iov, 1, &cmsg, 0, 0 };
-| ^
-| ping.c:735:19: note: (near initialization for 'm.__pad1')
-| ping.c:735:19: error: initializer element is not computable at load
-time
-| ping.c:735:19: note: (near initialization for 'm.__pad1')
-| make: *** [ping.o] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- ping.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/ping.c b/ping.c
-index 4989760..e67f381 100644
---- a/ping.c
-+++ b/ping.c
-@@ -731,8 +731,15 @@ int send_probe()
-
- do {
- static struct iovec iov = {outpack, 0};
-- static struct msghdr m = { &whereto, sizeof(whereto),
-- &iov, 1, &cmsg, 0, 0 };
-+ static struct msghdr m = {
-+ .msg_name = &whereto,
-+ .msg_namelen = sizeof(whereto),
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = &cmsg,
-+ .msg_controllen = 0,
-+ .msg_flags= 0,
-+ };
- m.msg_controllen = cmsg_len;
- iov.iov_len = cc;
-
---
-2.7.0
-
diff --git a/meta/recipes-extended/iputils/files/debian/targets.diff b/meta/recipes-extended/iputils/files/debian/targets.diff
deleted file mode 100644
index 2cb5576c62..0000000000
--- a/meta/recipes-extended/iputils/files/debian/targets.diff
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [disable feature]
-
-Index: iputils-s20121221/Makefile
-===================================================================
---- iputils-s20121221.orig/Makefile
-+++ iputils-s20121221/Makefile
-@@ -106,7 +106,7 @@ endif
- endif
-
- # -------------------------------------
--IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
-+IPV4_TARGETS=tracepath ping clockdiff arping
- IPV6_TARGETS=tracepath6 traceroute6 ping6
- TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
-
diff --git a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
deleted file mode 100644
index d3b18868c0..0000000000
--- a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending [from other distro Debian]
-
-Index: iputils-s20121221/tracepath.c
-===================================================================
---- iputils-s20121221.orig/tracepath.c
-+++ iputils-s20121221/tracepath.c
-@@ -370,9 +370,9 @@ main(int argc, char **argv)
- }
- #endif
-
-- he = gethostbyname(p);
-+ he = gethostbyname2(argv[0], AF_INET);
- if (he == NULL) {
-- herror("gethostbyname");
-+ herror("gethostbyname2");
- exit(1);
- }
-
-Index: iputils-s20121221/ping.c
-===================================================================
---- iputils-s20121221.orig/ping.c
-+++ iputils-s20121221/ping.c
-@@ -279,7 +279,7 @@ main(int argc, char **argv)
- #else
- idn = target;
- #endif
-- hp = gethostbyname(idn);
-+ hp = gethostbyname2(idn, AF_INET);
- if (!hp) {
- fprintf(stderr, "ping: unknown host %s\n", target);
- exit(2);
diff --git a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
deleted file mode 100644
index 92bf946f2a..0000000000
--- a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix nsgmls path issue
-
-Upstream-Status: Pending
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Index: iputils-s20101006/doc/Makefile
-===================================================================
---- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800
-+++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800
-@@ -27,10 +27,15 @@
- # docbook2man produces utterly ugly output and I did not find
- # any way to customize this but hacking backend perl script a little.
- # Well, hence...
-+# nsgmls seems append path to search directory according to the sysid path.
-+# e.g. if input ../index.db, it would search $search_directory/../ rather than
-+# $search_directory, which leads searching failure. Fixing nsgmls probably
-+# introduce some side effects, so use this ugly hack: running nsgmls in current
-+# directory, and running docbook2man in tmp directory.
-
- $(MANFILES): index.db
- @-mkdir tmp.db2man
-- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
-+ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
- @-rm -rf tmp.db2man
-
- clean:
diff --git a/meta/recipes-extended/iputils/iputils_s20151218.bb b/meta/recipes-extended/iputils/iputils_s20151218.bb
deleted file mode 100644
index 715045470c..0000000000
--- a/meta/recipes-extended/iputils/iputils_s20151218.bb
+++ /dev/null
@@ -1,76 +0,0 @@
-SUMMARY = "Network monitoring tools"
-DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
-tracepath, tracepath6, ping, ping6 and arping."
-HOMEPAGE = "http://www.skbuff.net/iputils"
-SECTION = "console/network"
-
-LICENSE = "BSD & GPLv2+"
-
-LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
- file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
- file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
- file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
-
-DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap libgcrypt"
-
-
-SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
- file://debian/use_gethostbyname2.diff \
- file://debian/targets.diff \
- file://nsgmls-path-fix.patch \
- file://0001-Fix-header-inclusion-for-musl.patch \
- file://0001-Intialize-struct-elements-by-name.patch \
- "
-
-SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce"
-SRC_URI[sha256sum] = "549f58d71951e52b46595829134d4e330642f522f50026917fadc349a54825a1"
-
-UPSTREAM_CHECK_REGEX = "iputils-(?P<pver>s\d+).tar"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_compile () {
- oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man
-}
-
-do_install () {
- install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
- # SUID root programs
- install -m 4555 ping ${D}${base_bindir}/ping
- install -m 4555 ping6 ${D}${base_bindir}/ping6
- install -m 4555 traceroute6 ${D}${base_bindir}/
- install -m 4555 clockdiff ${D}${base_bindir}/
- # Other programgs
- for i in arping tracepath tracepath6; do
- install -m 0755 $i ${D}${base_bindir}/
- done
- # Manual pages for things we build packages for
- for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
- install -m 0644 doc/$i ${D}${mandir}/man8/ || true
- done
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN}-ping = "ping"
-ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
-
-ALTERNATIVE_${PN}-ping6 = "ping6"
-ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
-
-PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
-
-ALLOW_EMPTY_${PN} = "1"
-RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
-
-FILES_${PN} = ""
-FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
-FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
-FILES_${PN}-arping = "${base_bindir}/arping"
-FILES_${PN}-tracepath = "${base_bindir}/tracepath"
-FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
-FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
-FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
-FILES_${PN}-doc = "${mandir}/man8"
diff --git a/meta/recipes-extended/iputils/iputils_s20190709.bb b/meta/recipes-extended/iputils/iputils_s20190709.bb
new file mode 100644
index 0000000000..3f9e9917f0
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils_s20190709.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Network monitoring tools"
+DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
+tracepath, tracepath6, ping, ping6 and arping."
+HOMEPAGE = "https://github.com/iputils/iputils"
+SECTION = "console/network"
+
+LICENSE = "BSD & GPLv2+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=55aa8c9fcad0691cef0ecd420361e390"
+
+DEPENDS = "gnutls"
+
+SRC_URI = "git://github.com/iputils/iputils"
+SRCREV = "13e00847176aa23683d68fce1d17ffb523510946"
+
+S = "${WORKDIR}/git"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)"
+
+# Fixed in 2000-10-10, but the versioning of iputils
+# breaks the version order.
+CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214"
+
+PACKAGECONFIG ??= "libcap libgcrypt rarpd traceroute6"
+PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap"
+PACKAGECONFIG[libgcrypt] = "-DUSE_CRYPTO=gcrypt, -DUSE_CRYPTO=none, libgcrypt"
+PACKAGECONFIG[libidn] = "-DUSE_IDN=true, -DUSE_IDN=false, libidn2"
+PACKAGECONFIG[gettext] = "-DUSE_GETTEXT=true, -DUSE_GETTEXT=false, gettext"
+PACKAGECONFIG[rarpd] = "-DBUILD_RARPD=true,-DBUILD_RARPD=false,"
+PACKAGECONFIG[traceroute6] = "-DBUILD_TRACEROUTE6=true,-DBUILD_TRACEROUTE6=false,"
+PACKAGECONFIG[docs] = "-DBUILD_HTML_MANS=true -DBUILD_MANS=true,-DBUILD_HTML_MANS=false -DBUILD_MANS=false, libxslt"
+
+inherit meson update-alternatives
+
+EXTRA_OEMESON += "--prefix=${root_prefix}/"
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-ping = "ping"
+ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
+
+SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff ${PN}-tftpd ${PN}-rarpd ${PN}-rdisc ${PN}-ninfod"
+PACKAGES += "${SPLITPKGS}"
+
+ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY_${PN}-rarpd = "1"
+ALLOW_EMPTY_${PN}-traceroute6 = "1"
+RDEPENDS_${PN} += "${SPLITPKGS}"
+
+FILES_${PN} = ""
+FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
+FILES_${PN}-arping = "${base_bindir}/arping"
+FILES_${PN}-tracepath = "${base_bindir}/tracepath"
+FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
+FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
+FILES_${PN}-tftpd = "${base_bindir}/tftpd"
+FILES_${PN}-rarpd = "${base_sbindir}/rarpd"
+FILES_${PN}-rdisc = "${base_sbindir}/rdisc"
+FILES_${PN}-ninfod = "${base_sbindir}/ninfod ${sysconfdir}/init.d/ninfod.sh"
diff --git a/meta/recipes-extended/less/less_481.bb b/meta/recipes-extended/less/less_481.bb
deleted file mode 100644
index 0fcd819682..0000000000
--- a/meta/recipes-extended/less/less_481.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Text file viewer similar to more"
-DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
-based program for viewing text files and the output from other \
-programs. Less offers many features beyond those that more does."
-HOMEPAGE = "http://www.greenwoodsoftware.com/"
-SECTION = "console/utils"
-
-# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
-# Including email author giving permissing to use BSD
-#
-# From: Mark Nudelman <markn@greenwoodsoftware.com>
-# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
-# Date: 12/19/11
-#
-# Hi Elizabeth,
-# Using a generic BSD license for less is fine with me.
-# Thanks,
-#
-# --Mark
-#
-
-LICENSE = "GPLv3+ | BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://LICENSE;md5=48c26a307f91af700e1f00585f215aaf"
-DEPENDS = "ncurses"
-
-SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
- "
-
-SRC_URI[md5sum] = "50ef46065c65257141a7340123527767"
-SRC_URI[sha256sum] = "3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5"
-
-UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
-
-inherit autotools update-alternatives
-
-do_install () {
- oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
-}
-
-ALTERNATIVE_${PN} = "less"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/less/less_551.bb b/meta/recipes-extended/less/less_551.bb
new file mode 100644
index 0000000000..a818c68fc7
--- /dev/null
+++ b/meta/recipes-extended/less/less_551.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Text file viewer similar to more"
+DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
+based program for viewing text files and the output from other \
+programs. Less offers many features beyond those that more does."
+HOMEPAGE = "http://www.greenwoodsoftware.com/"
+SECTION = "console/utils"
+
+# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
+# Including email author giving permissing to use BSD
+#
+# From: Mark Nudelman <markn@greenwoodsoftware.com>
+# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
+# Date: 12/19/11
+#
+# Hi Elizabeth,
+# Using a generic BSD license for less is fine with me.
+# Thanks,
+#
+# --Mark
+#
+
+LICENSE = "GPLv3+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://LICENSE;md5=ba01d0cab7f62f7f2204c7780ff6a87d \
+ "
+DEPENDS = "ncurses"
+
+SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
+ "
+
+SRC_URI[md5sum] = "4ad4408b06d7a6626a055cb453f36819"
+SRC_URI[sha256sum] = "ff165275859381a63f19135a8f1f6c5a194d53ec3187f94121ecd8ef0795fe3d"
+
+UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
+
+inherit autotools update-alternatives
+
+do_install () {
+ oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
+}
+
+ALTERNATIVE_${PN} = "less"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/libaio/libaio/00_arches.patch b/meta/recipes-extended/libaio/libaio/00_arches.patch
index 9d6447d98a..bec189f87c 100644
--- a/meta/recipes-extended/libaio/libaio/00_arches.patch
+++ b/meta/recipes-extended/libaio/libaio/00_arches.patch
@@ -1,11 +1,27 @@
+From ceba1e03e5b57cdae0b3b2d2c9afebc085c986d8 Mon Sep 17 00:00:00 2001
+From: Qing He <qing.he@intel.com>
+Date: Fri, 27 Aug 2010 10:15:31 +0800
+Subject: [PATCH] libaio: add new recipe
+
Upstream-Status: Inappropriate [embedded specific]
from openembedded, added by Qing He <qing.he@intel.com>
-Index: libaio-0.3.110/src/syscall-m68k.h
-===================================================================
+---
+ src/syscall-m68k.h | 78 ++++++++++++++++++
+ src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++
+ src/syscall.h | 6 ++
+ 4 files changed, 453 insertions(+)
+ create mode 100644 src/syscall-m68k.h
+ create mode 100644 src/syscall-mips.h
+ create mode 100644 src/syscall-parisc.h
+
+diff --git a/src/syscall-m68k.h b/src/syscall-m68k.h
+new file mode 100644
+index 0000000..f440412
--- /dev/null
-+++ libaio-0.3.110/src/syscall-m68k.h
++++ b/src/syscall-m68k.h
@@ -0,0 +1,78 @@
+#define __NR_io_setup 241
+#define __NR_io_destroy 242
@@ -85,27 +101,11 @@ Index: libaio-0.3.110/src/syscall-m68k.h
+return (type) __res; \
+}
+
-Index: libaio-0.3.110/src/syscall.h
-===================================================================
---- libaio-0.3.110.orig/src/syscall.h
-+++ libaio-0.3.110/src/syscall.h
-@@ -28,6 +28,12 @@
- #include "syscall-sparc.h"
- #elif defined(__aarch64__)
- #include "syscall-arm64.h"
-+#elif defined(__m68k__)
-+#include "syscall-m68k.h"
-+#elif defined(__hppa__)
-+#include "syscall-parisc.h"
-+#elif defined(__mips__)
-+#include "syscall-mips.h"
- #else
- #warning "using generic syscall method"
- #include "syscall-generic.h"
-Index: libaio-0.3.110/src/syscall-mips.h
-===================================================================
+diff --git a/src/syscall-mips.h b/src/syscall-mips.h
+new file mode 100644
+index 0000000..4142499
--- /dev/null
-+++ libaio-0.3.110/src/syscall-mips.h
++++ b/src/syscall-mips.h
@@ -0,0 +1,223 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
@@ -330,10 +330,11 @@ Index: libaio-0.3.110/src/syscall-mips.h
+
+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
+
-Index: libaio-0.3.110/src/syscall-parisc.h
-===================================================================
+diff --git a/src/syscall-parisc.h b/src/syscall-parisc.h
+new file mode 100644
+index 0000000..ff61746
--- /dev/null
-+++ libaio-0.3.110/src/syscall-parisc.h
++++ b/src/syscall-parisc.h
@@ -0,0 +1,146 @@
+/*
+ * Linux system call numbers.
@@ -481,127 +482,20 @@ Index: libaio-0.3.110/src/syscall-parisc.h
+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \
+}
+
-Index: libaio-0.3.110/src/syscall-arm.h
-===================================================================
---- libaio-0.3.110.orig/src/syscall-arm.h
-+++ libaio-0.3.110/src/syscall-arm.h
-@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3
- return (type) __res_r0; \
- }
-
-+/*
-+ * linux/include/asm-arm/unistd.h
-+ *
-+ * Copyright (C) 2001-2005 Russell King
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk,
-+ * no matter what the change is. Thanks!
-+ */
-+
-+#define __NR_OABI_SYSCALL_BASE 0x900000
-+
-+#if defined(__thumb__) || defined(__ARM_EABI__)
-+#define __NR_SYSCALL_BASE 0
-+#else
-+#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE
-+#endif
-+
-+#define __NR_io_setup (__NR_SYSCALL_BASE+243)
-+#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
-+#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
-+#define __NR_io_submit (__NR_SYSCALL_BASE+246)
-+#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
-+
-+#define __sys2(x) #x
-+#define __sys1(x) __sys2(x)
-+
-+#if defined(__thumb__) || defined(__ARM_EABI__)
-+#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name;
-+#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs
-+#define __syscall(name) "swi\t0"
-+#else
-+#define __SYS_REG(name)
-+#define __SYS_REG_LIST(regs...) regs
-+#define __syscall(name) "swi\t" __sys1(__NR_##name) ""
-+#endif
-+
-+#define io_syscall1(type,fname,sname,type1,arg1) \
-+type fname(type1 arg1) { \
-+ __SYS_REG(sname) \
-+ register long __r0 __asm__("r0") = (long)arg1; \
-+ register long __res_r0 __asm__("r0"); \
-+ __asm__ __volatile__ ( \
-+ __syscall(sname) \
-+ : "=r" (__res_r0) \
-+ : __SYS_REG_LIST( "0" (__r0) ) \
-+ : "memory" ); \
-+ return (type) __res_r0; \
-+}
-+
-+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
-+type fname(type1 arg1,type2 arg2) { \
-+ __SYS_REG(sname) \
-+ register long __r0 __asm__("r0") = (long)arg1; \
-+ register long __r1 __asm__("r1") = (long)arg2; \
-+ register long __res_r0 __asm__("r0"); \
-+ __asm__ __volatile__ ( \
-+ __syscall(sname) \
-+ : "=r" (__res_r0) \
-+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \
-+ : "memory" ); \
-+ return (type) __res_r0; \
-+}
-+
-+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
-+type fname(type1 arg1,type2 arg2,type3 arg3) { \
-+ __SYS_REG(sname) \
-+ register long __r0 __asm__("r0") = (long)arg1; \
-+ register long __r1 __asm__("r1") = (long)arg2; \
-+ register long __r2 __asm__("r2") = (long)arg3; \
-+ register long __res_r0 __asm__("r0"); \
-+ __asm__ __volatile__ ( \
-+ __syscall(sname) \
-+ : "=r" (__res_r0) \
-+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \
-+ : "memory" ); \
-+ return (type) __res_r0; \
-+}
-+
-+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
-+ __SYS_REG(sname) \
-+ register long __r0 __asm__("r0") = (long)arg1; \
-+ register long __r1 __asm__("r1") = (long)arg2; \
-+ register long __r2 __asm__("r2") = (long)arg3; \
-+ register long __r3 __asm__("r3") = (long)arg4; \
-+ register long __res_r0 __asm__("r0"); \
-+ __asm__ __volatile__ ( \
-+ __syscall(sname) \
-+ : "=r" (__res_r0) \
-+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \
-+ : "memory" ); \
-+ return (type) __res_r0; \
-+}
-+
-+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\
-+ __SYS_REG(sname) \
-+ register long __r0 __asm__("r0") = (long)arg1; \
-+ register long __r1 __asm__("r1") = (long)arg2; \
-+ register long __r2 __asm__("r2") = (long)arg3; \
-+ register long __r3 __asm__("r3") = (long)arg4; \
-+ register long __r4 __asm__("r4") = (long)arg5; \
-+ register long __res_r0 __asm__("r0"); \
-+ __asm__ __volatile__ ( \
-+ __syscall(sname) \
-+ : "=r" (__res_r0) \
-+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \
-+ "r" (__r3), "r" (__r4) ) \
-+ : "memory" ); \
-+ return (type) __res_r0; \
-+}
-+
+diff --git a/src/syscall.h b/src/syscall.h
+index 9b9e9c1..9ecd3b4 100644
+--- a/src/syscall.h
++++ b/src/syscall.h
+@@ -29,6 +29,12 @@
+ #include "syscall-sparc.h"
+ #elif defined(__aarch64__) || defined(__riscv)
+ #include "syscall-generic.h"
++#elif defined(__m68k__)
++#include "syscall-m68k.h"
++#elif defined(__hppa__)
++#include "syscall-parisc.h"
++#elif defined(__mips__)
++#include "syscall-mips.h"
+ #else
+ #warning "using system call numbers from sys/syscall.h"
+ #endif
diff --git a/meta/recipes-extended/libaio/libaio/destdir.patch b/meta/recipes-extended/libaio/libaio/destdir.patch
index dad9601c49..0f90406bee 100644
--- a/meta/recipes-extended/libaio/libaio/destdir.patch
+++ b/meta/recipes-extended/libaio/libaio/destdir.patch
@@ -2,16 +2,16 @@ Upstream-Status: Pending
from openembedded, added by Qing He <qing.he@intel.com>
-Index: libaio-0.3.106/Makefile
+Index: libaio-0.3.110/Makefile
===================================================================
---- libaio-0.3.106.orig/Makefile 2004-02-26 07:25:10.000000000 -0800
-+++ libaio-0.3.106/Makefile 2006-10-14 09:19:07.000000000 -0700
-@@ -15,7 +15,7 @@
+--- libaio-0.3.110.orig/Makefile
++++ libaio-0.3.110/Makefile
+@@ -15,7 +15,7 @@ all:
@$(MAKE) -C src
install:
- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir)
+ @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
-
- clean:
+ check:
+ @$(MAKE) -C harness check
diff --git a/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch b/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch
deleted file mode 100644
index bba7e554af..0000000000
--- a/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From: Nathan Rossi <nathan.rossi@xilinx.com>
-Date: Tue, 27 Jan 2015 14:59:35 +1000
-Subject: [PATCH] Generic arch dectection for padding defines
-
-When available use the GNU C defines for endian and bitwidth to
-determine the padding required. This reduces the need to define the
-padding selection for every architecture.
-
-Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
-Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
-Upstream-Status: Backport
----
- src/libaio.h | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/src/libaio.h b/src/libaio.h
-index 1223146..4a4e0f5 100644
---- a/src/libaio.h
-+++ b/src/libaio.h
-@@ -52,14 +52,18 @@ typedef enum io_iocb_cmd {
- /* little endian, 32 bits */
- #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
- defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
-- defined(__cris__)
-+ defined(__cris__) || \
-+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
-+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
- #define PADDED(x, y) x; unsigned y
- #define PADDEDptr(x, y) x; unsigned y
- #define PADDEDul(x, y) unsigned long x; unsigned y
-
- /* little endian, 64 bits */
- #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
-- (defined(__aarch64__) && defined(__AARCH64EL__))
-+ (defined(__aarch64__) && defined(__AARCH64EL__)) || \
-+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
-+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 8)
- #define PADDED(x, y) x, y
- #define PADDEDptr(x, y) x
- #define PADDEDul(x, y) unsigned long x
-@@ -67,7 +71,9 @@ typedef enum io_iocb_cmd {
- /* big endian, 64 bits */
- #elif defined(__powerpc64__) || defined(__s390x__) || \
- (defined(__sparc__) && defined(__arch64__)) || \
-- (defined(__aarch64__) && defined(__AARCH64EB__))
-+ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
-+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
-+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8)
- #define PADDED(x, y) unsigned y; x
- #define PADDEDptr(x,y) x
- #define PADDEDul(x, y) unsigned long x
-@@ -76,7 +82,9 @@ typedef enum io_iocb_cmd {
- #elif defined(__PPC__) || defined(__s390__) || \
- (defined(__arm__) && defined(__ARMEB__)) || \
- defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
-- defined(__hppa__) || defined(__frv__) || defined(__avr32__)
-+ defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
-+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
-+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 4)
- #define PADDED(x, y) unsigned y; x
- #define PADDEDptr(x, y) unsigned y; x
- #define PADDEDul(x, y) unsigned y; unsigned long x
---
-2.1.1
-
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
deleted file mode 100644
index dc4ba505b9..0000000000
--- a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Pending
-
-Properly load arguments 5 an 6 for x86-64 syscall
-Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64
-syscall so that it works with both x32 and x86-64.
-
-Received this patch from H.J. Lu <hjl.tools@gmail.com>
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/12/02
-
---- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700
-+++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800
-@@ -1,8 +1,18 @@
-+#ifndef __NR_io_setup
- #define __NR_io_setup 206
-+#endif
-+#ifndef __NR_io_destroy
- #define __NR_io_destroy 207
-+#endif
-+#ifndef __NR_io_getevents
- #define __NR_io_getevents 208
-+#endif
-+#ifndef __NR_io_submit
- #define __NR_io_submit 209
-+#endif
-+#ifndef __NR_io_cancel
- #define __NR_io_cancel 210
-+#endif
-
- #define __syscall_clobber "r11","rcx","memory"
- #define __syscall "syscall"
-@@ -42,10 +52,11 @@ return __res; \
- type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
- { \
- long __res; \
--__asm__ volatile ("movq %5,%%r10 ;" __syscall \
-+register long __a4 asm ("r10") = (long) arg4; \
-+__asm__ volatile (__syscall \
- : "=a" (__res) \
- : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
-- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \
-+ "d" ((long)(arg3)),"r" (__a4)); \
- return __res; \
- }
-
-@@ -54,10 +65,11 @@ return __res; \
- type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
- { \
- long __res; \
--__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \
-+register long __a4 asm ("r10") = (long) arg4; \
-+register long __a5 asm ("r8") = (long) arg5; \
-+__asm__ volatile ( __syscall \
- : "=a" (__res) \
- : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
-- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \
-- __syscall_clobber,"r8","r10" ); \
-+ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \
- return __res; \
- }
diff --git a/meta/recipes-extended/libaio/libaio_0.3.110.bb b/meta/recipes-extended/libaio/libaio_0.3.110.bb
deleted file mode 100644
index 75975d4ab7..0000000000
--- a/meta/recipes-extended/libaio/libaio_0.3.110.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Asynchronous I/O library"
-DESCRIPTION = "Asynchronous input/output library that uses the kernels native interface"
-HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/liba/${BPN}/${BPN}_${PV}.orig.tar.gz \
- file://generic-arch-dectection-for-padding-defines.patch \
- file://00_arches.patch \
- file://destdir.patch \
- file://libaio_fix_for_x32.patch \
- file://libaio_fix_for_mips_syscalls.patch \
- file://system-linkage.patch \
- "
-
-SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8"
-SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e"
-
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/liba/libaio/"
-
-EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
-
-do_install () {
- oe_runmake install DESTDIR=${D}
-}
diff --git a/meta/recipes-extended/libaio/libaio_0.3.111.bb b/meta/recipes-extended/libaio/libaio_0.3.111.bb
new file mode 100644
index 0000000000..8e1cd349a0
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio_0.3.111.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Asynchronous I/O library"
+DESCRIPTION = "Asynchronous input/output library that uses the kernels native interface"
+HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
+
+SRC_URI = "git://pagure.io/libaio.git;protocol=https \
+ file://00_arches.patch \
+ file://destdir.patch \
+ file://libaio_fix_for_mips_syscalls.patch \
+ file://system-linkage.patch \
+ "
+SRCREV = "f66be22ab0a59a39858900ab72a8c6a6e8b0b7ec"
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
+
+do_install () {
+ oe_runmake install DESTDIR=${D}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2019-19221.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2019-19221.patch
new file mode 100644
index 0000000000..b57e87874f
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/CVE-2019-19221.patch
@@ -0,0 +1,101 @@
+From 22b1db9d46654afc6f0c28f90af8cdc84a199f41 Mon Sep 17 00:00:00 2001
+From: Martin Matuska <martin@matuska.org>
+Date: Thu, 21 Nov 2019 03:08:40 +0100
+Subject: [PATCH] Bugfix and optimize archive_wstring_append_from_mbs()
+
+The cal to mbrtowc() or mbtowc() should read up to mbs_length
+bytes and not wcs_length. This avoids out-of-bounds reads.
+
+mbrtowc() and mbtowc() return (size_t)-1 wit errno EILSEQ when
+they encounter an invalid multibyte character and (size_t)-2 when
+they they encounter an incomplete multibyte character. As we return
+failure and all our callers error out it makes no sense to continue
+parsing mbs.
+
+As we allocate `len` wchars at the beginning and each wchar has
+at least one byte, there will never be need to grow the buffer,
+so the code can be left out. On the other hand, we are always
+allocatng more memory than we need.
+
+As long as wcs_length == mbs_length == len we can omit wcs_length.
+We keep the old code commented if we decide to save memory and
+use autoexpanding wcs_length in the future.
+
+Fixes #1276
+
+Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/22b1db9d46654afc6f0c28f90af8cdc84a199f41]
+CVE: CVE-2019-19221
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ libarchive/archive_string.c | 28 +++++++++++++++++-----------
+ 1 file changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c
+index 979a418b6..bd39c96f1 100644
+--- a/libarchive/archive_string.c
++++ b/libarchive/archive_string.c
+@@ -591,7 +591,7 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest,
+ * No single byte will be more than one wide character,
+ * so this length estimate will always be big enough.
+ */
+- size_t wcs_length = len;
++ // size_t wcs_length = len;
+ size_t mbs_length = len;
+ const char *mbs = p;
+ wchar_t *wcs;
+@@ -600,7 +600,11 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest,
+
+ memset(&shift_state, 0, sizeof(shift_state));
+ #endif
+- if (NULL == archive_wstring_ensure(dest, dest->length + wcs_length + 1))
++ /*
++ * As we decided to have wcs_length == mbs_length == len
++ * we can use len here instead of wcs_length
++ */
++ if (NULL == archive_wstring_ensure(dest, dest->length + len + 1))
+ return (-1);
+ wcs = dest->s + dest->length;
+ /*
+@@ -609,6 +613,12 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest,
+ * multi bytes.
+ */
+ while (*mbs && mbs_length > 0) {
++ /*
++ * The buffer we allocated is always big enough.
++ * Keep this code path in a comment if we decide to choose
++ * smaller wcs_length in the future
++ */
++/*
+ if (wcs_length == 0) {
+ dest->length = wcs - dest->s;
+ dest->s[dest->length] = L'\0';
+@@ -618,24 +628,20 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest,
+ return (-1);
+ wcs = dest->s + dest->length;
+ }
++*/
+ #if HAVE_MBRTOWC
+- r = mbrtowc(wcs, mbs, wcs_length, &shift_state);
++ r = mbrtowc(wcs, mbs, mbs_length, &shift_state);
+ #else
+- r = mbtowc(wcs, mbs, wcs_length);
++ r = mbtowc(wcs, mbs, mbs_length);
+ #endif
+ if (r == (size_t)-1 || r == (size_t)-2) {
+ ret_val = -1;
+- if (errno == EILSEQ) {
+- ++mbs;
+- --mbs_length;
+- continue;
+- } else
+- break;
++ break;
+ }
+ if (r == 0 || r > mbs_length)
+ break;
+ wcs++;
+- wcs_length--;
++ // wcs_length--;
+ mbs += r;
+ mbs_length -= r;
+ }
diff --git a/meta/recipes-extended/libarchive/libarchive_3.2.1.bb b/meta/recipes-extended/libarchive/libarchive_3.2.1.bb
deleted file mode 100644
index b65b5df01c..0000000000
--- a/meta/recipes-extended/libarchive/libarchive_3.2.1.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-SUMMARY = "Support for reading various archive formats"
-DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
-HOMEPAGE = "http://www.libarchive.org/"
-SECTION = "devel"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ed99aca006bc346974bb745a35336425"
-
-DEPENDS = "e2fsprogs-native"
-
-PACKAGECONFIG ?= "zlib bz2"
-
-PACKAGECONFIG_append_class-target = "\
- libxml2 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
-"
-
-PACKAGECONFIG_append_class-nativesdk = " largefile"
-
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
-PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2,"
-PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz,"
-PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
-PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
-PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
-PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
-PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
-PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
-
-SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
- "
-
-SRC_URI[md5sum] = "afa257047d1941a565216edbf0171e72"
-SRC_URI[sha256sum] = "72ee1a4e3fd534525f13a0ba1aa7b05b203d186e0c6072a8a4738649d0b3cfd2"
-
-inherit autotools update-alternatives pkgconfig
-
-CPPFLAGS += "-I${WORKDIR}/extra-includes"
-
-do_configure[cleandirs] += "${WORKDIR}/extra-includes"
-do_configure_prepend() {
- # We just need the headers for some type constants, so no need to
- # build all of e2fsprogs for the target
- cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
-}
-
-ALTERNATIVE_PRIORITY = "100"
-
-PACKAGES =+ "bsdtar"
-FILES_bsdtar = "${bindir}/bsdtar"
-
-ALTERNATIVE_bsdtar = "tar"
-ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
-ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
-
-PACKAGES =+ "bsdcpio"
-FILES_bsdcpio = "${bindir}/bsdcpio"
-
-ALTERNATIVE_bsdcpio = "cpio"
-ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
-ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libarchive/libarchive_3.4.0.bb b/meta/recipes-extended/libarchive/libarchive_3.4.0.bb
new file mode 100644
index 0000000000..755a9c7fa4
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive_3.4.0.bb
@@ -0,0 +1,68 @@
+SUMMARY = "Support for reading various archive formats"
+DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
+HOMEPAGE = "http://www.libarchive.org/"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fe01f5e02b1f0cc934d593a7b0ddceb6"
+
+DEPENDS = "e2fsprogs-native"
+
+PACKAGECONFIG ?= "zlib bz2 xz lzo"
+
+PACKAGECONFIG_append_class-target = "\
+ libxml2 \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
+"
+
+DEPENDS_BZIP2 = "bzip2-replacement-native"
+DEPENDS_BZIP2_class-target = "bzip2"
+
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
+PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,${DEPENDS_BZIP2},"
+PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz,"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
+PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
+PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
+PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
+PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
+PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
+
+EXTRA_OECONF += "--enable-largefile"
+
+SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
+ file://CVE-2019-19221.patch \
+"
+
+SRC_URI[md5sum] = "6046396255bd7cf6d0f6603a9bda39ac"
+SRC_URI[sha256sum] = "8643d50ed40c759f5412a3af4e353cffbce4fdf3b5cf321cb72cacf06b2d825e"
+
+inherit autotools update-alternatives pkgconfig
+
+CPPFLAGS += "-I${WORKDIR}/extra-includes"
+
+do_configure[cleandirs] += "${WORKDIR}/extra-includes"
+do_configure_prepend() {
+ # We just need the headers for some type constants, so no need to
+ # build all of e2fsprogs for the target
+ cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
+}
+
+ALTERNATIVE_PRIORITY = "80"
+
+PACKAGES =+ "bsdtar"
+FILES_bsdtar = "${bindir}/bsdtar"
+
+ALTERNATIVE_bsdtar = "tar"
+ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
+ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
+
+PACKAGES =+ "bsdcpio"
+FILES_bsdcpio = "${bindir}/bsdcpio"
+
+ALTERNATIVE_bsdcpio = "cpio"
+ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
+ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch b/meta/recipes-extended/libidn/libidn/0001-idn-format-security-warnings.patch
index 5adc7d9fd9..5adc7d9fd9 100644
--- a/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch
+++ b/meta/recipes-extended/libidn/libidn/0001-idn-format-security-warnings.patch
diff --git a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
index 98ba4d6ff6..43bd232944 100644
--- a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
+++ b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
@@ -1,25 +1,34 @@
-Upstream-Status: Inappropriate
+From cdd9e2e960eeb4eda7b08f0113d0cd03524c1d45 Mon Sep 17 00:00:00 2001
+From: Nitin A Kamble <nitin.a.kamble@intel.com>
+Date: Tue, 10 Jul 2012 02:44:30 -0700
+Subject: [PATCH] libidn: fix build with automake 1.12
+
+Upstream-Status: Inappropriate
automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that,
and the warnings are treated as errors because of the -Werror parameter.
-These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not
+These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not
eliminated these deprecated macros yet. So disable the treatment of warnings
as errors until gettext is updated to remove the deprecated macros.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/07/10
-Index: libidn-1.24/configure.ac
-===================================================================
---- libidn-1.24.orig/configure.ac
-+++ libidn-1.24/configure.ac
-@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 2002-2011 Si
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 261dad2..c4f935e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,7 @@ AC_INIT([GNU Libidn], [1.34], [bug-libidn@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS(config.h)
-AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override])
- AM_SILENT_RULES([yes])
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Library code modified: REVISION++
diff --git a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
index 5683d3c98d..3c0559e34f 100644
--- a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
+++ b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
@@ -1,3 +1,8 @@
+From d4f64b78419139eda3c0e1c6ee116bb5f70ea67c Mon Sep 17 00:00:00 2001
+From: Nitin A Kamble <nitin.a.kamble@intel.com>
+Date: Wed, 2 May 2012 18:05:19 -0700
+Subject: [PATCH] libtasn1: fix build with automake 1.12
+
Upstream-Status: Pending
This patch fixes following issue with automake 1.12
@@ -9,12 +14,16 @@ This patch fixes following issue with automake 1.12
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/03
-Index: libidn-1.24/configure.ac
-===================================================================
---- libidn-1.24.orig/configure.ac
-+++ libidn-1.24/configure.ac
-@@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17)
- AC_SUBST(LT_REVISION, 7)
+---
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 8297649..7b9626e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,6 +33,10 @@ AC_SUBST(LT_CURRENT, 18)
+ AC_SUBST(LT_REVISION, 0)
AC_SUBST(LT_AGE, 6)
+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
diff --git a/meta/recipes-extended/libidn/libidn2_2.3.0.bb b/meta/recipes-extended/libidn/libidn2_2.3.0.bb
new file mode 100644
index 0000000000..8e7e6c0dbc
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn2_2.3.0.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Internationalized Domain Name support library"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+HOMEPAGE = "http://www.gnu.org/software/libidn/"
+SECTION = "libs"
+LICENSE = "(GPLv2+ | LGPLv3) & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d834ea7d480438ada04e5d846152395 \
+ file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/idn2.c;endline=16;md5=426b74d6deb620ab6d39c8a6efd4c13a \
+ file://lib/idn2.h.in;endline=27;md5=c2cd28d3f87260f157f022eabb83714f"
+
+SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "01c5084995295e519f95978ae9785ee0"
+SRC_URI[sha256sum] = "e1cb1db3d2e249a6a3eb6f0946777c2e892d5c5dc7bd91c74394fc3a01cab8b5"
+
+DEPENDS = "virtual/libiconv libunistring"
+
+inherit pkgconfig autotools gettext texinfo gtk-doc lib_package
+
+EXTRA_OECONF += "--disable-rpath \
+ --with-libunistring-prefix=${STAGING_EXECPREFIXDIR} \
+ "
+
+do_install_append() {
+ sed -i -e 's|-L${STAGING_LIBDIR}||' ${D}${libdir}/pkgconfig/libidn2.pc
+}
+
+LICENSE_${PN} = "(GPLv2+ | LGPLv3)"
+LICENSE_${PN}-bin = "GPLv3+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libidn/libidn_0.6.14.bb b/meta/recipes-extended/libidn/libidn_0.6.14.bb
deleted file mode 100644
index c681560d82..0000000000
--- a/meta/recipes-extended/libidn/libidn_0.6.14.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Internationalized Domain Name support library"
-DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
-HOMEPAGE = "http://www.gnu.org/software/libidn/"
-SECTION = "libs"
-LICENSE = "LGPLv2.1+ & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
- file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://lib/idna.h;beginline=6;endline=18;md5=1336e848ca7b8e25767c3c7e8fa38a89 \
- file://src/idn.c;beginline=6;endline=18;md5=56c89e359652a71cda128d75f0ffdac4"
-PR = "r1"
-
-inherit pkgconfig autotools gettext texinfo
-
-SRC_URI = "http://alpha.gnu.org/gnu/libidn/${BPN}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "040f012a45feb56168853998bb87ad4d"
-SRC_URI[sha256sum] = "98910c2ad664bdf4eed2c2fff88e24f8882636ec9d26669366ff03b469c05ae3"
-
-do_configure_prepend() {
- # this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from
- # autoconf CVS because atm the autoconf it uses is a bit old
- # now with cross autotool, that macro is already there and this
- # local definition causes circular dependency. Actually AC_GNU_SOURCE
- # is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local
- # references to the latter here.
- sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4
- rm -f ${S}/lib/gl/m4/extensions.m4
-}
-
-do_install_append() {
- rm -rf ${D}${libdir}/Libidn.dll
- rm -rf ${D}${datadir}/emacs
-}
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/meta/recipes-extended/libidn/libidn_1.33.bb b/meta/recipes-extended/libidn/libidn_1.33.bb
deleted file mode 100644
index d3d0f557bb..0000000000
--- a/meta/recipes-extended/libidn/libidn_1.33.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Internationalized Domain Name support library"
-DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
-HOMEPAGE = "http://www.gnu.org/software/libidn/"
-SECTION = "libs"
-LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \
- file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
- file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
- file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://lib/idna.h;endline=21;md5=37cffad24807f446a24de3e7371f20b9 \
- file://src/idn.c;endline=20;md5=09e97034a8877b3451cb65065fc2c06e"
-DEPENDS = "virtual/libiconv"
-
-inherit pkgconfig autotools gettext texinfo gtk-doc
-
-SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
- file://libidn_fix_for_automake-1.12.patch \
- file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
- file://dont-depend-on-help2man.patch \
- file://0001-idn-fix-printf-format-security-warnings.patch \
-"
-
-SRC_URI[md5sum] = "a9aa7e003665de9c82bd3f9fc6ccf308"
-SRC_URI[sha256sum] = "44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19"
-
-# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
-# so package command into a separate package
-PACKAGES =+ "idn"
-FILES_idn = "${bindir}/*"
-
-LICENSE_${PN} = "LGPLv2.1+ | LGPLv3"
-LICENSE_idn = "GPLv3+"
-
-EXTRA_OECONF = "--disable-csharp"
-
-do_install_append() {
- rm -rf ${D}${datadir}/emacs
-}
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/meta/recipes-extended/libidn/libidn_1.35.bb b/meta/recipes-extended/libidn/libidn_1.35.bb
new file mode 100644
index 0000000000..d5ce5b46bd
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn_1.35.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Internationalized Domain Name support library"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+HOMEPAGE = "http://www.gnu.org/software/libidn/"
+SECTION = "libs"
+LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \
+ file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
+ file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://lib/idna.h;endline=21;md5=37cffad24807f446a24de3e7371f20b9 \
+ file://src/idn.c;endline=20;md5=09e97034a8877b3451cb65065fc2c06e"
+DEPENDS = "virtual/libiconv autoconf-archive"
+
+inherit pkgconfig autotools gettext texinfo gtk-doc
+
+SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
+ file://libidn_fix_for_automake-1.12.patch \
+ file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
+ file://dont-depend-on-help2man.patch \
+ file://0001-idn-format-security-warnings.patch \
+ "
+
+SRC_URI[md5sum] = "bef634141fe39326cb354b75e891fead"
+SRC_URI[sha256sum] = "f11af1005b46b7b15d057d7f107315a1ad46935c7fcdf243c16e46ec14f0fe1e"
+
+# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
+# so package command into a separate package
+PACKAGES =+ "idn"
+FILES_idn = "${bindir}/*"
+
+LICENSE_${PN} = "LGPLv2.1+ | LGPLv3"
+LICENSE_idn = "GPLv3+"
+
+EXTRA_OECONF = "--disable-csharp"
+
+do_install_append() {
+ rm -rf ${D}${datadir}/emacs
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-extended/libmnl/libmnl_1.0.4.bb b/meta/recipes-extended/libmnl/libmnl_1.0.4.bb
new file mode 100644
index 0000000000..b55bb311f6
--- /dev/null
+++ b/meta/recipes-extended/libmnl/libmnl_1.0.4.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Minimalistic user-space Netlink utility library"
+DESCRIPTION = "Minimalistic user-space library oriented to Netlink developers, providing \
+ functions for common tasks in parsing, validating, and constructing both the Netlink header and TLVs."
+HOMEPAGE = "https://www.netfilter.org/projects/libmnl/index.html"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "https://netfilter.org/projects/libmnl/files/libmnl-${PV}.tar.bz2;name=tar"
+SRC_URI[tar.md5sum] = "be9b4b5328c6da1bda565ac5dffadb2d"
+SRC_URI[tar.sha256sum] = "171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/libnsl/libnsl2_git.bb b/meta/recipes-extended/libnsl/libnsl2_git.bb
new file mode 100644
index 0000000000..28c84af7ad
--- /dev/null
+++ b/meta/recipes-extended/libnsl/libnsl2_git.bb
@@ -0,0 +1,24 @@
+# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library containing NIS functions using TI-RPC (IPv6 enabled)"
+DESCRIPTION = "This library contains the public client interface for NIS(YP) and NIS+\
+ it was part of glibc and now is standalone packages. it also supports IPv6"
+HOMEPAGE = "https://github.com/thkukuk/libnsl"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+SECTION = "libs"
+DEPENDS = "libtirpc"
+
+PV = "1.2.0+git${SRCPV}"
+
+SRCREV = "4a062cf4180d99371198951e4ea5b4550efd58a3"
+
+SRC_URI = "git://github.com/thkukuk/libnsl \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig gettext
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libnss-nis/libnss-nis.bb b/meta/recipes-extended/libnss-nis/libnss-nis.bb
new file mode 100644
index 0000000000..a1d914e871
--- /dev/null
+++ b/meta/recipes-extended/libnss-nis/libnss-nis.bb
@@ -0,0 +1,31 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "NSS module for glibc, to provide NIS support for glibc"
+
+DESCRIPTION = "This package contains the NSS NIS plugin for glibc.\
+This code was formerly part of glibc, but is now standalone to\
+be able to link against TI-RPC for IPv6 support."
+
+HOMEPAGE = "https://github.com/thkukuk/libnss_nis"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+SECTION = "libs"
+DEPENDS += "libtirpc libnsl2"
+
+PV = "3.1+git${SRCPV}"
+
+SRCREV = "062f31999b35393abf7595cb89dfc9590d5a42ad"
+
+SRC_URI = "git://github.com/thkukuk/libnss_nis \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND += "native nativesdk"
+#
+# We will skip parsing this packagegeoup for non-glibc systems
+#
+COMPATIBLE_HOST_libc-musl = 'null'
diff --git a/meta/recipes-extended/libpipeline/libpipeline_1.5.1.bb b/meta/recipes-extended/libpipeline/libpipeline_1.5.1.bb
new file mode 100644
index 0000000000..a5802074b1
--- /dev/null
+++ b/meta/recipes-extended/libpipeline/libpipeline_1.5.1.bb
@@ -0,0 +1,15 @@
+SUMMARY = "pipeline manipulation library"
+DESCRIPTION = "This is a C library for setting up and running pipelines of processes, \
+without needing to involve shell command-line parsing which is often \
+error-prone and insecure."
+HOMEPAGE = "http://libpipeline.nongnu.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/libpipeline/libpipeline-${PV}.tar.gz"
+SRC_URI[md5sum] = "4c8fe6cd85422baafd6e060f896c61bc"
+SRC_URI[sha256sum] = "d633706b7d845f08b42bc66ddbe845d57e726bf89298e2cee29f09577e2f902f"
+
+inherit pkgconfig autotools
+
+acpaths = "-I ${S}/gl/m4 -I ${S}/m4"
diff --git a/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch b/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
deleted file mode 100644
index 24e2228b74..0000000000
--- a/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-From 5b6e113f548bd8a2b100267bc5d54cee861a4b98 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?=
- =?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?=
- <ngompa13@gmail.com>
-Date: Wed, 11 Nov 2015 20:32:17 -0500
-Subject: [PATCH] Add fallback fopencookie() implementation
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In environments where neither fopencookie() nor funopen()
-are implemented, we need to provide a suitable implementation
-of fopencookie() that we can use.
-
-Upstream-Status: Submitted [ https://github.com/openSUSE/libsolv/pull/112 ]
-
-Signed-off-by: Neal Gompa (ニール・ゴンãƒã‚š) <ngompa13@gmail.com>com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- ext/CMakeLists.txt | 7 ++
- ext/solv_xfopen.c | 10 +--
- ext/solv_xfopen_fallback_fopencookie.c | 124 +++++++++++++++++++++++++++++++++
- ext/solv_xfopen_fallback_fopencookie.h | 28 ++++++++
- 4 files changed, 165 insertions(+), 4 deletions(-)
- create mode 100644 ext/solv_xfopen_fallback_fopencookie.c
- create mode 100644 ext/solv_xfopen_fallback_fopencookie.h
-
-diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
-index ad52495..4f282ce 100644
---- a/ext/CMakeLists.txt
-+++ b/ext/CMakeLists.txt
-@@ -4,6 +4,13 @@ SET (libsolvext_SRCS
- SET (libsolvext_HEADERS
- tools_util.h solv_xfopen.h testcase.h)
-
-+IF (NOT HAVE_FOPENCOOKIE AND NOT HAVE_FUNOPEN)
-+ SET (libsolvext_SRCS ${libsolvext_SRCS}
-+ solv_xfopen_fallback_fopencookie.c)
-+ SET (libsolvext_HEADERS ${libsolvext_HEADERS}
-+ solv_xfopen_fallback_fopencookie.h)
-+ENDIF (NOT HAVE_FOPENCOOKIE AND NOT HAVE_FUNOPEN)
-+
- IF (ENABLE_RPMDB)
- SET (libsolvext_SRCS ${libsolvext_SRCS}
- pool_fileconflicts.c repo_rpmdb.c)
-diff --git a/ext/solv_xfopen.c b/ext/solv_xfopen.c
-index b0421bf..31345dd 100644
---- a/ext/solv_xfopen.c
-+++ b/ext/solv_xfopen.c
-@@ -13,6 +13,10 @@
- #include <zlib.h>
- #include <fcntl.h>
-
-+#if !defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)
-+#include "solv_xfopen_fallback_fopencookie.h"
-+#endif
-+
- #include "solv_xfopen.h"
- #include "util.h"
-
-@@ -39,7 +43,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
- ssize_t (*cwrite)(void *, const char *, size_t),
- int (*cclose)(void *))
- {
--#ifdef HAVE_FUNOPEN
-+#if defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)
- if (!cookie)
- return 0;
- return funopen(cookie,
-@@ -48,7 +52,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
- (fpos_t (*)(void *, fpos_t, int))NULL, /* seekfn */
- cclose
- );
--#elif defined(HAVE_FOPENCOOKIE)
-+#else
- cookie_io_functions_t cio;
-
- if (!cookie)
-@@ -60,8 +64,6 @@ static FILE *cookieopen(void *cookie, const char *mode,
- cio.write = cwrite;
- cio.close = cclose;
- return fopencookie(cookie, *mode == 'w' ? "w" : "r", cio);
--#else
--# error Need to implement custom I/O
- #endif
- }
-
-diff --git a/ext/solv_xfopen_fallback_fopencookie.c b/ext/solv_xfopen_fallback_fopencookie.c
-new file mode 100644
-index 0000000..89426a9
---- /dev/null
-+++ b/ext/solv_xfopen_fallback_fopencookie.c
-@@ -0,0 +1,124 @@
-+/*
-+ * Provides a very limited fopencookie() for environments with a libc
-+ * that lacks it.
-+ *
-+ * Authors: zhasha & nsz
-+ * Modified for libsolv by Neal Gompa
-+ *
-+ * This program is licensed under the BSD license, read LICENSE.BSD
-+ * for further information.
-+ *
-+ */
-+
-+#define _LARGEFILE64_SOURCE 1
-+#include <pthread.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <fcntl.h>
-+#include <sys/types.h>
-+#include <errno.h>
-+#include "solv_xfopen_fallback_fopencookie.h"
-+
-+extern int pipe2(int[2], int);
-+
-+struct ctx {
-+ int fd;
-+ void *cookie;
-+ struct cookie_io_functions_t io;
-+ char buf[1024];
-+};
-+
-+static void *proxy(void *arg)
-+{
-+ struct ctx *ctx = arg;
-+ ssize_t r;
-+ size_t n, k;
-+
-+ pthread_detach(pthread_self());
-+
-+ while (1) {
-+ r = ctx->io.read ?
-+ (ctx->io.read)(ctx->cookie, ctx->buf, sizeof(ctx->buf)) :
-+ read(ctx->fd, ctx->buf, sizeof(ctx->buf));
-+ if (r < 0) {
-+ if (errno != EINTR) { break; }
-+ continue;
-+ }
-+ if (r == 0) { break; }
-+
-+ n = r, k = 0;
-+ while (n > 0) {
-+ r = ctx->io.write ?
-+ (ctx->io.write)(ctx->cookie, ctx->buf + k, n) :
-+ write(ctx->fd, ctx->buf + k, n);
-+ if (r < 0) {
-+ if (errno != EINTR) { break; }
-+ continue;
-+ }
-+ if (r == 0) { break; }
-+
-+ n -= r, k += r;
-+ }
-+ if (n > 0) { break; }
-+ }
-+
-+ if (ctx->io.close) { (ctx->io.close)(ctx->cookie); }
-+ close(ctx->fd);
-+ return NULL;
-+}
-+
-+FILE *fopencookie(void *cookie, const char *mode, struct cookie_io_functions_t io)
-+{
-+ struct ctx *ctx = NULL;
-+ int rd = 0, wr = 0;
-+ int p[2] = { -1, -1 };
-+ FILE *f = NULL;
-+ pthread_t dummy;
-+
-+ switch (mode[0]) {
-+ case 'a':
-+ case 'w': wr = 1; break;
-+ case 'r': rd = 1; break;
-+ default:
-+ errno = EINVAL;
-+ return NULL;
-+ }
-+ switch (mode[1]) {
-+ case '\0': break;
-+ case '+':
-+ if (mode[2] == '\0') {
-+ errno = ENOTSUP;
-+ return NULL;
-+ }
-+ default:
-+ errno = EINVAL;
-+ return NULL;
-+ }
-+ if (io.seek) {
-+ errno = ENOTSUP;
-+ return NULL;
-+ }
-+
-+ ctx = malloc(sizeof(*ctx));
-+ if (!ctx) { return NULL; }
-+ if (pipe2(p, O_CLOEXEC) != 0) { goto err; }
-+ if ((f = fdopen(p[wr], mode)) == NULL) { goto err; }
-+ p[wr] = -1;
-+ ctx->fd = p[rd];
-+ ctx->cookie = cookie;
-+ ctx->io.read = rd ? io.read : NULL;
-+ ctx->io.write = wr ? io.write : NULL;
-+ ctx->io.seek = NULL;
-+ ctx->io.close = io.close;
-+ if (pthread_create(&dummy, NULL, proxy, ctx) != 0) { goto err; }
-+
-+ return f;
-+
-+err:
-+ if (p[0] >= 0) { close(p[0]); }
-+ if (p[1] >= 0) { close(p[1]); }
-+ if (f) { fclose(f); }
-+ free(ctx);
-+ return NULL;
-+}
-diff --git a/ext/solv_xfopen_fallback_fopencookie.h b/ext/solv_xfopen_fallback_fopencookie.h
-new file mode 100644
-index 0000000..7223e3f
---- /dev/null
-+++ b/ext/solv_xfopen_fallback_fopencookie.h
-@@ -0,0 +1,28 @@
-+/*
-+ * Provides a very limited fopencookie() for environments with a libc
-+ * that lacks it.
-+ *
-+ * Authors: zhasha & nsz
-+ * Modified for libsolv by Neal Gompa
-+ *
-+ * This program is licensed under the BSD license, read LICENSE.BSD
-+ * for further information.
-+ *
-+ */
-+
-+#ifndef SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H
-+#define SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H
-+
-+#include <stdio.h>
-+#include <stdint.h>
-+
-+typedef struct cookie_io_functions_t {
-+ ssize_t (*read)(void *, char *, size_t);
-+ ssize_t (*write)(void *, const char *, size_t);
-+ int (*seek)(void *, off64_t, int);
-+ int (*close)(void *);
-+} cookie_io_functions_t;
-+
-+FILE *fopencookie(void *cookie, const char *mode, struct cookie_io_functions_t io);
-+
-+#endif
---
-2.4.0
-
diff --git a/meta/recipes-extended/libsolv/libsolv_0.6.23.bb b/meta/recipes-extended/libsolv/libsolv_0.6.23.bb
deleted file mode 100644
index f3f3d6e645..0000000000
--- a/meta/recipes-extended/libsolv/libsolv_0.6.23.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Library for solving packages and reading repositories"
-HOMEPAGE = "https://github.com/openSUSE/libsolv"
-BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
-SECTION = "devel"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
-
-DEPENDS = "expat zlib"
-
-SRC_URI = "git://github.com/openSUSE/libsolv.git \
- "
-SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch"
-
-SRCREV = "f654c8cfa52427ed42d7142e58452dae08c0c2d0"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON"
-
-PACKAGES =+ "${PN}-tools ${PN}ext"
-
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibSolv.cmake"
-FILES_${PN}-tools = "${bindir}/*"
-FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
-
-BBCLASSEXTEND =+ "native nativesdk"
diff --git a/meta/recipes-extended/libsolv/libsolv_0.7.8.bb b/meta/recipes-extended/libsolv/libsolv_0.7.8.bb
new file mode 100644
index 0000000000..8fe9ae0469
--- /dev/null
+++ b/meta/recipes-extended/libsolv/libsolv_0.7.8.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Library for solving packages and reading repositories"
+HOMEPAGE = "https://github.com/openSUSE/libsolv"
+BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
+SECTION = "devel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
+
+DEPENDS = "expat zlib"
+
+SRC_URI = "git://github.com/openSUSE/libsolv.git \
+"
+
+SRCREV = "5205c5683ce2c8b8288534059ba40a318a2a161d"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+PACKAGECONFIG ??= "rpm"
+PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON,,rpm"
+
+EXTRA_OECMAKE = "-DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON"
+
+PACKAGES =+ "${PN}-tools ${PN}ext"
+
+FILES_${PN}-tools = "${bindir}/*"
+FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch b/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
deleted file mode 100644
index 50613ba312..0000000000
--- a/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Subject: [PATCH] Add missing rwlock_unlocks in xprt_register
-
-It looks like in b2c9430f46c4ac848957fb8adaac176a3f6ac03f when svc_run
-switched to poll, an early return was added, but the rwlock was not
-unlocked.
-
-I observed that rpcbind built against libtirpc-1.0.1 would handle only
-one request before hanging, and tracked it down to a missing
-rwlock_unlock here.
-
-Fixes: b2c9430f46c4 ('Use poll() instead of select() in svc_run()')
-
-Upstream-Status: Backport
-
-Signed-off-by: Michael Forney <mforney@mforney.org>
-Signed-off-by: Steve Dickson <steved@redhat.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- src/svc.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/svc.c b/src/svc.c
-index 9c41445..b59467b 100644
---- a/src/svc.c
-+++ b/src/svc.c
-@@ -99,7 +99,7 @@ xprt_register (xprt)
- {
- __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *));
- if (__svc_xports == NULL)
-- return;
-+ goto unlock;
- }
- if (sock < _rpc_dtablesize())
- {
-@@ -120,14 +120,14 @@ xprt_register (xprt)
- svc_pollfd[i].fd = sock;
- svc_pollfd[i].events = (POLLIN | POLLPRI |
- POLLRDNORM | POLLRDBAND);
-- return;
-+ goto unlock;
- }
-
- new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd,
- sizeof (struct pollfd)
- * (svc_max_pollfd + 1));
- if (new_svc_pollfd == NULL) /* Out of memory */
-- return;
-+ goto unlock;
- svc_pollfd = new_svc_pollfd;
- ++svc_max_pollfd;
-
-@@ -135,6 +135,7 @@ xprt_register (xprt)
- svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI |
- POLLRDNORM | POLLRDBAND);
- }
-+unlock:
- rwlock_unlock (&svc_fd_lock);
- }
-
---
-2.5.3
-
diff --git a/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch b/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch
deleted file mode 100644
index f93223feb4..0000000000
--- a/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch
+++ /dev/null
@@ -1,878 +0,0 @@
-musl does not provide sys/queue.h implementation. Borrow queue.h from
-the NetBSD project
-http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.68
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur libtirpc-1.0.1-orig/src/clnt_bcast.c libtirpc-1.0.1/src/clnt_bcast.c
---- libtirpc-1.0.1-orig/src/clnt_bcast.c 2015-10-30 17:15:14.000000000 +0200
-+++ libtirpc-1.0.1/src/clnt_bcast.c 2015-12-21 17:03:52.066008311 +0200
-@@ -40,7 +40,6 @@
- */
- #include <sys/socket.h>
- #include <sys/types.h>
--#include <sys/queue.h>
-
- #include <net/if.h>
- #include <netinet/in.h>
-@@ -62,6 +61,7 @@
- #include <err.h>
- #include <string.h>
-
-+#include "queue.h"
- #include "rpc_com.h"
- #include "debug.h"
-
-diff -Naur libtirpc-1.0.1-orig/tirpc/queue.h libtirpc-1.0.1/tirpc/queue.h
---- libtirpc-1.0.1-orig/tirpc/queue.h 1970-01-01 02:00:00.000000000 +0200
-+++ libtirpc-1.0.1/tirpc/queue.h 2015-12-21 17:02:44.427853905 +0200
-@@ -0,0 +1,846 @@
-+/* $NetBSD: queue.h,v 1.68 2014/11/19 08:10:01 uebayasi Exp $ */
-+
-+/*
-+ * Copyright (c) 1991, 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.
-+ * 3. Neither the name of the University nor the names of its contributors
-+ * may be used to endorse or promote products derived from this software
-+ * without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
-+ *
-+ * @(#)queue.h 8.5 (Berkeley) 8/20/94
-+ */
-+
-+#ifndef _SYS_QUEUE_H_
-+#define _SYS_QUEUE_H_
-+
-+/*
-+ * This file defines five types of data structures: singly-linked lists,
-+ * lists, simple queues, tail queues, and circular queues.
-+ *
-+ * A singly-linked list is headed by a single forward pointer. The
-+ * elements are singly linked for minimum space and pointer manipulation
-+ * overhead at the expense of O(n) removal for arbitrary elements. New
-+ * elements can be added to the list after an existing element or at the
-+ * head of the list. Elements being removed from the head of the list
-+ * should use the explicit macro for this purpose for optimum
-+ * efficiency. A singly-linked list may only be traversed in the forward
-+ * direction. Singly-linked lists are ideal for applications with large
-+ * datasets and few or no removals or for implementing a LIFO queue.
-+ *
-+ * A list is headed by a single forward pointer (or an array of forward
-+ * pointers for a hash table header). The elements are doubly linked
-+ * so that an arbitrary element can be removed without a need to
-+ * traverse the list. New elements can be added to the list before
-+ * or after an existing element or at the head of the list. A list
-+ * may only be traversed in the forward direction.
-+ *
-+ * A simple queue is headed by a pair of pointers, one the head of the
-+ * list and the other to the tail of the list. The elements are singly
-+ * linked to save space, so elements can only be removed from the
-+ * head of the list. New elements can be added to the list after
-+ * an existing element, at the head of the list, or at the end of the
-+ * list. A simple queue may only be traversed in the forward direction.
-+ *
-+ * A tail queue is headed by a pair of pointers, one to the head of the
-+ * list and the other to the tail of the list. The elements are doubly
-+ * linked so that an arbitrary element can be removed without a need to
-+ * traverse the list. New elements can be added to the list before or
-+ * after an existing element, at the head of the list, or at the end of
-+ * the list. A tail queue may be traversed in either direction.
-+ *
-+ * A circle queue is headed by a pair of pointers, one to the head of the
-+ * list and the other to the tail of the list. The elements are doubly
-+ * linked so that an arbitrary element can be removed without a need to
-+ * traverse the list. New elements can be added to the list before or after
-+ * an existing element, at the head of the list, or at the end of the list.
-+ * A circle queue may be traversed in either direction, but has a more
-+ * complex end of list detection.
-+ *
-+ * For details on the use of these macros, see the queue(3) manual page.
-+ */
-+
-+/*
-+ * Include the definition of NULL only on NetBSD because sys/null.h
-+ * is not available elsewhere. This conditional makes the header
-+ * portable and it can simply be dropped verbatim into any system.
-+ * The caveat is that on other systems some other header
-+ * must provide NULL before the macros can be used.
-+ */
-+#ifdef __NetBSD__
-+#include <sys/null.h>
-+#endif
-+
-+#if defined(QUEUEDEBUG)
-+# if defined(_KERNEL)
-+# define QUEUEDEBUG_ABORT(...) panic(__VA_ARGS__)
-+# else
-+# include <err.h>
-+# define QUEUEDEBUG_ABORT(...) err(1, __VA_ARGS__)
-+# endif
-+#endif
-+
-+/*
-+ * Singly-linked List definitions.
-+ */
-+#define SLIST_HEAD(name, type) \
-+struct name { \
-+ struct type *slh_first; /* first element */ \
-+}
-+
-+#define SLIST_HEAD_INITIALIZER(head) \
-+ { NULL }
-+
-+#define SLIST_ENTRY(type) \
-+struct { \
-+ struct type *sle_next; /* next element */ \
-+}
-+
-+/*
-+ * Singly-linked List access methods.
-+ */
-+#define SLIST_FIRST(head) ((head)->slh_first)
-+#define SLIST_END(head) NULL
-+#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
-+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
-+
-+#define SLIST_FOREACH(var, head, field) \
-+ for((var) = (head)->slh_first; \
-+ (var) != SLIST_END(head); \
-+ (var) = (var)->field.sle_next)
-+
-+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = SLIST_FIRST((head)); \
-+ (var) != SLIST_END(head) && \
-+ ((tvar) = SLIST_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
-+/*
-+ * Singly-linked List functions.
-+ */
-+#define SLIST_INIT(head) do { \
-+ (head)->slh_first = SLIST_END(head); \
-+} while (/*CONSTCOND*/0)
-+
-+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
-+ (elm)->field.sle_next = (slistelm)->field.sle_next; \
-+ (slistelm)->field.sle_next = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define SLIST_INSERT_HEAD(head, elm, field) do { \
-+ (elm)->field.sle_next = (head)->slh_first; \
-+ (head)->slh_first = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define SLIST_REMOVE_AFTER(slistelm, field) do { \
-+ (slistelm)->field.sle_next = \
-+ SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \
-+} while (/*CONSTCOND*/0)
-+
-+#define SLIST_REMOVE_HEAD(head, field) do { \
-+ (head)->slh_first = (head)->slh_first->field.sle_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define SLIST_REMOVE(head, elm, type, field) do { \
-+ if ((head)->slh_first == (elm)) { \
-+ SLIST_REMOVE_HEAD((head), field); \
-+ } \
-+ else { \
-+ struct type *curelm = (head)->slh_first; \
-+ while(curelm->field.sle_next != (elm)) \
-+ curelm = curelm->field.sle_next; \
-+ curelm->field.sle_next = \
-+ curelm->field.sle_next->field.sle_next; \
-+ } \
-+} while (/*CONSTCOND*/0)
-+
-+
-+/*
-+ * List definitions.
-+ */
-+#define LIST_HEAD(name, type) \
-+struct name { \
-+ struct type *lh_first; /* first element */ \
-+}
-+
-+#define LIST_HEAD_INITIALIZER(head) \
-+ { NULL }
-+
-+#define LIST_ENTRY(type) \
-+struct { \
-+ struct type *le_next; /* next element */ \
-+ struct type **le_prev; /* address of previous next element */ \
-+}
-+
-+/*
-+ * List access methods.
-+ */
-+#define LIST_FIRST(head) ((head)->lh_first)
-+#define LIST_END(head) NULL
-+#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head))
-+#define LIST_NEXT(elm, field) ((elm)->field.le_next)
-+
-+#define LIST_FOREACH(var, head, field) \
-+ for ((var) = ((head)->lh_first); \
-+ (var) != LIST_END(head); \
-+ (var) = ((var)->field.le_next))
-+
-+#define LIST_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = LIST_FIRST((head)); \
-+ (var) != LIST_END(head) && \
-+ ((tvar) = LIST_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
-+#define LIST_MOVE(head1, head2) do { \
-+ LIST_INIT((head2)); \
-+ if (!LIST_EMPTY((head1))) { \
-+ (head2)->lh_first = (head1)->lh_first; \
-+ LIST_INIT((head1)); \
-+ } \
-+} while (/*CONSTCOND*/0)
-+
-+/*
-+ * List functions.
-+ */
-+#if defined(QUEUEDEBUG)
-+#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) \
-+ if ((head)->lh_first && \
-+ (head)->lh_first->field.le_prev != &(head)->lh_first) \
-+ QUEUEDEBUG_ABORT("LIST_INSERT_HEAD %p %s:%d", (head), \
-+ __FILE__, __LINE__);
-+#define QUEUEDEBUG_LIST_OP(elm, field) \
-+ if ((elm)->field.le_next && \
-+ (elm)->field.le_next->field.le_prev != \
-+ &(elm)->field.le_next) \
-+ QUEUEDEBUG_ABORT("LIST_* forw %p %s:%d", (elm), \
-+ __FILE__, __LINE__); \
-+ if (*(elm)->field.le_prev != (elm)) \
-+ QUEUEDEBUG_ABORT("LIST_* back %p %s:%d", (elm), \
-+ __FILE__, __LINE__);
-+#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) \
-+ (elm)->field.le_next = (void *)1L; \
-+ (elm)->field.le_prev = (void *)1L;
-+#else
-+#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field)
-+#define QUEUEDEBUG_LIST_OP(elm, field)
-+#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field)
-+#endif
-+
-+#define LIST_INIT(head) do { \
-+ (head)->lh_first = LIST_END(head); \
-+} while (/*CONSTCOND*/0)
-+
-+#define LIST_INSERT_AFTER(listelm, elm, field) do { \
-+ QUEUEDEBUG_LIST_OP((listelm), field) \
-+ if (((elm)->field.le_next = (listelm)->field.le_next) != \
-+ LIST_END(head)) \
-+ (listelm)->field.le_next->field.le_prev = \
-+ &(elm)->field.le_next; \
-+ (listelm)->field.le_next = (elm); \
-+ (elm)->field.le_prev = &(listelm)->field.le_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
-+ QUEUEDEBUG_LIST_OP((listelm), field) \
-+ (elm)->field.le_prev = (listelm)->field.le_prev; \
-+ (elm)->field.le_next = (listelm); \
-+ *(listelm)->field.le_prev = (elm); \
-+ (listelm)->field.le_prev = &(elm)->field.le_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define LIST_INSERT_HEAD(head, elm, field) do { \
-+ QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field) \
-+ if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head))\
-+ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
-+ (head)->lh_first = (elm); \
-+ (elm)->field.le_prev = &(head)->lh_first; \
-+} while (/*CONSTCOND*/0)
-+
-+#define LIST_REMOVE(elm, field) do { \
-+ QUEUEDEBUG_LIST_OP((elm), field) \
-+ if ((elm)->field.le_next != NULL) \
-+ (elm)->field.le_next->field.le_prev = \
-+ (elm)->field.le_prev; \
-+ *(elm)->field.le_prev = (elm)->field.le_next; \
-+ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \
-+} while (/*CONSTCOND*/0)
-+
-+#define LIST_REPLACE(elm, elm2, field) do { \
-+ if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
-+ (elm2)->field.le_next->field.le_prev = \
-+ &(elm2)->field.le_next; \
-+ (elm2)->field.le_prev = (elm)->field.le_prev; \
-+ *(elm2)->field.le_prev = (elm2); \
-+ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \
-+} while (/*CONSTCOND*/0)
-+
-+/*
-+ * Simple queue definitions.
-+ */
-+#define SIMPLEQ_HEAD(name, type) \
-+struct name { \
-+ struct type *sqh_first; /* first element */ \
-+ struct type **sqh_last; /* addr of last next element */ \
-+}
-+
-+#define SIMPLEQ_HEAD_INITIALIZER(head) \
-+ { NULL, &(head).sqh_first }
-+
-+#define SIMPLEQ_ENTRY(type) \
-+struct { \
-+ struct type *sqe_next; /* next element */ \
-+}
-+
-+/*
-+ * Simple queue access methods.
-+ */
-+#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
-+#define SIMPLEQ_END(head) NULL
-+#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head))
-+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
-+
-+#define SIMPLEQ_FOREACH(var, head, field) \
-+ for ((var) = ((head)->sqh_first); \
-+ (var) != SIMPLEQ_END(head); \
-+ (var) = ((var)->field.sqe_next))
-+
-+#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \
-+ for ((var) = ((head)->sqh_first); \
-+ (var) != SIMPLEQ_END(head) && \
-+ ((next = ((var)->field.sqe_next)), 1); \
-+ (var) = (next))
-+
-+/*
-+ * Simple queue functions.
-+ */
-+#define SIMPLEQ_INIT(head) do { \
-+ (head)->sqh_first = NULL; \
-+ (head)->sqh_last = &(head)->sqh_first; \
-+} while (/*CONSTCOND*/0)
-+
-+#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
-+ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
-+ (head)->sqh_last = &(elm)->field.sqe_next; \
-+ (head)->sqh_first = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
-+ (elm)->field.sqe_next = NULL; \
-+ *(head)->sqh_last = (elm); \
-+ (head)->sqh_last = &(elm)->field.sqe_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
-+ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
-+ (head)->sqh_last = &(elm)->field.sqe_next; \
-+ (listelm)->field.sqe_next = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
-+ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
-+ (head)->sqh_last = &(head)->sqh_first; \
-+} while (/*CONSTCOND*/0)
-+
-+#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \
-+ if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
-+ == NULL) \
-+ (head)->sqh_last = &(elm)->field.sqe_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
-+ if ((head)->sqh_first == (elm)) { \
-+ SIMPLEQ_REMOVE_HEAD((head), field); \
-+ } else { \
-+ struct type *curelm = (head)->sqh_first; \
-+ while (curelm->field.sqe_next != (elm)) \
-+ curelm = curelm->field.sqe_next; \
-+ if ((curelm->field.sqe_next = \
-+ curelm->field.sqe_next->field.sqe_next) == NULL) \
-+ (head)->sqh_last = &(curelm)->field.sqe_next; \
-+ } \
-+} while (/*CONSTCOND*/0)
-+
-+#define SIMPLEQ_CONCAT(head1, head2) do { \
-+ if (!SIMPLEQ_EMPTY((head2))) { \
-+ *(head1)->sqh_last = (head2)->sqh_first; \
-+ (head1)->sqh_last = (head2)->sqh_last; \
-+ SIMPLEQ_INIT((head2)); \
-+ } \
-+} while (/*CONSTCOND*/0)
-+
-+#define SIMPLEQ_LAST(head, type, field) \
-+ (SIMPLEQ_EMPTY((head)) ? \
-+ NULL : \
-+ ((struct type *)(void *) \
-+ ((char *)((head)->sqh_last) - offsetof(struct type, field))))
-+
-+/*
-+ * Tail queue definitions.
-+ */
-+#define _TAILQ_HEAD(name, type, qual) \
-+struct name { \
-+ qual type *tqh_first; /* first element */ \
-+ qual type *qual *tqh_last; /* addr of last next element */ \
-+}
-+#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
-+
-+#define TAILQ_HEAD_INITIALIZER(head) \
-+ { TAILQ_END(head), &(head).tqh_first }
-+
-+#define _TAILQ_ENTRY(type, qual) \
-+struct { \
-+ qual type *tqe_next; /* next element */ \
-+ qual type *qual *tqe_prev; /* address of previous next element */\
-+}
-+#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
-+
-+/*
-+ * Tail queue access methods.
-+ */
-+#define TAILQ_FIRST(head) ((head)->tqh_first)
-+#define TAILQ_END(head) (NULL)
-+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
-+#define TAILQ_LAST(head, headname) \
-+ (*(((struct headname *)((head)->tqh_last))->tqh_last))
-+#define TAILQ_PREV(elm, headname, field) \
-+ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
-+#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head))
-+
-+
-+#define TAILQ_FOREACH(var, head, field) \
-+ for ((var) = ((head)->tqh_first); \
-+ (var) != TAILQ_END(head); \
-+ (var) = ((var)->field.tqe_next))
-+
-+#define TAILQ_FOREACH_SAFE(var, head, field, next) \
-+ for ((var) = ((head)->tqh_first); \
-+ (var) != TAILQ_END(head) && \
-+ ((next) = TAILQ_NEXT(var, field), 1); (var) = (next))
-+
-+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
-+ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));\
-+ (var) != TAILQ_END(head); \
-+ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
-+
-+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \
-+ for ((var) = TAILQ_LAST((head), headname); \
-+ (var) != TAILQ_END(head) && \
-+ ((prev) = TAILQ_PREV((var), headname, field), 1); (var) = (prev))
-+
-+/*
-+ * Tail queue functions.
-+ */
-+#if defined(QUEUEDEBUG)
-+#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) \
-+ if ((head)->tqh_first && \
-+ (head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \
-+ QUEUEDEBUG_ABORT("TAILQ_INSERT_HEAD %p %s:%d", (head), \
-+ __FILE__, __LINE__);
-+#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) \
-+ if (*(head)->tqh_last != NULL) \
-+ QUEUEDEBUG_ABORT("TAILQ_INSERT_TAIL %p %s:%d", (head), \
-+ __FILE__, __LINE__);
-+#define QUEUEDEBUG_TAILQ_OP(elm, field) \
-+ if ((elm)->field.tqe_next && \
-+ (elm)->field.tqe_next->field.tqe_prev != \
-+ &(elm)->field.tqe_next) \
-+ QUEUEDEBUG_ABORT("TAILQ_* forw %p %s:%d", (elm), \
-+ __FILE__, __LINE__); \
-+ if (*(elm)->field.tqe_prev != (elm)) \
-+ QUEUEDEBUG_ABORT("TAILQ_* back %p %s:%d", (elm), \
-+ __FILE__, __LINE__);
-+#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) \
-+ if ((elm)->field.tqe_next == NULL && \
-+ (head)->tqh_last != &(elm)->field.tqe_next) \
-+ QUEUEDEBUG_ABORT("TAILQ_PREREMOVE head %p elm %p %s:%d",\
-+ (head), (elm), __FILE__, __LINE__);
-+#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) \
-+ (elm)->field.tqe_next = (void *)1L; \
-+ (elm)->field.tqe_prev = (void *)1L;
-+#else
-+#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field)
-+#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field)
-+#define QUEUEDEBUG_TAILQ_OP(elm, field)
-+#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field)
-+#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field)
-+#endif
-+
-+#define TAILQ_INIT(head) do { \
-+ (head)->tqh_first = TAILQ_END(head); \
-+ (head)->tqh_last = &(head)->tqh_first; \
-+} while (/*CONSTCOND*/0)
-+
-+#define TAILQ_INSERT_HEAD(head, elm, field) do { \
-+ QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field) \
-+ if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\
-+ (head)->tqh_first->field.tqe_prev = \
-+ &(elm)->field.tqe_next; \
-+ else \
-+ (head)->tqh_last = &(elm)->field.tqe_next; \
-+ (head)->tqh_first = (elm); \
-+ (elm)->field.tqe_prev = &(head)->tqh_first; \
-+} while (/*CONSTCOND*/0)
-+
-+#define TAILQ_INSERT_TAIL(head, elm, field) do { \
-+ QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field) \
-+ (elm)->field.tqe_next = TAILQ_END(head); \
-+ (elm)->field.tqe_prev = (head)->tqh_last; \
-+ *(head)->tqh_last = (elm); \
-+ (head)->tqh_last = &(elm)->field.tqe_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
-+ QUEUEDEBUG_TAILQ_OP((listelm), field) \
-+ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \
-+ TAILQ_END(head)) \
-+ (elm)->field.tqe_next->field.tqe_prev = \
-+ &(elm)->field.tqe_next; \
-+ else \
-+ (head)->tqh_last = &(elm)->field.tqe_next; \
-+ (listelm)->field.tqe_next = (elm); \
-+ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
-+ QUEUEDEBUG_TAILQ_OP((listelm), field) \
-+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
-+ (elm)->field.tqe_next = (listelm); \
-+ *(listelm)->field.tqe_prev = (elm); \
-+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define TAILQ_REMOVE(head, elm, field) do { \
-+ QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field) \
-+ QUEUEDEBUG_TAILQ_OP((elm), field) \
-+ if (((elm)->field.tqe_next) != TAILQ_END(head)) \
-+ (elm)->field.tqe_next->field.tqe_prev = \
-+ (elm)->field.tqe_prev; \
-+ else \
-+ (head)->tqh_last = (elm)->field.tqe_prev; \
-+ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
-+ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \
-+} while (/*CONSTCOND*/0)
-+
-+#define TAILQ_REPLACE(head, elm, elm2, field) do { \
-+ if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != \
-+ TAILQ_END(head)) \
-+ (elm2)->field.tqe_next->field.tqe_prev = \
-+ &(elm2)->field.tqe_next; \
-+ else \
-+ (head)->tqh_last = &(elm2)->field.tqe_next; \
-+ (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
-+ *(elm2)->field.tqe_prev = (elm2); \
-+ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \
-+} while (/*CONSTCOND*/0)
-+
-+#define TAILQ_CONCAT(head1, head2, field) do { \
-+ if (!TAILQ_EMPTY(head2)) { \
-+ *(head1)->tqh_last = (head2)->tqh_first; \
-+ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
-+ (head1)->tqh_last = (head2)->tqh_last; \
-+ TAILQ_INIT((head2)); \
-+ } \
-+} while (/*CONSTCOND*/0)
-+
-+/*
-+ * Singly-linked Tail queue declarations.
-+ */
-+#define STAILQ_HEAD(name, type) \
-+struct name { \
-+ struct type *stqh_first; /* first element */ \
-+ struct type **stqh_last; /* addr of last next element */ \
-+}
-+
-+#define STAILQ_HEAD_INITIALIZER(head) \
-+ { NULL, &(head).stqh_first }
-+
-+#define STAILQ_ENTRY(type) \
-+struct { \
-+ struct type *stqe_next; /* next element */ \
-+}
-+
-+/*
-+ * Singly-linked Tail queue access methods.
-+ */
-+#define STAILQ_FIRST(head) ((head)->stqh_first)
-+#define STAILQ_END(head) NULL
-+#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
-+#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head))
-+
-+/*
-+ * Singly-linked Tail queue functions.
-+ */
-+#define STAILQ_INIT(head) do { \
-+ (head)->stqh_first = NULL; \
-+ (head)->stqh_last = &(head)->stqh_first; \
-+} while (/*CONSTCOND*/0)
-+
-+#define STAILQ_INSERT_HEAD(head, elm, field) do { \
-+ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
-+ (head)->stqh_last = &(elm)->field.stqe_next; \
-+ (head)->stqh_first = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define STAILQ_INSERT_TAIL(head, elm, field) do { \
-+ (elm)->field.stqe_next = NULL; \
-+ *(head)->stqh_last = (elm); \
-+ (head)->stqh_last = &(elm)->field.stqe_next; \
-+} while (/*CONSTCOND*/0)
-+
-+#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
-+ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
-+ (head)->stqh_last = &(elm)->field.stqe_next; \
-+ (listelm)->field.stqe_next = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define STAILQ_REMOVE_HEAD(head, field) do { \
-+ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
-+ (head)->stqh_last = &(head)->stqh_first; \
-+} while (/*CONSTCOND*/0)
-+
-+#define STAILQ_REMOVE(head, elm, type, field) do { \
-+ if ((head)->stqh_first == (elm)) { \
-+ STAILQ_REMOVE_HEAD((head), field); \
-+ } else { \
-+ struct type *curelm = (head)->stqh_first; \
-+ while (curelm->field.stqe_next != (elm)) \
-+ curelm = curelm->field.stqe_next; \
-+ if ((curelm->field.stqe_next = \
-+ curelm->field.stqe_next->field.stqe_next) == NULL) \
-+ (head)->stqh_last = &(curelm)->field.stqe_next; \
-+ } \
-+} while (/*CONSTCOND*/0)
-+
-+#define STAILQ_FOREACH(var, head, field) \
-+ for ((var) = ((head)->stqh_first); \
-+ (var); \
-+ (var) = ((var)->field.stqe_next))
-+
-+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = STAILQ_FIRST((head)); \
-+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
-+#define STAILQ_CONCAT(head1, head2) do { \
-+ if (!STAILQ_EMPTY((head2))) { \
-+ *(head1)->stqh_last = (head2)->stqh_first; \
-+ (head1)->stqh_last = (head2)->stqh_last; \
-+ STAILQ_INIT((head2)); \
-+ } \
-+} while (/*CONSTCOND*/0)
-+
-+#define STAILQ_LAST(head, type, field) \
-+ (STAILQ_EMPTY((head)) ? \
-+ NULL : \
-+ ((struct type *)(void *) \
-+ ((char *)((head)->stqh_last) - offsetof(struct type, field))))
-+
-+
-+#ifndef _KERNEL
-+/*
-+ * Circular queue definitions. Do not use. We still keep the macros
-+ * for compatibility but because of pointer aliasing issues their use
-+ * is discouraged!
-+ */
-+
-+/*
-+ * __launder_type(): We use this ugly hack to work around the the compiler
-+ * noticing that two types may not alias each other and elide tests in code.
-+ * We hit this in the CIRCLEQ macros when comparing 'struct name *' and
-+ * 'struct type *' (see CIRCLEQ_HEAD()). Modern compilers (such as GCC
-+ * 4.8) declare these comparisons as always false, causing the code to
-+ * not run as designed.
-+ *
-+ * This hack is only to be used for comparisons and thus can be fully const.
-+ * Do not use for assignment.
-+ *
-+ * If we ever choose to change the ABI of the CIRCLEQ macros, we could fix
-+ * this by changing the head/tail sentinal values, but see the note above
-+ * this one.
-+ */
-+static __inline const void * __launder_type(const void *);
-+static __inline const void *
-+__launder_type(const void *__x)
-+{
-+ __asm __volatile("" : "+r" (__x));
-+ return __x;
-+}
-+
-+#if defined(QUEUEDEBUG)
-+#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) \
-+ if ((head)->cqh_first != CIRCLEQ_ENDC(head) && \
-+ (head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head)) \
-+ QUEUEDEBUG_ABORT("CIRCLEQ head forw %p %s:%d", (head), \
-+ __FILE__, __LINE__); \
-+ if ((head)->cqh_last != CIRCLEQ_ENDC(head) && \
-+ (head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head)) \
-+ QUEUEDEBUG_ABORT("CIRCLEQ head back %p %s:%d", (head), \
-+ __FILE__, __LINE__);
-+#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) \
-+ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) { \
-+ if ((head)->cqh_last != (elm)) \
-+ QUEUEDEBUG_ABORT("CIRCLEQ elm last %p %s:%d", \
-+ (elm), __FILE__, __LINE__); \
-+ } else { \
-+ if ((elm)->field.cqe_next->field.cqe_prev != (elm)) \
-+ QUEUEDEBUG_ABORT("CIRCLEQ elm forw %p %s:%d", \
-+ (elm), __FILE__, __LINE__); \
-+ } \
-+ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) { \
-+ if ((head)->cqh_first != (elm)) \
-+ QUEUEDEBUG_ABORT("CIRCLEQ elm first %p %s:%d", \
-+ (elm), __FILE__, __LINE__); \
-+ } else { \
-+ if ((elm)->field.cqe_prev->field.cqe_next != (elm)) \
-+ QUEUEDEBUG_ABORT("CIRCLEQ elm prev %p %s:%d", \
-+ (elm), __FILE__, __LINE__); \
-+ }
-+#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) \
-+ (elm)->field.cqe_next = (void *)1L; \
-+ (elm)->field.cqe_prev = (void *)1L;
-+#else
-+#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field)
-+#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field)
-+#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field)
-+#endif
-+
-+#define CIRCLEQ_HEAD(name, type) \
-+struct name { \
-+ struct type *cqh_first; /* first element */ \
-+ struct type *cqh_last; /* last element */ \
-+}
-+
-+#define CIRCLEQ_HEAD_INITIALIZER(head) \
-+ { CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
-+
-+#define CIRCLEQ_ENTRY(type) \
-+struct { \
-+ struct type *cqe_next; /* next element */ \
-+ struct type *cqe_prev; /* previous element */ \
-+}
-+
-+/*
-+ * Circular queue functions.
-+ */
-+#define CIRCLEQ_INIT(head) do { \
-+ (head)->cqh_first = CIRCLEQ_END(head); \
-+ (head)->cqh_last = CIRCLEQ_END(head); \
-+} while (/*CONSTCOND*/0)
-+
-+#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
-+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
-+ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \
-+ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
-+ (elm)->field.cqe_prev = (listelm); \
-+ if ((listelm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
-+ (head)->cqh_last = (elm); \
-+ else \
-+ (listelm)->field.cqe_next->field.cqe_prev = (elm); \
-+ (listelm)->field.cqe_next = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
-+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
-+ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \
-+ (elm)->field.cqe_next = (listelm); \
-+ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
-+ if ((listelm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
-+ (head)->cqh_first = (elm); \
-+ else \
-+ (listelm)->field.cqe_prev->field.cqe_next = (elm); \
-+ (listelm)->field.cqe_prev = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
-+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
-+ (elm)->field.cqe_next = (head)->cqh_first; \
-+ (elm)->field.cqe_prev = CIRCLEQ_END(head); \
-+ if ((head)->cqh_last == CIRCLEQ_ENDC(head)) \
-+ (head)->cqh_last = (elm); \
-+ else \
-+ (head)->cqh_first->field.cqe_prev = (elm); \
-+ (head)->cqh_first = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
-+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
-+ (elm)->field.cqe_next = CIRCLEQ_END(head); \
-+ (elm)->field.cqe_prev = (head)->cqh_last; \
-+ if ((head)->cqh_first == CIRCLEQ_ENDC(head)) \
-+ (head)->cqh_first = (elm); \
-+ else \
-+ (head)->cqh_last->field.cqe_next = (elm); \
-+ (head)->cqh_last = (elm); \
-+} while (/*CONSTCOND*/0)
-+
-+#define CIRCLEQ_REMOVE(head, elm, field) do { \
-+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
-+ QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field) \
-+ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
-+ (head)->cqh_last = (elm)->field.cqe_prev; \
-+ else \
-+ (elm)->field.cqe_next->field.cqe_prev = \
-+ (elm)->field.cqe_prev; \
-+ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
-+ (head)->cqh_first = (elm)->field.cqe_next; \
-+ else \
-+ (elm)->field.cqe_prev->field.cqe_next = \
-+ (elm)->field.cqe_next; \
-+ QUEUEDEBUG_CIRCLEQ_POSTREMOVE((elm), field) \
-+} while (/*CONSTCOND*/0)
-+
-+#define CIRCLEQ_FOREACH(var, head, field) \
-+ for ((var) = ((head)->cqh_first); \
-+ (var) != CIRCLEQ_ENDC(head); \
-+ (var) = ((var)->field.cqe_next))
-+
-+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
-+ for ((var) = ((head)->cqh_last); \
-+ (var) != CIRCLEQ_ENDC(head); \
-+ (var) = ((var)->field.cqe_prev))
-+
-+/*
-+ * Circular queue access methods.
-+ */
-+#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
-+#define CIRCLEQ_LAST(head) ((head)->cqh_last)
-+/* For comparisons */
-+#define CIRCLEQ_ENDC(head) (__launder_type(head))
-+/* For assignments */
-+#define CIRCLEQ_END(head) ((void *)(head))
-+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
-+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
-+#define CIRCLEQ_EMPTY(head) \
-+ (CIRCLEQ_FIRST(head) == CIRCLEQ_ENDC(head))
-+
-+#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
-+ (((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
-+ ? ((head)->cqh_first) \
-+ : (elm->field.cqe_next))
-+#define CIRCLEQ_LOOP_PREV(head, elm, field) \
-+ (((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
-+ ? ((head)->cqh_last) \
-+ : (elm->field.cqe_prev))
-+#endif /* !_KERNEL */
-+
-+#endif /* !_SYS_QUEUE_H_ */
diff --git a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch
deleted file mode 100644
index 4a785d344a..0000000000
--- a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Fix a possible overflow (reported by _FORTIFY_SOURCE=2)
-
-Ported from Gentoo
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: libtirpc-0.2.1/src/getrpcport.c
-===================================================================
---- libtirpc-0.2.1.orig/src/getrpcport.c
-+++ libtirpc-0.2.1/src/getrpcport.c
-@@ -54,11 +54,11 @@ getrpcport(host, prognum, versnum, proto
-
- if ((hp = gethostbyname(host)) == NULL)
- return (0);
-+ if (hp->h_length != sizeof(addr.sin_addr.s_addr))
-+ return (0);
- memset(&addr, 0, sizeof(addr));
- addr.sin_family = AF_INET;
- addr.sin_port = 0;
-- if (hp->h_length > sizeof(addr))
-- hp->h_length = sizeof(addr);
- memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length);
- /* Inconsistent interfaces need casts! :-( */
- return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum,
diff --git a/meta/recipes-extended/libtirpc/libtirpc/musl.patch b/meta/recipes-extended/libtirpc/libtirpc/musl.patch
new file mode 100644
index 0000000000..21cd9f9588
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc/musl.patch
@@ -0,0 +1,30 @@
+Consider musl provided built-in defines
+
+Helps compile libtirpc with musl
+bits/endian.h is not supposed to be included directly
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/tirpc/rpc/types.h
++++ b/tirpc/rpc/types.h
+@@ -66,7 +66,7 @@ typedef int32_t rpc_inline_t;
+ #define mem_free(ptr, bsize) free(ptr)
+
+
+-#if defined __APPLE_CC__ || defined __FreeBSD__
++#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__)
+ # define __u_char_defined
+ # define __daddr_t_defined
+ #endif
+--- a/src/xdr_float.c
++++ b/src/xdr_float.c
+@@ -83,7 +83,7 @@ static struct sgl_limits {
+ };
+ #else
+
+-#include <bits/endian.h>
++#include <endian.h>
+ #define IEEEFP
+
+ #endif /* vax */
diff --git a/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch b/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch
deleted file mode 100644
index 512e93497d..0000000000
--- a/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-uclibc and musl does not provide des functionality. Lets disable it.
-
-Upstream-Status: Inappropriate [uclibc and musl specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur libtirpc-1.0.1-orig/src/Makefile.am libtirpc-1.0.1/src/Makefile.am
---- libtirpc-1.0.1-orig/src/Makefile.am 2015-10-30 17:15:14.000000000 +0200
-+++ libtirpc-1.0.1/src/Makefile.am 2015-12-21 15:56:17.094702429 +0200
-@@ -22,9 +22,8 @@
- pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
- rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
- rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
-- svc_auth_des.c \
- svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
-- auth_time.c auth_des.c authdes_prot.c debug.c
-+ debug.c
-
- ## XDR
- libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
-@@ -41,8 +40,8 @@
- libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
- endif
-
--libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
--libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
-+#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
-+#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
-
- CLEANFILES = cscope.* *~
- DISTCLEANFILES = Makefile.in
-diff -Naur libtirpc-1.0.1-orig/src/rpc_soc.c libtirpc-1.0.1/src/rpc_soc.c
---- libtirpc-1.0.1-orig/src/rpc_soc.c 2015-10-30 17:15:14.000000000 +0200
-+++ libtirpc-1.0.1/src/rpc_soc.c 2015-12-21 15:56:17.095702416 +0200
-@@ -61,7 +61,6 @@
- #include <string.h>
- #include <unistd.h>
- #include <fcntl.h>
--#include <rpcsvc/nis.h>
-
- #include "rpc_com.h"
-
-@@ -522,86 +521,6 @@
- }
-
- /*
-- * Create the client des authentication object. Obsoleted by
-- * authdes_seccreate().
-- */
--AUTH *
--authdes_create(servername, window, syncaddr, ckey)
-- char *servername; /* network name of server */
-- u_int window; /* time to live */
-- struct sockaddr *syncaddr; /* optional hostaddr to sync with */
-- des_block *ckey; /* optional conversation key to use */
--{
-- AUTH *nauth;
-- char hostname[NI_MAXHOST];
--
-- if (syncaddr) {
-- /*
-- * Change addr to hostname, because that is the way
-- * new interface takes it.
-- */
-- switch (syncaddr->sa_family) {
-- case AF_INET:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- case AF_INET6:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- default:
-- goto fallback;
-- }
-- nauth = authdes_seccreate(servername, window, hostname, ckey);
-- return (nauth);
-- }
--fallback:
-- return authdes_seccreate(servername, window, NULL, ckey);
--}
--
--/*
-- * Create the client des authentication object. Obsoleted by
-- * authdes_pk_seccreate().
-- */
--extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
-- const des_block *, nis_server *);
--
--AUTH *
--authdes_pk_create(servername, pkey, window, syncaddr, ckey)
-- char *servername; /* network name of server */
-- netobj *pkey; /* public key */
-- u_int window; /* time to live */
-- struct sockaddr *syncaddr; /* optional hostaddr to sync with */
-- des_block *ckey; /* optional conversation key to use */
--{
-- AUTH *nauth;
-- char hostname[NI_MAXHOST];
--
-- if (syncaddr) {
-- /*
-- * Change addr to hostname, because that is the way
-- * new interface takes it.
-- */
-- switch (syncaddr->sa_family) {
-- case AF_INET:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- default:
-- goto fallback;
-- }
-- nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
-- return (nauth);
-- }
--fallback:
-- return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
--}
--
--
--/*
- * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
- */
- CLIENT *
-diff -Naur libtirpc-1.0.1-orig/src/svc_auth.c libtirpc-1.0.1/src/svc_auth.c
---- libtirpc-1.0.1-orig/src/svc_auth.c 2015-10-30 17:15:14.000000000 +0200
-+++ libtirpc-1.0.1/src/svc_auth.c 2015-12-21 15:56:17.095702416 +0200
-@@ -114,9 +114,6 @@
- case AUTH_SHORT:
- dummy = _svcauth_short(rqst, msg);
- return (dummy);
-- case AUTH_DES:
-- dummy = _svcauth_des(rqst, msg);
-- return (dummy);
- #ifdef HAVE_RPCSEC_GSS
- case RPCSEC_GSS:
- dummy = _svcauth_gss(rqst, msg, no_dispatch);
diff --git a/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb b/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb
deleted file mode 100644
index e321d479ec..0000000000
--- a/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Transport-Independent RPC library"
-DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux"
-SECTION = "libs/network"
-HOMEPAGE = "http://sourceforge.net/projects/libtirpc/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
- file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
-
-PROVIDES = "virtual/librpc"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \
- ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
- file://libtirpc-0.2.1-fortify.patch \
- file://0001-Add-missing-rwlock_unlocks-in-xprt_register.patch \
- "
-
-SRC_URI_append_libc-uclibc = " file://remove-des-functionality.patch \
- "
-
-SRC_URI_append_libc-musl = " file://remove-des-functionality.patch \
- file://Use-netbsd-queue.h.patch \
- "
-
-SRC_URI[libtirpc.md5sum] = "36ce1c0ff80863bb0839d54aa0b94014"
-SRC_URI[libtirpc.sha256sum] = "5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e"
-SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
-SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-gssapi"
-
-do_configure_prepend () {
- cp -r ${S}/../tirpc ${S}
-}
-
-do_install_append() {
- chown root:root ${D}${sysconfdir}/netconfig
-}
diff --git a/meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb b/meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb
new file mode 100644
index 0000000000..a02e35d19a
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Transport-Independent RPC library"
+DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux"
+SECTION = "libs/network"
+HOMEPAGE = "http://sourceforge.net/projects/libtirpc/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
+ file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
+
+PROVIDES = "virtual/librpc"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
+ file://musl.patch \
+ "
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
+SRC_URI[md5sum] = "f5d2a623e9dfbd818d2f3f3a4a878e3a"
+SRC_URI[sha256sum] = "2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-gssapi"
+
+do_install_append() {
+ chown root:root ${D}${sysconfdir}/netconfig
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch b/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
deleted file mode 100644
index 79756b9a07..0000000000
--- a/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From d0537cb7f2dc5877700ad78dfd191515379d4edc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 02:22:51 +0000
-Subject: [PATCH 1/2] Check for issetugid()
-
-If secure version of getenv is not there then we can use
-issetugid() as aid to call getenv()
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 1 +
- lib/config.c | 12 +++++++++++-
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1ded1a2..ee19e1f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -125,6 +125,7 @@ AC_TYPE_OFF_T
- AC_TYPE_SIZE_T
-
- AC_CHECK_FUNCS([__secure_getenv secure_getenv])
-+AC_CHECK_FUNCS([issetugid])
-
- # Modify CFLAGS after all tests are run (some of them could fail because
- # of the -Werror).
-diff --git a/lib/config.c b/lib/config.c
-index 29e7120..30f9daf 100644
---- a/lib/config.c
-+++ b/lib/config.c
-@@ -44,8 +44,10 @@
- # define safe_getenv(string) secure_getenv(string)
- #elif defined(HAVE___SECURE_GETENV)
- # define safe_getenv(string) __secure_getenv(string)
-+#elif defined(HAVE_ISSETUGID)
-+# define safe_getenv(string) safe_getenv_issetugid(string)
- #else
--# error Neither secure_getenv not __secure_getenv are available
-+# error None of secure_getenv, __secure_getenv, or issetugid is available
- #endif
-
- struct config_config {
-@@ -59,6 +61,14 @@ struct config_key {
- GList *values;
- };
-
-+static const char*
-+safe_getenv_issetugid(const char* name)
-+{
-+ if (issetugid ())
-+ return 0;
-+ return getenv (name);
-+}
-+
- /* Compare two section names */
- static int
- compare_section_names(gconstpointer a, gconstpointer b)
---
-2.7.0
-
diff --git a/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch b/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch
deleted file mode 100644
index 7c47df22e4..0000000000
--- a/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From a4857911ece5ebfcdef42aee4c070eb216f39597 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
-Date: Fri, 13 May 2016 11:40:13 -0500
-Subject: [PATCH] modules/files.c: parse_field fix string formating in
- g_warnings
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[YOCTO #9547]
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-
-Upstream-Status: Pending
----
- modules/files.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/files.c b/modules/files.c
-index 4ef0a57..35eafc9 100644
---- a/modules/files.c
-+++ b/modules/files.c
-@@ -534,7 +534,7 @@ parse_field(const struct format_specifier *format, GValue *value,
- string, &err);
- if (ret == FALSE) {
- g_assert(err != NULL);
-- g_warning(lu_strerror(err));
-+ g_warning(lu_strerror(err), NULL);
- lu_error_free(&err);
- }
- return ret;
---
-2.1.4
-
diff --git a/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch b/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
deleted file mode 100644
index 4bc0219f19..0000000000
--- a/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 4b2f81f307ffeac12956e5c16e894e5ebb937ea5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 02:26:00 +0000
-Subject: [PATCH 2/2] remove unused execinfo.h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- lib/error.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/lib/error.c b/lib/error.c
-index a5ec30a..443e601 100644
---- a/lib/error.c
-+++ b/lib/error.c
-@@ -18,7 +18,6 @@
- #include <config.h>
- #include <sys/types.h>
- #include <errno.h>
--#include <execinfo.h>
- #include <libintl.h>
- #include <stdarg.h>
- #include <stdlib.h>
---
-2.7.0
-
diff --git a/meta/recipes-extended/libuser/libuser_0.62.bb b/meta/recipes-extended/libuser/libuser_0.62.bb
deleted file mode 100644
index 3d0b516aba..0000000000
--- a/meta/recipes-extended/libuser/libuser_0.62.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "user and group account administration library"
-DESCRIPTION = "The libuser library implements a standardized interface for manipulating and administering user \
-and group accounts"
-HOMEPAGE = "https://fedorahosted.org/libuser/"
-BUGTRACKER = "https://fedorahosted.org/libuser/newticket"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
- file://lib/user.h;endline=19;md5=76b301f63c39fa992062395efbdc9558 \
- file://samples/testuser.c;endline=19;md5=3b87fa660fa3f4a6bb31d624afe30ba1"
-
-SECTION = "base"
-
-SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
- file://0001-Check-for-issetugid.patch \
- file://0002-remove-unused-execinfo.h.patch \
- file://0001-modules-files.c-parse_field-fix-string-formating-in-.patch \
- "
-
-SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2"
-SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b"
-
-DEPENDS = "popt libpam glib-2.0 docbook-utils-native linuxdoc-tools-native python3"
-
-inherit autotools gettext python3native python3-dir pkgconfig gtk-doc
-
-EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
-
-PACKAGES += "${PN}-python "
-
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
-
diff --git a/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch b/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
index b8c7f37514..f17bdce2c0 100644
--- a/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
+++ b/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
@@ -1,4 +1,4 @@
-From e7a8c925b9316a72bdc8f32789ffe56fda5c4788 Mon Sep 17 00:00:00 2001
+From 22afc5d9aaa215c3c87ba21c77d47da44ab3b113 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 26 Aug 2016 18:20:32 +0300
Subject: [PATCH] Use pkg-config for pcre dependency instead of -config script.
@@ -7,31 +7,36 @@ RP 2014/5/22
Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- configure.ac | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
+ configure.ac | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 1d172a1..a9236da 100644
+index 5383cec..c29a902 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -380,11 +380,12 @@ if test "$WITH_PCRE" != "no"; then
- PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
- CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
- else
-- AC_PATH_PROG(PCRECONFIG, pcre-config)
-- if test x"$PCRECONFIG" != x; then
-- PCRE_LIB=`$PCRECONFIG --libs`
-- CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
-- fi
-+ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
+@@ -651,10 +651,18 @@ AC_ARG_WITH([pcre],
+ )
+ AC_MSG_RESULT([$WITH_PCRE])
+
+-if test "$WITH_PCRE" != no; then
+- if test "$WITH_PCRE" != yes; then
+- PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
+- CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
++if test "$WITH_PCRE" != "no"; then
++ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
+ PCRE_LIB=${PCREPKG_LIBS}
+ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
-+ ], [
++ ], [
+ AC_MSG_ERROR([pcre pkgconfig not found, install the pcre-devel package or build with --without-pcre])
-+ ])
- fi
-
- if test x"$PCRE_LIB" != x; then
++ ])
++
++ if test x"$PCRE_LIB" != x; then
++ AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
++ AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
++ AC_SUBST(PCRE_LIB)
+ else
+ AC_PATH_PROG([PCRECONFIG], [pcre-config])
+ if test -n "$PCRECONFIG"; then
--
-2.9.3
+2.15.0
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
index bf89a60b7d..82fbaa523b 100644
--- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
@@ -4,7 +4,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/lighttpd
NAME=lighttpd
DESC="Lighttpd Web Server"
-OPTS="-f /etc/lighttpd.conf"
+OPTS="-f /etc/lighttpd/lighttpd.conf"
case "$1" in
start)
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service
deleted file mode 100644
index 66a907aa17..0000000000
--- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Lightning Fast Webserver With Light System Requirements
-After=network.target
-
-[Service]
-ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf
-ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf
-ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.41.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.41.bb
deleted file mode 100644
index 1a3f323428..0000000000
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.41.bb
+++ /dev/null
@@ -1,79 +0,0 @@
-SUMMARY = "Lightweight high-performance web server"
-HOMEPAGE = "http://www.lighttpd.net/"
-BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
-
-SECTION = "net"
-DEPENDS = "zlib libpcre"
-RDEPENDS_${PN} += " \
- lighttpd-module-access \
- lighttpd-module-accesslog \
- lighttpd-module-indexfile \
- lighttpd-module-dirlisting \
- lighttpd-module-staticfile \
-"
-
-SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
- file://index.html.lighttpd \
- file://lighttpd.conf \
- file://lighttpd \
- file://lighttpd.service \
- file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
- "
-
-SRC_URI[md5sum] = "1df2e4dbc965cfe6f99f008ac3db4d8d"
-SRC_URI[sha256sum] = "4bcc383ef6d6dc7b284f68882d71a178e2986c83c4e85eeb3c8f3b882e346b6c"
-
-PACKAGECONFIG ??= "openssl \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-"
-PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-EXTRA_OECONF = " \
- --without-bzip2 \
- --without-ldap \
- --without-lua \
- --without-memcached \
- --with-pcre \
- --without-webdav-props \
- --without-webdav-locks \
- --disable-static \
-"
-
-inherit autotools pkgconfig update-rc.d gettext systemd
-
-INITSCRIPT_NAME = "lighttpd"
-INITSCRIPT_PARAMS = "defaults 70"
-
-SYSTEMD_SERVICE_${PN} = "lighttpd.service"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
- install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
- install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
-
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BASE_BINDIR@,${base_bindir},g' \
- ${D}${systemd_unitdir}/system/lighttpd.service
- #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
- ln -sf ${localstatedir}/log ${D}/www/logs
- ln -sf ${localstatedir}/tmp ${D}/www/var
-}
-
-FILES_${PN} += "${sysconfdir} /www"
-
-CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
-
-PACKAGES_DYNAMIC += "^lighttpd-module-.*"
-
-python populate_packages_prepend () {
- lighttpd_libdir = d.expand('${libdir}')
- do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
-}
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.54.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.54.bb
new file mode 100644
index 0000000000..20ce698729
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.54.bb
@@ -0,0 +1,83 @@
+SUMMARY = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/"
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
+
+SECTION = "net"
+RDEPENDS_${PN} = "lighttpd-module-dirlisting \
+ lighttpd-module-indexfile \
+ lighttpd-module-staticfile"
+RRECOMMENDS_${PN} = "lighttpd-module-access \
+ lighttpd-module-accesslog"
+
+SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
+ file://index.html.lighttpd \
+ file://lighttpd.conf \
+ file://lighttpd \
+ file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
+ "
+
+SRC_URI[md5sum] = "7abc776243c811e9872f73ab38b7f8b5"
+SRC_URI[sha256sum] = "cf14cce2254a96d8fcb6d3181e1a3c29a8f832531c3e86ff6f2524ecda9a8721"
+
+PACKAGECONFIG ??= "openssl pcre zlib \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
+PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
+PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
+PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
+PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
+PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
+PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
+PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
+PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
+PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
+PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua"
+
+EXTRA_OECONF += "--enable-lfs --without-fam"
+
+inherit autotools pkgconfig update-rc.d gettext systemd
+
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
+
+SYSTEMD_SERVICE_${PN} = "lighttpd.service"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
+ install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+ install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd
+ install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ ${D}${systemd_unitdir}/system/lighttpd.service
+ #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
+ ln -sf ${localstatedir}/log ${D}/www/logs
+ ln -sf ${localstatedir}/tmp ${D}/www/var
+}
+
+FILES_${PN} += "${sysconfdir} /www"
+
+CONFFILES_${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
+
+PACKAGES_DYNAMIC += "^lighttpd-module-.*"
+
+python populate_packages_prepend () {
+ lighttpd_libdir = d.expand('${libdir}')
+ do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}
diff --git a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
index 2e931a2876..79805b5148 100644
--- a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
+++ b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
@@ -1,4 +1,4 @@
-From 68f29ab490cf987aa34b5f4caf1784b58a021308 Mon Sep 17 00:00:00 2001
+From c637948ebab5aff5641700c5cf613321ca0a6e6b Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Tue, 17 Feb 2015 21:08:07 -0800
Subject: [PATCH] Act as the "mv" command when rotate log
@@ -10,14 +10,14 @@ Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- logrotate.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++----------
+ logrotate.c | 71 ++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 59 insertions(+), 12 deletions(-)
diff --git a/logrotate.c b/logrotate.c
-index d3deb6a..cf8bf2c 100644
+index 54dac90..bf3ec23 100644
--- a/logrotate.c
+++ b/logrotate.c
-@@ -1157,6 +1157,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force)
+@@ -1360,6 +1360,53 @@ static int findNeedRotating(struct logInfo *log, int logNum, int force)
return 0;
}
@@ -68,80 +68,83 @@ index d3deb6a..cf8bf2c 100644
+ return 1;
+}
+
- int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
- struct logNames *rotNames)
- {
-@@ -1523,15 +1570,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
- }
+ /* find the rotated file with the highest index */
+ static int findLastRotated(const struct logNames *rotNames,
+ const char *fileext, const char *compext)
+@@ -1800,15 +1847,15 @@ static int prerotateSingleLog(struct logInfo *log, int logNum,
+ }
- message(MESS_DEBUG,
-- "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n",
-+ "moving %s to %s (rotatecount %d, logstart %d, i %d), \n",
- oldName, newName, rotateCount, logStart, i);
+ message(MESS_DEBUG,
+- "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n",
++ "moving %s to %s (rotatecount %d, logstart %d, i %d), \n",
+ oldName, newName, rotateCount, logStart, i);
-- if (!debug && rename(oldName, newName)) {
-+ if (!debug && mvFile(oldName, newName, log, prev_acl)) {
- if (errno == ENOENT) {
- message(MESS_DEBUG, "old log %s does not exist\n",
- oldName);
- } else {
-- message(MESS_ERROR, "error renaming %s to %s: %s\n",
-+ message(MESS_ERROR, "error moving %s to %s: %s\n",
- oldName, newName, strerror(errno));
- hasErrors = 1;
- }
-@@ -1669,21 +1716,21 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
- return 1;
- }
+- if (!debug && rename(oldName, newName)) {
++ if (!debug && mvFile(oldName, newName, log, prev_acl)) {
+ if (errno == ENOENT) {
+ message(MESS_DEBUG, "old log %s does not exist\n",
+ oldName);
+ } else {
+- message(MESS_ERROR, "error renaming %s to %s: %s\n",
++ message(MESS_ERROR, "error moving %s to %s: %s\n",
+ oldName, newName, strerror(errno));
+ hasErrors = 1;
+ }
+@@ -1891,21 +1938,21 @@ static int rotateSingleLog(struct logInfo *log, int logNum,
+ return 1;
+ }
-- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
-+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
- tmpFilename);
-- if (!debug && !hasErrors && rename(log->files[logNum], tmpFilename)) {
-- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
-+ if (!debug && !hasErrors && mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
-+ message(MESS_ERROR, "failed to move %s to %s: %s\n",
- log->files[logNum], tmpFilename,
- strerror(errno));
- hasErrors = 1;
- }
- }
- else {
-- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
-+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
- rotNames->finalName);
- if (!debug && !hasErrors &&
-- rename(log->files[logNum], rotNames->finalName)) {
-- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
-+ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
-+ message(MESS_ERROR, "failed to move %s to %s: %s\n",
- log->files[logNum], tmpFilename,
- strerror(errno));
- hasErrors = 1;
-@@ -2063,7 +2110,7 @@ int rotateLogSet(struct logInfo *log, int force)
+- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
++ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
+ tmpFilename);
+- if (!debug && !hasErrors && rename(log->files[logNum], tmpFilename)) {
+- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
++ if (!debug && !hasErrors && mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
++ message(MESS_ERROR, "failed to move %s to %s: %s\n",
+ log->files[logNum], tmpFilename,
+ strerror(errno));
+ hasErrors = 1;
+ }
+ }
+ else {
+- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
++ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
+ rotNames->finalName);
+ if (!debug && !hasErrors &&
+- rename(log->files[logNum], rotNames->finalName)) {
+- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
++ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
++ message(MESS_ERROR, "failed to move %s to %s: %s\n",
+ log->files[logNum], rotNames->finalName,
+ strerror(errno));
+ hasErrors = 1;
+@@ -2297,7 +2344,7 @@ static int rotateLogSet(struct logInfo *log, int force)
return hasErrors;
}
--static int writeState(char *stateFilename)
+-static int writeState(const char *stateFilename)
+static int writeState(struct logInfo *log, char *stateFilename)
{
- struct logState *p;
- FILE *f;
-@@ -2227,7 +2274,7 @@ static int writeState(char *stateFilename)
- fclose(f);
+ struct logState *p;
+ FILE *f;
+@@ -2460,7 +2507,7 @@ static int writeState(const char *stateFilename)
+ fclose(f);
- if (error == 0) {
-- if (rename(tmpFilename, stateFilename)) {
-+ if (mvFile(tmpFilename, stateFilename, log, prev_acl)) {
- unlink(tmpFilename);
- error = 1;
- message(MESS_ERROR, "error renaming temp state file %s\n",
-@@ -2525,7 +2572,7 @@ int main(int argc, const char **argv)
- rc |= rotateLogSet(log, force);
+ if (error == 0) {
+- if (rename(tmpFilename, stateFilename)) {
++ if (mvFile(tmpFilename, stateFilename, log, prev_acl)) {
+ unlink(tmpFilename);
+ error = 1;
+ message(MESS_ERROR, "error renaming temp state file %s\n",
+@@ -2805,7 +2852,7 @@ int main(int argc, const char **argv)
+ rc |= rotateLogSet(log, force);
- if (!debug)
-- rc |= writeState(stateFile);
-+ rc |= writeState(log, stateFile);
+ if (!debug)
+- rc |= writeState(stateFile);
++ rc |= writeState(log, stateFile);
- return (rc != 0);
+ return (rc != 0);
}
+--
+2.18.1
+
diff --git a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
index 793d702598..96ff098a3f 100644
--- a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
+++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
@@ -1,4 +1,7 @@
-Disable the check for different filesystems
+From e47796c8e8270a3d14f0b06af8a9e916c2225514 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 8 Jan 2019 06:27:06 +0000
+Subject: [PATCH] Disable the check for different filesystems
The logrotate supports rotate log across different filesystems now, so
disable the check for different filesystems.
@@ -7,26 +10,29 @@ Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- config.c | 9 ---------
+ config.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/config.c b/config.c
-index dbbf563..64e66f6 100644
+index 633b843..99a4a3b 100644
--- a/config.c
+++ b/config.c
-@@ -1493,15 +1493,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
- goto error;
- }
- }
+@@ -1765,15 +1765,6 @@ duperror:
+ goto error;
+ }
+ }
-
-- if (sb.st_dev != sb2.st_dev
-- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY | LOG_FLAG_TMPFILENAME))) {
-- message(MESS_ERROR,
-- "%s:%d olddir %s and log file %s "
-- "are on different devices\n", configFile,
-- lineNum, newlog->oldDir, newlog->files[i]);
-- goto error;
-- }
- }
- }
+- if (sb.st_dev != sb2.st_dev
+- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY | LOG_FLAG_TMPFILENAME))) {
+- message(MESS_ERROR,
+- "%s:%d olddir %s and log file %s "
+- "are on different devices\n", configFile,
+- lineNum, newlog->oldDir, newlog->files[i]);
+- goto error;
+- }
+ }
+ }
+--
+2.18.1
+
diff --git a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch
index 50d037d5a1..725567e0c9 100644
--- a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch
+++ b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch
@@ -1,4 +1,4 @@
-From e0b0fe30e9c49234994a20a86aacfaf80e690087 Mon Sep 17 00:00:00 2001
+From bf22e8805df69344f6f20cea390e829a22fa741b Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Tue, 17 Feb 2015 21:14:37 -0800
Subject: [PATCH] Update the manual
@@ -9,14 +9,14 @@ Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- logrotate.8 | 10 ++++------
+ logrotate.8.in | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
-diff --git a/logrotate.8 b/logrotate.8
-index e4e5f48..84407d0 100644
---- a/logrotate.8
-+++ b/logrotate.8
-@@ -405,12 +405,10 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
+diff --git a/logrotate.8.in b/logrotate.8.in
+index 951e406..581bf48 100644
+--- a/logrotate.8.in
++++ b/logrotate.8.in
+@@ -445,12 +445,10 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
.TP
\fBolddir \fIdirectory\fR
@@ -34,5 +34,5 @@ index e4e5f48..84407d0 100644
.TP
--
-1.7.9.5
+1.8.3.1
diff --git a/meta/recipes-extended/logrotate/logrotate_3.15.1.bb b/meta/recipes-extended/logrotate/logrotate_3.15.1.bb
new file mode 100644
index 0000000000..7c7d51b39e
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate_3.15.1.bb
@@ -0,0 +1,99 @@
+SUMMARY = "Rotates, compresses, removes and mails system log files"
+SECTION = "console/utils"
+HOMEPAGE = "https://github.com/logrotate/logrotate/issues"
+LICENSE = "GPLv2"
+
+# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox?
+
+DEPENDS="coreutils popt"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+# When updating logrotate to latest upstream, SRC_URI should point to
+# a proper release tarball from https://github.com/logrotate/logrotate/releases
+# and we have to take the snapshot for now because there is no such
+# tarball available for 3.9.1.
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
+UPSTREAM_CHECK_REGEX = "logrotate-(?P<pver>\d+(\.\d+)+).tar"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+ file://act-as-mv-when-rotate.patch \
+ file://update-the-manual.patch \
+ file://disable-check-different-filesystems.patch \
+ "
+
+SRC_URI[md5sum] = "afe109afea749c306ff489203fde6beb"
+SRC_URI[sha256sum] = "491fec9e89f1372f02a0ab66579aa2e9d63cac5178dfa672c204c88e693a908b"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
+
+PACKAGECONFIG[acl] = ",,acl"
+PACKAGECONFIG[selinux] = ",,libselinux"
+
+CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
+ ${sysconfdir}/logrotate.conf \
+ ${sysconfdir}/logrotate.d/btmp \
+ ${sysconfdir}/logrotate.d/wtmp"
+
+# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
+# optimization variables, so use it rather than EXTRA_CFLAGS.
+EXTRA_OEMAKE = "\
+ LFS= \
+ OS_NAME='${OS_NAME}' \
+ 'CC=${CC}' \
+ 'RPM_OPT_FLAGS=${CFLAGS}' \
+ 'EXTRA_LDFLAGS=${LDFLAGS}' \
+ ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
+"
+
+# OS_NAME in the makefile defaults to `uname -s`. The behavior for
+# freebsd/netbsd is questionable, so leave it as Linux, which only sets
+# INSTALL=install and BASEDIR=/usr.
+OS_NAME = "Linux"
+
+inherit autotools systemd
+
+SYSTEMD_SERVICE_${PN} = "\
+ ${BPN}.service \
+ ${BPN}.timer \
+"
+
+LOGROTATE_OPTIONS ?= ""
+
+LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily"
+LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h"
+LOGROTATE_SYSTEMD_TIMER_PERSISTENT ?= "true"
+
+do_install(){
+ oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
+ mkdir -p ${D}${sysconfdir}/logrotate.d
+ mkdir -p ${D}${localstatedir}/lib
+ install -p -m 644 ${S}/examples/logrotate.conf ${D}${sysconfdir}/logrotate.conf
+ install -p -m 644 ${S}/examples/btmp ${D}${sysconfdir}/logrotate.d/btmp
+ install -p -m 644 ${S}/examples/wtmp ${D}${sysconfdir}/logrotate.d/wtmp
+ touch ${D}${localstatedir}/lib/logrotate.status
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service
+ install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer
+ [ -z "${LOGROTATE_OPTIONS}" ] ||
+ sed -ri \
+ -e 's|(ExecStart=.*/logrotate.*)$|\1 ${LOGROTATE_OPTIONS}|g' \
+ ${D}${systemd_system_unitdir}/logrotate.service
+ sed -ri \
+ -e 's|(OnCalendar=).*$|\1${LOGROTATE_SYSTEMD_TIMER_BASIS}|g' \
+ -e 's|(AccuracySec=).*$|\1${LOGROTATE_SYSTEMD_TIMER_ACCURACY}|g' \
+ -e 's|(Persistent=).*$|\1${LOGROTATE_SYSTEMD_TIMER_PERSISTENT}|g' \
+ ${D}${systemd_system_unitdir}/logrotate.timer
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ mkdir -p ${D}${sysconfdir}/cron.daily
+ install -p -m 0755 ${S}/examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
+ fi
+}
diff --git a/meta/recipes-extended/logrotate/logrotate_3.9.1.bb b/meta/recipes-extended/logrotate/logrotate_3.9.1.bb
deleted file mode 100644
index 5f1a601aeb..0000000000
--- a/meta/recipes-extended/logrotate/logrotate_3.9.1.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Rotates, compresses, removes and mails system log files"
-SECTION = "console/utils"
-HOMEPAGE = "https://fedorahosted.org/logrotate/"
-LICENSE = "GPLv2"
-
-# TODO: logrotate 3.8.8 adds autotools/automake support, update recipe to use it.
-# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox?
-
-DEPENDS="coreutils popt"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
-
-SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \
- file://act-as-mv-when-rotate.patch \
- file://update-the-manual.patch \
- file://disable-check-different-filesystems.patch \
- "
-
-SRC_URI[md5sum] = "4492b145b6d542e4a2f41e77fa199ab0"
-SRC_URI[sha256sum] = "022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545"
-
-PACKAGECONFIG ?= "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
-"
-
-PACKAGECONFIG[acl] = ",,acl"
-PACKAGECONFIG[selinux] = ",,libselinux"
-
-CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
- ${sysconfdir}/logrotate.conf"
-
-# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
-# optimization variables, so use it rather than EXTRA_CFLAGS.
-EXTRA_OEMAKE = "\
- LFS= \
- OS_NAME='${OS_NAME}' \
- 'CC=${CC}' \
- 'RPM_OPT_FLAGS=${CFLAGS}' \
- 'EXTRA_LDFLAGS=${LDFLAGS}' \
- ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
- ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
-"
-
-# OS_NAME in the makefile defaults to `uname -s`. The behavior for
-# freebsd/netbsd is questionable, so leave it as Linux, which only sets
-# INSTALL=install and BASEDIR=/usr.
-OS_NAME = "Linux"
-
-do_compile_prepend() {
- # Make sure the recompile is OK
- rm -f ${B}/.depend
-}
-
-do_install(){
- oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
- mkdir -p ${D}${sysconfdir}/logrotate.d
- mkdir -p ${D}${sysconfdir}/cron.daily
- mkdir -p ${D}${localstatedir}/lib
- install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
- install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
- touch ${D}${localstatedir}/lib/logrotate.status
-}
diff --git a/meta/recipes-extended/lsb/lsb-release/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch b/meta/recipes-extended/lsb/lsb-release/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch
new file mode 100644
index 0000000000..0175752067
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb-release/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch
@@ -0,0 +1,38 @@
+From cba901945c5a6da9586550498f8e3787c57c3098 Mon Sep 17 00:00:00 2001
+From: Athanasios Oikonomou <athoik@gmail.com>
+Date: Fri, 17 Feb 2017 21:04:04 +0200
+Subject: [PATCH] fix lsb_release to work with busybox head and find
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Athanasios Oikonomou <athoik@gmail.com>
+
+diff --git a/lsb_release b/lsb_release
+index e7d6024..233b8c1 100755
+--- a/lsb_release
++++ b/lsb_release
+@@ -209,7 +209,7 @@ EASE ($DISTRIB_CODENAME)"
+ || [ -n "$(echo $DISTRIB_DESCRIPTION | \
+ sed -e "s/.*$DESCSTR_DELI.*//")" ]
+ then
+- TMP_DISTRIB_DESC=$(head -1 $FILENAME 2>/dev/null)
++ TMP_DISTRIB_DESC=$(head -n 1 $FILENAME 2>/dev/null)
+ [ -z "$DISTRIB_DESCRIPTION" ] \
+ && DISTRIB_DESCRIPTION=$TMP_DISTRIB_DESC
+ else
+@@ -249,10 +249,10 @@ GetDistribInfo() {
+ then
+ CHECKFIRST=$(find $INFO_ROOT/ -maxdepth 1 \
+ -name \*$INFO_DISTRIB_SUFFIX \
+- -and ! -name $INFO_LSB_FILE \
+- -and -type f \
++ -type f \
+ 2>/dev/null \
+- | head -1 ) # keep one of the files found (if many)
++ | grep -v $INFO_LSB_FILE \
++ | head -n 1 ) # keep one of the files found (if many)
+ fi
+ InitDistribInfo $CHECKFIRST
+ fi
+--
+2.1.4
+
diff --git a/meta/recipes-extended/lsb/lsb-release_1.4.bb b/meta/recipes-extended/lsb/lsb-release_1.4.bb
new file mode 100644
index 0000000000..52e30267f5
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb-release_1.4.bb
@@ -0,0 +1,36 @@
+SUMMARY = "lsb_release support for OpenEmbedded"
+SECTION = "console/utils"
+HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
+LICENSE = "GPLv2+"
+
+# lsb_release needs getopt
+RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt}"
+
+LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
+ file://0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch \
+ "
+
+SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
+SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/"
+UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
+
+CLEANBROKEN = "1"
+
+do_install() {
+ oe_runmake install prefix=${D}${root_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D}
+
+ mkdir -p ${D}${sysconfdir}/lsb-release.d
+
+ echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
+ echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
+ if [ -n "${DISTRO_CODENAME}" ]; then
+ echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
+ fi
+ echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
+}
+
+FILES_${PN} += "${base_libdir}"
diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions
deleted file mode 100755
index 7c1dce24cf..0000000000
--- a/meta/recipes-extended/lsb/lsb/init-functions
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-
-# LSB initscript functions, as defined in the LSB Spec 1.1.0
-#
-# Lawrence Lim <llim@core.com> - Tue, 26 June 2007
-# Updated to the latest LSB 3.1 spec
-# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt
-
-start_daemon () {
- /etc/core-lsb/lsb_start_daemon "$@"
-}
-
-killproc () {
- /etc/core-lsb/lsb_killproc "$@"
-}
-
-pidofproc () {
- /etc/core-lsb/lsb_pidofproc "$@"
-}
-
-log_success_msg () {
- /etc/core-lsb/lsb_log_message success "$@"
-}
-
-log_failure_msg () {
- /etc/core-lsb/lsb_log_message failure "$@"
-}
-
-log_warning_msg () {
- /etc/core-lsb/lsb_log_message warning "$@"
-}
-
-# int log_begin_message (char *message)
-log_begin_msg () {
- if [ -z "$1" ]; then
- return 1
- fi
- echo " * $@"
-}
-
-
-log_end_msg () {
- /etc/core-lsb/lsb_log_message end "$@"
-}
diff --git a/meta/recipes-extended/lsb/lsb/lsb_killproc b/meta/recipes-extended/lsb/lsb/lsb_killproc
deleted file mode 100755
index 866c1a9c63..0000000000
--- a/meta/recipes-extended/lsb/lsb/lsb_killproc
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-. /etc/init.d/functions
-
-LSB=LSB-1.1 killproc $*
-exit $?
diff --git a/meta/recipes-extended/lsb/lsb/lsb_log_message b/meta/recipes-extended/lsb/lsb/lsb_log_message
deleted file mode 100755
index 10343b0819..0000000000
--- a/meta/recipes-extended/lsb/lsb/lsb_log_message
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-. /etc/init.d/functions
-
-ACTION=$1
-shift
-
-case "$ACTION" in
- success)
- echo -n $*
- success "$*"
- echo
- ;;
- failure)
- echo -n $*
- failure "$*"
- echo
- ;;
- warning)
- echo -n $*
- warning "$*"
- echo
- ;;
- *)
- ;;
-esac
-exit 0
diff --git a/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
deleted file mode 100755
index 6d1fd0f249..0000000000
--- a/meta/recipes-extended/lsb/lsb/lsb_pidofproc
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-. /etc/init.d/functions
-
-pidofproc $*
-exit $?
diff --git a/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
deleted file mode 100755
index de62c2344d..0000000000
--- a/meta/recipes-extended/lsb/lsb/lsb_start_daemon
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-. /etc/init.d/functions
-
-nice=
-force=
-pidfile=
-user=
-check=
-RETVAL=
-while [ "$1" != "${1##[-+]}" ]; do
- case $1 in
- -f)
- force="--force"
- shift
- ;;
- -n)
- nice=$2
- shift 2
- ;;
- -p)
- pidfile="--pidfile $2"
- shift 2
- ;;
- -u)
- user="--user $2"
- shift 2
- ;;
- -c)
- check="--check $2"
- shift 2
- ;;
- *)
- echo "Unknown Option $1"
- echo "Options are:"
- echo "-f"
- echo "-p {pidfile}"
- echo "-n [+/-nicelevel]"
- echo "-u {user}"
- echo "-c {base}"
- exit 1;;
- esac
-done
-LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $*
-exit $?
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
deleted file mode 100644
index ece0eab0ff..0000000000
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ /dev/null
@@ -1,132 +0,0 @@
-SUMMARY = "LSB support for OpenEmbedded"
-SECTION = "console/utils"
-HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
-LICENSE = "GPLv2+"
-PR = "r2"
-
-LSB_CORE = "lsb-core-${TARGET_ARCH}"
-LSB_CORE_x86 = "lsb-core-ia32"
-LSB_CORE_x86-64 = "lsb-core-amd64"
-RPROVIDES_${PN} += "${LSB_CORE}"
-
-# lsb_release needs getopt, lsbinitscripts
-RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt} lsbinitscripts"
-
-LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
- file://init-functions \
- file://lsb_killproc \
- file://lsb_log_message \
- file://lsb_pidofproc \
- file://lsb_start_daemon \
- "
-
-SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
-SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/"
-UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/lsb-release-1.4"
-
-CLEANBROKEN = "1"
-
-do_install(){
- oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D}
-
- # this 2 dirs are needed by package lsb-dist-checker
- mkdir -p ${D}${sysconfdir}/opt
- mkdir -p ${D}${localstatedir}/opt
-
- mkdir -p ${D}${base_bindir}
- mkdir -p ${D}/${baselib}
- mkdir -p ${D}${sysconfdir}/lsb-release.d
- printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
-
- if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
- printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
- else
- printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
- fi
- echo "\"" >> ${D}${sysconfdir}/lsb-release
- echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
- echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
- if [ -n "${DISTRO_CODENAME}" ]; then
- echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
- fi
- echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
-
- if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
- mkdir -p ${D}${sysconfdir}/lsb-release.d
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
- elif [ "${TARGET_ARCH}" = "x86_64" ];then
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
- fi
- if [ "${TARGET_ARCH}" = "powerpc" ];then
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
- elif [ "${TARGET_ARCH}" = "powerpc64" ];then
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
- fi
-}
-
-do_install_append(){
- install -d ${D}${sysconfdir}/core-lsb
- for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
- do
- install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
- done
-
- install -d ${D}/lib/lsb
- install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb
-
- # creat links for LSB test
- install -d ${D}/usr/lib/lsb
- ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd
- ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd
-
- if [ "${TARGET_ARCH}" = "x86_64" ];then
- cd ${D}
- if [ "${baselib}" != "lib64" ]; then
- ln -sf ${baselib} lib64
- fi
- cd ${D}/${baselib}
- ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
- ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
- fi
- if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
- cd ${D}/${baselib}
- ln -sf ld-linux.so.2 ld-lsb.so.2
- ln -sf ld-linux.so.2 ld-lsb.so.3
- fi
-
- if [ "${TARGET_ARCH}" = "powerpc64" ];then
- cd ${D}
- if [ "${baselib}" != "lib64" ]; then
- ln -sf ${baselib} lib64
- fi
- cd ${D}/${baselib}
- ln -sf ld64.so.1 ld-lsb-ppc64.so.2
- ln -sf ld64.so.1 ld-lsb-ppc64.so.3
- fi
- if [ "${TARGET_ARCH}" = "powerpc" ];then
- cd ${D}/${baselib}
- ln -sf ld.so.1 ld-lsb-ppc32.so.2
- ln -sf ld.so.1 ld-lsb-ppc32.so.3
- fi
-}
-FILES_${PN} += "/lib64 \
- ${base_libdir} \
- /usr/lib/lsb \
- ${base_libdir}/lsb/* \
- /lib/lsb/* \
- "
diff --git a/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch b/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
deleted file mode 100644
index 17c90029c3..0000000000
--- a/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Pending
-
-Subject: functions: avoid exit 1 which causes init scripts to fail
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- rc.d/init.d/functions | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
-index 6850046..11223f7 100644
---- a/rc.d/init.d/functions
-+++ b/rc.d/init.d/functions
-@@ -597,6 +597,6 @@ if [ "$_use_systemctl" = "1" ]; then
- fi
- fi
-
--strstr "$(cat /proc/cmdline)" "rc.debug" && set -x
-+strstr "$(cat /proc/cmdline)" "rc.debug" && set -x || true
- return 0
-
---
-2.1.0
-
diff --git a/meta/recipes-extended/lsb/lsbinitscripts/functions.patch b/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
deleted file mode 100644
index a756d047ef..0000000000
--- a/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: initscripts-9.43/rc.d/init.d/functions
-===================================================================
---- initscripts-9.43.orig/rc.d/init.d/functions
-+++ initscripts-9.43/rc.d/init.d/functions
-@@ -13,6 +13,7 @@ umask 022
- PATH="/sbin:/usr/sbin:/bin:/usr/bin"
- export PATH
-
-+
- if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \
- ( /bin/mountpoint -q /cgroup/systemd || /bin/mountpoint -q /sys/fs/cgroup/systemd ) ; then
- case "$0" in
-@@ -54,7 +55,7 @@ systemctl_redirect () {
- [ -z "${COLUMNS:-}" ] && COLUMNS=80
-
- if [ -z "${CONSOLETYPE:-}" ]; then
-- if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then
-+ if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then
- CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
- else
- CONSOLETYPE="serial"
diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.68.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.68.bb
deleted file mode 100644
index 0c08fffcef..0000000000
--- a/meta/recipes-extended/lsb/lsbinitscripts_9.68.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "SysV init scripts which are only used in an LSB image"
-SECTION = "base"
-LICENSE = "GPLv2"
-DEPENDS = "popt glib-2.0"
-
-RDEPENDS_${PN} += "util-linux"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
-
-S="${WORKDIR}/initscripts-${PV}"
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}.tar.bz2/6a51a5af38e01445f53989ed0727c3e1/initscripts-${PV}.tar.bz2 \
- file://functions.patch \
- file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \
- "
-
-SRC_URI[md5sum] = "6a51a5af38e01445f53989ed0727c3e1"
-SRC_URI[sha256sum] = "2a1c6e9dbaa37a676518f4803b501e107c058bb14ef7a8db24c52b77fbcba531"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "functions"
-ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
-
-# Since we are only taking the patched version of functions, no need to
-# configure or compile anything so do not execute these
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install(){
- install -d ${D}${sysconfdir}/init.d/
- install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
-}
diff --git a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
deleted file mode 100644
index c31a3eb462..0000000000
--- a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
+++ /dev/null
@@ -1,525 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2012 Wind River Systems, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-WORK_DIR="/opt/lsb-test"
-
-if [ `id -u` -ne 0 ]
-then
- cat << EOF
- In order to install and run LSB testsuite, you need administrator privileges.
- You are currently running this script as an unprivileged user.
-
-EOF
- exit 1
-fi
-
-ARCH=`uname -m`
-if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ] && [ ${ARCH} != "ppc64" ]
-then
- echo "Error: Unsupported architecture"
- exit 1
-fi
-
-which rpm
-if [ $? -ne 0 ]
-then
- echo "No rpm command found"
- exit 1
-fi
-
-RET=0
-
-cd ${WORK_DIR} || exit 1
-# Step 1: Download the LSB Packages
-echo ""
-echo "Download LSB packages..."
-echo ""
-
-if [ ! -e ./packages_list ]
-then
- echo "Error: Could not find packages list" >&2
- exit 1
-fi
-
-. ./packages_list
-
-PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb"
-
-BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary"
-RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime"
-RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime"
-APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
-APP_TESTFILES_DIR="${PACKAGES_DIR}/app-battery/tests"
-SNAPSHOTS_TESTFILES_DIR="${PACKAGES_DIR}/snapshots/appbat/tests"
-
-if [ ! -d ${PACKAGES_DIR} ]
-then
- mkdir -p ${PACKAGES_DIR}
-fi
-
-if [ ! -d ${BASE_PACKAGES_DIR} ]
-then
- mkdir -p ${BASE_PACKAGES_DIR}
-fi
-
-if [ ! -d ${RUNTIME_BASE_PACKAGES_DIR} ]
-then
- mkdir -p ${RUNTIME_BASE_PACKAGES_DIR}
-fi
-
-if [ ! -d ${RUNTIME_PACKAGES_DIR} ]
-then
- mkdir -p ${RUNTIME_PACKAGES_DIR}
-fi
-
-if [ ! -d ${APP_PACKAGES_DIR} ]
-then
- mkdir -p ${APP_PACKAGES_DIR}
-fi
-
-if [ ! -d ${APP_TESTFILES_DIR} ]
-then
- mkdir -p ${APP_TESTFILES_DIR}
-fi
-
-# Official download server list. You can replace them with your own server.
-SERVER_IPADDR="140.211.169.23"
-SERVER_NAME="ftp.linuxfoundation.org"
-
-if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then
- echo "${SERVER_IPADDR} ${SERVER_NAME} ${SERVER_NAME}" >> /etc/hosts
-fi
-
-#ping -c 5 ${SERVER_NAME}
-#if [ $? -ne 0 ]
-#then
-# echo "The server: ${SERVER_NAME} is unreachable"
-# exit 1
-#fi
-
-SERVER1="\
- http://${SERVER_NAME}/pub/lsb/base/released-all/binary"
-SERVER2="\
- http://${SERVER_NAME}/pub/lsb/test_suites/released-all/binary/runtime"
-SERVER3="\
- http://${SERVER_NAME}/pub/lsb/test_suites/${LSB_RELEASE}/binary/runtime"
-SERVER4="\
- http://${SERVER_NAME}/pub/lsb/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
-SERVER5="\
- http://${SERVER_NAME}/pub/lsb/app-battery/tests"
-
-# We using "curl" as a download tool, "wget" is an alternative.
-CURL=`which curl`
-WGET=`which wget`
-if [ ! -z ${CURL} ]
-then
- DOWNLOAD_CMD="${CURL} -R -L -f --retry 3 --retry-delay 4 --connect-timeout 180 --compressed -C - -o"
-elif [ ! -z ${WGET} ]
-then
- DOWNLOAD_CMD="${WGET} -c -t 5 -O"
-else
- echo "Can not find a download tool, please install curl or wget."
- exit 1
-fi
-
-cd ${BASE_PACKAGES_DIR}
-for pkg in ${BASE_PACKAGES_LIST}; do
- if [ ! -f ${pkg} ]
- then
- #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} > /dev/null 2>&1
- ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg}
- if [ $? -eq 0 ]
- then
- mv -f ${pkg}".#part" ${pkg}
- echo "Download ${pkg} successfully."
- else
- echo "Download ${pkg} failed."
- RET=1
- fi
- fi
-done
-
-cd ${RUNTIME_BASE_PACKAGES_DIR}
-for pkg in ${RUNTIME_BASE_PACKAGES_LIST}; do
- if [ ! -f ${pkg} ]
- then
- #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} > /dev/null 2>&1
- ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg}
- if [ $? -eq 0 ]
- then
- mv -f ${pkg}".#part" ${pkg}
- echo "Download ${pkg} successfully."
- else
- echo "Download ${pkg} failed."
- RET=1
- fi
- fi
-done
-
-cd ${RUNTIME_PACKAGES_DIR}
-for pkg in ${RUNTIME_PACKAGES_LIST}; do
- if [ ! -f ${pkg} ]
- then
- #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} > /dev/null 2>&1
- ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg}
- if [ $? -eq 0 ]
- then
- mv -f ${pkg}".#part" ${pkg}
- echo "Download ${pkg} successfully."
- else
- echo "Download ${pkg} failed."
- RET=1
- fi
- fi
-done
-
-cd ${APP_PACKAGES_DIR}
-for pkg in ${APP_PACKAGES_LIST}; do
- if [ ! -f ${pkg} ]
- then
- #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} > /dev/null 2>&1
- ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg}
- if [ $? -eq 0 ]
- then
- mv -f ${pkg}".#part" ${pkg}
- echo "Download ${pkg} successfully."
- else
- echo "Download ${pkg} failed."
- RET=1
- fi
- fi
-done
-
-cd ${APP_TESTFILES_DIR}
-for pkg in ${APP_TESTFILES_LIST}; do
- if [ ! -f ${pkg} ]
- then
- #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} > /dev/null 2>&1
- ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg}
- if [ $? -eq 0 ]
- then
- mv -f ${pkg}".#part" ${pkg}
- echo "Download ${pkg} successfully."
- else
- echo "Download ${pkg} failed."
- RET=1
- fi
- fi
-done
-
-if [ ${RET} -ne 0 ]
-then
- echo "Download some packages failed. Please download them again."
- exit 1
-fi
-
-# Step 2: Install the LSB Packages
-echo ""
-echo "Install LSB packages..."
-echo ""
-
-# Kill lighttpd
-ps aux | grep "lighttpd" | grep -v -q "grep"
-if [ $? -eq 0 ]
-then
- killall lighttpd >/dev/null 2>&1
-fi
-
-# Start avahi-daemon
-ps aux | grep "avahi-daemon" | grep -v -q "grep"
-if [ $? -ne 0 ]
-then
- /etc/init.d/avahi-daemon start >/dev/null 2>&1
-fi
-
-LSB_START_CMD="/opt/lsb/test/manager/bin/dist-checker-start.pl"
-LSB_STOP_CMD="/opt/lsb/test/manager/bin/dist-checker-stop.pl"
-
-PLATFORM_FILE="/etc/rpm/platform"
-
-RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs --nosignature -i"
-RPM_INSTALL_CMD_NOSCRIPTS="rpm --quiet --nodeps --replacepkgs --noscripts --nosignature -i"
-
-# If the lsb has been started, stop it first.
-if [ -x ${LSB_STOP_CMD} ]
-then
- ${LSB_STOP_CMD}
-fi
-
-if [ ! -d /etc/rpm ]
-then
- mkdir -p /etc/rpm
-fi
-
-if [ ! -f ${PLATFORM_FILE} ]
-then
- touch ${PLATFORM_FILE}
-fi
-
-if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then
- if [ ${ARCH} = i686 ];then
- echo "i486-suse" >> ${PLATFORM_FILE}
- echo "i486-noarch" >> ${PLATFORM_FILE}
- echo "i486-pc" >> ${PLATFORM_FILE}
- echo "noarch-suse" >> ${PLATFORM_FILE}
- elif [ ${ARCH} = x86_64 ]; then
- echo "i486-suse" >> ${PLATFORM_FILE}
- echo "i486-noarch" >> ${PLATFORM_FILE}
- echo "i486-pc" >> ${PLATFORM_FILE}
- echo "i486-.*-linux.*" >> ${PLATFORM_FILE}
- echo "noarch-suse" >> ${PLATFORM_FILE}
- echo "${ARCH}-suse" >> ${PLATFORM_FILE}
- echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
- echo "${ARCH}-pc" >> ${PLATFORM_FILE}
- else
- echo "${ARCH}-suse" >> ${PLATFORM_FILE}
- echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
- echo "${ARCH}-pc" >> ${PLATFORM_FILE}
- echo "noarch-suse" >> ${PLATFORM_FILE}
- fi
-fi
-
-if [ -d ${BASE_PACKAGES_DIR} ]
-then
- cd ${BASE_PACKAGES_DIR}
- for pkg in ${BASE_PACKAGES_LIST}
- do
- rpm --quiet -q ${pkg%\.*}
- if [ $? -ne 0 ]; then
- $RPM_INSTALL_CMD ${pkg}
- fi
- done
-fi
-
-if [ -d ${RUNTIME_BASE_PACKAGES_DIR} ]
-then
- cd ${RUNTIME_BASE_PACKAGES_DIR}
- for pkg in ${RUNTIME_BASE_PACKAGES_LIST}
- do
- rpm --quiet -q ${pkg%\.*}
- if [ $? -ne 0 ]; then
- $RPM_INSTALL_CMD ${pkg}
- fi
- done
-fi
-
-if [ -d ${RUNTIME_PACKAGES_DIR} ]
-then
- cd ${RUNTIME_PACKAGES_DIR}
- for pkg in ${RUNTIME_PACKAGES_LIST}
- do
- rpm --quiet -q ${pkg%\.*}
- if [ $? -ne 0 ]; then
- $RPM_INSTALL_CMD ${pkg}
- fi
- done
-fi
-
-if [ -d ${APP_PACKAGES_DIR} ]
-then
- cd ${APP_PACKAGES_DIR}
- for pkg in ${APP_PACKAGES_LIST}
- do
- echo "${pkg}" | grep -q "apache\|xpdf"
- if [ $? -eq 0 ]
- then
- rpm --quiet -q ${pkg%\.*}
- if [ $? -ne 0 ]; then
- $RPM_INSTALL_CMD_NOSCRIPTS ${pkg}
- fi
- else
- rpm --quiet -q ${pkg%\.*}
- if [ $? -ne 0 ]; then
- $RPM_INSTALL_CMD ${pkg}
- fi
- fi
- done
-fi
-
-if [ ! -d ${SNAPSHOTS_TESTFILES_DIR} ]
-then
- mkdir -p ${SNAPSHOTS_TESTFILES_DIR}
-fi
-
-if [ -d ${APP_TESTFILES_DIR} ]
-then
- cd ${APP_TESTFILES_DIR}
- for pkg in ${APP_TESTFILES_LIST}
- do
- cp -f ${pkg} ${SNAPSHOTS_TESTFILES_DIR}
- done
-fi
-
-cd ${WORK_DIR}
-
-# Step 3: Set environment
-echo ""
-echo "Set environment..."
-echo ""
-
-check ()
-{
- if [ $? -eq 0 ]
- then
- echo "PASS"
- else
- echo "FAIL"
- exit 1
- fi
-}
-
-echo ""
-echo "---------------------------------"
-echo "Create the Dirnames on target"
-
-if [ ! -d /etc/rpm/sysinfo ]
-then
- mkdir -p /etc/rpm/sysinfo
-fi
-
-cat > /etc/rpm/sysinfo/Dirnames << EOF
-/etc/opt/lsb
-/home/tet/LSB.tools
-/opt/lsb-tet3-lite/lib/ksh
-/opt/lsb-tet3-lite/lib/perl
-/opt/lsb-tet3-lite/lib/posix_sh
-/opt/lsb-tet3-lite/lib/tet3
-/opt/lsb-tet3-lite/lib/xpg3sh
-/opt/lsb/appbat/lib/python2.4/site-packages/qm
-/opt/lsb/appbat/lib/python2.4/site-packages/qm/external
-/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate
-/opt/lsb/appbat/lib/python2.4/site-packages/qm/test
-/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes
-/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web
-/opt/lsb/test/doc
-/opt/lsb/test/lib
-/opt/lsb/test/qm/diagnostics
-/opt/lsb/test/qm/doc
-/opt/lsb/test/qm/doc/test/html
-/opt/lsb/test/qm/doc/test/print
-/opt/lsb/test/qm/dtml
-/opt/lsb/test/qm/dtml/test
-/opt/lsb/test/qm/messages/test
-/opt/lsb/test/qm/tutorial/test/tdb
-/opt/lsb/test/qm/tutorial/test/tdb/QMTest
-/opt/lsb/test/qm/web
-/opt/lsb/test/qm/web/images
-/opt/lsb/test/qm/web/stylesheets
-/opt/lsb/test/qm/xml
-/opt/lsb/test/share
-/usr/share/doc/lsb-runtime-test
-/var/opt/lsb
-/opt/lsb/test/desktop
-/opt/lsb/test/desktop/fontconfig
-/opt/lsb/test/desktop/freetype
-/opt/lsb/test/desktop/gtkvts
-/opt/lsb/test/desktop/libpng
-/opt/lsb/test/desktop/xft
-/opt/lsb/test/desktop/xml
-/opt/lsb/test/desktop/xrender
-
-
-EOF
-
-if [ -f /etc/rpm/sysinfo/Dirnames ]
-then
- echo "Success to creat Dirnames file"
-else
- echo "Fail to creat Dirnames file"
-fi
-
-[ -x /sbin/ldconfig ] && {
-echo ""
-echo "---------------------------------"
-echo "Update cache"
-/sbin/ldconfig
-check;
-}
-
-# Check loop device
-if [ ! -b /dev/loop0 ]
-then
- insmod /lib/modules/`uname -r`/kernel/drivers/block/loop.ko
- if [ $? != 0 ];then
- echo "Insmod loop.ko failed."
- fi
-fi
-
-# Resolve localhost
-LOCALHOST=`hostname`
-if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then
- echo "127.0.0.1 $LOCALHOST" >> /etc/hosts
-fi
-
-# Workaround to add part of locales for LSB test
-localedef -i de_DE -f ISO-8859-1 de_DE
-localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15
-localedef -i de_DE -f UTF-8 de_DE.UTF-8
-localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
-localedef -i en_HK -f ISO-8859-1 en_HK
-localedef -i en_PH -f ISO-8859-1 en_PH
-localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
-localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1
-localedef -i en_US -f ISO-8859-1 en_US
-localedef -i en_US -f UTF-8 en_US.UTF-8
-localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1
-localedef -i es_MX -f ISO-8859-1 es_MX
-localedef -i fr_FR -f ISO-8859-1 fr_FR
-localedef -i it_IT -f ISO-8859-1 it_IT
-localedef -i ja_JP -f EUC-JP ja_JP.eucjp
-localedef -i se_NO -f UTF-8 se_NO.UTF-8
-localedef -i ta_IN -f UTF-8 ta_IN
-localedef -i es_ES -f ISO-8859-1 es_ES
-localedef -i fr_FR@euro -f ISO-8859-1 fr_FR@euro
-localedef -i is_IS -f UTF-8 is_IS.UTF-8
-localedef -i zh_TW -f BIG5 zh_TW.BIG5
-localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
-
-echo ""
-echo "Installation done!"
-echo ""
-
-# Step 4: Start LSB test
-if [ -x ${LSB_START_CMD} ]
-then
- ${LSB_START_CMD}
-fi
-
-echo "---------------------------------"
-echo "Run all the certification version of LSB Tests"
-echo "---------------------------------"
-
-LSB_DIST_CHECKER="/opt/lsb/test/manager/utils/dist-checker.pl"
-SESSION="${WORK_DIR}/session"
-if [ ! -e ${SESSION} ]
-then
- echo "Error: Could not find session file."
- echo "You must run LSB test from webbrower."
- exit 1
-fi
-
-if [ -x ${LSB_DIST_CHECKER} ]
-then
- ${LSB_DIST_CHECKER} -v2 -f ${SESSION}
- check
-fi
-
-echo ""
-echo "LSB test complete. Please check the log file in /var/opt/lsb/test/manager/results/"
-echo ""
-
diff --git a/meta/recipes-extended/lsb/lsbtest/packages_list b/meta/recipes-extended/lsb/lsbtest/packages_list
deleted file mode 100644
index 959f931504..0000000000
--- a/meta/recipes-extended/lsb/lsbtest/packages_list
+++ /dev/null
@@ -1,49 +0,0 @@
-LSB_RELEASE="released-5.0"
-LSB_ARCH="lsbarch"
-
-BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm"
-
-RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-5.0.0.1-1.targetarch.rpm \
- lsb-tet3-lite-3.7-27.lsb5.targetarch.rpm \
- lsb-tet3-lite-devel-3.7-27.lsb5.targetarch.rpm \
- lsb-xvfb-1.2.0-22.targetarch.rpm \
- "
-
-RUNTIME_PACKAGES_LIST="lsb-cmdchk-5.0.3-1.targetarch.rpm \
- lsb-libchk-5.0.3-1.targetarch.rpm \
- lsb-qm-2.2-1.lsb5.targetarch.rpm \
- lsb-task-dist-testkit-5.0.0-2.noarch.rpm \
- lsb-test-core-5.0.1-1.targetarch.rpm \
- lsb-test-cpp-t2c-5.0.0-1.targetarch.rpm \
- lsb-test-desktop-5.0.0-1.targetarch.rpm \
- lsb-test-desktop-t2c-5.0.0-1.targetarch.rpm \
- lsb-test-libstdcpp-4.1.0-22.lsb1.targetarch.rpm \
- lsb-test-olver-core-5.0.0-1.targetarch.rpm \
- lsb-test-perl-5.0.2-1.noarch.rpm \
- lsb-test-printing-5.0.1-1.targetarch.rpm \
- lsb-test-python-5.0.0-1.targetarch.rpm \
- lsb-test-qt4-azov-5.0.0-1.targetarch.rpm \
- lsb-test-xts5-5.1.5-47.lsb5.targetarch.rpm \
- lsb-test-alsa-t2c-5.1.91-4.targetarch.rpm \
- lsb-test-core-t2c-5.0.1-1.targetarch.rpm \
- lsb-test-xml2-azov-5.0.0-1.targetarch.rpm \
- "
-
-APP_PACKAGES_LIST="lsb-python-2.4.6-10.lsb5.targetarch.rpm \
- lsb-apache-2.2.19-5.lsb5.targetarch.rpm \
- lsb-tcl-8.5.9-21.lsb5.targetarch.rpm \
- lsb-expect-5.43.0-21.lsb5.targetarch.rpm \
- lsb-groff-1.20.1-9.lsb5.targetarch.rpm \
- lsb-raptor-1.4.21-4.lsb5.targetarch.rpm \
- lsb-xpdf-1.01-17.lsb5.targetarch.rpm \
- lsb-samba-3.5.9-5.lsb5.targetarch.rpm \
- lsb-rsync-3.0.8-3.lsb5.targetarch.rpm \
- "
-
-APP_TESTFILES_LIST="expect-tests.tar \
- tcl-tests.tar \
- raptor-tests.tar \
- test1.pdf \
- test2.pdf \
- "
-
diff --git a/meta/recipes-extended/lsb/lsbtest/session b/meta/recipes-extended/lsb/lsbtest/session
deleted file mode 100644
index 3abcca740b..0000000000
--- a/meta/recipes-extended/lsb/lsbtest/session
+++ /dev/null
@@ -1,185 +0,0 @@
-[GENERAL]
-VERBOSE_LEVEL: 1
-ARCHITECTURE: targetarch
-USE_INTERNET: 1
-STD_VERSION: LSB 4.1
-STD_PROFILE: no
-[cmdchk]
-RUN: 1
-VERSION: local|*
-
-[libchk]
-RUN: 1
-VERSION: local|*
-
-[alsa-t2c]
-RUN: 1
-VERSION: local|*
-
-[alsa-t2c|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/alsa-t2c
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/alsa-t2c/results
-
-[core]
-RUN: 1
-VERSION: local|*
-
-[core|local|*]
-AUTOREPLY_PROVIDES_BASH: n
-AUTOREPLY_TESTRUN_PATH: /home/tet/test_sets
-AUTOREPLY_PERSON: Automated
-AUTOREPLY_KERNEL_NAME: vmlinuz
-AUTOREPLY_INSTALL_LSBPAM_CONF: y
-AUTOREPLY_PROVIDES_C_SHELL: n
-AUTOREPLY_ORGANISATION: N/A
-AUTOREPLY_SET_PASS_MIN_DAYS: y
-AUTOREPLY_PROVIDES_SYSV_INIT:
-AUTOREPLY_ISNTALL_DEVS: y
-AUTOREPLY_SUPPORTS_FILE_CMD: y
-AUTOREPLY_TEST_SYSTEM: Distribution Checker
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core/tet/test_sets
-AUTOREPLY_SUPPORTS_NLS: n
-AUTOREPLY_SUPPORTS_PROCESS_ACCOUNTING: n
-AUTOREPLY_PATH_TO_RC.D:
-AUTOREPLY_ALLOWS_MAKEDEV: n
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core/tet/test_sets/results
-
-[core-t2c]
-RUN: 1
-VERSION: local|*
-
-[core-t2c|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core-t2c
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core-t2c/results
-
-[cpp-t2c]
-RUN: 1
-VERSION: local|*
-
-[cpp-t2c|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/cpp-t2c
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/cpp-t2c/results
-
-[desktop]
-RUN: 1
-VERSION: local|*
-
-[desktop|local|*]
-AUTOREPLY_DESKTOP_ENVIRONMENT: [default]
-AUTOREPLY_PERSON: Automated
-AUTOREPLY_X_CLIENT_HOSTNAME:
-AUTOREPLY_TEST_SYSTEM: Distribution Checker
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop
-AUTOREPLY_X11_FONT_PATH: [default]
-AUTOREPLY_SHOW_SUMMARY_REPORT:
-AUTOREPLY_ORGANISATION: N/A
-AUTOREPLY_XVFB_DISPLAY: [default]
-
-[desktop-t2c]
-RUN: 1
-VERSION: local|*
-
-[desktop-t2c|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop-t2c
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/desktop-t2c/results
-
-[libstdcpp]
-RUN: 1
-VERSION: local|*
-
-[libstdcpp|local|*]
-AUTOREPLY_TEST_SYSTEM: Distribution Checker
-AUTOREPLY_PERSON: Automated
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/libstdcpp_4.1.0
-AUTOREPLY_ORGANISATION: N/A
-AUTOREPLY_GNU_TRIPLET:
-
-[olver]
-RUN: 1
-VERSION: local|*
-
-[olver|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/olver-core
-AUTOREPLY_RESULTS_DIR: /var/opt/lsb/test/olver-core
-
-[perl]
-RUN: 1
-VERSION: local|*
-
-[perl|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/perl
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/perl/results
-
-[printing]
-RUN: 1
-VERSION: local|*
-
-[printing|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/printing
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/printing/results
-
-[python]
-RUN: 1
-VERSION: local|*
-
-[python|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results
-
-[qt4-azov]
-RUN: 1
-VERSION: local|*
-
-[qt4-azov|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov
-AUTOREPLY_X11_FONT_PATH: [default]
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results
-
-[xml2-azov]
-RUN: 1
-VERSION: local|*
-
-[xts5]
-RUN: 1
-VERSION: local|*
-
-[xts5|local|*]
-AUTOREPLY_XT_FONTPATH_GOOD: [default]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/xts5
-AUTOREPLY_XVFB_DISPLAY: [default]
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/xts5/xts5/results
-AUTOREPLY_XT_FONTPATH: [default]
-AUTOREPLY_X_CLIENT_HOSTNAME:
-
-[apache]
-RUN: 1
-VERSION: local|*
-
-[expect]
-RUN: 1
-VERSION: local|*
-
-[groff]
-RUN: 1
-VERSION: local|*
-
-[raptor]
-RUN: 1
-VERSION: local|*
-
-[rsync]
-RUN: 1
-VERSION: local|*
-
-[samba]
-RUN: 1
-VERSION: local|*
-
-[tcl]
-RUN: 1
-VERSION: local|*
-
-[xpdf]
-RUN: 1
-VERSION: local|*
-
diff --git a/meta/recipes-extended/lsb/lsbtest_1.0.bb b/meta/recipes-extended/lsb/lsbtest_1.0.bb
deleted file mode 100644
index ea12502dc8..0000000000
--- a/meta/recipes-extended/lsb/lsbtest_1.0.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Automates Linux Standard Base (LSB) tests"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-PR = "r3"
-
-LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0"
-
-SRC_URI = "file://LSB_Test.sh \
- file://packages_list \
- file://session \
- "
-RDEPENDS_${PN} = "rpm"
-
-S = "${WORKDIR}"
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${S}/LSB_Test.sh ${D}${bindir}
- install -d ${D}/opt/lsb-test
- install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
- install -m 0644 ${S}/session ${D}/opt/lsb-test/session
- if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
- sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list
- sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session
- fi
- if [ "${TARGET_ARCH}" = "x86_64" ];then
- sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list
- sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session
- fi
- if [ "${TARGET_ARCH}" = "powerpc" ];then
- sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
- sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
- fi
-
- # For a ppc64 target. the default userspace is 32b.
- # Therefore, only change the lsbarch and targetarch
- # in the package_list when MLIB=lib64 is being used.
- # Otherwise, by default, the ppc32 LSB packages
- # will be downloaded by LSB_Test.sh
- if [ "${TARGET_ARCH}" = "powerpc64" ];then
- if [ "${PN}" != "${BPN}" ];then
- sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list
- sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session
- fi
- fi
-}
-
-FILES_${PN} += "/opt/lsb-test/* \
- "
diff --git a/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch b/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch
new file mode 100644
index 0000000000..b7d2323dc9
--- /dev/null
+++ b/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch
@@ -0,0 +1,76 @@
+Remove host information from version.h
+
+make lsof not include host information
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Li Wang <li.wang@windriver.com>
+---
+ dialects/linux/Makefile | 50 +++++++++--------------------------------------
+ 1 file changed, 9 insertions(+), 41 deletions(-)
+
+diff --git a/dialects/linux/Makefile b/dialects/linux/Makefile
+index 2bea108..792142b 100644
+--- a/dialects/linux/Makefile
++++ b/dialects/linux/Makefile
+@@ -76,48 +76,16 @@ version.h: FRC
+ @echo Constructing version.h
+ @rm -f version.h
+ @echo '#define LSOF_BLDCMT "${LSOF_BLDCMT}"' > version.h;
+- @echo '#define LSOF_CC "${CC}"' >> version.h
+- @echo '#define LSOF_CCV "${CCV}"' >> version.h
+- @echo '#define LSOF_CCDATE "'`date`'"' >> version.h
+- @echo '#define LSOF_CCFLAGS "'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h
++ @echo '#define LSOF_CC ""' >> version.h
++ @echo '#define LSOF_CCV ""' >> version.h
++ @echo '#define LSOF_CCDATE ""' >> version.h
++ @echo '#define LSOF_CCFLAGS ""' >> version.h
+ @echo '#define LSOF_CINFO "${CINFO}"' >> version.h
+- @if [ "X${LSOF_HOST}" = "X" ]; then \
+- echo '#define LSOF_HOST "'`uname -n`'"' >> version.h; \
+- else \
+- if [ "${LSOF_HOST}" = "none" ]; then \
+- echo '#define LSOF_HOST ""' >> version.h; \
+- else \
+- echo '#define LSOF_HOST "${LSOF_HOST}"' >> version.h; \
+- fi \
+- fi
+- @echo '#define LSOF_LDFLAGS "${CFGL}"' >> version.h
+- @if [ "X${LSOF_LOGNAME}" = "X" ]; then \
+- echo '#define LSOF_LOGNAME "${LOGNAME}"' >> version.h; \
+- else \
+- if [ "${LSOF_LOGNAME}" = "none" ]; then \
+- echo '#define LSOF_LOGNAME ""' >> version.h; \
+- else \
+- echo '#define LSOF_LOGNAME "${LSOF_LOGNAME}"' >> version.h; \
+- fi; \
+- fi
+- @if [ "X${LSOF_SYSINFO}" = "X" ]; then \
+- echo '#define LSOF_SYSINFO "'`uname -a`'"' >> version.h; \
+- else \
+- if [ "${LSOF_SYSINFO}" = "none" ]; then \
+- echo '#define LSOF_SYSINFO ""' >> version.h; \
+- else \
+- echo '#define LSOF_SYSINFO "${LSOF_SYSINFO}"' >> version.h; \
+- fi \
+- fi
+- @if [ "X${LSOF_USER}" = "X" ]; then \
+- echo '#define LSOF_USER "${USER}"' >> version.h; \
+- else \
+- if [ "${LSOF_USER}" = "none" ]; then \
+- echo '#define LSOF_USER ""' >> version.h; \
+- else \
+- echo '#define LSOF_USER "${LSOF_USER}"' >> version.h; \
+- fi \
+- fi
++ @echo '#define LSOF_HOST ""' >> version.h;
++ @echo '#define LSOF_LDFLAGS ""' >> version.h
++ @echo '#define LSOF_LOGNAME ""' >> version.h;
++ @echo '#define LSOF_SYSINFO ""' >> version.h;
++ @echo '#define LSOF_USER ""' >> version.h;
+ @sed '/VN/s/.ds VN \(.*\)/#define LSOF_VERSION "\1"/' < version >> version.h
+
+ FRC:
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/lsof/lsof_4.89.bb b/meta/recipes-extended/lsof/lsof_4.89.bb
deleted file mode 100644
index b732cf0acd..0000000000
--- a/meta/recipes-extended/lsof/lsof_4.89.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "LiSt Open Files tool"
-DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
-Its name stands for LiSt Open Files, and it does just that."
-SECTION = "devel"
-LICENSE = "BSD"
-
-SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "1b9cd34f3fb86856a125abbf2be3a386"
-SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718"
-
-UPSTREAM_CHECK_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof"
-
-LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
-S = "${WORKDIR}/lsof_${PV}_src"
-
-LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
-
-python do_unpack () {
- # temporarily change S for unpack
- # of lsof_${PV}
- s = d.getVar('S', False)
- d.setVar('S', '${WORKDIR}/lsof_${PV}')
- bb.build.exec_func('base_do_unpack', d)
- # temporarily change SRC_URI for unpack
- # of lsof_${PV}_src
- src_uri = d.getVar('SRC_URI', False)
- d.setVar('SRC_URI', '${LOCALSRC}')
- d.setVar('S', s)
- bb.build.exec_func('base_do_unpack', d)
- d.setVar('SRC_URI', src_uri)
-}
-
-export LSOF_INCLUDE = "${STAGING_INCDIR}"
-
-do_configure () {
- export LSOF_AR="${AR} cr"
- export LSOF_RANLIB="${RANLIB}"
- if [ "x${GLIBCVERSION}" != "x" ];then
- LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
- LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
- export LINUX_CLIB
- fi
- yes | ./Configure linux
-}
-
-export I = "${STAGING_INCDIR}"
-export L = "${STAGING_INCDIR}"
-
-do_compile () {
- oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
-}
-
-do_install () {
- install -d ${D}${sbindir} ${D}${mandir}/man8
- install -m 4755 lsof ${D}${sbindir}/lsof
- install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
-}
diff --git a/meta/recipes-extended/lsof/lsof_4.91.bb b/meta/recipes-extended/lsof/lsof_4.91.bb
new file mode 100644
index 0000000000..b3adfd57af
--- /dev/null
+++ b/meta/recipes-extended/lsof/lsof_4.91.bb
@@ -0,0 +1,63 @@
+SUMMARY = "LiSt Open Files tool"
+DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
+Its name stands for LiSt Open Files, and it does just that."
+HOMEPAGE = "http://people.freebsd.org/~abe/"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
+
+# Upstream lsof releases are hosted on an ftp server which times out download
+# attempts from hosts for which it can not perform a DNS reverse-lookup (See:
+# https://people.freebsd.org/~abe/ ). http://www.mirrorservice.org seems to be
+# the most commonly used alternative.
+
+SRC_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2 \
+ file://lsof-remove-host-information.patch \
+ "
+
+SRC_URI[md5sum] = "148ed410cb52e08c2adc0c60f480f11f"
+SRC_URI[sha256sum] = "c9da946a525fbf82ff80090b6d1879c38df090556f3fe0e6d782cb44172450a3"
+
+LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
+
+S = "${WORKDIR}/lsof_${PV}_src"
+
+python do_unpack () {
+ if not bb.data.inherits_class('externalsrc', d) or not d.getVar('EXTERNALSRC'):
+ # temporarily change S for unpack of lsof_${PV}
+ s = d.getVar('S', False)
+ d.setVar('S', '${WORKDIR}/lsof_${PV}')
+ bb.build.exec_func('base_do_unpack', d)
+ # temporarily change SRC_URI for unpack of lsof_${PV}_src
+ src_uri = d.getVar('SRC_URI', False)
+ d.setVar('SRC_URI', '${LOCALSRC}')
+ d.setVar('S', s)
+ bb.build.exec_func('base_do_unpack', d)
+ d.setVar('SRC_URI', src_uri)
+}
+
+export LSOF_INCLUDE = "${STAGING_INCDIR}"
+
+do_configure () {
+ export LSOF_AR="${AR} cr"
+ export LSOF_RANLIB="${RANLIB}"
+ if [ "x${GLIBCVERSION}" != "x" ]; then
+ LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
+ LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
+ export LINUX_CLIB
+ fi
+ yes | ./Configure linux
+}
+
+export I = "${STAGING_INCDIR}"
+export L = "${STAGING_INCDIR}"
+
+do_compile () {
+ oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
+}
+
+do_install () {
+ install -d ${D}${sbindir} ${D}${mandir}/man8
+ install -m 0755 lsof ${D}${sbindir}/lsof
+ install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
+}
diff --git a/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch b/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch
new file mode 100644
index 0000000000..bfceadb190
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch
@@ -0,0 +1,72 @@
+From 404dfeb4faef213b0450f173b60cd7080edec349 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 26 Jul 2019 10:32:29 -0700
+Subject: [PATCH 1/2] Add configure time check for getdents/getdents64 APIs
+
+glibc 2.30 has added wrapper for getdents64 this will help in detecting
+right condition to use fallback
+
+Check for getdents API as well while here
+
+Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-July/012954.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 ++
+ testcases/kernel/syscalls/getdents/getdents.h | 8 ++++++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -65,6 +65,8 @@ AC_CHECK_FUNCS([ \
+ fallocate \
+ fchownat \
+ fstatat \
++ getdents \
++ getdents64 \
+ kcmp \
+ mkdirat \
+ mknodat \
+--- a/testcases/kernel/syscalls/getdents/getdents.h
++++ b/testcases/kernel/syscalls/getdents/getdents.h
+@@ -23,7 +23,7 @@
+ #include <stdint.h>
+ #include "test.h"
+ #include "lapi/syscalls.h"
+-
++#include "config.h"
+ /*
+ * See fs/compat.c struct compat_linux_dirent
+ */
+@@ -34,12 +34,17 @@ struct linux_dirent {
+ char d_name[];
+ };
+
++#if HAVE_GETDENTS
++#include <unistd.h>
++#else
+ static inline int
+ getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int size)
+ {
+ return ltp_syscall(__NR_getdents, fd, dirp, size);
+ }
+
++#endif /* HAVE_GETDENTS */
++
+ struct linux_dirent64 {
+ uint64_t d_ino;
+ int64_t d_off;
+@@ -48,10 +53,13 @@ struct linux_dirent64 {
+ char d_name[];
+ };
+
++#if HAVE_GETDENTS64
++#include <unistd.h>
++#else
+ static inline int
+ getdents64(unsigned int fd, struct linux_dirent64 *dirp64, unsigned int size)
+ {
+ return ltp_syscall(__NR_getdents64, fd, dirp64, size);
+ }
+-
++#endif /* HAVE_GETDENTS64 */
+ #endif /* GETDENTS_H */
diff --git a/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch b/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch
new file mode 100644
index 0000000000..b5c25c56a5
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch
@@ -0,0 +1,149 @@
+From ec282980e6eee96f5b74aba464141f86049263e6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 18:19:03 +0000
+Subject: [PATCH] build: Add option to select libc implementation
+
+There are more than glibc for C library implementation available on
+linux now a days, uclibc cloaked like glibc but musl e.g. is very
+different and does not implement all GNU extentions
+
+Disable tests specifically not building _yet_ on musl based systems
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 5 +++++
+ testcases/kernel/Makefile | 5 ++++-
+ testcases/kernel/sched/Makefile | 4 +++-
+ testcases/kernel/syscalls/Makefile | 5 +++++
+ testcases/network/nfsv4/acl/Makefile | 4 ++++
+ testcases/network/rpc/basic_tests/Makefile | 5 +++++
+ testcases/realtime/func/pi-tests/Makefile | 4 ++++
+ testcases/realtime/stress/pi-tests/Makefile | 5 +++++
+ 8 files changed, 35 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 768ca46..e9d679a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -41,6 +41,11 @@ vpath %.mk $(top_srcdir)/mk:$(top_srcdir)/mk/include
+ UCLINUX ?= 0
+ export UCLINUX
+
++# System C library implementation (glibc,uclibc,musl etc.)
++# default to glibc if not set
++LIBC ?= glibc
++export LIBC
++
+ # CLEAN_TARGETS: Targets which exist solely in clean.
+ # COMMON_TARGETS: Targets which exist in all, clean, and install.
+ # INSTALL_TARGETS: Targets which exist in clean and install (contains
+diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
+index 39d79c7..24a57d9 100644
+--- a/testcases/kernel/Makefile
++++ b/testcases/kernel/Makefile
+@@ -49,12 +49,15 @@ SUBDIRS += connectors \
+ logging \
+ mem \
+ numa \
+- pty \
+ sched \
+ security \
+ timers \
+ tracing \
+
++ifneq ($(LIBC),musl)
++SUBDIRS += pty
++endif
++
+ ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
+ SUBDIRS += power_management
+ endif
+diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
+index 6a57d79..74bb933 100644
+--- a/testcases/kernel/sched/Makefile
++++ b/testcases/kernel/sched/Makefile
+@@ -23,5 +23,7 @@
+ top_srcdir ?= ../../..
+
+ include $(top_srcdir)/include/mk/env_pre.mk
+-
++ifeq ($(LIBC),musl)
++ FILTER_OUT_DIRS += process_stress
++endif
+ include $(top_srcdir)/include/mk/generic_trunk_target.mk
+diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
+index 45a00cf..d1becd0 100644
+--- a/testcases/kernel/syscalls/Makefile
++++ b/testcases/kernel/syscalls/Makefile
+@@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1)
+ FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
+ mincore mprotect nftw profil remap_file_pages sbrk
+ endif
++ifeq ($(LIBC),musl)
++FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \
++ rt_sigsuspend setdomainname sethostname sigsuspend \
++ ustat
++endif
+
+ ifeq ($(UCLIBC),1)
+ FILTER_OUT_DIRS += profil
+diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
+index 8c55a6b..f7cda62 100644
+--- a/testcases/network/nfsv4/acl/Makefile
++++ b/testcases/network/nfsv4/acl/Makefile
+@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
+
+ LDLIBS += $(ACL_LIBS)
+
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS := acl1
++endif
++
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
+index 66e9d56..ea8eb8a 100644
+--- a/testcases/network/rpc/basic_tests/Makefile
++++ b/testcases/network/rpc/basic_tests/Makefile
+@@ -23,4 +23,9 @@
+ top_srcdir ?= ../../../..
+
+ include $(top_srcdir)/include/mk/env_pre.mk
++
++ifeq ($(LIBC),musl)
++FILTER_OUT_DIRS += rpc01
++endif
++
+ include $(top_srcdir)/include/mk/generic_trunk_target.mk
+diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
+index 68616a7..748754b 100644
+--- a/testcases/realtime/func/pi-tests/Makefile
++++ b/testcases/realtime/func/pi-tests/Makefile
+@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
+ include $(abs_srcdir)/../../config.mk
+
+ MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS := testpi-5 testpi-6 sbrk_mutex
++endif
++
+
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
+index 1881f75..266e0b8 100644
+--- a/testcases/realtime/stress/pi-tests/Makefile
++++ b/testcases/realtime/stress/pi-tests/Makefile
+@@ -24,4 +24,9 @@ top_srcdir ?= ../../../..
+
+ include $(top_srcdir)/include/mk/env_pre.mk
+ include $(abs_srcdir)/../../config.mk
++
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS := testpi-3
++endif
++
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch b/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
new file mode 100644
index 0000000000..cc40081300
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
@@ -0,0 +1,64 @@
+From e3a8502d0a4f8a44ddd02ca4b2efc097133fb9f7 Mon Sep 17 00:00:00 2001
+From: Mathias Fiedler <mathias.fiedler@aox-tech.de>
+Date: Fri, 23 Aug 2019 12:46:48 +0200
+Subject: [PATCH] cve-2017-17052: Avoid unsafe exits in threads
+
+According to manpage exit(3) calling exit is not thread-safe.
+And with glibc 2.28 (and probably also with glibc >=2.27) sometimes
+child processes created in fork_thread can get stuck on process exit in
+glibc's __run_exit_handlers trying to acquire some lock which was in
+locked state while the fork was created. This can happen when exit is
+called in mmap_thread concurrently to the fork.
+While the main process will still return with PASSED some of its
+children are left behind.
+
+Comparing the source code with the original program as described in the
+commit 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a of linux kernel >=4.13
+the exits in mmap_thread and fork_thread should not be necessary to
+trigger the original bug.
+
+Therefore those exit calls are removed. The mmap_thread and fork_thread
+should still exit when their corresponding main thread in do_test_fork
+calls exit_group. The remaining exit in do_test_fork will be called in
+the main thread without any concurrent thread in the same process.
+
+Signed-off-by: Mathias Fiedler <mathias.fiedler@aox-tech.de>
+Acked-by: Cyril Hrubis <chrubis@suse.cz>
+Acked-by: Jan Stancek <jstancek@redhat.com>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/9f0b452c1af4bcb54da35711eb3fa77334a350b4]
+
+CVE: CVE-2017-17052
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ testcases/cve/cve-2017-17052.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/testcases/cve/cve-2017-17052.c b/testcases/cve/cve-2017-17052.c
+index d7da7e919..18cd2a6d7 100644
+--- a/testcases/cve/cve-2017-17052.c
++++ b/testcases/cve/cve-2017-17052.c
+@@ -58,8 +58,6 @@ static void *mmap_thread(void *arg)
+ for (;;) {
+ SAFE_MMAP(NULL, 0x1000000, PROT_READ,
+ MAP_POPULATE|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+- if (*do_exit)
+- exit(0);
+ }
+
+ return arg;
+@@ -67,9 +65,6 @@ static void *mmap_thread(void *arg)
+
+ static void *fork_thread(void *arg)
+ {
+- if (*do_exit)
+- exit(0);
+-
+ usleep(rand() % 10000);
+ SAFE_FORK();
+
+--
+2.17.1
+
diff --git a/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch b/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch
new file mode 100644
index 0000000000..94f6f5a15a
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch
@@ -0,0 +1,81 @@
+From fbeda82f440a0098be42dd668cbc47212a86ab48 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 21 Aug 2019 16:27:24 +0800
+Subject: [PATCH] cve/meltdown.c: Fix kernel symbol finding
+
+meltdown case fails as below.
+safe_file_ops.c:219: BROK: Expected 3 conversions got 2 at meltdown.c:272
+
+find_kernel_symbol is defined to try twice with each of /proc/kallsyms and
+/boot/System.map-%s. Currently if the symbol is not found in /proc/kallsyms,
+when kernel option CONFIG_KALLSYMS_ALL is disabled, it would stop the case
+immediately due to SAFE_FILE_LINES_SCANF.
+
+This patch turns to use FILE_LINES_SCANF to give find_kernel_symbol second
+chance.
+
+[jstancek] Fix also condition introduced in 7709d2ae92ea, even if
+ /proc/kallsyms is disabled, we still want to try System.map.
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/c2049b5c874bc071f8185bffb5fd7dcb042d9ec8]
+
+Remove the hunk for upstream 7709d2ae92ea ("cve/meltdown.c: abort the test if kallsyms was not enabled")
+that has been covered by this patch.
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ testcases/cve/meltdown.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/cve/meltdown.c b/testcases/cve/meltdown.c
+index a53ea9b..22651a6 100644
+--- a/testcases/cve/meltdown.c
++++ b/testcases/cve/meltdown.c
+@@ -267,9 +267,15 @@ find_symbol_in_file(const char *filename, const char *symname)
+ int ret, read;
+ char fmt[strlen(symname) + 64];
+
++ tst_res(TINFO, "Looking for %s in %s", symname, filename);
++ if (access(filename, F_OK) == -1) {
++ tst_res(TINFO, "%s not available", filename);
++ return 0;
++ }
++
+ sprintf(fmt, "%%lx %%c %s%%c", symname);
+
+- ret = SAFE_FILE_LINES_SCANF(filename, fmt, &addr, &type, &read);
++ ret = FILE_LINES_SCANF(filename, fmt, &addr, &type, &read);
+ if (ret)
+ return 0;
+
+@@ -287,13 +293,11 @@ find_kernel_symbol(const char *name)
+ if (addr)
+ return addr;
+
+- tst_res(TINFO, "not found '%s' in /proc/kallsyms", name);
+ if (uname(&utsname) < 0)
+ tst_brk(TBROK | TERRNO, "uname");
+
+ sprintf(systemmap, "/boot/System.map-%s", utsname.release);
+
+- tst_res(TINFO, "looking in '%s'\n", systemmap);
+ addr = find_symbol_in_file(systemmap, name);
+ return addr;
+ }
+@@ -308,6 +312,9 @@ static void setup(void)
+ saved_cmdline_addr = find_kernel_symbol("saved_command_line");
+ tst_res(TINFO, "&saved_command_line == 0x%lx", saved_cmdline_addr);
+
++ if (!saved_cmdline_addr)
++ tst_brk(TCONF, "saved_command_line not found");
++
+ spec_fd = SAFE_OPEN("/proc/cmdline", O_RDONLY);
+
+ memset(target_array, 1, sizeof(target_array));
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch b/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch
deleted file mode 100644
index 585b7cbc6a..0000000000
--- a/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 14985fccf7428eaa0b45decc22bfd20fd780f621 Mon Sep 17 00:00:00 2001
-From: Chong Lu <Chong.Lu@windriver.com>
-Date: Tue, 11 Mar 2014 14:47:22 +0800
-Subject: [PATCH 01/32] ltp: Don't link against libfl
-
-We have already defined yywrap function in scan.l file. After this, we no longer need to
-link against libfl and so no longer get errors about undefined references to yylex.
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- pan/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pan/Makefile b/pan/Makefile
-index 4cc6466..a4b575b 100644
---- a/pan/Makefile
-+++ b/pan/Makefile
-@@ -31,7 +31,7 @@ CPPFLAGS += -Wno-error
-
- CPPFLAGS += -I$(abs_srcdir)
-
--LDLIBS += -lm $(LEXLIB)
-+LDLIBS += -lm
-
- LFLAGS += -l
-
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch b/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch
new file mode 100644
index 0000000000..1b433d3ad3
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch
@@ -0,0 +1,35 @@
+From fae8852a63d9fa6e56fb8b24eaf10560bd13757f Mon Sep 17 00:00:00 2001
+From: Yongxin Liu <yongxin.liu@windriver.com>
+Date: Tue, 12 Nov 2019 11:33:50 +0800
+Subject: [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification
+
+Fix: https://github.com/linux-test-project/ltp/issues/458
+
+Sometimes the swap device cannot show up in /dev/disk/by-uuid/
+or /dev/disk/by-lable/ due to the issue #458. When this issue
+happens, "blkid -c /dev/null" and "ls /dev/disk/by-uuid/" show
+different UUID of the device.
+
+Upstream-Status: Submitted [https://patchwork.ozlabs.org/patch/1193414]
+
+Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
+---
+ testcases/commands/mkswap/mkswap01.sh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/testcases/commands/mkswap/mkswap01.sh b/testcases/commands/mkswap/mkswap01.sh
+index 3a348c6e6..9437c4a4e 100755
+--- a/testcases/commands/mkswap/mkswap01.sh
++++ b/testcases/commands/mkswap/mkswap01.sh
+@@ -129,6 +129,8 @@ mkswap_test()
+ return
+ fi
+
++ udevadm trigger --name-match=$TST_DEVICE
++
+ if [ -n "$device" ]; then
+ mkswap_verify "$mkswap_op" "$op_arg" "$device" "$size" "$dev_file"
+ if [ $? -ne 0 ]; then
+--
+2.14.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch b/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch
new file mode 100644
index 0000000000..bed84712a1
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch
@@ -0,0 +1,57 @@
+From d656a447893dccc310c975a239f482278550c3e0 Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Tue, 21 May 2019 10:10:44 +0200
+Subject: [PATCH] overcommit_memory: update for "mm: fix false-positive
+ OVERCOMMIT_GUESS failures"
+
+commit 8c7829b04c52 ("mm: fix false-positive OVERCOMMIT_GUESS failures")
+changes logic of __vm_enough_memory(), simplifying it to:
+ When in GUESS mode, catch wild allocations by comparing their request
+ size to total amount of ram and swap in the system.
+
+Testcase currently allocates mem_total + swap_total, which doesn't trigger
+new condition. Make it more extreme, but assuming free_total / 2 will PASS,
+and 2*sum_total will FAIL.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Acked-by: Cyril Hrubis <chrubis@suse.cz>
+
+Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/d656a447893dccc310c975a239f482278550c3e0]
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ testcases/kernel/mem/tunable/overcommit_memory.c | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/testcases/kernel/mem/tunable/overcommit_memory.c b/testcases/kernel/mem/tunable/overcommit_memory.c
+index 555298f..345764d 100644
+--- a/testcases/kernel/mem/tunable/overcommit_memory.c
++++ b/testcases/kernel/mem/tunable/overcommit_memory.c
+@@ -36,11 +36,10 @@
+ *
+ * The program is designed to test the two tunables:
+ *
+- * When overcommit_memory = 0, allocatable memory can't overextends
+- * the amount of free memory. I choose the three cases:
++ * When overcommit_memory = 0, allocatable memory can't overextend
++ * the amount of total memory:
+ * a. less than free_total: free_total / 2, alloc should pass.
+- * b. greater than free_total: free_total * 2, alloc should fail.
+- * c. equal to sum_total: sum_tatal, alloc should fail
++ * b. greater than sum_total: sum_total * 2, alloc should fail.
+ *
+ * When overcommit_memory = 1, it can alloc enough much memory, I
+ * choose the three cases:
+@@ -164,9 +163,7 @@ static void overcommit_memory_test(void)
+
+ update_mem();
+ alloc_and_check(free_total / 2, EXPECT_PASS);
+- update_mem();
+- alloc_and_check(free_total * 2, EXPECT_FAIL);
+- alloc_and_check(sum_total, EXPECT_FAIL);
++ alloc_and_check(sum_total * 2, EXPECT_FAIL);
+
+ /* start to test overcommit_memory=1 */
+ set_sys_tune("overcommit_memory", 1, 1);
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch b/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch
new file mode 100644
index 0000000000..0e56c08255
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch
@@ -0,0 +1,46 @@
+From a5046625eaeed2d3fba456c3ba84c6c141c2ad7c Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Thu, 29 Aug 2019 21:09:46 +0800
+Subject: [PATCH] syscall/rt_sigtimedwait01: Fix wrong sigset length for MIPS
+
+rt_sigtimedwait01 fails as follow on MIPS arches
+rt_sigtimedwait01 1 TFAIL : .../sigwaitinfo01.c:58: test_empty_set
+(.../sigwaitinfo01.c: 148): Unexpected failure:
+TEST_ERRNO=EINVAL(22): Invalid argument
+
+As this case purposely bypasses glibc, it should align with the size of kernel
+definition of sigset_t which is different from other arches.
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/signal.h#n15
+
+This patch turns to use _NSIG which is always right for all arches.
+
+Upstream-Status: Backport [a5046625eaeed2d3fba456c3ba84c6c141c2ad7c]
+
+Suggested-by: Jan Stancek <jstancek@redhat.com>
+Acked-by: Jan Stancek <jstancek@redhat.com>
+Acked-by: Cyril Hrubis <chrubis@suse.cz>
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
+---
+ testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+index 5a32ce1..6a30c27 100644
+--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
++++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+@@ -128,9 +128,8 @@ static int my_sigtimedwait(const sigset_t * set, siginfo_t * info,
+ static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info,
+ struct timespec *timeout)
+ {
+-
+- /* The last argument is (number_of_signals)/(bits_per_byte), which are 64 and 8, resp. */
+- return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, 8);
++ /* _NSIG is always the right number of bits of signal map for all arches */
++ return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, _NSIG/8);
+ }
+ #endif
+
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch b/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch
new file mode 100644
index 0000000000..6ea26150fb
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch
@@ -0,0 +1,75 @@
+From e747d0456adc080a1d31fb653bda9dc491795c80 Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Sun, 16 Jun 2019 11:14:16 +0200
+Subject: [PATCH] syscalls/tgkill03: wait for defunct tid to get detached
+
+Case where defunct tid is used has been observed to sporadically fail:
+ tgkill03.c:96: FAIL: Defunct tid should have failed with ESRCH: SUCCESS
+
+glibc __pthread_timedjoin_ex() waits for CLONE_CHILD_CLEARTID to clear tid,
+and then resumes. Kernel clears it (glibc pd->tid) at:
+ do_exit
+ exit_mm
+ mm_release
+ put_user(0, tsk->clear_child_tid);
+
+but kernel tid is still valid, presumably until:
+ release_task
+ __exit_signal
+ __unhash_process
+ detach_pid
+
+To avoid race wait until /proc/<pid>/task/<tid> disappears.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Reviewed-by: Li Wang <liwang@redhat.com>
+Acked-by: Sumit Garg <sumit.garg@linaro.org>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/e747d0456adc080a1d31fb653bda9dc491795c80]
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ testcases/kernel/syscalls/tgkill/tgkill03.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/tgkill/tgkill03.c b/testcases/kernel/syscalls/tgkill/tgkill03.c
+index f5bbdc5..593a217 100644
+--- a/testcases/kernel/syscalls/tgkill/tgkill03.c
++++ b/testcases/kernel/syscalls/tgkill/tgkill03.c
+@@ -7,6 +7,7 @@
+
+ #include <pthread.h>
+ #include <pwd.h>
++#include <stdio.h>
+ #include <sys/types.h>
+
+ #include "tst_safe_pthread.h"
+@@ -42,6 +43,7 @@ static void setup(void)
+ {
+ sigset_t sigusr1;
+ pthread_t defunct_thread;
++ char defunct_tid_path[PATH_MAX];
+
+ sigemptyset(&sigusr1);
+ sigaddset(&sigusr1, SIGUSR1);
+@@ -55,8 +57,9 @@ static void setup(void)
+ TST_CHECKPOINT_WAIT(0);
+
+ SAFE_PTHREAD_CREATE(&defunct_thread, NULL, defunct_thread_func, NULL);
+-
+ SAFE_PTHREAD_JOIN(defunct_thread, NULL);
++ sprintf(defunct_tid_path, "/proc/%d/task/%d", getpid(), defunct_tid);
++ TST_RETRY_FN_EXP_BACKOFF(access(defunct_tid_path, R_OK), -1, 15);
+ }
+
+ static void cleanup(void)
+@@ -108,4 +111,5 @@ static struct tst_test test = {
+ .setup = setup,
+ .cleanup = cleanup,
+ .test = run,
++ .timeout = 20,
+ };
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch b/meta/recipes-extended/ltp/ltp/0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
deleted file mode 100644
index 04532be79e..0000000000
--- a/meta/recipes-extended/ltp/ltp/0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 672a56be14426eae44864673c6c2afca0ab89d46 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
-Date: Fri, 13 May 2016 11:11:28 -0500
-Subject: [PATCH] testcases/network/nfsv4/acl/acl1.c: Security fix on string
- printf
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes:
-
-acl1.c: In function 'test_acl_default':
-acl1.c:317:2: error: format not a string literal and no format arguments
-[-Werror=format-security]
- printf(cmd);
-
-[YOCTO #9548]
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-
-Upstream-Status: Pending
----
- testcases/network/nfsv4/acl/acl1.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
-index b8b67b4..7c7c506 100644
---- a/testcases/network/nfsv4/acl/acl1.c
-+++ b/testcases/network/nfsv4/acl/acl1.c
-@@ -314,7 +314,7 @@ void test_acl_default(char *dir, acl_t acl)
- char *cmd = malloc(256);
-
- strcpy(cmd, "chmod 7777 ");
-- printf(cmd);
-+ printf(cmd, NULL);
- strcat(cmd, dir);
- system(cmd);
- acl2 = acl_get_file(path, ACL_TYPE_ACCESS);
---
-2.1.4
-
diff --git a/meta/recipes-extended/ltp/ltp/0001-testcases-use-python3-everywhere-to-run-python-scrip.patch b/meta/recipes-extended/ltp/ltp/0001-testcases-use-python3-everywhere-to-run-python-scrip.patch
new file mode 100644
index 0000000000..f4f87f38ab
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-testcases-use-python3-everywhere-to-run-python-scrip.patch
@@ -0,0 +1,161 @@
+From 0463d793566772a606255957915f99d166d5740c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 28 Aug 2019 18:30:23 +0200
+Subject: [PATCH] testcases: use python3 everywhere to run python scripts
+
+The scripts themselves have #!/usr/bin/python3 in them,
+so I trust they are already py3-compatible.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ testcases/kernel/power_management/runpwtests05.sh | 2 +-
+ .../power_management/runpwtests_exclusive01.sh | 2 +-
+ .../power_management/runpwtests_exclusive02.sh | 2 +-
+ .../power_management/runpwtests_exclusive03.sh | 2 +-
+ .../power_management/runpwtests_exclusive04.sh | 2 +-
+ .../power_management/runpwtests_exclusive05.sh | 2 +-
+ testcases/network/nfsv4/acl/runtest | 14 +++++++-------
+ testcases/realtime/func/pi-tests/run_auto.sh | 6 +++---
+ 8 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/testcases/kernel/power_management/runpwtests05.sh b/testcases/kernel/power_management/runpwtests05.sh
+index 8a7d0f6e0..43e234d01 100755
+--- a/testcases/kernel/power_management/runpwtests05.sh
++++ b/testcases/kernel/power_management/runpwtests05.sh
+@@ -35,7 +35,7 @@ else
+ max_sched_smt=1
+ fi
+
+-tst_test_cmds python
++tst_test_cmds python3
+
+ if ! grep sched_debug -qw /proc/cmdline ; then
+ tst_brkm TCONF "Kernel cmdline parameter 'sched_debug' needed," \
+diff --git a/testcases/kernel/power_management/runpwtests_exclusive01.sh b/testcases/kernel/power_management/runpwtests_exclusive01.sh
+index ec78319e2..9fefcbf6e 100755
+--- a/testcases/kernel/power_management/runpwtests_exclusive01.sh
++++ b/testcases/kernel/power_management/runpwtests_exclusive01.sh
+@@ -35,7 +35,7 @@ else
+ max_sched_smt=1
+ fi
+
+-tst_test_cmds python
++tst_test_cmds python3
+
+ hyper_threaded=$(is_hyper_threaded)
+ multi_socket=$(is_multi_socket)
+diff --git a/testcases/kernel/power_management/runpwtests_exclusive02.sh b/testcases/kernel/power_management/runpwtests_exclusive02.sh
+index e107fce35..2cd0ecb05 100755
+--- a/testcases/kernel/power_management/runpwtests_exclusive02.sh
++++ b/testcases/kernel/power_management/runpwtests_exclusive02.sh
+@@ -33,7 +33,7 @@ else
+ max_sched_smt=1
+ fi
+
+-tst_test_cmds python
++tst_test_cmds python3
+
+ hyper_threaded=$(is_hyper_threaded)
+ multi_socket=$(is_multi_socket)
+diff --git a/testcases/kernel/power_management/runpwtests_exclusive03.sh b/testcases/kernel/power_management/runpwtests_exclusive03.sh
+index 490344bb3..ab3a5d11d 100755
+--- a/testcases/kernel/power_management/runpwtests_exclusive03.sh
++++ b/testcases/kernel/power_management/runpwtests_exclusive03.sh
+@@ -35,7 +35,7 @@ else
+ max_sched_smt=1
+ fi
+
+-tst_test_cmds python
++tst_test_cmds python3
+
+ hyper_threaded=$(is_hyper_threaded)
+ multi_socket=$(is_multi_socket)
+diff --git a/testcases/kernel/power_management/runpwtests_exclusive04.sh b/testcases/kernel/power_management/runpwtests_exclusive04.sh
+index 978ca02ae..438ef603f 100755
+--- a/testcases/kernel/power_management/runpwtests_exclusive04.sh
++++ b/testcases/kernel/power_management/runpwtests_exclusive04.sh
+@@ -27,7 +27,7 @@ export TST_TOTAL=2
+ # Checking test environment
+ check_kervel_arch
+
+-tst_test_cmds python
++tst_test_cmds python3
+
+ hyper_threaded=$(is_hyper_threaded)
+ multi_socket=$(is_multi_socket)
+diff --git a/testcases/kernel/power_management/runpwtests_exclusive05.sh b/testcases/kernel/power_management/runpwtests_exclusive05.sh
+index a0dad5834..3a9afdbf2 100755
+--- a/testcases/kernel/power_management/runpwtests_exclusive05.sh
++++ b/testcases/kernel/power_management/runpwtests_exclusive05.sh
+@@ -35,7 +35,7 @@ else
+ max_sched_smt=1
+ fi
+
+-tst_test_cmds python
++tst_test_cmds python3
+
+ hyper_threaded=$(is_hyper_threaded)
+ multi_socket=$(is_multi_socket)
+diff --git a/testcases/network/nfsv4/acl/runtest b/testcases/network/nfsv4/acl/runtest
+index d2e1b4c49..a859e85bc 100755
+--- a/testcases/network/nfsv4/acl/runtest
++++ b/testcases/network/nfsv4/acl/runtest
+@@ -22,7 +22,7 @@ do
+ done
+
+ # creation of users on the remote machine (removed only at the end of the tests)
+-rsh -n $REMOTEHOST python $PWD/create_users.py -u 50 -g 50
++rsh -n $REMOTEHOST python3 $PWD/create_users.py -u 50 -g 50
+
+ echo "Starting ACL testing"
+
+@@ -51,19 +51,19 @@ echo "Basic tests finished"
+
+ echo "LONG ACL TEST"
+ echo "creating necessary users and groups"
+-python create_users.py -u 50 -g 50
++python3 create_users.py -u 50 -g 50
+ echo "creating necessary users and groups on the remote host"
+ mkdir $NFSMNTDIR/lacl-testdir
+-python test_long_acl.py -l $MAXLENGTH -p $NFSMNTDIR/lacl-testdir
++python3 test_long_acl.py -l $MAXLENGTH -p $NFSMNTDIR/lacl-testdir
+ rm -rf $NFSMNTDIR/lacl-testdir
+ echo "Long ACL test OK with $MAXLENGTH entries"
+ echo "ACL STRESSING TEST"
+-python setacl_stress.py -n 100 -u $USER_NB -g $GRP_NB -f $FILE_NB -p $NFSMNTDIR
++python3 setacl_stress.py -n 100 -u $USER_NB -g $GRP_NB -f $FILE_NB -p $NFSMNTDIR
+
+ # remove local an remote users
+-python cleanusers.py
+-python cleangroups.py
+-rsh -n $REMOTEHOST python $PWD/cleanusers.py
++python3 cleanusers.py
++python3 cleangroups.py
++rsh -n $REMOTEHOST python3 $PWD/cleanusers.py
+
+ echo "Test OK"
+
+diff --git a/testcases/realtime/func/pi-tests/run_auto.sh b/testcases/realtime/func/pi-tests/run_auto.sh
+index d13026049..277988568 100755
+--- a/testcases/realtime/func/pi-tests/run_auto.sh
++++ b/testcases/realtime/func/pi-tests/run_auto.sh
+@@ -15,15 +15,15 @@ $SCRIPTS_DIR/run_c_files.sh $profile testpi-0
+
+ export LOG_FILE="$LOG_DIR/$LOG_FORMAT-testpi-1.log"
+ $SCRIPTS_DIR/run_c_files.sh $profile testpi-1
+-PYTHONPATH=../../ python parse-testpi1.py $LOG_FILE 2>&1 | tee -a $LOG_FILE
++PYTHONPATH=../../ python3 parse-testpi1.py $LOG_FILE 2>&1 | tee -a $LOG_FILE
+
+ export LOG_FILE="$LOG_DIR/$LOG_FORMAT-testpi-2.log"
+ $SCRIPTS_DIR/run_c_files.sh $profile testpi-2
+-PYTHONPATH=../../ python parse-testpi2.py $LOG_FILE 2>&1 | tee -a $LOG_FILE
++PYTHONPATH=../../ python3 parse-testpi2.py $LOG_FILE 2>&1 | tee -a $LOG_FILE
+
+ export LOG_FILE="$LOG_DIR/$LOG_FORMAT-testpi-4.log"
+ $SCRIPTS_DIR/run_c_files.sh $profile testpi-4
+-PYTHONPATH=../../ python parse-testpi1.py $LOG_FILE 2>&1 | tee -a $LOG_FILE
++PYTHONPATH=../../ python3 parse-testpi1.py $LOG_FILE 2>&1 | tee -a $LOG_FILE
+
+
+ export LOG_FILE=""
diff --git a/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch b/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch
new file mode 100644
index 0000000000..c936b788fe
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch
@@ -0,0 +1,36 @@
+From 156776a3e29491b363fdc9811912e1298655d060 Mon Sep 17 00:00:00 2001
+From: Steven Price <steven.price@arm.com>
+Date: Fri, 19 Jul 2019 13:48:17 +0100
+Subject: [PATCH] ustat02: Fix EFAULT in 32bit compatibility mode
+
+The size of dev_t is larger than 32 bits which causes the dev argument
+to be passed incorrectly. On Arm this means that the EFAULT test case
+actually returns EINVAL because the device number isn't recognised.
+
+Signed-off-by: Steven Price <steven.price@arm.com>
+Acked-by: Li Wang <liwang@redhat.com>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/156776a3e29491b363fdc9811912e1298655d060]
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ testcases/kernel/syscalls/ustat/ustat02.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
+index 9bbe4f3..1a0e9e0 100644
+--- a/testcases/kernel/syscalls/ustat/ustat02.c
++++ b/testcases/kernel/syscalls/ustat/ustat02.c
+@@ -36,7 +36,7 @@ int TST_TOTAL = ARRAY_SIZE(tc);
+
+ void run(unsigned int test)
+ {
+- TEST(tst_syscall(__NR_ustat, *tc[test].dev, tc[test].buf));
++ TEST(tst_syscall(__NR_ustat, (unsigned int)*tc[test].dev, tc[test].buf));
+
+ if ((TST_RET == -1) && (TST_ERR == tc[test].exp_errno))
+ tst_res(TPASS | TTERRNO, "ustat(2) expected failure");
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch b/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
deleted file mode 100644
index 0684beeeed..0000000000
--- a/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 867ad5d5d64b9b27ee32148027532db0a00f6433 Mon Sep 17 00:00:00 2001
-From: "Roy.Li" <rongqing.li@windriver.com>
-Date: Thu, 7 Jan 2016 17:33:26 +0000
-Subject: [PATCH 02/32] Add knob to control whether numa support should be
- checked
-
-otherwise undeterministic dependency will be generated
-during build depending upong numa being staged or not
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- m4/ltp-numa.m4 | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
-index 60ae07b..ed7078d 100644
---- a/m4/ltp-numa.m4
-+++ b/m4/ltp-numa.m4
-@@ -24,7 +24,13 @@ dnl ----------------------------
- dnl
- AC_DEFUN([LTP_CHECK_SYSCALL_NUMA],
- [dnl
--AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
-+AC_MSG_CHECKING([for numa])
-+AC_ARG_WITH(
-+ [numa],
-+ AC_HELP_STRING([--without-numa],
-+ [without numa support]),
-+ [],
-+ [AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
- LTP_SYSCALL_NUMA_HEADERS=yes
- AC_CHECK_LIB(numa,numa_alloc_onnode,[have_numa_alloc_onnode="yes"])
- if test "x$have_numa_alloc_onnode" = "xyes"; then
-@@ -48,3 +54,5 @@ if test "x$have_mpol_constants" = "xyes"; then
- AC_DEFINE(HAVE_MPOL_CONSTANTS,1,[define to 1 if you have all constants required to use mbind tests])
- fi
- )])
-+AC_MSG_RESULT([$with_numa])
-+])
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch b/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch
new file mode 100644
index 0000000000..12e47eb2b6
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch
@@ -0,0 +1,68 @@
+From 7bc134545b7beb09717a60541530c20a1a5740d3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 26 Jul 2019 10:55:28 -0700
+Subject: [PATCH 2/2] check for RES_USE_INET6 during configure
+
+glibc 2.30 has remove RES_USE_INET6 define which has been on its way out
+since 2.26 release, this check ensures that we detect it before using it
+
+Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-July/012955.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 13 +++++++++++++
+ testcases/network/multicast/mc_gethost/mc_gethost.c | 6 ++++++
+ 2 files changed, 19 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 2255b5c181..ed7acccb01 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -91,6 +91,19 @@ AC_CHECK_FUNCS([ \
+ vmsplice \
+ ])
+
++#check defines
++AC_MSG_CHECKING([for RES_USE_INET6])
++AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <resolv.h>]],
++ [[char dummy[RES_USE_INET6];]])],
++ [
++ AC_MSG_RESULT([yes])
++ AC_DEFINE_UNQUOTED([HAVE_RES_USE_INET6], 1, [Define to 1 if you have the RES_USE_INET6 macro.])
++ ],
++ [
++ AC_MSG_RESULT([no])
++ AC_DEFINE_UNQUOTED([HAVE_RES_USE_INET6], 0, [Define to 1 if you have the RES_USE_INET6 macro.])
++ ]
++)
+ # Tools knobs
+
+ # Expect
+diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c
+index 9cc15d086b..d1cae5441a 100644
+--- a/testcases/network/multicast/mc_gethost/mc_gethost.c
++++ b/testcases/network/multicast/mc_gethost/mc_gethost.c
+@@ -17,6 +17,8 @@
+ #include <string.h>
+ #include <stdlib.h>
+
++#include "config.h"
++
+ #ifndef LOG_PERROR
+ #define LOG_PERROR 0
+ #endif
+@@ -50,8 +52,12 @@ usage:
+ argv++, argc--;
+ }
+ if (argc >= 1 && !strcmp(*argv, "-6")) {
++#if HAVE_RES_USE_INET6
+ af = AF_INET6, size = IN6ADDRSZ;
+ _res.options |= RES_USE_INET6;
++#else
++ af = AF_INET, size = INADDRSZ;
++#endif
+ argv++, argc--;
+ }
+ if (argc >= 1 && !strcmp(*argv, "-f")) {
+--
+2.22.0
+
diff --git a/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch b/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
new file mode 100644
index 0000000000..eff9ed0741
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
@@ -0,0 +1,47 @@
+From 81e5bd5442337a4a648a0dbbff47eaac0d351287 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 18:22:38 +0000
+Subject: [PATCH] kernel/controllers: Link with libfts explicitly on musl
+
+musl does not implement fts like glibc and therefore it depends on
+external implementation for all fts APIs
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/controllers/Makefile.inc | 3 +++
+ testcases/kernel/controllers/cpuset/Makefile.inc | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/testcases/kernel/controllers/Makefile.inc b/testcases/kernel/controllers/Makefile.inc
+index 4ca0b5a..1d85e4d 100644
+--- a/testcases/kernel/controllers/Makefile.inc
++++ b/testcases/kernel/controllers/Makefile.inc
+@@ -36,6 +36,9 @@ MAKE_DEPS := $(LIB)
+ CPPFLAGS += -I$(abs_srcdir)/../$(LIBDIR)
+
+ LDFLAGS += -L$(abs_builddir)/../$(LIBDIR)
++ifeq ($(LIBC),musl)
++LDLIBS += -lfts
++endif
+
+ INSTALL_TARGETS ?= *.sh
+
+diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc
+index db6a843..86dd2a8 100644
+--- a/testcases/kernel/controllers/cpuset/Makefile.inc
++++ b/testcases/kernel/controllers/cpuset/Makefile.inc
+@@ -42,6 +42,9 @@ MAKE_DEPS := $(LIBCONTROLLERS) $(LIBCPUSET)
+ LDFLAGS += -L$(abs_builddir)/$(LIBCPUSET_DIR) -L$(abs_builddir)/$(LIBCONTROLLERS_DIR)
+
+ LDLIBS += -lcpu_set -lcontrollers -lltp
++ifeq ($(LIBC),musl)
++LDLIBS += -lfts
++endif
+
+ INSTALL_TARGETS ?= *.sh
+
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch b/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
deleted file mode 100644
index bf1176fc41..0000000000
--- a/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From b193011da301b3d944e8fddcf4817513c31c5b88 Mon Sep 17 00:00:00 2001
-From: Fathi Boudra <fathi.boudra@linaro.org>
-Date: Thu, 7 Jan 2016 17:36:19 +0000
-Subject: [PATCH 03/32] Add knob to control tirpc support
-
-allow to disable tirpc. Helps to disable it at top level for eg. musl it
-does not yet work.
-
-Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index cc50397..9e2936b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -98,6 +98,13 @@ if test "x$with_python" = xyes; then
- else
- AC_SUBST([WITH_PYTHON],["no"])
- fi
-+
-+# TI RPC
-+AC_ARG_WITH([tirpc],
-+ AC_HELP_STRING([--without-tirpc],
-+ [without libtirpc support]),
-+ [],[with_tirpc=yes],
-+)
- # END tools knobs
-
- # Testsuites knobs
-@@ -169,7 +176,9 @@ LTP_CHECK_RENAMEAT2
- LTP_CHECK_FALLOCATE
- LTP_CHECK_SYSCALL_FCNTL
- LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
-+if test "x$with_tirpc" = xyes; then
- LTP_CHECK_TIRPC
-+fi
- LTP_CHECK_TEE
- LTP_CHECK_SPLICE
- LTP_CHECK_VMSPLICE
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
new file mode 100644
index 0000000000..c0f69ecf5f
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
@@ -0,0 +1,58 @@
+From 29ce9fdab3bd34e69d73b5b890795559c06553f7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:40:08 +0000
+Subject: [PATCH] Check if __GLIBC_PREREQ is defined before using it
+
+__GLIBC_PREREQ is specific to glibc so it should be checked if it is
+defined or not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/kernel/syscalls/accept4/accept4_01.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c
+index dd289cf..76aa969 100644
+--- a/testcases/kernel/syscalls/accept4/accept4_01.c
++++ b/testcases/kernel/syscalls/accept4/accept4_01.c
+@@ -38,6 +38,7 @@
+ static struct sockaddr_in conn_addr;
+ static int listening_fd;
+
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !(__GLIBC_PREREQ(2, 10))
+ static int
+ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+@@ -56,6 +57,7 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+ #endif
+ }
+ #endif
++#endif
+
+ static int create_listening_socket(void)
+ {
+@@ -115,6 +117,7 @@ static void verify_accept4(unsigned int nr)
+ SAFE_CONNECT(connfd, (struct sockaddr *)&conn_addr, sizeof(conn_addr));
+ addrlen = sizeof(claddr);
+
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !(__GLIBC_PREREQ(2, 10))
+ TEST(accept4_01(listening_fd, (struct sockaddr *)&claddr, &addrlen,
+ tcase->cloexec | tcase->nonblock));
+@@ -122,6 +125,10 @@ static void verify_accept4(unsigned int nr)
+ TEST(accept4(listening_fd, (struct sockaddr *)&claddr, &addrlen,
+ tcase->cloexec | tcase->nonblock));
+ #endif
++#else
++ TEST(accept4(listening_fd, (struct sockaddr *)&claddr, &addrlen,
++ tcase->cloexec | tcase->nonblock));
++#endif
+ if (TST_RET == -1) {
+ if (TST_ERR == ENOSYS)
+ tst_brk(TCONF, "syscall __NR_accept4 not supported");
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch b/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
deleted file mode 100644
index 2de936304d..0000000000
--- a/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From 53acddddf1b324e06af886ee4639b774e5c8c8bc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 18:19:03 +0000
-Subject: [PATCH 04/32] build: Add option to select libc implementation
-
-There are more than glibc for C library implementation available on
-linux now a days, uclibc cloaked like glibc but musl e.g. is very
-different and does not implement all GNU extentions
-
-Disable tests specifically not building _yet_ on musl based systems
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile | 5 +++++
- testcases/kernel/Makefile | 5 ++++-
- testcases/kernel/sched/Makefile | 4 +++-
- testcases/kernel/syscalls/Makefile | 5 +++++
- testcases/network/nfsv4/acl/Makefile | 4 ++++
- testcases/network/rpc/basic_tests/Makefile | 5 +++++
- testcases/realtime/func/pi-tests/Makefile | 4 ++++
- testcases/realtime/stress/pi-tests/Makefile | 5 +++++
- 8 files changed, 35 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 297f8e7..906b280 100644
---- a/Makefile
-+++ b/Makefile
-@@ -49,6 +49,11 @@ SKIP_IDCHECK ?= 0
- UCLINUX ?= 0
- export UCLINUX
-
-+# System C library implementation (glibc,uclibc,musl etc.)
-+# default to glibc if not set
-+LIBC ?= glibc
-+export LIBC
-+
- # CLEAN_TARGETS: Targets which exist solely in clean.
- # COMMON_TARGETS: Targets which exist in all, clean, and install.
- # INSTALL_TARGETS: Targets which exist in clean and install (contains
-diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
-index 50a12fa..4f1987f 100644
---- a/testcases/kernel/Makefile
-+++ b/testcases/kernel/Makefile
-@@ -47,13 +47,16 @@ SUBDIRS += connectors \
- logging \
- mem \
- numa \
-- pty \
- sched \
- security \
- timers \
- tracing \
- module \
-
-+ifneq ($(LIBC),musl)
-+SUBDIRS += pty
-+endif
-+
- ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
- SUBDIRS += power_management
- endif
-diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
-index 6245ed0..aa4eb7f 100644
---- a/testcases/kernel/sched/Makefile
-+++ b/testcases/kernel/sched/Makefile
-@@ -23,5 +23,7 @@
- top_srcdir ?= ../../..
-
- include $(top_srcdir)/include/mk/env_pre.mk
--
-+ifeq ($(LIBC),musl)
-+ FILTER_OUT_DIRS += process_stress
-+endif
- include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
-index 8acb395..b749126 100644
---- a/testcases/kernel/syscalls/Makefile
-+++ b/testcases/kernel/syscalls/Makefile
-@@ -28,5 +28,10 @@ ifeq ($(UCLINUX),1)
- FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
- mincore mprotect nftw profil remap_file_pages sbrk
- endif
-+ifeq ($(LIBC),musl)
-+FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \
-+ rt_sigsuspend setdomainname sethostname sigsuspend \
-+ ustat
-+endif
-
- include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
-index 8bc78c2..c36cf50 100644
---- a/testcases/network/nfsv4/acl/Makefile
-+++ b/testcases/network/nfsv4/acl/Makefile
-@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
-
- LDLIBS += $(ACL_LIBS)
-
-+ifeq ($(LIBC),musl)
-+FILTER_OUT_MAKE_TARGETS := acl1
-+endif
-+
- include $(top_srcdir)/include/mk/generic_leaf_target.mk
-diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
-index 3160813..9bdf5d0 100644
---- a/testcases/network/rpc/basic_tests/Makefile
-+++ b/testcases/network/rpc/basic_tests/Makefile
-@@ -23,4 +23,9 @@
- top_srcdir ?= ../../../..
-
- include $(top_srcdir)/include/mk/env_pre.mk
-+
-+ifeq ($(LIBC),musl)
-+FILTER_OUT_DIRS += rpc01
-+endif
-+
- include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
-index 7a7a57a..5808866 100644
---- a/testcases/realtime/func/pi-tests/Makefile
-+++ b/testcases/realtime/func/pi-tests/Makefile
-@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
- include $(abs_srcdir)/../../config.mk
-
- MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
-+ifeq ($(LIBC),musl)
-+FILTER_OUT_MAKE_TARGETS := testpi-5 testpi-6 sbrk_mutex
-+endif
-+
-
- include $(top_srcdir)/include/mk/generic_leaf_target.mk
-diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
-index 5edc3b4..aa5987a 100644
---- a/testcases/realtime/stress/pi-tests/Makefile
-+++ b/testcases/realtime/stress/pi-tests/Makefile
-@@ -24,4 +24,9 @@ top_srcdir ?= ../../../..
-
- include $(top_srcdir)/include/mk/env_pre.mk
- include $(abs_srcdir)/../../config.mk
-+
-+ifeq ($(LIBC),musl)
-+FILTER_OUT_MAKE_TARGETS := testpi-3
-+endif
-+
- include $(top_srcdir)/include/mk/generic_leaf_target.mk
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch b/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch
new file mode 100644
index 0000000000..5622a64d43
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch
@@ -0,0 +1,34 @@
+From d0fc9ca5d3366f9b8907e463222403cd2327be10 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 06:51:20 +0000
+Subject: [PATCH] guard mallocopt() with __GLIBC__
+
+mallocopt is not available on non glibc implementations
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c
+index 5bb8eff..934d951 100644
+--- a/utils/benchmark/ebizzy-0.3/ebizzy.c
++++ b/utils/benchmark/ebizzy-0.3/ebizzy.c
+@@ -215,10 +215,10 @@ static void read_options(int argc, char *argv[])
+ "\"never mmap\" option specified\n");
+ usage();
+ }
+-
++#ifdef __GLIBC__
+ if (never_mmap)
+ mallopt(M_MMAP_MAX, 0);
+-
++#endif
+ if (chunk_size < record_size) {
+ fprintf(stderr, "Chunk size %u smaller than record size %u\n",
+ chunk_size, record_size);
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch b/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
deleted file mode 100644
index 8dab1ed2ec..0000000000
--- a/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 6e3058521b50d91d4b0569c4d491c5af5ff798b2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 18:22:38 +0000
-Subject: [PATCH 05/32] kernel/controllers: Link with libfts explicitly on musl
-
-musl does not implement fts like glibc and therefore it depends on
-external implementation for all fts APIs
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/controllers/Makefile.inc | 3 +++
- testcases/kernel/controllers/cpuset/Makefile.inc | 3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/testcases/kernel/controllers/Makefile.inc b/testcases/kernel/controllers/Makefile.inc
-index b106283..ef5fc0c 100644
---- a/testcases/kernel/controllers/Makefile.inc
-+++ b/testcases/kernel/controllers/Makefile.inc
-@@ -36,6 +36,9 @@ MAKE_DEPS := $(LIB)
- CPPFLAGS += -I$(abs_srcdir)/../$(LIBDIR)
-
- LDFLAGS += -L$(abs_builddir)/../$(LIBDIR)
-+ifeq ($(LIBC),musl)
-+LDLIBS += -lfts
-+endif
-
- INSTALL_TARGETS ?= *.sh
-
-diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc
-index 9e002f4..e0fcb9c 100644
---- a/testcases/kernel/controllers/cpuset/Makefile.inc
-+++ b/testcases/kernel/controllers/cpuset/Makefile.inc
-@@ -42,6 +42,9 @@ MAKE_DEPS := $(LIBCONTROLLERS) $(LIBCPUSET)
- LDFLAGS += -L$(abs_builddir)/$(LIBCPUSET_DIR) -L$(abs_builddir)/$(LIBCONTROLLERS_DIR)
-
- LDLIBS += -lcpu_set -lcontrollers -lltp
-+ifeq ($(LIBC),musl)
-+LDLIBS += -lfts
-+endif
-
- INSTALL_TARGETS ?= *.sh
-
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch b/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch
new file mode 100644
index 0000000000..804edfa1b4
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch
@@ -0,0 +1,35 @@
+From 60054686e2c1a4bedf1d507af97ebbb7ff491e77 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 18 Jul 2019 15:23:15 +0800
+Subject: [PATCH] rt_tgsigqueueinfo: disable test on musl
+
+Fix build error with musl:
+rt_tgsigqueueinfo01.c: In function 'sigusr1_handler':
+rt_tgsigqueueinfo01.c:42:22: error: 'siginfo_t' {aka 'struct <anonymous>'} has no member named '_sifields'; did you mean '__si_fields'?
+ 42 | sigval_rcv = uinfo->_sifields._rt.SI_SIGVAL.sival_ptr;
+ | ^~~~~~~~~
+ | __si_fields
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/kernel/syscalls/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
+index d1becd0..1f3ff34 100644
+--- a/testcases/kernel/syscalls/Makefile
++++ b/testcases/kernel/syscalls/Makefile
+@@ -31,7 +31,7 @@ endif
+ ifeq ($(LIBC),musl)
+ FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \
+ rt_sigsuspend setdomainname sethostname sigsuspend \
+- ustat
++ ustat rt_tgsigqueueinfo
+ endif
+
+ ifeq ($(UCLIBC),1)
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch b/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
deleted file mode 100644
index 56a48abcc9..0000000000
--- a/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From fb8b895385a641d74f2186fe5f20a872209692ed Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 18:24:20 +0000
-Subject: [PATCH 06/32] sendfile: Use off64_t instead of __off64_t
-
-__off64_t is specific to glibc where as off64_t is widely available
-Add _GNU_SOURCE for off64_t defines from sys/types.h
-Fixes
-<command-line>:0:7: error: unknown type name 'off64_t'
-sendfile02.c:97:18: note: in expansion of macro 'OFF_T'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/sendfile/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/syscalls/sendfile/Makefile b/testcases/kernel/syscalls/sendfile/Makefile
-index df7b63f..1bd1b57 100644
---- a/testcases/kernel/syscalls/sendfile/Makefile
-+++ b/testcases/kernel/syscalls/sendfile/Makefile
-@@ -21,6 +21,6 @@ top_srcdir ?= ../../../..
- include $(top_srcdir)/include/mk/testcases.mk
- include $(abs_srcdir)/../utils/newer_64.mk
-
--%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DOFF_T=__off64_t
-+%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DOFF_T=off64_t -D_GNU_SOURCE
-
- include $(top_srcdir)/include/mk/generic_leaf_target.mk
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch b/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch
new file mode 100644
index 0000000000..0e7264574f
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch
@@ -0,0 +1,32 @@
+From f4fafbdffae3a63c81f65cef98c72dda26283e06 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 8 Feb 2017 16:17:17 +0800
+Subject: [PATCH] Fix test_proc_kill hanging
+
+Sometimes the signal is delivered to memcg_process before the framework took
+into consideration its pid entered in the tasks. Fixed by delaying the signal
+send command.
+
+Upstream-Status: Pending
+
+Signed-off-by: George Nita <george.nita@enea.com>
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+index aadaae4..deea5d6 100755
+--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
++++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+@@ -291,6 +291,7 @@ test_proc_kill()
+ pid=$!
+ TST_CHECKPOINT_WAIT 0
+ echo $pid > tasks
++ sleep 1
+
+ signal_memcg_process $pid $3
+
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch b/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch
deleted file mode 100644
index 4be906ec78..0000000000
--- a/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch
+++ /dev/null
@@ -1,394 +0,0 @@
-From 405c03171e4bf0edd698cb602cf7bd7fe1d0401a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 19:33:53 +0000
-Subject: [PATCH 07/32] replace SIGCLD with SIGCHLD
-
-its defined to use SIGCHLD anyway in
-
-bits/signum.h:#define SIGCLD SIGCHLD /* Same as SIGCHLD
-(System V). */
-
-plus it helps these tests compile with musl which adheres to posix
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/tst_sig.c | 8 ++++----
- testcases/kernel/connectors/pec/pec_listener.c | 1 +
- testcases/kernel/fs/doio/doio.c | 4 ++--
- testcases/kernel/fs/doio/growfiles.c | 2 +-
- testcases/kernel/syscalls/fcntl/fcntl11.c | 8 ++++----
- testcases/kernel/syscalls/fcntl/fcntl17.c | 8 ++++----
- testcases/kernel/syscalls/fcntl/fcntl19.c | 8 ++++----
- testcases/kernel/syscalls/fcntl/fcntl20.c | 8 ++++----
- testcases/kernel/syscalls/fcntl/fcntl21.c | 8 ++++----
- testcases/kernel/syscalls/kill/kill02.c | 6 +++---
- testcases/kernel/syscalls/kill/kill12.c | 8 ++++----
- testcases/kernel/syscalls/mkdir/mkdir09.c | 12 ++++++------
- testcases/kernel/syscalls/sighold/sighold02.c | 2 +-
- testcases/network/tcp_cmds/perf_lan/pingpong.c | 2 +-
- testcases/network/tcp_cmds/perf_lan/pingpong6.c | 2 +-
- 15 files changed, 44 insertions(+), 43 deletions(-)
-
-diff --git a/lib/tst_sig.c b/lib/tst_sig.c
-index 3af5ffd..36565e1 100644
---- a/lib/tst_sig.c
-+++ b/lib/tst_sig.c
-@@ -49,7 +49,7 @@
- fork_flag - set to FORK or NOFORK depending upon whether the
- calling program executes a fork() system call. It
- is normally the case that the calling program treats
-- SIGCLD as an expected signal if fork() is being used.
-+ SIGCHLD as an expected signal if fork() is being used.
-
- handler - a pointer to the unexpected signal handler to
- be executed after an unexpected signal has been
-@@ -82,7 +82,7 @@ static void (*tst_setup_signal(int, void (*)(int))) (int);
-
- /****************************************************************************
- * tst_sig() : set-up to catch unexpected signals. fork_flag is set to NOFORK
-- * if SIGCLD is to be an "unexpected signal", otherwise it is set to
-+ * if SIGCHLD is to be an "unexpected signal", otherwise it is set to
- * FORK. cleanup points to a cleanup routine to be executed before
- * tst_exit is called (cleanup is set to NULL if no cleanup is desired).
- * handler is a pointer to the signal handling routine (if handler is
-@@ -117,7 +117,7 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
- for (sig = 1; sig < NSIG; sig++) {
- /*
- * SIGKILL is never unexpected.
-- * SIGCLD is only unexpected when
-+ * SIGCHLD is only unexpected when
- * no forking is being done.
- * SIGINFO is used for file quotas and should be expected
- */
-@@ -205,7 +205,7 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
- #endif
- break;
-
-- case SIGCLD:
-+ case SIGCHLD:
- if (fork_flag == FORK)
- continue;
-
-diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
-index a1beb13..002750a 100644
---- a/testcases/kernel/connectors/pec/pec_listener.c
-+++ b/testcases/kernel/connectors/pec/pec_listener.c
-@@ -20,6 +20,7 @@
- /* */
- /******************************************************************************/
-
-+#define _GNU_SOURCE
- #include <sys/socket.h>
- #include <sys/poll.h>
- #include <sys/types.h>
-diff --git a/testcases/kernel/fs/doio/doio.c b/testcases/kernel/fs/doio/doio.c
-index 4b0dec5..5f65ef9 100644
---- a/testcases/kernel/fs/doio/doio.c
-+++ b/testcases/kernel/fs/doio/doio.c
-@@ -573,7 +573,7 @@ int main(int argc, char **argv)
- case SIGTSTP:
- case SIGSTOP:
- case SIGCONT:
-- case SIGCLD:
-+ case SIGCHLD:
- case SIGBUS:
- case SIGSEGV:
- case SIGQUIT:
-@@ -615,7 +615,7 @@ int main(int argc, char **argv)
- }
-
- sigemptyset(&block_mask);
-- sigaddset(&block_mask, SIGCLD);
-+ sigaddset(&block_mask, SIGCHLD);
- sigprocmask(SIG_BLOCK, &block_mask, &omask);
-
- /*
-diff --git a/testcases/kernel/fs/doio/growfiles.c b/testcases/kernel/fs/doio/growfiles.c
-index 09e7f35..bbad230 100644
---- a/testcases/kernel/fs/doio/growfiles.c
-+++ b/testcases/kernel/fs/doio/growfiles.c
-@@ -1640,7 +1640,7 @@ int set_sig(void)
- #ifdef SIGRESTART
- case SIGRESTART:
- #endif /* SIGRESTART */
-- case SIGCLD:
-+ case SIGCHLD:
- break;
-
- default:
-diff --git a/testcases/kernel/syscalls/fcntl/fcntl11.c b/testcases/kernel/syscalls/fcntl/fcntl11.c
-index fa6ce53..2de2b6c 100644
---- a/testcases/kernel/syscalls/fcntl/fcntl11.c
-+++ b/testcases/kernel/syscalls/fcntl/fcntl11.c
-@@ -105,10 +105,10 @@ void setup(void)
- memset(&act, 0, sizeof(act));
- act.sa_handler = catch_child;
- sigemptyset(&act.sa_mask);
-- sigaddset(&act.sa_mask, SIGCLD);
-- if ((sigaction(SIGCLD, &act, NULL)) < 0)
-+ sigaddset(&act.sa_mask, SIGCHLD);
-+ if ((sigaction(SIGCHLD, &act, NULL)) < 0)
- tst_brkm(TBROK | TERRNO, cleanup,
-- "sigaction(SIGCLD, ..) failed");
-+ "sigaction(SIGCHLD, ..) failed");
- }
-
- void do_child(void)
-@@ -227,7 +227,7 @@ void stop_child(void)
- {
- struct flock fl;
-
-- signal(SIGCLD, SIG_DFL);
-+ signal(SIGCHLD, SIG_DFL);
- fl.l_type = STOP;
- parent_put(&fl);
- wait(0);
-diff --git a/testcases/kernel/syscalls/fcntl/fcntl17.c b/testcases/kernel/syscalls/fcntl/fcntl17.c
-index 5b03e39..6598b20 100644
---- a/testcases/kernel/syscalls/fcntl/fcntl17.c
-+++ b/testcases/kernel/syscalls/fcntl/fcntl17.c
-@@ -150,9 +150,9 @@ int setup(void)
- memset(&act, 0, sizeof(act));
- act.sa_handler = catch_child;
- sigemptyset(&act.sa_mask);
-- sigaddset(&act.sa_mask, SIGCLD);
-- if (sigaction(SIGCLD, &act, NULL) < 0) {
-- tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
-+ sigaddset(&act.sa_mask, SIGCHLD);
-+ if (sigaction(SIGCHLD, &act, NULL) < 0) {
-+ tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
- return 1;
- }
- return 0;
-@@ -381,7 +381,7 @@ void stop_children(void)
- {
- int arg;
-
-- signal(SIGCLD, SIG_DFL);
-+ signal(SIGCHLD, SIG_DFL);
- arg = STOP;
- child_free(child_pipe1[1], arg);
- child_free(child_pipe2[1], arg);
-diff --git a/testcases/kernel/syscalls/fcntl/fcntl19.c b/testcases/kernel/syscalls/fcntl/fcntl19.c
-index a542cfc..88c91d6 100644
---- a/testcases/kernel/syscalls/fcntl/fcntl19.c
-+++ b/testcases/kernel/syscalls/fcntl/fcntl19.c
-@@ -112,9 +112,9 @@ void setup(void)
- memset(&act, 0, sizeof(act));
- act.sa_handler = catch_child;
- sigemptyset(&act.sa_mask);
-- sigaddset(&act.sa_mask, SIGCLD);
-- if ((sigaction(SIGCLD, &act, NULL)) < 0) {
-- tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
-+ sigaddset(&act.sa_mask, SIGCHLD);
-+ if ((sigaction(SIGCHLD, &act, NULL)) < 0) {
-+ tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
- fail = 1;
- }
- }
-@@ -265,7 +265,7 @@ void stop_child(void)
- {
- struct flock fl;
-
-- signal(SIGCLD, SIG_DFL);
-+ signal(SIGCHLD, SIG_DFL);
- fl.l_type = STOP;
- parent_put(&fl);
- wait(0);
-diff --git a/testcases/kernel/syscalls/fcntl/fcntl20.c b/testcases/kernel/syscalls/fcntl/fcntl20.c
-index aa06bab..99fd783 100644
---- a/testcases/kernel/syscalls/fcntl/fcntl20.c
-+++ b/testcases/kernel/syscalls/fcntl/fcntl20.c
-@@ -109,9 +109,9 @@ void setup(void)
- memset(&act, 0, sizeof(act));
- act.sa_handler = catch_child;
- sigemptyset(&act.sa_mask);
-- sigaddset(&act.sa_mask, SIGCLD);
-- if (sigaction(SIGCLD, &act, NULL) == -1)
-- tst_brkm(TFAIL | TERRNO, cleanup, "SIGCLD signal setup failed");
-+ sigaddset(&act.sa_mask, SIGCHLD);
-+ if (sigaction(SIGCHLD, &act, NULL) == -1)
-+ tst_brkm(TFAIL | TERRNO, cleanup, "SIGCHLD signal setup failed");
- }
-
- void cleanup(void)
-@@ -264,7 +264,7 @@ void stop_child(void)
- {
- struct flock fl;
-
-- signal(SIGCLD, SIG_DFL);
-+ signal(SIGCHLD, SIG_DFL);
- fl.l_type = STOP;
- parent_put(&fl);
- wait(0);
-diff --git a/testcases/kernel/syscalls/fcntl/fcntl21.c b/testcases/kernel/syscalls/fcntl/fcntl21.c
-index 5307021..8f1a67c 100644
---- a/testcases/kernel/syscalls/fcntl/fcntl21.c
-+++ b/testcases/kernel/syscalls/fcntl/fcntl21.c
-@@ -110,9 +110,9 @@ void setup(void)
- memset(&act, 0, sizeof(act));
- act.sa_handler = catch_child;
- sigemptyset(&act.sa_mask);
-- sigaddset(&act.sa_mask, SIGCLD);
-- if ((sigaction(SIGCLD, &act, NULL)) < 0) {
-- tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
-+ sigaddset(&act.sa_mask, SIGCHLD);
-+ if ((sigaction(SIGCHLD, &act, NULL)) < 0) {
-+ tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
- fail = 1;
- }
- }
-@@ -272,7 +272,7 @@ void stop_child(void)
- {
- struct flock fl;
-
-- signal(SIGCLD, SIG_DFL);
-+ signal(SIGCHLD, SIG_DFL);
- fl.l_type = STOP;
- parent_put(&fl);
- wait(0);
-diff --git a/testcases/kernel/syscalls/kill/kill02.c b/testcases/kernel/syscalls/kill/kill02.c
-index 9d6cc68..08360dd 100644
---- a/testcases/kernel/syscalls/kill/kill02.c
-+++ b/testcases/kernel/syscalls/kill/kill02.c
-@@ -701,7 +701,7 @@ void setup(void)
-
- /*
- * Set to catch unexpected signals.
-- * SIGCLD is set to be ignored because we do not wait for termination status.
-+ * SIGCHLD is set to be ignored because we do not wait for termination status.
- * SIGUSR1 is set to be ignored because this is the signal we are using for
- * the test and we are not concerned with the parent getting it.
- */
-@@ -713,9 +713,9 @@ void setup(void)
- "signal(SIGUSR1, SIG_IGN) failed");
- }
-
-- if (signal(SIGCLD, SIG_IGN) == SIG_ERR) {
-+ if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
- tst_brkm(TBROK | TERRNO, NULL,
-- "signal(SIGCLD, SIG_IGN) failed");
-+ "signal(SIGCHLD, SIG_IGN) failed");
- }
-
- TEST_PAUSE;
-diff --git a/testcases/kernel/syscalls/kill/kill12.c b/testcases/kernel/syscalls/kill/kill12.c
-index 7a47a4a..d7c4147 100644
---- a/testcases/kernel/syscalls/kill/kill12.c
-+++ b/testcases/kernel/syscalls/kill/kill12.c
-@@ -98,7 +98,7 @@ int main(int argc, char **argv)
-
- exno = 1;
-
-- if (sigset(SIGCLD, chsig) == SIG_ERR) {
-+ if (sigset(SIGCHLD, chsig) == SIG_ERR) {
- fprintf(temp, "\tsigset failed, errno = %d\n", errno);
- fail_exit();
- }
-@@ -128,7 +128,7 @@ int main(int argc, char **argv)
- sleep(1);
-
- kill(pid, sig); /* child should ignroe this sig */
-- kill(pid, SIGCLD); /* child should exit */
-+ kill(pid, SIGCHLD); /* child should exit */
-
- #ifdef BCS
- while ((npid = wait(&status)) != pid
-@@ -222,14 +222,14 @@ void do_child(void)
- int exno = 1;
-
- #ifdef UCLINUX
-- if (sigset(SIGCLD, chsig) == SIG_ERR) {
-+ if (sigset(SIGCHLD, chsig) == SIG_ERR) {
- fprintf(temp, "\tsigset failed, errno = %d\n", errno);
- fail_exit();
- }
- #endif
-
- sigset(sig, SIG_IGN); /* set to ignore signal */
-- kill(getppid(), SIGCLD); /* tell parent we are ready */
-+ kill(getppid(), SIGCHLD); /* tell parent we are ready */
- while (!chflag)
- sleep(1); /* wait for parent */
-
-diff --git a/testcases/kernel/syscalls/mkdir/mkdir09.c b/testcases/kernel/syscalls/mkdir/mkdir09.c
-index 41c20e9..07b4fb8 100644
---- a/testcases/kernel/syscalls/mkdir/mkdir09.c
-+++ b/testcases/kernel/syscalls/mkdir/mkdir09.c
-@@ -122,10 +122,10 @@ int main(int argc, char *argv[])
-
- }
-
-- /* Set up to catch SIGCLD signal */
-- if (signal(SIGCLD, chld) == SIG_ERR) {
-+ /* Set up to catch SIGCHLD signal */
-+ if (signal(SIGCHLD, chld) == SIG_ERR) {
- tst_brkm(TFAIL, cleanup,
-- "Error setting up SIGCLD signal, ERRNO = %d", errno);
-+ "Error setting up SIGCHLD signal, ERRNO = %d", errno);
-
- }
-
-@@ -236,9 +236,9 @@ int runtest(void)
- tst_brkm(TFAIL, cleanup,
- "Error resetting SIGTERM signal, ERRNO = %d", errno);
- }
-- if (signal(SIGCLD, SIG_DFL) == SIG_ERR) {
-+ if (signal(SIGCHLD, SIG_DFL) == SIG_ERR) {
- tst_brkm(TFAIL, cleanup,
-- "Error resetting SIGCLD signal, ERRNO = %d", errno);
-+ "Error resetting SIGCHLD signal, ERRNO = %d", errno);
- }
-
- if (test_time) {
-@@ -372,7 +372,7 @@ void term(int sig)
-
- void chld(int sig)
- {
-- /* Routine to handle SIGCLD signal. */
-+ /* Routine to handle SIGCHLD signal. */
-
- sigchld++;
- if (jump) {
-diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c
-index e3076fb..be01874 100644
---- a/testcases/kernel/syscalls/sighold/sighold02.c
-+++ b/testcases/kernel/syscalls/sighold/sighold02.c
-@@ -77,7 +77,7 @@ static int sigs_map[NUMSIGS];
- static int skip_sig(int sig)
- {
- switch (sig) {
-- case SIGCLD:
-+ case SIGCHLD:
- case SIGKILL:
- case SIGALRM:
- case SIGSTOP:
-diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong.c b/testcases/network/tcp_cmds/perf_lan/pingpong.c
-index 1196312..5b06798 100644
---- a/testcases/network/tcp_cmds/perf_lan/pingpong.c
-+++ b/testcases/network/tcp_cmds/perf_lan/pingpong.c
-@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
-
- /* Setup traps */
- signal(SIGINT, finish);
-- signal(SIGCLD, finish);
-+ signal(SIGCHLD, finish);
-
- /* Fork a child process to continue sending packets */
- tst_resm(TINFO, "Create a child process to continue to send packets");
-diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong6.c b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
-index 9747f58..0a0fb1d 100644
---- a/testcases/network/tcp_cmds/perf_lan/pingpong6.c
-+++ b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
-@@ -153,7 +153,7 @@ char *argv[];
-
- /* Setup traps */
- signal(SIGINT, finish);
-- signal(SIGCLD, finish);
-+ signal(SIGCHLD, finish);
-
- /* Fork a child process to continue sending packets */
- printf("Create a child process to continue to send packets \n");
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
deleted file mode 100644
index d123074207..0000000000
--- a/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
+++ /dev/null
@@ -1,285 +0,0 @@
-From a3cbee31daae2466bc8dcac36b33a01352693346 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 19:40:08 +0000
-Subject: [PATCH 01/26] Check if __GLIBC_PREREQ is defined before using it
-
-__GLIBC_PREREQ is specific to glibc so it should be checked if it is
-defined or not.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- testcases/kernel/syscalls/accept4/accept4_01.c | 9 ++++-
- testcases/kernel/syscalls/getcpu/getcpu01.c | 40 +++++++++++++++++++++-
- .../sched_getaffinity/sched_getaffinity01.c | 26 ++++++++++++++
- 3 files changed, 73 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c
-index 6072bfa..2b090cb 100644
---- a/testcases/kernel/syscalls/accept4/accept4_01.c
-+++ b/testcases/kernel/syscalls/accept4/accept4_01.c
-@@ -64,6 +64,7 @@ static void cleanup(void)
- tst_rmdir();
- }
-
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if !(__GLIBC_PREREQ(2, 10))
- static int
- accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
-@@ -82,7 +83,6 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
- }
- tst_resm(TINFO, "\n");
- #endif
--
- #if USE_SOCKETCALL
- long args[6];
-
-@@ -97,6 +97,7 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
- #endif
- }
- #endif
-+#endif
-
- static void
- do_test(int lfd, struct sockaddr_in *conn_addr,
-@@ -119,9 +120,15 @@ do_test(int lfd, struct sockaddr_in *conn_addr,
- die("Connect Error");
-
- addrlen = sizeof(struct sockaddr_in);
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if !(__GLIBC_PREREQ(2, 10))
- acceptfd = accept4_01(lfd, (struct sockaddr *)&claddr, &addrlen,
- closeonexec_flag | nonblock_flag);
-+
-+#else
-+ acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen,
-+ closeonexec_flag | nonblock_flag);
-+#endif
- #else
- acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen,
- closeonexec_flag | nonblock_flag);
-diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
-index c927512..921b107 100644
---- a/testcases/kernel/syscalls/getcpu/getcpu01.c
-+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
-@@ -62,6 +62,7 @@
- #include <dirent.h>
-
- #if defined(__i386__) || defined(__x86_64__)
-+#if defined(__GLIBC__)
- #if __GLIBC_PREREQ(2,6)
- #if defined(__x86_64__)
- #include <utmpx.h>
-@@ -75,10 +76,17 @@ int sys_support = 0;
- #else
- int sys_support = 0;
- #endif
-+#else
-+int sys_support = 0;
-+#endif
-
-+#if defined(__GLIBC__)
- #if !(__GLIBC_PREREQ(2, 7))
- #define CPU_FREE(ptr) free(ptr)
- #endif
-+#else
-+#define CPU_FREE(ptr) free(ptr)
-+#endif
-
- void cleanup(void);
- void setup(void);
-@@ -164,9 +172,14 @@ static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
- {
- #if defined(__i386__)
- return syscall(318, cpu_id, node_id, cache_struct);
--#elif __GLIBC_PREREQ(2,6)
-+#if defined(__GLIBC__)
-+#if __GLIBC_PREREQ(2,6)
-+ *cpu_id = sched_getcpu();
-+#endif
-+#else
- *cpu_id = sched_getcpu();
- #endif
-+#endif
- return 0;
- }
-
-@@ -191,15 +204,20 @@ unsigned int set_cpu_affinity(void)
- cpu_set_t *set;
- size_t size;
- int nrcpus = 1024;
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- realloc:
- set = CPU_ALLOC(nrcpus);
- #else
- set = malloc(sizeof(cpu_set_t));
- #endif
-+#else
-+ set = malloc(sizeof(cpu_set_t));
-+#endif
- if (set == NULL) {
- tst_brkm(TFAIL, NULL, "CPU_ALLOC:errno:%d", errno);
- }
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- size = CPU_ALLOC_SIZE(nrcpus);
- CPU_ZERO_S(size, set);
-@@ -207,8 +225,13 @@ realloc:
- size = sizeof(cpu_set_t);
- CPU_ZERO(set);
- #endif
-+#else
-+ size = sizeof(cpu_set_t);
-+ CPU_ZERO(set);
-+#endif
- if (sched_getaffinity(0, size, set) < 0) {
- CPU_FREE(set);
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- if (errno == EINVAL && nrcpus < (1024 << 8)) {
- nrcpus = nrcpus << 2;
-@@ -220,10 +243,17 @@ realloc:
- "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)");
- else
- #endif
-+#else
-+ if (errno == EINVAL)
-+ tst_resm(TFAIL,
-+ "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)");
-+ else
-+#endif
- tst_resm(TFAIL, "sched_getaffinity:errno:%d", errno);
- tst_exit();
- }
- cpu_max = max_cpuid(size, set);
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- CPU_ZERO_S(size, set);
- CPU_SET_S(cpu_max, size, set);
-@@ -231,6 +261,10 @@ realloc:
- CPU_ZERO(set);
- CPU_SET(cpu_max, set);
- #endif
-+#else
-+ CPU_ZERO(set);
-+ CPU_SET(cpu_max, set);
-+#endif
- if (sched_setaffinity(0, size, set) < 0) {
- CPU_FREE(set);
- tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno);
-@@ -247,11 +281,15 @@ unsigned int max_cpuid(size_t size, cpu_set_t * set)
- {
- unsigned int index, max = 0;
- for (index = 0; index < size * BITS_PER_BYTE; index++)
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- if (CPU_ISSET_S(index, size, set))
- #else
- if (CPU_ISSET(index, set))
- #endif
-+#else
-+ if (CPU_ISSET(index, set))
-+#endif
- max = index;
- return max;
- }
-diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
-index 9d6a81a..4ed13b2 100644
---- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
-+++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
-@@ -66,9 +66,11 @@ do { \
- tst_resm((TEST_RETURN == -1 ? TPASS : TFAIL) | TTERRNO, #t); \
- } while (0)
-
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if !(__GLIBC_PREREQ(2, 7))
- #define CPU_FREE(ptr) free(ptr)
- #endif
-+#endif
-
- int main(int ac, char **av)
- {
-@@ -95,14 +97,19 @@ static void do_test(void)
- pid_t unused_pid;
- unsigned len;
-
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- realloc:
- mask = CPU_ALLOC(nrcpus);
- #else
- mask = malloc(sizeof(cpu_set_t));
- #endif
-+#else
-+ mask = malloc(sizeof(cpu_set_t));
-+#endif
- if (mask == NULL)
- tst_brkm(TFAIL | TTERRNO, cleanup, "fail to get enough memory");
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- len = CPU_ALLOC_SIZE(nrcpus);
- CPU_ZERO_S(len, mask);
-@@ -110,10 +117,15 @@ realloc:
- len = sizeof(cpu_set_t);
- CPU_ZERO(mask);
- #endif
-+#else
-+ len = sizeof(cpu_set_t);
-+ CPU_ZERO(mask);
-+#endif
- /* positive test */
- TEST(sched_getaffinity(0, len, mask));
- if (TEST_RETURN == -1) {
- CPU_FREE(mask);
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- if (errno == EINVAL && nrcpus < (1024 << 8)) {
- nrcpus = nrcpus << 2;
-@@ -125,17 +137,27 @@ realloc:
- "newer glibc(>= 2.7)");
- else
- #endif
-+#else
-+ if (errno == EINVAL)
-+ tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a "
-+ "newer glibc(>= 2.7)");
-+ else
-+#endif
- tst_resm(TFAIL | TTERRNO, "fail to get cpu affinity");
- cleanup();
- } else {
- tst_resm(TINFO, "cpusetsize is %d", len);
- tst_resm(TINFO, "mask.__bits[0] = %lu ", mask->__bits[0]);
- for (i = 0; i < num; i++) {
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- TEST(CPU_ISSET_S(i, len, mask));
- #else
- TEST(CPU_ISSET(i, mask));
- #endif
-+#else
-+ TEST(CPU_ISSET(i, mask));
-+#endif
- if (TEST_RETURN != -1)
- tst_resm(TPASS, "sched_getaffinity() succeed, "
- "this process %d is running "
-@@ -143,11 +165,15 @@ realloc:
- }
- }
-
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- CPU_ZERO_S(len, mask);
- #else
- CPU_ZERO(mask);
- #endif
-+#else
-+ CPU_ZERO(mask);
-+#endif
- /* negative tests */
- QUICK_TEST(sched_getaffinity(0, len, (cpu_set_t *) - 1));
- QUICK_TEST(sched_getaffinity(0, 0, mask));
---
-1.9.1
-
diff --git a/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch b/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
new file mode 100644
index 0000000000..b46325eaf3
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
@@ -0,0 +1,41 @@
+From aa7a9185a037ad59012bd46713ac340458e95209 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Fri, 13 May 2016 11:11:28 -0500
+Subject: [PATCH] testcases/network/nfsv4/acl/acl1.c: Security fix on
+ string printf
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+acl1.c: In function 'test_acl_default':
+acl1.c:317:2: error: format not a string literal and no format arguments
+[-Werror=format-security]
+ printf(cmd);
+
+[YOCTO #9548]
+
+Upstream-Status: Pending
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+---
+ testcases/network/nfsv4/acl/acl1.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
+index bdf0180..898b7ca 100644
+--- a/testcases/network/nfsv4/acl/acl1.c
++++ b/testcases/network/nfsv4/acl/acl1.c
+@@ -303,7 +303,7 @@ void test_acl_default(char *dir, acl_t acl)
+ char *cmd = malloc(256);
+
+ strcpy(cmd, "chmod 7777 ");
+- printf(cmd);
++ printf(cmd, NULL);
+ strcat(cmd, dir);
+ system(cmd);
+ acl2 = acl_get_file(path, ACL_TYPE_ACCESS);
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch b/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch
deleted file mode 100644
index e58e5a96b0..0000000000
--- a/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch
+++ /dev/null
@@ -1,270 +0,0 @@
-From 4ba19d64e95a874995d0b554b891b5ec35bd9495 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 19:45:35 +0000
-Subject: [PATCH 09/32] Guard error.h with __GLIBC__
-
-error API is specific to glibc so use the guard to make it conditional
-on glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/faccessat/faccessat01.c | 2 ++
- testcases/kernel/syscalls/fallocate/fallocate01.c | 2 ++
- testcases/kernel/syscalls/fchmodat/fchmodat01.c | 2 ++
- testcases/kernel/syscalls/fchownat/fchownat01.c | 2 ++
- testcases/kernel/syscalls/fchownat/fchownat02.c | 2 ++
- testcases/kernel/syscalls/fstatat/fstatat01.c | 2 ++
- testcases/kernel/syscalls/futimesat/futimesat01.c | 2 ++
- testcases/kernel/syscalls/linkat/linkat01.c | 2 ++
- testcases/kernel/syscalls/linkat/linkat02.c | 2 ++
- testcases/kernel/syscalls/mkdirat/mkdirat01.c | 2 ++
- testcases/kernel/syscalls/mknodat/mknodat01.c | 2 ++
- testcases/kernel/syscalls/mknodat/mknodat02.c | 2 ++
- testcases/kernel/syscalls/openat/openat01.c | 2 ++
- testcases/kernel/syscalls/readlinkat/readlinkat01.c | 2 ++
- testcases/kernel/syscalls/renameat/renameat01.c | 2 ++
- testcases/kernel/syscalls/symlinkat/symlinkat01.c | 2 ++
- testcases/kernel/syscalls/unlinkat/unlinkat01.c | 2 ++
- 17 files changed, 34 insertions(+)
-
-diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
-index 7f0e87a..c72dcf0 100644
---- a/testcases/kernel/syscalls/faccessat/faccessat01.c
-+++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
-@@ -37,7 +37,9 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/fallocate/fallocate01.c b/testcases/kernel/syscalls/fallocate/fallocate01.c
-index e72b123..643c0e2 100644
---- a/testcases/kernel/syscalls/fallocate/fallocate01.c
-+++ b/testcases/kernel/syscalls/fallocate/fallocate01.c
-@@ -96,7 +96,9 @@
- #include <fcntl.h>
- #include <sys/syscall.h>
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <inttypes.h>
- #include <sys/utsname.h>
-
-diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
-index 19e9ad5..ae6d807 100644
---- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
-+++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
-@@ -37,7 +37,9 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c
-index b361253..a5218af 100644
---- a/testcases/kernel/syscalls/fchownat/fchownat01.c
-+++ b/testcases/kernel/syscalls/fchownat/fchownat01.c
-@@ -28,7 +28,9 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/fchownat/fchownat02.c b/testcases/kernel/syscalls/fchownat/fchownat02.c
-index 6b0304c..8d2863f 100644
---- a/testcases/kernel/syscalls/fchownat/fchownat02.c
-+++ b/testcases/kernel/syscalls/fchownat/fchownat02.c
-@@ -26,7 +26,9 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c
-index 61531c6..e99fbd2 100644
---- a/testcases/kernel/syscalls/fstatat/fstatat01.c
-+++ b/testcases/kernel/syscalls/fstatat/fstatat01.c
-@@ -48,7 +48,9 @@
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <fcntl.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c
-index ae8d4fe..316dd78 100644
---- a/testcases/kernel/syscalls/futimesat/futimesat01.c
-+++ b/testcases/kernel/syscalls/futimesat/futimesat01.c
-@@ -37,7 +37,9 @@
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <fcntl.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c
-index fc0687b..83cbfe7 100644
---- a/testcases/kernel/syscalls/linkat/linkat01.c
-+++ b/testcases/kernel/syscalls/linkat/linkat01.c
-@@ -49,7 +49,9 @@
- #include <sys/time.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/linkat/linkat02.c b/testcases/kernel/syscalls/linkat/linkat02.c
-index e9a752a..8d7e431 100644
---- a/testcases/kernel/syscalls/linkat/linkat02.c
-+++ b/testcases/kernel/syscalls/linkat/linkat02.c
-@@ -23,7 +23,9 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/mkdirat/mkdirat01.c b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
-index 7e15947..1dbc038 100644
---- a/testcases/kernel/syscalls/mkdirat/mkdirat01.c
-+++ b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
-@@ -30,7 +30,9 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
-index 26e5538..f034f05 100644
---- a/testcases/kernel/syscalls/mknodat/mknodat01.c
-+++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
-@@ -29,7 +29,9 @@
- #include <sys/types.h>
- #include <fcntl.h>
- #include <sys/stat.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c
-index f6368fa..7d0f7c0 100644
---- a/testcases/kernel/syscalls/mknodat/mknodat02.c
-+++ b/testcases/kernel/syscalls/mknodat/mknodat02.c
-@@ -29,7 +29,9 @@
- #include <sys/types.h>
- #include <fcntl.h>
- #include <sys/stat.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/openat/openat01.c b/testcases/kernel/syscalls/openat/openat01.c
-index 85f9a91..4ee0117 100644
---- a/testcases/kernel/syscalls/openat/openat01.c
-+++ b/testcases/kernel/syscalls/openat/openat01.c
-@@ -29,7 +29,9 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/readlinkat/readlinkat01.c b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
-index 97a49e8..b162853 100644
---- a/testcases/kernel/syscalls/readlinkat/readlinkat01.c
-+++ b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
-@@ -29,7 +29,9 @@
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <fcntl.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
-index f4cd51b..105a05b 100644
---- a/testcases/kernel/syscalls/renameat/renameat01.c
-+++ b/testcases/kernel/syscalls/renameat/renameat01.c
-@@ -42,7 +42,9 @@
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <fcntl.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
-index 5c238d8..cb7a7e8 100644
---- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c
-+++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
-@@ -37,7 +37,9 @@
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <fcntl.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-diff --git a/testcases/kernel/syscalls/unlinkat/unlinkat01.c b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
-index 31fe4e7..26f6d9a 100644
---- a/testcases/kernel/syscalls/unlinkat/unlinkat01.c
-+++ b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
-@@ -37,7 +37,9 @@
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <fcntl.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#endif
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch b/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
new file mode 100644
index 0000000000..d32ac1dd7c
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
@@ -0,0 +1,68 @@
+From a8715a1446305ffd76406f63c7f160c13a5b2e72 Mon Sep 17 00:00:00 2001
+From: "Hongzhi.Song" <hongzhi.song@windriver.com>
+Date: Wed, 10 Oct 2018 22:07:05 -0400
+Subject: [PATCH] open_posix_testsuite/mmap24-2: Relax condition a bit
+
+Mips will return EINVAL instead of ENOMEM as expected
+if the range [addr + len) exceeds TASK_SIZE.
+
+Linux kernel code: arch/mips/mm/mmap.c
+if (flags & MAP_FIXED) {
+ /* Even MAP_FIXED mappings must reside within TASK_SIZE */
+ if (TASK_SIZE - len < addr)
+ return -EINVAL;
+
+Relax the condition and accept both ENOMEM and EINVAL
+as expected outcome.
+
+Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2018-October/009624.html]
+
+Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
+---
+ .../open_posix_testsuite/conformance/interfaces/mmap/24-2.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
+index 9cf83d9..55090a6 100644
+--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
++++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
+@@ -7,7 +7,7 @@
+ * source tree.
+ *
+ * The mmap() function shall fail if:
+- * [ENOMEM] MAP_FIXED was specified,
++ * [ENOMEM or EINVAL] MAP_FIXED was specified,
+ * and the range [addr,addr+len) exceeds that allowed
+ * for the address space of a process; or, if MAP_FIXED was not specified and
+ * there is insufficient room in the address space to effect the mapping.
+@@ -15,7 +15,7 @@
+ * Test Step:
+ * 1. Map a shared memory object, with size exceeding the value get from
+ * rlim_cur of resource RLIMIT_AS, setting MAP_FIXED;
+- * 3. Should get ENOMEM.
++ * 3. Should get ENOMEM or EINVAL.
+ */
+
+ #include <stdio.h>
+@@ -92,8 +92,8 @@ int main(void)
+ (unsigned long)len);
+ pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd,
+ 0);
+- if (pa == MAP_FAILED && errno == ENOMEM) {
+- printf("Got ENOMEM: %s\nTest PASSED\n", strerror(errno));
++ if (pa == MAP_FAILED && (errno == ENOMEM || errno == EINVAL)) {
++ printf("Got ENOMEM or EINVAL: %s\nTest PASSED\n", strerror(errno));
+ exit(PTS_PASS);
+ }
+
+@@ -102,6 +102,6 @@ int main(void)
+ else
+ munmap(pa, len);
+ close(fd);
+- printf("Test Fail: Did not get ENOMEM as expected\n");
++ printf("Test Failed: Did not get ENOMEM or EINVAL as expected\n");
+ return PTS_FAIL;
+ }
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch b/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
deleted file mode 100644
index 5b0c444be7..0000000000
--- a/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 0130f4146ced320aadb01b22e36b13d269a8ebba Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 19:48:14 +0000
-Subject: [PATCH 10/32] replace __BEGIN_DECLS and __END_DECLS
-
-They are not portable across libc implementations
-therefore replace them with expanded macros
-
-Include <asm-generic/types.h> to get __s32 definitions
-its not a generally available typedef
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/epoll2/include/epoll.h | 8 ++++++--
- utils/sctp/include/netinet/sctp.h | 9 +++++++--
- 2 files changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/epoll2/include/epoll.h b/testcases/kernel/syscalls/epoll2/include/epoll.h
-index be599c7..8cc5e7e 100644
---- a/testcases/kernel/syscalls/epoll2/include/epoll.h
-+++ b/testcases/kernel/syscalls/epoll2/include/epoll.h
-@@ -85,7 +85,9 @@ struct epoll_event
- } EPOLL_PACKED;
-
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Creates an epoll instance. Returns an fd for the new instance.
- The "size" parameter is a hint specifying the number of file
-@@ -114,6 +116,8 @@ extern int epoll_ctl (int __epfd, int __op, int __fd,
- extern int epoll_wait (int __epfd, struct epoll_event *__events,
- int __maxevents, int __timeout) __THROW;
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-
- #endif /* sys/epoll.h */
-diff --git a/utils/sctp/include/netinet/sctp.h b/utils/sctp/include/netinet/sctp.h
-index 51f5bfb..c61aef3 100644
---- a/utils/sctp/include/netinet/sctp.h
-+++ b/utils/sctp/include/netinet/sctp.h
-@@ -35,9 +35,12 @@
-
- #include <stdint.h>
- #include <linux/types.h>
-+#include <asm-generic/types.h>
- #include <sys/socket.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- typedef __s32 sctp_assoc_t;
-
-@@ -862,6 +865,8 @@ int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
- /* Return the address length for an address family. */
- int sctp_getaddrlen(sa_family_t family);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-
- #endif /* __linux_sctp_h__ */
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch b/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch
new file mode 100644
index 0000000000..8704e5ffe8
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch
@@ -0,0 +1,82 @@
+From 794933b38354a2612cf2c471f11798b306f35315 Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Mon, 20 May 2019 20:47:20 +0200
+Subject: [PATCH] shmctl01: don't use hardcoded index == 0 for SHM_STAT test
+
+Test fails on SHM_STAT testcase:
+ shmctl01 5 TFAIL : shmctl01.c:173: shmctl01 call failed
+ errno = 22 : Invalid argument
+ shmctl(0, SHM_STAT, 0x601060) = -EINVAL
+
+since following commit:
+ commit 99db46ea292780cd978d56932d9445b1e8bdafe8
+ Author: Manfred Spraul <manfred@colorfullife.com>
+ Date: Tue May 14 15:46:36 2019 -0700
+ ipc: do cyclic id allocation for the ipc object.
+
+Don't rely on index 0 being always available, but instead
+use (maximum) index returned by SHM_INFO.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Reviewed-by: Petr Vorel <pvorel@suse.cz>
+Acked-by: Cyril Hrubis <chrubis@suse.cz>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/db0a43d9388be2c347a8306751bbe6bec086d062]
+
+Signed-off-by: Hongzhi Song <hongzhi.song@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 21 ++++++++++++++++++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
+index 1b46977..52bf23a 100644
+--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
++++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
+@@ -79,6 +79,7 @@ static void func_info(int ret);
+
+ /* Check routine for SHM_STAT */
+ static void func_sstat(int ret);
++static void func_sstat_setup(void);
+
+ /* Check routine for SHM_LOCK */
+ static void func_lock(int ret);
+@@ -110,7 +111,7 @@ static struct test_case_t {
+ #endif
+ {&shm_id_1, IPC_SET, &buf, func_set, set_setup},
+ {&shm_id_1, IPC_INFO, (struct shmid_ds *) &info, func_info, NULL},
+- {&shm_index, SHM_STAT, &buf, func_sstat, NULL},
++ {&shm_index, SHM_STAT, &buf, func_sstat, func_sstat_setup},
+ {&shm_id_1, SHM_LOCK, NULL, func_lock, NULL},
+ {&shm_id_1, SHM_UNLOCK, NULL, func_unlock, NULL},
+ {&shm_id_1, IPC_RMID, NULL, func_rmid, NULL},
+@@ -407,9 +408,23 @@ static void func_info(int ret)
+ static void func_sstat(int ret)
+ {
+ if (ret >= 0)
+- tst_resm(TPASS, "get correct shared memory id");
++ tst_resm(TPASS, "get correct shared memory id for index: %d",
++ shm_index);
+ else
+- tst_resm(TFAIL, "shared memory id is incorrect");
++ tst_resm(TFAIL, "shared memory id is incorrect, index: %d",
++ shm_index);
++}
++
++static void func_sstat_setup(void)
++{
++ struct shm_info tmp;
++ int ret;
++
++ ret = shmctl(shm_id_1, SHM_INFO, (void *)&tmp);
++ if (ret < 0)
++ tst_resm(TFAIL|TERRNO, "shmctl(SHM_INFO)");
++ else
++ shm_index = ret;
+ }
+
+ static void func_lock(int ret)
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch b/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
deleted file mode 100644
index 945280c627..0000000000
--- a/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From aff0e2a8f011fa80b472355355a7e8cdacd50189 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 19:53:30 +0000
-Subject: [PATCH 11/32] Rename sigset variable to sigset1
-
-sigset API from signal.h is shadowed by this name conflict
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/mem/shmt/shmt04.c | 10 +++++-----
- testcases/kernel/mem/shmt/shmt06.c | 10 +++++-----
- testcases/kernel/syscalls/sigprocmask/sigprocmask01.c | 10 +++++-----
- 3 files changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
-index 7203e9e..fce87d6 100644
---- a/testcases/kernel/mem/shmt/shmt04.c
-+++ b/testcases/kernel/mem/shmt/shmt04.c
-@@ -56,7 +56,7 @@ int TST_TOTAL = 2; /* Total number of test cases. */
- /**************/
-
- key_t key;
--sigset_t sigset;
-+sigset_t sigset1;
-
- #define SIZE 16*1024
-
-@@ -71,9 +71,9 @@ int main(void)
-
- key = (key_t) getpid();
-
-- sigemptyset(&sigset);
-- sigaddset(&sigset, SIGUSR1);
-- sigprocmask(SIG_BLOCK, &sigset, NULL);
-+ sigemptyset(&sigset1);
-+ sigaddset(&sigset1, SIGUSR1);
-+ sigprocmask(SIG_BLOCK, &sigset1, NULL);
-
- pid = fork();
- switch (pid) {
-@@ -148,7 +148,7 @@ int child(void)
- char *cp;
- int sig;
-
-- sigwait(&sigset, &sig);
-+ sigwait(&sigset1, &sig);
- chld_pid = getpid();
- /*--------------------------------------------------------*/
-
-diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
-index a3c9ca3..77b0fc9 100644
---- a/testcases/kernel/mem/shmt/shmt06.c
-+++ b/testcases/kernel/mem/shmt/shmt06.c
-@@ -57,7 +57,7 @@ int TST_TOTAL = 2; /* Total number of test cases. */
- /**************/
-
- key_t key;
--sigset_t sigset;
-+sigset_t sigset1;
-
- int child();
- static int rm_shm(int);
-@@ -70,9 +70,9 @@ int main(void)
-
- key = (key_t) getpid();
-
-- sigemptyset(&sigset);
-- sigaddset(&sigset, SIGUSR1);
-- sigprocmask(SIG_BLOCK, &sigset, NULL);
-+ sigemptyset(&sigset1);
-+ sigaddset(&sigset1, SIGUSR1);
-+ sigprocmask(SIG_BLOCK, &sigset1, NULL);
-
- pid = fork();
- switch (pid) {
-@@ -147,7 +147,7 @@ int child(void)
- char *cp;
- int sig;
-
-- sigwait(&sigset, &sig);
-+ sigwait(&sigset1, &sig);
- chld_pid = getpid();
-
- if ((shmid = shmget(key, SIZE, 0)) < 0) {
-diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-index 20fca52..6fb1d57 100644
---- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-+++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-@@ -91,7 +91,7 @@ int TST_TOTAL = 1;
- int sig_catch = 0; /* variable to blocked/unblocked signals */
-
- struct sigaction sa_new; /* struct to hold signal info */
--sigset_t sigset; /* signal set to hold signal lists */
-+sigset_t sigset1; /* signal set to hold signal lists */
- sigset_t sigset2;
-
- int main(int ac, char **av)
-@@ -112,7 +112,7 @@ int main(int ac, char **av)
- * so that, signal will not be delivered to
- * the test process.
- */
-- TEST(sigprocmask(SIG_BLOCK, &sigset, 0));
-+ TEST(sigprocmask(SIG_BLOCK, &sigset1, 0));
-
- /* Get the process id of test process */
- my_pid = getpid();
-@@ -165,7 +165,7 @@ int main(int ac, char **av)
- */
- errno = 0;
- if (sigprocmask(SIG_UNBLOCK,
-- &sigset, 0) == -1) {
-+ &sigset1, 0) == -1) {
- tst_brkm(TFAIL, cleanup,
- "sigprocmask() failed "
- "to unblock signal, "
-@@ -212,7 +212,7 @@ void setup(void)
- * Initialise the signal sets with the list that
- * excludes/includes all system-defined signals.
- */
-- if (sigemptyset(&sigset) == -1) {
-+ if (sigemptyset(&sigset1) == -1) {
- tst_brkm(TFAIL, cleanup,
- "sigemptyset() failed, errno=%d : %s",
- errno, strerror(errno));
-@@ -235,7 +235,7 @@ void setup(void)
- * Add specified signal (SIGINT) to the signal set
- * which excludes system-defined signals.
- */
-- if (sigaddset(&sigset, SIGINT) == -1) {
-+ if (sigaddset(&sigset1, SIGINT) == -1) {
- tst_brkm(TFAIL, cleanup,
- "sigaddset() failed, errno=%d : %s",
- errno, strerror(errno));
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch b/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch
new file mode 100644
index 0000000000..9cd188f656
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch
@@ -0,0 +1,56 @@
+From f210d7e19b721041f31b7f258a169f89dc850303 Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Thu, 4 Jul 2019 16:45:23 +0200
+Subject: [PATCH] direct_io/diotest4: drop MAP_FIXED
+
+Hongzhi reports that this test is failing on mips64 with 5.1+:
+ diotest4 10 TBROK : diotest4.c:368: can't mmap file: Invalid argument
+ diotest4 11 TBROK : diotest4.c:368: Remaining cases broken
+I could reproduce it on emulated 5kc-malta, running 5.2.0-rc7.
+
+Test is trying to map into area immediately following heap as MAP_SHARED,
+but it used wrong alignment (fixed by 'lapi/mmap.h: include config.h').
+
+Usage of MAP_FIXED seems unnecessary, so drop that too and let the kernel
+pick an address.
+
+Reported-by: Hongzhi.Song <hongzhi.song@windriver.com>
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Acked-by: Cyril Hrubis <chrubis@suse.cz>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/f5444eeeabf252b8884b9465d277b6af853819e3]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/kernel/io/direct_io/diotest4.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
+index e4616e4..bf200cd 100644
+--- a/testcases/kernel/io/direct_io/diotest4.c
++++ b/testcases/kernel/io/direct_io/diotest4.c
+@@ -352,18 +352,14 @@ int main(int argc, char *argv[])
+ total++;
+
+ /* Test-10: read, write to a mmaped file */
+- shm_base = (char *)(((long)sbrk(0) + (shmsz - 1)) & ~(shmsz - 1));
+- if (shm_base == NULL) {
+- tst_brkm(TBROK, cleanup, "sbrk failed: %s", strerror(errno));
+- }
+ offset = 4096;
+ count = bufsize;
+ if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) {
+ tst_brkm(TBROK, cleanup, "can't open %s: %s",
+ filename, strerror(errno));
+ }
+- shm_base = mmap(shm_base, 0x100000, PROT_READ | PROT_WRITE,
+- MAP_SHARED | MAP_FIXED, fd, 0);
++ shm_base = mmap(0, 0x100000, PROT_READ | PROT_WRITE,
++ MAP_SHARED, fd, 0);
+ if (shm_base == (caddr_t) - 1) {
+ tst_brkm(TBROK, cleanup, "can't mmap file: %s",
+ strerror(errno));
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch b/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
deleted file mode 100644
index e1532c1fc9..0000000000
--- a/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
+++ /dev/null
@@ -1,351 +0,0 @@
-From 54e098a366a1d773c4d7d4124f2f5aab976681c3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 19:58:08 +0000
-Subject: [PATCH 12/32] fsstress.c: Replace __int64_t with int64_t
-
-int64_t is defined in ISO C99
-include limits.h to get defintions of PATH_MAX
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/fs/fsstress/fsstress.c | 31 +++++++++---------
- testcases/network/nfs/nfs_fsstress/fsstress.c | 47 ++++++++++++++-------------
- 2 files changed, 40 insertions(+), 38 deletions(-)
-
-diff --git a/testcases/kernel/fs/fsstress/fsstress.c b/testcases/kernel/fs/fsstress/fsstress.c
-index 2f89903..89f0b19 100644
---- a/testcases/kernel/fs/fsstress/fsstress.c
-+++ b/testcases/kernel/fs/fsstress/fsstress.c
-@@ -36,6 +36,7 @@
- #ifdef HAVE_SYS_PRCTL_H
- # include <sys/prctl.h>
- #endif
-+#include <limits.h>
-
- #define XFS_ERRTAG_MAX 17
-
-@@ -1572,7 +1573,7 @@ void bulkstat_f(int opno, long r)
- __u64 last;
- __s32 nent;
- xfs_bstat_t *t;
-- __int64_t total;
-+ int64_t total;
- xfs_fsop_bulkreq_t bsr;
-
- last = 0;
-@@ -1764,14 +1765,14 @@ int setdirect(int fd)
-
- void dread_f(int opno, long r)
- {
-- __int64_t align;
-+ int64_t align;
- char *buf = NULL;
- struct dioattr diob;
- int e;
- pathname_t f;
- int fd;
- size_t len;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -1835,8 +1836,8 @@ void dread_f(int opno, long r)
- return;
- }
- #endif
-- align = (__int64_t) diob.d_miniosz;
-- lr = ((__int64_t) random() << 32) + random();
-+ align = (int64_t) diob.d_miniosz;
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % stb.st_size);
- off -= (off % align);
- lseek64(fd, off, SEEK_SET);
-@@ -1865,14 +1866,14 @@ void dread_f(int opno, long r)
-
- void dwrite_f(int opno, long r)
- {
-- __int64_t align;
-+ int64_t align;
- char *buf = NULL;
- struct dioattr diob;
- int e;
- pathname_t f;
- int fd;
- size_t len;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -1925,8 +1926,8 @@ void dwrite_f(int opno, long r)
- return;
- }
- #endif
-- align = (__int64_t) diob.d_miniosz;
-- lr = ((__int64_t) random() << 32) + random();
-+ align = (int64_t) diob.d_miniosz;
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off -= (off % align);
- lseek64(fd, off, SEEK_SET);
-@@ -2224,7 +2225,7 @@ void read_f(int opno, long r)
- pathname_t f;
- int fd;
- size_t len;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -2262,7 +2263,7 @@ void read_f(int opno, long r)
- close(fd);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % stb.st_size);
- lseek64(fd, off, SEEK_SET);
- len = (random() % (getpagesize() * 32)) + 1;
-@@ -2509,7 +2510,7 @@ void truncate_f(int opno, long r)
- {
- int e;
- pathname_t f;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -2530,7 +2531,7 @@ void truncate_f(int opno, long r)
- free_pathname(&f);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
- off %= maxfsize;
- e = truncate64_path(&f, off) < 0 ? errno : 0;
-@@ -2626,7 +2627,7 @@ void write_f(int opno, long r)
- pathname_t f;
- int fd;
- size_t len;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -2656,7 +2657,7 @@ void write_f(int opno, long r)
- close(fd);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off %= maxfsize;
- lseek64(fd, off, SEEK_SET);
-diff --git a/testcases/network/nfs/nfs_fsstress/fsstress.c b/testcases/network/nfs/nfs_fsstress/fsstress.c
-index ac91262..a34c416 100644
---- a/testcases/network/nfs/nfs_fsstress/fsstress.c
-+++ b/testcases/network/nfs/nfs_fsstress/fsstress.c
-@@ -31,6 +31,7 @@
- */
-
- #include "global.h"
-+#include <limits.h>
-
- #define XFS_ERRTAG_MAX 17
-
-@@ -1368,7 +1369,7 @@ void allocsp_f(int opno, long r)
- pathname_t f;
- int fd;
- struct flock64 fl;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -1398,7 +1399,7 @@ void allocsp_f(int opno, long r)
- close(fd);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off %= maxfsize;
- fl.l_whence = SEEK_SET;
-@@ -1519,7 +1520,7 @@ void bulkstat_f(int opno, long r)
- __uint64_t last;
- int nent;
- xfs_bstat_t *t;
-- __int64_t total;
-+ int64_t total;
- xfs_fsop_bulkreq_t bsr;
-
- last = 0;
-@@ -1708,14 +1709,14 @@ int setdirect(int fd)
-
- void dread_f(int opno, long r)
- {
-- __int64_t align;
-+ int64_t align;
- char *buf;
- struct dioattr diob;
- int e;
- pathname_t f;
- int fd;
- size_t len;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -1775,8 +1776,8 @@ void dread_f(int opno, long r)
- return;
- }
- #endif
-- align = (__int64_t) diob.d_miniosz;
-- lr = ((__int64_t) random() << 32) + random();
-+ align = (int64_t) diob.d_miniosz;
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % stb.st_size);
- off -= (off % align);
- lseek64(fd, off, SEEK_SET);
-@@ -1798,14 +1799,14 @@ void dread_f(int opno, long r)
-
- void dwrite_f(int opno, long r)
- {
-- __int64_t align;
-+ int64_t align;
- char *buf;
- struct dioattr diob;
- int e;
- pathname_t f;
- int fd;
- size_t len;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -1854,8 +1855,8 @@ void dwrite_f(int opno, long r)
- return;
- }
- #endif
-- align = (__int64_t) diob.d_miniosz;
-- lr = ((__int64_t) random() << 32) + random();
-+ align = (int64_t) diob.d_miniosz;
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off -= (off % align);
- lseek64(fd, off, SEEK_SET);
-@@ -1917,7 +1918,7 @@ void freesp_f(int opno, long r)
- pathname_t f;
- int fd;
- struct flock64 fl;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -1947,7 +1948,7 @@ void freesp_f(int opno, long r)
- close(fd);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off %= maxfsize;
- fl.l_whence = SEEK_SET;
-@@ -2145,7 +2146,7 @@ void read_f(int opno, long r)
- pathname_t f;
- int fd;
- size_t len;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -2183,7 +2184,7 @@ void read_f(int opno, long r)
- close(fd);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % stb.st_size);
- lseek64(fd, off, SEEK_SET);
- len = (random() % (getpagesize() * 32)) + 1;
-@@ -2281,7 +2282,7 @@ void resvsp_f(int opno, long r)
- pathname_t f;
- int fd;
- struct flock64 fl;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -2311,7 +2312,7 @@ void resvsp_f(int opno, long r)
- close(fd);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off %= maxfsize;
- fl.l_whence = SEEK_SET;
-@@ -2428,7 +2429,7 @@ void truncate_f(int opno, long r)
- {
- int e;
- pathname_t f;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -2449,7 +2450,7 @@ void truncate_f(int opno, long r)
- free_pathname(&f);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off %= maxfsize;
- e = truncate64_path(&f, off) < 0 ? errno : 0;
-@@ -2491,7 +2492,7 @@ void unresvsp_f(int opno, long r)
- pathname_t f;
- int fd;
- struct flock64 fl;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -2521,7 +2522,7 @@ void unresvsp_f(int opno, long r)
- close(fd);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off %= maxfsize;
- fl.l_whence = SEEK_SET;
-@@ -2543,7 +2544,7 @@ void write_f(int opno, long r)
- pathname_t f;
- int fd;
- size_t len;
-- __int64_t lr;
-+ int64_t lr;
- off64_t off;
- struct stat64 stb;
- int v;
-@@ -2573,7 +2574,7 @@ void write_f(int opno, long r)
- close(fd);
- return;
- }
-- lr = ((__int64_t) random() << 32) + random();
-+ lr = ((int64_t) random() << 32) + random();
- off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- off %= maxfsize;
- lseek64(fd, off, SEEK_SET);
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch b/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
new file mode 100644
index 0000000000..aecbc80e9b
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
@@ -0,0 +1,64 @@
+From 4ac747c1f7ff8e2ec2567d6672822e95a9b56e55 Mon Sep 17 00:00:00 2001
+From: "Hongzhi.Song" <hongzhi.song@windriver.com>
+Date: Mon, 15 Jul 2019 03:39:06 -0400
+Subject: [PATCH] getrlimit03: adjust a bit of code to compatiable with mips32
+
+Error info:
+getrlimit03.c:104: FAIL: __NR_prlimit64(0) had rlim_cur =
+ffffffffffffffff but __NR_getrlimit(0) had rlim_cur = 7fffffff
+
+According to kernel code: [arch/mips/include/uapi/asm/resource.h]
+RLIM_INFINITY is set to 0x7fffffffUL instead of ULONG_MAX on mips32.
+
+ /*
+ * SuS says limits have to be unsigned.
+ * Which makes a ton more sense anyway,
+ * but we keep the old value on MIPS32,
+ * for compatibility:
+ */
+ #ifndef __mips64
+ # define RLIM_INFINITY 0x7fffffffUL
+ #endif
+
+Adding conditional statement about mips to fix this.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/7a3bca63cd7f059d490b6274f0fdf3247be93fde]
+
+Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
+---
+ testcases/kernel/syscalls/getrlimit/getrlimit03.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/getrlimit/getrlimit03.c b/testcases/kernel/syscalls/getrlimit/getrlimit03.c
+index e4d56c4..319bc49 100644
+--- a/testcases/kernel/syscalls/getrlimit/getrlimit03.c
++++ b/testcases/kernel/syscalls/getrlimit/getrlimit03.c
+@@ -26,6 +26,7 @@
+
+ #include "tst_test.h"
+ #include "lapi/syscalls.h"
++#include "lapi/abisize.h"
+
+ /**
+ * Linux provides an "old" getrlimit syscall handler that uses signed long,
+@@ -61,7 +62,12 @@ struct rlimit_ulong {
+ unsigned long rlim_cur;
+ unsigned long rlim_max;
+ };
+-const unsigned long RLIM_INFINITY_UL = ULONG_MAX;
++
++#if defined(__mips__) && defined(TST_ABI32)
++ const unsigned long RLIM_INFINITY_UL = 0x7fffffffUL;
++#else
++ const unsigned long RLIM_INFINITY_UL = ULONG_MAX;
++#endif
+
+ static int getrlimit_ulong(int resource, struct rlimit_ulong *rlim)
+ {
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch b/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch
deleted file mode 100644
index 4266e4fc3a..0000000000
--- a/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 1ef8c32317064438ec3b37a114f5d82957f4e0c6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 20:05:54 +0000
-Subject: [PATCH 13/32] include fcntl.h for getting O_* definitions
-
-musl exposes this issue, with glibc fcntl.h is included via some other
-header and this problem remained latent
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/ipc/ipc_stress/shmem_test_03.c | 1 +
- testcases/kernel/syscalls/mq_notify/mq_notify01.c | 1 +
- testcases/network/tcp_cmds/sendfile/testsf_c.c | 1 +
- testcases/network/tcp_cmds/sendfile/testsf_s.c | 1 +
- 4 files changed, 4 insertions(+)
-
-diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_03.c b/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
-index c1b11fd..8be156f 100644
---- a/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
-+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
-@@ -72,6 +72,7 @@
- #include <string.h>
- #include <unistd.h>
- #include <limits.h>
-+#include <fcntl.h>
- #include <sys/file.h>
- #include <sys/ipc.h>
- #include <sys/mman.h>
-diff --git a/testcases/kernel/syscalls/mq_notify/mq_notify01.c b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
-index 4728c70..5c7846c 100644
---- a/testcases/kernel/syscalls/mq_notify/mq_notify01.c
-+++ b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
-@@ -41,6 +41,7 @@
- #include <mqueue.h>
- #include <signal.h>
- #include <stdlib.h>
-+#include <fcntl.h>
-
- #include "../utils/include_j_h.h"
-
-diff --git a/testcases/network/tcp_cmds/sendfile/testsf_c.c b/testcases/network/tcp_cmds/sendfile/testsf_c.c
-index 449784f..38d3274 100644
---- a/testcases/network/tcp_cmds/sendfile/testsf_c.c
-+++ b/testcases/network/tcp_cmds/sendfile/testsf_c.c
-@@ -9,6 +9,7 @@
- #include <sys/types.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <fcntl.h>
- #include <sys/file.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
-diff --git a/testcases/network/tcp_cmds/sendfile/testsf_s.c b/testcases/network/tcp_cmds/sendfile/testsf_s.c
-index 17e98ad..bce8dd1 100644
---- a/testcases/network/tcp_cmds/sendfile/testsf_s.c
-+++ b/testcases/network/tcp_cmds/sendfile/testsf_s.c
-@@ -6,6 +6,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#include <fcntl.h>
- #include <sys/file.h>
- #include <errno.h>
- #include <sys/signal.h>
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch b/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
deleted file mode 100644
index 84d81e9f94..0000000000
--- a/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From d63fefa86dac437c47b9ebbea0a82a1240aaba2c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 20:09:56 +0000
-Subject: [PATCH 14/32] hyperthreading: Include sys/types.h for pid_t
- definition
-
-If sys/types.h is not included then it will not define pid_t_needed
-and therefore typedef wont be included and we get errors about pid_t
-being not known
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h | 1 +
- testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h | 1 +
- testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h | 1 +
- 3 files changed, 3 insertions(+)
-
-diff --git a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
-index 1ec9794..9084aa7 100644
---- a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
-+++ b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
-@@ -3,6 +3,7 @@
- #define _HTUTILS_H_
-
- #include <stdlib.h>
-+#include <sys/types.h>
-
- int is_cmdline_para(const char *para);
-
-diff --git a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
-index 1ec9794..c03a124 100644
---- a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
-+++ b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
-@@ -2,6 +2,7 @@
- #ifndef _HTUTILS_H_
- #define _HTUTILS_H_
-
-+#include <sys/types.h>
- #include <stdlib.h>
-
- int is_cmdline_para(const char *para);
-diff --git a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
-index 2977ad0..6b484e1 100644
---- a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
-+++ b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
-@@ -3,6 +3,7 @@
- #define _HTUTILS_H_
-
- #include <stdlib.h>
-+#include <sys/types.h>
-
- int is_cmdline_para(const char *para);
-
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch b/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
deleted file mode 100644
index 963536f993..0000000000
--- a/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From f091839532f3afe0a58e8ba0b45615c899a43a47 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 20:12:09 +0000
-Subject: [PATCH 15/32] mincore01: Rename PAGESIZE to pagesize
-
-PAGESIZE conflicts with system headers on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/mincore/mincore01.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/mincore/mincore01.c b/testcases/kernel/syscalls/mincore/mincore01.c
-index 97a3d95..fa426d1 100644
---- a/testcases/kernel/syscalls/mincore/mincore01.c
-+++ b/testcases/kernel/syscalls/mincore/mincore01.c
-@@ -45,7 +45,7 @@
- #include "test.h"
- #include "safe_macros.h"
-
--static int PAGESIZE;
-+static int pagesize;
- static rlim_t STACK_LIMIT = 10485760;
-
- static void cleanup(void);
-@@ -146,7 +146,7 @@ static void setup4(struct test_case_t *tc)
- }
-
- tc->addr = global_pointer;
-- tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + PAGESIZE;
-+ tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + pagesize;
- tc->vector = global_vec;
-
- /*
-@@ -161,7 +161,7 @@ static void setup(void)
- char *buf;
- int fd;
-
-- PAGESIZE = getpagesize();
-+ pagesize = getpagesize();
-
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
-@@ -170,7 +170,7 @@ static void setup(void)
- TEST_PAUSE;
-
- /* global_pointer will point to a mmapped area of global_len bytes */
-- global_len = PAGESIZE * 2;
-+ global_len = pagesize * 2;
-
- buf = SAFE_MALLOC(cleanup, global_len);
- memset(buf, 42, global_len);
-@@ -186,7 +186,7 @@ static void setup(void)
- PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-
- global_vec = SAFE_MALLOC(cleanup,
-- (global_len + PAGESIZE - 1) / PAGESIZE);
-+ (global_len + pagesize - 1) / pagesize);
-
- SAFE_CLOSE(cleanup, fd);
- }
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch b/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
deleted file mode 100644
index 1b5b93a4e6..0000000000
--- a/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2b9be924bbad8a1f84ae553fdd1aa8391aa8d2f4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 20:15:07 +0000
-Subject: [PATCH 16/32] ustat: Change header from ustat.h to sys/ustat.h
-
-makes it portable for musl, on glibc ustat.h is just including
-sys/ustat.h too
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/ustat/ustat01.c | 2 +-
- testcases/kernel/syscalls/ustat/ustat02.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
-index 01b7688..494647b 100644
---- a/testcases/kernel/syscalls/ustat/ustat01.c
-+++ b/testcases/kernel/syscalls/ustat/ustat01.c
-@@ -20,8 +20,8 @@
- */
-
- #include <unistd.h>
--#include <ustat.h>
- #include <errno.h>
-+#include <sys/ustat.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include "test.h"
-diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
-index 4e66236..edada31 100644
---- a/testcases/kernel/syscalls/ustat/ustat02.c
-+++ b/testcases/kernel/syscalls/ustat/ustat02.c
-@@ -21,8 +21,8 @@
- */
-
- #include <unistd.h>
--#include <ustat.h>
- #include <errno.h>
-+#include <sys/ustat.h>
- #include <sys/stat.h>
- #include <sys/types.h>
- #include "test.h"
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch b/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch
deleted file mode 100644
index ed25802a0c..0000000000
--- a/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From c882bcd18820b44a685f0d5edd7aaff77a88c912 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 20:17:55 +0000
-Subject: [PATCH 17/32] replace sigval_t with union sigval
-
-This makes it compatible across musl and glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c | 2 +-
- testcases/kernel/syscalls/timer_gettime/timer_gettime01.c | 2 +-
- testcases/kernel/timers/timer_create/timer_create02.c | 4 ++--
- testcases/kernel/timers/timer_create/timer_create03.c | 4 ++--
- 4 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
-index d186c1f..bc03544 100644
---- a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
-+++ b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
-@@ -54,7 +54,7 @@ int main(int ac, char **av)
-
- setup();
-
-- ev.sigev_value = (sigval_t) 0;
-+ ev.sigev_value = (union sigval) 0;
- ev.sigev_signo = SIGALRM;
- ev.sigev_notify = SIGEV_SIGNAL;
- TEST(ltp_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
-diff --git a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
-index b583aee..9371a6a 100644
---- a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
-+++ b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
-@@ -55,7 +55,7 @@ int main(int ac, char **av)
-
- setup();
-
-- ev.sigev_value = (sigval_t) 0;
-+ ev.sigev_value = (union sigval) 0;
- ev.sigev_signo = SIGALRM;
- ev.sigev_notify = SIGEV_SIGNAL;
- TEST(ltp_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
-diff --git a/testcases/kernel/timers/timer_create/timer_create02.c b/testcases/kernel/timers/timer_create/timer_create02.c
-index 7f528ed..1127400 100644
---- a/testcases/kernel/timers/timer_create/timer_create02.c
-+++ b/testcases/kernel/timers/timer_create/timer_create02.c
-@@ -142,7 +142,7 @@ void setup_test(int option)
- {
- switch (option) {
- case 0:
-- evp.sigev_value = (sigval_t) 0;
-+ evp.sigev_value = (union sigval) 0;
- evp.sigev_signo = SIGALRM;
- evp.sigev_notify = SIGEV_SIGNAL;
- evp_ptr = &evp;
-@@ -151,7 +151,7 @@ void setup_test(int option)
- evp_ptr = NULL;
- break;
- case 2:
-- evp.sigev_value = (sigval_t) 0;
-+ evp.sigev_value = (union sigval) 0;
- evp.sigev_signo = SIGALRM; /* any will do */
- evp.sigev_notify = SIGEV_NONE;
- evp_ptr = &evp;
-diff --git a/testcases/kernel/timers/timer_create/timer_create03.c b/testcases/kernel/timers/timer_create/timer_create03.c
-index 291fcfa..8b01bf7 100644
---- a/testcases/kernel/timers/timer_create/timer_create03.c
-+++ b/testcases/kernel/timers/timer_create/timer_create03.c
-@@ -129,7 +129,7 @@ void setup_test(int option)
- {
- switch (option) {
- case 0:
-- evp.sigev_value = (sigval_t) 0;
-+ evp.sigev_value = (union sigval) 0;
- evp.sigev_signo = SIGALRM;
- evp.sigev_notify = SIGEV_SIGNAL;
- evp_ptr = &evp;
-@@ -138,7 +138,7 @@ void setup_test(int option)
- evp_ptr = NULL;
- break;
- case 2:
-- evp.sigev_value = (sigval_t) 0;
-+ evp.sigev_value = (union sigval) 0;
- evp.sigev_signo = SIGALRM; /* any will do */
- evp.sigev_notify = SIGEV_NONE;
- evp_ptr = &evp;
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch b/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch
deleted file mode 100644
index 5198fe9f47..0000000000
--- a/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f42b060e80c9f40627c712d4d56d45221bd7d9fa Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 06:51:20 +0000
-Subject: [PATCH 18/32] guard mallocopt() with __GLIBC__
-
-mallocopt is not available on non glibc implementations
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c
-index 5bb8eff..934d951 100644
---- a/utils/benchmark/ebizzy-0.3/ebizzy.c
-+++ b/utils/benchmark/ebizzy-0.3/ebizzy.c
-@@ -215,10 +215,10 @@ static void read_options(int argc, char *argv[])
- "\"never mmap\" option specified\n");
- usage();
- }
--
-+#ifdef __GLIBC__
- if (never_mmap)
- mallopt(M_MMAP_MAX, 0);
--
-+#endif
- if (chunk_size < record_size) {
- fprintf(stderr, "Chunk size %u smaller than record size %u\n",
- chunk_size, record_size);
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch b/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
deleted file mode 100644
index 0a4c5f0b3c..0000000000
--- a/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 721e94985b9cff3e2724af7ea5be7d005bc12dec Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 06:55:27 +0000
-Subject: [PATCH 19/32] tomoyo: Replace canonicalize_file_name() with
- realpath()
-
-canonicalize_file_name() API is specific to glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
-index da4af0f..5c1a3ca 100644
---- a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
-+++ b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
-@@ -274,9 +274,9 @@ int main(int argc, char *argv[])
- /* Test mount(). */
- {
- static char buf[4096];
-- char *dev_ram_path = canonicalize_file_name("/dev/ram0");
-+ char *dev_ram_path = realpath("/dev/ram0", NULL);
- if (!dev_ram_path)
-- dev_ram_path = canonicalize_file_name("/dev/ram");
-+ dev_ram_path = realpath("/dev/ram", NULL);
- if (!dev_ram_path) {
- dev_ram_path = "/dev/ram0";
- mknod(dev_ram_path, S_IFBLK, MKDEV(1, 0));
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch b/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch
deleted file mode 100644
index 0e4e4586ca..0000000000
--- a/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From aa3568e6ac28f377e75ce16b11e3c7738a373e53 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 06:57:04 +0000
-Subject: [PATCH 20/32] getdents: define getdents/getdents64 only for glibc
-
-getdents/getdents64 are implemented in musl and when we define static
-functions with same name, it errors out.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/getdents/getdents.h | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/getdents/getdents.h b/testcases/kernel/syscalls/getdents/getdents.h
-index abea655..db63d89 100644
---- a/testcases/kernel/syscalls/getdents/getdents.h
-+++ b/testcases/kernel/syscalls/getdents/getdents.h
-@@ -34,12 +34,13 @@ struct linux_dirent {
- char d_name[];
- };
-
-+#ifdef __GLIBC__
- static inline int
- getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int size)
- {
- return ltp_syscall(__NR_getdents, fd, dirp, size);
- }
--
-+#endif
- struct linux_dirent64 {
- uint64_t d_ino;
- int64_t d_off;
-@@ -48,10 +49,11 @@ struct linux_dirent64 {
- char d_name[];
- };
-
-+#ifdef __GLIBC__
- static inline int
- getdents64(unsigned int fd, struct linux_dirent64 *dirp64, unsigned int size)
- {
- return ltp_syscall(__NR_getdents64, fd, dirp64, size);
- }
--
-+#endif
- #endif /* GETDENTS_H */
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch b/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
deleted file mode 100644
index c8cbe580c4..0000000000
--- a/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From b216435bb362df10c45f544b78d8c884eaa901fd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:01:02 +0000
-Subject: [PATCH 21/32] Define _GNU_SOURCE for MREMAP_MAYMOVE definition
-
-musl guards MREMAP_MAYMOVE with _GNU_SOURCE unlike glibc which uses
-__USE_GNU
-
-Fixes errors like
-error: 'MREMAP_MAYMOVE' undeclared (first use in this function)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/mremap/mremap01.c | 4 +++-
- testcases/kernel/syscalls/mremap/mremap02.c | 2 ++
- testcases/kernel/syscalls/mremap/mremap03.c | 2 ++
- 3 files changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c
-index d63d1e4..24ca174 100644
---- a/testcases/kernel/syscalls/mremap/mremap01.c
-+++ b/testcases/kernel/syscalls/mremap/mremap01.c
-@@ -76,10 +76,12 @@
- */
- #include <unistd.h>
- #include <errno.h>
-+#include <fcntl.h>
-+#define _GNU_SOURCE
- #define __USE_GNU
- #include <sys/mman.h>
- #undef __USE_GNU
--#include <fcntl.h>
-+#undef _GNU_SOURCE
-
- #include "test.h"
-
-diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c
-index 5a51b9a..a530a6b 100644
---- a/testcases/kernel/syscalls/mremap/mremap02.c
-+++ b/testcases/kernel/syscalls/mremap/mremap02.c
-@@ -75,9 +75,11 @@
- #include <errno.h>
- #include <unistd.h>
- #include <fcntl.h>
-+#define _GNU_SOURCE
- #define __USE_GNU
- #include <sys/mman.h>
- #undef __USE_GNU
-+#undef _GNU_SOURCE
-
- #include "test.h"
-
-diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c
-index 12e3829..9b39f8b 100644
---- a/testcases/kernel/syscalls/mremap/mremap03.c
-+++ b/testcases/kernel/syscalls/mremap/mremap03.c
-@@ -76,9 +76,11 @@
- #include <errno.h>
- #include <unistd.h>
- #include <fcntl.h>
-+#define _GNU_SOURCE
- #define __USE_GNU
- #include <sys/mman.h>
- #undef __USE_GNU
-+#undef _GNU_SOURCE
-
- #include "test.h"
-
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch b/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch
deleted file mode 100644
index 413b44ac71..0000000000
--- a/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 7ac6fd51991ac61d1d7594f601d87842060ee284 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:06:11 +0000
-Subject: [PATCH 22/32] include sys/types.h
-
-Fixes
-
-error: unknown type name 'uint'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/ipc/ipc_stress/shmem_test_04.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
-index 72c2e60..e7e5f61 100644
---- a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
-+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
-@@ -65,6 +65,7 @@
- #include <signal.h>
- #include <stdint.h>
- #include <sys/mman.h>
-+#include <sys/types.h>
-
- #ifdef _LINUX_
- typedef unsigned long ulong_t;
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch b/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
deleted file mode 100644
index 4680c03d4e..0000000000
--- a/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 560347f77236616a635b4a997a0596b8da4d0799 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:08:25 +0000
-Subject: [PATCH 23/32] ptrace: Use int instead of enum __ptrace_request
-
-__ptrace_request is only available with glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/ptrace/ptrace03.c | 4 ++++
- testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h | 4 ++++
- 2 files changed, 8 insertions(+)
-
-diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
-index a4028fc..f1880cd 100644
---- a/testcases/kernel/syscalls/ptrace/ptrace03.c
-+++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
-@@ -102,7 +102,11 @@ static pid_t unused_pid;
- static pid_t zero_pid;
-
- struct test_case_t {
-+#ifdef __GLIBC__
- enum __ptrace_request request;
-+#else
-+ int request;
-+#endif
- pid_t *pid;
- int exp_errno;
- } test_cases[] = {
-diff --git a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
-index ae538e9..85aa89d 100644
---- a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
-+++ b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
-@@ -130,7 +130,11 @@ static char *strings[] = {
- SPT(KILL)
- SPT(SINGLESTEP)
- };
-+#ifdef __GLIBC__
- static inline char *strptrace(enum __ptrace_request request)
-+#else
-+static inline char *strptrace(int request)
-+#endif
- {
- return strings[request];
- }
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch b/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
deleted file mode 100644
index 03c67a52fa..0000000000
--- a/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From e01e9862c248dc90a8ec6f2d06f8469d7a50cd8e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:14:58 +0000
-Subject: [PATCH 24/32] rt_sigaction/rt_sigprocmark: Define _GNU_SOURCE
-
-Fixes musl build failure e.g.
-error: 'SA_NOMASK' undeclared here (not in a function)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c | 1 +
- testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c | 2 +-
- testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c | 1 +
- testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c | 1 +
- 4 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
-index 5cf89cc..bdcb91a 100644
---- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
-+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
-@@ -28,6 +28,7 @@
- /* sigset_t type. */
- /******************************************************************************/
-
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
-index a1da743..8a27a0f 100644
---- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
-+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
-@@ -23,7 +23,7 @@
- /* Description: This tests the rt_sigaction() syscall */
- /* rt_sigaction Expected EFAULT error check */
- /******************************************************************************/
--
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
-index 175d220..e7627cd 100644
---- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
-+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
-@@ -24,6 +24,7 @@
- /* rt_sigaction Expected EINVAL error check */
- /******************************************************************************/
-
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-diff --git a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
-index 74e5a61..75c57fc 100644
---- a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
-+++ b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
-@@ -39,6 +39,7 @@
- /* sigsetsize should indicate the size of a sigset_t type. */
- /******************************************************************************/
-
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <signal.h>
- #include <errno.h>
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch b/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
deleted file mode 100644
index aad3cb0373..0000000000
--- a/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 9d14edfc12eefac900dd54729a88b3ccf91c1c43 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:18:15 +0000
-Subject: [PATCH 25/32] mc_gethost: include sys/types.h
-
-Fix build on musl
-error: unknown type name 'u_char'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/network/multicast/mc_gethost/mc_gethost.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c
-index 5b9a790..c799e2a 100644
---- a/testcases/network/multicast/mc_gethost/mc_gethost.c
-+++ b/testcases/network/multicast/mc_gethost/mc_gethost.c
-@@ -6,6 +6,7 @@
-
- #include <sys/param.h>
- #include <sys/socket.h>
-+#include <sys/types.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <arpa/nameser.h>
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch b/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch
deleted file mode 100644
index 58b8ed4d42..0000000000
--- a/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 0133a2b29d6f48d8e2bba6a3be581cdfa91311a6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:21:05 +0000
-Subject: [PATCH 26/32] crash01: Define _GNU_SOURCE
-
-Fixes musl build errors like
-error: 'SA_NOMASK' undeclared (first use in this function)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/misc/crash/crash01.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/misc/crash/crash01.c b/testcases/misc/crash/crash01.c
-index 0574521..08a02e7 100644
---- a/testcases/misc/crash/crash01.c
-+++ b/testcases/misc/crash/crash01.c
-@@ -49,7 +49,7 @@ stress test at the same time you run other tests, like a multi-user
- benchmark.
-
- */
--
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch b/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
deleted file mode 100644
index b47d0977eb..0000000000
--- a/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 4a74b275acc8158850f2500928a1467c3482c986 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:23:11 +0000
-Subject: [PATCH 27/32] sysconf01: Use _SC_2_C_VERSION conditionally
-
-_SC_2_C_VERSION is not available on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/syscalls/sysconf/sysconf01.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
-index 8542e77..e806943 100644
---- a/testcases/kernel/syscalls/sysconf/sysconf01.c
-+++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
-@@ -102,7 +102,9 @@ int main(void)
- test_sysconf(_SC_ATEXIT_MAX);
- test_sysconf(_SC_2_C_BIND);
- test_sysconf(_SC_2_C_DEV);
-+#ifdef __GLIBC__
- test_sysconf(_SC_2_C_VERSION);
-+#endif
- /* 21 - 25 */
- test_sysconf(_SC_2_CHAR_TERM);
- test_sysconf(_SC_2_FORT_DEV);
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch b/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
deleted file mode 100644
index fc82ff9239..0000000000
--- a/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 94557fb7e1293c61145c959b8c5ffecf4a2b1069 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:24:44 +0000
-Subject: [PATCH 28/32] rt_sigaction.h: Use sighandler_t instead of
- __sighandler_t
-
-When _GNU_SOURCE is used then both typedefs are same and using
-sighandler_t makes it work on musl too
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- include/lapi/rt_sigaction.h | 2 +-
- testcases/kernel/syscalls/rt_sigsuspend/Makefile | 3 +++
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/include/lapi/rt_sigaction.h b/include/lapi/rt_sigaction.h
-index 3a5a763..870918c 100644
---- a/include/lapi/rt_sigaction.h
-+++ b/include/lapi/rt_sigaction.h
-@@ -34,7 +34,7 @@
- #define INVAL_SA_PTR ((void *)-1)
-
- struct kernel_sigaction {
-- __sighandler_t k_sa_handler;
-+ sighandler_t k_sa_handler;
- unsigned long sa_flags;
- void (*sa_restorer) (void);
- sigset_t sa_mask;
-diff --git a/testcases/kernel/syscalls/rt_sigsuspend/Makefile b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
-index 37bc3a9..2ca7f7c 100644
---- a/testcases/kernel/syscalls/rt_sigsuspend/Makefile
-+++ b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
-@@ -19,4 +19,7 @@
- top_srcdir ?= ../../../..
-
- include $(top_srcdir)/include/mk/testcases.mk
-+
-+CFLAGS += -D_GNU_SOURCE
-+
- include $(top_srcdir)/include/mk/generic_leaf_target.mk
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch b/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch
deleted file mode 100644
index f7ece9e18e..0000000000
--- a/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2f8a57f66a94210d34dd0361659a8297cf3d813f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:29:24 +0000
-Subject: [PATCH 29/32] trace_shed: Fix build with musl
-
-Errors on musl are
-
-trace_sched.c:425:16: error: invalid operands to binary & (have
-'thread_sched_t * {aka struct <anonymous> *}' and 'int')
- thrd_ndx, WEXITSTATUS(status));
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/sched/tool/trace_sched.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/sched/tool/trace_sched.c b/testcases/kernel/sched/tool/trace_sched.c
-index 7815686..30dca5f 100644
---- a/testcases/kernel/sched/tool/trace_sched.c
-+++ b/testcases/kernel/sched/tool/trace_sched.c
-@@ -422,7 +422,7 @@ int main(int argc, /* number of input parameters. */
- if (status == (thread_sched_t *) - 1) {
- fprintf(stderr,
- "thread [%d] - process exited with errors %d\n",
-- thrd_ndx, WEXITSTATUS(status));
-+ thrd_ndx, WEXITSTATUS((int)status));
- exit(-1);
- } else {
- exp_prio[thrd_ndx] = status->exp_prio;
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch b/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
deleted file mode 100644
index d2d6d76fd7..0000000000
--- a/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 77c95dacffe90382a1f131c801ac569120d95949 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:32:24 +0000
-Subject: [PATCH 30/32] lib: Use PTHREAD_MUTEX_RECURSIVE in place of
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc
-
-e.g. musl does not implement the _NP mutex types
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/tst_res.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/lib/tst_res.c b/lib/tst_res.c
-index 5c1c58c..3244b5e 100644
---- a/lib/tst_res.c
-+++ b/lib/tst_res.c
-@@ -104,8 +104,11 @@ int TEST_ERRNO;
- assert(strlen(buf) > 0); \
- } while (0)
-
-+#ifdef __GLIBC__
- static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
--
-+#else
-+static pthread_mutex_t tmutex = { PTHREAD_MUTEX_RECURSIVE };
-+#endif
- /*
- * Define local function prototypes.
- */
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch b/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch
deleted file mode 100644
index 473ca4c65e..0000000000
--- a/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 293ff1da06748ed4c69be6ece262d42e562e7298 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:36:19 +0000
-Subject: [PATCH 31/32] vma03: fix page size offset as per page size alignment
-
-the offset the param of mmap2() doesn't align the page size, but,
-this param allow must be a multiple of the page size as returned
-by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a
-multiple of the system page size, so modify the input param of offset
-pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
-
-Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/mem/vma/vma03.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
-index ad8a7b4..a539233 100644
---- a/testcases/kernel/mem/vma/vma03.c
-+++ b/testcases/kernel/mem/vma/vma03.c
-@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
- if (fd == -1)
- tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
-
-- pgoff = ULONG_MAX - 1;
-+ pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
- map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
- fd, pgoff);
- if (map == MAP_FAILED)
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch b/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch
deleted file mode 100644
index 5c6bf919f8..0000000000
--- a/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 4f1905ff09c730091674818bd1b48ee221347101 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 08:30:29 +0000
-Subject: [PATCH 32/32] regen.sh: Include asm/unistd.h explicitly
-
-on musl this is not included indirectly and it results in errors like
-testcases/kernel/include/linux_syscall_numbers.h:1035:25: error:
-'__NR_SYSCALL_BASE' undeclared (first use in this function)
-| # define __NR_readdir (__NR_SYSCALL_BASE+ 89)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- testcases/kernel/include/regen.sh | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/testcases/kernel/include/regen.sh b/testcases/kernel/include/regen.sh
-index f93f49b..ee790af 100755
---- a/testcases/kernel/include/regen.sh
-+++ b/testcases/kernel/include/regen.sh
-@@ -32,6 +32,7 @@ cat << EOF > "${output_pid}"
-
- #include <errno.h>
- #include <sys/syscall.h>
-+#include <asm/unistd.h>
- #include "cleanup.c"
-
- #define ltp_syscall(NR, ...) ({ \\
---
-2.7.0
-
diff --git a/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch b/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
deleted file mode 100644
index 868e1cf1fa..0000000000
--- a/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5e3dea669e5b0b769f322d54a3bb9f320b5327da Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Mar 2016 15:47:14 +0000
-Subject: [PATCH 26/26] shmat1: Cover GNU specific code under __USE_GNU
-
-on x86, we use uc_mcontext element from sigcontext
-which is marked gnu-specific in glibc, this patch
-adds this condition around the code
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- testcases/kernel/mem/mtest06/shmat1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c
-index 0d6d7a4..bee69f6 100644
---- a/testcases/kernel/mem/mtest06/shmat1.c
-+++ b/testcases/kernel/mem/mtest06/shmat1.c
-@@ -111,7 +111,7 @@ int done_shmat = 0; /* disallow read and writes before shmat */
- static void sig_handler(int signal, /* signal number, set to handle SIGALRM */
- int code, struct ucontext *ut)
- { /* contains pointer to sigcontext structure */
--#ifdef __i386__
-+#if defined(__i386__) && defined(__USE_GNU)
- unsigned long except; /* exception type. */
- int ret = 0; /* exit code from signal handler. */
- struct sigcontext *scp = /* pointer to sigcontext structure */
-@@ -122,7 +122,7 @@ static void sig_handler(int signal, /* signal number, set to handle SIGALRM
- fprintf(stdout, "Test ended, success\n");
- exit(0);
- }
--#ifdef __i386__
-+#if defined(__i386__) && defined(__USE_GNU)
- else {
- except = scp->trapno;
- fprintf(stderr, "signal caught - [%d] ", signal);
---
-1.9.1
-
diff --git a/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch b/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
deleted file mode 100644
index 59caefe431..0000000000
--- a/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Add periodic output for long time test.
-
-This is needed in context of having scripts running ltp tests and
-waiting with a timeout for the output of the tests.
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
-
-diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
---- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100
-+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100
-@@ -37,7 +37,8 @@
- exit 0
- fi
-
--RUN_TIME=$(( 60 * 60 ))
-+ONE_MINUTE=60
-+RUN_TIME=60
-
- cleanup()
- {
-@@ -62,7 +63,7 @@
- # $1 - Number of cgroups
- # $2 - Allocated how much memory in one process? in MB
- # $3 - The interval to touch memory in a process
--# $4 - How long does this test run ? in second
-+# $4 - How long does this test run ? in minutes
- run_stress()
- {
- do_mount;
-@@ -81,7 +82,11 @@
- eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
- done
-
-- sleep $4
-+ for i in $(seq 0 $(($4-1)))
-+ do
-+ eval echo "Started $i min ago. Still alive... "
-+ sleep $ONE_MINUTE
-+ done
-
- for i in $(seq 0 $(($1-1)))
- do
diff --git a/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch b/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
deleted file mode 100644
index 32ae8aa271..0000000000
--- a/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Fix test_proc_kill hanging
-
-Sometimes the signal is delivered to memcg_process before the framework took
-into consideration its pid entered in the tasks. Fixed by delaying the signal
-send command.
-
-Signed-off-by: George Nita <george.nita@enea.com>
-Upstream-Status: Pending
-
-diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
-index ffbe006..e81bf74 100755
---- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
-+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
-@@ -220,8 +220,8 @@ test_proc_kill()
-
- $TEST_PATH/memcg_process $2 -s $3 &
- pid=$!
-- sleep 1
- echo $pid > tasks
-+ sleep 1
-
- kill -s USR1 $pid 2> /dev/null
- sleep 1
diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb b/meta/recipes-extended/ltp/ltp_20160126.bb
deleted file mode 100644
index 7631e0ec00..0000000000
--- a/meta/recipes-extended/ltp/ltp_20160126.bb
+++ /dev/null
@@ -1,118 +0,0 @@
-SUMMARY = "Linux Test Project"
-DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
-HOMEPAGE = "http://ltp.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
- file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
- file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
- file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \
- file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
- file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
- file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
- file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \
- file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
-"
-
-DEPENDS = "attr libaio libcap acl openssl zip-native"
-DEPENDS_append_libc-musl = " fts "
-EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
-CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
-CFLAGS_append_mips64 = " -D__SANE_USERSPACE_TYPES__"
-SRCREV = "fce797676b14f50406718e7ef640b50da66c9b36"
-
-SRC_URI = "git://github.com/linux-test-project/ltp.git \
- file://0001-ltp-Don-t-link-against-libfl.patch \
- file://0002-Add-knob-to-control-whether-numa-support-should-be-c.patch \
- file://0003-Add-knob-to-control-tirpc-support.patch \
- file://0004-build-Add-option-to-select-libc-implementation.patch \
- file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
- file://0006-sendfile-Use-off64_t-instead-of-__off64_t.patch \
- file://0007-replace-SIGCLD-with-SIGCHLD.patch \
- file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
- file://0009-Guard-error.h-with-__GLIBC__.patch \
- file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \
- file://0011-Rename-sigset-variable-to-sigset1.patch \
- file://0012-fsstress.c-Replace-__int64_t-with-int64_t.patch \
- file://0013-include-fcntl.h-for-getting-O_-definitions.patch \
- file://0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch \
- file://0015-mincore01-Rename-PAGESIZE-to-pagesize.patch \
- file://0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch \
- file://0017-replace-sigval_t-with-union-sigval.patch \
- file://0018-guard-mallocopt-with-__GLIBC__.patch \
- file://0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch \
- file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
- file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
- file://0022-include-sys-types.h.patch \
- file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
- file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
- file://0025-mc_gethost-include-sys-types.h.patch \
- file://0026-crash01-Define-_GNU_SOURCE.patch \
- file://0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch \
- file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
- file://0029-trace_shed-Fix-build-with-musl.patch \
- file://0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch \
- file://0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch \
- file://0032-regen.sh-Include-asm-unistd.h-explicitly.patch \
- file://0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch \
- file://0034-periodic_output.patch \
- file://0035-fix-test_proc_kill-hang.patch \
- file://0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
- "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-export prefix = "/opt/ltp"
-export exec_prefix = "/opt/ltp"
-
-PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
-EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
-EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
-# ltp network/rpc test cases ftbfs when libtirpc is found
-EXTRA_OECONF += " --without-tirpc "
-
-# The makefiles make excessive use of make -C and several include testcases.mk
-# which triggers a build of the syscall header. To reproduce, build ltp,
-# then delete the header, then "make -j XX" and watch regen.sh run multiple
-# times. Its easier to generate this once here instead.
-do_compile_prepend () {
- ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h )
-}
-
-do_install(){
- install -d ${D}/opt/ltp/
- oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
-
- # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run
- # as it lacks dependency on some perl moudle such as LWP::Simple
- # And this script previously works as a tool for analyzing failures from LTP
- # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses
- # http://khack.osdl.org to retrieve ltp test results run on
- # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
- rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
-
- # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
- cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
-}
-
-RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect ldd"
-
-FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
-
-FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*"
-
-# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
-INHIBIT_PACKAGE_STRIP = "1"
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-# However, test_arch_stripped is already stripped, so...
-INSANE_SKIP_${PN} += "already-stripped"
-
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb b/meta/recipes-extended/ltp/ltp_20190517.bb
new file mode 100644
index 0000000000..60f749b4c0
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -0,0 +1,122 @@
+SUMMARY = "Linux Test Project"
+DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
+HOMEPAGE = "https://linux-test-project.github.io/"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
+ file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+ file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+ file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \
+ file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+ file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
+"
+
+DEPENDS = "attr libaio libcap acl openssl zip-native"
+DEPENDS_append_libc-musl = " fts "
+EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
+
+# since ltp contains x86-64 assembler which uses the frame-pointer register,
+# set -fomit-frame-pointer x86-64 to handle cases where optimisation
+# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer
+# earlier in CFLAGS, etc.
+CFLAGS_append_x86-64 = " -fomit-frame-pointer"
+
+CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
+SRCREV = "ac33ef87f0b9dc56533026435be3ea8c67ce86d2"
+
+SRC_URI = "git://github.com/linux-test-project/ltp.git \
+ file://0001-build-Add-option-to-select-libc-implementation.patch \
+ file://0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
+ file://0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
+ file://0004-guard-mallocopt-with-__GLIBC__.patch \
+ file://0006-rt_tgsigqueueinfo-disable-test-on-musl.patch \
+ file://0007-Fix-test_proc_kill-hanging.patch \
+ file://0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
+ file://0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
+ file://0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch \
+ file://0011-direct_io-diotest4-drop-MAP_FIXED.patch \
+ file://0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch \
+ file://0001-Add-configure-time-check-for-getdents-getdents64-API.patch \
+ file://0002-check-for-RES_USE_INET6-during-configure.patch \
+ file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \
+ file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
+ file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \
+ file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \
+ file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \
+ file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \
+ file://0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch \
+ file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+export prefix = "/opt/ltp"
+export exec_prefix = "/opt/ltp"
+
+PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
+EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite --with-open-posix-testsuite "
+# ltp network/rpc test cases ftbfs when libtirpc is found
+EXTRA_OECONF += " --without-tirpc "
+
+do_install(){
+ install -d ${D}/opt/ltp/
+ oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
+
+ # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run
+ # as it lacks dependency on some perl moudle such as LWP::Simple
+ # And this script previously works as a tool for analyzing failures from LTP
+ # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses
+ # http://khack.osdl.org to retrieve ltp test results run on
+ # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
+ rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
+
+ # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
+ cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
+}
+
+RDEPENDS_${PN} = "\
+ attr \
+ bash \
+ cpio \
+ cronie \
+ curl \
+ e2fsprogs-mke2fs \
+ expect \
+ file \
+ gawk \
+ gzip \
+ iproute2 \
+ ldd \
+ libaio \
+ logrotate \
+ perl \
+ python3-core \
+ procps \
+ quota \
+ unzip \
+ util-linux \
+ which \
+ tar \
+"
+
+FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a"
+
+# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail
+INHIBIT_PACKAGE_STRIP_FILES = "/opt/ltp/testcases/bin/nm01 /opt/ltp/testcases/bin/ldd01"
+INSANE_SKIP_${PN} += "already-stripped staticdev"
+
+# Avoid file dependency scans, as LTP checks for things that may or may not
+# exist on the running system. For instance it has specific checks for
+# csh and ksh which are not typically part of OpenEmbedded systems (but
+# can be added via additional layers.)
+SKIP_FILEDEPS_${PN} = '1'
diff --git a/meta/recipes-extended/lzip/lzip_1.21.bb b/meta/recipes-extended/lzip/lzip_1.21.bb
new file mode 100644
index 0000000000..bb3d2a6fe3
--- /dev/null
+++ b/meta/recipes-extended/lzip/lzip_1.21.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Lossless data compressor based on the LZMA algorithm"
+HOMEPAGE = "http://lzip.nongnu.org/lzip.html"
+SECTION = "console/utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=76d6e300ffd8fb9d18bd9b136a9bba13 \
+ file://decoder.cc;beginline=3;endline=16;md5=db09fe3f9573f94d0076f7f07959e6e1"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/lzip/lzip-${PV}.tar.gz"
+SRC_URI[md5sum] = "c0061730d017ea593a09308edc547128"
+SRC_URI[sha256sum] = "e48b5039d3164d670791f9c5dbaa832bf2df080cb1fbb4f33aa7b3300b670d8b"
+
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+CONFIGUREOPTS = "\
+ '--srcdir=${S}' \
+ '--prefix=${prefix}' \
+ '--exec-prefix=${exec_prefix}' \
+ '--bindir=${bindir}' \
+ '--datadir=${datadir}' \
+ '--infodir=${infodir}' \
+ '--sysconfdir=${sysconfdir}' \
+ 'CXX=${CXX}' \
+ 'CPPFLAGS=${CPPFLAGS}' \
+ 'CXXFLAGS=${CXXFLAGS}' \
+ 'LDFLAGS=${LDFLAGS}' \
+"
+
+do_configure () {
+ ${S}/configure ${CONFIGUREOPTS}
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+ # Info dir listing isn't interesting at this point so remove it if it exists.
+ if [ -e "${D}${infodir}/dir" ]; then
+ rm -f ${D}${infodir}/dir
+ fi
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch b/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch
deleted file mode 100644
index 77da33321d..0000000000
--- a/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: Luk Claes <luk@debian.org>
-Date: Sat, 4 Jul 2009 10:54:53 +0200
-Subject: Don't reuse weak symbol optopt to fix FTBFS on mips*
-
-This patch is taken from
-ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
-
-Upstream-Status: Inappropriate [upstream is dead]
----
- getopt.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/getopt.c b/getopt.c
-index 83ce628..82e983c 100644
---- a/getopt.c
-+++ b/getopt.c
-@@ -43,7 +43,7 @@ typedef int ssize_t;
- char *optarg;
- int optind = 1;
- int opterr = 1;
--int optopt;
-+int optoptc;
-
- static void
- error(const char *s, int c)
-@@ -69,7 +69,7 @@ error(const char *s, int c)
- *bp++ = *s++;
- while (*msg)
- *bp++ = *msg++;
-- *bp++ = optopt;
-+ *bp++ = optoptc;
- *bp++ = '\n';
- write(2, buf, bp - buf);
- ac_free(buf);
-@@ -101,13 +101,13 @@ getopt(int argc, char *const argv[], const char *optstring)
- }
- curp = &argv[optind][1];
- }
-- optopt = curp[0] & 0377;
-+ optoptc = curp[0] & 0377;
- while (optstring[0]) {
- if (optstring[0] == ':') {
- optstring++;
- continue;
- }
-- if ((optstring[0] & 0377) == optopt) {
-+ if ((optstring[0] & 0377) == optoptc) {
- if (optstring[1] == ':') {
- if (curp[1] != '\0') {
- optarg = (char *)&curp[1];
-@@ -127,7 +127,7 @@ getopt(int argc, char *const argv[], const char *optstring)
- optind++;
- optarg = 0;
- }
-- return optopt;
-+ return optoptc;
- }
- optstring++;
- }
diff --git a/meta/recipes-extended/mailx/files/0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch b/meta/recipes-extended/mailx/files/0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch
deleted file mode 100644
index 6bad433ea6..0000000000
--- a/meta/recipes-extended/mailx/files/0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From: Hilko Bengen <bengen@debian.org>
-Date: Wed, 27 Apr 2011 00:18:42 +0200
-Subject: Patched out SSL2 support since it is no longer supported by OpenSSL.
-
-This patch is taken from
-ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
-
-Upstream-Status: Inappropriate [upstream is dead]
----
- mailx.1 | 2 +-
- openssl.c | 4 +---
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/mailx.1 b/mailx.1
-index 417ea04..a02e430 100644
---- a/mailx.1
-+++ b/mailx.1
-@@ -3575,7 +3575,7 @@ Only applicable if SSL/TLS support is built using OpenSSL.
- .TP
- .B ssl-method
- Selects a SSL/TLS protocol version;
--valid values are `ssl2', `ssl3', and `tls1'.
-+valid values are `ssl3', and `tls1'.
- If unset, the method is selected automatically,
- if possible.
- .TP
-diff --git a/openssl.c b/openssl.c
-index b4e33fc..44fe4e5 100644
---- a/openssl.c
-+++ b/openssl.c
-@@ -216,9 +216,7 @@ ssl_select_method(const char *uhp)
-
- cp = ssl_method_string(uhp);
- if (cp != NULL) {
-- if (equal(cp, "ssl2"))
-- method = SSLv2_client_method();
-- else if (equal(cp, "ssl3"))
-+ if (equal(cp, "ssl3"))
- method = SSLv3_client_method();
- else if (equal(cp, "tls1"))
- method = TLSv1_client_method();
diff --git a/meta/recipes-extended/mailx/files/0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch b/meta/recipes-extended/mailx/files/0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch
deleted file mode 100644
index 13b73ae593..0000000000
--- a/meta/recipes-extended/mailx/files/0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Hilko Bengen <bengen@debian.org>
-Date: Sat, 14 Apr 2012 20:22:43 +0200
-Subject: Fixed Lintian warning (warning: macro `N' not defined)
-
-This patch is taken from
-ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
-
-Upstream-Status: Inappropriate [upstream is dead]
----
- mailx.1 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mailx.1 b/mailx.1
-index a02e430..b0723bd 100644
---- a/mailx.1
-+++ b/mailx.1
-@@ -3781,7 +3781,7 @@ you could examine the first message by giving the command:
- .sp
- .fi
- which might cause
--.N mailx
-+.I mailx
- to respond with, for example:
- .nf
- .sp
diff --git a/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch b/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
deleted file mode 100644
index 13b955c4b5..0000000000
--- a/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 9984ae5cb0ea0d61df1612b06952a61323c083d9 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Mon, 17 Nov 2014 11:13:38 +0100
-Subject: [PATCH 1/4] outof: Introduce expandaddr flag
-
-Document that address expansion is disabled unless the expandaddr
-binary option is set.
-
-This has been assigned CVE-2014-7844 for BSD mailx, but it is not
-a vulnerability in Heirloom mailx because this feature was documented.
-
-This patch is taken from
-ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
-
-Upstream-Status: Inappropriate [upstream is dead]
-CVE: CVE-2014-7844
----
- mailx.1 | 14 ++++++++++++++
- names.c | 3 +++
- 2 files changed, 17 insertions(+)
-
-diff --git a/mailx.1 b/mailx.1
-index 70a7859..22a171b 100644
---- a/mailx.1
-+++ b/mailx.1
-@@ -656,6 +656,14 @@ but any reply returned to the machine
- will have the system wide alias expanded
- as all mail goes through sendmail.
- .SS "Recipient address specifications"
-+If the
-+.I expandaddr
-+option is not set (the default), recipient addresses must be names of
-+local mailboxes or Internet mail addresses.
-+.PP
-+If the
-+.I expandaddr
-+option is set, the following rules apply:
- When an address is used to name a recipient
- (in any of To, Cc, or Bcc),
- names of local mail folders
-@@ -2391,6 +2399,12 @@ and exits immediately.
- If this option is set,
- \fImailx\fR starts even with an empty mailbox.
- .TP
-+.B expandaddr
-+Causes
-+.I mailx
-+to expand message recipient addresses, as explained in the section,
-+Recipient address specifications.
-+.TP
- .B flipr
- Exchanges the
- .I Respond
-diff --git a/names.c b/names.c
-index 66e976b..c69560f 100644
---- a/names.c
-+++ b/names.c
-@@ -268,6 +268,9 @@ outof(struct name *names, FILE *fo, struct header *hp)
- FILE *fout, *fin;
- int ispipe;
-
-+ if (value("expandaddr") == NULL)
-+ return names;
-+
- top = names;
- np = names;
- time(&now);
---
-1.9.3
-
-
diff --git a/meta/recipes-extended/mailx/files/0012-unpack-Disable-option-processing-for-email-addresses.patch b/meta/recipes-extended/mailx/files/0012-unpack-Disable-option-processing-for-email-addresses.patch
deleted file mode 100644
index 8cdbfd8b03..0000000000
--- a/meta/recipes-extended/mailx/files/0012-unpack-Disable-option-processing-for-email-addresses.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From e34e2ac67b80497080ebecccec40c3b61456167d Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Mon, 17 Nov 2014 11:14:06 +0100
-Subject: [PATCH 2/4] unpack: Disable option processing for email addresses
- when calling sendmail
-
-This patch is taken from
-ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
-
-Upstream-Status: Inappropriate [upstream is dead]
----
- extern.h | 2 +-
- names.c | 8 ++++++--
- sendout.c | 2 +-
- 3 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/extern.h b/extern.h
-index 6b85ba0..8873fe8 100644
---- a/extern.h
-+++ b/extern.h
-@@ -396,7 +396,7 @@ struct name *outof(struct name *names, FILE *fo, struct header *hp);
- int is_fileaddr(char *name);
- struct name *usermap(struct name *names);
- struct name *cat(struct name *n1, struct name *n2);
--char **unpack(struct name *np);
-+char **unpack(struct name *smopts, struct name *np);
- struct name *elide(struct name *names);
- int count(struct name *np);
- struct name *delete_alternates(struct name *np);
-diff --git a/names.c b/names.c
-index c69560f..45bbaed 100644
---- a/names.c
-+++ b/names.c
-@@ -549,7 +549,7 @@ cat(struct name *n1, struct name *n2)
- * Return an error if the name list won't fit.
- */
- char **
--unpack(struct name *np)
-+unpack(struct name *smopts, struct name *np)
- {
- char **ap, **top;
- struct name *n;
-@@ -564,7 +564,7 @@ unpack(struct name *np)
- * the terminating 0 pointer. Additional spots may be needed
- * to pass along -f to the host mailer.
- */
-- extra = 2;
-+ extra = 3 + count(smopts);
- extra++;
- metoo = value("metoo") != NULL;
- if (metoo)
-@@ -581,6 +581,10 @@ unpack(struct name *np)
- *ap++ = "-m";
- if (verbose)
- *ap++ = "-v";
-+ for (; smopts != NULL; smopts = smopts->n_flink)
-+ if ((smopts->n_type & GDEL) == 0)
-+ *ap++ = smopts->n_name;
-+ *ap++ = "--";
- for (; n != NULL; n = n->n_flink)
- if ((n->n_type & GDEL) == 0)
- *ap++ = n->n_name;
-diff --git a/sendout.c b/sendout.c
-index 7b7f2eb..c52f15d 100644
---- a/sendout.c
-+++ b/sendout.c
-@@ -835,7 +835,7 @@ start_mta(struct name *to, struct name *mailargs, FILE *input,
- #endif /* HAVE_SOCKETS */
-
- if ((smtp = value("smtp")) == NULL) {
-- args = unpack(cat(mailargs, to));
-+ args = unpack(mailargs, to);
- if (debug || value("debug")) {
- printf(catgets(catd, CATSET, 181,
- "Sendmail arguments:"));
---
-1.9.3
-
-
diff --git a/meta/recipes-extended/mailx/files/0013-fio.c-Unconditionally-require-wordexp-support.patch b/meta/recipes-extended/mailx/files/0013-fio.c-Unconditionally-require-wordexp-support.patch
deleted file mode 100644
index 5558d8639f..0000000000
--- a/meta/recipes-extended/mailx/files/0013-fio.c-Unconditionally-require-wordexp-support.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 2bae8ecf04ec2ba6bb9f0af5b80485dd0edb427d Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Mon, 17 Nov 2014 12:48:25 +0100
-Subject: [PATCH 3/4] fio.c: Unconditionally require wordexp support
-
-This patch is taken from
-ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
-
-Upstream-Status: Inappropriate [upstream is dead]
----
- fio.c | 67 +++++--------------------------------------------------------------
- 1 file changed, 5 insertions(+), 62 deletions(-)
-
-diff --git a/fio.c b/fio.c
-index 65e8f10..1529236 100644
---- a/fio.c
-+++ b/fio.c
-@@ -43,12 +43,15 @@ static char sccsid[] = "@(#)fio.c 2.76 (gritter) 9/16/09";
- #endif /* not lint */
-
- #include "rcv.h"
-+
-+#ifndef HAVE_WORDEXP
-+#error wordexp support is required
-+#endif
-+
- #include <sys/stat.h>
- #include <sys/file.h>
- #include <sys/wait.h>
--#ifdef HAVE_WORDEXP
- #include <wordexp.h>
--#endif /* HAVE_WORDEXP */
- #include <unistd.h>
-
- #if defined (USE_NSS)
-@@ -481,7 +484,6 @@ next:
- static char *
- globname(char *name)
- {
--#ifdef HAVE_WORDEXP
- wordexp_t we;
- char *cp;
- sigset_t nset;
-@@ -527,65 +529,6 @@ globname(char *name)
- }
- wordfree(&we);
- return cp;
--#else /* !HAVE_WORDEXP */
-- char xname[PATHSIZE];
-- char cmdbuf[PATHSIZE]; /* also used for file names */
-- int pid, l;
-- char *cp, *shell;
-- int pivec[2];
-- extern int wait_status;
-- struct stat sbuf;
--
-- if (pipe(pivec) < 0) {
-- perror("pipe");
-- return name;
-- }
-- snprintf(cmdbuf, sizeof cmdbuf, "echo %s", name);
-- if ((shell = value("SHELL")) == NULL)
-- shell = SHELL;
-- pid = start_command(shell, 0, -1, pivec[1], "-c", cmdbuf, NULL);
-- if (pid < 0) {
-- close(pivec[0]);
-- close(pivec[1]);
-- return NULL;
-- }
-- close(pivec[1]);
--again:
-- l = read(pivec[0], xname, sizeof xname);
-- if (l < 0) {
-- if (errno == EINTR)
-- goto again;
-- perror("read");
-- close(pivec[0]);
-- return NULL;
-- }
-- close(pivec[0]);
-- if (wait_child(pid) < 0 && WTERMSIG(wait_status) != SIGPIPE) {
-- fprintf(stderr, catgets(catd, CATSET, 81,
-- "\"%s\": Expansion failed.\n"), name);
-- return NULL;
-- }
-- if (l == 0) {
-- fprintf(stderr, catgets(catd, CATSET, 82,
-- "\"%s\": No match.\n"), name);
-- return NULL;
-- }
-- if (l == sizeof xname) {
-- fprintf(stderr, catgets(catd, CATSET, 83,
-- "\"%s\": Expansion buffer overflow.\n"), name);
-- return NULL;
-- }
-- xname[l] = 0;
-- for (cp = &xname[l-1]; *cp == '\n' && cp > xname; cp--)
-- ;
-- cp[1] = '\0';
-- if (strchr(xname, ' ') && stat(xname, &sbuf) < 0) {
-- fprintf(stderr, catgets(catd, CATSET, 84,
-- "\"%s\": Ambiguous.\n"), name);
-- return NULL;
-- }
-- return savestr(xname);
--#endif /* !HAVE_WORDEXP */
- }
-
- /*
---
-1.9.3
-
-
diff --git a/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch b/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
deleted file mode 100644
index ae14b8acfe..0000000000
--- a/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 73fefa0c1ac70043ec84f2d8b8f9f683213f168d Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Mon, 17 Nov 2014 13:11:32 +0100
-Subject: [PATCH 4/4] globname: Invoke wordexp with WRDE_NOCMD (CVE-2004-2771)
-
-This patch is taken from
-ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
-
-Upstream-Status: Inappropriate [upstream is dead]
-CVE: CVE-2004-2771
----
- fio.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/fio.c b/fio.c
-index 1529236..774a204 100644
---- a/fio.c
-+++ b/fio.c
-@@ -497,7 +497,7 @@ globname(char *name)
- sigemptyset(&nset);
- sigaddset(&nset, SIGCHLD);
- sigprocmask(SIG_BLOCK, &nset, NULL);
-- i = wordexp(name, &we, 0);
-+ i = wordexp(name, &we, WRDE_NOCMD);
- sigprocmask(SIG_UNBLOCK, &nset, NULL);
- switch (i) {
- case 0:
---
-1.9.3
-
-
diff --git a/meta/recipes-extended/mailx/files/0015-usr-sbin-sendmail.patch b/meta/recipes-extended/mailx/files/0015-usr-sbin-sendmail.patch
deleted file mode 100644
index 2b5991425b..0000000000
--- a/meta/recipes-extended/mailx/files/0015-usr-sbin-sendmail.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Description: Sendmail is at /usr/sbin/sendmail
- As per Debian Policy §11.6
-Author: Ryan Kavanagh <rak@debian.org>
-Origin: Debian
-Forwarded: no
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: heirloom-mailx-12.5/Makefile
-===================================================================
-This patch is taken from
-ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
-
-Upstream-Status: Inappropriate [upstream is dead]
-
---- heirloom-mailx-12.5.orig/Makefile 2011-04-26 17:23:22.000000000 -0400
-+++ heirloom-mailx-12.5/Makefile 2015-01-27 13:20:04.733542801 -0500
-@@ -13,7 +13,7 @@
-
- MAILRC = $(SYSCONFDIR)/nail.rc
- MAILSPOOL = /var/mail
--SENDMAIL = /usr/lib/sendmail
-+SENDMAIL = /usr/sbin/sendmail
-
- DESTDIR =
-
-Index: heirloom-mailx-12.5/mailx.1
-===================================================================
---- heirloom-mailx-12.5.orig/mailx.1 2015-01-27 13:18:49.000000000 -0500
-+++ heirloom-mailx-12.5/mailx.1 2015-01-27 13:20:32.382336867 -0500
-@@ -4922,7 +4922,7 @@
- which just acts as a proxy.
- .PP
- \fIMailx\fR immediately contacts the SMTP server (or
--.IR \%/usr/lib/sendmail )
-+.IR \%/usr/sbin/sendmail )
- even when operating in
- .I disconnected
- mode.
diff --git a/meta/recipes-extended/mailx/files/explicitly.disable.krb5.support.patch b/meta/recipes-extended/mailx/files/explicitly.disable.krb5.support.patch
deleted file mode 100644
index b74fd0472e..0000000000
--- a/meta/recipes-extended/mailx/files/explicitly.disable.krb5.support.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-krb5 support is autodetected from sysroot making builds undeterministic
-feel free to improve this to support explicitly enabling/disabling it
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
---- a/makeconfig 2013-07-21 15:06:11.177792334 +0200
-+++ b/makeconfig 2013-07-21 15:07:20.028793994 +0200
-@@ -424,36 +424,6 @@
- }
- !
-
--<$tmp2.c link_check gssapi 'for GSSAPI in libgss' \
-- '#define USE_GSSAPI' '-lgss' ||
-- <$tmp2.c link_check gssapi 'for GSSAPI in libgssapi_krb5' \
-- '#define USE_GSSAPI' '-lgssapi_krb5' ||
-- link_check gssapi 'for GSSAPI in libgssapi_krb5, old-style' \
-- '#define USE_GSSAPI
--#define GSSAPI_OLD_STYLE' '-lgssapi_krb5' <<\! || \
-- link_check gssapi 'for GSSAPI in libgssapi' \
-- '#define USE_GSSAPI
--#define GSSAPI_REG_INCLUDE' '-lgssapi' <<\%
--#include <gssapi/gssapi.h>
--#include <gssapi/gssapi_generic.h>
--
--int main(void)
--{
-- gss_import_name(0, 0, gss_nt_service_name, 0);
-- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0);
-- return 0;
--}
--!
--#include <gssapi.h>
--
--int main(void)
--{
-- gss_import_name(0, 0, GSS_C_NT_HOSTBASED_SERVICE, 0);
-- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0);
-- return 0;
--}
--%
--
- cat >$tmp2.c <<\!
- #include "config.h"
- #ifdef HAVE_NL_LANGINFO
diff --git a/meta/recipes-extended/mailx/mailx_12.5-5.bb b/meta/recipes-extended/mailx/mailx_12.5-5.bb
deleted file mode 100644
index 9dd710a718..0000000000
--- a/meta/recipes-extended/mailx/mailx_12.5-5.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "mailx is the traditional command-line-mode mail user agent"
-
-DESCRIPTION = "Mailx is derived from Berkeley Mail and is intended provide the \
-functionality of the POSIX mailx command with additional support \
-for MIME, IMAP, POP3, SMTP, and S/MIME."
-
-HOMEPAGE = "http://heirloom.sourceforge.net/mailx.html"
-SECTION = "console/network"
-LICENSE = "BSD & MPL-1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4202a0a62910cf94f7af8a3436a2a2dd"
-
-DEPENDS = "openssl"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/h/heirloom-mailx/heirloom-mailx_12.5.orig.tar.gz;name=archive \
- file://0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch \
- file://0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch \
- file://0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch \
- file://0011-outof-Introduce-expandaddr-flag.patch \
- file://0012-unpack-Disable-option-processing-for-email-addresses.patch \
- file://0013-fio.c-Unconditionally-require-wordexp-support.patch \
- file://0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch \
- file://0015-usr-sbin-sendmail.patch \
- file://explicitly.disable.krb5.support.patch \
- "
-
-SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2"
-SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad"
-
-# for this package we're mostly interested in tracking debian patches,
-# and not in the upstream version where all development has effectively stopped
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
-
-S = "${WORKDIR}/heirloom-mailx-12.5"
-
-inherit autotools-brokensep
-
-CFLAGS_append = " -D_BSD_SOURCE -DDEBIAN -I${S}/EXT"
-
-# "STRIP=true" means that 'true' command will be used to 'strip' files which will achieve the effect of not stripping them
-# mailx's Makefile doesn't allow a more straightforward way to avoid stripping
-EXTRA_OEMAKE = "SENDMAIL=${sbindir}/sendmail IPv6=-DHAVE_IPv6_FUNCS PREFIX=/usr UCBINSTALL=/usr/bin/install STRIP=true"
-
-# The makeconfig can't run parallelly, otherwise the checking results
-# might be incorrect and lead to errors:
-# fio.c:56:17: fatal error: ssl.h: No such file or directory
-# #include <ssl.h>
-PARALLEL_MAKE = ""
-
-# Causes gcc to get stuck and eat all available memory in qemuarm builds
-# http://errors.yoctoproject.org/Errors/Details/20488/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/meta/recipes-extended/man-db/files/99_mandb b/meta/recipes-extended/man-db/files/99_mandb
new file mode 100644
index 0000000000..9b8a1712b7
--- /dev/null
+++ b/meta/recipes-extended/man-db/files/99_mandb
@@ -0,0 +1 @@
+d man man 0755 /var/cache/man none
diff --git a/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch b/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch
new file mode 100644
index 0000000000..03273d3b49
--- /dev/null
+++ b/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch
@@ -0,0 +1,16 @@
+The first line of man_db.conf will be replaced by package name. And it causes
+multilib install file conflict. Remove the line to avoid the issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+diff --git a/src/man_db.conf.in b/src/man_db.conf.in
+index bc8bb7e..04cfb31 100644
+--- a/src/man_db.conf.in
++++ b/src/man_db.conf.in
+@@ -1,4 +1,3 @@
+-# @config_file_basename@
+ #
+ # This file is used by the man-db package to configure the man and cat paths.
+ # It is also used to provide a manpath for those without one by examining
diff --git a/meta/recipes-extended/man-db/man-db_2.9.0.bb b/meta/recipes-extended/man-db/man-db_2.9.0.bb
new file mode 100644
index 0000000000..5b017e8023
--- /dev/null
+++ b/meta/recipes-extended/man-db/man-db_2.9.0.bb
@@ -0,0 +1,59 @@
+SUMMARY = "An implementation of the standard Unix documentation system accessed using the man command"
+HOMEPAGE = "http://man-db.nongnu.org/"
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://docs/COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://docs/COPYING;md5=eb723b61539feef013de476e68b5c50a"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \
+ file://99_mandb \
+ file://man_db.conf-avoid-multilib-install-file-conflict.patch"
+SRC_URI[md5sum] = "897576a19ecbef376a916485608cd790"
+SRC_URI[sha256sum] = "5d4aacd9e8876d6a3203a889860c3524c293c38f04111a3350deab8a6cd3e261"
+
+DEPENDS = "libpipeline gdbm groff-native base-passwd"
+RDEPENDS_${PN} += "base-passwd"
+
+# | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr'
+USE_NLS_libc-musl = "no"
+
+inherit gettext pkgconfig autotools systemd
+
+EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_unitdir}/system"
+EXTRA_AUTORECONF += "-I ${S}/gl/m4"
+
+do_install() {
+ autotools_do_install
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_mandb ${D}/etc/default/volatiles
+ fi
+}
+
+do_install_append_libc-musl() {
+ rm -f ${D}${libdir}/charset.alias
+}
+
+FILES_${PN} += "${prefix}/lib/tmpfiles.d"
+
+FILES_${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so"
+
+RDEPENDS_${PN} += "groff"
+RRECOMMENDS_${PN} += "less"
+RPROVIDES_${PN} += " man"
+
+def compress_pkg(d):
+ if bb.utils.contains("INHERIT", "compress_doc", True, False, d):
+ compress = d.getVar("DOC_COMPRESS")
+ if compress == "gz":
+ return "gzip"
+ elif compress == "bz2":
+ return "bzip2"
+ elif compress == "xz":
+ return "xz"
+ return ""
+
+RDEPENDS_${PN} += "${@compress_pkg(d)}"
+
+SYSTEMD_SERVICE_${PN} = "man-db.timer man-db.service"
+SYSTEMD_AUTO_ENABLE ?= "disable"
diff --git a/meta/recipes-extended/man-pages/man-pages_4.07.bb b/meta/recipes-extended/man-pages/man-pages_4.07.bb
deleted file mode 100644
index 76a3fd8ae4..0000000000
--- a/meta/recipes-extended/man-pages/man-pages_4.07.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Linux man-pages"
-DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
-SECTION = "console/utils"
-HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
-LICENSE = "GPLv2+"
-
-LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
-SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "05ba1cb21e99d02bd7bc1a59378965d2"
-SRC_URI[sha256sum] = "c973351131931f7700f5e9fbf4ef366c43ea7c1515d282e8d5db9c77590c4c93"
-
-RDEPENDS_${PN} = "man"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
- oe_runmake install DESTDIR=${D}
-}
-
-# Only deliveres man-pages so FILES_${PN} gets everything
-FILES_${PN}-doc = ""
-FILES_${PN} = "${mandir}/*"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
-ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
-ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/meta/recipes-extended/man-pages/man-pages_5.04.bb b/meta/recipes-extended/man-pages/man-pages_5.04.bb
new file mode 100644
index 0000000000..be456759fc
--- /dev/null
+++ b/meta/recipes-extended/man-pages/man-pages_5.04.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Linux man-pages"
+DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
+SECTION = "console/utils"
+HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://README;md5=794f701617cc03fe50c53257660d8ec4"
+SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "14d33d3fe02577a33aab26eb75df39cb"
+SRC_URI[sha256sum] = "8c6ab56b654a6dd00e3759279954a25fc68b258b8f493a75af55ea7b6401fdb2"
+
+inherit manpages
+
+MAN_PKG = "${PN}"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[manpages] = ""
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}
+
+# Only deliveres man-pages so FILES_${PN} gets everything
+FILES_${PN}-doc = ""
+FILES_${PN} = "${mandir}/*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "passwd.5 getspnam.3 crypt.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
+ALTERNATIVE_LINK_NAME[crypt.3] = "${mandir}/man3/crypt.3"
diff --git a/meta/recipes-extended/man/man/configure_sed.patch b/meta/recipes-extended/man/man/configure_sed.patch
deleted file mode 100644
index d49e6831d9..0000000000
--- a/meta/recipes-extended/man/man/configure_sed.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-man: replace ',' with '#'
-
-Sometimes, the parameters of CC/BUILD_CC contains the ',', which
-cause the sed command failed, so replace the ',' with '#'
-
-Upstream-Status: Pending
-
-Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- configure | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 9f62cf9..9a565ae 100755
---- a/configure
-+++ b/configure
-@@ -1321,9 +1321,9 @@ do
- echo "Creating $infile from $infile.in"
- sed -e '
- s,@version@,$version,
--s,@CC@,$CC,
-+s#@CC@#$CC#
- s,@EXEEXT@,$EXEEXT,
--s,@BUILD_CC@,$BUILD_CC,
-+s#@BUILD_CC@#$BUILD_CC#
- s,@INSTALL@,$INSTALL,
- s,@DEFS@,$DEFS,
- s,@LIBS@,$LIBS,
---
-1.9.1
-
diff --git a/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch b/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
deleted file mode 100644
index 6f834bd01b..0000000000
--- a/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -u -r man-1.5g.old/configure man-1.5g/configure
---- man-1.5g.old/configure Wed Apr 7 04:16:05 1999
-+++ man-1.5g/configure Mon May 15 15:22:44 2000
-@@ -791,7 +791,7 @@
- read mode
- if test "$mode" != ""; then man_mode=$mode; fi
- fi
-- man_install_flags="-m $man_mode -o $man_user -g $man_group"
-+ man_install_flags=""
- fi
-
- # What sections do we anticipate?
diff --git a/meta/recipes-extended/man/man/man-1.5h1-gencat.patch b/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
deleted file mode 100644
index 044b14c509..0000000000
--- a/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- gencat/genlib.c 2006-08-02 20:11:44.000000000 +0200
-+++ gencat/genlib.c.oden 2008-12-21 19:18:50.000000000 +0100
-@@ -47,6 +47,7 @@ up-to-date. Many thanks.
- 01/14/91 4 nazgul Off by one on number specified entries
- */
-
-+#undef _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #ifdef SYSV
diff --git a/meta/recipes-extended/man/man/man-1.5h1-make.patch b/meta/recipes-extended/man/man/man-1.5h1-make.patch
deleted file mode 100644
index 8631eb2c53..0000000000
--- a/meta/recipes-extended/man/man/man-1.5h1-make.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999
-+++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999
-@@ -1,8 +1,8 @@
- # only executed from a subdir
- MAN1 = man whatis apropos
--MAN5 = man.conf
-+MAN5 = man.config
- MAN8 = makewhatis
--ALL = man.1 whatis.1 apropos.1 man.conf.5
-+ALL = man.1 whatis.1 apropos.1 man.config.5
- MAYBE8 = makewhatis
-
- .SUFFIXES: .man .1 .5 .8
diff --git a/meta/recipes-extended/man/man/man-1.5i2-initial.patch b/meta/recipes-extended/man/man/man-1.5i2-initial.patch
deleted file mode 100644
index fe56c0706c..0000000000
--- a/meta/recipes-extended/man/man/man-1.5i2-initial.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5i2/src/makewhatis.sh.initial Tue Jul 3 15:38:39 2001
-+++ man-1.5i2/src/makewhatis.sh Tue Jul 3 15:39:39 2001
-@@ -81,8 +81,10 @@
- continue;;
- -s) setsections=1
- continue;;
-- -u) findarg="-newer /var/cache/man/whatis"
-- update=1
-+ -u) if [ -e /var/cache/man/whatis ]; then
-+ findarg="-newer /var/cache/man/whatis"
-+ update=1
-+ fi
- continue;;
- -v) verbose=1
- continue;;
diff --git a/meta/recipes-extended/man/man/man-1.5i2-newline.patch b/meta/recipes-extended/man/man/man-1.5i2-newline.patch
deleted file mode 100644
index 611df5d259..0000000000
--- a/meta/recipes-extended/man/man/man-1.5i2-newline.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- src/man.c 2008-12-21 19:17:31.000000000 +0100
-+++ src/man.c.oden 2008-12-21 19:17:38.000000000 +0100
-@@ -391,7 +391,7 @@ again:
- beg++;
-
- end = beg;
-- while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0')
-+ while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE)
- end++; /* note that buf is NUL-terminated */
- *end = '\0';
-
diff --git a/meta/recipes-extended/man/man/man-1.5i2-overflow.patch b/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
deleted file mode 100644
index 52d2881a89..0000000000
--- a/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5i2/src/man.c.overflow Mon Jun 25 00:01:45 2001
-+++ man-1.5i2/src/man.c Mon Jun 25 00:01:45 2001
-@@ -381,6 +381,9 @@
- strcat(name, "/");
- strcat(name, beg);
- }
-+ /* If this is too long, bad things have already happened. *
-+ * we should quit IMMEDIATELY. */
-+ if(strlen(name)>sizeof(ultname)) _exit(1);
-
- goto again;
- }
diff --git a/meta/recipes-extended/man/man/man-1.5j-i18n.patch b/meta/recipes-extended/man/man/man-1.5j-i18n.patch
deleted file mode 100644
index 2ae09c0ea4..0000000000
--- a/meta/recipes-extended/man/man/man-1.5j-i18n.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/msgs/inst.sh.i18n Wed Apr 25 10:40:50 2001
-+++ man-1.5j/msgs/inst.sh Wed Apr 25 10:41:17 2001
-@@ -27,8 +27,7 @@
- for j in $M; do
- if [ -f $j ]; then
- i=`echo $j | sed -e 's/mess.//; s/.cat//'`
-- dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
-- dest=${PREFIX}$dest
-+ dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
- echo "mkdir -p `dirname $dest`"
- mkdir -p `dirname $dest`;
- echo "install -c -m 644 $j $dest"
diff --git a/meta/recipes-extended/man/man/man-1.5j-nocache.patch b/meta/recipes-extended/man/man/man-1.5j-nocache.patch
deleted file mode 100644
index 751dddd53b..0000000000
--- a/meta/recipes-extended/man/man/man-1.5j-nocache.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/src/man.conf.in.nocache Thu Nov 22 15:07:12 2001
-+++ man-1.5j/src/man.conf.in Thu Nov 22 15:07:12 2001
-@@ -81,6 +81,9 @@
- #
- #NOCACHE
- #
-+# NOCACHE keeps man from creating cache pages
-+NOCACHE
-+#
- # Useful paths - note that COL should not be defined when
- # NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
- # not only is it superfluous, but it actually damages the output.
diff --git a/meta/recipes-extended/man/man/man-1.5j-utf8.patch b/meta/recipes-extended/man/man/man-1.5j-utf8.patch
deleted file mode 100644
index 33d3e4c974..0000000000
--- a/meta/recipes-extended/man/man/man-1.5j-utf8.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/configure.utf8 Thu Nov 22 15:02:35 2001
-+++ man-1.5j/configure Thu Nov 22 15:03:15 2001
-@@ -408,9 +408,9 @@
- Fgawk=/bin/gawk
- Fawk=/bin/gawk
- Fmawk=missing
-- troff=""
-- nroff=""
-- jnroff=""
-+ troff=/usr/bin/troff
-+ nroff=/usr/bin/nroff
-+ jnroff=/usr/bin/nroff
- eqn=""
- neqn=""
- jneqn=""
-@@ -453,6 +453,8 @@
- done
- done
- Fgroff=/usr/bin/groff
-+ Fnroff=/usr/bin/nroff
-+ Fjnroff=/usr/bin/nroff
- Fgeqn=/usr/bin/geqn
- Fgtbl=/usr/bin/gtbl
- Fcol=/usr/bin/col
-@@ -485,25 +487,25 @@
- then
- if test $Fnroff = "missing"
- then
-- nroff="nroff -Tlatin1 -mandoc"
-+ nroff="nroff -Tutf8 -mandoc"
- else
-- nroff="$Fnroff -Tlatin1 -mandoc"
-+ nroff="$Fnroff -Tutf8 -mandoc"
- fi
- troff="troff -mandoc"
- echo "Warning: could not find groff"
- else
- if test $Fnroff = "missing"
- then
-- nroff="$Fgroff -Tlatin1 -mandoc"
-+ nroff="$Fgroff -Tutf8 -mandoc"
- else
-- nroff="$Fnroff -Tlatin1 -mandoc"
-+ nroff="$Fnroff -Tutf8 -mandoc"
- fi
- troff="$Fgroff -Tps -mandoc"
-- jnroff="$Fgroff -Tnippon -mandocj"
-+ jnroff="$Fjnroff -Tutf8 -mandocj"
- fi
- eqn="$Fgeqn -Tps"
-- neqn="$Fgeqn -Tlatin1"
-- jneqn="$Fgeqn -Tnippon"
-+ neqn="$Fgeqn -Tutf8"
-+ jneqn="$Fgeqn -Tutf8"
- tbl="$Fgtbl"
- col="$Fcol"
- vgrind="$Fvgrind"
diff --git a/meta/recipes-extended/man/man/man-1.5k-confpath.patch b/meta/recipes-extended/man/man/man-1.5k-confpath.patch
deleted file mode 100644
index b5746c2df8..0000000000
--- a/meta/recipes-extended/man/man/man-1.5k-confpath.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- configure 2006-05-01 19:56:14.000000000 +0200
-+++ configure.oden 2008-12-21 19:16:50.000000000 +0100
-@@ -198,7 +198,7 @@
- confdir="${confprefix}/share/misc"
- fi
- fi
--conffilename="man.conf"
-+conffilename="man.config"
-
- if test "$RANDOM" = "$RANDOM"; then
- # Plain old Bourne shell.
diff --git a/meta/recipes-extended/man/man/man-1.5k-nonascii.patch b/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
deleted file mode 100644
index d662d9b6a7..0000000000
--- a/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./src/apropos.sh.nonascii 2001-11-23 00:30:42.000000000 +0100
-+++ ./src/apropos.sh 2002-08-13 15:44:53.000000000 +0200
-@@ -18,9 +18,9 @@
-
- # When man pages in your favorite locale look to grep like binary files
- # (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
--aproposgrepopt1='i'
-+aproposgrepopt1='ia'
- aproposgrepopt2=''
--whatisgrepopt1='iw'
-+whatisgrepopt1='iwa'
- whatisgrepopt2='^'
- grepopt1=$%apropos_or_whatis%grepopt1
- grepopt2=$%apropos_or_whatis%grepopt2
diff --git a/meta/recipes-extended/man/man/man-1.5k-sofix.patch b/meta/recipes-extended/man/man/man-1.5k-sofix.patch
deleted file mode 100644
index 50b925288e..0000000000
--- a/meta/recipes-extended/man/man/man-1.5k-sofix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/src/man.c.sofix Thu Nov 22 14:51:44 2001
-+++ man-1.5j/src/man.c Thu Nov 22 14:52:44 2001
-@@ -300,7 +300,7 @@
-
- if (strlen(name0) >= sizeof(ultname))
- return name0;
-- strcpy(ultname, name0);
-+ strncpy(ultname, name0, BUFSIZE-32);
- name = ultname;
-
- again:
-@@ -332,7 +332,7 @@
- * .so files - we could glob for all possible extensions,
- * for now: only try .gz
- */
-- else if (fp == NULL && get_expander(".gz") &&
-+ if (fp == NULL && get_expander(".gz") &&
- strlen(name)+strlen(".gz") < BUFSIZE) {
- strcat(name, ".gz");
- fp = fopen (name, "r");
diff --git a/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch b/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
deleted file mode 100644
index 051299906b..0000000000
--- a/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./configure.ad 2003-12-11 19:17:10.000000000 +0100
-+++ ./configure 2003-12-11 19:17:27.000000000 +0100
-@@ -26,7 +26,7 @@
- # (Indeed, -r may cause the terminal to get into funny states.
- # Very inconvenient. For viewing pages in strange locales, set LC_*.)
- #
--DEFAULTLESSOPT="-is"
-+DEFAULTLESSOPT="-isr"
- #
- # Note that not creating any cat directories (/var/cache/man or so)
- # and not making man suid or sgid is recommended.
diff --git a/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch b/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
deleted file mode 100644
index bc97f56b9a..0000000000
--- a/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./configure.less 2003-12-11 19:18:15.000000000 +0100
-+++ ./configure 2003-12-11 19:20:03.000000000 +0100
-@@ -401,18 +401,13 @@
-
- if test "$ans" = "false"
- then
-- for i in more less cmp cat awk gawk mawk
-- do
-- eval F$i="missing"
-- for j in $DEFPATH
-- do
-- if test -f $j/$i
-- then
-- eval F$i=$j/$i
-- break
-- fi
-- done
-- done
-+ Fmore=/bin/more
-+ Fless=/usr/bin/less
-+ Fcmp=/usr/bin/cmp
-+ Fcat=/bin/cat
-+ Fgawk=/bin/gawk
-+ Fawk=/bin/gawk
-+ Fmawk=missing
- troff=""
- nroff=""
- jnroff=""
-@@ -457,6 +452,19 @@
- fi
- done
- done
-+ Fgroff=/usr/bin/groff
-+ Fgeqn=/usr/bin/geqn
-+ Fgtbl=/usr/bin/gtbl
-+ Fcol=/usr/bin/col
-+ Fgrefer=/usr/bin/grefer
-+ Fgpic=/usr/bin/gpic
-+ Fmore=/bin/more
-+ Fless=/usr/bin/less
-+ Fcmp=/usr/bin/cmp
-+ Fcat=/bin/cat
-+ Fgawk=/bin/gawk
-+
-+
- for i in eqn tbl refer pic
- do
- if test `eval echo \\$Fg$i` = "missing"
diff --git a/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch b/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
deleted file mode 100644
index c85ff1d8c7..0000000000
--- a/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5m2/configure.color 2006-09-16 18:27:37.000000000 +0200
-+++ man-1.5m2/configure 2006-09-16 18:28:44.000000000 +0200
-@@ -539,6 +539,8 @@
- troff="$troff -c"
- nroff="$nroff -c"
- jnroff="$jnroff -c"
-+else
-+ troff="$troff -c"
- fi
-
- if [ x$default = x ]; then
diff --git a/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch b/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
deleted file mode 100644
index 8af78eab7b..0000000000
--- a/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5m2/src/util.c_sigpipe 2006-12-09 13:43:21.000000000 +0100
-+++ man-1.5m2/src/util.c 2006-12-09 13:53:13.000000000 +0100
-@@ -116,11 +116,14 @@
- static int
- system1 (const char *command) {
- void (*prev_handler)(int) = signal (SIGINT,catch_int);
-+ signal (SIGPIPE,SIG_IGN);
- int ret = system(command);
-
- /* child terminated with signal? */
- if (WIFSIGNALED(ret) &&
-- (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
-+ (WTERMSIG(ret) == SIGINT ||
-+ WTERMSIG(ret) == SIGPIPE ||
-+ WTERMSIG(ret) == SIGQUIT))
- exit(1);
-
- /* or we caught an interrupt? */
-@@ -128,6 +131,7 @@
- exit(1);
-
- signal(SIGINT,prev_handler);
-+ signal(SIGPIPE,SIG_DFL);
- return ret;
- }
-
diff --git a/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch b/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
deleted file mode 100644
index e321325d63..0000000000
--- a/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh
---- man-1.6e.orig/src/apropos.sh 2007-05-18 13:49:31.000000000 -0300
-+++ man-1.6e/src/apropos.sh 2007-05-18 14:24:33.000000000 -0300
-@@ -60,16 +60,56 @@
- esac
- done
-
-+# list of languages to look for
-+LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '`
-+DIR_LIST=""
-+for d in /var/cache/man $manpath /usr/lib
-+do
-+ for l in $LANG_LIST
-+ do
-+ if [ -d $d/$l ]
-+ then
-+ # check that the path is not already in the list
-+ if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null
-+ then
-+ DIR_LIST="$DIR_LIST $d/$l"
-+ fi
-+ fi
-+ done
-+ DIR_LIST="$DIR_LIST $d"
-+ # check that the path is not already in the list
-+ if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null
-+ then
-+ DIR_LIST="$DIR_LIST $d/$l"
-+ fi
-+done
-+
- while [ "$1" != "" ]
- do
- found=0
-- for d in /var/cache/man $manpath /usr/lib
-+ # in order not to display lines in more than one language for
-+ # a same man page; we check that a given man page name
-+ # hasn't already been displayed
-+ BAZ=""
-+ for d in $DIR_LIST
- do
- if [ -f $d/whatis ]
- then
-- if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
-+ if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis`
- then
-- found=1
-+ # the LC_ALL=C is needed in case the text is
-+ # in a different encoding than the locale
-+ BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u`
-+ for i in $BAR
-+ do
-+ if ! echo "$BAZ" | grep "$i" > /dev/null
-+ then
-+ BAZ="$BAZ $i"
-+ i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`"
-+ echo -e "$FOO" | grep "$i"
-+ found=1
-+ fi
-+ done
- # Some people are satisfied with a single occurrence
- # But it is better to give all
- # break
-diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
---- man-1.6e.orig/src/makewhatis.sh 2007-05-18 13:49:31.000000000 -0300
-+++ man-1.6e/src/makewhatis.sh 2007-05-18 13:50:07.000000000 -0300
-@@ -41,12 +41,32 @@
-
- program=`basename $0`
-
-+# this allows to define language specific values fro NAME, DESCRIPTION
-+# if not defined, using those default values
-+if [ -z "$MAN_NAME" ]
-+then
-+ MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟÎΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\
-+NÉV|NOME|åå‰|ì´ë¦„|NAAM|NAZWA|NUME|ИМЯ|MENO|ÐÐЗВÐ|å称|å稱"
-+fi
-+if [ -z "$MAN_DESCRIPTION" ]
-+then
-+ MAN_DESCRIPTION="ОПИСÐÐИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\
-+ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÃRÃS|DESCRIZIONE|\
-+説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|æè¿°"
-+fi
-+# make them into awk regexp
-+MAN_NAME="^(${MAN_NAME})";
-+MAN_DESCRIPTION="^(${MAN_DESCRIPTION})";
-+
- # In case both /usr/man and /usr/share/man exist, the former is local
- # and should be first.
- # It is a bug to add /var/cache/man to DEFCATPATH.
- dm=
- for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
- do
-+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
-+ if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi
-+ fi
- if [ -d $d ]; then
- if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
- fi
-@@ -55,6 +75,9 @@
- dc=
- for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
- do
-+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
-+ if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi
-+ fi
- if [ -d $d ]; then
- if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
- fi
-@@ -194,7 +217,7 @@
- section=$i
- curdir=$mandir/${pages}$i
- export section verbose curdir
-- find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
-+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
-
- function readline() {
- if (use_zcat || use_bzcat) {
-@@ -261,13 +284,7 @@
- gsub(/.\b/, "");
- if (($1 ~ /^\.[Ss][Hh]/ &&
- ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
-- $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||
-- $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
-- $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
-- $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ ||
-- $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ ||
-- $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ ||
-- $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) ||
-+ $2 ~ MAN_NAME )) ||
- (pages == "cat" && $1 ~ /^NAME/)) {
- if (!insh) {
- insh = 1;
-@@ -278,6 +295,7 @@
- if ($1 ~ /^\.[Ss][HhYS]/ ||
- (pages == "cat" &&
- ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
-+ $1 ~ MAN_DESCRIPTION ||
- $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
- $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
- $0 ~ /^[^ ]/))) {
diff --git a/meta/recipes-extended/man/man/man-1.6e-mandirs.patch b/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
deleted file mode 100644
index b240064c98..0000000000
--- a/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.6e.orig/src/man.conf.in 2005-08-20 20:26:06.000000000 -0300
-+++ man-1.6e/src/man.conf.in 2007-05-18 10:30:29.000000000 -0300
-@@ -36,11 +36,12 @@
- #
- # Every automatically generated MANPATH includes these fields
- #
--MANPATH /usr/man
- MANPATH /usr/share/man
-+MANPATH /usr/X11R6/man
- MANPATH /usr/local/man
- MANPATH /usr/local/share/man
--MANPATH /usr/X11R6/man
-+MANPATH /usr/kerberos/man
-+MANPATH /usr/man
- #
- # Uncomment if you want to include one of these by default
- #
-@@ -67,6 +68,9 @@
- MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
- MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
- MANPATH_MAP /usr/bin/mh /usr/share/man
-+MANPATH_MAP /usr/kerberos/bin /usr/kerberos/man
-+MANPATH_MAP /usr/kerberos/sbin /usr/kerberos/man
-+
- #
- # NOAUTOPATH keeps man from automatically adding directories that look like
- # manual page directories to the path.
diff --git a/meta/recipes-extended/man/man/man-1.6e-new_sections.patch b/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
deleted file mode 100644
index fb9773c646..0000000000
--- a/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.6e.orig/configure 2006-05-01 14:56:14.000000000 -0300
-+++ man-1.6e/configure 2007-05-18 14:35:43.000000000 -0300
-@@ -960,7 +960,7 @@
-
- # What sections do we anticipate?
-
--tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
-+tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o"
-
- if [ x$default = x ]; then
- echo ""
diff --git a/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch b/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
deleted file mode 100644
index 1d1cb0c724..0000000000
--- a/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: man-1.6f/src/makewhatis.sh
-===================================================================
---- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:42:34.000000000 -0800
-+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:42:35.667428347 -0800
-@@ -124,7 +124,7 @@
- continue;;
- -s) setsections=1
- continue;;
-- -u) findarg="-ctime 0"
-+ -u) findarg="-newer /var/cache/man/whatis"
- update=1
- continue;;
- -v) verbose=1
-@@ -165,14 +165,7 @@
- # first truncate all the whatis files that will be created new,
- # then only update - we might visit the same directory twice
- if [ x$update = x ]; then
-- for pages in man cat
-- do
-- eval path="\$$pages"path
-- for mandir in $path
-- do
-- cp /dev/null $mandir/whatis
-- done
-- done
-+ cp /dev/null /var/cache/man/whatis
- fi
-
- for pages in man cat
diff --git a/meta/recipes-extended/man/man/man-1.6e-security.patch b/meta/recipes-extended/man/man/man-1.6e-security.patch
deleted file mode 100644
index 312a882f06..0000000000
--- a/meta/recipes-extended/man/man/man-1.6e-security.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
---- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300
-+++ man-1.6e/src/makewhatis.sh 2007-05-18 10:18:31.000000000 -0300
-@@ -45,7 +45,7 @@
- # and should be first.
- # It is a bug to add /var/cache/man to DEFCATPATH.
- dm=
--for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man
-+for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
- do
- if [ -d $d ]; then
- if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
-@@ -53,7 +53,7 @@
- done
- DEFMANPATH=$dm
- dc=
--for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
-+for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
- do
- if [ -d $d ]; then
- if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
-@@ -76,12 +76,12 @@
- # We try here to be careful (and avoid preconstructed symlinks)
- # in case makewhatis is run as root, by creating a subdirectory of /tmp.
-
--TMPFILEDIR=/tmp/whatis.tmp.dir.$$
--rm -rf $TMPFILEDIR
--if ! mkdir -m 0700 $TMPFILEDIR; then
-- echo Could not create $TMPFILEDIR
-- exit 1;
-+TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX`
-+if [ $? -ne 0 ]; then
-+ echo "$0: Can't create temp file, exiting..."
-+ exit 1
- fi
-+chmod 0700 $TMPFILEDIR
- TMPFILE=$TMPFILEDIR/w
-
- # make sure TMPFILEDIR is deleted if program is killed or terminates
-diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c
---- man-1.6e.orig/src/man.c 2006-05-01 17:34:22.000000000 -0300
-+++ man-1.6e/src/man.c 2007-05-18 10:11:33.000000000 -0300
-@@ -1234,7 +1234,6 @@
- #endif
-
-
--#if 0
- {
- /* There are no known cases of buffer overflow caused by
- excessively long environment variables. In case you find one,
-@@ -1257,7 +1256,6 @@
- MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET,
- MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */
- }
--#endif
-
-
- #ifndef __FreeBSD__
diff --git a/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch b/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
deleted file mode 100644
index 568f742100..0000000000
--- a/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c
---- man-1.6e.orig/catopen/catopen.c 2005-08-20 20:26:06.000000000 -0300
-+++ man-1.6e/catopen/catopen.c 2007-05-18 11:31:05.000000000 -0300
-@@ -9,22 +9,63 @@
- extern char *index (const char *, int); /* not always in <string.h> */
- extern char *my_malloc(int); /* in util.c */
-
-+/* if the program has sgid/suid privileges then getenv doesn't return
-+ * NLSPATH; so we set here a good default value.
-+ */
- #ifndef DEFAULT_NLSPATH
- # if __GLIBC__ >= 2
--# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
-+# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N"
- # else
- # define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
- # endif
- #endif
-
--static nl_catd my_catopenpath(char *name, char *path);
-+static nl_catd my_catopenpath(char *name, char *path, char *lang);
-
- static /* this source included in gripes.c */
- nl_catd
- my_catopen(char *name, int oflag) {
-- nl_catd fd;
-+ nl_catd fd = (nl_catd) -1;
-+
-+ /* using first the my_catopenpath, which looks with LANGUAGE
-+ * and only if it fails ressort to catopen, it gives better i18n
-+ */
-+ {
-+ char *nlspath, *lang, *s;
-
-- fd = catopen(name, oflag);
-+ /*
-+ * "If NLSPATH does not exist in the environment, or if a
-+ * message catalog cannot be opened in any of the paths specified
-+ * by NLSPATH, then an implementation defined default path is used"
-+ */
-+ nlspath = getenv("NLSPATH");
-+ if (!nlspath)
-+ nlspath = DEFAULT_NLSPATH;
-+
-+ lang = getenv("LANGUAGE");
-+ if (!lang)
-+ lang = getenv("LC_ALL");
-+ if (!lang)
-+ lang = getenv("LC_MESSAGES");
-+ if (!lang)
-+ lang = getenv("LANG");
-+ if (!lang)
-+ lang = "";
-+
-+ while(*lang && (fd == (nl_catd) -1)) {
-+ s = index(lang, ':');
-+ if (s) *s = 0;
-+ fd = my_catopenpath(name, nlspath, lang);
-+ if (s) lang=s+1;
-+ else lang = "";
-+ }
-+ if (fd == (nl_catd) -1)
-+ fd = my_catopenpath(name, nlspath, "en");
-+ }
-+
-+ /* still not found, use the system catopen */
-+ if (fd == (nl_catd) -1)
-+ fd = catopen(name, oflag);
-
- if (fd == (nl_catd) -1 && oflag) {
- oflag = 0;
-@@ -32,8 +73,6 @@
- }
-
- if (fd == (nl_catd) -1) {
-- char *nlspath;
--
- /* The libc catopen fails - let us see if we can do better */
- /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
-
-@@ -58,17 +97,6 @@
- #endif
- }
-
-- /*
-- * "If NLSPATH does not exist in the environment, or if a
-- * message catalog cannot be opened in any of the paths specified
-- * by NLSPATH, then an implementation defined default path is used"
-- */
--
-- nlspath = getenv("NLSPATH");
-- if (nlspath)
-- fd = my_catopenpath(name, nlspath);
-- if (fd == (nl_catd) -1)
-- fd = my_catopenpath(name, DEFAULT_NLSPATH);
- }
- return fd;
- }
-@@ -90,15 +118,13 @@
- *
- */
- static nl_catd
--my_catopenpath(char *name, char *nlspath) {
-- int fd;
-+my_catopenpath(char *name, char *nlspath, char *lang) {
- nl_catd cfd = (nl_catd) -1;
-- char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
-+ char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c;
- int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
-
- namesz = strlen(name);
-
-- lang = getenv("LANG");
- if (!lang)
- lang = "";
- langsz = strlen(lang);
-@@ -194,14 +220,9 @@
- path = s+1;
- } else
- path = 0;
-- fd = open(file, O_RDONLY);
-- if (fd != -1) {
-- /* we found the right catalog - but we don't know the
-- type of nl_catd, so close it again and ask libc */
-- close(fd);
-- cfd = catopen(file, 0);
-- break;
-- }
-+ cfd = catopen(file, 0);
-+ if (cfd != (nl_catd) -1)
-+ break;
- }
-
- free(path0);
-diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c
---- man-1.6e.orig/src/manpath.c 2006-08-03 18:18:33.000000000 -0300
-+++ man-1.6e/src/manpath.c 2007-05-18 11:02:48.000000000 -0300
-@@ -282,13 +282,14 @@
- /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
- the return value of setlocale is an opaque string. */
- /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
-- if((lang = getenv("LC_ALL")) != NULL)
-+ /* LANGUAGE is GNU/Linux and overrules all */
-+ if((lang = getenv("LANGUAGE")) != NULL)
- split2(dir, lang, add_to_mandirlist_x, perrs);
-- if((lang = getenv("LC_MESSAGES")) != NULL)
-+ else if((lang = getenv("LC_ALL")) != NULL)
- split2(dir, lang, add_to_mandirlist_x, perrs);
-- if((lang = getenv("LANG")) != NULL)
-+ else if((lang = getenv("LC_MESSAGES")) != NULL)
- split2(dir, lang, add_to_mandirlist_x, perrs);
-- if((lang = getenv("LANGUAGE")) != NULL)
-+ else if((lang = getenv("LANG")) != NULL)
- split2(dir, lang, add_to_mandirlist_x, perrs);
- add_to_mandirlist_x(dir, 0, perrs);
- }
diff --git a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
deleted file mode 100644
index fc4ed3135d..0000000000
--- a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: man-1.6f/src/makewhatis.sh
-===================================================================
---- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:51:45.000000000 -0800
-+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:59:35.399799412 -0800
-@@ -164,10 +164,15 @@
- fi
- catpath=`echo ${catpath} | tr : ' '`
-
-+#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
-+WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
-+[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
-+
- # first truncate all the whatis files that will be created new,
- # then only update - we might visit the same directory twice
- if [ x$update = x ]; then
-- cp /dev/null /var/cache/man/whatis
-+ mkdir -p $WHATIS_DIR/
-+ /bin/echo -n > $WHATIS_DIR/whatis
- fi
-
- for pages in man cat
-@@ -180,13 +185,7 @@
- echo "about to enter $mandir" > /dev/stderr
- fi
-
-- # kludge for Slackware's /usr/man/preformat
-- if [ $mandir = /usr/man/preformat ]
-- then
-- mandir1=/usr/man
-- else
-- mandir1=$mandir
-- fi
-+ mandir1=$WHATIS_DIR
-
- # if $mandir is on a readonly partition, and the whatis file
- # is not a symlink, then let's skip trying to update it
-@@ -207,11 +206,6 @@
- fi
- fi
-
-- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
-- if [ x$verbose != x ]; then
-- echo skipping $mandir - we did it already > /dev/stderr
-- fi
-- else
- here=`pwd`
- cd $mandir
- for i in $sections
-@@ -447,7 +447,6 @@
-
- chmod 644 ${mandir1}/whatis
- rm $TMPFILE
-- fi
- done
- done
diff --git a/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch b/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
deleted file mode 100644
index 4631d2d063..0000000000
--- a/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Fix a build error when building man.config.5 (a remnant of a long
-ago previous patch). Optimized the manpages Makefile for parallel
-builds. Also, fix compile warnings in a couple other files.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle@intel.com>
-
---- man-1.6g/man/Makefile.in.orig 2016-03-28 17:31:08.723949180 -0700
-+++ man-1.6g/man/Makefile.in 2016-03-28 17:46:12.866910386 -0700
-@@ -5,6 +5,13 @@
- ALL = man.1 whatis.1 apropos.1 man.config.5
- MAYBE8 = makewhatis
-
-+SUBDIRS := $(shell echo @languages@)
-+
-+.PHONY: subdirs $(SUBDIRS)
-+
-+man.config.man: man.conf.man
-+ @cp $< $@
-+
- .SUFFIXES: .man .1 .5 .8
-
- .man.1:
-@@ -19,11 +26,11 @@
- INSTALL = @INSTALL@ -c -m 644
-
- # Where to put the manual pages.
--mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
-+mandir := $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
-
- all: $(ALL)
- for i in $(MAYBE8); \
-- do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
-+ do if test -f $$i.man; then $(MAKE) -f ../Makefile $$i.8; fi; done
-
- install: $(ALL)
- mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
-@@ -38,24 +45,27 @@
- rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
-
- spotless:
-+ rm -f man.config.man
-
- subdirs:
-- @for i in @languages@; do if test -d $$i; then echo; \
-- echo "==== Making the `cat $$i.txt` man pages. ===="; \
-- cd $$i; make -f ../Makefile; cd ..; \
-- else echo "==== No $$i man pages found. ===="; fi; done
-+subdirs: $(SUBDIRS)
-+$(SUBDIRS):
-+ if test -d $@; then echo; \
-+ echo "==== Making the `cat $@.txt` man pages. ===="; \
-+ $(MAKE) -C $@ -f ../Makefile all; \
-+ else echo "==== No $@ man pages found. ===="; fi
-
- installsubdirs:
- @for i in @languages@; do if test -d $$i; then echo; \
- echo "==== Installing the `cat $$i.txt` man pages. ===="; \
- cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
-- export SLANG; make -f ../Makefile install; cd ..; \
-+ export SLANG; $(MAKE) -f ../Makefile install; cd ..; \
- else echo "==== No $$i man pages found. ===="; fi; done
-
- cleansubdirs:
-- @for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
-+ @for i in ??; do $(MAKE) -C $$i -f ../Makefile clean; done
- rm -f core *~
-
- spotlesssubdirs:
-- for i in ??; do cd $$i; make -f ../Makefile spotless; cd ..; done
-+ for i in ??; do $(MAKE) -C $$i -f ../Makefile spotless; done
- rm -f Makefile
-
---- man-1.6g/src/gripes.c.orig 2006-11-21 11:53:44.000000000 -0800
-+++ man-1.6g/src/gripes.c 2016-03-30 16:32:31.601103487 -0700
-@@ -7,8 +7,6 @@
-
- extern char *msg[];
-
--static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */
--
- #ifdef NONLS
-
- static char *
-@@ -30,6 +28,8 @@
- #include <nl_types.h>
- #include "../catopen/catopen.c"
-
-+static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */
-+
- nl_catd catfd = (nl_catd) -1;
- int cat_is_open = 0;
-
---- man-1.6g/src/manfile.c.orig 2005-08-20 16:26:06.000000000 -0700
-+++ man-1.6g/src/manfile.c 2016-03-29 09:10:21.527841285 -0700
-@@ -299,7 +299,7 @@
- const char *((*tocat)(const char *man_filename, const char *ext,
- int flags))) {
- char **sl;
-- struct manpage *res;
-+ struct manpage *res = 0;
-
- standards = (flags & (FHS | FSSTND | DO_HP | DO_IRIX));
- to_cat_filename = tocat;
diff --git a/meta/recipes-extended/man/man/man-1.6g-configure.patch b/meta/recipes-extended/man/man/man-1.6g-configure.patch
deleted file mode 100644
index 106cc98781..0000000000
--- a/meta/recipes-extended/man/man/man-1.6g-configure.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Use BUILD_CC and target include files for configuration tests.
-If cross-compiling, force pathnames for helper programs, since
-autodiscovery by the configure script will not work.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle at intel.com>
-
---- man-1.6g/configure.orig 2016-03-28 17:46:12.734910976 -0700
-+++ man-1.6g/configure 2016-03-30 21:47:45.110572908 -0700
-@@ -216,7 +216,8 @@
- INCLUDEDIR=${INCLUDEDIR-/usr/include}
-
- rm -f conftest conftest.c
--compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
-+# since we are interested in target feature support, use that sysroot
-+compile="$BUILD_CC -isystem/${PKG_CONFIG_SYSROOT_DIR}/usr/include $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
-
- # Check for various header files.
-
-@@ -455,19 +456,23 @@
- fi
- done
- done
-- Fgroff=/usr/bin/groff
-- Fnroff=/usr/bin/nroff
-- Fjnroff=/usr/bin/nroff
-- Fgeqn=/usr/bin/geqn
-- Fgtbl=/usr/bin/gtbl
-- Fcol=/usr/bin/col
-- Fgrefer=/usr/bin/grefer
-- Fgpic=/usr/bin/gpic
-- Fmore=/bin/more
-- Fless=/usr/bin/less
-- Fcmp=/usr/bin/cmp
-- Fcat=/bin/cat
-- Fgawk=/bin/gawk
-+ if [ $BUILD_CC != $CC ]; then
-+ # cross compiling => target fs not available, so force defaults
-+ Fgroff=/usr/bin/groff
-+ Fnroff=/usr/bin/nroff
-+ Fjnroff=/usr/bin/nroff
-+ Fgeqn=/usr/bin/eqn
-+ Fgneqn=/usr/bin/neqn
-+ Fgtbl=/usr/bin/tbl
-+ Fcol=/usr/bin/col
-+ Fgrefer=/usr/bin/refer
-+ Fgpic=/usr/bin/pic
-+ Fmore=/bin/more
-+ Fless=/usr/bin/less
-+ Fcmp=/usr/bin/cmp
-+ Fcat=/bin/cat
-+ Fgawk=/usr/bin/gawk
-+ fi
-
-
- for i in eqn tbl refer pic
-@@ -507,8 +512,8 @@
- jnroff="$Fjnroff -Tutf8 -mandocj"
- fi
- eqn="$Fgeqn -Tps"
-- neqn="$Fgeqn -Tutf8"
-- jneqn="$Fgeqn -Tutf8"
-+ neqn="$Fgneqn -Tutf8"
-+ jneqn="$Fgneqn -Tutf8"
- tbl="$Fgtbl"
- col="$Fcol"
- vgrind="$Fvgrind"
diff --git a/meta/recipes-extended/man/man/man-1.6g-parallel.patch b/meta/recipes-extended/man/man/man-1.6g-parallel.patch
deleted file mode 100644
index 72a88b898a..0000000000
--- a/meta/recipes-extended/man/man/man-1.6g-parallel.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-The Makefile for man has a rule to create two generated targets with
-a program run from the shell. Because the rule was run twice, with
-parallel make, the generated files were being overwritten at the same
-time they were being compiled. This patch forces the rule to be run
-only once.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle at intel.com>
-
---- man-1.6g/src/Makefile.in.orig 2010-12-31 12:28:46.000000000 -0800
-+++ man-1.6g/src/Makefile.in 2016-03-28 09:09:16.845458798 -0700
-@@ -43,8 +43,10 @@
- makemsg:
- $(BUILD_CC) -o makemsg makemsg.c
-
--msg.c gripedefs.h: ../msgs/mess.en makemsg
-+msg.c gripedefs.h: genfiles-stamp
-+genfiles-stamp: ../msgs/mess.en makemsg
- ./makemsg ../msgs/mess.en gripedefs.h msg.c
-+ touch genfiles-stamp
-
- # glob.c does not have prototypes
- glob.o: glob.c ndir.h
-@@ -117,4 +119,4 @@
-
- spotless: clean
- rm -f Makefile config.status paths.h version.h man.conf
-- rm -f gripedefs.h msg.c mess.*.cat
-+ rm -f gripedefs.h msg.c mess.*.cat genfiles-stamp
diff --git a/meta/recipes-extended/man/man/man-1.6g-whatis3.patch b/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
deleted file mode 100644
index 6334456857..0000000000
--- a/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Do not use absolute path for awk while getting the path of awk
-when running makewhatis.
-This can avoid errors if path of awk changes.
-
-Upstream-Status: Submitted [man-1.6g]
-
-Signed-off-by: Jian Liu <jian.liu@windriver.com>
-
-diff -Nur man-1.6g.orig/src/makewhatis.sh man-1.6g/src/makewhatis.sh
---- man-1.6g.orig/src/makewhatis.sh 2015-02-25 16:13:12.657611419 +0800
-+++ man-1.6g/src/makewhatis.sh 2015-02-25 16:14:49.334694815 +0800
-@@ -67,7 +67,7 @@
- # but that leads to problems and bugs.
-
- # AWK=/usr/bin/gawk
--AWK=@awk@
-+AWK=`which awk`
-
- # Find a place for our temporary files. If security is not a concern, use
- # TMPFILE=/tmp/whatis$$; TMPFILEDIR=none
diff --git a/meta/recipes-extended/man/man/man.1.gz b/meta/recipes-extended/man/man/man.1.gz
deleted file mode 100644
index c368045153..0000000000
--- a/meta/recipes-extended/man/man/man.1.gz
+++ /dev/null
Binary files differ
diff --git a/meta/recipes-extended/man/man/man.7.gz b/meta/recipes-extended/man/man/man.7.gz
deleted file mode 100644
index e85af82426..0000000000
--- a/meta/recipes-extended/man/man/man.7.gz
+++ /dev/null
Binary files differ
diff --git a/meta/recipes-extended/man/man/man.conf b/meta/recipes-extended/man/man/man.conf
deleted file mode 100644
index fc10be2758..0000000000
--- a/meta/recipes-extended/man/man/man.conf
+++ /dev/null
@@ -1,141 +0,0 @@
-#
-# Generated automatically from man.conf.in by the
-# configure script.
-#
-# man.conf from man-1.5p
-#
-# For more information about this file, see the man pages man(1)
-# and man.conf(5).
-#
-# This file is read by man to configure the default manpath (also used
-# when MANPATH contains an empty substring), to find out where the cat
-# pages corresponding to given man pages should be stored,
-# and to map each PATH element to a manpath element.
-# It may also record the pathname of the man binary. [This is unused.]
-# The format is:
-#
-# MANBIN pathname
-# MANPATH manpath_element [corresponding_catdir]
-# MANPATH_MAP path_element manpath_element
-#
-# If no catdir is given, it is assumed to be equal to the mandir
-# (so that this dir has both man1 etc. and cat1 etc. subdirs).
-# This is the traditional Unix setup.
-# Certain versions of the FSSTND recommend putting formatted versions
-# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
-# The keyword FSSTND will cause this behaviour.
-# Certain versions of the FHS recommend putting formatted versions of
-# /usr/.../share/man/[locale/]manx/page.x into
-# /var/cache/man/.../[locale/]catx/page.x.
-# The keyword FHS will cause this behaviour (and overrides FSSTND).
-# Explicitly given catdirs override.
-#
-# FSSTND
-FHS
-#
-# This file is also read by man in order to find how to call nroff, less, etc.,
-# and to determine the correspondence between extensions and decompressors.
-#
-# MANBIN /usr/local/bin/man
-#
-# Every automatically generated MANPATH includes these fields
-#
-MANPATH /usr/man
-MANPATH /usr/share/man
-MANPATH /usr/local/man
-MANPATH /usr/local/share/man
-MANPATH /usr/X11R6/man
-#
-# Uncomment if you want to include one of these by default
-#
-# MANPATH /opt/*/man
-# MANPATH /usr/lib/*/man
-# MANPATH /usr/share/*/man
-# MANPATH /usr/kerberos/man
-#
-# Set up PATH to MANPATH mapping
-#
-# If people ask for "man foo" and have "/dir/bin/foo" in their PATH
-# and the docs are found in "/dir/man", then no mapping is required.
-#
-# The below mappings are superfluous when the right hand side is
-# in the mandatory manpath already, but will keep man from statting
-# lots of other nearby files and directories.
-#
-MANPATH_MAP /bin /usr/share/man
-MANPATH_MAP /sbin /usr/share/man
-MANPATH_MAP /usr/bin /usr/share/man
-MANPATH_MAP /usr/sbin /usr/share/man
-MANPATH_MAP /usr/local/bin /usr/local/share/man
-MANPATH_MAP /usr/local/sbin /usr/local/share/man
-MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
-MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
-MANPATH_MAP /usr/bin/mh /usr/share/man
-#
-# NOAUTOPATH keeps man from automatically adding directories that look like
-# manual page directories to the path.
-#
-#NOAUTOPATH
-#
-# NOCACHE keeps man from creating cache pages ("cat pages")
-# (generally one enables/disable cat page creation by creating/deleting
-# the directory they would live in - man never does mkdir)
-#
-#NOCACHE
-#
-# Useful paths - note that COL should not be defined when
-# NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
-# not only is it superfluous, but it actually damages the output.
-# For use with utf-8, NROFF should be "nroff -mandoc" without -T option.
-# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
-#
-# If you have a new troff (version 1.18.1?) and its colored output
-# causes problems, add the -c option to TROFF, NROFF, JNROFF.
-#
-TROFF /usr/bin/groff -Tps -mandoc
-NROFF /usr/bin/nroff -Tlatin1 -mandoc
-JNROFF /usr/bin/groff -Tnippon -mandocj
-EQN /usr/bin/eqn -Tps
-NEQN /usr/bin/eqn -Tlatin1
-JNEQN /usr/bin/eqn -Tnippon
-TBL /usr/bin/tbl
-# COL /usr/bin/col
-REFER /usr/bin/refer
-PIC /usr/bin/pic
-VGRIND
-GRAP
-PAGER /usr/bin/less -isR
-CAT /bin/cat
-#
-# The command "man -a xyzzy" will show all man pages for xyzzy.
-# When CMP is defined man will try to avoid showing the same
-# text twice. (But compressed pages compare unequal.)
-#
-CMP /usr/bin/cmp -s
-#
-# Compress cat pages
-#
-COMPRESS /bin/bzip2
-COMPRESS_EXT .bz2
-#
-# Default manual sections (and order) to search if -S is not specified
-# and the MANSECT environment variable is not set.
-#
-MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
-#
-# Default options to use when man is invoked without options
-# This is mainly for the benefit of those that think -a should be the default
-# Note that some systems have /usr/man/allman, causing pages to be shown twice.
-#
-#MANDEFOPTIONS -a
-#
-# Decompress with given decompressor when input file has given extension
-# The command given must act as a filter.
-#
-.gz /bin/gunzip -c
-.bz2 /usr/bin/bunzip2 -c
-.xz /usr/bin/unxz -c
-.z
-.Z /bin/zcat
-.F
-.Y
diff --git a/meta/recipes-extended/man/man/manpath.5.gz b/meta/recipes-extended/man/man/manpath.5.gz
deleted file mode 100644
index c012ff8976..0000000000
--- a/meta/recipes-extended/man/man/manpath.5.gz
+++ /dev/null
Binary files differ
diff --git a/meta/recipes-extended/man/man_1.6g.bb b/meta/recipes-extended/man/man_1.6g.bb
deleted file mode 100644
index e78aa18cbc..0000000000
--- a/meta/recipes-extended/man/man_1.6g.bb
+++ /dev/null
@@ -1,86 +0,0 @@
-SUMMARY = "Online documentation tools"
-DESCRIPTION = "A set of documentation tools: man, apropos and whatis"
-SECTION = "console/utils"
-HOMEPAGE = "http://primates.ximian.com/~flucifredi/man"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-PR = "r1"
-
-DEPENDS = "groff less"
-
-def compress_pkg(d):
- if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
- compress = d.getVar("DOC_COMPRESS", True)
- if compress == "gz":
- return "gzip"
- elif compress == "bz2":
- return "bzip2"
- elif compress == "xz":
- return "xz"
- return ""
-
-RDEPENDS_${PN} += "${@compress_pkg(d)}"
-
-SRC_URI = "http://pkgs.fedoraproject.org/lookaside/pkgs/man2html/${BP}.tar.gz/ba154d5796928b841c9c69f0ae376660/${BP}.tar.gz \
- file://man-1.5k-confpath.patch;striplevel=0 \
- file://man-1.5h1-make.patch \
- file://man-1.5k-nonascii.patch \
- file://man-1.6e-security.patch \
- file://man-1.6e-mandirs.patch \
- file://man-1.5m2-bug11621.patch \
- file://man-1.5k-sofix.patch \
- file://man-1.5m2-buildroot.patch \
- file://man-1.6e-ro_usr.patch \
- file://man-1.5i2-newline.patch;striplevel=0 \
- file://man-1.5j-utf8.patch \
- file://man-1.5i2-overflow.patch \
- file://man-1.5j-nocache.patch \
- file://man-1.5i2-initial.patch \
- file://man-1.5h1-gencat.patch;striplevel=0 \
- file://man-1.5g-nonrootbuild.patch \
- file://man-1.5j-i18n.patch \
- file://man-1.6e-whatis2.patch \
- file://man-1.6e-use_i18n_vars_in_a_std_way.patch \
- file://man-1.5m2-no-color-for-printing.patch \
- file://man-1.5m2-sigpipe.patch \
- file://man-1.6e-i18n_whatis.patch \
- file://man-1.6e-new_sections.patch \
- file://man.1.gz;unpack=false \
- file://man.7.gz;unpack=false \
- file://man.conf \
- file://manpath.5.gz;unpack=false \
- file://man-1.6g-whatis3.patch \
- file://configure_sed.patch \
- file://man-1.6g-parallel.patch \
- file://man-1.6g-compile-warnings.patch \
- file://man-1.6g-configure.patch \
-"
-
-SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660"
-SRC_URI[sha256sum] = "ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f"
-
-CFLAGS += "-DSYSV"
-
-do_configure () {
- ${S}/configure -default -confdir /etc +sgid +fhs +lang all
-}
-
-
-do_install() {
- oe_runmake install DESTDIR=${D}
-}
-
-do_install_append(){
- mkdir -p ${D}${sysconfdir}
- mkdir -p ${D}${datadir}/man/man5
- mkdir -p ${D}${datadir}/man/man7
- cp ${WORKDIR}/man.conf ${D}${sysconfdir}/man.config
- cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/
- cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/
- cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/
-}
-
-
-RDEPENDS_${PN} = "less groff"
-FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.config"
diff --git a/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch b/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch
new file mode 100644
index 0000000000..e76aac8161
--- /dev/null
+++ b/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch
@@ -0,0 +1,99 @@
+From a54501d3c9541bc8600225aa2d42531f93c6def7 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Sat, 9 Nov 2019 20:01:48 -0600
+Subject: [PATCH] Add option to control configure args
+
+Embedding the configure time options into the executable can lead to
+non-reproducible builds, since configure options often have embedded
+paths. Add a configure time option to control if the configure args are
+embedded so this can be disabled.
+
+Upstream-Status: Submitted [https://midnight-commander.org/ticket/4031]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ configure.ac | 6 ++++++
+ src/args.c | 6 ++++++
+ src/textconf.c | 2 ++
+ 3 files changed, 14 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 19d1a76be..a1948f6b9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -544,6 +544,12 @@ dnl Clarify do we really need GModule
+ AM_CONDITIONAL([HAVE_GMODULE], [test -n "$g_module_supported" && \
+ test x"$textmode_x11_support" = x"yes" -o x"$enable_aspell" = x"yes"])
+
++AC_ARG_ENABLE([configure-args],
++ AS_HELP_STRING([--enable-configure-args], [Handle all compiler warnings as errors]))
++if test "x$enable_configure_args" != xno; then
++ AC_DEFINE([ENABLE_CONFIGURE_ARGS], 1, [Define to enable showing configure arguments in help])
++fi
++
+ AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments])
+
+ AC_CONFIG_FILES(
+diff --git a/src/args.c b/src/args.c
+index baef1a1c8..f8dc24020 100644
+--- a/src/args.c
++++ b/src/args.c
+@@ -95,7 +95,9 @@ static gboolean mc_args__nouse_subshell = FALSE;
+ #endif /* ENABLE_SUBSHELL */
+ static gboolean mc_args__show_datadirs = FALSE;
+ static gboolean mc_args__show_datadirs_extended = FALSE;
++#ifdef ENABLE_CONFIGURE_ARGS
+ static gboolean mc_args__show_configure_opts = FALSE;
++#endif
+
+ static GOptionGroup *main_group;
+
+@@ -125,6 +127,7 @@ static const GOptionEntry argument_main_table[] = {
+ NULL
+ },
+
++#ifdef ENABLE_CONFIGURE_ARGS
+ /* show configure options */
+ {
+ "configure-options", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE,
+@@ -132,6 +135,7 @@ static const GOptionEntry argument_main_table[] = {
+ N_("Print configure options"),
+ NULL
+ },
++#endif
+
+ {
+ "printwd", 'P', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,
+@@ -758,11 +762,13 @@ mc_args_show_info (void)
+ return FALSE;
+ }
+
++#ifdef ENABLE_CONFIGURE_ARGS
+ if (mc_args__show_configure_opts)
+ {
+ show_configure_options ();
+ return FALSE;
+ }
++#endif
+
+ return TRUE;
+ }
+diff --git a/src/textconf.c b/src/textconf.c
+index 1e0613e58..f39b9e028 100644
+--- a/src/textconf.c
++++ b/src/textconf.c
+@@ -232,10 +232,12 @@ show_datadirs_extended (void)
+
+ /* --------------------------------------------------------------------------------------------- */
+
++#ifdef ENABLE_CONFIGURE_ARGS
+ void
+ show_configure_options (void)
+ {
+ (void) printf ("%s\n", MC_CONFIGURE_ARGS);
+ }
++#endif
+
+ /* --------------------------------------------------------------------------------------------- */
+--
+2.23.0
+
diff --git a/meta/recipes-extended/mc/files/0001-Ticket-3629-configure.ac-drop-bundled-gettext.patch b/meta/recipes-extended/mc/files/0001-Ticket-3629-configure.ac-drop-bundled-gettext.patch
new file mode 100644
index 0000000000..8f357378d0
--- /dev/null
+++ b/meta/recipes-extended/mc/files/0001-Ticket-3629-configure.ac-drop-bundled-gettext.patch
@@ -0,0 +1,110 @@
+From 0d677a014a87b968d79eea2353ac4e342b0fd4ca Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed, 11 Sep 2019 22:58:18 +0100
+Subject: [PATCH] Ticket #3629: configure.ac: drop bundled gettext
+
+Bundled libintl did not support linking to internal static
+libraries (libmc in our case): directly specified static
+libraries are not pulled by libtool and are not usable for
+dynamic libraries as PIC-related flags are not passed for
+compilation.
+
+This renders bundled libintl library unusable.
+
+The change drops libintl bundling support and always relies
+on external libintl (or falls back to disabled NLS).
+
+On a related note gettext-0.20 drops support for bundling
+or libintl and this change will ease migration to newer version.
+
+The change is tested on x86_64-gentoo-linux-musl: mc builds
+and links all tests successfully. A few tests fail for lack
+of NLS support.
+
+Upstream-Status: Backport [https://github.com/MidnightCommander/mc/commit/f30e6ff283f4bc86177e4360de94dad794678395]
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.am | 2 +-
+ configure.ac | 5 +++--
+ doc/doxygen.cfg | 2 +-
+ lib/Makefile.am | 2 +-
+ m4.include/mc-i18n.m4 | 5 -----
+ 5 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ac05a83..f86f6ed 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to create Makefile.in.
+ AUTOMAKE_OPTIONS = 1.5
+
+-SUBDIRS = intl po lib src doc contrib misc
++SUBDIRS = po lib src doc contrib misc
+
+ if HAVE_TESTS
+ SUBDIRS += tests
+diff --git a/configure.ac b/configure.ac
+index a1948f6..bbc9e71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -272,7 +272,9 @@ dnl ############################################################################
+ dnl Internationalization
+ dnl ############################################################################
+
+-AM_GNU_GETTEXT([no-libtool], [need-ngettext])
++AC_CHECK_FUNCS([setlocale])
++
++AM_GNU_GETTEXT([external], [need-ngettext])
+ AM_GNU_GETTEXT_VERSION([0.18.1])
+
+ mc_I18N
+@@ -680,7 +682,6 @@ doc/hlp/pl/Makefile
+ doc/hlp/ru/Makefile
+ doc/hlp/sr/Makefile
+
+-intl/Makefile
+ po/Makefile.in
+ ])
+
+diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
+index 07bc973..1118062 100644
+--- a/doc/doxygen.cfg
++++ b/doc/doxygen.cfg
+@@ -91,7 +91,7 @@ FILE_PATTERNS = *.c \
+ RECURSIVE = YES
+ EXCLUDE =
+ EXCLUDE_SYMLINKS = NO
+-EXCLUDE_PATTERNS = */intl/* */tests/* */.git/*
++EXCLUDE_PATTERNS = */tests/* */.git/*
+ EXCLUDE_SYMBOLS =
+ EXAMPLE_PATH = $(SRCDIR)
+ EXAMPLE_PATTERNS =
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index c448e2d..455f9dd 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -74,4 +74,4 @@ else
+ libmc_la_LIBADD += $(GLIB_LIBS)
+ endif
+
+-libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(LIBINTL)
++libmc_la_LIBADD += $(PCRE_LIBS)
+diff --git a/m4.include/mc-i18n.m4 b/m4.include/mc-i18n.m4
+index dd10d00..ec08324 100644
+--- a/m4.include/mc-i18n.m4
++++ b/m4.include/mc-i18n.m4
+@@ -8,11 +8,6 @@ dnl @license GPL
+ dnl @copyright Free Software Foundation, Inc.
+
+ AC_DEFUN([mc_I18N],[
+-
+- if test "x$USE_INCLUDED_LIBINTL" = xyes; then
+- CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
+- fi
+-
+ dnl User visible support for charset conversion.
+ AC_ARG_ENABLE([charset],
+ AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@]))
diff --git a/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch b/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch
new file mode 100644
index 0000000000..bf8037cd28
--- /dev/null
+++ b/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch
@@ -0,0 +1,129 @@
+From cdc7c278212ae836eecb4cc9d42c29443cc128a0 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 6 Apr 2017 02:24:28 -0700
+Subject: [PATCH] mc: replace "perl -w" with "use warnings"
+
+The shebang's max length is usually 128 as defined in
+/usr/include/linux/binfmts.h:
+ #define BINPRM_BUF_SIZE 128
+
+There would be errors when @PERL@ is longer than 128, use
+'/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w'
+doesn't work:
+
+/usr/bin/env: perl -w: No such file or directory
+
+So replace "perl -w" with "use warnings" to make it work.
+
+The man2hlp.in already has "use warnings;", so just remove '-w' is OK.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ src/man2hlp/man2hlp.in | 2 +-
+ src/vfs/extfs/helpers/a+.in | 4 +++-
+ src/vfs/extfs/helpers/mailfs.in | 3 ++-
+ src/vfs/extfs/helpers/patchfs.in | 3 ++-
+ src/vfs/extfs/helpers/ulib.in | 4 +++-
+ src/vfs/extfs/helpers/uzip.in | 3 ++-
+ 6 files changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/src/man2hlp/man2hlp.in b/src/man2hlp/man2hlp.in
+index f095830..558a674 100644
+--- a/src/man2hlp/man2hlp.in
++++ b/src/man2hlp/man2hlp.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ #
+ # Man page to help file converter
+ # Copyright (C) 1994, 1995, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
+diff --git a/src/vfs/extfs/helpers/a+.in b/src/vfs/extfs/helpers/a+.in
+index 579441c..fe446f4 100644
+--- a/src/vfs/extfs/helpers/a+.in
++++ b/src/vfs/extfs/helpers/a+.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ #
+ # External filesystem for mc, using mtools
+ # Written Ludek Brukner <lubr@barco.cz>, 1997
+@@ -9,6 +9,8 @@
+
+ # These mtools components must be in PATH for this to work
+
++use warnings;
++
+ sub quote {
+ $_ = shift(@_);
+ s/([^\w\/.+-])/\\$1/g;
+diff --git a/src/vfs/extfs/helpers/mailfs.in b/src/vfs/extfs/helpers/mailfs.in
+index e9455be..059f41f 100644
+--- a/src/vfs/extfs/helpers/mailfs.in
++++ b/src/vfs/extfs/helpers/mailfs.in
+@@ -1,6 +1,7 @@
+-#! @PERL@ -w
++#! @PERL@
+
+ use bytes;
++use warnings;
+
+ # MC extfs for (possibly compressed) Berkeley style mailbox files
+ # Peter Daum <gator@cs.tu-berlin.de> (Jan 1998, mc-4.1.24)
+diff --git a/src/vfs/extfs/helpers/patchfs.in b/src/vfs/extfs/helpers/patchfs.in
+index ef407de..3ad4b53 100644
+--- a/src/vfs/extfs/helpers/patchfs.in
++++ b/src/vfs/extfs/helpers/patchfs.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ #
+ # Written by Adam Byrtek <alpha@debian.org>, 2002
+ # Rewritten by David Sterba <dave@jikos.cz>, 2009
+@@ -9,6 +9,7 @@
+
+ use bytes;
+ use strict;
++use warnings;
+ use POSIX;
+ use File::Temp 'tempfile';
+
+diff --git a/src/vfs/extfs/helpers/ulib.in b/src/vfs/extfs/helpers/ulib.in
+index 418611f..82c7ccf 100644
+--- a/src/vfs/extfs/helpers/ulib.in
++++ b/src/vfs/extfs/helpers/ulib.in
+@@ -1,9 +1,11 @@
+-#! @PERL@ -w
++#! @PERL@
+ #
+ # VFS to manage the gputils archives.
+ # Written by Molnár Károly (proton7@freemail.hu) 2012
+ #
+
++use warnings;
++
+ my %month = ('jan' => '01', 'feb' => '02', 'mar' => '03',
+ 'apr' => '04', 'may' => '05', 'jun' => '06',
+ 'jul' => '07', 'aug' => '08', 'sep' => '09',
+diff --git a/src/vfs/extfs/helpers/uzip.in b/src/vfs/extfs/helpers/uzip.in
+index b1c4f90..c8eb335 100644
+--- a/src/vfs/extfs/helpers/uzip.in
++++ b/src/vfs/extfs/helpers/uzip.in
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @PERL@
+ #
+ # zip file archive Virtual File System for Midnight Commander
+ # Version 1.4.0 (2001-08-07).
+@@ -9,6 +9,7 @@
+ use POSIX;
+ use File::Basename;
+ use strict;
++use warnings;
+
+ #
+ # Configuration options
+--
+2.10.2
+
diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch
deleted file mode 100644
index ee4ba9f26b..0000000000
--- a/meta/recipes-extended/mc/mc/mc-CTRL.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fix build with musl by ensuring CTRL is defined.
-
-musl does not define CTRL in <termios.h>, we could include <sys/ttydefaults.h>
-explicitly but it's easier just to ensure CTRL is defined.
-
-This patch is taken from Sabotage Linux, the license statement for patches and
-build scripts in Sabotage Linux says:
-
- To the extent possible under law, Christian Neukirchen has waived
- all copyright and related or neighboring rights to this work.
-
- http://creativecommons.org/publicdomain/zero/1.0/
-
-Therefore this should be good to include in OpenEmbedded.
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-
-Upstream-Status: Accepted (should be included in v4.8.14)
-
-diff -u mc-4.8.1.7.org/lib/tty/tty-ncurses.c mc-4.8.1.7/lib/tty/tty-ncurses.c
---- mc-4.8.1.7.org/lib/tty/tty-ncurses.c
-+++ mc-4.8.1.7/lib/tty/tty-ncurses.c
-@@ -65,7 +65,7 @@
-
- /*** file scope macro definitions ****************************************************************/
-
--#if defined(_AIX) && !defined(CTRL)
-+#if !defined(CTRL)
- #define CTRL(x) ((x) & 0x1f)
- #endif
-
diff --git a/meta/recipes-extended/mc/mc_4.7.5.2.bb b/meta/recipes-extended/mc/mc_4.7.5.2.bb
deleted file mode 100644
index b38964d827..0000000000
--- a/meta/recipes-extended/mc/mc_4.7.5.2.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "Midnight Commander is an ncurses based file manager"
-HOMEPAGE = "http://www.midnight-commander.org/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-SECTION = "console/utils"
-DEPENDS = "ncurses glib-2.0"
-RDEPENDS_${PN} = "ncurses-terminfo"
-
-PR = "r3"
-
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
- file://mc-CTRL.patch \
- "
-
-SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6"
-SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab"
-
-inherit autotools gettext pkgconfig
-
-EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba"
-
-do_install_append () {
- sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
- sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
-}
-
-PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
-
-SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
-FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
- ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
- ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
- ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
- ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
- ${libexecdir}/mc/extfs.d/uzip"
-RDEPENDS_${BPN}-helpers-perl = "perl"
-
-SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
-FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
-RDEPENDS_${BPN}-helpers-python = "python"
-
-SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
-FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
-
-SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
-FILES_${BPN}-fish = "${libexecdir}/mc/fish"
-
diff --git a/meta/recipes-extended/mc/mc_4.8.17.bb b/meta/recipes-extended/mc/mc_4.8.17.bb
deleted file mode 100644
index a5c4eceb97..0000000000
--- a/meta/recipes-extended/mc/mc_4.8.17.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Midnight Commander is an ncurses based file manager"
-HOMEPAGE = "http://www.midnight-commander.org/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
-SECTION = "console/utils"
-DEPENDS = "ncurses glib-2.0 util-linux"
-RDEPENDS_${PN} = "ncurses-terminfo"
-
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
- "
-SRC_URI[md5sum] = "6e9c07066e40af06b263a13fad17a07f"
-SRC_URI[sha256sum] = "66d0cb37baaed8ef930f8ad25a634adad4f264eb61820893920ac87b9dfb783b"
-
-inherit autotools gettext pkgconfig
-
-#
-# Both Samba (smb) and sftp require package delivered from meta-openembedded
-#
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
-PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
-
-EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
-
-do_install_append () {
- sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
- sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
-}
-
-PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
-
-SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
-FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
- ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
- ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
- ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
- ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
- ${libexecdir}/mc/extfs.d/uzip"
-RDEPENDS_${BPN}-helpers-perl = "perl"
-
-SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
-FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
-RDEPENDS_${BPN}-helpers-python = "python"
-
-SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
-FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
-
-SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
-FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/meta/recipes-extended/mc/mc_4.8.23.bb b/meta/recipes-extended/mc/mc_4.8.23.bb
new file mode 100644
index 0000000000..95fa1dae78
--- /dev/null
+++ b/meta/recipes-extended/mc/mc_4.8.23.bb
@@ -0,0 +1,54 @@
+SUMMARY = "Midnight Commander is an ncurses based file manager"
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0 util-linux"
+RDEPENDS_${PN} = "ncurses-terminfo-base"
+RRECOMMENDS_${PN} = "ncurses-terminfo"
+
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+ file://0001-mc-replace-perl-w-with-use-warnings.patch \
+ file://0001-Add-option-to-control-configure-args.patch \
+ file://0001-Ticket-3629-configure.ac-drop-bundled-gettext.patch \
+ "
+SRC_URI[md5sum] = "152927ac29cf0e61d7d019f261bb7d89"
+SRC_URI[sha256sum] = "238c4552545dcf3065359bd50753abbb150c1b22ec5a36eaa02c82808293267d"
+
+inherit autotools gettext pkgconfig
+
+#
+# Both Samba (smb) and sftp require package delivered from meta-openembedded
+#
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
+PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
+
+EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --disable-configure-args"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
+CACHED_CONFIGUREVARS += "ac_cv_path_PYTHON='/usr/bin/env python'"
+CACHED_CONFIGUREVARS += "ac_cv_path_GREP='/usr/bin/env grep'"
+
+do_install_append () {
+ sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+
+ rm ${D}${libexecdir}/mc/extfs.d/s3+ ${D}${libexecdir}/mc/extfs.d/uc1541
+}
+
+PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers ${BPN}-fish"
+
+SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
+FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
+ ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
+ ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
+ ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
+ ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
+ ${libexecdir}/mc/extfs.d/uzip"
+RDEPENDS_${BPN}-helpers-perl = "perl"
+
+SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
+FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
+
+SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
+FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch
new file mode 100644
index 0000000000..803a59b3ec
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch
@@ -0,0 +1,31 @@
+From b273e892bd6aaafe448f84356abb78a6d463e784 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 7 Dec 2018 17:22:39 -0800
+Subject: [PATCH] Compute abs diff in a standard compliant way
+
+This make it a bit less implementation defined and silences clang
+warning -Wabsolute-value
+
+| super-intel.c:2822:20: error: taking the absolute value of unsigned type 'unsi
+gned long long' has no effect [-Werror,-Wabsolute-value]
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ super-intel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/super-intel.c b/super-intel.c
+index 6438987..10d7218 100644
+--- a/super-intel.c
++++ b/super-intel.c
+@@ -2819,7 +2819,7 @@ static unsigned long long calc_component_size(struct imsm_map *map,
+ * 2048 blocks per each device. If the difference is higher it means
+ * that array size was expanded and num_data_stripes was not updated.
+ */
+- if ((unsigned int)abs(calc_dev_size - dev_size) >
++ if ((unsigned int)abs((int)calc_dev_size - (int)dev_size) >
+ (1 << SECT_PER_MB_SHIFT) * member_disks) {
+ component_size = dev_size / member_disks;
+ dprintf("Invalid num_data_stripes in metadata; expected=%llu, found=%llu\n",
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch b/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
deleted file mode 100644
index f829467a16..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 835baf02fd42012bbc0603dffb1f80c6ecf0fb9e Mon Sep 17 00:00:00 2001
-From: Xiao Ni <xni@redhat.com>
-Date: Mon, 8 Feb 2016 11:18:52 +0200
-Subject: [PATCH] Fix some type comparison problems
-
-As 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c said, 32 bit signed
-timestamps will overflow in the year 2038. It already changed the
-utime and ctime in struct mdu_array_info_s from int to unsigned
-int. So we need to change the values that compared with them to
-unsigned int too.
-
-Upstream-Status: Backport
-
-Signed-off-by: : Xiao Ni <xni@redhat.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-
- Monitor.c | 2 +-
- util.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Monitor.c b/Monitor.c
-index f19c2e5..6df80f9 100644
---- a/Monitor.c
-+++ b/Monitor.c
-@@ -33,7 +33,7 @@
- struct state {
- char *devname;
- char devnm[32]; /* to sync with mdstat info */
-- long utime;
-+ unsigned int utime;
- int err;
- char *spare_group;
- int active, working, failed, spare, raid;
-diff --git a/util.c b/util.c
-index 3e6d293..96a806d 100644
---- a/util.c
-+++ b/util.c
-@@ -1267,7 +1267,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
- */
- struct superswitch *ss;
- struct supertype *st;
-- time_t besttime = 0;
-+ unsigned int besttime = 0;
- int bestsuper = -1;
- int i;
-
---
-2.4.0
-
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
index deb7486383..298f276cd6 100644
--- a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
+++ b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
@@ -1,4 +1,4 @@
-From 1f5baf3ad95ae4c39efe4d8ad8b2e642b3a351da Mon Sep 17 00:00:00 2001
+From a9166bf422da1001bac9cc819386bf39b7cd1b73 Mon Sep 17 00:00:00 2001
From: "Maxin B. John" <maxin.john@intel.com>
Date: Tue, 9 Feb 2016 11:44:01 +0200
Subject: [PATCH] Fix the path of corosync and dlm header files check
@@ -9,25 +9,23 @@ Fix it.
Upstream-Status: Inappropriate [Yocto specific]
Signed-off-by: Maxin B. John <maxin.john@intel.com>
+
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
-index fd79cfb..34150a9 100644
+index 2767ac6..46bf57b 100644
--- a/Makefile
+++ b/Makefile
-@@ -80,8 +80,8 @@ MDMON_DIR = $(RUN_DIR)
- FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
+@@ -91,8 +91,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
SYSTEMD_DIR=/lib/systemd/system
+ LIB_DIR=/usr/libexec/mdadm
-COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC)
-DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM)
-+COROSYNC:=$(shell [ -d $(SYSROOT)/usr/include/corosync ] || echo -DNO_COROSYNC)
++COROSYNC:=$(shell [ -f $(SYSROOT)/usr/include/corosync/cmap.h ] || echo -DNO_COROSYNC)
+DLM:=$(shell [ -f $(SYSROOT)/usr/include/libdlm.h ] || echo -DNO_DLM)
DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
---
-2.4.0
-
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch b/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch
deleted file mode 100644
index df70b1cf44..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 18d360d74271a066a849bc1fba4f10dbb23ed251 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Sep 2015 08:17:42 +0000
-Subject: [PATCH] Fix typo in comparision
-
-error: comparison of array 'devnm' equal to a null pointer is always false
-
-User bitwise '&' operator as it is a mask
-
-Fixes
-error: use of logical '&&' with constant operand
-
-Remove extraneous parens
-
-error: equality comparison with extraneous parentheses
-
-Remove dead code
-
-restripe.c:465:21: error: explicitly assigning value of variable of type 'int' to itself
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- mdmon.h | 2 +-
- mdopen.c | 2 +-
- restripe.c | 3 ---
- super-intel.c | 2 +-
- 4 files changed, 3 insertions(+), 6 deletions(-)
-
-diff --git a/mdmon.h b/mdmon.h
-index aa750c6..0b08c3d 100644
---- a/mdmon.h
-+++ b/mdmon.h
-@@ -101,7 +101,7 @@ static inline int is_resync_complete(struct mdinfo *array)
- break;
- case 10:
- l = array->array.layout;
-- ncopies = (l & 0xff) * ((l >> 8) && 0xff);
-+ ncopies = (l & 0xff) * ((l >> 8) & 0xff);
- sync_size = array->component_size * array->array.raid_disks;
- sync_size /= ncopies;
- break;
-diff --git a/mdopen.c b/mdopen.c
-index 28410f4..c5ee2a6 100644
---- a/mdopen.c
-+++ b/mdopen.c
-@@ -318,7 +318,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
- else if (num < 0) {
- /* need to choose a free number. */
- char *_devnm = find_free_devnm(use_mdp);
-- if (devnm == NULL) {
-+ if (_devnm == NULL) {
- pr_err("No avail md devices - aborting\n");
- return -1;
- }
-diff --git a/restripe.c b/restripe.c
-index 4d92190..cfe9666 100644
---- a/restripe.c
-+++ b/restripe.c
-@@ -461,9 +461,6 @@ int raid6_check_disks(int data_disks, int start, int chunk_size,
- curr_broken_disk = diskD;
- }
-
-- if((Px == 0) && (Qx == 0))
-- curr_broken_disk = curr_broken_disk;
--
- if(curr_broken_disk >= data_disks + 2)
- broken_status = 2;
-
-diff --git a/super-intel.c b/super-intel.c
-index 3f812d6..1838012 100644
---- a/super-intel.c
-+++ b/super-intel.c
-@@ -10027,7 +10027,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
- geo->size = max_size;
- }
-
-- if ((direction == ROLLBACK_METADATA_CHANGES)) {
-+ if (direction == ROLLBACK_METADATA_CHANGES) {
- /* accept size for rollback only
- */
- } else {
---
-2.5.1
-
diff --git a/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch b/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch
new file mode 100644
index 0000000000..b196084a5c
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch
@@ -0,0 +1,53 @@
+From 02a41c3fd560fb5250186dd6b3cff6b21daa2e2b Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Mon, 15 Jul 2019 14:12:24 +0800
+Subject: [PATCH] Revert "tests: wait for complete rebuild in integrity checks"
+
+This reverts commit e2a8e9dcf67a28bc722fa5ab2c49b0bc452d4d74
+as the logic "check state 'U*'" will make the test enters
+infinite loop especially in qemu env, so revert it to
+use the previous logic "check wait" which also used
+commonly by other tests such as tests/02r5grow, tests/07revert-grow
+and etc.
+
+Upstream-Status: Submitted[https://marc.info/?l=linux-raid&m=156317157314030&w=2]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ tests/01r5integ | 2 +-
+ tests/01raid6integ | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/01r5integ b/tests/01r5integ
+index 48676a2..ffb30ce 100644
+--- a/tests/01r5integ
++++ b/tests/01r5integ
+@@ -27,7 +27,7 @@ do
+ exit 1
+ fi
+ mdadm $md0 -a $i
+- while ! (check state 'U*'); do check wait; sleep 0.2; done
++ check wait
+ done
+ mdadm -S $md0
+ done
+diff --git a/tests/01raid6integ b/tests/01raid6integ
+index 12f4d81..c6fcdae 100644
+--- a/tests/01raid6integ
++++ b/tests/01raid6integ
+@@ -47,10 +47,10 @@ do
+ exit 1
+ fi
+ mdadm $md0 -a $first
+- while ! (check state 'U*_U*'); do check wait; sleep 0.2; done
++ check wait
+ done
+ mdadm $md0 -a $second
+- while ! (check state 'U*'); do check wait; sleep 0.2; done
++ check wait
+ totest="$totest $second"
+ done
+ mdadm -S $md0
+--
+2.7.4
+
diff --git a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
new file mode 100644
index 0000000000..12bf6a5920
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
@@ -0,0 +1,28 @@
+From 37c35f94d9d95dbd2b5f8a919f5478be51453590 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 13 Oct 2017 10:27:34 -0700
+Subject: [PATCH] Use CC to check for implicit-fallthrough warning support
+
+This warning it new in gcc7 and in cross compile case
+its possible that build host gcc is version 7+ but the
+cross compile used for compiling mdadm is < version 7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 46bf57b..a075912 100644
+--- a/Makefile
++++ b/Makefile
+@@ -53,7 +53,7 @@ ifdef WARN_UNUSED
+ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
+ endif
+
+-FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l)
++FALLTHROUGH := $(shell ${CC} -v --help 2>&1 | grep "implicit-fallthrough" | wc -l)
+ ifneq "$(FALLTHROUGH)" "0"
+ CWFLAGS += -Wimplicit-fallthrough=0
+ endif
diff --git a/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch
new file mode 100644
index 0000000000..fa9c8cc835
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch
@@ -0,0 +1,39 @@
+From 3158d3788c2e0fb75ace2c89840bd8a977fb4cb0 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 14 Dec 2018 15:12:31 +0800
+Subject: [PATCH] fix gcc-8 format-truncation warning
+
+While compiling with `-Werror=format-truncation=', it failed
+[snip]
+|super0.c:236:32: error: 'snprintf' output may be truncated
+before the last format character [-Werror=format-truncation=]
+| snprintf(nb, sizeof(nb), "%4d", d);
+| ^
+|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes
+into a destination of size 11
+| snprintf(nb, sizeof(nb), "%4d", d);
+[snip]
+
+Upstream-Status: Submitted [https://github.com/neilbrown/mdadm/pull/34]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ super0.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/super0.c b/super0.c
+index 756cab5..12c28da 100644
+--- a/super0.c
++++ b/super0.c
+@@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost)
+ d++) {
+ mdp_disk_t *dp;
+ char *dv;
+- char nb[11];
++ char nb[12];
+ int wonly, failfast;
+ if (d>=0) dp = &sb->disks[d];
+ else dp = &sb->this_disk;
+--
+2.7.4
+
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch
new file mode 100644
index 0000000000..e00287cab1
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch
@@ -0,0 +1,28 @@
+From 5fdc0173cb4fcf8656f0889ad364d2549795607f Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 1 Jul 2019 11:34:49 +0800
+Subject: [PATCH] mdadm: add option -y for use syslog to recive event report
+
+fix service startup failed when there is
+No mail address or alert command
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ systemd/mdmonitor.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service
+index 46f7b88..3fc4687 100644
+--- a/systemd/mdmonitor.service
++++ b/systemd/mdmonitor.service
+@@ -13,4 +13,4 @@ DefaultDependencies=no
+ Environment= MDADM_MONITOR_ARGS=--scan
+ EnvironmentFile=-/run/sysconfig/mdadm
+ ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+-ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS
++ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS
+--
+2.7.4
+
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch
new file mode 100644
index 0000000000..3a192cc95c
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch
@@ -0,0 +1,43 @@
+From 1b83afa7c3121f819e72ea74883f8b6d61d6548e Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Fri, 6 Sep 2019 10:59:02 +0800
+Subject: [PATCH] mdadm: skip test 11spare-migration
+
+11spare-migration is a test series to check mdadm Monitor migrates spares
+according to rules in /etc/mdadm.conf defined by POLICY lines.
+
+[snip]
+for scan in no yes; do
+ for platform in 1.2 imsm; do
+ try
+ done
+done
+[snip]
+
+"try" includes near 20 sub testcase, so there are nearly 80 subcases need to run,
+so it will take long time than ptest-runner timeout limit, skip it as workaround.
+
+Upstream-Status: Inappropriate[oe-specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ test | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/test b/test
+index 711a3c7..880dd1d 100755
+--- a/test
++++ b/test
+@@ -272,6 +272,9 @@ main() {
+ else
+ for script in $testdir/$prefix $testdir/$prefix*[^~]
+ do
++ if [ $script == "$testdir/11spare-migration" ];then
++ continue
++ fi
+ do_test $script
+ done
+ fi
+--
+2.7.4
+
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
index 4cf809290d..a1e7e59323 100644
--- a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
+++ b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
@@ -1,4 +1,4 @@
-From 6d369e8f226594632ce4260129509daf7030de0a Mon Sep 17 00:00:00 2001
+From b431cb4e1ed060122fa300dc0008f74080d38f73 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 9 May 2016 22:03:57 +0000
Subject: [PATCH] mdadm.h: Undefine dprintf before redefining
@@ -14,17 +14,16 @@ In file included from policy.c:25:
/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/bits/stdio2.h:145:12: note: previous definition is here
Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Pending
-
+---
mdadm.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mdadm.h b/mdadm.h
-index 230e60f..8c8f4d1 100755
+index 387e681..bb943bf 100644
--- a/mdadm.h
+++ b/mdadm.h
-@@ -1554,11 +1554,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container)
+@@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container)
}
#ifdef DEBUG
@@ -38,6 +37,3 @@ index 230e60f..8c8f4d1 100755
#define dprintf(fmt, arg...) \
({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; })
#define dprintf_cont(fmt, arg...) \
---
-1.9.1
-
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
deleted file mode 100644
index 1395473981..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From cf14a9987ea1040457ce53bc2ab7d096818cb780 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Fri, 5 Feb 2016 18:06:32 +0200
-Subject: [PATCH] mdadm.h: bswap is already defined in uclibc
-
-Fixes this build error:
-
-| In file included from mdadm.c:28:0:
-| mdadm.h:142:0: error: "bswap_16" redefined [-Werror]
-| #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
-| ^
-
-Upstream-Status: Submitted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- mdadm.h | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/mdadm.h b/mdadm.h
-index dd02be7..230e60f 100755
---- a/mdadm.h
-+++ b/mdadm.h
-@@ -139,12 +139,20 @@ struct dlm_lksb {
- * and there is no standard conversion function so... */
- /* And dietlibc doesn't think byteswap is ok, so.. */
- /* #include <byteswap.h> */
-+
-+#ifndef bswap_16
- #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
- ((x) & 0xff00U) >> 8)
-+#endif
-+
-+#ifndef bswap_32
- #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
- ((x) & 0xff000000U) >> 24 | \
- ((x) & 0x0000ff00U) << 8 | \
- ((x) & 0x00ff0000U) >> 8)
-+#endif
-+
-+#ifndef bswap_64
- #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
- ((x) & 0xff00000000000000ULL) >> 56 | \
- ((x) & 0x000000000000ff00ULL) << 40 | \
-@@ -153,6 +161,7 @@ struct dlm_lksb {
- ((x) & 0x0000ff0000000000ULL) >> 24 | \
- ((x) & 0x00000000ff000000ULL) << 8 | \
- ((x) & 0x000000ff00000000ULL) >> 8)
-+#endif
-
- #if !defined(__KLIBC__)
- #if BYTE_ORDER == LITTLE_ENDIAN
---
-2.4.0
-
diff --git a/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch b/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch
deleted file mode 100644
index 0b34b8491f..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 1b0aa1debf6fbe9923c9aac671d2894f76c32f9d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 20 Apr 2016 16:38:13 +0000
-Subject: [PATCH] raid6check: Fix if-else indentation
-
-gcc 6 warns about ambiguity due to this indentation
-| raid6check.c: In function 'manual_repair':
-| raid6check.c:267:4: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
-| else
-| ^~~~
-| raid6check.c:269:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
-| printf("Repairing D(%d) and P\n", failed_data);
-| ^~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- raid6check.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/raid6check.c b/raid6check.c
-index ad7ffe7..409b1b6 100644
---- a/raid6check.c
-+++ b/raid6check.c
-@@ -266,7 +266,7 @@ int manual_repair(int chunk_size, int syndrome_disks,
- failed_data = failed_slot2;
- else
- failed_data = failed_slot1;
-- printf("Repairing D(%d) and P\n", failed_data);
-+ printf("Repairing D(%d) and P\n", failed_data);
- raid6_datap_recov(syndrome_disks+2, chunk_size,
- failed_data, (uint8_t**)blocks, 1);
- } else {
---
-1.9.1
-
diff --git a/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch b/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
deleted file mode 100644
index d5cf003745..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2645673a7ea948a1297d5b8f0daab29b898f044f Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Fri, 5 Feb 2016 17:14:04 +0200
-Subject: [PATCH] util.c: include poll.h instead of sys/poll.h
-
-This fixes a compile warning when building with musl:
-
- In file included from util.c:27:0:
- |
- qemux86-64/usr/include/sys/poll.h:1:2:
- error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
- [-Werror=cpp]
- | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
- | ^
-
-Upstream-Status: Accepted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- util.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/util.c b/util.c
-index 970d484..3e6d293 100644
---- a/util.c
-+++ b/util.c
-@@ -24,7 +24,6 @@
-
- #include "mdadm.h"
- #include "md_p.h"
--#include <sys/poll.h>
- #include <sys/socket.h>
- #include <sys/utsname.h>
- #include <sys/wait.h>
-@@ -32,6 +31,7 @@
- #include <sys/resource.h>
- #include <sys/vfs.h>
- #include <linux/magic.h>
-+#include <poll.h>
- #include <ctype.h>
- #include <dirent.h>
- #include <signal.h>
---
-2.4.0
-
diff --git a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch
new file mode 100644
index 0000000000..e66a15cd79
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch
@@ -0,0 +1,25 @@
+From: martin f. krafft <madduck@debian.org>
+Subject: Remove -Werror from compiler flags
+
+-Werror seems like a bad idea on released/packaged code because a toolchain
+update (introducing new warnings) could break the build. We'll let upstream
+use it to beautify the code, but remove it for out builds.
+
+Signed-off-by: martin f. krafft <madduck@debian.org>
+
+Upstream-Status: Pending
+---
+ Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -48,7 +48,7 @@ endif
+
+ CC ?= $(CROSS_COMPILE)gcc
+ CXFLAGS ?= -ggdb
+-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
++CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
+ ifdef WARN_UNUSED
+ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
+ endif
diff --git a/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/meta/recipes-extended/mdadm/files/gcc-4.9.patch
deleted file mode 100644
index 54bf1d79ab..0000000000
--- a/meta/recipes-extended/mdadm/files/gcc-4.9.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-super-intel.c:5063:2: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
- snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
- ^
-cc1: all warnings being treated as errors
-make: *** [super-intel.o] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: mdadm-3.3/super-intel.c
-===================================================================
---- mdadm-3.3.orig/super-intel.c 2014-05-02 15:08:21.154319651 -0700
-+++ mdadm-3.3/super-intel.c 2014-05-02 15:09:31.470985794 -0700
-@@ -5060,7 +5060,7 @@
- spare->cache_size = mpb->cache_size,
- spare->pwr_cycle_count = __cpu_to_le32(1),
-
-- snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
-+ (void)snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
- MPB_SIGNATURE MPB_VERSION_RAID0);
-
- for (d = super->disks; d; d = d->next) {
diff --git a/meta/recipes-extended/mdadm/files/include_sysmacros.patch b/meta/recipes-extended/mdadm/files/include_sysmacros.patch
new file mode 100644
index 0000000000..8a1d8342d8
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/include_sysmacros.patch
@@ -0,0 +1,14 @@
+include sys/sysmacros.h for major/minor macro definitions
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/mdadm.h
++++ b/mdadm.h
+@@ -35,6 +35,7 @@ extern __off64_t lseek64 __P ((int __fd,
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <time.h>
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
deleted file mode 100644
index 84c382def6..0000000000
--- a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Accepted
-
-By hardcoding CC's definition in the Makefile, all the gcc parameters
-set by tune settings are lost. Causing compile failure with x32 toolchain
-
-As the bitbake defined CC is good, there is no need to redfine CC in the
-make file, hence making the CC definition in the Makefile conditional.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
-
-Index: mdadm-3.3/Makefile
-===================================================================
---- mdadm-3.3.orig/Makefile 2013-09-03 07:47:47.000000000 +0300
-+++ mdadm-3.3/Makefile 2013-10-16 16:44:23.542295487 +0300
-@@ -41,7 +41,7 @@
-
- KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32
-
--CC = $(CROSS_COMPILE)gcc
-+CC ?= $(CROSS_COMPILE)gcc
- CXFLAGS ?= -ggdb
- CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
- ifdef WARN_UNUSED
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
index c656d073e3..7a2c888701 100644
--- a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
@@ -1,3 +1,11 @@
+From e37f7f6a0f1ef1b594574d11a8b90b8c861d047b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Sun, 15 Mar 2015 09:02:14 +0000
+Subject: [PATCH] mdadm: Fix build in x32 ABI
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
When try to print time_t values as a long int it causes an error because time_t
data type in x32 ABI is long long int.
@@ -5,13 +13,17 @@ Upstream-Status: Pending
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-Index: mdadm-3.3.4/monitor.c
-===================================================================
---- mdadm-3.3.4.orig/monitor.c
-+++ mdadm-3.3.4/monitor.c
-@@ -257,9 +257,12 @@ static int read_and_act(struct active_ar
- mdi->curr_state = read_dev_state(mdi->state_fd);
- }
+---
+ monitor.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/monitor.c b/monitor.c
+index 81537ed..7c33382 100644
+--- a/monitor.c
++++ b/monitor.c
+@@ -445,9 +445,12 @@ static int read_and_act(struct active_array *a, fd_set *fds)
+ if (FD_ISSET(mdi->bb_fd, fds))
+ check_for_cleared_bb(a, mdi);
}
-
gettimeofday(&tv, NULL);
diff --git a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
index 267c007c21..8e2a8a9043 100644
--- a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
+++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
@@ -1,4 +1,4 @@
-From c65898b9da82df94e1bae7937e415a7eb80355d5 Mon Sep 17 00:00:00 2001
+From 911f6ea9be0c334885aeff66853b111cbd4066df Mon Sep 17 00:00:00 2001
From: "Maxin B. John" <maxin.john@intel.com>
Date: Wed, 10 Feb 2016 17:28:05 +0200
Subject: [PATCH] mdadm-fix-ptest-build-errors
@@ -16,15 +16,16 @@ builds fail with ptest enabled:
Upstream-Status: Pending
Signed-off-by: Maxin B. John <maxin.john@intel.com>
+
---
restripe.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/restripe.c b/restripe.c
-index 56dca73..d24b2b4 100644
+index 31b07e8..592ba5d 100644
--- a/restripe.c
+++ b/restripe.c
-@@ -842,10 +842,14 @@ int test_stripes(int *source, unsigned long long *offsets,
+@@ -864,10 +864,14 @@ int test_stripes(int *source, unsigned long long *offsets,
while (length > 0) {
int disk;
@@ -40,6 +41,3 @@ index 56dca73..d24b2b4 100644
}
for (i = 0 ; i < data_disks ; i++) {
int disk = geo_map(i, start/chunk_size, raid_disks,
---
-2.4.0
-
diff --git a/meta/recipes-extended/mdadm/files/mdadm.init b/meta/recipes-extended/mdadm/files/mdadm.init
new file mode 100644
index 0000000000..cab91b9acc
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm.init
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+# Start the MD monitor daemon for all active MD arrays if desired.
+#
+### BEGIN INIT INFO
+# Provides: mdadm
+# Required-Start: $local_fs $syslog mdadm-raid
+# Required-Stop: $local_fs $syslog mdadm-raid
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: MD monitoring daemon
+# Description: mdadm provides a monitor mode, in which it will scan for
+# problems with the MD devices. If a problem is found, the
+# administrator is alerted via email, or a custom script is
+# run.
+### END INIT INFO
+#
+
+MDADM=/sbin/mdadm
+RUNDIR=/var/run/mdadm
+PIDFILE=$RUNDIR/monitor.pid
+DEBIANCONFIG=/etc/default/mdadm
+
+test -x "$MDADM" || exit 0
+
+test -f /proc/mdstat || exit 0
+
+START_DAEMON=true
+test -f $DEBIANCONFIG && . $DEBIANCONFIG
+
+. /lib/lsb/init-functions
+
+# Include functions
+. /etc/init.d/functions
+
+case "${1:-}" in
+ start)
+ if is_true $START_DAEMON; then
+ log_daemon_msg "Starting MD monitoring service" "mdadm --monitor"
+ mkdir -p $RUNDIR
+ start-stop-daemon -S -p $PIDFILE -x $MDADM -- \
+ --monitor --pid-file $PIDFILE --daemonise --scan ${DAEMON_OPTIONS:-}
+ RETVAL=$?
+ log_end_msg $RETVAL
+ exit $RETVAL
+ fi
+ ;;
+ stop)
+ if [ -f $PIDFILE ] ; then
+ log_daemon_msg "Stopping MD monitoring service" "mdadm --monitor"
+ start-stop-daemon -K -p $PIDFILE -x $MDADM
+ RETVAL=$?
+ rm -f $PIDFILE
+ log_end_msg $RETVAL
+ exit $RETVAL
+ fi
+ ;;
+ status)
+ status -p $PIDFILE "$MDADM" && exit 0 || exit $?
+ ;;
+ restart|reload|force-reload)
+ ${0:-} stop
+ ${0:-} start
+ ;;
+ *)
+ echo "Usage: ${0:-} {start|stop|status|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest
index 5b276090f5..e4a9c2b08b 100644
--- a/meta/recipes-extended/mdadm/files/run-ptest
+++ b/meta/recipes-extended/mdadm/files/run-ptest
@@ -1,10 +1,4 @@
#!/bin/sh
-./test &>./test.log
-if [ $? -eq 0 ]
-then
- echo "PASS: mdadm"
- rm test.log
-else
- echo "FAIL: mdadm"
-fi
+# make the test continue to execute even one fail
+./test --keep-going
diff --git a/meta/recipes-extended/mdadm/mdadm_3.4.bb b/meta/recipes-extended/mdadm/mdadm_3.4.bb
deleted file mode 100644
index 261054e760..0000000000
--- a/meta/recipes-extended/mdadm/mdadm_3.4.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-SUMMARY = "Tool for managing software RAID under Linux"
-HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
-
-# Some files are GPLv2+ while others are GPLv2.
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
- file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
-
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
- file://mdadm-3.2.2_fix_for_x32.patch \
- file://gcc-4.9.patch \
- file://mdadm-3.3.2_x32_abi_time_t.patch \
- file://0001-Fix-typo-in-comparision.patch \
- file://mdadm-fix-ptest-build-errors.patch \
- file://0001-util.c-include-poll.h-instead-of-sys-poll.h.patch \
- file://0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch \
- file://0001-Fix-some-type-comparison-problems.patch \
- file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
- file://run-ptest \
- file://0001-raid6check-Fix-if-else-indentation.patch \
- file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
- "
-SRC_URI[md5sum] = "04b8b21f637540350f8517c7e68d3c63"
-SRC_URI[sha256sum] = "27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808"
-
-CFLAGS += "-fno-strict-aliasing"
-inherit autotools-brokensep
-
-EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
-# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
-# prevents 64-bit userland from seeing this definition, instead defaulting
-# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
-# int-ll64.h included
-CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
-CFLAGS_append_mips64 = ' -D__SANE_USERSPACE_TYPES__'
-CFLAGS_append_mips64n32 = ' -D__SANE_USERSPACE_TYPES__'
-
-do_compile() {
- oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
-}
-
-do_install() {
- export STRIP=""
- autotools_do_install
-}
-
-inherit ptest
-
-do_compile_ptest() {
- oe_runmake test
-}
-
-do_install_ptest() {
- cp -a ${S}/tests ${D}${PTEST_PATH}/tests
- cp ${S}/test ${D}${PTEST_PATH}
- sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
- ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
- for prg in test_stripe swap_super raid6check
- do
- install -D -m 755 $prg ${D}${PTEST_PATH}/
- done
-}
-RDEPENDS_${PN}-ptest += "bash"
-RRECOMMENDS_${PN}-ptest += " \
- coreutils \
- util-linux \
- kernel-module-loop \
- kernel-module-linear \
- kernel-module-raid0 \
- kernel-module-raid1 \
- kernel-module-raid10 \
- kernel-module-raid456 \
-"
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
new file mode 100644
index 0000000000..64f519e750
--- /dev/null
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -0,0 +1,106 @@
+SUMMARY = "Tool for managing software RAID under Linux"
+HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
+
+# Some files are GPLv2+ while others are GPLv2.
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
+ file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
+
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
+ file://run-ptest \
+ file://mdadm-3.3.2_x32_abi_time_t.patch \
+ file://mdadm-fix-ptest-build-errors.patch \
+ file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
+ file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
+ file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \
+ file://0001-Compute-abs-diff-in-a-standard-compliant-way.patch \
+ file://0001-fix-gcc-8-format-truncation-warning.patch \
+ file://debian-no-Werror.patch \
+ file://0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch \
+ file://mdadm.init \
+ file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
+ file://include_sysmacros.patch \
+ file://0001-mdadm-skip-test-11spare-migration.patch \
+ "
+
+SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
+SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a"
+
+inherit autotools-brokensep ptest systemd
+
+SYSTEMD_SERVICE_${PN} = "mdmonitor.service mdmon@.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+CFLAGS_append_toolchain-clang = " -Wno-error=address-of-packed-member"
+
+# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
+# prevents 64-bit userland from seeing this definition, instead defaulting
+# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
+# int-ll64.h included
+CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__'
+
+EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_unitdir}/system \
+ BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev"'
+
+DEBUG_OPTIMIZATION_append = " -Wno-error"
+
+do_compile() {
+ oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
+}
+
+do_install() {
+ export STRIP=""
+ autotools_do_install
+}
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/
+ install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
+}
+
+do_install_append() {
+ oe_runmake install-systemd DESTDIR=${D}
+}
+
+do_compile_ptest() {
+ oe_runmake test
+}
+
+do_install_ptest() {
+ cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests
+ cp ${S}/test ${D}${PTEST_PATH}
+ sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
+ sed -i -e '/echo -ne "$_script... "/d' \
+ -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \
+ -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \
+ -e '/die "dmesg prints errors when testing $_basename!"/i\\t\t\t\techo -ne "FAIL: $_script" &&' \
+ ${D}${PTEST_PATH}/test
+
+ chmod +x ${D}${PTEST_PATH}/test
+
+ ln -s ${base_sbindir}/mdadm ${D}${PTEST_PATH}/mdadm
+ for prg in test_stripe swap_super raid6check
+ do
+ install -D -m 755 $prg ${D}${PTEST_PATH}/
+ done
+}
+
+RDEPENDS_${PN}-ptest += "bash e2fsprogs-mke2fs"
+RRECOMMENDS_${PN}-ptest += " \
+ coreutils \
+ util-linux \
+ kernel-module-loop \
+ kernel-module-linear \
+ kernel-module-raid0 \
+ kernel-module-raid1 \
+ kernel-module-raid10 \
+ kernel-module-raid456 \
+"
+
+FILES_${PN} += "${systemd_unitdir}/*"
diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb
index 3c16228b0d..491b892093 100644
--- a/meta/recipes-extended/mingetty/mingetty_1.08.bb
+++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb
@@ -16,6 +16,7 @@ EXTRA_OEMAKE = "CC='${CC}' \
CFLAGS='${CFLAGS} -D_GNU_SOURCE'"
do_install(){
+ sed -i -e "s;SBINDIR=/sbin;SBINDIR=$base_sbindir;" ${S}/Makefile
install -d ${D}${mandir}/man8 ${D}/${base_sbindir}
oe_runmake install DESTDIR=${D}
}
diff --git a/meta/recipes-extended/minicom/minicom_2.7.1.bb b/meta/recipes-extended/minicom/minicom_2.7.1.bb
new file mode 100644
index 0000000000..1e6f1317eb
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom_2.7.1.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Text-based modem control and terminal emulation program"
+HOMEPAGE = "http://alioth.debian.org/projects/minicom/"
+DESCRIPTION = "Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems"
+SECTION = "console/network"
+DEPENDS = "ncurses virtual/libiconv"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \
+ file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/m/${BPN}/${BPN}_${PV}.orig.tar.gz \
+ file://allow.to.disable.lockdev.patch \
+ file://0001-fix-minicom-h-v-return-value-is-not-0.patch \
+ file://0001-Fix-build-issus-surfaced-due-to-musl.patch \
+ "
+
+SRC_URI[md5sum] = "9021cb8c5445f6e6e74b2acc39962d62"
+SRC_URI[sha256sum] = "532f836b7a677eb0cb1dca8d70302b73729c3d30df26d58368d712e5cca041f1"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev"
+
+inherit autotools gettext pkgconfig
+
+do_install() {
+ for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done
+}
+
+RRECOMMENDS_${PN} += "lrzsz"
diff --git a/meta/recipes-extended/minicom/minicom_2.7.bb b/meta/recipes-extended/minicom/minicom_2.7.bb
deleted file mode 100644
index 3118686e19..0000000000
--- a/meta/recipes-extended/minicom/minicom_2.7.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Text-based modem control and terminal emulation program"
-DESCRIPTION = "Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems"
-SECTION = "console/network"
-DEPENDS = "ncurses virtual/libiconv"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \
- file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81"
-
-SRC_URI = "https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz \
- file://allow.to.disable.lockdev.patch \
- file://0001-fix-minicom-h-v-return-value-is-not-0.patch \
- file://0001-Fix-build-issus-surfaced-due-to-musl.patch \
- "
-
-SRC_URI[md5sum] = "7044ca3e291268c33294f171d426dc2d"
-SRC_URI[sha256sum] = "9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4"
-
-UPSTREAM_CHECK_URI = "https://alioth.debian.org/frs/?group_id=30018"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev"
-
-inherit autotools gettext pkgconfig
-
-do_install() {
- for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done
-}
-
diff --git a/meta/recipes-extended/mktemp/files/disable-strip.patch b/meta/recipes-extended/mktemp/files/disable-strip.patch
deleted file mode 100644
index e06869e3ad..0000000000
--- a/meta/recipes-extended/mktemp/files/disable-strip.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff --git a/Makefile.in b/Makefile.in
-index 37b3cc9..f1026f3 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -95,7 +95,7 @@ install-dirs:
- $(DESTDIR)$(mandir)/man1
-
- install-binaries: $(PROG)
-- $(INSTALL) -m 0555 -s $(PROG) $(DESTDIR)$(bindir)/$(PROG)
-+ $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
-
- install-man:
- $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \
diff --git a/meta/recipes-extended/mktemp/files/fix-parallel-make.patch b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch
deleted file mode 100644
index f3b6dcc34a..0000000000
--- a/meta/recipes-extended/mktemp/files/fix-parallel-make.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-This fixes the parallel make install failure
-
-Upstream-Status: Accepted
-http://www.gratisoft.us/bugzilla/show_bug.cgi?id=528
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: mktemp-1.7/Makefile.in
-===================================================================
---- mktemp-1.7.orig/Makefile.in
-+++ mktemp-1.7/Makefile.in
-@@ -94,10 +94,10 @@ install-dirs:
- $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \
- $(DESTDIR)$(mandir)/man1
-
--install-binaries: $(PROG)
-+install-binaries: install-dirs $(PROG)
- $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
-
--install-man:
-+install-man: install-dirs
- $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \
- $(DESTDIR)$(mandir)/man1/mktemp.1
-
diff --git a/meta/recipes-extended/mktemp/mktemp_1.7.bb b/meta/recipes-extended/mktemp/mktemp_1.7.bb
deleted file mode 100644
index 9accc6eed6..0000000000
--- a/meta/recipes-extended/mktemp/mktemp_1.7.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Enables safe temporary file creation from shell scripts"
-HOMEPAGE = "http://www.mktemp.org/"
-BUGTRACKER = "http://www.mktemp.org/bugs"
-SECTION = "console/utils"
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=430680f6322a1eb87199b5e01a82c0d4"
-
-PR = "r3"
-
-SRC_URI = "ftp://ftp.mktemp.org/pub/mktemp/${BPN}-${PV}.tar.gz \
- file://disable-strip.patch \
- file://fix-parallel-make.patch \
- "
-
-SRC_URI[md5sum] = "787bbed9fa2ee8e7645733c0e8e65172"
-SRC_URI[sha256sum] = "8e94b9e1edf866b2609545da65b627996ac5d158fda071e492bddb2f4a482675"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF = "--with-libc"
-
-do_install_append () {
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp
- rmdir ${D}${bindir}
-}
-
-ALTERNATIVE_${PN} = "mktemp"
-ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
-ALTERNATIVE_PRIORITY = "60"
-
-ALTERNATIVE_${PN}-doc = "mktemp.1"
-ALTERNATIVE_PRIORITY_${PN}-doc = "300"
-ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
diff --git a/meta/recipes-extended/msmtp/msmtp_1.6.5.bb b/meta/recipes-extended/msmtp/msmtp_1.6.5.bb
deleted file mode 100644
index d0c39eb4d6..0000000000
--- a/meta/recipes-extended/msmtp/msmtp_1.6.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "msmtp is an SMTP client"
-DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
-HOMEPAGE = "http://msmtp.sourceforge.net/"
-SECTION = "console/network"
-
-LICENSE = "GPLv3"
-DEPENDS = "zlib gnutls"
-
-#COPYING or Licence
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
- "
-
-SRC_URI[md5sum] = "50a8c9bb72f8222779db6b4aae2965e0"
-SRC_URI[sha256sum] = "76a0d60693c7e65d0c7a12f01d300882d280b1e1be0202f54730ae44d44a5006"
-
-inherit gettext autotools update-alternatives pkgconfig
-
-EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
-
-ALTERNATIVE_${PN} = "sendmail"
-ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
-ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
-ALTERNATIVE_PRIORITY = "100"
-
-pkg_postinst_${PN}_linuxstdbase () {
- # /usr/lib/sendmial is required by LSB core test
- [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
-}
diff --git a/meta/recipes-extended/msmtp/msmtp_1.8.6.bb b/meta/recipes-extended/msmtp/msmtp_1.8.6.bb
new file mode 100644
index 0000000000..809144b783
--- /dev/null
+++ b/meta/recipes-extended/msmtp/msmtp_1.8.6.bb
@@ -0,0 +1,28 @@
+SUMMARY = "msmtp is an SMTP client"
+DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
+HOMEPAGE = "https://marlam.de/msmtp/"
+SECTION = "console/network"
+
+LICENSE = "GPLv3"
+DEPENDS = "zlib gnutls"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+UPSTREAM_CHECK_URI = "https://marlam.de/msmtp/download/"
+
+SRC_URI = "https://marlam.de/${BPN}/releases/${BP}.tar.xz"
+SRC_URI[md5sum] = "adff4a9992e1b47aa5468b974550304e"
+SRC_URI[sha256sum] = "6625f147430c65ba8527f52c4fe5d4d33552d3c0fb6d793ba7df819a3b3042e1"
+
+inherit gettext autotools update-alternatives pkgconfig
+
+EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
+
+ALTERNATIVE_${PN} = "sendmail"
+# /usr/lib/sendmial is required by LSB core test
+ALTERNATIVE_${PN}_linuxstdbase = "sendmail usr-lib-sendmail"
+ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[usr-lib-sendmail] = "${bindir}/msmtp"
+ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch b/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
index 12eed17af4..78daf6c3ed 100644
--- a/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
+++ b/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
@@ -11,10 +11,10 @@ Signed-off-by: Li Zhou <li.zhou@windriver.com>
statistics.c | 68 +++++++++-
2 files changed, 465 insertions(+), 14 deletions(-)
-diff --git a/netstat.c b/netstat.c
-index 1fb9e0c..5d1a4a1 100644
---- a/netstat.c
-+++ b/netstat.c
+Index: net-tools-1.60/netstat.c
+===================================================================
+--- net-tools-1.60.orig/netstat.c
++++ net-tools-1.60/netstat.c
@@ -58,6 +58,7 @@
*
*990420 {1.38} Tuan Hoang removed a useless assignment from igmp_do_one()
@@ -23,7 +23,7 @@ index 1fb9e0c..5d1a4a1 100644
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
-@@ -105,7 +106,7 @@
+@@ -106,7 +107,7 @@
#endif
/* prototypes for statistics.c */
@@ -32,7 +32,7 @@ index 1fb9e0c..5d1a4a1 100644
void inittab(void);
void parsesnmp6(int, int, int);
void inittab6(void);
-@@ -118,6 +119,28 @@ typedef enum {
+@@ -119,6 +120,28 @@ typedef enum {
SS_DISCONNECTING /* in process of disconnecting */
} socket_state;
@@ -61,7 +61,7 @@ index 1fb9e0c..5d1a4a1 100644
#define SO_ACCEPTCON (1<<16) /* performed a listen */
#define SO_WAITDATA (1<<17) /* wait data to read */
#define SO_NOSPACE (1<<18) /* no space to write */
-@@ -148,6 +171,7 @@ int flag_opt = 0;
+@@ -149,6 +172,7 @@ int flag_opt = 0;
int flag_raw = 0;
int flag_tcp = 0;
int flag_udp = 0;
@@ -69,7 +69,7 @@ index 1fb9e0c..5d1a4a1 100644
int flag_igmp= 0;
int flag_rom = 0;
int flag_exp = 1;
-@@ -990,6 +1014,365 @@ static int udp_info(void)
+@@ -995,6 +1019,365 @@ static int udp_info(void)
udp_do_one);
}
@@ -435,7 +435,7 @@ index 1fb9e0c..5d1a4a1 100644
static void raw_do_one(int lnr, const char *line)
{
char buffer[8192], local_addr[64], rem_addr[64];
-@@ -1549,7 +1932,7 @@ static void usage(void)
+@@ -1558,7 +1941,7 @@ static void usage(void)
fprintf(stderr, _(" -F, --fib display Forwarding Information Base (default)\n"));
fprintf(stderr, _(" -C, --cache display routing cache instead of FIB\n\n"));
@@ -444,7 +444,7 @@ index 1fb9e0c..5d1a4a1 100644
fprintf(stderr, _(" <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
fprintf(stderr, _(" List of possible address families (which support routing):\n"));
print_aflist(1); /* 1 = routeable */
-@@ -1574,6 +1957,7 @@ int main
+@@ -1583,6 +1966,7 @@ int main
{"protocol", 1, 0, 'A'},
{"tcp", 0, 0, 't'},
{"udp", 0, 0, 'u'},
@@ -452,7 +452,7 @@ index 1fb9e0c..5d1a4a1 100644
{"raw", 0, 0, 'w'},
{"unix", 0, 0, 'x'},
{"listening", 0, 0, 'l'},
-@@ -1604,7 +1988,7 @@ int main
+@@ -1613,7 +1997,7 @@ int main
getroute_init(); /* Set up AF routing support */
afname[0] = '\0';
@@ -461,7 +461,7 @@ index 1fb9e0c..5d1a4a1 100644
switch (i) {
case -1:
break;
-@@ -1696,10 +2080,12 @@ int main
+@@ -1705,10 +2089,12 @@ int main
case 't':
flag_tcp++;
break;
@@ -475,7 +475,7 @@ index 1fb9e0c..5d1a4a1 100644
case 'w':
flag_raw++;
break;
-@@ -1717,13 +2103,13 @@ int main
+@@ -1726,13 +2112,13 @@ int main
if (flag_int + flag_rou + flag_mas + flag_sta > 1)
usage();
@@ -493,7 +493,7 @@ index 1fb9e0c..5d1a4a1 100644
+ flag_ax25 + flag_netrom + flag_igmp + flag_x25;
if (flag_mas) {
-@@ -1751,7 +2137,7 @@ int main
+@@ -1760,7 +2146,7 @@ int main
char buf[256];
if (!afname[0]) {
inittab();
@@ -502,7 +502,7 @@ index 1fb9e0c..5d1a4a1 100644
} else {
safe_strncpy(buf, afname, sizeof(buf));
tmp1 = buf;
-@@ -1804,7 +2190,7 @@ int main
+@@ -1815,7 +2201,7 @@ int main
return (i);
}
for (;;) {
@@ -511,7 +511,7 @@ index 1fb9e0c..5d1a4a1 100644
#if HAVE_AFINET
prg_cache_load();
printf(_("Active Internet connections ")); /* xxx */
-@@ -1843,6 +2229,11 @@ int main
+@@ -1854,6 +2240,11 @@ int main
if (i)
return (i);
}
@@ -523,10 +523,10 @@ index 1fb9e0c..5d1a4a1 100644
if (!flag_arg || flag_raw) {
i = raw_info();
if (i)
-diff --git a/statistics.c b/statistics.c
-index 03600d7..eb8d7dc 100644
---- a/statistics.c
-+++ b/statistics.c
+Index: net-tools-1.60/statistics.c
+===================================================================
+--- net-tools-1.60.orig/statistics.c
++++ net-tools-1.60/statistics.c
@@ -21,7 +21,7 @@
#define UFWARN(x)
#endif
@@ -537,7 +537,7 @@ index 03600d7..eb8d7dc 100644
enum State {
number = 0, opt_number, i_forward, i_inp_icmp, i_outp_icmp, i_rto_alg,
@@ -297,6 +297,27 @@ struct entry Tcpexttab[] =
- { "TCPRenoRecoveryFail", N_("%u classic Reno fast retransmits failed"), opt_number },
+ { "TCPRenoRecoveryFail", N_("%llu classic Reno fast retransmits failed"), opt_number },
};
+struct entry Sctptab[] =
@@ -616,7 +616,7 @@ index 03600d7..eb8d7dc 100644
f = proc_fopen("/proc/net/snmp");
if (!f) {
perror(_("cannot open /proc/net/snmp"));
-@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
+@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tc
fclose(f);
}
@@ -633,6 +633,3 @@ index 03600d7..eb8d7dc 100644
return;
}
---
-1.8.5.2.233.g932f7e4
-
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch b/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
new file mode 100644
index 0000000000..505eeb048a
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
@@ -0,0 +1,52 @@
+From 4d56645ea144a34f7cdd3e3ede6452d81fbae251 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Sat, 8 Oct 2016 14:42:54 +0800
+Subject: [PATCH] iptunnel.c: include linux/ip.h to fix building with linux-4.8
+
+Fix a build error when using the linux-4.8 headers that results in:
+
+In file included from
+.../sysroots/qemuarm64/usr/include/linux/if_tunnel.h:6:0,
+ from iptunnel.c:39:
+.../qemuarm64/usr/include/linux/ip.h:85:8: error: redefinition of
+'struct iphdr'
+ struct iphdr {
+ ^~~~~
+In file included from iptunnel.c:29:0:
+.../qemuarm64/usr/include/netinet/ip.h:44:8: note: originally defined here
+ struct iphdr
+ ^~~~~
+
+Upstream-Status: Submitted [1]
+
+[1] https://sourceforge.net/p/net-tools/mailman/message/35413022/
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ iptunnel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iptunnel.c b/iptunnel.c
+index 4943d83..acfcbc7 100644
+--- a/iptunnel.c
++++ b/iptunnel.c
+@@ -26,7 +26,6 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <netinet/in.h>
+-#include <netinet/ip.h>
+ #include <arpa/inet.h>
+ #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
+ #include <net/if.h>
+@@ -36,6 +35,7 @@
+ #include <linux/if_arp.h>
+ #endif
+ #include <linux/types.h>
++#include <linux/ip.h>
+ #include <linux/if_tunnel.h>
+
+ #include "config.h"
+--
+2.8.3
+
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
index 9c2adfa62e..5a376e72f0 100644
--- a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
@@ -16,6 +16,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/
file://net-tools-1.60-sctp2-quiet.patch \
file://net-tools-1.60-sctp3-addrs.patch \
file://0001-lib-inet6.c-INET6_rresolve-various-fixes.patch \
+ file://net-tools-fix-building-with-linux-4.8.patch \
"
# for this package we're mostly interested in tracking debian patches,
@@ -36,9 +37,7 @@ UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/net-tools/"
inherit gettext
-do_patch[depends] = "quilt-native:do_populate_sysroot"
-
-LDFLAGS_append_libc-uclibc = " -lintl "
+do_patch[depends] += "quilt-native:do_populate_sysroot"
# The Makefile is lame, no parallel build
PARALLEL_MAKE = ""
@@ -49,7 +48,16 @@ PARALLEL_MAKE = ""
# up all previously applied patches in the start
nettools_do_patch() {
cd ${S}
- quilt pop -a || true
+ # it's important that we only pop the existing patches when they've
+ # been applied, otherwise quilt will climb the directory tree
+ # and reverse out some completely different set of patches
+ if [ -d ${S}/patches ]; then
+ # whilst this is the default directory, doing it like this
+ # defeats the directory climbing that quilt will otherwise
+ # do; note the directory must exist to defeat this, hence
+ # the test inside which we operate
+ QUILT_PATCHES=${S}/patches quilt pop -a
+ fi
if [ -d ${S}/.pc-nettools ]; then
rm -rf ${S}/.pc
mv ${S}/.pc-nettools ${S}/.pc
@@ -74,24 +82,31 @@ do_configure() {
# we pre-generate desired options and copy to source directory instead
cp ${WORKDIR}/net-tools-config.h ${S}/config.h
cp ${WORKDIR}/net-tools-config.make ${S}/config.make
+
+ if [ "${USE_NLS}" = "no" ]; then
+ sed -i -e 's/^I18N=1/# I18N=1/' ${S}/config.make
+ fi
}
do_compile() {
# net-tools use COPTS/LOPTS to allow adding custom options
- export COPTS="$CFLAGS"
- export LOPTS="$LDFLAGS"
- unset CFLAGS
- unset LDFLAGS
-
- oe_runmake
+ oe_runmake COPTS="$CFLAGS" LOPTS="$LDFLAGS"
}
do_install() {
- export COPTS="$CFLAGS"
- export LOPTS="$LDFLAGS"
- unset CFLAGS
- unset LDFLAGS
- oe_runmake 'BASEDIR=${D}' install
+ # We don't need COPTS or LOPTS, but let's be consistent.
+ oe_runmake COPTS="$CFLAGS" LOPTS="$LDFLAGS" BASEDIR=${D} INSTALLNLSDIR=${D}${datadir}/locale mandir=${mandir} install
+
+ if [ "${base_bindir}" != "/bin" ]; then
+ mkdir -p ${D}/${base_bindir}
+ mv ${D}/bin/* ${D}/${base_bindir}/
+ rmdir ${D}/bin
+ fi
+ if [ "${base_sbindir}" != "/sbin" ]; then
+ mkdir ${D}/${base_sbindir}
+ mv ${D}/sbin/* ${D}/${base_sbindir}/
+ rmdir ${D}/sbin
+ fi
}
inherit update-alternatives
@@ -100,15 +115,17 @@ base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig r
base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname"
ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}"
-ALTERNATIVE_${PN}-doc += "hostname.1"
+ALTERNATIVE_${PN}-doc += "hostname.1 dnsdomainname.1"
ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1"
ALTERNATIVE_PRIORITY[hostname.1] = "10"
python __anonymous() {
- for prog in d.getVar('base_sbindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
- for prog in d.getVar('base_bindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
+ for prog in d.getVar('base_sbindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog))
+ for prog in d.getVar('base_bindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
}
ALTERNATIVE_PRIORITY = "100"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/newt/files/cross_ar.patch b/meta/recipes-extended/newt/files/cross_ar.patch
index 03007aa4f4..86cc0be1d3 100644
--- a/meta/recipes-extended/newt/files/cross_ar.patch
+++ b/meta/recipes-extended/newt/files/cross_ar.patch
@@ -18,18 +18,19 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
configure.ac | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
-diff --git a/Makefile.in b/Makefile.in
---- a/Makefile.in
-+++ b/Makefile.in
+Index: newt-0.52.20/Makefile.in
+===================================================================
+--- newt-0.52.20.orig/Makefile.in
++++ newt-0.52.20/Makefile.in
@@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
- CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
+ CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
GNU_LD = @GNU_LD@
+AR = @AR@
VERSION = @VERSION@
TAG = r$(subst .,-,$(VERSION))
-@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH)
+@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNE
$(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS)
$(LIBNEWT): $(LIBOBJS)
@@ -38,10 +39,10 @@ diff --git a/Makefile.in b/Makefile.in
newt.o $(SHAREDDIR)/newt.o: newt.c Makefile
-diff --git a/configure.ac b/configure.ac
-index 92e6da8..cd83d57 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: newt-0.52.20/configure.ac
+===================================================================
+--- newt-0.52.20.orig/configure.ac
++++ newt-0.52.20/configure.ac
@@ -15,6 +15,10 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_GREP
@@ -51,8 +52,5 @@ index 92e6da8..cd83d57 100644
+AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
+AC_PROG_AR
- # Are we using GNU ld?
- AC_MSG_CHECKING([for GNU ld])
---
-1.8.1.2
-
+ AC_CHECK_SIZEOF([long])
+ AC_CHECK_SIZEOF([long long])
diff --git a/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch
deleted file mode 100644
index b0a1e8c105..0000000000
--- a/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Pending
-
-Author: dexuan.cui@intel.com
-Date: Fri Apr 15 16:17:39 CST 2011
-
-The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should
-ensure the directory ${SHAREDDIR} exists.
-
-We need to push the patch to upstream.
-
-Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- Makefile.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -128,12 +128,12 @@ $(SHAREDDIR):
-
- sharedlib: $(LIBNEWTSH)
-
--$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
-+$(LIBNEWTSH): $(SHAREDOBJS)
- $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS)
- ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT)
- ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
-
--$(SHAREDDIR)/%.o : %.c
-+$(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
- $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
-
- install: $(LIBNEWT) install-sh whiptail
---
-1.8.1.2
-
diff --git a/meta/recipes-extended/newt/files/pie-flags.patch b/meta/recipes-extended/newt/files/pie-flags.patch
index 8883e26adf..92f5b2503b 100644
--- a/meta/recipes-extended/newt/files/pie-flags.patch
+++ b/meta/recipes-extended/newt/files/pie-flags.patch
@@ -1,7 +1,4 @@
-specify -fPIC after CFLAGS so it can override the CFLAGS containing -pie and -fpie
-this makes sure the objects that go into shared objects are compiled with -fPIC
-and not with -fpie. We can not use -fpie on objects which will go into .so files
-Fixes errors like
+specify -fPIC after CFLAGS so it can override the CFLAGS containing -pie and -fpie this makes sure the objects that go into shared objects are compiled with -fPIC and not with -fpie. We can not use -fpie on objects which will go into .so files Fixes errors like
| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: shared/newt.o: relocation R_X86_64_PC32 against undefined symbol `SLtt_Screen_Rows@@SLANG2' can not be used when making a shared object; recompile with -fPIC
| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: final link failed: Bad value
@@ -10,10 +7,15 @@ Fixes errors like
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: newt-0.52.18/Makefile.in
-===================================================================
---- newt-0.52.18.orig/Makefile.in
-+++ newt-0.52.18/Makefile.in
+
+---
+ Makefile.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index be5f87b..88ee0b7 100644
+--- a/Makefile.in
++++ b/Makefile.in
@@ -96,8 +96,8 @@ _snack.$(SOEXT): snack.c $(LIBNEWTSH)
PIFLAGS=`$$pyconfig --includes`; \
PLDFLAGS=`$$pyconfig --ldflags`; \
@@ -25,12 +27,15 @@ Index: newt-0.52.18/Makefile.in
echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
$(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
done || :
-@@ -135,7 +135,7 @@ $(LIBNEWTSH): $(SHAREDOBJS)
- ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
+@@ -133,7 +133,7 @@ $(LIBNEWTSH): $(SHAREDOBJS)
- $(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
+ $(SHAREDDIR)/%.o : %.c
+ @mkdir -p $(SHAREDDIR)
- $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(SHCFLAGS) -o $@ $<
install: $(LIBNEWT) install-sh whiptail
[ -d $(instroot)/$(bindir) ] || install -m 755 -d $(instroot)/$(bindir)
+--
+2.7.4
+
diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.19.bb b/meta/recipes-extended/newt/libnewt-python_0.52.19.bb
deleted file mode 100644
index 20369effeb..0000000000
--- a/meta/recipes-extended/newt/libnewt-python_0.52.19.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-require recipes-extended/newt/libnewt_${PV}.bb
-
-SUMMARY .= " - python"
-DEPENDS = "libnewt python3"
-RDEPENDS_${PN} += "python3-core"
-
-inherit python3native python3-dir
-
-EXTRA_OECONF += "--with-python"
-EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
-
-
-do_compile () {
- VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
- oe_runmake _snack.so
-}
-
-do_install () {
- install -d ${D}${PYTHON_SITEPACKAGES_DIR}
- install -m 0755 ${PYTHON_DIR}/_snack.so ${D}${PYTHON_SITEPACKAGES_DIR}/
- install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/
-}
-
-PACKAGES_remove = "whiptail"
-
-FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/newt/libnewt_0.52.19.bb b/meta/recipes-extended/newt/libnewt_0.52.19.bb
deleted file mode 100644
index a26ce1fbe7..0000000000
--- a/meta/recipes-extended/newt/libnewt_0.52.19.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "A library for text mode user interfaces"
-
-DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
-interfaces. Newt can be used to add stacked windows, entry widgets, \
-checkboxes, radio buttons, labels, plain text fields, scrollbars, \
-etc., to text mode user interfaces. This package also contains the \
-shared library needed by programs built with newt, as well as a \
-/usr/bin/dialog replacement called whiptail. Newt is based on the \
-slang library."
-
-HOMEPAGE = "https://fedorahosted.org/newt/"
-SECTION = "libs"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-# slang needs to be >= 2.2
-DEPENDS = "slang popt"
-
-SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
- file://fix_SHAREDDIR.patch \
- file://cross_ar.patch \
- file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \
- file://pie-flags.patch \
- file://0001-detect-gold-as-GNU-linker-too.patch \
-"
-
-SRC_URI[md5sum] = "e4aa0f7943edd39c52481a87f68f412a"
-SRC_URI[sha256sum] = "08c0db56c21996af6a7cbab99491b774c6c09cef91cd9b03903c84634bff2e80"
-
-S = "${WORKDIR}/newt-${PV}"
-
-EXTRA_OECONF = "--without-tcl --without-python"
-
-inherit autotools-brokensep
-
-CLEANBROKEN = "1"
-
-export CPPFLAGS
-
-PACKAGES_prepend = "whiptail "
-
-do_configure_prepend() {
- sh autogen.sh
-}
-
-do_compile_prepend() {
- # Make sure the recompile is OK
- rm -f ${B}/.depend
-}
-
-FILES_whiptail = "${bindir}/whiptail"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/newt/libnewt_0.52.21.bb b/meta/recipes-extended/newt/libnewt_0.52.21.bb
new file mode 100644
index 0000000000..09b61be61d
--- /dev/null
+++ b/meta/recipes-extended/newt/libnewt_0.52.21.bb
@@ -0,0 +1,58 @@
+SUMMARY = "A library for text mode user interfaces"
+
+DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
+interfaces. Newt can be used to add stacked windows, entry widgets, \
+checkboxes, radio buttons, labels, plain text fields, scrollbars, \
+etc., to text mode user interfaces. This package also contains the \
+shared library needed by programs built with newt, as well as a \
+/usr/bin/dialog replacement called whiptail. Newt is based on the \
+slang library."
+
+HOMEPAGE = "https://releases.pagure.org/newt/"
+SECTION = "libs"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+# slang needs to be >= 2.2
+DEPENDS = "slang popt python3"
+
+SRC_URI = "https://releases.pagure.org/newt/newt-${PV}.tar.gz \
+ file://cross_ar.patch \
+ file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \
+ file://pie-flags.patch \
+ file://0001-detect-gold-as-GNU-linker-too.patch \
+"
+
+SRC_URI[md5sum] = "a0a5fd6b53bb167a65e15996b249ebb5"
+SRC_URI[sha256sum] = "265eb46b55d7eaeb887fca7a1d51fe115658882dfe148164b6c49fccac5abb31"
+
+S = "${WORKDIR}/newt-${PV}"
+
+inherit autotools-brokensep python3native python3-dir
+
+EXTRA_OECONF = "--without-tcl --with-python"
+
+EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
+
+CLEANBROKEN = "1"
+
+export CPPFLAGS
+
+PACKAGES_prepend = "whiptail ${PN}-python "
+
+RDEPENDS_${PN}-python += "python3-core"
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
+
+do_configure_prepend() {
+ sh autogen.sh
+}
+
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.depend
+}
+
+FILES_whiptail = "${bindir}/whiptail"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb b/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb
new file mode 100644
index 0000000000..7501837937
--- /dev/null
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb
@@ -0,0 +1,61 @@
+#
+# Copyright (C) 2019 Konsulko Group
+#
+
+SUMMARY = "Full-featured set of base utils"
+DESCRIPTION = "Package group bringing in packages needed to provide much of the base utils type functionality found in busybox"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit packagegroup
+
+VIRTUAL-RUNTIME_vim ?= "vim-tiny"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+RDEPENDS_${PN} = "\
+ base-passwd \
+ bash \
+ bind-utils \
+ bzip2 \
+ coreutils \
+ cpio \
+ ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "debianutils-run-parts", d)} \
+ dhcp-client \
+ ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "dhcp-server", d)} \
+ diffutils \
+ ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "dpkg-start-stop", d)} \
+ e2fsprogs \
+ ed \
+ file \
+ findutils \
+ gawk \
+ grep \
+ gzip \
+ ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "ifupdown", d)} \
+ inetutils \
+ inetutils-ping \
+ inetutils-telnet \
+ inetutils-tftp \
+ inetutils-traceroute \
+ iproute2 \
+ ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "kbd", "", d)} \
+ kmod \
+ less \
+ ncurses-tools \
+ net-tools \
+ parted \
+ patch \
+ procps \
+ psmisc \
+ sed \
+ shadow-base \
+ tar \
+ time \
+ unzip \
+ util-linux \
+ ${VIRTUAL-RUNTIME_vim} \
+ wget \
+ which \
+ xz \
+ "
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
index a60a68cbf2..15a8e6dedc 100644
--- a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
@@ -31,7 +31,7 @@ python __anonymous () {
namemap["packagegroup-core-full-cmdline-initscripts"] = "packagegroup-core-initscripts"
namemap["packagegroup-core-full-cmdline-sys-services"] = "packagegroup-core-sys-services"
- packages = d.getVar("PACKAGES", True).split()
+ packages = d.getVar("PACKAGES").split()
for pkg in packages:
if pkg.endswith('-dev'):
mapped = namemap.get(pkg[:-4], None)
@@ -81,24 +81,20 @@ RDEPENDS_packagegroup-core-full-cmdline-utils = "\
gawk \
gmp \
grep \
+ less \
makedevs \
mc \
mc-fish \
mc-helpers \
mc-helpers-perl \
- mc-helpers-python \
- mktemp \
ncurses \
net-tools \
- pax \
- popt \
procps \
psmisc \
sed \
tar \
time \
util-linux \
- zlib \
"
RDEPENDS_packagegroup-core-full-cmdline-extended = "\
@@ -110,16 +106,12 @@ RDEPENDS_packagegroup-core-full-cmdline-extended = "\
"
RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\
- byacc \
diffutils \
m4 \
make \
patch \
"
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
-VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
-VIRTUAL-RUNTIME_login_manager ?= "busybox"
VIRTUAL-RUNTIME_syslog ?= "sysklogd"
RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\
${VIRTUAL-RUNTIME_initscripts} \
@@ -130,31 +122,16 @@ RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\
"
RDEPENDS_packagegroup-core-full-cmdline-multiuser = "\
+ bzip2 \
cracklib \
gzip \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libuser', '', d)} \
shadow \
sudo \
"
RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\
at \
- bzip2 \
cronie \
- dbus \
- dbus-glib \
- elfutils \
- gzip \
- less \
- libcap \
- libevent \
logrotate \
- nfs-utils \
- pciutils \
- libpcre \
- rpcbind \
- sysfsutils \
- tcp-wrappers \
- tzdata \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'nfs', 'nfs-utils rpcbind', '', d)} \
"
-
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
deleted file mode 100644
index 29564e0c9d..0000000000
--- a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ /dev/null
@@ -1,271 +0,0 @@
-#
-# Copyright (C) 2010 Intel Corporation
-#
-
-SUMMARY = "Linux Standard Base (LSB)"
-DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specification"
-PR = "r10"
-
-inherit packagegroup distro_features_check
-
-# The libxt, libxtst and others require x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-#
-# We will skip parsing this packagegeoup for non-glibc systems
-#
-python __anonymous () {
- if d.getVar('TCLIBC', True) != "glibc":
- raise bb.parse.SkipPackage("incompatible with %s C library" %
- d.getVar('TCLIBC', True))
-}
-
-PACKAGES = "\
- packagegroup-core-lsb \
- packagegroup-core-sys-extended \
- packagegroup-core-db \
- packagegroup-core-perl \
- packagegroup-core-python \
- packagegroup-core-tcl \
- packagegroup-core-lsb-misc \
- packagegroup-core-lsb-core \
- packagegroup-core-lsb-perl \
- packagegroup-core-lsb-python \
- packagegroup-core-lsb-desktop \
- packagegroup-core-lsb-runtime-add \
- "
-
-
-RDEPENDS_packagegroup-core-lsb = "\
- packagegroup-core-sys-extended \
- packagegroup-core-db \
- packagegroup-core-perl \
- packagegroup-core-python \
- packagegroup-core-tcl \
- packagegroup-core-lsb-misc \
- packagegroup-core-lsb-core \
- packagegroup-core-lsb-perl \
- packagegroup-core-lsb-python \
- packagegroup-core-lsb-desktop \
- packagegroup-core-lsb-runtime-add \
- "
-
-
-RDEPENDS_packagegroup-core-sys-extended = "\
- curl \
- dhcp-client \
- hdparm \
- lighttpd \
- libaio \
- lrzsz \
- lzo \
- mc \
- mc-fish \
- mc-helpers \
- mc-helpers-perl \
- mc-helpers-python \
- mdadm \
- minicom \
- neon \
- parted \
- quota \
- screen \
- setserial \
- sysstat \
- udev-extraconf \
- unzip \
- watchdog \
- wget \
- which \
- xinetd \
- zip \
- "
-
-RDEPENDS_packagegroup-core-db = "\
- db \
- sqlite3 \
- "
-
-RDEPENDS_packagegroup-core-perl = "\
- gdbm \
- perl \
- zlib \
- "
-
-
-RDEPENDS_packagegroup-core-python = "\
- expat \
- gdbm \
- gmp \
- ncurses \
- openssl \
- python \
- readline \
- zip \
- "
-
-RDEPENDS_packagegroup-core-tcl = "\
- tcl \
- "
-
-# Miscellaneous packages required by LSB (or LSB tests)
-RDEPENDS_packagegroup-core-lsb-misc = "\
- chkconfig \
- gettext \
- gettext-runtime \
- groff \
- lsbinitscripts \
- lsbtest \
- lsof \
- strace \
- libusb1 \
- usbutils \
- rpm \
- "
-
-SUMMARY_packagegroup-core-lsb-core = "LSB Core"
-DESCRIPTION_packagegroup-core-lsb-core = "Packages required to support commands/libraries \
- specified in the LSB Core specification"
-RDEPENDS_packagegroup-core-lsb-core = "\
- at \
- bash \
- bc \
- binutils \
- binutils-symlinks \
- coreutils \
- cpio \
- cronie \
- cups \
- diffutils \
- ed \
- glibc-utils \
- elfutils \
- file \
- findutils \
- fontconfig-utils \
- foomatic-filters \
- gawk \
- ghostscript \
- grep \
- gzip \
- localedef \
- lsb \
- m4 \
- mailx \
- make \
- man \
- man-pages \
- mktemp \
- msmtp \
- patch \
- pax \
- procps \
- psmisc \
- sed \
- shadow \
- tar \
- time \
- util-linux \
- xdg-utils \
- \
- glibc \
- libgcc \
- libpam \
- libxml2 \
- ncurses \
- zlib \
- nspr \
- libpng12 \
- nss \
-"
-
-SUMMARY_packagegroup-core-lsb-perl = "LSB Runtime Languages (Perl)"
-DESCRIPTION_packagegroup-core-lsb-perl = "Packages required to support libraries \
- specified in the LSB Runtime languages specification (Perl parts)"
-RDEPENDS_packagegroup-core-lsb-perl = "\
- perl \
- perl-modules \
- perl-misc \
- perl-pod \
- perl-dev \
- perl-doc \
-"
-
-SUMMARY_packagegroup-core-lsb-python = "LSB Runtime Languages (Python)"
-DESCRIPTION_packagegroup-core-lsb-python = "Packages required to support libraries \
- specified in the LSB Runtime languages specification (Python parts)"
-RDEPENDS_packagegroup-core-lsb-python = "\
- python \
- python-modules \
- python-misc \
-"
-
-QT4PKGS = " \
- libqtcore4 \
- libqtgui4 \
- libqtsql4 \
- libqtsvg4 \
- libqtxml4 \
- libqtnetwork4 \
- qt4-plugin-sqldriver-sqlite \
- ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \
- "
-QT4PKGS_mips64 = ""
-QT4PKGS_mips64n32 = ""
-
-def get_libqt4(d):
- if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) or "":
- if 'qt4' in d.getVar('BBFILE_COLLECTIONS', False) or "":
- return d.getVar('QT4PKGS', False)
-
- bb.warn('The meta-qt4 layer should be added, this layer provides Qt 4.x ' \
- 'libraries. Its intended use is for passing LSB tests as Qt4 is ' \
- 'a requirement for LSB.')
- return ''
-
-SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop"
-DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \
- specified in the LSB Desktop specification"
-RDEPENDS_packagegroup-core-lsb-desktop = "\
- libxt \
- libxxf86vm \
- libdrm \
- libglu \
- libxi \
- libxtst \
- libx11-locale \
- xorg-minimal-fonts \
- gdk-pixbuf-loader-ico \
- gdk-pixbuf-loader-bmp \
- gdk-pixbuf-loader-ani \
- gdk-pixbuf-xlib \
- liberation-fonts \
- gtk+ \
- atk \
- libasound \
- ${@get_libqt4(d)} \
-"
-
-RDEPENDS_packagegroup-core-lsb-runtime-add = "\
- ldd \
- pam-plugin-wheel \
- e2fsprogs-mke2fs \
- mkfontdir \
- liburi-perl \
- libxml-parser-perl \
- libxml-perl \
- libxml-sax-perl \
- glibc-localedatas \
- glibc-gconvs \
- glibc-charmaps \
- glibc-binaries \
- glibc-localedata-posix \
- glibc-extra-nss \
- glibc-pcprofile \
- libclass-isa-perl \
- libenv-perl \
- libdumpvalue-perl \
- libfile-checktree-perl \
- libi18n-collate-perl \
- libpod-plainer-perl \
-"
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch
deleted file mode 100644
index 680029ae0d..0000000000
--- a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch
+++ /dev/null
@@ -1,226 +0,0 @@
-From 555407ff6e2f742df64ae93859f14a0fc1397829 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Fri, 12 Sep 2014 05:35:05 -0400
-Subject: [PATCH] libpam/xtests: remove bash dependency
-
-There's not bash specific syntax in the xtest scripts:
-
- # after below patches applied:
- $ cd Linux-PAM-1.1.6/xtests
- $ checkbashisms *.sh
- No output
-
-Just remove the runtime dependency to bash.
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- xtests/run-xtests.sh | 2 +-
- xtests/tst-pam_access1.sh | 2 +-
- xtests/tst-pam_access2.sh | 2 +-
- xtests/tst-pam_access3.sh | 2 +-
- xtests/tst-pam_access4.sh | 2 +-
- xtests/tst-pam_assemble_line1.sh | 2 +-
- xtests/tst-pam_group1.sh | 2 +-
- xtests/tst-pam_limits1.sh | 2 +-
- xtests/tst-pam_pwhistory1.sh | 2 +-
- xtests/tst-pam_substack1.sh | 2 +-
- xtests/tst-pam_substack2.sh | 2 +-
- xtests/tst-pam_substack3.sh | 2 +-
- xtests/tst-pam_substack4.sh | 2 +-
- xtests/tst-pam_substack5.sh | 2 +-
- xtests/tst-pam_succeed_if1.sh | 2 +-
- xtests/tst-pam_unix1.sh | 2 +-
- xtests/tst-pam_unix2.sh | 2 +-
- xtests/tst-pam_unix3.sh | 2 +-
- xtests/tst-pam_unix4.sh | 2 +-
- 19 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh
-index 3a89057..1cf8684 100755
---- a/xtests/run-xtests.sh
-+++ b/xtests/run-xtests.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- SRCDIR=$1
- shift 1
-diff --git a/xtests/tst-pam_access1.sh b/xtests/tst-pam_access1.sh
-index 180d256..70521d2 100755
---- a/xtests/tst-pam_access1.sh
-+++ b/xtests/tst-pam_access1.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/groupadd tstpamaccess
- /usr/sbin/useradd -G tstpamaccess -p '!!' tstpamaccess1
-diff --git a/xtests/tst-pam_access2.sh b/xtests/tst-pam_access2.sh
-index 0a30275..7e3e60f 100755
---- a/xtests/tst-pam_access2.sh
-+++ b/xtests/tst-pam_access2.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/groupadd tstpamaccess
- /usr/sbin/useradd -p '!!' tstpamaccess2
-diff --git a/xtests/tst-pam_access3.sh b/xtests/tst-pam_access3.sh
-index 348e0c3..3630e2e 100755
---- a/xtests/tst-pam_access3.sh
-+++ b/xtests/tst-pam_access3.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/useradd -p '!!' tstpamaccess3
- ./tst-pam_access3
-diff --git a/xtests/tst-pam_access4.sh b/xtests/tst-pam_access4.sh
-index 61e7b44..4538df4 100755
---- a/xtests/tst-pam_access4.sh
-+++ b/xtests/tst-pam_access4.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/useradd -p '!!' tstpamaccess4
- ./tst-pam_access4
-diff --git a/xtests/tst-pam_assemble_line1.sh b/xtests/tst-pam_assemble_line1.sh
-index 248d47e..dc2a675 100755
---- a/xtests/tst-pam_assemble_line1.sh
-+++ b/xtests/tst-pam_assemble_line1.sh
-@@ -1,3 +1,3 @@
--#!/bin/bash
-+#!/bin/sh
-
- exec ./tst-pam_authfail tst-pam_assemble_line1
-diff --git a/xtests/tst-pam_group1.sh b/xtests/tst-pam_group1.sh
-index b76377f..44faca9 100755
---- a/xtests/tst-pam_group1.sh
-+++ b/xtests/tst-pam_group1.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/groupadd tstpamgrpg
- /usr/sbin/useradd -p '!!' tstpamgrp
-diff --git a/xtests/tst-pam_limits1.sh b/xtests/tst-pam_limits1.sh
-index 4faa822..32c021d 100755
---- a/xtests/tst-pam_limits1.sh
-+++ b/xtests/tst-pam_limits1.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/useradd -p '!!' tstpamlimits
- ./tst-pam_limits1
-diff --git a/xtests/tst-pam_pwhistory1.sh b/xtests/tst-pam_pwhistory1.sh
-index ddb3b8b..0f212e2 100644
---- a/xtests/tst-pam_pwhistory1.sh
-+++ b/xtests/tst-pam_pwhistory1.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/useradd tstpampwhistory
- ./tst-pam_pwhistory1
-diff --git a/xtests/tst-pam_substack1.sh b/xtests/tst-pam_substack1.sh
-index 5260175..f1b72a7 100755
---- a/xtests/tst-pam_substack1.sh
-+++ b/xtests/tst-pam_substack1.sh
-@@ -1,3 +1,3 @@
--#!/bin/bash
-+#!/bin/sh
-
- exec ./tst-pam_authfail tst-pam_substack1
-diff --git a/xtests/tst-pam_substack2.sh b/xtests/tst-pam_substack2.sh
-index c02f597..3804fa7 100755
---- a/xtests/tst-pam_substack2.sh
-+++ b/xtests/tst-pam_substack2.sh
-@@ -1,3 +1,3 @@
--#!/bin/bash
-+#!/bin/sh
-
- exec ./tst-pam_authsucceed tst-pam_substack2
-diff --git a/xtests/tst-pam_substack3.sh b/xtests/tst-pam_substack3.sh
-index 0e572aa..aa48e8e 100755
---- a/xtests/tst-pam_substack3.sh
-+++ b/xtests/tst-pam_substack3.sh
-@@ -1,3 +1,3 @@
--#!/bin/bash
-+#!/bin/sh
-
- exec ./tst-pam_authsucceed tst-pam_substack3
-diff --git a/xtests/tst-pam_substack4.sh b/xtests/tst-pam_substack4.sh
-index a3ef08a..958a07a 100755
---- a/xtests/tst-pam_substack4.sh
-+++ b/xtests/tst-pam_substack4.sh
-@@ -1,3 +1,3 @@
--#!/bin/bash
-+#!/bin/sh
-
- exec ./tst-pam_authsucceed tst-pam_substack4
-diff --git a/xtests/tst-pam_substack5.sh b/xtests/tst-pam_substack5.sh
-index e2714fd..7e0da74 100755
---- a/xtests/tst-pam_substack5.sh
-+++ b/xtests/tst-pam_substack5.sh
-@@ -1,3 +1,3 @@
--#!/bin/bash
-+#!/bin/sh
-
- exec ./tst-pam_authfail tst-pam_substack5
-diff --git a/xtests/tst-pam_succeed_if1.sh b/xtests/tst-pam_succeed_if1.sh
-index a643b2e..58e57b4 100755
---- a/xtests/tst-pam_succeed_if1.sh
-+++ b/xtests/tst-pam_succeed_if1.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/useradd -p '!!' tstpamtest
- /usr/sbin/useradd -p '!!' pamtest
-diff --git a/xtests/tst-pam_unix1.sh b/xtests/tst-pam_unix1.sh
-index f75bd84..72deac0 100755
---- a/xtests/tst-pam_unix1.sh
-+++ b/xtests/tst-pam_unix1.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- /usr/sbin/useradd -p '!!' tstpamunix
- ./tst-pam_unix1
-diff --git a/xtests/tst-pam_unix2.sh b/xtests/tst-pam_unix2.sh
-index 7093155..c04d6e6 100755
---- a/xtests/tst-pam_unix2.sh
-+++ b/xtests/tst-pam_unix2.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- # pamunix0 = 0aXKZztA.d1KY
- /usr/sbin/useradd -p 0aXKZztA.d1KY tstpamunix
-diff --git a/xtests/tst-pam_unix3.sh b/xtests/tst-pam_unix3.sh
-index ef4a07c..b52db2b 100755
---- a/xtests/tst-pam_unix3.sh
-+++ b/xtests/tst-pam_unix3.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
- /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
-diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh
-index 787c2f9..e7976fd 100755
---- a/xtests/tst-pam_unix4.sh
-+++ b/xtests/tst-pam_unix4.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
- /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
---
-1.7.9.5
-
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
index be687457f8..7edf66f915 100644
--- a/meta/recipes-extended/pam/libpam/libpam-xtests.patch
+++ b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
@@ -3,18 +3,20 @@ This patch is used to create a new sub package libpam-xtests to do more checks.
Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang@windriver.com>
---- Linux-PAM-1.1.4/xtests/Makefile.am.orig 2011-07-19 17:00:09.619980001 +0800
-+++ Linux-PAM-1.1.4/xtests/Makefile.am 2011-07-19 16:54:00.229979998 +0800
-@@ -7,7 +7,7 @@
- AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \
- -L$(top_builddir)/libpam_misc -lpam_misc
+Index: Linux-PAM-1.3.0/xtests/Makefile.am
+===================================================================
+--- Linux-PAM-1.3.0.orig/xtests/Makefile.am
++++ Linux-PAM-1.3.0/xtests/Makefile.am
+@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src
+ LDADD = $(top_builddir)/libpam/libpam.la \
+ $(top_builddir)/libpam_misc/libpam_misc.la
-CLEANFILES = *~ $(XTESTS)
+CLEANFILES = *~
EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
-@@ -51,3 +51,18 @@
+@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS)
xtests: $(XTESTS) run-xtests.sh
"$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
diff --git a/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
index f1834f6ce3..9b8d4c2975 100644
--- a/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
+++ b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
@@ -5,12 +5,13 @@ Upstream-Status: Pending
Signed-off-by: Ming Liu <ming.liu@windriver.com>
===================================================================
-diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am
---- a/modules/pam_securetty/Makefile.am 2013-07-05 11:08:23.224483237 +0800
-+++ b/modules/pam_securetty/Makefile.am 2013-07-05 11:15:21.304486456 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/Makefile.am
+===================================================================
+--- Linux-PAM-1.3.0.orig/modules/pam_securetty/Makefile.am
++++ Linux-PAM-1.3.0/modules/pam_securetty/Makefile.am
@@ -24,6 +24,10 @@ endif
securelib_LTLIBRARIES = pam_securetty.la
- pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam
+ pam_securetty_la_LIBADD = $(top_builddir)/libpam/libpam.la
+pam_securetty_la_SOURCES = \
+ pam_securetty.c \
@@ -19,9 +20,10 @@ diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.
if ENABLE_REGENERATE_MAN
noinst_DATA = README
README: pam_securetty.8.xml
-diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c
---- a/modules/pam_securetty/pam_securetty.c 2013-07-05 11:07:50.064483568 +0800
-+++ b/modules/pam_securetty/pam_securetty.c 2013-07-05 11:12:23.994483344 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/pam_securetty.c
+===================================================================
+--- Linux-PAM-1.3.0.orig/modules/pam_securetty/pam_securetty.c
++++ Linux-PAM-1.3.0/modules/pam_securetty/pam_securetty.c
@@ -1,7 +1,5 @@
/* pam_securetty module */
@@ -104,9 +106,10 @@ diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_s
if (retval && !(ctrl & PAM_NOCONSOLE_ARG)) {
FILE *cmdlinefile;
-diff -urpN a/modules/pam_securetty/tty_secure.c b/modules/pam_securetty/tty_secure.c
---- a/modules/pam_securetty/tty_secure.c 1970-01-01 08:30:00.000000000 +0830
-+++ b/modules/pam_securetty/tty_secure.c 2013-07-05 11:14:21.534482900 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/tty_secure.c
+===================================================================
+--- /dev/null
++++ Linux-PAM-1.3.0/modules/pam_securetty/tty_secure.c
@@ -0,0 +1,90 @@
+/*
+ * A function to determine if a particular line is in /etc/securetty
diff --git a/meta/recipes-extended/pam/libpam/use-utmpx.patch b/meta/recipes-extended/pam/libpam/use-utmpx.patch
deleted file mode 100644
index dd04bbb844..0000000000
--- a/meta/recipes-extended/pam/libpam/use-utmpx.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-utmp() may not be configured in and use posix compliant utmpx always
-UTMP is SVID legacy, UTMPX is mandated by POSIX
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: Linux-PAM-1.2.1/libpam/pam_modutil_getlogin.c
-===================================================================
---- Linux-PAM-1.2.1.orig/libpam/pam_modutil_getlogin.c
-+++ Linux-PAM-1.2.1/libpam/pam_modutil_getlogin.c
-@@ -10,8 +10,7 @@
-
- #include <stdlib.h>
- #include <unistd.h>
--#include <utmp.h>
--
-+#include <utmpx.h>
- #define _PAMMODUTIL_GETLOGIN "_pammodutil_getlogin"
-
- const char *
-@@ -22,7 +21,7 @@ pam_modutil_getlogin(pam_handle_t *pamh)
- const void *void_curr_tty;
- const char *curr_tty;
- char *curr_user;
-- struct utmp *ut, line;
-+ struct utmpx *ut, line;
-
- status = pam_get_data(pamh, _PAMMODUTIL_GETLOGIN, &logname);
- if (status == PAM_SUCCESS) {
-@@ -48,10 +47,10 @@ pam_modutil_getlogin(pam_handle_t *pamh)
- }
- logname = NULL;
-
-- setutent();
-+ setutxent();
- strncpy(line.ut_line, curr_tty, sizeof(line.ut_line));
-
-- if ((ut = getutline(&line)) == NULL) {
-+ if ((ut = getutxline(&line)) == NULL) {
- goto clean_up_and_go_home;
- }
-
-@@ -74,7 +73,7 @@ pam_modutil_getlogin(pam_handle_t *pamh)
-
- clean_up_and_go_home:
-
-- endutent();
-+ endutxent();
-
- return logname;
- }
-Index: Linux-PAM-1.2.1/modules/pam_issue/pam_issue.c
-===================================================================
---- Linux-PAM-1.2.1.orig/modules/pam_issue/pam_issue.c
-+++ Linux-PAM-1.2.1/modules/pam_issue/pam_issue.c
-@@ -25,7 +25,7 @@
- #include <string.h>
- #include <unistd.h>
- #include <sys/utsname.h>
--#include <utmp.h>
-+#include <utmpx.h>
- #include <time.h>
- #include <syslog.h>
-
-@@ -246,13 +246,13 @@ read_issue_quoted(pam_handle_t *pamh, FI
- case 'U':
- {
- unsigned int users = 0;
-- struct utmp *ut;
-- setutent();
-- while ((ut = getutent())) {
-+ struct utmpx *ut;
-+ setutxent();
-+ while ((ut = getutxent())) {
- if (ut->ut_type == USER_PROCESS)
- ++users;
- }
-- endutent();
-+ endutxent();
- if (c == 'U')
- snprintf (buf, sizeof buf, "%u %s", users,
- (users == 1) ? "user" : "users");
-Index: Linux-PAM-1.2.1/modules/pam_lastlog/pam_lastlog.c
-===================================================================
---- Linux-PAM-1.2.1.orig/modules/pam_lastlog/pam_lastlog.c
-+++ Linux-PAM-1.2.1/modules/pam_lastlog/pam_lastlog.c
-@@ -15,8 +15,9 @@
- #include <errno.h>
- #ifdef HAVE_UTMP_H
- # include <utmp.h>
--#else
--# include <lastlog.h>
-+#endif
-+#ifdef HAVE_UTMPX_H
-+# include <utmpx.h>
- #endif
- #include <pwd.h>
- #include <stdlib.h>
-@@ -27,6 +28,12 @@
- #include <syslog.h>
- #include <unistd.h>
-
-+#ifndef HAVE_UTMP_H
-+#define UT_LINESIZE 32
-+#define UT_HOSTSIZE 32
-+#define UT_NAMESIZE 256
-+#endif
-+
- #if defined(hpux) || defined(sunos) || defined(solaris)
- # ifndef _PATH_LASTLOG
- # define _PATH_LASTLOG "/usr/adm/lastlog"
-@@ -38,7 +45,7 @@
- # define UT_LINESIZE 12
- # endif /* UT_LINESIZE */
- #endif
--#if defined(hpux)
-+#if defined(hpux) || !defined HAVE_UTMP_H
- struct lastlog {
- time_t ll_time;
- char ll_line[UT_LINESIZE];
-@@ -447,8 +454,8 @@ last_login_failed(pam_handle_t *pamh, in
- {
- int retval;
- int fd;
-- struct utmp ut;
-- struct utmp utuser;
-+ struct utmpx ut;
-+ struct utmpx utuser;
- int failed = 0;
- char the_time[256];
- char *date = NULL;
-Index: Linux-PAM-1.2.1/modules/pam_limits/pam_limits.c
-===================================================================
---- Linux-PAM-1.2.1.orig/modules/pam_limits/pam_limits.c
-+++ Linux-PAM-1.2.1/modules/pam_limits/pam_limits.c
-@@ -33,7 +33,7 @@
- #include <sys/resource.h>
- #include <limits.h>
- #include <glob.h>
--#include <utmp.h>
-+#include <utmpx.h>
- #ifndef UT_USER /* some systems have ut_name instead of ut_user */
- #define UT_USER ut_user
- #endif
-@@ -227,7 +227,7 @@ static int
- check_logins (pam_handle_t *pamh, const char *name, int limit, int ctrl,
- struct pam_limit_s *pl)
- {
-- struct utmp *ut;
-+ struct utmpx *ut;
- int count;
-
- if (ctrl & PAM_DEBUG_ARG) {
-@@ -242,7 +242,7 @@ check_logins (pam_handle_t *pamh, const
- return LOGIN_ERR;
- }
-
-- setutent();
-+ setutxent();
-
- /* Because there is no definition about when an application
- actually adds a utmp entry, some applications bizarrely do the
-@@ -260,7 +260,7 @@ check_logins (pam_handle_t *pamh, const
- count = 1;
- }
-
-- while((ut = getutent())) {
-+ while((ut = getutxent())) {
- #ifdef USER_PROCESS
- if (ut->ut_type != USER_PROCESS) {
- continue;
-@@ -296,7 +296,7 @@ check_logins (pam_handle_t *pamh, const
- break;
- }
- }
-- endutent();
-+ endutxent();
- if (count > limit) {
- if (name) {
- pam_syslog(pamh, LOG_WARNING,
-Index: Linux-PAM-1.2.1/modules/pam_timestamp/pam_timestamp.c
-===================================================================
---- Linux-PAM-1.2.1.orig/modules/pam_timestamp/pam_timestamp.c
-+++ Linux-PAM-1.2.1/modules/pam_timestamp/pam_timestamp.c
-@@ -56,7 +56,7 @@
- #include <time.h>
- #include <sys/time.h>
- #include <unistd.h>
--#include <utmp.h>
-+#include <utmpx.h>
- #include <syslog.h>
- #include <paths.h>
- #include "hmacsha1.h"
-@@ -197,15 +197,15 @@ timestamp_good(time_t then, time_t now,
- static int
- check_login_time(const char *ruser, time_t timestamp)
- {
-- struct utmp utbuf, *ut;
-+ struct utmpx utbuf, *ut;
- time_t oldest_login = 0;
-
-- setutent();
-+ setutxent();
- while(
- #ifdef HAVE_GETUTENT_R
-- !getutent_r(&utbuf, &ut)
-+ !getutxent_r(&utbuf, &ut)
- #else
-- (ut = getutent()) != NULL
-+ (ut = getutxent()) != NULL
- #endif
- ) {
- if (ut->ut_type != USER_PROCESS) {
-@@ -218,7 +218,7 @@ check_login_time(const char *ruser, time
- oldest_login = ut->ut_tv.tv_sec;
- }
- }
-- endutent();
-+ endutxent();
- if(oldest_login == 0 || timestamp < oldest_login) {
- return PAM_AUTH_ERR;
- }
-Index: Linux-PAM-1.2.1/modules/pam_unix/support.c
-===================================================================
---- Linux-PAM-1.2.1.orig/modules/pam_unix/support.c
-+++ Linux-PAM-1.2.1/modules/pam_unix/support.c
-@@ -13,7 +13,6 @@
- #include <pwd.h>
- #include <shadow.h>
- #include <limits.h>
--#include <utmp.h>
- #include <errno.h>
- #include <signal.h>
- #include <ctype.h>
diff --git a/meta/recipes-extended/pam/libpam_1.3.0.bb b/meta/recipes-extended/pam/libpam_1.3.0.bb
deleted file mode 100644
index bb5a4bd8d3..0000000000
--- a/meta/recipes-extended/pam/libpam_1.3.0.bb
+++ /dev/null
@@ -1,169 +0,0 @@
-SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
-DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
-HOMEPAGE = "https://fedorahosted.org/linux-pam/"
-BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
-SECTION = "base"
-# PAM is dual licensed under GPL and BSD.
-# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
-# libpam-runtime-1.0.1 is GPLv2+), by openembedded
-LICENSE = "GPLv2+ | BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
-
-SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
- file://99_pam \
- file://pam.d/common-account \
- file://pam.d/common-auth \
- file://pam.d/common-password \
- file://pam.d/common-session \
- file://pam.d/common-session-noninteractive \
- file://pam.d/other \
- file://libpam-xtests.patch \
- file://fixsepbuild.patch \
- file://pam-security-abstract-securetty-handling.patch \
- file://pam-unix-nullok-secure.patch \
- file://libpam-xtests-remove-bash-dependency.patch \
- file://crypt_configure.patch \
- "
-
-SRC_URI[md5sum] = "da4b2289b7cfb19583d54e9eaaef1c3a"
-SRC_URI[sha256sum] = "241aed1ef522f66ed672719ecf2205ec513fd0075ed80cda8e086a5b1a01d1bb"
-
-SRC_URI_append_libc-uclibc = " file://use-utmpx.patch"
-
-SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \
- file://include_paths_header.patch \
- "
-
-DEPENDS = "bison-native flex flex-native cracklib libxml2-native"
-
-EXTRA_OECONF = "--with-db-uniquename=_pam \
- --includedir=${includedir}/security \
- --libdir=${base_libdir} \
- --disable-nis \
- --disable-regenerate-docu \
- --disable-prelude"
-
-CFLAGS_append = " -fPIC "
-
-PR = "r5"
-
-S = "${WORKDIR}/Linux-PAM-${PV}"
-
-inherit autotools gettext pkgconfig
-
-PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
-
-PACKAGES += "${PN}-runtime ${PN}-xtests"
-FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
-FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
-FILES_${PN}-runtime = "${sysconfdir}"
-FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
-
-PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
-
-def get_multilib_bit(d):
- baselib = d.getVar('baselib', True) or ''
- return baselib.replace('lib', '')
-
-libpam_suffix = "suffix${@get_multilib_bit(d)}"
-
-RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
-RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
-
-RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
- "
-RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-access-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-time-${libpam_suffix} \
- coreutils"
-
-# FIXME: Native suffix breaks here, disable it for now
-RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
-RRECOMMENDS_${PN}_class-native = ""
-
-python populate_packages_prepend () {
- def pam_plugin_append_file(pn, dir, file):
- nf = os.path.join(dir, file)
- of = d.getVar('FILES_' + pn, True)
- if of:
- nf = of + " " + nf
- d.setVar('FILES_' + pn, nf)
-
- def pam_plugin_hook(file, pkg, pattern, format, basename):
- pn = d.getVar('PN', True)
- libpam_suffix = d.getVar('libpam_suffix', True)
-
- rdeps = d.getVar('RDEPENDS_' + pkg, True)
- if rdeps:
- rdeps = rdeps + " " + pn + "-" + libpam_suffix
- else:
- rdeps = pn + "-" + libpam_suffix
- d.setVar('RDEPENDS_' + pkg, rdeps)
-
- provides = d.getVar('RPROVIDES_' + pkg, True)
- if provides:
- provides = provides + " " + pkg + "-" + libpam_suffix
- else:
- provides = pkg + "-" + libpam_suffix
- d.setVar('RPROVIDES_' + pkg, provides)
-
- mlprefix = d.getVar('MLPREFIX', True) or ''
- dvar = bb.data.expand('${WORKDIR}/package', d, True)
- pam_libdir = d.expand('${base_libdir}/security')
- pam_sbindir = d.expand('${sbindir}')
- pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
- pam_pkgname = mlprefix + 'pam-plugin%s'
-
- do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname,
- 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
- pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
- pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
- pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
- pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
- pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
- pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
- pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
- do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
-}
-
-do_install() {
- autotools_do_install
-
- # don't install /var/run when populating rootfs. Do it through volatile
- rm -rf ${D}${localstatedir}
- install -d ${D}${sysconfdir}/default/volatiles
- install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
-
- install -d ${D}${sysconfdir}/pam.d/
- install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
-
- # The lsb requires unix_chkpwd has setuid permission
- chmod 4755 ${D}${sbindir}/unix_chkpwd
-
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
- fi
-}
-
-python do_pam_sanity () {
- if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d):
- bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
-}
-addtask pam_sanity before do_configure
-
-BBCLASSEXTEND = "nativesdk native"
-
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
-CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf"
diff --git a/meta/recipes-extended/pam/libpam_1.3.1.bb b/meta/recipes-extended/pam/libpam_1.3.1.bb
new file mode 100644
index 0000000000..1194933827
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam_1.3.1.bb
@@ -0,0 +1,167 @@
+SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
+DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
+HOMEPAGE = "https://fedorahosted.org/linux-pam/"
+BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
+SECTION = "base"
+# PAM is dual licensed under GPL and BSD.
+# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
+# libpam-runtime-1.0.1 is GPLv2+), by openembedded
+LICENSE = "GPLv2+ | BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3 \
+ file://libpamc/License;md5=a4da476a14c093fdc73be3c3c9ba8fb3 \
+ "
+
+SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux-PAM-${PV}.tar.xz \
+ file://99_pam \
+ file://pam.d/common-account \
+ file://pam.d/common-auth \
+ file://pam.d/common-password \
+ file://pam.d/common-session \
+ file://pam.d/common-session-noninteractive \
+ file://pam.d/other \
+ file://libpam-xtests.patch \
+ file://fixsepbuild.patch \
+ file://pam-security-abstract-securetty-handling.patch \
+ file://pam-unix-nullok-secure.patch \
+ file://crypt_configure.patch \
+ "
+
+SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165"
+SRC_URI[sha256sum] = "eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db"
+
+SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \
+ file://include_paths_header.patch \
+ "
+
+DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt"
+
+EXTRA_OECONF = "--with-db-uniquename=_pam \
+ --includedir=${includedir}/security \
+ --libdir=${base_libdir} \
+ --disable-nis \
+ --disable-regenerate-docu \
+ --disable-prelude"
+
+CFLAGS_append = " -fPIC "
+
+S = "${WORKDIR}/Linux-PAM-${PV}"
+
+inherit autotools gettext pkgconfig
+
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
+
+PACKAGES += "${PN}-runtime ${PN}-xtests"
+FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
+FILES_${PN}-runtime = "${sysconfdir}"
+FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
+
+PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
+
+def get_multilib_bit(d):
+ baselib = d.getVar('baselib') or ''
+ return baselib.replace('lib', '')
+
+libpam_suffix = "suffix${@get_multilib_bit(d)}"
+
+RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
+RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
+
+RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
+ "
+RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-access-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-time-${libpam_suffix} \
+ coreutils"
+
+# FIXME: Native suffix breaks here, disable it for now
+RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
+RRECOMMENDS_${PN}_class-native = ""
+
+python populate_packages_prepend () {
+ def pam_plugin_append_file(pn, dir, file):
+ nf = os.path.join(dir, file)
+ of = d.getVar('FILES_' + pn)
+ if of:
+ nf = of + " " + nf
+ d.setVar('FILES_' + pn, nf)
+
+ def pam_plugin_hook(file, pkg, pattern, format, basename):
+ pn = d.getVar('PN')
+ libpam_suffix = d.getVar('libpam_suffix')
+
+ rdeps = d.getVar('RDEPENDS_' + pkg)
+ if rdeps:
+ rdeps = rdeps + " " + pn + "-" + libpam_suffix
+ else:
+ rdeps = pn + "-" + libpam_suffix
+ d.setVar('RDEPENDS_' + pkg, rdeps)
+
+ provides = d.getVar('RPROVIDES_' + pkg)
+ if provides:
+ provides = provides + " " + pkg + "-" + libpam_suffix
+ else:
+ provides = pkg + "-" + libpam_suffix
+ d.setVar('RPROVIDES_' + pkg, provides)
+
+ mlprefix = d.getVar('MLPREFIX') or ''
+ dvar = d.expand('${WORKDIR}/package')
+ pam_libdir = d.expand('${base_libdir}/security')
+ pam_sbindir = d.expand('${sbindir}')
+ pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
+ pam_pkgname = mlprefix + 'pam-plugin%s'
+
+ do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname,
+ 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
+ pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
+ pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
+ pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
+ pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
+ pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
+ pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
+ pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
+ do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
+}
+
+do_install() {
+ autotools_do_install
+
+ # don't install /var/run when populating rootfs. Do it through volatile
+ rm -rf ${D}${localstatedir}
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
+
+ install -d ${D}${sysconfdir}/pam.d/
+ install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
+
+ # The lsb requires unix_chkpwd has setuid permission
+ chmod 4755 ${D}${sbindir}/unix_chkpwd
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
+ fi
+}
+
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
+BBCLASSEXTEND = "nativesdk native"
+
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
+CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf"
+
+UPSTREAM_CHECK_URI = "https://github.com/linux-pam/linux-pam/releases"
+
+CVE_PRODUCT = "linux-pam"
diff --git a/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch b/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch
deleted file mode 100644
index b0376cefcf..0000000000
--- a/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d78dd087c4ec4715aab5fe115668e726046ecd76 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 18:16:05 -0700
-Subject: [PATCH] Include fcntl.h in /platform_defs.h
-
-exposed when compiling using musl
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libparted/fs/xfs/platform_defs.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h
-index 2b55752..32bd3d3 100644
---- a/libparted/fs/xfs/platform_defs.h
-+++ b/libparted/fs/xfs/platform_defs.h
-@@ -42,6 +42,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <fcntl.h>
- #include <sys/param.h>
- #include <sys/types.h>
-
---
-2.1.4
-
diff --git a/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch b/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch
new file mode 100644
index 0000000000..829c0c8b78
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch
@@ -0,0 +1,33 @@
+From ddbefd80d74c3baaae328332458db447e1666240 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 27 Apr 2017 16:37:24 +0300
+Subject: [PATCH] Move python helper scripts (used only in tests) to Python 3
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ tests/gpt-header-move | 2 +-
+ tests/msdos-overlap | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/gpt-header-move b/tests/gpt-header-move
+index 3dda5cb..a2b9508 100755
+--- a/tests/gpt-header-move
++++ b/tests/gpt-header-move
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+
+ # open img file, subtract 33 from altlba address, and move the last 33 sectors
+ # back by 33 sectors
+diff --git a/tests/msdos-overlap b/tests/msdos-overlap
+index d6ae8d6..2c6747b 100755
+--- a/tests/msdos-overlap
++++ b/tests/msdos-overlap
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ """
+ Write an overlapping partition to a msdos disk
+
diff --git a/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c..0000000000
--- a/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gnulib.mk b/lib/gnulib.mk
-index e1d74db..c0e92dd 100644
---- a/lib/gnulib.mk
-+++ b/lib/gnulib.mk
-@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
---
-2.1.4
-
diff --git a/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch b/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch
new file mode 100644
index 0000000000..4dc2ab259d
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch
@@ -0,0 +1,26 @@
+From d60a8a86f6593738b5324ccd8fe3e6d84a1fe7bc Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 11 Dec 2019 14:18:36 +0100
+Subject: [PATCH] libparted/fs: add $sourcedir/lib to include paths
+
+Otherwise, getopt-pfx-core.h won't be found.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ libparted/fs/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am
+index 286bff6..65f45d3 100644
+--- a/libparted/fs/Makefile.am
++++ b/libparted/fs/Makefile.am
+@@ -3,7 +3,7 @@
+ #
+ # This file may be modified and/or distributed without restriction.
+
+-partedincludedir = -I$(top_builddir)/include -I$(top_srcdir)/include
++partedincludedir = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib
+
+ AM_CFLAGS = $(WARN_CFLAGS)
+
diff --git a/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch b/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch
new file mode 100644
index 0000000000..bd2b5c55b1
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch
@@ -0,0 +1,34 @@
+From 5c99d7e4c2b5e7a957dc922aff03debfebbd6154 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Fri, 3 Mar 2017 21:49:15 +0100
+Subject: [PATCH] libparted_fs_resize: link against libuuid explicitly to
+ unbreak gold linking on test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../libparted/fs/.libs/libparted-fs-resize.so: error: undefined reference to 'uuid_generate'
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ libparted/fs/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am
+index d3cc8bc..c301b0b 100644
+--- a/libparted/fs/Makefile.am
++++ b/libparted/fs/Makefile.am
+@@ -113,6 +113,8 @@ libparted_fs_resize_la_SOURCES = \
+ r/hfs/reloc_plus.c \
+ r/hfs/reloc_plus.h
+
++libparted_fs_resize_la_LIBADD = $(UUID_LIBS)
++
+ AM_CPPFLAGS = \
+ -I$(top_srcdir)/libparted/labels \
+ $(partedincludedir) \
+--
+2.9.3
+
diff --git a/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch b/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch
new file mode 100644
index 0000000000..9524adf7b8
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch
@@ -0,0 +1,66 @@
+From 9f844484cedb39e301b016e9da7852c1a0fb6eea Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 11 Dec 2019 16:27:48 +0100
+Subject: [PATCH] tests: use skip_ rather than skip_test_ (which is undefined)
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tests/t6001-psep.sh | 2 +-
+ tests/t6004-dm-many-partitions.sh | 2 +-
+ tests/t6005-dm-uuid.sh | 2 +-
+ tests/t6006-dm-512b-sectors.sh | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh
+index e350bd2..67014a0 100644
+--- a/tests/t6001-psep.sh
++++ b/tests/t6001-psep.sh
+@@ -21,7 +21,7 @@
+ require_root_
+ require_udevadm_settle_
+
+-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
++(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed"
+
+ # Device maps names - should be random to not conflict with existing ones on
+ # the system
+diff --git a/tests/t6004-dm-many-partitions.sh b/tests/t6004-dm-many-partitions.sh
+index b4be975..7214f60 100755
+--- a/tests/t6004-dm-many-partitions.sh
++++ b/tests/t6004-dm-many-partitions.sh
+@@ -21,7 +21,7 @@
+
+ require_root_
+ require_udevadm_settle_
+-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
++(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed"
+
+ ss=$sector_size_
+ ns=300
+diff --git a/tests/t6005-dm-uuid.sh b/tests/t6005-dm-uuid.sh
+index 4266747..4790a8b 100755
+--- a/tests/t6005-dm-uuid.sh
++++ b/tests/t6005-dm-uuid.sh
+@@ -21,7 +21,7 @@
+
+ require_root_
+ require_udevadm_settle_
+-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
++(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed"
+
+ ss=$sector_size_
+ ns=300
+diff --git a/tests/t6006-dm-512b-sectors.sh b/tests/t6006-dm-512b-sectors.sh
+index bf32135..b679adb 100644
+--- a/tests/t6006-dm-512b-sectors.sh
++++ b/tests/t6006-dm-512b-sectors.sh
+@@ -25,7 +25,7 @@ require_scsi_debug_module_
+ grep '^#define USE_BLKID 1' "$CONFIG_HEADER" > /dev/null ||
+ skip_ 'this system lacks a new-enough libblkid'
+
+-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
++(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed"
+
+ # Device maps names - should be random to not conflict with existing ones on
+ # the system
diff --git a/meta/recipes-extended/parted/files/Makefile b/meta/recipes-extended/parted/files/Makefile
deleted file mode 100644
index ee90be0814..0000000000
--- a/meta/recipes-extended/parted/files/Makefile
+++ /dev/null
@@ -1,285 +0,0 @@
-am__tty_colors_dummy = \
- mgn= red= grn= lgn= blu= brg= std=; \
- am__color_tests=no
-
-am__tty_colors = \
-$(am__tty_colors_dummy); \
-test "X$(AM_COLOR_TESTS)" != Xno \
-&& test "X$$TERM" != Xdumb \
-&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
-&& { \
- am__color_tests=yes; \
- red=''; \
- grn=''; \
- lgn=''; \
- blu=''; \
- mgn=''; \
- brg=''; \
- std=''; \
-}
-
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-am__rst_section = { sed 'p;s/./=/g;' && echo; }
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-
-am__common_driver_flags = \
- --color-tests "$$am__color_tests" \
- --enable-hard-errors "$$am__enable_hard_errors" \
- --expect-failure "$$am__expect_failure"
-am__check_pre = \
-$(am__sh_e_setup); \
-$(am__vpath_adj_setup) $(am__vpath_adj) \
-$(am__tty_colors); \
-srcdir=$(srcdir); export srcdir; \
-am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \
-test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \
-if test -f "./$$f"; then dir=./; \
-elif test -f "$$f"; then dir=; \
-else dir="$(srcdir)/"; fi; \
-tst=$$dir$$f; log='$@'; \
-if test -n '$(DISABLE_HARD_ERRORS)'; then \
- am__enable_hard_errors=no; \
-else \
- am__enable_hard_errors=yes; \
-fi; \
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-
-am__set_TESTS_bases = \
- bases='$(TEST_LOGS)'; \
- bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
- bases=`echo $$bases`
-
-RECHECK_LOGS = $(TEST_LOGS)
-TEST_SUITE_LOG = test-suite.log
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:.log=.log)
-TEST_LOGS = $(am__test_logs2:.sh.log=.log)
-SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
-SH_LOG_COMPILE = $(SH_LOG_COMPILER)
-
-am__set_b = \
- case '$@' in \
- */*) \
- case '$*' in \
- */*) b='$*';; \
- *) b=`echo '$@' | sed 's/\.log$$//'`; \
- esac;; \
- *) \
- b='$*';; \
- esac
-
-MKDIR_P = /bin/mkdir -p
-SHELL = /bin/bash
-VERSION = 3.1
-PACKAGE_STRING = GNU parted 3.1
-PACKAGE_BUGREPORT = bug-parted@gnu.org
-abs_srcdir = $(PWD)
-abs_top_builddir = $(PWD)/..
-abs_top_srcdir = $(PWD)/..
-srcdir = .
-top_srcdir = ..
-subdir = tests
-SH_LOG_COMPILER = $(SHELL)
-
-TESTS = \
- help-version.sh \
- t0000-basic.sh \
- t0001-tiny.sh \
- t0010-script-no-ctrl-chars.sh \
- t0100-print.sh \
- t0101-print-empty.sh \
- t0200-gpt.sh \
- t0201-gpt.sh \
- t0202-gpt-pmbr.sh \
- t0203-gpt-tiny-device-abort.sh \
- t0203-gpt-shortened-device-primary-valid.sh \
- t0205-gpt-list-clobbers-pmbr.sh \
- t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \
- t0207-IEC-binary-notation.sh \
- t0208-mkpart-end-in-IEC.sh \
- t0209-gpt-pmbr_boot.sh \
- t0210-gpt-resized-partition-entry-array.sh \
- t0211-gpt-rewrite-header.sh \
- t0212-gpt-many-partitions.sh \
- t0220-gpt-msftres.sh \
- t0250-gpt.sh \
- t0280-gpt-corrupt.sh \
- t0300-dos-on-gpt.sh \
- t0400-loop-clobber-infloop.sh \
- t0500-dup-clobber.sh \
- t0501-duplicate.sh \
- t1100-busy-label.sh \
- t1101-busy-partition.sh \
- t1700-probe-fs.sh \
- t2200-dos-label-recog.sh \
- t2201-pc98-label-recog.sh \
- t2300-dos-label-extended-bootcode.sh \
- t2310-dos-extended-2-sector-min-offset.sh \
- t2400-dos-hfs-partition-type.sh \
- t2500-probe-corrupt-hfs.sh \
- t3000-resize-fs.sh \
- t3200-type-change.sh \
- t3300-palo-prep.sh \
- t3310-flags.sh \
- t3400-whole-disk-FAT-partition.sh \
- t4000-sun-raid-type.sh \
- t4001-sun-vtoc.sh \
- t4100-msdos-partition-limits.sh \
- t4100-dvh-partition-limits.sh \
- t4100-msdos-starting-sector.sh \
- t4200-partprobe.sh \
- t4300-nilfs2-tiny.sh \
- t5000-tags.sh \
- t6000-dm.sh \
- t6001-psep.sh \
- t6100-mdraid-partitions.sh \
- t7000-scripting.sh \
- t8000-loop.sh \
- t8001-loop-blkpg.sh \
- t9010-big-sector.sh \
- t9020-alignment.sh \
- t9021-maxima.sh \
- t9022-one-unit-snap.sh \
- t9023-value-lt-one.sh \
- t9030-align-check.sh \
- t9040-many-partitions.sh \
- t9041-undetected-in-use-16th-partition.sh \
- t9042-dos-partition-limit.sh \
- t9050-partition-table-types.sh
-
-TESTS_ENVIRONMENT = \
- export \
- abs_top_builddir='$(abs_top_builddir)' \
- abs_top_srcdir='$(abs_top_srcdir)' \
- abs_srcdir='$(abs_srcdir)' \
- built_programs=parted \
- srcdir='$(srcdir)' \
- top_srcdir='$(top_srcdir)' \
- VERSION=$(VERSION) \
- ; 9>&2
-
-.SUFFIXES: .log
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
- @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
- ws='[ ]'; \
- results=`for b in $$bases; do echo $$b.trs; done`; \
- test -n "$$results" || results=/dev/null; \
- all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
- pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
- fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
- skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
- xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
- xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
- error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
- if test `expr $$fail + $$xpass + $$error` -eq 0; then \
- success=true; \
- else \
- success=false; \
- fi; \
- br='==================='; br=$$br$$br$$br$$br; \
- result_count () \
- { \
- if test x"$$1" = x"--maybe-color"; then \
- maybe_colorize=yes; \
- elif test x"$$1" = x"--no-color"; then \
- maybe_colorize=no; \
- else \
- echo "$@: invalid 'result_count' usage" >&2; exit 4; \
- fi; \
- shift; \
- desc=$$1 count=$$2; \
- if test $$maybe_colorize = yes && test $$count -gt 0; then \
- color_start=$$3 color_end=$$std; \
- else \
- color_start= color_end=; \
- fi; \
- echo "$${color_start}# $$desc $$count$${color_end}"; \
- }; \
- create_testsuite_report () \
- { \
- result_count $$1 "TOTAL:" $$all "$$brg"; \
- result_count $$1 "PASS: " $$pass "$$grn"; \
- result_count $$1 "SKIP: " $$skip "$$blu"; \
- result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
- result_count $$1 "FAIL: " $$fail "$$red"; \
- result_count $$1 "XPASS:" $$xpass "$$red"; \
- result_count $$1 "ERROR:" $$error "$$mgn"; \
- }; \
- { \
- echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
- $(am__rst_title); \
- create_testsuite_report --no-color; \
- echo; \
- echo ".. contents:: :depth: 2"; \
- echo; \
- for i in $$bases; do \
- if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \
- >/dev/null; then continue; \
- fi; \
- glob_res=`sed -n -e "s/$$ws*$$//" \
- -e "s/^$$ws*:global-test-result:$$ws*//p" \
- $$i.trs`; \
- test -n "$$glob_res" || glob_res=RUN; \
- echo "$$glob_res: $$i" | $(am__rst_section); \
- if test ! -r $$i.log; then \
- echo "fatal: making $@: $$i.log is unreadable" >&2; \
- exit 1; \
- fi; \
- cat $$i.log; echo; \
- done; \
- } >$(TEST_SUITE_LOG).tmp; \
- mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
- if $$success; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
- fi; \
- echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
- echo "$${col}$$br$${std}"; \
- create_testsuite_report --maybe-color; \
- echo "$$col$$br$$std"; \
- if $$success; then :; else \
- echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
- if test -n "$(PACKAGE_BUGREPORT)"; then \
- echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
- fi; \
- echo "$$col$$br$$std"; \
- fi; \
- $$success || exit 1
-
-check-TESTS:
- @if test $@ != recheck; then \
- list='$(RECHECK_LOGS)'; \
- test -z "$$list" || rm -f $$list; \
- fi
- @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
- @ws='[ ]'; \
- log_list='' trs_list=''; $(am__set_TESTS_bases); \
- for i in $$bases; do \
- if test -z "$$log_list"; then \
- log_list="$$i.log"; \
- else \
- log_list="$$log_list $$i.log"; \
- fi; \
- if test -z "$$trs_list"; then \
- trs_list="$$i.trs"; \
- else \
- trs_list="$$trs_list $$i.trs"; \
- fi; \
- done; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
-
-.sh.log:
- @p='$<'; \
- $(am__set_b); \
- $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) -- $(SH_LOG_COMPILE) "$$tst"
diff --git a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch
deleted file mode 100644
index 68ab715f32..0000000000
--- a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 060e74354774d36d2c11ef08e3e7ea9b9b6e23fb Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 13 Nov 2014 11:29:33 +0800
-Subject: [PATCH] libparted/arch/linux.c: fix compile failure while
- --disable-device-mapper
-
-While --disable-device-mapper, the MACRO ENABLE_DEVICE_MAPPER is
-undef, but it missed to scope some device mapper functions.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- libparted/arch/linux.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index 6fd73c5..2afa479 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -2320,6 +2320,7 @@ zasprintf (const char *format, ...)
- static char *
- dm_canonical_path (PedDevice const *dev)
- {
-+#ifdef ENABLE_DEVICE_MAPPER
- LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev);
-
- /* Get map name from devicemapper */
-@@ -2337,6 +2338,7 @@ dm_canonical_path (PedDevice const *dev)
- dm_task_destroy (task);
- return dev_name;
- err:
-+#endif
- return NULL;
- }
-
-@@ -2957,13 +2959,15 @@ _disk_sync_part_table (PedDisk* disk)
- unsigned long long *start,
- unsigned long long *length);
-
--
-+#ifdef ENABLE_DEVICE_MAPPER
- if (disk->dev->type == PED_DEVICE_DM) {
- add_partition = _dm_add_partition;
- remove_partition = _dm_remove_partition;
- resize_partition = _dm_resize_partition;
- get_partition_start_and_length = _dm_get_partition_start_and_length;
-- } else {
-+ } else
-+#endif
-+ {
- add_partition = _blkpg_add_partition;
- remove_partition = _blkpg_remove_partition;
- #ifdef BLKPG_RESIZE_PARTITION
---
-1.9.1
-
diff --git a/meta/recipes-extended/parted/files/no_check.patch b/meta/recipes-extended/parted/files/no_check.patch
index 58d8db4426..e6a26d11a5 100644
--- a/meta/recipes-extended/parted/files/no_check.patch
+++ b/meta/recipes-extended/parted/files/no_check.patch
@@ -5,12 +5,12 @@ it to be disabled.
RP - 4/11/08
-Index: parted-1.9.0/configure.ac
+Index: parted-3.2/configure.ac
===================================================================
---- parted-1.9.0.orig/configure.ac 2009-07-23 18:52:08.000000000 +0100
-+++ parted-1.9.0/configure.ac 2010-02-02 14:13:56.013905093 +0000
-@@ -477,7 +477,7 @@
- AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux])
+--- parted-3.2.orig/configure.ac
++++ parted-3.2/configure.ac
+@@ -555,7 +555,7 @@ AC_CHECK_HEADER([execinfo.h], [
+ AM_CONDITIONAL([COMPILE_FOR_S390], [test "$host_cpu" = s390 || test "$host_cpu" = s390x])
dnl check for "check", unit testing library/header
-PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no)
diff --git a/meta/recipes-extended/parted/files/run-ptest b/meta/recipes-extended/parted/files/run-ptest
index 695c5e8a7b..b57c29400a 100644
--- a/meta/recipes-extended/parted/files/run-ptest
+++ b/meta/recipes-extended/parted/files/run-ptest
@@ -1,3 +1,3 @@
#!/bin/sh
-make -C tests check-TESTS
+make -C tests test-suite.log
diff --git a/meta/recipes-extended/parted/files/syscalls.patch b/meta/recipes-extended/parted/files/syscalls.patch
deleted file mode 100644
index e9bbe9a956..0000000000
--- a/meta/recipes-extended/parted/files/syscalls.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Upstream-Status: Pending
-
----
- libparted/arch/linux.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-Index: parted-1.9.0/libparted/arch/linux.c
-===================================================================
---- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100
-+++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000
-@@ -17,6 +17,8 @@
-
- #define PROC_DEVICES_BUFSIZ 16384
-
-+#include <linux/version.h>
-+
- #include <config.h>
- #include <arch/linux.h>
-
-@@ -1477,12 +1479,14 @@
-
- #if SIZEOF_OFF_T < 8
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
- static _syscall5(int,_llseek,
- unsigned int, fd,
- unsigned long, offset_high,
- unsigned long, offset_low,
- loff_t*, result,
- unsigned int, origin)
-+#endif
-
- loff_t
- llseek (unsigned int fd, loff_t offset, unsigned int whence)
-@@ -1490,11 +1494,20 @@
- loff_t result;
- int retval;
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
- retval = _llseek(fd,
- ((unsigned long long)offset) >> 32,
- ((unsigned long long)offset) & 0xffffffff,
- &result,
- whence);
-+#else
-+ retval = syscall(__NR__llseek, fd,
-+ ((unsigned long long)offset) >> 32,
-+ ((unsigned long long)offset) & 0xffffffff,
-+ &result,
-+ whence);
-+#endif
-+
- return (retval==-1 ? (loff_t) retval : result);
- }
-
diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.2.bb
deleted file mode 100644
index 30c00c861b..0000000000
--- a/meta/recipes-extended/parted/parted_3.2.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "Disk partition editing/resizing utility"
-HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
-SECTION = "console/tools"
-DEPENDS = "ncurses readline util-linux virtual/libiconv"
-PR = "r1"
-
-SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
- file://no_check.patch \
- file://syscalls.patch \
- file://fix-doc-mandir.patch \
- file://fix-compile-failure-while-dis.patch \
- file://0001-Include-fcntl.h-in-platform_defs.h.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://run-ptest \
- file://Makefile \
-"
-
-SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb"
-SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
-
-EXTRA_OECONF = "--disable-device-mapper"
-LDFLAGS_append_libc-uclibc = " -liconv "
-
-inherit autotools pkgconfig gettext texinfo ptest
-
-BBCLASSEXTEND = "native"
-
-do_compile_ptest() {
- oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize
-}
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}
- mkdir $t/build-aux
- cp ${S}/build-aux/test-driver $t/build-aux/
- cp -r ${S}/tests $t
- cp ${WORKDIR}/Makefile $t/tests/
- sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile
- for i in print-align print-max dup-clobber duplicate fs-resize; \
- do cp ${B}/tests/.libs/$i $t/tests/; \
- done
- sed -e 's| ../parted||' -i $t/tests/*.sh
-}
-
-RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python"
diff --git a/meta/recipes-extended/parted/parted_3.3.bb b/meta/recipes-extended/parted/parted_3.3.bb
new file mode 100644
index 0000000000..1cfd9ec264
--- /dev/null
+++ b/meta/recipes-extended/parted/parted_3.3.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Disk partition editing/resizing utility"
+HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
+SECTION = "console/tools"
+DEPENDS = "ncurses readline util-linux virtual/libiconv"
+
+SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
+ file://no_check.patch \
+ file://fix-doc-mandir.patch \
+ file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \
+ file://0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch \
+ file://run-ptest \
+ file://0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch \
+ file://0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch \
+ "
+
+SRC_URI[md5sum] = "090655d05f3c471aa8e15a27536889ec"
+SRC_URI[sha256sum] = "57e2b4bd87018625c515421d4524f6e3b55175b472302056391c5f7eccb83d44"
+
+EXTRA_OECONF = "--disable-device-mapper"
+
+inherit autotools pkgconfig gettext texinfo ptest
+
+BBCLASSEXTEND = "native"
+
+do_compile_ptest() {
+ oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags
+}
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ mkdir $t/build-aux
+ cp ${S}/build-aux/test-driver $t/build-aux/
+ cp -r ${S}/tests $t
+ cp ${B}/tests/Makefile $t/tests/
+ sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile
+ sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile
+ sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile
+ sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" $t/tests/Makefile
+ sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile
+ for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \
+ do cp ${B}/tests/.libs/$i $t/tests/; \
+ done
+ sed -e 's| ../parted||' -i $t/tests/*.sh
+}
+
+RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3 make gawk e2fsprogs-mke2fs"
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = "\
+ glibc-utils \
+ locale-base-en-us \
+ "
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "partprobe"
+ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe"
diff --git a/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch b/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
deleted file mode 100644
index 61bf2de5ea..0000000000
--- a/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,1287 +0,0 @@
-From 47c4db8d37248d968fac7ee4a71ca64398890723 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 11:57:21 -0800
-Subject: [PATCH] Fix build with musl
-
-Remove BSDisms
-Remove fts, and link to libfts thats provided externally
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate[musl specific]
-
- lib/Makefile.am | 4 +-
- lib/fts.c | 1025 -------------------------------------------------------
- lib/fts.h | 131 -------
- lib/vis.h | 13 +-
- src/Makefile.am | 2 +-
- src/extern.h | 2 -
- src/file_subs.c | 2 +-
- src/tables.c | 2 +-
- 8 files changed, 14 insertions(+), 1167 deletions(-)
- delete mode 100644 lib/fts.c
- delete mode 100644 lib/fts.h
-
-diff --git a/lib/Makefile.am b/lib/Makefile.am
-index 56d0859..7f5045a 100644
---- a/lib/Makefile.am
-+++ b/lib/Makefile.am
-@@ -8,8 +8,8 @@ AUTOMAKE_OPTIONS = 1.7 gnits
- CLEANFILES = *~
-
- noinst_LIBRARIES = libbsdfunc.a
--noinst_HEADERS = vis.h bsdfunc.h fts.h
-+noinst_HEADERS = vis.h bsdfunc.h
-
- AM_CFLAGS = @EXTRA_CFLAGS@
-
--libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c fts.c
-+libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c
-diff --git a/lib/fts.c b/lib/fts.c
-deleted file mode 100644
-index 45e90ca..0000000
---- a/lib/fts.c
-+++ /dev/null
-@@ -1,1025 +0,0 @@
--/*-
-- * Copyright (c) 1990, 1993, 1994
-- * 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.
-- * 4. Neither the name of the University nor the names of its contributors
-- * may be used to endorse or promote products derived from this software
-- * without specific prior written permission.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
-- */
--
--#ifdef HAVE_CONFIG_H
--#include <config.h>
--#endif
--
--#include <sys/stat.h>
--#include <fcntl.h>
--#include <dirent.h>
--#include <errno.h>
--#include <fts.h>
--#include <stdlib.h>
--#include <string.h>
--#include <unistd.h>
--
--/* Largest alignment size needed, minus one.
-- Usually long double is the worst case. */
--#ifndef ALIGNBYTES
--#define ALIGNBYTES (__alignof__ (long double) - 1)
--#endif
--/* Align P to that size. */
--#ifndef ALIGN
--#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES)
--#endif
--
--
--static FTSENT *fts_alloc (FTS *, const char *, int);
--static FTSENT *fts_build (FTS *, int);
--static void fts_lfree (FTSENT *);
--static void fts_load (FTS *, FTSENT *);
--static size_t fts_maxarglen (char * const *);
--static void fts_padjust (FTS *, FTSENT *);
--static int fts_palloc (FTS *, size_t);
--static FTSENT *fts_sort (FTS *, FTSENT *, int);
--static u_short fts_stat (FTS *, FTSENT *, int);
--static int fts_safe_changedir (FTS *, FTSENT *, int, const char *);
--
--#ifndef MAX
--#define MAX(a, b) (a > b ? a : b)
--#endif
--
--#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
--
--#define CLR(opt) (sp->fts_options &= ~(opt))
--#define ISSET(opt) (sp->fts_options & (opt))
--#define SET(opt) (sp->fts_options |= (opt))
--
--#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
--
--#define BREAD 3 /* fts_read */
--
--FTS *
--fts_open(argv, koptions, compar)
-- char * const *argv;
-- register int koptions;
-- int (*compar) (const FTSENT **, const FTSENT **);
--{
-- register FTS *sp;
-- register FTSENT *p, *root;
-- register int nitems;
-- FTSENT *parent, *tmp;
-- int len;
--
--tmp = NULL; /* stop compiler whinging */
-- /* Options check. */
-- if (koptions & ~FTS_OPTIONMASK) {
-- errno = EINVAL;
-- return (NULL);
-- }
--
-- /* Allocate/initialize the stream */
-- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
-- return (NULL);
-- memset(sp, 0, sizeof(FTS));
-- sp->fts_compar = (int (*) (const void *, const void *)) compar;
-- sp->fts_options = koptions;
--
-- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
-- if (ISSET(FTS_LOGICAL))
-- SET(FTS_NOCHDIR);
--
-- /*
-- * Start out with 1K of path space, and enough, in any case,
-- * to hold the user's paths.
-- */
--#ifndef MAXPATHLEN
--#define MAXPATHLEN 1024
--#endif
-- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
-- goto mem1;
--
-- /* Allocate/initialize root's parent. */
-- if ((parent = fts_alloc(sp, "", 0)) == NULL)
-- goto mem2;
-- parent->fts_level = FTS_ROOTPARENTLEVEL;
--
-- /* Allocate/initialize root(s). */
-- for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
-- /* Don't allow zero-length paths. */
-- if ((len = strlen(*argv)) == 0) {
-- errno = ENOENT;
-- goto mem3;
-- }
--
-- p = fts_alloc(sp, *argv, len);
-- p->fts_level = FTS_ROOTLEVEL;
-- p->fts_parent = parent;
-- p->fts_accpath = p->fts_name;
-- p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
--
-- /* Command-line "." and ".." are real directories. */
-- if (p->fts_info == FTS_DOT)
-- p->fts_info = FTS_D;
--
-- /*
-- * If comparison routine supplied, traverse in sorted
-- * order; otherwise traverse in the order specified.
-- */
-- if (compar) {
-- p->fts_link = root;
-- root = p;
-- } else {
-- p->fts_link = NULL;
-- if (root == NULL)
-- tmp = root = p;
-- else {
-- tmp->fts_link = p;
-- tmp = p;
-- }
-- }
-- }
-- if (compar && nitems > 1)
-- root = fts_sort(sp, root, nitems);
--
-- /*
-- * Allocate a dummy pointer and make fts_read think that we've just
-- * finished the node before the root(s); set p->fts_info to FTS_INIT
-- * so that everything about the "current" node is ignored.
-- */
-- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
-- goto mem3;
-- sp->fts_cur->fts_link = root;
-- sp->fts_cur->fts_info = FTS_INIT;
--
-- /*
-- * If using chdir(2), grab a file descriptor pointing to dot to ensure
-- * that we can get back here; this could be avoided for some paths,
-- * but almost certainly not worth the effort. Slashes, symbolic links,
-- * and ".." are all fairly nasty problems. Note, if we can't get the
-- * descriptor we run anyway, just more slowly.
-- */
-- if (!ISSET(FTS_NOCHDIR)
-- && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
-- SET(FTS_NOCHDIR);
--
-- return (sp);
--
--mem3: fts_lfree(root);
-- free(parent);
--mem2: free(sp->fts_path);
--mem1: free(sp);
-- return (NULL);
--}
--
--static void
--fts_load(sp, p)
-- FTS *sp;
-- register FTSENT *p;
--{
-- register int len;
-- register char *cp;
--
-- /*
-- * Load the stream structure for the next traversal. Since we don't
-- * actually enter the directory until after the preorder visit, set
-- * the fts_accpath field specially so the chdir gets done to the right
-- * place and the user can access the first node. From fts_open it's
-- * known that the path will fit.
-- */
-- len = p->fts_pathlen = p->fts_namelen;
-- memmove(sp->fts_path, p->fts_name, len + 1);
-- if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
-- len = strlen(++cp);
-- memmove(p->fts_name, cp, len + 1);
-- p->fts_namelen = len;
-- }
-- p->fts_accpath = p->fts_path = sp->fts_path;
-- sp->fts_dev = p->fts_dev;
--}
--
--int
--fts_close(sp)
-- FTS *sp;
--{
-- register FTSENT *freep, *p;
-- int saved_errno;
--
-- /*
-- * This still works if we haven't read anything -- the dummy structure
-- * points to the root list, so we step through to the end of the root
-- * list which has a valid parent pointer.
-- */
-- if (sp->fts_cur) {
-- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-- freep = p;
-- p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
-- free(freep);
-- }
-- free(p);
-- }
--
-- /* Free up child linked list, sort array, path buffer. */
-- if (sp->fts_child)
-- fts_lfree(sp->fts_child);
-- if (sp->fts_array)
-- free(sp->fts_array);
-- free(sp->fts_path);
--
-- /* Return to original directory, save errno if necessary. */
-- if (!ISSET(FTS_NOCHDIR)) {
-- saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
-- (void)close(sp->fts_rfd);
--
-- /* Set errno and return. */
-- if (saved_errno != 0) {
-- /* Free up the stream pointer. */
-- free(sp);
-- errno = saved_errno;
-- return (-1);
-- }
-- }
--
-- /* Free up the stream pointer. */
-- free(sp);
-- return (0);
--}
--
--/*
-- * Special case of "/" at the end of the path so that slashes aren't
-- * appended which would cause paths to be written as "....//foo".
-- */
--#define NAPPEND(p) \
-- (p->fts_path[p->fts_pathlen - 1] == '/' \
-- ? p->fts_pathlen - 1 : p->fts_pathlen)
--
--FTSENT *
--fts_read(sp)
-- register FTS *sp;
--{
-- register FTSENT *p, *tmp;
-- register int instr;
-- register char *t;
-- int saved_errno;
--
-- /* If finished or unrecoverable error, return NULL. */
-- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
-- return (NULL);
--
-- /* Set current node pointer. */
-- p = sp->fts_cur;
--
-- /* Save and zero out user instructions. */
-- instr = p->fts_instr;
-- p->fts_instr = FTS_NOINSTR;
--
-- /* Any type of file may be re-visited; re-stat and re-turn. */
-- if (instr == FTS_AGAIN) {
-- p->fts_info = fts_stat(sp, p, 0);
-- return (p);
-- }
--
-- /*
-- * Following a symlink -- SLNONE test allows application to see
-- * SLNONE and recover. If indirecting through a symlink, have
-- * keep a pointer to current location. If unable to get that
-- * pointer, follow fails.
-- */
-- if (instr == FTS_FOLLOW &&
-- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
-- p->fts_info = fts_stat(sp, p, 1);
-- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
-- if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
-- p->fts_errno = errno;
-- p->fts_info = FTS_ERR;
-- } else
-- p->fts_flags |= FTS_SYMFOLLOW;
-- }
-- return (p);
-- }
--
-- /* Directory in pre-order. */
-- if (p->fts_info == FTS_D) {
-- /* If skipped or crossed mount point, do post-order visit. */
-- if (instr == FTS_SKIP ||
-- (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
-- if (p->fts_flags & FTS_SYMFOLLOW)
-- (void)close(p->fts_symfd);
-- if (sp->fts_child) {
-- fts_lfree(sp->fts_child);
-- sp->fts_child = NULL;
-- }
-- p->fts_info = FTS_DP;
-- return (p);
-- }
--
-- /* Rebuild if only read the names and now traversing. */
-- if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
-- CLR(FTS_NAMEONLY);
-- fts_lfree(sp->fts_child);
-- sp->fts_child = NULL;
-- }
--
-- /*
-- * Cd to the subdirectory.
-- *
-- * If have already read and now fail to chdir, whack the list
-- * to make the names come out right, and set the parent errno
-- * so the application will eventually get an error condition.
-- * Set the FTS_DONTCHDIR flag so that when we logically change
-- * directories back to the parent we don't do a chdir.
-- *
-- * If haven't read do so. If the read fails, fts_build sets
-- * FTS_STOP or the fts_info field of the node.
-- */
-- if (sp->fts_child != NULL) {
-- if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
-- p->fts_errno = errno;
-- p->fts_flags |= FTS_DONTCHDIR;
-- for (p = sp->fts_child; p != NULL;
-- p = p->fts_link)
-- p->fts_accpath =
-- p->fts_parent->fts_accpath;
-- }
-- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
-- if (ISSET(FTS_STOP))
-- return (NULL);
-- return (p);
-- }
-- p = sp->fts_child;
-- sp->fts_child = NULL;
-- goto name;
-- }
--
-- /* Move to the next node on this level. */
--next: tmp = p;
-- if ((p = p->fts_link) != NULL) {
-- free(tmp);
--
-- /*
-- * If reached the top, return to the original directory (or
-- * the root of the tree), and load the paths for the next root.
-- */
-- if (p->fts_level == FTS_ROOTLEVEL) {
-- if (FCHDIR(sp, sp->fts_rfd)) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- fts_load(sp, p);
-- return (sp->fts_cur = p);
-- }
--
-- /*
-- * User may have called fts_set on the node. If skipped,
-- * ignore. If followed, get a file descriptor so we can
-- * get back if necessary.
-- */
-- if (p->fts_instr == FTS_SKIP)
-- goto next;
-- if (p->fts_instr == FTS_FOLLOW) {
-- p->fts_info = fts_stat(sp, p, 1);
-- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
-- if ((p->fts_symfd =
-- open(".", O_RDONLY, 0)) < 0) {
-- p->fts_errno = errno;
-- p->fts_info = FTS_ERR;
-- } else
-- p->fts_flags |= FTS_SYMFOLLOW;
-- }
-- p->fts_instr = FTS_NOINSTR;
-- }
--
--name: t = sp->fts_path + NAPPEND(p->fts_parent);
-- *t++ = '/';
-- memmove(t, p->fts_name, p->fts_namelen + 1);
-- return (sp->fts_cur = p);
-- }
--
-- /* Move up to the parent node. */
-- p = tmp->fts_parent;
-- free(tmp);
--
-- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
-- /*
-- * Done; free everything up and set errno to 0 so the user
-- * can distinguish between error and EOF.
-- */
-- free(p);
-- errno = 0;
-- return (sp->fts_cur = NULL);
-- }
--
-- /* NUL terminate the pathname. */
-- sp->fts_path[p->fts_pathlen] = '\0';
--
-- /*
-- * Return to the parent directory. If at a root node or came through
-- * a symlink, go back through the file descriptor. Otherwise, cd up
-- * one directory.
-- */
-- if (p->fts_level == FTS_ROOTLEVEL) {
-- if (FCHDIR(sp, sp->fts_rfd)) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- } else if (p->fts_flags & FTS_SYMFOLLOW) {
-- if (FCHDIR(sp, p->fts_symfd)) {
-- saved_errno = errno;
-- (void)close(p->fts_symfd);
-- errno = saved_errno;
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- (void)close(p->fts_symfd);
-- } else if (!(p->fts_flags & FTS_DONTCHDIR) &&
-- fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
-- return (sp->fts_cur = p);
--}
--
--/*
-- * Fts_set takes the stream as an argument although it's not used in this
-- * implementation; it would be necessary if anyone wanted to add global
-- * semantics to fts using fts_set. An error return is allowed for similar
-- * reasons.
-- */
--/* ARGSUSED */
--int
--fts_set(sp, p, instr)
-- FTS __attribute__((__unused__)) *sp;
-- FTSENT *p;
-- int instr;
--{
--sp = NULL; /* stop compiler whinging */
-- if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
-- instr != FTS_NOINSTR && instr != FTS_SKIP) {
-- errno = EINVAL;
-- return (1);
-- }
-- p->fts_instr = instr;
-- return (0);
--}
--
--/*
-- * This is the tricky part -- do not casually change *anything* in here. The
-- * idea is to build the linked list of entries that are used by fts_children
-- * and fts_read. There are lots of special cases.
-- *
-- * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is
-- * set and it's a physical walk (so that symbolic links can't be directories),
-- * we can do things quickly. First, if it's a 4.4BSD file system, the type
-- * of the file is in the directory entry. Otherwise, we assume that the number
-- * of subdirectories in a node is equal to the number of links to the parent.
-- * The former skips all stat calls. The latter skips stat calls in any leaf
-- * directories and for any files after the subdirectories in the directory have
-- * been found, cutting the stat calls by about 2/3.
-- */
--static FTSENT *
--fts_build(sp, type)
-- register FTS *sp;
-- int type;
--{
-- register struct dirent *dp;
-- register FTSENT *p, *head;
-- register int nitems;
-- FTSENT *cur, *tail;
-- DIR *dirp;
-- void *oldaddr;
-- int cderrno, descend, len, level, nlinks, saved_errno,
-- nostat, doadjust;
-- size_t maxlen;
-- char *cp;
--
-- /* Set current node pointer. */
-- cur = sp->fts_cur;
--
-- /*
-- * Open the directory for reading. If this fails, we're done.
-- * If being called from fts_read, set the fts_info field.
-- */
-- if ((dirp = opendir(cur->fts_accpath)) == NULL) {
-- if (type == BREAD) {
-- cur->fts_info = FTS_DNR;
-- cur->fts_errno = errno;
-- }
-- return (NULL);
-- }
--
-- /*
-- * Nlinks is the number of possible entries of type directory in the
-- * directory if we're cheating on stat calls, 0 if we're not doing
-- * any stat calls at all, -1 if we're doing stats on everything.
-- */
-- nlinks = -1;
-- nostat = 0;
--
-- /*
-- * If we're going to need to stat anything or we want to descend
-- * and stay in the directory, chdir. If this fails we keep going,
-- * but set a flag so we don't chdir after the post-order visit.
-- * We won't be able to stat anything, but we can still return the
-- * names themselves. Note, that since fts_read won't be able to
-- * chdir into the directory, it will have to return different path
-- * names than before, i.e. "a/b" instead of "b". Since the node
-- * has already been visited in pre-order, have to wait until the
-- * post-order visit to return the error. There is a special case
-- * here, if there was nothing to stat then it's not an error to
-- * not be able to stat. This is all fairly nasty. If a program
-- * needed sorted entries or stat information, they had better be
-- * checking FTS_NS on the returned nodes.
-- */
-- cderrno = 0;
-- if (nlinks || type == BREAD) {
-- if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
-- if (nlinks && type == BREAD)
-- cur->fts_errno = errno;
-- cur->fts_flags |= FTS_DONTCHDIR;
-- descend = 0;
-- cderrno = errno;
-- (void)closedir(dirp);
-- dirp = NULL;
-- } else
-- descend = 1;
-- } else
-- descend = 0;
--
-- /*
-- * Figure out the max file name length that can be stored in the
-- * current path -- the inner loop allocates more path as necessary.
-- * We really wouldn't have to do the maxlen calculations here, we
-- * could do them in fts_read before returning the path, but it's a
-- * lot easier here since the length is part of the dirent structure.
-- *
-- * If not changing directories set a pointer so that can just append
-- * each new name into the path.
-- */
-- len = NAPPEND(cur);
-- if (ISSET(FTS_NOCHDIR)) {
-- cp = sp->fts_path + len;
-- *cp++ = '/';
-- } else {
-- /* GCC, you're too verbose. */
-- cp = NULL;
-- }
-- len++;
-- maxlen = sp->fts_pathlen - len;
--
-- level = cur->fts_level + 1;
--
-- /* Read the directory, attaching each entry to the `link' pointer. */
-- doadjust = 0;
-- for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
-- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
-- continue;
--
-- if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL)
-- goto mem1;
-- if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */
-- oldaddr = sp->fts_path;
-- if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) {
-- /*
-- * No more memory for path or structures. Save
-- * errno, free up the current structure and the
-- * structures already allocated.
-- */
--mem1: saved_errno = errno;
-- if (p)
-- free(p);
-- fts_lfree(head);
-- (void)closedir(dirp);
-- cur->fts_info = FTS_ERR;
-- SET(FTS_STOP);
-- errno = saved_errno;
-- return (NULL);
-- }
-- /* Did realloc() change the pointer? */
-- if (oldaddr != sp->fts_path) {
-- doadjust = 1;
-- if (ISSET(FTS_NOCHDIR))
-- cp = sp->fts_path + len;
-- }
-- maxlen = sp->fts_pathlen - len;
-- }
--
-- if (len + _D_EXACT_NAMLEN (dp) >= 0x10000) {
-- /*
-- * In an FTSENT, fts_pathlen is a u_short so it is
-- * possible to wraparound here. If we do, free up
-- * the current structure and the structures already
-- * allocated, then error out with ENAMETOOLONG.
-- */
-- free(p);
-- fts_lfree(head);
-- (void)closedir(dirp);
-- cur->fts_info = FTS_ERR;
-- SET(FTS_STOP);
-- errno = ENAMETOOLONG;
-- return (NULL);
-- }
-- p->fts_level = level;
-- p->fts_parent = sp->fts_cur;
-- p->fts_pathlen = len + _D_EXACT_NAMLEN (dp);
--
--#if defined FTS_WHITEOUT && 0
-- if (dp->d_type == DT_WHT)
-- p->fts_flags |= FTS_ISW;
--#endif
--
-- if (cderrno) {
-- if (nlinks) {
-- p->fts_info = FTS_NS;
-- p->fts_errno = cderrno;
-- } else
-- p->fts_info = FTS_NSOK;
-- p->fts_accpath = cur->fts_accpath;
-- } else if (nlinks == 0
--#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
-- || (nostat &&
-- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
--#endif
-- ) {
-- p->fts_accpath =
-- ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
-- p->fts_info = FTS_NSOK;
-- } else {
-- /* Build a file name for fts_stat to stat. */
-- if (ISSET(FTS_NOCHDIR)) {
-- p->fts_accpath = p->fts_path;
-- memmove(cp, p->fts_name, p->fts_namelen + 1);
-- } else
-- p->fts_accpath = p->fts_name;
-- /* Stat it. */
-- p->fts_info = fts_stat(sp, p, 0);
--
-- /* Decrement link count if applicable. */
-- if (nlinks > 0 && (p->fts_info == FTS_D ||
-- p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
-- --nlinks;
-- }
--
-- /* We walk in directory order so "ls -f" doesn't get upset. */
-- p->fts_link = NULL;
-- if (head == NULL)
-- head = tail = p;
-- else {
-- tail->fts_link = p;
-- tail = p;
-- }
-- ++nitems;
-- }
-- if (dirp)
-- (void)closedir(dirp);
--
-- /*
-- * If realloc() changed the address of the path, adjust the
-- * addresses for the rest of the tree and the dir list.
-- */
-- if (doadjust)
-- fts_padjust(sp, head);
--
-- /*
-- * If not changing directories, reset the path back to original
-- * state.
-- */
-- if (ISSET(FTS_NOCHDIR)) {
-- if (len == sp->fts_pathlen || nitems == 0)
-- --cp;
-- *cp = '\0';
-- }
--
-- /*
-- * If descended after called from fts_children or after called from
-- * fts_read and nothing found, get back. At the root level we use
-- * the saved fd; if one of fts_open()'s arguments is a relative path
-- * to an empty directory, we wind up here with no other way back. If
-- * can't get back, we're done.
-- */
-- if (descend && nitems == 0 &&
-- (cur->fts_level == FTS_ROOTLEVEL ?
-- FCHDIR(sp, sp->fts_rfd) :
-- fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
-- cur->fts_info = FTS_ERR;
-- SET(FTS_STOP);
-- return (NULL);
-- }
--
-- /* If didn't find anything, return NULL. */
-- if (!nitems) {
-- if (type == BREAD)
-- cur->fts_info = FTS_DP;
-- return (NULL);
-- }
--
-- /* Sort the entries. */
-- if (sp->fts_compar && nitems > 1)
-- head = fts_sort(sp, head, nitems);
-- return (head);
--}
--
--static u_short
--fts_stat(sp, p, follow)
-- FTS *sp;
-- register FTSENT *p;
-- int follow;
--{
-- register FTSENT *t;
-- register dev_t dev;
-- register ino_t ino;
-- struct stat *sbp;
-- int saved_errno;
--
-- /* If user needs stat info, stat buffer already allocated. */
-- sbp = p->fts_statp;
--
--#if defined FTS_WHITEOUT && 0
-- /* check for whiteout */
-- if (p->fts_flags & FTS_ISW) {
-- if (sbp != &sb) {
-- memset(sbp, '\0', sizeof (*sbp));
-- sbp->st_mode = S_IFWHT;
-- }
-- return (FTS_W);
-- }
--#endif
--
-- /*
-- * If doing a logical walk, or application requested FTS_FOLLOW, do
-- * a stat(2). If that fails, check for a non-existent symlink. If
-- * fail, set the errno from the stat call.
-- */
-- if (ISSET(FTS_LOGICAL) || follow) {
-- if (stat(p->fts_accpath, sbp)) {
-- saved_errno = errno;
-- if (!lstat(p->fts_accpath, sbp)) {
-- errno = 0;
-- return (FTS_SLNONE);
-- }
-- p->fts_errno = saved_errno;
-- goto err;
-- }
-- } else if (lstat(p->fts_accpath, sbp)) {
-- p->fts_errno = errno;
--err: memset(sbp, 0, sizeof(struct stat));
-- return (FTS_NS);
-- }
--
-- if (S_ISDIR(sbp->st_mode)) {
-- /*
-- * Set the device/inode. Used to find cycles and check for
-- * crossing mount points. Also remember the link count, used
-- * in fts_build to limit the number of stat calls. It is
-- * understood that these fields are only referenced if fts_info
-- * is set to FTS_D.
-- */
-- dev = p->fts_dev = sbp->st_dev;
-- ino = p->fts_ino = sbp->st_ino;
-- p->fts_nlink = sbp->st_nlink;
--
-- if (ISDOT(p->fts_name))
-- return (FTS_DOT);
--
-- /*
-- * Cycle detection is done by brute force when the directory
-- * is first encountered. If the tree gets deep enough or the
-- * number of symbolic links to directories is high enough,
-- * something faster might be worthwhile.
-- */
-- for (t = p->fts_parent;
-- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
-- if (ino == t->fts_ino && dev == t->fts_dev) {
-- p->fts_cycle = t;
-- return (FTS_DC);
-- }
-- return (FTS_D);
-- }
-- if (S_ISLNK(sbp->st_mode))
-- return (FTS_SL);
-- if (S_ISREG(sbp->st_mode))
-- return (FTS_F);
-- return (FTS_DEFAULT);
--}
--
--static FTSENT *
--fts_sort(sp, head, nitems)
-- FTS *sp;
-- FTSENT *head;
-- register int nitems;
--{
-- register FTSENT **ap, *p;
--
-- /*
-- * Construct an array of pointers to the structures and call qsort(3).
-- * Reassemble the array in the order returned by qsort. If unable to
-- * sort for memory reasons, return the directory entries in their
-- * current order. Allocate enough space for the current needs plus
-- * 40 so don't realloc one entry at a time.
-- */
-- if (nitems > sp->fts_nitems) {
-- struct _ftsent **a;
--
-- sp->fts_nitems = nitems + 40;
-- if ((a = realloc(sp->fts_array,
-- (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
-- free(sp->fts_array);
-- sp->fts_array = NULL;
-- sp->fts_nitems = 0;
-- return (head);
-- }
-- sp->fts_array = a;
-- }
-- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
-- *ap++ = p;
-- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
-- for (head = *(ap = sp->fts_array); --nitems; ++ap)
-- ap[0]->fts_link = ap[1];
-- ap[0]->fts_link = NULL;
-- return (head);
--}
--
--static FTSENT *
--fts_alloc(sp, name, namelen)
-- FTS *sp;
-- const char *name;
-- register int namelen;
--{
-- register FTSENT *p;
-- size_t len;
--
-- /*
-- * The file name is a variable length array and no stat structure is
-- * necessary if the user has set the nostat bit. Allocate the FTSENT
-- * structure, the file name and the stat structure in one chunk, but
-- * be careful that the stat structure is reasonably aligned. Since the
-- * fts_name field is declared to be of size 1, the fts_name pointer is
-- * namelen + 2 before the first possible address of the stat structure.
-- */
-- len = sizeof(FTSENT) + namelen;
-- len += sizeof(struct stat) + ALIGNBYTES;
-- if ((p = malloc(len)) == NULL)
-- return (NULL);
--
-- /* Copy the name and guarantee NUL termination. */
-- memmove(p->fts_name, name, namelen);
-- p->fts_name[namelen] = '\0';
--
-- p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
-- p->fts_namelen = namelen;
-- p->fts_path = sp->fts_path;
-- p->fts_errno = 0;
-- p->fts_flags = 0;
-- p->fts_instr = FTS_NOINSTR;
-- p->fts_number = 0;
-- p->fts_pointer = NULL;
-- return (p);
--}
--
--static void
--fts_lfree(head)
-- register FTSENT *head;
--{
-- register FTSENT *p;
--
-- /* Free a linked list of structures. */
-- while ((p = head)) {
-- head = head->fts_link;
-- free(p);
-- }
--}
--
--/*
-- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
-- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
-- * though the kernel won't resolve them. Add the size (not just what's needed)
-- * plus 256 bytes so don't realloc the path 2 bytes at a time.
-- */
--static int
--fts_palloc(sp, more)
-- FTS *sp;
-- size_t more;
--{
-- char *p;
--
-- sp->fts_pathlen += more + 256;
-- /*
-- * Check for possible wraparound. In an FTS, fts_pathlen is
-- * a signed int but in an FTSENT it is an unsigned short.
-- * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
-- */
-- if (sp->fts_pathlen < 0 || sp->fts_pathlen >= 0x10000) {
-- if (sp->fts_path) {
-- free(sp->fts_path);
-- sp->fts_path = NULL;
-- }
-- sp->fts_path = NULL;
-- errno = ENAMETOOLONG;
-- return (1);
-- }
-- p = realloc(sp->fts_path, sp->fts_pathlen);
-- if (p == NULL) {
-- free(sp->fts_path);
-- sp->fts_path = NULL;
-- return 1;
-- }
-- sp->fts_path = p;
-- return 0;
--}
--
--/*
-- * When the path is realloc'd, have to fix all of the pointers in structures
-- * already returned.
-- */
--static void
--fts_padjust(sp, head)
-- FTS *sp;
-- FTSENT *head;
--{
-- FTSENT *p;
-- char *addr = sp->fts_path;
--
--#define ADJUST(p) do { \
-- if ((p)->fts_accpath != (p)->fts_name) { \
-- (p)->fts_accpath = \
-- (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
-- } \
-- (p)->fts_path = addr; \
--} while (0)
-- /* Adjust the current set of children. */
-- for (p = sp->fts_child; p; p = p->fts_link)
-- ADJUST(p);
--
-- /* Adjust the rest of the tree, including the current level. */
-- for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
-- ADJUST(p);
-- p = p->fts_link ? p->fts_link : p->fts_parent;
-- }
--}
--
--static size_t
--fts_maxarglen(argv)
-- char * const *argv;
--{
-- size_t len, max;
--
-- for (max = 0; *argv; ++argv)
-- if ((len = strlen(*argv)) > max)
-- max = len;
-- return (max + 1);
--}
--
--/*
-- * Change to dir specified by fd or p->fts_accpath without getting
-- * tricked by someone changing the world out from underneath us.
-- * Assumes p->fts_dev and p->fts_ino are filled in.
-- */
--static int
--fts_safe_changedir(sp, p, fd, path)
-- FTS *sp;
-- FTSENT *p;
-- int fd;
-- const char *path;
--{
-- int ret, oerrno, newfd;
-- struct stat sb;
--
-- newfd = fd;
-- if (ISSET(FTS_NOCHDIR))
-- return (0);
-- if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)
-- return (-1);
-- if (fstat(newfd, &sb)) {
-- ret = -1;
-- goto bail;
-- }
-- if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
-- errno = ENOENT; /* disinformation */
-- ret = -1;
-- goto bail;
-- }
-- ret = fchdir(newfd);
--bail:
-- oerrno = errno;
-- if (fd < 0)
-- (void)close(newfd);
-- errno = oerrno;
-- return (ret);
--}
-diff --git a/lib/fts.h b/lib/fts.h
-deleted file mode 100644
-index 58846b9..0000000
---- a/lib/fts.h
-+++ /dev/null
-@@ -1,131 +0,0 @@
--/*
-- * Copyright (c) 1989, 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.
-- * 4. Neither the name of the University nor the names of its contributors
-- * may be used to endorse or promote products derived from this software
-- * without specific prior written permission.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
-- *
-- * @(#)fts.h 8.3 (Berkeley) 8/14/94
-- */
--
--#ifndef _FTS_H
--#define _FTS_H 1
--
--#include <features.h>
--#include <sys/types.h>
--
--typedef struct {
-- struct _ftsent *fts_cur; /* current node */
-- struct _ftsent *fts_child; /* linked list of children */
-- struct _ftsent **fts_array; /* sort array */
-- dev_t fts_dev; /* starting device # */
-- char *fts_path; /* path for this descent */
-- int fts_rfd; /* fd for root */
-- int fts_pathlen; /* sizeof(path) */
-- int fts_nitems; /* elements in the sort array */
-- int (*fts_compar) (const void *, const void *); /* compare fn */
--
--#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */
--#define FTS_LOGICAL 0x0002 /* logical walk */
--#define FTS_NOCHDIR 0x0004 /* don't change directories */
--#define FTS_NOSTAT 0x0008 /* don't get stat info */
--#define FTS_PHYSICAL 0x0010 /* physical walk */
--#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */
--#define FTS_XDEV 0x0040 /* don't cross devices */
--#define FTS_WHITEOUT 0x0080 /* return whiteout information */
--#define FTS_OPTIONMASK 0x00ff /* valid user option mask */
--
--#define FTS_NAMEONLY 0x0100 /* (private) child names only */
--#define FTS_STOP 0x0200 /* (private) unrecoverable error */
-- int fts_options; /* fts_open options, global flags */
--} FTS;
--
--typedef struct _ftsent {
-- struct _ftsent *fts_cycle; /* cycle node */
-- struct _ftsent *fts_parent; /* parent directory */
-- struct _ftsent *fts_link; /* next file in directory */
-- long fts_number; /* local numeric value */
-- void *fts_pointer; /* local address value */
-- char *fts_accpath; /* access path */
-- char *fts_path; /* root path */
-- int fts_errno; /* errno for this node */
-- int fts_symfd; /* fd for symlink */
-- u_short fts_pathlen; /* strlen(fts_path) */
-- u_short fts_namelen; /* strlen(fts_name) */
--
-- ino_t fts_ino; /* inode */
-- dev_t fts_dev; /* device */
-- nlink_t fts_nlink; /* link count */
--
--#define FTS_ROOTPARENTLEVEL -1
--#define FTS_ROOTLEVEL 0
-- short fts_level; /* depth (-1 to N) */
--
--#define FTS_D 1 /* preorder directory */
--#define FTS_DC 2 /* directory that causes cycles */
--#define FTS_DEFAULT 3 /* none of the above */
--#define FTS_DNR 4 /* unreadable directory */
--#define FTS_DOT 5 /* dot or dot-dot */
--#define FTS_DP 6 /* postorder directory */
--#define FTS_ERR 7 /* error; errno is set */
--#define FTS_F 8 /* regular file */
--#define FTS_INIT 9 /* initialized only */
--#define FTS_NS 10 /* stat(2) failed */
--#define FTS_NSOK 11 /* no stat(2) requested */
--#define FTS_SL 12 /* symbolic link */
--#define FTS_SLNONE 13 /* symbolic link without target */
--#define FTS_W 14 /* whiteout object */
-- u_short fts_info; /* user flags for FTSENT structure */
--
--#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
--#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
-- u_short fts_flags; /* private flags for FTSENT structure */
--
--#define FTS_AGAIN 1 /* read node again */
--#define FTS_FOLLOW 2 /* follow symbolic link */
--#define FTS_NOINSTR 3 /* no instructions */
--#define FTS_SKIP 4 /* discard node */
-- u_short fts_instr; /* fts_set() instructions */
--
-- struct stat *fts_statp; /* stat(2) information */
-- char fts_name[1]; /* file name */
--} FTSENT;
--
--__BEGIN_DECLS
--
--#define fts_children pax_fts_children
--#define fts_close pax_fts_close
--#define fts_open pax_fts_open
--#define fts_read pax_fts_read
--#define fts_set pax_fts_set
--
--FTSENT *fts_children (FTS *, int);
--int fts_close (FTS *);
--FTS *fts_open (char * const *, int,
-- int (*)(const FTSENT **, const FTSENT **));
--FTSENT *fts_read (FTS *);
--int fts_set (FTS *, FTSENT *, int) __THROW;
--__END_DECLS
--
--#endif /* fts.h */
-diff --git a/lib/vis.h b/lib/vis.h
-index d34d342..71fa5f4 100644
---- a/lib/vis.h
-+++ b/lib/vis.h
-@@ -73,14 +73,19 @@
- */
- #define UNVIS_END 1 /* no more characters */
-
--#include <sys/cdefs.h>
-+#ifndef __P
-+#define __P(x) x
-+#endif
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- char *vis __P((char *, int, int, int));
- int strvis __P((char *, const char *, int));
- int strvisx __P((char *, const char *, size_t, int));
- int strunvis __P((char *, const char *));
- int unvis __P((char *, char, int *, int));
--__END_DECLS
--
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* !_VIS_H_ */
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5ef52a3..227cdef 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -22,4 +22,4 @@ pax_SOURCES = ar_io.c ar_subs.c buf_subs.c cache.c cpio.c\
- file_subs.c ftree.c gen_subs.c getoldopt.c options.c\
- pat_rep.c pax.c sel_subs.c tables.c tar.c tty_subs.c
-
--pax_LDADD = $(top_builddir)/lib/libbsdfunc.a
-+pax_LDADD = $(top_builddir)/lib/libbsdfunc.a -lfts
-diff --git a/src/extern.h b/src/extern.h
-index 361fa81..3ed365d 100644
---- a/src/extern.h
-+++ b/src/extern.h
-@@ -37,8 +37,6 @@
- * External references from each source file
- */
-
--#include <sys/cdefs.h>
--
- /*
- * ar_io.c
- */
-diff --git a/src/file_subs.c b/src/file_subs.c
-index 5590ff1..15bc339 100644
---- a/src/file_subs.c
-+++ b/src/file_subs.c
-@@ -52,7 +52,7 @@
- #include "extern.h"
-
- static int
--mk_link __P((register char *,register struct stat *,register char *, int));
-+mk_link (register char *,register struct stat *,register char *, int);
-
- /*
- * routines that deal with file operations such as: creating, removing;
-diff --git a/src/tables.c b/src/tables.c
-index 2275bf7..8fddca4 100644
---- a/src/tables.c
-+++ b/src/tables.c
-@@ -39,7 +39,7 @@
- #include <sys/time.h>
- #include <sys/stat.h>
- #include <sys/param.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
---
-2.6.4
-
diff --git a/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch b/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
deleted file mode 100644
index 58ac9ce4a0..0000000000
--- a/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b1f50320332c9c90fa33ab136ef0ec2d12cda461 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 12:30:52 -0800
-Subject: [PATCH] use strtoll instead of strtoq
-
-Use LLONG_MAX instead of LONG_LONG_MAX
-LONG_LONG_MAX is GNU specific
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/options.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/options.c b/src/options.c
-index da8b4cf..c663b4e 100644
---- a/src/options.c
-+++ b/src/options.c
-@@ -1547,8 +1547,8 @@ str_offt (char *val)
-
- #if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
- || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-- num = strtoq (val, &expr, 0);
-- if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
-+ num = strtoll (val, &expr, 0);
-+ if ((num == LLONG_MAX) || (num <= 0) || (expr == val))
- #else
- num = strtol (val, &expr, 0);
- if ((num == LONG_MAX) || (num <= 0) || (expr == val))
---
-2.6.4
-
diff --git a/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
deleted file mode 100644
index 88779c3bbd..0000000000
--- a/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream-Status: Pending
-
-This patch fixes this compiler error with gcc 4.6.0
-
-Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/08
-
-| fts.c: In function 'pax_fts_set':
-| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter]
-| cc1: all warnings being treated as errors
-|
-| make[2]: *** [fts.o] Error 1
-
-Index: pax-3.4/lib/fts.c
-===================================================================
---- pax-3.4.orig/lib/fts.c
-+++ pax-3.4/lib/fts.c
-@@ -466,7 +466,7 @@ name: t = sp->fts_path + NAPPEND(p->fts
- /* ARGSUSED */
- int
- fts_set(sp, p, instr)
-- FTS *sp;
-+ FTS __attribute__((__unused__)) *sp;
- FTSENT *p;
- int instr;
- {
diff --git a/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
deleted file mode 100644
index 7adbd02972..0000000000
--- a/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-Upstream-Status: Pending
-
-Author: H.J. Lu <hjl.tools@gmail.com>
-Date: Tue Dec 6 10:34:53 2011 -0800
-
- Fix pax-3.4 build for x32
-
- off_t is 8byte for x32. We need to check both _FILE_OFFSET_BITS and
- size of off_t to see if file offset is 64bit. This patch adds
- AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
-
-Index: pax-3.4/configure.in
-===================================================================
---- pax-3.4.orig/configure.in
-+++ pax-3.4/configure.in
-@@ -33,4 +33,7 @@ dnl Checks for header files.
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
-
-+AC_CHECK_SIZEOF(off_t)
-+AC_CHECK_SIZEOF(long)
-+
- AC_OUTPUT([Makefile lib/Makefile src/Makefile])
-Index: pax-3.4/src/ar_io.c
-===================================================================
---- pax-3.4.orig/src/ar_io.c
-+++ pax-3.4/src/ar_io.c
-@@ -378,7 +378,8 @@ ar_close(void)
- * could have written anything yet.
- */
- if (frmt == NULL) {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
- #else
- (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
-@@ -391,7 +392,8 @@ ar_close(void)
-
- if (strcmp(NM_CPIO, argv0) == 0)
- (void)fprintf(listf,
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- "%qu blocks\n",
- #else
- "%lu blocks\n",
-@@ -399,7 +401,8 @@ ar_close(void)
- (rdcnt ? rdcnt : wrcnt) / 5120);
- else if (strcmp(NM_TAR, argv0) != 0)
- (void)fprintf(listf,
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n",
- #else
- "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n",
-Index: pax-3.4/src/cpio.c
-===================================================================
---- pax-3.4.orig/src/cpio.c
-+++ pax-3.4/src/cpio.c
-@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn)
- */
- if ((arcn->sb.st_size == 0) ||
- (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- paxwarn (1, "Cpio link name length is invalid: %qu",
- arcn->sb.st_size);
- #else
-Index: pax-3.4/src/gen_subs.c
-===================================================================
---- pax-3.4.orig/src/gen_subs.c
-+++ pax-3.4/src/gen_subs.c
-@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
- * print device id's for devices, or sizes for other nodes
- */
- if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK))
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev),
- (unsigned long) MINOR (sbp->st_rdev));
- #else
-@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
- #endif
- else
- {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- (void) fprintf (fp, "%9qu ", sbp->st_size);
- #else
- (void) fprintf (fp, "%9lu ", sbp->st_size);
-@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len,
- return (0);
- }
-
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- /*
- * asc_uqd()
- * convert hex/octal character string into a u_quad_t. We do not have to
-Index: pax-3.4/src/options.c
-===================================================================
---- pax-3.4.orig/src/options.c
-+++ pax-3.4/src/options.c
-@@ -1545,7 +1545,8 @@ str_offt (char *val)
- char *expr;
- off_t num, t;
-
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- num = strtoq (val, &expr, 0);
- if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
- #else
-Index: pax-3.4/src/tar.c
-===================================================================
---- pax-3.4.orig/src/tar.c
-+++ pax-3.4/src/tar.c
-@@ -58,7 +58,8 @@
- static unsigned long tar_chksm (char *, int);
- static char *name_split (char *, int);
- static int ul_oct (u_long, char *, int, int);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- static int uqd_oct (u_quad_t, char *, int, int);
- #endif
-
-@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str,
- return (0);
- }
-
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- /*
- * uqd_oct()
- * convert an u_quad_t to an octal string. one of many oddball field
-@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf)
- 0xfff);
- arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT);
- arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
- #else
- arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
-@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn)
- * data follows this file, so set the pad
- */
- hd->linkflag = AREGTYPE;
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
- sizeof (hd->size), 1))
- #else
-@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf)
- */
- arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) &
- 0xfff);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
- #else
- arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
-@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn)
- else
- hd->typeflag = REGTYPE;
- arcn->pad = TAR_PAD (arcn->sb.st_size);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
- sizeof (hd->size), 3))
- {
diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb
deleted file mode 100644
index 9d1abfbb54..0000000000
--- a/meta/recipes-extended/pax/pax_3.4.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Portable Archive eXchange"
-DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool"
-HOMEPAGE = "http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
-BUGTRACKER = "http://www.openbsd.org/query-pr.html"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
- file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \
- file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \
- file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053"
-
-SECTION = "base"
-PR = "r2"
-
-DEPENDS_append_libc-musl = " fts "
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
- file://fix_for_compile_with_gcc-4.6.0.patch \
- file://pax-3.4_fix_for_x32.patch"
-
-SRC_URI_append_libc-musl = " file://0001-Fix-build-with-musl.patch \
- file://0001-use-strtoll-instead-of-strtoq.patch \
- "
-
-SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
-SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
-
-inherit autotools
diff --git a/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch b/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch
new file mode 100644
index 0000000000..8fc377c31b
--- /dev/null
+++ b/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch
@@ -0,0 +1,73 @@
+From de4a948d356c9befb88c796168e97eb05b9a3385 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Apr 2018 22:54:42 -0700
+Subject: [PATCH] pbzip2: Fix invalid suffix on literal C++11 warning
+
+Fixes -Wreserved-user-defined-literal] errors.
+Also reported in launchpad here https://bugs.launchpad.net/pbzip2/+bug/1746369
+
+Upstream-Status: Submitted [https://launchpadlibrarian.net/355230152/pbzip2.patch]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ pbzip2.cpp | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/pbzip2.cpp b/pbzip2.cpp
+index 66ca978..4287ea7 100644
+--- a/pbzip2.cpp
++++ b/pbzip2.cpp
+@@ -1220,7 +1220,7 @@ int producer_decompress(int hInfile, OFF_T fileSize, queue *fifo)
+ // give warning to user if block is larger than 250 million bytes
+ if (fileData->bufSize > 250000000)
+ {
+- fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%"PRIuMAX" bytes].\n",
++ fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%" PRIuMAX " bytes].\n",
+ (uintmax_t) fileData->bufSize);
+ fprintf(stderr, " If program aborts, use regular BZIP2 to decompress.\n");
+ }
+@@ -1829,7 +1829,7 @@ void *fileWriter(void *outname)
+
+ if (QuietMode != 1)
+ {
+- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize);
++ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize);
+ }
+
+ #ifdef PBZIP_DEBUG
+@@ -2072,7 +2072,7 @@ int directcompress(int hInfile, OFF_T fileSize, int blockSize, const char *OutFi
+ close(hOutfile);
+ if (QuietMode != 1)
+ {
+- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize);
++ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize);
+ }
+
+ syncSetProducerDone(1); // Not really needed for direct version
+@@ -2794,7 +2794,7 @@ void outputBufferInit(size_t size)
+ // unlikely to get here since more likely exception will be thrown
+ if (OutputBuffer.size() != size)
+ {
+- fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%"PRIuMAX"! Aborting...\n", (uintmax_t)size);
++ fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%" PRIuMAX "! Aborting...\n", (uintmax_t)size);
+ safe_mutex_unlock(OutMutex);
+ exit(1);
+ }
+@@ -4102,7 +4102,7 @@ int main(int argc, char* argv[])
+ if (decompress == 1)
+ fprintf(stderr, " BWT Block Size: %c00k\n", BWTblockSizeChar);
+ if (hasInFile)
+- fprintf(stderr, " Input Size: %"PRIuMAX" bytes\n", (uintmax_t)InFileSize);
++ fprintf(stderr, " Input Size: %" PRIuMAX " bytes\n", (uintmax_t)InFileSize);
+ }
+
+ if (decompress == 1)
+@@ -4224,7 +4224,7 @@ int main(int argc, char* argv[])
+ {
+ NumBufferedBlocksMax = numCPU;
+ if (QuietMode != 1)
+- fprintf(stderr, "*Warning* Max memory limit increased to %"PRIuMAX" MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU);
++ fprintf(stderr, "*Warning* Max memory limit increased to %" PRIuMAX " MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU);
+ }
+ else
+ {
diff --git a/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb b/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
index 06d37adc36..1275cc0097 100644
--- a/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
+++ b/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
@@ -5,18 +5,21 @@ machines. The output of this version is fully compatible with bzip2 v1.0.2 or \
newer (ie: anything compressed with pbzip2 can be decompressed with bzip2)."
HOMEPAGE = "http://compression.ca/pbzip2/"
SECTION = "console/utils"
-LICENSE = "BSD"
+LICENSE = "BSD-4-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=398b8832c6f840cfebd20ab2be6a3743"
DEPENDS = "bzip2"
DEPENDS_append_class-native = " bzip2-replacement-native"
-SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz"
+SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz \
+ file://0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch \
+ "
SRC_URI[md5sum] = "4cb87da2dba05540afce162f34b3a9a6"
SRC_URI[sha256sum] = "8fd13eaaa266f7ee91f85c1ea97c86d9c9cc985969db9059cdebcb1e1b7bdbe6"
-UPSTREAM_CHECK_URI = "http://compression.ca/pbzip2/"
+UPSTREAM_CHECK_URI = "https://launchpad.net/pbzip2/+milestones"
+UPSTREAM_CHECK_REGEX = "pbzip2 (?P<pver>\d+(\.\d+)+)"
EXTRA_OEMAKE = "CXX='${CXX} ${CXXFLAGS}' LDFLAGS='${LDFLAGS}'"
diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
index 170e7ecdea..9f992d3e83 100644
--- a/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
+++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
@@ -10,8 +10,11 @@ SRC_URI[sha256sum] = "74a4a78ae0c5e973100ac0a8f203a110f76fb047b79dae4fc1fd7d6814
S = "${WORKDIR}/Convert-ASN1-${PV}"
-inherit cpan
+inherit cpan ptest-perl
EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
+RDEPENDS_${PN} += "perl-module-exporter perl-module-constant perl-module-encode perl-module-encode-encoding perl-module-utf8 perl-module-socket perl-module-time-local perl-module-posix"
+RDEPENDS_${PN}-ptest += "perl-module-math-bigint perl-module-io-socket perl-module-data-dumper perl-module-math-bigint-calc"
+
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/perl/libtimedate-perl_2.30.bb b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
index c8fcde45f4..7219c7d11e 100644
--- a/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
+++ b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
@@ -1,4 +1,5 @@
SUMMARY = "Perl modules useful for manipulating date and time information"
+HOMEPAGE = "https://metacpan.org/release/TimeDate"
SECTION = "libs"
# You can redistribute it and/or modify it under the same terms as Perl itself.
LICENSE = "Artistic-1.0 | GPL-1.0+"
@@ -8,12 +9,13 @@ SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-${PV}.tar.
S = "${WORKDIR}/TimeDate-${PV}"
-inherit cpan
+inherit cpan ptest-perl
BBCLASSEXTEND = "native"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN} += "perl-module-carp perl-module-exporter perl-module-strict perl-module-time-local"
+RDEPENDS_${PN}-ptest += "perl-module-test-more perl-module-utf8"
SRC_URI[md5sum] = "b1d91153ac971347aee84292ed886c1c"
SRC_URI[sha256sum] = "75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86"
diff --git a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb
deleted file mode 100644
index 9a9e71011e..0000000000
--- a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Perl module for supporting simple generic namespaces"
-DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \
- It also helps maintain a prefix-to-namespace URI map, and provides a number of \
- basic checks. "
-
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-PR = "r3"
-
-LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=3b2b564dae8b9af9e8896e85c07dcbe5"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz"
-SRC_URI[md5sum] = "222cca76161cd956d724286d36b607da"
-SRC_URI[sha256sum] = "6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea"
-
-
-S = "${WORKDIR}/XML-NamespaceSupport-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND="native"
-
diff --git a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb
new file mode 100644
index 0000000000..57c407e0f8
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Perl module for supporting simple generic namespaces"
+HOMEPAGE = "http://veillard.com/XML/"
+DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \
+ It also helps maintain a prefix-to-namespace URI map, and provides a number of \
+ basic checks. "
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+SRCNAME = "XML-NamespaceSupport"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c9d8a117e7620b5adf8d69c29613ceab"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/P/PE/PERIGRIN/${SRCNAME}-${PV}.tar.gz"
+SRC_URI[md5sum] = "a8916c6d095bcf073e1108af02e78c97"
+SRC_URI[sha256sum] = "47e995859f8dd0413aa3f22d350c4a62da652e854267aa0586ae544ae2bae5ef"
+
+UPSTREAM_CHECK_REGEX = "XML\-NamespaceSupport\-(?P<pver>(\d+\.\d+))(?!_\d+).tar"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit cpan ptest-perl
+
+RDEPENDS_${PN}-ptest += "perl-module-test-more"
+
+BBCLASSEXTEND="native nativesdk"
+
diff --git a/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb b/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb
deleted file mode 100644
index 14a337057e..0000000000
--- a/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Base class SAX Drivers and Filters"
-DESCRIPTION = "This module has a very simple task - to be a base class for \
-PerlSAX drivers and filters. It's default behaviour is to pass \
-the input directly to the output unchanged. It can be useful to \
-use this module as a base class so you don't have to, for example, \
-implement the characters() callback."
-
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-RDEPENDS_${PN} += "perl-module-extutils-makemaker"
-
-LIC_FILES_CHKSUM = "file://dist.ini;endline=5;md5=8f9c9a55340aefaee6e9704c88466446"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-Base-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "38c8c3247dfd080712596118d70dbe32"
-SRC_URI[sha256sum] = "666270318b15f88b8427e585198abbc19bc2e6ccb36dc4c0a4f2d9807330219e"
-
-S = "${WORKDIR}/XML-SAX-Base-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb b/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb
new file mode 100644
index 0000000000..2bff65a082
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Base class SAX Drivers and Filters"
+HOMEPAGE = "http://search.cpan.org/dist/XML-SAX-Base/"
+DESCRIPTION = "This module has a very simple task - to be a base class for \
+PerlSAX drivers and filters. It's default behaviour is to pass \
+the input directly to the output unchanged. It can be useful to \
+use this module as a base class so you don't have to, for example, \
+implement the characters() callback."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+RDEPENDS_${PN} += "perl-module-extutils-makemaker"
+
+LIC_FILES_CHKSUM = "file://dist.ini;endline=5;md5=8f9c9a55340aefaee6e9704c88466446"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-Base-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "ec347a14065dd7aec7d9fb181b2d7946"
+SRC_URI[sha256sum] = "66cb355ba4ef47c10ca738bd35999723644386ac853abbeb5132841f5e8a2ad0"
+
+S = "${WORKDIR}/XML-SAX-Base-${PV}"
+
+inherit cpan ptest-perl
+
+RDEPENDS_${PN}-ptest += "perl-module-test perl-module-test-more"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
deleted file mode 100644
index 45d396639b..0000000000
--- a/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Perl module for using and building Perl SAX2 XML processors"
-DESCRIPTION = "XML::SAX consists of several framework classes for using and \
-building Perl SAX2 XML parsers, filters, and drivers. It is designed \
-around the need to be able to "plug in" different SAX parsers to an \
-application without requiring programmer intervention. Those of you \
-familiar with the DBI will be right at home. Some of the designs \
-come from the Java JAXP specification (SAX part), only without the \
-javaness."
-
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-DEPENDS += "libxml-namespacesupport-perl-native"
-RDEPENDS_${PN} += "libxml-namespacesupport-perl libxml-sax-base-perl perl-module-file-temp"
-PR = "r2"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "290f5375ae87fdebfdb5bc3854019f24"
-SRC_URI[sha256sum] = "32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84"
-
-S = "${WORKDIR}/XML-SAX-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/perl/libxml-sax-perl_1.02.bb b/meta/recipes-extended/perl/libxml-sax-perl_1.02.bb
new file mode 100644
index 0000000000..02ee34ee17
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-sax-perl_1.02.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Perl module for using and building Perl SAX2 XML processors"
+HOMEPAGE = "http://search.cpan.org/dist/XML-SAX/"
+DESCRIPTION = "XML::SAX consists of several framework classes for using and \
+building Perl SAX2 XML parsers, filters, and drivers. It is designed \
+around the need to be able to "plug in" different SAX parsers to an \
+application without requiring programmer intervention. Those of you \
+familiar with the DBI will be right at home. Some of the designs \
+come from the Java JAXP specification (SAX part), only without the \
+javaness."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+DEPENDS += "libxml-namespacesupport-perl-native"
+RDEPENDS_${PN} += "libxml-namespacesupport-perl libxml-sax-base-perl perl-module-file-temp"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "b62e3754523695c7f5bbcafa3676a38d"
+SRC_URI[sha256sum] = "4506c387043aa6a77b455f00f57409f3720aa7e553495ab2535263b4ed1ea12a"
+
+S = "${WORKDIR}/XML-SAX-${PV}"
+
+inherit cpan ptest-perl
+
+do_install_ptest() {
+ cp -r ${B}/testfiles ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}/testfiles
+}
+
+RDEPENDS_${PN} += "perl-module-encode perl-module-perlio"
+
+RDEPENDS_${PN}-ptest += " \
+ perl-module-base \
+ perl-module-encode-byte \
+ perl-module-encode-unicode \
+ perl-module-fatal \
+ perl-module-test \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
deleted file mode 100644
index 86f434c104..0000000000
--- a/meta/recipes-extended/pigz/pigz.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "A parallel implementation of gzip"
-DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
-fully functional replacement for gzip that exploits multiple processors and \
-multiple cores to the hilt when compressing data. pigz was written by Mark \
-Adler, and uses the zlib and pthread libraries."
-HOMEPAGE = "http://zlib.net/pigz/"
-SECTION = "console/utils"
-LICENSE = "Zlib & Apache-2.0"
-
-SRC_URI = "http://zlib.net/${BPN}/${BP}.tar.gz"
-
-PROVIDES_class-native += "gzip-native"
-
-DEPENDS = "zlib"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-inherit update-alternatives
-
-do_install_class-target() {
- # Install files into /bin (FHS), which is typical place for gzip
- install -d ${D}${base_bindir}
- install ${B}/pigz ${D}${base_bindir}/pigz
- ln -nsf pigz ${D}${base_bindir}/unpigz
- ln -nsf pigz ${D}${base_bindir}/pigzcat
-}
-
-do_install() {
- install -d ${D}${bindir}
- install ${B}/pigz ${D}${bindir}/gzip
- ln -nsf gzip ${D}${bindir}/gunzip
- ln -nsf gzip ${D}${bindir}/zcat
-}
-
-ALTERNATIVE_PRIORITY = "80"
-ALTERNATIVE_${PN} = "gunzip gzip zcat"
-ALTERNATIVE_${PN}_class-nativesdk = ""
-ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
-ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
-ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
-ALTERNATIVE_TARGET = "${base_bindir}/pigz"
diff --git a/meta/recipes-extended/pigz/pigz/link-order.patch b/meta/recipes-extended/pigz/pigz/link-order.patch
deleted file mode 100644
index 4becc0e3fe..0000000000
--- a/meta/recipes-extended/pigz/pigz/link-order.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-This patch avoids underlinking issues since we pass -lz via LDFLAGS but it appears
-before pigz.o which needs symbols from libz however due to order linker happily discards libz
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: pigz-2.3.3/Makefile
-===================================================================
---- pigz-2.3.3.orig/Makefile 2015-01-19 20:12:31.000000000 -0800
-+++ pigz-2.3.3/Makefile 2015-01-28 09:11:50.266669184 -0800
-@@ -5,7 +5,7 @@
- # use gcc and gmake on Solaris
-
- pigz: pigz.o yarn.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
-- $(CC) $(LDFLAGS) -o pigz $^ -lpthread -lm
-+ $(CC) -o pigz $^ $(LDFLAGS) -lz -lpthread -lm
- ln -f pigz unpigz
-
- pigz.o: pigz.c yarn.h try.h ${ZOPFLI}deflate.h ${ZOPFLI}util.h
-@@ -35,7 +35,7 @@
- dev: pigz pigzt pigzn
-
- pigzt: pigzt.o yarnt.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
-- $(CC) $(LDFLAGS) -o pigzt $^ -lpthread -lm
-+ $(CC) -o pigzt $^ $(LDFLAGS) -lz -lpthread -lm
-
- pigzt.o: pigz.c yarn.h try.h
- $(CC) $(CFLAGS) -DDEBUG -g -c -o pigzt.o pigz.c
-@@ -44,7 +44,7 @@
- $(CC) $(CFLAGS) -DDEBUG -g -c -o yarnt.o yarn.c
-
- pigzn: pigzn.o tryn.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
-- $(CC) $(LDFLAGS) -o pigzn $^ -lm
-+ $(CC) -o pigzn $^ $(LDFLAGS) -lz -lm
-
- pigzn.o: pigz.c try.h
- $(CC) $(CFLAGS) -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
diff --git a/meta/recipes-extended/pigz/pigz_2.3.3.bb b/meta/recipes-extended/pigz/pigz_2.3.3.bb
deleted file mode 100644
index 080be2bbc9..0000000000
--- a/meta/recipes-extended/pigz/pigz_2.3.3.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require pigz.inc
-LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
-
-SRC_URI += "file://link-order.patch"
-
-SRC_URI[md5sum] = "01d7a16cce77929cc1a78aa1bdfb68cb"
-SRC_URI[sha256sum] = "4e8b67b432ce7907575a549f3e1cac4709781ba0f6b48afea9f59369846b509c"
-
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/meta/recipes-extended/pigz/pigz_2.4.bb b/meta/recipes-extended/pigz/pigz_2.4.bb
new file mode 100644
index 0000000000..8c65ec34f0
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.4.bb
@@ -0,0 +1,49 @@
+SUMMARY = "A parallel implementation of gzip"
+DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
+fully functional replacement for gzip that exploits multiple processors and \
+multiple cores to the hilt when compressing data. pigz was written by Mark \
+Adler, and uses the zlib and pthread libraries."
+HOMEPAGE = "http://zlib.net/pigz/"
+SECTION = "console/utils"
+LICENSE = "Zlib & Apache-2.0"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21"
+
+SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
+SRC_URI[md5sum] = "def2f6e19d9d8231445adc1349d346df"
+SRC_URI[sha256sum] = "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73"
+PROVIDES_class-native += "gzip-native"
+
+# Point this at the homepage in case /fossils/ isn't updated
+UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
+UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
+
+DEPENDS = "zlib"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+inherit update-alternatives
+
+do_install() {
+ # Install files into /bin (FHS), which is typical place for gzip
+ install -d ${D}${base_bindir}
+ install ${B}/pigz ${D}${base_bindir}/pigz
+ ln -nsf pigz ${D}${base_bindir}/unpigz
+ ln -nsf pigz ${D}${base_bindir}/pigzcat
+}
+
+do_install_append_class-native() {
+ install -d ${D}${bindir}
+ install ${B}/pigz ${D}${bindir}/gzip
+ ln -nsf gzip ${D}${bindir}/gunzip
+ ln -nsf gzip ${D}${bindir}/zcat
+}
+
+ALTERNATIVE_PRIORITY = "110"
+ALTERNATIVE_${PN} = "gunzip gzip zcat"
+ALTERNATIVE_${PN}_class-nativesdk = ""
+ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
+ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
+ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
+ALTERNATIVE_TARGET = "${base_bindir}/pigz"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch b/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch
deleted file mode 100644
index 12bae28dc7..0000000000
--- a/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From c84480be8df6966c538d1fb67ccae2f42cc46421 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Mar 2016 07:36:54 +0000
-Subject: [PATCH 1/2] configure: Detect headers before using them
-
-Current logic does not work when system does not have
-sys/endian.h, since it tried to reuse the cached results
-from first try of detecting htole64 in sys/endian.h which is
-'no' and hence the second try to look into endian.h also
-comes out negative.
-
-So we check for header and then run the test for symbols
-and these symbols are not standard and we need to define _GNU_SOURCE
-for it to work, this issue is exposed by systems using musl e.g.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- configure.ac | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4cb56bc..5e23c50 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -69,12 +69,17 @@ AC_FUNC_MALLOC
- AC_FUNC_REALLOC
- AC_FUNC_STRTOD
- AC_CHECK_FUNCS([memchr memmove memset strerror strtol])
--AC_CHECK_DECLS([htole64, le64toh],
-- [],
-+AC_CHECK_HEADER([sys/endian.h],
- [
-- AC_CHECK_DECLS([htole64, le64toh], [], [], [#include <endian.h>])
-+ AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <sys/endian.h>])
- ],
-- [#include <sys/endian.h>])
-+ [], [])
-+
-+AC_CHECK_HEADER([endian.h],
-+ [
-+ AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <endian.h>])
-+ ],
-+ [], [])
-
- AC_CONFIG_FILES([Makefile
- src/Makefile
---
-1.8.3.1
-
diff --git a/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch b/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch
deleted file mode 100644
index 6b615988db..0000000000
--- a/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 5f3a535987bae4c3e3d9e9079c7526e399f7aecd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Mar 2016 07:42:39 +0000
-Subject: [PATCH 2/2] endian: Use macro bswap_64 instead of __bswap_64
-
-byteswap.h defines then as public APIs on all libc
-on linux including musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
- src/endian.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/endian.c b/src/endian.c
-index b7724f3..51aea58 100644
---- a/src/endian.c
-+++ b/src/endian.c
-@@ -15,6 +15,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
- #include <stdint.h>
- #ifdef __linux__
- #include <endian.h>
-+ #include <byteswap.h>
- #else
- #include <sys/endian.h>
- #endif
-@@ -23,7 +24,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
- # if __BYTE_ORDER == __LITTLE_ENDIAN
- # define htole64(x) (x)
- # else
--# define htole64(x) __bswap_64 (x)
-+# define htole64(x) bswap_64 (x)
- # endif
- #endif
-
-@@ -31,7 +32,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
- # if __BYTE_ORDER == __LITTLE_ENDIAN
- # define le64toh(x) (x)
- # else
--# define le64toh(x) __bswap_64 (x)
-+# define le64toh(x) bswap_64 (x)
- # endif
- #endif
-
---
-1.8.3.1
-
diff --git a/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch b/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch
deleted file mode 100644
index e3489db5b8..0000000000
--- a/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 936d8068ae19d95260d3058f41dd6cf718101cd6 Mon Sep 17 00:00:00 2001
-From: Christian Krause <kizkizzbangbang@googlemail.com>
-Date: Sat, 26 Dec 2015 14:36:17 +0100
-Subject: [PATCH] option to not build man page
-
-fixes #56
----
- configure.ac | 23 +++++++++++++++++++----
- src/Makefile.am | 2 ++
- 2 files changed, 21 insertions(+), 4 deletions(-)
-
-Upstream-Status: Backport
-RP 2016/01/22
-
-diff --git a/configure.ac b/configure.ac
-index b437e56..4cb56bc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -20,13 +20,28 @@ AC_CHECK_FILE(
- [src/pixz.1],
- [],
- [
-- AC_CHECK_PROG(A2X, a2x, a2x, [])
-- if test "x$A2X" = x ; then
-- AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.])
-- fi
-+ AC_ARG_WITH(
-+ [manpage],
-+ [ --without-manpage don't build man page],
-+ [case ${withval} in
-+ yes) manpage=true ;;
-+ no) manpage=false ;;
-+ *) AC_MSG_ERROR([bad value ${withval} for --with-manpage]) ;;
-+ esac],
-+ [manpage=true]
-+ )
- ]
- )
-
-+AM_CONDITIONAL([MANPAGE], [test x$manpage = xtrue])
-+
-+if test x$manpage = xtrue ; then
-+ AC_CHECK_PROG(A2X, a2x, a2x, [])
-+ if test "x$A2X" = x ; then
-+ AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.])
-+ fi
-+fi
-+
- # Checks for libraries.
- AC_CHECK_LIB([m], [ceil])
- AX_PTHREAD
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 600ec90..b98f450 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -15,6 +15,7 @@ pixz_SOURCES = \
- read.c \
- write.c
-
-+if MANPAGE
- # TODO remove when possible: This is a hack because a2x is not able to output the man pages to a
- # specific directory, only to where the source is.
- pixz.1: pixz.1.asciidoc
-@@ -26,3 +27,4 @@ man_MANS = pixz.1
- CLEANFILES = pixz.1
-
- EXTRA_DIST = $(man_MANS) pixz.1.asciidoc
-+endif
diff --git a/meta/recipes-extended/pixz/pixz_1.0.6.bb b/meta/recipes-extended/pixz/pixz_1.0.6.bb
deleted file mode 100644
index 0e51472aed..0000000000
--- a/meta/recipes-extended/pixz/pixz_1.0.6.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Parallel, indexed xz compressor"
-
-DEPENDS = "xz libarchive"
-
-SRC_URI = "https://github.com/vasi/pixz/releases/download/v${PV}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "f6dc5909c9a31b192f69aa397ae8df48"
-SRC_URI[sha256sum] = "02c50746b134fa1b1aae41fcc314d7c6f1919b3d48bcdea01bf11769f83f72e8"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5cf6d164086105f1512ccb81bfff1926"
-
-SRC_URI += "file://936d8068ae19d95260d3058f41dd6cf718101cd6.patch \
- file://0001-configure-Detect-headers-before-using-them.patch \
- file://0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch \
-"
-UPSTREAM_CHECK_URI = "https://github.com/vasi/pixz/releases"
-
-EXTRA_OECONF += "--without-manpage"
-CFLAGS_append_libc-musl = " -D_GNU_SOURCE"
-CACHED_CONFIGUREVARS += "ac_cv_file_src_pixz_1=no"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/procps/procps/0001-Fix-out-of-tree-builds.patch b/meta/recipes-extended/procps/procps/0001-Fix-out-of-tree-builds.patch
new file mode 100644
index 0000000000..e548194362
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/0001-Fix-out-of-tree-builds.patch
@@ -0,0 +1,24 @@
+From 0825db94fc91fa2150c0e649e92cc8dcc44f4b38 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 4 Apr 2018 14:09:45 +0300
+Subject: [PATCH] Fix out of tree builds
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ include/nls.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/nls.h b/include/nls.h
+index 1166b7b..f5abe05 100644
+--- a/include/nls.h
++++ b/include/nls.h
+@@ -6,7 +6,7 @@
+ #define PROCPS_NG_NLS_H
+
+ /* programs issuing textdomain() need PACKAGE string */
+-#include "../config.h"
++#include "config.h"
+
+ /* programs issuing bindtextdomain() also need LOCALEDIR string */
+ #ifndef LOCALEDIR
diff --git a/meta/recipes-extended/procps/procps/sysctl.conf b/meta/recipes-extended/procps/procps/sysctl.conf
index 34e7488bf7..253f3701bd 100644
--- a/meta/recipes-extended/procps/procps/sysctl.conf
+++ b/meta/recipes-extended/procps/procps/sysctl.conf
@@ -1,64 +1,67 @@
-# This configuration file is taken from Debian.
+# This configuration taken from procps v3.3.15
+# Commented out kernel/pid_max=10000 line
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See sysctl.conf (5) for information.
-#
-#kernel.domainname = example.com
+# you can have the CD-ROM close when you use it, and open
+# when you are done.
+#dev.cdrom.autoeject = 1
+#dev.cdrom.autoclose = 1
-# Uncomment the following to stop low-level messages on console
-#kernel.printk = 4 4 1 7
+# protection from the SYN flood attack
+net/ipv4/tcp_syncookies=1
-##############################################################3
-# Functions previously found in netbase
-#
+# see the evil packets in your log files
+net/ipv4/conf/all/log_martians=1
-# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
-# Turn on Source Address Verification in all interfaces to
-# prevent some spoofing attacks
-net.ipv4.conf.default.rp_filter=1
-net.ipv4.conf.all.rp_filter=1
+# makes you vulnerable or not :-)
+net/ipv4/conf/all/accept_redirects=0
+net/ipv4/conf/all/accept_source_route=0
+net/ipv4/icmp_echo_ignore_broadcasts =1
-# Uncomment the next line to enable TCP/IP SYN cookies
-#net.ipv4.tcp_syncookies=1
+# needed for routing, including masquerading or NAT
+#net/ipv4/ip_forward=1
-# Uncomment the next line to enable packet forwarding for IPv4
-#net.ipv4.ip_forward=1
+# sets the port range used for outgoing connections
+#net.ipv4.ip_local_port_range = 32768 61000
-# Uncomment the next line to enable packet forwarding for IPv6
-#net.ipv6.conf.all.forwarding=1
+# Broken routers and obsolete firewalls will corrupt the window scaling
+# and ECN. Set these values to 0 to disable window scaling and ECN.
+# This may, rarely, cause some performance loss when running high-speed
+# TCP/IP over huge distances or running TCP/IP over connections with high
+# packet loss and modern routers. This sure beats dropped connections.
+#net.ipv4.tcp_ecn = 0
+# Swapping too much or not enough? Disks spinning up when you'd
+# rather they didn't? Tweak these.
+#vm.vfs_cache_pressure = 100
+#vm.laptop_mode = 0
+#vm.swappiness = 60
-###################################################################
-# Additional settings - these settings can improve the network
-# security of the host and prevent against some network attacks
-# including spoofing attacks and man in the middle attacks through
-# redirection. Some network environments, however, require that these
-# settings are disabled so review and enable them as needed.
-#
-# Ignore ICMP broadcasts
-#net.ipv4.icmp_echo_ignore_broadcasts = 1
-#
-# Ignore bogus ICMP errors
-#net.ipv4.icmp_ignore_bogus_error_responses = 1
-#
-# Do not accept ICMP redirects (prevent MITM attacks)
-#net.ipv4.conf.all.accept_redirects = 0
-#net.ipv6.conf.all.accept_redirects = 0
-# _or_
-# Accept ICMP redirects only for gateways listed in our default
-# gateway list (enabled by default)
-# net.ipv4.conf.all.secure_redirects = 1
-#
-# Do not send ICMP redirects (we are not a router)
-#net.ipv4.conf.all.send_redirects = 0
-#
-# Do not accept IP source route packets (we are not a router)
-#net.ipv4.conf.all.accept_source_route = 0
-#net.ipv6.conf.all.accept_source_route = 0
-#
-# Log Martian Packets
-#net.ipv4.conf.all.log_martians = 1
-#
+#kernel.printk_ratelimit_burst = 10
+#kernel.printk_ratelimit = 5
+#kernel.panic_on_oops = 0
+
+# Reboot 600 seconds after a panic
+#kernel.panic = 600
+
+# enable SysRq key (note: console security issues)
+#kernel.sysrq = 1
+
+# Change name of core file to start with the command name
+# so you get things like: emacs.core mozilla-bin.core X.core
+#kernel.core_pattern = %e.core
+
+# NIS/YP domain (not always equal to DNS domain)
+#kernel.domainname = example.com
+#kernel.hostname = darkstar
+
+# This limits PID values to 4 digits, which allows tools like ps
+# to save screen space.
+#kernel/pid_max=10000
-#kernel.shmmax = 141762560
+# Protects against creating or following links under certain conditions
+# See https://www.kernel.org/doc/Documentation/sysctl/fs.txt
+#fs.protected_hardlinks = 1
+#fs.protected_symlinks = 1
diff --git a/meta/recipes-extended/procps/procps_3.3.12.bb b/meta/recipes-extended/procps/procps_3.3.12.bb
deleted file mode 100644
index 4ca1a5023b..0000000000
--- a/meta/recipes-extended/procps/procps_3.3.12.bb
+++ /dev/null
@@ -1,66 +0,0 @@
-SUMMARY = "System and process monitoring utilities"
-DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
-the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
-HOMEPAGE = "https://gitorious.org/procps"
-SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
- "
-
-DEPENDS = "ncurses"
-
-inherit autotools gettext pkgconfig update-alternatives
-
-SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
- file://sysctl.conf \
- "
-
-SRC_URI[md5sum] = "957e42e8b193490b2111252e4a2b443c"
-SRC_URI[sha256sum] = "6ed65ab86318f37904e8f9014415a098bec5bc53653e5d9ab404f95ca5e1a7d4"
-
-S = "${WORKDIR}/procps-ng-${PV}"
-
-EXTRA_OECONF = "--enable-skill --disable-modern-top"
-
-CPPFLAGS += "-I${S}"
-
-do_install_append () {
- install -d ${D}${base_bindir}
- [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
- install -d ${D}${base_sbindir}
- [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
- if [ "${base_sbindir}" != "${sbindir}" ]; then
- rmdir ${D}${sbindir}
- fi
-
- install -d ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${sysconfdir}/sysctl.d
- ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
- fi
-}
-
-CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
-
-bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
-base_bindir_progs += "kill pidof ps watch"
-base_sbindir_progs += "sysctl"
-
-ALTERNATIVE_PRIORITY = "200"
-
-ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
-
-ALTERNATIVE_${PN}-doc = "kill.1 uptime.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
-
-python __anonymous() {
- for prog in d.getVar('base_bindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
-
- for prog in d.getVar('base_sbindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
-}
-
diff --git a/meta/recipes-extended/procps/procps_3.3.15.bb b/meta/recipes-extended/procps/procps_3.3.15.bb
new file mode 100644
index 0000000000..f240e54fd8
--- /dev/null
+++ b/meta/recipes-extended/procps/procps_3.3.15.bb
@@ -0,0 +1,69 @@
+SUMMARY = "System and process monitoring utilities"
+DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
+the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
+HOMEPAGE = "https://gitlab.com/procps-ng/procps"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
+ "
+
+DEPENDS = "ncurses"
+
+inherit autotools gettext pkgconfig update-alternatives
+
+SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
+ file://sysctl.conf \
+ file://0001-Fix-out-of-tree-builds.patch \
+ "
+
+SRC_URI[md5sum] = "2b0717a7cb474b3d6dfdeedfbad2eccc"
+SRC_URI[sha256sum] = "10bd744ffcb3de2d591d2f6acf1a54a7ba070fdcc432a855931a5057149f0465"
+
+S = "${WORKDIR}/procps-ng-${PV}"
+
+EXTRA_OECONF = "--enable-skill --disable-modern-top"
+
+do_install_append () {
+ install -d ${D}${base_bindir}
+ [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
+ install -d ${D}${base_sbindir}
+ [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
+ if [ "${base_sbindir}" != "${sbindir}" ]; then
+ rmdir ${D}${sbindir}
+ fi
+
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${sysconfdir}/sysctl.d
+ ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
+ fi
+}
+
+CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
+
+bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
+base_bindir_progs += "kill pidof ps watch"
+base_sbindir_progs += "sysctl"
+
+ALTERNATIVE_PRIORITY = "200"
+ALTERNATIVE_PRIORITY[pidof] = "150"
+
+ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
+
+ALTERNATIVE_${PN}-doc = "kill.1 uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+
+python __anonymous() {
+ for prog in d.getVar('base_bindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
+
+ for prog in d.getVar('base_sbindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog))
+}
+
+# 'ps' isn't suitable for use as a security tool so whitelist this CVE.
+# https://bugzilla.redhat.com/show_bug.cgi?id=1575473#c3
+CVE_CHECK_WHITELIST += "CVE-2018-1121"
diff --git a/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
deleted file mode 100644
index e57d60f6a3..0000000000
--- a/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001
-From: Brad Jorsch <anomie@users.sourceforge.net>
-Date: Fri, 28 Feb 2014 21:55:02 +1100
-Subject: [PATCH] Typo in fuser makes -M on all the time
-
-Brad found that fuser had the -M option on all the time.
-A simple but significant typo caused this, thanks the the patch.
-
-Bug-Debian: http://bugs.debian.org/740275
-
-Upstream-Status: Backport
-
-Signed-off-by: Craig Small <csmall@enc.com.au>
----
- ChangeLog | 4 ++++
- src/fuser.c | 2 +-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index fd1cccf..e5f784c 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,7 @@
-+Changes in 22.22
-+================
-+ * Fixed typo in fuser which has -M on Debian #740275
-+
- Changes in 22.21
- ================
- * Missing comma in fuser(1) added Debian #702391
-diff --git a/src/fuser.c b/src/fuser.c
-index b485f65..389b302 100644
---- a/src/fuser.c
-+++ b/src/fuser.c
-@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[])
- usage(_("No process specification given"));
-
- /* Check if -M flag was used and if so check mounts */
-- if (opts * OPT_ISMOUNTPOINT) {
-+ if (opts & OPT_ISMOUNTPOINT) {
- check_mountpoints(&mounts, &names_head, &names_tail);
- }
-
---
-1.8.4.2
-
diff --git a/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
deleted file mode 100644
index c8afcac8a8..0000000000
--- a/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001
-From: Paul Barker <paul@paulbarker.me.uk>
-Date: Wed, 20 Aug 2014 10:31:37 +0000
-Subject: [PATCH] Include <limits.h> for PATH_MAX
-
-When building against musl libc, PATH_MAX is defined in <limits.h>.
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-
-Upstream-Status: Accepted (Should be in next release after 22.21)
----
- src/pstree.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/pstree.c b/src/pstree.c
-index 071e6c4..0d28260 100644
---- a/src/pstree.c
-+++ b/src/pstree.c
-@@ -41,6 +41,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/ioctl.h>
-+#include <limits.h>
-
- #include "i18n.h"
- #include "comm.h"
---
-2.0.4
-
diff --git a/meta/recipes-extended/psmisc/psmisc.inc b/meta/recipes-extended/psmisc/psmisc.inc
index 98a84709a1..594a10cf22 100644
--- a/meta/recipes-extended/psmisc/psmisc.inc
+++ b/meta/recipes-extended/psmisc/psmisc.inc
@@ -1,4 +1,5 @@
SUMMARY = "Utilities for managing processes on your system"
+HOMEPAGE = "http://psmisc.sf.net/"
DESCRIPTION = "The psmisc package contains utilities for managing processes on your \
system: pstree, killall and fuser. The pstree command displays a tree \
structure of all of the running processes on your system. The killall \
@@ -6,7 +7,7 @@ command sends a specified signal (SIGTERM if nothing is specified) to \
processes identified by name. The fuser command identifies the PIDs \
of processes that are using specified files or filesystems."
SECTION = "base"
-DEPENDS = "ncurses virtual/libintl"
+DEPENDS = "ncurses virtual/libintl gettext-native"
LICENSE = "GPLv2"
SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz"
@@ -15,7 +16,16 @@ S = "${WORKDIR}/psmisc-${PV}"
inherit autotools gettext
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+# Upstream has a custom autogen.sh which invokes po/update-potfiles as they
+# don't ship a po/POTFILES.in (which is silly). Without that file gettext
+# doesn't believe po/ is a gettext directory and won't generate po/Makefile.
+EXTRA_AUTORECONF_remove = "--exclude=autopoint"
+do_configure_prepend() {
+ ( cd ${S} && po/update-potfiles )
+}
+
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
ALLOW_EMPTY_${PN} = "1"
diff --git a/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch b/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch
index b57a006bc6..ca13bdbd15 100644
--- a/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch
+++ b/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch
@@ -1,4 +1,4 @@
-From 5dc872bb2fba6421cb8e1ee578f7bd4aaed55f61 Mon Sep 17 00:00:00 2001
+From 115fcf1daff18aa2f2e130d63704f04031878db0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 24 Mar 2016 15:46:14 +0000
Subject: [PATCH] Use UINTPTR_MAX instead of __WORDSIZE
@@ -7,14 +7,13 @@ Do not include sys/user.h since it conflicts with
pt_regs struct from kernel APIs in asm/ptrace.h
Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Pending
-
+---
src/peekfd.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/peekfd.c b/src/peekfd.c
-index cba2130..0d39878 100644
+index 5aa990a..7e8e3fc 100644
--- a/src/peekfd.c
+++ b/src/peekfd.c
@@ -30,8 +30,11 @@
@@ -28,8 +27,8 @@ index cba2130..0d39878 100644
+#include <stdint.h>
#include <getopt.h>
#include <ctype.h>
-
-@@ -228,11 +231,11 @@ int main(int argc, char **argv)
+ #include <dirent.h>
+@@ -266,11 +269,11 @@ int main(int argc, char **argv)
if (WIFSTOPPED(status)) {
#ifdef PPC
struct pt_regs regs;
@@ -46,6 +45,3 @@ index cba2130..0d39878 100644
#elif defined(ARM)
struct pt_regs regs;
ptrace(PTRACE_GETREGS, pid, 0, &regs);
---
-1.9.1
-
diff --git a/meta/recipes-extended/psmisc/psmisc_22.21.bb b/meta/recipes-extended/psmisc/psmisc_22.21.bb
deleted file mode 100644
index 1c6473ebf4..0000000000
--- a/meta/recipes-extended/psmisc/psmisc_22.21.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require psmisc.inc
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
-SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
- file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
- file://0002-Include-limits.h-for-PATH_MAX.patch \
- file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \
- "
diff --git a/meta/recipes-extended/psmisc/psmisc_23.3.bb b/meta/recipes-extended/psmisc/psmisc_23.3.bb
new file mode 100644
index 0000000000..e569f1074b
--- /dev/null
+++ b/meta/recipes-extended/psmisc/psmisc_23.3.bb
@@ -0,0 +1,9 @@
+require psmisc.inc
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "git://gitlab.com/psmisc/psmisc.git;protocol=https \
+ file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \
+ "
+SRCREV = "78bde849041e6c914a2a517ebe1255b86dc98772"
+S = "${WORKDIR}/git"
diff --git a/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch b/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
deleted file mode 100644
index 6add4708ae..0000000000
--- a/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 776757a23e9930588950c7fcbc7827ec7a3e51c4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
-Date: Mon, 4 Jan 2016 15:48:19 +0100
-Subject: [PATCH] Do not accidentaly override commandline passed CFLAGS.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport
-
-Signed-off-by: Tomáš Chvátal <tchvatal@suse.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3ba1386..1552c15 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [
- # ================
- # Check for cflags
- # ================
--CFLAGS="-D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
-+CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
- AC_ARG_ENABLE([werror],
- [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])],
- [enable_werror="$enableval"],
---
-2.4.0
-
diff --git a/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch b/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
deleted file mode 100644
index a79e477968..0000000000
--- a/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 39fd30ce57e3c34c3649866bf9345a71f0b78667 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Mon, 4 Jan 2016 15:10:53 +0100
-Subject: [PATCH] Fix build with disabled ldap
-
-Upstream-Status: Backport
-
-Reported-by: Tomas Chvatal <tchvatal@suse.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- warnquota.c | 36 ++++++++++++++++++------------------
- 1 file changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/warnquota.c b/warnquota.c
-index 3734f0e..e9868c1 100644
---- a/warnquota.c
-+++ b/warnquota.c
-@@ -109,13 +109,13 @@ struct configparams {
- char *user_signature;
- char *group_message;
- char *group_signature;
-+ time_t cc_before;
-+#ifdef USE_LDAP_MAIL_LOOKUP
- int use_ldap_mail; /* 0 */
-+ int ldap_is_setup; /* 0 */
- int ldap_starttls; /* 0 */
- int ldap_tls; /* LDAP_OPT_X_TLS_NEVER */
- int ldap_vers; /* LDAP_VERSION3 */
-- time_t cc_before;
--#ifdef USE_LDAP_MAIL_LOOKUP
-- int ldap_is_setup; /* 0 */
- char ldap_host[CNF_BUFFER];
- int ldap_port;
- char ldap_uri[CNF_BUFFER];
-@@ -729,13 +729,13 @@ static int readconfigfile(const char *filename, struct configparams *config)
- }
- maildev[0] = 0;
- config->user_signature = config->user_message = config->group_signature = config->group_message = NULL;
-+ config->cc_before = -1;
-+
-+#ifdef USE_LDAP_MAIL_LOOKUP
- config->use_ldap_mail = 0;
- config->ldap_starttls = 0;
- config->ldap_tls = LDAP_OPT_X_TLS_NEVER;
- config->ldap_vers = LDAP_VERSION3;
-- config->cc_before = -1;
--
--#ifdef USE_LDAP_MAIL_LOOKUP
- config->ldap_port = config->ldap_is_setup = 0;
- config->ldap_host[0] = 0;
- config->ldap_uri[0] = 0;
-@@ -820,6 +820,18 @@ static int readconfigfile(const char *filename, struct configparams *config)
- create_eoln(config->group_signature);
- verify_format(config->group_signature, "GROUP_SIGNATURE");
- }
-+ else if (!strcmp(var, "CC_BEFORE")) {
-+ int num;
-+ char unit[10];
-+
-+ if (sscanf(value, "%d%s", &num, unit) != 2)
-+ goto cc_parse_err;
-+ if (str2timeunits(num, unit, &config->cc_before) < 0) {
-+cc_parse_err:
-+ die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
-+ }
-+ }
-+#ifdef USE_LDAP_MAIL_LOOKUP
- else if (!strcmp(var, "LDAP_MAIL")) {
- if(strcasecmp(value, "true") == 0)
- config->use_ldap_mail = 1;
-@@ -846,18 +858,6 @@ static int readconfigfile(const char *filename, struct configparams *config)
- else
- config->ldap_starttls = 0;
- }
-- else if (!strcmp(var, "CC_BEFORE")) {
-- int num;
-- char unit[10];
--
-- if (sscanf(value, "%d%s", &num, unit) != 2)
-- goto cc_parse_err;
-- if (str2timeunits(num, unit, &config->cc_before) < 0) {
--cc_parse_err:
-- die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
-- }
-- }
--#ifdef USE_LDAP_MAIL_LOOKUP
- else if (!strcmp(var, "LDAP_HOST"))
- sstrncpy(config->ldap_host, value, CNF_BUFFER);
- else if (!strcmp(var, "LDAP_PORT"))
---
-2.4.0
-
diff --git a/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch b/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
deleted file mode 100644
index 6fb2daf532..0000000000
--- a/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From feca6d2e55d992bbe176ee8faa734c105eb1b2e1 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 29 Mar 2016 20:48:05 -0400
-Subject: [PATCH] Use NGROUPS_MAX instead of NGROUPS
-
-NGRROUPS_MAX is what is defined by SuSv3; NGROUPS is not guaranteed by
-any standard, but is just an ancient BSD'ism. Since Android's bionic
-libc has the former but not the latter, let's use NGROUPS_MAX instead.
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- quota.c | 5 +++--
- quotaops.c | 5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/quota.c b/quota.c
-index 049dac4..e195ead 100644
---- a/quota.c
-+++ b/quota.c
-@@ -48,6 +48,7 @@
- #include <errno.h>
- #include <string.h>
- #include <unistd.h>
-+#include <limits.h>
- #ifdef RPC
- #include <rpc/rpc.h>
- #include "rquota.h"
-@@ -296,7 +297,7 @@ static int showquotas(int type, qid_t id, int mntcnt, char **mnt)
- int main(int argc, char **argv)
- {
- int ngroups;
-- gid_t gidset[NGROUPS], *gidsetp;
-+ gid_t gidset[NGROUPS_MAX], *gidsetp;
- int i, ret;
- struct option long_opts[] = {
- { "help", 0, NULL, 'h' },
-@@ -405,7 +406,7 @@ int main(int argc, char **argv)
- ret |= showquotas(USRQUOTA, getuid(), argc, argv);
- if (flags & FL_GROUP) {
- ngroups = sysconf(_SC_NGROUPS_MAX);
-- if (ngroups > NGROUPS) {
-+ if (ngroups > NGROUPS_MAX) {
- gidsetp = malloc(ngroups * sizeof(gid_t));
- if (!gidsetp)
- die(1, _("Gid set allocation (%d): %s\n"), ngroups, strerror(errno));
-diff --git a/quotaops.c b/quotaops.c
-index 136aec3..590dc1b 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -51,6 +51,7 @@
- #include <unistd.h>
- #include <time.h>
- #include <ctype.h>
-+#include <limits.h>
-
- #if defined(RPC)
- #include "rquota.h"
-@@ -97,7 +98,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
- #if defined(BSD_BEHAVIOUR)
- int j, ngroups;
- uid_t euid;
-- gid_t gidset[NGROUPS], *gidsetp;
-+ gid_t gidset[NGROUPS_MAX], *gidsetp;
- #endif
-
- for (i = 0; handles[i]; i++) {
-@@ -115,7 +116,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
- if (geteuid() == 0)
- break;
- ngroups = sysconf(_SC_NGROUPS_MAX);
-- if (ngroups > NGROUPS) {
-+ if (ngroups > NGROUPS_MAX) {
- gidsetp = malloc(ngroups * sizeof(gid_t));
- if (!gidsetp) {
- gid2group(id, name);
---
-2.6.1
-
diff --git a/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch b/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
deleted file mode 100644
index 6cea548edc..0000000000
--- a/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From f30e1ada8326463cc0af048afa058bc2f1dc9370 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 29 Mar 2016 20:48:04 -0400
-Subject: [PATCH] Allow building on systems that do not have rpc header files
-
-Android's bionic C library doesn't have Sun RPC support.
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- Makefile.am | 30 ++++++++++++++++--------------
- quotaops.c | 2 ++
- setquota.c | 2 ++
- 3 files changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 6d7ea0e..82db99f 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,5 @@
- ACLOCAL_AMFLAGS = -I m4
-
--BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
--
- docdir = $(datadir)/doc/@PACKAGE@
- doc_DATA = \
- README.mailserver \
-@@ -12,11 +10,6 @@ doc_DATA = \
- doc/quotas.preformated \
- doc/quotas-1.eps
-
--rpcsvcdir = $(includedir)/rpcsvc
--rpcsvc_DATA = \
-- rquota.h \
-- rquota.x
--
- sysconf_DATA = \
- warnquota.conf \
- quotatab \
-@@ -35,15 +28,12 @@ man_MANS = \
- quota.1 \
- quot.8 \
- repquota.8 \
-- rpc.rquotad.8 \
- rquota.3 \
- setquota.8 \
- warnquota.conf.5 \
- warnquota.8 \
- xqmstats.8
-
--CLEANFILES = rquota.c rquota.h rquota_clnt.c
--
- SUBDIRS = po
-
- EXTRA_DIST = \
-@@ -55,9 +45,15 @@ EXTRA_DIST = \
- Changelog \
- ldap-scripts
-
--noinst_LIBRARIES = \
-- libquota.a \
-- librpcclient.a
-+noinst_LIBRARIES = libquota.a
-+
-+if WITH_RPC
-+rpcsvcdir = $(includedir)/rpcsvc
-+rpcsvc_DATA = \
-+ rquota.h \
-+ rquota.x
-+
-+noinst_LIBRARIES += librpcclient.a
-
- librpcclient_a_SOURCES = \
- rquota.c \
-@@ -67,8 +63,10 @@ librpcclient_a_SOURCES = \
- rquota_clnt.c
- librpcclient_a_CFLAGS = -Wno-unused
-
--if WITH_RPC
- RPCLIBS = librpcclient.a
-+BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
-+CLEANFILES = rquota.c rquota.h rquota_clnt.c
-+man_MANS += rpc.rquotad.8
- endif
-
- libquota_a_SOURCES = \
-@@ -217,6 +215,7 @@ convertquota_LDADD = \
- libquota.a \
- $(RPCLIBS)
-
-+if WITH_RPC
- rpc_rquotad_SOURCES = \
- rquota_server.c \
- rquota_svc.c \
-@@ -225,6 +224,7 @@ rpc_rquotad_LDADD = \
- libquota.a \
- $(WRAP_LIBS) \
- $(RPCLIBS)
-+endif
-
- quota_nld_SOURCES = quota_nld.c
- quota_nld_CFLAGS = \
-@@ -236,6 +236,7 @@ quota_nld_LDADD = \
- $(DBUS_LIBS) \
- $(LIBNL3_LIBS)
-
-+if WITH_RPC
- # ------------------
- # Rpcgen conversions
- # ------------------
-@@ -250,6 +251,7 @@ quota_nld_LDADD = \
- rquota_clnt.c: rquota.x
- @rm -f $@
- @$(RPCGEN) -l -o $@ $<
-+endif
-
- # --------
- # Quotaoff
-diff --git a/quotaops.c b/quotaops.c
-index 47ef9a7..136aec3 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -34,7 +34,9 @@
-
- #include "config.h"
-
-+#if defined(RPC)
- #include <rpc/rpc.h>
-+#endif
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/file.h>
-diff --git a/setquota.c b/setquota.c
-index 51d7b3c..8ecd9c3 100644
---- a/setquota.c
-+++ b/setquota.c
-@@ -7,7 +7,9 @@
-
- #include "config.h"
-
-+#if defined(RPC)
- #include <rpc/rpc.h>
-+#endif
- #include <sys/types.h>
- #include <errno.h>
- #include <stdio.h>
---
-2.6.1
-
diff --git a/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch b/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
deleted file mode 100644
index 1455384129..0000000000
--- a/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From c7a76237e7a51a69d0236ebfc191e462f805cf4e Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Mon, 15 Feb 2016 14:42:14 +0100
-Subject: [PATCH] Don't build rpc.rquotad when --disable-rpc was requested.
-
-This fixes a buch of undefined references:
-
-x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -D_GNU_SOURCE -Wa
-ll -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pie -Wl,-O1 -Wl,--hash-st
-yle=gnu -Wl,--sort-common -Wl,--as-needed -o rpc.rquotad rquota_server.o rquota_
-svc.o svc_socket.o libquota.a
-rquota_svc.o: In function `rquotaprog_2':
-rquota_svc.c:(.text+0x1d3): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x1da): undefined reference to `xdr_ext_setquota_args'
-rquota_svc.c:(.text+0x2b2): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x2b9): undefined reference to `xdr_ext_setquota_args'
-rquota_svc.c:(.text+0x2ff): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x306): undefined reference to `xdr_ext_getquota_args'
-rquota_svc.c:(.text+0x31a): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x321): undefined reference to `xdr_ext_getquota_args'
-rquota_svc.o: In function `rquotaprog_1':
-rquota_svc.c:(.text+0x3f3): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x3fa): undefined reference to `xdr_setquota_args'
-rquota_svc.c:(.text+0x4d2): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x4d9): undefined reference to `xdr_setquota_args'
-rquota_svc.c:(.text+0x51f): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x526): undefined reference to `xdr_getquota_args'
-rquota_svc.c:(.text+0x53a): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x541): undefined reference to `xdr_getquota_args'
-collect2: error: ld returned 1 exit status
-Makefile:901: recipe for target 'rpc.rquotad' failed
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- Makefile.am | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 77f8400..6d7ea0e 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -116,8 +116,11 @@ sbin_PROGRAMS = \
- xqmstats \
- edquota \
- setquota \
-- convertquota \
-+ convertquota
-+if WITH_RPC
-+sbin_PROGRAMS += \
- rpc.rquotad
-+endif
- if WITH_NETLINK
- sbin_PROGRAMS += \
- quota_nld
---
-2.6.1
-
diff --git a/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch b/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
deleted file mode 100644
index bdb4ceaadd..0000000000
--- a/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From c4b56ee58b9b76d2598535cf6109a27b22e60abe Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Wed, 30 Mar 2016 10:21:13 +0200
-Subject: [PATCH] Fix warnings due to missing stdlib.h
-
-When compiling without RPC, we do not get stdlib.h automatically
-included via other includes and thus miss some function definitions.
-Include stdlib.h explicitely.
-
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- quotaops.c | 1 +
- setquota.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/quotaops.c b/quotaops.c
-index 590dc1b..56cf622 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -52,6 +52,7 @@
- #include <time.h>
- #include <ctype.h>
- #include <limits.h>
-+#include <stdlib.h>
-
- #if defined(RPC)
- #include "rquota.h"
-diff --git a/setquota.c b/setquota.c
-index 8ecd9c3..421631e 100644
---- a/setquota.c
-+++ b/setquota.c
-@@ -17,6 +17,7 @@
- #include <getopt.h>
- #include <time.h>
- #include <ctype.h>
-+#include <stdlib.h>
-
- #if defined(RPC)
- #include "rquota.h"
---
-2.6.1
-
diff --git a/meta/recipes-extended/quota/quota/fcntl.patch b/meta/recipes-extended/quota/quota/fcntl.patch
index 2d37971321..51a770ce6e 100644
--- a/meta/recipes-extended/quota/quota/fcntl.patch
+++ b/meta/recipes-extended/quota/quota/fcntl.patch
@@ -9,13 +9,11 @@ Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-ndex: quota-tools/quota.h
-===================================================================
-Index: quota-tools/quota.h
-===================================================================
---- quota-tools.orig/quota.h
-+++ quota-tools/quota.h
-@@ -165,6 +165,6 @@ enum {
+diff --git a/quota.h b/quota.h
+index 4c21411..d20c217 100644
+--- a/quota.h
++++ b/quota.h
+@@ -182,6 +182,6 @@ enum {
#endif
#endif
@@ -23,10 +21,10 @@ Index: quota-tools/quota.h
+long quotactl (int, const char *, qid_t, caddr_t);
#endif /* _QUOTA_ */
-Index: quota-tools/quotacheck.c
-===================================================================
---- quota-tools.orig/quotacheck.c
-+++ quota-tools/quotacheck.c
+diff --git a/quotacheck.c b/quotacheck.c
+index 2cdf475..07c18a7 100644
+--- a/quotacheck.c
++++ b/quotacheck.c
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <stdlib.h>
@@ -35,10 +33,10 @@ Index: quota-tools/quotacheck.c
#include <sys/stat.h>
#include <sys/types.h>
-Index: quota-tools/quotaio.c
-===================================================================
---- quota-tools.orig/quotaio.c
-+++ quota-tools/quotaio.c
+diff --git a/quotaio.c b/quotaio.c
+index 94ae458..d57fc1a 100644
+--- a/quotaio.c
++++ b/quotaio.c
@@ -12,6 +12,7 @@
#include <string.h>
#include <unistd.h>
@@ -47,22 +45,10 @@ Index: quota-tools/quotaio.c
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
-Index: quota-tools/dqblk_v2.h
-===================================================================
---- quota-tools.orig/dqblk_v2.h
-+++ quota-tools/dqblk_v2.h
-@@ -7,6 +7,7 @@
- #ifndef GUARD_DQBLK_V2_H
- #define GUARD_DQBLK_V2_H
-
-+#include <fcntl.h>
- #include <sys/types.h>
- #include "quota_tree.h"
-
-Index: quota-tools/rquota_client.c
-===================================================================
---- quota-tools.orig/rquota_client.c
-+++ quota-tools/rquota_client.c
+diff --git a/rquota_client.c b/rquota_client.c
+index a3a4ae3..0ffe7a9 100644
+--- a/rquota_client.c
++++ b/rquota_client.c
@@ -19,7 +19,9 @@
#include "config.h"
diff --git a/meta/recipes-extended/quota/quota/remove_non_posix_types.patch b/meta/recipes-extended/quota/quota/remove_non_posix_types.patch
deleted file mode 100644
index 06ff13cb98..0000000000
--- a/meta/recipes-extended/quota/quota/remove_non_posix_types.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-Use proper C99 integer types
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: quota-tools/bylabel.c
-===================================================================
---- quota-tools.orig/bylabel.c
-+++ quota-tools/bylabel.c
-@@ -20,6 +20,7 @@
- #include <ctype.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#include <stdint.h>
-
- #include "bylabel.h"
- #include "common.h"
-@@ -37,32 +38,32 @@ static struct uuidCache_s {
-
- #define EXT2_SUPER_MAGIC 0xEF53
- struct ext2_super_block {
-- u_char s_dummy1[56];
-- u_char s_magic[2];
-- u_char s_dummy2[46];
-- u_char s_uuid[16];
-- u_char s_volume_name[16];
-+ uint8_t s_dummy1[56];
-+ uint8_t s_magic[2];
-+ uint8_t s_dummy2[46];
-+ uint8_t s_uuid[16];
-+ uint8_t s_volume_name[16];
- };
-
--#define ext2magic(s) ((uint) s.s_magic[0] + (((uint) s.s_magic[1]) << 8))
-+#define ext2magic(s) ((uint32_t) s.s_magic[0] + (((uint32_t) s.s_magic[1]) << 8))
-
- #define XFS_SUPER_MAGIC "XFSB"
- #define XFS_SUPER_MAGIC2 "BSFX"
- struct xfs_super_block {
-- u_char s_magic[4];
-- u_char s_dummy[28];
-- u_char s_uuid[16];
-- u_char s_dummy2[60];
-- u_char s_fsname[12];
-+ uint8_t s_magic[4];
-+ uint8_t s_dummy[28];
-+ uint8_t s_uuid[16];
-+ uint8_t s_dummy2[60];
-+ uint8_t s_fsname[12];
- };
-
- #define REISER_SUPER_MAGIC "ReIsEr2Fs"
- struct reiserfs_super_block {
-- u_char s_dummy1[52];
-- u_char s_magic[10];
-- u_char s_dummy2[22];
-- u_char s_uuid[16];
-- u_char s_volume_name[16];
-+ uint8_t s_dummy1[52];
-+ uint8_t s_magic[10];
-+ uint8_t s_dummy2[22];
-+ uint8_t s_uuid[16];
-+ uint8_t s_volume_name[16];
- };
-
- static inline unsigned short swapped(unsigned short a)
-@@ -222,7 +223,7 @@ static char *get_spec_by_x(int n, const
- return NULL;
- }
-
--static u_char fromhex(char c)
-+static uint8_t fromhex(char c)
- {
- if (isdigit(c))
- return (c - '0');
-@@ -234,7 +235,7 @@ static u_char fromhex(char c)
-
- static char *get_spec_by_uuid(const char *s)
- {
-- u_char uuid[16];
-+ uint8_t uuid[16];
- int i;
-
- if (strlen(s) != 36 || s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-')
-Index: quota-tools/quot.c
-===================================================================
---- quota-tools.orig/quot.c
-+++ quota-tools/quot.c
-@@ -47,6 +47,7 @@
- #include <utmp.h>
- #include <pwd.h>
- #include <grp.h>
-+#include <stdint.h>
-
- #include "pot.h"
- #include "quot.h"
-@@ -56,8 +57,8 @@
- #include "quotasys.h"
-
- #define TSIZE 500
--static __uint64_t sizes[TSIZE];
--static __uint64_t overflow;
-+static uint64_t sizes[TSIZE];
-+static uint64_t overflow;
-
- static int aflag;
- static int cflag;
-@@ -72,7 +73,7 @@ static time_t now;
- char *progname;
-
- static void mounttable(void);
--static char *idname(__uint32_t, int);
-+static char *idname(uint32_t, int);
- static void report(const char *, const char *, int);
- static void creport(const char *, const char *);
-
-@@ -173,7 +174,7 @@ static int qcmp(du_t * p1, du_t * p2)
- static void creport(const char *file, const char *fsdir)
- {
- int i;
-- __uint64_t t = 0;
-+ uint64_t t = 0;
-
- printf(_("%s (%s):\n"), file, fsdir);
- for (i = 0; i < TSIZE - 1; i++)
-@@ -219,7 +220,7 @@ static void report(const char *file, con
- }
- }
-
--static idcache_t *getnextent(int type, __uint32_t id, int byid)
-+static idcache_t *getnextent(int type, uint32_t id, int byid)
- {
- struct passwd *pw;
- struct group *gr;
-@@ -240,7 +241,7 @@ static idcache_t *getnextent(int type, _
- return &idc;
- }
-
--static char *idname(__uint32_t id, int type)
-+static char *idname(uint32_t id, int type)
- {
- idcache_t *ncp, *idp;
- static idcache_t nc[2][NID];
-@@ -286,8 +287,8 @@ static void acctXFS(xfs_bstat_t *p)
- {
- register du_t *dp;
- du_t **hp;
-- __uint64_t size;
-- __uint32_t i, id;
-+ uint64_t size;
-+ uint32_t i, id;
-
- if ((p->bs_mode & S_IFMT) == 0)
- return;
-Index: quota-tools/quot.h
-===================================================================
---- quota-tools.orig/quot.h
-+++ quota-tools/quot.h
-@@ -35,18 +35,18 @@
- #define SEC24HR (60*60*24) /* seconds per day */
-
- typedef struct {
-- __uint32_t id;
-+ uint32_t id;
- char name[UT_NAMESIZE + 1];
- } idcache_t;
-
- typedef struct du {
- struct du *next;
-- __uint64_t blocks;
-- __uint64_t blocks30;
-- __uint64_t blocks60;
-- __uint64_t blocks90;
-- __uint64_t nfiles;
-- __uint32_t id;
-+ uint64_t blocks;
-+ uint64_t blocks30;
-+ uint64_t blocks60;
-+ uint64_t blocks90;
-+ uint64_t nfiles;
-+ uint32_t id;
- } du_t;
-
- #define NDU 60000
-Index: quota-tools/rquota_server.c
-===================================================================
---- quota-tools.orig/rquota_server.c
-+++ quota-tools/rquota_server.c
-@@ -60,7 +60,7 @@ extern char nfs_pseudoroot[PATH_MAX];
- */
- extern struct authunix_parms *unix_cred;
-
--int in_group(gid_t * gids, u_int len, gid_t gid)
-+int in_group(gid_t * gids, uint32_t len, gid_t gid)
- {
- gid_t *gidsp = gids + len;
-
diff --git a/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch b/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
deleted file mode 100644
index 9ca2ffc0d4..0000000000
--- a/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Replace getrpcbynumber_r with getrpcbynumber
-musl and uclibc dont implement it
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: quota-tools/svc_socket.c
-===================================================================
---- quota-tools.orig/svc_socket.c
-+++ quota-tools/svc_socket.c
-@@ -55,7 +55,8 @@ static int svc_socket (u_long number, in
- addr.sin_family = AF_INET;
-
- if (!port) {
-- ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
-+ rpcp = getrpcbynumber(number);
-+ ret = 0;
- if (ret == 0 && rpcp != NULL) {
- /* First try name */
- ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
diff --git a/meta/recipes-extended/quota/quota_4.03.bb b/meta/recipes-extended/quota/quota_4.03.bb
deleted file mode 100644
index 22aab4147b..0000000000
--- a/meta/recipes-extended/quota/quota_4.03.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
-SECTION = "base"
-HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
-LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
- file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
- file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
- file://0001-Fix-build-with-disabled-ldap.patch \
- file://0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch \
- file://fcntl.patch \
- file://remove_non_posix_types.patch \
- file://0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch \
- file://0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch \
- file://0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch \
- file://0004-Fix-warnings-due-to-missing-stdlib.h.patch \
- "
-SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
-
-SRC_URI[md5sum] = "6b09f9c93515c25a528be5754cdfb6f5"
-SRC_URI[sha256sum] = "9c6c4d9ae7bf30506dd2aa3d8056c4ff2f8d087930d7c721616f5c093bdc674b"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
-UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/"
-
-DEPENDS = "gettext-native e2fsprogs libnl dbus"
-
-inherit autotools-brokensep gettext pkgconfig
-
-CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}"
-LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}"
-ASNEEDED = ""
-
-PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
-PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
-
-PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
-PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
-PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
-PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
diff --git a/meta/recipes-extended/quota/quota_4.05.bb b/meta/recipes-extended/quota/quota_4.05.bb
new file mode 100644
index 0000000000..c5da1e71ed
--- /dev/null
+++ b/meta/recipes-extended/quota/quota_4.05.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
+SECTION = "base"
+HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
+ file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
+ file://fcntl.patch \
+ "
+SRC_URI[md5sum] = "1c1dbd2cd3d680ccac661239b067e147"
+SRC_URI[sha256sum] = "ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9"
+
+CVE_PRODUCT = "linux_diskquota"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
+UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/"
+
+DEPENDS = "gettext-native e2fsprogs libnl dbus"
+
+inherit autotools-brokensep gettext pkgconfig
+
+CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}"
+LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}"
+ASNEEDED = ""
+
+PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
+PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
+
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
+PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
+PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch
deleted file mode 100644
index eeef9f152f..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch
+++ /dev/null
@@ -1,221 +0,0 @@
-From 2a44d862233f2126581e290d568e1c8b8f2eb9f5 Mon Sep 17 00:00:00 2001
-From: Carlo Landmeter <clandmeter@gmail.com>
-Date: Thu, 19 Feb 2015 15:28:45 +0000
-Subject: [PATCH] Avoid use of glibc sys/cdefs.h header
-
-Upstream-Status: Pending
----
- src/check_bound.c | 2 +-
- src/pmap_svc.c | 10 +++++-----
- src/rpcb_svc.c | 10 +++++-----
- src/rpcb_svc_4.c | 14 +++++++-------
- src/rpcb_svc_com.c | 46 +++++++++++++++++++++++-----------------------
- src/rpcbind.c | 12 ++++++------
- src/util.c | 2 +-
- src/warmstart.c | 4 ++--
- 8 files changed, 50 insertions(+), 50 deletions(-)
-
-diff --git a/src/check_bound.c b/src/check_bound.c
-index c70b845..5d21730 100644
---- a/src/check_bound.c
-+++ b/src/check_bound.c
-@@ -70,7 +70,7 @@ static struct fdlist *fdhead; /* Link list of the check fd's */
- static struct fdlist *fdtail;
- static char *nullstring = "";
-
--static bool_t check_bound __P((struct fdlist *, char *uaddr));
-+static bool_t check_bound (struct fdlist *, char *uaddr);
-
- /*
- * Returns 1 if the given address is bound for the given addr & transport
-diff --git a/src/pmap_svc.c b/src/pmap_svc.c
-index ad28b93..9c7d409 100644
---- a/src/pmap_svc.c
-+++ b/src/pmap_svc.c
-@@ -60,11 +60,11 @@ static char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro";
- #include "rpcbind.h"
- #include "xlog.h"
- #include <rpc/svc_soc.h> /* svc_getcaller routine definition */
--static struct pmaplist *find_service_pmap __P((rpcprog_t, rpcvers_t,
-- rpcprot_t));
--static bool_t pmapproc_change __P((struct svc_req *, SVCXPRT *, u_long));
--static bool_t pmapproc_getport __P((struct svc_req *, SVCXPRT *));
--static bool_t pmapproc_dump __P((struct svc_req *, SVCXPRT *));
-+static struct pmaplist *find_service_pmap (rpcprog_t, rpcvers_t,
-+ rpcprot_t);
-+static bool_t pmapproc_change (struct svc_req *, SVCXPRT *, u_long);
-+static bool_t pmapproc_getport (struct svc_req *, SVCXPRT *);
-+static bool_t pmapproc_dump (struct svc_req *, SVCXPRT *);
-
- /*
- * Called for all the version 2 inquiries.
-diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c
-index bd92201..6c7f7fe 100644
---- a/src/rpcb_svc.c
-+++ b/src/rpcb_svc.c
-@@ -53,10 +53,10 @@
- #include "rpcbind.h"
- #include "xlog.h"
-
--static void *rpcbproc_getaddr_3_local __P((void *, struct svc_req *, SVCXPRT *,
-- rpcvers_t));
--static void *rpcbproc_dump_3_local __P((void *, struct svc_req *, SVCXPRT *,
-- rpcvers_t));
-+static void *rpcbproc_getaddr_3_local (void *, struct svc_req *, SVCXPRT *,
-+ rpcvers_t);
-+static void *rpcbproc_dump_3_local (void *, struct svc_req *, SVCXPRT *,
-+ rpcvers_t);
-
- /*
- * Called by svc_getreqset. There is a separate server handle for
-@@ -75,7 +75,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp)
- } argument;
- char *result;
- xdrproc_t xdr_argument, xdr_result;
-- void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
-+ void *(*local) (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
- rpcprog_t setprog = 0;
-
- rpcbs_procinfo(RPCBVERS_3_STAT, rqstp->rq_proc);
-diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c
-index b673452..6764c0a 100644
---- a/src/rpcb_svc_4.c
-+++ b/src/rpcb_svc_4.c
-@@ -54,13 +54,13 @@
- #include "rpcbind.h"
- #include "xlog.h"
-
--static void *rpcbproc_getaddr_4_local __P((void *, struct svc_req *, SVCXPRT *,
-- rpcvers_t));
--static void *rpcbproc_getversaddr_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
-+static void *rpcbproc_getaddr_4_local (void *, struct svc_req *, SVCXPRT *,
-+ rpcvers_t);
-+static void *rpcbproc_getversaddr_4_local (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
- static void *rpcbproc_getaddrlist_4_local
-- __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
--static void free_rpcb_entry_list __P((rpcb_entry_list_ptr *));
--static void *rpcbproc_dump_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
-+ (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
-+static void free_rpcb_entry_list (rpcb_entry_list_ptr *);
-+static void *rpcbproc_dump_4_local (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
-
- /*
- * Called by svc_getreqset. There is a separate server handle for
-@@ -78,7 +78,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp)
- } argument;
- char *result;
- xdrproc_t xdr_argument, xdr_result;
-- void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
-+ void *(*local) (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
- rpcprog_t setprog = 0;
-
- rpcbs_procinfo(RPCBVERS_4_STAT, rqstp->rq_proc);
-diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
-index ff9ce6b..8aef9e5 100644
---- a/src/rpcb_svc_com.c
-+++ b/src/rpcb_svc_com.c
-@@ -100,29 +100,29 @@ struct finfo {
- static struct finfo FINFO[NFORWARD];
-
-
--static bool_t xdr_encap_parms __P((XDR *, struct encap_parms *));
--static bool_t xdr_rmtcall_args __P((XDR *, struct r_rmtcall_args *));
--static bool_t xdr_rmtcall_result __P((XDR *, struct r_rmtcall_args *));
--static bool_t xdr_opaque_parms __P((XDR *, struct r_rmtcall_args *));
--static int find_rmtcallfd_by_netid __P((char *));
--static SVCXPRT *find_rmtcallxprt_by_fd __P((int));
--static int forward_register __P((u_int32_t, struct netbuf *, int, char *,
-- rpcproc_t, rpcvers_t, u_int32_t *));
--static struct finfo *forward_find __P((u_int32_t));
--static int free_slot_by_xid __P((u_int32_t));
--static int free_slot_by_index __P((int));
--static int netbufcmp __P((struct netbuf *, struct netbuf *));
--static struct netbuf *netbufdup __P((struct netbuf *));
--static void netbuffree __P((struct netbuf *));
--static int check_rmtcalls __P((struct pollfd *, int));
--static void xprt_set_caller __P((SVCXPRT *, struct finfo *));
--static void send_svcsyserr __P((SVCXPRT *, struct finfo *));
--static void handle_reply __P((int, SVCXPRT *));
--static void find_versions __P((rpcprog_t, char *, rpcvers_t *, rpcvers_t *));
--static rpcblist_ptr find_service __P((rpcprog_t, rpcvers_t, char *));
--static char *getowner __P((SVCXPRT *, char *, size_t));
--static int add_pmaplist __P((RPCB *));
--static int del_pmaplist __P((RPCB *));
-+static bool_t xdr_encap_parms (XDR *, struct encap_parms *);
-+static bool_t xdr_rmtcall_args (XDR *, struct r_rmtcall_args *);
-+static bool_t xdr_rmtcall_result (XDR *, struct r_rmtcall_args *);
-+static bool_t xdr_opaque_parms (XDR *, struct r_rmtcall_args *);
-+static int find_rmtcallfd_by_netid (char *);
-+static SVCXPRT *find_rmtcallxprt_by_fd (int);
-+static int forward_register (u_int32_t, struct netbuf *, int, char *,
-+ rpcproc_t, rpcvers_t, u_int32_t *);
-+static struct finfo *forward_find (u_int32_t);
-+static int free_slot_by_xid (u_int32_t);
-+static int free_slot_by_index (int);
-+static int netbufcmp (struct netbuf *, struct netbuf *);
-+static struct netbuf *netbufdup (struct netbuf *);
-+static void netbuffree (struct netbuf *);
-+static int check_rmtcalls (struct pollfd *, int);
-+static void xprt_set_caller (SVCXPRT *, struct finfo *);
-+static void send_svcsyserr (SVCXPRT *, struct finfo *);
-+static void handle_reply (int, SVCXPRT *);
-+static void find_versions (rpcprog_t, char *, rpcvers_t *, rpcvers_t *);
-+static rpcblist_ptr find_service (rpcprog_t, rpcvers_t, char *);
-+static char *getowner (SVCXPRT *, char *, size_t);
-+static int add_pmaplist (RPCB *);
-+static int del_pmaplist (RPCB *);
-
- /*
- * Set a mapping of program, version, netid
-diff --git a/src/rpcbind.c b/src/rpcbind.c
-index 045daa1..137011b 100644
---- a/src/rpcbind.c
-+++ b/src/rpcbind.c
-@@ -135,13 +135,13 @@ char *tcp_uaddr; /* Universal TCP address */
- static char servname[] = "rpcbind";
- static char superuser[] = "superuser";
-
--int main __P((int, char *[]));
-+int main (int, char *[]);
-
--static int init_transport __P((struct netconfig *));
--static void rbllist_add __P((rpcprog_t, rpcvers_t, struct netconfig *,
-- struct netbuf *));
--static void terminate __P((int));
--static void parseargs __P((int, char *[]));
-+static int init_transport (struct netconfig *);
-+static void rbllist_add (rpcprog_t, rpcvers_t, struct netconfig *,
-+ struct netbuf *);
-+static void terminate (int);
-+static void parseargs (int, char *[]);
-
- int
- main(int argc, char *argv[])
-diff --git a/src/util.c b/src/util.c
-index a6c835b..33b9e4f 100644
---- a/src/util.c
-+++ b/src/util.c
-@@ -70,7 +70,7 @@ static struct sockaddr_in *local_in4;
- static struct sockaddr_in6 *local_in6;
- #endif
-
--static int bitmaskcmp __P((void *, void *, void *, int));
-+static int bitmaskcmp (void *, void *, void *, int);
-
- /*
- * For all bits set in "mask", compare the corresponding bits in
-diff --git a/src/warmstart.c b/src/warmstart.c
-index b6eb73e..42dd3af 100644
---- a/src/warmstart.c
-+++ b/src/warmstart.c
-@@ -58,8 +58,8 @@
- #define PMAPFILE RPCBIND_STATEDIR "/portmap.xdr"
- #endif
-
--static bool_t write_struct __P((char *, xdrproc_t, void *));
--static bool_t read_struct __P((char *, xdrproc_t, void *));
-+static bool_t write_struct (char *, xdrproc_t, void *);
-+static bool_t read_struct (char *, xdrproc_t, void *);
-
- static bool_t
- write_struct(char *filename, xdrproc_t structproc, void *list)
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
deleted file mode 100644
index 16b763ef0d..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 9194122389f2a56b1cd1f935e64307e2e963c2da Mon Sep 17 00:00:00 2001
-From: Steve Dickson <steved@redhat.com>
-Date: Mon, 2 Nov 2015 17:05:18 -0500
-Subject: [PATCH] handle_reply: Don't use the xp_auth pointer directly
-
-In the latest libtirpc version to access the xp_auth
-one must use the SVC_XP_AUTH macro. To be backwards
-compatible a couple ifdefs were added to use the
-macro when it exists.
-
-Upstream-Status: Backport
-
-Signed-off-by: Steve Dickson <steved@redhat.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- src/rpcb_svc_com.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
-index 4ae93f1..22d6c84 100644
---- a/src/rpcb_svc_com.c
-+++ b/src/rpcb_svc_com.c
-@@ -1295,10 +1295,17 @@ handle_reply(int fd, SVCXPRT *xprt)
- a.rmt_localvers = fi->versnum;
-
- xprt_set_caller(xprt, fi);
-+#if defined(SVC_XP_AUTH)
-+ SVC_XP_AUTH(xprt) = svc_auth_none;
-+#else
- xprt->xp_auth = &svc_auth_none;
-+#endif
- svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
-+#if !defined(SVC_XP_AUTH)
- SVCAUTH_DESTROY(xprt->xp_auth);
- xprt->xp_auth = NULL;
-+#endif
-+
- done:
- if (buffer)
- free(buffer);
---
-2.4.0
-
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch
new file mode 100644
index 0000000000..b92f2cf7b1
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch
@@ -0,0 +1,42 @@
+From da528d5d60137f13202102b53cf178aba45849a5 Mon Sep 17 00:00:00 2001
+From: Stefan Agner <stefan.agner@toradex.com>
+Date: Sun, 6 Oct 2019 00:05:54 +0200
+Subject: [PATCH] systemd: use EnvironmentFile
+
+Use OE specific environment file.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
+---
+ configure.ac | 2 ++
+ systemd/rpcbind.service.in | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2dd9471..47a46c0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -69,5 +69,7 @@ AC_CHECK_HEADERS([nss.h rpcsvc/mount.h])
+ # 2 "evals" needed to expand variable names
+ AC_SUBST([_sbindir])
+ AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir])
++AC_SUBST([_sysconfdir])
++AC_CONFIG_COMMANDS_PRE([eval eval _sysconfdir=$sbindir])
+
+ AC_OUTPUT([Makefile systemd/rpcbind.service])
+diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
+index 7b1c74b..f45ee1e 100644
+--- a/systemd/rpcbind.service.in
++++ b/systemd/rpcbind.service.in
+@@ -11,7 +11,7 @@ Wants=rpcbind.target
+
+ [Service]
+ Type=notify
+-# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
++EnvironmentFile=-@_sysconfdir@/rpcbind.conf
+ ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f
+
+ [Install]
+--
+2.23.0
+
diff --git a/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch b/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch
deleted file mode 100644
index 741a99035c..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-commit 06f7ebb1dade2f0dbf872ea2bedf17cff4734bdd
-Author: Olaf Kirch <okir@...e.de>
-Date: Thu Aug 6 16:27:20 2015 +0200
-
- Fix memory corruption in PMAP_CALLIT code
-
- - A PMAP_CALLIT call comes in on IPv4 UDP
- - rpcbind duplicates the caller's address to a netbuf and stores it in
- FINFO[0].caller_addr. caller_addr->buf now points to a memory region A
- with a size of 16 bytes
- - rpcbind forwards the call to the local service, receives a reply
- - when processing the reply, it does this in xprt_set_caller:
- xprt->xp_rtaddr = *FINFO[0].caller_addr
- It sends out the reply, and then frees the netbuf caller_addr and
- caller_addr.buf.
- However, it does not clear xp_rtaddr, so xp_rtaddr.buf now refers
- to memory region A, which is free.
- - When the next call comes in on the UDP/IPv4 socket, svc_dg_recv will
- be called, which will set xp_rtaddr to the client's address.
- It will reuse the buffer inside xp_rtaddr, ie it will write a
- sockaddr_in to region A
-
- Some time down the road, an incoming TCP connection is accepted,
- allocating a fresh SVCXPRT. The memory region A is inside the
- new SVCXPRT
-
- - While processing the TCP call, another UDP call comes in, again
- overwriting region A with the client's address
- - TCP client closes connection. In svc_destroy, we now trip over
- the garbage left in region A
-
- We ran into the case where a commercial scanner was triggering
- occasional rpcbind segfaults. The core file that was captured showed
- a corrupted xprt->xp_netid pointer that was really a sockaddr_in.
-
- Signed-off-by: Olaf Kirch <okir@...e.de>
-
- Upstream-Status: Backport
- CVE: CVE-2015-7236
-
- Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- src/rpcb_svc_com.c | 23 ++++++++++++++++++++++-
- 1 file changed, 22 insertions(+), 1 deletion(-)
-
-Index: rpcbind-0.1.6+git20080930/src/rpcb_svc_com.c
-===================================================================
---- rpcbind-0.1.6+git20080930.orig/src/rpcb_svc_com.c
-+++ rpcbind-0.1.6+git20080930/src/rpcb_svc_com.c
-@@ -1298,12 +1298,33 @@ check_rmtcalls(struct pollfd *pfds, int
- return (ncallbacks_found);
- }
-
-+/*
-+ * This is really a helper function defined in libtirpc, but unfortunately, it hasn't
-+ * been exported yet.
-+ */
-+static struct netbuf *
-+__rpc_set_netbuf(struct netbuf *nb, const void *ptr, size_t len)
-+{
-+ if (nb->len != len) {
-+ if (nb->len)
-+ mem_free(nb->buf, nb->len);
-+ nb->buf = mem_alloc(len);
-+ if (nb->buf == NULL)
-+ return NULL;
-+
-+ nb->maxlen = nb->len = len;
-+ }
-+ memcpy(nb->buf, ptr, len);
-+ return nb;
-+}
-+
- static void
- xprt_set_caller(SVCXPRT *xprt, struct finfo *fi)
- {
-+ const struct netbuf *caller = fi->caller_addr;
- u_int32_t *xidp;
-
-- *(svc_getrpccaller(xprt)) = *(fi->caller_addr);
-+ __rpc_set_netbuf(svc_getrpccaller(xprt), caller->buf, caller->len);
- xidp = __rpcb_get_dg_xidp(xprt);
- *xidp = fi->caller_xid;
- }
diff --git a/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch b/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
deleted file mode 100644
index 6fbc6364cb..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-The musl implementation of getaddrinfo and getservbyname does not
-aliases. As a workaround we use "sunprc" instead of "portmapper"
-
-ported from alpine linux
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: rpcbind-0.2.2/src/rpcbind.c
-===================================================================
---- rpcbind-0.2.2.orig/src/rpcbind.c
-+++ rpcbind-0.2.2/src/rpcbind.c
-@@ -491,7 +491,7 @@ init_transport(struct netconfig *nconf)
- if ((aicode = getaddrinfo(hosts[nhostsbak],
- servname, &hints, &res)) != 0) {
- if ((aicode = getaddrinfo(hosts[nhostsbak],
-- "portmapper", &hints, &res)) != 0) {
-+ "sunrpc", &hints, &res)) != 0) {
- syslog(LOG_ERR,
- "cannot get local address for %s: %s",
- nconf->nc_netid, gai_strerror(aicode));
-@@ -564,7 +564,7 @@ init_transport(struct netconfig *nconf)
- if ((strcmp(nconf->nc_netid, "local") != 0) &&
- (strcmp(nconf->nc_netid, "unix") != 0)) {
- if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) {
-- if ((aicode = getaddrinfo(NULL, "portmapper", &hints, &res))!= 0) {
-+ if ((aicode = getaddrinfo(NULL, "sunrpc", &hints, &res))!= 0) {
- printf("cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode));
- syslog(LOG_ERR,
- "cannot get local address for %s: %s",
diff --git a/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch b/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch
deleted file mode 100644
index 84fc974fdf..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-musl does not provide this header and here is reasoning
-http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_sys.2Fqueue.h_not_included_.3F
-
-So include it only when __GLIBC__ is defined which is true for uclibc and glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: rpcbind-0.2.2/src/util.c
-===================================================================
---- rpcbind-0.2.2.orig/src/util.c
-+++ rpcbind-0.2.2/src/util.c
-@@ -41,7 +41,9 @@
-
- #include <sys/types.h>
- #include <sys/socket.h>
-+#ifdef __GLIBC__
- #include <sys/queue.h>
-+#endif
- #include <net/if.h>
- #include <netinet/in.h>
- #include <ifaddrs.h>
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
index 2a4dfbcfbc..f423ac1788 100644
--- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
@@ -1,3 +1,3 @@
# Optional arguments passed to rpcbind.
#
-RPCBIND_OPTS=""
+RPCBIND_OPTIONS=""
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
deleted file mode 100644
index 9cdade4959..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=RPC Bind Service
-Requires=rpcbind.socket
-
-[Service]
-Type=forking
-EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
-ExecStart=@SBINDIR@/rpcbind $RPCBIND_OPTS
-SuccessExitStatus=2
-
-[Install]
-Also=rpcbind.socket
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
deleted file mode 100644
index d63c1d9720..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=RPCbind Server Activation Socket
-
-[Socket]
-ListenStream=/var/run/rpcbind.sock
-
-[Install]
-WantedBy=sockets.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch b/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch
new file mode 100644
index 0000000000..434b6b1c4c
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch
@@ -0,0 +1,130 @@
+From 76f8598fd20727908e760cbb497dd6a17eda4af5 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Wed, 17 Sep 2014 13:22:14 +0800
+Subject: [PATCH] add option to make users able to use fixed port number
+
+Upstream-Status: Submitted [https://sourceforge.net/p/rpcbind/discussion/716839/thread/32af721d/]
+
+Signed-off-by: Li Wang <li.wang@windriver.com>
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ man/rpcbind.8 | 4 +++-
+ src/rpcb_svc_com.c | 17 +++++++++++++++++
+ src/rpcbind.c | 8 ++++++--
+ 3 files changed, 26 insertions(+), 3 deletions(-)
+
+diff --git a/man/rpcbind.8 b/man/rpcbind.8
+index af6200f..2e6146b 100644
+--- a/man/rpcbind.8
++++ b/man/rpcbind.8
+@@ -11,7 +11,7 @@
+ .Nd universal addresses to RPC program number mapper
+ .Sh SYNOPSIS
+ .Nm
+-.Op Fl adhiLls
++.Op Fl adhpiLls
+ .Sh DESCRIPTION
+ The
+ .Nm
+@@ -107,6 +107,8 @@ will automatically add
+ and if IPv6 is enabled,
+ .Li ::1
+ to the list.
++.It Fl p
++Bind for fixed UDP port number
+ .It Fl i
+ .Dq Insecure
+ mode.
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 8aef9e5..c2632a4 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -48,6 +48,7 @@
+ #include <rpc/rpc.h>
+ #include <rpc/rpcb_prot.h>
+ #include <rpc/svc_dg.h>
++#include <rpc/rpc_com.h>
+ #include <netconfig.h>
+ #include <errno.h>
+ #include <syslog.h>
+@@ -497,6 +498,7 @@ xdr_opaque_parms(XDR *xdrs, struct r_rmtcall_args *cap)
+
+ static struct rmtcallfd_list *rmthead;
+ static struct rmtcallfd_list *rmttail;
++extern unsigned short fixed_port;
+
+ int
+ create_rmtcall_fd(struct netconfig *nconf)
+@@ -504,6 +506,8 @@ create_rmtcall_fd(struct netconfig *nconf)
+ int fd;
+ struct rmtcallfd_list *rmt;
+ SVCXPRT *xprt;
++ struct __rpc_sockinfo si;
++ struct t_bind taddr;
+
+ if ((fd = __rpc_nconf2fd(nconf)) == -1) {
+ if (debugging)
+@@ -512,6 +516,19 @@ create_rmtcall_fd(struct netconfig *nconf)
+ nconf->nc_device, errno);
+ return (-1);
+ }
++
++ if (fixed_port) {
++ __rpc_fd2sockinfo(fd, &si);
++ memset(&taddr, 0, sizeof(taddr));
++ taddr.addr.maxlen = taddr.addr.len = si.si_alen;
++ taddr.addr.buf = malloc(si.si_alen);
++ if (taddr.addr.buf == NULL) {
++ return -1;
++ }
++ *(unsigned short *)(&(taddr.addr.buf[0])) = si.si_af;
++ *(unsigned short *)(&(taddr.addr.buf[2])) = htons(fixed_port);
++ xprt = svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE);
++ } else
+ xprt = svc_tli_create(fd, 0, (struct t_bind *) 0, 0, 0);
+ if (xprt == NULL) {
+ if (debugging)
+diff --git a/src/rpcbind.c b/src/rpcbind.c
+index 137011b..dc3d2d6 100644
+--- a/src/rpcbind.c
++++ b/src/rpcbind.c
+@@ -111,6 +111,7 @@ int runasdaemon = 0;
+ int insecure = 0;
+ int oldstyle_local = 0;
+ int verboselog = 0;
++unsigned short fixed_port = 0;
+
+ char **hosts = NULL;
+ int nhosts = 0;
+@@ -869,7 +870,7 @@ parseargs(int argc, char *argv[])
+ {
+ int c;
+ oldstyle_local = 1;
+- while ((c = getopt(argc, argv, "adh:ilswf")) != -1) {
++ while ((c = getopt(argc, argv, "adh:p:ilswf")) != -1) {
+ switch (c) {
+ case 'a':
+ doabort = 1; /* when debugging, do an abort on */
+@@ -887,6 +888,9 @@ parseargs(int argc, char *argv[])
+ if (hosts[nhosts - 1] == NULL)
+ errx(1, "Out of memory");
+ break;
++ case 'p':
++ fixed_port = atoi(optarg);
++ break;
+ case 'i':
+ insecure = 1;
+ break;
+@@ -905,7 +909,7 @@ parseargs(int argc, char *argv[])
+ break;
+ #endif
+ default: /* error */
+- fprintf(stderr, "usage: rpcbind [-adhilswf]\n");
++ fprintf(stderr, "usage: rpcbind [-adhpilswf]\n");
+ exit (1);
+ }
+ }
+--
+1.9.1
+
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
deleted file mode 100644
index c19a1976a1..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
+++ /dev/null
@@ -1,73 +0,0 @@
-SUMMARY = "Universal Addresses to RPC Program Number Mapper"
-DESCRIPTION = "The rpcbind utility is a server that converts RPC \
- program numbers into universal addresses."
-SECTION = "console/network"
-HOMEPAGE = "http://sourceforge.net/projects/rpcbind/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751"
-DEPENDS = "libtirpc quota"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
- file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
- file://init.d \
- file://0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch \
- file://remove-sys-queue.patch \
- file://0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch \
- ${UCLIBCPATCHES} \
- ${MUSLPATCHES} \
- file://rpcbind.conf \
- file://rpcbind.socket \
- file://rpcbind.service \
- file://cve-2015-7236.patch \
- "
-MUSLPATCHES_libc-musl = "file://musl-sunrpc.patch"
-
-UCLIBCPATCHES ?= ""
-MUSLPATCHES ?= ""
-
-SRC_URI[md5sum] = "c8875246b2688a1adfbd6ad43480278d"
-SRC_URI[sha256sum] = "9897823a9d820ea011d9ea02054d5ab99469b9ca5346265fee380713c8fed27b"
-
-inherit autotools update-rc.d systemd pkgconfig
-
-PACKAGECONFIG ??= "tcp-wrappers"
-PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
-
-INITSCRIPT_NAME = "rpcbind"
-INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
-
-SYSTEMD_SERVICE_${PN} = "rpcbind.service"
-
-inherit useradd
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \
- --shell /bin/false --user-group rpc"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
-PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \
- --without-systemdsystemunitdir, \
- systemd \
-"
-
-EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc"
-
-do_install_append () {
- mv ${D}${bindir} ${D}${sbindir}
-
- install -d ${D}${sysconfdir}/init.d
- sed -e 's,/etc/,${sysconfdir}/,g' \
- -e 's,/sbin/,${sbindir}/,g' \
- ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
- chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
-
- install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- ${D}${systemd_unitdir}/system/rpcbind.service
-}
diff --git a/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb b/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb
new file mode 100644
index 0000000000..aff00e56e6
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Universal Addresses to RPC Program Number Mapper"
+DESCRIPTION = "The rpcbind utility is a server that converts RPC \
+ program numbers into universal addresses."
+SECTION = "console/network"
+HOMEPAGE = "http://sourceforge.net/projects/rpcbind/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751"
+DEPENDS = "libtirpc quota"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
+ file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
+ file://init.d \
+ file://rpcbind.conf \
+ file://rpcbind_add_option_to_fix_port_number.patch \
+ file://0001-systemd-use-EnvironmentFile.patch \
+ "
+SRC_URI[md5sum] = "ed46f09b9c0fa2d49015f6431bc5ea7b"
+SRC_URI[sha256sum] = "2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a"
+
+inherit autotools update-rc.d systemd pkgconfig
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+
+INITSCRIPT_NAME = "rpcbind"
+INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
+
+SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \
+ --shell /bin/false --user-group rpc"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \
+ --without-systemdsystemunitdir, \
+ systemd \
+"
+
+EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/init.d
+ sed -e 's,/etc/,${sysconfdir}/,g' \
+ -e 's,/sbin/,${sbindir}/,g' \
+ ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
+ chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
+}
diff --git a/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb
new file mode 100644
index 0000000000..cb5b288c48
--- /dev/null
+++ b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb
@@ -0,0 +1,37 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "rpcsvc protocol definitions from glibc"
+
+DESCRIPTION = "This package contains rpcsvc proto.x files from glibc, which are\
+missing in libtirpc. Additional it contains rpcgen, which is needed\
+to create header files and sources from protocol files.\
+This package is only needed, if glibc is installed without the\
+deprecated sunrpc functionality and libtirpc should replace it."
+
+HOMEPAGE = "https://github.com/thkukuk/rpcsvc-proto"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0daaf958d5531ab86169ec6e275e1517"
+SECTION = "libs"
+DEPENDS += "rpcsvc-proto-native"
+
+PV = "1.4+git${SRCPV}"
+
+SRCREV = "9bc3b5b785723cfff459b0c01b39d87d4bed975c"
+
+SRC_URI = "git://github.com/thkukuk/${BPN} \
+ file://0001-Use-cross-compiled-rpcgen.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OEMAKE_class-native = " -C rpcgen"
+
+do_install_append() {
+ # They come from quota recipe
+ rm -rf ${D}${includedir}/rpcsvc/rquota.[hx]
+}
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch
new file mode 100644
index 0000000000..208974004b
--- /dev/null
+++ b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch
@@ -0,0 +1,23 @@
+From de9345207beb71e4d5b6b40b52cac4ebd2e3858c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 27 Apr 2018 23:23:20 -0700
+Subject: [PATCH] Use cross compiled rpcgen
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ rpcsvc/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/rpcsvc/Makefile.am
+===================================================================
+--- git.orig/rpcsvc/Makefile.am
++++ git/rpcsvc/Makefile.am
+@@ -12,5 +12,5 @@ nodist_rpcsvc_HEADERS = klm_prot.h nlm_p
+ nfs_prot.h rquota.h sm_inter.h
+
+ %.h: %.x
+- $(top_builddir)/rpcgen/rpcgen -h -o $@ $<
++ rpcgen -h -o $@ $<
+
diff --git a/meta/recipes-extended/screen/screen/0001-Remove-more-compatibility-stuff.patch b/meta/recipes-extended/screen/screen/0001-Remove-more-compatibility-stuff.patch
new file mode 100644
index 0000000000..1413724d07
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/0001-Remove-more-compatibility-stuff.patch
@@ -0,0 +1,31 @@
+This fixes
+../screen-4.6.2/pty.c: In function 'OpenPTY':
+../screen-4.6.2/pty.c:328:7: warning: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration]
+ if (openpty(&f, &s, TtyName, NULL, NULL) != 0)
+ ^~~~~~~
+
+Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Upstream-Status: Backport
+
+---
+ pty.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/pty.c b/pty.c
+index 1c0660e..502338f 100644
+--- a/pty.c
++++ b/pty.c
+@@ -47,11 +47,7 @@
+ # include <sys/ttold.h>
+ #endif
+
+-#ifdef ISC
+-# include <sys/tty.h>
+-# include <sys/sioctl.h>
+-# include <sys/pty.h>
+-#endif
++#include <pty.h>
+
+ #ifdef sgi
+ # include <sys/sysmacros.h>
diff --git a/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch b/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
index b5d71cc1b4..a01dc24751 100644
--- a/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
+++ b/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
@@ -15,19 +15,16 @@ Subject: [PATCH] comm.h now depends on term.h
src/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/src/Makefile.in b/src/Makefile.in
-index e791e79..d4f7c0b 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -113,7 +113,7 @@ term.h: term.c term.sh
-
- kmapdef.c: term.h
+Index: screen-4.6.1/Makefile.in
+===================================================================
+--- screen-4.6.1.orig/Makefile.in
++++ screen-4.6.1/Makefile.in
+@@ -133,7 +133,7 @@ kmapdef.c: term.h
+ tty.c: tty.sh
+ sh $(srcdir)/tty.sh tty.c
-comm.h: comm.c comm.sh config.h
+comm.h: comm.c comm.sh config.h term.h
AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh
- docs:
---
-2.4.1
-
+ osdef.h: osdef.sh config.h osdef.h.in
diff --git a/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch b/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch
deleted file mode 100644
index e184aa1f31..0000000000
--- a/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 79afb676904653403145fda9e1a6a9d3ea1cb22a Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 7 Aug 2015 11:10:32 +0300
-Subject: [PATCH 4/4] Avoid mis-identifying systems as SVR4
-
-Linux can be misdetected as SVR4 because it has
-libelf installed. This leads to linking with libelf, even though no
-symbols from that library were actually used, and to a workaround for
-a buggy getlogin() being enabled.
-
-It is not documented which exact SVR4 system had the bug that the
-workaround was added for, so all I could do is make an educated guess
-at the #defines its compiler would be likely to set.
-
-Modified from patch by Maarten ter Huurne.
-
-Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index dc928ae..65439ce 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -179,14 +179,24 @@ AC_EGREP_CPP(yes,
- #endif
- ], LIBS="$LIBS -lsocket -linet";seqptx=1)
-
-+AC_CHECKING(SVR4)
-+AC_EGREP_CPP(yes,
-+[main () {
-+#if defined(SVR4) || defined(__SVR4)
-+ yes;
-+#endif
-+], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
-+if test -n "$svr4" ; then
- oldlibs="$LIBS"
- LIBS="$LIBS -lelf"
- AC_CHECKING(SVR4)
- AC_TRY_LINK([#include <utmpx.h>
- ],,
--[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
--[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
-+[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
-+[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
- ,LIBS="$oldlibs")
-+fi
-+
- AC_CHECK_HEADERS([stropts.h string.h strings.h])
-
- AC_CHECKING(for Solaris 2.x)
---
-2.1.4
-
diff --git a/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch b/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch
deleted file mode 100644
index 248bf087e2..0000000000
--- a/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From cd0f7f10a3fffbc60fe55eb200474d13fe1da65b Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 7 Aug 2015 10:34:29 +0300
-Subject: [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN
-
-Modified from patch by Maarten ter Huurne.
-
-Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 32 ++++++++++++++++++++------------
- 1 file changed, 20 insertions(+), 12 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 27690a6..ce89f56 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -348,7 +348,8 @@ main()
- exit(0);
- }
- ], AC_NOTE(- your fifos are usable) fifo=1,
--AC_NOTE(- your fifos are not usable))
-+AC_NOTE(- your fifos are not usable),
-+AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
- rm -f /tmp/conftest*
-
- if test -n "$fifo"; then
-@@ -396,7 +397,8 @@ main()
- exit(0);
- }
- ], AC_NOTE(- your implementation is ok),
--AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
-+AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
-+AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
- rm -f /tmp/conftest*
- fi
-
-@@ -458,7 +460,8 @@ main()
- exit(0);
- }
- ], AC_NOTE(- your sockets are usable) sock=1,
--AC_NOTE(- your sockets are not usable))
-+AC_NOTE(- your sockets are not usable),
-+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
- rm -f /tmp/conftest*
-
- if test -n "$sock"; then
-@@ -497,7 +500,8 @@ main()
- }
- ],AC_NOTE(- you are normal),
- AC_NOTE(- unix domain sockets are not kept in the filesystem)
--AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
-+AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
-+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
- rm -f /tmp/conftest*
- fi
-
-@@ -624,7 +628,8 @@ main()
- exit(0);
- }
- ],AC_NOTE(- select is ok),
--AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
-+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
-+AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
-
- dnl
- dnl **** termcap or terminfo ****
-@@ -666,7 +671,8 @@ main()
- {
- exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
- }], AC_NOTE(- you use the termcap database),
--AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
-+AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
-+AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
- AC_CHECKING(ospeed)
- AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
-
-@@ -801,7 +807,8 @@ main()
- else
- AC_NOTE(- can't determine - assume ptys are world accessable)
- fi
-- ]
-+ ],
-+ AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
- )
- rm -f conftest_grp
- fi
-@@ -885,7 +892,7 @@ AC_EGREP_CPP(yes,
- #endif
- ], load=1)
- fi
--if test -z "$load" ; then
-+if test -z "$load" && test "$cross_compiling" = no ; then
- AC_CHECKING(for kernelfile)
- for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
- if test -f $core || test -c $core; then
-@@ -1078,7 +1085,7 @@ main()
- #endif
- exit(0);
- }
--],,AC_DEFINE(SYSVSIGS))
-+],,AC_DEFINE(SYSVSIGS),:)
-
- fi
-
-@@ -1158,7 +1165,7 @@ main() {
- if (strncmp(buf, "cdedef", 6))
- exit(1);
- exit(0); /* libc version works properly. */
--}], AC_DEFINE(USEBCOPY))
-+}], AC_DEFINE(USEBCOPY),,:)
-
- AC_TRY_RUN([
- #define bcopy(s,d,l) memmove(d,s,l)
-@@ -1173,7 +1180,8 @@ main() {
- if (strncmp(buf, "cdedef", 6))
- exit(1);
- exit(0); /* libc version works properly. */
--}], AC_DEFINE(USEMEMMOVE))
-+}], AC_DEFINE(USEMEMMOVE),,
-+ AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
-
-
- AC_TRY_RUN([
-@@ -1189,7 +1197,7 @@ main() {
- if (strncmp(buf, "cdedef", 6))
- exit(1);
- exit(0); /* libc version works properly. */
--}], AC_DEFINE(USEMEMCPY))
-+}], AC_DEFINE(USEMEMCPY),,:)
-
- AC_SYS_LONG_FILE_NAMES
-
---
-2.1.4
-
diff --git a/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch b/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch
deleted file mode 100644
index cc62c12e05..0000000000
--- a/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 73b726c25f94c1b15514ed9249b927afdfbbfb94 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 7 Aug 2015 10:30:40 +0300
-Subject: [PATCH 1/4] Remove redundant compiler sanity checks
-
-AC_PROG_CC already performs sanity checks. And unlike the removed
-checks, it does so in a way that supports cross compilation.
-
-Modified from patch by Maarten ter Huurne.
-
-Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 27 ---------------------------
- 1 file changed, 27 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index ffe2e37..27690a6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL
- AC_ISC_POSIX
- AC_USE_SYSTEM_EXTENSIONS
-
--AC_TRY_RUN(main(){exit(0);},,[
--if test $CC != cc ; then
--AC_NOTE(Your $CC failed - restarting with CC=cc)
--AC_NOTE()
--CC=cc
--export CC
--exec $0 $configure_args
--fi
--])
--
--AC_TRY_RUN(main(){exit(0);},,
--exec 5>&2
--eval $ac_link
--AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
--AC_NOTE($ac_compile)
--AC_MSG_ERROR(Can't run the compiler - sorry))
--
--AC_TRY_RUN([
--main()
--{
-- int __something_strange_();
-- __something_strange_(0);
--}
--],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
--
- AC_PROG_AWK
-
- AC_PROG_INSTALL
-@@ -1300,8 +1275,6 @@ fi
- dnl Ptx bug workaround -- insert -lc after -ltermcap
- test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
-
--AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
--
- ETCSCREENRC=
- AC_MSG_CHECKING(for the global screenrc file)
- AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ])
---
-2.1.4
-
diff --git a/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch b/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch
deleted file mode 100644
index d7e55a4451..0000000000
--- a/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From d0b20e4cacc60ad62a2150ce07388cb5a25c2040 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 7 Aug 2015 11:09:01 +0300
-Subject: [PATCH 3/4] Skip host file system checks when cross-compiling
-
-Modified from patch by Maarten ter Huurne.
-
-Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 23 +++++++++++++++++++----
- 1 file changed, 19 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index ce89f56..dc928ae 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
- dnl
- dnl **** special unix variants ****
- dnl
--if test -n "$ISC"; then
-+if test "$cross_compiling" = no && test -n "$ISC" ; then
- AC_DEFINE(ISC) LIBS="$LIBS -linet"
- fi
-
-@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again....
- dnl fi
- dnl fi
-
--if test -f /sysV68 ; then
-+if test "$cross_compiling" = no && test -f /sysV68 ; then
- AC_DEFINE(sysV68)
- fi
-
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for MIPS)
- if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
- oldlibs="$LIBS"
-@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
- ))
- fi
- fi
-+fi
-
-
- AC_CHECKING(for Ultrix)
-@@ -132,7 +134,7 @@ AC_EGREP_CPP(yes,
- #endif
- ], ULTRIX=1)
-
--if test -f /usr/lib/libpyr.a ; then
-+if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
- oldlibs="$LIBS"
- LIBS="$LIBS -lpyr"
- AC_CHECKING(Pyramid OSX)
-@@ -679,17 +681,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
- dnl
- dnl **** PTY specific things ****
- dnl
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for /dev/ptc)
- if test -r /dev/ptc; then
- AC_DEFINE(HAVE_DEV_PTC)
- fi
-+fi
-
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for SVR4 ptys)
- sysvr4ptys=
- if test -c /dev/ptmx ; then
- AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
- sysvr4ptys=1])
- fi
-+fi
-
- AC_CHECK_FUNCS(getpt)
-
-@@ -699,6 +705,7 @@ AC_CHECK_FUNCS(openpty,,
- [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
- fi
-
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for ptyranges)
- if test -d /dev/ptym ; then
- pdir='/dev/ptym'
-@@ -722,6 +729,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\
- AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
- AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
- fi
-+fi
-
- dnl **** pty mode/group handling ****
- dnl
-@@ -869,14 +877,16 @@ fi
- dnl
- dnl **** loadav ****
- dnl
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for libutil(s))
- test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
- test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
-+fi
-
- AC_CHECKING(getloadavg)
- AC_TRY_LINK(,[getloadavg((double *)0, 0);],
- AC_DEFINE(LOADAV_GETLOADAVG) load=1,
--if test -f /usr/lib/libkvm.a ; then
-+if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
- olibs="$LIBS"
- LIBS="$LIBS -lkvm"
- AC_CHECKING(getloadavg with -lkvm)
-@@ -1094,13 +1104,18 @@ dnl **** libraries ****
- dnl
-
- AC_CHECKING(for crypt and sec libraries)
-+if test "$cross_compiling" = no ; then
- test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
-+fi
- oldlibs="$LIBS"
- LIBS="$LIBS -lcrypt"
- AC_CHECKING(crypt)
- AC_TRY_LINK(,,,LIBS="$oldlibs")
-+if test "$cross_compiling" = no ; then
- test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
- test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
-+fi
-+
- oldlibs="$LIBS"
- LIBS="$LIBS -lsun"
- AC_CHECKING(IRIX sun library)
---
-2.1.4
-
diff --git a/meta/recipes-extended/screen/screen/fix-parallel-make.patch b/meta/recipes-extended/screen/screen/fix-parallel-make.patch
deleted file mode 100644
index e0caf5d83e..0000000000
--- a/meta/recipes-extended/screen/screen/fix-parallel-make.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-This fixes the parallel make install failure
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: screen-4.0.3/Makefile.in
-===================================================================
---- screen-4.0.3.orig/Makefile.in
-+++ screen-4.0.3/Makefile.in
-@@ -70,7 +70,7 @@ screen: $(OFILES)
- .c.o:
- $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
-
--install_bin: .version screen
-+install_bin: .version screen installdirs
- -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
- then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
- $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
diff --git a/meta/recipes-extended/screen/screen_4.4.0.bb b/meta/recipes-extended/screen/screen_4.4.0.bb
deleted file mode 100644
index 769bac162b..0000000000
--- a/meta/recipes-extended/screen/screen_4.4.0.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Multiplexing terminal manager"
-DESCRIPTION = "Screen is a full-screen window manager \
-that multiplexes a physical terminal between several \
-processes, typically interactive shells."
-HOMEPAGE = "http://www.gnu.org/software/screen/"
-BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
-
-SECTION = "console/utils"
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
-
-DEPENDS = "ncurses \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} = "base-files"
-
-SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \
- file://fix-parallel-make.patch \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \
- file://Remove-redundant-compiler-sanity-checks.patch \
- file://Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch \
- file://Skip-host-file-system-checks-when-cross-compiling.patch \
- file://Avoid-mis-identifying-systems-as-SVR4.patch \
- file://0002-comm.h-now-depends-on-term.h.patch \
- file://0001-fix-for-multijob-build.patch \
- "
-
-SRC_URI[md5sum] = "d26e11a3648c2b11aaefa215a55dfd39"
-SRC_URI[sha256sum] = "ef722a54759a3bf23aad272bbf33c414c1078cad6bcd982fada93c0d7917218b"
-
-inherit autotools texinfo
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
-
-EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
-
-do_install_append () {
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
- fi
-}
-
-pkg_postinst_${PN} () {
- grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
-}
-
-pkg_postrm_${PN} () {
- printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
-}
diff --git a/meta/recipes-extended/screen/screen_4.7.0.bb b/meta/recipes-extended/screen/screen_4.7.0.bb
new file mode 100644
index 0000000000..67aa5f1fc6
--- /dev/null
+++ b/meta/recipes-extended/screen/screen_4.7.0.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Multiplexing terminal manager"
+DESCRIPTION = "Screen is a full-screen window manager \
+that multiplexes a physical terminal between several \
+processes, typically interactive shells."
+HOMEPAGE = "http://www.gnu.org/software/screen/"
+BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
+
+SECTION = "console/utils"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
+
+DEPENDS = "ncurses virtual/crypt \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} = "base-files"
+
+SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \
+ file://0002-comm.h-now-depends-on-term.h.patch \
+ file://0001-fix-for-multijob-build.patch \
+ file://0001-Remove-more-compatibility-stuff.patch \
+ "
+
+SRC_URI[md5sum] = "b8971ebd68d046f2814d1040cb8e6641"
+SRC_URI[sha256sum] = "da775328fa783bd2a787d722014dbd99c6093effc11f337827604c2efc5d20c1"
+
+inherit autotools texinfo
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
+
+EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 --with-sys-screenrc=${sysconfdir}/screenrc \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+
+do_install_append () {
+ install -D -m 644 ${S}/etc/etcscreenrc ${D}/${sysconfdir}/screenrc
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
+ fi
+}
+
+pkg_postinst_${PN} () {
+ grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+ printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
diff --git a/meta/recipes-extended/sed/sed-4.1.2/Makevars b/meta/recipes-extended/sed/sed-4.1.2/Makevars
deleted file mode 100644
index 8b09f53b0f..0000000000
--- a/meta/recipes-extended/sed/sed-4.1.2/Makevars
+++ /dev/null
@@ -1,25 +0,0 @@
-# Makefile variables for PO directory in any package using GNU gettext.
-
-# Usually the message domain is the same as the package name.
-DOMAIN = $(PACKAGE)
-
-# These two variables depend on the location of this directory.
-subdir = po
-top_builddir = ..
-
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
-
-# This is the copyright holder that gets inserted into the header of the
-# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
-# package. (Note that the msgstr strings, extracted from the package's
-# sources, belong to the copyright holder of the package.) Translators are
-# expected to transfer the copyright for their translations to this person
-# or entity, or to disclaim their copyright. The empty string stands for
-# the public domain; in this case the translators are expected to disclaim
-# their copyright.
-COPYRIGHT_HOLDER = Free Software Foundation, Inc.
-
-# This is the list of locale categories, beyond LC_MESSAGES, for which the
-# message catalogs shall be used. It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
diff --git a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch
deleted file mode 100644
index 836551ea18..0000000000
--- a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Pending
-
-Change the getline return type to match its declaration.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
-diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c
---- sed-4.1.2-orig/lib/getline.c 2010-08-31 08:47:50.070094024 +0800
-+++ sed-4.1.2/lib/getline.c 2010-08-31 08:48:50.982178172 +0800
-@@ -30,7 +30,7 @@
- necessary. Returns the number of characters read (not including the
- null terminator), or -1 on error or EOF. */
-
--size_t
-+ssize_t
- getline (lineptr, n, stream)
- char **lineptr;
- size_t *n;
diff --git a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
deleted file mode 100644
index c7c0aa015d..0000000000
--- a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Pending
-
-automake-1.12.x has deprecated use of @mkdir_p@, fix the issue by using @MKDIR_P@ instead.
-
-Avoid this build issue:
-| make[1]: mkdir_p@: Command not found
-| make[1]: *** [install-data-yes] Error 127
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/13
-
-Index: sed-4.1.2/intl/Makefile.in
-===================================================================
---- sed-4.1.2.orig/intl/Makefile.in
-+++ sed-4.1.2/intl/Makefile.in
-@@ -40,7 +40,7 @@ subdir = intl
- INSTALL = @INSTALL@
- INSTALL_DATA = @INSTALL_DATA@
- mkinstalldirs = $(mkdir_p)
--mkdir_p = @mkdir_p@
-+mkdir_p = @MKDIR_P@
-
- l = @INTL_LIBTOOL_SUFFIX_PREFIX@
-
-Index: sed-4.1.2/po/Makefile.in.in
-===================================================================
---- sed-4.1.2.orig/po/Makefile.in.in
-+++ sed-4.1.2/po/Makefile.in.in
-@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po
- INSTALL = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/install -c
- INSTALL_DATA = ${INSTALL} -m 644
- mkinstalldirs = $(mkdir_p)
--mkdir_p = @mkdir_p@
-+mkdir_p = @MKDIR_P@
-
- CC = i586-poky-linux-gcc -m32 -march=i586 --sysroot=/srv/home/nitin/builds2/build0/tmp/sysroots/qemux86
- GMSGFMT = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/msgfmt
diff --git a/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c..0000000000
--- a/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gnulib.mk b/lib/gnulib.mk
-index e1d74db..c0e92dd 100644
---- a/lib/gnulib.mk
-+++ b/lib/gnulib.mk
-@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
---
-2.1.4
-
diff --git a/meta/recipes-extended/sed/sed-4.2.2/run-ptest b/meta/recipes-extended/sed/sed-4.2.2/run-ptest
deleted file mode 100644
index 7c0f62770e..0000000000
--- a/meta/recipes-extended/sed/sed-4.2.2/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-make -C testsuite -k runtest-TESTS
diff --git a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
deleted file mode 100644
index 0293900fbf..0000000000
--- a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-sed: add ptest
-
-ptest needs buildtest-TESTS and runtest-TESTS targets.
-serial-tests is required to generate those targets.
-
-And fix following error after add serial-tests.
-
-[snip]
-help2man: can't get `--help' info from ../sed/sed
-make[2]: *** [sed.1] Error 2
-[snip]
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- configure.ac | 2 +-
- doc/Makefile.am | 2 +-
- testsuite/Makefile.am | 6 ++++++
- 3 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9d33ec9..4f0c532 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(build-aux)
- AC_CONFIG_SRCDIR([sed/sed.c])
- AM_CONFIG_HEADER(config.h:config_h.in)
- AC_PREREQ(2.60)
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([serial-tests])
-
- SED_FEATURE_VERSION=4.2.2
- AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION",
-diff --git a/doc/Makefile.am b/doc/Makefile.am
-index af6975c..6fd8c9a 100644
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -25,7 +25,7 @@ $(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
- fi
- echo stamp > $(srcdir)/s-texi
-
--sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
-+_sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
- $(HELP2MAN) --name "stream editor for filtering and transforming text" \
- -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED)
-
-diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
-index d80e72c..b05f01e 100644
---- a/testsuite/Makefile.am
-+++ b/testsuite/Makefile.am
-@@ -99,5 +99,11 @@ EXTRA_DIST = \
- # automake makes `check' depend on $(TESTS). Declare
- # dummy targets for $(TESTS) so that make does not complain.
-
-+install-ptest:
-+ cd $(BUILDDIR); tar -c --exclude=*.o $(TESTDIR) | ( cd $(DESTDIR) && tar -xf - )
-+ for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done
-+ sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile
-+ for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done
-+
- .PHONY: $(SEDTESTS)
- $(SEDTESTS):
---
-1.7.9.5
-
diff --git a/meta/recipes-extended/sed/sed/run-ptest b/meta/recipes-extended/sed/sed/run-ptest
new file mode 100644
index 0000000000..993d7d5d75
--- /dev/null
+++ b/meta/recipes-extended/sed/sed/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+chown nobody testsuite
+chown nobody ../ptest
+su nobody -c "make test-suite.log"
diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb
deleted file mode 100644
index 40e3a53ceb..0000000000
--- a/meta/recipes-extended/sed/sed_4.1.2.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Stream EDitor (text filtering utility)"
-HOMEPAGE = "http://www.gnu.org/software/sed/"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407"
-SECTION = "console/utils"
-PR = "r7"
-
-SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
- file://fix_return_type.patch \
- file://sed-4.1.2_fix_for_automake-1.12.patch \
- file://Makevars"
-
-SRC_URI[md5sum] = "928f0e06422f414091917401f1a834d0"
-SRC_URI[sha256sum] = "638e837ba765d5da0a30c98b57c2953cecea96827882f594612acace93ceeeab"
-
-inherit autotools texinfo update-alternatives gettext
-
-do_configure_prepend () {
- cp ${WORKDIR}/Makevars ${S}/po/
-}
-
-do_install () {
- autotools_do_install
- install -d ${D}${base_bindir}
- if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
- mv ${D}${bindir}/sed ${D}${base_bindir}/sed
- rmdir ${D}${bindir}/
- fi
-}
-
-ALTERNATIVE_${PN} = "sed"
-ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
-ALTERNATIVE_PRIORITY = "100"
-
diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb
deleted file mode 100644
index 5aa7d8a079..0000000000
--- a/meta/recipes-extended/sed/sed_4.2.2.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "Stream EDitor (text filtering utility)"
-HOMEPAGE = "http://www.gnu.org/software/sed/"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
- file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f"
-SECTION = "console/utils"
-
-SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
- file://sed-add-ptest.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://run-ptest \
-"
-
-SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
-SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
-
-inherit autotools texinfo update-alternatives gettext ptest
-RDEPENDS_${PN}-ptest += "make ${PN}"
-RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru"
-
-EXTRA_OECONF = "--disable-acl \
- ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}"
-
-do_install () {
- autotools_do_install
- install -d ${D}${base_bindir}
- if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
- mv ${D}${bindir}/sed ${D}${base_bindir}/sed
- rmdir ${D}${bindir}/
- fi
-}
-
-ALTERNATIVE_${PN} = "sed"
-ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
-ALTERNATIVE_PRIORITY = "100"
-
-TESTDIR = "testsuite"
-
-do_compile_ptest() {
- oe_runmake -C ${TESTDIR} buildtest-TESTS
-}
-
-do_install_ptest() {
- oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
-}
-
diff --git a/meta/recipes-extended/sed/sed_4.7.bb b/meta/recipes-extended/sed/sed_4.7.bb
new file mode 100644
index 0000000000..312f07f047
--- /dev/null
+++ b/meta/recipes-extended/sed/sed_4.7.bb
@@ -0,0 +1,61 @@
+SUMMARY = "Stream EDitor (text filtering utility)"
+HOMEPAGE = "http://www.gnu.org/software/sed/"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \
+ file://sed/sed.h;beginline=1;endline=15;md5=e869c874e5472ba89f63f381b0e93475"
+SECTION = "console/utils"
+
+SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.xz \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "777ddfd9d71dd06711fe91f0925e1573"
+SRC_URI[sha256sum] = "2885768cd0a29ff8d58a6280a270ff161f6a3deb5690b2be6c49f46d4c67bd6a"
+
+inherit autotools texinfo update-alternatives gettext ptest
+RDEPENDS_${PN}-ptest += "make gawk perl perl-module-filehandle perl-module-file-compare perl-module-file-find perl-module-file-temp perl-module-file-stat"
+RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru locale-base-en-us locale-base-el-gr.iso-8859-7"
+
+EXTRA_OECONF = "--disable-acl \
+ "
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}
+ if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
+ mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+ rmdir ${D}${bindir}/
+ fi
+}
+
+ALTERNATIVE_${PN} = "sed"
+ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
+ALTERNATIVE_PRIORITY = "100"
+
+do_compile_ptest() {
+ oe_runmake testsuite/get-mb-cur-max testsuite/test-mbrtowc
+}
+
+do_install_ptest() {
+ cp -rf ${S}/testsuite/ ${D}${PTEST_PATH}
+ cp -rf ${B}/testsuite/* ${D}${PTEST_PATH}/testsuite/
+ cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}/
+ cp ${B}/Makefile ${D}${PTEST_PATH}
+ cp ${S}/init.cfg ${D}${PTEST_PATH}
+
+ sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i ${D}${PTEST_PATH}/Makefile
+ for i in `grep -rl "sed/sed" ${D}${PTEST_PATH}`; do sed -e 's/..\/sed\/sed/sed/' -i $i; done
+
+ sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:abs_top_builddir =.*:abs_top_builddir = ..:g' \
+ -e 's:abs_top_srcdir =.*:abs_top_srcdir = ..:g' \
+ -e 's:abs_srcdir =.*:abs_srcdir = ..:g' \
+ -e 's:top_srcdir =.*:top_srcdir = ..:g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ -i ${D}${PTEST_PATH}/Makefile
+}
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}"
diff --git a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
index a6f604b652..aac2d42b12 100644
--- a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
+++ b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
@@ -11,6 +11,7 @@ Upstream-Status: Inappropriate [disable feature]
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
src/groupadd.c | 3 +++
src/groupdel.c | 3 +++
@@ -22,7 +23,7 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
7 files changed, 21 insertions(+)
diff --git a/src/groupadd.c b/src/groupadd.c
-index 39b4ec0..f716f57 100644
+index 63e1c48..a596c49 100644
--- a/src/groupadd.c
+++ b/src/groupadd.c
@@ -34,6 +34,9 @@
@@ -36,7 +37,7 @@ index 39b4ec0..f716f57 100644
#include <fcntl.h>
#include <getopt.h>
diff --git a/src/groupdel.c b/src/groupdel.c
-index da99347..46a679c 100644
+index 70bed01..ababd81 100644
--- a/src/groupdel.c
+++ b/src/groupdel.c
@@ -34,6 +34,9 @@
@@ -50,7 +51,7 @@ index da99347..46a679c 100644
#include <fcntl.h>
#include <grp.h>
diff --git a/src/groupmems.c b/src/groupmems.c
-index e4f107f..95cb073 100644
+index fc91c8b..2842514 100644
--- a/src/groupmems.c
+++ b/src/groupmems.c
@@ -32,6 +32,9 @@
@@ -64,7 +65,7 @@ index e4f107f..95cb073 100644
#include <getopt.h>
#include <grp.h>
diff --git a/src/groupmod.c b/src/groupmod.c
-index d9d3807..6229737 100644
+index 72daf2c..8965f9d 100644
--- a/src/groupmod.c
+++ b/src/groupmod.c
@@ -34,6 +34,9 @@
@@ -78,7 +79,7 @@ index d9d3807..6229737 100644
#include <fcntl.h>
#include <getopt.h>
diff --git a/src/useradd.c b/src/useradd.c
-index e1ebf50..25679d8 100644
+index 3aaf45c..1ab9174 100644
--- a/src/useradd.c
+++ b/src/useradd.c
@@ -34,6 +34,9 @@
@@ -92,7 +93,7 @@ index e1ebf50..25679d8 100644
#include <ctype.h>
#include <errno.h>
diff --git a/src/userdel.c b/src/userdel.c
-index 19b12bc..a083929 100644
+index c8de1d3..24d3ea9 100644
--- a/src/userdel.c
+++ b/src/userdel.c
@@ -34,6 +34,9 @@
@@ -102,11 +103,11 @@ index 19b12bc..a083929 100644
+/* Disable use of syslog since we're running this command against a sysroot */
+#undef USE_SYSLOG
+
+ #include <assert.h>
#include <errno.h>
#include <fcntl.h>
- #include <getopt.h>
diff --git a/src/usermod.c b/src/usermod.c
-index 685b50a..28e5cfc 100644
+index ccfbb99..24fb60d 100644
--- a/src/usermod.c
+++ b/src/usermod.c
@@ -34,6 +34,9 @@
@@ -116,9 +117,9 @@ index 685b50a..28e5cfc 100644
+/* Disable use of syslog since we're running this command against a sysroot */
+#undef USE_SYSLOG
+
+ #include <assert.h>
#include <ctype.h>
#include <errno.h>
- #include <fcntl.h>
--
-2.1.0
+2.11.0
diff --git a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch
deleted file mode 100644
index 828b95a572..0000000000
--- a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Thu, 11 Sep 2014 15:11:23 +0200
-Subject: [PATCH] Do not read login.defs before doing chroot()
-
-If "useradd --root <root> ..." was used, the login.defs file would still
-be read from /etc/login.defs instead of <root>/etc/login.defs. This was
-due to getdef_ulong() being called before process_root_flag().
-
-Upstream-Status: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2014-September/010446.html]
-
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
- src/useradd.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/useradd.c b/src/useradd.c
-index a8a1f76..e1ebf50 100644
---- a/src/useradd.c
-+++ b/src/useradd.c
-@@ -1993,9 +1993,11 @@ int main (int argc, char **argv)
- #endif /* USE_PAM */
- #endif /* ACCT_TOOLS_SETUID */
-
-+#ifdef ENABLE_SUBIDS
- /* Needed for userns check */
-- uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
-- uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
-+ uid_t uid_min;
-+ uid_t uid_max;
-+#endif
-
- /*
- * Get my name so that I can use it to report errors.
-@@ -2026,6 +2028,8 @@ int main (int argc, char **argv)
- is_shadow_grp = sgr_file_present ();
- #endif
- #ifdef ENABLE_SUBIDS
-+ uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
-+ uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
- is_sub_uid = sub_uid_file_present () && !rflg &&
- (!user_id || (user_id <= uid_max && user_id >= uid_min));
- is_sub_gid = sub_gid_file_present () && !rflg &&
---
-1.9.0
-
diff --git a/meta/recipes-extended/shadow/files/0001-Make-the-sp_lstchg-shadow-field-reproducible-re.-71.patch b/meta/recipes-extended/shadow/files/0001-Make-the-sp_lstchg-shadow-field-reproducible-re.-71.patch
new file mode 100644
index 0000000000..de0ba3ebb4
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-Make-the-sp_lstchg-shadow-field-reproducible-re.-71.patch
@@ -0,0 +1,89 @@
+From fe34a2a0e44bc80ff213bfd185046a5f10c94997 Mon Sep 17 00:00:00 2001
+From: Chris Lamb <chris@chris-lamb.co.uk>
+Date: Wed, 2 Jan 2019 18:06:16 +0000
+Subject: [PATCH 1/2] Make the sp_lstchg shadow field reproducible (re. #71)
+
+From <https://github.com/shadow-maint/shadow/pull/71>:
+
+```
+The third field in the /etc/shadow file (sp_lstchg) contains the date of
+the last password change expressed as the number of days since Jan 1, 1970.
+As this is a relative time, creating a user today will result in:
+
+username:17238:0:99999:7:::
+whilst creating the same user tomorrow will result in:
+
+username:17239:0:99999:7:::
+This has an impact for the Reproducible Builds[0] project where we aim to
+be independent of as many elements the build environment as possible,
+including the current date.
+
+This patch changes the behaviour to use the SOURCE_DATE_EPOCH[1]
+environment variable (instead of Jan 1, 1970) if valid.
+```
+
+This updated PR adds some missing calls to gettime (). This was originally
+filed by Johannes Schauer in Debian as #917773 [2].
+
+[0] https://reproducible-builds.org/
+[1] https://reproducible-builds.org/specs/source-date-epoch/
+[2] https://bugs.debian.org/917773
+
+Upstream-Status: Backport
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+---
+ libmisc/pwd2spwd.c | 3 +--
+ src/pwck.c | 2 +-
+ src/pwconv.c | 2 +-
+ 3 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/libmisc/pwd2spwd.c b/libmisc/pwd2spwd.c
+index c1b9b29ac873..6799dd50d490 100644
+--- a/libmisc/pwd2spwd.c
++++ b/libmisc/pwd2spwd.c
+@@ -40,7 +40,6 @@
+ #include "prototypes.h"
+ #include "defines.h"
+ #include <pwd.h>
+-extern time_t time (time_t *);
+
+ /*
+ * pwd_to_spwd - create entries for new spwd structure
+@@ -66,7 +65,7 @@ struct spwd *pwd_to_spwd (const struct passwd *pw)
+ */
+ sp.sp_min = 0;
+ sp.sp_max = (10000L * DAY) / SCALE;
+- sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE;
++ sp.sp_lstchg = (long) gettime () / SCALE;
+ if (0 == sp.sp_lstchg) {
+ /* Better disable aging than requiring a password
+ * change */
+diff --git a/src/pwck.c b/src/pwck.c
+index 0ffb711efb13..f70071b12500 100644
+--- a/src/pwck.c
++++ b/src/pwck.c
+@@ -609,7 +609,7 @@ static void check_pw_file (int *errors, bool *changed)
+ sp.sp_inact = -1;
+ sp.sp_expire = -1;
+ sp.sp_flag = SHADOW_SP_FLAG_UNSET;
+- sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE;
++ sp.sp_lstchg = (long) gettime () / SCALE;
+ if (0 == sp.sp_lstchg) {
+ /* Better disable aging than
+ * requiring a password change
+diff --git a/src/pwconv.c b/src/pwconv.c
+index 9c69fa131d8e..f932f266c59c 100644
+--- a/src/pwconv.c
++++ b/src/pwconv.c
+@@ -267,7 +267,7 @@ int main (int argc, char **argv)
+ spent.sp_flag = SHADOW_SP_FLAG_UNSET;
+ }
+ spent.sp_pwdp = pw->pw_passwd;
+- spent.sp_lstchg = (long) time ((time_t *) 0) / SCALE;
++ spent.sp_lstchg = (long) gettime () / SCALE;
+ if (0 == spent.sp_lstchg) {
+ /* Better disable aging than requiring a password
+ * change */
+--
+2.17.1
+
diff --git a/meta/recipes-extended/shadow/files/0001-configure.ac-fix-configure-error-with-dash.patch b/meta/recipes-extended/shadow/files/0001-configure.ac-fix-configure-error-with-dash.patch
new file mode 100644
index 0000000000..a74cbb0c0e
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-configure.ac-fix-configure-error-with-dash.patch
@@ -0,0 +1,36 @@
+From 3c52a84ff8775590e7e9da9c0d4408c23494305e Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Mon, 17 Jun 2019 15:36:34 +0800
+Subject: [PATCH] configure.ac: fix configure error with dash
+
+A configure error occurs when /bin/sh -> dash:
+ checking for is_selinux_enabled in -lselinux... yes
+ checking for semanage_connect in -lsemanage... yes
+ configure: 16322: test: yesyes: unexpected operator
+
+Use "=" instead of "==" since dash doesn't support this operator.
+
+Upstream-Status: Backport
+[https://github.com/shadow-maint/shadow/commit/3c52a84ff8775590e7e9da9c0d4408c23494305e]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6762556..1907afb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -500,7 +500,7 @@ if test "$with_selinux" != "no"; then
+ AC_MSG_ERROR([libsemanage not found])
+ fi
+
+- if test "$selinux_lib$semanage_lib" == "yesyes" ; then
++ if test "$selinux_lib$semanage_lib" = "yesyes" ; then
+ AC_DEFINE(WITH_SELINUX, 1,
+ [Build shadow with SELinux support])
+ LIBSELINUX="-lselinux"
+--
+2.7.4
+
diff --git a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
index 85dde8e1bb..faa6f68ebe 100644
--- a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
+++ b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
@@ -1,17 +1,17 @@
-Upstream-Status: Inappropriate [OE specific]
+Subject: [PATCH] useradd.c: create parent directories when necessary
-Subject: useradd.c: create parent directories when necessary
+Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------
- 1 file changed, 49 insertions(+), 23 deletions(-)
+ src/useradd.c | 80 +++++++++++++++++++++++++++++++++++++++--------------------
+ 1 file changed, 53 insertions(+), 27 deletions(-)
diff --git a/src/useradd.c b/src/useradd.c
-index 4bd969d..cb5dd6c 100644
+index 00a3c30..9ecbb58 100644
--- a/src/useradd.c
+++ b/src/useradd.c
-@@ -1893,6 +1893,35 @@ static void usr_update (void)
+@@ -2021,6 +2021,35 @@ static void usr_update (void)
}
/*
@@ -47,57 +47,64 @@ index 4bd969d..cb5dd6c 100644
* create_home - create the user's home directory
*
* create_home() creates the user's home directory if it does not
-@@ -1907,36 +1936,33 @@ static void create_home (void)
+@@ -2038,39 +2067,36 @@ static void create_home (void)
fail_exit (E_HOMEDIR);
}
#endif
- /* XXX - create missing parent directories. --marekm */
-- if (mkdir (user_home, 0) != 0) {
+- if (mkdir (prefix_user_home, 0) != 0) {
- fprintf (stderr,
- _("%s: cannot create directory %s\n"),
-- Prog, user_home);
--#ifdef WITH_AUDIT
+- Prog, prefix_user_home);
++ mkdir_p(user_home);
++ }
++ if (access (prefix_user_home, F_OK) != 0) {
+ #ifdef WITH_AUDIT
- audit_logger (AUDIT_ADD_USER, Prog,
- "adding home directory",
- user_name, (unsigned int) user_id,
- SHADOW_AUDIT_FAILURE);
--#endif
++ audit_logger (AUDIT_ADD_USER, Prog,
++ "adding home directory",
++ user_name, (unsigned int) user_id,
++ SHADOW_AUDIT_FAILURE);
+ #endif
- fail_exit (E_HOMEDIR);
- }
-- chown (user_home, user_id, user_gid);
-- chmod (user_home,
+- (void) chown (prefix_user_home, user_id, user_gid);
+- chmod (prefix_user_home,
- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
- home_added = true;
-+ mkdir_p(user_home);
-+ }
-+ if (access (user_home, F_OK) != 0) {
- #ifdef WITH_AUDIT
- audit_logger (AUDIT_ADD_USER, Prog,
- "adding home directory",
- user_name, (unsigned int) user_id,
-- SHADOW_AUDIT_SUCCESS);
-+ SHADOW_AUDIT_FAILURE);
- #endif
--#ifdef WITH_SELINUX
-- /* Reset SELinux to create files with default contexts */
-- if (reset_selinux_file_context () != 0) {
-- fail_exit (E_HOMEDIR);
-- }
+ fail_exit (E_HOMEDIR);
+ }
-+ chown (user_home, user_id, user_gid);
-+ chmod (user_home,
++ (void) chown (prefix_user_home, user_id, user_gid);
++ chmod (prefix_user_home,
+ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
+ home_added = true;
-+#ifdef WITH_AUDIT
+ #ifdef WITH_AUDIT
+- audit_logger (AUDIT_ADD_USER, Prog,
+- "adding home directory",
+- user_name, (unsigned int) user_id,
+- SHADOW_AUDIT_SUCCESS);
+ audit_logger (AUDIT_ADD_USER, Prog,
+ "adding home directory",
+ user_name, (unsigned int) user_id,
+ SHADOW_AUDIT_SUCCESS);
#endif
-+#ifdef WITH_SELINUX
+ #ifdef WITH_SELINUX
+- /* Reset SELinux to create files with default contexts */
+- if (reset_selinux_file_context () != 0) {
+- fprintf (stderr,
+- _("%s: cannot reset SELinux file creation context\n"),
+- Prog);
+- fail_exit (E_HOMEDIR);
+- }
+-#endif
+ /* Reset SELinux to create files with default contexts */
+ if (reset_selinux_file_context () != 0) {
++ fprintf (stderr,
++ _("%s: cannot reset SELinux file creation context\n"),
++ Prog);
+ fail_exit (E_HOMEDIR);
}
+#endif
@@ -105,5 +112,5 @@ index 4bd969d..cb5dd6c 100644
/*
--
-1.7.9.5
+2.11.0
diff --git a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
index 68da25f406..fa7eb07aa5 100644
--- a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
+++ b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
@@ -1,21 +1,21 @@
-Upstream-Status: Inappropriate [OE specific]
+Subject: [PATCH] Allow for setting password in clear text
-Allow for setting password in clear text.
+Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- src/Makefile.am | 8 ++++----
- src/groupadd.c | 8 +++++++-
- src/groupmod.c | 8 +++++++-
- src/useradd.c | 9 +++++++--
- src/usermod.c | 8 +++++++-
- 5 files changed, 32 insertions(+), 9 deletions(-)
+ src/Makefile.am | 8 ++++----
+ src/groupadd.c | 20 +++++++++++++++-----
+ src/groupmod.c | 20 +++++++++++++++-----
+ src/useradd.c | 21 +++++++++++++++------
+ src/usermod.c | 20 +++++++++++++++-----
+ 5 files changed, 64 insertions(+), 25 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
-index 25e288d..856b087 100644
+index 3c98a8d..b8093d5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
+@@ -93,10 +93,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
@@ -28,9 +28,9 @@ index 25e288d..856b087 100644
grpck_LDADD = $(LDADD) $(LIBSELINUX)
grpconv_LDADD = $(LDADD) $(LIBSELINUX)
grpunconv_LDADD = $(LDADD) $(LIBSELINUX)
-@@ -111,9 +111,9 @@ su_SOURCES = \
+@@ -117,9 +117,9 @@ su_SOURCES = \
suauth.c
- su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
+ su_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
sulogin_LDADD = $(LDADD) $(LIBCRYPT)
-useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
+useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
@@ -41,33 +41,39 @@ index 25e288d..856b087 100644
install-am: all-am
diff --git a/src/groupadd.c b/src/groupadd.c
-index f716f57..4e28c26 100644
+index b57006c..63e1c48 100644
--- a/src/groupadd.c
+++ b/src/groupadd.c
-@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status)
+@@ -123,9 +123,10 @@ static /*@noreturn@*/void usage (int status)
(void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
" (non-unique) GID\n"), usageout);
(void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout);
+ (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout);
(void) fputs (_(" -r, --system create a system account\n"), usageout);
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+- (void) fputs (_(" -P, --prefix PREFIX_DIR directory prefix\n"), usageout);
++ (void) fputs (_(" -A, --prefix PREFIX_DIR directory prefix\n"), usageout);
(void) fputs ("\n", usageout);
-@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv)
+ exit (status);
+ }
+@@ -387,13 +388,14 @@ static void process_flags (int argc, char **argv)
{"key", required_argument, NULL, 'K'},
{"non-unique", no_argument, NULL, 'o'},
{"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
{"system", no_argument, NULL, 'r'},
{"root", required_argument, NULL, 'R'},
+- {"prefix", required_argument, NULL, 'P'},
++ {"prefix", required_argument, NULL, 'A'},
{NULL, 0, NULL, '\0'}
};
-- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:",
-+ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:",
+- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:P:",
++ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:A:",
long_options, NULL)) != -1) {
switch (c) {
case 'f':
-@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv)
+@@ -445,12 +447,20 @@ static void process_flags (int argc, char **argv)
pflg = true;
group_passwd = optarg;
break;
@@ -78,32 +84,57 @@ index f716f57..4e28c26 100644
case 'r':
rflg = true;
break;
+ case 'R': /* no-op, handled in process_root_flag () */
+ break;
+- case 'P': /* no-op, handled in process_prefix_flag () */
++ case 'A': /* no-op, handled in process_prefix_flag () */
++ fprintf (stderr,
++ _("%s: -A is deliberately not supported \n"),
++ Prog);
++ exit (E_BAD_ARG);
+ break;
+ default:
+ usage (E_USAGE);
+@@ -584,7 +594,7 @@ int main (int argc, char **argv)
+ (void) textdomain (PACKAGE);
+
+ process_root_flag ("-R", argc, argv);
+- prefix = process_prefix_flag ("-P", argc, argv);
++ prefix = process_prefix_flag ("-A", argc, argv);
+
+ OPENLOG ("groupadd");
+ #ifdef WITH_AUDIT
diff --git a/src/groupmod.c b/src/groupmod.c
-index d9d3807..68f49d1 100644
+index b293b98..72daf2c 100644
--- a/src/groupmod.c
+++ b/src/groupmod.c
-@@ -127,6 +127,7 @@ static void usage (int status)
+@@ -134,8 +134,9 @@ static void usage (int status)
(void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout);
(void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
" PASSWORD\n"), usageout);
+ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout);
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout);
++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout);
(void) fputs ("\n", usageout);
exit (status);
-@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv)
+ }
+@@ -383,11 +384,12 @@ static void process_flags (int argc, char **argv)
{"new-name", required_argument, NULL, 'n'},
{"non-unique", no_argument, NULL, 'o'},
{"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
{"root", required_argument, NULL, 'R'},
+- {"prefix", required_argument, NULL, 'P'},
++ {"prefix", required_argument, NULL, 'A'},
{NULL, 0, NULL, '\0'}
};
-- while ((c = getopt_long (argc, argv, "g:hn:op:R:",
-+ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:",
+- while ((c = getopt_long (argc, argv, "g:hn:op:R:P:",
++ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:A:",
long_options, NULL)) != -1) {
switch (c) {
case 'g':
-@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv)
+@@ -414,9 +416,17 @@ static void process_flags (int argc, char **argv)
group_passwd = optarg;
pflg = true;
break;
@@ -113,40 +144,65 @@ index d9d3807..68f49d1 100644
+ break;
case 'R': /* no-op, handled in process_root_flag () */
break;
+- case 'P': /* no-op, handled in process_prefix_flag () */
++ case 'A': /* no-op, handled in process_prefix_flag () */
++ fprintf (stderr,
++ _("%s: -A is deliberately not supported \n"),
++ Prog);
++ exit (E_BAD_ARG);
+ break;
default:
+ usage (E_USAGE);
+@@ -757,7 +767,7 @@ int main (int argc, char **argv)
+ (void) textdomain (PACKAGE);
+
+ process_root_flag ("-R", argc, argv);
+- prefix = process_prefix_flag ("-P", argc, argv);
++ prefix = process_prefix_flag ("-A", argc, argv);
+
+ OPENLOG ("groupmod");
+ #ifdef WITH_AUDIT
diff --git a/src/useradd.c b/src/useradd.c
-index b3bd451..4416f90 100644
+index c74e491..7214e72 100644
--- a/src/useradd.c
+++ b/src/useradd.c
-@@ -773,6 +773,7 @@ static void usage (int status)
+@@ -829,9 +829,10 @@ static void usage (int status)
(void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
" (non-unique) UID\n"), usageout);
(void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout);
+ (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout);
(void) fputs (_(" -r, --system create a system account\n"), usageout);
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout);
++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout);
(void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout);
-@@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv)
+ (void) fputs (_(" -u, --uid UID user ID of the new account\n"), usageout);
+ (void) fputs (_(" -U, --user-group create a group with the same name as the user\n"), usageout);
+@@ -1104,9 +1105,10 @@ static void process_flags (int argc, char **argv)
{"no-user-group", no_argument, NULL, 'N'},
{"non-unique", no_argument, NULL, 'o'},
{"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
{"system", no_argument, NULL, 'r'},
{"root", required_argument, NULL, 'R'},
+- {"prefix", required_argument, NULL, 'P'},
++ {"prefix", required_argument, NULL, 'A'},
{"shell", required_argument, NULL, 's'},
-@@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv)
+ {"uid", required_argument, NULL, 'u'},
+ {"user-group", no_argument, NULL, 'U'},
+@@ -1117,9 +1119,9 @@ static void process_flags (int argc, char **argv)
};
while ((c = getopt_long (argc, argv,
#ifdef WITH_SELINUX
-- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:",
-+ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:",
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:UZ:",
++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:A:s:u:UZ:",
#else /* !WITH_SELINUX */
-- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U",
-+ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U",
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:U",
++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:A:s:u:U",
#endif /* !WITH_SELINUX */
long_options, NULL)) != -1) {
switch (c) {
-@@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv)
+@@ -1285,12 +1287,19 @@ static void process_flags (int argc, char **argv)
}
user_pass = optarg;
break;
@@ -156,36 +212,62 @@ index b3bd451..4416f90 100644
case 'r':
rflg = true;
break;
+ case 'R': /* no-op, handled in process_root_flag () */
+ break;
+- case 'P': /* no-op, handled in process_prefix_flag () */
++ case 'A': /* no-op, handled in process_prefix_flag () */
++ fprintf (stderr,
++ _("%s: -A is deliberately not supported \n"),
++ Prog);
++ exit (E_BAD_ARG);
+ break;
+ case 's':
+ if ( ( !VALID (optarg) )
+@@ -2148,7 +2157,7 @@ int main (int argc, char **argv)
+
+ process_root_flag ("-R", argc, argv);
+
+- prefix = process_prefix_flag("-P", argc, argv);
++ prefix = process_prefix_flag("-A", argc, argv);
+
+ OPENLOG ("useradd");
+ #ifdef WITH_AUDIT
diff --git a/src/usermod.c b/src/usermod.c
-index e7d4351..b79f7a3 100644
+index e571426..ccfbb99 100644
--- a/src/usermod.c
+++ b/src/usermod.c
-@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status)
+@@ -424,8 +424,9 @@ static /*@noreturn@*/void usage (int status)
" new location (use only with -d)\n"), usageout);
(void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout);
(void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout);
+ (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout);
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout);
++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout);
(void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout);
(void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout);
-@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv)
+ (void) fputs (_(" -U, --unlock unlock the user account\n"), usageout);
+@@ -1002,8 +1003,9 @@ static void process_flags (int argc, char **argv)
{"move-home", no_argument, NULL, 'm'},
{"non-unique", no_argument, NULL, 'o'},
{"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
{"root", required_argument, NULL, 'R'},
+- {"prefix", required_argument, NULL, 'P'},
++ {"prefix", required_argument, NULL, 'A'},
{"shell", required_argument, NULL, 's'},
{"uid", required_argument, NULL, 'u'},
-@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv)
+ {"unlock", no_argument, NULL, 'U'},
+@@ -1019,7 +1021,7 @@ static void process_flags (int argc, char **argv)
{NULL, 0, NULL, '\0'}
};
while ((c = getopt_long (argc, argv,
-- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U"
-+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U"
+- "ac:d:e:f:g:G:hl:Lmop:R:s:u:UP:"
++ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:UA:"
#ifdef ENABLE_SUBIDS
"v:w:V:W:"
#endif /* ENABLE_SUBIDS */
-@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv)
+@@ -1119,9 +1121,17 @@ static void process_flags (int argc, char **argv)
user_pass = optarg;
pflg = true;
break;
@@ -195,7 +277,24 @@ index e7d4351..b79f7a3 100644
+ break;
case 'R': /* no-op, handled in process_root_flag () */
break;
+- case 'P': /* no-op, handled in process_prefix_flag () */
++ case 'A': /* no-op, handled in process_prefix_flag () */
++ fprintf (stderr,
++ _("%s: -A is deliberately not supported \n"),
++ Prog);
++ exit (E_BAD_ARG);
+ break;
case 's':
+ if (!VALID (optarg)) {
+@@ -2098,7 +2108,7 @@ int main (int argc, char **argv)
+ (void) textdomain (PACKAGE);
+
+ process_root_flag ("-R", argc, argv);
+- prefix = process_prefix_flag ("-P", argc, argv);
++ prefix = process_prefix_flag ("-A", argc, argv);
+
+ OPENLOG ("usermod");
+ #ifdef WITH_AUDIT
--
-1.7.9.5
+2.11.0
diff --git a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
deleted file mode 100644
index 185590cabd..0000000000
--- a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@aura-online.co.uk>
-Date: Sat, 23 Aug 2014 09:46:39 +0100
-Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF
-
-This built-in check is simpler than the previous method and, most
-importantly, works when cross-compiling.
-
-Upstream-Status: Accepted
-[https://github.com/shadow-maint/shadow/commit/2cb54158b80cdbd97ca3b36df83f9255e923ae3f]
-
-Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
----
- configure.in | 14 ++++----------
- 1 file changed, 4 insertions(+), 10 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 1a3f841..4a4d6d0 100644
---- a/configure.in
-+++ b/configure.in
-@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then
- dnl
- dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
- dnl
-- AC_RUN_IFELSE([AC_LANG_SOURCE([
--#include <sys/types.h>
--int main(void) {
-- uid_t u;
-- gid_t g;
-- return (sizeof u < 4) || (sizeof g < 4);
--}
-- ])], [id32bit="yes"], [id32bit="no"])
--
-- if test "x$id32bit" = "xyes"; then
-+ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
-+ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
-+
-+ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
- AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
- enable_subids="yes"
- else
diff --git a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
deleted file mode 100644
index 02cb91aafd..0000000000
--- a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Pending
-
-Subject: fix installation failure with subids disabled
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/Makefile.am | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 25e288d..076f8ef 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -52,7 +52,10 @@ usbin_PROGRAMS = \
- noinst_PROGRAMS = id sulogin
-
- suidbins = su
--suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap
-+suidubins = chage chfn chsh expiry gpasswd newgrp passwd
-+if ENABLE_SUBIDS
-+suidubins += newgidmap newuidmap
-+endif
- if ACCT_TOOLS_SETUID
- suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod
- endif
---
-1.7.9.5
-
diff --git a/meta/recipes-extended/shadow/files/pam.d/chpasswd b/meta/recipes-extended/shadow/files/pam.d/chpasswd
index 9e3efa68ba..b769d92ba4 100644
--- a/meta/recipes-extended/shadow/files/pam.d/chpasswd
+++ b/meta/recipes-extended/shadow/files/pam.d/chpasswd
@@ -1,4 +1,6 @@
# The PAM configuration file for the Shadow 'chpasswd' service
#
+auth sufficient pam_rootok.so
+account required pam_permit.so
password include common-password
diff --git a/meta/recipes-extended/shadow/files/pam.d/newusers b/meta/recipes-extended/shadow/files/pam.d/newusers
index 4aa3dde48b..4c59dfa478 100644
--- a/meta/recipes-extended/shadow/files/pam.d/newusers
+++ b/meta/recipes-extended/shadow/files/pam.d/newusers
@@ -1,4 +1,6 @@
# The PAM configuration file for the Shadow 'newusers' service
#
+auth sufficient pam_rootok.so
+account required pam_permit.so
password include common-password
diff --git a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
deleted file mode 100644
index 37dc153fca..0000000000
--- a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Pending
-
-usermod: fix compilation failure with subids disabled
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/usermod.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/usermod.c b/src/usermod.c
-index e7d4351..685b50a 100644
---- a/src/usermod.c
-+++ b/src/usermod.c
-@@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv)
- Prog, (unsigned long) user_newid);
- exit (E_UID_IN_USE);
- }
--
-+#ifdef ENABLE_SUBIDS
- if ( (vflg || Vflg)
- && !is_sub_uid) {
- fprintf (stderr,
-@@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv)
- Prog, sub_gid_dbname (), "-w", "-W");
- exit (E_USAGE);
- }
-+#endif
- }
-
- /*
---
-1.7.9.5
-
diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb b/meta/recipes-extended/shadow/shadow-securetty_4.6.bb
index c78f888cf4..c78f888cf4 100644
--- a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
+++ b/meta/recipes-extended/shadow/shadow-securetty_4.6.bb
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
deleted file mode 100644
index ef014628f6..0000000000
--- a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Shadow utils requirements for useradd.bbclass"
-HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
-BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
-SECTION = "base utils"
-LICENSE = "BSD | Artistic-1.0"
-LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5"
-
-DEPENDS = "base-passwd"
-
-PR = "r3"
-
-# The sole purpose of this recipe is to provide the /etc/login.defs
-# file for the target sysroot - needed so the shadow-native utilities
-# can add custom users/groups for recipes that use inherit useradd.
-SRC_URI = "file://login.defs_shadow-sysroot"
-
-SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
-SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
-
-S = "${WORKDIR}"
-
-do_install() {
- install -d ${D}${sysconfdir}
- install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
-}
-
-SYSROOT_DIRS += "${sysconfdir}"
-
-# don't create any packages
-# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
-# and this has another copy of /etc/login.defs already provided by shadow
-PACKAGES = ""
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb
new file mode 100644
index 0000000000..79fc8b80b5
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Shadow utils requirements for useradd.bbclass"
+HOMEPAGE = "http://github.com/shadow-maint/shadow"
+BUGTRACKER = "http://github.com/shadow-maint/shadow/issues"
+SECTION = "base utils"
+LICENSE = "BSD | Artistic-1.0"
+LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5"
+
+DEPENDS = "base-passwd"
+
+PR = "r3"
+
+# The sole purpose of this recipe is to provide the /etc/login.defs
+# file for the target sysroot - needed so the shadow-native utilities
+# can add custom users/groups for recipes that use inherit useradd.
+SRC_URI = "file://login.defs_shadow-sysroot"
+
+SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
+SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${sysconfdir}
+ install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
+}
+
+SYSROOT_DIRS += "${sysconfdir}"
+
+# don't create any packages
+# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
+# and this has another copy of /etc/login.defs already provided by shadow
+PACKAGES = ""
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 35a18f8ab0..770c239e96 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -1,28 +1,25 @@
SUMMARY = "Tools to change and administer password and group data"
-HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
-BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
+HOMEPAGE = "http://github.com/shadow-maint/shadow"
+BUGTRACKER = "http://github.com/shadow-maint/shadow/issues"
SECTION = "base/utils"
LICENSE = "BSD | Artistic-1.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \
- file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
+ file://src/passwd.c;beginline=2;endline=30;md5=5720ff729a6ff39ecc9f64555d75f4af"
-DEPENDS = "shadow-native"
-DEPENDS_class-native = ""
-DEPENDS_class-nativesdk = ""
+DEPENDS = "virtual/crypt"
-SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
+UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases"
+SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.tar.gz \
file://shadow-4.1.3-dots-in-usernames.patch \
- file://usermod-fix-compilation-failure-with-subids-disabled.patch \
- file://fix-installation-failure-with-subids-disabled.patch \
- file://0001-Do-not-read-login.defs-before-doing-chroot.patch \
- file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \
+ file://0001-Make-the-sp_lstchg-shadow-field-reproducible-re.-71.patch \
+ file://0001-configure.ac-fix-configure-error-with-dash.patch \
${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://shadow-relaxed-usernames.patch \
"
SRC_URI_append_class-target = " \
file://login_defs_pam.sed \
file://shadow-update-pam-conf.patch \
- file://shadow-relaxed-usernames.patch \
"
SRC_URI_append_class-native = " \
@@ -35,8 +32,8 @@ SRC_URI_append_class-nativesdk = " \
file://0001-Disable-use-of-syslog-for-sysroot.patch \
"
-SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8"
-SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41"
+SRC_URI[md5sum] = "36feb15665338ae3de414f2a88e434db"
+SRC_URI[sha256sum] = "4668f99bd087399c4a586084dc3b046b75f560720d83e92fd23bf7a89dda4d31"
# Additional Policy files for PAM
PAM_SRC_URI = "file://pam.d/chfn \
@@ -49,6 +46,8 @@ PAM_SRC_URI = "file://pam.d/chfn \
inherit autotools gettext
+export CONFIG_SHELL="/bin/sh"
+
EXTRA_OECONF += "--without-audit \
--without-libcrack \
--without-selinux \
@@ -59,9 +58,8 @@ EXTRA_OECONF += "--without-audit \
NSCDOPT = ""
NSCDOPT_class-native = "--without-nscd"
NSCDOPT_class-nativesdk = "--without-nscd"
-NSCDOPT_libc-uclibc = " --without-nscd"
-NSCDOPT_libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)}"
-
+NSCDOPT_libc-glibc = "--with-nscd"
+
PAM_PLUGINS = "libpam-runtime \
pam-plugin-faildelay \
pam-plugin-securetty \
@@ -75,8 +73,9 @@ PAM_PLUGINS = "libpam-runtime \
pam-plugin-shells \
pam-plugin-rootok"
-PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
-PACKAGECONFIG_class-native = ""
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
+PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
PACKAGECONFIG_class-nativesdk = ""
PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
@@ -127,7 +126,8 @@ do_install_append() {
# Ensure that the image has as a /var/spool/mail dir so shadow can
# put mailboxes there if the user reconfigures shadow to its
# defaults (see sed below).
- install -d ${D}${localstatedir}/spool/mail
+ install -m 0775 -d ${D}${localstatedir}/spool/mail
+ chown root:mail ${D}${localstatedir}/spool/mail
if [ -e ${WORKDIR}/pam.d ]; then
install -d ${D}${sysconfdir}/pam.d/
@@ -136,7 +136,7 @@ do_install_append() {
sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs
fi
- install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
+ install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
# Move binaries to the locations we want
rm ${D}${sbindir}/vigr
@@ -171,22 +171,25 @@ inherit update-alternatives
ALTERNATIVE_PRIORITY = "200"
-ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr"
+ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr nologin"
ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
+ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
ALTERNATIVE_${PN}-base = "newgrp groups login su"
ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
-ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1 su.1"
+ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1 su.1 nologin.8"
ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
+ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
-pkg_postinst_${PN} () {
+PACKAGE_WRITE_DEPS += "shadow-native"
+pkg_postinst_${PN}_class-target () {
if [ "x$D" != "x" ]; then
rootarg="--root $D"
else
diff --git a/meta/recipes-extended/shadow/shadow_4.2.1.bb b/meta/recipes-extended/shadow/shadow_4.2.1.bb
deleted file mode 100644
index 5675cb8cc9..0000000000
--- a/meta/recipes-extended/shadow/shadow_4.2.1.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require shadow.inc
-
-# Build falsely assumes that if --enable-libpam is set, we don't need to link against
-# libcrypt. This breaks chsh.
-BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', bb.utils.contains('DISTRO_FEATURES', 'libc-crypt', '-lcrypt', '', d), '', d)}"
-
-BBCLASSEXTEND = "native nativesdk"
-
-
-
diff --git a/meta/recipes-extended/shadow/shadow_4.6.bb b/meta/recipes-extended/shadow/shadow_4.6.bb
new file mode 100644
index 0000000000..c975395ff8
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow_4.6.bb
@@ -0,0 +1,10 @@
+require shadow.inc
+
+# Build falsely assumes that if --enable-libpam is set, we don't need to link against
+# libcrypt. This breaks chsh.
+BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-lcrypt', '', d)}"
+
+BBCLASSEXTEND = "native nativesdk"
+
+
+
diff --git a/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch b/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch
deleted file mode 100644
index 57ebfe4329..0000000000
--- a/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 96eb7e29822151823a66a1eb59f1fa4aead5ae08 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 31 Aug 2015 06:33:21 +0000
-Subject: [PATCH] Fix error: conflicting types for 'posix_close'
-
-Exposed while compiling on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/slposio.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/slposio.c b/src/slposio.c
-index 9ce9697..9ff9bfe 100644
---- a/src/slposio.c
-+++ b/src/slposio.c
-@@ -363,7 +363,7 @@ static int posix_close_fd (int *fd)
- return 0;
- }
-
--static int posix_close (SLFile_FD_Type *f)
-+static int posix_closex (SLFile_FD_Type *f)
- {
- int status = do_close (f);
-
-@@ -1001,7 +1001,7 @@ static SLang_Intrin_Fun_Type Fd_Name_Table [] =
- MAKE_INTRINSIC_2("write", posix_write, V, F, B),
- MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F),
- MAKE_INTRINSIC_2("dup2_fd", posix_dup2, I, F, I),
-- MAKE_INTRINSIC_1("close", posix_close, I, F),
-+ MAKE_INTRINSIC_1("close", posix_closex, I, F),
- MAKE_INTRINSIC_1("_close", posix_close_fd, I, I),
- #if defined(TTYNAME_R)
- MAKE_INTRINSIC_0("ttyname", posix_ttyname, V),
---
-2.5.1
-
diff --git a/meta/recipes-extended/slang/slang/array_test.patch b/meta/recipes-extended/slang/slang/array_test.patch
new file mode 100644
index 0000000000..ccd416f207
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/array_test.patch
@@ -0,0 +1,20 @@
+slang: modify array test
+
+One array test tries to create an array that is far too large and anticipates an exception.
+IndexError will only be thrown for 64 bit machines, so we add InvalidParmError for 32 bit ones.
+
+Upstream-Status: Submitted [jedsoft.org]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/src/test/array.sl
++++ b/src/test/array.sl
+@@ -165,7 +165,7 @@ try
+ {
+ SS = Long_Type[10000,10000,10000,10000,10000,10000];
+ }
+-catch IndexError;
++catch IndexError,InvalidParmError;
+
+ private define array_map2_func ()
+ {
diff --git a/meta/recipes-extended/slang/slang/dont-link-to-host.patch b/meta/recipes-extended/slang/slang/dont-link-to-host.patch
new file mode 100644
index 0000000000..42dba0fae4
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/dont-link-to-host.patch
@@ -0,0 +1,16 @@
+SLANG_INST_LIB is the location of where slang will end up, but when building for
+packaging this doesn't have DESTDIR appended so can potentially link to the host
+for cross builds and will trigger QA errors.
+
+As this is obviously wrong, delete it.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/slsh/Makefile.in b/slsh/Makefile.in
+index cba9d81..4c1c370 100644
+--- a/slsh/Makefile.in
++++ b/slsh/Makefile.in
+@@ -80 +80 @@ SHELL = /bin/sh
+-INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(SLANG_INST_LIB) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS)
++INST_LIBS = $(DEST_LIB_DIR) $(RPATH) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS)
diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
deleted file mode 100644
index a0ec0ff658..0000000000
--- a/meta/recipes-extended/slang/slang/fix-check-pcre.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-fix the pcre existence checking
-
-when check if there is pcre, the configure file always check
-the host dir. now we make it work by adding correct prefix for
-cross-compile environment.
-
-When enable pcre-module, we see a QA warning because rpaths
-hardcoded into the build, rpaths are not needed, so lets turn
-this off.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- configure | 72 +++++---------------------------------------------------------
- 1 file changed, 6 insertions(+), 66 deletions(-)
-
-diff --git a/configure b/configure
---- a/configure
-+++ b/configure
-@@ -7191,6 +7191,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
- /usr/include/pcre,/usr/lib \
- /usr/pcre/include,/usr/pcre/lib \
- /usr/include,/usr/lib \
-+ /usr/include,/usr/lib64 \
- /opt/include/pcre,/opt/lib \
- /opt/pcre/include,/opt/pcre/lib \
- /opt/include,/opt/lib"
-@@ -7221,14 +7222,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
- xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
- xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
- found=0
-- if test -r $xincdir/$xincfile
-+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
- then
- for E in $exts
- do
-- if test -r "$xlibdir/$xlibfile.$E"
-+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
- then
-- jd_pcre_include_dir="$xincdir"
-- jd_pcre_library_dir="$xlibdir"
-+ jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
-+ jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
- jd_with_pcre_library="yes"
- found=1
- break
-@@ -7255,68 +7255,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
- then
- PCRE_LIB=""
- else
--
--if test "X$jd_pcre_library_dir" != "X"
--then
-- if test "X$RPATH" = "X"
-- then
--
--case "$host_os" in
-- *linux*|*solaris* )
-- if test "X$GCC" = Xyes
-- then
-- if test "X$ac_R_nospace" = "Xno"
-- then
-- RPATH="-Wl,-R,"
-- else
-- RPATH="-Wl,-R"
-- fi
-- else
-- if test "X$ac_R_nospace" = "Xno"
-- then
-- RPATH="-R "
-- else
-- RPATH="-R"
-- fi
-- fi
-- ;;
-- *osf*|*openbsd*|*freebsd*)
-- if test "X$GCC" = Xyes
-- then
-- RPATH="-Wl,-rpath,"
-- else
-- RPATH="-rpath "
-- fi
-- ;;
-- *netbsd*)
-- if test "X$GCC" = Xyes
-- then
-- RPATH="-Wl,-R"
-- fi
-- ;;
--esac
--
-- if test "X$RPATH" != "X"
-- then
-- RPATH="$RPATH$jd_pcre_library_dir"
-- fi
-- else
-- _already_there=0
-- for X in `echo $RPATH | sed 's/:/ /g'`
-- do
-- if test "$X" = "$jd_pcre_library_dir"
-- then
-- _already_there=1
-- break
-- fi
-- done
-- if test $_already_there = 0
-- then
-- RPATH="$RPATH:$jd_pcre_library_dir"
-- fi
-- fi
--fi
--
-+ RPATH=""
- fi
-
- PCRE_INC=-I$jd_pcre_include_dir
diff --git a/meta/recipes-extended/slang/slang/no-x.patch b/meta/recipes-extended/slang/slang/no-x.patch
new file mode 100644
index 0000000000..7dc1602fe3
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/no-x.patch
@@ -0,0 +1,18 @@
+There's no need to check for the X libraries as the socket module doesn't use
+anything from X.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/autoconf/configure.ac b/autoconf/configure.ac
+index b61e974..a3e5db2 100644
+--- a/autoconf/configure.ac
++++ b/autoconf/configure.ac
+@@ -72,3 +71,0 @@ AC_SUBST(LIB_READLINE)
+-# For the socket module
+-AC_PATH_XTRA
+-
+--- a/modules/Makefile.in
++++ b/modules/Makefile.in
+@@ -67 +66,0 @@ ZLIB_LIB = @Z_LIB@ -lz
+-SOCKET_LIBS = @X_EXTRA_LIBS@
diff --git a/meta/recipes-extended/slang/slang/rpathfix.patch b/meta/recipes-extended/slang/slang/rpathfix.patch
deleted file mode 100644
index f82a5313d5..0000000000
--- a/meta/recipes-extended/slang/slang/rpathfix.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-Without this patch we see rpaths hardcoded into the build which results in QA
-warnings. These rpaths are not needed so lets turn this off.
-
-Upstream-Status: Inappropriate
-(but could be turned into a proper configure option)
-
-RP 2012/03/14
-
-Index: slang-2.2.4/configure
-===================================================================
---- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000
-+++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000
-@@ -6246,68 +6246,7 @@ esac
- ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS"
- CFLAGS="$CFLAGS $IEEE_CFLAGS"
-
--
--if test "X$libdir" != "X"
--then
-- if test "X$RPATH" = "X"
-- then
--
--case "$host_os" in
-- *linux*|*solaris* )
-- if test "X$GCC" = Xyes
-- then
-- if test "X$ac_R_nospace" = "Xno"
-- then
-- RPATH="-Wl,-R,"
-- else
-- RPATH="-Wl,-R"
-- fi
-- else
-- if test "X$ac_R_nospace" = "Xno"
-- then
-- RPATH="-R "
-- else
-- RPATH="-R"
-- fi
-- fi
-- ;;
-- *osf*|*openbsd*|*freebsd*)
-- if test "X$GCC" = Xyes
-- then
-- RPATH="-Wl,-rpath,"
-- else
-- RPATH="-rpath "
-- fi
-- ;;
-- *netbsd*)
-- if test "X$GCC" = Xyes
-- then
-- RPATH="-Wl,-R"
-- fi
-- ;;
--esac
--
-- if test "X$RPATH" != "X"
-- then
-- RPATH="$RPATH$libdir"
-- fi
-- else
-- _already_there=0
-- for X in `echo $RPATH | sed 's/:/ /g'`
-- do
-- if test "$X" = "$libdir"
-- then
-- _already_there=1
-- break
-- fi
-- done
-- if test $_already_there = 0
-- then
-- RPATH="$RPATH:$libdir"
-- fi
-- fi
--fi
--
-+RPATH=""
-
- # The cast to long int works around a bug in the HP C Compiler
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
diff --git a/meta/recipes-extended/slang/slang/run-ptest b/meta/recipes-extended/slang/slang/run-ptest
new file mode 100644
index 0000000000..39f474af31
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -C test runtests
diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
deleted file mode 100644
index 850551ef0a..0000000000
--- a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001
-From: Zheng Junling <zhengjunling@huawei.com>
-Date: Mon, 16 Jun 2014 12:51:25 +0000
-Subject: [PATCH] slang: fix the iconv existence checking
-
-When checking whether there is iconv, the configure file always check
-the host env.
-
-Now we make it working properly by adding correct prefix for cross-
-compiling environment.
-
-When enabling iconv-module, we see a QA warning because rpaths hardcoded
-into the build. And rpaths are not needed, so let's turn this off.
-
-This patch is generated by referencing the existing "fix-check-pcre"
-patch.
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Zheng Junling <zhengjunling@huawei.com>
----
- configure | 72 +++++---------------------------------------------------------
- 1 file changed, 6 insertions(+), 66 deletions(-)
-
-diff --git a/configure b/configure
-index fa395ff..7fa769c 100755
---- a/configure
-+++ b/configure
-@@ -8259,6 +8259,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
- /usr/include/iconv,/usr/lib \
- /usr/iconv/include,/usr/iconv/lib \
- /usr/include,/usr/lib \
-+ /usr/include,/usr/lib64 \
- /opt/include/iconv,/opt/lib \
- /opt/iconv/include,/opt/iconv/lib \
- /opt/include,/opt/lib"
-@@ -8289,14 +8290,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
- xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
- xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
- found=0
-- if test -r $xincdir/$xincfile
-+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
- then
- for E in $exts
- do
-- if test -r "$xlibdir/$xlibfile.$E"
-+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
- then
-- jd_iconv_include_dir="$xincdir"
-- jd_iconv_library_dir="$xlibdir"
-+ jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
-+ jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
- jd_with_iconv_library="yes"
- found=1
- break
-@@ -8201,68 +8201,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; }
- then
- ICONV_LIB=""
- else
--
--if test "X$jd_iconv_library_dir" != "X"
--then
-- if test "X$RPATH" = "X"
-- then
--
--case "$host_os" in
-- *linux*|*solaris* )
-- if test "X$GCC" = Xyes
-- then
-- if test "X$ac_R_nospace" = "Xno"
-- then
-- RPATH="-Wl,-R,"
-- else
-- RPATH="-Wl,-R"
-- fi
-- else
-- if test "X$ac_R_nospace" = "Xno"
-- then
-- RPATH="-R "
-- else
-- RPATH="-R"
-- fi
-- fi
-- ;;
-- *osf*|*openbsd*|*freebsd*)
-- if test "X$GCC" = Xyes
-- then
-- RPATH="-Wl,-rpath,"
-- else
-- RPATH="-rpath "
-- fi
-- ;;
-- *netbsd*)
-- if test "X$GCC" = Xyes
-- then
-- RPATH="-Wl,-R"
-- fi
-- ;;
--esac
--
-- if test "X$RPATH" != "X"
-- then
-- RPATH="$RPATH$jd_iconv_library_dir"
-- fi
-- else
-- _already_there=0
-- for X in `echo $RPATH | sed 's/:/ /g'`
-- do
-- if test "$X" = "$jd_iconv_library_dir"
-- then
-- _already_there=1
-- break
-- fi
-- done
-- if test $_already_there = 0
-- then
-- RPATH="$RPATH:$jd_iconv_library_dir"
-- fi
-- fi
--fi
--
-+ RPATH=""
- fi
-
- ICONV_INC=-I$jd_iconv_include_dir
diff --git a/meta/recipes-extended/slang/slang/terminfo_fixes.patch b/meta/recipes-extended/slang/slang/terminfo_fixes.patch
new file mode 100644
index 0000000000..3e6d15aa79
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/terminfo_fixes.patch
@@ -0,0 +1,148 @@
+Do not use the JD_TERMCAP macro since we cannot get the terminfo from
+ncurses pkg-config, but fix the macro to not reference host directories.
+Also add src/test/Makefile.in so that we can use -ltermcap if we want to.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/autoconf/aclocal.m4
++++ b/autoconf/aclocal.m4
+@@ -506,14 +506,10 @@ then
+ else
+ MISC_TERMINFO_DIRS=""
+ fi
+-JD_Terminfo_Dirs="$MISC_TERMINFO_DIRS \
+- /usr/lib/terminfo \
+- /usr/share/terminfo \
+- /usr/share/lib/terminfo \
+- /usr/local/lib/terminfo"
++
+ TERMCAP=-ltermcap
+
+-for terminfo_dir in $JD_Terminfo_Dirs
++for terminfo_dir in $MISC_TERMINFO_DIRS
+ do
+ if test -d $terminfo_dir
+ then
+--- a/autoconf/configure.ac
++++ b/autoconf/configure.ac
+@@ -249,7 +249,14 @@ AC_CHECK_SIZEOF(size_t)
+ JD_CHECK_LONG_LONG
+ JD_LARGE_FILE_SUPPORT
+
+-JD_TERMCAP
++dnl Do not use JD_TERMCAP, since we cannot get terminfo from ncurses*-config anymore.
++dnl Set TERMCAP=-ltermcap and AC_DEFINE(USE_TERMCAP,1,[Define to use termcap])
++dnl to use libtermcap.
++TERMCAP=""
++MISC_TERMINFO_DIRS=""
++AC_SUBST(TERMCAP)dnl
++AC_SUBST(MISC_TERMINFO_DIRS)dnl
++
+ JD_GCC_WARNINGS
+
+ JD_SET_OBJ_SRC_DIR(src)
+@@ -364,7 +371,7 @@ AC_CONFIG_HEADER(src/sysconf.h:src/confi
+ dnl AC_CONFIG_SUBDIRS(demo)
+
+ AC_OUTPUT(Makefile:autoconf/Makefile.in \
+- src/Makefile slsh/Makefile modules/Makefile demo/Makefile \
++ src/Makefile src/test/Makefile slsh/Makefile modules/Makefile demo/Makefile \
+ slang.pc:autoconf/slangpc.in \
+ )
+
+--- /dev/null
++++ b/src/test/Makefile.in
+@@ -0,0 +1,90 @@
++# -*- make -*-
++TEST_SCRIPTS_SLC = argv syntax scircuit eqs sscanf loops arith array strops \
++ bstring pack stdio assoc selfload struct nspace path ifeval anytype arrmult \
++ time utf8 except bugs list regexp method deref naninf overflow sort \
++ longlong signal dollar req docfun debug qualif compare break multline \
++ stack misc posixio posdir proc math
++
++TEST_SCRIPTS_NO_SLC = autoload nspace2 prep
++
++TEST_SCRIPTS = $(TEST_SCRIPTS_SLC) $(TEST_SCRIPTS_NO_SLC)
++
++TEST_PGM = sltest
++MEMCHECK = valgrind --tool=memcheck --leak-check=yes --leak-resolution=med --num-callers=20
++RUN_TEST_PGM = ./$(TEST_PGM)
++SLANGINC = ..
++SLANGLIB = ../$(ARCH)objs
++OTHER_LIBS = -lm @TERMCAP@
++OTHER_CFLAGS =
++
++runtests: $(TEST_PGM) cleantmp
++ @tests=""; \
++ for test in $(TEST_SCRIPTS); \
++ do \
++ tests="$$tests $$test.sl"; \
++ done; \
++ for test in $(TEST_SCRIPTS_SLC); \
++ do \
++ tests="$$tests $$test.slc"; \
++ done; \
++ MAKERUNNING=1 ./runtests.sh $$tests
++# @touch $(TEST_PGM).c
++
++update: $(TEST_PGM) cleantmp
++ @tests=""; \
++ for X in $(TEST_SCRIPTS); \
++ do \
++ if [ ! -e lastrun/$$X.sl ] || [ $$X.sl -nt lastrun/$$X.sl ] ; \
++ then \
++ tests="$$tests $$X.sl"; \
++ fi \
++ done; \
++ for X in $(TEST_SCRIPTS_SLC); \
++ do \
++ if [ ! -e lastrun/$$X.slc ] || [ $$X.sl -nt lastrun/$$X.slc ] ; \
++ then \
++ tests="$$tests $$X.slc"; \
++ fi \
++ done; \
++ if test -n "$$tests"; \
++ then \
++ MAKERUNNING=1 ./runtests.sh $$tests; \
++ fi
++# @touch $(TEST_PGM).c
++
++memcheck_runtests: $(TEST_PGM) cleantmp
++ @echo ""
++ @echo "Running tests:"
++ @echo ""
++ -@for X in $(TEST_SCRIPTS); \
++ do \
++ $(MEMCHECK) --log-file=log.$${X} $(RUN_TEST_PGM) $$X.sl; \
++ grep ERROR log.$${X}; grep 'lost: [^0]' log.$${X}; \
++ $(MEMCHECK) --log-file=log.$${X}_u $(RUN_TEST_PGM) -utf8 $$X.sl; \
++ grep ERROR log.$${X}_u; grep 'lost: [^0]' log.$${X}_u; \
++ done
++# touch $(TEST_PGM).c
++
++memcheck_runtests_slc: $(TEST_PGM) cleantmp
++ @echo ""
++ @echo "Running tests:"
++ @echo ""
++ -@for X in $(TEST_SCRIPTS_SLC); \
++ do \
++ $(MEMCHECK) --log-file=log.$${X}_c $(RUN_TEST_PGM) $$X.slc; \
++ $(MEMCHECK) --log-file=log.$${X}_uc $(RUN_TEST_PGM) -utf8 $$X.slc; \
++ done
++# touch $(TEST_PGM).c
++
++memcheck: memcheck_runtests memcheck_runtests_slc
++
++$(TEST_PGM): $(TEST_PGM).c assoc.c list.c $(SLANGLIB)/libslang.a
++ $(CC) $(CFLAGS) $(OTHER_CFLAGS) $(LDFLAGS) $(TEST_PGM).c -o $(TEST_PGM) -I$(SLANGINC) -L$(SLANGLIB) -lslang $(OTHER_LIBS)
++cleantmp:
++ -/bin/rm -rf tmpfile*.* tmpdir*.*
++clean: cleantmp
++ -/bin/rm -f *~ *.o *.log log.pid* *.slc log.* *.log-*
++distclean: clean
++ /bin/rm -f $(TEST_PGM) $(TEST_PGM).gcda $(TEST_PGM).gcno
++.PHONY: clean memcheck runtests memcheck_runtests_slc memcheck_runtests cleantmp
++
diff --git a/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch b/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch
new file mode 100644
index 0000000000..27a9bb87ea
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch
@@ -0,0 +1,30 @@
+From 38688ee2754415cf2a1935dafb8278861b7315e7 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <sstrogin@cisco.com>
+Date: Thu, 2 Mar 2017 00:26:31 +0200
+Subject: [PATCH] test: add output in the format "result: testname"
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Stefan Strogin <sstrogin@cisco.com>
+---
+ src/test/runtests.sh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/test/runtests.sh b/src/test/runtests.sh
+index a3eaad0..64f0705 100755
+--- a/src/test/runtests.sh
++++ b/src/test/runtests.sh
+@@ -34,8 +34,10 @@ do
+ then
+ n_failed=`expr ${n_failed} + 1`
+ tests_failed="$tests_failed $testfile"
++ echo "FAIL: $testfile"
+ else
+ touch lastrun/$testfile
++ echo "PASS: $testfile"
+ fi
+ done
+
+--
+2.11.0
+
diff --git a/meta/recipes-extended/slang/slang_2.3.0.bb b/meta/recipes-extended/slang/slang_2.3.0.bb
deleted file mode 100644
index 17efbbe223..0000000000
--- a/meta/recipes-extended/slang/slang_2.3.0.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "The shared library for the S-Lang extension language"
-
-DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
-S-Lang language was designed so that it can be easily embedded into \
-a program to provide the program with a powerful extension language. \
-The S-Lang library, provided in this package, provides the S-Lang \
-extension language. S-Lang's syntax resembles C, which makes it easy \
-to recode S-Lang procedures in C if you need to."
-
-HOMEPAGE = "http://www.jedsoft.org/slang/"
-SECTION = "libs"
-DEPENDS = "pcre ncurses"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
-
-
-SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
- file://rpathfix.patch \
- file://fix-check-pcre.patch \
- file://slang-fix-the-iconv-existence-checking.patch \
- file://0001-Fix-error-conflicting-types-for-posix_close.patch \
- "
-UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
-
-inherit autotools-brokensep
-
-CLEANBROKEN = "1"
-
-SRC_URI[md5sum] = "3bcc790460d52db1316c20395b7ac2f1"
-SRC_URI[sha256sum] = "f95224060f45e0d8212a5039b339afa5f1a94a1bb0298e796104e5b12e926129"
-
-EXTRA_OECONF += " --without-z --without-png --without-onig --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib"
-
-do_configure_prepend() {
- # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
- # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
- # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
- cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* .
- cd ${B}
-}
-
-do_install() {
- oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib'
-}
-
-FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
-
-PARALLEL_MAKE = ""
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/slang/slang_2.3.2.bb b/meta/recipes-extended/slang/slang_2.3.2.bb
new file mode 100644
index 0000000000..99efb16da6
--- /dev/null
+++ b/meta/recipes-extended/slang/slang_2.3.2.bb
@@ -0,0 +1,84 @@
+SUMMARY = "The shared library for the S-Lang extension language"
+
+DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
+S-Lang language was designed so that it can be easily embedded into \
+a program to provide the program with a powerful extension language. \
+The S-Lang library, provided in this package, provides the S-Lang \
+extension language. S-Lang's syntax resembles C, which makes it easy \
+to recode S-Lang procedures in C if you need to."
+
+HOMEPAGE = "http://www.jedsoft.org/slang/"
+SECTION = "libs"
+DEPENDS = "ncurses virtual/libiconv"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
+
+SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
+ file://no-x.patch \
+ file://dont-link-to-host.patch \
+ file://test-add-output-in-the-format-result-testname.patch \
+ file://terminfo_fixes.patch \
+ file://array_test.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "c2d5a7aa0246627da490be4e399c87cb"
+SRC_URI[sha256sum] = "fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a"
+
+UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
+PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/ \n"
+
+inherit autotools-brokensep ptest
+CLEANBROKEN = "1"
+
+EXTRA_OECONF = "--without-onig"
+# There's no way to turn off rpaths and slang will -rpath to the default search
+# path. Unset RPATH to stop this.
+EXTRA_OEMAKE = "RPATH=''"
+
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre"
+PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng"
+PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib"
+
+do_configure_prepend() {
+ cd ${S}/autoconf
+ # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
+ # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
+ # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
+ gnu-configize --force && mv autoconf/config.* .
+ # For the same reason we also need to run autoconf manually.
+ autoconf && mv configure ..
+ cd ${B}
+}
+
+do_compile_ptest() {
+ oe_runmake -C src static
+ oe_runmake -C src/test sltest
+}
+
+do_install_ptest() {
+ mkdir ${D}${PTEST_PATH}/test
+ for f in Makefile sltest runtests.sh *.sl *.inc; do
+ cp ${S}/src/test/$f ${D}${PTEST_PATH}/test/
+ done
+ sed -e 's/\ \$(TEST_PGM)\.c\ assoc\.c\ list\.c\ \$(SLANGLIB)\/libslang\.a//' \
+ -e '/\$(CC).*(TEST_PGM)/d' \
+ -i ${D}${PTEST_PATH}/test/Makefile
+
+ cp ${S}/slsh/lib/require.sl ${D}${PTEST_PATH}/test/
+ sed -i 's/\.\.\/\.\.\/slsh\/lib\/require\.sl/require\.sl/' ${D}${PTEST_PATH}/test/req.sl
+
+ cp ${S}/doc/text/slangfun.txt ${D}${PTEST_PATH}/test/
+ sed -i 's/\.\.\/\.\.\/doc\/text\/slangfun\.txt/slangfun\.txt/' ${D}${PTEST_PATH}/test/docfun.sl
+}
+
+FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
+
+RDEPENDS_${PN}-ptest += "make"
+
+PARALLEL_MAKE = ""
+PARALLEL_MAKEINST = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch b/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
deleted file mode 100644
index 032995db8f..0000000000
--- a/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-This patch fixies the wrong return code of stat -h.
-
-Upstream-Status: Pending
-Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com>
-
---- stat-3.3/stat.c.orig 2013-08-22 10:49:45.000000000 +0800
-+++ stat-3.3/stat.c 2013-08-22 10:50:31.000000000 +0800
-@@ -845,7 +845,7 @@
- fprintf(stderr, "\t\t%%S - Security ID in SE-Linux\n");
- fprintf(stderr, "\t\t%%C - Security context in SE-Linux\n");
- fprintf(stderr, "\t\t%%d - Free file nodes in file system\n");
-- exit(1);
-+ exit(0);
- }
-
-
diff --git a/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch b/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch
deleted file mode 100644
index 0c01ed0383..0000000000
--- a/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-stat: Fixing security formatting issues
-
-Fix security formatting issues related to printf without NULL argument
-
-stat.c: In function 'print_human_access':
-stat.c:292:13: error: format not a string literal and no format arguments [-Werror=format-security]
- printf (access);
- ^
-stat.c: In function 'print_human_time':
-stat.c:299:57: error: format not a string literal and no format arguments [-Werror=format-security]
- if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
- ^
-stat.c: In function 'print_it':
-stat.c:613:6: error: format not a string literal and no format arguments [-Werror=format-security]
- printf(b);
- ^
-stat.c:642:6: error: format not a string literal and no format arguments [-Werror=format-security]
- printf(b);
- ^
-
-[YOCTO #9550]
-[https://bugzilla.yoctoproject.org/show_bug.cgi?id=9550]
-
-Upstream-Status: Pending
-
-Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
-
-diff --git a/stat.c b/stat.c
-index 1ed07a9..2be6f62 100644
---- a/stat.c
-+++ b/stat.c
-@@ -289,15 +289,15 @@ void print_human_access(struct stat *statbuf)
- default:
- access[0] = '?';
- }
-- printf (access);
-+ fputs(access,stdout);
- }
-
- void print_human_time(time_t *t)
- {
- char str[40];
-
-- if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
-- else printf("Cannot calculate human readable time, sorry");
-+ if (strftime(str, 40, "%c", localtime(t)) > 0) fputs(str,stdout);
-+ else fputs("Cannot calculate human readable time, sorry",stdout);
- }
-
- /* print statfs info */
-@@ -610,7 +610,7 @@ void print_it(char *masterformat, char *filename,
- {
- strcpy (pformat, "%");
- *m++ = '\0';
-- printf(b);
-+ fputs(b,stdout);
-
- /* copy all format specifiers to our format string */
- while (isdigit(*m) || strchr("#0-+. I", *m))
-@@ -639,7 +639,7 @@ void print_it(char *masterformat, char *filename,
- }
- else
- {
-- printf(b);
-+ fputs(b,stdout);
- b = NULL;
- }
- }
diff --git a/meta/recipes-extended/stat/stat_3.3.bb b/meta/recipes-extended/stat/stat_3.3.bb
deleted file mode 100644
index 0697c73908..0000000000
--- a/meta/recipes-extended/stat/stat_3.3.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Command line file status display utility"
-DESCRIPTION = "Displays all information about a file that the stat() call provides and all information about a filesystem that statfs() provides."
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
- file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/${BP}.tar.gz \
- file://fix-security-format.patch \
- file://fix-error-return.patch"
-
-SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
-SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_install() {
- install -d ${D}${base_bindir} ${D}${mandir}/man1
- install -m 755 stat ${D}${base_bindir}/stat.stat
- install -m 644 stat.1 ${D}${mandir}/man1
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "stat"
-ALTERNATIVE_PRIORITY[stat] = "200"
-ALTERNATIVE_LINK_NAME[stat] = "${base_bindir}/stat"
-ALTERNATIVE_TARGET[stat] = "${base_bindir}/stat.stat"
-
-ALTERNATIVE_${PN}-doc = "stat.1"
-ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
-
-BBCLASSEXTEND = "native"
-
diff --git a/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch b/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch
new file mode 100644
index 0000000000..c860c717ac
--- /dev/null
+++ b/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch
@@ -0,0 +1,23 @@
+From bbc85a439672120fa1d36be79e959b28fe840919 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 30 Jul 2019 18:38:03 +0200
+Subject: [PATCH] Do not preserve ownership when installing example jobs
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index f36e57e..20488af 100644
+--- a/Makefile
++++ b/Makefile
+@@ -452,6 +452,6 @@ install: stress-ng stress-ng.1.gz
+ mkdir -p ${DESTDIR}${MANDIR}
+ cp stress-ng.1.gz ${DESTDIR}${MANDIR}
+ mkdir -p ${DESTDIR}${JOBDIR}
+- cp -rp example-jobs/*.job ${DESTDIR}${JOBDIR}
++ cp -r example-jobs/*.job ${DESTDIR}${JOBDIR}
+ mkdir -p ${DESTDIR}${BASHDIR}
+ cp bash-completion/stress-ng ${DESTDIR}${BASHDIR}
diff --git a/meta/recipes-extended/stress-ng/stress-ng_0.10.11.bb b/meta/recipes-extended/stress-ng/stress-ng_0.10.11.bb
new file mode 100644
index 0000000000..6173ace866
--- /dev/null
+++ b/meta/recipes-extended/stress-ng/stress-ng_0.10.11.bb
@@ -0,0 +1,25 @@
+SUMMARY = "System load testing utility"
+DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \
+imposes a configurable amount of CPU, memory, I/O, and disk stress on the system."
+HOMEPAGE = "https://kernel.ubuntu.com/~cking/stress-ng/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "https://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.xz \
+ file://0001-Do-not-preserve-ownership-when-installing-example-jo.patch \
+ "
+SRC_URI[md5sum] = "03e836175d039cd69a64d2790b9d1a98"
+SRC_URI[sha256sum] = "b84d38a336300fe1c5ae97d13a7154e7a6ea7056fcb690f602ea32bbab2be49b"
+
+DEPENDS = "coreutils-native"
+
+PROVIDES = "stress"
+RPROVIDES_${PN} = "stress"
+RREPLACES_${PN} = "stress"
+RCONFLICTS_${PN} = "stress"
+
+inherit bash-completion
+
+do_install() {
+ oe_runmake DESTDIR=${D} install
+}
diff --git a/meta/recipes-extended/stress/files/texinfo.patch b/meta/recipes-extended/stress/files/texinfo.patch
deleted file mode 100644
index 5ac595192f..0000000000
--- a/meta/recipes-extended/stress/files/texinfo.patch
+++ /dev/null
@@ -1,79 +0,0 @@
---- a/doc/stress.texi
-+++ b/doc/stress.texi
-@@ -62,47 +62,47 @@
-
- @table @samp
- @item -?
--@itemx --help
-+@item --help
- Show help information.
-
--@itemx --version
-+@item --version
- Show version information.
-
- @item -v
--@itemx --verbose
-+@item --verbose
- Turn up verbosity.
-
- @item -q
--@itemx --quiet
-+@item --quiet
- Turn down verbosity.
-
- @item -n
--@itemx --dry-run
-+@item --dry-run
- Show what would have been done.
-
- @item -t @var{secs}
--@itemx --timeout @var{secs}
-+@item --timeout @var{secs}
- Time out after @var{secs} seconds.
-
--@itemx --backoff @var{usecs}
-+@item --backoff @var{usecs}
- Wait for factor of @var{usecs} microseconds before starting work.
-
- @item -c @var{forks}
--@itemx --cpu @var{forks}
-+@item --cpu @var{forks}
- Spawn @var{forks} processes each spinning on @samp{sqrt()}.
-
- @item -i @var{forks}
--@itemx --io @var{forks}
-+@item --io @var{forks}
- Spawn @var{forks} processes each spinning on @samp{sync()}.
-
- @item -m @var{forks}
--@itemx --vm @var{forks}
-+@item --vm @var{forks}
- Spawn @var{forks} processes each spinning on @samp{malloc()}.
-
--@itemx --vm-bytes @var{bytes}
-+@item --vm-bytes @var{bytes}
- Allocate @var{bytes} number of bytes. The default is 1.
-
--@itemx --vm-hang
-+@item --vm-hang
- Instruct each vm hog process to go to sleep after allocating memory. This
- contrasts with their normal behavior, which is to free the memory and
- reallocate @emph{ad infinitum}. This is useful for simulating low memory
-@@ -114,13 +114,13 @@
- @end example
-
- @item -d @var{forks}
--@itemx --hdd @var{forks}
-+@item --hdd @var{forks}
- Spawn @var{forks} processes each spinning on @samp{write()}.
-
--@itemx --hdd-bytes @var{bytes}
-+@item --hdd-bytes @var{bytes}
- Write @var{bytes} number of bytes. The default is 1GB.
-
--@itemx --hdd-noclean
-+@item --hdd-noclean
- Do not unlink file(s) to which random ASCII data is written.
-
- @end table
diff --git a/meta/recipes-extended/stress/stress_1.0.4.bb b/meta/recipes-extended/stress/stress_1.0.4.bb
deleted file mode 100644
index e9179d3e19..0000000000
--- a/meta/recipes-extended/stress/stress_1.0.4.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "System load testing utility"
-DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \
-imposes a configurable amount of CPU, memory, I/O, and disk stress on the system."
-HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SRC_URI = "http://people.seas.harvard.edu/~apw/${BPN}/${BP}.tar.gz \
- file://texinfo.patch \
- "
-
-SRC_URI[md5sum] = "890a4236dd1656792f3ef9a190cf99ef"
-SRC_URI[sha256sum] = "057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b"
-
-inherit autotools
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
index a25876b7fc..67815fa858 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -4,20 +4,25 @@ HOMEPAGE = "http://www.sudo.ws"
BUGTRACKER = "http://www.sudo.ws/bugs/"
SECTION = "admin"
LICENSE = "ISC & BSD & Zlib"
-LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=c16e542408abda013d672be8eb88d174 \
- file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=cfe41112f96c19a074934d128f45c693 \
- file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \
- file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
- file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
- file://lib/util/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \
- file://lib/util/snprintf.c;beginline=6;endline=34;md5=c82c1b3a5c32e08545c9ec5d71e41e50 \
- file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
- file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a"
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=6c76b73603ac7763ab0516ebfbe67b42 \
+ file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=03e35317699ba00b496251e0dfe9f109 \
+ file://lib/util/reallocarray.c;beginline=3;endline=15;md5=397dd45c7683e90b9f8bf24638cf03bf \
+ file://lib/util/fnmatch.c;beginline=3;endline=27;md5=004d7d2866ba1f5b41174906849d2e0f \
+ file://lib/util/getcwd.c;beginline=2;endline=27;md5=50f8d9667750e18dea4e84a935c12009 \
+ file://lib/util/glob.c;beginline=2;endline=31;md5=2852f68687544e3eb8a0a61665506f0e \
+ file://lib/util/snprintf.c;beginline=3;endline=33;md5=b70df6179969e38fcf68da91b53b8029 \
+ file://include/sudo_queue.h;beginline=2;endline=27;md5=ad578e9664d17a010b63e4bc0576ee8d \
+ file://lib/util/inet_pton.c;beginline=3;endline=17;md5=27785c9f5835093eda42aa0816a2d0b4 \
+ file://lib/util/arc4random.c;beginline=3;endline=20;md5=ced8636ecefa2ba907cfe390bc3bd964 \
+ file://lib/util/arc4random_uniform.c;beginline=3;endline=17;md5=e30c2b777cdc00cfcaf7c445a10b262f \
+ file://lib/util/getentropy.c;beginline=1;endline=19;md5=a0f58be3d60b6dcd898ec5fe0866d36f \
+ "
inherit autotools
PACKAGECONFIG ??= ""
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel"
CONFFILES_${PN} = "${sysconfdir}/sudoers"
@@ -27,6 +32,12 @@ EXTRA_OECONF_append_libc-musl = " --disable-hardening "
# mksigname/mksiglist are used on build host to generate source files
do_compile_prepend () {
+ # Remove build host references from sudo_usage.h
+ sed -i \
+ -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's,--build=${BUILD_SYS},,g' \
+ -e 's,--host=${HOST_SYS},,g' \
+ ${B}/src/sudo_usage.h
oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C lib/util mksigname mksiglist
}
diff --git a/meta/recipes-extended/sudo/sudo_1.8.17p1.bb b/meta/recipes-extended/sudo/sudo_1.8.17p1.bb
deleted file mode 100644
index 614ad5c320..0000000000
--- a/meta/recipes-extended/sudo/sudo_1.8.17p1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require sudo.inc
-
-SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://0001-Include-sys-types.h-for-id_t-definition.patch \
- "
-
-PAM_SRC_URI = "file://sudo.pam"
-
-SRC_URI[md5sum] = "50a840a688ceb6fa3ab24fc0adf4fa23"
-SRC_URI[sha256sum] = "c690d707fb561b3ecdf6a6de5563bc0b769388eff201c851edbace408bb155cc"
-
-DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
-
-EXTRA_OECONF += " \
- ac_cv_type_rsize_t=no \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
- "
-
-do_install_append () {
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
- fi
-
- chmod 4111 ${D}${bindir}/sudo
- chmod 0440 ${D}${sysconfdir}/sudoers
-
- # Explicitly remove the ${localstatedir}/run directory to avoid QA error
- rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
-}
-
-FILES_${PN} += "${libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
- ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/meta/recipes-extended/sudo/sudo_1.8.29.bb b/meta/recipes-extended/sudo/sudo_1.8.29.bb
new file mode 100644
index 0000000000..8da2d64631
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo_1.8.29.bb
@@ -0,0 +1,40 @@
+require sudo.inc
+
+SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://0001-Include-sys-types.h-for-id_t-definition.patch \
+ "
+
+PAM_SRC_URI = "file://sudo.pam"
+
+SRC_URI[md5sum] = "b28dabff9c460f115fe74de4d6a6f79d"
+SRC_URI[sha256sum] = "ce53ffac9604e23321334d8ba8ac59ded2bcf624fdb9dbde097ab2049bf29c7c"
+
+DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
+
+EXTRA_OECONF += " \
+ ac_cv_type_rsize_t=no \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${nonarch_libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
+ "
+
+do_install_append () {
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+ if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then
+ echo 'auth required pam_wheel.so use_uid' >>${D}${sysconfdir}/pam.d/sudo
+ sed -i 's/# \(%wheel ALL=(ALL) ALL\)/\1/' ${D}${sysconfdir}/sudoers
+ fi
+ fi
+
+ chmod 4111 ${D}${bindir}/sudo
+ chmod 0440 ${D}${sysconfdir}/sudoers
+
+ # Explicitly remove the /run directory to avoid QA error
+ rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo
+}
+
+FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
+FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
+ ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch b/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
deleted file mode 100644
index 9567946c0c..0000000000
--- a/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From f0af5bcfd753691652eac35efbcb208c933253f1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 31 Aug 2015 05:11:53 +0000
-Subject: [PATCH] Fix build with musl
-
-Explicitly include fcntl.h since with glibc is comes in as indirect
-include but not with musl
-
-linux/time.h inclusion is not required on musl so using !__GLIBC__ is
-not right for musl here
-
-wait type is glibc specific
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- klogd.c | 10 +---------
- ksym_mod.c | 5 +----
- pidfile.c | 1 +
- syslog.c | 3 ++-
- syslogd.c | 4 +---
- 5 files changed, 6 insertions(+), 17 deletions(-)
-
-diff --git a/klogd.c b/klogd.c
-index 6cc80ed..9219671 100644
---- a/klogd.c
-+++ b/klogd.c
-@@ -260,11 +260,8 @@
- #include <unistd.h>
- #include <signal.h>
- #include <errno.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/stat.h>
--#if !defined(__GLIBC__)
--#include <linux/time.h>
--#endif /* __GLIBC__ */
- #include <stdarg.h>
- #include <paths.h>
- #include <stdlib.h>
-@@ -277,13 +274,8 @@
-
- #define __LIBRARY__
- #include <linux/unistd.h>
--#if !defined(__GLIBC__)
--# define __NR_ksyslog __NR_syslog
--_syscall3(int,ksyslog,int, type, char *, buf, int, len);
--#else
- #include <sys/klog.h>
- #define ksyslog klogctl
--#endif
-
- #define LOG_BUFFER_SIZE 4096
- #define LOG_LINE_LENGTH 1000
-diff --git a/ksym_mod.c b/ksym_mod.c
-index 68cd6b6..6e26da1 100644
---- a/ksym_mod.c
-+++ b/ksym_mod.c
-@@ -113,12 +113,9 @@
- #include <unistd.h>
- #include <signal.h>
- #include <errno.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/stat.h>
- #include "module.h"
--#if !defined(__GLIBC__)
--#include <linux/time.h>
--#endif /* __GLIBC__ */
- #include <stdarg.h>
- #include <paths.h>
- #include <linux/version.h>
-diff --git a/pidfile.c b/pidfile.c
-index e0959a0..6daa2e0 100644
---- a/pidfile.c
-+++ b/pidfile.c
-@@ -31,6 +31,7 @@
- #include <string.h>
- #include <errno.h>
- #include <signal.h>
-+#include <fcntl.h>
-
- /* read_pid
- *
-diff --git a/syslog.c b/syslog.c
-index bdb3ff2..ef7b34e 100644
---- a/syslog.c
-+++ b/syslog.c
-@@ -55,7 +55,7 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/file.h>
--#include <sys/signal.h>
-+//#include <sys/signal.h>
- #include <sys/syslog.h>
- #if 0
- #include "syslog.h"
-@@ -72,6 +72,7 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
- #include <stdarg.h>
- #include <paths.h>
- #include <stdio.h>
-+#include <fcntl.h>
-
- #define _PATH_LOGNAME "/dev/log"
-
-diff --git a/syslogd.c b/syslogd.c
-index ea73ea5..1ca0595 100644
---- a/syslogd.c
-+++ b/syslogd.c
-@@ -818,9 +818,7 @@ void doexit(int sig);
- void init();
- void cfline(char *line, register struct filed *f);
- int decode(char *name, struct code *codetab);
--#if defined(__GLIBC__)
- #define dprintf mydprintf
--#endif /* __GLIBC__ */
- static void dprintf(char *, ...);
- static void allocate_log(void);
- void sighup_handler();
-@@ -2094,7 +2092,7 @@ void reapchild()
- (void) signal(SIGCHLD, reapchild); /* reset signal handler -ASP */
- wait ((int *)0);
- #else
-- union wait status;
-+ int status;
-
- while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0)
- ;
---
-2.5.1
-
diff --git a/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch b/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch
new file mode 100644
index 0000000000..b2d45c0a0a
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch
@@ -0,0 +1,44 @@
+From 8c7995ac8da99eed55bf5410c558b1f0a74998d0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 7 Dec 2019 10:27:28 -0800
+Subject: [PATCH 1/2] Remove __BEGIN_DECLS/__END_DECLS
+
+The __BEGIN_DECLS and __END_DECLS are internal identifiers in glibc and
+are not defined in any standard. Using them fails build on musl
+libc, its better to avoid them
+
+Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/10]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/syslog.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/syslog.h b/src/syslog.h
+index 4fb7627..120a18f 100644
+--- a/src/syslog.h
++++ b/src/syslog.h
+@@ -221,7 +221,9 @@ struct syslog_data {
+ .log_mask = 0xff, \
+ }
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ void openlog (const char *, int, int);
+ void closelog (void);
+
+@@ -245,7 +247,9 @@ void syslogp_r (int, struct syslog_data *, const char *, const char *,
+ const char *, ...);
+ void vsyslogp_r (int, struct syslog_data *, const char *, const char *,
+ const char *, va_list);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #else /* !__KERNEL__ */
+
+--
+2.24.0
+
diff --git a/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch b/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch
new file mode 100644
index 0000000000..799a7a4c4c
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch
@@ -0,0 +1,29 @@
+From 10cff4ba2d09b30f8f1967f910e8ab08447a8add Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 7 Dec 2019 10:31:04 -0800
+Subject: [PATCH 2/2] include sys/types.h for off_t
+
+Fixes
+error: unknown type name 'off_t'
+
+Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/10]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/compat.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/compat.h b/src/compat.h
+index a867636..1ef1bf0 100644
+--- a/src/compat.h
++++ b/src/compat.h
+@@ -34,6 +34,7 @@
+ #include <pthread.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/types.h>
+
+ /*
+ * The following macro is used to remove const cast-away warnings
+--
+2.24.0
+
diff --git a/meta/recipes-extended/sysklogd/files/no-strip-install.patch b/meta/recipes-extended/sysklogd/files/no-strip-install.patch
deleted file mode 100644
index 00fba71017..0000000000
--- a/meta/recipes-extended/sysklogd/files/no-strip-install.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: sysklogd-1.5/Makefile
-===================================================================
---- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200
-+++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200
-@@ -127,8 +127,8 @@
- rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd
-
- install_exec: syslogd klogd
-- ${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd
-- ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd
-+ ${INSTALL} -m 500 syslogd ${BINDIR}/syslogd
-+ ${INSTALL} -m 500 klogd ${BINDIR}/klogd
-
- install_man:
- ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
diff --git a/meta/recipes-extended/sysklogd/files/no-vectorization.patch b/meta/recipes-extended/sysklogd/files/no-vectorization.patch
deleted file mode 100644
index c1cc042c9c..0000000000
--- a/meta/recipes-extended/sysklogd/files/no-vectorization.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Inappropriate
-
-The compiler should not be generating vectorized instructions on this target.
-This is a work around until I can determine why this is occuring on this
-particular recipe
-
-Index: sysklogd-1.5/Makefile
-===================================================================
---- sysklogd-1.5.orig/Makefile
-+++ sysklogd-1.5/Makefile
-@@ -20,7 +20,8 @@
- CC= gcc
- #SKFLAGS= -g -DSYSV -Wall
- #LDFLAGS= -g
--SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce
-+SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce \
-+ -fno-tree-vectorize
- # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
- # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
- # $(shell getconf LFS_SKFLAGS)
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd
index 258f882803..4a4ca8a78e 100755
--- a/meta/recipes-extended/sysklogd/files/sysklogd
+++ b/meta/recipes-extended/sysklogd/files/sysklogd
@@ -19,8 +19,8 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
pidfile_syslogd=/var/run/syslogd.pid
pidfile_klogd=/var/run/klogd.pid
-binpath_syslogd=/sbin/syslogd
-binpath_klogd=/sbin/klogd
+binpath_syslogd=/usr/sbin/syslogd
+binpath_klogd=/usr/sbin/klogd
test -x $binpath || exit 0
@@ -90,6 +90,22 @@ running()
return 0
}
+waitpid ()
+{
+ pid=$1
+ # Give pid a chance to exit before we restart with a 5s timeout in 1s intervals
+ if [ -z "$pid" ]; then
+ return
+ fi
+ timeout=5;
+ while [ $timeout -gt 0 ]
+ do
+ timeout=$(( $timeout-1 ))
+ kill -0 $pid 2> /dev/null || break
+ sleep 1
+ done
+}
+
case "$1" in
start)
log_begin_msg "Starting system log daemon..."
@@ -113,17 +129,23 @@ case "$1" in
start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd
log_end_msg $?
log_begin_msg "Reloading kernel log daemon..."
+ pid=`cat $pidfile_klogd 2> /dev/null`
start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+ waitpid $pid
start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
log_end_msg $?
;;
restart)
log_begin_msg "Restarting system log daemon..."
+ pid=`cat $pidfile_syslogd 2> /dev/null`
start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd
+ waitpid $pid
start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
log_end_msg $?
log_begin_msg "Reloading kernel log daemon..."
+ pid=`cat $pidfile_klogd 2> /dev/null`
start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+ waitpid $pid
start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
log_end_msg $?
;;
diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf
deleted file mode 100644
index 0849de1268..0000000000
--- a/meta/recipes-extended/sysklogd/files/syslog.conf
+++ /dev/null
@@ -1,71 +0,0 @@
-# /etc/syslog.conf Configuration file for syslogd.
-#
-# Ported from debian by Yu Ke <ke.yu@intel.com>
-#
-
-#
-# First some standard logfiles. Log by facility.
-#
-
-auth,authpriv.* /var/log/auth.log
-*.*;auth,authpriv.none -/var/log/syslog
-#cron.* /var/log/cron.log
-daemon.* -/var/log/daemon.log
-kern.* -/var/log/kern.log
-lpr.* -/var/log/lpr.log
-mail.* -/var/log/mail.log
-user.* -/var/log/user.log
-
-#
-# Logging for the mail system. Split it up so that
-# it is easy to write scripts to parse these files.
-#
-mail.info -/var/log/mail.info
-mail.warn -/var/log/mail.warn
-mail.err /var/log/mail.err
-
-# Logging for INN news system
-#
-news.crit /var/log/news.crit
-news.err /var/log/news.err
-news.notice -/var/log/news.notice
-
-#
-# Some `catch-all' logfiles.
-#
-*.=debug;\
-auth,authpriv.none;\
-news.none;mail.none -/var/log/debug
-
-*.=info;*.=notice;*.=warn;\
-auth,authpriv.none;\
-cron,daemon.none;\
-mail,news.none -/var/log/messages
-
-#
-# Emergencies are sent to everybody logged in.
-#
-*.emerg *
-
-#
-# I like to have messages displayed on the console, but only on a virtual
-# console I usually leave idle.
-#
-#daemon,mail.*;\
-#news.=crit;news.=err;news.=notice;\
-#*.=debug;*.=info;\
-#*.=notice;*.=warn /dev/tty8
-
-# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
-# you must invoke `xconsole' with the `-file' option:
-#
-# $ xconsole -file /dev/xconsole [...]
-#
-# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
-# busy site..
-#
-daemon.*;mail.*;\
-news.err;\
-*.=debug;*.=info;\
-*.=notice;*.=warn |/dev/xconsole
-
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 1e363db6e8..07edf40326 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -6,56 +6,48 @@ SECTION = "base"
LICENSE = "GPLv2+ & BSD"
LICENSE_syslogd = "BSD"
LICENSE_klogd = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
- file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \
- file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/syslogd.c;beginline=2;endline=15;md5=a880fecbc04503f071c494a9c0dd4f97 \
+ file://src/klogd.c;beginline=2;endline=19;md5=4f5591d04cccbeb0352758ed4a9d7213 \
"
-inherit update-rc.d update-alternatives
+inherit update-rc.d update-alternatives systemd autotools
-SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
- file://no-strip-install.patch \
- file://0001-Fix-build-with-musl.patch \
+SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \
+ file://0001-Remove-__BEGIN_DECLS-__END_DECLS.patch \
+ file://0002-include-sys-types.h-for-off_t.patch \
file://sysklogd \
- file://syslog.conf \
"
+S = "${WORKDIR}/git"
-SRC_URI_append_e500v2 = " file://no-vectorization.patch"
+EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --with-klogd --without-logger"
-INITSCRIPT_NAME = "syslog"
-CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
+do_install_append () {
+ install -d ${D}${sysconfdir}
+ install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
+ install -d ${D}${sysconfdir}/init.d
+ install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
+}
-CFLAGS_append = " -DSYSV"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "syslogd.service klogd.service"
+SYSTEMD_AUTO_ENABLE = "enable"
-do_install () {
- install -d ${D}${mandir}/man8 \
- ${D}${mandir}/man5 \
- ${D}${base_sbindir}
- oe_runmake 'BINDIR=${D}${base_sbindir}' \
- 'MANDIR=${D}${mandir}' install
- install -d ${D}${sysconfdir}
- install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
- install -d ${D}${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
-}
+INITSCRIPT_NAME = "syslog"
+CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
+RCONFLICTS_${PN} = "rsyslog busybox-syslog syslog-ng"
-# sysklogd package has no internal systemd support, so we weigh busybox's
-# sysklogd utility over it in case of systemd
-ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}"
+FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
-ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
+ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
-ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
-ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
-ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
+ALTERNATIVE_${PN}-doc = "syslogd.8"
+ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
pkg_prerm_${PN} () {
if test "x$D" = "x"; then
if test "$1" = "upgrade" -o "$1" = "remove"; then
- /etc/init.d/syslog stop
+ /etc/init.d/syslog stop || :
fi
fi
}
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb
deleted file mode 100644
index 975ecc2b63..0000000000
--- a/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require sysklogd.inc
-
-SRC_URI[md5sum] = "c70599ab0d037fde724f7210c2c8d7f8"
-SRC_URI[sha256sum] = "5166c185ae23c92e8b9feee66a6e3d0bc944bf673112f53e3ecf62e08ce7c201"
diff --git a/meta/recipes-extended/sysklogd/sysklogd_2.0.3.bb b/meta/recipes-extended/sysklogd/sysklogd_2.0.3.bb
new file mode 100644
index 0000000000..21f750fa60
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd_2.0.3.bb
@@ -0,0 +1,3 @@
+require sysklogd.inc
+
+SRCREV = "ad686ca86d977f9eac4cd0a0d0e9a5964a4621d3"
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index bb5629db4c..77cc6f2cf2 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -4,55 +4,65 @@ HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
LICENSE = "GPLv2+"
SECTION = "console/utils"
-SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
+SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/${BP}.tar.xz \
file://99_sysstat \
file://sysstat.service \
"
UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
DEPENDS += "base-passwd"
# autotools-brokensep as this package doesn't use automake
-inherit autotools-brokensep gettext systemd
+inherit autotools-brokensep gettext systemd upstream-version-is-even
-EXTRA_OECONF += "--disable-sensors"
-EXTRA_OEMAKE += 'LFLAGS=""'
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
+PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}"
+
+EXTRA_OECONF += "--disable-stripping"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "sysstat.service"
SYSTEMD_AUTO_ENABLE = "enable"
do_configure_prepend() {
- export sa_lib_dir=${libdir}/sa
+ export sa_lib_dir=${libexecdir}/sa
}
do_install() {
autotools_do_install
# don't install /var/log/sa when populating rootfs. Do it through volatile
-
rm -rf ${D}/var
- install -d ${D}/etc/default/volatiles
- install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+ fi
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d ${localstatedir}/log/sa - - - -" \
+ > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
- sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
+ # Unless both cron and systemd are enabled, install our own
+ # systemd unit file. Otherwise the package will install one.
+ if ${@bb.utils.contains('PACKAGECONFIG', 'cron systemd', 'false', 'true', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
+ sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
+ fi
+ fi
}
pkg_postinst_${PN} () {
- if [ -n "$D" ]; then
- exit 0
- fi
- if [ -e /etc/init.d/populate-volatile.sh ]; then
- /etc/init.d/populate-volatile.sh update
- fi
+ if [ ! -n "$D" ]; then
+ if [ -e /etc/init.d/populate-volatile.sh ]; then
+ /etc/init.d/populate-volatile.sh update
+ fi
+ fi
}
-
-FILES_${PN} += "${libdir}/sa"
+FILES_${PN} += "${systemd_system_unitdir}"
TARGET_CC_ARCH += "${LDFLAGS}"
-LDFLAGS_append_libc-uclibc = " -lintl"
diff --git a/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch b/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
index c12652307c..1b63299aae 100644
--- a/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
+++ b/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
@@ -21,10 +21,10 @@ Upstream-Status: Pending
sa_common.c | 1 +
3 files changed, 3 insertions(+)
-diff --git a/common.c b/common.c
-index a23155b..ad86446 100644
---- a/common.c
-+++ b/common.c
+Index: sysstat-11.7.1/common.c
+===================================================================
+--- sysstat-11.7.1.orig/common.c
++++ sysstat-11.7.1/common.c
@@ -20,6 +20,7 @@
*/
@@ -32,11 +32,11 @@ index a23155b..ad86446 100644
+#include <limits.h>
#include <string.h>
#include <stdlib.h>
- #include <time.h>
-diff --git a/ioconf.c b/ioconf.c
-index 7d88c5d..6d67691 100644
---- a/ioconf.c
-+++ b/ioconf.c
+ #include <stdarg.h>
+Index: sysstat-11.7.1/ioconf.c
+===================================================================
+--- sysstat-11.7.1.orig/ioconf.c
++++ sysstat-11.7.1/ioconf.c
@@ -27,6 +27,7 @@
#include <errno.h>
#include <dirent.h>
@@ -45,10 +45,10 @@ index 7d88c5d..6d67691 100644
#include "ioconf.h"
#include "common.h"
-diff --git a/sa_common.c b/sa_common.c
-index b7351d9..c9e3299 100644
---- a/sa_common.c
-+++ b/sa_common.c
+Index: sysstat-11.7.1/sa_common.c
+===================================================================
+--- sysstat-11.7.1.orig/sa_common.c
++++ sysstat-11.7.1/sa_common.c
@@ -20,6 +20,7 @@
*/
@@ -56,7 +56,4 @@ index b7351d9..c9e3299 100644
+#include <limits.h>
#include <string.h>
#include <stdlib.h>
- #include <time.h>
---
-2.5.2
-
+ #include <stdint.h>
diff --git a/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch b/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch
new file mode 100644
index 0000000000..4067bb983b
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch
@@ -0,0 +1,31 @@
+From 1590cc614aaf0fb81cd804414d6c9d5a9227352c Mon Sep 17 00:00:00 2001
+From: Wenlin Kang <wenlin.kang@windriver.com>
+Date: Tue, 5 Nov 2019 16:16:44 +0800
+Subject: [PATCH] configure.in: remove check for chkconfig
+
+chkconfig can't work on cross-platform, so should remove check for it.
+
+Upstream-Status: Inappropriate [ embedded specific ]
+
+Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
+---
+ configure.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 48b9a31..cedeb43 100644
+--- a/configure.in
++++ b/configure.in
+@@ -42,7 +42,8 @@ AC_SUBST(VER_JSON)
+ AC_SUBST(VER_XML)
+
+ AC_PATH_PROG(PATH_CP, cp)
+-AC_PATH_PROG(PATH_CHKCONFIG, chkconfig)
++#AC_PATH_PROG(PATH_CHKCONFIG, chkconfig)
++AC_SUBST(PATH_CHKCONFIG)
+
+ # Check for systemd
+ AC_CHECK_PROG(PKG_CONFIG, pkg-config, pkg-config)
+--
+1.9.1
+
diff --git a/meta/recipes-extended/sysstat/sysstat/CVE-2019-19725.patch b/meta/recipes-extended/sysstat/sysstat/CVE-2019-19725.patch
new file mode 100644
index 0000000000..2aa12724f8
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/CVE-2019-19725.patch
@@ -0,0 +1,28 @@
+From a5c8abd4a481ee6e27a3acf00e6d9b0f023e20ed Mon Sep 17 00:00:00 2001
+From: Sebastien GODARD <sysstat@users.noreply.github.com>
+Date: Mon, 9 Dec 2019 17:54:07 +0100
+Subject: [PATCH] Fix #242: Double free in check_file_actlst()
+
+Avoid freeing buffer() twice.
+
+Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
+
+Upstream-Status: Backport [https://github.com/sysstat/sysstat/commit/a5c8abd4a481ee6e27a3acf00e6d9b0f023e20ed]
+CVE: CVE-2019-19725
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ sa_common.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sa_common.c b/sa_common.c
+index cf52aefe..856a3715 100644
+--- a/sa_common.c
++++ b/sa_common.c
+@@ -2153,6 +2153,7 @@ void check_file_actlst(int *ifd, char *dfile, struct activity *act[], uint64_t f
+ }
+
+ free(buffer);
++ buffer = NULL;
+
+ /* Check that at least one activity selected by the user is available in file */
+ for (i = 0; i < NR_ACT; i++) {
diff --git a/meta/recipes-extended/sysstat/sysstat/sysstat.service b/meta/recipes-extended/sysstat/sysstat/sysstat.service
index aff07109f5..ca46befb99 100644
--- a/meta/recipes-extended/sysstat/sysstat/sysstat.service
+++ b/meta/recipes-extended/sysstat/sysstat/sysstat.service
@@ -5,7 +5,7 @@ Description=Resets System Activity Logs
Type=oneshot
RemainAfterExit=yes
User=root
-ExecStart=@LIBDIR@/sa/sa1 --boot
+ExecStart=@LIBEXECDIR@/sa/sa1 --boot
[Install]
WantedBy=multi-user.target
diff --git a/meta/recipes-extended/sysstat/sysstat_11.4.0.bb b/meta/recipes-extended/sysstat/sysstat_11.4.0.bb
deleted file mode 100644
index 69f83fc42f..0000000000
--- a/meta/recipes-extended/sysstat/sysstat_11.4.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require sysstat.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
-
-SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
-
-SRC_URI[md5sum] = "ee7b8c0b139a11a7a3418dc0658ca1be"
-SRC_URI[sha256sum] = "b8518ca88acfcbc474a406022ee9c0c3210ccef4f0ec80e5b3e8c41dda8c16f2"
diff --git a/meta/recipes-extended/sysstat/sysstat_12.2.0.bb b/meta/recipes-extended/sysstat/sysstat_12.2.0.bb
new file mode 100644
index 0000000000..f7a1a35975
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat_12.2.0.bb
@@ -0,0 +1,11 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
+
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch \
+ file://0001-configure.in-remove-check-for-chkconfig.patch \
+ file://CVE-2019-19725.patch \
+"
+
+SRC_URI[md5sum] = "7deffb18e7f32a0b74ab81f1f75de9ee"
+SRC_URI[sha256sum] = "61aa98eb8b38542eb97defcc2472adee1a24df8252f41b96e20d64c6064a8375"
diff --git a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
deleted file mode 100644
index af5026f529..0000000000
--- a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
-CVE: CVE-2010-0624
-
-This patch avoids heap overflow reported by :
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
-
-This is a clean patch for the GPLv2 tar recipe.
-
-Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
-
-Index: tar-1.17/lib/rtapelib.c
-===================================================================
---- tar-1.17.orig/lib/rtapelib.c
-+++ tar-1.17/lib/rtapelib.c
-@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
-
- sprintf (command_buffer, "R%lu\n", (unsigned long) length);
- if (do_command (handle, command_buffer) == -1
-- || (status = get_status (handle)) == SAFE_READ_ERROR)
-+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
- return SAFE_READ_ERROR;
-
- for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch
deleted file mode 100644
index f8059a0a89..0000000000
--- a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-# Fix errors when built with gcc 4.3
-# Patch taken from Debian bug #452096
-
-diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h
---- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800
-+++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700
-@@ -198,7 +198,11 @@
- #endif
-
- #ifndef ARGP_FS_EI
--#define ARGP_FS_EI extern inline
-+ #if defined __GNUC_STDC_INLINE__
-+ #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__))
-+ #else
-+ #define ARGP_FS_EI extern inline
-+ #endif
- #endif
-
- ARGP_FS_EI size_t
-diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h
---- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700
-+++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700
-@@ -580,7 +580,11 @@
- # endif
-
- # ifndef ARGP_EI
--# define ARGP_EI extern __inline__
-+# if defined __GNUC_STDC_INLINE__
-+# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__))
-+# else
-+# define ARGP_EI extern __inline__
-+# endif
- # endif
-
- ARGP_EI void
diff --git a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch
deleted file mode 100644
index 30534c29ce..0000000000
--- a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
-# This is needed to configure correctly with newer versions of autoconf.
-
---- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700
-+++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700
-@@ -1,4 +1,4 @@
--# serial 4 -*- Autoconf -*-
-+# serial 5 -*- Autoconf -*-
- # Enable extensions on systems that normally disable them.
-
- # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
-@@ -16,6 +16,7 @@
- # ------------------------
- # Enable extensions on systems that normally disable them,
- # typically due to standards-conformance issues.
-+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
- AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
- [
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-@@ -48,7 +49,7 @@
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
--])
-+])])
-
- # gl_USE_SYSTEM_EXTENSIONS
- # ------------------------
diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc
deleted file mode 100644
index 93e4da114b..0000000000
--- a/meta/recipes-extended/tar/tar.inc
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "GNU file archiving program"
-DESCRIPTION = "GNU tar saves many files together into a single tape \
-or disk archive, and can restore individual files from the archive."
-HOMEPAGE = "http://www.gnu.org/software/tar/"
-SECTION = "base"
-
-SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
-
-inherit autotools gettext texinfo
-
-EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
-
-# Let aclocal use the relative path for the m4 file rather than the
-# absolute since tar has a lot of m4 files, otherwise there might
-# be an "Argument list too long" error when it is built in a long/deep
-# directory.
-acpaths = "-I ./m4"
-
-do_install () {
- autotools_do_install
- ln -s tar ${D}${bindir}/gtar
-}
-
-do_install_append_class-target() {
- if [ "${base_bindir}" != "${bindir}" ]; then
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/tar ${D}${base_bindir}/tar
- mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar
- rmdir ${D}${bindir}/
- fi
-}
-
-PACKAGES =+ "${PN}-rmt"
-
-FILES_${PN}-rmt = "${base_sbindir}/rmt*"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "tar"
-ALTERNATIVE_${PN}-rmt = "rmt"
-ALTERNATIVE_${PN}_class-nativesdk = ""
-ALTERNATIVE_${PN}-rmt_class-nativesdk = ""
-
-ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
-ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
-
-PROVIDES_append_class-native = " tar-replacement-native"
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/tar/tar/musl_dirent.patch b/meta/recipes-extended/tar/tar/musl_dirent.patch
index b0dc16c3dd..2d98ed1310 100644
--- a/meta/recipes-extended/tar/tar/musl_dirent.patch
+++ b/meta/recipes-extended/tar/tar/musl_dirent.patch
@@ -14,6 +14,6 @@ Index: tar-1.28/m4/d-ino.m4
- linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ linux*-gnu*|linux*-musl*)
+ gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
# If we don't know, assume the worst.
- *) gl_cv_struct_dirent_d_ino="guessing no" ;;
- esac
diff --git a/meta/recipes-extended/tar/tar/remove-gets.patch b/meta/recipes-extended/tar/tar/remove-gets.patch
deleted file mode 100644
index f24de926a3..0000000000
--- a/meta/recipes-extended/tar/tar/remove-gets.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gnu/stdio.in.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/gnu/stdio.in.h b/gnu/stdio.in.h
-index ec43874..502e3ae 100644
---- a/gnu/stdio.in.h
-+++ b/gnu/stdio.in.h
-@@ -722,10 +722,12 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
- /* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning; besides, C11
- removed it. */
-+#if defined gets
- #undef gets
- #if HAVE_RAW_DECL_GETS && !defined __cplusplus
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- #endif
-+#endif
-
- #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
- struct obstack;
---
-2.8.3
-
diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb
deleted file mode 100644
index b9ca2063df..0000000000
--- a/meta/recipes-extended/tar/tar_1.17.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require tar.inc
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-PR = "r3"
-
-SRC_URI += "file://m4extensions.patch \
- file://gcc43build.patch \
- file://avoid_heap_overflow.patch \
- "
-
-SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290"
-SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492"
diff --git a/meta/recipes-extended/tar/tar_1.29.bb b/meta/recipes-extended/tar/tar_1.29.bb
deleted file mode 100644
index efce57d9d7..0000000000
--- a/meta/recipes-extended/tar/tar_1.29.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require tar.inc
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI += "file://remove-gets.patch \
- file://musl_dirent.patch \
- "
-SRC_URI[md5sum] = "955cd533955acb1804b83fd70218da51"
-SRC_URI[sha256sum] = "236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2"
-
-do_install_append_libc-musl() {
- rm -f ${D}${libdir}/charset.alias
- rmdir ${D}${libdir}
-}
diff --git a/meta/recipes-extended/tar/tar_1.32.bb b/meta/recipes-extended/tar/tar_1.32.bb
new file mode 100644
index 0000000000..18f09b5711
--- /dev/null
+++ b/meta/recipes-extended/tar/tar_1.32.bb
@@ -0,0 +1,64 @@
+SUMMARY = "GNU file archiving program"
+DESCRIPTION = "GNU tar saves many files together into a single tape \
+or disk archive, and can restore individual files from the archive."
+HOMEPAGE = "http://www.gnu.org/software/tar/"
+SECTION = "base"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
+ file://musl_dirent.patch \
+"
+
+SRC_URI[md5sum] = "17917356fff5cb4bd3cd5a6c3e727b05"
+SRC_URI[sha256sum] = "e4bb9e08e12e7fa9f11fef544efc85e59ba34538593d9ad38148c7ca2bfbb566"
+
+inherit autotools gettext texinfo
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG_append_class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}"
+
+PACKAGECONFIG[acl] = "--with-posix-acls,--without-posix-acls,acl"
+
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
+
+# Let aclocal use the relative path for the m4 file rather than the
+# absolute since tar has a lot of m4 files, otherwise there might
+# be an "Argument list too long" error when it is built in a long/deep
+# directory.
+acpaths = "-I ./m4"
+
+do_install () {
+ autotools_do_install
+ ln -s tar ${D}${bindir}/gtar
+}
+
+do_install_append_class-target() {
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/tar ${D}${base_bindir}/tar
+ mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar
+ rmdir ${D}${bindir}/
+ fi
+}
+
+PACKAGES =+ "${PN}-rmt"
+
+FILES_${PN}-rmt = "${sbindir}/rmt*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "tar"
+ALTERNATIVE_${PN}-rmt = "rmt"
+ALTERNATIVE_${PN}_class-nativesdk = ""
+ALTERNATIVE_${PN}-rmt_class-nativesdk = ""
+
+ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
+ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt"
+
+PROVIDES_append_class-native = " tar-replacement-native"
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
new file mode 100644
index 0000000000..9d1e05d7f4
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
@@ -0,0 +1,65 @@
+From 7f8878ac1aaf4a19992d39379797c151301bedb1 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <oobitots@cisco.com>
+Date: Mon, 5 Feb 2018 08:29:10 -0800
+Subject: [PATCH] Fix build with clang
+
+Fix "error: non-void function 'fix_options' should return a value".
+Add function prototype to tcpd.c and miscd.c.
+
+Upstream-Status: Pending
+
+Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
+---
+ v2 - add function prototypes
+
+ fix_options.c | 2 +-
+ miscd.c | 4 ++++
+ tcpd.c | 4 ++++
+ 3 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/fix_options.c b/fix_options.c
+index b5e81b8..9958ff4 100644
+--- a/fix_options.c
++++ b/fix_options.c
+@@ -29,7 +29,7 @@ static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
+
+ /* fix_options - get rid of IP-level socket options */
+
+-fix_options(request)
++void fix_options(request)
+ struct request_info *request;
+ {
+ #ifdef IP_OPTIONS
+diff --git a/miscd.c b/miscd.c
+index 1ab835c..723b83a 100644
+--- a/miscd.c
++++ b/miscd.c
+@@ -40,6 +40,10 @@ static char sccsid[] = "@(#) miscd.c 1.10 96/02/11 17:01:30";
+ #include "patchlevel.h"
+ #include "tcpd.h"
+
++#ifdef KILL_IP_OPTIONS
++void fix_options(struct request_info *);
++#endif
++
+ int allow_severity = SEVERITY; /* run-time adjustable */
+ int deny_severity = LOG_WARNING; /* ditto */
+
+diff --git a/tcpd.c b/tcpd.c
+index d865b9c..a179891 100644
+--- a/tcpd.c
++++ b/tcpd.c
+@@ -38,6 +38,10 @@ static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
+ #include "patchlevel.h"
+ #include "tcpd.h"
+
++#ifdef KILL_IP_OPTIONS
++void fix_options(struct request_info *);
++#endif
++
+ int allow_severity = SEVERITY; /* run-time adjustable */
+ int deny_severity = LOG_WARNING; /* ditto */
+
+--
+2.10.3.dirty
+
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
index e8289e44d9..d473fb6342 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
@@ -1,9 +1,10 @@
Upstream-Status: Backport
-diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
---- tcp_wrappers_7.6.orig/Makefile 2003-08-21 01:43:39.000000000 +0200
-+++ tcp_wrappers_7.6/Makefile 2003-08-21 01:43:35.000000000 +0200
-@@ -45,7 +45,7 @@
+Index: tcp_wrappers_7.6/Makefile
+===================================================================
+--- tcp_wrappers_7.6.orig/Makefile
++++ tcp_wrappers_7.6/Makefile
+@@ -45,7 +45,7 @@ what:
#
# SysV.4 Solaris 2.x OSF AIX
#REAL_DAEMON_DIR=/usr/sbin
@@ -12,7 +13,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
# BSD 4.4
#REAL_DAEMON_DIR=/usr/libexec
#
-@@ -512,6 +519,7 @@
+@@ -513,6 +513,7 @@ VSYSLOG = -Dvsyslog=myvsyslog
# (examples: allow, deny, banners, twist and spawn).
#
#STYLE = -DPROCESS_OPTIONS # Enable language extensions.
@@ -20,7 +21,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
################################################################
# Optional: Changing the default disposition of logfile records
-@@ -535,6 +543,7 @@
+@@ -536,6 +537,7 @@ VSYSLOG = -Dvsyslog=myvsyslog
# The LOG_XXX names below are taken from the /usr/include/syslog.h file.
FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
@@ -28,7 +29,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
# The syslog priority at which successful connections are logged.
-@@ -631,6 +640,7 @@
+@@ -632,6 +634,7 @@ TABLES = -DHOSTS_DENY=\"/etc/hosts.deny\
# lookups altogether, see the next section.
PARANOID= -DPARANOID
@@ -36,7 +37,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
########################################
# Optional: turning off hostname lookups
-@@ -644,6 +654,7 @@
+@@ -645,6 +648,7 @@ PARANOID= -DPARANOID
# mode (see previous section) and comment out the following definition.
HOSTNAME= -DALWAYS_HOSTNAME
@@ -44,7 +45,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
#############################################
# Optional: Turning on host ADDRESS checking
-@@ -670,6 +681,7 @@
+@@ -671,6 +675,7 @@ HOSTNAME= -DALWAYS_HOSTNAME
# Solaris 2.x, and Linux. See your system documentation for details.
#
# KILL_OPT= -DKILL_IP_OPTIONS
@@ -52,7 +53,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
## End configuration options
############################
-@@ -677,9 +689,10 @@
+@@ -678,9 +683,10 @@ HOSTNAME= -DALWAYS_HOSTNAME
# Protection against weird shells or weird make programs.
SHELL = /bin/sh
@@ -65,7 +66,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
-@@ -712,10 +725,11 @@
+@@ -713,11 +719,12 @@ all other: config-check tcpd tcpdmatch t
config-check:
@set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
@@ -81,3 +82,4 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
+ @if [ ! -d shared ]; then mkdir shared; fi
$(LIB): $(LIB_OBJ)
+ rm -f $(LIB)
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch
new file mode 100644
index 0000000000..965544cc0b
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch
@@ -0,0 +1,25 @@
+Compile warning fixes from Debian
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Upstream-Status: Inappropriate [upstream is dead]
+
+--- a/options.c
++++ b/options.c
+@@ -41,6 +41,7 @@ static char sccsid[] = "@(#) options.c 1
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <stdio.h>
++#include <unistd.h>
+ #include <syslog.h>
+ #include <pwd.h>
+ #include <grp.h>
+--- a/scaffold.c
++++ b/scaffold.c
+@@ -17,6 +17,7 @@ static char sccs_id[] = "@(#) scaffold.c
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <syslog.h>
+ #include <setjmp.h>
+ #include <string.h>
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch
new file mode 100644
index 0000000000..27157a2e6d
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch
@@ -0,0 +1,200 @@
+Compile warning fixes from Debian
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Upstream-Status: Inappropriate [upstream is dead]
+
+--- a/clean_exit.c
++++ b/clean_exit.c
+@@ -13,6 +13,7 @@ static char sccsid[] = "@(#) clean_exit.
+ #endif
+
+ #include <stdio.h>
++#include <unistd.h>
+
+ extern void exit();
+
+--- a/hosts_access.c
++++ b/hosts_access.c
+@@ -34,6 +34,7 @@ static char sccsid[] = "@(#) hosts_acces
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <syslog.h>
+ #include <ctype.h>
+ #include <errno.h>
+--- a/misc.c
++++ b/misc.c
+@@ -13,6 +13,7 @@ static char sccsic[] = "@(#) misc.c 1.2
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+
+ #include "tcpd.h"
+--- a/options.c
++++ b/options.c
+@@ -41,6 +41,7 @@ static char sccsid[] = "@(#) options.c 1
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <syslog.h>
+ #include <pwd.h>
+--- a/percent_x.c
++++ b/percent_x.c
+@@ -17,6 +17,7 @@ static char sccsid[] = "@(#) percent_x.c
+ /* System libraries. */
+
+ #include <stdio.h>
++#include <unistd.h>
+ #include <syslog.h>
+ #include <string.h>
+
+--- a/rfc931.c
++++ b/rfc931.c
+@@ -16,6 +16,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
+ /* System libraries. */
+
+ #include <stdio.h>
++#include <unistd.h>
+ #include <syslog.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+--- a/tcpd.c
++++ b/tcpd.c
+@@ -22,6 +22,7 @@ static char sccsid[] = "@(#) tcpd.c 1.10
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <stdio.h>
++#include <unistd.h>
+ #include <syslog.h>
+ #include <string.h>
+
+--- a/update.c
++++ b/update.c
+@@ -20,6 +20,7 @@ static char sccsid[] = "@(#) update.c 1.
+ /* System libraries */
+
+ #include <stdio.h>
++#include <unistd.h>
+ #include <syslog.h>
+ #include <string.h>
+
+--- a/fakelog.c
++++ b/fakelog.c
+@@ -17,7 +17,7 @@ static char sccsid[] = "@(#) fakelog.c 1
+
+ /* ARGSUSED */
+
+-openlog(name, logopt, facility)
++void openlog(name, logopt, facility)
+ char *name;
+ int logopt;
+ int facility;
+@@ -27,7 +27,7 @@ int facility;
+
+ /* vsyslog - format one record */
+
+-vsyslog(severity, fmt, ap)
++void vsyslog(severity, fmt, ap)
+ int severity;
+ char *fmt;
+ va_list ap;
+@@ -43,7 +43,7 @@ va_list ap;
+
+ /* VARARGS */
+
+-VARARGS(syslog, int, severity)
++void VARARGS(syslog, int, severity)
+ {
+ va_list ap;
+ char *fmt;
+@@ -56,7 +56,7 @@ VARARGS(syslog, int, severity)
+
+ /* closelog - dummy */
+
+-closelog()
++void closelog()
+ {
+ /* void */
+ }
+--- a/safe_finger.c
++++ b/safe_finger.c
+@@ -22,10 +22,15 @@ static char sccsid[] = "@(#) safe_finger
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/wait.h>
++#include <fcntl.h>
+ #include <signal.h>
+ #include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
+ #include <ctype.h>
+ #include <pwd.h>
++#include <grp.h>
+ #include <syslog.h>
+
+ extern void exit();
+@@ -52,7 +59,7 @@ int sig;
+ exit(0);
+ }
+
+-main(argc, argv)
++int main(argc, argv)
+ int argc;
+ char **argv;
+ {
+--- a/tcpdchk.c
++++ b/tcpdchk.c
+@@ -28,6 +28,8 @@ static char sccsid[] = "@(#) tcpdchk.c 1
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
+ #include <syslog.h>
+ #include <setjmp.h>
+ #include <errno.h>
+--- a/tcpdmatch.c
++++ b/tcpdmatch.c
+@@ -26,6 +26,7 @@ static char sccsid[] = "@(#) tcpdmatch.c
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <stdio.h>
++#include <unistd.h>
+ #include <syslog.h>
+ #include <setjmp.h>
+ #include <string.h>
+--- a/try-from.c
++++ b/try-from.c
+@@ -37,7 +37,7 @@ static char sccsid[] = "@(#) try-from.c
+ int allow_severity = SEVERITY; /* run-time adjustable */
+ int deny_severity = LOG_WARNING; /* ditto */
+
+-main(argc, argv)
++int main(argc, argv)
+ int argc;
+ char **argv;
+ {
+--- a/inetcf.c
++++ b/inetcf.c
+@@ -12,6 +12,7 @@ static char sccsid[] = "@(#) inetcf.c 1.
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+
+@@ -20,6 +21,7 @@ extern void exit();
+
+ #include "tcpd.h"
+ #include "inetcf.h"
++#include "scaffold.h"
+
+ /*
+ * Network configuration files may live in unusual places. Here are some
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index 5fdbbced72..bd0c84c242 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -1,12 +1,14 @@
SUMMARY = "Security tool that is a wrapper for TCP daemons"
+HOMEPAGE = "http://www.softpanorama.org/Net/Network_security/TCP_wrappers/"
DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \
services."
SECTION = "console/network"
-LICENSE = "BSD"
+LICENSE = "BSD-1-Clause"
LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
PR ="r10"
+DEPENDS += "libnsl2"
PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
FILES_libwrap = "${base_libdir}/lib*${SOLIBS}"
@@ -16,7 +18,7 @@ FILES_libwrap-staticdev = "${libdir}/lib*.a"
FILES_${PN} = "${sbindir}"
FILES_${PN}-doc = "${mandir}/man8"
-SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
+SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
file://00_man_quoting.diff \
file://01_man_portability.patch \
file://05_wildcard_matching.patch \
@@ -44,6 +46,9 @@ SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
file://safe_finger.8 \
file://makefile-fix-parallel.patch \
file://musl-decls.patch \
+ file://0001-Fix-build-with-clang.patch \
+ file://fix_warnings.patch \
+ file://fix_warnings2.patch \
"
SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
@@ -65,7 +70,6 @@ EXTRA_OEMAKE = "'CC=${CC}' \
'KILL_OPT=-DKILL_IP_OPTIONS' \
'UMASK=-DDAEMON_UMASK=022' \
'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \
- 'LIBS=-lnsl' \
'ARFLAGS=rv' \
'AUX_OBJ=weak_symbols.o' \
'TLI=' \
@@ -73,7 +77,6 @@ EXTRA_OEMAKE = "'CC=${CC}' \
'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'"
EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
-EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN"
EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN"
EXTRA_OEMAKE_append_libc-musl = " 'LIBS='"
diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb
deleted file mode 100644
index eac289e3b5..0000000000
--- a/meta/recipes-extended/texi2html/texi2html_5.0.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Perl script that converts Texinfo to HTML"
-HOMEPAGE = "http://www.nongnu.org/texi2html/"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-PR = "r2"
-
-SRC_URI = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \
- "
-
-SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54"
-SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa"
-
-inherit autotools gettext texinfo
-
-do_configure_prepend() {
- # autotools_do_configure updates po/Makefile.in.in, we also need
- # update po_document.
- cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
- cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_messages/
-}
-
-do_install_append () {
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2html
-}
-
-FILES_${PN}-doc += "${datadir}/texinfo"
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
index 8b7033eccc..86c7c1811a 100644
--- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
+++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python2.7
+#! /usr/bin/env python3
# template.py (and other filenames)
# By Max Eliaser (max.eliaser@intel.com)
@@ -28,26 +28,23 @@
# of the executable from argv[0] and emulate the corresponding program, so
# multiple copies of this script will exist under different names.
-import sys, os
+import sys, os, argparse
-olong = "--output="
-Elong = "--macro-expand="
-
-this_binary = sys.argv[0].split ("/")[-1]
+this_binary = sys.argv[0].split("/")[-1]
# To be outputted if functionality that hasn't been stubbed yet is invoked.
stub_msg = """
-This stand-in version of %s is not yet fully capable of emulating the real
-version from the GNU texinfo suite. If you see this message, file a bug report
-with details on the recipe that failed.
+This stand-in version of %s is not yet fully capable of emulating
+the real version from the GNU texinfo suite. If you see this message, file a
+bug report with details on the recipe that failed.
""" % this_binary
# Autotools setups query the version, so this is actually necessary. Some of
# them (lookin' at you, glibc) actually look for the substring "GNU texinfo,"
# so we put that substring in there without actually telling a lie.
-version_str = """ %s (fake texinfo, emulating GNU texinfo) 5.2
-
+version_str = """%s (fake texinfo, emulating GNU texinfo) 5.2
+
Super amazing version which is totally not fake in any way whatsoever.
Copyright (C) 2014 Intel Corp. Distributed under the terms of the MIT
license.
@@ -55,63 +52,45 @@ license.
simple_binaries = "pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \
txixml2texi install-info ginstall-info \
- update-info-dir".split ()
+ update-info-dir".split()
# These utilities use a slightly different set of options and flags.
-complex_binaries = "makeinfo texi2any".split ()
+complex_binaries = "makeinfo texi2any".split()
valid_binaries = simple_binaries + complex_binaries
-# For generating blank output files.
-def touch_file (path):
- f = open (path, "w")
- f.close ()
-
assert this_binary in valid_binaries, \
- this_binary + " is not one of " + ', '.join (valid_binaries)
-
-if "--version" in sys.argv:
- print version_str
- sys.exit (0)
+ this_binary + " is not one of " + ', '.join(valid_binaries)
# For debugging
log_interceptions = False
if log_interceptions:
- f = open ("/tmp/intercepted_" + this_binary, "a")
- f.write (' '.join ([this_binary] + sys.argv[1:]) + '\n')
- f.close ()
+ with open("/tmp/intercepted_" + this_binary, "a") as f:
+ f.write(' '.join([this_binary] + sys.argv[1:]) + '\n')
# Look through the options and flags, and if necessary, touch any output
# files.
-arg_idx = 1
-while arg_idx < len (sys.argv):
- arg = sys.argv [arg_idx]
-
- if arg == "--":
- break
-
- # Something like -I . can result in a need for this (specifically the .)
- elif len (arg) < 2:
+p = argparse.ArgumentParser()
+if this_binary in complex_binaries:
+ p.add_argument('-E', '--macro-expand', metavar='FILE')
+p.add_argument('-o', '--output', metavar='DEST')
+p.add_argument('--version', action='store_true')
+
+args, unknown = p.parse_known_args()
+
+if args.version:
+ print(version_str)
+ sys.exit(0)
+
+# Check for functionality that isn't implemented yet.
+assert not getattr(args, 'macro_expand', None), \
+ "-E/--macro-expand option not yet supported" + stub_msg
+
+# Check if -o or --output is specified.
+if args.output:
+ with open(args.output, 'w'):
pass
-
- # Check if -o or --output is specified. These can be used at most once.
- elif arg[0] == '-' and arg[1] != '-' and arg[len (arg) - 1] == 'o':
- touch_file (sys.argv[arg_idx + 1])
- sys.exit (0)
- elif arg.startswith (olong):
- touch_file (arg.split ("=")[1])
- sys.exit (0)
-
- # Check for functionality that isn't implemented yet.
- else:
- assert arg[0] != '-' or arg[1] == '-' or 'E' not in arg or \
- this_binary in simple_binaries, \
- "-E option not yet supported" + stub_msg
-
- assert not arg.startswith (Elong), \
- Elong[:-1] + " option not yet supported" + stub_msg
-
- arg_idx += 1
+ sys.exit(0)
# The -o/--output option overrides the default. For makeinfo and texi2any,
# that default is to look for a @setfilename command in the input file.
@@ -119,4 +98,3 @@ while arg_idx < len (sys.argv):
assert this_binary in simple_binaries, \
"Don't know how to get default output file name from input file!" + \
stub_msg
-
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch b/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch
deleted file mode 100644
index f4d66600a1..0000000000
--- a/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-fix the macro check
-
-Upstream-Status: Pending
-
-configure does not check if locale.h exists, but check setlocale,
-if setlocale exist, the locale.h should exist.
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- lib/system.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/system.h b/lib/system.h
-index 946eb3c..c70037b 100644
---- a/lib/system.h
-+++ b/lib/system.h
-@@ -42,7 +42,7 @@ extern char *substring (const char *, const char *);
- #include <ctype.h>
-
- /* All systems nowadays probably have these functions, but ... */
--#ifdef HAVE_LOCALE_H
-+#ifdef HAVE_SETLOCALE
- #include <locale.h>
- #endif
- #ifndef HAVE_SETLOCALE
---
-1.7.10.4
-
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch b/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch
deleted file mode 100644
index 81ebe26cf6..0000000000
--- a/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 458e9450cecf703f55536e609365162719585900 Mon Sep 17 00:00:00 2001
-From: "Roy.Li" <rongqing.li@windriver.com>
-Date: Wed, 10 Sep 2014 17:03:29 +0800
-Subject: [PATCH] do not compile host tools, since we have native
-
-Upstream-Status: Pending
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- configure.ac | 23 +----------------------
- 1 file changed, 1 insertion(+), 22 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b46130d..cf58654 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -90,28 +90,7 @@ AC_CANONICAL_BUILD
- # $native_tools is also added to SUBDIRS in the main Makefile.am,
- # so that make compiles the native tools first.
- #
--if test "$cross_compiling" = no; then
-- native_tools=
--else
-- native_tools=tools
-- test -d "$native_tools" || mkdir "$native_tools"
-- confdir=`(cd "$srcdir";pwd)`
-- # Make sure the secondary configure won't fail with
-- # "error: source directory already configured".
-- rm -f config.status
-- AC_MSG_NOTICE([[Doing configure of native tools (${build}).]])
-- cd "$native_tools" || exit 1
-- # Run secondary configure in alternate environment or
-- # it gets the wrong CC etc. env -i gives this build host configure
-- # a clean environment.
-- env -i CC="${BUILD_CC}" AR="${BUILD_AR}" RANLIB="${BUILD_RANLIB}" \
-- PATH="${PATH}" \
-- tools_only=1 \
-- ${confdir}/configure --build=${build} --host=${build} \
-- --disable-rpath --disable-nls
-- cd .. || exit 1
-- AC_MSG_NOTICE([[Continuing with main configure (${host}).]])
--fi
-+native_tools=
- AC_SUBST(native_tools)
- AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]])
-
---
-1.9.1
-
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch b/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch
deleted file mode 100644
index 2297051ddb..0000000000
--- a/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 9b0df7d6d3c18cfac82c291d60a5357d1bc8d9d0 Mon Sep 17 00:00:00 2001
-From: "Roy.Li" <rongqing.li@windriver.com>
-Date: Wed, 10 Sep 2014 17:10:03 +0800
-Subject: [PATCH] using native makeinfo
-
-Upstream-Status: Pending
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- doc/Makefile.am | 2 +-
-
-diff --git a/doc/Makefile.am b/doc/Makefile.am
-index 63df818..b6ceb34 100644
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -19,7 +19,7 @@ man_MANS = info.1 infokey.1 install-info.1 makeinfo.1 texindex.1 texi2dvi.1 \
-
- # Use the programs built in our distribution, taking account of possible
- # cross-compiling.
--MAKEINFO = $(top_builddir)/$(native_tools)/makeinfo/makeinfo
-+MAKEINFO = makeinfo
- INSTALL_INFO = $(top_builddir)/$(native_tools)/util/install-info
-
- TXI_XLATE = txi-cs.tex txi-de.tex txi-en.tex txi-es.tex txi-fr.tex \
diff --git a/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index c7338aa470..0000000000
--- a/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: texinfo-5.2/gnulib/lib/Makefile.am
-===================================================================
---- texinfo-5.2.orig/gnulib/lib/Makefile.am
-+++ texinfo-5.2/gnulib/lib/Makefile.am
-@@ -378,7 +378,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch
index 0ce47ecdb9..0d6bbafadd 100644
--- a/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch
+++ b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch
@@ -1,34 +1,36 @@
-From 6f1f3912fcb900b3a3e6cbe3360306fade333497 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 6 Aug 2015 14:55:08 +0300
+From 63a803ead3656353329a801846a9a3beb7210c46 Mon Sep 17 00:00:00 2001
+From: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
+Date: Tue, 29 Nov 2016 13:43:24 -0600
Subject: [PATCH] dont-depend-on-help2man
Upstream-Status: Inappropriate
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
+
---
doc/Makefile.am | 2 +-
man/Makefile.am | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
-index 7198a6b..4bba550 100644
+index 732833e..041cb9b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
-@@ -40,7 +40,7 @@ refcard_files = refcard/Makefile refcard/txicmdcheck \
+@@ -37,7 +37,7 @@ refcard_files = refcard/Makefile refcard/txicmdcheck \
# Include our texinfo.tex, not Automake's.
EXTRA_DIST = epsf.tex texinfo.tex \
fdl.texi \
- $(man_MANS) $(TXI_XLATE) \
+ $(TXI_XLATE) \
- $(refcard_files)
-
- if INSTALL_WARNINGS
+ $(refcard_files) \
+ texinfo-tex-test.texi texinfo-tex-test.WIDOWs \
+ texinfo-ja.tex short-sample-ja.texi
diff --git a/man/Makefile.am b/man/Makefile.am
-index a08d603..bdfc9a4 100644
+index d0cd72c..a19e52a 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
-@@ -13,24 +13,24 @@
+@@ -11,27 +11,27 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# These are generated using help2man.
@@ -46,10 +48,13 @@ index a08d603..bdfc9a4 100644
-man_MANS += info.5 texinfo.5
+#man_MANS += info.5 texinfo.5
- # This is generated by pod2man, but let's just run it by hand.
-man_MANS += pod2texi.1
+#man_MANS += pod2texi.1
+ pod2texi.1: $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl
+ $(POD2MAN) $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl >"$@"
+
+
# These are just .so's to the common program.
-man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1
+#man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1
@@ -59,6 +64,3 @@ index a08d603..bdfc9a4 100644
# Maintainers should be able to regenerate.
MAINTAINERCLEANFILES = $(man_MANS)
---
-2.1.4
-
diff --git a/meta/recipes-extended/texinfo/texinfo/link-zip.patch b/meta/recipes-extended/texinfo/texinfo/link-zip.patch
index 0b6e9fd7ea..15c030c0c6 100644
--- a/meta/recipes-extended/texinfo/texinfo/link-zip.patch
+++ b/meta/recipes-extended/texinfo/texinfo/link-zip.patch
@@ -1,16 +1,23 @@
-install-info uses symbols from zlib so must link against it.
+From c1002138033fcccb2d1abfc41f5c2e46c836f7a0 Mon Sep 17 00:00:00 2001
+From: Joshua Lock <josh@linux.intel.com>
+Date: Mon, 29 Jul 2013 15:02:34 -0700
+Subject: [PATCH] install-info uses symbols from zlib so must link against it.
Upstream-Status: Pending
Signed-off-by: Joshua Lock <josh@linux.intel.com>
-Index: texinfo-5.1/install-info/Makefile.am
-===================================================================
---- texinfo-5.1.orig/install-info/Makefile.am
-+++ texinfo-5.1/install-info/Makefile.am
-@@ -34,4 +34,4 @@ AM_CPPFLAGS = \
+---
+ install-info/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/install-info/Makefile.am b/install-info/Makefile.am
+index 9bcff71..68247f9 100644
+--- a/install-info/Makefile.am
++++ b/install-info/Makefile.am
+@@ -33,4 +33,4 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/gnulib/lib \
-I$(top_builddir)/gnulib/lib \
-DLOCALEDIR=\"$(localedir)\"
--LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
-+LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) -lz
+-LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) $(LIBTHREAD)
++LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) $(LIBTHREAD) -lz
diff --git a/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch
index 41bd220bad..f72097e639 100644
--- a/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch
+++ b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch
@@ -1,19 +1,23 @@
-From 20e1d8a9481dc13dd1d4d168b90e0ed2ff097b98 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 6 Aug 2015 14:29:57 +0300
+From 3d3b66cf398853c666e724c3dbcc37d53a2240d5 Mon Sep 17 00:00:00 2001
+From: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
+Date: Tue, 29 Nov 2016 12:27:17 -0600
Subject: [PATCH] texinfo-4.12-zlib
Upstream-Status: Pending
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
+
---
install-info/Makefile.in | 2 +-
- install-info/install-info.c | 67 +++++++++++++++++++++++++++------------------
- 2 files changed, 42 insertions(+), 27 deletions(-)
+ install-info/install-info.c | 79 ++++++++++++++++++++++---------------
+ 2 files changed, 48 insertions(+), 33 deletions(-)
diff --git a/install-info/Makefile.in b/install-info/Makefile.in
-index ad73abb..eaa2153 100644
+index c924509..746df05 100644
--- a/install-info/Makefile.in
+++ b/install-info/Makefile.in
-@@ -241,7 +241,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
+@@ -218,7 +218,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_ginstall_info_OBJECTS = install-info.$(OBJEXT)
ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS)
@@ -21,12 +25,12 @@ index ad73abb..eaa2153 100644
+ginstall_info_LDADD = $(LDADD) -lz
am__DEPENDENCIES_1 =
ginstall_info_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \
- $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
diff --git a/install-info/install-info.c b/install-info/install-info.c
-index b454c15..4e39122 100644
+index 21f4fe3..a7aba82 100644
--- a/install-info/install-info.c
+++ b/install-info/install-info.c
-@@ -22,6 +22,7 @@
+@@ -19,6 +19,7 @@
#include <getopt.h>
#include <regex.h>
#include <argz.h>
@@ -34,7 +38,7 @@ index b454c15..4e39122 100644
#define TAB_WIDTH 8
-@@ -684,15 +685,15 @@ The first time you invoke Info you start off looking at this node.\n\
+@@ -681,15 +682,15 @@ The first time you invoke Info you start off looking at this node.\n\
Return either stdin reading the file, or a non-stdin pipe reading
the output of the compression program. */
@@ -43,7 +47,7 @@ index b454c15..4e39122 100644
open_possibly_compressed_file (char *filename,
void (*create_callback) (char *),
- char **opened_filename, char **compression_program)
-+ char **opened_filename, char **compression_program, int *is_pipe)
++ char **opened_filename, char **compression_program, int *is_pipe)
{
char *local_opened_filename, *local_compression_program;
int nread;
@@ -53,7 +57,7 @@ index b454c15..4e39122 100644
/* We let them pass NULL if they don't want this info, but it's easier
to always determine it. */
-@@ -700,48 +701,48 @@ open_possibly_compressed_file (char *filename,
+@@ -697,48 +698,48 @@ open_possibly_compressed_file (char *filename,
opened_filename = &local_opened_filename;
*opened_filename = filename;
@@ -110,7 +114,7 @@ index b454c15..4e39122 100644
}
#endif /* __MSDOS__ */
if (!f)
-@@ -757,7 +758,7 @@ open_possibly_compressed_file (char *filename,
+@@ -754,7 +755,7 @@ open_possibly_compressed_file (char *filename,
(*create_callback) (filename);
/* And try opening it again. */
@@ -119,7 +123,7 @@ index b454c15..4e39122 100644
if (!f)
return 0;
}
-@@ -767,12 +768,12 @@ open_possibly_compressed_file (char *filename,
+@@ -764,26 +765,26 @@ open_possibly_compressed_file (char *filename,
/* Read first few bytes of file rather than relying on the filename.
If the file is shorter than this it can't be usable anyway. */
@@ -128,14 +132,34 @@ index b454c15..4e39122 100644
+ nread = gzread (f, data, sizeof (data));
+ if (nread != sizeof (data))
{
- /* Empty files don't set errno. Calling code can check for
- this, so make sure errno == 0 just in case it isn't already. */
- if (nread == 0)
+ if (nread >= 0)
- errno = 0;
- return 0;
- }
-@@ -838,35 +839,40 @@ open_possibly_compressed_file (char *filename,
+ {
+ /* Try to create the file if its empty. */
+- if (feof (f) && create_callback)
++ if (gzeof(f) && create_callback)
+ {
+- if (fclose (f) != 0)
++ if (gzclose(f) != 0)
+ return 0; /* unknown error closing file */
+
+- if (remove (filename) != 0)
++ if (remove(filename) != 0)
+ return 0; /* unknown error deleting file */
+
+ (*create_callback) (filename);
+- f = fopen (*opened_filename, FOPEN_RBIN);
++ f = gzopen (*opened_filename, FOPEN_RBIN);
+ if (!f)
+ return 0;
+- nread = fread (data, sizeof (data), 1, f);
+- if (nread == 0)
++ nread = gzread(f, data, sizeof (data));
++ if (nread >= 0)
+ return 0;
+ goto determine_file_type; /* success */
+ }
+@@ -854,35 +855,40 @@ determine_file_type:
*compression_program = NULL;
/* Seek back over the magic bytes. */
@@ -183,7 +207,7 @@ index b454c15..4e39122 100644
}
return f;
-@@ -885,7 +891,8 @@ readfile (char *filename, int *sizep,
+@@ -901,7 +907,8 @@ readfile (char *filename, int *sizep,
void (*create_callback) (char *), char **opened_filename,
char **compression_program)
{
@@ -193,7 +217,7 @@ index b454c15..4e39122 100644
int filled = 0;
int data_size = 8192;
char *data = xmalloc (data_size);
-@@ -893,14 +900,20 @@ readfile (char *filename, int *sizep,
+@@ -909,14 +916,20 @@ readfile (char *filename, int *sizep,
/* If they passed the space for the file name to return, use it. */
f = open_possibly_compressed_file (filename, create_callback,
opened_filename,
@@ -216,7 +240,7 @@ index b454c15..4e39122 100644
if (nread < 0)
return 0;
if (nread == 0)
-@@ -919,8 +932,10 @@ readfile (char *filename, int *sizep,
+@@ -935,8 +948,10 @@ readfile (char *filename, int *sizep,
/* We need to close the stream, since on some systems the pipe created
by popen is simulated by a temporary file which only gets removed
inside pclose. */
@@ -228,6 +252,3 @@ index b454c15..4e39122 100644
*sizep = filled;
return data;
---
-2.1.4
-
diff --git a/meta/recipes-extended/texinfo/texinfo_4.8.bb b/meta/recipes-extended/texinfo/texinfo_4.8.bb
deleted file mode 100644
index 13678e093b..0000000000
--- a/meta/recipes-extended/texinfo/texinfo_4.8.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "Documentation system for on-line information and printed output"
-DESCRIPTION = "Texinfo is a documentation system that can produce both \
-online information and printed output from a single source file. The \
-GNU Project uses the Texinfo file format for most of its documentation."
-HOMEPAGE = "http://www.gnu.org/software/texinfo/"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-PROVIDES_append_class-native = " texinfo-4.8-replacement-native"
-
-DEPENDS = "zlib ncurses texinfo-4.8-replacement-native"
-DEPENDS_class-native = "zlib-native ncurses-native"
-
-TARGET_PATCH = "file://use_host_makedoc.patch \
- file://using-native-makeinfo.patch \
-"
-TARGET_PATCH_class-native = ""
-
-SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
- file://check-locale-h.patch \
- file://do-compile-native-tools.patch \
- ${TARGET_PATCH} \
- "
-
-SRC_URI[md5sum] = "4e9a1a591ed236003d0d4b008bf07eef"
-SRC_URI[sha256sum] = "1f3cdeebe65fdf510f55d765ab1031b54416aa5bc2635b6a54ef9bcb2367c917"
-
-tex_texinfo = "texmf/tex/texinfo"
-
-inherit gettext autotools
-
-do_install_append() {
- mkdir -p ${D}${datadir}/${tex_texinfo}
- install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
-}
-
-do_install_append_class-native() {
- install -m 755 info/makedoc ${D}${bindir}
- install -m 755 makeinfo/makeinfo ${D}${bindir}
-}
-
-PACKAGES += "info info-doc"
-
-FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
-FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \
- ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
- ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
-
-FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
-FILES_${PN}-doc = "${infodir}/texinfo* \
- ${datadir}/${tex_texinfo} \
- ${mandir}/man1 ${mandir}/man5"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/texinfo/texinfo_6.0.bb b/meta/recipes-extended/texinfo/texinfo_6.0.bb
deleted file mode 100644
index 8638bb1d0d..0000000000
--- a/meta/recipes-extended/texinfo/texinfo_6.0.bb
+++ /dev/null
@@ -1,82 +0,0 @@
-SUMMARY = "Documentation system for on-line information and printed output"
-DESCRIPTION = "Texinfo is a documentation system that can produce both \
-online information and printed output from a single source file. The \
-GNU Project uses the Texinfo file format for most of its documentation."
-HOMEPAGE = "http://www.gnu.org/software/texinfo/"
-SECTION = "console/utils"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-PROVIDES_append_class-native = " texinfo-replacement-native"
-
-def compress_pkg(d):
- if bb.data.inherits_class('compress_doc', d):
- compress = d.getVar("DOC_COMPRESS", True)
- if compress == "gz":
- return "gzip"
- elif compress == "bz2":
- return "bzip2"
- elif compress == "xz":
- return "xz"
- return ""
-
-RDEPENDS_info += "${@compress_pkg(d)}"
-
-DEPENDS = "zlib ncurses texinfo-replacement-native"
-DEPENDS_class-native = "zlib-native ncurses-native"
-
-TARGET_PATCH = "file://use_host_makedoc.patch"
-TARGET_PATCH_class-native = ""
-
-SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
- file://texinfo-4.12-zlib.patch \
- file://disable-native-tools.patch \
- file://link-zip.patch \
- file://dont-depend-on-help2man.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- ${TARGET_PATCH} \
- "
-
-SRC_URI[md5sum] = "e1a2ef5dce5018b53f0f6eed45b247a7"
-SRC_URI[sha256sum] = "83d3183290f34e7f958d209d0b20022c6fe9e921eb6fe94c27d988827d4878d2"
-
-tex_texinfo = "texmf/tex/texinfo"
-
-inherit gettext autotools
-
-do_configure_prepend () {
- # autotools_do_configure updates po/Makefile.in.in, we also need
- # update po_document.
- cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
-}
-
-do_compile_prepend() {
- if [ -d tools ];then
- oe_runmake -C tools/gnulib/lib
- fi
-}
-
-do_install_append() {
- mkdir -p ${D}${datadir}/${tex_texinfo}
- install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
-}
-
-do_install_append_class-native() {
- install -m 755 info/makedoc ${D}${bindir}
-}
-
-PACKAGES += "info info-doc"
-
-FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
-FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
- ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
- ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
-
-FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
-RDEPENDS_${PN} = "perl"
-FILES_${PN}-doc = "${infodir}/texinfo* \
- ${datadir}/${tex_texinfo} \
- ${mandir}/man1 ${mandir}/man5"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/texinfo/texinfo_6.7.bb b/meta/recipes-extended/texinfo/texinfo_6.7.bb
new file mode 100644
index 0000000000..d421b79a0b
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo_6.7.bb
@@ -0,0 +1,91 @@
+SUMMARY = "Documentation system for on-line information and printed output"
+DESCRIPTION = "Texinfo is a documentation system that can produce both \
+online information and printed output from a single source file. The \
+GNU Project uses the Texinfo file format for most of its documentation."
+HOMEPAGE = "http://www.gnu.org/software/texinfo/"
+SECTION = "console/utils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
+
+PROVIDES_append_class-native = " texinfo-replacement-native"
+
+def compress_pkg(d):
+ if bb.data.inherits_class('compress_doc', d):
+ compress = d.getVar("DOC_COMPRESS")
+ if compress == "gz":
+ return "gzip"
+ elif compress == "bz2":
+ return "bzip2"
+ elif compress == "xz":
+ return "xz"
+ return ""
+
+RDEPENDS_info += "${@compress_pkg(d)}"
+
+DEPENDS = "zlib ncurses texinfo-replacement-native"
+DEPENDS_class-native = "zlib-native ncurses-native"
+
+TARGET_PATCH = "file://use_host_makedoc.patch"
+TARGET_PATCH_class-native = ""
+
+SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
+ file://texinfo-4.12-zlib.patch \
+ file://disable-native-tools.patch \
+ file://link-zip.patch \
+ file://dont-depend-on-help2man.patch \
+ ${TARGET_PATCH} \
+ "
+
+SRC_URI[md5sum] = "f0c1782f68ef73738d74bd1e9e30793a"
+SRC_URI[sha256sum] = "a52d05076b90032cb2523673c50e53185938746482cf3ca0213e9b4b50ac2d3e"
+
+tex_texinfo = "texmf/tex/texinfo"
+
+inherit gettext autotools multilib_script
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/texi2any"
+
+EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
+
+do_configure_prepend () {
+ # autotools_do_configure updates po/Makefile.in.in, we also need
+ # update po_document.
+ cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
+}
+
+do_compile_prepend() {
+ if [ -d tools ];then
+ oe_runmake -C tools/gnulib/lib
+ fi
+}
+
+do_install_append() {
+ mkdir -p ${D}${datadir}/${tex_texinfo}
+ install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
+ sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
+}
+
+do_install_append_class-native() {
+ install -m 755 info/makedoc ${D}${bindir}
+}
+
+PACKAGES += "info info-doc"
+
+FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
+FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
+ ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
+ ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
+
+FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
+RDEPENDS_${PN} = "perl"
+FILES_${PN}-doc = "${infodir}/texinfo* \
+ ${datadir}/${tex_texinfo} \
+ ${mandir}/man1 ${mandir}/man5"
+
+# Lie about providing the Locale::gettext_xs module. It is not actually built,
+# but the code will test for it and if not found use Locale::gettext_pp instead.
+# However, this causes a file dependency on perl(Locale::gettext_xs) to be
+# generated, which must be satisfied.
+RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/time/time-1.7/debian.patch b/meta/recipes-extended/time/time-1.7/debian.patch
deleted file mode 100644
index 23ea0e3eb9..0000000000
--- a/meta/recipes-extended/time/time-1.7/debian.patch
+++ /dev/null
@@ -1,1301 +0,0 @@
-Upstream-Status: Backport
-
---- time-1.7.orig/configure.in
-+++ time-1.7/configure.in
-@@ -1,11 +1,8 @@
- dnl Process this file with autoconf to produce a configure script.
- AC_INIT(time.c)
--VERSION=1.7
--AC_SUBST(VERSION)
--PACKAGE=time
--AC_SUBST(PACKAGE)
-+AM_INIT_AUTOMAKE(time, 1.7)
-
--AC_ARG_PROGRAM
-+AM_MAINTAINER_MODE
-
- dnl Checks for programs.
- AC_PROG_CC
-@@ -15,7 +12,7 @@
- dnl Checks for header files.
- AC_HEADER_STDC
- AC_HEADER_SYS_WAIT
--AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h)
-+AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h)
-
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
---- time-1.7.orig/version.texi
-+++ time-1.7/version.texi
-@@ -1,3 +1,3 @@
--@set UPDATED 12 June 1996
-+@set UPDATED 9 May 2002
- @set EDITION 1.7
- @set VERSION 1.7
---- time-1.7.orig/time.c
-+++ time-1.7/time.c
-@@ -147,6 +147,10 @@
- NULL
- };
-
-+
-+/* If true, do not show the exit message */
-+static boolean quiet;
-+
- /* If true, show an English description next to each statistic. */
- static boolean verbose;
-
-@@ -172,6 +176,7 @@
- {"help", no_argument, NULL, 'h'},
- {"output-file", required_argument, NULL, 'o'},
- {"portability", no_argument, NULL, 'p'},
-+ {"quiet", no_argument,NULL, 'q'},
- {"verbose", no_argument, NULL, 'v'},
- {"version", no_argument, NULL, 'V'},
- {NULL, no_argument, NULL, 0}
-@@ -333,7 +338,8 @@
- else if (WIFSIGNALED (resp->waitstatus))
- fprintf (fp, "Command terminated by signal %d\n",
- WTERMSIG (resp->waitstatus));
-- else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus))
-+ else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)
-+ && !quiet)
- fprintf (fp, "Command exited with non-zero status %d\n",
- WEXITSTATUS (resp->waitstatus));
-
-@@ -523,6 +529,7 @@
- char *format; /* Format found in environment. */
-
- /* Initialize the option flags. */
-+ quiet = false;
- verbose = false;
- outfile = NULL;
- outfp = stderr;
-@@ -536,7 +543,7 @@
- if (format)
- output_format = format;
-
-- while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0))
-+ while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0))
- != EOF)
- {
- switch (optc)
-@@ -555,6 +562,9 @@
- case 'p':
- output_format = posix_format;
- break;
-+ case 'q':
-+ quiet = true;
-+ break;
- case 'v':
- verbose = true;
- break;
-@@ -642,9 +652,9 @@
- fflush (outfp);
-
- if (WIFSTOPPED (res.waitstatus))
-- exit (WSTOPSIG (res.waitstatus));
-+ exit (WSTOPSIG (res.waitstatus) + 128);
- else if (WIFSIGNALED (res.waitstatus))
-- exit (WTERMSIG (res.waitstatus));
-+ exit (WTERMSIG (res.waitstatus) + 128);
- else if (WIFEXITED (res.waitstatus))
- exit (WEXITSTATUS (res.waitstatus));
- }
-@@ -657,7 +667,7 @@
- fprintf (stream, "\
- Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\
- [--portability] [--format=format] [--output=file] [--version]\n\
-- [--help] command [arg...]\n",
-+ [--quiet] [--help] command [arg...]\n",
- program_name);
- exit (status);
- }
---- time-1.7.orig/resuse.h
-+++ time-1.7/resuse.h
-@@ -36,19 +36,8 @@
- # include <sys/rusage.h>
- #else
- # define TV_MSEC tv_usec / 1000
--# if HAVE_WAIT3
-+# if HAVE_SYS_RESOURCE_H
- # include <sys/resource.h>
--# else
--/* Process resource usage structure. */
--struct rusage
--{
-- struct timeval ru_utime; /* User time used. */
-- struct timeval ru_stime; /* System time used. */
-- int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss,
-- ru_minflt, ru_majflt, ru_nswap, ru_inblock,
-- ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals,
-- ru_nvcsw, ru_nivcsw;
--};
- # endif
- #endif
-
---- time-1.7.orig/time.texi
-+++ time-1.7/time.texi
-@@ -11,6 +11,12 @@
- @finalout
- @end iftex
-
-+@dircategory Individual utilities
-+@direntry
-+* time: (time). Run programs and summarize
-+ system resource usage.
-+@end direntry
-+
- @ifinfo
- This file documents the the GNU @code{time} command for running programs
- and summarizing the system resources they use.
-@@ -185,6 +191,10 @@
- sys %S
- @end example
-
-+@item -q
-+@itemx --quiet
-+Suppress non-zero error code from the executed program.
-+
- @item -v
- @itemx --verbose
- @cindex format
---- time-1.7.orig/time.info
-+++ time-1.7/time.info
-@@ -1,5 +1,10 @@
--This is Info file ./time.info, produced by Makeinfo-1.55 from the input
--file time.texi.
-+This is time.info, produced by makeinfo version 4.1 from time.texi.
-+
-+INFO-DIR-SECTION Individual utilities
-+START-INFO-DIR-ENTRY
-+* time: (time). Run programs and summarize
-+ system resource usage.
-+END-INFO-DIR-ENTRY
-
- This file documents the the GNU `time' command for running programs
- and summarizing the system resources they use.
-@@ -31,7 +36,7 @@
-
- * Resource Measurement:: Measuring program resource use.
-
-- -- The Detailed Node Listing --
-+ --- The Detailed Node Listing ---
-
- Measuring Program Resource Use
-
-@@ -58,14 +63,14 @@
- The `time' command runs another program, then displays information
- about the resources used by that program, collected by the system while
- the program was running. You can select which information is reported
--and the format in which it is shown (*note Setting Format::.), or have
-+and the format in which it is shown (*note Setting Format::), or have
- `time' save the information in a file instead of displaying it on the
--screen (*note Redirecting::.).
-+screen (*note Redirecting::).
-
- The resources that `time' can report on fall into the general
- categories of time, memory, and I/O and IPC calls. Some systems do not
- provide much information about program resource use; `time' reports
--unavailable information as zero values (*note Accuracy::.).
-+unavailable information as zero values (*note Accuracy::).
-
- The format of the `time' command is:
-
-@@ -132,6 +137,10 @@
- user %U
- sys %S
-
-+`-q'
-+`--quiet'
-+ Suppress non-zero error code from the executed program.
-+
- `-v'
- `--verbose'
- Use the built-in verbose format, which displays each available
-@@ -174,7 +183,7 @@
- The resource specifiers, which are a superset of those recognized by
- the `tcsh' builtin `time' command, are listed below. Not all resources
- are measured by all versions of Unix, so some of the values might be
--reported as zero (*note Accuracy::.).
-+reported as zero (*note Accuracy::).
-
- * Menu:
-
-@@ -308,11 +317,11 @@
- `-o FILE'
- `--output=FILE'
- Write the resource use statistics to FILE. By default, this
-- *overwrites* the file, destroying the file's previous contents.
-+ _overwrites_ the file, destroying the file's previous contents.
-
- `-a'
- `--append'
-- *Append* the resource use information to the output file instead
-+ _Append_ the resource use information to the output file instead
- of overwriting it. This option is only useful with the `-o' or
- `--output' option.
-
-@@ -437,7 +446,7 @@
-
- `-a'
- `--append'
-- *Append* the resource use information to the output file instead
-+ _Append_ the resource use information to the output file instead
- of overwriting it.
-
- `-f FORMAT'
-@@ -462,17 +471,17 @@
-
- 
- Tag Table:
--Node: Top934
--Node: Resource Measurement1725
--Node: Setting Format3678
--Node: Format String4907
--Node: Time Resources6214
--Node: Memory Resources6844
--Node: I/O Resources7549
--Node: Command Info8747
--Node: Redirecting8964
--Node: Examples9754
--Node: Accuracy12064
--Node: Invoking time13586
-+Node: Top1115
-+Node: Resource Measurement1908
-+Node: Setting Format3858
-+Node: Format String5164
-+Node: Time Resources6470
-+Node: Memory Resources7100
-+Node: I/O Resources7805
-+Node: Command Info9003
-+Node: Redirecting9220
-+Node: Examples10010
-+Node: Accuracy12320
-+Node: Invoking time13842
- 
- End Tag Table
---- time-1.7.orig/time.html
-+++ time-1.7/time.html
-@@ -0,0 +1,1021 @@
-+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-+ "http://www.w3.org/TR/html40/loose.dtd">
-+<HTML>
-+<!-- Created on September, 1 2003 by texi2html 1.66 -->
-+<!--
-+Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
-+ Karl Berry <karl@freefriends.org>
-+ Olaf Bachmann <obachman@mathematik.uni-kl.de>
-+ and many others.
-+Maintained by: Many creative people <dev@texi2html.cvshome.org>
-+Send bugs and suggestions to <users@texi2html.cvshome.org>
-+
-+-->
-+<HEAD>
-+<TITLE>Measuring Program Resource Use</TITLE>
-+
-+<META NAME="description" CONTENT="Measuring Program Resource Use">
-+<META NAME="keywords" CONTENT="Measuring Program Resource Use">
-+<META NAME="resource-type" CONTENT="document">
-+<META NAME="distribution" CONTENT="global">
-+<META NAME="Generator" CONTENT="texi2html 1.66">
-+
-+</HEAD>
-+
-+<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
-+
-+<A NAME="SEC_Top"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Measuring Program Resource Use</H1>
-+
-+<P>
-+
-+This file documents the the GNU <CODE>time</CODE> command for running programs
-+and summarizing the system resources they use.
-+This is edition 1.7, for version 1.7.
-+</P>
-+<P>
-+
-+</P>
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC1">1. Measuring Program Resource Use</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Measuring program resource use.</TD></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -- The Detailed Node Listing ---
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">Measuring Program Resource Use
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">The Format String
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+</TABLE>
-+<P>
-+
-+<HR SIZE=1>
-+<A NAME="SEC1"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<A NAME="Resource Measurement"></A>
-+<H1> 1. Measuring Program Resource Use </H1>
-+<!--docid::SEC1::-->
-+<P>
-+
-+The <CODE>time</CODE> command runs another program, then displays information
-+about the resources used by that program, collected by the system while
-+the program was running. You can select which information is reported
-+and the format in which it is shown (see section <A HREF="time.html#SEC2">1.1 Setting the Output Format</A>), or have
-+<CODE>time</CODE> save the information in a file instead of displaying it on the
-+screen (see section <A HREF="time.html#SEC8">1.3 Redirecting Output</A>).
-+</P>
-+<P>
-+
-+The resources that <CODE>time</CODE> can report on fall into the general
-+categories of time, memory, and I/O and IPC calls. Some systems do not
-+provide much information about program resource use; <CODE>time</CODE>
-+reports unavailable information as zero values (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
-+</P>
-+<P>
-+
-+The format of the <CODE>time</CODE> command is:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
-+</pre></td></tr></table><P>
-+
-+<A NAME="IDX1"></A>
-+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
-+<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
-+information about resources used by <VAR>command</VAR>.
-+</P>
-+<P>
-+
-+Here is an example of using <CODE>time</CODE> to measure the time and other
-+resources used by running the program <CODE>grep</CODE>:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time grep nobody /etc/aliases
-+nobody:/dev/null
-+etc-files:nobody
-+misc-group:nobody
-+0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k
-+46inputs+7outputs (43major+251minor)pagefaults 0swaps
-+</pre></td></tr></table><P>
-+
-+Mail suggestions and bug reports for GNU <CODE>time</CODE> to
-+<CODE>bug-gnu-utils@prep.ai.mit.edu</CODE>. Please include the version of
-+<CODE>time</CODE>, which you can get by running `<SAMP>time --version</SAMP>', and the
-+operating system and C compiler you used.
-+</P>
-+<P>
-+
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
-+</TABLE>
-+<P>
-+
-+<A NAME="Setting Format"></A>
-+<HR SIZE="6">
-+<A NAME="SEC2"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.1 Setting the Output Format </H2>
-+<!--docid::SEC2::-->
-+<P>
-+
-+<CODE>time</CODE> uses a <EM>format string</EM> to determine which information to
-+display about the resources used by the command it runs. See section <A HREF="time.html#SEC3">1.2 The Format String</A>, for the interpretation of the format string contents.
-+</P>
-+<P>
-+
-+You can specify a format string with the command line options listed
-+below. If no format is specified on the command line, but the
-+<CODE>TIME</CODE> environment variable is set, its value is used as the format
-+string. Otherwise, the default format built into <CODE>time</CODE> is used:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
-+%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
-+</pre></td></tr></table><P>
-+
-+The command line options to set the format are:
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-f <VAR>format</VAR></CODE>
-+<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
-+<DD>Use <VAR>format</VAR> as the format string.
-+<P>
-+
-+</P>
-+<DT><CODE>-p</CODE>
-+<DD><DT><CODE>--portability</CODE>
-+<DD>Use the following format string, for conformance with POSIX standard
-+1003.2:
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>real %e
-+user %U
-+sys %S
-+</pre></td></tr></table><P>
-+
-+</P>
-+<DT><CODE>-q</CODE>
-+<DD><DT><CODE>--quiet</CODE>
-+<DD>Suppress non-zero error code from the executed program.
-+<P>
-+
-+</P>
-+<DT><CODE>-v</CODE>
-+<DD><DT><CODE>--verbose</CODE>
-+<DD><A NAME="IDX2"></A>
-+Use the built-in verbose format, which displays each available piece of
-+information on the program's resource use on its own line, with an
-+English description of its meaning.
-+</DL>
-+<P>
-+
-+<A NAME="Format String"></A>
-+<HR SIZE="6">
-+<A NAME="SEC3"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.2 The Format String </H2>
-+<!--docid::SEC3::-->
-+<P>
-+
-+<A NAME="IDX3"></A>
-+<A NAME="IDX4"></A>
-+The <EM>format string</EM> controls the contents of the <CODE>time</CODE> output.
-+It consists of <EM>resource specifiers</EM> and <EM>escapes</EM>, interspersed
-+with plain text.
-+</P>
-+<P>
-+
-+A backslash introduces an <EM>escape</EM>, which is translated
-+into a single printing character upon output. The valid escapes are
-+listed below. An invalid escape is output as a question mark followed
-+by a backslash.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>\t</CODE>
-+<DD>a tab character
-+<P>
-+
-+</P>
-+<DT><CODE>\n</CODE>
-+<DD>a newline
-+<P>
-+
-+</P>
-+<DT><CODE>\\</CODE>
-+<DD>a literal backslash
-+</DL>
-+<P>
-+
-+<CODE>time</CODE> always prints a newline after printing the resource use
-+information, so normally format strings do not end with a newline
-+character (or `<SAMP>\n</SAMP>').
-+</P>
-+<P>
-+
-+A resource specifier consists of a percent sign followed by another
-+character. An invalid resource specifier is output as a question mark
-+followed by the invalid character. Use `<SAMP>%%</SAMP>' to output a literal
-+percent sign.
-+</P>
-+<P>
-+
-+The resource specifiers, which are a superset of those recognized by the
-+<CODE>tcsh</CODE> builtin <CODE>time</CODE> command, are listed below. Not all
-+resources are measured by all versions of Unix, so some of the values
-+might be reported as zero (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
-+</P>
-+<P>
-+
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+</TABLE>
-+<P>
-+
-+<A NAME="Time Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC4"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.1 Time Resources </H3>
-+<!--docid::SEC4::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>E</CODE>
-+<DD>Elapsed real (wall clock) time used by the process, in
-+[hours:]minutes:seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>e</CODE>
-+<DD>Elapsed real (wall clock) time used by the process, in
-+seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>S</CODE>
-+<DD>Total number of CPU-seconds used by the system on behalf of the process
-+(in kernel mode), in seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>U</CODE>
-+<DD>Total number of CPU-seconds that the process used directly (in user
-+mode), in seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>P</CODE>
-+<DD>Percentage of the CPU that this job got. This is just user + system
-+times divied by the total running time.
-+</DL>
-+<P>
-+
-+<A NAME="Memory Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC5"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.2 Memory Resources </H3>
-+<!--docid::SEC5::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>M</CODE>
-+<DD>Maximum resident set size of the process during its lifetime, in
-+Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>t</CODE>
-+<DD>Average resident set size of the process, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>K</CODE>
-+<DD>Average total (data+stack+text) memory use of the process, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>D</CODE>
-+<DD>Average size of the process's unshared data area, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>p</CODE>
-+<DD>Average size of the process's unshared stack, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>X</CODE>
-+<DD>Average size of the process's shared text, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>Z</CODE>
-+<DD>System's page size, in bytes. This is a per-system constant, but
-+varies between systems.
-+</DL>
-+<P>
-+
-+<A NAME="I/O Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC6"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.3 I/O Resources </H3>
-+<!--docid::SEC6::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>F</CODE>
-+<DD>Number of major, or I/O-requiring, page faults that occurred while the
-+process was running. These are faults where the page has actually
-+migrated out of primary memory.
-+<P>
-+
-+</P>
-+<DT><CODE>R</CODE>
-+<DD>Number of minor, or recoverable, page faults. These are pages that are
-+not valid (so they fault) but which have not yet been claimed by other
-+virtual pages. Thus the data in the page is still valid but the system
-+tables must be updated.
-+<P>
-+
-+</P>
-+<DT><CODE>W</CODE>
-+<DD>Number of times the process was swapped out of main memory.
-+<P>
-+
-+</P>
-+<DT><CODE>c</CODE>
-+<DD>Number of times the process was context-switched involuntarily (because
-+the time slice expired).
-+<P>
-+
-+</P>
-+<DT><CODE>w</CODE>
-+<DD>Number of times that the program was context-switched voluntarily, for
-+instance while waiting for an I/O operation to complete.
-+<P>
-+
-+</P>
-+<DT><CODE>I</CODE>
-+<DD>Number of file system inputs by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>O</CODE>
-+<DD>Number of file system outputs by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>r</CODE>
-+<DD>Number of socket messages received by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>s</CODE>
-+<DD>Number of socket messages sent by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>k</CODE>
-+<DD>Number of signals delivered to the process.
-+</DL>
-+<P>
-+
-+<A NAME="Command Info"></A>
-+<HR SIZE="6">
-+<A NAME="SEC7"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.4 Command Info </H3>
-+<!--docid::SEC7::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>C</CODE>
-+<DD>Name and command line arguments of the command being timed.
-+<P>
-+
-+</P>
-+<DT><CODE>x</CODE>
-+<DD>Exit status of the command.
-+</DL>
-+<P>
-+
-+<A NAME="Redirecting"></A>
-+<HR SIZE="6">
-+<A NAME="SEC8"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.3 Redirecting Output </H2>
-+<!--docid::SEC8::-->
-+<P>
-+
-+By default, <CODE>time</CODE> writes the resource use statistics to the
-+standard error stream. The options below make it write the statistics
-+to a file instead. Doing this can be useful if the program you're
-+running writes to the standard error or you're running <CODE>time</CODE>
-+noninteractively or in the background.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-o <VAR>file</VAR></CODE>
-+<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
-+<DD>Write the resource use statistics to <VAR>file</VAR>. By default, this
-+<EM>overwrites</EM> the file, destroying the file's previous contents.
-+<P>
-+
-+</P>
-+<DT><CODE>-a</CODE>
-+<DD><DT><CODE>--append</CODE>
-+<DD><EM>Append</EM> the resource use information to the output file instead
-+of overwriting it. This option is only useful with the `<SAMP>-o</SAMP>' or
-+`<SAMP>--output</SAMP>' option.
-+</DL>
-+<P>
-+
-+<A NAME="Examples"></A>
-+<HR SIZE="6">
-+<A NAME="SEC9"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.4 Examples </H2>
-+<!--docid::SEC9::-->
-+<P>
-+
-+Run the command `<SAMP>wc /etc/hosts</SAMP>' and show the default information:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time wc /etc/hosts
-+ 35 111 1134 /etc/hosts
-+0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
-+1inputs+1outputs (0major+0minor)pagefaults 0swaps
-+</pre></td></tr></table><P>
-+
-+Run the command `<SAMP>ls -Fs</SAMP>' and show just the user, system, and
-+wall-clock time:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -f &quot;\t%E real,\t%U user,\t%S sys&quot; ls -Fs
-+total 16
-+1 account/ 1 db/ 1 mail/ 1 run/
-+1 backups/ 1 emacs/ 1 msgs/ 1 rwho/
-+1 crash/ 1 games/ 1 preserve/ 1 spool/
-+1 cron/ 1 log/ 1 quotas/ 1 tmp/
-+ 0:00.03 real, 0.00 user, 0.01 sys
-+</pre></td></tr></table><P>
-+
-+Edit the file `<TT>.bashrc</TT>' and have <CODE>time</CODE> append the elapsed time
-+and number of signals to the file `<TT>log</TT>', reading the format string
-+from the environment variable <CODE>TIME</CODE>:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ export TIME=&quot;\t%E,\t%k&quot; # If using bash or ksh
-+eg$ setenv TIME &quot;\t%E,\t%k&quot; # If using csh or tcsh
-+eg$ time -a -o log emacs .bashrc
-+eg$ cat log
-+ 0:16.55, 726
-+</pre></td></tr></table><P>
-+
-+Run the command `<SAMP>sleep 4</SAMP>' and show all of the information about it
-+verbosely:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -v sleep 4
-+ Command being timed: &quot;sleep 4&quot;
-+ User time (seconds): 0.00
-+ System time (seconds): 0.05
-+ Percent of CPU this job got: 1%
-+ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26
-+ Average shared text size (kbytes): 36
-+ Average unshared data size (kbytes): 24
-+ Average stack size (kbytes): 0
-+ Average total size (kbytes): 60
-+ Maximum resident set size (kbytes): 32
-+ Average resident set size (kbytes): 24
-+ Major (requiring I/O) page faults: 3
-+ Minor (reclaiming a frame) page faults: 0
-+ Voluntary context switches: 11
-+ Involuntary context switches: 0
-+ Swaps: 0
-+ File system inputs: 3
-+ File system outputs: 1
-+ Socket messages sent: 0
-+ Socket messages received: 0
-+ Signals delivered: 1
-+ Page size (bytes): 4096
-+ Exit status: 0
-+</pre></td></tr></table><P>
-+
-+<A NAME="Accuracy"></A>
-+<HR SIZE="6">
-+<A NAME="SEC10"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC11"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.5 Accuracy </H2>
-+<!--docid::SEC10::-->
-+<P>
-+
-+The elapsed time is not collected atomically with the execution of the
-+program; as a result, in bizarre circumstances (if the <CODE>time</CODE>
-+command gets stopped or swapped out in between when the program being
-+timed exits and when <CODE>time</CODE> calculates how long it took to run), it
-+could be much larger than the actual execution time.
-+</P>
-+<P>
-+
-+When the running time of a command is very nearly zero, some values
-+(e.g., the percentage of CPU used) may be reported as either zero (which
-+is wrong) or a question mark.
-+</P>
-+<P>
-+
-+Most information shown by <CODE>time</CODE> is derived from the <CODE>wait3</CODE>
-+system call. The numbers are only as good as those returned by
-+<CODE>wait3</CODE>. Many systems do not measure all of the resources that
-+<CODE>time</CODE> can report on; those resources are reported as zero. The
-+systems that measure most or all of the resources are based on 4.2 or
-+4.3BSD. Later BSD releases use different memory management code that
-+measures fewer resources.
-+</P>
-+<P>
-+
-+On systems that do not have a <CODE>wait3</CODE> call that returns status
-+information, the <CODE>times</CODE> system call is used instead. It provides
-+much less information than <CODE>wait3</CODE>, so on those systems <CODE>time</CODE>
-+reports most of the resources as zero.
-+</P>
-+<P>
-+
-+The `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' values are allegedly only &quot;real&quot; input
-+and output and do not include those supplied by caching devices. The
-+meaning of &quot;real&quot; I/O reported by `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' may be
-+muddled for workstations, especially diskless ones.
-+</P>
-+<P>
-+
-+<A NAME="Invoking time"></A>
-+<HR SIZE="6">
-+<A NAME="SEC11"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.6 Running the <CODE>time</CODE> Command </H2>
-+<!--docid::SEC11::-->
-+<P>
-+
-+The format of the <CODE>time</CODE> command is:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
-+</pre></td></tr></table><P>
-+
-+<A NAME="IDX5"></A>
-+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
-+<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
-+information about resources used by <VAR>command</VAR> (on the standard error
-+output, by default). If <VAR>command</VAR> exits with non-zero status or is
-+terminated by a signal, <CODE>time</CODE> displays a warning message and the
-+exit status or signal number.
-+</P>
-+<P>
-+
-+Options to <CODE>time</CODE> must appear on the command line before
-+<VAR>command</VAR>. Anything on the command line after <VAR>command</VAR> is
-+passed as arguments to <VAR>command</VAR>.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-o <VAR>file</VAR></CODE>
-+<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
-+<DD>Write the resource use statistics to <VAR>file</VAR>.
-+<P>
-+
-+</P>
-+<DT><CODE>-a</CODE>
-+<DD><DT><CODE>--append</CODE>
-+<DD><EM>Append</EM> the resource use information to the output file instead
-+of overwriting it.
-+<P>
-+
-+</P>
-+<DT><CODE>-f <VAR>format</VAR></CODE>
-+<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
-+<DD>Use <VAR>format</VAR> as the format string.
-+<P>
-+
-+</P>
-+<DT><CODE>--help</CODE>
-+<DD>Print a summary of the command line options to <CODE>time</CODE> and exit.
-+<P>
-+
-+</P>
-+<DT><CODE>-p</CODE>
-+<DD><DT><CODE>--portability</CODE>
-+<DD>Use the POSIX format.
-+<P>
-+
-+</P>
-+<DT><CODE>-v</CODE>
-+<DD><DT><CODE>--verbose</CODE>
-+<DD><A NAME="IDX6"></A>
-+Use the built-in verbose format.
-+<P>
-+
-+</P>
-+<DT><CODE>-V</CODE>
-+<DD><DT><CODE>--version</CODE>
-+<DD><A NAME="IDX7"></A>
-+Print the version number of <CODE>time</CODE> and exit.
-+</DL>
-+<P>
-+
-+<HR SIZE="6">
-+<A NAME="SEC_Contents"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Table of Contents</H1>
-+<BLOCKQUOTE>
-+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
-+<BR>
-+<BLOCKQUOTE>
-+<A NAME="TOC2" HREF="time.html#SEC2">1.1 Setting the Output Format</A>
-+<BR>
-+<A NAME="TOC3" HREF="time.html#SEC3">1.2 The Format String</A>
-+<BR>
-+<BLOCKQUOTE>
-+<A NAME="TOC4" HREF="time.html#SEC4">1.2.1 Time Resources</A>
-+<BR>
-+<A NAME="TOC5" HREF="time.html#SEC5">1.2.2 Memory Resources</A>
-+<BR>
-+<A NAME="TOC6" HREF="time.html#SEC6">1.2.3 I/O Resources</A>
-+<BR>
-+<A NAME="TOC7" HREF="time.html#SEC7">1.2.4 Command Info</A>
-+<BR>
-+</BLOCKQUOTE>
-+<A NAME="TOC8" HREF="time.html#SEC8">1.3 Redirecting Output</A>
-+<BR>
-+<A NAME="TOC9" HREF="time.html#SEC9">1.4 Examples</A>
-+<BR>
-+<A NAME="TOC10" HREF="time.html#SEC10">1.5 Accuracy</A>
-+<BR>
-+<A NAME="TOC11" HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A>
-+<BR>
-+</BLOCKQUOTE>
-+</BLOCKQUOTE>
-+<HR SIZE=1>
-+<A NAME="SEC_OVERVIEW"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Short Table of Contents</H1>
-+<BLOCKQUOTE>
-+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
-+<BR>
-+
-+</BLOCKQUOTE>
-+<HR SIZE=1>
-+<A NAME="SEC_About"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>About this document</H1>
-+This document was generated
-+by
-+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
-+<P></P>
-+The buttons in the navigation panels have the following meaning:
-+<P></P>
-+<table border = "1">
-+<TR>
-+<TH> Button </TH>
-+<TH> Name </TH>
-+<TH> Go to </TH>
-+<TH> From 1.2.3 go to</TH>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ &lt; ] </TD>
-+<TD ALIGN="CENTER">
-+Back
-+</TD>
-+<TD>
-+previous section in reading order
-+</TD>
-+<TD>
-+1.2.2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ &gt; ] </TD>
-+<TD ALIGN="CENTER">
-+Forward
-+</TD>
-+<TD>
-+next section in reading order
-+</TD>
-+<TD>
-+1.2.4
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ &lt;&lt; ] </TD>
-+<TD ALIGN="CENTER">
-+FastBack
-+</TD>
-+<TD>
-+beginning of this chapter or previous chapter
-+</TD>
-+<TD>
-+1
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ Up ] </TD>
-+<TD ALIGN="CENTER">
-+Up
-+</TD>
-+<TD>
-+up section
-+</TD>
-+<TD>
-+1.2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ &gt;&gt; ] </TD>
-+<TD ALIGN="CENTER">
-+FastForward
-+</TD>
-+<TD>
-+next chapter
-+</TD>
-+<TD>
-+2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Top] </TD>
-+<TD ALIGN="CENTER">
-+Top
-+</TD>
-+<TD>
-+cover (top) of document
-+</TD>
-+<TD>
-+ &nbsp;
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Contents] </TD>
-+<TD ALIGN="CENTER">
-+Contents
-+</TD>
-+<TD>
-+table of contents
-+</TD>
-+<TD>
-+ &nbsp;
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Index] </TD>
-+<TD ALIGN="CENTER">
-+Index
-+</TD>
-+<TD>
-+concept index
-+</TD>
-+<TD>
-+ &nbsp;
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ ? ] </TD>
-+<TD ALIGN="CENTER">
-+About
-+</TD>
-+<TD>
-+this page
-+</TD>
-+<TD>
-+ &nbsp;
-+</TD>
-+</TR>
-+</TABLE>
-+ <P>
-+ where the <STRONG> Example </STRONG> assumes that the current position
-+ is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
-+ the following structure:</P>
-+ <UL>
-+ <LI> 1. Section One
-+ <UL>
-+ <LI>1.1 Subsection One-One
-+ <UL>
-+ <LI>...</LI>
-+ </UL>
-+ <LI>1.2 Subsection One-Two
-+ <UL>
-+ <LI>1.2.1 Subsubsection One-Two-One</LI>
-+ <LI>1.2.2 Subsubsection One-Two-Two</LI>
-+ <LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
-+ <STRONG>&lt;== Current Position </STRONG></LI>
-+ <LI>1.2.4 Subsubsection One-Two-Four</LI>
-+ </UL>
-+ </LI>
-+ <LI>1.3 Subsection One-Three
-+ <UL>
-+ <LI>...</LI>
-+ </UL>
-+ </LI>
-+ <LI>1.4 Subsection One-Four</LI>
-+ </UL>
-+ </LI>
-+ </UL>
-+
-+<HR SIZE=1>
-+<BR>
-+<FONT SIZE="-1">
-+This document was generated
-+by <I>root</I> on <I>September, 1 2003</I>
-+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
-+</FONT>
-+
-+</BODY>
-+</HTML>
diff --git a/meta/recipes-extended/time/time.inc b/meta/recipes-extended/time/time.inc
deleted file mode 100644
index 85862177b7..0000000000
--- a/meta/recipes-extended/time/time.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-SUMMARY = "Tool that measures CPU resources"
-DESCRIPTION = "time measures many of the CPU resources, such as time and \
-memory, that other programs use."
-HOMEPAGE = "http://www.gnu.org/software/time/"
-SECTION = "utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-inherit texinfo update-alternatives
-
-ALTERNATIVE_${PN} = "time"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/time/time_1.7.bb b/meta/recipes-extended/time/time_1.7.bb
deleted file mode 100644
index 92c5353d09..0000000000
--- a/meta/recipes-extended/time/time_1.7.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require time.inc
-
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \
- file://debian.patch"
-
-SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3"
-SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d"
-
-inherit autotools
diff --git a/meta/recipes-extended/time/time_1.9.bb b/meta/recipes-extended/time/time_1.9.bb
new file mode 100644
index 0000000000..e2b084caae
--- /dev/null
+++ b/meta/recipes-extended/time/time_1.9.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Tool that measures CPU resources"
+DESCRIPTION = "time measures many of the CPU resources, such as time and \
+memory, that other programs use."
+HOMEPAGE = "http://www.gnu.org/software/time/"
+SECTION = "utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit texinfo update-alternatives
+
+ALTERNATIVE_${PN} = "time"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "d2356e0fe1c0b85285d83c6b2ad51b5f"
+SRC_URI[sha256sum] = "fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e"
+
+inherit autotools
diff --git a/meta/recipes-extended/timezone/timezone.inc b/meta/recipes-extended/timezone/timezone.inc
new file mode 100644
index 0000000000..91a5cb3327
--- /dev/null
+++ b/meta/recipes-extended/timezone/timezone.inc
@@ -0,0 +1,20 @@
+SUMMARY = "Timezone data"
+DESCRIPTION = "The Time Zone Database contains code and data that represent \
+the history of local time for many representative locations around the globe."
+HOMEPAGE = "http://www.iana.org/time-zones"
+SECTION = "base"
+LICENSE = "PD & BSD & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
+
+PV = "2019c"
+
+SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
+ http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
+ "
+
+UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
+
+SRC_URI[tzcode.md5sum] = "195a17454c5db05cab96595380650391"
+SRC_URI[tzcode.sha256sum] = "f6ebd3668e02d5ed223d3b7b1947561bf2d2da2f4bd1db61efefd9e06c167ed4"
+SRC_URI[tzdata.md5sum] = "f6987e6dfdb2eb83a1b5076a50b80894"
+SRC_URI[tzdata.sha256sum] = "79c7806dab09072308da0e3d22c37d3b245015a591891ea147d3b133b60ffc7c"
diff --git a/meta/recipes-extended/timezone/tzcode-native.bb b/meta/recipes-extended/timezone/tzcode-native.bb
new file mode 100644
index 0000000000..e3582ba674
--- /dev/null
+++ b/meta/recipes-extended/timezone/tzcode-native.bb
@@ -0,0 +1,17 @@
+require timezone.inc
+
+#
+SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
+
+S = "${WORKDIR}"
+
+inherit native
+
+EXTRA_OEMAKE += "cc='${CC}'"
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 755 zic ${D}${bindir}/
+ install -m 755 zdump ${D}${bindir}/
+ install -m 755 tzselect ${D}${bindir}/
+}
diff --git a/meta/recipes-extended/timezone/tzdata.bb b/meta/recipes-extended/timezone/tzdata.bb
new file mode 100644
index 0000000000..1e2d9bd1b9
--- /dev/null
+++ b/meta/recipes-extended/timezone/tzdata.bb
@@ -0,0 +1,210 @@
+require timezone.inc
+
+DEPENDS = "tzcode-native"
+
+inherit allarch
+
+RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
+ timezone-arctic timezone-asia timezone-atlantic \
+ timezone-australia timezone-europe timezone-indian \
+ timezone-iso3166.tab timezone-pacific timezone-zone.tab"
+
+S = "${WORKDIR}"
+
+DEFAULT_TIMEZONE ?= "Universal"
+INSTALL_TIMEZONE_FILE ?= "1"
+
+TZONES= "africa antarctica asia australasia europe northamerica southamerica \
+ factory etcetera backward systemv \
+ "
+# pacificnew
+
+do_compile () {
+ for zone in ${TZONES}; do \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ done
+}
+
+do_install () {
+ install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
+ cp -pPR ${S}/$exec_prefix ${D}/
+ # libc is removing zoneinfo files from package
+ cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
+ cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo
+ cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
+
+ # Install default timezone
+ if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
+ install -d ${D}${sysconfdir}
+ if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
+ echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+ fi
+ ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
+ else
+ bberror "DEFAULT_TIMEZONE is set to an invalid value."
+ exit 1
+ fi
+
+ chown -R root:root ${D}
+}
+
+pkg_postinst_${PN} () {
+ etc_lt="$D${sysconfdir}/localtime"
+ src="$D${sysconfdir}/timezone"
+
+ if [ -e ${src} ] ; then
+ tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
+ fi
+
+ if [ -z "${tz}" ] ; then
+ exit 0
+ fi
+
+ if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
+ echo "You have an invalid TIMEZONE setting in ${src}"
+ echo "Your ${etc_lt} has been reset to Universal; enjoy!"
+ tz="Universal"
+ echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
+ if [ -L ${etc_lt} ] ; then
+ rm -f "${etc_lt}"
+ fi
+ ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
+ fi
+}
+
+# Packages primarily organized by directory with a major city
+# in most time zones in the base package
+
+TZ_PACKAGES = " \
+ tzdata-core tzdata-misc tzdata-posix tzdata-right tzdata-africa \
+ tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
+ tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
+PACKAGES = "${TZ_PACKAGES} ${PN}"
+
+FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
+RPROVIDES_tzdata-africa = "tzdata-africa"
+
+FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
+ ${datadir}/zoneinfo/US/* \
+ ${datadir}/zoneinfo/Brazil/* \
+ ${datadir}/zoneinfo/Canada/* \
+ ${datadir}/zoneinfo/Mexico/* \
+ ${datadir}/zoneinfo/Chile/*"
+RPROVIDES_tzdata-americas = "tzdata-americas"
+
+FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
+RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
+
+FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
+RPROVIDES_tzdata-arctic = "tzdata-arctic"
+
+FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
+ ${datadir}/zoneinfo/Indian/* \
+ ${datadir}/zoneinfo/Mideast/*"
+RPROVIDES_tzdata-asia = "tzdata-asia"
+
+FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
+RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
+
+FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
+RPROVIDES_tzdata-australia = "tzdata-australia"
+
+FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
+RPROVIDES_tzdata-europe = "tzdata-europe"
+
+FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
+RPROVIDES_tzdata-pacific = "tzdata-pacific"
+
+FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
+RPROVIDES_tzdata-posix = "tzdata-posix"
+
+FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
+RPROVIDES_tzdata-right = "tzdata-right"
+
+FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
+ ${datadir}/zoneinfo/Egypt \
+ ${datadir}/zoneinfo/Eire \
+ ${datadir}/zoneinfo/Factory \
+ ${datadir}/zoneinfo/GB-Eire \
+ ${datadir}/zoneinfo/Hongkong \
+ ${datadir}/zoneinfo/Iceland \
+ ${datadir}/zoneinfo/Iran \
+ ${datadir}/zoneinfo/Israel \
+ ${datadir}/zoneinfo/Jamaica \
+ ${datadir}/zoneinfo/Japan \
+ ${datadir}/zoneinfo/Kwajalein \
+ ${datadir}/zoneinfo/Libya \
+ ${datadir}/zoneinfo/Navajo \
+ ${datadir}/zoneinfo/Poland \
+ ${datadir}/zoneinfo/Portugal \
+ ${datadir}/zoneinfo/Singapore \
+ ${datadir}/zoneinfo/Turkey"
+RPROVIDES_tzdata-misc = "tzdata-misc"
+
+FILES_tzdata-core += " \
+ ${sysconfdir}/localtime \
+ ${sysconfdir}/timezone \
+ ${datadir}/zoneinfo/Pacific/Honolulu \
+ ${datadir}/zoneinfo/America/Anchorage \
+ ${datadir}/zoneinfo/America/Los_Angeles \
+ ${datadir}/zoneinfo/America/Denver \
+ ${datadir}/zoneinfo/America/Chicago \
+ ${datadir}/zoneinfo/America/New_York \
+ ${datadir}/zoneinfo/America/Caracas \
+ ${datadir}/zoneinfo/America/Sao_Paulo \
+ ${datadir}/zoneinfo/Europe/London \
+ ${datadir}/zoneinfo/Europe/Paris \
+ ${datadir}/zoneinfo/Africa/Cairo \
+ ${datadir}/zoneinfo/Europe/Moscow \
+ ${datadir}/zoneinfo/Asia/Dubai \
+ ${datadir}/zoneinfo/Asia/Karachi \
+ ${datadir}/zoneinfo/Asia/Dhaka \
+ ${datadir}/zoneinfo/Asia/Bangkok \
+ ${datadir}/zoneinfo/Asia/Hong_Kong \
+ ${datadir}/zoneinfo/Asia/Tokyo \
+ ${datadir}/zoneinfo/Australia/Darwin \
+ ${datadir}/zoneinfo/Australia/Adelaide \
+ ${datadir}/zoneinfo/Australia/Brisbane \
+ ${datadir}/zoneinfo/Australia/Sydney \
+ ${datadir}/zoneinfo/Pacific/Noumea \
+ ${datadir}/zoneinfo/CET \
+ ${datadir}/zoneinfo/CST6CDT \
+ ${datadir}/zoneinfo/EET \
+ ${datadir}/zoneinfo/EST \
+ ${datadir}/zoneinfo/EST5EDT \
+ ${datadir}/zoneinfo/GB \
+ ${datadir}/zoneinfo/GMT \
+ ${datadir}/zoneinfo/GMT+0 \
+ ${datadir}/zoneinfo/GMT-0 \
+ ${datadir}/zoneinfo/GMT0 \
+ ${datadir}/zoneinfo/Greenwich \
+ ${datadir}/zoneinfo/HST \
+ ${datadir}/zoneinfo/MET \
+ ${datadir}/zoneinfo/MST \
+ ${datadir}/zoneinfo/MST7MDT \
+ ${datadir}/zoneinfo/NZ \
+ ${datadir}/zoneinfo/NZ-CHAT \
+ ${datadir}/zoneinfo/PRC \
+ ${datadir}/zoneinfo/PST8PDT \
+ ${datadir}/zoneinfo/ROC \
+ ${datadir}/zoneinfo/ROK \
+ ${datadir}/zoneinfo/UCT \
+ ${datadir}/zoneinfo/UTC \
+ ${datadir}/zoneinfo/Universal \
+ ${datadir}/zoneinfo/W-SU \
+ ${datadir}/zoneinfo/WET \
+ ${datadir}/zoneinfo/Zulu \
+ ${datadir}/zoneinfo/zone.tab \
+ ${datadir}/zoneinfo/zone1970.tab \
+ ${datadir}/zoneinfo/iso3166.tab \
+ ${datadir}/zoneinfo/Etc/*"
+
+CONFFILES_tzdata-core = "${sysconfdir}/localtime ${sysconfdir}/timezone"
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} = "${TZ_PACKAGES}"
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2016f.bb b/meta/recipes-extended/tzcode/tzcode-native_2016f.bb
deleted file mode 100644
index bdf47d229b..0000000000
--- a/meta/recipes-extended/tzcode/tzcode-native_2016f.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-# note that we allow for us to use data later than our code version
-#
-SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
-LICENSE = "PD & BSD & BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
-
-SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
- http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
-UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
-
-SRC_URI[tzcode.md5sum] = "b93618bb84e38dee102e0e41ec9d13e2"
-SRC_URI[tzcode.sha256sum] = "72325f384490a310eeb2ea0fab7e6f011a5be19adab2ff9d83bf9d1993b066ed"
-
-SRC_URI[tzdata.md5sum] = "b20b3c1618db1984aac685e763de001d"
-SRC_URI[tzdata.sha256sum] = "ed8c951008d12f1db55a11e96fc055718c6571233327d9de16a7f8475e2502b0"
-
-S = "${WORKDIR}"
-
-inherit native
-
-do_install () {
- install -d ${D}${bindir}/
- install -m 755 zic ${D}${bindir}/
- install -m 755 zdump ${D}${bindir}/
- install -m 755 tzselect ${D}${bindir}/
-}
diff --git a/meta/recipes-extended/tzdata/tzdata_2016f.bb b/meta/recipes-extended/tzdata/tzdata_2016f.bb
deleted file mode 100644
index a66603fff5..0000000000
--- a/meta/recipes-extended/tzdata/tzdata_2016f.bb
+++ /dev/null
@@ -1,213 +0,0 @@
-SUMMARY = "Timezone data"
-HOMEPAGE = "http://www.iana.org/time-zones"
-SECTION = "base"
-LICENSE = "PD & BSD & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
-
-DEPENDS = "tzcode-native"
-
-SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
-UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
-
-SRC_URI[tzdata.md5sum] = "b20b3c1618db1984aac685e763de001d"
-SRC_URI[tzdata.sha256sum] = "ed8c951008d12f1db55a11e96fc055718c6571233327d9de16a7f8475e2502b0"
-
-inherit allarch
-
-RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
- timezone-arctic timezone-asia timezone-atlantic \
- timezone-australia timezone-europe timezone-indian \
- timezone-iso3166.tab timezone-pacific timezone-zone.tab"
-
-S = "${WORKDIR}"
-
-DEFAULT_TIMEZONE ?= "Universal"
-INSTALL_TIMEZONE_FILE ?= "1"
-
-TZONES= "africa antarctica asia australasia europe northamerica southamerica \
- factory etcetera backward systemv \
- "
-# pacificnew
-
-do_compile () {
- for zone in ${TZONES}; do \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- done
-}
-
-do_install () {
- install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
- cp -pPR ${S}/$exec_prefix ${D}/
- # libc is removing zoneinfo files from package
- cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
- cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
-
- # Install default timezone
- if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
- install -d ${D}${sysconfdir}
- if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
- echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
- fi
- ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
- else
- bberror "DEFAULT_TIMEZONE is set to an invalid value."
- exit 1
- fi
-
- chown -R root:root ${D}
-}
-
-pkg_postinst_${PN} () {
- etc_lt="$D${sysconfdir}/localtime"
- src="$D${sysconfdir}/timezone"
-
- if [ -e ${src} ] ; then
- tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
- fi
-
- if [ -z "${tz}" ] ; then
- exit 0
- fi
-
- if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
- echo "You have an invalid TIMEZONE setting in ${src}"
- echo "Your ${etc_lt} has been reset to Universal; enjoy!"
- tz="Universal"
- echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
- if [ -L ${etc_lt} ] ; then
- rm -f "${etc_lt}"
- fi
- ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
- fi
-}
-
-# Packages primarily organized by directory with a major city
-# in most time zones in the base package
-
-PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
- tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
- tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
-
-FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
-RPROVIDES_tzdata-africa = "tzdata-africa"
-
-FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
- ${datadir}/zoneinfo/US/* \
- ${datadir}/zoneinfo/Brazil/* \
- ${datadir}/zoneinfo/Canada/* \
- ${datadir}/zoneinfo/Mexico/* \
- ${datadir}/zoneinfo/Chile/*"
-RPROVIDES_tzdata-americas = "tzdata-americas"
-
-FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
-RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
-
-FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
-RPROVIDES_tzdata-arctic = "tzdata-arctic"
-
-FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
- ${datadir}/zoneinfo/Indian/* \
- ${datadir}/zoneinfo/Mideast/*"
-RPROVIDES_tzdata-asia = "tzdata-asia"
-
-FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
-RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
-
-FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
-RPROVIDES_tzdata-australia = "tzdata-australia"
-
-FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
-RPROVIDES_tzdata-europe = "tzdata-europe"
-
-FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
-RPROVIDES_tzdata-pacific = "tzdata-pacific"
-
-FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
-RPROVIDES_tzdata-posix = "tzdata-posix"
-
-FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
-RPROVIDES_tzdata-right = "tzdata-right"
-
-
-FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
- ${datadir}/zoneinfo/Egypt \
- ${datadir}/zoneinfo/Eire \
- ${datadir}/zoneinfo/Factory \
- ${datadir}/zoneinfo/GB-Eire \
- ${datadir}/zoneinfo/Hongkong \
- ${datadir}/zoneinfo/Iceland \
- ${datadir}/zoneinfo/Iran \
- ${datadir}/zoneinfo/Israel \
- ${datadir}/zoneinfo/Jamaica \
- ${datadir}/zoneinfo/Japan \
- ${datadir}/zoneinfo/Kwajalein \
- ${datadir}/zoneinfo/Libya \
- ${datadir}/zoneinfo/Navajo \
- ${datadir}/zoneinfo/Poland \
- ${datadir}/zoneinfo/Portugal \
- ${datadir}/zoneinfo/Singapore \
- ${datadir}/zoneinfo/Turkey"
-RPROVIDES_tzdata-misc = "tzdata-misc"
-
-
-FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
- ${datadir}/zoneinfo/America/Anchorage \
- ${datadir}/zoneinfo/America/Los_Angeles \
- ${datadir}/zoneinfo/America/Denver \
- ${datadir}/zoneinfo/America/Chicago \
- ${datadir}/zoneinfo/America/New_York \
- ${datadir}/zoneinfo/America/Caracas \
- ${datadir}/zoneinfo/America/Sao_Paulo \
- ${datadir}/zoneinfo/Europe/London \
- ${datadir}/zoneinfo/Europe/Paris \
- ${datadir}/zoneinfo/Africa/Cairo \
- ${datadir}/zoneinfo/Europe/Moscow \
- ${datadir}/zoneinfo/Asia/Dubai \
- ${datadir}/zoneinfo/Asia/Karachi \
- ${datadir}/zoneinfo/Asia/Dhaka \
- ${datadir}/zoneinfo/Asia/Bankok \
- ${datadir}/zoneinfo/Asia/Hong_Kong \
- ${datadir}/zoneinfo/Asia/Tokyo \
- ${datadir}/zoneinfo/Australia/Darwin \
- ${datadir}/zoneinfo/Australia/Adelaide \
- ${datadir}/zoneinfo/Australia/Brisbane \
- ${datadir}/zoneinfo/Australia/Sydney \
- ${datadir}/zoneinfo/Pacific/Noumea \
- ${datadir}/zoneinfo/CET \
- ${datadir}/zoneinfo/CST6CDT \
- ${datadir}/zoneinfo/EET \
- ${datadir}/zoneinfo/EST \
- ${datadir}/zoneinfo/EST5EDT \
- ${datadir}/zoneinfo/GB \
- ${datadir}/zoneinfo/GMT \
- ${datadir}/zoneinfo/GMT+0 \
- ${datadir}/zoneinfo/GMT-0 \
- ${datadir}/zoneinfo/GMT0 \
- ${datadir}/zoneinfo/Greenwich \
- ${datadir}/zoneinfo/HST \
- ${datadir}/zoneinfo/MET \
- ${datadir}/zoneinfo/MST \
- ${datadir}/zoneinfo/MST7MDT \
- ${datadir}/zoneinfo/NZ \
- ${datadir}/zoneinfo/NZ-CHAT \
- ${datadir}/zoneinfo/PRC \
- ${datadir}/zoneinfo/PST8PDT \
- ${datadir}/zoneinfo/ROC \
- ${datadir}/zoneinfo/ROK \
- ${datadir}/zoneinfo/UCT \
- ${datadir}/zoneinfo/UTC \
- ${datadir}/zoneinfo/Universal \
- ${datadir}/zoneinfo/W-SU \
- ${datadir}/zoneinfo/WET \
- ${datadir}/zoneinfo/Zulu \
- ${datadir}/zoneinfo/zone.tab \
- ${datadir}/zoneinfo/iso3166.tab \
- ${datadir}/zoneinfo/Etc/*"
-
-CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE', True)) else "" }"
-CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/meta/recipes-extended/unzip/unzip/0001-unzip-fix-CVE-2018-1000035.patch b/meta/recipes-extended/unzip/unzip/0001-unzip-fix-CVE-2018-1000035.patch
new file mode 100644
index 0000000000..37289d1a53
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/0001-unzip-fix-CVE-2018-1000035.patch
@@ -0,0 +1,48 @@
+From 349f566e6e757458843fa164a0f0584280e1501e Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 15 Aug 2018 16:20:53 +0800
+Subject: [PATCH] unzip: fix CVE-2018-1000035
+
+Upstream-Status: Backport
+
+CVE: CVE-2018-1000035
+
+backport from unzip6.10c23
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ fileio.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/fileio.c b/fileio.c
+index 36bfea3..7605a29 100644
+--- a/fileio.c
++++ b/fileio.c
+@@ -1582,6 +1582,8 @@ int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn)
+ int r = IZ_PW_ENTERED;
+ char *m;
+ char *prompt;
++ char *ep;
++ char *zp;
+
+ #ifndef REENTRANT
+ /* tell picky compilers to shut up about "unused variable" warnings */
+@@ -1590,9 +1592,12 @@ int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn)
+
+ if (*rcnt == 0) { /* First call for current entry */
+ *rcnt = 2;
+- if ((prompt = (char *)malloc(2*FILNAMSIZ + 15)) != (char *)NULL) {
+- sprintf(prompt, LoadFarString(PasswPrompt),
+- FnFilter1(zfn), FnFilter2(efn));
++ zp = FnFilter1( zfn);
++ ep = FnFilter2( efn);
++ prompt = (char *)malloc( /* Slightly too long (2* "%s"). */
++ sizeof( PasswPrompt)+ strlen( zp)+ strlen( ep));
++ if (prompt != (char *)NULL) {
++ sprintf(prompt, LoadFarString(PasswPrompt), zp, ep);
+ m = prompt;
+ } else
+ m = (char *)LoadFarString(PasswPrompt2);
+--
+2.7.4
+
diff --git a/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
index c989df1896..ca4aaadffe 100644
--- a/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
+++ b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
@@ -9,9 +9,11 @@ CVE: CVE-2014-8140
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---- a/extract.c
-+++ b/extract.c
-@@ -2232,10 +2232,17 @@
+Index: unzip60/extract.c
+===================================================================
+--- unzip60.orig/extract.c
++++ unzip60/extract.c
+@@ -2233,10 +2233,17 @@ static int test_compr_eb(__G__ eb, eb_si
if (compr_offset < 4) /* field is not compressed: */
return PK_OK; /* do nothing and signal OK */
@@ -30,5 +32,5 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
+ ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN))))
+ return IZ_EF_TRUNC; /* no/bad compressed data! */
- if (
- #ifdef INT_16BIT
+ method = makeword(eb + (EB_HEADSIZE + compr_offset));
+ if ((method == STORED) &&
diff --git a/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch b/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch
new file mode 100644
index 0000000000..3c02d596cc
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch
@@ -0,0 +1,33 @@
+From: "Steven M. Schweda" <sms@antinode.info>
+Subject: Fix CVE-2014-9913, buffer overflow in unzip
+Bug: https://sourceforge.net/p/infozip/bugs/27/
+Bug-Debian: https://bugs.debian.org/847485
+Bug-Ubuntu: https://launchpad.net/bugs/387350
+X-Debian-version: 6.0-21
+
+Upstream-Status: Backport
+CVE: CVE-2014-9913
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+
+--- a/list.c
++++ b/list.c
+@@ -339,7 +339,18 @@
+ G.crec.compression_method == ENHDEFLATED) {
+ methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3];
+ } else if (methnum >= NUM_METHODS) {
+- sprintf(&methbuf[4], "%03u", G.crec.compression_method);
++ /* 2013-02-26 SMS.
++ * http://sourceforge.net/p/infozip/bugs/27/ CVE-2014-9913.
++ * Unexpectedly large compression methods overflow
++ * &methbuf[]. Use the old, three-digit decimal format
++ * for values which fit. Otherwise, sacrifice the
++ * colon, and use four-digit hexadecimal.
++ */
++ if (G.crec.compression_method <= 999) {
++ sprintf( &methbuf[ 4], "%03u", G.crec.compression_method);
++ } else {
++ sprintf( &methbuf[ 3], "%04X", G.crec.compression_method);
++ }
+ }
+
+ #if 0 /* GRR/Euro: add this? */
diff --git a/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch b/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch
new file mode 100644
index 0000000000..ffadbc2efa
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch
@@ -0,0 +1,32 @@
+From: "Steven M. Schweda" <sms@antinode.info>
+Subject: Fix CVE-2016-9844, buffer overflow in zipinfo
+Bug-Debian: https://bugs.debian.org/847486
+Bug-Ubuntu: https://launchpad.net/bugs/1643750
+X-Debian-version: 6.0-21
+
+Upstream-Status: Backport
+CVE: CVE-2016-9844
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+
+--- a/zipinfo.c
++++ b/zipinfo.c
+@@ -1921,7 +1921,18 @@
+ ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3);
+ methbuf[3] = dtype[dnum];
+ } else if (methnum >= NUM_METHODS) { /* unknown */
+- sprintf(&methbuf[1], "%03u", G.crec.compression_method);
++ /* 2016-12-05 SMS.
++ * https://launchpad.net/bugs/1643750
++ * Unexpectedly large compression methods overflow
++ * &methbuf[]. Use the old, three-digit decimal format
++ * for values which fit. Otherwise, sacrifice the "u",
++ * and use four-digit hexadecimal.
++ */
++ if (G.crec.compression_method <= 999) {
++ sprintf( &methbuf[ 1], "%03u", G.crec.compression_method);
++ } else {
++ sprintf( &methbuf[ 0], "%04X", G.crec.compression_method);
++ }
+ }
+
+ for (k = 0; k < 15; ++k)
diff --git a/meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch b/meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch
new file mode 100644
index 0000000000..cc9e2c1ea1
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch
@@ -0,0 +1,39 @@
+Upstream-Status: Backport [https://sourceforge.net/p/infozip/bugs/53/]
+CVE: CVE-2018-18384
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+--- unzip60/list.c
++++ unzip60/list.c
+@@ -97,7 +97,7 @@ int list_files(__G) /* return PK-type
+ {
+ int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL;
+ #ifndef WINDLL
+- char sgn, cfactorstr[10];
++ char sgn, cfactorstr[1+10+1+1]; /* <sgn><int>%NUL */
+ int longhdr=(uO.vflag>1);
+ #endif
+ int date_format;
+@@ -389,9 +389,9 @@ int list_files(__G) /* return PK-type
+ }
+ #else /* !WINDLL */
+ if (cfactor == 100)
+- sprintf(cfactorstr, LoadFarString(CompFactor100));
++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100));
+ else
+- sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor);
++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor);
+ if (longhdr)
+ Info(slide, 0, ((char *)slide, LoadFarString(LongHdrStats),
+ FmZofft(G.crec.ucsize, "8", "u"), methbuf,
+@@ -471,9 +471,9 @@ int list_files(__G) /* return PK-type
+
+ #else /* !WINDLL */
+ if (cfactor == 100)
+- sprintf(cfactorstr, LoadFarString(CompFactor100));
++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100));
+ else
+- sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor);
++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor);
+ if (longhdr) {
+ Info(slide, 0, ((char *)slide, LoadFarString(LongFileTrailer),
+ FmZofft(tot_ucsize, "8", "u"), FmZofft(tot_csize, "8", "u"),
diff --git a/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch
new file mode 100644
index 0000000000..d485a1bd6e
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch
@@ -0,0 +1,33 @@
+From 080d52c3c9416c731f637f9c6e003961ef43f079 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Mon, 27 May 2019 08:20:32 -0700
+Subject: [PATCH 1/3] Fix bug in undefer_input() that misplaced the input
+ state.
+
+CVE: CVE-2019-13232
+Upstream-Status: Backport
+[https://github.com/madler/unzip/commit/41beb477c5744bc396fa1162ee0c14218ec12213]
+
+Signed-off-by: Dan Tran <dantran@microsoft.com>
+---
+ fileio.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/fileio.c b/fileio.c
+index 7605a29..14460f3 100644
+--- a/fileio.c
++++ b/fileio.c
+@@ -532,8 +532,10 @@ void undefer_input(__G)
+ * This condition was checked when G.incnt_leftover was set > 0 in
+ * defer_leftover_input(), and it is NOT allowed to touch G.csize
+ * before calling undefer_input() when (G.incnt_leftover > 0)
+- * (single exception: see read_byte()'s "G.csize <= 0" handling) !!
++ * (single exception: see readbyte()'s "G.csize <= 0" handling) !!
+ */
++ if (G.csize < 0L)
++ G.csize = 0L;
+ G.incnt = G.incnt_leftover + (int)G.csize;
+ G.inptr = G.inptr_leftover - (int)G.csize;
+ G.incnt_leftover = 0;
+--
+2.22.0.vfs.1.1.57.gbaf16c8
diff --git a/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p2.patch b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p2.patch
new file mode 100644
index 0000000000..41037a8e24
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p2.patch
@@ -0,0 +1,356 @@
+From 1aae47fa8935654a84403768f32c03ecbb1be470 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Tue, 11 Jun 2019 22:01:18 -0700
+Subject: [PATCH 2/3] Detect and reject a zip bomb using overlapped entries.
+
+This detects an invalid zip file that has at least one entry that
+overlaps with another entry or with the central directory to the
+end of the file. A Fifield zip bomb uses overlapped local entries
+to vastly increase the potential inflation ratio. Such an invalid
+zip file is rejected.
+
+See https://www.bamsoftware.com/hacks/zipbomb/ for David Fifield's
+analysis, construction, and examples of such zip bombs.
+
+The detection maintains a list of covered spans of the zip files
+so far, where the central directory to the end of the file and any
+bytes preceding the first entry at zip file offset zero are
+considered covered initially. Then as each entry is decompressed
+or tested, it is considered covered. When a new entry is about to
+be processed, its initial offset is checked to see if it is
+contained by a covered span. If so, the zip file is rejected as
+invalid.
+
+This commit depends on a preceding commit: "Fix bug in
+undefer_input() that misplaced the input state."
+
+CVE: CVE-2019-13232
+Upstream-Status: Backport
+[https://github.com/madler/unzip/commit/47b3ceae397d21bf822bc2ac73052a4b1daf8e1c]
+
+Signed-off-by: Dan Tran <dantran@microsoft.com>
+---
+ extract.c | 190 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ globals.c | 1 +
+ globals.h | 3 +
+ process.c | 10 +++
+ unzip.h | 1 +
+ 5 files changed, 204 insertions(+), 1 deletion(-)
+
+diff --git a/extract.c b/extract.c
+index 24db2a8..2bb72ba 100644
+--- a/extract.c
++++ b/extract.c
+@@ -321,6 +321,125 @@ static ZCONST char Far UnsupportedExtraField[] =
+ "\nerror: unsupported extra-field compression type (%u)--skipping\n";
+ static ZCONST char Far BadExtraFieldCRC[] =
+ "error [%s]: bad extra-field CRC %08lx (should be %08lx)\n";
++static ZCONST char Far NotEnoughMemCover[] =
++ "error: not enough memory for bomb detection\n";
++static ZCONST char Far OverlappedComponents[] =
++ "error: invalid zip file with overlapped components (possible zip bomb)\n";
++
++
++
++
++
++/* A growable list of spans. */
++typedef zoff_t bound_t;
++typedef struct {
++ bound_t beg; /* start of the span */
++ bound_t end; /* one past the end of the span */
++} span_t;
++typedef struct {
++ span_t *span; /* allocated, distinct, and sorted list of spans */
++ size_t num; /* number of spans in the list */
++ size_t max; /* allocated number of spans (num <= max) */
++} cover_t;
++
++/*
++ * Return the index of the first span in cover whose beg is greater than val.
++ * If there is no such span, then cover->num is returned.
++ */
++static size_t cover_find(cover, val)
++ cover_t *cover;
++ bound_t val;
++{
++ size_t lo = 0, hi = cover->num;
++ while (lo < hi) {
++ size_t mid = (lo + hi) >> 1;
++ if (val < cover->span[mid].beg)
++ hi = mid;
++ else
++ lo = mid + 1;
++ }
++ return hi;
++}
++
++/* Return true if val lies within any one of the spans in cover. */
++static int cover_within(cover, val)
++ cover_t *cover;
++ bound_t val;
++{
++ size_t pos = cover_find(cover, val);
++ return pos > 0 && val < cover->span[pos - 1].end;
++}
++
++/*
++ * Add a new span to the list, but only if the new span does not overlap any
++ * spans already in the list. The new span covers the values beg..end-1. beg
++ * must be less than end.
++ *
++ * Keep the list sorted and merge adjacent spans. Grow the allocated space for
++ * the list as needed. On success, 0 is returned. If the new span overlaps any
++ * existing spans, then 1 is returned and the new span is not added to the
++ * list. If the new span is invalid because beg is greater than or equal to
++ * end, then -1 is returned. If the list needs to be grown but the memory
++ * allocation fails, then -2 is returned.
++ */
++static int cover_add(cover, beg, end)
++ cover_t *cover;
++ bound_t beg;
++ bound_t end;
++{
++ size_t pos;
++ int prec, foll;
++
++ if (beg >= end)
++ /* The new span is invalid. */
++ return -1;
++
++ /* Find where the new span should go, and make sure that it does not
++ overlap with any existing spans. */
++ pos = cover_find(cover, beg);
++ if ((pos > 0 && beg < cover->span[pos - 1].end) ||
++ (pos < cover->num && end > cover->span[pos].beg))
++ return 1;
++
++ /* Check for adjacencies. */
++ prec = pos > 0 && beg == cover->span[pos - 1].end;
++ foll = pos < cover->num && end == cover->span[pos].beg;
++ if (prec && foll) {
++ /* The new span connects the preceding and following spans. Merge the
++ following span into the preceding span, and delete the following
++ span. */
++ cover->span[pos - 1].end = cover->span[pos].end;
++ cover->num--;
++ memmove(cover->span + pos, cover->span + pos + 1,
++ (cover->num - pos) * sizeof(span_t));
++ }
++ else if (prec)
++ /* The new span is adjacent only to the preceding span. Extend the end
++ of the preceding span. */
++ cover->span[pos - 1].end = end;
++ else if (foll)
++ /* The new span is adjacent only to the following span. Extend the
++ beginning of the following span. */
++ cover->span[pos].beg = beg;
++ else {
++ /* The new span has gaps between both the preceding and the following
++ spans. Assure that there is room and insert the span. */
++ if (cover->num == cover->max) {
++ size_t max = cover->max == 0 ? 16 : cover->max << 1;
++ span_t *span = realloc(cover->span, max * sizeof(span_t));
++ if (span == NULL)
++ return -2;
++ cover->span = span;
++ cover->max = max;
++ }
++ memmove(cover->span + pos + 1, cover->span + pos,
++ (cover->num - pos) * sizeof(span_t));
++ cover->num++;
++ cover->span[pos].beg = beg;
++ cover->span[pos].end = end;
++ }
++ return 0;
++}
+
+
+
+@@ -376,6 +495,29 @@ int extract_or_test_files(__G) /* return PK-type error code */
+ }
+ #endif /* !SFX || SFX_EXDIR */
+
++ /* One more: initialize cover structure for bomb detection. Start with a
++ span that covers the central directory though the end of the file. */
++ if (G.cover == NULL) {
++ G.cover = malloc(sizeof(cover_t));
++ if (G.cover == NULL) {
++ Info(slide, 0x401, ((char *)slide,
++ LoadFarString(NotEnoughMemCover)));
++ return PK_MEM;
++ }
++ ((cover_t *)G.cover)->span = NULL;
++ ((cover_t *)G.cover)->max = 0;
++ }
++ ((cover_t *)G.cover)->num = 0;
++ if ((G.extra_bytes != 0 &&
++ cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) ||
++ cover_add((cover_t *)G.cover,
++ G.extra_bytes + G.ecrec.offset_start_central_directory,
++ G.ziplen) != 0) {
++ Info(slide, 0x401, ((char *)slide,
++ LoadFarString(NotEnoughMemCover)));
++ return PK_MEM;
++ }
++
+ /*---------------------------------------------------------------------------
+ The basic idea of this function is as follows. Since the central di-
+ rectory lies at the end of the zipfile and the member files lie at the
+@@ -593,7 +735,8 @@ int extract_or_test_files(__G) /* return PK-type error code */
+ if (error > error_in_archive)
+ error_in_archive = error;
+ /* ...and keep going (unless disk full or user break) */
+- if (G.disk_full > 1 || error_in_archive == IZ_CTRLC) {
++ if (G.disk_full > 1 || error_in_archive == IZ_CTRLC ||
++ error == PK_BOMB) {
+ /* clear reached_end to signal premature stop ... */
+ reached_end = FALSE;
+ /* ... and cancel scanning the central directory */
+@@ -1062,6 +1205,11 @@ static int extract_or_test_entrylist(__G__ numchunk,
+
+ /* seek_zipf(__G__ pInfo->offset); */
+ request = G.pInfo->offset + G.extra_bytes;
++ if (cover_within((cover_t *)G.cover, request)) {
++ Info(slide, 0x401, ((char *)slide,
++ LoadFarString(OverlappedComponents)));
++ return PK_BOMB;
++ }
+ inbuf_offset = request % INBUFSIZ;
+ bufstart = request - inbuf_offset;
+
+@@ -1593,6 +1741,18 @@ reprompt:
+ return IZ_CTRLC; /* cancel operation by user request */
+ }
+ #endif
++ error = cover_add((cover_t *)G.cover, request,
++ G.cur_zipfile_bufstart + (G.inptr - G.inbuf));
++ if (error < 0) {
++ Info(slide, 0x401, ((char *)slide,
++ LoadFarString(NotEnoughMemCover)));
++ return PK_MEM;
++ }
++ if (error != 0) {
++ Info(slide, 0x401, ((char *)slide,
++ LoadFarString(OverlappedComponents)));
++ return PK_BOMB;
++ }
+ #ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */
+ UserStop();
+ #endif
+@@ -1994,6 +2154,34 @@ static int extract_or_test_member(__G) /* return PK-type error code */
+ }
+
+ undefer_input(__G);
++
++ if ((G.lrec.general_purpose_bit_flag & 8) != 0) {
++ /* skip over data descriptor (harder than it sounds, due to signature
++ * ambiguity)
++ */
++# define SIG 0x08074b50
++# define LOW 0xffffffff
++ uch buf[12];
++ unsigned shy = 12 - readbuf((char *)buf, 12);
++ ulg crc = shy ? 0 : makelong(buf);
++ ulg clen = shy ? 0 : makelong(buf + 4);
++ ulg ulen = shy ? 0 : makelong(buf + 8); /* or high clen if ZIP64 */
++ if (crc == SIG && /* if not SIG, no signature */
++ (G.lrec.crc32 != SIG || /* if not SIG, have signature */
++ (clen == SIG && /* if not SIG, no signature */
++ ((G.lrec.csize & LOW) != SIG || /* if not SIG, have signature */
++ (ulen == SIG && /* if not SIG, no signature */
++ (G.zip64 ? G.lrec.csize >> 32 : G.lrec.ucsize) != SIG
++ /* if not SIG, have signature */
++ )))))
++ /* skip four more bytes to account for signature */
++ shy += 4 - readbuf((char *)buf, 4);
++ if (G.zip64)
++ shy += 8 - readbuf((char *)buf, 8); /* skip eight more for ZIP64 */
++ if (shy)
++ error = PK_ERR;
++ }
++
+ return error;
+
+ } /* end function extract_or_test_member() */
+diff --git a/globals.c b/globals.c
+index fa8cca5..1e0f608 100644
+--- a/globals.c
++++ b/globals.c
+@@ -181,6 +181,7 @@ Uz_Globs *globalsCtor()
+ # if (!defined(NO_TIMESTAMPS))
+ uO.D_flag=1; /* default to '-D', no restoration of dir timestamps */
+ # endif
++ G.cover = NULL; /* not allocated yet */
+ #endif
+
+ uO.lflag=(-1);
+diff --git a/globals.h b/globals.h
+index 11b7215..2bdcdeb 100644
+--- a/globals.h
++++ b/globals.h
+@@ -260,12 +260,15 @@ typedef struct Globals {
+ ecdir_rec ecrec; /* used in unzip.c, extract.c */
+ z_stat statbuf; /* used by main, mapname, check_for_newer */
+
++ int zip64; /* true if Zip64 info in extra field */
++
+ int mem_mode;
+ uch *outbufptr; /* extract.c static */
+ ulg outsize; /* extract.c static */
+ int reported_backslash; /* extract.c static */
+ int disk_full;
+ int newfile;
++ void **cover; /* used in extract.c for bomb detection */
+
+ int didCRlast; /* fileio static */
+ ulg numlines; /* fileio static: number of lines printed */
+diff --git a/process.c b/process.c
+index a3c1a4d..208619c 100644
+--- a/process.c
++++ b/process.c
+@@ -637,6 +637,13 @@ void free_G_buffers(__G) /* releases all memory allocated in global vars */
+ }
+ #endif
+
++ /* Free the cover span list and the cover structure. */
++ if (G.cover != NULL) {
++ free(*(G.cover));
++ free(G.cover);
++ G.cover = NULL;
++ }
++
+ } /* end function free_G_buffers() */
+
+
+@@ -1905,6 +1912,7 @@ int getZip64Data(__G__ ef_buf, ef_len)
+
+ #define Z64FLGS 0xffff
+ #define Z64FLGL 0xffffffff
++ G.zip64 = FALSE;
+
+ if (ef_len == 0 || ef_buf == NULL)
+ return PK_COOL;
+@@ -1964,6 +1972,8 @@ int getZip64Data(__G__ ef_buf, ef_len)
+ G.crec.disk_number_start = (zuvl_t)makelong(offset + ef_buf);
+ offset += 4;
+ }
++
++ G.zip64 = TRUE;
+ #if 0
+ break; /* Expect only one EF_PKSZ64 block. */
+ #endif /* 0 */
+diff --git a/unzip.h b/unzip.h
+index 5b2a326..ed24a5b 100644
+--- a/unzip.h
++++ b/unzip.h
+@@ -645,6 +645,7 @@ typedef struct _Uzp_cdir_Rec {
+ #define PK_NOZIP 9 /* zipfile not found */
+ #define PK_PARAM 10 /* bad or illegal parameters specified */
+ #define PK_FIND 11 /* no files found */
++#define PK_BOMB 12 /* likely zip bomb */
+ #define PK_DISK 50 /* disk full */
+ #define PK_EOF 51 /* unexpected EOF */
+
+--
+2.22.0.vfs.1.1.57.gbaf16c8
diff --git a/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p3.patch b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p3.patch
new file mode 100644
index 0000000000..fd26fdd833
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p3.patch
@@ -0,0 +1,121 @@
+From be88aa4811af47ca06d8b7dcda294f899eba70ea Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Thu, 25 Jul 2019 20:43:17 -0700
+Subject: [PATCH 3/3] Do not raise a zip bomb alert for a misplaced central
+ directory.
+
+There is a zip-like file in the Firefox distribution, omni.ja,
+which is a zip container with the central directory placed at the
+start of the file instead of after the local entries as required
+by the zip standard. This commit marks the actual location of the
+central directory, as well as the end of central directory records,
+as disallowed locations. This now permits such containers to not
+raise a zip bomb alert, where in fact there are no overlaps.
+
+CVE: CVE-2019-13232
+Upstream-Status: Backport
+[https://github.com/madler/unzip/commit/6d351831be705cc26d897db44f878a978f4138fc]
+
+Signed-off-by: Dan Tran <dantran@microsoft.com>
+---
+ extract.c | 25 +++++++++++++++++++------
+ process.c | 6 ++++++
+ unzpriv.h | 10 ++++++++++
+ 3 files changed, 35 insertions(+), 6 deletions(-)
+
+diff --git a/extract.c b/extract.c
+index 2bb72ba..a9dcca8 100644
+--- a/extract.c
++++ b/extract.c
+@@ -495,8 +495,11 @@ int extract_or_test_files(__G) /* return PK-type error code */
+ }
+ #endif /* !SFX || SFX_EXDIR */
+
+- /* One more: initialize cover structure for bomb detection. Start with a
+- span that covers the central directory though the end of the file. */
++ /* One more: initialize cover structure for bomb detection. Start with
++ spans that cover any extra bytes at the start, the central directory,
++ the end of central directory record (including the Zip64 end of central
++ directory locator, if present), and the Zip64 end of central directory
++ record, if present. */
+ if (G.cover == NULL) {
+ G.cover = malloc(sizeof(cover_t));
+ if (G.cover == NULL) {
+@@ -508,15 +511,25 @@ int extract_or_test_files(__G) /* return PK-type error code */
+ ((cover_t *)G.cover)->max = 0;
+ }
+ ((cover_t *)G.cover)->num = 0;
+- if ((G.extra_bytes != 0 &&
+- cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) ||
+- cover_add((cover_t *)G.cover,
++ if (cover_add((cover_t *)G.cover,
+ G.extra_bytes + G.ecrec.offset_start_central_directory,
+- G.ziplen) != 0) {
++ G.extra_bytes + G.ecrec.offset_start_central_directory +
++ G.ecrec.size_central_directory) != 0) {
+ Info(slide, 0x401, ((char *)slide,
+ LoadFarString(NotEnoughMemCover)));
+ return PK_MEM;
+ }
++ if ((G.extra_bytes != 0 &&
++ cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) ||
++ (G.ecrec.have_ecr64 &&
++ cover_add((cover_t *)G.cover, G.ecrec.ec64_start,
++ G.ecrec.ec64_end) != 0) ||
++ cover_add((cover_t *)G.cover, G.ecrec.ec_start,
++ G.ecrec.ec_end) != 0) {
++ Info(slide, 0x401, ((char *)slide,
++ LoadFarString(OverlappedComponents)));
++ return PK_BOMB;
++ }
+
+ /*---------------------------------------------------------------------------
+ The basic idea of this function is as follows. Since the central di-
+diff --git a/process.c b/process.c
+index 208619c..5f8f6c6 100644
+--- a/process.c
++++ b/process.c
+@@ -1408,6 +1408,10 @@ static int find_ecrec64(__G__ searchlen) /* return PK-class error */
+
+ /* Now, we are (almost) sure that we have a Zip64 archive. */
+ G.ecrec.have_ecr64 = 1;
++ G.ecrec.ec_start -= ECLOC64_SIZE+4;
++ G.ecrec.ec64_start = ecrec64_start_offset;
++ G.ecrec.ec64_end = ecrec64_start_offset +
++ 12 + makeint64(&byterec[ECREC64_LENGTH]);
+
+ /* Update the "end-of-central-dir offset" for later checks. */
+ G.real_ecrec_offset = ecrec64_start_offset;
+@@ -1542,6 +1546,8 @@ static int find_ecrec(__G__ searchlen) /* return PK-class error */
+ makelong(&byterec[OFFSET_START_CENTRAL_DIRECTORY]);
+ G.ecrec.zipfile_comment_length =
+ makeword(&byterec[ZIPFILE_COMMENT_LENGTH]);
++ G.ecrec.ec_start = G.real_ecrec_offset;
++ G.ecrec.ec_end = G.ecrec.ec_start + 22 + G.ecrec.zipfile_comment_length;
+
+ /* Now, we have to read the archive comment, BEFORE the file pointer
+ is moved away backwards to seek for a Zip64 ECLOC64 structure.
+diff --git a/unzpriv.h b/unzpriv.h
+index c8d3eab..5e177c7 100644
+--- a/unzpriv.h
++++ b/unzpriv.h
+@@ -2185,6 +2185,16 @@ typedef struct VMStimbuf {
+ int have_ecr64; /* valid Zip64 ecdir-record exists */
+ int is_zip64_archive; /* Zip64 ecdir-record is mandatory */
+ ush zipfile_comment_length;
++ zusz_t ec_start, ec_end; /* offsets of start and end of the
++ end of central directory record,
++ including if present the Zip64
++ end of central directory locator,
++ which immediately precedes the
++ end of central directory record */
++ zusz_t ec64_start, ec64_end; /* if have_ecr64 is true, then these
++ are the offsets of the start and
++ end of the Zip64 end of central
++ directory record */
+ } ecdir_rec;
+
+
+--
+2.22.0.vfs.1.1.57.gbaf16c8
+
diff --git a/meta/recipes-extended/unzip/unzip/symlink.patch b/meta/recipes-extended/unzip/unzip/symlink.patch
new file mode 100644
index 0000000000..a38f6f1612
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/symlink.patch
@@ -0,0 +1,26 @@
+Unzip doesn't handle large zip files well and crashes:
+
+"This only happens if you have more then 16k entries and when one of
+the 16k entry infos is reused it happend to be previously used for
+a symlink entry."
+
+This patch is taken from Fedora (https://bugzilla.redhat.com/show_bug.cgi?id=972427)
+
+Upstream-Status: Pending (upstream is dead)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- unzip60/process.c.sav 2013-06-09 12:08:57.070392264 +0200
++++ unzip60/process.c 2013-06-09 12:10:08.641696988 +0200
+@@ -1751,6 +1751,12 @@
+ = (G.crec.general_purpose_bit_flag & (1 << 11)) == (1 << 11);
+ #endif
+
++#ifdef SYMLINKS
++ /* Initialize the symlink flag, may be set by the platform-specific
++ mapattr function. */
++ G.pInfo->symlink = 0;
++#endif
++
+ return PK_COOL;
+
+ } /* end function process_cdir_file_hdr() */
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb
index 547379c0dc..c1ea0a9a2c 100644
--- a/meta/recipes-extended/unzip/unzip_6.0.bb
+++ b/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -16,8 +16,17 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/
file://11-cve-2014-8141-getzip64data.patch \
file://CVE-2015-7696.patch \
file://CVE-2015-7697.patch \
- file://fix-security-format.patch \
+ file://fix-security-format.patch \
+ file://18-cve-2014-9913-unzip-buffer-overflow.patch \
+ file://19-cve-2016-9844-zipinfo-buffer-overflow.patch \
+ file://symlink.patch \
+ file://0001-unzip-fix-CVE-2018-1000035.patch \
+ file://CVE-2018-18384.patch \
+ file://CVE-2019-13232_p1.patch \
+ file://CVE-2019-13232_p2.patch \
+ file://CVE-2019-13232_p3.patch \
"
+UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
@@ -55,4 +64,4 @@ ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "unzip"
ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch b/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch
new file mode 100644
index 0000000000..075a98e5e5
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch
@@ -0,0 +1,68 @@
+From c1fe14fa5bd168292cc4670034bc48b954e9dac7 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 13 Mar 2018 14:49:55 +0200
+Subject: [PATCH] watchdog: remove interdependencies of watchdog and
+ wd_keepalive services
+
+Since watchdog and watchdog-keepalive packages can't be installed
+together, remove the inter-dependencies of watchdog and wd_keepalive
+services
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ debian/watchdog.service | 9 +++------
+ debian/wd_keepalive.service | 10 +++++-----
+ 2 files changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/debian/watchdog.service b/debian/watchdog.service
+index 7a2fc36..f31d1fe 100644
+--- a/debian/watchdog.service
++++ b/debian/watchdog.service
+@@ -1,16 +1,13 @@
+ [Unit]
+ Description=watchdog daemon
+-Conflicts=wd_keepalive.service
+ After=multi-user.target
+-OnFailure=wd_keepalive.service
+
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/default/watchdog
+ ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
+-ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
+-ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'
++ExecStart=/bin/sh -c '[ x$run_watchdog != x1 ] || exec /usr/sbin/watchdog $watchdog_options'
++PIDFile=/run/watchdog.pid
+
+ [Install]
+-WantedBy=default.target
+-
++WantedBy=multi-user.target
+diff --git a/debian/wd_keepalive.service b/debian/wd_keepalive.service
+index 45b018e..7f8b1dc 100644
+--- a/debian/wd_keepalive.service
++++ b/debian/wd_keepalive.service
+@@ -1,13 +1,13 @@
+ [Unit]
+ Description=watchdog keepalive daemon
+-Before=watchdog.service shutdown.target
+-Conflicts=watchdog.service shutdown.target
++After=multi-user.target
+
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/default/watchdog
+ ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
+-ExecStartPre=-/bin/systemctl reset-failed watchdog.service
+ ExecStart=/usr/sbin/wd_keepalive $watchdog_options
+-ExecStartPost=/bin/sh -c 'ln -s /var/run/wd_keepalive.pid /run/sendsigs.omit.d/wd_keepalive.pid'
+-ExecStopPost=/bin/sh -c 'rm -f /run/sendsigs.omit.d/wd_keepalive.pid'
++PIDFile=/var/run/wd_keepalive.pid
++
++[Install]
++WantedBy=multi-user.target
+--
+2.4.0
+
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
deleted file mode 100644
index e68ad545c3..0000000000
--- a/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Signed-off-by: Diego Rondini <diego.ml@zoho.com>
-Upstream-Status: Inappropriate
-
---- watchdog-5.13.orig/watchdog.conf 2013-02-01 12:15:44.000000000 +0100
-+++ watchdog-5.13/watchdog.conf 2014-11-13 10:59:43.233943000 +0100
-@@ -20,7 +20,7 @@
- #test-binary =
- #test-timeout =
-
--#watchdog-device = /dev/watchdog
-+watchdog-device = /dev/watchdog
-
- # Defaults compiled into the binary
- #temperature-device =
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch b/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
deleted file mode 100644
index b2765f1908..0000000000
--- a/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Signed-off-by: Diego Rondini <diego.ml@zoho.com>
-Upstream-Status: Inappropriate
-
---- watchdog-5.13.orig/redhat/watchdog.init 2014-11-12 17:18:39.125943000 +0100
-+++ watchdog-5.13/redhat/watchdog.init 2014-11-12 18:27:36.189943000 +0100
-@@ -7,7 +7,7 @@
- # Henning P. Schmiedehausen <hps@tanstaafl.de>
-
- # Source function library.
--. /etc/rc.d/init.d/functions
-+. /etc/init.d/functions
-
- [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0
-
-@@ -23,22 +23,22 @@
-
- start() {
-
-- echo -n $"Starting $prog: "
-+ echo -n "Starting $prog: "
- if [ -n "$(pidofproc $prog)" ]; then
-- echo -n $"$prog: already running"
-- echo_failure
-+ echo -n "$prog: already running "
-+ failure
- echo
- return 1
- fi
- if [ "$VERBOSE" = "yes" ]; then
-- daemon /usr/sbin/${prog} -v
-+ /usr/sbin/${prog} -v
- else
-- daemon /usr/sbin/${prog}
-+ /usr/sbin/${prog}
- fi
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch $lockfile
-- [ $RETVAL -eq 0 ] && echo_success
-- [ $RETVAL -ne 0 ] && echo_failure
-+ [ $RETVAL -eq 0 ] && success
-+ [ $RETVAL -ne 0 ] && failure
- echo
- return $RETVAL
- }
-@@ -50,8 +50,10 @@
- # and reboot the box.
- killproc $prog -TERM
- RETVAL=$?
-- echo
- [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
-+ [ $RETVAL -eq 0 ] && success
-+ [ $RETVAL -ne 0 ] && failure
-+ echo
- return $RETVAL
- }
-
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog.init b/meta/recipes-extended/watchdog/watchdog/watchdog.init
new file mode 100644
index 0000000000..d37107cf0e
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/watchdog.init
@@ -0,0 +1,110 @@
+#!/bin/sh
+#/etc/init.d/watchdog: start watchdog daemon.
+
+### BEGIN INIT INFO
+# Provides: watchdog
+# Short-Description: Start software watchdog daemon
+# Required-Start: $all
+# Required-Stop: $all
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+test -x /usr/sbin/watchdog || exit 0
+
+# For configuration of the init script use the file
+# /etc/default/watchdog, do not edit this init script.
+
+# Set run_watchdog to 1 to start watchdog or 0 to disable it.
+run_watchdog=0
+
+# Specify additional watchdog options here (see manpage).
+watchdog_options=""
+
+# Specify module to load
+watchdog_module="none"
+
+[ -e /etc/default/watchdog ] && . /etc/default/watchdog
+
+NAME=watchdog
+DAEMON=/usr/sbin/watchdog
+
+STOP_RETRY_SCHEDULE='TERM/10/forever/KILL/1'
+
+. /etc/init.d/functions
+
+# Mock Debian stuff
+log_begin_msg() {
+ echo -n $*
+}
+
+log_end_msg() {
+ if [ "$1" = "0" ]; then
+ echo 'done'
+ else
+ echo 'error'
+ fi
+}
+
+log_daemon_msg() {
+ echo $*
+}
+
+log_progress_msg() {
+ echo $*
+}
+
+case "$1" in
+ start)
+ if [ $run_watchdog = 1 ]
+ then
+ # do we have to load a module?
+ [ "${watchdog_module:-none}" != "none" ] && /sbin/modprobe $watchdog_module
+
+ # Check /dev/watchdog here because if it does not exist after module loading,
+ # it makes no sense to start the daemon
+ test -e /dev/watchdog || { log_daemon_msg "daemon not start due to lack of /dev/watchdog"; exit 0; }
+
+ log_begin_msg "Starting watchdog daemon..."
+ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $watchdog_options
+ log_end_msg $?
+ fi
+ ;;
+
+ stop)
+ if [ $run_watchdog = 1 ]
+ then
+ log_begin_msg "Stopping watchdog daemon..."
+ start-stop-daemon --stop --quiet --retry $STOP_RETRY_SCHEDULE \
+ --pidfile /var/run/$NAME.pid
+
+ fi
+ ;;
+
+ restart)
+ $0 force-reload
+ ;;
+
+ force-reload)
+ if [ $run_watchdog = 0 ]; then exit 0; fi
+ log_daemon_msg "Restarting $NAME"
+ $0 stop
+ $0 start
+ ;;
+
+ status)
+ status "$DAEMON"
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/watchdog {start|stop|restart|force-reload|status}"
+ exit 1
+
+esac
+
+exit 0
diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb
index cedfc042ce..1acab2e9e7 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.15.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
- file://watchdog-init.patch \
- file://watchdog-conf.patch \
+ file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \
+ file://watchdog.init \
file://wd_keepalive.init \
"
@@ -21,39 +21,52 @@ SRC_URI[sha256sum] = "ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
-inherit autotools
-inherit update-rc.d
+inherit autotools update-rc.d systemd pkgconfig
-DEPENDS_append_libc-musl = " libtirpc "
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
-LDFLAGS_append_libc-musl = " -ltirpc "
-EXTRA_OECONF_append_libc-musl = " --disable-nfs "
+DEPENDS += "libtirpc"
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+LDFLAGS += "-ltirpc"
+
+EXTRA_OECONF += " --disable-nfs "
INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive"
-INITSCRIPT_NAME_${PN} = "watchdog.sh"
-INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ."
+INITSCRIPT_NAME_${PN} = "watchdog"
+INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ."
INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
-INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ."
+INITSCRIPT_PARAMS_${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ."
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive"
+SYSTEMD_SERVICE_${PN} = "watchdog.service"
+SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service"
+# When using systemd, consider making use of internal watchdog support of systemd.
+# See RuntimeWatchdogSec in /etc/systemd/system.conf.
+SYSTEMD_AUTO_ENABLE = "disable"
do_install_append() {
- install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
- install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir}
+ install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir}
+
+ install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog
+ install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
- # watchdog.conf is provided by the watchdog-config recipe
- rm ${D}${sysconfdir}/watchdog.conf
+ # watchdog.conf is provided by the watchdog-config recipe
+ rm ${D}${sysconfdir}/watchdog.conf
}
PACKAGES =+ "${PN}-keepalive"
FILES_${PN}-keepalive = " \
${sysconfdir}/init.d/wd_keepalive \
+ ${systemd_system_unitdir}/wd_keepalive.service \
${sbindir}/wd_keepalive \
"
-RDEPENDS_${PN} += "${PN}-config ${PN}-keepalive"
-RDEPENDS_${PN}-keepalive += "${PN}-config"
-
-RRECOMMENDS_${PN} = "kernel-module-softdog"
+RDEPENDS_${PN} += "${PN}-config"
+RRECOMMENDS_${PN} += "kernel-module-softdog"
+RDEPENDS_${PN}-keepalive += "${PN}-config"
+RCONFLICTS_${PN}-keepalive += "${PN}"
+RRECOMMENDS_${PN}-keepalive += "kernel-module-softdog"
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc
index c4abfe490e..2338328216 100644
--- a/meta/recipes-extended/wget/wget.inc
+++ b/meta/recipes-extended/wget/wget.inc
@@ -1,16 +1,21 @@
SUMMARY = "Console URL download utility supporting HTTP, FTP, etc"
+DESCRIPTION = "Wget is a network utility to retrieve files from the web using \
+HTTP(S) and FTP, the two most widely used internet protocols. It works \
+non-interactively, so it will work in the background, after having logged off. \
+The program supports recursive retrieval of web-authoring pages as well as \
+FTP sites"
HOMEPAGE = "https://www.gnu.org/software/wget/"
SECTION = "console/network"
LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "gnutls zlib libpcre"
-
-INC_PR = "r16"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e"
inherit autotools gettext texinfo update-alternatives pkgconfig
-EXTRA_OECONF = "--with-ssl=gnutls --disable-rpath --disable-iri \
- --without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no"
+EXTRA_OECONF = "--without-libgnutls-prefix --without-libssl-prefix \
+ --disable-rpath"
+
+EXTRA_OEMAKE += 'TOOLCHAIN_OPTIONS="${TOOLCHAIN_OPTIONS}" \
+ DEBUG_PREFIX_MAP="${DEBUG_PREFIX_MAP}"'
ALTERNATIVE_${PN} = "wget"
ALTERNATIVE_${PN}_class-nativesdk = ""
@@ -18,11 +23,19 @@ ALTERNATIVE_PRIORITY = "100"
RRECOMMENDS_${PN} += "ca-certificates"
-BBCLASSEXTEND += "nativesdk"
+BBCLASSEXTEND = "nativesdk"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux"
+PACKAGECONFIG ??= "gnutls pcre zlib \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ares] = "--with-cares,--without-cares,c-ares"
+PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[iri] = "--enable-iri,--disable-iri,libidn2"
+PACKAGECONFIG[libpsl] = "--with-libpsl,--without-libpsl,libpsl"
+PACKAGECONFIG[libuuid] = "--with-libuuid,--without-libuuid,util-linux"
+PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
+PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
# Let aclocal use the relative path for the m4 file rather than
# absolute, otherwise there might be an "Argument list too long" error
diff --git a/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index 0b3c6f5557..0000000000
--- a/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: wget-1.16.3/lib/Makefile.am
-===================================================================
---- wget-1.16.3.orig/lib/Makefile.am
-+++ wget-1.16.3/lib/Makefile.am
-@@ -846,7 +846,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch b/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch
new file mode 100644
index 0000000000..8781df21c0
--- /dev/null
+++ b/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch
@@ -0,0 +1,61 @@
+From 7f1357529d23b356b45fbb0dd7388588162e4cb8 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 10 Jan 2018 14:43:20 +0800
+Subject: [PATCH] src/Makefile.am: improve reproducibility
+
+Remove build host references from the internally
+generated file version.c. The references get compiled into
+executables, which leads to non-reproducible builds.
+The removed references (--sysroot, -fdebug-prefix-map) were
+only used as part of the `wget --version' which do not have
+side effect.
+
+...
+$ wget --version
+GNU Wget 1.14 built on linux-gnu.
+
++digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
+
+Wgetrc:
+ /etc/wgetrc (system)
+Locale: /usr/share/locale
+Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
+ -DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -O2 -g -pipe
+ -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
+ --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
+Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
+ -fstack-protector-strong --param=ssp-buffer-size=4
+ -grecord-gcc-switches -m64 -mtune=generic -lssl -lcrypto
+ /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so
+ -ldl -lz -lz -lidn -luuid -lpcre ftp-opie.o openssl.o http-ntlm.o
+ ../lib/libgnu.a
+...
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 28c0be2..44084a3 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -87,9 +87,13 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a
+ echo '#include "version.h"' >> $@
+ echo 'const char *version_string = "@VERSION@";' >> $@
+ echo 'const char *compilation_string = "'$(COMPILE)'";' \
++ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
++ -e "s,$(DEBUG_PREFIX_MAP),,g" \
+ | $(ESCAPEQUOTE) >> $@
+ echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \
++ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
++ -e "s,$(DEBUG_PREFIX_MAP),,g" \
+ | $(ESCAPEQUOTE) >> $@
+
+ css.c: $(srcdir)/css.l
+--
+1.8.3.1
+
diff --git a/meta/recipes-extended/wget/wget_1.18.bb b/meta/recipes-extended/wget/wget_1.18.bb
deleted file mode 100644
index c969b98e7d..0000000000
--- a/meta/recipes-extended/wget/wget_1.18.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
-SRC_URI[md5sum] = "fc2debd8399e3b933a9b226794e2a886"
-SRC_URI[sha256sum] = "a00a65fab84cc46e24c53ce88c45604668a7a479276e037dc2f558e34717fb2d"
-
-require wget.inc
diff --git a/meta/recipes-extended/wget/wget_1.20.3.bb b/meta/recipes-extended/wget/wget_1.20.3.bb
new file mode 100644
index 0000000000..4fa273d093
--- /dev/null
+++ b/meta/recipes-extended/wget/wget_1.20.3.bb
@@ -0,0 +1,8 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+ file://0002-improve-reproducibility.patch \
+ "
+
+SRC_URI[md5sum] = "db4e6dc7977cbddcd543b240079a4899"
+SRC_URI[sha256sum] = "31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e"
+
+require wget.inc
diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
deleted file mode 100644
index 495cdc6cf4..0000000000
--- a/meta/recipes-extended/which/which-2.18/automake-foreign.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Subject: [PATCH] automake foreign strictness
-
-Use foreign strictness to avoid automake errors.
-
-Upstream-Status: Inappropriate [upstream no longer active]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- configure.ac | 5 +++--
- 1 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b30b6f5..bd3222c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1,6 +1,7 @@
- dnl Process this file with autoconf to produce a configure script.
--AC_INIT(which.c)
--AM_INIT_AUTOMAKE(which, 2.18)
-+AC_INIT([which],[2.18])
-+AC_CONFIG_SRCDIR(which.c)
-+AM_INIT_AUTOMAKE([foreign])
- AM_CONFIG_HEADER(config.h)
- AM_MAINTAINER_MODE
-
---
-1.7.1
-
diff --git a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
deleted file mode 100644
index 0e0988b262..0000000000
--- a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific]
-
-# glibc also implements the function group_member. To avoid name conflict,
-# here let us append a "_" to which's version.
-#
-# Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20
-# (this patch is licensed under GPLv2)
-
---- which-2.18/bash.c
-+++ which-2.18/bash.c
-@@ -45,7 +45,12 @@
- * - changed all occurences of 'gid_t' into 'GID_T'.
- * - exported functions needed in which.c
- */
--static int group_member (GID_T gid);
-+
-+/*
-+ * glibc also implements the function group_member. To avoid name conflict,
-+ * here let us append a "_" to which's version.
-+ */
-+static int _group_member (GID_T gid);
- static char* extract_colon_unit (char const* string, int *p_index);
-
- /*===========================================================================
-@@ -200,8 +205,8 @@
-
- /* From bash-2.05b / general.c / line 805 */
- /* Return non-zero if GID is one that we have in our groups list. */
--int
--group_member (GID_T gid)
-+static int
-+_group_member (GID_T gid)
- {
- #if defined (HAVE_GETGROUPS)
- register int i;
-@@ -290,7 +295,7 @@
- return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
-
- /* Otherwise, if we are in the owning group, the group permissions apply. */
-- if (group_member (finfo.st_gid))
-+ if (_group_member (finfo.st_gid))
- return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
-
- /* Otherwise, if we are in the other group, the other permissions apply. */
-@@ -331,7 +336,7 @@
- /* Given a string containing units of information separated by colons,
- return the next one pointed to by (P_INDEX), or NULL if there are no more.
- Advance (P_INDEX) to the character after the colon. */
--char*
-+static char*
- extract_colon_unit (char const* string, int* p_index)
- {
- int i, start, len;
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
deleted file mode 100644
index eb6cc9967e..0000000000
--- a/meta/recipes-extended/which/which_2.18.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Displays the full path of shell commands"
-DESCRIPTION = "Which is a utility that prints out the full path of the \
-executables that bash(1) would execute when the passed \
-program names would have been entered on the shell prompt. \
-It does this by using the exact same algorithm as bash."
-SECTION = "libs"
-HOMEPAGE = "http://carlo17.home.xs4all.nl/which/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-PR = "r2"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/which/which-2.18.tar.gz/42d51938e48b91f6e19fabf216f5c3e9/which-${PV}.tar.gz \
- file://fix_name_conflict_group_member.patch \
- file://automake-foreign.patch \
-"
-
-SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9"
-SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544"
-
-DEPENDS = "cwautomacros-native"
-
-inherit autotools texinfo update-alternatives
-
-do_configure_prepend() {
- OLD="@ACLOCAL_CWFLAGS@"
- NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4"
- sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}`
-}
-
-ALTERNATIVE_${PN} = "which"
-ALTERNATIVE_PRIORITY = "100"
-
diff --git a/meta/recipes-extended/which/which_2.21.bb b/meta/recipes-extended/which/which_2.21.bb
index a7687f6fe4..fac0fd3944 100644
--- a/meta/recipes-extended/which/which_2.21.bb
+++ b/meta/recipes-extended/which/which_2.21.bb
@@ -30,3 +30,6 @@ do_configure_prepend() {
ALTERNATIVE_${PN} = "which"
ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-doc = "which.1"
+ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
diff --git a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
deleted file mode 100644
index 5007498bb0..0000000000
--- a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Basic desktop integration functions"
-
-DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
-desktop integration functions for any Free Desktop, such as Linux. \
-They are intended to provide a set of defacto standards. \
-The following scripts are provided at this time: \
-xdg-desktop-icon \
-xdg-desktop-menu \
-xdg-email \
-xdg-icon-resource \
-xdg-mime \
-xdg-open \
-xdg-screensaver \
-xdg-terminal \
-"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
-
-SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
- file://0001-Reinstate-xdg-terminal.patch \
- file://0001-Don-t-build-the-in-script-manual.patch \
- "
-
-SRC_URI[md5sum] = "2d0aec6037769a5f138ff404b1bb4b15"
-SRC_URI[sha256sum] = "b0dd63a2576e0bb16f1aa78d6ddf7d6784784a098d4df17161cd6a17c7bc4125"
-
-UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)"
-
-# Needs brokensep as this doesn't use automake
-inherit autotools-brokensep distro_features_check
-
-# The xprop requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-DEPENDS = "xmlto-native libxslt-native"
-RDEPENDS_${PN} += "xprop"
diff --git a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb
new file mode 100644
index 0000000000..d371c5c28c
--- /dev/null
+++ b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Basic desktop integration functions"
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/xdg-utils/"
+DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
+desktop integration functions for any Free Desktop, such as Linux. \
+They are intended to provide a set of defacto standards. \
+The following scripts are provided at this time: \
+xdg-desktop-icon \
+xdg-desktop-menu \
+xdg-email \
+xdg-icon-resource \
+xdg-mime \
+xdg-open \
+xdg-screensaver \
+xdg-terminal \
+"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
+
+SRC_URI = "https://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
+ file://0001-Reinstate-xdg-terminal.patch \
+ file://0001-Don-t-build-the-in-script-manual.patch \
+ "
+
+SRC_URI[md5sum] = "902042508b626027a3709d105f0b63ff"
+SRC_URI[sha256sum] = "d798b08af8a8e2063ddde6c9fa3398ca81484f27dec642c5627ffcaa0d4051d9"
+
+UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)"
+
+# Needs brokensep as this doesn't use automake
+inherit autotools-brokensep features_check
+
+# The xprop requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+DEPENDS = "xmlto-native libxslt-native"
+RDEPENDS_${PN} += "xprop"
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
index c44c5a113f..852a43f2de 100644
--- a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
@@ -11,6 +11,7 @@ https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff
CVE: CVE-2013-4342
Signed-off-by: Li Wang <li.wang@windriver.com>
+Upstream-Status: Backport
---
xinetd/builtins.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.service b/meta/recipes-extended/xinetd/xinetd/xinetd.service
index d5fdc5bc29..6da92f2bf5 100644
--- a/meta/recipes-extended/xinetd/xinetd/xinetd.service
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.service
@@ -3,11 +3,8 @@ Description=Xinetd A Powerful Replacement For Inetd
After=syslog.target network.target
[Service]
-Type=forking
-PIDFile=/var/run/xinetd.pid
EnvironmentFile=-/etc/sysconfig/xinetd
-ExecStart=@SBINDIR@/xinetd -stayalive -pidfile /var/run/xinetd.pid "$EXTRAOPTIONS"
-ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+ExecStart=@SBINDIR@/xinetd -dontfork "$EXTRAOPTIONS"
[Install]
WantedBy=multi-user.target
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
index 6bfaabe829..6e43f5be6f 100644
--- a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -6,8 +6,7 @@ HOMEPAGE = "https://github.com/xinetd-org/xinetd"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
-DEPENDS = ""
-DEPENDS_append_libc-musl = " libtirpc "
+DEPENDS += "libtirpc"
PR = "r2"
# Blacklist a bogus tag in upstream check
@@ -24,6 +23,7 @@ SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \
file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
file://xinetd.service \
"
+UPSTREAM_VERSION_UNKNOWN = "1"
SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24"
@@ -41,8 +41,8 @@ EXTRA_OECONF="--disable-nls"
PACKAGECONFIG ??= "tcp-wrappers"
PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
-LDFLAGS_append_libc-musl = " -ltirpc "
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+LDFLAGS += "-ltirpc"
do_configure() {
# Looks like configure.in is broken, so we are skipping
diff --git a/meta/recipes-extended/xz/xz_5.2.2.bb b/meta/recipes-extended/xz/xz_5.2.2.bb
deleted file mode 100644
index d118f3a744..0000000000
--- a/meta/recipes-extended/xz/xz_5.2.2.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Utilities for managing LZMA compressed files"
-HOMEPAGE = "http://tukaani.org/xz/"
-SECTION = "base"
-
-# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file
-# which is GPLv3 is an m4 macro which isn't shipped in any of our packages,
-# and the LGPL bits are under lib/, which appears to be used for libgnu, which
-# appears to be used for DOS builds. So we're left with GPLv2+ and PD.
-LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD"
-LICENSE_${PN} = "GPLv2+"
-LICENSE_${PN}-dev = "GPLv2+"
-LICENSE_${PN}-staticdev = "GPLv2+"
-LICENSE_${PN}-doc = "GPLv2+"
-LICENSE_${PN}-dbg = "GPLv2+"
-LICENSE_${PN}-locale = "GPLv2+"
-LICENSE_liblzma = "PD"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
- file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
- file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
-
-SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
-SRC_URI[md5sum] = "7cf6a8544a7dae8e8106fdf7addfa28c"
-SRC_URI[sha256sum] = "73df4d5d34f0468bd57d09f2d8af363e95ed6cc3a4a86129d2f2c366259902a2"
-
-inherit autotools gettext
-
-PACKAGES =+ "liblzma"
-
-FILES_liblzma = "${libdir}/liblzma*${SOLIBS}"
-
-BBCLASSEXTEND = "native nativesdk"
-
-export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/xz/xz_5.2.4.bb b/meta/recipes-extended/xz/xz_5.2.4.bb
new file mode 100644
index 0000000000..83e8fe0cd1
--- /dev/null
+++ b/meta/recipes-extended/xz/xz_5.2.4.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Utilities for managing LZMA compressed files"
+HOMEPAGE = "https://tukaani.org/xz/"
+SECTION = "base"
+
+# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file
+# which is GPLv3 is an m4 macro which isn't shipped in any of our packages,
+# and the LGPL bits are under lib/, which appears to be used for libgnu, which
+# appears to be used for DOS builds. So we're left with GPLv2+ and PD.
+LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_${PN}-dev = "GPLv2+"
+LICENSE_${PN}-staticdev = "GPLv2+"
+LICENSE_${PN}-doc = "GPLv2+"
+LICENSE_${PN}-dbg = "GPLv2+"
+LICENSE_${PN}-locale = "GPLv2+"
+LICENSE_liblzma = "PD"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \
+ file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
+ file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \
+ "
+
+SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz"
+SRC_URI[md5sum] = "5ace3264bdd00c65eeec2891346f65e6"
+SRC_URI[sha256sum] = "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145"
+UPSTREAM_CHECK_REGEX = "xz-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools gettext
+
+PACKAGES =+ "liblzma"
+
+FILES_liblzma = "${libdir}/liblzma*${SOLIBS}"
+
+inherit update-alternatives
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "xz xzcat unxz \
+ lzma lzcat unlzma"
+
+BBCLASSEXTEND = "native nativesdk"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/zip/zip-3.0/10-remove-build-date.patch b/meta/recipes-extended/zip/zip-3.0/10-remove-build-date.patch
new file mode 100644
index 0000000000..244ddea363
--- /dev/null
+++ b/meta/recipes-extended/zip/zip-3.0/10-remove-build-date.patch
@@ -0,0 +1,19 @@
+From: Santiago Vila <sanvila@debian.org>
+Subject: Remove (optional) build date to make the build reproducible
+Bug-Debian: http://bugs.debian.org/779042
+
+Upstream-Status: Inappropriate [no upstream]
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+
+--- a/unix/unix.c
++++ b/unix/unix.c
+@@ -1020,7 +1020,7 @@
+
+
+ /* Define the compile date string */
+-#ifdef __DATE__
++#if 0
+ # define COMPILE_DATE " on " __DATE__
+ #else
+ # define COMPILE_DATE ""
diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
index 087423a045..a2cd7717ca 100644
--- a/meta/recipes-extended/zip/zip_3.0.bb
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -10,7 +10,10 @@ PR = "r2"
S = "${WORKDIR}/zip30"
SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz \
- file://fix-security-format.patch"
+ file://fix-security-format.patch \
+ file://10-remove-build-date.patch \
+ "
+UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37"
SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369"
diff --git a/meta/recipes-gnome/epiphany/epiphany_3.20.3.bb b/meta/recipes-gnome/epiphany/epiphany_3.20.3.bb
deleted file mode 100644
index eba480b2f6..0000000000
--- a/meta/recipes-gnome/epiphany/epiphany_3.20.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "WebKit based web browser for GNOME"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes ca-certificates avahi libnotify gcr libwnck3 \
- gsettings-desktop-schemas gnome-desktop3 libxml2-native intltool-native"
-
-inherit gnomebase gsettings distro_features_check upstream-version-is-even
-# libwnck3 is x11 only
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI += "file://0001-yelp.m4-drop-the-check-for-itstool.patch"
-SRC_URI[archive.md5sum] = "31822b6b199f724f212ae9200bc055f1"
-SRC_URI[archive.sha256sum] = "4d9de1bdb44c14adf25aa6dc02ea3de60925cff5eb01fe89545e6032c9b424a2"
-
-EXTRA_OECONF += " --disable-nss --with-distributor-name=${DISTRO}"
-
-do_configure_prepend() {
- sed -i -e s:help::g ${S}/Makefile.am
-}
-
-FILES_${PN} += "${datadir}/appdata ${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
-RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
-RRECOMMENDS_${PN} = "ca-certificates"
-
diff --git a/meta/recipes-gnome/epiphany/epiphany_3.34.1.bb b/meta/recipes-gnome/epiphany/epiphany_3.34.1.bb
new file mode 100644
index 0000000000..cebd55dc87
--- /dev/null
+++ b/meta/recipes-gnome/epiphany/epiphany_3.34.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "WebKit based web browser for GNOME"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/epiphany"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes avahi libnotify gcr \
+ gsettings-desktop-schemas libxml2-native \
+ glib-2.0 glib-2.0-native json-glib libdazzle"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gsettings features_check upstream-version-is-even gettext
+REQUIRED_DISTRO_FEATURES = "x11 opengl"
+
+SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
+ file://0002-help-meson.build-disable-the-use-of-yelp.patch \
+ "
+SRC_URI[archive.md5sum] = "50b50e18d99b19f44cc9cd419c6a4ba8"
+SRC_URI[archive.sha256sum] = "a07bc997ad2cbf14d58557bb0b63e92d8c33683680c5e50ea6f9b53b36bec1d9"
+
+FILES_${PN} += "${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers ${datadir}/metainfo"
+RDEPENDS_${PN} = "iso-codes adwaita-icon-theme gsettings-desktop-schemas"
diff --git a/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch b/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch
deleted file mode 100644
index 2585d7f741..0000000000
--- a/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 30f03a256efe375a4d5c3a24bf4168ebf380e3ab Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 30 Jul 2015 15:13:23 +0300
-Subject: [PATCH] yelp.m4: drop the check for itstool
-
-It isn't used for anything during build, so there's no need to provide
-it as a recipe.
-
-Upstream-Status: Inappropriate [tarball-specific issue]
----
- m4/yelp.m4 | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/m4/yelp.m4 b/m4/yelp.m4
-index 5db847f..1b6ede4 100644
---- a/m4/yelp.m4
-+++ b/m4/yelp.m4
-@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir],
- HELP_DIR="$with_help_dir"
- AC_SUBST(HELP_DIR)
-
--AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
--AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
--if test x"$ITSTOOL" = x; then
-- AC_MSG_ERROR([itstool not found])
--fi
--
- AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
- AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
- if test x"$XMLLINT" = x; then
---
-2.1.4
-
diff --git a/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch b/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch
new file mode 100644
index 0000000000..d4f3cc1d35
--- /dev/null
+++ b/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch
@@ -0,0 +1,30 @@
+From 0048ae2d225d25cc58f378718ca6f9ddb1a228f9 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 31 Jan 2018 15:50:38 +0200
+Subject: [PATCH] help/meson.build: disable the use of yelp
+
+In particular this avoids calling itstool which oe-core doesn't provide.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ help/meson.build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/help/meson.build b/help/meson.build
+index fddcf4c..f7d76c6 100644
+--- a/help/meson.build
++++ b/help/meson.build
+@@ -32,7 +32,7 @@ help_media = [
+ 'media/web-browser.png'
+ ]
+
+-gnome.yelp(meson.project_name(),
+- sources: help_files,
+- media: help_media,
+-)
++#gnome.yelp(meson.project_name(),
++# sources: help_files,
++# media: help_media,
++#)
diff --git a/meta/recipes-gnome/gcr/gcr_3.20.0.bb b/meta/recipes-gnome/gcr/gcr_3.20.0.bb
deleted file mode 100644
index b32a455e31..0000000000
--- a/meta/recipes-gnome/gcr/gcr_3.20.0.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "A library for bits of crypto UI and parsing etc"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
-
-DEPENDS = "intltool-native gtk+3 p11-kit glib-2.0 libgcrypt"
-
-inherit autotools gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
-# depends on gtk+3, but also x11 through gtk+-x11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI[archive.md5sum] = "4314bf89eac293dd0a9d806593ff1b35"
-SRC_URI[archive.sha256sum] = "90572c626d8a708225560c42b4421f7941315247fa1679d4ef569bde7f4bb379"
-
-FILES_${PN} += " \
- ${datadir}/dbus-1 \
- ${datadir}/gcr-3 \
-"
-
-# http://errors.yoctoproject.org/Errors/Details/20229/
-ARM_INSTRUCTION_SET = "arm"
-
-# on x86-64 the introspection binary goes into
-# an infinite loop under qemu during compilation,
-# printing the following:
-#
-# gcrypt-Message: select() error: Bad address
-#
-# gcrypt-Message: select() error: Bad address
-#
-# gcrypt-Message: select() error: Bad address
-#
-# This will be investigated later.
-EXTRA_OECONF_append_x86-64 = " --disable-introspection --disable-gtk-doc"
-
-# Gcr-3.broken: poky/build-mips64/tmp/work/mips64-poky-linux/libgpg-error/1.19-r0/libgpg-error-1.19/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
-# qemu: uncaught target signal 6 (Aborted) - core dumped
-EXTRA_OECONF_append_mips64 = " --disable-introspection --disable-gtk-doc"
diff --git a/meta/recipes-gnome/gcr/gcr_3.34.0.bb b/meta/recipes-gnome/gcr/gcr_3.34.0.bb
new file mode 100644
index 0000000000..e3e8999635
--- /dev/null
+++ b/meta/recipes-gnome/gcr/gcr_3.34.0.bb
@@ -0,0 +1,35 @@
+SUMMARY = "A library for bits of crypto UI and parsing etc"
+DESCRIPTION = "GCR is a library for displaying certificates, and crypto UI, \
+accessing key stores. It also provides the viewer for crypto files on the \
+GNOME desktop."
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/gcr"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/gcr/issues"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
+
+DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', d)}"
+
+inherit gnomebase gtk-icon-cache gtk-doc features_check upstream-version-is-even vala gobject-introspection gettext
+# depends on gtk+3, but also x11 through gtk+-x11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.md5sum] = "4af28919fb1dd36d93603e8230283b6f"
+SRC_URI[archive.sha256sum] = "29df50974a90987af694c0fb8926a6b366e68cacd8abd813817cfe1eb5d54524"
+
+FILES_${PN} += " \
+ ${datadir}/dbus-1 \
+ ${datadir}/gcr-3 \
+"
+
+# http://errors.yoctoproject.org/Errors/Details/20229/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
+# These files may be out of date or missing our fixes
+# libgcrypt.m4 in particular is calling into libgcrypt-config
+do_configure_prepend() {
+ rm -f ${S}/build/m4/*
+}
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch
new file mode 100644
index 0000000000..e461404918
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch
@@ -0,0 +1,38 @@
+From be8a47e0c21e5577d4f5669d339dfec6299b25be Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 14 Feb 2019 18:06:25 +0100
+Subject: [PATCH] Generate loaders.cache using a native tool when
+ cross-compiling
+
+Otherwise meson would attempt to run a target binary.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ gdk-pixbuf/meson.build | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
+index 5cddbec..78c8bd3 100644
+--- a/gdk-pixbuf/meson.build
++++ b/gdk-pixbuf/meson.build
+@@ -324,8 +324,16 @@ if not meson.is_cross_build()
+ build_by_default: true)
+ loaders_dep = declare_dependency(sources: [ loaders_cache ])
+ else
+- loaders_cache = []
+- loaders_dep = declare_dependency()
++ loaders_cache = custom_target('loaders.cache',
++ output: 'loaders.cache',
++ capture: true,
++ command: [
++ 'gdk-pixbuf-query-loaders',
++ dynamic_loaders,
++ ],
++ depends: dynamic_loaders_dep,
++ build_by_default: true)
++ loaders_dep = declare_dependency(sources: [ loaders_cache ])
+ endif
+
+ pkgconfig = import('pkgconfig')
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch
new file mode 100644
index 0000000000..110b32a490
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch
@@ -0,0 +1,28 @@
+From 8c7ced988def52654946458a3779e383b27f14f7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 14 Feb 2019 17:56:10 +0100
+Subject: [PATCH] Work-around thumbnailer cross-compile failure
+
+Install gdk-pixbuf-print-mime-types that's needed for thumbnail
+metadata generation.
+
+The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
+
+Upstream-Status: Inappropriate [workaround]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ thumbnailer/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
+index e801144..aaafec8 100644
+--- a/thumbnailer/meson.build
++++ b/thumbnailer/meson.build
+@@ -10,6 +10,7 @@ executable('gdk-pixbuf-thumbnailer',
+ gdk_pixbuf_print_mime_types = executable('gdk-pixbuf-print-mime-types',
+ 'gdk-pixbuf-print-mime-types.c',
+ c_args: common_cflags,
++ install: true,
+ dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ])
+
+ custom_target('thumbnailer',
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch
new file mode 100644
index 0000000000..a9c7600eb3
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch
@@ -0,0 +1,94 @@
+From 2d1b65bd1272ad63b7fbd4babd9a8e8c296d15b5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 22 Feb 2019 13:22:06 +0100
+Subject: [PATCH] (target only) Work-around thumbnailer and pixdata
+ cross-compile failure
+
+Use native gdk-pixbuf-print-mime-types and gdk-pixbuf-pixdata
+when generating the thumbnail metadata and resources.
+
+This works but the mime types will come from native
+loader.cache (which will only contain in-tree loaders), not from the
+target loader.cache.
+
+The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
+
+Upstream-Status: Inappropriate [workaround]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ build-aux/gen-thumbnailer.py | 2 --
+ tests/meson.build | 11 +++++++++--
+ thumbnailer/meson.build | 5 +----
+ 3 files changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/build-aux/gen-thumbnailer.py b/build-aux/gen-thumbnailer.py
+index 05ac821..c5b99ab 100644
+--- a/build-aux/gen-thumbnailer.py
++++ b/build-aux/gen-thumbnailer.py
+@@ -20,8 +20,6 @@ argparser.add_argument('output', help='Output file')
+ args = argparser.parse_args()
+
+ newenv = os.environ.copy()
+-newenv['GDK_PIXBUF_PIXDATA'] = args.pixdata
+-newenv['GDK_PIXBUF_MODULE_FILE'] = args.loaders
+ # 'nt': NT-based Windows, see https://docs.python.org/3/library/os.html
+ if os.name == 'nt':
+ gdk_pixbuf_dll_buildpath = os.path.dirname(args.pixdata)
+diff --git a/tests/meson.build b/tests/meson.build
+index 8ed7cc1..e011b77 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -1,12 +1,19 @@
+ # Resources; we cannot use gnome.compile_resources() here, because we need to
+ # override the environment in order to use the utilities we just built instead
+ # of the system ones
++
++if not meson.is_cross_build()
++pixdata_binary = gdk_pixbuf_pixdata.full_path()
++else
++pixdata_binary = 'gdk-pixbuf-pixdata'
++endif
++
+ resources_c = custom_target('resources.c',
+ input: 'resources.gresource.xml',
+ output: 'resources.c',
+ command: [
+ gen_resources,
+- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
++ '--pixdata=@0@'.format(pixdata_binary),
+ '--loaders=@0@'.format(loaders_cache.full_path()),
+ '--sourcedir=@0@'.format(meson.current_source_dir()),
+ '--source',
+@@ -24,7 +31,7 @@ resources_h = custom_target('resources.h',
+ output: 'resources.h',
+ command: [
+ gen_resources,
+- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
++ '--pixdata=@0@'.format(pixdata_binary),
+ '--loaders=@0@'.format(loaders_cache.full_path()),
+ '--sourcedir=@0@'.format(meson.current_source_dir()),
+ '--header',
+diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
+index aaafec8..71bd61b 100644
+--- a/thumbnailer/meson.build
++++ b/thumbnailer/meson.build
+@@ -18,9 +18,7 @@ custom_target('thumbnailer',
+ output: 'gdk-pixbuf-thumbnailer.thumbnailer',
+ command: [
+ gen_thumbnailer,
+- '--printer=@0@'.format(gdk_pixbuf_print_mime_types.full_path()),
+- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
+- '--loaders=@0@'.format(loaders_cache.full_path()),
++ '--printer=gdk-pixbuf-print-mime-types',
+ '--bindir=@0@'.format(gdk_pixbuf_bindir),
+ '@INPUT@',
+ '@OUTPUT@',
+@@ -28,7 +26,6 @@ custom_target('thumbnailer',
+ depends: [
+ gdk_pixbuf_print_mime_types,
+ gdk_pixbuf_pixdata,
+- loaders_cache,
+ ],
+ install: true,
+ install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0004-Do-not-run-tests-when-building.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0004-Do-not-run-tests-when-building.patch
new file mode 100644
index 0000000000..96c546f271
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0004-Do-not-run-tests-when-building.patch
@@ -0,0 +1,39 @@
+From 3c4a6c147ae8a0962ba9194373d8a41d14eed44f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 22 Feb 2019 13:23:55 +0100
+Subject: [PATCH] Do not run tests when building
+
+Upstream-Status: Inappropriate [cross-compile specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tests/meson.build | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index 4fa3fbc..6ef7884 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -138,23 +138,6 @@ foreach t: installed_tests
+ install_dir: installed_test_bindir,
+ )
+
+- # Two particularly slow tests
+- if test_suites.contains('slow')
+- timeout = 300
+- else
+- timeout = 30
+- endif
+-
+- test(test_name, test_bin,
+- suite: test_suites,
+- args: [ '-k', '--tap' ],
+- env: [
+- 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+- 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+- 'GDK_PIXBUF_MODULE_FILE=@0@'.format(loaders_cache.full_path()),
+- ],
+- timeout: timeout,
+- )
+ endforeach
+
+ executable('pixbuf-read',
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch
new file mode 100644
index 0000000000..0fe13a387a
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch
@@ -0,0 +1,28 @@
+From 1a532e090c558a830de9503f56e23414e880bb95 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 5 Jun 2019 14:17:55 +0200
+Subject: [PATCH] Build thumbnailer and tests also in cross builds.
+
+Upstream-Status: Inappropriate [relies on oe-core specific hacks]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index d104cea..7acb88a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -397,10 +397,8 @@ endif
+ # i18n
+ subdir('po')
+
+-if not meson.is_cross_build()
+- subdir('tests')
+- subdir('thumbnailer')
+-endif
++subdir('tests')
++subdir('thumbnailer')
+
+ # Documentation
+ subdir('docs')
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch
deleted file mode 100644
index edbdced43a..0000000000
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Upstream-Status: Pending
-
-This patch fixes parallel install issue that lib libpixbufloader-png.la
-depends on libgdk_pixbuf-2.0.la which will be regenerated during insta-
-llation, if libgdk_pixbuf-2.0.la is regenerating and at the same time
-libpixbufloader-png.la links it, the error will happen.
-
-Error message is:
-* usr/bin/ld: cannot find -lgdk_pixbuf-2.0
-* collect2: ld returned 1 exit status
-
-Make an explicit dependency to the libs install targets would fix this
-issue.
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- gdk-pixbuf/Makefile.am | 1 +
- libdeps.mk | 3 +++
- 2 files changed, 4 insertions(+), 0 deletions(-)
- create mode 100644 libdeps.mk
-
-diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
-index 95a93a8..db44cae 100644
---- a/gdk-pixbuf/Makefile.am
-+++ b/gdk-pixbuf/Makefile.am
-@@ -783,3 +783,4 @@ loaders.cache:
- endif
-
- -include $(top_srcdir)/git.mk
-+-include $(top_srcdir)/libdeps.mk
-diff --git a/libdeps.mk b/libdeps.mk
-new file mode 100644
-index 0000000..d7a10a8
---- /dev/null
-+++ b/libdeps.mk
-@@ -0,0 +1,3 @@
-+# Extending dependencies of install-loaderLTLIBRARIES:
-+# The $(lib-LTLIBRARIES) is needed by relinking $(loader_LTLIBRARIES)
-+install-loaderLTLIBRARIES: install-libLTLIBRARIES
---
-1.7.6.1
-
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
index 70146c6181..25410b11ea 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
@@ -1,14 +1,23 @@
+From f00603d58d844422363b896ea7d07aaf48ddaa66 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 1 Apr 2014 17:23:36 +0100
+Subject: [PATCH] gdk-pixbuf: add an option so that loader errors are fatal
+
If an environment variable is specified set the return value from main() to
non-zero if the loader had errors (missing libraries, generally).
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ gdk-pixbuf/queryloaders.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
-index a9ca015..395674a 100644
+index 312aa78..b813d99 100644
--- a/gdk-pixbuf/queryloaders.c
+++ b/gdk-pixbuf/queryloaders.c
-@@ -146,7 +146,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info)
+@@ -212,7 +212,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info)
g_string_append_c (contents, '\n');
}
@@ -17,7 +26,7 @@ index a9ca015..395674a 100644
query_module (GString *contents, const char *dir, const char *file)
{
char *path;
-@@ -155,6 +155,7 @@ query_module (GString *contents, const char *dir, const char *file)
+@@ -221,6 +221,7 @@ query_module (GString *contents, const char *dir, const char *file)
void (*fill_vtable) (GdkPixbufModule *module);
gpointer fill_info_ptr;
gpointer fill_vtable_ptr;
@@ -25,7 +34,7 @@ index a9ca015..395674a 100644
if (g_path_is_absolute (file))
path = g_strdup (file);
-@@ -204,10 +205,13 @@ query_module (GString *contents, const char *dir, const char *file)
+@@ -270,10 +271,13 @@ query_module (GString *contents, const char *dir, const char *file)
g_module_error());
else
g_fprintf (stderr, "Cannot load loader %s\n", path);
@@ -39,25 +48,26 @@ index a9ca015..395674a 100644
}
#ifdef G_OS_WIN32
-@@ -257,6 +261,7 @@ int main (int argc, char **argv)
- GString *contents;
- gchar *cache_file = NULL;
+@@ -314,6 +318,7 @@ int main (int argc, char **argv)
gint first_file = 1;
+ GFile *pixbuf_libdir_file;
+ gchar *pixbuf_libdir;
+ gboolean success = TRUE;
#ifdef G_OS_WIN32
gchar *libdir;
-@@ -360,7 +365,8 @@ int main (int argc, char **argv)
- gint len = strlen (dent);
- if (len > SOEXT_LEN &&
- strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
-- query_module (contents, path, dent);
-+ if (!query_module (contents, path, dent))
-+ success = FALSE;
- }
- }
- g_dir_close (dir);
-@@ -378,7 +384,8 @@ int main (int argc, char **argv)
+@@ -452,7 +457,9 @@ int main (int argc, char **argv)
+ }
+ modules = g_list_sort (modules, (GCompareFunc)strcmp);
+ for (l = modules; l != NULL; l = l->next)
+- query_module (contents, moduledir, l->data);
++ if (!query_module (contents, moduledir, l->data))
++ success = FALSE;
++
+ g_list_free_full (modules, g_free);
+ g_free (moduledir);
+ #else
+@@ -468,7 +475,8 @@ int main (int argc, char **argv)
infilename = g_locale_to_utf8 (infilename,
-1, NULL, NULL, NULL);
#endif
@@ -67,9 +77,9 @@ index a9ca015..395674a 100644
}
g_free (cwd);
}
-@@ -394,5 +401,8 @@ int main (int argc, char **argv)
- else
- g_print ("%s\n", contents->str);
+@@ -486,5 +494,8 @@ int main (int argc, char **argv)
+
+ g_free (pixbuf_libdir);
- return 0;
+ if (g_getenv ("GDK_PIXBUF_FATAL_LOADER"))
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch
deleted file mode 100644
index ecca62a712..0000000000
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: gdk-pixbuf-2.22.1/configure.ac
-===================================================================
---- gdk-pixbuf-2.22.1.orig/configure.ac 2010-11-26 09:06:34.000000000 +0800
-+++ gdk-pixbuf-2.22.1/configure.ac 2010-11-26 09:07:33.000000000 +0800
-@@ -287,7 +287,7 @@
- case $enable_explicit_deps in
- auto)
- export SED
-- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
- if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
- enable_explicit_deps=yes
- else
-@@ -484,7 +484,7 @@
- dnl Now we check to see if our libtool supports shared lib deps
- dnl (in a rather ugly way even)
- if $dynworks; then
-- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-+ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
- pixbuf_deplibs_check=`$pixbuf_libtool_config | \
- grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
- sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -957,7 +957,7 @@
- # We are using gmodule-no-export now, but I'm leaving the stripping
- # code in place for now, since pango and atk still require gmodule.
- export SED
--export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- if test -n "$export_dynamic"; then
- GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
- fi
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/missing-test-data.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/missing-test-data.patch
new file mode 100644
index 0000000000..6c758fd61c
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/missing-test-data.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From d8d231c01ef2e59856da8a5c26ace955e5f29370 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 25 Nov 2019 17:05:46 +0000
+Subject: [PATCH] tests: install circular-table.gif
+
+This test data was added for the pixbuf-gif-circular-table test (added October
+2018 in 0b9d004) but because the file was never actually installed the installed
+test suite never passes.
+---
+ tests/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index 5116fc2b9..80ed3e8b2 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -97,6 +97,7 @@ test_data = [
+ 'bug775693.pixdata',
+ 'bug775229.pixdata',
+ 'aero.gif',
++ 'circular-table.gif'
+ ]
+
+ installed_test_bindir = join_paths(gdk_pixbuf_libexecdir, 'installed-tests', meson.project_name())
+--
+2.20.1
+
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.34.0.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.34.0.bb
deleted file mode 100644
index 4f39494cf3..0000000000
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.34.0.bb
+++ /dev/null
@@ -1,102 +0,0 @@
-SUMMARY = "Image loading library for GTK+"
-HOMEPAGE = "http://www.gtk.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
-
-SECTION = "libs"
-
-DEPENDS = "glib-2.0"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- file://hardcoded_libtool.patch \
- file://extending-libinstall-dependencies.patch \
- file://run-ptest \
- file://fatal-loader.patch \
- "
-
-SRC_URI[md5sum] = "63cb19f92cf7709ccf44bbb6fe1ff70c"
-SRC_URI[sha256sum] = "d55e5b383ee219bd0e23bf6ed4427d56a7db5379729a6e3e0a0e0eba9a8d8879"
-
-inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc
-
-LIBV = "2.10.0"
-
-GDK_PIXBUF_LOADERS ?= "png jpeg"
-
-PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_linuxstdbase = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
-
-PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
-PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
-PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
-PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
-
-# Use GIO to sniff image format instead of trying all loaders
-PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info"
-PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
-
-PACKAGES =+ "${PN}-xlib"
-
-FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
-ALLOW_EMPTY_${PN}-xlib = "1"
-
-FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-FILES_${PN}-dev += " \
- ${bindir}/gdk-pixbuf-csource \
- ${bindir}/gdk-pixbuf-pixdata \
- ${includedir}/* \
- ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
-"
-
-PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
-PACKAGES_DYNAMIC_class-native = ""
-
-python populate_packages_prepend () {
- postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
-
- loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
-
- packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
- d.setVar('PIXBUF_PACKAGES', packages)
-
- # The test suite exercises all the loaders, so ensure they are all
- # dependencies of the ptest package.
- d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages)
-}
-
-do_install_append() {
- # Move gdk-pixbuf-query-loaders into libdir so it is always available
- # in multilib builds.
- mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
-}
-
-do_install_append_class-native() {
- find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
-
- create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
- create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
- create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
- GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
-}
-BBCLASSEXTEND = "native"
-
-SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
-
-gdkpixbuf_sstate_preinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then
- rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/*
- fi
-}
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb
new file mode 100644
index 0000000000..699c4ecd0b
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb
@@ -0,0 +1,127 @@
+SUMMARY = "Image loading library for GTK+"
+DESCRIPTION = "The GDK Pixbuf library provides: Image loading and saving \
+facilities, fast scaling and compositing of pixbufs and Simple animation \
+loading (ie. animated GIFs)"
+HOMEPAGE = "https://wiki.gnome.org/Projects/GdkPixbuf"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \
+ "
+
+SECTION = "libs"
+
+DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://run-ptest \
+ file://fatal-loader.patch \
+ file://0001-Work-around-thumbnailer-cross-compile-failure.patch \
+ file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \
+ file://0004-Do-not-run-tests-when-building.patch \
+ file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \
+ file://missing-test-data.patch \
+ "
+
+SRC_URI_append_class-target = " \
+ file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \
+ "
+SRC_URI_append_class-nativesdk = " \
+ file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \
+ "
+
+SRC_URI[md5sum] = "05eb1ebc258ba905f1c8644ef49de064"
+SRC_URI[sha256sum] = "1582595099537ca8ff3b99c6804350b4c058bb8ad67411bbaae024ee7cead4e6"
+
+inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
+
+GIR_MESON_OPTION = 'gir'
+
+EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}"
+
+LIBV = "2.10.0"
+
+GDK_PIXBUF_LOADERS ?= "png jpeg"
+
+PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
+
+PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng"
+PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg"
+PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff"
+PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper"
+
+PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11"
+
+PACKAGES =+ "${PN}-xlib"
+
+# For GIO image type sniffing
+RDEPENDS_${PN} = "shared-mime-info"
+
+FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
+ALLOW_EMPTY_${PN}-xlib = "1"
+
+FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer"
+
+FILES_${PN}-dev += " \
+ ${bindir}/gdk-pixbuf-csource \
+ ${bindir}/gdk-pixbuf-pixdata \
+ ${bindir}/gdk-pixbuf-print-mime-types \
+ ${includedir}/* \
+ ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
+"
+
+PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
+PACKAGES_DYNAMIC_class-native = ""
+
+python populate_packages_prepend () {
+ postinst_pixbufloader = d.getVar("postinst_pixbufloader")
+
+ loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
+
+ packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
+ d.setVar('PIXBUF_PACKAGES', packages)
+
+ # The test suite exercises all the loaders, so ensure they are all
+ # dependencies of the ptest package.
+ d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages)
+}
+
+do_install_append() {
+ # Copy gdk-pixbuf-query-loaders into libdir so it is always available
+ # in multilib builds.
+ cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
+
+}
+
+do_install_append_class-native() {
+ find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
+ XDG_DATA_DIRS=${STAGING_DATADIR} \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
+ XDG_DATA_DIRS=${STAGING_DATADIR} \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \
+ XDG_DATA_DIRS=${STAGING_DATADIR} \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+ create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
+ XDG_DATA_DIRS=${STAGING_DATADIR} \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+ GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \
+ XDG_DATA_DIRS=${STAGING_DATADIR} \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+ GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
+}
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.20.2.bb b/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.20.2.bb
deleted file mode 100644
index eb061b20e4..0000000000
--- a/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.20.2.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "GNOME library for reading .desktop files"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-BPN = "gnome-desktop"
-
-inherit gnome pkgconfig upstream-version-is-even gobject-introspection
-SRC_URI[archive.md5sum] = "8354ed38624f5eb6b5d34267b658a9c9"
-SRC_URI[archive.sha256sum] = "492c2da7aa8c3a8b65796e8171fc8f0dfb5d322dd2799c0d76392e1fb061e2b2"
-
-DEPENDS += "intltool-native gsettings-desktop-schemas gconf libxrandr virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes"
-
-inherit distro_features_check gtk-doc
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-desktop-docs"
-
-PACKAGES =+ "libgnome-desktop3"
-FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
-
-RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch
new file mode 100644
index 0000000000..372f144be0
--- /dev/null
+++ b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch
@@ -0,0 +1,27 @@
+From 4409423752885f76326d05c1266698155f47c5f9 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 30 May 2017 14:55:49 +0300
+Subject: [PATCH] Don't use AC_CANONICAL_HOST
+
+This won't work when building allarch (and is only used to find out if
+target is windows).
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4a84501..52dbb8e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,7 +3,6 @@ AC_PREREQ(2.53)
+
+ AC_INIT([adwaita-icon-theme], [3.34.3],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=adwaita-icon-theme])
+-AC_CANONICAL_HOST
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR([index.theme.in])
+
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch
new file mode 100644
index 0000000000..c4d7e2583b
--- /dev/null
+++ b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch
@@ -0,0 +1,86 @@
+From 8dcd73b45a660dbdc560676835ba46f495334f14 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 13 Jun 2017 18:10:06 +0300
+Subject: [PATCH] Run installation commands as shell jobs
+
+This greatly speeds up installation time on multi-core systems.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/fullcolor/Makefile.am | 3 ++-
+ src/spinner/Makefile.am | 5 +++--
+ src/symbolic/Makefile.am | 7 ++++---
+ 3 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/src/fullcolor/Makefile.am b/src/fullcolor/Makefile.am
+index 1c940a5..3998ee6 100644
+--- a/src/fullcolor/Makefile.am
++++ b/src/fullcolor/Makefile.am
+@@ -9,9 +9,10 @@ install-data-local:
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/$$size && find . -name "*.png"`; do \
+ context="`dirname $$file`"; \
+ $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+- $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
++ $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \
+ done; \
+- done;
++ done; \
++ wait
+
+ ## FIXME we should add a way to remove links generated by icon mapping
+ uninstall-local:
+diff --git a/src/spinner/Makefile.am b/src/spinner/Makefile.am
+index 86f4d7c..3fae8c1 100644
+--- a/src/spinner/Makefile.am
++++ b/src/spinner/Makefile.am
+@@ -24,13 +24,14 @@ install-data-local:
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/$$size; find . -name "*.png"`; do \
+ context="`dirname $$file`"; \
+ $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+- $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
++ $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \
+ done; \
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32; find . -name "*.svg"`; do \
+ context="`dirname $$file`"; \
+ $(mkdir_p) $(DESTDIR)$(themedir)/scalable-up-to-32/$$context; \
+- $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file; \
++ $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file & \
+- done
++ done; \
++ wait
+
+ uninstall-local:
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32; find . -name "*.svg"`; do \
+diff --git a/src/symbolic/Makefile.am b/src/symbolic/Makefile.am
+index 24aac9b..61ba071 100644
+--- a/src/symbolic/Makefile.am
++++ b/src/symbolic/Makefile.am
+@@ -25,18 +25,19 @@ install-data-local:
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/$$size; find . -name "*.png"`; do \
+ context="`dirname $$file`"; \
+ $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+- $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
++ $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \
+ done; \
+- done
++ done; \
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \
+ context="`dirname $$file`"; \
+ $(mkdir_p) $(DESTDIR)$(themedir)/scalable/$$context; \
+- $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $(DESTDIR)$(themedir)/scalable/$$file; \
++ $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $(DESTDIR)$(themedir)/scalable/$$file & \
+ for size in $(symbolic_encode_sizes); do \
+ $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+- $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context; \
++ $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context & \
+ done \
+- done
++ done; \
++ wait
+
+ uninstall-local:
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \
+--
+2.11.0
+
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.20.bb b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.20.bb
deleted file mode 100644
index bb0eaebdce..0000000000
--- a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.20.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "GTK+ icon theme"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome"
-
-LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
-
-inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
-
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- "
-
-SRC_URI[md5sum] = "411be2bd68dd8b0a3c86aca2eb351ce4"
-SRC_URI[sha256sum] = "7a0a887349f340dd644032f89d81264b694c4b006bd51af1c2c368d431e7ae35"
-
-do_install_append() {
- # Build uses gtk-encode-symbolic-svg to create png versions:
- # no need to store the svgs anymore.
- rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
- ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
-}
-
-PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}"
-
-RREPLACES_${PN} = "gnome-icon-theme"
-RCONFLICTS_${PN} = "gnome-icon-theme"
-RPROVIDES_${PN} = "gnome-icon-theme"
-
-FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
-FILES_${PN}-symbolic-hires = "${prefix}/share/icons/Adwaita/96x96/*/*.symbolic.png \
- ${prefix}/share/icons/Adwaita/64x64/*/*.symbolic.png \
- ${prefix}/share/icons/Adwaita/48x48/*/*.symbolic.png \
- ${prefix}/share/icons/Adwaita/32x32/*/*.symbolic.png"
-FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/16x16/*/*.symbolic.png \
- ${prefix}/share/icons/Adwaita/24x24/*/*.symbolic.png"
-FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/"
-FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
- ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb
new file mode 100644
index 0000000000..3a2727b701
--- /dev/null
+++ b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb
@@ -0,0 +1,41 @@
+SUMMARY = "GTK+ icon theme"
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/adwaita-icon-theme"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/adwaita-icon-theme/issues"
+SECTION = "x11/gnome"
+
+LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
+
+inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://0001-Don-t-use-AC_CANONICAL_HOST.patch \
+ file://0001-Run-installation-commands-as-shell-jobs.patch \
+ "
+
+SRC_URI[md5sum] = "9aea4ad9bc002aacad155ee0748b357f"
+SRC_URI[sha256sum] = "e7c2d8c259125d5f35ec09522b88c8fe7ecf625224ab0811213ef0a95d90b908"
+
+DEPENDS += "librsvg-native"
+
+PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}"
+
+RREPLACES_${PN} = "gnome-icon-theme"
+RCONFLICTS_${PN} = "gnome-icon-theme"
+RPROVIDES_${PN} = "gnome-icon-theme"
+
+FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
+FILES_${PN}-symbolic-hires = "${prefix}/share/icons/Adwaita/96x96/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/64x64/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/48x48/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/32x32/*/*.symbolic.png"
+FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/16x16/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/24x24/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/scalable/*/*-symbolic*.svg"
+FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/ \
+ ${prefix}/share/icons/Adwaita/512x512/"
+FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
+ ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-gnome/gnome/gconf/create_config_directory.patch b/meta/recipes-gnome/gnome/gconf/create_config_directory.patch
new file mode 100644
index 0000000000..cd72e739b0
--- /dev/null
+++ b/meta/recipes-gnome/gnome/gconf/create_config_directory.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+In some circumstances, gconf isn't able to save configurations
+because ~/.config folder aka root_dir doesn't exist.
+This issue was not seen before because ~/.config directory is shared
+between several packages and one of those packages usually creates it
+by the time gconf wants to use it.
+
+This patch makes sure that gconf creates the .config directory if it
+doesn't exist, along with the gconf directory inside it.
+
+Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
+Signed-off-by: Alejandro Hernandez <alejandr@xilinx.com>
+
+
+Index: GConf-3.2.6/backends/markup-backend.c
+===================================================================
+--- GConf-3.2.6.orig/backends/markup-backend.c
++++ GConf-3.2.6/backends/markup-backend.c
+@@ -276,7 +276,7 @@ resolve_address (const char *address,
+ /* dir_mode without search bits */
+ file_mode = dir_mode & (~0111);
+ }
+- else if (g_mkdir (root_dir, dir_mode) < 0)
++ else if (g_mkdir_with_parents (root_dir, dir_mode) < 0)
+ {
+ /* Error out even on EEXIST - shouldn't happen anyway */
+ gconf_set_error (err, GCONF_ERROR_FAILED,
diff --git a/meta/recipes-gnome/gnome/gconf_3.2.6.bb b/meta/recipes-gnome/gnome/gconf_3.2.6.bb
index 9e9f714282..b8466d4833 100644
--- a/meta/recipes-gnome/gnome/gconf_3.2.6.bb
+++ b/meta/recipes-gnome/gnome/gconf_3.2.6.bb
@@ -1,5 +1,9 @@
SUMMARY = "GNOME configuration system"
+DESCRIPTION = "GConf is a system for storing application preferences. \
+It is intended for user preferences; not configuration of something like \
+Apache, or arbitrary data storage."
SECTION = "x11/gnome"
+HOMEPAGE = "https://projects.gnome.org/gconf/"
LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
@@ -10,6 +14,7 @@ inherit gnomebase gtk-doc gettext gobject-introspection gio-module-cache
SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.xz;name=archive \
file://remove_plus_from_invalid_characters_list.patch \
file://unable-connect-dbus.patch \
+ file://create_config_directory.patch \
"
SRC_URI[archive.md5sum] = "2b16996d0e4b112856ee5c59130e822c"
@@ -20,13 +25,11 @@ S = "${WORKDIR}/GConf-${PV}"
EXTRA_OECONF = "--enable-shared --disable-static \
--disable-orbit --with-openldap=no --disable-gtk"
-# Disable PolicyKit by default
-PACKAGECONFIG ??= ""
-# We really don't want PolicyKit for native or uclibc
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)}"
+# We really don't want Polkit for native
PACKAGECONFIG_class-native = ""
-PACKAGECONFIG_libc-uclibc = ""
-PACKAGECONFIG[policykit] = "--enable-defaults-service,--disable-defaults-service,polkit"
+PACKAGECONFIG[polkit] = "--enable-defaults-service,--disable-defaults-service,polkit"
PACKAGECONFIG[debug] = "--enable-debug=yes, --enable-debug=minimum"
do_install_append() {
diff --git a/meta/recipes-gnome/gnome/gnome-common_3.18.0.bb b/meta/recipes-gnome/gnome/gnome-common_3.18.0.bb
deleted file mode 100644
index 06f3bb34cf..0000000000
--- a/meta/recipes-gnome/gnome/gnome-common_3.18.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Common macros for building GNOME applications"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SECTION = "x11/gnome"
-inherit gnomebase allarch
-
-SRC_URI[archive.md5sum] = "933258d9c23e218eb6eec9cc1951b053"
-SRC_URI[archive.sha256sum] = "22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf"
-
-EXTRA_AUTORECONF = ""
-DEPENDS = ""
-
-FILES_${PN} += "${datadir}/aclocal"
-FILES_${PN}-dev = ""
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-gnome/gnome/gnome-doc-utils/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch b/meta/recipes-gnome/gnome/gnome-doc-utils/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch
deleted file mode 100644
index 4cfcabd385..0000000000
--- a/meta/recipes-gnome/gnome/gnome-doc-utils/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 426e38468463a4abb495cf6a269b9635b2107519 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 17 May 2016 13:51:24 +0300
-Subject: [PATCH] glib-gettext.m4: Update AM_GLIB_GNU_GETTEXT to match glib
-
-This avoids
- error: m4_copy: won't overwrite defined macro: glib_DEFUN
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Inappropriate [No upstream]
----
- m4/glib-gettext.m4 | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/m4/glib-gettext.m4 b/m4/glib-gettext.m4
-index 81f8fd2..e2b142b 100644
---- a/m4/glib-gettext.m4
-+++ b/m4/glib-gettext.m4
-@@ -310,7 +310,7 @@ msgstr ""
- # on various variables needed by the Makefile.in.in installed by
- # glib-gettextize.
- dnl
--glib_DEFUN([GLIB_GNU_GETTEXT],
-+AU_DEFUN([GLIB_GNU_GETTEXT],
- [AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
-
-@@ -381,7 +381,8 @@ glib_DEFUN([GLIB_GNU_GETTEXT],
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
-- ])
-+ ]
-+ [[$0: This macro is deprecated. You should use upstream gettext instead.]])
-
- # AX_GLIB_DEFINE_LOCALEDIR(VARIABLE)
- # -------------------------------
---
-2.1.4
-
diff --git a/meta/recipes-gnome/gnome/gnome-themes-standard_3.20.2.bb b/meta/recipes-gnome/gnome/gnome-themes-standard_3.20.2.bb
deleted file mode 100644
index c98d8702c1..0000000000
--- a/meta/recipes-gnome/gnome/gnome-themes-standard_3.20.2.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "GTK+2 standard themes"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/gnome-themes-standard/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome"
-
-LICENSE = "LGPL-2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-inherit autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even distro_features_check
-
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-DEPENDS += "intltool-native gtk+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- "
-
-SRC_URI[md5sum] = "adc3b1d57330561fea524842d0c0b485"
-SRC_URI[sha256sum] = "9d0d9c4b2c9f9008301c3c1878ebb95859a735b7fd4a6a518802b9637e4a7915"
-
-EXTRA_OECONF = "--disable-gtk3-engine"
-
-do_install_append() {
- # Only building Adwaita, remove highcontrast files
- rm -rf ${D}${prefix}/share/themes/HighContrast \
- ${D}${prefix}/share/icons
-}
-
-# There could be gnome-theme-highcontrast as well but that requires
-# gtk+3 and includes lots of icons (is also broken with B != S).
-PACKAGES += "gnome-theme-adwaita \
- gnome-theme-adwaita-dbg \
- gnome-theme-adwaita-dev"
-
-FILES_gnome-theme-adwaita = "${prefix}/share/themes/Adwaita \
- ${libdir}/gtk-2.0/2.10.0/engines/libadwaita.so"
-FILES_gnome-theme-adwaita-dev = "${libdir}/gtk-2.0/2.10.0/engines/libadwaita.la"
-FILES_gnome-theme-adwaita-dbg = "${libdir}/gtk-2.0/2.10.0/engines/.debug/libadwaita.so"
diff --git a/meta/recipes-gnome/gnome/libart-lgpl/libart_lgpl-2.3.21-crosscompile.patch b/meta/recipes-gnome/gnome/libart-lgpl/libart_lgpl-2.3.21-crosscompile.patch
deleted file mode 100644
index 0261f58c90..0000000000
--- a/meta/recipes-gnome/gnome/libart-lgpl/libart_lgpl-2.3.21-crosscompile.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Taken from portage
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-From e1443c945a4cf67096d8c27721aadd7368382b3f Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Tue, 6 Apr 2010 15:22:25 +0200
-Subject: [PATCH 2/2] gentoo: use ISO types for fixed type size
-
----
- Makefile.am | 11 ++---------
- art_config.h | 5 +++++
- configure.in | 10 ----------
- 3 files changed, 7 insertions(+), 19 deletions(-)
- create mode 100644 art_config.h
-
-diff --git a/Makefile.am b/Makefile.am
-index 95952da..6aa2fe3 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,13 +2,6 @@ check_PROGRAMS = testart testuta
-
- bin_SCRIPTS = \
- libart2-config
--
--noinst_SCRIPTS = gen_art_config.sh
--
--BUILT_SOURCES = art_config.h
--
--art_config.h:
-- ./gen_art_config.sh > art_config.h
-
- EXTRA_DIST = \
- libart.def \
-@@ -173,5 +166,5 @@ install-data-local: install-ms-lib install-libtool-import-lib
-
- uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
-
--CLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS)
--DISTCLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS)
-+CLEANFILES = $(bin_SCRIPTS)
-+DISTCLEANFILES = $(bin_SCRIPTS)
-diff --git a/art_config.h b/art_config.h
-new file mode 100644
-index 0000000..5985f1f
---- a/art_config.h
-+++ b/art_config.h
-@@ -0,0 +1,5 @@
-+#include <stdint.h>
-+
-+typedef uint8_t art_u8;
-+typedef uint16_t art_u16;
-+typedef uint32_t art_u32;
-diff --git a/configure.in b/configure.in
-index e4804f7..ddcac4f 100644
---- a/configure.in
-+++ b/configure.in
-@@ -92,15 +92,6 @@ AC_FUNC_ALLOCA
-
- AC_C_BIGENDIAN
-
--AC_CHECK_SIZEOF(char)
--AC_SUBST(ART_SIZEOF_CHAR, $ac_cv_sizeof_char)
--AC_CHECK_SIZEOF(short)
--AC_SUBST(ART_SIZEOF_SHORT, $ac_cv_sizeof_short)
--AC_CHECK_SIZEOF(int)
--AC_SUBST(ART_SIZEOF_INT, $ac_cv_sizeof_int)
--AC_CHECK_SIZEOF(long)
--AC_SUBST(ART_SIZEOF_LONG, $ac_cv_sizeof_long)
--
- AC_CONFIG_FILES([
- libart-features.h
- Makefile
-@@ -109,6 +100,5 @@ libart-2.0-uninstalled.pc
- libart-zip])
-
- AC_CONFIG_FILES([libart-config],[chmod +x libart-config])
--AC_CONFIG_FILES([gen_art_config.sh],[chmod +x gen_art_config.sh])
-
- AC_OUTPUT
---
-1.7.0.4
-
diff --git a/meta/recipes-gnome/gnome/libart-lgpl_2.3.21.bb b/meta/recipes-gnome/gnome/libart-lgpl_2.3.21.bb
deleted file mode 100644
index 95581b297c..0000000000
--- a/meta/recipes-gnome/gnome/libart-lgpl_2.3.21.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Library of functions for 2D graphics"
-SECTION = "x11/gnome"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-PR = "r2"
-
-# can't use gnome.oeclass due to _ in filename
-SRC_URI = "${GNOME_MIRROR}/libart_lgpl/2.3/libart_lgpl-${PV}.tar.bz2 \
- file://libart_lgpl-2.3.21-crosscompile.patch \
- "
-
-SRC_URI[md5sum] = "08559ff3c67fd95d57b0c5e91a6b4302"
-SRC_URI[sha256sum] = "fdc11e74c10fc9ffe4188537e2b370c0abacca7d89021d4d303afdf7fd7476fa"
-
-inherit autotools pkgconfig
-
-DEPENDS = ""
-
-FILES_${PN} = "${libdir}/*.so.*"
-FILES_${PN}-dev += "${bindir}/libart2-config"
-
-S = "${WORKDIR}/libart_lgpl-${PV}"
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch
new file mode 100644
index 0000000000..9e1f79e881
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch
@@ -0,0 +1,50 @@
+From 59d2cbb54c012b25adeb965a94b6585d911a4539 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Wed, 20 Nov 2019 09:03:47 -0600
+Subject: [PATCH] Fix build reproducibility
+
+ba744068 ("Make meson.override_find_program working on more complex use
+cases") made the build no longer reproducible by encoding a build system
+path into the output. This shouldn't be necessary anyway, since it
+should be possible to add new paths to search for gir files by setting
+the XDG_DATA_DIR environment variable.
+
+Closes #318
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/192]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ girepository/girparser.c | 4 ----
+ meson.build | 1 -
+ 2 files changed, 5 deletions(-)
+
+diff --git a/girepository/girparser.c b/girepository/girparser.c
+index fb47e75c..53450baf 100644
+--- a/girepository/girparser.c
++++ b/girepository/girparser.c
+@@ -309,10 +309,6 @@ locate_gir (GIrParser *parser,
+ if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+ return path;
+ g_free (path);
+- path = g_build_filename (UNINSTALLED_GIR_DIR, girname, NULL);
+- if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+- return path;
+- g_free (path);
+ return NULL;
+ }
+
+diff --git a/meson.build b/meson.build
+index d6231c5f..2f248579 100644
+--- a/meson.build
++++ b/meson.build
+@@ -90,7 +90,6 @@ endif
+ girdir = join_paths(gir_dir_prefix, 'gir-1.0')
+ config.set_quoted('GIR_DIR', girdir)
+ config.set_quoted('GOBJECT_INTROSPECTION_LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
+-config.set_quoted('UNINSTALLED_GIR_DIR', join_paths(meson.current_build_dir(), 'gir'))
+
+ foreach type : ['char', 'short', 'int', 'long']
+ size = cc.sizeof(type)
+--
+2.23.0
+
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch
new file mode 100644
index 0000000000..639f9c8f61
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch
@@ -0,0 +1,163 @@
+From 0417a1bb08745f2bf5310d20b342c2b3b9b212d3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 15 Nov 2018 15:10:05 +0100
+Subject: [PATCH] Port cross-compilation support to meson
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ gir/meson.build | 62 ++++++++++++++++++++++++++++++++++-------------
+ meson.build | 4 ++-
+ meson_options.txt | 20 +++++++++++++++
+ 3 files changed, 68 insertions(+), 18 deletions(-)
+
+diff --git a/gir/meson.build b/gir/meson.build
+index c312100..a028033 100644
+--- a/gir/meson.build
++++ b/gir/meson.build
+@@ -41,16 +41,29 @@ gir_files = [
+ typelibdir = join_paths(get_option('libdir'), 'girepository-1.0')
+ install_data(gir_files, install_dir: girdir)
+
+-scanner_command = [
+- python,
+- girscanner,
+- '--output=@OUTPUT@',
+- '--no-libtool',
+- '--quiet',
+- '--reparse-validate',
+- '--add-include-path', join_paths(meson.current_build_dir()),
+- '--add-include-path', join_paths(meson.current_source_dir()),
+-]
++if get_option('enable-host-gi')
++ scanner_command = [
++ 'g-ir-scanner',
++ '--output=@OUTPUT@',
++ '--no-libtool',
++ '--quiet',
++ '--reparse-validate',
++ '--add-include-path', join_paths(meson.current_build_dir()),
++ '--add-include-path', join_paths(meson.current_source_dir()),
++ ]
++else
++ scanner_command = [
++ python,
++ girscanner,
++ '--output=@OUTPUT@',
++ '--no-libtool',
++ '--quiet',
++ '--reparse-validate',
++ '--add-include-path', join_paths(meson.current_build_dir()),
++ '--add-include-path', join_paths(meson.current_source_dir()),
++ ]
++endif
++
+
+ dep_type = glib_dep.type_name()
+ if dep_type == 'internal'
+@@ -63,6 +76,12 @@ if dep_type == 'internal'
+ '--extra-library=glib-2.0', '--extra-library=gobject-2.0']
+ endif
+
++if get_option('enable-gi-cross-wrapper') != ''
++ scanner_command += ['--use-binary-wrapper=' + get_option('enable-gi-cross-wrapper')]
++endif
++if get_option('enable-gi-ldd-wrapper') != ''
++ scanner_command += ['--use-ldd-wrapper=' + get_option('enable-gi-ldd-wrapper')]
++endif
+ # Take a glob and print to newlines
+ globber = '''
+ from glob import glob
+@@ -89,8 +108,8 @@ glib_command = scanner_command + [
+
+ if dep_type == 'pkgconfig'
+ glib_command += ['--external-library', '--pkg=glib-2.0']
+- glib_libdir = glib_dep.get_pkgconfig_variable('libdir')
+- glib_incdir = join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0')
++ glib_libdir = get_option('pkgconfig-sysroot-path') + glib_dep.get_pkgconfig_variable('libdir')
++ glib_incdir = get_option('pkgconfig-sysroot-path') + join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0')
+ glib_libincdir = join_paths(glib_libdir, 'glib-2.0', 'include')
+ glib_files += join_paths(glib_incdir, 'gobject', 'glib-types.h')
+ glib_files += join_paths(glib_libincdir, 'glibconfig.h')
+@@ -345,7 +364,7 @@ if giounix_dep.found()
+ dep_type = giounix_dep.type_name()
+ if dep_type == 'pkgconfig'
+ gio_command += ['--pkg=gio-unix-2.0']
+- giounix_includedir = join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0')
++ giounix_includedir = get_option('pkgconfig-sysroot-path') + join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0')
+ # Get the installed gio-unix header list
+ ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h')))
+ if ret.returncode() != 0
+@@ -428,15 +447,24 @@ gir_files += custom_target('gir-girepository',
+ )
+
+ typelibs = []
++if get_option('enable-gi-cross-wrapper') != ''
++ gircompiler_command = [get_option('enable-gi-cross-wrapper'), gircompiler.full_path(), '-o', '@OUTPUT@', '@INPUT@',
++ '--includedir', meson.current_build_dir(),
++ '--includedir', meson.current_source_dir(),
++ ]
++else
++ gircompiler_command = [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
++ '--includedir', meson.current_build_dir(),
++ '--includedir', meson.current_source_dir(),
++ ]
++endif
++
+ foreach gir : gir_files
+ typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(),
+ input: gir,
+ output: '@BASENAME@.typelib',
+ depends: [gobject_gir, ],
+- command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
+- '--includedir', meson.current_build_dir(),
+- '--includedir', meson.current_source_dir(),
+- ],
++ command: gircompiler_command,
+ install: true,
+ install_dir: typelibdir,
+ )
+diff --git a/meson.build b/meson.build
+index a5e825f..a28490a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -168,7 +168,9 @@ endif
+ subdir('girepository')
+ subdir('tools')
+ subdir('giscanner')
+-subdir('gir')
++if get_option('enable-introspection-data') == true
++ subdir('gir')
++endif
+ subdir('examples')
+ subdir('docs')
+ subdir('tests')
+diff --git a/meson_options.txt b/meson_options.txt
+index 445a68a..a325511 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -25,3 +25,23 @@ option('python', type: 'string', value: 'python3',
+ option('gir_dir_prefix', type: 'string',
+ description: 'Intermediate prefix for gir installation under ${prefix}'
+ )
++
++option('enable-host-gi', type: 'boolean', value : false,
++ description: 'Use gobject introspection tools installed in the host system (useful when cross-compiling)'
++)
++
++option('enable-gi-cross-wrapper', type: 'string',
++ description: 'Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)'
++)
++
++option('enable-gi-ldd-wrapper', type: 'string',
++ description: 'Use a ldd wrapper instead of system ldd command in giscanner (useful when cross-compiling)'
++)
++
++option('enable-introspection-data', type: 'boolean', value : true,
++ description: 'Build introspection data (.gir and .typelib files) in addition to library and tools'
++)
++
++option('pkgconfig-sysroot-path', type: 'string',
++ description: 'Specify a sysroot path to prepend to pkgconfig output (useful when cross-compiling)'
++)
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch
new file mode 100644
index 0000000000..a15401aeb2
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch
@@ -0,0 +1,76 @@
+From 673623851fb70c0e43cf79cef67b3751432ebe72 Mon Sep 17 00:00:00 2001
+From: Sascha Silbe <x-yo17@se-silbe.de>
+Date: Fri, 8 Jun 2018 13:55:10 +0200
+Subject: [PATCH] Relocate the repository directory for native builds
+
+Instead of hard-coding GOBJECT_INTROSPECTION_LIBDIR when
+gobject-introspection is built, use dladdr() to determine where
+GOBJECT_INTROSPECTION_LIBDIR is and use that path to calculate the
+repository directory.
+
+This fixes gobject-introspection-native accessing paths across build
+directories (e.g. if the build directories use the same shared state
+cache or sstate mirror).
+
+Upstream-Status: Inappropriate
+Signed-off-by: Sascha Silbe <x-yo17@se-silbe.de>
+
+---
+ girepository/girepository.c | 15 +++++++++++++--
+ girepository/meson.build | 2 +-
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/girepository/girepository.c b/girepository/girepository.c
+index ca5dc2b..7a4d17f 100644
+--- a/girepository/girepository.c
++++ b/girepository/girepository.c
+@@ -21,6 +21,8 @@
+ * Boston, MA 02111-1307, USA.
+ */
+
++#define _GNU_SOURCE
++
+ #include "config.h"
+
+ #include <stdio.h>
+@@ -34,6 +36,8 @@
+ #include "gitypelib-internal.h"
+ #include "girepository-private.h"
+
++#include <dlfcn.h>
++
+ /**
+ * SECTION:girepository
+ * @short_description: GObject Introspection repository manager
+@@ -212,9 +216,16 @@ init_globals (void)
+ g_free (custom_dirs);
+ }
+
+- libdir = GOBJECT_INTROSPECTION_LIBDIR;
++ Dl_info gi_lib_info;
+
+- typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL);
++ if (dladdr (g_irepository_get_default, &gi_lib_info)) {
++ char *libdir = g_path_get_dirname (gi_lib_info.dli_fname);
++ typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL);
++ g_free (libdir);
++ } else {
++ libdir = GOBJECT_INTROSPECTION_LIBDIR;
++ typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL);
++ }
+
+ typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir);
+
+diff --git a/girepository/meson.build b/girepository/meson.build
+index 1d7aed6..5637fb5 100644
+--- a/girepository/meson.build
++++ b/girepository/meson.build
+@@ -44,7 +44,7 @@ girepo_internals_lib = static_library('girepository-internals',
+ ],
+ c_args: gi_hidden_visibility_cflags + custom_c_args,
+ include_directories : configinc,
+- dependencies: [girepo_gthash_dep, libffi_dep],
++ dependencies: [girepo_gthash_dep, libffi_dep, cc.find_library('dl')],
+ )
+
+ girepo_internals_dep = declare_dependency(
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
deleted file mode 100644
index 9abaea7e7f..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 3a9d1e5ee0aae56fafec0beba2014c19e4ff310c Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 23 Mar 2016 17:07:28 +0200
-Subject: [PATCH 1/5] Revert an incomplete upstream attempt at cross-compile
- support
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- common.mk | 4 ----
- giscanner/gdumpparser.py | 6 ------
- 2 files changed, 10 deletions(-)
-
-diff --git a/common.mk b/common.mk
-index b778f7a..e26c637 100644
---- a/common.mk
-+++ b/common.mk
-@@ -24,12 +24,8 @@ INTROSPECTION_SCANNER_ARGS = \
- --add-include-path=$(top_builddir) \
- --add-include-path=$(top_builddir)/gir
-
--# GI_CROSS_LAUNCHER is the command to use for executing g-ir-compiler.
--# Normally will be undefined but can be set (e.g. to wine or qemu)
--# when cross-compiling
- INTROSPECTION_COMPILER = \
- env PATH=".libs:$(PATH)" \
-- $(GI_CROSS_LAUNCHER) \
- $(top_builddir)/g-ir-compiler$(EXEEXT)
-
- INTROSPECTION_COMPILER_ARGS = \
-diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
-index 1134f33..9bdc2bc 100644
---- a/giscanner/gdumpparser.py
-+++ b/giscanner/gdumpparser.py
-@@ -162,12 +162,6 @@ blob containing data gleaned from GObject's primitive introspection."""
- out_path = os.path.join(self._binary.tmpdir, 'dump.xml')
-
- args = []
--
-- # Prepend the launcher command and arguments, if defined
-- launcher = os.environ.get('GI_CROSS_LAUNCHER')
-- if launcher:
-- args.extend(launcher.split())
--
- args.extend(self._binary.args)
- args.append('--introspect-dump=%s,%s' % (in_path, out_path))
-
---
-2.7.0
-
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
new file mode 100644
index 0000000000..ddd955354d
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
@@ -0,0 +1,70 @@
+From 6653c28f0b76aad86e26c512b03efcec6d9d9e95 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 3 Jan 2018 17:02:01 +0200
+Subject: [PATCH] giscanner: add a --lib-dirs-envvar option
+
+By default LD_LIBRARY_PATH is set to the list of target library paths;
+this breaks down in cross-compilation environment, as we need to run a
+native emulation wrapper rather than the target binary itself. This patch
+allows exporting those paths to a different environment variable
+which can be picked up and used by the wrapper.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ giscanner/ccompiler.py | 4 ++--
+ giscanner/dumper.py | 3 ++-
+ giscanner/scannermain.py | 3 +++
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
+index 32c9296..3fb262b 100644
+--- a/giscanner/ccompiler.py
++++ b/giscanner/ccompiler.py
+@@ -174,7 +174,7 @@ class CCompiler(object):
+
+ self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
+
+- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths):
++ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar):
+ # An "internal" link is where the library to be introspected
+ # is being built in the current directory.
+
+@@ -184,7 +184,7 @@ class CCompiler(object):
+ if os.name == 'nt':
+ runtime_path_envvar = ['LIB', 'PATH']
+ else:
+- runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH']
++ runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar]
+ # Search the current directory first
+ # (This flag is not supported nor needed for Visual C++)
+ args.append('-L.')
+diff --git a/giscanner/dumper.py b/giscanner/dumper.py
+index 2b851a5..10a7c39 100644
+--- a/giscanner/dumper.py
++++ b/giscanner/dumper.py
+@@ -244,7 +244,8 @@ class DumpCompiler(object):
+ libtool,
+ self._options.libraries,
+ self._options.extra_libraries,
+- self._options.library_paths)
++ self._options.library_paths,
++ self._options.lib_dirs_envvar)
+ args.extend(pkg_config_libs)
+
+ else:
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 9013562..9c9fe12 100644
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -126,6 +126,9 @@ def _get_option_parser():
+ parser.add_option("", "--use-ldd-wrapper",
+ action="store", dest="ldd_wrapper", default=None,
+ help="wrapper to use instead of ldd (useful when cross-compiling)")
++ parser.add_option("", "--lib-dirs-envvar",
++ action="store", dest="lib_dirs_envvar", default=None,
++ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH")
+ parser.add_option("", "--program-arg",
+ action="append", dest="program_args", default=[],
+ help="extra arguments to program")
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch
new file mode 100644
index 0000000000..b484b5e9e6
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch
@@ -0,0 +1,28 @@
+From f742da8b3913f4818d3f419117076afe62f4dbf4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 5 Sep 2018 16:46:52 +0200
+Subject: [PATCH] giscanner: ignore error return codes from ldd-wrapper
+
+prelink-rtld, which we use instead of ldd returns 127 when it can't find a library.
+It is not an error per se, but it breaks subprocess.check_output().
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ giscanner/shlibs.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
+index d67df95..80352a6 100644
+--- a/giscanner/shlibs.py
++++ b/giscanner/shlibs.py
+@@ -102,7 +102,7 @@ def _resolve_non_libtool(options, binary, libraries):
+ args.extend(['otool', '-L', binary.args[0]])
+ else:
+ args.extend(['ldd', binary.args[0]])
+- output = subprocess.check_output(args)
++ output = subprocess.run(args, check=False, stdout=subprocess.PIPE).stdout
+ if isinstance(output, bytes):
+ output = output.decode("utf-8", "replace")
+
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch
new file mode 100644
index 0000000000..c4951b22bb
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch
@@ -0,0 +1,26 @@
+From 2c384187cc22113c0c9b1cd233948118f7c085ef Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 25 Mar 2019 13:28:48 +0100
+Subject: [PATCH] meson.build: disable tests when cross-compiling
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/64]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 2544ff3..4c16fe5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -168,7 +168,9 @@ if get_option('enable-introspection-data') == true
+ endif
+ subdir('examples')
+ subdir('docs')
+-subdir('tests')
++if not meson.is_cross_build()
++ subdir('tests')
++endif
+
+ install_data('Makefile.introspection', install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'))
+ install_data('m4/introspection.m4', install_dir: join_paths(get_option('datadir'), 'aclocal'))
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
deleted file mode 100644
index 48a0c85f02..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-From b1503fe2693d602b3e24e4b832dc0934960d5d22 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 19 Oct 2015 18:29:21 +0300
-Subject: [PATCH 2/5] configure.ac: add host-gi, gi-cross-wrapper,
- gi-ldd-wrapper and introspection-data options
-
-With the first option, gobject-introspection tools (g-ir-doc-tool and g-ir-scanner)
-that are already installed in the host system will be used for building the source tree.
-
-With the second option, g-ir-scanner will be instructed to use an executable
-wrapper to run binaries it's producing, and g-ir-compiler will be run
-through the same wrapper (host system's g-ir-compiler cannot be used because
-it's producing architecture-specific output).
-
-With the third option, giscanner will be instructed to use a special ldd
-command instead of system's ldd (which does not work when the binary to inspect
-is compiled for a different architecture).
-
-With the fourth option, it is possible to disable building of introspection data
-(.gir and .typelib files), which may be difficult or impossible in cross-compilation
-environments, because of lack of emulation (or native hardware) for the target architecture
-on which the target binaries can be run.
-
-These options are useful when cross-compiling for a different target architecture.
-
-Upstream-Status: Pending [review on oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Makefile.am | 2 ++
- common.mk | 39 +++++++++++++++++++++++++++++++++++++++
- configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++
- tests/Makefile.am | 5 ++++-
- 4 files changed, 87 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index b080a89..ce8d29b 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -21,7 +21,9 @@ include Makefile-cmph.am
- include Makefile-girepository.am
- include Makefile-giscanner.am
- include Makefile-examples.am
-+if BUILD_INTROSPECTION_DATA
- include Makefile-gir.am
-+endif
- include Makefile-tools.am
- include Makefile-msvcproj.am
-
-diff --git a/common.mk b/common.mk
-index e26c637..9f3a65f 100644
---- a/common.mk
-+++ b/common.mk
-@@ -6,6 +6,15 @@
- # module itself.
- #
-
-+if USE_HOST_GI
-+INTROSPECTION_SCANNER = \
-+ env PATH="$(PATH)" \
-+ LPATH=.libs \
-+ CC="$(CC)" \
-+ PYTHONPATH=$(top_builddir):$(top_srcdir) \
-+ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
-+ g-ir-scanner
-+else
- INTROSPECTION_SCANNER = \
- env PATH=".libs:$(PATH)" \
- LPATH=.libs \
-@@ -14,9 +23,24 @@ INTROSPECTION_SCANNER = \
- UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
- UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
- $(top_builddir)/g-ir-scanner
-+endif
-+
-+if USE_CROSS_WRAPPER
-+CROSS_WRAPPER_ARG = --use-binary-wrapper=$(GI_CROSS_WRAPPER)
-+else
-+CROSS_WRAPPER_ARG =
-+endif
-+
-+if USE_LDD_WRAPPER
-+LDD_WRAPPER_ARG = --use-ldd-wrapper=$(GI_LDD_WRAPPER)
-+else
-+LDD_WRAPPER_ARG =
-+endif
-
- INTROSPECTION_SCANNER_ARGS = \
- --verbose \
-+ $(CROSS_WRAPPER_ARG) \
-+ $(LDD_WRAPPER_ARG) \
- -I$(top_srcdir) \
- --add-include-path=$(srcdir) \
- --add-include-path=$(top_srcdir)/gir \
-@@ -24,9 +48,15 @@ INTROSPECTION_SCANNER_ARGS = \
- --add-include-path=$(top_builddir) \
- --add-include-path=$(top_builddir)/gir
-
-+if USE_CROSS_WRAPPER
-+INTROSPECTION_COMPILER = \
-+ env PATH=".libs:$(PATH)" \
-+ $(GI_CROSS_WRAPPER) $(top_builddir)/.libs/g-ir-compiler$(EXEEXT)
-+else
- INTROSPECTION_COMPILER = \
- env PATH=".libs:$(PATH)" \
- $(top_builddir)/g-ir-compiler$(EXEEXT)
-+endif
-
- INTROSPECTION_COMPILER_ARGS = \
- --includedir=$(srcdir) \
-@@ -35,6 +65,14 @@ INTROSPECTION_COMPILER_ARGS = \
- --includedir=$(top_builddir) \
- --includedir=$(top_builddir)/gir
-
-+if USE_HOST_GI
-+INTROSPECTION_DOCTOOL = \
-+ env PATH="$(PATH)" \
-+ LPATH=.libs \
-+ PYTHONPATH=$(top_builddir):$(top_srcdir) \
-+ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
-+ g-ir-doc-tool
-+else
- INTROSPECTION_DOCTOOL = \
- env PATH=".libs:$(PATH)" \
- LPATH=.libs \
-@@ -42,6 +80,7 @@ INTROSPECTION_DOCTOOL = \
- UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
- UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
- $(top_builddir)/g-ir-doc-tool
-+endif
-
- INTROSPECTION_DOCTOOL_ARGS = \
- --add-include-path=$(srcdir) \
-diff --git a/configure.ac b/configure.ac
-index 6c91fa5..21340a5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -360,6 +360,48 @@ fi
-
- AC_SUBST(EXTRA_LINK_FLAGS)
-
-+AC_ARG_ENABLE([host-gi],
-+[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])],
-+[case "${enableval}" in
-+ yes) host_gi=true ;;
-+ no) host_gi=false ;;
-+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-host-gi]) ;;
-+esac],[host_gi=false])
-+AM_CONDITIONAL([USE_HOST_GI], [test x$host_gi = xtrue])
-+
-+AC_ARG_ENABLE([gi-cross-wrapper],
-+[AS_HELP_STRING([--enable-gi-cross-wrapper=path],[Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)])],
-+[
-+GI_CROSS_WRAPPER="${enableval}"
-+use_wrapper=true
-+],[
-+GI_CROSS_WRAPPER=""
-+use_wrapper=false
-+])
-+AC_SUBST(GI_CROSS_WRAPPER)
-+AM_CONDITIONAL([USE_CROSS_WRAPPER], [test x$use_wrapper = xtrue])
-+
-+AC_ARG_ENABLE([gi-ldd-wrapper],
-+[AS_HELP_STRING([--enable-gi-ldd-wrapper=path],[Use a ldd wrapper instead of system's ldd command in giscanner (useful when cross-compiling)])],
-+[
-+GI_LDD_WRAPPER="${enableval}"
-+use_ldd_wrapper=true
-+],[
-+GI_LDD_WRAPPER=""
-+use_ldd_wrapper=false
-+])
-+AC_SUBST(GI_LDD_WRAPPER)
-+AM_CONDITIONAL([USE_LDD_WRAPPER], [test x$use_ldd_wrapper = xtrue])
-+
-+AC_ARG_ENABLE([introspection-data],
-+[AS_HELP_STRING([--enable-introspection-data],[Build introspection data (.gir and .typelib files) in addition to library and tools])],
-+[case "${enableval}" in
-+ yes) introspection_data=true ;;
-+ no) introspection_data=false ;;
-+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-introspection-data]) ;;
-+esac],[introspection_data=true])
-+AM_CONDITIONAL([BUILD_INTROSPECTION_DATA], [test x$introspection_data = xtrue])
-+
- AC_CONFIG_FILES([
- Makefile
- tests/Makefile
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index bdd0fa7..75dd3c9 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -1,6 +1,9 @@
- include $(top_srcdir)/common.mk
-
--SUBDIRS = . scanner repository offsets warn
-+SUBDIRS = . scanner repository warn
-+if BUILD_INTROSPECTION_DATA
-+SUBDIRS += offsets
-+endif
-
- EXTRA_DIST=
- BUILT_SOURCES=
---
-2.7.0
-
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
index f21eaca855..b954dcebd8 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
@@ -1,7 +1,7 @@
-From 704b888d0abfb01067352c40156f49f655691c7c Mon Sep 17 00:00:00 2001
+From 5f985fd8a24764ccb38af6335d4584d7e33fc3a1 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 19 Oct 2015 18:26:40 +0300
-Subject: [PATCH 3/5] giscanner: add --use-binary-wrapper option
+Subject: [PATCH] giscanner: add --use-binary-wrapper option
With this option, giscanner will use a wrapper executable to run
binaries it's producing, instead of running them directly. This
@@ -10,15 +10,16 @@ but they can be run using for example QEMU emulation.
Upstream-Status: Pending [review on oe-core list]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
giscanner/scannermain.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
-index 633496f..d684cd0 100755
+index c004fb1..0b6a2d2 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
-@@ -124,6 +124,9 @@ def _get_option_parser():
+@@ -120,6 +120,9 @@ def _get_option_parser():
parser.add_option("", "--program",
action="store", dest="program", default=None,
help="program to execute")
@@ -28,7 +29,7 @@ index 633496f..d684cd0 100755
parser.add_option("", "--program-arg",
action="append", dest="program_args", default=[],
help="extra arguments to program")
-@@ -419,6 +422,17 @@ def create_binary(transformer, options, args):
+@@ -417,6 +420,17 @@ def create_binary(transformer, options, args):
gdump_parser.get_error_quark_functions())
shlibs = resolve_shlibs(options, binary, options.libraries)
@@ -46,6 +47,3 @@ index 633496f..d684cd0 100755
gdump_parser.set_introspection_binary(binary)
gdump_parser.parse()
return shlibs
---
-2.7.0
-
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
index afb71e767e..79264ed086 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
@@ -1,23 +1,24 @@
-From d4ad57fd4a32c4f0d2f0522a3090ef940746431b Mon Sep 17 00:00:00 2001
+From cba7807888a4a1f1d630d16c51c89859209334b3 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Oct 2015 16:28:46 +0200
-Subject: [PATCH 4/5] giscanner: add a --use-ldd-wrapper option
+Subject: [PATCH] giscanner: add a --use-ldd-wrapper option
This is useful in cross-compile environments where system's ldd
command does not work on binaries built for a different architecture
Upstream-Status: Pending [review in oe-core]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
giscanner/scannermain.py | 3 +++
giscanner/shlibs.py | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
-index d684cd0..1b3b369 100755
+index 0b6a2d2..9013562 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
-@@ -127,6 +127,9 @@ def _get_option_parser():
+@@ -123,6 +123,9 @@ def _get_option_parser():
parser.add_option("", "--use-binary-wrapper",
action="store", dest="wrapper", default=None,
help="wrapper to use for running programs (useful when cross-compiling)")
@@ -28,10 +29,10 @@ index d684cd0..1b3b369 100755
action="append", dest="program_args", default=[],
help="extra arguments to program")
diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
-index c93d20c..c5b5942 100644
+index 2c61f2f..d67df95 100644
--- a/giscanner/shlibs.py
+++ b/giscanner/shlibs.py
-@@ -105,7 +105,9 @@ def _resolve_non_libtool(options, binary, libraries):
+@@ -96,7 +96,9 @@ def _resolve_non_libtool(options, binary, libraries):
args.extend(libtool)
args.append('--mode=execute')
platform_system = platform.system()
@@ -42,6 +43,3 @@ index c93d20c..c5b5942 100644
args.extend(['otool', '-L', binary.args[0]])
else:
args.extend(['ldd', binary.args[0]])
---
-2.7.0
-
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
index 47a18ec844..26f8da6d41 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
@@ -1,7 +1,7 @@
-From e08b3677dd04d6ec407ba8f74f601b2d51310eff Mon Sep 17 00:00:00 2001
+From 740d91151ffe576e0c08513af9d7bc8133eb9dfb Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 8 Oct 2015 18:30:35 +0300
-Subject: [PATCH 5/5] Prefix pkg-config paths with PKG_CONFIG_SYSROOT_DIR
+Subject: [PATCH] Prefix pkg-config paths with PKG_CONFIG_SYSROOT_DIR
environment variable
This environment variable sets the location of sysroot directory in cross-compilation
@@ -9,65 +9,11 @@ environments; if the variable is not set, the prefix will be empty.
Upstream-Status: Pending [review on oe-core list]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
- Makefile-gir.am | 18 +++++++++---------
- m4/introspection.m4 | 8 ++++----
- 2 files changed, 13 insertions(+), 13 deletions(-)
+ m4/introspection.m4 | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/Makefile-gir.am b/Makefile-gir.am
-index a09260a..ba6e89e 100644
---- a/Makefile-gir.am
-+++ b/Makefile-gir.am
-@@ -55,8 +55,8 @@ else
- endif
-
- # glib
--GLIB_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
--GLIB_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
-+GLIB_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
-+GLIB_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
-
- GLIB_LIBRARY=glib-2.0
-
-@@ -92,8 +92,8 @@ GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT)
- gir/DBusGLib-1.0.typelib: GObject-2.0.gir
-
- # gobject
--GOBJECT_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
--GOBJECT_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
-+GOBJECT_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
-+GOBJECT_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
-
- GOBJECT_LIBRARY=gobject-2.0
-
-@@ -120,8 +120,8 @@ GObject_2_0_gir_FILES = \
- BUILT_GIRSOURCES += GObject-2.0.gir
-
- # gmodule
--GMODULE_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
--GMODULE_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
-+GMODULE_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
-+GMODULE_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
-
- GMODULE_LIBRARY=gmodule-2.0
-
-@@ -146,13 +146,13 @@ GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h \
- BUILT_GIRSOURCES += GModule-2.0.gir
-
- # gio
--GIO_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
--GIO_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
-+GIO_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
-+GIO_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
-
- GIO_LIBRARY=gio-2.0
-
- if HAVE_GIO_UNIX
--GIO_UNIX_INCLUDEDIR = $(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0
-+GIO_UNIX_INCLUDEDIR = $(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0
- GIO_UNIX_HDRS = $(GIO_UNIX_INCLUDEDIR)/gio/*.h
- GIO_UNIX_PACKAGES = gio-unix-2.0
- else
diff --git a/m4/introspection.m4 b/m4/introspection.m4
index d89c3d9..b562266 100644
--- a/m4/introspection.m4
@@ -91,6 +37,3 @@ index d89c3d9..b562266 100644
fi
AC_SUBST(INTROSPECTION_SCANNER)
AC_SUBST(INTROSPECTION_COMPILER)
---
-2.7.0
-
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb
deleted file mode 100644
index abaa485798..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb
+++ /dev/null
@@ -1,173 +0,0 @@
-SUMMARY = "Middleware layer between GObject-using C libraries and language bindings"
-HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "libs"
-LICENSE = "LGPLv2+ & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
- file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
- file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
- file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/1.48/${BPN}-${PV}.tar.xz \
- file://0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch \
- file://0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch \
- file://0003-giscanner-add-use-binary-wrapper-option.patch \
- file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
- file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
- "
-SRC_URI[md5sum] = "01301fa9019667d48e927353e08bc218"
-SRC_URI[sha256sum] = "fa275aaccdbfc91ec0bc9a6fd0562051acdba731e7d584b64a277fec60e75877"
-
-inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even
-BBCLASSEXTEND = "native"
-
-# needed for writing out the qemu wrapper script
-export STAGING_DIR_HOST
-export B
-
-DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native"
-
-# target build needs qemu to run temporary introspection binaries created
-# on the fly by g-ir-scanner and a native version of itself to run
-# native versions of its own tools during build.
-# Also prelink-rtld is used to find out library dependencies of introspection binaries
-# (standard ldd doesn't work when cross-compiling).
-DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
-
-SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir"
-
-do_configure_prepend_class-native() {
- # Tweak the native python scripts so that they don't refer to the
- # full path of native python binary (the solution is taken from glib-2.0 recipe)
- # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
- sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
-}
-
-do_configure_prepend_class-target() {
- # Write out a qemu wrapper that will be given to gi-scanner so that it
- # can run target helper binaries through that.
- qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
- cat > ${B}/g-ir-scanner-qemuwrapper << EOF
-#!/bin/sh
-# Use a modules directory which doesn't exist so we don't load random things
-# which may then get deleted (or their dependencies) and potentially segfault
-export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
-
-$qemu_binary "\$@"
-if [ \$? -ne 0 ]; then
- echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
- echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
- exit 1
-fi
-EOF
- chmod +x ${B}/g-ir-scanner-qemuwrapper
-
- # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files
- # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use
- # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory
- # from the target sysroot.
- cat > ${B}/g-ir-scanner-wrapper << EOF
-#!/bin/sh
-# This prevents g-ir-scanner from writing cache data to $HOME
-export GI_SCANNER_DISABLE_CACHE=1
-
-g-ir-scanner --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
-EOF
- chmod +x ${B}/g-ir-scanner-wrapper
-
- # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
- # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
- cat > ${B}/g-ir-compiler-wrapper << EOF
-#!/bin/sh
-${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
-EOF
- chmod +x ${B}/g-ir-compiler-wrapper
-
- # Write out a wrapper to use instead of ldd, which does not work when a binary is built
- # for a different architecture
- cat > ${B}/g-ir-scanner-lddwrapper << EOF
-#!/bin/sh
-prelink-rtld --root=$STAGING_DIR_HOST "\$@"
-EOF
- chmod +x ${B}/g-ir-scanner-lddwrapper
-
- # Also tweak the target python scripts so that they don't refer to the
- # native version of python binary (the solution is taken from glib-2.0 recipe)
- sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
-}
-
-# Configure target build to use native tools of itself and to use a qemu wrapper
-# and optionally to generate introspection data
-EXTRA_OECONF_class-target += "--enable-host-gi \
- --enable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
- --enable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
- ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection-data', '--disable-introspection-data', d)} \
- "
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[doctool] = "--enable-doctool,--disable-doctool,python3-mako,"
-
-do_compile_prepend() {
- # This prevents g-ir-scanner from writing cache data to $HOME
- export GI_SCANNER_DISABLE_CACHE=1
-
- # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
- export GIR_EXTRA_LIBS_PATH=$B/.libs
-}
-
-# Our wrappers need to be available system-wide, because they will be used
-# to build introspection files for all other gobject-based packages
-do_install_append_class-target() {
- install -d ${D}${bindir}/
- install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
- install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
- install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
- install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
-}
-
-# .typelib files are needed at runtime and so they go to the main package
-FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
-
-# .gir files go to dev package, as they're needed for developing (but not for running)
-# things that depends on introspection.
-FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
-
-# These are used by gobject-based packages
-# to generate transient introspection binaries
-FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
- ${datadir}/gobject-introspection-1.0/Makefile.introspection"
-
-# These are used by dependent packages (e.g. pygobject) to build their
-# testsuites.
-FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
- ${datadir}/gobject-introspection-1.0/tests/*.h"
-
-FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
-FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
-
-# we need target versions of introspection tools in sysroot so that they can be run via qemu
-# when building introspection files in other packages
-SYSROOT_DIRS_append_class-target = " ${bindir}"
-
-SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess"
-gi_binaries_sysroot_preprocess() {
- # Tweak the binary names in the introspection pkgconfig file, so that it
- # picks up our wrappers which do the cross-compile and qemu magic.
- sed -i \
- -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
- -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
- ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
-}
-
-# Need to ensure ld.so.conf exists so prelink-native works
-# both before we build and if we install from sstate
-do_configure[prefuncs] += "gobject_introspection_preconfigure"
-python gobject_introspection_preconfigure () {
- oe.utils.write_ld_so_conf(d)
-}
-
-SSTATEPOSTINSTFUNCS += "gobject_introspection_postinst"
-python gobject_introspection_postinst () {
- if d.getVar("BB_CURRENTTASK", True).startswith("populate_sysroot"):
- oe.utils.write_ld_so_conf(d)
-}
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb
new file mode 100644
index 0000000000..b1371776af
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb
@@ -0,0 +1,209 @@
+SUMMARY = "Middleware layer between GObject-using C libraries and language bindings"
+DESCRIPTION = "GObject Introspection is a project for providing machine \
+readable introspection data of the API of C libraries. This introspection \
+data can be used in several different use cases, for example automatic code \
+generation for bindings, API verification and documentation generation."
+HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues"
+SECTION = "libs"
+LICENSE = "LGPLv2+ & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
+ file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
+ file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
+ file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27 \
+ "
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \
+ file://0003-giscanner-add-use-binary-wrapper-option.patch \
+ file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
+ file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
+ file://0001-giscanner-add-a-lib-dirs-envvar-option.patch \
+ file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \
+ file://0001-Port-cross-compilation-support-to-meson.patch \
+ file://0001-meson.build-disable-tests-when-cross-compiling.patch \
+ file://0001-Fix-build-reproducibility.patch \
+ "
+
+SRC_URI[md5sum] = "37278eab3704e42234b6080b8cf241f1"
+SRC_URI[sha256sum] = "b1ee7ed257fdbc008702bdff0ff3e78a660e7e602efa8f211dc89b9d1e7d90a2"
+
+SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch"
+
+inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script
+
+GTKDOC_MESON_OPTION = "gtk_doc"
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner"
+
+DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive"
+
+# target build needs qemu to run temporary introspection binaries created
+# on the fly by g-ir-scanner and a native version of itself to run
+# native versions of its own tools during build.
+# Also prelink-rtld is used to find out library dependencies of introspection binaries
+# (standard ldd doesn't work when cross-compiling).
+DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
+
+# needed for writing out the qemu wrapper script
+export STAGING_DIR_HOST
+export B
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[doctool] = "-Ddoctool=true,-Ddoctool=false,python3-mako,"
+
+# Configure target build to use native tools of itself and to use a qemu wrapper
+# and optionally to generate introspection data
+EXTRA_OEMESON_class-target = " \
+ -Denable-host-gi=true \
+ -Denable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
+ -Denable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
+ -Dpkgconfig-sysroot-path=${PKG_CONFIG_SYSROOT_DIR} \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Denable-introspection-data=true', '-Denable-introspection-data=false', d)} \
+ ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \
+"
+
+# Need to ensure ld.so.conf exists so prelink-native works
+# both before we build and if we install from sstate
+do_configure[prefuncs] += "gobject_introspection_preconfigure"
+python gobject_introspection_preconfigure () {
+ oe.utils.write_ld_so_conf(d)
+}
+
+do_configure_prepend_class-native() {
+ # Tweak the native python scripts so that they don't refer to the
+ # full path of native python binary (the solution is taken from glib-2.0 recipe)
+ # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
+}
+
+do_configure_prepend_class-target() {
+ # Write out a qemu wrapper that will be given to gi-scanner so that it
+ # can run target helper binaries through that.
+ qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+ cat > ${B}/g-ir-scanner-qemuwrapper << EOF
+#!/bin/sh
+# Use a modules directory which doesn't exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
+
+$qemu_binary "\$@"
+if [ \$? -ne 0 ]; then
+ echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
+ echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
+ exit 1
+fi
+EOF
+ chmod +x ${B}/g-ir-scanner-qemuwrapper
+
+ # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files
+ # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use
+ # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory
+ # from the target sysroot.
+ cat > ${B}/g-ir-scanner-wrapper << EOF
+#!/bin/sh
+# This prevents g-ir-scanner from writing cache data to $HOME
+export GI_SCANNER_DISABLE_CACHE=1
+
+g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 --add-include-path=${STAGING_LIBDIR}/gir-1.0 "\$@"
+EOF
+ chmod +x ${B}/g-ir-scanner-wrapper
+
+ # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
+ # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
+ cat > ${B}/g-ir-compiler-wrapper << EOF
+#!/bin/sh
+${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
+EOF
+ chmod +x ${B}/g-ir-compiler-wrapper
+
+ # Write out a wrapper to use instead of ldd, which does not work when a binary is built
+ # for a different architecture
+ cat > ${B}/g-ir-scanner-lddwrapper << EOF
+#!/bin/sh
+prelink-rtld --root=$STAGING_DIR_HOST "\$@"
+EOF
+ chmod +x ${B}/g-ir-scanner-lddwrapper
+
+ # Also tweak the target python scripts so that they don't refer to the
+ # native version of python binary (the solution is taken from glib-2.0 recipe)
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
+}
+
+do_compile_prepend() {
+ # This prevents g-ir-scanner from writing cache data to $HOME
+ export GI_SCANNER_DISABLE_CACHE=1
+
+ # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
+ export GIR_EXTRA_LIBS_PATH=$B/.libs
+}
+
+# Our wrappers need to be available system-wide, because they will be used
+# to build introspection files for all other gobject-based packages
+do_install_append_class-target() {
+ install -d ${D}${bindir}/
+ install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
+ install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
+ install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
+ install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
+}
+
+# we need target versions of introspection tools in sysroot so that they can be run via qemu
+# when building introspection files in other packages
+SYSROOT_DIRS_append_class-target = " ${bindir}"
+
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess"
+gi_binaries_sysroot_preprocess() {
+ # Tweak the binary names in the introspection pkgconfig file, so that it
+ # picks up our wrappers which do the cross-compile and qemu magic.
+ sed -i \
+ -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
+ -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
+ ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
+}
+
+SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess"
+gi_ldsoconf_sysroot_preprocess () {
+ mkdir -p ${SYSROOT_DESTDIR}${bindir}
+ dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN}
+ echo "#!/bin/sh" > $dest
+ echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest
+ echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
+ echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
+ chmod 755 $dest
+}
+
+# Remove wrapper files from the package, only used for cross-compiling
+PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess"
+gi_package_preprocess() {
+ rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper
+ rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper
+ rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper
+ rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper
+}
+
+SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}"
+
+# .typelib files are needed at runtime and so they go to the main package
+FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
+
+# .gir files go to dev package, as they're needed for developing (but not for running)
+# things that depends on introspection.
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir"
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.rnc"
+
+# These are used by gobject-based packages
+# to generate transient introspection binaries
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
+ ${datadir}/gobject-introspection-1.0/Makefile.introspection"
+
+# These are used by dependent packages (e.g. pygobject) to build their
+# testsuites.
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
+ ${datadir}/gobject-introspection-1.0/tests/*.h"
+
+FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
+FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
+
+RDEPENDS_${PN} = "python3-pickle python3-xml"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas/0001-Do-not-skip-gir-installation-for-cross-compiling.patch b/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas/0001-Do-not-skip-gir-installation-for-cross-compiling.patch
new file mode 100644
index 0000000000..c481b18f1c
--- /dev/null
+++ b/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas/0001-Do-not-skip-gir-installation-for-cross-compiling.patch
@@ -0,0 +1,33 @@
+From 42e58c4c3e95a4a78ee8294f9b3901726bbbabe4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Sat, 11 May 2019 00:21:11 +0200
+Subject: [PATCH] Do not skip gir installation for cross compiling
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We are cool and can handle cross gobject-introspection.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ headers/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/headers/meson.build b/headers/meson.build
+index 3ce8b61..1132695 100644
+--- a/headers/meson.build
++++ b/headers/meson.build
+@@ -19,7 +19,7 @@ enums_xml = custom_target(
+ install: true,
+ install_dir: schemasdir)
+
+-if not meson.is_cross_build() and get_option('introspection')
++if get_option('introspection')
+ noinst_lib = shared_library('noinst',
+ headers,
+ install: false)
+--
+2.20.1
+
diff --git a/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.20.0.bb b/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.20.0.bb
deleted file mode 100644
index bb924ce74f..0000000000
--- a/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.20.0.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-SUMMARY = "GNOME desktop-wide GSettings schemas"
-HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "glib-2.0 intltool-native"
-
-inherit gnomebase gsettings gettext gobject-introspection upstream-version-is-even
-
-SRC_URI[archive.md5sum] = "c5d87ea480aa9bf66b134ddb5b8ea0f8"
-SRC_URI[archive.sha256sum] = "55a41b533c0ab955e0a36a84d73829451c88b027d8d719955d8f695c35c6d9c1"
diff --git a/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.34.0.bb b/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.34.0.bb
new file mode 100644
index 0000000000..eea578bb6b
--- /dev/null
+++ b/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.34.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "GNOME desktop-wide GSettings schemas"
+DESCRIPTION = "GSettings desktop-wide schemas contains a collection of \
+GSettings schemas for settings shared by various components of a desktop."
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/issues"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "glib-2.0"
+
+GNOMEBASEBUILDCLASS = "meson"
+
+inherit gnomebase gsettings gobject-introspection gettext upstream-version-is-even
+
+SRC_URI[archive.md5sum] = "9759ef53fb2e53fc8d19190e58f2c332"
+SRC_URI[archive.sha256sum] = "288b04260f7040b0e004a8d59c773cfb4e32df4f1b4a0f9d705c51afccc95ead"
+SRC_URI += "file://0001-Do-not-skip-gir-installation-for-cross-compiling.patch"
diff --git a/meta/recipes-gnome/gtk+/gtk+.inc b/meta/recipes-gnome/gtk+/gtk+.inc
deleted file mode 100644
index c240baa2cd..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+.inc
+++ /dev/null
@@ -1,104 +0,0 @@
-SUMMARY = "Multi-platform toolkit for creating GUIs"
-DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
-set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
-HOMEPAGE = "http://www.gtk.org"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-SECTION = "libs"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-# This picks stable releases in the 2.x series (but not 2.90 onwards,
-# which were GNOME 3 betas).
-UPSTREAM_CHECK_REGEX = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)"
-
-X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
-DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
- cairo gdk-pixbuf"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-"
-
-PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
-# without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE
-PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb"
-
-inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache gobject-introspection
-
-PACKAGES += "libgail gtk-demo"
-
-FILES_${PN} += "${bindir}/gtk-update-icon-cache-2.0 \
- ${bindir}/gtk-query-immodules-2.0 \
- ${datadir}/themes ${sysconfdir} \
- ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
-
-FILES_${PN}-dev += " \
- ${datadir}/gtk-2.0/include \
- ${libdir}/gtk-2.0/include \
- ${libdir}/gtk-2.0/modules/*.la \
- ${libdir}/gtk-2.0/${LIBV}/loaders/*.la \
- ${libdir}/gtk-2.0/${LIBV}/immodules/*.la \
- ${libdir}/gtk-2.0/${LIBV}/printbackends/*.la \
- ${libdir}/gtk-2.0/${LIBV}/engines/*.la \
- ${bindir}/gtk-builder-convert"
-
-FILES_gtk-demo = " \
- ${datadir}/gtk-2.0/demo/* \
- ${bindir}/gtk-demo \
- "
-
-FILES_libgail = " \
- ${libdir}/gtk-2.0/modules/libgail.so \
- ${libdir}/gtk-2.0/modules/libferret.so \
- "
-
-GTKBASE_RRECOMMENDS ?= "liberation-fonts \
- gdk-pixbuf-loader-png \
- gdk-pixbuf-loader-jpeg \
- gdk-pixbuf-loader-gif \
- gdk-pixbuf-loader-xpm \
- shared-mime-info \
- gnome-theme-adwaita \
- "
-GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
-
-RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
-RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
-
-ALTERNATIVE_${PN} = "gtk-update-icon-cache"
-ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0"
-
-do_compile_prepend() {
- export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs"
-}
-
-do_install () {
- autotools_do_install
-
- install -d ${D}${sysconfdir}/gtk-2.0
-
- mkdir -p ${D}${libdir}/gtk-2.0/include
- install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.h
-
- install -m 0644 ${S}/gtk/gtkfilechooserprivate.h ${D}${includedir}/gtk-2.0/gtk/
- install -m 0644 ${S}/gtk/gtkfilechooserutils.h ${D}${includedir}/gtk-2.0/gtk/
- install -m 0644 ${S}/gtk/gtkfilesystemmodel.h ${D}${includedir}/gtk-2.0/gtk/
-
- mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0
-}
-
-SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
-
-gtk_sysroot_preprocess () {
- if [ -e ${D}${bindir}/gtk-builder-convert ]; then
- install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
- install -m 755 ${D}${bindir}/gtk-builder-convert ${SYSROOT_DESTDIR}${bindir_crossscripts}/
- fi
-}
-
diff --git a/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch b/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
deleted file mode 100644
index 74e479fd1b..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-There are issues building the gtk+ tutorial and faq documentation.
-Since they were removed in gtk+ upstream and are superfluous in
-embedded applications, just don't build them.
-
-Thanks to Joshua Lock for suggesting this approach.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Upstream-Status: Inappropriate [embedded specific]
-
-diff -urN gtk+-2.22.1.orig/docs/Makefile.am gtk+-2.22.1/docs/Makefile.am
---- gtk+-2.22.1.orig/docs/Makefile.am 2010-11-15 04:13:09.000000000 -0800
-+++ gtk+-2.22.1/docs/Makefile.am 2011-02-23 19:25:16.914815097 -0800
-@@ -1,7 +1,7 @@
- ## Process this file with automake to produce Makefile.in
- include $(top_srcdir)/Makefile.decl
-
--SUBDIRS = tutorial faq reference tools
-+SUBDIRS = reference tools
-
- EXTRA_DIST += \
- defsformat.txt \
diff --git a/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch b/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
deleted file mode 100644
index 1ae728e70d..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Updated to apply to gtk+-2.24.15
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
---- gtk+-2.24.15/configure.ac 2013-01-12 20:52:54.000000000 +0200
-+++ gtk+-2.24.15/configure.ac 2013-02-12 21:33:30.689925967 +0200
-@@ -415,7 +415,7 @@
- case $enable_explicit_deps in
- auto)
- export SED
-- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
- if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
- enable_explicit_deps=yes
- else
-@@ -774,7 +774,7 @@
- dnl Now we check to see if our libtool supports shared lib deps
- dnl (in a rather ugly way even)
- if $dynworks; then
-- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-+ module_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config"
- module_deplibs_check=`$module_libtool_config | \
- grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
- sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -1574,7 +1574,7 @@
- # We are using gmodule-no-export now, but I'm leaving the stripping
- # code in place for now, since pango and atk still require gmodule.
- export SED
--export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- if test -n "$export_dynamic"; then
- GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
- GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch b/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch
deleted file mode 100644
index 96e1f5feac..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Fixes
-
-include/gtk-2.0/gtk/gtkitemfactory.h:47:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
- typedef void (*GtkItemFactoryCallback) ();
-
-gcc5 has -Wstrict-prototypes on by default for -Werror so this becomes a build failure for consumers
-of this header e.g. matchbox-panel-2
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: gtk+-2.24.27/gtk/gtkitemfactory.h
-===================================================================
---- gtk+-2.24.27.orig/gtk/gtkitemfactory.h
-+++ gtk+-2.24.27/gtk/gtkitemfactory.h
-@@ -44,7 +44,7 @@ typedef void (*GtkPrintFunc) (gpoint
- * (Note that if we are included from a C++ program () will mean
- * (void) so an explicit cast will be needed.)
- */
--typedef void (*GtkItemFactoryCallback) ();
-+typedef void (*GtkItemFactoryCallback) (void);
- typedef void (*GtkItemFactoryCallback1) (gpointer callback_data,
- guint callback_action,
- GtkWidget *widget);
diff --git a/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff b/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
deleted file mode 100644
index 340d12008b..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
+++ /dev/null
@@ -1,102 +0,0 @@
-Upstream-Status: Pending
-
-Index: gtk/gtkcellrenderertoggle.c
-===================================================================
---- gtk/gtkcellrenderertoggle.c.orig 2010-06-22 18:11:33.000000000 +0800
-+++ gtk/gtkcellrenderertoggle.c 2010-06-22 18:11:43.000000000 +0800
-@@ -71,6 +71,8 @@
- PROP_INDICATOR_SIZE
- };
-
-+/* This is a hard-coded default which promptly gets overridden by a size
-+ calculated from the font size. */
- #define TOGGLE_WIDTH 13
-
- static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
-@@ -80,8 +82,9 @@
- typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate;
- struct _GtkCellRendererTogglePrivate
- {
-- gint indicator_size;
--
-+ gint indicator_size; /* This is the real size */
-+ gint override_size; /* This is the size set from the indicator-size property */
-+ GtkWidget *cached_widget;
- guint inconsistent : 1;
- };
-
-@@ -104,6 +107,7 @@
- GTK_CELL_RENDERER (celltoggle)->ypad = 2;
-
- priv->indicator_size = TOGGLE_WIDTH;
-+ priv->override_size = 0;
- priv->inconsistent = FALSE;
- }
-
-@@ -210,7 +214,7 @@
- g_value_set_boolean (value, celltoggle->radio);
- break;
- case PROP_INDICATOR_SIZE:
-- g_value_set_int (value, priv->indicator_size);
-+ g_value_set_int (value, priv->override_size ? priv->override_size : priv->indicator_size);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
-@@ -245,7 +249,7 @@
- celltoggle->radio = g_value_get_boolean (value);
- break;
- case PROP_INDICATOR_SIZE:
-- priv->indicator_size = g_value_get_int (value);
-+ priv->override_size = g_value_get_int (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
-@@ -273,6 +277,27 @@
- }
-
- static void
-+on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data)
-+{
-+ GtkCellRendererTogglePrivate *priv = user_data;
-+ PangoContext *context;
-+ PangoFontMetrics *metrics;
-+ int height;
-+
-+ context = gtk_widget_get_pango_context (widget);
-+ metrics = pango_context_get_metrics (context,
-+ widget->style->font_desc,
-+ pango_context_get_language (context));
-+
-+ height = pango_font_metrics_get_ascent (metrics) +
-+ pango_font_metrics_get_descent (metrics);
-+
-+ pango_font_metrics_unref (metrics);
-+
-+ priv->indicator_size = PANGO_PIXELS (height * 0.85);
-+}
-+
-+static void
- gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
-@@ -287,6 +312,20 @@
-
- priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
-
-+ if (priv->override_size) {
-+ priv->indicator_size = priv->override_size;
-+ } else if (priv->cached_widget != widget) {
-+ if (priv->cached_widget) {
-+ g_object_remove_weak_pointer (widget, &priv->cached_widget);
-+ g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv);
-+ }
-+ priv->cached_widget = widget;
-+ g_object_add_weak_pointer (widget, &priv->cached_widget);
-+ g_signal_connect (widget, "style-set", on_widget_style_set, priv);
-+
-+ on_widget_style_set (widget, NULL, priv);
-+ }
-+
- calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
- calc_height = (gint) cell->ypad * 2 + priv->indicator_size;
-
diff --git a/meta/recipes-gnome/gtk+/gtk+/xsettings.patch b/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
deleted file mode 100644
index d0a970ad4d..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Pending
-
-Index: gtk+-2.21.2/gdk/x11/gdkevents-x11.c
-===================================================================
---- gtk+-2.21.2.orig/gdk/x11/gdkevents-x11.c 2010-06-22 17:28:04.000000000 +0800
-+++ gtk+-2.21.2/gdk/x11/gdkevents-x11.c 2010-06-22 17:28:06.000000000 +0800
-@@ -3062,10 +3062,9 @@
- {
- GdkScreenX11 *screen = data;
-
-- if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent))
-- return GDK_FILTER_REMOVE;
-- else
-- return GDK_FILTER_CONTINUE;
-+ xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent);
-+
-+ return GDK_FILTER_CONTINUE;
- }
-
- static Bool
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
index 83e9b927b0..e1f1e0db31 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -6,11 +6,19 @@ BUGTRACKER = "https://bugzilla.gnome.org/"
SECTION = "libs"
DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \
- docbook-utils-native gdk-pixbuf-native"
+ gdk-pixbuf-native"
LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check upstream-version-is-even gobject-introspection
+inherit autotools gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection
+
+BBCLASSEXTEND = "native nativesdk"
+
+GSETTINGS_PACKAGE_class-native = ""
+
+# versions >= 3.90 are development versions, otherwise like upstream-version-is-even
+UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar"
+
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
# This should be in autotools.bbclass, but until something elses uses it putting
@@ -29,32 +37,48 @@ EXTRA_OECONF += " \
--disable-glibtest \
--disable-xinerama \
--enable-modules \
- --disable-cups \
--disable-colord \
- WAYLAND_PROTOCOLS_SYSROOT_DIR=${STAGING_DIR}/${MACHINE} \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "--disable-gtk-doc", d)} \
"
-EXTRA_OECONF[vardepsexclude] = "MACHINE"
do_compile_prepend() {
export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs"
}
-PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
- ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl", "", d)} \
- ${@bb.utils.contains("DISTRO_FEATURES", "opengl x11", "glx", "", d)} \
- ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl wayland x11', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)}"
PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes"
# this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build
PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy"
PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
-PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/mesa wayland-native"
+PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native"
+PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
+
+prepare_gtk_scripts() {
+ mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
+
+ # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache
+ mkdir -p ${D}${libexecdir}
+ ln ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0
+}
-do_install_append() {
- mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
+do_install_append_class-target() {
+ prepare_gtk_scripts
}
+do_install_append_class-nativesdk() {
+ prepare_gtk_scripts
+}
+
+do_install_append_class-native() {
+ create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+}
+
+PROVIDES += "gtk-icon-utils"
PACKAGES =+ "${PN}-demo"
LIBV = "3.0.0"
@@ -100,6 +124,10 @@ GTKBASE_RRECOMMENDS ?= "liberation-fonts \
shared-mime-info \
adwaita-icon-theme-symbolic \
"
+
+GTKBASE_RRECOMMENDS_class-native ?= "\
+ "
+
GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
@@ -119,12 +147,12 @@ python populate_packages_prepend () {
immodules_root = os.path.join(gtk_libdir, 'immodules')
printmodules_root = os.path.join(gtk_libdir, 'printbackends');
- immodules = do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')
+ immodules = do_split_packages(d, immodules_root, r'^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')
if immodules:
d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules))
- do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
+ do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
- if (d.getVar('DEBIAN_NAMES', True)):
+ if (d.getVar('DEBIAN_NAMES')):
d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0')
}
diff --git a/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch b/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch
index 0bda1f1074..c210bbc7d5 100644
--- a/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch
+++ b/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch
@@ -1,4 +1,4 @@
-From 5a73a5b92566e314bbc8a1bd40f1ec204837c111 Mon Sep 17 00:00:00 2001
+From 0ecaa5bab162abf0cb2057d77beeb7b89d5873b4 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Tue, 21 Jun 2016 14:53:56 +0300
Subject: [PATCH 1/4] Hardcoded libtool
@@ -12,10 +12,10 @@ Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 23d3077..b6931d6 100644
+index 6628e21..f43ac09 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -610,7 +610,7 @@ AC_MSG_CHECKING([whether to write dependencies into .pc files])
+@@ -617,7 +617,7 @@ AC_MSG_CHECKING([whether to write dependencies into .pc files])
case $enable_explicit_deps in
auto)
export SED
@@ -24,7 +24,7 @@ index 23d3077..b6931d6 100644
if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
enable_explicit_deps=yes
else
-@@ -876,7 +876,7 @@ else
+@@ -895,7 +895,7 @@ else
dnl Now we check to see if our libtool supports shared lib deps
dnl (in a rather ugly way even)
if $dynworks; then
@@ -33,7 +33,7 @@ index 23d3077..b6931d6 100644
module_deplibs_check=`$module_libtool_config | \
grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -1630,7 +1630,7 @@ AC_SUBST(GTK_PRINT_BACKENDS)
+@@ -1649,7 +1649,7 @@ AC_SUBST(GTK_PRINT_BACKENDS)
# We are using gmodule-no-export now, but I'm leaving the stripping
# code in place for now, since pango and atk still require gmodule.
export SED
@@ -43,5 +43,5 @@ index 23d3077..b6931d6 100644
GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
--
-2.1.4
+2.12.0
diff --git a/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch b/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
index 989716e513..80dc2d7a05 100644
--- a/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
+++ b/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
@@ -1,7 +1,7 @@
-From d63b926f8c8d8b5c9f9ec33d078b775f0409d88a Mon Sep 17 00:00:00 2001
+From 6575ab0f0e8c1bba033ad1616511e37a2ec995ff Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Fri, 16 Oct 2015 16:35:16 +0300
-Subject: [PATCH 2/4] Do not try to initialize GL without libGL
+Subject: [PATCH] Do not try to initialize GL without libGL
_gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys
GLX api which will exit() if libGL.so.1 is not present. We do not
@@ -15,29 +15,29 @@ before calling epoxy APIs.
Upstream-Status: Denied
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- configure.ac | 7 +++++++
+ configure.ac | 6 ++++++
gdk/x11/gdkvisual-x11.c | 5 +++++
- 2 files changed, 12 insertions(+)
+ 2 files changed, 11 insertions(+)
diff --git a/configure.ac b/configure.ac
-index b6931d6..e27da49 100644
+index e9f5583..bd651bb 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -342,6 +342,13 @@ AC_ARG_ENABLE(mir-backend,
- [enable the Mir gdk backend])],
- [backend_set=yes])
-
+@@ -346,6 +346,12 @@ AC_ARG_ENABLE(cloudproviders,
+ [AS_HELP_STRING([--enable-cloudproviders],
+ [enable libcloudproviders integration])],
+ [cloudproviders_set=yes])
+AC_ARG_ENABLE(glx,
+ [AS_HELP_STRING([--enable-glx],
+ [When enabled Gdk will try to initialize GLX])])
+AS_IF([test "x$enable_glx" != "xno"], [
+ AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime])
+])
-+
- if test -z "$backend_set"; then
- if test "$platform_win32" = yes; then
- enable_win32_backend=yes
+
+ AC_ARG_ENABLE(profiler,
+ [AS_HELP_STRING([--enable-profiler],
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index 81479d8..3c8c5c0 100644
--- a/gdk/x11/gdkvisual-x11.c
@@ -55,6 +55,3 @@ index 81479d8..3c8c5c0 100644
}
gint
---
-2.1.4
-
diff --git a/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch b/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
index 0912c44ff3..398c9bc36a 100644
--- a/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
+++ b/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
@@ -1,7 +1,7 @@
-From a8fa547fdc1416b330aced805f5343ad912932ae Mon Sep 17 00:00:00 2001
+From f83fcf1991afad6d9c15546b2ccd775dad4e314c Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Tue, 21 Jun 2016 15:11:39 +0300
-Subject: [PATCH 3/4] Add --disable-opengl configure option
+Subject: [PATCH] Add --disable-opengl configure option
--disable-opengl will remove the dependency on libepoxy and on the
OpenGL APIs. This is useful for those who want to keep using gtk+3
@@ -14,43 +14,46 @@ the very least modified.
The patch is _not_ great from a maintenance point of view and
modifying the library API is also a fairly nasty thing to do.
-Long-term it would be good to find an alternative solution to this
-(maybe a no-op backend for libepoxy?)
+Next long term release (4.0) will require alternative solutions
+as it actually will depend on OpenGL.
Upstream-Status: Inappropriate [Evil eye expected from upstream]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- configure.ac | 13 +++++++++++--
- demos/gtk-demo/glarea.c | 13 +++++++++++++
- docs/tools/Makefile.am | 9 +++++++--
- docs/tools/widgets.c | 4 +++-
- gdk/gdkdisplay.c | 4 +++-
- gdk/gdkgl.c | 10 ++++++++++
- gdk/gdkglcontext.c | 6 ++++++
- gdk/gdkwindow.c | 13 +++++++++++++
- gdk/x11/Makefile.am | 30 ++++++++++++++++++++++++++----
- gdk/x11/gdkdisplay-x11.c | 6 +++++-
- gdk/x11/gdkscreen-x11.c | 5 +++++
- gdk/x11/gdkwindow-x11.c | 4 ++++
- gdk/x11/gdkx-autocleanups.h | 2 ++
- gdk/x11/gdkx-with-gl-context.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- gdk/x11/gdkx-without-gl-context.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- gdk/x11/gdkx.h | 59 -----------------------------------------------------------
- gtk/Makefile.am | 3 +--
- gtk/gtkglarea.c | 20 +++++++++++++++++++-
- gtk/inspector/general.c | 6 ++++++
- tests/Makefile.am | 10 +++++++---
- testsuite/gtk/objects-finalize.c | 2 ++
- 21 files changed, 260 insertions(+), 76 deletions(-)
+ configure.ac | 13 ++++-
+ demos/gtk-demo/glarea.c | 14 ++++++
+ docs/tools/Makefile.am | 9 +++-
+ docs/tools/widgets.c | 4 +-
+ gdk/Makefile.am | 8 ++-
+ gdk/gdkdisplay.c | 4 +-
+ gdk/gdkgl.c | 10 ++++
+ gdk/gdkglcontext.c | 6 +++
+ gdk/gdkwindow.c | 13 +++++
+ gdk/x11/Makefile.am | 30 +++++++++--
+ gdk/x11/gdkdisplay-x11.c | 6 ++-
+ gdk/x11/gdkscreen-x11.c | 5 ++
+ gdk/x11/gdkwindow-x11.c | 4 ++
+ gdk/x11/gdkx-autocleanups.h | 2 +
+ gdk/x11/{gdkx.h => gdkx-with-gl-context.h} | 1 -
+ gdk/x11/gdkx-without-gl-context.h | 58 ++++++++++++++++++++++
+ gtk/Makefile.am | 2 +-
+ gtk/gtkglarea.c | 20 +++++++-
+ gtk/inspector/general.c | 6 +++
+ tests/Makefile.am | 10 ++--
+ testsuite/gtk/objects-finalize.c | 2 +
+ 21 files changed, 208 insertions(+), 19 deletions(-)
+ rename gdk/x11/{gdkx.h => gdkx-with-gl-context.h} (98%)
+ create mode 100644 gdk/x11/gdkx-without-gl-context.h
diff --git a/configure.ac b/configure.ac
-index a01824e..dde9dc5 100644
+index bd651bb..b4c061f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -342,6 +342,15 @@ AC_ARG_ENABLE(mir-backend,
- [enable the Mir gdk backend])],
- [backend_set=yes])
-
+@@ -346,6 +346,15 @@ AC_ARG_ENABLE(cloudproviders,
+ [AS_HELP_STRING([--enable-cloudproviders],
+ [enable libcloudproviders integration])],
+ [cloudproviders_set=yes])
+AC_ARG_ENABLE(opengl,
+ [AS_HELP_STRING([--enable-opengl],
+ [When enabled, Gtk+ will use libepoxy and exposes GtkGLArea widget ])])
@@ -63,30 +66,33 @@ index a01824e..dde9dc5 100644
AC_ARG_ENABLE(glx,
[AS_HELP_STRING([--enable-glx],
[When enabled Gdk will try to initialize GLX])])
-@@ -1333,7 +1342,7 @@ CFLAGS="$saved_cflags"
+@@ -1345,7 +1354,7 @@ CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
--GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version"
-+GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends $EPOXY_PACKAGES"
+-GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends epoxy >= epoxy_required_version $CLOUDPROVIDER_PACKAGES $PROFILER_PACKAGES fribidi >= fribidi_required_version"
++GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends $EPOXY_PACKAGES $CLOUDPROVIDER_PACKAGES $PROFILER_PACKAGES fribidi >= fribidi_required_version"
PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
-@@ -1367,7 +1376,7 @@ fi
+@@ -1379,7 +1388,7 @@ fi
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
--GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version"
-+GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $EPOXY_PACKAGES"
+-GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES epoxy >= epoxy_required_version fribidi >= fribidi_required_version"
++GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $EPOXY_PACKAGES fribidi >= fribidi_required_version"
if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
fi
diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c
-index 3aba729..c6c79f7 100644
+index b51e4ae..82409c7 100644
--- a/demos/gtk-demo/glarea.c
+++ b/demos/gtk-demo/glarea.c
-@@ -5,7 +5,9 @@
+@@ -3,9 +3,12 @@
+ * GtkGLArea is a widget that allows custom drawing using OpenGL calls.
+ */
++#include "config.h"
#include <math.h>
#include <gtk/gtk.h>
+#if HAVE_OPENGL
@@ -95,7 +101,7 @@ index 3aba729..c6c79f7 100644
static GtkWidget *demo_window = NULL;
-@@ -23,6 +25,8 @@ enum {
+@@ -23,6 +26,8 @@ enum {
/* Rotation angles on each axis */
static float rotation_angles[N_AXIS] = { 0.0 };
@@ -104,7 +110,7 @@ index 3aba729..c6c79f7 100644
/* The object we are drawing */
static const GLfloat vertex_data[] = {
0.f, 0.5f, 0.f, 1.f,
-@@ -213,6 +217,7 @@ compute_mvp (float *res,
+@@ -215,6 +220,7 @@ compute_mvp (float *res,
static GLuint position_buffer;
static GLuint program;
static GLuint mvp_location;
@@ -112,18 +118,18 @@ index 3aba729..c6c79f7 100644
/* We need to set up our state when we realize the GtkGLArea widget */
static void
-@@ -223,8 +228,10 @@ realize (GtkWidget *widget)
- if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
- return;
+@@ -241,8 +247,10 @@ realize (GtkWidget *widget)
+ fragment_path = "/glarea/glarea-gl.fs.glsl";
+ }
+#ifdef HAVE_OPENGL
init_buffers (&position_buffer, NULL);
- init_shaders (&program, &mvp_location);
+ init_shaders (vertex_path, fragment_path, &program, &mvp_location);
+#endif
}
/* We should tear down the state when unrealizing */
-@@ -236,10 +243,13 @@ unrealize (GtkWidget *widget)
+@@ -254,10 +262,13 @@ unrealize (GtkWidget *widget)
if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
return;
@@ -137,7 +143,7 @@ index 3aba729..c6c79f7 100644
static void
draw_triangle (void)
{
-@@ -272,6 +282,7 @@ draw_triangle (void)
+@@ -290,6 +301,7 @@ draw_triangle (void)
glBindBuffer (GL_ARRAY_BUFFER, 0);
glUseProgram (0);
}
@@ -145,7 +151,7 @@ index 3aba729..c6c79f7 100644
static gboolean
render (GtkGLArea *area,
-@@ -280,6 +291,7 @@ render (GtkGLArea *area,
+@@ -298,6 +310,7 @@ render (GtkGLArea *area,
if (gtk_gl_area_get_error (area) != NULL)
return FALSE;
@@ -153,7 +159,7 @@ index 3aba729..c6c79f7 100644
/* Clear the viewport */
glClearColor (0.5, 0.5, 0.5, 1.0);
glClear (GL_COLOR_BUFFER_BIT);
-@@ -289,6 +301,7 @@ render (GtkGLArea *area,
+@@ -307,6 +320,7 @@ render (GtkGLArea *area,
/* Flush the contents of the pipeline */
glFlush ();
@@ -162,7 +168,7 @@ index 3aba729..c6c79f7 100644
return TRUE;
}
diff --git a/docs/tools/Makefile.am b/docs/tools/Makefile.am
-index 6a6d70f..5cdf312 100644
+index bec43e3..189e8fc 100644
--- a/docs/tools/Makefile.am
+++ b/docs/tools/Makefile.am
@@ -9,13 +9,18 @@ AM_CPPFLAGS = \
@@ -203,11 +209,44 @@ index 932daf1..54239d6 100644
info = new_widget_info ("glarea", widget, MEDIUM);
return info;
+diff --git a/gdk/Makefile.am b/gdk/Makefile.am
+index 479d6a1..7edbee8 100644
+--- a/gdk/Makefile.am
++++ b/gdk/Makefile.am
+@@ -274,7 +274,6 @@ x11_introspection_files = \
+ x11/gdkeventsource.c \
+ x11/gdkeventtranslator.c \
+ x11/gdkgeometry-x11.c \
+- x11/gdkglcontext-x11.c \
+ x11/gdkkeys-x11.c \
+ x11/gdkmain-x11.c \
+ x11/gdkmonitor-x11.c \
+@@ -300,7 +299,6 @@ x11_introspection_files = \
+ x11/gdkx11display.h \
+ x11/gdkx11displaymanager.h \
+ x11/gdkx11dnd.h \
+- x11/gdkx11glcontext.h \
+ x11/gdkx11keys.h \
+ x11/gdkx11monitor.h \
+ x11/gdkx11property.h \
+@@ -310,6 +308,12 @@ x11_introspection_files = \
+ x11/gdkx11visual.h \
+ x11/gdkx11window.h
+
++if HAVE_OPENGL
++x11_introspection_files += \
++ x11/gdkglcontext-x11.c \
++ x11/gdkx11glcontext.h
++endif
++
+ GdkX11-3.0.gir: libgdk-3.la Gdk-3.0.gir Makefile
+ GdkX11_3_0_gir_SCANNERFLAGS = \
+ --identifier-prefix=Gdk \
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
-index 6150ef7..2223629 100644
+index 240c99f..9eb49bf 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
-@@ -2360,7 +2360,9 @@ gboolean
+@@ -2419,7 +2419,9 @@ gboolean
gdk_display_make_gl_context_current (GdkDisplay *display,
GdkGLContext *context)
{
@@ -219,12 +258,12 @@ index 6150ef7..2223629 100644
GdkRenderingMode
diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c
-index e8ba770..ba7c84b 100644
+index 933e204..1767508 100644
--- a/gdk/gdkgl.c
+++ b/gdk/gdkgl.c
-@@ -22,7 +22,9 @@
-
- #include "gdkinternals.h"
+@@ -26,7 +26,9 @@
+ # include "win32/gdkwin32.h"
+ #endif
+#ifdef HAVE_OPENGL
#include <epoxy/gl.h>
@@ -232,7 +271,7 @@ index e8ba770..ba7c84b 100644
#include <math.h>
#include <string.h>
-@@ -36,6 +38,7 @@ gdk_cairo_surface_mark_as_direct (cairo_surface_t *surface,
+@@ -40,6 +42,7 @@ gdk_cairo_surface_mark_as_direct (cairo_surface_t *surface,
g_object_ref (window), g_object_unref);
}
@@ -240,7 +279,7 @@ index e8ba770..ba7c84b 100644
static const char *
get_vertex_type_name (int type)
{
-@@ -254,6 +257,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data)
+@@ -212,6 +215,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data)
glUseProgram (paint_data->current_program->program);
}
}
@@ -248,15 +287,15 @@ index e8ba770..ba7c84b 100644
void
gdk_gl_texture_quads (GdkGLContext *paint_context,
-@@ -261,6 +265,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
- int n_quads,
- GdkTexturedQuad *quads)
+@@ -220,6 +224,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
+ GdkTexturedQuad *quads,
+ gboolean flip_colors)
{
+#ifdef HAVE_OPENGL
GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context);
GdkGLContextProgram *program;
GdkWindow *window = gdk_gl_context_get_window (paint_context);
-@@ -324,6 +329,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
+@@ -293,6 +298,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
glDisableVertexAttribArray (program->position_location);
glDisableVertexAttribArray (program->uv_location);
@@ -264,7 +303,7 @@ index e8ba770..ba7c84b 100644
}
/* x,y,width,height describes a rectangle in the gl render buffer
-@@ -372,6 +378,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
+@@ -341,6 +347,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
int width,
int height)
{
@@ -272,7 +311,7 @@ index e8ba770..ba7c84b 100644
GdkGLContext *paint_context;
cairo_surface_t *image;
cairo_matrix_t matrix;
-@@ -692,6 +699,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
+@@ -718,6 +725,7 @@ out:
if (clip_region)
cairo_region_destroy (clip_region);
@@ -280,7 +319,7 @@ index e8ba770..ba7c84b 100644
}
/* This is always called with the paint context current */
-@@ -699,6 +707,7 @@ void
+@@ -725,6 +733,7 @@ void
gdk_gl_texture_from_surface (cairo_surface_t *surface,
cairo_region_t *region)
{
@@ -288,14 +327,14 @@ index e8ba770..ba7c84b 100644
GdkGLContext *paint_context;
cairo_surface_t *image;
double device_x_offset, device_y_offset;
-@@ -799,4 +808,5 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
+@@ -825,4 +834,5 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
glDisable (GL_SCISSOR_TEST);
glDeleteTextures (1, &texture_id);
+#endif
}
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
-index 00a33eb..bd8a793 100644
+index dfbed63..556f0a3 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -85,7 +85,9 @@
@@ -308,23 +347,23 @@ index 00a33eb..bd8a793 100644
typedef struct {
GdkDisplay *display;
-@@ -239,6 +241,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
+@@ -243,6 +245,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
int height,
guint texture_target)
{
+#ifdef HAVE_OPENGL
- g_return_if_fail (GDK_IS_GL_CONTEXT (context));
+ GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
- glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
-@@ -246,6 +249,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
- glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
- cairo_image_surface_get_data (image_surface));
- glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
+ g_return_if_fail (GDK_IS_GL_CONTEXT (context));
+@@ -286,6 +289,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
+ glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, (unsigned char*) data + (i * stride));
+ }
+ }
+#endif
}
- static void
-@@ -635,6 +639,7 @@ gdk_gl_context_realize (GdkGLContext *context,
+ static gboolean
+@@ -774,6 +778,7 @@ gdk_gl_context_realize (GdkGLContext *context,
static void
gdk_gl_context_check_extensions (GdkGLContext *context)
{
@@ -332,7 +371,7 @@ index 00a33eb..bd8a793 100644
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
gboolean has_npot, has_texture_rectangle;
-@@ -677,6 +682,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
+@@ -853,6 +858,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
priv->use_texture_rectangle ? "yes" : "no"));
priv->extensions_checked = TRUE;
@@ -341,10 +380,10 @@ index 00a33eb..bd8a793 100644
/**
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
-index 66ebb9d..74a0c3a 100644
+index 6ae0f86..4e48a2a 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
-@@ -44,7 +44,9 @@
+@@ -45,7 +45,9 @@
#include <math.h>
@@ -354,7 +393,7 @@ index 66ebb9d..74a0c3a 100644
/* for the use of round() */
#include "fallback-c89.c"
-@@ -2759,6 +2761,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
+@@ -2844,6 +2846,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
{
GError *internal_error = NULL;
@@ -368,7 +407,7 @@ index 66ebb9d..74a0c3a 100644
if (_gdk_gl_flags & GDK_GL_DISABLE)
{
g_set_error_literal (error, GDK_GL_ERROR,
-@@ -2955,6 +2964,7 @@ gdk_window_begin_paint_region (GdkWindow *window,
+@@ -2979,6 +2988,7 @@ gdk_window_begin_paint_internal (GdkWindow *window,
}
else
{
@@ -376,7 +415,7 @@ index 66ebb9d..74a0c3a 100644
gdk_gl_context_make_current (context);
/* With gl we always need a surface to combine the gl
drawing with the native drawing. */
-@@ -2969,6 +2979,7 @@ gdk_window_begin_paint_region (GdkWindow *window,
+@@ -2993,6 +3003,7 @@ gdk_window_begin_paint_internal (GdkWindow *window,
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glViewport (0, 0, ww, wh);
@@ -384,7 +423,7 @@ index 66ebb9d..74a0c3a 100644
}
}
-@@ -3117,6 +3128,7 @@ gdk_window_end_paint (GdkWindow *window)
+@@ -3056,6 +3067,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
gdk_gl_context_make_current (window->gl_paint_context);
@@ -392,7 +431,7 @@ index 66ebb9d..74a0c3a 100644
if (!cairo_region_is_empty (opaque_region))
gdk_gl_texture_from_surface (window->current_paint.surface,
opaque_region);
-@@ -3127,6 +3139,7 @@ gdk_window_end_paint (GdkWindow *window)
+@@ -3066,6 +3078,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
window->current_paint.need_blend_region);
glDisable(GL_BLEND);
}
@@ -401,10 +440,10 @@ index 66ebb9d..74a0c3a 100644
cairo_region_destroy (opaque_region);
diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am
-index c488a31..4ce3c07 100644
+index 32b1f24..6352313 100644
--- a/gdk/x11/Makefile.am
+++ b/gdk/x11/Makefile.am
-@@ -39,8 +39,6 @@ libgdk_x11_la_SOURCES = \
+@@ -40,8 +40,6 @@ libgdk_x11_la_SOURCES = \
gdkeventtranslator.c \
gdkeventtranslator.h \
gdkgeometry-x11.c \
@@ -412,8 +451,8 @@ index c488a31..4ce3c07 100644
- gdkglcontext-x11.h \
gdkkeys-x11.c \
gdkmain-x11.c \
- gdkproperty-x11.c \
-@@ -53,14 +51,32 @@ libgdk_x11_la_SOURCES = \
+ gdkmonitor-x11.c \
+@@ -56,14 +54,32 @@ libgdk_x11_la_SOURCES = \
gdkwindow-x11.h \
gdkxftdefaults.c \
gdkxid.c \
@@ -447,15 +486,15 @@ index c488a31..4ce3c07 100644
libgdkx11include_HEADERS = \
gdkx-autocleanups.h \
gdkx11applaunchcontext.h \
-@@ -74,7 +90,6 @@ libgdkx11include_HEADERS = \
+@@ -77,7 +93,6 @@ libgdkx11include_HEADERS = \
gdkx11display.h \
gdkx11displaymanager.h \
gdkx11dnd.h \
- gdkx11glcontext.h \
gdkx11keys.h \
+ gdkx11monitor.h \
gdkx11property.h \
- gdkx11screen.h \
-@@ -83,9 +98,16 @@ libgdkx11include_HEADERS = \
+@@ -87,10 +102,17 @@ libgdkx11include_HEADERS = \
gdkx11visual.h \
gdkx11window.h
@@ -467,13 +506,14 @@ index c488a31..4ce3c07 100644
# don't seem to be correctly expanded for the dist files.
EXTRA_DIST += \
+ gdkx.h \
- gdksettings.c
+ gdksettings.c \
+ meson.build
+MAINTAINERCLEANFILES = gdkx.h
+
-include $(top_srcdir)/git.mk
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
-index de91c64..42d50f6 100644
+index 817944e..e7a2947 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -37,7 +37,9 @@
@@ -484,9 +524,9 @@ index de91c64..42d50f6 100644
#include "gdkglcontext-x11.h"
+#endif
#include "gdk-private.h"
+ #include "gdkprofilerprivate.h"
- #include <glib.h>
-@@ -2959,7 +2961,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
+@@ -3188,7 +3190,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target;
@@ -498,10 +538,10 @@ index de91c64..42d50f6 100644
display_class->get_default_seat = gdk_x11_display_get_default_seat;
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
-index 9d8ed20..bd46b00 100644
+index 8939ae9..931bff9 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
-@@ -1968,3 +1968,8 @@ gdk_x11_screen_get_current_desktop (GdkScreen *screen)
+@@ -1723,3 +1723,8 @@ gdk_x11_screen_get_current_desktop (GdkScreen *screen)
{
return get_netwm_cardinal_property (screen, "_NET_CURRENT_DESKTOP");
}
@@ -511,7 +551,7 @@ index 9d8ed20..bd46b00 100644
+void _gdk_x11_screen_update_visuals_for_gl (GdkScreen *screen) {}
+#endif
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
-index 9ed087a..30d6eb7 100644
+index 1fe7b90..d23a347 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -36,7 +36,9 @@
@@ -524,7 +564,7 @@ index 9ed087a..30d6eb7 100644
#include "gdkprivate-x11.h"
#include "gdk-private.h"
-@@ -5782,7 +5784,9 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
+@@ -5861,7 +5863,9 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
impl_class->set_opaque_region = gdk_x11_window_set_opaque_region;
impl_class->set_shadow_width = gdk_x11_window_set_shadow_width;
impl_class->show_window_menu = gdk_x11_window_show_window_menu;
@@ -548,71 +588,21 @@ index edb0ea7..a317d61 100644
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref)
-diff --git a/gdk/x11/gdkx-with-gl-context.h b/gdk/x11/gdkx-with-gl-context.h
-new file mode 100644
-index 0000000..ae05fa6
---- /dev/null
+diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx-with-gl-context.h
+similarity index 98%
+rename from gdk/x11/gdkx.h
+rename to gdk/x11/gdkx-with-gl-context.h
+index 1f64bcc..ae05fa6 100644
+--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx-with-gl-context.h
-@@ -0,0 +1,59 @@
-+/* GDK - The GIMP Drawing Kit
-+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library 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
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+/*
-+ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
-+ * file for a list of people on the GTK+ Team. See the ChangeLog
-+ * files for a list of changes. These files are distributed with
-+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
-+ */
-+
-+#ifndef __GDK_X_H__
-+#define __GDK_X_H__
-+
-+#include <gdk/gdk.h>
-+
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+
-+#define __GDKX_H_INSIDE__
-+
-+#include <gdk/x11/gdkx11applaunchcontext.h>
-+#include <gdk/x11/gdkx11cursor.h>
-+#include <gdk/x11/gdkx11device.h>
-+#include <gdk/x11/gdkx11device-core.h>
-+#include <gdk/x11/gdkx11device-xi2.h>
-+#include <gdk/x11/gdkx11devicemanager.h>
-+#include <gdk/x11/gdkx11devicemanager-core.h>
-+#include <gdk/x11/gdkx11devicemanager-xi2.h>
-+#include <gdk/x11/gdkx11display.h>
-+#include <gdk/x11/gdkx11displaymanager.h>
-+#include <gdk/x11/gdkx11dnd.h>
-+#include <gdk/x11/gdkx11glcontext.h>
-+#include <gdk/x11/gdkx11keys.h>
-+#include <gdk/x11/gdkx11property.h>
-+#include <gdk/x11/gdkx11screen.h>
-+#include <gdk/x11/gdkx11selection.h>
-+#include <gdk/x11/gdkx11utils.h>
-+#include <gdk/x11/gdkx11visual.h>
-+#include <gdk/x11/gdkx11window.h>
-+
-+#include <gdk/x11/gdkx-autocleanups.h>
-+
-+#undef __GDKX_H_INSIDE__
-+
-+#endif /* __GDK_X_H__ */
+@@ -45,7 +45,6 @@
+ #include <gdk/x11/gdkx11dnd.h>
+ #include <gdk/x11/gdkx11glcontext.h>
+ #include <gdk/x11/gdkx11keys.h>
+-#include <gdk/x11/gdkx11monitor.h>
+ #include <gdk/x11/gdkx11property.h>
+ #include <gdk/x11/gdkx11screen.h>
+ #include <gdk/x11/gdkx11selection.h>
diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h
new file mode 100644
index 0000000..c9e2617
@@ -677,96 +667,24 @@ index 0000000..c9e2617
+#undef __GDKX_H_INSIDE__
+
+#endif /* __GDK_X_H__ */
-diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
-deleted file mode 100644
-index ae05fa6..0000000
---- a/gdk/x11/gdkx.h
-+++ /dev/null
-@@ -1,59 +0,0 @@
--/* GDK - The GIMP Drawing Kit
-- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Lesser General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library 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
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
-- */
--
--/*
-- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
-- * file for a list of people on the GTK+ Team. See the ChangeLog
-- * files for a list of changes. These files are distributed with
-- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
-- */
--
--#ifndef __GDK_X_H__
--#define __GDK_X_H__
--
--#include <gdk/gdk.h>
--
--#include <X11/Xlib.h>
--#include <X11/Xutil.h>
--
--#define __GDKX_H_INSIDE__
--
--#include <gdk/x11/gdkx11applaunchcontext.h>
--#include <gdk/x11/gdkx11cursor.h>
--#include <gdk/x11/gdkx11device.h>
--#include <gdk/x11/gdkx11device-core.h>
--#include <gdk/x11/gdkx11device-xi2.h>
--#include <gdk/x11/gdkx11devicemanager.h>
--#include <gdk/x11/gdkx11devicemanager-core.h>
--#include <gdk/x11/gdkx11devicemanager-xi2.h>
--#include <gdk/x11/gdkx11display.h>
--#include <gdk/x11/gdkx11displaymanager.h>
--#include <gdk/x11/gdkx11dnd.h>
--#include <gdk/x11/gdkx11glcontext.h>
--#include <gdk/x11/gdkx11keys.h>
--#include <gdk/x11/gdkx11property.h>
--#include <gdk/x11/gdkx11screen.h>
--#include <gdk/x11/gdkx11selection.h>
--#include <gdk/x11/gdkx11utils.h>
--#include <gdk/x11/gdkx11visual.h>
--#include <gdk/x11/gdkx11window.h>
--
--#include <gdk/x11/gdkx-autocleanups.h>
--
--#undef __GDKX_H_INSIDE__
--
--#endif /* __GDK_X_H__ */
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
-index 6a53a2b..49a35e6 100644
+index eaca473..99352d1 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
-@@ -1351,14 +1351,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins.
- && cp xgen-gptbc gtkprivatetypebuiltins.c \
- && rm -f xgen-gptbc
-
--
- gtktypefuncs.c: stamp-gtktypebuiltins.h stamp-gtkprivatetypebuiltins.h $(top_srcdir)/gtk/*.h $(top_srcdir)/gtk/a11y/*.h $(top_srcdir)/gtk/deprecated/*.h $(top_srcdir)/gdk/*.h Makefile
- $(AM_V_GEN) (echo '#undef GTK_COMPILATION' && echo '#include <gtk/gtkx.h>') > xgen-gtfsrc.c && \
- echo 'G_GNUC_BEGIN_IGNORE_DEPRECATIONS' > xgen-gtf && \
+@@ -1449,7 +1449,7 @@ gtktypefuncs.inc: stamp-gtktypebuiltins.h stamp-gtkprivatetypebuiltins.h $(top_s
${CPP} $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-gtfsrc.c | \
$(GREP) -o '\bg[td]k_[a-zA-Z0-9_]*_get_type\b' | \
sort | uniq | \
- $(SED) '{ s/^/*tp++ = /; s/$$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; }' >> xgen-gtf \
+ $(SED) '{ s/^/*tp++ = /; s/$$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; s/^.*gdk_x11_gl.*$$/#ifdef HAVE_OPENGL\n&\n#endif/; }' >> xgen-gtf \
&& cp xgen-gtf $@ && rm -f xgen-gtf
- gtktestutils.c: gtktypefuncs.c
+ $(srcdir)/gtktestutils.c: gtktypefuncs.inc
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
-index 245fc6b..4214ad1 100644
+index 9a56443..7de0db2 100644
--- a/gtk/gtkglarea.c
+++ b/gtk/gtkglarea.c
-@@ -28,7 +28,9 @@
+@@ -29,7 +29,9 @@
#include "gtkprivate.h"
#include "gtkrender.h"
@@ -776,7 +694,7 @@ index 245fc6b..4214ad1 100644
/**
* SECTION:gtkglarea
-@@ -357,9 +359,12 @@ gtk_gl_area_real_create_context (GtkGLArea *area)
+@@ -369,9 +371,12 @@ gtk_gl_area_real_create_context (GtkGLArea *area)
static void
gtk_gl_area_resize (GtkGLArea *area, int width, int height)
{
@@ -789,7 +707,7 @@ index 245fc6b..4214ad1 100644
/*
* Creates all the buffer objects needed for rendering the scene
*/
-@@ -467,6 +472,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area)
+@@ -483,6 +488,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area)
priv->needs_render = TRUE;
}
@@ -797,7 +715,7 @@ index 245fc6b..4214ad1 100644
/**
* gtk_gl_area_attach_buffers:
-@@ -485,6 +491,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area)
+@@ -501,6 +507,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area)
void
gtk_gl_area_attach_buffers (GtkGLArea *area)
{
@@ -805,7 +723,7 @@ index 245fc6b..4214ad1 100644
GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
g_return_if_fail (GTK_IS_GL_AREA (area));
-@@ -517,11 +524,13 @@ gtk_gl_area_attach_buffers (GtkGLArea *area)
+@@ -533,11 +540,13 @@ gtk_gl_area_attach_buffers (GtkGLArea *area)
glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT,
GL_RENDERBUFFER_EXT, priv->depth_stencil_buffer);
}
@@ -819,7 +737,7 @@ index 245fc6b..4214ad1 100644
GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
if (priv->context == NULL)
-@@ -553,6 +562,7 @@ gtk_gl_area_delete_buffers (GtkGLArea *area)
+@@ -569,6 +578,7 @@ gtk_gl_area_delete_buffers (GtkGLArea *area)
glDeleteFramebuffersEXT (1, &priv->frame_buffer);
priv->frame_buffer = 0;
}
@@ -827,7 +745,7 @@ index 245fc6b..4214ad1 100644
}
static void
-@@ -663,6 +673,7 @@ gtk_gl_area_draw (GtkWidget *widget,
+@@ -679,6 +689,7 @@ gtk_gl_area_draw (GtkWidget *widget,
GtkGLArea *area = GTK_GL_AREA (widget);
GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
gboolean unused;
@@ -835,7 +753,7 @@ index 245fc6b..4214ad1 100644
int w, h, scale;
GLenum status;
-@@ -674,7 +685,6 @@ gtk_gl_area_draw (GtkWidget *widget,
+@@ -690,7 +701,6 @@ gtk_gl_area_draw (GtkWidget *widget,
gtk_widget_get_allocated_height (widget));
return FALSE;
}
@@ -843,7 +761,7 @@ index 245fc6b..4214ad1 100644
if (priv->context == NULL)
return FALSE;
-@@ -720,6 +730,14 @@ gtk_gl_area_draw (GtkWidget *widget,
+@@ -736,6 +746,14 @@ gtk_gl_area_draw (GtkWidget *widget,
}
return TRUE;
@@ -859,7 +777,7 @@ index 245fc6b..4214ad1 100644
static gboolean
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
-index 4eab3a7..c4e900e 100644
+index c241ec8..24576dd 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -33,8 +33,10 @@
@@ -873,7 +791,7 @@ index 4eab3a7..c4e900e 100644
#ifdef GDK_WINDOWING_WIN32
#include "win32/gdkwin32.h"
-@@ -147,6 +149,7 @@ append_extension_row (GtkInspectorGeneral *gen,
+@@ -196,6 +198,7 @@ add_label_row (GtkInspectorGeneral *gen,
gtk_size_group_add_widget (GTK_SIZE_GROUP (gen->priv->labels), label);
}
@@ -881,15 +799,15 @@ index 4eab3a7..c4e900e 100644
#ifdef GDK_WINDOWING_X11
static void
append_glx_extension_row (GtkInspectorGeneral *gen,
-@@ -156,6 +159,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen,
- append_extension_row (gen, ext, epoxy_has_glx_extension (dpy, 0, ext));
+@@ -205,6 +208,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen,
+ add_check_row (gen, GTK_LIST_BOX (gen->priv->gl_box), ext, epoxy_has_glx_extension (dpy, 0, ext), 0);
}
#endif
+#endif
#ifdef GDK_WINDOWING_WAYLAND
static void
-@@ -171,6 +175,7 @@ append_egl_extension_row (GtkInspectorGeneral *gen,
+@@ -254,6 +258,7 @@ wayland_get_display (struct wl_display *wl_display)
static void
init_gl (GtkInspectorGeneral *gen)
{
@@ -897,7 +815,7 @@ index 4eab3a7..c4e900e 100644
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
{
-@@ -197,6 +202,7 @@ init_gl (GtkInspectorGeneral *gen)
+@@ -280,6 +285,7 @@ init_gl (GtkInspectorGeneral *gen)
}
else
#endif
@@ -906,7 +824,7 @@ index 4eab3a7..c4e900e 100644
if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
{
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 681807d..2941a36 100644
+index ee1e8b5..e6c6502 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -80,8 +80,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \
@@ -918,37 +836,37 @@ index 681807d..2941a36 100644
testgrid \
testgtk \
testheaderbar \
-@@ -169,11 +167,17 @@ noinst_PROGRAMS = $(TEST_PROGS) \
+@@ -172,12 +170,18 @@ noinst_PROGRAMS = $(TEST_PROGS) \
testactionbar \
testwindowsize \
testpopover \
- gdkgears \
listmodel \
testpopup \
+ testpopupat \
$(NULL)
+if HAVE_OPENGL
+noinst_PROGRAMS +=
-+ testglarea \
-+ testglblending \
++ testglarea \
++ testglblending \
+ gdkgears
+endif
+
- if USE_X11
- noinst_PROGRAMS += testerrors
+ if USE_WAYLAND
+ noinst_PROGRAMS += testforeign
endif
diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c
-index e0ebee0..703643c 100644
+index 24540e3..e0f863a 100644
--- a/testsuite/gtk/objects-finalize.c
+++ b/testsuite/gtk/objects-finalize.c
-@@ -115,8 +115,10 @@ main (int argc, char **argv)
+@@ -116,7 +116,9 @@ main (int argc, char **argv)
all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_CORE &&
all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_XI2 &&
all_types[i] != GDK_TYPE_X11_DISPLAY_MANAGER &&
+#ifdef HAVE_OPENGL
all_types[i] != GDK_TYPE_X11_GL_CONTEXT &&
- #endif
+#endif
+ #endif
/* Not allowed to finalize a GdkPixbufLoader without calling gdk_pixbuf_loader_close() */
all_types[i] != GDK_TYPE_PIXBUF_LOADER &&
- all_types[i] != gdk_pixbuf_simple_anim_iter_get_type())
diff --git a/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch b/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
deleted file mode 100644
index 634b3a46ff..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 97b78e566634579bbae51be914aeaaa921137a8b Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 9 Jun 2016 11:21:36 +0300
-Subject: [PATCH 4/4] configure.ac: Fix wayland-protocols path
-
-The wayland-protocols directory is used during build: Fix the path
-to point to sysroot specified in recipe.
-
-Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
-breaks multilib gtk+ as it would point to multilib sysroot when the
-(allarch) wayland-protocols is actually in the machine sysroot.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index a3e9beb..dde9dc5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -461,7 +461,7 @@ fi
- if test "$enable_wayland_backend" = "yes"; then
- # For the cairo image backend
- cairo_backends="$cairo_backends cairo"
-- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
-+ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
- GDK_BACKENDS="$GDK_BACKENDS wayland"
- GDK_WINDOWING="$GDK_WINDOWING
- #define GDK_WINDOWING_WAYLAND"
---
-2.1.4
-
diff --git a/meta/recipes-gnome/gtk+/gtk+3/link_fribidi.patch b/meta/recipes-gnome/gtk+/gtk+3/link_fribidi.patch
new file mode 100644
index 0000000000..e4bbd799f1
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+3/link_fribidi.patch
@@ -0,0 +1,19 @@
+Link with libfribidi, this is to avoid under linking where these functions are
+used but the library is not linked in, and they are marked undefined by BFD linker
+but gold linker refuses to link
+
+| ./.libs/libgdk-3.so: error: undefined reference to 'fribidi_get_bidi_type'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+--- a/gdk/Makefile.am
++++ b/gdk/Makefile.am
+@@ -55,6 +55,7 @@ LDADD = \
+ -version-info $(LT_VERSION_INFO) \
+ -export-dynamic \
+ -rpath $(libdir) \
++ -lfribidi \
+ $(no_undefined)
+
+ #
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb b/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb
deleted file mode 100644
index 9a0bfc4ba6..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require gtk+3.inc
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
- file://0001-Hardcoded-libtool.patch \
- file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
- file://0003-Add-disable-opengl-configure-option.patch \
- file://0004-configure.ac-Fix-wayland-protocols-path.patch \
- "
-SRC_URI[md5sum] = "cc76cac5e18c772c6784bf19a3dff08b"
-SRC_URI[sha256sum] = "83a609ba2f3424b5509e73967c49c67833af466d6f91081b24ee5c64fce6ac17"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
- file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
- file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
- file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.24.13.bb b/meta/recipes-gnome/gtk+/gtk+3_3.24.13.bb
new file mode 100644
index 0000000000..18976b54c5
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+3_3.24.13.bb
@@ -0,0 +1,19 @@
+require gtk+3.inc
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+ file://0001-Hardcoded-libtool.patch \
+ file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
+ file://0003-Add-disable-opengl-configure-option.patch \
+ file://link_fribidi.patch \
+ "
+SRC_URI[md5sum] = "f65515e7bfa2199bd2188e871d69c686"
+SRC_URI[sha256sum] = "4c775c38cf1e3c534ef0ca52ca6c7a890fe169981af66141c713e054e68930a9"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+ file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+ file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+ file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.30.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.30.bb
deleted file mode 100644
index 4fe990d5cb..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+_2.24.30.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-require gtk+.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
- file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
- file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
- file://xsettings.patch \
- file://hardcoded_libtool.patch \
- file://toggle-font.diff;striplevel=0 \
- file://doc-fixes.patch \
- file://strict-prototypes.patch \
- "
-
-SRC_URI[md5sum] = "04568ba5c58b75e3c7543e45628ad789"
-SRC_URI[sha256sum] = "0d15cec3b6d55c60eac205b1f3ba81a1ed4eadd9d0f8e7c508bc7065d0c4ca50"
-
-EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
-
-LIBV = "2.10.0"
-
-PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
-
-python populate_packages_prepend () {
- gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
- immodules_root = os.path.join(gtk_libdir, 'immodules')
- printmodules_root = os.path.join(gtk_libdir, 'printbackends');
-
- d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
- do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
-
- if (d.getVar('DEBIAN_NAMES', True)):
- d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
-}
diff --git a/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.20.9.bb b/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.20.9.bb
deleted file mode 100644
index 71c1d6280e..0000000000
--- a/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.20.9.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "Native icon utils for GTK+"
-DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
-SECTION = "libs"
-
-DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
- file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
-SRC_URI[md5sum] = "cc76cac5e18c772c6784bf19a3dff08b"
-SRC_URI[sha256sum] = "83a609ba2f3424b5509e73967c49c67833af466d6f91081b24ee5c64fce6ac17"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
- file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
- file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
- file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-inherit pkgconfig native upstream-version-is-even
-
-PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
-
-do_configure() {
- # Quite ugly but defines enough to compile the tools.
- if ! test -f gtk/config.h; then
- echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
- echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
- echo "#define HAVE_FTW_H 1" >> gtk/config.h
- fi
- if ! test -f gdk/config.h; then
- touch gdk/config.h
- fi
-}
-
-do_compile() {
- ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- ${S}/gtk/updateiconcache.c \
- $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
- -o gtk-update-icon-cache
-
- ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- ${S}/gtk/encodesymbolic.c \
- $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
- -o gtk-encode-symbolic-svg
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
- install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
-
- create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
- create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-}
diff --git a/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch b/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch
deleted file mode 100644
index 237f803755..0000000000
--- a/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 4d09ff324419fe4e671233044e424378da53969b Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 9 Jun 2015 14:20:30 +0300
-Subject: [PATCH] Remove Gdk-dependency from gtk-encode-symbolic-svg
-
-Building gtk-encode-symbolic-svg without building Gdk is useful
-as only the icon tools are needed on the native build: this makes
-native build much faster and requires much less dependencies.
-
-Upstream-Status: Pending
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- gtk/encodesymbolic.c | 36 ++++++++++--------------------------
- 1 file changed, 10 insertions(+), 26 deletions(-)
-
-diff --git a/gtk/encodesymbolic.c b/gtk/encodesymbolic.c
-index 9f7d015..1f07563 100644
---- a/gtk/encodesymbolic.c
-+++ b/gtk/encodesymbolic.c
-@@ -19,7 +19,6 @@
-
- #include <glib.h>
- #include <gdk-pixbuf/gdk-pixdata.h>
--#include <gdk/gdk.h>
- #include <glib/gi18n.h>
-
- #ifdef HAVE_UNISTD_H
-@@ -43,30 +42,18 @@ static GdkPixbuf *
- load_symbolic_svg (char *file_data, gsize file_len,
- int width,
- int height,
-- const GdkRGBA *fg,
-- const GdkRGBA *success_color,
-- const GdkRGBA *warning_color,
-- const GdkRGBA *error_color,
-+ const char *css_fg,
-+ const char *css_success,
-+ const char *css_warning,
-+ const char *css_error,
- GError **error)
- {
- GInputStream *stream;
- GdkPixbuf *pixbuf;
-- gchar *css_fg;
-- gchar *css_success;
-- gchar *css_warning;
-- gchar *css_error;
- gchar *data;
- gchar *svg_width, *svg_height;
- gchar *escaped_file_data;
-
-- css_fg = gdk_rgba_to_string (fg);
--
-- css_success = css_warning = css_error = NULL;
--
-- css_warning = gdk_rgba_to_string (warning_color);
-- css_error = gdk_rgba_to_string (error_color);
-- css_success = gdk_rgba_to_string (success_color);
--
- /* Fetch size from the original icon */
- stream = g_memory_input_stream_new_from_data (file_data, file_len, NULL);
- pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, error);
-@@ -105,10 +92,6 @@ load_symbolic_svg (char *file_data, gsize file_len,
- "</svg>",
- NULL);
- g_free (escaped_file_data);
-- g_free (css_fg);
-- g_free (css_warning);
-- g_free (css_error);
-- g_free (css_success);
- g_free (svg_width);
- g_free (svg_height);
-
-@@ -167,7 +150,8 @@ make_symbolic_pixbuf (char *file,
- GError **error)
-
- {
-- GdkRGBA r = { 1,0,0,1}, g = {0,1,0,1};
-+ const char r[] = "rgba(255,0,0,1)";
-+ const char g[] = "rgba(0,255,0,1)";
- GdkPixbuf *loaded;
- GdkPixbuf *pixbuf;
- int plane;
-@@ -196,10 +180,10 @@ make_symbolic_pixbuf (char *file,
- * the "rest", as all color fractions should add up to 1.
- */
- loaded = load_symbolic_svg (file_data, file_len, width, height,
-- &g,
-- plane == 0 ? &r : &g,
-- plane == 1 ? &r : &g,
-- plane == 2 ? &r : &g,
-+ g,
-+ plane == 0 ? r : g,
-+ plane == 1 ? r : g,
-+ plane == 2 ? r : g,
- error);
- if (loaded == NULL)
- return NULL;
---
-2.1.4
-
diff --git a/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch b/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch
deleted file mode 100644
index 4a9028742c..0000000000
--- a/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e733241fb580f032efbbe684ec35d4c9d27f1595 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 8 Sep 2016 13:38:39 +0300
-Subject: [PATCH] Do not error out if perl is not found or its version is too
- old.
-
-This allows use to avoid depending on perl-native if we're not going
-to use it (when api-docs are disabled).
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2a61d6e..29415bd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -36,7 +36,7 @@ dnl Check for Perl.
- dnl
- AC_PATH_PROG([PERL], [perl])
- if test -z "$PERL"; then
-- AC_MSG_ERROR([perl not found])
-+ AC_MSG_WARN([perl not found])
- fi
-
- AC_MSG_CHECKING([if Perl version >= 5.18.0])
-@@ -44,7 +44,7 @@ if "$PERL" -e "require v5.18.0"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
-- AC_MSG_ERROR([perl >= 5.18.0 is required for gtk-doc])
-+ AC_MSG_WARN([perl >= 5.18.0 is required for gtk-doc])
- fi
-
- dnl
---
-2.9.3
-
diff --git a/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch b/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
index 477fc9ae8c..19e05f1b99 100644
--- a/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
+++ b/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
@@ -1,4 +1,4 @@
-From 6fab82b93c7bd301eb42448515b02f7cb3306897 Mon Sep 17 00:00:00 2001
+From 80e6aff72affa6d92f5abd7ff6353dfc4a7bff38 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 31 Aug 2016 16:44:46 +0300
Subject: [PATCH] Do not hardocode paths to perl/python in scripts.
@@ -9,131 +9,131 @@ on targets either.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
- gtkdoc-check.in | 2 +-
- gtkdoc-common.pl.in | 2 +-
- gtkdoc-depscan.in | 2 +-
- gtkdoc-fixxref.in | 2 +-
- gtkdoc-mkdb.in | 2 +-
- gtkdoc-mktmpl.in | 2 +-
- gtkdoc-rebase.in | 2 +-
- gtkdoc-scan.in | 2 +-
- gtkdoc-scangobj.in | 2 +-
- tests/tools.sh.in | 4 ++--
- 10 files changed, 11 insertions(+), 11 deletions(-)
+ gtkdoc-check.in | 2 +-
+ gtkdoc-depscan.in | 2 +-
+ gtkdoc-fixxref.in | 2 +-
+ gtkdoc-mkdb.in | 2 +-
+ gtkdoc-mkhtml.in | 2 +-
+ gtkdoc-mkman.in | 2 +-
+ gtkdoc-mkpdf.in | 2 +-
+ gtkdoc-rebase.in | 2 +-
+ gtkdoc-scan.in | 2 +-
+ gtkdoc-scangobj.in | 2 +-
+ tests/tools.sh.in | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/gtkdoc-check.in b/gtkdoc-check.in
-index 560d69b..b60857f 100755
+index 8c8e917..f6a25f6 100755
--- a/gtkdoc-check.in
+++ b/gtkdoc-check.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
- #
- # gtk-doc - GTK DocBook documentation generator.
-diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in
-index 4747396..cfadb78 100644
---- a/gtkdoc-common.pl.in
-+++ b/gtkdoc-common.pl.in
-@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-depscan.in b/gtkdoc-depscan.in
-index 83af01b..917e247 100644
+index 9bfaf30..aadc952 100755
--- a/gtkdoc-depscan.in
+++ b/gtkdoc-depscan.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
-+#!/usr/bin/env python
++#!/usr/bin/env python3
- import gzip, os.path, re
+ from __future__ import print_function
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
-index 3d9e8d0..d55190b 100755
+index 44f6bd1..26fbd93 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
-index 8dd6d5e..d808750 100755
+index 42d5731..3a56d56 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-mkhtml.in b/gtkdoc-mkhtml.in
+index 0d0a15d..914ff55 100755
+--- a/gtkdoc-mkhtml.in
++++ b/gtkdoc-mkhtml.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-mkman.in b/gtkdoc-mkman.in
+index c5445cd..65db71a 100755
+--- a/gtkdoc-mkman.in
++++ b/gtkdoc-mkman.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
#
# gtk-doc - GTK DocBook documentation generator.
-diff --git a/gtkdoc-mktmpl.in b/gtkdoc-mktmpl.in
-index c64dfd3..2f46c18 100755
---- a/gtkdoc-mktmpl.in
-+++ b/gtkdoc-mktmpl.in
+diff --git a/gtkdoc-mkpdf.in b/gtkdoc-mkpdf.in
+index e8c0c03..f807236 100755
+--- a/gtkdoc-mkpdf.in
++++ b/gtkdoc-mkpdf.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-rebase.in b/gtkdoc-rebase.in
-index 375482d..cf05b45 100644
+index 17a71c2..ec3fd28 100755
--- a/gtkdoc-rebase.in
+++ b/gtkdoc-rebase.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
-index 048e5c9..78c6136 100755
+index 954c811..f461504 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
-index fb66b76..67ee8f7 100644
+index 4cbe130..52c2c24 100755
--- a/gtkdoc-scangobj.in
+++ b/gtkdoc-scangobj.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/tests/tools.sh.in b/tests/tools.sh.in
-index a114a42..7073883 100644
+index 343844a..9dc6692 100644
--- a/tests/tools.sh.in
+++ b/tests/tools.sh.in
-@@ -11,7 +11,7 @@ echo "Running suite(s): gtk-doc-$suite";
-
- # test perl scripts
- for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj ; do
-- @PERL@ -cwT `which $file`
-+ perl -cwT `which $file`
- if test $? = 1 ; then failed=`expr $failed + 1`; fi
- tested=`expr $tested + 1`
+@@ -30,7 +30,7 @@ done
+ # TODO: also test the module files
+ for file in gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml gtkdoc-mkhtml2 gtkdoc-mkman gtkdoc-mkpdf gtkdoc-rebase gtkdoc-scangobj; do
+ fullfile=`which $file`
+- @PYTHON@ -m py_compile $fullfile
++ python3 -m py_compile $fullfile
+ if test $? != 0 ; then failed=`expr $failed + 1`; fi
+ tested=`expr $tested + 1`
done
-@@ -34,7 +34,7 @@ done
-
-
- # test python scripts
--@PYTHON@ -m py_compile `which gtkdoc-depscan`
-+python -m py_compile `which gtkdoc-depscan`
- if test $? != 0 ; then failed=`expr $failed + 1`; fi
- tested=`expr $tested + 1`
-
---
-2.9.3
-
diff --git a/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch b/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch
new file mode 100644
index 0000000000..21c2db7826
--- /dev/null
+++ b/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch
@@ -0,0 +1,46 @@
+From 78bbf185934147a69ceb4b617d424e12e70997bf Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 27 Jun 2017 21:00:58 +0100
+Subject: [PATCH 3/3] gtk-doc: Handle floating gtk-doc dependency
+
+Allow the tests to be explicitly disabled to avoid floating dependnecy
+issues. This is not really an issue with RSS but is on previous releases.
+
+RP 2017/6/27
+Upstream-Status: Pending
+
+---
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 684e2d1..e5e3aab 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -146,6 +146,11 @@ if test "x$GCC" = "xyes"; then
+ fi
+ fi
+
++AC_ARG_ENABLE([tests],
++ AS_HELP_STRING([--enable-tests],
++ [enable tests (default=yes)]),,
++ [enable_tests="yes"])
++
+ dnl if glib is available we can enable the tests
+ PKG_CHECK_MODULES(TEST_DEPS, [glib-2.0 >= 2.6.0 gobject-2.0 >= 2.6.0],
+ [ glib_prefix="`$PKG_CONFIG --variable=prefix glib-2.0`"
+@@ -156,6 +161,11 @@ PKG_CHECK_MODULES(TEST_DEPS, [glib-2.0 >= 2.6.0 gobject-2.0 >= 2.6.0],
+ build_tests="no"
+ ]
+ )
++if test "x$enable_tests" != "xyes"; then
++ gtk_doc_use_libtool="no"
++ build_tests="no"
++fi
++
+ AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL" -a x$gtk_doc_use_libtool = xyes )
+ dnl this enables the rule in test/Makefile.am
+ AM_CONDITIONAL(BUILD_TESTS, test x$build_tests = xyes)
+--
+2.14.1
+
diff --git a/meta/recipes-gnome/gtk-doc/files/no-clobber.patch b/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
new file mode 100644
index 0000000000..d1695479dc
--- /dev/null
+++ b/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
@@ -0,0 +1,40 @@
+From 8bc4c1f169f89bc5531da5b7e892b8f20e0f9a18 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 21 Mar 2018 14:47:29 +0000
+Subject: [PATCH] gtk-doc: don't regenerate gtk-doc in do_install
+
+In out-of-tree builds gtk-doc's setup-build target copies all the content from $srcdir to $builddir.
+
+However, if some of this content is regenerated at configure time this can happen:
+
+1) configure writes new build/version.xml
+2) make compile copies content, including the tarball's src/version.xml
+ to build/version.xml, and generates gtk-doc.
+3) make install notices build/version.xml is older than configure.status,
+ so regenerates gtk-doc.
+
+gtk-doc generation is a slow process at the best of times, so doing it twice isn't good.
+
+Solve this by changing cp --force to cp --no-clobber, so setup-build only copies
+files which don't already exist.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=794571]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ buildsystems/autotools/gtk-doc.make | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildsystems/autotools/gtk-doc.make b/buildsystems/autotools/gtk-doc.make
+index 7d9a27f..8cb336d 100644
+--- a/buildsystems/autotools/gtk-doc.make
++++ b/buildsystems/autotools/gtk-doc.make
+@@ -111,7 +111,7 @@ setup-build.stamp:
+ destdir=`dirname $(abs_builddir)/$$file`; \
+ test -d "$$destdir" || mkdir -p "$$destdir"; \
+ test -f $(abs_srcdir)/$$file && \
+- cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
++ cp -pn $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
+ done; \
+ fi; \
+ fi
diff --git a/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch b/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
index c7688704eb..5ca4e3e086 100644
--- a/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
+++ b/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
@@ -1,24 +1,32 @@
-Use native pkg-config when looking for gtk-doc.
+From 657310f3842c84d28f6b77e8ad4d9b93472ca5da Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 5 Sep 2016 22:25:44 +0100
+Subject: [PATCH] Use native pkg-config when looking for gtk-doc.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
-diff --git a/gtk-doc.m4 b/gtk-doc.m4
-index 3675543..94881ae 100644
---- a/gtk-doc.m4
-+++ b/gtk-doc.m4
-@@ -1,6 +1,6 @@
- dnl -*- mode: autoconf -*-
+---
+ buildsystems/autotools/gtk-doc.m4 | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+diff --git a/buildsystems/autotools/gtk-doc.m4 b/buildsystems/autotools/gtk-doc.m4
+index 2d12f01..e5afc3f 100644
+--- a/buildsystems/autotools/gtk-doc.m4
++++ b/buildsystems/autotools/gtk-doc.m4
+@@ -25,7 +25,7 @@
+ # Macro appear in them. The GNU General Public License (GPL) does govern
+ # all other use of the material that constitutes the Autoconf Macro.
+
-# serial 2
+# serial 2.1
-
+
dnl Usage:
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
-@@ -10,11 +10,16 @@ AC_DEFUN([GTK_DOC_CHECK],
+@@ -35,11 +35,16 @@ AC_DEFUN([GTK_DOC_CHECK],
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-
+
+ gtkdoc_pkgconfig_save=$PKG_CONFIG
+ PKG_CONFIG=pkg-config-native
+
@@ -26,7 +34,7 @@ index 3675543..94881ae 100644
AC_MSG_CHECKING([for gtk-doc])
PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
AC_MSG_RESULT($have_gtk_doc)
-
+
+ PKG_CONFIG=$gtkdoc_pkgconfig_save
+
if test "$have_gtk_doc" = "no"; then
diff --git a/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb b/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
deleted file mode 100644
index 6af996e359..0000000000
--- a/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Documentation generator for glib-based software"
-DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \
- from glib-based software and produce a set of html documentation files from them"
-HOMEPAGE = "http://www.gtk.org/gtk-doc/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-inherit gnomebase
-
-# Configure the scripts correctly (and build their dependencies) only if they are actually
-# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
-PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}"
-
-# This will cause target gtk-doc to hardcode paths of native dependencies
-# into its scripts. This means that target gtk-doc package is broken;
-# hopefully no one minds because its scripts are not used for anything during build
-# and shouldn't be used on targets.
-PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native perl-native"
-
-# We cannot use host perl, because it may be too old for gtk-doc
-EXTRANATIVEPATH += "perl-native"
-
-SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
- file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
- file://0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch \
- "
-SRC_URI_append_class-native = " file://pkg-config-native.patch"
-
-SRC_URI[archive.md5sum] = "0dc6570953112a464a409fb99258ccbc"
-SRC_URI[archive.sha256sum] = "1ea46ed400e6501f975acaafea31479cea8f32f911dca4dff036f59e6464fd42"
-
-BBCLASSEXTEND = "native"
-
-# Do not check for XML catalogs when building because that
-# information is not used for anything during build. Recipe
-# dependencies make sure we have all the right bits.
-do_configure_prepend() {
- sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac
-}
-
-FILES_${PN} += "${datadir}/sgml"
-FILES_${PN}-dev += "${libdir}/cmake"
-FILES_${PN}-doc = ""
-
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess"
-gtkdoc_makefiles_sysroot_preprocess() {
- # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
- # instead of libtool wrapper or running them directly
- sed -i \
- -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
- ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make
-}
diff --git a/meta/recipes-gnome/gtk-doc/gtk-doc_1.32.bb b/meta/recipes-gnome/gtk-doc/gtk-doc_1.32.bb
new file mode 100644
index 0000000000..50d4d99722
--- /dev/null
+++ b/meta/recipes-gnome/gtk-doc/gtk-doc_1.32.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Documentation generator for glib-based software"
+DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \
+ from glib-based software and produce a set of html documentation files from them"
+HOMEPAGE = "http://www.gtk.org/gtk-doc/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit gnomebase
+
+# Configure the scripts correctly (and build their dependencies) only if they are actually
+# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}"
+
+# This will cause target gtk-doc to hardcode paths of native dependencies
+# into its scripts. This means that target gtk-doc package is broken;
+# hopefully no one minds because its scripts are not used for anything during build
+# and shouldn't be used on targets.
+PACKAGECONFIG[working-scripts] = ",,libxslt-native xmlto-native python3-six python3-pygments"
+PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,glib-2.0"
+
+SRC_URI[archive.md5sum] = "07764836262e154e94922e5f2aa476ae"
+SRC_URI[archive.sha256sum] = "de0ef034fb17cb21ab0c635ec730d19746bce52984a6706e7bbec6fb5e0b907c"
+SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
+ file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
+ file://conditionaltests.patch \
+ file://no-clobber.patch \
+ "
+SRC_URI_append_class-native = " file://pkg-config-native.patch"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Do not check for XML catalogs when building because that
+# information is not used for anything during build. Recipe
+# dependencies make sure we have all the right bits.
+do_configure_prepend() {
+ sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac
+}
+
+FILES_${PN} += "${datadir}/sgml"
+FILES_${PN}-dev += "${libdir}/cmake"
+FILES_${PN}-doc = ""
+
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess"
+gtkdoc_makefiles_sysroot_preprocess() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make
+}
diff --git a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb
deleted file mode 100644
index a704632ca9..0000000000
--- a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Default icon theme that all icon themes automatically inherit from"
-HOMEPAGE = "http://icon-theme.freedesktop.org/wiki/HicolorTheme"
-BUGTRACKER = "https://bugs.freedesktop.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426"
-
-SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "6aa2b3993a883d85017c7cc0cfc0fb73"
-SRC_URI[sha256sum] = "9cc45ac3318c31212ea2d8cb99e64020732393ee7630fa6c1810af5f987033cc"
-
-inherit allarch autotools
-
-FILES_${PN} += "${datadir}/icons"
diff --git a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
new file mode 100644
index 0000000000..74e3430528
--- /dev/null
+++ b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Default icon theme that all icon themes automatically inherit from"
+DESCRIPTION = "The hicolor-icon-theme package contains a default fallback \
+theme for implementations of the icon theme specification."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/icon-theme"
+BUGTRACKER = "https://bugs.freedesktop.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426"
+
+SRC_URI = "https://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "84eec8d6f810240a069c731f1870b474"
+SRC_URI[sha256sum] = "317484352271d18cbbcfac3868eab798d67fff1b8402e740baa6ff41d588a9d8"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/icons"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-gnome/json-glib/json-glib/run-ptest b/meta/recipes-gnome/json-glib/json-glib/run-ptest
new file mode 100644
index 0000000000..0c6398a177
--- /dev/null
+++ b/meta/recipes-gnome/json-glib/json-glib/run-ptest
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+gnome-desktop-testing-runner json-glib
diff --git a/meta/recipes-gnome/json-glib/json-glib_1.2.2.bb b/meta/recipes-gnome/json-glib/json-glib_1.2.2.bb
deleted file mode 100644
index 8df2a42b9a..0000000000
--- a/meta/recipes-gnome/json-glib/json-glib_1.2.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "JSON-GLib implements a full JSON parser using GLib and GObject"
-DESCRIPTION = "Use JSON-GLib it is possible to parse and generate valid JSON\
- data structures, using a DOM-like API. JSON-GLib also offers GObject \
-integration, providing the ability to serialize and deserialize GObject \
-instances to and from JSON data types."
-HOMEPAGE = "http://live.gnome.org/JsonGlib"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI[archive.md5sum] = "c1daefb8d0fb59612af0c072c8aabb58"
-SRC_URI[archive.sha256sum] = "ea128ab52a824fcd06e5448fbb2bd8d9a13740d51c66d445828edba71321a621"
-
-inherit gnomebase gettext lib_package gobject-introspection gtk-doc
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb b/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb
new file mode 100644
index 0000000000..5143d73ed7
--- /dev/null
+++ b/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb
@@ -0,0 +1,33 @@
+SUMMARY = "JSON-GLib implements a full JSON parser using GLib and GObject"
+DESCRIPTION = "Use JSON-GLib it is possible to parse and generate valid JSON\
+ data structures, using a DOM-like API. JSON-GLib also offers GObject \
+integration, providing the ability to serialize and deserialize GObject \
+instances to and from JSON data types."
+HOMEPAGE = "https://wiki.gnome.org/Projects/JsonGlib"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/json-glib/issues"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+DEPENDS = "glib-2.0"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase lib_package gobject-introspection gtk-doc gettext ptest-gnome manpages
+
+SRC_URI += "file://run-ptest"
+SRC_URI[archive.md5sum] = "4d4bb9837f6d31e32d0ce658ae135f68"
+SRC_URI[archive.sha256sum] = "720c5f4379513dc11fd97dc75336eb0c0d3338c53128044d9fabec4374f4bc47"
+
+PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native"
+
+do_install_append() {
+ if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then
+ rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir}
+ fi
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Currently it's not possible to disable gettext in Meson, so we need to force
+# this back on.
+USE_NLS_class-native = "yes"
diff --git a/meta/recipes-gnome/libdazzle/libdazzle_3.34.1.bb b/meta/recipes-gnome/libdazzle/libdazzle_3.34.1.bb
new file mode 100644
index 0000000000..1c8b2c86e0
--- /dev/null
+++ b/meta/recipes-gnome/libdazzle/libdazzle_3.34.1.bb
@@ -0,0 +1,20 @@
+SUMMARY = "The libdazzle library is a companion library to GObject and Gtk+."
+DESCRIPTION = "A wide range of components from utilities for GIO, widgets for \
+GTK+, an animation framework, state machines, paneling and high-performance \
+counters are included."
+LICENSE = "GPLv3+"
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/libdazzle"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/libdazzle/issues"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase upstream-version-is-even vala features_check gobject-introspection
+
+DEPENDS = "glib-2.0-native glib-2.0 gtk+3"
+
+SRC_URI[archive.md5sum] = "e796a92dd3f529616ed388c15208359b"
+SRC_URI[archive.sha256sum] = "3d981cbb9d9bb87bfaff7bfd44d9847223b3ef81e69225e4d1f6ac725a669505"
+
+GIR_MESON_OPTION = 'with_introspection'
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
diff --git a/meta/recipes-gnome/libgudev/libgudev_230.bb b/meta/recipes-gnome/libgudev/libgudev_230.bb
deleted file mode 100644
index 709553bd0c..0000000000
--- a/meta/recipes-gnome/libgudev/libgudev_230.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "GObject wrapper for libudev"
-
-SRC_URI[archive.md5sum] = "e4dee8f3f349e9372213d33887819a4d"
-SRC_URI[archive.sha256sum] = "a2e77faced0c66d7498403adefcc0707105e03db71a2b2abd620025b86347c18"
-
-DEPENDS = "glib-2.0 udev"
-
-RCONFLICTS_${PN} = "systemd (<= 220)"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-inherit gnomebase gobject-introspection gtk-doc
-
-UPSTREAM_CHECK_URI = "http://ftp.gnome.org/pub/GNOME/sources/libgudev/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>(\d+))"
diff --git a/meta/recipes-gnome/libgudev/libgudev_233.bb b/meta/recipes-gnome/libgudev/libgudev_233.bb
new file mode 100644
index 0000000000..8bc379ff62
--- /dev/null
+++ b/meta/recipes-gnome/libgudev/libgudev_233.bb
@@ -0,0 +1,23 @@
+SUMMARY = "GObject wrapper for libudev"
+DESCRIPTION = "This library makes it much simpler to use libudev from programs \
+already using GObject. It also makes it possible to easily use libudev from \
+other programming languages, such as Javascript, because of GObject \
+introspection support."
+HOMEPAGE = "https://wiki.gnome.org/Projects/libgudev"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/libgudev/issues"
+SRC_URI[archive.sha256sum] = "587c4970eb23f4e2deee2cb1fb7838c94a78c578f41ce12cac0a3f4a80dabb03"
+SRC_URI[archive.md5sum] = "d59a317a40aaa02a2226056c0bb4d3e1"
+
+DEPENDS = "glib-2.0 udev"
+
+EXTRA_OECONF = "--disable-umockdev"
+
+RCONFLICTS_${PN} = "systemd (<= 220)"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+inherit gnomebase gobject-introspection gtk-doc
+
+UPSTREAM_CHECK_URI = "http://ftp.gnome.org/pub/GNOME/sources/libgudev/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>(\d+))"
diff --git a/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb b/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb
deleted file mode 100644
index ce8e5ae21a..0000000000
--- a/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Library for sending desktop notifications to a notification daemon"
-SECTION = "libs"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-DEPENDS = "dbus gtk+3 dbus-glib"
-
-inherit gnomebase gtk-doc distro_features_check gobject-introspection
-# depends on gtk+3
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-SRC_URI[archive.md5sum] = "a4997019d08f46f3bf57b78e6f795a59"
-SRC_URI[archive.sha256sum] = "0ef61ca400d30e28217979bfa0e73a7406b19c32dd76150654ec5b2bdf47d837"
-
-# there were times, we had two versions of libnotify (oe-core libnotify:0.6.x /
-# meta-gnome libnotify3: 0.7.x)
-PROVIDES += "libnotify3"
-RPROVIDES_${PN} += "libnotify3"
-RCONFLICTS_${PN} += "libnotify3"
-RREPLACES_${PN} += "libnotify3"
diff --git a/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb b/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb
new file mode 100644
index 0000000000..0306b04f4e
--- /dev/null
+++ b/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Library for sending desktop notifications to a notification daemon"
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/libnotify"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/libnotify/issues"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+DEPENDS = "dbus gtk+3 glib-2.0"
+
+inherit gnomebase gtk-doc features_check gobject-introspection
+# depends on gtk+3
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+SRC_URI[archive.md5sum] = "babb4b07b5f21bef42a386d3d7019599"
+SRC_URI[archive.sha256sum] = "69209e0b663776a00c7b6c0e560302a8dbf66b2551d55616304f240bba66e18c"
+
+# there were times, we had two versions of libnotify (oe-core libnotify:0.6.x /
+# meta-gnome libnotify3: 0.7.x)
+PROVIDES += "libnotify3"
+RPROVIDES_${PN} += "libnotify3"
+RCONFLICTS_${PN} += "libnotify3"
+RREPLACES_${PN} += "libnotify3"
diff --git a/meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch b/meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch
new file mode 100644
index 0000000000..954bb60880
--- /dev/null
+++ b/meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch
@@ -0,0 +1,35 @@
+From b99891e31eb6ce550e7e1cb2ca592095b3050a93 Mon Sep 17 00:00:00 2001
+From: Brion Vibber <brion@pobox.com>
+Date: Sun, 25 Feb 2018 18:42:36 -0800
+Subject: Auto-detect -Bsymbolic, fixes configure on macOS
+
+The -Bsymbolic linker option is ELF-specific, and was breaking
+configure on macOS unless --disable-Bsymbolic was explicitly passed.
+
+Switching the behavior from requiring -Bsymbolic to be available
+by default to just warning and continuing on without.
+
+Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/211
+
+Upstream-Status: Backport
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 15b26b2d..9f8dce29 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -216,7 +216,7 @@ AM_CONDITIONAL([ENABLE_PIXBUF_LOADER],[test "$enable_pixbuf_loader" = "yes"])
+ AC_ARG_ENABLE([Bsymbolic],
+ [AS_HELP_STRING([--disable-Bsymbolic],
+ [disable linking with -Bsymbolic])],
+- [],[enable_Bsymbolic=yes])
++ [enable_Bsymbolic=no],[enable_Bsymbolic=auto])
+
+ BSYMBOLIC_LDFLAG=
+ if test "$enable_Bsymbolic" != "no"; then
+--
+2.20.1
+
diff --git a/meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch b/meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch
new file mode 100644
index 0000000000..75fc7f9d0b
--- /dev/null
+++ b/meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch
@@ -0,0 +1,30 @@
+From bea5156cd7e7122715b26c769c35928141a1da2c Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Mon, 18 Nov 2019 14:46:34 -0600
+Subject: [PATCH] Remove non-reproducible SRCDIR
+
+Removes SRCDIR as the prefix for finding the test font. This wouldn't
+work anyway, since that path is not present on the target.
+
+This patch is specific to OE, since it appears that this entire method
+of testing was removed when upstream was re-written in rust
+
+Upstream-Status: Inappropriate [OE-specific, no longer present upstream]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ rsvg-cairo-draw.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rsvg-cairo-draw.c b/rsvg-cairo-draw.c
+index caa9104..cfb7ed2 100644
+--- a/rsvg-cairo-draw.c
++++ b/rsvg-cairo-draw.c
+@@ -398,7 +398,7 @@ set_font_options_for_testing (PangoContext *context)
+ static void
+ create_font_config_for_testing (RsvgCairoRender *render)
+ {
+- const char *font_path = SRCDIR "/tests/resources/LiberationSans-Regular.ttf";
++ const char *font_path = "/tests/resources/LiberationSans-Regular.ttf";
+
+ if (render->font_config_for_testing != NULL)
+ return;
diff --git a/meta/recipes-gnome/librsvg/librsvg_2.40.16.bb b/meta/recipes-gnome/librsvg/librsvg_2.40.16.bb
deleted file mode 100644
index ed54d9de39..0000000000
--- a/meta/recipes-gnome/librsvg/librsvg_2.40.16.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Library for rendering SVG files"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
-
-SECTION = "x11/utils"
-DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
-BBCLASSEXTEND = "native"
-
-inherit autotools pkgconfig gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
-
-SRC_URI += "file://gtk-option.patch"
-
-SRC_URI[archive.md5sum] = "f474fe37177a2bf8050787df2046095c"
-SRC_URI[archive.sha256sum] = "d48bcf6b03fa98f07df10332fb49d8c010786ddca6ab34cbba217684f533ff2e"
-
-CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-# The older ld (2.22) on the host (Centos 6.5) doesn't have the
-# -Bsymbolic-functions option, we can disable it for native.
-EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
-
-PACKAGECONFIG ??= "gdkpixbuf"
-# The gdk-pixbuf loader
-PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
-# GTK+ test application (rsvg-view)
-PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
-
-do_install_append() {
- # Loadable modules don't need .a or .la on Linux
- rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
-}
-
-PACKAGES =+ "librsvg-gtk rsvg"
-FILES_rsvg = "${bindir}/rsvg* \
- ${datadir}/pixmaps/svg-viewer.svg \
- ${datadir}/themes"
-FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so"
-
-PIXBUF_PACKAGES = "librsvg-gtk"
-
-PIXBUFCACHE_SYSROOT_DEPS_append_class-native = " harfbuzz-native:do_populate_sysroot_setscene pango-native:do_populate_sysroot_setscene icu-native:do_populate_sysroot_setscene"
diff --git a/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb b/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb
new file mode 100644
index 0000000000..6dd0533a5d
--- /dev/null
+++ b/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Library for rendering SVG files"
+DESCRIPTION = "A small library to render Scalable Vector Graphics (SVG), \
+associated with the GNOME Project. It renders SVG files to Cairo surfaces. \
+Cairo is the 2D, antialiased drawing library that GNOME uses to draw things to \
+the screen or to generate output for printing."
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/librsvg"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/librsvg/issues"
+
+RECIPE_NO_UPDATE_REASON = "Versions from 2.41.0 requires Rust compiler to build it"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
+
+SECTION = "x11/utils"
+DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
+BBCLASSEXTEND = "native"
+
+inherit gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://gtk-option.patch \
+ file://0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch \
+ file://0001-Remove-non-reproducible-SRCDIR.patch \
+"
+
+SRC_URI[archive.md5sum] = "4949d313b0c5d9161a5c259104af5568"
+SRC_URI[archive.sha256sum] = "cff4dd3c3b78bfe99d8fcfad3b8ba1eee3289a0823c0e118d78106be6b84c92b"
+
+CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+PACKAGECONFIG ??= "gdkpixbuf"
+# The gdk-pixbuf loader
+PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
+# GTK+ test application (rsvg-view)
+PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
+
+do_install_append() {
+ # Loadable modules don't need .a or .la on Linux
+ rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
+}
+
+PACKAGES =+ "librsvg-gtk rsvg"
+FILES_rsvg = "${bindir}/rsvg* \
+ ${datadir}/pixmaps/svg-viewer.svg \
+ ${datadir}/themes"
+FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so \
+ ${datadir}/thumbnailers/librsvg.thumbnailer"
+RRECOMMENDS_librsvg-gtk = "gdk-pixbuf-bin"
+
+PIXBUF_PACKAGES = "librsvg-gtk"
diff --git a/meta/recipes-gnome/libsecret/libsecret_0.18.5.bb b/meta/recipes-gnome/libsecret/libsecret_0.18.5.bb
deleted file mode 100644
index bcb3046dd3..0000000000
--- a/meta/recipes-gnome/libsecret/libsecret_0.18.5.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "libsecret is a library for storing and retrieving passwords and other secrets"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
-
-inherit gnomebase gtk-doc vala gobject-introspection
-
-DEPENDS += "glib-2.0 libgcrypt gettext-native intltool-native"
-
-EXTRA_OECONF += "--disable-manpages"
-
-SRC_URI[archive.md5sum] = "2d688825921313da8731313b0a7f394c"
-SRC_URI[archive.sha256sum] = "9ce7bd8dd5831f2786c935d82638ac428fa085057cc6780aba0e39375887ccb3"
-
-# http://errors.yoctoproject.org/Errors/Details/20228/
-ARM_INSTRUCTION_SET = "arm"
-
-# vapigen.m4 bundled with the tarball does not yet have our cross-compilation fixes
-do_configure_prepend() {
- rm -f ${S}/build/m4/vapigen.m4
-}
-
-# Secret-1: poky/build-mips64/tmp/work/mips64-poky-linux/libgpg-error/1.19-r0/libgpg-error-1.19/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
-# qemu: uncaught target signal 6 (Aborted) - core dumped
-EXTRA_OECONF_append_mips64 = " --disable-introspection --disable-gtk-doc"
-
diff --git a/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb b/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb
new file mode 100644
index 0000000000..3da2a4acac
--- /dev/null
+++ b/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb
@@ -0,0 +1,27 @@
+SUMMARY = "libsecret is a library for storing and retrieving passwords and other secrets"
+DESCRIPTION = "A GObject-based library for accessing the Secret Service API of \
+the freedesktop.org project, a cross-desktop effort to access passwords, \
+tokens and other types of secrets. libsecret provides a convenient wrapper \
+for these methods so consumers do not have to call the low-level DBus methods."
+LICENSE = "LGPLv2.1"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/libsecret/issues"
+LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
+
+inherit gnomebase gtk-doc vala gobject-introspection manpages
+
+DEPENDS += "glib-2.0 libgcrypt gettext-native"
+
+PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
+
+SRC_URI[archive.md5sum] = "ea673119c00570d6434f8fd3636f1eb8"
+SRC_URI[archive.sha256sum] = "8583e10179456ae2c83075d95455f156dc08db6278b32bf4bd61819335a30e3a"
+
+# http://errors.yoctoproject.org/Errors/Details/20228/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
+# vapigen.m4 bundled with the tarball does not yet have our cross-compilation fixes
+do_configure_prepend() {
+ rm -f ${S}/build/m4/vapigen.m4
+}
diff --git a/meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb b/meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb
deleted file mode 100644
index fd4ef69497..0000000000
--- a/meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Window navigation construction toolkit"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-BPN = "libwnck"
-
-SECTION = "x11/libs"
-DEPENDS = "intltool-native gtk+3 gdk-pixbuf-native libxres"
-
-PACKAGECONFIG ??= "startup-notification"
-PACKAGECONFIG[startup-notification] = "--enable-startup-notification,--disable-startup-notification,startup-notification"
-
-inherit gnomebase gobject-introspection gtk-doc
-SRC_URI[archive.md5sum] = "487938d65d4bfae1f2501052b1bd7492"
-SRC_URI[archive.sha256sum] = "1cb03716bc477058dfdf3ebfa4f534de3b13b1aa067fcd064d0b7813291cba72"
-
-inherit distro_features_check
-# libxres means x11 only
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/cairo/cairo-fpu.inc b/meta/recipes-graphics/cairo/cairo-fpu.inc
deleted file mode 100644
index ef72e8904b..0000000000
--- a/meta/recipes-graphics/cairo/cairo-fpu.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-
-def get_cairo_fpu_setting(bb, d):
- if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
- return "--disable-some-floating-point"
- return ""
-
diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
deleted file mode 100644
index c4b6f329ec..0000000000
--- a/meta/recipes-graphics/cairo/cairo.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "The Cairo 2D vector graphics library"
-DESCRIPTION = "Cairo is a multi-platform library providing anti-aliased \
-vector-based rendering for multiple target backends. Paths consist \
-of line segments and cubic splines and can be rendered at any width \
-with various join and cap styles. All colors may be specified with \
-optional translucence (opacity/alpha) and combined using the \
-extended Porter/Duff compositing algebra as found in the X Render \
-Extension."
-HOMEPAGE = "http://cairographics.org"
-BUGTRACKER = "http://bugs.freedesktop.org"
-SECTION = "libs"
-
-LICENSE = "MPL-1 & LGPLv2.1 & GPLv3+"
-LICENSE_${PN} = "MPL-1 & LGPLv2.1"
-LICENSE_${PN}-dev = "MPL-1 & LGPLv2.1"
-LICENSE_${PN}-gobject = "MPL-1 & LGPLv2.1"
-LICENSE_${PN}-script-interpreter = "MPL-1 & LGPLv2.1"
-LICENSE_${PN}-perf-utils = "GPLv3+"
-
-X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
-DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
-
-PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
-PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
-PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
-PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
-PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
-PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
-
-#check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
-require cairo-fpu.inc
-EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)} \
- --enable-tee \
- "
-
-inherit autotools pkgconfig upstream-version-is-even gtk-doc
-
-# We don't depend on binutils so we need to disable this
-export ac_cv_lib_bfd_bfd_openr="no"
-# Ensure we don't depend on LZO
-export ac_cv_lib_lzo2_lzo2a_decompress="no"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch b/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch
new file mode 100644
index 0000000000..4252a5663b
--- /dev/null
+++ b/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch
@@ -0,0 +1,34 @@
+CVE: CVE-2018-19876
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+Date: Mon, 19 Nov 2018 12:33:07 +0100
+Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in
+ cairo_ft_apply_variations
+
+Fixes a crash when using freetype >= 2.9
+---
+ src/cairo-ft-font.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
+index 325dd61b4..981973f78 100644
+--- a/src/cairo-ft-font.c
++++ b/src/cairo-ft-font.c
+@@ -2393,7 +2393,11 @@ skip:
+ done:
+ free (coords);
+ free (current_coords);
++#if HAVE_FT_DONE_MM_VAR
++ FT_Done_MM_Var (face->glyph->library, ft_mm_var);
++#else
+ free (ft_mm_var);
++#endif
+ }
+ }
+
+--
+2.11.0
+
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch b/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch
new file mode 100644
index 0000000000..5232cf70c6
--- /dev/null
+++ b/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch
@@ -0,0 +1,19 @@
+There is a potential infinite-loop in function _arc_error_normalized().
+
+CVE: CVE-2019-6461
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/src/cairo-arc.c b/src/cairo-arc.c
+index 390397bae..f9249dbeb 100644
+--- a/src/cairo-arc.c
++++ b/src/cairo-arc.c
+@@ -99,7 +99,7 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
+ do {
+ angle = M_PI / i++;
+ error = _arc_error_normalized (angle);
+- } while (error > tolerance);
++ } while (error > tolerance && error > __DBL_EPSILON__);
+
+ return angle;
+ }
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch b/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch
new file mode 100644
index 0000000000..4e4598c5b5
--- /dev/null
+++ b/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch
@@ -0,0 +1,20 @@
+There is an assertion in function _cairo_arc_in_direction().
+
+CVE: CVE-2019-6462
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/src/cairo-arc.c b/src/cairo-arc.c
+index 390397bae..1bde774a4 100644
+--- a/src/cairo-arc.c
++++ b/src/cairo-arc.c
+@@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t *cr,
+ if (cairo_status (cr))
+ return;
+
+- assert (angle_max >= angle_min);
++ if (angle_max < angle_min)
++ return;
+
+ if (angle_max - angle_min > 2 * M_PI * MAX_FULL_CIRCLES) {
+ angle_max = fmod (angle_max - angle_min, 2 * M_PI);
diff --git a/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff b/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff
new file mode 100644
index 0000000000..7aaad2eedd
--- /dev/null
+++ b/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff
@@ -0,0 +1,22 @@
+Cairo: Fix Denial-of-Service Attack due to Logical Problem in Program
+
+https://bugs.freedesktop.org/show_bug.cgi?id=100763
+
+CVE: CVE-2017-7475
+Upstream-Status: Submitted
+
+Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
+
+Index: cairo-1.15.4/src/cairo-ft-font.c
+===================================================================
+--- cairo-1.15.4.orig/src/cairo-ft-font.c
++++ cairo-1.15.4/src/cairo-ft-font.c
+@@ -1149,7 +1149,7 @@ _get_bitmap_surface (FT_Bitmap *bi
+ width = bitmap->width;
+ height = bitmap->rows;
+
+- if (width == 0 || height == 0) {
++ if (width == 0 || height == 0 || bitmap->buffer == NULL) {
+ *surface = (cairo_image_surface_t *)
+ cairo_image_surface_create_for_data (NULL, format, 0, 0, 0);
+ return (*surface)->base.status;
diff --git a/meta/recipes-graphics/cairo/cairo_1.14.6.bb b/meta/recipes-graphics/cairo/cairo_1.14.6.bb
deleted file mode 100644
index d2c1e12cde..0000000000
--- a/meta/recipes-graphics/cairo/cairo_1.14.6.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-require cairo.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
-
-SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "23a0b2f0235431d35238df1d3a517fdb"
-SRC_URI[sha256sum] = "613cb38447b76a93ff7235e17acd55a78b52ea84a9df128c3f2257f8eaa7b252"
-
-PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
-
-SUMMARY_${PN} = "The Cairo 2D vector graphics library"
-DESCRIPTION_${PN} = "Cairo is a multi-platform library providing anti-aliased \
-vector-based rendering for multiple target backends. Paths consist \
-of line segments and cubic splines and can be rendered at any width \
-with various join and cap styles. All colors may be specified with \
-optional translucence (opacity/alpha) and combined using the \
-extended Porter/Duff compositing algebra as found in the X Render \
-Extension."
-
-SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
-DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
-
-SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
-DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
-CairoScript. CairoScript is used by tracing utilities to enable the ability \
-to replay rendering."
-
-DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
-
-FILES_${PN} = "${libdir}/libcairo.so.*"
-FILES_${PN}-dev += "${libdir}/cairo/*.so"
-FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
-FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
-FILES_${PN}-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
-
-do_install_append () {
- rm -rf ${D}${bindir}/cairo-sphinx
- rm -rf ${D}${libdir}/cairo/cairo-fdr*
- rm -rf ${D}${libdir}/cairo/cairo-sphinx*
- rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
- rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
-}
diff --git a/meta/recipes-graphics/cairo/cairo_1.16.0.bb b/meta/recipes-graphics/cairo/cairo_1.16.0.bb
new file mode 100644
index 0000000000..e3de3f6164
--- /dev/null
+++ b/meta/recipes-graphics/cairo/cairo_1.16.0.bb
@@ -0,0 +1,90 @@
+SUMMARY = "The Cairo 2D vector graphics library"
+DESCRIPTION = "Cairo is a multi-platform library providing anti-aliased \
+vector-based rendering for multiple target backends. Paths consist \
+of line segments and cubic splines and can be rendered at any width \
+with various join and cap styles. All colors may be specified with \
+optional translucence (opacity/alpha) and combined using the \
+extended Porter/Duff compositing algebra as found in the X Render \
+Extension."
+HOMEPAGE = "http://cairographics.org"
+BUGTRACKER = "http://bugs.freedesktop.org"
+SECTION = "libs"
+
+LICENSE = "(MPL-1.1 | LGPLv2.1) & GPLv3+"
+LICENSE_${PN} = "MPL-1.1 | LGPLv2.1"
+LICENSE_${PN}-dev = "MPL-1.1 | LGPLv2.1"
+LICENSE_${PN}-doc = "MPL-1.1 | LGPLv2.1"
+LICENSE_${PN}-gobject = "MPL-1.1 | LGPLv2.1"
+LICENSE_${PN}-script-interpreter = "MPL-1.1 | LGPLv2.1"
+LICENSE_${PN}-perf-utils = "GPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
+
+DEPENDS = "fontconfig glib-2.0 libpng pixman zlib"
+
+SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
+ file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \
+ file://CVE-2018-19876.patch \
+ file://CVE-2019-6461.patch \
+ file://CVE-2019-6462.patch \
+ "
+
+SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552"
+SRC_URI[sha256sum] = "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
+
+inherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace"
+
+X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
+
+PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
+PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
+PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
+PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
+PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
+PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
+PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
+
+EXTRA_OECONF += " \
+ ${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \
+ --enable-tee \
+"
+
+# We don't depend on binutils so we need to disable this
+export ac_cv_lib_bfd_bfd_openr="no"
+# Ensure we don't depend on LZO
+export ac_cv_lib_lzo2_lzo2a_decompress="no"
+
+do_install_append () {
+ rm -rf ${D}${bindir}/cairo-sphinx
+ rm -rf ${D}${libdir}/cairo/cairo-fdr*
+ rm -rf ${D}${libdir}/cairo/cairo-sphinx*
+ rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
+ rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
+}
+
+PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
+
+SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
+DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
+
+SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
+DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
+CairoScript. CairoScript is used by tracing utilities to enable the ability \
+to replay rendering."
+
+DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
+
+FILES_${PN} = "${libdir}/libcairo.so.*"
+FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
+FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
+FILES_${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so"
+
+BBCLASSEXTEND = "native nativesdk"
+
+UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz"
diff --git a/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb b/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
index e3e4cde2c6..db480bd397 100644
--- a/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
+++ b/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
@@ -5,20 +5,20 @@ DESCRIPTION = "The Cantarell font typeface is designed as a \
on-screen reading; in particular, reading web pages on an \
HTC Dream mobile phone."
-HOMEPAGE = "https://git.gnome.org/browse/cantarell-fonts/"
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/cantarell-fonts/"
SECTION = "fonts"
LICENSE = "OFL-1.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=df91e3ffcab8cfb972a66bf11255188d"
-PV = "0.0.24"
+PV = "0.0.25"
-SRCREV = "07b6ea2cbbebfc360aa4668612a376be5e214eaa"
-SRC_URI = "git://git.gnome.org/cantarell-fonts;protocol=git;branch=master"
+SRCREV = "e28a9096da43984212b5b4002b949bcb8c7527f9"
+SRC_URI = "git://gitlab.gnome.org/GNOME/cantarell-fonts.git;protocol=https;branch=reconstruction-0.0.25"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(?!0\.13)(?!0\.10\.1)\d+\.\d+(\.\d+)+)"
S = "${WORKDIR}/git"
-inherit autotools allarch fontcache
+inherit autotools allarch fontcache pkgconfig
PACKAGECONFIG ??= ""
PACKAGECONFIG[fontforge] = "--enable-source-rebuild=yes,--enable-source-rebuild=no,fontforge-native"
diff --git a/meta/recipes-graphics/clutter/clutter-1.0.inc b/meta/recipes-graphics/clutter/clutter-1.0.inc
index c6ecd0804c..5dc45ebf21 100644
--- a/meta/recipes-graphics/clutter/clutter-1.0.inc
+++ b/meta/recipes-graphics/clutter/clutter-1.0.inc
@@ -1,8 +1,11 @@
SUMMARY = "Graphics library for creating hardware-accelerated user interfaces"
+DESCRIPTION = "Clutter is an Open GL based interactive canvas library, \
+designed for creating fast, mainly 2D single window applications such as media \
+box UIs, presentations, kiosk style applications and so on."
HOMEPAGE = "http://www.clutter-project.org/"
LICENSE = "LGPLv2.1+"
-inherit clutter ptest-gnome distro_features_check upstream-version-is-even gobject-introspection
+inherit clutter ptest-gnome features_check upstream-version-is-even gobject-introspection
# depends on cogl-1.0 which needs opengl
REQUIRED_DISTRO_FEATURES ?= "opengl"
@@ -35,7 +38,7 @@ PACKAGECONFIG[wayland-compositor] = "--enable-wayland-compositor,--disable-wayla
# Default configuration, distros might want to override
PACKAGECONFIG ??= "egl \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', '', d)}"
FILES_${PN}-examples = "${libdir}/clutter/examples"
diff --git a/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch b/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
index 3b6a70ef0a..ce9ab3a248 100644
--- a/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
+++ b/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
@@ -3,11 +3,11 @@ Install the examples to $libdir/clutter/.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Upstream-Status: Inappropriate
-diff --git a/examples/Makefile.am b/examples/Makefile.am
-index 4b9b449..232cd19 100644
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -38,6 +38,7 @@ AM_CPPFLAGS = \
+Index: clutter-1.26.2/examples/Makefile.am
+===================================================================
+--- clutter-1.26.2.orig/examples/Makefile.am
++++ clutter-1.26.2/examples/Makefile.am
+@@ -33,7 +33,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/clutter \
-I$(top_builddir)/clutter
@@ -16,3 +16,4 @@ index 4b9b449..232cd19 100644
+example_PROGRAMS = $(all_examples)
EXTRA_DIST = redhand.png
+
diff --git a/meta/recipes-graphics/clutter/clutter-1.0_1.26.0.bb b/meta/recipes-graphics/clutter/clutter-1.0_1.26.0.bb
deleted file mode 100644
index dfa1cfe778..0000000000
--- a/meta/recipes-graphics/clutter/clutter-1.0_1.26.0.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require clutter-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI[archive.md5sum] = "b065e9ca53d1f6bc1ec26aeb27338bb7"
-SRC_URI[archive.sha256sum] = "67514e7824b3feb4723164084b36d6ce1ae41cb3a9897e9f1a56c8334993ce06"
-SRC_URI += "file://install-examples.patch \
- file://run-installed-tests-with-tap-output.patch \
- file://0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch \
- file://run-ptest"
diff --git a/meta/recipes-graphics/clutter/clutter-1.0_1.26.2.bb b/meta/recipes-graphics/clutter/clutter-1.0_1.26.2.bb
new file mode 100644
index 0000000000..48b050198a
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-1.0_1.26.2.bb
@@ -0,0 +1,10 @@
+require clutter-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI[archive.md5sum] = "a03482cbacf735eca8c996f210a21ee5"
+SRC_URI[archive.sha256sum] = "e7233314983055e9018f94f56882e29e7fc34d8d35de030789fdcd9b2d0e2e56"
+SRC_URI += "file://install-examples.patch \
+ file://run-installed-tests-with-tap-output.patch \
+ file://0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch \
+ file://run-ptest"
diff --git a/meta/recipes-graphics/clutter/clutter-gst-3.0.inc b/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
index 4c877982b7..fc3eade886 100644
--- a/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
+++ b/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
@@ -2,7 +2,7 @@ SUMMARY = "GStreamer integration library for Clutter"
HOMEPAGE = "http://www.clutter-project.org/"
LICENSE = "LGPLv2+"
-inherit clutter distro_features_check upstream-version-is-even gobject-introspection
+inherit clutter features_check upstream-version-is-even gobject-introspection
# depends on clutter-1.0 which depends on cogl-1.0
REQUIRED_DISTRO_FEATURES ?= "opengl"
diff --git a/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb b/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb
deleted file mode 100644
index 9626cd9059..0000000000
--- a/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require clutter-gst-3.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
-
-SRC_URI[archive.md5sum] = "3e4f64477f26d9cfd2db06d3aaed203a"
-SRC_URI[archive.sha256sum] = "0aec0d0c6020cd19a5bb0dab1165a92748f81a9a3acdfabb0f966d5f53bc8093"
diff --git a/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.27.bb b/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.27.bb
new file mode 100644
index 0000000000..35382453c2
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.27.bb
@@ -0,0 +1,7 @@
+require clutter-gst-3.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
+
+SRC_URI[archive.md5sum] = "2bf9d7ca146c9d71e86c45cd00e9a28e"
+SRC_URI[archive.sha256sum] = "fe69bd6c659d24ab30da3f091eb91cd1970026d431179b0724f13791e8ad9f9d"
diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
index 05c4e5f5ca..7bf2278555 100644
--- a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
+++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
@@ -2,7 +2,9 @@ SUMMARY = "Library for embedding a Clutter canvas in a GTK+ application"
HOMEPAGE = "http://www.clutter-project.org/"
LICENSE = "LGPLv2+"
-inherit clutter distro_features_check upstream-version-is-even gobject-introspection
+CLUTTERBASEBUILDCLASS = "meson"
+inherit clutter features_check upstream-version-is-even gobject-introspection gtk-doc
+
# depends on clutter-1.0 which depends on cogl-1.0
REQUIRED_DISTRO_FEATURES ?= "opengl"
# depends on gtk+3
@@ -10,6 +12,7 @@ ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
DEPENDS = "clutter-1.0 gtk+3"
PACKAGES =+ "${PN}-examples"
-AUTOTOOLS_AUXDIR = "${S}/build"
+GTKDOC_MESON_OPTION = "enable_docs"
+GIR_MESON_OPTION = 'enable_gi'
diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch b/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch
new file mode 100644
index 0000000000..e21c6fd903
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch
@@ -0,0 +1,37 @@
+From 7233883c6bd4e80c0e91b29b5c76fe798023e9fe Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 11 Feb 2019 16:41:13 +0100
+Subject: [PATCH] Add a config variable for enabling/disabling introspection
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ clutter-gtk/meson.build | 2 +-
+ meson_options.txt | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/clutter-gtk/meson.build b/clutter-gtk/meson.build
+index 5d6847d..5d934b6 100644
+--- a/clutter-gtk/meson.build
++++ b/clutter-gtk/meson.build
+@@ -49,7 +49,7 @@ clutter_gtk_dep = declare_dependency(link_with: clutter_gtk,
+ dependencies: [ mathlib_dep, clutter_dep, gtk_dep ],
+ include_directories: include_directories('.'))
+
+-if not meson.is_cross_build()
++if get_option('enable_gi')
+ gnome.generate_gir(clutter_gtk,
+ sources: clutter_gtk_headers + clutter_gtk_sources,
+ namespace: 'GtkClutter',
+diff --git a/meson_options.txt b/meson_options.txt
+index aaf59f1..b7e51c3 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -2,3 +2,7 @@ option('enable_docs',
+ type: 'boolean',
+ value: false,
+ description: 'Enable generating the API reference (depends on GTK-Doc)')
++option('enable_gi',
++ type: 'boolean',
++ value: false,
++ description: 'Enable gobject introspection')
diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb b/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb
deleted file mode 100644
index 675365cbb1..0000000000
--- a/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require clutter-gtk-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI[archive.md5sum] = "351cf9229cf941d36b441ede2236d742"
-SRC_URI[archive.sha256sum] = "742ef9d68ece36cbb1b2e1a4a6fbdad932f6645360be7e6de75abbb140dfbf1d"
diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb b/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb
new file mode 100644
index 0000000000..53948c8944
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb
@@ -0,0 +1,7 @@
+require clutter-gtk-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI += " file://0001-Add-a-config-variable-for-enabling-disabling-introsp.patch"
+SRC_URI[archive.md5sum] = "b363ac9878e2337be887b8ee9e1da00e"
+SRC_URI[archive.sha256sum] = "521493ec038973c77edcb8bc5eac23eed41645117894aaee7300b2487cb42b06"
diff --git a/meta/recipes-graphics/cogl/cogl-1.0.inc b/meta/recipes-graphics/cogl/cogl-1.0.inc
index 7a79aa789a..d8d06651da 100644
--- a/meta/recipes-graphics/cogl/cogl-1.0.inc
+++ b/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -1,8 +1,12 @@
SUMMARY = "Modern 3D graphics API with associated utility APIs"
+DESCRIPTION = "Cogl is a small open source library for using 3D graphics \
+hardware for rendering. The API departs from the flat state machine style of \
+OpenGL and is designed to make it easy to write orthogonal components that \
+can render without stepping on each others toes."
HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl"
LICENSE = "MIT"
-inherit clutter distro_features_check upstream-version-is-even gobject-introspection
+inherit clutter features_check upstream-version-is-even gobject-introspection
# cogl-1.0 needs opengl to build
REQUIRED_DISTRO_FEATURES ?= "opengl"
@@ -18,7 +22,7 @@ EDEPENDS_GLES2 = "virtual/libgles2"
EDEPENDS_KMS = "libdrm virtual/egl"
EDEPENDS_EGL = "virtual/egl"
EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr"
-EDEPENDS_WAYLAND = "virtual/mesa wayland"
+EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland"
# Extra RDEPENDS for PACKAGECONFIG
# This has to be explictly listed, because cogl dlopens the backends
@@ -31,6 +35,7 @@ EXTRA_OECONF += "--enable-examples-install \
--disable-gles1 \
--disable-cairo \
"
+DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized"
# OpenGL/GLX
PACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}"
@@ -74,4 +79,6 @@ RPROVIDES_libcogl = "cogl-1.0"
RCONFLICTS_libcogl = "cogl-1.0"
RREPLACES_libcogl = "cogl-1.0"
+RDEPENDS_${PN}-dev = "libcogl"
+
COMPATIBLE_HOST_armv4 = 'null'
diff --git a/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch b/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch
deleted file mode 100644
index 479a0ff4b5..0000000000
--- a/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a51f61d675a0e7d6649182c6a1325ceab8342df2 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 4 Jan 2016 22:47:29 -0800
-Subject: [PATCH] test-backface-culling.c: fix may be used uninitialized error
-
-Fixed when gcc -O:
-test-backface-culling.c:206:7: error: 'cull_front' may be used uninitialized in this function [-Werror=maybe-uninitialized]
-| validate_part (framebuffer,
-| ^
-| cc1: some warnings being treated as errors
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- tests/conform/test-backface-culling.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tests/conform/test-backface-culling.c b/tests/conform/test-backface-culling.c
-index e90c2f5..7c45592 100644
---- a/tests/conform/test-backface-culling.c
-+++ b/tests/conform/test-backface-culling.c
-@@ -164,7 +164,8 @@ validate_result (CoglFramebuffer *framebuffer, int y_offset)
-
- for (draw_num = 0; draw_num < 16; draw_num++)
- {
-- CoglBool cull_front, cull_back;
-+ CoglBool cull_front = FALSE;
-+ CoglBool cull_back = FALSE;
- CoglPipelineCullFaceMode cull_mode;
-
- if (USE_LEGACY_STATE (draw_num))
---
-1.7.9.5
-
diff --git a/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb b/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb
deleted file mode 100644
index ed10c7a39f..0000000000
--- a/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require cogl-1.0.inc
-
-SRC_URI += "file://test-backface-culling.c-fix-may-be-used-uninitialize.patch"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
-SRC_URI[archive.md5sum] = "ab684ec96848d79d22757fb3064820c8"
-SRC_URI[archive.sha256sum] = "689dfb5d14fc1106e9d2ded0f7930dcf7265d0bc84fa846b4f03941633eeaa91"
diff --git a/meta/recipes-graphics/cogl/cogl-1.0_1.22.4.bb b/meta/recipes-graphics/cogl/cogl-1.0_1.22.4.bb
new file mode 100644
index 0000000000..8e61c19f5d
--- /dev/null
+++ b/meta/recipes-graphics/cogl/cogl-1.0_1.22.4.bb
@@ -0,0 +1,6 @@
+require cogl-1.0.inc
+
+SRC_URI[archive.md5sum] = "31755015a865c4af51ac84f6e53af8ab"
+SRC_URI[archive.sha256sum] = "5217bf94cbca3df63268a3b79d017725382b9e592b891d1e7dc6212590ce0de0"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
diff --git a/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
deleted file mode 100644
index bf526370b0..0000000000
--- a/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From e6bd4205b0b546afe991ae6f72256645f4404ad4 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Mon, 5 Sep 2016 14:41:37 +0300
-Subject: [PATCH libdrm] configure.ac: Allow explicit enabling of cunit tests
-
-Add --with-cunit to make it easier to do reproducible builds. Default
-is still to probe cunit and build opportunistically.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted [mailing list]
----
- configure.ac | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index e3048c7..918d21d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -137,6 +137,12 @@ AC_ARG_ENABLE(install-test-programs,
- [Install test programs (default: no)]),
- [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no])
-
-+AC_ARG_WITH([cunit],
-+ [AS_HELP_STRING([--with-cunit],
-+ [Build tests that use cunit (default: auto)])],
-+ [],
-+ [with_cunit=auto])
-+
- dnl ===========================================================================
- dnl check compiler flags
- AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
-@@ -372,7 +378,7 @@ if test "x$RADEON" = xyes; then
- AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
- fi
-
--if test "x$AMDGPU" != xno; then
-+if test "x$with_cunit" != xno -a "x$AMDGPU" != xno; then
- # Detect cunit library
- PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
- # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
-@@ -399,7 +406,11 @@ if test "x$AMDGPU" = xyes; then
- AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support])
-
- if test "x$have_cunit" = "xno"; then
-- AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
-+ if test "x$with_cunit" = "xyes"; then
-+ AC_MSG_ERROR([Could not find cunit library but --with-cunit was given])
-+ elif test "x$with_cunit" = "xauto"; then
-+ AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
-+ fi
- fi
- fi
-
---
-2.1.4
-
diff --git a/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch b/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
deleted file mode 100644
index 4708bf1ebb..0000000000
--- a/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-drmdevice.c: define _GNU_SOURCE
-
-Include config.h to fix this build error with uclibc:
-
-libdrm-2.4.66/tests/drmdevice.c: In function 'main':
-libdrm-2.4.66/tests/drmdevice.c:96:60: error:
-'O_CLOEXEC' undeclared (first use in this function)
-fd = open(devices[i]->nodes[j],O_RDONLY | O_CLOEXEC, 0);
-
-Upstream-Status: Pending
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c
---- libdrm-2.4.66-orig/tests/drmdevice.c 2016-02-23 11:34:02.054904502 +0200
-+++ libdrm-2.4.66/tests/drmdevice.c 2016-02-23 11:35:34.371750383 +0200
-@@ -21,6 +21,7 @@
- *
- */
-
-+#include <config.h>
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
diff --git a/meta/recipes-graphics/drm/libdrm/installtests.patch b/meta/recipes-graphics/drm/libdrm/installtests.patch
deleted file mode 100644
index 30e0a61fd9..0000000000
--- a/meta/recipes-graphics/drm/libdrm/installtests.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-tests: also install tests app
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Yu Ke <ke.yu@intel.com>
-
-Index: libdrm-2.4.66/tests/Makefile.am
-===================================================================
---- libdrm-2.4.66.orig/tests/Makefile.am
-+++ libdrm-2.4.66/tests/Makefile.am
-@@ -73,3 +73,4 @@ TESTS += \
- endif
-
- check_PROGRAMS += $(TESTS)
-+bin_PROGRAMS = $(check_PROGRAMS)
diff --git a/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch b/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch
new file mode 100644
index 0000000000..e3d6c5b853
--- /dev/null
+++ b/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch
@@ -0,0 +1,35 @@
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 46c0fd6c827a8cb4d04e067bf04fab579ac4712e Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 18 Jun 2018 15:07:03 +0100
+Subject: [PATCH] tests/nouveau/threaded: adapt ioctl signature
+
+POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to
+use (int, unsigned long int, ...) instead.
+
+Use a #ifdef to adapt the replacement function as appropriate.
+---
+ tests/nouveau/threaded.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tests/nouveau/threaded.c b/tests/nouveau/threaded.c
+index 3669bcd3..e1c27c01 100644
+--- a/tests/nouveau/threaded.c
++++ b/tests/nouveau/threaded.c
+@@ -36,7 +36,11 @@ static int failed;
+
+ static int import_fd;
+
++#ifdef __GLIBC__
+ int ioctl(int fd, unsigned long request, ...)
++#else
++int ioctl(int fd, int request, ...)
++#endif
+ {
+ va_list va;
+ int ret;
+--
+2.11.0
+
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.100.bb b/meta/recipes-graphics/drm/libdrm_2.4.100.bb
new file mode 100644
index 0000000000..4859425672
--- /dev/null
+++ b/meta/recipes-graphics/drm/libdrm_2.4.100.bb
@@ -0,0 +1,60 @@
+SUMMARY = "Userspace interface to the kernel DRM services"
+DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
+stands for \"Direct Rendering Manager\", which is the kernel portion of the \
+\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
+accelerated OpenGL drivers."
+HOMEPAGE = "http://dri.freedesktop.org"
+SECTION = "x11/base"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
+PROVIDES = "drm"
+DEPENDS = "libpthread-stubs"
+
+SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
+ file://musl-ioctl.patch"
+SRC_URI[md5sum] = "f47bc87e28198ba527e6b44ffdd62f65"
+SRC_URI[sha256sum] = "c77cc828186c9ceec3e56ae202b43ee99eb932b4a87255038a80e8a1060d0a5d"
+
+inherit meson pkgconfig manpages
+
+PACKAGECONFIG ??= "libkms intel radeon amdgpu nouveau vmwgfx omap freedreno vc4 etnaviv install-test-programs"
+PACKAGECONFIG[libkms] = "-Dlibkms=true,-Dlibkms=false"
+PACKAGECONFIG[intel] = "-Dintel=true,-Dintel=false,libpciaccess"
+PACKAGECONFIG[radeon] = "-Dradeon=true,-Dradeon=false"
+PACKAGECONFIG[amdgpu] = "-Damdgpu=true,-Damdgpu=false"
+PACKAGECONFIG[nouveau] = "-Dnouveau=true,-Dnouveau=false"
+PACKAGECONFIG[vmwgfx] = "-Dvmwgfx=true,-Dvmwgfx=false"
+PACKAGECONFIG[omap] = "-Domap=true,-Domap=false"
+PACKAGECONFIG[exynos] = "-Dexynos=true,-Dexynos=false"
+PACKAGECONFIG[freedreno] = "-Dfreedreno=true,-Dfreedreno=false"
+PACKAGECONFIG[tegra] = "-Dtegra=true,-Dtegra=false"
+PACKAGECONFIG[vc4] = "-Dvc4=true,-Dvc4=false"
+PACKAGECONFIG[etnaviv] = "-Detnaviv=true,-Detnaviv=false"
+PACKAGECONFIG[freedreno-kgsl] = "-Dfreedreno-kgsl=true,-Dfreedreno-kgsl=false"
+PACKAGECONFIG[valgrind] = "-Dvalgrind=true,-Dvalgrind=false,valgrind"
+PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false"
+PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=true,-Dcairo-tests=false"
+PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev"
+PACKAGECONFIG[manpages] = "-Dman-pages=true,-Dman-pages=false,libxslt-native xmlto-native"
+
+ALLOW_EMPTY_${PN}-drivers = "1"
+PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
+ ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \
+ ${PN}-etnaviv"
+
+RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
+ ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
+ ${PN}-etnaviv"
+
+FILES_${PN}-tests = "${bindir}/*"
+FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
+FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
+FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
+FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
+FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
+FILES_${PN}-kms = "${libdir}/libkms*.so.*"
+FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
+FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.* ${datadir}/${PN}/amdgpu.ids"
+FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.70.bb b/meta/recipes-graphics/drm/libdrm_2.4.70.bb
deleted file mode 100644
index a2b5282eaf..0000000000
--- a/meta/recipes-graphics/drm/libdrm_2.4.70.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "Userspace interface to the kernel DRM services"
-DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
-stands for \"Direct Rendering Manager\", which is the kernel portion of the \
-\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
-accelerated OpenGL drivers."
-HOMEPAGE = "http://dri.freedesktop.org"
-SECTION = "x11/base"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
-PROVIDES = "drm"
-DEPENDS = "libpthread-stubs udev libpciaccess"
-
-SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
- file://installtests.patch \
- file://fix_O_CLOEXEC_undeclared.patch \
- file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
- "
-
-SRC_URI[md5sum] = "920957cfe25a80efb02be9bd90bf3c1e"
-SRC_URI[sha256sum] = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF += "--disable-cairo-tests \
- --without-cunit \
- --enable-omap-experimental-api \
- --enable-install-test-programs \
- --disable-manpages \
- --disable-valgrind \
- "
-
-ALLOW_EMPTY_${PN}-drivers = "1"
-PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
- ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu"
-
-RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
- ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu"
-
-FILES_${PN}-tests = "${bindir}/*"
-FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
-FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
-FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
-FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
-FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
-FILES_${PN}-kms = "${libdir}/libkms*.so.*"
-FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
-FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
diff --git a/meta/recipes-graphics/eglinfo/eglinfo-fb_1.0.0.bb b/meta/recipes-graphics/eglinfo/eglinfo-fb_1.0.0.bb
deleted file mode 100644
index 455d31e872..0000000000
--- a/meta/recipes-graphics/eglinfo/eglinfo-fb_1.0.0.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-EGLINFO_PLATFORM ?= "fb"
-EGLINFO_BINARY_NAME ?= "eglinfo-fb"
-
-include eglinfo.inc
-
-SUMMARY += "(Framebuffer version)"
diff --git a/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb b/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb
deleted file mode 100644
index 3427fdf420..0000000000
--- a/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-EGLINFO_PLATFORM ?= "x11"
-EGLINFO_BINARY_NAME ?= "eglinfo-x11"
-
-include eglinfo.inc
-
-DEPENDS += "virtual/libx11"
-
-inherit distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SUMMARY += "(X11 version)"
diff --git a/meta/recipes-graphics/eglinfo/eglinfo.inc b/meta/recipes-graphics/eglinfo/eglinfo.inc
deleted file mode 100644
index d0c0c27619..0000000000
--- a/meta/recipes-graphics/eglinfo/eglinfo.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Utility for printing information EGL and its client APIs (OpenGL, OpenGL ES, OpenVG)"
-SECTION = "graphics"
-LICENSE = "Zlib"
-HOMEPAGE = "https://github.com/dv1/eglinfo"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8d4f33bc3add976f7dfae85dab66f03c"
-
-DEPENDS = "virtual/egl"
-
-SRC_URI = "git://github.com/dv1/eglinfo.git;branch=master \
- file://0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch \
- "
-SRCREV = "4b317648ec6cf39556a9e5d8078f605bc0edd5de"
-
-S = "${WORKDIR}/git"
-
-inherit waf distro_features_check
-# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES ?= "opengl"
-
-# BSP layers should add .bbappend files for the -x11 and -fb .bb recipes, which
-# append the respective EGL/OpenGLES/OpenVG libraries to DEPENDS and set
-# EGL_DEVICE as appropriate.
-EGLINFO_DEVICE ?= "generic"
-
-EXTRA_OECONF = "--platform=${EGLINFO_PLATFORM} \
- --device=${EGLINFO_DEVICE} \
- --sysroot ${STAGING_DIR_TARGET}"
-
-do_install_append() {
- mv ${D}/${bindir}/eglinfo ${D}/${bindir}/${EGLINFO_BINARY_NAME}
-}
diff --git a/meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch b/meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch
deleted file mode 100644
index ca9f55c189..0000000000
--- a/meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 94b1e6daf7d70550b0e32fbb269fcf6887948d3f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 16:08:22 -0800
-Subject: [PATCH] Add STAGING_INCDIR to searchpath for egl headers
-
-bcm_host.h is in standard includedir in sysroot
-add that to header search paths.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- wscript | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/wscript b/wscript
-index fcbb55b..cece8bf 100644
---- a/wscript
-+++ b/wscript
-@@ -163,9 +163,10 @@ def configure_raspberrypi_device(conf, platform):
- conf.check_cxx(mandatory = 1, lib = ['GLESv2', 'EGL', 'bcm_host'], uselib_store = 'EGL')
- import os
- sysroot = conf.options.sysroot + conf.options.prefix
-+ std_include_path = os.path.join(sysroot, 'include')
- vcos_pthread_path = os.path.join(sysroot, 'include/interface/vcos/pthreads')
- vcms_host_path = os.path.join(sysroot, 'include/interface/vmcs_host/linux')
-- if not conf.check_cxx(mandatory = 0, header_name = ['vcos_platform_types.h', 'EGL/egl.h', 'bcm_host.h'], includes = [vcos_pthread_path, vcms_host_path], uselib_store = 'EGL'):
-+ if not conf.check_cxx(mandatory = 0, header_name = ['vcos_platform_types.h', 'EGL/egl.h', 'bcm_host.h'], includes = [vcos_pthread_path, vcms_host_path, std_include_path], uselib_store = 'EGL'):
- conf.fatal('Check if --prefix and --sysroot are set correctly.')
- conf.env['WITH_APIS'] = []
- if check_gles2(conf):
---
-2.7.0
-
diff --git a/meta/recipes-graphics/fontconfig/fontconfig/revert-static-pkgconfig.patch b/meta/recipes-graphics/fontconfig/fontconfig/revert-static-pkgconfig.patch
index fca1e65946..30d6423037 100644
--- a/meta/recipes-graphics/fontconfig/fontconfig/revert-static-pkgconfig.patch
+++ b/meta/recipes-graphics/fontconfig/fontconfig/revert-static-pkgconfig.patch
@@ -8,13 +8,13 @@ gently refuses and rightly so.
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: fontconfig-2.11.93/fontconfig.pc.in
-===================================================================
---- fontconfig-2.11.93.orig/fontconfig.pc.in
-+++ fontconfig-2.11.93/fontconfig.pc.in
+diff --git a/fontconfig.pc.in b/fontconfig.pc.in
+index 61b35fb..5bc9bab 100644
+--- a/fontconfig.pc.in
++++ b/fontconfig.pc.in
@@ -15,4 +15,4 @@ Requires: @PKGCONFIG_REQUIRES@
Requires.private: @PKGCONFIG_REQUIRES_PRIVATELY@
Libs: -L${libdir} -lfontconfig
- Libs.private: @EXPAT_LIBS@ @FREETYPE_LIBS@ @ICONV_LIBS@ @LIBXML2_LIBS@
--Cflags: -I${includedir} @EXPAT_CFLAGS@ @FREETYPE_CFLAGS@ @ICONV_CFLAGS@ @LIBXML2_CFLAGS@
+ Libs.private: @ICONV_LIBS@ @PKG_EXPAT_LIBS@
+-Cflags: -I${includedir} @ICONV_CFLAGS@ @PKG_EXPAT_CFLAGS@
+Cflags: -I${includedir}
diff --git a/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb b/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb
deleted file mode 100644
index 115f558eef..0000000000
--- a/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Generic font configuration library"
-DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
-does not depend on the X Window System. It is designed to locate \
-fonts within the system and select them according to requirements \
-specified by applications. \
-Fontconfig is not a rasterization library, nor does it impose a \
-particular rasterization library on the application. The X-specific \
-library 'Xft' uses fontconfig along with freetype to specify and \
-rasterize fonts."
-
-HOMEPAGE = "http://www.fontconfig.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
-
-LICENSE = "MIT-style & MIT & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
- file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
- file://src/fccache.c;beginline=1360;endline=1375;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
-
-SECTION = "libs"
-
-DEPENDS = "expat freetype zlib"
-
-SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
- file://revert-static-pkgconfig.patch \
- "
-SRC_URI[md5sum] = "ce55e525c37147eee14cc2de6cc09f6c"
-SRC_URI[sha256sum] = "a9f42d03949f948a3a4f762287dbc16e53a927c91a07ee64207ebd90a9e5e292"
-
-PACKAGES =+ "fontconfig-utils"
-FILES_${PN} =+ "${datadir}/xml/*"
-FILES_fontconfig-utils = "${bindir}/*"
-
-# Work around past breakage in debian.bbclass
-RPROVIDES_fontconfig-utils = "libfontconfig-utils"
-RREPLACES_fontconfig-utils = "libfontconfig-utils"
-RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
-DEBIAN_NOAUTONAME_fontconfig-utils = "1"
-
-inherit autotools pkgconfig
-
-FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
-
-# comma separated list of additional directories
-# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
-FONTCONFIG_FONT_DIRS ?= "no"
-
-EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb b/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb
new file mode 100644
index 0000000000..d0da419ce0
--- /dev/null
+++ b/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb
@@ -0,0 +1,70 @@
+SUMMARY = "Generic font configuration library"
+DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
+does not depend on the X Window System. It is designed to locate \
+fonts within the system and select them according to requirements \
+specified by applications. \
+Fontconfig is not a rasterization library, nor does it impose a \
+particular rasterization library on the application. The X-specific \
+library 'Xft' uses fontconfig along with freetype to specify and \
+rasterize fonts."
+
+HOMEPAGE = "http://www.fontconfig.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
+
+LICENSE = "MIT-style & MIT & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
+ file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
+ file://src/fccache.c;beginline=1671;endline=1686;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
+
+SECTION = "libs"
+
+DEPENDS = "expat freetype zlib gperf-native util-linux"
+
+SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
+ file://revert-static-pkgconfig.patch \
+ "
+
+SRC_URI[md5sum] = "690c6cb840a92fa8908cdf462d19ec66"
+SRC_URI[sha256sum] = "9f0d852b39d75fc655f9f53850eb32555394f36104a044bb2b2fc9e66dbbfa7f"
+
+UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
+
+do_configure_prepend() {
+ # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
+ rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
+}
+
+do_install_append_class-target() {
+ # duplicate fc-cache for postinstall script
+ mkdir -p ${D}${libexecdir}
+ ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
+}
+
+do_install_append_class-nativesdk() {
+ # duplicate fc-cache for postinstall script
+ mkdir -p ${D}${libexecdir}
+ ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
+}
+
+PACKAGES =+ "fontconfig-utils"
+FILES_${PN} =+ "${datadir}/xml/*"
+FILES_${PN}-dev += "${datadir}/gettext/*"
+FILES_fontconfig-utils = "${bindir}/* ${libexecdir}/*"
+
+# Work around past breakage in debian.bbclass
+RPROVIDES_fontconfig-utils = "libfontconfig-utils"
+RREPLACES_fontconfig-utils = "libfontconfig-utils"
+RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
+DEBIAN_NOAUTONAME_fontconfig-utils = "1"
+
+inherit autotools pkgconfig relative_symlinks gettext
+
+FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
+
+# comma separated list of additional directories
+# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
+FONTCONFIG_FONT_DIRS ?= "no"
+
+EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch b/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
index 20838813dc..3368f7ddd3 100644
--- a/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
+++ b/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
@@ -11,4 +11,4 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
+++ freetype-2.6/builds/unix/unix-cc.in 2016-01-07 19:21:50.213112131 +0000
@@ -19,1 +18,1 @@
-LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
-+LIBTOOL := $(FT_LIBTOOL_DIR)/@LIBTOOL@
++LIBTOOL := $(FT_LIBTOOL_DIR)/@LIBTOOL@ --tag CC
diff --git a/meta/recipes-graphics/freetype/freetype_2.10.1.bb b/meta/recipes-graphics/freetype/freetype_2.10.1.bb
new file mode 100644
index 0000000000..b179a0ed47
--- /dev/null
+++ b/meta/recipes-graphics/freetype/freetype_2.10.1.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Freetype font rendering library"
+DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
+highly customizable, and portable while capable of producing high-quality output (glyph \
+images). It can be used in graphics libraries, display servers, font conversion tools, text \
+image generation tools, and many other products as well."
+HOMEPAGE = "http://www.freetype.org/"
+BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
+SECTION = "libs"
+
+LICENSE = "FreeType | GPLv2+"
+LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
+ file://docs/FTL.TXT;md5=9f37b4e6afa3fef9dba8932b16bd3f97 \
+ file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \
+ file://use-right-libtool.patch \
+ "
+SRC_URI[md5sum] = "bd42e75127f8431923679480efb5ba8f"
+SRC_URI[sha256sum] = "16dbfa488a21fe827dc27eaf708f42f7aa3bb997d745d31a19781628c36ba26f"
+
+UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)"
+
+inherit autotools pkgconfig multilib_header
+
+# Adapt autotools to work with the minimal autoconf usage in freetype
+AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
+CONFIGURE_SCRIPT = "${S}/configure"
+EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
+
+PACKAGECONFIG ??= "zlib"
+
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
+# harfbuzz results in a circular dependency so enabling is non-trivial
+PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
+PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+PACKAGECONFIG[freetypeconfig] = "--enable-freetype-config=yes,--enable-freetype-config=no,"
+
+EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
+
+TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
+
+do_install_append() {
+ oe_multilib_header freetype2/freetype/config/ftconfig.h
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/freetype/freetype_2.6.5.bb b/meta/recipes-graphics/freetype/freetype_2.6.5.bb
deleted file mode 100644
index 97dde3a626..0000000000
--- a/meta/recipes-graphics/freetype/freetype_2.6.5.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Freetype font rendering library"
-DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
-highly customizable, and portable while capable of producing high-quality output (glyph \
-images). It can be used in graphics libraries, display servers, font conversion tools, text \
-image generation tools, and many other products as well."
-HOMEPAGE = "http://www.freetype.org/"
-BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
-SECTION = "libs"
-
-LICENSE = "FreeType | GPLv2+"
-LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
- file://docs/FTL.TXT;md5=13b25413274c9b3b09b63e4028216ff4 \
- file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
- file://use-right-libtool.patch"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/freetype/files/freetype2/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
-
-SRC_URI[md5sum] = "6a386964e18ba28cb93370e57a19031b"
-SRC_URI[sha256sum] = "e20a6e1400798fd5e3d831dd821b61c35b1f9a6465d6b18a53a9df4cf441acf0"
-
-inherit autotools pkgconfig binconfig-disabled multilib_header
-
-# Adapt autotools to work with the minimal autoconf usage in freetype
-AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
-CONFIGURE_SCRIPT = "${S}/configure"
-EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
-
-PACKAGECONFIG ??= "zlib"
-
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-# harfbuzz results in a circular dependency so enabling is non-trivial
-PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
-PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-
-EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
-
-TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
-
-do_install_append() {
- oe_multilib_header freetype2/freetype/config/ftconfig.h
-}
-
-BINCONFIG = "${bindir}/freetype-config"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/fstests/fstests_git.bb b/meta/recipes-graphics/fstests/fstests_git.bb
deleted file mode 100644
index 95c33f410b..0000000000
--- a/meta/recipes-graphics/fstests/fstests_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Various benchmarning tests for X"
-HOMEPAGE = "http://www.o-hand.com"
-SECTION = "devel"
-LICENSE = "Zlib"
-DEPENDS = "pango libxext libxft virtual/libx11 gtk+"
-
-SRCREV = "e5939ff608b95cdd4d0ab0e1935781ab9a276ac0"
-PV = "0.1+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
-
-LIC_FILES_CHKSUM = "file://test-pango-gdk.c;endline=24;md5=1ee74ec851ecda57eb7ac6cc180f7655"
-
-S = "${WORKDIR}/git/tests"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch b/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch
new file mode 100644
index 0000000000..64f3e2fd9b
--- /dev/null
+++ b/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch
@@ -0,0 +1,73 @@
+From 7f65a36866f4e24dd1446fe1c9d21424f28bcabd Mon Sep 17 00:00:00 2001
+From: Deve <deveee@gmail.com>
+Date: Wed, 14 Nov 2018 21:07:29 +0100
+Subject: [PATCH] Fixed compilation with current mesa versions.
+
+As you can see in
+https://cgit.freedesktop.org/mesa/mesa/tree/include/GL/glext.h
+now the file uses __gl_glext_h_ instead of __glext_h_
+It's precisely caused by commit f7d42ee7d319256608ad60778f6787c140badada
+
+Backoprt notes:
+
+* The original patch adjusts auto/src/glew_head.h only
+* include/GL/glew.h is not part of git repo and gets created on tarball
+ creation
+
+=> patch include/GL/glew.h either to cause the desired fix
+
+Upstream-Status: Backport [1]
+
+[1] https://github.com/nigels-com/glew/commit/7f65a36866f4e24dd1446fe1c9d21424f28bcabd
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ auto/src/glew_head.h | 3 ++-
+ include/GL/glew.h | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h
+index c19cefb..8f313d9 100644
+--- a/auto/src/glew_head.h
++++ b/auto/src/glew_head.h
+@@ -14,7 +14,7 @@
+ #if defined(__REGAL_H__)
+ #error Regal.h included before glew.h
+ #endif
+-#if defined(__glext_h_) || defined(__GLEXT_H_)
++#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_)
+ #error glext.h included before glew.h
+ #endif
+ #if defined(__gl_ATI_h_)
+@@ -30,6 +30,7 @@
+ #define __X_GL_H
+ #define __glext_h_
+ #define __GLEXT_H_
++#define __gl_glext_h_
+ #define __gl_ATI_h_
+
+ #if defined(_WIN32)
+diff --git a/include/GL/glew.h b/include/GL/glew.h
+index b5b6987..a9f9e4b 100644
+--- a/include/GL/glew.h
++++ b/include/GL/glew.h
+@@ -93,7 +93,7 @@
+ #if defined(__REGAL_H__)
+ #error Regal.h included before glew.h
+ #endif
+-#if defined(__glext_h_) || defined(__GLEXT_H_)
++#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_)
+ #error glext.h included before glew.h
+ #endif
+ #if defined(__gl_ATI_h_)
+@@ -109,6 +109,7 @@
+ #define __X_GL_H
+ #define __glext_h_
+ #define __GLEXT_H_
++#define __gl_glext_h_
+ #define __gl_ATI_h_
+
+ #if defined(_WIN32)
+--
+2.20.1
+
diff --git a/meta/recipes-graphics/glew/glew_2.0.0.bb b/meta/recipes-graphics/glew/glew_2.0.0.bb
deleted file mode 100644
index 489dd7c8f7..0000000000
--- a/meta/recipes-graphics/glew/glew_2.0.0.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "OpenGL extension loading library"
-DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
-HOMEPAGE = "http://glew.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
-SECTION = "x11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
-
-DEPENDS = "virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
- file://no-strip.patch"
-
-SRC_URI[md5sum] = "2a2cd7c98f13854d2fcddae0d2b20411"
-SRC_URI[sha256sum] = "c572c30a4e64689c342ba1624130ac98936d7af90c3103f9ce12b8a0c5736764"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
-UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
-
-inherit lib_package pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-# Override SYSTEM to avoid calling config.guess, we're cross-compiling. Pass
-# our CFLAGS via POPT as that's the optimisation variable and safely
-# overwritten.
-EXTRA_OEMAKE = "SYSTEM='linux' \
- CC='${CC}' LD='${CC}' STRIP='' \
- LDFLAGS.EXTRA='${LDFLAGS}' \
- POPT='${CFLAGS}' \
- GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
- LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
-
-do_compile() {
- oe_runmake
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install.all
-}
diff --git a/meta/recipes-graphics/glew/glew_2.1.0.bb b/meta/recipes-graphics/glew/glew_2.1.0.bb
new file mode 100644
index 0000000000..f6f43406f8
--- /dev/null
+++ b/meta/recipes-graphics/glew/glew_2.1.0.bb
@@ -0,0 +1,45 @@
+SUMMARY = "OpenGL extension loading library"
+DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
+HOMEPAGE = "http://glew.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
+ file://no-strip.patch \
+ file://0001-Fixed-compilation-with-current-mesa-versions.patch"
+
+SRC_URI[md5sum] = "b2ab12331033ddfaa50dc39345343980"
+SRC_URI[sha256sum] = "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
+UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
+
+inherit lib_package pkgconfig features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}"
+
+# The opengl and egl-XXX options are exclusive, enable only one.
+PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
+PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2"
+
+CFLAGS += "-D_GNU_SOURCE"
+# Override SYSTEM (via PACKAGECONFIG_CONFARGS) to avoid calling config.guess,
+# we're cross-compiling. Pass our CFLAGS via POPT as that's the optimisation
+# variable and safely overwritten.
+EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \
+ CC='${CC}' LD='${CC}' STRIP='' \
+ LDFLAGS.EXTRA='${LDFLAGS}' \
+ POPT='${CFLAGS}' \
+ GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
+ LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install.all
+}
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb
deleted file mode 100644
index f24c443a77..0000000000
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Text shaping library"
-DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
- file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
-"
-
-DEPENDS = "glib-2.0 cairo fontconfig freetype"
-
-SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "a82d49ff67197bc3c96ea34b98880c52"
-SRC_URI[sha256sum] = "b04be31633efee2cae1d62d46434587302554fa837224845a62565ec68a0334d"
-
-inherit autotools pkgconfig lib_package gtk-doc
-
-PACKAGECONFIG ??= "icu"
-PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
-
-EXTRA_OECONF = " \
- --with-cairo \
- --with-fontconfig \
- --with-freetype \
- --with-glib \
- --without-graphite2 \
-"
-
-PACKAGES =+ "${PN}-icu ${PN}-icu-dev"
-
-FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
-FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
- ${libdir}/libharfbuzz-icu.so \
- ${libdir}/pkgconfig/harfbuzz-icu.pc \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bb
new file mode 100644
index 0000000000..ee08c12bee
--- /dev/null
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Text shaping library"
+DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e11f5c3149cdec4bb309babb020b32b9 \
+ file://src/hb-ucd.cc;beginline=1;endline=15;md5=29d4dcb6410429195df67efe3382d8bc"
+
+SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.xz"
+SRC_URI[md5sum] = "2b3a4dfdb3e5e50055f941978944da9f"
+SRC_URI[sha256sum] = "9413b8d96132d699687ef914ebb8c50440efc87b3f775d25856d7ec347c03c12"
+
+inherit autotools pkgconfig lib_package gtk-doc
+
+PACKAGECONFIG ??= "cairo fontconfig freetype glib icu"
+PACKAGECONFIG[cairo] = "--with-cairo,--without-cairo,cairo"
+PACKAGECONFIG[fontconfig] = "--with-fontconfig,--without-fontconfig,fontconfig"
+PACKAGECONFIG[freetype] = "--with-freetype,--without-freetype,freetype"
+PACKAGECONFIG[glib] = "--with-glib,--without-glib,glib-2.0"
+PACKAGECONFIG[graphite] = "--with-graphite2,--without-graphite2,graphite2"
+PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
+
+PACKAGES =+ "${PN}-icu ${PN}-icu-dev ${PN}-subset"
+
+LEAD_SONAME = "libharfbuzz.so"
+
+do_install_append() {
+ # If no tools are installed due to PACKAGECONFIG then this directory is
+ #still installed, so remove it to stop packaging wanings.
+ rmdir --ignore-fail-on-non-empty ${D}${bindir}
+}
+
+FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
+FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
+ ${libdir}/libharfbuzz-icu.so \
+ ${libdir}/pkgconfig/harfbuzz-icu.pc \
+"
+FILES_${PN}-subset = "${libdir}/libharfbuzz-subset.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/images/core-image-clutter.bb b/meta/recipes-graphics/images/core-image-clutter.bb
index b0f25cf1b1..a594461022 100644
--- a/meta/recipes-graphics/images/core-image-clutter.bb
+++ b/meta/recipes-graphics/images/core-image-clutter.bb
@@ -11,3 +11,5 @@ IMAGE_INSTALL = "\
"
inherit core-image
+
+QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
diff --git a/meta/recipes-graphics/images/core-image-weston.bb b/meta/recipes-graphics/images/core-image-weston.bb
index e36655ffc5..f5102e1989 100644
--- a/meta/recipes-graphics/images/core-image-weston.bb
+++ b/meta/recipes-graphics/images/core-image-weston.bb
@@ -4,7 +4,7 @@ IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs"
LICENSE = "MIT"
-inherit core-image distro_features_check
+inherit core-image features_check
REQUIRED_DISTRO_FEATURES = "wayland"
diff --git a/meta/recipes-graphics/images/core-image-x11.bb b/meta/recipes-graphics/images/core-image-x11.bb
index 8455bb8cae..52407759f9 100644
--- a/meta/recipes-graphics/images/core-image-x11.bb
+++ b/meta/recipes-graphics/images/core-image-x11.bb
@@ -4,6 +4,8 @@ IMAGE_FEATURES += "splash package-management x11-base"
LICENSE = "MIT"
-inherit core-image distro_features_check
+inherit core-image features_check
REQUIRED_DISTRO_FEATURES = "x11"
+
+QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
diff --git a/meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch b/meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch
new file mode 100644
index 0000000000..82fffe1e68
--- /dev/null
+++ b/meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch
@@ -0,0 +1,32 @@
+From 5cf847b5bef8dc3f9f89bd09dd5af4e6603f393c Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 27 Aug 2018 16:10:55 +0800
+Subject: [PATCH] libjpeg-turbo: fix package_qa error
+
+Fix package qa errors like below:
+libjpeg.so.62.3.0 contains probably-redundant RPATH /usr/lib [useless-rpaths]
+usr/bin/cjpeg contains probably-redundant RPATH /usr/lib
+
+Upstream-Status: Inappropriate[oe-specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ CMakeLists.txt | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2bc3458..ea3041e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -189,10 +189,6 @@ endif()
+ report_option(ENABLE_SHARED "Shared libraries")
+ report_option(ENABLE_STATIC "Static libraries")
+
+-if(ENABLE_SHARED)
+- set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
+-endif()
+-
+ if(WITH_12BIT)
+ set(WITH_ARITH_DEC 0)
+ set(WITH_ARITH_ENC 0)
diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb
deleted file mode 100644
index c9e70d73d2..0000000000
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "Hardware accelerated JPEG compression/decompression library"
-DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
-HOMEPAGE = "http://libjpeg-turbo.org/"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=05bab7c7ad899d85bfba60da1a1271f2 \
- file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
- file://djpeg.c;endline=11;md5=b90b6d2b4119f9e5807cd273f525d2af \
-"
-DEPENDS = "nasm-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-SRC_URI[md5sum] = "3fc5d9b6a8bce96161659ae7a9939257"
-SRC_URI[sha256sum] = "9f397c31a67d2b00ee37597da25898b03eb282ccd87b135a50a69993b6a2035f"
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
-UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
-
-PE= "1"
-
-# Drop-in replacement for jpeg
-PROVIDES = "jpeg"
-RPROVIDES_${PN} += "jpeg"
-RREPLACES_${PN} += "jpeg"
-RCONFLICTS_${PN} += "jpeg"
-
-inherit autotools pkgconfig
-
-# Work around missing x32 ABI support
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--without-simd", "", d)}"
-
-# Work around missing non-floating point ABI support in MIPS
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "--without-simd", "", d)}"
-
-# Provide a workaround if Altivec unit is not present in PPC
-EXTRA_OECONF_append_class-target_powerpc = "${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
-EXTRA_OECONF_append_class-target_powerpc64 = "${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
-
-PACKAGES =+ "jpeg-tools libturbojpeg"
-
-DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
-FILES_jpeg-tools = "${bindir}/*"
-
-DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
-FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.3.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.3.bb
new file mode 100644
index 0000000000..32d3bd93b1
--- /dev/null
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.3.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Hardware accelerated JPEG compression/decompression library"
+DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
+HOMEPAGE = "http://libjpeg-turbo.org/"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=8184bcc7c4ac7b9edc6a7bc00f231d0b \
+ file://jpeglib.h;endline=16;md5=7ea97dc83b0f59052ee837e61ef0e08f \
+ file://djpeg.c;endline=11;md5=c59e19811c006cb38f82d6477134d314 \
+"
+DEPENDS_append_x86-64_class-target = " nasm-native"
+DEPENDS_append_x86_class-target = " nasm-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+ file://0001-libjpeg-turbo-fix-package_qa-error.patch \
+ "
+
+SRC_URI[md5sum] = "bd07fddf26f9def7bab02739eb655116"
+SRC_URI[sha256sum] = "4246de500544d4ee408ee57048aa4aadc6f165fc17f141da87669f20ed3241b7"
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
+UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
+
+PE= "1"
+
+# Drop-in replacement for jpeg
+PROVIDES = "jpeg"
+RPROVIDES_${PN} += "jpeg"
+RREPLACES_${PN} += "jpeg"
+RCONFLICTS_${PN} += "jpeg"
+
+inherit cmake pkgconfig
+
+export NASMENV = "--debug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
+# Add nasm-native dependency consistently for all build arches is hard
+EXTRA_OECMAKE_append_class-native = " -DWITH_SIMD=False"
+EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_SIMD=False"
+
+# Work around missing x32 ABI support
+EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-DWITH_SIMD=False", "", d)}"
+
+# Work around missing non-floating point ABI support in MIPS
+EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False", "", d)}"
+
+# Provide a workaround if Altivec unit is not present in PPC
+EXTRA_OECMAKE_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
+EXTRA_OECMAKE_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
+
+DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+
+PACKAGES =+ "jpeg-tools libturbojpeg"
+
+DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
+FILES_jpeg-tools = "${bindir}/*"
+
+DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
+FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch b/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
new file mode 100644
index 0000000000..a7a08f14e6
--- /dev/null
+++ b/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
@@ -0,0 +1,117 @@
+From a91c588b5a4122506e7fe949c37d530621bdd997 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
+Date: Tue, 11 Jul 2017 14:50:37 -0500
+Subject: [PATCH] Detect gst_bo_map/_unmap and use it (or avoid it)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Those functions are not available on libMali, thus breaking
+builds and creating havoc.
+
+Removing the specific parts of the code that deal with
+gbm_bo_map() and gbm_bo_unmap() renders the kmscube utility
+a little less useful, but still valuable.
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Cc: Rob Clark <robdclark@gmail.com>
+Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
+
+Upstream-Status: Submitted [https://lists.freedesktop.org/archives/mesa-dev/2017-July/163020.html]
+Signed-off-by: Zoltan Kuscsik <zoltan.kuscsik@solution57.com>
+---
+ Makefile.am | 5 ++++-
+ configure.ac | 3 +++
+ gst-decoder.c | 7 ++++++-
+ kmscube.c | 4 ++++
+ 4 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ba064e4..3a0a50b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,7 +43,6 @@ kmscube_SOURCES = \
+ common.c \
+ common.h \
+ cube-smooth.c \
+- cube-tex.c \
+ drm-atomic.c \
+ drm-common.c \
+ drm-common.h \
+@@ -68,3 +67,7 @@ texturator_SOURCES = \
+ drm-common.c \
+ drm-legacy.c \
+ texturator.c
++
++if ENABLE_GBM_MAP
++kmscube_SOURCES += cube-tex.c
++endif
+diff --git a/configure.ac b/configure.ac
+index 6be6541..3d20121 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -49,5 +49,8 @@ if test "x$HAVE_GST" = "xyes"; then
+ fi
+ AM_CONDITIONAL(ENABLE_GST, [test "x$HAVE_GST" = "xyes"])
+
++AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes], [])
++AM_CONDITIONAL(ENABLE_GBM_MAP, [test "x$HAVE_GBM_BO_MAP" = "xyes"])
++
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
+diff --git a/gst-decoder.c b/gst-decoder.c
+index 5431014..0aa7a55 100644
+--- a/gst-decoder.c
++++ b/gst-decoder.c
+@@ -332,6 +332,7 @@ set_last_frame(struct decoder *dec, EGLImage frame, GstSample *samp)
+ dec->last_samp = samp;
+ }
+
++#if HAVE_GBM_BO_MAP
+ // TODO this could probably be a helper re-used by cube-tex:
+ static int
+ buf_to_fd(const struct gbm *gbm, int size, void *ptr)
+@@ -357,6 +358,7 @@ buf_to_fd(const struct gbm *gbm, int size, void *ptr)
+
+ return fd;
+ }
++#endif
+
+ static EGLImage
+ buffer_to_image(struct decoder *dec, GstBuffer *buf)
+@@ -410,12 +412,15 @@ buffer_to_image(struct decoder *dec, GstBuffer *buf)
+
+ if (is_dmabuf_mem) {
+ dmabuf_fd = dup(gst_dmabuf_memory_get_fd(mem));
+- } else {
++ }
++#if HAVE_GBM_BO_MAP
++ else {
+ GstMapInfo map_info;
+ gst_buffer_map(buf, &map_info, GST_MAP_READ);
+ dmabuf_fd = buf_to_fd(dec->gbm, map_info.size, map_info.data);
+ gst_buffer_unmap(buf, &map_info);
+ }
++#endif
+
+ if (dmabuf_fd < 0) {
+ GST_ERROR("could not obtain DMABUF FD");
+diff --git a/kmscube.c b/kmscube.c
+index 81803be..e93da67 100644
+--- a/kmscube.c
++++ b/kmscube.c
+@@ -166,7 +166,11 @@ int main(int argc, char *argv[])
+ else if (mode == VIDEO)
+ egl = init_cube_video(gbm, video, samples);
+ else
++#if HAVE_GBM_BO_MAP
+ egl = init_cube_tex(gbm, mode, samples);
++#else
++ printf("gbm_bo_map() support missing\n");
++#endif
+
+ if (!egl) {
+ printf("failed to initialize EGL\n");
+--
+2.22.0
+
diff --git a/meta/recipes-graphics/kmscube/kmscube_git.bb b/meta/recipes-graphics/kmscube/kmscube_git.bb
new file mode 100644
index 0000000000..82720045b3
--- /dev/null
+++ b/meta/recipes-graphics/kmscube/kmscube_git.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Demo application to showcase 3D graphics using kms and gbm"
+HOMEPAGE = "https://cgit.freedesktop.org/mesa/kmscube/"
+LICENSE = "MIT"
+SECTION = "graphics"
+DEPENDS = "virtual/libgles2 virtual/egl libdrm"
+
+LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
+
+SRCREV = "f632b23a528ed6b4e1fddd774db005c30ab65568"
+SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https \
+ file://detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch"
+UPSTREAM_CHECK_COMMITS = "1"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch b/meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch
deleted file mode 100644
index 674c8e8330..0000000000
--- a/meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 3a93150bc0aec86afdb7d053247dc2448925e09a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Wed, 6 May 2015 10:45:22 +0200
-Subject: [PATCH 1/2] select platforms based on configuration results
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/anholt/libepoxy/pull/52
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.ac | 13 +++++--------
- src/dispatch_common.c | 9 ++++++---
- src/dispatch_common.h | 9 +++++----
- 3 files changed, 16 insertions(+), 15 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index a52fc58..bdd70da 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -58,6 +58,10 @@ AC_CHECK_HEADER([KHR/khrplatform.h],
- # uintptr_t to a void *") by default. Kill that.
- XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion])
-
-+PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no])
-+
-+AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes)
-+
- has_znow=yes
-
- case $host_os in
-@@ -86,7 +90,7 @@ case $host_os in
- ;;
- *)
- build_egl=yes
-- build_glx=yes
-+ build_glx=$x11
- build_wgl=no
- # On platforms with dlopen, we load everything dynamically and
- # don't link against a specific window system or GL implementation.
-@@ -144,13 +148,6 @@ esac
-
- AC_SUBST([VISIBILITY_CFLAGS])
-
--PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no])
--if test x$x11 = xno -a x$build_glx = xyes; then
-- AC_MSG_ERROR([libX11 headers (libx11-dev) required to build with GLX support])
--fi
--
--AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes)
--
- PKG_CHECK_MODULES(GL, [gl], [gl=yes], [gl=no])
-
- AC_CONFIG_FILES([
-diff --git a/src/dispatch_common.c b/src/dispatch_common.c
-index 4e34d6e..2ab84ed 100644
---- a/src/dispatch_common.c
-+++ b/src/dispatch_common.c
-@@ -615,10 +615,13 @@ epoxy_get_proc_address(const char *name)
- #elif defined(__APPLE__)
- return epoxy_gl_dlsym(name);
- #else
-+#if PLATFORM_HAS_GLX
- if (epoxy_current_context_is_glx()) {
- return glXGetProcAddressARB((const GLubyte *)name);
-- } else {
-+ } else
-+#endif /* PLATFORM_HAS_GLX */
- #if PLATFORM_HAS_EGL
-+ {
- GLenum egl_api = epoxy_egl_get_current_gl_context_api();
-
- switch (egl_api) {
-@@ -628,10 +631,10 @@ epoxy_get_proc_address(const char *name)
- case EGL_NONE:
- break;
- }
--#endif
- }
-+#endif /* PLATFORM_HAS_EGL */
- errx(1, "Couldn't find current GLX or EGL context.\n");
--#endif
-+#endif /* _WIN32 | __APPLE__*/
- }
-
- void
-diff --git a/src/dispatch_common.h b/src/dispatch_common.h
-index 6b8503a..82681e4 100644
---- a/src/dispatch_common.h
-+++ b/src/dispatch_common.h
-@@ -21,12 +21,13 @@
- * IN THE SOFTWARE.
- */
-
-+#include <config.h>
- #include <stdbool.h>
-
- #ifdef _WIN32
- #define PLATFORM_HAS_EGL 0
- #define PLATFORM_HAS_GLX 0
--#define PLATFORM_HAS_WGL 1
-+#define PLATFORM_HAS_WGL BUILD_WGL
- #define EPOXY_IMPORTEXPORT __declspec(dllexport)
- #elif defined(__APPLE__)
- #define PLATFORM_HAS_EGL 0
-@@ -34,13 +35,13 @@
- #define PLATFORM_HAS_WGL 0
- #define EPOXY_IMPORTEXPORT
- #elif defined(ANDROID)
--#define PLATFORM_HAS_EGL 1
-+#define PLATFORM_HAS_EGL BUILD_EGL
- #define PLATFORM_HAS_GLX 0
- #define PLATFORM_HAS_WGL 0
- #define EPOXY_IMPORTEXPORT
- #else
--#define PLATFORM_HAS_EGL 1
--#define PLATFORM_HAS_GLX 1
-+#define PLATFORM_HAS_EGL BUILD_EGL
-+#define PLATFORM_HAS_GLX BUILD_GLX
- #define PLATFORM_HAS_WGL 0
- #define EPOXY_IMPORTEXPORT
- #endif
---
-1.9.3
-
diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch b/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch
deleted file mode 100644
index 262d6845f5..0000000000
--- a/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 24868cbfb9dda5f6929dd277c47d35df016e8754 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Wed, 6 May 2015 11:05:48 +0200
-Subject: [PATCH 2/2] add an option to disable glx support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-this option would help us in yocto to get deterministic build results
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/anholt/libepoxy/pull/52
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.ac | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index bdd70da..6c7153d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -58,7 +58,14 @@ AC_CHECK_HEADER([KHR/khrplatform.h],
- # uintptr_t to a void *") by default. Kill that.
- XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion])
-
--PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no])
-+AC_ARG_ENABLE([glx],
-+ [AS_HELP_STRING([--disable-glx],
-+ [disable if you don't want x11/glx support])],
-+ [],
-+ [enable_glx=yes]
-+ )
-+
-+PKG_CHECK_MODULES(X11, [x11], [x11=$enable_glx], [x11=no])
-
- AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes)
-
---
-1.9.3
-
diff --git a/meta/recipes-graphics/libepoxy/libepoxy/no-need-for-python3.patch b/meta/recipes-graphics/libepoxy/libepoxy/no-need-for-python3.patch
deleted file mode 100644
index 4b8fea58df..0000000000
--- a/meta/recipes-graphics/libepoxy/libepoxy/no-need-for-python3.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-There is no need to use python3 by this package (the python scripts
-that are using during configuration only need python2.7+)
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Gary Thomas <gary@mlbassoc.com>
---
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -40,7 +40,7 @@ m4_ifndef([XORG_MACROS_VERSION],
- XORG_MACROS_VERSION(1.8)
- XORG_DEFAULT_OPTIONS
-
--AC_CHECK_PROGS([PYTHON], [python3 python2 python])
-+AC_CHECK_PROGS([PYTHON], [python2 python])
-
- # Initialize libtool
- AC_DISABLE_STATIC
diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb b/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
new file mode 100644
index 0000000000..71a2c91353
--- /dev/null
+++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
@@ -0,0 +1,42 @@
+SUMMARY = "OpenGL function pointer management library"
+DESCRIPTION = "It hides the complexity of dlopen(), dlsym(), \
+glXGetProcAddress(), eglGetProcAddress(), etc. from the app developer, with \
+very little knowledge needed on their part. They get to read GL specs and \
+write code using undecorated function names like glCompileShader()."
+HOMEPAGE = "https://github.com/anholt/libepoxy/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
+
+SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+ "
+SRC_URI[md5sum] = "e2845de8d2782b2d31c01ae8d7cd4cbb"
+SRC_URI[sha256sum] = "002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d"
+UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
+
+inherit meson pkgconfig features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
+
+PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl"
+PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no -Dx11=false, virtual/libx11 virtual/libgl"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
+
+EXTRA_OEMESON += "-Dtests=false"
+
+PACKAGECONFIG_class-native = "egl x11"
+PACKAGECONFIG_class-nativesdk = "egl x11"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# This will ensure that dlopen will attempt only GL libraries provided by host
+do_install_append_class-native() {
+ chrpath --delete ${D}${libdir}/*.so
+}
+
+do_install_append_class-nativesdk() {
+ chrpath --delete ${D}${libdir}/*.so
+}
diff --git a/meta/recipes-graphics/libepoxy/libepoxy_git.bb b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
deleted file mode 100644
index 6c247ccafe..0000000000
--- a/meta/recipes-graphics/libepoxy/libepoxy_git.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "OpenGL function pointer management library"
-HOMEPAGE = "https://github.com/anholt/libepoxy/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
-
-
-SRC_URI = " \
- git://github.com/anholt/libepoxy.git \
- file://0001-select-platforms-based-on-configuration-results.patch \
- file://0002-add-an-option-to-disable-glx-support.patch \
- file://no-need-for-python3.patch \
-"
-SRCREV="e2c33af5bfcfc9d168f9e776156dd47c33f428b3"
-PV = "1.3.1"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "util-macros virtual/egl"
-
-PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
diff --git a/meta/recipes-graphics/libfakekey/libfakekey_git.bb b/meta/recipes-graphics/libfakekey/libfakekey_git.bb
index c60ddea74d..ab6f5ac9ed 100644
--- a/meta/recipes-graphics/libfakekey/libfakekey_git.bb
+++ b/meta/recipes-graphics/libfakekey/libfakekey_git.bb
@@ -10,14 +10,14 @@ LIC_FILES_CHKSUM = "file://src/libfakekey.c;endline=30;md5=602b5ccd48f6440751086
DEPENDS = "libxtst"
SECTION = "x11/wm"
-SRCREV = "e327ff049b8503af2dadffa84370a0860b9fb682"
-PV = "0.0+git${SRCPV}"
+SRCREV = "7ad885912efb2131e80914e964d5e635b0d07b40"
+PV = "0.3+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/${BPN}"
S = "${WORKDIR}/git"
-inherit autotools pkgconfig gettext distro_features_check
+inherit autotools pkgconfig gettext features_check
# The libxtst requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb b/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb
index ce45e48147..1a31677978 100644
--- a/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb
+++ b/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb
@@ -1,4 +1,8 @@
SUMMARY = "Matchbox window manager core library"
+DESCRIPTION = "Matchbox is an Open Source base environment for the X Window \
+System running on non-desktop embedded platforms such as handhelds, set-top \
+boxes, kiosks and anything else for which screen space, input mechanisms or \
+system resources are limited."
SECTION = "x11/libs"
HOMEPAGE = "http://matchbox-project.org/"
BUGTRACKER = "http://bugzilla.yoctoproject.com/"
@@ -17,7 +21,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN}"
S = "${WORKDIR}/git"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/libsdl/libsdl-1.2.15/libsdl-1.2.15-xdata32.patch b/meta/recipes-graphics/libsdl/libsdl-1.2.15/libsdl-1.2.15-xdata32.patch
deleted file mode 100644
index f98b927522..0000000000
--- a/meta/recipes-graphics/libsdl/libsdl-1.2.15/libsdl-1.2.15-xdata32.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-libX11-1.5.99.901 has changed prototype of _XData32
-
-Upstream-Status: Backport
-<http://bugzilla.libsdl.org/show_bug.cgi?id=1769>
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-diff -r b6b2829cd7ef src/video/x11/SDL_x11sym.h
---- a/src/video/x11/SDL_x11sym.h Wed Feb 27 15:20:31 2013 -0800
-+++ b/src/video/x11/SDL_x11sym.h Wed Mar 27 16:07:23 2013 +0100
-@@ -165,7 +165,7 @@
- */
- #ifdef LONG64
- SDL_X11_MODULE(IO_32BIT)
--SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
-+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
- SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
- #endif
-
diff --git a/meta/recipes-graphics/libsdl/libsdl-1.2.15/pkgconfig.patch b/meta/recipes-graphics/libsdl/libsdl-1.2.15/pkgconfig.patch
deleted file mode 100644
index 913baa92a0..0000000000
--- a/meta/recipes-graphics/libsdl/libsdl-1.2.15/pkgconfig.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-Rather than code which doesn't even work properly when cross compiling,
-lets just use pkg-config instead. Its a little simpler.
-
-RP 2014/6/20
-
-Upstream-Status: Pending
-
-Index: SDL-1.2.15/sdl.m4
-===================================================================
---- SDL-1.2.15.orig/sdl.m4
-+++ SDL-1.2.15/sdl.m4
-@@ -12,174 +12,8 @@ dnl Test for SDL, and define SDL_CFLAGS
- dnl
- AC_DEFUN([AM_PATH_SDL],
- [dnl
--dnl Get the cflags and libraries from the sdl-config script
--dnl
--AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
-- sdl_prefix="$withval", sdl_prefix="")
--AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
-- sdl_exec_prefix="$withval", sdl_exec_prefix="")
--AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
-- , enable_sdltest=yes)
--
-- if test x$sdl_exec_prefix != x ; then
-- sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
-- if test x${SDL_CONFIG+set} != xset ; then
-- SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
-- fi
-- fi
-- if test x$sdl_prefix != x ; then
-- sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
-- if test x${SDL_CONFIG+set} != xset ; then
-- SDL_CONFIG=$sdl_prefix/bin/sdl-config
-- fi
-- fi
--
-- as_save_PATH="$PATH"
-- if test "x$prefix" != xNONE; then
-- PATH="$prefix/bin:$prefix/usr/bin:$PATH"
-- fi
-- AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
-- PATH="$as_save_PATH"
- min_sdl_version=ifelse([$1], ,0.11.0,$1)
-- AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
-- no_sdl=""
-- if test "$SDL_CONFIG" = "no" ; then
-- no_sdl=yes
-- else
-- SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
-- SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
--
-- sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
-- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-- sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
-- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-- sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
-- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-- if test "x$enable_sdltest" = "xyes" ; then
-- ac_save_CFLAGS="$CFLAGS"
-- ac_save_CXXFLAGS="$CXXFLAGS"
-- ac_save_LIBS="$LIBS"
-- CFLAGS="$CFLAGS $SDL_CFLAGS"
-- CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-- LIBS="$LIBS $SDL_LIBS"
--dnl
--dnl Now check if the installed SDL is sufficiently new. (Also sanity
--dnl checks the results of sdl-config to some extent
--dnl
-- rm -f conf.sdltest
-- AC_TRY_RUN([
--#include <stdio.h>
--#include <stdlib.h>
--#include <string.h>
--#include "SDL.h"
--
--char*
--my_strdup (char *str)
--{
-- char *new_str;
--
-- if (str)
-- {
-- new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
-- strcpy (new_str, str);
-- }
-- else
-- new_str = NULL;
--
-- return new_str;
--}
--
--int main (int argc, char *argv[])
--{
-- int major, minor, micro;
-- char *tmp_version;
--
-- /* This hangs on some systems (?)
-- system ("touch conf.sdltest");
-- */
-- { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
--
-- /* HP/UX 9 (%@#!) writes to sscanf strings */
-- tmp_version = my_strdup("$min_sdl_version");
-- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-- printf("%s, bad version string\n", "$min_sdl_version");
-- exit(1);
-- }
--
-- if (($sdl_major_version > major) ||
-- (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
-- (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
-- {
-- return 0;
-- }
-- else
-- {
-- printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
-- printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
-- printf("*** best to upgrade to the required version.\n");
-- printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
-- printf("*** to point to the correct copy of sdl-config, and remove the file\n");
-- printf("*** config.cache before re-running configure\n");
-- return 1;
-- }
--}
--
--],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-- CFLAGS="$ac_save_CFLAGS"
-- CXXFLAGS="$ac_save_CXXFLAGS"
-- LIBS="$ac_save_LIBS"
-- fi
-- fi
-- if test "x$no_sdl" = x ; then
-- AC_MSG_RESULT(yes)
-- ifelse([$2], , :, [$2])
-- else
-- AC_MSG_RESULT(no)
-- if test "$SDL_CONFIG" = "no" ; then
-- echo "*** The sdl-config script installed by SDL could not be found"
-- echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
-- echo "*** your path, or set the SDL_CONFIG environment variable to the"
-- echo "*** full path to sdl-config."
-- else
-- if test -f conf.sdltest ; then
-- :
-- else
-- echo "*** Could not run SDL test program, checking why..."
-- CFLAGS="$CFLAGS $SDL_CFLAGS"
-- CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-- LIBS="$LIBS $SDL_LIBS"
-- AC_TRY_LINK([
--#include <stdio.h>
--#include "SDL.h"
--
--int main(int argc, char *argv[])
--{ return 0; }
--#undef main
--#define main K_and_R_C_main
--], [ return 0; ],
-- [ echo "*** The test program compiled, but did not run. This usually means"
-- echo "*** that the run-time linker is not finding SDL or finding the wrong"
-- echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
-- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-- echo "*** to the installed location Also, make sure you have run ldconfig if that"
-- echo "*** is required on your system"
-- echo "***"
-- echo "*** If you have an old version installed, it is best to remove it, although"
-- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-- [ echo "*** The test program failed to compile or link. See the file config.log for the"
-- echo "*** exact error that occured. This usually means SDL was incorrectly installed"
-- echo "*** or that you have moved SDL since it was installed. In the latter case, you"
-- echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
-- CFLAGS="$ac_save_CFLAGS"
-- CXXFLAGS="$ac_save_CXXFLAGS"
-- LIBS="$ac_save_LIBS"
-- fi
-- fi
-- SDL_CFLAGS=""
-- SDL_LIBS=""
-- ifelse([$3], , :, [$3])
-- fi
-+ PKG_CHECK_MODULES([SDL], [sdl >= $min_sdl_version])
- AC_SUBST(SDL_CFLAGS)
- AC_SUBST(SDL_LIBS)
-- rm -f conf.sdltest
- ])
diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
deleted file mode 100644
index 9c0ec541e3..0000000000
--- a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
+++ /dev/null
@@ -1,70 +0,0 @@
-SUMMARY = "Simple DirectMedia Layer"
-DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
-library designed to provide low level access to audio, keyboard, mouse, \
-joystick, 3D hardware via OpenGL, and 2D video framebuffer."
-HOMEPAGE = "http://www.libsdl.org"
-BUGTRACKER = "http://bugzilla.libsdl.org/"
-
-SECTION = "libs"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
-
-PROVIDES = "virtual/libsdl"
-
-PR = "r3"
-
-SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
- file://libsdl-1.2.15-xdata32.patch \
- file://pkgconfig.patch \
- "
-
-UPSTREAM_CHECK_REGEX = "SDL-(?P<pver>\d+(\.\d+)+)\.tar"
-
-S = "${WORKDIR}/SDL-${PV}"
-
-SRC_URI[md5sum] = "9d96df8417572a2afb781a7c4c811a85"
-SRC_URI[sha256sum] = "d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00"
-
-BINCONFIG = "${bindir}/sdl-config"
-
-inherit autotools lib_package binconfig-disabled pkgconfig
-
-EXTRA_OECONF = "--disable-static --enable-cdrom --enable-threads --enable-timers \
- --enable-file --disable-oss --disable-esd --disable-arts \
- --disable-diskaudio --disable-nas \
- --disable-mintaudio --disable-nasm --disable-video-dga \
- --disable-video-fbcon --disable-video-ps2gs --disable-video-ps3 \
- --disable-xbios --disable-gem --disable-video-dummy \
- --enable-input-events --enable-pthreads \
- --disable-video-svga \
- --disable-video-picogui --disable-video-qtopia --enable-sdl-dlopen \
- --disable-rpath"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG_class-native = "x11"
-PACKAGECONFIG_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-
-PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[tslib] = "--enable-input-tslib, --disable-input-tslib, tslib"
-PACKAGECONFIG[directfb] = "--enable-video-directfb, --disable-video-directfb, directfb"
-PACKAGECONFIG[opengl] = "--enable-video-opengl, --disable-video-opengl, virtual/libgl libglu"
-PACKAGECONFIG[x11] = "--enable-video-x11 --disable-x11-shared, --disable-video-x11, virtual/libx11 libxext libxrandr libxrender"
-
-EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
-
-do_configure_prepend() {
- # Remove old libtool macros.
- MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
- for i in ${MACROS}; do
- rm -f ${S}/acinclude/$i
- done
- export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch
new file mode 100644
index 0000000000..674decccbb
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch
@@ -0,0 +1,34 @@
+From 85138c1ec673e05263ae666baf61f79384daf7e0 Mon Sep 17 00:00:00 2001
+From: Sam Lantinga <slouken@libsdl.org>
+Date: Tue, 30 Jul 2019 11:00:00 -0700
+Subject: [PATCH] Fixed bug 4538 - validate image size when loading BMP files
+
+Upstream-Status: Backport
+[https://hg.libsdl.org/SDL/rev/e7ba650a643a]
+
+CVE: CVE-2019-13616
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/video/SDL_bmp.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
+index 0b68918..a06b0c9 100644
+--- a/src/video/SDL_bmp.c
++++ b/src/video/SDL_bmp.c
+@@ -226,6 +226,11 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
+ SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR);
+ }
+ }
++ if (biWidth <= 0 || biHeight == 0) {
++ SDL_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight);
++ was_error = SDL_TRUE;
++ goto done;
++ }
+ if (biHeight < 0) {
+ topDown = SDL_TRUE;
+ biHeight = -biHeight;
+--
+2.7.4
+
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch
new file mode 100644
index 0000000000..b383bd6548
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch
@@ -0,0 +1,53 @@
+# HG changeset patch
+# User Anuj Mittal <am.devel@gmail.com>
+# Date 1573631462 -10800
+# Node ID 1fb1880d5edfc7c5a370846e13f90b260263627c
+# Parent 007002587d5d34d781c2b628c05e992e0ac5f52d
+configure: check for build dir when building version res (fix bug #4858)
+Fixes a race where we try to build version res file in build directory
+before it has even been created. Prevents errors like:
+
+/bin/bash ../SDL2-2.0.10/build-scripts/updaterev.sh
+/bin/bash ../SDL2-2.0.10/build-scripts/mkinstalldirs build
+mkdir -p -- build
+x86_64-pokysdk-mingw32-windres --include-dir=/home/pokybuild/yocto-worker/meta-mingw/build/build/tmp/work/x86_64-nativesdk-mingw32-pokysdk-mingw32/nativesdk-libsdl2/2.0.10-r0/recipe-sysroot/opt/poky/3.0/sysroots/x86_64-pokysdk-mingw32/usr/include ../SDL2-2.0.10/src/main/windows/version.rc build/version.o
+x86_64-pokysdk-mingw32-windres: build/version.o: No such file or directory
+Makefile:692: recipe for target 'build/version.o' failed
+make: *** [build/version.o] Error 1
+make: *** Waiting for unfinished jobs....
+touch build/.created
+WARNING: exit code 1 from a shell command.
+
+Extension of fix:
+https://hg.libsdl.org/SDL/rev/99d8b18acf8a
+
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <am.devel@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff -r 007002587d5d -r 1fb1880d5edf configure
+--- a/configure Tue Nov 12 17:24:37 2019 -0500
++++ b/configure Wed Nov 13 10:51:02 2019 +0300
+@@ -25493,7 +25493,7 @@
+ VERSION_DEPENDS=`echo $VERSION_SOURCES`
+ VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'`
+ VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.rc,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
++\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
+ \\$(WINDRES) \\$< \\$@,g"`
+
+ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
+diff -r 007002587d5d -r 1fb1880d5edf configure.ac
+--- a/configure.ac Tue Nov 12 17:24:37 2019 -0500
++++ b/configure.ac Wed Nov 13 10:51:02 2019 +0300
+@@ -4177,7 +4177,7 @@
+ VERSION_DEPENDS=`echo $VERSION_SOURCES`
+ VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
+ VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
++\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
+ \\$(WINDRES) \\$< \\$@,g"`
+
+ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch
deleted file mode 100644
index 44e6d4df91..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From b1ed3533433501ec52c8289a5b3a294e57e7f798 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <martin.jansa@gmail.com>
-Date: Thu, 26 May 2016 11:31:52 +0000
-Subject: [PATCH] src/video: make it compatible with wayland 1.10
-
-| build/.libs/SDL_waylandevents.o: In function `wl_registry_bind':
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| build/.libs/SDL_waylandkeyboard.o: In function `wl_registry_bind':
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| build/.libs/SDL_waylandvideo.o: In function `wl_registry_bind':
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| collect2: error: ld returned 1 exit status
-| make: *** [build/libSDL2.la] Error 1
-| ERROR: oe_runmake failed
-
-Upstream-Status: Pending
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
----
- src/video/wayland/SDL_waylanddyn.h | 1 +
- src/video/wayland/SDL_waylandsym.h | 4 ++++
- src/video/webos/SDL_waylanddyn.h | 1 +
- src/video/webos/SDL_waylandsym.h | 4 ++++
- 4 files changed, 10 insertions(+)
-
-diff --git a/src/video/wayland/SDL_waylanddyn.h b/src/video/wayland/SDL_waylanddyn.h
-index 8d9313a..c7b0157 100644
---- a/src/video/wayland/SDL_waylanddyn.h
-+++ b/src/video/wayland/SDL_waylanddyn.h
-@@ -79,6 +79,7 @@ void SDL_WAYLAND_UnloadSymbols(void);
- #define wl_proxy_get_user_data (*WAYLAND_wl_proxy_get_user_data)
- #define wl_proxy_add_listener (*WAYLAND_wl_proxy_add_listener)
- #define wl_proxy_marshal_constructor (*WAYLAND_wl_proxy_marshal_constructor)
-+#define wl_proxy_marshal_constructor_versioned (*WAYLAND_wl_proxy_marshal_constructor_versioned)
-
- #define wl_seat_interface (*WAYLAND_wl_seat_interface)
- #define wl_surface_interface (*WAYLAND_wl_surface_interface)
-diff --git a/src/video/wayland/SDL_waylandsym.h b/src/video/wayland/SDL_waylandsym.h
-index c3b4fa5..b9a0d97 100644
---- a/src/video/wayland/SDL_waylandsym.h
-+++ b/src/video/wayland/SDL_waylandsym.h
-@@ -55,6 +55,10 @@ SDL_WAYLAND_SYM(void, wl_list_insert_list, (struct wl_list *, struct wl_list *))
- SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_4)
- SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor, (struct wl_proxy *, uint32_t opcode, const struct wl_interface *interface, ...))
-
-+/* These functions are available in Wayland >= 1.10 */
-+SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_10)
-+SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor_versioned, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, ...))
-+
- SDL_WAYLAND_INTERFACE(wl_seat_interface)
- SDL_WAYLAND_INTERFACE(wl_surface_interface)
- SDL_WAYLAND_INTERFACE(wl_shm_pool_interface)
---
-1.9.1
-
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch b/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch
new file mode 100644
index 0000000000..8f5b6a0cef
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch
@@ -0,0 +1,41 @@
+# HG changeset patch
+# User Sylvain Becker <sylvain.becker@gmail.com>
+# Date 1570898876 -7200
+# Sat Oct 12 18:47:56 2019 +0200
+# Node ID 369b01006eb2f6fd563f7c315d29ae3fe503c432
+# Parent 4cbaffd0083b8cd17070dbd9d4ab1ce0fa9fca2d
+Fixed bug 4797 - SDL fails to compile with Mesa Master (thanks Michael Olbrich!)
+
+fix building with Mesa 19.2
+
+With Mesa 19.2 building fails with:
+
+/include/GLES/gl.h:63:25: error: conflicting types for 'GLsizeiptr'
+
+The same type is defined in include/SDL_opengl.h for OpenGL and the two
+headers should not be included at the same time.
+This was just never noticed because the same header guard '__gl_h_' was
+used. This was changed in Mesa. The result is this error.
+
+Fix this the same way GLES2 already handles this: Don't include the GLES
+header when the OpenGL header was already included.
+(https://hg.libsdl.org/SDL/rev/a60b3c292f0f)
+
+Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/369b01006eb2]
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+
+diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
+--- a/src/video/SDL_video.c
++++ b/src/video/SDL_video.c
+@@ -37,9 +37,9 @@
+ #include "SDL_opengl.h"
+ #endif /* SDL_VIDEO_OPENGL */
+
+-#if SDL_VIDEO_OPENGL_ES
++#if SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL
+ #include "SDL_opengles.h"
+-#endif /* SDL_VIDEO_OPENGL_ES */
++#endif /* SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL */
+
+ /* GL and GLES2 headers conflict on Linux 32 bits */
+ #if SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch b/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
deleted file mode 100644
index 60185b131f..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-When building use the libtool intermediate .lo files instead of explicitly using
-the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is
-a static build, and .libs/foo.o is a shared build.
-
-If static libraries have been disabled globally then libtool won't generate them
-and explicit references to foo.o won't be satisfied.
-
-Upstream-Status: Pending
-RP
-2016/1/16
-
-
-Index: SDL2-2.0.4/configure.in
-===================================================================
---- SDL2-2.0.4.orig/configure.in
-+++ SDL2-2.0.4/configure.in
-@@ -3464,23 +3464,23 @@ done
-
- VERSION_OBJECTS=`echo $VERSION_SOURCES`
- VERSION_DEPENDS=`echo $VERSION_SOURCES`
--VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
-+VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
- VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
--\\$(objects)/\\2.o: \\1/\\2.rc\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.rc\\\\
- \\$(WINDRES) \\$< \\$@,g"`
-
- SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
- SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
--SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
-+SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
- SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
--\\$(objects)/\\2.o: \\1/\\2.c\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.c\\\\
- \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
-
- SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
- SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
--SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
-+SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
- SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
--\\$(objects)/\\2.o: \\1/\\2.c\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.c\\\\
- \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
-
- # Set runtime shared library paths as needed
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch b/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch
new file mode 100644
index 0000000000..8ca52ebde7
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch
@@ -0,0 +1,60 @@
+From e0f4b6d18ce6f025c78773e909b9c395ad833c7a Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 29 Jul 2019 08:38:32 +0800
+Subject: [PATCH] configure: fix dependencies
+
+Many source files include e.g. wayland-protocols.h which should be found in the
+sysroot but SDL wants to build its own headers from the XML definitions.
+
+However the rules to generate those headers are only dependencies of the
+top-level libSDL2.la object so can be built in parallel with the rest of the
+objects, which can lead to interesting errors if the header is parsed by the
+compiler whilst it's being written by another process:
+
+| gen/wayland-client-protocol.h:3: error: unterminated #ifndef
+| #ifndef WAYLAND_CLIENT_PROTOCOL_H
+
+Solve this by adding more dependencies so the generated files are built before
+the primary objects.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+[Moved to configure.ac]
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9e782c6..997915a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4061,7 +4061,7 @@ DEPENDS=`echo $SOURCES | tr ' ' '\n'`
+ for EXT in asm cc m c S; do
+ OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
+ DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
+-\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created\\\\
++\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created \\$(GEN_OBJECTS)\\\\
+ \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+ done
+
+@@ -4078,14 +4078,14 @@ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
+ SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
+ SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+ SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+-\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
++\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created \\$(GEN_OBJECTS)\\\\
+ \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+
+ SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
+ SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
+ SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+ SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+-\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
++\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created \\$(GEN_OBJECTS)\\\\
+ \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+
+ # Set runtime shared library paths as needed
+--
+2.7.4
+
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
new file mode 100644
index 0000000000..ac4a356043
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
@@ -0,0 +1,77 @@
+SUMMARY = "Simple DirectMedia Layer"
+DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
+library designed to provide low level access to audio, keyboard, mouse, \
+joystick, 3D hardware via OpenGL, and 2D video framebuffer."
+HOMEPAGE = "http://www.libsdl.org"
+BUGTRACKER = "http://bugzilla.libsdl.org/"
+
+SECTION = "libs"
+
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=504a9454ceb89fd75a2583473b11409e"
+
+PROVIDES = "virtual/libsdl2"
+
+SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
+ file://more-gen-depends.patch \
+ file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \
+ file://0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch \
+ file://0001-configure-check-for-build-dir-when-building-version-.patch \
+"
+
+S = "${WORKDIR}/SDL2-${PV}"
+
+SRC_URI[md5sum] = "5a2114f2a6f348bdab5bf52b994811db"
+SRC_URI[sha256sum] = "b4656c13a1f0d0023ae2f4a9cf08ec92fffb464e0f24238337784159b8b91d57"
+
+inherit autotools lib_package binconfig-disabled pkgconfig
+
+BINCONFIG = "${bindir}/sdl2-config"
+
+CVE_PRODUCT = "simple_directmedia_layer sdl"
+
+EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
+ --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
+ --disable-video-dummy \
+ --enable-pthreads \
+ --enable-sdl-dlopen \
+ --disable-rpath \
+ --disable-sndio \
+ "
+
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
+PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
+
+PACKAGECONFIG_class-native = "x11"
+PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+PACKAGECONFIG ??= " \
+ ${PACKAGECONFIG_GL} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
+"
+PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
+PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
+PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+PACKAGECONFIG[kmsdrm] = "--enable-video-kmsdrm,--disable-video-kmsdrm,libdrm virtual/libgbm"
+PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
+PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
+PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
+
+EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
+
+do_configure_prepend() {
+ # Remove old libtool macros.
+ MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
+ for i in ${MACROS}; do
+ rm -f ${S}/acinclude/$i
+ done
+ export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
+}
+
+FILES_${PN}-dev += "${libdir}/cmake"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
deleted file mode 100644
index 844ff333cb..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
+++ /dev/null
@@ -1,68 +0,0 @@
-SUMMARY = "Simple DirectMedia Layer"
-DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
-library designed to provide low level access to audio, keyboard, mouse, \
-joystick, 3D hardware via OpenGL, and 2D video framebuffer."
-HOMEPAGE = "http://www.libsdl.org"
-BUGTRACKER = "http://bugzilla.libsdl.org/"
-
-SECTION = "libs"
-
-LICENSE = "Zlib"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=b2304ad7e91711027590d3f102a754b7"
-
-PROVIDES = "virtual/libsdl2"
-
-DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
-
-SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
- file://linkage.patch \
- file://0001-src-video-make-it-compatible-with-wayland-1.10.patch \
-"
-
-S = "${WORKDIR}/SDL2-${PV}"
-
-SRC_URI[md5sum] = "44fc4a023349933e7f5d7a582f7b886e"
-SRC_URI[sha256sum] = "da55e540bf6331824153805d58b590a29c39d2d506c6d02fa409aedeab21174b"
-
-inherit autotools lib_package binconfig pkgconfig
-
-EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
- --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
- --disable-video-dummy \
- --enable-pthreads \
- --enable-sdl-dlopen \
- --disable-rpath"
-
-# opengl packageconfig factored out to make it easy for distros
-# and BSP layers to pick either (desktop) opengl, gles2, or no GL
-PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)}"
-
-PACKAGECONFIG ??= " \
- ${PACKAGECONFIG_GL} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-"
-PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
-PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
-PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
-PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
-PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland libxkbcommon"
-PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
-
-EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
-
-do_configure_prepend() {
- # Remove old libtool macros.
- MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
- for i in ${MACROS}; do
- rm -f ${S}/acinclude/$i
- done
- export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
-}
-
-FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/meta/recipes-graphics/libva/libva-utils/0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch b/meta/recipes-graphics/libva/libva-utils/0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch
new file mode 100644
index 0000000000..01fb71913b
--- /dev/null
+++ b/meta/recipes-graphics/libva/libva-utils/0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch
@@ -0,0 +1,35 @@
+From 8fc14e4bc81885b80c3072e549c2e6f59533d7ef Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Fri, 8 Feb 2019 11:45:55 +0800
+Subject: [PATCH] Build sfcsample only when X11 backend is enabled
+
+See: https://github.com/intel/libva-utils/pull/149, and
+https://github.com/intel/libva-utils/issues/150
+
+Upstream-Status: Submitted
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d28175a..e294e25 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -24,10 +24,11 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+ AUTOMAKE_OPTIONS = foreign
+
+-SUBDIRS = common decode encode vainfo videoprocess vendor/intel vendor/intel/sfcsample
++SUBDIRS = common decode encode vainfo videoprocess vendor/intel
+
+ if USE_X11
+ SUBDIRS += putsurface
++SUBDIRS += vendor/intel/sfcsample
+ else
+ if USE_WAYLAND
+ SUBDIRS += putsurface
+--
+2.17.1
+
diff --git a/meta/recipes-graphics/libva/libva-utils_2.5.0.bb b/meta/recipes-graphics/libva/libva-utils_2.5.0.bb
new file mode 100644
index 0000000000..f68d0cf8b6
--- /dev/null
+++ b/meta/recipes-graphics/libva/libva-utils_2.5.0.bb
@@ -0,0 +1,35 @@
+SUMMARY = "libva-utils is a collection of utilities from libva project"
+
+DESCRIPTION = "libva-utils is a collection of utilities \
+and examples to exercise VA-API in accordance with the libva \
+project.VA-API is an open-source library and API specification, \
+which provides access to graphics hardware acceleration capabilities \
+for video processing. It consists of a main library and driver-specific \
+acceleration backends for each supported hardware vendor"
+
+HOMEPAGE = "https://01.org/linuxmedia/vaapi"
+BUGTRACKER = "https://github.com/intel/libva-utils/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2 \
+ file://0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch \
+ "
+
+SRC_URI[md5sum] = "c1fada26c286654859eff33b2562cb79"
+SRC_URI[sha256sum] = "9238c9d5110d60f935683390b8383fdac3507346384cd5f117a23c6db1d72a17"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/libva-utils/releases"
+
+DEPENDS = "libva"
+
+inherit autotools pkgconfig features_check
+
+# depends on libva which requires opengl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
diff --git a/meta/recipes-graphics/libva/libva_2.5.0.bb b/meta/recipes-graphics/libva/libva_2.5.0.bb
new file mode 100644
index 0000000000..73e2e01c3f
--- /dev/null
+++ b/meta/recipes-graphics/libva/libva_2.5.0.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Video Acceleration (VA) API for Linux"
+DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
+and API specification which enables and provides access to graphics \
+hardware (GPU) acceleration for video processing on Linux and UNIX \
+based operating systems. Accelerated processing includes video \
+decoding, video encoding, subpicture blending and rendering. The \
+specification was originally designed by Intel for its GMA (Graphics \
+Media Accelerator) series of GPU hardware, the API is however not \
+limited to GPUs or Intel specific hardware, as other hardware and \
+manufacturers can also freely use this API for hardware accelerated \
+video decoding."
+
+HOMEPAGE = "https://01.org/linuxmedia/vaapi"
+BUGTRACKER = "https://github.com/intel/libva/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "3688212fb7a87947070f3729e91ff7cf"
+SRC_URI[sha256sum] = "3aa89cd369a506ac4dbe5de7c0ef5da4f3d220bf986403f02fa1f6f702af6878"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
+
+DEPENDS = "libdrm virtual/mesa"
+
+inherit autotools pkgconfig features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+EXTRA_OECONF = "ac_cv_prog_WAYLAND_SCANNER=wayland-scanner"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
+
+PACKAGES =+ "${PN}-x11 ${PN}-glx ${PN}-wayland"
+
+RDEPENDS_${PN}-x11 =+ "${PN}"
+RDEPENDS_${PN}-glx =+ "${PN}-x11"
+
+FILES_${PN}-x11 =+ "${libdir}/libva-x11*${SOLIBS}"
+FILES_${PN}-glx =+ "${libdir}/libva-glx*${SOLIBS}"
+FILES_${PN}-wayland =+ "${libdir}/libva-wayland*${SOLIBS}"
diff --git a/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb b/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb
index cbaf054365..57a3024ea9 100644
--- a/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb
+++ b/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb
@@ -1,4 +1,5 @@
SUMMARY = "Custom Matchbox session files"
+DESCRIPTION = "Very simple session manager for matchbox tools"
HOMEPAGE = "http://www.matchbox-project.org/"
BUGTRACKER = "http://bugzilla.yoctoproject.org/"
diff --git a/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb b/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb
deleted file mode 100644
index c3d2d23db5..0000000000
--- a/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Matchbox lightweight window manager"
-HOMEPAGE = "http://matchbox-project.org"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://src/wm.h;endline=21;md5=a7e844465edbcf79c282369f93caa835 \
- file://src/main.c;endline=21;md5=3e5d9f832b527b0d72dbe8e3c4c60b95 \
- file://src/wm.c;endline=21;md5=8dc9d24477d87ef5dfbc2e4927146aab"
-
-SECTION = "x11/wm"
-DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification expat gconf libxcursor libxfixes"
-
-# SRCREV tagged 1.2.1
-SRCREV = "9fd1806dfa7c8f2202db18b7bc880857a3019f8c"
-SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \
- file://kbdconfig"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-FILES_${PN} = "${bindir}/* \
- ${datadir}/matchbox \
- ${sysconfdir}/matchbox \
- ${datadir}/themes/blondie/matchbox \
- ${datadir}/themes/Default/matchbox \
- ${datadir}/themes/MBOpus/matchbox"
-
-EXTRA_OECONF = " --enable-startup-notification \
- --disable-xrm \
- --enable-expat \
- --with-expat-lib=${STAGING_LIBDIR} \
- --with-expat-includes=${STAGING_INCDIR}"
-
-do_install_prepend() {
- install ${WORKDIR}/kbdconfig ${S}/data/kbdconfig
-}
diff --git a/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb b/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb
new file mode 100644
index 0000000000..b9961c398c
--- /dev/null
+++ b/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Matchbox lightweight window manager"
+HOMEPAGE = "http://matchbox-project.org"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://src/wm.h;endline=21;md5=a7e844465edbcf79c282369f93caa835 \
+ file://src/main.c;endline=21;md5=3e5d9f832b527b0d72dbe8e3c4c60b95 \
+ file://src/wm.c;endline=21;md5=8dc9d24477d87ef5dfbc2e4927146aab"
+
+SECTION = "x11/wm"
+DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification expat gconf libxcursor libxfixes"
+
+# SRCREV tagged 1.2.2
+SRCREV = "27da947e7fbdf9659f7e5bd1e92af92af6c03970"
+SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \
+ file://kbdconfig"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+FILES_${PN} = "${bindir}/* \
+ ${datadir}/matchbox \
+ ${sysconfdir}/matchbox \
+ ${datadir}/themes/blondie/matchbox \
+ ${datadir}/themes/Default/matchbox \
+ ${datadir}/themes/MBOpus/matchbox"
+
+EXTRA_OECONF = " --enable-startup-notification \
+ --disable-xrm \
+ --enable-expat \
+ --with-expat-lib=${STAGING_LIBDIR} \
+ --with-expat-includes=${STAGING_INCDIR}"
+
+do_install_prepend() {
+ install ${WORKDIR}/kbdconfig ${S}/data/kbdconfig
+}
diff --git a/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb b/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
deleted file mode 100644
index a1a8e26e07..0000000000
--- a/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Library for caching application menus"
-DESCRIPTION = "A library creating and utilizing caches to speed up freedesktop.org application menus"
-HOMEPAGE = "http://lxde.sourceforge.net/"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6"
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 libfm-extra"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "a856ba860b16fdc8c69ee784bc4ade36"
-SRC_URI[sha256sum] = "0ac72649919946070258320aafc320467dd040bcef7b3a225e2ab7241ddffd59"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.0/"
-
-inherit autotools gettext pkgconfig gtk-doc
diff --git a/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb b/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb
new file mode 100644
index 0000000000..ddbbd94066
--- /dev/null
+++ b/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Library for caching application menus"
+DESCRIPTION = "A library creating and utilizing caches to speed up freedesktop.org application menus"
+HOMEPAGE = "http://lxde.sourceforge.net/"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6"
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "99999a0bca48b980105208760c8fd893"
+SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9273ec7"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.1/"
+
+inherit autotools gettext pkgconfig gtk-doc
diff --git a/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
new file mode 100644
index 0000000000..1869e11059
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -0,0 +1,43 @@
+From b6d9bc97cb0e8c540a45dba5440b036fb940ff95 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Mon, 11 Nov 2019 09:38:15 -0800
+Subject: [PATCH] meson.build: check for all linux host_os combinations
+
+Make sure that we are also looking for our host_os combinations like
+linux-musl etc. when assuming support for DRM/KMS.
+
+Also delete a duplicate line.
+
+Upstream-Status: Pending
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+
+---
+ meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index d584152..a1f098c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -117,7 +117,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
+ # Only build shared_glapi if at least one OpenGL API is enabled
+ with_shared_glapi = get_option('shared-glapi') and with_any_opengl
+
+-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system())
++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+
+ dri_drivers = get_option('dri-drivers')
+ if dri_drivers.contains('auto')
+@@ -856,7 +856,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }',
+ endif
+
+ # TODO: this is very incomplete
+-if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system())
++if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+ pre_args += '-D_GNU_SOURCE'
+ elif host_machine.system() == 'sunos'
+ pre_args += '-D__EXTENSIONS__'
diff --git a/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
new file mode 100644
index 0000000000..199ed572d5
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
@@ -0,0 +1,46 @@
+From af6923544de02ded648a736e07b9bd8b7c52dba9 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Wed, 23 Oct 2019 09:46:28 -0700
+Subject: [PATCH] meson.build: make TLS ELF optional
+
+USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make
+TLS GLX optional again" patch updated to the latest mesa.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+
+---
+ meson.build | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index a1f098c..1e31eb4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -378,7 +378,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
+ endif
+
+ # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
+-if not with_platform_android or get_option('platform-sdk-version') >= 29
++if (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
+ pre_args += '-DUSE_ELF_TLS'
+ endif
+
+diff --git a/meson_options.txt b/meson_options.txt
+index b768c15..76cef24 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -333,6 +333,12 @@ option(
+ value : true,
+ description : 'Enable direct rendering in GLX and EGL for DRI',
+ )
++option(
++ 'elf-tls',
++ type : 'boolean',
++ value : true,
++ description : 'Enable TLS support in ELF',
++)
+ option(
+ 'I-love-half-baked-turnips',
+ type : 'boolean',
diff --git a/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
new file mode 100644
index 0000000000..c20a1f7c52
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
@@ -0,0 +1,46 @@
+From 5ad6515238bc042cccf9959abad44fdee9aeb07f Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Wed, 12 Jun 2019 14:18:31 -0300
+Subject: [PATCH] Allow enable DRI without DRI drivers
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+---
+ meson.build | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1e31eb4..512eec6 100644
+--- a/meson.build
++++ b/meson.build
+@@ -147,7 +147,7 @@ with_dri_r200 = dri_drivers.contains('r200')
+ with_dri_nouveau = dri_drivers.contains('nouveau')
+ with_dri_swrast = dri_drivers.contains('swrast')
+
+-with_dri = dri_drivers.length() != 0 and dri_drivers != ['']
++with_dri = get_option('dri') or (dri_drivers.length() != 0 and dri_drivers != [''])
+
+ gallium_drivers = get_option('gallium-drivers')
+ if gallium_drivers.contains('auto')
+diff --git a/meson_options.txt b/meson_options.txt
+index 76cef24..a8abd04 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -34,6 +34,12 @@ option(
+ choices : ['auto', 'true', 'false'],
+ description : 'enable support for dri3'
+ )
++option(
++ 'dri',
++ type : 'boolean',
++ value : false,
++ description : 'enable support for dri'
++)
+ option(
+ 'dri-drivers',
+ type : 'array',
diff --git a/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch b/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
new file mode 100644
index 0000000000..b5658d0c9d
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
@@ -0,0 +1,147 @@
+From 1b1cb6e5ea25eaa98573328b9565728a08245997 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair@alistair23.me>
+Date: Thu, 14 Nov 2019 09:06:02 -0800
+Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that
+ gen_matypes is gone."
+
+This reverts commit 20294dceebc23236e33b22578245f7e6f41b6997.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Alistair Francis <alistair@alistair23.me>
+
+---
+ meson.build | 94 ++++++++++++++++++++++++++++++-----------------
+ meson_options.txt | 6 +++
+ 2 files changed, 67 insertions(+), 33 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 512eec6..a2bcc3a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -49,6 +49,7 @@ with_vulkan_icd_dir = get_option('vulkan-icd-dir')
+ with_tests = get_option('build-tests')
+ with_valgrind = get_option('valgrind')
+ with_libunwind = get_option('libunwind')
++with_asm = get_option('asm')
+ with_glx_read_only_text = get_option('glx-read-only-text')
+ with_glx_direct = get_option('glx-direct')
+ with_osmesa = get_option('osmesa')
+@@ -985,41 +986,68 @@ endif
+
+ # TODO: shared/static? Is this even worth doing?
+
++# When cross compiling we generally need to turn off the use of assembly,
++# because mesa's assembly relies on building an executable for the host system,
++# and running it to get information about struct sizes. There is at least one
++# case of cross compiling where we can use asm, and that's x86_64 -> x86 when
++# host OS == build OS, since in that case the build machine can run the host's
++# binaries.
++if with_asm and meson.is_cross_build()
++ if build_machine.system() != host_machine.system()
++ # TODO: It may be possible to do this with an exe_wrapper (like wine).
++ message('Cross compiling from one OS to another, disabling assembly.')
++ with_asm = false
++ elif not (build_machine.cpu_family().startswith('x86') and host_machine.cpu_family() == 'x86')
++ # FIXME: Gentoo always sets -m32 for x86_64 -> x86 builds, resulting in an
++ # x86 -> x86 cross compile. We use startswith rather than == to handle this
++ # case.
++ # TODO: There may be other cases where the 64 bit version of the
++ # architecture can run 32 bit binaries (aarch64 and armv7 for example)
++ message('''
++ Cross compiling to different architectures, and the host cannot run
++ the build machine's binaries. Disabling assembly.
++ ''')
++ with_asm = false
++ endif
++endif
++
+ with_asm_arch = ''
+-if host_machine.cpu_family() == 'x86'
+- if system_has_kms_drm or host_machine.system() == 'gnu'
+- with_asm_arch = 'x86'
+- pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
+- '-DUSE_SSE_ASM']
+-
+- if with_glx_read_only_text
+- pre_args += ['-DGLX_X86_READONLY_TEXT']
++if with_asm
++ if host_machine.cpu_family() == 'x86'
++ if system_has_kms_drm or host_machine.system() == 'gnu'
++ with_asm_arch = 'x86'
++ pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
++ '-DUSE_SSE_ASM']
++
++ if with_glx_read_only_text
++ pre_args += ['-DGLX_X86_READONLY_TEXT']
++ endif
++ endif
++ elif host_machine.cpu_family() == 'x86_64'
++ if system_has_kms_drm
++ with_asm_arch = 'x86_64'
++ pre_args += ['-DUSE_X86_64_ASM']
++ endif
++ elif host_machine.cpu_family() == 'arm'
++ if system_has_kms_drm
++ with_asm_arch = 'arm'
++ pre_args += ['-DUSE_ARM_ASM']
++ endif
++ elif host_machine.cpu_family() == 'aarch64'
++ if system_has_kms_drm
++ with_asm_arch = 'aarch64'
++ pre_args += ['-DUSE_AARCH64_ASM']
++ endif
++ elif host_machine.cpu_family() == 'sparc64'
++ if system_has_kms_drm
++ with_asm_arch = 'sparc'
++ pre_args += ['-DUSE_SPARC_ASM']
++ endif
++ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little'
++ if system_has_kms_drm
++ with_asm_arch = 'ppc64le'
++ pre_args += ['-DUSE_PPC64LE_ASM']
+ endif
+- endif
+-elif host_machine.cpu_family() == 'x86_64'
+- if system_has_kms_drm
+- with_asm_arch = 'x86_64'
+- pre_args += ['-DUSE_X86_64_ASM']
+- endif
+-elif host_machine.cpu_family() == 'arm'
+- if system_has_kms_drm
+- with_asm_arch = 'arm'
+- pre_args += ['-DUSE_ARM_ASM']
+- endif
+-elif host_machine.cpu_family() == 'aarch64'
+- if system_has_kms_drm
+- with_asm_arch = 'aarch64'
+- pre_args += ['-DUSE_AARCH64_ASM']
+- endif
+-elif host_machine.cpu_family() == 'sparc64'
+- if system_has_kms_drm
+- with_asm_arch = 'sparc'
+- pre_args += ['-DUSE_SPARC_ASM']
+- endif
+-elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little'
+- if system_has_kms_drm
+- with_asm_arch = 'ppc64le'
+- pre_args += ['-DUSE_PPC64LE_ASM']
+ endif
+ endif
+
+diff --git a/meson_options.txt b/meson_options.txt
+index a8abd04..0f4bd80 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -233,6 +233,12 @@ option(
+ value : false,
+ description : 'Enable GLVND support.'
+ )
++option(
++ 'asm',
++ type : 'boolean',
++ value : true,
++ description : 'Build assembly code if possible'
++)
+ option(
+ 'glx-read-only-text',
+ type : 'boolean',
diff --git a/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch b/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch
deleted file mode 100644
index 48bd32567c..0000000000
--- a/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 5ec140c17b54c25920091501b665b9aa809cc5e8 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Mon, 11 Jul 2016 10:44:25 -0700
-Subject: mapi: Massage code to allow clang to compile.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-According to https://llvm.org/bugs/show_bug.cgi?id=19778#c3 this code
-was violating the spec, resulting in it failing to compile.
-
-Cc: mesa-stable@lists.freedesktop.org
-Co-authored-by: Tomasz Paweł Gajc <tpgxyz@gmail.com>
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89599
-Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-diff --git a/configure.ac b/configure.ac
-index 3799d8d..1ca8359 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -226,6 +226,7 @@ AX_GCC_FUNC_ATTRIBUTE([packed])
- AX_GCC_FUNC_ATTRIBUTE([pure])
- AX_GCC_FUNC_ATTRIBUTE([returns_nonnull])
- AX_GCC_FUNC_ATTRIBUTE([unused])
-+AX_GCC_FUNC_ATTRIBUTE([visibility])
- AX_GCC_FUNC_ATTRIBUTE([warn_unused_result])
- AX_GCC_FUNC_ATTRIBUTE([weak])
-
-diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h
-index 38faccc..c5262a1 100644
---- a/src/mapi/entry_x86-64_tls.h
-+++ b/src/mapi/entry_x86-64_tls.h
-@@ -25,6 +25,11 @@
- * Chia-I Wu <olv@lunarg.com>
- */
-
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
-
- __asm__(".text\n"
- ".balign 32\n"
-@@ -54,8 +59,8 @@ entry_patch_public(void)
- {
- }
-
--static char
--x86_64_entry_start[];
-+extern char
-+x86_64_entry_start[] HIDDEN;
-
- mapi_func
- entry_get_public(int slot)
-diff --git a/src/mapi/entry_x86_tls.h b/src/mapi/entry_x86_tls.h
-index 46d2ece..231b409 100644
---- a/src/mapi/entry_x86_tls.h
-+++ b/src/mapi/entry_x86_tls.h
-@@ -27,6 +27,12 @@
-
- #include <string.h>
-
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
-+
- __asm__(".text");
-
- __asm__("x86_current_tls:\n\t"
-@@ -71,8 +77,8 @@ __asm__(".text");
- extern unsigned long
- x86_current_tls();
-
--static char x86_entry_start[];
--static char x86_entry_end[];
-+extern char x86_entry_start[] HIDDEN;
-+extern char x86_entry_end[] HIDDEN;
-
- void
- entry_patch_public(void)
-diff --git a/src/mapi/entry_x86_tsd.h b/src/mapi/entry_x86_tsd.h
-index ea7bacb..03d9735 100644
---- a/src/mapi/entry_x86_tsd.h
-+++ b/src/mapi/entry_x86_tsd.h
-@@ -25,6 +25,11 @@
- * Chia-I Wu <olv@lunarg.com>
- */
-
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
-
- #define X86_ENTRY_SIZE 32
-
-@@ -58,8 +63,8 @@ __asm__(".balign 32\n"
- #include <string.h>
- #include "u_execmem.h"
-
--static const char x86_entry_start[];
--static const char x86_entry_end[];
-+extern const char x86_entry_start[] HIDDEN;
-+extern const char x86_entry_end[] HIDDEN;
-
- void
- entry_patch_public(void)
---
-cgit v0.10.2
-
diff --git a/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch b/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch
deleted file mode 100644
index d2d67558b6..0000000000
--- a/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Configure checks for compiler to be gcc and then it enables asm_offsets
-generation. see
-
-https://cgit.freedesktop.org/mesa/mesa/commit/?id=73c9b4b0e05fc66629ba250846948dc55c0e7a0d
-
-However, we missed the check when enabling this on cross compilation
-when architecture for both host and target is x86
-
-Fixes errors like
-./gen_matypes > matypes.h
-/bin/bash: ./gen_matypes: No such file or directory
-
--Khem
-
-Upstream-Status: Submitted
-
-Index: mesa-12.0.1/configure.ac
-===================================================================
---- mesa-12.0.1.orig/configure.ac
-+++ mesa-12.0.1/configure.ac
-@@ -732,7 +732,7 @@ test "x$enable_asm" = xno && AC_MSG_RESU
- if test "x$enable_asm" = xyes -a "x$cross_compiling" = xyes; then
- case "$host_cpu" in
- i?86 | x86_64 | amd64)
-- if test "x$host_cpu" != "x$target_cpu"; then
-+ if test "x$host_cpu" != "x$target_cpu" -o "x$acv_mesa_CLANG" = xyes; then
- enable_asm=no
- AC_MSG_RESULT([no, cross compiling])
- fi
diff --git a/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch b/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
deleted file mode 100644
index e4461ef177..0000000000
--- a/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-endianness check is OS wide and not specific to libc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: mesa-11.1.1/src/gallium/include/pipe/p_config.h
-===================================================================
---- mesa-11.1.1.orig/src/gallium/include/pipe/p_config.h
-+++ mesa-11.1.1/src/gallium/include/pipe/p_config.h
-@@ -130,7 +130,7 @@
- * Endian detection.
- */
-
--#ifdef __GLIBC__
-+#if defined(__linux__)
- #include <endian.h>
-
- #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/meta/recipes-graphics/mesa/libglu_9.0.0.bb b/meta/recipes-graphics/mesa/libglu_9.0.0.bb
deleted file mode 100644
index 010998d926..0000000000
--- a/meta/recipes-graphics/mesa/libglu_9.0.0.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "The OpenGL utility toolkit"
-DESCRIPTION = "GLU is a utility toolkit used with OpenGL implementations"
-
-HOMEPAGE = "http://mesa3d.org"
-BUGTRACKER = "https://bugs.freedesktop.org"
-SECTION = "x11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b356456e7d44471d9 \
- file://src/libtess/tess.c;endline=29;md5=6b79c570f644363b356456e7d44471d9"
-
-# Epoch as this used to be part of mesa
-PE = "2"
-PR = "0"
-
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "be9249132ff49275461cf92039083030"
-SRC_URI[sha256sum] = "1f7ad0d379a722fcbd303aa5650c6d7d5544fde83196b42a73d1193568a4df12"
-
-S = "${WORKDIR}/glu-${PV}"
-
-DEPENDS = "virtual/libgl"
-
-inherit autotools pkgconfig distro_features_check
-
-# Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-# Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
-RDEPENDS_${PN}-dev = ""
diff --git a/meta/recipes-graphics/mesa/libglu_9.0.1.bb b/meta/recipes-graphics/mesa/libglu_9.0.1.bb
new file mode 100644
index 0000000000..703f131f79
--- /dev/null
+++ b/meta/recipes-graphics/mesa/libglu_9.0.1.bb
@@ -0,0 +1,30 @@
+SUMMARY = "The OpenGL utility toolkit"
+DESCRIPTION = "GLU is a utility toolkit used with OpenGL implementations"
+
+HOMEPAGE = "http://mesa3d.org"
+BUGTRACKER = "https://bugs.freedesktop.org"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b356456e7d44471d9 \
+ file://src/libtess/tess.c;endline=29;md5=6b79c570f644363b356456e7d44471d9"
+
+# Epoch as this used to be part of mesa
+PE = "2"
+PR = "0"
+
+SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "5599a0e0a97335e10239d9165aced60d"
+SRC_URI[sha256sum] = "f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7"
+
+S = "${WORKDIR}/glu-${PV}"
+
+DEPENDS = "virtual/libgl"
+
+inherit autotools pkgconfig features_check
+
+# Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11 opengl"
+
+# Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
+RDEPENDS_${PN}-dev = ""
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch b/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
index 6b676cdd20..b27d9eafa5 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
@@ -1,4 +1,4 @@
-From c59e286fa4e818ca015dd40e4725636309970ea8 Mon Sep 17 00:00:00 2001
+From 2e0367a941445a862ab99c54ec85d1357d0f73c0 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 10 Jul 2014 14:30:52 +0200
Subject: [PATCH] Install few more test programs
@@ -8,27 +8,28 @@ Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- src/egl/opengl/Makefile.am | 2 +-
- src/egl/opengles1/Makefile.am | 10 ++++------
- src/egl/openvg/Makefile.am | 2 +-
- 3 files changed, 6 insertions(+), 8 deletions(-)
+ src/egl/opengl/Makefile.am | 3 +--
+ src/egl/openvg/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
-index fe7faa9..3e48141 100644
+index 6d184ff6..ab09d028 100644
--- a/src/egl/opengl/Makefile.am
+++ b/src/egl/opengl/Makefile.am
-@@ -50,7 +50,7 @@ endif
- endif
+@@ -57,8 +57,7 @@ endif
if HAVE_EGL
+ bin_PROGRAMS = \
+- eglinfo
-noinst_PROGRAMS = \
-+bin_PROGRAMS = \
- eglinfo \
++ eglinfo \
peglgears \
$(EGL_DRM_DEMOS) \
+ $(EGL_X11_DEMOS) \
diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
-index b0f1212..5fd1cf8 100644
+index b0f1212f..5fd1cf83 100644
--- a/src/egl/openvg/Makefile.am
+++ b/src/egl/openvg/Makefile.am
@@ -49,7 +49,7 @@ endif
@@ -40,6 +41,3 @@ index b0f1212..5fd1cf8 100644
$(EGL_X11_DEMOS)
endif
endif
---
-2.1.4
-
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch b/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch
index a6085754d2..a6d168175f 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch
@@ -1,12 +1,13 @@
-From 0b6f95f9b8ece22e9856c150e4be29fd86eaf546 Mon Sep 17 00:00:00 2001
+From 894add34c2b5e6b4ccc78996bf681d7ec7bc9e36 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 10 Jul 2014 14:29:27 +0200
-Subject: [PATCH 8/9] glsl, perf: Add few missing .glsl, .vert, .frag files to
+Subject: [PATCH] glsl, perf: Add few missing .glsl, .vert, .frag files to
EXTRA_DATA
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
---
src/fpglsl/Makefile.am | 2 ++
src/glsl/Makefile.am | 10 ++++++++--
@@ -15,7 +16,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
-index 47c1039..fd43c91 100644
+index 47c1039f..fd43c919 100644
--- a/src/fpglsl/Makefile.am
+++ b/src/fpglsl/Makefile.am
@@ -39,10 +39,12 @@ noinst_PROGRAMS = \
@@ -32,7 +33,7 @@ index 47c1039..fd43c91 100644
mov-imm.glsl \
simpleif.glsl \
diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
-index 4faa8db..079a29d 100644
+index 4faa8dbf..079a29d8 100644
--- a/src/glsl/Makefile.am
+++ b/src/glsl/Makefile.am
@@ -37,7 +37,7 @@ AM_LDFLAGS = \
@@ -71,13 +72,13 @@ index 4faa8db..079a29d 100644
+ skinning.vert \
toyball.shtest
diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
-index 5363c58..c5cca8d 100644
+index f0031fea..60069396 100644
--- a/src/perf/Makefile.am
+++ b/src/perf/Makefile.am
-@@ -57,3 +57,9 @@ bin_PROGRAMS = \
- endif
+@@ -59,3 +59,9 @@ endif
glslstateschange_LDADD = libperf.la ../util/libutil.la
+ glsl_compile_time_LDADD = ../util/libutil.la
+
+EXTRA_DIST = \
+ glslstateschange1.frag \
@@ -85,7 +86,7 @@ index 5363c58..c5cca8d 100644
+ glslstateschange2.frag \
+ glslstateschange2.vert
diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
-index 4a85ed4..48b08f4 100644
+index 4a85ed40..48b08f48 100644
--- a/src/vpglsl/Makefile.am
+++ b/src/vpglsl/Makefile.am
@@ -44,6 +44,7 @@ EXTRA_DIST = \
@@ -96,6 +97,3 @@ index 4a85ed4..48b08f4 100644
mov.glsl \
nestedifs.glsl \
nestedswizzle.glsl \
---
-2.0.0
-
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch b/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch
index 1262dee237..8a98ba60d1 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch
@@ -1,10 +1,11 @@
-From c8c3de5417d6b6c7d7579c528c0cab718f4bfdb6 Mon Sep 17 00:00:00 2001
+From 477ab6d90a17d8e4d3935be6ce8b8e154db0e3e5 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 10 Jul 2014 14:48:12 +0200
-Subject: [PATCH 9/9] glsl, perf: Install .glsl, .vert, .frag files
+Subject: [PATCH] glsl, perf: Install .glsl, .vert, .frag files
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
---
src/fpglsl/Makefile.am | 3 ++-
src/glsl/Makefile.am | 3 ++-
@@ -13,7 +14,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
-index fd43c91..2bf51de 100644
+index fd43c919..2bf51de4 100644
--- a/src/fpglsl/Makefile.am
+++ b/src/fpglsl/Makefile.am
@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
@@ -27,7 +28,7 @@ index fd43c91..2bf51de 100644
dowhile2.glsl \
dowhile.glsl \
diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
-index 079a29d..f66ec29 100644
+index 079a29d8..f66ec299 100644
--- a/src/glsl/Makefile.am
+++ b/src/glsl/Makefile.am
@@ -118,7 +118,8 @@ vert_or_frag_only_LDADD = ../util/libutil.la
@@ -41,12 +42,12 @@ index 079a29d..f66ec29 100644
CH06-brick.vert \
CH11-bumpmap.frag \
diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
-index c5cca8d..140256d 100644
+index 60069396..469bdf45 100644
--- a/src/perf/Makefile.am
+++ b/src/perf/Makefile.am
-@@ -58,7 +58,8 @@ endif
-
+@@ -60,7 +60,8 @@ endif
glslstateschange_LDADD = libperf.la ../util/libutil.la
+ glsl_compile_time_LDADD = ../util/libutil.la
-EXTRA_DIST = \
+demosdatadir=$(datadir)/$(PACKAGE)/
@@ -55,7 +56,7 @@ index c5cca8d..140256d 100644
glslstateschange1.vert \
glslstateschange2.frag \
diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
-index 48b08f4..5526867 100644
+index 48b08f48..55268675 100644
--- a/src/vpglsl/Makefile.am
+++ b/src/vpglsl/Makefile.am
@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
@@ -68,6 +69,3 @@ index 48b08f4..5526867 100644
for.glsl \
func.glsl \
func2.glsl \
---
-2.0.0
-
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
deleted file mode 100644
index fab0bdb2ee..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "Mesa demo applications"
-DESCRIPTION = "This package includes the demonstration application, such as glxgears. \
-These applications can be used for Mesa validation and benchmarking."
-HOMEPAGE = "http://mesa3d.org"
-BUGTRACKER = "https://bugs.freedesktop.org"
-SECTION = "x11"
-
-LICENSE = "MIT & PD"
-LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
- file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
-
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
- file://0001-mesa-demos-Add-missing-data-files.patch \
- file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
- file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
- file://0007-Install-few-more-test-programs.patch \
- file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
- file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
- file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
- file://0013-only-build-GLX-demos-if-needed.patch \
- "
-SRC_URI[md5sum] = "628e75c23c17394f11a316c36f8e4164"
-SRC_URI[sha256sum] = "c173154bbd0d5fb53d732471984def42fb1b14ac85fcb834138fb9518b3e0bef"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/egl, virtual/libgl ...
-REQUIRED_DISTRO_FEATURES = "opengl x11"
-
-PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
- x11 glew glu glx"
-
-# The Wayland code doesn't work with Wayland 1.0, so disable it for now
-#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
-
-EXTRA_OECONF = "--with-system-data-files"
-
-PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm"
-PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
-PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype"
-PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
-PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
-PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,"
-PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
-PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg"
-PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
-PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
-PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
-PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
-
-do_install_append() {
- # it can be completely empty when all PACKAGECONFIG options are disabled
- rmdir --ignore-fail-on-non-empty ${D}${bindir}
-
- if [ -f ${D}${bindir}/clear ]; then
- mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos
- fi
-}
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb
new file mode 100644
index 0000000000..38bdbded29
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Mesa demo applications"
+DESCRIPTION = "This package includes the demonstration application, such as glxgears. \
+These applications can be used for Mesa validation and benchmarking."
+HOMEPAGE = "http://mesa3d.org"
+BUGTRACKER = "https://bugs.freedesktop.org"
+SECTION = "x11"
+
+LICENSE = "MIT & PD"
+LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
+ file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
+
+SRC_URI = "https://mesa.freedesktop.org/archive/demos/${BPN}-${PV}.tar.bz2 \
+ file://0001-mesa-demos-Add-missing-data-files.patch \
+ file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
+ file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
+ file://0007-Install-few-more-test-programs.patch \
+ file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
+ file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
+ file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
+ file://0013-only-build-GLX-demos-if-needed.patch \
+ "
+SRC_URI[md5sum] = "6b65a02622765522176d00f553086fa3"
+SRC_URI[sha256sum] = "01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d"
+
+inherit autotools pkgconfig features_check
+# depends on virtual/egl, virtual/libgl ...
+REQUIRED_DISTRO_FEATURES = "opengl x11"
+
+PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
+ x11 glew glu glx"
+
+# The Wayland code doesn't work with Wayland 1.0, so disable it for now
+#${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}"
+
+EXTRA_OECONF = "--with-system-data-files"
+
+PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm"
+PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
+PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype"
+PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
+PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
+PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
+PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,freeglut"
+PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
+PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
+PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
+PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
+PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
+
+do_install_append() {
+ # it can be completely empty when all PACKAGECONFIG options are disabled
+ rmdir --ignore-fail-on-non-empty ${D}${bindir}
+
+ if [ -f ${D}${bindir}/clear ]; then
+ mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos
+ fi
+}
diff --git a/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb b/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb
deleted file mode 100644
index f06a3e9b58..0000000000
--- a/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require mesa_${PV}.bb
-
-SUMMARY += " (OpenGL only, no EGL/GLES)"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/mesa:"
-
-PROVIDES = "virtual/libgl virtual/mesa"
-
-S = "${WORKDIR}/mesa-${PV}"
-
-PACKAGECONFIG ??= "dri ${MESA_CRYPTO} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb b/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb
new file mode 100644
index 0000000000..d4b1c1c454
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb
@@ -0,0 +1,10 @@
+require mesa_${PV}.bb
+
+SUMMARY += " (OpenGL only, no EGL/GLES)"
+
+PROVIDES = "virtual/libgl virtual/mesa"
+
+S = "${WORKDIR}/mesa-${PV}"
+
+PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index e4880ffedd..9ad9f2e370 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -10,75 +10,163 @@ HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://docs/license.html;md5=899fbe7e42d494c7c8c159c7001693d5"
+LIC_FILES_CHKSUM = "file://docs/license.html;md5=3a4999caf82cc503ac8b9e37c235782e"
PE = "2"
-DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native udev"
+DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native"
+EXTRANATIVEPATH += "chrpath-native"
+PROVIDES = " \
+ ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
+ virtual/mesa \
+ "
-PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa"
+inherit meson pkgconfig python3native gettext features_check
-inherit autotools pkgconfig pythonnative gettext distro_features_check
+# Unset these to stop python trying to report the target Python setup
+_PYTHON_SYSCONFIGDATA_NAME[unexport] = "1"
+STAGING_INCDIR[unexport] = "1"
+STAGING_LIBDIR[unexport] = "1"
-REQUIRED_DISTRO_FEATURES = "opengl"
+BBCLASSEXTEND = "native nativesdk"
-EXTRA_OECONF = "--enable-shared-glapi"
+ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"
-PACKAGECONFIG ??= "gbm egl gles dri ${MESA_CRYPTO} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\
- "
+PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
+ surfaceless"
-PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
+export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
+export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}"
+export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
+export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
+
+MESA_LLVM_RELEASE ?= "${LLVMVERSION}"
+
+# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
+# by default the upstream mesa sources build a debug release
+# here we assume the user will want a release build by default
+MESA_BUILD_TYPE ?= "release"
+def check_buildtype(d):
+ _buildtype = d.getVar('MESA_BUILD_TYPE')
+ if _buildtype not in ['release', 'debug']:
+ bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
+ if _buildtype == 'debug':
+ return 'debugoptimized'
+ return 'plain'
+MESON_BUILDTYPE = "${@check_buildtype(d)}"
+
+EXTRA_OEMESON = " \
+ -Dshared-glapi=true \
+ -Dgallium-opencl=disabled \
+ -Dglx-read-only-text=true \
+ -Dplatforms='${@",".join("${PLATFORMS}".split())}' \
+"
+
+PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
+ elf-tls \
+ "
+PACKAGECONFIG_class-native ?= "gbm dri egl opengl elf-tls"
+PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl elf-tls"
+
+PACKAGECONFIG_remove_libc-musl = "elf-tls"
+
+# "gbm" requires "dri", "opengl"
+PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false"
-X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes"
-PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
-PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
-PACKAGECONFIG[wayland] = ",,wayland-native wayland"
+X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
+# "x11" requires "opengl"
+PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
+PACKAGECONFIG[elf-tls] = "-Delf-tls=true, -Delf-tls=false"
+PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc"
+PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
-DRIDRIVERS = "swrast"
-DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
-DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915"
-PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, dri2proto libdrm"
-PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, dri3proto presentproto libxshmfence"
+DRIDRIVERS_class-native = "swrast"
+DRIDRIVERS_class-nativesdk = "swrast"
+DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915"
+DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
+# "dri" requires "opengl"
+PACKAGECONFIG[dri] = "-Ddri=true -Ddri-drivers=${DRIDRIVERS}, -Ddri=false -Ddri-drivers='', xorgproto libdrm"
+PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
-PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
+# Vulkan drivers need dri3 enabled
+# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9
+VULKAN_DRIVERS = ""
+VULKAN_DRIVERS_append_x86_class-target = ",intel"
+VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
+PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers='',"
-EGL_PLATFORMS = "drm"
-EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'x11', ',x11', '', d)}"
-EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'wayland', ',wayland', '', d)}"
-PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl"
+PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
+
+# "gles" requires "opengl"
+PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false"
+
+# "egl" requires "dri", "opengl"
+PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
+
+PACKAGECONFIG[etnaviv] = ""
+PACKAGECONFIG[freedreno] = ""
+PACKAGECONFIG[kmsro] = ""
+PACKAGECONFIG[vc4] = ""
+PACKAGECONFIG[v3d] = ""
GALLIUMDRIVERS = "swrast"
-GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
-PACKAGECONFIG[r600] = ""
-GALLIUMDRIVERS_LLVM33_ENABLED = "${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
+# gallium swrast was found to crash Xorg on startup in x32 qemu
+GALLIUMDRIVERS_x86-x32 = ""
+
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
+
+# radeonsi requires LLVM
+GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
+GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
-GALLIUMDRIVERS_append_x86 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
-GALLIUMDRIVERS_append_x86-64 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
-# keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
-PACKAGECONFIG[gallium] = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
-MESA_LLVM_RELEASE ?= "3.3"
-PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm --enable-llvm-shared-libs, --disable-gallium-llvm, llvm${MESA_LLVM_RELEASE} \
+
+PACKAGECONFIG[r600] = ""
+
+GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
+GALLIUMDRIVERS_append = ",virgl"
+
+PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
+PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
-export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
-PACKAGECONFIG[xa] = "--enable-xa, --disable-xa"
+PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false"
+
+PACKAGECONFIG[lima] = ""
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
+
+PACKAGECONFIG[panfrost] = ""
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
-# Mesa requires one of the following crypto implementation, pick one of them
-MESA_CRYPTO ??= "openssl"
-PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
-PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
-PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
+OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}"
+PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none"
+
+PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind"
+
+# mesa tries to run cross-built gen_matypes on build machine to get struct size information
+EXTRA_OEMESON_append = " -Dasm=false"
# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
-# Multiple virtual/gl providers being built breaks staging
-EXCLUDE_FROM_WORLD = "1"
+CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
# Remove the mesa dependency on mesa-dev, as mesa is empty
RDEPENDS_${PN}-dev = ""
+# Add dependency so that GLES3 header don't need to be added manually
+RDEPENDS_libgles2-mesa-dev += "libgles3-mesa-dev"
+
PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libosmesa libosmesa-dev \
libgl-mesa libgl-mesa-dev \
@@ -87,10 +175,8 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libgles1-mesa libgles1-mesa-dev \
libgles2-mesa libgles2-mesa-dev \
libgles3-mesa libgles3-mesa-dev \
- libwayland-egl libwayland-egl-dev \
- libxvmcsoftpipe libxvmcsoftpipe-dev \
libxatracker libxatracker-dev \
- mesa-megadriver \
+ mesa-megadriver mesa-vulkan-drivers \
"
do_install_append () {
@@ -99,16 +185,20 @@ do_install_append () {
rm -f ${D}${libdir}/egl/*.la
rm -f ${D}${libdir}/gallium-pipe/*.la
rm -f ${D}${libdir}/gbm/*.la
-
+
# it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used
- rm -f ${D}${sysconfdir}/drirc
+ chrpath --delete ${D}${libdir}/dri/*_dri.so || true
+
+ # libwayland-egl has been moved to wayland 1.15+
+ rm -f ${D}${libdir}/libwayland-egl*
+ rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
}
# For the packages that make up the OpenGL interfaces, inject variables so that
# they don't get Debian-renamed (which would remove the -mesa suffix), and
# RPROVIDEs/RCONFLICTs on the generic libgl name.
python __anonymous() {
- pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
+ pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
for p in (("egl", "libegl", "libegl1"),
("dri", "libgl", "libgl1"),
("gles", "libgles1", "libglesv1-cm1"),
@@ -142,28 +232,28 @@ python mesa_populate_packages() {
d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
import re
- dri_drivers_root = oe.path.join(d.getVar('PKGD', True), d.getVar('libdir', True), "dri")
+ dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri")
if os.path.isdir(dri_drivers_root):
dri_pkgs = os.listdir(dri_drivers_root)
lib_name = d.expand("${MLPREFIX}mesa-megadriver")
for p in dri_pkgs:
- m = re.match('^(.*)_dri\.so$', p)
+ m = re.match(r'^(.*)_dri\.so$', p)
if m:
pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
- pipe_drivers_root = os.path.join(d.getVar('libdir', True), "gallium-pipe")
- do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
+ pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
+ do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
}
PACKAGESPLITFUNCS_prepend = "mesa_populate_packages "
PACKAGES_DYNAMIC += "^mesa-driver-.*"
-FILES_${PN} += "${sysconfdir}/drirc"
-FILES_mesa-megadriver = "${libdir}/dri/*"
+FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf"
+FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
FILES_libegl-mesa = "${libdir}/libEGL.so.*"
FILES_libgbm = "${libdir}/libgbm.so.*"
FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*"
@@ -171,11 +261,9 @@ FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*"
FILES_libgl-mesa = "${libdir}/libGL.so.*"
FILES_libglapi = "${libdir}/libglapi.so.*"
FILES_libosmesa = "${libdir}/libOSMesa.so.*"
-FILES_libwayland-egl = "${libdir}/libwayland-egl.so.*"
-FILES_libxvmcsoftpipe = "${libdir}/libXvMCsoftpipe.so.*"
FILES_libxatracker = "${libdir}/libxatracker.so.*"
-FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc"
+FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan"
FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
@@ -183,9 +271,12 @@ FILES_libglapi-dev = "${libdir}/libglapi.*"
FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
FILES_libgles3-mesa-dev = "${includedir}/GLES3"
-FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
-FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayland-egl.*"
-FILES_libxvmcsoftpipe-dev = "${libdir}/libXvMCsoftpipe.so ${libdir}/libXvMCsoftpipe.la"
+FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
${libdir}/pkgconfig/xatracker.pc"
+
+# Fix upgrade path from mesa to mesa-megadriver
+RREPLACES_mesa-megadriver = "mesa"
+RCONFLICTS_mesa-megadriver = "mesa"
+RPROVIDES_mesa-megadriver = "mesa"
diff --git a/meta/recipes-graphics/mesa/mesa_12.0.1.bb b/meta/recipes-graphics/mesa/mesa_12.0.1.bb
deleted file mode 100644
index 80189e3ff1..0000000000
--- a/meta/recipes-graphics/mesa/mesa_12.0.1.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \
- file://replace_glibc_check_with_linux.patch \
- file://clang-compile-PR89599.patch \
- file://disable-asm-on-non-gcc.patch \
-"
-
-SRC_URI[md5sum] = "972fd5ad5a63aeabf173fb9adefc6522"
-SRC_URI[sha256sum] = "bab24fb79f78c876073527f515ed871fc9c81d816f66c8a0b051d8d653896389"
-
-#because we cannot rely on the fact that all apps will use pkgconfig,
-#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-do_install_append() {
- if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
- sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
- fi
-}
diff --git a/meta/recipes-graphics/mesa/mesa_19.2.4.bb b/meta/recipes-graphics/mesa/mesa_19.2.4.bb
new file mode 100644
index 0000000000..f4b33df227
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa_19.2.4.bb
@@ -0,0 +1,21 @@
+require ${BPN}.inc
+
+SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
+ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
+ file://0002-meson.build-make-TLS-ELF-optional.patch \
+ file://0003-Allow-enable-DRI-without-DRI-drivers.patch \
+ file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \
+ "
+
+SRC_URI[md5sum] = "5c047732b81651ddb341597528b4b096"
+SRC_URI[sha256sum] = "09000a0f7dbbd82e193b81a8f1bf0c118eab7ca975c0329181968596e548e30f"
+
+UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
+
+#because we cannot rely on the fact that all apps will use pkgconfig,
+#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
+do_install_append() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
+ sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+ fi
+}
diff --git a/meta/recipes-graphics/mesa/mesa_git.bb b/meta/recipes-graphics/mesa/mesa_git.bb
deleted file mode 100644
index c0345178c4..0000000000
--- a/meta/recipes-graphics/mesa/mesa_git.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require ${BPN}.inc
-
-DEFAULT_PREFERENCE = "-1"
-
-SRCREV = "ea0d1f575c214c09ba3df12644a960e86e031766"
-PV = "10.5.4+git${SRCPV}"
-
-SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;branch=10.5"
-
-S = "${WORKDIR}/git"
-
-DEPENDS += "python-mako-native"
-
-inherit pythonnative
-
-#because we cannot rely on the fact that all apps will use pkgconfig,
-#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-do_install_append() {
- if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
- sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
- fi
-}
diff --git a/meta/recipes-graphics/mx/mx.inc b/meta/recipes-graphics/mx/mx.inc
index d304837484..714a06f0af 100644
--- a/meta/recipes-graphics/mx/mx.inc
+++ b/meta/recipes-graphics/mx/mx.inc
@@ -1,7 +1,7 @@
SUMMARY = "Clutter based UI widget library"
LICENSE = "LGPLv2.1"
-inherit clutter autotools distro_features_check gobject-introspection gtk-doc
+inherit clutter autotools features_check gobject-introspection gtk-doc
# depends on clutter-1.0 which depends on cogl-1.0
REQUIRED_DISTRO_FEATURES = "opengl"
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
index 87c700e023..2e7b47dd40 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
@@ -6,7 +6,7 @@ SUMMARY = "Clutter package groups"
PR = "r6"
-inherit packagegroup distro_features_check
+inherit packagegroup features_check
# rdepends on clutter-*
REQUIRED_DISTRO_FEATURES = "opengl"
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
index 7ea72d55a7..9ca2705a5f 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
@@ -2,7 +2,7 @@ SUMMARY = "Basic X11 session"
DESCRIPTION = "Packages required to set up a basic working X11 session"
PR = "r1"
-inherit packagegroup distro_features_check
+inherit packagegroup features_check
# rdepends on matchbox-wm
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
index 6b50028562..a0b944a678 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
@@ -7,11 +7,11 @@ PR = "r40"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-inherit packagegroup distro_features_check
+inherit packagegroup features_check
# rdepends on XSERVER
REQUIRED_DISTRO_FEATURES = "x11"
-XSERVER ?= "xserver-xorg xf86-video-fbdev xf86-input-evdev"
+XSERVER ?= "xserver-xorg xf86-video-fbdev"
XSERVERCODECS ?= ""
RDEPENDS_${PN} = "\
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
index 42914246dc..cddf1932f3 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
@@ -4,14 +4,13 @@
PR = "r40"
-inherit packagegroup distro_features_check
-# rdepends on x11-common
+inherit packagegroup features_check
REQUIRED_DISTRO_FEATURES = "x11"
PACKAGES = "${PN} ${PN}-utils"
-# xserver-common, x11-common
-VIRTUAL-RUNTIME_xserver_common ?= "x11-common"
+# backwards compatibility for xserver-common
+VIRTUAL-RUNTIME_xserver_common ?= ""
# elsa, xserver-nodm-init
VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init"
@@ -30,4 +29,8 @@ RDEPENDS_${PN}-utils = "\
xhost \
xset \
xrandr \
+ xmodmap \
+ xdpyinfo \
+ xinput-calibrator \
+ dbus-x11 \
"
diff --git a/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch b/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
deleted file mode 100644
index 812da21c56..0000000000
--- a/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 867a512eddbeb1899d3e7096df3da1dd0ce3e7b7 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 23 Oct 2015 14:06:17 +0300
-Subject: [PATCH] Drop introspection macros from acinclude.m4
-
-They take precendence over our customized macros, and so
-introspection doesn't work correctly.
-
-Upstream-Status: Pending [review on oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- acinclude.m4 | 96 ------------------------------------------------------------
- 1 file changed, 96 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 8899c7c..48fd5d8 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -55,99 +55,3 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
- ])
-
-
--dnl REMOVE THIS WHEN introspection.m4 is widely available
--dnl
--dnl -*- mode: autoconf -*-
--dnl Copyright 2009 Johan Dahlin
--dnl
--dnl This file is free software; the author(s) gives unlimited
--dnl permission to copy and/or distribute it, with or without
--dnl modifications, as long as this notice is preserved.
--dnl
--
--# serial 1
--
--m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
--[
-- AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-- AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-- AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
--
-- dnl enable/disable introspection
-- m4_if([$2], [require],
-- [dnl
-- enable_introspection=yes
-- ],[dnl
-- AC_ARG_ENABLE(introspection,
-- AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
-- [Enable introspection for this build]),,
-- [enable_introspection=auto])
-- ])dnl
--
-- AC_MSG_CHECKING([for gobject-introspection])
--
-- dnl presence/version checking
-- AS_CASE([$enable_introspection],
-- [no], [dnl
-- found_introspection="no (disabled, use --enable-introspection to enable)"
-- ],dnl
-- [yes],[dnl
-- PKG_CHECK_EXISTS([gobject-introspection-1.0],,
-- AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
-- PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
-- found_introspection=yes,
-- AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
-- ],dnl
-- [auto],[dnl
-- PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
-- ],dnl
-- [dnl
-- AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
-- ])dnl
--
-- AC_MSG_RESULT([$found_introspection])
--
-- INTROSPECTION_SCANNER=
-- INTROSPECTION_COMPILER=
-- INTROSPECTION_GENERATE=
-- INTROSPECTION_GIRDIR=
-- INTROSPECTION_TYPELIBDIR=
-- if test "x$found_introspection" = "xyes"; then
-- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
-- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
-- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
-- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
-- INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
-- INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
-- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
-- fi
-- AC_SUBST(INTROSPECTION_SCANNER)
-- AC_SUBST(INTROSPECTION_COMPILER)
-- AC_SUBST(INTROSPECTION_GENERATE)
-- AC_SUBST(INTROSPECTION_GIRDIR)
-- AC_SUBST(INTROSPECTION_TYPELIBDIR)
-- AC_SUBST(INTROSPECTION_CFLAGS)
-- AC_SUBST(INTROSPECTION_LIBS)
-- AC_SUBST(INTROSPECTION_MAKEFILE)
--
-- AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
--])
--
--
--dnl Usage:
--dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
--
--AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
--[
-- _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
--])
--
--dnl Usage:
--dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
--
--
--AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
--[
-- _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
--])
---
-2.1.4
-
diff --git a/meta/recipes-graphics/pango/pango/0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch b/meta/recipes-graphics/pango/pango/0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch
deleted file mode 100644
index 6784a105a5..0000000000
--- a/meta/recipes-graphics/pango/pango/0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From 526a6a9fc9a1cfe75c521c8bb39b61754fe42fe8 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 2 Sep 2016 14:00:24 +0300
-Subject: [PATCH] Enforce recreation of docs/pango.types; it is build
- configuration-specific.
-
-In particular, it needs to exclude references to PangoXft if Xft is not available.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- docs/Makefile.am | 17 ++++--------
- docs/pango.types | 80 --------------------------------------------------------
- 2 files changed, 5 insertions(+), 92 deletions(-)
- delete mode 100644 docs/pango.types
-
-diff --git a/docs/Makefile.am b/docs/Makefile.am
-index f5f1317..8947a99 100644
---- a/docs/Makefile.am
-+++ b/docs/Makefile.am
-@@ -49,6 +49,10 @@ IGNORE_HFILES= \
- pangocoretext-private.h \
- pangoatsui-private.h
-
-+if !HAVE_XFT
-+IGNORE_HFILES += pangoxft pangoxft-render.h
-+endif
-+
- # CFLAGS and LDFLAGS for compiling scan program. Only needed
- # if $(DOC_MODULE).types is non-empty.
- INCLUDES = \
-@@ -103,16 +107,6 @@ include $(top_srcdir)/gtk-doc.make
- # This line really belongs in gtk-doc.mk
- $(REPORT_FILES): sgml-build.stamp
-
--pango.types:
-- @echo "Rebuilding $@"
-- @LANG=C; LIST=$$(grep 'pango_[_a-zA-Z0-9]*_get_type' $(HFILE_GLOB) | grep -v '\(private\|atsui\|core_text\|win32\)' | sed 's/\([^:]*:\).*\(pango[_a-zA-Z0-9]*_get_type\).*/\1\2/') && \
-- echo "$$LIST" | sed 's/.*\/\(pango\/.*\):.*/#include <\1>/' | sort -u > $@.tmp && \
-- echo >> $@.tmp && \
-- echo "$$LIST" | cut -d : -f 2 | sort -u >> $@.tmp && \
-- mv $@.tmp $@
--
--BUILT_SOURCES = pango.types
--
- ########################################################################
-
- MAINTAINERCLEANFILES = $(BUILT_SOURCES)
-@@ -120,8 +114,7 @@ EXTRA_DIST += \
- layout.fig \
- layout.eps \
- version.xml.in \
-- check.docs \
-- pango.types
-+ check.docs
-
- # force doc rebulid after configure
- dist-hook-local: dist-local-check-no-cross-references all-local
-diff --git a/docs/pango.types b/docs/pango.types
-deleted file mode 100644
-index 7d93cda..0000000
---- a/docs/pango.types
-+++ /dev/null
-@@ -1,80 +0,0 @@
--#include <pango/pango-attributes.h>
--#include <pango/pango-context.h>
--#include <pango/pango-engine.h>
--#include <pango/pango-enum-types.h>
--#include <pango/pango-font.h>
--#include <pango/pango-fontmap.h>
--#include <pango/pango-fontset.h>
--#include <pango/pango-glyph-item.h>
--#include <pango/pango-glyph.h>
--#include <pango/pango-item.h>
--#include <pango/pango-language.h>
--#include <pango/pango-layout.h>
--#include <pango/pango-matrix.h>
--#include <pango/pango-ot.h>
--#include <pango/pango-renderer.h>
--#include <pango/pango-tabs.h>
--#include <pango/pangocairo-fc.h>
--#include <pango/pangocairo.h>
--#include <pango/pangofc-decoder.h>
--#include <pango/pangofc-font.h>
--#include <pango/pangofc-fontmap.h>
--#include <pango/pangoft2.h>
--#include <pango/pangoxft-render.h>
--#include <pango/pangoxft.h>
--
--pango_alignment_get_type
--pango_attr_list_get_type
--pango_attr_type_get_type
--pango_bidi_type_get_type
--pango_cairo_fc_font_map_get_type
--pango_cairo_font_get_type
--pango_cairo_font_map_get_type
--pango_color_get_type
--pango_context_get_type
--pango_coverage_level_get_type
--pango_direction_get_type
--pango_ellipsize_mode_get_type
--pango_engine_get_type
--pango_engine_lang_get_type
--pango_engine_shape_get_type
--pango_fc_decoder_get_type
--pango_fc_font_get_type
--pango_fc_font_map_get_type
--pango_font_description_get_type
--pango_font_face_get_type
--pango_font_family_get_type
--pango_font_get_type
--pango_font_map_get_type
--pango_font_mask_get_type
--pango_font_metrics_get_type
--pango_fontset_get_type
--pango_fontset_simple_get_type
--pango_ft2_font_map_get_type
--pango_glyph_item_get_type
--pango_glyph_item_iter_get_type
--pango_glyph_string_get_type
--pango_gravity_get_type
--pango_gravity_hint_get_type
--pango_item_get_type
--pango_language_get_type
--pango_layout_get_type
--pango_layout_iter_get_type
--pango_layout_line_get_type
--pango_matrix_get_type
--pango_ot_info_get_type
--pango_ot_ruleset_get_type
--pango_render_part_get_type
--pango_renderer_get_type
--pango_script_get_type
--pango_stretch_get_type
--pango_style_get_type
--pango_tab_align_get_type
--pango_tab_array_get_type
--pango_underline_get_type
--pango_variant_get_type
--pango_weight_get_type
--pango_wrap_mode_get_type
--pango_xft_font_get_type
--pango_xft_font_map_get_type
--pango_xft_renderer_get_type
---
-2.9.3
-
diff --git a/meta/recipes-graphics/pango/pango/0001-Fix-build-reproducibility.patch b/meta/recipes-graphics/pango/pango/0001-Fix-build-reproducibility.patch
new file mode 100644
index 0000000000..03abf8763c
--- /dev/null
+++ b/meta/recipes-graphics/pango/pango/0001-Fix-build-reproducibility.patch
@@ -0,0 +1,31 @@
+From f8b32901981a06a8db4169b82a704dcf7e8b6560 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Wed, 20 Nov 2019 15:43:57 -0600
+Subject: [PATCH] Fix build reproducibility
+
+Changes the comment in pango-enum-types.c to reference the file basename
+instead of the full path. This ensures that the generated file is
+reproducible when it is included in source packages meant for debugging.
+
+Upstream-Status: Pending [https://gitlab.gnome.org/GNOME/pango/merge_requests/159]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ pango/pango-enum-types.c.template | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pango/pango-enum-types.c.template b/pango/pango-enum-types.c.template
+index d922c691..0d55ef74 100644
+--- a/pango/pango-enum-types.c.template
++++ b/pango/pango-enum-types.c.template
+@@ -6,7 +6,7 @@
+ /*** END file-header ***/
+
+ /*** BEGIN file-production ***/
+-/* enumerations from "@filename@" */
++/* enumerations from "@basename@" */
+ /*** END file-production ***/
+
+ /*** BEGIN value-header ***/
+--
+2.23.0
+
diff --git a/meta/recipes-graphics/pango/pango_1.40.1.bb b/meta/recipes-graphics/pango/pango_1.40.1.bb
deleted file mode 100644
index f9f344a862..0000000000
--- a/meta/recipes-graphics/pango/pango_1.40.1.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Framework for layout and rendering of internationalized text"
-DESCRIPTION = "Pango is a library for laying out and rendering of text, \
-with an emphasis on internationalization. Pango can be used anywhere \
-that text layout is needed, though most of the work on Pango so far has \
-been done in the context of the GTK+ widget toolkit. Pango forms the \
-core of text and font handling for GTK+-2.x."
-HOMEPAGE = "http://www.pango.org/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-SECTION = "libs"
-LICENSE = "LGPLv2.0+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
-
-SRC_URI += "file://run-ptest \
- file://0001-Drop-introspection-macros-from-acinclude.m4.patch \
- file://0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch \
-"
-SRC_URI[archive.md5sum] = "6fc88c6529890d6c8e03074d57a3eceb"
-SRC_URI[archive.sha256sum] = "e27af54172c72b3ac6be53c9a4c67053e16c905e02addcf3a603ceb2005c1a40"
-
-DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
-
-EXTRA_AUTORECONF = ""
-
-EXTRA_OECONF = " \
- --disable-debug \
- "
-
-LEAD_SONAME = "libpango-1.0*"
-LIBV = "1.8.0"
-
-# This binary needs to be compiled for the host architecture. This isn't pretty!
-do_compile_prepend_class-target () {
- if ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
- make CC="${BUILD_CC}" CFLAGS="" LDFLAGS="${BUILD_LDFLAGS}" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
- fi
-}
-
-FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
-FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
-
-RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
-
-RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
- pango-module-basic-fc pango-module-arabic-lang"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/pango/pango_1.44.7.bb b/meta/recipes-graphics/pango/pango_1.44.7.bb
new file mode 100644
index 0000000000..afb56a6cde
--- /dev/null
+++ b/meta/recipes-graphics/pango/pango_1.44.7.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Framework for layout and rendering of internationalized text"
+DESCRIPTION = "Pango is a library for laying out and rendering of text, \
+with an emphasis on internationalization. Pango can be used anywhere \
+that text layout is needed, though most of the work on Pango so far has \
+been done in the context of the GTK+ widget toolkit. Pango forms the \
+core of text and font handling for GTK+-2.x."
+HOMEPAGE = "http://www.pango.org/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+SECTION = "libs"
+LICENSE = "LGPLv2.0+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
+
+GNOMEBASEBUILDCLASS = "meson"
+
+inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://run-ptest \
+ file://0001-Fix-build-reproducibility.patch"
+SRC_URI[archive.md5sum] = "c75cc5b833d934d98e83343832e20e5d"
+SRC_URI[archive.sha256sum] = "66a5b6cc13db73efed67b8e933584509f8ddb7b10a8a40c3850ca4a985ea1b1f"
+
+DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz fribidi"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
+
+PACKAGECONFIG[x11] = ",,virtual/libx11 libxft"
+PACKAGECONFIG[tests] = "-Dinstall-tests=true, -Dinstall-tests=false"
+PACKAGECONFIG[thai] = ",,libthai"
+
+GTKDOC_MESON_OPTION = "gtk_doc"
+GIR_MESON_OPTION = 'introspection'
+
+LEAD_SONAME = "libpango-1.0*"
+
+FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
+
+RDEPENDS_${PN}-ptest += "cantarell-fonts"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-en-us"
+
+RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
+ pango-module-basic-fc pango-module-arabic-lang"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch b/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
deleted file mode 100644
index 2e1c9476f2..0000000000
--- a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Backport patch to fix build with gold linker.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Backport
-
-
-
-From 93a7113485cf1c55fd7076116faf5b3a690706b2 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 30 Aug 2016 17:17:28 +0300
-Subject: [PATCH] cmake: Link test utils with "-ldl"
-
-Without this linking CXX executables (e.g. fbo-blit-stretch) fails
-with gold linker:
-
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlsym'
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlerror'
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlopen'
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
----
- tests/util/CMakeLists.txt | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
-index e1f8073..3d5bef5 100644
---- a/tests/util/CMakeLists.txt
-+++ b/tests/util/CMakeLists.txt
-@@ -11,6 +11,8 @@ set_source_files_properties(
- PROPERTIES GENERATED 1
- )
-
-+link_libraries(${CMAKE_DL_LIBS})
-+
- if(HAVE_LIBCACA)
- link_libraries(caca)
- endif()
---
-2.9.3
-
diff --git a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch b/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
deleted file mode 100644
index 845804dd66..0000000000
--- a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 73e4fbc5777eddd89bb0fb16e90343551fe3e0ef Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 5 Jul 2016 10:56:23 +0300
-Subject: [PATCH] cmake: Link utils with xcb explicitly
-
-Linking with g++ can reportedly lead to:
-
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_connect'
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_get_setup'
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_setup_roots_iterator'
-
-This may have appeared now because xcb-dri2 used to overlink publicly
-but now does not.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Accepted
----
- CMakeLists.txt | 1 +
- tests/util/CMakeLists.txt | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8e2abba..2e1a473 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -151,6 +151,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-
- pkg_check_modules(LIBDRM QUIET libdrm)
- pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel)
-+ pkg_check_modules(XCB QUIET xcb)
- pkg_check_modules(XCB_DRI2 QUIET xcb-dri2)
- pkg_check_modules(GLPROTO QUIET glproto)
- ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
-index fb22ffa..e1f8073 100644
---- a/tests/util/CMakeLists.txt
-+++ b/tests/util/CMakeLists.txt
-@@ -121,11 +121,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-
- list(APPEND UTIL_GL_LIBS
- ${LIBDRM_LDFLAGS}
-+ ${XCB_LDFLAGS}
- ${XCB_DRI2_LDFLAGS}
- )
-
- list(APPEND UTIL_GL_INCLUDES
- ${LIBDRM_INCLUDE_DIRS}
-+ ${XCB_INCLUDE_DIRS}
- ${XCB_DRI2_INCLUDE_DIRS}
- )
-
---
-2.1.4
-
diff --git a/meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch b/meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch
new file mode 100644
index 0000000000..5d6ec368ba
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch
@@ -0,0 +1,32 @@
+From 3bf1beee1ddd19bc536ff2856e04ac269d43daa2 Mon Sep 17 00:00:00 2001
+From: Pascal Bach <pascal.bach@siemens.com>
+Date: Thu, 4 Oct 2018 14:43:17 +0200
+Subject: [PATCH] cmake: use proper WAYLAND_INCLUDE_DIRS variable
+
+WAYLAND_wayland-client_INCLUDEDIR is an internal variable and is not correctly
+set when cross compiling. WAYLAND_INCLUDE_DIRS includes the correct path even
+when cross compiling.
+
+Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
+
+Upstream-Status: Submitted [piglit@lists.freedesktop.org]
+---
+ tests/util/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
+index a5f080156..a303a9f58 100644
+--- a/tests/util/CMakeLists.txt
++++ b/tests/util/CMakeLists.txt
+@@ -97,7 +97,7 @@ if(PIGLIT_USE_WAFFLE)
+ piglit-framework-gl/piglit_wl_framework.c
+ )
+ list(APPEND UTIL_GL_INCLUDES
+- ${WAYLAND_wayland-client_INCLUDEDIR}
++ ${WAYLAND_INCLUDE_DIRS}
+ )
+ endif()
+ if(PIGLIT_HAS_X11)
+--
+2.11.0
+
diff --git a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
deleted file mode 100644
index f851a92ceb..0000000000
--- a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 0fc2c2932699cfd68be96c820fddfdd79b48b788 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 9 Jul 2016 07:52:19 +0000
-Subject: [PATCH] tests: Use FE_UPWARD only if its defined in fenv.h
-
-On ARM, musl does not define FE_* when arch does not have
-VFP, (which is right interpretation), therefore check if
-its defined before using it
-
-Fixes errors like
-
-tests/general/roundmode-pixelstore.c:82:19: error: 'FE_UPWARD' undeclared (first use in this function)
- ret = fesetround(FE_UPWARD);
- ^~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- tests/general/roundmode-getintegerv.c | 2 ++
- tests/general/roundmode-pixelstore.c | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c
-index 28ecfaf..5c27579 100644
---- a/tests/general/roundmode-getintegerv.c
-+++ b/tests/general/roundmode-getintegerv.c
-@@ -81,7 +81,9 @@ piglit_init(int argc, char **argv)
- {
- int ret;
- bool pass = true;
-+#ifdef FE_UPWARD
- ret = fesetround(FE_UPWARD);
-+#endif
- if (ret != 0) {
- printf("Couldn't set rounding mode\n");
- piglit_report_result(PIGLIT_SKIP);
-diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c
-index 9284f43..3fcb396 100644
---- a/tests/general/roundmode-pixelstore.c
-+++ b/tests/general/roundmode-pixelstore.c
-@@ -79,7 +79,9 @@ piglit_init(int argc, char **argv)
- {
- int ret;
- bool pass = true;
-+#ifdef FE_UPWARD
- ret = fesetround(FE_UPWARD);
-+#endif
- if (ret != 0) {
- printf("Couldn't set rounding mode\n");
- piglit_report_result(PIGLIT_SKIP);
---
-1.8.3.1
-
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 82adcdeca1..a95bb5ab93 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -1,26 +1,30 @@
SUMMARY = "OpenGL driver testing framework"
+DESCRIPTION = "Piglit is an open-source test suite for OpenGL and OpenCL \
+implementations."
LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
-SRC_URI = "git://anongit.freedesktop.org/piglit \
+SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https \
file://0001-cmake-install-bash-completions-in-the-right-place.patch \
- file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
- file://0001-cmake-Link-utils-with-xcb-explicitly.patch \
- file://0001-cmake-Link-test-utils-with-ldl.patch \
+ file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
"
+UPSTREAM_CHECK_COMMITS = "1"
-# From 2016-07-07
-SRCREV = "c39e41a86551eb390b8da23232dc8577639403d0"
+SRCREV = "068581c29c95fe2681023e12745007dd17b38ce5"
# (when PV goes above 1.0 remove the trailing r)
PV = "1.0+gitr${SRCPV}"
S = "${WORKDIR}/git"
-DEPENDS = "libpng virtual/libx11 libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native"
+X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}"
+X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}"
-inherit cmake python3native distro_features_check bash-completion
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
+DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl"
+
+inherit cmake pkgconfig python3native features_check bash-completion
+
+# depends on virtual/libgl
+REQUIRED_DISTRO_FEATURES += "opengl"
# The built scripts go into the temporary directory according to tempfile
# (typically /tmp) which can race if multiple builds happen on the same machine,
@@ -28,8 +32,10 @@ REQUIRED_DISTRO_FEATURES = "x11"
export TEMP = "${B}/temp/"
do_compile[dirs] =+ "${B}/temp/"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
+PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
+
do_configure_prepend() {
if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
@@ -38,15 +44,16 @@ do_configure_prepend() {
fi
}
-do_install() {
- oe_runmake -C ${B} 'DESTDIR=${D}' install/strip
-}
+OECMAKE_TARGET_INSTALL = "install/strip"
-RDEPENDS_${PN} = "waffle python3 python3-mako python3-json \
- python3-subprocess python3-misc python3-importlib \
+RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako python3-json \
+ python3-misc \
python3-unixadmin python3-xml python3-multiprocessing \
- python3-six python3-shell python3-io python3-argparse \
- mesa-demos bash \
+ python3-six python3-shell python3-io \
+ python3-netserver bash \
"
INSANE_SKIP_${PN} += "dev-so already-stripped"
+
+# Can't be built with ccache
+CCACHE_DISABLE = "1"
diff --git a/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb b/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
index 6c3bcd831c..c3c237eee7 100644
--- a/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
+++ b/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
@@ -2,7 +2,7 @@ SUMMARY = "A clock combined with a game of pong"
LICENSE = "GPLv2+"
DEPENDS = "virtual/libx11 xdmcp xau"
-inherit distro_features_check
+inherit features_check pkgconfig
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb b/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb
index 6c1b93cd0a..a26ab44fa7 100644
--- a/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb
+++ b/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb
@@ -17,7 +17,7 @@ SECTION = "libs"
DEPENDS = "virtual/libx11 libsm xcb-util"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb b/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb
deleted file mode 100644
index bda82e7efc..0000000000
--- a/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Liberation(tm) Fonts"
-DESCRIPTION = "The Liberation(tm) Fonts is a font family originally \
-created by Ascender(c) which aims at metric compatibility with \
-Arial, Times New Roman, Courier New."
-HOMEPAGE = "https://fedorahosted.org/liberation-fonts/"
-BUGTRACKER = "https://bugzilla.redhat.com/"
-
-RECIPE_NO_UPDATE_REASON = "2.x depends on fontforge package, which is not yet provided in oe-core"
-
-SECTION = "x11/fonts"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-PR = "r4"
-PE = "1"
-
-inherit allarch fontcache
-
-FONT_PACKAGES = "${PN}"
-
-SRC_URI = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-${PV}.tar.gz \
- file://30-liberation-aliases.conf"
-
-SRC_URI[md5sum] = "4846797ef0fc70b0cbaede2514677c58"
-SRC_URI[sha256sum] = "0e0d0957c85b758561a3d4aef4ebcd2c39959e5328429d96ae106249d83531a1"
-
-do_install () {
- install -d ${D}${datadir}/fonts/ttf/
- for i in *.ttf; do
- install -m 0644 $i ${D}${prefix}/share/fonts/ttf/${i}
- done
-
- install -d ${D}${sysconfdir}/fonts/conf.d/
- install -m 0644 ${WORKDIR}/30-liberation-aliases.conf ${D}${sysconfdir}/fonts/conf.d/
-
- install -d ${D}${prefix}/share/doc/${BPN}/
- install -m 0644 License.txt ${D}${datadir}/doc/${BPN}/
-}
-
-PACKAGES = "${PN}"
-FILES_${PN} += "${sysconfdir} ${datadir}"
diff --git a/meta/recipes-graphics/ttf-fonts/liberation-fonts_2.00.1.bb b/meta/recipes-graphics/ttf-fonts/liberation-fonts_2.00.1.bb
new file mode 100644
index 0000000000..f5df9efa3b
--- /dev/null
+++ b/meta/recipes-graphics/ttf-fonts/liberation-fonts_2.00.1.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Liberation(tm) Fonts"
+DESCRIPTION = "The Liberation(tm) Fonts is a font family originally \
+created by Ascender(c) which aims at metric compatibility with \
+Arial, Times New Roman, Courier New."
+HOMEPAGE = "https://releases.pagure.org/liberation-fonts/"
+BUGTRACKER = "https://bugzilla.redhat.com/"
+
+SECTION = "x11/fonts"
+LICENSE = "OFL-1.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f96db970a9a46c5369142b99f530366b"
+PE = "1"
+
+inherit allarch fontcache
+
+FONT_PACKAGES = "${PN}"
+
+SRC_URI = "https://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-${PV}.tar.gz \
+ file://30-liberation-aliases.conf"
+
+S = "${WORKDIR}/liberation-fonts-ttf-${PV}"
+
+SRC_URI[md5sum] = "5c781723a0d9ed6188960defba8e91cf"
+SRC_URI[sha256sum] = "7890278a6cd17873c57d9cd785c2d230d9abdea837e96516019c5885dd271504"
+
+do_install () {
+ install -d ${D}${datadir}/fonts/ttf/
+ for i in *.ttf; do
+ install -m 0644 $i ${D}${prefix}/share/fonts/ttf/${i}
+ done
+
+ install -d ${D}${sysconfdir}/fonts/conf.d/
+ install -m 0644 ${WORKDIR}/30-liberation-aliases.conf ${D}${sysconfdir}/fonts/conf.d/
+
+ install -d ${D}${prefix}/share/doc/${BPN}/
+ install -m 0644 LICENSE ${D}${datadir}/doc/${BPN}/
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} += "${sysconfdir} ${datadir}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb b/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
index b2e4cef39d..70b32cf8f1 100644
--- a/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
+++ b/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
@@ -13,26 +13,20 @@ inherit fontcache
FONT_PACKAGES = "${PN}"
-SRC_URI = "${GNOME_MIRROR}/ttf-bitstream-vera/1.10/ttf-bitstream-vera-${PV}.tar.bz2"
-
-do_install () {
- install -d ${D}${prefix}/share/fonts/ttf/
- for i in *.ttf; do
- install -m 644 $i ${D}${prefix}/share/fonts/ttf/${i}
- done
-
- # fontconfig ships this too. not sure what to do about it.
- #install -d ${D}${sysconfdir}/fonts
- #install -m 644 local.conf ${D}${sysconfdir}/fonts/local.conf
-
+SRC_URI = "${GNOME_MIRROR}/ttf-bitstream-vera/1.10/ttf-bitstream-vera-${PV}.tar.bz2"
+SRC_URI[md5sum] = "bb22bd5b4675f5dbe17c6963d8c00ed6"
+SRC_URI[sha256sum] = "db5b27df7bbb318036ebdb75acd3e98f1bd6eb6608fb70a67d478cd243d178dc"
- install -d ${D}${prefix}/share/doc/${BPN}/
- for i in *.TXT; do
- install -m 644 $i ${D}${prefix}/share/doc/${BPN}/$i
- done
-}
+do_install () {
+ install -d ${D}${datadir}/fonts/ttf
+ for i in *.ttf; do
+ install -m 644 $i ${D}${datadir}/fonts/ttf
+ done
-FILES_${PN} = "/etc ${datadir}/fonts"
+ install -d ${D}${docdir}/${BPN}
+ for i in *.TXT; do
+ install -m 644 $i ${D}${docdir}/${BPN}
+ done
+}
-SRC_URI[md5sum] = "bb22bd5b4675f5dbe17c6963d8c00ed6"
-SRC_URI[sha256sum] = "db5b27df7bbb318036ebdb75acd3e98f1bd6eb6608fb70a67d478cd243d178dc"
+FILES_${PN} = "${datadir}/fonts"
diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer/0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch
new file mode 100644
index 0000000000..a0ac3aefdd
--- /dev/null
+++ b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch
@@ -0,0 +1,36 @@
+From 3d30df8d8ccb919733b5339b2a82474305b83998 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 6 Aug 2019 01:19:48 +0000
+Subject: [PATCH] gallium: Expand libc check to be platform OS check
+
+endianness on musl based systems can also be detected in same way as
+glibc, therefore check for __linux__ define instead of __GLIBC__
+
+Fixes build on musl/mips
+
+| ../../../../git/src/gallium/include/pipe/p_config.h:171:2: error: #error Unknown Endianness
+| #error Unknown Endianness
+| ^~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/gallium/include/pipe/p_config.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h
+index d603681..71cdf49 100644
+--- a/src/gallium/include/pipe/p_config.h
++++ b/src/gallium/include/pipe/p_config.h
+@@ -130,7 +130,7 @@
+ * Endian detection.
+ */
+
+-#ifdef __GLIBC__
++#ifdef __linux__
+ #include <endian.h>
+
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+--
+2.17.1
+
diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb
new file mode 100644
index 0000000000..4420d84ae5
--- /dev/null
+++ b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb
@@ -0,0 +1,25 @@
+SUMMARY = "VirGL virtual OpenGL renderer"
+DESCRIPTION = "Virgil is a research project to investigate the possibility of \
+creating a virtual 3D GPU for use inside qemu virtual machines, that allows \
+the guest operating system to use the capabilities of the host GPU to \
+accelerate 3D rendering."
+HOMEPAGE = "https://virgil3d.github.io/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10"
+
+DEPENDS = "libdrm mesa libepoxy"
+SRCREV = "48cc96c9aebb9d0164830a157efc8916f08f00c0"
+SRC_URI = "git://anongit.freedesktop.org/virglrenderer \
+ file://0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig features_check
+
+BBCLASSEXTEND = "native nativesdk"
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
diff --git a/meta/recipes-graphics/vulkan/assimp/0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch b/meta/recipes-graphics/vulkan/assimp/0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch
new file mode 100644
index 0000000000..87a1658710
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/assimp/0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch
@@ -0,0 +1,1664 @@
+From 7fc220b2350d78942fb3935cad0b1564418ebe8f Mon Sep 17 00:00:00 2001
+From: Kim Kulling <kim.kulling@googlemail.com>
+Date: Tue, 19 Nov 2019 20:30:40 +0100
+Subject: [PATCH] closes https://github.com/assimp/assimp/issues/2733: update
+ of zlip to fix gcc build for v9.2.0 32 bit
+
+Upstream-Status: Backport [https://github.com/assimp/assimp/commit/f78446b14aff46db2ef27d062a275b6a01fd68b1]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ contrib/zip/.gitignore | 2 +
+ contrib/zip/CMakeLists.txt | 83 +++++-
+ contrib/zip/README.md | 12 +-
+ contrib/zip/appveyor.yml | 2 +-
+ contrib/zip/src/miniz.h | 457 ++++++++++++++++++++++++++++----
+ contrib/zip/src/zip.c | 62 +++--
+ contrib/zip/src/zip.h | 457 ++++++++++++++++----------------
+ contrib/zip/test/CMakeLists.txt | 27 +-
+ contrib/zip/test/test.c | 38 ++-
+ contrib/zip/test/test_miniz.c | 25 +-
+ 10 files changed, 821 insertions(+), 344 deletions(-)
+
+diff --git a/contrib/zip/.gitignore b/contrib/zip/.gitignore
+index a7904a1e..49b2cb2f 100644
+--- a/contrib/zip/.gitignore
++++ b/contrib/zip/.gitignore
+@@ -1,6 +1,7 @@
+ /build/
+ /test/build/
+ /xcodeproj/
++.vscode/
+
+ # Object files
+ *.o
+@@ -54,3 +55,4 @@ zip.dir/
+ test/test.exe.vcxproj.filters
+ test/test.exe.vcxproj
+ test/test.exe.dir/
++
+diff --git a/contrib/zip/CMakeLists.txt b/contrib/zip/CMakeLists.txt
+index b46dbb1d..77916d2e 100644
+--- a/contrib/zip/CMakeLists.txt
++++ b/contrib/zip/CMakeLists.txt
+@@ -1,10 +1,14 @@
+-cmake_minimum_required(VERSION 2.8)
+-project(zip)
+-enable_language(C)
++cmake_minimum_required(VERSION 3.0)
++
++project(zip
++ LANGUAGES C
++ VERSION "0.1.15")
+ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
+
++option(CMAKE_DISABLE_TESTING "Disable test creation" OFF)
++
+ if (MSVC)
+- # Use secure functions by defaualt and suppress warnings about "deprecated" functions
++ # Use secure functions by default and suppress warnings about "deprecated" functions
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_NONSTDC_NO_WARNINGS=1 /D _CRT_SECURE_NO_WARNINGS=1")
+@@ -12,28 +16,80 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
+ "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
+ "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra -Werror -pedantic")
++ if(ENABLE_COVERAGE)
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
++ endif()
+ endif (MSVC)
+
+ # zip
+ set(SRC src/miniz.h src/zip.h src/zip.c)
+ add_library(${PROJECT_NAME} ${SRC})
+-target_include_directories(${PROJECT_NAME} INTERFACE src)
++target_include_directories(${PROJECT_NAME} PUBLIC
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
++ $<INSTALL_INTERFACE:include>
++)
+
+ # test
+ if (NOT CMAKE_DISABLE_TESTING)
+ enable_testing()
+ add_subdirectory(test)
+ find_package(Sanitizers)
+- add_sanitizers(${PROJECT_NAME} test.exe)
+- add_sanitizers(${PROJECT_NAME} test_miniz.exe)
++ add_sanitizers(${PROJECT_NAME} ${test_out} ${test_miniz_out})
+ endif()
+
++####
++# Installation (https://github.com/forexample/package-example) {
++
++set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
++set(INCLUDE_INSTALL_DIR "include")
++
++set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
++
++# Configuration
++set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake")
++set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake")
++set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
++set(NAMESPACE "${PROJECT_NAME}::")
++
++# Include module with fuction 'write_basic_package_version_file'
++include(CMakePackageConfigHelpers)
++
++# Note: PROJECT_VERSION is used as a VERSION
++write_basic_package_version_file(
++ "${VERSION_CONFIG}" COMPATIBILITY SameMajorVersion
++)
++
++# Use variables:
++# * TARGETS_EXPORT_NAME
++# * PROJECT_NAME
++configure_package_config_file(
++ "cmake/Config.cmake.in"
++ "${PROJECT_CONFIG}"
++ INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
++)
++
++install(
++ FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}"
++ DESTINATION "${CONFIG_INSTALL_DIR}"
++)
++
++install(
++ EXPORT "${TARGETS_EXPORT_NAME}"
++ NAMESPACE "${NAMESPACE}"
++ DESTINATION "${CONFIG_INSTALL_DIR}"
++)
++
++# }
++
+ install(TARGETS ${PROJECT_NAME}
++ EXPORT ${TARGETS_EXPORT_NAME}
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+- COMPONENT library)
+-install(FILES ${PROJECT_SOURCE_DIR}/src/zip.h DESTINATION include)
++ INCLUDES DESTINATION ${INCLUDE_INSTALL_DIR}
++)
++install(FILES ${PROJECT_SOURCE_DIR}/src/zip.h DESTINATION ${INCLUDE_INSTALL_DIR}/zip)
+
+ # uninstall target (https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake)
+ if(NOT TARGET uninstall)
+@@ -45,3 +101,12 @@ if(NOT TARGET uninstall)
+ add_custom_target(uninstall
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
+ endif()
++
++find_package(Doxygen)
++if(DOXYGEN_FOUND)
++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
++ add_custom_target(doc
++ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
++ COMMENT "Generating API documentation with Doxygen" VERBATIM)
++endif()
+diff --git a/contrib/zip/README.md b/contrib/zip/README.md
+index d5fb8cd2..14eb9a34 100644
+--- a/contrib/zip/README.md
++++ b/contrib/zip/README.md
+@@ -71,7 +71,7 @@ int arg = 2;
+ zip_extract("foo.zip", "/tmp", on_extract_entry, &arg);
+ ```
+
+-* Extract a zip entry into memory.
++* Extract a zip entry into memory.
+ ```c
+ void *buf = NULL;
+ size_t bufsize;
+@@ -89,7 +89,7 @@ zip_close(zip);
+ free(buf);
+ ```
+
+-* Extract a zip entry into memory (no internal allocation).
++* Extract a zip entry into memory (no internal allocation).
+ ```c
+ unsigned char *buf;
+ size_t bufsize;
+@@ -110,7 +110,7 @@ zip_close(zip);
+ free(buf);
+ ```
+
+-* Extract a zip entry into memory using callback.
++* Extract a zip entry into memory using callback.
+ ```c
+ struct buffer_t {
+ char *data;
+@@ -144,7 +144,7 @@ free(buf.data);
+ ```
+
+
+-* Extract a zip entry into a file.
++* Extract a zip entry into a file.
+ ```c
+ struct zip_t *zip = zip_open("foo.zip", 0, 'r');
+ {
+@@ -157,7 +157,7 @@ struct zip_t *zip = zip_open("foo.zip", 0, 'r');
+ zip_close(zip);
+ ```
+
+-* List of all zip entries
++* List of all zip entries
+ ```c
+ struct zip_t *zip = zip_open("foo.zip", 0, 'r');
+ int i, n = zip_total_entries(zip);
+@@ -174,7 +174,7 @@ for (i = 0; i < n; ++i) {
+ zip_close(zip);
+ ```
+
+-## Bindings
++# Bindings
+ Compile zip library as a dynamic library.
+ ```shell
+ $ mkdir build
+diff --git a/contrib/zip/appveyor.yml b/contrib/zip/appveyor.yml
+index 0be6373c..ea17f5de 100644
+--- a/contrib/zip/appveyor.yml
++++ b/contrib/zip/appveyor.yml
+@@ -1,4 +1,4 @@
+-version: zip-0.1.9.{build}
++version: zip-0.1.15.{build}
+ build_script:
+ - cmd: >-
+ cd c:\projects\zip
+diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h
+index 2c27a94d..c4fcfb83 100644
+--- a/contrib/zip/src/miniz.h
++++ b/contrib/zip/src/miniz.h
+@@ -221,6 +221,7 @@
+ #ifndef MINIZ_HEADER_INCLUDED
+ #define MINIZ_HEADER_INCLUDED
+
++#include <stdint.h>
+ #include <stdlib.h>
+
+ // Defines to completely disable specific portions of miniz.c:
+@@ -284,7 +285,8 @@
+ /* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES only if not set */
+ #if !defined(MINIZ_USE_UNALIGNED_LOADS_AND_STORES)
+ #if MINIZ_X86_OR_X64_CPU
+-/* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses. */
++/* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient
++ * integer loads and stores from unaligned addresses. */
+ #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
+ #define MINIZ_UNALIGNED_USE_MEMCPY
+ #else
+@@ -354,6 +356,44 @@ enum {
+ MZ_FIXED = 4
+ };
+
++/* miniz error codes. Be sure to update mz_zip_get_error_string() if you add or
++ * modify this enum. */
++typedef enum {
++ MZ_ZIP_NO_ERROR = 0,
++ MZ_ZIP_UNDEFINED_ERROR,
++ MZ_ZIP_TOO_MANY_FILES,
++ MZ_ZIP_FILE_TOO_LARGE,
++ MZ_ZIP_UNSUPPORTED_METHOD,
++ MZ_ZIP_UNSUPPORTED_ENCRYPTION,
++ MZ_ZIP_UNSUPPORTED_FEATURE,
++ MZ_ZIP_FAILED_FINDING_CENTRAL_DIR,
++ MZ_ZIP_NOT_AN_ARCHIVE,
++ MZ_ZIP_INVALID_HEADER_OR_CORRUPTED,
++ MZ_ZIP_UNSUPPORTED_MULTIDISK,
++ MZ_ZIP_DECOMPRESSION_FAILED,
++ MZ_ZIP_COMPRESSION_FAILED,
++ MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE,
++ MZ_ZIP_CRC_CHECK_FAILED,
++ MZ_ZIP_UNSUPPORTED_CDIR_SIZE,
++ MZ_ZIP_ALLOC_FAILED,
++ MZ_ZIP_FILE_OPEN_FAILED,
++ MZ_ZIP_FILE_CREATE_FAILED,
++ MZ_ZIP_FILE_WRITE_FAILED,
++ MZ_ZIP_FILE_READ_FAILED,
++ MZ_ZIP_FILE_CLOSE_FAILED,
++ MZ_ZIP_FILE_SEEK_FAILED,
++ MZ_ZIP_FILE_STAT_FAILED,
++ MZ_ZIP_INVALID_PARAMETER,
++ MZ_ZIP_INVALID_FILENAME,
++ MZ_ZIP_BUF_TOO_SMALL,
++ MZ_ZIP_INTERNAL_ERROR,
++ MZ_ZIP_FILE_NOT_FOUND,
++ MZ_ZIP_ARCHIVE_TOO_LARGE,
++ MZ_ZIP_VALIDATION_FAILED,
++ MZ_ZIP_WRITE_CALLBACK_FAILED,
++ MZ_ZIP_TOTAL_ERRORS
++} mz_zip_error;
++
+ // Method
+ #define MZ_DEFLATED 8
+
+@@ -696,6 +736,7 @@ typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs,
+ void *pBuf, size_t n);
+ typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs,
+ const void *pBuf, size_t n);
++typedef mz_bool (*mz_file_needs_keepalive)(void *pOpaque);
+
+ struct mz_zip_internal_state_tag;
+ typedef struct mz_zip_internal_state_tag mz_zip_internal_state;
+@@ -707,13 +748,27 @@ typedef enum {
+ MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3
+ } mz_zip_mode;
+
+-typedef struct mz_zip_archive_tag {
++typedef enum {
++ MZ_ZIP_TYPE_INVALID = 0,
++ MZ_ZIP_TYPE_USER,
++ MZ_ZIP_TYPE_MEMORY,
++ MZ_ZIP_TYPE_HEAP,
++ MZ_ZIP_TYPE_FILE,
++ MZ_ZIP_TYPE_CFILE,
++ MZ_ZIP_TOTAL_TYPES
++} mz_zip_type;
++
++typedef struct {
+ mz_uint64 m_archive_size;
+ mz_uint64 m_central_directory_file_ofs;
+- mz_uint m_total_files;
++
++ /* We only support up to UINT32_MAX files in zip64 mode. */
++ mz_uint32 m_total_files;
+ mz_zip_mode m_zip_mode;
++ mz_zip_type m_zip_type;
++ mz_zip_error m_last_error;
+
+- mz_uint m_file_offset_alignment;
++ mz_uint64 m_file_offset_alignment;
+
+ mz_alloc_func m_pAlloc;
+ mz_free_func m_pFree;
+@@ -722,6 +777,7 @@ typedef struct mz_zip_archive_tag {
+
+ mz_file_read_func m_pRead;
+ mz_file_write_func m_pWrite;
++ mz_file_needs_keepalive m_pNeeds_keepalive;
+ void *m_pIO_opaque;
+
+ mz_zip_internal_state *m_pState;
+@@ -1263,6 +1319,9 @@ mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits,
+ int strategy);
+ #endif // #ifndef MINIZ_NO_ZLIB_APIS
+
++#define MZ_UINT16_MAX (0xFFFFU)
++#define MZ_UINT32_MAX (0xFFFFFFFFU)
++
+ #ifdef __cplusplus
+ }
+ #endif
+@@ -1311,6 +1370,11 @@ typedef unsigned char mz_validate_uint64[sizeof(mz_uint64) == 8 ? 1 : -1];
+ ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
+ #endif
+
++#define MZ_READ_LE64(p) \
++ (((mz_uint64)MZ_READ_LE32(p)) | \
++ (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32))) \
++ << 32U))
++
+ #ifdef _MSC_VER
+ #define MZ_FORCEINLINE __forceinline
+ #elif defined(__GNUC__)
+@@ -4160,6 +4224,17 @@ enum {
+ MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30,
+ MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46,
+ MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22,
++
++ /* ZIP64 archive identifier and record sizes */
++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06064b50,
++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG = 0x07064b50,
++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE = 56,
++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE = 20,
++ MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID = 0x0001,
++ MZ_ZIP_DATA_DESCRIPTOR_ID = 0x08074b50,
++ MZ_ZIP_DATA_DESCRIPTER_SIZE64 = 24,
++ MZ_ZIP_DATA_DESCRIPTER_SIZE32 = 16,
++
+ // Central directory header record offsets
+ MZ_ZIP_CDH_SIG_OFS = 0,
+ MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4,
+@@ -4199,6 +4274,31 @@ enum {
+ MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12,
+ MZ_ZIP_ECDH_CDIR_OFS_OFS = 16,
+ MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20,
++
++ /* ZIP64 End of central directory locator offsets */
++ MZ_ZIP64_ECDL_SIG_OFS = 0, /* 4 bytes */
++ MZ_ZIP64_ECDL_NUM_DISK_CDIR_OFS = 4, /* 4 bytes */
++ MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS = 8, /* 8 bytes */
++ MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS = 16, /* 4 bytes */
++
++ /* ZIP64 End of central directory header offsets */
++ MZ_ZIP64_ECDH_SIG_OFS = 0, /* 4 bytes */
++ MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS = 4, /* 8 bytes */
++ MZ_ZIP64_ECDH_VERSION_MADE_BY_OFS = 12, /* 2 bytes */
++ MZ_ZIP64_ECDH_VERSION_NEEDED_OFS = 14, /* 2 bytes */
++ MZ_ZIP64_ECDH_NUM_THIS_DISK_OFS = 16, /* 4 bytes */
++ MZ_ZIP64_ECDH_NUM_DISK_CDIR_OFS = 20, /* 4 bytes */
++ MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 24, /* 8 bytes */
++ MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS = 32, /* 8 bytes */
++ MZ_ZIP64_ECDH_CDIR_SIZE_OFS = 40, /* 8 bytes */
++ MZ_ZIP64_ECDH_CDIR_OFS_OFS = 48, /* 8 bytes */
++ MZ_ZIP_VERSION_MADE_BY_DOS_FILESYSTEM_ID = 0,
++ MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG = 0x10,
++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED = 1,
++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG = 32,
++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION = 64,
++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED = 8192,
++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 = 1 << 11
+ };
+
+ typedef struct {
+@@ -4211,7 +4311,24 @@ struct mz_zip_internal_state_tag {
+ mz_zip_array m_central_dir;
+ mz_zip_array m_central_dir_offsets;
+ mz_zip_array m_sorted_central_dir_offsets;
++
++ /* The flags passed in when the archive is initially opened. */
++ uint32_t m_init_flags;
++
++ /* MZ_TRUE if the archive has a zip64 end of central directory headers, etc.
++ */
++ mz_bool m_zip64;
++
++ /* MZ_TRUE if we found zip64 extended info in the central directory (m_zip64
++ * will also be slammed to true too, even if we didn't find a zip64 end of
++ * central dir header, etc.) */
++ mz_bool m_zip64_has_extended_info_fields;
++
++ /* These fields are used by the file, FILE, memory, and memory/heap read/write
++ * helpers. */
+ MZ_FILE *m_pFile;
++ mz_uint64 m_file_archive_start_ofs;
++
+ void *m_pMem;
+ size_t m_mem_size;
+ size_t m_mem_capacity;
+@@ -4363,6 +4480,13 @@ static mz_bool mz_zip_set_file_times(const char *pFilename, time_t access_time,
+ #endif /* #ifndef MINIZ_NO_STDIO */
+ #endif /* #ifndef MINIZ_NO_TIME */
+
++static MZ_FORCEINLINE mz_bool mz_zip_set_error(mz_zip_archive *pZip,
++ mz_zip_error err_num) {
++ if (pZip)
++ pZip->m_last_error = err_num;
++ return MZ_FALSE;
++}
++
+ static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip,
+ mz_uint32 flags) {
+ (void)flags;
+@@ -4480,127 +4604,346 @@ mz_zip_reader_sort_central_dir_offsets_by_filename(mz_zip_archive *pZip) {
+ }
+ }
+
+-static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip,
+- mz_uint32 flags) {
+- mz_uint cdir_size, num_this_disk, cdir_disk_index;
+- mz_uint64 cdir_ofs;
++static mz_bool mz_zip_reader_locate_header_sig(mz_zip_archive *pZip,
++ mz_uint32 record_sig,
++ mz_uint32 record_size,
++ mz_int64 *pOfs) {
+ mz_int64 cur_file_ofs;
+- const mz_uint8 *p;
+ mz_uint32 buf_u32[4096 / sizeof(mz_uint32)];
+ mz_uint8 *pBuf = (mz_uint8 *)buf_u32;
+- mz_bool sort_central_dir =
+- ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0);
+- // Basic sanity checks - reject files which are too small, and check the first
+- // 4 bytes of the file to make sure a local header is there.
+- if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
++
++ /* Basic sanity checks - reject files which are too small */
++ if (pZip->m_archive_size < record_size)
+ return MZ_FALSE;
+- // Find the end of central directory record by scanning the file from the end
+- // towards the beginning.
++
++ /* Find the record by scanning the file from the end towards the beginning. */
+ cur_file_ofs =
+ MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0);
+ for (;;) {
+ int i,
+ n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs);
++
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n)
+ return MZ_FALSE;
+- for (i = n - 4; i >= 0; --i)
+- if (MZ_READ_LE32(pBuf + i) == MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG)
+- break;
++
++ for (i = n - 4; i >= 0; --i) {
++ mz_uint s = MZ_READ_LE32(pBuf + i);
++ if (s == record_sig) {
++ if ((pZip->m_archive_size - (cur_file_ofs + i)) >= record_size)
++ break;
++ }
++ }
++
+ if (i >= 0) {
+ cur_file_ofs += i;
+ break;
+ }
++
++ /* Give up if we've searched the entire file, or we've gone back "too far"
++ * (~64kb) */
+ if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >=
+- (0xFFFF + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)))
++ (MZ_UINT16_MAX + record_size)))
+ return MZ_FALSE;
++
+ cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0);
+ }
+- // Read and verify the end of central directory record.
++
++ *pOfs = cur_file_ofs;
++ return MZ_TRUE;
++}
++
++static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip,
++ mz_uint flags) {
++ mz_uint cdir_size = 0, cdir_entries_on_this_disk = 0, num_this_disk = 0,
++ cdir_disk_index = 0;
++ mz_uint64 cdir_ofs = 0;
++ mz_int64 cur_file_ofs = 0;
++ const mz_uint8 *p;
++
++ mz_uint32 buf_u32[4096 / sizeof(mz_uint32)];
++ mz_uint8 *pBuf = (mz_uint8 *)buf_u32;
++ mz_bool sort_central_dir =
++ ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0);
++ mz_uint32 zip64_end_of_central_dir_locator_u32
++ [(MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE + sizeof(mz_uint32) - 1) /
++ sizeof(mz_uint32)];
++ mz_uint8 *pZip64_locator = (mz_uint8 *)zip64_end_of_central_dir_locator_u32;
++
++ mz_uint32 zip64_end_of_central_dir_header_u32
++ [(MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) /
++ sizeof(mz_uint32)];
++ mz_uint8 *pZip64_end_of_central_dir =
++ (mz_uint8 *)zip64_end_of_central_dir_header_u32;
++
++ mz_uint64 zip64_end_of_central_dir_ofs = 0;
++
++ /* Basic sanity checks - reject files which are too small, and check the first
++ * 4 bytes of the file to make sure a local header is there. */
++ if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
++ return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
++
++ if (!mz_zip_reader_locate_header_sig(
++ pZip, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG,
++ MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, &cur_file_ofs))
++ return mz_zip_set_error(pZip, MZ_ZIP_FAILED_FINDING_CENTRAL_DIR);
++
++ /* Read and verify the end of central directory record. */
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf,
+ MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) !=
+ MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
+- return MZ_FALSE;
+- if ((MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) !=
+- MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) ||
+- ((pZip->m_total_files =
+- MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS)) !=
+- MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS)))
+- return MZ_FALSE;
++ return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
++
++ if (MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) !=
++ MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG)
++ return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
++
++ if (cur_file_ofs >= (MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE +
++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)) {
++ if (pZip->m_pRead(pZip->m_pIO_opaque,
++ cur_file_ofs - MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE,
++ pZip64_locator,
++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) ==
++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) {
++ if (MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_SIG_OFS) ==
++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG) {
++ zip64_end_of_central_dir_ofs = MZ_READ_LE64(
++ pZip64_locator + MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS);
++ if (zip64_end_of_central_dir_ofs >
++ (pZip->m_archive_size - MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE))
++ return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
++
++ if (pZip->m_pRead(pZip->m_pIO_opaque, zip64_end_of_central_dir_ofs,
++ pZip64_end_of_central_dir,
++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) ==
++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) {
++ if (MZ_READ_LE32(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIG_OFS) ==
++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG) {
++ pZip->m_pState->m_zip64 = MZ_TRUE;
++ }
++ }
++ }
++ }
++ }
+
++ pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS);
++ cdir_entries_on_this_disk =
++ MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS);
+ num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS);
+ cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS);
++ cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS);
++ cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS);
++
++ if (pZip->m_pState->m_zip64) {
++ mz_uint32 zip64_total_num_of_disks =
++ MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS);
++ mz_uint64 zip64_cdir_total_entries = MZ_READ_LE64(
++ pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS);
++ mz_uint64 zip64_cdir_total_entries_on_this_disk = MZ_READ_LE64(
++ pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS);
++ mz_uint64 zip64_size_of_end_of_central_dir_record = MZ_READ_LE64(
++ pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS);
++ mz_uint64 zip64_size_of_central_directory =
++ MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_SIZE_OFS);
++
++ if (zip64_size_of_end_of_central_dir_record <
++ (MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE - 12))
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
++
++ if (zip64_total_num_of_disks != 1U)
++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
++
++ /* Check for miniz's practical limits */
++ if (zip64_cdir_total_entries > MZ_UINT32_MAX)
++ return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
++
++ pZip->m_total_files = (mz_uint32)zip64_cdir_total_entries;
++
++ if (zip64_cdir_total_entries_on_this_disk > MZ_UINT32_MAX)
++ return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
++
++ cdir_entries_on_this_disk =
++ (mz_uint32)zip64_cdir_total_entries_on_this_disk;
++
++ /* Check for miniz's current practical limits (sorry, this should be enough
++ * for millions of files) */
++ if (zip64_size_of_central_directory > MZ_UINT32_MAX)
++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE);
++
++ cdir_size = (mz_uint32)zip64_size_of_central_directory;
++
++ num_this_disk = MZ_READ_LE32(pZip64_end_of_central_dir +
++ MZ_ZIP64_ECDH_NUM_THIS_DISK_OFS);
++
++ cdir_disk_index = MZ_READ_LE32(pZip64_end_of_central_dir +
++ MZ_ZIP64_ECDH_NUM_DISK_CDIR_OFS);
++
++ cdir_ofs =
++ MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_OFS_OFS);
++ }
++
++ if (pZip->m_total_files != cdir_entries_on_this_disk)
++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
++
+ if (((num_this_disk | cdir_disk_index) != 0) &&
+ ((num_this_disk != 1) || (cdir_disk_index != 1)))
+- return MZ_FALSE;
++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
+
+- if ((cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS)) <
+- pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)
+- return MZ_FALSE;
++ if (cdir_size < pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
+
+- cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS);
+ if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size)
+- return MZ_FALSE;
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
+
+ pZip->m_central_directory_file_ofs = cdir_ofs;
+
+ if (pZip->m_total_files) {
+ mz_uint i, n;
+-
+- // Read the entire central directory into a heap block, and allocate another
+- // heap block to hold the unsorted central dir file record offsets, and
+- // another to hold the sorted indices.
++ /* Read the entire central directory into a heap block, and allocate another
++ * heap block to hold the unsorted central dir file record offsets, and
++ * possibly another to hold the sorted indices. */
+ if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size,
+ MZ_FALSE)) ||
+ (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets,
+ pZip->m_total_files, MZ_FALSE)))
+- return MZ_FALSE;
++ return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
+
+ if (sort_central_dir) {
+ if (!mz_zip_array_resize(pZip,
+ &pZip->m_pState->m_sorted_central_dir_offsets,
+ pZip->m_total_files, MZ_FALSE))
+- return MZ_FALSE;
++ return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
+ }
+
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs,
+ pZip->m_pState->m_central_dir.m_p,
+ cdir_size) != cdir_size)
+- return MZ_FALSE;
++ return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
+
+- // Now create an index into the central directory file records, do some
+- // basic sanity checking on each record, and check for zip64 entries (which
+- // are not yet supported).
++ /* Now create an index into the central directory file records, do some
++ * basic sanity checking on each record */
+ p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p;
+ for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i) {
+- mz_uint total_header_size, comp_size, decomp_size, disk_index;
++ mz_uint total_header_size, disk_index, bit_flags, filename_size,
++ ext_data_size;
++ mz_uint64 comp_size, decomp_size, local_header_ofs;
++
+ if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) ||
+ (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG))
+- return MZ_FALSE;
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
++
+ MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32,
+ i) =
+ (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p);
++
+ if (sort_central_dir)
+ MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets,
+ mz_uint32, i) = i;
++
+ comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+ decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
+- if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) &&
+- (decomp_size != comp_size)) ||
+- (decomp_size && !comp_size) || (decomp_size == 0xFFFFFFFF) ||
+- (comp_size == 0xFFFFFFFF))
+- return MZ_FALSE;
++ local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
++ filename_size = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
++ ext_data_size = MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS);
++
++ if ((!pZip->m_pState->m_zip64_has_extended_info_fields) &&
++ (ext_data_size) &&
++ (MZ_MAX(MZ_MAX(comp_size, decomp_size), local_header_ofs) ==
++ MZ_UINT32_MAX)) {
++ /* Attempt to find zip64 extended information field in the entry's extra
++ * data */
++ mz_uint32 extra_size_remaining = ext_data_size;
++
++ if (extra_size_remaining) {
++ const mz_uint8 *pExtra_data;
++ void *buf = NULL;
++
++ if (MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + ext_data_size >
++ n) {
++ buf = MZ_MALLOC(ext_data_size);
++ if (buf == NULL)
++ return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
++
++ if (pZip->m_pRead(pZip->m_pIO_opaque,
++ cdir_ofs + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE +
++ filename_size,
++ buf, ext_data_size) != ext_data_size) {
++ MZ_FREE(buf);
++ return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
++ }
++
++ pExtra_data = (mz_uint8 *)buf;
++ } else {
++ pExtra_data = p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size;
++ }
++
++ do {
++ mz_uint32 field_id;
++ mz_uint32 field_data_size;
++
++ if (extra_size_remaining < (sizeof(mz_uint16) * 2)) {
++ MZ_FREE(buf);
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
++ }
++
++ field_id = MZ_READ_LE16(pExtra_data);
++ field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16));
++
++ if ((field_data_size + sizeof(mz_uint16) * 2) >
++ extra_size_remaining) {
++ MZ_FREE(buf);
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
++ }
++
++ if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) {
++ /* Ok, the archive didn't have any zip64 headers but it uses a
++ * zip64 extended information field so mark it as zip64 anyway
++ * (this can occur with infozip's zip util when it reads
++ * compresses files from stdin). */
++ pZip->m_pState->m_zip64 = MZ_TRUE;
++ pZip->m_pState->m_zip64_has_extended_info_fields = MZ_TRUE;
++ break;
++ }
++
++ pExtra_data += sizeof(mz_uint16) * 2 + field_data_size;
++ extra_size_remaining =
++ extra_size_remaining - sizeof(mz_uint16) * 2 - field_data_size;
++ } while (extra_size_remaining);
++
++ MZ_FREE(buf);
++ }
++ }
++
++ /* I've seen archives that aren't marked as zip64 that uses zip64 ext
++ * data, argh */
++ if ((comp_size != MZ_UINT32_MAX) && (decomp_size != MZ_UINT32_MAX)) {
++ if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) &&
++ (decomp_size != comp_size)) ||
++ (decomp_size && !comp_size))
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
++ }
++
+ disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS);
+- if ((disk_index != num_this_disk) && (disk_index != 1))
+- return MZ_FALSE;
+- if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) +
+- MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size)
+- return MZ_FALSE;
++ if ((disk_index == MZ_UINT16_MAX) ||
++ ((disk_index != num_this_disk) && (disk_index != 1)))
++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
++
++ if (comp_size != MZ_UINT32_MAX) {
++ if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) +
++ MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size)
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
++ }
++
++ bit_flags = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
++ if (bit_flags & MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED)
++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION);
++
+ if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE +
+ MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) +
+ MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) +
+ MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) >
+ n)
+- return MZ_FALSE;
++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
++
+ n -= total_header_size;
+ p += total_header_size;
+ }
+diff --git a/contrib/zip/src/zip.c b/contrib/zip/src/zip.c
+index ff3a8fe1..1abcfd8f 100644
+--- a/contrib/zip/src/zip.c
++++ b/contrib/zip/src/zip.c
+@@ -24,7 +24,6 @@
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) && \
+ (P)[1] == ':')
+ #define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE(P) ? 2 : 0)
+-#define ISSLASH(C) ((C) == '/' || (C) == '\\')
+
+ #else
+
+@@ -48,7 +47,7 @@ int symlink(const char *target, const char *linkpath); // needed on Linux
+ #endif
+
+ #ifndef ISSLASH
+-#define ISSLASH(C) ((C) == '/')
++#define ISSLASH(C) ((C) == '/' || (C) == '\\')
+ #endif
+
+ #define CLEANUP(ptr) \
+@@ -78,26 +77,34 @@ static const char *base_name(const char *name) {
+ return base;
+ }
+
+-static int mkpath(const char *path) {
+- char const *p;
++static int mkpath(char *path) {
++ char *p;
+ char npath[MAX_PATH + 1];
+ int len = 0;
+ int has_device = HAS_DEVICE(path);
+
+ memset(npath, 0, MAX_PATH + 1);
+-
+-#ifdef _WIN32
+- // only on windows fix the path
+- npath[0] = path[0];
+- npath[1] = path[1];
+- len = 2;
+-#endif // _WIN32
+-
++ if (has_device) {
++ // only on windows
++ npath[0] = path[0];
++ npath[1] = path[1];
++ len = 2;
++ }
+ for (p = path + len; *p && len < MAX_PATH; p++) {
+ if (ISSLASH(*p) && ((!has_device && len > 0) || (has_device && len > 2))) {
+- if (MKDIR(npath) == -1)
+- if (errno != EEXIST)
++#if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \
++ defined(__MINGW32__)
++#else
++ if ('\\' == *p) {
++ *p = '/';
++ }
++#endif
++
++ if (MKDIR(npath) == -1) {
++ if (errno != EEXIST) {
+ return -1;
++ }
++ }
+ }
+ npath[len++] = *p;
+ }
+@@ -279,7 +286,14 @@ int zip_entry_open(struct zip_t *zip, const char *entryname) {
+ zip->entry.header_offset = zip->archive.m_archive_size;
+ memset(zip->entry.header, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE * sizeof(mz_uint8));
+ zip->entry.method = 0;
++
++ // UNIX or APPLE
++#if MZ_PLATFORM == 3 || MZ_PLATFORM == 19
++ // regular file with rw-r--r-- persmissions
++ zip->entry.external_attr = (mz_uint32)(0100644) << 16;
++#else
+ zip->entry.external_attr = 0;
++#endif
+
+ num_alignment_padding_bytes =
+ mz_zip_writer_compute_padding_needed_for_file_alignment(pzip);
+@@ -660,7 +674,7 @@ ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) {
+ }
+
+ if (!mz_zip_reader_extract_to_mem_no_alloc(pzip, (mz_uint)zip->entry.index,
+- buf, bufsize, 0, NULL, 0)) {
++ buf, bufsize, 0, NULL, 0)) {
+ return -1;
+ }
+
+@@ -670,10 +684,7 @@ ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) {
+ int zip_entry_fread(struct zip_t *zip, const char *filename) {
+ mz_zip_archive *pzip = NULL;
+ mz_uint idx;
+-#if defined(_MSC_VER)
+-#else
+ mz_uint32 xattr = 0;
+-#endif
+ mz_zip_archive_file_stat info;
+
+ if (!zip) {
+@@ -875,12 +886,19 @@ int zip_extract(const char *zipname, const char *dir,
+ goto out;
+ }
+
+- if ((((info.m_version_made_by >> 8) == 3) || ((info.m_version_made_by >> 8) == 19)) // if zip is produced on Unix or macOS (3 and 19 from section 4.4.2.2 of zip standard)
+- && info.m_external_attr & (0x20 << 24)) { // and has sym link attribute (0x80 is file, 0x40 is directory)
++ if ((((info.m_version_made_by >> 8) == 3) ||
++ ((info.m_version_made_by >> 8) ==
++ 19)) // if zip is produced on Unix or macOS (3 and 19 from
++ // section 4.4.2.2 of zip standard)
++ && info.m_external_attr &
++ (0x20 << 24)) { // and has sym link attribute (0x80 is file, 0x40
++ // is directory)
+ #if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \
+ defined(__MINGW32__)
+-#else
+- if (info.m_uncomp_size > MAX_PATH || !mz_zip_reader_extract_to_mem_no_alloc(&zip_archive, i, symlink_to, MAX_PATH, 0, NULL, 0)) {
++#else
++ if (info.m_uncomp_size > MAX_PATH ||
++ !mz_zip_reader_extract_to_mem_no_alloc(&zip_archive, i, symlink_to,
++ MAX_PATH, 0, NULL, 0)) {
+ goto out;
+ }
+ symlink_to[info.m_uncomp_size] = '\0';
+diff --git a/contrib/zip/src/zip.h b/contrib/zip/src/zip.h
+index 5f39df50..a48d64d6 100644
+--- a/contrib/zip/src/zip.h
++++ b/contrib/zip/src/zip.h
+@@ -20,241 +20,240 @@ extern "C" {
+ #endif
+
+ #if !defined(_SSIZE_T_DEFINED) && !defined(_SSIZE_T_DEFINED_) && \
+- !defined(_SSIZE_T) && !defined(_SSIZE_T_) && !defined(__ssize_t_defined)
+-#define _SSIZE_T
++ !defined(__DEFINED_ssize_t) && !defined(__ssize_t_defined) && \
++ !defined(_SSIZE_T) && !defined(_SSIZE_T_)
++
+ // 64-bit Windows is the only mainstream platform
+ // where sizeof(long) != sizeof(void*)
+ #ifdef _WIN64
+-typedef long long ssize_t; /* byte count or error */
++typedef long long ssize_t; /* byte count or error */
+ #else
+-typedef long ssize_t; /* byte count or error */
++typedef long ssize_t; /* byte count or error */
+ #endif
++
++#define _SSIZE_T_DEFINED
++#define _SSIZE_T_DEFINED_
++#define __DEFINED_ssize_t
++#define __ssize_t_defined
++#define _SSIZE_T
++#define _SSIZE_T_
++
+ #endif
+
+ #ifndef MAX_PATH
+ #define MAX_PATH 32767 /* # chars in a path name including NULL */
+ #endif
+
++/**
++ * @mainpage
++ *
++ * Documenation for @ref zip.
++ */
++
++/**
++ * @addtogroup zip
++ * @{
++ */
++
++/**
++ * Default zip compression level.
++ */
++
+ #define ZIP_DEFAULT_COMPRESSION_LEVEL 6
+
+-/*
+- This data structure is used throughout the library to represent zip archive
+- - forward declaration.
+-*/
++/**
++ * @struct zip_t
++ *
++ * This data structure is used throughout the library to represent zip archive -
++ * forward declaration.
++ */
+ struct zip_t;
+
+-/*
+- Opens zip archive with compression level using the given mode.
+-
+- Args:
+- zipname: zip archive file name.
+- level: compression level (0-9 are the standard zlib-style levels).
+- mode: file access mode.
+- 'r': opens a file for reading/extracting (the file must exists).
+- 'w': creates an empty file for writing.
+- 'a': appends to an existing archive.
+-
+- Returns:
+- The zip archive handler or NULL on error
+-*/
++/**
++ * Opens zip archive with compression level using the given mode.
++ *
++ * @param zipname zip archive file name.
++ * @param level compression level (0-9 are the standard zlib-style levels).
++ * @param mode file access mode.
++ * - 'r': opens a file for reading/extracting (the file must exists).
++ * - 'w': creates an empty file for writing.
++ * - 'a': appends to an existing archive.
++ *
++ * @return the zip archive handler or NULL on error
++ */
+ extern struct zip_t *zip_open(const char *zipname, int level, char mode);
+
+-/*
+- Closes the zip archive, releases resources - always finalize.
+-
+- Args:
+- zip: zip archive handler.
+-*/
++/**
++ * Closes the zip archive, releases resources - always finalize.
++ *
++ * @param zip zip archive handler.
++ */
+ extern void zip_close(struct zip_t *zip);
+
+-/*
+- Opens an entry by name in the zip archive.
+- For zip archive opened in 'w' or 'a' mode the function will append
+- a new entry. In readonly mode the function tries to locate the entry
+- in global dictionary.
+-
+- Args:
+- zip: zip archive handler.
+- entryname: an entry name in local dictionary.
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
+-*/
++/**
++ * Opens an entry by name in the zip archive.
++ *
++ * For zip archive opened in 'w' or 'a' mode the function will append
++ * a new entry. In readonly mode the function tries to locate the entry
++ * in global dictionary.
++ *
++ * @param zip zip archive handler.
++ * @param entryname an entry name in local dictionary.
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
++ */
+ extern int zip_entry_open(struct zip_t *zip, const char *entryname);
+
+-/*
+- Opens a new entry by index in the zip archive.
+- This function is only valid if zip archive was opened in 'r' (readonly) mode.
+-
+- Args:
+- zip: zip archive handler.
+- index: index in local dictionary.
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
+-*/
++/**
++ * Opens a new entry by index in the zip archive.
++ *
++ * This function is only valid if zip archive was opened in 'r' (readonly) mode.
++ *
++ * @param zip zip archive handler.
++ * @param index index in local dictionary.
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
++ */
+ extern int zip_entry_openbyindex(struct zip_t *zip, int index);
+
+-/*
+- Closes a zip entry, flushes buffer and releases resources.
+-
+- Args:
+- zip: zip archive handler.
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
+-*/
++/**
++ * Closes a zip entry, flushes buffer and releases resources.
++ *
++ * @param zip zip archive handler.
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
++ */
+ extern int zip_entry_close(struct zip_t *zip);
+
+-/*
+- Returns a local name of the current zip entry.
+- The main difference between user's entry name and local entry name
+- is optional relative path.
+- Following .ZIP File Format Specification - the path stored MUST not contain
+- a drive or device letter, or a leading slash.
+- All slashes MUST be forward slashes '/' as opposed to backwards slashes '\'
+- for compatibility with Amiga and UNIX file systems etc.
+-
+- Args:
+- zip: zip archive handler.
+-
+- Returns:
+- The pointer to the current zip entry name, or NULL on error.
+-*/
++/**
++ * Returns a local name of the current zip entry.
++ *
++ * The main difference between user's entry name and local entry name
++ * is optional relative path.
++ * Following .ZIP File Format Specification - the path stored MUST not contain
++ * a drive or device letter, or a leading slash.
++ * All slashes MUST be forward slashes '/' as opposed to backwards slashes '\'
++ * for compatibility with Amiga and UNIX file systems etc.
++ *
++ * @param zip: zip archive handler.
++ *
++ * @return the pointer to the current zip entry name, or NULL on error.
++ */
+ extern const char *zip_entry_name(struct zip_t *zip);
+
+-/*
+- Returns an index of the current zip entry.
+-
+- Args:
+- zip: zip archive handler.
+-
+- Returns:
+- The index on success, negative number (< 0) on error.
+-*/
++/**
++ * Returns an index of the current zip entry.
++ *
++ * @param zip zip archive handler.
++ *
++ * @return the index on success, negative number (< 0) on error.
++ */
+ extern int zip_entry_index(struct zip_t *zip);
+
+-/*
+- Determines if the current zip entry is a directory entry.
+-
+- Args:
+- zip: zip archive handler.
+-
+- Returns:
+- The return code - 1 (true), 0 (false), negative number (< 0) on error.
+-*/
++/**
++ * Determines if the current zip entry is a directory entry.
++ *
++ * @param zip zip archive handler.
++ *
++ * @return the return code - 1 (true), 0 (false), negative number (< 0) on
++ * error.
++ */
+ extern int zip_entry_isdir(struct zip_t *zip);
+
+-/*
+- Returns an uncompressed size of the current zip entry.
+-
+- Args:
+- zip: zip archive handler.
+-
+- Returns:
+- The uncompressed size in bytes.
+-*/
++/**
++ * Returns an uncompressed size of the current zip entry.
++ *
++ * @param zip zip archive handler.
++ *
++ * @return the uncompressed size in bytes.
++ */
+ extern unsigned long long zip_entry_size(struct zip_t *zip);
+
+-/*
+- Returns CRC-32 checksum of the current zip entry.
+-
+- Args:
+- zip: zip archive handler.
+-
+- Returns:
+- The CRC-32 checksum.
+-*/
++/**
++ * Returns CRC-32 checksum of the current zip entry.
++ *
++ * @param zip zip archive handler.
++ *
++ * @return the CRC-32 checksum.
++ */
+ extern unsigned int zip_entry_crc32(struct zip_t *zip);
+
+-/*
+- Compresses an input buffer for the current zip entry.
+-
+- Args:
+- zip: zip archive handler.
+- buf: input buffer.
+- bufsize: input buffer size (in bytes).
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
+-*/
++/**
++ * Compresses an input buffer for the current zip entry.
++ *
++ * @param zip zip archive handler.
++ * @param buf input buffer.
++ * @param bufsize input buffer size (in bytes).
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
++ */
+ extern int zip_entry_write(struct zip_t *zip, const void *buf, size_t bufsize);
+
+-/*
+- Compresses a file for the current zip entry.
+-
+- Args:
+- zip: zip archive handler.
+- filename: input file.
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
+-*/
++/**
++ * Compresses a file for the current zip entry.
++ *
++ * @param zip zip archive handler.
++ * @param filename input file.
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
++ */
+ extern int zip_entry_fwrite(struct zip_t *zip, const char *filename);
+
+-/*
+- Extracts the current zip entry into output buffer.
+- The function allocates sufficient memory for a output buffer.
+-
+- Args:
+- zip: zip archive handler.
+- buf: output buffer.
+- bufsize: output buffer size (in bytes).
+-
+- Note:
+- - remember to release memory allocated for a output buffer.
+- - for large entries, please take a look at zip_entry_extract function.
+-
+- Returns:
+- The return code - the number of bytes actually read on success.
+- Otherwise a -1 on error.
+-*/
++/**
++ * Extracts the current zip entry into output buffer.
++ *
++ * The function allocates sufficient memory for a output buffer.
++ *
++ * @param zip zip archive handler.
++ * @param buf output buffer.
++ * @param bufsize output buffer size (in bytes).
++ *
++ * @note remember to release memory allocated for a output buffer.
++ * for large entries, please take a look at zip_entry_extract function.
++ *
++ * @return the return code - the number of bytes actually read on success.
++ * Otherwise a -1 on error.
++ */
+ extern ssize_t zip_entry_read(struct zip_t *zip, void **buf, size_t *bufsize);
+
+-/*
+- Extracts the current zip entry into a memory buffer using no memory
+- allocation.
+-
+- Args:
+- zip: zip archive handler.
+- buf: preallocated output buffer.
+- bufsize: output buffer size (in bytes).
+-
+- Note:
+- - ensure supplied output buffer is large enough.
+- - zip_entry_size function (returns uncompressed size for the current entry)
+- can be handy to estimate how big buffer is needed.
+- - for large entries, please take a look at zip_entry_extract function.
+-
+- Returns:
+- The return code - the number of bytes actually read on success.
+- Otherwise a -1 on error (e.g. bufsize is not large enough).
+-*/
+-extern ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize);
+-
+-/*
+- Extracts the current zip entry into output file.
+-
+- Args:
+- zip: zip archive handler.
+- filename: output file.
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
+-*/
++/**
++ * Extracts the current zip entry into a memory buffer using no memory
++ * allocation.
++ *
++ * @param zip zip archive handler.
++ * @param buf preallocated output buffer.
++ * @param bufsize output buffer size (in bytes).
++ *
++ * @note ensure supplied output buffer is large enough.
++ * zip_entry_size function (returns uncompressed size for the current
++ * entry) can be handy to estimate how big buffer is needed. for large
++ * entries, please take a look at zip_entry_extract function.
++ *
++ * @return the return code - the number of bytes actually read on success.
++ * Otherwise a -1 on error (e.g. bufsize is not large enough).
++ */
++extern ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf,
++ size_t bufsize);
++
++/**
++ * Extracts the current zip entry into output file.
++ *
++ * @param zip zip archive handler.
++ * @param filename output file.
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
++ */
+ extern int zip_entry_fread(struct zip_t *zip, const char *filename);
+
+-/*
+- Extracts the current zip entry using a callback function (on_extract).
+-
+- Args:
+- zip: zip archive handler.
+- on_extract: callback function.
+- arg: opaque pointer (optional argument,
+- which you can pass to the on_extract callback)
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
++/**
++ * Extracts the current zip entry using a callback function (on_extract).
++ *
++ * @param zip zip archive handler.
++ * @param on_extract callback function.
++ * @param arg opaque pointer (optional argument, which you can pass to the
++ * on_extract callback)
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
+ */
+ extern int
+ zip_entry_extract(struct zip_t *zip,
+@@ -262,53 +261,49 @@ zip_entry_extract(struct zip_t *zip,
+ const void *data, size_t size),
+ void *arg);
+
+-/*
+- Returns the number of all entries (files and directories) in the zip archive.
+-
+- Args:
+- zip: zip archive handler.
+-
+- Returns:
+- The return code - the number of entries on success,
+- negative number (< 0) on error.
+-*/
++/**
++ * Returns the number of all entries (files and directories) in the zip archive.
++ *
++ * @param zip zip archive handler.
++ *
++ * @return the return code - the number of entries on success, negative number
++ * (< 0) on error.
++ */
+ extern int zip_total_entries(struct zip_t *zip);
+
+-/*
+- Creates a new archive and puts files into a single zip archive.
+-
+- Args:
+- zipname: zip archive file.
+- filenames: input files.
+- len: number of input files.
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
+-*/
++/**
++ * Creates a new archive and puts files into a single zip archive.
++ *
++ * @param zipname zip archive file.
++ * @param filenames input files.
++ * @param len: number of input files.
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
++ */
+ extern int zip_create(const char *zipname, const char *filenames[], size_t len);
+
+-/*
+- Extracts a zip archive file into directory.
+-
+- If on_extract_entry is not NULL, the callback will be called after
+- successfully extracted each zip entry.
+- Returning a negative value from the callback will cause abort and return an
+- error. The last argument (void *arg) is optional, which you can use to pass
+- data to the on_extract_entry callback.
+-
+- Args:
+- zipname: zip archive file.
+- dir: output directory.
+- on_extract_entry: on extract callback.
+- arg: opaque pointer.
+-
+- Returns:
+- The return code - 0 on success, negative number (< 0) on error.
+-*/
++/**
++ * Extracts a zip archive file into directory.
++ *
++ * If on_extract_entry is not NULL, the callback will be called after
++ * successfully extracted each zip entry.
++ * Returning a negative value from the callback will cause abort and return an
++ * error. The last argument (void *arg) is optional, which you can use to pass
++ * data to the on_extract_entry callback.
++ *
++ * @param zipname zip archive file.
++ * @param dir output directory.
++ * @param on_extract_entry on extract callback.
++ * @param arg opaque pointer.
++ *
++ * @return the return code - 0 on success, negative number (< 0) on error.
++ */
+ extern int zip_extract(const char *zipname, const char *dir,
+ int (*on_extract_entry)(const char *filename, void *arg),
+ void *arg);
+
++/** @} */
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/contrib/zip/test/CMakeLists.txt b/contrib/zip/test/CMakeLists.txt
+index 9b2a8db1..cc060b00 100644
+--- a/contrib/zip/test/CMakeLists.txt
++++ b/contrib/zip/test/CMakeLists.txt
+@@ -1,19 +1,16 @@
+ cmake_minimum_required(VERSION 2.8)
+
+-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
+- if(ENABLE_COVERAGE)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g ")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage")
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
+- endif()
+-endif ()
+-
+ # test
+-include_directories(../src)
+-add_executable(test.exe test.c ../src/zip.c)
+-add_executable(test_miniz.exe test_miniz.c)
++set(test_out test.out)
++set(test_miniz_out test_miniz.out)
++
++add_executable(${test_out} test.c)
++target_link_libraries(${test_out} zip)
++add_executable(${test_miniz_out} test_miniz.c)
++target_link_libraries(${test_miniz_out} zip)
++
++add_test(NAME ${test_out} COMMAND ${test_out})
++add_test(NAME ${test_miniz_out} COMMAND ${test_miniz_out})
+
+-add_test(NAME test COMMAND test.exe)
+-add_test(NAME test_miniz COMMAND test_miniz.exe)
++set(test_out ${test_out} PARENT_SCOPE)
++set(test_miniz_out ${test_miniz_out} PARENT_SCOPE)
+diff --git a/contrib/zip/test/test.c b/contrib/zip/test/test.c
+index 45443053..a9b2ddab 100644
+--- a/contrib/zip/test/test.c
++++ b/contrib/zip/test/test.c
+@@ -29,6 +29,8 @@
+ #define XFILE "7.txt\0"
+ #define XMODE 0100777
+
++#define UNIXMODE 0100644
++
+ #define UNUSED(x) (void)x
+
+ static int total_entries = 0;
+@@ -102,7 +104,8 @@ static void test_read(void) {
+ assert(0 == zip_entry_close(zip));
+ free(buf);
+ buf = NULL;
+-
++ bufsize = 0;
++
+ assert(0 == zip_entry_open(zip, "test/test-2.txt"));
+ assert(strlen(TESTDATA2) == zip_entry_size(zip));
+ assert(CRC32DATA2 == zip_entry_crc32(zip));
+@@ -131,7 +134,8 @@ static void test_read(void) {
+ assert(0 == zip_entry_close(zip));
+ free(buf);
+ buf = NULL;
+-
++ bufsize = 0;
++
+ buftmp = strlen(TESTDATA1);
+ buf = calloc(buftmp, sizeof(char));
+ assert(0 == zip_entry_open(zip, "test/test-1.txt"));
+@@ -433,6 +437,35 @@ static void test_mtime(void) {
+ remove(ZIPNAME);
+ }
+
++static void test_unix_permissions(void) {
++#if defined(_WIN64) || defined(_WIN32) || defined(__WIN32__)
++#else
++ // UNIX or APPLE
++ struct MZ_FILE_STAT_STRUCT file_stats;
++
++ remove(ZIPNAME);
++
++ struct zip_t *zip = zip_open(ZIPNAME, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
++ assert(zip != NULL);
++
++ assert(0 == zip_entry_open(zip, RFILE));
++ assert(0 == zip_entry_write(zip, TESTDATA1, strlen(TESTDATA1)));
++ assert(0 == zip_entry_close(zip));
++
++ zip_close(zip);
++
++ remove(RFILE);
++
++ assert(0 == zip_extract(ZIPNAME, ".", NULL, NULL));
++
++ assert(0 == MZ_FILE_STAT(RFILE, &file_stats));
++ assert(UNIXMODE == file_stats.st_mode);
++
++ remove(RFILE);
++ remove(ZIPNAME);
++#endif
++}
++
+ int main(int argc, char *argv[]) {
+ UNUSED(argc);
+ UNUSED(argv);
+@@ -453,6 +486,7 @@ int main(int argc, char *argv[]) {
+ test_write_permissions();
+ test_exe_permissions();
+ test_mtime();
++ test_unix_permissions();
+
+ remove(ZIPNAME);
+ return 0;
+diff --git a/contrib/zip/test/test_miniz.c b/contrib/zip/test/test_miniz.c
+index ebc0564d..babcaecd 100644
+--- a/contrib/zip/test/test_miniz.c
++++ b/contrib/zip/test/test_miniz.c
+@@ -23,16 +23,39 @@ int main(int argc, char *argv[]) {
+ uint step = 0;
+ int cmp_status;
+ uLong src_len = (uLong)strlen(s_pStr);
+- uLong cmp_len = compressBound(src_len);
+ uLong uncomp_len = src_len;
++ uLong cmp_len;
+ uint8 *pCmp, *pUncomp;
++ size_t sz;
+ uint total_succeeded = 0;
+ (void)argc, (void)argv;
+
+ printf("miniz.c version: %s\n", MZ_VERSION);
+
+ do {
++ pCmp = (uint8 *)tdefl_compress_mem_to_heap(s_pStr, src_len, &cmp_len, 0);
++ if (!pCmp) {
++ printf("tdefl_compress_mem_to_heap failed\n");
++ return EXIT_FAILURE;
++ }
++ if (src_len <= cmp_len) {
++ printf("tdefl_compress_mem_to_heap failed: from %u to %u bytes\n",
++ (mz_uint32)uncomp_len, (mz_uint32)cmp_len);
++ free(pCmp);
++ return EXIT_FAILURE;
++ }
++
++ sz = tdefl_compress_mem_to_mem(pCmp, cmp_len, s_pStr, src_len, 0);
++ if (sz != cmp_len) {
++ printf("tdefl_compress_mem_to_mem failed: expected %u, got %u\n",
++ (mz_uint32)cmp_len, (mz_uint32)sz);
++ free(pCmp);
++ return EXIT_FAILURE;
++ }
++
+ // Allocate buffers to hold compressed and uncompressed data.
++ free(pCmp);
++ cmp_len = compressBound(src_len);
+ pCmp = (mz_uint8 *)malloc((size_t)cmp_len);
+ pUncomp = (mz_uint8 *)malloc((size_t)src_len);
+ if ((!pCmp) || (!pUncomp)) {
diff --git a/meta/recipes-graphics/vulkan/assimp_5.0.0.bb b/meta/recipes-graphics/vulkan/assimp_5.0.0.bb
new file mode 100644
index 0000000000..77e3651e45
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/assimp_5.0.0.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \
+ various well-known 3D model formats in a uniform manner."
+HOMEPAGE = "http://www.assimp.org/"
+SECTION = "devel"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271"
+
+DEPENDS = "zlib"
+
+SRC_URI = "git://github.com/assimp/assimp.git \
+ file://0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch \
+ "
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV = "2d2889f73fa1b2ca09ba9f43c9785402d3a7fdd0"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}"
diff --git a/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch b/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch
new file mode 100644
index 0000000000..76240610f5
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch
@@ -0,0 +1,95 @@
+From 0cbf9c9831f773e0da66209be9a6ff28d57c2321 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Mon, 30 Jul 2018 17:23:29 +0300
+Subject: [PATCH] Don't build demos with questionably licensed data
+
+Some of the models don't have open source compatible licenses:
+don't build demos using those. Also don't build demos that need
+resources that are not included.
+
+ssao:
+scenerendering:
+ Sibenik model, no license found
+
+deferred:
+deferredmultisampling:
+deferredshadows:
+ armor model, CC-BY-3.0
+
+vulkanscene:
+imgui:
+shadowmapping:
+ vulkanscene model, no license found
+
+indirectdraw:
+ plant model, no license found
+
+hdr:
+pbribl:
+pbrtexture:
+ Require external Vulkan Asset Pack
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+
+---
+ examples/CMakeLists.txt | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index e07918c..08b6e23 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -55,18 +55,12 @@ set(EXAMPLES
+ conditionalrender
+ conservativeraster
+ debugmarker
+- deferred
+- deferredmultisampling
+- deferredshadows
+ descriptorsets
+ displacement
+ distancefieldfonts
+ dynamicuniformbuffer
+ gears
+ geometryshader
+- hdr
+- imgui
+- indirectdraw
+ inlineuniformblocks
+ inputattachments
+ instancing
+@@ -83,23 +77,16 @@ set(EXAMPLES
+ parallaxmapping
+ particlefire
+ pbrbasic
+- pbribl
+- pbrtexture
+ pipelines
+ pipelinestatistics
+ pushconstants
+ pushdescriptors
+ radialblur
+ renderheadless
+- scenerendering
+ screenshot
+- shadowmapping
+- shadowmappingomni
+- shadowmappingcascade
+ skeletalanimation
+ specializationconstants
+ sphericalenvmapping
+- ssao
+ stencilbuffer
+ subpasses
+ terraintessellation
+@@ -113,7 +100,6 @@ set(EXAMPLES
+ texturesparseresidency
+ triangle
+ viewportarray
+- vulkanscene
+ )
+
+ buildExamples()
diff --git a/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
new file mode 100644
index 0000000000..c94e768b52
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
@@ -0,0 +1,44 @@
+DESCRIPTION = "Collection of Vulkan examples"
+LICENSE = "MIT"
+DEPENDS = "zlib"
+
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=dcf473723faabf17baa9b5f2207599d0 \
+ file://examples/triangle/triangle.cpp;endline=12;md5=bccd1bf9cadd9e10086cf7872157e4fa"
+
+SRCREV_glm = "1ad55c5016339b83b7eec98c31007e0aee57d2bf"
+SRCREV_gli = "7da5f50931225e9819a26d5cb323c5f42da50bcd"
+
+SRC_URI = "git://github.com/SaschaWillems/Vulkan.git \
+ git://github.com/g-truc/glm;destsuffix=git/external/glm;name=glm \
+ git://github.com/g-truc/gli;destsuffix=git/external/gli;name=gli \
+ file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \
+ "
+UPSTREAM_CHECK_COMMITS = "1"
+SRCREV = "6d63dc32c320a49be0a56c365151c8f2f176bc59"
+UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
+S = "${WORKDIR}/git"
+
+REQUIRED_DISTRO_FEATURES = 'vulkan'
+
+inherit cmake features_check
+DEPENDS = "vulkan-loader assimp wayland-protocols wayland-native"
+
+do_install_append () {
+ # Remove assets that have uncertain licenses
+ rm ${D}${datadir}/vulkan-demos/models/armor/* \
+ ${D}${datadir}/vulkan-demos/models/sibenik/* \
+ ${D}${datadir}/vulkan-demos/models/vulkanscene* \
+ ${D}${datadir}/vulkan-demos/models/plants.dae \
+ ${D}${datadir}/vulkan-demos/textures/texturearray_plants*
+
+ mv ${D}${bindir}/screenshot ${D}${bindir}/vulkan-screenshot
+}
+
+EXTRA_OECMAKE = "-DRESOURCE_INSTALL_DIR=${datadir}/vulkan-demos"
+
+ANY_OF_DISTRO_FEATURES = "x11 wayland"
+
+# Can only pick one of [wayland,xcb]
+PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb' ,d)}"
+PACKAGECONFIG[wayland] = "-DUSE_WAYLAND_WSI=ON, -DUSE_WAYLAND_WSI=OFF, wayland"
+PACKAGECONFIG[xcb] = ",,libxcb"
diff --git a/meta/recipes-graphics/vulkan/vulkan-headers_1.1.126.0.bb b/meta/recipes-graphics/vulkan/vulkan-headers_1.1.126.0.bb
new file mode 100644
index 0000000000..72c29a72a2
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-headers_1.1.126.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Vulkan Header files and API registry"
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Headers"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=sdk-1.1.126"
+
+SRCREV = "5bc459e2921304c32568b73edaac8d6df5f98b84"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+FILES_${PN} += "${datadir}/vulkan"
+
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
diff --git a/meta/recipes-graphics/vulkan/vulkan-loader_1.1.126.0.bb b/meta/recipes-graphics/vulkan/vulkan-loader_1.1.126.0.bb
new file mode 100644
index 0000000000..504cf85a2b
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-loader_1.1.126.0.bb
@@ -0,0 +1,38 @@
+SUMMARY = "3D graphics and compute API common loader"
+DESCRIPTION = "Vulkan is a new generation graphics and compute API \
+that provides efficient access to modern GPUs. These packages \
+provide only the common vendor-agnostic library loader, headers and \
+the vulkaninfo utility."
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Loader"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=sdk-1.1.126"
+SRCREV = "4adad4ff705fa76f9edb2d37cb57e593decb60ed"
+
+S = "${WORKDIR}/git"
+
+REQUIRED_DISTRO_FEATURES = "vulkan"
+
+inherit cmake features_check
+ANY_OF_DISTRO_FEATURES = "x11 wayland"
+
+DEPENDS += "vulkan-headers"
+
+EXTRA_OECMAKE = "\
+ -DBUILD_TESTS=OFF \
+ -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
+ -DASSEMBLER_WORKS=FALSE \
+ "
+
+# must choose x11 or wayland or both
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+
+PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
+PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
+
+RRECOMMENDS_${PN} = "mesa-vulkan-drivers"
+
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
diff --git a/meta/recipes-graphics/vulkan/vulkan-tools_1.1.126.0.bb b/meta/recipes-graphics/vulkan/vulkan-tools_1.1.126.0.bb
new file mode 100644
index 0000000000..2fd61c989a
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-tools_1.1.126.0.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Vulkan Utilities and Tools"
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Tools"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-1.1.126"
+SRCREV = "09695dfc5dbe54f869aeaff8db93bb7bb6a220e0"
+
+S = "${WORKDIR}/git"
+
+inherit cmake features_check
+ANY_OF_DISTRO_FEATURES = "x11 wayland"
+REQUIRED_DISTRO_FEATURES = "vulkan"
+
+DEPENDS += "vulkan-headers vulkan-loader"
+
+EXTRA_OECMAKE = "\
+ -DBUILD_TESTS=OFF \
+ -DBUILD_CUBE=OFF \
+ -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
+ "
+
+# must choose x11 or wayland or both
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+
+PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
+PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
+
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
diff --git a/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch b/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
deleted file mode 100644
index a0c826ed93..0000000000
--- a/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 3b9b8f5f6d1b99af43e95ec0868404e552a85b73 Mon Sep 17 00:00:00 2001
-From: Emil Velikov <emil.l.velikov@gmail.com>
-Date: Thu, 19 Mar 2015 22:26:11 +0000
-Subject: [PATCH] third_party/threads: Use PTHREAD_MUTEX_RECURSIVE by default
-
-PTHREAD_MUTEX_RECURSIVE_NP was used for compatibility with old glibc.
-Although due to the_GNU_SOURCES define the portable,
-PTHREAD_MUTEX_RECURSIVE will be available for Linuxes since at least
-1998. Simplify things giving us compatibility with musl which
-apparently does not provide the non-portable define.
-
-Inspired by almost identical commit in mesa aead7fe2e2b(c11/threads: Use
-PTHREAD_MUTEX_RECURSIVE by default) by Felix Janda.
-
-Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-Reviewed-by: Chad Versace <chad.versace@intel.com>
----
-Upstream-Status: Backport
-
- third_party/threads/threads_posix.c | 10 ++++------
- 1 file changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/third_party/threads/threads_posix.c b/third_party/threads/threads_posix.c
-index 5835e43..e122bf9 100644
---- a/third_party/threads/threads_posix.c
-+++ b/third_party/threads/threads_posix.c
-@@ -26,6 +26,9 @@
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-+
-+#define _GNU_SOURCE
-+
- #include <stdlib.h>
- #ifndef assert
- #include <assert.h>
-@@ -150,13 +153,8 @@ int mtx_init(mtx_t *mtx, int type)
- && type != (mtx_try|mtx_recursive))
- return thrd_error;
- pthread_mutexattr_init(&attr);
-- if ((type & mtx_recursive) != 0) {
--#if defined(__linux__) || defined(__linux)
-- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
--#else
-+ if ((type & mtx_recursive) != 0)
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
--#endif
-- }
- pthread_mutex_init(mtx, &attr);
- pthread_mutexattr_destroy(&attr);
- return thrd_success;
---
-2.5.2
-
diff --git a/meta/recipes-graphics/waffle/waffle_1.5.2.bb b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
deleted file mode 100644
index f7db1bc955..0000000000
--- a/meta/recipes-graphics/waffle/waffle_1.5.2.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "cross-platform C library to defer selection of GL API and of window system"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \
- file://include/waffle/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf"
-
-SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz \
- file://0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch \
- "
-SRC_URI[md5sum] = "c669c91bf2f7e13a5d781c3dbb30fd8c"
-SRC_URI[sha256sum] = "d2c096cf654bf0061323a4b9231a1ef5b749a1e5c7c5bfe067e964219c2a851c"
-
-UPSTREAM_CHECK_URI = "http://www.waffle-gl.org/releases.html"
-
-inherit cmake distro_features_check lib_package
-
-# This should be overridden per-machine to reflect the capabilities of the GL
-# stack.
-PACKAGECONFIG ??= "glx"
-
-# libx11 requires x11 in DISTRO_FEATURES.
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 'x11', '', d)}"
-
-# I say virtual/libgl, actually wants gl.pc
-PACKAGECONFIG[glx] = "-Dwaffle_has_glx=1,-Dwaffle_has_glx=0,virtual/libgl libx11"
-
-# I say virtual/libgl, actually wants wayland-egl.pc, egl.pc, and the wayland
-# DISTRO_FEATURE.
-PACKAGECONFIG[wayland] = "-Dwaffle_has_wayland=1,-Dwaffle_has_wayland=0,virtual/libgl wayland"
-
-# I say virtual/libgl, actually wants gbm.pc egl.pc
-PACKAGECONFIG[gbm] = "-Dwaffle_has_gbm=1,-Dwaffle_has_gbm=0,virtual/libgl udev"
-
-# I say virtual/libgl, actually wants egl.pc
-PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=1,-Dwaffle_has_x11_egl=0,virtual/libgl libxcb"
-
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindWaffle.cmake \
- ${libdir}/cmake/Waffle/"
diff --git a/meta/recipes-graphics/waffle/waffle_1.6.0.bb b/meta/recipes-graphics/waffle/waffle_1.6.0.bb
new file mode 100644
index 0000000000..52cb1df899
--- /dev/null
+++ b/meta/recipes-graphics/waffle/waffle_1.6.0.bb
@@ -0,0 +1,37 @@
+SUMMARY = "cross-platform C library to defer selection of GL API and of window system"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \
+ file://include/waffle/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf"
+
+SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "61bfc1a478e840825f33ddb4057115e7"
+SRC_URI[sha256sum] = "d9c899f710c50cfdd00f5f4cdfeaef0687d8497362239bdde93bed6c909c81d7"
+
+UPSTREAM_CHECK_URI = "http://www.waffle-gl.org/releases.html"
+
+inherit meson features_check lib_package bash-completion
+
+# This should be overridden per-machine to reflect the capabilities of the GL
+# stack.
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11-egl', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+ surfaceless-egl gbm"
+
+# virtual/libgl requires opengl in DISTRO_FEATURES.
+REQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 'virtual/${MLPREFIX}libgl', 'opengl', '', d)}"
+
+# I say virtual/libgl, actually wants gl.pc
+PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/${MLPREFIX}libgl libx11"
+
+# I say virtual/libgl, actually wants wayland-egl.pc, egl.pc, and the wayland
+# DISTRO_FEATURE.
+PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,virtual/${MLPREFIX}libgl wayland"
+
+# I say virtual/libgl, actually wants gbm.pc egl.pc
+PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled,virtual/${MLPREFIX}libgl udev"
+
+# I say virtual/libgl, actually wants egl.pc
+PACKAGECONFIG[x11-egl] = "-Dx11_egl=enabled,-Dx11_egl=disabled,virtual/${MLPREFIX}libgl libxcb"
+PACKAGECONFIG[surfaceless-egl] = "-Dsurfaceless_egl=enabled,-Dsurfaceless_egl=disabled,virtual/${MLPREFIX}libgl"
+
+# TODO: optionally build manpages and examples
diff --git a/meta/recipes-graphics/wayland/libinput/0001-adjust-for-64bit-time_t-for-32bit-architectures.patch b/meta/recipes-graphics/wayland/libinput/0001-adjust-for-64bit-time_t-for-32bit-architectures.patch
new file mode 100644
index 0000000000..344e6aaf8f
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput/0001-adjust-for-64bit-time_t-for-32bit-architectures.patch
@@ -0,0 +1,386 @@
+From ab6ce09bfb669177c90cc5c10155eec44e9fc34b Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Sat, 23 Nov 2019 17:23:56 -0800
+Subject: [PATCH] Adjust for 64bit time_t for 32bit architectures
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/libinput/libinput/merge_requests/346]
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ meson.build | 1 +
+ src/evdev-mt-touchpad-buttons.c | 15 ++++---
+ src/evdev.c | 5 ++-
+ src/util-input-event.h | 69 +++++++++++++++++++++++++++++++++
+ tools/libinput-record.c | 16 +++++---
+ 5 files changed, 90 insertions(+), 16 deletions(-)
+ create mode 100644 src/util-input-event.h
+
+--- a/meson.build
++++ b/meson.build
+@@ -220,7 +220,8 @@ endif
+ ############ libinput-util.a ############
+ src_libinput_util = [
+ 'src/libinput-util.c',
+- 'src/libinput-util.h'
++ 'src/libinput-util.h',
++ 'src/util-input-event.h'
+ ]
+ libinput_util = static_library('libinput-util',
+ src_libinput_util,
+--- a/src/evdev-mt-touchpad-buttons.c
++++ b/src/evdev-mt-touchpad-buttons.c
+@@ -30,6 +30,7 @@
+ #include <unistd.h>
+ #include "linux/input.h"
+
++#include "util-input-event.h"
+ #include "evdev-mt-touchpad.h"
+
+ #define DEFAULT_BUTTON_ENTER_TIMEOUT ms2us(100)
+@@ -1145,14 +1146,12 @@ tp_notify_clickpadbutton(struct tp_dispa
+ if (tp->buttons.trackpoint) {
+ if (is_topbutton) {
+ struct evdev_dispatch *dispatch = tp->buttons.trackpoint->dispatch;
+- struct input_event event;
+- struct input_event syn_report = {{ 0, 0 }, EV_SYN, SYN_REPORT, 0 };
++ struct input_event event, syn_report;
++ int value;
+
+- event.time = us2tv(time);
+- event.type = EV_KEY;
+- event.code = button;
+- event.value = (state == LIBINPUT_BUTTON_STATE_PRESSED) ? 1 : 0;
+- syn_report.time = event.time;
++ value = (state == LIBINPUT_BUTTON_STATE_PRESSED) ? 1 : 0;
++ event = input_event_init(time, EV_KEY, button, value);
++ syn_report = input_event_init(time, EV_SYN, SYN_REPORT, 0);
+ dispatch->interface->process(dispatch,
+ tp->buttons.trackpoint,
+ &event,
+--- a/src/evdev.c
++++ b/src/evdev.c
+@@ -44,6 +44,7 @@
+ #include "filter.h"
+ #include "libinput-private.h"
+ #include "quirks.h"
++#include "util-input-event.h"
+
+ #if HAVE_LIBWACOM
+ #include <libwacom/libwacom.h>
+@@ -859,7 +860,7 @@ evdev_print_event(struct evdev_device *d
+ {
+ static uint32_t offset = 0;
+ static uint32_t last_time = 0;
+- uint32_t time = us2ms(tv2us(&e->time));
++ uint32_t time = us2ms(input_event_time(e));
+
+ if (offset == 0) {
+ offset = time;
+@@ -891,7 +892,7 @@ static inline void
+ evdev_process_event(struct evdev_device *device, struct input_event *e)
+ {
+ struct evdev_dispatch *dispatch = device->dispatch;
+- uint64_t time = tv2us(&e->time);
++ uint64_t time = input_event_time(e);
+
+ #if 0
+ evdev_print_event(device, e);
+--- /dev/null
++++ b/src/util-input-event.h
+@@ -0,0 +1,69 @@
++/*
++ * Copyright © 2019 Red Hat, Inc.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#pragma once
++
++#include "config.h"
++
++#include "util-time.h"
++#include <linux/input.h>
++
++static inline struct input_event
++input_event_init(uint64_t time,
++ unsigned int code,
++ unsigned int type,
++ int value)
++{
++ struct input_event ev;
++ struct timeval tval = us2tv(time);
++
++ ev.input_event_sec = tval.tv_sec;
++ ev.input_event_usec = tval.tv_usec;
++ ev.type = type;
++ ev.code = code;
++ ev.value = value;
++
++ return ev;
++}
++
++static inline uint64_t
++input_event_time(const struct input_event *e)
++{
++ struct timeval tval;
++
++ tval.tv_sec = e->input_event_sec;
++ tval.tv_usec = e->input_event_usec;
++
++ return tv2us(&tval);
++}
++
++
++static inline void
++input_event_set_time(struct input_event *e,
++ uint64_t time)
++{
++ struct timeval tval = us2tv(time);
++
++ e->input_event_sec = tval.tv_sec;
++ e->input_event_usec = tval.tv_usec;
++}
+--- a/tools/libinput-record.c
++++ b/tools/libinput-record.c
+@@ -41,6 +41,7 @@
+ #include <stdbool.h>
+
+ #include "libinput-versionsort.h"
++#include "util-input-event.h"
+ #include "libinput-util.h"
+ #include "libinput-version.h"
+ #include "libinput-git-version.h"
+@@ -196,8 +197,9 @@ print_evdev_event(struct record_context
+ const char *cname;
+ bool was_modified = false;
+ char desc[1024];
++ uint64_t time = input_event_time(ev) - ctx->offset;
+
+- ev->time = us2tv(tv2us(&ev->time) - ctx->offset);
++ input_event_set_time(ev, time);
+
+ /* Don't leak passwords unless the user wants to */
+ if (!ctx->show_keycodes)
+@@ -215,7 +217,7 @@ print_evdev_event(struct record_context
+ static unsigned long last_ms = 0;
+ unsigned long time, dt;
+
+- time = us2ms(tv2us(&ev->time));
++ time = us2ms(input_event_time(ev));
+ dt = time - last_ms;
+ last_ms = time;
+
+@@ -239,8 +241,8 @@ print_evdev_event(struct record_context
+
+ iprintf(ctx,
+ "- [%3lu, %6u, %3d, %3d, %6d] # %s\n",
+- ev->time.tv_sec,
+- (unsigned int)ev->time.tv_usec,
++ ev->input_event_sec,
++ (unsigned int)ev->input_event_usec,
+ ev->type,
+ ev->code,
+ ev->value,
+@@ -268,16 +270,18 @@ handle_evdev_frame(struct record_context
+ while (libevdev_next_event(evdev,
+ LIBEVDEV_READ_FLAG_NORMAL,
+ &e) == LIBEVDEV_READ_STATUS_SUCCESS) {
++ uint64_t time;
+
+ if (ctx->offset == 0)
+- ctx->offset = tv2us(&e.time);
++ ctx->offset = input_event_time(&e);
+
+ if (d->nevents == d->events_sz)
+ resize(d->events, d->events_sz);
+
+ event = &d->events[d->nevents++];
+ event->type = EVDEV;
+- event->time = tv2us(&e.time) - ctx->offset;
++ time = input_event_time(&e);
++ input_event_set_time(&e, time - ctx->offset);
+ event->u.evdev = e;
+ count++;
+
+--- a/src/libinput-private.h
++++ b/src/libinput-private.h
+@@ -39,6 +39,7 @@
+
+ #include "libinput.h"
+ #include "libinput-util.h"
++#include "util-time.h"
+ #include "libinput-version.h"
+
+ #if LIBINPUT_VERSION_MICRO >= 90
+--- a/src/libinput-util.h
++++ b/src/libinput-util.h
+@@ -206,12 +206,6 @@ clear_bit(unsigned char *array, int bit)
+ array[bit / 8] &= ~(1 << (bit % 8));
+ }
+
+-static inline void
+-msleep(unsigned int ms)
+-{
+- usleep(ms * 1000);
+-}
+-
+ static inline bool
+ long_bit_is_set(const unsigned long *array, int bit)
+ {
+@@ -453,53 +447,6 @@ bool
+ parse_switch_reliability_property(const char *prop,
+ enum switch_reliability *reliability);
+
+-static inline uint64_t
+-us(uint64_t us)
+-{
+- return us;
+-}
+-
+-static inline uint64_t
+-ns2us(uint64_t ns)
+-{
+- return us(ns / 1000);
+-}
+-
+-static inline uint64_t
+-ms2us(uint64_t ms)
+-{
+- return us(ms * 1000);
+-}
+-
+-static inline uint64_t
+-s2us(uint64_t s)
+-{
+- return ms2us(s * 1000);
+-}
+-
+-static inline uint32_t
+-us2ms(uint64_t us)
+-{
+- return (uint32_t)(us / 1000);
+-}
+-
+-static inline uint64_t
+-tv2us(const struct timeval *tv)
+-{
+- return s2us(tv->tv_sec) + tv->tv_usec;
+-}
+-
+-static inline struct timeval
+-us2tv(uint64_t time)
+-{
+- struct timeval tv;
+-
+- tv.tv_sec = time / ms2us(1000);
+- tv.tv_usec = time % ms2us(1000);
+-
+- return tv;
+-}
+-
+ static inline bool
+ safe_atoi_base(const char *str, int *val, int base)
+ {
+--- /dev/null
++++ b/src/util-time.h
+@@ -0,0 +1,84 @@
++/*
++ * Copyright © 2013-2019 Red Hat, Inc.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#pragma once
++
++#include "config.h"
++
++#include <time.h>
++#include <stdint.h>
++#include <unistd.h>
++#include <linux/input.h>
++
++static inline void
++msleep(unsigned int ms)
++{
++ usleep(ms * 1000);
++}
++
++static inline uint64_t
++us(uint64_t us)
++{
++ return us;
++}
++
++static inline uint64_t
++ns2us(uint64_t ns)
++{
++ return us(ns / 1000);
++}
++
++static inline uint64_t
++ms2us(uint64_t ms)
++{
++ return us(ms * 1000);
++}
++
++static inline uint64_t
++s2us(uint64_t s)
++{
++ return ms2us(s * 1000);
++}
++
++static inline uint32_t
++us2ms(uint64_t us)
++{
++ return (uint32_t)(us / 1000);
++}
++
++static inline uint64_t
++tv2us(const struct timeval *tv)
++{
++ return s2us(tv->tv_sec) + tv->tv_usec;
++}
++
++static inline struct timeval
++us2tv(uint64_t time)
++{
++ struct timeval tv;
++
++ tv.tv_sec = time / ms2us(1000);
++ tv.tv_usec = time % ms2us(1000);
++
++ return tv;
++}
diff --git a/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch b/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch
deleted file mode 100644
index b52b4962b3..0000000000
--- a/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-This is a workaround upstream suggests for use with kernel 4.1.
-
-Upstream-Status: Inappropriate [temporary work-around]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-
-
-From: Peter Hutterer <peter.hutterer@who-t.net>
-Date: Mon Aug 3 18:23:12 PDT 2015
-Subject: [PATCH v3 libinput] touchpad: serial synaptics need to fake new touches on TRIPLETAP
-
-On the 4.1 kernels synaptics pretends to have 3 slots (the serial fw only does
-2). This was added to avoid cursor jumps but has since been reverted for 4.2
-(kernel commit dbf3c37086, 4.1.3 is still buggy). In some cases a TRIPLETAP
-may be triggered without slot 2 ever activating.
-
-While there are still those kernels out there, work around this bug by opening
-a new touch point where none exists if the fake finger count exceeds the slot
-count.
-
-Reported-by: Jan Alexander Steffens <jan.steffens at gmail.com>
-Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
-Tested-by: Jan Alexander Steffens <jan.steffens at gmail.com>
-Reviewed-by: Hans de Goede <hdegoede at redhat.com>
----
-Changes to v2:
-- split out the handling instead of having a tmp state variable, see Hans'
- comments from v2
-
-Mainly sending this to the list again so I have a link to point people to.
-If you're on 4.1.x add this patch to your distribution package.
-
- src/evdev-mt-touchpad.c | 22 ++++++++++++++++------
- 1 file changed, 16 insertions(+), 6 deletions(-)
-
-diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
-index a683d9a..5ef03d5 100644
---- a/src/evdev-mt-touchpad.c
-+++ b/src/evdev-mt-touchpad.c
-@@ -369,13 +369,23 @@ tp_restore_synaptics_touches(struct tp_dispatch *tp,
- for (i = 0; i < tp->num_slots; i++) {
- struct tp_touch *t = tp_get_touch(tp, i);
-
-- if (t->state != TOUCH_END)
-+ switch(t->state) {
-+ case TOUCH_HOVERING:
-+ case TOUCH_BEGIN:
-+ case TOUCH_UPDATE:
- continue;
--
-- /* new touch, move it through begin to update immediately */
-- tp_new_touch(tp, t, time);
-- tp_begin_touch(tp, t, time);
-- t->state = TOUCH_UPDATE;
-+ case TOUCH_NONE:
-+ /* new touch, move it through to begin immediately */
-+ tp_new_touch(tp, t, time);
-+ tp_begin_touch(tp, t, time);
-+ break;
-+ case TOUCH_END:
-+ /* touch just ended ,we need need to restore it to update */
-+ tp_new_touch(tp, t, time);
-+ tp_begin_touch(tp, t, time);
-+ t->state = TOUCH_UPDATE;
-+ break;
-+ }
- }
- }
-
---
-2.4.3
-
diff --git a/meta/recipes-graphics/wayland/libinput_1.14.3.bb b/meta/recipes-graphics/wayland/libinput_1.14.3.bb
new file mode 100644
index 0000000000..46d46c54ee
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput_1.14.3.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Library to handle input devices in Wayland compositors"
+DESCRIPTION = "libinput is a library to handle input devices in Wayland \
+compositors and to provide a generic X.Org input driver. It provides \
+device detection, device handling, input device event processing and \
+abstraction so minimize the amount of custom input code compositors need to \
+provide the common set of functionality that users expect."
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+ file://0001-adjust-for-64bit-time_t-for-32bit-architectures.patch \
+"
+SRC_URI[md5sum] = "d052faa64eb6d2e649e582cc0fcf6e32"
+SRC_URI[sha256sum] = "0feb3a0589709cc1032893bfaf4c49150d5360bd9782bec888f9e4dd9044c5b7"
+
+UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
+
+inherit meson pkgconfig lib_package
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom"
+PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3"
+
+UDEVDIR = "`pkg-config --variable=udevdir udev`"
+
+EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \
+ -Ddocumentation=false \
+ -Dtests=false \
+ -Dzshcompletiondir=no"
+
+# package name changed in 1.8.1 upgrade: make sure package upgrades work
+RPROVIDES_${PN} = "libinput"
+RREPLACES_${PN} = "libinput"
+RCONFLICTS_${PN} = "libinput"
diff --git a/meta/recipes-graphics/wayland/libinput_1.4.1.bb b/meta/recipes-graphics/wayland/libinput_1.4.1.bb
deleted file mode 100644
index 3580392260..0000000000
--- a/meta/recipes-graphics/wayland/libinput_1.4.1.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Library to handle input devices in Wayland compositors"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
-
-DEPENDS = "libevdev udev mtdev"
-
-SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
- file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
-"
-SRC_URI[md5sum] = "2e7ba577ed74d8d1baeb07dbd4fb912a"
-SRC_URI[sha256sum] = "26e7b3ab499358caba499705680ea7e5851af2bd37dc32f2be64181610d6392a"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-PACKAGECONFIG[libwacom] = "--enable-libwacom,--disable-libwacom,libwacom"
-PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
-
-UDEVDIR = "`pkg-config --variable=udevdir udev`"
-
-EXTRA_OECONF += "--with-udev-dir=${UDEVDIR}"
diff --git a/meta/recipes-graphics/wayland/mtdev/0001-adjust-for-64bit-time_t-for-32bit-architectures.patch b/meta/recipes-graphics/wayland/mtdev/0001-adjust-for-64bit-time_t-for-32bit-architectures.patch
new file mode 100644
index 0000000000..a0cebe5283
--- /dev/null
+++ b/meta/recipes-graphics/wayland/mtdev/0001-adjust-for-64bit-time_t-for-32bit-architectures.patch
@@ -0,0 +1,77 @@
+From af75e8ee3d12a493b758421b2feed0351fdcbbf0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 23 Nov 2019 13:44:32 -0800
+Subject: [PATCH] adjust for 64bit time_t for 32bit architectures
+
+libc that has support for 32 bit applications to use 64 bit
+time_t supplies __USE_TIME_BITS64 define [1]
+
+[1] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/core.c | 8 +++++++-
+ test/mtdev-test.c | 10 ++++++++--
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/src/core.c b/src/core.c
+index 87ef420..0d91c0b 100644
+--- a/src/core.c
++++ b/src/core.c
+@@ -31,6 +31,11 @@
+ #include "evbuf.h"
+ #include "match.h"
+
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ static inline int istouch(const struct mtdev_slot *data,
+ const struct mtdev *dev)
+ {
+@@ -251,7 +256,8 @@ static void push_slot_changes(struct mtdev_state *state,
+ count++;
+ if (!count)
+ return;
+- ev.time = syn->time;
++ ev.input_event_sec = syn->input_event_sec;
++ ev.input_event_usec = syn->input_event_usec;
+ ev.type = EV_ABS;
+ ev.code = ABS_MT_SLOT;
+ ev.value = slot;
+diff --git a/test/mtdev-test.c b/test/mtdev-test.c
+index 1b3e4f2..773f86a 100644
+--- a/test/mtdev-test.c
++++ b/test/mtdev-test.c
+@@ -30,9 +30,15 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <stdint.h>
++
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
+
+ /* year-proof millisecond event time */
+-typedef __u64 mstime_t;
++typedef uint64_t mstime_t;
+
+ static int use_event(const struct input_event *ev)
+ {
+@@ -47,7 +53,7 @@ static void print_event(const struct input_event *ev)
+ {
+ static const mstime_t ms = 1000;
+ static int slot;
+- mstime_t evtime = ev->time.tv_usec / ms + ev->time.tv_sec * ms;
++ mstime_t evtime = ev->input_event_usec / ms + ev->input_event_sec * ms;
+ if (ev->type == EV_ABS && ev->code == ABS_MT_SLOT)
+ slot = ev->value;
+ fprintf(stderr, "%012llx %02d %01d %04x %d\n",
+--
+2.24.0
+
diff --git a/meta/recipes-graphics/wayland/mtdev_1.1.5.bb b/meta/recipes-graphics/wayland/mtdev_1.1.5.bb
index ccd0ebbfce..aa8bb69966 100644
--- a/meta/recipes-graphics/wayland/mtdev_1.1.5.bb
+++ b/meta/recipes-graphics/wayland/mtdev_1.1.5.bb
@@ -11,7 +11,9 @@ SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6"
-SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2"
+SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2 \
+ file://0001-adjust-for-64bit-time_t-for-32bit-architectures.patch \
+"
SRC_URI[md5sum] = "52c9610b6002f71d1642dc1a1cca5ec1"
SRC_URI[sha256sum] = "6677d5708a7948840de734d8b4675d5980d4561171c5a8e89e54adf7a13eba7f"
diff --git a/meta/recipes-graphics/wayland/wayland-protocols_1.18.bb b/meta/recipes-graphics/wayland/wayland-protocols_1.18.bb
new file mode 100644
index 0000000000..c8bec66a40
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland-protocols_1.18.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Collection of additional Wayland protocols"
+DESCRIPTION = "Wayland protocols that add functionality not \
+available in the Wayland core protocol. Such protocols either add \
+completely new functionality, or extend the functionality of some other \
+protocol either in Wayland core, or some other protocol in \
+wayland-protocols."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
+ file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ "
+SRC_URI[md5sum] = "af38f22d8e233c2f2e00ddc8dcc94694"
+SRC_URI[sha256sum] = "3d73b7e7661763dc09d7d9107678400101ecff2b5b1e531674abfa81e04874b3"
+
+UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
+
+inherit allarch autotools pkgconfig
+
+PACKAGES = "${PN}"
+FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"
diff --git a/meta/recipes-graphics/wayland/wayland-protocols_1.7.bb b/meta/recipes-graphics/wayland/wayland-protocols_1.7.bb
deleted file mode 100644
index 1d2f0db8fe..0000000000
--- a/meta/recipes-graphics/wayland/wayland-protocols_1.7.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Collection of additional Wayland protocols"
-DESCRIPTION = "Wayland protocols that add functionality not \
-available in the Wayland core protocol. Such protocols either add \
-completely new functionality, or extend the functionality of some other \
-protocol either in Wayland core, or some other protocol in \
-wayland-protocols."
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
- file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
- "
-SRC_URI[md5sum] = "9acfc9556f7cfedc44d97af60da66a5f"
-SRC_URI[sha256sum] = "635f2a937d318f1fecb97b54074ca211486e38af943868dd0fa82ea38d091c1f"
-
-inherit allarch autotools pkgconfig
-
-PACKAGES = "${PN}"
-FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"
diff --git a/meta/recipes-graphics/wayland/wayland/0001-scanner-Add-configure-check-for-strndup.patch b/meta/recipes-graphics/wayland/wayland/0001-scanner-Add-configure-check-for-strndup.patch
new file mode 100644
index 0000000000..c4435875ad
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/0001-scanner-Add-configure-check-for-strndup.patch
@@ -0,0 +1,50 @@
+From 3c8b4467a1ca229e72fb5223787ed400a19c65c0 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Fri, 25 Oct 2019 21:03:23 -0500
+Subject: [PATCH] scanner: Add configure check for strndup
+
+Some platforms may not have strndup() (e.g. MinGW), so provide a
+equivalent implementation if it's not found.
+
+Upstream-Status: Accepted [4a1f348c20157db7bd7c759fdeb23fbe8729c571]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ configure.ac | 2 +-
+ src/scanner.c | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8d56f2b..1c99e21 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -63,7 +63,7 @@ fi
+ AC_SUBST(GCC_CFLAGS)
+
+ AC_CHECK_HEADERS([sys/prctl.h])
+-AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate prctl])
++AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate prctl strndup])
+
+ AC_ARG_ENABLE([libraries],
+ [AC_HELP_STRING([--disable-libraries],
+diff --git a/src/scanner.c b/src/scanner.c
+index a94be5d..27004bc 100644
+--- a/src/scanner.c
++++ b/src/scanner.c
+@@ -916,6 +916,17 @@ verify_arguments(struct parse_context *ctx,
+
+ }
+
++#ifndef HAVE_STRNDUP
++char *
++strndup(const char *s, size_t size)
++{
++ char *r = malloc(size + 1);
++ strncpy(r, s, size);
++ r[size] = '\0';
++ return r;
++}
++#endif
++
+ static void
+ end_element(void *data, const XML_Char *name)
+ {
diff --git a/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch b/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch
deleted file mode 100644
index dece95c764..0000000000
--- a/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5516d32e694badca35b6c71b02a3f08f650308bf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 15 Jul 2016 16:23:48 -0700
-Subject: [PATCH] scanner: Use unit32_t instead of uint
-
-uint32_t is C99 defined stdint type
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted
----
- src/scanner.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/scanner.c b/src/scanner.c
-index 5f06e8e..10a4023 100644
---- a/src/scanner.c
-+++ b/src/scanner.c
-@@ -808,7 +808,7 @@ find_enumeration(struct protocol *protocol,
- struct interface *i;
- struct enumeration *e;
- char *enum_name;
-- uint idx = 0, j;
-+ uint32_t idx = 0, j;
-
- for (j = 0; j + 1 < strlen(enum_attribute); j++) {
- if (enum_attribute[j] == '.') {
---
-2.1.4
-
diff --git a/meta/recipes-graphics/wayland/wayland/0002-Move-wl_priv_signal-to-wayland-server-private.h.patch b/meta/recipes-graphics/wayland/wayland/0002-Move-wl_priv_signal-to-wayland-server-private.h.patch
new file mode 100644
index 0000000000..b05b875abb
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/0002-Move-wl_priv_signal-to-wayland-server-private.h.patch
@@ -0,0 +1,166 @@
+From e746f3bf7c8bb2f5dcf9e93edffc23b56eff12d0 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Tue, 5 Nov 2019 09:09:50 -0600
+Subject: [PATCH] Move wl_priv_signal to wayland-server-private.h
+
+Including wayland-server-core.h in wayland-private.h is problematic
+because wayland-private.h is included by wayland-scanner which should be
+able to build against non-POSIX platforms (e.g. MinGW). The only reason
+that wayland-server-core.h was included in wayland-private.h was for the
+wl_private_signal definitions, so move those to a
+wayland-server-private.h file that can be included by both
+wayland-server.c and the tests.
+
+Upstream-Status: Accepted [e7d88f35eb89cf0cc77cbddd834cacc63683a9cc]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ Makefile.am | 3 +-
+ src/wayland-private.h | 22 +--------------
+ src/wayland-server-private.h | 53 ++++++++++++++++++++++++++++++++++++
+ src/wayland-server.c | 1 +
+ tests/newsignal-test.c | 2 +-
+ 5 files changed, 58 insertions(+), 23 deletions(-)
+ create mode 100644 src/wayland-server-private.h
+
+diff --git a/Makefile.am b/Makefile.am
+index f47d055..026d981 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -56,7 +56,8 @@ libwayland_private_la_SOURCES = \
+ src/connection.c \
+ src/wayland-os.c \
+ src/wayland-os.h \
+- src/wayland-private.h
++ src/wayland-private.h \
++ src/wayland-server-private.h
+
+ include_HEADERS = \
+ src/wayland-util.h \
+diff --git a/src/wayland-private.h b/src/wayland-private.h
+index 29516ec..dc7d12f 100644
+--- a/src/wayland-private.h
++++ b/src/wayland-private.h
+@@ -31,11 +31,11 @@
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <stdint.h>
++#include <stdbool.h>
+
+ #define WL_HIDE_DEPRECATED 1
+
+ #include "wayland-util.h"
+-#include "wayland-server-core.h"
+
+ /* Invalid memory address */
+ #define WL_ARRAY_POISON_PTR (void *) 4
+@@ -236,26 +236,6 @@ zalloc(size_t s)
+ return calloc(1, s);
+ }
+
+-struct wl_priv_signal {
+- struct wl_list listener_list;
+- struct wl_list emit_list;
+-};
+-
+-void
+-wl_priv_signal_init(struct wl_priv_signal *signal);
+-
+-void
+-wl_priv_signal_add(struct wl_priv_signal *signal, struct wl_listener *listener);
+-
+-struct wl_listener *
+-wl_priv_signal_get(struct wl_priv_signal *signal, wl_notify_func_t notify);
+-
+-void
+-wl_priv_signal_emit(struct wl_priv_signal *signal, void *data);
+-
+-void
+-wl_priv_signal_final_emit(struct wl_priv_signal *signal, void *data);
+-
+ void
+ wl_connection_close_fds_in(struct wl_connection *connection, int max);
+
+diff --git a/src/wayland-server-private.h b/src/wayland-server-private.h
+new file mode 100644
+index 0000000..23fa458
+--- /dev/null
++++ b/src/wayland-server-private.h
+@@ -0,0 +1,53 @@
++/*
++ * Copyright © 2008-2011 Kristian Høgsberg
++ * Copyright © 2011 Intel Corporation
++ * Copyright © 2013 Jason Ekstrand
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the
++ * next paragraph) shall be included in all copies or substantial
++ * portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ */
++
++#ifndef WAYLAND_SERVER_PRIVATE_H
++#define WAYLAND_SERVER_PRIVATE_H
++
++#include "wayland-server-core.h"
++
++struct wl_priv_signal {
++ struct wl_list listener_list;
++ struct wl_list emit_list;
++};
++
++void
++wl_priv_signal_init(struct wl_priv_signal *signal);
++
++void
++wl_priv_signal_add(struct wl_priv_signal *signal, struct wl_listener *listener);
++
++struct wl_listener *
++wl_priv_signal_get(struct wl_priv_signal *signal, wl_notify_func_t notify);
++
++void
++wl_priv_signal_emit(struct wl_priv_signal *signal, void *data);
++
++void
++wl_priv_signal_final_emit(struct wl_priv_signal *signal, void *data);
++
++#endif
+diff --git a/src/wayland-server.c b/src/wayland-server.c
+index 19f6a76..d6f0206 100644
+--- a/src/wayland-server.c
++++ b/src/wayland-server.c
+@@ -45,6 +45,7 @@
+
+ #include "wayland-util.h"
+ #include "wayland-private.h"
++#include "wayland-server-private.h"
+ #include "wayland-server.h"
+ #include "wayland-os.h"
+
+diff --git a/tests/newsignal-test.c b/tests/newsignal-test.c
+index 47c429b..f3a7bd9 100644
+--- a/tests/newsignal-test.c
++++ b/tests/newsignal-test.c
+@@ -26,7 +26,7 @@
+ #include <assert.h>
+
+ #include "test-runner.h"
+-#include "wayland-private.h"
++#include "wayland-server-private.h"
+
+ static void
+ signal_notify(struct wl_listener *listener, void *data)
diff --git a/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch b/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch
new file mode 100644
index 0000000000..ad3526d984
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch
@@ -0,0 +1,32 @@
+Fix wayland-client and wayland-scanner pc files
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
+
+Index: wayland-1.14.0/src/wayland-client.pc.in
+===================================================================
+--- wayland-1.14.0.orig/src/wayland-client.pc.in
++++ wayland-1.14.0/src/wayland-client.pc.in
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+-pkgdatadir=@datadir@/@PACKAGE@
++pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@
+ libdir=@libdir@
+ includedir=@includedir@
+
+Index: wayland-1.14.0/src/wayland-scanner.pc.in
+===================================================================
+--- wayland-1.14.0.orig/src/wayland-scanner.pc.in
++++ wayland-1.14.0/src/wayland-scanner.pc.in
+@@ -2,7 +2,7 @@ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+ pkgdatadir=@datadir@/@PACKAGE@
+-wayland_scanner=@bindir@/wayland-scanner
++wayland_scanner=wayland-scanner
+
+ Name: Wayland Scanner
+ Description: Wayland scanner
diff --git a/meta/recipes-graphics/wayland/wayland_1.11.0.bb b/meta/recipes-graphics/wayland/wayland_1.11.0.bb
deleted file mode 100644
index 3413406d05..0000000000
--- a/meta/recipes-graphics/wayland/wayland_1.11.0.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Wayland, a protocol between a compositor and clients"
-DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
-as well as a C library implementation of that protocol. The compositor can be \
-a standalone display server running on Linux kernel modesetting and evdev \
-input devices, an X application, or a wayland client itself. The clients can \
-be traditional applications, X servers (rootless or fullscreen) or other \
-display servers."
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
- file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
- file://0001-scanner-Use-unit32_t-instead-of-uint.patch \
- "
-SRC_URI[md5sum] = "fccf680be066e234729d5b69e0bd0fa9"
-SRC_URI[sha256sum] = "9540925f7928becfdf5e3b84c70757f6589bf1ceef09bea78784d8e4772c0db0"
-
-EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
-
-DEPENDS = "expat libxml2 libffi wayland-native"
-
-EXTRA_OECONF = "--disable-documentation --with-host-scanner"
-
-# Wayland installs a M4 macro for other projects to use, which uses the target
-# pkg-config to find files. Replace pkg-config with pkg-config-native.
-do_install_append_class-native() {
- sed -e 's,PKG_CHECK_MODULES(.*),,g' \
- -e 's,$PKG_CONFIG,pkg-config-native,g' \
- -i ${D}/${datadir}/aclocal/wayland-scanner.m4
-}
-
-sysroot_stage_all_append_class-target () {
- rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
- cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
-}
-
-FILES_${PN} = "${libdir}/*${SOLIBS}"
-FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
diff --git a/meta/recipes-graphics/wayland/wayland_1.17.0.bb b/meta/recipes-graphics/wayland/wayland_1.17.0.bb
new file mode 100644
index 0000000000..12916a0c40
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland_1.17.0.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Wayland, a protocol between a compositor and clients"
+DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
+as well as a C library implementation of that protocol. The compositor can be \
+a standalone display server running on Linux kernel modesetting and evdev \
+input devices, an X application, or a wayland client itself. The clients can \
+be traditional applications, X servers (rootless or fullscreen) or other \
+display servers."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
+ file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
+
+DEPENDS = "expat libffi wayland-native"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ file://fixpathinpcfiles.patch \
+ file://0001-scanner-Add-configure-check-for-strndup.patch \
+ file://0002-Move-wl_priv_signal-to-wayland-server-private.h.patch \
+ "
+SRC_URI[md5sum] = "d91f970aea11fd549eae023d06f91af3"
+SRC_URI[sha256sum] = "72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4"
+
+UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "dtd-validation"
+PACKAGECONFIG[dtd-validation] = "--enable-dtd-validation,--disable-dtd-validation,libxml2,,"
+
+EXTRA_OECONF = "--disable-documentation --with-host-scanner"
+EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
+
+# Wayland installs a M4 macro for other projects to use, which uses the target
+# pkg-config to find files. Replace pkg-config with pkg-config-native.
+do_install_append_class-native() {
+ sed -e 's,PKG_CHECK_MODULES(.*),,g' \
+ -e 's,$PKG_CONFIG,pkg-config-native,g' \
+ -i ${D}/${datadir}/aclocal/wayland-scanner.m4
+}
+
+sysroot_stage_all_append_class-target () {
+ rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
+ cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
+}
+
+FILES_${PN} = "${libdir}/*${SOLIBS}"
+FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 291cd16b2a..e3e739e2b7 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,24 +1,36 @@
SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
SRC_URI = "file://init \
- file://weston.service \
+ file://weston.ini \
+ file://weston@.service \
+ file://71-weston-drm.rules \
file://weston-start"
S = "${WORKDIR}"
do_install() {
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
- install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service
-
+ install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
+
+ # Install Weston systemd service and accompanying udev rule
+ install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service
+ sed -i -e s:/etc:${sysconfdir}:g \
+ -e s:/usr/bin:${bindir}:g \
+ -e s:/var:${localstatedir}:g \
+ ${D}${systemd_unitdir}/system/weston@.service
+ install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \
+ ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules
# Install weston-start script
install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
}
-inherit allarch update-rc.d distro_features_check systemd
+inherit update-rc.d features_check systemd
# rdepends on weston which depends on virtual/egl
REQUIRED_DISTRO_FEATURES = "opengl"
@@ -28,4 +40,10 @@ RDEPENDS_${PN} = "weston kbd"
INITSCRIPT_NAME = "weston"
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
-SYSTEMD_SERVICE_${PN} = "weston.service"
+FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service"
+
+CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini"
+
+SYSTEMD_SERVICE_${PN} = "weston@%i.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
diff --git a/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules b/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules
new file mode 100644
index 0000000000..1a1b8bbda4
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules
@@ -0,0 +1,2 @@
+ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fb0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service"
+ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service"
diff --git a/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini b/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini
new file mode 100644
index 0000000000..17ebd7fdab
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini
@@ -0,0 +1,2 @@
+[core]
+backend=fbdev-backend.so
diff --git a/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini b/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini
new file mode 100644
index 0000000000..17ebd7fdab
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini
@@ -0,0 +1,2 @@
+[core]
+backend=fbdev-backend.so
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
index e72fbaaac4..ccc7093425 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -5,8 +5,8 @@
export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
usage() {
- cat <<EOF
- $0 [<openvt arguments>] [-- <weston options>]
+ cat <<EOF
+ $0 [<openvt arguments>] [-- <weston options>]
EOF
}
@@ -27,10 +27,19 @@ if [ -n "$WAYLAND_DISPLAY" ]; then
echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
exit 1
fi
+
+if [ -n "$WESTON_USER" ]; then
+ if [ -z "$WESTON_TTY" ]; then
+ echo "ERROR: If you have WESTON_USER variable set, you also need WESTON_TTY."
+ exit 1
+ fi
+ weston_args_user="-u $WESTON_USER -t $WESTON_TTY"
+fi
+
if [ -n "$DISPLAY" ]; then
launcher="weston"
else
- launcher="weston-launch --"
+ launcher="weston-launch $weston_args_user --"
fi
openvt_args="-s"
@@ -59,11 +68,15 @@ if [ -d "$modules_dir" ]; then
fi
if test -z "$XDG_RUNTIME_DIR"; then
- export XDG_RUNTIME_DIR=/run/user/`id -u`
- if ! test -d "$XDG_RUNTIME_DIR"; then
- mkdir --parents $XDG_RUNTIME_DIR
- chmod 0700 $XDG_RUNTIME_DIR
- fi
+ export XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}`
+ if ! test -d "$XDG_RUNTIME_DIR"; then
+ mkdir --parents $XDG_RUNTIME_DIR
+ chmod 0700 $XDG_RUNTIME_DIR
+ fi
+ if [ -n "$WESTON_USER" ]
+ then
+ chown $WESTON_USER:$WESTON_USER $XDG_RUNTIME_DIR
+ fi
fi
exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.ini b/meta/recipes-graphics/wayland/weston-init/weston.ini
new file mode 100644
index 0000000000..1eecf48bc1
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston.ini
@@ -0,0 +1,74 @@
+# configuration file for Weston
+
+#[core]
+#modules=xwayland.so,cms-colord.so
+#shell=desktop-shell.so
+#gbm-format=xrgb2101010
+
+#[shell]
+#background-image=/usr/share/backgrounds/gnome/Aqua.jpg
+#background-color=0xff002244
+#background-type=tile
+#clock-format=minutes
+#panel-color=0x90ff0000
+#locking=true
+#animation=zoom
+#startup-animation=fade
+#binding-modifier=ctrl
+#num-workspaces=6
+#cursor-theme=whiteglass
+#cursor-size=24
+
+#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
+#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg
+#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg
+#animation=fade
+
+#[launcher]
+#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
+#path=/usr/bin/gnome-terminal
+
+#[launcher]
+#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
+#path=/usr/bin/weston-terminal
+
+#[launcher]
+#icon=/usr/share/icons/hicolor/24x24/apps/google-chrome.png
+#path=/usr/bin/google-chrome
+
+#[launcher]
+#icon=/usr/share/icons/gnome/24x24/apps/arts.png
+#path=/build/weston-0lEgCh/weston-1.11.0/weston-flower
+
+#[input-method]
+#path=/usr/lib/weston/weston-keyboard
+
+#[output]
+#name=LVDS1
+#mode=1680x1050
+#transform=90
+#icc_profile=/usr/share/color/icc/colord/Bluish.icc
+
+#[output]
+#name=VGA1
+#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
+#transform=flipped
+
+#[output]
+#name=X1
+#mode=1024x768
+#transform=flipped-90
+
+#[libinput]
+#enable_tap=true
+
+#[touchpad]
+#constant_accel_factor = 50
+#min_accel_factor = 0.16
+#max_accel_factor = 1.0
+
+#[screen-share]
+#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
+
+#[xwayland]
+#path=/usr/bin/Xwayland
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
deleted file mode 100644
index 689ce41064..0000000000
--- a/meta/recipes-graphics/wayland/weston-init/weston.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Weston Wayland Compositor
-RequiresMountsFor=/run
-
-[Service]
-User=root
-EnvironmentFile=-/etc/default/weston
-ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/meta/recipes-graphics/wayland/weston-init/weston@.service b/meta/recipes-graphics/wayland/weston-init/weston@.service
new file mode 100644
index 0000000000..9ecf2ab069
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston@.service
@@ -0,0 +1,37 @@
+[Unit]
+Description=Weston Wayland Compositor (on tty7)
+RequiresMountsFor=/run
+Conflicts=getty@tty7.service plymouth-quit.service
+After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service
+
+[Service]
+User=%i
+PermissionsStartOnly=true
+
+# Log us in via PAM so we get our XDG & co. environment and
+# are treated as logged in so we can use the tty:
+PAMName=login
+
+# Grab tty7
+UtmpIdentifier=tty7
+TTYPath=/dev/tty7
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+
+# stderr to journal so our logging doesn't get thrown into /dev/null
+StandardOutput=tty
+StandardInput=tty
+StandardError=journal
+
+EnvironmentFile=-/etc/default/weston
+
+# Weston does not successfully change VT, nor does systemd place us on
+# the VT it just activated for us. Switch manually:
+ExecStartPre=/usr/bin/chvt 7
+ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log $OPTARGS
+
+IgnoreSIGPIPE=no
+
+#[Install]
+#Alias=multi-user.target.wants/weston.service
diff --git a/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch b/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
deleted file mode 100644
index 00118d78bb..0000000000
--- a/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1cfc1434a5d385a74de593ec7601674dba39e2fe Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 11 May 2016 16:16:30 +0300
-Subject: [PATCH] configure.ac: Fix wayland-protocols path
-
-The wayland-protocols directory is used during build: Fix the path
-to point to sysroot specified in recipe.
-
-Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
-breaks multilib weston as it would point to multilib sysroot when the
-(allarch) wayland-protocols is actually in the machine sysroot.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Inappropriate [embedded specific]
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index bc7c329..15a05d3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
- PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
-
- PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
-- [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
-+ [ac_wayland_protocols_pkgdatadir=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
-
- AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],,
---
-2.1.4
-
diff --git a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
deleted file mode 100644
index 148848d8d2..0000000000
--- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 May 2015 20:56:00 -0700
-Subject: [PATCH weston] make error() portable
-
-error() is not posix but gnu extension so may not be available on all
-kind of systemsi e.g. musl.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- configure.ac | 2 ++
- src/weston-error.h | 20 ++++++++++++++++++++
- src/weston-launch.c | 2 +-
- 3 files changed, 23 insertions(+), 1 deletion(-)
- create mode 100644 src/weston-error.h
-
-diff --git a/configure.ac b/configure.ac
-index 263fc22..f52cd62 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -57,6 +57,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
- [[#include <time.h>]])
- AC_CHECK_HEADERS([execinfo.h])
-
-+AC_CHECK_HEADERS([error.h])
-+
- AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
-
- COMPOSITOR_MODULES="wayland-server >= 1.7.93 pixman-1 >= 0.25.2"
-diff --git a/src/weston-error.h b/src/weston-error.h
-new file mode 100644
-index 0000000..2089d02
---- /dev/null
-+++ b/src/weston-error.h
-@@ -0,0 +1,20 @@
-+#ifndef _WESTON_ERROR_H
-+#define _WESTON_ERROR_H
-+
-+#if defined(HAVE_ERROR_H)
-+#include <error.h>
-+#else
-+#include <err.h>
-+#include <string.h>
-+#define _weston_error(S, E, F, ...) do { \
-+ if (E) \
-+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
-+ else \
-+ err(S, F, ##__VA_ARGS__); \
-+} while(0)
-+
-+#define error _weston_error
-+#endif
-+
-+#endif
-+
-diff --git a/src/weston-launch.c b/src/weston-launch.c
-index 10c66de..3e6d30a 100644
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
-@@ -30,7 +30,6 @@
- #include <poll.h>
- #include <errno.h>
-
--#include <error.h>
- #include <getopt.h>
-
- #include <sys/types.h>
-@@ -56,6 +55,7 @@
- #endif
-
- #include "weston-launch.h"
-+#include "weston-error.h"
-
- #define DRM_MAJOR 226
-
---
-2.1.4
-
diff --git a/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch b/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
deleted file mode 100644
index 91ef727d32..0000000000
--- a/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ba02b8abe4e2afac2bfbf2559972d5059d75a041 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 16 Jul 2016 22:50:19 +0300
-Subject: [PATCH weston] shared: include stdint.h for int32_t
-
-This fixes build on musl.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted
----
- shared/xalloc.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/shared/xalloc.h b/shared/xalloc.h
-index 85fccb4..484de2d 100644
---- a/shared/xalloc.h
-+++ b/shared/xalloc.h
-@@ -30,6 +30,7 @@
- extern "C" {
- #endif
-
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
-
---
-2.1.4
-
diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
index 5542036be2..e50845b17a 100644
--- a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
+++ b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -1,6 +1,6 @@
-From d02226b3d5872b184c1d50c7f4706ac9467ffb81 Mon Sep 17 00:00:00 2001
+From 682b7d79a7b81ec8e38760381104b24ad549e8c0 Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
-Date: Fri, 15 Jul 2016 11:00:15 +0300
+Date: Wed, 22 Feb 2017 15:53:30 +0200
Subject: [PATCH] weston-launch: Provide a default version that doesn't require
PAM
@@ -13,47 +13,52 @@ without non-root-user support.
Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Signed-off-by: Denys Dmytriyenko <denys@ti.com>
+Signed-off-by: Ming Liu <ming.liu@toradex.com>
---
- configure.ac | 9 +++++++--
- src/weston-launch.c | 20 ++++++++++++++++++++
- 2 files changed, 27 insertions(+), 2 deletions(-)
+ libweston/meson.build | 16 ++++++++++++----
+ libweston/weston-launch.c | 21 +++++++++++++++++++++
+ meson_options.txt | 7 +++++++
+ 3 files changed, 40 insertions(+), 4 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 32fdde7..240966f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -416,13 +416,17 @@ AC_ARG_ENABLE(resize-optimization,
- AS_IF([test "x$enable_resize_optimization" = "xyes"],
- [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
-
-+AC_ARG_WITH(pam,
-+ AS_HELP_STRING([--with-pam], [Use PAM]),
-+ [use_pam=$withval], [use_pam=yes])
- AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
- AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
--if test x$enable_weston_launch == xyes; then
-+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then
- WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
- if test x$have_pam == xno; then
-- AC_ERROR([weston-launch requires pam])
-+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found])
- fi
-+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available])
- fi
-
- AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
-@@ -673,6 +677,7 @@ AC_MSG_RESULT([
- Enable developer documentation ${enable_devdocs}
-
- weston-launch utility ${enable_weston_launch}
-+ PAM support ${use_pam}
- systemd-login support ${have_systemd_login}
- systemd notify support ${enable_systemd_notify}
-
-diff --git a/src/weston-launch.c b/src/weston-launch.c
-index b8b2ba0..a865061 100644
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
+diff --git a/libweston/meson.build b/libweston/meson.build
+index d8d3fc0..326683f 100644
+--- a/libweston/meson.build
++++ b/libweston/meson.build
+@@ -199,16 +199,24 @@ dep_vertex_clipping = declare_dependency(
+ )
+
+ if get_option('weston-launch')
+- dep_pam = cc.find_library('pam')
++ deps_weston_launch = [systemd_dep, dep_libdrm]
+
+- if not cc.has_function('pam_open_session', dependencies: dep_pam)
+- error('pam_open_session not found for weston-launch')
++ if get_option('pam')
++ dep_pam = cc.find_library('pam')
++ if not cc.has_function('pam_open_session', dependencies: dep_pam)
++ error('pam_open_session not found for weston-launch')
++ endif
++
++ if dep_pam.found()
++ deps_weston_launch += dep_pam
++ config_h.set('HAVE_PAM', '1')
++ endif
+ endif
+
+ executable(
+ 'weston-launch',
+ 'weston-launch.c',
+- dependencies: [dep_pam, systemd_dep, dep_libdrm],
++ dependencies: deps_weston_launch,
+ include_directories: include_directories('..'),
+ install: true
+ )
+diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
+index 4962bd6..fc531c5 100644
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
@@ -51,7 +51,9 @@
#include <pwd.h>
@@ -64,7 +69,7 @@ index b8b2ba0..a865061 100644
#ifdef HAVE_SYSTEMD_LOGIN
#include <systemd/sd-login.h>
-@@ -93,8 +95,10 @@ drmSetMaster(int drm_fd)
+@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd)
#endif
struct weston_launch {
@@ -75,7 +80,7 @@ index b8b2ba0..a865061 100644
int tty;
int ttynr;
int sock[2];
-@@ -181,6 +185,7 @@ weston_launch_allowed(struct weston_launch *wl)
+@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl)
return false;
}
@@ -83,7 +88,7 @@ index b8b2ba0..a865061 100644
static int
pam_conversation_fn(int msg_count,
const struct pam_message **messages,
-@@ -221,6 +226,7 @@ setup_pam(struct weston_launch *wl)
+@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl)
return 0;
}
@@ -91,7 +96,7 @@ index b8b2ba0..a865061 100644
static int
setup_launcher_socket(struct weston_launch *wl)
-@@ -414,6 +420,7 @@ quit(struct weston_launch *wl, int status)
+@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status)
close(wl->signalfd);
close(wl->sock[0]);
@@ -99,7 +104,7 @@ index b8b2ba0..a865061 100644
if (wl->new_user) {
err = pam_close_session(wl->ph, 0);
if (err)
-@@ -421,6 +428,7 @@ quit(struct weston_launch *wl, int status)
+@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status)
err, pam_strerror(wl->ph, err));
pam_end(wl->ph, err);
}
@@ -107,7 +112,7 @@ index b8b2ba0..a865061 100644
if (ioctl(wl->tty, KDSKBMUTE, 0) &&
ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
-@@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl)
+@@ -660,6 +668,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
setenv("HOME", wl->pw->pw_dir, 1);
setenv("SHELL", wl->pw->pw_shell, 1);
@@ -115,25 +120,26 @@ index b8b2ba0..a865061 100644
env = pam_getenvlist(wl->ph);
if (env) {
for (i = 0; env[i]; ++i) {
-@@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl)
+@@ -668,6 +677,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
}
free(env);
}
+#endif
- }
- static void
-@@ -665,7 +675,9 @@ static void
+ /*
+ * We open a new session, so it makes sense
+@@ -739,8 +749,10 @@ static void
help(const char *name)
{
fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
+#ifdef HAVE_PAM
- fprintf(stderr, " -u, --user Start session as specified username\n");
+ fprintf(stderr, " -u, --user Start session as specified username,\n"
+ " e.g. -u joe, requires root.\n");
+#endif
- fprintf(stderr, " -t, --tty Start session on alternative tty\n");
+ fprintf(stderr, " -t, --tty Start session on alternative tty,\n"
+ " e.g. -t /dev/tty4, requires -u option.\n");
fprintf(stderr, " -v, --verbose Be verbose\n");
- fprintf(stderr, " -h, --help Display this help message\n");
-@@ -678,7 +690,9 @@ main(int argc, char *argv[])
+@@ -754,7 +766,9 @@ main(int argc, char *argv[])
int i, c;
char *tty = NULL;
struct option opts[] = {
@@ -143,21 +149,24 @@ index b8b2ba0..a865061 100644
{ "tty", required_argument, NULL, 't' },
{ "verbose", no_argument, NULL, 'v' },
{ "help", no_argument, NULL, 'h' },
-@@ -690,9 +704,13 @@ main(int argc, char *argv[])
- while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) {
+@@ -766,11 +780,16 @@ main(int argc, char *argv[])
+ while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) {
switch (c) {
case 'u':
+#ifdef HAVE_PAM
wl.new_user = optarg;
- if (getuid() != 0)
- error(1, 0, "Permission denied. -u allowed for root only");
+ if (getuid() != 0) {
+ fprintf(stderr, "weston: Permission denied. -u allowed for root only\n");
+ exit(EXIT_FAILURE);
+ }
+#else
-+ error(1, 0, "-u is unsupported in this weston-launch build");
++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n");
++ exit(EXIT_FAILURE);
+#endif
break;
case 't':
tty = optarg;
-@@ -730,8 +748,10 @@ main(int argc, char *argv[])
+@@ -822,8 +841,10 @@ main(int argc, char *argv[])
if (setup_tty(&wl, tty) < 0)
exit(EXIT_FAILURE);
@@ -168,6 +177,24 @@ index b8b2ba0..a865061 100644
if (setup_launcher_socket(&wl) < 0)
exit(EXIT_FAILURE);
+diff --git a/meson_options.txt b/meson_options.txt
+index d5bf1d5..254eb2b 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -73,6 +73,13 @@ option(
+ )
+
+ option(
++ 'pam',
++ type: 'boolean',
++ value: true,
++ description: 'Define if PAM is available'
++)
++
++option(
+ 'xwayland',
+ type: 'boolean',
+ value: true,
--
-2.1.4
+2.7.4
diff --git a/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch b/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
deleted file mode 100644
index 0c408a43d6..0000000000
--- a/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e8b615250f700f7854b423aaaf0a0aeea92c05a9 Mon Sep 17 00:00:00 2001
-From: Tom Hochstein <tom.hochstein@nxp.com>
-Date: Sat, 7 May 2016 08:51:58 -0300
-Subject: [PATCH] weston-launch: Handle invalid command line options
-Organization: O.S. Systems Software LTDA.
-
-Exit the program if an unrecognized command line option is found.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
-
- src/weston-launch.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/weston-launch.c b/src/weston-launch.c
-index b8dfb17..9987d8e 100644
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
-@@ -703,6 +703,8 @@ main(int argc, char *argv[])
- case 'h':
- help("weston-launch");
- exit(EXIT_FAILURE);
-+ default:
-+ exit(EXIT_FAILURE);
- }
- }
-
---
-2.8.2
-
diff --git a/meta/recipes-graphics/wayland/weston_1.11.0.bb b/meta/recipes-graphics/wayland/weston_1.11.0.bb
deleted file mode 100644
index 3ad309dab6..0000000000
--- a/meta/recipes-graphics/wayland/weston_1.11.0.bb
+++ /dev/null
@@ -1,117 +0,0 @@
-SUMMARY = "Weston, a Wayland compositor"
-DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
- file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
- file://weston.png \
- file://weston.desktop \
- file://0001-make-error-portable.patch \
- file://0001-configure.ac-Fix-wayland-protocols-path.patch \
- file://0001-shared-include-stdint.h-for-int32_t.patch \
- file://xwayland.weston-start \
- file://make-weston-launch-exit-for-unrecognized-option.patch \
- file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
-"
-SRC_URI[md5sum] = "bc6f90a2039163804aecfa663b69c4c2"
-SRC_URI[sha256sum] = "05e086e9f186a06843b9f7a5e1abf19347b1a6e4be26d7e74927abc17b6b7125"
-
-inherit autotools pkgconfig useradd distro_features_check
-# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
-DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
-
-EXTRA_OECONF = "--enable-setuid-install \
- --disable-rpi-compositor \
- --disable-rdp-compositor \
- WAYLAND_PROTOCOLS_SYSROOT_DIR=${STAGING_DIR}/${MACHINE} \
- "
-EXTRA_OECONF[vardepsexclude] = "MACHINE"
-
-EXTRA_OECONF_append_qemux86 = "\
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
-EXTRA_OECONF_append_qemux86-64 = "\
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- clients launch"
-#
-# Compositor choices
-#
-# Weston on KMS
-PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
-# Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
-# Weston on X11
-PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
-# Headless Weston
-PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
-# Weston on framebuffer
-PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
-# weston-launch
-PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
-# VA-API desktop recorder
-PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
-# Weston with EGL support
-PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
-# Weston with cairo glesv2 support
-PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
-# Weston with lcms support
-PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
-# Weston with webp support
-PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
-# Weston with unwinding support
-PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
-# Weston with systemd-login support
-PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
-# Weston with Xwayland support (requires X11 and Wayland)
-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
-# colord CMS support
-PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
-# Clients support
-PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
-# Weston with PAM support
-PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
-
-do_install_append() {
- # Weston doesn't need the .la files to load modules, so wipe them
- rm -f ${D}/${libdir}/weston/*.la
-
- # If X11, ship a desktop file to launch it
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
- install -d ${D}${datadir}/applications
- install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
-
- install -d ${D}${datadir}/icons/hicolor/48x48/apps
- install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
- fi
-
- if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
- install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
- fi
-}
-
-PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)}"
-PACKAGES += "${PN}-examples"
-
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
-FILES_${PN}-examples = "${bindir}/*"
-
-FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so"
-RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
-
-RDEPENDS_${PN} += "xkeyboard-config"
-RRECOMMENDS_${PN} = "liberation-fonts"
-RRECOMMENDS_${PN}-dev += "wayland-protocols"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/meta/recipes-graphics/wayland/weston_7.0.0.bb b/meta/recipes-graphics/wayland/weston_7.0.0.bb
new file mode 100644
index 0000000000..e6548d3541
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston_7.0.0.bb
@@ -0,0 +1,111 @@
+SUMMARY = "Weston, a Wayland compositor"
+DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
+ file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ file://weston.png \
+ file://weston.desktop \
+ file://xwayland.weston-start \
+ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+"
+SRC_URI[md5sum] = "cbfda483bc2501d0831af3f33c707850"
+SRC_URI[sha256sum] = "a00a6d207b6a45f95f4401c604772a307c3767e5e2beecf3d879110c43909a64"
+
+UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
+
+inherit meson pkgconfig useradd features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
+
+WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
+
+EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
+ ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
+ clients launch"
+#
+# Compositor choices
+#
+# Weston on KMS
+PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
+# Weston on Wayland (nested Weston)
+PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
+# Weston on X11
+PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
+# Headless Weston
+PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
+# Weston on framebuffer
+PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
+# weston-launch
+PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
+# VA-API desktop recorder
+PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
+# Weston with EGL support
+PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
+# Weston with lcms support
+PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
+# Weston with webp support
+PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
+# Weston with systemd-login support
+PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
+# Weston with Xwayland support (requires X11 and Wayland)
+PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
+# colord CMS support
+PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
+# Clients support
+PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
+# Virtual remote output with GStreamer on DRM backend
+PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0"
+# Weston with PAM support
+PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
+
+do_install_append() {
+ # Weston doesn't need the .la files to load modules, so wipe them
+ rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
+
+ # If X11, ship a desktop file to launch it
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
+ install -d ${D}${datadir}/applications
+ install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
+
+ install -d ${D}${datadir}/icons/hicolor/48x48/apps
+ install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
+ fi
+
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
+ install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
+ fi
+
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
+ chmod u+s ${D}${bindir}/weston-launch
+ fi
+}
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
+ libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
+
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+
+FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
+SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
+
+FILES_${PN}-examples = "${bindir}/*"
+
+FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
+RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "weston-init liberation-fonts"
+RRECOMMENDS_${PN}-dev += "wayland-protocols"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults
deleted file mode 100644
index f5b69dd516..0000000000
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults
+++ /dev/null
@@ -1,3 +0,0 @@
-Rxvt*scrollBar_right: true
-Rxvt*font: xft:Mono:pixelsize=9
-
diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh
deleted file mode 100644
index a9d102c746..0000000000
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-# kdrive 1.4 does not have default keymap in server
-#xmodmap - </etc/X11/default.xmodmap
diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap b/meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap
deleted file mode 100644
index 05a13fa3c8..0000000000
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap
+++ /dev/null
@@ -1,260 +0,0 @@
-keycode 8 =
-keycode 9 = Escape
-keycode 10 = 1 exclam
-keycode 11 = 2 at
-keycode 12 = 3 numbersign
-keycode 13 = 4 dollar
-keycode 14 = 5 percent
-keycode 15 = 6 asciicircum
-keycode 16 = 7 ampersand braceleft
-keycode 17 = 8 asterisk bracketleft
-keycode 18 = 9 parenleft bracketright
-keycode 19 = 0 parenright braceright
-keycode 20 = minus underscore backslash
-keycode 21 = equal plus
-keycode 22 = BackSpace
-keycode 23 = Tab
-keycode 24 = q Q q
-keycode 25 = w W w
-keycode 26 = e E
-keycode 27 = r R r
-keycode 28 = t T t
-keycode 29 = y Y y
-keycode 30 = u U u
-keycode 31 = i I i
-keycode 32 = o O o
-keycode 33 = p P p
-keycode 34 = bracketleft braceleft
-keycode 35 = bracketright braceright asciitilde
-keycode 36 = Return
-keycode 37 = Control_L
-keycode 38 = a A
-keycode 39 = s S s
-keycode 40 = d D
-keycode 41 = f F
-keycode 42 = g G g
-keycode 43 = h H h
-keycode 44 = j J j
-keycode 45 = k K k
-keycode 46 = l L l
-keycode 47 = semicolon colon
-keycode 48 = apostrophe quotedbl
-keycode 49 = grave asciitilde
-keycode 50 = Shift_L
-keycode 51 = backslash bar
-keycode 52 = z Z z
-keycode 53 = x X x
-keycode 54 = c C
-keycode 55 = v V v
-keycode 56 = b B
-keycode 57 = n N n
-keycode 58 = m M m
-keycode 59 = comma less
-keycode 60 = period greater
-keycode 61 = slash question
-keycode 62 = Shift_R
-keycode 63 = KP_Multiply
-keycode 64 = Alt_L
-keycode 65 = space
-keycode 66 = Caps_Lock
-keycode 67 = F1 F11
-keycode 68 = F2 F12
-keycode 69 = F3 F13
-keycode 70 = F4 F14
-keycode 71 = F5 F15
-keycode 72 = F6 F16
-keycode 73 = F7 F17
-keycode 74 = F8 F18
-keycode 75 = F9 F19
-keycode 76 = F10 F20
-keycode 77 = Num_Lock
-keycode 78 = Scroll_Lock
-keycode 79 = KP_7
-keycode 80 = KP_8
-keycode 81 = KP_9
-keycode 82 = KP_Subtract
-keycode 83 = KP_4
-keycode 84 = KP_5
-keycode 85 = KP_6
-keycode 86 = KP_Add
-keycode 87 = KP_1
-keycode 88 = KP_2
-keycode 89 = KP_3
-keycode 90 = KP_0
-keycode 91 = KP_Decimal
-keycode 92 =
-keycode 93 =
-keycode 94 = less greater bar
-keycode 95 = F11
-keycode 96 = F12
-keycode 97 =
-keycode 98 =
-keycode 99 =
-keycode 100 =
-keycode 101 =
-keycode 102 =
-keycode 103 =
-keycode 104 = KP_Enter
-keycode 105 = Control_R
-keycode 106 = KP_Divide
-keycode 107 =
-keycode 108 = Mode_switch
-keycode 109 = Break
-keycode 110 = Home
-keycode 111 = Up
-keycode 112 = Prior
-keycode 113 = Left
-keycode 114 = Right
-keycode 115 = End
-keycode 116 = Down
-keycode 117 = Next
-keycode 118 = Insert
-keycode 119 = Delete
-keycode 120 = Menu
-keycode 121 = F13
-keycode 122 = F14
-keycode 123 = Help
-keycode 124 = Execute
-keycode 125 = F17
-keycode 126 = KP_Subtract
-keycode 127 = Pause
-keycode 128 =
-keycode 129 =
-keycode 130 =
-keycode 131 =
-keycode 132 =
-keycode 133 =
-keycode 134 =
-keycode 135 =
-keycode 136 =
-keycode 137 =
-keycode 138 =
-keycode 139 =
-keycode 140 =
-keycode 141 =
-keycode 142 =
-keycode 143 =
-keycode 144 =
-keycode 145 =
-keycode 146 =
-keycode 147 =
-keycode 148 =
-keycode 149 =
-keycode 150 =
-keycode 151 =
-keycode 152 =
-keycode 153 =
-keycode 154 =
-keycode 155 =
-keycode 156 =
-keycode 157 =
-keycode 158 =
-keycode 159 =
-keycode 160 =
-keycode 161 =
-keycode 162 =
-keycode 163 =
-keycode 164 =
-keycode 165 =
-keycode 166 =
-keycode 167 =
-keycode 168 =
-keycode 169 =
-keycode 170 =
-keycode 171 =
-keycode 172 =
-keycode 173 =
-keycode 174 =
-keycode 175 =
-keycode 176 =
-keycode 177 =
-keycode 178 =
-keycode 179 =
-keycode 180 =
-keycode 181 =
-keycode 182 =
-keycode 183 =
-keycode 184 =
-keycode 185 =
-keycode 186 =
-keycode 187 =
-keycode 188 =
-keycode 189 =
-keycode 190 =
-keycode 191 =
-keycode 192 =
-keycode 193 =
-keycode 194 =
-keycode 195 =
-keycode 196 =
-keycode 197 =
-keycode 198 =
-keycode 199 =
-keycode 200 =
-keycode 201 =
-keycode 202 =
-keycode 203 =
-keycode 204 =
-keycode 205 =
-keycode 206 =
-keycode 207 =
-keycode 208 =
-keycode 209 =
-keycode 210 =
-keycode 211 =
-keycode 212 =
-keycode 213 =
-keycode 214 =
-keycode 215 =
-keycode 216 =
-keycode 217 =
-keycode 218 =
-keycode 219 =
-keycode 220 =
-keycode 221 =
-keycode 222 =
-keycode 223 =
-keycode 224 =
-keycode 225 =
-keycode 226 =
-keycode 227 =
-keycode 228 =
-keycode 229 =
-keycode 230 =
-keycode 231 =
-keycode 232 =
-keycode 233 =
-keycode 234 =
-keycode 235 =
-keycode 236 =
-keycode 237 =
-keycode 238 =
-keycode 239 =
-keycode 240 =
-keycode 241 =
-keycode 242 =
-keycode 243 =
-keycode 244 =
-keycode 245 =
-keycode 246 =
-keycode 247 =
-keycode 248 =
-keycode 249 =
-keycode 250 =
-keycode 251 =
-keycode 252 =
-keycode 253 =
-keycode 254 =
-
-add shift = Shift_L
-add shift = Shift_R
-add shift = Menu
-add lock = Caps_Lock
-add control = Control_L
-add control = Control_R
-add mod1 = Alt_L
-add mod2 = Num_Lock
-!mod3
-add mod4 = Mode_switch
-!mod5
-
diff --git a/meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch b/meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch
deleted file mode 100644
index eff975e341..0000000000
--- a/meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch
+++ /dev/null
@@ -1,355 +0,0 @@
-COPYING: add GPLv2 license file
-
-this is a local file recipe and the license file is missing.In order
-to pass the license checksum checking, the license file is needed. So
-this patch add the GPLv2 license file.
-
-Upstream-Status: Inappropriate [licensing]
-
-Signed-off-by: Yu Ke <ke.yu@intel.com>
-
-diff --git a/COPYING b/COPYING
-new file mode 100644
-index 0000000..d511905
---- /dev/null
-+++ b/COPYING
-@@ -0,0 +1,339 @@
-+ GNU GENERAL PUBLIC LICENSE
-+ Version 2, June 1991
-+
-+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
-+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ Everyone is permitted to copy and distribute verbatim copies
-+ of this license document, but changing it is not allowed.
-+
-+ Preamble
-+
-+ The licenses for most software are designed to take away your
-+freedom to share and change it. By contrast, the GNU General Public
-+License is intended to guarantee your freedom to share and change free
-+software--to make sure the software is free for all its users. This
-+General Public License applies to most of the Free Software
-+Foundation's software and to any other program whose authors commit to
-+using it. (Some other Free Software Foundation software is covered by
-+the GNU Lesser General Public License instead.) You can apply it to
-+your programs, too.
-+
-+ When we speak of free software, we are referring to freedom, not
-+price. Our General Public Licenses are designed to make sure that you
-+have the freedom to distribute copies of free software (and charge for
-+this service if you wish), that you receive source code or can get it
-+if you want it, that you can change the software or use pieces of it
-+in new free programs; and that you know you can do these things.
-+
-+ To protect your rights, we need to make restrictions that forbid
-+anyone to deny you these rights or to ask you to surrender the rights.
-+These restrictions translate to certain responsibilities for you if you
-+distribute copies of the software, or if you modify it.
-+
-+ For example, if you distribute copies of such a program, whether
-+gratis or for a fee, you must give the recipients all the rights that
-+you have. You must make sure that they, too, receive or can get the
-+source code. And you must show them these terms so they know their
-+rights.
-+
-+ We protect your rights with two steps: (1) copyright the software, and
-+(2) offer you this license which gives you legal permission to copy,
-+distribute and/or modify the software.
-+
-+ Also, for each author's protection and ours, we want to make certain
-+that everyone understands that there is no warranty for this free
-+software. If the software is modified by someone else and passed on, we
-+want its recipients to know that what they have is not the original, so
-+that any problems introduced by others will not reflect on the original
-+authors' reputations.
-+
-+ Finally, any free program is threatened constantly by software
-+patents. We wish to avoid the danger that redistributors of a free
-+program will individually obtain patent licenses, in effect making the
-+program proprietary. To prevent this, we have made it clear that any
-+patent must be licensed for everyone's free use or not licensed at all.
-+
-+ The precise terms and conditions for copying, distribution and
-+modification follow.
-+
-+ GNU GENERAL PUBLIC LICENSE
-+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-+
-+ 0. This License applies to any program or other work which contains
-+a notice placed by the copyright holder saying it may be distributed
-+under the terms of this General Public License. The "Program", below,
-+refers to any such program or work, and a "work based on the Program"
-+means either the Program or any derivative work under copyright law:
-+that is to say, a work containing the Program or a portion of it,
-+either verbatim or with modifications and/or translated into another
-+language. (Hereinafter, translation is included without limitation in
-+the term "modification".) Each licensee is addressed as "you".
-+
-+Activities other than copying, distribution and modification are not
-+covered by this License; they are outside its scope. The act of
-+running the Program is not restricted, and the output from the Program
-+is covered only if its contents constitute a work based on the
-+Program (independent of having been made by running the Program).
-+Whether that is true depends on what the Program does.
-+
-+ 1. You may copy and distribute verbatim copies of the Program's
-+source code as you receive it, in any medium, provided that you
-+conspicuously and appropriately publish on each copy an appropriate
-+copyright notice and disclaimer of warranty; keep intact all the
-+notices that refer to this License and to the absence of any warranty;
-+and give any other recipients of the Program a copy of this License
-+along with the Program.
-+
-+You may charge a fee for the physical act of transferring a copy, and
-+you may at your option offer warranty protection in exchange for a fee.
-+
-+ 2. You may modify your copy or copies of the Program or any portion
-+of it, thus forming a work based on the Program, and copy and
-+distribute such modifications or work under the terms of Section 1
-+above, provided that you also meet all of these conditions:
-+
-+ a) You must cause the modified files to carry prominent notices
-+ stating that you changed the files and the date of any change.
-+
-+ b) You must cause any work that you distribute or publish, that in
-+ whole or in part contains or is derived from the Program or any
-+ part thereof, to be licensed as a whole at no charge to all third
-+ parties under the terms of this License.
-+
-+ c) If the modified program normally reads commands interactively
-+ when run, you must cause it, when started running for such
-+ interactive use in the most ordinary way, to print or display an
-+ announcement including an appropriate copyright notice and a
-+ notice that there is no warranty (or else, saying that you provide
-+ a warranty) and that users may redistribute the program under
-+ these conditions, and telling the user how to view a copy of this
-+ License. (Exception: if the Program itself is interactive but
-+ does not normally print such an announcement, your work based on
-+ the Program is not required to print an announcement.)
-+
-+These requirements apply to the modified work as a whole. If
-+identifiable sections of that work are not derived from the Program,
-+and can be reasonably considered independent and separate works in
-+themselves, then this License, and its terms, do not apply to those
-+sections when you distribute them as separate works. But when you
-+distribute the same sections as part of a whole which is a work based
-+on the Program, the distribution of the whole must be on the terms of
-+this License, whose permissions for other licensees extend to the
-+entire whole, and thus to each and every part regardless of who wrote it.
-+
-+Thus, it is not the intent of this section to claim rights or contest
-+your rights to work written entirely by you; rather, the intent is to
-+exercise the right to control the distribution of derivative or
-+collective works based on the Program.
-+
-+In addition, mere aggregation of another work not based on the Program
-+with the Program (or with a work based on the Program) on a volume of
-+a storage or distribution medium does not bring the other work under
-+the scope of this License.
-+
-+ 3. You may copy and distribute the Program (or a work based on it,
-+under Section 2) in object code or executable form under the terms of
-+Sections 1 and 2 above provided that you also do one of the following:
-+
-+ a) Accompany it with the complete corresponding machine-readable
-+ source code, which must be distributed under the terms of Sections
-+ 1 and 2 above on a medium customarily used for software interchange; or,
-+
-+ b) Accompany it with a written offer, valid for at least three
-+ years, to give any third party, for a charge no more than your
-+ cost of physically performing source distribution, a complete
-+ machine-readable copy of the corresponding source code, to be
-+ distributed under the terms of Sections 1 and 2 above on a medium
-+ customarily used for software interchange; or,
-+
-+ c) Accompany it with the information you received as to the offer
-+ to distribute corresponding source code. (This alternative is
-+ allowed only for noncommercial distribution and only if you
-+ received the program in object code or executable form with such
-+ an offer, in accord with Subsection b above.)
-+
-+The source code for a work means the preferred form of the work for
-+making modifications to it. For an executable work, complete source
-+code means all the source code for all modules it contains, plus any
-+associated interface definition files, plus the scripts used to
-+control compilation and installation of the executable. However, as a
-+special exception, the source code distributed need not include
-+anything that is normally distributed (in either source or binary
-+form) with the major components (compiler, kernel, and so on) of the
-+operating system on which the executable runs, unless that component
-+itself accompanies the executable.
-+
-+If distribution of executable or object code is made by offering
-+access to copy from a designated place, then offering equivalent
-+access to copy the source code from the same place counts as
-+distribution of the source code, even though third parties are not
-+compelled to copy the source along with the object code.
-+
-+ 4. You may not copy, modify, sublicense, or distribute the Program
-+except as expressly provided under this License. Any attempt
-+otherwise to copy, modify, sublicense or distribute the Program is
-+void, and will automatically terminate your rights under this License.
-+However, parties who have received copies, or rights, from you under
-+this License will not have their licenses terminated so long as such
-+parties remain in full compliance.
-+
-+ 5. You are not required to accept this License, since you have not
-+signed it. However, nothing else grants you permission to modify or
-+distribute the Program or its derivative works. These actions are
-+prohibited by law if you do not accept this License. Therefore, by
-+modifying or distributing the Program (or any work based on the
-+Program), you indicate your acceptance of this License to do so, and
-+all its terms and conditions for copying, distributing or modifying
-+the Program or works based on it.
-+
-+ 6. Each time you redistribute the Program (or any work based on the
-+Program), the recipient automatically receives a license from the
-+original licensor to copy, distribute or modify the Program subject to
-+these terms and conditions. You may not impose any further
-+restrictions on the recipients' exercise of the rights granted herein.
-+You are not responsible for enforcing compliance by third parties to
-+this License.
-+
-+ 7. If, as a consequence of a court judgment or allegation of patent
-+infringement or for any other reason (not limited to patent issues),
-+conditions are imposed on you (whether by court order, agreement or
-+otherwise) that contradict the conditions of this License, they do not
-+excuse you from the conditions of this License. If you cannot
-+distribute so as to satisfy simultaneously your obligations under this
-+License and any other pertinent obligations, then as a consequence you
-+may not distribute the Program at all. For example, if a patent
-+license would not permit royalty-free redistribution of the Program by
-+all those who receive copies directly or indirectly through you, then
-+the only way you could satisfy both it and this License would be to
-+refrain entirely from distribution of the Program.
-+
-+If any portion of this section is held invalid or unenforceable under
-+any particular circumstance, the balance of the section is intended to
-+apply and the section as a whole is intended to apply in other
-+circumstances.
-+
-+It is not the purpose of this section to induce you to infringe any
-+patents or other property right claims or to contest validity of any
-+such claims; this section has the sole purpose of protecting the
-+integrity of the free software distribution system, which is
-+implemented by public license practices. Many people have made
-+generous contributions to the wide range of software distributed
-+through that system in reliance on consistent application of that
-+system; it is up to the author/donor to decide if he or she is willing
-+to distribute software through any other system and a licensee cannot
-+impose that choice.
-+
-+This section is intended to make thoroughly clear what is believed to
-+be a consequence of the rest of this License.
-+
-+ 8. If the distribution and/or use of the Program is restricted in
-+certain countries either by patents or by copyrighted interfaces, the
-+original copyright holder who places the Program under this License
-+may add an explicit geographical distribution limitation excluding
-+those countries, so that distribution is permitted only in or among
-+countries not thus excluded. In such case, this License incorporates
-+the limitation as if written in the body of this License.
-+
-+ 9. The Free Software Foundation may publish revised and/or new versions
-+of the General Public License from time to time. Such new versions will
-+be similar in spirit to the present version, but may differ in detail to
-+address new problems or concerns.
-+
-+Each version is given a distinguishing version number. If the Program
-+specifies a version number of this License which applies to it and "any
-+later version", you have the option of following the terms and conditions
-+either of that version or of any later version published by the Free
-+Software Foundation. If the Program does not specify a version number of
-+this License, you may choose any version ever published by the Free Software
-+Foundation.
-+
-+ 10. If you wish to incorporate parts of the Program into other free
-+programs whose distribution conditions are different, write to the author
-+to ask for permission. For software which is copyrighted by the Free
-+Software Foundation, write to the Free Software Foundation; we sometimes
-+make exceptions for this. Our decision will be guided by the two goals
-+of preserving the free status of all derivatives of our free software and
-+of promoting the sharing and reuse of software generally.
-+
-+ NO WARRANTY
-+
-+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-+REPAIR OR CORRECTION.
-+
-+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-+POSSIBILITY OF SUCH DAMAGES.
-+
-+ END OF TERMS AND CONDITIONS
-+
-+ How to Apply These Terms to Your New Programs
-+
-+ If you develop a new program, and you want it to be of the greatest
-+possible use to the public, the best way to achieve this is to make it
-+free software which everyone can redistribute and change under these terms.
-+
-+ To do so, attach the following notices to the program. It is safest
-+to attach them to the start of each source file to most effectively
-+convey the exclusion of warranty; and each file should have at least
-+the "copyright" line and a pointer to where the full notice is found.
-+
-+ <one line to give the program's name and a brief idea of what it does.>
-+ Copyright (C) <year> <name of author>
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this program; if not, write to the Free Software Foundation, Inc.,
-+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+
-+Also add information on how to contact you by electronic and paper mail.
-+
-+If the program is interactive, make it output a short notice like this
-+when it starts in an interactive mode:
-+
-+ Gnomovision version 69, Copyright (C) year name of author
-+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-+ This is free software, and you are welcome to redistribute it
-+ under certain conditions; type `show c' for details.
-+
-+The hypothetical commands `show w' and `show c' should show the appropriate
-+parts of the General Public License. Of course, the commands you use may
-+be called something other than `show w' and `show c'; they could even be
-+mouse-clicks or menu items--whatever suits your program.
-+
-+You should also get your employer (if you work as a programmer) or your
-+school, if any, to sign a "copyright disclaimer" for the program, if
-+necessary. Here is a sample; alter the names:
-+
-+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
-+
-+ <signature of Ty Coon>, 1 April 1989
-+ Ty Coon, President of Vice
-+
-+This General Public License does not permit incorporating your program into
-+proprietary programs. If your program is a subroutine library, you may
-+consider it more useful to permit linking proprietary applications with the
-+library. If this is what you want to do, use the GNU Lesser General
-+Public License instead of this License.
diff --git a/meta/recipes-graphics/x11-common/x11-common_0.1.bb b/meta/recipes-graphics/x11-common/x11-common_0.1.bb
deleted file mode 100644
index ab9a939ce0..0000000000
--- a/meta/recipes-graphics/x11-common/x11-common_0.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Common X11 scripts and configuration files"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-SECTION = "x11"
-PR = "r47"
-
-inherit distro_features_check
-# rdepends on xdypinfo xmodmap xinit
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI = "file://etc \
- file://gplv2-license.patch"
-
-S = "${WORKDIR}"
-
-do_install() {
- cp -R ${S}/etc ${D}${sysconfdir}
- chmod -R 755 ${D}${sysconfdir}
-}
-
-RDEPENDS_${PN} = "dbus-x11 xmodmap xdpyinfo xinput-calibrator formfactor"
-
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
deleted file mode 100644
index a6d0d5eeea..0000000000
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-SUMMARY = "Simple Xserver Init Script (no dm)"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-SECTION = "x11"
-PR = "r31"
-
-SRC_URI = "file://xserver-nodm \
- file://Xserver \
- file://gplv2-license.patch \
- file://xserver-nodm.service.in \
- file://xserver-nodm.conf.in \
-"
-
-S = "${WORKDIR}"
-
-# Since we refer to ROOTLESS_X which is normally enabled per-machine
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-inherit update-rc.d systemd distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGECONFIG ??= "blank"
-# dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG
-PACKAGECONFIG[blank] = ""
-
-do_install() {
- install -d ${D}${sysconfdir}/default
- install xserver-nodm.conf.in ${D}${sysconfdir}/default/xserver-nodm
- install -d ${D}${sysconfdir}/xserver-nodm
- install Xserver ${D}${sysconfdir}/xserver-nodm/Xserver
-
- BLANK_ARGS="${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}"
- if [ "${ROOTLESS_X}" = "1" ] ; then
- XUSER_HOME="/home/xuser"
- XUSER="xuser"
- else
- XUSER_HOME=${ROOT_HOME}
- XUSER="root"
- fi
- sed -i "s:@HOME@:${XUSER_HOME}:; s:@USER@:${XUSER}:; s:@BLANK_ARGS@:${BLANK_ARGS}:" \
- ${D}${sysconfdir}/default/xserver-nodm
-
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/xserver-nodm.service.in ${D}${systemd_unitdir}/system/xserver-nodm.service
- sed -i "s:@USER@:${XUSER}:" ${D}${systemd_unitdir}/system/xserver-nodm.service
- fi
-
- if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
- install -d ${D}${sysconfdir}/init.d
- install xserver-nodm ${D}${sysconfdir}/init.d
- fi
-}
-
-RDEPENDS_${PN} = "xinit ${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
-
-INITSCRIPT_NAME = "xserver-nodm"
-INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
-SYSTEMD_SERVICE_${PN} = "xserver-nodm.service"
-
diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession
index 0b73127ae1..0b73127ae1 100644
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession
diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh
index 6bd40b2fc5..6bd40b2fc5 100644
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh
diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/89xdgautostart.sh b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/89xdgautostart.sh
index 3d7008ca45..3d7008ca45 100644
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/89xdgautostart.sh
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/89xdgautostart.sh
diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/90XWindowManager.sh b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/90XWindowManager.sh
index b936dedf3b..b936dedf3b 100644
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/90XWindowManager.sh
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/90XWindowManager.sh
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
index 757c23d95a..4a9670d8d2 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
@@ -2,6 +2,6 @@
XSERVER=/usr/bin/Xorg
DISPLAY=:0
-ARGS=" -br -pn @BLANK_ARGS@ "
+ARGS=" -br -pn @BLANK_ARGS@ @NO_CURSOR_ARG@ "
HOME=@HOME@
USER=@USER@
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
index 324a26f549..87dc4f8fcd 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
@@ -5,6 +5,7 @@ Description=Xserver startup without a display manager
EnvironmentFile=/etc/default/xserver-nodm
User=@USER@
ExecStart=/etc/xserver-nodm/Xserver
+Restart=always
[Install]
Alias=display-manager.service
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
new file mode 100644
index 0000000000..385fea5e83
--- /dev/null
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
@@ -0,0 +1,69 @@
+SUMMARY = "Simple Xserver Init Script (no dm)"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+SECTION = "x11"
+PR = "r31"
+
+SRC_URI = "file://xserver-nodm \
+ file://Xserver \
+ file://X11 \
+ file://gplv2-license.patch \
+ file://xserver-nodm.service.in \
+ file://xserver-nodm.conf.in \
+"
+
+S = "${WORKDIR}"
+
+# Since we refer to ROOTLESS_X which is normally enabled per-machine
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit update-rc.d systemd features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGECONFIG ??= "blank"
+# dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG
+PACKAGECONFIG[blank] = ""
+PACKAGECONFIG[nocursor] = ""
+
+do_install() {
+ install -d ${D}${sysconfdir}/default
+ install xserver-nodm.conf.in ${D}${sysconfdir}/default/xserver-nodm
+ install -d ${D}${sysconfdir}/xserver-nodm
+ install Xserver ${D}${sysconfdir}/xserver-nodm/Xserver
+ install -d ${D}${sysconfdir}/X11/Xsession.d
+ install X11/Xsession.d/* ${D}${sysconfdir}/X11/Xsession.d/
+ install X11/Xsession ${D}${sysconfdir}/X11/
+
+ BLANK_ARGS="${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}"
+ NO_CURSOR_ARG="${@bb.utils.contains('PACKAGECONFIG', 'nocursor', '-nocursor', '', d)}"
+ if [ "${ROOTLESS_X}" = "1" ] ; then
+ XUSER_HOME="/home/xuser"
+ XUSER="xuser"
+ else
+ XUSER_HOME=${ROOT_HOME}
+ XUSER="root"
+ fi
+ sed -i "s:@HOME@:${XUSER_HOME}:; s:@USER@:${XUSER}:; s:@BLANK_ARGS@:${BLANK_ARGS}:" \
+ ${D}${sysconfdir}/default/xserver-nodm
+ sed -i "s:@NO_CURSOR_ARG@:${NO_CURSOR_ARG}:" ${D}${sysconfdir}/default/xserver-nodm
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/xserver-nodm.service.in ${D}${systemd_unitdir}/system/xserver-nodm.service
+ sed -i "s:@USER@:${XUSER}:" ${D}${systemd_unitdir}/system/xserver-nodm.service
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install xserver-nodm ${D}${sysconfdir}/init.d
+ fi
+}
+
+RDEPENDS_${PN} = "xinit ${@oe.utils.conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
+
+INITSCRIPT_NAME = "xserver-nodm"
+INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
+SYSTEMD_SERVICE_${PN} = "xserver-nodm.service"
+
+RCONFLICTS_${PN} = "xserver-common (< 1.34-r9) x11-common"
diff --git a/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb b/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
index b871d89f9f..a4ab7f6eb8 100644
--- a/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
+++ b/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
@@ -11,6 +11,7 @@ SRCREV = "23c8af5ba4a1b7efbaf0bbca59a65ff7e10a1a06"
PV = "0.1.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-calibrator.hh-Include-string-to-get-std-string.patch b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-calibrator.hh-Include-string-to-get-std-string.patch
new file mode 100644
index 0000000000..37617600d5
--- /dev/null
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-calibrator.hh-Include-string-to-get-std-string.patch
@@ -0,0 +1,28 @@
+From 79bc507b48d4acd3dec8a85ab6b341b872d44a05 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 29 Jan 2019 22:40:24 -0800
+Subject: [PATCH] calibrator.hh: Include <string> to get std::string
+
+Found with libc++
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/76]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/calibrator.hh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/calibrator.hh b/src/calibrator.hh
+index a6f9504..e75bcef 100644
+--- a/src/calibrator.hh
++++ b/src/calibrator.hh
+@@ -29,6 +29,7 @@
+ #include <X11/Xlib.h>
+ #include <stdio.h>
+ #include <vector>
++#include <string>
+
+ // XXX: we currently don't handle lines that are longer than this
+ #define MAX_LINE_LEN 1024
+--
+2.20.1
+
diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
deleted file mode 100644
index 9dc94ae493..0000000000
--- a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1cb83759632bb218559c4d0d65ff79f868c03dc5 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Tue, 9 Aug 2016 17:03:31 +0300
-Subject: [PATCH] add geometry input when calibrating
-
-Send monitor geometry to xinput_calibrator when running the script
-Update:
- Remove bashism
-
-Upstream-Status: Inappropriate [no longer maintained]
-
-Signed-off-by: Jonathan David <jonathan.david@ni.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- scripts/xinput_calibrator_pointercal.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
-index fccb197..fea7c2f 100755
---- a/scripts/xinput_calibrator_pointercal.sh
-+++ b/scripts/xinput_calibrator_pointercal.sh
-@@ -24,7 +24,8 @@ if [ -e $CALFILE ] ; then
- fi
- fi
-
--CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
-+RESOLUTION=$(xrandr | awk -F '[[:space:]+]' '/ connected/ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
-+CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
- if [ ! -z "$CALDATA" ] ; then
- echo $CALDATA > $CALFILE
- echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
---
-2.4.0
-
diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 57c3a7a9a6..4f831932e7 100644
--- a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -2,20 +2,21 @@ SUMMARY = "Touchscreen calibration program for X11"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/xinput_calibrator"
LICENSE = "MIT-X"
LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f34021557898e4b5a"
-DEPENDS = "virtual/libx11 libxi"
+DEPENDS = "virtual/libx11 libxi libxrandr"
PV = "0.7.5+git${SRCPV}"
PR = "r6"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
-SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
+SRCREV = "03dadf55109bd43d3380f040debe9f82f66f2f35"
SRC_URI = "git://github.com/tias/xinput_calibrator.git \
file://30xinput_calibrate.sh \
file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \
- file://add-geometry-input-when-calibrating.patch"
+ file://0001-calibrator.hh-Include-string-to-get-std-string.patch \
+ "
S = "${WORKDIR}/git"
@@ -34,5 +35,5 @@ do_install_append() {
}
FILES_${PN} += "${sysconfdir}/xdg/autostart"
-RDEPENDS_${PN} = "xinput formfactor xrandr"
+RDEPENDS_${PN} = "xinput formfactor"
RRECOMMENDS_${PN} = "pointercal-xinput"
diff --git a/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb b/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb
deleted file mode 100644
index a453e24876..0000000000
--- a/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "A program to create an index of X font files in a directory"
-
-DESCRIPTION = "For each directory argument, mkfontdir reads all of the \
-font files in the directory. The font names and related data are written \
-out to the files \"fonts.dir\", \"fonts.scale\", and \"fonts.alias\". \
-The X server and font server use these files to find the available font \
-files."
-
-PE = "1"
-PR = "${INC_PR}.0"
-
-RDEPENDS_${PN} += "mkfontscale"
-RDEPENDS_${PN}_class-native += "mkfontscale-native"
-
-BBCLASSEXTEND = "native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b4fcf2b90cadbfc15009b9e124dc3a3f"
-
-SRC_URI[md5sum] = "18c429148c96c2079edda922a2b67632"
-SRC_URI[sha256sum] = "56d52a482df130484e51fd066d1b6eda7c2c02ddbc91fe6e2be1b9c4e7306530"
diff --git a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb b/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
deleted file mode 100644
index 31cf186767..0000000000
--- a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "A program to create an index of scalable font files for X"
-
-DESCRIPTION = "For each directory argument, mkfontscale reads all of the \
-scalable font files in the directory. For every font file found, an X11 \
-font name (XLFD) is generated, and is written together with the file \
-name to a file fonts.scale in the directory. The resulting fonts.scale \
-is used by the mkfontdir program."
-
-DEPENDS = "util-macros-native zlib libfontenc freetype xproto"
-
-BBCLASSEXTEND = "native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=2e0d129d05305176d1a790e0ac1acb7f"
-
-SRC_URI[md5sum] = "9bdd6ebfa62b1bbd474906ac86a40fd8"
-SRC_URI[sha256sum] = "8c6d5228af885477b9aec60ca6f172578e7d2de42234357af62fb00439453f20"
diff --git a/meta/recipes-graphics/xorg-app/mkfontscale_1.2.1.bb b/meta/recipes-graphics/xorg-app/mkfontscale_1.2.1.bb
new file mode 100644
index 0000000000..a767ee847b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/mkfontscale_1.2.1.bb
@@ -0,0 +1,21 @@
+require xorg-app-common.inc
+
+SUMMARY = "A program to create an index of scalable font files for X"
+
+DESCRIPTION = "For each directory argument, mkfontscale reads all of the \
+scalable font files in the directory. For every font file found, an X11 \
+font name (XLFD) is generated, and is written together with the file \
+name to a file fonts.scale in the directory. The resulting fonts.scale \
+is used by the mkfontdir program."
+
+DEPENDS = "util-macros-native zlib libfontenc freetype xorgproto"
+
+PROVIDES += "mkfontdir"
+RPROVIDES_${PN} += "mkfontdir"
+
+BBCLASSEXTEND = "native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=99b1e1269aba5179139b9e4380fc0934"
+
+SRC_URI[md5sum] = "215940de158b1a3d8b3f8b442c606e2f"
+SRC_URI[sha256sum] = "ca0495eb974a179dd742bfa6199d561bda1c8da4a0c5a667f21fd82aaab6bac7"
diff --git a/meta/recipes-graphics/xorg-app/rgb_1.0.6.bb b/meta/recipes-graphics/xorg-app/rgb_1.0.6.bb
index 87268046e6..c3e853631b 100644
--- a/meta/recipes-graphics/xorg-app/rgb_1.0.6.bb
+++ b/meta/recipes-graphics/xorg-app/rgb_1.0.6.bb
@@ -6,7 +6,7 @@ to RGB values (rgb.txt) and, if configured to use a database for color \
lookup, the rgb program to convert the text file into the binary database \
format."
-DEPENDS += " xproto util-macros"
+DEPENDS += " xorgproto util-macros"
LIC_FILES_CHKSUM = "file://COPYING;md5=ef598adbe241bd0b0b9113831f6e249a"
PE = "1"
diff --git a/meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb b/meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb
deleted file mode 100644
index 4e9355880d..0000000000
--- a/meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "X11 server performance test program"
-
-DESCRIPTION = "The x11perf program runs one or more performance tests \
-and reports how fast an X server can execute the tests."
-
-
-DEPENDS += "libxmu libxrender libxft libxext fontconfig"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=428ca4d67a41fcd4fc3283dce9bbda7e \
- file://x11perf.h;endline=24;md5=29555066baf406a105ff917ac25b2d01"
-
-PE = "1"
-
-FILES_${PN} += "${libdir}/X11/x11perfcomp/*"
-
-SRC_URI[md5sum] = "f0b24e4d8beb622a419e8431e1c03cd7"
-SRC_URI[sha256sum] = "e87098dec1947572d70c62697a7b70bde1ab5668237d4660080eade6bc096751"
diff --git a/meta/recipes-graphics/xorg-app/x11perf_1.6.1.bb b/meta/recipes-graphics/xorg-app/x11perf_1.6.1.bb
new file mode 100644
index 0000000000..33c0c8a95c
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/x11perf_1.6.1.bb
@@ -0,0 +1,23 @@
+require xorg-app-common.inc
+
+SUMMARY = "X11 server performance test program"
+
+DESCRIPTION = "The x11perf program runs one or more performance tests \
+and reports how fast an X server can execute the tests."
+
+
+DEPENDS += "libxmu libxrender libxft libxext fontconfig"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=428ca4d67a41fcd4fc3283dce9bbda7e \
+ file://x11perf.h;endline=24;md5=29555066baf406a105ff917ac25b2d01"
+
+PE = "1"
+
+do_install_append_class-target () {
+ sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${bindir}/x11perfcomp
+}
+
+FILES_${PN} += "${libdir}/X11/x11perfcomp/*"
+
+SRC_URI[md5sum] = "e96b56756990c56c24d2d02c2964456b"
+SRC_URI[sha256sum] = "1c7e0b8ffc2794b4ccf11e04d551823abe0ea47b4f7db0637390db6fbe817c34"
diff --git a/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb b/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb
deleted file mode 100644
index 59b332373c..0000000000
--- a/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require xorg-app-common.inc
-SUMMARY = "X authority utilities"
-DESCRIPTION = "X application to edit and display the authorization \
-information used in connecting to the X server."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5ec74dd7ea4d10c4715a7c44f159a40b"
-
-DEPENDS += "libxau libxext libxmu"
-PE = "1"
-
-SRC_URI[md5sum] = "7d6003f32838d5b688e2c8a131083271"
-SRC_URI[sha256sum] = "56ce1523eb48b1f8a4f4244fe1c3d8e6af1a3b7d4b0e6063582421b0b68dc28f"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-app/xauth_1.1.bb b/meta/recipes-graphics/xorg-app/xauth_1.1.bb
new file mode 100644
index 0000000000..24ad9606ec
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xauth_1.1.bb
@@ -0,0 +1,15 @@
+require xorg-app-common.inc
+SUMMARY = "X authority utilities"
+DESCRIPTION = "X application to edit and display the authorization \
+information used in connecting to the X server."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5ec74dd7ea4d10c4715a7c44f159a40b"
+
+DEPENDS += "libxau libxext libxmu"
+PE = "1"
+
+SRC_URI[md5sum] = "e50587c1bb832aafd1a19d91a0890a0b"
+SRC_URI[sha256sum] = "6d1dd1b79dd185107c5b0fdd22d1d791ad749ad6e288d0cdf80964c4ffa7530c"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-app/xdpyinfo_1.3.2.bb b/meta/recipes-graphics/xorg-app/xdpyinfo_1.3.2.bb
index af04bb6e3a..2d10b7acca 100644
--- a/meta/recipes-graphics/xorg-app/xdpyinfo_1.3.2.bb
+++ b/meta/recipes-graphics/xorg-app/xdpyinfo_1.3.2.bb
@@ -9,7 +9,7 @@ clients and the server, and the different types of screens and visuals \
that are available."
LIC_FILES_CHKSUM = "file://COPYING;md5=f3d09e6b9e203a1af489e16c708f4fb3"
-DEPENDS += "libxtst libxext libxxf86vm libxxf86dga libxxf86misc libxi libxrender libxinerama libdmx libxau libxcomposite"
+DEPENDS += "libxtst libxext libxxf86vm libxi libxrender libxinerama libdmx libxau libxcomposite"
PE = "1"
SRC_URI += "file://disable-xkb.patch"
diff --git a/meta/recipes-graphics/xorg-app/xev/diet-x11.patch b/meta/recipes-graphics/xorg-app/xev/diet-x11.patch
index 6130959f86..53c0ac2e61 100644
--- a/meta/recipes-graphics/xorg-app/xev/diet-x11.patch
+++ b/meta/recipes-graphics/xorg-app/xev/diet-x11.patch
@@ -4,79 +4,106 @@ Upstream-Status: Inappropriate [disable feature]
xev.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
-Index: xev-1.2.0/xev.c
+Index: xev-1.2.3/xev.c
===================================================================
---- xev-1.2.0.orig/xev.c
-+++ xev-1.2.0/xev.c
-@@ -116,7 +116,7 @@ do_KeyPress (XEvent *eventp)
- nbytes = XLookupString (e, str, 256, &ks, NULL);
+--- xev-1.2.3.orig/xev.c
++++ xev-1.2.3/xev.c
+@@ -125,17 +125,6 @@ do_KeyPress(XEvent *eventp)
+ nbytes = XLookupString(e, str, 256, &ks, NULL);
/* not supposed to call XmbLookupString on a key release event */
- if (e->type == KeyPress && xic) {
-+ /*if (e->type == KeyPress && xic) {
- do {
- nmbbytes = XmbLookupString (xic, e, buf, bsize - 1, &ks, &status);
- buf[nmbbytes] = '\0';
-@@ -126,7 +126,7 @@ do_KeyPress (XEvent *eventp)
- buf = realloc (buf, bsize);
- }
- } while (status == XBufferOverflow);
+- do {
+- nmbbytes = XmbLookupString(xic, e, buf, bsize - 1, &ks, &status);
+- buf[nmbbytes] = '\0';
+-
+- if (status == XBufferOverflow) {
+- bsize = nmbbytes + 1;
+- buf = realloc(buf, bsize);
+- }
+- } while (status == XBufferOverflow);
- }
-+ }*/
if (ks == NoSymbol)
- ksname = "NoSymbol";
-@@ -156,7 +156,7 @@ do_KeyPress (XEvent *eventp)
+ ksname = "NoSymbol";
+@@ -168,16 +157,6 @@ do_KeyPress(XEvent *eventp)
}
/* not supposed to call XmbLookupString on a key release event */
- if (e->type == KeyPress && xic) {
-+ /*if (e->type == KeyPress && xic) {
- printf (" XmbLookupString gives %d bytes: ", nmbbytes);
- if (nmbbytes > 0) {
- dump (buf, nmbbytes);
-@@ -164,7 +164,7 @@ do_KeyPress (XEvent *eventp)
- } else {
- printf ("\n");
+- printf(" XmbLookupString gives %d bytes: ", nmbbytes);
+- if (nmbbytes > 0) {
+- dump(buf, nmbbytes);
+- printf(" \"%s\"\n", buf);
+- }
+- else {
+- printf("\n");
+- }
+- }
+
+ printf(" XFilterEvent returns: %s\n",
+ XFilterEvent(eventp, e->window) ? "True" : "False");
+@@ -1141,7 +1120,7 @@ parse_event_mask(const char *s, long eve
+ if (s)
+ return True;
}
- }
-+ } */
++ }
- printf (" XFilterEvent returns: %s\n",
- XFilterEvent (eventp, e->window) ? "True" : "False");
-@@ -1015,7 +1015,7 @@ main (int argc, char **argv)
- fprintf (stderr, "%s: XSetLocaleModifiers failed\n", ProgramName);
+ if (s != NULL)
+ fprintf(stderr, "%s: unrecognized event mask '%s'\n", ProgramName, s);
+@@ -1288,37 +1267,6 @@ main(int argc, char **argv)
+ fprintf(stderr, "%s: XSetLocaleModifiers failed\n", ProgramName);
}
-- xim = XOpenIM (dpy, NULL, NULL, NULL);
-+ /*xim = XOpenIM (dpy, NULL, NULL, NULL);
- if (xim == NULL) {
- fprintf (stderr, "%s: XOpenIM failed\n", ProgramName);
- }
-@@ -1042,7 +1042,7 @@ main (int argc, char **argv)
- }
- XFree (xim_styles);
- }
+- xim = XOpenIM(dpy, NULL, NULL, NULL);
+- if (xim == NULL) {
+- fprintf(stderr, "%s: XOpenIM failed\n", ProgramName);
- }
-+ }*/
-
- screen = DefaultScreen (dpy);
+-
+- if (xim) {
+- imvalret = XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
+- if (imvalret != NULL || xim_styles == NULL) {
+- fprintf(stderr, "%s: input method doesn't support any styles\n",
+- ProgramName);
+- }
+-
+- if (xim_styles) {
+- xim_style = 0;
+- for (i = 0; i < xim_styles->count_styles; i++) {
+- if (xim_styles->supported_styles[i] ==
+- (XIMPreeditNothing | XIMStatusNothing)) {
+- xim_style = xim_styles->supported_styles[i];
+- break;
+- }
+- }
+-
+- if (xim_style == 0) {
+- fprintf(stderr,
+- "%s: input method doesn't support the style we support\n",
+- ProgramName);
+- }
+- XFree(xim_styles);
+- }
+- }
+-
+ screen = DefaultScreen(dpy);
-@@ -1109,7 +1109,7 @@ main (int argc, char **argv)
- printf ("Outer window is 0x%lx, inner window is 0x%lx\n", w, subw);
+ attr.event_mask = event_masks[EVENT_MASK_INDEX_CORE];
+@@ -1373,16 +1321,6 @@ main(int argc, char **argv)
+ printf("Outer window is 0x%lx, inner window is 0x%lx\n", w, subw);
}
- if (xim && xim_style) {
-+ /*if (xim && xim_style) {
- xic = XCreateIC (xim,
- XNInputStyle, xim_style,
- XNClientWindow, w,
-@@ -1119,7 +1119,7 @@ main (int argc, char **argv)
- if (xic == NULL) {
- fprintf (stderr, "XCreateIC failed\n");
- }
+- xic = XCreateIC(xim,
+- XNInputStyle, xim_style,
+- XNClientWindow, w, XNFocusWindow, w, NULL);
+-
+- if (xic == NULL) {
+- fprintf(stderr, "XCreateIC failed\n");
+- }
- }
-+ }*/
-
- have_rr = XRRQueryExtension (dpy, &rr_event_base, &rr_error_base);
+-
+ have_rr = XRRQueryExtension(dpy, &rr_event_base, &rr_error_base);
if (have_rr) {
+ int rr_major, rr_minor;
diff --git a/meta/recipes-graphics/xorg-app/xev_1.2.2.bb b/meta/recipes-graphics/xorg-app/xev_1.2.2.bb
deleted file mode 100644
index f151b579e3..0000000000
--- a/meta/recipes-graphics/xorg-app/xev_1.2.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "X Event Viewer"
-DESCRIPTION = "Xev creates a window and then asks the X server to send it events \
-whenever anything happens to the window (such as it being moved, resized, \
-typed in, clicked in, etc.). You can also attach it to an existing window."
-
-LIC_FILES_CHKSUM = "file://xev.c;beginline=1;endline=33;md5=577c99421f1803b891d2c79097ae4682"
-LICENSE = "MIT"
-
-PE = "1"
-
-DEPENDS += "libxrandr xproto"
-
-SRC_URI += "file://diet-x11.patch"
-
-SRC_URI[md5sum] = "249bdde90f01c0d861af52dc8fec379e"
-SRC_URI[sha256sum] = "d94ae62a6c1af56c2961d71f5782076ac4116f0fa4e401420ac7e0db33dc314f"
diff --git a/meta/recipes-graphics/xorg-app/xev_1.2.3.bb b/meta/recipes-graphics/xorg-app/xev_1.2.3.bb
new file mode 100644
index 0000000000..6a69e747a6
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xev_1.2.3.bb
@@ -0,0 +1,18 @@
+require xorg-app-common.inc
+
+SUMMARY = "X Event Viewer"
+DESCRIPTION = "Xev creates a window and then asks the X server to send it events \
+whenever anything happens to the window (such as it being moved, resized, \
+typed in, clicked in, etc.). You can also attach it to an existing window."
+
+LIC_FILES_CHKSUM = "file://xev.c;beginline=1;endline=33;md5=577c99421f1803b891d2c79097ae4682"
+LICENSE = "MIT"
+
+PE = "1"
+
+DEPENDS += "libxrandr xorgproto"
+
+SRC_URI += "file://diet-x11.patch"
+
+SRC_URI[md5sum] = "eec82a5d4b599736f0fa637e96136746"
+SRC_URI[sha256sum] = "66bc4f1cfa1946d62612737815c34164e4ce40fcebd2c9e1d7e7a1117ad3ad09"
diff --git a/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb b/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
deleted file mode 100644
index 84d0cb8044..0000000000
--- a/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "X11 eyes that follow the mouse cursor demo"
-DESCRIPTION = "Xeyes is a small X11 application that shows a pair of eyes that move to \
-follow the location of the mouse cursor around the screen."
-
-PE = "1"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3ea51b365051ac32d1813a7dbaa4bfc6"
-
-SRC_URI[md5sum] = "a3035dcecdbdb89e864177c080924981"
-SRC_URI[sha256sum] = "975e98680cd59e1f9439016386609546ed08c284d0f05a95276f96aca6e8a521"
-
-DEPENDS += "libxau libxt libxext libxmu libxrender"
diff --git a/meta/recipes-graphics/xorg-app/xeyes_1.1.2.bb b/meta/recipes-graphics/xorg-app/xeyes_1.1.2.bb
new file mode 100644
index 0000000000..06885f8f53
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xeyes_1.1.2.bb
@@ -0,0 +1,14 @@
+require xorg-app-common.inc
+
+SUMMARY = "X11 eyes that follow the mouse cursor demo"
+DESCRIPTION = "Xeyes is a small X11 application that shows a pair of eyes that move to \
+follow the location of the mouse cursor around the screen."
+
+PE = "1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3ea51b365051ac32d1813a7dbaa4bfc6"
+
+SRC_URI[md5sum] = "6f0543ec84283df5743eeafc173bea4a"
+SRC_URI[sha256sum] = "57bcec0d2d167af9e5d44d0dbd74c6d7c0f0591cd0608952b23c749fdd910553"
+
+DEPENDS += "libxau libxt libxext libxmu libxrender"
diff --git a/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb b/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb
deleted file mode 100644
index f23d258e0b..0000000000
--- a/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "Server access control program for X"
-
-DESCRIPTION = "The xhost program is used to add and delete host names or \
-user names to the list allowed to make connections to the X server. In \
-the case of hosts, this provides a rudimentary form of privacy control \
-and security. Environments which require more sophisticated measures \
-should implement the user-based mechanism or use the hooks in the \
-protocol for passing other authentication data to the server."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8fbed71dddf48541818cef8079124199"
-DEPENDS += "libxmu libxau"
-PE = "1"
-
-SRC_URI[md5sum] = "f5d490738b148cb7f2fe760f40f92516"
-SRC_URI[sha256sum] = "93e619ee15471f576cfb30c663e18f5bc70aca577a63d2c2c03f006a7837c29a"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-app/xhost_1.0.8.bb b/meta/recipes-graphics/xorg-app/xhost_1.0.8.bb
new file mode 100644
index 0000000000..26bec3f0dd
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xhost_1.0.8.bb
@@ -0,0 +1,20 @@
+require xorg-app-common.inc
+
+SUMMARY = "Server access control program for X"
+
+DESCRIPTION = "The xhost program is used to add and delete host names or \
+user names to the list allowed to make connections to the X server. In \
+the case of hosts, this provides a rudimentary form of privacy control \
+and security. Environments which require more sophisticated measures \
+should implement the user-based mechanism or use the hooks in the \
+protocol for passing other authentication data to the server."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8fbed71dddf48541818cef8079124199"
+DEPENDS += "libxmu libxau"
+PE = "1"
+
+SRC_URI[md5sum] = "a48c72954ae6665e0616f6653636da8c"
+SRC_URI[sha256sum] = "a2dc3c579e13674947395ef8ccc1b3763f89012a216c2cc6277096489aadc396"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-app/xinit_1.3.4.bb b/meta/recipes-graphics/xorg-app/xinit_1.3.4.bb
deleted file mode 100644
index 93185188ee..0000000000
--- a/meta/recipes-graphics/xorg-app/xinit_1.3.4.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "X Window System initializer"
-
-DESCRIPTION = "The xinit program is used to start the X Window System \
-server and a first client program on systems that cannot start X \
-directly from /etc/init or in environments that use multiple window \
-systems. When this first client exits, xinit will kill the X server and \
-then terminate."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=18f01e7b39807bebe2b8df101a039b68"
-
-PE = "1"
-
-SRC_URI[md5sum] = "4e928452dfaf73851413a2d8b8c76388"
-SRC_URI[sha256sum] = "75d88d7397a07e01db253163b7c7a00b249b3d30e99489f2734cac9a0c7902b3"
-
-EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie"
-
-RDEPENDS_${PN} += "util-linux-mcookie"
diff --git a/meta/recipes-graphics/xorg-app/xinit_1.4.1.bb b/meta/recipes-graphics/xorg-app/xinit_1.4.1.bb
new file mode 100644
index 0000000000..5626ebbd52
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xinit_1.4.1.bb
@@ -0,0 +1,20 @@
+require xorg-app-common.inc
+
+SUMMARY = "X Window System initializer"
+
+DESCRIPTION = "The xinit program is used to start the X Window System \
+server and a first client program on systems that cannot start X \
+directly from /etc/init or in environments that use multiple window \
+systems. When this first client exits, xinit will kill the X server and \
+then terminate."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=18f01e7b39807bebe2b8df101a039b68"
+
+PE = "1"
+
+SRC_URI[md5sum] = "6d506ab2efc17a08e87778654e099d37"
+SRC_URI[sha256sum] = "de9b8f617b68a70f6caf87da01fcf0ebd2b75690cdcba9c921d0ef54fa54abb9"
+
+EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie"
+
+RDEPENDS_${PN} += "util-linux-mcookie"
diff --git a/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb b/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb
deleted file mode 100644
index 25cd047bc9..0000000000
--- a/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "Runtime configuration and test of XInput devices"
-
-DESCRIPTION = "Xinput is an utility for configuring and testing XInput devices"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=881525f89f99cad39c9832bcb72e6fa5"
-
-DEPENDS += " libxi libxrandr libxinerama"
-
-SRC_URI[md5sum] = "6a889412eff2e3c1c6bb19146f6fe84c"
-SRC_URI[sha256sum] = "3694d29b4180952fbf13c6d4e59541310cbb11eef5bf888ff3d8b7f4e3aee5c4"
diff --git a/meta/recipes-graphics/xorg-app/xinput_1.6.3.bb b/meta/recipes-graphics/xorg-app/xinput_1.6.3.bb
new file mode 100644
index 0000000000..ff1f1c9148
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xinput_1.6.3.bb
@@ -0,0 +1,12 @@
+require xorg-app-common.inc
+
+SUMMARY = "Runtime configuration and test of XInput devices"
+
+DESCRIPTION = "Xinput is an utility for configuring and testing XInput devices"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=881525f89f99cad39c9832bcb72e6fa5"
+
+DEPENDS += " libxi libxrandr libxinerama"
+
+SRC_URI[md5sum] = "ac6b7432726008b2f50eba82b0e2dbe4"
+SRC_URI[sha256sum] = "35a281dd3b9b22ea85e39869bb7670ba78955d5fec17c6ef7165d61e5aeb66ed"
diff --git a/meta/recipes-graphics/xorg-app/xkbcomp_1.3.1.bb b/meta/recipes-graphics/xorg-app/xkbcomp_1.3.1.bb
deleted file mode 100644
index 1c9835987c..0000000000
--- a/meta/recipes-graphics/xorg-app/xkbcomp_1.3.1.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "A program to compile XKB keyboard description"
-
-DESCRIPTION = "The xkbcomp keymap compiler converts a description of an \
-XKB keymap into one of several output formats. The most common use for \
-xkbcomp is to create a compiled keymap file (.xkm extension) which can \
-be read directly by XKB-capable X servers or utilities."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=08436e4f4476964e2e2dd7e7e41e076a"
-
-PR = "${INC_PR}.0"
-
-DEPENDS += "libxkbfile"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "a4d8353daf6cb0a9c47379b7413c42c6"
-SRC_URI[sha256sum] = "0304dc9e0d4ac10831a9ef5d5419722375ddbc3eac3ff4413094d57bc1f1923d"
diff --git a/meta/recipes-graphics/xorg-app/xkbcomp_1.4.2.bb b/meta/recipes-graphics/xorg-app/xkbcomp_1.4.2.bb
new file mode 100644
index 0000000000..eaf8eaaf74
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xkbcomp_1.4.2.bb
@@ -0,0 +1,17 @@
+require xorg-app-common.inc
+
+SUMMARY = "A program to compile XKB keyboard description"
+
+DESCRIPTION = "The xkbcomp keymap compiler converts a description of an \
+XKB keymap into one of several output formats. The most common use for \
+xkbcomp is to create a compiled keymap file (.xkm extension) which can \
+be read directly by XKB-capable X servers or utilities."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=08436e4f4476964e2e2dd7e7e41e076a"
+
+DEPENDS += "libxkbfile"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "12610df19df2af3797f2c130ee2bce97"
+SRC_URI[sha256sum] = "6dd8bcb9be7e85bd7294abe261b8c7b0539d2fc93e41b80fb8bd013767ce8424"
diff --git a/meta/recipes-graphics/xorg-app/xmodmap_1.0.10.bb b/meta/recipes-graphics/xorg-app/xmodmap_1.0.10.bb
new file mode 100644
index 0000000000..7dedb03a2b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xmodmap_1.0.10.bb
@@ -0,0 +1,16 @@
+require xorg-app-common.inc
+
+SUMMARY = "Utility for modifying keymaps and pointer button mappings in X"
+
+DESCRIPTION = "The xmodmap program is used to edit and display the \
+keyboard modifier map and keymap table that are used by client \
+applications to convert event keycodes into keysyms. It is usually run \
+from the user's session startup script to configure the keyboard \
+according to personal tastes."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=272c17e96370e1e74773fa22d9989621"
+
+PE = "1"
+SRC_URI[md5sum] = "51f1d30a525e9903280ffeea2744b1f6"
+SRC_URI[sha256sum] = "473f0941d7439d501bb895ff358832b936ec34c749b9704c37a15e11c318487c"
diff --git a/meta/recipes-graphics/xorg-app/xmodmap_1.0.9.bb b/meta/recipes-graphics/xorg-app/xmodmap_1.0.9.bb
deleted file mode 100644
index 2deac6a050..0000000000
--- a/meta/recipes-graphics/xorg-app/xmodmap_1.0.9.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "Utility for modifying keymaps and pointer button mappings in X"
-
-DESCRIPTION = "The xmodmap program is used to edit and display the \
-keyboard modifier map and keymap table that are used by client \
-applications to convert event keycodes into keysyms. It is usually run \
-from the user's session startup script to configure the keyboard \
-according to personal tastes."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=272c17e96370e1e74773fa22d9989621"
-
-PE = "1"
-
-SRC_URI[md5sum] = "723f02d3a5f98450554556205f0a9497"
-SRC_URI[sha256sum] = "b7b0e5cc5f10d0fb6d2d6ea4f00c77e8ac0e847cc5a73be94cd86139ac4ac478"
diff --git a/meta/recipes-graphics/xorg-app/xorg-app-common.inc b/meta/recipes-graphics/xorg-app/xorg-app-common.inc
index 3529cb26ef..101b3dfffd 100644
--- a/meta/recipes-graphics/xorg-app/xorg-app-common.inc
+++ b/meta/recipes-graphics/xorg-app/xorg-app-common.inc
@@ -12,6 +12,6 @@ INC_PR = "r8"
SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.bz2"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
FILES_${PN} += " ${libdir}/X11/${BPN} ${datadir}/X11/app-defaults/"
diff --git a/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb b/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb
deleted file mode 100644
index d78bf0451c..0000000000
--- a/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "Utility to display window and font properties of an X server"
-
-DESCRIPTION = "The xprop utility is for displaying window and font \
-properties in an X server. One window or font is selected using the \
-command line arguments or possibly in the case of a window, by clicking \
-on the desired window. A list of properties is then given, possibly with \
-formatting information."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e226ab8db88ac0bc0391673be40c9f91"
-
-DEPENDS += "libxmu"
-
-PE = "1"
-
-SRC_URI[md5sum] = "fae3d2fda07684027a643ca783d595cc"
-SRC_URI[sha256sum] = "9bee88b1025865ad121f72d32576dd3027af1446774aa8300cce3c261d869bc6"
diff --git a/meta/recipes-graphics/xorg-app/xprop_1.2.4.bb b/meta/recipes-graphics/xorg-app/xprop_1.2.4.bb
new file mode 100644
index 0000000000..3280813ef8
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xprop_1.2.4.bb
@@ -0,0 +1,18 @@
+require xorg-app-common.inc
+
+SUMMARY = "Utility to display window and font properties of an X server"
+
+DESCRIPTION = "The xprop utility is for displaying window and font \
+properties in an X server. One window or font is selected using the \
+command line arguments or possibly in the case of a window, by clicking \
+on the desired window. A list of properties is then given, possibly with \
+formatting information."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e226ab8db88ac0bc0391673be40c9f91"
+
+DEPENDS += "libxmu"
+
+PE = "1"
+
+SRC_URI[md5sum] = "cc369c28383a5d7144e7197ee7d30bfa"
+SRC_URI[sha256sum] = "8c77fb096e46c60032b7e2bde9492c3ffcc18734f50b395085a5f10bfd3cf753"
diff --git a/meta/recipes-graphics/xorg-app/xrandr_1.5.0.bb b/meta/recipes-graphics/xorg-app/xrandr_1.5.0.bb
deleted file mode 100644
index ea6897948d..0000000000
--- a/meta/recipes-graphics/xorg-app/xrandr_1.5.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "XRandR: X Resize, Rotate and Reflect extension command"
-
-DESCRIPTION = "Xrandr is used to set the size, orientation and/or \
-reflection of the outputs for a screen. It can also set the screen \
-size."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fe1608bdb33cf8c62a4438f7d34679b3"
-DEPENDS += "libxrandr libxrender"
-PE = "1"
-
-SRC_URI[md5sum] = "ebffac98021b8f1dc71da0c1918e9b57"
-SRC_URI[sha256sum] = "c1cfd4e1d4d708c031d60801e527abc9b6d34b85f2ffa2cadd21f75ff38151cd"
diff --git a/meta/recipes-graphics/xorg-app/xrandr_1.5.1.bb b/meta/recipes-graphics/xorg-app/xrandr_1.5.1.bb
new file mode 100644
index 0000000000..6583ea2371
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xrandr_1.5.1.bb
@@ -0,0 +1,17 @@
+require xorg-app-common.inc
+
+SUMMARY = "XRandR: X Resize, Rotate and Reflect extension command"
+
+DESCRIPTION = "Xrandr is used to set the size, orientation and/or \
+reflection of the outputs for a screen. It can also set the screen \
+size."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fe1608bdb33cf8c62a4438f7d34679b3"
+DEPENDS += "libxrandr libxrender"
+PE = "1"
+
+SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "fe40f7a4fd39dd3a02248d3e0b1972e4"
+SRC_URI[sha256sum] = "7bc76daf9d72f8aff885efad04ce06b90488a1a169d118dea8a2b661832e8762"
diff --git a/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch b/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
index 97d13a30df..a97c7b72fa 100644
--- a/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
+++ b/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
@@ -4,11 +4,11 @@ Upstream-Status: Pending
Rebase for 1.2.1 by: Yu Ke <ke.yu@intel.com>
-diff --git a/configure.ac b/configure.ac
-index 81c3ae4..26601bf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -52,11 +52,15 @@ PKG_CHECK_MODULES(SET_XEXT, xext,
+Index: xset-1.2.3/configure.ac
+===================================================================
+--- xset-1.2.3.orig/configure.ac
++++ xset-1.2.3/configure.ac
+@@ -53,11 +53,15 @@ PKG_CHECK_MODULES(SET_XEXT, xext,
AC_CHECK_HEADERS([X11/extensions/dpms.h X11/extensions/MITMisc.h],,,[#include <X11/Xlib.h>])
CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
@@ -22,5 +22,5 @@ index 81c3ae4..26601bf 100644
CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
+fi
- AC_ARG_WITH(xf86misc, AC_HELP_STRING([--without-xf86misc],[Disable xf86misc support.]),
+ AC_ARG_WITH(xf86misc, AS_HELP_STRING([--without-xf86misc],[Disable xf86misc support.]),
[USE_XF86MISC="$withval"], [USE_XF86MISC="yes"])
diff --git a/meta/recipes-graphics/xorg-app/xset_1.2.3.bb b/meta/recipes-graphics/xorg-app/xset_1.2.3.bb
deleted file mode 100644
index f683b7603f..0000000000
--- a/meta/recipes-graphics/xorg-app/xset_1.2.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "Utility for setting various user preference options of the display"
-
-DESCRIPTION = "xset is a utility that is used to set various user \
-preference options of the display."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=bea81cc9827cdf1af0e12c2b8228cf8d"
-DEPENDS += "libxext libxxf86misc libxmu libxau"
-PE = "1"
-
-SRC_URI += "file://disable-xkb.patch"
-
-SRC_URI[md5sum] = "dcd227388b57487d543cab2fd7a602d7"
-SRC_URI[sha256sum] = "4382f4fb29b88647e13f3b4bc29263134270747fc159cfc5f7e3af23588c8063"
-
-CFLAGS += "-D_GNU_SOURCE"
-EXTRA_OECONF = "--disable-xkb --without-fontcache"
diff --git a/meta/recipes-graphics/xorg-app/xset_1.2.4.bb b/meta/recipes-graphics/xorg-app/xset_1.2.4.bb
new file mode 100644
index 0000000000..e21120e788
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xset_1.2.4.bb
@@ -0,0 +1,19 @@
+require xorg-app-common.inc
+
+SUMMARY = "Utility for setting various user preference options of the display"
+
+DESCRIPTION = "xset is a utility that is used to set various user \
+preference options of the display."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bea81cc9827cdf1af0e12c2b8228cf8d"
+DEPENDS += "libxext libxmu libxau"
+PE = "1"
+
+SRC_URI += "file://disable-xkb.patch"
+
+SRC_URI[md5sum] = "70ea7bc7bacf1a124b1692605883f620"
+SRC_URI[sha256sum] = "e4fd95280df52a88e9b0abc1fee11dcf0f34fc24041b9f45a247e52df941c957"
+
+CFLAGS += "-D_GNU_SOURCE"
+EXTRA_OECONF = "--disable-xkb --without-fontcache"
diff --git a/meta/recipes-graphics/xorg-app/xvinfo_1.1.3.bb b/meta/recipes-graphics/xorg-app/xvinfo_1.1.3.bb
deleted file mode 100644
index 2965ef7f8a..0000000000
--- a/meta/recipes-graphics/xorg-app/xvinfo_1.1.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "Print out X-Video extension adaptor information"
-
-DESCRIPTION = "xvinfo prints out the capabilities of any video adaptors \
-associated with the display that are accessible through the X-Video \
-extension."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b664101ad7a1dc758a4c4109bf978e68"
-DEPENDS += " libxv"
-PE = "1"
-
-SRC_URI[md5sum] = "558360176b718dee3c39bc0648c0d10c"
-SRC_URI[sha256sum] = "9fba8b68daf53863e66d5004fa9c703fcecf69db4d151ea2d3d885d621e6e5eb"
diff --git a/meta/recipes-graphics/xorg-app/xvinfo_1.1.4.bb b/meta/recipes-graphics/xorg-app/xvinfo_1.1.4.bb
new file mode 100644
index 0000000000..a913ae11f3
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xvinfo_1.1.4.bb
@@ -0,0 +1,14 @@
+require xorg-app-common.inc
+
+SUMMARY = "Print out X-Video extension adaptor information"
+
+DESCRIPTION = "xvinfo prints out the capabilities of any video adaptors \
+associated with the display that are accessible through the X-Video \
+extension."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b664101ad7a1dc758a4c4109bf978e68"
+DEPENDS += " libxv"
+PE = "1"
+
+SRC_URI[md5sum] = "b13afec137b9b331814a9824ab03ec80"
+SRC_URI[sha256sum] = "0353220d6606077ba42363db65f50410759f9815352f77adc799e2adfa76e73f"
diff --git a/meta/recipes-graphics/xorg-app/xwininfo_1.1.3.bb b/meta/recipes-graphics/xorg-app/xwininfo_1.1.3.bb
deleted file mode 100644
index 0c23d19437..0000000000
--- a/meta/recipes-graphics/xorg-app/xwininfo_1.1.3.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "Window information utility for X"
-
-DESCRIPTION = "Xwininfo is a utility for displaying information about \
-windows. Information may include window position, size, color depth, \
-and a number of other items."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=78976cd3115f6faf615accc4e094d90e"
-DEPENDS += "libxext libxmu gettext-native"
-
-PE = "0"
-
-SRC_URI[md5sum] = "b777bafb674555e48fd8437618270931"
-SRC_URI[sha256sum] = "218eb0ea95bd8de7903dfaa26423820c523ad1598be0751d2d8b6a2c23b23ff8"
diff --git a/meta/recipes-graphics/xorg-app/xwininfo_1.1.5.bb b/meta/recipes-graphics/xorg-app/xwininfo_1.1.5.bb
new file mode 100644
index 0000000000..ec9f08268e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-app/xwininfo_1.1.5.bb
@@ -0,0 +1,15 @@
+require xorg-app-common.inc
+
+SUMMARY = "Window information utility for X"
+
+DESCRIPTION = "Xwininfo is a utility for displaying information about \
+windows. Information may include window position, size, color depth, \
+and a number of other items."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=78976cd3115f6faf615accc4e094d90e"
+DEPENDS += "libxext libxmu gettext-native"
+
+PE = "0"
+
+SRC_URI[md5sum] = "26d46f7ef0588d3392da3ad5802be420"
+SRC_URI[sha256sum] = "7a405441dfc476666c744f5fcd1bc8a75abf8b5b1d85db7b88b370982365080e"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb b/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb
deleted file mode 100644
index f81c3ec64d..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- event devices (evdev) input driver"
-
-DESCRIPTION = "evdev is an Xorg input driver for Linux's generic event \
-devices. It therefore supports all input devices that the kernel knows \
-about, including most mice and keyboards. \
-\
-The evdev driver can serve as both a pointer and a keyboard input \
-device, and may be used as both the core keyboard and the core pointer. \
-Multiple input devices are supported by multiple instances of this \
-driver, with one Load directive for evdev in the Module section of your \
-xorg.conf for each input device that will use this driver. "
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
-
-DEPENDS += "mtdev libevdev"
-
-SRC_URI[md5sum] = "aa3363ce5061d0c4d1e7f7019b99716d"
-SRC_URI[sha256sum] = "5aa21ba4be8df927e5676a99c7f4f0343abc089f5451b7e73e39536f29b332a2"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.6.bb b/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.6.bb
new file mode 100644
index 0000000000..60e325cebb
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.6.bb
@@ -0,0 +1,20 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- event devices (evdev) input driver"
+
+DESCRIPTION = "evdev is an Xorg input driver for Linux's generic event \
+devices. It therefore supports all input devices that the kernel knows \
+about, including most mice and keyboards. \
+\
+The evdev driver can serve as both a pointer and a keyboard input \
+device, and may be used as both the core keyboard and the core pointer. \
+Multiple input devices are supported by multiple instances of this \
+driver, with one Load directive for evdev in the Module section of your \
+xorg.conf for each input device that will use this driver. "
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
+
+DEPENDS += "mtdev libevdev"
+
+SRC_URI[md5sum] = "e8bd1edc6751f92e425cae7eba3c61eb"
+SRC_URI[sha256sum] = "8726073e81861bc7b2321e76272cbdbd33c7e1a121535a9827977265b9033ec0"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb b/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb
deleted file mode 100644
index 6fe51accb9..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- keyboard input driver"
-
-DESCRIPTION = "keyboard is an Xorg input driver for keyboards. The \
-driver supports the standard OS-provided keyboard interface. The driver \
-functions as a keyboard input device, and may be used as the X server's \
-core keyboard."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea2099d24ac9e316a6d4b9f20b3d4e10"
-
-SRC_URI[md5sum] = "96ccc43d389b970afbd3893875dfd678"
-SRC_URI[sha256sum] = "1ac8ff39bf9da7d2fc7fd6c24515726e8138340c0518ab8c606e008cf93ca211"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.9.0.bb b/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.9.0.bb
new file mode 100644
index 0000000000..1896fff9f9
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.9.0.bb
@@ -0,0 +1,13 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- keyboard input driver"
+
+DESCRIPTION = "keyboard is an Xorg input driver for keyboards. The \
+driver supports the standard OS-provided keyboard interface. The driver \
+functions as a keyboard input device, and may be used as the X server's \
+core keyboard."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=ea2099d24ac9e316a6d4b9f20b3d4e10"
+
+SRC_URI[md5sum] = "a3a3f0dd32361dcdbd406e894dafe090"
+SRC_URI[sha256sum] = "f7c900f21752683402992b288d5a2826de7a6c0c0abac2aadd7e8a409e170388"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb b/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb
deleted file mode 100644
index dfb08f724b..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- keyboard input driver"
-
-DESCRIPTION = "keyboard is an Xorg input driver for keyboards. The \
-driver supports the standard OS-provided keyboard interface. The driver \
-functions as a keyboard input device, and may be used as the X server's \
-core keyboard."
-
-SRCREV = "3e28d68b50d291938734e9684b8296ca864f3892"
-PV = "1.3.2+git${SRCPV}"
-PR = "${INC_PR}.0"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-keyboard"
-S = "${WORKDIR}/git"
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb b/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb
deleted file mode 100644
index 5e5c4710a5..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "Generic input driver for the X.Org server based on libinput"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
-
-DEPENDS += "libinput"
-
-SRC_URI[md5sum] = "52c38b1369764243bfcf6ead1e4c6d32"
-SRC_URI[sha256sum] = "6c5d30dc7c8b8ae34261340e1dc9cbb8ef435078e084b8ef507527a8a21af477"
-
-FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.29.0.bb b/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.29.0.bb
new file mode 100644
index 0000000000..f87083e575
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.29.0.bb
@@ -0,0 +1,11 @@
+require xorg-driver-input.inc
+
+SUMMARY = "Generic input driver for the X.Org server based on libinput"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
+
+DEPENDS += "libinput"
+
+SRC_URI[md5sum] = "d600e8e2e30747b8ce49ec5294ff0ab6"
+SRC_URI[sha256sum] = "c28b56a21754b972db31798e6a4cf4dc9d69208d08f8fe41701a94def5e94bee"
+
+FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch b/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch
deleted file mode 100644
index 6930864ede..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Unbreak the linux mouse driver by using config.h
-
-RP - 4/11/07
-
-Upstream-Status: Pending
-
-Index: git/src/lnx_mouse.c
-===================================================================
---- git.orig/src/lnx_mouse.c 2008-11-04 23:46:05.000000000 +0000
-+++ git/src/lnx_mouse.c 2008-11-04 23:46:15.000000000 +0000
-@@ -3,8 +3,8 @@
- * Copyright 1999 by The XFree86 Project, Inc.
- */
-
--#ifdef HAVE_XORG_CONFIG_H
--#include <xorg-config.h>
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
- #endif
-
- #include <X11/X.h>
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb b/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
deleted file mode 100644
index 1f0b78a157..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- mouse input driver"
-
-DESCRIPTION = "mouse is an Xorg input driver for mice. The driver \
-supports most available mouse types and interfaces. The mouse driver \
-functions as a pointer input device, and may be used as the X server's \
-core pointer. Multiple mice are supported by multiple instances of this \
-driver."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=90ea9f90d72b6d9327dede5ffdb2a510"
-
-SRC_URI[md5sum] = "77085b649c5c0b333565ba562f573951"
-SRC_URI[sha256sum] = "3485d375779c08406f0789feedde15933dc703158a086ddac638598f479fc5ce"
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.3.bb b/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.3.bb
new file mode 100644
index 0000000000..c38dab505b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.3.bb
@@ -0,0 +1,14 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- mouse input driver"
+
+DESCRIPTION = "mouse is an Xorg input driver for mice. The driver \
+supports most available mouse types and interfaces. The mouse driver \
+functions as a pointer input device, and may be used as the X server's \
+core pointer. Multiple mice are supported by multiple instances of this \
+driver."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=90ea9f90d72b6d9327dede5ffdb2a510"
+
+SRC_URI[md5sum] = "a2104693bbcfe1413397f7905eecd3dc"
+SRC_URI[sha256sum] = "93ecb350604d05be98b7d4e5db3b8155a44890069a7d8d6b800c0bea79c85cc5"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb b/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb
deleted file mode 100644
index d79a2e4dde..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- mouse input driver"
-
-DESCRIPTION = "mouse is an Xorg input driver for mice. The driver \
-supports most available mouse types and interfaces. The mouse driver \
-functions as a pointer input device, and may be used as the X server's \
-core pointer. Multiple mice are supported by multiple instances of this \
-driver."
-
-SRCREV = "ea5cfe804e112f320f14ad896c7802d53551d3e6"
-PV = "1.3.0+git${SRCPV}"
-PR = "${INC_PR}.0"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-mouse \
- file://unbreak.patch"
-S = "${WORKDIR}/git"
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch
new file mode 100644
index 0000000000..4bb7fb3e23
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch
@@ -0,0 +1,51 @@
+This patch avoids using time field of input_event structure which is not available
+on 32bit arches supporting 64bit time_t structs, Patch makes it compatible with new
+and keeps old input.h implementation functional as well.
+
+See https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/src/eventcomm.c
++++ b/src/eventcomm.c
+@@ -575,10 +575,12 @@ SynapticsReadEvent(InputInfoPtr pInfo, s
+ ev->type = EV_SYN;
+ ev->code = SYN_REPORT;
+ ev->value = 0;
+- ev->time = last_event_time;
+- } else if (ev->type == EV_SYN)
+- last_event_time = ev->time;
+-
++ ev->input_event_sec = last_event_time.tv_sec;
++ ev->input_event_usec = last_event_time.tv_usec;
++ } else if (ev->type == EV_SYN) {
++ last_event_time.tv_sec = ev->input_event_sec;
++ last_event_time.tv_usec = ev->input_event_usec;
++ }
+ return TRUE;
+ }
+
+@@ -725,7 +727,7 @@ EventReadHwState(InputInfoPtr pInfo,
+ case SYN_REPORT:
+ hw->numFingers = count_fingers(pInfo, comm);
+ if (proto_data->have_monotonic_clock)
+- hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000;
++ hw->millis = 1000 * ev.input_event_sec + ev.input_event_usec / 1000;
+ else
+ hw->millis = GetTimeInMillis();
+ SynapticsCopyHwState(hwRet, hw);
+--- a/src/eventcomm.h
++++ b/src/eventcomm.h
+@@ -34,6 +34,11 @@
+ #include <xf86Xinput.h>
+ #include "synproto.h"
+
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ /* for auto-dev: */
+ #define DEV_INPUT_EVENT "/dev/input"
+ #define EVENT_DEV_NAME "event"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb
deleted file mode 100644
index b47c82cc60..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- synaptics touchpad input driver"
-
-DESCRIPTION = "synaptics is an Xorg input driver for the touchpads from \
-Synaptics Incorporated. Even though these touchpads (by default, \
-operating in a compatibility mode emulating a standard mouse) can be \
-handled by the normal evdev or mouse drivers, this driver allows more \
-advanced features of the touchpad to become available."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
-
-SRC_URI[md5sum] = "4e3c8bed1ab4a67db2160c2c3d7e2a34"
-SRC_URI[sha256sum] = "d39f100c74f3673778b53f17bab7690161925e25dd998a15dd8cc69b52e83f01"
-
-DEPENDS += "libxi mtdev libxtst libevdev"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb
new file mode 100644
index 0000000000..388350c96e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb
@@ -0,0 +1,18 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- synaptics touchpad input driver"
+
+DESCRIPTION = "synaptics is an Xorg input driver for the touchpads from \
+Synaptics Incorporated. Even though these touchpads (by default, \
+operating in a compatibility mode emulating a standard mouse) can be \
+handled by the normal evdev or mouse drivers, this driver allows more \
+advanced features of the touchpad to become available."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
+
+SRC_URI += "file://64bit_time_t_support.patch"
+
+SRC_URI[md5sum] = "cfb79d3c975151f9bbf30b727c260cb9"
+SRC_URI[sha256sum] = "7af83526eff1c76e8b9e1553b34245c203d029028d8044dd9dcf71eef1001576"
+
+DEPENDS += "libxi mtdev libxtst libevdev"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb
deleted file mode 100644
index 140f633b42..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- synaptics touchpad input driver"
-
-DESCRIPTION = "synaptics is an Xorg input driver for the touchpads from \
-Synaptics Incorporated. Even though these touchpads (by default, \
-operating in a compatibility mode emulating a standard mouse) can be \
-handled by the normal evdev or mouse drivers, this driver allows more \
-advanced features of the touchpad to become available."
-
-SRCREV = "934bc0012f948c52aadc8eda912f7728fb7394a2"
-PV = "0.15.2+git${SRCPV}"
-PR = "${INC_PR}.1"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-synaptics"
-S = "${WORKDIR}/git"
-
-DEPENDS += "libxi mtdev libxtst"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.4.bb b/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.4.bb
deleted file mode 100644
index 52e9bd1dfa..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.4.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require xorg-driver-video.inc
-
-SUMMARY = "X.Org X server -- fbdev display driver"
-DESCRIPTION = "fbdev is an Xorg driver for framebuffer devices. This is a non-accelerated driver."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8"
-
-SRC_URI[md5sum] = "3931c0e19d441cc576dc088f9eb9fd73"
-SRC_URI[sha256sum] = "9dd4b326498223abbfdf786089a46ea3db4fa6bbd341308eb48a9e00bc3fd51b"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.5.0.bb b/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.5.0.bb
new file mode 100644
index 0000000000..7b4ac88a4c
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.5.0.bb
@@ -0,0 +1,9 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- fbdev display driver"
+DESCRIPTION = "fbdev is an Xorg driver for framebuffer devices. This is a non-accelerated driver."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8"
+
+SRC_URI[md5sum] = "f07475655376be5a124d8187aacd87b6"
+SRC_URI[sha256sum] = "dcc3d85f378022180e437a9ec00a59b6cb7680ff79c40394d695060af2374699"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch
deleted file mode 100644
index 35762192fd..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From c43617b739e358064396912c7a7a8028ca91d201 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
-Date: Thu, 16 Apr 2015 20:40:39 +0300
-Subject: [PATCH] gen8: Fix the YUV->RGB shader
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Use the correct register (Yn_01) with first half of the
-Y samples instead of using the register (Yn_23) with the
-second half twice when computing the green channel.
-
-Also use the Yn_01 register name instead of Yn for the red
-channel as well, just for a bit of extra consistency.
-
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89807
-Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
-
-Upstream-Status: Backport
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
----
- src/render_program/exa_wm_yuv_rgb.g8a | 4 ++--
- src/render_program/exa_wm_yuv_rgb.g8b | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/render_program/exa_wm_yuv_rgb.g8a b/src/render_program/exa_wm_yuv_rgb.g8a
-index 7def093..34973ba 100644
---- a/src/render_program/exa_wm_yuv_rgb.g8a
-+++ b/src/render_program/exa_wm_yuv_rgb.g8a
-@@ -76,7 +76,7 @@ add (16) Cbn<1>F Cb<8,8,1>F -0.501961F { compr align1 };
- /*
- * R = Y + Cr * 1.596
- */
--mov (8) acc0<1>F Yn<8,8,1>F { compr align1 };
-+mov (8) acc0<1>F Yn_01<8,8,1>F { compr align1 };
- mac.sat(8) src_sample_r_01<1>F Crn_01<8,8,1>F 1.596F { compr align1 };
-
- mov (8) acc0<1>F Yn_23<8,8,1>F { compr align1 };
-@@ -84,7 +84,7 @@ mac.sat(8) src_sample_r_23<1>F Crn_23<8,8,1>F 1.596F { compr align1 };
- /*
- * G = Crn * -0.813 + Cbn * -0.392 + Y
- */
--mov (8) acc0<1>F Yn_23<8,8,1>F { compr align1 };
-+mov (8) acc0<1>F Yn_01<8,8,1>F { compr align1 };
- mac (8) acc0<1>F Crn_01<8,8,1>F -0.813F { compr align1 };
- mac.sat(8) src_sample_g_01<1>F Cbn_01<8,8,1>F -0.392F { compr align1 };
-
-diff --git a/src/render_program/exa_wm_yuv_rgb.g8b b/src/render_program/exa_wm_yuv_rgb.g8b
-index 4494953..2cd6fc4 100644
---- a/src/render_program/exa_wm_yuv_rgb.g8b
-+++ b/src/render_program/exa_wm_yuv_rgb.g8b
-@@ -6,7 +6,7 @@
- { 0x80600048, 0x21c03ae8, 0x3e8d02c0, 0x3fcc49ba },
- { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
- { 0x80600048, 0x21e03ae8, 0x3e8d02e0, 0x3fcc49ba },
-- { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
-+ { 0x00600001, 0x24003ae0, 0x008d0300, 0x00000000 },
- { 0x00600048, 0x24003ae0, 0x3e8d02c0, 0xbf5020c5 },
- { 0x80600048, 0x22003ae8, 0x3e8d0340, 0xbec8b439 },
- { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
---
-2.5.0
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
deleted file mode 100644
index 29924bb90c..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 2c5063938cc809f624e56efd4673041fa8141e81 Mon Sep 17 00:00:00 2001
-From: Martin Peres <martin.peres@linux.intel.com>
-Date: Thu, 9 Jul 2015 11:26:38 +0300
-Subject: [PATCH] uxa: fix the call to PixmapSyncDirtyHelper, broken by
- xserver's 90db5ed
-
-[ickle: switch to HAS_DIRTYTRACKING_ROTATION as suggested by Dave Airlie]
-Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
-
-Upstream-Status: Backport
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- src/compat-api.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/compat-api.h b/src/compat-api.h
-index aa93bee..293e9d7 100644
---- a/src/compat-api.h
-+++ b/src/compat-api.h
-@@ -247,3 +247,7 @@ static inline void FreePixmap(PixmapPtr pixmap)
- #endif
-
- #endif
-+
-+#if HAS_DIRTYTRACKING_ROTATION
-+#define PixmapSyncDirtyHelper(d, dd) PixmapSyncDirtyHelper(d)
-+#endif
---
-2.5.0
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/01_Fix-build-on-i686.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/01_Fix-build-on-i686.patch
new file mode 100644
index 0000000000..52916f8b4a
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/01_Fix-build-on-i686.patch
@@ -0,0 +1,55 @@
+From a414d4e24461da1cb4cef8ee910bc57bab360ceb Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Tue, 6 Mar 2018 12:07:46 -0500
+Subject: [PATCH] Fix build on i686
+
+Presumably this only matters for i686 because amd64 implies sse2, but:
+
+BUILDSTDERR: In file included from gen4_vertex.c:34:
+BUILDSTDERR: gen4_vertex.c: In function 'emit_vertex':
+BUILDSTDERR: sna_render_inline.h:40:26: error: inlining failed in call to always_inline 'vertex_emit_2s': target specific option mismatch
+BUILDSTDERR: static force_inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y)
+BUILDSTDERR: ^~~~~~~~~~~~~~
+BUILDSTDERR: gen4_vertex.c:308:25: note: called from here
+BUILDSTDERR: #define OUT_VERTEX(x,y) vertex_emit_2s(sna, x,y) /* XXX assert(!too_large(x, y)); */
+BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
+BUILDSTDERR: gen4_vertex.c:360:2: note: in expansion of macro 'OUT_VERTEX'
+BUILDSTDERR: OUT_VERTEX(dstX, dstY);
+BUILDSTDERR: ^~~~~~~~~~
+
+The bug here appears to be that emit_vertex() is declared 'sse2' but
+vertex_emit_2s is merely always_inline. gcc8 decides that since you said
+always_inline you need to have explicitly cloned it for every
+permutation of targets. Merely saying inline seems to do the job of
+cloning vertex_emit_2s as much as necessary.
+
+So to reiterate: if you say always-inline, it won't, but if you just say
+maybe inline, it will. Thanks gcc, that's helpful.
+
+- ajax
+
+Patch taken from Fedora.
+
+Upstream-Status: Pending
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+---
+ src/sna/compiler.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sna/compiler.h b/src/sna/compiler.h
+index 3c176a16..bc447c7a 100644
+--- a/src/sna/compiler.h
++++ b/src/sna/compiler.h
+@@ -32,7 +32,7 @@
+ #define likely(expr) (__builtin_expect (!!(expr), 1))
+ #define unlikely(expr) (__builtin_expect (!!(expr), 0))
+ #define noinline __attribute__((noinline))
+-#define force_inline inline __attribute__((always_inline))
++#define force_inline inline
+ #define fastcall __attribute__((regparm(3)))
+ #define must_check __attribute__((warn_unused_result))
+ #define constant __attribute__((const))
+--
+2.16.2
+
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch
deleted file mode 100644
index 8a5dd39ae1..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Include xorg-server.h to fix build errors seen with glibc 2.20
-
-In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-intel/2_2.99.912-r0/xf86-video-intel-2.99.912/src/backlight.c:39:
-/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
- strndup(const char *str, size_t n);
- ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-Index: xf86-video-intel-2.99.912/src/backlight.c
-===================================================================
---- xf86-video-intel-2.99.912.orig/src/backlight.c 2014-04-09 10:41:18.000000000 -0700
-+++ xf86-video-intel-2.99.912/src/backlight.c 2014-08-28 18:52:25.524070587 -0700
-@@ -29,6 +29,7 @@
- #include "config.h"
- #endif
-
-+#include <xorg-server.h>
- #include <sys/types.h>
- #include <sys/wait.h>
- #include <sys/stat.h>
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
deleted file mode 100644
index dda508dcfd..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-These modules are only used for tests that don't get installed, and the
-automatic detection without explicit dependencies means that a build can find
-e.g. xshmfence at configure time but then it's been removed from the sysroot by
-the time compile happens.
-
-As the tests don't get installed, just disable the checks.
-
-Upstream-Status: Inappropriate [OE-specific]
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index bd654f3..78a0e0d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -251 +251 @@ fi
--PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-present x11-xcb xshmfence x11 xrender xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
-+#PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-present x11-xcb xshmfence x11 xrender xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch
deleted file mode 100644
index 589d52e0f0..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 7fe2b2948652443ff43d907855bd7a051d54d309 Mon Sep 17 00:00:00 2001
-From: Chris Wilson <chris@chris-wilson.co.uk>
-Date: Thu, 19 Mar 2015 23:14:17 +0000
-Subject: [PATCH] sna: Protect against ABI breakage in recent versions of
- libdrm
-
-commit 7fe2b2948652443ff43d907855bd7a051d54d309 upstream.
-
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-Upstream-Status: Backport
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/src/sna/kgem.c b/src/sna/kgem.c
-index 11f0828f2bbc..6f16cbac87f2 100644
---- a/src/sna/kgem.c
-+++ b/src/sna/kgem.c
-@@ -182,6 +182,15 @@ struct local_i915_gem_caching {
- #define LOCAL_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_SET_CACHING, struct local_i915_gem_caching)
- #define LOCAL_IOCTL_I915_GEM_GET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_GET_CACHING, struct local_i915_gem_caching)
-
-+struct local_i915_gem_mmap {
-+ uint32_t handle;
-+ uint32_t pad;
-+ uint64_t offset;
-+ uint64_t size;
-+ uint64_t addr_ptr;
-+};
-+#define LOCAL_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct local_i915_gem_mmap)
-+
- struct local_i915_gem_mmap2 {
- uint32_t handle;
- uint32_t pad;
-@@ -514,15 +523,15 @@ retry_wc:
-
- static void *__kgem_bo_map__cpu(struct kgem *kgem, struct kgem_bo *bo)
- {
-- struct drm_i915_gem_mmap mmap_arg;
-+ struct local_i915_gem_mmap arg;
- int err;
-
- retry:
-- VG_CLEAR(mmap_arg);
-- mmap_arg.handle = bo->handle;
-- mmap_arg.offset = 0;
-- mmap_arg.size = bytes(bo);
-- if ((err = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_MMAP, &mmap_arg))) {
-+ VG_CLEAR(arg);
-+ arg.handle = bo->handle;
-+ arg.offset = 0;
-+ arg.size = bytes(bo);
-+ if ((err = do_ioctl(kgem->fd, LOCAL_IOCTL_I915_GEM_MMAP, &arg))) {
- assert(err != EINVAL);
-
- if (__kgem_throttle_retire(kgem, 0))
-@@ -536,10 +545,10 @@ retry:
- return NULL;
- }
-
-- VG(VALGRIND_MAKE_MEM_DEFINED(mmap_arg.addr_ptr, bytes(bo)));
-+ VG(VALGRIND_MAKE_MEM_DEFINED(arg.addr_ptr, bytes(bo)));
-
- DBG(("%s: caching CPU vma for %d\n", __FUNCTION__, bo->handle));
-- return bo->map__cpu = (void *)(uintptr_t)mmap_arg.addr_ptr;
-+ return bo->map__cpu = (void *)(uintptr_t)arg.addr_ptr;
- }
-
- static int gem_write(int fd, uint32_t handle,
---
-2.4.4
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch
deleted file mode 100644
index 0e675ee9f2..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 12af8a575d1518d40416f83195049157c3a062a5 Mon Sep 17 00:00:00 2001
-From: Chris Wilson <chris@chris-wilson.co.uk>
-Date: Tue, 24 Feb 2015 15:25:40 +0000
-Subject: sna: udev integration depends on fstat and sys/stat.h
-
-src/sna/sna_driver.c: In function 'sna_handle_uevents':
-src/sna/sna_driver.c:759:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
-
-Also take the opportunity to include udev support in the configure
-summary.
-
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-
-diff --git a/configure.ac b/configure.ac
-index 7476e2b..de3a4b3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -197,11 +197,15 @@ AC_ARG_ENABLE(udev,
-
- if test "x$UDEV" != "xno"; then
- PKG_CHECK_MODULES(UDEV, [libudev], [udev="yes"], [udev="no"])
-+ AC_CHECK_HEADERS([sys/stat.h], [], [udev="no"])
- if test "x$UDEV" = "xyes" -a "x$udev" != "xyes"; then
- AC_MSG_ERROR([udev support requested but not found (libudev)])
- fi
- if test "x$udev" = "xyes"; then
- AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
-+ udev_msg=" yes"
-+ else
-+ udev_msg=" no"
- fi
- fi
-
-@@ -911,6 +915,7 @@ echo " Support for Kernel Mode Setting? $KMS"
- echo " Support for legacy User Mode Setting (for i810)? $UMS"
- echo " Support for Direct Rendering Infrastructure:$dri_msg"
- echo " Support for Xv motion compensation (XvMC and libXvMC):$xvmc_msg"
-+echo " Support for display hotplug notifications (udev):$udev_msg"
- echo " Build additional tools and utilities?$tools_msg"
- if test -n "$xp_msg"; then
- echo " Experimental support:$xp_msg"
-diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
-index 8c0d0b5..bc20ef0 100644
---- a/src/sna/sna_driver.c
-+++ b/src/sna/sna_driver.c
-@@ -740,6 +740,8 @@ sna_wakeup_handler(WAKEUPHANDLER_ARGS_DECL)
- }
-
- #if HAVE_UDEV
-+#include <sys/stat.h>
-+
- static void
- sna_handle_uevents(int fd, void *closure)
- {
---
-cgit v0.10.2
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
deleted file mode 100644
index d75b44f17e..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-require xorg-driver-video.inc
-
-SUMMARY = "X.Org X server -- Intel integrated graphics chipsets driver"
-
-DESCRIPTION = "intel is an Xorg driver for Intel integrated graphics \
-chipsets. The driver supports depths 8, 15, 16 and 24. On some chipsets, \
-the driver supports hardware accelerated 3D via the Direct Rendering \
-Infrastructure (DRI)."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
-
-SRC_URI += "file://disable-x11-dri3.patch \
- file://always_include_xorg_server.h.patch \
- file://sna-Protect-against-ABI-breakage-in-recent-versions-.patch \
- file://udev-fstat.patch \
- file://0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch \
- file://0001-gen8-Fix-the-YUV-RGB-shader.patch \
- "
-
-SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
-SRC_URI[sha256sum] = "00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9"
-
-DEPENDS += "virtual/libx11 drm libpciaccess pixman"
-
-PACKAGECONFIG ??= "xvmc sna udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri1 dri2', '', d)}"
-
-PACKAGECONFIG[dri] = "--enable-dri,--disable-dri"
-PACKAGECONFIG[dri1] = "--enable-dri1,--disable-dri1,xf86driproto"
-PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
-PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
-PACKAGECONFIG[sna] = "--enable-sna,--disable-sna"
-PACKAGECONFIG[uxa] = "--enable-uxa,--disable-uxa"
-PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
-PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc xcb-util"
-PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxext libxrender"
-
-# --enable-kms-only option is required by ROOTLESS_X
-EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
-
-COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
-
-FILES_${PN} += "${datadir}/polkit-1"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb b/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
new file mode 100644
index 0000000000..bf9009bda0
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
@@ -0,0 +1,42 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- Intel integrated graphics chipsets driver"
+
+DESCRIPTION = "intel is an Xorg driver for Intel integrated graphics \
+chipsets. The driver supports depths 8, 15, 16 and 24. On some chipsets, \
+the driver supports hardware accelerated 3D via the Direct Rendering \
+Infrastructure (DRI)."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
+
+SRCREV = "33ee0c3b21ea279e08d0863fcb2e874f0974b00e"
+PV = "2.99.917+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel \
+ "
+
+SRC_URI_append_qemux86 = "file://01_Fix-build-on-i686.patch"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+DEPENDS += "virtual/libx11 drm libpciaccess pixman"
+
+PACKAGECONFIG ??= "sna xvmc uxa udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri2 dri3', '', d)}"
+
+PACKAGECONFIG[dri] = "--enable-dri,--disable-dri"
+PACKAGECONFIG[dri1] = "--enable-dri1,--disable-dri1"
+PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2"
+PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3"
+PACKAGECONFIG[sna] = "--enable-sna,--disable-sna"
+PACKAGECONFIG[uxa] = "--enable-uxa,--disable-uxa"
+PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
+PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc xcb-util"
+PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxrender libxscrnsaver libxext libx11 pixman libxcb libxshmfence"
+
+# --enable-kms-only option is required by ROOTLESS_X
+EXTRA_OECONF += '${@oe.utils.conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
+
+COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
+
+FILES_${PN} += "${datadir}/polkit-1"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb b/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb
deleted file mode 100644
index 78954497a2..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-require xorg-driver-video.inc
-
-SUMMARY = "X.Org X server -- Texas Instruments OMAP framebuffer driver"
-
-SUMMARY = "X.Org X server -- TI OMAP integrated graphics chipsets driver"
-
-DESCRIPTION = "Open-source X.org graphics driver for TI OMAP graphics \
-Currently relies on a closed-source submodule for EXA acceleration on \
-the following chipsets: \
- + OMAP3430 \
- + OMAP3630 \
- + OMAP4430 \
- + OMAP4460 \
- + OMAP5430 \
- + OMAP5432 \
-\
-NOTE: this driver is work in progress.. you probably don't want to try \
-and use it yet. The API/ABI between driver and kernel, and driver and \
-acceleration submodules is not stable yet. This driver requires the \
-omapdrm kernel driver w/ GEM support. \
-"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602"
-DEPENDS += "virtual/libx11 libdrm xf86driproto"
-
-SRC_URI[md5sum] = "a364e151a537948f75bb8c9b840a31da"
-SRC_URI[sha256sum] = "a7192690b8638f5c8d611a1bae07cc13081e22edd4070f37a2f5c3f8d79e7ebc"
-
-CFLAGS += " -I${STAGING_INCDIR}/xorg "
-
-# Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
-do_compile_prepend_armv7a () {
- sed -i -e s:fb1:fb2:g ${S}/src/omap_xv.c
-}
-
-python () {
- if not bb.utils.contains ('DISTRO_FEATURES', 'opengl', True, False, d):
- raise bb.parse.SkipPackage("'opengl' not in DISTRO_FEATURES")
-}
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch
deleted file mode 100644
index c4cf16eb05..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 28c006c94e57ea71df11ec4fff79d7ffcfc4860f Mon Sep 17 00:00:00 2001
-From: Far McKon <FarMcKon@buglabs.net>
-Date: Tue, 3 May 2011 20:59:04 +0300
-Subject: [PATCH] Prevents omapfb from from crashing when pixelclock of 0 is
- sent to it.
-
-Due to a Linux design bug it is easy to get a pixelclock set to zero
-when changing displays at runtime.
----
- src/omapfb-output.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/omapfb-output.c b/src/omapfb-output.c
-index f8b4db3..4d59265 100644
---- a/src/omapfb-output.c
-+++ b/src/omapfb-output.c
-@@ -125,8 +125,13 @@ OMAPFBOutputGetModes(xf86OutputPtr output)
- /* Only populate the native (current) mode */
- mode = calloc(1, sizeof(DisplayModeRec));
- mode->type |= M_T_PREFERRED;
-- mode->Clock = PICOS2KHZ(ofb->state_info.pixclock);
-- mode->SynthClock = PICOS2KHZ(ofb->state_info.pixclock);
-+ if (ofb->state_info.pixclock == 0) {
-+ mode->Clock = 0;
-+ mode->SynthClock = 0;
-+ } else {
-+ mode->Clock = PICOS2KHZ(ofb->state_info.pixclock);
-+ mode->SynthClock = PICOS2KHZ(ofb->state_info.pixclock);
-+ }
- mode->HDisplay = ofb->state_info.xres;
- mode->HSyncStart = mode->HDisplay
- + ofb->state_info.right_margin;
---
-2.1.4
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch
deleted file mode 100644
index 9fb01d438a..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8fb7d0f99d4afbb574b30cb4f1e66a8f89d94ad5 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 26 Jan 2011 12:04:36 +0100
-Subject: [PATCH 1/6] Revert "Set a large CRTC upper limit to not prune larger
- resolutions"
-
-Picture is garbled after switching resolutions, so revert it.
-Virtual size too big, revert the commit 9c4d7592dcb7dc20a48a6f941d9d94bd73d34153.
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/omapfb-crtc.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/omapfb-crtc.c b/src/omapfb-crtc.c
-index 9aaa52f..cbeff35 100644
---- a/src/omapfb-crtc.c
-+++ b/src/omapfb-crtc.c
-@@ -190,13 +190,13 @@ OMAPFBCRTCInit(ScrnInfoPtr pScrn)
- * In practise, this doesn't seem to be supported.
- * (no way to setup the overlay offset/base address)
- */
-- /* FIXME: figure out what makes sense here. A known max resolution?
-- * framebuffer size?
-- */
- xf86CrtcSetSizeRange(pScrn,
-- 8, 8, 2048, 2048);
-+ 8, 8,
-+ ofb->state_info.xres_virtual,
-+ ofb->state_info.yres_virtual);
-
- ofb->crtc = xf86CrtcCreate(pScrn, &OMAPFBCrtcFuncs);
-+
- }
-
-
---
-1.8.0
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch
deleted file mode 100644
index 683a989832..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 855c333ac0d16350f895f1d1b9391e9cbb0b6db4 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 26 Jan 2011 13:27:20 +0100
-Subject: [PATCH 2/6] Revert "Set virtual size when configuring framebuffer"
-
-Virtual size too big, so revert it.
-
-This reverts commit 2653ef07883fbd1a5e7025f9300cf89b79ba429a.
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/omapfb-crtc.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/omapfb-crtc.c b/src/omapfb-crtc.c
-index cbeff35..9655db2 100644
---- a/src/omapfb-crtc.c
-+++ b/src/omapfb-crtc.c
-@@ -98,8 +98,6 @@ OMAPFBCrtcCommitChangeMode (xf86CrtcPtr crtc)
- v = ofb->state_info;
- v.xres = mode->HDisplay;
- v.yres = mode->VDisplay;
-- v.xres_virtual = crtc->scrn->virtualX;
-- v.yres_virtual = crtc->scrn->virtualY;
- v.activate = FB_ACTIVATE_NOW;
- v.pixclock = KHZ2PICOS(mode->Clock ? mode->Clock : 56000);
- v.left_margin = mode->HTotal - mode->HSyncEnd;
---
-1.8.0
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0003-force-plain-mode.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0003-force-plain-mode.patch
deleted file mode 100644
index 67ea7c1a5f..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0003-force-plain-mode.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 252f44c072d3447a32127fc9afe5d0d40f3c510e Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 26 Jan 2011 13:20:20 +0100
-Subject: [PATCH 3/6] force 'plain' mode
-
-The new DSS mode breaks XV, so force plain mode
-
-Upstream-Status: Pending
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/omapfb-driver.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c
-index 018e040..48aa09c 100644
---- a/src/omapfb-driver.c
-+++ b/src/omapfb-driver.c
-@@ -326,7 +326,7 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags)
- OMAPFBProbeController(ofb->ctrl_name);
-
- /* Do we have the DSS kernel API? */
-- if (stat(SYSFS_DSS_DIR, &st) == 0) {
-+ if (0) { //stat(SYSFS_DSS_DIR, &st) == 0) {
- ofb->dss = TRUE;
- } else {
- ofb->dss = FALSE;
---
-1.8.0
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-blacklist-tv-out.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-blacklist-tv-out.patch
deleted file mode 100644
index b0ac9a44c8..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-blacklist-tv-out.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From cfa46b67f59115f6d8ef9414af60380749ff3eb3 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 26 Jan 2011 13:21:12 +0100
-Subject: [PATCH 4/6] blacklist tv out
-
-The tv-out gets added last and the driver tries to reconfigure dvi to TV resolutions, which fails. so blacklist it
-
-Upstream-Status: Pending
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/omapfb-output-dss.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/omapfb-output-dss.c b/src/omapfb-output-dss.c
-index 6cc52de..83cb711 100644
---- a/src/omapfb-output-dss.c
-+++ b/src/omapfb-output-dss.c
-@@ -205,6 +205,10 @@ OMAPFBDSSOutputDetect (xf86OutputPtr output)
- if(ofb->timings[idx][0] == '\0')
- return XF86OutputStatusDisconnected;
-
-+ // Hack to disable the tv out
-+ if (strncmp(output->name, "tv", 2) == 0)
-+ return XF86OutputStatusDisconnected;
-+
- return XF86OutputStatusConnected;
- }
-
---
-1.8.0
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0005-Attempt-to-fix-VRFB.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0005-Attempt-to-fix-VRFB.patch
deleted file mode 100644
index 67b284023d..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0005-Attempt-to-fix-VRFB.patch
+++ /dev/null
@@ -1,325 +0,0 @@
-From 8b1f697a60e35ab82fffdabfaefdb45e9a9df379 Mon Sep 17 00:00:00 2001
-From: Eino-Ville Talvala <talvala@stanford.edu>
-Date: Tue, 23 Aug 2011 18:37:01 +0200
-Subject: [PATCH 5/6] Attempt to fix VRFB
-
-Upstream-Status: Pending
-
-http://dominion.thruhere.net/git/cgit.cgi/xf86-video-omapfb/commit/?h=koen/fixups&id=6833fc9f795265e4943d248103fbaf3463b515d6
-
-Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/image-format-conversions.c | 4 +--
- src/image-format-conversions.h | 2 +-
- src/omapfb-driver.c | 28 +++++++++++++---
- src/omapfb-xv-blizzard.c | 1 +
- src/omapfb-xv-generic.c | 72 +++++++++++++++++++++++++++++++++---------
- src/omapfb-xv.c | 3 ++
- 6 files changed, 88 insertions(+), 22 deletions(-)
-
-diff --git a/src/image-format-conversions.c b/src/image-format-conversions.c
-index dcefa9b..d43427d 100644
---- a/src/image-format-conversions.c
-+++ b/src/image-format-conversions.c
-@@ -38,13 +38,13 @@
- #include "image-format-conversions.h"
-
- /* Basic line-based copy for packed formats */
--void packed_line_copy(int w, int h, int stride, uint8_t *src, uint8_t *dest)
-+void packed_line_copy(int w, int h, int src_stride, int dst_stride, uint8_t *src, uint8_t *dest)
- {
- int i;
- int len = w * 2;
- for (i = 0; i < h; i++)
- {
-- memcpy(dest + i * len, src + i * stride, len);
-+ memcpy(dest + i * dst_stride, src + i * src_stride, len);
- }
- }
-
-diff --git a/src/image-format-conversions.h b/src/image-format-conversions.h
-index 584896a..ba7caf2 100644
---- a/src/image-format-conversions.h
-+++ b/src/image-format-conversions.h
-@@ -27,7 +27,7 @@
- #include <stdint.h>
-
- /* Basic line-based copy for packed formats */
--void packed_line_copy(int w, int h, int stride, uint8_t *src, uint8_t *dest);
-+void packed_line_copy(int w, int h, int src_stride, int dst_stride, uint8_t *src, uint8_t *dest);
-
- /* Basic C implementation of YV12/I420 to UYVY conversion */
- void uv12_to_uyvy(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest);
-diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c
-index 48aa09c..07989f5 100644
---- a/src/omapfb-driver.c
-+++ b/src/omapfb-driver.c
-@@ -66,6 +66,7 @@
- #define OMAPFB_VERSION 1000
- #define OMAPFB_DRIVER_NAME "OMAPFB"
- #define OMAPFB_NAME "omapfb"
-+#define ENFORCE_MODES
-
- static Bool OMAPFBProbe(DriverPtr drv, int flags);
- static Bool OMAPFBPreInit(ScrnInfoPtr pScrn, int flags);
-@@ -105,11 +106,13 @@ static SymTabRec OMAPFBChipsets[] = {
- typedef enum {
- OPTION_ACCELMETHOD,
- OPTION_FB,
-+ OPTION_ROTATE,
- } FBDevOpts;
-
- static const OptionInfoRec OMAPFBOptions[] = {
- { OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE },
- { OPTION_FB, "fb", OPTV_STRING, {0}, FALSE },
-+ { OPTION_ROTATE, "rotation", OPTV_STRING, {0}, FALSE },
- { -1, NULL, OPTV_NONE, {0}, FALSE }
- };
-
-@@ -286,6 +289,7 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags)
- {
- OMAPFBPtr ofb;
- EntityInfoPtr pEnt;
-+ char *rotate;
- rgb zeros = { 0, 0, 0 };
- struct stat st;
-
-@@ -379,6 +383,8 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags)
- pScrn->progClock = TRUE;
- pScrn->chipset = "omapfb";
-
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Rotate test version 0.02\n");
-+
- /* Start with configured virtual size */
- pScrn->virtualX = pScrn->display->virtualX;
- pScrn->virtualY = pScrn->display->virtualY;
-@@ -496,12 +502,21 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- ofb->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = OMAPFBCloseScreen;
-
-+ /* Enforce the default mode (this is silly I guess) */
-+#ifdef ENFORCE_MODES
-+ //xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Enforcing modes\n");
-+ //set_mode(ofb, &ofb->default_mode);
-+ //pScrn->displayWidth = ofb->fixed_info.line_length /
-+ // (ofb->state_info.bits_per_pixel>>3); //ofb->state_info.xres;
-+#endif
-+
- /* Map our framebuffer memory */
-+ ofb->mem_info.size = ofb->fixed_info.line_length * ofb->state_info.yres;
- ofb->fb = mmap (NULL, ofb->mem_info.size,
- PROT_READ | PROT_WRITE, MAP_SHARED,
- ofb->fd, 0);
-- if (ofb->fb == NULL) {
-- xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed\n");
-+ if (ofb->fb == MAP_FAILED) {
-+ xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size);
- return FALSE;
- }
-
-@@ -578,8 +593,13 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- } else if (!ofb->dss) {
-
- ofb->plane_info.enabled = 1;
-- ofb->plane_info.out_width = ofb->state_info.xres;
-- ofb->plane_info.out_height = ofb->state_info.yres;
-+ if (ofb->state_info.rotate == 0 || ofb->state_info.rotate == 2) {
-+ ofb->plane_info.out_width = ofb->state_info.xres;
-+ ofb->plane_info.out_height = ofb->state_info.yres;
-+ } else {
-+ ofb->plane_info.out_width = ofb->state_info.yres;
-+ ofb->plane_info.out_height = ofb->state_info.xres;
-+ }
-
- if (ioctl (ofb->fd, OMAPFB_SETUP_PLANE, &ofb->plane_info)) {
- xf86DrvMsg(scrnIndex, X_ERROR,
-diff --git a/src/omapfb-xv-blizzard.c b/src/omapfb-xv-blizzard.c
-index 406ffc6..b71d2aa 100644
---- a/src/omapfb-xv-blizzard.c
-+++ b/src/omapfb-xv-blizzard.c
-@@ -220,6 +220,7 @@ int OMAPFBXVPutImageBlizzard (ScrnInfoPtr pScrn,
- packed_line_copy(src_w & ~3,
- src_h & ~3,
- ((src_w + 1) & ~1) * 2,
-+ ofb->port->fixed_info.line_length,
- (uint8_t*)buf,
- (uint8_t*)ofb->port->fb);
- break;
-diff --git a/src/omapfb-xv-generic.c b/src/omapfb-xv-generic.c
-index e6f89fe..b33f344 100644
---- a/src/omapfb-xv-generic.c
-+++ b/src/omapfb-xv-generic.c
-@@ -62,7 +62,7 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn)
- {
- OMAPFBPtr ofb = OMAPFB(pScrn);
-
-- /* The memory size is already set in OMAPFBXVQueryImageAttributes */
-+ /* The memory size is already set before we get here */
- if (ioctl(ofb->port->fd, OMAPFB_SETUP_MEM, &ofb->port->mem_info) != 0) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Failed to allocate video plane memory\n");
-@@ -73,19 +73,20 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn)
- ofb->port->fb = mmap (NULL, ofb->port->mem_info.size,
- PROT_READ | PROT_WRITE, MAP_SHARED,
- ofb->port->fd, 0);
-- if (ofb->port->fb == NULL) {
-+ if (ofb->port->fb == MAP_FAILED) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Mapping video memory failed\n");
- return XvBadAlloc;
- }
-
- /* Update the state info */
-+ /* Let's not - it's bad
- if (ioctl (ofb->port->fd, FBIOGET_VSCREENINFO, &ofb->port->state_info))
- {
- xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__);
- return XvBadAlloc;
- }
--
-+ */
- return Success;
- }
-
-@@ -93,6 +94,7 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn)
- int OMAPXVSetupVideoPlane(ScrnInfoPtr pScrn)
- {
- OMAPFBPtr ofb = OMAPFB(pScrn);
-+ int ret;
-
- if (ioctl (ofb->port->fd, FBIOPUT_VSCREENINFO, &ofb->port->state_info))
- {
-@@ -104,6 +106,31 @@ int OMAPXVSetupVideoPlane(ScrnInfoPtr pScrn)
- xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__);
- return XvBadAlloc;
- }
-+ /* Changing rotation/nonstd flags can change the fixed info! */
-+ if (ioctl (ofb->port->fd, FBIOGET_FSCREENINFO, &ofb->port->fixed_info))
-+ {
-+ xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__);
-+ return XvBadAlloc;
-+ }
-+ /* Correct fixed info requires recalculation of needed memory */
-+ ofb->port->mem_info.size = ofb->port->fixed_info.line_length * ofb->port->state_info.yres;
-+
-+ /* Allocate buffer memory */
-+ ret = OMAPXVAllocPlane(pScrn);
-+ if (ret != Success)
-+ return ret;
-+
-+ /* Workaround for reset of mode after memory allo */
-+ if (ioctl (ofb->port->fd, FBIOPUT_VSCREENINFO, &ofb->port->state_info))
-+ {
-+ xf86Msg(X_ERROR, "%s: setting state info failed\n", __FUNCTION__);
-+ return XvBadAlloc;
-+ }
-+ if (ioctl (ofb->port->fd, FBIOGET_VSCREENINFO, &ofb->port->state_info))
-+ {
-+ xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__);
-+ return XvBadAlloc;
-+ }
-
- if(ioctl(ofb->port->fd, OMAPFB_SETUP_PLANE,
- &ofb->port->plane_info) != 0) {
-@@ -124,6 +151,8 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
- DrawablePtr pDraw)
- {
- OMAPFBPtr ofb = OMAPFB(pScrn);
-+ short drw_temp;
-+ short rot_xres, rot_yres;
-
- if (!ofb->port->plane_info.enabled
- || ofb->port->update_window.x != src_x
-@@ -163,13 +192,6 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
- return Success;
- }
-
-- /* If we don't have the plane running, enable it */
-- if (!ofb->port->plane_info.enabled) {
-- ret = OMAPXVAllocPlane(pScrn);
-- if (ret != Success)
-- return ret;
-- }
--
- /* Set up the state info, xres and yres will be used for
- * scaling to the values in the plane info struct
- */
-@@ -179,12 +201,31 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
- ofb->port->state_info.yres_virtual = 0;
- ofb->port->state_info.xoffset = 0;
- ofb->port->state_info.yoffset = 0;
-- ofb->port->state_info.rotate = 0;
-+ //ofb->port->state_info.rotate = 0;
- ofb->port->state_info.grayscale = 0;
- ofb->port->state_info.activate = FB_ACTIVATE_NOW;
- ofb->port->state_info.bits_per_pixel = 0;
- ofb->port->state_info.nonstd = xv_to_omapfb_format(image);
-
-+ /* Plane info does not rotate with state_info */
-+ if (ofb->port->state_info.rotate == 1 ||
-+ ofb->port->state_info.rotate == 3) {
-+ drw_temp = drw_x;
-+ drw_x = drw_y;
-+ drw_y = drw_temp;
-+
-+ drw_temp = drw_w;
-+ drw_w = drw_h;
-+ drw_h = drw_temp;
-+
-+ rot_xres = ofb->port->state_info.yres;
-+ rot_yres = ofb->port->state_info.xres;
-+ } else {
-+ rot_xres = ofb->port->state_info.xres;
-+ rot_yres = ofb->port->state_info.yres;
-+ }
-+
-+
- /* Set up the video plane info */
- ofb->port->plane_info.enabled = 1;
- ofb->port->plane_info.pos_x = drw_x;
-@@ -193,13 +234,13 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
- ofb->port->plane_info.out_height = drw_h & ~15;
-
- /* Cap output to screen size */
-- if (ofb->port->plane_info.out_width > ofb->state_info.xres) {
-+ if (ofb->port->plane_info.out_width > rot_xres) {
- ofb->port->plane_info.pos_x = 0;
-- ofb->port->plane_info.out_width = ofb->state_info.xres;
-+ ofb->port->plane_info.out_width = rot_xres;
- }
-- if (ofb->port->plane_info.out_height > ofb->state_info.yres) {
-+ if (ofb->port->plane_info.out_height > rot_yres) {
- ofb->port->plane_info.pos_y = 0;
-- ofb->port->plane_info.out_height = ofb->state_info.yres;
-+ ofb->port->plane_info.out_height = rot_yres;
- }
-
- ret = OMAPXVSetupVideoPlane(pScrn);
-@@ -223,6 +264,7 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
- packed_line_copy(src_w & ~15,
- src_h & ~15,
- ((src_w + 1) & ~1) * 2,
-+ ofb->port->fixed_info.line_length,
- (uint8_t*)buf,
- (uint8_t*)ofb->port->fb);
- break;
-diff --git a/src/omapfb-xv.c b/src/omapfb-xv.c
-index 1df651e..0fee2c6 100644
---- a/src/omapfb-xv.c
-+++ b/src/omapfb-xv.c
-@@ -169,8 +169,11 @@ static int OMAPFBXVQueryImageAttributes (ScrnInfoPtr pScrn,
- h = *height;
-
- w = (w + 1) & ~1;
-+
-+ /* Can't calculate these here - don't know line length
- ofb->port->mem_info.size = w << 1;
- ofb->port->mem_info.size *= h;
-+ */
-
- return size;
- }
---
-1.8.0
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0006-omapfb-port-to-new-xserver-video-API.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0006-omapfb-port-to-new-xserver-video-API.patch
deleted file mode 100644
index d56729987c..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0006-omapfb-port-to-new-xserver-video-API.patch
+++ /dev/null
@@ -1,272 +0,0 @@
-From 803ecf2909949e6152f4a81b6cbb92a4430679ac Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Fri, 23 Nov 2012 00:31:06 +0100
-Subject: [PATCH 6/6] omapfb: port to new xserver video API
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/compat-api.h | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- src/omapfb-driver.c | 41 ++++++++++++-----------
- 2 files changed, 118 insertions(+), 19 deletions(-)
- create mode 100644 src/compat-api.h
-
-diff --git a/src/compat-api.h b/src/compat-api.h
-new file mode 100644
-index 0000000..b1591b1
---- /dev/null
-+++ b/src/compat-api.h
-@@ -0,0 +1,96 @@
-+/*
-+ * Copyright 2012 Red Hat, Inc.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+ * DEALINGS IN THE SOFTWARE.
-+ *
-+ * Author: Dave Airlie <airlied@redhat.com>
-+ */
-+
-+/* this file provides API compat between server post 1.13 and pre it,
-+ it should be reused inside as many drivers as possible */
-+#ifndef COMPAT_API_H
-+#define COMPAT_API_H
-+
-+#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
-+#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
-+#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
-+#endif
-+
-+#ifndef XF86_HAS_SCRN_CONV
-+#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
-+#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
-+#endif
-+
-+#ifndef XF86_SCRN_INTERFACE
-+
-+#define SCRN_ARG_TYPE int
-+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
-+
-+#define SCREEN_ARG_TYPE int
-+#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
-+
-+#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv
-+
-+#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
-+#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
-+
-+#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
-+#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
-+
-+#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
-+
-+#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
-+
-+#define FREE_SCREEN_ARGS_DECL int arg, int flags
-+#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0
-+
-+#define VT_FUNC_ARGS_DECL int arg, int flags
-+#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
-+
-+#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
-+#else
-+#define SCRN_ARG_TYPE ScrnInfoPtr
-+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
-+
-+#define SCREEN_ARG_TYPE ScreenPtr
-+#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
-+
-+#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
-+
-+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
-+#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
-+
-+#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
-+#define CLOSE_SCREEN_ARGS pScreen
-+
-+#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
-+#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
-+
-+#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
-+#define FREE_SCREEN_ARGS(x) (x)
-+
-+#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
-+#define VT_FUNC_ARGS(flags) pScrn
-+
-+#define XF86_ENABLEDISABLEFB_ARG(x) (x)
-+
-+#endif
-+
-+#endif
-diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c
-index 07989f5..486ffa4 100644
---- a/src/omapfb-driver.c
-+++ b/src/omapfb-driver.c
-@@ -44,6 +44,8 @@
-
- #include "exa.h"
-
-+#include "compat-api.h"
-+
- #ifdef HAVE_XEXTPROTO_71
- #include <X11/extensions/dpmsconst.h>
- #else
-@@ -70,10 +72,10 @@
-
- static Bool OMAPFBProbe(DriverPtr drv, int flags);
- static Bool OMAPFBPreInit(ScrnInfoPtr pScrn, int flags);
--static Bool OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv);
--static Bool OMAPFBEnterVT(int scrnIndex, int flags);
--static void OMAPFBLeaveVT(int scrnIndex, int flags);
--static Bool OMAPFBSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
-+static Bool OMAPFBScreenInit(SCREEN_INIT_ARGS_DECL);
-+static Bool OMAPFBEnterVT(VT_FUNC_ARGS_DECL);
-+static void OMAPFBLeaveVT(VT_FUNC_ARGS_DECL);
-+static Bool OMAPFBSwitchMode(SWITCH_MODE_ARGS_DECL);
-
- static Bool
- OMAPFBEnsureRec(ScrnInfoPtr pScrn)
-@@ -481,7 +483,7 @@ OMAPFBXvScreenInit(ScreenPtr pScreen)
- }
-
- static Bool
--OMAPFBCloseScreen(int scrnIndex, ScreenPtr pScreen)
-+OMAPFBCloseScreen(CLOSE_SCREEN_ARGS_DECL)
- {
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- OMAPFBPtr ofb = OMAPFB(pScrn);
-@@ -490,11 +492,11 @@ OMAPFBCloseScreen(int scrnIndex, ScreenPtr pScreen)
-
- pScreen->CloseScreen = ofb->CloseScreen;
-
-- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
-+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
- }
-
- static Bool
--OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
-+OMAPFBScreenInit(SCREEN_INIT_ARGS_DECL)
- {
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- OMAPFBPtr ofb = OMAPFB(pScrn);
-@@ -516,7 +518,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- PROT_READ | PROT_WRITE, MAP_SHARED,
- ofb->fd, 0);
- if (ofb->fb == MAP_FAILED) {
-- xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size);
-+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size);
- return FALSE;
- }
-
-@@ -526,7 +528,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- /* Only support TrueColor for now */
- if (!miSetVisualTypes(pScrn->depth, TrueColorMask,
- pScrn->rgbBits, pScrn->defaultVisual)) {
-- xf86DrvMsg(scrnIndex, X_ERROR, "visual type setup failed"
-+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "visual type setup failed"
- " for %d bits per pixel [1]\n",
- pScrn->bitsPerPixel);
- return FALSE;
-@@ -534,7 +536,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
-
- /* Set up pixmap depth information */
- if (!miSetPixmapDepths()) {
-- xf86DrvMsg(scrnIndex,X_ERROR,"pixmap depth setup failed\n");
-+ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"pixmap depth setup failed\n");
- return FALSE;
- }
-
-@@ -546,7 +548,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- pScrn->virtualY, pScrn->xDpi,
- pScrn->yDpi, pScrn->displayWidth,
- pScrn->bitsPerPixel)) {
-- xf86DrvMsg(scrnIndex, X_ERROR, "fbScreenInit failed\n");
-+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "fbScreenInit failed\n");
- return FALSE;
- }
-
-@@ -567,7 +569,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
-
- /* Initialize XRender fallbacks */
- if (!fbPictureInit(pScreen, NULL, 0)) {
-- xf86DrvMsg(scrnIndex, X_ERROR, "fbPictureInit failed\n");
-+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "fbPictureInit failed\n");
- return FALSE;
- }
-
-@@ -579,7 +581,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
-
- /* Initialize default colormap */
- if (!miCreateDefColormap(pScreen)) {
-- xf86DrvMsg(scrnIndex, X_ERROR,
-+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "creating default colormap failed\n");
- return FALSE;
- }
-@@ -589,7 +591,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- /* This is non-fatal since we might be running against older
- * kernel driver in which case we only do basic 2D stuff...
- */
-- xf86DrvMsg(scrnIndex, X_ERROR, "Reading plane info failed\n");
-+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Reading plane info failed\n");
- } else if (!ofb->dss) {
-
- ofb->plane_info.enabled = 1;
-@@ -602,7 +604,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- }
-
- if (ioctl (ofb->fd, OMAPFB_SETUP_PLANE, &ofb->plane_info)) {
-- xf86DrvMsg(scrnIndex, X_ERROR,
-+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "%s: Plane setup failed: %s\n",
- __FUNCTION__, strerror(errno));
- return FALSE;
-@@ -645,9 +647,10 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- return TRUE;
- }
-
--static Bool OMAPFBSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
-+static Bool OMAPFBSwitchMode(SWITCH_MODE_ARGS_DECL)
- {
-- return xf86SetSingleMode (xf86Screens[scrnIndex], mode, RR_Rotate_0);
-+ SCRN_INFO_PTR(arg);
-+ return xf86SetSingleMode (pScrn, mode, RR_Rotate_0);
- }
-
- void
-@@ -699,14 +702,14 @@ OMAPFBPrintCapabilities(ScrnInfoPtr pScrn,
- /*** Unimplemented: */
-
- static Bool
--OMAPFBEnterVT(int scrnIndex, int flags)
-+OMAPFBEnterVT(VT_FUNC_ARGS_DECL)
- {
- xf86Msg(X_NOT_IMPLEMENTED, "%s\n", __FUNCTION__);
- return TRUE;
- }
-
- static void
--OMAPFBLeaveVT(int scrnIndex, int flags)
-+OMAPFBLeaveVT(VT_FUNC_ARGS_DECL)
- {
- xf86Msg(X_NOT_IMPLEMENTED, "%s\n", __FUNCTION__);
- }
---
-1.8.0
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch
deleted file mode 100644
index dc0b9b3f41..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Fix errors with glibc 2.20
-
-In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:53,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/misc.h:115,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86str.h:37,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86.h:44,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-omapfb/2_0.1.1+gitrAUTOINC+28c006c94e-r21.7/git/src/omapfb-xv-blizzard.c:33:
-/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
- strndup(const char *str, size_t n);
- ^
-In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:53,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/misc.h:115,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86str.h:37,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86.h:44,
- from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-omapfb/2_0.1.1+gitrAUTOINC+28c006c94e-r21.7/git/src/omapfb-xv-generic.c:28:
-/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
- strndup(const char *str, size_t n);
- ^
-
-Singed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: git/src/omapfb-xv-blizzard.c
-===================================================================
---- git.orig/src/omapfb-xv-blizzard.c 2014-08-28 05:16:25.684070587 -0700
-+++ git/src/omapfb-xv-blizzard.c 2014-08-28 19:05:39.440070587 -0700
-@@ -30,6 +30,7 @@
- * -
- */
-
-+#include <xorg-server.h>
- #include "xf86.h"
- #include "xf86_OSlib.h"
- #include "xf86xv.h"
-Index: git/src/omapfb-xv-generic.c
-===================================================================
---- git.orig/src/omapfb-xv-generic.c 2014-08-28 05:16:25.684070587 -0700
-+++ git/src/omapfb-xv-generic.c 2014-08-28 19:05:51.780070587 -0700
-@@ -25,6 +25,7 @@
- * Generic functions for the XV driver
- */
-
-+#include <xorg-server.h>
- #include "xf86.h"
- #include "xf86_OSlib.h"
- #include "xf86xv.h"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
deleted file mode 100644
index 7ebb960f11..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-require xorg-driver-video.inc
-
-SUMMARY = "X.Org X server -- Texas Instruments OMAP framebuffer driver"
-
-DESCRIPTION = "omapfb driver supports the basic Texas Instruments OMAP \
-framebuffer."
-
-LICENSE = "MIT-X & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=63e2cbac53863f60e2f43343fb34367f"
-DEPENDS += "virtual/libx11"
-
-SRCREV = "33e36c12dde336edbdd34626dd8adfcaebc8fbb8"
-PR = "${INC_PR}.7"
-PV = "0.1.1+gitr${SRCPV}"
-
-# Blacklist debian-specific tags in upstream version check
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)(?!-)"
-
-SRC_URI = "git://anonscm.debian.org/collab-maint/xf86-video-omapfb.git \
- file://0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch \
- file://0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch \
- file://0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch \
- file://0003-force-plain-mode.patch \
- file://0004-blacklist-tv-out.patch \
- file://0005-Attempt-to-fix-VRFB.patch \
- file://0006-omapfb-port-to-new-xserver-video-API.patch \
- file://0007-always_include_xorg_server.h.patch \
-"
-
-S = "${WORKDIR}/git"
-
-CFLAGS += " -I${STAGING_INCDIR}/xorg "
-
-# Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
-do_compile_prepend_armv7a () {
- sed -i -e s:fb1:fb2:g ${S}/src/omapfb-xv.c
-}
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vesa/0001-Refuse-to-run-on-UEFI-machines.patch b/meta/recipes-graphics/xorg-driver/xf86-video-vesa/0001-Refuse-to-run-on-UEFI-machines.patch
new file mode 100644
index 0000000000..9e01770667
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vesa/0001-Refuse-to-run-on-UEFI-machines.patch
@@ -0,0 +1,52 @@
+From 2645e0aa9c17c2c966a0533e52ad00510311483e Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 29 Aug 2018 11:04:23 -0400
+Subject: [PATCH] Refuse to run on UEFI machines
+
+No possible good can come of this.
+
+v2: Check for .../efi-framebuffer.0 ("is there an EFI framebuffer")
+instead of /sys/firmware/efi ("is this an EFI machine"). Suggested by
+Peter Jones.
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa]
+
+Reviewed-by: Peter Jones <pjones@redhat.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ src/vesa.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/vesa.c b/src/vesa.c
+index 9b65b9b..af750e2 100644
+--- a/src/vesa.c
++++ b/src/vesa.c
+@@ -43,7 +43,7 @@
+ #endif
+
+ #include <string.h>
+-
++#include <unistd.h>
+ #include "vesa.h"
+
+ /* All drivers initialising the SW cursor need this */
+@@ -450,7 +450,14 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev,
+ intptr_t match_data)
+ {
+ ScrnInfoPtr pScrn;
+-
++
++#ifdef __linux__
++ if (access("/sys/devices/platform/efi-framebuffer.0", F_OK) == 0) {
++ ErrorF("vesa: Refusing to run on UEFI\n");
++ return FALSE;
++ }
++#endif
++
+ pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL,
+ NULL, NULL, NULL, NULL, NULL);
+ if (pScrn != NULL) {
+--
+2.20.1
+
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.4.bb b/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.4.bb
deleted file mode 100644
index fa251b50ea..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.4.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require xorg-driver-video.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a1f0610ebdc6f314a9fa5102a8c5c1b0"
-
-SUMMARY = "X.Org X server -- Generic Vesa video driver"
-
-DESCRIPTION = "vesa is an Xorg driver for generic VESA video cards. It \
-can drive most VESA-compatible video cards, but only makes use of the \
-basic standard VESA core that is common to these cards. The driver \
-supports depths 8, 15 16 and 24."
-
-PR = "${INC_PR}.0"
-
-DEPENDS += "virtual/libx11 randrproto libpciaccess"
-
-COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
-
-RRECOMMENDS_${PN} += "xserver-xorg-module-libint10"
-
-SRC_URI[md5sum] = "a893c37c589f7a31cea929a5d896a0e2"
-SRC_URI[sha256sum] = "7bddf4d879dd6f67088ecb203a31e12334aab980174bd0909930a21f32e251c1"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.4.0.bb b/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.4.0.bb
new file mode 100644
index 0000000000..f6aa54456c
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.4.0.bb
@@ -0,0 +1,23 @@
+require xorg-driver-video.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a1f0610ebdc6f314a9fa5102a8c5c1b0"
+
+SUMMARY = "X.Org X server -- Generic Vesa video driver"
+
+DESCRIPTION = "vesa is an Xorg driver for generic VESA video cards. It \
+can drive most VESA-compatible video cards, but only makes use of the \
+basic standard VESA core that is common to these cards. The driver \
+supports depths 8, 15 16 and 24."
+
+DEPENDS += "virtual/libx11 xorgproto libpciaccess"
+
+COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
+
+RRECOMMENDS_${PN} += "xserver-xorg-module-libint10"
+
+SRC_URI[md5sum] = "8134201beaf6f77150c7809c3cc802e6"
+SRC_URI[sha256sum] = "bf443c94d7bf6cd4e248f8a3147f4647be04dc4c80250d9405006263bbdee38c"
+
+SRC_URI += " \
+ file://0001-Refuse-to-run-on-UEFI-machines.patch \
+ "
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
index 6039d089a1..5bda720ce5 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
@@ -1,17 +1,18 @@
-Upstream-Status:Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
+From da6612659a279bcb02f70622b53a3894fbc11052 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 9 Dec 2016 14:35:45 +0200
+Subject: [PATCH] Add option for vmwgfx
-From f103d6f570671c649ccd7b225e6d6c9f14371888 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 25 Jun 2014 16:16:44 +0100
-Subject: [PATCH 2/2] add option for vmwgfx
+Upstream-Status:Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
- configure.ac | 49 ++++++++++++++++++++-----------------------------
- 1 file changed, 20 insertions(+), 29 deletions(-)
+ configure.ac | 51 +++++++++++++++++++++------------------------------
+ 1 file changed, 21 insertions(+), 30 deletions(-)
diff --git a/configure.ac b/configure.ac
-index be40ed7..8e15307 100644
+index 9f259ce..f3fec57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,13 @@ AC_ARG_ENABLE(vmwarectrl-client,
@@ -40,7 +41,7 @@ index be40ed7..8e15307 100644
PKG_CHECK_EXISTS([xorg-server >= 1.12.0],
[AC_DEFINE([HAVE_XORG_SERVER_1_12_0], 1,
[Has version 1.12.0 or greater of the Xserver])])
-@@ -114,39 +116,28 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+@@ -114,34 +116,22 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
AC_SUBST([moduledir])
@@ -62,6 +63,7 @@ index be40ed7..8e15307 100644
-#
+AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
+if test x$VMWGFX = xyes; then
++ AC_MSG_RESULT([yes])
+ PKG_CHECK_MODULES([LIBDRM], [libdrm])
+ # Check for prime.
PKG_CHECK_EXISTS([libdrm >= 2.4.38],
@@ -75,15 +77,18 @@ index be40ed7..8e15307 100644
-AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
-if test x$BUILD_VMWGFX = xyes; then
- AC_MSG_RESULT([yes])
+- AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
+ # Early versions of mesa 10 forgot to bump the XA major version number
+ # in the xa_tracker.h header
+ PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],
+ [PKG_CHECK_EXISTS([xatracker = 2.0.0],
-+ [AC_DEFINE([HAVE_XA_2], 1,
-+ [Has version 2 of XA])])])
- AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
-+ AC_MSG_RESULT([yes])
- else
++ [AC_DEFINE([HAVE_XA_2], 1,
++ [Has version 2 of XA])])])
++ AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
+ libudev_check=yes
+ AC_ARG_WITH([libudev],
+ [AS_HELP_STRING([--without-libudev],
+@@ -158,7 +148,8 @@ else
AC_MSG_RESULT([no])
fi
@@ -94,5 +99,5 @@ index be40ed7..8e15307 100644
AC_CONFIG_FILES([
Makefile
--
-1.7.10.4
+2.1.4
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb b/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
deleted file mode 100644
index 8c891e6aed..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-driver-video.inc
-
-SUMMARY = "X.Org X server -- VMware SVGA display driver"
-
-DESCRIPTION = "vmware is an Xorg driver for VMware virtual video cards."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5fcd7d437a959a15fbee8707747c6b53"
-
-DEPENDS += "virtual/libx11 xineramaproto videoproto libpciaccess"
-
-SRC_URI += "file://0002-add-option-for-vmwgfx.patch"
-
-SRC_URI[md5sum] = "0cba22fed4cb639d5c4276f7892c543d"
-SRC_URI[sha256sum] = "3c1d244e4b1b77e92126957965cdc9fb82de4c215c0706a3a8aaff6939e4a0cc"
-
-COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[vmwgfx] = "--enable-vmwgfx, --disable-vmwgfx, libdrm virtual/mesa"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.3.0.bb b/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.3.0.bb
new file mode 100644
index 0000000000..41612b7f07
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.3.0.bb
@@ -0,0 +1,19 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- VMware SVGA display driver"
+
+DESCRIPTION = "vmware is an Xorg driver for VMware virtual video cards."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5fcd7d437a959a15fbee8707747c6b53"
+
+DEPENDS += "virtual/libx11 xorgproto libpciaccess"
+
+SRC_URI += "file://0002-add-option-for-vmwgfx.patch"
+
+SRC_URI[md5sum] = "08d66d062055080ff699ab4869726ea2"
+SRC_URI[sha256sum] = "47971924659e51666a757269ad941a059ef5afe7a47b5101c174a6022ac4066c"
+
+COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[vmwgfx] = "--enable-vmwgfx, --disable-vmwgfx, libdrm virtual/mesa"
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
index 57a4c827dd..54f04b11e5 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
@@ -7,13 +7,13 @@ LICENSE = "MIT-X"
PE = "2"
INC_PR = "r21"
-DEPENDS = "virtual/xserver xproto randrproto util-macros"
+DEPENDS = "virtual/xserver xorgproto util-macros"
SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2"
FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# depends on virtual/xserver
REQUIRED_DISTRO_FEATURES = "x11"
@@ -33,8 +33,10 @@ def _add_xorg_abi_depends(d, name):
}
output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
- mlprefix = d.getVar('MLPREFIX', True) or ''
+ mlprefix = d.getVar('MLPREFIX') or ''
abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
- pn = d.getVar("PN", True)
+ pn = d.getVar("PN")
d.appendVar('RDEPENDS_' + pn, ' ' + abi)
+
+SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
index c4dba1b19c..57912e70db 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
@@ -1,6 +1,6 @@
-include xorg-driver-common.inc
+require xorg-driver-common.inc
-DEPENDS += "inputproto kbproto "
+DEPENDS += "xorgproto"
python add_xorg_abi_depends() {
_add_xorg_abi_depends(d, "input")
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
index 38281e0f23..2938ef1161 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
@@ -1,6 +1,6 @@
-include xorg-driver-common.inc
+require xorg-driver-common.inc
-DEPENDS =+ "renderproto videoproto xextproto fontsproto"
+DEPENDS =+ "xorgproto"
python add_xorg_abi_depends() {
_add_xorg_abi_depends(d, "video")
diff --git a/meta/recipes-graphics/xorg-font/encodings/nocompiler.patch b/meta/recipes-graphics/xorg-font/encodings/nocompiler.patch
index f330c185af..ec7c7d80c1 100644
--- a/meta/recipes-graphics/xorg-font/encodings/nocompiler.patch
+++ b/meta/recipes-graphics/xorg-font/encodings/nocompiler.patch
@@ -1,23 +1,32 @@
+From b08c43a0842076e0a94e88ad6456a9326cd7ffc9 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 17 May 2011 23:03:02 +0000
+Subject: [PATCH] Improve handling of 'all' architecture recipes and their
+
Upstream-Status: Inappropriate [configuration]
XORG_DEFAULT_OPTIONS pulls in the following dependency chains:
XORG_CWARNFLAGS -> AC_PROG_CC_C99
XORG_STRICT_OPTION -> AC_PROG_CC_C99, XORG_CWARNFLAGS
-XORG_MANPAGE_SECTIONS -> AC_CANONICAL_HOST -> Checks host
+XORG_MANPAGE_SECTIONS -> AC_CANONICAL_HOST -> Checks host
each of which triggers the use of the host compiler. As an "all"
architecture package, it shouldn't need a compiler (and doesn't).
RP 17/5/2011
-Index: encodings-1.0.4/configure.ac
-===================================================================
---- encodings-1.0.4.orig/configure.ac 2011-05-17 23:36:19.505095876 +0100
-+++ encodings-1.0.4/configure.ac 2011-05-17 23:54:14.935096128 +0100
-@@ -4,12 +4,12 @@
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 622c27b..5ee84ed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,12 +3,12 @@ AC_INIT([encodings], [1.0.5],
+ [https://gitlab.freedesktop.org/xorg/font/encodings/issues])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
- AM_MAINTAINER_MODE
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
diff --git a/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb b/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
deleted file mode 100644
index 36766f2f42..0000000000
--- a/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "The Xorg font encoding files"
-
-DESCRIPTION = "The encodings that map to specific characters for a \
-number of Xorg and common fonts."
-
-require xorg-font-common.inc
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9da93f2daf2d5572faa2bfaf0dbd9e76"
-PE = "1"
-PR = "${INC_PR}.1"
-
-DEPENDS = "mkfontscale-native mkfontdir-native font-util-native"
-RDEPENDS_${PN} = ""
-
-SRC_URI += "file://nocompiler.patch"
-
-inherit allarch
-
-EXTRA_OECONF += "--with-encodingsdir=${datadir}/fonts/X11/encodings"
-
-SRC_URI[md5sum] = "0f2d6546d514c5cc4ecf78a60657a5c1"
-SRC_URI[sha256sum] = "ced6312988a45d23812c2ac708b4595f63fd7a49c4dcd9f66bdcd50d1057d539"
diff --git a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
new file mode 100644
index 0000000000..a39609b5da
--- /dev/null
+++ b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
@@ -0,0 +1,21 @@
+SUMMARY = "The Xorg font encoding files"
+
+DESCRIPTION = "The encodings that map to specific characters for a \
+number of Xorg and common fonts."
+
+require xorg-font-common.inc
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9da93f2daf2d5572faa2bfaf0dbd9e76"
+PE = "1"
+PR = "${INC_PR}.1"
+
+DEPENDS = "mkfontscale-native mkfontdir-native font-util-native"
+RDEPENDS_${PN} = ""
+
+SRC_URI += "file://nocompiler.patch"
+SRC_URI[md5sum] = "bbae4f247b88ccde0e85ed6a403da22a"
+SRC_URI[sha256sum] = "bd96e16143a044b19e87f217cf6a3763a70c561d1076aad6f6d862ec41774a31"
+
+inherit allarch
+
+EXTRA_OECONF += "--with-encodingsdir=${datadir}/fonts/X11/encodings"
diff --git a/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb b/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
deleted file mode 100644
index 34646ff99b..0000000000
--- a/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "X.Org font package creation/installation utilities"
-
-require xorg-font-common.inc
-
-#Unicode is MIT
-LICENSE = "BSD & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5df208ec65eb84ce5bb8d82d8f3b9675 \
- file://ucs2any.c;endline=28;md5=8357dc567fc628bd12696f15b2a33bcb \
- file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \
- file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34"
-
-DEPENDS = "encodings util-macros"
-DEPENDS_class-native = "util-macros-native"
-RDEPENDS_${PN} = "mkfontdir mkfontscale encodings"
-RDEPENDS_${PN}_class-native = "mkfontdir-native mkfontscale-native"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "23756dab809f9ec5011bb27fb2c3c7d6"
-SRC_URI[sha256sum] = "aa7ebdb0715106dd255082f2310dbaa2cd7e225957c2a77d719720c7cc92b921"
-
-SYSROOT_DIRS_BLACKLIST_remove = "${datadir}/fonts"
diff --git a/meta/recipes-graphics/xorg-font/font-util_1.3.2.bb b/meta/recipes-graphics/xorg-font/font-util_1.3.2.bb
new file mode 100644
index 0000000000..ebe7a603fa
--- /dev/null
+++ b/meta/recipes-graphics/xorg-font/font-util_1.3.2.bb
@@ -0,0 +1,22 @@
+SUMMARY = "X.Org font package creation/installation utilities"
+
+require xorg-font-common.inc
+
+#Unicode is MIT
+LICENSE = "BSD & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5df208ec65eb84ce5bb8d82d8f3b9675 \
+ file://ucs2any.c;endline=28;md5=8357dc567fc628bd12696f15b2a33bcb \
+ file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \
+ file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34"
+
+DEPENDS = "encodings util-macros"
+DEPENDS_class-native = "util-macros-native"
+RDEPENDS_${PN} = "mkfontdir mkfontscale encodings"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "3d6adb76fdd072db8c8fae41b40855e8"
+SRC_URI[sha256sum] = "3ad880444123ac06a7238546fa38a2a6ad7f7e0cc3614de7e103863616522282"
+
+SYSROOT_DIRS_BLACKLIST_remove = "${datadir}/fonts"
diff --git a/meta/recipes-graphics/xorg-font/xorg-font-common.inc b/meta/recipes-graphics/xorg-font/xorg-font-common.inc
index d5267f59a2..f18c8aefc2 100644
--- a/meta/recipes-graphics/xorg-font/xorg-font-common.inc
+++ b/meta/recipes-graphics/xorg-font/xorg-font-common.inc
@@ -4,7 +4,7 @@ BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"
SECTION = "x11/fonts"
LICENSE = "MIT-X"
-DEPENDS = " encodings font-alias font-util-native mkfontdir-native mkfontscale-native"
+DEPENDS = " encodings font-alias font-util-native"
RDEPENDS_${PN} = "encodings font-util font-alias"
XORG_PN = "${BPN}"
@@ -14,7 +14,7 @@ INC_PR = "r2"
SRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.bz2"
S = "${WORKDIR}/${XORG_PN}-${PV}"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# The mkfontscale-native requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
@@ -30,6 +30,7 @@ do_install_append() {
FILES_${PN} += " ${libdir}/X11/fonts ${datadir}"
+PACKAGE_WRITE_DEPS += "mkfontdir-native mkfontscale-native"
pkg_postinst_${PN} () {
for fontdir in `find $D/usr/lib/X11/fonts -type d`; do
mkfontdir $fontdir
diff --git a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
index 9bcd1b2fa6..1ea08a6c99 100644
--- a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
+++ b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
@@ -13,7 +13,7 @@ SRC_URI = "file://misc"
PE = "1"
PR = "r2"
-inherit allarch distro_features_check
+inherit allarch features_check
# The font-alias requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/xorg-lib/libdmx_1.1.3.bb b/meta/recipes-graphics/xorg-lib/libdmx_1.1.3.bb
deleted file mode 100644
index e623cee421..0000000000
--- a/meta/recipes-graphics/xorg-lib/libdmx_1.1.3.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "DMX: Distributed Multihead X extension library"
-
-DESCRIPTION = "The DMX extension provides support for communication with \
-and control of Xdmx(1) server. Attributes of the Xdmx(1) server and of \
-the back-end screens attached to the server can be queried and modified \
-via this protocol."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a3c3499231a8035efd0e004cfbd3b72a \
- file://src/dmx.c;endline=33;md5=c43f19af03c7c8619cadc9724ed9afe1"
-
-DEPENDS += "libxext dmxproto"
-
-PE = "1"
-
-SRC_URI[md5sum] = "ba983eba5a9f05d152a0725b8e863151"
-SRC_URI[sha256sum] = "c97da36d2e56a2d7b6e4f896241785acc95e97eb9557465fd66ba2a155a7b201"
-
diff --git a/meta/recipes-graphics/xorg-lib/libdmx_1.1.4.bb b/meta/recipes-graphics/xorg-lib/libdmx_1.1.4.bb
new file mode 100644
index 0000000000..66172cb30c
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libdmx_1.1.4.bb
@@ -0,0 +1,20 @@
+require xorg-lib-common.inc
+
+SUMMARY = "DMX: Distributed Multihead X extension library"
+
+DESCRIPTION = "The DMX extension provides support for communication with \
+and control of Xdmx(1) server. Attributes of the Xdmx(1) server and of \
+the back-end screens attached to the server can be queried and modified \
+via this protocol."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a3c3499231a8035efd0e004cfbd3b72a \
+ file://src/dmx.c;endline=33;md5=c43f19af03c7c8619cadc9724ed9afe1"
+
+DEPENDS += "libxext xorgproto"
+
+PE = "1"
+
+SRC_URI[md5sum] = "d2f1f0ec68ac3932dd7f1d9aa0a7a11c"
+SRC_URI[sha256sum] = "253f90005d134fa7a209fbcbc5a3024335367c930adf0f3203e754cf32747243"
+
diff --git a/meta/recipes-graphics/xorg-lib/libfontenc_1.1.3.bb b/meta/recipes-graphics/xorg-lib/libfontenc_1.1.3.bb
deleted file mode 100644
index a181f05c29..0000000000
--- a/meta/recipes-graphics/xorg-lib/libfontenc_1.1.3.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "X font encoding library"
-
-DESCRIPTION = "libfontenc is a library which helps font libraries \
-portably determine and deal with different encodings of fonts."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=96254c20ab81c63e65b26f0dbcd4a1c1"
-
-DEPENDS += "zlib xproto font-util"
-PE = "1"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "0920924c3a9ebc1265517bdd2f9fde50"
-SRC_URI[sha256sum] = "70588930e6fc9542ff38e0884778fbc6e6febf21adbab92fd8f524fe60aefd21"
diff --git a/meta/recipes-graphics/xorg-lib/libfontenc_1.1.4.bb b/meta/recipes-graphics/xorg-lib/libfontenc_1.1.4.bb
new file mode 100644
index 0000000000..1fc74b1995
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libfontenc_1.1.4.bb
@@ -0,0 +1,17 @@
+SUMMARY = "X font encoding library"
+
+DESCRIPTION = "libfontenc is a library which helps font libraries \
+portably determine and deal with different encodings of fonts."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=96254c20ab81c63e65b26f0dbcd4a1c1"
+
+DEPENDS += "zlib xorgproto font-util"
+PE = "1"
+
+SRC_URI[md5sum] = "6447db6a689fb530c218f0f8328c3abc"
+SRC_URI[sha256sum] = "2cfcce810ddd48f2e5dc658d28c1808e86dcf303eaff16728b9aa3dbc0092079"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-lib/libice_1.0.10.bb b/meta/recipes-graphics/xorg-lib/libice_1.0.10.bb
new file mode 100644
index 0000000000..6a6316f320
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libice_1.0.10.bb
@@ -0,0 +1,28 @@
+SUMMARY = "ICE: Inter-Client Exchange library"
+
+DESCRIPTION = "The Inter-Client Exchange (ICE) protocol provides a \
+generic framework for building protocols on top of reliable, byte-stream \
+transport connections. It provides basic mechanisms for setting up and \
+shutting down connections, for performing authentication, for \
+negotiating versions, and for reporting errors. "
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d162b1b3c6fa812da9d804dcf8584a93"
+
+DEPENDS += "xorgproto xtrans"
+PROVIDES = "ice"
+
+PE = "1"
+
+XORG_PN = "libICE"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "76d77499ee7120a56566891ca2c0dbcf"
+SRC_URI[sha256sum] = "6f86dce12cf4bcaf5c37dddd8b1b64ed2ddf1ef7b218f22b9942595fb747c348"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[arc4] = "ac_cv_lib_bsd_arc4random_buf=yes,ac_cv_lib_bsd_arc4random_buf=no,libbsd"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb b/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
deleted file mode 100644
index b361ad6ddd..0000000000
--- a/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "ICE: Inter-Client Exchange library"
-
-DESCRIPTION = "The Inter-Client Exchange (ICE) protocol provides a \
-generic framework for building protocols on top of reliable, byte-stream \
-transport connections. It provides basic mechanisms for setting up and \
-shutting down connections, for performing authentication, for \
-negotiating versions, and for reporting errors. "
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d162b1b3c6fa812da9d804dcf8584a93"
-
-DEPENDS += "xproto xtrans"
-PROVIDES = "ice"
-
-PE = "1"
-
-XORG_PN = "libICE"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "addfb1e897ca8079531669c7c7711726"
-SRC_URI[sha256sum] = "8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[arc4] = "ac_cv_lib_bsd_arc4random_buf=yes,ac_cv_lib_bsd_arc4random_buf=no,libbsd"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess/0001-Include-config.h-before-anything-else-in-.c.patch b/meta/recipes-graphics/xorg-lib/libpciaccess/0001-Include-config.h-before-anything-else-in-.c.patch
deleted file mode 100644
index e92fc0d95d..0000000000
--- a/meta/recipes-graphics/xorg-lib/libpciaccess/0001-Include-config.h-before-anything-else-in-.c.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-From b14696a55796e739624bbda4f772427032efff2a Mon Sep 17 00:00:00 2001
-From: Julien Cristau <jcristau@debian.org>
-Date: Sun, 26 Apr 2015 15:20:57 +0200
-Subject: [PATCH 1/4] Include config.h before anything else in *.c
-
-Debian bug#749008 <https://bugs.debian.org/749008>
-
-Reported-by: Michael Tautschnig <mt@debian.org>
-Signed-off-by: Julien Cristau <jcristau@debian.org>
-Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
----
-Upstream-Status: Backport
-
- src/common_capability.c | 3 +++
- src/common_init.c | 3 +++
- src/common_interface.c | 3 +++
- src/common_io.c | 3 +++
- src/common_iterator.c | 3 +++
- src/common_map.c | 3 +++
- src/common_vgaarb_stub.c | 3 +++
- src/linux_devmem.c | 5 +++--
- src/openbsd_pci.c | 3 +++
- src/solx_devfs.c | 3 +++
- src/x86_pci.c | 4 +++-
- 11 files changed, 33 insertions(+), 3 deletions(-)
-
-diff --git a/src/common_capability.c b/src/common_capability.c
-index 488743d..15d395d 100644
---- a/src/common_capability.c
-+++ b/src/common_capability.c
-@@ -31,6 +31,9 @@
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <stdlib.h>
- #include <stdio.h>
-diff --git a/src/common_init.c b/src/common_init.c
-index b1c0c3e..f7b59bd 100644
---- a/src/common_init.c
-+++ b/src/common_init.c
-@@ -28,6 +28,9 @@
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <stdlib.h>
- #include <errno.h>
-diff --git a/src/common_interface.c b/src/common_interface.c
-index 59778cf..cb95e90 100644
---- a/src/common_interface.c
-+++ b/src/common_interface.c
-@@ -28,6 +28,9 @@
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <stdlib.h>
- #include <string.h>
-diff --git a/src/common_io.c b/src/common_io.c
-index f5c9e45..e9586ad 100644
---- a/src/common_io.c
-+++ b/src/common_io.c
-@@ -22,6 +22,9 @@
- * Author:
- * Adam Jackson <ajax@redhat.com>
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <stdlib.h>
- #include <string.h>
-diff --git a/src/common_iterator.c b/src/common_iterator.c
-index ccf656d..2beb180 100644
---- a/src/common_iterator.c
-+++ b/src/common_iterator.c
-@@ -28,6 +28,9 @@
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <stdlib.h>
- #include <string.h>
-diff --git a/src/common_map.c b/src/common_map.c
-index 8757151..f1854bb 100644
---- a/src/common_map.c
-+++ b/src/common_map.c
-@@ -21,6 +21,9 @@
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <sys/types.h>
- #include <sys/mman.h>
-diff --git a/src/common_vgaarb_stub.c b/src/common_vgaarb_stub.c
-index 9394273..c1708f6 100644
---- a/src/common_vgaarb_stub.c
-+++ b/src/common_vgaarb_stub.c
-@@ -23,6 +23,9 @@
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <stdio.h>
- #include "pciaccess.h"
-diff --git a/src/linux_devmem.c b/src/linux_devmem.c
-index 10e3bde..0d0567c 100644
---- a/src/linux_devmem.c
-+++ b/src/linux_devmem.c
-@@ -32,8 +32,9 @@
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
--
--#define _GNU_SOURCE
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <stdlib.h>
- #include <string.h>
-diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c
-index 4d1b5cd..b8ce318 100644
---- a/src/openbsd_pci.c
-+++ b/src/openbsd_pci.c
-@@ -13,6 +13,9 @@
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <sys/param.h>
- #include <sys/ioctl.h>
-diff --git a/src/solx_devfs.c b/src/solx_devfs.c
-index f572393..cf96467 100644
---- a/src/solx_devfs.c
-+++ b/src/solx_devfs.c
-@@ -25,6 +25,9 @@
- /*
- * Solaris devfs interfaces
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
- #include <stdlib.h>
- #include <strings.h>
-diff --git a/src/x86_pci.c b/src/x86_pci.c
-index 49c1cab..32daa04 100644
---- a/src/x86_pci.c
-+++ b/src/x86_pci.c
-@@ -18,8 +18,10 @@
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-
--#define _GNU_SOURCE
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
---
-2.1.4
-
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess/0002-Fix-quoting-issue.patch b/meta/recipes-graphics/xorg-lib/libpciaccess/0002-Fix-quoting-issue.patch
deleted file mode 100644
index 16d69a82a4..0000000000
--- a/meta/recipes-graphics/xorg-lib/libpciaccess/0002-Fix-quoting-issue.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 765e0a38cb8c40f8865af5cb356ffe6039ffb08f Mon Sep 17 00:00:00 2001
-From: Thomas Klausner <wiz@NetBSD.org>
-Date: Sun, 22 Mar 2015 21:38:23 +0100
-Subject: [PATCH 2/4] Fix quoting issue.
-
-m4 has '[]' as quoting characters, so if we want '[]' to
-end up in the configure script, we need to quote them again.
-
-Reported by Greg Troxel <gdt@ir.bbn.com>.
-
-Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
-Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
----
-Upstream-Status: Backport
-
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index e67e9e1..888330b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -76,7 +76,7 @@ case $host_os in
- ;;
- *netbsd*)
- case $host in
-- *i[3-9]86*)
-+ *i[[3-9]]86*)
- PCIACCESS_LIBS="$PCIACCESS_LIBS -li386"
- ;;
- *x86_64*|*amd64*)
---
-2.1.4
-
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess/0003-linux_sysfs.c-Include-limits.h-for-PATH_MAX.patch b/meta/recipes-graphics/xorg-lib/libpciaccess/0003-linux_sysfs.c-Include-limits.h-for-PATH_MAX.patch
deleted file mode 100644
index f513c8e59c..0000000000
--- a/meta/recipes-graphics/xorg-lib/libpciaccess/0003-linux_sysfs.c-Include-limits.h-for-PATH_MAX.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 6bd2f7f92eae713663f4e13f6e2cb23526607b8c Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda@posteo.de>
-Date: Fri, 1 May 2015 16:36:50 +0200
-Subject: [PATCH 3/4] linux_sysfs.c: Include <limits.h> for PATH_MAX
-
-Fixes compilation with musl libc.
-
-Tested-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-Signed-off-by: Felix Janda <felix.janda@posteo.de>
-Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
----
-Upstream-Status: Backport
-
- src/linux_sysfs.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
-index 50d94cf..3f95e53 100644
---- a/src/linux_sysfs.c
-+++ b/src/linux_sysfs.c
-@@ -45,6 +45,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-+#include <limits.h>
- #include <sys/mman.h>
- #include <dirent.h>
- #include <errno.h>
---
-2.1.4
-
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess/0004-Don-t-include-sys-io.h-on-arm.patch b/meta/recipes-graphics/xorg-lib/libpciaccess/0004-Don-t-include-sys-io.h-on-arm.patch
deleted file mode 100644
index f532858244..0000000000
--- a/meta/recipes-graphics/xorg-lib/libpciaccess/0004-Don-t-include-sys-io.h-on-arm.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b6df5202306bd71158b482f25ca2e6919645d4dd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 4 Jun 2015 20:55:06 -0700
-Subject: [PATCH 4/4] Don't include sys/io.h on arm
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/linux_sysfs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
-index 3f95e53..1e3aad3 100644
---- a/src/linux_sysfs.c
-+++ b/src/linux_sysfs.c
-@@ -50,7 +50,7 @@
- #include <dirent.h>
- #include <errno.h>
-
--#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
-+#if defined(__i386__) || defined(__x86_64__)
- #include <sys/io.h>
- #else
- #define inb(x) -1
---
-2.1.4
-
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.4.bb b/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.4.bb
deleted file mode 100644
index ffa6a609f3..0000000000
--- a/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.4.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Generic PCI access library for X"
-
-DESCRIPTION = "libpciaccess provides functionality for X to access the \
-PCI bus and devices in a platform-independent way."
-
-require xorg-lib-common.inc
-
-SRC_URI += "\
- file://0001-Include-config.h-before-anything-else-in-.c.patch \
- file://0002-Fix-quoting-issue.patch \
- file://0003-linux_sysfs.c-Include-limits.h-for-PATH_MAX.patch \
- file://0004-Don-t-include-sys-io.h-on-arm.patch \
-"
-
-SRC_URI[md5sum] = "ace78aec799b1cf6dfaea55d3879ed9f"
-SRC_URI[sha256sum] = "07f864654561e4ac8629a0ef9c8f07fbc1f8592d1b6c418431593e9ba2cf2fcf"
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=277aada5222b9a22fbf3471ff3687068"
-
-REQUIRED_DISTRO_FEATURES = ""
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess_0.16.bb b/meta/recipes-graphics/xorg-lib/libpciaccess_0.16.bb
new file mode 100644
index 0000000000..b58cb80dc3
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libpciaccess_0.16.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Generic PCI access library for X"
+
+DESCRIPTION = "libpciaccess provides functionality for X to access the \
+PCI bus and devices in a platform-independent way."
+
+require xorg-lib-common.inc
+
+SRC_URI += "\
+"
+
+SRC_URI[md5sum] = "b34e2cbdd6aa8f9cc3fa613fd401a6d6"
+SRC_URI[sha256sum] = "214c9d0d884fdd7375ec8da8dcb91a8d3169f263294c9a90c575bf1938b9f489"
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=277aada5222b9a22fbf3471ff3687068"
+
+REQUIRED_DISTRO_FEATURES = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.3.bb b/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.3.bb
deleted file mode 100644
index 5514c7f5e8..0000000000
--- a/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Library that provides weak aliases for pthread functions"
-DESCRIPTION = "This library provides weak aliases for pthread functions \
-not provided in libc or otherwise available by default."
-HOMEPAGE = "http://xcb.freedesktop.org"
-BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=XCB"
-SECTION = "x11/libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6edc1fea03d959f0c2d743fe5ca746ad"
-
-#DEPENDS = "xcb-proto xproto libxau libxslt-native"
-# DEPENDS += "xsltproc-native gperf-native"
-
-ALLOW_EMPTY_${PN} = "1"
-
-SRC_URI = "http://xcb.freedesktop.org/dist/libpthread-stubs-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "e8fa31b42e13f87e8f5a7a2b731db7ee"
-SRC_URI[sha256sum] = "35b6d54e3cc6f3ba28061da81af64b9a92b7b757319098172488a660e3d87299"
-
-inherit autotools pkgconfig
-
-RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb b/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb
new file mode 100644
index 0000000000..ffa1c859d6
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Library that provides weak aliases for pthread functions"
+DESCRIPTION = "This library provides weak aliases for pthread functions \
+not provided in libc or otherwise available by default."
+HOMEPAGE = "http://xcb.freedesktop.org"
+BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=XCB"
+SECTION = "x11/libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6edc1fea03d959f0c2d743fe5ca746ad"
+
+SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2"
+SRC_URI[md5sum] = "48c1544854a94db0e51499cc3afd797f"
+SRC_URI[sha256sum] = "e4d05911a3165d3b18321cc067fdd2f023f06436e391c6a28dff618a78d2e733"
+
+inherit autotools
+
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb b/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
deleted file mode 100644
index da4ed92510..0000000000
--- a/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "SM: Session Management library"
-
-DESCRIPTION = "The Session Management Library (SMlib) is a low-level \"C\" \
-language interface to XSMP. The purpose of the X Session Management \
-Protocol (XSMP) is to provide a uniform mechanism for users to save and \
-restore their sessions. A session is a group of clients, each of which \
-has a particular state."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb37f44e02bdbde80546024400728d"
-
-DEPENDS += "libice xproto xtrans"
-
-# libSM can work without libuuid, we explicitly disable it to break the following circular dependency
-# when DISTRO_FEATURES contains 'systemd' and 'x11'.
-# systemd -> dbus -> libsm -> util-linux -> systemd
-EXTRA_OECONF += "--without-libuuid"
-
-PE = "1"
-
-XORG_PN = "libSM"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "499a7773c65aba513609fe651853c5f3"
-SRC_URI[sha256sum] = "0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-lib/libsm_1.2.3.bb b/meta/recipes-graphics/xorg-lib/libsm_1.2.3.bb
new file mode 100644
index 0000000000..49df690f0a
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libsm_1.2.3.bb
@@ -0,0 +1,31 @@
+SUMMARY = "SM: Session Management library"
+
+DESCRIPTION = "The Session Management Library (SMlib) is a low-level \"C\" \
+language interface to XSMP. The purpose of the X Session Management \
+Protocol (XSMP) is to provide a uniform mechanism for users to save and \
+restore their sessions. A session is a group of clients, each of which \
+has a particular state."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb37f44e02bdbde80546024400728d"
+
+DEPENDS += "libice xorgproto xtrans"
+
+# libSM can work without libuuid, we explicitly disable it to break the following circular dependency
+# when DISTRO_FEATURES contains 'systemd' and 'x11'.
+# systemd -> dbus -> libsm -> util-linux -> systemd
+EXTRA_OECONF += "--without-libuuid"
+
+PE = "1"
+
+XORG_PN = "libSM"
+
+SRC_URI[md5sum] = "87c7fad1c1813517979184c8ccd76628"
+SRC_URI[sha256sum] = "2d264499dcb05f56438dee12a1b4b71d76736ce7ba7aa6efbf15ebb113769cbb"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libx11-compose-data/0001-Drop-x11-dependencies.patch b/meta/recipes-graphics/xorg-lib/libx11-compose-data/0001-Drop-x11-dependencies.patch
new file mode 100644
index 0000000000..46a53a17f2
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11-compose-data/0001-Drop-x11-dependencies.patch
@@ -0,0 +1,86 @@
+From e1f9b0b531c6ddb11a85c0664051e2e4efc589fb Mon Sep 17 00:00:00 2001
+From: Ming Liu <ming.liu@toradex.com>
+Date: Sun, 5 May 2019 11:55:14 +0200
+Subject: [PATCH] Drop x11 dependencies
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Ming Liu <ming.liu@toradex.com>
+---
+ configure.ac | 44 --------------------------------------------
+ 1 file changed, 44 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a5fd706..b42488c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -76,27 +76,8 @@ fi
+ AC_SUBST([EXEEXT_FOR_BUILD])
+
+ # Checks for pkg-config packages
+-
+-# Always required
+-X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.11.1'
+-X11_EXTRA_DEPS="xcb >= 1.11.1"
+-
+ PKG_PROG_PKG_CONFIG()
+
+-AC_SUBST(X11_EXTRA_DEPS)
+-
+-# Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
+-# was not expanded, since libX11 with no transport types is rather useless.
+-#
+-# If you're seeing an error here, be sure you installed the lib/xtrans module
+-# first and if it's not in the default location, that you set the ACLOCAL
+-# environment variable to find it, such as:
+-# ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
+-m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$])
+-
+-# Transport selection macro from xtrans.m4
+-XTRANS_CONNECTION_FLAGS
+-
+ # Check for dlopen
+ AC_MSG_CHECKING([if run-time linking is supported])
+ AC_SEARCH_LIBS(dlopen,[dl svld])
+@@ -237,30 +218,6 @@ AC_SUBST(XTHREAD_CFLAGS)
+
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
+
+-#
+-# Find keysymdef.h
+-#
+-AC_MSG_CHECKING([keysym definitions])
+-AC_ARG_WITH([keysymdefdir],
+- [AC_HELP_STRING([--with-keysymdefdir=DIR], [The location of keysymdef.h (defaults to xproto include dir)])],
+- [KEYSYMDEFDIR=$withval],
+- [KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11])
+-
+-if test ! -d "$KEYSYMDEFDIR"; then
+- AC_MSG_ERROR([$KEYSYMDEFDIR doesn't exist or isn't a directory])
+-fi
+-
+-FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
+-for i in $FILES; do
+- if test -f "$KEYSYMDEFDIR/$i"; then
+- KEYSYMDEFS="$KEYSYMDEFS $KEYSYMDEFDIR/$i"
+- elif test "x$i" = "xkeysymdef.h"; then
+- AC_MSG_ERROR([Cannot find keysymdef.h])
+- fi
+-done
+-AC_MSG_RESULT([$KEYSYMDEFS])
+-AC_SUBST(KEYSYMDEFS)
+-
+ AC_ARG_ENABLE(xcms,
+ AS_HELP_STRING([--disable-xcms],
+ [Disable Xlib support for CMS *EXPERIMENTAL*]),
+@@ -340,7 +297,6 @@ X11_LIBDIR="${libdir}/X11"
+ AX_DEFINE_DIR(X11_LIBDIR, X11_LIBDIR, [Location of libX11 library data])
+ AC_SUBST(X11_LIBDIR)
+
+-PKG_CHECK_MODULES(X11, [$X11_REQUIRES])
+ X11_CFLAGS="$X11_CFLAGS $XTHREAD_CFLAGS"
+
+ #
+--
+2.7.4
+
diff --git a/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb b/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb
new file mode 100644
index 0000000000..cabb84e686
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Xlib: Compose data files for libx11"
+DESCRIPTION = "This package provides the compose data files for libx11."
+
+python () {
+ if bb.utils.contains('DISTRO_FEATURES', 'x11', True, False, d):
+ raise bb.parse.SkipRecipe("libx11-compose-data is incompatible with x11 distro feature, use libx11 instead.")
+}
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7"
+
+SRC_URI[md5sum] = "c5fa5a86a20e3591bed6c046498d4b8f"
+SRC_URI[sha256sum] = "b289a845c189e251e0e884cc0f9269bbe97c238df3741e854ec4c17c21e473d5"
+
+SRC_URI += "file://0001-Drop-x11-dependencies.patch"
+
+XORG_PN = "libX11"
+
+EXTRA_OECONF += "--disable-xkb"
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/X11/locale ${libdir}/X11/locale"
+
+do_compile() {
+ oe_runmake -C nls
+}
+
+do_install() {
+ oe_runmake DESTDIR=${D} -C nls install
+}
+
+REQUIRED_DISTRO_FEATURES = ""
diff --git a/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.3.bb b/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.3.bb
deleted file mode 100644
index c0d0148258..0000000000
--- a/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require libx11.inc
-
-DESCRIPTION += " Support for XCMS and XLOCALE is disabled in \
-this version."
-
-SRC_URI += "file://X18NCMSstubs.diff \
- file://fix-disable-xlocale.diff \
- file://fix-utf8-wrong-define.patch \
- "
-
-RPROVIDES_${PN}-dev = "libx11-dev"
-RPROVIDES_${PN}-locale = "libx11-locale"
-
-SRC_URI[md5sum] = "2e36b73f8a42143142dda8129f02e4e0"
-SRC_URI[sha256sum] = "cf31a7c39f2f52e8ebd0db95640384e63451f9b014eed2bb7f5de03e8adc8111"
-
-EXTRA_OECONF += "--disable-xlocale"
-
-PACKAGECONFIG ??= ""
diff --git a/meta/recipes-graphics/xorg-lib/libx11.inc b/meta/recipes-graphics/xorg-lib/libx11.inc
deleted file mode 100644
index b04eafbdf2..0000000000
--- a/meta/recipes-graphics/xorg-lib/libx11.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Xlib: C Language X Interface library"
-
-DESCRIPTION = "This package provides a client interface to the X Window \
-System, otherwise known as 'Xlib'. It provides a complete API for the \
-basic functions of the window system."
-
-require xorg-lib-common.inc
-
-inherit siteinfo
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:"
-
-PE = "1"
-
-PROVIDES = "virtual/libx11"
-
-XORG_PN = "libX11"
-LICENSE = "MIT & MIT-style & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7"
-
-DEPENDS += "xproto xextproto xtrans libxcb kbproto inputproto"
-DEPENDS += "xproto-native"
-
-EXTRA_OECONF += "--with-keysymdefdir=${STAGING_INCDIR}/X11/ --disable-xf86bigfont"
-EXTRA_OEMAKE += 'CWARNFLAGS=""'
-
-PACKAGECONFIG ??= "xcms"
-PACKAGECONFIG[xcms] = "--enable-xcms,--disable-xcms"
-
-# src/util/makekeys is built natively but needs -D_GNU_SOURCE defined.
-CPPFLAGS_FOR_BUILD += "-D_GNU_SOURCE"
-
-PACKAGES =+ "${PN}-xcb"
-
-FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${datadir}/X11/Xcms.txt"
-FILES_${PN}-xcb += "${libdir}/libX11-xcb.so.*"
-FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"
-
-# Multiple libx11 derivatives from from this file and are selected by virtual/libx11
-# A world build should only build the correct version, not all of them.
-EXCLUDE_FROM_WORLD = "1"
diff --git a/meta/recipes-graphics/xorg-lib/libx11/Fix-hanging-issue-in-_XReply.patch b/meta/recipes-graphics/xorg-lib/libx11/Fix-hanging-issue-in-_XReply.patch
new file mode 100644
index 0000000000..2a723b7e43
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/Fix-hanging-issue-in-_XReply.patch
@@ -0,0 +1,58 @@
+From 5235a7f3692a4c3c90dd4ac1be3c670388904bbe Mon Sep 17 00:00:00 2001
+From: Tatu Frisk <tatu.frisk@ge.com>
+Date: Tue, 14 Mar 2017 14:41:27 +0200
+Subject: [PATCH] Fix hanging issue in _XReply
+
+Assume event queue is empty if another thread is blocking waiting for event.
+
+If one thread was blocking waiting for an event and another thread sent a
+reply to the X server, both threads got blocked until an event was
+received.
+
+Upstream-Status: Submitted [https://patchwork.freedesktop.org/patch/171458/]
+
+This patch needs to be removed once the corresponding patch has been merged upstream.
+
+https://patchwork.freedesktop.org/patch/171458/
+
+Signed-off-by: Tatu Frisk <tatu.frisk@ge.com>
+Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
+
+[Refreshed for 1.6.7 update]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ src/xcb_io.c | 19 +++++++------------
+ 1 file changed, 7 insertions(+), 12 deletions(-)
+
+Index: libX11-1.6.7/src/xcb_io.c
+===================================================================
+--- libX11-1.6.7.orig/src/xcb_io.c
++++ libX11-1.6.7/src/xcb_io.c
+@@ -620,18 +620,14 @@ Status _XReply(Display *dpy, xReply *rep
+ if(dpy->xcb->event_owner == XlibOwnsEventQueue)
+ {
+ xcb_generic_reply_t *event;
+- /* If some thread is already waiting for events,
+- * it will get the first one. That thread must
+- * process that event before we can continue. */
+- /* FIXME: That event might be after this reply,
+- * and might never even come--or there might be
+- * multiple threads trying to get events. */
+- while(dpy->xcb->event_waiter)
+- { /* need braces around ConditionWait */
+- ConditionWait(dpy, dpy->xcb->event_notify);
+- }
+- while((event = poll_for_event(dpy, True)))
+- handle_response(dpy, event, True);
++
++ /* Assume event queue is empty if another thread is blocking
++ * waiting for event. */
++ if(!dpy->xcb->event_waiter)
++ {
++ while((event = poll_for_response(dpy)))
++ handle_response(dpy, event, True);
++ }
+ }
+
+ req->reply_waiter = 0;
diff --git a/meta/recipes-graphics/xorg-lib/libx11/X18NCMSstubs.diff b/meta/recipes-graphics/xorg-lib/libx11/X18NCMSstubs.diff
deleted file mode 100644
index 744cedc777..0000000000
--- a/meta/recipes-graphics/xorg-lib/libx11/X18NCMSstubs.diff
+++ /dev/null
@@ -1,520 +0,0 @@
-Upstream-Status: Pending
-
-Upstream-Status: Inappropriate [configuration]
-Index: libX11-1.3/src/imConv.c
-===================================================================
---- libX11-1.3.orig/src/imConv.c
-+++ libX11-1.3/src/imConv.c
-@@ -83,6 +83,7 @@ static const struct SubstRec SubstTable[
- * from UCS char to specified charset char.
- * This converter is needed for _XimGetCharCode subroutine.
- */
-+#ifdef XLOCALE
- XPointer
- _XimGetLocaleCode (
- _Xconst char* encoding_name)
-@@ -96,6 +97,7 @@ _XimGetLocaleCode (
- }
- return cvt;
- }
-+#endif
-
- /*
- * Returns the locale dependent representation of a keysym.
-@@ -106,6 +108,7 @@ _XimGetLocaleCode (
- * terminating NUL byte. Return 0 if the keysym is not representable in the
- * locale
- */
-+#ifdef XLOCALE
- /*ARGSUSED*/
- int
- _XimGetCharCode (
-@@ -135,6 +138,7 @@ _XimGetCharCode (
- buf[count]= '\0';
- return count;
- }
-+#endif
-
- #ifdef XKB
- static int lookup_string(
-Index: libX11-1.3/src/X18NCMSstubs.c
-===================================================================
---- /dev/null
-+++ libX11-1.3/src/X18NCMSstubs.c
-@@ -0,0 +1,428 @@
-+/*
-+ * X18NCMSstubs.c
-+ * - Provides stubs and dummy funcs needed when Xcms and XLocale stuff removed
-+ *
-+ * Copyright © 2003 Matthew Allum
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and its
-+ * documentation for any purpose is hereby granted without fee, provided that
-+ * the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of Matthew Allum not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Keith Packard and Compaq makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MATTHEW ALLUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-+ * IN NO EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-+ * PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#include <stdlib.h>
-+#include "Xlibint.h"
-+#include "Xlcint.h"
-+#include <X11/Xlocale.h>
-+#include <X11/Xos.h>
-+#ifdef WIN32
-+#undef close
-+#endif
-+#include <X11/Xutil.h>
-+#include "XlcPubI.h"
-+
-+#include "Xcmsint.h" /* for XcmsCCC type */
-+#include "XlcPubI.h" /* for XLCd type */
-+#include "config.h"
-+
-+#if ! XLOCALE
-+
-+Bool
-+XSupportsLocale()
-+{
-+ return False;
-+}
-+
-+char *
-+XSetLocaleModifiers(
-+ const char *modifiers)
-+{
-+ return NULL;
-+}
-+
-+XLCd
-+_XOpenLC(
-+ char *name)
-+{
-+ return NULL;
-+}
-+
-+XLCd
-+_XlcCurrentLC()
-+{
-+ return NULL;
-+}
-+
-+void
-+_XlcVaToArgList(
-+ va_list var,
-+ int count,
-+ XlcArgList *args_ret)
-+{
-+ return;
-+}
-+
-+void
-+_XlcCountVaList(
-+ va_list var,
-+ int *count_ret)
-+{
-+ return;
-+}
-+
-+void
-+_XCloseLC(
-+ XLCd lcd)
-+{
-+ return;
-+}
-+
-+int
-+_XlcConvert(
-+ XlcConv conv,
-+ XPointer *from,
-+ int *from_left,
-+ XPointer *to,
-+ int *to_left,
-+ XPointer *args,
-+ int num_args)
-+{
-+ return 0;
-+}
-+
-+/* XIM Stubs */
-+
-+XPointer
-+_XimGetLocaleCode ( _Xconst char* encoding_name )
-+{
-+ return NULL;
-+}
-+
-+int
-+_XimGetCharCode (
-+ XPointer ucs_conv,
-+ KeySym keysym,
-+ unsigned char* buf,
-+ int nbytes)
-+{
-+ return 0;
-+}
-+
-+/* Xrm Stubs */
-+
-+XrmMethods
-+_XrmInitParseInfo(
-+ XPointer *state)
-+{
-+ return (XrmMethods) NULL;
-+}
-+
-+/* Xwc Stubs */
-+
-+int
-+XwcTextExtents(
-+ XFontSet font_set,
-+ _Xconst wchar_t *text,
-+ int text_len,
-+ XRectangle *overall_ink_extents,
-+ XRectangle *overall_logical_extents)
-+{
-+ return 0;
-+}
-+
-+void
-+XwcDrawString(Display *display,
-+ Drawable d,
-+ XFontSet font_set,
-+ GC gc,
-+ int x, int y,
-+ _Xconst wchar_t *string,
-+ int num_wchars)
-+{
-+ ;
-+}
-+
-+void
-+XwcDrawText(
-+ Display *dpy,
-+ Drawable d,
-+ GC gc,
-+ int x,
-+ int y,
-+ XwcTextItem *text_items,
-+ int nitems)
-+{
-+ ;
-+}
-+
-+void
-+XwcDrawImageString(
-+ Display *dpy,
-+ Drawable d,
-+ XFontSet font_set,
-+ GC gc,
-+ int x,
-+ int y,
-+ _Xconst wchar_t *text,
-+ int text_len)
-+{
-+ ;
-+}
-+
-+int
-+XwcTextEscapement(
-+ XFontSet font_set,
-+ _Xconst wchar_t *text,
-+ int text_len)
-+{
-+ return 0;
-+}
-+
-+Status
-+XwcTextPerCharExtents(
-+ XFontSet font_set,
-+ _Xconst wchar_t *text,
-+ int text_len,
-+ XRectangle *ink_extents_buffer,
-+ XRectangle *logical_extents_buffer,
-+ int buffer_size,
-+ int *num_chars,
-+ XRectangle *max_ink_extents,
-+ XRectangle *max_logical_extents)
-+{
-+ return(XcmsFailure);
-+}
-+
-+int
-+XwcTextPropertyToTextList(
-+ Display *dpy,
-+ const XTextProperty *text_prop,
-+ wchar_t ***list_ret,
-+ int *count_ret)
-+{
-+ return 0;
-+}
-+
-+int
-+XwcTextListToTextProperty(
-+ Display *dpy,
-+ wchar_t **list,
-+ int count,
-+ XICCEncodingStyle style,
-+ XTextProperty *text_prop)
-+{
-+ return 0;
-+}
-+
-+void
-+XwcFreeStringList(wchar_t **list)
-+{
-+ return;
-+}
-+
-+
-+void XmbSetWMProperties ( /* Actually from mbWMProps.c */
-+ Display *dpy,
-+ Window w,
-+ _Xconst char *windowName,
-+ _Xconst char *iconName,
-+ char **argv,
-+ int argc,
-+ XSizeHints *sizeHints,
-+ XWMHints *wmHints,
-+ XClassHint *classHints)
-+{
-+ return;
-+}
-+
-+int
-+XmbTextPropertyToTextList(
-+ Display *dpy,
-+ const XTextProperty *text_prop,
-+ char ***list_ret,
-+ int *count_ret)
-+{
-+ return XLocaleNotSupported;
-+}
-+
-+int
-+XmbTextListToTextProperty(
-+ Display *dpy,
-+ char **list,
-+ int count,
-+ XICCEncodingStyle style,
-+ XTextProperty *text_prop)
-+{
-+ return XLocaleNotSupported;
-+}
-+
-+int
-+XmbTextExtents(
-+ XFontSet font_set,
-+ _Xconst char *text,
-+ int text_len,
-+ XRectangle *overall_ink_extents,
-+ XRectangle *overall_logical_extents)
-+{
-+ return 0;
-+}
-+
-+void
-+XmbDrawText(
-+ Display *dpy,
-+ Drawable d,
-+ GC gc,
-+ int x,
-+ int y,
-+ XmbTextItem *text_items,
-+ int nitems)
-+{
-+ ;
-+}
-+
-+void
-+XmbDrawString(
-+ Display *dpy,
-+ Drawable d,
-+ XFontSet font_set,
-+ GC gc,
-+ int x,
-+ int y,
-+ _Xconst char *text,
-+ int text_len)
-+{
-+ ;
-+}
-+
-+void
-+XmbDrawImageString(
-+ Display *dpy,
-+ Drawable d,
-+ XFontSet font_set,
-+ GC gc,
-+ int x,
-+ int y,
-+ _Xconst char *text,
-+ int text_len)
-+{
-+ ;
-+}
-+
-+int
-+XmbTextEscapement(
-+ XFontSet font_set,
-+ _Xconst char *text,
-+ int text_len)
-+{
-+ return 0;
-+}
-+
-+Status
-+XmbTextPerCharExtents(
-+ XFontSet font_set,
-+ _Xconst char *text,
-+ int text_len,
-+ XRectangle *ink_extents_buffer,
-+ XRectangle *logical_extents_buffer,
-+ int buffer_size,
-+ int *num_chars,
-+ XRectangle *max_ink_extents,
-+ XRectangle *max_logical_extents)
-+{
-+ return 0;
-+}
-+
-+unsigned int
-+KeySymToUcs4(KeySym keysym)
-+{
-+ return 0;
-+}
-+
-+#endif
-+
-+#if ! XCMS
-+
-+XcmsCCC
-+XcmsCCCOfColormap(dpy, cmap)
-+ Display *dpy;
-+ Colormap cmap;
-+{
-+ return NULL;
-+}
-+
-+Status
-+_XcmsResolveColorString (
-+ XcmsCCC ccc,
-+ const char **color_string,
-+ XcmsColor *pColor_exact_return,
-+ XcmsColorFormat result_format)
-+{
-+ return(XcmsFailure);
-+}
-+
-+void
-+_XcmsUnresolveColor(
-+ XcmsCCC ccc,
-+ XcmsColor *pColor)
-+{
-+ return;
-+}
-+
-+void
-+_XUnresolveColor(
-+ XcmsCCC ccc,
-+ XColor *pXColor)
-+{
-+ return;
-+}
-+
-+XcmsCmapRec *
-+_XcmsAddCmapRec(dpy, cmap, windowID, visual)
-+ Display *dpy;
-+ Colormap cmap;
-+ Window windowID;
-+ Visual *visual;
-+{
-+ return NULL;
-+}
-+
-+void
-+_XcmsRGB_to_XColor(
-+ XcmsColor *pColors,
-+ XColor *pXColors,
-+ unsigned int nColors)
-+{
-+ return;
-+}
-+
-+XcmsCmapRec *
-+_XcmsCopyCmapRecAndFree(
-+ Display *dpy,
-+ Colormap src_cmap,
-+ Colormap copy_cmap)
-+{
-+ return NULL;
-+}
-+
-+void
-+_XcmsDeleteCmapRec(
-+ Display *dpy,
-+ Colormap cmap)
-+{
-+ return;
-+}
-+
-+#endif
-Index: libX11-1.3/src/Makefile.am
-===================================================================
---- libX11-1.3.orig/src/Makefile.am
-+++ libX11-1.3/src/Makefile.am
-@@ -335,6 +335,8 @@ if THRSTUBS
- libX11_la_SOURCES+=UIThrStubs.c
- endif
-
-+libX11_la_SOURCES+=X18NCMSstubs.c
-+
- x11datadir = @X11_DATADIR@
- x11data_DATA = XKeysymDB XErrorDB
-
-@@ -342,6 +344,7 @@ EXTRA_DIST = \
- $(x11data_DATA) \
- os2Stubs.c \
-- UIThrStubs.c
-+ UIThrStubs.c \
-+ X18NCMSstubs.c
-
- if XCB
- libX11_la_SOURCES += \
-Index: libX11-1.3/src/locking.c
-===================================================================
---- libX11-1.3.orig/src/locking.c
-+++ libX11-1.3/src/locking.c
-@@ -66,7 +66,9 @@ in this Software without prior written a
- #define NUM_FREE_CVLS 4
-
- /* in lcWrap.c */
-+#ifdef XLOCALE
- extern LockInfoPtr _Xi18n_lock;
-+#endif
-
- #ifdef WIN32
- static DWORD _X_TlsIndex = (DWORD)-1;
-@@ -594,9 +596,11 @@ Status XInitThreads(void)
- _Xglobal_lock = &global_lock;
- xmutex_init(_Xglobal_lock->lock);
- xmutex_set_name(_Xglobal_lock->lock, "Xlib global");
-+#ifdef XLOCALE
- _Xi18n_lock = &i18n_lock;
- xmutex_init(_Xi18n_lock->lock);
- xmutex_set_name(_Xi18n_lock->lock, "Xlib i18n");
-+#endif
- _XLockMutex_fn = _XLockMutex;
- _XUnlockMutex_fn = _XUnlockMutex;
- _XCreateMutex_fn = _XCreateMutex;
diff --git a/meta/recipes-graphics/xorg-lib/libx11/fix-disable-xlocale.diff b/meta/recipes-graphics/xorg-lib/libx11/fix-disable-xlocale.diff
deleted file mode 100644
index a7c3984fd5..0000000000
--- a/meta/recipes-graphics/xorg-lib/libx11/fix-disable-xlocale.diff
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---- libX11-X11R7.0-1.0.0/src/Font.c.orig 2006-03-12 18:35:42.000000000 +0100
-+++ libX11-X11R7.0-1.0.0/src/Font.c 2006-03-12 18:40:27.000000000 +0100
-@@ -701,7 +701,11 @@
- }
- if (l - 2 - (p - charset) < 0)
- return 0;
-+#ifdef XLOCALE
- if (_XlcNCompareISOLatin1(name + l - 2 - (p - charset), charset, p - charset))
-+#else
-+ if (strncasecmp(name + l - 2 - (p - charset), charset, p - charset))
-+#endif
- return 0;
- if (strlen(p + 1) + l - 1 >= sizeof(buf) - 1)
- return 0;
diff --git a/meta/recipes-graphics/xorg-lib/libx11/fix-utf8-wrong-define.patch b/meta/recipes-graphics/xorg-lib/libx11/fix-utf8-wrong-define.patch
deleted file mode 100644
index c6347f5be1..0000000000
--- a/meta/recipes-graphics/xorg-lib/libx11/fix-utf8-wrong-define.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
---- libX11-X11R7.0-1.0.0/include/X11/Xlib.h~fix-utf8-wrong-define
-+++ libX11-X11R7.0-1.0.0/include/X11/Xlib.h
-@@ -103,7 +103,7 @@
-
- /* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
- November 2000. Its presence is indicated through the following macro. */
--#define X_HAVE_UTF8_STRING 1
-+#undef X_HAVE_UTF8_STRING
-
- typedef char *XPointer;
-
diff --git a/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch b/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch
deleted file mode 100644
index f2abf7c7a9..0000000000
--- a/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 4d85d5f3bd8afac893738fd88e19d8cb5cf998ff Mon Sep 17 00:00:00 2001
-From: Drew Moseley <drew_moseley@mentor.com>
-Date: Sun, 27 Jul 2014 13:10:07 -0400
-Subject: [PATCH] libX11: Add missing NULL check on im and im->methods
-
-Upstream-Status: Backport (c827edcd1c4a7f920aa25208083b5b58d60d2b44)
-Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
-
----
- src/xlibi18n/ICWrap.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff -ru libX11-1.6.2-orig/src/xlibi18n/ICWrap.c libX11-1.6.2/src/xlibi18n/ICWrap.c
---- libX11-1.6.2-orig/src/xlibi18n/ICWrap.c 2014-07-27 13:38:29.586666449 -0400
-+++ libX11-1.6.2/src/xlibi18n/ICWrap.c 2014-07-27 13:41:39.671609030 -0400
-@@ -169,7 +169,7 @@
- va_list var;
- int total_count;
- XIMArg *args;
-- char *ret;
-+ char *ret = NULL;
-
- /*
- * so count the stuff dangling here
-@@ -185,7 +185,8 @@
- _XIMVaToNestedList(var, total_count, &args);
- va_end(var);
-
-- ret = (*im->methods->set_values) (im, args);
-+ if (im && im->methods)
-+ ret = (*im->methods->set_values) (im, args);
- Xfree(args);
- return ret;
- }
-@@ -196,7 +197,7 @@
- va_list var;
- int total_count;
- XIMArg *args;
-- char *ret;
-+ char *ret = NULL;
-
- /*
- * so count the stuff dangling here
-@@ -212,7 +213,8 @@
- _XIMVaToNestedList(var, total_count, &args);
- va_end(var);
-
-- ret = (*im->methods->get_values) (im, args);
-+ if (im && im->methods)
-+ ret = (*im->methods->get_values) (im, args);
- Xfree(args);
- return ret;
- }
-@@ -228,7 +230,7 @@
- va_list var;
- int total_count;
- XIMArg *args;
-- XIC ic;
-+ XIC ic = NULL;
-
- /*
- * so count the stuff dangling here
-@@ -244,7 +246,8 @@
- _XIMVaToNestedList(var, total_count, &args);
- va_end(var);
-
-- ic = (XIC) (*im->methods->create_ic) (im, args);
-+ if (im && im->methods)
-+ ic = (XIC) (*im->methods->create_ic) (im, args);
- Xfree(args);
- if (ic) {
- ic->core.next = im->core.ic_chain;
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb b/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
deleted file mode 100644
index 8e531c7456..0000000000
--- a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require libx11.inc
-inherit gettext
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI += "file://disable_tests.patch \
- file://libX11-Add-missing-NULL-check.patch \
- "
-
-SRC_URI[md5sum] = "2e36b73f8a42143142dda8129f02e4e0"
-SRC_URI[sha256sum] = "cf31a7c39f2f52e8ebd0db95640384e63451f9b014eed2bb7f5de03e8adc8111"
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.9.bb b/meta/recipes-graphics/xorg-lib/libx11_1.6.9.bb
new file mode 100644
index 0000000000..8c2a57c674
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.6.9.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Xlib: C Language X Interface library"
+
+DESCRIPTION = "This package provides a client interface to the X Window \
+System, otherwise known as 'Xlib'. It provides a complete API for the \
+basic functions of the window system."
+
+require xorg-lib-common.inc
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:"
+
+PE = "1"
+
+SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \
+ file://disable_tests.patch"
+
+SRC_URI[md5sum] = "55adbfb6d4370ecac5e70598c4e7eed2"
+SRC_URI[sha256sum] = "9cc7e8d000d6193fa5af580d50d689380b8287052270f5bb26a5fb6b58b2bed1"
+
+PROVIDES = "virtual/libx11"
+
+XORG_PN = "libX11"
+LICENSE = "MIT & MIT-style & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7"
+
+DEPENDS += "xorgproto xtrans libxcb"
+DEPENDS += "xorgproto-native"
+
+EXTRA_OECONF += "--with-keysymdefdir=${STAGING_INCDIR}/X11/ --disable-xf86bigfont"
+EXTRA_OEMAKE += 'CWARNFLAGS=""'
+
+PACKAGECONFIG ??= "xcms"
+PACKAGECONFIG[xcms] = "--enable-xcms,--disable-xcms"
+
+# src/util/makekeys is built natively but needs -D_GNU_SOURCE defined.
+CPPFLAGS_FOR_BUILD += "-D_GNU_SOURCE"
+
+PACKAGES =+ "${PN}-xcb"
+
+inherit gettext
+
+FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${datadir}/X11/Xcms.txt"
+FILES_${PN}-xcb += "${libdir}/libX11-xcb.so.*"
+FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxau_1.0.8.bb b/meta/recipes-graphics/xorg-lib/libxau_1.0.8.bb
deleted file mode 100644
index 2ef8bfa8b6..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxau_1.0.8.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Xau: X Authority Database library"
-
-DESCRIPTION = "libxau provides the main interfaces to the X11 \
-authorisation handling, which controls authorisation for X connections, \
-both client-side and server-side."
-
-require xorg-lib-common.inc
-
-inherit gettext
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7908e342491198401321cec1956807ec"
-
-DEPENDS += " xproto"
-PROVIDES = "xau"
-
-PE = "1"
-
-XORG_PN = "libXau"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "685f8abbffa6d145c0f930f00703b21b"
-SRC_URI[sha256sum] = "fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2"
diff --git a/meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb b/meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb
new file mode 100644
index 0000000000..dcfc66652a
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Xau: X Authority Database library"
+
+DESCRIPTION = "libxau provides the main interfaces to the X11 \
+authorisation handling, which controls authorisation for X connections, \
+both client-side and server-side."
+
+require xorg-lib-common.inc
+
+inherit gettext
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7908e342491198401321cec1956807ec"
+
+DEPENDS += " xorgproto"
+PROVIDES = "xau"
+
+PE = "1"
+
+XORG_PN = "libXau"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "c5f16288f2da9f071b29111d68797480"
+SRC_URI[sha256sum] = "ccf8cbf0dbf676faa2ea0a6d64bcc3b6746064722b606c8c52917ed00dcb73ec"
diff --git a/meta/recipes-graphics/xorg-lib/libxcalibrate/fix-xcb.patch b/meta/recipes-graphics/xorg-lib/libxcalibrate/fix-xcb.patch
deleted file mode 100644
index d6148834a6..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxcalibrate/fix-xcb.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Upstream-Status: Pending
-
-There is no extra reply data and if we say not to disgard it, xcb
-throws fatal asserts.
-
-RP - 26/11/09
-
-Index: git/xcalibrate.c
-===================================================================
---- git.orig/xcalibrate.c 2009-11-26 08:11:48.000000000 +0000
-+++ git/xcalibrate.c 2009-11-26 08:09:55.000000000 +0000
-@@ -216,7 +216,7 @@
- req->reqType = info->codes->major_opcode;
- req->xCalibrateReqType = X_XCalibrateRawMode;
- req->on = enable;
-- if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
-+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue))
- {
- UnlockDisplay (dpy);
- SyncHandle ();
-@@ -240,7 +240,7 @@
- req->xCalibrateReqType = X_XCalibrateScreenToCoord;
- req->x = *x;
- req->y = *y;
-- if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
-+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue))
- {
- UnlockDisplay (dpy);
- SyncHandle ();
diff --git a/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb b/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb
deleted file mode 100644
index 455e869c7a..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "XCalibrate: Touchscreen calibration library"
-
-DESCRIPTION = "libXCalibrate is a library for performing touchscreen \
-calibration with the kdrive tslib touchscreen driver."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://xcalibrate.h;endline=21;md5=fa572df6439f0f235f2612f370f153d7 \
- file://xcalibrate.c;endline=21;md5=fa572df6439f0f235f2612f370f153d7"
-
-DEPENDS = "virtual/libx11 calibrateproto libxext"
-
-SRCREV = "209d83af61ed38a002c8096377deac292b3e396c"
-PV = "0.0+git${SRCPV}"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/libXCalibrate \
- file://fix-xcb.patch"
-
-S = "${WORKDIR}/git"
-
-FILES_${PN}-locale += "${datadir}/X11/locale"
diff --git a/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch b/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
index 5641c0fe95..c0efbdc213 100644
--- a/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
+++ b/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
@@ -9,17 +9,17 @@ Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
-diff --git a/configure.ac b/configure.ac
-index 6d7c9a5..22cceb9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -21,7 +21,8 @@ AC_USE_SYSTEM_EXTENSIONS
-
- AM_PATH_PYTHON([2.6])
+Index: libxcb-1.12/configure.ac
+===================================================================
+--- libxcb-1.12.orig/configure.ac
++++ libxcb-1.12/configure.ac
+@@ -36,7 +36,8 @@ if test x"$HAVE_DOT" = xno; then
+ AC_MSG_WARN([dot not found - doxygen targets will be skipped])
+ fi
-PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
+dnl PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
+HAVE_CHECK=no
AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xyes)
- AC_CONFIG_HEADERS([src/config.h])
+ XSLTPROC=no
diff --git a/meta/recipes-graphics/xorg-lib/libxcb/gcc-mips-pr68302-mips-workaround.patch b/meta/recipes-graphics/xorg-lib/libxcb/gcc-mips-pr68302-mips-workaround.patch
deleted file mode 100644
index 698d038f90..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxcb/gcc-mips-pr68302-mips-workaround.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Reduce debug info for xcb.c since on mips we run into a gcc5 bug
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68302
-
-This patch is a workaround to get past the gcc bug until its resolved.
-it should have minimal impact on libxcb while make it work.
-
-Upstream-Status: Inappropriate [OE-Specific]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: libxcb-1.11.1/src/Makefile.am
-===================================================================
---- libxcb-1.11.1.orig/src/Makefile.am
-+++ libxcb-1.11.1/src/Makefile.am
-@@ -188,6 +188,7 @@ EXTSOURCES += xkb.c
- if BUILD_XKB
- lib_LTLIBRARIES += libxcb-xkb.la
- libxcb_xkb_la_LDFLAGS = -version-info 1:0:0 -no-undefined
-+CFLAGS += -g1
- libxcb_xkb_la_LIBADD = $(XCB_LIBS)
- nodist_libxcb_xkb_la_SOURCES = xkb.c xkb.h
- endif
diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb
deleted file mode 100644
index 62b8bab87f..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "XCB: The X protocol C binding library"
-DESCRIPTION = "The X protocol C-language Binding (XCB) is a replacement \
-for Xlib featuring a small footprint, latency hiding, direct access to \
-the protocol, improved threading support, and extensibility."
-HOMEPAGE = "http://xcb.freedesktop.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
-SECTION = "x11/libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
-
-SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
- file://xcbincludedir.patch \
- file://disable-check.patch \
- file://gcc-mips-pr68302-mips-workaround.patch \
- "
-SRC_URI[md5sum] = "28e552bd78bc1050b6b26ca1db0e5bb6"
-SRC_URI[sha256sum] = "4adfb1b7c67e99bc9c2ccb110b2f175686576d2f792c8a71b9c8b19014057b5b"
-
-BBCLASSEXTEND = "native nativesdk"
-
-DEPENDS = "xcb-proto xproto libxau libpthread-stubs libxdmcp"
-
-PACKAGES_DYNAMIC = "^libxcb-.*"
-
-FILES_${PN} = "${libdir}/libxcb.so.*"
-
-inherit autotools pkgconfig distro_features_check
-
-# The libxau and others requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-REQUIRED_DISTRO_FEATURES_class-native = ""
-
-python populate_packages_prepend () {
- do_split_packages(d, '${libdir}', '^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
-}
diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb
new file mode 100644
index 0000000000..9befc51b50
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb
@@ -0,0 +1,37 @@
+SUMMARY = "XCB: The X protocol C binding library"
+DESCRIPTION = "The X protocol C-language Binding (XCB) is a replacement \
+for Xlib featuring a small footprint, latency hiding, direct access to \
+the protocol, improved threading support, and extensibility."
+HOMEPAGE = "http://xcb.freedesktop.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
+SECTION = "x11/libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
+
+SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
+ file://xcbincludedir.patch \
+ file://disable-check.patch \
+ "
+
+SRC_URI[md5sum] = "f33cdfc67346f7217a9326c0d8679975"
+SRC_URI[sha256sum] = "a89fb7af7a11f43d2ce84a844a4b38df688c092bf4b67683aef179cdf2a647c4"
+
+BBCLASSEXTEND = "native nativesdk"
+
+DEPENDS = "xcb-proto xorgproto libxau libpthread-stubs libxdmcp"
+
+PACKAGES_DYNAMIC = "^libxcb-.*"
+
+FILES_${PN} = "${libdir}/libxcb.so.*"
+
+inherit autotools pkgconfig features_check
+
+# The libxau and others requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+export PYTHON = "python3"
+
+python populate_packages_prepend () {
+ do_split_packages(d, '${libdir}', r'^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
+}
diff --git a/meta/recipes-graphics/xorg-lib/libxcomposite_0.4.4.bb b/meta/recipes-graphics/xorg-lib/libxcomposite_0.4.4.bb
deleted file mode 100644
index 70257194a9..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxcomposite_0.4.4.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Xcomposite: X Composite extension library"
-
-DESCRIPTION = "The composite extension provides three related \
-mechanisms: per-hierarchy storage, automatic shadow update, and external \
-parent. In per-hierarchy storage, the rendering of an entire hierarchy \
-of windows is redirected to off-screen storage. In automatic shadow \
-update, when a hierarchy is rendered off-screen, the X server provides \
-an automatic mechanism for presenting those contents within the parent \
-window. In external parent, a mechanism for providing redirection of \
-compositing transformations through a client."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3f2907aad541f6f226fbc58cc1b3cdf1"
-
-DEPENDS += " compositeproto virtual/libx11 libxfixes libxext"
-PROVIDES = "xcomposite"
-BBCLASSEXTEND = "native"
-
-PE = "1"
-
-XORG_PN = "libXcomposite"
-
-SRC_URI += " file://change-include-order.patch"
-
-SRC_URI[md5sum] = "f7a218dcbf6f0848599c6c36fc65c51a"
-SRC_URI[sha256sum] = "ede250cd207d8bee4a338265c3007d7a68d5aca791b6ac41af18e9a2aeb34178"
diff --git a/meta/recipes-graphics/xorg-lib/libxcomposite_0.4.5.bb b/meta/recipes-graphics/xorg-lib/libxcomposite_0.4.5.bb
new file mode 100644
index 0000000000..3ef3ddb817
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxcomposite_0.4.5.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Xcomposite: X Composite extension library"
+
+DESCRIPTION = "The composite extension provides three related \
+mechanisms: per-hierarchy storage, automatic shadow update, and external \
+parent. In per-hierarchy storage, the rendering of an entire hierarchy \
+of windows is redirected to off-screen storage. In automatic shadow \
+update, when a hierarchy is rendered off-screen, the X server provides \
+an automatic mechanism for presenting those contents within the parent \
+window. In external parent, a mechanism for providing redirection of \
+compositing transformations through a client."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3f2907aad541f6f226fbc58cc1b3cdf1"
+
+DEPENDS += " xorgproto virtual/libx11 libxfixes libxext"
+PROVIDES = "xcomposite"
+BBCLASSEXTEND = "native nativesdk"
+
+PE = "1"
+
+XORG_PN = "libXcomposite"
+
+SRC_URI += " file://change-include-order.patch"
+
+SRC_URI[md5sum] = "3fa0841ea89024719b20cd702a9b54e0"
+SRC_URI[sha256sum] = "b3218a2c15bab8035d16810df5b8251ffc7132ff3aa70651a1fba0bfe9634e8f"
diff --git a/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb b/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
deleted file mode 100644
index 17629047b7..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Xcursor: X Cursor management library"
-
-DESCRIPTION = "Xcursor is a simple library designed to help locate and \
-load cursors. Cursors can be loaded from files or memory. A library of \
-common cursors exists which map to the standard X cursor names. Cursors \
-can exist in several sizes and the library automatically picks the best \
-size."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8902e6643f7bcd7793b23dcd5d8031a4"
-
-DEPENDS += "libxrender libxfixes"
-BBCLASSEXTEND = "native nativesdk"
-
-PE = "1"
-
-XORG_PN = "libXcursor"
-
-SRC_URI[md5sum] = "1e7c17afbbce83e2215917047c57d1b3"
-SRC_URI[sha256sum] = "9bc6acb21ca14da51bda5bc912c8955bc6e5e433f0ab00c5e8bef842596c33df"
diff --git a/meta/recipes-graphics/xorg-lib/libxcursor_1.2.0.bb b/meta/recipes-graphics/xorg-lib/libxcursor_1.2.0.bb
new file mode 100644
index 0000000000..2df7a3a4f2
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxcursor_1.2.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Xcursor: X Cursor management library"
+
+DESCRIPTION = "Xcursor is a simple library designed to help locate and \
+load cursors. Cursors can be loaded from files or memory. A library of \
+common cursors exists which map to the standard X cursor names. Cursors \
+can exist in several sizes and the library automatically picks the best \
+size."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8902e6643f7bcd7793b23dcd5d8031a4"
+
+DEPENDS += "libxrender libxfixes"
+
+PE = "1"
+
+XORG_PN = "libXcursor"
+
+SRC_URI[md5sum] = "9b9be0e289130fb820aedf67705fc549"
+SRC_URI[sha256sum] = "3ad3e9f8251094af6fe8cb4afcf63e28df504d46bfa5a5529db74a505d628782"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxdamage_1.1.4.bb b/meta/recipes-graphics/xorg-lib/libxdamage_1.1.4.bb
deleted file mode 100644
index c3d70043ca..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxdamage_1.1.4.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Xdamage: X Damage extension library"
-
-DESCRIPTION = "'Damage' is a term that describes changes make to pixel \
-contents of windows and pixmaps. Damage accumulates as drawing occurs \
-in the drawable. Each drawing operation 'damages' one or more \
-rectangular areas within the drawable. The rectangles are guaranteed to \
-include the set of pixels modified by each operation, but may include \
-significantly more than just those pixels. The DAMAGE extension allows \
-applications to either receive the raw rectangles as a stream of events, \
-or to have them partially processed within the X server to reduce the \
-amount of data transmitted as well as reduce the processing latency once \
-the repaint operation has started."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9fe101f30dd24134cf43146863241868"
-
-DEPENDS += "virtual/libx11 damageproto libxfixes"
-PROVIDES = "xdamage"
-BBCLASSEXTEND = "native"
-
-PE = "1"
-
-XORG_PN = "libXdamage"
-
-SRC_URI[md5sum] = "0cf292de2a9fa2e9a939aefde68fd34f"
-SRC_URI[sha256sum] = "7c3fe7c657e83547f4822bfde30a90d84524efb56365448768409b77f05355ad"
diff --git a/meta/recipes-graphics/xorg-lib/libxdamage_1.1.5.bb b/meta/recipes-graphics/xorg-lib/libxdamage_1.1.5.bb
new file mode 100644
index 0000000000..b201124d86
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxdamage_1.1.5.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Xdamage: X Damage extension library"
+
+DESCRIPTION = "'Damage' is a term that describes changes make to pixel \
+contents of windows and pixmaps. Damage accumulates as drawing occurs \
+in the drawable. Each drawing operation 'damages' one or more \
+rectangular areas within the drawable. The rectangles are guaranteed to \
+include the set of pixels modified by each operation, but may include \
+significantly more than just those pixels. The DAMAGE extension allows \
+applications to either receive the raw rectangles as a stream of events, \
+or to have them partially processed within the X server to reduce the \
+amount of data transmitted as well as reduce the processing latency once \
+the repaint operation has started."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9fe101f30dd24134cf43146863241868"
+
+DEPENDS += "virtual/libx11 xorgproto libxfixes"
+PROVIDES = "xdamage"
+
+PE = "1"
+
+XORG_PN = "libXdamage"
+
+SRC_URI[md5sum] = "e3f554267a7a04b042dc1f6352bd6d99"
+SRC_URI[sha256sum] = "b734068643cac3b5f3d2c8279dd366b5bf28c7219d9e9d8717e1383995e0ea45"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxdmcp_1.1.2.bb b/meta/recipes-graphics/xorg-lib/libxdmcp_1.1.2.bb
deleted file mode 100644
index f4e30d93d4..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxdmcp_1.1.2.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "XDMCP: X Display Manager Control Protocol library"
-
-DESCRIPTION = "The purpose of the X Display Manager Control Protocol \
-(XDMCP) is to provide a uniform mechanism for an autonomous display to \
-request login service from a remote host. An X terminal (screen, \
-keyboard, mouse, processor, network interface) is a prime example of an \
-autonomous display."
-
-require xorg-lib-common.inc
-
-inherit gettext
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d559fb26e129626022e052a5e6e0e123"
-
-DEPENDS += "xproto"
-PROVIDES = "xdmcp"
-
-PE = "1"
-
-XORG_PN = "libXdmcp"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "18aa5c1279b01f9d18e3299969665b2e"
-SRC_URI[sha256sum] = "81fe09867918fff258296e1e1e159f0dc639cb30d201c53519f25ab73af4e4e2"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[arc4] = "ac_cv_lib_bsd_arc4random_buf=yes,ac_cv_lib_bsd_arc4random_buf=no,libbsd"
diff --git a/meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb b/meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb
new file mode 100644
index 0000000000..d43a146fd7
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb
@@ -0,0 +1,29 @@
+SUMMARY = "XDMCP: X Display Manager Control Protocol library"
+
+DESCRIPTION = "The purpose of the X Display Manager Control Protocol \
+(XDMCP) is to provide a uniform mechanism for an autonomous display to \
+request login service from a remote host. An X terminal (screen, \
+keyboard, mouse, processor, network interface) is a prime example of an \
+autonomous display."
+
+require xorg-lib-common.inc
+
+inherit gettext
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d559fb26e129626022e052a5e6e0e123"
+
+DEPENDS += "xorgproto"
+PROVIDES = "xdmcp"
+
+PE = "1"
+
+XORG_PN = "libXdmcp"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "115c5c12ecce0e749cd91d999a5fd160"
+SRC_URI[sha256sum] = "20523b44aaa513e17c009e873ad7bbc301507a3224c232610ce2e099011c6529"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[arc4] = "ac_cv_lib_bsd_arc4random_buf=yes,ac_cv_lib_bsd_arc4random_buf=no,libbsd"
diff --git a/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb b/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
deleted file mode 100644
index efa8b65ace..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "XExt: X Extension library"
-
-DESCRIPTION = "libXext provides an X Window System client interface to \
-several extensions to the X protocol. The supported protocol extensions \
-are DOUBLE-BUFFER, DPMS, Extended-Visual-Information, LBX, MIT_SHM, \
-MIT_SUNDRY-NONSTANDARD, Multi-Buffering, SECURITY, SHAPE, SYNC, TOG-CUP, \
-XC-APPGROUP, XC-MISC, XTEST. libXext also provides a small set of \
-utility functions to aid authors of client APIs for X protocol \
-extensions."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=879ce266785414bd1cbc3bc2f4d9d7c8"
-
-DEPENDS += "xproto virtual/libx11 xextproto libxau libxdmcp"
-PROVIDES = "xext"
-
-PE = "1"
-
-XORG_PN = "libXext"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "52df7c4c1f0badd9f82ab124fb32eb97"
-SRC_URI[sha256sum] = "b518d4d332231f313371fdefac59e3776f4f0823bcb23cf7c7305bfb57b16e35"
diff --git a/meta/recipes-graphics/xorg-lib/libxext_1.3.4.bb b/meta/recipes-graphics/xorg-lib/libxext_1.3.4.bb
new file mode 100644
index 0000000000..9493111a67
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxext_1.3.4.bb
@@ -0,0 +1,26 @@
+SUMMARY = "XExt: X Extension library"
+
+DESCRIPTION = "libXext provides an X Window System client interface to \
+several extensions to the X protocol. The supported protocol extensions \
+are DOUBLE-BUFFER, DPMS, Extended-Visual-Information, LBX, MIT_SHM, \
+MIT_SUNDRY-NONSTANDARD, Multi-Buffering, SECURITY, SHAPE, SYNC, TOG-CUP, \
+XC-APPGROUP, XC-MISC, XTEST. libXext also provides a small set of \
+utility functions to aid authors of client APIs for X protocol \
+extensions."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=879ce266785414bd1cbc3bc2f4d9d7c8"
+
+DEPENDS += "xorgproto virtual/libx11"
+PROVIDES = "xext"
+
+PE = "1"
+
+XORG_PN = "libXext"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "f5b48bb76ba327cd2a8dc7a383532a95"
+SRC_URI[sha256sum] = "59ad6fcce98deaecc14d39a672cf218ca37aba617c9a0f691cac3bcd28edf82b"
diff --git a/meta/recipes-graphics/xorg-lib/libxext_git.bb b/meta/recipes-graphics/xorg-lib/libxext_git.bb
deleted file mode 100644
index b799186ef0..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxext_git.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "XExt: X Extension library"
-
-DESCRIPTION = "libXext provides an X Window System client interface to \
-several extensions to the X protocol. The supported protocol extensions \
-are DOUBLE-BUFFER, DPMS, Extended-Visual-Information, LBX, MIT_SHM, \
-MIT_SUNDRY-NONSTANDARD, Multi-Buffering, SECURITY, SHAPE, SYNC, TOG-CUP, \
-XC-APPGROUP, XC-MISC, XTEST. libXext also provides a small set of \
-utility functions to aid authors of client APIs for X protocol \
-extensions."
-
-DEPENDS += "xproto virtual/libx11 xextproto libxau libxdmcp"
-PROVIDES = "xext"
-SRCREV = "d1f3bc77a48c8e42771579e3fdf3370b35d3209d"
-PE = "1"
-PV = "1.0.99.1+gitr${SRCPV}"
-
-XORG_PN = "libXext"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/${XORG_PN}"
-S = "${WORKDIR}/git/"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb b/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb
deleted file mode 100644
index f078aed193..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "XFixes: X Fixes extension library"
-
-DESCRIPTION = "X applications have often needed to work around various \
-shortcomings in the core X window system. This extension is designed to \
-provide the minimal server-side support necessary to eliminate problems \
-caused by these workarounds."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3c1ce42c334a6f5cccb0277556a053e0"
-
-DEPENDS += "virtual/libx11 xproto fixesproto xextproto"
-
-PE = "1"
-
-XORG_PN = "libXfixes"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "544d73df94e638ba7b64147be416e576"
-SRC_URI[sha256sum] = "9bd20edfec084a1bed481d48dd4815dee88139fffad091418cdda081129a9aea"
diff --git a/meta/recipes-graphics/xorg-lib/libxfixes_5.0.3.bb b/meta/recipes-graphics/xorg-lib/libxfixes_5.0.3.bb
new file mode 100644
index 0000000000..f0e2f606ce
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxfixes_5.0.3.bb
@@ -0,0 +1,23 @@
+SUMMARY = "XFixes: X Fixes extension library"
+
+DESCRIPTION = "X applications have often needed to work around various \
+shortcomings in the core X window system. This extension is designed to \
+provide the minimal server-side support necessary to eliminate problems \
+caused by these workarounds."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3c1ce42c334a6f5cccb0277556a053e0"
+
+DEPENDS += "virtual/libx11 xorgproto"
+
+PE = "1"
+
+XORG_PN = "libXfixes"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "07e01e046a0215574f36a3aacb148be0"
+SRC_URI[sha256sum] = "de1cd33aff226e08cefd0e6759341c2c8e8c9faf8ce9ac6ec38d43e287b22ad6"
+
diff --git a/meta/recipes-graphics/xorg-lib/libxfont2_2.0.4.bb b/meta/recipes-graphics/xorg-lib/libxfont2_2.0.4.bb
new file mode 100644
index 0000000000..1c9cc0a21d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxfont2_2.0.4.bb
@@ -0,0 +1,24 @@
+SUMMARY = "XFont2: X Font rasterisation library"
+
+DESCRIPTION = "libXfont2 provides various services for X servers, most \
+notably font selection and rasterisation (through external libraries \
+such as freetype)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
+
+DEPENDS += "freetype xtrans xorgproto libfontenc zlib"
+
+XORG_PN = "libXfont2"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "00516bed7ec1453d56974560379fff2f"
+SRC_URI[sha256sum] = "6d151b3368e5035efede4b6264c0fdc6662c1c99dbc2de425e3480cababc69e6"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+CVE_PRODUCT = "libxfont libxfont2"
diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb b/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb
deleted file mode 100644
index e01f3311fd..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "XFont: X Font rasterisation library"
-
-DESCRIPTION = "libXfont provides various services for X servers, most \
-notably font selection and rasterisation (through external libraries \
-such as freetype)."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT & MIT-style & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
-
-DEPENDS += "freetype xtrans fontsproto libfontenc zlib"
-PROVIDES = "xfont"
-
-PE = "1"
-
-XORG_PN = "libXfont"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "96f76ba94b4c909230bac1e2dcd551c4"
-SRC_URI[sha256sum] = "b70898527c73f9758f551bbab612af611b8a0962202829568d94f3edf4d86098"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
new file mode 100644
index 0000000000..94c6c66e87
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
@@ -0,0 +1,25 @@
+SUMMARY = "XFont: X Font rasterisation library"
+
+DESCRIPTION = "libXfont provides various services for X servers, most \
+notably font selection and rasterisation (through external libraries \
+such as freetype)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
+
+DEPENDS += "freetype xtrans xorgproto libfontenc zlib"
+PROVIDES = "xfont"
+
+PE = "1"
+
+XORG_PN = "libXfont"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "16eaf156edd79b68038b6a7c44aa9e9b"
+SRC_URI[sha256sum] = "1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb b/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
deleted file mode 100644
index a967cdc585..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "XFt: X FreeType libary"
-
-DESCRIPTION = "Xft was designed to provide good support for scalable \
-fonts, and to do so efficiently. Unlike the core fonts system, it \
-supports features such as anti-aliasing and sub-pixel rasterisation. \
-Perhaps more importantly, it gives applications full control over the \
-way glyphs are rendered, making fine typesetting and WYSIWIG display \
-possible. Finally, it allows applications to use fonts that are not \
-installed system-wide for displaying documents with embedded fonts. Xft \
-is not compatible with the core fonts system: usage of Xft requires \
-fairly extensive changes to toolkits (user-interface libraries)."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=90b90b60eb30f65fc9c2673d7cf59e24"
-
-DEPENDS += "virtual/libx11 libxrender freetype fontconfig"
-PROVIDES = "xft"
-
-PE = "1"
-
-SRC_URI[md5sum] = "331b3a2a3a1a78b5b44cfbd43f86fcfe"
-SRC_URI[sha256sum] = "f5a3c824761df351ca91827ac221090943ef28b248573486050de89f4bfcdc4c"
-
-XORG_PN = "libXft"
-
-BBCLASSEXTEND = "native"
-
-python () {
- if d.getVar('DEBIAN_NAMES', True):
- d.setVar('PKG_${PN}', '${MLPREFIX}libxft2')
-}
diff --git a/meta/recipes-graphics/xorg-lib/libxft_2.3.3.bb b/meta/recipes-graphics/xorg-lib/libxft_2.3.3.bb
new file mode 100644
index 0000000000..65bd9ae494
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxft_2.3.3.bb
@@ -0,0 +1,33 @@
+SUMMARY = "XFt: X FreeType libary"
+
+DESCRIPTION = "Xft was designed to provide good support for scalable \
+fonts, and to do so efficiently. Unlike the core fonts system, it \
+supports features such as anti-aliasing and sub-pixel rasterisation. \
+Perhaps more importantly, it gives applications full control over the \
+way glyphs are rendered, making fine typesetting and WYSIWIG display \
+possible. Finally, it allows applications to use fonts that are not \
+installed system-wide for displaying documents with embedded fonts. Xft \
+is not compatible with the core fonts system: usage of Xft requires \
+fairly extensive changes to toolkits (user-interface libraries)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=90b90b60eb30f65fc9c2673d7cf59e24"
+
+DEPENDS += "virtual/libx11 libxrender freetype fontconfig"
+PROVIDES = "xft"
+
+PE = "1"
+
+SRC_URI[md5sum] = "4a433c24627b4ff60a4dd403a0990796"
+SRC_URI[sha256sum] = "225c68e616dd29dbb27809e45e9eadf18e4d74c50be43020ef20015274529216"
+
+XORG_PN = "libXft"
+
+BBCLASSEXTEND = "native nativesdk"
+
+python () {
+ if d.getVar('DEBIAN_NAMES'):
+ d.setVar('PKG_${PN}', '${MLPREFIX}libxft2')
+}
diff --git a/meta/recipes-graphics/xorg-lib/libxi_1.7.10.bb b/meta/recipes-graphics/xorg-lib/libxi_1.7.10.bb
new file mode 100644
index 0000000000..5a08e07362
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxi_1.7.10.bb
@@ -0,0 +1,23 @@
+require xorg-lib-common.inc
+
+SUMMARY = "XI: X Input extension library"
+
+DESCRIPTION = "libxi is an extension to the X11 protocol to support \
+input devices other than the core X keyboard and pointer. It allows \
+client programs to select input from these devices independently from \
+each other and independently from the core devices."
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=17b064789fab936a1c58c4e13d965b0f \
+ file://src/XIGetDevFocus.c;endline=23;md5=cdfb0d435a33ec57ea0d1e8e395b729f"
+
+DEPENDS += "libxext xorgproto libxfixes"
+
+PE = "1"
+
+XORG_PN = "libXi"
+
+SRC_URI[md5sum] = "62c4af0839072024b4b1c8cbe84216c7"
+SRC_URI[sha256sum] = "36a30d8f6383a72e7ce060298b4b181fd298bc3a135c8e201b7ca847f5f81061"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb b/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb
deleted file mode 100644
index 7523479698..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "XI: X Input extension library"
-
-DESCRIPTION = "libxi is an extension to the X11 protocol to support \
-input devices other than the core X keyboard and pointer. It allows \
-client programs to select input from these devices independently from \
-each other and independently from the core devices."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=17b064789fab936a1c58c4e13d965b0f \
- file://src/XIGetDevFocus.c;endline=23;md5=cdfb0d435a33ec57ea0d1e8e395b729f"
-
-DEPENDS += "libxext inputproto libxfixes"
-
-PE = "1"
-
-XORG_PN = "libXi"
-
-SRC_URI[md5sum] = "510e555ecfffa8d2298a0f42b725e563"
-SRC_URI[sha256sum] = "1f32a552cec0f056c0260bdb32e853cec0673d2f40646ce932ad5a9f0205b7ac"
diff --git a/meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb b/meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb
deleted file mode 100644
index bb03f44e25..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "Xinerama: Xinerama extension library"
-
-DESCRIPTION = "Xinerama is a simple library designed to interface the \
-Xinerama Extension for retrieving information about physical output \
-devices which may be combined into a single logical X screen."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6f4f634d1643a2e638bba3fcd19c2536 \
- file://src/Xinerama.c;beginline=2;endline=25;md5=fcef273bfb66339256411dd06ea79c02"
-
-DEPENDS += "libxext xineramaproto"
-PROVIDES = "xinerama"
-PE = "1"
-
-XORG_PN = "libXinerama"
-
-SRC_URI[md5sum] = "9336dc46ae3bf5f81c247f7131461efd"
-SRC_URI[sha256sum] = "7a45699f1773095a3f821e491cbd5e10c887c5a5fce5d8d3fced15c2ff7698e2"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxinerama_1.1.4.bb b/meta/recipes-graphics/xorg-lib/libxinerama_1.1.4.bb
new file mode 100644
index 0000000000..edce35da5d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxinerama_1.1.4.bb
@@ -0,0 +1,22 @@
+require xorg-lib-common.inc
+
+SUMMARY = "Xinerama: Xinerama extension library"
+
+DESCRIPTION = "Xinerama is a simple library designed to interface the \
+Xinerama Extension for retrieving information about physical output \
+devices which may be combined into a single logical X screen."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6f4f634d1643a2e638bba3fcd19c2536 \
+ file://src/Xinerama.c;beginline=2;endline=25;md5=fcef273bfb66339256411dd06ea79c02"
+
+DEPENDS += "libxext xorgproto"
+PROVIDES = "xinerama"
+PE = "1"
+
+XORG_PN = "libXinerama"
+
+SRC_URI[md5sum] = "0d5f826a197dae74da67af4a9ef35885"
+SRC_URI[sha256sum] = "0008dbd7ecf717e1e507eed1856ab0d9cf946d03201b85d5dcf61489bb02d720"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
deleted file mode 100644
index fc08109c87..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Generic XKB keymap library"
-DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
-processes a reduced subset of keymaps as defined by the XKB specification."
-HOMEPAGE = "http://www.xkbcommon.org"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=09457b156e3155972abebcaaaa0cb434"
-LICENSE = "MIT & MIT-style"
-
-DEPENDS = "util-macros flex-native bison-native"
-
-SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "67a8f322b5fa32352272e811bb90dd73"
-SRC_URI[sha256sum] = "5b0887b080b42169096a61106661f8d35bae783f8b6c58f97ebcd3af83ea8760"
-
-UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-docs"
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.9.1.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.9.1.bb
new file mode 100644
index 0000000000..c147428a14
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.9.1.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Generic XKB keymap library"
+DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
+processes a reduced subset of keymaps as defined by the XKB specification."
+HOMEPAGE = "http://www.xkbcommon.org"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e525ed9809e1f8a07cf4bce8b09e8b87"
+LICENSE = "MIT & MIT-style"
+
+DEPENDS = "util-macros flex-native bison-native"
+
+SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "4662756fd73ab0ac9e32efdad8f807f6"
+SRC_URI[sha256sum] = "d4c6aabf0a5c1fc616f8a6a65c8a818c03773b9a87da9fbc434da5acd1199be0"
+
+UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
+
+inherit meson pkgconfig
+
+EXTRA_OEMESON = "-Denable-docs=false"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}"
+PACKAGECONFIG[x11] = "-Denable-x11=true,-Denable-x11=false,libxcb xkeyboard-config,"
+PACKAGECONFIG[wayland] = "-Denable-wayland=true,-Denable-wayland=false,wayland-native wayland wayland-protocols,"
+
+# Fix a following runtime error:
+# xkbcommon: ERROR: couldn't find a Compose file for locale "C"
+RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11-locale', 'libx11-compose-data', d)}"
diff --git a/meta/recipes-graphics/xorg-lib/libxkbfile_1.0.9.bb b/meta/recipes-graphics/xorg-lib/libxkbfile_1.0.9.bb
deleted file mode 100644
index 39a344ccad..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxkbfile_1.0.9.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "XKB: X Keyboard File manipulation library"
-
-DESCRIPTION = "libxkbfile provides an interface to read and manipulate \
-description files for XKB, the X11 keyboard configuration extension."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8be7367f7e5d605a426f76bb37d4d61f"
-
-DEPENDS += "virtual/libx11 kbproto"
-
-PE = "1"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "4a4cfeaf24dab1b991903455d6d7d404"
-SRC_URI[sha256sum] = "51817e0530961975d9513b773960b4edd275f7d5c72293d5a151ed4f42aeb16a"
diff --git a/meta/recipes-graphics/xorg-lib/libxkbfile_1.1.0.bb b/meta/recipes-graphics/xorg-lib/libxkbfile_1.1.0.bb
new file mode 100644
index 0000000000..3a6c50ca21
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxkbfile_1.1.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "XKB: X Keyboard File manipulation library"
+
+DESCRIPTION = "libxkbfile provides an interface to read and manipulate \
+description files for XKB, the X11 keyboard configuration extension."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8be7367f7e5d605a426f76bb37d4d61f"
+
+DEPENDS += "virtual/libx11 xorgproto"
+
+PE = "1"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "dd7e1e946def674e78c0efbc5c7d5b3b"
+SRC_URI[sha256sum] = "758dbdaa20add2db4902df0b1b7c936564b7376c02a0acd1f2a331bd334b38c7"
diff --git a/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb b/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb
deleted file mode 100644
index d5935ff349..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Xmu and Xmuu: X Miscellaneous Utility libraries"
-
-DESCRIPTION = "The Xmu Library is a collection of miscellaneous (some \
-might say random) utility functions that have been useful in building \
-various applications and widgets. This library is required by the Athena \
-Widgets. A subset of the functions that do not rely on the Athena \
-Widgets (libXaw) or X Toolkit Instrinsics (libXt) are provided in a \
-second library, libXmuu."
-
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=def3d8e4e9c42004f1941fa22f01dc18"
-
-DEPENDS += "libxt libxext"
-PROVIDES = "xmu"
-
-PE = "1"
-
-XORG_PN = "libXmu"
-
-LEAD_SONAME = "libXmu"
-
-PACKAGES =+ "libxmuu"
-
-FILES_libxmuu = "${libdir}/libXmuu.so.*"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "41d92ab627dfa06568076043f3e089e4"
-SRC_URI[sha256sum] = "756edc7c383254eef8b4e1b733c3bf1dc061b523c9f9833ac7058378b8349d0b"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-lib/libxmu_1.1.3.bb b/meta/recipes-graphics/xorg-lib/libxmu_1.1.3.bb
new file mode 100644
index 0000000000..dc3179f53e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxmu_1.1.3.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Xmu and Xmuu: X Miscellaneous Utility libraries"
+
+DESCRIPTION = "The Xmu Library is a collection of miscellaneous (some \
+might say random) utility functions that have been useful in building \
+various applications and widgets. This library is required by the Athena \
+Widgets. A subset of the functions that do not rely on the Athena \
+Widgets (libXaw) or X Toolkit Instrinsics (libXt) are provided in a \
+second library, libXmuu."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=def3d8e4e9c42004f1941fa22f01dc18"
+
+DEPENDS += "libxt libxext"
+PROVIDES = "xmu"
+
+PE = "1"
+
+XORG_PN = "libXmu"
+
+LEAD_SONAME = "libXmu"
+
+PACKAGES =+ "libxmuu"
+
+FILES_libxmuu = "${libdir}/libXmuu.so.*"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "ac774cff8b493f566088a255dbf91201"
+SRC_URI[sha256sum] = "9c343225e7c3dc0904f2122b562278da5fed639b1b5e880d25111561bac5b731"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta/recipes-graphics/xorg-lib/libxpm_3.5.11.bb b/meta/recipes-graphics/xorg-lib/libxpm_3.5.11.bb
deleted file mode 100644
index 545874cdd4..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxpm_3.5.11.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-require xorg-lib-common.inc
-
-# libxpm requires xgettext to build
-inherit gettext
-
-SUMMARY = "Xpm: X Pixmap extension library"
-
-DESCRIPTION = "libXpm provides support and common operation for the XPM \
-pixmap format, which is commonly used in legacy X applications. XPM is \
-an extension of the monochrome XBM bitmap specificied in the X \
-protocol."
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=51f4270b012ecd4ab1a164f5f4ed6cf7"
-DEPENDS += "libxext libsm libxt"
-PE = "1"
-
-XORG_PN = "libXpm"
-
-PACKAGES =+ "sxpm cxpm"
-FILES_cxpm = "${bindir}/cxpm"
-FILES_sxpm = "${bindir}/sxpm"
-
-SRC_URI[md5sum] = "769ee12a43611cdebd38094eaf83f3f0"
-SRC_URI[sha256sum] = "c5bdafa51d1ae30086fac01ab83be8d47fe117b238d3437f8e965434090e041c"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb b/meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb
new file mode 100644
index 0000000000..64d829b31e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb
@@ -0,0 +1,27 @@
+require xorg-lib-common.inc
+
+# libxpm requires xgettext to build
+inherit gettext
+
+SUMMARY = "Xpm: X Pixmap extension library"
+
+DESCRIPTION = "libXpm provides support and common operation for the XPM \
+pixmap format, which is commonly used in legacy X applications. XPM is \
+an extension of the monochrome XBM bitmap specificied in the X \
+protocol."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=51f4270b012ecd4ab1a164f5f4ed6cf7"
+DEPENDS += "libxext libsm libxt gettext-native"
+PE = "1"
+
+XORG_PN = "libXpm"
+
+PACKAGES =+ "sxpm cxpm"
+FILES_cxpm = "${bindir}/cxpm"
+FILES_sxpm = "${bindir}/sxpm"
+
+SRC_URI[md5sum] = "20f4627672edb2bd06a749f11aa97302"
+SRC_URI[sha256sum] = "fd6a6de3da48de8d1bb738ab6be4ad67f7cb0986c39bd3f7d51dd24f7854bdec"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-lib/libxrandr_1.5.0.bb b/meta/recipes-graphics/xorg-lib/libxrandr_1.5.0.bb
deleted file mode 100644
index abbbae5528..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxrandr_1.5.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "XRandR: X Resize, Rotate and Reflect extension library"
-
-DESCRIPTION = "The X Resize, Rotate and Reflect Extension, called RandR \
-for short, brings the ability to resize, rotate and reflect the root \
-window of a screen. It is based on the X Resize and Rotate Extension as \
-specified in the Proceedings of the 2001 Usenix Technical Conference \
-[RANDR]."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c9d1a2118a6cd5727521db8e7a2fee69"
-
-DEPENDS += "virtual/libx11 randrproto libxrender libxext"
-
-PE = "1"
-
-XORG_PN = "libXrandr"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "309762867e41c6fd813da880d8a1bc93"
-SRC_URI[sha256sum] = "6f864959b7fc35db11754b270d71106ef5b5cf363426aa58589cb8ac8266de58"
diff --git a/meta/recipes-graphics/xorg-lib/libxrandr_1.5.2.bb b/meta/recipes-graphics/xorg-lib/libxrandr_1.5.2.bb
new file mode 100644
index 0000000000..53a8335d64
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxrandr_1.5.2.bb
@@ -0,0 +1,23 @@
+SUMMARY = "XRandR: X Resize, Rotate and Reflect extension library"
+
+DESCRIPTION = "The X Resize, Rotate and Reflect Extension, called RandR \
+for short, brings the ability to resize, rotate and reflect the root \
+window of a screen. It is based on the X Resize and Rotate Extension as \
+specified in the Proceedings of the 2001 Usenix Technical Conference \
+[RANDR]."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c9d1a2118a6cd5727521db8e7a2fee69"
+
+DEPENDS += "virtual/libx11 xorgproto libxrender libxext"
+
+PE = "1"
+
+XORG_PN = "libXrandr"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "18f3b20d522f45e4dadd34afb5bea048"
+SRC_URI[sha256sum] = "8aea0ebe403d62330bb741ed595b53741acf45033d3bda1792f1d4cc3daee023"
diff --git a/meta/recipes-graphics/xorg-lib/libxrender_0.9.10.bb b/meta/recipes-graphics/xorg-lib/libxrender_0.9.10.bb
new file mode 100644
index 0000000000..9b18366138
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxrender_0.9.10.bb
@@ -0,0 +1,24 @@
+SUMMARY = "XRender: X Rendering Extension library"
+
+DESCRIPTION = "The X Rendering Extension (Render) introduces digital \
+image composition as the foundation of a new rendering model within the \
+X Window System. Rendering geometric figures is accomplished by \
+client-side tessellation into either triangles or trapezoids. Text is \
+drawn by loading glyphs into the server and rendering sets of them."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8bc71986d3b9b3639f6dfd6fac8f196"
+
+DEPENDS += "virtual/libx11 xorgproto"
+
+PE = "1"
+
+XORG_PN = "libXrender"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "802179a76bded0b658f4e9ec5e1830a4"
+SRC_URI[sha256sum] = "c06d5979f86e64cabbde57c223938db0b939dff49fdb5a793a1d3d0396650949"
+
diff --git a/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb b/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb
deleted file mode 100644
index 9fde040613..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "XRender: X Rendering Extension library"
-
-DESCRIPTION = "The X Rendering Extension (Render) introduces digital \
-image composition as the foundation of a new rendering model within the \
-X Window System. Rendering geometric figures is accomplished by \
-client-side tessellation into either triangles or trapezoids. Text is \
-drawn by loading glyphs into the server and rendering sets of them."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8bc71986d3b9b3639f6dfd6fac8f196"
-
-DEPENDS += "virtual/libx11 renderproto xproto xdmcp"
-
-PE = "1"
-
-XORG_PN = "libXrender"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "5db92962b124ca3a8147daae4adbd622"
-SRC_URI[sha256sum] = "fc2fe57980a14092426dffcd1f2d9de0987b9d40adea663bd70d6342c0e9be1a"
diff --git a/meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb b/meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb
deleted file mode 100644
index 8c04c44f80..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "XRes: X Resource extension library"
-
-DESCRIPTION = "libXRes provides an X Window System client interface to \
-the Resource extension to the X protocol. The Resource extension allows \
-for X clients to see and monitor the X resource usage of various clients \
-(pixmaps, et al)."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8c89441a8df261bdc56587465e13c7fa"
-
-DEPENDS += "libxext resourceproto"
-
-PE = "1"
-
-XORG_PN = "libXres"
-
-SRC_URI[md5sum] = "45ef29206a6b58254c81bea28ec6c95f"
-SRC_URI[sha256sum] = "26899054aa87f81b17becc68e8645b240f140464cf90c42616ebb263ec5fa0e5"
diff --git a/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb b/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb
new file mode 100644
index 0000000000..af6bb19a25
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "XRes: X Resource extension library"
+
+DESCRIPTION = "libXRes provides an X Window System client interface to \
+the Resource extension to the X protocol. The Resource extension allows \
+for X clients to see and monitor the X resource usage of various clients \
+(pixmaps, et al)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8c89441a8df261bdc56587465e13c7fa"
+
+DEPENDS += "libxext xorgproto"
+
+PE = "1"
+
+XORG_PN = "libXres"
+
+SRC_URI[md5sum] = "5d6d443d1abc8e1f6fc1c57fb27729bb"
+SRC_URI[sha256sum] = "ff75c1643488e64a7cfbced27486f0f944801319c84c18d3bd3da6bf28c812d4"
diff --git a/meta/recipes-graphics/xorg-lib/libxscrnsaver_1.2.2.bb b/meta/recipes-graphics/xorg-lib/libxscrnsaver_1.2.2.bb
deleted file mode 100644
index 354e5de7fd..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxscrnsaver_1.2.2.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "Xscrnsaver: X Screen Saver extension library"
-
-DESCRIPTION = "The X Window System provides support for changing the \
-image on a display screen after a user-settable period of inactivity to \
-avoid burning the cathode ray tube phosphors. However, no interfaces are \
-provided for the user to control the image that is drawn. This extension \
-allows an external \"screen saver\" client to detect when the alternate \
-image is to be displayed and to provide the graphics."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=21fd154ee757813632ada871a34113fb"
-
-DEPENDS += "libxext scrnsaverproto"
-PROVIDES = "libxss"
-RREPLACES_${PN} = "libxss"
-PE = "1"
-
-XORG_PN = "libXScrnSaver"
-
-SRC_URI[md5sum] = "7a773b16165e39e938650bcc9027c1d5"
-SRC_URI[sha256sum] = "8ff1efa7341c7f34bcf9b17c89648d6325ddaae22e3904e091794e0b4426ce1d"
diff --git a/meta/recipes-graphics/xorg-lib/libxscrnsaver_1.2.3.bb b/meta/recipes-graphics/xorg-lib/libxscrnsaver_1.2.3.bb
new file mode 100644
index 0000000000..aed52e75ee
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxscrnsaver_1.2.3.bb
@@ -0,0 +1,23 @@
+require xorg-lib-common.inc
+
+SUMMARY = "Xscrnsaver: X Screen Saver extension library"
+
+DESCRIPTION = "The X Window System provides support for changing the \
+image on a display screen after a user-settable period of inactivity to \
+avoid burning the cathode ray tube phosphors. However, no interfaces are \
+provided for the user to control the image that is drawn. This extension \
+allows an external \"screen saver\" client to detect when the alternate \
+image is to be displayed and to provide the graphics."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=21fd154ee757813632ada871a34113fb"
+
+DEPENDS += "libxext xorgproto"
+PROVIDES = "libxss"
+RREPLACES_${PN} = "libxss"
+PE = "1"
+
+XORG_PN = "libXScrnSaver"
+
+SRC_URI[md5sum] = "eeea9d5af3e6c143d0ea1721d27a5e49"
+SRC_URI[sha256sum] = "f917075a1b7b5a38d67a8b0238eaab14acd2557679835b154cf2bca576e89bf8"
diff --git a/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb b/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb
deleted file mode 100644
index ae34b1fe46..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Shared memory 'SyncFence' synchronization primitive"
-
-DESCRIPTION = "This library offers a CPU-based synchronization primitive compatible \
-with the X SyncFence objects that can be shared between processes \
-using file descriptor passing."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=47e508ca280fde97906eacb77892c3ac"
-
-DEPENDS += "virtual/libx11"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "66662e76899112c0f99e22f2fc775a7e"
-SRC_URI[sha256sum] = "d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c"
diff --git a/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb b/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb
new file mode 100644
index 0000000000..85a48e4c58
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Shared memory 'SyncFence' synchronization primitive"
+
+DESCRIPTION = "This library offers a CPU-based synchronization primitive compatible \
+with the X SyncFence objects that can be shared between processes \
+using file descriptor passing."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=47e508ca280fde97906eacb77892c3ac"
+
+DEPENDS += "virtual/libx11"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "42dda8016943dc12aff2c03a036e0937"
+SRC_URI[sha256sum] = "b884300d26a14961a076fbebc762a39831cb75f92bed5ccf9836345b459220c7"
diff --git a/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch b/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
index ffc2c15d71..ff8c675dbd 100644
--- a/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
+++ b/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
@@ -1,3 +1,8 @@
+From f069b0a430fe96f3ece2106d34375008833599d3 Mon Sep 17 00:00:00 2001
+From: Nitin A Kamble <nitin.a.kamble@intel.com>
+Date: Fri, 2 Dec 2011 12:20:05 -0800
+Subject: [PATCH] libxt: fix compilatoin with x32 toolchain
+
Upstream-Status: Pending
This fixes compilation with x32 toolchain.
@@ -5,10 +10,15 @@ This fixes compilation with x32 toolchain.
Received this patch from H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
+---
+ include/X11/Xtos.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
---- libXt-1.1.1/include/X11/Xtos.h.x32 2011-02-08 07:56:40.000000000 -0800
-+++ libXt-1.1.1/include/X11/Xtos.h 2011-11-30 17:19:27.473349770 -0800
-@@ -62,7 +62,7 @@ SOFTWARE.
+diff --git a/include/X11/Xtos.h b/include/X11/Xtos.h
+index 64b2da8..44f52c2 100644
+--- a/include/X11/Xtos.h
++++ b/include/X11/Xtos.h
+@@ -59,7 +59,7 @@ SOFTWARE.
defined(__sparc64__) || \
defined(__s390x__) || \
(defined(__hppa__) && defined(__LP64__)) || \
diff --git a/meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb b/meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb
deleted file mode 100644
index c1ed0bb314..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Xt: X Toolkit Intrinsics library"
-
-DESCRIPTION = "The Intrinsics are a programming library tailored to the \
-special requirements of user interface construction within a network \
-window system, specifically the X Window System. The Intrinsics and a \
-widget set make up an X Toolkit. The Intrinsics provide the base \
-mechanism necessary to build a wide variety of interoperating widget \
-sets and application environments. The Intrinsics are a layer on top of \
-Xlib, the C Library X Interface. They extend the fundamental \
-abstractions provided by the X Window System while still remaining \
-independent of any particular user interface policy or style."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6565b1e0094ea1caae0971cc4035f343"
-
-
-DEPENDS += "util-linux libxcb libsm virtual/libx11 kbproto libxdmcp"
-PROVIDES = "xt"
-
-PE = "1"
-
-XORG_PN = "libXt"
-
-SRC_URI += "file://libxt_fix_for_x32.patch"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF += "--disable-xkb"
-
-SRC_URI[md5sum] = "8f5b5576fbabba29a05f3ca2226f74d3"
-SRC_URI[sha256sum] = "46eeb6be780211fdd98c5109286618f6707712235fdd19df4ce1e6954f349f1a"
diff --git a/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb b/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb
new file mode 100644
index 0000000000..42df435052
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Xt: X Toolkit Intrinsics library"
+
+DESCRIPTION = "The Intrinsics are a programming library tailored to the \
+special requirements of user interface construction within a network \
+window system, specifically the X Window System. The Intrinsics and a \
+widget set make up an X Toolkit. The Intrinsics provide the base \
+mechanism necessary to build a wide variety of interoperating widget \
+sets and application environments. The Intrinsics are a layer on top of \
+Xlib, the C Library X Interface. They extend the fundamental \
+abstractions provided by the X Window System while still remaining \
+independent of any particular user interface policy or style."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=73d55cea4d27ca1a09a5d23378b3ecf8"
+
+DEPENDS += "util-linux libxcb libsm virtual/libx11 xorgproto libxdmcp"
+PROVIDES = "xt"
+
+PE = "1"
+
+XORG_PN = "libXt"
+
+SRC_URI += "file://libxt_fix_for_x32.patch \
+ "
+SRC_URI[md5sum] = "a9019421d3ee8b4937b6afd9025f018a"
+SRC_URI[sha256sum] = "b31df531dabed9f4611fc8980bc51d7782967e2aff44c4105251a1acb5a77831"
+
+BBCLASSEXTEND = "native nativesdk"
+
+EXTRA_OECONF += "--disable-xkb"
diff --git a/meta/recipes-graphics/xorg-lib/libxtst_1.2.2.bb b/meta/recipes-graphics/xorg-lib/libxtst_1.2.2.bb
deleted file mode 100644
index 1b0bcf391c..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxtst_1.2.2.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "XTest: X Test extension library"
-
-DESCRIPTION = "This extension is a minimal set of client and server \
-extensions required to completely test the X11 server with no user \
-intervention."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=bb4f89972c3869f617f61c1a79ad1952 \
- file://src/XTest.c;beginline=2;endline=32;md5=b1c8c9dff842b4d5b89ca5fa32c40e99"
-
-DEPENDS += "libxext recordproto inputproto libxi"
-PROVIDES = "xtst"
-PE = "1"
-
-XORG_PN = "libXtst"
-
-SRC_URI[md5sum] = "25c6b366ac3dc7a12c5d79816ce96a59"
-SRC_URI[sha256sum] = "ef0a7ffd577e5f1a25b1663b375679529663a1880151beaa73e9186c8309f6d9"
diff --git a/meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb b/meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb
new file mode 100644
index 0000000000..7837f69d38
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb
@@ -0,0 +1,22 @@
+require xorg-lib-common.inc
+
+SUMMARY = "XTest: X Test extension library"
+
+DESCRIPTION = "This extension is a minimal set of client and server \
+extensions required to completely test the X11 server with no user \
+intervention."
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bb4f89972c3869f617f61c1a79ad1952 \
+ file://src/XTest.c;beginline=2;endline=32;md5=b1c8c9dff842b4d5b89ca5fa32c40e99"
+
+DEPENDS += "libxext xorgproto libxi"
+PROVIDES = "xtst"
+PE = "1"
+
+XORG_PN = "libXtst"
+
+SRC_URI[md5sum] = "ef8c2c1d16a00bd95b9fdcef63b8a2ca"
+SRC_URI[sha256sum] = "4655498a1b8e844e3d6f21f3b2c4e2b571effb5fd83199d428a6ba7ea4bf5204"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxv_1.0.10.bb b/meta/recipes-graphics/xorg-lib/libxv_1.0.10.bb
deleted file mode 100644
index f02b8b64f5..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxv_1.0.10.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Xv: X Video extension library"
-
-DESCRIPTION = "libXv provides an X Window System client interface to the \
-X Video extension to the X protocol. The X Video extension allows for \
-accelerated drawing of videos. Hardware adaptors are exposed to \
-clients, which may draw in a number of colourspaces, including YUV."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=827da9afab1f727f2a66574629e0f39c"
-
-DEPENDS += "libxext videoproto"
-
-XORG_PN = "libXv"
-
-SRC_URI[md5sum] = "e0af49d7d758b990e6fef629722d4aca"
-SRC_URI[sha256sum] = "55fe92f8686ce8612e2c1bfaf58c057715534419da700bda8d517b1d97914525"
diff --git a/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb b/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb
new file mode 100644
index 0000000000..c6027233ef
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Xv: X Video extension library"
+
+DESCRIPTION = "libXv provides an X Window System client interface to the \
+X Video extension to the X protocol. The X Video extension allows for \
+accelerated drawing of videos. Hardware adaptors are exposed to \
+clients, which may draw in a number of colourspaces, including YUV."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=827da9afab1f727f2a66574629e0f39c"
+
+DEPENDS += "libxext xorgproto"
+
+XORG_PN = "libXv"
+
+SRC_URI[md5sum] = "210b6ef30dda2256d54763136faa37b9"
+SRC_URI[sha256sum] = "d26c13eac99ac4504c532e8e76a1c8e4bd526471eb8a0a4ff2a88db60cb0b088"
+
diff --git a/meta/recipes-graphics/xorg-lib/libxvmc_1.0.12.bb b/meta/recipes-graphics/xorg-lib/libxvmc_1.0.12.bb
new file mode 100644
index 0000000000..29ed0c43d1
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxvmc_1.0.12.bb
@@ -0,0 +1,19 @@
+SUMMARY = "XvMC: X Video Motion Compensation extension library"
+
+DESCRIPTION = "XvMC extends the X Video extension (Xv) and enables \
+hardware rendered motion compensation support."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0a207f08d4961489c55046c9a5e500da \
+ file://wrapper/XvMCWrapper.c;endline=26;md5=5151daa8172a3f1bb0cb0e0ff157d9de"
+
+DEPENDS += "libxext libxv xorgproto"
+
+PE = "1"
+
+XORG_PN = "libXvMC"
+
+SRC_URI[md5sum] = "3569ff7f3e26864d986d6a21147eaa58"
+SRC_URI[sha256sum] = "6b3da7977b3f7eaf4f0ac6470ab1e562298d82c4e79077765787963ab7966dcd"
diff --git a/meta/recipes-graphics/xorg-lib/libxvmc_1.0.9.bb b/meta/recipes-graphics/xorg-lib/libxvmc_1.0.9.bb
deleted file mode 100644
index 41e8498a6f..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxvmc_1.0.9.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "XvMC: X Video Motion Compensation extension library"
-
-DESCRIPTION = "XvMC extends the X Video extension (Xv) and enables \
-hardware rendered motion compensation support."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0a207f08d4961489c55046c9a5e500da \
- file://wrapper/XvMCWrapper.c;endline=26;md5=5151daa8172a3f1bb0cb0e0ff157d9de"
-
-DEPENDS += "libxext libxv videoproto"
-
-PE = "1"
-
-XORG_PN = "libXvMC"
-
-SRC_URI[md5sum] = "eba6b738ed5fdcd8f4203d7c8a470c79"
-SRC_URI[sha256sum] = "0703d7dff6ffc184f1735ca5d4eb9dbb402b522e08e008f2f96aee16c40a5756"
diff --git a/meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.4.bb b/meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.4.bb
deleted file mode 100644
index 695a39637c..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.4.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "XFree86-DGA: XFree86 Direct Graphics Access extension library"
-
-DESCRIPTION = "libXxf86dga provides the XFree86-DGA extension, which \
-allows direct graphics access to a framebuffer-like region, and also \
-allows relative mouse reporting, et al. It is mainly used by games and \
-emulators for games."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=abb99ac125f84f424a4278153988e32f"
-
-DEPENDS += "libxext xf86dgaproto"
-
-PE = "1"
-
-SRC_URI[md5sum] = "d7dd9b9df336b7dd4028b6b56542ff2c"
-SRC_URI[sha256sum] = "8eecd4b6c1df9a3704c04733c2f4fa93ef469b55028af5510b25818e2456c77e"
-
-XORG_PN = "libXxf86dga"
diff --git a/meta/recipes-graphics/xorg-lib/libxxf86misc_1.0.3.bb b/meta/recipes-graphics/xorg-lib/libxxf86misc_1.0.3.bb
deleted file mode 100644
index af6f1f76a2..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxxf86misc_1.0.3.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "XFree86-Misc: XFree86 miscellaneous extension library"
-
-DESCRIPTION = "The XFree86-Misc extension, provides a means to access \
-input device configuration settings specific to the XFree86/Xorg DDX."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=27c91ecc435bd3d2bfad868914c94b45"
-
-DEPENDS += "libxext xf86miscproto"
-PROVIDES = "xxf86misc"
-
-PE = "1"
-
-XORG_PN = "libXxf86misc"
-
-SRC_URI[md5sum] = "6bc0bf78909fd71021c466c793d4385c"
-SRC_URI[sha256sum] = "563f4200862efd3334c33a669e0a0aae5bab31f3998db75b87a99a697cc26b5b"
-
diff --git a/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb b/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb
index 35f87d2719..95fc0b642c 100644
--- a/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb
+++ b/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb
@@ -10,7 +10,7 @@ require xorg-lib-common.inc
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=fa0b9c462d8f2f13eba26492d42ea63d"
-DEPENDS += "libxext xf86vidmodeproto"
+DEPENDS += "libxext xorgproto"
PE = "1"
diff --git a/meta/recipes-graphics/xorg-lib/pixman/asm_include.patch b/meta/recipes-graphics/xorg-lib/pixman/asm_include.patch
deleted file mode 100644
index b52a5707d6..0000000000
--- a/meta/recipes-graphics/xorg-lib/pixman/asm_include.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Fixes errors like
-
-Assembler messages:
-Fatal error: can't create .libs/pixman-mips-dspr2-asm.o: No such file or directory
-
-it works with glibc because it uses gcc fixed-headers but thats not right.
-
-We move the include under C block
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: pixman-0.32.6/pixman/pixman-private.h
-===================================================================
---- pixman-0.32.6.orig/pixman/pixman-private.h
-+++ pixman-0.32.6/pixman/pixman-private.h
-@@ -1,4 +1,3 @@
--#include <float.h>
-
- #ifndef PIXMAN_PRIVATE_H
- #define PIXMAN_PRIVATE_H
-@@ -17,6 +16,8 @@
-
- #ifndef __ASSEMBLER__
-
-+#include <float.h>
-+
- #ifndef PACKAGE
- # error config.h must be included before pixman-private.h
- #endif
diff --git a/meta/recipes-graphics/xorg-lib/pixman_0.34.0.bb b/meta/recipes-graphics/xorg-lib/pixman_0.34.0.bb
deleted file mode 100644
index c4ca621a8a..0000000000
--- a/meta/recipes-graphics/xorg-lib/pixman_0.34.0.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Pixman: Pixel Manipulation library"
-
-DESCRIPTION = "Pixman provides a library for manipulating pixel regions \
--- a set of Y-X banded rectangles, image compositing using the \
-Porter/Duff model and implicit mask generation for geometric primitives \
-including trapezoids, triangles, and rectangles."
-
-require xorg-lib-common.inc
-
-# see http://cairographics.org/releases/ - only even minor versions are stable
-UPSTREAM_CHECK_REGEX = "pixman-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
-
-LICENSE = "MIT & MIT-style & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3 \
- file://pixman/pixman-matrix.c;endline=25;md5=ba6e8769bfaaee2c41698755af04c4be \
- file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \
- "
-DEPENDS += "zlib libpng"
-BBCLASSEXTEND = "native nativesdk"
-
-PE = "1"
-
-IWMMXT = "--disable-arm-iwmmxt"
-LOONGSON_MMI = "--disable-loongson-mmi"
-# If target supports neon then disable the 'simd' (ie VFPv2) fallback, otherwise disable neon.
-NEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--disable-arm-simd", "--disable-arm-neon" ,d)}"
-
-EXTRA_OECONF = "--disable-gtk ${IWMMXT} ${LOONGSON_MMI} ${NEON}"
-EXTRA_OECONF_class-native = "--disable-gtk"
-EXTRA_OECONF_class-nativesdk = "--disable-gtk"
-
-SRC_URI += "\
- file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
- file://asm_include.patch \
- file://0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch \
-"
-
-SRC_URI[md5sum] = "002a4fcb644ddfcb4b0e4191576a0d59"
-SRC_URI[sha256sum] = "39ba3438f3d17c464b0cb8be006dacbca0ab5aee97ebde69fec7ecdbf85794a0"
-
-REQUIRED_DISTRO_FEATURES = ""
diff --git a/meta/recipes-graphics/xorg-lib/pixman_0.38.4.bb b/meta/recipes-graphics/xorg-lib/pixman_0.38.4.bb
new file mode 100644
index 0000000000..82c2e73e50
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/pixman_0.38.4.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Pixman: Pixel Manipulation library"
+
+DESCRIPTION = "Pixman provides a library for manipulating pixel regions \
+-- a set of Y-X banded rectangles, image compositing using the \
+Porter/Duff model and implicit mask generation for geometric primitives \
+including trapezoids, triangles, and rectangles."
+
+require xorg-lib-common.inc
+
+# see http://cairographics.org/releases/ - only even minor versions are stable
+UPSTREAM_CHECK_REGEX = "pixman-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
+
+LICENSE = "MIT & MIT-style & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3 \
+ file://pixman/pixman-matrix.c;endline=21;md5=4a018dff3e4e25302724c88ff95c2456 \
+ file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \
+ "
+DEPENDS += "zlib libpng"
+BBCLASSEXTEND = "native nativesdk"
+
+PE = "1"
+
+IWMMXT = "--disable-arm-iwmmxt"
+LOONGSON_MMI = "--disable-loongson-mmi"
+# If target supports neon then disable the 'simd' (ie VFPv2) fallback, otherwise disable neon.
+NEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--disable-arm-simd", "--disable-arm-neon" ,d)}"
+
+EXTRA_OECONF = "--disable-gtk ${IWMMXT} ${LOONGSON_MMI} ${NEON}"
+EXTRA_OECONF_class-native = "--disable-gtk"
+EXTRA_OECONF_class-nativesdk = "--disable-gtk"
+
+SRC_URI += "\
+ file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
+ file://0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch \
+"
+
+SRC_URI[md5sum] = "16a350a8a40116ddf67632a1d2623711"
+SRC_URI[sha256sum] = "84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550"
+
+REQUIRED_DISTRO_FEATURES = ""
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util.inc b/meta/recipes-graphics/xorg-lib/xcb-util.inc
index 99d04f9d44..0e5ab70b2d 100644
--- a/meta/recipes-graphics/xorg-lib/xcb-util.inc
+++ b/meta/recipes-graphics/xorg-lib/xcb-util.inc
@@ -18,6 +18,6 @@ DEPENDS += "gperf-native"
SRC_URI = "http://xcb.freedesktop.org/dist/${BPN}-${PV}.tar.bz2"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
deleted file mode 100644
index 79fcbd897f..0000000000
--- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Keyboard configuration database for X Window"
-
-DESCRIPTION = "The non-arch keyboard configuration database for X \
-Window. The goal is to provide the consistent, well-structured, \
-frequently released open source of X keyboard configuration data for X \
-Window System implementations. The project is targeted to XKB-based \
-systems."
-
-HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
-
-SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
-SRC_URI[sha256sum] = "c41d917d6c8a59feb7ccbda51c40a6ada824fdd1e9684b52dd48c9530617ddd0"
-
-SECTION = "x11/libs"
-DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
-
-EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
-
-FILES_${PN} += "${datadir}/X11/xkb"
-
-inherit autotools pkgconfig gettext
-
-do_install_append () {
- install -d ${D}${datadir}/X11/xkb/compiled
- cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
-}
diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.28.bb b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.28.bb
new file mode 100644
index 0000000000..7a3d694bd6
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.28.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Keyboard configuration database for X Window"
+
+DESCRIPTION = "The non-arch keyboard configuration database for X \
+Window. The goal is to provide the consistent, well-structured, \
+frequently released open source of X keyboard configuration data for X \
+Window System implementations. The project is targeted to XKB-based \
+systems."
+
+HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
+
+SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
+SRC_URI[md5sum] = "5a968ab77846ff85a04242410b2a61de"
+SRC_URI[sha256sum] = "69adb25b0fc64e4075f8ec0eab8d869892419f474f91fb69db1713de2062bdce"
+
+SECTION = "x11/libs"
+DEPENDS = "util-macros libxslt-native"
+
+EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
+
+FILES_${PN} += "${datadir}/X11/xkb"
+
+inherit autotools pkgconfig gettext
+
+do_install_append () {
+ install -d ${D}${datadir}/X11/xkb/compiled
+ cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
+}
diff --git a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
index 6f4e44454f..a566eaa45e 100644
--- a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
+++ b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
@@ -11,7 +11,7 @@ SRC_URI = "${XORG_MIRROR}/individual/lib/${XORG_PN}-${PV}.tar.bz2"
S = "${WORKDIR}/${XORG_PN}-${PV}"
-inherit autotools distro_features_check pkgconfig
+inherit autotools features_check pkgconfig
EXTRA_OECONF = "--disable-specs --without-groff --without-ps2pdf --without-fop"
@@ -24,4 +24,3 @@ UNKNOWN_CONFIGURE_WHITELIST += "--enable-malloc0returnsnull --disable-malloc0ret
"
REQUIRED_DISTRO_FEATURES ?= "x11"
-REQUIRED_DISTRO_FEATURES_class-native = ""
diff --git a/meta/recipes-graphics/xorg-lib/xtrans/multilibfix.patch b/meta/recipes-graphics/xorg-lib/xtrans/multilibfix.patch
new file mode 100644
index 0000000000..c513bad20e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/xtrans/multilibfix.patch
@@ -0,0 +1,18 @@
+The xtrans.pc file is installed into a non-arch directory yet contains libdir
+which can vary depending on which multilib is configured. The .pc file does
+not require libdir so remove this to fix multilib builds.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Pending
+
+Index: xtrans-1.3.5/xtrans.pc.in
+===================================================================
+--- xtrans-1.3.5.orig/xtrans.pc.in
++++ xtrans-1.3.5/xtrans.pc.in
+@@ -1,6 +1,5 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-libdir=@libdir@
+ includedir=@includedir@
+
+ Name: XTrans
diff --git a/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb b/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
deleted file mode 100644
index d5b7f1a2c6..0000000000
--- a/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "XTrans: X Transport library"
-
-DESCRIPTION = "The X Transport Interface is intended to combine all \
-system and transport specific code into a single place. This API should \
-be used by all libraries, clients and servers of the X Window System. \
-Use of this API should allow the addition of new types of transports and \
-support for new platforms without making any changes to the source \
-except in the X Transport Interface code."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=49347921d4d5268021a999f250edc9ca"
-
-PE = "1"
-
-RDEPENDS_${PN}-dev = ""
-
-inherit gettext
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "c5ba432dd1514d858053ffe9f4737dd8"
-SRC_URI[sha256sum] = "adbd3b36932ce4c062cd10f57d78a156ba98d618bdb6f50664da327502bc8301"
diff --git a/meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb b/meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb
new file mode 100644
index 0000000000..5bf134b5f8
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb
@@ -0,0 +1,26 @@
+SUMMARY = "XTrans: X Transport library"
+
+DESCRIPTION = "The X Transport Interface is intended to combine all \
+system and transport specific code into a single place. This API should \
+be used by all libraries, clients and servers of the X Window System. \
+Use of this API should allow the addition of new types of transports and \
+support for new platforms without making any changes to the source \
+except in the X Transport Interface code."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=49347921d4d5268021a999f250edc9ca"
+
+SRC_URI += "file://multilibfix.patch"
+
+PE = "1"
+
+RDEPENDS_${PN}-dev = ""
+
+inherit gettext
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "ce2fb8100c6647ee81451ebe388b17ad"
+SRC_URI[sha256sum] = "377c4491593c417946efcd2c7600d1e62639f7a8bbca391887e2c4679807d773"
diff --git a/meta/recipes-graphics/xorg-proto/bigreqsproto_1.1.2.bb b/meta/recipes-graphics/xorg-proto/bigreqsproto_1.1.2.bb
deleted file mode 100644
index f798a43538..0000000000
--- a/meta/recipes-graphics/xorg-proto/bigreqsproto_1.1.2.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require xorg-proto-common.inc
-
-PE = "1"
-
-SUMMARY = "BigReqs: X Big Requests extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the \
-BIG-REQUESTS extension, used to send larger requests that usual in order \
-to avoid fragmentation."
-
-BBCLASSEXTEND = "native nativesdk"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b12715630da6f268d0d3712ee1a504f4"
-
-SRC_URI[md5sum] = "1a05fb01fa1d5198894c931cf925c025"
-SRC_URI[sha256sum] = "462116ab44e41d8121bfde947321950370b285a5316612b8fce8334d50751b1e"
diff --git a/meta/recipes-graphics/xorg-proto/calibrateproto/fix.patch b/meta/recipes-graphics/xorg-proto/calibrateproto/fix.patch
deleted file mode 100644
index ff8cb25cd5..0000000000
--- a/meta/recipes-graphics/xorg-proto/calibrateproto/fix.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Upstream-Status: Pending
-
-Add missing length fields to the replies. Without these, sanity checking in recent X
-breaks things.
-
-RP 11/2/10
-
-
-Index: git/xcalibrateproto.h
-===================================================================
---- git.orig/xcalibrateproto.h 2010-02-11 11:47:45.711985932 +0000
-+++ git/xcalibrateproto.h 2010-02-11 11:40:21.000000000 +0000
-@@ -67,13 +67,13 @@
- BYTE type; /* X_Reply */
- BYTE pad1;
- CARD16 sequenceNumber B16;
-+ CARD32 length;
- CARD32 status;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
- CARD32 pad6 B32;
-- CARD32 pad7 B32;
- } xXCalibrateRawModeReply;
-
- #define sz_xXCalibrateRawModeReply 32
-@@ -92,13 +92,13 @@
- BYTE type; /* X_Reply */
- BYTE pad1;
- CARD16 sequenceNumber B16;
-+ CARD32 length;
- CARD32 x;
- CARD32 y;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
-- CARD32 pad6 B32;
- } xXCalibrateScreenToCoordReply;
-
- #define sz_xXCalibrateScreenToCoordReply 32
diff --git a/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb b/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb
deleted file mode 100644
index b88d157923..0000000000
--- a/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XCalibrate: Touchscreen calibration headers"
-
-DESCRIPTION = "This package provides the wire protocol for the \
-Touchscreen calibration extension."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://xcalibratewire.h;endline=23;md5=7f86ef7b03cce6c4c9ebd59d20ca485f \
- file://xcalibrateproto.h;endline=23;md5=e4490491edcc171ca24f98569ee580db"
-
-SRCREV = "1da6fd1e2c7a49648245c98481fabea8b9690a8c"
-
-PV = "0.0+git${SRCPV}"
-PR = "r2"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/calibrateproto \
- file://fix.patch;apply=yes"
-S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/xorg-proto/compositeproto_0.4.2.bb b/meta/recipes-graphics/xorg-proto/compositeproto_0.4.2.bb
deleted file mode 100644
index adfee26306..0000000000
--- a/meta/recipes-graphics/xorg-proto/compositeproto_0.4.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Xcomposite: X composite extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X \
-composite extension. The X composite extension provides three related \
-mechanisms for compositing and off-screen storage."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2c4bfe136f4a4418ea2f2a96b7c8f3c5 \
- file://composite.h;endline=43;md5=cbd44d4079053aa75930ed2f02b92926"
-
-RCONFLICTS_${PN} = "compositeext"
-BBCLASSEXTEND = "native"
-
-PR = "r1"
-PE = "1"
-
-SRC_URI[md5sum] = "98482f65ba1e74a08bf5b056a4031ef0"
-SRC_URI[sha256sum] = "049359f0be0b2b984a8149c966dd04e8c58e6eade2a4a309cf1126635ccd0cfc"
-
diff --git a/meta/recipes-graphics/xorg-proto/damageproto_1.2.1.bb b/meta/recipes-graphics/xorg-proto/damageproto_1.2.1.bb
deleted file mode 100644
index 75d0268108..0000000000
--- a/meta/recipes-graphics/xorg-proto/damageproto_1.2.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Xdamage: X Damage extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the DAMAGE \
-extension. The DAMAGE extension allows applications to receive \
-information about changes made to pixel contents of windows and \
-pixmaps."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d5f5a2de65c3a84cbde769f07a769608 \
- file://damagewire.h;endline=23;md5=4a4501a592dbc7de5ce89255e50d0296"
-
-RCONFLICTS_${PN} = "damageext"
-BBCLASSEXTEND = "native"
-PR = "r1"
-PE = "1"
-
-SRC_URI[md5sum] = "998e5904764b82642cc63d97b4ba9e95"
-SRC_URI[sha256sum] = "5c7c112e9b9ea8a9d5b019e5f17d481ae20f766cb7a4648360e7c1b46fc9fc5b"
diff --git a/meta/recipes-graphics/xorg-proto/dmxproto_2.3.1.bb b/meta/recipes-graphics/xorg-proto/dmxproto_2.3.1.bb
deleted file mode 100644
index d960e5d4cf..0000000000
--- a/meta/recipes-graphics/xorg-proto/dmxproto_2.3.1.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "DMX: Distributed Multihead extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the DMX \
-extension. The DMX extension provides support for communication with \
-and control of Xdmx server. Attributes of the Xdmx server and of the \
-back-end screens attached to the server can be queried and modified via \
-this protocol."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a3c3499231a8035efd0e004cfbd3b72a \
- file://dmxproto.h;endline=32;md5=ab8509955c3dd4c65fac728e1b367bc4"
-
-PE = "1"
-
-SRC_URI[md5sum] = "4ee175bbd44d05c34d43bb129be5098a"
-SRC_URI[sha256sum] = "e72051e6a3e06b236d19eed56368117b745ca1e1a27bdc50fd51aa375bea6509"
diff --git a/meta/recipes-graphics/xorg-proto/dri2proto_2.8.bb b/meta/recipes-graphics/xorg-proto/dri2proto_2.8.bb
deleted file mode 100644
index f4c40c5719..0000000000
--- a/meta/recipes-graphics/xorg-proto/dri2proto_2.8.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "DRI2: Direct Rendering Infrastructure 2 headers"
-
-DESCRIPTION = "This package provides the wire protocol for the Direct \
-Rendering Ifnrastructure 2. DIR is required for may hardware \
-accelerated OpenGL drivers."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2e396fa91834f8786032cad2da5638f3 \
- file://dri2proto.h;endline=31;md5=22f28bf68d01b533f26195e94b3ed8ca"
-
-
-SRC_URI[md5sum] = "b2721d5d24c04d9980a0c6540cb5396a"
-SRC_URI[sha256sum] = "f9b55476def44fc7c459b2537d17dbc731e36ed5d416af7ca0b1e2e676f8aa04"
diff --git a/meta/recipes-graphics/xorg-proto/dri3proto_1.0.bb b/meta/recipes-graphics/xorg-proto/dri3proto_1.0.bb
deleted file mode 100644
index bed97b3f49..0000000000
--- a/meta/recipes-graphics/xorg-proto/dri3proto_1.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Direct Rendering Infrastructure 3 Extension"
-
-DESCRIPTION = "The DRI3 extension provides mechanisms to translate between direct \
-rendered buffers and X pixmaps. When combined with the Present extension, \
-a complete direct rendering solution for OpenGL is provided."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://dri3proto.h;endline=21;md5=ac90d1d416be3cb13e1d3c88cd5166bf"
-
-
-SRC_URI[md5sum] = "a3d2cbe60a9ca1bf3aea6c93c817fee3"
-SRC_URI[sha256sum] = "01be49d70200518b9a6b297131f6cc71f4ea2de17436896af153226a774fc074"
diff --git a/meta/recipes-graphics/xorg-proto/fixesproto_5.0.bb b/meta/recipes-graphics/xorg-proto/fixesproto_5.0.bb
deleted file mode 100644
index 39fb88d84c..0000000000
--- a/meta/recipes-graphics/xorg-proto/fixesproto_5.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XFixes: X Fixes extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Fixes \
-extension. This extension is designed to provide server-side support \
-for application work arounds to shortcomings in the core X window \
-system."
-
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=262a7a87da56e66dd639bf7334a110c6 \
- file://xfixesproto.h;endline=43;md5=c3a9ee6db3532ed0d44dea266cfc97f4"
-
-RCONFLICTS_${PN} = "fixesext"
-PR = "r1"
-PE = "1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "e7431ab84d37b2678af71e29355e101d"
-SRC_URI[sha256sum] = "ba2f3f31246bdd3f2a0acf8bd3b09ba99cab965c7fb2c2c92b7dc72870e424ce"
diff --git a/meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb b/meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb
deleted file mode 100644
index 27fc281748..0000000000
--- a/meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XFont: X Font rasterisation headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Font \
-rasterisation extensions. These extensions are used to control \
-server-side font configurations."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c3e48aa9ce868c8e90f0401db41c11a2 \
- file://FSproto.h;endline=44;md5=d2e58e27095e5ea7d4ad456ccb91986c"
-
-PE = "1"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "36934d00b00555eaacde9f091f392f97"
-SRC_URI[sha256sum] = "259046b0dd9130825c4a4c479ba3591d6d0f17a33f54e294b56478729a6e5ab8"
diff --git a/meta/recipes-graphics/xorg-proto/glproto_1.4.17.bb b/meta/recipes-graphics/xorg-proto/glproto_1.4.17.bb
deleted file mode 100644
index eb03d33c2b..0000000000
--- a/meta/recipes-graphics/xorg-proto/glproto_1.4.17.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "OpenGL: X OpenGL extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the \
-OpenGL-related extensions, used to enable the rendering of applications \
-using OpenGL."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d44ed0146997856304dfbb512a59a8de \
- file://glxproto.h;beginline=4;endline=32;md5=6b79c570f644363b356456e7d44471d9"
-
-PE = "1"
-
-BBCLASSEXTEND = "nativesdk"
-
-SRC_URI[md5sum] = "5565f1b0facf4a59c2778229c1f70d10"
-SRC_URI[sha256sum] = "adaa94bded310a2bfcbb9deb4d751d965fcfe6fb3a2f6d242e2df2d6589dbe40"
diff --git a/meta/recipes-graphics/xorg-proto/inputproto_2.3.2.bb b/meta/recipes-graphics/xorg-proto/inputproto_2.3.2.bb
deleted file mode 100644
index eb5e66bd66..0000000000
--- a/meta/recipes-graphics/xorg-proto/inputproto_2.3.2.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XI: X Input extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Input \
-extension. The extension supports input devices other then the core X \
-keyboard and pointer."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e562cc0f6587b961f032211d8160f31e \
- file://XI2proto.h;endline=48;md5=1ac1581e61188da2885cc14ff49b20be"
-
-PE = "1"
-
-inherit gettext
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "b290a463af7def483e6e190de460f31a"
-SRC_URI[sha256sum] = "893a6af55733262058a27b38eeb1edc733669f01d404e8581b167f03c03ef31d"
-
-EXTRA_OECONF += "--without-asciidoc"
diff --git a/meta/recipes-graphics/xorg-proto/kbproto_1.0.7.bb b/meta/recipes-graphics/xorg-proto/kbproto_1.0.7.bb
deleted file mode 100644
index 46f5c92b61..0000000000
--- a/meta/recipes-graphics/xorg-proto/kbproto_1.0.7.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XKB: X Keyboard extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X \
-Keyboard extension. This extension is used to control options related \
-to keyboard handling and layout."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7dd6ea99e2a83a552c02c80963623c38 \
- file://XKBproto.h;beginline=1;endline=25;md5=5744eeff407aeb6e7a1346eebab486a2"
-
-PE = "1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "94afc90c1f7bef4a27fdd59ece39c878"
-SRC_URI[sha256sum] = "f882210b76376e3fa006b11dbd890e56ec0942bc56e65d1249ff4af86f90b857"
diff --git a/meta/recipes-graphics/xorg-proto/presentproto_git.bb b/meta/recipes-graphics/xorg-proto/presentproto_git.bb
deleted file mode 100644
index dbb6f32bc0..0000000000
--- a/meta/recipes-graphics/xorg-proto/presentproto_git.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "This package provides the basic headers for the X Window System"
-DESCRIPTION = "The Present extension provides a way for applications to update their \
- window contents from a pixmap in a well defined fashion, synchronizing \
- with the display refresh and potentially using a more efficient \
- mechanism than copying the contents of the source pixmap.\
- "
-
-LICENSE = "GPLv2"
-
-SRCREV = "24f3a56e541b0a9e6c6ee76081f441221a120ef9"
-PV = "1.0+git${SRCPV}"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=47e508ca280fde97906eacb77892c3ac"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/presentproto"
-S = "${WORKDIR}/git"
-
-PR = "r1"
-
-inherit autotools
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-proto/randrproto_1.5.0.bb b/meta/recipes-graphics/xorg-proto/randrproto_1.5.0.bb
deleted file mode 100644
index b59e52513f..0000000000
--- a/meta/recipes-graphics/xorg-proto/randrproto_1.5.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XRandR: X Resize, Rotate and Reflect extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Resize, \
-Rotate and Reflect extension. This extension provides the ability to \
-resize, rotate and reflect the root window of a screen."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=00426d41bd3d9267cf9bbb2df9323a5e \
- file://randrproto.h;endline=30;md5=3885957c6048fdf3310ac8ba54ca2c3f"
-
-RCONFLICTS_${PN} = "randrext"
-PE = "1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "a46765c8dcacb7114c821baf0df1e797"
-SRC_URI[sha256sum] = "4c675533e79cd730997d232c8894b6692174dce58d3e207021b8f860be498468"
diff --git a/meta/recipes-graphics/xorg-proto/recordproto_1.14.2.bb b/meta/recipes-graphics/xorg-proto/recordproto_1.14.2.bb
deleted file mode 100644
index ad2317c26e..0000000000
--- a/meta/recipes-graphics/xorg-proto/recordproto_1.14.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XRecord: X Record extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Record \
-extension. This extension is used to record and play back event \
-sequences."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=575827a0f554bbed332542976d5f3d40 \
- file://recordproto.h;endline=19;md5=1cbb0dd45a0b060ff833901620a3e738"
-
-RCONFLICTS_${PN} = "recordext"
-PR = "r1"
-PE = "1"
-
-SRC_URI[md5sum] = "1b4e5dede5ea51906f1530ca1e21d216"
-SRC_URI[sha256sum] = "a777548d2e92aa259f1528de3c4a36d15e07a4650d0976573a8e2ff5437e7370"
diff --git a/meta/recipes-graphics/xorg-proto/renderproto_0.11.1.bb b/meta/recipes-graphics/xorg-proto/renderproto_0.11.1.bb
deleted file mode 100644
index ff800ec831..0000000000
--- a/meta/recipes-graphics/xorg-proto/renderproto_0.11.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XRender: X rendering Extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X \
-Rendering extension. This is the basis the image composition within the \
-X window system."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f826d99765196352e6122a406cf0d024 \
- file://renderproto.h;beginline=4;endline=24;md5=3e5e2851dad240b0a3a27c4776b4fd1f"
-
-RCONFLICTS_${PN} = "renderext"
-PR = "r1"
-PE = "1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "a914ccc1de66ddeb4b611c6b0686e274"
-SRC_URI[sha256sum] = "06735a5b92b20759204e4751ecd6064a2ad8a6246bb65b3078b862a00def2537"
-
diff --git a/meta/recipes-graphics/xorg-proto/resourceproto_1.2.0.bb b/meta/recipes-graphics/xorg-proto/resourceproto_1.2.0.bb
deleted file mode 100644
index 08b610aea5..0000000000
--- a/meta/recipes-graphics/xorg-proto/resourceproto_1.2.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XRes: X Resource extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X \
-Resource extension. XRes provides an interface that allows X clients to \
-see and monitor X resource usage of various clients."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=604859305e662503077240fee8c77d97"
-
-RCONFLICTS_${PN} = "resourceext"
-
-PR = "r1"
-PE = "1"
-
-SRC_URI[md5sum] = "cfdb57dae221b71b2703f8e2980eaaf4"
-SRC_URI[sha256sum] = "3c66003a6bdeb0f70932a9ed3cf57cc554234154378d301e0c5cfa189d8f6818"
-
diff --git a/meta/recipes-graphics/xorg-proto/scrnsaverproto_1.2.2.bb b/meta/recipes-graphics/xorg-proto/scrnsaverproto_1.2.2.bb
deleted file mode 100644
index ab07f518cf..0000000000
--- a/meta/recipes-graphics/xorg-proto/scrnsaverproto_1.2.2.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Xscrnsaver: X Screen Saver extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Screen \
-Saver extension. This extension allows an external \"screen saver\" \
-client to detect when the alternative image is to be displayed and to \
-provide the graphics."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eed49b78b15b436c933b6b8b054e3901 \
- file://saverproto.h;endline=26;md5=a84c0637305159f3c0ab173aaeede48d"
-
-PE = "1"
-
-EXTRA_OECONF_append = " --enable-specs=no"
-
-SRC_URI[md5sum] = "edd8a73775e8ece1d69515dd17767bfb"
-SRC_URI[sha256sum] = "8bb70a8da164930cceaeb4c74180291660533ad3cc45377b30a795d1b85bcd65"
diff --git a/meta/recipes-graphics/xorg-proto/videoproto_2.3.3.bb b/meta/recipes-graphics/xorg-proto/videoproto_2.3.3.bb
deleted file mode 100644
index 6f97a2653b..0000000000
--- a/meta/recipes-graphics/xorg-proto/videoproto_2.3.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Xv: X Video extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Video \
-extension. This extension alows for accerlated drawing of videos."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ce3472a119a864085fa4155cb0979a7b"
-
-PE = "1"
-
-SRC_URI[md5sum] = "fe86de8ea3eb53b5a8f52956c5cd3174"
-SRC_URI[sha256sum] = "c7803889fd08e6fcaf7b68cc394fb038b2325d1f315e571a6954577e07cca702"
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch b/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
deleted file mode 100644
index 09b6088db0..0000000000
--- a/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream uses AM_PATH_PYTHON to find a python binary and ask it where to install
-libraries. This means we either need to depend on python-native (large build
-dependency, early in the build) or use the host python (pythondir reflects the
-host and not the target, breaks builds).
-
-The third option is to just hardcode the path where the module goes, as most
-callers of the code use pkg-config to find where it was installed anyway.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index d140bfe..c7b68da 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -14,7 +14,10 @@ if test "$XMLLINT" = "no"; then
- AC_MSG_WARN([xmllint not found; unable to validate against schema.])
- fi
-
--AM_PATH_PYTHON([2.5])
-+pythondir="${libdir}/xcb-proto"
-+AC_SUBST(pythondir)
-+PYTHON="python3"
-+AC_SUBST(PYTHON)
-
- xcbincludedir='${datadir}/xcb'
- AC_SUBST(xcbincludedir)
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
deleted file mode 100644
index 8bdca32b71..0000000000
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "XCB: The X protocol C binding headers"
-DESCRIPTION = "Function prototypes for the X protocol C-language Binding \
-(XCB). XCB is a replacement for Xlib featuring a small footprint, \
-latency hiding, direct access to the protocol, improved threading \
-support, and extensibility."
-HOMEPAGE = "http://xcb.freedesktop.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
-
-SECTION = "x11/libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
- file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
-
-SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2 \
- file://no-python-native.patch"
-SRC_URI[md5sum] = "14e60919f859560f28426a685a555962"
-SRC_URI[sha256sum] = "5922aba4c664ab7899a29d92ea91a87aa4c1fc7eb5ee550325c3216c480a4906"
-
-inherit autotools pkgconfig
-
-PACKAGES += "python-xcbgen"
-
-FILES_${PN} = ""
-FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd"
-FILES_python-xcbgen = "${libdir}/xcb-proto"
-
-RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb
new file mode 100644
index 0000000000..7467090920
--- /dev/null
+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb
@@ -0,0 +1,29 @@
+SUMMARY = "XCB: The X protocol C binding headers"
+DESCRIPTION = "Function prototypes for the X protocol C-language Binding \
+(XCB). XCB is a replacement for Xlib featuring a small footprint, \
+latency hiding, direct access to the protocol, improved threading \
+support, and extensibility."
+HOMEPAGE = "http://xcb.freedesktop.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
+
+SECTION = "x11/libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
+ file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
+
+SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2"
+SRC_URI[md5sum] = "abe9aa4886138150bbc04ae4f29b90e3"
+SRC_URI[sha256sum] = "7b98721e669be80284e9bbfeab02d2d0d54cd11172b72271e47a2fe875e2bde1"
+
+inherit autotools pkgconfig python3native
+
+PACKAGES += "python-xcbgen"
+
+FILES_${PN} = ""
+FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd"
+FILES_python-xcbgen = "${PYTHON_SITEPACKAGES_DIR}"
+
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-proto/xcmiscproto_1.2.2.bb b/meta/recipes-graphics/xorg-proto/xcmiscproto_1.2.2.bb
deleted file mode 100644
index 0751b94c9d..0000000000
--- a/meta/recipes-graphics/xorg-proto/xcmiscproto_1.2.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XC-MISC: X XC-Miscellaneous extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the XC-MISC \
-extension, which is used to get details of XID allocations within the \
-server."
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=09d83047c15994e05db29b423ed6662e"
-
-PE = "1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "5f4847c78e41b801982c8a5e06365b24"
-SRC_URI[sha256sum] = "b13236869372256c36db79ae39d54214172677fb79e9cdc555dceec80bd9d2df"
diff --git a/meta/recipes-graphics/xorg-proto/xextproto_7.3.0.bb b/meta/recipes-graphics/xorg-proto/xextproto_7.3.0.bb
deleted file mode 100644
index dd0bd951b2..0000000000
--- a/meta/recipes-graphics/xorg-proto/xextproto_7.3.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XExt: X Extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for several X \
-extensions. These protocol extensions include DOUBLE-BUFFER, DPMS, \
-Extended-Visual-Information, LBX, MIT_SHM, MIT_SUNDRY-NONSTANDARD, \
-Multi-Buffering, SECURITY, SHAPE, SYNC, TOG-CUP, XC-APPGROUP, XC-MISC, \
-XTEST. In addition a small set of utility functions are also \
-available."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=86f273291759d0ba2a22585cd1c06c53"
-
-PE = "1"
-
-inherit gettext
-
-EXTRA_OECONF_append = " --enable-specs=no"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "70c90f313b4b0851758ef77b95019584"
-SRC_URI[sha256sum] = "f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0"
diff --git a/meta/recipes-graphics/xorg-proto/xf86dgaproto_2.1.bb b/meta/recipes-graphics/xorg-proto/xf86dgaproto_2.1.bb
deleted file mode 100644
index 86f3ce328f..0000000000
--- a/meta/recipes-graphics/xorg-proto/xf86dgaproto_2.1.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XFree86-DGA: XFree86 Direct Graphics Access extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the XFree86 \
-Direct Graphics Access extension. This extension allows direct graphics \
-access to a framebuffer-like region, as well as relative mouse \
-reporting."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e01e66e4b317088cf869bc98e6af4fb6"
-
-RCONFLICTS_${PN} = "xxf86dgaext"
-PR = "r2"
-PE = "1"
-
-SRC_URI[md5sum] = "a036dc2fcbf052ec10621fd48b68dbb1"
-SRC_URI[sha256sum] = "ac5ef65108e1f2146286e53080975683dae49fc94680042e04bd1e2010e99050"
diff --git a/meta/recipes-graphics/xorg-proto/xf86driproto_2.1.1.bb b/meta/recipes-graphics/xorg-proto/xf86driproto_2.1.1.bb
deleted file mode 100644
index b3f9210ccb..0000000000
--- a/meta/recipes-graphics/xorg-proto/xf86driproto_2.1.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XFree86-DRI: XFree86 Direct Rendering Infrastructure extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the XFree86 \
-Direct Rendering Infrastructure extension. The XFree86-DRI extension is \
-used to organize direct rendering support or 3D clients and help \
-arbitrate requests."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ef103b9d951e39ff7e23d386e2011fa3 \
- file://xf86driproto.h;endline=35;md5=42be3d8e6d429ab79172572bb0cff544"
-
-PE = "1"
-
-SRC_URI[md5sum] = "1d716d0dac3b664e5ee20c69d34bc10e"
-SRC_URI[sha256sum] = "9c4b8d7221cb6dc4309269ccc008a22753698ae9245a398a59df35f1404d661f"
diff --git a/meta/recipes-graphics/xorg-proto/xf86miscproto_0.9.3.bb b/meta/recipes-graphics/xorg-proto/xf86miscproto_0.9.3.bb
deleted file mode 100644
index d4663ea880..0000000000
--- a/meta/recipes-graphics/xorg-proto/xf86miscproto_0.9.3.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XFree86-Misc: XFree86 miscellaneous extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the XFree \
-miscellaneous extension. The XFree86-Misc extension provides a means to \
-access input device configuration settings specific to the XFree86/Xorg \
-DDX."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e01e66e4b317088cf869bc98e6af4fb6"
-
-PR = "r1"
-PE = "1"
-
-SRC_URI[md5sum] = "ca63bbb31cf5b7f37b2237e923ff257a"
-SRC_URI[sha256sum] = "45b8ec6a4a8ca21066dce117e09dcc88539862e616e60fb391de05b36f63b095"
diff --git a/meta/recipes-graphics/xorg-proto/xf86vidmodeproto_2.3.1.bb b/meta/recipes-graphics/xorg-proto/xf86vidmodeproto_2.3.1.bb
deleted file mode 100644
index 0f31900a9e..0000000000
--- a/meta/recipes-graphics/xorg-proto/xf86vidmodeproto_2.3.1.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XFree86-VM: XFree86 video mode extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the XFree86 \
-video mode extension. This extension allows client applications to get \
-and set video mode timings."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=499be2ff387a42f84628c35f311f1502"
-
-RCONFLICTS_${PN} = "xxf86vmext"
-
-PR = "r1"
-PE = "1"
-
-SRC_URI[md5sum] = "e793ecefeaecfeabd1aed6a01095174e"
-SRC_URI[sha256sum] = "45d9499aa7b73203fd6b3505b0259624afed5c16b941bd04fcf123e5de698770"
diff --git a/meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb b/meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb
deleted file mode 100644
index dde7e9db7a..0000000000
--- a/meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Xinerama: Xinerama extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the Xinerama \
-extension. This extension is used for retrieving information about \
-physical output devices which may be combined into a single logical X \
-screen."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3e397a5326c83d5d0ebf5b3f87163ac6 \
- file://panoramiXproto.h;endline=24;md5=098e0bc089368a988092b3cbda617a57"
-
-PE = "1"
-
-SRC_URI[md5sum] = "9959fe0bfb22a0e7260433b8d199590a"
-SRC_URI[sha256sum] = "977574bb3dc192ecd9c55f59f991ec1dff340be3e31392c95deff423da52485b"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-proto/xorgproto_2019.2.bb b/meta/recipes-graphics/xorg-proto/xorgproto_2019.2.bb
new file mode 100644
index 0000000000..8acbe895aa
--- /dev/null
+++ b/meta/recipes-graphics/xorg-proto/xorgproto_2019.2.bb
@@ -0,0 +1,14 @@
+require xorg-proto-common.inc
+
+SUMMARY = "X Window System unified protocol definitions"
+
+DESCRIPTION = "This package provides the headers and specification documents defining \
+the core protocol and (many) extensions for the X Window System"
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING-x11proto;md5=b9e051107d5628966739a0b2e9b32676"
+
+SRC_URI[md5sum] = "a02dcaff48b4141b949ac99dfc344d86"
+SRC_URI[sha256sum] = "46ecd0156c561d41e8aa87ce79340910cdf38373b759e737fcbba5df508e7b8e"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch b/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
deleted file mode 100644
index 8a5ff58b91..0000000000
--- a/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Pending
-
-Don't always define LONG64 for AMD64
-
-X32 defines __amd64__/amd64 with 32bit long. We should simply check
-__LP64__ before defining LONG64 without checking __amd64__/amd64.
-
-This fixes compilation with x32 toolchain.
-
-Received this patch from H.J. Lu <hjl.tools@gmail.com>
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
-
---- xproto-7.0.22/Xmd.h.x32 2009-07-11 04:19:50.000000000 -0700
-+++ xproto-7.0.22/Xmd.h 2011-11-30 17:14:19.290395893 -0800
-@@ -62,7 +62,6 @@ SOFTWARE.
- defined(__ia64__) || defined(ia64) || \
- defined(__sparc64__) || \
- defined(__s390x__) || \
-- defined(__amd64__) || defined(amd64) || \
- defined(__powerpc64__)
- # define LONG64 /* 32/64-bit architecture */
- # endif
diff --git a/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb b/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb
deleted file mode 100644
index 412b6a2777..0000000000
--- a/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Xlib: C Language X interface headers"
-
-DESCRIPTION = "This package provides the basic headers for the X Window \
-System."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b9e051107d5628966739a0b2e9b32676"
-
-PE = "1"
-
-SRC_URI += "file://xproto_fix_for_x32.patch"
-
-EXTRA_OECONF_append = " --enable-specs=no"
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "eeeae1f47d43a33ef0d5c56727410326"
-SRC_URI[sha256sum] = "6c1a477092ca73233902b8d5f33012635c4b0208f17e7833cc7efe5c93ba9f8a"
diff --git a/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb b/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
deleted file mode 100644
index be3a667449..0000000000
--- a/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Program to create dependencies in makefiles"
-
-DESCRIPTION = "The gccmakedep program calls 'gcc -M' to output makefile \
-rules describing the dependencies of each sourcefile, so that make knows \
-which object files must be recompiled when a dependency has changed."
-
-require xorg-util-common.inc
-LIC_FILES_CHKSUM = "file://Makefile.am;endline=20;md5=23c277396d690413245ebb89b18c5d4d"
-DESCRIPTION = "create dependencies in makefiles using 'gcc -M'"
-DEPENDS = "util-macros"
-RDEPENDS_${PN} = "gcc"
-
-PR = "r3"
-PE = "1"
-
-SRC_URI[md5sum] = "127ddb6131eb4a56fdf6644a63ade788"
-SRC_URI[sha256sum] = "f9e2e7a590e27f84b6708ab7a81e546399b949bf652fb9b95193e0e543e6a548"
-
-do_install_append() {
- sed -i "s,--sysroot=${STAGING_DIR_TARGET},," ${D}${bindir}/gccmakedep
-}
diff --git a/meta/recipes-graphics/xorg-util/makedepend_1.0.5.bb b/meta/recipes-graphics/xorg-util/makedepend_1.0.5.bb
deleted file mode 100644
index 84a967a81e..0000000000
--- a/meta/recipes-graphics/xorg-util/makedepend_1.0.5.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require xorg-util-common.inc
-
-SUMMARY = "create dependencies in makefiles"
-
-DESCRIPTION = "The makedepend program reads each sourcefile in sequence \
-and parses it like a C-preprocessor, processing \
-all #include, #define, #undef, #ifdef, #ifndef, #endif, #if, #elif \
-and #else directives so that it can correctly tell which #include, \
-directives would be used in a compilation. Any #include, directives \
-can reference files having other #include directives, and parsing will \
-occur in these files as well."
-
-DEPENDS = "xproto util-macros"
-PE = "1"
-
-BBCLASSEXTEND = "native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=43a6eda34b48ee821b3b66f4f753ce4f"
-
-SRC_URI[md5sum] = "efb2d7c7e22840947863efaedc175747"
-SRC_URI[sha256sum] = "503903d41fb5badb73cb70d7b3740c8b30fe1cc68c504d3b6a85e6644c4e5004"
diff --git a/meta/recipes-graphics/xorg-util/makedepend_1.0.6.bb b/meta/recipes-graphics/xorg-util/makedepend_1.0.6.bb
new file mode 100644
index 0000000000..2760edd173
--- /dev/null
+++ b/meta/recipes-graphics/xorg-util/makedepend_1.0.6.bb
@@ -0,0 +1,21 @@
+require xorg-util-common.inc
+
+SUMMARY = "create dependencies in makefiles"
+
+DESCRIPTION = "The makedepend program reads each sourcefile in sequence \
+and parses it like a C-preprocessor, processing \
+all #include, #define, #undef, #ifdef, #ifndef, #endif, #if, #elif \
+and #else directives so that it can correctly tell which #include, \
+directives would be used in a compilation. Any #include, directives \
+can reference files having other #include directives, and parsing will \
+occur in these files as well."
+
+DEPENDS = "xorgproto util-macros"
+PE = "1"
+
+BBCLASSEXTEND = "native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=43a6eda34b48ee821b3b66f4f753ce4f"
+
+SRC_URI[md5sum] = "8a583055c84914060c35b6c2f963fc07"
+SRC_URI[sha256sum] = "845f6708fc850bf53f5b1d0fb4352c4feab3949f140b26f71b22faba354c3365"
diff --git a/meta/recipes-graphics/xorg-util/util-macros_1.19.0.bb b/meta/recipes-graphics/xorg-util/util-macros_1.19.0.bb
deleted file mode 100644
index 26cf50f2fd..0000000000
--- a/meta/recipes-graphics/xorg-util/util-macros_1.19.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "X autotools macros"
-
-DESCRIPTION = "M4 autotools macros used by various X.org programs."
-
-require xorg-util-common.inc
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1970511fddd439b07a6ba789d28ff662"
-
-PE = "1"
-
-SRC_URI[md5sum] = "40e1caa49a71a26e0aa68ddd00203717"
-SRC_URI[sha256sum] = "0d4df51b29023daf2f63aebf3ebc638ea88efedfd560ab5866741ab3f92acaa1"
-
-# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
-RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-util/util-macros_1.19.2.bb b/meta/recipes-graphics/xorg-util/util-macros_1.19.2.bb
new file mode 100644
index 0000000000..268059935c
--- /dev/null
+++ b/meta/recipes-graphics/xorg-util/util-macros_1.19.2.bb
@@ -0,0 +1,19 @@
+SUMMARY = "X autotools macros"
+
+DESCRIPTION = "M4 autotools macros used by various X.org programs."
+
+require xorg-util-common.inc
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1970511fddd439b07a6ba789d28ff662"
+
+PE = "1"
+
+SRC_URI[md5sum] = "5059b328fac086b733ffac6607164c41"
+SRC_URI[sha256sum] = "9225c45c3de60faf971979a55a5536f3562baa4b6f02246c23e98ac0c09a75b7"
+
+# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
deleted file mode 100644
index 72e4fbf59b..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-Section "Module"
- Load "fbdevhw"
- Load "fb"
- Load "shadow"
- Load "shadowfb"
- Load "int10"
- Load "vbe"
- Load "vgahw"
-EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf
index 629ae214e8..f4cd139e8d 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf
@@ -2,34 +2,6 @@
Section "Files"
EndSection
-Section "InputDevice"
- Identifier "Generic Keyboard"
- Driver "evdev"
- Option "CoreKeyboard"
- Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
- Option "XkbRules" "xorg"
- Option "XkbModel" "evdev"
- Option "XkbLayout" "us"
-EndSection
-
-Section "InputDevice"
- Identifier "Configured Mouse"
- Driver "mouse"
- Option "CorePointer"
- Option "Device" "/dev/input/mice"
- Option "Protocol" "ImPS/2"
- Option "ZAxisMapping" "4 5"
- Option "Emulate3Buttons" "true"
-EndSection
-
-Section "InputDevice"
- Identifier "Qemu Tablet"
- Driver "evdev"
- Option "CorePointer"
- Option "Device" "/dev/input/touchscreen0"
- Option "USB" "on"
-EndSection
-
Section "Device"
Identifier "Graphics Controller"
Driver "fbdev"
@@ -62,8 +34,5 @@ EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
- InputDevice "Generic Keyboard"
- # InputDevice "Configured Mouse"
- InputDevice "QEMU Tablet"
Option "AllowEmptyInput" "no"
EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf
index e6c8b514e3..1d3c64f620 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf
@@ -2,34 +2,6 @@
Section "Files"
EndSection
-Section "InputDevice"
- Identifier "Generic Keyboard"
- Driver "evdev"
- Option "CoreKeyboard"
- Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
- Option "XkbRules" "xorg"
- Option "XkbModel" "evdev"
- Option "XkbLayout" "us"
-EndSection
-
-Section "InputDevice"
- Identifier "Configured Mouse"
- Driver "mouse"
- Option "CorePointer"
- Option "Device" "/dev/input/mice"
- Option "Protocol" "ImPS/2"
- Option "ZAxisMapping" "4 5"
- Option "Emulate3Buttons" "true"
-EndSection
-
-Section "InputDevice"
- Identifier "Qemu Tablet"
- Driver "evdev"
- Option "CorePointer"
- Option "Device" "/dev/input/touchscreen0"
- Option "USB" "on"
-EndSection
-
Section "Device"
Identifier "Graphics Controller"
Driver "fbdev"
@@ -63,8 +35,5 @@ EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
- InputDevice "Generic Keyboard"
- # InputDevice "Configured Mouse"
- InputDevice "QEMU Tablet"
Option "AllowEmptyInput" "no"
EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf
index 629ae214e8..03b94dc3af 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf
@@ -2,34 +2,6 @@
Section "Files"
EndSection
-Section "InputDevice"
- Identifier "Generic Keyboard"
- Driver "evdev"
- Option "CoreKeyboard"
- Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
- Option "XkbRules" "xorg"
- Option "XkbModel" "evdev"
- Option "XkbLayout" "us"
-EndSection
-
-Section "InputDevice"
- Identifier "Configured Mouse"
- Driver "mouse"
- Option "CorePointer"
- Option "Device" "/dev/input/mice"
- Option "Protocol" "ImPS/2"
- Option "ZAxisMapping" "4 5"
- Option "Emulate3Buttons" "true"
-EndSection
-
-Section "InputDevice"
- Identifier "Qemu Tablet"
- Driver "evdev"
- Option "CorePointer"
- Option "Device" "/dev/input/touchscreen0"
- Option "USB" "on"
-EndSection
-
Section "Device"
Identifier "Graphics Controller"
Driver "fbdev"
@@ -54,6 +26,7 @@ Section "Screen"
Identifier "Default Screen"
Device "Graphics Controller"
Monitor "Generic Monitor"
+ DefaultDepth 16
SubSection "Display"
Modes "640x480"
EndSubSection
@@ -62,8 +35,5 @@ EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
- InputDevice "Generic Keyboard"
- # InputDevice "Configured Mouse"
- InputDevice "QEMU Tablet"
Option "AllowEmptyInput" "no"
EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf
index 629ae214e8..f4cd139e8d 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf
@@ -2,34 +2,6 @@
Section "Files"
EndSection
-Section "InputDevice"
- Identifier "Generic Keyboard"
- Driver "evdev"
- Option "CoreKeyboard"
- Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
- Option "XkbRules" "xorg"
- Option "XkbModel" "evdev"
- Option "XkbLayout" "us"
-EndSection
-
-Section "InputDevice"
- Identifier "Configured Mouse"
- Driver "mouse"
- Option "CorePointer"
- Option "Device" "/dev/input/mice"
- Option "Protocol" "ImPS/2"
- Option "ZAxisMapping" "4 5"
- Option "Emulate3Buttons" "true"
-EndSection
-
-Section "InputDevice"
- Identifier "Qemu Tablet"
- Driver "evdev"
- Option "CorePointer"
- Option "Device" "/dev/input/touchscreen0"
- Option "USB" "on"
-EndSection
-
Section "Device"
Identifier "Graphics Controller"
Driver "fbdev"
@@ -62,8 +34,5 @@ EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
- InputDevice "Generic Keyboard"
- # InputDevice "Configured Mouse"
- InputDevice "QEMU Tablet"
Option "AllowEmptyInput" "no"
EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf
index 629ae214e8..f4cd139e8d 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf
@@ -2,34 +2,6 @@
Section "Files"
EndSection
-Section "InputDevice"
- Identifier "Generic Keyboard"
- Driver "evdev"
- Option "CoreKeyboard"
- Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
- Option "XkbRules" "xorg"
- Option "XkbModel" "evdev"
- Option "XkbLayout" "us"
-EndSection
-
-Section "InputDevice"
- Identifier "Configured Mouse"
- Driver "mouse"
- Option "CorePointer"
- Option "Device" "/dev/input/mice"
- Option "Protocol" "ImPS/2"
- Option "ZAxisMapping" "4 5"
- Option "Emulate3Buttons" "true"
-EndSection
-
-Section "InputDevice"
- Identifier "Qemu Tablet"
- Driver "evdev"
- Option "CorePointer"
- Option "Device" "/dev/input/touchscreen0"
- Option "USB" "on"
-EndSection
-
Section "Device"
Identifier "Graphics Controller"
Driver "fbdev"
@@ -62,8 +34,5 @@ EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
- InputDevice "Generic Keyboard"
- # InputDevice "Configured Mouse"
- InputDevice "QEMU Tablet"
Option "AllowEmptyInput" "no"
EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
index bbda9eaa63..c12d92c201 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
@@ -2,34 +2,6 @@
Section "Files"
EndSection
-Section "InputDevice"
- Identifier "Generic Keyboard"
- Driver "evdev"
- Option "CoreKeyboard"
- Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
- Option "XkbRules" "xorg"
- Option "XkbModel" "evdev"
- Option "XkbLayout" "us"
-EndSection
-
-Section "InputDevice"
- Identifier "Configured Mouse"
- Driver "vmmouse"
- Option "CorePointer"
- Option "Device" "/dev/input/mice"
- Option "Protocol" "ImPS/2"
- Option "ZAxisMapping" "4 5"
- Option "Emulate3Buttons" "true"
-EndSection
-
-Section "InputDevice"
- Identifier "Qemu Tablet"
- Driver "evdev"
- Option "CorePointer"
- Option "Device" "/dev/input/touchscreen0"
- Option "USB" "on"
-EndSection
-
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
@@ -57,8 +29,5 @@ EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
- InputDevice "Generic Keyboard"
- # InputDevice "Configured Mouse"
- InputDevice "QEMU Tablet"
Option "AllowEmptyInput" "no"
EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
index bbda9eaa63..c12d92c201 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
@@ -2,34 +2,6 @@
Section "Files"
EndSection
-Section "InputDevice"
- Identifier "Generic Keyboard"
- Driver "evdev"
- Option "CoreKeyboard"
- Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
- Option "XkbRules" "xorg"
- Option "XkbModel" "evdev"
- Option "XkbLayout" "us"
-EndSection
-
-Section "InputDevice"
- Identifier "Configured Mouse"
- Driver "vmmouse"
- Option "CorePointer"
- Option "Device" "/dev/input/mice"
- Option "Protocol" "ImPS/2"
- Option "ZAxisMapping" "4 5"
- Option "Emulate3Buttons" "true"
-EndSection
-
-Section "InputDevice"
- Identifier "Qemu Tablet"
- Driver "evdev"
- Option "CorePointer"
- Option "Device" "/dev/input/touchscreen0"
- Option "USB" "on"
-EndSection
-
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
@@ -57,8 +29,5 @@ EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
- InputDevice "Generic Keyboard"
- # InputDevice "Configured Mouse"
- InputDevice "QEMU Tablet"
Option "AllowEmptyInput" "no"
EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
index e07c204c74..5420b7d23e 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
@@ -7,14 +7,9 @@ PR = "r33"
SRC_URI = "file://xorg.conf"
-SRC_URI_append_libc-musl = "\
- file://10-preload-modules.conf \
-"
-
S = "${WORKDIR}"
CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf"
-CONFFILES_${PN}_append_libc-musl = " ${sysconfdir}/X11/xorg.conf.d/10-preload-modules.conf"
PACKAGE_ARCH = "${MACHINE_ARCH}"
ALLOW_EMPTY_${PN} = "1"
@@ -25,7 +20,3 @@ do_install () {
install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/
fi
}
-
-do_install_append_libc-musl () {
- install -Dm 0644 ${WORKDIR}/10-preload-modules.conf ${D}/${sysconfdir}/X11/xorg.conf.d/10-preload-modules.conf
-}
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index 29503b1a53..a0ae65c785 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -17,18 +17,18 @@ INC_PR = "r8"
XORG_PN = "xorg-server"
SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2"
-SRC_URI += "file://macro_tweak.patch"
+
+CVE_PRODUCT = "xorg-server"
S = "${WORKDIR}/${XORG_PN}-${PV}"
inherit autotools pkgconfig
-inherit distro_features_check
+inherit features_check
REQUIRED_DISTRO_FEATURES = "x11"
-PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86vidmodeproto compositeproto recordproto resourceproto videoproto scrnsaverproto xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto presentproto"
-LIB_DEPS = "pixman libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
-DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util"
+LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
+DEPENDS = "xorgproto ${LIB_DEPS} font-util"
# Split out some modules and extensions from the main package
# These aren't needed for basic operations and only take up space:
@@ -71,7 +71,7 @@ PACKAGES =+ "${PN}-sdl \
SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver"
INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi"
-XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp"
+XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput"
RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}"
RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}"
RDEPENDS_${PN}-xvfb += "xkeyboard-config"
@@ -119,26 +119,28 @@ EXTRA_OECONF += "--with-fop=no \
--with-xkb-output=/var/lib/xkb \
"
-PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx', '', d)} \
- ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "xwayland", "", d)} \
- ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)} \
+OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
+PACKAGECONFIG ??= "dga dri2 udev ${XORG_CRYPTO} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \
"
PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
-PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto virtual/mesa xf86driproto"
-PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
+PACKAGECONFIG[dga] = "--enable-dga,--disable-dga"
+PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,virtual/mesa"
+PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2"
# DRI3 requires xshmfence to also be enabled
-PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
-PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,glproto virtual/libgl virtual/libx11"
-PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy,libegl"
+PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3"
+PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,virtual/libgl virtual/libx11"
+PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl"
PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus,"
PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd"
-PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xineramaproto"
-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland libepoxy"
+PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama"
+PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy"
# Xorg requires a SHA1 implementation, pick one
XORG_CRYPTO ??= "openssl"
@@ -170,10 +172,10 @@ python populate_packages_prepend() {
shell=True, env=newenv, stdout=subprocess.PIPE)
stdout, stderr = p.communicate()
output = stdout.decode("utf-8").split(".")[0]
- mlprefix = d.getVar('MLPREFIX', True) or ''
+ mlprefix = d.getVar('MLPREFIX') or ''
return "%sxorg-abi-%s-%s" % (mlprefix, name, output)
- pn = d.getVar("PN", True)
+ pn = d.getVar("PN")
d.appendVar("RPROVIDES_" + pn, " " + get_abi("input"))
d.appendVar("RPROVIDES_" + pn, " " + get_abi("video"))
}
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-test-xtest-Initialize-array-with-braces.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-test-xtest-Initialize-array-with-braces.patch
new file mode 100644
index 0000000000..c0c242814b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-test-xtest-Initialize-array-with-braces.patch
@@ -0,0 +1,36 @@
+From 8a382c015cd3c69fcfc146ef03dcbf30c77ff207 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 1 Mar 2019 09:47:57 -0800
+Subject: [PATCH] test/xtest: Initialize array with braces
+
+Fixes an error when extra warnings are enabled, this is caught with clang
+
+test/xtest.c:64:23: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
+ WindowRec root = {0};
+ ^
+ {}
+1 error generated.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ test/xtest.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/xtest.c b/test/xtest.c
+index fc5e433..d7e6620 100644
+--- a/test/xtest.c
++++ b/test/xtest.c
+@@ -61,7 +61,7 @@ xtest_init_devices(void)
+ {
+ ScreenRec screen = {0};
+ ClientRec server_client = {0};
+- WindowRec root = {0};
++ WindowRec root = {{0}};
+ WindowOptRec optional = {0};
+
+ /* random stuff that needs initialization */
+--
+2.21.0
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch
new file mode 100644
index 0000000000..d05eec5bb9
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch
@@ -0,0 +1,53 @@
+From d77cdc5e1eee26821ab98c947abea53fb7b18fe5 Mon Sep 17 00:00:00 2001
+From: California Sullivan <california.l.sullivan@intel.com>
+Date: Fri, 16 Mar 2018 17:23:11 -0700
+Subject: [PATCH] xf86pciBus.c: use Intel ddx only for pre-gen4 hardware
+
+Use intel ddx only on pre-gen4 hw, newer ones will fall back to modesetting
+Author: Timo Aaltonen <tjaalton@debian.org>
+
+Instead of defaulting to the Intel driver for all Intel hardware, only
+default it for older hardware for which it has shown to be better for.
+
+Others fall through to the -modesetting default.
+
+Upstream-Status: Pending [Debian/Fedora patch
+https://src.fedoraproject.org/rpms/xorg-x11-server/c/ee515e44b07e37689abf48cf2fffb41578f3bc1d]
+
+Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
+---
+ hw/xfree86/common/xf86pciBus.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
+index e61ae0cd4..d70c99197 100644
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -1173,7 +1173,23 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
+ case 0x0bef:
+ /* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */
+ break;
+- default:
++ /* Default to intel only on pre-gen4 chips */
++ case 0x3577:
++ case 0x2562:
++ case 0x3582:
++ case 0x358e:
++ case 0x2572:
++ case 0x2582:
++ case 0x258a:
++ case 0x2592:
++ case 0x2772:
++ case 0x27a2:
++ case 0x27ae:
++ case 0x29b2:
++ case 0x29c2:
++ case 0x29d2:
++ case 0xa001:
++ case 0xa011:
+ driverList[0] = "intel";
+ break;
+ }
+--
+2.14.3
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
deleted file mode 100644
index ec0eea6ca2..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-This is the revised version of files/macro_tweak.patch for
-xorg-server 1.8.99.904 and newer.
-
-Upstream-Status: Pending
-
-Signed-off-by: Yu Ke <ke.yu@intel.com>
-
-diff --git a/xorg-server.m4 b/xorg-server.m4
-index bdecf62..040fdb8 100644
---- a/xorg-server.m4
-+++ b/xorg-server.m4
-@@ -28,10 +28,12 @@ dnl
- # Checks for the $1 define in xorg-server.h (from the sdk). If it
- # is defined, then add $1 to $REQUIRED_MODULES.
-
-+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
-+
- AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
- AC_REQUIRE([PKG_PROG_PKG_CONFIG])
- SAVE_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
-+ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include "xorg-server.h"
- #if !defined $1
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch
deleted file mode 100644
index 4be441fb71..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-inb/outb family for arm is only implemented on glibc
-so assumption across linux is wrong
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: xorg-server-1.18.0/hw/xfree86/common/compiler.h
-===================================================================
---- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h
-+++ xorg-server-1.18.0/hw/xfree86/common/compiler.h
-@@ -758,7 +758,7 @@ inl(unsigned short port)
- return xf86ReadMmio32Le((void *) ioBase, port);
- }
-
--#elif defined(__arm__) && defined(__linux__)
-+#elif defined(__arm__) && defined(__GLIBC__)
-
- /* for Linux on ARM, we use the LIBC inx/outx routines */
- /* note that the appropriate setup via "ioperm" needs to be done */
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/pkgconfig.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/pkgconfig.patch
new file mode 100644
index 0000000000..2ef9fa9fe4
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/pkgconfig.patch
@@ -0,0 +1,34 @@
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/xorg/xserver/merge_requests/22]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 5f65a6246fe752764045dd1e38912f1dccec71e4 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 20 Sep 2018 20:12:24 +0100
+Subject: [PATCH] xorg-server.m4: just all cflags instead of just sdkdir
+
+Instead of fetching just the sdkdir variable of xorg-server using pkg-config,
+simply get all of the CFLAGS. Aside from completeness, this helps builds in
+sysroots as pkg-config knows what to do with --cflags but doesn't remap
+arbitrary variables.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ xorg-server.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xorg-server.m4 b/xorg-server.m4
+index 18255b91a..195bda5d8 100644
+--- a/xorg-server.m4
++++ b/xorg-server.m4
+@@ -31,7 +31,7 @@ dnl
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
++ CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
+--
+2.11.0
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/sdksyms-no-build-path.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/sdksyms-no-build-path.patch
new file mode 100644
index 0000000000..be198ece49
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/sdksyms-no-build-path.patch
@@ -0,0 +1,50 @@
+Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/merge_requests/253]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From ca832598d38ba55a001088b57d73c6d7261dc9a7 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 1 Aug 2019 15:24:51 +0100
+Subject: [PATCH] sdksyms.sh: don't embed the build path
+
+This script generates a header that has a comment containing the build path for
+no real reason. As this source can end up deployed on targets in debug packages
+this means there is both potentially sensitive information leakage about the
+build environment, and a source of change for reproducible builds.
+---
+ hw/xfree86/sdksyms.sh | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
+index 39e33711d..bdf47a71a 100755
+--- a/hw/xfree86/sdksyms.sh
++++ b/hw/xfree86/sdksyms.sh
+@@ -302,13 +302,16 @@ LC_ALL=C
+ export LC_ALL
+ ${CPP:-cpp} "$@" sdksyms.c > /dev/null || exit $?
+ ${CPP:-cpp} "$@" sdksyms.c | ${AWK:-awk} -v topdir=$topdir '
++function basename(file) {
++ sub(".*/", "", file)
++ return file
++}
+ BEGIN {
+ sdk = 0;
+ print("/*");
+ print(" * These symbols are referenced to ensure they");
+ print(" * will be available in the X Server binary.");
+ print(" */");
+- printf("/* topdir=%s */\n", topdir);
+ print("_X_HIDDEN void *xorg_symbols[] = {");
+
+ printf("sdksyms.c:") > "sdksyms.dep";
+@@ -337,7 +340,7 @@ BEGIN {
+ # remove quotes
+ gsub(/"/, "", $3);
+ line = $2;
+- header = $3;
++ header = basename($3);
+ if (! headers[$3]) {
+ printf(" \\\n %s", $3) >> "sdksyms.dep";
+ headers[$3] = 1;
+--
+2.20.1
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb
deleted file mode 100644
index 6700565790..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-require xserver-xorg.inc
-
-SRC_URI += "file://musl-arm-inb-outb.patch"
-SRC_URI[md5sum] = "d4842dfe3bd9a9d062f2fa1df9104a46"
-SRC_URI[sha256sum] = "278459b2c31d61a15655d95a72fb79930c480a6bb8cf9226e48a07df8b1d31c8"
-
-# These extensions are now integrated into the server, so declare the migration
-# path for in-place upgrades.
-
-RREPLACES_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
-RPROVIDES_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
-RCONFLICTS_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.6.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.6.bb
new file mode 100644
index 0000000000..9218b4f69d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.6.bb
@@ -0,0 +1,31 @@
+require xserver-xorg.inc
+
+SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \
+ file://pkgconfig.patch \
+ file://0001-test-xtest-Initialize-array-with-braces.patch \
+ file://sdksyms-no-build-path.patch \
+ "
+SRC_URI[md5sum] = "a98170084f2c8fed480d2ff601f8a14b"
+SRC_URI[sha256sum] = "6316146304e6e8a36d5904987ae2917b5d5b195dc9fc63d67f7aca137e5a51d1"
+
+# These extensions are now integrated into the server, so declare the migration
+# path for in-place upgrades.
+
+RREPLACES_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
+RPROVIDES_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
+RCONFLICTS_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
diff --git a/meta/recipes-graphics/xrestop/xrestop_0.4.bb b/meta/recipes-graphics/xrestop/xrestop_0.4.bb
index ce5df03936..c7b8716f6f 100644
--- a/meta/recipes-graphics/xrestop/xrestop_0.4.bb
+++ b/meta/recipes-graphics/xrestop/xrestop_0.4.bb
@@ -19,6 +19,6 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/xrestop/xrestop-${PV}.tar.
SRC_URI[md5sum] = "d8a54596cbaf037e62b80c4585a3ca9b"
SRC_URI[sha256sum] = "67c2fc94a7ecedbaae0d1837e82e93d1d98f4a6d759828860e552119af3ce257"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb b/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
deleted file mode 100644
index 51839ddf79..0000000000
--- a/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Simple XVideo test application"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://src/test-xvideo.c;beginline=1;endline=20;md5=6ae3b4c3c2ff9e51dbbc35bb237afa00"
-DEPENDS = "libxv"
-
-SRCREV = "7d38b881e99eb74169d292b40f7164e461a65092"
-PV = "0.1+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/test-xvideo"
-
-S = "${WORKDIR}/git"
-
-inherit autotools distro_features_check
-
-# The libxv requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch b/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
deleted file mode 100644
index a4b7157b4f..0000000000
--- a/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6b5bbdfaac7f216fe8a02c4cf29e5eb2aee5a409 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 15 Sep 2015 00:01:00 +0000
-Subject: [PATCH] include sys/types.h for dev_t definition
-
-Avoids the build failures when sys/types.h does not get included
-indirectly through other headers.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- blktrace.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/blktrace.h b/blktrace.h
-index 380aec7..944fc08 100644
---- a/blktrace.h
-+++ b/blktrace.h
-@@ -5,6 +5,7 @@
- #include <limits.h>
- #include <byteswap.h>
- #include <endian.h>
-+#include <sys/types.h>
-
- #include "blktrace_api.h"
- #include "rbtree.h"
---
-2.5.2
-
diff --git a/meta/recipes-kernel/blktrace/blktrace/CVE-2018-10689.patch b/meta/recipes-kernel/blktrace/blktrace/CVE-2018-10689.patch
new file mode 100644
index 0000000000..7b58568d59
--- /dev/null
+++ b/meta/recipes-kernel/blktrace/blktrace/CVE-2018-10689.patch
@@ -0,0 +1,150 @@
+From d61ff409cb4dda31386373d706ea0cfb1aaac5b7 Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@kernel.dk>
+Date: Wed, 2 May 2018 10:24:17 -0600
+Subject: [PATCH] btt: make device/devno use PATH_MAX to avoid overflow
+
+Herbo Zhang reports:
+
+I found a bug in blktrace/btt/devmap.c. The code is just as follows:
+
+https://git.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git/tree/btt/devmap.c?id=8349ad2f2d19422a6241f94ea84d696b21de4757
+
+ struct devmap {
+
+struct list_head head;
+char device[32], devno[32]; // #1
+};
+
+LIST_HEAD(all_devmaps);
+
+static int dev_map_add(char *line)
+{
+struct devmap *dmp;
+
+if (strstr(line, "Device") != NULL)
+return 1;
+
+dmp = malloc(sizeof(struct devmap));
+if (sscanf(line, "%s %s", dmp->device, dmp->devno) != 2) { //#2
+free(dmp);
+return 1;
+}
+
+list_add_tail(&dmp->head, &all_devmaps);
+return 0;
+}
+
+int dev_map_read(char *fname)
+{
+char line[256]; // #3
+FILE *fp = my_fopen(fname, "r");
+
+if (!fp) {
+perror(fname);
+return 1;
+}
+
+while (fscanf(fp, "%255[a-zA-Z0-9 :.,/_-]\n", line) == 1) {
+if (dev_map_add(line))
+break;
+}
+
+fclose(fp);
+return 0;
+}
+
+ The line length is 256, but the dmp->device, dmp->devno max length
+is only 32. We can put strings longer than 32 into dmp->device and
+dmp->devno , and then they will be overflowed.
+
+ we can trigger this bug just as follows:
+
+ $ python -c "print 'A'*256" > ./test
+ $ btt -M ./test
+
+ *** Error in btt': free(): invalid next size (fast): 0x000055ad7349b250 ***
+ ======= Backtrace: =========
+ /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f7f158ce7e5]
+ /lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7f7f158d6e0a]
+ /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f7f158da98c]
+ btt(+0x32e0)[0x55ad7306f2e0]
+ btt(+0x2c5f)[0x55ad7306ec5f]
+ btt(+0x251f)[0x55ad7306e51f]
+ /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f7f15877830]
+ btt(+0x26b9)[0x55ad7306e6b9]
+ ======= Memory map: ========
+ 55ad7306c000-55ad7307f000 r-xp 00000000 08:14 3698139
+ /usr/bin/btt
+ 55ad7327e000-55ad7327f000 r--p 00012000 08:14 3698139
+ /usr/bin/btt
+ 55ad7327f000-55ad73280000 rw-p 00013000 08:14 3698139
+ /usr/bin/btt
+ 55ad73280000-55ad73285000 rw-p 00000000 00:00 0
+ 55ad7349a000-55ad734bb000 rw-p 00000000 00:00 0
+ [heap]
+ 7f7f10000000-7f7f10021000 rw-p 00000000 00:00 0
+ 7f7f10021000-7f7f14000000 ---p 00000000 00:00 0
+ 7f7f15640000-7f7f15656000 r-xp 00000000 08:14 14942237
+ /lib/x86_64-linux-gnu/libgcc_s.so.1
+ 7f7f15656000-7f7f15855000 ---p 00016000 08:14 14942237
+ /lib/x86_64-linux-gnu/libgcc_s.so.1
+ 7f7f15855000-7f7f15856000 r--p 00015000 08:14 14942237
+ /lib/x86_64-linux-gnu/libgcc_s.so.1
+ 7f7f15856000-7f7f15857000 rw-p 00016000 08:14 14942237
+ /lib/x86_64-linux-gnu/libgcc_s.so.1
+ 7f7f15857000-7f7f15a16000 r-xp 00000000 08:14 14948477
+ /lib/x86_64-linux-gnu/libc-2.23.so
+ 7f7f15a16000-7f7f15c16000 ---p 001bf000 08:14 14948477
+ /lib/x86_64-linux-gnu/libc-2.23.so
+ 7f7f15c16000-7f7f15c1a000 r--p 001bf000 08:14 14948477
+ /lib/x86_64-linux-gnu/libc-2.23.so
+ 7f7f15c1a000-7f7f15c1c000 rw-p 001c3000 08:14 14948477
+ /lib/x86_64-linux-gnu/libc-2.23.so
+ 7f7f15c1c000-7f7f15c20000 rw-p 00000000 00:00 0
+ 7f7f15c20000-7f7f15c46000 r-xp 00000000 08:14 14948478
+ /lib/x86_64-linux-gnu/ld-2.23.so
+ 7f7f15e16000-7f7f15e19000 rw-p 00000000 00:00 0
+ 7f7f15e42000-7f7f15e45000 rw-p 00000000 00:00 0
+ 7f7f15e45000-7f7f15e46000 r--p 00025000 08:14 14948478
+ /lib/x86_64-linux-gnu/ld-2.23.so
+ 7f7f15e46000-7f7f15e47000 rw-p 00026000 08:14 14948478
+ /lib/x86_64-linux-gnu/ld-2.23.so
+ 7f7f15e47000-7f7f15e48000 rw-p 00000000 00:00 0
+ 7ffdebe5c000-7ffdebe7d000 rw-p 00000000 00:00 0
+ [stack]
+ 7ffdebebc000-7ffdebebe000 r--p 00000000 00:00 0
+ [vvar]
+ 7ffdebebe000-7ffdebec0000 r-xp 00000000 00:00 0
+ [vdso]
+ ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0
+ [vsyscall]
+ [1] 6272 abort btt -M test
+
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+
+Upstream-Status: Backport
+[https://git.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git/commit/?id=d61ff409cb4dda31386373d706ea0cfb1aaac5b7]
+
+CVE: CVE-2018-10689
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ btt/devmap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/btt/devmap.c b/btt/devmap.c
+index 0553a9e..5fc1cb2 100644
+--- a/btt/devmap.c
++++ b/btt/devmap.c
+@@ -23,7 +23,7 @@
+
+ struct devmap {
+ struct list_head head;
+- char device[32], devno[32];
++ char device[PATH_MAX], devno[PATH_MAX];
+ };
+
+ LIST_HEAD(all_devmaps);
+--
+2.7.4
+
diff --git a/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
index dea1aa2028..ab905cf0da 100644
--- a/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
+++ b/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
@@ -10,6 +10,8 @@ aed463414e2e2bf8ca44ba54ee5973e7ed599e57
Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
+Index: git/Makefile
+===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -1,5 +1,6 @@
@@ -19,7 +21,7 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
LIBS = -lpthread
-@@ -23,19 +24,19 @@ btreplay/btreplay:
+@@ -26,19 +27,19 @@ btreplay/btreplay:
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
@@ -44,6 +46,8 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
$(PROGS): | depend
+Index: git/btreplay/Makefile
+===================================================================
--- git.orig/btreplay/Makefile
+++ git/btreplay/Makefile
@@ -7,6 +7,7 @@
@@ -55,8 +59,8 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
@@ -32,10 +33,10 @@ clean: docsclean
- $(CC) $(CFLAGS) -c -o $*.o $<
-
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
btrecord: btrecord.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
@@ -67,6 +71,8 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
depend:
@$(CC) -MM $(CFLAGS) *.c 1> .depend
+Index: git/btt/Makefile
+===================================================================
--- git.orig/btt/Makefile
+++ git/btt/Makefile
@@ -7,6 +7,7 @@
@@ -86,11 +92,13 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
ifneq ($(wildcard .depend),)
include .depend
+Index: git/iowatcher/Makefile
+===================================================================
--- git.orig/iowatcher/Makefile
+++ git/iowatcher/Makefile
@@ -1,5 +1,6 @@
- C = gcc
- CFLAGS = -Wall -O0 -g -W
+ CC = gcc
+ CFLAGS = -Wall -O2 -g -W -Wunused-result
+LDFLAGS =
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
@@ -99,8 +107,8 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
-- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm
-+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS)
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) -lrt
depend:
@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
diff --git a/meta/recipes-kernel/blktrace/blktrace_git.bb b/meta/recipes-kernel/blktrace/blktrace_git.bb
index 957cb7096f..2605ff9167 100644
--- a/meta/recipes-kernel/blktrace/blktrace_git.bb
+++ b/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -1,16 +1,17 @@
SUMMARY = "Generates traces of I/O traffic on block devices"
+HOMEPAGE = "http://brick.kernel.dk/snaps/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "libaio"
-SRCREV = "43fc870ce04e963def45dfc0d1ed4ea21ef10d4b"
+SRCREV = "cca113f2fe0759b91fd6a0e10fdcda2c28f18a7e"
-PV = "1.1.0+git${SRCPV}"
+PV = "1.2.0+git${SRCPV}"
SRC_URI = "git://git.kernel.dk/blktrace.git \
file://ldflags.patch \
- file://0001-include-sys-types.h-for-dev_t-definition.patch \
+ file://CVE-2018-10689.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.8.bb b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.10.bb
index c55577c661..c55577c661 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.8.bb
+++ b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.10.bb
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.8.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
index 552eb6abaa..552eb6abaa 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev-module_1.8.bb
+++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb
new file mode 100644
index 0000000000..9cb5dcb94f
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb
@@ -0,0 +1,21 @@
+require cryptodev.inc
+
+SUMMARY = "A test suite for /dev/crypto device driver"
+
+DEPENDS += "openssl"
+
+SRC_URI += " \
+file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \
+"
+
+EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"'
+
+do_compile() {
+ oe_runmake testprogs
+}
+
+do_install() {
+ oe_runmake install_tests
+}
+
+FILES_${PN} = "${bindir}/*"
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.8.bb b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.8.bb
deleted file mode 100644
index c4005242a7..0000000000
--- a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.8.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require cryptodev.inc
-
-SUMMARY = "A test suite for /dev/crypto device driver"
-
-DEPENDS += "openssl"
-
-SRC_URI += " \
-file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \
-"
-
-EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"'
-
-do_compile() {
- oe_runmake testprogs
-}
-
-do_install() {
- oe_runmake install_tests
-}
-
-FILES_${PN} = "${bindir}/tests_cryptodev/*"
diff --git a/meta/recipes-kernel/cryptodev/cryptodev.inc b/meta/recipes-kernel/cryptodev/cryptodev.inc
index 160ab30840..9d8ba44058 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev.inc
+++ b/meta/recipes-kernel/cryptodev/cryptodev.inc
@@ -3,13 +3,11 @@ HOMEPAGE = "http://cryptodev-linux.org/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz \
- file://06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch \
- file://cb186f682679383e8b5806240927903730ce85d9.patch"
+SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux \
+ file://0001-Fix-module-loading-with-Linux-v5.0-rc5.patch \
+ "
+SRCREV = "fd8b15ef1c8398a69a37932ee48c74ab40329a29"
-SRC_URI[md5sum] = "02644cc4cd02301e0b503a332eb2f0b5"
-SRC_URI[sha256sum] = "67fabde9fb67b286a96c4f45b594b0eccd0f761b495705c18f2ae9461b831376"
-
-S = "${WORKDIR}/cryptodev-linux-${PV}"
+S = "${WORKDIR}/git"
CLEANBROKEN = "1"
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
index 3f0298b0b0..84fd27e681 100644
--- a/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
+++ b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
@@ -14,37 +14,37 @@ Upstream-Status: Pending
tests/Makefile | 8 ++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
-diff --git a/Makefile b/Makefile
-index 31c4b3f..2ecf2a9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -34,6 +34,9 @@ modules_install:
- @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..."
- @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -35,6 +35,9 @@ modules_install:
+ $(MAKE) $(KERNEL_MAKE_OPTS) modules_install
+ install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h
+install_tests:
+ make -C tests install DESTDIR=$(PREFIX)
+
clean:
- make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
+ $(MAKE) $(KERNEL_MAKE_OPTS) clean
rm -f $(hostprogs) *~
-@@ -42,6 +45,9 @@ clean:
+@@ -43,6 +46,9 @@ clean:
check:
- CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) make -C tests check
+ CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C tests check
+testprogs:
+ KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs
+
CPOPTS =
- ifneq (${SHOW_TYPES},)
+ ifneq ($(SHOW_TYPES),)
CPOPTS += --show-types
-diff --git a/tests/Makefile b/tests/Makefile
-index c9f04e8..cd202af 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o
- example-async-speed-objs := async_speed.o
- example-hashcrypt-speed-objs := hashcrypt_speed.c
+Index: git/tests/Makefile
+===================================================================
+--- git.orig/tests/Makefile
++++ git/tests/Makefile
+@@ -23,6 +23,12 @@ bindir = $(execprefix)/bin
+
+ all: $(hostprogs)
+install:
+ install -d $(DESTDIR)/usr/bin/tests_cryptodev
@@ -55,9 +55,9 @@ index c9f04e8..cd202af 100644
check: $(hostprogs)
./cipher
./hmac
-@@ -28,6 +34,8 @@ check: $(hostprogs)
- ./cipher-gcm
- ./cipher-aead
+@@ -38,6 +44,8 @@ install:
+ install -m 755 $$prog $(DESTDIR)/$(bindir); \
+ done
+testprogs: $(hostprogs)
+
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch
index a580fc68e1..885b5823e4 100644
--- a/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch
+++ b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch
@@ -7,22 +7,18 @@ Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Upstream-Status: Inappropriate [ OE specific ]
---
- Makefile | 2 --
- 1 file changed, 2 deletions(-)
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
-index d66ef26..8e97c6a 100644
+index 5a080e0..bf02396 100644
--- a/Makefile
+++ b/Makefile
-@@ -23,8 +23,6 @@ install: modules_install
+@@ -33,7 +33,6 @@ install: modules_install
modules_install:
- make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install
-- @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..."
-- @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h
+ $(MAKE) $(KERNEL_MAKE_OPTS) modules_install
+- install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h
clean:
- make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
---
-1.9.1
-
+ $(MAKE) $(KERNEL_MAKE_OPTS) clean
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Fix-module-loading-with-Linux-v5.0-rc5.patch b/meta/recipes-kernel/cryptodev/files/0001-Fix-module-loading-with-Linux-v5.0-rc5.patch
new file mode 100644
index 0000000000..34ec87272f
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-Fix-module-loading-with-Linux-v5.0-rc5.patch
@@ -0,0 +1,59 @@
+Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/f971e0c]
+
+Backport patch from upstream to fix module cryptodev loading error.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From f971e0cd4a0ebe59fb2e8e17240399bf6901b09b Mon Sep 17 00:00:00 2001
+From: "Derald D. Woods" <woods.technical@gmail.com>
+Date: Sun, 10 Feb 2019 13:22:19 -0600
+Subject: [PATCH] Fix module loading with Linux v5.0-rc5
+
+This commit fixes this module load error:
+[...]
+[ 29.112091] cryptodev: loading out-of-tree module taints kernel.
+[ 29.128906] cryptodev: Unknown symbol crypto_givcipher_type (err -2)
+[ 29.188842] cryptodev: Unknown symbol crypto_givcipher_type (err -2)
+modprobe: can't load module cryptodev (extra/cryptodev.ko): unknown symbol in module, or unknown parameter
+[...]
+
+Upstream Linux support for unused GIVCIPHER, and others, was dropped here:
+
+c79b411eaa72 (crypto: skcipher - remove remnants of internal IV generators)
+
+Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
+---
+ cryptlib.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/cryptlib.c b/cryptlib.c
+index 6e66698..4a87037 100644
+--- a/cryptlib.c
++++ b/cryptlib.c
+@@ -38,7 +38,9 @@
+ #include "cryptodev_int.h"
+ #include "cipherapi.h"
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
+ extern const struct crypto_type crypto_givcipher_type;
++#endif
+
+ static void cryptodev_complete(struct crypto_async_request *req, int err)
+ {
+@@ -157,8 +159,11 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name,
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
+ tfm = crypto_skcipher_tfm(out->async.s);
+- if ((tfm->__crt_alg->cra_type == &crypto_ablkcipher_type) ||
+- (tfm->__crt_alg->cra_type == &crypto_givcipher_type)) {
++ if ((tfm->__crt_alg->cra_type == &crypto_ablkcipher_type)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
++ || (tfm->__crt_alg->cra_type == &crypto_givcipher_type)
++#endif
++ ) {
+ struct ablkcipher_alg *alg;
+
+ alg = &tfm->__crt_alg->cra_ablkcipher;
+--
+2.20.0
+
diff --git a/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch b/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch
deleted file mode 100644
index cb556e1e24..0000000000
--- a/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From f14b4706b0d04988e7e5bc8c4d2aefef9f029d9d Mon Sep 17 00:00:00 2001
-From: Michael Weiser <michael.weiser@gmx.de>
-Date: Fri, 5 Aug 2016 18:43:55 +0200
-Subject: [PATCH] Adjust to recent user page API changes
-
-4.6.0 basically renamed get_user_pages() to get_user_pages_remote() and
-introduced a new get_user_pages() that always works on the current
-task.[1] Distinguish the two APIs based on kernel version we're
-compiling for.
-
-Also, there seems to have been a massive cleansing of
-page_cache_release(page) in favour of put_page(page)[2] which was an
-alias for put_page(page)[3] since 2.6.0. Before that beginning with
-2.4.0 both page_cache_release(page) and put_page(page) have been aliases
-for __free_page(page). So using put_page() instead of
-page_cache_release(page) will produce identical code for anything after
-2.4.0.
-
-[1] https://lkml.org/lkml/2016/2/10/555
-[2] https://www.spinics.net/lists/linux-fsdevel/msg95923.html
-[3] https://www.spinics.net/lists/linux-fsdevel/msg95922.html
----
- zc.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-Upstream-Status: Backport [from master for 4.8 kernels]
-
-Index: cryptodev-linux-1.8/zc.c
-===================================================================
---- cryptodev-linux-1.8.orig/zc.c
-+++ cryptodev-linux-1.8/zc.c
-@@ -59,7 +59,12 @@ int __get_userbuf(uint8_t __user *addr,
- }
-
- down_read(&mm->mmap_sem);
-- ret = get_user_pages(task, mm,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0))
-+ ret = get_user_pages_remote(
-+#else
-+ ret = get_user_pages(
-+#endif
-+ task, mm,
- (unsigned long)addr, pgcount, write, 0, pg, NULL);
- up_read(&mm->mmap_sem);
- if (ret != pgcount)
-@@ -119,7 +124,7 @@ void release_user_pages(struct csession
- else
- ses->readonly_pages--;
-
-- page_cache_release(ses->pages[i]);
-+ put_page(ses->pages[i]);
- }
- ses->used_pages = 0;
- }
diff --git a/meta/recipes-kernel/cryptodev/files/cb186f682679383e8b5806240927903730ce85d9.patch b/meta/recipes-kernel/cryptodev/files/cb186f682679383e8b5806240927903730ce85d9.patch
deleted file mode 100644
index eb0eab63bd..0000000000
--- a/meta/recipes-kernel/cryptodev/files/cb186f682679383e8b5806240927903730ce85d9.patch
+++ /dev/null
@@ -1,279 +0,0 @@
-From cb186f682679383e8b5806240927903730ce85d9 Mon Sep 17 00:00:00 2001
-From: Michael Weiser <michael.weiser@gmx.de>
-Date: Fri, 5 Aug 2016 17:26:27 +0200
-Subject: [PATCH] Support skcipher in addition to ablkcipher API
-
-The ablkcipher API is being phased out[1]. The unified skcipher API
-seems to have made its entry with 4.3.[3, 4] By what can be seen from
-migration patches[1.ff.], it's a drop-in replacement.
-
-Also, deallocators such as crypto_free_skcipher() are NULL-safe now[2].
-
-Add a new header cipherapi.h to aid migration from ablkcipher to skcipher and
-retain support for old kernels. Make it decide which API to use and provide
-appropriate function calls and type definitions. Since the ablkcipher and
-skcipher APIs are so similar, those are mainly defines for corresponding
-pseudo-functions in namespace cryptodev_ derived directly from their API
-counterparts.
-
-Compiles and works (i.e. checks pass) with Debian testing 4.6.4 kernel
-as well as 4.8-rc2+ Linus git tree as of today. (Both require a fix for
-changed page access API[5].)
-
-[1] https://www.spinics.net/lists/linux-crypto/msg18133.html
-[2] https://www.spinics.net/lists/linux-crypto/msg18154.html, line 120
-[3] https://www.spinics.net/lists/linux-crypto/msg16373.html
-[4] https://www.spinics.net/lists/linux-crypto/msg16294.html
-[5] https://github.com/cryptodev-linux/cryptodev-linux/pull/14
----
- cipherapi.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- cryptlib.c | 40 ++++++++++++++++++----------------------
- cryptlib.h | 6 ++++--
- ioctl.c | 4 ++--
- 4 files changed, 84 insertions(+), 26 deletions(-)
- create mode 100644 cipherapi.h
-
-Upstream-Status: Backport [from master for 4.8 kernels]
-
-Index: cryptodev-linux-1.8/cipherapi.h
-===================================================================
---- /dev/null
-+++ cryptodev-linux-1.8/cipherapi.h
-@@ -0,0 +1,60 @@
-+#ifndef CIPHERAPI_H
-+# define CIPHERAPI_H
-+
-+#include <linux/version.h>
-+
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0))
-+# include <linux/crypto.h>
-+
-+typedef struct ablkcipher_alg cryptodev_blkcipher_alg_t;
-+typedef struct crypto_ablkcipher cryptodev_crypto_blkcipher_t;
-+typedef struct ablkcipher_request cryptodev_blkcipher_request_t;
-+
-+# define cryptodev_crypto_alloc_blkcipher crypto_alloc_ablkcipher
-+# define cryptodev_crypto_blkcipher_alg crypto_ablkcipher_alg
-+# define cryptodev_crypto_blkcipher_blocksize crypto_ablkcipher_blocksize
-+# define cryptodev_crypto_blkcipher_ivsize crypto_ablkcipher_ivsize
-+# define cryptodev_crypto_blkcipher_alignmask crypto_ablkcipher_alignmask
-+# define cryptodev_crypto_blkcipher_setkey crypto_ablkcipher_setkey
-+
-+static inline void cryptodev_crypto_free_blkcipher(cryptodev_crypto_blkcipher_t *c) {
-+ if (c)
-+ crypto_free_ablkcipher(c);
-+}
-+
-+# define cryptodev_blkcipher_request_alloc ablkcipher_request_alloc
-+# define cryptodev_blkcipher_request_set_callback ablkcipher_request_set_callback
-+
-+static inline void cryptodev_blkcipher_request_free(cryptodev_blkcipher_request_t *r) {
-+ if (r)
-+ ablkcipher_request_free(r);
-+}
-+
-+# define cryptodev_blkcipher_request_set_crypt ablkcipher_request_set_crypt
-+# define cryptodev_crypto_blkcipher_encrypt crypto_ablkcipher_encrypt
-+# define cryptodev_crypto_blkcipher_decrypt crypto_ablkcipher_decrypt
-+# define cryptodev_crypto_blkcipher_tfm crypto_ablkcipher_tfm
-+#else
-+#include <crypto/skcipher.h>
-+
-+typedef struct skcipher_alg cryptodev_blkcipher_alg_t;
-+typedef struct crypto_skcipher cryptodev_crypto_blkcipher_t;
-+typedef struct skcipher_request cryptodev_blkcipher_request_t;
-+
-+# define cryptodev_crypto_alloc_blkcipher crypto_alloc_skcipher
-+# define cryptodev_crypto_blkcipher_alg crypto_skcipher_alg
-+# define cryptodev_crypto_blkcipher_blocksize crypto_skcipher_blocksize
-+# define cryptodev_crypto_blkcipher_ivsize crypto_skcipher_ivsize
-+# define cryptodev_crypto_blkcipher_alignmask crypto_skcipher_alignmask
-+# define cryptodev_crypto_blkcipher_setkey crypto_skcipher_setkey
-+# define cryptodev_crypto_free_blkcipher crypto_free_skcipher
-+# define cryptodev_blkcipher_request_alloc skcipher_request_alloc
-+# define cryptodev_blkcipher_request_set_callback skcipher_request_set_callback
-+# define cryptodev_blkcipher_request_free skcipher_request_free
-+# define cryptodev_blkcipher_request_set_crypt skcipher_request_set_crypt
-+# define cryptodev_crypto_blkcipher_encrypt crypto_skcipher_encrypt
-+# define cryptodev_crypto_blkcipher_decrypt crypto_skcipher_decrypt
-+# define cryptodev_crypto_blkcipher_tfm crypto_skcipher_tfm
-+#endif
-+
-+#endif
-Index: cryptodev-linux-1.8/cryptlib.c
-===================================================================
---- cryptodev-linux-1.8.orig/cryptlib.c
-+++ cryptodev-linux-1.8/cryptlib.c
-@@ -23,7 +23,6 @@
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
--#include <linux/crypto.h>
- #include <linux/mm.h>
- #include <linux/highmem.h>
- #include <linux/ioctl.h>
-@@ -37,6 +36,7 @@
- #include <linux/rtnetlink.h>
- #include <crypto/authenc.h>
- #include "cryptodev_int.h"
-+#include "cipherapi.h"
-
-
- struct cryptodev_result {
-@@ -133,15 +133,15 @@ int cryptodev_cipher_init(struct cipher_
- int ret;
-
- if (aead == 0) {
-- struct ablkcipher_alg *alg;
-+ cryptodev_blkcipher_alg_t *alg;
-
-- out->async.s = crypto_alloc_ablkcipher(alg_name, 0, 0);
-+ out->async.s = cryptodev_crypto_alloc_blkcipher(alg_name, 0, 0);
- if (unlikely(IS_ERR(out->async.s))) {
- ddebug(1, "Failed to load cipher %s", alg_name);
- return -EINVAL;
- }
-
-- alg = crypto_ablkcipher_alg(out->async.s);
-+ alg = cryptodev_crypto_blkcipher_alg(out->async.s);
- if (alg != NULL) {
- /* Was correct key length supplied? */
- if (alg->max_keysize > 0 &&
-@@ -154,11 +154,11 @@ int cryptodev_cipher_init(struct cipher_
- }
- }
-
-- out->blocksize = crypto_ablkcipher_blocksize(out->async.s);
-- out->ivsize = crypto_ablkcipher_ivsize(out->async.s);
-- out->alignmask = crypto_ablkcipher_alignmask(out->async.s);
-+ out->blocksize = cryptodev_crypto_blkcipher_blocksize(out->async.s);
-+ out->ivsize = cryptodev_crypto_blkcipher_ivsize(out->async.s);
-+ out->alignmask = cryptodev_crypto_blkcipher_alignmask(out->async.s);
-
-- ret = crypto_ablkcipher_setkey(out->async.s, keyp, keylen);
-+ ret = cryptodev_crypto_blkcipher_setkey(out->async.s, keyp, keylen);
- } else {
- out->async.as = crypto_alloc_aead(alg_name, 0, 0);
- if (unlikely(IS_ERR(out->async.as))) {
-@@ -191,14 +191,14 @@ int cryptodev_cipher_init(struct cipher_
- init_completion(&out->async.result->completion);
-
- if (aead == 0) {
-- out->async.request = ablkcipher_request_alloc(out->async.s, GFP_KERNEL);
-+ out->async.request = cryptodev_blkcipher_request_alloc(out->async.s, GFP_KERNEL);
- if (unlikely(!out->async.request)) {
- derr(1, "error allocating async crypto request");
- ret = -ENOMEM;
- goto error;
- }
-
-- ablkcipher_request_set_callback(out->async.request,
-+ cryptodev_blkcipher_request_set_callback(out->async.request,
- CRYPTO_TFM_REQ_MAY_BACKLOG,
- cryptodev_complete, out->async.result);
- } else {
-@@ -218,10 +218,8 @@ int cryptodev_cipher_init(struct cipher_
- return 0;
- error:
- if (aead == 0) {
-- if (out->async.request)
-- ablkcipher_request_free(out->async.request);
-- if (out->async.s)
-- crypto_free_ablkcipher(out->async.s);
-+ cryptodev_blkcipher_request_free(out->async.request);
-+ cryptodev_crypto_free_blkcipher(out->async.s);
- } else {
- if (out->async.arequest)
- aead_request_free(out->async.arequest);
-@@ -237,10 +235,8 @@ void cryptodev_cipher_deinit(struct ciph
- {
- if (cdata->init) {
- if (cdata->aead == 0) {
-- if (cdata->async.request)
-- ablkcipher_request_free(cdata->async.request);
-- if (cdata->async.s)
-- crypto_free_ablkcipher(cdata->async.s);
-+ cryptodev_blkcipher_request_free(cdata->async.request);
-+ cryptodev_crypto_free_blkcipher(cdata->async.s);
- } else {
- if (cdata->async.arequest)
- aead_request_free(cdata->async.arequest);
-@@ -289,10 +285,10 @@ ssize_t cryptodev_cipher_encrypt(struct
- reinit_completion(&cdata->async.result->completion);
-
- if (cdata->aead == 0) {
-- ablkcipher_request_set_crypt(cdata->async.request,
-+ cryptodev_blkcipher_request_set_crypt(cdata->async.request,
- (struct scatterlist *)src, dst,
- len, cdata->async.iv);
-- ret = crypto_ablkcipher_encrypt(cdata->async.request);
-+ ret = cryptodev_crypto_blkcipher_encrypt(cdata->async.request);
- } else {
- aead_request_set_crypt(cdata->async.arequest,
- (struct scatterlist *)src, dst,
-@@ -311,10 +307,10 @@ ssize_t cryptodev_cipher_decrypt(struct
-
- reinit_completion(&cdata->async.result->completion);
- if (cdata->aead == 0) {
-- ablkcipher_request_set_crypt(cdata->async.request,
-+ cryptodev_blkcipher_request_set_crypt(cdata->async.request,
- (struct scatterlist *)src, dst,
- len, cdata->async.iv);
-- ret = crypto_ablkcipher_decrypt(cdata->async.request);
-+ ret = cryptodev_crypto_blkcipher_decrypt(cdata->async.request);
- } else {
- aead_request_set_crypt(cdata->async.arequest,
- (struct scatterlist *)src, dst,
-Index: cryptodev-linux-1.8/cryptlib.h
-===================================================================
---- cryptodev-linux-1.8.orig/cryptlib.h
-+++ cryptodev-linux-1.8/cryptlib.h
-@@ -3,6 +3,8 @@
-
- #include <linux/version.h>
-
-+#include "cipherapi.h"
-+
- struct cipher_data {
- int init; /* 0 uninitialized */
- int blocksize;
-@@ -12,8 +14,8 @@ struct cipher_data {
- int alignmask;
- struct {
- /* block ciphers */
-- struct crypto_ablkcipher *s;
-- struct ablkcipher_request *request;
-+ cryptodev_crypto_blkcipher_t *s;
-+ cryptodev_blkcipher_request_t *request;
-
- /* AEAD ciphers */
- struct crypto_aead *as;
-Index: cryptodev-linux-1.8/ioctl.c
-===================================================================
---- cryptodev-linux-1.8.orig/ioctl.c
-+++ cryptodev-linux-1.8/ioctl.c
-@@ -34,7 +34,6 @@
- */
-
- #include <crypto/hash.h>
--#include <linux/crypto.h>
- #include <linux/mm.h>
- #include <linux/highmem.h>
- #include <linux/ioctl.h>
-@@ -53,6 +52,7 @@
- #include "cryptodev_int.h"
- #include "zc.h"
- #include "version.h"
-+#include "cipherapi.h"
-
- MODULE_AUTHOR("Nikos Mavrogiannopoulos <nmav@gnutls.org>");
- MODULE_DESCRIPTION("CryptoDev driver");
-@@ -765,7 +765,7 @@ static int get_session_info(struct fcryp
-
- if (ses_ptr->cdata.init) {
- if (ses_ptr->cdata.aead == 0)
-- tfm = crypto_ablkcipher_tfm(ses_ptr->cdata.async.s);
-+ tfm = cryptodev_crypto_blkcipher_tfm(ses_ptr->cdata.async.s);
- else
- tfm = crypto_aead_tfm(ses_ptr->cdata.async.as);
- tfm_info_to_alg_info(&siop->cipher_info, tfm);
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
index 0c409b0c0b..0650e3c82e 100644
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ b/meta/recipes-kernel/dtc/dtc.inc
@@ -1,4 +1,5 @@
SUMMARY = "Device Tree Compiler"
+HOMEPAGE = "https://devicetree.org/"
DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels."
SECTION = "bootloader"
LICENSE = "GPLv2 | BSD"
@@ -6,9 +7,12 @@ DEPENDS = "flex-native bison-native"
SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
file://make_install.patch \
- "
+ "
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
-EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
+EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
+
+inherit pkgconfig
S = "${WORKDIR}/git"
@@ -19,4 +23,4 @@ do_install () {
PACKAGES =+ "${PN}-misc"
FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
-RDEPENDS_${PN}-misc += "bash"
+RDEPENDS_${PN}-misc += "bash diffutils"
diff --git a/meta/recipes-kernel/dtc/dtc/make_install.patch b/meta/recipes-kernel/dtc/dtc/make_install.patch
index 1120617e7b..ea9359e815 100644
--- a/meta/recipes-kernel/dtc/dtc/make_install.patch
+++ b/meta/recipes-kernel/dtc/dtc/make_install.patch
@@ -1,17 +1,26 @@
+From e9852b9d206df1e42aa4c8afec55a0f5e099b533 Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw@linux.intel.com>
+Date: Thu, 3 Nov 2011 08:35:47 -0700
+Subject: [PATCH] dtc: Add patch to correctly install shared libraries and
+
Upstream-Status: Inappropriate [configuration]
-Index: git/Makefile
-===================================================================
---- git.orig/Makefile 2011-11-02 14:52:17.243104779 -0700
-+++ git/Makefile 2011-11-02 15:06:01.555104982 -0700
-@@ -161,8 +161,8 @@
- $(INSTALL) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index d8ebc4f..f5e01be 100644
+--- a/Makefile
++++ b/Makefile
+@@ -205,8 +205,8 @@ install-bin: all $(SCRIPTS)
+ install-lib: all
+ @$(VECHO) INSTALL-LIB
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
-- $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
+- $(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
+ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
+ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib))
ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
- $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
- $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_DATA) $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
+
diff --git a/meta/recipes-kernel/dtc/dtc_1.5.1.bb b/meta/recipes-kernel/dtc/dtc_1.5.1.bb
new file mode 100644
index 0000000000..9df8a06d47
--- /dev/null
+++ b/meta/recipes-kernel/dtc/dtc_1.5.1.bb
@@ -0,0 +1,10 @@
+require dtc.inc
+
+LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
+
+SRCREV = "60e0db3d65a1218b0d5a29474e769f28a18e3ca6"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-kernel/dtc/dtc_git.bb b/meta/recipes-kernel/dtc/dtc_git.bb
deleted file mode 100644
index 4446142a30..0000000000
--- a/meta/recipes-kernel/dtc/dtc_git.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require dtc.inc
-
-LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
-
-SRCREV = "302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2"
-PV = "1.4.1+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 6877a0cf18..8ca7193c8c 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -1,10 +1,10 @@
SUMMARY = "Tools for managing Yocto Project style branched kernels"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1bda400e2828845ba0d06c"
+LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249624278c3e343e501"
DEPENDS = "git-native"
-SRCREV = "4b5de9011b31ff92ba2b6e052ab818b09affd905"
+SRCREV = "bb6df0ef2365689cd3df6f76a8838cddae0d9343"
PR = "r12"
PV = "0.2+git${SRCPV}"
@@ -12,6 +12,7 @@ inherit native
SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
S = "${WORKDIR}"
+UPSTREAM_CHECK_COMMITS = "1"
do_compile() {
:
diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc
deleted file mode 100644
index bdfe024a79..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Kexec fast reboot tools"
-DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
-AUTHOR = "Eric Biederman"
-HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
-SECTION = "kernel/userland"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
- file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
-DEPENDS = "zlib xz"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
- file://kdump \
- file://kdump.conf \
-"
-
-PR = "r1"
-
-inherit autotools
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
-
-INSANE_SKIP_${PN} = "arch"
-
-do_compile_prepend() {
- # Remove the prepackaged config.h from the source tree as it overrides
- # the same file generated by configure and placed in the build tree
- rm -f ${S}/include/config.h
-
- # Remove the '*.d' file to make sure the recompile is OK
- for dep in `find ${B} -type f -name '*.d'`; do
- dep_no_d="`echo $dep | sed 's#.d$##'`"
- # Remove file.d when there is a file.o
- if [ -f "$dep_no_d.o" ]; then
- rm -f $dep
- fi
- done
-}
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-powerpc-change-the-memory-size-limit.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-powerpc-change-the-memory-size-limit.patch
new file mode 100644
index 0000000000..029650f35c
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0001-powerpc-change-the-memory-size-limit.patch
@@ -0,0 +1,35 @@
+From 211cae4b6a02a4d9d37bfcd76f3702696e095fc3 Mon Sep 17 00:00:00 2001
+From: Quanyang Wang <quanyang.wang@windriver.com>
+Date: Tue, 16 Jun 2015 12:59:57 +0800
+Subject: [PATCH] powerpc: change the memory size limit
+
+When run "kexec" in powerpc board, the kexec has a limit that
+the kernel text and bss size must be less than 24M. But now
+some kernel size exceed the limit. So we need to change the limit,
+else will get the error log as below:
+
+my_load:669: do
+Could not find a free area of memory of 0x12400 bytes...
+Could not find a free area of memory of 0x13000 bytes...
+locate_hole failed
+
+Upstream-Status: Pending
+
+Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+---
+ kexec/arch/ppc/kexec-ppc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kexec/arch/ppc/kexec-ppc.h b/kexec/arch/ppc/kexec-ppc.h
+index 04e728e..6bae9ec 100644
+--- a/kexec/arch/ppc/kexec-ppc.h
++++ b/kexec/arch/ppc/kexec-ppc.h
+@@ -44,7 +44,7 @@ void dol_ppc_usage(void);
+ * During inital setup the kernel does not map the whole memory but a part of
+ * it. On Book-E that is 64MiB, 601 24MiB or 256MiB (if possible).
+ */
+-#define KERNEL_ACCESS_TOP (24 * 1024 * 1024)
++#define KERNEL_ACCESS_TOP (36 * 1024 * 1024)
+
+ /* boot block version 17 as defined by the linux kernel */
+ struct bootblock {
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-Pass-r-directly-to-linker.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-Pass-r-directly-to-linker.patch
deleted file mode 100644
index bfd077daf0..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-Pass-r-directly-to-linker.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a1135b3170963ba956f2364c1283864c35541295 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 07:59:45 +0000
-Subject: [PATCH] purgatory: Pass -r directly to linker
-
-This helps compiling with clang since -r is not a known option for clang
-where as gcc knows how to deal with it and passes it down to linker
-unfiltered
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- purgatory/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/purgatory/Makefile b/purgatory/Makefile
-index 2b5c061..b251353 100644
---- a/purgatory/Makefile
-+++ b/purgatory/Makefile
-@@ -61,7 +61,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
- -I$(shell $(CC) -print-file-name=include)
- $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
- -Wl,--no-undefined -nostartfiles -nostdlib \
-- -nodefaultlibs -e purgatory_start -r \
-+ -nodefaultlibs -e purgatory_start -Wl,-r \
- -Wl,-Map=$(PURGATORY_MAP)
-
- $(PURGATORY): $(PURGATORY_OBJS)
---
-2.5.1
-
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
deleted file mode 100644
index 90c2f6e0ec..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 9 Jan 2016 17:16:16 -0800
-Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE
-
-loff_t is guarded with _GNU_SOURCE on some C library implementations
-e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to
-include this define, it should help compiling on musl while nothing
-changes for glibc based systems since there _GNU_SOURCE is already
-defined
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- vmcore-dmesg/vmcore-dmesg.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
-index 0364636..a8f56df 100644
---- a/vmcore-dmesg/vmcore-dmesg.c
-+++ b/vmcore-dmesg/vmcore-dmesg.c
-@@ -1,4 +1,5 @@
- #define _XOPEN_SOURCE 600
-+#define _GNU_SOURCE
- #define _LARGEFILE_SOURCE 1
- #define _FILE_OFFSET_BITS 64
- #include <endian.h>
---
-2.7.0
-
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0002-powerpc-change-the-memory-size-limit.patch b/meta/recipes-kernel/kexec/kexec-tools/0002-powerpc-change-the-memory-size-limit.patch
deleted file mode 100644
index dc97d930e9..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0002-powerpc-change-the-memory-size-limit.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From b19b68eab567aa534cf8dec79fe18e3dc0e14043 Mon Sep 17 00:00:00 2001
-From: Quanyang Wang <quanyang.wang@windriver.com>
-Date: Tue, 16 Jun 2015 12:59:57 +0800
-Subject: [PATCH] powerpc: change the memory size limit
-
-When run "kexec" in powerpc board, the kexec has a limit that
-the kernel text and bss size must be less than 24M. But now
-some kernel size exceed the limit. So we need to change the limit,
-else will get the error log as below:
-
-my_load:669: do
-Could not find a free area of memory of 0x12400 bytes...
-Could not find a free area of memory of 0x13000 bytes...
-locate_hole failed
-
-Upstream-Status: Pending
-
-Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
----
- kexec/arch/ppc/kexec-ppc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: kexec-tools-2.0.10/kexec/arch/ppc/kexec-ppc.h
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/arch/ppc/kexec-ppc.h
-+++ kexec-tools-2.0.10/kexec/arch/ppc/kexec-ppc.h
-@@ -42,7 +42,7 @@ void dol_ppc_usage(void);
- * During inital setup the kernel does not map the whole memory but a part of
- * it. On Book-E that is 64MiB, 601 24MiB or 256MiB (if possible).
- */
--#define KERNEL_ACCESS_TOP (24 * 1024 * 1024)
-+#define KERNEL_ACCESS_TOP (36 * 1024 * 1024)
-
- /* boot block version 17 as defined by the linux kernel */
- struct bootblock {
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0002-purgatory-Pass-r-directly-to-linker.patch b/meta/recipes-kernel/kexec/kexec-tools/0002-purgatory-Pass-r-directly-to-linker.patch
new file mode 100644
index 0000000000..363d5da4ae
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0002-purgatory-Pass-r-directly-to-linker.patch
@@ -0,0 +1,29 @@
+From a04bcf8f683c1a5a7d015920124457ad56fb7cf0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Sep 2015 07:59:45 +0000
+Subject: [PATCH] purgatory: Pass -r directly to linker
+
+This helps compiling with clang since -r is not a known option for clang
+where as gcc knows how to deal with it and passes it down to linker
+unfiltered
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ purgatory/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/purgatory/Makefile b/purgatory/Makefile
+index 2dd6c47..416e6b9 100644
+--- a/purgatory/Makefile
++++ b/purgatory/Makefile
+@@ -60,7 +60,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
+ -I$(shell $(CC) -print-file-name=include)
+ $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
+ -Wl,--no-undefined -nostartfiles -nostdlib \
+- -nodefaultlibs -e purgatory_start -r \
++ -nodefaultlibs -e purgatory_start -Wl,-r \
+ -Wl,-Map=$(PURGATORY_MAP)
+
+ $(PURGATORY): $(PURGATORY_OBJS)
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch b/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
new file mode 100644
index 0000000000..832fe67716
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
@@ -0,0 +1,49 @@
+From 55e583d20651e829afbbc8dba0f8ec3017cda2d5 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Mon, 9 Jan 2017 15:26:29 +0800
+Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue
+
+When "CONFIG_ARM_LPAE" is enabled,3 level page table
+is used by MMU, the "SECTION_SIZE" is defined with
+(1 << 21), but 'add_buffer_phys_virt()' hardcode this
+to (1 << 20).
+
+Upstream-Status: Pending
+
+Suggested-By:fredrik.markstrom@gmail.com
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ kexec/arch/arm/crashdump-arm.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
+index daa4788..3f72b38 100644
+--- a/kexec/arch/arm/crashdump-arm.c
++++ b/kexec/arch/arm/crashdump-arm.c
+@@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
+ void *buf;
+ int err;
+ int last_ranges;
++ unsigned short align_bit_shift = 20;
+
+ /*
+ * First fetch all the memory (RAM) ranges that we are going to pass to
+@@ -281,6 +282,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
+
+ /* for support LPAE enabled kernel*/
+ elf_info.class = ELFCLASS64;
++ align_bit_shift = 21;
+
+ err = crash_create_elf64_headers(info, &elf_info,
+ usablemem_rgns.ranges,
+@@ -302,8 +304,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
+ * 1MB) so that available memory passed in kernel command line will be
+ * aligned to 1MB. This is because kernel create_mapping() wants memory
+ * regions to be aligned to SECTION_SIZE.
++ * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in pgtable-3level.h
+ */
+- elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
++ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << align_bit_shift,
+ crash_kernel_mem.start,
+ crash_kernel_mem.end, -1, 0);
+
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch b/meta/recipes-kernel/kexec/kexec-tools/0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch
new file mode 100644
index 0000000000..a809d5ba8e
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch
@@ -0,0 +1,93 @@
+From 8c9a5076543eb3d497e016b3d7707e93d6311883 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Mon, 15 Jul 2013 23:32:36 -0700
+Subject: [PATCH] x86_64: Add support to build kexec-tools with x32 ABI
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Summary of changes,
+
+configure.ac: Add test for detect x32 ABI.
+purgatory/arch/x86_64/Makefile: Not use mcmodel large when
+ x32 ABI is set.
+kexec/arch/x86_64/kexec-elf-rel-x86_64.c: When x32 ABI is set
+ use ELFCLASS32 instead of ELFCLASS64.
+kexec/kexec-syscall.h: Add correct syscall number for x32 ABI.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
+---
+ configure.ac | 9 +++++++++
+ kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 4 ++++
+ kexec/kexec-syscall.h | 4 ++++
+ purgatory/arch/x86_64/Makefile | 4 +++-
+ 4 files changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c2b0c68..60882b8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -54,6 +54,15 @@ case $target_cpu in
+ ;;
+ ia64|x86_64|alpha|m68k )
+ ARCH="$target_cpu"
++
++ dnl ---Test for x32 ABI in x86_64
++ if test "x$ARCH" = "xx86_64" ; then
++ AC_EGREP_CPP(x32_test,
++ [#if defined(__x86_64__) && defined (__ILP32__)
++ x32_test
++ #endif
++ ], SUBARCH='x32', SUBARCH='64')
++ fi
+ ;;
+ * )
+ AC_MSG_ERROR([unsupported architecture $target_cpu])
+diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+index db85b44..0ce1172 100644
+--- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
++++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+@@ -8,7 +8,11 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr)
+ if (ehdr->ei_data != ELFDATA2LSB) {
+ return 0;
+ }
++#ifdef __ILP32__
++ if (ehdr->ei_class != ELFCLASS32) {
++#else
+ if (ehdr->ei_class != ELFCLASS64) {
++#endif
+ return 0;
+ }
+ if (ehdr->e_machine != EM_X86_64) {
+diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
+index dac1c1f..e9479b7 100644
+--- a/kexec/kexec-syscall.h
++++ b/kexec/kexec-syscall.h
+@@ -31,8 +31,12 @@
+ #define __NR_kexec_load 268
+ #endif
+ #ifdef __x86_64__
++#ifdef __ILP32__
++#define __NR_kexec_load 528
++#else
+ #define __NR_kexec_load 246
+ #endif
++#endif
+ #ifdef __s390x__
+ #define __NR_kexec_load 277
+ #endif
+diff --git a/purgatory/arch/x86_64/Makefile b/purgatory/arch/x86_64/Makefile
+index 7300937..4af11e4 100644
+--- a/purgatory/arch/x86_64/Makefile
++++ b/purgatory/arch/x86_64/Makefile
+@@ -23,4 +23,6 @@ x86_64_PURGATORY_SRCS += purgatory/arch/i386/console-x86.c
+ x86_64_PURGATORY_SRCS += purgatory/arch/i386/vga.c
+ x86_64_PURGATORY_SRCS += purgatory/arch/i386/pic.c
+
+-x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
++ifeq ($(SUBARCH),64)
++ x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
++endif
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch b/meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch
new file mode 100644
index 0000000000..7a4b8548ca
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch
@@ -0,0 +1,28 @@
+From c54488ad5fd657e0f154d76d7456d9080be24836 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 11:18:49 -0700
+Subject: [PATCH] Disable PIE during link
+
+We have explcitly disabled PIE during compile so we
+just need to match it with linker flags
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ purgatory/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/purgatory/Makefile b/purgatory/Makefile
+index 416e6b9..f00edb4 100644
+--- a/purgatory/Makefile
++++ b/purgatory/Makefile
+@@ -59,7 +59,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
+ -Iinclude \
+ -I$(shell $(CC) -print-file-name=include)
+ $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
+- -Wl,--no-undefined -nostartfiles -nostdlib \
++ -Wl,--no-undefined -no-pie -nostartfiles -nostdlib \
+ -nodefaultlibs -e purgatory_start -Wl,-r \
+ -Wl,-Map=$(PURGATORY_MAP)
+
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch b/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
new file mode 100644
index 0000000000..6811dfa597
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
@@ -0,0 +1,40 @@
+From b54816eff272324320c490d62dc36b27d2838732 Mon Sep 17 00:00:00 2001
+From: Quanyang Wang <quanyang.wang@windriver.com>
+Date: Mon, 16 Sep 2019 10:49:05 +0800
+Subject: [PATCH] kexec/arm: undefine __NR_kexec_file_load for arm
+
+In the kernel upstream commit 4ab65ba7a5cb
+("ARM: add kexec_file_load system call number"),
+__NR_kexec_file_load for arm has been defined to be 401.
+This results that even if kexec_file_load isn't implemented
+for arm but the function is_kexec_file_load_implemented()
+will still return true. So undef __NR_kexec_file_load for
+arm architecture.
+
+Upstream-Status: Backport
+[https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/kexec/kexec-syscall.h?id=b54816eff272324320c490d62dc36b27d2838732]
+
+Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+Signed-off-by: Simon Horman <horms@verge.net.au>
+---
+ kexec/kexec-syscall.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
+index dac1c1f..92d51d3 100644
+--- a/kexec/kexec-syscall.h
++++ b/kexec/kexec-syscall.h
+@@ -56,6 +56,10 @@
+ #endif
+ #endif /*ifndef __NR_kexec_load*/
+
++#ifdef __arm__
++#undef __NR_kexec_file_load
++#endif
++
+ #ifndef __NR_kexec_file_load
+
+ #ifdef __x86_64__
+--
+2.17.1
+
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kdump b/meta/recipes-kernel/kexec/kexec-tools/kdump
index 2347205eda..69e3cafe5c 100755
--- a/meta/recipes-kernel/kexec/kexec-tools/kdump
+++ b/meta/recipes-kernel/kexec/kexec-tools/kdump
@@ -89,7 +89,7 @@ do_start()
return 0
fi
- #check the running kernel cmdline option,insure "crashkenrel=" always set.
+ #check the running kernel cmdline option,insure "crashkernel=" always set.
grep -q crashkernel= /proc/cmdline
if [ $? != 0 ]; then
echo "Kdump isn't supported on the running kernel,please check boot option!!!"
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kdump.service b/meta/recipes-kernel/kexec/kexec-tools/kdump.service
new file mode 100644
index 0000000000..b4a2c0611d
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/kdump.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Reboot and dump vmcore via kexec
+DefaultDependencies=no
+Requires=sysinit.target
+After=sysinit.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/kdump-helper start
+ExecStop=@LIBEXECDIR@/kdump-helper stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
deleted file mode 100644
index b03f582576..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
+++ /dev/null
@@ -1,801 +0,0 @@
-From: Geoff Levand <geoff@infradead.org>
-Date: Mon, 15 Jul 2013 23:32:36 +0000 (-0700)
-Subject: Add arm64 support
-X-Git-Url: https://git.linaro.org/gitweb?p=people%2Fgeoff%2Fkexec-tools.git;a=commitdiff_plain;h=fbf5ac6c2c70ec0f6da2b9ff563e573999752c01
-
-Add arm64 support
-
-Signed-off-by: Geoff Levand <geoff@infradead.org>
-
-Get patch from:
-https://fedorapeople.org/~hrw/aarch64/for-fedora/kexec-aarch64.patch
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-
----
- configure.ac | 3
- kexec/Makefile | 1
- kexec/arch/arm64/Makefile | 13 +
- kexec/arch/arm64/crashdump-arm64.c | 305 ++++++++++++++++++++++++++++++++
- kexec/arch/arm64/include/arch/options.h | 26 ++
- kexec/arch/arm64/kexec-arm64.c | 177 ++++++++++++++++++
- kexec/arch/arm64/kexec-arm64.h | 20 ++
- kexec/arch/arm64/kexec-elf-arm64.c | 114 +++++++++++
- kexec/kexec-syscall.h | 9
- kexec/kexec.c | 2
- purgatory/arch/arm64/Makefile | 7
- 11 files changed, 675 insertions(+), 2 deletions(-)
-
-Index: kexec-tools-2.0.10/configure.ac
-===================================================================
---- kexec-tools-2.0.10.orig/configure.ac
-+++ kexec-tools-2.0.10/configure.ac
-@@ -36,6 +36,9 @@ case $target_cpu in
- ARCH="ppc64"
- SUBARCH="LE"
- ;;
-+ aarch64* )
-+ ARCH="arm64"
-+ ;;
- arm* )
- ARCH="arm"
- ;;
-Index: kexec-tools-2.0.10/kexec/Makefile
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/Makefile
-+++ kexec-tools-2.0.10/kexec/Makefile
-@@ -71,6 +71,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT)
-
- include $(srcdir)/kexec/arch/alpha/Makefile
- include $(srcdir)/kexec/arch/arm/Makefile
-+include $(srcdir)/kexec/arch/arm64/Makefile
- include $(srcdir)/kexec/arch/i386/Makefile
- include $(srcdir)/kexec/arch/ia64/Makefile
- include $(srcdir)/kexec/arch/m68k/Makefile
-Index: kexec-tools-2.0.10/kexec/arch/arm64/Makefile
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/Makefile
-@@ -0,0 +1,13 @@
-+
-+arm64_KEXEC_SRCS += \
-+ kexec/arch/arm64/kexec-arm64.c \
-+ kexec/arch/arm64/kexec-elf-arm64.c \
-+ kexec/arch/arm64/crashdump-arm64.c
-+
-+arm64_ARCH_REUSE_INITRD =
-+arm64_ADD_SEGMENT =
-+arm64_VIRT_TO_PHYS =
-+
-+dist += $(arm64_KEXEC_SRCS) \
-+ kexec/arch/arm64/Makefile \
-+ kexec/arch/arm64/kexec-arm64.h
-Index: kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c
-@@ -0,0 +1,305 @@
-+/*
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation (version 2 of the License).
-+ */
-+
-+#include "../../kexec.h"
-+#include "../../kexec-elf.h"
-+#include "../../crashdump.h"
-+
-+int is_crashkernel_mem_reserved(void)
-+{
-+ return 0;
-+}
-+
-+#if 0
-+/*
-+ * Used to save various memory ranges/regions needed for the captured
-+ * kernel to boot. (lime memmap= option in other archs)
-+ */
-+static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];
-+struct memory_ranges usablemem_rgns = {
-+ .size = 0,
-+ .ranges = crash_memory_ranges,
-+};
-+
-+/* memory range reserved for crashkernel */
-+static struct memory_range crash_reserved_mem;
-+
-+static struct crash_elf_info elf_info = {
-+ .class = ELFCLASS32,
-+ .data = ELFDATA2LSB,
-+ .machine = EM_ARM,
-+ .page_offset = PAGE_OFFSET,
-+};
-+
-+unsigned long phys_offset;
-+
-+/**
-+ * crash_range_callback() - callback called for each iomem region
-+ * @data: not used
-+ * @nr: not used
-+ * @str: name of the memory region
-+ * @base: start address of the memory region
-+ * @length: size of the memory region
-+ *
-+ * This function is called once for each memory region found in /proc/iomem. It
-+ * locates system RAM and crashkernel reserved memory and places these to
-+ * variables: @crash_memory_ranges and @crash_reserved_mem. Number of memory
-+ * regions is placed in @crash_memory_nr_ranges.
-+ */
-+static int crash_range_callback(void *UNUSED(data), int UNUSED(nr),
-+ char *str, unsigned long base,
-+ unsigned long length)
-+{
-+ struct memory_range *range;
-+
-+ if (usablemem_rgns.size >= CRASH_MAX_MEMORY_RANGES)
-+ return 1;
-+
-+ range = usablemem_rgns.ranges + usablemem_rgns.size;
-+
-+ if (strncmp(str, "System RAM\n", 11) == 0) {
-+ range->start = base;
-+ range->end = base + length - 1;
-+ range->type = RANGE_RAM;
-+ usablemem_rgns.size++;
-+ } else if (strncmp(str, "Crash kernel\n", 13) == 0) {
-+ crash_reserved_mem.start = base;
-+ crash_reserved_mem.end = base + length - 1;
-+ crash_reserved_mem.type = RANGE_RAM;
-+ }
-+
-+ return 0;
-+}
-+
-+/**
-+ * crash_exclude_range() - excludes memory region reserved for crashkernel
-+ *
-+ * Function locates where crashkernel reserved memory is and removes that region
-+ * from the available memory regions.
-+ */
-+static void crash_exclude_range(void)
-+{
-+ const struct memory_range *range = &crash_reserved_mem;
-+ int i;
-+
-+ for (i = 0; i < usablemem_rgns.size; i++) {
-+ struct memory_range *r = usablemem_rgns.ranges + i;
-+
-+ /*
-+ * We assume that crash area is fully contained in
-+ * some larger memory area.
-+ */
-+ if (r->start <= range->start && r->end >= range->end) {
-+ struct memory_range *new;
-+ /*
-+ * Let's split this area into 2 smaller ones and
-+ * remove excluded range from between. First create
-+ * new entry for the remaining area.
-+ */
-+ new = usablemem_rgns.ranges + usablemem_rgns.size;
-+ new->start = range->end + 1;
-+ new->end = r->end;
-+ usablemem_rgns.size++;
-+ /*
-+ * Next update this area to end before excluded range.
-+ */
-+ r->end = range->start - 1;
-+ break;
-+ }
-+ }
-+}
-+
-+static int range_cmp(const void *a1, const void *a2)
-+{
-+ const struct memory_range *r1 = a1;
-+ const struct memory_range *r2 = a2;
-+
-+ if (r1->start > r2->start)
-+ return 1;
-+ if (r1->start < r2->start)
-+ return -1;
-+
-+ return 0;
-+}
-+
-+/**
-+ * crash_get_memory_ranges() - read system physical memory
-+ *
-+ * Function reads through system physical memory and stores found memory regions
-+ * in @crash_memory_ranges. Number of memory regions found is placed in
-+ * @crash_memory_nr_ranges. Regions are sorted in ascending order.
-+ *
-+ * Returns %0 in case of success and %-1 otherwise (errno is set).
-+ */
-+static int crash_get_memory_ranges(void)
-+{
-+ /*
-+ * First read all memory regions that can be considered as
-+ * system memory including the crash area.
-+ */
-+ kexec_iomem_for_each_line(NULL, crash_range_callback, NULL);
-+
-+ if (usablemem_rgns.size < 1) {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ /*
-+ * Exclude memory reserved for crashkernel (this may result a split memory
-+ * region).
-+ */
-+ crash_exclude_range();
-+
-+ /*
-+ * Make sure that the memory regions are sorted.
-+ */
-+ qsort(usablemem_rgns.ranges, usablemem_rgns.size,
-+ sizeof(*usablemem_rgns.ranges), range_cmp);
-+
-+ return 0;
-+}
-+
-+/**
-+ * cmdline_add_elfcorehdr() - adds elfcorehdr= to @cmdline
-+ * @cmdline: buffer where parameter is placed
-+ * @elfcorehdr: physical address of elfcorehdr
-+ *
-+ * Function appends 'elfcorehdr=start' at the end of the command line given in
-+ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
-+ * (inclunding %NUL).
-+ */
-+static void cmdline_add_elfcorehdr(char *cmdline, unsigned long elfcorehdr)
-+{
-+ char buf[COMMAND_LINE_SIZE];
-+ int buflen;
-+
-+ buflen = snprintf(buf, sizeof(buf), "%s elfcorehdr=%#lx",
-+ cmdline, elfcorehdr);
-+ if (buflen < 0)
-+ die("Failed to construct elfcorehdr= command line parameter\n");
-+ if (buflen >= sizeof(buf))
-+ die("Command line overflow\n");
-+
-+ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
-+ cmdline[COMMAND_LINE_SIZE - 1] = '\0';
-+}
-+
-+/**
-+ * cmdline_add_mem() - adds mem= parameter to kernel command line
-+ * @cmdline: buffer where parameter is placed
-+ * @size: size of the kernel reserved memory (in bytes)
-+ *
-+ * This function appends 'mem=size' at the end of the command line given in
-+ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
-+ * (including %NUL).
-+ */
-+static void cmdline_add_mem(char *cmdline, unsigned long size)
-+{
-+ char buf[COMMAND_LINE_SIZE];
-+ int buflen;
-+
-+ buflen = snprintf(buf, sizeof(buf), "%s mem=%ldK", cmdline, size >> 10);
-+ if (buflen < 0)
-+ die("Failed to construct mem= command line parameter\n");
-+ if (buflen >= sizeof(buf))
-+ die("Command line overflow\n");
-+
-+ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
-+ cmdline[COMMAND_LINE_SIZE - 1] = '\0';
-+}
-+
-+static unsigned long long range_size(const struct memory_range *r)
-+{
-+ return r->end - r->start + 1;
-+}
-+
-+static void dump_memory_ranges(void)
-+{
-+ int i;
-+
-+ if (!kexec_debug)
-+ return;
-+
-+ dbgprintf("crashkernel: [%#llx - %#llx] (%ldM)\n",
-+ crash_reserved_mem.start, crash_reserved_mem.end,
-+ (unsigned long)range_size(&crash_reserved_mem) >> 20);
-+
-+ for (i = 0; i < usablemem_rgns.size; i++) {
-+ struct memory_range *r = usablemem_rgns.ranges + i;
-+ dbgprintf("memory range: [%#llx - %#llx] (%ldM)\n",
-+ r->start, r->end, (unsigned long)range_size(r) >> 20);
-+ }
-+}
-+
-+/**
-+ * load_crashdump_segments() - loads additional segments needed for kdump
-+ * @info: kexec info structure
-+ * @mod_cmdline: kernel command line
-+ *
-+ * This function loads additional segments which are needed for the dump capture
-+ * kernel. It also updates kernel command line passed in @mod_cmdline to have
-+ * right parameters for the dump capture kernel.
-+ *
-+ * Return %0 in case of success and %-1 in case of error.
-+ */
-+int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
-+{
-+ unsigned long elfcorehdr;
-+ unsigned long bufsz;
-+ void *buf;
-+ int err;
-+
-+ /*
-+ * First fetch all the memory (RAM) ranges that we are going to pass to
-+ * the crashdump kernel during panic.
-+ */
-+ err = crash_get_memory_ranges();
-+ if (err)
-+ return err;
-+
-+ /*
-+ * Now that we have memory regions sorted, we can use first memory
-+ * region as PHYS_OFFSET.
-+ */
-+ phys_offset = usablemem_rgns.ranges->start;
-+ dbgprintf("phys_offset: %#lx\n", phys_offset);
-+
-+ err = crash_create_elf32_headers(info, &elf_info,
-+ usablemem_rgns.ranges,
-+ usablemem_rgns.size, &buf, &bufsz,
-+ ELF_CORE_HEADER_ALIGN);
-+ if (err)
-+ return err;
-+
-+ /*
-+ * We allocate ELF core header from the end of the memory area reserved
-+ * for the crashkernel. We align the header to SECTION_SIZE (which is
-+ * 1MB) so that available memory passed in kernel command line will be
-+ * aligned to 1MB. This is because kernel create_mapping() wants memory
-+ * regions to be aligned to SECTION_SIZE.
-+ */
-+ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
-+ crash_reserved_mem.start,
-+ crash_reserved_mem.end, -1, 0);
-+
-+ dbgprintf("elfcorehdr: %#lx\n", elfcorehdr);
-+ cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
-+
-+ /*
-+ * Add 'mem=size' parameter to dump capture kernel command line. This
-+ * prevents the dump capture kernel from using any other memory regions
-+ * which belong to the primary kernel.
-+ */
-+ cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start);
-+
-+ dump_memory_ranges();
-+ dbgprintf("kernel command line: \"%s\"\n", mod_cmdline);
-+
-+ return 0;
-+}
-+
-+#endif
-+
-Index: kexec-tools-2.0.10/kexec/arch/arm64/include/arch/options.h
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/include/arch/options.h
-@@ -0,0 +1,26 @@
-+#ifndef KEXEC_ARCH_ARM64_OPTIONS_H
-+#define KEXEC_ARCH_ARM64_OPTIONS_H
-+
-+//#define OPT_ARCH_MAX ((OPT_MAX)+0)
-+
-+#define OPT_APPEND ((OPT_MAX)+0)
-+#define OPT_RAMDISK ((OPT_MAX)+1)
-+#define OPT_DTB ((OPT_MAX)+2)
-+
-+#define OPT_ARCH_MAX ((OPT_MAX)+3)
-+
-+
-+#define KEXEC_ARCH_OPTIONS \
-+ KEXEC_OPTIONS \
-+ { "append", 1, NULL, OPT_APPEND }, \
-+ { "command-line", 1, NULL, OPT_APPEND }, \
-+ { "dtb", 1, NULL, OPT_DTB }, \
-+ { "initrd", 1, NULL, OPT_RAMDISK }, \
-+ { "ramdisk", 1, NULL, OPT_RAMDISK }, \
-+
-+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR /* Only accept long arch options. */
-+
-+#define KEXEC_ALL_OPTIONS KEXEC_ARCH_OPTIONS
-+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR
-+
-+#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.c
-@@ -0,0 +1,177 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <errno.h>
-+#include <stddef.h>
-+
-+//#include <linux/kexec.h>
-+
-+#include "../../kexec.h"
-+#include "../../kexec-syscall.h"
-+#include "kexec-arm64.h"
-+
-+
-+void arch_usage(void)
-+{
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+
-+ printf(
-+" --append=STRING Set the kernel command line to STRING.\n"
-+" --command-line=STRING Set the kernel command line to STRING.\n"
-+" --dtb=FILE Use FILE as the device tree blob.\n"
-+" --initrd=FILE Use FILE as the kernel initial ramdisk.\n"
-+" --ramdisk=FILE Use FILE as the kernel initial ramdisk.\n");
-+
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-+
-+int arch_process_options(int UNUSED(argc), char **UNUSED(argv))
-+{
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+ return 0;
-+}
-+
-+const struct arch_map_entry arches[] = {
-+ { "aarch64", KEXEC_ARCH_ARM64 },
-+ { NULL, 0 },
-+};
-+
-+void arch_update_purgatory(struct kexec_info *UNUSED(info))
-+{
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+}
-+
-+unsigned long virt_to_phys(unsigned long addr)
-+{
-+ fprintf(stderr, "%s:%d: %016lx -> %016lx\n", __func__, __LINE__, addr,
-+ addr + 0x080000000UL);
-+ return addr + 0x080000000UL;
-+}
-+
-+void add_segment(struct kexec_info *info, const void *buf, size_t bufsz,
-+ unsigned long base, size_t memsz)
-+{
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+ add_segment_phys_virt(info, buf, bufsz, base, memsz, 1);
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-+
-+static int get_memory_ranges_1(struct memory_range **range, int *ranges,
-+ unsigned long kexec_flags)
-+{
-+ static struct memory_range memory_range[KEXEC_SEGMENT_MAX];
-+ const char *iomem;
-+ int range_count = 0;
-+ char line[MAX_LINE];
-+ FILE *fp;
-+
-+ iomem = proc_iomem();
-+ fp = fopen(iomem, "r");
-+
-+ if (!fp) {
-+ fprintf(stderr, "Cannot open %s: %s\n",
-+ iomem, strerror(errno));
-+ return -1;
-+ }
-+
-+ dbgprintf("memory ranges:\n");
-+
-+ while(fgets(line, sizeof(line), fp) != 0) {
-+ struct memory_range r;
-+ char *str;
-+ int consumed;
-+
-+ if (range_count >= KEXEC_SEGMENT_MAX)
-+ break;
-+
-+ if (sscanf(line, "%Lx-%Lx : %n", &r.start, &r.end, &consumed)
-+ != 2)
-+ continue;
-+
-+ str = line + consumed;
-+ r.end++;
-+
-+ if (memcmp(str, "System RAM\n", 11)) {
-+ dbgprintf(" Skip: %016Lx - %016Lx : %s", r.start, r.end,
-+ str);
-+ continue;
-+ }
-+
-+ r.type = RANGE_RAM;
-+ memory_range[range_count] = r;
-+ range_count++;
-+
-+ dbgprintf(" Add: %016Lx - %016Lx : %s", r.start, r.end, str);
-+ }
-+
-+ fclose(fp);
-+ *range = memory_range;
-+ *ranges = range_count;
-+
-+ return 0;
-+}
-+
-+static int get_memory_ranges_2(struct memory_range **range, int *ranges,
-+ unsigned long UNUSED(kexec_flags))
-+{
-+ static struct memory_range memory_range[2];
-+
-+ memory_range[0].start = 0x080000000;
-+ memory_range[0].end = 0x100000000;
-+ memory_range[0].type = RANGE_RAM;
-+
-+ memory_range[1].start = 0x900000000;
-+ memory_range[1].end = 0x880000000;
-+ memory_range[1].type = RANGE_RAM;
-+
-+ *range = memory_range;
-+ *ranges = sizeof(memory_range) / sizeof(memory_range[0]);
-+
-+ return 0;
-+}
-+
-+int get_memory_ranges(struct memory_range **range, int *ranges,
-+ unsigned long kexec_flags)
-+{
-+ /* FIXME: Should get this info from device tree. */
-+
-+ return get_memory_ranges_1(range, ranges, kexec_flags);
-+}
-+
-+struct file_type file_type[] = {
-+ { "elf-arm64", elf_arm64_probe, elf_arm64_load, elf_arm64_usage },
-+};
-+
-+int file_types = sizeof(file_type) / sizeof(file_type[0]);
-+
-+int arch_compat_trampoline(struct kexec_info *info)
-+{
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+ return 0;
-+}
-+
-+void arch_reuse_initrd(void)
-+{
-+}
-+
-+int machine_verify_elf_rel(struct mem_ehdr *ehdr)
-+{
-+ (void)ehdr;
-+
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+ return 0;
-+}
-+
-+void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
-+ void *location, unsigned long address, unsigned long value)
-+{
-+ (void)ehdr;
-+ (void)r_type;
-+ (void)location;
-+ (void)address;
-+ (void)value;
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+}
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.h
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.h
-@@ -0,0 +1,20 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#if !defined(KEXEC_ARM64_H)
-+#define KEXEC_ARM64_H
-+
-+/* #include <linux/kexec.h> FIXME: this is broken */
-+#include <sys/types.h>
-+
-+#include "../../kexec.h"
-+
-+#define KEXEC_SEGMENT_MAX 16 /* FIXME: this should come from <linux/kexec.h> */
-+
-+int elf_arm64_probe(const char *buf, off_t len);
-+int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
-+ struct kexec_info *info);
-+void elf_arm64_usage(void);
-+
-+#endif
-\ No newline at end of file
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-elf-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -0,0 +1,114 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <elf.h>
-+#include <getopt.h>
-+
-+#include "../../kexec-syscall.h"
-+
-+#include "kexec-arm64.h"
-+#include "arch/options.h"
-+
-+#if !defined(EM_AARCH64)
-+# define EM_AARCH64 183
-+#endif
-+
-+int elf_arm64_probe(const char *buf, off_t len)
-+{
-+ int result;
-+ struct mem_ehdr ehdr;
-+
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+
-+ result = build_elf_exec_info(buf, len, &ehdr, 0);
-+
-+ if (result < 0) {
-+ dbgprintf("Not an ELF executable\n");
-+ goto out;
-+ }
-+
-+ if (ehdr.e_machine != EM_AARCH64) {
-+ dbgprintf("Not an AARCH64 executable\n");
-+ result = -1;
-+ goto out;
-+ }
-+
-+ result = 0;
-+
-+out:
-+ free_elf_info(&ehdr);
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+ return result;
-+}
-+
-+int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
-+ struct kexec_info *info)
-+{
-+ static const struct option options[] = {
-+ KEXEC_ARCH_OPTIONS
-+ { 0 }
-+ };
-+ static const char short_options[] = KEXEC_OPT_STR "";
-+ const char *command_line = NULL;
-+ unsigned int command_line_len = 0;
-+ const char *ramdisk = NULL;
-+ const char *dtb = NULL;
-+ int opt;
-+ struct mem_ehdr ehdr;
-+ int result;
-+
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+
-+ while ((opt = getopt_long(argc, argv, short_options, options, 0))
-+ != -1) {
-+ switch (opt) {
-+ default:
-+ if (opt < OPT_MAX) /* Ignore core options */
-+ break;
-+ case OPT_APPEND:
-+ command_line = optarg;
-+ command_line_len = strlen(command_line) + 1;
-+ break;
-+ case OPT_RAMDISK:
-+ ramdisk = optarg;
-+ break;
-+ case OPT_DTB:
-+ dtb = optarg;
-+ break;
-+ }
-+ }
-+
-+ fprintf(stderr, "%s:%d: command_line: %s\n", __func__, __LINE__, command_line);
-+ fprintf(stderr, "%s:%d: ramdisk: %s\n", __func__, __LINE__, ramdisk);
-+ fprintf(stderr, "%s:%d: dtb: %s\n", __func__, __LINE__, dtb);
-+
-+ if (info->kexec_flags & KEXEC_ON_CRASH) {
-+ fprintf(stderr, "kexec: kdump not yet supported on arm64\n");
-+ return -1;
-+ }
-+
-+ result = build_elf_exec_info(buf, len, &ehdr, 0);
-+
-+ if (result < 0) {
-+ free_elf_info(&ehdr);
-+ fprintf(stderr, "%s:%d: free_elf_info failed\n", __func__,
-+ __LINE__);
-+ return result;
-+ }
-+
-+ elf_exec_build_load(info, &ehdr, buf, len, 0);
-+
-+ info->entry = (void*)0x80080000UL; // FIXME
-+
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+ return 0;
-+}
-+
-+void elf_arm64_usage(void)
-+{
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-Index: kexec-tools-2.0.10/kexec/kexec-syscall.h
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/kexec-syscall.h
-+++ kexec-tools-2.0.10/kexec/kexec-syscall.h
-@@ -39,8 +39,8 @@
- #ifdef __s390__
- #define __NR_kexec_load 277
- #endif
--#ifdef __arm__
--#define __NR_kexec_load __NR_SYSCALL_BASE + 347
-+#if defined(__arm__) || defined(__arm64__)
-+#define __NR_kexec_load __NR_SYSCALL_BASE + 347
- #endif
- #if defined(__mips__)
- #define __NR_kexec_load 4311
-@@ -108,6 +108,8 @@ static inline long kexec_file_load(int k
- #define KEXEC_ARCH_PPC64 (21 << 16)
- #define KEXEC_ARCH_IA_64 (50 << 16)
- #define KEXEC_ARCH_ARM (40 << 16)
-+#define KEXEC_ARCH_ARM64 (183 << 16)
-+/* #define KEXEC_ARCH_AARCH64 (183 << 16) */
- #define KEXEC_ARCH_S390 (22 << 16)
- #define KEXEC_ARCH_SH (42 << 16)
- #define KEXEC_ARCH_MIPS_LE (10 << 16)
-@@ -153,5 +155,8 @@ static inline long kexec_file_load(int k
- #ifdef __m68k__
- #define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K
- #endif
-+#if defined(__arm64__)
-+#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64
-+#endif
-
- #endif /* KEXEC_SYSCALL_H */
-Index: kexec-tools-2.0.10/kexec/kexec.c
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/kexec.c
-+++ kexec-tools-2.0.10/kexec/kexec.c
-@@ -664,6 +664,8 @@ static int my_load(const char *type, int
- memset(&info, 0, sizeof(info));
- info.kexec_flags = kexec_flags;
-
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+
- result = 0;
- if (argc - fileind <= 0) {
- fprintf(stderr, "No kernel specified\n");
-Index: kexec-tools-2.0.10/purgatory/arch/arm64/Makefile
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/purgatory/arch/arm64/Makefile
-@@ -0,0 +1,7 @@
-+#
-+# Purgatory arm64
-+#
-+
-+arm64_PURGATORY_SRCS =
-+
-+dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS)
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch
deleted file mode 100644
index 26d18eb6fe..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-x86_64: Add support to build kexec-tools with x32 ABI
-
-Summary of changes,
-
-configure.ac: Add test for detect x32 ABI.
-purgatory/arch/x86_64/Makefile: Not use mcmodel large when
- x32 ABI is set.
-kexec/arch/x86_64/kexec-elf-rel-x86_64.c: When x32 ABI is set
- use ELFCLASS32 instead of ELFCLASS64.
-kexec/kexec-syscall.h: Add correct syscall number for x32 ABI.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
-
----
- configure.ac | 9 +++++++++
- kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 4 ++++
- kexec/kexec-syscall.h | 4 ++++
- purgatory/arch/x86_64/Makefile | 4 +++-
- 4 files changed, 20 insertions(+), 1 deletion(-)
-
-Index: kexec-tools-2.0.10/configure.ac
-===================================================================
---- kexec-tools-2.0.10.orig/configure.ac
-+++ kexec-tools-2.0.10/configure.ac
-@@ -56,6 +56,15 @@ case $target_cpu in
- ;;
- ia64|x86_64|alpha|m68k )
- ARCH="$target_cpu"
-+
-+ dnl ---Test for x32 ABI in x86_64
-+ if test "x$ARCH" = "xx86_64" ; then
-+ AC_EGREP_CPP(x32_test,
-+ [#if defined(__x86_64__) && defined (__ILP32__)
-+ x32_test
-+ #endif
-+ ], SUBARCH='x32', SUBARCH='64')
-+ fi
- ;;
- * )
- AC_MSG_ERROR([unsupported architecture $target_cpu])
-Index: kexec-tools-2.0.10/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
-+++ kexec-tools-2.0.10/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
-@@ -8,7 +8,11 @@ int machine_verify_elf_rel(struct mem_eh
- if (ehdr->ei_data != ELFDATA2LSB) {
- return 0;
- }
-+#ifdef __ILP32__
-+ if (ehdr->ei_class != ELFCLASS32) {
-+#else
- if (ehdr->ei_class != ELFCLASS64) {
-+#endif
- return 0;
- }
- if (ehdr->e_machine != EM_X86_64) {
-Index: kexec-tools-2.0.10/kexec/kexec-syscall.h
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/kexec-syscall.h
-+++ kexec-tools-2.0.10/kexec/kexec-syscall.h
-@@ -31,8 +31,12 @@
- #define __NR_kexec_load 268
- #endif
- #ifdef __x86_64__
-+#ifdef __ILP32__
-+#define __NR_kexec_load 528
-+#else
- #define __NR_kexec_load 246
- #endif
-+#endif
- #ifdef __s390x__
- #define __NR_kexec_load 277
- #endif
-Index: kexec-tools-2.0.10/purgatory/arch/x86_64/Makefile
-===================================================================
---- kexec-tools-2.0.10.orig/purgatory/arch/x86_64/Makefile
-+++ kexec-tools-2.0.10/purgatory/arch/x86_64/Makefile
-@@ -23,4 +23,6 @@ x86_64_PURGATORY_SRCS += purgatory/arch/
- x86_64_PURGATORY_SRCS += purgatory/arch/i386/vga.c
- x86_64_PURGATORY_SRCS += purgatory/arch/i386/pic.c
-
--x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
-+ifeq ($(SUBARCH),64)
-+ x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
-+endif
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
deleted file mode 100644
index 59376c804a..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-require kexec-tools.inc
-export LDFLAGS = "-L${STAGING_LIBDIR}"
-EXTRA_OECONF = " --with-zlib=yes"
-
-SRC_URI += " \
- file://kexec-aarch64.patch \
- file://kexec-x32.patch \
- file://0002-powerpc-change-the-memory-size-limit.patch \
- file://0001-purgatory-Pass-r-directly-to-linker.patch \
- file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
- "
-
-SRC_URI[md5sum] = "10ddaae0e86af54407b164a1f5a39cc3"
-SRC_URI[sha256sum] = "cc7b60dad0da202004048a6179d8a53606943062dd627a2edba45a8ea3a85135"
-
-PACKAGES =+ "kexec kdump vmcore-dmesg"
-
-ALLOW_EMPTY_${PN} = "1"
-RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
-
-FILES_kexec = "${sbindir}/kexec"
-FILES_kdump = "${sbindir}/kdump ${sysconfdir}/init.d/kdump \
- ${sysconfdir}/sysconfig/kdump.conf"
-FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
-
-inherit update-rc.d
-
-INITSCRIPT_PACKAGES = "kdump"
-INITSCRIPT_NAME_kdump = "kdump"
-INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
-
-do_install_append () {
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
- install -d ${D}${sysconfdir}/sysconfig
- install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
-}
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
new file mode 100644
index 0000000000..c3f74359f1
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
@@ -0,0 +1,88 @@
+
+SUMMARY = "Kexec fast reboot tools"
+DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
+AUTHOR = "Eric Biederman"
+HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
+SECTION = "kernel/userland"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
+ file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
+DEPENDS = "zlib xz"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
+ file://kdump \
+ file://kdump.conf \
+ file://kdump.service \
+ file://0001-powerpc-change-the-memory-size-limit.patch \
+ file://0002-purgatory-Pass-r-directly-to-linker.patch \
+ file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
+ file://0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch \
+ file://0005-Disable-PIE-during-link.patch \
+ file://0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch \
+"
+
+SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"
+SRC_URI[sha256sum] = "913c8dee918e5855a4ba60d609371390978144b4c8d15d6446ca0057b7bc5e58"
+
+inherit autotools update-rc.d systemd
+
+export LDFLAGS = "-L${STAGING_LIBDIR}"
+EXTRA_OECONF = " --with-zlib=yes"
+
+do_compile_prepend() {
+ # Remove the prepackaged config.h from the source tree as it overrides
+ # the same file generated by configure and placed in the build tree
+ rm -f ${S}/include/config.h
+
+ # Remove the '*.d' file to make sure the recompile is OK
+ for dep in `find ${B} -type f -name '*.d'`; do
+ dep_no_d="`echo $dep | sed 's#.d$##'`"
+ # Remove file.d when there is a file.o
+ if [ -f "$dep_no_d.o" ]; then
+ rm -f $dep
+ fi
+ done
+}
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/sysconfig
+ install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper
+ install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service
+ sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service
+ fi
+}
+
+PACKAGES =+ "kexec kdump vmcore-dmesg"
+
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
+
+FILES_kexec = "${sbindir}/kexec"
+FILES_kdump = "${sbindir}/kdump \
+ ${sysconfdir}/sysconfig/kdump.conf \
+ ${sysconfdir}/init.d/kdump \
+ ${libexecdir}/kdump-helper \
+ ${systemd_unitdir}/system/kdump.service \
+"
+
+FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
+
+INITSCRIPT_PACKAGES = "kdump"
+INITSCRIPT_NAME_kdump = "kdump"
+INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
+
+SYSTEMD_PACKAGES = "kdump"
+SYSTEMD_SERVICE_kdump = "kdump.service"
+
+SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
+
+INSANE_SKIP_${PN} = "arch"
diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 5c7dd52f54..9a172675af 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -1,6 +1,5 @@
SUMMARY = "Wrapper script for the Linux kernel module dependency indexer"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
S = "${WORKDIR}"
@@ -10,6 +9,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
# We need the following for the sstate code to process the wrapper
SSTATE_SCAN_FILES += "depmodwrapper"
+EXTRA_STAGING_FIXMES += "PKGDATA_DIR"
+
+DEPENDS += "kmod-native"
+do_populate_sysroot[depends] = ""
do_install() {
install -d ${D}${bindir_crossscripts}/
@@ -21,17 +24,13 @@ if [ "\$1" != "-a" -o "\$2" != "-b" ]; then
echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2
exit 1
fi
-if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then
- echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2
-else
- kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion)
- if [ "\$kernelabi" != "\$4" ]; then
- echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2
- exit 1
- fi
+
+kernelabi=""
+if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; then
+ kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion")
fi
-if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then
echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
exec env depmod "\$1" "\$2" "\$3" "\$4"
else
@@ -43,4 +42,5 @@ EOF
SYSROOT_DIRS += "${bindir_crossscripts}"
+PACKAGES = ""
inherit nopackages
diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb
index f0e274ed79..f61134bbaf 100644
--- a/meta/recipes-kernel/kmod/kmod-native_git.bb
+++ b/meta/recipes-kernel/kmod/kmod-native_git.bb
@@ -7,9 +7,6 @@ DEPENDS += "zlib-native"
inherit native
-SRC_URI += "file://Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch \
- "
-
do_install_append (){
for tool in depmod insmod lsmod modinfo modprobe rmmod
do
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index 166b3f02f8..334453838e 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -12,30 +12,25 @@ SECTION = "base"
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
-inherit autotools gtk-doc pkgconfig
+inherit autotools gtk-doc pkgconfig manpages
-SRCREV = "65a885df5f6f15222b44fd695c5eaca17e837a14"
+SRCREV = "58133a96c894c043e48c74ddf0bfe8db90bac62f"
# Lookout for PV bump too when SRCREV is changed
-PV = "23+git${SRCPV}"
+PV = "26"
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
+ file://0001-build-Stop-using-dolt.patch \
file://avoid_parallel_tests.patch \
- file://fix-O_CLOEXEC.patch \
"
S = "${WORKDIR}/git"
EXTRA_AUTORECONF += "--install --symlink"
-EXTRA_OECONF +=" --enable-tools --disable-manpages --with-zlib"
+EXTRA_OECONF +=" --enable-tools --with-zlib"
PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
+PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
-do_configure_prepend () {
- gtkdocize --docdir ${S}/libkmod/docs --srcdir ${S}
-}
-
-do_configure_append () {
- sed -i 's#}libtool#}${TARGET_SYS}-libtool#' ${B}/doltlibtool
-}
+GTKDOC_DOCDIR = "${S}/libkmod/docs"
diff --git a/meta/recipes-kernel/kmod/kmod/0001-build-Stop-using-dolt.patch b/meta/recipes-kernel/kmod/kmod/0001-build-Stop-using-dolt.patch
new file mode 100644
index 0000000000..c915ad5e8a
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/0001-build-Stop-using-dolt.patch
@@ -0,0 +1,28 @@
+From f8b8d7b330433511d19a936ddfc7b7d1af5490b5 Mon Sep 17 00:00:00 2001
+From: Adrian Bunk <bunk@kernel.org>
+Date: Wed, 20 Feb 2019 14:22:04 +0200
+Subject: build: Stop using dolt
+
+This does regress "make -12" from 0.7s to 0.9s on my
+Coffee Lake machine, but even on slower hardware this
+will not amount to a noticable slowdown.
+
+On the other hand using dolt can create problems for
+people doing cross-compilation, e.g. Yocto has two
+hacks just for dolt in kmod:
+https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/kmod/kmod.inc?id=a17abae00785c76cfffe5381a22fb2c86b982e82
+
+Signed-off-by: Adrian Bunk <bunk@kernel.org>
+Upstream-Status: Backport
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,7 +17,6 @@ AM_MAINTAINER_MODE([enable])
+ AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests])
+ AM_SILENT_RULES([yes])
+ LT_INIT([disable-static pic-only])
+-DOLT
+
+ AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])])
+ AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by kmod])])
+
diff --git a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
deleted file mode 100644
index b722183b68..0000000000
--- a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Subject: Change to calling bswap_* instead of htobe* and be*toh
-
-We can't use htobe* and be*toh functions because they are not
-available on older versions of glibc, For example, shipped on Centos 5.5.
-
-Change to directly calling bswap_* as defined in+byteswap.h.
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Ting Liu <b28495@freescale.com>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libkmod/libkmod-signature.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
-index 6fc06fc..912185a 100644
---- a/libkmod/libkmod-signature.c
-+++ b/libkmod/libkmod-signature.c
-@@ -18,6 +18,7 @@
- */
-
- #include <endian.h>
-+#include <byteswap.h>
- #include <inttypes.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -127,7 +128,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat
- modsig->hash >= PKEY_HASH__LAST ||
- modsig->id_type >= PKEY_ID_TYPE__LAST)
- return false;
-- sig_len = be32toh(get_unaligned(&modsig->sig_len));
-+ sig_len = bswap_32(get_unaligned(&modsig->sig_len));
- if (sig_len == 0 ||
- size < (int64_t)(modsig->signer_len + modsig->key_id_len + sig_len))
- return false;
---
-1.9.1
-
diff --git a/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch b/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
index feafcb9b7c..04a8204815 100644
--- a/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
+++ b/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
@@ -1,3 +1,8 @@
+From be6f82c54f694617c646ca1f8b5bcf93694e20ad Mon Sep 17 00:00:00 2001
+From: Tudor Florea <tudor.florea@enea.com>
+Date: Fri, 6 Sep 2013 21:11:57 +0000
+Subject: [PATCH] kmod: avoid parallel-tests
+
Avoid parallel-tests as it remove
buildtest-TESTS and runtest-TESTS targets required by ptest.
In automake 1.13.4 parallel-tests is assumed by defauls.
@@ -5,17 +10,17 @@ In order to have buildtest-TESTS and runtest-TESTS targets
serial-tests is now required
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Inappropriate (disable feature incompatible with ptest)
+Upstream-Status: Inappropriate (disable feature incompatible with ptest)
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index eb0f9d1..a539968 100644
+index ee72283..60980c0 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -14,7 +14,7 @@ AC_USE_SYSTEM_EXTENSIONS
+@@ -14,8 +14,8 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr])
AM_MAINTAINER_MODE([enable])
@@ -23,7 +28,5 @@ index eb0f9d1..a539968 100644
+AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests serial-tests])
AM_SILENT_RULES([yes])
LT_INIT([disable-static pic-only])
-
---
-1.9.1
+ AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])])
diff --git a/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch b/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch
deleted file mode 100644
index 8161d6128d..0000000000
--- a/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From bd43367eee868059770188fd9e9db38520dc6fff Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 22 Jan 2014 01:06:40 -0500
-Subject: [PATCH] libkmod/libkmod-internal.h: check whether O_CLOEXEC is
- defined or not
-
-O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have
-it, we need check before use.
-
-This patch is much more like a workaround, since it may need fcntl() use
-FD_CLOEXEC to replace.
-
-This problem was reported by "Ting Liu <b28495@freescale.com>"
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Pending
----
- libkmod/libkmod-internal.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h
-index 0180124..100b40f 100644
---- a/libkmod/libkmod-internal.h
-+++ b/libkmod/libkmod-internal.h
-@@ -9,6 +9,10 @@
- #include "macro.h"
- #include "libkmod.h"
-
-+#ifndef O_CLOEXEC
-+#define O_CLOEXEC 0
-+#endif
-+
- static _always_inline_ _printf_format_(2, 3) void
- kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {}
-
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb
index 69185b2453..bd21d2ff73 100644
--- a/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/meta/recipes-kernel/kmod/kmod_git.bb
@@ -13,9 +13,7 @@ RREPLACES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod mod
RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
# autotools set prefix to /usr, however we want them in /bin and /sbin
-bindir = "${base_bindir}"
-sbindir = "${base_sbindir}"
-# libdir = "${base_libdir}"
+EXTRA_OECONF += " --bindir=${base_bindir} --sbindir=${base_sbindir}"
do_install_append () {
install -dm755 ${D}${base_bindir}
@@ -41,7 +39,7 @@ do_compile_prepend() {
inherit update-alternatives bash-completion
-ALTERNATIVE_PRIORITY = "60"
+ALTERNATIVE_PRIORITY = "70"
ALTERNATIVE_kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod"
diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
deleted file mode 100644
index b248133460..0000000000
--- a/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From db112739dc4f608a968b8104b382955dc3d96ca3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 07:40:10 +0000
-Subject: [PATCH] Rectify the function signatures to fix prototype mismatches
-
-clang is less forgiving when it comes to coding standards, correct the
-function signatures to reflect the function logic
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- fsync.c | 7 ++++---
- latencytop.h | 2 +-
- 2 files changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/fsync.c b/fsync.c
-index 82dff0e..5cefba9 100644
---- a/fsync.c
-+++ b/fsync.c
-@@ -51,7 +51,7 @@ struct fsync_files {
- static GList *fsync_data;
-
-
--static chain_file(struct fsync_process *proc, char *filename)
-+static void chain_file(struct fsync_process *proc, char *filename)
- {
- struct fsync_files *file;
- GList *item;
-@@ -75,7 +75,7 @@ static chain_file(struct fsync_process *proc, char *filename)
- proc->files = g_list_append(proc->files, file);
- }
-
--static report_file(char *process, char *file)
-+static void report_file(char *process, char *file)
- {
- struct fsync_process *proc;
- GList *item;
-@@ -157,9 +157,10 @@ int enable_fsync_tracer(void)
- write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
- write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
- write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
-+ return ret;
- }
-
--int disable_fsync_tracer(void)
-+void disable_fsync_tracer(void)
- {
- write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
- }
-diff --git a/latencytop.h b/latencytop.h
-index 5394d73..9d107a8 100644
---- a/latencytop.h
-+++ b/latencytop.h
-@@ -54,5 +54,5 @@ extern char *translate(char *line);
- extern void init_translations(char *filename);
- extern int fsync_display(int duration);
- extern int enable_fsync_tracer(void);
--extern int disable_fsync_tracer(void);
-+extern void disable_fsync_tracer(void);
- extern void update_list(void);
---
-2.5.1
-
diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
deleted file mode 100644
index 7848ccf2ae..0000000000
--- a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-linux: sysfs: use tracing_on as tracing_enabled is deprecated
-
-tracing_enabled use in the kernel is being deprecated as per commit
-6752ab4a9c30 [tracing: Deprecate tracing_enabled for tracing_on] in
-the linux mainline kernel. tracing_enabled use will generate a warning
-and may no longer function as expected, therefore move to use tracing_on.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dennis Hall <dennis.hall@windriver.com>
-
-Index: latencytop-0.5/fsync.c
-===================================================================
---- latencytop-0.5.orig/fsync.c 2012-08-03 10:45:49.000000000 -0400
-+++ latencytop-0.5/fsync.c 2012-08-03 10:48:39.000000000 -0400
-@@ -149,19 +149,19 @@
- * cd /sys/kernel/debug/tracing
- * echo fsync > current_tracer
- * echo ftrace_printk > iter_ctrl
-- * echo 1 > tracing_enabled
-+ * echo 1 > tracing_on
- */
- ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
- if (!ret)
- return -1;
- write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
- write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
-- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
-+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
- }
-
- int disable_fsync_tracer(void)
- {
-- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
-+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
- }
-
-
-@@ -339,8 +339,8 @@
- if (curduration > 5)
- curduration = 5;
- /* clear the ftrace buffer */
-- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
-- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
-+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
-+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
- key = select(1, &rfds, NULL, NULL, &end);
- parse_ftrace();
- print_global_list();
diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
deleted file mode 100644
index af19b3772d..0000000000
--- a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff --git a/Makefile.orig b/Makefile
-index 16a2369..fa797a2 100644
---- a/Makefile.orig
-+++ b/Makefile
-@@ -1,10 +1,11 @@
--# FIXME: Use autoconf ?
--HAS_GTK_GUI = 1
-+# Upstream-Status: Inappropriate [configuration]
-+# Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
-
- DESTDIR =
- SBINDIR = /usr/sbin
- XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
--LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw
-+LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses $(LDFLAGS)
-+CC ?= gcc
-
- OBJS= latencytop.o text_display.o translate.o fsync.o
-
-@@ -26,16 +27,17 @@ endif
-
- # We write explicity this "implicit rule"
- %.o : %.c
-- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@
-+ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@
-
- latencytop: $(OBJS) latencytop.h Makefile
-- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop
-+ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop
-
- clean:
- rm -f *~ latencytop DEADJOE *.o
-
- install: latencytop
- mkdir -p $(DESTDIR)/usr/share/latencytop
-+ mkdir -p $(DESTDIR)/$(SBINDIR)
- install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans
- install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/
- install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/
diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
deleted file mode 100644
index f31f1bb7ab..0000000000
--- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Linux tool for measuring and fixing latency"
-HOMEPAGE = "http://www.latencytop.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa"
-
-DEPENDS = "virtual/libintl ncurses glib-2.0"
-
-PR = "r3"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \
- file://latencytop-makefile.patch \
- file://latencytop-fsync.patch \
- file://0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch \
-"
-
-SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
-SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-
-PACKAGECONFIG[x11] = ",,gtk+"
-
-EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}"
-
-#CFLAGS += "${LDFLAGS}"
-
-do_install() {
- oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X}
-}
diff --git a/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch b/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch
deleted file mode 100644
index d59a7f7d88..0000000000
--- a/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 272a8a069a8f5f06a1e5dfa0ef12f5f92984728b Mon Sep 17 00:00:00 2001
-From: Noor <noor_ahsan@mentor.com>
-Date: Wed, 12 Aug 2015 20:54:00 +0500
-Subject: [PATCH] Makefile: Add LDFLAGS variable to SLDFLAGS.
-
-* Add LDFLAGS variable to SLDFLAGS so that extra linker
- flags can be sent via this variable.
-
-Upstream-Status: Submitted [perfmon2-libpfm4-commits@lists.sourceforge.net]
-
-Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
----
- lib/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/Makefile b/lib/Makefile
-index 1cc8765..4bd92ef 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -187,7 +187,7 @@ CFLAGS += -DCONFIG_PFMLIB_CELL
- endif
-
- ifeq ($(SYS),Linux)
--SLDFLAGS=-shared -Wl,-soname -Wl,$(VLIBPFM)
-+SLDFLAGS=$(LDFLAGS) -shared -Wl,-soname -Wl,$(VLIBPFM)
- SLIBPFM=libpfm.so.$(VERSION).$(REVISION).$(AGE)
- VLIBPFM=libpfm.so.$(VERSION)
- SOLIBEXT=so
---
-1.7.9.5
-
diff --git a/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch b/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
deleted file mode 100644
index 25d47ef125..0000000000
--- a/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: Pending
-
-Fix compile error:
-
-| syst_count.c:346:3: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
-| for(c=cmin ; c < cmax; c++)
-| ^~~
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff --git a/perf_examples/syst_count.c b/perf_examples/syst_count.c
-index 0d53078..2dfb9b9 100644
---- a/perf_examples/syst_count.c
-+++ b/perf_examples/syst_count.c
-@@ -343,8 +343,9 @@ measure(void)
-
- for (delay = 1 ; delay <= options.delay; delay++) {
-
-- for(c=cmin ; c < cmax; c++)
-- start_cpu(c);
-+ for(c=cmin ; c < cmax; c++) {
-+ start_cpu(c);
-+ }
-
- if (0) {
- tv.tv_sec = 0;
-@@ -353,8 +354,9 @@ measure(void)
- } else
- sleep(1);
-
-- for(c=cmin ; c < cmax; c++)
-- stop_cpu(c);
-+ for(c=cmin ; c < cmax; c++) {
-+ stop_cpu(c);
-+ }
-
- for(c = cmin; c < cmax; c++) {
- printf("# %'ds -----\n", delay);
diff --git a/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb b/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
deleted file mode 100644
index 4136eac81f..0000000000
--- a/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Monitoring tools exploiting the performance monitoring events"
-DESCRIPTION = "This package provides a library, called libpfm4 which is used to develop \
-monitoring tools exploiting the performance monitoring events such as those \
-provided by the Performance Monitoring Unit (PMU) of modern processors."
-HOMEPAGE = "http://perfmon2.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=144822&atid=759953&source=navbar"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0de488f3bd4424e308e2e399cb99c788"
-
-SECTION = "devel"
-
-COMPATIBLE_HOST = "powerpc64"
-
-SRC_URI = "http://downloads.sourceforge.net/project/perfmon2/${BPN}/libpfm-${PV}.tar.gz \
- file://0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch \
- file://fix-misleading-indentation-error.patch \
- "
-
-SRC_URI[md5sum] = "5077b9022440e4951d96f2d0e73bd487"
-SRC_URI[sha256sum] = "5ab1e5b0472550f9037a8800834f6bc3b927690070f69fac0b67284b4b05fd5f"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/perfmon2/files/libpfm4/"
-
-EXTRA_OEMAKE = "DESTDIR=\"${D}\" PREFIX=\"${prefix}\" LIBDIR=\"${libdir}\" LDCONFIG=\"true\""
-EXTRA_OEMAKE_append_powerpc = " ARCH=\"powerpc\""
-EXTRA_OEMAKE_append_powerpc64 = " ARCH=\"powerpc\" BITMODE=\"64\""
-
-S = "${WORKDIR}/libpfm-${PV}"
-
-do_install () {
- oe_runmake install
-}
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20190815.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_20190815.bb
new file mode 100644
index 0000000000..d83000b64f
--- /dev/null
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20190815.bb
@@ -0,0 +1,943 @@
+SUMMARY = "Firmware files for use with Linux kernel"
+SECTION = "kernel"
+
+LICENSE = "\
+ Firmware-Abilis \
+ & Firmware-adsp_sst \
+ & Firmware-agere \
+ & Firmware-amdgpu \
+ & Firmware-amd-ucode \
+ & Firmware-amlogic_vdec \
+ & Firmware-atheros_firmware \
+ & Firmware-atmel \
+ & Firmware-broadcom_bcm43xx \
+ & Firmware-ca0132 \
+ & Firmware-cavium \
+ & Firmware-chelsio_firmware \
+ & Firmware-cw1200 \
+ & Firmware-cypress \
+ & Firmware-dib0700 \
+ & Firmware-e100 \
+ & Firmware-ene_firmware \
+ & Firmware-fw_sst_0f28 \
+ & Firmware-go7007 \
+ & Firmware-GPLv2 \
+ & Firmware-hfi1_firmware \
+ & Firmware-i2400m \
+ & Firmware-i915 \
+ & Firmware-ibt_firmware \
+ & Firmware-it913x \
+ & Firmware-iwlwifi_firmware \
+ & Firmware-IntcSST2 \
+ & Firmware-kaweth \
+ & Firmware-Marvell \
+ & Firmware-moxa \
+ & Firmware-myri10ge_firmware \
+ & Firmware-netronome \
+ & Firmware-nvidia \
+ & Firmware-OLPC \
+ & Firmware-ath9k-htc \
+ & Firmware-phanfw \
+ & Firmware-qat \
+ & Firmware-qcom \
+ & Firmware-qla1280 \
+ & Firmware-qla2xxx \
+ & Firmware-qualcommAthos_ar3k \
+ & Firmware-qualcommAthos_ath10k \
+ & Firmware-r8a779x_usb3 \
+ & Firmware-radeon \
+ & Firmware-ralink_a_mediatek_company_firmware \
+ & Firmware-ralink-firmware \
+ & Firmware-rtlwifi_firmware \
+ & Firmware-imx-sdma_firmware \
+ & Firmware-siano \
+ & Firmware-tda7706-firmware \
+ & Firmware-ti-connectivity \
+ & Firmware-ti-keystone \
+ & Firmware-ueagle-atm4-firmware \
+ & Firmware-via_vt6656 \
+ & Firmware-wl1251 \
+ & Firmware-xc4000 \
+ & Firmware-xc5000 \
+ & Firmware-xc5000c \
+ & WHENCE \
+"
+
+LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
+ file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \
+ file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
+ file://LICENSE.amdgpu;md5=ab515ef6495ab5c5a3b08ab2db62df11 \
+ file://LICENSE.amd-ucode;md5=3c5399dc9148d7f0e1f41e34b69cf14f \
+ file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \
+ file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
+ file://LICENSE.atmel;md5=aa74ac0c60595dee4d4e239107ea77a3 \
+ file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \
+ file://LICENCE.ca0132;md5=209b33e66ee5be0461f13d31da392198 \
+ file://LICENCE.cadence;md5=009f46816f6956cfb75ede13d3e1cee0 \
+ file://LICENCE.cavium;md5=c37aaffb1ebe5939b2580d073a95daea \
+ file://LICENCE.chelsio_firmware;md5=819aa8c3fa453f1b258ed8d168a9d903 \
+ file://LICENCE.cw1200;md5=f0f770864e7a8444a5c5aa9d12a3a7ed \
+ file://LICENCE.cypress;md5=48cd9436c763bf873961f9ed7b5c147b \
+ file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \
+ file://LICENCE.e100;md5=ec0f84136766df159a3ae6d02acdf5a8 \
+ file://LICENCE.ene_firmware;md5=ed67f0f62f8f798130c296720b7d3921 \
+ file://LICENCE.fw_sst_0f28;md5=6353931c988ad52818ae733ac61cd293 \
+ file://LICENCE.go7007;md5=c0bb9f6aaaba55b0529ee9b30aa66beb \
+ file://GPL-2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://LICENSE.hfi1_firmware;md5=5e7b6e586ce7339d12689e49931ad444 \
+ file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \
+ file://LICENSE.i915;md5=2b0b2e0d20984affd4490ba2cba02570 \
+ file://LICENCE.ibt_firmware;md5=fdbee1ddfe0fb7ab0b2fcd6b454a366b \
+ file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
+ file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 \
+ file://LICENCE.iwlwifi_firmware;md5=3fd842911ea93c29cd32679aa23e1c88 \
+ file://LICENCE.kaweth;md5=b1d876e562f4b3b8d391ad8395dfe03f \
+ file://LICENCE.Marvell;md5=28b6ed8bd04ba105af6e4dcd6e997772 \
+ file://LICENCE.mediatek;md5=7c1976b63217d76ce47d0a11d8a79cf2 \
+ file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \
+ file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
+ file://LICENCE.Netronome;md5=4add08f2577086d44447996503cddf5f \
+ file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \
+ file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
+ file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \
+ file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \
+ file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
+ file://LICENSE.qcom;md5=164e3362a538eb11d3ac51e8e134294b \
+ file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \
+ file://LICENCE.qla2xxx;md5=505855e921b75f1be4a437ad9b79dff0 \
+ file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \
+ file://LICENSE.QualcommAtheros_ath10k;md5=cb42b686ee5f5cb890275e4321db60a8 \
+ file://LICENCE.r8a779x_usb3;md5=4c1671656153025d7076105a5da7e498 \
+ file://LICENSE.radeon;md5=68ec28bacb3613200bca44f404c69b16 \
+ file://LICENCE.ralink_a_mediatek_company_firmware;md5=728f1a85fd53fd67fa8d7afb080bc435 \
+ file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \
+ file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \
+ file://LICENSE.sdma_firmware;md5=51e8c19ecc2270f4b8ea30341ad63ce9 \
+ file://LICENCE.siano;md5=4556c1bf830067f12ca151ad953ec2a5 \
+ file://LICENCE.tda7706-firmware.txt;md5=835997cf5e3c131d0dddd695c7d9103e \
+ file://LICENCE.ti-connectivity;md5=c5e02be633f1499c109d1652514d85ec \
+ file://LICENCE.ti-keystone;md5=3a86335d32864b0bef996bee26cc0f2c \
+ file://LICENCE.ueagle-atm4-firmware;md5=4ed7ea6b507ccc583b9d594417714118 \
+ file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \
+ file://LICENCE.wl1251;md5=ad3f81922bb9e197014bb187289d3b5b \
+ file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
+ file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
+ file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
+ file://WHENCE;md5=37a01e379219d1e06dbccfa90a8fc0ad \
+ "
+
+# These are not common licenses, set NO_GENERIC_LICENSE for them
+# so that the license files will be copied from fetched source
+NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENCE.Abilis"
+NO_GENERIC_LICENSE[Firmware-adsp_sst] = "LICENCE.adsp_sst"
+NO_GENERIC_LICENSE[Firmware-agere] = "LICENCE.agere"
+NO_GENERIC_LICENSE[Firmware-amdgpu] = "LICENSE.amdgpu"
+NO_GENERIC_LICENSE[Firmware-amd-ucode] = "LICENSE.amd-ucode"
+NO_GENERIC_LICENSE[Firmware-amlogic_vdec] = "LICENSE.amlogic_vdec"
+NO_GENERIC_LICENSE[Firmware-atheros_firmware] = "LICENCE.atheros_firmware"
+NO_GENERIC_LICENSE[Firmware-atmel] = "LICENSE.atmel"
+NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx] = "LICENCE.broadcom_bcm43xx"
+NO_GENERIC_LICENSE[Firmware-ca0132] = "LICENCE.ca0132"
+NO_GENERIC_LICENSE[Firmware-cadence] = "LICENCE.cadence"
+NO_GENERIC_LICENSE[Firmware-cavium] = "LICENCE.cavium"
+NO_GENERIC_LICENSE[Firmware-chelsio_firmware] = "LICENCE.chelsio_firmware"
+NO_GENERIC_LICENSE[Firmware-cw1200] = "LICENCE.cw1200"
+NO_GENERIC_LICENSE[Firmware-cypress] = "LICENCE.cypress"
+NO_GENERIC_LICENSE[Firmware-dib0700] = "LICENSE.dib0700"
+NO_GENERIC_LICENSE[Firmware-e100] = "LICENCE.e100"
+NO_GENERIC_LICENSE[Firmware-ene_firmware] = "LICENCE.ene_firmware"
+NO_GENERIC_LICENSE[Firmware-fw_sst_0f28] = "LICENCE.fw_sst_0f28"
+NO_GENERIC_LICENSE[Firmware-go7007] = "LICENCE.go7007"
+NO_GENERIC_LICENSE[Firmware-GPLv2] = "GPL-2"
+NO_GENERIC_LICENSE[Firmware-hfi1_firmware] = "LICENSE.hfi1_firmware"
+NO_GENERIC_LICENSE[Firmware-i2400m] = "LICENCE.i2400m"
+NO_GENERIC_LICENSE[Firmware-i915] = "LICENSE.i915"
+NO_GENERIC_LICENSE[Firmware-ibt_firmware] = "LICENCE.ibt_firmware"
+NO_GENERIC_LICENSE[Firmware-IntcSST2] = "LICENCE.IntcSST2"
+NO_GENERIC_LICENSE[Firmware-it913x] = "LICENCE.it913x"
+NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware"
+NO_GENERIC_LICENSE[Firmware-kaweth] = "LICENCE.kaweth"
+NO_GENERIC_LICENSE[Firmware-Marvell] = "LICENCE.Marvell"
+NO_GENERIC_LICENSE[Firmware-mediatek] = "LICENCE.mediatek"
+NO_GENERIC_LICENSE[Firmware-moxa] = "LICENCE.moxa"
+NO_GENERIC_LICENSE[Firmware-myri10ge_firmware] = "LICENCE.myri10ge_firmware"
+NO_GENERIC_LICENSE[Firmware-netronome] = "LICENCE.Netronome"
+NO_GENERIC_LICENSE[Firmware-nvidia] = "LICENCE.nvidia"
+NO_GENERIC_LICENSE[Firmware-OLPC] = "LICENCE.OLPC"
+NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware"
+NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw"
+NO_GENERIC_LICENSE[Firmware-qat] = "LICENCE.qat_firmware"
+NO_GENERIC_LICENSE[Firmware-qcom] = "LICENSE.qcom"
+NO_GENERIC_LICENSE[Firmware-qla1280] = "LICENCE.qla1280"
+NO_GENERIC_LICENSE[Firmware-qla2xxx] = "LICENCE.qla2xxx"
+NO_GENERIC_LICENSE[Firmware-qualcommAthos_ar3k] = "LICENSE.QualcommAtheros_ar3k"
+NO_GENERIC_LICENSE[Firmware-qualcommAthos_ath10k] = "LICENSE.QualcommAtheros_ath10k"
+NO_GENERIC_LICENSE[Firmware-r8a779x_usb3] = "LICENCE.r8a779x_usb3"
+NO_GENERIC_LICENSE[Firmware-radeon] = "LICENSE.radeon"
+NO_GENERIC_LICENSE[Firmware-ralink_a_mediatek_company_firmware] = "LICENCE.ralink_a_mediatek_company_firmware"
+NO_GENERIC_LICENSE[Firmware-ralink-firmware] = "LICENCE.ralink-firmware.txt"
+NO_GENERIC_LICENSE[Firmware-rtlwifi_firmware] = "LICENCE.rtlwifi_firmware.txt"
+NO_GENERIC_LICENSE[Firmware-siano] = "LICENCE.siano"
+NO_GENERIC_LICENSE[Firmware-imx-sdma_firmware] = "LICENSE.sdma_firmware"
+NO_GENERIC_LICENSE[Firmware-tda7706-firmware] = "LICENCE.tda7706-firmware.txt"
+NO_GENERIC_LICENSE[Firmware-ti-connectivity] = "LICENCE.ti-connectivity"
+NO_GENERIC_LICENSE[Firmware-ti-keystone] = "LICENCE.ti-keystone"
+NO_GENERIC_LICENSE[Firmware-ueagle-atm4-firmware] = "LICENCE.ueagle-atm4-firmware"
+NO_GENERIC_LICENSE[Firmware-via_vt6656] = "LICENCE.via_vt6656"
+NO_GENERIC_LICENSE[Firmware-wl1251] = "LICENCE.wl1251"
+NO_GENERIC_LICENSE[Firmware-xc4000] = "LICENCE.xc4000"
+NO_GENERIC_LICENSE[Firmware-xc5000] = "LICENCE.xc5000"
+NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c"
+NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
+
+PE = "1"
+
+SRCREV = "07b925b450bfb4cf3e141c612ec5b104658cd020"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
+
+UPSTREAM_CHECK_COMMITS = "1"
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+CLEANBROKEN = "1"
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}${nonarch_base_libdir}/firmware/
+ cp -r * ${D}${nonarch_base_libdir}/firmware/
+
+ # Avoid Makefile to be deployed
+ rm ${D}${nonarch_base_libdir}/firmware/Makefile
+
+ # Remove unbuild firmware which needs cmake and bash
+ rm ${D}${nonarch_base_libdir}/firmware/carl9170fw -rf
+
+ # Remove pointless bash script
+ rm ${D}${nonarch_base_libdir}/firmware/configure
+
+ # Remove python script used to check the WHENCE file
+ rm ${D}${nonarch_base_libdir}/firmware/check_whence.py
+
+ # Libertas sd8686
+ ln -sf libertas/sd8686_v9.bin ${D}${nonarch_base_libdir}/firmware/sd8686.bin
+ ln -sf libertas/sd8686_v9_helper.bin ${D}${nonarch_base_libdir}/firmware/sd8686_helper.bin
+
+ # fixup wl12xx location, after 2.6.37 the kernel searches a different location for it
+ ( cd ${D}${nonarch_base_libdir}/firmware ; ln -sf ti-connectivity/* . )
+}
+
+
+PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
+ ${PN}-mt7601u-license ${PN}-mt7601u \
+ ${PN}-radeon-license ${PN}-radeon \
+ ${PN}-marvell-license ${PN}-pcie8897 ${PN}-pcie8997 \
+ ${PN}-sd8686 ${PN}-sd8688 ${PN}-sd8787 ${PN}-sd8797 ${PN}-sd8801 ${PN}-sd8887 ${PN}-sd8897 \
+ ${PN}-usb8997 \
+ ${PN}-ti-connectivity-license ${PN}-wlcommon ${PN}-wl12xx ${PN}-wl18xx \
+ ${PN}-vt6656-license ${PN}-vt6656 \
+ ${PN}-rtl-license ${PN}-rtl8188 ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su ${PN}-rtl8723 ${PN}-rtl8821 \
+ ${PN}-rtl8168 \
+ ${PN}-cypress-license \
+ ${PN}-broadcom-license \
+ ${PN}-bcm-0bb4-0306 \
+ ${PN}-bcm43143 \
+ ${PN}-bcm43236b \
+ ${PN}-bcm43241b0 \
+ ${PN}-bcm43241b4 \
+ ${PN}-bcm43241b5 \
+ ${PN}-bcm43242a \
+ ${PN}-bcm4329 \
+ ${PN}-bcm4329-fullmac \
+ ${PN}-bcm4330 \
+ ${PN}-bcm4334 \
+ ${PN}-bcm43340 \
+ ${PN}-bcm4335 \
+ ${PN}-bcm43362 \
+ ${PN}-bcm4339 \
+ ${PN}-bcm43430 \
+ ${PN}-bcm43430a0 \
+ ${PN}-bcm43455 \
+ ${PN}-bcm4350 \
+ ${PN}-bcm4350c2 \
+ ${PN}-bcm4354 \
+ ${PN}-bcm4356 \
+ ${PN}-bcm4356-pcie \
+ ${PN}-bcm43569 \
+ ${PN}-bcm43570 \
+ ${PN}-bcm4358 \
+ ${PN}-bcm43602 \
+ ${PN}-bcm4366b \
+ ${PN}-bcm4366c \
+ ${PN}-bcm4371 \
+ ${PN}-bcm4373 \
+ ${PN}-bcm43xx \
+ ${PN}-bcm43xx-hdr \
+ ${PN}-atheros-license ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k \
+ ${PN}-gplv2-license ${PN}-carl9170 \
+ ${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k ${PN}-qca \
+ \
+ ${PN}-imx-sdma-license ${PN}-imx-sdma-imx6q ${PN}-imx-sdma-imx7d \
+ \
+ ${PN}-iwlwifi-license ${PN}-iwlwifi \
+ ${PN}-iwlwifi-135-6 \
+ ${PN}-iwlwifi-3160-7 ${PN}-iwlwifi-3160-8 ${PN}-iwlwifi-3160-9 \
+ ${PN}-iwlwifi-3160-10 ${PN}-iwlwifi-3160-12 ${PN}-iwlwifi-3160-13 \
+ ${PN}-iwlwifi-3160-16 ${PN}-iwlwifi-3160-17 \
+ ${PN}-iwlwifi-6000-4 ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2a-6 \
+ ${PN}-iwlwifi-6000g2b-5 ${PN}-iwlwifi-6000g2b-6 \
+ ${PN}-iwlwifi-6050-4 ${PN}-iwlwifi-6050-5 \
+ ${PN}-iwlwifi-7260 \
+ ${PN}-iwlwifi-7265 \
+ ${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \
+ ${PN}-iwlwifi-9000 \
+ ${PN}-iwlwifi-misc \
+ ${PN}-ibt-license ${PN}-ibt ${PN}-ibt-misc \
+ ${PN}-ibt-11-5 ${PN}-ibt-12-16 ${PN}-ibt-hw-37-7 ${PN}-ibt-hw-37-8 \
+ ${PN}-ibt-17 \
+ ${PN}-i915-license ${PN}-i915 \
+ ${PN}-adsp-sst-license ${PN}-adsp-sst \
+ ${PN}-bnx2-mips \
+ ${PN}-liquidio \
+ ${PN}-netronome-license ${PN}-netronome \
+ ${PN}-qat ${PN}-qat-license \
+ ${PN}-qcom-license \
+ ${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 \
+ ${PN}-qcom-adreno-a3xx ${PN}-qcom-adreno-a530 \
+ ${PN}-whence-license \
+ ${PN}-license \
+ "
+
+# For atheros
+LICENSE_${PN}-ar9170 = "Firmware-atheros_firmware"
+LICENSE_${PN}-ath6k = "Firmware-atheros_firmware"
+LICENSE_${PN}-ath9k = "Firmware-atheros_firmware"
+LICENSE_${PN}-atheros-license = "Firmware-atheros_firmware"
+
+FILES_${PN}-atheros-license = "${nonarch_base_libdir}/firmware/LICENCE.atheros_firmware"
+FILES_${PN}-ar9170 = " \
+ ${nonarch_base_libdir}/firmware/ar9170*.fw \
+"
+FILES_${PN}-ath6k = " \
+ ${nonarch_base_libdir}/firmware/ath6k \
+"
+FILES_${PN}-ath9k = " \
+ ${nonarch_base_libdir}/firmware/ar9271.fw \
+ ${nonarch_base_libdir}/firmware/ar7010*.fw \
+ ${nonarch_base_libdir}/firmware/htc_9271.fw \
+ ${nonarch_base_libdir}/firmware/htc_7010.fw \
+ ${nonarch_base_libdir}/firmware/ath9k_htc/htc_7010-1.4.0.fw \
+ ${nonarch_base_libdir}/firmware/ath9k_htc/htc_9271-1.4.0.fw \
+"
+
+RDEPENDS_${PN}-ar9170 += "${PN}-atheros-license"
+RDEPENDS_${PN}-ath6k += "${PN}-atheros-license"
+RDEPENDS_${PN}-ath9k += "${PN}-atheros-license"
+
+# For carl9170
+LICENSE_${PN}-carl9170 = "Firmware-GPLv2"
+LICENSE_${PN}-gplv2-license = "Firmware-GPLv2"
+
+FILES_${PN}-gplv2-license = "${nonarch_base_libdir}/firmware/GPL-2"
+FILES_${PN}-carl9170 = " \
+ ${nonarch_base_libdir}/firmware/carl9170*.fw \
+"
+
+RDEPENDS_${PN}-carl9170 += "${PN}-gplv2-license"
+
+# For QualCommAthos
+LICENSE_${PN}-ar3k = "Firmware-qualcommAthos_ar3k"
+LICENSE_${PN}-ar3k-license = "Firmware-qualcommAthos_ar3k"
+LICENSE_${PN}-ath10k = "Firmware-qualcommAthos_ath10k"
+LICENSE_${PN}-ath10k-license = "Firmware-qualcommAthos_ath10k"
+LICENSE_${PN}-qca = "Firmware-qualcommAthos_ath10k"
+
+FILES_${PN}-ar3k-license = "${nonarch_base_libdir}/firmware/LICENSE.QualcommAtheros_ar3k"
+FILES_${PN}-ar3k = " \
+ ${nonarch_base_libdir}/firmware/ar3k \
+"
+
+FILES_${PN}-ath10k-license = "${nonarch_base_libdir}/firmware/LICENSE.QualcommAtheros_ath10k"
+FILES_${PN}-ath10k = " \
+ ${nonarch_base_libdir}/firmware/ath10k \
+"
+
+FILES_${PN}-qca = " \
+ ${nonarch_base_libdir}/firmware/qca \
+"
+
+RDEPENDS_${PN}-ar3k += "${PN}-ar3k-license"
+RDEPENDS_${PN}-ath10k += "${PN}-ath10k-license"
+RDEPENDS_${PN}-qca += "${PN}-ath10k-license"
+
+# For ralink
+LICENSE_${PN}-ralink = "Firmware-ralink-firmware"
+LICENSE_${PN}-ralink-license = "Firmware-ralink-firmware"
+
+FILES_${PN}-ralink-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink-firmware.txt"
+FILES_${PN}-ralink = " \
+ ${nonarch_base_libdir}/firmware/rt*.bin \
+"
+
+RDEPENDS_${PN}-ralink += "${PN}-ralink-license"
+
+# For mediatek MT7601U
+LICENSE_${PN}-mt7601u = "Firmware-ralink_a_mediatek_company_firmware"
+LICENSE_${PN}-mt7601u-license = "Firmware-ralink_a_mediatek_company_firmware"
+
+FILES_${PN}-mt7601u-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware"
+FILES_${PN}-mt7601u = " \
+ ${nonarch_base_libdir}/firmware/mt7601u.bin \
+"
+
+RDEPENDS_${PN}-mt7601u += "${PN}-mt7601u-license"
+
+# For radeon
+LICENSE_${PN}-radeon = "Firmware-radeon"
+LICENSE_${PN}-radeon-license = "Firmware-radeon"
+
+FILES_${PN}-radeon-license = "${nonarch_base_libdir}/firmware/LICENSE.radeon"
+FILES_${PN}-radeon = " \
+ ${nonarch_base_libdir}/firmware/radeon \
+"
+
+RDEPENDS_${PN}-radeon += "${PN}-radeon-license"
+
+# For marvell
+LICENSE_${PN}-pcie8897 = "Firmware-Marvell"
+LICENSE_${PN}-pcie8997 = "Firmware-Marvell"
+LICENSE_${PN}-sd8686 = "Firmware-Marvell"
+LICENSE_${PN}-sd8688 = "Firmware-Marvell"
+LICENSE_${PN}-sd8787 = "Firmware-Marvell"
+LICENSE_${PN}-sd8797 = "Firmware-Marvell"
+LICENSE_${PN}-sd8801 = "Firmware-Marvell"
+LICENSE_${PN}-sd8887 = "Firmware-Marvell"
+LICENSE_${PN}-sd8897 = "Firmware-Marvell"
+LICENSE_${PN}-usb8997 = "Firmware-Marvell"
+LICENSE_${PN}-marvell-license = "Firmware-Marvell"
+
+FILES_${PN}-marvell-license = "${nonarch_base_libdir}/firmware/LICENCE.Marvell"
+FILES_${PN}-pcie8897 = " \
+ ${nonarch_base_libdir}/firmware/mrvl/pcie8897_uapsta.bin \
+"
+FILES_${PN}-pcie8997 = " \
+ ${nonarch_base_libdir}/firmware/mrvl/pcie8997_wlan_v4.bin \
+ ${nonarch_base_libdir}/firmware/mrvl/pcieuart8997_combo_v4.bin \
+ ${nonarch_base_libdir}/firmware/mrvl/pcieusb8997_combo_v4.bin \
+"
+FILES_${PN}-sd8686 = " \
+ ${nonarch_base_libdir}/firmware/libertas/sd8686_v9* \
+ ${nonarch_base_libdir}/firmware/sd8686* \
+"
+FILES_${PN}-sd8688 = " \
+ ${nonarch_base_libdir}/firmware/libertas/sd8688* \
+ ${nonarch_base_libdir}/firmware/mrvl/sd8688* \
+"
+FILES_${PN}-sd8787 = " \
+ ${nonarch_base_libdir}/firmware/mrvl/sd8787_uapsta.bin \
+"
+FILES_${PN}-sd8797 = " \
+ ${nonarch_base_libdir}/firmware/mrvl/sd8797_uapsta.bin \
+"
+FILES_${PN}-sd8801 = " \
+ ${nonarch_base_libdir}/firmware/mrvl/sd8801_uapsta.bin \
+"
+FILES_${PN}-sd8887 = " \
+ ${nonarch_base_libdir}/firmware/mrvl/sd8887_uapsta.bin \
+"
+FILES_${PN}-sd8897 = " \
+ ${nonarch_base_libdir}/firmware/mrvl/sd8897_uapsta.bin \
+"
+FILES_${PN}-usb8997 = " \
+ ${nonarch_base_libdir}/firmware/mrvl/usbusb8997_combo_v4.bin \
+"
+
+RDEPENDS_${PN}-sd8686 += "${PN}-marvell-license"
+RDEPENDS_${PN}-sd8688 += "${PN}-marvell-license"
+RDEPENDS_${PN}-sd8787 += "${PN}-marvell-license"
+RDEPENDS_${PN}-sd8797 += "${PN}-marvell-license"
+RDEPENDS_${PN}-sd8801 += "${PN}-marvell-license"
+RDEPENDS_${PN}-sd8887 += "${PN}-marvell-license"
+RDEPENDS_${PN}-sd8897 += "${PN}-marvell-license"
+RDEPENDS_${PN}-usb8997 += "${PN}-marvell-license"
+
+# For netronome
+LICENSE_${PN}-netronome = "Firmware-netronome"
+
+FILES_${PN}-netronome-license = " \
+ ${nonarch_base_libdir}/firmware/LICENCE.Netronome \
+"
+FILES_${PN}-netronome = " \
+ ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0081*.nffw \
+ ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0096*.nffw \
+ ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0097*.nffw \
+ ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0099*.nffw \
+"
+
+RDEPENDS_${PN}-netronome += "${PN}-netronome-license"
+
+# For rtl
+LICENSE_${PN}-rtl8188 = "Firmware-rtlwifi_firmware"
+LICENSE_${PN}-rtl8192cu = "Firmware-rtlwifi_firmware"
+LICENSE_${PN}-rtl8192ce = "Firmware-rtlwifi_firmware"
+LICENSE_${PN}-rtl8192su = "Firmware-rtlwifi_firmware"
+LICENSE_${PN}-rtl8723 = "Firmware-rtlwifi_firmware"
+LICENSE_${PN}-rtl8821 = "Firmware-rtlwifi_firmware"
+LICENSE_${PN}-rtl-license = "Firmware-rtlwifi_firmware"
+LICENSE_${PN}-rtl8168 = "WHENCE"
+
+FILES_${PN}-rtl-license = " \
+ ${nonarch_base_libdir}/firmware/LICENCE.rtlwifi_firmware.txt \
+"
+FILES_${PN}-rtl8188 = " \
+ ${nonarch_base_libdir}/firmware/rtlwifi/rtl8188*.bin \
+"
+FILES_${PN}-rtl8192cu = " \
+ ${nonarch_base_libdir}/firmware/rtlwifi/rtl8192cufw*.bin \
+"
+FILES_${PN}-rtl8192ce = " \
+ ${nonarch_base_libdir}/firmware/rtlwifi/rtl8192cfw*.bin \
+"
+FILES_${PN}-rtl8192su = " \
+ ${nonarch_base_libdir}/firmware/rtlwifi/rtl8712u.bin \
+"
+FILES_${PN}-rtl8723 = " \
+ ${nonarch_base_libdir}/firmware/rtlwifi/rtl8723*.bin \
+"
+FILES_${PN}-rtl8821 = " \
+ ${nonarch_base_libdir}/firmware/rtlwifi/rtl8821*.bin \
+"
+FILES_${PN}-rtl8168 = " \
+ ${nonarch_base_libdir}/firmware/rtl_nic/rtl8168*.fw \
+"
+
+RDEPENDS_${PN}-rtl8188 += "${PN}-rtl-license"
+RDEPENDS_${PN}-rtl8192ce += "${PN}-rtl-license"
+RDEPENDS_${PN}-rtl8192cu += "${PN}-rtl-license"
+RDEPENDS_${PN}-rtl8192su = "${PN}-rtl-license"
+RDEPENDS_${PN}-rtl8723 += "${PN}-rtl-license"
+RDEPENDS_${PN}-rtl8821 += "${PN}-rtl-license"
+RDEPENDS_${PN}-rtl8168 += "${PN}-whence-license"
+
+# For ti-connectivity
+LICENSE_${PN}-wlcommon = "Firmware-ti-connectivity"
+LICENSE_${PN}-wl12xx = "Firmware-ti-connectivity"
+LICENSE_${PN}-wl18xx = "Firmware-ti-connectivity"
+LICENSE_${PN}-ti-connectivity-license = "Firmware-ti-connectivity"
+
+FILES_${PN}-ti-connectivity-license = "${nonarch_base_libdir}/firmware/LICENCE.ti-connectivity"
+FILES_${PN}-wlcommon = " \
+ ${nonarch_base_libdir}/firmware/TI* \
+ ${nonarch_base_libdir}/firmware/ti-connectivity/TI* \
+"
+FILES_${PN}-wl12xx = " \
+ ${nonarch_base_libdir}/firmware/wl12* \
+ ${nonarch_base_libdir}/firmware/ti-connectivity/wl12* \
+"
+FILES_${PN}-wl18xx = " \
+ ${nonarch_base_libdir}/firmware/wl18* \
+ ${nonarch_base_libdir}/firmware/ti-connectivity/wl18* \
+"
+
+RDEPENDS_${PN}-wl12xx = "${PN}-ti-connectivity-license ${PN}-wlcommon"
+RDEPENDS_${PN}-wl18xx = "${PN}-ti-connectivity-license ${PN}-wlcommon"
+
+# For vt6656
+LICENSE_${PN}-vt6656 = "Firmware-via_vt6656"
+LICENSE_${PN}-vt6656-license = "Firmware-via_vt6656"
+
+FILES_${PN}-vt6656-license = "${nonarch_base_libdir}/firmware/LICENCE.via_vt6656"
+FILES_${PN}-vt6656 = " \
+ ${nonarch_base_libdir}/firmware/vntwusb.fw \
+"
+
+RDEPENDS_${PN}-vt6656 = "${PN}-vt6656-license"
+
+# For broadcom
+
+# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo -e " \${PN}-$pkg \\"; done | sort -u
+
+LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx"
+FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx"
+
+# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo "$i - $pkg"; echo -e "FILES_\${PN}-$pkg = \"\${nonarch_base_libdir}/firmware/brcm/$i\""; done | grep ^FILES
+
+FILES_${PN}-bcm43xx = "${nonarch_base_libdir}/firmware/brcm/bcm43xx-0.fw"
+FILES_${PN}-bcm43xx-hdr = "${nonarch_base_libdir}/firmware/brcm/bcm43xx_hdr-0.fw"
+FILES_${PN}-bcm4329-fullmac = "${nonarch_base_libdir}/firmware/brcm/bcm4329-fullmac-4.bin"
+FILES_${PN}-bcm43236b = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43236b.bin"
+FILES_${PN}-bcm4329 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4329-sdio.bin"
+FILES_${PN}-bcm4330 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4330-sdio.*"
+FILES_${PN}-bcm4334 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4334-sdio.bin"
+FILES_${PN}-bcm4335 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4335-sdio.bin"
+FILES_${PN}-bcm4339 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4339-sdio.bin"
+FILES_${PN}-bcm43241b0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b0-sdio.bin"
+FILES_${PN}-bcm43241b4 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b4-sdio.bin"
+FILES_${PN}-bcm43241b5 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b5-sdio.bin"
+FILES_${PN}-bcm43242a = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43242a.bin"
+FILES_${PN}-bcm43143 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43143.bin \
+ ${nonarch_base_libdir}/firmware/brcm/brcmfmac43143-sdio.bin \
+"
+FILES_${PN}-bcm43430a0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430a0-sdio.*"
+FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.*"
+FILES_${PN}-bcm4350c2 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350c2-pcie.bin"
+FILES_${PN}-bcm4350 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350-pcie.bin"
+FILES_${PN}-bcm4356 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-sdio.bin"
+FILES_${PN}-bcm43569 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43569.bin"
+FILES_${PN}-bcm43570 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43570-pcie.bin"
+FILES_${PN}-bcm4358 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4358-pcie.bin"
+FILES_${PN}-bcm43602 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.bin \
+ ${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.ap.bin \
+"
+FILES_${PN}-bcm4366b = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4366b-pcie.bin"
+FILES_${PN}-bcm4366c = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4366c-pcie.bin"
+FILES_${PN}-bcm4371 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4371-pcie.bin"
+
+# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo -e "LICENSE_\${PN}-$pkg = \"Firmware-broadcom_bcm43xx\"\nRDEPENDS_\${PN}-$pkg += \"\${PN}-broadcom-license\""; done
+# Currently 1st one and last 6 have cypress LICENSE
+
+LICENSE_${PN}-bcm43xx = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43xx += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43xx-hdr = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43xx-hdr += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4329-fullmac = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4329-fullmac += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43236b = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43236b += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4329 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4329 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4330 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4330 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4334 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4335 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4335 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4339 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4339 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43241b0 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43241b0 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43241b4 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43241b4 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43241b5 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43241b5 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43242a = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43242a += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43143 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43143 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43430a0 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43430a0 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4350c2 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4350c2 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4350 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4350 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4356 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4356 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43569 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43569 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43570 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43570 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4358 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4358 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm43602 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm43602 += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4366b = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4366b += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4366c = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4366c += "${PN}-broadcom-license"
+LICENSE_${PN}-bcm4371 = "Firmware-broadcom_bcm43xx"
+RDEPENDS_${PN}-bcm4371 += "${PN}-broadcom-license"
+
+# For broadcom cypress
+
+LICENSE_${PN}-cypress-license = "Firmware-cypress"
+FILES_${PN}-cypress-license = "${nonarch_base_libdir}/firmware/LICENCE.cypress"
+
+FILES_${PN}-bcm-0bb4-0306 = "${nonarch_base_libdir}/firmware/brcm/BCM-0bb4-0306.hcd"
+FILES_${PN}-bcm43340 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43340-sdio.*"
+FILES_${PN}-bcm43362 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43362-sdio.*"
+FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.*"
+FILES_${PN}-bcm4354 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4354-sdio.bin"
+FILES_${PN}-bcm4356-pcie = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-pcie.*"
+FILES_${PN}-bcm4373 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4373-sdio.bin \
+ ${nonarch_base_libdir}/firmware/brcm/brcmfmac4373.bin \
+"
+
+LICENSE_${PN}-bcm-0bb4-0306 = "Firmware-cypress"
+RDEPENDS_${PN}-bcm-0bb4-0306 += "${PN}-cypress-license"
+LICENSE_${PN}-bcm43340 = "Firmware-cypress"
+RDEPENDS_${PN}-bcm43340 += "${PN}-cypress-license"
+LICENSE_${PN}-bcm43362 = "Firmware-cypress"
+RDEPENDS_${PN}-bcm43362 += "${PN}-cypress-license"
+LICENSE_${PN}-bcm43430 = "Firmware-cypress"
+RDEPENDS_${PN}-bcm43430 += "${PN}-cypress-license"
+LICENSE_${PN}-bcm4354 = "Firmware-cypress"
+RDEPENDS_${PN}-bcm4354 += "${PN}-cypress-license"
+LICENSE_${PN}-bcm4356-pcie = "Firmware-cypress"
+RDEPENDS_${PN}-bcm4356-pcie += "${PN}-cypress-license"
+LICENSE_${PN}-bcm4373 = "Firmware-cypress"
+RDEPENDS_${PN}-bcm4373 += "${PN}-cypress-license"
+
+# For Broadcom bnx2-mips
+#
+# which is a separate case to the other Broadcom firmwares since its
+# license is contained in the shared WHENCE file.
+
+LICENSE_${PN}-bnx2-mips = "WHENCE"
+LICENSE_${PN}-whence-license = "WHENCE"
+
+FILES_${PN}-bnx2-mips = "${nonarch_base_libdir}/firmware/bnx2/bnx2-mips-09-6.2.1b.fw"
+FILES_${PN}-whence-license = "${nonarch_base_libdir}/firmware/WHENCE"
+
+RDEPENDS_${PN}-bnx2-mips += "${PN}-whence-license"
+
+# For imx-sdma
+LICENSE_${PN}-imx-sdma-imx6q = "Firmware-imx-sdma_firmware"
+LICENSE_${PN}-imx-sdma-imx7d = "Firmware-imx-sdma_firmware"
+LICENSE_${PN}-imx-sdma-license = "Firmware-imx-sdma_firmware"
+
+FILES_${PN}-imx-sdma-imx6q = "${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx6q.bin"
+
+RPROVIDES_${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q"
+RREPLACES_${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q"
+RCONFLICTS_${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q"
+
+FILES_${PN}-imx-sdma-imx7d = "${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx7d.bin"
+
+FILES_${PN}-imx-sdma-license = "${nonarch_base_libdir}/firmware/LICENSE.sdma_firmware"
+
+RDEPENDS_${PN}-imx-sdma-imx6q += "${PN}-imx-sdma-license"
+RDEPENDS_${PN}-imx-sdma-imx7d += "${PN}-imx-sdma-license"
+
+# For iwlwifi
+LICENSE_${PN}-iwlwifi = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-135-6 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-3160-7 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-3160-8 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-3160-9 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-3160-10 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-3160-12 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-3160-13 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-3160-16 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-3160-17 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-6000-4 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-6000g2a-5 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-6000g2a-6 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-6000g2b-5 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-6000g2b-6 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-6050-4 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-6050-5 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-7260 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-7265 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-7265d = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-8000c = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-8265 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-9000 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-misc = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-license = "Firmware-iwlwifi_firmware"
+
+
+FILES_${PN}-iwlwifi-license = "${nonarch_base_libdir}/firmware/LICENCE.iwlwifi_firmware"
+FILES_${PN}-iwlwifi-135-6 = "${nonarch_base_libdir}/firmware/iwlwifi-135-6.ucode"
+FILES_${PN}-iwlwifi-3160-7 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-7.ucode"
+FILES_${PN}-iwlwifi-3160-8 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-8.ucode"
+FILES_${PN}-iwlwifi-3160-9 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-9.ucode"
+FILES_${PN}-iwlwifi-3160-10 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-10.ucode"
+FILES_${PN}-iwlwifi-3160-12 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-12.ucode"
+FILES_${PN}-iwlwifi-3160-13 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-13.ucode"
+FILES_${PN}-iwlwifi-3160-16 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-16.ucode"
+FILES_${PN}-iwlwifi-3160-17 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-17.ucode"
+FILES_${PN}-iwlwifi-6000-4 = "${nonarch_base_libdir}/firmware/iwlwifi-6000-4.ucode"
+FILES_${PN}-iwlwifi-6000g2a-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2a-5.ucode"
+FILES_${PN}-iwlwifi-6000g2a-6 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2a-6.ucode"
+FILES_${PN}-iwlwifi-6000g2b-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2b-5.ucode"
+FILES_${PN}-iwlwifi-6000g2b-6 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2b-6.ucode"
+FILES_${PN}-iwlwifi-6050-4 = "${nonarch_base_libdir}/firmware/iwlwifi-6050-4.ucode"
+FILES_${PN}-iwlwifi-6050-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6050-5.ucode"
+FILES_${PN}-iwlwifi-7260 = "${nonarch_base_libdir}/firmware/iwlwifi-7260-*.ucode"
+FILES_${PN}-iwlwifi-7265 = "${nonarch_base_libdir}/firmware/iwlwifi-7265-*.ucode"
+FILES_${PN}-iwlwifi-7265d = "${nonarch_base_libdir}/firmware/iwlwifi-7265D-*.ucode"
+FILES_${PN}-iwlwifi-8000c = "${nonarch_base_libdir}/firmware/iwlwifi-8000C-*.ucode"
+FILES_${PN}-iwlwifi-8265 = "${nonarch_base_libdir}/firmware/iwlwifi-8265-*.ucode"
+FILES_${PN}-iwlwifi-9000 = "${nonarch_base_libdir}/firmware/iwlwifi-9000-*.ucode"
+FILES_${PN}-iwlwifi-misc = "${nonarch_base_libdir}/firmware/iwlwifi-*.ucode"
+
+RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-7 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-9 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-10 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-12 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-13 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-16 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-17 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000-4 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000g2b-5 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6050-4 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6050-5 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265d = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-8000c = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-8265 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-9000 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-misc = "${PN}-iwlwifi-license"
+
+# -iwlwifi-misc is a "catch all" package that includes all the iwlwifi
+# firmwares that are not already included in other -iwlwifi- packages.
+# -iwlwifi is a virtual package that depends upon all iwlwifi packages.
+# These are distinct in order to allow the -misc firmwares to be installed
+# without pulling in every other iwlwifi package.
+ALLOW_EMPTY_${PN}-iwlwifi = "1"
+ALLOW_EMPTY_${PN}-iwlwifi-misc = "1"
+
+# Handle package updating for the newly merged iwlwifi groupings
+RPROVIDES_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
+RREPLACES_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
+RCONFLICTS_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
+
+RPROVIDES_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
+RREPLACES_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
+RCONFLICTS_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
+
+# For ibt
+LICENSE_${PN}-ibt-license = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-hw-37-7 = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-hw-37-8 = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-11-5 = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-12-16 = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-17 = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-misc = "Firmware-ibt_firmware"
+
+FILES_${PN}-ibt-license = "${nonarch_base_libdir}/firmware/LICENCE.ibt_firmware"
+FILES_${PN}-ibt-hw-37-7 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.7*.bseq"
+FILES_${PN}-ibt-hw-37-8 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.8*.bseq"
+FILES_${PN}-ibt-11-5 = "${nonarch_base_libdir}/firmware/intel/ibt-11-5.sfi ${nonarch_base_libdir}/firmware/intel/ibt-11-5.ddc"
+FILES_${PN}-ibt-12-16 = "${nonarch_base_libdir}/firmware/intel/ibt-12-16.sfi ${nonarch_base_libdir}/firmware/intel/ibt-12-16.ddc"
+FILES_${PN}-ibt-17 = "${nonarch_base_libdir}/firmware/intel/ibt-17-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-17-*.ddc"
+FILES_${PN}-ibt-misc = "${nonarch_base_libdir}/firmware/ibt-*"
+
+RDEPENDS_${PN}-ibt-hw-37-7 = "${PN}-ibt-license"
+RDEPENDS_${PN}-ibt-hw-37.8 = "${PN}-ibt-license"
+RDEPENDS_${PN}-ibt-11-5 = "${PN}-ibt-license"
+RDEPENDS_${PN}-ibt-12-16 = "${PN}-ibt-license"
+RDEPENDS_${PN}-ibt-17 = "${PN}-ibt-license"
+RDEPENDS_${PN}-ibt-misc = "${PN}-ibt-license"
+
+ALLOW_EMPTY_${PN}-ibt= "1"
+ALLOW_EMPTY_${PN}-ibt-misc = "1"
+
+LICENSE_${PN}-i915 = "Firmware-i915"
+LICENSE_${PN}-i915-license = "Firmware-i915"
+FILES_${PN}-i915-license = "${nonarch_base_libdir}/firmware/LICENSE.i915"
+FILES_${PN}-i915 = "${nonarch_base_libdir}/firmware/i915"
+RDEPENDS_${PN}-i915 = "${PN}-i915-license"
+
+FILES_${PN}-adsp-sst-license = "${nonarch_base_libdir}/firmware/LICENCE.adsp_sst"
+LICENSE_${PN}-adsp-sst = "Firmware-adsp_sst"
+LICENSE_${PN}-adsp-sst-license = "Firmware-adsp_sst"
+FILES_${PN}-adsp-sst = "${nonarch_base_libdir}/firmware/intel/dsp_fw*"
+RDEPENDS_${PN}-adsp-sst = "${PN}-adsp-sst-license"
+
+# For QAT
+LICENSE_${PN}-qat = "Firmware-qat"
+LICENSE_${PN}-qat-license = "Firmware-qat"
+FILES_${PN}-qat-license = "${nonarch_base_libdir}/firmware/LICENCE.qat_firmware"
+FILES_${PN}-qat = "${nonarch_base_libdir}/firmware/qat*.bin"
+RDEPENDS_${PN}-qat = "${PN}-qat-license"
+
+# For QCOM VPU/GPU
+LICENSE_${PN}-qcom-license = "Firmware-qcom"
+FILES_${PN}-qcom-license = "${nonarch_base_libdir}/firmware/LICENSE.qcom ${nonarch_base_libdir}/firmware/qcom/NOTICE.txt"
+FILES_${PN}-qcom-venus-1.8 = "${nonarch_base_libdir}/firmware/qcom/venus-1.8/*"
+FILES_${PN}-qcom-venus-4.2 = "${nonarch_base_libdir}/firmware/qcom/venus-4.2/*"
+FILES_${PN}-qcom-adreno-a3xx = "${nonarch_base_libdir}/firmware/qcom/a300_*.fw ${nonarch_base_libdir}/firmware/a300_*.fw"
+FILES_${PN}-qcom-adreno-a530 = "${nonarch_base_libdir}/firmware/qcom/a530*.*"
+RDEPENDS_${PN}-qcom-venus-1.8 = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-venus-4.2 = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-adreno-a3xx = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-adreno-a530 = "${PN}-qcom-license"
+
+FILES_${PN}-liquidio = "${nonarch_base_libdir}/firmware/liquidio"
+
+# For other firmwares
+# Maybe split out to separate packages when needed.
+LICENSE_${PN} = "\
+ Firmware-Abilis \
+ & Firmware-agere \
+ & Firmware-amdgpu \
+ & Firmware-amd-ucode \
+ & Firmware-atmel \
+ & Firmware-ca0132 \
+ & Firmware-cavium \
+ & Firmware-chelsio_firmware \
+ & Firmware-cw1200 \
+ & Firmware-dib0700 \
+ & Firmware-e100 \
+ & Firmware-ene_firmware \
+ & Firmware-fw_sst_0f28 \
+ & Firmware-go7007 \
+ & Firmware-hfi1_firmware \
+ & Firmware-i2400m \
+ & Firmware-ibt_firmware \
+ & Firmware-it913x \
+ & Firmware-IntcSST2 \
+ & Firmware-kaweth \
+ & Firmware-moxa \
+ & Firmware-myri10ge_firmware \
+ & Firmware-nvidia \
+ & Firmware-OLPC \
+ & Firmware-ath9k-htc \
+ & Firmware-phanfw \
+ & Firmware-qat \
+ & Firmware-qcom \
+ & Firmware-qla1280 \
+ & Firmware-qla2xxx \
+ & Firmware-r8a779x_usb3 \
+ & Firmware-radeon \
+ & Firmware-ralink_a_mediatek_company_firmware \
+ & Firmware-ralink-firmware \
+ & Firmware-imx-sdma_firmware \
+ & Firmware-siano \
+ & Firmware-tda7706-firmware \
+ & Firmware-ti-connectivity \
+ & Firmware-ti-keystone \
+ & Firmware-ueagle-atm4-firmware \
+ & Firmware-wl1251 \
+ & Firmware-xc4000 \
+ & Firmware-xc5000 \
+ & Firmware-xc5000c \
+ & WHENCE \
+"
+
+FILES_${PN}-license += "${nonarch_base_libdir}/firmware/LICEN*"
+FILES_${PN} += "${nonarch_base_libdir}/firmware/*"
+RDEPENDS_${PN} += "${PN}-license"
+RDEPENDS_${PN} += "${PN}-whence-license"
+
+# Make linux-firmware depend on all of the split-out packages.
+# Make linux-firmware-iwlwifi depend on all of the split-out iwlwifi packages.
+# Make linux-firmware-ibt depend on all of the split-out ibt packages.
+python populate_packages_prepend () {
+ firmware_pkgs = oe.utils.packages_filter_out_system(d)
+ d.appendVar('RRECOMMENDS_linux-firmware', ' ' + ' '.join(firmware_pkgs))
+
+ iwlwifi_pkgs = filter(lambda x: x.find('-iwlwifi-') != -1, firmware_pkgs)
+ d.appendVar('RRECOMMENDS_linux-firmware-iwlwifi', ' ' + ' '.join(iwlwifi_pkgs))
+
+ ibt_pkgs = filter(lambda x: x.find('-ibt-') != -1, firmware_pkgs)
+ d.appendVar('RRECOMMENDS_linux-firmware-ibt', ' ' + ' '.join(ibt_pkgs))
+}
+
+# Firmware files are generally not ran on the CPU, so they can be
+# allarch despite being architecture specific
+INSANE_SKIP = "arch"
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
deleted file mode 100644
index 8e68ae8234..0000000000
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ /dev/null
@@ -1,629 +0,0 @@
-SUMMARY = "Firmware files for use with Linux kernel"
-SECTION = "kernel"
-
-LICENSE = "\
- Firmware-Abilis \
- & Firmware-adsp_sst \
- & Firmware-agere \
- & Firmware-amdgpu \
- & Firmware-amd-ucode \
- & Firmware-atheros_firmware \
- & Firmware-atmel \
- & Firmware-broadcom_bcm43xx \
- & Firmware-ca0132 \
- & Firmware-cavium \
- & Firmware-chelsio_firmware \
- & Firmware-cw1200 \
- & Firmware-dib0700 \
- & Firmware-e100 \
- & Firmware-ene_firmware \
- & Firmware-fw_sst_0f28 \
- & Firmware-go7007 \
- & Firmware-hfi1_firmware \
- & Firmware-i2400m \
- & Firmware-i915 \
- & Firmware-ibt_firmware \
- & Firmware-it913x \
- & Firmware-iwlwifi_firmware \
- & Firmware-IntcSST2 \
- & Firmware-kaweth \
- & Firmware-Marvell \
- & Firmware-moxa \
- & Firmware-mwl8335 \
- & Firmware-myri10ge_firmware \
- & Firmware-nvidia \
- & Firmware-OLPC \
- & Firmware-ath9k-htc \
- & Firmware-phanfw \
- & Firmware-qat \
- & Firmware-qla1280 \
- & Firmware-qla2xxx \
- & Firmware-qualcommAthos_ar3k \
- & Firmware-qualcommAthos_ath10k \
- & Firmware-r8a779x_usb3 \
- & Firmware-radeon \
- & Firmware-ralink_a_mediatek_company_firmware \
- & Firmware-ralink-firmware \
- & Firmware-rtlwifi_firmware \
- & Firmware-siano \
- & Firmware-tda7706-firmware \
- & Firmware-ti-connectivity \
- & Firmware-ti-keystone \
- & Firmware-ueagle-atm4-firmware \
- & Firmware-via_vt6656 \
- & Firmware-wl1251 \
- & Firmware-xc4000 \
- & Firmware-xc5000 \
- & Firmware-xc5000c \
- & WHENCE \
-"
-
-LIC_FILES_CHKSUM = "\
- file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
- file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \
- file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
- file://LICENSE.amdgpu;md5=3fe8a3430700a518990c3b3d75297209 \
- file://LICENSE.amd-ucode;md5=3a0de451253cc1edbf30a3c621effee3 \
- file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
- file://LICENSE.atmel;md5=aa74ac0c60595dee4d4e239107ea77a3 \
- file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \
- file://LICENCE.ca0132;md5=209b33e66ee5be0461f13d31da392198 \
- file://LICENCE.cavium;md5=c37aaffb1ebe5939b2580d073a95daea \
- file://LICENCE.chelsio_firmware;md5=819aa8c3fa453f1b258ed8d168a9d903 \
- file://LICENCE.cw1200;md5=f0f770864e7a8444a5c5aa9d12a3a7ed \
- file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \
- file://LICENCE.e100;md5=ec0f84136766df159a3ae6d02acdf5a8 \
- file://LICENCE.ene_firmware;md5=ed67f0f62f8f798130c296720b7d3921 \
- file://LICENCE.fw_sst_0f28;md5=6353931c988ad52818ae733ac61cd293 \
- file://LICENCE.go7007;md5=c0bb9f6aaaba55b0529ee9b30aa66beb \
- file://LICENSE.hfi1_firmware;md5=5e7b6e586ce7339d12689e49931ad444 \
- file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \
- file://LICENSE.i915;md5=2b0b2e0d20984affd4490ba2cba02570 \
- file://LICENCE.ibt_firmware;md5=fdbee1ddfe0fb7ab0b2fcd6b454a366b \
- file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
- file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 \
- file://LICENCE.iwlwifi_firmware;md5=3fd842911ea93c29cd32679aa23e1c88 \
- file://LICENCE.kaweth;md5=b1d876e562f4b3b8d391ad8395dfe03f \
- file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
- file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \
- file://LICENCE.mwl8335;md5=9a6271ee0e644404b2ff3c61fd070983 \
- file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
- file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \
- file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
- file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \
- file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \
- file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
- file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \
- file://LICENCE.qla2xxx;md5=f5ce8529ec5c17cb7f911d2721d90e91 \
- file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \
- file://LICENSE.QualcommAtheros_ath10k;md5=b5fe244fb2b532311de1472a3bc06da5 \
- file://LICENCE.r8a779x_usb3;md5=4c1671656153025d7076105a5da7e498 \
- file://LICENSE.radeon;md5=69612f4f7b141a97659cb1d609a1bde2 \
- file://LICENCE.ralink_a_mediatek_company_firmware;md5=728f1a85fd53fd67fa8d7afb080bc435 \
- file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \
- file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \
- file://LICENCE.siano;md5=602c79ae3f98f1e73d880fd9f940a418 \
- file://LICENCE.tda7706-firmware.txt;md5=835997cf5e3c131d0dddd695c7d9103e \
- file://LICENCE.ti-connectivity;md5=c5e02be633f1499c109d1652514d85ec \
- file://LICENCE.ti-keystone;md5=3a86335d32864b0bef996bee26cc0f2c \
- file://LICENCE.ueagle-atm4-firmware;md5=4ed7ea6b507ccc583b9d594417714118 \
- file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \
- file://LICENCE.wl1251;md5=ad3f81922bb9e197014bb187289d3b5b \
- file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
- file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
- file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
- file://WHENCE;md5=f514a0c53c5d73c2fe98d5861103f0c6 \
-"
-
-# These are not common licenses, set NO_GENERIC_LICENSE for them
-# so that the license files will be copied from fetched source
-NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENCE.Abilis"
-NO_GENERIC_LICENSE[Firmware-adsp_sst] = "LICENCE.adsp_sst"
-NO_GENERIC_LICENSE[Firmware-agere] = "LICENCE.agere"
-NO_GENERIC_LICENSE[Firmware-amdgpu] = "LICENSE.amdgpu"
-NO_GENERIC_LICENSE[Firmware-amd-ucode] = "LICENSE.amd-ucode"
-NO_GENERIC_LICENSE[Firmware-atheros_firmware] = "LICENCE.atheros_firmware"
-NO_GENERIC_LICENSE[Firmware-atmel] = "LICENSE.atmel"
-NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx] = "LICENCE.broadcom_bcm43xx"
-NO_GENERIC_LICENSE[Firmware-ca0132] = "LICENCE.ca0132"
-NO_GENERIC_LICENSE[Firmware-cavium] = "LICENCE.cavium"
-NO_GENERIC_LICENSE[Firmware-chelsio_firmware] = "LICENCE.chelsio_firmware"
-NO_GENERIC_LICENSE[Firmware-cw1200] = "LICENCE.cw1200"
-NO_GENERIC_LICENSE[Firmware-dib0700] = "LICENSE.dib0700"
-NO_GENERIC_LICENSE[Firmware-e100] = "LICENCE.e100"
-NO_GENERIC_LICENSE[Firmware-ene_firmware] = "LICENCE.ene_firmware"
-NO_GENERIC_LICENSE[Firmware-fw_sst_0f28] = "LICENCE.fw_sst_0f28"
-NO_GENERIC_LICENSE[Firmware-go7007] = "LICENCE.go7007"
-NO_GENERIC_LICENSE[Firmware-hfi1_firmware] = "LICENSE.hfi1_firmware"
-NO_GENERIC_LICENSE[Firmware-i2400m] = "LICENCE.i2400m"
-NO_GENERIC_LICENSE[Firmware-i915] = "LICENSE.i915"
-NO_GENERIC_LICENSE[Firmware-ibt_firmware] = "LICENCE.ibt_firmware"
-NO_GENERIC_LICENSE[Firmware-IntcSST2] = "LICENCE.IntcSST2"
-NO_GENERIC_LICENSE[Firmware-it913x] = "LICENCE.it913x"
-NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware"
-NO_GENERIC_LICENSE[Firmware-kaweth] = "LICENCE.kaweth"
-NO_GENERIC_LICENSE[Firmware-Marvell] = "LICENCE.Marvell"
-NO_GENERIC_LICENSE[Firmware-moxa] = "LICENCE.moxa"
-NO_GENERIC_LICENSE[Firmware-mwl8335] = "LICENCE.mwl8335"
-NO_GENERIC_LICENSE[Firmware-myri10ge_firmware] = "LICENCE.myri10ge_firmware"
-NO_GENERIC_LICENSE[Firmware-nvidia] = "LICENCE.nvidia"
-NO_GENERIC_LICENSE[Firmware-OLPC] = "LICENCE.OLPC"
-NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware"
-NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw"
-NO_GENERIC_LICENSE[Firmware-qat] = "LICENCE.qat_firmware"
-NO_GENERIC_LICENSE[Firmware-qla1280] = "LICENCE.qla1280"
-NO_GENERIC_LICENSE[Firmware-qla2xxx] = "LICENCE.qla2xxx"
-NO_GENERIC_LICENSE[Firmware-qualcommAthos_ar3k] = "LICENSE.QualcommAtheros_ar3k"
-NO_GENERIC_LICENSE[Firmware-qualcommAthos_ath10k] = "LICENSE.QualcommAtheros_ath10k"
-NO_GENERIC_LICENSE[Firmware-r8a779x_usb3] = "LICENCE.r8a779x_usb3"
-NO_GENERIC_LICENSE[Firmware-radeon] = "LICENSE.radeon"
-NO_GENERIC_LICENSE[Firmware-ralink_a_mediatek_company_firmware] = "LICENCE.ralink_a_mediatek_company_firmware"
-NO_GENERIC_LICENSE[Firmware-ralink-firmware] = "LICENCE.ralink-firmware.txt"
-NO_GENERIC_LICENSE[Firmware-rtlwifi_firmware] = "LICENCE.rtlwifi_firmware.txt"
-NO_GENERIC_LICENSE[Firmware-siano] = "LICENCE.siano"
-NO_GENERIC_LICENSE[Firmware-tda7706-firmware] = "LICENCE.tda7706-firmware.txt"
-NO_GENERIC_LICENSE[Firmware-ti-connectivity] = "LICENCE.ti-connectivity"
-NO_GENERIC_LICENSE[Firmware-ti-keystone] = "LICENCE.ti-keystone"
-NO_GENERIC_LICENSE[Firmware-ueagle-atm4-firmware] = "LICENCE.ueagle-atm4-firmware"
-NO_GENERIC_LICENSE[Firmware-via_vt6656] = "LICENCE.via_vt6656"
-NO_GENERIC_LICENSE[Firmware-wl1251] = "LICENCE.wl1251"
-NO_GENERIC_LICENSE[Firmware-xc4000] = "LICENCE.xc4000"
-NO_GENERIC_LICENSE[Firmware-xc5000] = "LICENCE.xc5000"
-NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c"
-NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
-
-SRCREV = "42ad5367dd38371b2a1bb263b6efa85f9b92fc93"
-PE = "1"
-PV = "0.0+git${SRCPV}"
-
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
-
-# Some devices need a specific version, not the latest
-SRC_URI += "https://git.kernel.org/cgit/linux/kernel/git/iwlwifi/linux-firmware.git/plain/iwlwifi-8000C-19.ucode;name=iwlwifi-19"
-
-SRC_URI[iwlwifi-19.md5sum] = "132fbaee36beec5e98714f0bd66f7a1d"
-SRC_URI[iwlwifi-19.sha256sum] = "2034470df64d323b827c4f2d4d0d55be2846b7360179b5574aa28ff77b6c9471"
-
-S = "${WORKDIR}/git"
-
-inherit allarch update-alternatives
-
-CLEANBROKEN = "1"
-
-do_compile() {
- :
-}
-
-do_install() {
- install -d ${D}/lib/firmware/
- cp -r * ${D}/lib/firmware/
-
- # Avoid Makefile to be deployed
- rm ${D}/lib/firmware/Makefile
-
- # Remove unbuild firmware which needs cmake and bash
- rm ${D}/lib/firmware/carl9170fw -rf
-
- # Remove pointless bash script
- rm ${D}/lib/firmware/configure
-
- # Libertas sd8686
- ln -sf libertas/sd8686_v9.bin ${D}/lib/firmware/sd8686.bin
- ln -sf libertas/sd8686_v9_helper.bin ${D}/lib/firmware/sd8686_helper.bin
-
- # fixup wl12xx location, after 2.6.37 the kernel searches a different location for it
- ( cd ${D}/lib/firmware ; ln -sf ti-connectivity/* . )
-
- # Copy the iwlwifi ucode
- cp ${WORKDIR}/iwlwifi-8000C-19.ucode ${D}/lib/firmware/
-}
-
-
-PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
- ${PN}-radeon-license ${PN}-radeon \
- ${PN}-marvell-license ${PN}-sd8686 ${PN}-sd8688 ${PN}-sd8787 ${PN}-sd8797 \
- ${PN}-ti-connectivity-license ${PN}-wl12xx ${PN}-wl18xx \
- ${PN}-vt6656-license ${PN}-vt6656 \
- ${PN}-rtl-license ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su \
- ${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 ${PN}-bcm43340 ${PN}-bcm4339 ${PN}-bcm43430 ${PN}-bcm4354 \
- ${PN}-atheros-license ${PN}-ar9170 ${PN}-carl9170 ${PN}-ath6k ${PN}-ath9k \
- ${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k \
- \
- ${PN}-iwlwifi-license ${PN}-iwlwifi \
- ${PN}-iwlwifi-135-6 \
- ${PN}-iwlwifi-3160-7 ${PN}-iwlwifi-3160-8 ${PN}-iwlwifi-3160-9 \
- ${PN}-iwlwifi-6000-4 ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2a-6 \
- ${PN}-iwlwifi-6000g2b-5 ${PN}-iwlwifi-6000g2b-6 \
- ${PN}-iwlwifi-6050-4 ${PN}-iwlwifi-6050-5 \
- ${PN}-iwlwifi-7260 \
- ${PN}-iwlwifi-7265 \
- ${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \
- ${PN}-iwlwifi-misc \
- ${PN}-i915-license ${PN}-i915 \
- ${PN}-adsp-sst-license ${PN}-adsp-sst \
- ${PN}-bnx2-mips \
- ${PN}-whence-license \
- ${PN}-license \
- "
-
-# For atheros
-LICENSE_${PN}-ar9170 = "Firmware-atheros_firmware"
-LICENSE_${PN}-ath6k = "Firmware-atheros_firmware"
-LICENSE_${PN}-ath9k = "Firmware-atheros_firmware"
-LICENSE_${PN}-atheros-license = "Firmware-atheros_firmware"
-
-FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware"
-FILES_${PN}-ar9170 = " \
- /lib/firmware/ar9170*.fw \
-"
-FILES_${PN}-carl9170 = " \
- /lib/firmware/carl9170*.fw \
-"
-FILES_${PN}-ath6k = " \
- /lib/firmware/ath6k \
-"
-FILES_${PN}-ath9k = " \
- /lib/firmware/ar9271.fw \
- /lib/firmware/ar7010*.fw \
- /lib/firmware/htc_9271.fw \
- /lib/firmware/htc_7010.fw \
-"
-
-RDEPENDS_${PN}-ar9170 += "${PN}-atheros-license"
-RDEPENDS_${PN}-carl9170 += "${PN}-atheros-license"
-RDEPENDS_${PN}-ath6k += "${PN}-atheros-license"
-RDEPENDS_${PN}-ath9k += "${PN}-atheros-license"
-
-# For QualCommAthos
-LICENSE_${PN}-ar3k = "Firmware-qualcommAthos_ar3k"
-LICENSE_${PN}-ar3k-license = "Firmware-qualcommAthos_ar3k"
-LICENSE_${PN}-ath10k = "Firmware-qualcommAthos_ath10k"
-LICENSE_${PN}-ath10k-license = "Firmware-qualcommAthos_ath10k"
-
-FILES_${PN}-ar3k-license = "/lib/firmware/LICENSE.QualcommAtheros_ar3k"
-FILES_${PN}-ar3k = " \
- /lib/firmware/ar3k \
-"
-
-FILES_${PN}-ath10k-license = "/lib/firmware/LICENSE.QualcommAtheros_ath10k"
-FILES_${PN}-ath10k = " \
- /lib/firmware/ath10k \
-"
-
-RDEPENDS_${PN}-ar3k += "${PN}-ar3k-license"
-RDEPENDS_${PN}-ath10k += "${PN}-ath10k-license"
-
-# For ralink
-LICENSE_${PN}-ralink = "Firmware-ralink-firmware"
-LICENSE_${PN}-ralink-license = "Firmware-ralink-firmware"
-
-FILES_${PN}-ralink-license = "/lib/firmware/LICENCE.ralink-firmware.txt"
-FILES_${PN}-ralink = " \
- /lib/firmware/rt*.bin \
-"
-
-RDEPENDS_${PN}-ralink += "${PN}-ralink-license"
-
-# For radeon
-LICENSE_${PN}-radeon = "Firmware-radeon"
-LICENSE_${PN}-radeon-license = "Firmware-radeon"
-
-FILES_${PN}-radeon-license = "/lib/firmware/LICENSE.radeon"
-FILES_${PN}-radeon = " \
- /lib/firmware/radeon \
-"
-
-RDEPENDS_${PN}-radeon += "${PN}-radeon-license"
-
-# For marvell
-LICENSE_${PN}-sd8686 = "Firmware-Marvell"
-LICENSE_${PN}-sd8688 = "Firmware-Marvell"
-LICENSE_${PN}-sd8787 = "Firmware-Marvell"
-LICENSE_${PN}-sd8797 = "Firmware-Marvell"
-LICENSE_${PN}-marvell-license = "Firmware-Marvell"
-
-FILES_${PN}-marvell-license = "/lib/firmware/LICENCE.Marvell"
-FILES_${PN}-sd8686 = " \
- /lib/firmware/libertas/sd8686_v9* \
- /lib/firmware/sd8686* \
-"
-FILES_${PN}-sd8688 = " \
- /lib/firmware/libertas/sd8688* \
- /lib/firmware/mrvl/sd8688* \
-"
-FILES_${PN}-sd8787 = " \
- /lib/firmware/mrvl/sd8787_uapsta.bin \
-"
-FILES_${PN}-sd8797 = " \
- /lib/firmware/mrvl/sd8797_uapsta.bin \
-"
-
-RDEPENDS_${PN}-sd8686 += "${PN}-marvell-license"
-RDEPENDS_${PN}-sd8688 += "${PN}-marvell-license"
-RDEPENDS_${PN}-sd8787 += "${PN}-marvell-license"
-RDEPENDS_${PN}-sd8797 += "${PN}-marvell-license"
-
-# For rtl
-LICENSE_${PN}-rtl8192cu = "Firmware-rtlwifi_firmware"
-LICENSE_${PN}-rtl8192ce = "Firmware-rtlwifi_firmware"
-LICENSE_${PN}-rtl8192su = "Firmware-rtlwifi_firmware"
-LICENSE_${PN}-rtl-license = "Firmware-rtlwifi_firmware"
-
-FILES_${PN}-rtl-license = " \
- /lib/firmware/LICENCE.rtlwifi_firmware.txt \
-"
-FILES_${PN}-rtl8192cu = " \
- /lib/firmware/rtlwifi/rtl8192cufw*.bin \
-"
-FILES_${PN}-rtl8192ce = " \
- /lib/firmware/rtlwifi/rtl8192cfw*.bin \
-"
-FILES_${PN}-rtl8192su = " \
- /lib/firmware/rtlwifi/rtl8712u.bin \
-"
-
-RDEPENDS_${PN}-rtl8192ce += "${PN}-rtl-license"
-RDEPENDS_${PN}-rtl8192cu += "${PN}-rtl-license"
-RDEPENDS_${PN}-rtl8192su = "${PN}-rtl-license"
-
-# For ti-connectivity
-LICENSE_${PN}-wl12xx = "Firmware-ti-connectivity"
-LICENSE_${PN}-wl18xx = "Firmware-ti-connectivity"
-LICENSE_${PN}-ti-connectivity-license = "Firmware-ti-connectivity"
-
-FILES_${PN}-ti-connectivity-license = "/lib/firmware/LICENCE.ti-connectivity"
-FILES_${PN}-wl12xx = " \
- /lib/firmware/wl12* \
- /lib/firmware/TI* \
- /lib/firmware/ti-connectivity \
-"
-FILES_${PN}-wl18xx = " \
- /lib/firmware/wl18* \
- /lib/firmware/TI* \
- /lib/firmware/ti-connectivity \
-"
-
-RDEPENDS_${PN}-wl12xx = "${PN}-ti-connectivity-license"
-RDEPENDS_${PN}-wl18xx = "${PN}-ti-connectivity-license"
-
-# For vt6656
-LICENSE_${PN}-vt6656 = "Firmware-via_vt6656"
-LICENSE_${PN}-vt6656-license = "Firmware-via_vt6656"
-
-FILES_${PN}-vt6656-license = "/lib/firmware/LICENCE.via_vt6656"
-FILES_${PN}-vt6656 = " \
- /lib/firmware/vntwusb.fw \
-"
-
-RDEPENDS_${PN}-vt6656 = "${PN}-vt6656-license"
-
-# For broadcom
-#
-# WARNING: The ALTERNATIVE_* variables are not using ${PN} because of
-# a bug in bitbake; when this is fixed and bitbake learns how to proper
-# pass variable flags with expansion we can rework this patch.
-
-LICENSE_${PN}-bcm4329 = "Firmware-broadcom_bcm43xx"
-LICENSE_${PN}-bcm4330 = "Firmware-broadcom_bcm43xx"
-LICENSE_${PN}-bcm4334 = "Firmware-broadcom_bcm43xx"
-LICENSE_${PN}-bcm43340 = "Firmware-broadcom_bcm43xx"
-LICENSE_${PN}-bcm4339 = "Firmware-broadcom_bcm43xx"
-LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx"
-LICENSE_${PN}-bcm4354 = "Firmware-broadcom_bcm43xx"
-LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx"
-
-FILES_${PN}-broadcom-license = " \
- /lib/firmware/LICENCE.broadcom_bcm43xx \
-"
-FILES_${PN}-bcm4329 = " \
- /lib/firmware/brcm/brcmfmac4329-sdio.bin \
-"
-FILES_${PN}-bcm4330 = " \
- /lib/firmware/brcm/brcmfmac4330-sdio.bin \
-"
-FILES_${PN}-bcm4334 = " \
- /lib/firmware/brcm/brcmfmac4334-sdio.bin \
-"
-FILES_${PN}-bcm43340 = " \
- /lib/firmware/brcm/brcmfmac43340-sdio.bin \
-"
-FILES_${PN}-bcm4339 = " \
- /lib/firmware/brcm/brcmfmac4339-sdio.bin \
-"
-FILES_${PN}-bcm43430 = " \
- /lib/firmware/brcm/brcmfmac43430-sdio.bin \
-"
-FILES_${PN}-bcm4354 = " \
- /lib/firmware/brcm/brcmfmac4354-sdio.bin \
-"
-
-ALTERNATIVE_LINK_NAME[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac-sdio.bin"
-
-ALTERNATIVE_linux-firmware-bcm4334 = "brcmfmac-sdio.bin"
-ALTERNATIVE_TARGET_linux-firmware-bcm4334[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4334-sdio.bin"
-ALTERNATIVE_linux-firmware-bcm43340 = "brcmfmac-sdio.bin"
-ALTERNATIVE_TARGET_linux-firmware-bcm43340[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac43340-sdio.bin"
-ALTERNATIVE_linux_firmware-bcm4354 = "brcmfmac-sdio.bin"
-ALTERNATIVE_TARGET_linux-firmware-bcm4354[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4354-sdio.bin"
-ALTERNATIVE_linux-firmware-bcm4329 = "brcmfmac-sdio.bin"
-ALTERNATIVE_TARGET_linux-firmware-bcm4329[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4329-sdio.bin"
-ALTERNATIVE_linux-firmware-bcm4330 = "brcmfmac-sdio.bin"
-ALTERNATIVE_TARGET_linux-firmware-bcm4330[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4330-sdio.bin"
-ALTERNATIVE_linux-firmware-bcm4339 = "brcmfmac-sdio.bin"
-ALTERNATIVE_TARGET_linux-firmware-bcm4339[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4339-sdio.bin"
-ALTERNATIVE_PRIORITY_linux-firmware-bcm4339[brcmfmac-sdio.bin] = "20"
-ALTERNATIVE_linux-firmware-bcm43430 = "brcmfmac-sdio.bin"
-ALTERNATIVE_TARGET_linux-firmware-bcm43430[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac43430-sdio.bin"
-
-RDEPENDS_${PN}-bcm4329 += "${PN}-broadcom-license"
-RDEPENDS_${PN}-bcm4330 += "${PN}-broadcom-license"
-RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license"
-RDEPENDS_${PN}-bcm43340 += "${PN}-broadcom-license"
-RDEPENDS_${PN}-bcm4339 += "${PN}-broadcom-license"
-RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license"
-RDEPENDS_${PN}-bcm4354 += "${PN}-broadcom-license"
-
-# For Broadcom bnx2-mips
-#
-# which is a separate case to the other Broadcom firmwares since its
-# license is contained in the shared WHENCE file.
-
-LICENSE_${PN}-bnx2-mips = "WHENCE"
-LICENSE_${PN}-whence-license = "WHENCE"
-
-FILES_${PN}-bnx2-mips = "/lib/firmware/bnx2/bnx2-mips-09-6.2.1b.fw"
-FILES_${PN}-whence-license = "/lib/firmware/WHENCE"
-
-RDEPENDS_${PN}-bnx2-mips += "${PN}-whence-license"
-
-# For iwlwifi
-LICENSE_${PN}-iwlwifi = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-135-6 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-3160-7 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-3160-8 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-3160-9 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-6000-4 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-6000g2a-5 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-6000g2a-6 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-6000g2b-5 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-6000g2b-6 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-6050-4 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-6050-5 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-7260 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-7265 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-7265d = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-8000c = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-8265 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-misc = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-license = "Firmware-iwlwifi_firmware"
-
-
-FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware"
-FILES_${PN}-iwlwifi-135-6 = "/lib/firmware/iwlwifi-135-6.ucode"
-FILES_${PN}-iwlwifi-3160-7 = "/lib/firmware/iwlwifi-3160-7.ucode"
-FILES_${PN}-iwlwifi-3160-8 = "/lib/firmware/iwlwifi-3160-8.ucode"
-FILES_${PN}-iwlwifi-3160-9 = "/lib/firmware/iwlwifi-3160-9.ucode"
-FILES_${PN}-iwlwifi-6000-4 = "/lib/firmware/iwlwifi-6000-4.ucode"
-FILES_${PN}-iwlwifi-6000g2a-5 = "/lib/firmware/iwlwifi-6000g2a-5.ucode"
-FILES_${PN}-iwlwifi-6000g2a-6 = "/lib/firmware/iwlwifi-6000g2a-6.ucode"
-FILES_${PN}-iwlwifi-6000g2b-5 = "/lib/firmware/iwlwifi-6000g2b-5.ucode"
-FILES_${PN}-iwlwifi-6000g2b-6 = "/lib/firmware/iwlwifi-6000g2b-6.ucode"
-FILES_${PN}-iwlwifi-6050-4 = "/lib/firmware/iwlwifi-6050-4.ucode"
-FILES_${PN}-iwlwifi-6050-5 = "/lib/firmware/iwlwifi-6050-5.ucode"
-FILES_${PN}-iwlwifi-7260 = "/lib/firmware/iwlwifi-7260-*.ucode"
-FILES_${PN}-iwlwifi-7265 = "/lib/firmware/iwlwifi-7265-*.ucode"
-FILES_${PN}-iwlwifi-7265d = "/lib/firmware/iwlwifi-7265D-*.ucode"
-FILES_${PN}-iwlwifi-8000c = "/lib/firmware/iwlwifi-8000C-*.ucode"
-FILES_${PN}-iwlwifi-8265 = "/lib/firmware/iwlwifi-8265-*.ucode"
-FILES_${PN}-iwlwifi-misc = "/lib/firmware/iwlwifi-*.ucode"
-
-RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-3160-7 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-3160-8 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-3160-9 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-6000-4 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-6000g2b-5 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-6050-4 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-6050-5 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7265d = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-8000c = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-8265 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-misc = "${PN}-iwlwifi-license"
-
-# -iwlwifi-misc is a "catch all" package that includes all the iwlwifi
-# firmwares that are not already included in other -iwlwifi- packages.
-# -iwlwifi is a virtual package that depends upon all iwlwifi packages.
-# These are distinct in order to allow the -misc firmwares to be installed
-# without pulling in every other iwlwifi package.
-ALLOW_EMPTY_${PN}-iwlwifi = "1"
-ALLOW_EMPTY_${PN}-iwlwifi-misc = "1"
-
-# Handle package updating for the newly merged iwlwifi groupings
-RPROVIDES_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
-RREPLACES_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
-RCONFLICTS_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
-
-RPROVIDES_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
-RREPLACES_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
-RCONFLICTS_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
-
-LICENSE_${PN}-i915 = "Firmware-i915"
-LICENSE_${PN}-i915-license = "Firmware-i915"
-FILES_${PN}-i915-license = "/lib/firmware/LICENSE.i915"
-FILES_${PN}-i915 = "/lib/firmware/i915"
-RDEPENDS_${PN}-i915 = "${PN}-i915-license"
-
-FILES_${PN}-adsp-sst-license = "/lib/firmware/LICENCE.adsp_sst"
-LICENSE_${PN}-adsp-sst = "Firmware-adsp_sst"
-LICENSE_${PN}-adsp-sst-license = "Firmware-adsp_sst"
-FILES_${PN}-adsp-sst = "/lib/firmware/intel/dsp_fw*"
-RDEPENDS_${PN}-adsp-sst = "${PN}-adsp-sst-license"
-
-# For other firmwares
-# Maybe split out to separate packages when needed.
-LICENSE_${PN} = "\
- Firmware-Abilis \
- & Firmware-agere \
- & Firmware-amdgpu \
- & Firmware-amd-ucode \
- & Firmware-atmel \
- & Firmware-ca0132 \
- & Firmware-cavium \
- & Firmware-chelsio_firmware \
- & Firmware-cw1200 \
- & Firmware-dib0700 \
- & Firmware-e100 \
- & Firmware-ene_firmware \
- & Firmware-fw_sst_0f28 \
- & Firmware-go7007 \
- & Firmware-hfi1_firmware \
- & Firmware-i2400m \
- & Firmware-ibt_firmware \
- & Firmware-it913x \
- & Firmware-IntcSST2 \
- & Firmware-kaweth \
- & Firmware-moxa \
- & Firmware-mwl8335 \
- & Firmware-myri10ge_firmware \
- & Firmware-nvidia \
- & Firmware-OLPC \
- & Firmware-ath9k-htc \
- & Firmware-phanfw \
- & Firmware-qat \
- & Firmware-qla1280 \
- & Firmware-qla2xxx \
- & Firmware-r8a779x_usb3 \
- & Firmware-radeon \
- & Firmware-ralink_a_mediatek_company_firmware \
- & Firmware-ralink-firmware \
- & Firmware-siano \
- & Firmware-tda7706-firmware \
- & Firmware-ti-connectivity \
- & Firmware-ti-keystone \
- & Firmware-ueagle-atm4-firmware \
- & Firmware-wl1251 \
- & Firmware-xc4000 \
- & Firmware-xc5000 \
- & Firmware-xc5000c \
- & WHENCE \
-"
-
-FILES_${PN}-license += "/lib/firmware/LICEN*"
-FILES_${PN} += "/lib/firmware/*"
-RDEPENDS_${PN} += "${PN}-license"
-RDEPENDS_${PN} += "${PN}-whence-license"
-
-# Make linux-firmware depend on all of the split-out packages.
-# Make linux-firmware-iwlwifi depend on all of the split-out iwlwifi packages.
-python populate_packages_prepend () {
- firmware_pkgs = oe.utils.packages_filter_out_system(d)
- d.appendVar('RDEPENDS_linux-firmware', ' ' + ' '.join(firmware_pkgs))
-
- iwlwifi_pkgs = filter(lambda x: x.find('-iwlwifi-') != -1, firmware_pkgs)
- d.appendVar('RDEPENDS_linux-firmware-iwlwifi', ' ' + ' '.join(iwlwifi_pkgs))
-}
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 078d752caa..7f838f623e 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -30,34 +30,34 @@ LICENSE = "GPLv2"
#
# -- RP
-LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
python __anonymous () {
- major = d.getVar("PV",True).split('.')[0]
+ major = d.getVar("PV").split('.')[0]
if major == "3":
d.setVar("HEADER_FETCH_VER", "3.0")
elif major == "4":
d.setVar("HEADER_FETCH_VER", "4.x")
+ elif major == "5":
+ d.setVar("HEADER_FETCH_VER", "5.x")
else:
d.setVar("HEADER_FETCH_VER", "2.6")
}
-inherit kernel-arch
+inherit kernel-arch pkgconfig multilib_header
KORG_ARCHIVE_COMPRESSION ?= "xz"
SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.${KORG_ARCHIVE_COMPRESSION}"
+UPSTREAM_CHECK_URI = "https://www.kernel.org/"
S = "${WORKDIR}/linux-${PV}"
EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}""
-do_configure() {
- oe_runmake allnoconfig
-}
+do_configure[noexec] = "1"
-do_compile () {
-}
+do_compile[noexec] = "1"
do_install() {
oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}
@@ -68,11 +68,27 @@ do_install() {
find ${D}${includedir} -name ..install.cmd | xargs rm -f
}
+do_install_append_aarch64 () {
+ do_install_armmultilib
+}
+
+do_install_append_arm () {
+ do_install_armmultilib
+}
+
+do_install_append_armeb () {
+ do_install_armmultilib
+}
+
+do_install_armmultilib () {
+ oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
+ oe_multilib_header asm/posix_types.h asm/ptrace.h asm/setup.h asm/sigcontext.h asm/siginfo.h asm/signal.h asm/stat.h asm/statfs.h asm/swab.h asm/types.h asm/unistd.h
+}
+
BBCLASSEXTEND = "nativesdk"
-#DEPENDS = "cross-linkage"
RDEPENDS_${PN}-dev = ""
RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS += "unifdef-native"
+DEPENDS += "unifdef-native bison-native"
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch
new file mode 100644
index 0000000000..68b244698f
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch
@@ -0,0 +1,31 @@
+From 897736166fd709906a5fdf16eb23f8fddff770b5 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Thu, 1 Mar 2018 18:31:01 -0500
+Subject: [PATCH] if_ether: move muslc ethhdr protection to uapi file
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+Upstream-Status: Pending
+---
+ include/uapi/linux/if_ether.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
+index 153c9c2..7b69b73 100644
+--- a/include/uapi/linux/if_ether.h
++++ b/include/uapi/linux/if_ether.h
+@@ -149,6 +149,12 @@
+ * This is an Ethernet frame header.
+ */
+
++#ifdef _NETINET_IF_ETHER_H /* musl */
++#define __UAPI_DEF_ETHHDR 0
++#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */
++#define __UAPI_DEF_ETHHDR 1
++#endif
++
+ /* allow libcs like musl to deactivate this, glibc does not implement this. */
+ #ifndef __UAPI_DEF_ETHHDR
+ #define __UAPI_DEF_ETHHDR 1
+--
+2.7.4
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
new file mode 100644
index 0000000000..9d17daa70f
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
@@ -0,0 +1,44 @@
+From 9708dc74d9f49488d669e070982f6224a888d61a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 12 Sep 2018 17:08:58 -0700
+Subject: [PATCH] include linux/stddef.h in swab.h uapi header
+
+swab.h uses __always_inline without including the header where it is
+defined, this is exposed by musl based distributions where this macro is
+not defined by system C library headers unlike glibc where it is defined
+in sys/cdefs.h and that header gets pulled in indirectly via
+
+features.h -> sys/cdefs.h
+
+and features.h gets pulled in a lot of headers. Therefore it may work in
+cases where features.h is includes but not otherwise.
+
+Adding linux/stddef.h here ensures that __always_inline is always
+defined independent of which C library is used in userspace
+
+Upstream-Status: Submitted [https://lkml.org/lkml/2018/9/13/78]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Cc: Philippe Ombredanne <pombredanne@nexb.com>
+Cc: Kate Stewart <kstewart@linuxfoundation.org>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+---
+ include/uapi/linux/swab.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
+index 23cd84868cc3..acddbe50a20d 100644
+--- a/include/uapi/linux/swab.h
++++ b/include/uapi/linux/swab.h
+@@ -3,6 +3,7 @@
+ #define _UAPI_LINUX_SWAB_H
+
+ #include <linux/types.h>
++#include <linux/stddef.h>
+ #include <linux/compiler.h>
+ #include <asm/swab.h>
+
+--
+2.19.0
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch
new file mode 100644
index 0000000000..78ebd31e66
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch
@@ -0,0 +1,41 @@
+From 9ca6c6a510bda90954aa2532711200b89dd1df89 Mon Sep 17 00:00:00 2001
+From: Dave Martin <Dave.Martin@arm.com>
+Date: Tue, 11 Dec 2018 19:26:45 +0000
+Subject: [PATCH 1/3] kbuild: install_headers.sh: Strip _UAPI from
+ #if-defined() guards
+
+install_headers.sh knows how to strip the _UAPI prefix from #ifdef/
+ifndef and #define directives used to guard headers against multiple
+or inappropriate inclusion. Currently this does not work for guards
+in the "#if defined()" style, which may be needed for non-trivial
+cases.
+
+This patch adds similar logic so that the _UAPI prefix is also
+stripped from guard directives written using "#if defined()" etc.
+
+This is not completely foolproof, but will work for simple cases of
+using #if defined() to guard against inappropriate header inclusion.
+
+Signed-off-by: Dave Martin <Dave.Martin@arm.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+Upstream-Status: Submitted [https://www.spinics.net/lists/arm-kernel/msg694800.html]
+---
+ scripts/headers_install.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
+index 593f8879c641..fe1d3fc0d33a 100755
+--- a/scripts/headers_install.sh
++++ b/scripts/headers_install.sh
+@@ -38,6 +38,7 @@ do
+ -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \
+ -e 's/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g' \
+ -e 's@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @' \
++ -e ':1;s/(#(if|elif)(.*[^A-Za-z0-9_])defined\([[:space:]]*)_UAPI/\1/;t1' \
+ "$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || exit 1
+ scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \
+ > "$OUTDIR/$FILE"
+--
+2.5.0
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
index 8bb775ccf7..064a39193d 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
@@ -11,11 +11,11 @@ Upstream-Status: Submitted
include/uapi/linux/libc-compat.h | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
-Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
+Index: linux-4.15/include/uapi/linux/libc-compat.h
===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h
-+++ linux-4.8-rc4/include/uapi/linux/libc-compat.h
-@@ -48,13 +48,12 @@
+--- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:37:44.724314379 -0500
++++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:38:02.148913820 -0500
+@@ -49,13 +49,12 @@
#ifndef _UAPI_LIBC_COMPAT_H
#define _UAPI_LIBC_COMPAT_H
@@ -33,7 +33,7 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
* that would already be defined. */
#define __UAPI_DEF_IF_IFCONF 0
-@@ -98,15 +97,7 @@
+@@ -99,15 +98,7 @@
#define __UAPI_DEF_IN_CLASS 0
#define __UAPI_DEF_IN6_ADDR 0
@@ -49,7 +49,7 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
#define __UAPI_DEF_SOCKADDR_IN6 0
#define __UAPI_DEF_IPV6_MREQ 0
#define __UAPI_DEF_IPPROTO_V6 0
-@@ -114,10 +105,10 @@
+@@ -115,10 +106,10 @@
#define __UAPI_DEF_IN6_PKTINFO 0
#define __UAPI_DEF_IP6_MTUINFO 0
@@ -62,7 +62,7 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
* __UAPI_DEF_* defines and adjust appropriately. */
#define __UAPI_DEF_IN_ADDR 1
#define __UAPI_DEF_IN_IPPROTO 1
-@@ -127,7 +118,7 @@
+@@ -128,7 +119,7 @@
#define __UAPI_DEF_IN_CLASS 1
#define __UAPI_DEF_IN6_ADDR 1
@@ -71,18 +71,18 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
* coordinate. */
#define __UAPI_DEF_IN6_ADDR_ALT 1
#define __UAPI_DEF_SOCKADDR_IN6 1
-@@ -149,7 +140,7 @@
- /* If we did not see any headers from any supported C libraries,
+@@ -170,7 +161,7 @@
* or we are being included in the kernel, then define everything
- * that we need. */
+ * that we need. Check for previous __UAPI_* definitions to give
+ * unsupported C libraries a way to opt out of any kernel definition. */
-#else /* !defined(__GLIBC__) */
+#else /* __KERNEL__ */
/* Definitions for if.h */
- #define __UAPI_DEF_IF_IFCONF 1
-@@ -182,6 +173,6 @@
- /* Definitions for xattr.h */
+ #ifndef __UAPI_DEF_IF_IFCONF
+@@ -262,6 +253,6 @@
#define __UAPI_DEF_XATTR 1
+ #endif
-#endif /* __GLIBC__ */
+#endif /* __KERNEL__ */
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch
new file mode 100644
index 0000000000..bde2132ebf
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch
@@ -0,0 +1,46 @@
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [v2,2/3] uapi glibc compat: fix build if libc defines IFF_ECHO
+From: Hauke Mehrtens <hauke@hauke-m.de>
+X-Patchwork-Id: 9686293
+Message-Id: <20170418210036.26039-3-hauke@hauke-m.de>
+To: davem@davemloft.net, netdev@vger.kernel.org
+Cc: linux-kernel@vger.kernel.org, jarod@redhat.com, jogo@openwrt.org,
+ david.heidelberger@ixit.cz, maillist-linux@barfooze.de,
+ mikko.rapeli@iki.fi, dwmw2@infradead.org, Hauke Mehrtens <hauke@hauke-m.de>
+Date: Tue, 18 Apr 2017 23:00:35 +0200
+
+musl 1.1.15 defines IFF_ECHO and the other net_device_flags options.
+When a user application includes linux/if.h and net/if.h the compile
+will fail.
+
+Activate __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO only when
+it is needed. This should also make this work in case glibc will add
+these defines.
+
+Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi>
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+Upstream-Status: Submitted [https://patchwork.kernel.org/patch/9686293/]
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+Acked-by: Stephane Ayotte <sayotte@tycoint.com>
+ include/uapi/linux/libc-compat.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
+index 43a81136ea6e..ce2fa8a4ced6 100644
+--- a/include/uapi/linux/libc-compat.h
++++ b/include/uapi/linux/libc-compat.h
+@@ -64,9 +64,11 @@
+ /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
+ #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
+ /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
++#ifndef IFF_ECHO
+ #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
+ #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
+ #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
++#endif /* IFF_ECHO */
+
+ #else /* _NET_IF_H */
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch
new file mode 100644
index 0000000000..a5ded602e5
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch
@@ -0,0 +1,67 @@
+From 694eba7bb974f6b8bd308804cb24350150108b2b Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 21 Nov 2018 15:12:43 +0800
+Subject: [PATCH] scripts: Use fixed input and output files instead of pipe for here-doc
+
+There was a bug of "as" in binutils that when it checks if the input file and
+output file are the same one, it would not check if they are on the same block
+device. The check is introduced by the following commit in v2.31.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
+67f846b59b32f3d704c601669409c2584383fea9
+
+The here-doc usage in this script creates temporary file in /tmp. When we run in
+an environment where /tmp has rarely been used, the newly created temporary file
+may have a very low inode number. If the inode number was 6 which is the same as
+/dev/null, the as would wrongly think the input file and the output file are the
+same and report the following error.
+
+*** Compiler lacks asm-goto support.. Stop.
+
+One observed case happened in docker where the /tmp could be so rarely used that
+very low number inode may be allocated and triggers the error.
+
+The fix below for the bug only exists on the master branch of binutils so far
+and has not been released from upstream. As the convict is introduced since
+v2.31, only v2.31 is affected.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
+2a50366ded329bfb39d387253450c9d5302c3503
+
+When building linux-libc-headers we need to use "as" in binutils which does not
+contain the fix for the moment. To work around the error, we create a fixed
+temporary file to contain the program being tested.
+
+This patch also removes ">/dev/null 2>&1" so we will have more direct error
+information in case something else wrong happened.
+
+Upstream-Status: Inappropriate [A work around for binutils v2.31]
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ scripts/gcc-goto.sh | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
+index 8b980fb22..d256a9438 100755
+--- a/scripts/gcc-goto.sh
++++ b/scripts/gcc-goto.sh
+@@ -3,7 +3,7 @@
+ # Test for gcc 'asm goto' support
+ # Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
+
+-cat << "END" | $@ -x c - -fno-PIE -c -o /dev/null
++cat << "END" > ./input
+ int main(void)
+ {
+ #if defined(__arm__) || defined(__aarch64__)
+@@ -20,3 +20,6 @@ entry:
+ return 0;
+ }
+ END
++
++$@ -x c ./input -fno-PIE -c -o ./output
++rm ./input ./output
+--
+2.19.1
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
index 8dc1edc33b..fb7e1de17a 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
@@ -11,37 +11,11 @@ Upstream-Status: Submitted
include/uapi/linux/libc-compat.h | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
-Index: linux-4.8-rc4/include/uapi/linux/if_ether.h
+Index: linux-4.15/include/uapi/linux/libc-compat.h
===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/if_ether.h
-+++ linux-4.8-rc4/include/uapi/linux/if_ether.h
-@@ -22,6 +22,7 @@
- #define _UAPI_LINUX_IF_ETHER_H
-
- #include <linux/types.h>
-+#include <linux/libc-compat.h>
-
- /*
- * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
-@@ -138,11 +139,12 @@
- * This is an Ethernet frame header.
- */
-
-+#if __UAPI_DEF_ETHHDR
- struct ethhdr {
- unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
- unsigned char h_source[ETH_ALEN]; /* source ether addr */
- __be16 h_proto; /* packet type ID field */
- } __attribute__((packed));
--
-+#endif
-
- #endif /* _UAPI_LINUX_IF_ETHER_H */
-Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
-===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h
-+++ linux-4.8-rc4/include/uapi/linux/libc-compat.h
-@@ -50,6 +50,12 @@
+--- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.338370731 -0500
++++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.334370603 -0500
+@@ -51,6 +51,12 @@
#ifndef __KERNEL__ /* we're used from userspace */
@@ -52,5 +26,5 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
+#endif
+
/* Coordinate with libc net/if.h header. */
- #if defined(_NET_IF_H) && defined(__USE_MISC)
+ #if defined(_NET_IF_H)
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.4.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.4.bb
deleted file mode 100644
index 3763dc0d3a..0000000000
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.4.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require linux-libc-headers.inc
-
-SRC_URI_append_libc-musl = "\
- file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
- file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
- file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
- "
-SRC_URI[md5sum] = "9a78fa2eb6c68ca5a40ed5af08142599"
-SRC_URI[sha256sum] = "401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2"
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
deleted file mode 100644
index f80f02cb18..0000000000
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require linux-libc-headers.inc
-
-SRC_URI_forcevariable = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/testing/linux-4.8-rc4.tar.${KORG_ARCHIVE_COMPRESSION}"
-PV = "4.8-rc4"
-
-SRC_URI_append_libc-musl = "\
- file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
- file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
- file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
- "
-
-SRC_URI[md5sum] = "269067213995c7742730ce53b8140c90"
-SRC_URI[sha256sum] = "8f07a0d76a7d1a30490582ba9642b7f28370102bc4acc4bb4b2586c8eabf4447"
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.2.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.2.bb
new file mode 100644
index 0000000000..9d18df76c6
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.2.bb
@@ -0,0 +1,18 @@
+require linux-libc-headers.inc
+
+SRC_URI_append_libc-musl = "\
+ file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
+ file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
+ file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
+ file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \
+ file://0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch \
+ file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \
+ "
+
+SRC_URI_append = "\
+ file://0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch \
+ file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \
+"
+
+SRC_URI[md5sum] = "ddf994de00d7b18395886dd9b30b9262"
+SRC_URI[sha256sum] = "54ad66f672e1a831b574f5e704e8a05f1e6180a8245d4bdd811208a6cb0ac1e7"
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 0fdd0ad5f6..b68d945a8f 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -6,7 +6,6 @@ development or external module builds"
SECTION = "kernel"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
inherit linux-kernel-base
@@ -26,48 +25,243 @@ do_unpack[noexec] = "1"
do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
-do_populate_sysroot[noexec] = "1"
+deltask do_populate_sysroot
S = "${STAGING_KERNEL_DIR}"
B = "${STAGING_KERNEL_BUILDDIR}"
-KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
+KERNEL_BUILD_ROOT="${nonarch_base_libdir}/modules/"
+
do_install() {
- kerneldir=${D}${KERNEL_SRC_PATH}
- install -d $kerneldir
-
- #
- # Copy the staging dir source (and module build support) into the devsrc structure.
- # We can keep this copy simple and take everything, since a we'll clean up any build
- # artifacts afterwards, and the extra i/o is not significant
- #
- cd ${B}
- find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
- cd ${S}
- find . -type d -name '.git*' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
-
- # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not
- # The main build artifacts. We clean the directory to avoid QA errors on mismatched
- # architecture (since scripts and helpers are native format).
- KBUILD_OUTPUT="$kerneldir"
- oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
-
- # As of Linux kernel version 3.0.1, the clean target removes
- # arch/powerpc/lib/crtsavres.o which is present in
- # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
- if [ ${ARCH} = "powerpc" ]; then
- mkdir -p $kerneldir/arch/powerpc/lib/
- cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
- fi
-
- chown -R root:root ${D}
+ kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
+ install -d $kerneldir
+
+ # create the directory structure
+ rm -f $kerneldir/build
+ rm -f $kerneldir/source
+ mkdir -p $kerneldir/build
+
+ # for compatibility with some older variants of this package, we
+ # create a /usr/src/kernel symlink to /lib/modules/<version>/source
+ mkdir -p ${D}/usr/src
+ (
+ cd ${D}/usr/src
+ lnr ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
+ )
+
+ # for on target purposes, we unify build and source
+ (
+ cd $kerneldir
+ ln -s build source
+ )
+
+ # first copy everything
+ (
+ cd ${S}
+ cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build
+ cp --parents $(find -type f -name "Build" -o -name "Build.include") $kerneldir/build
+ )
+
+ # then drop all but the needed Makefiles/Kconfig files
+ rm -rf $kerneldir/build/scripts
+ rm -rf $kerneldir/build/include
+
+ # now copy in parts from the build that we'll need later
+ (
+ cd ${B}
+
+ cp Module.symvers $kerneldir/build
+ cp System.map* $kerneldir/build
+ if [ -s Module.markers ]; then
+ cp Module.markers $kerneldir/build
+ fi
+
+ cp .config $kerneldir/build
+
+ # This scripts copy blow up QA, so for now, we require a more
+ # complex 'make scripts' to restore these, versus copying them
+ # here. Left as a reference to indicate that we know the scripts must
+ # be dealt with.
+ # cp -a scripts $kerneldir/build
+
+ if [ -d arch/${ARCH}/scripts ]; then
+ cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH}
+ fi
+ if [ -f arch/${ARCH}/*lds ]; then
+ cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH}
+ fi
+
+ rm -f $kerneldir/build/scripts/*.o
+ rm -f $kerneldir/build/scripts/*/*.o
+
+ if [ "${ARCH}" = "powerpc" ]; then
+ if [ -e arch/powerpc/lib/crtsavres.S ] ||
+ [ -e arch/powerpc/lib/crtsavres.o ]; then
+ cp -a --parents arch/powerpc/lib/crtsavres.[So] $kerneldir/build/
+ fi
+ fi
+
+ if [ "${ARCH}" = "arm64" ]; then
+ cp -a --parents arch/arm64/kernel/vdso/vdso.lds $kerneldir/build/
+ fi
+
+ cp -a include $kerneldir/build/include
+ )
+
+ # now grab the chunks from the source tree that we need
+ (
+ cd ${S}
+
+ cp -a scripts $kerneldir/build
+
+ # if our build dir had objtool, it will also be rebuilt on target, so
+ # we copy what is required for that build
+ if [ -f ${B}/tools/objtool/objtool ]; then
+ # these are a few files associated with objtool, since we'll need to
+ # rebuild it
+ cp -a --parents tools/build/Build.include $kerneldir/build/
+ cp -a --parents tools/build/Build $kerneldir/build/
+ cp -a --parents tools/build/fixdep.c $kerneldir/build/
+ cp -a --parents tools/scripts/utilities.mak $kerneldir/build/
+
+ # extra files, just in case
+ cp -a --parents tools/objtool/* $kerneldir/build/
+ cp -a --parents tools/lib/str_error_r.c $kerneldir/build/
+ cp -a --parents tools/lib/string.c $kerneldir/build/
+ cp -a --parents tools/lib/subcmd/* $kerneldir/build/
+
+ cp -a --parents tools/include/* $kerneldir/build/
+ fi
+
+ if [ "${ARCH}" = "arm64" ]; then
+ # arch/arm64/include/asm/xen references arch/arm
+ cp -a --parents arch/arm/include/asm/xen $kerneldir/build/
+ # arch/arm64/include/asm/opcodes.h references arch/arm
+ cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/
+
+ cp -a --parents arch/arm64/kernel/vdso/*gettimeofday.* $kerneldir/build/
+ cp -a --parents arch/arm64/kernel/vdso/sigreturn.S $kerneldir/build/
+ cp -a --parents arch/arm64/kernel/vdso/note.S $kerneldir/build/
+ cp -a --parents arch/arm64/kernel/vdso/gen_vdso_offsets.sh $kerneldir/build/
+
+ cp -a --parents arch/arm64/kernel/module.lds $kerneldir/build/
+ fi
+
+ if [ "${ARCH}" = "powerpc" ]; then
+ # 5.0 needs these files, but don't error if they aren't present in the source
+ cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || :
+ cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh $kerneldir/build/ 2>/dev/null || :
+ cp -a --parents arch/${ARCH}/kernel/syscalls/syscallhdr.sh $kerneldir/build/ 2>/dev/null || :
+ fi
+
+ # include the machine specific headers for ARM variants, if available.
+ if [ "${ARCH}" = "arm" ]; then
+ cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/
+
+ # include a few files for 'make prepare'
+ cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/
+ cp -a --parents arch/arm/tools/mach-types $kerneldir/build/
+
+ # ARM syscall table tools only exist for kernels v4.10 or later
+ SYSCALL_TOOLS=$(find arch/arm/tools -name "syscall*")
+ if [ -n "$SYSCALL_TOOLS" ] ; then
+ cp -a --parents $SYSCALL_TOOLS $kerneldir/build/
+ fi
+
+ cp -a --parents arch/arm/kernel/module.lds $kerneldir/build/
+ fi
+
+ if [ -d arch/${ARCH}/include ]; then
+ cp -a --parents arch/${ARCH}/include $kerneldir/build/
+ fi
+
+ cp -a include $kerneldir/build
+
+ cp -a --parents lib/vdso/* $kerneldir/build/ 2>/dev/null || :
+
+ cp -a --parents tools/include/tools/le_byteshift.h $kerneldir/build/
+ cp -a --parents tools/include/tools/be_byteshift.h $kerneldir/build/
+
+ # required for generate missing syscalls prepare phase
+ cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl $kerneldir/build
+
+ if [ "${ARCH}" = "x86" ]; then
+ # files for 'make prepare' to succeed with kernel-devel
+ cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl $kerneldir/build/
+ cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh $kerneldir/build/
+ cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh $kerneldir/build/
+ cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl $kerneldir/build/
+ cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/
+ cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/
+ cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/
+ cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/
+ cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/
+ cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/
+
+ # 4.18 + have unified the purgatory files, so we ignore any errors if
+ # these files are not present
+ cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/ 2>/dev/null || :
+ cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/ 2>/dev/null || :
+
+ cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/
+ cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/ 2>/dev/null || :
+ cp -a --parents arch/x86/purgatory/setup-x86_64.S $kerneldir/build/
+ cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/
+ cp -a --parents arch/x86/boot/string.h $kerneldir/build/
+ cp -a --parents arch/x86/boot/string.c $kerneldir/build/
+ cp -a --parents arch/x86/boot/compressed/string.c $kerneldir/build/ 2>/dev/null || :
+ cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/
+ fi
+
+ if [ "${ARCH}" = "mips" ]; then
+ cp -a --parents arch/mips/Kbuild.platforms $kerneldir/build/
+ cp --parents $(find -type f -name "Platform") $kerneldir/build
+ cp --parents arch/mips/boot/tools/relocs* $kerneldir/build
+ cp -a --parents arch/mips/kernel/asm-offsets.c $kerneldir/build
+ cp -a --parents kernel/time/timeconst.bc $kerneldir/build
+ cp -a --parents kernel/bounds.c $kerneldir/build
+ cp -a --parents Kbuild $kerneldir/build
+ cp -a --parents arch/mips/kernel/syscalls/*.sh $kerneldir/build 2>/dev/null || :
+ cp -a --parents arch/mips/kernel/syscalls/*.tbl $kerneldir/build 2>/dev/null || :
+ cp -a --parents arch/mips/tools/elf-entry.c $kerneldir/build 2>/dev/null || :
+ fi
+
+ # required to build scripts/selinux/genheaders/genheaders
+ cp -a --parents security/selinux/include/* $kerneldir/build/
+
+ # copy any localversion files
+ cp -a localversion* $kerneldir/build/ 2>/dev/null || :
+ )
+
+ # Make sure the Makefile and version.h have a matching timestamp so that
+ # external modules can be built
+ touch -r $kerneldir/build/Makefile $kerneldir/build/include/generated/uapi/linux/version.h
+
+ # Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
+ cp $kerneldir/build/.config $kerneldir/build/include/config/auto.conf
+
+ # make the scripts python3 safe. We won't be running these, and if they are
+ # left as /usr/bin/python rootfs assembly will fail, since we only have python3
+ # in the RDEPENDS (and the python3 package does not include /usr/bin/python)
+ for ss in $(find $kerneldir/build/scripts -type f -name '*'); do
+ sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "$ss"
+ sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "$ss"
+ sed -i 's,/usr/bin/python,/usr/bin/env python3,' "$ss"
+ done
+
+ chown -R root:root ${D}
}
+
# Ensure we don't race against "make scripts" during cpio
do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
-PACKAGES = "kernel-devsrc"
-FILES_${PN} = "${KERNEL_SRC_PATH}"
-RDEPENDS_${PN} = "bc"
+FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}"
+FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*"
+
+RDEPENDS_${PN} = "bc python3 flex bison ${TCLIBC}-utils"
+# 4.15+ needs these next two RDEPENDS
+RDEPENDS_${PN} += "openssl-dev util-linux"
+# and x86 needs a bit more for 4.15+
+RDEPENDS_${PN} += "${@bb.utils.contains('ARCH', 'x86', 'elfutils', '', d)}"
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
deleted file mode 100644
index 8528d646dd..0000000000
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ /dev/null
@@ -1,89 +0,0 @@
-# Support for device tree generation
-FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*"
-
-python __anonymous () {
- d.appendVar("PACKAGES", " kernel-devicetree")
-}
-
-normalize_dtb () {
- DTB="$1"
- if echo ${DTB} | grep -q '/dts/'; then
- bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
- DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
- fi
- echo "${DTB}"
-}
-
-get_real_dtb_path_in_kernel () {
- DTB="$1"
- DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
- if [ ! -e "${DTB_PATH}" ]; then
- DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
- fi
- echo "${DTB_PATH}"
-}
-
-do_compile_append() {
- for DTB in ${KERNEL_DEVICETREE}; do
- DTB=`normalize_dtb "${DTB}"`
- oe_runmake ${DTB}
- done
-}
-
-do_install_append() {
- for DTB in ${KERNEL_DEVICETREE}; do
- DTB=`normalize_dtb "${DTB}"`
- DTB_EXT=${DTB##*.}
- DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
- for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
- symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
- DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
- install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
- done
- done
-}
-
-do_deploy_append() {
- for DTB in ${KERNEL_DEVICETREE}; do
- DTB=`normalize_dtb "${DTB}"`
- DTB_EXT=${DTB##*.}
- DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
- for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
- base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME}
- symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
- DTB_NAME=`echo ${base_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
- install -d ${DEPLOYDIR}
- install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.${DTB_EXT}
- ln -sf ${DTB_NAME}.${DTB_EXT} ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT}
- done
- done
-}
-
-pkg_postinst_kernel-devicetree () {
- cd /${KERNEL_IMAGEDEST}
- for DTB in ${KERNEL_DEVICETREE}; do
- for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
- symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
- DTB_EXT=${DTB##*.}
- DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
- DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
- done
- done
-}
-
-pkg_postrm_kernel-devicetree () {
- cd /${KERNEL_IMAGEDEST}
- for DTB in ${KERNEL_DEVICETREE}; do
- for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
- symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
- DTB_EXT=${DTB##*.}
- DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
- DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
- done
- done
-}
diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
index 994ac7459f..62cf6f5ea6 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -13,10 +13,14 @@ PACKAGES_DYNAMIC += "^kernel-module-.*"
PACKAGES_DYNAMIC += "^kernel-image-.*"
PACKAGES_DYNAMIC += "^kernel-firmware-.*"
-PACKAGES += "kernel-modules"
+PACKAGES += "kernel-modules kernel-vmlinux"
FILES_kernel-modules = ""
ALLOW_EMPTY_kernel-modules = "1"
DESCRIPTION_kernel-modules = "Kernel modules meta package"
+FILES_kernel-vmlinux = ""
+ALLOW_EMPTY_kernel-vmlinux = "1"
+DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package"
+
INHIBIT_DEFAULT_DEPS = "1"
@@ -35,6 +39,10 @@ do_compile () {
:
}
+do_compile_kernelmodules() {
+ :
+}
+
do_shared_workdir () {
:
}
@@ -54,3 +62,4 @@ do_deploy() {
addtask bundle_initramfs after do_install before do_deploy
addtask deploy after do_install
addtask shared_workdir after do_compile before do_install
+addtask compile_kernelmodules
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 9154bb7c31..163f280560 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -10,6 +10,8 @@
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
+# for ncurses tests
+inherit pkgconfig
# provide this .inc to set specific revisions
include recipes-kernel/linux/linux-yocto-dev-revisions.inc
@@ -28,18 +30,25 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name
SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
-LINUX_VERSION ?= "4.8-rc+"
+LINUX_VERSION ?= "5.3-rc+"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
-COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64)"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
+KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
deleted file mode 100644
index 1f38a54bf5..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "91821a6c3a54fabf964037dd478944a8f3597f88"
-SRCREV_meta ?= "19cafe114e7d35e6202afa1079b32ce600646660"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.1.32"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb
new file mode 100644
index 0000000000..32edb60264
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb
@@ -0,0 +1,44 @@
+KBRANCH ?= "v4.19/standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "0e4a79e608e92830693e511a3dd282ce7c3b3f41"
+SRCREV_meta ?= "ad6f8b357720ca8167a090713b7746230cf4b314"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.19.78"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
deleted file mode 100644
index a97a14b66e..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "76a02384d86df7b7499755f1650b5299740f5473"
-SRCREV_meta ?= "e66032e2d93da24c6b9137dbbe66008c77f6d4aa"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.4.20"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb
deleted file mode 100644
index 8548af71c4..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "5e21764783494fe8cafa9a107775040d54a4d4d1"
-SRCREV_meta ?= "d0937e67c3c11fd0e6429bd050a86f6c295560e1"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.8-rc8"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.2.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.2.bb
new file mode 100644
index 0000000000..423331e19a
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.2.bb
@@ -0,0 +1,44 @@
+KBRANCH ?= "v5.2/standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "55e3ee387b073d8d609e8899859561340d8b6911"
+SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "5.2.20"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
deleted file mode 100644
index 5058954a81..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.1.32"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
-SRCREV_meta ?= "19cafe114e7d35e6202afa1079b32ce600646660"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "(qemux86$)"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb
new file mode 100644
index 0000000000..0682aef50d
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb
@@ -0,0 +1,32 @@
+KBRANCH ?= "v4.19/standard/tiny/base"
+KBRANCH_qemuarm ?= "v4.19/standard/tiny/arm-versatile-926ejs"
+
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "4.19.78"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine_qemuarm ?= "be50001808f00efee538c2a3e7c0a5a2a2df65da"
+SRCREV_machine ?= "a915fbeae8ed987402f69666d90bef15a01c5823"
+SRCREV_meta ?= "ad6f8b357720ca8167a090713b7746230cf4b314"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
deleted file mode 100644
index 6befd233b3..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.4.20"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
-SRCREV_meta ?= "e66032e2d93da24c6b9137dbbe66008c77f6d4aa"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "(qemux86$)"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb
deleted file mode 100644
index 18214e3925..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.8-rc8"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "8edbf10bb6e0759bfb6f18035d1b4773f573d33c"
-SRCREV_meta ?= "d0937e67c3c11fd0e6429bd050a86f6c295560e1"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "(qemux86$)"
-
-# Functionality flags
-KERNEL_FEATURES = ""
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.2.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.2.bb
new file mode 100644
index 0000000000..f7239d0229
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.2.bb
@@ -0,0 +1,32 @@
+KBRANCH ?= "v5.2/standard/tiny/base"
+KBRANCH_qemuarm ?= "v5.2/standard/tiny/arm-versatile-926ejs"
+
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "5.2.20"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine_qemuarm ?= "501d680535903acc00808c36f2cc07f2dc725adc"
+SRCREV_machine ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03"
+SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index a5595abe8d..f191946f2a 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -2,7 +2,7 @@ SUMMARY = "Linux kernel"
SECTION = "kernel"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+LIC_FILES_CHKSUM ?= "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
@@ -12,9 +12,9 @@ INC_PR = "r4"
# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
# by the use of AUTOREV SRCREVs, which are the default for this recipe.
python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != d.getVar("PN", True):
+ if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
d.delVar("BB_DONT_CACHE")
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN", True)))
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
}
DEPENDS += "xz-native bc-native"
@@ -26,14 +26,21 @@ DEPENDS_append_nios2 = " libgcc"
KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
+DEPENDS_append_arc = " libgcc"
+KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}"
+KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}"
+
KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
+
# A KMACHINE is the mapping of a yocto $MACHINE to what is built
# by the kernel. This is typically the branch that should be built,
# and it can be specific to the machine or shared
# KMACHINE = "UNDEFINED"
-LINUX_KERNEL_TYPE ?= "standard"
+# The distro or local.conf should set this, but if nobody cares...
+LINUX_KERNEL_TYPE ??= "standard"
# KMETA ?= ""
KBRANCH ?= "master"
@@ -48,12 +55,11 @@ KCONF_AUDIT_LEVEL ?= "1"
KCONF_BSP_AUDIT_LEVEL ?= "0"
KMETA_AUDIT ?= "yes"
-LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
+LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}"
# Pick up shared functions
inherit kernel
inherit kernel-yocto
-require linux-dtb.inc
B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
@@ -64,7 +70,9 @@ do_install_append(){
}
# extra tasks
-addtask kernel_version_sanity_check after do_kernel_checkout before do_compile
-addtask kernel_link_images after do_compile before do_install
+addtask kernel_version_sanity_check after do_kernel_metadata do_kernel_checkout before do_compile
addtask validate_branches before do_patch after do_kernel_checkout
addtask kernel_configcheck after do_configure before do_compile
+
+# enable kernel-sample for oeqa/runtime/cases's ksample.py test
+KERNEL_FEATURES_append_qemuall=" features/kernel-sample/kernel-sample.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.1.bb b/meta/recipes-kernel/linux/linux-yocto_4.1.bb
deleted file mode 100644
index 249209d649..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto_4.1.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc ?= "standard/qemuppc"
-KBRANCH_qemux86 ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "a2fde8c9a8b709574b36931f728fb78617892d98"
-SRCREV_machine_qemuarm64 ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
-SRCREV_machine_qemumips ?= "33efda07565f45c576671358e75b39dc6a069cbf"
-SRCREV_machine_qemuppc ?= "96b9a39490bc348b36d0de13397a086e66a4b1cb"
-SRCREV_machine_qemux86 ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
-SRCREV_machine_qemux86-64 ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
-SRCREV_machine_qemumips64 ?= "a46e08c52a6764b0e54f4dbbdfaa3050a379ac4a"
-SRCREV_machine ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
-SRCREV_meta ?= "19cafe114e7d35e6202afa1079b32ce600646660"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;name=machine;branch=${KBRANCH}; \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.1.32"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.19.bb b/meta/recipes-kernel/linux/linux-yocto_4.19.bb
new file mode 100644
index 0000000000..d8cb20f2f2
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto_4.19.bb
@@ -0,0 +1,50 @@
+KBRANCH ?= "v4.19/standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "v4.19/standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "v4.19/standard/qemuarm64"
+KBRANCH_qemumips ?= "v4.19/standard/mti-malta32"
+KBRANCH_qemuppc ?= "v4.19/standard/qemuppc"
+KBRANCH_qemux86 ?= "v4.19/standard/base"
+KBRANCH_qemux86-64 ?= "v4.19/standard/base"
+KBRANCH_qemumips64 ?= "v4.19/standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "7fde51abcaf389193ce5d87ebfb8e8fb66a9271a"
+SRCREV_machine_qemuarm64 ?= "a915fbeae8ed987402f69666d90bef15a01c5823"
+SRCREV_machine_qemumips ?= "8ac68d42beb24b275ac0d2a54a0a2291970e5dde"
+SRCREV_machine_qemuppc ?= "a915fbeae8ed987402f69666d90bef15a01c5823"
+SRCREV_machine_qemux86 ?= "a915fbeae8ed987402f69666d90bef15a01c5823"
+SRCREV_machine_qemux86-64 ?= "a915fbeae8ed987402f69666d90bef15a01c5823"
+SRCREV_machine_qemumips64 ?= "ea2cb8731306f734bf0227575e04cafac7dfade0"
+SRCREV_machine ?= "a915fbeae8ed987402f69666d90bef15a01c5823"
+SRCREV_meta ?= "ad6f8b357720ca8167a090713b7746230cf4b314"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA} \
+ "
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+LINUX_VERSION ?= "4.19.78"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.4.bb b/meta/recipes-kernel/linux/linux-yocto_4.4.bb
deleted file mode 100644
index ec493cbd55..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto_4.4.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc ?= "standard/qemuppc"
-KBRANCH_qemux86 ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "a064c27e528be59412a892f3ed3ef8efe1f1d601"
-SRCREV_machine_qemuarm64 ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
-SRCREV_machine_qemumips ?= "d644de0138c623c2b5e8a6a143a24234fd2cfb27"
-SRCREV_machine_qemuppc ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
-SRCREV_machine_qemux86 ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
-SRCREV_machine_qemux86-64 ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
-SRCREV_machine_qemumips64 ?= "1fb08e61877b56fcbf800bfc66305b7a563c5f99"
-SRCREV_machine ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
-SRCREV_meta ?= "e66032e2d93da24c6b9137dbbe66008c77f6d4aa"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.4.20"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.8.bb b/meta/recipes-kernel/linux/linux-yocto_4.8.bb
deleted file mode 100644
index cf4b9b729e..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto_4.8.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc ?= "standard/qemuppc"
-KBRANCH_qemux86 ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "3a2b4be23e0d3115962cd49302f80679c86a2df4"
-SRCREV_machine_qemuarm64 ?= "8edbf10bb6e0759bfb6f18035d1b4773f573d33c"
-SRCREV_machine_qemumips ?= "fc863e7a0f5664eef65ff36f35cc41c0be59ef3b"
-SRCREV_machine_qemuppc ?= "8edbf10bb6e0759bfb6f18035d1b4773f573d33c"
-SRCREV_machine_qemux86 ?= "8edbf10bb6e0759bfb6f18035d1b4773f573d33c"
-SRCREV_machine_qemux86-64 ?= "8edbf10bb6e0759bfb6f18035d1b4773f573d33c"
-SRCREV_machine_qemumips64 ?= "dd0e6bc1cb1973d72ff9d3b4ee44a0edc04fea3c"
-SRCREV_machine ?= "8edbf10bb6e0759bfb6f18035d1b4773f573d33c"
-SRCREV_meta ?= "d0937e67c3c11fd0e6429bd050a86f6c295560e1"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;name=machine;branch=${KBRANCH}; \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.8-rc8"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.2.bb b/meta/recipes-kernel/linux/linux-yocto_5.2.bb
new file mode 100644
index 0000000000..8f75f67c39
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto_5.2.bb
@@ -0,0 +1,54 @@
+KBRANCH ?= "v5.2/standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "v5.2/standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "v5.2/standard/qemuarm64"
+KBRANCH_qemumips ?= "v5.2/standard/mti-malta32"
+KBRANCH_qemuppc ?= "v5.2/standard/qemuppc"
+KBRANCH_qemuriscv64 ?= "v5.2/standard/base"
+KBRANCH_qemux86 ?= "v5.2/standard/base"
+KBRANCH_qemux86-64 ?= "v5.2/standard/base"
+KBRANCH_qemumips64 ?= "v5.2/standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "fcbe51dfa0a763a07e4cd66204d6c0ba054663ce"
+SRCREV_machine_qemuarm64 ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03"
+SRCREV_machine_qemumips ?= "9cad7bb8bcd3686f580a3363847ee9c9e86928b1"
+SRCREV_machine_qemuppc ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03"
+SRCREV_machine_qemuriscv64 ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03"
+SRCREV_machine_qemux86 ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03"
+SRCREV_machine_qemux86-64 ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03"
+SRCREV_machine_qemumips64 ?= "dc2be1a546e937374590ce3858b717489ded2c21"
+SRCREV_machine ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03"
+SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b"
+
+# remap qemuarm to qemuarma15 for the 5.2 kernel
+# KMACHINE_qemuarm ?= "qemuarma15"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+LINUX_VERSION ?= "5.2.20"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.4.0.bb b/meta/recipes-kernel/lttng/babeltrace_1.4.0.bb
deleted file mode 100644
index 0fadeb0d79..0000000000
--- a/meta/recipes-kernel/lttng/babeltrace_1.4.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Babeltrace - Trace Format Babel Tower"
-DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
-HOMEPAGE = "http://www.efficios.com/babeltrace/"
-BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
-
-LICENSE = "MIT & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
-
-DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-
-inherit autotools pkgconfig
-
-SRC_URI = "http://www.efficios.com/files/babeltrace/babeltrace-${PV}.tar.bz2 \
-"
-
-EXTRA_OECONF = "--disable-debug-info"
-
-SRC_URI[md5sum] = "fa99064048af5c9c6ff00e489ac809c2"
-SRC_URI[sha256sum] = "9469eeb22617cd12668683b04c27003e5337e9ac66ade914988df3642fc0d0e4"
-
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb b/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb
new file mode 100644
index 0000000000..05ef6d099c
--- /dev/null
+++ b/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Babeltrace - Trace Format Babel Tower"
+DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
+HOMEPAGE = "http://www.efficios.com/babeltrace/"
+BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
+LICENSE = "MIT & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
+
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
+
+SRC_URI = "git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-1.5"
+SRCREV = "d4014aeef4b89a4aaab1af42d7b0d143d62da0ff"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)$"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-debug-info"
+
+ASNEEDED = ""
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch
new file mode 100644
index 0000000000..bdbc4f811e
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch
@@ -0,0 +1,94 @@
+From 1ff7013bcf7f068cf4371d12d758f9c0fd16a619 Mon Sep 17 00:00:00 2001
+From: Quanyang Wang <quanyang.wang@windriver.com>
+Date: Thu, 5 Dec 2019 15:35:32 +0800
+Subject: [PATCH 1/4] Fix: SUNRPC: Fix oops when trace sunrpc_task events in
+ nfs client
+
+See upstream commit :
+
+ commit 2ca310fc4160ed0420da65534a21ae77b24326a8
+ Author: Ditang Chen <chendt.fnst@cn.fujitsu.com>
+ Date: Fri, 7 Mar 2014 13:27:57 +0800
+ Subject: SUNRPC: Fix oops when trace sunrpc_task events in nfs client
+
+ When tracking sunrpc_task events in nfs client, the clnt pointer may be NULL.
+
+ [ 139.269266] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
+ [ 139.269915] IP: [<ffffffffa026f216>] ftrace_raw_event_rpc_task_running+0x86/0xf0 [sunrpc]
+ [ 139.269915] PGD 1d293067 PUD 1d294067 PMD 0
+ [ 139.269915] Oops: 0000 [#1] SMP
+ [ 139.269915] Modules linked in: nfsv4 dns_resolver nfs lockd sunrpc fscache sg ppdev e1000
+ serio_raw pcspkr parport_pc parport i2c_piix4 i2c_core microcode xfs libcrc32c sd_mod sr_mod
+ cdrom ata_generic crc_t10dif crct10dif_common pata_acpi ahci libahci ata_piix libata dm_mirror
+ dm_region_hash dm_log dm_mod
+ [ 139.269915] CPU: 0 PID: 59 Comm: kworker/0:2 Not tainted 3.10.0-84.el7.x86_64 #1
+ [ 139.269915] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
+ [ 139.269915] Workqueue: rpciod rpc_async_schedule [sunrpc]
+ [ 139.269915] task: ffff88001b598000 ti: ffff88001b632000 task.ti: ffff88001b632000
+ [ 139.269915] RIP: 0010:[<ffffffffa026f216>] [<ffffffffa026f216>] ftrace_raw_event_rpc_task_running+0x86/0xf0 [sunrpc]
+ [ 139.269915] RSP: 0018:ffff88001b633d70 EFLAGS: 00010206
+ [ 139.269915] RAX: ffff88001dfc5338 RBX: ffff88001cc37a00 RCX: ffff88001dfc5334
+ [ 139.269915] RDX: ffff88001dfc5338 RSI: 0000000000000000 RDI: ffff88001dfc533c
+ [ 139.269915] RBP: ffff88001b633db0 R08: 000000000000002c R09: 000000000000000a
+ [ 139.269915] R10: 0000000000062180 R11: 00000020759fb9dc R12: ffffffffa0292c20
+ [ 139.269915] R13: ffff88001dfc5334 R14: 0000000000000000 R15: 0000000000000000
+ [ 139.269915] FS: 0000000000000000(0000) GS:ffff88001fc00000(0000) knlGS:0000000000000000
+ [ 139.269915] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
+ [ 139.269915] CR2: 0000000000000004 CR3: 000000001d290000 CR4: 00000000000006f0
+ [ 139.269915] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+ [ 139.269915] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
+ [ 139.269915] Stack:
+ [ 139.269915] 000000001b633d98 0000000000000246 ffff88001df1dc00 ffff88001cc37a00
+ [ 139.269915] ffff88001bc35e60 0000000000000000 ffff88001ffa0a48 ffff88001bc35ee0
+ [ 139.269915] ffff88001b633e08 ffffffffa02704b5 0000000000010000 ffff88001cc37a70
+ [ 139.269915] Call Trace:
+ [ 139.269915] [<ffffffffa02704b5>] __rpc_execute+0x1d5/0x400 [sunrpc]
+ [ 139.269915] [<ffffffffa0270706>] rpc_async_schedule+0x26/0x30 [sunrpc]
+ [ 139.269915] [<ffffffff8107867b>] process_one_work+0x17b/0x460
+ [ 139.269915] [<ffffffff8107942b>] worker_thread+0x11b/0x400
+ [ 139.269915] [<ffffffff81079310>] ? rescuer_thread+0x3e0/0x3e0
+ [ 139.269915] [<ffffffff8107fc80>] kthread+0xc0/0xd0
+ [ 139.269915] [<ffffffff8107fbc0>] ? kthread_create_on_node+0x110/0x110
+ [ 139.269915] [<ffffffff815d122c>] ret_from_fork+0x7c/0xb0
+ [ 139.269915] [<ffffffff8107fbc0>] ? kthread_create_on_node+0x110/0x110
+ [ 139.269915] Code: 4c 8b 45 c8 48 8d 7d d0 89 4d c4 41 89 c9 b9 28 00 00 00 e8 9d b4 e9
+ e0 48 85 c0 49 89 c5 74 a2 48 89 c7 e8 9d 3f e9 e0 48 89 c2 <41> 8b 46 04 48 8b 7d d0 4c
+ 89 e9 4c 89 e6 89 42 0c 0f b7 83 d4
+ [ 139.269915] RIP [<ffffffffa026f216>] ftrace_raw_event_rpc_task_running+0x86/0xf0 [sunrpc]
+ [ 139.269915] RSP <ffff88001b633d70>
+ [ 139.269915] CR2: 0000000000000004
+ [ 140.946406] ---[ end trace ba486328b98d7622 ]---
+
+Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/2b228b503cad10bf0c5a99b42a908ca906eab5b9]
+
+Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ instrumentation/events/lttng-module/rpc.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h
+index 3798e8e..fb13106 100644
+--- a/instrumentation/events/lttng-module/rpc.h
++++ b/instrumentation/events/lttng-module/rpc.h
+@@ -139,7 +139,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
++ ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1)
+ ctf_integer_hex(const void *, action, action)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+@@ -208,7 +208,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
++ ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1)
+ ctf_integer_hex(const void *, action, action)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+--
+2.17.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch b/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch
new file mode 100644
index 0000000000..03264bac68
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch
@@ -0,0 +1,44 @@
+From 032a74d83b263c4faead8e4c25d497fb8ea07b6e Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Thu, 12 Dec 2019 10:29:02 -0500
+Subject: [PATCH 2/4] Fix: sunrpc: null rpc_clnt dereference in rpc_task_queued
+ tracepoint
+
+Based on upstream Linux commit:
+
+commit 0be283f676a1e7b208db0c992283197ef8b52158
+Author: Benjamin Coddington <bcodding@redhat.com>
+Date: Tue Jan 23 09:32:35 2018 -0500
+
+ SUNRPC: Fix null rpc_clnt dereference in rpc_task_queued tracepoint
+
+ Backchannel tasks will not have a reference to the rpc_clnt. Return -1 for
+ cl_clid in that case.
+
+ Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
+ Signed-off-by: Trond Myklebust <trondmy@gmail.com>
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/8f83a9103dcdf4f6b73783427fc5ded4869309d5]
+Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+---
+ instrumentation/events/lttng-module/rpc.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h
+index fb13106..68c622c 100644
+--- a/instrumentation/events/lttng-module/rpc.h
++++ b/instrumentation/events/lttng-module/rpc.h
+@@ -176,7 +176,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
++ ctf_integer(unsigned int, client_id, task->tk_client ?
++ task->tk_client->cl_clid : -1)
+ ctf_integer(unsigned long, timeout, task->tk_timeout)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+--
+2.17.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch b/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch
new file mode 100644
index 0000000000..c7529f16dd
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch
@@ -0,0 +1,105 @@
+From 70389e422dd3146161089d454f525367c9046ecd Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Thu, 12 Dec 2019 10:29:37 -0500
+Subject: [PATCH 3/4] Fix: sunrpc: use signed integer for client id
+
+Within include/linux/sunrpc/clnt.h:struct rpc_cltn, the cl_clid field
+is an unsigned integer, which is the type expected by the tracepoint
+signature.
+
+However, looking into net/sunrpc/clnt.c:rpc_alloc_clid(), its allocation
+considers negative signed integer as errors.
+
+Therefore, in order to properly show "-1" in the trace output (rather
+than MAX_INT) when called with a NULL task->tk_client, move to a
+signed integer as backing type for the client_id field.
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/cc7bb0aa52cae22255581d67841449bb8ea36fda]
+Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+---
+ instrumentation/events/lttng-module/rpc.h | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h
+index 68c622c..2d06e55 100644
+--- a/instrumentation/events/lttng-module/rpc.h
++++ b/instrumentation/events/lttng-module/rpc.h
+@@ -18,7 +18,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, task->tk_client->cl_clid)
+ ctf_integer(int, status, task->tk_status)
+ )
+ )
+@@ -43,7 +43,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, task->tk_client->cl_clid)
+ ctf_integer(int, status, task->tk_status)
+ )
+ )
+@@ -100,7 +100,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, task->tk_client->cl_clid)
+ ctf_integer(int, status, task->tk_status)
+ )
+ )
+@@ -112,7 +112,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, task->tk_client->cl_clid)
+ ctf_integer(int, status, status)
+ )
+ )
+@@ -139,7 +139,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1)
++ ctf_integer(int, client_id, task->tk_client ?
++ task->tk_client->cl_clid : -1)
+ ctf_integer_hex(const void *, action, action)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+@@ -176,7 +177,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client ?
++ ctf_integer(int, client_id, task->tk_client ?
+ task->tk_client->cl_clid : -1)
+ ctf_integer(unsigned long, timeout, task->tk_timeout)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+@@ -209,7 +210,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1)
++ ctf_integer(int, client_id, task->tk_client ?
++ task->tk_client->cl_clid : -1)
+ ctf_integer_hex(const void *, action, action)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+@@ -246,7 +248,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, task->tk_client ?
++ task->tk_client->cl_clid : -1)
+ ctf_integer(unsigned long, timeout, task->tk_timeout)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+--
+2.17.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0004-sunrpc-introduce-lttng_get_clid-helper.patch b/meta/recipes-kernel/lttng/lttng-modules/0004-sunrpc-introduce-lttng_get_clid-helper.patch
new file mode 100644
index 0000000000..4dd726cf2c
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0004-sunrpc-introduce-lttng_get_clid-helper.patch
@@ -0,0 +1,130 @@
+From b6903d57e4c3234ec5b1c7f72e232023cdee0fab Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Thu, 12 Dec 2019 10:39:38 -0500
+Subject: [PATCH 4/4] sunrpc: introduce lttng_get_clid helper
+
+Introduce the lttng_get_clid helper to always check for NULL pointer
+when getting the client id. While not always strictly needed depending
+on the tracepoint callsite, prefer robustness of instrumentation and
+always check for NULL rather than play whack-a-mole.
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/1330a091a687a406513c3a326c2fc2a0dbe75536]
+Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+---
+ instrumentation/events/lttng-module/rpc.h | 43 ++++++++++++++++-------
+ 1 file changed, 31 insertions(+), 12 deletions(-)
+
+diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h
+index 2d06e55..ceaf9db 100644
+--- a/instrumentation/events/lttng-module/rpc.h
++++ b/instrumentation/events/lttng-module/rpc.h
+@@ -9,6 +9,29 @@
+ #include <linux/sunrpc/sched.h>
+ #include <linux/sunrpc/clnt.h>
+
++#ifndef ONCE_LTTNG_RPC_H
++#define ONCE_LTTNG_RPC_H
++
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
++static inline
++int lttng_get_clid(const struct rpc_task *task)
++{
++ struct rpc_clnt *tk_client;
++
++ tk_client = task->tk_client;
++ if (!tk_client)
++ return -1;
++ /*
++ * The cl_clid field is always initialized to positive signed
++ * integers. Negative signed integer values are treated as
++ * errors.
++ */
++ return (int) tk_client->cl_clid;
++}
++#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
++
++#endif /* ONCE_LTTNG_RPC_H */
++
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
+
+@@ -18,7 +41,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, lttng_get_clid(task))
+ ctf_integer(int, status, task->tk_status)
+ )
+ )
+@@ -43,7 +66,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, lttng_get_clid(task))
+ ctf_integer(int, status, task->tk_status)
+ )
+ )
+@@ -100,7 +123,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, lttng_get_clid(task))
+ ctf_integer(int, status, task->tk_status)
+ )
+ )
+@@ -112,7 +135,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(int, client_id, task->tk_client->cl_clid)
++ ctf_integer(int, client_id, lttng_get_clid(task))
+ ctf_integer(int, status, status)
+ )
+ )
+@@ -139,8 +162,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(int, client_id, task->tk_client ?
+- task->tk_client->cl_clid : -1)
++ ctf_integer(int, client_id, lttng_get_clid(task))
+ ctf_integer_hex(const void *, action, action)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+@@ -177,8 +199,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(int, client_id, task->tk_client ?
+- task->tk_client->cl_clid : -1)
++ ctf_integer(int, client_id, lttng_get_clid(task))
+ ctf_integer(unsigned long, timeout, task->tk_timeout)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+@@ -210,8 +231,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(int, client_id, task->tk_client ?
+- task->tk_client->cl_clid : -1)
++ ctf_integer(int, client_id, lttng_get_clid(task))
+ ctf_integer_hex(const void *, action, action)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+@@ -248,8 +268,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
+
+ TP_FIELDS(
+ ctf_integer(unsigned int, task_id, task->tk_pid)
+- ctf_integer(int, client_id, task->tk_client ?
+- task->tk_client->cl_clid : -1)
++ ctf_integer(int, client_id, lttng_get_clid(task))
+ ctf_integer(unsigned long, timeout, task->tk_timeout)
+ ctf_integer(unsigned long, runstate, task->tk_runstate)
+ ctf_integer(int, status, task->tk_status)
+--
+2.17.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch b/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
new file mode 100644
index 0000000000..76063607a8
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
@@ -0,0 +1,43 @@
+From ab07574ef90fa510f293c37897d577066a88fe0d Mon Sep 17 00:00:00 2001
+From: Nathan Lynch <nathan_lynch@mentor.com>
+Date: Tue, 25 Apr 2017 16:26:57 -0500
+Subject: [PATCH] BUILD_RUNTIME_BUG_ON vs gcc7
+
+Avoid using LTTng's BUILD_RUNTIME_BUG_ON macro, as it appears to run
+into a similar problem as Linux experienced with ilog2.
+
+See:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474c90156c8dcc2fa815e6716cc9394d7930cb9c
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
+
+Upstream-Status: Pending
+Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
+---
+ lib/align.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/align.h b/lib/align.h
+index 5b91ae87410b..5e134cd485fe 100644
+--- a/lib/align.h
++++ b/lib/align.h
+@@ -48,7 +48,7 @@
+ */
+ #define offset_align(align_drift, alignment) \
+ ({ \
+- BUILD_RUNTIME_BUG_ON((alignment) == 0 \
++ BUG_ON((alignment) == 0 \
+ || ((alignment) & ((alignment) - 1))); \
+ (((alignment) - (align_drift)) & ((alignment) - 1)); \
+ })
+@@ -63,7 +63,7 @@
+ */
+ #define offset_align_floor(align_drift, alignment) \
+ ({ \
+- BUILD_RUNTIME_BUG_ON((alignment) == 0 \
++ BUG_ON((alignment) == 0 \
+ || ((alignment) & ((alignment) - 1))); \
+ (((align_drift) - (alignment)) & ((alignment) - 1)); \
+ })
+--
+2.9.3
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
index 6a91f3258b..e411242272 100644
--- a/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
+++ b/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
@@ -10,7 +10,7 @@ however, not every kernel has the CONFIG_TRACEPOINTS feature enabled.
This change makes the build do not fail when CONFIG_TRACEPOINTS is not
available, allowing it to be kept being pulled by default.
-Upstream-Status: Inapropriate [embedded specific]
+Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.11.bb b/meta/recipes-kernel/lttng/lttng-modules_2.10.11.bb
new file mode 100644
index 0000000000..cc4f44519a
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.11.bb
@@ -0,0 +1,50 @@
+SECTION = "devel"
+SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
+DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
+LICENSE = "LGPLv2.1 & GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3 \
+ file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
+ file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad \
+ "
+
+inherit module
+
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
+
+SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+ file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+ file://0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch \
+ file://0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch \
+ file://0003-Fix-sunrpc-use-signed-integer-for-client-id.patch \
+ file://0004-sunrpc-introduce-lttng_get_clid-helper.patch \
+ "
+
+SRC_URI[md5sum] = "c618fb646514dfc1bf910cfd7cda4256"
+SRC_URI[sha256sum] = "7f91e39b2e8e46d8bbba2b4c8c1614f1fb380611cd1a1fccc1d1859be26112f1"
+
+export INSTALL_MOD_DIR="kernel/lttng-modules"
+
+EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
+
+do_install_append() {
+ # Delete empty directories to avoid QA failures if no modules were built
+ find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
+}
+
+python do_package_prepend() {
+ if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
+ bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
+}
+
+BBCLASSEXTEND = "devupstream:target"
+LIC_FILES_CHKSUM_class-devupstream = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3"
+DEFAULT_PREFERENCE_class-devupstream = "-1"
+SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.10 \
+ file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+ file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+ "
+SRCREV_class-devupstream = "624aca5d7507fbd11ea4a1a474c3aa1031bd9a31"
+PV_class-devupstream = "2.10.10+git${SRCPV}"
+S_class-devupstream = "${WORKDIR}/git"
+SRCREV_FORMAT ?= "lttng_git"
diff --git a/meta/recipes-kernel/lttng/lttng-modules_git.bb b/meta/recipes-kernel/lttng/lttng-modules_git.bb
deleted file mode 100644
index 70145413a3..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules_git.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SECTION = "devel"
-SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
-DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
-LICENSE = "LGPLv2.1 & GPLv2 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=362844633a08753bd96ab322a6c7f9f6 \
- file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
- file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad"
-
-inherit module
-
-SRCREV = "6e4fc6f36d68fb3c8d40113f8670eb6e9c8ffd76"
-PV = "2.8.0+git${SRCPV}"
-
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
-
-SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.8 \
- file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch"
-
-export INSTALL_MOD_DIR="kernel/lttng-modules"
-
-EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
-
-S = "${WORKDIR}/git"
-
-do_install_append() {
- # Delete empty directories to avoid QA failures if no modules were built
- find ${D}/lib -depth -type d -empty -exec rmdir {} \;
-}
-
-python do_package_prepend() {
- if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')):
- bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True))
-}
-
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-error.h-common-error.h.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-error.h-common-error.h.patch
deleted file mode 100644
index 6c8a9b211a..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-error.h-common-error.h.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6712db617fe9155ea236f6840c2bd18dbec4c871 Mon Sep 17 00:00:00 2001
-From: Michael Jeanson <mjeanson@efficios.com>
-Date: Wed, 15 Jun 2016 17:18:03 -0400
-Subject: [PATCH] Fix: error.h -> common/error.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport
-
-Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
-Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
-Signed-off-by: Peter Liu <peter.x.liu@external.atlascopco.com>
----
- src/bin/lttng-sessiond/agent.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c
-index 7cbbbde..310a7e8 100644
---- a/src/bin/lttng-sessiond/agent.c
-+++ b/src/bin/lttng-sessiond/agent.c
-@@ -29,7 +29,7 @@
- #include "agent.h"
- #include "ust-app.h"
- #include "utils.h"
--#include "error.h"
-+#include "common/error.h"
-
- #define AGENT_RET_CODE_INDEX(code) (code - AGENT_RET_CODE_SUCCESS)
-
---
-1.9.1
-
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-Skip-when-testapp-is-not-present.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-Skip-when-testapp-is-not-present.patch
new file mode 100644
index 0000000000..6c9f7e462c
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-Skip-when-testapp-is-not-present.patch
@@ -0,0 +1,610 @@
+From 95c27e6acceaeda55c729b9e92e594322adef13f Mon Sep 17 00:00:00 2001
+From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+Date: Wed, 3 Apr 2019 16:31:18 -0400
+Subject: [PATCH lttng-tools] Skip when testapp is not present
+
+We expect lttng-ust do be present, this is a wrong assumptions.
+
+This is a quick fix. The real fix is to either detect at runtime
+lttng-ust support or at build time (HAVE_LIBLTTNG_UST_CTL).
+
+This prevent hang for make check done on a build configured with
+--without-lttng-ust.
+
+Upstream-Status: Inappropriate [other]
+Reason: This patch is inappropriate for upstream for 2.10 stable release
+since we do not backport "superficial" fix to the test suite. We do
+backport when a test is broken. The fact that on --without-lttng-ust
+hang is not a "broken" test per-see. Still, a variation of this fix will
+be upstreamed in our master branch and possibly 2.11. The upstreamed
+version will split the test in kernel/ust test and skip them at the
+build system level. This patch is more succinct.
+
+Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+---
+ tests/regression/tools/crash/test_crash | 4 ++
+ .../regression/tools/exclusion/test_exclusion | 4 ++
+ .../tools/filtering/test_valid_filter | 21 ++++--
+ tests/regression/tools/health/test_thread_ok | 29 +++++---
+ tests/regression/tools/live/Makefile.am | 2 -
+ tests/regression/tools/live/test_lttng_ust | 4 ++
+ tests/regression/tools/live/test_ust | 4 ++
+ .../tools/live/test_ust_tracefile_count | 4 ++
+ tests/regression/tools/mi/test_mi | 4 ++
+ .../notification/test_notification_multi_app | 18 +++--
+ .../tools/notification/test_notification_ust | 4 ++
+ .../regression/tools/regen-metadata/test_ust | 2 +-
+ .../regression/tools/regen-statedump/test_ust | 2 +-
+ .../regression/tools/save-load/test_autoload | 7 ++
+ tests/regression/tools/save-load/test_load | 8 +++
+ tests/regression/tools/save-load/test_save | 7 ++
+ .../regression/tools/snapshots/test_ust_fast | 2 +-
+ .../regression/tools/snapshots/test_ust_long | 2 +-
+ .../tools/snapshots/test_ust_streaming | 2 +-
+ tests/regression/tools/snapshots/ust_test | 2 +-
+ .../streaming/test_high_throughput_limits | 2 +-
+ tests/regression/tools/streaming/test_ust | 2 +-
+ .../tracefile-limits/test_tracefile_count | 2 +-
+ .../tracefile-limits/test_tracefile_size | 2 +-
+ .../tools/wildcard/test_event_wildcard | 67 ++++++++++---------
+ 25 files changed, 147 insertions(+), 60 deletions(-)
+
+diff --git a/tests/regression/tools/crash/test_crash b/tests/regression/tools/crash/test_crash
+index 8c62c513d..3cbe97688 100755
+--- a/tests/regression/tools/crash/test_crash
++++ b/tests/regression/tools/crash/test_crash
+@@ -35,6 +35,10 @@ NUM_TESTS=77
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ # Global declaration for simplification
+ LTTNG_CRASH=$TESTDIR/../src/bin/lttng-crash/$CRASH_BIN
+
+diff --git a/tests/regression/tools/exclusion/test_exclusion b/tests/regression/tools/exclusion/test_exclusion
+index 949cd41df..42e4d72fb 100755
+--- a/tests/regression/tools/exclusion/test_exclusion
++++ b/tests/regression/tools/exclusion/test_exclusion
+@@ -30,6 +30,10 @@ NUM_TESTS=149
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ function enable_ust_lttng_all_event_exclusion()
+ {
+ sess_name="$1"
+diff --git a/tests/regression/tools/filtering/test_valid_filter b/tests/regression/tools/filtering/test_valid_filter
+index 163b32182..1e8da630b 100755
+--- a/tests/regression/tools/filtering/test_valid_filter
++++ b/tests/regression/tools/filtering/test_valid_filter
+@@ -418,12 +418,18 @@ issue_356_filter+="intfield > 4 && intfield > 5 && "
+ issue_356_filter+="intfield > 6 && intfield > 7 && "
+ issue_356_filter+="intfield > 8 || intfield > 0"
+
++BIN_NAME="gen-ust-events"
++
++skip_ust=1
++if [ ! -x "$CURDIR/$BIN_NAME" ]; then
++ skip_ust=0
++ skip 0 "No UST nevents binary detected." $NUM_UST_TESTS
++fi
++
+ start_lttng_sessiond
+
+ ### UST TESTS
+
+-BIN_NAME="gen-ust-events"
+-
+ KIRK_KRAUSS_TESTS=(
+ # the tests below were written by Kirk Krauss in this article:
+ # http://www.drdobbs.com/architecture-and-design/matching-wildcards-an-empirical-way-to-t/240169123
+@@ -897,9 +903,6 @@ UST_STR_FILTERS=(
+ END
+ )
+
+-if [ ! -x "$CURDIR/$BIN_NAME" ]; then
+- BAIL_OUT "No UST nevents binary detected."
+-fi
+
+ IFS="$OLDIFS"
+
+@@ -910,6 +913,10 @@ i=0
+ while true; do
+ validator="${UST_FILTERS[$i]}"
+
++ if [ $skip_ust -eq 0 ]; then
++ break
++ fi
++
+ if [ "$validator" = END ]; then
+ break
+ fi
+@@ -929,6 +936,10 @@ i=0
+ while true; do
+ validator="${UST_STR_FILTERS[$i]}"
+
++ if [ $skip_ust -eq 0 ]; then
++ break
++ fi
++
+ if [ "$validator" = END ]; then
+ break
+ fi
+diff --git a/tests/regression/tools/health/test_thread_ok b/tests/regression/tools/health/test_thread_ok
+index e81d6ed24..849b7e71f 100755
+--- a/tests/regression/tools/health/test_thread_ok
++++ b/tests/regression/tools/health/test_thread_ok
+@@ -27,6 +27,9 @@ CHANNEL_NAME="testchan"
+ HEALTH_CHECK_BIN="health_check"
+ NUM_TESTS=17
+ SLEEP_TIME=30
++TESTAPP_PATH="$TESTDIR/utils/testapp"
++TESTAPP_NAME="gen-ust-events"
++TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
+
+ source $TESTDIR/utils/utils.sh
+
+@@ -76,15 +79,19 @@ function test_thread_ok
+ $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH}
+ report_errors
+
+- diag "With UST consumer daemons"
+- create_lttng_session_no_output $SESSION_NAME
+- enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
+- start_lttng_tracing_ok $SESSION_NAME
+- destroy_lttng_session_ok $SESSION_NAME
++ skip $skip_ust "Ust does not seems to be supported" "5" ||
++ {
++ diag "With UST consumer daemons"
++ create_lttng_session_no_output $SESSION_NAME
++ enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
++ start_lttng_tracing_ok $SESSION_NAME
++ destroy_lttng_session_ok $SESSION_NAME
+
+- # Check health status
+- $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH}
+- report_errors
++
++ # Check health status
++ $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH}
++ report_errors
++ }
+
+ skip $isroot "Root access is needed. Skipping kernel consumer health check test." "5" ||
+ {
+@@ -141,6 +148,12 @@ else
+ isroot=0
+ fi
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ skip_ust=0
++else
++ skip_ust=1
++fi
++
+ test_thread_ok
+
+ rm -rf ${HEALTH_PATH}
+diff --git a/tests/regression/tools/live/Makefile.am b/tests/regression/tools/live/Makefile.am
+index 46186d383..db74de8d5 100644
+--- a/tests/regression/tools/live/Makefile.am
++++ b/tests/regression/tools/live/Makefile.am
+@@ -16,9 +16,7 @@ LIVE=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
+ noinst_PROGRAMS = live_test
+ EXTRA_DIST = test_kernel test_lttng_kernel
+
+-if HAVE_LIBLTTNG_UST_CTL
+ EXTRA_DIST += test_ust test_ust_tracefile_count test_lttng_ust
+-endif
+
+ live_test_SOURCES = live_test.c
+ live_test_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
+diff --git a/tests/regression/tools/live/test_lttng_ust b/tests/regression/tools/live/test_lttng_ust
+index 06017d01d..be9b3d7f7 100755
+--- a/tests/regression/tools/live/test_lttng_ust
++++ b/tests/regression/tools/live/test_lttng_ust
+@@ -38,6 +38,10 @@ NUM_TESTS=12
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ # MUST set TESTDIR before calling those functions
+ plan_tests $NUM_TESTS
+
+diff --git a/tests/regression/tools/live/test_ust b/tests/regression/tools/live/test_ust
+index 0384a706f..add521bfc 100755
+--- a/tests/regression/tools/live/test_ust
++++ b/tests/regression/tools/live/test_ust
+@@ -36,6 +36,10 @@ DIR=$(readlink -f $TESTDIR)
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ echo "$TEST_DESC"
+
+ function setup_live_tracing()
+diff --git a/tests/regression/tools/live/test_ust_tracefile_count b/tests/regression/tools/live/test_ust_tracefile_count
+index 6da368fc6..10504f8c6 100755
+--- a/tests/regression/tools/live/test_ust_tracefile_count
++++ b/tests/regression/tools/live/test_ust_tracefile_count
+@@ -36,6 +36,10 @@ DIR=$(readlink -f $TESTDIR)
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ echo "$TEST_DESC"
+
+ function setup_live_tracing()
+diff --git a/tests/regression/tools/mi/test_mi b/tests/regression/tools/mi/test_mi
+index 48dda7da6..2cc30b29a 100755
+--- a/tests/regression/tools/mi/test_mi
++++ b/tests/regression/tools/mi/test_mi
+@@ -61,6 +61,10 @@ NUM_TESTS=228
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ #Overwrite the lttng_bin to get mi output
+ LTTNG_BIN="lttng --mi xml"
+
+diff --git a/tests/regression/tools/notification/test_notification_multi_app b/tests/regression/tools/notification/test_notification_multi_app
+index 0a05ea6a0..29b0f62fa 100755
+--- a/tests/regression/tools/notification/test_notification_multi_app
++++ b/tests/regression/tools/notification/test_notification_multi_app
+@@ -52,6 +52,11 @@ plan_tests $NUM_TESTS
+
+ print_test_banner "$TEST_DESC"
+
++skip_ust=1
++if [ ! -x "$TESTAPP_BIN" ]; then
++ skip_ust=0
++fi
++
+ app_pids=()
+
+ function kernel_event_generator_toogle_state
+@@ -468,10 +473,15 @@ function test_on_register_evaluation ()
+ }
+
+
+-TESTS=(
+- test_multi_app_ust
+- test_on_register_evaluation_ust
+-)
++TESTS=()
++if [ $skip_ust -eq "1" ]; then
++ TESTS+=(
++ test_multi_app_ust
++ test_on_register_evaluation_ust
++ )
++else
++ skip 0 "No UST events binary detected." $NUM_TEST_UST
++fi
+
+ if [ "$(id -u)" == "0" ]; then
+ TESTS+=(
+diff --git a/tests/regression/tools/notification/test_notification_ust b/tests/regression/tools/notification/test_notification_ust
+index 8941e476d..eb2e15cad 100755
+--- a/tests/regression/tools/notification/test_notification_ust
++++ b/tests/regression/tools/notification/test_notification_ust
+@@ -46,6 +46,10 @@ DIR=$(readlink -f $TESTDIR)
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ function ust_event_generator_toogle_state
+ {
+ ust_event_generator_suspended=$((ust_event_generator_suspended==0))
+diff --git a/tests/regression/tools/regen-metadata/test_ust b/tests/regression/tools/regen-metadata/test_ust
+index b7f1af1d8..312c8a40d 100755
+--- a/tests/regression/tools/regen-metadata/test_ust
++++ b/tests/regression/tools/regen-metadata/test_ust
+@@ -34,7 +34,7 @@ NUM_TESTS=33
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST events binary detected."
++ plan_skip_all "No UST events binary detected."
+ fi
+
+ function lttng_create_session_uri
+diff --git a/tests/regression/tools/regen-statedump/test_ust b/tests/regression/tools/regen-statedump/test_ust
+index 486b9a560..8d455b26a 100755
+--- a/tests/regression/tools/regen-statedump/test_ust
++++ b/tests/regression/tools/regen-statedump/test_ust
+@@ -34,7 +34,7 @@ NUM_TESTS=11
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST events binary detected."
++ plan_skip_all "No UST events binary detected."
+ fi
+
+ function test_ust_local ()
+diff --git a/tests/regression/tools/save-load/test_autoload b/tests/regression/tools/save-load/test_autoload
+index 7ee5e9906..ec376cfb3 100755
+--- a/tests/regression/tools/save-load/test_autoload
++++ b/tests/regression/tools/save-load/test_autoload
+@@ -21,6 +21,9 @@ CURDIR=$(dirname $0)/
+ CONFIG_DIR="${CURDIR}/configuration"
+ TESTDIR=$CURDIR/../../../
+ export LTTNG_SESSION_CONFIG_XSD_PATH=$(readlink -m ${TESTDIR}../src/common/config/)
++TESTAPP_PATH="$TESTDIR/utils/testapp"
++TESTAPP_NAME="gen-ust-events"
++TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
+
+ DIR=$(readlink -f $TESTDIR)
+
+@@ -28,6 +31,10 @@ NUM_TESTS=9
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ # MUST set TESTDIR before calling those functions
+ plan_tests $NUM_TESTS
+
+diff --git a/tests/regression/tools/save-load/test_load b/tests/regression/tools/save-load/test_load
+index 5e38b46b6..b6fdd8192 100755
+--- a/tests/regression/tools/save-load/test_load
++++ b/tests/regression/tools/save-load/test_load
+@@ -20,6 +20,10 @@ TEST_DESC="Load session(s)"
+ CURDIR=$(dirname $0)/
+ CONFIG_DIR="${CURDIR}/configuration"
+ TESTDIR=$CURDIR/../../../
++TESTAPP_PATH="$TESTDIR/utils/testapp"
++TESTAPP_NAME="gen-ust-events"
++TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
++
+ export LTTNG_SESSION_CONFIG_XSD_PATH=$(readlink -m ${TESTDIR}../src/common/config/)
+
+ SESSION_NAME="load-42"
+@@ -31,6 +35,10 @@ NUM_TESTS=67
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "$TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ # MUST set TESTDIR before calling those functions
+ plan_tests $NUM_TESTS
+
+diff --git a/tests/regression/tools/save-load/test_save b/tests/regression/tools/save-load/test_save
+index c5f6b1341..cfaf67b7a 100755
+--- a/tests/regression/tools/save-load/test_save
++++ b/tests/regression/tools/save-load/test_save
+@@ -23,6 +23,9 @@ TESTDIR=$CURDIR/../../../
+ SESSION_NAME="save-42"
+ CHANNEL_NAME="chan-save"
+ EVENT_NAME="tp:tptest"
++TESTAPP_PATH="$TESTDIR/utils/testapp"
++TESTAPP_NAME="gen-ust-events"
++TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
+
+ DIR=$(readlink -f $TESTDIR)
+
+@@ -30,6 +33,10 @@ NUM_TESTS=41
+
+ source $TESTDIR/utils/utils.sh
+
++if [ ! -x "TESTAPP_BIN" ]; then
++ plan_skip_all "No UST events binary detected."
++fi
++
+ # MUST set TESTDIR before calling those functions
+ plan_tests $NUM_TESTS
+
+diff --git a/tests/regression/tools/snapshots/test_ust_fast b/tests/regression/tools/snapshots/test_ust_fast
+index edb435c52..5a68ec56d 100755
+--- a/tests/regression/tools/snapshots/test_ust_fast
++++ b/tests/regression/tools/snapshots/test_ust_fast
+@@ -23,7 +23,7 @@ TEST_BIN="ust_test"
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$CURDIR/$TEST_BIN" ]; then
+- BAIL_OUT "No UST test found: $TEST_BIN"
++ plan_skip_all "No UST test found: $TEST_BIN"
+ fi
+
+ ./$CURDIR/$TEST_BIN $NR_SNAPSHOT
+diff --git a/tests/regression/tools/snapshots/test_ust_long b/tests/regression/tools/snapshots/test_ust_long
+index 9e1a0c262..afa019f6a 100755
+--- a/tests/regression/tools/snapshots/test_ust_long
++++ b/tests/regression/tools/snapshots/test_ust_long
+@@ -23,7 +23,7 @@ TEST_BIN="ust_test"
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$CURDIR/$TEST_BIN" ]; then
+- BAIL_OUT "No UST test found: $TEST_BIN"
++ plan_skip_all "No UST test found: $TEST_BIN"
+ fi
+
+ ./$CURDIR/$TEST_BIN $NR_SNAPSHOT
+diff --git a/tests/regression/tools/snapshots/test_ust_streaming b/tests/regression/tools/snapshots/test_ust_streaming
+index 93b0957f3..69291ab4d 100755
+--- a/tests/regression/tools/snapshots/test_ust_streaming
++++ b/tests/regression/tools/snapshots/test_ust_streaming
+@@ -37,7 +37,7 @@ NUM_TESTS=75
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST events binary detected."
++ plan_skip_all "No UST events binary detected."
+ fi
+
+ function snapshot_add_output ()
+diff --git a/tests/regression/tools/snapshots/ust_test b/tests/regression/tools/snapshots/ust_test
+index 755cef9e0..92f9f6cff 100755
+--- a/tests/regression/tools/snapshots/ust_test
++++ b/tests/regression/tools/snapshots/ust_test
+@@ -34,7 +34,7 @@ TRACE_PATH=$(mktemp -d)
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST events binary detected."
++ plan_skip_all "No UST events binary detected."
+ fi
+
+ # Need the number of snapshot to do.
+diff --git a/tests/regression/tools/streaming/test_high_throughput_limits b/tests/regression/tools/streaming/test_high_throughput_limits
+index 32c3f1f2b..f54178923 100755
+--- a/tests/regression/tools/streaming/test_high_throughput_limits
++++ b/tests/regression/tools/streaming/test_high_throughput_limits
+@@ -38,7 +38,7 @@ NUM_TESTS=104
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST events binary detected."
++ plan_skip_all "No UST events binary detected."
+ fi
+
+ function set_bw_limit
+diff --git a/tests/regression/tools/streaming/test_ust b/tests/regression/tools/streaming/test_ust
+index a5d5b5e92..e1dd98ee7 100755
+--- a/tests/regression/tools/streaming/test_ust
++++ b/tests/regression/tools/streaming/test_ust
+@@ -34,7 +34,7 @@ NUM_TESTS=16
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST events binary detected."
++ plan_skip_all "No UST events binary detected."
+ fi
+
+ function lttng_create_session_uri
+diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_count b/tests/regression/tools/tracefile-limits/test_tracefile_count
+index 6ada8580f..7553c7d1f 100755
+--- a/tests/regression/tools/tracefile-limits/test_tracefile_count
++++ b/tests/regression/tools/tracefile-limits/test_tracefile_count
+@@ -33,7 +33,7 @@ PAGE_SIZE=$(getconf PAGE_SIZE)
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST events binary detected."
++ plan_skip_all "No UST events binary detected."
+ fi
+
+ function enable_lttng_channel_count_limit ()
+diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_size b/tests/regression/tools/tracefile-limits/test_tracefile_size
+index 3dddbe613..1089487ff 100755
+--- a/tests/regression/tools/tracefile-limits/test_tracefile_size
++++ b/tests/regression/tools/tracefile-limits/test_tracefile_size
+@@ -33,7 +33,7 @@ NUM_TESTS=66
+ source $TESTDIR/utils/utils.sh
+
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST events binary detected."
++ plan_skip_all "No UST events binary detected."
+ fi
+
+ function enable_lttng_channel_size_limit ()
+diff --git a/tests/regression/tools/wildcard/test_event_wildcard b/tests/regression/tools/wildcard/test_event_wildcard
+index 61ea67a72..921a2301d 100755
+--- a/tests/regression/tools/wildcard/test_event_wildcard
++++ b/tests/regression/tools/wildcard/test_event_wildcard
+@@ -97,42 +97,47 @@ print_test_banner "$TEST_DESC"
+
+ start_lttng_sessiond
+
+-diag "Test UST wildcard"
+-
+ if [ ! -x "$TESTAPP_BIN" ]; then
+- BAIL_OUT "No UST nevents binary detected."
++ skip_ust=0
++else
++ skip_ust=1
+ fi
+
+-EVENT_NAME="tp:tptest"
++skip $skip_ust "No UST nevents binary detected." $NUM_UST_TESTS ||
++{
++ diag "Test UST wildcard"
+
+-# non-matching
+-test_event_wildcard ust 0 'tp:abc*'
+-test_event_wildcard ust 0 '*abc'
+-test_event_wildcard ust 0 '*z*'
+-test_event_wildcard ust 0 '*\**'
+-test_event_wildcard ust 0 '*\*'
+-test_event_wildcard ust 0 '\**'
+-test_event_wildcard ust 0 '*:*tpte*s'
+-test_event_wildcard ust 0 'tp**tpTest'
++ EVENT_NAME="tp:tptest"
+
+-# matching
+-test_event_wildcard ust 1 'tp:tp*'
+-test_event_wildcard ust 1 '*'
+-test_event_wildcard ust 1 'tp:tptest*'
+-test_event_wildcard ust 1 '**'
+-test_event_wildcard ust 1 '***'
+-test_event_wildcard ust 1 '*tptest'
+-test_event_wildcard ust 1 '**tptest'
+-test_event_wildcard ust 1 '*tpte*'
+-test_event_wildcard ust 1 '*tp*'
+-test_event_wildcard ust 1 '*tp**'
+-test_event_wildcard ust 1 '*:*tptest'
+-test_event_wildcard ust 1 '*:*tpte*t'
+-test_event_wildcard ust 1 't*p*:*t*e*s*t'
+-test_event_wildcard ust 1 '*t*p*:*t*e*s*t*'
+-test_event_wildcard ust 1 'tp*tptest'
+-test_event_wildcard ust 1 'tp**tptest'
+-test_event_wildcard ust 1 'tp*test'
++ # non-matching
++ test_event_wildcard ust 0 'tp:abc*'
++ test_event_wildcard ust 0 '*abc'
++ test_event_wildcard ust 0 '*z*'
++ test_event_wildcard ust 0 '*\**'
++ test_event_wildcard ust 0 '*\*'
++ test_event_wildcard ust 0 '\**'
++ test_event_wildcard ust 0 '*:*tpte*s'
++ test_event_wildcard ust 0 'tp**tpTest'
++
++ # matching
++ test_event_wildcard ust 1 'tp:tp*'
++ test_event_wildcard ust 1 '*'
++ test_event_wildcard ust 1 'tp:tptest*'
++ test_event_wildcard ust 1 '**'
++ test_event_wildcard ust 1 '***'
++ test_event_wildcard ust 1 '*tptest'
++ test_event_wildcard ust 1 '**tptest'
++ test_event_wildcard ust 1 '*tpte*'
++ test_event_wildcard ust 1 '*tp*'
++ test_event_wildcard ust 1 '*tp**'
++ test_event_wildcard ust 1 '*:*tptest'
++ test_event_wildcard ust 1 '*:*tpte*t'
++ test_event_wildcard ust 1 't*p*:*t*e*s*t'
++ test_event_wildcard ust 1 '*t*p*:*t*e*s*t*'
++ test_event_wildcard ust 1 'tp*tptest'
++ test_event_wildcard ust 1 'tp**tptest'
++ test_event_wildcard ust 1 'tp*test'
++}
+
+ if [ "$(id -u)" == "0" ]; then
+ isroot=1
+--
+2.17.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch
new file mode 100644
index 0000000000..c494cee604
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch
@@ -0,0 +1,55 @@
+From 69c62f5f3cc424b7dd0c8e4097743b39a9c48306 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jul 2019 08:48:13 -0700
+Subject: [lttng-tools][PATCH] check for gettid API during configure
+
+Add support for gettid() provided by glibc 2.30+
+
+Since version 2.30 glibc provides gettid and it causes conflicts with
+locally defined gettid(). Use the local definition of
+gettid only if system gettid is not available.
+
+https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD<Paste>
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ src/common/compat/tid.h | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7b99f5c..e4bd82c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -190,7 +190,7 @@ AC_CHECK_HEADERS([ \
+ # Basic functions check
+ AC_CHECK_FUNCS([ \
+ atexit bzero clock_gettime dup2 fdatasync fls ftruncate \
+- gethostbyname gethostname getpagesize localtime_r memchr memset \
++ gethostbyname gethostname getpagesize gettid localtime_r memchr memset \
+ mkdir munmap putenv realpath rmdir socket strchr strcspn strdup \
+ strncasecmp strndup strnlen strpbrk strrchr strstr strtol strtoul \
+ strtoull dirfd gethostbyname2 getipnodebyname epoll_create1 \
+diff --git a/src/common/compat/tid.h b/src/common/compat/tid.h
+index 40f562f..aa07a85 100644
+--- a/src/common/compat/tid.h
++++ b/src/common/compat/tid.h
+@@ -25,6 +25,7 @@
+ #ifndef LTTNG_TID_H
+ #define LTTNG_TID_H
+
++#if !HAVE_GETTID
+ #ifdef __linux__
+ #include <syscall.h>
+ #endif
+@@ -47,5 +48,5 @@ static inline pid_t gettid(void)
+ return getpid();
+ }
+ #endif
+-
++#endif /* HAVE_GETTID */
+ #endif /* LTTNG_TID_H */
+--
+2.22.0
+
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-check-for-lttng-modules-presence-before-testing.patch b/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-check-for-lttng-modules-presence-before-testing.patch
new file mode 100644
index 0000000000..784a07940a
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-check-for-lttng-modules-presence-before-testing.patch
@@ -0,0 +1,24 @@
+From 58e4dcce48b48b68b65bffc0cd51d9e26b44c75d Mon Sep 17 00:00:00 2001
+From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+Date: Wed, 22 May 2019 16:44:54 -0400
+Subject: [PATCH] Fix: check for lttng modules presence before testing
+
+Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2019-May/028987.html]
+
+Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+---
+ tests/regression/tools/notification/test_notification_multi_app | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/regression/tools/notification/test_notification_multi_app b/tests/regression/tools/notification/test_notification_multi_app
+index 29b0f62..a6baf65 100755
+--- a/tests/regression/tools/notification/test_notification_multi_app
++++ b/tests/regression/tools/notification/test_notification_multi_app
+@@ -484,6 +484,7 @@ else
+ fi
+
+ if [ "$(id -u)" == "0" ]; then
++ validate_lttng_modules_present
+ TESTS+=(
+ test_multi_app_kernel
+ test_on_register_evaluation_kernel
diff --git a/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service b/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service
new file mode 100644
index 0000000000..aaf8130592
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=LTTng 2.x central tracing registry session daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/lttng-sessiond -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
index 6230063442..eaa2e7b29d 100755
--- a/meta/recipes-kernel/lttng/lttng-tools/run-ptest
+++ b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
@@ -1,5 +1,6 @@
#!/bin/sh
# Without --ignore-exit, the tap harness causes any FAILs within a
# test plan to raise ERRORs; this is just noise.
-makeargs="LOG_DRIVER_FLAGS=--ignore-exit"
-make -t all >/dev/null 2>&1 && exec make -s $makeargs check 2>/dev/null
+makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD"
+make -k -t all >/dev/null 2>&1
+exec make -k -s $makeargs check 2>/dev/null | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g'
diff --git a/meta/recipes-kernel/lttng/lttng-tools/x32.patch b/meta/recipes-kernel/lttng/lttng-tools/x32.patch
new file mode 100644
index 0000000000..42cebf94ac
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/x32.patch
@@ -0,0 +1,36 @@
+Fix build for x32
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+Fix build error of src/common/utils.c for x32.
+
+Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/150]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+diff --git a/src/bin/lttng/utils.c b/src/bin/lttng/utils.c
+index 0e96ef0c..5c79c8c7 100644
+--- a/src/bin/lttng/utils.c
++++ b/src/bin/lttng/utils.c
+@@ -158,7 +158,7 @@ unsigned int fls_u32(uint32_t x)
+ #define HAS_FLS_U32
+ #endif
+
+-#if defined(__x86_64)
++#if defined(__x86_64) && !defined(__ILP32__)
+ static inline
+ unsigned int fls_u64(uint64_t x)
+ {
+diff --git a/src/common/utils.c b/src/common/utils.c
+index 08139e5e..3c389981 100644
+--- a/src/common/utils.c
++++ b/src/common/utils.c
+@@ -1223,7 +1223,7 @@ static inline unsigned int fls_u32(uint32_t x)
+ #define HAS_FLS_U32
+ #endif
+
+-#if defined(__x86_64)
++#if defined(__x86_64) && !defined(__ILP32__)
+ static inline
+ unsigned int fls_u64(uint64_t x)
+ {
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb b/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb
new file mode 100644
index 0000000000..aa6d19d0fa
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb
@@ -0,0 +1,163 @@
+SECTION = "devel"
+SUMMARY = "Linux Trace Toolkit Control"
+DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
+to extract program execution details from the Linux operating system \
+and interpret them."
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
+ file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
+
+DEPENDS = "liburcu popt libxml2 util-linux"
+RDEPENDS_${PN} = "libgcc"
+RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod lttng-modules sed"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
+RDEPENDS_${PN}-ptest_append_libc-musl = " musl-utils"
+# babelstats.pl wants getopt-long
+RDEPENDS_${PN}-ptest += "perl-module-getopt-long"
+
+PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
+ am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
+ PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
+"
+PACKAGECONFIG ??= "lttng-ust"
+PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
+PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
+PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod"
+PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
+PACKAGECONFIG_remove_arc = "lttng-ust"
+
+SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
+ file://x32.patch \
+ file://run-ptest \
+ file://lttng-sessiond.service \
+ file://0001-Skip-when-testapp-is-not-present.patch \
+ file://0002-Fix-check-for-lttng-modules-presence-before-testing.patch \
+ file://0001-check-for-gettid-API-during-configure.patch \
+ "
+
+SRC_URI[md5sum] = "e7804d10e4cade381e241601f6047373"
+SRC_URI[sha256sum] = "ed71ebe00c5d985c74f30e97b614e909573cbd9276c85e05d9557a0b817a1312"
+
+inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
+
+SYSTEMD_SERVICE_${PN} = "lttng-sessiond.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "tracing"
+
+FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
+ ${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
+
+# Since files are installed into ${libdir}/lttng/libexec we match
+# the libexec insane test so skip it.
+# Python module needs to keep _lttng.so
+INSANE_SKIP_${PN} = "libexec dev-so"
+INSANE_SKIP_${PN}-dbg = "libexec"
+
+do_install_append () {
+ # install systemd unit file
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_unitdir}/system
+}
+
+do_install_ptest () {
+ for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/load-42*.lttng tests/regression/tools/save-load/configuration/load-42*.lttng ; do
+ install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
+ done
+
+ for f in config/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-3.0.xsd; do
+ install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
+ done
+
+ # Prevent 'make check' from recursing into non-test subdirectories.
+ sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"
+
+ # We don't need these
+ sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile"
+
+ # We shouldn't need to build anything in tests/utils
+ sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \
+ "${D}${PTEST_PATH}/tests/Makefile"
+
+ # Copy the tests directory tree and the executables and
+ # Makefiles found within.
+ for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
+ install -d "${D}${PTEST_PATH}/tests/$d"
+ find "${B}/tests/$d" -maxdepth 1 -executable -type f \
+ -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
+ # Take all .py scripts for tests using the python bindings.
+ find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \
+ -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
+ test -r "${B}/tests/$d/Makefile" && \
+ install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
+ done
+
+ for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
+ for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
+ cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
+ case $f in
+ *.so)
+ install -d ${D}${PTEST_PATH}/tests/$d/
+ ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f
+ # Remove any rpath/runpath to pass QA check.
+ chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f
+ ;;
+ esac
+ done
+ done
+
+ #
+ # Use the versioned libs of liblttng-ust-dl.
+ #
+ ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py"
+ if [ -e $ustdl ]; then
+ sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl
+ fi
+
+ install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/
+
+ # We shouldn't need to build anything in tests/regression/tools
+ sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \
+ "${D}${PTEST_PATH}/tests/regression/Makefile"
+
+ # Prevent attempts to update Makefiles during test runs, and
+ # silence "Making check in $SUBDIR" messages.
+ find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+ sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
+ -e '/echo "Making $$target in $$subdir"; \\/d' \
+ -e 's/^srcdir = \(.*\)/srcdir = ./' \
+ -e 's/^builddir = \(.*\)/builddir = ./' \
+ -e 's/^all-am:.*/all-am:/' \
+ {} +
+
+ find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+ touch -r "${B}/Makefile" {} +
+
+ #
+ # Need to stop generated binaries from rebuilding by removing their source dependencies
+ #
+ sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \
+ -e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \
+ -e 's#\(^test.*SOURCES.=\)#disable\1#g' \
+ -e 's#\(^test.*LDADD.=\)#disable\1#g' \
+ -i ${D}${PTEST_PATH}/tests/unit/Makefile
+
+ # Substitute links to installed binaries.
+ for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; do
+ exedir="${D}${PTEST_PATH}/src/bin/${prog}"
+ install -d "$exedir"
+ case "$prog" in
+ lttng-consumerd)
+ ln -s "${libdir}/lttng/libexec/$prog" "$exedir"
+ ;;
+ *)
+ ln -s "${bindir}/$prog" "$exedir"
+ ;;
+ esac
+ done
+}
diff --git a/meta/recipes-kernel/lttng/lttng-tools_git.bb b/meta/recipes-kernel/lttng/lttng-tools_git.bb
deleted file mode 100644
index bfc657b3ac..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools_git.bb
+++ /dev/null
@@ -1,116 +0,0 @@
-SECTION = "devel"
-SUMMARY = "Linux Trace Toolkit Control"
-DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
-to extract program execution details from the Linux operating system \
-and interpret them."
-
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
- file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
-
-DEPENDS = "liburcu popt libxml2 util-linux"
-RDEPENDS_${PN} = "libgcc"
-RDEPENDS_${PN}-ptest += "make perl bash gawk ${PN} babeltrace procps"
-# babelstats.pl wants getopt-long
-RDEPENDS_${PN}-ptest += "perl-module-getopt-long"
-
-SRCREV = "d11e0dba0df9024b8613c51e167a379b91e8b20b"
-PV = "2.8.1+git${SRCPV}"
-
-PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
- am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
- PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
-"
-PACKAGECONFIG ??= "lttng-ust"
-PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
-PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
-PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
-PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native"
-PACKAGECONFIG_remove_libc-musl = "lttng-ust"
-
-SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.8 \
- file://0001-Fix-error.h-common-error.h.patch \
- file://run-ptest"
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep ptest pkgconfig useradd python3-dir
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "tracing"
-
-FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
- ${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
-FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
-
-# Since files are installed into ${libdir}/lttng/libexec we match
-# the libexec insane test so skip it.
-# Python module needs to keep _lttng.so
-INSANE_SKIP_${PN} = "libexec dev-so"
-INSANE_SKIP_${PN}-dbg = "libexec"
-
-do_configure_prepend () {
- # Delete a shipped m4 file that overrides our patched one
- rm -f ${S}/m4/libxml.m4
-}
-
-do_install_ptest () {
- mkdir -p ${D}${PTEST_PATH}
-
- cp -a -T ${B} ${D}${PTEST_PATH}
-
- # Prevent attempts to update Makefiles during test runs, and
- # silence "Making check in $SUBDIR" messages.
- find ${D}${PTEST_PATH} -name Makefile -type f -exec \
- sed -i -e 's!^Makefile:!_Makefile:!' \
- -e '/echo "Making $$target in $$subdir"; \\/d' {} +
-
- # Prevent attempts to update version.h during test runs.
- sed -i -e '/^\.PHONY: version\.h$/d' ${D}${PTEST_PATH}/include/Makefile
-
- # Silence "Making check in $SUBDIR" messages.
- find ${D}${PTEST_PATH} -name Makefile -type f -exec \
- sed -i -e '/echo "Making $$target in $$subdir"; \\/d' {} +
-
- # Substitute links to installed binaries.
- for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd ; do
- orig="${D}${PTEST_PATH}/src/bin/${prog}/${prog}"
- rm "$orig"
- case "$prog" in
- lttng-consumerd)
- ln -s "${libdir}/lttng/libexec/$prog" "$orig"
- ;;
- *)
- ln -s "${bindir}/$prog" "$orig"
- ;;
- esac
- done
-
- # Remove libtool artifacts.
- find ${D}${PTEST_PATH} \( -name '*.l[ao]' -o -name '*.lai' \) -delete
-
- # Remove object files and archives.
- find ${D}${PTEST_PATH} -name '*.[oa]' -type f -delete
-
- # Remove Makefile.am and Makefile.in.
- find ${D}${PTEST_PATH} -name 'Makefile.*' -type f -delete
-
- # Remove autom4te.cache.
- rm -rf ${D}${PTEST_PATH}/autom4te.cache
-
- # Replace libtool wrapper scripts (which won't work on the
- # target) with their corresponding binaries.
- for prog in unit/ini_config/ini_config \
- regression/tools/live/live_test \
- regression/tools/health/health_check ; do
- basename=${prog##*/}
- ldir=${D}${PTEST_PATH}/tests/${prog%/*}
- mv -f ${ldir}/.libs/${basename} ${ldir}
- done
-
- # checkpatch.pl is unneeded on target and causes file-rdeps QA
- # warnings.
- rm -f ${D}${PTEST_PATH}/extras/checkpatch.pl
-}
diff --git a/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch b/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch
new file mode 100644
index 0000000000..c2028d0e1a
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch
@@ -0,0 +1,31 @@
+From f79dac30af9adda12996da7f6aa6667d3b580537 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 26 Sep 2019 17:54:00 +0800
+Subject: [PATCH] python-lttngust/Makefile.am: Add --install-lib to setup.py
+
+Otherwise it may install to /usr/lib, but should be /usr/lib64 when cross
+building.
+
+Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/59]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ python-lttngust/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/python-lttngust/Makefile.am b/python-lttngust/Makefile.am
+index 6c0d20d..38b51b8 100644
+--- a/python-lttngust/Makefile.am
++++ b/python-lttngust/Makefile.am
+@@ -9,7 +9,7 @@ install-exec-local:
+ if [ "$(DESTDIR)" != "" ]; then \
+ opts="$$opts --root=$(DESTDIR)"; \
+ fi; \
+- $(PYTHON) setup.py install $$opts;
++ $(PYTHON) setup.py install $$opts --install-lib=$(pythondir);
+
+ clean-local:
+ rm -rf $(builddir)/build
+--
+2.7.4
+
diff --git a/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
index caf0b8bcf7..bff852799d 100644
--- a/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
+++ b/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
@@ -6,13 +6,12 @@ recipe anyway.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-Index: doc/Makefile.am
+Index: lttng-ust-2.9.1/doc/Makefile.am
===================================================================
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -1,4 +1,4 @@
+--- lttng-ust-2.9.1.orig/doc/Makefile.am
++++ lttng-ust-2.9.1/doc/Makefile.am
+@@ -1,3 +1,3 @@
-SUBDIRS = . man examples
-+SUBDIRS = .
++SUBDIRS = . man
- dist_man_MANS = man/lttng-gen-tp.1 \
- man/lttng-ust.3 \
+ dist_doc_DATA = java-agent.txt
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb b/meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb
new file mode 100644
index 0000000000..cfaad30b69
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x"
+DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes."
+HOMEPAGE = "http://lttng.org/ust"
+BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
+
+LICENSE = "LGPLv2.1+ & MIT & GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
+ file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \
+ file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44"
+
+PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
+ am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
+ PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
+"
+
+inherit autotools lib_package manpages python3native
+
+DEPENDS = "liburcu util-linux"
+RDEPENDS_${PN}-bin = "python3-core"
+
+# For backwards compatibility after rename
+RPROVIDES_${PN} = "lttng2-ust"
+RREPLACES_${PN} = "lttng2-ust"
+RCONFLICTS_${PN} = "lttng2-ust"
+
+PE = "2"
+
+SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \
+ file://lttng-ust-doc-examples-disable.patch \
+ file://0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch \
+ "
+
+SRC_URI[md5sum] = "f0c86a9fa7dcfd0205fb42584a310b1c"
+SRC_URI[sha256sum] = "06f9ed9b2198855b1c7fcbf15fe57297ee259409ffa1b3bad87321412d98bc35"
+
+CVE_PRODUCT = "ust"
+
+PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
+PACKAGECONFIG[python3-agent] = "--enable-python-agent ${PYTHON_OPTION}, --disable-python-agent, python3, python3"
+
+FILES_${PN} += " ${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-staticdev += " ${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += " ${PYTHON_SITEPACKAGES_DIR}/*.la"
+
+do_install_append() {
+ # Patch python tools to use Python 3; they should be source compatible, but
+ # still refer to Python 2 in the shebang
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp
+}
diff --git a/meta/recipes-kernel/lttng/lttng-ust_git.bb b/meta/recipes-kernel/lttng/lttng-ust_git.bb
deleted file mode 100644
index baff71f589..0000000000
--- a/meta/recipes-kernel/lttng/lttng-ust_git.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x"
-DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes."
-HOMEPAGE = "http://lttng.org/ust"
-BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
-
-LICENSE = "LGPLv2.1+ & MIT & GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
- file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \
- file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44"
-
-inherit autotools lib_package
-
-DEPENDS = "liburcu util-linux"
-RDEPENDS_${PN}-bin = "python3-core"
-
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "lttng2-ust"
-RREPLACES_${PN} = "lttng2-ust"
-RCONFLICTS_${PN} = "lttng2-ust"
-
-SRCREV = "514a87f3b64181e384399935a5708a8f85b0cc83"
-PE = "2"
-PV = "2.8.1+git${SRCPV}"
-
-SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.8 \
- file://lttng-ust-doc-examples-disable.patch \
- "
-
-EXTRA_OECONF += "--disable-man-pages"
-
-do_install_append() {
- # Patch python tools to use Python 3; they should be source compatible, but
- # still refer to Python 2 in the shebang
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp
-}
-
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- ( cd ${S}; ${S}/bootstrap )
-}
diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
new file mode 100644
index 0000000000..460e05a445
--- /dev/null
+++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Build tools needed by external modules"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+inherit kernel-arch
+inherit pkgconfig
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+S = "${WORKDIR}"
+
+do_configure[depends] += "virtual/kernel:do_shared_workdir openssl-native:do_populate_sysroot"
+do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
+
+DEPENDS += "bc-native bison-native"
+
+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+
+# Build some host tools under work-shared. CC, LD, and AR are probably
+# not used, but this is the historical way of invoking "make scripts".
+#
+do_configure() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
+ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts prepare
+
+}
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
index db670cfbb4..0f3df5577b 100644
--- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
+++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
@@ -22,7 +22,7 @@ do_install () {
install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
}
-DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
pkg_postinst_${PN} () {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
if [ -n "$D" ]; then
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
deleted file mode 100644
index 96ef43dc30..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "System-Wide Profiler"
-DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
-of profiling all running code at low overhead."
-HOMEPAGE = "http://oprofile.sourceforge.net/news/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191"
-
-LICENSE = "LGPLv2.1+ & GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \
- "
-SECTION = "devel"
-
-DEPENDS = "popt binutils"
-RDEPENDS_${PN} = "binutils-symlinks"
-RRECOMMENDS_${PN} = "kernel-vmlinux"
-
-FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
-FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
-FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://acinclude.m4 \
- file://automake-foreign.patch \
- file://oprofile-cross-compile-tests.patch \
- file://run-ptest \
- file://root-home-dir.patch \
- file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \
- file://0001-Fix-FTBFS-problem-with-GCC-6.patch \
-"
-
-SRC_URI_append_libc-musl = " file://musl.patch"
-
-inherit autotools pkgconfig ptest
-
-EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC="
-do_configure () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
- autotools_do_configure
-}
-
-EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests"
-do_compile_ptest() {
- oe_runmake check
-}
-
-do_install_ptest() {
- subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
- for tooltest in ${subdirs}
- do
- find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
- done
-
- # needed by some libop tests
- cp -r events ${D}${PTEST_PATH}
-
- # needed by libregex regex_test
- cp libregex/stl.pat ${D}${PTEST_PATH}/libregex
- cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests
-
- # needed by litutil++ file_manip_tests
- cp ${S}/libutil++/tests/file_manip_tests.cpp \
- libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests
-}
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
deleted file mode 100644
index ae8562a231..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Tue, 9 Feb 2016 02:00:29 +0100
-Subject: [PATCH] Add rmb() definition for NIOS2 architecture
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ]
----
- libperf_events/operf_utils.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
-index 32954cc..8270e53 100644
---- a/libperf_events/operf_utils.h
-+++ b/libperf_events/operf_utils.h
-@@ -178,6 +178,11 @@ void op_release_resources(void);
- #define cpu_relax() asm volatile("" ::: "memory")
- #endif
-
-+#ifdef __nios2__
-+#define rmb() asm volatile("" ::: "memory")
-+#define cpu_relax() asm volatile("" ::: "memory")
-+#endif
-+
- #ifdef __tile__
- #include <asm/unistd.h>
- #define rmb() __insn_mf()
---
-2.7.0
-
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
deleted file mode 100644
index d372fd527b..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 39d4d46a0bd504ac708ffe72df87bf74cd12ad30 Mon Sep 17 00:00:00 2001
-From: William Cohen <wcohen@redhat.com>
-Date: Fri, 5 Feb 2016 17:30:19 -0500
-Subject: [PATCH] Fix FTBFS problem with GCC-6
-
-GCC-6 is pickier about some of the type conversions causing the Fedora
-24 mass rebuild the build of oprofile failed with:
-
-make[3]: Entering directory '/builddir/build/BUILD/oprofile-1.1.0/libutil++'
-g++ -DHAVE_CONFIG_H -I. -I.. -I ../libutil -I ../libop -I ../libpp -W -Wall -fno-common -ftemplate-depth-50 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c -o op_bfd.o op_bfd.cpp
-op_bfd.cpp: In member function 'void op_bfd::get_symbol_range(symbol_index_t, long long unsigned int&, long long unsigned int&) const':
-op_bfd.cpp:538:47: error: cannot convert 'std::ostream {aka std::basic_ostream<char>}' to 'const bool' in initialization
- bool const verbose = cverb << (vbfd & vlevel1);
- ^
-op_bfd.cpp:546:7: error: in argument to unary !
- if (!verbose)
- ^~~~~~~
-
-Avoid the intermediate bool type to make GCC-6 happy.
-
-Signed-off-by: William Cohen <wcohen@redhat.com>
----
-Upstream-Status: Backport
-
- libutil++/op_bfd.cpp | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/libutil++/op_bfd.cpp b/libutil++/op_bfd.cpp
-index 389c920..f2eb42b 100644
---- a/libutil++/op_bfd.cpp
-+++ b/libutil++/op_bfd.cpp
-@@ -535,15 +535,13 @@ void op_bfd::get_symbol_range(symbol_index_t sym_idx,
- {
- op_bfd_symbol const & sym = syms[sym_idx];
-
-- bool const verbose = cverb << (vbfd & vlevel1);
--
- if (anon_obj)
- start = sym.vma();
- else
- start = sym.filepos();
- end = start + sym.size();
-
-- if (!verbose)
-+ if (!(cverb << (vbfd & vlevel1)))
- return;
-
- io_state state(cverb << (vbfd & vlevel1));
---
-1.9.1
-
diff --git a/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 b/meta/recipes-kernel/oprofile/oprofile/acinclude.m4
deleted file mode 100644
index 95ecd91b5e..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/acinclude.m4
+++ /dev/null
@@ -1,581 +0,0 @@
-dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found)
-dnl see if autoconf.h defines the option
-AC_DEFUN([AX_KERNEL_OPTION], [
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-I$KINC -O2 -D__KERNEL__"
-AC_TRY_COMPILE( [#include <linux/config.h>],
-[
-#ifndef $1
-break_me_hard(\\\);
-#endif
-],[$2],[$3],)
-CFLAGS=$SAVE_CFLAGS
-])
-
-dnl Handle the 2.4 module inside module/
-AC_DEFUN([AX_CONFIG_MODULE],
-[
-if test ! -f $KINC/linux/autoconf.h; then
- AC_MSG_ERROR([no suitably configured kernel include tree found])
-fi
-
-dnl --- Get Linux kernel version and compile parameters ---
-
-AC_SUBST(KVERS)
-AC_MSG_CHECKING([for kernel version])
-dnl it's like this to handle mandrake's fubar version.h - bug #471448
-eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'`
-AC_MSG_RESULT([$KVERS])
-case "$KVERS" in
-2.2.*|2.4.*) ;;
-*) AC_MSG_ERROR([Unsupported kernel version])
-esac
-
-dnl Check for the minimal kernel version supported
-AC_MSG_CHECKING([kernel version])
-AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section]))
-
-dnl linux/spinlock.h added at some point in past
-AC_MSG_CHECKING([for $KINC/linux/spinlock.h])
-if test -f $KINC/linux/spinlock.h; then
- EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER"
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_MSG_CHECKING([for rtc_lock])
-gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null
-if test "$?" -eq 0; then
- EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK"
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-arch="unknown"
-AC_MSG_CHECKING(for x86-64 architecture)
-AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0)
-AX_MSG_RESULT_YN($x8664)
-BUILD_HAMMER=no
-if test "$x8664" -eq 1; then
- arch="x86"
- BUILD_HAMMER=yes
-else
- AC_MSG_CHECKING(for x86 architecture)
- AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0)
- AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86)
- AX_MSG_RESULT_YN($x86)
- test "$x86" = 1 && arch="x86"
-
- if test "$arch" = "unknown"; then
- AC_MSG_CHECKING(for ia64 architecture)
- AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0)
- AX_MSG_RESULT_YN($ia64)
- test "$ia64" = 1 && arch="ia64"
- fi
-
-fi
-AC_SUBST(BUILD_HAMMER)
-
-test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture)
-
-dnl check to see if kernel verion appropriate for arch
-AC_MSG_CHECKING(arch/kernel version combination)
-case "$arch" in
-ia64)
- AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]),
- AC_MSG_ERROR([unsupported arch/kernel])) ;;
-*) AC_MSG_RESULT([ok])
-esac
-
-dnl for now we do not support PREEMPT patch
-AC_MSG_CHECKING([for preempt patch])
-AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0)
-AX_MSG_RESULT_YN([$preempt])
-test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT])
-
-AC_SUBST(KINC)
-
-MODINSTALLDIR=/lib/modules/$KVERS
-
-OPROFILE_MODULE_ARCH=$arch
-AC_SUBST(OPROFILE_MODULE_ARCH)
-]
-)
-
-dnl AX_MSG_RESULT_YN(a)
-dnl results "yes" iff a==1, "no" else
-AC_DEFUN([AX_MSG_RESULT_YN], [x=no
-test "x$1" = "x1" && x=yes
-AC_MSG_RESULT($x)])
-
-dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc))
-AC_DEFUN([AX_MALLOC_ATTRIBUTE],
-[
-AC_MSG_CHECKING([whether malloc attribute is understood])
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-AC_TRY_COMPILE(,[
-void monkey() __attribute__((malloc));
-],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no]))
-CFLAGS=$SAVE_CFLAGS
-]
-)
-
-dnl builtin_expect is used in module we can't add that in config.h
-AC_DEFUN([AX_BUILTIN_EXPECT],
-[
-AC_MSG_CHECKING([whether __builtin_expect is understood])
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-AC_TRY_LINK(,[
-int i;
-if (__builtin_expect(i, 0)) { }
-],
-AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK",
-AC_MSG_RESULT([no]);)
-CFLAGS=$SAVE_CFLAGS
-]
-)
-
-dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs
-AC_DEFUN([AX_EXTRA_DIRS],
-[
-AC_ARG_WITH(extra-includes,
-[ --with-extra-includes=DIR add extra include paths],
- use_extra_includes="$withval",
- use_extra_includes=NO
-)
-if test -n "$use_extra_includes" && \
- test "$use_extra_includes" != "NO"; then
- ac_save_ifs=$IFS
- IFS=':'
- for dir in $use_extra_includes; do
- extra_includes="$extra_includes -I$dir"
- done
- IFS=$ac_save_ifs
- CPPFLAGS="$CPPFLAGS $extra_includes"
-fi
-
-AC_ARG_WITH(extra-libs,
-[ --with-extra-libs=DIR add extra library paths],
- use_extra_libs=$withval,
- use_extra_libs=NO
-)
-if test -n "$use_extra_libs" && \
- test "$use_extra_libs" != "NO"; then
- ac_save_ifs=$IFS
- IFS=':'
- for dir in $use_extra_libs; do
- extra_libraries="$extra_libraries -L$dir"
- done
- IFS=$ac_save_ifs
- LDFLAGS="$LDFLAGS $extra_libraries"
-fi
-]
-)
-
-dnl AX_POPT_CONST - check popt prototype
-AC_DEFUN([AX_POPT_CONST],
-[
-AC_MSG_CHECKING([popt prototype])
-SAVE_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-Werror $CXXFLAGS"
-AC_TRY_COMPILE([#include <popt.h>],
-[
-int c; char **v;
-poptGetContext(0, c, v, 0, 0);
-],
-AC_MSG_RESULT([takes char **]);,
-AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **]))
-CXXFLAGS="$SAVE_CXXFLAGS"
-]
-)
-
-dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK
-AC_DEFUN([AX_CHECK_SSTREAM],
-[
-AC_MSG_CHECKING([whether to use included sstream])
-AC_TRY_COMPILE([#include <sstream>], [],
-AC_MSG_RESULT([no]);,
-AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include")
-]
-)
-
-dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false)
-dnl exec action-if-true if typedef_name is a typedef to type else exec
-dnl action-if-false
-dnl currently work only with type typedef'ed in stddef.h
-AC_DEFUN([AX_CHECK_TYPEDEF], [
-dnl AC_LANG_PUSH(C) not in autoconf 2.13
-AC_LANG_SAVE
-AC_LANG_C
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-
-AC_TRY_COMPILE(
- [
- #include <stddef.h>
- ],
- [
- typedef void (*fct1)($1);
- typedef void (*fct2)($2);
- fct1 f1 = 0;
- fct2 f2 = 0;
- if (f1 == f2) {}
- ],
-[$3],[$4])
-
-CFLAGS=$SAVE_CFLAGS
-AC_LANG_RESTORE
-])
-
-
-dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name)
-dnl set var_name to the typedef name of $1 which must be in canditate_list
-dnl else produce a fatal error
-AC_DEFUN([AX_TYPEDEFED_NAME], [
- AC_MSG_CHECKING([type of $1])
- for f in $2; do
- AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="")
- if test -n "${$3}"; then
- break
- fi
- done
- if test -n "${$3}"; then
- AC_MSG_RESULT([${$3}])
- else
- AC_MSG_ERROR([not found])
- fi
-])
-
-dnl find a binary in the path
-AC_DEFUN([QT_FIND_PATH],
-[
- AC_MSG_CHECKING([for $1])
- AC_CACHE_VAL(qt_cv_path_$1,
- [
- qt_cv_path_$1="NONE"
- if test -n "$$2"; then
- qt_cv_path_$1="$$2";
- else
- dirs="$3"
- qt_save_IFS=$IFS
- IFS=':'
- for dir in $PATH; do
- dirs="$dirs $dir"
- done
- IFS=$qt_save_IFS
-
- for dir in $dirs; do
- if test -x "$dir/$1"; then
- if test -n "$5"; then
- evalstr="$dir/$1 $5 2>&1 "
- if eval $evalstr; then
- qt_cv_path_$1="$dir/$1"
- break
- fi
- else
- qt_cv_path_$1="$dir/$1"
- break
- fi
- fi
- done
- fi
- ])
-
- if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then
- AC_MSG_RESULT(not found)
- $4
- else
- AC_MSG_RESULT($qt_cv_path_$1)
- $2=$qt_cv_path_$1
- fi
-])
-
-dnl Find the uic compiler on the path or in qt_cv_dir
-AC_DEFUN([QT_FIND_UIC],
-[
- QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin)
- if test -z "$ac_uic" -a "$FATAL" = 1; then
- AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !])
- fi
-])
-
-dnl Find the right moc in path/qt_cv_dir
-AC_DEFUN([QT_FIND_MOC],
-[
- QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin)
- QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin)
-
- if test -n "$ac_moc1" -a -n "$ac_moc2"; then
- dnl found both. Prefer Qt3's if it exists else moc2
- $ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null
- if test "$?" = 0; then
- ac_moc=$ac_moc1;
- else
- ac_moc=$ac_moc2;
- fi
- else
- if test -n "$ac_moc1"; then
- ac_moc=$ac_moc1;
- else
- ac_moc=$ac_moc2;
- fi
- fi
-
- if test -z "$ac_moc" -a "$FATAL" = 1; then
- AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !])
- fi
-])
-
-dnl check a particular libname
-AC_DEFUN([QT_TRY_LINK],
-[
- SAVE_LIBS="$LIBS"
- LIBS="$LIBS $1"
- AC_TRY_LINK([
- #include <qglobal.h>
- #include <qstring.h>
- ],
- [
- QString s("mangle_failure");
- #if (QT_VERSION < 221)
- break_me_(\\\);
- #endif
- ],
- qt_cv_libname=$1,
- )
- LIBS="$SAVE_LIBS"
-])
-
-dnl check we can do a compile
-AC_DEFUN([QT_CHECK_COMPILE],
-[
- AC_MSG_CHECKING([for Qt library name])
-
- AC_CACHE_VAL(qt_cv_libname,
- [
- AC_LANG_CPLUSPLUS
- SAVE_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS"
-
- for libname in -lqt-mt -lqt3 -lqt2 -lqt;
- do
- QT_TRY_LINK($libname)
- if test -n "$qt_cv_libname"; then
- break;
- fi
- done
-
- CXXFLAGS=$SAVE_CXXFLAGS
- ])
-
- if test -z "$qt_cv_libname"; then
- AC_MSG_RESULT([failed])
- if test "$FATAL" = 1 ; then
- AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !])
- fi
- else
- AC_MSG_RESULT([$qt_cv_libname])
- fi
-])
-
-dnl get Qt version we're using
-AC_DEFUN([QT_GET_VERSION],
-[
- AC_CACHE_CHECK([Qt version],lyx_cv_qtversion,
- [
- AC_LANG_CPLUSPLUS
- SAVE_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
-
- cat > conftest.$ac_ext <<EOF
-#line __oline__ "configure"
-#include "confdefs.h"
-#include <qglobal.h>
-"%%%"QT_VERSION_STR"%%%"
-EOF
- lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
- grep '^"%%%"' 2>/dev/null | \
- sed -e 's/"%%%"//g' -e 's/"//g'`
- rm -f conftest.$ac_ext
- CPPFLAGS=$SAVE_CPPFLAGS
- ])
-
- QT_VERSION=$lyx_cv_qtversion
- AC_SUBST(QT_VERSION)
-])
-
-dnl start here
-AC_DEFUN([QT_DO_IT_ALL],
-[
- dnl Please leave this alone. I use this file in
- dnl oprofile.
- FATAL=0
-
- AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt is installed ],
- [ qt_cv_dir=`eval echo "$withval"/` ])
-
- AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt includes are. ],
- [ qt_cv_includes=`eval echo "$withval"` ])
-
- AC_ARG_WITH(qt-libraries, [ --with-qt-libraries where the Qt library is installed.],
- [ qt_cv_libraries=`eval echo "$withval"` ])
-
- dnl pay attention to $QTDIR unless overridden
- if test -z "$qt_cv_dir"; then
- qt_cv_dir=$QTDIR
- fi
-
- dnl derive inc/lib if needed
- if test -n "$qt_cv_dir"; then
- if test -z "$qt_cv_includes"; then
- qt_cv_includes=$qt_cv_dir/include
- fi
- if test -z "$qt_cv_libraries"; then
- qt_cv_libraries=$qt_cv_dir/lib
- fi
- fi
-
- dnl flags for compilation
- QT_INCLUDES=
- QT_LDFLAGS=
- if test -n "$qt_cv_includes"; then
- QT_INCLUDES="-I$qt_cv_includes"
- fi
- if test -n "$qt_cv_libraries"; then
- QT_LDFLAGS="-L$qt_cv_libraries"
- fi
- AC_SUBST(QT_INCLUDES)
- AC_SUBST(QT_LDFLAGS)
-
- QT_FIND_MOC
- MOC=$ac_moc
- AC_SUBST(MOC)
- QT_FIND_UIC
- UIC=$ac_uic
- AC_SUBST(UIC)
-
- QT_CHECK_COMPILE
-
- QT_LIB=$qt_cv_libname;
- AC_SUBST(QT_LIB)
-
- if test -n "$qt_cv_libname"; then
- QT_GET_VERSION
- fi
-])
-
-dnl AX_CXXFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CXX support it.
-AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [
-AC_MSG_CHECKING([whether ${CXX} support precompiled header])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-SAVE_CXXFLAGS=$CXXFLAGS
-dnl we consider than if -Winvalid-pch is accepted pch will works ...
-CXXFLAGS=-Winvalid-pch
-dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and
-dnl the fact than some pch will be invalid for the given compilation option
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no]))
-CXXFLAGS=$SAVE_CXXFLAGS
-AC_LANG_RESTORE
-])
-
-dnl AX_CHECK_DOCBOOK
-AC_DEFUN([AX_CHECK_DOCBOOK], [
-# It's just rude to go over the net to build
-XSLTPROC_FLAGS=--nonet
-DOCBOOK_ROOT=
-if test ! -f /etc/xml/catalog; then
- for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/;
- do
- if test -d "$i"; then
- DOCBOOK_ROOT=$i
- fi
- done
-
- # Last resort - try net
- if test -z "$DOCBOOK_ROOT"; then
- XSLTPROC_FLAGS=
- fi
-else
- XML_CATALOG=/etc/xml/catalog
- CAT_ENTRY_START='<!--'
- CAT_ENTRY_END='-->'
-fi
-
-AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
-XSLTPROC_WORKS=no
-if test -n "$XSLTPROC"; then
- AC_MSG_CHECKING([whether xsltproc works])
-
- if test -n "$XML_CATALOG"; then
- DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
- else
- DB_FILE="$DOCBOOK_ROOT/docbook.xsl"
- fi
-
- $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END
-<?xml version="1.0" encoding='ISO-8859-1'?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<book id="test">
-</book>
-END
- if test "$?" = 0; then
- XSLTPROC_WORKS=yes
- fi
- AC_MSG_RESULT($XSLTPROC_WORKS)
-fi
-AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes")
-
-AC_SUBST(XML_CATALOG)
-AC_SUBST(XSLTPROC_FLAGS)
-AC_SUBST(DOCBOOK_ROOT)
-AC_SUBST(CAT_ENTRY_START)
-AC_SUBST(CAT_ENTRY_END)
-])
-
-dnl AX_CFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CC support it.
-AC_DEFUN([AX_CFLAGS_OPTION], [
-AC_MSG_CHECKING([whether ${CC} $2 is understood])
-AC_LANG_SAVE
-AC_LANG_C
-SAVE_CFLAGS=$CFLAGS
-CFLAGS=$2
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
-CFLAGS=$SAVE_CFLAGS
-AC_LANG_RESTORE
-])
-
-
-dnl AX_CXXFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CXX support it.
-AC_DEFUN([AX_CXXFLAGS_OPTION], [
-AC_MSG_CHECKING([whether ${CXX} $2 is understood])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-SAVE_CXXFLAGS=$CXXFLAGS
-CXXFLAGS=$2
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
-CXXFLAGS=$SAVE_CXXFLAGS
-AC_LANG_RESTORE
-])
-
-dnl AX_COPY_IF_CHANGE(source, dest)
-dnl copy source to dest if they don't compare equally or if dest doesn't exist
-AC_DEFUN([AX_COPY_IF_CHANGE], [
-if test -r $2; then
- if cmp $1 $2 > /dev/null; then
- echo $2 is unchanged
- else
- cp -f $1 $2
- fi
-else
- cp -f $1 $2
-fi
-])
-
diff --git a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
deleted file mode 100644
index b9bb6c5779..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign".
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index 5740585..cf6c316 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h])
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-kernel/oprofile/oprofile/musl.patch b/meta/recipes-kernel/oprofile/oprofile/musl.patch
deleted file mode 100644
index 51db408454..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/musl.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Fix glibc-isms so that oprofile builds with musl.
-
-Patch taken from openwrt (https://github.com/openwrt-mirror/openwrt/blob/master/package/devel/oprofile/patches/100-musl.patch)
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
---- a/pe_profiling/operf.cpp
-+++ b/pe_profiling/operf.cpp
-@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_
- int tflag __attribute__((unused)),
- struct FTW *ftwbuf __attribute__((unused)))
- {
-+ int err;
-+
- if (remove(fpath)) {
-+ err = errno;
- perror("sample data removal error");
-- return FTW_STOP;
-+ return err;
- } else {
-- return FTW_CONTINUE;
-+ return 0;
- }
- }
-
-@@ -896,7 +899,7 @@ static void convert_sample_data(void)
- return;
-
- if (!operf_options::append) {
-- int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
-+ int flags = FTW_DEPTH;
- errno = 0;
- if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
- errno != ENOENT) {
---- a/libop/op_events.c
-+++ b/libop/op_events.c
-@@ -83,7 +83,7 @@ static int parse_hex(char const * str)
- static u64 parse_long_hex(char const * str)
- {
- u64 value;
-- if (sscanf(str, "%Lx", &value) != 1)
-+ if (sscanf(str, "0x%llx", &value) != 1)
- parse_error("expected long hexadecimal value");
-
- fflush(stderr);
diff --git a/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch b/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
deleted file mode 100644
index aefa9548e1..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Prevent running check tests on host if cross compiling
-
-This patch enables running the 'make check' tests on the target
-in a cross-compiled environment. If not cross-compiling, then 'make
- check' builds and executes the tests; no change from this patch.
-In a cross-compiling environment, the make variable CROSS_COMPILE is
-set which bypasses assiging tests to the makekfile variable TESTS.
-Since TESTS is empty, the 'make check' process never tries to run the
-tests on the hosts. On the target, the tests must be run manually.
-
-Also, in the libutil++ tests, a makefile variable SRCDIR is passed into
-the compilation phase, pointing to the runtime location of the test
-'file-manip-tests'. The mechanism used for a host test, based on
-'topdir' doesn't work. Instead, if CROSS_COMPILE is set, the
-makefile takes the path of SRCDIR from the build environment and not
-from an expression based on the host path 'topdir'.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-diff --git a/configure.ac b/configure.ac
-index 41ece64..ce5a16f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -392,6 +392,7 @@ AC_ARG_ENABLE(account-check,
- enable_account_check=$enableval, enable_account_check=yes)
-
- AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes")
-+AM_CONDITIONAL(CROSS_COMPILE, test "x$cross_compiling" = "xyes")
-
- AC_SUBST(OP_CFLAGS)
- AC_SUBST(OP_CXXFLAGS)
-diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am
-index 8a69003..d820090 100644
---- a/libdb/tests/Makefile.am
-+++ b/libdb/tests/Makefile.am
-@@ -13,4 +13,6 @@ check_PROGRAMS = db_test
- db_test_SOURCES = db_test.c
- db_test_LDADD = ../libodb.a ../../libutil/libutil.a
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am
-index 8a79eb5..6d417c4 100644
---- a/libop/tests/Makefile.am
-+++ b/libop/tests/Makefile.am
-@@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS}
- mangle_tests_SOURCES = mangle_tests.c
- mangle_tests_LDADD = ${COMMON_LIBS}
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS} utf8_checker.sh
-+endif
-diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am
-index 6f19838..1d176f9 100644
---- a/libregex/tests/Makefile.am
-+++ b/libregex/tests/Makefile.am
-@@ -18,4 +18,6 @@ java_test_LDADD = \
-
- EXTRA_DIST = mangled-name.in
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am
-index 51af031..a01ea2d 100644
---- a/libutil++/tests/Makefile.am
-+++ b/libutil++/tests/Makefile.am
-@@ -1,7 +1,9 @@
-
- REALPATH= readlink -f
-
-+if ! CROSS_COMPILE
- SRCDIR := $(shell $(REALPATH) $(topdir)/libutil++/tests/ )
-+endif
-
- AM_CPPFLAGS = \
- -I ${top_srcdir}/libutil++ -D SRCDIR="\"$(SRCDIR)/\"" @OP_CPPFLAGS@
-@@ -46,4 +48,6 @@ cached_value_tests_LDADD = ${COMMON_LIBS}
- utility_tests_SOURCES = utility_tests.cpp
- utility_tests_LDADD = ${COMMON_LIBS}
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am
-index dfcd6ec..e8831b5 100644
---- a/libutil/tests/Makefile.am
-+++ b/libutil/tests/Makefile.am
-@@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a
- string_tests_SOURCES = string_tests.c
- string_tests_LDADD = ../libutil.a
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
diff --git a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
deleted file mode 100644
index 3eaf6a794a..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-oprofile: Determine the root home directory dynamically
-
-This commit detects the root home directory dynamically with changes to
-the oprofile gui app source.
-
-The commit replaces an earlier fix that detected and adjusted a
-'non-standard' root home directory at build time. The advantage of this
-patch is that the oprofile tools are adjusted to the current run-time
-path to ~root, not the build time path.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-Index: oprofile-1.0.0/doc/oprofile.html
-===================================================================
---- oprofile-1.0.0.orig/doc/oprofile.html 2014-11-03 17:55:31.511034857 +0000
-+++ oprofile-1.0.0/doc/oprofile.html 2014-11-03 17:57:26.415037988 +0000
-@@ -1563,8 +1563,8 @@
- <span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process
- the profile data it has collected. Use <code class="code">kill -SIGINT &lt;operf-PID&gt;</code>
- for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span>
-- with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory
-- of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users.
-+ with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory
-+ of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users.
- </p>
- </dd>
- <dt>
-Index: oprofile-1.0.0/doc/oprofile.xml
-===================================================================
---- oprofile-1.0.0.orig/doc/oprofile.xml 2014-11-03 17:55:31.515034857 +0000
-+++ oprofile-1.0.0/doc/oprofile.xml 2014-11-03 17:58:03.719039005 +0000
-@@ -654,8 +654,8 @@
- <emphasis>must</emphasis> stop it in a controlled manner in order to process
- the profile data it has collected. Use <code>kill -SIGINT &lt;operf-PID&gt;</code>
- for this purpose. It is recommended that when running <command>operf</command>
-- with this option, your current working directory should be <filename>/root</filename> or a subdirectory
-- of <filename>/root</filename> to avoid storing sample data files in locations accessible by regular users.
-+ with this option, your current working directory should be <filename>~root</filename> or a subdirectory
-+ of <filename>~root</filename> to avoid storing sample data files in locations accessible by regular users.
- </para></listitem>
- </varlistentry>
- <varlistentry>
diff --git a/meta/recipes-kernel/oprofile/oprofile/run-ptest b/meta/recipes-kernel/oprofile/oprofile/run-ptest
deleted file mode 100644
index 4814be652a..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/run-ptest
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-saved_dir=$PWD
-for dir in */tests ; do
- cd $dir
- for atest in * ; do
- if [ \( -x $atest \) -a \( -f $atest \) ] ; then
- ./$atest > ${atest}.stdout 2> ${atest}.stderr
- if [ $? = 0 ] ; then
- echo "PASS: $dir $atest"
- rm ${atest}.stdout ${atest}.stderr
- else
- echo "FAIL: ${dir}/${atest}"
- fi
- fi
- done
- cd $saved_dir
-done
-
diff --git a/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb b/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
deleted file mode 100644
index 92a94ad0d4..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require oprofile.inc
-
-DEPENDS += "virtual/kernel"
-DEPENDS_append_powerpc64 = " libpfm4"
-
-SRC_URI[md5sum] = "248c4c069f9476f427fa7195563f9867"
-SRC_URI[sha256sum] = "cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c"
-
-S = "${WORKDIR}/oprofile-${PV}"
-
diff --git a/meta/recipes-kernel/perf/perf-features.inc b/meta/recipes-kernel/perf/perf-features.inc
deleted file mode 100644
index b8859ab7d5..0000000000
--- a/meta/recipes-kernel/perf/perf-features.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui"
-
-def perf_feature_enabled(feature, trueval, falseval, d):
- """
- Check which perf features are enabled.
-
- The PERF_FEATURES_ENABLE variable lists the perf features to
- enable. Override it if you want something different from what's
- listed above, which is the default. If empty, the build won't
- enable any features (which may be exactly what you want, just a
- barebones perf without any extra baggage, what you get if you
- specify an empty feature list).
-
- Available perf features:
- perf-scripting: enable support for Perl and Python bindings
- perf-tui: enable support for the perf TUI (via libnewt)
-
- """
- enabled_features = d.getVar("PERF_FEATURES_ENABLE", True) or ""
- if feature in enabled_features:
- return trueval
- return falseval
diff --git a/meta/recipes-kernel/perf/perf-perl.inc b/meta/recipes-kernel/perf/perf-perl.inc
new file mode 100644
index 0000000000..ae77319b20
--- /dev/null
+++ b/meta/recipes-kernel/perf/perf-perl.inc
@@ -0,0 +1,7 @@
+inherit perlnative cpan-base
+
+# Env var which tells perl if it should use host (no) or target (yes) settings
+export PERLCONFIGTARGET = "${@is_target(d)}"
+export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
+export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 0d104d36fa..5f0ba7c180 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -5,43 +5,48 @@ performance analysis. It covers hardware level \
(CPU/PMU, Performance Monitoring Unit) features \
and software features (software counters, tracepoints) \
as well."
+HOMEPAGE = "https://perf.wiki.kernel.org/index.php/Main_Page"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
PR = "r9"
-require perf-features.inc
-
-BUILDPERF_libc-uclibc = "no"
-
+PACKAGECONFIG ??= "scripting tui libunwind"
+PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
+PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3"
# gui support was added with kernel 3.6.35
# since 3.10 libnewt was replaced by slang
# to cover a wide range of kernel we add both dependencies
-TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}"
-SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}"
-LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}"
+PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang"
+PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind"
+PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1"
+PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
+PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
+# libaudit support would need scripting to be enabled
+PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
+PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"
+PACKAGECONFIG[cap] = ",,libcap"
+
+# libunwind is not yet ported for some architectures
+PACKAGECONFIG_remove_arc = "libunwind"
+PACKAGECONFIG_remove_riscv64 = "libunwind"
DEPENDS = " \
virtual/${MLPREFIX}libc \
${MLPREFIX}elfutils \
${MLPREFIX}binutils \
- ${TUI_DEPENDS} \
- ${SCRIPTING_DEPENDS} \
- ${LIBUNWIND_DEPENDS} \
- bison flex xz \
- xmlto-native \
- asciidoc-native \
+ bison-native flex-native xz \
"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
PROVIDES = "virtual/perf"
-inherit linux-kernel-base kernel-arch pythonnative
+inherit linux-kernel-base kernel-arch manpages
# needed for building the tools/perf Python bindings
-inherit python-dir
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3native', '', d)}
+inherit python3-dir
export PYTHON_SITEPACKAGES_DIR
#kernel 3.1+ supports WERROR to disable warnings as errors
@@ -50,23 +55,13 @@ export WERROR = "0"
do_populate_lic[depends] += "virtual/kernel:do_patch"
# needed for building the tools/perf Perl binding
-inherit perlnative cpan-base
-# Env var which tells perl if it should use host (no) or target (yes) settings
-export PERLCONFIGTARGET = "${@is_target(d)}"
-export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
-export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
-export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)}
inherit kernelsrc
-B = "${WORKDIR}/${BPN}-${PV}"
+S = "${WORKDIR}/${BP}"
SPDX_S = "${S}/tools/perf"
-SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
-TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
-LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1',d)}"
-LIBNUMA_DEFINES = "${@perf_feature_enabled('perf-libnuma', '', 'NO_LIBNUMA=1',d)}"
-
# The LDFLAGS is required or some old kernels fails due missing
# symbols and this is preferred than requiring patches to every old
# supported kernel.
@@ -81,9 +76,12 @@ EXTRA_OEMAKE = '\
AR="${AR}" \
LD="${LD}" \
EXTRA_CFLAGS="-ldw" \
+ EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \
perfexecdir=${libexecdir} \
- NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
- ${SCRIPTING_DEFINES} ${LIBNUMA_DEFINES} \
+ NO_GTK2=1 \
+ ${PACKAGECONFIG_CONFARGS} \
+ TMPDIR="${B}" \
+ LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \
'
EXTRA_OEMAKE += "\
@@ -97,8 +95,34 @@ EXTRA_OEMAKE += "\
'sharedir=${@os.path.relpath(datadir, prefix)}' \
'mandir=${@os.path.relpath(mandir, prefix)}' \
'infodir=${@os.path.relpath(infodir, prefix)}' \
+ ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \
"
+# During do_configure, we might run a 'make clean'. That often breaks
+# when done in parallel, so disable parallelism for do_configure. Note
+# that it has to be done this way rather than by passing -j1, since
+# perf's build system by default ignores any -j argument, but does
+# honour a JOBS variable.
+EXTRA_OEMAKE_append_task-configure = " JOBS=1"
+
+PERF_SRC ?= "Makefile \
+ tools/arch \
+ tools/build \
+ tools/include \
+ tools/lib \
+ tools/Makefile \
+ tools/perf \
+ tools/scripts \
+ scripts/ \
+ arch/${ARCH}/Makefile \
+"
+
+PERF_EXTRA_LDFLAGS = ""
+
+# MIPS N32
+PERF_EXTRA_LDFLAGS_mipsarchn32eb = "-m elf32btsmipn32"
+PERF_EXTRA_LDFLAGS_mipsarchn32el = "-m elf32ltsmipn32"
+
do_compile() {
# Linux kernel build system is expected to do the right thing
unset CFLAGS
@@ -110,16 +134,31 @@ do_install() {
unset CFLAGS
oe_runmake install
# we are checking for this make target to be compatible with older perf versions
- if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
- oe_runmake DESTDIR=${D} install-python_ext
+ if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
+ oe_runmake DESTDIR=${D} install-python_ext
fi
}
-do_configure_prepend () {
- # Fix for rebuilding
- rm -rf ${B}/
- mkdir -p ${B}/
+do_configure[prefuncs] += "copy_perf_source_from_kernel"
+python copy_perf_source_from_kernel() {
+ sources = (d.getVar("PERF_SRC") or "").split()
+ src_dir = d.getVar("STAGING_KERNEL_DIR")
+ dest_dir = d.getVar("S")
+ bb.utils.mkdirhier(dest_dir)
+ for s in sources:
+ src = oe.path.join(src_dir, s)
+ dest = oe.path.join(dest_dir, s)
+ if not os.path.exists(src):
+ bb.fatal("Path does not exist: %s. Maybe PERF_SRC does not match the kernel version." % src)
+ if os.path.isdir(src):
+ oe.path.copyhardlinktree(src, dest)
+ else:
+ src_path = os.path.dirname(s)
+ os.makedirs(os.path.join(dest_dir,src_path),exist_ok=True)
+ bb.utils.copyfile(src, dest)
+}
+do_configure_prepend () {
# If building a multlib based perf, the incorrect library path will be
# detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
# build, with a 64 bit multilib, the arch won't match and the detection of a
@@ -170,6 +209,7 @@ do_configure_prepend () {
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
+ sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf
fi
if [ -e "${S}/tools/lib/api/Makefile" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
@@ -197,13 +237,20 @@ do_configure_prepend () {
fi
# use /usr/bin/env instead of version specific python
- for s in `find ${S}/tools/perf/scripts/python/ -name '*.py'`; do
- sed -i 's,/usr/bin/python2,/usr/bin/env python,' "${s}"
+ for s in `find ${S}/tools/perf/ -name '*.py'`; do
+ sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
+ sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
+ sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
done
+
+ # unistd.h can be out of sync between libc-headers and the captured version in the perf source
+ # so we copy it from the sysroot unistd.h to the perf unistd.h
+ install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
+ install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h
}
python do_package_prepend() {
- d.setVar('PKGV', d.getVar("KERNEL_VERSION", True).split("-")[0])
+ d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -212,22 +259,24 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
RDEPENDS_${PN} += "elfutils bash"
-RDEPENDS_${PN}-doc += "man"
RDEPENDS_${PN}-archive =+ "bash"
-RDEPENDS_${PN}-python =+ "bash python python-modules"
+RDEPENDS_${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python3', '', d)}"
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
-RDEPENDS_${PN}-tests =+ "python"
+RDEPENDS_${PN}-tests =+ "python3"
-RSUGGESTS_SCRIPTING = "${@perf_feature_enabled('perf-scripting', '${PN}-perl ${PN}-python', '',d)}"
+RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}"
RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
-#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent"
-FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent ${libdir}/libperf-jvmti.so"
FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
-FILES_${PN}-python = "${libdir}/perf/perf-core/scripts/python ${PYTHON_SITEPACKAGES_DIR}"
-FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*"
-FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl"
+FILES_${PN}-python = " \
+ ${PYTHON_SITEPACKAGES_DIR} \
+ ${libexecdir}/perf-core/scripts/python \
+ "
+FILES_${PN}-perl = "${libexecdir}/perf-core/scripts/perl"
INHIBIT_PACKAGE_DEBUG_SPLIT="1"
+DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized"
diff --git a/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch b/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
deleted file mode 100644
index 0fd63106d6..0000000000
--- a/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0856d8145d187a7e5a49625247abe43a13f95acc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 15 Sep 2015 19:36:28 +0000
-Subject: [PATCH] include rquired headers for typedefs
-
-timeval struct needs to include sys/time.h and sprintf() usage requires
-to include stdio.h headers from system
-
-Fixes
-src/perf/perf_bundle.cpp:141:2: error: use of undeclared identifier 'sprintf'; did you mean 'vswprintf'?
-src/devices/devfreq.h:35:18: error: field has incomplete type 'struct timeval'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/devices/devfreq.h | 1 +
- src/perf/perf_bundle.cpp | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/src/devices/devfreq.h b/src/devices/devfreq.h
-index 16a60fb..4bede7c 100644
---- a/src/devices/devfreq.h
-+++ b/src/devices/devfreq.h
-@@ -25,6 +25,7 @@
- #ifndef _INCLUDE_GUARD_DEVFREQ_H
- #define _INCLUDE_GUARD_DEVFREQ_H
-
-+#include <sys/time.h>
- #include "device.h"
- #include "../parameters/parameters.h"
-
-diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp
-index cf1ae11..232f894 100644
---- a/src/perf/perf_bundle.cpp
-+++ b/src/perf/perf_bundle.cpp
-@@ -27,6 +27,7 @@
- #include <algorithm>
- #include <string.h>
- #include <stdint.h>
-+#include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
---
-2.5.2
-
diff --git a/meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch b/meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch
new file mode 100644
index 0000000000..7bfca8abfd
--- /dev/null
+++ b/meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch
@@ -0,0 +1,55 @@
+From 4c24fdd8e0a42359df7308155b2d43c28a5e02fd Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 20 May 2019 20:25:00 +0200
+Subject: [PATCH] wakeup_xxx.h: include limits.h
+
+limits.h must be included to define PATH_MAX otherwise build will fail
+on:
+
+In file included from wakeup/wakeup_ethernet.cpp:45:0:
+wakeup/wakeup_ethernet.h:35:16: error: 'PATH_MAX' was not declared in this scope
+ char eth_path[PATH_MAX];
+
+In file included from wakeup/wakeup_usb.cpp:45:0:
+wakeup/wakeup_usb.h:35:16: error: 'PATH_MAX' was not declared in this scope
+ char usb_path[PATH_MAX];
+
+Fixes:
+ - http://autobuild.buildroot.org/results/a0b3337cf4a827e6566f8b15b6bb180f0dcef7a3
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Submitted [https://lists.01.org/pipermail/powertop/2019-May/002052.html]
+---
+ src/wakeup/wakeup_ethernet.h | 1 +
+ src/wakeup/wakeup_usb.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/wakeup/wakeup_ethernet.h b/src/wakeup/wakeup_ethernet.h
+index 682bf95..e0fa628 100644
+--- a/src/wakeup/wakeup_ethernet.h
++++ b/src/wakeup/wakeup_ethernet.h
+@@ -25,6 +25,7 @@
+ #ifndef _INCLUDE_GUARD_ETHERNET_WAKEUP_H
+ #define _INCLUDE_GUARD_ETHERNET_WAKEUP_H
+
++#include <limits.h>
+ #include <vector>
+
+ #include "wakeup.h"
+diff --git a/src/wakeup/wakeup_usb.h b/src/wakeup/wakeup_usb.h
+index f7a1f7e..15898e3 100644
+--- a/src/wakeup/wakeup_usb.h
++++ b/src/wakeup/wakeup_usb.h
+@@ -25,6 +25,7 @@
+ #ifndef _INCLUDE_GUARD_USB_WAKEUP_H
+ #define _INCLUDE_GUARD_USB_WAKEUP_H
+
++#include <limits.h>
+ #include <vector>
+
+ #include "wakeup.h"
+--
+2.20.1
+
diff --git a/meta/recipes-kernel/powertop/powertop_2.10.bb b/meta/recipes-kernel/powertop/powertop_2.10.bb
new file mode 100644
index 0000000000..7b7b3929b3
--- /dev/null
+++ b/meta/recipes-kernel/powertop/powertop_2.10.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Power usage tool"
+DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
+HOMEPAGE = "https://01.org/powertop/"
+BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla"
+DEPENDS = "ncurses libnl pciutils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
+
+SRC_URI = "https://01.org/sites/default/files/downloads/powertop-v${PV}.tar.gz \
+ file://0001-wakeup_xxx.h-include-limits.h.patch \
+"
+
+SRC_URI[md5sum] = "a69bd55901cf919cc564187402ea2c9c"
+SRC_URI[sha256sum] = "d3b7459eaba7d01c8841dd33a3b4d369416c01e9bd8951b0d88234cf18fe4a75"
+
+UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads"
+UPSTREAM_CHECK_REGEX = "powertop-[v]?(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools gettext pkgconfig
+
+S = "${WORKDIR}/${BPN}-v${PV}"
+
+# we do not want libncursesw if we can
+do_configure_prepend() {
+ # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
+ sed -i -e "s/ncursesw//g" ${S}/configure.ac
+ mkdir -p ${B}/src/tuning/
+}
+
+inherit update-alternatives
+ALTERNATIVE_${PN} = "powertop"
+ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
+ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-kernel/powertop/powertop_2.8.bb b/meta/recipes-kernel/powertop/powertop_2.8.bb
deleted file mode 100644
index 1f2dfb83dd..0000000000
--- a/meta/recipes-kernel/powertop/powertop_2.8.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Power usage tool"
-DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
-HOMEPAGE = "http://01.org/powertop/"
-BUGTRACKER = "http://bugzilla.lesswatts.org/"
-DEPENDS = "ncurses libnl pciutils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
-
-SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz \
- file://0001-include-rquired-headers-for-typedefs.patch \
-"
-
-SRC_URI[md5sum] = "c55fedb69203e480801b18bd7b886241"
-SRC_URI[sha256sum] = "a87b563f73106babfa3e74dcf92f252938c061e309ace20a361358bbfa579c5a"
-
-UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads"
-
-inherit autotools gettext pkgconfig
-
-# we need to explicitly link with libintl in uClibc systems
-EXTRA_LDFLAGS ?= ""
-EXTRA_LDFLAGS_libc-uclibc = "-lintl"
-LDFLAGS += "${EXTRA_LDFLAGS}"
-
-# we do not want libncursesw if we can
-do_configure_prepend() {
- # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
- sed -i -e "s/ncursesw//g" ${S}/configure.ac
- mkdir -p ${B}/src/tuning/
-}
-
-inherit update-alternatives
-ALTERNATIVE_${PN} = "powertop"
-ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
-ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch b/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
deleted file mode 100644
index 202f354d29..0000000000
--- a/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 27df521c68e7c8b5b050dab15f40aa15fd03623a Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 4 May 2016 14:58:24 +0300
-Subject: [PATCH] Avoid building docs
-
-Upstream-Status: Inappropriate
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- Makefile.am | 2 +-
- m4/yelp.m4 | 6 ------
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index b919a3f..3a3851d 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = daemon data help lib po src tools tests
-+SUBDIRS = daemon data lib po src tools tests
-
- EXTRA_DIST = AUTHORS tap-test COPYING.gpl-2
-
-diff --git a/m4/yelp.m4 b/m4/yelp.m4
-index 5db847f..1b6ede4 100644
---- a/m4/yelp.m4
-+++ b/m4/yelp.m4
-@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir],
- HELP_DIR="$with_help_dir"
- AC_SUBST(HELP_DIR)
-
--AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
--AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
--if test x"$ITSTOOL" = x; then
-- AC_MSG_ERROR([itstool not found])
--fi
--
- AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
- AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
- if test x"$XMLLINT" = x; then
---
-2.1.4
-
diff --git a/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch b/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
deleted file mode 100644
index 608523272a..0000000000
--- a/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 765d578145e31ddc9495adfab8037ade33c6a9cc Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 4 May 2016 10:59:36 +0300
-Subject: [PATCH] Disable check for polkit for UI
-
-The check is not technically required: sysprof just needs
-to be able to access system perf counters at runtime.
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8559597..ecf93ad 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -131,8 +131,8 @@ AS_IF([test "$enable_gtk" = auto],[
- AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[enable_gtk=yes],[enable_gtk=no])
- ])
- AS_IF([test "$enable_gtk" = "yes"],[
-- AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[],[
-- AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version and polkit-gobject-1])
-+ AS_IF([test "$have_gtk" = "yes"],[],[
-+ AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version])
- ])
- ])
- AM_CONDITIONAL(ENABLE_GTK, test "$enable_gtk" = "yes")
---
-2.8.1
-
diff --git a/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch b/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
new file mode 100644
index 0000000000..ade51cf864
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
@@ -0,0 +1,27 @@
+From d332b480257aa98b63d39c3c94896a111536f937 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 23 Aug 2017 18:38:26 +0300
+Subject: [PATCH 2/2] Do not build anything in help/ as it requires itstool.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ meson.build | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 3986273..ae2f65e 100644
+--- a/meson.build
++++ b/meson.build
+@@ -164,7 +164,6 @@ subdir('tools')
+ subdir('tests')
+
+ subdir('data')
+-subdir('help')
+ subdir('po')
+
+ meson.add_install_script('build-aux/meson/post_install.sh')
+--
+2.7.4
+
diff --git a/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch b/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
deleted file mode 100644
index 92e804f98d..0000000000
--- a/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From a2d385e504323641b1127821833c61e77301c90b Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 11 Jun 2016 22:45:37 +0300
-Subject: [PATCH] Forward port mips & arm memory barrier patches
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- lib/util/util.h | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/lib/util/util.h b/lib/util/util.h
-index 591722d..0768056 100644
---- a/lib/util/util.h
-+++ b/lib/util/util.h
-@@ -29,4 +29,19 @@
- #define read_barrier() asm volatile("" ::: "memory")
- #endif
-
-+#ifdef __arm__
-+/*
-+ * Use the __kuser_memory_barrier helper in the CPU helper page. See
-+ * arch/arm/kernel/entry-armv.S in the kernel source for details.
-+ */
-+#define read_barrier() ((void(*)(void))0xffff0fa0)()
-+#endif
-+
-+#ifdef __mips__
-+#define read_barrier() asm volatile(".set mips2\n\t" \
-+ "sync\n\t" \
-+ ".set mips0" ::: "memory")
-+#endif
-+
-+
- #endif /* SP_UTIL_H */
---
-2.1.4
-
diff --git a/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch b/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch
deleted file mode 100644
index ac1384c9b0..0000000000
--- a/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 05816e6f9cd65b2624bb04de65fdf61031c7017f Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 10 Jun 2016 14:01:54 +0300
-Subject: [PATCH] callgraph: Use U64_TO_POINTER
-
-This fixes a "cast to pointer from integer of different size" on i586.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Pending
----
- lib/sp-callgraph-view.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/sp-callgraph-view.c b/lib/sp-callgraph-view.c
-index 02cc17b..58315b0 100644
---- a/lib/sp-callgraph-view.c
-+++ b/lib/sp-callgraph-view.c
-@@ -135,7 +135,7 @@ build_functions_store (StackNode *node,
-
- gtk_list_store_append (state->store, &iter);
- gtk_list_store_set (state->store, &iter,
-- COLUMN_NAME, (const gchar *)node->data,
-+ COLUMN_NAME, U64_TO_POINTER(node->data),
- COLUMN_SELF, 100.0 * size / state->profile_size,
- COLUMN_TOTAL, 100.0 * total / state->profile_size,
- COLUMN_POINTER, node,
---
-2.1.4
-
diff --git a/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch b/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
deleted file mode 100644
index 158d9975f2..0000000000
--- a/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2b4005d72d3393933a7914be102ea65505c536cc Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Thu, 21 Jul 2016 11:53:31 +0300
-Subject: [PATCH] configure: Add option to enable/disable polkit
-
-Changes the configure behaviour from autodetecting the polkit by default
-to having an option to disable it explicitly
-
-Upstream-Status: Pending
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 2246d5a..3d3fe0f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -104,10 +104,18 @@ PKG_CHECK_MODULES(GTK,
- [gtk+-3.0 >= gtk_required_version],
- [have_gtk=yes],
- [have_gtk=no])
-+AC_ARG_ENABLE([polkit],
-+ AS_HELP_STRING([--disable-polkit], [Do not use Polkit]),
-+ [enable_polkit="$enableval"], [enable_polkit="yes"])
-+
-+AS_IF([test "x$enable_polkit" = "xyes"], [
- PKG_CHECK_MODULES(POLKIT,
- [polkit-gobject-1],
- [have_polkit=yes],
- [have_polkit=no])
-+ ])
-+AM_CONDITIONAL([HAVE_POLKIT], [test "x$enable_polkit" = "xyes"])
-+
- PKG_CHECK_MODULES(SYSTEMD,
- [libsystemd >= systemd_required_version],
- [have_systemd=yes],
---
-2.4.0
-
diff --git a/meta/recipes-kernel/sysprof/sysprof_3.32.0.bb b/meta/recipes-kernel/sysprof/sysprof_3.32.0.bb
new file mode 100644
index 0000000000..b92933806c
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/sysprof_3.32.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "System-wide Performance Profiler for Linux"
+HOMEPAGE = "http://www.sysprof.com"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gettext systemd upstream-version-is-even gsettings
+
+DEPENDS = "glib-2.0 libxml2-native glib-2.0-native"
+
+SRC_URI[archive.md5sum] = "d1fa9ad216419d722770ca36713ad3af"
+SRC_URI[archive.sha256sum] = "fc22a69e468701c5ec9036e960c6273afa1ed6a89df1f889fed49417add5554d"
+SRC_URI += " \
+ file://define-NT_GNU_BUILD_ID.patch \
+ file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \
+ "
+
+PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
+PACKAGECONFIG[gtk] = "-Denable_gtk=true,-Denable_gtk=false,gtk+3"
+PACKAGECONFIG[sysprofd] = "-Dwith_sysprofd=bundled,-Dwith_sysprofd=none,polkit"
+
+SOLIBS = ".so"
+FILES_SOLIBSDEV = ""
+
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service', '', d)}"
+
+FILES_${PN} += " \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/system.d \
+ ${datadir}/metainfo \
+ "
diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb b/meta/recipes-kernel/sysprof/sysprof_git.bb
deleted file mode 100644
index 8d8b626397..0000000000
--- a/meta/recipes-kernel/sysprof/sysprof_git.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "System-wide Performance Profiler for Linux"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875"
-
-inherit gnomebase gettext systemd
-
-DEPENDS = "glib-2.0"
-
-S = "${WORKDIR}/git"
-SRCREV = "9c6cec9b49766bf77c1713bc5a7c6d651e628068"
-PV = "3.20.0+git${SRCPV}"
-
-SRC_URI = "git://git.gnome.org/sysprof \
- file://define-NT_GNU_BUILD_ID.patch \
- file://0001-configure-Add-option-to-enable-disable-polkit.patch \
- file://0001-Disable-check-for-polkit-for-UI.patch \
- file://0001-Avoid-building-docs.patch \
- file://0001-callgraph-Use-U64_TO_POINTER.patch \
- file://0001-Forward-port-mips-arm-memory-barrier-patches.patch \
- "
-SRC_URI[archive.md5sum] = "d56e8492033b60e247634731e7f760b9"
-SRC_URI[archive.sha256sum] = "4a338ad41bfffae87ef281f6e75c9660b3e0c6671bf5233be0c3f55a5e5b1ce5"
-
-AUTOTOOLS_AUXDIR = "${S}/build-aux"
-
-EXTRA_OECONF = "--enable-compile-warnings"
-
-PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
-PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit dbus"
-
-SOLIBS = ".so"
-FILES_SOLIBSDEV = ""
-FILES_${PN} += "${datadir}/icons/"
-
-SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'sysprof2.service', '', d)}"
-
-# We do not yet work for aarch64.
-COMPATIBLE_HOST = "^(?!aarch64).*"
diff --git a/meta/recipes-kernel/systemtap/systemtap-native_git.bb b/meta/recipes-kernel/systemtap/systemtap-native_git.bb
new file mode 100644
index 0000000000..19cc1cf0f0
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap-native_git.bb
@@ -0,0 +1,6 @@
+
+require systemtap_git.bb
+
+inherit native
+
+addtask addto_recipe_sysroot after do_populate_sysroot before do_build
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-Do-not-let-configure-write-a-python-location-into-th.patch b/meta/recipes-kernel/systemtap/systemtap/0001-Do-not-let-configure-write-a-python-location-into-th.patch
new file mode 100644
index 0000000000..742b1187fc
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-Do-not-let-configure-write-a-python-location-into-th.patch
@@ -0,0 +1,25 @@
+From ab29615ed6c2e779b472903564dc683dc1015de7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 22 Feb 2017 13:37:33 +0200
+Subject: [PATCH] Do not let configure write a python location into the dtrace
+ binary
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dtrace.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dtrace.in b/dtrace.in
+index 5e1cf8079..a24229cbc 100644
+--- a/dtrace.in
++++ b/dtrace.in
+@@ -1,4 +1,4 @@
+-#!@preferred_python@
++#!/usr/bin/python3
+ # vim: et sta sts=4 sw=4 ts=8
+
+ # This handles the systemtap equivalent of
+--
+2.11.0
+
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-Install-python-modules-to-correct-library-dir.patch b/meta/recipes-kernel/systemtap/systemtap/0001-Install-python-modules-to-correct-library-dir.patch
new file mode 100644
index 0000000000..48cf4aee85
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-Install-python-modules-to-correct-library-dir.patch
@@ -0,0 +1,56 @@
+From 2ada22f05460223924efe54080cb4419e2b4c276 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 24 Feb 2017 17:53:02 +0200
+Subject: [PATCH] Install python modules to correct library dir.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+Add OE's CFLAGS which contains `-fdebug-prefix-map' options to
+setup.py
+
+Supply "--root" directory to the "install" command, and use
+it as a prefix to strip off the purported filename encoded
+in bytecode files. (It strips build path prefix from .pyc files)
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ python/Makefile.am | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/python/Makefile.am b/python/Makefile.am
+index a254480..578602f 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -8,6 +8,10 @@ AUTOMAKE_OPTIONS = subdir-objects
+ AM_CPPFLAGS = -I$(srcdir)/../includes
+ AM_CPPFLAGS += -I$(abs_builddir)/../includes/sys
+
++# Add OE's CFLAGS which contains `-fdebug-prefix-map' options to
++# fix build path issue
++AM_CPPFLAGS += $(CFLAGS)
++
+ # Any script in the following variable will get byte-compiled at
+ # install time.
+ pkglibexecpython_PYTHON =
+@@ -47,7 +51,7 @@ install-exec-local:
+ if HAVE_PYTHON2_PROBES
+ (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON) setup.py build \
+ --build-base $(shell readlink -f $(builddir))/py2build \
+- install --prefix $(DESTDIR)$(prefix) \
++ install --root $(DESTDIR) --prefix $(prefix) --prefix $(prefix) --install-lib=${pythondir} \
+ --single-version-externally-managed \
+ --record $(shell readlink -f $(builddir))/py2build/install_files.txt \
+ --verbose)
+@@ -55,7 +59,7 @@ endif
+ if HAVE_PYTHON3_PROBES
+ (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
+ --build-base $(shell readlink -f $(builddir))/py3build \
+- install --prefix $(DESTDIR)$(prefix) \
++ install --root $(DESTDIR) --prefix $(prefix) --install-lib=${python3dir} \
+ --single-version-externally-managed \
+ --record $(shell readlink -f $(builddir))/py3build/install_files.txt \
+ --verbose)
+--
+2.7.4
+
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-improve-reproducibility-for-c-compiling.patch b/meta/recipes-kernel/systemtap/systemtap/0001-improve-reproducibility-for-c-compiling.patch
new file mode 100644
index 0000000000..15a6f2a9a5
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-improve-reproducibility-for-c-compiling.patch
@@ -0,0 +1,31 @@
+From 6288ba5df0a8c73ef842b609081449ac4de86123 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 18 Jul 2018 16:58:33 +0800
+Subject: [PATCH] improve reproducibility for c++ compiling
+
+Use relative dir to include header string_ref to
+strip build path prefix in c++ object file
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ stringtable.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/stringtable.h b/stringtable.h
+index 5fc42e7..6fd8a1e 100644
+--- a/stringtable.h
++++ b/stringtable.h
+@@ -19,7 +19,7 @@
+
+ #if defined(HAVE_BOOST_UTILITY_STRING_REF_HPP)
+ #include <boost/version.hpp>
+-#include <boost/utility/string_ref.hpp> //header with string_ref
++#include "@RELATIVE_STAGING_INCDIR@/boost/utility/string_ref.hpp" //header with string_ref
+
+ // XXX: experimental tunables
+ #define INTERNED_STRING_FIND_MEMMEM 1 /* perf stat indicates a very slight benefit */
+--
+2.7.4
+
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-po-LINGUAS-drop-the-polish-translation.patch b/meta/recipes-kernel/systemtap/systemtap/0001-po-LINGUAS-drop-the-polish-translation.patch
new file mode 100644
index 0000000000..b2114abc37
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-po-LINGUAS-drop-the-polish-translation.patch
@@ -0,0 +1,27 @@
+From b9ba80a22bd4ac3438ad38819cbe550ec9e8a3f8 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 16 Dec 2019 13:59:47 +0100
+Subject: [PATCH] po/LINGUAS: drop the polish translation
+
+There are no actual translated strings, and newer gettext (0.20)
+fails in this case.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ po/LINGUAS | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/po/LINGUAS b/po/LINGUAS
+index 6f927b706..aa01eb56e 100644
+--- a/po/LINGUAS
++++ b/po/LINGUAS
+@@ -1,5 +1,4 @@
+ en
+-pl
+ fr
+ cs
+
+--
+2.17.1
+
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch b/meta/recipes-kernel/systemtap/systemtap/0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch
new file mode 100644
index 0000000000..e2f8b3b057
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch
@@ -0,0 +1,37 @@
+From 3e13a006fe3dff9489269274093bf868532036e2 Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw@linux.intel.com>
+Date: Tue, 5 Sep 2017 16:02:55 -0700
+Subject: [PATCH] staprun/stapbpf: don't support installing a non-root
+
+Since we are in a known environment and installing as root and
+expect to be running as root, don't create the group or chmod
+the binaries.
+
+Upstream-Status: Inappropriate [Embedded]
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ stapbpf/Makefile.am | 14 +++++++-------
+ staprun/Makefile.am | 12 ++++++------
+ 2 files changed, 13 insertions(+), 13 deletions(-)
+
+Index: git/stapbpf/Makefile.am
+===================================================================
+--- git.orig/stapbpf/Makefile.am
++++ git/stapbpf/Makefile.am
+@@ -41,10 +41,10 @@
+
+ # Why the "id -u" condition? This way, an unprivileged user can run
+ # make install, and have "sudo stap ...." or "sudo stapbpf ...." work later.
+-install-exec-hook:
+- if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \
+- || groupadd -f -g 156 -r stapusr); then \
+- chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \
+- && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
+- fi
++#install-exec-hook:
++## if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \
++## || groupadd -f -g 156 -r stapusr); then \
++## chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \
++# && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
++# fi
+ endif
diff --git a/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch b/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch
deleted file mode 100644
index b4f2fbc066..0000000000
--- a/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 5eb10d90af9178edb65e6091ae939d1b5b19bb78 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Tue, 23 Sep 2014 04:47:10 -0400
-Subject: [PATCH] systemtap: allow to disable libvirt
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- configure.ac | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index a631ae7..cb4885b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -525,10 +525,15 @@ dnl Check for the libvirt and libxml2 devel packages
-
- dnl We require libvirt >= 1.0.2 because stapvirt relies on the
- dnl virDomainOpenChannel function, which was implemented in 1.0.2.
--PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
-- have_libvirt=yes
-- AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
-- ], [have_libvirt=no])
-+AC_ARG_ENABLE([libvirt],
-+ AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present]))
-+
-+if test "$enable_libvirt" != no; then
-+ PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
-+ have_libvirt=yes
-+ AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
-+ ], [have_libvirt=no])
-+fi
- AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"])
- PKG_CHECK_MODULES([libxml2], [libxml-2.0], [
- have_libxml2=yes
---
-1.7.9.5
-
diff --git a/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch b/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch
deleted file mode 100644
index 988cda4f0c..0000000000
--- a/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -19,7 +19,6 @@ AC_PROG_LN_S
- AC_PROG_CC
- AC_PROG_CXX
- AC_PROG_CPP
--AM_PROG_CC_STDC
- AM_PROG_CC_C_O
- AC_PROG_RANLIB
- AC_OBJEXT
diff --git a/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
deleted file mode 100644
index 013af5c3a4..0000000000
--- a/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-systemtap: Cross compilation fix
-
-This is a cross compilation fix. It allows systemtap to find
-the kernel map file in the right place, i.e. in the kernel build tree.
-Without this fix it takes a map file from the build host, if available.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
-
-Index: git/session.cxx
-===================================================================
---- git.orig/session.cxx
-+++ git/session.cxx
-@@ -1634,7 +1634,7 @@ systemtap_session::parse_kernel_function
- clog << _F("Kernel symbol table %s unavailable, (%s)",
- system_map_path.c_str(), strerror(errno)) << endl;
-
-- system_map_path = "/boot/System.map-" + kernel_release;
-+ system_map_path = kernel_build_tree + "/System.map-" + kernel_release;
- system_map.clear();
- system_map.open(system_map_path.c_str(), ifstream::in);
- if (! system_map.is_open())
diff --git a/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch b/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch
deleted file mode 100644
index 28a7eae407..0000000000
--- a/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Fix time_t print because in x32 ABI is long long int instead of long int.
-
-Upstream-Status: Pending
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-
-diff --git a/cache.cxx b/cache.cxx
-index 3546b30..19c77ca 100644
---- a/cache.cxx
-+++ b/cache.cxx
-@@ -294,7 +294,11 @@ clean_cache(systemtap_session& s)
- {
- //interval not passed, don't continue
- if (s.verbose > 1)
-+#if defined(__x86_64__) && defined (__ILP32__)
-+ clog << _F("Cache cleaning skipped, interval not reached %lld s / %lu s.",
-+#else
- clog << _F("Cache cleaning skipped, interval not reached %lu s / %lu s.",
-+#endif
- (current_time.tv_sec-sb.st_mtime), cache_clean_interval) << endl;
- return;
- }
-@@ -302,7 +306,11 @@ clean_cache(systemtap_session& s)
- {
- //interval reached, continue
- if (s.verbose > 1)
-+#if defined(__x86_64__) && defined (__ILP32__)
-+ clog << _F("Cleaning cache, interval reached %lld s > %lu s.",
-+#else
- clog << _F("Cleaning cache, interval reached %lu s > %lu s.",
-+#endif
- (current_time.tv_sec-sb.st_mtime), cache_clean_interval) << endl;
- }
-
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index da30fa5e6d..1c9f2aed16 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -1,17 +1,16 @@
SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux"
+HOMEPAGE = "https://sourceware.org/systemtap/"
require systemtap_git.inc
-DEPENDS = "elfutils sqlite3 systemtap-native ncurses json-c"
-DEPENDS_class-native = "elfutils-native sqlite3-native gettext-native"
-DEPENDS_class-nativesdk = "nativesdk-elfutils nativesdk-sqlite3 nativesdk-gettext"
+SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch"
-RDEPENDS_${PN} += "python3-core bash"
+DEPENDS = "elfutils"
EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
--without-nss --without-avahi --without-dyninst \
--disable-server --disable-grapher --enable-prologues \
- --with-python3 \
+ --with-python3 --without-python2-probes \
ac_cv_prog_have_javac=no \
ac_cv_prog_have_jar=no "
@@ -19,9 +18,49 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
EXTRA_OECONF += "${STAP_DOCS} "
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "translator sqlite monitor python3-probes"
+PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,python3-core bash perl"
PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
+PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
+PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
+PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
-inherit autotools gettext pkgconfig
+inherit autotools gettext pkgconfig distutils3-base systemd
-BBCLASSEXTEND = "native nativesdk"
+PACKAGES =+ "${PN}-exporter"
+
+FILES_${PN}-exporter = "${sysconfdir}/stap-exporter/* \
+ ${sysconfdir}/sysconfig/stap-exporter \
+ ${systemd_unitdir}/system/stap-exporter.service \
+ ${sbindir}/stap-exporter"
+
+RDEPENDS_${PN}-exporter = "${PN} python3-core python3-netclient"
+
+SYSTEMD_SERVICE_${PN}-exporter = "stap-exporter.service"
+
+do_configure_prepend () {
+ # Improve reproducibility for c++ object files
+ reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}"
+ sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h
+}
+
+do_install_append () {
+ if [ ! -f ${D}${bindir}/stap ]; then
+ # translator disabled case, need to leave only minimal runtime
+ rm -rf ${D}${datadir}/${PN}
+ rm ${D}${libexecdir}/${PN}/stap-env
+ fi
+
+ if [ ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
+ # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
+ # without usrmerge distro feature enabled
+ install -d `dirname ${D}${systemd_unitdir}`
+ mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
+ rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
+ fi
+
+ # Ensure correct ownership for files copied in
+ chown root:root ${D}${sysconfdir}/stap-exporter/* -R
+}
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index ce976edeb5..85c204ed23 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,17 +1,17 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "616ec7a0b916df7785d911b824c3df6eb022b213"
-PV = "3.0"
+SRCREV = "044a0640985ef007c0b2fb6eaf660d9d51800cda"
+PV = "4.2"
SRC_URI = "git://sourceware.org/git/systemtap.git \
- file://obsolete_automake_macros.patch \
- file://system_map_location.patch \
- file://configure-allow-to-disable-libvirt.patch \
- file://x32_abi_time.patch \
- "
+ file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \
+ file://0001-Install-python-modules-to-correct-library-dir.patch \
+ file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
+ file://0001-po-LINGUAS-drop-the-polish-translation.patch \
+ "
-# systemtap doesn't support mips
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64).*-linux'
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux'
+COMPATIBLE_HOST_libc-musl = 'null'
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/trace-cmd/kernelshark_git.bb b/meta/recipes-kernel/trace-cmd/kernelshark_git.bb
deleted file mode 100644
index 563182c89f..0000000000
--- a/meta/recipes-kernel/trace-cmd/kernelshark_git.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Graphical trace viewer for Ftrace"
-LICENSE = "GPLv2"
-
-require trace-cmd.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e"
-
-DEPENDS = "gtk+ libxml2"
-RDEPENDS_${PN} = "trace-cmd"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-EXTRA_OEMAKE = "\
- 'prefix=${prefix}' \
- 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \
- 'libdir=${@oe.path.relative(prefix, libdir)}' \
- NO_PYTHON=1 \
- gui \
-"
-do_configure_prepend() {
- # Make sure the recompile is OK
- rm -f ${B}/.*.d
-}
-
-do_install() {
- oe_runmake DESTDIR="${D}" install_gui
- rm ${D}${bindir}/trace-cmd
- rm -rf ${D}${libdir}/trace-cmd
- rmdir ${D}${libdir}
-}
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd.inc b/meta/recipes-kernel/trace-cmd/trace-cmd.inc
deleted file mode 100644
index 3ad06fad81..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-SRCREV = "9be5d74805830a291615f2f34a27c903f6a37b1e"
-PV = "2.6"
-
-inherit pkgconfig
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:"
-
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=trace-cmd-stable-v2.6 \
- file://blktrace-api-compatibility.patch \
-"
-
-S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch
deleted file mode 100644
index 320db6a321..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-trace-cmd: Add blktrace_api compatibility for TC_BARRIER
-
-Newer kernels replace TC_BARRIER with TC_FLUSH. Ensure trace-cmd
-can build regardless of the linux-kernel-headers version.
-
-Upstream-Status: Inappropriate [Stop gap]
-
-Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-
-diff --git a/plugin_blk.c b/plugin_blk.c
-index 9327b17..c8e5e1c 100644
---- a/plugin_blk.c
-+++ b/plugin_blk.c
-@@ -44,6 +44,15 @@ struct blk_data {
- unsigned short pdu_len;
- };
-
-+/*
-+ * Newer kernels don't define BLK_TC_BARRIER and have replaced it with
-+ * BLK_TC_FLUSH. In this case, define it here and report FLUSHES as BARRIERS as
-+ * a workaround, as described in:
-+ * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=c09c47caedc9854d59378d6e34c989e51cfdd2b4
-+ */
-+#ifndef BLK_TC_BARRIER
-+#define BLK_TC_BARRIER 1<<2
-+#endif
- static void fill_rwbs(char *rwbs, int action, unsigned int bytes)
- {
- int i = 0;
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
deleted file mode 100644
index dd9a8a0ded..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "User interface to Ftrace"
-LICENSE = "GPLv2 & LGPLv2.1"
-
-require trace-cmd.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \
- file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \
- file://trace-input.c;beginline=5;endline=8;md5=3ec82f43bbe0cfb5951ff414ef4d44d0 \
-"
-
-EXTRA_OEMAKE = "\
- 'prefix=${prefix}' \
- 'bindir=${bindir}' \
- 'man_dir=${mandir}' \
- 'html_install=${datadir}/kernelshark/html' \
- 'img_install=${datadir}/kernelshark/html/images' \
- \
- 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \
- 'libdir=${@oe.path.relative(prefix, libdir)}' \
- \
- NO_PYTHON=1 \
-"
-
-do_compile_prepend() {
- # Make sure the recompile is OK
- rm -f ${B}/.*.d
-}
-
-do_install() {
- oe_runmake DESTDIR="${D}" install
-}
-
diff --git a/meta/recipes-kernel/wireless-regdb/wireless-regdb_2019.06.03.bb b/meta/recipes-kernel/wireless-regdb/wireless-regdb_2019.06.03.bb
new file mode 100644
index 0000000000..9076d94601
--- /dev/null
+++ b/meta/recipes-kernel/wireless-regdb/wireless-regdb_2019.06.03.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Wireless Central Regulatory Domain Database"
+HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA"
+SECTION = "net"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
+
+SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "4b5ba3f089db7fdb7b9daae6a7c1f2cb"
+SRC_URI[sha256sum] = "cd917ed86b63ce8d93947979f1f18948f03a4ac0ad89ec25227b36ac00dc54bf"
+
+inherit bin_package allarch
+
+do_install() {
+ install -d -m0755 ${D}${nonarch_libdir}/crda
+ install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys
+ install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin
+ install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem
+
+ install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db
+ install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s
+}
+
+# Install static regulatory DB in /lib/firmware for kernel to load.
+# This requires Linux kernel >= v4.15.
+# For kernel <= v4.14, inherit the kernel_wireless_regdb.bbclass
+# (in meta-networking) in kernel's recipe.
+PACKAGES = "${PN}-static ${PN}"
+RCONFLICTS_${PN} = "${PN}-static"
+
+FILES_${PN}-static = " \
+ ${nonarch_base_libdir}/firmware/regulatory.db \
+ ${nonarch_base_libdir}/firmware/regulatory.db.p7s \
+"
+
+# Native users might want to use the source of regulatory DB.
+# This is for example used by Linux kernel <= v4.14 and
+# kernel_wireless_regdb.bbclass in meta-networking.
+do_install_append_class-native() {
+ install -m 0644 -D db.txt ${D}${libdir}/crda/db.txt
+}
+
+RSUGGESTS_${PN} = "crda"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-lsb4/libpng/libpng12_1.2.56.bb b/meta/recipes-lsb4/libpng/libpng12_1.2.56.bb
deleted file mode 100644
index 10c350ac25..0000000000
--- a/meta/recipes-lsb4/libpng/libpng12_1.2.56.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e7f289af309d98b46321d0f9892def16 \
- file://png.h;beginline=19;endline=109;md5=10c940148fe379a535b310c1c54e609c"
-DEPENDS = "zlib"
-
-PN = "libpng12"
-S = "${WORKDIR}/libpng-${PV}"
-
-SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "868562bd1c58b76ed8703f135a2e439a"
-SRC_URI[sha256sum] = "24ce54581468b937734a6ecc86f7e121bc46a90d76a0d948dca08f32ee000dbe"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libpng/files/libpng12/"
-UPSTREAM_CHECK_REGEX = "/libpng12/(?P<pver>(\d+[\.\-_]*)+)/"
-
-BINCONFIG_GLOB = "${PN}-config"
-
-inherit autotools binconfig pkgconfig
-
-do_install_append() {
- # The follow link files link to corresponding png12*.h and libpng12* files
- # They conflict with higher verison, so drop them
- unlink ${D}/${includedir}/png.h
- unlink ${D}/${includedir}/pngconf.h
-
- unlink ${D}/${libdir}/libpng.la
- unlink ${D}/${libdir}/libpng.so
- unlink ${D}/${libdir}/libpng.a || true
- unlink ${D}/${libdir}/pkgconfig/libpng.pc
-
- unlink ${D}/${bindir}/libpng-config
-}
diff --git a/meta/recipes-lsb4/perl/libclass-isa-perl_0.36.bb b/meta/recipes-lsb4/perl/libclass-isa-perl_0.36.bb
deleted file mode 100644
index f93841dc7f..0000000000
--- a/meta/recipes-lsb4/perl/libclass-isa-perl_0.36.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Perl module for reporting the search path for a class's ISA tree"
-DESCRIPTION = "Suppose you have a class (like Food::Fish::Fishstick) that is derived, \
-via its @ISA, from one or more superclasses (as Food::Fish::Fishstick is from Food::Fish,\
-Life::Fungus, and Chemicals), and some of those superclasses may themselves each be\
-derived, via its @ISA, from one or more superclasses (as above).\
-\
-When, then, you call a method in that class ($fishstick->calories), Perl first searches\
-there for that method, but if it's not there, it goes searching in its superclasses, and\
-so on, in a depth-first (or maybe "height-first" is the word) search. In the above example,\
-it'd first look in Food::Fish, then Food, then Matter, then Life::Fungus, then Life, then\
-Chemicals.\
-\
-This library, Class::ISA, provides functions that return that list -- the list\
-(in order) of names of classes Perl would search to find a method, with no duplicates."
-
-HOMEPAGE = "http://search.cpan.org/dist/Class-ISA/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://README;beginline=107;endline=111;md5=6a5c6842a63cfe4dab1f66e2350e4d25"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/S/SM/SMUELLER/Class-ISA-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "3a2ad203c8dc87d6c9de16215d00af47"
-SRC_URI[sha256sum] = "8816f34e9a38e849a10df756030dccf9fe061a196c11ac3faafd7113c929b964"
-
-S = "${WORKDIR}/Class-ISA-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-lsb4/perl/libdumpvalue-perl_1.17.bb b/meta/recipes-lsb4/perl/libdumpvalue-perl_1.17.bb
deleted file mode 100644
index 9a7461463a..0000000000
--- a/meta/recipes-lsb4/perl/libdumpvalue-perl_1.17.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Perl module for provides screen dump of Perl data"
-
-HOMEPAGE = "http://search.cpan.org/~flora/Dumpvalue/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f736bec5ada1fc5e39b2a8e7e06bbcbb"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Dumpvalue-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "6ede9f693d4a9c4555541cb1a1cc2006"
-SRC_URI[sha256sum] = "9ea74606b545f769a787ec2ae229549a2ad0a8e3cd4b14eff2ce3841836b3bdb"
-
-S = "${WORKDIR}/Dumpvalue-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-lsb4/perl/libenv-perl_1.04.bb b/meta/recipes-lsb4/perl/libenv-perl_1.04.bb
deleted file mode 100644
index dd8e1159ee..0000000000
--- a/meta/recipes-lsb4/perl/libenv-perl_1.04.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Perl module that imports environment variables as scalars or arrays"
-DESCRIPTION = "Perl maintains environment variables in a special hash named %ENV. \
-For when this access method is inconvenient, the Perl module Env allows environment \
-variables to be treated as scalar or array variables."
-
-HOMEPAGE = "http://search.cpan.org/~flora/Env/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76c1cbf18db56b3340d91cb947943bd3"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Env-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "fdba5c0690e66972c96fee112cf5f25c"
-SRC_URI[sha256sum] = "d94a3d412df246afdc31a2199cbd8ae915167a3f4684f7b7014ce1200251ebb0"
-
-S = "${WORKDIR}/Env-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-lsb4/perl/libfile-checktree-perl_4.41.bb b/meta/recipes-lsb4/perl/libfile-checktree-perl_4.41.bb
deleted file mode 100644
index ce37c72ca8..0000000000
--- a/meta/recipes-lsb4/perl/libfile-checktree-perl_4.41.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Perl module that run many filetest checks on a tree"
-DESCRIPTION = "The validate() routine takes a single multiline string consisting \
-of directives, each containing a filename plus a file test to try on it. (The file \
-test may also be a "cd", causing subsequent relative filenames to be interpreted \
-relative to that directory.) After the file test you may put || die to make it a \
-fatal error if the file test fails. The default is || warn. The file test may \
-optionally have a "!' prepended to test for the opposite condition. If you do a \
-cd and then list some relative filenames, you may want to indent them slightly for \
-readability. If you supply your own die() or warn() message, you can use $file to \
-interpolate the filename. \
-\
-Filetests may be bunched: "-rwx" tests for all of -r, -w, and -x. Only the first failed \
-test of the bunch will produce a warning. \
-\
-The routine returns the number of warnings issued."
-
-HOMEPAGE = "http://search.cpan.org/~flora/File-CheckTree/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c6fcacc5df80e037060300a7f4b93bf9"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/File-CheckTree-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "519c82aa7e5b7f752b4da14a6c8ad740"
-SRC_URI[sha256sum] = "fc99ab6bb5af4664832715974b5a19e328071dc9202ab72e5d5a594ebd46a729"
-
-S = "${WORKDIR}/File-CheckTree-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-lsb4/perl/libi18n-collate-perl_1.02.bb b/meta/recipes-lsb4/perl/libi18n-collate-perl_1.02.bb
deleted file mode 100644
index f1839e0cf9..0000000000
--- a/meta/recipes-lsb4/perl/libi18n-collate-perl_1.02.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Perl module that compare 8-bit scalar data according to the current locale"
-DESCRIPTION = "This module provides you with objects that will collate according to \
-your national character set, provided that the POSIX setlocale() function is supported \
-on your system."
-
-HOMEPAGE = "http://search.cpan.org/~flora/I18N-Collate/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=ff6d629144a6ec1ea8c300f75760184f"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/I18N-Collate-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "72ddb6d1c59cfdf31aa3b04799b86af0"
-SRC_URI[sha256sum] = "9174506bc903eda89690394e3f45558ab7e013114227896d8569d6164648fe37"
-
-S = "${WORKDIR}/I18N-Collate-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb b/meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb
deleted file mode 100644
index a3e58f031e..0000000000
--- a/meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Perl extension for converting Pod to old-style Pod"
-DESCRIPTION = "Pod::Plainer uses Pod::Parser which takes Pod with the (new) 'C<< .. >>' \
-constructs and returns the old(er) style with just 'C<>'; '<' and '>' are replaced by \
-'E<lt>' and 'E<gt>'. \
-\
-This can be used to pre-process Pod before using tools which do not recognise the new style Pods."
-
-HOMEPAGE = "http://search.cpan.org/dist/Pod-Plainer/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://README;beginline=27;md5=227cf83970fc61264845825d9d2bf6f8"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/R/RM/RMBARKER/Pod-Plainer-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "f502eacd1a40894b9dfea55fc2cd5e7d"
-SRC_URI[sha256sum] = "1bbfbf7d1d4871e5a83bab2137e22d089078206815190eb1d5c1260a3499456f"
-
-S = "${WORKDIR}/Pod-Plainer-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-multimedia/alsa/alsa-fpu.inc b/meta/recipes-multimedia/alsa/alsa-fpu.inc
deleted file mode 100644
index 50402307c5..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-fpu.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-
-def get_alsa_fpu_setting(bb, d):
- if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
- return "--with-softfloat"
- return ""
-
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
deleted file mode 100644
index 795e48ab2e..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 3408f8e78776b12f131e433749721602f87e0a70 Mon Sep 17 00:00:00 2001
-From: "Hong H. Pham" <hong.pham@windriver.com>
-Date: Fri, 29 Aug 2014 17:13:55 +0300
-Subject: [PATCH] Check if wordexp function is supported
-
-eglibc could be configured to build without wordexp, so it is not enough
-to check if wordexp.h exists (the header file could be installed, but it's
-possible that the wordexp() function is not supported). An additional
-check if wordexp() is supported by the system C library is needed.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
----
- configure.ac | 5 ++++-
- src/userfile.c | 2 +-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9490d39..b08a90a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -295,7 +295,10 @@ fi
- AC_SUBST(ALSA_DEPLIBS)
-
- dnl Check for headers
--AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h])
-+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h],
-+ dnl Make sure wordexp is supported by the C library
-+ AC_CHECK_FUNCS([wordexp])
-+)
-
- dnl Check for resmgr support...
- AC_MSG_CHECKING(for resmgr support)
-diff --git a/src/userfile.c b/src/userfile.c
-index 72779da..e9d13e6 100644
---- a/src/userfile.c
-+++ b/src/userfile.c
-@@ -32,7 +32,7 @@
- * stores the first matchine one. The returned string is strdup'ed.
- */
-
--#ifdef HAVE_WORDEXP_H
-+#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP))
- #include <wordexp.h>
- #include <assert.h>
- int snd_user_file(const char *file, char **result)
---
-2.6.4
-
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch b/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
deleted file mode 100644
index 3d44585939..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From c2c13cf0c469862cd39b2a69862002331ab7c8cb Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 9 Feb 2016 14:01:18 -0800
-Subject: [PATCH] avoid including <sys/poll.h> directly
-
-Fixes compiler warnings when building with musl libc.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- aserver/aserver.c | 2 +-
- include/asoundlib-head.h | 2 +-
- include/asoundlib.h | 2 +-
- include/local.h | 2 +-
- src/control/control.c | 2 +-
- src/control/control_shm.c | 2 +-
- src/pcm/pcm_direct.c | 2 +-
- src/pcm/pcm_mmap.c | 2 +-
- src/pcm/pcm_share.c | 2 +-
- src/pcm/pcm_shm.c | 2 +-
- src/seq/seq.c | 2 +-
- src/shmarea.c | 2 +-
- 12 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/aserver/aserver.c b/aserver/aserver.c
-index ac20706..46f731a 100644
---- a/aserver/aserver.c
-+++ b/aserver/aserver.c
-@@ -20,7 +20,7 @@
-
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/uio.h>
- #include <stdio.h>
-diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h
-index 1ec611e..21e32c6 100644
---- a/include/asoundlib-head.h
-+++ b/include/asoundlib-head.h
-@@ -35,6 +35,6 @@
- #include <string.h>
- #include <fcntl.h>
- #include <assert.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <errno.h>
- #include <stdarg.h>
-diff --git a/include/asoundlib.h b/include/asoundlib.h
-index 3c2766e..a546194 100644
---- a/include/asoundlib.h
-+++ b/include/asoundlib.h
-@@ -35,7 +35,7 @@
- #include <string.h>
- #include <fcntl.h>
- #include <assert.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <errno.h>
- #include <stdarg.h>
- #include <endian.h>
-diff --git a/include/local.h b/include/local.h
-index 317f2e3..6a43a47 100644
---- a/include/local.h
-+++ b/include/local.h
-@@ -47,7 +47,7 @@
- #error Header defining endianness not defined
- #endif
- #include <stdarg.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/types.h>
- #include <errno.h>
- #if defined(__linux__)
-diff --git a/src/control/control.c b/src/control/control.c
-index 6c00b8e..fd0c303 100644
---- a/src/control/control.c
-+++ b/src/control/control.c
-@@ -90,7 +90,7 @@ I/O operations.
- #include <string.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <stdbool.h>
- #include "control_local.h"
-
-diff --git a/src/control/control_shm.c b/src/control/control_shm.c
-index bd07d4a..9a2e268 100644
---- a/src/control/control_shm.c
-+++ b/src/control/control_shm.c
-@@ -27,7 +27,7 @@
- #include <fcntl.h>
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/uio.h>
- #include <sys/mman.h>
-diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
-index c3925cc..18f1dd5 100644
---- a/src/pcm/pcm_direct.c
-+++ b/src/pcm/pcm_direct.c
-@@ -30,7 +30,7 @@
- #include <grp.h>
- #include <sys/ioctl.h>
- #include <sys/mman.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/shm.h>
- #include <sys/sem.h>
- #include <sys/wait.h>
-diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
-index 1948289..4cf220a 100644
---- a/src/pcm/pcm_mmap.c
-+++ b/src/pcm/pcm_mmap.c
-@@ -22,7 +22,7 @@
- #include <stdio.h>
- #include <malloc.h>
- #include <string.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/mman.h>
- #ifdef HAVE_SYS_SHM_H
- #include <sys/shm.h>
-diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c
-index 5d8aaf2..21a57fc 100644
---- a/src/pcm/pcm_share.c
-+++ b/src/pcm/pcm_share.c
-@@ -34,7 +34,7 @@
- #include <signal.h>
- #include <math.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <pthread.h>
- #include "pcm_local.h"
-
-diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c
-index a815ac6..4ee958c 100644
---- a/src/pcm/pcm_shm.c
-+++ b/src/pcm/pcm_shm.c
-@@ -36,7 +36,7 @@
- #include <sys/ioctl.h>
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/mman.h>
- #include <netinet/in.h>
-diff --git a/src/seq/seq.c b/src/seq/seq.c
-index 9279830..d2027cb 100644
---- a/src/seq/seq.c
-+++ b/src/seq/seq.c
-@@ -777,7 +777,7 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev)
-
- */
-
--#include <sys/poll.h>
-+#include <poll.h>
- #include "seq_local.h"
-
- /****************************************************************************
-diff --git a/src/shmarea.c b/src/shmarea.c
-index 9843aa8..eaa71f0 100644
---- a/src/shmarea.c
-+++ b/src/shmarea.c
-@@ -27,7 +27,7 @@
- #include <malloc.h>
- #include <string.h>
- #include <errno.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/mman.h>
- #include <sys/shm.h>
- #include "list.h"
---
-2.8.1
-
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb
deleted file mode 100644
index ff47576c54..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "ALSA sound library"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
- file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
-
-BBCLASSEXTEND = "native nativesdk"
-
-# configure.in sets -D__arm__ on the command line for any arm system
-# (not just those with the ARM instruction set), this should be removed,
-# (or replaced by a permitted #define).
-#FIXME: remove the following
-ARM_INSTRUCTION_SET = "arm"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
- file://Check-if-wordexp-function-is-supported.patch \
- file://avoid-including-sys-poll.h-directly.patch \
-"
-SRC_URI[md5sum] = "1946e6438b8262a7b8fdadacd0e06ba7"
-SRC_URI[sha256sum] = "d38dacd9892b06b8bff04923c380b38fb2e379ee5538935ff37e45b395d861d6"
-
-inherit autotools pkgconfig
-
-require alsa-fpu.inc
-EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
-
-EXTRA_OECONF = "--disable-python"
-
-EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
-
-PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
-FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
-FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
-FILES_libasound = "${libdir}/libasound.so.*"
-FILES_alsa-server = "${bindir}/*"
-FILES_alsa-conf = "${datadir}/alsa/"
-FILES_alsa-conf-base = "\
-${datadir}/alsa/alsa.conf \
-${datadir}/alsa/cards/aliases.conf \
-${datadir}/alsa/pcm/default.conf \
-${datadir}/alsa/pcm/dmix.conf \
-${datadir}/alsa/pcm/dsnoop.conf"
-
-RDEPENDS_libasound = "alsa-conf-base alsa-conf"
-# upgrade path
-RPROVIDES_${PN}-dev = "alsa-dev"
-RREPLACES_${PN}-dev = "alsa-dev"
-RCONFLICTS_${PN}-dev = "alsa-dev"
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.1.9.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.1.9.bb
new file mode 100644
index 0000000000..ba7e978dbe
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.1.9.bb
@@ -0,0 +1,41 @@
+SUMMARY = "ALSA sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
+ file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \
+ "
+
+SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
+SRC_URI[md5sum] = "e6d429dbdcfaa0f034d907fa6dc3735e"
+SRC_URI[sha256sum] = "488373aef5396682f3a411a6d064ae0ad196b9c96269d0bb912fbdeec94b994b"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += " \
+ ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
+ --disable-python \
+"
+
+PACKAGES =+ "alsa-server alsa-conf alsa-doc"
+
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+
+RDEPENDS_${PN}_class-target = "alsa-conf"
+
+# upgrade path
+RPROVIDES_${PN} = "libasound"
+RREPLACES_${PN} = "libasound"
+RCONFLICTS_${PN} = "libasound"
+
+RPROVIDES_${PN}-dev = "alsa-dev"
+RREPLACES_${PN}-dev = "alsa-dev"
+RCONFLICTS_${PN}-dev = "alsa-dev"
+
+RPROVIDES_alsa-conf = "alsa-conf-base"
+RREPLACES_alsa-conf = "alsa-conf-base"
+RCONFLICTS_alsa-conf = "alsa-conf-base"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb
deleted file mode 100644
index c95ea54160..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb
+++ /dev/null
@@ -1,103 +0,0 @@
-SUMMARY = "ALSA Plugins"
-HOMEPAGE = "http://alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "multimedia"
-
-# The primary license of alsa-plugins is LGPLv2.1.
-#
-# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
-# build system, and doesn't affect the licensing of the build result.
-#
-# The samplerate plugin source code is licensed under GPLv2+ to be consistent
-# with the libsamplerate license. However, if the licensee has a commercial
-# license for libsamplerate, the samplerate plugin may be used under the terms
-# of LGPLv2.1 like the rest of the plugins.
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
- file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
- file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
-"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2"
-SRC_URI[md5sum] = "69f9f3e2de3c97fc71d496e91e271fe5"
-SRC_URI[sha256sum] = "8ea4d1e082c36528a896a2581e5eb62d4dc2683238e353050d0d624e65f901f1"
-
-DEPENDS += "alsa-lib"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "\
- samplerate \
- speexdsp \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
-"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
-PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
-PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
-PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
-PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
-
-PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
-
-PACKAGES_DYNAMIC = "^libasound-module-.*"
-
-# The alsa-plugins package doesn't itself contain anything, it just depends on
-# all built plugins.
-ALLOW_EMPTY_${PN} = "1"
-
-do_install_append() {
- rm ${D}${libdir}/alsa-lib/*.la
-
- # We use the example as is, so just drop the .example suffix.
- if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
- mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
- fi
-}
-
-python populate_packages_prepend() {
- plugindir = bb.data.expand('${libdir}/alsa-lib/', d)
- packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
- d.setVar("RDEPENDS_alsa-plugins", packages)
-}
-
-# The rate plugins create some symlinks. For example, the samplerate plugin
-# creates these links to the main plugin file:
-#
-# libasound_module_rate_samplerate_best.so
-# libasound_module_rate_samplerate_linear.so
-# libasound_module_rate_samplerate_medium.so
-# libasound_module_rate_samplerate_order.so
-#
-# The other rate plugins create similar links. We have to add the links to
-# FILES manually, because do_split_packages() skips the links (which is good,
-# because we wouldn't want do_split_packages() to create separate packages for
-# the symlinks).
-#
-# The symlinks cause QA errors, because usually it's a bug if a non
-# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
-# the errors are false positives, so we disable the QA checks.
-FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
-
-# 50-pulseaudio.conf defines a device named "pulse" that applications can use
-# if they explicitly want to use the PulseAudio plugin.
-# 99-pulseaudio-default.conf configures the "default" device to use the
-# PulseAudio plugin.
-FILES_${PN}-pulseaudio-conf += "\
- ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
- ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
-"
-
-RDEPENDS_${PN}-pulseaudio-conf += "\
- libasound-module-conf-pulse \
- libasound-module-ctl-pulse \
- libasound-module-pcm-pulse \
-"
diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.1.9.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.1.9.bb
new file mode 100644
index 0000000000..b94fc5cee3
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-plugins_1.1.9.bb
@@ -0,0 +1,173 @@
+SUMMARY = "ALSA Plugins"
+HOMEPAGE = "http://alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "multimedia"
+
+# The primary license of alsa-plugins is LGPLv2.1.
+#
+# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
+# build system, and doesn't affect the licensing of the build result.
+#
+# The samplerate plugin source code is licensed under GPLv2+ to be consistent
+# with the libsamplerate license. However, if the licensee has a commercial
+# license for libsamplerate, the samplerate plugin may be used under the terms
+# of LGPLv2.1 like the rest of the plugins.
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
+ file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
+ file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
+"
+
+SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2"
+SRC_URI[md5sum] = "e0caffbd849c51ed81751378f56cb563"
+SRC_URI[sha256sum] = "161772303da521abbbf1d91f63b470c4791392d5728f2192a42d71292078f907"
+
+DEPENDS += "alsa-lib"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "\
+ samplerate \
+ speexdsp \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
+"
+PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,avtp"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+PACKAGECONFIG[libav] = "--enable-libav,--disable-libav,libav"
+PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
+PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
+PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
+
+PACKAGES_DYNAMIC = "^libasound-module-.*"
+
+# The alsa-plugins package doesn't itself contain anything, it just depends on
+# all built plugins.
+FILES_${PN} = ""
+ALLOW_EMPTY_${PN} = "1"
+
+do_install_append() {
+ rm ${D}${libdir}/alsa-lib/*.la
+
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
+ # We use the example as is. Upstream installs the file under
+ # /etc, but we move it under /usr/share and add a symlink under
+ # /etc to be consistent with other installed configuration
+ # files.
+ mv ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
+ ln -s ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf
+ fi
+}
+
+python populate_packages_prepend() {
+ plugindir = d.expand('${libdir}/alsa-lib/')
+ packages = " ".join(do_split_packages(d, plugindir, r'^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
+ d.setVar("RDEPENDS_alsa-plugins", packages)
+}
+
+# Many plugins have a configuration file (plus a symlink in /etc) associated
+# with them. We put the plugin and it's configuration usually in the same
+# package, but that's problematic when the configuration file is related to
+# multiple plugins, as is the case with the pulse, oss and maemo plugins. In
+# case of the pulse plugins, we have a separate alsa-plugins-pulseaudio-conf
+# package that depends on all the pulse plugins, which ensures that all plugins
+# that the configuration references are installed. The oss and maemo
+# configuration files, on the other hand, are in the respective pcm plugin
+# packages. Therefore it's possible to install the configuration file without
+# the ctl plugin that the configuration file references. This is unlikely to
+# cause big problems, but some kind of improvement to the packaging could
+# probably be done here (at least it would be good to handle the different
+# plugins in a consistent way).
+FILES_${MLPREFIX}libasound-module-ctl-arcam-av += "\
+ ${datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf \
+ ${sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf \
+"
+FILES_${MLPREFIX}libasound-module-pcm-a52 += "\
+ ${datadir}/alsa/alsa.conf.d/60-a52-encoder.conf \
+ ${sysconfdir}/alsa/conf.d/60-a52-encoder.conf \
+"
+FILES_${MLPREFIX}libasound-module-pcm-alsa-dsp += "\
+ ${datadir}/alsa/alsa.conf.d/98-maemo.conf \
+ ${sysconfdir}/alsa/conf.d/98-maemo.conf \
+"
+FILES_${MLPREFIX}libasound-module-pcm-jack += "\
+ ${datadir}/alsa/alsa.conf.d/50-jack.conf \
+ ${sysconfdir}/alsa/conf.d/50-jack.conf \
+"
+FILES_${MLPREFIX}libasound-module-pcm-oss += "\
+ ${datadir}/alsa/alsa.conf.d/50-oss.conf \
+ ${sysconfdir}/alsa/conf.d/50-oss.conf \
+"
+FILES_${MLPREFIX}libasound-module-pcm-speex += "\
+ ${datadir}/alsa/alsa.conf.d/60-speex.conf \
+ ${sysconfdir}/alsa/conf.d/60-speex.conf \
+"
+FILES_${MLPREFIX}libasound-module-pcm-upmix += "\
+ ${datadir}/alsa/alsa.conf.d/60-upmix.conf \
+ ${sysconfdir}/alsa/conf.d/60-upmix.conf \
+"
+FILES_${MLPREFIX}libasound-module-pcm-usb-stream += "\
+ ${datadir}/alsa/alsa.conf.d/98-usb-stream.conf \
+ ${sysconfdir}/alsa/conf.d/98-usb-stream.conf \
+"
+FILES_${MLPREFIX}libasound-module-pcm-vdownmix += "\
+ ${datadir}/alsa/alsa.conf.d/60-vdownmix.conf \
+ ${sysconfdir}/alsa/conf.d/60-vdownmix.conf \
+"
+FILES_${MLPREFIX}libasound-module-rate-lavrate += "\
+ ${datadir}/alsa/alsa.conf.d/10-rate-lav.conf \
+ ${sysconfdir}/alsa/conf.d/10-rate-lav.conf \
+"
+FILES_${MLPREFIX}libasound-module-rate-samplerate += "\
+ ${datadir}/alsa/alsa.conf.d/10-samplerate.conf \
+ ${sysconfdir}/alsa/conf.d/10-samplerate.conf \
+"
+FILES_${MLPREFIX}libasound-module-rate-speexrate += "\
+ ${datadir}/alsa/alsa.conf.d/10-speexrate.conf \
+ ${sysconfdir}/alsa/conf.d/10-speexrate.conf \
+"
+
+# The rate plugins create some symlinks. For example, the samplerate plugin
+# creates these links to the main plugin file:
+#
+# libasound_module_rate_samplerate_best.so
+# libasound_module_rate_samplerate_linear.so
+# libasound_module_rate_samplerate_medium.so
+# libasound_module_rate_samplerate_order.so
+#
+# The other rate plugins create similar links. We have to add the links to
+# FILES manually, because do_split_packages() skips the links (which is good,
+# because we wouldn't want do_split_packages() to create separate packages for
+# the symlinks).
+#
+# The symlinks cause QA errors, because usually it's a bug if a non
+# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
+# the errors are false positives, so we disable the QA checks.
+FILES_${MLPREFIX}libasound-module-rate-lavrate += "${libdir}/alsa-lib/*rate_lavrate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavrate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
+
+# 50-pulseaudio.conf defines a device named "pulse" that applications can use
+# if they explicitly want to use the PulseAudio plugin.
+# 99-pulseaudio-default.conf configures the "default" device to use the
+# PulseAudio plugin.
+FILES_${PN}-pulseaudio-conf += "\
+ ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
+ ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
+ ${sysconfdir}/alsa/conf.d/50-pulseaudio.conf \
+ ${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf \
+"
+
+RDEPENDS_${PN}-pulseaudio-conf += "\
+ libasound-module-conf-pulse \
+ libasound-module-ctl-pulse \
+ libasound-module-pcm-pulse \
+"
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch b/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch
deleted file mode 100644
index bf95cac440..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 1cc0aa4dbd3c7f1267809e0e1ca57d46f4803bfd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 17 Apr 2016 23:25:18 +0000
-Subject: [PATCH] Cus428Midi: Explicitly cast constant to char type
-
-This is flagged by gcc6
-Cus428Midi.cc:83:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- us428control/Cus428Midi.cc | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/us428control/Cus428Midi.cc b/us428control/Cus428Midi.cc
-index b9e6783..bef7bb1 100644
---- a/us428control/Cus428Midi.cc
-+++ b/us428control/Cus428Midi.cc
-@@ -32,22 +32,22 @@ char Cus428Midi::KnobParam[] = {
- 0x2A,
- 0x29,
- 0x28,
-- -1,
-+ static_cast<char>(-1),
- 0x10,
- 0x11,
- 0x18,
- 0x19,
- 0x1A,
-- -1,
-- -1,
-- -1,
-- -1,
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
- 0x2C,
- 0x2D,
- 0x2E,
- 0x2F,
-- -1,
-- -1,
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
- 0x20,
- 0x21,
- 0x22,
-@@ -64,14 +64,14 @@ char Cus428Midi::KnobParam[] = {
- 5,
- 6,
- 7,
-- -1,
-- -1,
-- -1,
-- -1,
-- -1,
-- -1,
-- -1,
-- -1,
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
-+ static_cast<char>(-1),
- 0x30,
- 0x31,
- 0x32,
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch b/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
deleted file mode 100644
index d049a30d2c..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 1e5926df74a35fe2cd90bc59f5264a8715c94048 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 08:16:59 +0000
-Subject: [PATCH] as10k1: Make output_tram_line() static inline
-
-The function is not used in any other file, its better to make it static
-inline so compiler has a better chance of optimizing here
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- as10k1/as10k1.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/as10k1/as10k1.c b/as10k1/as10k1.c
-index 96af0c3..d0766fd 100644
---- a/as10k1/as10k1.c
-+++ b/as10k1/as10k1.c
-@@ -366,7 +366,7 @@ void as_exit(const char *message)
- exit(1);
- }
-
--inline void output_tram_line( struct list_head *line_head, int type){
-+static inline void output_tram_line( struct list_head *line_head, int type){
-
- struct tram *tram_sym;
- struct list_head *entry;
---
-2.5.1
-
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
deleted file mode 100644
index 319f25d27a..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Add parameters to autoreconf to support cross compile.
-Remove some sub-components which needs further recipe support.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
-
-diff -ruN alsa-tools-1.0.24.1-orig//ld10k1/gitcompile alsa-tools-1.0.24.1/ld10k1/gitcompile
---- alsa-tools-1.0.24.1-orig//ld10k1/gitcompile 2011-07-06 11:27:40.227665002 +0800
-+++ alsa-tools-1.0.24.1/ld10k1/gitcompile 2011-07-14 13:26:18.017665004 +0800
-@@ -1,6 +1,6 @@
- #!/bin/bash
-
--autoreconf -fi || exit 1
-+autoreconf $ACLOCAL_FLAGS -fi || exit 1
- export CFLAGS='-O2 -Wall -pipe -g'
- echo "CFLAGS=$CFLAGS"
- echo "./configure $@"
-diff -ruN alsa-tools-1.0.24.1-orig//Makefile alsa-tools-1.0.24.1/Makefile
---- alsa-tools-1.0.24.1-orig//Makefile 2011-07-06 11:27:40.207665000 +0800
-+++ alsa-tools-1.0.24.1/Makefile 2011-07-14 15:08:08.877665009 +0800
-@@ -1,8 +1,8 @@
- VERSION = 1.1.0
- TOP = .
--SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
-+SUBDIRS = as10k1 envy24control \
- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
-- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \
-+ us428control usx2yloader vxloader echomixer \
- hwmixvolume hdajackretask hda-verb hdajacksensetest
-
- all:
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest b/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest
deleted file mode 100755
index 58328bd3a5..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-aclocal $ACLOCAL_FLAGS || exit 1
-automake --foreign --add-missing || exit 1
-autoconf || exit 1
-export CFLAGS='-O2 -Wall -pipe -g'
-echo "CFLAGS=$CFLAGS"
-echo "./configure $@"
-./configure $@ || exit 1
-unset CFLAGS
-if [ -z "$GITCOMPILE_NO_MAKE" ]; then
- make || exit 1
-fi
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
deleted file mode 100644
index 9bd6848eda..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Remove some sub-components which need gtk+.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Rogerio Nunes <ronunes@gmail.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
-Update patch for alsa-tools 1.0.29
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-diff --git a/Makefile b/Makefile
-index 2457a1c..72346d9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,9 +1,9 @@
- VERSION = 1.1.0
- TOP = .
--SUBDIRS = as10k1 envy24control \
-- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
-- us428control usx2yloader vxloader echomixer \
-- hwmixvolume hdajackretask hda-verb hdajacksensetest
-+SUBDIRS = as10k1 \
-+ mixartloader pcxhrloader sb16_csp seq sscape_ctl \
-+ us428control usx2yloader vxloader \
-+ hwmixvolume hda-verb hdajacksensetest
-
- all:
- @for i in $(SUBDIRS); do \
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
deleted file mode 100644
index 8d4a146580..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Advanced tools for certain ALSA sound card drivers"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & LGPLv2+"
-DEPENDS = "alsa-lib ncurses glib-2.0"
-
-LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
- file://autotools.patch \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
- file://gitcompile_hdajacksensetest \
- file://0001-as10k1-Make-output_tram_line-static-inline.patch \
- file://0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch \
- "
-
-SRC_URI[md5sum] = "b476a5afaa3ea3230855553ad59d259d"
-SRC_URI[sha256sum] = "7d34558c590a50294b36576d257316a1ac5cd951eb8cd7d330e09f8cc757ab51"
-
-inherit autotools-brokensep pkgconfig
-
-CLEANBROKEN = "1"
-
-EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
-PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
-
-# configure.ac/.in doesn't exist so force copy
-AUTOTOOLS_COPYACLOCAL = "1"
-
-do_compile_prepend () {
- #Automake dir is not correctly detected in cross compilation case
- export AUTOMAKE_DIR="$(automake --print-libdir)"
- export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/"
-
- cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
-}
-
-FILES_${PN} += "${datadir}/ld10k1"
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb
new file mode 100644
index 0000000000..c1f4acdb03
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb
@@ -0,0 +1,86 @@
+SUMMARY = "Advanced tools for certain ALSA sound card drivers"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & LGPLv2+"
+DEPENDS = "alsa-lib"
+
+LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://ld10k1/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7 \
+ "
+
+SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "475bdf6457bcf55c8c895d653ee56a54"
+SRC_URI[sha256sum] = "a0243328a8f6f691a3055c484fd8d3326393096325e93743b246029d327c4ef6"
+
+inherit autotools-brokensep pkgconfig
+# brokensep as as10k1 (and probably more) fail out of tree
+CLEANBROKEN = "1"
+
+# Here we use PACKAGECONFIG options to pick which directories we configure/build.
+# Remember on upgrades to check that no new tools have been added.
+PACKAGECONFIG ??= "as10k1 hdajacksensetest hda-verb hdsploader ld10k1 mixartloader pcxhrloader \
+ sb16_csp seq--sbiload sscape_ctl us428control usx2yloader vxloader \
+ ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'hdajackretask', '', d)} \
+ "
+
+PACKAGECONFIG[as10k1] = ""
+PACKAGECONFIG[echomixer] = ",,gtk+"
+PACKAGECONFIG[envy24control] = ",,gtk+"
+PACKAGECONFIG[hda-verb] = ""
+PACKAGECONFIG[hdajackretask] = ",,gtk+3"
+PACKAGECONFIG[hdajacksensetest] = ",,glib-2.0"
+PACKAGECONFIG[hdspconf] = ",,fltk"
+PACKAGECONFIG[hdsploader] = ""
+PACKAGECONFIG[hdspmixer] = ",,fltk"
+PACKAGECONFIG[ld10k1] = ""
+PACKAGECONFIG[mixartloader] = ""
+PACKAGECONFIG[pcxhrloader] = ""
+PACKAGECONFIG[qlo10k1] = ",,qt-x11-free"
+PACKAGECONFIG[rmedigicontrol] = ",,gtk+"
+PACKAGECONFIG[sb16_csp] = ""
+PACKAGECONFIG[seq--sbiload] = ""
+PACKAGECONFIG[sscape_ctl] = ""
+PACKAGECONFIG[us428control] = ""
+PACKAGECONFIG[usx2yloader] = ""
+PACKAGECONFIG[vxloader] = ""
+
+# At the time of writing pyalsa is not packaged for OE, so this is not expected
+# to work.
+PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygobject pyalsa"
+
+python do_configure() {
+ for subdir in d.getVar("PACKAGECONFIG").split():
+ subdir = subdir.replace("--", "/")
+ bb.note("Configuring %s" % subdir)
+ dd = d.createCopy()
+ dd.setVar("S", os.path.join(d.getVar("S"), subdir))
+ bb.build.exec_func("autotools_do_configure", dd)
+}
+
+python do_compile() {
+ for subdir in d.getVar("PACKAGECONFIG").split():
+ subdir = subdir.replace("--", "/")
+ bb.note("Compiling %s" % subdir)
+ dd = d.createCopy()
+ dd.setVar("S", os.path.join(d.getVar("S"), subdir))
+ bb.build.exec_func("autotools_do_compile", dd)
+}
+
+python do_install() {
+ for subdir in d.getVar("PACKAGECONFIG").split():
+ subdir = subdir.replace("--", "/")
+ bb.note("Installing %s" % subdir)
+ dd = d.createCopy()
+ dd.setVar("S", os.path.join(d.getVar("S"), subdir))
+ bb.build.exec_func("autotools_do_install", dd)
+
+ # Just remove bash-needing init script that isn't installed as an init script
+ try:
+ os.remove(oe.path.join(d.getVar("D"), d.getVar("sbindir"), "ld10k1d"))
+ except:
+ pass
+}
+
+FILES_${PN} += "${datadir}"
diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.9.bb
index fef79d9c9c..fef79d9c9c 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.9.bb
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
deleted file mode 100644
index e578dfe743..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 29 Aug 2014 18:58:56 +0300
-Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
- asound.state is missing
-
-This avoids an error on bootup
-
-Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
-
-Upstream-Status: Pending
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
-
-Rebased on 1.1.0.
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- alsactl/Makefile.am | 7 ++++---
- alsactl/alsa-restore.service.in | 1 +
- 2 files changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
-index cac8094..ff865dc 100644
---- a/alsactl/Makefile.am
-+++ b/alsactl/Makefile.am
-@@ -38,9 +38,10 @@ install-data-hook:
- endif
-
- edit = \
-- $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
-- -e 's,@mydatadir\@,$(mydatadir),g' \
-- -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
-+ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \
-+ -e 's,@sbindir\@,$(sbindir),g' \
-+ -e 's,@mydatadir\@,$(mydatadir),g' \
-+ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
- < $< > $@ || rm $@
-
- alsa-state.service: alsa-state.service.in
-diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
-index 2884098..bac3ccc 100644
---- a/alsactl/alsa-restore.service.in
-+++ b/alsactl/alsa-restore.service.in
-@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card State
- ConditionPathExists=!@daemonswitch@
- ConditionPathExistsGlob=/dev/snd/control*
- After=alsa-state.service
-+ConditionPathExists=@localstatedir@/lib/alsa/asound.state
-
- [Service]
- Type=oneshot
---
-2.7.0.rc3
-
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb
deleted file mode 100644
index a22d999fb0..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb
+++ /dev/null
@@ -1,109 +0,0 @@
-SUMMARY = "ALSA sound utilities"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "console/utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
-DEPENDS = "alsa-lib ncurses libsamplerate0"
-
-PACKAGECONFIG ??= "udev"
-
-# alsabat can be built also without fftw support (with reduced functionality).
-# It would be better to always enable alsabat, but provide an option for
-# enabling/disabling fftw. The configure script doesn't support that, however
-# (at least in any obvious way), so for now we only support alsabat with fftw
-# or no alsabat at all.
-PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
-
-PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
-PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
- file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
- "
-
-SRC_URI[md5sum] = "38ac7c781f80c41c02b4664d8cbafa87"
-SRC_URI[sha256sum] = "7af603c0877d1251599d65b4fbc372e63a54371b888f5c26c6a86ac1d0519071"
-
-# lazy hack. needs proper fixing in gettext.m4, see
-# http://bugs.openembedded.org/show_bug.cgi?id=2348
-# please close bug and remove this comment when properly fixed
-#
-EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
-
-inherit autotools gettext pkgconfig
-
-# This are all packages that we need to make. Also, the now empty alsa-utils
-# ipk depends on them.
-
-ALSA_UTILS_PKGS = "\
- ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
- alsa-utils-alsamixer \
- alsa-utils-alsatplg \
- alsa-utils-midi \
- alsa-utils-aplay \
- alsa-utils-amixer \
- alsa-utils-aconnect \
- alsa-utils-iecset \
- alsa-utils-speakertest \
- alsa-utils-aseqnet \
- alsa-utils-aseqdump \
- alsa-utils-alsactl \
- alsa-utils-alsaloop \
- alsa-utils-alsaucm \
- "
-
-PACKAGES += "${ALSA_UTILS_PKGS}"
-RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
-
-FILES_${PN} = ""
-FILES_alsa-utils-alsabat = "${bindir}/alsabat"
-FILES_alsa-utils-alsatplg = "${bindir}/alsatplg"
-FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord"
-FILES_alsa-utils-amixer = "${bindir}/amixer"
-FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
-FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
-FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
-FILES_alsa-utils-aconnect = "${bindir}/aconnect"
-FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
-FILES_alsa-utils-iecset = "${bindir}/iecset"
-FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
-FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
-FILES_alsa-utils-alsaloop = "${bindir}/alsaloop"
-FILES_alsa-utils-alsaucm = "${bindir}/alsaucm"
-
-SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
-SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
-SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA"
-SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
-SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
-SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility"
-SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
-SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager"
-SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
-SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
-SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
-SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
-SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility"
-SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager"
-
-RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
-
-ALLOW_EMPTY_alsa-utils = "1"
-
-do_install() {
- autotools_do_install
-
- # We don't ship this here because it requires a dependency on bash.
- # See alsa-utils-scripts_${PV}.bb
- rm ${D}${sbindir}/alsaconf
- rm ${D}${sbindir}/alsa-info.sh
- rm -f ${D}${sbindir}/alsabat-test.sh
-
- if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
- # This is where alsa-utils will install its rules if we don't tell it anything else.
- rm -rf ${D}/lib/udev
- rmdir --ignore-fail-on-non-empty ${D}/lib
- fi
-}
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.1.9.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.1.9.bb
new file mode 100644
index 0000000000..c443d3594d
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.1.9.bb
@@ -0,0 +1,106 @@
+SUMMARY = "ALSA sound utilities"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "console/utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642"
+DEPENDS = "alsa-lib ncurses libsamplerate0"
+
+PACKAGECONFIG ??= "udev"
+
+# alsabat can be built also without fftw support (with reduced functionality).
+# It would be better to always enable alsabat, but provide an option for
+# enabling/disabling fftw. The configure script doesn't support that, however
+# (at least in any obvious way), so for now we only support alsabat with fftw
+# or no alsabat at all.
+PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
+
+PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,--with-udev-rules-dir=/unwanted/rules.d,udev"
+PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+
+# alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
+SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2"
+SRC_URI[md5sum] = "5ed21c3e296c06046cc986e732f625f6"
+SRC_URI[sha256sum] = "5ddf2cbddb4bd1a4a2a6492a09c25898b08c3ad64893c3655be14194cf0a213a"
+
+# On build machines with python-docutils (not python3-docutils !!) installed
+# rst2man (not rst2man.py) is detected and compile fails with
+# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'. Stop.
+# Avoid this by disabling expicitly
+EXTRA_OECONF = "--disable-rst2man"
+
+inherit autotools gettext pkgconfig manpages
+
+# This are all packages that we need to make. Also, the now empty alsa-utils
+# ipk depends on them.
+
+ALSA_UTILS_PKGS = "\
+ ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
+ alsa-utils-alsamixer \
+ alsa-utils-alsatplg \
+ alsa-utils-midi \
+ alsa-utils-aplay \
+ alsa-utils-amixer \
+ alsa-utils-aconnect \
+ alsa-utils-iecset \
+ alsa-utils-speakertest \
+ alsa-utils-aseqnet \
+ alsa-utils-aseqdump \
+ alsa-utils-alsactl \
+ alsa-utils-alsaloop \
+ alsa-utils-alsaucm \
+ "
+
+PACKAGES += "${ALSA_UTILS_PKGS}"
+RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
+
+FILES_${PN} = ""
+FILES_alsa-utils-alsabat = "${bindir}/alsabat"
+FILES_alsa-utils-alsatplg = "${bindir}/alsatplg"
+FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer"
+FILES_alsa-utils-amixer = "${bindir}/amixer"
+FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
+FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
+FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
+FILES_alsa-utils-aconnect = "${bindir}/aconnect"
+FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
+FILES_alsa-utils-iecset = "${bindir}/iecset"
+FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
+FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
+FILES_alsa-utils-alsaloop = "${bindir}/alsaloop"
+FILES_alsa-utils-alsaucm = "${bindir}/alsaucm */udev/rules.d/89-alsa-ucm.rules */*/udev/rules.d/89-alsa-ucm.rules"
+
+SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
+SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
+SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA"
+SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
+SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
+SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility"
+SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
+SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager"
+SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
+SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
+SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
+SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
+SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility"
+SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager"
+
+RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
+
+ALLOW_EMPTY_alsa-utils = "1"
+
+do_install() {
+ autotools_do_install
+
+ # We don't ship this here because it requires a dependency on bash.
+ # See alsa-utils-scripts_${PV}.bb
+ rm ${D}${sbindir}/alsaconf
+ rm ${D}${sbindir}/alsa-info.sh
+ rm -f ${D}${sbindir}/alsabat-test.sh
+
+ # If udev is disabled, we told configure to install the rules
+ # in /unwanted, so we can remove them now. If udev is enabled,
+ # then /unwanted won't exist and this will have no effect.
+ rm -rf ${D}/unwanted
+}
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb
deleted file mode 100644
index 050f1eefa7..0000000000
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb
+++ /dev/null
@@ -1,142 +0,0 @@
-SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
-DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
- mux, demux, stream, filter and play pretty much anything that humans and machines \
- have created. It supports the most obscure ancient formats up to the cutting edge."
-HOMEPAGE = "https://www.ffmpeg.org/"
-SECTION = "libs"
-
-LICENSE = "GPLv2+"
-LICENSE_FLAGS = "commercial"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
- file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
- file://mips64_cpu_detection.patch \
- "
-SRC_URI[md5sum] = "72769316a4b2b8809c7f6d5a8b6766f4"
-SRC_URI[sha256sum] = "f8575c071e2a64437aeb70c8c030b385cddbe0b5cde20c9b18a6def840128822"
-
-# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
-ARM_INSTRUCTION_SET = "arm"
-
-# Should be API compatible with libav (which was a fork of ffmpeg)
-# libpostproc was previously packaged from a separate recipe
-PROVIDES = "libav libpostproc"
-
-DEPENDS = "alsa-lib zlib libogg yasm-native"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
- bzlib gpl lzma theora x264 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xv', '', d)}"
-
-# libraries to build in addition to avutil
-PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
-PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
-PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
-PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
-PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
-PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
-PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
-
-# features to support
-PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
-PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
-PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
-PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
-PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
-PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
-PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
-PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
-PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
-PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
-PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
-PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
-PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
-PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
-PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
-
-# Check codecs that require --enable-nonfree
-USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
-
-EXTRA_OECONF = " \
- --disable-stripping \
- --enable-pic \
- --enable-shared \
- --enable-pthreads \
- ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
- \
- --cross-prefix=${TARGET_PREFIX} \
- \
- --ld="${CCLD}" \
- --cc="${CC}" \
- --cxx="${CXX}" \
- --arch=${TARGET_ARCH} \
- --target-os="linux" \
- --enable-cross-compile \
- --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
- --extra-ldflags="${TARGET_LDFLAGS}" \
- --sysroot="${STAGING_DIR_TARGET}" \
- --enable-hardcoded-tables \
- ${EXTRA_FFCONF} \
- --libdir=${libdir} \
- --shlibdir=${libdir} \
- --datadir=${datadir}/ffmpeg \
-"
-
-do_configure() {
- ${S}/configure ${EXTRA_OECONF}
-}
-
-PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util|resample)|swscale|swresample|postproc).*"
-
-# ffmpeg disables PIC on some platforms (e.g. x86-32)
-INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
-INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
-INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
-INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
-INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
-INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
-INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
-INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
-INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
-
-python populate_packages_prepend() {
- av_libdir = d.expand('${libdir}')
- av_pkgconfig = d.expand('${libdir}/pkgconfig')
-
- # Runtime package
- do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
- output_pattern='lib%s',
- description='libav %s library',
- extra_depends='',
- prepend=True,
- allow_links=True)
-
- # Development packages (-dev, -staticdev)
- do_split_packages(d, av_libdir, '^lib(.*)\.so$',
- output_pattern='lib%s-dev',
- description='libav %s development package',
- extra_depends='${PN}-dev',
- prepend=True,
- allow_links=True)
- do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
- output_pattern='lib%s-dev',
- description='libav %s development package',
- extra_depends='${PN}-dev',
- prepend=True)
- do_split_packages(d, av_libdir, '^lib(.*)\.a$',
- output_pattern='lib%s-staticdev',
- description='libav %s development package - static library',
- extra_depends='${PN}-dev',
- prepend=True,
- allow_links=True)
-
-}
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.1.bb
new file mode 100644
index 0000000000..5ac18ba3f1
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.1.bb
@@ -0,0 +1,158 @@
+SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
+DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
+ mux, demux, stream, filter and play pretty much anything that humans and machines \
+ have created. It supports the most obscure ancient formats up to the cutting edge."
+HOMEPAGE = "https://www.ffmpeg.org/"
+SECTION = "libs"
+
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libpostproc = "GPLv2+"
+LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_FLAGS = "commercial"
+
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
+ file://mips64_cpu_detection.patch \
+ "
+SRC_URI[md5sum] = "67da904cf9fddeeb10a1308fc0dc39de"
+SRC_URI[sha256sum] = "cec7c87e9b60d174509e263ac4011b522385fd0775292e1670ecc1180c9bb6d4"
+
+# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
+# Should be API compatible with libav (which was a fork of ffmpeg)
+# libpostproc was previously packaged from a separate recipe
+PROVIDES = "libav libpostproc"
+
+DEPENDS = "nasm-native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \
+ alsa bzlib gpl lzma theora x264 zlib \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}"
+
+# libraries to build in addition to avutil
+PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
+PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
+PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
+PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
+PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
+PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
+PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
+
+# features to support
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
+PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
+PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk"
+PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
+PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
+PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
+PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
+
+def cpu(d):
+ for arg in (d.getVar('TUNE_CCARGS') or '').split():
+ if arg.startswith('-mcpu='):
+ return arg[6:]
+ return 'generic'
+
+EXTRA_OECONF = " \
+ --disable-stripping \
+ --enable-pic \
+ --enable-shared \
+ --enable-pthreads \
+ ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+ \
+ --cross-prefix=${TARGET_PREFIX} \
+ \
+ --ld="${CCLD}" \
+ --cc="${CC}" \
+ --cxx="${CXX}" \
+ --arch=${TARGET_ARCH} \
+ --target-os="linux" \
+ --enable-cross-compile \
+ --extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ --sysroot="${STAGING_DIR_TARGET}" \
+ ${EXTRA_FFCONF} \
+ --libdir=${libdir} \
+ --shlibdir=${libdir} \
+ --datadir=${datadir}/ffmpeg \
+ ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
+ --cpu=${@cpu(d)} \
+ --pkg-config=pkg-config \
+"
+
+EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
+# gold crashes on x86, another solution is to --disable-asm but thats more hacky
+# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
+
+LDFLAGS_append_x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
+EXTRA_OEMAKE = "V=1"
+
+do_configure() {
+ ${S}/configure ${EXTRA_OECONF}
+}
+
+PACKAGES =+ "libavcodec \
+ libavdevice \
+ libavfilter \
+ libavformat \
+ libavresample \
+ libavutil \
+ libpostproc \
+ libswresample \
+ libswscale"
+
+FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}"
+FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}"
+FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}"
+FILES_libavformat = "${libdir}/libavformat${SOLIBS}"
+FILES_libavresample = "${libdir}/libavresample${SOLIBS}"
+FILES_libavutil = "${libdir}/libavutil${SOLIBS}"
+FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}"
+FILES_libswresample = "${libdir}/libswresample${SOLIBS}"
+FILES_libswscale = "${libdir}/libswscale${SOLIBS}"
+
+# ffmpeg disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
+INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
+INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
+INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
+INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
+INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
+INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
diff --git a/meta/recipes-multimedia/flac/flac_1.3.1.bb b/meta/recipes-multimedia/flac/flac_1.3.1.bb
deleted file mode 100644
index f25271f879..0000000000
--- a/meta/recipes-multimedia/flac/flac_1.3.1.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Free Lossless Audio Codec"
-DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compression format."
-HOMEPAGE = "https://xiph.org/flac/"
-BUGTRACKER = "http://sourceforge.net/p/flac/bugs/"
-SECTION = "libs"
-LICENSE = "GFDL-1.2 & GPLv2+ & LGPLv2.1+ & BSD"
-LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
- file://src/Makefile.am;beginline=1;endline=17;md5=0a853b81d9d43d8aad3b53b05cfcc37e \
- file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://src/flac/main.c;beginline=1;endline=18;md5=d03a766558d233f9cc3ac5dfafd49deb \
- file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \
- file://src/plugin_common/all.h;beginline=1;endline=18;md5=7c8a3b9e1e66ed0aba765bc6f35da85d \
- file://COPYING.Xiph;md5=a2c4b71c0198682376d483eb5bcc9197 \
- file://include/FLAC/all.h;beginline=65;endline=70;md5=64474f2b22e9e77b28d8b8b25c983a48"
-DEPENDS = "libogg"
-
-SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "b9922c9a0378c88d3e901b234f852698"
-SRC_URI[sha256sum] = "4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c"
-
-inherit autotools gettext
-
-EXTRA_OECONF = "--disable-oggtest \
- --with-ogg-libraries=${STAGING_LIBDIR} \
- --with-ogg-includes=${STAGING_INCDIR} \
- --disable-xmms-plugin \
- --without-libiconv-prefix \
- ac_cv_prog_NASM="" \
- "
-
-EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "altivec", " --enable-altivec", " --disable-altivec", d)}"
-EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "core2", " --enable-sse", "", d)}"
-EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "corei7", " --enable-sse", "", d)}"
-
-PACKAGES += "libflac libflac++ liboggflac liboggflac++"
-FILES_${PN} = "${bindir}/*"
-FILES_libflac = "${libdir}/libFLAC.so.*"
-FILES_libflac++ = "${libdir}/libFLAC++.so.*"
-FILES_liboggflac = "${libdir}/libOggFLAC.so.*"
-FILES_liboggflac++ = "${libdir}/libOggFLAC++.so.*"
-
diff --git a/meta/recipes-multimedia/flac/flac_1.3.3.bb b/meta/recipes-multimedia/flac/flac_1.3.3.bb
new file mode 100644
index 0000000000..cb6692aedf
--- /dev/null
+++ b/meta/recipes-multimedia/flac/flac_1.3.3.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Free Lossless Audio Codec"
+DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compression format."
+HOMEPAGE = "https://xiph.org/flac/"
+BUGTRACKER = "http://sourceforge.net/p/flac/bugs/"
+SECTION = "libs"
+LICENSE = "GFDL-1.2 & GPLv2+ & LGPLv2.1+ & BSD"
+LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
+ file://src/Makefile.am;beginline=1;endline=17;md5=09501c864f89dfc7ead65553129817ca \
+ file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/flac/main.c;beginline=1;endline=18;md5=09777e2934947a36f13568d0beb81199 \
+ file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \
+ file://src/plugin_common/all.h;beginline=1;endline=18;md5=f56cb4ba9a3bc9ec6102e8df03215271 \
+ file://COPYING.Xiph;md5=b59c1b6d7fc0fb7965f821a3d36505e3 \
+ file://include/FLAC/all.h;beginline=65;endline=70;md5=64474f2b22e9e77b28d8b8b25c983a48"
+DEPENDS = "libogg"
+
+SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
+"
+
+SRC_URI[md5sum] = "26703ed2858c1fc9ffc05136d13daa69"
+SRC_URI[sha256sum] = "213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748"
+
+CVE_PRODUCT = "libflac flac"
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--disable-oggtest \
+ --with-ogg-libraries=${STAGING_LIBDIR} \
+ --with-ogg-includes=${STAGING_INCDIR} \
+ --disable-xmms-plugin \
+ --without-libiconv-prefix \
+ ac_cv_prog_NASM="" \
+ "
+
+EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "altivec", " --enable-altivec", " --disable-altivec", d)}"
+EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "vsx", " --enable-vsx", " --disable-vsx", d)}"
+EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "core2", " --enable-sse", "", d)}"
+EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "corei7", " --enable-sse", "", d)}"
+
+PACKAGES += "libflac libflac++ liboggflac liboggflac++"
+FILES_${PN} = "${bindir}/*"
+FILES_libflac = "${libdir}/libFLAC.so.*"
+FILES_libflac++ = "${libdir}/libFLAC++.so.*"
+FILES_liboggflac = "${libdir}/libOggFLAC.so.*"
+FILES_liboggflac++ = "${libdir}/libOggFLAC++.so.*"
+
diff --git a/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch b/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch
new file mode 100644
index 0000000000..a0d215c5a0
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch
@@ -0,0 +1,38 @@
+From 0bd8004d8dddc486d3961a5316d24e8f2645e4c8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 9 Sep 2018 17:38:10 -0700
+Subject: [PATCH] connect has a different signature on musl
+
+On linux when not using glibc and using musl for C library, connect
+API has a different signature, this patch fixes this so it can compile
+on musl, the functionality should remain same as it is immediately
+typcasted to struct sockaddr_in* type inside the function before use
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/fault_injection/socket_interposer.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/fault_injection/socket_interposer.c b/plugins/fault_injection/socket_interposer.c
+index 53c1ebb..ad7adf8 100644
+--- a/plugins/fault_injection/socket_interposer.c
++++ b/plugins/fault_injection/socket_interposer.c
+@@ -100,10 +100,15 @@ socket_interposer_set_callback (struct sockaddr_in *addrin,
+ }
+
+ int
+-connect (int socket, const struct sockaddr_in *addrin, socklen_t address_len)
++#if defined(__linux__) && !defined(__GLIBC__)
++connect (int socket, const struct sockaddr *addr, socklen_t address_len)
++#else
++connect (int socket, const struct sockaddr_in *addr, socklen_t address_len)
++#endif
+ {
+ size_t i;
+ int override_errno = 0;
++ struct sockaddr_in* addrin = (struct sockaddr_in*)addr;
+ typedef ssize_t (*real_connect_fn) (int, const struct sockaddr_in *,
+ socklen_t);
+ static real_connect_fn real_connect = 0;
diff --git a/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
new file mode 100644
index 0000000000..67a872cddb
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
@@ -0,0 +1,35 @@
+From a1d7c582392c8bc87fa9411af77b20e011944357 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 25 Jan 2018 17:55:02 +0200
+Subject: [PATCH] gst/gstpluginloader.c: when env var is set do not fall
+ through to system plugin scanner
+
+If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
+
+Falling through to the one installed on the system is problamatic in cross-compilation
+environemnts, regardless of whether one pointed to by the env var succeeded or failed.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst/gstpluginloader.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
+index 430829d..3a75731 100644
+--- a/gst/gstpluginloader.c
++++ b/gst/gstpluginloader.c
+@@ -471,9 +471,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
+ helper_bin = g_strdup (env);
+ res = gst_plugin_loader_try_helper (loader, helper_bin);
+ g_free (helper_bin);
+- }
+-
+- if (!res) {
++ } else {
+ GST_LOG ("Trying installed plugin scanner");
+
+ #ifdef G_OS_WIN32
+--
+2.15.1
+
diff --git a/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch b/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
index 2cab87f9ec..1b7f115083 100644
--- a/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
+++ b/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
@@ -1,4 +1,4 @@
-From 90916f96262fa7b27a0a99788c69f9fd6df11000 Mon Sep 17 00:00:00 2001
+From 2b0436f9a07773fae8c74df902d7024e8bfc3512 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 24 Nov 2015 16:46:27 +0200
Subject: [PATCH] introspection.m4: prefix pkgconfig paths with
@@ -10,12 +10,13 @@ is later supplied to g-ir-scanner.
Upstream-Status: Pending [review on oe-core list]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
- common/m4/introspection.m4 | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
+ common/m4/introspection.m4 | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4
-index 162be57..217a6ae 100644
+index 162be57..933f979 100644
--- a/common/m4/introspection.m4
+++ b/common/m4/introspection.m4
@@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
@@ -37,6 +38,3 @@ index 162be57..217a6ae 100644
INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);"
fi
AC_SUBST(INTROSPECTION_SCANNER)
---
-2.6.2
-
diff --git a/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
new file mode 100644
index 0000000000..d02d869410
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
@@ -0,0 +1,69 @@
+From d61414bc17cf2df019510c2908048c4cabf5cf09 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 27 Feb 2018 09:27:01 +0800
+Subject: [PATCH] add targets for test installation
+
+Targets to make sure tests can be installed and then run on
+the target.
+
+Upstream-Status: Inappropriate [specific to oe setup]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+---
+ tests/check/Makefile.am | 27 ++++++++++++++++++++-------
+ 1 file changed, 20 insertions(+), 7 deletions(-)
+
+diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
+index 13b916d..a66786d 100644
+--- a/tests/check/Makefile.am
++++ b/tests/check/Makefile.am
+@@ -8,11 +8,7 @@ REGISTRY_ENVIRONMENT = \
+ GST_REGISTRY=$(CHECK_REGISTRY)
+
+ AM_TESTS_ENVIRONMENT += \
+- GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)" \
+- $(REGISTRY_ENVIRONMENT) \
+- GST_PLUGIN_SCANNER_1_0=$(top_builddir)/libs/gst/helpers/gst-plugin-scanner \
+- GST_PLUGIN_SYSTEM_PATH_1_0= \
+- GST_PLUGIN_PATH_1_0=$(top_builddir)/plugins
++ GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"
+
+ plugindir = $(libdir)/gstreamer-@GST_API_VERSION@
+
+@@ -178,6 +174,23 @@ noinst_PROGRAMS =
+
+ TESTS = $(check_PROGRAMS)
+
++install-ptest: $(TESTS)
++ @$(INSTALL) -d $(DESTDIR)
++ @for dir in `find -maxdepth 1 -type d`; do \
++ if [ -x $$dir/.libs ]; then \
++ $(INSTALL) -d $(DESTDIR)/$$dir; \
++ $(INSTALL_PROGRAM) $$dir/.libs/* $(DESTDIR)/$$dir/; \
++ fi \
++ done
++
++runtests:
++ @for b in $(TESTS); do \
++ if [ -x $$b ]; then \
++ $(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver --test-name "$$b" \
++ --log-file $$b.log --trs-file $$b.trs $$b; \
++ fi \
++ done
++
+ noinst_HEADERS = \
+ gst/capslist.h \
+ gst/struct_arm.h \
+@@ -221,9 +234,9 @@ gst_gstprintf_LDADD = \
+ $(LDADD)
+
+ elements_fdsrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \
+- -DTESTFILE=\"$(top_srcdir)/configure.ac\"
++ -DTESTFILE=\"Makefile\"
+ elements_filesrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \
+- -DTESTFILE=\"$(top_srcdir)/configure.ac\"
++ -DTESTFILE=\"Makefile\"
+
+ libs_controller_LDADD = \
+ $(top_builddir)/libs/gst/controller/libgstcontroller-@GST_API_VERSION@.la \
diff --git a/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch b/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch
new file mode 100644
index 0000000000..d86c78d793
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch
@@ -0,0 +1,47 @@
+From 7018ca1c4bf26c8317e7fcd2e7e4e648195f42ca Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 20 Dec 2017 13:03:03 +0000
+Subject: [PATCH] gstreamer: use a patch instead of sed to fix gtk-doc
+
+Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient
+binaries instead of libtool wrapper or running them directly.
+
+Also substitute a bogus plugin scanner, as trying to run the real one is causing
+issues during build on x86_64.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ common/gtk-doc.mak | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak
+index 3f83491..e5cb0d1 100644
+--- a/common/gtk-doc.mak
++++ b/common/gtk-doc.mak
+@@ -6,11 +6,11 @@
+ if GTK_DOC_USE_LIBTOOL
+ GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+-GTKDOC_RUN = $(LIBTOOL) --mode=execute
++GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
+ else
+ GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+-GTKDOC_RUN =
++GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
+ endif
+
+ # We set GPATH here; this gives us semantics for GNU make
+@@ -101,6 +101,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ GST_PLUGIN_PATH_1_0= \
+ GST_REGISTRY_1_0=doc-registry.xml \
+ $(GTKDOC_EXTRA_ENVIRONMENT) \
++ GST_PLUGIN_SCANNER_1_0="$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy" \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \
+ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \
+ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+--
+2.15.1
+
diff --git a/meta/recipes-multimedia/gstreamer/files/run-ptest b/meta/recipes-multimedia/gstreamer/files/run-ptest
new file mode 100644
index 0000000000..473d0b67a7
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k runtests
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
new file mode 100644
index 0000000000..0338bad1c0
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
@@ -0,0 +1,39 @@
+From 755f6dab07565aca7b6aefacad8be65de364ff75 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 17 Aug 2017 11:07:02 +0300
+Subject: [PATCH] Make player examples installable
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Denied [Upstream considers these code examples, for now a least]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=777827
+---
+ playback/player/gst-play/meson.build | 1 +
+ playback/player/gtk/meson.build | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/playback/player/gst-play/meson.build b/playback/player/gst-play/meson.build
+index 719b55b..a56fe13 100644
+--- a/playback/player/gst-play/meson.build
++++ b/playback/player/gst-play/meson.build
+@@ -8,5 +8,6 @@ executable('gst-play',
+ ['gst-play.c',
+ 'gst-play-kb.c',
+ 'gst-play-kb.h'],
++ install: true,
+ dependencies : [gst_dep, gstplayer_dep, m_dep])
+
+diff --git a/playback/player/gtk/meson.build b/playback/player/gtk/meson.build
+index 08aae4f..671a65d 100644
+--- a/playback/player/gtk/meson.build
++++ b/playback/player/gtk/meson.build
+@@ -18,5 +18,6 @@ executable('gtk-play',
+ gtk_play_resources,
+ 'gtk-video-renderer.h',
+ 'gtk-video-renderer.c'],
++ install: true,
+ dependencies : [glib_dep, gobject_dep, gmodule_dep, gst_dep, gsttag_dep, gstplayer_dep, gtk_dep, x11_dep])
+
+--
+2.13.3
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop b/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
index 7ddd456a1e..7ddd456a1e 100644
--- a/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
+++ b/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples_1.16.0.bb b/meta/recipes-multimedia/gstreamer/gst-examples_1.16.0.bb
new file mode 100644
index 0000000000..cc7a7e78e2
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-examples_1.16.0.bb
@@ -0,0 +1,31 @@
+SUMMARY = "GStreamer examples (including gtk-play, gst-play)"
+LICENSE = "LGPL-2.0+"
+LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
+
+DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 glib-2.0-native"
+
+SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=https \
+ file://0001-Make-player-examples-installable.patch \
+ file://gst-player.desktop \
+ "
+
+SRCREV = "d953c127c1146b50d5676618299933950685dcd7"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig features_check
+
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+do_install_append() {
+ install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
+}
+
+RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback"
+RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
+ gstreamer1.0-plugins-good-meta \
+ gstreamer1.0-plugins-bad-meta \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
+RPROVIDES_${PN} += "gst-player gst-player-bin"
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/0001-Disable-visualizations-by-default.patch b/meta/recipes-multimedia/gstreamer/gst-player/0001-Disable-visualizations-by-default.patch
deleted file mode 100644
index dabdcea345..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-player/0001-Disable-visualizations-by-default.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 93e1838f8b8704e4d7d71965f61bee931377b080 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 22 Sep 2016 19:26:40 +0300
-Subject: [PATCH] Disable visualizations by default
-
-As documented in [YOCTO #10041] visualizations trigger a bug in
-xvimagesink on some hardware, which prevents playback in the
-mediaplayer. Disable visualizations until the xv issue is solved
-to enable playback QA.
-
-Upstream-Status: Inappropriate [workaround]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- gtk/gtk-play.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
-index 8ae0fea..322e599 100644
---- a/gtk/gtk-play.c
-+++ b/gtk/gtk-play.c
-@@ -1751,9 +1751,8 @@ gtk_play_constructor (GType type, guint n_construct_params,
- g_signal_connect (self->player, "volume-changed",
- G_CALLBACK (player_volume_changed_cb), self);
-
-- /* enable visualization (by default playbin uses goom) */
-- /* if visualization is enabled then use the first element */
-- gst_player_set_visualization_enabled (self->player, TRUE);
-+ /* Disable visualization by default */
-+ gst_player_set_visualization_enabled (self->player, FALSE);
-
- g_signal_connect (G_OBJECT (self), "show", G_CALLBACK (show_cb), NULL);
-
---
-2.4.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch b/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch
deleted file mode 100644
index e3f1c4f749..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 220c2659a45dd354270a465c45197970dae5f548 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Fri, 5 Aug 2016 17:52:18 +0300
-Subject: [PATCH] gtk-play: provide similar behaviour for quit and close
-
-In x86 targets, gtk-play just pause rather than quitting the application
-when we click the close button (delete-event). Change the callback function
-to get similar behaviour when we click on "Quit" menu option.
-
-Upstream-Status: Accepted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- gtk/gtk-play.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
-index a520bef..16afc6b 100644
---- a/gtk/gtk-play.c
-+++ b/gtk/gtk-play.c
-@@ -177,7 +177,7 @@ load_from_builder (const gchar * filename, gboolean register_sig_handler,
- static void
- delete_event_cb (GtkWidget * widget, GdkEvent * event, GtkPlay * play)
- {
-- gst_player_stop (play->player);
-+ gtk_widget_destroy (GTK_WIDGET (play));
- }
-
- static void
---
-2.4.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch b/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch
deleted file mode 100644
index 712d46daa0..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch
+++ /dev/null
@@ -1,252 +0,0 @@
-From d64c7edb66f4a64ff49c4306cf77fd269b7079ab Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Mon, 16 Mar 2015 13:45:30 +0200
-Subject: [PATCH] Add error signal emission for missing plugins
-
-Add a missing plugins error signal to gst-player. Note that this error
-does not necessarily mean the playback has completely failed, but in
-practice the user experience will be bad (think, e.g. of a mp4 file
-where H.264 codec is missing: AAC playback still works...).
-
-Use the signal in gtk-play to show a infobar if plugins are missing.
-
-Submitted upstream at https://github.com/sdroege/gst-player/pull/11
-
-Upstream-Status: Submitted
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 2 +-
- gtk/gtk-play.c | 54 +++++++++++++++++++++++++++++++++++++++++++++-
- lib/gst/player/gstplayer.c | 22 +++++++++++++++++++
- lib/gst/player/gstplayer.h | 3 ++-
- 4 files changed, 78 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 90ab74c..6cdb4eb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -53,7 +53,7 @@ AC_SUBST(LT_AGE)
- PKG_PROG_PKG_CONFIG
-
- PKG_CHECK_MODULES(GLIB, [glib-2.0 gobject-2.0])
--PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.4 gstreamer-video-1.0 >= 1.4])
-+PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.4 gstreamer-video-1.0 >= 1.4 gstreamer-pbutils-1.0])
-
- GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
- AC_SUBST(GLIB_PREFIX)
-diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
-index b92773b..e2b605a 100644
---- a/gtk/gtk-play.c
-+++ b/gtk/gtk-play.c
-@@ -30,6 +30,8 @@ typedef struct
- GtkWidget *prev_button, *next_button;
- GtkWidget *seekbar;
- GtkWidget *video_area;
-+ GtkWidget *info_label;
-+ GtkWidget *info_bar;
- GtkWidget *volume_button;
- gulong seekbar_value_changed_signal_id;
- gboolean playing;
-@@ -141,6 +143,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play)
- }
-
- static void
-+clear_missing_plugins (GtkPlay * play)
-+{
-+ gtk_label_set_text (GTK_LABEL (play->info_label), "");
-+ gtk_widget_hide (play->info_bar);
-+}
-+
-+static void
- skip_prev_clicked_cb (GtkButton * button, GtkPlay * play)
- {
- GList *prev;
-@@ -155,6 +164,7 @@ skip_prev_clicked_cb (GtkButton * button, GtkPlay * play)
-
- gtk_widget_set_sensitive (play->next_button, TRUE);
- gst_player_set_uri (play->player, prev->data);
-+ clear_missing_plugins (play);
- gst_player_play (play->player);
- set_title (play, prev->data);
- gtk_widget_set_sensitive (play->prev_button, g_list_previous (prev) != NULL);
-@@ -175,6 +185,7 @@ skip_next_clicked_cb (GtkButton * button, GtkPlay * play)
-
- gtk_widget_set_sensitive (play->prev_button, TRUE);
- gst_player_set_uri (play->player, next->data);
-+ clear_missing_plugins (play);
- gst_player_play (play->player);
- set_title (play, next->data);
- gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL);
-@@ -193,10 +204,16 @@ volume_changed_cb (GtkScaleButton * button, gdouble value, GtkPlay * play)
- gst_player_set_volume (play->player, value);
- }
-
-+void
-+info_bar_response_cb (GtkInfoBar * bar, gint response, GtkPlay * play)
-+{
-+ gtk_widget_hide (GTK_WIDGET (bar));
-+}
-+
- static void
- create_ui (GtkPlay * play)
- {
-- GtkWidget *controls, *main_hbox, *main_vbox;
-+ GtkWidget *controls, *main_hbox, *main_vbox, *info_bar, *content_area;
-
- play->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- g_signal_connect (G_OBJECT (play->window), "delete-event",
-@@ -208,6 +225,20 @@ create_ui (GtkPlay * play)
- g_signal_connect (play->video_area, "realize",
- G_CALLBACK (video_area_realize_cb), play);
-
-+ play->info_bar = gtk_info_bar_new ();
-+ gtk_info_bar_set_message_type (GTK_INFO_BAR (play->info_bar),
-+ GTK_MESSAGE_WARNING);
-+ //gtk_info_bar_set_show_close_button (GTK_INFO_BAR (play->info_bar),
-+ // TRUE);
-+ gtk_widget_set_no_show_all (play->info_bar, TRUE);
-+ g_signal_connect (play->info_bar, "response",
-+ G_CALLBACK (info_bar_response_cb), play);
-+
-+ content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (play->info_bar));
-+ play->info_label = gtk_label_new ("");
-+ gtk_container_add (GTK_CONTAINER (content_area), play->info_label);
-+ gtk_widget_show (play->info_label);
-+
- /* Unified play/pause button */
- play->play_pause_button =
- gtk_button_new_from_icon_name ("media-playback-pause",
-@@ -258,6 +289,7 @@ create_ui (GtkPlay * play)
-
- main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_pack_start (GTK_BOX (main_vbox), main_hbox, TRUE, TRUE, 0);
-+ gtk_box_pack_start (GTK_BOX (main_vbox), play->info_bar, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (main_vbox), controls, FALSE, FALSE, 0);
- gtk_container_add (GTK_CONTAINER (play->window), main_vbox);
-
-@@ -322,6 +354,7 @@ eos_cb (GstPlayer * unused, GtkPlay * play)
- gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL);
-
- gst_player_set_uri (play->player, next->data);
-+ clear_missing_plugins (play);
- gst_player_play (play->player);
- set_title (play, next->data);
- } else {
-@@ -330,6 +363,24 @@ eos_cb (GstPlayer * unused, GtkPlay * play)
- }
- }
-
-+static void
-+error_cb (GstPlayer * player, GError * err, GtkPlay * play)
-+{
-+ char *message;
-+
-+ if (g_error_matches (err, gst_player_error_quark (),
-+ GST_PLAYER_ERROR_MISSING_PLUGIN)) {
-+ // add message to end of any existing message: there may be
-+ // multiple missing plugins.
-+ message = g_strdup_printf ("%s%s. ",
-+ gtk_label_get_text (GTK_LABEL (play->info_label)), err->message);
-+ gtk_label_set_text (GTK_LABEL (play->info_label), message);
-+ g_free (message);
-+
-+ gtk_widget_show (play->info_bar);
-+ }
-+}
-+
- int
- main (gint argc, gchar ** argv)
- {
-@@ -422,6 +473,7 @@ main (gint argc, gchar ** argv)
- g_signal_connect (play.player, "video-dimensions-changed",
- G_CALLBACK (video_dimensions_changed_cb), &play);
- g_signal_connect (play.player, "end-of-stream", G_CALLBACK (eos_cb), &play);
-+ g_signal_connect (play.player, "error", G_CALLBACK (error_cb), &play);
-
- /* We have file(s) that need playing. */
- set_title (&play, g_list_first (play.uris)->data);
-diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c
-index bd682d9..78e7ba1 100644
---- a/lib/gst/player/gstplayer.c
-+++ b/lib/gst/player/gstplayer.c
-@@ -47,6 +47,7 @@
-
- #include <gst/gst.h>
- #include <gst/video/video.h>
-+#include <gst/pbutils/missing-plugins.h>
-
- GST_DEBUG_CATEGORY_STATIC (gst_player_debug);
- #define GST_CAT_DEFAULT gst_player_debug
-@@ -238,6 +239,7 @@ gst_player_class_init (GstPlayerClass * klass)
- g_signal_new ("video-dimensions-changed", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, 0, NULL,
- NULL, NULL, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
-+
- }
-
- static void
-@@ -619,6 +621,21 @@ error_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
- g_mutex_unlock (&self->priv->lock);
- }
-
-+static void
-+element_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
-+{
-+ GstPlayer *self = GST_PLAYER (user_data);
-+
-+ if (gst_is_missing_plugin_message (msg)) {
-+ gchar *desc;
-+
-+ desc = gst_missing_plugin_message_get_description (msg);
-+ emit_error (self, g_error_new (GST_PLAYER_ERROR,
-+ GST_PLAYER_ERROR_MISSING_PLUGIN, "Missing plugin '%s'", desc));
-+ g_free (desc);
-+ }
-+}
-+
- static gboolean
- eos_dispatch (gpointer user_data)
- {
-@@ -1059,6 +1076,8 @@ gst_player_main (gpointer data)
- NULL, NULL);
- g_source_attach (bus_source, self->priv->context);
-
-+ g_signal_connect (G_OBJECT (bus), "message::element",
-+ G_CALLBACK (element_cb), self);
- g_signal_connect (G_OBJECT (bus), "message::error", G_CALLBACK (error_cb),
- self);
- g_signal_connect (G_OBJECT (bus), "message::eos", G_CALLBACK (eos_cb), self);
-@@ -1560,6 +1579,7 @@ gst_player_error_get_type (void)
- static gsize id = 0;
- static const GEnumValue values[] = {
- {C_ENUM (GST_PLAYER_ERROR_FAILED), "GST_PLAYER_ERROR_FAILED", "failed"},
-+ {C_ENUM (GST_PLAYER_ERROR_MISSING_PLUGIN), "GST_PLAYER_ERROR_MISSING_PLUGIN", "missing-plugin"},
- {0, NULL, NULL}
- };
-
-@@ -1577,6 +1597,8 @@ gst_player_error_get_name (GstPlayerError error)
- switch (error) {
- case GST_PLAYER_ERROR_FAILED:
- return "failed";
-+ case GST_PLAYER_ERROR_MISSING_PLUGIN:
-+ return "missing-plugin";
- }
-
- g_assert_not_reached ();
-diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h
-index c438513..35fb5bb 100644
---- a/lib/gst/player/gstplayer.h
-+++ b/lib/gst/player/gstplayer.h
-@@ -44,7 +44,8 @@ GType gst_player_error_get_type (void);
- #define GST_TYPE_PLAYER_ERROR (gst_player_error_get_type ())
-
- typedef enum {
-- GST_PLAYER_ERROR_FAILED = 0
-+ GST_PLAYER_ERROR_FAILED = 0,
-+ GST_PLAYER_ERROR_MISSING_PLUGIN
- } GstPlayerError;
-
- const gchar *gst_player_error_get_name (GstPlayerError error);
---
-2.1.4
-
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch b/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch
deleted file mode 100644
index 783c42ad70..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-Fix pause/play
-
-The current player state is now notified via the state-changed signal,
-and in the GTK UI it was only used to keep track of the desired state.
-
-This is a backport of upstream commit 738479c7a0.
-
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
----
- gtk/gtk-play.c | 8 ++++++--
- lib/gst/player/gstplayer.c | 12 ------------
- lib/gst/player/gstplayer.h | 2 --
- 3 files changed, 6 insertions(+), 16 deletions(-)
-
-diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
-index 6e7a098..e2b605a 100644
---- a/gtk/gtk-play.c
-+++ b/gtk/gtk-play.c
-@@ -34,6 +34,7 @@ typedef struct
- GtkWidget *info_bar;
- GtkWidget *volume_button;
- gulong seekbar_value_changed_signal_id;
-+ gboolean playing;
- } GtkPlay;
-
- /* Compat stubs */
-@@ -118,12 +119,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play)
- {
- GtkWidget *image;
-
-- if (gst_player_is_playing (play->player)) {
-+ if (play->playing) {
- gst_player_pause (play->player);
- image =
- gtk_image_new_from_icon_name ("media-playback-start",
- GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (play->play_pause_button), image);
-+ play->playing = FALSE;
- } else {
- gchar *title;
-
-@@ -136,6 +138,7 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play)
- title = gst_player_get_uri (play->player);
- set_title (play, title);
- g_free (title);
-+ play->playing = TRUE;
- }
- }
-
-@@ -335,7 +338,7 @@ video_dimensions_changed_cb (GstPlayer * unused, gint width, gint height,
- static void
- eos_cb (GstPlayer * unused, GtkPlay * play)
- {
-- if (gst_player_is_playing (play->player)) {
-+ if (play->playing) {
- GList *next = NULL;
- gchar *uri;
-
-@@ -452,6 +455,7 @@ main (gint argc, gchar ** argv)
- }
-
- play.player = gst_player_new ();
-+ play.playing = TRUE;
-
- g_object_set (play.player, "dispatch-to-main-context", TRUE, NULL);
-
-diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c
-index 069b284..78e7ba1 100644
---- a/lib/gst/player/gstplayer.c
-+++ b/lib/gst/player/gstplayer.c
-@@ -1422,18 +1422,6 @@ gst_player_set_uri (GstPlayer * self, const gchar * val)
- g_object_set (self, "uri", val, NULL);
- }
-
--gboolean
--gst_player_is_playing (GstPlayer * self)
--{
-- gboolean val;
--
-- g_return_val_if_fail (GST_IS_PLAYER (self), FALSE);
--
-- g_object_get (self, "is-playing", &val, NULL);
--
-- return val;
--}
--
- GstClockTime
- gst_player_get_position (GstPlayer * self)
- {
-diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h
-index 6933dd7..35fb5bb 100644
---- a/lib/gst/player/gstplayer.h
-+++ b/lib/gst/player/gstplayer.h
-@@ -93,8 +93,6 @@ gchar * gst_player_get_uri (GstPlayer * player);
- void gst_player_set_uri (GstPlayer * player,
- const gchar * uri);
-
--gboolean gst_player_is_playing (GstPlayer * player);
--
- GstClockTime gst_player_get_position (GstPlayer * player);
- GstClockTime gst_player_get_duration (GstPlayer * player);
-
---
-2.1.4
-
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch b/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch
deleted file mode 100644
index 7bf1b034b3..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 43d4b19ab611d844156e26c4840cc54ddb73ae03 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Thu, 26 Feb 2015 17:17:05 +0000
-Subject: [PATCH] gtk-play: show a file chooser if no URIs were passed
-
----
- gtk/gtk-play.c | 28 ++++++++++++++++++++++++++--
- 1 file changed, 26 insertions(+), 2 deletions(-)
-
-diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
-index f015077..9766a72 100644
---- a/gtk/gtk-play.c
-+++ b/gtk/gtk-play.c
-@@ -319,8 +319,32 @@ main (gint argc, gchar ** argv)
- // FIXME: Add support for playlists and stuff
- /* Parse the list of the file names we have to play. */
- if (!file_names) {
-- g_print ("Usage: %s FILE(s)|URI(s)\n", APP_NAME);
-- return 1;
-+ GtkWidget *chooser;
-+ int res;
-+
-+ chooser = gtk_file_chooser_dialog_new ("Select files to play", NULL,
-+ GTK_FILE_CHOOSER_ACTION_OPEN,
-+ "_Cancel", GTK_RESPONSE_CANCEL,
-+ "_Open", GTK_RESPONSE_ACCEPT,
-+ NULL);
-+ g_object_set (chooser,
-+ "local-only", FALSE,
-+ "select-multiple", TRUE,
-+ NULL);
-+
-+ res = gtk_dialog_run (GTK_DIALOG (chooser));
-+ if (res == GTK_RESPONSE_ACCEPT) {
-+ GSList *l;
-+
-+ l = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser));
-+ while (l) {
-+ play.uris = g_list_append (play.uris, l->data);
-+ l = g_slist_delete_link (l, l);
-+ }
-+ } else {
-+ return 0;
-+ }
-+ gtk_widget_destroy (chooser);
- } else {
- guint i;
-
---
-1.7.10.4
-
diff --git a/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/meta/recipes-multimedia/gstreamer/gst-player_git.bb
deleted file mode 100644
index 51f3544599..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "GStreamer playback helper library and examples"
-LICENSE = "LGPL-2.0+"
-LIC_FILES_CHKSUM = "file://gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
-
-DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3"
-
-SRC_URI = "git://github.com/sdroege/gst-player.git \
- file://filechooser.patch;apply=0 \
- file://Fix-pause-play.patch;apply=0 \
- file://Add-error-signal-emission-for-missing-plugins.patch;apply=0 \
- file://0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch \
- file://0001-Disable-visualizations-by-default.patch \
- file://gst-player.desktop"
-
-SRCREV = "ea90e63c1064503f9ba5d59aa4ca604f13ca5def"
-PV = "0.0.1+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-do_configure_prepend() {
- touch ${S}/ChangeLog
-}
-
-do_install_append() {
- install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
-}
-
-RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback"
-RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
- gstreamer1.0-plugins-good-meta \
- gstreamer1.0-plugins-bad-meta \
- ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
- ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
-RPROVIDES_${PN} += "${PN}-bin"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
index c24493e1e8..6781e98c31 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
@@ -3,29 +3,29 @@ PACKAGESPLITFUNCS_append = " set_metapkg_rdepends "
python split_gstreamer10_packages () {
gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}')
- postinst = d.getVar('plugin_postinst', True)
- glibdir = d.getVar('libdir', True)
-
- do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True)
- do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='')
- do_split_packages(d, glibdir+'/girepository-1.0', 'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer typelib file for %s', postinst=postinst, extra_depends='')
- do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends='${PN}-dev')
- do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends='${PN}-staticdev')
+ postinst = d.getVar('plugin_postinst')
+ glibdir = d.getVar('libdir')
+
+ do_split_packages(d, glibdir, r'^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True)
+ do_split_packages(d, gst_libdir, r'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='')
+ do_split_packages(d, glibdir+'/girepository-1.0', r'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer typelib file for %s', postinst=postinst, extra_depends='')
+ do_split_packages(d, gst_libdir, r'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends='${PN}-dev')
+ do_split_packages(d, gst_libdir, r'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends='${PN}-staticdev')
}
python set_metapkg_rdepends () {
import os
+ import oe.utils
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
metapkg = pn + '-meta'
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
d.setVar('FILES_' + metapkg, "")
- blacklist = [ pn, pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc', pn + '-meta' ]
+ blacklist = [ pn, pn + '-meta' ]
metapkg_rdepends = []
- packages = d.getVar('PACKAGES', True).split()
- pkgdest = d.getVar('PKGDEST', True)
- for pkg in packages[1:]:
- if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.count('locale') and not pkg.count('-staticdev'):
+ pkgdest = d.getVar('PKGDEST')
+ for pkg in oe.utils.packages_filter_out_system(d):
+ if pkg not in blacklist and pkg not in metapkg_rdepends:
# See if the package is empty by looking at the contents of its PKGDEST subdirectory.
# If this subdirectory is empty, then the package is.
# Empty packages do not get added to the meta package's RDEPENDS
diff --git a/meta/recipes-multimedia/gstreamer/gst-validate_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gst-validate_1.16.1.bb
new file mode 100644
index 0000000000..7d602eabc6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-validate_1.16.1.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Gstreamer validation tool"
+DESCRIPTION = "A Tool to test GStreamer components"
+HOMEPAGE = "https://gstreamer.freedesktop.org/releases/gst-validate/1.12.3.html"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz \
+ file://0001-connect-has-a-different-signature-on-musl.patch \
+ "
+SRC_URI[md5sum] = "793e75f4717f718ad204c554d577b160"
+SRC_URI[sha256sum] = "7f079b9b2a127604b98e297037dc8847ef50f4ce2b508aa2df0cac5b77562899"
+
+DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base"
+RRECOMMENDS_${PN} = "git"
+
+FILES_${PN} += "${datadir}/gstreamer-1.0/* ${libdir}/gst-validate-launcher/* ${libdir}/gstreamer-1.0/*"
+
+inherit pkgconfig gettext autotools gobject-introspection gtk-doc upstream-version-is-even
+
+# With gtk-doc enabled this recipe fails to build, so forcibly disable it:
+# WORKDIR/build/docs/validate/gst-validate-scan: line 117:
+# WORKDIR/build/docs/validate/.libs/lt-gst-validate-scan: No such file or directory
+GTKDOC_ENABLED = "False"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
deleted file mode 100644
index ea011637c2..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "Libav-based GStreamer 1.x plugin"
-HOMEPAGE = "http://gstreamer.freedesktop.org/"
-SECTION = "multimedia"
-
-LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
-LICENSE_FLAGS = "commercial"
-
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
-
-inherit autotools pkgconfig upstream-version-is-even gtk-doc
-
-# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time,
-# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the
-# libav copy included in the gst-libav package.
-PACKAGECONFIG ??= "orc yasm"
-
-PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl,"
-PACKAGECONFIG[libav] = "--with-system-libav,,libav"
-PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
-PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,yasm-native"
-PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
-
-GSTREAMER_1_0_DEBUG ?= "--disable-debug"
-
-LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure"
-
-LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
- --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
- --ranlib='${RANLIB}' \
- ${GSTREAMER_1_0_DEBUG} \
- --cross-prefix='${HOST_PREFIX}'"
-
-LIBAV_EXTRA_CONFIGURE_COMMON = \
-'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
-
-EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}"
-
-FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
-FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
-FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
-
-# http://errors.yoctoproject.org/Errors/Details/20493/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-# ffmpeg/libav disables PIC on some platforms (e.g. x86-32)
-INSANE_SKIP_${PN} = "textrel"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
index 1d99ad1251..11571aefa1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
@@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac
index 22ede88..ef3c050 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -305,6 +305,12 @@ else
+@@ -355,6 +355,12 @@ else
emblibav_configure_args="$emblibav_configure_args --enable-gpl"
fi
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch
new file mode 100644
index 0000000000..f182715bda
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch
@@ -0,0 +1,35 @@
+From aac5902d3c9cb35c771e760d0e487622aa2e116a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 20 Apr 2017 10:38:18 -0700
+Subject: [PATCH] configure: check for armv7ve variant
+
+OE passes -mcpu and -march via cmdline and if
+package tries to detect one of it own then it
+should be compatible otherwise, newer gcc7+ will
+error out
+
+Check for relevant preprocessor macro to determine
+armv7ve architecture
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gst-libs/ext/libav/configure | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure
+index 4a5e477..727818e 100755
+--- a/gst-libs/ext/libav/configure
++++ b/gst-libs/ext/libav/configure
+@@ -4745,6 +4745,7 @@ elif enabled arm; then
+ elif check_arm_arch 6KZ; then echo armv6zk
+ elif check_arm_arch 6ZK; then echo armv6zk
+ elif check_arm_arch 6T2; then echo armv6t2
++ elif check_arm_arch EXT_IDIV; then echo armv7ve
+ elif check_arm_arch 7; then echo armv7
+ elif check_arm_arch 7A 7_A; then echo armv7-a
+ elif check_arm_arch 7S; then echo armv7-a
+--
+2.12.2
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch
new file mode 100644
index 0000000000..120c0798ea
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch
@@ -0,0 +1,36 @@
+From c1700f867f876ee33c130a8e28b688e2b1d89663 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Wed, 11 Apr 2018 17:14:55 +0800
+Subject: [PATCH] Prevent host contamination
+
+Remove reference to host $(libdir) from .la files.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ gst-libs/ext/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am
+index 6cdc048..a19d255 100644
+--- a/gst-libs/ext/Makefile.am
++++ b/gst-libs/ext/Makefile.am
+@@ -49,7 +49,7 @@ echo " GEN $1.la" && \
+ echo "library_names=''" && \
+ echo "old_library='$1.a'" && \
+ echo "inherited_linker_flags=''" && \
+- echo "dependency_libs=' -L$(libdir) $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \
++ echo "dependency_libs=' -L $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \
+ echo "weak_library_names=''" && \
+ echo "current=" && \
+ echo "age=" && \
+@@ -58,7 +58,7 @@ echo " GEN $1.la" && \
+ echo "shouldnotlink=no" && \
+ echo "dlopen=''" && \
+ echo "dlpreopen=''" && \
+- echo "libdir='$(libdir)'") > $1.la
++ echo "libdir=''") > $1.la
+ endef
+
+ libavutil.la:
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch
new file mode 100644
index 0000000000..90d042b313
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch
@@ -0,0 +1,32 @@
+It will add -mips64r6 and -mips64r2 to cmdline which will
+cause conflicts
+
+in OE we user mips32r2 and mips64r2 for mips arch versions
+so there is no benefit of detecting it automatically by
+poking at tools especially in cross env
+
+Fixes errors like
+
+linking -mnan=2008 module with previous -mnan=legacy modules
+failed to merge target specific data of file
+
+-Khem
+Upstream-Status: Inappropriate [OE-Specific]
+
+Index: gst-libav-1.10.1/gst-libs/ext/libav/configure
+===================================================================
+--- gst-libav-1.10.1.orig/gst-libs/ext/libav/configure
++++ gst-libav-1.10.1/gst-libs/ext/libav/configure
+@@ -5650,12 +5650,9 @@ elif enabled mips; then
+
+ # Enable minimum ISA based on selected options
+ if enabled mips64; then
+- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6'
+ enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2'
+ disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64'
+ else
+- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6'
+- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5'
+ enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2'
+ disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32'
+ fi
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
index 36abf8607e..4b85356547 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
@@ -11,7 +11,7 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
--- gst-libav-1.4.5.orig/gst-libs/ext/libav/libavcodec/h264_cabac.c
+++ gst-libav-1.4.5/gst-libs/ext/libav/libavcodec/h264_cabac.c
-@@ -2020,7 +2020,11 @@ decode_intra_mb:
+@@ -2057,7 +2057,11 @@ decode_intra_mb:
// In deblocking, the quantizer is 0
h->cur_pic.qscale_table[mb_xy] = 0;
// All coeffs are present
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.1.bb
new file mode 100644
index 0000000000..10955ff161
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.1.bb
@@ -0,0 +1,70 @@
+SUMMARY = "Libav-based GStreamer 1.x plugin"
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+SECTION = "multimedia"
+
+LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+ file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
+ file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+ file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
+ file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
+ file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
+ file://mips64_cpu_detection.patch \
+ file://0001-configure-check-for-armv7ve-variant.patch \
+ file://0001-fix-host-contamination.patch \
+ "
+SRC_URI[md5sum] = "58023f4c71bbd711061e350fcd76c09d"
+SRC_URI[sha256sum] = "e8a5748ae9a4a7be9696512182ea9ffa6efe0be9b7976916548e9d4381ca61c4"
+
+S = "${WORKDIR}/gst-libav-${PV}"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
+
+inherit autotools pkgconfig upstream-version-is-even gtk-doc
+
+# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time,
+# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the
+# libav copy included in the gst-libav package.
+PACKAGECONFIG ??= "orc yasm"
+
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl,"
+PACKAGECONFIG[libav] = "--with-system-libav,,libav"
+PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
+PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,nasm-native"
+PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
+
+GSTREAMER_1_0_DEBUG ?= "--disable-debug"
+
+LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure"
+
+LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
+ --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
+ --ranlib='${RANLIB}' \
+ ${GSTREAMER_1_0_DEBUG} \
+ --cross-prefix='${HOST_PREFIX}'"
+
+# Disable assembly optimizations for X32, as this libav lacks the support
+PACKAGECONFIG_remove_linux-gnux32 = "yasm"
+LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm"
+
+LIBAV_EXTRA_CONFIGURE_COMMON = \
+'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
+
+EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}"
+
+FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
+FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+
+# http://errors.yoctoproject.org/Errors/Details/20493/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+# ffmpeg/libav disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${PN} = "textrel"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
deleted file mode 100644
index 3d86221d22..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-include gstreamer1.0-libav.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
- file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
- file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
- file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
- file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
-"
-
-SRC_URI[md5sum] = "b51a736147bacb40f85827a4e0ae0d2c"
-SRC_URI[sha256sum] = "9006a05990089f7155ee0e848042f6bb24e52ab1d0a59ff8d1b5d7e33001a495"
-
-S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
deleted file mode 100644
index f4604a34c8..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-libav.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
- file://gst-libs/ext/libav/LICENSE.md;md5=acda96fe91ccaabc9cd9d541806a0d37 \
- file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
- file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-# To build using the system libav/ffmpeg, append "libav" to PACKAGECONFIG
-# and remove the ffmpeg sources from SRC_URI below. However, first note the
-# warnings in gstreamer1.0-libav.inc
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-libav;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
- git://source.ffmpeg.org/ffmpeg;destsuffix=git/gst-libs/ext/libav;name=ffmpeg;branch=release/3.0 \
- file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
- file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "f285cf0fd799cc3b46b5cecaaa439d5a2a38a9b7"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_ffmpeg = "c66f4d1ae64dffaf456d05cbdade02054446f499"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
index c542b13f0d..016e176707 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
@@ -37,7 +37,7 @@ RDEPENDS_gstreamer1.0-meta-base = "\
gstreamer1.0-plugins-base-videoscale \
gstreamer1.0-plugins-base-videoconvert \
gstreamer1.0-plugins-good-autodetect \
- gstreamer1.0-plugins-good-souphttpsrc"
+ gstreamer1.0-plugins-good-soup"
RRECOMMENDS_gstreamer1.0-meta-x11-base = "\
gstreamer1.0-plugins-base-ximagesink \
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
deleted file mode 100644
index 07e5b7db5e..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "OpenMAX IL plugins for GStreamer"
-HOMEPAGE = "http://gstreamer.freedesktop.org/"
-SECTION = "multimedia"
-
-LICENSE = "LGPLv2.1"
-LICENSE_FLAGS = "commercial"
-
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
-
-inherit autotools pkgconfig gettext gtk-doc upstream-version-is-even
-
-acpaths = "-I ${S}/common/m4 -I ${S}/m4"
-
-
-GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
-GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
-
-EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}"
-
-python __anonymous () {
- omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET", True)
- if omx_target in ['generic', 'bellagio']:
- # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,#
- # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros);
- # appending a directory path to gst-omx' internal OpenMAX IL headers fixes this
- d.appendVar("CFLAGS", " -I${S}/omx/openmax")
- elif omx_target == "rpi":
- # Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific
- d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH", True))
-}
-
-set_omx_core_name() {
- sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf"
-}
-
-do_install[postfuncs] += " set_omx_core_name "
-
-FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
-FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
-FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
-
-RDEPENDS_${PN} = "libomxil"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch
deleted file mode 100644
index a428ac9c91..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f629e041e9f678fcd86ad764a15117dff63c271c Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Sat, 27 Apr 2013 02:50:25 +0200
-Subject: [PATCH] omx: fixed type error in printf call
-
-%zu expects size_t
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=699008]
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- omx/gstomx.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/omx/gstomx.c b/omx/gstomx.c
-index a2945ed..1eca7cc 100644
---- a/omx/gstomx.c
-+++ b/omx/gstomx.c
-@@ -1630,7 +1630,7 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port,
-
- GST_INFO_OBJECT (comp->parent,
- "Allocating %d buffers of size %zu for %s port %u", n,
-- port->port_def.nBufferSize, comp->name, (guint) port->index);
-+ (size_t) (port->port_def.nBufferSize), comp->name, (guint) port->index);
-
- if (!port->buffers)
- port->buffers = g_ptr_array_sized_new (n);
---
-1.7.9.5
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.1.bb
new file mode 100644
index 0000000000..cb2f7045a8
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.1.bb
@@ -0,0 +1,57 @@
+SUMMARY = "OpenMAX IL plugins for GStreamer"
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "89772e7a277fd0abfc250eaf8e4e9ce9"
+SRC_URI[sha256sum] = "cbf54121a2cba575d460833e8132265781252ce32cf5b8f9fa8753e42ab24bb2"
+
+S = "${WORKDIR}/gst-omx-${PV}"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
+
+inherit autotools pkgconfig gettext gtk-doc upstream-version-is-even
+
+acpaths = "-I ${S}/common/m4 -I ${S}/m4"
+
+GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
+GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
+
+EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}"
+
+python __anonymous () {
+ omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET")
+ if omx_target in ['generic', 'bellagio']:
+ # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,#
+ # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros);
+ # appending a directory path to gst-omx' internal OpenMAX IL headers fixes this
+ d.appendVar("CFLAGS", " -I${S}/omx/openmax")
+ elif omx_target == "rpi":
+ # Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific
+ d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH"))
+}
+
+delete_pkg_m4_file() {
+ # Delete m4 files which we provide patched versions of but will be ignored
+ # if these exist
+ rm -f "${S}/common/m4/pkg.m4"
+ rm -f "${S}/common/m4/gtk-doc.m4"
+}
+do_configure[prefuncs] += "delete_pkg_m4_file"
+
+set_omx_core_name() {
+ sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf"
+}
+do_install[postfuncs] += " set_omx_core_name "
+
+FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
+FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+
+RDEPENDS_${PN} = "libomxil"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
deleted file mode 100644
index 74358a7245..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-include gstreamer1.0-omx.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "d24e8c0153c35dfefee3e26b1c2c35f8"
-SRC_URI[sha256sum] = "0b4874961e6488ad9e5808114bd486ea981c540907262caab1419355fd82d745"
-
-S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
deleted file mode 100644
index 9705543529..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-omx.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master;name=gst-omx \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;branch=master;name=common \
- file://0001-omx-fixed-type-error-in-printf-call.patch \
-"
-
-SRCREV_gst-omx = "a2db76b048db278ef0aa798e106b7594264e06c0"
-SRCREV_common = "5edcd857b2107cd8b78c16232dd10877513ec157"
-
-SRCREV_FORMAT = "gst-omx"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- cd ${S}
- ./autogen.sh --noconfigure
- cd ${B}
-}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
deleted file mode 100644
index 0fe5564b53..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ /dev/null
@@ -1,157 +0,0 @@
-require gstreamer1.0-plugins.inc
-
-LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
-
-DEPENDS += "gstreamer1.0-plugins-base libpng jpeg"
-
-inherit gettext bluetooth
-
-SRC_URI_append = " \
- file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \
-"
-
-# opengl packageconfig factored out to make it easy for distros
-# and BSP layers to pick either (desktop) opengl, gles2, or no GL
-PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}"
-
-# gtk is not in the PACKAGECONFIG variable by default until
-# the transition to gtk+3 is finished
-PACKAGECONFIG ??= " \
- ${GSTREAMER_ORC} \
- ${PACKAGECONFIG_GL} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
- bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \
-"
-
-PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass"
-PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
-PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2"
-PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb"
-PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl"
-PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
-PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac"
-PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2"
-PACKAGECONFIG[flite] = "--enable-flite,--disable-flite,flite-alsa"
-PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
-PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
-# ensure OpenSSL is used for HLS AES description instead of nettle
-# (OpenSSL is a shared dependency with dtls)
-PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl"
-PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms"
-PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
-PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug"
-PACKAGECONFIG[neon] = "--enable-neon,--disable-neon,neon"
-PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft"
-PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv"
-PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
-# the opus encoder/decoder elements are now in the -base package,
-# but the opus parser remains in -bad
-PACKAGECONFIG[opusparse] = "--enable-opus,--disable-opus,libopus"
-PACKAGECONFIG[resindvd] = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav"
-PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg"
-PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
-PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc"
-PACKAGECONFIG[schroedinger] = "--enable-schro,--disable-schro,schroedinger"
-PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
-PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1"
-PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp"
-PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
-PACKAGECONFIG[voaacenc] = "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
-PACKAGECONFIG[voamrwbenc] = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
-PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
-PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
-
-# these plugins have not been ported to 1.0 (yet):
-# apexsink dc1394 lv2 linsys musepack nas timidity sdl xvid wininet
-# sndio cdxaparse dccp faceoverlay hdvparse tta mve nuvdemux
-# patchdetect sdi videomeasure
-
-# these plugins have no corresponding library in OE-core or meta-openembedded:
-# openni2 winks direct3d directsound winscreencap acm
-# apple_media android_media avc bs2b chromaprint daala dts gme gsm kate ladspa
-# libde265 mimic mpeg2enc mplex nvenc ofa openh264 opensles pvr soundtouch spandsp
-# spc teletextdec tinyalsa vdpau vulkan wasapi x265 zbar
-
-# qt5 support is disabled, because it is not present in OE core, and requires more work than
-# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths).
-# This is better done in a separate qt5 layer (which then should add a "qt5" packageconfig
-# in a gstreamer1.0-plugins-bad bbappend).
-
-EXTRA_OECONF += " \
- --enable-decklink \
- --enable-dvb \
- --enable-fbdev \
- --enable-netsim \
- --enable-shm \
- --enable-vcd \
- --disable-acm \
- --disable-android_media \
- --disable-apexsink \
- --disable-apple_media \
- --disable-avc \
- --disable-bs2b \
- --disable-chromaprint \
- --disable-cocoa \
- --disable-daala \
- --disable-dc1394 \
- --disable-direct3d \
- --disable-directsound \
- --disable-dts \
- --disable-gme \
- --disable-gsm \
- --disable-kate \
- --disable-ladspa \
- --disable-libde265 \
- --disable-libvisual \
- --disable-linsys \
- --disable-lv2 \
- --disable-mimic \
- --disable-mpeg2enc \
- --disable-mplex \
- --disable-musepack \
- --disable-nas \
- --disable-nvenc \
- --disable-ofa \
- --disable-openexr \
- --disable-openh264 \
- --disable-openjpeg \
- --disable-openni2 \
- --disable-opensles \
- --disable-pvr \
- --disable-qt \
- --disable-sdl \
- --disable-sdltest \
- --disable-sndio \
- --disable-soundtouch \
- --disable-spandsp \
- --disable-spc \
- --disable-teletextdec \
- --disable-timidity \
- --disable-tinyalsa \
- --disable-vdpau \
- --disable-vulkan \
- --disable-wasapi \
- --disable-wildmidi \
- --disable-wininet \
- --disable-winks \
- --disable-winscreencap \
- --disable-x265 \
- --disable-xvid \
- --disable-zbar \
- ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \
-"
-
-export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
-
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
-FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs"
-FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*"
-FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
deleted file mode 100644
index 33efc503eb..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From cff6fbf555a072408c21da1e818209c9d3814dd3 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 27 Oct 2015 14:36:58 +0200
-Subject: [PATCH] Makefile.am: don't hardcode libtool name when running
- introspection tools
-
-Upstream-Status: Pending [review on oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- gst-libs/gst/gl/Makefile.am | 2 +-
- gst-libs/gst/insertbin/Makefile.am | 2 +-
- gst-libs/gst/mpegts/Makefile.am | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
-index f968357..7cc2c7a 100644
---- a/gst-libs/gst/gl/Makefile.am
-+++ b/gst-libs/gst/gl/Makefile.am
-@@ -167,7 +167,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
- --library=libgstgl-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
- --include=GstBase-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-base-@GST_API_VERSION@ \
- --pkg gstreamer-video-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am
-index 09eb97c..b746885 100644
---- a/gst-libs/gst/insertbin/Makefile.am
-+++ b/gst-libs/gst/insertbin/Makefile.am
-@@ -44,7 +44,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS
- --library=libgstinsertbin-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
- --include=GstBase-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-base-@GST_API_VERSION@ \
- --pkg-export gstreamer-insertbin-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am
-index 2511d49..c1cbce6 100644
---- a/gst-libs/gst/mpegts/Makefile.am
-+++ b/gst-libs/gst/mpegts/Makefile.am
-@@ -78,7 +78,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_
- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
- --library=libgstmpegts-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-video-@GST_API_VERSION@ \
- --pkg-export gstreamer-mpegts-@GST_API_VERSION@ \
---
-2.6.2
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
deleted file mode 100644
index e81b065705..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From a93ca63d01e7cd1e40b5be576992f77fac364bd5 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 21 Mar 2016 18:21:17 +0200
-Subject: [PATCH] gstreamer-gl.pc.in: don't append GL_CFLAGS to CFLAGS
-
-Dependencies' include directories should not be added in this way;
-it causes problems when cross-compiling in sysroot environments.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- pkgconfig/gstreamer-gl.pc.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in
-index 5589e2a..b986450 100644
---- a/pkgconfig/gstreamer-gl.pc.in
-+++ b/pkgconfig/gstreamer-gl.pc.in
-@@ -10,4 +10,4 @@ Version: @VERSION@
- Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
-
- Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@
--Cflags: -I${includedir} @GL_CFLAGS@
-+Cflags: -I${includedir}
---
-2.7.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
deleted file mode 100755
index 51f4eb4b39..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
+++ /dev/null
@@ -1,634 +0,0 @@
-From 8a0e97f7e672301cc76e394855e8c7a3448b0249 Mon Sep 17 00:00:00 2001
-From: Haihua Hu <jared.hu@nxp.com>
-Date: Fri, 8 Apr 2016 16:47:15 +0800
-Subject: [PATCH 4/6] [glplugin] enable gldeinterlace on OpenGL ES
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-1.Porting the exist deinterlace shader and OpenGL callback
- to be compatible with OpenGL ES.
-2.Add a our blur vertical shader to gldeinterlace.
-3.Add a property named “method†to let user choose which
- deinterlace function to use. Default to choose blur vertical
- method for better performance.
-
-Upstream-Status: Backport [1.9.1]
-
-https://bugzilla.gnome.org/show_bug.cgi?id=764873
-
-Signed-off-by: Haihua Hu <jared.hu@nxp.com>
----
- ext/gl/Makefile.am | 4 +-
- ext/gl/gstgldeinterlace.c | 344 +++++++++++++++++++++++++++++++++++-----------
- ext/gl/gstgldeinterlace.h | 6 +-
- ext/gl/gstopengl.c | 13 +-
- 4 files changed, 275 insertions(+), 92 deletions(-)
-
-diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
-index 5d55f54..46419a7 100644
---- a/ext/gl/Makefile.am
-+++ b/ext/gl/Makefile.am
-@@ -40,6 +40,7 @@ libgstopengl_la_SOURCES = \
- gstglfilterapp.c \
- gstglviewconvert.c \
- gstglstereosplit.c \
-+ gstgldeinterlace.c \
- gstglstereomix.c
-
- noinst_HEADERS = \
-@@ -63,20 +64,19 @@ noinst_HEADERS = \
- gstglfilterapp.h \
- gstglstereosplit.h \
- gstglstereomix.h \
-+ gstgldeinterlace.h \
- gstglviewconvert.h
-
- # full opengl required
- if USE_OPENGL
- libgstopengl_la_SOURCES += \
- gstglfilterglass.c \
-- gstgldeinterlace.c \
- gltestsrc.c \
- gstgltestsrc.c \
- gstglmosaic.c
-
- noinst_HEADERS += \
- gstglfilterglass.h \
-- gstgldeinterlace.h \
- gltestsrc.h \
- gstgltestsrc.h \
- gstglmosaic.h \
-diff --git a/ext/gl/gstgldeinterlace.c b/ext/gl/gstgldeinterlace.c
-index bd0eff0..c1250dc 100644
---- a/ext/gl/gstgldeinterlace.c
-+++ b/ext/gl/gstgldeinterlace.c
-@@ -43,7 +43,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-
- enum
- {
-- PROP_0
-+ PROP_0,
-+ PROP_METHOD
- };
-
- #define DEBUG_INIT \
-@@ -57,17 +58,23 @@ static void gst_gl_deinterlace_set_property (GObject * object,
- static void gst_gl_deinterlace_get_property (GObject * object,
- guint prop_id, GValue * value, GParamSpec * pspec);
-
-+static gboolean gst_gl_deinterlace_start (GstBaseTransform * trans);
- static gboolean gst_gl_deinterlace_reset (GstBaseTransform * trans);
--static gboolean gst_gl_deinterlace_init_shader (GstGLFilter * filter);
-+static gboolean gst_gl_deinterlace_init_fbo (GstGLFilter * filter);
- static gboolean gst_gl_deinterlace_filter (GstGLFilter * filter,
- GstBuffer * inbuf, GstBuffer * outbuf);
- static gboolean gst_gl_deinterlace_filter_texture (GstGLFilter * filter,
- guint in_tex, guint out_tex);
--static void gst_gl_deinterlace_callback (gint width, gint height,
-+static void gst_gl_deinterlace_vfir_callback (gint width, gint height,
-+ guint texture, gpointer stuff);
-+static void gst_gl_deinterlace_greedyh_callback (gint width, gint height,
- guint texture, gpointer stuff);
-
- /* *INDENT-OFF* */
- static const gchar *greedyh_fragment_source =
-+ "#ifdef GL_ES\n"
-+ "precision mediump float;\n"
-+ "#endif\n"
- "uniform sampler2D tex;\n"
- "uniform sampler2D tex_prev;\n"
- "uniform float max_comb;\n"
-@@ -75,35 +82,35 @@ static const gchar *greedyh_fragment_source =
- "uniform float motion_sense;\n"
- "uniform float width;\n"
- "uniform float height;\n"
-+ "varying vec2 v_texcoord;\n"
-
- "void main () {\n"
-- " vec2 texcoord = gl_TexCoord[0].xy;\n"
-- " if (int(mod(texcoord.y * height, 2.0)) == 0) {\n"
-- " gl_FragColor = vec4(texture2D(tex_prev, texcoord).rgb, 1.0);\n"
-+ " if (int(mod(v_texcoord.y * height, 2.0)) == 0) {\n"
-+ " gl_FragColor = vec4(texture2D(tex_prev, v_texcoord).rgb, 1.0);\n"
- " } else {\n"
- " vec2 texcoord_L1_a1, texcoord_L3_a1, texcoord_L1, texcoord_L3, texcoord_L1_1, texcoord_L3_1;\n"
- " vec3 L1_a1, L3_a1, L1, L3, L1_1, L3_1;\n"
-
-- " texcoord_L1 = vec2(texcoord.x, texcoord.y - 1.0 / height);\n"
-- " texcoord_L3 = vec2(texcoord.x, texcoord.y + 1.0 / height);\n"
-+ " texcoord_L1 = vec2(v_texcoord.x, v_texcoord.y - 1.0 / height);\n"
-+ " texcoord_L3 = vec2(v_texcoord.x, v_texcoord.y + 1.0 / height);\n"
- " L1 = texture2D(tex_prev, texcoord_L1).rgb;\n"
- " L3 = texture2D(tex_prev, texcoord_L3).rgb;\n"
-- " if (texcoord.x == 1.0 && texcoord.y == 1.0) {\n"
-+ " if (v_texcoord.x == 1.0 && v_texcoord.y == 1.0) {\n"
- " L1_1 = L1;\n"
- " L3_1 = L3;\n"
- " } else {\n"
-- " texcoord_L1_1 = vec2(texcoord.x + 1.0 / width, texcoord.y - 1.0 / height);\n"
-- " texcoord_L3_1 = vec2(texcoord.x + 1.0 / width, texcoord.y + 1.0 / height);\n"
-+ " texcoord_L1_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y - 1.0 / height);\n"
-+ " texcoord_L3_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y + 1.0 / height);\n"
- " L1_1 = texture2D(tex_prev, texcoord_L1_1).rgb;\n"
- " L3_1 = texture2D(tex_prev, texcoord_L3_1).rgb;\n"
- " }\n"
-
-- " if (int(ceil(texcoord.x + texcoord.y)) == 0) {\n"
-+ " if (int(ceil(v_texcoord.x + v_texcoord.y)) == 0) {\n"
- " L1_a1 = L1;\n"
- " L3_a1 = L3;\n"
- " } else {\n"
-- " texcoord_L1_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y - 1.0 / height);\n"
-- " texcoord_L3_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y + 1.0 / height);\n"
-+ " texcoord_L1_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y - 1.0 / height);\n"
-+ " texcoord_L3_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y + 1.0 / height);\n"
- " L1_a1 = texture2D(tex_prev, texcoord_L1_a1).rgb;\n"
- " L3_a1 = texture2D(tex_prev, texcoord_L3_a1).rgb;\n"
- " }\n"
-@@ -113,8 +120,8 @@ static const gchar *greedyh_fragment_source =
- " vec3 avg_1 = (L1_1 + L3_1) / 2.0;\n"
- " vec3 avg_s = (avg_a1 + avg_1) / 2.0;\n"
- " vec3 avg_sc = (avg_s + avg) / 2.0;\n"
-- " vec3 L2 = texture2D(tex, texcoord).rgb;\n"
-- " vec3 LP2 = texture2D(tex_prev, texcoord).rgb;\n"
-+ " vec3 L2 = texture2D(tex, v_texcoord).rgb;\n"
-+ " vec3 LP2 = texture2D(tex_prev, v_texcoord).rgb;\n"
- " vec3 best;\n"
- " if (abs(L2.r - avg_sc.r) < abs(LP2.r - avg_sc.r)) {\n"
- " best.r = L2.r;\n" " } else {\n"
-@@ -144,8 +151,87 @@ static const gchar *greedyh_fragment_source =
- " gl_FragColor = vec4(last, 1.0);\n"
- " }\n"
- "}\n";
-+
-+const gchar *vfir_fragment_source =
-+ "#ifdef GL_ES\n"
-+ "precision mediump float;\n"
-+ "#endif\n"
-+ "uniform sampler2D tex;\n"
-+ "uniform float width;\n"
-+ "uniform float height;\n"
-+ "varying vec2 v_texcoord;\n"
-+ "void main()\n"
-+ "{\n"
-+ " vec2 topcoord, botcoord;\n"
-+ " vec4 cur_color, top_color, bot_color;\n"
-+ " topcoord.x = v_texcoord.x;\n"
-+ " botcoord.x = v_texcoord.x;\n"
-+ " if (v_texcoord.y == 0.0 || v_texcoord.y == 1.0) {\n"
-+ " topcoord.y = v_texcoord.y ;\n"
-+ " botcoord.y = v_texcoord.y ;\n"
-+ " }\n"
-+ " else {\n"
-+ " topcoord.y = v_texcoord.y - 1.0/height;\n"
-+ " botcoord.y = v_texcoord.y + 1.0/height;\n"
-+ " }\n"
-+ " cur_color = texture2D(tex, v_texcoord);\n"
-+ " top_color = texture2D(tex, topcoord);\n"
-+ " bot_color = texture2D(tex, botcoord);\n"
-+ " gl_FragColor = 0.5*cur_color + 0.25*top_color + 0.25*bot_color;\n"
-+ "}";
- /* *INDENT-ON* */
-
-+/* dont' forget to edit the following when a new method is added */
-+typedef enum
-+{
-+ GST_GL_DEINTERLACE_VFIR,
-+ GST_GL_DEINTERLACE_GREEDYH
-+} GstGLDeinterlaceMethod;
-+
-+static const GEnumValue *
-+gst_gl_deinterlace_get_methods (void)
-+{
-+ static const GEnumValue method_types[] = {
-+ {GST_GL_DEINTERLACE_VFIR, "Blur Vertical", "vfir"},
-+ {GST_GL_DEINTERLACE_GREEDYH, "Motion Adaptive: Advanced Detection",
-+ "greedhy"},
-+ {0, NULL, NULL}
-+ };
-+ return method_types;
-+}
-+
-+#define GST_TYPE_GL_DEINTERLACE_METHODS (gst_gl_deinterlace_method_get_type ())
-+static GType
-+gst_gl_deinterlace_method_get_type (void)
-+{
-+ static GType gl_deinterlace_method_type = 0;
-+ if (!gl_deinterlace_method_type) {
-+ gl_deinterlace_method_type =
-+ g_enum_register_static ("GstGLDeinterlaceMethod",
-+ gst_gl_deinterlace_get_methods ());
-+ }
-+ return gl_deinterlace_method_type;
-+}
-+
-+static void
-+gst_gl_deinterlace_set_method (GstGLDeinterlace * deinterlace,
-+ guint method_types)
-+{
-+ switch (method_types) {
-+ case GST_GL_DEINTERLACE_VFIR:
-+ deinterlace->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
-+ deinterlace->current_method = method_types;
-+ break;
-+ case GST_GL_DEINTERLACE_GREEDYH:
-+ deinterlace->deinterlacefunc = gst_gl_deinterlace_greedyh_callback;
-+ deinterlace->current_method = method_types;
-+ break;
-+ default:
-+ g_assert_not_reached ();
-+ break;
-+ }
-+}
-+
- static void
- gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
- {
-@@ -163,25 +249,60 @@ gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
- "Deinterlacing based on fragment shaders",
- "Julien Isorce <julien.isorce@mail.com>");
-
-+ g_object_class_install_property (gobject_class,
-+ PROP_METHOD,
-+ g_param_spec_enum ("method",
-+ "Deinterlace Method",
-+ "Select which deinterlace method apply to GL video texture",
-+ GST_TYPE_GL_DEINTERLACE_METHODS,
-+ GST_GL_DEINTERLACE_VFIR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+ GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_deinterlace_start;
- GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_deinterlace_reset;
-
- GST_GL_FILTER_CLASS (klass)->filter = gst_gl_deinterlace_filter;
- GST_GL_FILTER_CLASS (klass)->filter_texture =
- gst_gl_deinterlace_filter_texture;
-- GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_shader;
-+ GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_fbo;
-
-- GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
-+ GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
-+ GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
- }
-
- static void
- gst_gl_deinterlace_init (GstGLDeinterlace * filter)
- {
-- filter->shader = NULL;
-+ filter->shaderstable = NULL;
-+ filter->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
-+ filter->current_method = GST_GL_DEINTERLACE_VFIR;
- filter->prev_buffer = NULL;
- filter->prev_tex = 0;
- }
-
- static gboolean
-+gst_gl_deinterlace_start (GstBaseTransform * trans)
-+{
-+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
-+
-+ deinterlace_filter->shaderstable = g_hash_table_new (g_str_hash, g_str_equal);
-+
-+ return GST_BASE_TRANSFORM_CLASS (parent_class)->start (trans);
-+}
-+
-+static void
-+gst_gl_deinterlace_ghash_func_clean (gpointer key, gpointer value,
-+ gpointer data)
-+{
-+ GstGLShader *shader = (GstGLShader *) value;
-+ GstGLFilter *filter = (GstGLFilter *) data;
-+
-+ //blocking call, wait the opengl thread has destroyed the shader
-+ gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context, shader);
-+
-+ value = NULL;
-+}
-+
-+static gboolean
- gst_gl_deinterlace_reset (GstBaseTransform * trans)
- {
- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
-@@ -189,10 +310,17 @@ gst_gl_deinterlace_reset (GstBaseTransform * trans)
- gst_buffer_replace (&deinterlace_filter->prev_buffer, NULL);
-
- //blocking call, wait the opengl thread has destroyed the shader
-- if (deinterlace_filter->shader)
-- gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
-- deinterlace_filter->shader);
-- deinterlace_filter->shader = NULL;
-+ if (deinterlace_filter->shaderstable) {
-+ /* release shaders in the gl thread */
-+ g_hash_table_foreach (deinterlace_filter->shaderstable,
-+ gst_gl_deinterlace_ghash_func_clean, deinterlace_filter);
-+
-+ /* clean the htable without calling values destructors
-+ * because shaders have been released in the glthread
-+ * through the foreach func */
-+ g_hash_table_unref (deinterlace_filter->shaderstable);
-+ deinterlace_filter->shaderstable = NULL;
-+ }
-
- return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
- }
-@@ -201,9 +329,12 @@ static void
- gst_gl_deinterlace_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec)
- {
-- //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-+ GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-
- switch (prop_id) {
-+ case PROP_METHOD:
-+ gst_gl_deinterlace_set_method (filter, g_value_get_enum (value));
-+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
-@@ -214,9 +345,12 @@ static void
- gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec)
- {
-- //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-+ GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-
- switch (prop_id) {
-+ case PROP_METHOD:
-+ g_value_set_enum (value, filter->current_method);
-+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
-@@ -224,13 +358,9 @@ gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
- }
-
- static gboolean
--gst_gl_deinterlace_init_shader (GstGLFilter * filter)
-+gst_gl_deinterlace_init_fbo (GstGLFilter * filter)
- {
-- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
--
-- //blocking call, wait the opengl thread has compiled the shader
-- return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context, 0,
-- greedyh_fragment_source, &deinterlace_filter->shader);
-+ return TRUE;
- }
-
- static gboolean
-@@ -241,7 +371,7 @@ gst_gl_deinterlace_filter_texture (GstGLFilter * filter, guint in_tex,
-
- //blocking call, use a FBO
- gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
-- gst_gl_deinterlace_callback, deinterlace_filter);
-+ deinterlace_filter->deinterlacefunc, deinterlace_filter);
-
- return TRUE;
- }
-@@ -259,36 +389,104 @@ gst_gl_deinterlace_filter (GstGLFilter * filter, GstBuffer * inbuf,
- return TRUE;
- }
-
--//opengl scene, params: input texture (not the output filter->texture)
-+static GstGLShader *
-+gst_gl_deinterlace_get_fragment_shader (GstGLFilter * filter,
-+ const gchar * shader_name, const gchar * shader_source)
-+{
-+ GstGLShader *shader = NULL;
-+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+
-+ shader = g_hash_table_lookup (deinterlace_filter->shaderstable, shader_name);
-+
-+ if (!shader) {
-+ GError *error = NULL;
-+
-+ if (!(shader = gst_gl_shader_new_link_with_stages (context, &error,
-+ gst_glsl_stage_new_default_vertex (context),
-+ gst_glsl_stage_new_with_string (context, GL_FRAGMENT_SHADER,
-+ GST_GLSL_VERSION_NONE,
-+ GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY,
-+ shader_source), NULL))) {
-+ GST_ELEMENT_ERROR (deinterlace_filter, RESOURCE, NOT_FOUND,
-+ ("Failed to initialize %s shader", shader_name), (NULL));
-+ }
-+
-+ filter->draw_attr_position_loc =
-+ gst_gl_shader_get_attribute_location (shader, "a_position");
-+ filter->draw_attr_texture_loc =
-+ gst_gl_shader_get_attribute_location (shader, "a_texcoord");
-+ }
-+
-+ g_hash_table_insert (deinterlace_filter->shaderstable, (gchar *) shader_name,
-+ shader);
-+
-+ return shader;
-+}
-+
- static void
--gst_gl_deinterlace_callback (gint width, gint height, guint texture,
-+gst_gl_deinterlace_vfir_callback (gint width, gint height, guint texture,
- gpointer stuff)
- {
-- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (stuff);
-+ GstGLShader *shader;
- GstGLFilter *filter = GST_GL_FILTER (stuff);
-- GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
-+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+ GstGLFuncs *gl = context->gl_vtable;
-+
-+ shader = gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "vfir",
-+ vfir_fragment_source);
-+
-+ if (!shader)
-+ return;
-+
-+#if GST_GL_HAVE_OPENGL
-+ if (USING_OPENGL (context)) {
-+ gl->MatrixMode (GL_PROJECTION);
-+ gl->LoadIdentity ();
-+ }
-+#endif
-+
-+ gst_gl_shader_use (shader);
-+
-+ gl->ActiveTexture (GL_TEXTURE0);
-+ gl->BindTexture (GL_TEXTURE_2D, texture);
-+
-+ gst_gl_shader_set_uniform_1i (shader, "tex", 0);
-+ gst_gl_shader_set_uniform_1f (shader, "width",
-+ GST_VIDEO_INFO_WIDTH (&filter->out_info));
-+ gst_gl_shader_set_uniform_1f (shader, "height",
-+ GST_VIDEO_INFO_HEIGHT (&filter->out_info));
-+
-+ gst_gl_filter_draw_texture (filter, texture, width, height);
-+}
-+
-+static void
-+gst_gl_deinterlace_greedyh_callback (gint width, gint height, guint texture,
-+ gpointer stuff)
-+{
-+ GstGLShader *shader;
-+ GstGLFilter *filter = GST_GL_FILTER (stuff);
-+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+ GstGLFuncs *gl = context->gl_vtable;
- guint temp;
-
-- GLfloat verts[] = { -1.0, -1.0,
-- 1.0, -1.0,
-- 1.0, 1.0,
-- -1.0, 1.0
-- };
-- GLfloat texcoords0[] = { 0.0f, 0.0f,
-- 1.0f, 0.0f,
-- 1.0f, 1.0f,
-- 0.0f, 1.0f
-- };
-- GLfloat texcoords1[] = { 0.0f, 0.0f,
-- 1.0f, 0.0f,
-- 1.0f, 1.0f,
-- 0.0f, 1.0f
-- };
-+ shader =
-+ gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "greedhy",
-+ greedyh_fragment_source);
-
-- gl->MatrixMode (GL_PROJECTION);
-- gl->LoadIdentity ();
-+ if (!shader)
-+ return;
-
-- gst_gl_shader_use (deinterlace_filter->shader);
-+#if GST_GL_HAVE_OPENGL
-+ if (USING_OPENGL (context)) {
-+ gl->MatrixMode (GL_PROJECTION);
-+ gl->LoadIdentity ();
-+ }
-+#endif
-+
-+ gst_gl_shader_use (shader);
-
- if (G_UNLIKELY (deinterlace_filter->prev_tex == 0)) {
- gst_gl_context_gen_texture (GST_GL_BASE_FILTER (filter)->context,
-@@ -298,44 +496,24 @@ gst_gl_deinterlace_callback (gint width, gint height, guint texture,
- GST_VIDEO_INFO_HEIGHT (&filter->out_info));
- } else {
- gl->ActiveTexture (GL_TEXTURE1);
-- gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex_prev", 1);
-+ gst_gl_shader_set_uniform_1i (shader, "tex_prev", 1);
- gl->BindTexture (GL_TEXTURE_2D, deinterlace_filter->prev_tex);
- }
-
- gl->ActiveTexture (GL_TEXTURE0);
-- gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex", 0);
-+ gl->BindTexture (GL_TEXTURE_2D, texture);
-
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "max_comb",
-- 5.0f / 255.0f);
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_threshold",
-- 25.0f / 255.0f);
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_sense",
-- 30.0f / 255.0f);
-+ gst_gl_shader_set_uniform_1i (shader, "tex", 0);
-+ gst_gl_shader_set_uniform_1f (shader, "max_comb", 5.0f / 255.0f);
-+ gst_gl_shader_set_uniform_1f (shader, "motion_threshold", 25.0f / 255.0f);
-+ gst_gl_shader_set_uniform_1f (shader, "motion_sense", 30.0f / 255.0f);
-
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "width",
-+ gst_gl_shader_set_uniform_1f (shader, "width",
- GST_VIDEO_INFO_WIDTH (&filter->out_info));
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "height",
-+ gst_gl_shader_set_uniform_1f (shader, "height",
- GST_VIDEO_INFO_HEIGHT (&filter->out_info));
-
-- gl->ClientActiveTexture (GL_TEXTURE0);
--
-- gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-- gl->EnableClientState (GL_VERTEX_ARRAY);
--
-- gl->VertexPointer (2, GL_FLOAT, 0, &verts);
-- gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords0);
--
-- gl->ClientActiveTexture (GL_TEXTURE1);
-- gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-- gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords1);
--
-- gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
--
-- gl->DisableClientState (GL_VERTEX_ARRAY);
-- gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
--
-- gl->ClientActiveTexture (GL_TEXTURE0);
-- gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-+ gst_gl_filter_draw_texture (filter, texture, width, height);
-
- if (texture == filter->in_tex_id) {
- temp = filter->in_tex_id;
-diff --git a/ext/gl/gstgldeinterlace.h b/ext/gl/gstgldeinterlace.h
-index a81a2e7..58a9c0c 100644
---- a/ext/gl/gstgldeinterlace.h
-+++ b/ext/gl/gstgldeinterlace.h
-@@ -38,9 +38,13 @@ typedef struct _GstGLDeinterlaceClass GstGLDeinterlaceClass;
- struct _GstGLDeinterlace
- {
- GstGLFilter filter;
-- GstGLShader *shader;
-+
-+ GLCB deinterlacefunc;
-+ GHashTable *shaderstable;
- GstBuffer *prev_buffer;
- guint prev_tex;
-+
-+ gint current_method;
- };
-
- struct _GstGLDeinterlaceClass
-diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
-index 50676c4..135862a 100644
---- a/ext/gl/gstopengl.c
-+++ b/ext/gl/gstopengl.c
-@@ -62,6 +62,7 @@
- #include "gstglstereosplit.h"
- #include "gstglstereomix.h"
- #include "gstglviewconvert.h"
-+#include "gstgldeinterlace.h"
-
- #if HAVE_GRAPHENE
- #include "gstgltransformation.h"
-@@ -77,7 +78,6 @@
- #include "gstgltestsrc.h"
- #include "gstglfilterglass.h"
- /* #include "gstglfilterreflectedscreen.h" */
--#include "gstgldeinterlace.h"
- #include "gstglmosaic.h"
- #if HAVE_PNG
- #include "gstgldifferencematte.h"
-@@ -226,6 +226,12 @@ plugin_init (GstPlugin * plugin)
- GST_RANK_NONE, GST_TYPE_GL_STEREO_MIX)) {
- return FALSE;
- }
-+
-+ if (!gst_element_register (plugin, "gldeinterlace",
-+ GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
-+ return FALSE;
-+ }
-+
- #if HAVE_JPEG
- #if HAVE_PNG
- if (!gst_element_register (plugin, "gloverlay",
-@@ -250,11 +256,6 @@ plugin_init (GstPlugin * plugin)
- return FALSE;
- }
- #endif
-- if (!gst_element_register (plugin, "gldeinterlace",
-- GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
-- return FALSE;
-- }
--
- if (!gst_element_register (plugin, "glmosaic",
- GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
- return FALSE;
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
deleted file mode 100755
index 31d8e052fd..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From 127e517568490fc147211d8b2fb4da01cecbbeb5 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 19:50:28 +1100
-Subject: [PATCH 5/6] glcolorconvert: implement multiple render targets for
- GLES3
-
-There are numerous slight differences required between Desktop GL and GLES3 for
-multiple render targets.
-
-1. gl_FragData doesn't exist at all and one is required to use
- 'layout (location = ?) out ...' instead.
-2. gl_FragColor doesn't exist, same as 1
-3. texture2D() has been deprecated
-
-Fortunately most of these have been taken care of with GL3 and the shader
-mangling already exists so just expand the conditions they are used in. The
-gl_FragData issue requires a new mangle pass though. We also use this new
-pass on desktop GL for consistency.
-
-Upstream-Status: Backport [1.9.1]
-
----
- gst-libs/gst/gl/gstglcolorconvert.c | 125 ++++++++++++++++++++++++++++--------
- 1 file changed, 99 insertions(+), 26 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index 490ec54..f478faa 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -1802,10 +1802,11 @@ _mangle_sampler_type (const gchar * str, GstGLTextureTarget from,
-
- static gchar *
- _mangle_varying_attribute (const gchar * str, guint shader_type,
-- GstGLAPI gl_api)
-+ GstGLAPI gl_api, guint gl_major, guint gl_minor)
- {
-- if (gl_api & GST_GL_API_OPENGL3) {
-- if (shader_type == GL_VERTEX_SHADER) {
-+ if (shader_type == GL_VERTEX_SHADER) {
-+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+ && gl_major >= 3)) {
- gchar *tmp, *tmp2;
- GRegex *regex;
-
-@@ -1821,7 +1822,10 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
-
- g_free (tmp);
- return tmp2;
-- } else if (shader_type == GL_FRAGMENT_SHADER) {
-+ }
-+ } else if (shader_type == GL_FRAGMENT_SHADER) {
-+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+ && gl_major > 3)) {
- gchar *tmp;
- GRegex *regex;
-
-@@ -1837,28 +1841,48 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
- }
-
- static gchar *
--_mangle_frag_color (const gchar * str)
-+_mangle_frag_color_data (const gchar * str)
- {
- GRegex *regex;
-- gchar *ret;
-+ gchar *ret, *tmp;
-
- regex = g_regex_new ("gl_FragColor", 0, 0, NULL);
- ret = g_regex_replace_literal (regex, str, -1, 0, "fragColor", 0, NULL);
- g_regex_unref (regex);
-
-+ tmp = ret;
-+ /* search and replace 'gl_FragData[NUM]' into fragColor_NUM */
-+ regex = g_regex_new ("gl_FragData\\[(\\d+)\\]", 0, 0, NULL);
-+ ret = g_regex_replace (regex, tmp, -1, 0, "fragColor_\\1", 0, NULL);
-+ g_regex_unref (regex);
-+ g_free (tmp);
-+
- return ret;
- }
-
- static void
--_mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
-- GstGLSLProfile * profile)
-+_mangle_version_profile_from_gl_api (GstGLAPI gl_api, gint gl_major,
-+ gint gl_minor, GstGLSLVersion * version, GstGLSLProfile * profile)
- {
-+ *version = GST_GLSL_VERSION_NONE;
-+ *profile = GST_GLSL_PROFILE_NONE;
-+
- if (gl_api & GST_GL_API_OPENGL3) {
-- *version = GST_GLSL_VERSION_150;
-- *profile = GST_GLSL_PROFILE_NONE;
-+ if (gl_major > 3 || gl_minor >= 3) {
-+ *version = GST_GLSL_VERSION_330;
-+ *profile = GST_GLSL_PROFILE_CORE;
-+ } else {
-+ *version = GST_GLSL_VERSION_150;
-+ *profile = GST_GLSL_PROFILE_NONE;
-+ }
- } else if (gl_api & GST_GL_API_GLES2) {
-- *version = GST_GLSL_VERSION_100;
-- *profile = GST_GLSL_PROFILE_ES;
-+ if (gl_major >= 3) {
-+ *version = GST_GLSL_VERSION_300;
-+ *profile = GST_GLSL_PROFILE_ES;
-+ } else if (gl_major >= 2) {
-+ *version = GST_GLSL_VERSION_100;
-+ *profile = GST_GLSL_PROFILE_ES;
-+ }
- } else if (gl_api & GST_GL_API_OPENGL) {
- *version = GST_GLSL_VERSION_110;
- *profile = GST_GLSL_PROFILE_COMPATIBILITY;
-@@ -1867,22 +1891,28 @@ _mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
-
- static gchar *
- _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
-- GstGLTextureTarget to, GstGLAPI gl_api, GstGLSLVersion * version,
-- GstGLSLProfile * profile)
-+ GstGLTextureTarget to, GstGLAPI gl_api, gint gl_major, gint gl_minor,
-+ GstGLSLVersion * version, GstGLSLProfile * profile)
- {
- gchar *tmp, *tmp2;
-
-+ _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
-+ profile);
- tmp = _mangle_texture_access (str, from, to, gl_api);
- tmp2 = _mangle_sampler_type (tmp, from, to);
- g_free (tmp);
-- tmp = _mangle_varying_attribute (tmp2, shader_type, gl_api);
-+ tmp =
-+ _mangle_varying_attribute (tmp2, shader_type, gl_api, gl_major, gl_minor);
- g_free (tmp2);
-- if (shader_type == GL_FRAGMENT_SHADER && gl_api & GST_GL_API_OPENGL3) {
-- tmp2 = _mangle_frag_color (tmp);
-- g_free (tmp);
-- tmp = tmp2;
-+ if (shader_type == GL_FRAGMENT_SHADER) {
-+ if ((*profile == GST_GLSL_PROFILE_ES && *version >= GST_GLSL_VERSION_300)
-+ || (*profile == GST_GLSL_PROFILE_CORE
-+ && *version >= GST_GLSL_VERSION_150)) {
-+ tmp2 = _mangle_frag_color_data (tmp);
-+ g_free (tmp);
-+ tmp = tmp2;
-+ }
- }
-- _mangle_version_profile_from_gl_api (gl_api, version, profile);
- return tmp;
- }
-
-@@ -1899,15 +1929,18 @@ _create_shader (GstGLColorConvert * convert)
- const gchar *strings[2];
- GError *error = NULL;
- GstGLAPI gl_api;
-+ gint gl_major, gl_minor;
- int i;
-
- gl_api = gst_gl_context_get_gl_api (convert->context);
-+ gst_gl_context_get_gl_version (convert->context, &gl_major, &gl_minor);
-
- ret = gst_gl_shader_new (convert->context);
-
- tmp =
- _mangle_shader (text_vertex_shader, GL_VERTEX_SHADER, info->templ->target,
-- convert->priv->from_texture_target, gl_api, &version, &profile);
-+ convert->priv->from_texture_target, gl_api, gl_major, gl_minor, &version,
-+ &profile);
-
- tmp1 = gst_glsl_version_profile_to_string (version, profile);
- version_str = g_strdup_printf ("#version %s\n", tmp1);
-@@ -1945,9 +1978,37 @@ _create_shader (GstGLColorConvert * convert)
- if (info->templ->uniforms)
- g_string_append (str, info->templ->uniforms);
-
-- if (gl_api & GST_GL_API_OPENGL3) {
-- g_string_append_c (str, '\n');
-- g_string_append (str, "out vec4 fragColor;\n");
-+ g_string_append_c (str, '\n');
-+
-+ /* GL 3.3+ and GL ES 3.x */
-+ if ((profile == GST_GLSL_PROFILE_CORE && version >= GST_GLSL_VERSION_330)
-+ || (profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)) {
-+ if (info->out_n_textures > 1) {
-+ gint i;
-+
-+ for (i = 0; i < info->out_n_textures; i++) {
-+ g_string_append_printf (str,
-+ "layout(location = %d) out vec4 fragColor_%d;\n", i, i);
-+ }
-+ } else {
-+ g_string_append (str, "layout (location = 0) out vec4 fragColor;\n");
-+ }
-+ } else if (profile == GST_GLSL_PROFILE_CORE
-+ && version >= GST_GLSL_VERSION_150) {
-+ /* no layout specifiers, use glBindFragDataLocation instead */
-+ if (info->out_n_textures > 1) {
-+ gint i;
-+
-+ for (i = 0; i < info->out_n_textures; i++) {
-+ gchar *var_name = g_strdup_printf ("fragColor_%d", i);
-+ g_string_append_printf (str, "out vec4 %s;\n", var_name);
-+ gst_gl_shader_bind_frag_data_location (ret, i, var_name);
-+ g_free (var_name);
-+ }
-+ } else {
-+ g_string_append (str, "out vec4 fragColor;\n");
-+ gst_gl_shader_bind_frag_data_location (ret, 0, "fragColor");
-+ }
- }
-
- for (i = 0; i < MAX_FUNCTIONS; i++) {
-@@ -1959,7 +2020,19 @@ _create_shader (GstGLColorConvert * convert)
- g_string_append_c (str, '\n');
- }
-
-- g_string_append (str, "\nvarying vec2 v_texcoord;\nvoid main (void) {\n");
-+ {
-+ const gchar *varying = NULL;
-+
-+ if ((profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)
-+ || (profile == GST_GLSL_PROFILE_CORE
-+ && version >= GST_GLSL_VERSION_150)) {
-+ varying = "in";
-+ } else {
-+ varying = "varying";
-+ }
-+ g_string_append_printf (str, "\n%s vec2 v_texcoord;\nvoid main (void) {\n",
-+ varying);
-+ }
- if (info->frag_body) {
- g_string_append (str, "vec2 texcoord;\n");
- if (convert->priv->from_texture_target == GST_GL_TEXTURE_TARGET_RECTANGLE
-@@ -1975,7 +2048,7 @@ _create_shader (GstGLColorConvert * convert)
- tmp = g_string_free (str, FALSE);
- info->frag_prog = _mangle_shader (tmp, GL_FRAGMENT_SHADER,
- info->templ->target, convert->priv->from_texture_target, gl_api,
-- &version, &profile);
-+ gl_major, gl_minor, &version, &profile);
- g_free (tmp);
-
- strings[1] = info->frag_prog;
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
deleted file mode 100755
index b75f402d82..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b069672ace2b762f400ca6d318571cbedf5141f2 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 20:00:37 +1100
-Subject: [PATCH 1/3] glcolorconvert: don't use the predefined variable name
- sample
-
-Using 'sample' as a variable name is an error in GLES3
-
-Upstream-Status: Backport [1.9.1]
----
- gst-libs/gst/gl/gstglcolorconvert.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index f478faa..c23624f 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -261,9 +261,9 @@ static const struct shader_templ templ_RGB_to_PLANAR_YUV =
- " for (int j = 0; j < int(chroma_sampling.y); j++) {\n"
- " int n = (i+1)*(j+1);\n"
- " delta.y = float(j);\n"
-- " vec4 sample = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
-+ " vec4 s = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
- /* rolling average */
-- " uv_texel = (float(n-1) * uv_texel + sample) / float(n);\n"
-+ " uv_texel = (float(n-1) * uv_texel + s) / float(n);\n"
- " }\n"
- " }\n"
- "}\n"
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
deleted file mode 100755
index 57e9d1a46e..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 38221080181229d520522a20bcb1663ca19f7aff Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 19:25:32 +1100
-Subject: [PATCH 2/3] glshader: add glBindFragDataLocation
-
-There are some cases where it's needed for binding in/out variables in shaders.
-e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
-the shader source so we have to bind them ourselves.
-
-Upstream-Status: Backport [1.9.1]
----
- gst-libs/gst/gl/glprototypes/shaders.h | 10 ++++++++++
- gst-libs/gst/gl/gstglshader.c | 20 ++++++++++++++++++++
- gst-libs/gst/gl/gstglshader.h | 1 +
- 3 files changed, 31 insertions(+)
-
-diff --git a/gst-libs/gst/gl/glprototypes/shaders.h b/gst-libs/gst/gl/glprototypes/shaders.h
-index 817e479..6d828db 100644
---- a/gst-libs/gst/gl/glprototypes/shaders.h
-+++ b/gst-libs/gst/gl/glprototypes/shaders.h
-@@ -362,3 +362,13 @@ GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
- GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
- (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
- GST_GL_EXT_END ()
-+
-+GST_GL_EXT_BEGIN (bind_frag_data,
-+ GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
-+ 3, 0,
-+ 255, 255,
-+ "\0",
-+ "\0")
-+GST_GL_EXT_FUNCTION (void, BindFragDataLocation,
-+ (GLuint program, GLuint index, const GLchar * name))
-+GST_GL_EXT_END ()
-diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
-index 9d96784..9f09236 100644
---- a/gst-libs/gst/gl/gstglshader.c
-+++ b/gst-libs/gst/gl/gstglshader.c
-@@ -1306,3 +1306,23 @@ gst_gl_shader_bind_attribute_location (GstGLShader * shader, GLuint index,
-
- gl->BindAttribLocation (priv->program_handle, index, name);
- }
-+
-+void
-+gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
-+ guint index, const gchar * name)
-+{
-+ GstGLShaderPrivate *priv;
-+ GstGLFuncs *gl;
-+
-+ g_return_if_fail (shader != NULL);
-+ if (!_ensure_program (shader))
-+ g_return_if_fail (shader->priv->program_handle);
-+ priv = shader->priv;
-+ gl = shader->context->gl_vtable;
-+ g_return_if_fail (gl->BindFragDataLocation);
-+
-+ GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
-+ (int) priv->program_handle, name, index);
-+
-+ gl->BindFragDataLocation (priv->program_handle, index, name);
-+}
-diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
-index 21410e2..2200b89 100644
---- a/gst-libs/gst/gl/gstglshader.h
-+++ b/gst-libs/gst/gl/gstglshader.h
-@@ -104,6 +104,7 @@ void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader *shader, const gchar *n
-
- gint gst_gl_shader_get_attribute_location (GstGLShader *shader, const gchar *name);
- void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint index, const gchar * name);
-+void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint index, const gchar * name);
-
- G_END_DECLS
-
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
deleted file mode 100755
index 79ef4c81ab..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 764fd69f8482eca9f925cefe72ebae090ae59d43 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Tue, 19 Apr 2016 19:27:33 +0300
-Subject: [PATCH 3/3] glcolorconvert: GLES3 deprecates texture2D() and it does
- not work at all in newer versions than 3.3
-
-Use the newer texture() function instead. This fixes glimagesink and other
-things on various Android devices.
-
-Upstream-Status: Backport [1.9.1]
-
-https://bugzilla.gnome.org/show_bug.cgi?id=765266
----
- gst-libs/gst/gl/gstglcolorconvert.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index c23624f..f472d5d 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -1716,7 +1716,7 @@ _unbind_buffer (GstGLColorConvert * convert)
-
- static gchar *
- _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
-- GstGLTextureTarget to, GstGLAPI gl_api)
-+ GstGLTextureTarget to, GstGLAPI gl_api, guint gl_major, guint gl_minor)
- {
- const gchar *from_str = NULL, *to_str = NULL;
- gchar *ret, *tmp;
-@@ -1730,7 +1730,8 @@ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
- if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
- from_str = "texture2D";
-
-- if (gl_api & GST_GL_API_OPENGL3) {
-+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+ && gl_major >= 3)) {
- to_str = "texture";
- } else {
- if (to == GST_GL_TEXTURE_TARGET_2D)
-@@ -1898,7 +1899,7 @@ _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
-
- _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
- profile);
-- tmp = _mangle_texture_access (str, from, to, gl_api);
-+ tmp = _mangle_texture_access (str, from, to, gl_api, gl_major, gl_minor);
- tmp2 = _mangle_sampler_type (tmp, from, to);
- g_free (tmp);
- tmp =
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
deleted file mode 100644
index a67381cfef..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
+++ /dev/null
@@ -1,495 +0,0 @@
-From 806bbe75b0b6947f589bce3960c28fee51b5c6c2 Mon Sep 17 00:00:00 2001
-From: Gwang Yoon Hwang <yoon@igalia.com>
-Date: Thu, 21 Jan 2016 22:18:17 +0900
-Subject: [PATCH] gl: implement GstGLMemoryEGL
-
-Because current GstEGLImageMemory does not inherit GstGLMemory, GLUpload
-allocates additional GLMemory and upload the decoded contents from the decoder
-which uses EGLImage (e.g. gst-omx in RPi).
-
-This work adds GstGLMemoryEGL to avoid this overhead. Decoders allocate
-GstGLMemoryEGL and decode its contents to the EGLImage of GstGLMemoryEGL. And
-GLUpload uses this memory without allocation of additional textures and blit
-operations.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=760916
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gst-libs/gst/gl/egl/Makefile.am | 2 +
- gst-libs/gst/gl/egl/gstgldisplay_egl.c | 2 +
- gst-libs/gst/gl/egl/gstglmemoryegl.c | 241 +++++++++++++++++++++++++++++++++
- gst-libs/gst/gl/egl/gstglmemoryegl.h | 108 +++++++++++++++
- gst-libs/gst/gl/gstgl_fwd.h | 4 +
- gst-libs/gst/gl/gstgldisplay.c | 2 +
- gst-libs/gst/gl/gstglupload.c | 8 ++
- 7 files changed, 367 insertions(+)
- create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.c
- create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.h
-
-diff --git a/gst-libs/gst/gl/egl/Makefile.am b/gst-libs/gst/gl/egl/Makefile.am
-index b808178..878f16c 100644
---- a/gst-libs/gst/gl/egl/Makefile.am
-+++ b/gst-libs/gst/gl/egl/Makefile.am
-@@ -5,6 +5,7 @@ noinst_LTLIBRARIES = libgstgl-egl.la
- libgstgl_egl_la_SOURCES = \
- gstgldisplay_egl.c \
- gstglcontext_egl.c \
-+ gstglmemoryegl.c \
- gsteglimagememory.c
-
- noinst_HEADERS =
-@@ -13,6 +14,7 @@ libgstgl_eglincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/egl
- libgstgl_eglinclude_HEADERS = \
- gstgldisplay_egl.h \
- gstglcontext_egl.h \
-+ gstglmemoryegl.h \
- gsteglimagememory.h \
- gstegl.h
-
-diff --git a/gst-libs/gst/gl/egl/gstgldisplay_egl.c b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-index 9acf4f0..20816c2 100644
---- a/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-+++ b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-@@ -24,6 +24,7 @@
-
- #include <gst/gl/egl/gstgldisplay_egl.h>
- #include <gst/gl/egl/gsteglimagememory.h>
-+#include <gst/gl/egl/gstglmemoryegl.h>
-
- GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
- #define GST_CAT_DEFAULT gst_gl_display_debug
-@@ -51,6 +52,7 @@ gst_gl_display_egl_init (GstGLDisplayEGL * display_egl)
- display_egl->foreign_display = FALSE;
-
- gst_egl_image_memory_init ();
-+ gst_gl_memory_egl_init_once ();
- }
-
- static void
-diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c
-new file mode 100644
-index 0000000..03cf432
---- /dev/null
-+++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c
-@@ -0,0 +1,241 @@
-+/*
-+ * GStreamer
-+ * Copyright (C) 2012 Collabora Ltd.
-+ * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
-+ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
-+ * Copyright (C) 2015 Igalia
-+ * Author: Gwang Yoon Hwang <yoon@igalia.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library 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
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <string.h>
-+
-+#include <gst/gl/egl/gstglmemoryegl.h>
-+
-+static GstAllocator *_gl_memory_egl_allocator;
-+
-+GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
-+#define GST_CAT_DEFAULT GST_CAT_GL_MEMORY
-+
-+#define parent_class gst_gl_memory_egl_allocator_parent_class
-+G_DEFINE_TYPE (GstGLMemoryEGLAllocator, gst_gl_memory_egl_allocator,
-+ GST_TYPE_GL_MEMORY_ALLOCATOR);
-+
-+gboolean
-+gst_is_gl_memory_egl (GstMemory * mem)
-+{
-+ return mem != NULL && mem->allocator != NULL
-+ && g_type_is_a (G_OBJECT_TYPE (mem->allocator),
-+ GST_TYPE_GL_MEMORY_EGL_ALLOCATOR);
-+}
-+
-+static GstGLMemoryEGL *
-+_gl_mem_get_parent (GstGLMemoryEGL * gl_mem)
-+{
-+ GstGLMemoryEGL *parent = (GstGLMemoryEGL *)gl_mem->mem.mem.mem.parent;
-+ return parent ? parent : gl_mem;
-+}
-+
-+EGLImageKHR
-+gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem)
-+{
-+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
-+ EGL_NO_IMAGE_KHR);
-+ return _gl_mem_get_parent(mem)->image;
-+}
-+
-+EGLDisplay
-+gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem)
-+{
-+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)), NULL);
-+ return GST_GL_CONTEXT_EGL(_gl_mem_get_parent(mem))->egl_display;
-+}
-+
-+GstVideoGLTextureOrientation
-+gst_gl_memory_egl_get_orientation (GstGLMemoryEGL * mem)
-+{
-+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
-+ GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL);
-+
-+ return _gl_mem_get_parent(mem)->orientation;
-+}
-+
-+void
-+gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
-+ GstVideoGLTextureOrientation orientation)
-+{
-+ g_return_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)));
-+
-+ _gl_mem_get_parent(mem)->orientation = orientation;
-+}
-+
-+static GstMemory *
-+_gl_mem_alloc (GstAllocator * allocator, gsize size,
-+ GstAllocationParams * params)
-+{
-+ g_warning ("Use gst_gl_base_memory_allocator_alloc() to allocate from this "
-+ "GstGLMemoryEGL allocator");
-+
-+ return NULL;
-+}
-+
-+static void
-+_gl_mem_destroy (GstGLMemoryEGL * mem)
-+{
-+ /* Shared memory should not destroy all the data */
-+ if (!mem->mem.mem.mem.parent) {
-+ GstGLContextEGL *context = GST_GL_CONTEXT_EGL(mem->mem.mem.context);
-+ context->eglDestroyImage (context->egl_display, mem->image);
-+ }
-+
-+ GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class)->destroy ((GstGLBaseMemory
-+ *) mem);
-+}
-+
-+static void
-+_gl_mem_init (GstGLMemoryEGL * mem, GstAllocator * allocator,
-+ GstMemory * parent, GstGLContext * context, GstGLTextureTarget target,
-+ GstAllocationParams * params, GstVideoInfo * info,
-+ guint plane, GstVideoAlignment * valign, gpointer user_data,
-+ GDestroyNotify notify)
-+{
-+ gst_gl_memory_init ((GstGLMemory *) mem, allocator, parent,
-+ context, target, params, info, plane, valign, user_data, notify);
-+}
-+
-+static GstGLMemoryEGL *
-+_gl_mem_egl_alloc (GstGLBaseMemoryAllocator * allocator,
-+ GstGLVideoAllocationParams * params)
-+{
-+ guint alloc_flags = params->parent.alloc_flags;
-+ GstGLMemoryEGL *mem;
-+
-+ g_return_val_if_fail (alloc_flags & GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO,
-+ NULL);
-+ g_return_val_if_fail ((alloc_flags &
-+ GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE) == 0, NULL);
-+ g_return_val_if_fail ((alloc_flags &
-+ GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM) == 0, NULL);
-+
-+ mem = g_new0 (GstGLMemoryEGL, 1);
-+ mem->image = EGL_NO_IMAGE_KHR;
-+
-+ _gl_mem_init (mem, GST_ALLOCATOR_CAST (allocator), NULL,
-+ params->parent.context, params->target, params->parent.alloc_params,
-+ params->v_info, params->plane, params->valign, params->parent.user_data,
-+ params->parent.notify);
-+
-+ return mem;
-+}
-+
-+static gboolean
-+_gl_mem_create (GstGLMemoryEGL * gl_mem, GError ** error)
-+{
-+ GstGLContextEGL *context = GST_GL_CONTEXT_EGL (gl_mem->mem.mem.context);
-+ GstGLBaseMemoryAllocatorClass *alloc_class;
-+
-+ if (!gst_gl_context_check_feature (GST_GL_CONTEXT (context),
-+ "EGL_KHR_image_base")) {
-+ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
-+ "EGL_KHR_image_base is not supported");
-+ return FALSE;
-+ }
-+
-+ alloc_class = GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class);
-+ if (!alloc_class->create ((GstGLBaseMemory *) gl_mem, error))
-+ return FALSE;
-+
-+ gl_mem->image = context->eglCreateImage (context->egl_display,
-+ context->egl_context, EGL_GL_TEXTURE_2D_KHR,
-+ (EGLClientBuffer) GSIZE_TO_POINTER (gl_mem->mem.tex_id), NULL);
-+
-+ GST_TRACE ("Generating EGLImage handle:%p from a texture:%u",
-+ gl_mem->image, gl_mem->mem.tex_id);
-+
-+ if (eglGetError () != EGL_SUCCESS) {
-+ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
-+ "Failed to create EGLImage");
-+ return FALSE;
-+ }
-+
-+ return TRUE;
-+}
-+
-+static GstMemory *
-+_gl_mem_copy (GstGLMemoryEGL * src, gssize offset, gssize size)
-+{
-+ GST_CAT_ERROR (GST_CAT_GL_MEMORY, "GstGLMemoryEGL does not support copy");
-+ return NULL;
-+}
-+
-+static void
-+gst_gl_memory_egl_allocator_class_init (GstGLMemoryEGLAllocatorClass * klass)
-+{
-+ GstGLBaseMemoryAllocatorClass *gl_base;
-+ GstGLMemoryAllocatorClass *gl_tex;
-+ GstAllocatorClass *allocator_class;
-+
-+ gl_tex = (GstGLMemoryAllocatorClass *) klass;
-+ gl_base = (GstGLBaseMemoryAllocatorClass *) klass;
-+ allocator_class = (GstAllocatorClass *) klass;
-+
-+ gl_base->alloc = (GstGLBaseMemoryAllocatorAllocFunction) _gl_mem_egl_alloc;
-+ gl_base->create = (GstGLBaseMemoryAllocatorCreateFunction) _gl_mem_create;
-+ gl_base->destroy = (GstGLBaseMemoryAllocatorDestroyFunction) _gl_mem_destroy;
-+ gl_tex->copy = (GstGLBaseMemoryAllocatorCopyFunction) _gl_mem_copy;
-+
-+ allocator_class->alloc = _gl_mem_alloc;
-+}
-+
-+static void
-+gst_gl_memory_egl_allocator_init (GstGLMemoryEGLAllocator * allocator)
-+{
-+ GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
-+
-+ alloc->mem_type = GST_GL_MEMORY_EGL_ALLOCATOR_NAME;
-+
-+ GST_OBJECT_FLAG_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
-+}
-+
-+/**
-+ * gst_gl_memory_egl_init_once:
-+ *
-+ * Initializes the GL Memory allocator. It is safe to call this function
-+ * multiple times. This must be called before any other GstGLMemoryEGL operation.
-+ */
-+void
-+gst_gl_memory_egl_init_once (void)
-+{
-+ static volatile gsize _init = 0;
-+
-+ if (g_once_init_enter (&_init)) {
-+ gst_gl_memory_init_once ();
-+
-+ GST_DEBUG_CATEGORY_INIT (GST_CAT_GL_MEMORY, "glmemory", 0,
-+ "OpenGL Texture with EGLImage memory");
-+
-+ _gl_memory_egl_allocator = g_object_new (GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, NULL);
-+
-+ gst_allocator_register (GST_GL_MEMORY_EGL_ALLOCATOR_NAME,
-+ gst_object_ref (_gl_memory_egl_allocator));
-+ g_once_init_leave (&_init, 1);
-+ }
-+}
-diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.h b/gst-libs/gst/gl/egl/gstglmemoryegl.h
-new file mode 100644
-index 0000000..7256d33
---- /dev/null
-+++ b/gst-libs/gst/gl/egl/gstglmemoryegl.h
-@@ -0,0 +1,108 @@
-+/*
-+ * GStreamer
-+ * Copyright (C) 2012 Collabora Ltd.
-+ * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
-+ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library 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
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifndef _GST_GL_MEMORY_EGL_H_
-+#define _GST_GL_MEMORY_EGL_H_
-+
-+#include <gst/gst.h>
-+#include <gst/gstallocator.h>
-+#include <gst/gstmemory.h>
-+#include <gst/video/video.h>
-+
-+#include <gst/gl/gl.h>
-+#include "gstglcontext_egl.h"
-+
-+#include <gst/gl/gstglmemory.h>
-+
-+G_BEGIN_DECLS
-+
-+#define GST_TYPE_GL_MEMORY_EGL_ALLOCATOR (gst_gl_memory_egl_allocator_get_type())
-+GType gst_gl_memory_egl_allocator_get_type(void);
-+
-+#define GST_IS_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
-+#define GST_IS_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocatorClass))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocator))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLAllocatorClass))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_CAST(obj) ((GstGLMemoryEGLAllocator *)(obj))
-+
-+typedef void (*GstEGLImageDestroyNotify) (GstGLContextEGL * context,
-+ gpointer data);
-+
-+typedef struct _GstEGLImageMemory GstEGLImageMemory;
-+
-+
-+/**
-+ * GstGLMemoryEGL:
-+ *
-+ * Private instance
-+ */
-+struct _GstGLMemoryEGL
-+{
-+ GstGLMemory mem;
-+
-+ EGLImageKHR image;
-+ GstVideoGLTextureOrientation orientation;
-+};
-+
-+/**
-+ * GST_GL_MEMORY_EGL_ALLOCATOR:
-+ *
-+ * The name of the GL Memory EGL allocator
-+ */
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_NAME "GLMemoryEGL"
-+
-+void gst_gl_memory_egl_init_once (void);
-+gboolean gst_is_gl_memory_egl (GstMemory * mem);
-+
-+EGLImageKHR gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem);
-+EGLDisplay gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem);
-+
-+GstVideoGLTextureOrientation gst_gl_memory_egl_get_orientation
-+ (GstGLMemoryEGL * mem);
-+
-+void gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
-+ GstVideoGLTextureOrientation orientation);
-+
-+/**
-+ * GstGLAllocator
-+ *
-+ * Opaque #GstGLAllocator struct
-+ */
-+struct _GstGLMemoryEGLAllocator
-+{
-+ GstGLMemoryAllocator parent;
-+};
-+
-+/**
-+ * GstGLAllocatorClass:
-+ *
-+ * The #GstGLAllocatorClass only contains private data
-+ */
-+struct _GstGLMemoryEGLAllocatorClass
-+{
-+ GstGLMemoryAllocatorClass parent_class;
-+};
-+
-+G_END_DECLS
-+
-+#endif /* _GST_GL_MEMORY_EGL_H_ */
-diff --git a/gst-libs/gst/gl/gstgl_fwd.h b/gst-libs/gst/gl/gstgl_fwd.h
-index fb64ff6..73e17bd 100644
---- a/gst-libs/gst/gl/gstgl_fwd.h
-+++ b/gst-libs/gst/gl/gstgl_fwd.h
-@@ -55,6 +55,10 @@ typedef struct _GstGLMemoryPBO GstGLMemoryPBO;
- typedef struct _GstGLMemoryPBOAllocator GstGLMemoryPBOAllocator;
- typedef struct _GstGLMemoryPBOAllocatorClass GstGLMemoryPBOAllocatorClass;
-
-+typedef struct _GstGLMemoryEGL GstGLMemoryEGL;
-+typedef struct _GstGLMemoryEGLAllocator GstGLMemoryEGLAllocator;
-+typedef struct _GstGLMemoryEGLAllocatorClass GstGLMemoryEGLAllocatorClass;
-+
- typedef struct _GstGLSLStage GstGLSLStage;
- typedef struct _GstGLSLStagePrivate GstGLSLStagePrivate;
- typedef struct _GstGLSLStageClass GstGLSLStageClass;
-diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
-index 60dec6a..34770d0 100644
---- a/gst-libs/gst/gl/gstgldisplay.c
-+++ b/gst-libs/gst/gl/gstgldisplay.c
-@@ -68,6 +68,7 @@
- #if GST_GL_HAVE_PLATFORM_EGL
- #include <gst/gl/egl/gstgldisplay_egl.h>
- #include <gst/gl/egl/gsteglimagememory.h>
-+#include <gst/gl/egl/gstglmemoryegl.h>
- #endif
-
- GST_DEBUG_CATEGORY_STATIC (gst_context);
-@@ -144,6 +145,7 @@ gst_gl_display_init (GstGLDisplay * display)
-
- #if GST_GL_HAVE_PLATFORM_EGL
- gst_egl_image_memory_init ();
-+ gst_gl_memory_egl_init_once ();
- #endif
- }
-
-diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
-index 16ed5ea..73a9029 100644
---- a/gst-libs/gst/gl/gstglupload.c
-+++ b/gst-libs/gst/gl/gstglupload.c
-@@ -29,6 +29,7 @@
-
- #if GST_GL_HAVE_PLATFORM_EGL
- #include "egl/gsteglimagememory.h"
-+#include "egl/gstglmemoryegl.h"
- #endif
-
- #if GST_GL_HAVE_DMABUF
-@@ -301,6 +302,13 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
- context));
- gst_query_add_allocation_param (query, allocator, &params);
- gst_object_unref (allocator);
-+
-+#if GST_GL_HAVE_PLATFORM_EGL
-+ allocator =
-+ GST_ALLOCATOR (gst_allocator_find (GST_GL_MEMORY_EGL_ALLOCATOR_NAME));
-+ gst_query_add_allocation_param (query, allocator, &params);
-+ gst_object_unref (allocator);
-+#endif
- }
-
- n_pools = gst_query_get_n_allocation_pools (query);
---
-2.5.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
index 357fd78002..32261279a5 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
@@ -16,7 +16,7 @@ diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
index b93255f..49f145a 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
-@@ -93,7 +93,7 @@
+@@ -97,7 +97,7 @@
#include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <sys/ioctl.h>
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
index d52afd5d57..25861b6b9d 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
@@ -18,11 +18,11 @@ Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
configure.ac | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 0e95c5c..12153b4 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1901,6 +1901,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [
+Index: gst-plugins-bad-1.12.3/configure.ac
+===================================================================
+--- gst-plugins-bad-1.12.3.orig/configure.ac
++++ gst-plugins-bad-1.12.3/configure.ac
+@@ -1202,6 +1202,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chrom
])
dnl *** Curl ***
@@ -37,8 +37,8 @@ index 0e95c5c..12153b4 100644
+
translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
- PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [
-@@ -1915,12 +1924,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
+ PKG_CHECK_MODULES(CURL, libcurl >= 7.35.0, [
+@@ -1224,12 +1233,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin]
])
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
@@ -59,6 +59,3 @@ index 0e95c5c..12153b4 100644
AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes")
AC_SUBST(SSH2_CFLAGS)
AC_SUBST(SSH2_LIBS)
---
-1.7.9.5
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
index 369ff93ac1..2d5389d953 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -23,43 +23,45 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
sys/decklink/gstdecklinkvideosink.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
-diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
-index 64637f1..bac956f 100644
---- a/sys/decklink/gstdecklink.cpp
-+++ b/sys/decklink/gstdecklink.cpp
-@@ -324,22 +324,22 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f)
- "height", G_TYPE_INT, mode->height,
+Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
+===================================================================
+--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklink.cpp
++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
+@@ -617,7 +617,7 @@ gst_decklink_mode_get_structure (GstDeck
"pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
- "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive",
+ "interlace-mode", G_TYPE_STRING,
+ mode->interlaced ? "interleaved" : "progressive",
- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
-+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *) NULL);
++ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL);
- switch (f) {
- case bmdFormat8BitYUV: /* '2vuy' */
+ if (input && mode->interlaced) {
+ if (mode->tff)
+@@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDeck
+ case bmdFormat8BitYUV: /* '2vuy' */
gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
"colorimetry", G_TYPE_STRING, mode->colorimetry,
- "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
-+ "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL);
++ "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL);
break;
- case bmdFormat10BitYUV: /* 'v210' */
+ case bmdFormat10BitYUV: /* 'v210' */
- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL);
-+ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *) NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void*)NULL);
break;
- case bmdFormat8BitARGB: /* 'ARGB' */
+ case bmdFormat8BitARGB: /* 'ARGB' */
- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL);
-+ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *) NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void*)NULL);
break;
- case bmdFormat8BitBGRA: /* 'BGRA' */
+ case bmdFormat8BitBGRA: /* 'BGRA' */
- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL);
-+ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *) NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void*)NULL);
break;
- case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
- case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
-diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
-index 9a701ee..26fb7ec 100644
---- a/sys/decklink/gstdecklinkaudiosrc.cpp
-+++ b/sys/decklink/gstdecklinkaudiosrc.cpp
-@@ -312,7 +312,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
+ case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
+ case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
+Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
+===================================================================
+--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkaudiosrc.cpp
++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
+@@ -387,7 +387,7 @@ gst_decklink_audio_src_set_caps (GstBase
g_mutex_unlock (&self->input->lock);
if (videosrc) {
@@ -68,11 +70,11 @@ index 9a701ee..26fb7ec 100644
gst_object_unref (videosrc);
switch (vconn) {
-diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
-index eebeff3..da6e486 100644
---- a/sys/decklink/gstdecklinkvideosink.cpp
-+++ b/sys/decklink/gstdecklinkvideosink.cpp
-@@ -158,7 +158,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure,
+Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp
+===================================================================
+--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkvideosink.cpp
++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp
+@@ -285,7 +285,7 @@ reset_framerate (GstCapsFeatures * featu
gpointer user_data)
{
gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
@@ -81,6 +83,3 @@ index eebeff3..da6e486 100644
return TRUE;
}
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
index 5ce57714e7..73681f1002 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
@@ -14,7 +14,7 @@ diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparser
index fd16ee0..ddb890c 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
-@@ -1729,7 +1729,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size,
+@@ -1730,7 +1730,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size,
GstVC1SeqLayer * seqlayer)
{
guint32 tmp;
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb
new file mode 100644
index 0000000000..ed3efab29f
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb
@@ -0,0 +1,145 @@
+require gstreamer1.0-plugins.inc
+
+SRC_URI = " \
+ https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
+ file://configure-allow-to-disable-libssh2.patch \
+ file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
+ file://avoid-including-sys-poll.h-directly.patch \
+ file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+"
+SRC_URI[md5sum] = "24d4d30ecc67d5cbc77c0475bcea1210"
+SRC_URI[sha256sum] = "56481c95339b8985af13bac19b18bc8da7118c2a7d9440ed70e7dcd799c2adb5"
+
+S = "${WORKDIR}/gst-plugins-bad-${PV}"
+
+LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
+ file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 "
+
+DEPENDS += "gstreamer1.0-plugins-base"
+
+inherit gettext gobject-introspection
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
+ bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile ttml uvch264 webp \
+"
+
+# the gl packageconfig enables OpenGL elements that haven't been ported
+# to -base yet. They depend on the gstgl library in -base, so we do
+# not add GL dependencies here, since these are taken care of in -base.
+
+PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass"
+PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,bluez5"
+PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
+PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2"
+PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394"
+PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb"
+PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl"
+PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac"
+PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2"
+PACKAGECONFIG[flite] = "--enable-flite,--disable-flite,flite-alsa"
+PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
+PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=nettle,--disable-hls,nettle"
+PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,"
+PACKAGECONFIG[kms] = "--enable-kms,--disable-kms,libdrm"
+PACKAGECONFIG[libde265] = "--enable-libde265,--disable-libde265,libde265"
+PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms"
+PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
+PACKAGECONFIG[lcms2] = "--enable-lcms2,--disable-lcms2,lcms"
+PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug"
+PACKAGECONFIG[msdk] = "--enable-msdk,--disable-msdk,intel-mediasdk"
+PACKAGECONFIG[neon] = "--enable-neon,--disable-neon,neon"
+PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft"
+PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv"
+PACKAGECONFIG[openh264] = "--enable-openh264,--disable-openh264,openh264"
+PACKAGECONFIG[openjpeg] = "--enable-openjpeg,--disable-openjpeg,openjpeg"
+PACKAGECONFIG[openmpt] = "--enable-openmpt,--disable-openmpt,libopenmpt"
+# the opus encoder/decoder elements are now in the -base package,
+# but the opus parser remains in -bad
+PACKAGECONFIG[opusparse] = "--enable-opus,--disable-opus,libopus"
+PACKAGECONFIG[resindvd] = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav"
+PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg"
+PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
+PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc"
+PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,usrsctp"
+PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
+PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1"
+PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp"
+PACKAGECONFIG[tinyalsa] = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa"
+PACKAGECONFIG[ttml] = "--enable-ttml,--disable-ttml,libxml2 pango cairo"
+PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
+PACKAGECONFIG[voaacenc] = "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
+PACKAGECONFIG[voamrwbenc] = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
+PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,vulkan-loader"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
+PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
+PACKAGECONFIG[webrtc] = "--enable-webrtc,--disable-webrtc,libnice"
+PACKAGECONFIG[webrtcdsp] = "--enable-webrtcdsp,--disable-webrtcdsp,webrtc-audio-processing"
+PACKAGECONFIG[zbar] = "--enable-zbar,--disable-zbar,zbar"
+
+# these plugins have no corresponding library in OE-core or meta-openembedded:
+# openni2 winks direct3d directsound winscreencap apple_media iqa
+# android_media avc bs2b chromaprint dts fdkaac gme gsm kate ladspa
+# lv2 mpeg2enc mplex musepack nvenc ofa opensles soundtouch
+# spandsp teletextdec vdpau wasapi wpe x265
+
+EXTRA_OECONF += " \
+ --enable-decklink \
+ --enable-dvb \
+ --enable-fbdev \
+ --enable-ipcpipeline \
+ --enable-netsim \
+ --enable-shm \
+ --disable-android_media \
+ --disable-aom \
+ --disable-apple_media \
+ --disable-avc \
+ --disable-bs2b \
+ --disable-chromaprint \
+ --disable-direct3d \
+ --disable-directsound \
+ --disable-dts \
+ --disable-fdk_aac \
+ --disable-gme \
+ --disable-gsm \
+ --disable-iqa \
+ --disable-kate \
+ --disable-ladspa \
+ --disable-lv2 \
+ --disable-mpeg2enc \
+ --disable-mplex \
+ --disable-musepack \
+ --disable-nvenc \
+ --disable-ofa \
+ --disable-openexr \
+ --disable-openni2 \
+ --disable-opensles \
+ --disable-soundtouch \
+ --disable-spandsp \
+ --disable-srt \
+ --disable-teletextdec \
+ --disable-vdpau \
+ --disable-wasapi \
+ --disable-wildmidi \
+ --disable-winks \
+ --disable-winscreencap \
+ --disable-wpe \
+ --disable-x265 \
+ ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \
+"
+
+export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs"
+FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*"
+FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
deleted file mode 100644
index 108f4db10e..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-include gstreamer1.0-plugins-bad.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
- file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
- file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \
- file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
- file://configure-allow-to-disable-libssh2.patch \
- file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
- file://avoid-including-sys-poll.h-directly.patch \
- file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
- file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
- file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
- file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
- file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
- file://0005-glshader-add-glBindFragDataLocation.patch \
- file://0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch \
- file://0008-gl-implement-GstGLMemoryEGL.patch \
- file://0009-glimagesink-Downrank-to-marginal.patch \
-"
-SRC_URI[md5sum] = "955281a43e98c5464563fa049e0a0911"
-SRC_URI[sha256sum] = "7899fcb18e6a1af2888b19c90213af018a57d741c6e72ec56b133bc73ec8509b"
-
-S = "${WORKDIR}/gst-plugins-bad-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
deleted file mode 100644
index 1370380b94..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-plugins-bad.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
- file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
- file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \
- file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-bad;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
- file://configure-allow-to-disable-libssh2.patch \
- file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
- file://avoid-including-sys-poll.h-directly.patch \
- file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
- file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "5e73b5a4843d9675246f4efec158624475ed9586"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
-
-# In 1.6.2, the "--enable-hls" configure option generated an installable package
-# called "gstreamer1.0-plugins-bad-fragmented". In 1.7.1 that HLS plugin package
-# has become "gstreamer1.0-plugins-bad-hls". See:
-# http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=efe62292a3d045126654d93239fdf4cc8e48ae08
-
-PACKAGESPLITFUNCS_append = " handle_hls_rename "
-
-python handle_hls_rename () {
- d.setVar('RPROVIDES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
- d.setVar('RREPLACES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
- d.setVar('RCONFLICTS_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
-}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
deleted file mode 100644
index a04f155dc4..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-require gstreamer1.0-plugins.inc
-
-SRC_URI_append = "\
- file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \
- file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch \
- file://0003-riff-add-missing-include-directories-when-calling-in.patch \
- file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
-"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-
-DEPENDS += "iso-codes util-linux zlib"
-
-inherit gettext
-
-PACKAGES_DYNAMIC =+ "^libgst.*"
-
-PACKAGECONFIG ??= " \
- ${GSTREAMER_ORC} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
- gio-unix-2.0 ivorbis ogg pango theora vorbis \
-"
-
-X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
-X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm"
-X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
-
-PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
-PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
-PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
-PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor"
-PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg"
-PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus"
-PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
-PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora"
-PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual"
-PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis"
-PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
-
-EXTRA_OECONF += " \
- --enable-zlib \
-"
-
-CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
-
-FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
-
-do_compile_prepend() {
- export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs"
-}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
deleted file mode 100644
index 094bdac846..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
+++ /dev/null
@@ -1,168 +0,0 @@
-From f1d9652351e7754c63003104eceb526af424c7e0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 20 Nov 2015 16:53:04 +0200
-Subject: [PATCH 1/4] Makefile.am: don't hardcode libtool name when running
- introspection tools
-
-Upstream-Status: Pending [review on oe-core maillist]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- gst-libs/gst/allocators/Makefile.am | 2 +-
- gst-libs/gst/app/Makefile.am | 2 +-
- gst-libs/gst/audio/Makefile.am | 2 +-
- gst-libs/gst/fft/Makefile.am | 2 +-
- gst-libs/gst/pbutils/Makefile.am | 2 +-
- gst-libs/gst/riff/Makefile.am | 2 +-
- gst-libs/gst/rtp/Makefile.am | 2 +-
- gst-libs/gst/rtsp/Makefile.am | 2 +-
- gst-libs/gst/sdp/Makefile.am | 2 +-
- gst-libs/gst/tag/Makefile.am | 2 +-
- gst-libs/gst/video/Makefile.am | 2 +-
- 11 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
-index 9361bf9..bc7f53a 100644
---- a/gst-libs/gst/allocators/Makefile.am
-+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -38,7 +38,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
- --library=libgstallocators-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg-export gstreamer-allocators-@GST_API_VERSION@ \
- --output $@ \
-diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
-index 6d6de8d..dcc2fe0 100644
---- a/gst-libs/gst/app/Makefile.am
-+++ b/gst-libs/gst/app/Makefile.am
-@@ -53,7 +53,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
- --library=libgstapp-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
- --include=GstBase-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-base-@GST_API_VERSION@ \
- --pkg-export gstreamer-app-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
-index 275d222..2374196 100644
---- a/gst-libs/gst/audio/Makefile.am
-+++ b/gst-libs/gst/audio/Makefile.am
-@@ -116,7 +116,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
- --include=Gst-@GST_API_VERSION@ \
- --include=GstBase-@GST_API_VERSION@ \
- --include=GstTag-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-base-@GST_API_VERSION@ \
- --pkg-export gstreamer-audio-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
-index 09b3d68..f545354 100644
---- a/gst-libs/gst/fft/Makefile.am
-+++ b/gst-libs/gst/fft/Makefile.am
-@@ -65,7 +65,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
- --library=libgstfft-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg-export gstreamer-fft-@GST_API_VERSION@ \
- --output $@ \
-diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
-index 64d5eb0..91dc214 100644
---- a/gst-libs/gst/pbutils/Makefile.am
-+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -99,7 +99,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
- --include=GstTag-@GST_API_VERSION@ \
- --include=GstVideo-@GST_API_VERSION@ \
- --include=GstAudio-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-tag-@GST_API_VERSION@ \
- --pkg gstreamer-video-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
-index 83d83cb..3bd8fc0 100644
---- a/gst-libs/gst/riff/Makefile.am
-+++ b/gst-libs/gst/riff/Makefile.am
-@@ -47,7 +47,7 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
- # --include=GstAudio-@GST_API_VERSION@ \
- # --include=GstTag-@GST_API_VERSION@ \
- # --include=Gst-@GST_API_VERSION@ \
--# --libtool="$(top_builddir)/libtool" \
-+# --libtool="$(LIBTOOL)" \
- # --pkg gstreamer-@GST_API_VERSION@ \
- # --pkg gstreamer-tag-@GST_API_VERSION@ \
- # --pkg gstreamer-audio-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
-index fdd01c1..f5445c1 100644
---- a/gst-libs/gst/rtp/Makefile.am
-+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -65,7 +65,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
- --library=libgstrtp-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
- --include=GstBase-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-base-@GST_API_VERSION@ \
- --pkg-export gstreamer-rtp-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
-index ede5706..9b0b258 100644
---- a/gst-libs/gst/rtsp/Makefile.am
-+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -72,7 +72,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
- --include=Gio-2.0 \
- --include=Gst-@GST_API_VERSION@ \
- --include=GstSdp-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gio-2.0 \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-sdp-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
-index a90f30b..0e149b8 100644
---- a/gst-libs/gst/sdp/Makefile.am
-+++ b/gst-libs/gst/sdp/Makefile.am
-@@ -32,7 +32,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
- --library=libgstsdp-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg-export gstreamer-sdp-@GST_API_VERSION@ \
- --output $@ \
-diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
-index c534a4d..cafafd3 100644
---- a/gst-libs/gst/tag/Makefile.am
-+++ b/gst-libs/gst/tag/Makefile.am
-@@ -45,7 +45,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
- --library=libgsttag-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
- --include=GstBase-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-base-@GST_API_VERSION@ \
- --pkg-export gstreamer-tag-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
-index 5d31fa1..ac64eb3 100644
---- a/gst-libs/gst/video/Makefile.am
-+++ b/gst-libs/gst/video/Makefile.am
-@@ -116,7 +116,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
- --library=libgstvideo-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
- --include=GstBase-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-base-@GST_API_VERSION@ \
- --pkg-export gstreamer-video-@GST_API_VERSION@ \
---
-2.6.2
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
new file mode 100644
index 0000000000..251dc172cb
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
@@ -0,0 +1,29 @@
+From 61a672e79c8cb1aeeeda4c968997c577ac73a8f3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 12 May 2017 16:47:12 +0300
+Subject: [PATCH] gstreamer-gl.pc.in: don't append GL_CFLAGS to CFLAGS
+
+Dependencies' include directories should not be added in this way;
+it causes problems when cross-compiling in sysroot environments.
+
+Upstream-Status: Pending
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ pkgconfig/gstreamer-gl.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in
+index dc672a9..8c290ba 100644
+--- a/pkgconfig/gstreamer-gl.pc.in
++++ b/pkgconfig/gstreamer-gl.pc.in
+@@ -13,4 +13,4 @@ Version: @VERSION@
+ Requires: gstreamer-video-@GST_API_VERSION@ gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
+
+ Libs: -L${libdir} -lgstgl-@GST_API_VERSION@
+-Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include @GL_CFLAGS@
++Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include
+--
+2.7.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
index 0a8bc9b076..08cbfb7c2a 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
@@ -1,16 +1,18 @@
-From 990b653c7b6de1937ec759019982d6c5f15770f7 Mon Sep 17 00:00:00 2001
+From 9601fc0cd6751a1affdc8717217b95931db31d7f Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 26 Oct 2015 16:38:18 +0200
-Subject: [PATCH 2/4] Makefile.am: prefix calls to pkg-config with
+Date: Thu, 5 Apr 2018 10:26:25 +0800
+Subject: [PATCH] Makefile.am: prefix calls to pkg-config with
PKG_CONFIG_SYSROOT_DIR
Upstream-Status: Pending [review on oe-core maillist]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
---
gst-libs/gst/allocators/Makefile.am | 4 ++--
gst-libs/gst/app/Makefile.am | 4 ++--
gst-libs/gst/audio/Makefile.am | 12 ++++++------
- gst-libs/gst/fft/Makefile.am | 4 ++--
+ gst-libs/gst/gl/Makefile.am | 8 ++++----
gst-libs/gst/pbutils/Makefile.am | 12 ++++++------
gst-libs/gst/riff/Makefile.am | 8 ++++----
gst-libs/gst/rtp/Makefile.am | 8 ++++----
@@ -18,13 +20,13 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
gst-libs/gst/sdp/Makefile.am | 4 ++--
gst-libs/gst/tag/Makefile.am | 8 ++++----
gst-libs/gst/video/Makefile.am | 8 ++++----
- 11 files changed, 38 insertions(+), 38 deletions(-)
+ 11 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
-index bc7f53a..0ef5f86 100644
+index 1ecc950..d6417ac 100644
--- a/gst-libs/gst/allocators/Makefile.am
+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -35,7 +35,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+@@ -39,7 +39,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
--c-include "gst/allocators/allocators.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -32,8 +34,8 @@ index bc7f53a..0ef5f86 100644
+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--library=libgstallocators-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
- --libtool="$(LIBTOOL)" \
-@@ -59,7 +59,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ --libtool="${LIBTOOL}" \
+@@ -63,7 +63,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -43,10 +45,10 @@ index bc7f53a..0ef5f86 100644
CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
-index dcc2fe0..dc076cb 100644
+index 5bfd606..6441674 100644
--- a/gst-libs/gst/app/Makefile.am
+++ b/gst-libs/gst/app/Makefile.am
-@@ -48,8 +48,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+@@ -51,8 +51,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
--c-include "gst/app/app.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -58,10 +60,10 @@ index dcc2fe0..dc076cb 100644
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
-index 2374196..295eb42 100644
+index 7fb65f2..5379f79 100644
--- a/gst-libs/gst/audio/Makefile.am
+++ b/gst-libs/gst/audio/Makefile.am
-@@ -106,12 +106,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+@@ -176,12 +176,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
--c-include "gst/audio/audio.h" \
@@ -78,7 +80,7 @@ index 2374196..295eb42 100644
--library-path="$(top_builddir)/gst-libs/gst/tag/" \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -140,8 +140,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -210,8 +210,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
--includedir=$(srcdir) \
--includedir=$(builddir) \
--includedir="$(top_builddir)/gst-libs/gst/tag/" \
@@ -89,33 +91,38 @@ index 2374196..295eb42 100644
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
-index f545354..1bb6243 100644
---- a/gst-libs/gst/fft/Makefile.am
-+++ b/gst-libs/gst/fft/Makefile.am
-@@ -62,7 +62,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
- --c-include "gst/fft/fft.h" \
- -I$(top_srcdir)/gst-libs \
- -I$(top_builddir)/gst-libs \
+diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
+index 3276d7f..0cdfe26 100644
+--- a/gst-libs/gst/gl/Makefile.am
++++ b/gst-libs/gst/gl/Makefile.am
+@@ -209,9 +209,9 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
+ $(GST_PLUGINS_BASE_CFLAGS) \
+ $(GL_CFLAGS) \
+ --add-include-path="$(top_builddir)/gst-libs/gst/video/" \
- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --library-path="$(top_builddir)/gst-libs/gst/video/" \
+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
- --library=libgstfft-@GST_API_VERSION@.la \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --library=libgstgl-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
- --libtool="$(LIBTOOL)" \
-@@ -86,7 +86,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
- $(INTROSPECTION_COMPILER) \
+ --include=GstBase-@GST_API_VERSION@ \
+@@ -241,8 +241,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
--includedir=$(srcdir) \
--includedir=$(builddir) \
+ --includedir="$(top_builddir)/gst-libs/gst/video/" \
- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
- CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
-index 91dc214..dc8e1d3 100644
+index 35a6e44..49d6894 100644
--- a/gst-libs/gst/pbutils/Makefile.am
+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -84,14 +84,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+@@ -88,14 +88,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
--c-include "gst/pbutils/pbutils.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -134,7 +141,7 @@ index 91dc214..dc8e1d3 100644
--library-path="$(top_builddir)/gst-libs/gst/tag/" \
--library-path="$(top_builddir)/gst-libs/gst/video/" \
--library-path="$(top_builddir)/gst-libs/gst/audio/" \
-@@ -124,8 +124,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -128,8 +128,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -146,10 +153,10 @@ index 91dc214..dc8e1d3 100644
--includedir="$(top_builddir)/gst-libs/gst/video/" \
--includedir="$(top_builddir)/gst-libs/gst/audio/" \
diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
-index 3bd8fc0..0a115cc 100644
+index e66ef4f..c8c588a 100644
--- a/gst-libs/gst/riff/Makefile.am
+++ b/gst-libs/gst/riff/Makefile.am
-@@ -41,8 +41,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+@@ -43,8 +43,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
# --c-include "gst/riff/riff.h" \
# --add-include-path=$(builddir)/../tag \
# --add-include-path=$(builddir)/../audio \
@@ -160,7 +167,7 @@ index 3bd8fc0..0a115cc 100644
# --library=libgstriff-@GST_API_VERSION@.la \
# --include=GstAudio-@GST_API_VERSION@ \
# --include=GstTag-@GST_API_VERSION@ \
-@@ -73,8 +73,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+@@ -75,8 +75,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
# --includedir=$(builddir) \
# --includedir=$(builddir)/../tag \
# --includedir=$(builddir)/../audio \
@@ -172,10 +179,10 @@ index 3bd8fc0..0a115cc 100644
#
#CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
-index f5445c1..527c0b4 100644
+index 77ebeeb..9aee788 100644
--- a/gst-libs/gst/rtp/Makefile.am
+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -60,8 +60,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+@@ -66,8 +66,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
--c-include "gst/rtp/rtp.h" \
-I$(top_builddir)/gst-libs \
-I$(top_srcdir)/gst-libs \
@@ -186,7 +193,7 @@ index f5445c1..527c0b4 100644
--library=libgstrtp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -88,8 +88,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -94,8 +94,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -198,32 +205,25 @@ index f5445c1..527c0b4 100644
CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
-index 9b0b258..4f6d9f8 100644
+index db9d0fd..79027cb 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -67,7 +67,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+@@ -71,8 +71,8 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
-I$(top_builddir)/gst-libs \
-I$(top_srcdir)/gst-libs \
--add-include-path=$(builddir)/../sdp \
- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
--library=libgstrtsp-@GST_API_VERSION@.la \
--include=Gio-2.0 \
--include=Gst-@GST_API_VERSION@ \
-@@ -97,7 +97,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
- --includedir=$(srcdir) \
- --includedir=$(builddir) \
- --includedir=$(builddir)/../sdp \
-- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
-+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
- $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
-
- CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
-index 0e149b8..9aa0512 100644
+index 6e05cc7..c7cf514 100644
--- a/gst-libs/gst/sdp/Makefile.am
+++ b/gst-libs/gst/sdp/Makefile.am
-@@ -29,7 +29,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+@@ -31,7 +31,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
--warn-all \
--c-include "gst/sdp/sdp.h" \
-I$(top_srcdir)/gst-libs \
@@ -231,8 +231,8 @@ index 0e149b8..9aa0512 100644
+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--library=libgstsdp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
- --libtool="$(LIBTOOL)" \
-@@ -53,7 +53,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ --libtool="${LIBTOOL}" \
+@@ -55,7 +55,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -242,10 +242,10 @@ index 0e149b8..9aa0512 100644
CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
-index cafafd3..ba99279 100644
+index c86515b..363e6d2 100644
--- a/gst-libs/gst/tag/Makefile.am
+++ b/gst-libs/gst/tag/Makefile.am
-@@ -40,8 +40,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+@@ -61,8 +61,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
--c-include "gst/tag/tag.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -256,7 +256,7 @@ index cafafd3..ba99279 100644
--library=libgsttag-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -68,8 +68,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -89,8 +89,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -266,12 +266,12 @@ index cafafd3..ba99279 100644
+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
- CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
-index ac64eb3..342c8c6 100644
+index 0f8455f..8c9955c 100644
--- a/gst-libs/gst/video/Makefile.am
+++ b/gst-libs/gst/video/Makefile.am
-@@ -111,8 +111,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
+@@ -124,8 +124,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
--c-include "gst/video/video.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -282,7 +282,7 @@ index ac64eb3..342c8c6 100644
--library=libgstvideo-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -139,8 +139,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -152,8 +152,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -293,6 +293,3 @@ index ac64eb3..342c8c6 100644
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
---
-2.6.2
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
index 9b66f7f49d..98ffdb1c10 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
@@ -1,20 +1,21 @@
-From 3c2c2d5dd08aa30ed0e8acd8566ec99412bb8209 Mon Sep 17 00:00:00 2001
+From b9765efb1696e3e2e79f2955f759be199fe34882 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 26 Oct 2015 17:29:37 +0200
-Subject: [PATCH 3/4] riff: add missing include directories when calling
+Subject: [PATCH] riff: add missing include directories when calling
introspection scanner
Upstream-Status: Pending [review on oe-core maillist]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
gst-libs/gst/riff/Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
-index 0a115cc..5057a58 100644
+index c8c588a..c096453 100644
--- a/gst-libs/gst/riff/Makefile.am
+++ b/gst-libs/gst/riff/Makefile.am
-@@ -39,6 +39,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+@@ -41,6 +41,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
# --strip-prefix=Gst \
# --warn-all \
# --c-include "gst/riff/riff.h" \
@@ -23,6 +24,3 @@ index 0a115cc..5057a58 100644
# --add-include-path=$(builddir)/../tag \
# --add-include-path=$(builddir)/../audio \
# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
---
-2.6.2
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
index 9fbebd5700..9e95524057 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
@@ -1,7 +1,7 @@
-From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001
+From 918c96b24d10f61b7455b4cef3bab490849d0d77 Mon Sep 17 00:00:00 2001
From: Mingke Wang <mingke.wang@freescale.com>
Date: Thu, 19 Mar 2015 14:17:10 +0800
-Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing.
+Subject: [PATCH] ssaparse: enhance SSA text lines parsing.
some parser will pass in the original ssa text line which starts with "Dialog:"
and there's are maybe multiple Dialog lines in one input buffer.
@@ -10,13 +10,18 @@ Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496]
Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
+---
+ gst/subparse/gstssaparse.c | 150 ++++++++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 134 insertions(+), 16 deletions(-)
+ mode change 100644 => 100755 gst/subparse/gstssaparse.c
+
diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
old mode 100644
new mode 100755
-index 06ecef9..0ab5dce
+index c849c08..4b9636c
--- a/gst/subparse/gstssaparse.c
+++ b/gst/subparse/gstssaparse.c
-@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
+@@ -262,6 +262,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
* gst_ssa_parse_push_line:
* @parse: caller element
* @txt: text to push
@@ -24,7 +29,7 @@ index 06ecef9..0ab5dce
* @start: timestamp for the buffer
* @duration: duration for the buffer
*
-@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
+@@ -271,27 +272,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
* Returns: result of the push of the created buffer
*/
static GstFlowReturn
@@ -169,7 +174,7 @@ index 06ecef9..0ab5dce
GST_LOG_OBJECT (parse, "Text : %s", t);
if (gst_ssa_parse_remove_override_codes (parse, t)) {
-@@ -307,13 +414,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
+@@ -309,13 +416,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
gst_buffer_fill (buf, 0, escaped, len + 1);
gst_buffer_set_size (buf, len);
g_free (escaped);
@@ -196,7 +201,7 @@ index 06ecef9..0ab5dce
ret = gst_pad_push (parse->srcpad, buf);
-@@ -333,6 +449,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
+@@ -335,6 +451,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
GstClockTime ts;
gchar *txt;
GstMapInfo map;
@@ -204,7 +209,7 @@ index 06ecef9..0ab5dce
if (G_UNLIKELY (!parse->framed))
goto not_framed;
-@@ -350,13 +467,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
+@@ -352,13 +469,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
/* make double-sure it's 0-terminated and all */
gst_buffer_map (buf, &map, GST_MAP_READ);
txt = g_strndup ((gchar *) map.data, map.size);
@@ -220,6 +225,3 @@ index 06ecef9..0ab5dce
if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) {
GstSegment segment;
---
-1.7.9.5
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
index 4adf605460..97a0d68cfb 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
@@ -1,27 +1,25 @@
-From 4330915d88dc4dd46eb4c28d756482b767c2747f Mon Sep 17 00:00:00 2001
+From 53b5868491cf99ee797192395dbfeb69df23edd2 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 26 Oct 2015 17:30:14 +0200
-Subject: [PATCH 4/4] rtsp: drop incorrect reference to gstreamer-sdp in
+Subject: [PATCH] rtsp: drop incorrect reference to gstreamer-sdp in
Makefile.am
Upstream-Status: Pending [review on oe-core maillist]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
gst-libs/gst/rtsp/Makefile.am | 1 -
1 file changed, 1 deletion(-)
diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
-index 4f6d9f8..0afa370 100644
+index 79027cb..2987e23 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -75,7 +75,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
- --libtool="$(LIBTOOL)" \
+@@ -82,7 +82,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
--pkg gio-2.0 \
--pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-base-@GST_API_VERSION@ \
- --pkg gstreamer-sdp-@GST_API_VERSION@ \
--pkg-export gstreamer-rtsp-@GST_API_VERSION@ \
--add-init-section="$(INTROSPECTION_INIT)" \
--output $@ \
---
-2.6.2
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
deleted file mode 100644
index b924e38824..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From ed09c8fd2c9c2b5384b72cc70af3728be6694e64 Mon Sep 17 00:00:00 2001
-From: Mingke Wang <mingke.wang@freescale.com>
-Date: Thu, 19 Mar 2015 14:20:26 +0800
-Subject: [PATCH 4/4] subparse: set need_segment after sink pad received
- GST_EVENT_SEGMENT
-
-subparse works in push mode, chain funciton will be called once
-up stream element finished the seeking and flushing.
-if set need_segment flag in src pad event handler, the segment
-event will be pushed earlier, result in the subtitle text will
-be send out to down stream from the beginning.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498]
-
-Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
-
-diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c
-old mode 100644
-new mode 100755
-index b565e93..7741ccc
---- a/gst/subparse/gstsubparse.c
-+++ b/gst/subparse/gstsubparse.c
-@@ -266,22 +266,20 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
- goto beach;
- }
-
-+ /* Apply the seek to our segment */
-+ gst_segment_do_seek (&self->segment, rate, format, flags,
-+ start_type, start, stop_type, stop, &update);
-+
-+ GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT,
-+ &self->segment);
-+
- /* Convert that seek to a seeking in bytes at position 0,
- FIXME: could use an index */
- ret = gst_pad_push_event (self->sinkpad,
- gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
- GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0));
-
-- if (ret) {
-- /* Apply the seek to our segment */
-- gst_segment_do_seek (&self->segment, rate, format, flags,
-- start_type, start, stop_type, stop, &update);
--
-- GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT,
-- &self->segment);
--
-- self->need_segment = TRUE;
-- } else {
-+ if (!ret) {
- GST_WARNING_OBJECT (self, "seek to 0 bytes failed");
- }
-
-@@ -1641,8 +1639,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
- gst_event_parse_segment (event, &s);
- if (s->format == GST_FORMAT_TIME)
- gst_event_copy_segment (event, &self->segment);
-- GST_DEBUG_OBJECT (self, "newsegment (%s)",
-- gst_format_get_name (self->segment.format));
-+ GST_DEBUG_OBJECT (self, "newsegment (%s) %" GST_SEGMENT_FORMAT,
-+ gst_format_get_name (self->segment.format), &self->segment);
-+
-+ self->need_segment = TRUE;
-
- /* if not time format, we'll either start with a 0 timestamp anyway or
- * it's following a seek in which case we'll have saved the requested
---
-1.7.9.5
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch
new file mode 100644
index 0000000000..6e53d2e8b5
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch
@@ -0,0 +1,32 @@
+From bec38a0c2e2958927c42b2f9ae939969b7c4a326 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <crg7475@mailbox.org>
+Date: Tue, 21 May 2019 14:01:11 +0200
+Subject: [PATCH] viv-fb: Make sure config.h is included
+
+This prevents build errors due to missing GST_API_* symbols
+
+Upstream-Status: Pending
+
+Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
+---
+ gst-libs/gst/gl/gl-prelude.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h
+index 05e1f6229..96ce5e685 100644
+--- a/gst-libs/gst/gl/gl-prelude.h
++++ b/gst-libs/gst/gl/gl-prelude.h
+@@ -22,6 +22,10 @@
+ #ifndef __GST_GL_PRELUDE_H__
+ #define __GST_GL_PRELUDE_H__
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include <gst/gst.h>
+
+ #ifdef BUILDING_GST_GL
+--
+2.17.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch
index c81fb0f6aa..e8094f459e 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch
@@ -18,7 +18,7 @@ diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
index a4b2540..0ccaacd 100644
--- a/ext/gl/gstopengl.c
+++ b/ext/gl/gstopengl.c
-@@ -118,7 +118,7 @@ plugin_init (GstPlugin * plugin)
+@@ -127,7 +127,7 @@ plugin_init (GstPlugin * plugin)
#endif
if (!gst_element_register (plugin, "glimagesink",
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
deleted file mode 100644
index 5341e3cfc6..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001
-From: Song Bing <b06498@freescale.com>
-Date: Fri, 13 Mar 2015 18:04:31 +0800
-Subject: [PATCH] encodebin: Need more buffers in output queue for better
- performance
-
-Need more buffers in output queue for better performance
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=744191]
-
-Signed-off-by: Song Bing <b06498@freescale.com>
----
- gst/encoding/gstencodebin.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
-index 6728e58..32daae4 100644
---- a/gst/encoding/gstencodebin.c
-+++ b/gst/encoding/gstencodebin.c
-@@ -1228,8 +1228,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
- * We only use a 1buffer long queue here, the actual queueing will be done
- * in the input queue */
- last = sgroup->outqueue = gst_element_factory_make ("queue", NULL);
-- g_object_set (sgroup->outqueue, "max-size-buffers", (guint32) 1,
-- "max-size-bytes", (guint32) 0, "max-size-time", (guint64) 0,
-+ g_object_set (sgroup->outqueue, "max-size-time", (guint64) 0,
- "silent", TRUE, NULL);
-
- gst_bin_add (GST_BIN (ebin), sgroup->outqueue);
---
-1.7.9.5
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
index c8e6287a55..a4727e23ea 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
@@ -1,4 +1,4 @@
-From af0dac26f62aaceb4bf266720911953793e0fc5d Mon Sep 17 00:00:00 2001
+From 41de2ec64ab06bb58c82c1659adaa3811bc5bcf8 Mon Sep 17 00:00:00 2001
From: zhouming <b42586@freescale.com>
Date: Wed, 14 May 2014 10:16:20 +0800
Subject: [PATCH] ENGR00312515: get caps from src pad when query caps
@@ -8,18 +8,19 @@ https://bugzilla.gnome.org/show_bug.cgi?id=728312
Upstream-Status: Pending
Signed-off-by: zhouming <b42586@freescale.com>
+
---
- gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++
+ gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c
diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c
old mode 100644
new mode 100755
-index 9b6c478..ae2294a
+index 8a127c8..71c5d78
--- a/gst-libs/gst/tag/gsttagdemux.c
+++ b/gst-libs/gst/tag/gsttagdemux.c
-@@ -1769,6 +1769,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
+@@ -1759,6 +1759,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
}
break;
}
@@ -39,6 +40,3 @@ index 9b6c478..ae2294a
default:
res = gst_pad_query_default (pad, parent, query);
break;
---
-1.7.9.5
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/link-with-libvchostif.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/link-with-libvchostif.patch
new file mode 100644
index 0000000000..34f7c2284f
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/link-with-libvchostif.patch
@@ -0,0 +1,45 @@
+From 9866f51e5e0913f1e453eb574618bf7432f38cb6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 11 Apr 2018 10:46:33 +0800
+Subject: [PATCH] Add -lvchostif to link when using -lEGL on rpi
+
+This is required because libEGL from userland uses sybols
+from this library.
+
+lib/libEGL.so.1.0.0 121: 00000000 0 FUNC GLOBAL DEFAULT UND vc_dispmanx_element_add
+ 1552: 00000000 0 FUNC GLOBAL DEFAULT UND vc_dispmanx_element_add
+
+These symbols are provided by libvchostif as seen below
+
+lib/libvchostif.so
+ 252: 0000b161 192 FUNC GLOBAL DEFAULT 9 vc_dispmanx_element_add
+ 809: 0000b161 192 FUNC GLOBAL DEFAULT 9 vc_dispmanx_element_add
+
+With this explicit link, plugins fail during runtime
+
+(gst-plugin-scanner:571): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-1.0/libgstomx.so': Error relocating /usr/lib/libgstgl-1.0.so.0: vc_dispmanx_element_add: symbol not found
+(gst-plugin-scanner:571): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-1.0/libgstopengl.so': Error relocating /usr/lib/libgstgl-1.0.so.0: vc_dispmanx_element_add: symbol not found
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ m4/gst-gl.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
+index 1e97240..ab7774c 100644
+--- a/m4/gst-gl.m4
++++ b/m4/gst-gl.m4
+@@ -275,7 +275,7 @@ case $host in
+ HAVE_EGL=yes
+ HAVE_GLES2=yes
+ HAVE_EGL_RPI=yes
+- EGL_LIBS="-lbcm_host -lvcos -lvchiq_arm"
++ EGL_LIBS="-lbcm_host -lvchostif -lvcos -lvchiq_arm"
+ EGL_CFLAGS=""
+ AC_DEFINE(USE_EGL_RPI, [1], [Use RPi platform])
+ ])
+--
+2.7.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
index 413eff0695..23950b67f2 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
@@ -1,4 +1,4 @@
-From 10d2a977ee1d469f0bf9059bb2d0b55fd2eecbac Mon Sep 17 00:00:00 2001
+From 7ffa6e3d00e1d8a060f3f4c2bb9a72691af05d79 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Wed, 20 Jan 2016 13:00:00 -0800
Subject: [PATCH] make gio_unix_2_0 dependency configurable
@@ -17,16 +17,17 @@ instead of AG_GST_CHECK_FEATURE.
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
---
configure.ac | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/configure.ac b/configure.ac
-index 9c52aeb..26cacd6 100644
+index 12807bc..35a0bf3 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -752,9 +752,16 @@ AC_SUBST(FT2_CFLAGS)
- fi dnl of EXT plugins
+@@ -806,9 +806,16 @@ AM_CONDITIONAL(HAVE_PNG, test "x$HAVE_PNG" = "xyes")
+ AM_CONDITIONAL(HAVE_JPEG, test "x$HAVE_JPEG" = "xyes")
dnl *** gio-unix-2.0 for tests/check/pipelines/tcp.c ***
+AC_ARG_ENABLE([gio_unix_2_0],
@@ -42,6 +43,3 @@ index 9c52aeb..26cacd6 100644
AM_CONDITIONAL(USE_GIO_UNIX_2_0, test "x$HAVE_GIO_UNIX_2_0" = "xyes")
dnl *** finalize CFLAGS, LDFLAGS, LIBS
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.1.bb
new file mode 100644
index 0000000000..cb99fba5ff
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.1.bb
@@ -0,0 +1,73 @@
+require gstreamer1.0-plugins.inc
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
+
+SRC_URI = " \
+ https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
+ file://get-caps-from-src-pad-when-query-caps.patch \
+ file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+ file://make-gio_unix_2_0-dependency-configurable.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch \
+ file://0003-riff-add-missing-include-directories-when-calling-in.patch \
+ file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
+ file://0005-viv-fb-Make-sure-config.h-is-included.patch \
+ file://0009-glimagesink-Downrank-to-marginal.patch \
+ file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
+ file://link-with-libvchostif.patch \
+ "
+SRC_URI[md5sum] = "b5eb0651bab70bf1714f103bdd66ce47"
+SRC_URI[sha256sum] = "5c3cc489933d0597087c9bc6ba251c93693d64554bcc563539a084fa2d5fcb2b"
+
+S = "${WORKDIR}/gst-plugins-base-${PV}"
+
+DEPENDS += "iso-codes util-linux"
+
+inherit gettext gobject-introspection
+
+PACKAGES_DYNAMIC =+ "^libgst.*"
+
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${PACKAGECONFIG_GL} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
+ gio-unix-2.0 jpeg ogg pango png theora vorbis zlib \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
+"
+
+X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
+X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm"
+X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
+
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
+PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
+PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgbm libgudev libdrm"
+PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
+PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
+PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg"
+PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
+PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus"
+PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
+PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora"
+PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual"
+PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis"
+PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+
+FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
+FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
+
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs:${B}/gst-libs/gst/allocators/.libs"
+}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
deleted file mode 100644
index 986b5ac606..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-include gstreamer1.0-plugins-base.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
- file://get-caps-from-src-pad-when-query-caps.patch \
- file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
- file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
- file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
- file://make-gio_unix_2_0-dependency-configurable.patch \
-"
-
-SRC_URI[md5sum] = "4d03dd81828ea6b98a44c8f1ab7f4976"
-SRC_URI[sha256sum] = "114871d4d63606b4af424a8433cd923e4ff66896b244bb7ac97b9da47f71e79e"
-
-S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
deleted file mode 100644
index 3c2b504003..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-plugins-base.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-base;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
- file://get-caps-from-src-pad-when-query-caps.patch \
- file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
- file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
- file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
- file://make-gio_unix_2_0-dependency-configurable.patch \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "70f3750773bf5dba4098f6d72d63aa6c84f1f539"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
deleted file mode 100644
index f1e30aba55..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
+++ /dev/null
@@ -1,53 +0,0 @@
-require gstreamer1.0-plugins.inc
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-
-DEPENDS += "gstreamer1.0-plugins-base libcap zlib bzip2"
-
-inherit gettext
-
-PACKAGECONFIG ??= " \
- ${GSTREAMER_ORC} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
- cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib v4l2 \
-"
-
-X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
-
-PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo"
-PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libiec61883 libavc1394 libraw1394"
-PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac"
-PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf"
-PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,libgudev"
-PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
-PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng"
-PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,v4l-utils"
-PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
-PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4"
-PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex"
-PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib"
-PACKAGECONFIG[v4l2] = "--enable-gst_v4l2 --enable-v4l2-probe,--disable-gst_v4l2"
-PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx"
-PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack"
-PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}"
-
-EXTRA_OECONF += " \
- --enable-bz2 \
- --enable-oss \
- --enable-zlib \
- --disable-aalib \
- --disable-aalibtest \
- --disable-directsound \
- --disable-libcaca \
- --disable-libdv \
- --disable-oss4 \
- --disable-osx_audio \
- --disable-osx_video \
- --disable-shout2 \
- --disable-sunaudio \
- --disable-waveform \
-"
-
-FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
deleted file mode 100644
index a2cbb70fe9..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From c782a30482908a4b4dd9cd4abff9f9bc4016698f Mon Sep 17 00:00:00 2001
-From: Song Bing <b06498@freescale.com>
-Date: Tue, 5 Aug 2014 14:40:46 +0800
-Subject: [PATCH] gstrtpmp4gpay: set dafault value for MPEG4 without codec
- data in caps.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=734263
-
-Upstream-Status: Submitted
-
-Signed-off-by: Song Bing <b06498@freescale.com>
----
- gst/rtp/gstrtpmp4gpay.c | 19 ++++++++++++++++++-
- 1 file changed, 18 insertions(+), 1 deletion(-)
-
-diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c
-index 7913d9a..1749d39 100644
---- a/gst/rtp/gstrtpmp4gpay.c
-+++ b/gst/rtp/gstrtpmp4gpay.c
-@@ -391,6 +391,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
- const GValue *codec_data;
- const gchar *media_type = NULL;
- gboolean res;
-+ const gchar *name;
-
- rtpmp4gpay = GST_RTP_MP4G_PAY (payload);
-
-@@ -401,7 +402,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
- GST_LOG_OBJECT (rtpmp4gpay, "got codec_data");
- if (G_VALUE_TYPE (codec_data) == GST_TYPE_BUFFER) {
- GstBuffer *buffer;
-- const gchar *name;
-
- buffer = gst_value_get_buffer (codec_data);
- GST_LOG_OBJECT (rtpmp4gpay, "configuring codec_data");
-@@ -427,6 +427,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
-
- rtpmp4gpay->config = gst_buffer_copy (buffer);
- }
-+ } else {
-+ name = gst_structure_get_name (structure);
-+
-+ if (!strcmp (name, "video/mpeg")) {
-+ rtpmp4gpay->profile = g_strdup ("1");
-+
-+ /* fixed rate */
-+ rtpmp4gpay->rate = 90000;
-+ /* video stream type */
-+ rtpmp4gpay->streamtype = "4";
-+ /* no params for video */
-+ rtpmp4gpay->params = NULL;
-+ /* mode */
-+ rtpmp4gpay->mode = "generic";
-+
-+ media_type = "video";
-+ }
- }
- if (media_type == NULL)
- goto config_failed;
---
-1.7.9.5
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch
deleted file mode 100644
index c7f3630eca..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 4bfe2c8570a4a7080ec662504882969054d8a072 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Wed, 3 Feb 2016 18:12:38 -0800
-Subject: [PATCH] avoid including <sys/poll.h> directly
-
-musl libc generates warnings if <sys/poll.h> is included directly.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- ext/raw1394/gstdv1394src.c | 2 +-
- ext/raw1394/gsthdv1394src.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c
-index dbc7607..3c42b41 100644
---- a/ext/raw1394/gstdv1394src.c
-+++ b/ext/raw1394/gstdv1394src.c
-@@ -37,7 +37,7 @@
- #include "config.h"
- #endif
- #include <unistd.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/socket.h>
- #include <errno.h>
- #include <fcntl.h>
-diff --git a/ext/raw1394/gsthdv1394src.c b/ext/raw1394/gsthdv1394src.c
-index 0b07a37..9785a15 100644
---- a/ext/raw1394/gsthdv1394src.c
-+++ b/ext/raw1394/gsthdv1394src.c
-@@ -36,7 +36,7 @@
- #include "config.h"
- #endif
- #include <unistd.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/socket.h>
- #include <errno.h>
- #include <fcntl.h>
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch
deleted file mode 100644
index bc7ac0b6a1..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 2169f2205c0205a220d826d7573e5a863bd36e0a Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 9 Feb 2016 14:00:00 -0800
-Subject: [PATCH] ensure valid sentinal for gst_structure_get()
-
-gst_structure_get() is declared with G_GNUC_NULL_TERMINATED, ie
-__attribute__((__sentinel__)), which means gcc will generate a
-warning if the last parameter passed to the function is not NULL
-(where a valid NULL in this context is defined as zero with any
-pointer type).
-
-The C code callers to gst_structure_get() within gst-plugins-good
-use the C NULL definition (ie ((void*)0)), which is a valid sentinel.
-
-However gstid3v2mux.cc uses the C++ NULL definition (ie 0L), which
-is not a valid sentinel without an explicit cast to a pointer type.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- ext/taglib/gstid3v2mux.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc
-index 8651e77..a87234f 100644
---- a/ext/taglib/gstid3v2mux.cc
-+++ b/ext/taglib/gstid3v2mux.cc
-@@ -465,7 +465,7 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
-
- if (info_struct) {
- if (gst_structure_get (info_struct, "image-type",
-- GST_TYPE_TAG_IMAGE_TYPE, &image_type, NULL)) {
-+ GST_TYPE_TAG_IMAGE_TYPE, &image_type, (void *) NULL)) {
- if (image_type > 0 && image_type <= 18) {
- image_type += 2;
- } else {
---
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.1.bb
new file mode 100644
index 0000000000..0fa7b86ffe
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.1.bb
@@ -0,0 +1,76 @@
+require gstreamer1.0-plugins.inc
+
+SRC_URI = " \
+ https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ "
+
+SRC_URI[md5sum] = "515987ee763256840a11bd8ea098f2bf"
+SRC_URI[sha256sum] = "9fbabe69018fcec707df0b71150168776040cde6c1a26bb5a82a136755fa8f1f"
+
+S = "${WORKDIR}/gst-plugins-good-${PV}"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
+ file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
+
+DEPENDS += "gstreamer1.0-plugins-base libcap"
+RPROVIDES_${PN}-pulseaudio += "${PN}-pulse"
+RPROVIDES_${PN}-soup += "${PN}-souphttpsrc"
+
+inherit gettext
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \
+ bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 zlib \
+"
+
+X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
+
+PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2"
+PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo"
+PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libiec61883 libavc1394 libraw1394"
+PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac"
+PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf"
+PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
+PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,libgudev"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[lame] = "--enable-lame,--disable-lame,lame"
+PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng"
+PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,v4l-utils"
+PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
+PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
+PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4"
+PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex"
+PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib"
+PACKAGECONFIG[v4l2] = "--enable-gst_v4l2 --enable-v4l2-probe,--disable-gst_v4l2"
+PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx"
+PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack"
+PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+
+# qt5 support is disabled, because it is not present in OE core, and requires more work than
+# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths).
+# This is better done in a separate qt5 layer (which then should add a "qt5" packageconfig
+# in a gstreamer1.0-plugins-good bbappend).
+
+EXTRA_OECONF += " \
+ --enable-oss \
+ --disable-aalib \
+ --disable-aalibtest \
+ --disable-directsound \
+ --disable-libcaca \
+ --disable-libdv \
+ --disable-oss4 \
+ --disable-osx_audio \
+ --disable-osx_video \
+ --disable-qt \
+ --disable-shout2 \
+ --disable-twolame \
+ --disable-waveform \
+"
+
+FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
deleted file mode 100644
index 5cc6578b77..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-include gstreamer1.0-plugins-good.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
- file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
- file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
- file://avoid-including-sys-poll.h-directly.patch \
- file://ensure-valid-sentinel-for-gst_structure_get.patch \
-"
-
-SRC_URI[md5sum] = "473ebb1f15c67de99ddb6e4d027c0876"
-SRC_URI[sha256sum] = "a1d6579ba203a7734927c24b90bf6590d846c5a5fcec01a48201018c8ad2827a"
-
-S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
deleted file mode 100644
index 9b79af2a9a..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-plugins-good.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
- file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-good;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
- file://avoid-including-sys-poll.h-directly.patch \
- file://ensure-valid-sentinel-for-gst_structure_get.patch \
- file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "9f73b5818f98cd045e7049bb313da1c943635109"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
deleted file mode 100644
index 708ad7a15c..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
+++ /dev/null
@@ -1,32 +0,0 @@
-require gstreamer1.0-plugins.inc
-
-LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+"
-LICENSE_FLAGS = "commercial"
-
-DEPENDS += "gstreamer1.0-plugins-base libid3tag"
-
-inherit gettext
-
-PACKAGECONFIG ??= " \
- ${GSTREAMER_ORC} \
- a52dec lame mpg123 mpeg2dec \
-"
-
-PACKAGECONFIG[a52dec] = "--enable-a52dec,--disable-a52dec,liba52"
-PACKAGECONFIG[amrnb] = "--enable-amrnb,--disable-amrnb,opencore-amr"
-PACKAGECONFIG[amrwb] = "--enable-amrwb,--disable-amrwb,opencore-amr"
-PACKAGECONFIG[cdio] = "--enable-cdio,--disable-cdio,libcdio"
-PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread,libdvdread"
-PACKAGECONFIG[lame] = "--enable-lame,--disable-lame,lame"
-PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
-PACKAGECONFIG[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec"
-PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
-PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264"
-
-EXTRA_OECONF += " \
- --disable-sidplay \
- --disable-twolame \
-"
-
-FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
-FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.1.bb
new file mode 100644
index 0000000000..ecab318899
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.1.bb
@@ -0,0 +1,40 @@
+require gstreamer1.0-plugins.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+
+LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+"
+LICENSE_FLAGS = "commercial"
+
+SRC_URI = " \
+ https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ "
+SRC_URI[md5sum] = "668795903cb4971fba9aa89abdea8369"
+SRC_URI[sha256sum] = "4bf913b2ca5195ac3b53b5e3ade2dc7c45d2258507552ddc850c5fa425968a1d"
+
+S = "${WORKDIR}/gst-plugins-ugly-${PV}"
+
+DEPENDS += "gstreamer1.0-plugins-base"
+
+inherit gettext
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ a52dec mpeg2dec \
+"
+
+PACKAGECONFIG[a52dec] = "--enable-a52dec,--disable-a52dec,liba52"
+PACKAGECONFIG[amrnb] = "--enable-amrnb,--disable-amrnb,opencore-amr"
+PACKAGECONFIG[amrwb] = "--enable-amrwb,--disable-amrwb,opencore-amr"
+PACKAGECONFIG[cdio] = "--enable-cdio,--disable-cdio,libcdio"
+PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread,libdvdread"
+PACKAGECONFIG[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec"
+PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264"
+
+EXTRA_OECONF += " \
+ --disable-sidplay \
+"
+
+FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
+FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
deleted file mode 100644
index 2745937961..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-include gstreamer1.0-plugins-ugly.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
-"
-
-SRC_URI[md5sum] = "4fc66c77253b0ad5ce224bda654b2e7d"
-SRC_URI[sha256sum] = "6fa2599fdd072d31fbaf50c34af406e2be944a010b1f4eab67a5fe32a0310693"
-
-S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
deleted file mode 100644
index 22cca3a8df..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-plugins-ugly.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "79fe43c00925455a37fab6fc428e7f08655a9bbd"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
-
-# In 1.7.2, the mpg123 plugin was moved from -bad to -ugly
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
-
-PACKAGESPLITFUNCS_append = " handle_mpg123_rename "
-
-python handle_mpg123_rename () {
- d.setVar('RPROVIDES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
- d.setVar('RREPLACES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
- d.setVar('RCONFLICTS_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
-}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
index 9cfcec3ca5..bc24b05fec 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
@@ -5,7 +5,9 @@ SECTION = "multimedia"
DEPENDS = "gstreamer1.0 glib-2.0-native"
-inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+SRC_URI_append = " file://gtk-doc-tweaks.patch"
+
+inherit autotools pkgconfig upstream-version-is-even gtk-doc
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
@@ -28,26 +30,12 @@ EXTRA_OECONF = " \
--disable-examples \
"
-SRC_URI_append = " file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
-
delete_pkg_m4_file() {
# This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
rm "${S}/common/m4/pkg.m4" || true
rm -f "${S}/common/m4/gtk-doc.m4"
}
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
- # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
- # instead of libtool wrapper or running them directly
- # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
- sed -i \
- -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
- -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
- ${S}/common/gtk-doc*mak
-}
-
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
+do_configure[prefuncs] += " delete_pkg_m4_file"
PACKAGES_DYNAMIC = "^${PN}-.*"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.1.bb
new file mode 100644
index 0000000000..b770ec060e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.1.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Python bindings for GStreamer 1.0"
+HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
+SRC_URI[md5sum] = "499645fbd1790c5845c02a3998dccc1b"
+SRC_URI[sha256sum] = "b469c8955126f41b8ce0bf689b7029f182cd305f422b3a8df35b780bd8347489"
+
+DEPENDS = "gstreamer1.0 python3-pygobject"
+RDEPENDS_${PN} += "gstreamer1.0 python3-pygobject"
+
+PNREAL = "gst-python"
+
+S = "${WORKDIR}/${PNREAL}-${PV}"
+
+# gobject-introspection is mandatory and cannot be configured
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
+UNKNOWN_CONFIGURE_WHITELIST_append = " introspection"
+
+inherit meson pkgconfig distutils3-base upstream-version-is-even gobject-introspection features_check
+
+do_install_append() {
+
+ # Note that this particular find line is taken from the Debian packaging for
+ # gst-python1.0.
+ find "${D}" \
+ -name '*.pyc' -o \
+ -name '*.pyo' -o \
+ -name '*.la' -o \
+ -name 'libgstpythonplugin*' \
+ -delete
+}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
deleted file mode 100644
index 13ba40d3da..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "A library on top of GStreamer for building an RTSP server"
-HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
-SECTION = "multimedia"
-LICENSE = "LGPLv2"
-
-DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base"
-
-PNREAL = "gst-rtsp-server"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \
- file://0001-Don-t-hardcode-libtool-name-when-using-introspection.patch \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
-
-S = "${WORKDIR}/${PNREAL}-${PV}"
-
-inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
-
-# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
-LIBV = "1.0"
-require gst-plugins-package.inc
-
-delete_pkg_m4_file() {
- # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
- rm "${S}/common/m4/pkg.m4" || true
-}
-
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
- # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
- # instead of libtool wrapper or running them directly
- sed -i \
- -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
- ${S}/common/gtk-doc*mak
-}
-
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch
deleted file mode 100644
index 89d6384adb..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 4a12569e5ae5be63cd92a9b178860026a99746b1 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 27 Oct 2015 16:55:45 +0200
-Subject: [PATCH] Don't hardcode libtool name when using introspection
-
-Upstream-Status: Pending [review on oe-core maillist]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- gst/rtsp-server/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gst/rtsp-server/Makefile.am b/gst/rtsp-server/Makefile.am
-index 4fcd366..c67f5ab 100644
---- a/gst/rtsp-server/Makefile.am
-+++ b/gst/rtsp-server/Makefile.am
-@@ -87,7 +87,7 @@ GstRtspServer-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtspserver-@
- --include=Gst-@GST_API_VERSION@ \
- --include=GstRtsp-@GST_API_VERSION@ \
- --include=GstNet-@GST_API_VERSION@ \
-- --libtool="$(top_builddir)/libtool" \
-+ --libtool="$(LIBTOOL)" \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-rtsp-@GST_API_VERSION@ \
- --pkg gstreamer-net-@GST_API_VERSION@ \
---
-2.1.4
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.1.bb
new file mode 100644
index 0000000000..45302ef4f6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "A library on top of GStreamer for building an RTSP server"
+HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
+SECTION = "multimedia"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
+
+PNREAL = "gst-rtsp-server"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ file://gtk-doc-tweaks.patch \
+ "
+
+SRC_URI[md5sum] = "380d6a42e856c32fcefa508ad57129e0"
+SRC_URI[sha256sum] = "b0abacad2f86f60d63781d2b24443c5668733e8b08664bbef94124906d700144"
+
+S = "${WORKDIR}/${PNREAL}-${PV}"
+
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+
+EXTRA_OECONF = "--disable-examples --disable-tests"
+
+# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
+LIBV = "1.0"
+require gst-plugins-package.inc
+
+delete_pkg_m4_file() {
+ # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
+ rm "${S}/common/m4/pkg.m4" || true
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
deleted file mode 100644
index 17059d0703..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-include gstreamer1.0-rtsp-server.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-SRC_URI[md5sum] = "e4b07b10dd65b6c26c9ca5f72e59297b"
-SRC_URI[sha256sum] = "010f06800c1c957851d1352e5ec7a8ba3ce6a857fec1b8afc7d1a9e5f53288bf"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch
new file mode 100644
index 0000000000..d7b8984953
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch
@@ -0,0 +1,33 @@
+From 5403a89e6a7ac72a23e0221075c0c19b5f85a021 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Wed, 13 Jun 2018 09:09:25 -0300
+Subject: [PATCH] gst/vaapi/Makefile.am: Add EGL_CFLAGS to libgstvaapi CFLAGS
+Organization: O.S. Systems Software LTDA.
+
+We need this to pass correctly EGL CFLAGS when building with EGL support.
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+---
+ gst/vaapi/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gst/vaapi/Makefile.am b/gst/vaapi/Makefile.am
+index b299ac98..d6cab71f 100644
+--- a/gst/vaapi/Makefile.am
++++ b/gst/vaapi/Makefile.am
+@@ -24,6 +24,10 @@ libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-glx.la
+ endif
+
+ if USE_EGL
++libgstvaapi_CFLAGS += \
++ $(EGL_CFLAGS) \
++ $(NULL)
++
+ libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-egl.la
+ endif
+
+--
+2.17.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-vaapsink-downgrade-to-marginal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-vaapsink-downgrade-to-marginal.patch
new file mode 100644
index 0000000000..7945a923c9
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-vaapsink-downgrade-to-marginal.patch
@@ -0,0 +1,46 @@
+From 0c28cf7bfa90f8947833722cddf23d513490c6c3 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Wed, 28 Nov 2018 15:08:48 +0800
+Subject: [PATCH] vaapsink: downgrade to marginal
+
+Using vaapisink with default poky configuration results in an
+unresponsive display as of today because DRI2 rendering is currently broken
+in non composited environments [1] and libva doesn't support DRI3 [2].
+
+Downgrade vaapisink to marginal for now so playbin (and in turn gst-play
+and gtk-play examples) use xvimagesink or others out of box.
+
+[1] https://gitlab.freedesktop.org/xorg/xserver/issues/13
+[2] https://github.com/intel/libva/issues/122
+
+Upstream-Status: Pending
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ gst/vaapi/gstvaapi.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/gst/vaapi/gstvaapi.c b/gst/vaapi/gstvaapi.c
+index 9a82454..4d94f2b 100644
+--- a/gst/vaapi/gstvaapi.c
++++ b/gst/vaapi/gstvaapi.c
+@@ -195,7 +195,6 @@ plugin_init (GstPlugin * plugin)
+ {
+ GstVaapiDisplay *display;
+ GArray *decoders;
+- guint rank;
+
+ plugin_add_dependencies (plugin);
+
+@@ -220,10 +219,7 @@ plugin_init (GstPlugin * plugin)
+ gst_element_register (plugin, "vaapidecodebin",
+ GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN);
+
+- rank = GST_RANK_PRIMARY;
+- if (g_getenv ("WAYLAND_DISPLAY"))
+- rank = GST_RANK_MARGINAL;
+- gst_element_register (plugin, "vaapisink", rank, GST_TYPE_VAAPISINK);
++ gst_element_register (plugin, "vaapisink", GST_RANK_MARGINAL, GST_TYPE_VAAPISINK);
+
+ #if USE_ENCODERS
+ gst_vaapiencode_register (plugin, display);
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.1.bb
new file mode 100644
index 0000000000..b8c2126d9b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.1.bb
@@ -0,0 +1,49 @@
+SUMMARY = "VA-API support to GStreamer"
+DESCRIPTION = "gstreamer-vaapi consists of a collection of VA-API \
+based plugins for GStreamer and helper libraries: `vaapidecode', \
+`vaapiconvert', and `vaapisink'."
+
+REALPN = "gstreamer-vaapi"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz \
+ file://0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch \
+ file://0001-vaapsink-downgrade-to-marginal.patch \
+ "
+
+SRC_URI[md5sum] = "15b08f76777359d87b0b4a561db05f1f"
+SRC_URI[sha256sum] = "cb570f6f1e78cb364fbe3c4fb8751824ee9db0c942ba61b62380b9b5abb7603a"
+
+S = "${WORKDIR}/${REALPN}-${PV}"
+DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
+
+inherit autotools pkgconfig gtk-doc features_check upstream-version-is-even
+
+REQUIRED_DISTRO_FEATURES ?= "opengl"
+
+PACKAGES =+ "${PN}-tests"
+
+# OpenGL packageconfig factored out to make it easy for distros
+# and BSP layers to pick either glx, egl, or no GL. By default,
+# try detecting X11 first, and if found (with OpenGL), use GLX,
+# otherwise try to check if EGL can be used.
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', \
+ bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl', \
+ '', d), d)}"
+
+PACKAGECONFIG ??= "drm \
+ ${PACKAGECONFIG_GL} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+
+PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,udev libdrm"
+PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
+PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,virtual/libgl"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender"
+
+FILES_${PN} += "${libdir}/gstreamer-*/*.so"
+FILES_${PN}-dbg += "${libdir}/gstreamer-*/.debug"
+FILES_${PN}-dev += "${libdir}/gstreamer-*/*.la ${libdir}/gstreamer-*/*.a"
+FILES_${PN}-tests = "${bindir}/*"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
deleted file mode 100644
index cb0bd82f23..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "GStreamer 1.0 multimedia framework"
-DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \
-It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime."
-HOMEPAGE = "http://gstreamer.freedesktop.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
-SECTION = "multimedia"
-LICENSE = "LGPLv2+"
-
-DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
-
-inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
-
-# This way common/m4/introspection.m4 will come first
-# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
-acpaths = "-I ${S}/common/m4 -I ${S}/m4"
-
-SRC_URI_append = " \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
-"
-
-PACKAGECONFIG ??= ""
-
-PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
-PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
-PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
-PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
-PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
-
-EXTRA_OECONF = " \
- --disable-dependency-tracking \
- --disable-docbook \
- --disable-examples \
-"
-
-CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no"
-
-# musl libc generates warnings if <sys/poll.h> is included directly
-CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no"
-
-PACKAGES += "${PN}-bash-completion"
-
-FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
-FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
-FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
-
-RRECOMMENDS_${PN}_qemux86 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
-RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
-
-delete_pkg_m4_file() {
- # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
- rm "${S}/common/m4/pkg.m4" || true
- rm -f "${S}/common/m4/gtk-doc.m4"
-}
-
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
- # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
- # instead of libtool wrapper or running them directly
- # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
- sed -i \
- -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
- -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
- ${S}/common/gtk-doc*mak
-}
-
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
-
-do_compile_prepend() {
- export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
-}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb
new file mode 100644
index 0000000000..ff92f63bac
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb
@@ -0,0 +1,91 @@
+SUMMARY = "GStreamer 1.0 multimedia framework"
+DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \
+It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime."
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
+SECTION = "multimedia"
+LICENSE = "LGPLv2+"
+
+DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
+
+inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc ptest
+
+# This way common/m4/introspection.m4 will come first
+# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
+acpaths = "-I ${S}/common/m4 -I ${S}/m4"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
+
+S = "${WORKDIR}/gstreamer-${PV}"
+
+SRC_URI = " \
+ https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ file://gtk-doc-tweaks.patch \
+ file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
+ file://add-a-target-to-compile-tests.patch \
+ file://run-ptest \
+"
+SRC_URI[md5sum] = "c505fb818b36988daaa846e9e63eabe8"
+SRC_URI[sha256sum] = "02211c3447c4daa55919c5c0f43a82a6fbb51740d57fc3af0639d46f1cf4377d"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
+ "
+
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
+PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
+PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
+PACKAGECONFIG[unwind] = "--with-unwind,--without-unwind,libunwind"
+PACKAGECONFIG[dw] = "--with-dw,--without-dw,elfutils"
+
+EXTRA_OECONF = " \
+ --disable-examples \
+"
+
+CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no"
+
+# musl libc generates warnings if <sys/poll.h> is included directly
+CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no"
+
+PACKAGES += "${PN}-bash-completion"
+
+FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
+FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
+FILES_${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb"
+
+RDEPENDS_${PN}-ptest += "make"
+
+delete_pkg_m4_file() {
+ # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
+ rm "${S}/common/m4/pkg.m4" || true
+ rm -f "${S}/common/m4/gtk-doc.m4"
+}
+
+do_configure[prefuncs] += "delete_pkg_m4_file"
+
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
+}
+
+do_compile_ptest() {
+ oe_runmake build-checks
+}
+
+do_install_ptest() {
+ oe_runmake -C tests/check DESTDIR=${D}${PTEST_PATH} install-ptest
+ install -m 644 ${B}/tests/check/Makefile ${D}${PTEST_PATH}
+ install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
+ sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \
+ -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
+ -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
+ -i ${D}${PTEST_PATH}/Makefile
+}
+
+CVE_PRODUCT = "gstreamer"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
deleted file mode 100644
index d3561ebbde..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-include gstreamer1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
- file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
-"
-
-SRC_URI[md5sum] = "e88dad542df9d986822e982105d2b530"
-SRC_URI[sha256sum] = "66b37762d4fdcd63bce5a2bec57e055f92420e95037361609900278c0db7c53f"
-
-S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
deleted file mode 100644
index 6112f2a892..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
- file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gstreamer;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "3de8a4f728a7194a12b784ec4085f6a8e7d9b5bd"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
diff --git a/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch b/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
deleted file mode 100644
index 51baef26f2..0000000000
--- a/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Pending
-
-Fix this kind of errors with automake 1.12.x:
-| doc/man/Makefile.am:3: error: automatic de-ANSI-fication support has been removed
-| autoreconf: automake failed with exit status: 1
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/13
-
-Index: lame-3.99.5/configure.in
-===================================================================
---- lame-3.99.5.orig/configure.in
-+++ lame-3.99.5/configure.in
-@@ -77,9 +77,6 @@ if test "${GCC}" = "yes"; then
- AC_MSG_RESULT(${GCC_version})
- fi
-
--dnl more automake stuff
--AM_C_PROTOTYPES
--
- AC_CHECK_HEADER(dmalloc.h)
- if test "${ac_cv_header_dmalloc_h}" = "yes"; then
- AM_WITH_DMALLOC
-Index: lame-3.99.5/doc/html/Makefile.am
-===================================================================
---- lame-3.99.5.orig/doc/html/Makefile.am
-+++ lame-3.99.5/doc/html/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $
-
--AUTOMAKE_OPTIONS = foreign ansi2knr
-+AUTOMAKE_OPTIONS = foreign
-
- docdir = $(datadir)/doc
- pkgdocdir = $(docdir)/$(PACKAGE)
-Index: lame-3.99.5/libmp3lame/i386/Makefile.am
-===================================================================
---- lame-3.99.5.orig/libmp3lame/i386/Makefile.am
-+++ lame-3.99.5/libmp3lame/i386/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.26 2011/04/04 09:42:34 aleidinger Exp $
-
--AUTOMAKE_OPTIONS = foreign $(top_srcdir)/ansi2knr
-+AUTOMAKE_OPTIONS = foreign
-
- DEFS = @DEFS@ @CONFIG_DEFS@
-
-Index: lame-3.99.5/doc/man/Makefile.am
-===================================================================
---- lame-3.99.5.orig/doc/man/Makefile.am
-+++ lame-3.99.5/doc/man/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.1 2000/10/22 11:39:44 aleidinger Exp $
-
--AUTOMAKE_OPTIONS = foreign ansi2knr
-+AUTOMAKE_OPTIONS = foreign
-
- man_MANS = lame.1
- EXTRA_DIST = ${man_MANS}
diff --git a/meta/recipes-multimedia/lame/lame_3.100.bb b/meta/recipes-multimedia/lame/lame_3.100.bb
new file mode 100644
index 0000000000..7f8996fb52
--- /dev/null
+++ b/meta/recipes-multimedia/lame/lame_3.100.bb
@@ -0,0 +1,25 @@
+SUMMARY = "High quality MP3 audio encoder"
+HOMEPAGE = "http://lame.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
+SECTION = "console/utils"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
+ file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
+"
+
+DEPENDS = "ncurses gettext-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
+ file://no-gtk1.patch \
+ "
+
+SRC_URI[md5sum] = "83e260acbe4389b54fe08e0bdbf7cddb"
+SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e"
+
+inherit autotools pkgconfig
+
+PACKAGES += "libmp3lame libmp3lame-dev"
+FILES_${PN} = "${bindir}/lame"
+FILES_libmp3lame = "${libdir}/libmp3lame.so.*"
+FILES_libmp3lame-dev = "${includedir} ${libdir}/*"
+FILES_${PN}-dev = ""
diff --git a/meta/recipes-multimedia/lame/lame_3.99.5.bb b/meta/recipes-multimedia/lame/lame_3.99.5.bb
deleted file mode 100644
index 047761153d..0000000000
--- a/meta/recipes-multimedia/lame/lame_3.99.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "High quality MP3 audio encoder"
-HOMEPAGE = "http://lame.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
-SECTION = "console/utils"
-LICENSE = "LGPLv2+"
-LICENSE_FLAGS = "commercial"
-
-DEPENDS = "ncurses gettext-native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
- file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
-"
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
- file://no-gtk1.patch \
- file://lame-3.99.5_fix_for_automake-1.12.x.patch "
-
-SRC_URI[md5sum] = "84835b313d4a8b68f5349816d33e07ce"
-SRC_URI[sha256sum] = "24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff"
-
-inherit autotools pkgconfig
-
-PACKAGES += "libmp3lame libmp3lame-dev"
-FILES_${PN} = "${bindir}/lame"
-FILES_libmp3lame = "${libdir}/libmp3lame.so.*"
-FILES_libmp3lame-dev = "${includedir} ${libdir}/*"
-FILES_${PN}-dev = ""
-
-CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch b/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch
new file mode 100644
index 0000000000..54f49f6f23
--- /dev/null
+++ b/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch
@@ -0,0 +1,40 @@
+From 91fcf66b9182c75cd2b96d88991d5a1c6307d4b4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 2 Aug 2017 16:27:52 +0300
+Subject: [PATCH] Fix gperf 3.1 incompatibility.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ compat.h | 2 +-
+ frametype.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/compat.h b/compat.h
+index 8af71ec..b3d80d9 100644
+--- a/compat.h
++++ b/compat.h
+@@ -34,7 +34,7 @@ struct id3_compat {
+ };
+
+ struct id3_compat const *id3_compat_lookup(register char const *,
+- register unsigned int);
++ register size_t);
+
+ int id3_compat_fixup(struct id3_tag *);
+
+diff --git a/frametype.h b/frametype.h
+index dd064b2..b5b7593 100644
+--- a/frametype.h
++++ b/frametype.h
+@@ -37,6 +37,6 @@ extern struct id3_frametype const id3_frametype_unknown;
+ extern struct id3_frametype const id3_frametype_obsolete;
+
+ struct id3_frametype const *id3_frametype_lookup(register char const *,
+- register unsigned int);
++ register size_t);
+
+ # endif
+--
+2.13.2
+
diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch b/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch
new file mode 100644
index 0000000000..10e089018c
--- /dev/null
+++ b/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch
@@ -0,0 +1,34 @@
+libid3tag: patch for CVE-2004-2779
+
+The patch comes from
+https://sources.debian.org/patches/libid3tag/0.15.1b-13/10_utf16.dpatch
+
+Upstream-Status: Pending
+
+CVE: CVE-2004-2779
+CVE: CVE-2017-11551
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+diff -urNad libid3tag-0.15.1b/utf16.c /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c
+--- libid3tag-0.15.1b/utf16.c 2006-01-13 15:26:29.000000000 +0100
++++ /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c 2006-01-13 15:27:19.000000000 +0100
+@@ -282,5 +282,18 @@
+
+ free(utf16);
+
++ if (end == *ptr && length % 2 != 0)
++ {
++ /* We were called with a bogus length. It should always
++ * be an even number. We can deal with this in a few ways:
++ * - Always give an error.
++ * - Try and parse as much as we can and
++ * - return an error if we're called again when we
++ * already tried to parse everything we can.
++ * - tell that we parsed it, which is what we do here.
++ */
++ (*ptr)++;
++ }
++
+ return ucs4;
+ }
diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch b/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch
new file mode 100644
index 0000000000..f0867b5f01
--- /dev/null
+++ b/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch
@@ -0,0 +1,39 @@
+In case of an unknown/invalid encoding, id3_parse_string() will
+return NULL, but the return value wasn't checked resulting
+in segfault in id3_ucs4_length(). This is the only place
+the return value wasn't checked.
+
+Patch taken from Debian:
+https://sources.debian.org/patches/libid3tag/0.15.1b-14/11_unknown_encoding.dpatch/
+
+CVE: CVE-2017-11550
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf
+--- libid3tag-0.15.1b~/compat.gperf 2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000
+@@ -236,6 +236,10 @@
+
+ encoding = id3_parse_uint(&data, 1);
+ string = id3_parse_string(&data, end - data, encoding, 0);
++ if (!string)
++ {
++ continue;
++ }
+
+ if (id3_ucs4_length(string) < 4) {
+ free(string);
+diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c
+--- libid3tag-0.15.1b~/parse.c 2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000
+@@ -165,6 +165,9 @@
+ case ID3_FIELD_TEXTENCODING_UTF_8:
+ ucs4 = id3_utf8_deserialize(ptr, length);
+ break;
++ default:
++ /* FIXME: Unknown encoding! Print warning? */
++ return NULL;
+ }
+
+ if (ucs4 && !full) {
diff --git a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
index 05a8a47631..0312a610c0 100644
--- a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
+++ b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
@@ -9,10 +9,15 @@ SECTION = "libs"
DEPENDS = "zlib gperf-native"
PR = "r7"
-SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libid3tag-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libid3tag-${PV}.tar.gz \
file://addpkgconfig.patch \
file://obsolete_automake_macros.patch \
-"
+ file://0001-Fix-gperf-3.1-incompatibility.patch \
+ file://10_utf16.patch \
+ file://unknown-encoding.patch \
+ "
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mad/files/libid3tag/"
+UPSTREAM_CHECK_REGEX = "/projects/mad/files/libid3tag/(?P<pver>.*)/$"
SRC_URI[md5sum] = "e5808ad997ba32c498803822078748c3"
SRC_URI[sha256sum] = "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151"
diff --git a/meta/recipes-multimedia/libogg/libogg_1.3.2.bb b/meta/recipes-multimedia/libogg/libogg_1.3.2.bb
deleted file mode 100644
index 0142e0f4f8..0000000000
--- a/meta/recipes-multimedia/libogg/libogg_1.3.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Ogg bitstream and framing libary"
-DESCRIPTION = "libogg is the bitstream and framing library \
-for the Ogg project. It provides functions which are \
-necessary to codec libraries like libvorbis."
-HOMEPAGE = "http://xiph.org/"
-BUGTRACKER = "https://trac.xiph.org/newticket"
-SECTION = "libs"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
- file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
-
-SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "5c3a34309d8b98640827e5d0991a4015"
-SRC_URI[sha256sum] = "3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b"
-
-inherit autotools pkgconfig
diff --git a/meta/recipes-multimedia/libogg/libogg_1.3.4.bb b/meta/recipes-multimedia/libogg/libogg_1.3.4.bb
new file mode 100644
index 0000000000..c4004619b9
--- /dev/null
+++ b/meta/recipes-multimedia/libogg/libogg_1.3.4.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Ogg bitstream and framing libary"
+DESCRIPTION = "libogg is the bitstream and framing library \
+for the Ogg project. It provides functions which are \
+necessary to codec libraries like libvorbis."
+HOMEPAGE = "http://xiph.org/"
+BUGTRACKER = "https://trac.xiph.org/newticket"
+SECTION = "libs"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
+ file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
+
+SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "eadef24aad6e3e8379ba0d14971fd64a"
+SRC_URI[sha256sum] = "c163bc12bc300c401b6aa35907ac682671ea376f13ae0969a220f7ddf71893fe"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.24.bb b/meta/recipes-multimedia/libpng/libpng_1.6.24.bb
deleted file mode 100644
index f91ab7ffc4..0000000000
--- a/meta/recipes-multimedia/libpng/libpng_1.6.24.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5089214833586ba444048fd1dbbc76a4 \
- file://png.h;endline=149;md5=376d8ff7f69b7c4ad3a09f4672cec696"
-DEPENDS = "zlib"
-
-SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz \
- "
-SRC_URI[md5sum] = "ffcdbd549814787fa8010c372e35ff25"
-SRC_URI[sha256sum] = "7932dc9e5e45d55ece9d204e90196bbb5f2c82741ccb0f7e10d07d364a6fd6dd"
-
-BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-# Work around missing symbols
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
-
-PACKAGES =+ "${PN}-tools"
-
-FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.37.bb b/meta/recipes-multimedia/libpng/libpng_1.6.37.bb
new file mode 100644
index 0000000000..78f3248d73
--- /dev/null
+++ b/meta/recipes-multimedia/libpng/libpng_1.6.37.bb
@@ -0,0 +1,32 @@
+SUMMARY = "PNG image format decoding library"
+HOMEPAGE = "http://www.libpng.org/"
+SECTION = "libs"
+LICENSE = "Libpng"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b0085051bf265bac2bfc38bc89f50000"
+DEPENDS = "zlib"
+
+LIBV = "16"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz"
+SRC_URI[md5sum] = "015e8e15db1eecde5f2eb9eb5b6e59e9"
+SRC_URI[sha256sum] = "505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca"
+
+MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
+
+UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html"
+
+BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
+
+inherit autotools binconfig-disabled pkgconfig
+
+# Work around missing symbols
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
+
+PACKAGES =+ "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# CVE-2019-17371 is actually a memory leak in gif2png 2.x
+CVE_CHECK_WHITELIST += "CVE-2019-17371"
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch b/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch
new file mode 100644
index 0000000000..d19b514e6b
--- /dev/null
+++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch
@@ -0,0 +1,62 @@
+From 957ebce3837588f71016e37ffaf9aad0a9d41cec Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Fri, 23 Sep 2016 12:02:06 +0300
+Subject: [PATCH] configure.ac: improve alsa handling
+
+Three improvements:
+
+1) "--enable-alsa" or "--disable-alsa" caused a warning about an
+unsupported configure option, because AC_ARG_ENABLE was not used.
+
+2) If alsa was disabled, the "Have ALSA" item in the summary would print
+an empty string instead of "no".
+
+3) If "--enable-alsa" was passed to configure, but the headers were not
+found, configure would still succeed (with alsa disabled). It's better
+to fail and abort configure if a feature that was explicitly requested
+can't be enabled.
+
+Upstream-Status: Submitted [sent to src@mega-nerd.com]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ configure.ac | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 474c6ab..bad597e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -101,6 +101,9 @@ AC_ARG_ENABLE(cpu-clip,
+ AC_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper]),
+ ac_arg_cpu_clip="N", ac_arg_cpu_clip="Y")
+
++AC_ARG_ENABLE(alsa,
++ AC_HELP_STRING([--disable-alsa], [disable ALSA support in the varispeed-play example program]))
++
+ #====================================================================================
+ # Check types and their sizes.
+
+@@ -194,6 +197,10 @@ if test x$enable_alsa != xno ; then
+ if test x$ac_cv_header_alsa_asoundlib_h = xyes ; then
+ ALSA_LIBS="-lasound"
+ enable_alsa=yes
++ elif test x$enable_alsa = xyes ; then
++ AC_MSG_ERROR(["ALSA headers not found"])
++ else
++ enable_alsa=no
+ fi
+ fi
+
+@@ -340,7 +347,7 @@ AC_MSG_RESULT([
+ Have FFTW : ................... ${ac_cv_fftw3}])
+
+ AC_MSG_RESULT([ Have libsndfile : ............. ${ac_cv_sndfile}])
+-AC_MSG_RESULT([ Have ALSA : ................... ${ac_cv_header_alsa_asoundlib_h}
++AC_MSG_RESULT([ Have ALSA : ................... ${enable_alsa}
+ ])
+
+ AC_MSG_RESULT([ Installation directories :
+--
+2.9.3
+
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb
deleted file mode 100644
index 1c37681963..0000000000
--- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Audio Sample Rate Conversion library"
-HOMEPAGE = "http://www.mega-nerd.com/SRC/"
-SECTION = "libs"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://src/samplerate.c;beginline=1;endline=17;md5=d0807c35fc906466d24a50463534815a"
-DEPENDS = "flac libsndfile1"
-PR = "r1"
-
-SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "1c7fb25191b4e6e3628d198a66a84f47"
-SRC_URI[sha256sum] = "93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06"
-
-UPSTREAM_CHECK_URI = "http://www.mega-nerd.com/SRC/download.html"
-
-S = "${WORKDIR}/libsamplerate-${PV}"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG[fftw] = ",--disable-fftw,fftw"
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb
new file mode 100644
index 0000000000..ae08189441
--- /dev/null
+++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Audio Sample Rate Conversion library"
+HOMEPAGE = "http://www.mega-nerd.com/SRC/"
+SECTION = "libs"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=336d6faf40fb600bafb0061f4052f1f4 \
+ file://src/samplerate.c;beginline=1;endline=7;md5=5b6982a8c2811c7312c13cccbf55f55e"
+DEPENDS = "libsndfile1"
+PR = "r1"
+
+SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz \
+ file://0001-configure.ac-improve-alsa-handling.patch \
+"
+
+SRC_URI[md5sum] = "2b78ae9fe63b36b9fbb6267fad93f259"
+SRC_URI[sha256sum] = "0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1"
+
+CVE_PRODUCT = "libsamplerate"
+
+UPSTREAM_CHECK_URI = "http://www.mega-nerd.com/SRC/download.html"
+
+S = "${WORKDIR}/libsamplerate-${PV}"
+
+inherit autotools pkgconfig
+
+# FFTW and ALSA are only used in tests and examples, so they don't affect
+# normal builds. It should be safe to ignore these, but explicitly disabling
+# them adds some extra certainty that builds are deterministic.
+EXTRA_OECONF = "--disable-fftw --disable-alsa"
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch
new file mode 100644
index 0000000000..a4679cef2a
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch
@@ -0,0 +1,107 @@
+This patch fixes #429 (CVE-2018-19661 CVE-2018-19662) and #344 (CVE-2017-17456
+CVE-2017-17457). As per
+https://github.com/erikd/libsndfile/issues/344#issuecomment-448504425 it also
+fixes #317 (CVE-2017-14245 CVE-2017-14246).
+
+CVE: CVE-2017-14245 CVE-2017-14246
+CVE: CVE-2017-17456 CVE-2017-17457
+CVE: CVE-2018-19661 CVE-2018-19662
+
+Upstream-Status: Backport [8ddc442d539ca775d80cdbc7af17a718634a743f]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 39453899fe1bb39b2e041fdf51a85aecd177e9c7 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 7 Jan 2019 15:55:03 +0800
+Subject: [PATCH] a/ulaw: fix multiple buffer overflows (#432)
+
+i2ulaw_array() and i2alaw_array() fail to handle ptr [count] = INT_MIN
+properly, leading to buffer underflow. INT_MIN is a special value
+since - INT_MIN cannot be represented as int.
+
+In this case round - INT_MIN to INT_MAX and proceed as usual.
+
+f2ulaw_array() and f2alaw_array() fail to handle ptr [count] = NaN
+properly, leading to null pointer dereference.
+
+In this case, arbitrarily set the buffer value to 0.
+
+This commit fixes #429 (CVE-2018-19661 and CVE-2018-19662) and
+fixes #344 (CVE-2017-17456 and CVE-2017-17457).
+
+---
+ src/alaw.c | 9 +++++++--
+ src/ulaw.c | 9 +++++++--
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/alaw.c b/src/alaw.c
+index 063fd1a..4220224 100644
+--- a/src/alaw.c
++++ b/src/alaw.c
+@@ -19,6 +19,7 @@
+ #include "sfconfig.h"
+
+ #include <math.h>
++#include <limits.h>
+
+ #include "sndfile.h"
+ #include "common.h"
+@@ -326,7 +327,9 @@ s2alaw_array (const short *ptr, int count, unsigned char *buffer)
+ static inline void
+ i2alaw_array (const int *ptr, int count, unsigned char *buffer)
+ { while (--count >= 0)
+- { if (ptr [count] >= 0)
++ { if (ptr [count] == INT_MIN)
++ buffer [count] = alaw_encode [INT_MAX >> (16 + 4)] ;
++ else if (ptr [count] >= 0)
+ buffer [count] = alaw_encode [ptr [count] >> (16 + 4)] ;
+ else
+ buffer [count] = 0x7F & alaw_encode [- ptr [count] >> (16 + 4)] ;
+@@ -346,7 +349,9 @@ f2alaw_array (const float *ptr, int count, unsigned char *buffer, float normfact
+ static inline void
+ d2alaw_array (const double *ptr, int count, unsigned char *buffer, double normfact)
+ { while (--count >= 0)
+- { if (ptr [count] >= 0)
++ { if (!isfinite (ptr [count]))
++ buffer [count] = 0 ;
++ else if (ptr [count] >= 0)
+ buffer [count] = alaw_encode [lrint (normfact * ptr [count])] ;
+ else
+ buffer [count] = 0x7F & alaw_encode [- lrint (normfact * ptr [count])] ;
+diff --git a/src/ulaw.c b/src/ulaw.c
+index e50b4cb..b6070ad 100644
+--- a/src/ulaw.c
++++ b/src/ulaw.c
+@@ -19,6 +19,7 @@
+ #include "sfconfig.h"
+
+ #include <math.h>
++#include <limits.h>
+
+ #include "sndfile.h"
+ #include "common.h"
+@@ -827,7 +828,9 @@ s2ulaw_array (const short *ptr, int count, unsigned char *buffer)
+ static inline void
+ i2ulaw_array (const int *ptr, int count, unsigned char *buffer)
+ { while (--count >= 0)
+- { if (ptr [count] >= 0)
++ { if (ptr [count] == INT_MIN)
++ buffer [count] = ulaw_encode [INT_MAX >> (16 + 2)] ;
++ else if (ptr [count] >= 0)
+ buffer [count] = ulaw_encode [ptr [count] >> (16 + 2)] ;
+ else
+ buffer [count] = 0x7F & ulaw_encode [-ptr [count] >> (16 + 2)] ;
+@@ -847,7 +850,9 @@ f2ulaw_array (const float *ptr, int count, unsigned char *buffer, float normfact
+ static inline void
+ d2ulaw_array (const double *ptr, int count, unsigned char *buffer, double normfact)
+ { while (--count >= 0)
+- { if (ptr [count] >= 0)
++ { if (!isfinite (ptr [count]))
++ buffer [count] = 0 ;
++ else if (ptr [count] >= 0)
+ buffer [count] = ulaw_encode [lrint (normfact * ptr [count])] ;
+ else
+ buffer [count] = 0x7F & ulaw_encode [- lrint (normfact * ptr [count])] ;
+--
+2.7.4
+
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch
new file mode 100644
index 0000000000..491dae3114
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch
@@ -0,0 +1,96 @@
+Heap-based Buffer Overflow in the psf_binheader_writef function in common.c in
+libsndfile through 1.0.28 allows remote attackers to cause a denial of service
+(application crash) or possibly have unspecified other impact.
+
+CVE: CVE-2017-12562
+Upstream-Status: Backport [cf7a8182c2642c50f1cf90dddea9ce96a8bad2e8]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From b6a9d7e95888ffa77d8c75ce3f03e6c7165587cd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= <osmanx@problemloesungsmaschine.de>
+Date: Wed, 14 Jun 2017 12:25:40 +0200
+Subject: [PATCH] src/common.c: Fix heap buffer overflows when writing strings
+ in binheader
+
+Fixes the following problems:
+ 1. Case 's' only enlarges the buffer by 16 bytes instead of size bytes.
+ 2. psf_binheader_writef() enlarges the header buffer (if needed) prior to the
+ big switch statement by an amount (16 bytes) which is enough for all cases
+ where only a single value gets added. Cases 's', 'S', 'p' however
+ additionally write an arbitrary length block of data and again enlarge the
+ buffer to the required amount. However, the required space calculation does
+ not take into account the size of the length field which gets output before
+ the data.
+ 3. Buffer size requirement calculation in case 'S' does not account for the
+ padding byte ("size += (size & 1) ;" happens after the calculation which
+ uses "size").
+ 4. Case 'S' can overrun the header buffer by 1 byte when no padding is
+ involved
+ ("memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ;" while
+ the buffer is only guaranteed to have "size" space available).
+ 5. "psf->header.ptr [psf->header.indx] = 0 ;" in case 'S' always writes 1 byte
+ beyond the space which is guaranteed to be allocated in the header buffer.
+ 6. Case 's' can overrun the provided source string by 1 byte if padding is
+ involved ("memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;"
+ where "size" is "strlen (strptr) + 1" (which includes the 0 terminator,
+ plus optionally another 1 which is padding and not guaranteed to be
+ readable via the source string pointer).
+
+Closes: https://github.com/erikd/libsndfile/issues/292
+---
+ src/common.c | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/src/common.c b/src/common.c
+index 1a6204ca..6b2a2ee9 100644
+--- a/src/common.c
++++ b/src/common.c
+@@ -681,16 +681,16 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
+ /* Write a C string (guaranteed to have a zero terminator). */
+ strptr = va_arg (argptr, char *) ;
+ size = strlen (strptr) + 1 ;
+- size += (size & 1) ;
+
+- if (psf->header.indx + (sf_count_t) size >= psf->header.len && psf_bump_header_allocation (psf, 16))
++ if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bump_header_allocation (psf, 4 + size + (size & 1)))
+ return count ;
+
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+- header_put_be_int (psf, size) ;
++ header_put_be_int (psf, size + (size & 1)) ;
+ else
+- header_put_le_int (psf, size) ;
++ header_put_le_int (psf, size + (size & 1)) ;
+ memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;
++ size += (size & 1) ;
+ psf->header.indx += size ;
+ psf->header.ptr [psf->header.indx - 1] = 0 ;
+ count += 4 + size ;
+@@ -703,16 +703,15 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
+ */
+ strptr = va_arg (argptr, char *) ;
+ size = strlen (strptr) ;
+- if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
++ if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bump_header_allocation (psf, 4 + size + (size & 1)))
+ return count ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ header_put_be_int (psf, size) ;
+ else
+ header_put_le_int (psf, size) ;
+- memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ;
++ memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + (size & 1)) ;
+ size += (size & 1) ;
+ psf->header.indx += size ;
+- psf->header.ptr [psf->header.indx] = 0 ;
+ count += 4 + size ;
+ break ;
+
+@@ -724,7 +723,7 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
+ size = (size & 1) ? size : size + 1 ;
+ size = (size > 254) ? 254 : size ;
+
+- if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
++ if (psf->header.indx + 1 + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, 1 + size))
+ return count ;
+
+ header_put_byte (psf, size) ;
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch
new file mode 100644
index 0000000000..39b4ec1101
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch
@@ -0,0 +1,42 @@
+From 85c877d5072866aadbe8ed0c3e0590fbb5e16788 Mon Sep 17 00:00:00 2001
+From: Fabian Greffrath <fabian@greffrath.com>
+Date: Thu, 28 Sep 2017 12:15:04 +0200
+Subject: [PATCH] double64_init: Check psf->sf.channels against upper bound
+
+This prevents division by zero later in the code.
+
+While the trivial case to catch this (i.e. sf.channels < 1) has already
+been covered, a crafted file may report a number of channels that is
+so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets
+miscalculated to zero (if this makes sense) in the determination of the
+blockwidth. Since we only support a limited number of channels anyway,
+make sure to check here as well.
+
+CVE: CVE-2017-14634
+
+Closes: https://github.com/erikd/libsndfile/issues/318
+
+Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/85c877d5072866aadbe8ed0c3e0590fbb5e16788]
+
+Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+---
+ src/double64.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/double64.c b/src/double64.c
+index b318ea8..78dfef7 100644
+--- a/src/double64.c
++++ b/src/double64.c
+@@ -91,7 +91,7 @@ int
+ double64_init (SF_PRIVATE *psf)
+ { static int double64_caps ;
+
+- if (psf->sf.channels < 1)
++ if (psf->sf.channels < 1 || psf->sf.channels > SF_MAX_CHANNELS)
+ { psf_log_printf (psf, "double64_init : internal error : channels = %d\n", psf->sf.channels) ;
+ return SFE_INTERNAL ;
+ } ;
+--
+2.13.3
+
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch
new file mode 100644
index 0000000000..89552ac2d9
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch
@@ -0,0 +1,34 @@
+From f833c53cb596e9e1792949f762e0b33661822748 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd@mega-nerd.com>
+Date: Tue, 23 May 2017 20:15:24 +1000
+Subject: [PATCH] src/aiff.c: Fix a buffer read overflow
+
+Secunia Advisory SA76717.
+
+Found by: Laurent Delosieres, Secunia Research at Flexera Software
+
+CVE: CVE-2017-6892
+Upstream-Status: Backport
+
+Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
+
+---
+ src/aiff.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/aiff.c b/src/aiff.c
+index 5b5f9f5..45864b7 100644
+--- a/src/aiff.c
++++ b/src/aiff.c
+@@ -1759,7 +1759,7 @@ aiff_read_chanmap (SF_PRIVATE * psf, unsigned dword)
+ psf_binheader_readf (psf, "j", dword - bytesread) ;
+
+ if (map_info->channel_map != NULL)
+- { size_t chanmap_size = psf->sf.channels * sizeof (psf->channel_map [0]) ;
++ { size_t chanmap_size = SF_MIN (psf->sf.channels, layout_tag & 0xffff) * sizeof (psf->channel_map [0]) ;
+
+ free (psf->channel_map) ;
+
+--
+1.9.1
+
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch
new file mode 100644
index 0000000000..ac99516bb3
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch
@@ -0,0 +1,73 @@
+From fd0484aba8e51d16af1e3a880f9b8b857b385eb3 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd@mega-nerd.com>
+Date: Wed, 12 Apr 2017 19:45:30 +1000
+Subject: [PATCH] FLAC: Fix a buffer read overrun
+
+Buffer read overrun occurs when reading a FLAC file that switches
+from 2 channels to one channel mid-stream. Only option is to
+abort the read.
+
+Closes: https://github.com/erikd/libsndfile/issues/230
+
+CVE: CVE-2017-8361 CVE-2017-8365
+
+Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/fd0484aba8e51d16af1e3a880f9b8b857b385eb3]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/common.h | 1 +
+ src/flac.c | 13 +++++++++++++
+ src/sndfile.c | 1 +
+ 3 files changed, 15 insertions(+)
+
+diff --git a/src/common.h b/src/common.h
+index 0bd810c..e2669b6 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -725,6 +725,7 @@ enum
+ SFE_FLAC_INIT_DECODER,
+ SFE_FLAC_LOST_SYNC,
+ SFE_FLAC_BAD_SAMPLE_RATE,
++ SFE_FLAC_CHANNEL_COUNT_CHANGED,
+ SFE_FLAC_UNKOWN_ERROR,
+
+ SFE_WVE_NOT_WVE,
+diff --git a/src/flac.c b/src/flac.c
+index 84de0e2..986a7b8 100644
+--- a/src/flac.c
++++ b/src/flac.c
+@@ -434,6 +434,19 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_
+
+ switch (metadata->type)
+ { case FLAC__METADATA_TYPE_STREAMINFO :
++ if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels)
++ { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n"
++ "Nothing to be but to error out.\n" ,
++ psf->sf.channels, metadata->data.stream_info.channels) ;
++ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
++ return ;
++ } ;
++
++ if (psf->sf.channels > 0 && psf->sf.samplerate != (int) metadata->data.stream_info.sample_rate)
++ { psf_log_printf (psf, "Warning: FLAC stream changed sample rates from %d to %d.\n"
++ "Carrying on as if nothing happened.",
++ psf->sf.samplerate, metadata->data.stream_info.sample_rate) ;
++ } ;
+ psf->sf.channels = metadata->data.stream_info.channels ;
+ psf->sf.samplerate = metadata->data.stream_info.sample_rate ;
+ psf->sf.frames = metadata->data.stream_info.total_samples ;
+diff --git a/src/sndfile.c b/src/sndfile.c
+index 4187561..e2a87be 100644
+--- a/src/sndfile.c
++++ b/src/sndfile.c
+@@ -245,6 +245,7 @@ ErrorStruct SndfileErrors [] =
+ { SFE_FLAC_INIT_DECODER , "Error : problem with initialization of the flac decoder." },
+ { SFE_FLAC_LOST_SYNC , "Error : flac decoder lost sync." },
+ { SFE_FLAC_BAD_SAMPLE_RATE, "Error : flac does not support this sample rate." },
++ { SFE_FLAC_CHANNEL_COUNT_CHANGED, "Error : flac channel changed mid stream." },
+ { SFE_FLAC_UNKOWN_ERROR , "Error : unknown error in flac decoder." },
+
+ { SFE_WVE_NOT_WVE , "Error : not a WVE file." },
+--
+2.7.4
+
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch
new file mode 100644
index 0000000000..9ee7e46a6d
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch
@@ -0,0 +1,59 @@
+From ef1dbb2df1c0e741486646de40bd638a9c4cd808 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd@mega-nerd.com>
+Date: Fri, 14 Apr 2017 15:19:16 +1000
+Subject: [PATCH] src/flac.c: Fix a buffer read overflow
+
+A file (generated by a fuzzer) which increased the number of channels
+from one frame to the next could cause a read beyond the end of the
+buffer provided by libFLAC. Only option is to abort the read.
+
+Closes: https://github.com/erikd/libsndfile/issues/231
+
+CVE: CVE-2017-8362
+
+Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/ef1dbb2df1c0e741486646de40bd638a9c4cd808]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/flac.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/flac.c b/src/flac.c
+index 5a4f8c2..e4f9aaa 100644
+--- a/src/flac.c
++++ b/src/flac.c
+@@ -169,6 +169,14 @@ flac_buffer_copy (SF_PRIVATE *psf)
+ const int32_t* const *buffer = pflac->wbuffer ;
+ unsigned i = 0, j, offset, channels, len ;
+
++ if (psf->sf.channels != (int) frame->header.channels)
++ { psf_log_printf (psf, "Error: FLAC frame changed from %d to %d channels\n"
++ "Nothing to do but to error out.\n" ,
++ psf->sf.channels, frame->header.channels) ;
++ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
++ return 0 ;
++ } ;
++
+ /*
+ ** frame->header.blocksize is variable and we're using a constant blocksize
+ ** of FLAC__MAX_BLOCK_SIZE.
+@@ -202,7 +210,6 @@ flac_buffer_copy (SF_PRIVATE *psf)
+ return 0 ;
+ } ;
+
+-
+ len = SF_MIN (pflac->len, frame->header.blocksize) ;
+
+ if (pflac->remain % channels != 0)
+@@ -436,7 +443,7 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_
+ { case FLAC__METADATA_TYPE_STREAMINFO :
+ if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels)
+ { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n"
+- "Nothing to be but to error out.\n" ,
++ "Nothing to do but to error out.\n" ,
+ psf->sf.channels, metadata->data.stream_info.channels) ;
+ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
+ return ;
+--
+2.7.4
+
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch
new file mode 100644
index 0000000000..e526e5a346
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch
@@ -0,0 +1,37 @@
+From cd7da8dbf6ee4310d21d9e44b385d6797160d9e8 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd@mega-nerd.com>
+Date: Wed, 12 Apr 2017 20:19:34 +1000
+Subject: [PATCH] src/flac.c: Fix another memory leak
+
+When the FLAC decoder was passed a malformed file, the associated
+`FLAC__StreamDecoder` object was not getting released.
+
+Closes: https://github.com/erikd/libsndfile/issues/233
+
+CVE: CVE-2017-8363
+
+Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/cd7da8dbf6ee4310d21d9e44b385d6797160d9e8]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/flac.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/flac.c b/src/flac.c
+index 986a7b8..5a4f8c2 100644
+--- a/src/flac.c
++++ b/src/flac.c
+@@ -841,7 +841,9 @@ flac_read_header (SF_PRIVATE *psf)
+
+ psf_log_printf (psf, "End\n") ;
+
+- if (psf->error == 0)
++ if (psf->error != 0)
++ FLAC__stream_decoder_delete (pflac->fsd) ;
++ else
+ { FLAC__uint64 position ;
+
+ FLAC__stream_decoder_get_decode_position (pflac->fsd, &position) ;
+--
+2.7.4
+
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch
new file mode 100644
index 0000000000..707373d414
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch
@@ -0,0 +1,37 @@
+CVE: CVE-2018-13139
+Upstream-Status: Backport [9dc989eb89cd697e19897afa616d6ab0debe4822]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 9dc989eb89cd697e19897afa616d6ab0debe4822 Mon Sep 17 00:00:00 2001
+From: "Brett T. Warden" <brett.t.warden@intel.com>
+Date: Tue, 28 Aug 2018 12:01:17 -0700
+Subject: [PATCH] Check MAX_CHANNELS in sndfile-deinterleave
+
+Allocated buffer has space for only 16 channels. Verify that input file
+meets this limit.
+
+Fixes #397
+---
+ programs/sndfile-deinterleave.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/programs/sndfile-deinterleave.c b/programs/sndfile-deinterleave.c
+index e27593e2..cb497e1f 100644
+--- a/programs/sndfile-deinterleave.c
++++ b/programs/sndfile-deinterleave.c
+@@ -89,6 +89,13 @@ main (int argc, char **argv)
+ exit (1) ;
+ } ;
+
++ if (sfinfo.channels > MAX_CHANNELS)
++ { printf ("\nError : Input file '%s' has too many (%d) channels. Limit is %d.\n",
++ argv [1], sfinfo.channels, MAX_CHANNELS) ;
++ exit (1) ;
++ } ;
++
++
+ state.channels = sfinfo.channels ;
+ sfinfo.channels = 1 ;
+
+--
+2.11.0
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch
new file mode 100644
index 0000000000..8ded2c0f85
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch
@@ -0,0 +1,115 @@
+From 6f3266277bed16525f0ac2f0f03ff4626f1923e5 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd@mega-nerd.com>
+Date: Thu, 8 Mar 2018 18:00:21 +1100
+Subject: [PATCH] Fix max channel count bug
+
+The code was allowing files to be written with a channel count of exactly
+`SF_MAX_CHANNELS` but was failing to read some file formats with the same
+channel count.
+
+Upstream-Status: Backport [https://github.com/erikd/libsndfile/
+commit/6f3266277bed16525f0ac2f0f03ff4626f1923e5]
+
+CVE: CVE-2018-19432
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+---
+ src/aiff.c | 6 +++---
+ src/rf64.c | 4 ++--
+ src/w64.c | 4 ++--
+ src/wav.c | 4 ++--
+ 4 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/aiff.c b/src/aiff.c
+index fbd43cb..6386bce 100644
+--- a/src/aiff.c
++++ b/src/aiff.c
+@@ -1,5 +1,5 @@
+ /*
+-** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
++** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com>
+ ** Copyright (C) 2005 David Viens <davidv@plogue.com>
+ **
+ ** This program is free software; you can redistribute it and/or modify
+@@ -950,7 +950,7 @@ aiff_read_header (SF_PRIVATE *psf, COMM_
+ if (psf->sf.channels < 1)
+ return SFE_CHANNEL_COUNT_ZERO ;
+
+- if (psf->sf.channels >= SF_MAX_CHANNELS)
++ if (psf->sf.channels > SF_MAX_CHANNELS)
+ return SFE_CHANNEL_COUNT ;
+
+ if (! (found_chunk & HAVE_FORM))
+@@ -1030,7 +1030,7 @@ aiff_read_comm_chunk (SF_PRIVATE *psf, C
+ psf_log_printf (psf, " Sample Rate : %d\n", samplerate) ;
+ psf_log_printf (psf, " Frames : %u%s\n", comm_fmt->numSampleFrames, (comm_fmt->numSampleFrames == 0 && psf->filelength > 104) ? " (Should not be 0)" : "") ;
+
+- if (comm_fmt->numChannels < 1 || comm_fmt->numChannels >= SF_MAX_CHANNELS)
++ if (comm_fmt->numChannels < 1 || comm_fmt->numChannels > SF_MAX_CHANNELS)
+ { psf_log_printf (psf, " Channels : %d (should be >= 1 and < %d)\n", comm_fmt->numChannels, SF_MAX_CHANNELS) ;
+ return SFE_CHANNEL_COUNT_BAD ;
+ } ;
+diff --git a/src/rf64.c b/src/rf64.c
+index d57f0f3..876cd45 100644
+--- a/src/rf64.c
++++ b/src/rf64.c
+@@ -1,5 +1,5 @@
+ /*
+-** Copyright (C) 2008-2017 Erik de Castro Lopo <erikd@mega-nerd.com>
++** Copyright (C) 2008-2018 Erik de Castro Lopo <erikd@mega-nerd.com>
+ ** Copyright (C) 2009 Uli Franke <cls@nebadje.org>
+ **
+ ** This program is free software; you can redistribute it and/or modify
+@@ -382,7 +382,7 @@ rf64_read_header (SF_PRIVATE *psf, int *
+ if (psf->sf.channels < 1)
+ return SFE_CHANNEL_COUNT_ZERO ;
+
+- if (psf->sf.channels >= SF_MAX_CHANNELS)
++ if (psf->sf.channels > SF_MAX_CHANNELS)
+ return SFE_CHANNEL_COUNT ;
+
+ /* WAVs can be little or big endian */
+diff --git a/src/w64.c b/src/w64.c
+index 939b716..a37d2c5 100644
+--- a/src/w64.c
++++ b/src/w64.c
+@@ -1,5 +1,5 @@
+ /*
+-** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
++** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com>
+ **
+ ** This program is free software; you can redistribute it and/or modify
+ ** it under the terms of the GNU Lesser General Public License as published by
+@@ -383,7 +383,7 @@ w64_read_header (SF_PRIVATE *psf, int *b
+ if (psf->sf.channels < 1)
+ return SFE_CHANNEL_COUNT_ZERO ;
+
+- if (psf->sf.channels >= SF_MAX_CHANNELS)
++ if (psf->sf.channels > SF_MAX_CHANNELS)
+ return SFE_CHANNEL_COUNT ;
+
+ psf->endian = SF_ENDIAN_LITTLE ; /* All W64 files are little endian. */
+diff --git a/src/wav.c b/src/wav.c
+index 7bd97bc..dc97545 100644
+--- a/src/wav.c
++++ b/src/wav.c
+@@ -1,5 +1,5 @@
+ /*
+-** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
++** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com>
+ ** Copyright (C) 2004-2005 David Viens <davidv@plogue.com>
+ **
+ ** This program is free software; you can redistribute it and/or modify
+@@ -627,7 +627,7 @@ wav_read_header (SF_PRIVATE *psf, int *b
+ if (psf->sf.channels < 1)
+ return SFE_CHANNEL_COUNT_ZERO ;
+
+- if (psf->sf.channels >= SF_MAX_CHANNELS)
++ if (psf->sf.channels > SF_MAX_CHANNELS)
+ return SFE_CHANNEL_COUNT ;
+
+ if (format != WAVE_FORMAT_PCM && (parsestage & HAVE_fact) == 0)
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch
new file mode 100644
index 0000000000..c3586f9dfc
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch
@@ -0,0 +1,34 @@
+There is a heap-based buffer over-read at wav.c in wav_write_header in
+libsndfile 1.0.28 that will cause a denial of service.
+
+CVE: CVE-2018-19758
+Upstream-Status: Backport [42132c543358cee9f7c3e9e9b15bb6c1063a608e]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From c12173b0197dd0c5cfa2cd27977e982d2ae59486 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd@mega-nerd.com>
+Date: Tue, 1 Jan 2019 20:11:46 +1100
+Subject: [PATCH] src/wav.c: Fix heap read overflow
+
+This is CVE-2018-19758.
+
+Closes: https://github.com/erikd/libsndfile/issues/435
+---
+ src/wav.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/wav.c b/src/wav.c
+index e8405b55..6fb94ae8 100644
+--- a/src/wav.c
++++ b/src/wav.c
+@@ -1094,6 +1094,8 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
+ psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */
+ psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ;
+
++ /* Loop count is signed 16 bit number so we limit it range to something sensible. */
++ psf->instrument->loop_count &= 0x7fff ;
+ for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++)
+ { int type ;
+
+--
+2.11.0
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch
new file mode 100644
index 0000000000..ab37211399
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch
@@ -0,0 +1,37 @@
+From 43886efc408c21e1e329086ef70c88860310f25b Mon Sep 17 00:00:00 2001
+From: Emilio Pozuelo Monfort <pochu27@gmail.com>
+Date: Tue, 5 Mar 2019 11:27:17 +0100
+Subject: [PATCH] wav_write_header: don't read past the array end
+
+CVE-2018-19758 wasn't entirely fixed in the fix, so fix it harder.
+
+CVE: CVE-2019-3832
+Upstream-Status: Backport [7408c4c788ce047d4e652b60a04e7796bcd7267e]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+If loop_count is bigger than the array, truncate it to the array
+length (and not to 32k).
+
+CVE-2019-3832
+
+---
+ src/wav.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/wav.c b/src/wav.c
+index daae3cc..8851549 100644
+--- a/src/wav.c
++++ b/src/wav.c
+@@ -1094,8 +1094,10 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
+ psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */
+ psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ;
+
+- /* Loop count is signed 16 bit number so we limit it range to something sensible. */
+- psf->instrument->loop_count &= 0x7fff ;
++ /* Make sure we don't read past the loops array end. */
++ if (psf->instrument->loop_count > ARRAY_LEN (psf->instrument->loops))
++ psf->instrument->loop_count = ARRAY_LEN (psf->instrument->loops) ;
++
+ for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++)
+ { int type ;
+
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
deleted file mode 100644
index ec41719439..0000000000
--- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Audio format Conversion library"
-HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
-AUTHOR = "Erik de Castro Lopo"
-DEPENDS = "flac libogg libvorbis sqlite3"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1"
-
-SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "fd1d97c6077f03b5d984d7956ffedb7a"
-SRC_URI[sha256sum] = "a391952f27f4a92ceb2b4c06493ac107896ed6c76be9a613a4731f076d30fac0"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
-
-S = "${WORKDIR}/libsndfile-${PV}"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
-PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
-
-inherit autotools lib_package pkgconfig
-
-do_configure_prepend_arm() {
- export ac_cv_sys_largefile_source=1
- export ac_cv_sys_file_offset_bits=64
-}
-
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
new file mode 100644
index 0000000000..7855008f3d
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Audio format Conversion library"
+HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
+AUTHOR = "Erik de Castro Lopo"
+DEPENDS = "flac libogg libvorbis"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1"
+
+SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
+ file://CVE-2017-6892.patch \
+ file://CVE-2017-8361-8365.patch \
+ file://CVE-2017-8362.patch \
+ file://CVE-2017-8363.patch \
+ file://CVE-2017-14634.patch \
+ file://CVE-2018-13139.patch \
+ file://0001-a-ulaw-fix-multiple-buffer-overflows-432.patch \
+ file://CVE-2018-19432.patch \
+ file://CVE-2017-12562.patch \
+ file://CVE-2018-19758.patch \
+ file://CVE-2019-3832.patch \
+ "
+
+SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c"
+SRC_URI[sha256sum] = "1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
+
+CVE_PRODUCT = "libsndfile"
+
+S = "${WORKDIR}/libsndfile-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
+
+inherit autotools lib_package pkgconfig
+
+# This can't be replicated and is just a memory leak.
+# https://github.com/erikd/libsndfile/issues/398
+CVE_CHECK_WHITELIST += "CVE-2018-13419"
diff --git a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
index 664d8480a2..178e1a9240 100644
--- a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
+++ b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "The libtheora reference implementation provides the standard enco
HOMEPAGE = "http://xiph.org/"
BUGTRACKER = "https://trac.xiph.org/newticket"
SECTION = "libs"
-LICENSE = "BSD"
+LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132"
DEPENDS = "libogg"
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch b/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch
deleted file mode 100644
index 39c5059c75..0000000000
--- a/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From f94a29a822f5528d2334592760fbb7938f15eb55 Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Sat, 26 Dec 2015 17:32:03 +0000
-Subject: [PATCH] * libtiff/tif_getimage.c: fix out-of-bound reads in
- TIFFRGBAImage interface in case of unsupported values of
- SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit call to
- TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by
- limingxing and CVE-2015-8683 reported by zzf of Alibaba.
-
-Upstream-Status: Backport
-CVE: CVE-2015-8665
-CVE: CVE-2015-8683
-https://github.com/vadz/libtiff/commit/f94a29a822f5528d2334592760fbb7938f15eb55
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog | 8 ++++++++
- libtiff/tif_getimage.c | 35 ++++++++++++++++++++++-------------
- 2 files changed, 30 insertions(+), 13 deletions(-)
-
-Index: tiff-4.0.6/libtiff/tif_getimage.c
-===================================================================
---- tiff-4.0.6.orig/libtiff/tif_getimage.c
-+++ tiff-4.0.6/libtiff/tif_getimage.c
-@@ -182,20 +182,22 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[102
- "Planarconfiguration", td->td_planarconfig);
- return (0);
- }
-- if( td->td_samplesperpixel != 3 )
-+ if( td->td_samplesperpixel != 3 || colorchannels != 3 )
- {
- sprintf(emsg,
-- "Sorry, can not handle image with %s=%d",
-- "Samples/pixel", td->td_samplesperpixel);
-+ "Sorry, can not handle image with %s=%d, %s=%d",
-+ "Samples/pixel", td->td_samplesperpixel,
-+ "colorchannels", colorchannels);
- return 0;
- }
- break;
- case PHOTOMETRIC_CIELAB:
-- if( td->td_samplesperpixel != 3 || td->td_bitspersample != 8 )
-+ if( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 )
- {
- sprintf(emsg,
-- "Sorry, can not handle image with %s=%d and %s=%d",
-+ "Sorry, can not handle image with %s=%d, %s=%d and %s=%d",
- "Samples/pixel", td->td_samplesperpixel,
-+ "colorchannels", colorchannels,
- "Bits/sample", td->td_bitspersample);
- return 0;
- }
-@@ -255,6 +257,9 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, T
- int colorchannels;
- uint16 *red_orig, *green_orig, *blue_orig;
- int n_color;
-+
-+ if( !TIFFRGBAImageOK(tif, emsg) )
-+ return 0;
-
- /* Initialize to normal values */
- img->row_offset = 0;
-@@ -2508,29 +2513,33 @@ PickContigCase(TIFFRGBAImage* img)
- case PHOTOMETRIC_RGB:
- switch (img->bitspersample) {
- case 8:
-- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
-+ img->samplesperpixel >= 4)
- img->put.contig = putRGBAAcontig8bittile;
-- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
-+ img->samplesperpixel >= 4)
- {
- if (BuildMapUaToAa(img))
- img->put.contig = putRGBUAcontig8bittile;
- }
-- else
-+ else if( img->samplesperpixel >= 3 )
- img->put.contig = putRGBcontig8bittile;
- break;
- case 16:
-- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
-+ img->samplesperpixel >=4 )
- {
- if (BuildMapBitdepth16To8(img))
- img->put.contig = putRGBAAcontig16bittile;
- }
-- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
-+ img->samplesperpixel >=4 )
- {
- if (BuildMapBitdepth16To8(img) &&
- BuildMapUaToAa(img))
- img->put.contig = putRGBUAcontig16bittile;
- }
-- else
-+ else if( img->samplesperpixel >=3 )
- {
- if (BuildMapBitdepth16To8(img))
- img->put.contig = putRGBcontig16bittile;
-@@ -2539,7 +2548,7 @@ PickContigCase(TIFFRGBAImage* img)
- }
- break;
- case PHOTOMETRIC_SEPARATED:
-- if (buildMap(img)) {
-+ if (img->samplesperpixel >=4 && buildMap(img)) {
- if (img->bitspersample == 8) {
- if (!img->Map)
- img->put.contig = putRGBcontig8bitCMYKtile;
-@@ -2635,7 +2644,7 @@ PickContigCase(TIFFRGBAImage* img)
- }
- break;
- case PHOTOMETRIC_CIELAB:
-- if (buildMap(img)) {
-+ if (img->samplesperpixel == 3 && buildMap(img)) {
- if (img->bitspersample == 8)
- img->put.contig = initCIELabConversion(img);
- break;
-Index: tiff-4.0.6/ChangeLog
-===================================================================
---- tiff-4.0.6.orig/ChangeLog
-+++ tiff-4.0.6/ChangeLog
-@@ -1,3 +1,11 @@
-+2015-12-26 Even Rouault <even.rouault at spatialys.com>
-+
-+ * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
-+ interface in case of unsupported values of SamplesPerPixel/ExtraSamples
-+ for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in
-+ TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and
-+ CVE-2015-8683 reported by zzf of Alibaba.
-+
- 2015-09-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * libtiff 4.0.6 released.
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch b/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
deleted file mode 100644
index 0846f0f68e..0000000000
--- a/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-From aaab5c3c9d2a2c6984f23ccbc79702610439bc65 Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Sun, 27 Dec 2015 16:25:11 +0000
-Subject: [PATCH] * libtiff/tif_luv.c: fix potential out-of-bound writes in
- decode functions in non debug builds by replacing assert()s by regular if
- checks (bugzilla #2522). Fix potential out-of-bound reads in case of short
- input data.
-
-Upstream-Status: Backport
-
-https://github.com/vadz/libtiff/commit/aaab5c3c9d2a2c6984f23ccbc79702610439bc65
-hand applied Changelog changes
-
-CVE: CVE-2015-8781
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
----
- ChangeLog | 7 +++++++
- libtiff/tif_luv.c | 55 ++++++++++++++++++++++++++++++++++++++++++++-----------
- 2 files changed, 51 insertions(+), 11 deletions(-)
-
-Index: tiff-4.0.4/ChangeLog
-===================================================================
---- tiff-4.0.4.orig/ChangeLog
-+++ tiff-4.0.4/ChangeLog
-@@ -1,3 +1,10 @@
-+2015-12-27 Even Rouault <even.rouault at spatialys.com>
-+
-+ * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
-+ functions in non debug builds by replacing assert()s by regular if
-+ checks (bugzilla #2522).
-+ Fix potential out-of-bound reads in case of short input data.
-+
- 2015-12-26 Even Rouault <even.rouault at spatialys.com>
-
- * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
-Index: tiff-4.0.4/libtiff/tif_luv.c
-===================================================================
---- tiff-4.0.4.orig/libtiff/tif_luv.c
-+++ tiff-4.0.4/libtiff/tif_luv.c
-@@ -202,7 +202,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
- if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
- tp = (int16*) op;
- else {
-- assert(sp->tbuflen >= npixels);
-+ if(sp->tbuflen < npixels) {
-+ TIFFErrorExt(tif->tif_clientdata, module,
-+ "Translation buffer too short");
-+ return (0);
-+ }
- tp = (int16*) sp->tbuf;
- }
- _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
-@@ -211,9 +215,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
- cc = tif->tif_rawcc;
- /* get each byte string */
- for (shft = 2*8; (shft -= 8) >= 0; ) {
-- for (i = 0; i < npixels && cc > 0; )
-+ for (i = 0; i < npixels && cc > 0; ) {
- if (*bp >= 128) { /* run */
-- rc = *bp++ + (2-128); /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
-+ if( cc < 2 )
-+ break;
-+ rc = *bp++ + (2-128);
- b = (int16)(*bp++ << shft);
- cc -= 2;
- while (rc-- && i < npixels)
-@@ -223,6 +229,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
- while (--cc && rc-- && i < npixels)
- tp[i++] |= (int16)*bp++ << shft;
- }
-+ }
- if (i != npixels) {
- #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
- TIFFErrorExt(tif->tif_clientdata, module,
-@@ -268,13 +275,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tms
- if (sp->user_datafmt == SGILOGDATAFMT_RAW)
- tp = (uint32 *)op;
- else {
-- assert(sp->tbuflen >= npixels);
-+ if(sp->tbuflen < npixels) {
-+ TIFFErrorExt(tif->tif_clientdata, module,
-+ "Translation buffer too short");
-+ return (0);
-+ }
- tp = (uint32 *) sp->tbuf;
- }
- /* copy to array of uint32 */
- bp = (unsigned char*) tif->tif_rawcp;
- cc = tif->tif_rawcc;
-- for (i = 0; i < npixels && cc > 0; i++) {
-+ for (i = 0; i < npixels && cc >= 3; i++) {
- tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
- bp += 3;
- cc -= 3;
-@@ -325,7 +336,11 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
- if (sp->user_datafmt == SGILOGDATAFMT_RAW)
- tp = (uint32*) op;
- else {
-- assert(sp->tbuflen >= npixels);
-+ if(sp->tbuflen < npixels) {
-+ TIFFErrorExt(tif->tif_clientdata, module,
-+ "Translation buffer too short");
-+ return (0);
-+ }
- tp = (uint32*) sp->tbuf;
- }
- _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
-@@ -334,11 +349,13 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
- cc = tif->tif_rawcc;
- /* get each byte string */
- for (shft = 4*8; (shft -= 8) >= 0; ) {
-- for (i = 0; i < npixels && cc > 0; )
-+ for (i = 0; i < npixels && cc > 0; ) {
- if (*bp >= 128) { /* run */
-+ if( cc < 2 )
-+ break;
- rc = *bp++ + (2-128);
- b = (uint32)*bp++ << shft;
-- cc -= 2; /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
-+ cc -= 2;
- while (rc-- && i < npixels)
- tp[i++] |= b;
- } else { /* non-run */
-@@ -346,6 +363,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
- while (--cc && rc-- && i < npixels)
- tp[i++] |= (uint32)*bp++ << shft;
- }
-+ }
- if (i != npixels) {
- #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
- TIFFErrorExt(tif->tif_clientdata, module,
-@@ -413,6 +431,7 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, t
- static int
- LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
- {
-+ static const char module[] = "LogL16Encode";
- LogLuvState* sp = EncoderState(tif);
- int shft;
- tmsize_t i;
-@@ -433,7 +452,11 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsiz
- tp = (int16*) bp;
- else {
- tp = (int16*) sp->tbuf;
-- assert(sp->tbuflen >= npixels);
-+ if(sp->tbuflen < npixels) {
-+ TIFFErrorExt(tif->tif_clientdata, module,
-+ "Translation buffer too short");
-+ return (0);
-+ }
- (*sp->tfunc)(sp, bp, npixels);
- }
- /* compress each byte string */
-@@ -506,6 +529,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsiz
- static int
- LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
- {
-+ static const char module[] = "LogLuvEncode24";
- LogLuvState* sp = EncoderState(tif);
- tmsize_t i;
- tmsize_t npixels;
-@@ -521,7 +545,11 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tms
- tp = (uint32*) bp;
- else {
- tp = (uint32*) sp->tbuf;
-- assert(sp->tbuflen >= npixels);
-+ if(sp->tbuflen < npixels) {
-+ TIFFErrorExt(tif->tif_clientdata, module,
-+ "Translation buffer too short");
-+ return (0);
-+ }
- (*sp->tfunc)(sp, bp, npixels);
- }
- /* write out encoded pixels */
-@@ -553,6 +581,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tms
- static int
- LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
- {
-+ static const char module[] = "LogLuvEncode32";
- LogLuvState* sp = EncoderState(tif);
- int shft;
- tmsize_t i;
-@@ -574,7 +603,11 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tms
- tp = (uint32*) bp;
- else {
- tp = (uint32*) sp->tbuf;
-- assert(sp->tbuflen >= npixels);
-+ if(sp->tbuflen < npixels) {
-+ TIFFErrorExt(tif->tif_clientdata, module,
-+ "Translation buffer too short");
-+ return (0);
-+ }
- (*sp->tfunc)(sp, bp, npixels);
- }
- /* compress each byte string */
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch b/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
deleted file mode 100644
index 0caf800e23..0000000000
--- a/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From b18012dae552f85dcc5c57d3bf4e997a15b1cc1c Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Sun, 27 Dec 2015 16:55:20 +0000
-Subject: [PATCH] * libtiff/tif_next.c: fix potential out-of-bound write in
- NeXTDecode() triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
- (bugzilla #2508)
-
-Upstream-Status: Backport
-https://github.com/vadz/libtiff/commit/b18012dae552f85dcc5c57d3bf4e997a15b1cc1c
-hand applied Changelog changes
-
-CVE: CVE-2015-8784
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog | 6 ++++++
- libtiff/tif_next.c | 10 ++++++++--
- 2 files changed, 14 insertions(+), 2 deletions(-)
-
-Index: tiff-4.0.4/ChangeLog
-===================================================================
---- tiff-4.0.4.orig/ChangeLog
-+++ tiff-4.0.4/ChangeLog
-@@ -1,5 +1,11 @@
- 2015-12-27 Even Rouault <even.rouault at spatialys.com>
-
-+ * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
-+ triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
-+ (bugzilla #2508)
-+
-+2015-12-27 Even Rouault <even.rouault at spatialys.com>
-+
- * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
- functions in non debug builds by replacing assert()s by regular if
- checks (bugzilla #2522).
-Index: tiff-4.0.4/libtiff/tif_next.c
-===================================================================
---- tiff-4.0.4.orig/libtiff/tif_next.c
-+++ tiff-4.0.4/libtiff/tif_next.c
-@@ -37,7 +37,7 @@
- case 0: op[0] = (unsigned char) ((v) << 6); break; \
- case 1: op[0] |= (v) << 4; break; \
- case 2: op[0] |= (v) << 2; break; \
-- case 3: *op++ |= (v); break; \
-+ case 3: *op++ |= (v); op_offset++; break; \
- } \
- }
-
-@@ -106,6 +106,7 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize
- uint32 imagewidth = tif->tif_dir.td_imagewidth;
- if( isTiled(tif) )
- imagewidth = tif->tif_dir.td_tilewidth;
-+ tmsize_t op_offset = 0;
-
- /*
- * The scanline is composed of a sequence of constant
-@@ -122,10 +123,15 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize
- * bounds, potentially resulting in a security
- * issue.
- */
-- while (n-- > 0 && npixels < imagewidth)
-+ while (n-- > 0 && npixels < imagewidth && op_offset < scanline)
- SETPIXEL(op, grey);
- if (npixels >= imagewidth)
- break;
-+ if (op_offset >= scanline ) {
-+ TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld",
-+ (long) tif->tif_row);
-+ return (0);
-+ }
- if (cc == 0)
- goto bad;
- n = *bp++, cc--;
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch b/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch
deleted file mode 100644
index 4a08aba211..0000000000
--- a/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Buffer overflow in the readextension function in gif2tiff.c
-allows remote attackers to cause a denial of service via a crafted GIF file.
-
-External References:
-https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3186
-https://bugzilla.redhat.com/show_bug.cgi?id=1319503
-
-CVE: CVE-2016-3186
-Upstream-Status: Backport (RedHat)
-https://bugzilla.redhat.com/attachment.cgi?id=1144235&action=diff
-
-Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
-
---- tiff-4.0.6/tools/gif2tiff.c 2016-04-06 15:43:01.586048341 +0200
-+++ tiff-4.0.6/tools/gif2tiff.c 2016-04-06 15:48:05.523207710 +0200
-@@ -349,7 +349,7 @@
- int status = 1;
-
- (void) getc(infile);
-- while ((count = getc(infile)) && count <= 255)
-+ while ((count = getc(infile)) && count >= 0 && count <= 255)
- if (fread(buf, 1, count, infile) != (size_t) count) {
- fprintf(stderr, "short read from file %s (%s)\n",
- filename, strerror(errno));
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch b/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
deleted file mode 100644
index 63c665024b..0000000000
--- a/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From d9783e4a1476b6787a51c5ae9e9b3156527589f0 Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Mon, 11 Jul 2016 21:26:03 +0000
-Subject: [PATCH 1/2] * tools/tiffcrop.c: Avoid access outside of stack
- allocated array on a tiled separate TIFF with more than 8 samples per pixel.
- Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
- (CVE-2016-5321, bugzilla #2558)
-
-CVE: CVE-2016-5321
-Upstream-Status: Backport
-https://github.com/vadz/libtiff/commit/d9783e4a1476b6787a51c5ae9e9b3156527589f0
-
-Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
----
- ChangeLog | 7 +++++++
- tools/tiffcrop.c | 2 +-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index e98d54d..4e0302f 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,10 @@
-+2016-07-11 Even Rouault <even.rouault at spatialys.com>
-+
-+ * tools/tiffcrop.c: Avoid access outside of stack allocated array
-+ on a tiled separate TIFF with more than 8 samples per pixel.
-+ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
-+ (CVE-2016-5321, bugzilla #2558)
-+
- 2015-12-27 Even Rouault <even.rouault at spatialys.com>
-
- * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
-diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
-index d959ae3..6fc8fc1 100644
---- a/tools/tiffcrop.c
-+++ b/tools/tiffcrop.c
-@@ -989,7 +989,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8 *obuf,
- nrow = (row + tl > imagelength) ? imagelength - row : tl;
- for (col = 0; col < imagewidth; col += tw)
- {
-- for (s = 0; s < spp; s++)
-+ for (s = 0; s < spp && s < MAX_SAMPLES; s++)
- { /* Read each plane of a tile set into srcbuffs[s] */
- tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s);
- if (tbytes < 0 && !ignore)
---
-2.7.4
-
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch b/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch
deleted file mode 100644
index 41eab91ab4..0000000000
--- a/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From 2f79856097f423eb33796a15fcf700d2ea41bf31 Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Mon, 11 Jul 2016 21:38:31 +0000
-Subject: [PATCH 2/2] (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559)
-
-CVE: CVE-2016-5323
-Upstream-Status: Backport
-https://github.com/vadz/libtiff/commit/2f79856097f423eb33796a15fcf700d2ea41bf31
-
-Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
----
- ChangeLog | 2 +-
- tools/tiffcrop.c | 16 ++++++++--------
- 2 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 4e0302f..62dc1b5 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -3,7 +3,7 @@
- * tools/tiffcrop.c: Avoid access outside of stack allocated array
- on a tiled separate TIFF with more than 8 samples per pixel.
- Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
-- (CVE-2016-5321, bugzilla #2558)
-+ (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559)
-
- 2016-07-10 Even Rouault <even.rouault at spatialys.com>
-
-diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
-index 6fc8fc1..27abc0b 100644
---- a/tools/tiffcrop.c
-+++ b/tools/tiffcrop.c
-@@ -3738,7 +3738,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
-
- matchbits = maskbits << (8 - src_bit - bps);
- /* load up next sample from each plane */
-- for (s = 0; s < spp; s++)
-+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
- {
- src = in[s] + src_offset + src_byte;
- buff1 = ((*src) & matchbits) << (src_bit);
-@@ -3837,7 +3837,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
- src_bit = bit_offset % 8;
-
- matchbits = maskbits << (16 - src_bit - bps);
-- for (s = 0; s < spp; s++)
-+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
- {
- src = in[s] + src_offset + src_byte;
- if (little_endian)
-@@ -3947,7 +3947,7 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
- src_bit = bit_offset % 8;
-
- matchbits = maskbits << (32 - src_bit - bps);
-- for (s = 0; s < spp; s++)
-+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
- {
- src = in[s] + src_offset + src_byte;
- if (little_endian)
-@@ -4073,7 +4073,7 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
- src_bit = bit_offset % 8;
-
- matchbits = maskbits << (64 - src_bit - bps);
-- for (s = 0; s < spp; s++)
-+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
- {
- src = in[s] + src_offset + src_byte;
- if (little_endian)
-@@ -4263,7 +4263,7 @@ combineSeparateTileSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
-
- matchbits = maskbits << (8 - src_bit - bps);
- /* load up next sample from each plane */
-- for (s = 0; s < spp; s++)
-+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
- {
- src = in[s] + src_offset + src_byte;
- buff1 = ((*src) & matchbits) << (src_bit);
-@@ -4362,7 +4362,7 @@ combineSeparateTileSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
- src_bit = bit_offset % 8;
-
- matchbits = maskbits << (16 - src_bit - bps);
-- for (s = 0; s < spp; s++)
-+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
- {
- src = in[s] + src_offset + src_byte;
- if (little_endian)
-@@ -4471,7 +4471,7 @@ combineSeparateTileSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
- src_bit = bit_offset % 8;
-
- matchbits = maskbits << (32 - src_bit - bps);
-- for (s = 0; s < spp; s++)
-+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
- {
- src = in[s] + src_offset + src_byte;
- if (little_endian)
-@@ -4597,7 +4597,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
- src_bit = bit_offset % 8;
-
- matchbits = maskbits << (64 - src_bit - bps);
-- for (s = 0; s < spp; s++)
-+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
- {
- src = in[s] + src_offset + src_byte;
- if (little_endian)
---
-2.7.4
-
diff --git a/meta/recipes-multimedia/libtiff/files/libtool2.patch b/meta/recipes-multimedia/libtiff/files/libtool2.patch
deleted file mode 100644
index 457202eae5..0000000000
--- a/meta/recipes-multimedia/libtiff/files/libtool2.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: tiff-3.9.5/configure.ac
-===================================================================
---- tiff-3.9.5.orig/configure.ac
-+++ tiff-3.9.5/configure.ac
-@@ -27,7 +27,7 @@ dnl Process this file with autoconf to p
- AC_PREREQ(2.64)
- AC_INIT([LibTIFF Software],[3.9.5],[tiff@lists.maptools.org],[tiff])
- AC_CONFIG_AUX_DIR(config)
--AC_CONFIG_MACRO_DIR(m4)
-+dnl AC_CONFIG_MACRO_DIR(m4)
- AC_LANG(C)
-
- dnl Compute the canonical host (run-time) system type variable
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
deleted file mode 100644
index 8147bc4fb0..0000000000
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
-
-SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
- file://libtool2.patch \
- file://CVE-2015-8665_8683.patch \
- file://CVE-2015-8781.patch \
- file://CVE-2015-8784.patch \
- file://CVE-2016-3186.patch \
- file://CVE-2016-5321.patch \
- file://CVE-2016-5323.patch \
- "
-
-SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
-SRC_URI[sha256sum] = "4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c"
-
-# exclude betas
-UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
-
-inherit autotools
-
-CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
-
-PACKAGECONFIG ?= "cxx jpeg zlib lzma \
- strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
-
-PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
-PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
-
-# Convert single-strip uncompressed images to multiple strips of specified
-# size (default: 8192) to reduce memory usage
-PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
-
-# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
-PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
-
-# Control picking up YCbCr subsample info. Disable to support files lacking
-# the tag
-PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
-
-# Support a mechanism allowing reading large strips (usually one strip files)
-# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
-PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
-
-PACKAGES =+ "tiffxx tiff-utils"
-FILES_tiffxx = "${libdir}/libtiffxx.so.*"
-FILES_tiff-utils = "${bindir}/*"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb
new file mode 100644
index 0000000000..1f92c18513
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
+
+CVE_PRODUCT = "libtiff"
+
+SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
+ "
+SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424"
+SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634"
+
+# exclude betas
+UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
+
+inherit autotools multilib_header
+
+CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
+
+PACKAGECONFIG ?= "cxx jpeg zlib lzma \
+ strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
+
+# Convert single-strip uncompressed images to multiple strips of specified
+# size (default: 8192) to reduce memory usage
+PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
+
+# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
+PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
+
+# Control picking up YCbCr subsample info. Disable to support files lacking
+# the tag
+PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
+
+# Support a mechanism allowing reading large strips (usually one strip files)
+# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
+PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
+
+PACKAGES =+ "tiffxx tiff-utils"
+FILES_tiffxx = "${libdir}/libtiffxx.so.*"
+FILES_tiff-utils = "${bindir}/*"
+
+do_install_append() {
+ oe_multilib_header tiffconf.h
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch
new file mode 100644
index 0000000000..b06029b98b
--- /dev/null
+++ b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch
@@ -0,0 +1,56 @@
+From d619ccf6c11ab574466914c57994a82fb99401af Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 22 Mar 2017 16:06:55 +0000
+Subject: [PATCH] configure: Check for clang
+
+Disable gcc specific options if using clang
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 28b0a14..2d4e984 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,6 +98,16 @@ AC_ARG_ENABLE(examples,
+
+ AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes])
+
++AC_MSG_CHECKING([whether C compiler is clang])
++$CC -x c /dev/null -dM -E > conftest.txt 2>&1
++if grep "__clang__" conftest.txt >/dev/null 2>&1; then
++ AC_SUBST([CC_CLANG], [1])
++ AC_MSG_RESULT([yes])
++ else
++ AC_SUBST([CC_CLANG], [0])
++ AC_MSG_RESULT([no])
++fi
++
+ dnl --------------------------------------------------
+ dnl Set build flags based on environment
+ dnl --------------------------------------------------
+@@ -132,10 +142,15 @@ else
+ AC_MSG_RESULT([$GCC_VERSION])
+ case $host in
+ *86-*-linux*)
++ if test "$CC_CLANG" = "1"; then
++ ieeefp=""
++ else
++ ieefp="-mno-ieee-fp"
++ fi
+ DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
+- CFLAGS="-O3 -Wall -Wextra -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
++ CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char ${ieefp}"
+ # PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
+- PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline"
++ PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math ${ieefp} -D_REENTRANT -fsigned-char -fno-inline"
+
+ # glibc < 2.1.3 has a serious FP bug in the math inline header
+ # that will cripple Vorbis. Look to see if the magic FP stack
+--
+2.17.0
+
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14160.patch b/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14160.patch
new file mode 100644
index 0000000000..b7603c3b13
--- /dev/null
+++ b/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14160.patch
@@ -0,0 +1,34 @@
+From 018ca26dece618457dd13585cad52941193c4a25 Mon Sep 17 00:00:00 2001
+From: Thomas Daede <daede003@umn.edu>
+Date: Wed, 9 May 2018 14:56:59 -0700
+Subject: [PATCH] CVE-2017-14160: fix bounds check on very low sample rates.
+
+---
+CVE: CVE-2017-14160 CVE-2018-10393
+
+Upstream-Status: Backport [gitlab.com/Xiph.Org/Vorbis/Commits/018ca26d...]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+---
+---
+ lib/psy.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/psy.c b/lib/psy.c
+index 422c6f1..1310123 100644
+--- a/lib/psy.c
++++ b/lib/psy.c
+@@ -602,8 +602,9 @@ static void bark_noise_hybridmp(int n,const long *b,
+ for (i = 0, x = 0.f;; i++, x += 1.f) {
+
+ lo = b[i] >> 16;
+- if( lo>=0 ) break;
+ hi = b[i] & 0xffff;
++ if( lo>=0 ) break;
++ if( hi>=n ) break;
+
+ tN = N[hi] + N[-lo];
+ tX = X[hi] - X[-lo];
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-10392.patch b/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-10392.patch
new file mode 100644
index 0000000000..b7936b4b4d
--- /dev/null
+++ b/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-10392.patch
@@ -0,0 +1,34 @@
+From 112d3bd0aaacad51305e1464d4b381dabad0e88b Mon Sep 17 00:00:00 2001
+From: Thomas Daede <daede003@umn.edu>
+Date: Thu, 17 May 2018 16:19:19 -0700
+Subject: [PATCH] Sanity check number of channels in setup.
+
+Fixes #2335.
+
+---
+CVE: CVE-2018-10392
+
+Upstream-Status: Backport [gitlab.com/Xiph.Org/Vorbis/Commits/112d3bd...]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+---
+
+ lib/vorbisenc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+
+diff --git a/lib/vorbisenc.c b/lib/vorbisenc.c
+index 4fc7b62..64a51b5 100644
+--- a/lib/vorbisenc.c
++++ b/lib/vorbisenc.c
+@@ -684,6 +684,7 @@ int vorbis_encode_setup_init(vorbis_info *vi){
+ highlevel_encode_setup *hi=&ci->hi;
+
+ if(ci==NULL)return(OV_EINVAL);
++ if(vi->channels<1||vi->channels>255)return(OV_EINVAL);
+ if(!hi->impulse_block_p)i0=1;
+
+ /* too low/high an ATH floater is nonsensical, but doesn't break anything */
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
deleted file mode 100644
index 636e0f307b..0000000000
--- a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Ogg Vorbis Audio Codec"
-DESCRIPTION = "Ogg Vorbis is a high-quality lossy audio codec \
-that is free of intellectual property restrictions. libvorbis \
-is the main vorbis codec library."
-HOMEPAGE = "http://www.vorbis.com/"
-BUGTRACKER = "https://trac.xiph.org"
-SECTION = "libs"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7d2c487d2fc7dd3e3c7c465a5b7f6217 \
- file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=d1c1d138863d6315131193d4046d81cb"
-DEPENDS = "libogg"
-
-SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz"
-SRC_URI[md5sum] = "28cb28097c07a735d6af56e598e1c90f"
-SRC_URI[sha256sum] = "54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1"
-
-inherit autotools pkgconfig
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.6.bb b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.6.bb
new file mode 100644
index 0000000000..1a3cdc2269
--- /dev/null
+++ b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.6.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Ogg Vorbis Audio Codec"
+DESCRIPTION = "Ogg Vorbis is a high-quality lossy audio codec \
+that is free of intellectual property restrictions. libvorbis \
+is the main vorbis codec library."
+HOMEPAGE = "http://www.vorbis.com/"
+BUGTRACKER = "https://trac.xiph.org"
+SECTION = "libs"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=70c7063491d2d9f76a098d62ed5134f1 \
+ file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=d1c1d138863d6315131193d4046d81cb"
+DEPENDS = "libogg"
+
+SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \
+ file://0001-configure-Check-for-clang.patch \
+ file://CVE-2018-10392.patch \
+ file://CVE-2017-14160.patch \
+ "
+SRC_URI[md5sum] = "b7d1692f275c73e7833ed1cc2697cd65"
+SRC_URI[sha256sum] = "af00bb5a784e7c9e69f56823de4637c350643deedaf333d0fa86ecdba6fcb415"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch b/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch
new file mode 100644
index 0000000000..b2544cb44d
--- /dev/null
+++ b/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch
@@ -0,0 +1,156 @@
+From 0cafb99b57f43cf6ac2c6208718e49ad2dbe462d Mon Sep 17 00:00:00 2001
+From: Jan Schmidt <thaytan@noraisin.net>
+Date: Sun, 10 Nov 2013 00:49:52 +1100
+Subject: [PATCH] Import revision 1206 from upstream to fix PIE build.
+
+Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm
+in libmpeg2/motion_comp_arm_s.S have addresses in .text, which is bad
+for shared libraries. Some environments demand that .text actually be
+read-only all the time, yet MC_put_o_16_arm etc require that the addresses
+be modified by the dynamic linking mechanism (dlopen, LoadLibrary, etc.)
+Even in those environments which permit the dynamic linker to modify the
+.text segment, the runtime cost of doing the relocation can be noticeable.
+
+This commit rewrites the linkage, discarding the tables of addresses
+in favor of tables of offsets. All transfers are local within each individual
+function, so there can be no interference by processing that occurs
+after assembly, such as link-time re-ordering (even of individual functions.)
+
+Patch by John Reiser <jreiser@bitwagon.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://code.videolan.org/videolan/libmpeg2/commit/946bf4b518aacc224f845e73708f99e394744499]
+---
+ libmpeg2/motion_comp_arm_s.S | 70 +++++++++++++++++-------------------
+ 1 file changed, 33 insertions(+), 37 deletions(-)
+
+diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S
+index c921f7c..82143f8 100644
+--- a/libmpeg2/motion_comp_arm_s.S
++++ b/libmpeg2/motion_comp_arm_s.S
+@@ -30,9 +30,13 @@ MC_put_o_16_arm:
+ pld [r1]
+ stmfd sp!, {r4-r11, lr} @ R14 is also called LR
+ and r4, r1, #3
+- adr r5, MC_put_o_16_arm_align_jt
+- add r5, r5, r4, lsl #2
+- ldr pc, [r5]
++ ldrb r4, [pc, r4]
++ add pc, pc, r4, lsl #2
++ .byte (MC_put_o_16_arm_align0 - 0f)>>2
++ .byte (MC_put_o_16_arm_align1 - 0f)>>2
++ .byte (MC_put_o_16_arm_align2 - 0f)>>2
++ .byte (MC_put_o_16_arm_align3 - 0f)>>2
++0:
+
+ MC_put_o_16_arm_align0:
+ ldmia r1, {r4-r7}
+@@ -76,11 +80,6 @@ MC_put_o_16_arm_align3:
+ 1: PROC(24)
+ bne 1b
+ ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
+-MC_put_o_16_arm_align_jt:
+- .word MC_put_o_16_arm_align0
+- .word MC_put_o_16_arm_align1
+- .word MC_put_o_16_arm_align2
+- .word MC_put_o_16_arm_align3
+
+ @ ----------------------------------------------------------------
+ .align
+@@ -91,9 +90,14 @@ MC_put_o_8_arm:
+ pld [r1]
+ stmfd sp!, {r4-r10, lr} @ R14 is also called LR
+ and r4, r1, #3
+- adr r5, MC_put_o_8_arm_align_jt
+- add r5, r5, r4, lsl #2
+- ldr pc, [r5]
++ ldrb r4, [pc, r4]
++ add pc, pc, r4, lsl #2
++ .byte (MC_put_o_8_arm_align0 - 0f)>>2
++ .byte (MC_put_o_8_arm_align1 - 0f)>>2
++ .byte (MC_put_o_8_arm_align2 - 0f)>>2
++ .byte (MC_put_o_8_arm_align3 - 0f)>>2
++0:
++
+ MC_put_o_8_arm_align0:
+ ldmia r1, {r4-r5}
+ add r1, r1, r2
+@@ -135,12 +139,6 @@ MC_put_o_8_arm_align3:
+ bne 1b
+ ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
+
+-MC_put_o_8_arm_align_jt:
+- .word MC_put_o_8_arm_align0
+- .word MC_put_o_8_arm_align1
+- .word MC_put_o_8_arm_align2
+- .word MC_put_o_8_arm_align3
+-
+ @ ----------------------------------------------------------------
+ .macro AVG_PW rW1, rW2
+ mov \rW2, \rW2, lsl #24
+@@ -160,12 +158,17 @@ MC_put_x_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+ stmfd sp!, {r4-r11,lr} @ R14 is also called LR
++ ldr r11, 0f
+ and r4, r1, #3
+- adr r5, MC_put_x_16_arm_align_jt
+- ldr r11, [r5]
+ mvn r12, r11
+- add r5, r5, r4, lsl #2
+- ldr pc, [r5, #4]
++ ldrb r4, [pc, r4]
++ add pc, pc, r4, lsl #2
++ .byte (MC_put_x_16_arm_align0 - 0f)>>2
++ .byte (MC_put_x_16_arm_align1 - 0f)>>2
++ .byte (MC_put_x_16_arm_align2 - 0f)>>2
++ .byte (MC_put_x_16_arm_align3 - 0f)>>2
++0:
++ .word 0x01010101
+
+ .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4
+ mov \R0, \R0, lsr #(\shift)
+@@ -238,12 +241,6 @@ MC_put_x_16_arm_align3:
+ add r0, r0, r2
+ bne 1b
+ ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
+-MC_put_x_16_arm_align_jt:
+- .word 0x01010101
+- .word MC_put_x_16_arm_align0
+- .word MC_put_x_16_arm_align1
+- .word MC_put_x_16_arm_align2
+- .word MC_put_x_16_arm_align3
+
+ @ ----------------------------------------------------------------
+ .align
+@@ -253,12 +250,17 @@ MC_put_x_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+ stmfd sp!, {r4-r11,lr} @ R14 is also called LR
++ ldr r11, 0f
+ and r4, r1, #3
+- adr r5, MC_put_x_8_arm_align_jt
+- ldr r11, [r5]
+ mvn r12, r11
+- add r5, r5, r4, lsl #2
+- ldr pc, [r5, #4]
++ ldrb r4, [pc, r4]
++ add pc, pc, r4, lsl #2
++ .byte (MC_put_x_8_arm_align0 - 0f)>>2
++ .byte (MC_put_x_8_arm_align1 - 0f)>>2
++ .byte (MC_put_x_8_arm_align2 - 0f)>>2
++ .byte (MC_put_x_8_arm_align3 - 0f)>>2
++0:
++ .word 0x01010101
+
+ .macro ADJ_ALIGN_DW shift, R0, R1, R2
+ mov \R0, \R0, lsr #(\shift)
+@@ -319,9 +321,3 @@ MC_put_x_8_arm_align3:
+ add r0, r0, r2
+ bne 1b
+ ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
+-MC_put_x_8_arm_align_jt:
+- .word 0x01010101
+- .word MC_put_x_8_arm_align0
+- .word MC_put_x_8_arm_align1
+- .word MC_put_x_8_arm_align2
+- .word MC_put_x_8_arm_align3
diff --git a/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch b/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch
new file mode 100644
index 0000000000..5bf68b39ee
--- /dev/null
+++ b/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch
@@ -0,0 +1,55 @@
+From cbcff58ed670c8edc0be1004384cbe0fd07d8d26 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Jul 2017 18:49:21 -0700
+Subject: [PATCH 1/2] check for available arm optimizations
+
+Taken From
+http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/65_arm-test-with-compiler.patch/
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index acdcb1e..2c0a721 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -59,7 +59,7 @@ elif test x"$GCC" = x"yes"; then
+ AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
+
+ dnl arch-specific flags
+- arm_conditional=false
++ build_arm_opt=false
+ case "$host" in
+ i?86-* | k?-* | x86_64-* | amd64-*)
+ AC_DEFINE([ARCH_X86],,[x86 architecture])
+@@ -102,8 +102,12 @@ elif test x"$GCC" = x"yes"; then
+ alpha*)
+ AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);;
+ arm*)
+- arm_conditional=:
+- AC_DEFINE([ARCH_ARM],,[ARM architecture]);;
++ AC_LANG(C)
++ AC_COMPILE_IFELSE(
++ [AC_LANG_SOURCE([[
++ void foo(void) { __asm__ volatile("pld [r1]"); }]])],
++ build_arm_opt=true; AC_DEFINE([ARCH_ARM],,[ARM architecture]),
++ build_arm_opt=false);;
+ esac
+ elif test x"$CC" = x"tendracc"; then
+ dnl TenDRA portability checking compiler
+@@ -123,7 +127,7 @@ else
+ esac
+ fi
+
+-AM_CONDITIONAL(ARCH_ARM, ${arm_conditional})
++AM_CONDITIONAL(ARCH_ARM, test x$build_arm_opt = xtrue)
+
+ dnl Checks for libtool - this must be done after we set cflags
+ AC_LIBTOOL_WIN32_DLL
+--
+2.13.2
+
diff --git a/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch b/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch
new file mode 100644
index 0000000000..8301692368
--- /dev/null
+++ b/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch
@@ -0,0 +1,63 @@
+From f9d9dc92d75f8910e3cd5fdcbea72e505cdf3493 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Jul 2017 19:03:36 -0700
+Subject: [PATCH 2/2] Set visibility of global symbols used in ARM specific
+ assembly file to internal
+
+Taken from
+http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/60_arm-private-symbols.patch/
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libmpeg2/motion_comp_arm_s.S | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S
+index f6c3d7d..c921f7c 100644
+--- a/libmpeg2/motion_comp_arm_s.S
++++ b/libmpeg2/motion_comp_arm_s.S
+@@ -23,7 +23,8 @@
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_o_16_arm
++ .global MC_put_o_16_arm
++ .internal MC_put_o_16_arm
+ MC_put_o_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -83,7 +84,8 @@ MC_put_o_16_arm_align_jt:
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_o_8_arm
++ .global MC_put_o_8_arm
++ .internal MC_put_o_8_arm
+ MC_put_o_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -152,7 +154,8 @@ MC_put_o_8_arm_align_jt:
+ .endm
+
+ .align
+- .global MC_put_x_16_arm
++ .global MC_put_x_16_arm
++ .internal MC_put_x_16_arm
+ MC_put_x_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -244,7 +247,8 @@ MC_put_x_16_arm_align_jt:
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_x_8_arm
++ .global MC_put_x_8_arm
++ .internal MC_put_x_8_arm
+ MC_put_x_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+--
+2.13.2
+
diff --git a/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch b/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch
new file mode 100644
index 0000000000..00b667d336
--- /dev/null
+++ b/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch
@@ -0,0 +1,70 @@
+Rewrite the public symbol check to verify the shared libraries, to check for
+more things, and to avoid duplication; fixes make check on ARM
+
+Taken From
+https://sources.debian.org/src/mpeg2dec/0.5.1-8/debian/patches/61_global-symbol-test.patch/
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ test/globals | 42 +++++++++++++++++++++++++++---------------
+ 1 file changed, 27 insertions(+), 15 deletions(-)
+
+--- mpeg2dec.orig/test/globals
++++ mpeg2dec/test/globals
+@@ -1,4 +1,8 @@
+ #!/bin/sh
++# TODO
++# - fix checking of .a libs; problem is that "nm -g --defined-only" lists
++# internal symbols; this can be solved by using objdump, but it's probably
++# good enough to just run the tests on the shared lib
+
+ if test x"$srcdir" != x""; then
+ builddir="." # running from make check, but it does not define that
+@@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd`
+
+ error=0
+
+-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\
+- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'`
+-
+-if test x"$bad_globals" != x""; then
+- echo BAD GLOBAL SYMBOLS:
+- for s in $bad_globals; do echo $s; done
++# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...]
++#
++# checks public symbols in shared libs:
++# - allow prefix_anything
++# - reject _prefixanything
++# - allow _anything
++# - reject anything else
++#
++# NB: skips missing files
++check_bad_public_symbols() {
++ symbols_prefix="$1"
++ shift
++ lib_files=`ls "$@" 2>/dev/null`
++ [ -z "$lib_files" ] && return
++ bad_globals=`nm -g --defined-only $lib_files |
++ awk '{if ($3) print $3}' |
++ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"`
++ [ -z "$bad_globals" ] && return
+ error=1
+-fi
+-
+-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\
+- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'`
++ echo BAD GLOBAL SYMBOLS in $lib_files:
++ echo "$bad_globals"
++}
+
+-if test x"$bad_globals" != x""; then
+- echo BAD GLOBAL SYMBOLS:
+- for s in $bad_globals; do echo $s; done
+- error=1
+-fi
++check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so
++check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so
+
+ exit $error
diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch b/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch
index 7dc56436f0..5113ad44fe 100644
--- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch
+++ b/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch
@@ -24,10 +24,10 @@ Upstream-Status: Pending
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-diff -ruN mpeg2dec-0.4.1-orig/configure.in mpeg2dec-0.4.1/configure.in
---- mpeg2dec-0.4.1-orig/configure.in 2010-09-14 20:55:42.399687663 +0800
-+++ mpeg2dec-0.4.1/configure.in 2010-09-14 20:56:43.403204648 +0800
-@@ -75,11 +75,11 @@
+diff -ruN a/configure.in b/configure.in
+--- a/configure.ac 2010-09-14 20:55:42.399687663 +0800
++++ b/configure.ac 2010-09-14 20:56:43.403204648 +0800
+@@ -79,11 +79,11 @@
CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
AC_MSG_CHECKING([if <altivec.h> is needed])
AC_TRY_COMPILE([],
diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
deleted file mode 100644
index 16669947f9..0000000000
--- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams"
-HOMEPAGE = "http://libmpeg2.sourceforge.net/"
-SECTION = "libs"
-LICENSE = "GPLv2+"
-LICENSE_FLAGS = "commercial"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://include/mpeg2.h;beginline=1;endline=22;md5=ead62602d4638329d3b5b86a55803154"
-
-PR = "r2"
-
-SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz \
- file://altivec_h_needed.patch"
-
-SRC_URI[md5sum] = "7631b0a4bcfdd0d78c0bb0083080b0dc"
-SRC_URI[sha256sum] = "c74a76068f8ec36d4bb59a03bf1157be44118ca02252180e8b358b0b5e3edeee"
-
-UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--enable-shared --disable-sdl"
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv"
-
-PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev"
-
-FILES_${PN} = "${bindir}/*"
-FILES_libmpeg2 = "${libdir}/libmpeg2.so.*"
-FILES_libmpeg2convert = "${libdir}/libmpeg2convert.so.*"
-FILES_libmpeg2-dev = "${libdir}/libmpeg2.so \
- ${libdir}/libmpeg2.la \
- ${libdir}/pkgconfig/libmpeg2.pc \
- ${includedir}/mpeg2dec/mpeg2.h"
-FILES_libmpeg2-staticdev = "${libdir}/libmpeg2.a"
-FILES_libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \
- ${libdir}/libmpeg2convert.la \
- ${libdir}/pkgconfig/libmpeg2convert.pc \
- ${includedir}/mpeg2dec/mpeg2convert.h"
-FILES_libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a"
diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb
new file mode 100644
index 0000000000..00ca3675ca
--- /dev/null
+++ b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams"
+HOMEPAGE = "http://libmpeg2.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://include/mpeg2.h;beginline=1;endline=22;md5=7766f4fcb58f0f8413c49a746f2ab89b"
+
+SRC_URI = "http://libmpeg2.sourceforge.net/files/libmpeg2-${PV}.tar.gz \
+ file://altivec_h_needed.patch \
+ file://0001-check-for-available-arm-optimizations.patch \
+ file://0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch \
+ file://61_global-symbol-test.patch \
+ file://0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch \
+ "
+
+S = "${WORKDIR}/libmpeg2-${PV}"
+
+SRC_URI[md5sum] = "0f92c7454e58379b4a5a378485bbd8ef"
+SRC_URI[sha256sum] = "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4"
+
+UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-shared --disable-sdl"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv"
+
+PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev"
+
+FILES_${PN} = "${bindir}/*"
+FILES_libmpeg2 = "${libdir}/libmpeg2.so.*"
+FILES_libmpeg2convert = "${libdir}/libmpeg2convert.so.*"
+FILES_libmpeg2-dev = "${libdir}/libmpeg2.so \
+ ${libdir}/libmpeg2.la \
+ ${libdir}/libmpeg2arch.la \
+ ${libdir}/pkgconfig/libmpeg2.pc \
+ ${includedir}/mpeg2dec/mpeg2.h"
+FILES_libmpeg2-staticdev = "${libdir}/libmpeg2.a"
+FILES_libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \
+ ${libdir}/libmpeg2convert.la \
+ ${libdir}/libmpeg2convertarch.la \
+ ${libdir}/pkgconfig/libmpeg2convert.pc \
+ ${includedir}/mpeg2dec/mpeg2convert.h"
+FILES_libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a"
diff --git a/meta/recipes-multimedia/mpg123/mpg123/sdl2.patch b/meta/recipes-multimedia/mpg123/mpg123/sdl2.patch
new file mode 100644
index 0000000000..9dc9b923df
--- /dev/null
+++ b/meta/recipes-multimedia/mpg123/mpg123/sdl2.patch
@@ -0,0 +1,14 @@
+Use libsdl2 instead of libsdl 1.2, which is dead upstream.
+
+Luckily the API that mpg123 use didn't change so this is a trivial change.
+
+Upstream-Status: Submitted [https://sourceforge.net/p/mpg123/bugs/268/]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index 6216d4f..b8d3344 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1694 +1694 @@ do
+- PKG_CHECK_MODULES(SDL, sdl, output_modules="$output_modules sdl" HAVE_SDL="yes", HAVE_SDL="no" check_failed=yes)
++ PKG_CHECK_MODULES(SDL, sdl2, output_modules="$output_modules sdl" HAVE_SDL="yes", HAVE_SDL="no" check_failed=yes)
diff --git a/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb b/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb
deleted file mode 100644
index 6ee457d048..0000000000
--- a/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
-DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
-mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
-and also can write the decoded audio to WAV."
-HOMEPAGE = "http://mpg123.de/"
-BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
-SECTION = "multimedia"
-
-LICENSE = "LGPLv2.1"
-LICENSE_FLAGS = "commercial"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
-
-SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "ed22a3e664f076fa05131a3454ef8166"
-SRC_URI[sha256sum] = "4073d9c60a43872f6f5a3a322f5ea21ab7f0869d2ed25e79c3eb8521fa3c32d4"
-
-inherit autotools pkgconfig
-
-# The options should be mutually exclusive for configuration script.
-# If both alsa and pulseaudio are specified (as in the default distro features)
-# pulseaudio takes precedence.
-PACKAGECONFIG_ALSA = "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
-
-PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
-PACKAGECONFIG[esd] = ",,esound"
-PACKAGECONFIG[jack] = ",,jack"
-PACKAGECONFIG[openal] = ",,openal-soft"
-PACKAGECONFIG[portaudio] = ",,portaudio-v19"
-PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
-PACKAGECONFIG[sdl] = ",,libsdl"
-
-# Following are possible sound output modules:
-# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', 'alsa', '', d)}"
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'esd', 'esd', '', d)}"
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'jack', 'jack', '', d)}"
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'openal', 'openal', '', d)}"
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'portaudio', 'portaudio', '', d)}"
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'sdl', 'sdl', '', d)}"
-
-EXTRA_OECONF = " \
- --enable-shared \
- --with-audio='${AUDIOMODS}' \
- --with-module-suffix=.so \
- ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
- ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
-"
-
-# The x86 assembler optimisations contains text relocations and there are no
-# upstream plans to fix them: http://sourceforge.net/p/mpg123/bugs/168/
-INSANE_SKIP_${PN}_append_x86 = " textrel"
-
-# Fails to build with thumb-1 (qemuarm)
-#| {standard input}: Assembler messages:
-#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
-#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
-#...
-#| make[3]: *** [equalizer.lo] Error 1
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb b/meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb
new file mode 100644
index 0000000000..125574fcfc
--- /dev/null
+++ b/meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
+DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
+mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
+and also can write the decoded audio to WAV."
+HOMEPAGE = "http://mpg123.de/"
+BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
+
+SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2 \
+ file://sdl2.patch"
+SRC_URI[md5sum] = "294a6c30546504ec3d0deac2b2ea22be"
+SRC_URI[sha256sum] = "90306848359c793fd43b9906e52201df18775742dc3c81c06ab67a806509890a"
+
+inherit autotools pkgconfig
+
+# The options should be mutually exclusive for configuration script.
+# If both alsa and pulseaudio are specified (as in the default distro features)
+# pulseaudio takes precedence.
+PACKAGECONFIG_ALSA = "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
+
+PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
+PACKAGECONFIG[esd] = ",,esound"
+PACKAGECONFIG[jack] = ",,jack"
+PACKAGECONFIG[openal] = ",,openal-soft"
+PACKAGECONFIG[portaudio] = ",,portaudio-v19"
+PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
+PACKAGECONFIG[sdl] = ",,libsdl2"
+
+# Following are possible sound output modules:
+# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
+AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
+
+EXTRA_OECONF = " \
+ --enable-shared \
+ --with-audio='${AUDIOMODS}' \
+ ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
+ ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
+"
+# Fails to build with thumb-1 (qemuarm)
+#| {standard input}: Assembler messages:
+#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
+#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
+#...
+#| make[3]: *** [equalizer.lo] Error 1
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 7e54ad4b55..4e32b27087 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -2,18 +2,66 @@ SUMMARY = "Sound server for Linux and Unix-like operating systems"
HOMEPAGE = "http://www.pulseaudio.org"
AUTHOR = "Lennart Poettering"
SECTION = "libs/multimedia"
-LICENSE = "GPLv2+ & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d9ae089c8dc5339f8ac9d8563038a29f \
+
+# Most of PulseAudio code is under LGPLv2.1+. There are a few exceptions:
+#
+# The "adrian" echo canceller variant has code under a non-standard permissive
+# license. See src/modules/echo-cancel/adrian-license.txt for details. This
+# recipe disables the adrian echo canceller to avoid hassle with the unusual
+# license.
+#
+# The src/modules/reserve* and src/pulsecore/rtkit* files are under the MIT
+# license.
+#
+# The src/pulsecore/filter/ directory contains code under the 3-clause BSD
+# license.
+#
+# People who distribute PulseAudio binaries need to also consider that there
+# are some dependencies to GPL libraries. LGPL code that depends on GPL
+# libraries probably becomes effectively GPL-licensed (at compile-time? or at
+# at link-time?). I'm not a lawyer, though, so I'm not sure of the exact
+# implications. The GPL dependencies only affect the server, not the client
+# library, with the exception of libdbus that affects both. These are the GPL
+# library dependencies:
+#
+# One of the resampler implementations uses libsamplerate. This recipe doesn't
+# enable that resampler, however.
+#
+# One of the database implementations uses gdbm. This recipe doesn't enable
+# that database implementation, however.
+#
+# module-lirc (enabled by PACKAGECONFIG[lirc]) uses LIRC.
+#
+# module-equalizer-sink uses FFTW. This recipe disables that, however.
+#
+# The dependency with the most complicated licensing considerations is libdbus.
+# When PACKAGECONFIG[dbus] is enabled (like it is by default), libdbus will be
+# used by both the server and the client library (libpulse). Does this affect
+# applications that use libpulse? It should be also noted that libdbus is
+# dual-licensed: either GPLv2+ or AFL-2 terms apply. Whose decision is it which
+# of the licenses apply? What a mess. Some people hold the view that libdbus is
+# a system library that is covered by the "special exception" in GPLv2's
+# section 3, and therefore libdbus's GPL license doesn't affect PulseAudio.
+LICENSE = "LGPLv2.1+ & MIT & BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \
file://GPL;md5=4325afd396febcb659c36b49533135d4 \
file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84"
+ file://src/modules/echo-cancel/adrian-license.txt;md5=abbab006a561fbffccedf1c3531f34ab \
+ file://src/pulsecore/filter/LICENSE.WEBKIT;md5=49defbaffddf8c51faf606ff7fc3b1f7 \
+ file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84 \
+ file://src/modules/reserve.h;beginline=6;endline=28;md5=0e23094760367d51b6609750e9b31fbb \
+ file://src/pulsecore/rtkit.h;beginline=6;endline=29;md5=3f00ff966716ae0817c31576d1473528 \
+ file://src/modules/echo-cancel/adrian-aec.h;beginline=3;endline=12;md5=d3ed4fad1c073f8b06f37495dc5d1026 \
+ file://src/pulsecore/filter/biquad.h;beginline=1;endline=4;md5=6d46d1365206528a20137355924233c1 \
+"
-DEPENDS = "libatomic-ops libsndfile1 libtool intltool-native"
+DEPENDS = "libatomic-ops libsndfile1 libtool"
# optional
-DEPENDS += "udev alsa-lib glib-2.0 gconf"
-DEPENDS += "json-c gdbm speexdsp libxml-parser-perl-native libcap"
+DEPENDS += "udev alsa-lib glib-2.0"
+DEPENDS += "speexdsp libxml-parser-perl-native libcap"
-inherit autotools bash-completion pkgconfig useradd gettext perlnative bluetooth systemd
+inherit autotools bash-completion pkgconfig useradd gettext perlnative systemd manpages gsettings
# *.desktop rules wont be generated during configure and build will fail
# if using --disable-nls
@@ -25,31 +73,42 @@ EXTRA_OECONF = "\
--enable-tcpwrap=no \
--with-access-group=audio \
--disable-openssl \
- --disable-xen \
--with-database=simple \
- --without-fftw \
--without-zsh-completion-dir \
--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \
- ac_cv_header_valgrind_memcheck_h=no \
- --disable-tests \
+ ac_cv_header_valgrind_memcheck_h=no \
+ --disable-tests \
+ --disable-running-from-build-tree \
"
# soxr (the SoX Resampler library) doesn't seem to be currently packaged in
# oe-core nor meta-oe, so let's not add a PACKAGECONFIG entry for it for now.
EXTRA_OECONF += "--without-soxr"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+# The FFTW dependency (for module-equalizer-sink) was removed in commit
+# ddbd713293 without explaining why it was not made a PACKAGECONFIG item
+# instead. Oh well, let's keep it disabled until someone expresses some
+# interest in having it enabled.
+EXTRA_OECONF += "--without-fftw"
+
+# The "adrian" echo canceller implementation has a non-standard license
+# (src/modules/echo-cancel/adrian-license.txt). It's a permissive license, so
+# the licensing terms are probably not problematic, but it would be an extra
+# hassle to add the license to OE-Core's set of licenses. The canceller isn't
+# very good anyway, better alternatives exist (such as the webrtc canceller).
+EXTRA_OECONF += "--disable-adrian-aec"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
- dbus \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd x11', d)} \
+ dbus gsettings \
"
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc"
PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc"
+PACKAGECONFIG[gconf] = "--enable-gconf,--disable-gconf,gconf"
+PACKAGECONFIG[gsettings] = "--enable-gsettings,--disable-gsettings,glib-2.0-native glib-2.0"
PACKAGECONFIG[ofono] = "--enable-bluez5-ofono-headset,--disable-bluez5-ofono-headset,ofono"
PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
PACKAGECONFIG[systemd] = "--enable-systemd-daemon --enable-systemd-login --enable-systemd-journal --with-systemduserunitdir=${systemd_user_unitdir},--disable-systemd-daemon --disable-systemd-login --disable-systemd-journal,systemd"
@@ -62,6 +121,7 @@ PACKAGECONFIG[autospawn-for-root] = ",,,"
PACKAGECONFIG[lirc] = "--enable-lirc,--disable-lirc,lirc"
PACKAGECONFIG[webrtc] = "--enable-webrtc-aec,--disable-webrtc-aec,webrtc-audio-processing"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, "
EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
@@ -93,17 +153,27 @@ do_install_append() {
}
USERADD_PACKAGES = "pulseaudio-server"
-GROUPADD_PARAM_pulseaudio-server = "pulse"
+GROUPADD_PARAM_pulseaudio-server = "--system pulse"
USERADD_PARAM_pulseaudio-server = "--system --home /var/run/pulse \
--no-create-home --shell /bin/false \
--groups audio,pulse --gid pulse pulse"
+PACKAGES =+ "\
+ libpulse \
+ libpulse-mainloop-glib \
+ libpulse-simple \
+ libpulsecommon \
+ libpulsecore \
+ ${PN}-pa-info \
+ ${PN}-server \
+ ${PN}-misc \
+ "
+
# The console-kit module is included here explicitly so bitbake can map to the
# RDEPENDS we define for it in this recipe, and thereby ensure that when
# adding the console-kit module to an image, we also get the necessary
# consolekit package produced.
-PACKAGES =+ "libpulsecore libpulsecommon libpulse libpulse-simple libpulse-mainloop-glib \
- pulseaudio-server pulseaudio-misc ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}"
+PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}"
#upgrade path:
RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf"
@@ -123,6 +193,7 @@ FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*"
FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake"
FILES_${PN}-conf = "${sysconfdir}"
FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
+FILES_${PN}-pa-info = "${bindir}/pa-info"
FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*"
#SYSTEMD_PACKAGES = "${PN}-server"
@@ -131,6 +202,7 @@ SYSTEMD_SERVICE_${PN}-server = "pulseaudio.service"
FILES_${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so"
# Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it)
+FILES_${PN} = ""
ALLOW_EMPTY_${PN} = "1"
CONFFILES_libpulse = "${sysconfdir}/pulse/client.conf"
@@ -148,13 +220,21 @@ pkg_postinst_${PN}-server() {
}
python populate_packages_prepend() {
- #d.setVar('PKG_pulseaudio', 'pulseaudio')
-
plugindir = d.expand('${libdir}/pulse-${PV}/modules/')
- do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True)
- do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True)
+ do_split_packages(d, plugindir, r'^module-(.*)\.so$', '${PN}-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True)
+ do_split_packages(d, plugindir, r'^lib(.*)\.so$', '${PN}-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True)
}
+# pa-info is a bash script that collects information about the audio setup.
+# It's primarily useful for attaching an information dump when reporting bugs.
+RDEPENDS_${PN}-pa-info = "\
+ alsa-utils-amixer \
+ alsa-utils-aplay \
+ alsa-utils-scripts \
+ bash \
+ ${PN}-server \
+ "
+
RDEPENDS_pulseaudio-server = " \
pulseaudio-module-filter-apply \
pulseaudio-module-filter-heuristics \
@@ -188,8 +268,11 @@ RDEPENDS_pulseaudio-server += "alsa-plugins-pulseaudio-conf"
RDEPENDS_pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}"
RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix"
-FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper"
-FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
+FILES_${PN}-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
+FILES_${PN}-module-gconf += "${libexecdir}/pulse/gconf-helper"
+
+GSETTINGS_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'gsettings', '${PN}-module-gsettings', '', d)}"
+FILES_${PN}-module-gsettings += "${libexecdir}/pulse/gsettings-helper ${datadir}/GConf/gsettings ${datadir}/glib-2.0/schemas"
# The console-kit module is good to have on X11 systems (it keeps PulseAudio
# running for the duration of the user login session). The device-manager and
@@ -197,9 +280,12 @@ FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
# modules must be installed when X11 is enabled.
RDEPENDS_pulseaudio-server += "\
${@bb.utils.contains('DISTRO_FEATURES', 'x11', '\
- pulseaudio-module-console-kit \
pulseaudio-module-device-manager \
pulseaudio-module-x11-cork-request \
pulseaudio-module-x11-publish \
pulseaudio-module-x11-xsmp \
', '', d)}"
+
+RDEPENDS_pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', \
+ bb.utils.contains('DISTRO_FEATURES', 'systemd', 'pulseaudio-module-systemd-login', 'pulseaudio-module-console-kit', d), \
+ '', d)}"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
deleted file mode 100644
index 2f72ceb33b..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 9c3cdfcd198ef9727ea542f284ac6d8c1bcd7a3a Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Fri, 23 Oct 2015 12:36:34 +0300
-Subject: [PATCH 1/5] alsa, bluetooth: fail if user-requested profile doesn't
- exist
-
-If we can't fulfill the user request fully, I think we shouldn't
-fulfill it at all, to make it clear that the requested operation
-didn't succeed.
-
-Upstream-Status: Accepted [expected in 10.0]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/alsa/module-alsa-card.c | 11 +++++++++--
- src/modules/bluetooth/module-bluez4-device.c | 7 +++++--
- 2 files changed, 14 insertions(+), 4 deletions(-)
-
-diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index e5cc4ae..d761683 100644
---- a/src/modules/alsa/module-alsa-card.c
-+++ b/src/modules/alsa/module-alsa-card.c
-@@ -799,8 +799,15 @@ int pa__init(pa_module *m) {
- goto fail;
- }
-
-- if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL)))
-- pa_card_new_data_set_profile(&data, profile);
-+ if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
-+ if (pa_hashmap_get(data.profiles, profile))
-+ pa_card_new_data_set_profile(&data, profile);
-+ else {
-+ pa_log("No such profile: %s", profile);
-+ pa_card_new_data_done(&data);
-+ goto fail;
-+ }
-+ }
-
- u->card = pa_card_new(m->core, &data);
- pa_card_new_data_done(&data);
-diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index 9a921a5..a2de525 100644
---- a/src/modules/bluetooth/module-bluez4-device.c
-+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2301,8 +2301,11 @@ static int add_card(struct userdata *u) {
- if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
- if (pa_hashmap_get(data.profiles, default_profile))
- pa_card_new_data_set_profile(&data, default_profile);
-- else
-- pa_log_warn("Profile '%s' not valid or not supported by device.", default_profile);
-+ else {
-+ pa_log("Profile '%s' not valid or not supported by device.", default_profile);
-+ pa_card_new_data_done(&data);
-+ return -1;
-+ }
- }
-
- u->card = pa_card_new(u->core, &data);
---
-2.8.1
-
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
deleted file mode 100644
index 85559950e8..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From f6ab3c3aa7a1841c8add04828029356d2a8c88e7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 6 Apr 2015 21:56:31 -0700
-Subject: [PATCH] padsp: Make it compile on musl
-
-break assumptions on glibc and there is no stat64 on non
-glibc C libraries
-
-See pulseaudio bug
-
-https://bugs.freedesktop.org/show_bug.cgi?id=85319
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/utils/padsp.c | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/src/utils/padsp.c b/src/utils/padsp.c
-index e61373c..684721a 100644
---- a/src/utils/padsp.c
-+++ b/src/utils/padsp.c
-@@ -2368,7 +2368,7 @@ fail:
- return ret;
- }
-
--#ifdef sun
-+#ifndef __GLIBC__
- int ioctl(int fd, int request, ...) {
- #else
- int ioctl(int fd, unsigned long request, ...) {
-@@ -2508,10 +2508,13 @@ int stat(const char *pathname, struct stat *buf) {
-
- return 0;
- }
--
- #ifdef HAVE_OPEN64
--
-+#undef stat64
-+#ifdef __GLIBC__
- int stat64(const char *pathname, struct stat64 *buf) {
-+#else
-+int stat64(const char *pathname, struct stat *buf) {
-+#endif
- struct stat oldbuf;
- int ret;
-
-@@ -2544,7 +2547,7 @@ int stat64(const char *pathname, struct stat64 *buf) {
-
- return 0;
- }
--
-+#undef open64
- int open64(const char *filename, int flags, ...) {
- va_list args;
- mode_t mode = 0;
-@@ -2670,8 +2673,8 @@ FILE* fopen(const char *filename, const char *mode) {
- }
-
- #ifdef HAVE_OPEN64
--
--FILE *fopen64(const char *filename, const char *mode) {
-+#undef fopen64
-+FILE *fopen64(const char *__restrict filename, const char *__restrict mode) {
-
- debug(DEBUG_LEVEL_VERBOSE, __FILE__": fopen64(%s)\n", filename?filename:"NULL");
-
---
-2.1.4
-
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch
deleted file mode 100644
index 80c291f821..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From d4e6d07fef28d1bd8bfbceab4cc196ef54c23dd8 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Tue, 7 Jun 2016 16:51:00 +0300
-Subject: [PATCH 2/5] card: don't allow the CARD_NEW hook to fail
-
-There is currently no use for allowing modules to cancel card creation,
-and I don't see need for that in the future either. Let's simplify
-things by removing the failure handling code.
-
-Upstream-Status: Accepted [expected in 10.0]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/pulsecore/card.c | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index 410746b..0ac70b9 100644
---- a/src/pulsecore/card.c
-+++ b/src/pulsecore/card.c
-@@ -149,12 +149,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
- }
-
- pa_card_new_data_set_name(data, name);
--
-- if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data) < 0) {
-- pa_xfree(c);
-- pa_namereg_unregister(core, name);
-- return NULL;
-- }
-+ pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data);
-
- c->core = core;
- c->name = pa_xstrdup(data->name);
---
-2.8.1
-
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch
new file mode 100644
index 0000000000..43add75db4
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch
@@ -0,0 +1,30 @@
+From f0ddd7c36556ad05c1398fdd132947323ad26473 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 6 Dec 2018 11:43:41 +0800
+Subject: [PATCH 2/2] do not display CLFAGS to improve reproducibility build
+
+Macro PA_CFLAGS contains build path, do not use it to
+display CFLAGS which could improve reproducibility build.
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/daemon/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon/main.c b/src/daemon/main.c
+index c80fa94..75496be 100644
+--- a/src/daemon/main.c
++++ b/src/daemon/main.c
+@@ -908,7 +908,7 @@ int main(int argc, char *argv[]) {
+
+ pa_log_info("This is PulseAudio %s", PACKAGE_VERSION);
+ pa_log_debug("Compilation host: %s", CANONICAL_HOST);
+- pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS);
++ pa_log_debug("Compilation CFLAGS: ***");
+
+ #ifdef HAVE_LIBSAMPLERATE
+ pa_log_warn("Compiled with DEPRECATED libsamplerate support!");
+--
+2.7.4
+
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
deleted file mode 100644
index e0f424bbcc..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
+++ /dev/null
@@ -1,429 +0,0 @@
-From 0b98309fdbcd36fa92ab53e33c51b485b905e294 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Fri, 23 Oct 2015 12:59:53 +0300
-Subject: [PATCH 3/5] card: move profile selection after pa_card_new()
-
-I want module-alsa-card to set the availability of unavailable
-profiles before the initial card profile gets selected, so that the
-selection logic can use correct availability information.
-module-alsa-card initializes the jack state after calling
-pa_card_new(), however, and the profile selection happens in
-pa_card_new(). This patch solves that by moving parts of pa_card_new()
-to pa_card_choose_initial_profile() and pa_card_put().
-
-pa_card_choose_initial_profile() applies the profile selection policy,
-so module-alsa-card can first call pa_card_new(), then initialize the
-jack state, and then call pa_card_choose_initial_profile(). After that
-module-alsa-card can still override the profile selection policy, in
-case module-alsa-card was loaded with the "profile" argument. Finally,
-pa_card_put() finalizes the card creation.
-
-An alternative solution would have been to move the jack
-initialization to happen before pa_card_new() and use pa_card_new_data
-instead of pa_card in the jack initialization code, but I disliked
-that idea (I want to get rid of the "new data" pattern eventually).
-
-The order in which the initial profile policy is applied is reversed
-in this patch. Previously the first one to set it won, now the last
-one to set it wins. I think this is better, because if you have N
-parties that want to set the profile, we avoid checking N times
-whether someone else has already set the profile.
-
-Upstream-Status: Accepted [expected in 10.0]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/alsa/module-alsa-card.c | 32 +++++----
- src/modules/bluetooth/module-bluez4-device.c | 31 +++++----
- src/modules/bluetooth/module-bluez5-device.c | 2 +
- src/modules/macosx/module-coreaudio-device.c | 2 +
- src/modules/module-card-restore.c | 36 +++++++---
- src/pulsecore/card.c | 99 +++++++++++++++++-----------
- src/pulsecore/card.h | 9 +++
- src/pulsecore/core.h | 1 +
- 8 files changed, 143 insertions(+), 69 deletions(-)
-
-diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index d761683..1976230 100644
---- a/src/modules/alsa/module-alsa-card.c
-+++ b/src/modules/alsa/module-alsa-card.c
-@@ -671,7 +671,7 @@ int pa__init(pa_module *m) {
- struct userdata *u;
- pa_reserve_wrapper *reserve = NULL;
- const char *description;
-- const char *profile = NULL;
-+ const char *profile_str = NULL;
- char *fn = NULL;
- bool namereg_fail = false;
-
-@@ -799,16 +799,6 @@ int pa__init(pa_module *m) {
- goto fail;
- }
-
-- if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
-- if (pa_hashmap_get(data.profiles, profile))
-- pa_card_new_data_set_profile(&data, profile);
-- else {
-- pa_log("No such profile: %s", profile);
-- pa_card_new_data_done(&data);
-- goto fail;
-- }
-- }
--
- u->card = pa_card_new(m->core, &data);
- pa_card_new_data_done(&data);
-
-@@ -822,6 +812,26 @@ int pa__init(pa_module *m) {
- (pa_hook_cb_t) card_suspend_changed, u);
-
- init_jacks(u);
-+
-+ pa_card_choose_initial_profile(u->card);
-+
-+ /* If the "profile" modarg is given, we have to override whatever the usual
-+ * policy chose in pa_card_choose_initial_profile(). */
-+ profile_str = pa_modargs_get_value(u->modargs, "profile", NULL);
-+ if (profile_str) {
-+ pa_card_profile *profile;
-+
-+ profile = pa_hashmap_get(u->card->profiles, profile_str);
-+ if (!profile) {
-+ pa_log("No such profile: %s", profile_str);
-+ goto fail;
-+ }
-+
-+ pa_card_set_profile(u->card, profile, false);
-+ }
-+
-+ pa_card_put(u->card);
-+
- init_profile(u);
- init_eld_ctls(u);
-
-diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index a2de525..13fb7ab 100644
---- a/src/modules/bluetooth/module-bluez4-device.c
-+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2238,7 +2238,7 @@ static int add_card(struct userdata *u) {
- pa_bluez4_profile_t *d;
- pa_bluez4_form_factor_t ff;
- char *n;
-- const char *default_profile;
-+ const char *profile_str;
- const pa_bluez4_device *device;
- const pa_bluez4_uuid *uuid;
-
-@@ -2298,16 +2298,6 @@ static int add_card(struct userdata *u) {
- *d = PA_BLUEZ4_PROFILE_OFF;
- pa_hashmap_put(data.profiles, p->name, p);
-
-- if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
-- if (pa_hashmap_get(data.profiles, default_profile))
-- pa_card_new_data_set_profile(&data, default_profile);
-- else {
-- pa_log("Profile '%s' not valid or not supported by device.", default_profile);
-- pa_card_new_data_done(&data);
-- return -1;
-- }
-- }
--
- u->card = pa_card_new(u->core, &data);
- pa_card_new_data_done(&data);
-
-@@ -2319,6 +2309,25 @@ static int add_card(struct userdata *u) {
- u->card->userdata = u;
- u->card->set_profile = card_set_profile;
-
-+ pa_card_choose_initial_profile(u->card);
-+
-+ /* If the "profile" modarg is given, we have to override whatever the usual
-+ * policy chose in pa_card_choose_initial_profile(). */
-+ profile_str = pa_modargs_get_value(u->modargs, "profile", NULL);
-+ if (profile_str) {
-+ pa_card_profile *profile;
-+
-+ profile = pa_hashmap_get(u->card->profiles, profile_str);
-+ if (!profile) {
-+ pa_log("No such profile: %s", profile_str);
-+ return -1;
-+ }
-+
-+ pa_card_set_profile(u->card, profile, false);
-+ }
-+
-+ pa_card_put(u->card);
-+
- d = PA_CARD_PROFILE_DATA(u->card->active_profile);
-
- if (*d != PA_BLUEZ4_PROFILE_OFF && (!device->transports[*d] ||
-diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
-index 84e6d55..498d0e1 100644
---- a/src/modules/bluetooth/module-bluez5-device.c
-+++ b/src/modules/bluetooth/module-bluez5-device.c
-@@ -1953,6 +1953,8 @@ static int add_card(struct userdata *u) {
-
- u->card->userdata = u;
- u->card->set_profile = set_profile_cb;
-+ pa_card_choose_initial_profile(u->card);
-+ pa_card_put(u->card);
-
- p = PA_CARD_PROFILE_DATA(u->card->active_profile);
- u->profile = *p;
-diff --git a/src/modules/macosx/module-coreaudio-device.c b/src/modules/macosx/module-coreaudio-device.c
-index 6c9e55d..d91c656 100644
---- a/src/modules/macosx/module-coreaudio-device.c
-+++ b/src/modules/macosx/module-coreaudio-device.c
-@@ -821,6 +821,8 @@ int pa__init(pa_module *m) {
- pa_card_new_data_done(&card_new_data);
- u->card->userdata = u;
- u->card->set_profile = card_set_profile;
-+ pa_card_choose_initial_profile(u->card);
-+ pa_card_put(u->card);
-
- u->rtpoll = pa_rtpoll_new();
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
-diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
-index 7545aa5..718a0dd 100644
---- a/src/modules/module-card-restore.c
-+++ b/src/modules/module-card-restore.c
-@@ -551,16 +551,6 @@ static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new
- if (!(e = entry_read(u, new_data->name)))
- return PA_HOOK_OK;
-
-- if (e->profile[0]) {
-- if (!new_data->active_profile) {
-- pa_card_new_data_set_profile(new_data, e->profile);
-- pa_log_info("Restored profile '%s' for card %s.", new_data->active_profile, new_data->name);
-- new_data->save_profile = true;
--
-- } else
-- pa_log_debug("Not restoring profile for card %s, because already set.", new_data->name);
-- }
--
- /* Always restore the latency offsets because their
- * initial value is always 0 */
-
-@@ -590,6 +580,30 @@ static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new
- return PA_HOOK_OK;
- }
-
-+static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_card *card, struct userdata *u) {
-+ struct entry *e;
-+
-+ if (!(e = entry_read(u, card->name)))
-+ return PA_HOOK_OK;
-+
-+ if (e->profile[0]) {
-+ pa_card_profile *profile;
-+
-+ profile = pa_hashmap_get(card->profiles, e->profile);
-+ if (profile) {
-+ pa_log_info("Restoring profile '%s' for card %s.", card->active_profile->name, card->name);
-+ pa_card_set_profile(card, profile, true);
-+ } else {
-+ pa_log_debug("Tried to restore profile %s for card %s, but the card doesn't have such profile.",
-+ e->profile, card->name);
-+ }
-+ }
-+
-+ entry_free(e);
-+
-+ return PA_HOOK_OK;
-+}
-+
- static pa_hook_result_t card_preferred_port_changed_callback(pa_core *core, pa_card_preferred_port_changed_hook_data *data,
- struct userdata *u) {
- struct entry *e;
-@@ -634,6 +648,8 @@ int pa__init(pa_module*m) {
- u->module = m;
-
- pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_NEW], PA_HOOK_EARLY, (pa_hook_cb_t) card_new_hook_callback, u);
-+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE], PA_HOOK_NORMAL,
-+ (pa_hook_cb_t) card_choose_initial_profile_callback, u);
- pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) card_put_hook_callback, u);
- pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PREFERRED_PORT_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) card_preferred_port_changed_callback, u);
- pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) card_profile_changed_callback, u);
-diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index 0ac70b9..a0c3d93 100644
---- a/src/pulsecore/card.c
-+++ b/src/pulsecore/card.c
-@@ -176,38 +176,56 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
- c->preferred_input_port = data->preferred_input_port;
- c->preferred_output_port = data->preferred_output_port;
-
-- if (data->active_profile)
-- if ((c->active_profile = pa_hashmap_get(c->profiles, data->active_profile)))
-- c->save_profile = data->save_profile;
-+ pa_device_init_description(c->proplist, c);
-+ pa_device_init_icon(c->proplist, true);
-+ pa_device_init_intended_roles(c->proplist);
-
-- if (!c->active_profile) {
-- PA_HASHMAP_FOREACH(profile, c->profiles, state) {
-- if (profile->available == PA_AVAILABLE_NO)
-- continue;
-+ return c;
-+}
-
-- if (!c->active_profile || profile->priority > c->active_profile->priority)
-- c->active_profile = profile;
-- }
-- /* If all profiles are not available, then we still need to pick one */
-- if (!c->active_profile) {
-- PA_HASHMAP_FOREACH(profile, c->profiles, state)
-- if (!c->active_profile || profile->priority > c->active_profile->priority)
-- c->active_profile = profile;
-+void pa_card_choose_initial_profile(pa_card *card) {
-+ pa_card_profile *profile;
-+ void *state;
-+ pa_card_profile *best = NULL;
-+
-+ pa_assert(card);
-+
-+ /* By default, pick the highest priority profile that is not unavailable,
-+ * or if all profiles are unavailable, pick the profile with the highest
-+ * priority regardless of its availability. */
-+
-+ PA_HASHMAP_FOREACH(profile, card->profiles, state) {
-+ if (profile->available == PA_AVAILABLE_NO)
-+ continue;
-+
-+ if (!best || profile->priority > best->priority)
-+ best = profile;
-+ }
-+
-+ if (!best) {
-+ PA_HASHMAP_FOREACH(profile, card->profiles, state) {
-+ if (!best || profile->priority > best->priority)
-+ best = profile;
- }
-- pa_assert(c->active_profile);
- }
-+ pa_assert(best);
-
-- pa_device_init_description(c->proplist, c);
-- pa_device_init_icon(c->proplist, true);
-- pa_device_init_intended_roles(c->proplist);
-+ card->active_profile = best;
-+ card->save_profile = false;
-
-- pa_assert_se(pa_idxset_put(core->cards, c, &c->index) >= 0);
-+ /* Let policy modules override the default. */
-+ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE], card);
-+}
-
-- pa_log_info("Created %u \"%s\"", c->index, c->name);
-- pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, c->index);
-+void pa_card_put(pa_card *card) {
-+ pa_assert(card);
-
-- pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PUT], c);
-- return c;
-+ pa_assert_se(pa_idxset_put(card->core->cards, card, &card->index) >= 0);
-+ card->linked = true;
-+
-+ pa_log_info("Created %u \"%s\"", card->index, card->name);
-+ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_PUT], card);
-+ pa_subscription_post(card->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, card->index);
- }
-
- void pa_card_free(pa_card *c) {
-@@ -218,15 +236,15 @@ void pa_card_free(pa_card *c) {
-
- core = c->core;
-
-- pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_UNLINK], c);
--
-- pa_namereg_unregister(core, c->name);
--
-- pa_idxset_remove_by_data(c->core->cards, c, NULL);
-+ if (c->linked) {
-+ pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_UNLINK], c);
-
-- pa_log_info("Freed %u \"%s\"", c->index, c->name);
-+ pa_idxset_remove_by_data(c->core->cards, c, NULL);
-+ pa_log_info("Freed %u \"%s\"", c->index, c->name);
-+ pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
-+ }
-
-- pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
-+ pa_namereg_unregister(core, c->name);
-
- pa_assert(pa_idxset_isempty(c->sinks));
- pa_idxset_free(c->sinks, NULL);
-@@ -298,20 +316,27 @@ int pa_card_set_profile(pa_card *c, pa_card_profile *profile, bool save) {
- return 0;
- }
-
-- if ((r = c->set_profile(c, profile)) < 0)
-+ /* If we're setting the initial profile, we shouldn't call set_profile(),
-+ * because the implementations don't expect that (for historical reasons).
-+ * We should just set c->active_profile, and the implementations will
-+ * properly set up that profile after pa_card_put() has returned. It would
-+ * be probably good to change this so that also the initial profile can be
-+ * set up in set_profile(), but if set_profile() fails, that would need
-+ * some better handling than what we do here currently. */
-+ if (c->linked && (r = c->set_profile(c, profile)) < 0)
- return r;
-
-- pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
--
-- pa_log_info("Changed profile of card %u \"%s\" to %s", c->index, c->name, profile->name);
--
- c->active_profile = profile;
- c->save_profile = save;
-
- if (save)
- update_port_preferred_profile(c);
-
-- pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], c);
-+ if (c->linked) {
-+ pa_log_info("Changed profile of card %u \"%s\" to %s", c->index, c->name, profile->name);
-+ pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], c);
-+ pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
-+ }
-
- return 0;
- }
-diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index d4970e3..fd1fe0a 100644
---- a/src/pulsecore/card.h
-+++ b/src/pulsecore/card.h
-@@ -86,6 +86,8 @@ struct pa_card {
-
- pa_suspend_cause_t suspend_cause;
-
-+ bool linked;
-+
- void *userdata;
-
- int (*set_profile)(pa_card *c, pa_card_profile *profile);
-@@ -128,6 +130,13 @@ void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t
- void pa_card_new_data_done(pa_card_new_data *data);
-
- pa_card *pa_card_new(pa_core *c, pa_card_new_data *data);
-+
-+/* Select the initial card profile according to the configured policies. This
-+ * must be called between pa_card_new() and pa_card_put(), after the port and
-+ * profile availablities have been initialized. */
-+void pa_card_choose_initial_profile(pa_card *card);
-+
-+void pa_card_put(pa_card *c);
- void pa_card_free(pa_card *c);
-
- void pa_card_add_profile(pa_card *c, pa_card_profile *profile);
-diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
-index 00d7f2f..802111b 100644
---- a/src/pulsecore/core.h
-+++ b/src/pulsecore/core.h
-@@ -118,6 +118,7 @@ typedef enum pa_core_hook {
- PA_CORE_HOOK_CLIENT_PROPLIST_CHANGED,
- PA_CORE_HOOK_CLIENT_SEND_EVENT,
- PA_CORE_HOOK_CARD_NEW,
-+ PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE,
- PA_CORE_HOOK_CARD_PUT,
- PA_CORE_HOOK_CARD_UNLINK,
- PA_CORE_HOOK_CARD_PREFERRED_PORT_CHANGED,
---
-2.8.1
-
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch
deleted file mode 100644
index 480f2cea41..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 375bc56fd3d66f40a9650224e5bfea4002494ade Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Fri, 23 Oct 2015 13:50:35 +0300
-Subject: [PATCH 4/5] card: remove pa_card_new_data.active_profile
-
-It's not being used any more.
-
-Upstream-Status: Accepted [expected in 10.0]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/pulsecore/card.c | 8 --------
- src/pulsecore/card.h | 5 -----
- 2 files changed, 13 deletions(-)
-
-diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index a0c3d93..bc5b75b 100644
---- a/src/pulsecore/card.c
-+++ b/src/pulsecore/card.c
-@@ -96,13 +96,6 @@ void pa_card_new_data_set_name(pa_card_new_data *data, const char *name) {
- data->name = pa_xstrdup(name);
- }
-
--void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile) {
-- pa_assert(data);
--
-- pa_xfree(data->active_profile);
-- data->active_profile = pa_xstrdup(profile);
--}
--
- void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t direction, pa_device_port *port) {
- pa_assert(data);
-
-@@ -125,7 +118,6 @@ void pa_card_new_data_done(pa_card_new_data *data) {
- pa_hashmap_free(data->ports);
-
- pa_xfree(data->name);
-- pa_xfree(data->active_profile);
- }
-
- pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
-diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index fd1fe0a..5699475 100644
---- a/src/pulsecore/card.h
-+++ b/src/pulsecore/card.h
-@@ -101,15 +101,11 @@ typedef struct pa_card_new_data {
- pa_module *module;
-
- pa_hashmap *profiles;
-- char *active_profile;
--
- pa_hashmap *ports;
- pa_device_port *preferred_input_port;
- pa_device_port *preferred_output_port;
-
- bool namereg_fail:1;
--
-- bool save_profile:1;
- } pa_card_new_data;
-
- typedef struct {
-@@ -125,7 +121,6 @@ void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available)
-
- pa_card_new_data *pa_card_new_data_init(pa_card_new_data *data);
- void pa_card_new_data_set_name(pa_card_new_data *data, const char *name);
--void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile);
- void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t direction, pa_device_port *port);
- void pa_card_new_data_done(pa_card_new_data *data);
-
---
-2.8.1
-
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch
deleted file mode 100644
index 5563d2c352..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From ae6a01ba204b480bda6a5b4431be3d22e53a7006 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Fri, 23 Oct 2015 13:37:11 +0300
-Subject: [PATCH 5/5] alsa: set availability for (some) unavailable profiles
-
-The alsa card hasn't so far set any availability for profiles. That
-caused an issue with some HDMI hardware: the sound card has two HDMI
-outputs, but only the second of them is actually usable. The
-unavailable port is marked as unavailable and the available port is
-marked as available, but this information isn't propagated to the
-profile availability. Without profile availability information, the
-initial profile policy picks the unavailable one, since it has a
-higher priority value.
-
-This patch adds simple logic for marking some profiles unavailable:
-if the profile only contains unavailable ports, the profile is
-unavailable too. This can be improved in the future so that if a
-profile contains sinks or sources that only contain unavailable ports,
-the profile should be marked as unavailable. Implementing that
-requires adding more information about the sinks and sources to
-pa_card_profile, however.
-
-BugLink: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-
-Upstream-Status: Accepted [expected in 10.0]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/alsa/module-alsa-card.c | 27 +++++++++++++++++++++++++++
- 1 file changed, 27 insertions(+)
-
-diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index 1976230..323e08a 100644
---- a/src/modules/alsa/module-alsa-card.c
-+++ b/src/modules/alsa/module-alsa-card.c
-@@ -366,6 +366,7 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
- void *state;
- pa_alsa_jack *jack;
- struct temp_port_avail *tp, *tports;
-+ pa_card_profile *profile;
-
- pa_assert(u);
-
-@@ -426,6 +427,32 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
- if (tp->avail == PA_AVAILABLE_NO)
- pa_device_port_set_available(tp->port, tp->avail);
-
-+ /* Update profile availabilities. The logic could be improved; for now we
-+ * only set obviously unavailable profiles (those that contain only
-+ * unavailable ports) to PA_AVAILABLE_NO and all others to
-+ * PA_AVAILABLE_UNKNOWN. */
-+ PA_HASHMAP_FOREACH(profile, u->card->profiles, state) {
-+ pa_device_port *port;
-+ void *state2;
-+ pa_available_t available = PA_AVAILABLE_NO;
-+
-+ /* Don't touch the "off" profile. */
-+ if (profile->n_sources == 0 && profile->n_sinks == 0)
-+ continue;
-+
-+ PA_HASHMAP_FOREACH(port, u->card->ports, state2) {
-+ if (!pa_hashmap_get(port->profiles, profile->name))
-+ continue;
-+
-+ if (port->available != PA_AVAILABLE_NO) {
-+ available = PA_AVAILABLE_UNKNOWN;
-+ break;
-+ }
-+ }
-+
-+ pa_card_profile_set_available(profile, available);
-+ }
-+
- pa_xfree(tports);
- return 0;
- }
---
-2.8.1
-
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_13.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_13.0.bb
new file mode 100644
index 0000000000..7f8ebc2090
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_13.0.bb
@@ -0,0 +1,14 @@
+require pulseaudio.inc
+
+SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
+ file://0001-client-conf-Add-allow-autospawn-for-root.patch \
+ file://0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch \
+ file://volatiles.04_pulse \
+ "
+SRC_URI[md5sum] = "e41d606f90254ed45c90520faf83d95c"
+SRC_URI[sha256sum] = "961b23ca1acfd28f2bc87414c27bb40e12436efcf2158d29721b1e89f3f28057"
+
+do_compile_prepend() {
+ mkdir -p ${S}/libltdl
+ cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+}
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb
deleted file mode 100644
index 00f5442b85..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require pulseaudio.inc
-
-SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
- file://0001-padsp-Make-it-compile-on-musl.patch \
- file://0001-client-conf-Add-allow-autospawn-for-root.patch \
- file://0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch \
- file://0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch \
- file://0003-card-move-profile-selection-after-pa_card_new.patch \
- file://0004-card-remove-pa_card_new_data.active_profile.patch \
- file://0005-alsa-set-availability-for-some-unavailable-profiles.patch \
- file://volatiles.04_pulse \
-"
-SRC_URI[md5sum] = "da7162541b3a9bc20576dbd0d7d1489a"
-SRC_URI[sha256sum] = "c3d3d66b827f18fbe903fe3df647013f09fc1e2191c035be1ee2d82a9e404686"
-
-do_compile_prepend() {
- mkdir -p ${S}/libltdl
- cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
-}
diff --git a/meta/recipes-multimedia/sbc/sbc_1.3.bb b/meta/recipes-multimedia/sbc/sbc_1.3.bb
deleted file mode 100644
index 2d7f31bc1b..0000000000
--- a/meta/recipes-multimedia/sbc/sbc_1.3.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "SBC Audio Codec"
-DESCRIPTION = "Bluetooth low-complexity, subband codec (SBC) library."
-HOMEPAGE = "https://www.bluez.org"
-SECTION = "libs"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
- file://sbc/sbc.h;beginline=1;endline=26;md5=0f57d0df22b0d40746bdd29805a4361b"
-
-DEPENDS = "libsndfile1"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "2d8b7841f2c11ab287718d562f2b981c"
-SRC_URI[sha256sum] = "e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309"
-
-inherit autotools pkgconfig
diff --git a/meta/recipes-multimedia/sbc/sbc_1.4.bb b/meta/recipes-multimedia/sbc/sbc_1.4.bb
new file mode 100644
index 0000000000..674d77ef48
--- /dev/null
+++ b/meta/recipes-multimedia/sbc/sbc_1.4.bb
@@ -0,0 +1,23 @@
+SUMMARY = "SBC Audio Codec"
+DESCRIPTION = "Bluetooth low-complexity, subband codec (SBC) library."
+HOMEPAGE = "https://www.bluez.org"
+SECTION = "libs"
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-examples = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+ file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
+ file://src/sbcenc.c;beginline=1;endline=24;md5=08e7a70b127f4100ff2cd7d629147d8d \
+ file://sbc/sbc.h;beginline=1;endline=26;md5=0f57d0df22b0d40746bdd29805a4361b"
+
+DEPENDS = "libsndfile1"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "800fb0908899baa48dc216d8e156cc05"
+SRC_URI[sha256sum] = "518bf46e6bb3dc808a95e1eabad26fdebe8a099c1e781c27ed7fca6c2f4a54c9"
+
+inherit autotools pkgconfig
+
+PACKAGES =+ "${PN}-examples"
+FILES_${PN}-examples += "${bindir}/*"
diff --git a/meta/recipes-multimedia/speex/speex_1.2.0.bb b/meta/recipes-multimedia/speex/speex_1.2.0.bb
new file mode 100644
index 0000000000..3a0911d6f8
--- /dev/null
+++ b/meta/recipes-multimedia/speex/speex_1.2.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Speech Audio Codec"
+DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech."
+HOMEPAGE = "http://www.speex.org"
+SECTION = "libs"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \
+ file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50"
+DEPENDS = "libogg speexdsp"
+
+SRC_URI = "http://downloads.xiph.org/releases/speex/speex-${PV}.tar.gz"
+UPSTREAM_CHECK_REGEX = "speex-(?P<pver>\d+(\.\d+)+)\.tar"
+
+SRC_URI[md5sum] = "8ab7bb2589110dfaf0ed7fa7757dc49c"
+SRC_URI[sha256sum] = "eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094"
+
+inherit autotools pkgconfig lib_package
+
+EXTRA_OECONF = "\
+ ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api --disable-vbr', '', d)} \
+"
diff --git a/meta/recipes-multimedia/speex/speex_1.2rc2.bb b/meta/recipes-multimedia/speex/speex_1.2rc2.bb
deleted file mode 100644
index f7d23dbd7c..0000000000
--- a/meta/recipes-multimedia/speex/speex_1.2rc2.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Speech Audio Codec"
-DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech."
-HOMEPAGE = "http://www.speex.org"
-SECTION = "libs"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \
- file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50"
-DEPENDS = "libogg speexdsp"
-
-SRC_URI = "http://downloads.us.xiph.org/releases/speex/speex-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "6ae7db3bab01e1d4b86bacfa8ca33e81"
-SRC_URI[sha256sum] = "caa27c7247ff15c8521c2ae0ea21987c9e9710a8f2d3448e8b79da9806bce891"
-
-inherit autotools pkgconfig lib_package
-
-EXTRA_OECONF = "\
- ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api --disable-vbr', '', d)} \
-"
diff --git a/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb b/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb
index 6b1acedbef..03c949be22 100644
--- a/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb
+++ b/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb
@@ -2,7 +2,7 @@ SUMMARY = "A patent-free DSP library"
DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library."
HOMEPAGE = "http://www.speex.org"
SECTION = "libs"
-LICENSE = "BSD"
+LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8"
SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz \
diff --git a/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch b/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch
deleted file mode 100644
index 7e5102903b..0000000000
--- a/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Submitted [https://trac.xiph.org/ticket/1922]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-Index: configure.in
-===================================================================
---- configure.in (revision 18764)
-+++ configure.in (working copy)
-@@ -9,7 +9,7 @@
- AC_CANONICAL_HOST
- AC_CANONICAL_TARGET
-
--AM_CONFIG_HEADER([config.h])
-+AC_CONFIG_HEADERS([config.h])
-
- AM_INIT_AUTOMAKE(libvorbisidec,1.2.1)
diff --git a/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch b/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch
deleted file mode 100644
index 2049542227..0000000000
--- a/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From: Xin Ouyang <Xin.Ouyang@windriver.com>
-Date: Mon, 16 Jul 2012 13:29:34 +0800
-Subject: [PATCH] tremor: add IT instructions for arm thumb2 tune flags.
-
-Upstream-Status: Pending
-
-In Thumb-2, most instructions do not have a built in condition code (except for
-conditional branches). Instead, short sequences of instructions which are to be
-executed conditionally can be preceded by a special "IT instruction" which
-describes the condition and which of the following instructions should be
-executed if the condition is false respectively.
-
-For the ARM/Thumb IT(If-Then) instruction:
-http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/Cjabicci.html
-
-Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
----
- asm_arm.h | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/asm_arm.h b/asm_arm.h
-index c3bda00..823c54f 100755
---- a/asm_arm.h
-+++ b/asm_arm.h
-@@ -108,9 +108,11 @@ static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b,
- static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
- int tmp;
- asm volatile("subs %1, %0, #32768\n\t"
-+ "itt pl\n\t"
- "movpl %0, #0x7f00\n\t"
- "orrpl %0, %0, #0xff\n"
- "adds %1, %0, #32768\n\t"
-+ "it mi\n\t"
- "movmi %0, #0x8000"
- : "+r"(x),"=r"(tmp)
- :
-@@ -139,10 +141,12 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
-
- "ldmdb r0!,{r1,r3};"
- "subs r1,r1,%4;" //ilsp[j]-wi
-+ "it mi;"
- "rsbmi r1,r1,#0;" //labs(ilsp[j]-wi)
- "umull %0,r2,r1,%0;" //qi*=labs(ilsp[j]-wi)
-
- "subs r1,r3,%4;" //ilsp[j+1]-wi
-+ "it mi;"
- "rsbmi r1,r1,#0;" //labs(ilsp[j+1]-wi)
- "umull %1,r3,r1,%1;" //pi*=labs(ilsp[j+1]-wi)
-
-@@ -167,6 +171,7 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
- "mov r0,#0x4000;\n"
-
- "subs r1,r1,%4;\n" //ilsp[j]-wi
-+ "it mi;\n"
- "rsbmi r1,r1,#0;\n" //labs(ilsp[j]-wi)
- "umull %0,r2,r1,%0;\n" //qi*=labs(ilsp[j]-wi)
- "umull %1,r3,r0,%1;\n" //pi*=labs(ilsp[j+1]-wi)
-@@ -190,18 +195,23 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
- "mov r2,#0;"
- "orr r1,%0,%1;"
- "tst r1,#0xff000000;"
-+ "itt ne;"
- "addne r2,r2,#8;"
- "movne r1,r1,lsr #8;"
- "tst r1,#0x00f00000;"
-+ "itt ne;"
- "addne r2,r2,#4;"
- "movne r1,r1,lsr #4;"
- "tst r1,#0x000c0000;"
-+ "itt ne;"
- "addne r2,r2,#2;"
- "movne r1,r1,lsr #2;"
- "tst r1,#0x00020000;"
-+ "itt ne;"
- "addne r2,r2,#1;"
- "movne r1,r1,lsr #1;"
- "tst r1,#0x00010000;"
-+ "it ne;"
- "addne r2,r2,#1;"
- "mov %0,%0,lsr r2;"
- "mov %1,%1,lsr r2;"
-@@ -222,15 +232,19 @@ static inline void lsp_norm_asm(ogg_uint32_t *qip,ogg_int32_t *qexpp){
- ogg_int32_t qexp=*qexpp;
-
- asm("tst %0,#0x0000ff00;"
-+ "itt eq;"
- "moveq %0,%0,lsl #8;"
- "subeq %1,%1,#8;"
- "tst %0,#0x0000f000;"
-+ "itt eq;"
- "moveq %0,%0,lsl #4;"
- "subeq %1,%1,#4;"
- "tst %0,#0x0000c000;"
-+ "itt eq;"
- "moveq %0,%0,lsl #2;"
- "subeq %1,%1,#2;"
- "tst %0,#0x00008000;"
-+ "itt eq;"
- "moveq %0,%0,lsl #1;"
- "subeq %1,%1,#1;"
- : "+r"(qi),"+r"(qexp)
---
-1.7.9.5
-
diff --git a/meta/recipes-multimedia/tremor/tremor_20150107.bb b/meta/recipes-multimedia/tremor/tremor_20150107.bb
deleted file mode 100644
index 937894a73a..0000000000
--- a/meta/recipes-multimedia/tremor/tremor_20150107.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Fixed-point decoder"
-DESCRIPTION = "tremor is a fixed point implementation of the vorbis codec."
-SECTION = "libs"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
- file://os.h;beginline=3;endline=14;md5=5c0af5e1bedef3ce8178c89f48cd6f1f"
-DEPENDS = "libogg"
-SRCDATE = "${PV}"
-PR = "r1"
-
-# SVN support for upstream version check isn't implemented yet
-RECIPE_UPSTREAM_VERSION = "20150107"
-RECIPE_UPSTREAM_DATE = "Jan 07, 2015"
-CHECK_DATE = "Aug 12, 2015"
-
-SRC_URI = "svn://svn.xiph.org/trunk;module=Tremor;rev=19427;protocol=http \
- file://obsolete_automake_macros.patch;striplevel=0 \
- file://tremor-arm-thumb2.patch \
-"
-
-S = "${WORKDIR}/Tremor"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--enable-shared"
-
-ARM_INSTRUCTION_SET = "arm"
diff --git a/meta/recipes-multimedia/webp/libwebp_0.5.1.bb b/meta/recipes-multimedia/webp/libwebp_0.5.1.bb
deleted file mode 100644
index b882db75b6..0000000000
--- a/meta/recipes-multimedia/webp/libwebp_0.5.1.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "WebP is an image format designed for the Web"
-DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
- used on a large variety of photographic, translucent and \
- graphical images found on the web. The degree of lossy \
- compression is adjustable so a user can choose the trade-off \
- between file size and image quality. WebP typically achieves \
- an average of 30% more compression than JPEG and JPEG 2000, \
- without loss of image quality."
-HOMEPAGE = "https://developers.google.com/speed/webp/"
-SECTION = "libs"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
- file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
-
-SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
-SRC_URI[md5sum] = "3d7db92ebba5b4f679413d25c6040881"
-SRC_URI[sha256sum] = "6ad66c6fcd60a023de20b6856b03da8c7d347269d76b1fd9c3287e8b5e8813df"
-
-UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
-
-EXTRA_OECONF = " \
- --disable-experimental \
- --disable-wic \
- --enable-libwebpmux \
- --enable-libwebpdemux \
- --enable-threading \
-"
-# Do not trust configure to determine if neon is available.
-#
-EXTRA_OECONF_append_arm = " \
- ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
-"
-
-inherit autotools lib_package
-
-PACKAGECONFIG ??= ""
-
-# libwebpdecoder is a subset of libwebp, don't build it unless requested
-PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
-
-# Apply for examples programs: cwebp and dwebp
-PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
-PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
-PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
-
-# Apply only for example program vwebp
-PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
-
-PACKAGES =+ "${PN}-gif2webp"
-
-DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
-FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/meta/recipes-multimedia/webp/libwebp_1.0.3.bb b/meta/recipes-multimedia/webp/libwebp_1.0.3.bb
new file mode 100644
index 0000000000..5082bf0374
--- /dev/null
+++ b/meta/recipes-multimedia/webp/libwebp_1.0.3.bb
@@ -0,0 +1,56 @@
+SUMMARY = "WebP is an image format designed for the Web"
+DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
+ used on a large variety of photographic, translucent and \
+ graphical images found on the web. The degree of lossy \
+ compression is adjustable so a user can choose the trade-off \
+ between file size and image quality. WebP typically achieves \
+ an average of 30% more compression than JPEG and JPEG 2000, \
+ without loss of image quality."
+HOMEPAGE = "https://developers.google.com/speed/webp/"
+SECTION = "libs"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
+ file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
+
+SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
+SRC_URI[md5sum] = "906ad85daaaa2eac97c8aa2dec9e8b77"
+SRC_URI[sha256sum] = "e20a07865c8697bba00aebccc6f54912d6bc333bb4d604e6b07491c1a226b34f"
+
+UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
+
+EXTRA_OECONF = " \
+ --disable-wic \
+ --enable-libwebpmux \
+ --enable-libwebpdemux \
+ --enable-threading \
+"
+
+# Do not trust configure to determine if neon is available.
+#
+EXTRA_OECONF_ARM = " \
+ ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
+"
+EXTRA_OECONF_append_arm = " ${EXTRA_OECONF_ARM}"
+EXTRA_OECONF_append_armeb = " ${EXTRA_OECONF_ARM}"
+
+inherit autotools lib_package
+
+PACKAGECONFIG ??= ""
+
+# libwebpdecoder is a subset of libwebp, don't build it unless requested
+PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
+
+# Apply for examples programs: cwebp and dwebp
+PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
+PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
+
+# Apply only for example program vwebp
+PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
+
+PACKAGES =+ "${PN}-gif2webp"
+
+DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
+FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch b/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch
new file mode 100644
index 0000000000..087a448eec
--- /dev/null
+++ b/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch
@@ -0,0 +1,53 @@
+From 66b120079fb21ed38cab0900c63360b0a7853eaa Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 14:22:32 -0700
+Subject: [PATCH] Fix X32 build by disabling asm
+
+This applies gentoo's x32 patch, adjusted slightly, which disables asm support
+for x32 as well as correcting -m.
+
+Debian has a different patch which does the same, and there's a superior yet
+out of date patch series on the x264 list which keeps asm support enabled, but
+doesn't successfully build at this time, and my assembly is very rusty.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 3109ec4..844aeae 100755
+--- a/configure
++++ b/configure
+@@ -703,7 +703,13 @@ case $host_cpu in
+ AS_EXT=".asm"
+ ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
+ stack_alignment=16
+- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++ if [ $compiler = GNU ]; then
++ if cpp_check "" "" "__ILP32__" ; then
++ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS"
++ else
++ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++ fi
++ fi
+ if [ "$SYS" = MACOSX ]; then
+ ASFLAGS="$ASFLAGS -f macho64 -DPIC -DPREFIX"
+ if cc_check '' "-arch x86_64"; then
+@@ -722,7 +728,11 @@ case $host_cpu in
+ RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ fi
+ else
+- ASFLAGS="$ASFLAGS -f elf64"
++ if cpp_check "" "" "__ILP32__" ; then
++ asm=no
++ else
++ ASFLAGS="$ASFLAGS -f elf64"
++ fi
+ fi
+ ;;
+ powerpc*)
+--
+2.8.0
+
diff --git a/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch b/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
index bf72fca682..065e3b35b7 100644
--- a/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
+++ b/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
@@ -1,29 +1,33 @@
--march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8
--mfpu=neon.
+From a72bf499a0674fc75eedf15008b424e28f67e4bd Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Fri, 2 Feb 2018 15:10:08 +0200
+Subject: [PATCH] dont default to cortex-a9 with neon
+
+-march flag is not in CFLAGS so this will always default to
+ -mcpu=cortex-a8 -mfpu=neon.
Upstream-Status: Pending
+
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure | 3 ---
+ 1 file changed, 3 deletions(-)
diff --git a/configure b/configure
-index 2916036..f4ece40 100755
+index 0e3ef23..955b993 100755
--- a/configure
+++ b/configure
-@@ -773,9 +773,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
+@@ -911,9 +911,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
fi
if [ $asm = auto -a $ARCH = ARM ] ; then
- # set flags so neon is built by default
-- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
+- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
-
- if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6
- cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2
- cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
-@@ -788,8 +785,6 @@ if [ $asm = auto -a $ARCH = ARM ] ; then
- fi
-
- if [ $asm = auto -a $ARCH = AARCH64 ] ; then
-- # set flags so neon is built by default
-- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu|-arch)' || CFLAGS="$CFLAGS -arch arm64 -mfpu=neon"
-
- if cc_check '' '' '__asm__("cmeq v0.8h, v0.8h, #0");' ; then define HAVE_NEON
- ASFLAGS="$ASFLAGS -c"
+ cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
+ if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
+ define HAVE_ARMV6
+--
+2.4.0
+
diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb
index 393310f684..f22930a0ee 100644
--- a/meta/recipes-multimedia/x264/x264_git.bb
+++ b/meta/recipes-multimedia/x264/x264_git.bb
@@ -6,24 +6,28 @@ LICENSE = "GPLv2"
LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "yasm-native"
+DEPENDS = "nasm-native"
-SRC_URI = "git://git.videolan.org/x264.git \
+SRC_URI = "git://github.com/mirror/x264;branch=stable \
file://don-t-default-to-cortex-a9-with-neon.patch \
+ file://Fix-X32-build-by-disabling-asm.patch \
"
+UPSTREAM_CHECK_COMMITS = "1"
-SRCREV = "c8a773ebfca148ef04f5a60d42cbd7336af0baf6"
+SRCREV = "72db437770fd1ce3961f624dd57a8e75ff65ae0b"
-PV = "r2491+git${SRCPV}"
+PV = "r2917+git${SRCPV}"
S = "${WORKDIR}/git"
-inherit lib_package pkgconfig perlnative
+inherit lib_package pkgconfig
X264_DISABLE_ASM = ""
+X264_DISABLE_ASM_x86 = "--disable-asm"
X264_DISABLE_ASM_armv4 = "--disable-asm"
X264_DISABLE_ASM_armv5 = "--disable-asm"
X264_DISABLE_ASM_powerpc = "${@bb.utils.contains("TUNE_FEATURES", "spe", "--disable-asm", "", d)}"
+X264_DISABLE_ASM_mipsarch = "${@bb.utils.contains("TUNE_FEATURES", "r6", "", "--disable-asm", d)}"
EXTRA_OECONF = '--prefix=${prefix} \
--host=${HOST_SYS} \
@@ -34,20 +38,19 @@ EXTRA_OECONF = '--prefix=${prefix} \
--enable-static \
--disable-lavf \
--disable-swscale \
+ --disable-opencl \
--enable-pic \
${X264_DISABLE_ASM} \
'
do_configure() {
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
./configure ${EXTRA_OECONF}
}
-AS = "${TARGET_PREFIX}gcc"
-
do_install() {
oe_runmake install DESTDIR=${D}
}
-# PIC can't be enabled for few BSP's
-INSANE_SKIP_${PN}_append = " textrel"
-
+AS[unexport] = "1"
diff --git a/meta/recipes-rt/images/core-image-rt-sdk.bb b/meta/recipes-rt/images/core-image-rt-sdk.bb
index 7ddf671bca..624b7d9430 100644
--- a/meta/recipes-rt/images/core-image-rt-sdk.bb
+++ b/meta/recipes-rt/images/core-image-rt-sdk.bb
@@ -4,14 +4,14 @@ require recipes-core/images/core-image-minimal.bb
# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
# to build multiple virtual/kernel providers.
python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
DESCRIPTION = "Small image capable of booting a device with a test suite and \
tools for real-time use. It includes the full meta-toolchain, development \
headers and libraries to form a standalone SDK."
-DEPENDS = "linux-yocto-rt"
+DEPENDS += "linux-yocto-rt"
IMAGE_FEATURES += "dev-pkgs tools-sdk tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks"
diff --git a/meta/recipes-rt/images/core-image-rt.bb b/meta/recipes-rt/images/core-image-rt.bb
index 9c86f25335..053d23219d 100644
--- a/meta/recipes-rt/images/core-image-rt.bb
+++ b/meta/recipes-rt/images/core-image-rt.bb
@@ -4,13 +4,13 @@ require recipes-core/images/core-image-minimal.bb
# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
# to build multiple virtual/kernel providers.
python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
DESCRIPTION = "A small image just capable of allowing a device to boot plus a \
real-time test suite and tools appropriate for real-time use."
-DEPENDS = "linux-yocto-rt"
+DEPENDS += "linux-yocto-rt"
IMAGE_INSTALL += "rt-tests hwlatdetect"
diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index 080a655893..57b39b52a1 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -130,7 +130,7 @@ def log_test_header(seq_no, nr_of_tests, name):
#-------------------------------------------------------------------------------
def start_stress(*args):
- stress_cmd = [ "stress" ]
+ stress_cmd = [ "stress-ng" ]
added_stress_types = []
req_stress_types = set(args)
cpu_cnt = str(multiprocessing.cpu_count())
diff --git a/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb b/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb
new file mode 100644
index 0000000000..5f61c4ecdd
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Hardware latency detector"
+DESCRIPTION = "Python utility for controlling the kernel hardware latency detection module (hwlat_detector.ko)."
+HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
+SECTION = "tests"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+require rt-tests.inc
+inherit python3-dir
+
+EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages"
+
+do_compile() {
+ oe_runmake hwlatdetect
+}
+
+do_install() {
+ oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \
+ MANDIR=${mandir} INCLUDEDIR=${includedir}
+
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py
+}
+
+FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
+RDEPENDS_${PN} = "python3-core "
+RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
diff --git a/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb b/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb
deleted file mode 100644
index 012b2dd0a7..0000000000
--- a/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Hardware latency detector"
-DESCRIPTION = "Python utility for controlling the kernel hardware latency detection module (hwlat_detector.ko)."
-HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
-SECTION = "tests"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-require rt-tests.inc
-inherit python3-dir
-
-EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages"
-
-do_compile() {
- oe_runmake hwlatdetect
-}
-
-do_install() {
- oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \
- MANDIR=${mandir} INCLUDEDIR=${includedir}
-
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py
-}
-
-FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
-RDEPENDS_${PN} = "python3 python3-subprocess python3-textutils"
-RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
diff --git a/meta/recipes-rt/rt-tests/rt-tests.inc b/meta/recipes-rt/rt-tests/rt-tests.inc
index d832828e97..227eb99b98 100644
--- a/meta/recipes-rt/rt-tests/rt-tests.inc
+++ b/meta/recipes-rt/rt-tests/rt-tests.inc
@@ -1,7 +1,10 @@
-# Version v0.96
-SRCREV = "e1b1537a20b35af75a49bf55dcf70296f8a62467"
+# Version 1.1
+SRCREV = "dff174f994f547a5785d32454865f140daacb0f5"
+PE = "1"
SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git"
+# 1.2 to 1.5 seem to be development versions
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(?!1\.[2-5])(\d+(\.\d+)+))"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-rt/rt-tests/rt-tests_1.1.bb b/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
new file mode 100644
index 0000000000..5aa0aa10c3
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Real-Time preemption testcases"
+HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
+SECTION = "tests"
+DEPENDS = "linux-libc-headers virtual/libc"
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+ file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=e768b8da44555fe63f65e5c497844cb5 \
+ file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949"
+
+require rt-tests.inc
+inherit ptest
+
+SRC_URI += " \
+ file://run-ptest \
+ file://rt_bmark.py \
+ "
+
+# rt-tests needs PI mutex support in libc
+COMPATIBLE_HOST_libc-musl = 'null'
+
+# Do not install hwlatdetect
+EXTRA_OEMAKE += "PYLIB=''"
+
+do_install() {
+ oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
+ INCLUDEDIR=${includedir}
+}
+
+do_install_ptest() {
+ cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
+}
+
+RDEPENDS_${PN}-ptest += " stress-ng python3 python3-multiprocessing python3-datetime python3-misc"
+
+FILES_${PN} += "${prefix}/src/backfire"
diff --git a/meta/recipes-rt/rt-tests/rt-tests_2.0.bb b/meta/recipes-rt/rt-tests/rt-tests_2.0.bb
deleted file mode 100644
index 4336c50d63..0000000000
--- a/meta/recipes-rt/rt-tests/rt-tests_2.0.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Real-Time preemption testcases"
-HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
-SECTION = "tests"
-DEPENDS = "linux-libc-headers virtual/libc"
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=e768b8da44555fe63f65e5c497844cb5 \
- file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949"
-
-require rt-tests.inc
-inherit ptest
-
-SRC_URI += " \
- file://run-ptest \
- file://rt_bmark.py \
- "
-# Do not install hwlatdetect
-EXTRA_OEMAKE += "PYLIB=''"
-
-do_install() {
- oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
- INCLUDEDIR=${includedir}
-}
-
-do_install_ptest() {
- cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
-}
-
-RDEPENDS_${PN}-ptest += " stress python3 python3-subprocess python3-multiprocessing python3-datetime python3-re python3-lang python3-misc"
-
-FILES_${PN} += "${prefix}/src/backfire"
diff --git a/meta/recipes-sato/images/core-image-sato-ptest-fast.bb b/meta/recipes-sato/images/core-image-sato-ptest-fast.bb
new file mode 100644
index 0000000000..b794a7dc9e
--- /dev/null
+++ b/meta/recipes-sato/images/core-image-sato-ptest-fast.bb
@@ -0,0 +1,16 @@
+require core-image-sato-sdk.bb
+require conf/distro/include/ptest-packagelists.inc
+
+IMAGE_INSTALL += "${PTESTS_FAST}"
+
+DESCRIPTION += "Also includes ptest packages with fast execution times to allow for more automated QA."
+
+# This image is sufficiently large (~1.8GB) that it can't actually fit in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
+# box) and explicitly add just 1500MB.
+# strace-ptest in particular needs more than 500MB
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "1524288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
diff --git a/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb b/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
index 93e5a4eb6d..ff297fe324 100644
--- a/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
+++ b/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
@@ -1,6 +1,21 @@
require core-image-sato-sdk.bb
+require conf/distro/include/ptest-packagelists.inc
DESCRIPTION += "Also includes ptest packages."
IMAGE_FEATURES += "ptest-pkgs"
+PROVIDES += "core-image-sato-ptest"
+
+# Also include ptests which may not otherwise be included in a sato image
+IMAGE_INSTALL += "${PTESTS_FAST} ${PTESTS_SLOW}"
+
+# This image is sufficiently large (~1.8GB) that we need to be careful that it fits in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
+# box) and explicitly add just 1100MB.
+# strace-ptest in particular needs more than 500MB
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
diff --git a/meta/recipes-sato/images/core-image-sato.bb b/meta/recipes-sato/images/core-image-sato.bb
index e3246d2b67..673106eb6d 100644
--- a/meta/recipes-sato/images/core-image-sato.bb
+++ b/meta/recipes-sato/images/core-image-sato.bb
@@ -8,4 +8,8 @@ LICENSE = "MIT"
inherit core-image
-IMAGE_INSTALL += "packagegroup-core-x11-sato-games"
+TOOLCHAIN_HOST_TASK_append = " nativesdk-intltool nativesdk-glib-2.0"
+TOOLCHAIN_HOST_TASK_remove_task-populate-sdk-ext = " nativesdk-intltool nativesdk-glib-2.0"
+
+QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
+QB_MEM_qemumips = "-m 256"
diff --git a/meta/recipes-sato/l3afpad/l3afpad_git.bb b/meta/recipes-sato/l3afpad/l3afpad_git.bb
index ccfda26589..8906c748ed 100644
--- a/meta/recipes-sato/l3afpad/l3afpad_git.bb
+++ b/meta/recipes-sato/l3afpad/l3afpad_git.bb
@@ -17,7 +17,7 @@ SRCREV ="3cdccdc9505643e50f8208171d9eee5de11a42ff"
S = "${WORKDIR}/git"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
diff --git a/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb b/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb
index b993a94547..547e851c15 100644
--- a/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb
+++ b/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb
@@ -17,7 +17,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
S = "${WORKDIR}/git"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# The settings-daemon requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb b/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb
deleted file mode 100644
index d9a2f22147..0000000000
--- a/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Matchbox Window Manager Desktop"
-HOMEPAGE = "http://matchbox-project.org/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://src/desktop.c;endline=20;md5=36c9bf295e6007f3423095f405af5a2d \
- file://src/main.c;endline=19;md5=2044244f97a195c25b7dc602ac7e9a00"
-
-DEPENDS = "gtk+3 startup-notification dbus"
-SECTION = "x11/wm"
-
-# SRCREV tagged 2.1
-SRCREV = "c8473519a0f37488b8b3e839e275b000cdde0b80"
-SRC_URI = "git://git.yoctoproject.org/${BPN}-2 \
- file://vfolders/* \
- "
-
-EXTRA_OECONF = "--enable-startup-notification --with-dbus"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-# The startup-notification requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-do_install_append() {
- install -d ${D}${datadir}/matchbox/vfolders/
- install -m 0644 ${WORKDIR}/vfolders/* ${D}${datadir}/matchbox/vfolders/
-}
-
-FILES_${PN} += "${datadir}/matchbox/vfolders/"
diff --git a/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.2.bb b/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.2.bb
new file mode 100644
index 0000000000..5c23e85202
--- /dev/null
+++ b/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.2.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Matchbox Window Manager Desktop"
+HOMEPAGE = "http://matchbox-project.org/"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://src/desktop.c;endline=20;md5=36c9bf295e6007f3423095f405af5a2d \
+ file://src/main.c;endline=19;md5=2044244f97a195c25b7dc602ac7e9a00"
+
+DEPENDS = "gtk+3 startup-notification dbus"
+SECTION = "x11/wm"
+
+# SRCREV tagged 2.2
+SRCREV = "6bc67d09da4147e5552fe30011a05a2c59d2f777"
+SRC_URI = "git://git.yoctoproject.org/${BPN}-2 \
+ file://vfolders/* \
+ "
+
+EXTRA_OECONF = "--enable-startup-notification --with-dbus"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig features_check
+
+# The startup-notification requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+do_install_append() {
+ install -d ${D}${datadir}/matchbox/vfolders/
+ install -m 0644 ${WORKDIR}/vfolders/* ${D}${datadir}/matchbox/vfolders/
+}
+
+FILES_${PN} += "${datadir}/matchbox/vfolders/"
diff --git a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb
index 465f1349af..dfc7fbad57 100644
--- a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb
+++ b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb
@@ -18,7 +18,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 \
S = "${WORKDIR}/git"
-inherit autotools pkgconfig gettext gtk-immodules-cache distro_features_check
+inherit autotools pkgconfig gettext gtk-immodules-cache features_check
# The libxft, libfakekey and matchbox-panel-2 requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch b/meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch
new file mode 100644
index 0000000000..d13dd3d5a0
--- /dev/null
+++ b/meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch
@@ -0,0 +1,34 @@
+From f83a9179696b2d060ee4860733dafbf38bbd4b87 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 28 Sep 2016 15:05:41 +0300
+Subject: [PATCH] applets/systray: Allow icons to be smaller
+
+Don't expand/fill the systray items, align them in the center of the
+systray panel. This makes sure the icons are drawn at the size they
+expect.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted
+---
+ applets/systray/systray.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/applets/systray/systray.c b/applets/systray/systray.c
+index 39698a8..94a5753 100644
+--- a/applets/systray/systray.c
++++ b/applets/systray/systray.c
+@@ -29,8 +29,9 @@ on_realize (GtkWidget *widget, gpointer user_data)
+ tray = (GtkWidget *)na_tray_new_for_screen (screen, orientation);
+
+ gtk_widget_show (tray);
+-
+- gtk_container_add (GTK_CONTAINER (widget), tray);
++ gtk_widget_set_valign (tray, GTK_ALIGN_CENTER);
++ gtk_widget_set_halign (tray, GTK_ALIGN_CENTER);
++ gtk_box_pack_start (GTK_BOX (widget), tray, FALSE, FALSE, 0);
+ }
+
+ G_MODULE_EXPORT GtkWidget *
+--
+2.1.4
+
diff --git a/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb b/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb
index a387073d8f..2e6f5b7085 100644
--- a/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb
+++ b/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb
@@ -7,21 +7,23 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://matchbox-panel/mb-panel.h;endline=10;md5=0b7db28f4b6863fb853d0467e590019a \
file://applets/startup/startup.c;endline=22;md5=7cbcea60b667f609495222faf3e07917"
-DEPENDS = "gnome-common gtk+3 startup-notification dbus dbus-glib dbus-glib-native"
+DEPENDS = "gtk+3 startup-notification dbus dbus-glib dbus-glib-native"
DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "libacpi", "",d)}"
DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "apm", "apmd", "",d)}"
# The startup-notification requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
-# SRCREV tagged 2.11
-SRCREV = "850d5fffde7dbfb32015916524d88014cc2cfb30"
+# SRCREV tagged 2.11 plus some autotools fixes
+SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7"
RPROVIDES_${PN} = "matchbox-panel"
RREPLACES_${PN} = "matchbox-panel"
RCONFLICTS_${PN} = "matchbox-panel"
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
+SRC_URI = "git://git.yoctoproject.org/${BPN} \
+ file://0001-applets-systray-Allow-icons-to-be-smaller.patch \
+ "
EXTRA_OECONF = "--enable-startup-notification --enable-dbus"
EXTRA_OECONF += " ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "--with-battery=acpi", "",d)}"
@@ -35,4 +37,4 @@ FILES_${PN} += "${libdir}/matchbox-panel/*.so \
${datadir}/icons/"
FILES_${PN}-dev += "${libdir}/matchbox-panel/*.la"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check gettext
diff --git a/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session b/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session
index f6313bdebe..3a70574af9 100644
--- a/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session
+++ b/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session
@@ -20,7 +20,10 @@ matchbox-desktop &
# doesn't have the feature "foo".
START_APPLETS=showdesktop,windowselector
-END_APPLETS=clock,battery,$KEYBOARD_APPLET,systray,startup-notify,notify
+END_APPLETS=$KEYBOARD_APPLET,systray,startup-notify,notify
+END_APPLETS=battery,$END_APPLETS # feature-acpi
+END_APPLETS=battery,$END_APPLETS # feature-apm
+END_APPLETS=clock,$END_APPLETS
END_APPLETS=openmoko-panel-gsm,$END_APPLETS # feature-phone
matchbox-panel --start-applets $START_APPLETS --end-applets $END_APPLETS &
diff --git a/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb b/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
index 42c742fca6..966c5b5b92 100644
--- a/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
+++ b/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
@@ -6,7 +6,6 @@ LICENSE = "GPLv2.0+"
LIC_FILES_CHKSUM = "file://session;endline=3;md5=f8a5c5b9c279e52dc094d10e11c2be63"
SECTION = "x11"
-DEPENDS = "gconf-native"
RDEPENDS_${PN} = "formfactor matchbox-theme-sato matchbox-panel-2 matchbox-desktop matchbox-session gconf"
PR = "r30"
@@ -14,7 +13,7 @@ PR = "r30"
# based on the machine architecture.
PACKAGE_ARCH = "${MACHINE_ARCH}"
-inherit distro_features_check
+inherit features_check
# The matchbox-theme-sato requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
@@ -27,7 +26,7 @@ FILES_${PN} += "${datadir}/themes/Sato/index.theme"
do_install() {
# This is the set of machine features that the script has markers for
- FEATURES="phone"
+ FEATURES="acpi apm phone"
SCRIPT="${S}/sedder"
rm -f $SCRIPT
touch $SCRIPT
@@ -43,6 +42,7 @@ do_install() {
chmod +x ${D}/${sysconfdir}/matchbox/session
}
+PACKAGE_WRITE_DEPS += "gconf-native"
pkg_postinst_${PN} () {
set_value() {
#type, name, value
diff --git a/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.1.bb b/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.1.bb
deleted file mode 100644
index 4488191b23..0000000000
--- a/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Lightweight GTK+ terminal application"
-HOMEPAGE = "http://www.matchbox-project.org/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://main.c;endline=20;md5=96e39176d9e355639a0b8b1c7a840820"
-
-DEPENDS = "gtk+3 vte"
-SECTION = "x11/utils"
-
-#SRCREV tagged 0.1
-SRCREV = "3ad357db2302760b8a8817b5f4478dd87479442f"
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
diff --git a/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb b/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb
new file mode 100644
index 0000000000..9f00281dde
--- /dev/null
+++ b/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Lightweight GTK+ terminal application"
+HOMEPAGE = "http://www.matchbox-project.org/"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://main.c;endline=20;md5=96e39176d9e355639a0b8b1c7a840820"
+
+DEPENDS = "gtk+3 vte"
+SECTION = "x11/utils"
+
+#SRCREV tagged 0.2
+SRCREV = "161276d0f5d1be8187010fd0d9581a6feca70ea5"
+SRC_URI = "git://git.yoctoproject.org/${BPN}"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig features_check
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
diff --git a/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc b/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc
index d947e1ab0f..ce683e9630 100644
--- a/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc
+++ b/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=aae86bb34b0a83716ca09f4e783d6ba4"
DEPENDS = "matchbox-wm"
SECTION = "x11/wm"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
FILES_${PN} += "${datadir}/themes"
diff --git a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 6fb1b678fe..ed3f1a69a1 100644
--- a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -7,7 +7,7 @@ PR = "r33"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-inherit packagegroup distro_features_check
+inherit packagegroup features_check
REQUIRED_DISTRO_FEATURES = "x11"
PACKAGES = "${PN} ${PN}-base ${PN}-apps ${PN}-games"
@@ -19,7 +19,6 @@ RDEPENDS_${PN} = "\
"
NETWORK_MANAGER ?= "connman-gnome"
-NETWORK_MANAGER_libc-uclibc = ""
SUMMARY_${PN}-base = "Sato desktop - base packages"
RDEPENDS_${PN}-base = "\
@@ -33,9 +32,8 @@ RDEPENDS_${PN}-base = "\
adwaita-icon-theme \
settings-daemon \
shutdown-desktop \
- libsdl \
${NETWORK_MANAGER} \
- udev-extraconf \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'udev-extraconf', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-server pulseaudio-client-conf-sato pulseaudio-misc', '', d)} \
"
@@ -44,13 +42,16 @@ FILEMANAGER ?= "pcmanfm"
WEB ?= ""
#WEB = "epiphany"
+GSTEXAMPLES ?= "gst-examples"
+GSTEXAMPLES_riscv64 = ""
+
SUMMARY_${PN}-apps = "Sato desktop - applications"
RDEPENDS_${PN}-apps = "\
l3afpad \
- gst-player \
matchbox-terminal \
sato-screenshot \
${FILEMANAGER} \
+ ${GSTEXAMPLES} \
${WEB} \
"
diff --git a/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb b/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb
deleted file mode 100644
index a6bf2136e5..0000000000
--- a/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Fast lightweight tabbed filemanager"
-HOMEPAGE = "http://pcmanfm.sourceforge.net/"
-
-LICENSE = "GPLv2 & GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://src/pcmanfm.h;endline=22;md5=417b3855771a3a87f8ad753d994491f0 \
- file://src/gseal-gtk-compat.h;endline=21;md5=46922c8691f58d124f9420fe16149ce2"
-
-SECTION = "x11"
-DEPENDS = "gtk+3 startup-notification libfm intltool-native gettext-native"
-
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|aarch64.*|arm.*|mips.*|powerpc.*|sh.*)-(linux|freebsd.*)'
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.xz \
- file://gnome-fs-directory.png \
- file://gnome-fs-regular.png \
- file://gnome-mime-text-plain.png \
- file://emblem-symbolic-link.png \
- file://no-desktop.patch"
-
-SRC_URI[md5sum] = "19764c2f59653724c8713e0064fa6829"
-SRC_URI[sha256sum] = "38cdbb5f01d24483b41b8e6846e4aa66a5751bb3982a8618899e88a853dbe313"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/pcmanfm/files/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/PCManFM/"
-
-inherit autotools pkgconfig distro_features_check
-
-# The startup-notification requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--with-gtk=3"
-
-do_install_append () {
- install -d ${D}/${datadir}
- install -d ${D}/${datadir}/pixmaps/
-
- install -m 0644 ${WORKDIR}/*.png ${D}/${datadir}/pixmaps
-}
-
-FILES_${PN} += "${libdir}/pcmanfm"
-
-RRECOMMENDS_${PN} += "adwaita-icon-theme"
diff --git a/meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb b/meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb
new file mode 100644
index 0000000000..c88e1ed8d6
--- /dev/null
+++ b/meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Fast lightweight tabbed filemanager"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "GPLv2 & GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://src/pcmanfm.h;endline=22;md5=417b3855771a3a87f8ad753d994491f0 \
+ file://src/gseal-gtk-compat.h;endline=21;md5=46922c8691f58d124f9420fe16149ce2"
+
+SECTION = "x11"
+DEPENDS = "gtk+3 startup-notification libfm intltool-native gettext-native glib-2.0-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.xz \
+ file://gnome-fs-directory.png \
+ file://gnome-fs-regular.png \
+ file://gnome-mime-text-plain.png \
+ file://emblem-symbolic-link.png \
+ file://no-desktop.patch"
+
+SRC_URI[md5sum] = "d32ad2c9c7c52bff2004bbc120b53420"
+SRC_URI[sha256sum] = "6804043b3ee3a703edde41c724946174b505fe958703eadbd7e0876ece836855"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/pcmanfm/files/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/PCManFM/"
+
+inherit autotools pkgconfig features_check
+
+# The startup-notification requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--with-gtk=3"
+
+do_install_append () {
+ install -d ${D}/${datadir}
+ install -d ${D}/${datadir}/pixmaps/
+
+ install -m 0644 ${WORKDIR}/*.png ${D}/${datadir}/pixmaps
+}
+
+FILES_${PN} += "${libdir}/pcmanfm"
+
+RRECOMMENDS_${PN} += "adwaita-icon-theme"
diff --git a/meta/recipes-sato/puzzles/files/0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch b/meta/recipes-sato/puzzles/files/0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch
new file mode 100644
index 0000000000..d40a3b1ef9
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch
@@ -0,0 +1,32 @@
+From 337799e40350b3db2441cc98f65ec36a74dfb356 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 21 Apr 2017 12:18:08 -0700
+Subject: [PATCH] Use -Wno-error=format-overflow= if the compiler supports it
+
+we need this warning to be suppressed with gcc7+
+however older compilers dont support it so we need
+a way to disble it only if compiler supports it
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3a38c95..bb9035e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -42,7 +42,7 @@ fi
+ if test "x$GCC" = "xyes"; then
+ AC_MSG_CHECKING([for usable gcc warning flags])
+ gccwarningflags=
+- for flag in -Wall -Werror -std=c89 -pedantic; do
++ for flag in -Wall -Werror -std=c89 -pedantic -Wno-error=format-overflow=; do
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS$gccwarningflags $flag $GTK_CFLAGS"
+--
+2.12.2
+
diff --git a/meta/recipes-sato/puzzles/files/0001-Use-labs-instead-of-abs.patch b/meta/recipes-sato/puzzles/files/0001-Use-labs-instead-of-abs.patch
deleted file mode 100644
index f43d1df6cc..0000000000
--- a/meta/recipes-sato/puzzles/files/0001-Use-labs-instead-of-abs.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 9808dc09e08937c9bffd858d3ded428225a4312a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 09:02:38 +0000
-Subject: [PATCH] Use labs instead of abs
-
-cluevals is array of longs so we have to use labs() instead of abs()
-since abs() returns int
-
-Fixes
-
-keen.c:1458:17: error: absolute value function 'abs' given an argument
-of type 'long' but has parameter of type 'int' which may cause
-truncation of value
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- keen.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/keen.c b/keen.c
-index a6a7238..1631992 100644
---- a/keen.c
-+++ b/keen.c
-@@ -1043,7 +1043,7 @@ done
- cluevals[j] *= grid[i];
- break;
- case C_SUB:
-- cluevals[j] = abs(cluevals[j] - grid[i]);
-+ cluevals[j] = labs(cluevals[j] - grid[i]);
- break;
- case C_DIV:
- {
-@@ -1455,7 +1455,7 @@ static int check_errors(const game_state *state, long *errors)
- cluevals[j] *= state->grid[i];
- break;
- case C_SUB:
-- cluevals[j] = abs(cluevals[j] - state->grid[i]);
-+ cluevals[j] = labs(cluevals[j] - state->grid[i]);
- break;
- case C_DIV:
- {
---
-2.5.1
-
diff --git a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch b/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
index 5351f8eb4e..143e898a51 100644
--- a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
+++ b/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
@@ -1,7 +1,7 @@
-From 6d8326275802a2e6e61d3e99460af6891ae8362f Mon Sep 17 00:00:00 2001
+From 453587d714473b806473b309727f865b673cbc06 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 Jan 2016 23:10:19 -0800
-Subject: [puzzles][PATCH] palisade: Fix warnings with clang on arm
+Subject: [PATCH] palisade: Fix warnings with clang on arm
ARM treats 'char' as unsigned char when 'char' is not qualified with
'signed' or 'unsigned' explicitly.
@@ -16,17 +16,16 @@ type 'clue' (aka 'char') is always false
Therefore, typcast the contant to char in such places to be explicit
Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Submitted
-
+---
palisade.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/palisade.c b/palisade.c
-index 984e616..2b9c25c 100644
+index 6ffbf2d..8b54d42 100644
--- a/palisade.c
+++ b/palisade.c
-@@ -295,11 +295,11 @@ static void solver_connected_clues_versus_region_size(solver_ctx *ctx)
+@@ -304,11 +304,11 @@ static void solver_connected_clues_versus_region_size(solver_ctx *ctx)
* If p = q = 3 then the region has size exactly 2. */
for (i = 0; i < wh; ++i) {
@@ -40,8 +39,8 @@ index 984e616..2b9c25c 100644
if ((8 - ctx->clues[i] - ctx->clues[j] > ctx->params->k) ||
(ctx->clues[i] == 3 && ctx->clues[j] == 3 &&
ctx->params->k != 2))
-@@ -317,7 +317,7 @@ static int solver_number_exhausted(solver_ctx *ctx)
- int changed = FALSE;
+@@ -326,7 +326,7 @@ static bool solver_number_exhausted(solver_ctx *ctx)
+ bool changed = false;
for (i = 0; i < wh; ++i) {
- if (ctx->clues[i] == EMPTY) continue;
@@ -49,16 +48,16 @@ index 984e616..2b9c25c 100644
if (bitcount[(ctx->borders[i] & BORDER_MASK)] == ctx->clues[i]) {
for (dir = 0; dir < 4; ++dir) {
-@@ -528,7 +528,7 @@ static int is_solved(const game_params *params, clue *clues,
+@@ -538,7 +538,7 @@ static bool is_solved(const game_params *params, clue *clues,
for (i = 0; i < wh; ++i) {
- if (dsf[i] == UNVISITED) dfs_dsf(i, params->w, border, dsf, TRUE);
+ if (dsf[i] == UNVISITED) dfs_dsf(i, params->w, border, dsf, true);
if (dsf_size(dsf, i) != k) goto error;
- if (clues[i] == EMPTY) continue;
+ if (clues[i] == (char)EMPTY) continue;
if (clues[i] != bitcount[border[i] & BORDER_MASK]) goto error;
}
-@@ -674,7 +674,7 @@ static char *new_game_desc(const game_params *params, random_state *rs,
+@@ -685,7 +685,7 @@ static char *new_game_desc(const game_params *params, random_state *rs,
p = numbers;
r = 0;
for (i = 0; i < wh; ++i) {
@@ -67,6 +66,3 @@ index 984e616..2b9c25c 100644
while (r) {
while (r > 26) {
*p++ = 'z';
---
-2.7.0
-
diff --git a/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch b/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch
new file mode 100644
index 0000000000..7ca582fe5d
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch
@@ -0,0 +1,34 @@
+From 3af5a1e579e3324a13ba1f892c7befb3ab32d899 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Mar 2019 21:56:57 -0800
+Subject: [PATCH] pattern.c: Change string lenght parameter to be size_t in
+ do_row()
+
+This fixes below error on some architectures e.g. RISC-V
+
+pattern.c:455:9: error: 'memset' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 455 | memset(deduced, DOT, (size_t)len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ pattern.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pattern.c b/pattern.c
+index ffadd3f..4e5f187 100644
+--- a/pattern.c
++++ b/pattern.c
+@@ -428,7 +428,7 @@ static bool do_row(unsigned char *known, unsigned char *deduced,
+ unsigned char *row,
+ unsigned char *minpos_done, unsigned char *maxpos_done,
+ unsigned char *minpos_ok, unsigned char *maxpos_ok,
+- unsigned char *start, int len, int step, int *data,
++ unsigned char *start, size_t len, int step, int *data,
+ unsigned int *changed
+ #ifdef STANDALONE_SOLVER
+ , const char *rowcol, int index, int cluewid
+--
+2.17.1
+
diff --git a/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch b/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
deleted file mode 100644
index 0b971c432e..0000000000
--- a/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 78d6d1706c21ad467520075ff7a8bf15cfbd68b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 30 Dec 2015 22:13:16 +0000
-Subject: [PATCH] rect: Fix compiler errors about uninitialized use of
- variables
-
-error: 'r2.x' may be used uninitialized in this function
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- rect.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/rect.c b/rect.c
-index 55667c0..fa3a786 100644
---- a/rect.c
-+++ b/rect.c
-@@ -1317,7 +1317,8 @@ static char *new_game_desc(const game_params *params_in, random_state *rs,
- if (ndirs > 0) {
- int which, dir;
- struct rect r1, r2;
--
-+ memset(&r1, 0, sizeof(struct rect));
-+ memset(&r2, 0, sizeof(struct rect));
- which = random_upto(rs, ndirs);
- dir = dirs[which];
-
---
-2.6.4
-
diff --git a/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
index c134acde2f..28040523d4 100644
--- a/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
+++ b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
@@ -1,4 +1,7 @@
-gtk.c: fix compiling failure with option -g -O
+From 876c6ff1e20f51b0921acda99861f476b6423f26 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 11 Aug 2014 12:39:53 +0800
+Subject: [PATCH] gtk.c: fix compiling failure with option -g -O
There were compiling failure with option -g -O
...
@@ -21,23 +24,21 @@ Initialized pointer 'cr' and 'error' with NULL
Upstream-Status: Pending
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
---
- gtk.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ gtk.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtk.c b/gtk.c
-index a2eba2c..c54bf63 100644
+index 4565836..5e83b48 100644
--- a/gtk.c
+++ b/gtk.c
-@@ -2481,7 +2481,7 @@ char *fgetline(FILE *fp)
+@@ -2944,7 +2944,7 @@ static void list_presets_from_menu(struct preset_menu *menu)
int main(int argc, char **argv)
{
char *pname = argv[0];
- char *error;
+ char *error = NULL;
- int ngenerate = 0, print = FALSE, px = 1, py = 1;
- int time_generation = FALSE, test_solve = FALSE, list_presets = FALSE;
- int soln = FALSE, colour = FALSE;
---
-1.9.1
-
+ int ngenerate = 0, px = 1, py = 1;
+ bool print = false;
+ bool time_generation = false, test_solve = false, list_presets = false;
diff --git a/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch b/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch
new file mode 100644
index 0000000000..7218d620ec
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch
@@ -0,0 +1,25 @@
+puzzles: avoid compiler unitialized variable error
+
+The compiler does not realize that we must go through the while()
+loop at least once, so we replace it with a for() loop.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/tree234.c
++++ b/tree234.c
+@@ -326,8 +326,11 @@ static void *add234_internal(tree234 *t,
+ return orig_e;
+ }
+
+- n = t->root;
+- while (n) {
++ /*
++ * We know t->root is not NULL. The logic
++ * to break out of this is at the end of the loop.
++ */
++ for (n = t->root;;) {
+ LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb
index 20b98891bb..57f2af48eb 100644
--- a/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -1,46 +1,37 @@
SUMMARY = "Simon Tatham's Portable Puzzle Collection"
HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=da6110d4ed1225a287eab2bf0ac0193b"
DEPENDS = "libxt"
# The libxt requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
-
SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
file://fix-compiling-failure-with-option-g-O.patch \
- file://0001-Use-labs-instead-of-abs.patch \
- file://0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch \
file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
-"
-SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed"
-PE = "1"
+ file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \
+ file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \
+ file://fix-ki-uninitialized.patch \
+ "
+
+UPSTREAM_CHECK_COMMITS = "1"
+SRCREV = "1c0c49dd5cd8df6ae87f7be5371be84589fa2662"
+PE = "2"
PV = "0.0+git${SRCPV}"
S = "${WORKDIR}/git"
-inherit autotools distro_features_check pkgconfig
-
-CFLAGS_append = " -Wno-deprecated-declarations"
+inherit autotools features_check pkgconfig
PACKAGECONFIG ??= "gtk3"
PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+,"
PACKAGECONFIG[gtk3] = "--with-gtk=3,,gtk+3,"
-PACKAGES += "${PN}-extra"
-FILES_${PN} = ""
-FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications"
+CFLAGS_append = " -Wno-deprecated-declarations"
-python __anonymous () {
- var = d.expand("FILES_${PN}")
- data = d.getVar(var, False)
- for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
- data = data + " ${bindir}/%s" % name
- data = data + " ${datadir}/applications/%s.desktop" % name
- d.setVar(var, data)
-}
+ASNEEDED = ""
do_configure_prepend () {
cd ${S}
@@ -73,3 +64,17 @@ STOP
fi
done
}
+
+PACKAGES += "${PN}-extra"
+
+FILES_${PN} = ""
+FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications"
+
+python __anonymous () {
+ var = d.expand("FILES_${PN}")
+ data = d.getVar(var, False)
+ for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
+ data = data + " ${bindir}/%s" % name
+ data = data + " ${datadir}/applications/%s.desktop" % name
+ d.setVar(var, data)
+}
diff --git a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
index 4d5daa661c..b568f04580 100644
--- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
+++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
@@ -12,7 +12,7 @@ SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2
file://rxvt.desktop \
file://rxvt.png"
-inherit autotools update-alternatives
+inherit autotools pkgconfig update-alternatives
PROVIDES = "virtual/x-terminal-emulator"
ALTERNATIVE_${PN} = "x-terminal-emulator"
diff --git a/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.20.bb b/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.20.bb
deleted file mode 100644
index 3480ec74bf..0000000000
--- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.20.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require rxvt-unicode.inc
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://src/main.C;beginline=1;endline=31;md5=775485398a09fa7aee6f90464af88432"
-
-SRC_URI[md5sum] = "4a5b823f08d21036f94a6c51e94d025b"
-SRC_URI[sha256sum] = "e73e13fe64b59fd3c8e6e20c00f149d388741f141b8155e4700d3ed40aa94b4e"
diff --git a/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb b/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb
index f3305aef78..f6dac2cf88 100644
--- a/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb
+++ b/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb
@@ -16,7 +16,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
S = "${WORKDIR}/git"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
FILES_${PN} += "${libdir}/matchbox-panel/*.so"
diff --git a/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb b/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
index ceaeccaaa1..227fd54b79 100644
--- a/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
+++ b/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
@@ -10,14 +10,14 @@ SECTION = "x11"
# SRCREV tagged 0.0.2
SRCREV = "b2e5da502f8c5ff75e9e6da771372ef8e40fd9a2"
SRC_URI = "git://git.yoctoproject.org/xsettings-daemon \
- file://addsoundkeys.patch;apply=yes \
+ file://addsoundkeys.patch \
file://70settings-daemon.sh \
"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
S = "${WORKDIR}/git"
-inherit autotools pkgconfig gconf distro_features_check
+inherit autotools pkgconfig gconf features_check
FILES_${PN} = "${bindir}/* ${sysconfdir}"
diff --git a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
index ebdd6d123a..28d5096023 100644
--- a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
+++ b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
@@ -1,7 +1,6 @@
SUMMARY = "Provides an icon to shut down the system cleanly"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://shutdown.desktop"
diff --git a/meta/recipes-sato/webkit/files/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch b/meta/recipes-sato/webkit/files/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch
deleted file mode 100644
index 615fe4f402..0000000000
--- a/meta/recipes-sato/webkit/files/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 5760d346b42807b596f479c81f7a6b42eb36065e Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 29 Aug 2016 16:38:11 +0300
-Subject: [PATCH] Fix racy parallel build of WebKit2-4.0.gir
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Source/WebKit2/PlatformGTK.cmake | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
-index adaa010..f18cf8a 100644
---- a/Source/WebKit2/PlatformGTK.cmake
-+++ b/Source/WebKit2/PlatformGTK.cmake
-@@ -906,8 +906,9 @@ endif ()
- string(REGEX MATCHALL "-L[^ ]*"
- INTROSPECTION_ADDITIONAL_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
-
--add_custom_command(
-- OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
-+# This is a target and not a command because it's used to build another .gir
-+# and a .typelib, which would trigger two racy parallel builds when using command
-+add_custom_target(WebKit2-${WEBKITGTK_API_VERSION}-gir
- DEPENDS WebKit2
- DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
-@@ -950,7 +951,7 @@ add_custom_command(
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
- DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
-- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
-+ DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir
- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS}
- LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
- ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
-@@ -1004,7 +1005,7 @@ add_custom_command(
-
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
-- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
-+ DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir
- COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
- )
-
---
-2.9.3
-
diff --git a/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch b/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
deleted file mode 100644
index 93a69c0292..0000000000
--- a/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 48648570e449cf7f84a26dc03c1e3f620fa69757 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 29 Feb 2016 18:13:39 +0200
-Subject: [PATCH] OptionsGTK.cmake: drop the hardcoded introspection/gtkdoc
- disabling when cross-compiling
-
-This was not possible to override from the command line and in OpenEmbedded
-(one of the most prominent cross-compilation frameworks) introspection does work fine,
-through the use of qemu target emulation.
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Source/cmake/OptionsGTK.cmake | 6 ------
- 1 file changed, 6 deletions(-)
-
-Index: webkitgtk-2.12.1/Source/cmake/OptionsGTK.cmake
-===================================================================
---- webkitgtk-2.12.1.orig/Source/cmake/OptionsGTK.cmake
-+++ webkitgtk-2.12.1/Source/cmake/OptionsGTK.cmake
-@@ -424,12 +424,6 @@ if (USE_LIBHYPHEN)
- endif ()
- endif ()
-
--# Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building.
--if (CMAKE_CROSSCOMPILING)
-- set(ENABLE_GTKDOC OFF)
-- set(ENABLE_INTROSPECTION OFF)
--endif ()
--
- # Override the cached variable, gtk-doc does not really work when building on Mac.
- if (APPLE)
- set(ENABLE_GTKDOC OFF)
diff --git a/meta/recipes-sato/webkit/files/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch b/meta/recipes-sato/webkit/files/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch
deleted file mode 100644
index 586dd2375c..0000000000
--- a/meta/recipes-sato/webkit/files/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4eeeaec775e190cf3f5885d7c6717acebd0201a8 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 11 Aug 2016 17:13:51 +0300
-Subject: [PATCH] Tweak gtkdoc settings so that gtkdoc generation works under
- OpenEmbedded build system
-
-This requires setting a few environment variables so that the transient
-binary is build and linked correctly, and disabling the tweaks to RUN
-variable from gtkdoc.py script so that our qemu wrapper is taken into use.
-
-Upstream-Status: Inappropriate [oe-specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Source/PlatformGTK.cmake | 2 +-
- Tools/gtk/gtkdoc.py | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Source/PlatformGTK.cmake b/Source/PlatformGTK.cmake
-index af4d2e3..b7b93c7 100644
---- a/Source/PlatformGTK.cmake
-+++ b/Source/PlatformGTK.cmake
-@@ -25,7 +25,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
- add_custom_command(
- OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
- DEPENDS ${DocumentationDependencies}
-- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
-+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} LD=${CMAKE_C_COMPILER} LDFLAGS=${CMAKE_C_LINK_FLAGS} RUN=${CMAKE_BINARY_DIR}/gtkdoc-qemuwrapper GIR_EXTRA_LIBS_PATH=${CMAKE_BINARY_DIR}/lib ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
- COMMAND touch ${_stamp_name}
- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
- )
-diff --git a/Tools/gtk/gtkdoc.py b/Tools/gtk/gtkdoc.py
-index 4c8237b..c0205f0 100644
---- a/Tools/gtk/gtkdoc.py
-+++ b/Tools/gtk/gtkdoc.py
-@@ -318,9 +318,9 @@ class GTKDoc(object):
- additional_ldflags = '%s %s' % (additional_ldflags, arg)
- ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags
- current_ld_library_path = env.get('LD_LIBRARY_PATH')
-- if current_ld_library_path:
-+ if current_ld_library_path and 'RUN' not in env:
- env['RUN'] = 'LD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_ld_library_path)
-- else:
-+ elif 'RUN' not in env:
- env['RUN'] = 'LD_LIBRARY_PATH="%s" ' % self.library_path
-
- if ldflags:
---
-2.8.1
-
diff --git a/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch b/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
deleted file mode 100644
index 25b3c9f243..0000000000
--- a/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From 53a00058184cd710c6f4375f4daab49d7e885a30 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 17 Apr 2016 12:35:41 -0700
-Subject: [PATCH] WebKitMacros: Append to -I and not to -isystem
-
-gcc-6 has now introduced stdlib.h in libstdc++ for better
-compliance and its including the C library stdlib.h using
-include_next which is sensitive to order of system header
-include paths. Its infact better to not tinker with the
-system header include paths at all. Since adding /usr/include
-to -system is redundant and compiler knows about it moreover
-now with gcc6 it interferes with compiler's functioning
-and ends up with compile errors e.g.
-
-/usr/include/c++/6.0.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Source/cmake/WebKitMacros.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: webkitgtk-2.12.1/Source/JavaScriptCore/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Source/JavaScriptCore/CMakeLists.txt
-+++ webkitgtk-2.12.1/Source/JavaScriptCore/CMakeLists.txt
-@@ -1311,7 +1311,7 @@ add_subdirectory(shell)
-
- WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
- include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
- add_library(JavaScriptCore ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
- target_link_libraries(JavaScriptCore ${JavaScriptCore_LIBRARIES})
- set_target_properties(JavaScriptCore PROPERTIES COMPILE_DEFINITIONS "BUILDING_JavaScriptCore")
-Index: webkitgtk-2.12.1/Source/WTF/wtf/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Source/WTF/wtf/CMakeLists.txt
-+++ webkitgtk-2.12.1/Source/WTF/wtf/CMakeLists.txt
-@@ -286,7 +286,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
-
- WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
- include_directories(${WTF_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${WTF_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${WTF_SYSTEM_INCLUDE_DIRECTORIES})
- add_library(WTF ${WTF_LIBRARY_TYPE} ${WTF_HEADERS} ${WTF_SOURCES})
- target_link_libraries(WTF ${WTF_LIBRARIES})
- set_target_properties(WTF PROPERTIES COMPILE_DEFINITIONS "BUILDING_WTF")
-Index: webkitgtk-2.12.1/Source/WebCore/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Source/WebCore/CMakeLists.txt
-+++ webkitgtk-2.12.1/Source/WebCore/CMakeLists.txt
-@@ -3748,7 +3748,7 @@ WEBKIT_WRAP_SOURCELIST(${WebCore_IDL_FIL
- WEBKIT_WRAP_SOURCELIST(${WebCoreTestSupport_IDL_FILES} ${WebCoreTestSupport_SOURCES})
-
- include_directories(${WebCore_INCLUDE_DIRECTORIES} ${WebCoreTestSupport_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${WebCore_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${WebCore_SYSTEM_INCLUDE_DIRECTORIES})
-
- if (MSVC)
- ADD_PRECOMPILED_HEADER("WebCorePrefix.h" "WebCorePrefix.cpp" WebCore_SOURCES)
-Index: webkitgtk-2.12.1/Source/WebKit/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Source/WebKit/CMakeLists.txt
-+++ webkitgtk-2.12.1/Source/WebKit/CMakeLists.txt
-@@ -28,7 +28,7 @@ set(WebKit_LIBRARIES
- WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
-
- include_directories(${WebKit_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
-
- if (MSVC)
- ADD_PRECOMPILED_HEADER("WebKitPrefix.h" "win/WebKitPrefix.cpp" WebKit_SOURCES)
-Index: webkitgtk-2.12.1/Source/WebKit2/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Source/WebKit2/CMakeLists.txt
-+++ webkitgtk-2.12.1/Source/WebKit2/CMakeLists.txt
-@@ -756,7 +756,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
- GENERATE_WEBKIT2_MESSAGE_SOURCES(WebKit2_DERIVED_SOURCES "${WebKit2_MESSAGES_IN_FILES}")
-
- include_directories(${WebKit2_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${WebKit2_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${WebKit2_SYSTEM_INCLUDE_DIRECTORIES})
- add_library(WebKit2 ${WebKit2_LIBRARY_TYPE} ${WebKit2_SOURCES} ${WebKit2_DERIVED_SOURCES})
-
- add_dependencies(WebKit2 WebCore ${WEBKIT2_EXTRA_DEPENDENCIES})
-Index: webkitgtk-2.12.1/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
-+++ webkitgtk-2.12.1/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
-@@ -42,7 +42,7 @@ set(WebKitTestNetscapePlugin_SYSTEM_INCL
- )
-
- include_directories(${WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${WebKitTestNetscapePlugin_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${WebKitTestNetscapePlugin_SYSTEM_INCLUDE_DIRECTORIES})
-
- set(WebKitTestNetscapePlugin_LIBRARIES
- ${X11_LIBRARIES}
-Index: webkitgtk-2.12.1/Tools/ImageDiff/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Tools/ImageDiff/CMakeLists.txt
-+++ webkitgtk-2.12.1/Tools/ImageDiff/CMakeLists.txt
-@@ -14,7 +14,7 @@ set(IMAGE_DIFF_LIBRARIES
- WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
-
- include_directories(${IMAGE_DIFF_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${IMAGE_DIFF_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${IMAGE_DIFF_SYSTEM_INCLUDE_DIRECTORIES})
- add_executable(ImageDiff ${IMAGE_DIFF_SOURCES})
- target_link_libraries(ImageDiff ${IMAGE_DIFF_LIBRARIES})
- set_target_properties(ImageDiff PROPERTIES FOLDER "Tools")
-Index: webkitgtk-2.12.1/Tools/MiniBrowser/gtk/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Tools/MiniBrowser/gtk/CMakeLists.txt
-+++ webkitgtk-2.12.1/Tools/MiniBrowser/gtk/CMakeLists.txt
-@@ -55,7 +55,7 @@ endif ()
- add_definitions(-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6)
-
- include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES})
- add_executable(MiniBrowser ${MiniBrowser_SOURCES})
- target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
- set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools")
-Index: webkitgtk-2.12.1/Tools/WebKitTestRunner/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Tools/WebKitTestRunner/CMakeLists.txt
-+++ webkitgtk-2.12.1/Tools/WebKitTestRunner/CMakeLists.txt
-@@ -115,7 +115,7 @@ GENERATE_BINDINGS(WebKitTestRunner_SOURC
- WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
-
- include_directories(${WebKitTestRunner_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES})
-
- add_library(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
- target_link_libraries(TestRunnerInjectedBundle ${WebKitTestRunner_LIBRARIES})
-Index: webkitgtk-2.12.1/Source/WebCore/PlatformGTK.cmake
-===================================================================
---- webkitgtk-2.12.1.orig/Source/WebCore/PlatformGTK.cmake
-+++ webkitgtk-2.12.1/Source/WebCore/PlatformGTK.cmake
-@@ -324,7 +324,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
- ${GTK2_INCLUDE_DIRS}
- ${GDK2_INCLUDE_DIRS}
- )
-- target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
-+ target_include_directories(WebCorePlatformGTK2 PRIVATE
- ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
- )
- target_link_libraries(WebCorePlatformGTK2
-@@ -366,7 +366,7 @@ WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreP
- target_include_directories(WebCorePlatformGTK PRIVATE
- ${WebCore_INCLUDE_DIRECTORIES}
- )
--target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
-+target_include_directories(WebCorePlatformGTK PRIVATE
- ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
- ${GTK_INCLUDE_DIRS}
- ${GDK_INCLUDE_DIRS}
-@@ -384,7 +384,7 @@ include_directories(
- "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
- )
-
--include_directories(SYSTEM
-+include_directories(
- ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
- )
-
-Index: webkitgtk-2.12.1/Tools/TestWebKitAPI/PlatformGTK.cmake
-===================================================================
---- webkitgtk-2.12.1.orig/Tools/TestWebKitAPI/PlatformGTK.cmake
-+++ webkitgtk-2.12.1/Tools/TestWebKitAPI/PlatformGTK.cmake
-@@ -20,7 +20,7 @@ include_directories(
- ${WEBKIT2_DIR}/UIProcess/API/gtk
- )
-
--include_directories(SYSTEM
-+include_directories(
- ${GDK3_INCLUDE_DIRS}
- ${GLIB_INCLUDE_DIRS}
- ${GTK3_INCLUDE_DIRS}
-Index: webkitgtk-2.12.1/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt
-+++ webkitgtk-2.12.1/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt
-@@ -23,7 +23,7 @@ include_directories(
- ${TOOLS_DIR}/TestWebKitAPI/gtk/WebKit2Gtk
- )
-
--include_directories(SYSTEM
-+include_directories(
- ${ATSPI_INCLUDE_DIRS}
- ${GLIB_INCLUDE_DIRS}
- ${GSTREAMER_INCLUDE_DIRS}
-Index: webkitgtk-2.12.1/Source/WebKit2/PlatformGTK.cmake
-===================================================================
---- webkitgtk-2.12.1.orig/Source/WebKit2/PlatformGTK.cmake
-+++ webkitgtk-2.12.1/Source/WebKit2/PlatformGTK.cmake
-@@ -816,7 +816,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
- target_include_directories(WebKitPluginProcess2 PRIVATE
- ${WebKit2CommonIncludeDirectories}
- )
-- target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE
-+ target_include_directories(WebKitPluginProcess2 PRIVATE
- ${WebKit2CommonSystemIncludeDirectories}
- ${GTK2_INCLUDE_DIRS}
- ${GDK2_INCLUDE_DIRS}
-Index: webkitgtk-2.12.1/Source/JavaScriptCore/shell/CMakeLists.txt
-===================================================================
---- webkitgtk-2.12.1.orig/Source/JavaScriptCore/shell/CMakeLists.txt
-+++ webkitgtk-2.12.1/Source/JavaScriptCore/shell/CMakeLists.txt
-@@ -20,7 +20,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
-
- WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES})
- include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
--include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
-+include_directories(${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
- add_executable(jsc ${JSC_SOURCES})
- target_link_libraries(jsc ${JSC_LIBRARIES})
- set_target_properties(jsc PROPERTIES FOLDER "JavaScriptCore")
diff --git a/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch b/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
deleted file mode 100644
index 3f71297f50..0000000000
--- a/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From bae9f73b2c693b5aa156fed717d6481b60682786 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 28 Oct 2015 14:18:57 +0200
-Subject: [PATCH] When building introspection files, add CMAKE_C_FLAGS to the
- compiler flags.
-
-g-ir-compiler is using a C compiler internally, so it needs to set
-the proper flags for it.
-
-Upstream-Status: Pending [review on oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Source/WebKit2/PlatformGTK.cmake | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: webkitgtk-2.12.1/Source/WebKit2/PlatformGTK.cmake
-===================================================================
---- webkitgtk-2.12.1.orig/Source/WebKit2/PlatformGTK.cmake
-+++ webkitgtk-2.12.1/Source/WebKit2/PlatformGTK.cmake
-@@ -910,7 +910,7 @@ add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
- DEPENDS WebKit2
- DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
-- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
-+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
- ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
- ${INTROSPECTION_SCANNER}
- --quiet
-@@ -951,7 +951,7 @@ add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
- DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
-- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
-+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS}
- LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
- ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
- ${INTROSPECTION_SCANNER}
diff --git a/meta/recipes-sato/webkit/files/musl-fixes.patch b/meta/recipes-sato/webkit/files/musl-fixes.patch
deleted file mode 100644
index 4fdd56fea0..0000000000
--- a/meta/recipes-sato/webkit/files/musl-fixes.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Replace __GLIBC__ with __linux__ since musl also supports it
-so checking __linux__ is more accomodating
-
-See http://git.alpinelinux.org/cgit/aports/tree/community/webkit2gtk/musl-fixes.patch?id=219435d86d7e8fac9474344a7431c62bd2525184
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: webkitgtk-2.12.1/Source/JavaScriptCore/heap/MachineStackMarker.cpp
-===================================================================
---- webkitgtk-2.12.1.orig/Source/JavaScriptCore/heap/MachineStackMarker.cpp
-+++ webkitgtk-2.12.1/Source/JavaScriptCore/heap/MachineStackMarker.cpp
-@@ -566,7 +566,7 @@ void* MachineThreads::Thread::Registers:
- #error Unknown Architecture
- #endif
-
--#elif defined(__GLIBC__) && ENABLE(JIT)
-+#elif defined(__linux__) && ENABLE(JIT)
-
- #if CPU(X86)
- return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_ESP]);
-@@ -665,7 +665,7 @@ void* MachineThreads::Thread::Registers:
- #error Unknown Architecture
- #endif
-
--#elif defined(__GLIBC__)
-+#elif defined(__linux__) // glibc and musl
-
- // The following sequence depends on glibc's sys/ucontext.h.
- #if CPU(X86)
-@@ -747,7 +747,7 @@ void* MachineThreads::Thread::Registers:
- #error Unknown Architecture
- #endif
-
--#elif defined(__GLIBC__)
-+#elif defined(__linux__) // glibc and musl
-
- // The following sequence depends on glibc's sys/ucontext.h.
- #if CPU(X86)
-@@ -838,7 +838,7 @@ void* MachineThreads::Thread::Registers:
- #error Unknown Architecture
- #endif
-
--#elif defined(__GLIBC__)
-+#elif defined(__linux__) // glibc and musl
-
- // The following sequence depends on glibc's sys/ucontext.h.
- #if CPU(X86)
diff --git a/meta/recipes-sato/webkit/files/ppc-musl-fix.patch b/meta/recipes-sato/webkit/files/ppc-musl-fix.patch
deleted file mode 100644
index 5f58e4953e..0000000000
--- a/meta/recipes-sato/webkit/files/ppc-musl-fix.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-ucontext structure is different between musl and glibc for ppc
-therefore its not enough just to check for arch alone, we also
-need to check for libc type.
-
-Fixes errors like
-
-Source/JavaScriptCore/heap/MachineStackMarker.cpp:90:65: error: 'struct mcontext_t' has no member named 'uc_regs'; did you mean 'gregs'?
- thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: webkitgtk-2.12.3/Source/JavaScriptCore/heap/MachineStackMarker.cpp
-===================================================================
---- webkitgtk-2.12.3.orig/Source/JavaScriptCore/heap/MachineStackMarker.cpp
-+++ webkitgtk-2.12.3/Source/JavaScriptCore/heap/MachineStackMarker.cpp
-@@ -86,7 +86,7 @@ static void pthreadSignalHandlerSuspendR
- }
-
- ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
--#if CPU(PPC)
-+#if CPU(PPC) && defined(__GLIBC__)
- thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
- #else
- thread->suspendedMachineContext = userContext->uc_mcontext;
diff --git a/meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch b/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
index fae3b0b2e5..fae3b0b2e5 100644
--- a/meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch
new file mode 100644
index 0000000000..0c145c7ebd
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch
@@ -0,0 +1,75 @@
+From c4d4d9f1aa74addefdad40294cf16d9e0b3dd6ec Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 6 Oct 2017 17:00:08 +0300
+Subject: [PATCH] Fix build with musl
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ Source/JavaScriptCore/runtime/MachineContext.h | 10 +++++-----
+ Source/WTF/wtf/Platform.h | 2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Source/JavaScriptCore/runtime/MachineContext.h b/Source/JavaScriptCore/runtime/MachineContext.h
+index 823964c2..00841146 100644
+--- a/Source/JavaScriptCore/runtime/MachineContext.h
++++ b/Source/JavaScriptCore/runtime/MachineContext.h
+@@ -188,7 +188,7 @@ static inline void*& stackPointerImpl(mcontext_t& machineContext)
+ #error Unknown Architecture
+ #endif
+
+-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
++#elif defined(__linux__)
+
+ #if CPU(X86)
+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESP]);
+@@ -335,7 +335,7 @@ static inline void*& framePointerImpl(mcontext_t& machineContext)
+ #error Unknown Architecture
+ #endif
+
+-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
++#elif defined(__linux__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+ #if CPU(X86)
+@@ -482,7 +482,7 @@ static inline void*& instructionPointerImpl(mcontext_t& machineContext)
+ #error Unknown Architecture
+ #endif
+
+-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
++#elif defined(__linux__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+ #if CPU(X86)
+@@ -639,7 +639,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext)
+ #error Unknown Architecture
+ #endif
+
+-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
++#elif defined(__linux__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+ #if CPU(X86)
+@@ -756,7 +756,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext)
+ #error Unknown Architecture
+ #endif
+
+-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
++#elif defined(__linux__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+ #if CPU(X86)
+diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
+index 34f7cb14..32ad9150 100644
+--- a/Source/WTF/wtf/Platform.h
++++ b/Source/WTF/wtf/Platform.h
+@@ -714,7 +714,7 @@
+
+ #endif /* OS(DARWIN) */
+
+-#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
++#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__linux__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
+ #define HAVE_MACHINE_CONTEXT 1
+ #endif
+
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch
new file mode 100644
index 0000000000..aa9a06701a
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch
@@ -0,0 +1,46 @@
+From 0afc194c6446e6c3242f1d706b4564e3a9cb2cee Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 29 Aug 2016 16:38:11 +0300
+Subject: [PATCH] Fix racy parallel build of WebKit2-4.0.gir
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ Source/WebKit/PlatformGTK.cmake | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake
+index a074a80..8c6ebb5 100644
+--- a/Source/WebKit/PlatformGTK.cmake
++++ b/Source/WebKit/PlatformGTK.cmake
+@@ -728,8 +728,9 @@ if (ENABLE_INTROSPECTION)
+ string(REGEX MATCHALL "-L[^ ]*"
+ INTROSPECTION_ADDITIONAL_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
+- add_custom_command(
+- OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
++ # This is a target and not a command because it's used to build another .gir
++ # and a .typelib, which would trigger two racy parallel builds when using command
++ add_custom_target(WebKit2-${WEBKITGTK_API_VERSION}-gir
+ DEPENDS WebKit
+ DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
+@@ -773,7 +774,7 @@ if (ENABLE_INTROSPECTION)
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
+ DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
++ DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir
+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS}
+ LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
+ ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+@@ -828,7 +829,7 @@ if (ENABLE_INTROSPECTION)
+
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
+- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
++ DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir
+ COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
+ )
+
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch b/meta/recipes-sato/webkit/webkitgtk/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
new file mode 100644
index 0000000000..e8d1d8c341
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
@@ -0,0 +1,35 @@
+From bed4cf4aaa6aad4172ec9942e9039fb8e1ef68a4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 29 Feb 2016 18:13:39 +0200
+Subject: [PATCH] OptionsGTK.cmake: drop the hardcoded introspection/gtkdoc
+ disabling when cross-compiling
+
+This was not possible to override from the command line and in OpenEmbedded
+(one of the most prominent cross-compilation frameworks) introspection does work fine,
+through the use of qemu target emulation.
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+Upstream-Status: Pending
+
+---
+ Source/cmake/OptionsGTK.cmake | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
+index 661b40e..404441b 100644
+--- a/Source/cmake/OptionsGTK.cmake
++++ b/Source/cmake/OptionsGTK.cmake
+@@ -352,12 +352,6 @@ if (ENABLED_COMPILER_SANITIZERS)
+ set(ENABLE_INTROSPECTION OFF)
+ endif ()
+
+-# Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building.
+-if (CMAKE_CROSSCOMPILING)
+- set(ENABLE_GTKDOC OFF)
+- set(ENABLE_INTROSPECTION OFF)
+-endif ()
+-
+ # Override the cached variable, gtk-doc does not really work when building on Mac.
+ if (APPLE)
+ set(ENABLE_GTKDOC OFF)
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch
new file mode 100644
index 0000000000..e7c668c040
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch
@@ -0,0 +1,47 @@
+From 4b5e02212a31b82fc9b3becad90542274816fc29 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 11 Aug 2016 17:13:51 +0300
+Subject: [PATCH] Tweak gtkdoc settings so that gtkdoc generation works under
+ OpenEmbedded build system
+
+This requires setting a few environment variables so that the transient
+binary is build and linked correctly, and disabling the tweaks to RUN
+variable from gtkdoc.py script so that our qemu wrapper is taken into use.
+
+Upstream-Status: Inappropriate [oe-specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ Source/cmake/GtkDoc.cmake | 2 +-
+ Tools/gtkdoc/gtkdoc.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Source/cmake/GtkDoc.cmake b/Source/cmake/GtkDoc.cmake
+index b0fb31ca..6cb6313d 100644
+--- a/Source/cmake/GtkDoc.cmake
++++ b/Source/cmake/GtkDoc.cmake
+@@ -4,7 +4,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
+ add_custom_command(
+ OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
+ DEPENDS ${DocumentationDependencies}
+- COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args}
++ COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LD=${CMAKE_C_COMPILER}" "LDFLAGS=${CMAKE_C_LINK_FLAGS}" "RUN=${CMAKE_BINARY_DIR}/gtkdoc-qemuwrapper" ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args}
+ COMMAND touch ${_stamp_name}
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+ VERBATIM
+diff --git a/Tools/gtkdoc/gtkdoc.py b/Tools/gtkdoc/gtkdoc.py
+index 054cafa1..416de7d1 100644
+--- a/Tools/gtkdoc/gtkdoc.py
++++ b/Tools/gtkdoc/gtkdoc.py
+@@ -320,9 +320,9 @@ class GTKDoc(object):
+ additional_ldflags = '%s %s' % (additional_ldflags, arg)
+ ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags
+ current_ld_library_path = env.get('LD_LIBRARY_PATH')
+- if current_ld_library_path:
++ if current_ld_library_path and 'RUN' not in env:
+ env['LD_LIBRARY_PATH'] = '%s:%s' % (self.library_path, current_ld_library_path)
+- else:
++ elif 'RUN' not in env:
+ env['LD_LIBRARY_PATH'] = self.library_path
+
+ if ldflags:
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch b/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
new file mode 100644
index 0000000000..3e03aa968c
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
@@ -0,0 +1,52 @@
+From 8f1e170a6de8036ab50eb35834a77f2c79412ee3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 28 Oct 2015 14:18:57 +0200
+Subject: [PATCH] When building introspection files, add CMAKE_C_FLAGS to the
+ compiler flags.
+
+g-ir-compiler is using a C compiler internally, so it needs to set
+the proper flags for it.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ Source/JavaScriptCore/PlatformGTK.cmake | 2 +-
+ Source/WebKit/PlatformGTK.cmake | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Source/JavaScriptCore/PlatformGTK.cmake b/Source/JavaScriptCore/PlatformGTK.cmake
+index 0b2968d2..2742ad80 100644
+--- a/Source/JavaScriptCore/PlatformGTK.cmake
++++ b/Source/JavaScriptCore/PlatformGTK.cmake
+@@ -71,7 +71,7 @@ if (ENABLE_INTROSPECTION)
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+ DEPENDS JavaScriptCore
+- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
++ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
+ ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+ ${INTROSPECTION_SCANNER}
+ --quiet
+diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake
+index e36e4c35..943f9794 100644
+--- a/Source/WebKit/PlatformGTK.cmake
++++ b/Source/WebKit/PlatformGTK.cmake
+@@ -742,7 +742,7 @@ if (ENABLE_INTROSPECTION)
+ OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
+ DEPENDS WebKit
+ DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
++ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
+ ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+ ${INTROSPECTION_SCANNER}
+ --quiet
+@@ -786,7 +786,7 @@ if (ENABLE_INTROSPECTION)
+ OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
+ DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+ DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
+- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
++ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS}
+ LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
+ ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+ ${INTROSPECTION_SCANNER}
diff --git a/meta/recipes-sato/webkit/webkitgtk/cross-compile.patch b/meta/recipes-sato/webkit/webkitgtk/cross-compile.patch
new file mode 100644
index 0000000000..4d1de72851
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/cross-compile.patch
@@ -0,0 +1,23 @@
+Disable the tests meant to run when compiling natively
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: webkitgtk-2.14.5/Source/cmake/OptionsCommon.cmake
+===================================================================
+--- webkitgtk-2.14.5.orig/Source/cmake/OptionsCommon.cmake
++++ webkitgtk-2.14.5/Source/cmake/OptionsCommon.cmake
+@@ -67,8 +67,11 @@ endif ()
+ # Detect Cortex-A53 core if CPU is ARM64 and OS is Linux.
+ # Query /proc/cpuinfo for each available core and check reported CPU part number: 0xd03 signals Cortex-A53.
+ # (see Main ID Register in ARM Cortex-A53 MPCore Processor Technical Reference Manual)
+-set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF)
+-if (WTF_CPU_ARM64 AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
++if( NOT WTF_CPU_ARM64_CORTEXA53_INITIALVALUE)
++ set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF)
++endif(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE)
++
++if (WTF_CPU_ARM64 AND NOT CMAKE_CROSSCOMPILING AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
+ execute_process(COMMAND nproc OUTPUT_VARIABLE PROC_COUNT)
+ math(EXPR PROC_MAX ${PROC_COUNT}-1)
+ foreach (PROC_ID RANGE ${PROC_MAX})
diff --git a/meta/recipes-sato/webkit/webkitgtk/include_array.patch b/meta/recipes-sato/webkit/webkitgtk/include_array.patch
new file mode 100644
index 0000000000..7268b04bf4
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/include_array.patch
@@ -0,0 +1,15 @@
+Added missing include for std::array
+
+Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=197085]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- webkitgtk-2.24.0/Source/JavaScriptCore/assembler/PerfLog.cpp.org 2019-04-18 18:03:50.226231691 -0700
++++ webkitgtk-2.24.0/Source/JavaScriptCore/assembler/PerfLog.cpp 2019-04-18 18:07:28.569153989 -0700
+@@ -31,6 +31,7 @@
+ #include <elf.h>
+ #include <fcntl.h>
+ #include <mutex>
++#include <array>
+ #include <sys/mman.h>
+ #include <sys/stat.h>
+ #include <sys/syscall.h>
diff --git a/meta/recipes-sato/webkit/webkitgtk/x32_support.patch b/meta/recipes-sato/webkit/webkitgtk/x32_support.patch
new file mode 100644
index 0000000000..85d281e7f4
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/x32_support.patch
@@ -0,0 +1,30 @@
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-Status: Pending
+
+From 897563a0397266d8ceb058f172e16b06419b2593 Mon Sep 17 00:00:00 2001
+From: Daniel Schepler <dschepler@gmail.com>
+Date: Mon, 26 Mar 2018 17:48:34 +0300
+Subject: [PATCH] Fix FTBFS in x32
+
+===================================================================
+
+---
+ Source/WTF/wtf/Platform.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
+index 850e298..551c047 100644
+--- a/Source/WTF/wtf/Platform.h
++++ b/Source/WTF/wtf/Platform.h
+@@ -132,7 +132,11 @@
+ /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
+ #if defined(__x86_64__) \
+ || defined(_M_X64)
++#ifdef __ILP32__
++#define WTF_CPU_X86_64_32 1
++#else
+ #define WTF_CPU_X86_64 1
++#endif
+ #define WTF_CPU_X86_SSE2 1
+ #define WTF_CPU_KNOWN 1
+ #endif
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.12.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.12.5.bb
deleted file mode 100644
index 941d0e2060..0000000000
--- a/meta/recipes-sato/webkit/webkitgtk_2.12.5.bb
+++ /dev/null
@@ -1,108 +0,0 @@
-SUMMARY = "WebKit web rendering engine for the GTK+ platform"
-HOMEPAGE = "http://www.webkitgtk.org/"
-BUGTRACKER = "http://bugs.webkit.org/"
-
-LICENSE = "BSD & LGPLv2+"
-LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \
- file://Source/WebKit/LICENSE;md5=4646f90082c40bcf298c285f8bab0b12 \
- file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \
- file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \
- file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \
- "
-
-SRC_URI = "\
- http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
- file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \
- file://0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch \
- file://0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch \
- file://0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch \
- file://musl-fixes.patch \
- file://ppc-musl-fix.patch \
- file://0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch \
- file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \
- "
-SRC_URI[md5sum] = "7a9ea00ec195488db90fdeb2d174ddaf"
-SRC_URI[sha256sum] = "6b147854b864a5f115fadb97b2b6200b2f696db015216a34e7298d11c88b1c40"
-
-inherit cmake lib_package pkgconfig gobject-introspection perlnative distro_features_check upstream-version-is-even gtk-doc
-
-# We cannot inherit pythonnative because that would conflict with inheriting python3native
-# (which is done by gobject-introspection). But webkit only needs the path to native Python 2.x binary
-# so we simply set it explicitly here.
-EXTRANATIVEPATH += "python-native"
-
-# depends on libxt
-REQUIRED_DISTRO_FEATURES = "x11"
-
-DEPENDS = "zlib libsoup-2.4 curl libxml2 cairo libxslt libxt libidn gnutls \
- gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native gperf-native sqlite3 \
- pango icu bison-native gawk intltool-native libwebp \
- atk udev harfbuzz jpeg libpng pulseaudio librsvg libtheora libvorbis libxcomposite libxtst \
- ruby-native libnotify gstreamer1.0-plugins-bad \
- "
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'webgl', '' ,d)} \
- enchant \
- libsecret \
- "
-
-PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland"
-PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11"
-PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue"
-PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant"
-PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+"
-PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2"
-PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl"
-PACKAGECONFIG[libsecret] = "-DENABLE_CREDENTIAL_STORAGE=ON,-DENABLE_CREDENTIAL_STORAGE=OFF,libsecret"
-PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen"
-
-EXTRA_OECMAKE = " \
- -DPORT=GTK \
- -DCMAKE_BUILD_TYPE=Release \
- ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \
- ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '-DENABLE_GTKDOC=ON', '-DENABLE_GTKDOC=OFF', d)} \
- -DENABLE_MINIBROWSER=ON \
- "
-
-# Javascript JIT is not supported on powerpc
-EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF "
-
-# ARM JIT code does not build on ARMv4/5/6 anymore
-EXTRA_OECMAKE_append_armv5 = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_armv6 = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_armv4 = " -DENABLE_JIT=OFF "
-
-# binutils 2.25.1 has a bug on aarch64:
-# https://sourceware.org/bugzilla/show_bug.cgi?id=18430
-EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF "
-EXTRA_OECMAKE_append_mips = " -DUSE_LD_GOLD=OFF "
-EXTRA_OECMAKE_append_mips64 = " -DUSE_LD_GOLD=OFF "
-EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF "
-
-# JIT not supported on MIPS either
-EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_mips64 = " -DENABLE_JIT=OFF "
-
-SECURITY_CFLAGS_remove_aarch64 = "-fpie"
-SECURITY_CFLAGS_append_aarch64 = " -fPIE"
-
-FILES_${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so"
-
-# http://errors.yoctoproject.org/Errors/Details/20370/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-ARM_INSTRUCTION_SET_armv6 = "arm"
-
-# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474
-# https://bugs.webkit.org/show_bug.cgi?id=159880
-# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime.
-# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb).
-ARM_INSTRUCTION_SET_armv7a = "thumb"
-ARM_INSTRUCTION_SET_armv7r = "thumb"
-ARM_INSTRUCTION_SET_armv7ve = "thumb"
-
-# WebKit2-4.0: ../../libgpg-error-1.21/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
-# qemu: uncaught target signal 6 (Aborted) - core dumped
-EXTRA_OECMAKE_append_mips64 = " -DENABLE_INTROSPECTION=OFF -DENABLE_GTKDOC=OFF"
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb
new file mode 100644
index 0000000000..fa424f606f
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb
@@ -0,0 +1,125 @@
+SUMMARY = "WebKit web rendering engine for the GTK+ platform"
+HOMEPAGE = "https://www.webkitgtk.org/"
+BUGTRACKER = "https://bugs.webkit.org/"
+
+LICENSE = "BSD & LGPLv2+"
+LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \
+ file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \
+ file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \
+ file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \
+ "
+
+SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
+ file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \
+ file://0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch \
+ file://0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch \
+ file://0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch \
+ file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \
+ file://x32_support.patch \
+ file://cross-compile.patch \
+ file://0001-Fix-build-with-musl.patch \
+ file://include_array.patch \
+ "
+
+SRC_URI[md5sum] = "65e06fe73ee166447894aaea95038e3b"
+SRC_URI[sha256sum] = "6b80f0637a80818559ac8fd50db3b394f41cb61904fb9b3ed65fa51635806512"
+
+inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc
+
+REQUIRED_DISTRO_FEATURES = "x11 opengl"
+
+CVE_PRODUCT = "webkitgtk webkitgtk\+"
+
+DEPENDS = "zlib libsoup-2.4 curl libxml2 cairo libxslt libxt libidn libgcrypt \
+ gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native gperf-native sqlite3 \
+ pango icu bison-native gawk intltool-native libwebp \
+ atk udev harfbuzz jpeg libpng pulseaudio librsvg libtheora libvorbis libxcomposite libxtst \
+ ruby-native libnotify gstreamer1.0-plugins-bad \
+ gettext-native glib-2.0 glib-2.0-native libtasn1 \
+ "
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'webgl opengl', '' ,d)} \
+ enchant \
+ libsecret \
+ "
+
+PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland"
+PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11"
+PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue"
+PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant"
+PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+"
+PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2"
+PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl"
+PACKAGECONFIG[opengl] = "-DENABLE_OPENGL=ON,-DENABLE_OPENGL=OFF,virtual/libgl"
+PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret"
+PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen"
+# Source is at https://github.com/google/woff2
+PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2"
+PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg"
+
+EXTRA_OECMAKE = " \
+ -DPORT=GTK \
+ -DCMAKE_BUILD_TYPE=Release \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \
+ ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '-DENABLE_GTKDOC=ON', '-DENABLE_GTKDOC=OFF', d)} \
+ -DENABLE_MINIBROWSER=ON \
+ -DPYTHON_EXECUTABLE=`which python3` \
+ -DENABLE_BUBBLEWRAP_SANDBOX=OFF \
+ "
+
+# Javascript JIT is not supported on ARC
+EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
+# By default 25-bit "medium" calls are used on ARC
+# which is not enough for binaries larger than 32 MiB
+CFLAGS_append_arc = " -mlong-calls"
+CXXFLAGS_append_arc = " -mlong-calls"
+
+# Javascript JIT is not supported on powerpc
+EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF "
+
+# ARM JIT code does not build on ARMv4/5/6 anymore
+EXTRA_OECMAKE_append_armv5 = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_armv6 = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_armv4 = " -DENABLE_JIT=OFF "
+
+EXTRA_OECMAKE_append_mipsarchn32 = " -DUSE_LD_GOLD=OFF "
+EXTRA_OECMAKE_append_powerpc = " -DUSE_LD_GOLD=OFF "
+
+# JIT not supported on MIPS either
+EXTRA_OECMAKE_append_mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON "
+
+# JIT not supported on X32
+# An attempt was made to upstream JIT support for x32 in
+# https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as
+# unresolved due to limited X32 adoption.
+EXTRA_OECMAKE_append_x86-x32 = " -DENABLE_JIT=OFF "
+
+SECURITY_CFLAGS_remove_aarch64 = "-fpie"
+SECURITY_CFLAGS_append_aarch64 = " -fPIE"
+
+FILES_${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so"
+
+RRECOMMENDS_${PN} += "ca-certificates shared-mime-info"
+
+# http://errors.yoctoproject.org/Errors/Details/20370/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
+# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474
+# https://bugs.webkit.org/show_bug.cgi?id=159880
+# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime.
+# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb).
+ARM_INSTRUCTION_SET_armv7a = "thumb"
+ARM_INSTRUCTION_SET_armv7r = "thumb"
+ARM_INSTRUCTION_SET_armv7ve = "thumb"
+
+# qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+# Segmentation fault
+GI_DATA_ENABLED_armv7a = "False"
+GI_DATA_ENABLED_armv7ve = "False"
+
+# Can't be built with ccache
+CCACHE_DISABLE = "1"
diff --git a/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch b/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch
new file mode 100644
index 0000000000..57e7453312
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch
@@ -0,0 +1,135 @@
+From 6b638fa9afbeb54dfa19378e391465a5284ce1ad Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 12 Sep 2018 17:16:36 +0800
+Subject: [PATCH] Fix error handling in gdbm
+
+Only check for gdbm_errno if the return value of the called gdbm_*
+function says so. This fixes apr-util with gdbm 1.14, which does not
+seem to always reset gdbm_errno.
+
+Also make the gdbm driver return error codes starting with
+APR_OS_START_USEERR instead of always returning APR_EGENERAL. This is
+what the berkleydb driver already does.
+
+Also ensure that dsize is 0 if dptr == NULL.
+
+Upstream-Status: Backport[https://svn.apache.org/viewvc?
+view=revision&amp;revision=1825311]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ dbm/apr_dbm_gdbm.c | 47 +++++++++++++++++++++++++++++------------------
+ 1 file changed, 29 insertions(+), 18 deletions(-)
+
+diff --git a/dbm/apr_dbm_gdbm.c b/dbm/apr_dbm_gdbm.c
+index 749447a..1c86327 100644
+--- a/dbm/apr_dbm_gdbm.c
++++ b/dbm/apr_dbm_gdbm.c
+@@ -36,13 +36,25 @@
+ static apr_status_t g2s(int gerr)
+ {
+ if (gerr == -1) {
+- /* ### need to fix this */
+- return APR_EGENERAL;
++ if (gdbm_errno == GDBM_NO_ERROR)
++ return APR_SUCCESS;
++ return APR_OS_START_USEERR + gdbm_errno;
+ }
+
+ return APR_SUCCESS;
+ }
+
++static apr_status_t gdat2s(datum d)
++{
++ if (d.dptr == NULL) {
++ if (gdbm_errno == GDBM_NO_ERROR || gdbm_errno == GDBM_ITEM_NOT_FOUND)
++ return APR_SUCCESS;
++ return APR_OS_START_USEERR + gdbm_errno;
++ }
++
++ return APR_SUCCESS;
++}
++
+ static apr_status_t datum_cleanup(void *dptr)
+ {
+ if (dptr)
+@@ -53,22 +65,15 @@ static apr_status_t datum_cleanup(void *dptr)
+
+ static apr_status_t set_error(apr_dbm_t *dbm, apr_status_t dbm_said)
+ {
+- apr_status_t rv = APR_SUCCESS;
+
+- /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */
++ dbm->errcode = dbm_said;
+
+- if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) {
++ if (dbm_said == APR_SUCCESS)
+ dbm->errmsg = NULL;
+- }
+- else {
+- dbm->errmsg = gdbm_strerror(gdbm_errno);
+- rv = APR_EGENERAL; /* ### need something better */
+- }
+-
+- /* captured it. clear it now. */
+- gdbm_errno = GDBM_NO_ERROR;
++ else
++ dbm->errmsg = gdbm_strerror(dbm_said - APR_OS_START_USEERR);
+
+- return rv;
++ return dbm_said;
+ }
+
+ /* --------------------------------------------------------------------------
+@@ -107,7 +112,7 @@ static apr_status_t vt_gdbm_open(apr_dbm_t **pdb, const char *pathname,
+ NULL);
+
+ if (file == NULL)
+- return APR_EGENERAL; /* ### need a better error */
++ return APR_OS_START_USEERR + gdbm_errno; /* ### need a better error */
+
+ /* we have an open database... return it */
+ *pdb = apr_pcalloc(pool, sizeof(**pdb));
+@@ -141,10 +146,12 @@ static apr_status_t vt_gdbm_fetch(apr_dbm_t *dbm, apr_datum_t key,
+ if (pvalue->dptr)
+ apr_pool_cleanup_register(dbm->pool, pvalue->dptr, datum_cleanup,
+ apr_pool_cleanup_null);
++ else
++ pvalue->dsize = 0;
+
+ /* store the error info into DBM, and return a status code. Also, note
+ that *pvalue should have been cleared on error. */
+- return set_error(dbm, APR_SUCCESS);
++ return set_error(dbm, gdat2s(rd));
+ }
+
+ static apr_status_t vt_gdbm_store(apr_dbm_t *dbm, apr_datum_t key,
+@@ -201,9 +208,11 @@ static apr_status_t vt_gdbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey)
+ if (pkey->dptr)
+ apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup,
+ apr_pool_cleanup_null);
++ else
++ pkey->dsize = 0;
+
+ /* store any error info into DBM, and return a status code. */
+- return set_error(dbm, APR_SUCCESS);
++ return set_error(dbm, gdat2s(rd));
+ }
+
+ static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
+@@ -221,9 +230,11 @@ static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
+ if (pkey->dptr)
+ apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup,
+ apr_pool_cleanup_null);
++ else
++ pkey->dsize = 0;
+
+ /* store any error info into DBM, and return a status code. */
+- return set_error(dbm, APR_SUCCESS);
++ return set_error(dbm, gdat2s(rd));
+ }
+
+ static void vt_gdbm_freedatum(apr_dbm_t *dbm, apr_datum_t data)
+--
+2.7.4
+
diff --git a/meta/recipes-support/apr/apr-util_1.5.4.bb b/meta/recipes-support/apr/apr-util_1.5.4.bb
deleted file mode 100644
index 2b8676fef3..0000000000
--- a/meta/recipes-support/apr/apr-util_1.5.4.bb
+++ /dev/null
@@ -1,95 +0,0 @@
-SUMMARY = "Apache Portable Runtime (APR) companion library"
-HOMEPAGE = "http://apr.apache.org/"
-SECTION = "libs"
-DEPENDS = "apr expat gdbm"
-
-BBCLASSEXTEND = "native nativesdk"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=519e0a18e03f7c023070568c14b077bb \
- file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42"
-
-SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
- file://configfix.patch \
- file://configure_fixes.patch \
- file://run-ptest \
-"
-
-SRC_URI[md5sum] = "866825c04da827c6e5f53daff5569f42"
-SRC_URI[sha256sum] = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19"
-
-EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
- --without-odbc \
- --without-pgsql \
- --with-dbm=gdbm \
- --with-gdbm=${STAGING_DIR_HOST}${prefix} \
- --without-sqlite2 \
- --with-expat=${STAGING_DIR_HOST}${prefix}"
-
-
-inherit autotools lib_package binconfig
-
-PR = "r1"
-
-OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
-
-do_configure_append() {
- if [ "${CLASSOVERRIDE}" = "class-target" ]; then
- cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
- fi
-}
-do_configure_prepend_class-native() {
- mkdir ${B}/build
- cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
-}
-do_configure_append_class-native() {
- sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
- # sometimes there isn't SHELL
- sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
-}
-
-do_configure_prepend_class-nativesdk() {
- cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
-}
-
-do_configure_append_class-nativesdk() {
- sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
- sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
- sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
- sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
-}
-
-do_install_append_class-target() {
- sed -i -e 's,${STAGING_DIR_HOST},,g' \
- -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
- -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
-}
-
-PACKAGECONFIG ??= "crypto"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
-PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
-
-#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
-FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
-FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
-FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
-
-INSANE_SKIP_${PN} += "dev-so"
-
-inherit ptest
-
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
-
-do_compile_ptest() {
- cd ${B}/test
- oe_runmake
-}
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}/test
- mkdir $t
- for i in testall data; do \
- cp -r ${B}/test/$i $t; \
- done
-}
diff --git a/meta/recipes-support/apr/apr-util_1.6.1.bb b/meta/recipes-support/apr/apr-util_1.6.1.bb
new file mode 100644
index 0000000000..1f9fea25d8
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util_1.6.1.bb
@@ -0,0 +1,95 @@
+SUMMARY = "Apache Portable Runtime (APR) companion library"
+HOMEPAGE = "http://apr.apache.org/"
+SECTION = "libs"
+DEPENDS = "apr expat gdbm"
+
+BBCLASSEXTEND = "native nativesdk"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
+ file://include/apu_version.h;endline=15;md5=823b3d1a7225df8f7b68a69c3c2b4c71"
+
+SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
+ file://configfix.patch \
+ file://configure_fixes.patch \
+ file://run-ptest \
+ file://0001-Fix-error-handling-in-gdbm.patch \
+"
+
+SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f"
+SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459"
+
+EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
+ --without-odbc \
+ --without-pgsql \
+ --with-dbm=gdbm \
+ --with-gdbm=${STAGING_DIR_HOST}${prefix} \
+ --without-sqlite2 \
+ --with-expat=${STAGING_DIR_HOST}${prefix}"
+
+
+inherit autotools lib_package binconfig
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+do_configure_append() {
+ if [ "${CLASSOVERRIDE}" = "class-target" ]; then
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
+ fi
+}
+do_configure_prepend_class-native() {
+ mkdir ${B}/build
+ cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
+}
+do_configure_append_class-native() {
+ sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
+ # sometimes there isn't SHELL
+ sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
+}
+
+do_configure_prepend_class-nativesdk() {
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
+}
+
+do_configure_append_class-nativesdk() {
+ sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
+}
+
+do_install_append_class-target() {
+ sed -i -e 's,${STAGING_DIR_HOST},,g' \
+ -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
+ -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
+}
+
+PACKAGECONFIG ??= "crypto"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
+
+#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
+FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
+FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
+FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
+
+INSANE_SKIP_${PN} += "dev-so"
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
+RDEPENDS_${PN}-ptest += "libgcc"
+
+do_compile_ptest() {
+ cd ${B}/test
+ oe_runmake
+}
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}/test
+ mkdir $t
+ for i in testall data; do \
+ cp -r ${B}/test/$i $t; \
+ done
+}
diff --git a/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch b/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
new file mode 100644
index 0000000000..72e706f966
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
@@ -0,0 +1,74 @@
+From 5925b20da8bbc34d9bf5a5dca123ef38864d43c6 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 09:39:06 +0800
+Subject: [PATCH 2/7] apr: Remove workdir path references from installed apr
+ files
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+The generated `apr-1-config' is used by other recipes at build time or
+packages at target run time, the workdir path caused confusion.
+
+Rebase to 1.6.3
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ apr-config.in | 26 ++------------------------
+ 1 file changed, 2 insertions(+), 24 deletions(-)
+
+diff --git a/apr-config.in b/apr-config.in
+index 84b4073..bbbf651 100644
+--- a/apr-config.in
++++ b/apr-config.in
+@@ -152,14 +152,7 @@ while test $# -gt 0; do
+ flags="$flags $LDFLAGS"
+ ;;
+ --includes)
+- if test "$location" = "installed"; then
+ flags="$flags -I$includedir $EXTRA_INCLUDES"
+- elif test "$location" = "source"; then
+- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+- else
+- # this is for VPATH builds
+- flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+- fi
+ ;;
+ --srcdir)
+ echo $APR_SOURCE_DIR
+@@ -181,29 +174,14 @@ while test $# -gt 0; do
+ exit 0
+ ;;
+ --link-ld)
+- if test "$location" = "installed"; then
+- ### avoid using -L if libdir is a "standard" location like /usr/lib
+- flags="$flags -L$libdir -l${APR_LIBNAME}"
+- else
+- ### this surely can't work since the library is in .libs?
+- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
+- fi
++ flags="$flags -l${APR_LIBNAME}"
+ ;;
+ --link-libtool)
+ # If the LA_FILE exists where we think it should be, use it. If we're
+ # installed and the LA_FILE does not exist, assume to use -L/-l
+ # (the LA_FILE may not have been installed). If we're building ourselves,
+ # we'll assume that at some point the .la file be created.
+- if test -f "$LA_FILE"; then
+- flags="$flags $LA_FILE"
+- elif test "$location" = "installed"; then
+- ### avoid using -L if libdir is a "standard" location like /usr/lib
+- # Since the user is specifying they are linking with libtool, we
+- # *know* that -R will be recognized by libtool.
+- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
+- else
+- flags="$flags $LA_FILE"
+- fi
++ flags="$flags -l${APR_LIBNAME}"
+ ;;
+ --shlib-path-var)
+ echo "$SHLIBPATH_VAR"
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch b/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
new file mode 100644
index 0000000000..4dd53bd8eb
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
@@ -0,0 +1,63 @@
+From d5028c10f156c224475b340cfb1ba025d6797243 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 2 Feb 2018 15:51:42 +0800
+Subject: [PATCH 3/7] Makefile.in/configure.in: support cross compiling
+
+While cross compiling, the tools/gen_test_char could not
+be executed at build time, use AX_PROG_CC_FOR_BUILD to
+build native tools/gen_test_char
+
+Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in | 10 +++-------
+ configure.in | 3 +++
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 5fb760e..8675f90 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -46,7 +46,7 @@ LT_VERSION = @LT_VERSION@
+
+ CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
+ build/apr_rules.out tools/gen_test_char@EXEEXT@ \
+- tools/gen_test_char.o tools/gen_test_char.lo \
++ tools/gen_test_char.o \
+ include/private/apr_escape_test_char.h
+ DISTCLEAN_TARGETS = config.cache config.log config.status \
+ include/apr.h include/arch/unix/apr_private.h \
+@@ -131,13 +131,9 @@ check: $(TARGET_LIB)
+ etags:
+ etags `find . -name '*.[ch]'`
+
+-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
+-tools/gen_test_char.lo: tools/gen_test_char.c
++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
+ $(APR_MKDIR) tools
+- $(LT_COMPILE)
+-
+-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
+- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
+
+ include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
+ $(APR_MKDIR) include/private
+diff --git a/configure.in b/configure.in
+index 719f331..361120f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -183,6 +183,9 @@ dnl can only be used once within a configure script, so this prevents a
+ dnl preload section from invoking the macro to get compiler info.
+ AC_PROG_CC
+
++dnl Check build CC for gen_test_char compiling which is executed at build time.
++AX_PROG_CC_FOR_BUILD
++
+ dnl AC_PROG_SED is only avaliable in recent autoconf versions.
+ dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
+ ifdef([AC_PROG_SED],
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch b/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
new file mode 100644
index 0000000000..30fc07d4a0
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
@@ -0,0 +1,39 @@
+From 7925eb1766a00ccee05c6e80b1d34f163a04b7b1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 09:43:34 +0800
+Subject: [PATCH 4/7] Fix packet discards HTTP redirect.
+
+Disconnect the connection by poll() timeout.
+If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
+apr_socket_recv() returns EAGAIN.
+
+Upstream-Status: Pending
+
+Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
+Signed-off-by: Li Wang <li.wang@windriver.com>
+
+Rebase to 1.6.3
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ network_io/unix/sendrecv.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
+index 4c0e0a6..1bdafba 100644
+--- a/network_io/unix/sendrecv.c
++++ b/network_io/unix/sendrecv.c
+@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
+ && (sock->timeout > 0)) {
+ do_select:
+ arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
++ if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
++ *len = 0;
++ return EAGAIN;
++ }
+ if (arv != APR_SUCCESS) {
+ *len = 0;
+ return arv;
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
new file mode 100644
index 0000000000..02634e6fde
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
@@ -0,0 +1,36 @@
+From 2e66cece0c3adff92733332111204ddc1d730a07 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 19 Nov 2015 18:25:38 -0800
+Subject: [PATCH 5/7] configure.in: fix LTFLAGS to make it work with ccache
+
+When ccache is enabled, libtool requires --tag=CC when use ccache,
+otherwise when building apr-util with ccache enabled:
+
+| libtool: compile: unable to infer tagged configuration
+| libtool: error: specify a tag with '--tag'
+| libtool: compile: unable to infer tagged configuration
+| make[1]: *** [buckets/apr_buckets.lo] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 361120f..3b10422 100644
+--- a/configure.in
++++ b/configure.in
+@@ -249,7 +249,7 @@ case $host in
+ ;;
+ *)
+ if test "x$LTFLAGS" = "x"; then
+- LTFLAGS='--silent'
++ LTFLAGS='--silent --tag=CC'
+ fi
+ if test "$experimental_libtool" = "yes"; then
+ # Use a custom-made libtool replacement
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
new file mode 100644
index 0000000000..d1a2ebe881
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
@@ -0,0 +1,76 @@
+From 49661ea3858cf8494926cccf57d3e8c6dcb47117 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 14 Dec 2016 18:13:08 +0800
+Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross
+ compiling
+
+In configure.in, it contains the following:
+
+ APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
+
+the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
+it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
+compiling enable.
+
+So it was hardcoded for cross compiling, we should detect it dynamic based on
+the sysroot's glibc. We change it to the following:
+
+ AC_CHECK_SIZEOF(off_t)
+
+The same for the following hardcoded types for cross compiling:
+
+ pid_t 8
+ ssize_t 8
+ size_t 8
+ off_t 8
+
+Change the above correspondingly.
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+
+Upstream-Status: Pending
+
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 27b8539..fb408d1 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1801,7 +1801,7 @@ else
+ socklen_t_value="int"
+ fi
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
++AC_CHECK_SIZEOF(pid_t)
+
+ if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
+ pid_t_fmt='#define APR_PID_T_FMT "hd"'
+@@ -1873,7 +1873,7 @@ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned long, lu, [size_t_fmt="lu"], [
+ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"])
+ ])
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
++AC_CHECK_SIZEOF(ssize_t)
+
+ dnl the else cases below should no longer occur;
+ AC_MSG_CHECKING([which format to use for apr_ssize_t])
+@@ -1891,7 +1891,7 @@ fi
+
+ ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
++AC_CHECK_SIZEOF(size_t)
+
+ # else cases below should no longer occur;
+ AC_MSG_CHECKING([which format to use for apr_size_t])
+@@ -1909,7 +1909,7 @@ fi
+
+ size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
++AC_CHECK_SIZEOF(off_t)
+
+ if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
+ # Enable LFS
diff --git a/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch b/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
new file mode 100644
index 0000000000..8760b0140c
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
@@ -0,0 +1,50 @@
+From c6afc4a4a766478cb6aa6b43a50051881b6318d7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Fri, 3 Mar 2017 22:24:17 +0100
+Subject: [PATCH 7/7] explicitly link libapr against phtread to make gold happy
+ on test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_init'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_settype'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_destroy'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutex_trylock'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_attr_setstacksize'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_create'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_join'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_detach'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_sigmask'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_once'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_create'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_getspecific'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_delete'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_setspecific'
+| collect2: error: ld returned 1 exit status
+| Makefile:114: recipe for target 'globalmutexchild' failed
+| make[1]: *** [globalmutexchild] Error 1
+| make[1]: Leaving directory '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/apr/1.5.2-r0/apr-1.5.2/test'
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.in b/configure.in
+index a227e72..cbc0f90 100644
+--- a/configure.in
++++ b/configure.in
+@@ -784,6 +784,7 @@ else
+ APR_PTHREADS_CHECK_RESTORE ] )
+ fi
+ if test "$pthreadh" = "1"; then
++ APR_ADDTO(LIBS,[-lpthread])
+ APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
+ APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
+ APR_CHECK_PTHREAD_RECURSIVE_MUTEX
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
deleted file mode 100644
index 6805b8b6e2..0000000000
--- a/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix packet discards HTTP redirect.
-
-Disconnect the connection by poll() timeout.
-If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
-apr_socket_recv() returns EAGAIN.
-
-Upstream-Status: Pending
-
-Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- network_io/unix/sendrecv.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
-index c133a26..e8faf15 100644
---- a/network_io/unix/sendrecv.c
-+++ b/network_io/unix/sendrecv.c
-@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
- && (sock->timeout > 0)) {
- do_select:
- arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
-+ if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
-+ *len = 0;
-+ return EAGAIN;
-+ }
- if (arv != APR_SUCCESS) {
- *len = 0;
- return arv;
---
-1.7.9.5
-
diff --git a/meta/recipes-support/apr/apr/cleanup.patch b/meta/recipes-support/apr/apr/cleanup.patch
deleted file mode 100644
index b6784e015d..0000000000
--- a/meta/recipes-support/apr/apr/cleanup.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.4.2/build/buildcheck.sh
-===================================================================
---- apr-1.4.2.orig/build/buildcheck.sh 2009-11-13 08:27:16.000000000 +0800
-+++ apr-1.4.2/build/buildcheck.sh 2010-11-26 15:44:00.000000000 +0800
-@@ -32,35 +32,4 @@
- echo "buildconf: autoconf version $ac_version (ok)"
- fi
-
--# Sample libtool --version outputs:
--# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
--# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
--# output is multiline from 1.5 onwards
--
--# Require libtool 1.4 or newer
--libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
--lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
--if test -z "$lt_pversion"; then
--echo "buildconf: libtool not found."
--echo " You need libtool version 1.4 or newer installed"
--echo " to build APR from SVN."
--exit 1
--fi
--lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
--IFS=.; set $lt_version; IFS=' '
--lt_status="good"
--if test "$1" = "1"; then
-- if test "$2" -lt "4"; then
-- lt_status="bad"
-- fi
--fi
--if test $lt_status = "good"; then
-- echo "buildconf: libtool version $lt_pversion (ok)"
-- exit 0
--fi
--
--echo "buildconf: libtool version $lt_pversion found."
--echo " You need libtool version 1.4 or newer installed"
--echo " to build APR from SVN."
--
--exit 1
-+exit 0
diff --git a/meta/recipes-support/apr/apr/configfix.patch b/meta/recipes-support/apr/apr/configfix.patch
deleted file mode 100644
index 605c4f632c..0000000000
--- a/meta/recipes-support/apr/apr/configfix.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.3.3/apr-config.in
-===================================================================
---- apr-1.3.3.orig/apr-config.in 2009-01-12 15:16:31.000000000 +0000
-+++ apr-1.3.3/apr-config.in 2009-01-12 15:19:25.000000000 +0000
-@@ -152,14 +152,7 @@
- flags="$flags $LDFLAGS"
- ;;
- --includes)
-- if test "$location" = "installed"; then
- flags="$flags -I$includedir $EXTRA_INCLUDES"
-- elif test "$location" = "source"; then
-- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
-- else
-- # this is for VPATH builds
-- flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
-- fi
- ;;
- --srcdir)
- echo $APR_SOURCE_DIR
-@@ -181,29 +167,14 @@
- exit 0
- ;;
- --link-ld)
-- if test "$location" = "installed"; then
-- ### avoid using -L if libdir is a "standard" location like /usr/lib
-- flags="$flags -L$libdir -l${APR_LIBNAME}"
-- else
-- ### this surely can't work since the library is in .libs?
-- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
-- fi
-+ flags="$flags -l${APR_LIBNAME}"
- ;;
- --link-libtool)
- # If the LA_FILE exists where we think it should be, use it. If we're
- # installed and the LA_FILE does not exist, assume to use -L/-l
- # (the LA_FILE may not have been installed). If we're building ourselves,
- # we'll assume that at some point the .la file be created.
-- if test -f "$LA_FILE"; then
-- flags="$flags $LA_FILE"
-- elif test "$location" = "installed"; then
-- ### avoid using -L if libdir is a "standard" location like /usr/lib
-- # Since the user is specifying they are linking with libtool, we
-- # *know* that -R will be recognized by libtool.
-- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
-- else
-- flags="$flags $LA_FILE"
-- fi
-+ flags="$flags -l${APR_LIBNAME}"
- ;;
- --shlib-path-var)
- echo "$SHLIBPATH_VAR"
diff --git a/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
deleted file mode 100644
index 7521eeb469..0000000000
--- a/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d439093aa07a486f559206ac9e5808a6a18218cd Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 19 Nov 2015 18:25:38 -0800
-Subject: [PATCH] configure.in: fix LTFLAGS to make it work with ccache
-
-When ccache is enabled, libtool requires --tag=CC when use ccache,
-otherwise when building apr-util with ccache enabled:
-
-| libtool: compile: unable to infer tagged configuration
-| libtool: error: specify a tag with '--tag'
-| libtool: compile: unable to infer tagged configuration
-| make[1]: *** [buckets/apr_buckets.lo] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- configure.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 5a4a988..9d57ae6 100644
---- a/configure.in
-+++ b/configure.in
-@@ -246,7 +246,7 @@ case $host in
- ;;
- *)
- if test "x$LTFLAGS" = "x"; then
-- LTFLAGS='--silent'
-+ LTFLAGS='--silent --tag=CC'
- fi
- if test "$experimental_libtool" = "yes"; then
- # Use a custom-made libtool replacement
---
-1.7.9.5
-
diff --git a/meta/recipes-support/apr/apr/configure_fixes.patch b/meta/recipes-support/apr/apr/configure_fixes.patch
deleted file mode 100644
index 0514000599..0000000000
--- a/meta/recipes-support/apr/apr/configure_fixes.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.3.3/configure.in
-===================================================================
---- apr-1.3.3.orig/configure.in
-+++ apr-1.3.3/configure.in
-@@ -794,39 +794,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm
- create_area])
-
- APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
--AC_CHECK_FILE(/dev/zero)
--
--# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
--if test "$ac_cv_func_mmap" = "yes" &&
-- test "$ac_cv_file__dev_zero" = "yes"; then
-- AC_MSG_CHECKING(for mmap that can map /dev/zero)
-- AC_TRY_RUN([
--#include <sys/types.h>
--#include <sys/stat.h>
--#include <fcntl.h>
--#ifdef HAVE_SYS_MMAN_H
--#include <sys/mman.h>
--#endif
-- int main()
-- {
-- int fd;
-- void *m;
-- fd = open("/dev/zero", O_RDWR);
-- if (fd < 0) {
-- return 1;
-- }
-- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-- if (m == (void *)-1) { /* aka MAP_FAILED */
-- return 2;
-- }
-- if (munmap(m, sizeof(void*)) < 0) {
-- return 3;
-- }
-- return 0;
-- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
--
-- AC_MSG_RESULT($ac_cv_file__dev_zero)
--fi
-
- # Now we determine which one is our anonymous shmem preference.
- haveshmgetanon="0"
-@@ -1518,13 +1485,14 @@ else
- bigendian=0
- fi
-
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
--#include <sys/uio.h>],struct iovec,0)
--if test "$ac_cv_sizeof_struct_iovec" = "0"; then
-- have_iovec=0
--else
-- have_iovec=1
--fi
-+#APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
-+##include <sys/uio.h>],struct iovec,0)
-+#if test "$ac_cv_sizeof_struct_iovec" = "0"; then
-+# have_iovec=0
-+#else
-+# have_iovec=1
-+#fi
-+have_iovec=1
-
- AC_SUBST(voidp_size)
- AC_SUBST(short_value)
diff --git a/meta/recipes-support/apr/apr/libtoolize_check.patch b/meta/recipes-support/apr/apr/libtoolize_check.patch
new file mode 100644
index 0000000000..740792e6b0
--- /dev/null
+++ b/meta/recipes-support/apr/apr/libtoolize_check.patch
@@ -0,0 +1,28 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: check for libtoolize rather than libtool
+Last-Update: 2014-09-19
+
+libtool is now in package libtool-bin, but apr only needs libtoolize.
+
+Upstream-Status: Pending [ from debian: https://sources.debian.org/data/main/a/apr/1.6.5-1/debian/patches/libtoolize_check.patch ]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+--- apr.orig/build/buildcheck.sh
++++ apr/build/buildcheck.sh
+@@ -39,11 +39,11 @@ fi
+ # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
+ # output is multiline from 1.5 onwards
+
+-# Require libtool 1.4 or newer
+-libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
+-lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
++# Require libtoolize 1.4 or newer
++libtoolize=`build/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14`
++lt_pversion=`$libtoolize --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
+ if test -z "$lt_pversion"; then
+- echo "buildconf: libtool not found."
++ echo "buildconf: libtoolize not found."
+ echo " You need libtool version 1.4 or newer installed"
+ echo " to build APR from SVN."
+ res=1
diff --git a/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch b/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
deleted file mode 100644
index 16499f5ac9..0000000000
--- a/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Makefile.in: fix cross compiling failed
-
-The tools/gen_test_char was invoked at build time,
-and it didn't work for the cross compiling, so we
-compile it with $BUILD_CC.
-
-Remove the 'tools' dir creation, it always existed.
-And it caused gen_test_char unexpected rebuilt at
-do_install time.
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- Makefile.in | 10 ++--------
- 1 file changed, 2 insertions(+), 8 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index a2a5194..5fe028f 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -46,7 +46,6 @@ LT_VERSION = @LT_VERSION@
-
- CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
- build/apr_rules.out tools/gen_test_char@EXEEXT@ \
-- tools/gen_test_char.o tools/gen_test_char.lo \
- include/private/apr_escape_test_char.h
- DISTCLEAN_TARGETS = config.cache config.log config.status \
- include/apr.h include/arch/unix/apr_private.h \
-@@ -129,13 +128,8 @@ check: $(TARGET_LIB)
- etags:
- etags `find . -name '*.[ch]'`
-
--OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
--tools/gen_test_char.lo: tools/gen_test_char.c
-- $(APR_MKDIR) tools
-- $(LT_COMPILE)
--
--tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
-- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
-+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
-+ $(BUILD_CC) $(CFLAGS_FOR_BUILD) $< -o $@
-
- include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
- $(APR_MKDIR) include/private
diff --git a/meta/recipes-support/apr/apr_1.5.2.bb b/meta/recipes-support/apr/apr_1.5.2.bb
deleted file mode 100644
index 302c93504b..0000000000
--- a/meta/recipes-support/apr/apr_1.5.2.bb
+++ /dev/null
@@ -1,112 +0,0 @@
-SUMMARY = "Apache Portable Runtime (APR) library"
-HOMEPAGE = "http://apr.apache.org/"
-SECTION = "libs"
-DEPENDS = "util-linux"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
- file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
- file://configure_fixes.patch \
- file://cleanup.patch \
- file://configfix.patch \
- file://run-ptest \
- file://upgrade-and-fix-1.5.1.patch \
- file://Fix-packet-discards-HTTP-redirect.patch \
- file://configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
-"
-
-SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa"
-SRC_URI[sha256sum] = "7d03ed29c22a7152be45b8e50431063736df9e1daa1ddf93f6a547ba7a28f67a"
-
-inherit autotools-brokensep lib_package binconfig multilib_header ptest
-
-OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
-
-# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
-CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
-
-# Also suppress trying to use sctp.
-#
-CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
-
-# Otherwise libtool fails to compile apr-utils
-# x86_64-linux-libtool: compile: unable to infer tagged configuration
-# x86_64-linux-libtool: error: specify a tag with '--tag'
-CCACHE = ""
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-do_configure_prepend() {
- # Avoid absolute paths for grep since it causes failures
- # when using sstate between different hosts with different
- # install paths for grep.
- export GREP="grep"
-
- cd ${S}
- ./buildconf
-}
-
-FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
-RDEPENDS_${PN}-dev += "bash"
-
-#for some reason, build/libtool.m4 handled by buildconf still be overwritten
-#when autoconf, so handle it again.
-do_configure_append() {
- sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
- sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
-}
-
-do_install_append() {
- oe_multilib_header apr.h
- install -d ${D}${datadir}/apr
-}
-
-do_install_append_class-target() {
- sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
- sed -i -e 's,${STAGING_DIR_HOST},,g' \
- -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
- -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
-}
-
-SSTATE_SCAN_FILES += "apr_rules.mk libtool"
-
-SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
-
-apr_sysroot_preprocess () {
- d=${SYSROOT_DESTDIR}${datadir}/apr
- install -d $d/
- cp ${S}/build/apr_rules.mk $d/
- sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
- sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
- sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
- sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
- cp ${S}/build/mkdir.sh $d/
- cp ${S}/build/make_exports.awk $d/
- cp ${S}/build/make_var_export.awk $d/
- cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
-}
-
-do_compile_ptest() {
- cd ${S}/test
- oe_runmake
-}
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}/test
- mkdir -p $t/.libs
- cp -r ${S}/test/data $t/
- cp -r ${S}/test/.libs/*.so $t/.libs/
- cp ${S}/test/proc_child $t/
- cp ${S}/test/readchild $t/
- cp ${S}/test/sockchild $t/
- cp ${S}/test/sockperf $t/
- cp ${S}/test/testall $t/
- cp ${S}/test/tryread $t/
-}
-
-export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.0.bb
new file mode 100644
index 0000000000..eca9cdea48
--- /dev/null
+++ b/meta/recipes-support/apr/apr_1.7.0.bb
@@ -0,0 +1,115 @@
+SUMMARY = "Apache Portable Runtime (APR) library"
+HOMEPAGE = "http://apr.apache.org/"
+SECTION = "libs"
+DEPENDS = "util-linux"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
+ file://include/apr_lib.h;endline=15;md5=823b3d1a7225df8f7b68a69c3c2b4c71"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
+ file://run-ptest \
+ file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \
+ file://0003-Makefile.in-configure.in-support-cross-compiling.patch \
+ file://0004-Fix-packet-discards-HTTP-redirect.patch \
+ file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
+ file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
+ file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
+ file://libtoolize_check.patch \
+ "
+
+SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7"
+SRC_URI[sha256sum] = "e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea"
+
+inherit autotools-brokensep lib_package binconfig multilib_header ptest
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
+CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
+
+# Also suppress trying to use sctp.
+#
+CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
+
+CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes"
+CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_configure_prepend() {
+ # Avoid absolute paths for grep since it causes failures
+ # when using sstate between different hosts with different
+ # install paths for grep.
+ export GREP="grep"
+
+ cd ${S}
+ # The "2" means libtool version 2.
+ ./buildconf 2
+}
+
+FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
+RDEPENDS_${PN}-dev += "bash"
+
+RDEPENDS_${PN}-ptest += "libgcc"
+
+#for some reason, build/libtool.m4 handled by buildconf still be overwritten
+#when autoconf, so handle it again.
+do_configure_append() {
+ sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
+ sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
+}
+
+do_install_append() {
+ oe_multilib_header apr.h
+ install -d ${D}${datadir}/apr
+}
+
+do_install_append_class-target() {
+ sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \
+ -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
+ sed -i -e 's,${STAGING_DIR_HOST},,g' \
+ -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
+ -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
+}
+
+SSTATE_SCAN_FILES += "apr_rules.mk libtool"
+
+SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
+
+apr_sysroot_preprocess () {
+ d=${SYSROOT_DESTDIR}${datadir}/apr
+ install -d $d/
+ cp ${S}/build/apr_rules.mk $d/
+ sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
+ sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
+ sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
+ sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
+ cp ${S}/build/mkdir.sh $d/
+ cp ${S}/build/make_exports.awk $d/
+ cp ${S}/build/make_var_export.awk $d/
+ cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
+}
+
+do_compile_ptest() {
+ cd ${S}/test
+ oe_runmake
+}
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}/test
+ mkdir -p $t/.libs
+ cp -r ${S}/test/data $t/
+ cp -r ${S}/test/.libs/*.so $t/.libs/
+ cp ${S}/test/proc_child $t/
+ cp ${S}/test/readchild $t/
+ cp ${S}/test/sockchild $t/
+ cp ${S}/test/sockperf $t/
+ cp ${S}/test/testall $t/
+ cp ${S}/test/tryread $t/
+}
+
+export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb b/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
index bd0cfdfe46..21bbcab3d3 100644
--- a/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
+++ b/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
@@ -19,6 +19,9 @@ inherit autotools
CFLAGS += "-fPIC -U__OPTIMIZE__"
+RDEPENDS_${PN}-dev = ""
+RDEPENDS_${PN}-staticdev = ""
+
do_install() {
install -D -m 0644 ${B}/libargp.a ${D}${libdir}/libargp.a
install -D -m 0644 ${S}/argp.h ${D}${includedir}/argp.h
diff --git a/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
deleted file mode 100644
index 5a23754b74..0000000000
--- a/meta/recipes-support/aspell/aspell_0.60.6.1.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "GNU Aspell spell-checker"
-SECTION = "console/utils"
-
-LICENSE = "LGPLv2 | LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-PR = "r1"
-
-SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz"
-SRC_URI[md5sum] = "e66a9c9af6a60dc46134fdacf6ce97d7"
-SRC_URI[sha256sum] = "f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
-
-PACKAGES += "libaspell libpspell aspell-utils"
-
-RDEPENDS_${PN}-utils += "perl"
-
-FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
-FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
-FILES_${PN} = "${bindir}/aspell"
-FILES_libpspell = "${libdir}/libpspell.so.*"
-FILES_${PN}-dev += "${bindir}/pspell-config"
-
-ARM_INSTRUCTION_SET = "arm"
-inherit autotools-brokensep gettext texinfo binconfig-disabled
-
-BINCONFIG = "${bindir}/pspell-config"
diff --git a/meta/recipes-support/aspell/aspell_0.60.8.bb b/meta/recipes-support/aspell/aspell_0.60.8.bb
new file mode 100644
index 0000000000..629987810a
--- /dev/null
+++ b/meta/recipes-support/aspell/aspell_0.60.8.bb
@@ -0,0 +1,30 @@
+SUMMARY = "GNU Aspell spell-checker"
+SECTION = "console/utils"
+
+LICENSE = "LGPLv2 | LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz"
+SRC_URI[md5sum] = "012fa9209203ae4e5a61c2a668fd10e3"
+SRC_URI[sha256sum] = "f9b77e515334a751b2e60daab5db23499e26c9209f5e7b7443b05235ad0226f2"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
+
+PACKAGES += "libaspell libpspell aspell-utils"
+
+RDEPENDS_${PN}-utils += "perl"
+
+FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
+FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
+FILES_${PN} = "${bindir}/aspell"
+FILES_libpspell = "${libdir}/libpspell.so.*"
+FILES_${PN}-dev += "${bindir}/pspell-config"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
+inherit autotools-brokensep gettext texinfo binconfig-disabled
+
+BINCONFIG = "${bindir}/pspell-config"
diff --git a/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb b/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb
deleted file mode 100644
index d4120b6040..0000000000
--- a/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "AT-SPI 2 Toolkit Bridge"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "23309b6f8e1623871ace6347fb734dce"
-SRC_URI[sha256sum] = "2358a794e918e8f47ce0c7370eee8fc8a6207ff1afe976ec9ff547a03277bf8e"
-
-DEPENDS = "dbus glib-2.0 atk at-spi2-core"
-
-inherit autotools pkgconfig distro_features_check upstream-version-is-even
-
-# The at-spi2-core requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
-
-FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
-FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/meta/recipes-support/atk/at-spi2-atk_2.32.0.bb b/meta/recipes-support/atk/at-spi2-atk_2.32.0.bb
new file mode 100644
index 0000000000..d3a9de1e41
--- /dev/null
+++ b/meta/recipes-support/atk/at-spi2-atk_2.32.0.bb
@@ -0,0 +1,19 @@
+SUMMARY = "AT-SPI 2 Toolkit Bridge"
+HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+SRC_URI[archive.md5sum] = "6a4b27bace3b9352721ed462b95f6291"
+SRC_URI[archive.sha256sum] = "0b51e6d339fa2bcca3a3e3159ccea574c67b107f1ac8b00047fa60e34ce7a45c"
+
+DEPENDS = "dbus glib-2.0 glib-2.0-native atk at-spi2-core libxml2"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase features_check upstream-version-is-even
+
+PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
+
+FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
+FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/atk/at-spi2-core/0001-Fix-source-reproducibility.patch b/meta/recipes-support/atk/at-spi2-core/0001-Fix-source-reproducibility.patch
new file mode 100644
index 0000000000..7631969cd6
--- /dev/null
+++ b/meta/recipes-support/atk/at-spi2-core/0001-Fix-source-reproducibility.patch
@@ -0,0 +1,32 @@
+From b7fa0aa00b07e03e338dd02af564431bf2f2b185 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <Joshua.Watt@garmin.com>
+Date: Wed, 20 Nov 2019 15:24:02 -0600
+Subject: [PATCH] Fix source reproducibility
+
+The generated enum type files can be included in source packages meant
+for debugging, and thus need to be reproducible. Replace the absolute
+include of the header with the basename. This is sufficient because the
+target include files are always in the include path anyway.
+
+Upstream-Status: Accepted [https://gitlab.gnome.org/GNOME/at-spi2-core/merge_requests/25]
+Signed-off-by: Joshua Watt <Joshua.Watt@garmin.com>
+---
+ atspi/atspi-enum-types.c.template | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/atspi/atspi-enum-types.c.template b/atspi/atspi-enum-types.c.template
+index 385d0ee..92e4937 100644
+--- a/atspi/atspi-enum-types.c.template
++++ b/atspi/atspi-enum-types.c.template
+@@ -5,7 +5,7 @@
+
+ /*** BEGIN file-production ***/
+ /* enumerations from "@basename@" */
+-#include "@filename@"
++#include "@basename@"
+
+ /*** END file-production ***/
+
+--
+2.23.0
+
diff --git a/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch b/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
deleted file mode 100644
index 4103eaa2e5..0000000000
--- a/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 2f47c975ebe52b6916a45ade023ae3bac21bb0e0 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 21 Jun 2016 16:00:02 +0300
-Subject: [PATCH] build: Add --with-systemduserunitdir
-
-Default to "pkg-config --variable=systemduserunitdir systemd" but
-allow overriding the value.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=767911]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- bus/Makefile.am | 2 +-
- configure.ac | 7 +++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/bus/Makefile.am b/bus/Makefile.am
-index b189e02..52fbb0b 100644
---- a/bus/Makefile.am
-+++ b/bus/Makefile.am
-@@ -26,7 +26,7 @@ dbusservice_DATA = org.a11y.Bus.service
- org.a11y.Bus.service: org.a11y.Bus.service.in
- sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
-
--systemd_userdir = $(prefix)/lib/systemd/user
-+systemd_userdir = $(systemduserunitdir)
- systemd_user_DATA = at-spi-dbus-bus.service
- at-spi-dbus-bus.service: at-spi-dbus-bus.service.in Makefile
- sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
-diff --git a/configure.ac b/configure.ac
-index f9061c2..2b8eeed 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -183,6 +183,13 @@ else
- fi
- AC_SUBST(DBUS_SERVICES_DIR)
-
-+AC_ARG_WITH([systemduserunitdir],
-+ AS_HELP_STRING([--with-systemduserunitdir=DIR],
-+ [Directory for systemd service files]),
-+ [],
-+ [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)])
-+AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
-+
- AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
-
- GOBJECT_INTROSPECTION_CHECK([0.9.6])
---
-2.1.4
-
diff --git a/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch b/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch
deleted file mode 100644
index 69a51d5662..0000000000
--- a/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From c320799c941d42a9b7e351805359694ea3b36d2d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 5 Apr 2015 09:08:38 -0700
-Subject: [PATCH] nls.m4: Take it from gettext-0.15
-
-It otherwise expects gettext to provide it. Lets go independent
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- m4/nls.m4 | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
- create mode 100644 m4/nls.m4
-
-diff --git a/m4/nls.m4 b/m4/nls.m4
-new file mode 100644
-index 0000000..2c8fe69
---- /dev/null
-+++ b/m4/nls.m4
-@@ -0,0 +1,30 @@
-+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
-+dnl This file is free software; the Free Software Foundation
-+dnl gives unlimited permission to copy and/or distribute it,
-+dnl with or without modifications, as long as this notice is preserved.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are not in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper drepper@cygnus.com, 1995-2000.
-+dnl Bruno Haible haible@clisp.cons.org, 2000-2003.
-+
-+AC_PREREQ(2.50)
-+
-+AC_DEFUN([AM_NLS],
-+[
-+AC_MSG_CHECKING([whether NLS is requested])
-+dnl Default is enabled NLS
-+AC_ARG_ENABLE(nls,
-+[ --disable-nls do not use Native Language Support],
-+USE_NLS=$enableval, USE_NLS=yes)
-+AC_MSG_RESULT($USE_NLS)
-+AC_SUBST(USE_NLS)
-+])
---
-2.1.4
-
diff --git a/meta/recipes-support/atk/at-spi2-core_2.20.2.bb b/meta/recipes-support/atk/at-spi2-core_2.20.2.bb
deleted file mode 100644
index 199243adf1..0000000000
--- a/meta/recipes-support/atk/at-spi2-core_2.20.2.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
- file://0001-build-Add-with-systemduserunitdir.patch \
- "
-
-SRC_URI[md5sum] = "f6f6303da2e72317f881703f40bf0c62"
-SRC_URI[sha256sum] = "88a4de9d43139f13cca531b47b901bc1b56e0ab06ba899126644abd4ac16a143"
-
-DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native"
-
-inherit autotools gtk-doc gettext systemd pkgconfig distro_features_check upstream-version-is-even gobject-introspection
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-xevie \
- --with-systemduserunitdir=${systemd_user_unitdir} \
- --with-dbus-daemondir=${bindir}"
-
-FILES_${PN} += "${datadir}/dbus-1/services/*.service \
- ${datadir}/dbus-1/accessibility-services/*.service \
- ${datadir}/defaults/at-spi2 \
- ${systemd_user_unitdir}/at-spi-dbus-bus.service \
- "
diff --git a/meta/recipes-support/atk/at-spi2-core_2.32.1.bb b/meta/recipes-support/atk/at-spi2-core_2.32.1.bb
new file mode 100644
index 0000000000..18b5de2d58
--- /dev/null
+++ b/meta/recipes-support/atk/at-spi2-core_2.32.1.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
+HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://0001-Fix-source-reproducibility.patch"
+
+SRC_URI[md5sum] = "998fd9d858f8fa22c4c8c15567bf6254"
+SRC_URI[sha256sum] = "3c2aa937ebfaca2c86569bce9b16a34fbe20d69ef0c58846313b1c42f53b0d53"
+
+X11DEPENDS = "virtual/libx11 libxi libxtst"
+
+DEPENDS = "dbus glib-2.0"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
+
+inherit meson gtk-doc gettext systemd pkgconfig upstream-version-is-even gobject-introspection
+
+EXTRA_OEMESON = " -Dsystemd_user_dir=${systemd_user_unitdir} \
+ -Ddbus_daemon=${bindir}/dbus-daemon \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '-Dx11=yes', '-Dx11=no', d)} \
+"
+
+GTKDOC_MESON_OPTION = "docs"
+
+GIR_MESON_OPTION = 'introspection'
+GIR_MESON_ENABLE_FLAG = 'yes'
+GIR_MESON_DISABLE_FLAG = 'no'
+
+FILES_${PN} += "${datadir}/dbus-1/services/*.service \
+ ${datadir}/dbus-1/accessibility-services/*.service \
+ ${datadir}/defaults/at-spi2 \
+ ${systemd_user_unitdir}/at-spi-dbus-bus.service \
+ "
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/atk/atk/0001-meson.build-enable-introspection-for-cross-compile.patch b/meta/recipes-support/atk/atk/0001-meson.build-enable-introspection-for-cross-compile.patch
new file mode 100644
index 0000000000..d1b08bc04b
--- /dev/null
+++ b/meta/recipes-support/atk/atk/0001-meson.build-enable-introspection-for-cross-compile.patch
@@ -0,0 +1,29 @@
+From 44d46baa5e1519c6c3df7e4d34fb333e247b5bc8 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Fri, 6 Apr 2018 12:04:00 +0800
+Subject: [PATCH] meson.build: enable introspection for cross-compile
+
+It works fine in OE-core and doesn't need to be disabled. Let the user decide
+if it should be disabled or not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+---
+ atk/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/atk/meson.build b/atk/meson.build
+index 0ad67e5..1d2a49c 100644
+--- a/atk/meson.build
++++ b/atk/meson.build
+@@ -137,7 +137,7 @@ libatk_dep = declare_dependency(link_with: libatk,
+ dependencies: glib_dep,
+ sources: atk_enum_h)
+
+-if not meson.is_cross_build() and get_option('introspection')
++if get_option('introspection')
+ gnome.generate_gir(libatk,
+ sources: atk_sources + atk_headers + [ atk_enum_h ] + [ atk_version_h ],
+ namespace: 'Atk',
diff --git a/meta/recipes-support/atk/atk_2.20.0.bb b/meta/recipes-support/atk/atk_2.20.0.bb
deleted file mode 100644
index 0422354e08..0000000000
--- a/meta/recipes-support/atk/atk_2.20.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Accessibility toolkit for GNOME"
-HOMEPAGE = "http://live.gnome.org/GAP/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/libs"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
- file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
-
-DEPENDS = "glib-2.0"
-
-inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
-
-SRC_URI[archive.md5sum] = "5187b0972f4d3905f285540b31395e20"
-SRC_URI[archive.sha256sum] = "493a50f6c4a025f588d380a551ec277e070b28a82e63ef8e3c06b3ee7c1238f0"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--disable-glibtest \
- "
diff --git a/meta/recipes-support/atk/atk_2.32.0.bb b/meta/recipes-support/atk/atk_2.32.0.bb
new file mode 100644
index 0000000000..67223729e9
--- /dev/null
+++ b/meta/recipes-support/atk/atk_2.32.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Accessibility toolkit for GNOME"
+HOMEPAGE = "http://live.gnome.org/GAP/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/libs"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
+ file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
+
+# Need gettext-native as Meson can't turn off i18n
+DEPENDS = "gettext-native glib-2.0"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
+
+SRC_URI += " file://0001-meson.build-enable-introspection-for-cross-compile.patch"
+SRC_URI[archive.md5sum] = "c10b0b2af3c199e42caa6275b845c49d"
+SRC_URI[archive.sha256sum] = "cb41feda7fe4ef0daa024471438ea0219592baf7c291347e5a858bb64e4091cc"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
deleted file mode 100644
index 37a0218cbb..0000000000
--- a/meta/recipes-support/attr/acl.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Utilities for managing POSIX Access Control Lists"
-HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
-SECTION = "libs"
-
-LICENSE = "LGPLv2.1+ & GPLv2+"
-LICENSE_${PN} = "GPLv2+"
-LICENSE_lib${BPN} = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
- file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
-
-DEPENDS = "attr"
-SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \
- file://run-ptest \
- file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
- file://test-fix-insufficient-quoting-of.patch \
- file://test-fixups-on-SELinux-machines-for-root-testcases.patch \
- file://test-fix-directory-permissions.patch \
-"
-
-require ea-acl.inc
-
-# avoid RPATH hardcode to staging dir
-do_configure_append() {
- sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
- ${S}/config.status
-}
-
-# libdir should point to .la
-do_install_append() {
- sed -i ${D}${libdir}/libacl.la -e \
- s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
-}
-
-inherit ptest
-
-do_install_ptest() {
- tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
- mkdir ${D}${PTEST_PATH}/include
- cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
-}
-
-RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
diff --git a/meta/recipes-support/attr/acl/Makefile-libacl-should-depend-on-include.patch b/meta/recipes-support/attr/acl/Makefile-libacl-should-depend-on-include.patch
new file mode 100644
index 0000000000..4c7cba3b88
--- /dev/null
+++ b/meta/recipes-support/attr/acl/Makefile-libacl-should-depend-on-include.patch
@@ -0,0 +1,51 @@
+From d82457ce5ca7455e336da5e244d95f90e52aaef8 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 18 Apr 2017 01:17:26 -0700
+Subject: [PATCH] Makefile: libacl should depend on include
+
+Fixed race issue:
+ In file included from acl_copy_entry.c:22:0:
+ libacl.h:19:21: fatal error: sys/acl.h: No such file or directory
+ #include <sys/acl.h>
+
+[snip]
+
+ compilation terminated.
+ acl_get_file.c:27:24: fatal error: acl/libacl.h: No such file or directory
+ #include <acl/libacl.h>
+ ^
+
+The acl.h is in "include" directory, and include/Makefile creates
+symlink "sys" and "acl" poinst to current dirctory:
+$ ls include/ -l
+acl -> .
+sys -> .
+
+So if "libacl" target runs before "include", the error would happen
+since no "acl" or "sys" directory.
+
+Let libacl depend on include can fix the problem.
+
+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 dce32d3..8a79379 100644
+--- a/Makefile
++++ b/Makefile
+@@ -48,7 +48,7 @@ else
+ endif
+
+ # tool/lib dependencies
+-libacl: libmisc
++libacl: include libmisc
+ getfacl setfacl chacl: libacl
+
+ ifeq ($(HAVE_BUILDDEFS), yes)
+--
+2.10.2
+
diff --git a/meta/recipes-support/attr/acl/add-missing-configure.ac.patch b/meta/recipes-support/attr/acl/add-missing-configure.ac.patch
deleted file mode 100644
index eb6979fa3c..0000000000
--- a/meta/recipes-support/attr/acl/add-missing-configure.ac.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Backport [configure.ac is missing from tarball]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: acl-2.2.52/configure.ac
-===================================================================
---- /dev/null
-+++ acl-2.2.52/configure.ac
-@@ -0,0 +1,50 @@
-+
-+# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
-+#
-+# This program is free software: you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by
-+# the Free Software Foundation, either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+AC_INIT(include/acl.h)
-+AC_CONFIG_AUX_DIR([.])
-+AC_CONFIG_MACRO_DIR([m4])
-+AC_CONFIG_HEADER(include/config.h)
-+AC_PREFIX_DEFAULT(/usr)
-+
-+AC_PROG_LIBTOOL
-+
-+AC_ARG_ENABLE(shared,
-+[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
-+ enable_shared=yes)
-+AC_SUBST(enable_shared)
-+
-+AC_ARG_ENABLE(gettext,
-+[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
-+ enable_gettext=yes)
-+AC_SUBST(enable_gettext)
-+
-+AC_ARG_ENABLE(lib64,
-+[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
-+ enable_lib64=no)
-+AC_SUBST(enable_lib64)
-+
-+AC_PACKAGE_GLOBALS(acl)
-+AC_PACKAGE_UTILITIES(acl)
-+AC_PACKAGE_NEED_ATTR_XATTR_H
-+AC_PACKAGE_NEED_ATTR_ERROR_H
-+AC_MULTILIB($enable_lib64)
-+AC_PACKAGE_NEED_GETXATTR_LIBATTR
-+AC_MANUAL_FORMAT
-+
-+AC_FUNC_GCC_VISIBILITY
-+
-+AC_OUTPUT(include/builddefs)
diff --git a/meta/recipes-support/attr/acl/configure.ac b/meta/recipes-support/attr/acl/configure.ac
new file mode 100644
index 0000000000..7af2e8d886
--- /dev/null
+++ b/meta/recipes-support/attr/acl/configure.ac
@@ -0,0 +1,49 @@
+# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+AC_INIT(include/acl.h)
+AC_CONFIG_AUX_DIR([.])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADER(include/config.h)
+AC_PREFIX_DEFAULT(/usr)
+
+AC_PROG_LIBTOOL
+
+AC_ARG_ENABLE(shared,
+[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
+ enable_shared=yes)
+AC_SUBST(enable_shared)
+
+AC_ARG_ENABLE(gettext,
+[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
+ enable_gettext=yes)
+AC_SUBST(enable_gettext)
+
+AC_ARG_ENABLE(lib64,
+[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
+ enable_lib64=no)
+AC_SUBST(enable_lib64)
+
+AC_PACKAGE_GLOBALS(acl)
+AC_PACKAGE_UTILITIES(acl)
+AC_PACKAGE_NEED_ATTR_XATTR_H
+AC_PACKAGE_NEED_ATTR_ERROR_H
+AC_MULTILIB($enable_lib64)
+AC_PACKAGE_NEED_GETXATTR_LIBATTR
+AC_MANUAL_FORMAT
+
+AC_FUNC_GCC_VISIBILITY
+
+AC_OUTPUT(include/builddefs)
diff --git a/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch b/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch
index cd4510c0b0..e64990ad5b 100644
--- a/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch
+++ b/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch
@@ -1,6 +1,9 @@
+From 311589fedf196168382d8f0db303ab328bcf9d83 Mon Sep 17 00:00:00 2001
+From: Peter Seebach <peter.seebach@windriver.com>
+Date: Wed, 11 May 2016 15:16:06 -0500
+Subject: [PATCH] acl.inc, run-ptest: improve ptest functionality on limited
+
commit c45bae84817a70fef6c2b661a07a492a0d23ae85
-Author: Peter Seebach <peter.seebach@windriver.com>
-Date: Wed May 11 15:16:06 2016 -0500
Fix permissions on temporary directory
@@ -10,6 +13,13 @@ Date: Wed May 11 15:16:06 2016 -0500
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+Upstream-Status: Backport [ http://git.savannah.gnu.org/cgit/acl.git/commit/?id=c6772a958800de064482634f77c20a0faafc5af6 ]
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ test/root/permissions.test | 1 +
+ 1 file changed, 1 insertion(+)
+
diff --git a/test/root/permissions.test b/test/root/permissions.test
index 42615f5..098b52a 100644
--- a/test/root/permissions.test
@@ -22,3 +32,6 @@ index 42615f5..098b52a 100644
$ mkdir d
$ cd d
$ umask 027
+--
+2.8.1
+
diff --git a/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch b/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
index 0b350be563..f392465b58 100644
--- a/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
+++ b/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
@@ -35,61 +35,56 @@ http://git.savannah.gnu.org/cgit/acl.git/commit/?id=e98ce8acf84d12ea67a3ac76bf63
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- test/cp.test | 2 +-
- test/misc.test | 6 +++---
- test/sbits-restore.test | 6 +++---
- 3 files changed, 7 insertions(+), 7 deletions(-)
-diff --git a/test/cp.test b/test/cp.test
-index 0867f63..a927195 100644
---- a/test/cp.test
-+++ b/test/cp.test
-@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
+Index: acl-2.2.52/test/cp.test
+===================================================================
+--- acl-2.2.52.orig/test/cp.test
++++ acl-2.2.52/test/cp.test
+@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if
> -rw-rw-r--+
-
+
$ cp f g
- $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
+ $ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
> -rw-r--r--
-
+
$ rm g
-diff --git a/test/misc.test b/test/misc.test
-index 6e98053..29372b7 100644
---- a/test/misc.test
-+++ b/test/misc.test
+Index: acl-2.2.52/test/misc.test
+===================================================================
+--- acl-2.2.52.orig/test/misc.test
++++ acl-2.2.52/test/misc.test
@@ -254,7 +254,7 @@ Add some users and groups
Symlink in directory with default ACL?
-
+
$ ln -s d d/l
- $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
> lrwxrwxrwx
-
+
$ ls -dl -L d/l | awk '{print $1}'
@@ -343,7 +343,7 @@ Remove the default ACL
Reset to base entries
-
+
$ setfacl -b d
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
> drwxr-x---
-
+
$ getfacl --omit-header d
@@ -355,7 +355,7 @@ Reset to base entries
Now, chmod should change the group_obj entry
-
+
$ chmod 775 d
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
> drwxrwxr-x
-
+
$ getfacl --omit-header d
-diff --git a/test/sbits-restore.test b/test/sbits-restore.test
-index de21340..5899b0a 100644
---- a/test/sbits-restore.test
-+++ b/test/sbits-restore.test
-@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
+Index: acl-2.2.52/test/sbits-restore.test
+===================================================================
+--- acl-2.2.52.orig/test/sbits-restore.test
++++ acl-2.2.52/test/sbits-restore.test
+@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via -
$ touch d/g
$ touch d/u
$ setfacl --restore d.acl
@@ -103,6 +98,3 @@ index de21340..5899b0a 100644
+ $ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
> -rw-r-Sr--
$ rm -Rf d
---
-1.9.1
-
diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index ecdbdb6b79..6bc77d868d 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -1,9 +1,52 @@
-require acl.inc
+SUMMARY = "Utilities for managing POSIX Access Control Lists"
+HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
+SECTION = "libs"
-SRC_URI += "file://add-missing-configure.ac.patch"
+LICENSE = "LGPLv2.1+ & GPLv2+"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_lib${BPN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
+ file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
+
+DEPENDS = "attr"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \
+ file://configure.ac;subdir=${BP} \
+ file://run-ptest \
+ file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
+ file://test-fix-insufficient-quoting-of.patch \
+ file://test-fixups-on-SELinux-machines-for-root-testcases.patch \
+ file://test-fix-directory-permissions.patch \
+ file://Makefile-libacl-should-depend-on-include.patch \
+"
SRC_URI[md5sum] = "a61415312426e9c2212bd7dc7929abda"
SRC_URI[sha256sum] = "179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23"
+require ea-acl.inc
+
+# avoid RPATH hardcode to staging dir
+do_configure_append() {
+ sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
+ ${S}/config.status
+}
+
+# libdir should point to .la
+do_install_append() {
+ sed -i ${D}${libdir}/libacl.la -e \
+ s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
+}
+
+inherit ptest
+
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
+do_install_ptest() {
+ tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ install -d ${D}${PTEST_PATH}/include
+ install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
+}
+
+RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index a1b0829e1f..3503d66b9e 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -2,7 +2,7 @@ SUMMARY = "Utilities for manipulating filesystem extended attributes"
HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
SECTION = "libs"
-DEPENDS = "ncurses virtual/libintl"
+DEPENDS = "virtual/libintl"
LICENSE = "LGPLv2.1+ & GPLv2+"
LICENSE_${PN} = "GPLv2+"
@@ -23,7 +23,14 @@ do_install_append() {
s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
}
-inherit ptest
+inherit ptest update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "setfattr"
+ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
+
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
do_install_ptest() {
tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
@@ -34,6 +41,6 @@ do_install_ptest() {
sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
}
-RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
+RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix make perl"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/attr/attr/0001-Use-stdint-types-consistently.patch b/meta/recipes-support/attr/attr/0001-Use-stdint-types-consistently.patch
new file mode 100644
index 0000000000..dcd6507bcc
--- /dev/null
+++ b/meta/recipes-support/attr/attr/0001-Use-stdint-types-consistently.patch
@@ -0,0 +1,69 @@
+From 37a27b6fd09ecb37097b85e5db74e4f77b80fe0a Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Tue, 12 Jan 2016 22:20:33 +0100
+Subject: [PATCH] Use stdint types consistently
+
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ include/attributes.h | 6 ++++--
+ man/man3/attr_list.3 | 8 ++++----
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+Index: attr-2.4.47/include/attributes.h
+===================================================================
+--- attr-2.4.47.orig/include/attributes.h
++++ attr-2.4.47/include/attributes.h
+@@ -22,6 +22,7 @@
+ extern "C" {
+ #endif
+
++#include <stdint.h>
+ /*
+ * An almost-IRIX-compatible extended attributes API
+ * (the IRIX attribute "list" operation is missing, added ATTR_SECURE).
+@@ -69,7 +70,7 @@ typedef struct attrlist {
+ * al_offset[i] entry points to.
+ */
+ typedef struct attrlist_ent { /* data from attr_list() */
+- u_int32_t a_valuelen; /* number bytes in value of attr */
++ uint32_t a_valuelen; /* number bytes in value of attr */
+ char a_name[1]; /* attr name (NULL terminated) */
+ } attrlist_ent_t;
+
+@@ -90,7 +91,7 @@ typedef struct attrlist_ent { /* data fr
+ * operation on a cursor is to bzero() it.
+ */
+ typedef struct attrlist_cursor {
+- u_int32_t opaque[4]; /* an opaque cookie */
++ uint32_t opaque[4]; /* an opaque cookie */
+ } attrlist_cursor_t;
+
+ /*
+Index: attr-2.4.47/man/man3/attr_list.3
+===================================================================
+--- attr-2.4.47.orig/man/man3/attr_list.3
++++ attr-2.4.47/man/man3/attr_list.3
+@@ -72,9 +72,9 @@ The contents of an \f4attrlist_t\fP stru
+ .nf
+ .ft 4
+ .ta 9n 22n
+-__int32_t al_count; /\(** number of entries in attrlist \(**/
+-__int32_t al_more; /\(** T/F: more attrs (do syscall again) \(**/
+-__int32_t al_offset[1]; /\(** byte offsets of attrs [var-sized] \(**/
++int32_t al_count; /\(** number of entries in attrlist \(**/
++int32_t al_more; /\(** T/F: more attrs (do syscall again) \(**/
++int32_t al_offset[1]; /\(** byte offsets of attrs [var-sized] \(**/
+ .ft 1
+ .fi
+ .RE
+@@ -113,7 +113,7 @@ include the following members:
+ .nf
+ .ft 4
+ .ta 9n 22n
+-u_int32_t a_valuelen; /\(** number bytes in value of attr \(**/
++uint32_t a_valuelen; /\(** number bytes in value of attr \(**/
+ char a_name[]; /\(** attr name (NULL terminated) \(**/
+ .ft 1
+ .fi
diff --git a/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch b/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch
index 20fcc3cee7..20fcc3cee7 100644
--- a/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch
+++ b/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch
diff --git a/meta/recipes-support/attr/files/dont-use-decl-macros.patch b/meta/recipes-support/attr/attr/dont-use-decl-macros.patch
index 9d4b8929e8..9d4b8929e8 100644
--- a/meta/recipes-support/attr/files/dont-use-decl-macros.patch
+++ b/meta/recipes-support/attr/attr/dont-use-decl-macros.patch
diff --git a/meta/recipes-support/attr/attr_2.4.47.bb b/meta/recipes-support/attr/attr_2.4.47.bb
index 556c8e43e0..fc88bef830 100644
--- a/meta/recipes-support/attr/attr_2.4.47.bb
+++ b/meta/recipes-support/attr/attr_2.4.47.bb
@@ -4,6 +4,9 @@ require attr.inc
# future releases of attr, remove this when updating the recipe.
SRC_URI += "file://attr-Missing-configure.ac.patch \
file://dont-use-decl-macros.patch \
+ file://Remove-the-section-2-man-pages.patch \
+ file://Remove-the-attr.5-man-page-moved-to-man-pages.patch \
+ file://0001-Use-stdint-types-consistently.patch \
"
SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
diff --git a/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc
index 370e16f4a6..9336ffc938 100644
--- a/meta/recipes-support/attr/ea-acl.inc
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -2,51 +2,51 @@
SRC_URI += "file://relative-libdir.patch;striplevel=0 \
"
+# This patch should be applied after '(attr\|acl)-Missing-configure.ac.patch'
+SRC_URI_append = " file://0001-Added-configure-option-to-enable-disable-static-libr.patch"
inherit autotools-brokensep gettext
+# When upstream is using automake properly, this can be removed
+CLEANBROKEN = "1"
+
# the package comes with a custom config.h.in, it cannot be
# overwritten by autoheader
EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
EXTRA_OECONF_append_class-native = " --enable-gettext=no"
+EXTRA_OECONF_append_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS') == 'no')]}"
EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
do_install () {
- oe_runmake install install-lib install-dev DIST_ROOT="${D}"
+ oe_runmake install install-lib install-dev DIST_ROOT="${D}" ZIP="gzip -n"
}
-PACKAGES =+ "lib${BPN}"
-
-FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
-
-BBCLASSEXTEND = "native"
-# Only append ldflags for target recipe and if USE_NLS is enabled
-LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
-EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
-
-fix_symlink () {
- if [ "${BB_CURRENTTASK}" != "populate_sysroot" -a "${BB_CURRENTTASK}" != "populate_sysroot_setscene" ]
- then
- return
- fi
-
+do_install_append_class-native () {
if test "${libdir}" = "${base_libdir}" ; then
return
fi
+ librelpath=${@os.path.relpath(d.getVar('libdir'), d.getVar('base_libdir'))}
+ baselibrelpath=${@os.path.relpath(d.getVar('base_libdir'), d.getVar('libdir'))}
+
# Remove bad symlinks & create the correct symlinks
- if test -L ${libdir}/lib${BPN}.so ; then
- rm -rf ${libdir}/lib${BPN}.so
- ln -sf ${base_libdir}/lib${BPN}.so ${libdir}/lib${BPN}.so
+ if test -L ${D}${libdir}/lib${BPN}.so ; then
+ rm -rf ${D}${libdir}/lib${BPN}.so
+ ln -sf $baselibrelpath/lib${BPN}.so ${D}${libdir}/lib${BPN}.so
fi
- if test -L ${base_libdir}/lib${BPN}.a ; then
- rm -rf ${base_libdir}/lib${BPN}.a
- ln -sf ${libdir}/lib${BPN}.a ${base_libdir}/lib${BPN}.a
+ if test -L ${D}${base_libdir}/lib${BPN}.a ; then
+ rm -rf ${D}${base_libdir}/lib${BPN}.a
+ ln -sf $librelpath/lib${BPN}.a ${D}${base_libdir}/lib${BPN}.a
fi
- if test -L ${base_libdir}/lib${BPN}.la ; then
- rm -rf ${base_libdir}/lib${BPN}.la
- ln -sf ${libdir}/lib${BPN}.la ${base_libdir}/lib${BPN}.la
+ if test -L ${D}${base_libdir}/lib${BPN}.la ; then
+ rm -rf ${D}${base_libdir}/lib${BPN}.la
+ ln -sf $librelpath/lib${BPN}.la ${D}${base_libdir}/lib${BPN}.la
fi
}
-SSTATEPOSTINSTFUNCS_class-native += "fix_symlink"
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch b/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
new file mode 100644
index 0000000000..1c1159f2c9
--- /dev/null
+++ b/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
@@ -0,0 +1,70 @@
+From 01256c61ba126449c46dd4ab5d5e145488b981fa Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Mon, 23 Jan 2017 13:25:13 +0200
+Subject: [PATCH] Added configure option to enable/disable static library
+
+Create static library archive only in case of --enable-static.
+
+Upstream-Status: Pending
+
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+ configure.ac | 6 ++++++
+ include/builddefs.in | 1 +
+ include/buildmacros | 3 +++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index b966d0e..e48268b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,6 +26,12 @@ AC_ARG_ENABLE(shared,
+ enable_shared=yes)
+ AC_SUBST(enable_shared)
+
++AC_ARG_ENABLE(static,
++[ --enable-static=[yes/no] Enable use of static libraries [default=yes]],,
++ enable_static=yes)
++AC_SUBST(enable_static)
++
++
+ AC_ARG_ENABLE(gettext,
+ [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
+ enable_gettext=yes)
+diff --git a/include/builddefs.in b/include/builddefs.in
+index d9931db..3b3dbd2 100644
+--- a/include/builddefs.in
++++ b/include/builddefs.in
+@@ -71,6 +71,7 @@ RPMBUILD = @rpmbuild@
+ RPM_VERSION = @rpm_version@
+
+ ENABLE_SHARED = @enable_shared@
++ENABLE_STATIC = @enable_static@
+ ENABLE_GETTEXT = @enable_gettext@
+
+ HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
+diff --git a/include/buildmacros b/include/buildmacros
+index 39fa7e2..b0f25c5 100644
+--- a/include/buildmacros
++++ b/include/buildmacros
+@@ -80,6 +80,7 @@ endif
+ # /usr/lib.
+ ifeq ($(ENABLE_SHARED),yes)
+ INSTALL_LTLIB_DEV = \
++ set -x; \
+ cd $(TOPDIR)/$(LIBNAME)/.libs; \
+ ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
+ ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \
+@@ -88,7 +89,9 @@ INSTALL_LTLIB_DEV = \
+ ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
+ if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
+ rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
++ if test "$(ENABLE_STATIC)" = "yes" ; then \
+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
++ fi ;\
+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
+ rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
+ ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
+--
+2.7.4
+
diff --git a/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch b/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
new file mode 100644
index 0000000000..d5ab83d7c6
--- /dev/null
+++ b/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
@@ -0,0 +1,240 @@
+From 6047c8522b91235ad1e835f44f5e36472d9d49b2 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
+Date: Wed, 22 Apr 2015 11:46:59 +0200
+Subject: [PATCH 2/2] Remove the attr.5 man page (moved to man-pages)
+
+Commit dce9b4448c7f2b22bd206cd068fb05cb2f3255b9 from
+https://git.savannah.nongnu.org/git/attr.git
+
+The attr.5 page is part of the extended attribute system call documentation,
+which has been moved into the man-pages package. Move the attr.5 page there
+as well.
+
+Upstream-Status: Backport
+
+[MA: updated to apply directly to v2.4.47]
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ man/Makefile | 2 +-
+ man/man5/Makefile | 35 -------------
+ man/man5/attr.5 | 153 ------------------------------------------------------
+ 3 files changed, 1 insertion(+), 189 deletions(-)
+ delete mode 100644 man/man5/Makefile
+ delete mode 100644 man/man5/attr.5
+
+diff --git a/man/Makefile b/man/Makefile
+index 755daed..9301f09 100644
+--- a/man/Makefile
++++ b/man/Makefile
+@@ -19,7 +19,7 @@
+ TOPDIR = ..
+ include $(TOPDIR)/include/builddefs
+
+-SUBDIRS = man1 man3 man5
++SUBDIRS = man1 man3
+
+ default : $(SUBDIRS)
+
+diff --git a/man/man5/Makefile b/man/man5/Makefile
+deleted file mode 100644
+index 6b70d3d..0000000
+--- a/man/man5/Makefile
++++ /dev/null
+@@ -1,35 +0,0 @@
+-#
+-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
+-# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
+-#
+-# This program is free software: you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+-#
+-
+-TOPDIR = ../..
+-include $(TOPDIR)/include/builddefs
+-
+-MAN_SECTION = 5
+-
+-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
+-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
+-LSRCFILES = $(MAN_PAGES)
+-
+-default : $(MAN_PAGES)
+-
+-include $(BUILDRULES)
+-
+-install : default
+- $(INSTALL) -m 755 -d $(MAN_DEST)
+- $(INSTALL_MAN)
+-install-dev install-lib:
+diff --git a/man/man5/attr.5 b/man/man5/attr.5
+deleted file mode 100644
+index a02757d..0000000
+--- a/man/man5/attr.5
++++ /dev/null
+@@ -1,153 +0,0 @@
+-.\" Extended attributes manual page
+-.\"
+-.\" Copyright (C) 2000, 2002, 2007 Andreas Gruenbacher <agruen@suse.de>
+-.\" Copyright (C) 2001, 2002, 2004, 2007 Silicon Graphics, Inc.
+-.\" All rights reserved.
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH ATTR 5
+-.SH NAME
+-attr - Extended attributes
+-.SH DESCRIPTION
+-Extended attributes are name:value pairs associated permanently with
+-files and directories, similar to the environment strings associated
+-with a process.
+-An attribute may be defined or undefined.
+-If it is defined, its value may be empty or non-empty.
+-.PP
+-Extended attributes are extensions to the normal attributes which are
+-associated with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-They are often used to provide additional functionality
+-to a filesystem \- for example, additional security features such as
+-Access Control Lists (ACLs) may be implemented using extended attributes.
+-.PP
+-Users with search access to a file or directory may retrieve a list of
+-attribute names defined for that file or directory.
+-.PP
+-Extended attributes are accessed as atomic objects.
+-Reading retrieves the whole value of an attribute and stores it in a buffer.
+-Writing replaces any previous value with the new value.
+-.PP
+-Space consumed for extended attributes is counted towards the disk quotas
+-of the file owner and file group.
+-.PP
+-Currently, support for extended attributes is implemented on Linux by the
+-ext2, ext3, ext4, XFS, JFS and reiserfs filesystems.
+-.SH EXTENDED ATTRIBUTE NAMESPACES
+-Attribute names are zero-terminated strings.
+-The attribute name is always specified in the fully qualified
+-.IR namespace.attribute
+-form, eg.
+-.IR user.mime_type ,
+-.IR trusted.md5sum ,
+-.IR system.posix_acl_access ,
+-or
+-.IR security.selinux .
+-.PP
+-The namespace mechanism is used to define different classes of extended
+-attributes.
+-These different classes exist for several reasons, e.g. the permissions
+-and capabilities required for manipulating extended attributes of one
+-namespace may differ to another.
+-.PP
+-Currently the
+-.IR security ,
+-.IR system ,
+-.IR trusted ,
+-and
+-.IR user
+-extended attribute classes are defined as described below. Additional
+-classes may be added in the future.
+-.SS Extended security attributes
+-The security attribute namespace is used by kernel security modules,
+-such as Security Enhanced Linux.
+-Read and write access permissions to security attributes depend on the
+-policy implemented for each security attribute by the security module.
+-When no security module is loaded, all processes have read access to
+-extended security attributes, and write access is limited to processes
+-that have the CAP_SYS_ADMIN capability.
+-.SS Extended system attributes
+-Extended system attributes are used by the kernel to store system
+-objects such as Access Control Lists and Capabilities. Read and write
+-access permissions to system attributes depend on the policy implemented
+-for each system attribute implemented by filesystems in the kernel.
+-.SS Trusted extended attributes
+-Trusted extended attributes are visible and accessible only to processes that
+-have the CAP_SYS_ADMIN capability (the super user usually has this
+-capability).
+-Attributes in this class are used to implement mechanisms in user
+-space (i.e., outside the kernel) which keep information in extended attributes
+-to which ordinary processes should not have access.
+-.SS Extended user attributes
+-Extended user attributes may be assigned to files and directories for
+-storing arbitrary additional information such as the mime type,
+-character set or encoding of a file. The access permissions for user
+-attributes are defined by the file permission bits.
+-.PP
+-The file permission bits of regular files and directories are
+-interpreted differently from the file permission bits of special files
+-and symbolic links. For regular files and directories the file
+-permission bits define access to the file's contents, while for device special
+-files they define access to the device described by the special file.
+-The file permissions of symbolic links are not used in access
+-checks. These differences would allow users to consume filesystem resources in
+-a way not controllable by disk quotas for group or world writable special files and directories.
+-.PP
+-For this reason, extended user attributes are only allowed for regular files and directories, and access to extended user attributes is restricted to the
+-owner and to users with appropriate capabilities for directories with the
+-sticky bit set (see the
+-.BR chmod (1)
+-manual page for an explanation of Sticky Directories).
+-.SH FILESYSTEM DIFFERENCES
+-The kernel and the filesystem may place limits on the maximum number
+-and size of extended attributes that can be associated with a file.
+-Some file systems, such as ext2/3 and reiserfs, require the filesystem
+-to be mounted with the
+-.B user_xattr
+-mount option in order for extended user attributes to be used.
+-.PP
+-In the current ext2, ext3 and ext4 filesystem implementations, each
+-extended attribute must fit on a single filesystem block (1024, 2048
+-or 4096 bytes, depending on the block size specified when the
+-filesystem was created).
+-.PP
+-In the XFS and reiserfs filesystem implementations, there is no
+-practical limit on the number or size of extended attributes
+-associated with a file, and the algorithms used to store extended
+-attribute information on disk are scalable.
+-.PP
+-In the JFS filesystem implementation, names can be up to 255 bytes and
+-values up to 65,535 bytes.
+-.SH ADDITIONAL NOTES
+-Since the filesystems on which extended attributes are stored might also
+-be used on architectures with a different byte order and machine word
+-size, care should be taken to store attribute values in an architecture
+-independent format.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-.SH SEE ALSO
+-getfattr(1),
+-setfattr(1).
+--
+2.7.4
+
diff --git a/meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch b/meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch
new file mode 100644
index 0000000000..044c5a037c
--- /dev/null
+++ b/meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch
@@ -0,0 +1,666 @@
+From b972600a26f3a930e53e2fce2625266a5d29813e Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
+Date: Tue, 14 Apr 2015 23:53:11 +0200
+Subject: [PATCH 1/2] Remove the section 2 man pages
+
+Commit 8d1263bca95722d66a6f8e83450f49d0956ea534 from upstream
+https://git.savannah.nongnu.org/git/attr.git/
+
+The section 2 man pages have long since been added to the man-pages package
+which documents all system calls; they were disabled in attr by default since
+January 2014. Get rid of them here.
+
+Upstream-Status: Backport
+
+[MA: modified to apply directly to v2.4.47]
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ man/Makefile | 2 +-
+ man/man2/Makefile | 35 -----------
+ man/man2/getxattr.2 | 143 --------------------------------------------
+ man/man2/listxattr.2 | 158 -------------------------------------------------
+ man/man2/removexattr.2 | 111 ----------------------------------
+ man/man2/setxattr.2 | 143 --------------------------------------------
+ 6 files changed, 1 insertion(+), 591 deletions(-)
+ delete mode 100644 man/man2/Makefile
+ delete mode 100644 man/man2/getxattr.2
+ delete mode 100644 man/man2/listxattr.2
+ delete mode 100644 man/man2/removexattr.2
+ delete mode 100644 man/man2/setxattr.2
+
+diff --git a/man/Makefile b/man/Makefile
+index 9535426..755daed 100644
+--- a/man/Makefile
++++ b/man/Makefile
+@@ -19,7 +19,7 @@
+ TOPDIR = ..
+ include $(TOPDIR)/include/builddefs
+
+-SUBDIRS = man1 man2 man3 man5
++SUBDIRS = man1 man3 man5
+
+ default : $(SUBDIRS)
+
+diff --git a/man/man2/Makefile b/man/man2/Makefile
+deleted file mode 100644
+index d77309d..0000000
+--- a/man/man2/Makefile
++++ /dev/null
+@@ -1,35 +0,0 @@
+-#
+-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
+-# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
+-#
+-# This program is free software: you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+-#
+-
+-TOPDIR = ../..
+-include $(TOPDIR)/include/builddefs
+-
+-MAN_SECTION = 2
+-
+-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
+-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
+-LSRCFILES = $(MAN_PAGES)
+-
+-default install : $(MAN_PAGES)
+-
+-include $(BUILDRULES)
+-
+-install-dev : default
+- $(INSTALL) -m 755 -d $(MAN_DEST)
+- $(INSTALL_MAN)
+-install-lib:
+diff --git a/man/man2/getxattr.2 b/man/man2/getxattr.2
+deleted file mode 100644
+index 405ad89..0000000
+--- a/man/man2/getxattr.2
++++ /dev/null
+@@ -1,143 +0,0 @@
+-.\"
+-.\" Extended attributes system calls manual pages
+-.\"
+-.\" (C) Andreas Gruenbacher, February 2001
+-.\" (C) Silicon Graphics Inc, September 2001
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH GETXATTR 2 "Extended Attributes" "Dec 2001" "System calls"
+-.SH NAME
+-getxattr, lgetxattr, fgetxattr \- retrieve an extended attribute value
+-.SH SYNOPSIS
+-.fam C
+-.nf
+-.B #include <sys/types.h>
+-.B #include <attr/xattr.h>
+-.sp
+-.BI "ssize_t getxattr (const char\ *" path ", const char\ *" name ",
+-.BI "\t\t\t\t void\ *" value ", size_t " size );
+-.BI "ssize_t lgetxattr (const char\ *" path ", const char\ *" name ",
+-.BI "\t\t\t\t void\ *" value ", size_t " size );
+-.BI "ssize_t fgetxattr (int " filedes ", const char\ *" name ",
+-.BI "\t\t\t\t void\ *" value ", size_t " size );
+-.fi
+-.fam T
+-.SH DESCRIPTION
+-Extended attributes are
+-.IR name :\c
+-.I value
+-pairs associated with inodes (files, directories, symlinks, etc).
+-They are extensions to the normal attributes which are associated
+-with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-A complete overview of extended attributes concepts can be found in
+-.BR attr (5).
+-.PP
+-.B getxattr
+-retrieves the
+-.I value
+-of the extended attribute identified by
+-.I name
+-and associated with the given
+-.I path
+-in the filesystem.
+-The length of the attribute
+-.I value
+-is returned.
+-.PP
+-.B lgetxattr
+-is identical to
+-.BR getxattr ,
+-except in the case of a symbolic link, where the link itself is
+-interrogated, not the file that it refers to.
+-.PP
+-.B fgetxattr
+-is identical to
+-.BR getxattr ,
+-only the open file pointed to by
+-.I filedes
+-(as returned by
+-.BR open (2))
+-is interrogated in place of
+-.IR path .
+-.PP
+-An extended attribute
+-.I name
+-is a simple NULL-terminated string.
+-The name includes a namespace prefix \- there may be several, disjoint
+-namespaces associated with an individual inode.
+-The value of an extended attribute is a chunk of arbitrary textual or
+-binary data of specified length.
+-.PP
+-An empty buffer of
+-.I size
+-zero can be passed into these calls to return the current size of the
+-named extended attribute, which can be used to estimate the size of a
+-buffer which is sufficiently large to hold the value associated with
+-the extended attribute.
+-.PP
+-The interface is designed to allow guessing of initial buffer
+-sizes, and to enlarge buffers when the return value indicates
+-that the buffer provided was too small.
+-.SH RETURN VALUE
+-On success, a positive number is returned indicating the size of the
+-extended attribute value.
+-On failure, \-1 is returned and
+-.I errno
+-is set appropriately.
+-.PP
+-If the named attribute does not exist, or the process has no access to
+-this attribute,
+-.I errno
+-is set to ENOATTR.
+-.PP
+-If the
+-.I size
+-of the
+-.I value
+-buffer is too small to hold the result,
+-.I errno
+-is set to ERANGE.
+-.PP
+-If extended attributes are not supported by the filesystem, or are disabled,
+-.I errno
+-is set to ENOTSUP.
+-.PP
+-The errors documented for the
+-.BR stat (2)
+-system call are also applicable here.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-Please send any bug reports or comments to these addresses.
+-.SH SEE ALSO
+-.BR getfattr (1),
+-.BR setfattr (1),
+-.BR open (2),
+-.BR stat (2),
+-.BR setxattr (2),
+-.BR listxattr (2),
+-.BR removexattr (2),
+-and
+-.BR attr (5).
+diff --git a/man/man2/listxattr.2 b/man/man2/listxattr.2
+deleted file mode 100644
+index 8b4371c..0000000
+--- a/man/man2/listxattr.2
++++ /dev/null
+@@ -1,158 +0,0 @@
+-.\"
+-.\" Extended attributes system calls manual pages
+-.\"
+-.\" (C) Andreas Gruenbacher, February 2001
+-.\" (C) Silicon Graphics Inc, September 2001
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH LISTXATTR 2 "Extended Attributes" "Dec 2001" "System calls"
+-.SH NAME
+-listxattr, llistxattr, flistxattr \- list extended attribute names
+-.SH SYNOPSIS
+-.fam C
+-.nf
+-.B #include <sys/types.h>
+-.B #include <attr/xattr.h>
+-.sp
+-.BI "ssize_t listxattr (const char\ *" path ",
+-.BI "\t\t\t\t char\ *" list ", size_t " size );
+-.BI "ssize_t llistxattr (const char\ *" path ",
+-.BI "\t\t\t\t char\ *" list ", size_t " size );
+-.BI "ssize_t flistxattr (int " filedes ",
+-.BI "\t\t\t\t char\ *" list ", size_t " size );
+-.fi
+-.fam T
+-.SH DESCRIPTION
+-Extended attributes are name:value
+-pairs associated with inodes (files, directories, symlinks, etc).
+-They are extensions to the normal attributes which are associated
+-with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-A complete overview of extended attributes concepts can be found in
+-.BR attr (5).
+-.PP
+-.B listxattr
+-retrieves the
+-.I list
+-of extended attribute names associated with the given
+-.I path
+-in the filesystem.
+-The list is the set of (NULL-terminated) names, one after the other.
+-Names of extended attributes to which the calling process does not
+-have access may be omitted from the list.
+-The length of the attribute name
+-.I list
+-is returned.
+-.PP
+-.B llistxattr
+-is identical to
+-.BR listxattr ,
+-except in the case of a symbolic link, where the list of names of
+-extended attributes associated with the link itself is retrieved,
+-not the file that it refers to.
+-.I list
+-is a caller-allocated buffer of size
+-.IR size .
+-.PP
+-.B flistxattr
+-is identical to
+-.BR listxattr ,
+-only the open file pointed to by
+-.I filedes
+-(as returned by
+-.BR open (2))
+-is interrogated in place of
+-.IR path .
+-.PP
+-A single extended attribute
+-.I name
+-is a simple NULL-terminated string.
+-The name includes a namespace prefix \- there may be several, disjoint
+-namespaces associated with an individual inode.
+-.PP
+-An empty buffer of
+-.I size
+-zero can be passed into these calls to return the current size of the
+-list of extended attribute names, which can be used to estimate the
+-size of a buffer which is sufficiently large to hold the list of names.
+-.SH EXAMPLES
+-The
+-.I list
+-of names is returned as an unordered array of NULL-terminated character
+-strings (attribute names are separated by NULL characters), like this:
+-.fam C
+-.RS
+-.nf
+-user.name1\\0system.name1\\0user.name2\\0
+-.fi
+-.RE
+-.fam T
+-.P
+-Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using
+-extended attributes, might return a
+-.I list
+-like this:
+-.fam C
+-.RS
+-.nf
+-system.posix_acl_access\\0system.posix_acl_default\\0
+-.fi
+-.RE
+-.fam T
+-.SH RETURN VALUE
+-On success, a positive number is returned indicating the size of the
+-extended attribute name list.
+-On failure, \-1 is returned and
+-.I errno
+-is set appropriately.
+-.PP
+-If the
+-.I size
+-of the
+-.I list
+-buffer is too small to hold the result,
+-.I errno
+-is set to ERANGE.
+-.PP
+-If extended attributes are not supported by the filesystem, or are disabled,
+-.I errno
+-is set to ENOTSUP.
+-.PP
+-The errors documented for the
+-.BR stat (2)
+-system call are also applicable here.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-Please send any bug reports or comments to these addresses.
+-.SH SEE ALSO
+-.BR getfattr (1),
+-.BR setfattr (1),
+-.BR open (2),
+-.BR stat (2),
+-.BR getxattr (2),
+-.BR setxattr (2),
+-.BR removexattr (2),
+-and
+-.BR attr (5).
+diff --git a/man/man2/removexattr.2 b/man/man2/removexattr.2
+deleted file mode 100644
+index 2c7d934..0000000
+--- a/man/man2/removexattr.2
++++ /dev/null
+@@ -1,111 +0,0 @@
+-.\"
+-.\" Extended attributes system calls manual pages
+-.\"
+-.\" (C) Andreas Gruenbacher, February 2001
+-.\" (C) Silicon Graphics Inc, September 2001
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH REMOVEXATTR 2 "Extended Attributes" "Dec 2001" "System calls"
+-.SH NAME
+-removexattr, lremovexattr, fremovexattr \- remove an extended attribute
+-.SH SYNOPSIS
+-.fam C
+-.nf
+-.B #include <sys/types.h>
+-.B #include <attr/xattr.h>
+-.sp
+-.BI "int removexattr (const char\ *" path ", const char\ *" name );
+-.BI "int lremovexattr (const char\ *" path ", const char\ *" name );
+-.BI "int fremovexattr (int " filedes ", const char\ *" name );
+-.fi
+-.fam T
+-.SH DESCRIPTION
+-Extended attributes are
+-.IR name :\c
+-value pairs associated with inodes (files, directories, symlinks, etc).
+-They are extensions to the normal attributes which are associated
+-with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-A complete overview of extended attributes concepts can be found in
+-.BR attr (5).
+-.PP
+-.B removexattr
+-removes the extended attribute identified by
+-.I name
+-and associated with the given
+-.I path
+-in the filesystem.
+-.PP
+-.B lremovexattr
+-is identical to
+-.BR removexattr ,
+-except in the case of a symbolic link, where the extended attribute is
+-removed from the link itself, not the file that it refers to.
+-.PP
+-.B fremovexattr
+-is identical to
+-.BR removexattr ,
+-only the extended attribute is removed from the open file pointed to by
+-.I filedes
+-(as returned by
+-.BR open (2))
+-in place of
+-.IR path .
+-.PP
+-An extended attribute name is a simple NULL-terminated string.
+-The
+-.I name
+-includes a namespace prefix \- there may be several, disjoint
+-namespaces associated with an individual inode.
+-.SH RETURN VALUE
+-On success, zero is returned.
+-On failure, \-1 is returned and
+-.I errno
+-is set appropriately.
+-.PP
+-If the named attribute does not exist,
+-.I errno
+-is set to ENOATTR.
+-.PP
+-If extended attributes are not supported by the filesystem, or are disabled,
+-.I errno
+-is set to ENOTSUP.
+-.PP
+-The errors documented for the
+-.BR stat (2)
+-system call are also applicable here.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-Please send any bug reports or comments to these addresses.
+-.SH SEE ALSO
+-.BR getfattr (1),
+-.BR setfattr (1),
+-.BR open (2),
+-.BR stat (2),
+-.BR setxattr (2),
+-.BR getxattr (2),
+-.BR listxattr (2),
+-and
+-.BR attr (5).
+diff --git a/man/man2/setxattr.2 b/man/man2/setxattr.2
+deleted file mode 100644
+index b20dc9f..0000000
+--- a/man/man2/setxattr.2
++++ /dev/null
+@@ -1,143 +0,0 @@
+-.\"
+-.\" Extended attributes system calls manual pages
+-.\"
+-.\" (C) Andreas Gruenbacher, February 2001
+-.\" (C) Silicon Graphics Inc, September 2001
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH SETXATTR 2 "Extended Attributes" "Dec 2001" "System calls"
+-.SH NAME
+-setxattr, lsetxattr, fsetxattr \- set an extended attribute value
+-.SH SYNOPSIS
+-.fam C
+-.nf
+-.B #include <sys/types.h>
+-.B #include <attr/xattr.h>
+-.sp
+-.BI "int setxattr (const char\ *" path ", const char\ *" name ",
+-.BI "\t\t\t const void\ *" value ", size_t " size ", int " flags );
+-.BI "int lsetxattr (const char\ *" path ", const char\ *" name ",
+-.BI "\t\t\t const void\ *" value ", size_t " size ", int " flags );
+-.BI "int fsetxattr (int " filedes ", const char\ *" name ",
+-.BI "\t\t\t const void\ *" value ", size_t " size ", int " flags );
+-.fi
+-.fam T
+-.SH DESCRIPTION
+-Extended attributes are
+-.IR name :\c
+-.I value
+-pairs associated with inodes (files, directories, symlinks, etc).
+-They are extensions to the normal attributes which are associated
+-with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-A complete overview of extended attributes concepts can be found in
+-.BR attr (5).
+-.PP
+-.B setxattr
+-sets the
+-.I value
+-of the extended attribute identified by
+-.I name
+-and associated with the given
+-.I path
+-in the filesystem.
+-The
+-.I size
+-of the
+-.I value
+-must be specified.
+-.PP
+-.B lsetxattr
+-is identical to
+-.BR setxattr ,
+-except in the case of a symbolic link, where the extended attribute is
+-set on the link itself, not the file that it refers to.
+-.PP
+-.B fsetxattr
+-is identical to
+-.BR setxattr ,
+-only the extended attribute is set on the open file pointed to by
+-.I filedes
+-(as returned by
+-.BR open (2))
+-in place of
+-.IR path .
+-.PP
+-An extended attribute name is a simple NULL-terminated string.
+-The
+-.I name
+-includes a namespace prefix \- there may be several, disjoint
+-namespaces associated with an individual inode.
+-The
+-.I value
+-of an extended attribute is a chunk of arbitrary textual or
+-binary data of specified length.
+-.PP
+-The
+-.I flags
+-parameter can be used to refine the semantics of the operation.
+-XATTR_CREATE specifies a pure create, which fails if the named
+-attribute exists already.
+-XATTR_REPLACE specifies a pure replace operation, which fails if the
+-named attribute does not already exist.
+-By default (no flags), the extended attribute will be created if
+-need be, or will simply replace the value if the attribute exists.
+-.SH RETURN VALUE
+-On success, zero is returned.
+-On failure, \-1 is returned and
+-.I errno
+-is set appropriately.
+-.PP
+-If XATTR_CREATE is specified, and the attribute exists already,
+-.I errno
+-is set to EEXIST.
+-If XATTR_REPLACE is specified, and the attribute does not exist,
+-.I errno
+-is set to ENOATTR.
+-.PP
+-If there is insufficient space remaining to store the extended attribute,
+-.I errno
+-is set to either ENOSPC, or EDQUOT if quota enforcement was the cause.
+-.PP
+-If extended attributes are not supported by the filesystem, or are disabled,
+-.I errno
+-is set to ENOTSUP.
+-.PP
+-The errors documented for the
+-.BR stat (2)
+-system call are also applicable here.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-Please send any bug reports or comments to these addresses.
+-.SH SEE ALSO
+-.BR getfattr (1),
+-.BR setfattr (1),
+-.BR open (2),
+-.BR stat (2),
+-.BR getxattr (2),
+-.BR listxattr (2),
+-.BR removexattr (2),
+-and
+-.BR attr (5).
+--
+2.7.4
+
diff --git a/meta/recipes-support/bash-completion/bash-completion_2.4.bb b/meta/recipes-support/bash-completion/bash-completion_2.4.bb
deleted file mode 100644
index 42719f1436..0000000000
--- a/meta/recipes-support/bash-completion/bash-completion_2.4.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Programmable Completion for Bash 4"
-HOMEPAGE = "http://bash-completion.alioth.debian.org/"
-BUGTRACKER = "https://alioth.debian.org/projects/bash-completion/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SECTION = "console/utils"
-
-SRC_URI = "https://github.com/scop/bash-completion/releases/download/${PV}/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "1ea94864fb2b2446fbbdf82f10bd25df"
-SRC_URI[sha256sum] = "c0f76b5202fec9ef8ffba82f5605025ca003f27cfd7a85115f838ba5136890f6"
-UPSTREAM_CHECK_REGEX = "bash-completion-(?P<pver>(?!2008).+)\.tar"
-UPSTREAM_CHECK_URI = "https://github.com/scop/bash-completion/releases"
-
-PARALLEL_MAKE = ""
-
-inherit autotools
-
-do_install_append() {
- # compatdir
- install -d ${D}${sysconfdir}/bash_completion.d/
- echo '. ${datadir}/${BPN}/bash_completion' >${D}${sysconfdir}/bash_completion
-
- # Delete files already provided by util-linux
- local i
- for i in mount umount; do
- rm ${D}${datadir}/${BPN}/completions/$i
- done
-}
-
-RDEPENDS_${PN} = "bash"
-
-# Some recipes are providing ${PN}-bash-completion packages
-PACKAGES =+ "${PN}-extra"
-FILES_${PN}-extra = "${datadir}/${BPN}/completions/ \
- ${datadir}/${BPN}/helpers/"
-
-FILES_${PN}-dev += "${datadir}/cmake"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-support/bash-completion/bash-completion_2.9.bb b/meta/recipes-support/bash-completion/bash-completion_2.9.bb
new file mode 100644
index 0000000000..cd2c4cbba8
--- /dev/null
+++ b/meta/recipes-support/bash-completion/bash-completion_2.9.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Programmable Completion for Bash 4"
+HOMEPAGE = "http://bash-completion.alioth.debian.org/"
+BUGTRACKER = "https://alioth.debian.org/projects/bash-completion/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "console/utils"
+
+SRC_URI = "https://github.com/scop/bash-completion/releases/download/${PV}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "60139333b25c4d54ad40323b701be130"
+SRC_URI[sha256sum] = "d48fe378e731062f479c5f8802ffa9d3c40a275a19e6e0f6f6cc4b90fa12b2f5"
+UPSTREAM_CHECK_REGEX = "bash-completion-(?P<pver>(?!2008).+)\.tar"
+UPSTREAM_CHECK_URI = "https://github.com/scop/bash-completion/releases"
+
+PARALLEL_MAKE = ""
+
+inherit autotools
+
+do_install_append() {
+ # compatdir
+ install -d ${D}${sysconfdir}/bash_completion.d/
+ echo '. ${datadir}/${BPN}/bash_completion' >${D}${sysconfdir}/bash_completion
+
+}
+
+RDEPENDS_${PN} = "bash"
+
+# Some recipes are providing ${PN}-bash-completion packages
+PACKAGES =+ "${PN}-extra"
+FILES_${PN}-extra = "${datadir}/${BPN}/completions/ \
+ ${datadir}/${BPN}/helpers/"
+
+FILES_${PN}-dev += "${datadir}/cmake"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch b/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
deleted file mode 100644
index 8ef774f0f2..0000000000
--- a/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-configure.ac: add check for NO_GETCONTEXT definition
-
-Signed-off-by: Samuel Martin <s.martin49@gmail.com>
-[yann.morin.1998@free.fr: add a comment, change variable name, use
- AS_IF, remove debug traces, use AC_CHECK_FUNCS (as suggested by
- Thomas)]
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
----
-Upstream-Status: Pending
- configure.ac | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- bdwgc-7.2f.orig/configure.ac 2014-06-01 19:00:47.000000000 +0200
-+++ bdwgc-7.2f/configure.ac 2014-12-23 14:13:11.585716713 +0100
-@@ -365,6 +365,12 @@
- AC_MSG_RESULT($ac_cv_fno_strict_aliasing)
- fi
-
-+# Check for getcontext (uClibc can be configured without it, for example)
-+AC_CHECK_FUNCS([getcontext])
-+AS_IF([test "$ac_cv_func_getcontext" = "no"],
-+ [CFLAGS="$CFLAGS -DNO_GETCONTEXT"
-+ CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"])
-+
- case "$host" in
- # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
- # and unnecessary everywhere.
diff --git a/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch b/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch
deleted file mode 100644
index 4a18496650..0000000000
--- a/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Add missing header to avoid:
-
-| 1472659610.016355: ../git/pthread_stop_world.c: In function 'GC_brief_async_signal_safe_sleep':
-| 1472659610.0540252: ../git/pthread_stop_world.c:397:22: error: storage size of 'tv' isn't known
-| 1472659610.0540252: struct timeval tv;
-| 1472659610.0540252: ^~
-| 1472659610.054099: ../git/pthread_stop_world.c:397:22: warning: unused variable 'tv' [-Wunused-variable]
-| 1472659610.054099: struct timeval tv;
-| 1472659610.054099: ^~
-| 1472659610.054099: Makefile:1530: recipe for target 'pthread_stop_world.lo' failed
-
-in musl builds.
-
-Upstream-Status: Pending
-
-Index: git/pthread_stop_world.c
-===================================================================
---- git.orig/pthread_stop_world.c
-+++ git/pthread_stop_world.c
-@@ -45,6 +45,7 @@
- #include <semaphore.h>
- #include <errno.h>
- #include <unistd.h>
-+#include <sys/time.h>
- #include "atomic_ops.h"
-
- /* It's safe to call original pthread_sigmask() here. */
diff --git a/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb b/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb
deleted file mode 100644
index dcb68f0282..0000000000
--- a/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "A garbage collector for C and C++"
-
-DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\
- used as a garbage collecting replacement for C malloc or C++ new. It allows\
- you to allocate memory basically as you normally would, without explicitly\
- deallocating memory that is no longer useful. The collector automatically\
- recycles memory when it determines that it can no longer be otherwise\
- accessed.\
- The collector is also used by a number of programming language\
- implementations that either use C as intermediate code, want to facilitate\
- easier interoperation with C libraries, or just prefer the simple collector\
- interface.\
- Alternatively, the garbage collector may be used as a leak detector for C\
- or C++ programs, though that is not its primary goal.\
- Empirically, this collector works with most unmodified C programs, simply\
- by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\
- calls, and removing free calls."
-
-HOMEPAGE = "http://www.hboehm.info/gc/"
-SECTION = "devel"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://README.QUICK;md5=4f81f24ec69726c312487c2ac740e9e3"
-
-SRCREV = "8ac1d84a40eb7a431fec1b8097e3f24b48fb23fa"
-SRC_URI = "git://github.com/ivmai/bdwgc.git \
- file://0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch \
- file://musl_header_fix.patch \
- "
-
-FILES_${PN}-doc = "${datadir}"
-
-S = "${WORKDIR}/git"
-
-ARM_INSTRUCTION_SET = "arm"
-
-inherit autotools pkgconfig
-
-# by default use external libatomic-ops
-PACKAGECONFIG ??= "libatomic-ops"
-PACKAGECONFIG[libatomic-ops] = "--with-libatomic-ops=yes,--with-libatomic-ops=no,libatomic-ops"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
deleted file mode 100644
index b3298ce2db..0000000000
--- a/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Add config option --with-dev-dsp.
-
-Upstream-Status: Pending
-
-Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
----
---- a/configure.ac
-+++ b/configure.ac
-@@ -106,6 +106,16 @@ AC_ARG_WITH(python,[ --with-python[[=AR
- fi
- ])
-
-+AC_ARG_WITH(dev-dsp,[ --with-dev-dsp enables dev/dsp for entropy producing. auto for auto-detecting dev/dep on host. [[default=no]]],[
-+ if test "$withval" = yes; then
-+ AC_DEFINE([HAVE_DEV_DSP], 1)
-+ else
-+ if test "$withval" = auto; then
-+ ac_detect_dev_dsp=yes
-+ fi
-+ fi
-+ ],[ac_detect_dev_dsp=no])
-+
- # Check for expert mode
- if test "$ac_enable_expert_mode" = yes; then
- BEE_EXPERT_MODE
-@@ -464,7 +474,7 @@ linux*)
- ac_cv_have_dev_dsp=no
- fi
- ])
-- if test "$ac_cv_have_dev_dsp" = yes; then
-+ if test "$ac_cv_have_dev_dsp" = yes && test "$ac_detect_dev_dsp" = yes; then
- AC_DEFINE([HAVE_DEV_DSP], 1)
- fi
- ;;
diff --git a/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch b/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch
deleted file mode 100644
index 3e5513fce9..0000000000
--- a/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-beecrypt: enable ptest support
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Add install-ptest rules.
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- Makefile.am | 3 +++
- tests/Makefile.am | 3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index b7e7869..5076f59 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -73,3 +73,6 @@ DISTCLEANFILES = mpopt.s blowfishopt.s sha1opt.s
-
- bench:
- (cd tests && $(MAKE) $(AM_MAKEFLAGS) bench)
-+
-+install-ptest:
-+ (cd tests && $(MAKE) $(AM_MAKEFLAGS) check_PROGRAMS)
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 1604e5e..d8db8d8 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -101,3 +101,6 @@ bench: benchme benchrsa benchhf benchbc
- ./benchbc AES 128
- ./benchbc Blowfish 128
- ./benchbc Blowfish 128
-+
-+check_PROGRAMS:
-+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
---
-1.8.1.2
-
diff --git a/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch b/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch
deleted file mode 100644
index 91b1fa6ef5..0000000000
--- a/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-We are unable to run code at configure time in a cross environemnt, but as we
-control the build we can be fairly certain this dependency is met.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-JL 05/07/10
-Index: beecrypt-4.2.1/configure.ac
-===================================================================
---- beecrypt-4.2.1.orig/configure.ac 2010-11-26 17:12:25.000000000 +0800
-+++ beecrypt-4.2.1/configure.ac 2010-11-26 17:12:30.000000000 +0800
-@@ -292,32 +292,6 @@
- # Predefines and checks for C++ API support
- AH_TEMPLATE([CPPGLUE],[Define to 1 if you want to include the C++ code])
-
--if test "$ac_with_cplusplus" = yes; then
-- AC_MSG_CHECKING([for IBM's ICU library version >= 2.8])
-- AC_LANG_PUSH(C)
-- AC_RUN_IFELSE([
-- AC_LANG_PROGRAM([[#include <unicode/uversion.h>]],[[
-- #if U_ICU_VERSION_MAJOR_NUM < 2
-- exit(1);
-- #elif U_ICU_VERSION_MAJOR_NUM == 2
-- # if U_ICU_VERSION_MINOR_NUM < 8
-- exit(1);
-- # else
-- exit(0);
-- # endif
-- #else
-- exit(0);
-- #endif
-- ]])],[
-- AC_MSG_RESULT([yes])
-- ],[
-- AC_MSG_RESULT([no])
-- AC_MSG_WARN([disabling cplusplus])
-- ac_with_cplusplus=no
-- ])
-- AC_LANG_POP(C)
--fi
--
- AM_CONDITIONAL([WITH_CPLUSPLUS],[test "$ac_with_cplusplus" = yes])
-
- if test "$ac_with_cplusplus" = yes ; then
diff --git a/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch b/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch
deleted file mode 100644
index 8144e39be0..0000000000
--- a/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-
-gcc-4.7 seems to be stricter about some things, so follow
-the suggestion from the error/note information.
-
- ../../x86_64-linux-libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..
- x86_64-linux-libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -isyst
- In file included from ../../include/beecrypt/c++/util/Hashtable.h:42:0,
- from ../../include/beecrypt/c++/util/Properties.h:36,
- from Properties.cxx:25:
- ../../include/beecrypt/c++/util/AbstractSet.h: In instantiation of 'bool beecrypt::uti
- Properties.cxx:228:1: required from here
- ../../include/beecrypt/c++/util/AbstractSet.h:59:27: error: 'containsAll' was not decl
- ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: declarations in dependent b
- ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: use 'this->containsAll' ins
- ../../include/beecrypt/c++/util/AbstractSet.h: In instantiation of 'bool beecrypt::uti
- Properties.cxx:228:1: required from here
- ../../include/beecrypt/c++/util/AbstractSet.h:59:27: error: 'containsAll' was not decl
- ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: declarations in dependent b
- ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: use 'this->containsAll' ins
-
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-
-Index: beecrypt-4.2.1/include/beecrypt/c++/util/AbstractSet.h
-===================================================================
---- beecrypt-4.2.1.orig/include/beecrypt/c++/util/AbstractSet.h
-+++ beecrypt-4.2.1/include/beecrypt/c++/util/AbstractSet.h
-@@ -56,7 +56,7 @@ namespace beecrypt {
- if (c->size() != size())
- return false;
-
-- return containsAll(*c);
-+ return this->containsAll(*c);
- }
- return false;
- }
diff --git a/meta/recipes-support/beecrypt/beecrypt/fix-security.patch b/meta/recipes-support/beecrypt/beecrypt/fix-security.patch
deleted file mode 100644
index 6cb0c00205..0000000000
--- a/meta/recipes-support/beecrypt/beecrypt/fix-security.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Fix visibility of various C++ functions, inspired by a similar patch in the Fink
-project:
-http://www.mail-archive.com/fink-commits@lists.sourceforge.net/msg75742.html
-
-JL 05/07/10
-
-Upstream-Status: Pending
-
-Index: beecrypt-4.2.1/include/beecrypt/c++/beeyond/BeeCertificate.h
-===================================================================
---- beecrypt-4.2.1.orig/include/beecrypt/c++/beeyond/BeeCertificate.h 2010-11-26 17:22:57.000000000 +0800
-+++ beecrypt-4.2.1/include/beecrypt/c++/beeyond/BeeCertificate.h 2010-11-26 17:23:01.000000000 +0800
-@@ -147,13 +147,13 @@
- mutable bytearray* enc;
-
- BeeCertificate();
-- BeeCertificate(InputStream& in) throw (IOException);
-
- void encodeTBS(DataOutputStream& out) const throw (IOException);
-
- bytearray* encodeTBS() const throw (CertificateEncodingException);
-
- public:
-+ BeeCertificate(InputStream& in) throw (IOException);
- BeeCertificate(const BeeCertificate&) throw (CloneNotSupportedException);
- virtual ~BeeCertificate();
-
-Index: beecrypt-4.2.1/include/beecrypt/c++/security/Security.h
-===================================================================
---- beecrypt-4.2.1.orig/include/beecrypt/c++/security/Security.h 2010-11-26 17:20:55.000000000 +0800
-+++ beecrypt-4.2.1/include/beecrypt/c++/security/Security.h 2010-11-26 17:21:36.000000000 +0800
-@@ -61,7 +61,6 @@
- friend class SecureRandom;
- friend class Signature;
-
-- private:
- struct spi
- {
- Object* cspi;
-@@ -76,6 +75,7 @@
- static spi* getSpi(const String& algo, const String& type, const Provider&) throw (NoSuchAlgorithmException);
- static spi* getFirstSpi(const String& type);
-
-+ private:
- static const String& getKeyStoreDefault();
-
- static bool _init;
diff --git a/meta/recipes-support/beecrypt/beecrypt/run-ptest b/meta/recipes-support/beecrypt/beecrypt/run-ptest
deleted file mode 100644
index 2ee294d991..0000000000
--- a/meta/recipes-support/beecrypt/beecrypt/run-ptest
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-cd tests
-for i in `ls`; do ./$i; if [ $? -eq 0 ]; then echo "PASS: $i"; \
- else echo "FAIL: $i"; fi; done
diff --git a/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
deleted file mode 100644
index 1e626f154c..0000000000
--- a/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-# Beecrypt OE build file
-# Copyright (C) 2004-2005, Advanced Micro Devices, Inc. All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-
-SUMMARY = "A general-purpose cryptography library"
-HOMEPAGE = "http://sourceforge.net/projects/beecrypt"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/beecrypt/beecrypt-${PV}.tar.gz \
- file://disable-icu-check.patch \
- file://fix-security.patch \
- file://fix-for-gcc-4.7.patch \
- file://run-ptest \
- file://beecrypt-enable-ptest-support.patch \
- file://add-option-dev-dsp.patch \
- "
-
-SRC_URI[md5sum] = "8441c014170823f2dff97e33df55af1e"
-SRC_URI[sha256sum] = "286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d"
-
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9894370afd5dfe7d02b8d14319e729a1 \
- file://COPYING.LIB;md5=dcf3c825659e82539645da41a7908589 \
- file://include/beecrypt/beecrypt.h;endline=20;md5=47a93eef539aac237eef86297a4d71c1"
-
-PR = "r3"
-
-inherit autotools multilib_header ptest
-acpaths=""
-
-do_install_append() {
- oe_multilib_header beecrypt/gnu.h
-}
-
-EXTRA_OECONF = "--without-python --enable-shared --enable-static --disable-openmp --with-java=no"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[cplusplus] = "--with-cplusplus,--without-cplusplus,icu"
-
-FILES_${PN} = "${sysconfdir} ${libdir}/*.so.* ${libdir}/${BPN}/*.so.*"
-FILES_${PN}-dev += "${libdir}/${BPN}/*.so ${libdir}/${BPN}/*.la"
-FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_ptest () {
- mkdir ${D}${PTEST_PATH}/tests
- cp -r ${B}/tests/.libs/test* ${D}${PTEST_PATH}/tests
-}
diff --git a/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb b/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb
deleted file mode 100644
index e10f5fd341..0000000000
--- a/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Tools to generate block map (AKA bmap) and flash images using bmap"
-DESCRIPTION = "Bmap-tools - tools to generate block map (AKA bmap) and flash images using \
-bmap. Bmaptool is a generic tool for creating the block map (bmap) for a file, \
-and copying files using the block map. The idea is that large file containing \
-unused blocks, like raw system image files, can be copied or flashed a lot \
-faster with bmaptool than with traditional tools like "dd" or "cp"."
-HOMEPAGE = "http://git.infradead.org/users/dedekind/bmap-tools.git"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SRC_URI = "ftp://ftp.infradead.org/pub/${BPN}/${BPN}-${PV}.tgz"
-SRC_URI[md5sum] = "92cdad1cb4dfa0cca7176c8e22752616"
-SRC_URI[sha256sum] = "cc6c7f7dc0a37e2a32deb127308e24e6c4b80bfb54f3803c308efab02bf2d434"
-
-RDEPENDS_${PN} = "python-core python-compression"
-
-inherit setuptools
-
-BBCLASSEXTEND = "native"
-
-do_install_append_class-native() {
- sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' ${D}${bindir}/bmaptool
-}
diff --git a/meta/recipes-support/bmap-tools/bmap-tools_3.5.bb b/meta/recipes-support/bmap-tools/bmap-tools_3.5.bb
new file mode 100644
index 0000000000..7c4db85b32
--- /dev/null
+++ b/meta/recipes-support/bmap-tools/bmap-tools_3.5.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Tools to generate block map (AKA bmap) and flash images using bmap"
+DESCRIPTION = "Bmap-tools - tools to generate block map (AKA bmap) and flash images using \
+bmap. Bmaptool is a generic tool for creating the block map (bmap) for a file, \
+and copying files using the block map. The idea is that large file containing \
+unused blocks, like raw system image files, can be copied or flashed a lot \
+faster with bmaptool than with traditional tools like "dd" or "cp"."
+HOMEPAGE = "https://github.com/01org/bmap-tools"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/intel/${BPN}"
+
+SRCREV = "db7087b883bf52cbff063ad17a41cc1cbb85104d"
+S = "${WORKDIR}/git"
+PV .= "+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
+
+RDEPENDS_${PN} = "python3-core python3-compression python3-mmap python3-setuptools python3-fcntl python3-six"
+
+inherit python3native
+inherit setuptools3
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/boost/bjam-native_1.61.0.bb b/meta/recipes-support/boost/bjam-native_1.61.0.bb
deleted file mode 100644
index 32646d707b..0000000000
--- a/meta/recipes-support/boost/bjam-native_1.61.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-include boost-${PV}.inc
-
-SUMMARY = "Portable Boost.Jam build tool for boost"
-SECTION = "devel"
-
-inherit native
-
-SRC_URI += "file://bjam-native-build-bjam.debug.patch"
-
-do_compile() {
- ./bootstrap.sh --with-toolset=gcc
-}
-
-do_install() {
- install -d ${D}${bindir}/
- # install unstripped version for bjam
- install -c -m 755 bjam.debug ${D}${bindir}/bjam
-}
diff --git a/meta/recipes-support/boost/bjam-native_1.71.0.bb b/meta/recipes-support/boost/bjam-native_1.71.0.bb
new file mode 100644
index 0000000000..d843eb038c
--- /dev/null
+++ b/meta/recipes-support/boost/bjam-native_1.71.0.bb
@@ -0,0 +1,20 @@
+require boost-${PV}.inc
+
+SUMMARY = "Portable Boost.Jam build tool for boost"
+SECTION = "devel"
+
+inherit native
+
+SRC_URI += "file://0001-Build-debug-version-of-bjam.patch \
+ file://0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch \
+ "
+
+do_compile() {
+ ./bootstrap.sh --with-toolset=gcc
+}
+
+do_install() {
+ install -d ${D}${bindir}/
+ # install unstripped version for bjam
+ install -c -m 755 b2 ${D}${bindir}/bjam
+}
diff --git a/meta/recipes-support/boost/boost-1.61.0.inc b/meta/recipes-support/boost/boost-1.61.0.inc
deleted file mode 100644
index cd9d8a4950..0000000000
--- a/meta/recipes-support/boost/boost-1.61.0.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-# The Boost web site provides free peer-reviewed portable
-# C++ source libraries. The emphasis is on libraries which
-# work well with the C++ Standard Library. The libraries are
-# intended to be widely useful, and are in regular use by
-# thousands of programmers across a broad spectrum of applications.
-HOMEPAGE = "http://www.boost.org/"
-LICENSE = "BSL-1.0 & MIT & Python-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-
-BOOST_VER = "${@"_".join(d.getVar("PV", True).split("."))}"
-BOOST_MAJ = "${@"_".join(d.getVar("PV", True).split(".")[0:2])}"
-BOOST_P = "boost_${BOOST_VER}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"
-
-SRC_URI[md5sum] = "6095876341956f65f9d35939ccea1a9f"
-SRC_URI[sha256sum] = "a547bd06c2fd9a71ba1d169d9cf0339da7ebf4753849a8f7d6fdb8feee99b640"
-
-S = "${WORKDIR}/${BOOST_P}"
diff --git a/meta/recipes-support/boost/boost-1.71.0.inc b/meta/recipes-support/boost/boost-1.71.0.inc
new file mode 100644
index 0000000000..7164d0f1c5
--- /dev/null
+++ b/meta/recipes-support/boost/boost-1.71.0.inc
@@ -0,0 +1,21 @@
+# The Boost web site provides free peer-reviewed portable
+# C++ source libraries. The emphasis is on libraries which
+# work well with the C++ Standard Library. The libraries are
+# intended to be widely useful, and are in regular use by
+# thousands of programmers across a broad spectrum of applications.
+HOMEPAGE = "http://www.boost.org/"
+LICENSE = "BSL-1.0 & MIT & Python-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+BOOST_VER = "${@"_".join(d.getVar("PV").split("."))}"
+BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+SRC_URI = "https://dl.bintray.com/boostorg/release/${PV}/source/${BOOST_P}.tar.bz2"
+SRC_URI[md5sum] = "4cdf9b5c2dc01fb2b7b733d5af30e558"
+SRC_URI[sha256sum] = "d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee"
+
+UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/"
+UPSTREAM_CHECK_REGEX = "boostorg/release/(?P<pver>.*)/source/"
+
+S = "${WORKDIR}/${BOOST_P}"
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 7637a4e932..e15dce4e1d 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -2,6 +2,8 @@ SUMMARY = "Free peer-reviewed portable C++ source libraries"
SECTION = "libs"
DEPENDS = "bjam-native zlib bzip2"
+CVE_PRODUCT = "boost:boost"
+
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
@@ -9,6 +11,7 @@ BOOST_LIBS = "\
atomic \
chrono \
container \
+ contract \
date_time \
exception \
filesystem \
@@ -20,7 +23,6 @@ BOOST_LIBS = "\
random \
regex \
serialization \
- signals \
system \
timer \
test \
@@ -32,22 +34,27 @@ BOOST_LIBS = "\
BOOST_LIBS_append_x86 = " context coroutine"
BOOST_LIBS_append_x86-64 = " context coroutine"
BOOST_LIBS_append_powerpc = " context coroutine"
+BOOST_LIBS_append_arm = " context coroutine"
+BOOST_LIBS_append_aarch64 = " context coroutine"
+# need consistent settings for native builds (x86 override not applied for native)
+BOOST_LIBS_remove_class-native = " context coroutine"
+# does not compile
+BOOST_LIBS_remove_mips16e = "wave"
# optional libraries
-PACKAGECONFIG ??= "locale"
+PACKAGECONFIG ??= "locale python"
PACKAGECONFIG[locale] = ",,icu"
PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
PACKAGECONFIG[mpi] = ",,mpich"
-PACKAGECONFIG[python] = ",,python python3"
+PACKAGECONFIG[python] = ",,python3"
BOOST_LIBS += "\
- ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)} \
+ ${@bb.utils.filter('PACKAGECONFIG', 'locale python', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
- bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi', '', d), d)} \
- ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \
+ bb.utils.filter('PACKAGECONFIG', 'mpi', d), d)} \
"
-inherit python-dir
+inherit python3-dir
PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
# Make a package for each library, plus -dev
@@ -55,25 +62,17 @@ PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
python __anonymous () {
packages = []
extras = []
- for lib in d.getVar('BOOST_LIBS', True).split( ):
- # BJAM does not know '--with-python3' (only --with-python)
- if lib != "python3":
- extras.append("--with-%s" % lib)
+ for lib in d.getVar('BOOST_LIBS').split():
+ extras.append("--with-%s" % lib)
pkg = "boost-%s" % lib.replace("_", "-")
packages.append(pkg)
- if lib == "python":
- # special: python*.so matches python3.so !!
- if not d.getVar("FILES_%s" % pkg, True):
- d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s.so.*" % lib)
- else:
- if not d.getVar("FILES_%s" % pkg, True):
- d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib)
+ if not d.getVar("FILES_%s" % pkg):
+ d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib)
d.setVar("BOOST_PACKAGES", " ".join(packages))
d.setVar("BJAM_EXTRA", " ".join(extras))
}
# Override the contents of specific packages
-FILES_${PN}-graph = "${libdir}/libboost_graph.so.*"
FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"
@@ -84,15 +83,15 @@ FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
# -dev last to pick up the remaining stuff
PACKAGES += "${PN}-dev ${PN}-staticdev"
-FILES_${PN} = ""
-FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so"
+FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/cmake"
FILES_${PN}-staticdev = "${libdir}/libboost_*.a"
# "boost" is a metapackage which pulls in all boost librabries
PACKAGES += "${PN}"
+FILES_${PN} = ""
+ALLOW_EMPTY_${PN} = "1"
RRECOMMENDS_${PN} += "${BOOST_PACKAGES}"
RRECOMMENDS_${PN}_class-native = ""
-ALLOW_EMPTY_${PN} = "1"
# to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
TARGET_CC_ARCH += "${LDFLAGS}"
@@ -138,31 +137,8 @@ BJAM_TOOLS = "--ignore-site-config \
'--layout=system' \
"
-# use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater parallelism causes bjam to segfault or to ignore -j
-# https://svn.boost.org/trac/boost/ticket/7634
-def get_boost_parallel_make(d):
- pm = d.getVar('PARALLEL_MAKE', True)
- if pm:
- # look for '-j' and throw other options (e.g. '-l') away
- # because they might have different meaning in bjam
- pm = pm.split()
- while pm:
- v = None
- opt = pm.pop(0)
- if opt == '-j':
- v = pm.pop(0)
- elif opt.startswith('-j'):
- v = opt[2:].strip()
- else:
- v = None
-
- if v:
- v = min(64, int(v))
- return '-j' + str(v)
-
- return ""
-
-BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(d)}"
+# use PARALLEL_MAKE to speed up the build
+BOOST_PARALLEL_MAKE = "${@oe.utils.parallel_make_argument(d, '-j%d')}"
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \
${BJAM_TOOLS} \
-sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \
@@ -173,34 +149,46 @@ BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \
# Native compilation of bzip2 isn't working
BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1'
+# Adjust the build for x32
+BJAM_OPTS_append_x86-x32 = " abi=x32 address-model=64"
+
+# cross compiling for arm fails to detect abi, so provide some help
+BJAM_OPTS_append_arm = " abi=aapcs architecture=arm"
+BJAM_OPTS_append_aarch64 = " abi=aapcs address-model=64 architecture=arm"
+
do_configure() {
cp -f ${S}/boost/config/platform/linux.hpp ${S}/boost/config/platform/linux-gnueabi.hpp
# D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
rm -f ${WORKDIR}/user-config.jam
echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam
- echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${WORKDIR}/user-config.jam
- echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${WORKDIR}/user-config.jam
+
+ # If we want Python then we need to tell Boost *exactly* where to find it
+ if ${@bb.utils.contains('BOOST_LIBS', 'python', 'true', 'false', d)}; then
+ echo "using python : ${PYTHON_BASEVERSION} : ${STAGING_DIR_HOST}${bindir}/python3 : ${STAGING_DIR_HOST}${includedir}/${PYTHON_DIR}${PYTHON_ABI} : ${STAGING_DIR_HOST}${libdir}/${PYTHON_DIR} ;" >> ${WORKDIR}/user-config.jam
+ fi
if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false', d)}; then
echo "using mpi : : <find-shared-library>mpi ;" >> ${WORKDIR}/user-config.jam
fi
- CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
- sed -i '/^using python/d' ${S}/project-config.jam
+ CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc
+
+ # Boost can't be trusted to find Python on it's own, so remove any mention
+ # of it from the boost configuration
+ sed -i '/using python/d' ${S}/project-config.jam
}
do_compile() {
- set -ex
rm -rf ${S}/${TARGET_SYS}
bjam ${BJAM_OPTS} --prefix=${prefix} \
--exec-prefix=${exec_prefix} \
--libdir=${libdir} \
- --includedir=${includedir}
+ --includedir=${includedir} \
+ --debug-configuration
}
do_install() {
- set -ex
bjam ${BJAM_OPTS} \
--libdir=${D}${libdir} \
--includedir=${D}${includedir} \
diff --git a/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch b/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch
new file mode 100644
index 0000000000..169906344f
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch
@@ -0,0 +1,100 @@
+From 8845a786598f1d9e83aa1b7d2966b0d1eb765ba0 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 10:14:31 -0700
+Subject: [PATCH 1/3] Apply boost-1.62.0-no-forced-flags.patch
+
+Upstream-Status: Inappropriate
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ libs/log/build/Jamfile.v2 | 4 ++--
+ libs/log/config/x86-ext/Jamfile.jam | 16 ++++++++--------
+ libs/log/src/dump_avx2.cpp | 4 ++++
+ libs/log/src/dump_ssse3.cpp | 4 ++++
+ 4 files changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/libs/log/build/Jamfile.v2 b/libs/log/build/Jamfile.v2
+index 4abbdbc..b3016fc 100644
+--- a/libs/log/build/Jamfile.v2
++++ b/libs/log/build/Jamfile.v2
+@@ -373,7 +373,7 @@ rule avx2-targets-cond ( properties * )
+ }
+ else if <toolset>clang in $(properties)
+ {
+- result = <cxxflags>"-mavx -mavx2" ;
++ result = <cxxflags> ;
+ }
+ else if <toolset>intel in $(properties)
+ {
+@@ -383,7 +383,7 @@ rule avx2-targets-cond ( properties * )
+ }
+ else
+ {
+- result = <cxxflags>"-xCORE-AVX2 -fabi-version=0" ;
++ result = <cxxflags>"-fabi-version=0" ;
+ }
+ }
+ else if <toolset>msvc in $(properties)
+diff --git a/libs/log/config/x86-ext/Jamfile.jam b/libs/log/config/x86-ext/Jamfile.jam
+index 0e9695a..dcc394d 100644
+--- a/libs/log/config/x86-ext/Jamfile.jam
++++ b/libs/log/config/x86-ext/Jamfile.jam
+@@ -15,19 +15,19 @@ project /boost/log/x86-extensions
+
+ obj ssse3 : ssse3.cpp
+ :
+- <toolset>gcc:<cxxflags>"-msse -msse2 -msse3 -mssse3"
+- <toolset>clang:<cxxflags>"-msse -msse2 -msse3 -mssse3"
+- <toolset>intel-linux:<cxxflags>"-xSSSE3"
+- <toolset>intel-darwin:<cxxflags>"-xSSSE3"
++ <toolset>gcc:<cxxflags>
++ <toolset>clang:<cxxflags>
++ <toolset>intel-linux:<cxxflags>
++ <toolset>intel-darwin:<cxxflags>
+ <toolset>intel-win:<cxxflags>"/QxSSSE3"
+ ;
+
+ obj avx2 : avx2.cpp
+ :
+- <toolset>gcc:<cxxflags>"-mavx -mavx2 -fabi-version=0"
+- <toolset>clang:<cxxflags>"-mavx -mavx2"
+- <toolset>intel-linux:<cxxflags>"-xCORE-AVX2 -fabi-version=0"
+- <toolset>intel-darwin:<cxxflags>"-xCORE-AVX2 -fabi-version=0"
++ <toolset>gcc:<cxxflags>"-fabi-version=0"
++ <toolset>clang:<cxxflags>
++ <toolset>intel-linux:<cxxflags>"-fabi-version=0"
++ <toolset>intel-darwin:<cxxflags>"-fabi-version=0"
+ <toolset>intel-win:<cxxflags>"/arch:CORE-AVX2"
+ <toolset>msvc:<cxxflags>"/arch:AVX"
+ ;
+diff --git a/libs/log/src/dump_avx2.cpp b/libs/log/src/dump_avx2.cpp
+index 4ab1250..610fc6d 100644
+--- a/libs/log/src/dump_avx2.cpp
++++ b/libs/log/src/dump_avx2.cpp
+@@ -22,6 +22,10 @@
+ #include <boost/cstdint.hpp>
+ #include <boost/log/detail/header.hpp>
+
++#if !defined(__AVX2__)
++#error "AVX2 Unsupported!"
++#endif
++
+ #if defined(__x86_64) || defined(__x86_64__) || \
+ defined(__amd64__) || defined(__amd64) || \
+ defined(_M_X64)
+diff --git a/libs/log/src/dump_ssse3.cpp b/libs/log/src/dump_ssse3.cpp
+index 1325b49..60d4112 100644
+--- a/libs/log/src/dump_ssse3.cpp
++++ b/libs/log/src/dump_ssse3.cpp
+@@ -22,6 +22,10 @@
+ #include <boost/cstdint.hpp>
+ #include <boost/log/detail/header.hpp>
+
++#if !defined(__SSSE3__)
++#error "SSSE3 Unsupported!"
++#endif
++
+ #if defined(__x86_64) || defined(__x86_64__) || \
+ defined(__amd64__) || defined(__amd64) || \
+ defined(_M_X64)
+--
+2.8.0
diff --git a/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch b/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
new file mode 100644
index 0000000000..68d6e6417f
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
@@ -0,0 +1,153 @@
+From f4d3fad43d67808d71325ba0df1457555b9a0086 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 18 Dec 2018 15:42:57 +0100
+Subject: [PATCH] Don't set up arch/instruction-set flags, we do that ourselves
+
+Upstream-Status: Inappropriate
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ tools/build/src/tools/gcc.jam | 132 ----------------------------------
+ 1 file changed, 132 deletions(-)
+
+diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
+index b9bb9cf2a..c7e3cf3fe 100644
+--- a/tools/build/src/tools/gcc.jam
++++ b/tools/build/src/tools/gcc.jam
+@@ -1180,135 +1180,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
+ <architecture>$(architecture)/<instruction-set>$(instruction-set)
+ : $(values) ;
+ }
+-
+-
+-# Set architecture/instruction-set options.
+-#
+-# x86 and compatible
+-# The 'native' option appeared in gcc 4.2 so we cannot safely use it as default.
+-# Use i686 instead for 32-bit.
+-toolset.flags gcc OPTIONS <architecture>x86/<address-model>32/<instruction-set> : -march=i686 ;
+-cpu-flags gcc OPTIONS : x86 : native : -march=native ;
+-cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ;
+-cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ;
+-cpu-flags gcc OPTIONS : x86 : i686 : -march=i686 ;
+-cpu-flags gcc OPTIONS : x86 : pentium : -march=pentium ;
+-cpu-flags gcc OPTIONS : x86 : pentium-mmx : -march=pentium-mmx ;
+-cpu-flags gcc OPTIONS : x86 : pentiumpro : -march=pentiumpro ;
+-cpu-flags gcc OPTIONS : x86 : pentium2 : -march=pentium2 ;
+-cpu-flags gcc OPTIONS : x86 : pentium3 : -march=pentium3 ;
+-cpu-flags gcc OPTIONS : x86 : pentium3m : -march=pentium3m ;
+-cpu-flags gcc OPTIONS : x86 : pentium-m : -march=pentium-m ;
+-cpu-flags gcc OPTIONS : x86 : pentium4 : -march=pentium4 ;
+-cpu-flags gcc OPTIONS : x86 : pentium4m : -march=pentium4m ;
+-cpu-flags gcc OPTIONS : x86 : prescott : -march=prescott ;
+-cpu-flags gcc OPTIONS : x86 : nocona : -march=nocona ;
+-cpu-flags gcc OPTIONS : x86 : core2 : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe-l : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : allendale : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : wolfdale : -march=core2 -msse4.1 ;
+-cpu-flags gcc OPTIONS : x86 : merom : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : merom-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : kentsfield : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : kentsfield-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : yorksfield : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : penryn : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : corei7 : -march=corei7 ;
+-cpu-flags gcc OPTIONS : x86 : nehalem : -march=corei7 ;
+-cpu-flags gcc OPTIONS : x86 : corei7-avx : -march=corei7-avx ;
+-cpu-flags gcc OPTIONS : x86 : sandy-bridge : -march=corei7-avx ;
+-cpu-flags gcc OPTIONS : x86 : core-avx-i : -march=core-avx-i ;
+-cpu-flags gcc OPTIONS : x86 : ivy-bridge : -march=core-avx-i ;
+-cpu-flags gcc OPTIONS : x86 : haswell : -march=core-avx-i -mavx2 -mfma -mbmi -mbmi2 -mlzcnt ;
+-cpu-flags gcc OPTIONS : x86 : broadwell : -march=broadwell ;
+-cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ;
+-cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ;
+-cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ;
+-cpu-flags gcc OPTIONS : x86 : icelake : -march=icelake ;
+-cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
+-cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
+-cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
+-cpu-flags gcc OPTIONS : x86 : athlon : -march=athlon ;
+-cpu-flags gcc OPTIONS : x86 : athlon-tbird : -march=athlon-tbird ;
+-cpu-flags gcc OPTIONS : x86 : athlon-4 : -march=athlon-4 ;
+-cpu-flags gcc OPTIONS : x86 : athlon-xp : -march=athlon-xp ;
+-cpu-flags gcc OPTIONS : x86 : athlon-mp : -march=athlon-mp ;
+-##
+-cpu-flags gcc OPTIONS : x86 : k8 : -march=k8 ;
+-cpu-flags gcc OPTIONS : x86 : opteron : -march=opteron ;
+-cpu-flags gcc OPTIONS : x86 : athlon64 : -march=athlon64 ;
+-cpu-flags gcc OPTIONS : x86 : athlon-fx : -march=athlon-fx ;
+-cpu-flags gcc OPTIONS : x86 : k8-sse3 : -march=k8-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : opteron-sse3 : -march=opteron-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : athlon64-sse3 : -march=athlon64-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : amdfam10 : -march=amdfam10 ;
+-cpu-flags gcc OPTIONS : x86 : barcelona : -march=barcelona ;
+-cpu-flags gcc OPTIONS : x86 : bdver1 : -march=bdver1 ;
+-cpu-flags gcc OPTIONS : x86 : bdver2 : -march=bdver2 ;
+-cpu-flags gcc OPTIONS : x86 : bdver3 : -march=bdver3 ;
+-cpu-flags gcc OPTIONS : x86 : bdver4 : -march=bdver4 ;
+-cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ;
+-cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ;
+-cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ;
+-cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ;
+-cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
+-cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
+-cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
+-##
+-cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
+-# Sparc
+-cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 : default ;
+-cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
+-cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ;
+-cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ;
+-cpu-flags gcc OPTIONS : sparc : sparclite : -mcpu=sparclite ;
+-cpu-flags gcc OPTIONS : sparc : hypersparc : -mcpu=hypersparc ;
+-cpu-flags gcc OPTIONS : sparc : sparclite86x : -mcpu=sparclite86x ;
+-cpu-flags gcc OPTIONS : sparc : f930 : -mcpu=f930 ;
+-cpu-flags gcc OPTIONS : sparc : f934 : -mcpu=f934 ;
+-cpu-flags gcc OPTIONS : sparc : sparclet : -mcpu=sparclet ;
+-cpu-flags gcc OPTIONS : sparc : tsc701 : -mcpu=tsc701 ;
+-cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ;
+-cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ;
+-cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ;
+-# RS/6000 & PowerPC
+-cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ;
+-cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ;
+-cpu-flags gcc OPTIONS : power : 601 : -mcpu=601 ;
+-cpu-flags gcc OPTIONS : power : 602 : -mcpu=602 ;
+-cpu-flags gcc OPTIONS : power : 603 : -mcpu=603 ;
+-cpu-flags gcc OPTIONS : power : 603e : -mcpu=603e ;
+-cpu-flags gcc OPTIONS : power : 604 : -mcpu=604 ;
+-cpu-flags gcc OPTIONS : power : 604e : -mcpu=604e ;
+-cpu-flags gcc OPTIONS : power : 620 : -mcpu=620 ;
+-cpu-flags gcc OPTIONS : power : 630 : -mcpu=630 ;
+-cpu-flags gcc OPTIONS : power : 740 : -mcpu=740 ;
+-cpu-flags gcc OPTIONS : power : 7400 : -mcpu=7400 ;
+-cpu-flags gcc OPTIONS : power : 7450 : -mcpu=7450 ;
+-cpu-flags gcc OPTIONS : power : 750 : -mcpu=750 ;
+-cpu-flags gcc OPTIONS : power : 801 : -mcpu=801 ;
+-cpu-flags gcc OPTIONS : power : 821 : -mcpu=821 ;
+-cpu-flags gcc OPTIONS : power : 823 : -mcpu=823 ;
+-cpu-flags gcc OPTIONS : power : 860 : -mcpu=860 ;
+-cpu-flags gcc OPTIONS : power : 970 : -mcpu=970 ;
+-cpu-flags gcc OPTIONS : power : 8540 : -mcpu=8540 ;
+-cpu-flags gcc OPTIONS : power : power : -mcpu=power ;
+-cpu-flags gcc OPTIONS : power : power2 : -mcpu=power2 ;
+-cpu-flags gcc OPTIONS : power : power3 : -mcpu=power3 ;
+-cpu-flags gcc OPTIONS : power : power4 : -mcpu=power4 ;
+-cpu-flags gcc OPTIONS : power : power5 : -mcpu=power5 ;
+-cpu-flags gcc OPTIONS : power : powerpc : -mcpu=powerpc ;
+-cpu-flags gcc OPTIONS : power : powerpc64 : -mcpu=powerpc64 ;
+-cpu-flags gcc OPTIONS : power : rios : -mcpu=rios ;
+-cpu-flags gcc OPTIONS : power : rios1 : -mcpu=rios1 ;
+-cpu-flags gcc OPTIONS : power : rios2 : -mcpu=rios2 ;
+-cpu-flags gcc OPTIONS : power : rsc : -mcpu=rsc ;
+-cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ;
+-cpu-flags gcc OPTIONS : s390x : z196 : -march=z196 ;
+-cpu-flags gcc OPTIONS : s390x : zEC12 : -march=zEC12 ;
+-cpu-flags gcc OPTIONS : s390x : z13 : -march=z13 ;
+-cpu-flags gcc OPTIONS : s390x : z14 : -march=z14 ;
+-# AIX variant of RS/6000 & PowerPC
+-toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ;
diff --git a/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch b/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
deleted file mode 100644
index 8a85aac18f..0000000000
--- a/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 40192301130dcd913aa6d9cb9dba9e5f8dbd9d16 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Wed, 24 Aug 2016 21:01:43 +0100
-Subject: [PATCH 1/4] use POSIX poll.h instead of sys/poll.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-POSIX specifies that <poll.h> is the correct header to
-include for poll()
- http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html
-whereas <sys/poll.h> is only needed for ancient glibc (<2.3),
-so let's follow POSIX instead.
-
-As a side-effect, this silences a warning when compiling
-against the musl C-library:
-
-In file included from ./boost/asio/detail/socket_types.hpp:61:0,
- from ./boost/asio/ip/address_v4.hpp:21,
- from ./boost/asio/ip/address.hpp:21,
- from libs/log/src/init_from_settings.cpp:65:
-<sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
- #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
- ^~~~~~~
-
-etc.
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
-Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/12419
- boost/asio/detail/socket_types.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp
-index e8c7109..7e65d3c 100644
---- a/boost/asio/detail/socket_types.hpp
-+++ b/boost/asio/detail/socket_types.hpp
-@@ -58,7 +58,7 @@
- #else
- # include <sys/ioctl.h>
- # if !defined(__SYMBIAN32__)
--# include <sys/poll.h>
-+# include <poll.h>
- # endif
- # include <sys/types.h>
- # include <sys/stat.h>
---
-2.9.3
-
diff --git a/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch b/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch
new file mode 100644
index 0000000000..78b19225d4
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch
@@ -0,0 +1,42 @@
+From 59402e3a61d14eb7ce8c2019ea1a87ad4bd28605 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Thu, 14 Nov 2019 10:13:53 +0800
+Subject: [PATCH] dont setup compiler flags -m32/-m64
+
+We don't want these to be setup by boost as we pass our own flags.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ tools/build/src/tools/gcc.jam | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
+index c7e3cf3..24486e0 100644
+--- a/tools/build/src/tools/gcc.jam
++++ b/tools/build/src/tools/gcc.jam
+@@ -430,20 +430,6 @@ local rule compile-link-flags ( * )
+ }
+
+ {
+- # Handle address-model
+- compile-link-flags <target-os>aix/<address-model>32 : -maix32 ;
+- compile-link-flags <target-os>aix/<address-model>64 : -maix64 ;
+-
+- compile-link-flags <target-os>hpux/<address-model>32 : -milp32 ;
+- compile-link-flags <target-os>hpux/<address-model>64 : -mlp64 ;
+-
+- local generic-os = [ set.difference $(all-os) : aix hpux ] ;
+- local arch = power sparc x86 ;
+- compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>32 : -m32 ;
+- compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>64 : -m64 ;
+-}
+-
+-{
+ # Handle threading
+ local rule threading-flags ( * )
+ {
+--
+2.7.4
+
diff --git a/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch b/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch
deleted file mode 100644
index 569c987336..0000000000
--- a/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From 5c349a1c391c9ce171a1c80f5164fae764f27dba Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Wed, 24 Aug 2016 20:58:59 +0100
-Subject: [PATCH 2/4] boost/test/execution_monitor.hpp: fix mips soft float
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-gcc.compile.c++ <builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o
-
- "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pedantic -pthread -fPIC -Wno-variadic-macros -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_TEST_DYN_LINK=1 -DBOOST_TIMER_DYN_LINK=1 -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o" "libs/test/src/execution_monitor.cpp"
-
-In file included from ./boost/test/impl/execution_monitor.ipp:31:0,
- from libs/test/src/execution_monitor.cpp:16:
-./boost/test/execution_monitor.hpp:491:27: error: 'FE_DIVBYZERO' was not declared in this scope
- BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
- ^~~~~~~~~~~~
-./boost/test/execution_monitor.hpp:492:27: error: 'FE_INEXACT' was not declared in this scope
- BOOST_FPE_INEXACT = FE_INEXACT,
- ^~~~~~~~~~
-./boost/test/execution_monitor.hpp:493:27: error: 'FE_INVALID' was not declared in this scope
- BOOST_FPE_INVALID = FE_INVALID,
- ^~~~~~~~~~
-./boost/test/execution_monitor.hpp:494:27: error: 'FE_OVERFLOW' was not declared in this scope
- BOOST_FPE_OVERFLOW = FE_OVERFLOW,
- ^~~~~~~~~~~
-./boost/test/execution_monitor.hpp:495:27: error: 'FE_UNDERFLOW' was not declared in this scope
- BOOST_FPE_UNDERFLOW = FE_UNDERFLOW,
- ^~~~~~~~~~~~
-
-The reason is that some (notably FPU-less) architectures,
-including mips*-nf, don't define/implement some of the
-floating point constants, even though fenv.h is
-available.
-
-The key point is:
- A fully standards conforming fenv.h does not have to
- define any FE_* macros, and if it does define them,
- then it defines macros only for the FP exceptions it
- actually supports.
-
-So correct usage requires a triple check:
-1) Check BOOST_NO_FENV_H to see if the header is supported.
-2) Include the header and then check FE_ALL_EXCEPT to see
- if any FP exceptions are supported.
-3) Before using the individual FE_* macros, you need to
- check for their existence too as not all may be
- supported.
-
-https://svn.boost.org/trac/boost/ticket/11756
-
-Other projects have similar issues, e.g. pixman, and
-apply similar work-arounds:
- https://lists.freedesktop.org/archives/pixman/2014-February/003172.html
-
-Architectures are notably also allowed to define FE_ALL_EXCEPT to 0!
-Keeping this in mind, and knowing that the compiler will eliminate
-code that can't be executed, we can change BOOST_FPE_ALL to be 0 for
-the case of compiling using Clang and/or fenv.h being unavailable
-as well, which allows simplification of the #ifdef's in
-execution_monitor.ipp a bit.
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
-Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/11756
- boost/test/execution_monitor.hpp | 26 +++++++++++++++++++++++++-
- boost/test/impl/execution_monitor.ipp | 10 ++++++++--
- 2 files changed, 33 insertions(+), 3 deletions(-)
-
-diff --git a/boost/test/execution_monitor.hpp b/boost/test/execution_monitor.hpp
-index 0eee497..44fe59d 100644
---- a/boost/test/execution_monitor.hpp
-+++ b/boost/test/execution_monitor.hpp
-@@ -486,15 +486,39 @@ enum masks {
- BOOST_FPE_ALL = MCW_EM,
- #elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \
- || defined(__ARM_PCS)
-- BOOST_FPE_ALL = 1,
-+ BOOST_FPE_ALL = 0,
- #else
-+#if defined(FE_DIVBYZERO)
- BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
-+#else
-+ BOOST_FPE_DIVBYZERO = 0,
-+#endif
-+#if defined(FE_INEXACT)
- BOOST_FPE_INEXACT = FE_INEXACT,
-+#else
-+ BOOST_FPE_INEXACT = 0,
-+#endif
-+#if defined(FE_INVALID)
- BOOST_FPE_INVALID = FE_INVALID,
-+#else
-+ BOOST_FPE_INVALID = 0,
-+#endif
-+#if defined(FE_OVERFLOW)
- BOOST_FPE_OVERFLOW = FE_OVERFLOW,
-+#else
-+ BOOST_FPE_OVERFLOW = 0,
-+#endif
-+#if defined(FE_UNDERFLOW)
- BOOST_FPE_UNDERFLOW = FE_UNDERFLOW,
-+#else
-+ BOOST_FPE_UNDERFLOW = 0,
-+#endif
-
-+#if defined(FE_ALL_EXCEPT)
- BOOST_FPE_ALL = FE_ALL_EXCEPT,
-+#else
-+ BOOST_FPE_ALL = 0,
-+#endif
- #endif
- BOOST_FPE_INV = BOOST_FPE_ALL+1
- };
-diff --git a/boost/test/impl/execution_monitor.ipp b/boost/test/impl/execution_monitor.ipp
-index f7fc8ea..d1088b9 100644
---- a/boost/test/impl/execution_monitor.ipp
-+++ b/boost/test/impl/execution_monitor.ipp
-@@ -1381,7 +1381,10 @@ enable( unsigned mask )
- #endif
-
- return ~old_cw & BOOST_FPE_ALL;
--#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
-+#elif defined(__GLIBC__) && defined(__USE_GNU)
-+ if (BOOST_FPE_ALL == 0)
-+ /* Not Implemented */
-+ return 0;
- feclearexcept(BOOST_FPE_ALL);
- int res = feenableexcept( mask );
- return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
-@@ -1418,7 +1421,10 @@ disable( unsigned mask )
- #endif
-
- return ~old_cw & BOOST_FPE_ALL;
--#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
-+#elif defined(__GLIBC__) && defined(__USE_GNU)
-+ if (BOOST_FPE_ALL == 0)
-+ /* Not Implemented */
-+ return BOOST_FPE_INV;
- feclearexcept(BOOST_FPE_ALL);
- int res = fedisableexcept( mask );
- return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
---
-2.9.3
-
diff --git a/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch b/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch
deleted file mode 100644
index 2b48d0d5dd..0000000000
--- a/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 4f19d72ca94418431e068cfd4ffb96ed9b289f6c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Wed, 24 Aug 2016 17:34:59 +0100
-Subject: [PATCH 3/4] smart_ptr: mips assembly doesn't compile in mips16e mode
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-gcc.compile.c++ <builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o
-
- "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp"
-
-{standard input}: Assembler messages:
-{standard input}:17603: Warning: the `dsp' extension requires MIPS32 revision 2 or greater
-{standard input}:17604: Error: unrecognized opcode `ll $3,4($16)'
-{standard input}:17606: Error: unrecognized opcode `sc $2,4($16)'
-{standard input}:17734: Error: unrecognized opcode `ll $3,8($16)'
-{standard input}:17736: Error: unrecognized opcode `sc $2,8($16)'
-{standard input}:18084: Error: unrecognized opcode `ll $3,4($4)'
-{standard input}:18086: Error: unrecognized opcode `sc $2,4($4)'
-{standard input}:18318: Error: unrecognized opcode `ll $3,8($4)'
-{standard input}:18320: Error: unrecognized opcode `sc $2,8($4)'
-{standard input}:19921: Error: unrecognized opcode `ll $3,4($2)'
-{standard input}:19923: Error: unrecognized opcode `sc $3,4($2)'
-{standard input}:20199: Error: unrecognized opcode `ll $4,4($16)'
-{standard input}:20201: Error: unrecognized opcode `sc $2,4($16)'
-{standard input}:23392: Error: unrecognized opcode `ll $4,8($16)'
-{standard input}:23394: Error: unrecognized opcode `sc $2,8($16)'
-...failed updating 1 target...
-
-boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
-contains hand-written MIPS assembly, which is not compatible
-with the MIPS16e instruction set.
-
-By not using this file in MIPS16e mode, we fallback to using
-g++ 4.1+ __sync intrinsics (__sync_fetch_and_add() and
-__sync_val_compare_and_swap()) which are working fine.
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
-Upstream-Status: Backport https://svn.boost.org/trac/boost/ticket/12418
- boost/smart_ptr/detail/sp_counted_base.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp
-index 0addf07..0995ca8 100644
---- a/boost/smart_ptr/detail/sp_counted_base.hpp
-+++ b/boost/smart_ptr/detail/sp_counted_base.hpp
-@@ -65,7 +65,7 @@
- #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX )
- # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp>
-
--#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__)
-+#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 )
- # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp>
-
- #elif defined( BOOST_SP_HAS_SYNC )
---
-2.9.3
-
diff --git a/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch b/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch
deleted file mode 100644
index ab7826ba26..0000000000
--- a/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From c234cc557f60729e071d6da59747c1a9289555c5 Mon Sep 17 00:00:00 2001
-From: Peter Dimov <pdimov@pdimov.com>
-Date: Sun, 28 Aug 2016 21:28:21 +0300
-Subject: [PATCH 4/4] Use <atomic> by default when BOOST_NO_CXX11_HDR_ATOMIC is
- not defined
-
----
-Upstream-Status: Backport [https://github.com/boostorg/smart_ptr/commit/20fedcff2ca3143503ec4e876d47745ab0ec7b0c]
-Signed-off-by: André Draszik <git@andred.net>
- boost/smart_ptr/detail/atomic_count.hpp | 3 +++
- boost/smart_ptr/detail/sp_counted_base.hpp | 3 +++
- boost/smart_ptr/detail/spinlock.hpp | 3 +++
- 3 files changed, 9 insertions(+)
-
-diff --git a/boost/smart_ptr/detail/atomic_count.hpp b/boost/smart_ptr/detail/atomic_count.hpp
-index 8aefd44..6e4f71a 100644
---- a/boost/smart_ptr/detail/atomic_count.hpp
-+++ b/boost/smart_ptr/detail/atomic_count.hpp
-@@ -73,6 +73,9 @@
- #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
- # include <boost/smart_ptr/detail/atomic_count_nt.hpp>
-
-+#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
-+# include <boost/smart_ptr/detail/atomic_count_std_atomic.hpp>
-+
- #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined( __PATHSCALE__ )
- # include <boost/smart_ptr/detail/atomic_count_gcc_x86.hpp>
-
-diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp
-index 0995ca8..83ede23 100644
---- a/boost/smart_ptr/detail/sp_counted_base.hpp
-+++ b/boost/smart_ptr/detail/sp_counted_base.hpp
-@@ -44,6 +44,9 @@
- #elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS )
- # include <boost/smart_ptr/detail/sp_counted_base_clang.hpp>
-
-+#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
-+# include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp>
-+
- #elif defined( __SNC__ )
- # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp>
-
-diff --git a/boost/smart_ptr/detail/spinlock.hpp b/boost/smart_ptr/detail/spinlock.hpp
-index 19f93d7..0b618df 100644
---- a/boost/smart_ptr/detail/spinlock.hpp
-+++ b/boost/smart_ptr/detail/spinlock.hpp
-@@ -43,6 +43,9 @@
- #elif defined( BOOST_SP_USE_PTHREADS )
- # include <boost/smart_ptr/detail/spinlock_pt.hpp>
-
-+#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
-+# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
-+
- #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
- # include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
-
---
-2.9.3
-
diff --git a/meta/recipes-support/boost/boost/consider-hardfp.patch b/meta/recipes-support/boost/boost/consider-hardfp.patch
deleted file mode 100644
index 66808a69dd..0000000000
--- a/meta/recipes-support/boost/boost/consider-hardfp.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-When using soft-float, on ARM we should not expect the FE_* symbols
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: boost_1_60_0/boost/test/execution_monitor.hpp
-===================================================================
---- boost_1_60_0.orig/boost/test/execution_monitor.hpp
-+++ boost_1_60_0/boost/test/execution_monitor.hpp
-@@ -484,7 +484,8 @@ enum masks {
- BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL,
-
- BOOST_FPE_ALL = MCW_EM,
--#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG)
-+#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \
-+ || defined(__ARM_PCS)
- BOOST_FPE_ALL = 1,
- #else
- BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
diff --git a/meta/recipes-support/boost/boost_1.61.0.bb b/meta/recipes-support/boost/boost_1.61.0.bb
deleted file mode 100644
index 40e3870a3d..0000000000
--- a/meta/recipes-support/boost/boost_1.61.0.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-include boost-${PV}.inc
-include boost.inc
-
-SRC_URI += "\
- file://arm-intrinsics.patch \
- file://consider-hardfp.patch \
- file://boost-CVE-2012-2677.patch \
- file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \
- file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \
- file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \
- file://0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch \
- file://boost-math-disable-pch-for-gcc.patch \
-"
diff --git a/meta/recipes-support/boost/boost_1.71.0.bb b/meta/recipes-support/boost/boost_1.71.0.bb
new file mode 100644
index 0000000000..5e9e0d87d7
--- /dev/null
+++ b/meta/recipes-support/boost/boost_1.71.0.bb
@@ -0,0 +1,10 @@
+require boost-${PV}.inc
+require boost.inc
+
+SRC_URI += "file://arm-intrinsics.patch \
+ file://boost-CVE-2012-2677.patch \
+ file://boost-math-disable-pch-for-gcc.patch \
+ file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
+ file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
+ file://0001-dont-setup-compiler-flags-m32-m64.patch \
+ "
diff --git a/meta/recipes-support/boost/files/0001-Build-debug-version-of-bjam.patch b/meta/recipes-support/boost/files/0001-Build-debug-version-of-bjam.patch
new file mode 100644
index 0000000000..c6dcee915e
--- /dev/null
+++ b/meta/recipes-support/boost/files/0001-Build-debug-version-of-bjam.patch
@@ -0,0 +1,38 @@
+From 19c117c3d1388654da484e26afb3fb6c3e4181a9 Mon Sep 17 00:00:00 2001
+From: Daniel Klauer <daniel.klauer@gin.de>
+Date: Tue, 30 Jul 2019 11:39:09 +0200
+Subject: [PATCH] Build debug version of bjam
+
+bjam is stripped by default, this causes QA warning while stripping it
+from do_populate_sysroot():
+
+ WARNING: File '.../tmp/sysroots/x86_64-linux/usr/bin/bjam' \
+ from bjam-native was already stripped, \
+ this will prevent future debugging!
+
+The JAM scripts allow to build unstripped version with '--debug'. Just
+build and install the bjam.debug to stop bjam from being stripped in
+compile step.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ bootstrap.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bootstrap.sh b/bootstrap.sh
+index ca0b08d58..87f38dcf2 100755
+--- a/bootstrap.sh
++++ b/bootstrap.sh
+@@ -223,7 +223,7 @@ rm -f config.log
+ if test "x$BJAM" = x; then
+ $ECHO -n "Building Boost.Build engine with toolset $TOOLSET... "
+ pwd=`pwd`
+- (cd "$my_dir/tools/build/src/engine" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1
++ (cd "$my_dir/tools/build/src/engine" && ./build.sh "$TOOLSET" --debug) > bootstrap.log 2>&1
+ if [ $? -ne 0 ]; then
+ echo
+ echo "Failed to build Boost.Build build engine"
+--
+2.17.1
+
diff --git a/meta/recipes-support/boost/files/0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch b/meta/recipes-support/boost/files/0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch
new file mode 100644
index 0000000000..4c6ef2ed84
--- /dev/null
+++ b/meta/recipes-support/boost/files/0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch
@@ -0,0 +1,27 @@
+From 2afd025997a57794ce24e07e914b461dfea6ba5f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 26 Aug 2019 16:04:16 +0200
+Subject: [PATCH] build.sh: use -DNDEBUG also in debug builds
+
+Without it, there is a significant performance regression
+when running 'bjam install'.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tools/build/src/engine/build.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/build/src/engine/build.sh b/tools/build/src/engine/build.sh
+index a1e4cd335..64e0a4c80 100755
+--- a/tools/build/src/engine/build.sh
++++ b/tools/build/src/engine/build.sh
+@@ -436,7 +436,7 @@ case $B2_OS in
+ ;;
+ esac
+
+-if check_debug_build "$@" ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG}"
++if check_debug_build "$@" ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG} -DNDEBUG"
+ else B2_CXXFLAGS="${B2_CXXFLAGS_RELEASE} -DNDEBUG"
+ fi
+ echo_run ${B2_CXX} ${CXXFLAGS} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2
diff --git a/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch b/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch
deleted file mode 100644
index 9f8b7eac0a..0000000000
--- a/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 619ada314ab26c0c9cbfe5702cd9c0caa8f6415a Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Mon, 3 Aug 2015 17:12:33 +0800
-Subject: [PATCH] bjam-native: build bjam.debug
-
-bjam is stripped by default, this causes QA warning while stripping it
-from do_populate_sysroot():
-
- WARNING: File '.../tmp/sysroots/x86_64-linux/usr/bin/bjam' \
- from bjam-native was already stripped, \
- this will prevent future debugging!
-
-The JAM scripts allow to build unstripped version with '--debug'. Just
-build and install the bjam.debug to stop bjam from being stripped in
-compile step.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- bootstrap.sh | 1 +
- tools/build/src/engine/build.sh | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/bootstrap.sh b/bootstrap.sh
-index 98cf88b..54690aa 100755
---- a/bootstrap.sh
-+++ b/bootstrap.sh
-@@ -228,6 +228,7 @@ if test "x$BJAM" = x; then
- echo "tools/build/src/engine/$arch/b2"
- cp "$BJAM" .
- cp "$my_dir/tools/build/src/engine/$arch/bjam" .
-+ cp "$my_dir/tools/build/src/engine/${arch}.debug/bjam" bjam.debug
-
- fi
-
-diff --git a/tools/build/src/engine/build.sh b/tools/build/src/engine/build.sh
-index 6dbc706..c69fdc7 100755
---- a/tools/build/src/engine/build.sh
-+++ b/tools/build/src/engine/build.sh
-@@ -312,5 +312,5 @@ if test -x "./bootstrap/jam0" ; then
- if test "${BJAM_UPDATE}" != "update" ; then
- echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" clean
- fi
-- echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
-+ echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" --debug
- fi
---
-1.9.1
-
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0001-certdata2pem.py-use-python3.patch b/meta/recipes-support/ca-certificates/ca-certificates/0001-certdata2pem.py-use-python3.patch
new file mode 100644
index 0000000000..aa2c85ff43
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates/0001-certdata2pem.py-use-python3.patch
@@ -0,0 +1,37 @@
+From b6d18ca77f131cdcaa10d0eaa9d303399767edf6 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 28 Aug 2019 19:18:14 +0200
+Subject: [PATCH] certdata2pem.py: use python3
+
+Comments in that file imply it is already py3 compatible.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mozilla/Makefile | 2 +-
+ mozilla/certdata2pem.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mozilla/Makefile b/mozilla/Makefile
+index 6f46118..f98877c 100644
+--- a/mozilla/Makefile
++++ b/mozilla/Makefile
+@@ -3,7 +3,7 @@
+ #
+
+ all:
+- python certdata2pem.py
++ python3 certdata2pem.py
+
+ clean:
+ -rm -f *.crt
+diff --git a/mozilla/certdata2pem.py b/mozilla/certdata2pem.py
+index 0b02b2a..7d796f1 100644
+--- a/mozilla/certdata2pem.py
++++ b/mozilla/certdata2pem.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ # vim:set et sw=4:
+ #
+ # certdata2pem.py - splits certdata.txt into multiple files
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch b/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch
new file mode 100644
index 0000000000..4bd967f788
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch
@@ -0,0 +1,71 @@
+From a9fc13b2aee55655d58fcb77a3180fa99f96438a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Wed, 28 Mar 2018 16:45:05 +0100
+Subject: [PATCH] update-ca-certificates: use relative symlinks from
+ $ETCCERTSDIR
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+update-ca-certificates symlinks (trusted) certificates
+from $CERTSDIR or $LOCALCERTSDIR into $ETCCERTSDIR.
+update-ca-certificates can call hook scripts installed
+into /etc/ca-certificates/update.d. Those scripts are
+passed the pem file in /etc/ssl/certs/ that was added or
+removed in this run and those pem files are absolute
+symlinks into $CERTSDIR or $LOCALCERTSDIR at the moment.
+
+When running update-ca-certificates during image build
+time, they thusly all point into the host's file system,
+not into the $SYSROOT. This means:
+* the host's file system layout must match the one
+ produced by OE, and
+* it also means that the host must have installed the same
+ (or more) certificates as the target in $CERTSDIR and
+ $LOCALCERTSDIR
+
+This is a problem when wanting to execute hook scripts,
+because they all need to be taught about $SYSROOT, and
+behave differently depending on whether they're called
+at image build time, or on the target, as otherwise they
+will be trying to actually read the host's certificates
+from $CERTSDIR or $LOCALCERTSDIR.
+
+This also is a problem when running anything else during
+image build time that depends on the trusted CA
+certificates.
+
+Changing the symlink to be relative solves all of these
+problems. Do so.
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ sbin/update-ca-certificates | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
+index 00f80c7..7e911a9 100755
+--- a/sbin/update-ca-certificates
++++ b/sbin/update-ca-certificates
+@@ -29,6 +29,7 @@ CERTSDIR=$SYSROOT/usr/share/ca-certificates
+ LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates
+ CERTBUNDLE=ca-certificates.crt
+ ETCCERTSDIR=$SYSROOT/etc/ssl/certs
++FSROOT=../../../ # to get from $ETCCERTSDIR to the root of the file system
+ HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
+
+ while [ $# -gt 0 ];
+@@ -125,9 +126,10 @@ add() {
+ PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
+ -e 's/[()]/=/g' \
+ -e 's/,/_/g').pem"
+- if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${CERT##$SYSROOT}" ]
++ DST="$(echo ${CERT} | sed -e "s|^$SYSROOT||" -e "s|^/|$FSROOT|" )"
++ if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${DST}" ]
+ then
+- ln -sf "${CERT##$SYSROOT}" "$PEM"
++ ln -sf "${DST}" "$PEM"
+ echo "+$PEM" >> "$ADDED"
+ fi
+ # Add trailing newline to certificate, if it is missing (#635570)
diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb b/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
deleted file mode 100644
index 1bea0676b6..0000000000
--- a/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
+++ /dev/null
@@ -1,82 +0,0 @@
-SUMMARY = "Common CA certificates"
-DESCRIPTION = "This package includes PEM files of CA certificates to allow \
-SSL-based applications to check for the authenticity of SSL connections. \
-This derived from Debian's CA Certificates."
-HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
-SECTION = "misc"
-LICENSE = "GPL-2.0+ & MPL-2.0"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7358b9541ccf3029e9705ed8de57968"
-
-# This is needed to ensure we can run the postinst at image creation time
-DEPENDS = "ca-certificates-native"
-DEPENDS_class-native = "openssl-native"
-DEPENDS_class-nativesdk = "ca-certificates-native openssl-native"
-
-SRCREV = "f54715702c5c0581c9461f78fd84e2c8d2ec243c"
-
-SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
- file://0002-update-ca-certificates-use-SYSROOT.patch \
- file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
- file://update-ca-certificates-support-Toybox.patch \
- file://default-sysroot.patch \
- file://sbindir.patch"
-
-S = "${WORKDIR}/git"
-
-inherit allarch
-
-EXTRA_OEMAKE = "\
- 'CERTSDIR=${datadir}/ca-certificates' \
- 'SBINDIR=${sbindir}' \
-"
-
-do_compile_prepend() {
- oe_runmake clean
-}
-
-do_install () {
- install -d ${D}${datadir}/ca-certificates \
- ${D}${sysconfdir}/ssl/certs \
- ${D}${sysconfdir}/ca-certificates/update.d
- oe_runmake 'DESTDIR=${D}' install
-
- install -d ${D}${mandir}/man8
- install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/
-
- install -d ${D}${sysconfdir}
- {
- echo "# Lines starting with # will be ignored"
- echo "# Lines starting with ! will remove certificate on next update"
- echo "#"
- find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \
- sed 's,^${D}${datadir}/ca-certificates/,,'
- } >${D}${sysconfdir}/ca-certificates.conf
-}
-
-do_install_append_class-target () {
- sed -i -e 's,/etc/,${sysconfdir}/,' \
- -e 's,/usr/share/,${datadir}/,' \
- -e 's,/usr/local,${prefix}/local,' \
- ${D}${sbindir}/update-ca-certificates \
- ${D}${mandir}/man8/update-ca-certificates.8
-}
-
-pkg_postinst_${PN} () {
- SYSROOT="$D" update-ca-certificates
-}
-
-CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"
-
-# Postinsts don't seem to be run for nativesdk packages when populating SDKs.
-CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt"
-do_install_append_class-nativesdk () {
- SYSROOT="${D}${SDKPATHNATIVE}" update-ca-certificates
-}
-
-do_install_append_class-native () {
- SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
-}
-
-RDEPENDS_${PN} += "openssl"
-
-BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20190110.bb b/meta/recipes-support/ca-certificates/ca-certificates_20190110.bb
new file mode 100644
index 0000000000..ce3cb217a1
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates_20190110.bb
@@ -0,0 +1,90 @@
+SUMMARY = "Common CA certificates"
+DESCRIPTION = "This package includes PEM files of CA certificates to allow \
+SSL-based applications to check for the authenticity of SSL connections. \
+This derived from Debian's CA Certificates."
+HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
+SECTION = "misc"
+LICENSE = "GPL-2.0+ & MPL-2.0"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=aeb420429b1659507e0a5a1b123e8308"
+
+# This is needed to ensure we can run the postinst at image creation time
+DEPENDS = ""
+DEPENDS_class-native = "openssl-native"
+DEPENDS_class-nativesdk = "openssl-native"
+# Need rehash from openssl and run-parts from debianutils
+PACKAGE_WRITE_DEPS += "openssl-native debianutils-native"
+
+SRCREV = "c28799b138b044c963d24c4a69659b6e5486e3be"
+
+SRC_URI = "git://salsa.debian.org/debian/ca-certificates.git;protocol=https \
+ file://0002-update-ca-certificates-use-SYSROOT.patch \
+ file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
+ file://update-ca-certificates-support-Toybox.patch \
+ file://default-sysroot.patch \
+ file://sbindir.patch \
+ file://0003-update-ca-certificates-use-relative-symlinks-from-ET.patch \
+ file://0001-certdata2pem.py-use-python3.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+EXTRA_OEMAKE = "\
+ 'CERTSDIR=${datadir}/ca-certificates' \
+ 'SBINDIR=${sbindir}' \
+"
+
+do_compile_prepend() {
+ oe_runmake clean
+}
+
+do_install () {
+ install -d ${D}${datadir}/ca-certificates \
+ ${D}${sysconfdir}/ssl/certs \
+ ${D}${sysconfdir}/ca-certificates/update.d
+ oe_runmake 'DESTDIR=${D}' install
+
+ install -d ${D}${mandir}/man8
+ install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/
+
+ install -d ${D}${sysconfdir}
+ {
+ echo "# Lines starting with # will be ignored"
+ echo "# Lines starting with ! will remove certificate on next update"
+ echo "#"
+ find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \
+ sed 's,^${D}${datadir}/ca-certificates/,,' | sort
+ } >${D}${sysconfdir}/ca-certificates.conf
+}
+
+do_install_append_class-target () {
+ sed -i -e 's,/etc/,${sysconfdir}/,' \
+ -e 's,/usr/share/,${datadir}/,' \
+ -e 's,/usr/local,${prefix}/local,' \
+ ${D}${sbindir}/update-ca-certificates \
+ ${D}${mandir}/man8/update-ca-certificates.8
+}
+
+pkg_postinst_${PN}_class-target () {
+ SYSROOT="$D" $D${sbindir}/update-ca-certificates
+}
+
+CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"
+
+# Rather than make a postinst script that works for both target and nativesdk,
+# we just run update-ca-certificate from do_install() for nativesdk.
+CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt"
+do_install_append_class-nativesdk () {
+ SYSROOT="${D}${SDKPATHNATIVE}" ${D}${sbindir}/update-ca-certificates
+}
+
+do_install_append_class-native () {
+ SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
+}
+
+RDEPENDS_${PN}_class-target = "openssl-bin"
+RDEPENDS_${PN}_class-native = "openssl-native"
+RDEPENDS_${PN}_class-nativesdk = "nativesdk-openssl-bin"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
index ceac0fe31a..89f2d77b66 100644
--- a/meta/recipes-support/consolekit/consolekit_0.4.6.bb
+++ b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
DEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib virtual/libx11"
RDEPENDS_${PN} += "base-files"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
@@ -23,11 +23,10 @@ SRC_URI[sha256sum] = "b41d17e06f80059589fbeefe96ad07bcc564c49e65516da1caf9751464
S = "${WORKDIR}/ConsoleKit-${PV}"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd polkit', d)}"
PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/security,--disable-pam-module,libpam"
-PACKAGECONFIG[policykit] = "--with-polkit,--without-polkit,polkit"
+PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir="
FILES_${PN} += "${exec_prefix}/lib/ConsoleKit \
diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch b/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
deleted file mode 100644
index 72755981a9..0000000000
--- a/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-createrepo: Implement --dbpath command line option
-
---dbpath option allows to specify path to the directory
-with rpm database. By default createrepo uses or creates
-rpm database in /var/lib/rpm/
-
-Upstream-Status: Pending
-
-Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
-
---- createrepo-0.4.11.orig/genpkgmetadata.py 2015-03-30 22:18:19.904000000 +0300
-+++ createrepo-0.4.11/genpkgmetadata.py 2015-03-30 22:28:49.208000000 +0300
-@@ -65,6 +65,7 @@
- -p, --pretty = output xml files in pretty format.
- --update = update existing metadata (if present)
- -d, --database = generate the sqlite databases.
-+ --dbpath <dir> = specify path to rpm db directory.
- """)
-
- sys.exit(retval)
-@@ -72,10 +73,13 @@
- class MetaDataGenerator:
- def __init__(self, cmds):
- self.cmds = cmds
-- self.ts = rpm.TransactionSet()
- self.pkgcount = 0
- self.files = []
-
-+ if self.cmds['dbpath']:
-+ rpm.addMacro("_dbpath", self.cmds['dbpath'])
-+ self.ts = rpm.TransactionSet()
-+
- def _os_path_walk(self, top, func, arg):
- """Directory tree walk with callback function.
- copy of os.path.walk, fixes the link/stating problem
-@@ -435,6 +439,7 @@
- cmds['dir-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*']
- cmds['skip-symlinks'] = False
- cmds['pkglist'] = []
-+ cmds['dbpath'] = None
-
- try:
- gopts, argsleft = getopt.getopt(args, 'phqVvndg:s:x:u:c:o:CSi:', ['help', 'exclude=',
-@@ -442,7 +447,7 @@
- 'baseurl=', 'groupfile=', 'checksum=',
- 'version', 'pretty', 'split', 'outputdir=',
- 'noepoch', 'checkts', 'database', 'update',
-- 'skip-symlinks', 'pkglist='])
-+ 'skip-symlinks', 'pkglist=', 'dbpath='])
- except getopt.error, e:
- errorprint(_('Options Error: %s.') % e)
- usage()
-@@ -516,6 +521,8 @@
- cmds['skip-symlinks'] = True
- elif arg in ['-i', '--pkglist']:
- cmds['pkglist'] = a
-+ elif arg == '--dbpath':
-+ cmds['dbpath'] = os.path.realpath(a)
-
- except ValueError, e:
- errorprint(_('Options Error: %s') % e)
diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch b/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
deleted file mode 100644
index bc7200d072..0000000000
--- a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-dumpMetadata.py: Fix for RPM5 - 5.4.9 integration
-
-RPM5 no longer has a switch to disable signature validation. (Due to security
-validation concerns.)
-
-Upstream-Status: Inappropriate [other]
- createrepo does not support RPM5 upstream
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff -u createrepo-0.4.11.orig/dumpMetadata.py createrepo-0.4.11/dumpMetadata.py
---- createrepo-0.4.11.orig/dumpMetadata.py 2012-06-05 10:12:55.687964222 -0500
-+++ createrepo-0.4.11/dumpMetadata.py 2012-06-05 10:40:08.154060600 -0500
-@@ -92,7 +92,7 @@
- fdno = package # let's assume this is an fdno and go with it :)
- except OSError:
- raise MDError, "Error opening file"
-- ts.setVSFlags((rpm._RPMVSF_NOSIGNATURES|rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
-+ ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
- try:
- hdr = ts.hdrFromFdno(fdno)
- except rpm.error:
diff --git a/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch b/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
deleted file mode 100644
index 905531f848..0000000000
--- a/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-dumpMetadata: disable signature validation
-
-Makes it possible to work on RPM repositories that contain signed packages
-without the need of importing the public part of the signing key into the RPM
-database.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- dumpMetadata.py | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/dumpMetadata.py b/dumpMetadata.py
-index e40e8ac..ca6a82d 100644
---- a/dumpMetadata.py
-+++ b/dumpMetadata.py
-@@ -92,7 +92,9 @@ def returnHdr(ts, package):
- fdno = package # let's assume this is an fdno and go with it :)
- except OSError:
- raise MDError, "Error opening file"
-- ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
-+ ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD|
-+ rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA|
-+ rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER))
- try:
- hdr = ts.hdrFromFdno(fdno)
- except rpm.error:
---
-2.1.4
-
diff --git a/meta/recipes-support/createrepo/createrepo/fix-native-install.patch b/meta/recipes-support/createrepo/createrepo/fix-native-install.patch
deleted file mode 100644
index d8202a4f7c..0000000000
--- a/meta/recipes-support/createrepo/createrepo/fix-native-install.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Date: Jan 31, 2011
-
-There are two fixes:
- 1. -native needs to customize prefix
- 2. needs to change python reference in binaries
-
-Signed-off-by: Qing He <qing.he@intel.com>
-
-diff --git a/Makefile b/Makefile
-index b2d1a32..3c3639f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -3,22 +3,22 @@ VERSION = 0.4.11
- SHELL = /bin/sh
- top_srcdir = .
- srcdir = .
--prefix = /usr
--exec_prefix = ${prefix}
--
--bindir = ${exec_prefix}/bin
--sbindir = ${exec_prefix}/sbin
--libexecdir = ${exec_prefix}/libexec
--datadir = ${prefix}/share
--sysconfdir = ${prefix}/etc
--sharedstatedir = ${prefix}/com
--localstatedir = ${prefix}/var
--libdir = ${exec_prefix}/lib
--infodir = ${prefix}/info
-+prefix ?= /usr
-+exec_prefix ?= ${prefix}
-+
-+bindir ?= ${exec_prefix}/bin
-+sbindir ?= ${exec_prefix}/sbin
-+libexecdir ?= ${exec_prefix}/libexec
-+datadir ?= ${prefix}/share
-+sysconfdir ?= ${prefix}/etc
-+sharedstatedir ?= ${prefix}/com
-+localstatedir ?= ${prefix}/var
-+libdir ?= ${exec_prefix}/lib
-+infodir ?= ${prefix}/info
- docdir =
--includedir = ${prefix}/include
-+includedir ?= ${prefix}/include
- oldincludedir = /usr/include
--mandir = ${prefix}/share/man
-+mandir ?= ${prefix}/share/man
-
- pkgdatadir = $(datadir)/$(PACKAGE)
- pkglibdir = $(libdir)/$(PACKAGE)
-diff --git a/bin/Makefile b/bin/Makefile
-index 52c1f50..e30610e 100644
---- a/bin/Makefile
-+++ b/bin/Makefile
-@@ -1,22 +1,22 @@
- SHELL = /bin/sh
- top_srcdir = ..
- srcdir = ../bin
--prefix = /usr
--exec_prefix = ${prefix}
--
--bindir = ${exec_prefix}/bin
--sbindir = ${exec_prefix}/sbin
--libexecdir = ${exec_prefix}/libexec
--datadir = ${prefix}/share
--sysconfdir = ${prefix}/etc
--sharedstatedir = ${prefix}/com
--localstatedir = ${prefix}/var
--libdir = ${exec_prefix}/lib
--infodir = ${prefix}/info
-+prefix ?= /usr
-+exec_prefix ?= ${prefix}
-+
-+bindir ?= ${exec_prefix}/bin
-+sbindir ?= ${exec_prefix}/sbin
-+libexecdir ?= ${exec_prefix}/libexec
-+datadir ?= ${prefix}/share
-+sysconfdir ?= ${prefix}/etc
-+sharedstatedir ?= ${prefix}/com
-+localstatedir ?= ${prefix}/var
-+libdir ?= ${exec_prefix}/lib
-+infodir ?= ${prefix}/info
- docdir =
--includedir = ${prefix}/include
-+includedir ?= ${prefix}/include
- oldincludedir = /usr/include
--mandir = ${prefix}/man
-+mandir ?= ${prefix}/man
-
- pkgdatadir = $(datadir)/$(PACKAGE)
- pkglibdir = $(libdir)/$(PACKAGE)
-@@ -40,8 +40,11 @@ all: $(srcdir)/$(PACKAGE)
-
-
- install: all installdirs
-- $(INSTALL_BIN) $(srcdir)/$(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE)
-- $(INSTALL_BIN) $(srcdir)/modifyrepo $(DESTDIR)$(bindir)/modifyrepo
-+ sed -e "s|@DATADIR@|$(datadir)|" $(srcdir)/$(PACKAGE) > $(srcdir)/$(PACKAGE).tmp
-+ sed -e "s|@DATADIR@|$(datadir)|" $(srcdir)/modifyrepo > $(srcdir)/modifyrepo.tmp
-+ $(INSTALL_BIN) $(srcdir)/$(PACKAGE).tmp $(DESTDIR)$(bindir)/$(PACKAGE)
-+ $(INSTALL_BIN) $(srcdir)/modifyrepo.tmp $(DESTDIR)$(bindir)/modifyrepo
-+ rm -f $(srcdir)/$(PACKAGE).tmp $(srcdir)/modifyrepo.tmp
-
-
- uninstall:
-diff --git a/bin/createrepo b/bin/createrepo
-index b0de515..eaacb39 100755
---- a/bin/createrepo
-+++ b/bin/createrepo
-@@ -1,2 +1,2 @@
- #!/bin/sh
--exec /usr/share/createrepo/genpkgmetadata.py "$@"
-+exec @DATADIR@/createrepo/genpkgmetadata.py "$@"
-diff --git a/bin/modifyrepo b/bin/modifyrepo
-index c9732d8..6f7c1d4 100755
---- a/bin/modifyrepo
-+++ b/bin/modifyrepo
-@@ -1,2 +1,2 @@
- #!/bin/sh
--exec /usr/share/createrepo/modifyrepo.py "$@"
-+exec @DATADIR@/createrepo/modifyrepo.py "$@"
-diff --git a/docs/Makefile b/docs/Makefile
-index 0a41179..e128c85 100644
---- a/docs/Makefile
-+++ b/docs/Makefile
-@@ -1,22 +1,22 @@
- SHELL = /bin/sh
- top_srcdir = ..
- srcdir = ../docs
--prefix = /usr
--exec_prefix = ${prefix}
--
--bindir = ${exec_prefix}/bin
--sbindir = ${exec_prefix}/sbin
--libexecdir = ${exec_prefix}/libexec
--datadir = ${prefix}/share
--sysconfdir = ${prefix}/etc
--sharedstatedir = ${prefix}/com
--localstatedir = ${prefix}/var
--libdir = ${exec_prefix}/lib
--infodir = ${prefix}/info
-+prefix ?= /usr
-+exec_prefix ?= ${prefix}
-+
-+bindir ?= ${exec_prefix}/bin
-+sbindir ?= ${exec_prefix}/sbin
-+libexecdir ?= ${exec_prefix}/libexec
-+datadir ?= ${prefix}/share
-+sysconfdir ?= ${prefix}/etc
-+sharedstatedir ?= ${prefix}/com
-+localstatedir ?= ${prefix}/var
-+libdir ?= ${exec_prefix}/lib
-+infodir ?= ${prefix}/info
- docdir =
--includedir = ${prefix}/include
-+includedir ?= ${prefix}/include
- oldincludedir = /usr/include
--mandir = ${datadir}/man
-+mandir ?= ${datadir}/man
-
- pkgdatadir = $(datadir)/$(PACKAGE)
- pkglibdir = $(libdir)/$(PACKAGE)
diff --git a/meta/recipes-support/createrepo/createrepo/fixstat.patch b/meta/recipes-support/createrepo/createrepo/fixstat.patch
deleted file mode 100644
index d34eb56a8e..0000000000
--- a/meta/recipes-support/createrepo/createrepo/fixstat.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-When reading the mtime from disk, the system can get a floating point
-value. Convert this to an int for comparision purposes, else some
-packages always get reindexed as the value in the index is an int.
-RP 2016/3/2
-Upstream-Status: Pending
-
-Index: createrepo-0.4.11/readMetadata.py
-===================================================================
---- createrepo-0.4.11.orig/readMetadata.py
-+++ createrepo-0.4.11/readMetadata.py
-@@ -126,7 +126,7 @@ class MetadataIndex(object):
- if self.opts.get('verbose'):
- print _("Size (%i -> %i) changed for file %s") % (size,st.st_size,filepath)
- return
-- if st.st_mtime != mtime:
-+ if int(st.st_mtime) != mtime:
- if self.opts.get('verbose'):
- print _("Modification time changed for %s") % filepath
- return
diff --git a/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch b/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
deleted file mode 100644
index 80205a1507..0000000000
--- a/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Author: Andrei Gherzan <andrei@gherzan.ro>
-
-Python interpreter should be use from PATH - native python - and not the one from
-host.
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: createrepo-0.4.11/genpkgmetadata.py
-===================================================================
---- createrepo-0.4.11.orig/genpkgmetadata.py 2012-04-10 17:14:05.278649384 +0300
-+++ createrepo-0.4.11/genpkgmetadata.py 2012-04-10 17:14:22.290648886 +0300
-@@ -1,4 +1,4 @@
--#!/usr/bin/python -t
-+#! /usr/bin/env python
- # primary functions and glue for generating the repository metadata
- #
-
-Index: createrepo-0.4.11/modifyrepo.py
-===================================================================
---- createrepo-0.4.11.orig/modifyrepo.py 2012-04-10 17:14:09.106649272 +0300
-+++ createrepo-0.4.11/modifyrepo.py 2012-04-10 17:14:27.818648725 +0300
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#! /usr/bin/env python
- # $Id$
- #
- # This tools is used to insert arbitrary metadata into an RPM repository.
-Index: createrepo-0.4.11/dumpMetadata.py
-===================================================================
---- createrepo-0.4.11.orig/dumpMetadata.py 2012-04-10 17:19:23.874640068 +0300
-+++ createrepo-0.4.11/dumpMetadata.py 2012-04-10 17:19:34.502639756 +0300
-@@ -1,4 +1,4 @@
--#!/usr/bin/python -t
-+#! /usr/bin/env python
- # base classes and functions for dumping out package Metadata
- #
- # This program is free software; you can redistribute it and/or modify
-Index: createrepo-0.4.11/readMetadata.py
-===================================================================
---- createrepo-0.4.11.orig/readMetadata.py 2012-04-10 17:19:19.626640193 +0300
-+++ createrepo-0.4.11/readMetadata.py 2012-04-10 17:19:40.198639590 +0300
-@@ -1,4 +1,4 @@
--#!/usr/bin/python -t
-+#! /usr/bin/env python
-
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
diff --git a/meta/recipes-support/createrepo/createrepo/recommends.patch b/meta/recipes-support/createrepo/createrepo/recommends.patch
deleted file mode 100644
index dc5de2b5b0..0000000000
--- a/meta/recipes-support/createrepo/createrepo/recommends.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-createrepo: implement recommends support
-
-Record against the corresponding requires entry in the output metadata
-if a dependency relationship is marked with the RPMSENSE_MISSINGOK flag
-(indicating it is a recommendation, rather than a hard dependency).
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-diff --git a/dumpMetadata.py b/dumpMetadata.py
-index 70bb2d8..e40e8ac 100644
---- a/dumpMetadata.py
-+++ b/dumpMetadata.py
-@@ -319,6 +319,23 @@ class RpmMetaData:
- reqs.append(0)
- return reqs
-
-+ def _checkMissingOk(self, flags):
-+ reqs=[]
-+ if flags is None:
-+ return reqs
-+
-+ if type(flags) is not types.ListType:
-+ flags = [flags]
-+ for flag in flags:
-+ newflag = flag
-+ if flag is not None:
-+ newflag = flag & rpm.RPMSENSE_MISSINGOK
-+ if newflag:
-+ reqs.append(1)
-+ else:
-+ reqs.append(0)
-+ return reqs
-+
-
- def _correctVersion(self, vers):
- returnvers = []
-@@ -537,9 +554,10 @@ class RpmMetaData:
- tmpflags = self.hdr[rpm.RPMTAG_REQUIREFLAGS]
- flags = self._correctFlags(tmpflags)
- prereq = self._checkPreReq(tmpflags)
-+ missingok = self._checkMissingOk(tmpflags)
- ver = self._correctVersion(self.hdr[rpm.RPMTAG_REQUIREVERSION])
- if names is not None:
-- lst = zip(names, flags, ver, prereq)
-+ lst = zip(names, flags, ver, prereq, missingok)
- return self._uniq(lst)
-
- def obsoletesList(self):
-@@ -692,7 +710,7 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
- depsList = rpmObj.depsList()
- if len(depsList) > 0:
- rpconode = format.newChild(formatns, 'requires', None)
-- for (name, flags, (e,v,r), prereq) in depsList:
-+ for (name, flags, (e,v,r), prereq, missingok) in depsList:
- entry = rpconode.newChild(formatns, 'entry', None)
- entry.newProp('name', name)
- if flags != 0:
-@@ -711,6 +729,8 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
- entry.newProp('rel', str(r))
- if prereq == 1:
- entry.newProp('pre', str(prereq))
-+ if missingok:
-+ entry.newProp('missingok', '1')
-
- for file in rpmObj.usefulFiles():
- files = format.newChild(None, 'file', None)
---
-1.7.9.5
-
diff --git a/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py b/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
deleted file mode 100755
index a5b61bade7..0000000000
--- a/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python
-#
-# This script generates a solution database for a directory containing rpm packages
-# but tries to be efficient about this, only doing so when the packages have changed
-# in some way.
-#
-# It is assumed something already went through and removed all the solvedb.done stamp files
-# in advance.
-#
-# First argument - the rpm binary to use
-# Subsequent arguments - paths to process solution databases for
-#
-
-import sys, os
-import hashlib
-import stat
-import subprocess
-
-if len(sys.argv) < 1:
- print("Error, rpm command not specified")
- sys.exit(1)
-
-if len(sys.argv) < 2:
- print("Error, no paths specified")
- sys.exit(1)
-
-paths = sys.argv[2:]
-
-for path in paths:
- if os.path.exists(path + "/solvedb.done"):
- continue
- data = ""
- manifest = []
- for root, dirs, files in os.walk(path):
- for file in files:
- f = os.path.join(root, file)
- if f.startswith(path + "/" + "solvedb"):
- continue
- data = data + str(os.stat(f)[stat.ST_MTIME])
- manifest.append(f)
- checksum = hashlib.md5(data).hexdigest()
-
- if os.path.exists(path + "/solvedb.checksum") and open(path + "/solvedb.checksum", "r").read() == checksum:
- open(path + "/solvedb.done", "w")
- continue
-
- if os.path.exists(path + "/solvedb"):
- subprocess.call("rm -rf %s" % (path + "/solvedb"), shell=True)
- os.mkdir(path + "/solvedb")
- m = open(path + "/solvedb/manifest", "w")
- m.write("# Dynamically generated solve manifest\n")
- for f in manifest:
- m.write(f + "\n")
- m.close()
-
- cmd = sys.argv[1] + ' -i --replacepkgs --replacefiles --oldpackage -D "_dbpath ' + path + '/solvedb" --justdb \
- --noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats \
- --ignoresize --nosignature --nodigest -D "__dbi_txn create nofsync" \
- ' + path + '/solvedb/manifest'
- subprocess.call(cmd, shell=True)
-
- open(path + "/solvedb.checksum", "w").write(checksum)
- open(path + "/solvedb.done", "w")
-
diff --git a/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
deleted file mode 100644
index 2a3231b3a4..0000000000
--- a/meta/recipes-support/createrepo/createrepo_0.4.11.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Creates metadata indexes for RPM package repositories"
-HOMEPAGE = "http://createrepo.baseurl.org/"
-
-RECIPE_NO_UPDATE_REASON = "Versions after 0.9.* use YUM, so we hold at 0.4.11"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
-
-DEPENDS_class-native += "libxml2-native rpm-native"
-RDEPENDS_${PN}_class-target = "libxml2-python"
-
-PR = "r9"
-
-SRC_URI = "http://createrepo.baseurl.org/download/${BP}.tar.gz \
- file://fix-native-install.patch \
- file://python-scripts-should-use-interpreter-from-env.patch \
- file://createrepo-rpm549.patch \
- file://recommends.patch \
- file://createrepo-dbpath.patch \
- file://dumpMetadata-disable-signature-validation.patch \
- file://rpm-createsolvedb.py \
- file://fixstat.patch \
- "
-
-SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2"
-SRC_URI[sha256sum] = "a73ae11a0dcde8bde36d900bc3f7f8f1083ba752c70a5c61b72d1e1e7608f21b"
-
-BBCLASSEXTEND = "native"
-
-do_install () {
- oe_runmake -e 'DESTDIR=${D}' install
- install -m 0755 ${WORKDIR}/rpm-createsolvedb.py ${D}${bindir}/
-}
-
-# Wrap the python script since the native python is
-# ${bindir}/python-native/python, and the "#! /usr/bin/env python" can't
-# find it since it is not in PATH.
-do_install_append_class-native () {
- # Not all the python scripts should be wrapped since some of
- # them are modules (be imported).
- for i in ${D}${datadir}/createrepo/genpkgmetadata.py \
- ${D}${datadir}/createrepo/modifyrepo.py \
- ${D}${bindir}/rpm-createsolvedb.py ; do
- sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' $i
- done
-
- create_wrapper ${D}/${bindir}/createrepo \
- RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
- RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
-}
diff --git a/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
index 74e5d99cf2..a7db1b3c9e 100644
--- a/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
+++ b/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
@@ -1,17 +1,21 @@
-[PATCH] replace krb5-config with pkg-config
+From ed70f0623708b8a6c1f58a5d243d87c5ff45b24d Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 26 Apr 2016 13:13:01 +0800
+Subject: [PATCH] replace krb5-config with pkg-config
Upstream-Status: Pending
Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
---
configure.ac | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
-index e99b303..dc93f39 100644
+index 5569a26..56b0380 100755
--- a/configure.ac
+++ b/configure.ac
-@@ -1196,7 +1196,7 @@ AC_ARG_WITH(gssapi,
+@@ -1290,7 +1290,7 @@ AC_ARG_WITH(gssapi,
fi
])
@@ -20,7 +24,7 @@ index e99b303..dc93f39 100644
save_CPPFLAGS="$CPPFLAGS"
AC_MSG_CHECKING([if GSS-API support is requested])
-@@ -1207,7 +1207,7 @@ if test x"$want_gss" = xyes; then
+@@ -1301,7 +1301,7 @@ if test x"$want_gss" = xyes; then
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
elif test -f "$KRB5CONFIG"; then
@@ -29,7 +33,7 @@ index e99b303..dc93f39 100644
elif test "$GSSAPI_ROOT" != "yes"; then
GSSAPI_INCS="-I$GSSAPI_ROOT/include"
fi
-@@ -1300,7 +1300,7 @@ if test x"$want_gss" = xyes; then
+@@ -1394,7 +1394,7 @@ if test x"$want_gss" = xyes; then
elif test -f "$KRB5CONFIG"; then
dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS
@@ -38,6 +42,3 @@ index e99b303..dc93f39 100644
LIBS="$gss_libs $LIBS"
else
case $host in
---
-1.9.1
-
diff --git a/meta/recipes-support/curl/curl/configure_ac.patch b/meta/recipes-support/curl/curl/configure_ac.patch
deleted file mode 100644
index b8bd304d71..0000000000
--- a/meta/recipes-support/curl/curl/configure_ac.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Pending
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -281,7 +281,7 @@ dnl ************************************
-
- CURL_CHECK_COMPILER
- CURL_SET_COMPILER_BASIC_OPTS
--CURL_SET_COMPILER_DEBUG_OPTS
-+dnl CURL_SET_COMPILER_DEBUG_OPTS
- CURL_SET_COMPILER_OPTIMIZE_OPTS
- CURL_SET_COMPILER_WARNING_OPTS
-
diff --git a/meta/recipes-support/curl/curl_7.50.1.bb b/meta/recipes-support/curl/curl_7.50.1.bb
deleted file mode 100644
index a21419a4d8..0000000000
--- a/meta/recipes-support/curl/curl_7.50.1.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "Command line tool and library for client-side URL transfers"
-HOMEPAGE = "http://curl.haxx.se/"
-BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
-SECTION = "console/network"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
-
-SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
- file://0001-replace-krb5-config-with-pkg-config.patch \
-"
-
-# curl likes to set -g0 in CFLAGS, so we stop it
-# from mucking around with debug options
-#
-SRC_URI += " file://configure_ac.patch"
-
-SRC_URI[md5sum] = "015f6a0217ca6f2c5442ca406476920b"
-SRC_URI[sha256sum] = "3c12c5f54ccaa1d40abc65d672107dcc75d3e1fcb38c267484334280096e5156"
-
-inherit autotools pkgconfig binconfig multilib_header
-
-PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls proxy zlib"
-PACKAGECONFIG_class-native = "ipv6 proxy ssl zlib"
-PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl zlib"
-
-PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
-PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
-PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
-PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn"
-PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
-PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
-PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
-PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
-PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
-PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
-PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
-PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
-PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
-PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
-PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
-PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
-
-EXTRA_OECONF = " \
- --enable-crypto-auth \
- --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
- --without-libmetalink \
- --without-libpsl \
- --without-nghttp2 \
-"
-
-do_install_append() {
- oe_multilib_header curl/curlbuild.h
-}
-
-do_install_append_class-target() {
- # cleanup buildpaths from curl-config
- sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/curl-config
-}
-
-PACKAGES =+ "lib${BPN}"
-
-FILES_lib${BPN} = "${libdir}/lib*.so.*"
-RRECOMMENDS_lib${BPN} += "ca-certificates"
-
-FILES_${PN} += "${datadir}/zsh"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/curl/curl_7.67.0.bb b/meta/recipes-support/curl/curl_7.67.0.bb
new file mode 100644
index 0000000000..e08e08ed4a
--- /dev/null
+++ b/meta/recipes-support/curl/curl_7.67.0.bb
@@ -0,0 +1,80 @@
+SUMMARY = "Command line tool and library for client-side URL transfers"
+HOMEPAGE = "http://curl.haxx.se/"
+BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
+SECTION = "console/network"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=be5d9e1419c4363f4b32037a2d3b7ffa"
+
+SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
+ file://0001-replace-krb5-config-with-pkg-config.patch \
+"
+
+SRC_URI[md5sum] = "7be288f6fd5b7b5e402ef3b36a461a24"
+SRC_URI[sha256sum] = "dd5f6956821a548bf4b44f067a530ce9445cc8094fd3e7e3fc7854815858586c"
+
+CVE_PRODUCT = "curl libcurl"
+inherit autotools pkgconfig binconfig multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib"
+PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib"
+
+# 'ares' and 'threaded-resolver' are mutually exclusive
+PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares"
+PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
+PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual"
+PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
+PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
+PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
+PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls"
+PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
+PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
+PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
+PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss"
+PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
+PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
+PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver"
+PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+
+EXTRA_OECONF = " \
+ --disable-libcurl-option \
+ --disable-ntlm-wb \
+ --enable-crypto-auth \
+ --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+ --without-libmetalink \
+ --without-libpsl \
+"
+
+do_install_append_class-target() {
+ # cleanup buildpaths from curl-config
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ ${D}${bindir}/curl-config
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+RRECOMMENDS_lib${BPN} += "ca-certificates"
+
+FILES_${PN} += "${datadir}/zsh"
+
+inherit multilib_script
+MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/db/db/0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch b/meta/recipes-support/db/db/0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch
new file mode 100644
index 0000000000..a4ff2ecb0c
--- /dev/null
+++ b/meta/recipes-support/db/db/0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch
@@ -0,0 +1,147 @@
+From a3569f118fd95b7ad41e1a1128e17c0b8928556d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 20 Jan 2019 18:30:23 -0800
+Subject: [PATCH] Fix libc++ compatibility by renaming atomic_init API
+
+db5 does not build because it is redefining a C++11 standard
+library identifier, atomic_init(). Therefore prefix all
+its internal defines with '__db_', to avoid collisions.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/dbinc/atomic.h | 4 ++--
+ src/mp/mp_fget.c | 4 ++--
+ src/mp/mp_mvcc.c | 4 ++--
+ src/mp/mp_region.c | 4 ++--
+ src/mutex/mut_method.c | 2 +-
+ src/mutex/mut_tas.c | 4 ++--
+ 6 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index 1b49de5..7bf353c 100644
+--- a/src/dbinc/atomic.h
++++ b/src/dbinc/atomic.h
+@@ -70,7 +70,7 @@ typedef struct {
+ * These have no memory barriers; the caller must include them when necessary.
+ */
+ #define atomic_read(p) ((p)->value)
+-#define atomic_init(p, val) ((p)->value = (val))
++#define __db_atomic_init(p, val) ((p)->value = (val))
+
+ #ifdef HAVE_ATOMIC_SUPPORT
+
+@@ -206,7 +206,7 @@ static inline int __db_atomic_compare_exchange(
+ #define atomic_dec(env, p) (--(p)->value)
+ #define atomic_compare_exchange(env, p, oldval, newval) \
+ (DB_ASSERT(env, atomic_read(p) == (oldval)), \
+- atomic_init(p, (newval)), 1)
++ __db_atomic_init(p, (newval)), 1)
+ #else
+ #define atomic_inc(env, p) __atomic_inc(env, p)
+ #define atomic_dec(env, p) __atomic_dec(env, p)
+diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c
+index 16de695..5159520 100644
+--- a/src/mp/mp_fget.c
++++ b/src/mp/mp_fget.c
+@@ -649,7 +649,7 @@ alloc: /* Allocate a new buffer header and data space. */
+
+ /* Initialize enough so we can call __memp_bhfree. */
+ alloc_bhp->flags = 0;
+- atomic_init(&alloc_bhp->ref, 1);
++ __db_atomic_init(&alloc_bhp->ref, 1);
+ #ifdef DIAGNOSTIC
+ if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
+ __db_errx(env, DB_STR("3025",
+@@ -955,7 +955,7 @@ alloc: /* Allocate a new buffer header and data space. */
+ MVCC_MPROTECT(bhp->buf, mfp->pagesize,
+ PROT_READ);
+
+- atomic_init(&alloc_bhp->ref, 1);
++ __db_atomic_init(&alloc_bhp->ref, 1);
+ MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+ alloc_bhp->priority = bhp->priority;
+ alloc_bhp->pgno = bhp->pgno;
+diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c
+index 770bad8..dbce4f3 100644
+--- a/src/mp/mp_mvcc.c
++++ b/src/mp/mp_mvcc.c
+@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp)
+ #else
+ memcpy(frozen_bhp, bhp, SSZA(BH, buf));
+ #endif
+- atomic_init(&frozen_bhp->ref, 0);
++ __db_atomic_init(&frozen_bhp->ref, 0);
+ if (mutex != MUTEX_INVALID)
+ frozen_bhp->mtx_buf = mutex;
+ else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
+@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp)
+ #endif
+ alloc_bhp->mtx_buf = mutex;
+ MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+- atomic_init(&alloc_bhp->ref, 1);
++ __db_atomic_init(&alloc_bhp->ref, 1);
+ F_CLR(alloc_bhp, BH_FROZEN);
+ }
+
+diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c
+index 4952030..084f499 100644
+--- a/src/mp/mp_region.c
++++ b/src/mp/mp_region.c
+@@ -245,7 +245,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
+ MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
+ return (ret);
+ SH_TAILQ_INIT(&htab[i].hash_bucket);
+- atomic_init(&htab[i].hash_page_dirty, 0);
++ __db_atomic_init(&htab[i].hash_page_dirty, 0);
+ }
+
+ /*
+@@ -302,7 +302,7 @@ no_prealloc:
+ } else
+ hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount);
+ SH_TAILQ_INIT(&hp->hash_bucket);
+- atomic_init(&hp->hash_page_dirty, 0);
++ __db_atomic_init(&hp->hash_page_dirty, 0);
+ #ifdef HAVE_STATISTICS
+ hp->hash_io_wait = 0;
+ hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
+diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c
+index 09353b0..3c954b9 100644
+--- a/src/mutex/mut_method.c
++++ b/src/mutex/mut_method.c
+@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval, newval)
+ MUTEX_LOCK(env, mtx);
+ ret = atomic_read(v) == oldval;
+ if (ret)
+- atomic_init(v, newval);
++ __db_atomic_init(v, newval);
+ MUTEX_UNLOCK(env, mtx);
+
+ return (ret);
+diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c
+index 106b161..5a3b033 100644
+--- a/src/mutex/mut_tas.c
++++ b/src/mutex/mut_tas.c
+@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags)
+
+ #ifdef HAVE_SHARED_LATCHES
+ if (F_ISSET(mutexp, DB_MUTEX_SHARED))
+- atomic_init(&mutexp->sharecount, 0);
++ __db_atomic_init(&mutexp->sharecount, 0);
+ else
+ #endif
+ if (MUTEX_INIT(&mutexp->tas)) {
+@@ -536,7 +536,7 @@ __db_tas_mutex_unlock(env, mutex)
+ F_CLR(mutexp, DB_MUTEX_LOCKED);
+ /* Flush flag update before zeroing count */
+ MEMBAR_EXIT();
+- atomic_init(&mutexp->sharecount, 0);
++ __db_atomic_init(&mutexp->sharecount, 0);
+ } else {
+ DB_ASSERT(env, sharecount > 0);
+ MEMBAR_EXIT();
+--
+2.20.1
+
diff --git a/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch b/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch
new file mode 100644
index 0000000000..571708e03e
--- /dev/null
+++ b/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch
@@ -0,0 +1,45 @@
+From 29621d637e30982489693f2e207ce6a1790e3337 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 22 Mar 2017 15:32:26 +0000
+Subject: [PATCH] atomic: Rename local __atomic_compare_exchange to avoid clash
+ with builtins
+
+Helps building with clang
+
+Fixes
+
+../db-5.3.28/src/dbinc/atomic.h:179:19: error: definition of builtin function '__atomic_compare_exchange'
+static inline int __atomic_compare_exchange(
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/dbinc/atomic.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index 6a858f7..1b49de5 100644
+--- a/src/dbinc/atomic.h
++++ b/src/dbinc/atomic.h
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __db_atomic_compare_exchange((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __db_atomic_compare_exchange(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch b/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch
new file mode 100644
index 0000000000..cb28db1343
--- /dev/null
+++ b/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch
@@ -0,0 +1,42 @@
+From 32e5943a3c4637d39e4d65b544dcb99e280210e3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Jul 2017 10:54:26 -0700
+Subject: [PATCH] configure: Add explicit tag options to libtool invocation
+
+This helps cross compile when tag inference via heuristics
+fail because CC variable is having -fPIE -pie and libtool
+smartly removes it when building libraries
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dist/configure.ac | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/dist/configure.ac b/dist/configure.ac
+index 689f3b8..9c14bdb 100644
+--- a/dist/configure.ac
++++ b/dist/configure.ac
+@@ -366,12 +366,12 @@ LIBTOOL="./libtool"
+
+ INSTALLER="\$(LIBTOOL) --mode=install cp -p"
+
+-MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}"
+-MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version"
+-MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK}"
+-MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}"
+-MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
+-MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
++MAKEFILE_CC="\$(LIBTOOL) --tag=CC --mode=compile ${MAKEFILE_CC}"
++MAKEFILE_SOLINK="\$(LIBTOOL) --tag=CC --mode=link ${MAKEFILE_CCLINK} -avoid-version"
++MAKEFILE_CCLINK="\$(LIBTOOL) --tag=CC --mode=link ${MAKEFILE_CCLINK}"
++MAKEFILE_CXX="\$(LIBTOOL) --tag=CXX --mode=compile ${MAKEFILE_CXX}"
++MAKEFILE_XSOLINK="\$(LIBTOOL) --tag=CXX --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
++MAKEFILE_CXXLINK="\$(LIBTOOL) --tag=CXX --mode=link ${MAKEFILE_CXXLINK}"
+
+
+ case "$host_os" in
+--
+2.13.3
+
diff --git a/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch b/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
deleted file mode 100644
index d4c6bb8e05..0000000000
--- a/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2902dda6e3f7b2cd5796a96af20deece610e2eb9 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 16 Nov 2015 22:20:49 -0800
-Subject: [PATCH] build_unix/Makefile: let libdb-6.0.la depend os_map.lo
-
-Fixed parallel issue:
-libtool: link: `os_map.lo' is not a valid libtool object
-Makefile:867: recipe for target 'libdb-6.0.la' failed
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- dist/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dist/Makefile.in b/dist/Makefile.in
-index 0a42375..d9e05b9 100644
---- a/dist/Makefile.in
-+++ b/dist/Makefile.in
-@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
- $(LN) -s $(libdb_version) $(libdb)
-
- # Shared C library.
--$(libso_target): $(C_OBJS) bt_rec@o@
-+$(libso_target): $(C_OBJS) bt_rec@o@ os_map@o@
- $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
- $(LIBCSO_LIBS)
- $(RM) $(libdb)
---
-1.7.9.5
-
diff --git a/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch b/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
deleted file mode 100644
index 9ec117ae4e..0000000000
--- a/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c640ff9340f358a00835816d0fea03d27a7be978 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 31 Mar 2015 00:56:44 -0700
-Subject: [PATCH] Makefile: let libso_target depend on bt_rec
-
-Fixed parallel issue:
-libtool: link: `bt_rec.lo' is not a valid libtool object
-Makefile:867: recipe for target 'libdb-6.0.la' failed
-make: *** [libdb-6.0.la] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index e451f70..0a42375 100644
---- db/dist/Makefile.in
-+++ db/dist/Makefile.in
-@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
- $(LN) -s $(libdb_version) $(libdb)
-
- # Shared C library.
--$(libso_target): $(C_OBJS)
-+$(libso_target): $(C_OBJS) bt_rec@o@
- $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
- $(LIBCSO_LIBS)
- $(RM) $(libdb)
diff --git a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
deleted file mode 100644
index 34e8db84df..0000000000
--- a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Original patch submitted by jbowler@nslu2-linux.org on 2005-11-17:
-
-db: fix thumb uclibc operation in 4.3.29
- - uclibc thumb builds were using libpthread to implement mutexes, the
- - uclibc version seems to be a stub (at least on thumb). This commit
- - fixes the ARM/gcc-assembly mutex implementation so that it has thumb
- - support and the resultant db4 works (tested on LE Thumb uclibc)
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Author: jbowler@nslu2-linux.org
-
---- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600
-+++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600
-@@ -474,6 +474,25 @@
-
- #ifdef LOAD_ACTUAL_MUTEX_CODE
- /* gcc/arm: 0 is clear, 1 is set. */
-+#if defined __thumb__
-+#define MUTEX_SET(tsl) ({ \
-+ int __r, __p; \
-+ __asm__ volatile( \
-+ ".align 2\n\t" \
-+ "bx pc\n\t" \
-+ "nop\n\t" \
-+ ".arm\n\t" \
-+ "swpb %0, %2, [%3]\n\t" \
-+ "eor %0, %0, #1\n\t" \
-+ "orr %1, pc, #1\n\t" \
-+ "bx %1\n\t" \
-+ ".force_thumb" \
-+ : "=&r" (__r), "=r" (__p) \
-+ : "r" (1), "r" (tsl) \
-+ ); \
-+ __r & 1; \
-+})
-+#else
- #define MUTEX_SET(tsl) ({ \
- int __r; \
- __asm__ volatile( \
-@@ -484,6 +503,7 @@
- ); \
- __r & 1; \
- })
-+#endif
-
- #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
- #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
diff --git a/meta/recipes-support/db/db/fix-parallel-build.patch b/meta/recipes-support/db/db/fix-parallel-build.patch
index 88bc6b35e5..27632e1ddb 100644
--- a/meta/recipes-support/db/db/fix-parallel-build.patch
+++ b/meta/recipes-support/db/db/fix-parallel-build.patch
@@ -6,9 +6,11 @@ Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---- db/dist.orig/Makefile.in 2012-05-11 19:57:48.000000000 +0200
-+++ db/dist/Makefile.in 2013-10-31 18:17:11.875532522 +0100
-@@ -1034,7 +1034,7 @@
+Index: db-6.0.30/dist/Makefile.in
+===================================================================
+--- db-6.0.30.orig/dist/Makefile.in
++++ db-6.0.30/dist/Makefile.in
+@@ -1041,7 +1041,7 @@ db_recover: db_recover@o@ util_sig@o@ $(
db_recover@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
diff --git a/meta/recipes-support/db/db/sequence-type.patch b/meta/recipes-support/db/db/sequence-type.patch
new file mode 100644
index 0000000000..a6fe3d62a0
--- /dev/null
+++ b/meta/recipes-support/db/db/sequence-type.patch
@@ -0,0 +1,59 @@
+configure wants to use host-specific types to get a 64-bit integer in db.h
+instead of using an alias such as int64_t. This means that the header differs
+in multilib environments for no good reason, so replace the type with the alias
+in stdint.h.
+
+This then breaks the overly complicated type check but as we know that int64_t
+exists and works, we can just delete that.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- a/dist/aclocal/sequence.m4~ 2013-09-09 16:35:02.000000000 +0100
++++ b/dist/aclocal/sequence.m4 2017-11-01 13:21:45.472295971 +0000
+@@ -24 +24 @@
+- db_cv_seq_type="long"
++ db_cv_seq_type="int64_t"
+@@ -31 +31 @@
+- db_cv_seq_type="long long"
++ db_cv_seq_type="int64_t"
+@@ -41,38 +41 @@
+- # Test to see if we can declare variables of the appropriate size
+- # and format them. If we're cross-compiling, all we get is a link
+- # test, which won't test for the appropriate printf format strings.
+- if test "$db_cv_build_sequence" = "yes"; then
+- AC_TRY_RUN([
+- main() {
+- $db_cv_seq_type l;
+- unsigned $db_cv_seq_type u;
+- char buf@<:@100@:>@;
+-
+- buf@<:@0@:>@ = 'a';
+- l = 9223372036854775807LL;
+- (void)snprintf(buf, sizeof(buf), $db_cv_seq_fmt, l);
+- if (strcmp(buf, "9223372036854775807"))
+- return (1);
+- u = 18446744073709551615ULL;
+- (void)snprintf(buf, sizeof(buf), $db_cv_seq_ufmt, u);
+- if (strcmp(buf, "18446744073709551615"))
+- return (1);
+- return (0);
+- }],, [db_cv_build_sequence="no"],
+- AC_TRY_LINK(,[
+- $db_cv_seq_type l;
+- unsigned $db_cv_seq_type u;
+- char buf@<:@100@:>@;
+-
+- buf@<:@0@:>@ = 'a';
+- l = 9223372036854775807LL;
+- (void)snprintf(buf, sizeof(buf), $db_cv_seq_fmt, l);
+- if (strcmp(buf, "9223372036854775807"))
+- return (1);
+- u = 18446744073709551615ULL;
+- (void)snprintf(buf, sizeof(buf), $db_cv_seq_ufmt, u);
+- if (strcmp(buf, "18446744073709551615"))
+- return (1);
+- return (0);
+- ],, [db_cv_build_sequence="no"]))
+- fi
++ db_cv_build_sequence="yes"
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
index 0b51a1d440..a2969055a6 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -10,17 +10,27 @@
# same system at the same time if really necessary.
SECTION = "libs"
SUMMARY = "Berkeley Database v5"
-HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+HOMEPAGE = "https://www.oracle.com/database/technologies/related/berkeleydb.html"
LICENSE = "Sleepycat"
-VIRTUAL_NAME ?= "virtual/db"
RCONFLICTS_${PN} = "db3"
-PR = "r1"
+CVE_PRODUCT = "oracle_berkeley_db"
+CVE_VERSION = "11.2.${PV}"
-SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
-SRC_URI += "file://arm-thumb-mutex_db5.patch \
- file://fix-parallel-build.patch \
+PR = "r1"
+PE = "1"
+
+SRC_URI = "https://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
+SRC_URI += "file://fix-parallel-build.patch \
+ file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \
+ file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \
+ file://sequence-type.patch \
+ file://0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch \
"
+# We are not interested in official latest 6.x versions;
+# let's track what debian is using.
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/db5.3/"
+UPSTREAM_CHECK_REGEX = "db5\.3_(?P<pver>\d+(\.\d+)+).+\.orig"
SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
@@ -29,15 +39,6 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
inherit autotools
-# Put virtual/db in any appropriate provider of a
-# relational database, use it as a dependency in
-# place of a specific db and use:
-#
-# PREFERRED_PROVIDER_virtual/db
-#
-# to select the correct db in the build (distro) .conf
-PROVIDES += "${VIRTUAL_NAME}"
-
# The executables go in a separate package - typically there
# is no need to install these unless doing real database
# management on the system.
@@ -46,7 +47,6 @@ inherit lib_package
PACKAGES =+ "${PN}-cxx"
FILES_${PN}-cxx = "${libdir}/*cxx*so"
-
# The dev package has the .so link (as in db3) and the .a's -
# it is therefore incompatible (cannot be installed at the
# same time) as the db3 package
@@ -56,36 +56,38 @@ FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
#configuration - set in local.conf to override
# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
-DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
-
-EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
-
-# Override the MUTEX setting here, the POSIX library is
-# the default - "POSIX/pthreads/library".
-# Don't ignore the nice SWP instruction on the ARM:
-# These enable the ARM assembler mutex code, this won't
-# work with thumb compilation...
-ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
-MUTEX = ""
-MUTEX_arm = "${ARM_MUTEX}"
-MUTEX_armeb = "${ARM_MUTEX}"
-EXTRA_OECONF += "${MUTEX} STRIP=true"
-EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
+DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-compat185 --disable-sql"
+
+EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot STRIP=true"
+
+PACKAGECONFIG[verify] = "--enable-verify, --disable-verify"
+EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'"
+
+EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java"
AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
# Cancel the site stuff - it's set for db3 and destroys the
# configure.
CONFIG_SITE = ""
-do_configure() {
- cd ${B}
- gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH}
- oe_runconf
+
+oe_runconf_prepend() {
+ . ${S}/dist/RELEASE
+ # Edit version information we couldn't pre-compute.
+ sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \
+ -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure
}
do_compile_prepend() {
# Stop libtool adding RPATHs
- sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool
+ sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/${HOST_SYS}-libtool
}
do_install_append() {
diff --git a/meta/recipes-support/db/db_6.0.30.bb b/meta/recipes-support/db/db_6.0.30.bb
deleted file mode 100644
index 072cbdf217..0000000000
--- a/meta/recipes-support/db/db_6.0.30.bb
+++ /dev/null
@@ -1,123 +0,0 @@
-# Version 6 of the Berkeley DB from Oracle (formerly Sleepycat)
-#
-# At present this package only installs the DB code
-# itself (shared libraries, .a in the dev package),
-# documentation and headers.
-#
-# The headers have the same names as those as v3
-# of the DB, only one version can be used *for dev*
-# at once - DB3 and DB6 can both be installed on the
-# same system at the same time if really necessary.
-SECTION = "libs"
-SUMMARY = "Berkeley Database v6"
-HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-LICENSE = "AGPL-3.0"
-VIRTUAL_NAME ?= "virtual/db"
-RCONFLICTS_${PN} = "db3"
-
-PR = "r1"
-
-# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support.
-
-SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz \
- file://arm-thumb-mutex_db5.patch \
- file://fix-parallel-build.patch \
- file://Makefile-let-libso_target-depend-on-bt_rec.patch \
- file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch \
- "
-
-SRC_URI[md5sum] = "ad28eb86ad3203b5422844db179c585b"
-SRC_URI[sha256sum] = "608e4b1cf390e9bf54c0ef00c5bd9ca76d36e2261b9f4d33d54516f3f6a20fd2"
-
-# Exclude NC versions which lack AES encryption
-UPSTREAM_CHECK_REGEX = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar"
-UPSTREAM_CHECK_URI = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
-
-# Put virtual/db in any appropriate provider of a
-# relational database, use it as a dependency in
-# place of a specific db and use:
-#
-# PREFERRED_PROVIDER_virtual/db
-#
-# to select the correct db in the build (distro) .conf
-PROVIDES += "${VIRTUAL_NAME}"
-
-inherit autotools
-
-# The executables go in a separate package - typically there
-# is no need to install these unless doing real database
-# management on the system.
-inherit lib_package
-
-PACKAGES =+ "${PN}-cxx"
-FILES_${PN}-cxx = "${libdir}/*cxx*so"
-
-# The dev package has the .so link (as in db3) and the .a's -
-# it is therefore incompatible (cannot be installed at the
-# same time) as the db3 package
-# sort out the .so since they do version prior to the .so
-SOLIBS = "-6*.so"
-FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
-
-#configuration - set in local.conf to override
-# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
-DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
-
-EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot"
-
-# Cancel the site stuff - it's set for db3 and destroys the configure.
-CONFIG_SITE = ""
-
-AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
-
-do_configure() {
- cd ${B}
- gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH}
- oe_runconf
-}
-
-# Override the MUTEX setting here, the POSIX library is
-# the default - "POSIX/pthreads/library".
-# Don't ignore the nice SWP instruction on the ARM:
-# These enable the ARM assembler mutex code
-ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
-MUTEX = ""
-MUTEX_arm = "${ARM_MUTEX}"
-MUTEX_armeb = "${ARM_MUTEX}"
-EXTRA_OECONF += "${MUTEX}"
-EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
-EXTRA_OEMAKE += "STRIP=true"
-
-do_compile_prepend() {
- # Stop libtool adding RPATHs
- sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool
-}
-
-do_install_append() {
- mkdir -p ${D}/${includedir}/db60
- mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/.
- mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/.
- ln -s db60/db.h ${D}/${includedir}/db.h
- ln -s db60/db_cxx.h ${D}/${includedir}/db_cxx.h
-
- # The docs end up in /usr/docs - not right.
- if test -d "${D}/${prefix}/docs"
- then
- mkdir -p "${D}/${datadir}"
- test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
- mv "${D}/${prefix}/docs" "${D}/${docdir}"
- fi
-
- chown -R root:root ${D}
-}
-
-# libdb isn't versioned in the typical manner (libdb-6.0.so is the full library
-# name) so skip these checks.
-INSANE_SKIP_${PN} = "dev-so"
-INSANE_SKIP_${PN}-cxx = "dev-so"
-
-BBCLASSEXTEND = "native nativesdk"
-
-RECIPE_NO_UPDATE_REASON = "latest db does not work with RPM-5.x due to changes in locking semantics"
diff --git a/meta/recipes-support/debianutils/debianutils_4.8.6.3.bb b/meta/recipes-support/debianutils/debianutils_4.8.6.3.bb
new file mode 100644
index 0000000000..a69d01e0f9
--- /dev/null
+++ b/meta/recipes-support/debianutils/debianutils_4.8.6.3.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20190717T213444Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
+# the package is taken from snapshots.debian.org; that source is static and goes stale
+# so we check the latest upstream from a directory that does get updated
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
+
+SRC_URI[md5sum] = "ca57cc6621275346d7d516ab0b5fa1f5"
+SRC_URI[sha256sum] = "2cc7de3afc6df1cf6d00af9938efac7ee8f739228e548e512ddc186b6a7be221"
+
+inherit autotools update-alternatives
+
+do_configure_prepend() {
+ sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
+}
+
+do_install_append() {
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ # Debian places some utils into ${base_bindir} as does busybox
+ install -d ${D}${base_bindir}
+ for app in run-parts tempfile; do
+ mv ${D}${bindir}/$app ${D}${base_bindir}/$app
+ done
+ fi
+}
+
+# Note that we package the update-alternatives name.
+#
+PACKAGES =+ "${PN}-run-parts"
+FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
+
+RDEPENDS_${PN} += "${PN}-run-parts"
+RDEPENDS_${PN}_class-native = ""
+
+ALTERNATIVE_PRIORITY="30"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
+
+ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
+ALTERNATIVE_${PN}-run-parts = "run-parts"
+
+ALTERNATIVE_${PN}-doc = "which.1"
+ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
+
+ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
+ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
+ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
+ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
+ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
+ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
+ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/debianutils/debianutils_4.8.bb b/meta/recipes-support/debianutils/debianutils_4.8.bb
deleted file mode 100644
index d969fd3c9a..0000000000
--- a/meta/recipes-support/debianutils/debianutils_4.8.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Miscellaneous utilities specific to Debian"
-SECTION = "base"
-LICENSE = "GPLv2 & SMAIL_GPL"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160629T224408Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
-# the package is taken from snapshots.debian.org; that source is static and goes stale
-# so we check the latest upstream from a directory that does get updated
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
-
-SRC_URI[md5sum] = "66a37e5ff17be431319bd0b43e9a46b5"
-SRC_URI[sha256sum] = "afa95bbe6b6fd3ef3c0c838b2d7232f09fabeff593ca4b5583cffa6748567ee2"
-
-inherit autotools update-alternatives
-
-do_configure_prepend() {
- sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
-}
-
-do_install_append() {
- if [ "${base_bindir}" != "${bindir}" ]; then
- # Debian places some utils into ${base_bindir} as does busybox
- install -d ${D}${base_bindir}
- for app in run-parts tempfile; do
- mv ${D}${bindir}/$app ${D}${base_bindir}/$app
- done
- fi
-}
-
-# Note that we package the update-alternatives name.
-#
-PACKAGES =+ "${PN}-run-parts"
-FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
-
-RDEPENDS_${PN} += "${PN}-run-parts"
-
-
-ALTERNATIVE_PRIORITY="30"
-ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
-ALTERNATIVE_${PN}-run-parts = "run-parts"
-
-ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
-ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
-ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
-ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
-ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
-ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
-ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
diff --git a/meta/recipes-support/dos2unix/dos2unix_7.4.1.bb b/meta/recipes-support/dos2unix/dos2unix_7.4.1.bb
new file mode 100644
index 0000000000..1623285fd0
--- /dev/null
+++ b/meta/recipes-support/dos2unix/dos2unix_7.4.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Convert text file line endings between CRLF and LF"
+DESCRIPTION = "The Dos2unix package includes utilities dos2unix and \
+unix2dos to convert plain text files in DOS or Mac format to Unix \
+format and vice versa."
+HOMEPAGE = "http://waterlan.home.xs4all.nl/dos2unix.html"
+SECTION = "support"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=0c977b18f0a384d03597a517d7d03e32"
+
+SRC_URI = "git://git.code.sf.net/p/dos2unix/dos2unix"
+UPSTREAM_CHECK_GITTAGREGEX = "dos2unix-(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV = "0490f0723b1a0851b17343f6164915f3474b5197"
+
+S = "${WORKDIR}/git/dos2unix"
+
+inherit gettext perlnative
+
+# The dos2unix NLS relies on po4a-native, while po4a recipe is
+# provided by meta-perl layer, so make it optional here, you
+# need have meta-perl in bblayers.conf before enabling nls in
+# PACKAGECONFIG.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[nls] = "ENABLE_NLS=1,ENABLE_NLS=,po4a-native"
+
+EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} LDFLAGS_USER='${LDFLAGS}'"
+EXTRA_OEMAKE_class-native = "ENABLE_NLS="
+
+do_install () {
+ oe_runmake DESTDIR="${D}${base_prefix}" install
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/fribidi/fribidi_1.0.7.bb b/meta/recipes-support/fribidi/fribidi_1.0.7.bb
new file mode 100644
index 0000000000..6738884016
--- /dev/null
+++ b/meta/recipes-support/fribidi/fribidi_1.0.7.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Free Implementation of the Unicode Bidirectional Algorithm"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \
+ "
+SRC_URI[md5sum] = "4c020b0f5136dd012ee00f1e1122f6aa"
+SRC_URI[sha256sum] = "5ab5f21e9f2fc57b4b40f8ea8f14dba78a5cc46d9cf94bc5e00a58e6886a935d"
+
+UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
+
+inherit meson lib_package pkgconfig
+
+CVE_PRODUCT = "gnu_fribidi"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gdbm/files/ptest.patch b/meta/recipes-support/gdbm/files/ptest.patch
index 65236fb48b..1e67dbd554 100644
--- a/meta/recipes-support/gdbm/files/ptest.patch
+++ b/meta/recipes-support/gdbm/files/ptest.patch
@@ -1,30 +1,40 @@
-Add install-ptest rules.
+From 41448708e163c8ec1f980464e7dd6741db427c8a Mon Sep 17 00:00:00 2001
+From: Josep Puigdemont <josep.puigdemont@enea.com>
+Date: Sun, 4 May 2014 16:02:07 +0200
+Subject: [PATCH] Add install-ptest rules.
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Signed-off-by: Maxin B. John <maxin.john@enea.com>
Upstream-Status: Pending
-diff -ur a/Makefile.am b/Makefile.am
---- a/Makefile.am 2011-08-16 10:13:10.000000000 +0200
-+++ b/Makefile.am 2013-04-12 18:02:16.473715873 +0200
-@@ -31,3 +31,8 @@
- d=`date '+%d/%m/%Y'`; \
- sed 's|/\*@DIST_DATE@\*/|"'"$$d"'"|' $(srcdir)/src/version.c > \
- $(distdir)/src/version.c
+---
+ Makefile.am | 5 +++++
+ tests/Makefile.am | 11 +++++++++++
+ 2 files changed, 16 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index ecc03df..9fbbda5 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -55,3 +55,8 @@ ChangeLog:
+ awk -f $(top_srcdir)/git2chg.awk \
+ -v append=$(top_srcdir)/$(prev_change_log) > ChangeLog; \
+ fi
+
+install-ptest:
+ @for subdir in $(SUBDIRS); do \
+ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
+ done
-diff -ur a/tests/Makefile.am b/tests/Makefile.am
---- a/tests/Makefile.am 2011-11-11 19:39:42.000000000 +0100
-+++ b/tests/Makefile.am 2013-04-12 18:30:57.066301037 +0200
-@@ -132,4 +132,14 @@
- dtdel_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
- d_creat_ce_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index dbe17dd..06f537f 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -169,3 +169,14 @@ EXTRA_DIST += \
+ gdbmtool/base.exp\
+ config/default.exp
+buildtests: $(check_PROGRAMS) $(TESTSUITE)
-
++
+install-ptest: $(check_PROGRAMS) $(TESTSUITE)
+ @$(INSTALL) -d $(DESTDIR)
+ @for file in $^; do \
diff --git a/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
deleted file mode 100644
index d3cb43b9b9..0000000000
--- a/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Obey LDFLAGS
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Inappropriate [old version]
-
---- gdbm-1.8.3.orig/Makefile.in
-+++ gdbm-1.8.3/Makefile.in
-@@ -156,12 +156,12 @@ install-compat:
-
- libgdbm.la: $(LOBJS) gdbm.h
- rm -f libgdbm.la
-- $(LIBTOOL) --mode=link $(CC) -o libgdbm.la -rpath $(libdir) \
-+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libgdbm.la -rpath $(libdir) \
- -version-info $(SHLIB_VER) $(LOBJS)
-
- libgdbm_compat.la: $(C_LOBJS) gdbm.h
- rm -f libgdbm_compat.la
-- $(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \
-+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libgdbm_compat.la -rpath $(libdir) \
- -version-info $(SHLIB_VER) $(C_LOBJS)
-
- gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2
diff --git a/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch
deleted file mode 100644
index 0f9d04f4a1..0000000000
--- a/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Pending
-
---- gdbm-1.8.3/Makefile.in.orig 2006-02-16 15:17:25.000000000 +0000
-+++ gdbm-1.8.3/Makefile.in 2006-02-16 15:18:08.000000000 +0000
-@@ -131,7 +131,7 @@
- $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
- $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \
- $(DESTDIR)$(infodir)
-- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
-+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
- $(INSTALL_DATA) gdbm.h \
- $(DESTDIR)$(includedir)/gdbm.h
- $(INSTALL_DATA) $(srcdir)/gdbm.3 \
-@@ -142,7 +142,7 @@
- install-compat:
- $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
- $(DESTDIR)$(includedir)
-- $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
-+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm_compat.la \
- $(DESTDIR)$(libdir)/libgdbm_compat.la
- $(INSTALL_DATA) $(srcdir)/dbm.h \
- $(DESTDIR)$(includedir)/dbm.h
diff --git a/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch
deleted file mode 100644
index 369145c410..0000000000
--- a/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Upstream-Status: Pending
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
---- gdbm-1.8.3/Makefile.in~makefile
-+++ gdbm-1.8.3/Makefile.in
-@@ -22,6 +22,7 @@
- TEXI2DVI = texi2dvi
-
- DEFS =
-+DESTDIR =
-
- # Where the system [n]dbm routines are...
- LIBS = @LIBS@ -lc
-@@ -127,26 +128,26 @@
- progs: $(PROGS)
-
- install: libgdbm.la gdbm.h gdbm.info
-- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
-- $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \
-- $(INSTALL_ROOT)$(infodir)
-- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
-- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \
-- $(INSTALL_ROOT)$(includedir)/gdbm.h
-- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \
-- $(INSTALL_ROOT)$(man3dir)/gdbm.3
-- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \
-- $(INSTALL_ROOT)$(infodir)/gdbm.info
-+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
-+ $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \
-+ $(DESTDIR)$(infodir)
-+ $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
-+ $(INSTALL_DATA) gdbm.h \
-+ $(DESTDIR)$(includedir)/gdbm.h
-+ $(INSTALL_DATA) $(srcdir)/gdbm.3 \
-+ $(DESTDIR)$(man3dir)/gdbm.3
-+ $(INSTALL_DATA) $(srcdir)/gdbm.info \
-+ $(DESTDIR)$(infodir)/gdbm.info
-
- install-compat:
-- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
-- $(INSTALL_ROOT)$(includedir)
-+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
-+ $(DESTDIR)$(includedir)
- $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
-- $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la
-- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \
-- $(INSTALL_ROOT)$(includedir)/dbm.h
-- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \
-- $(INSTALL_ROOT)$(includedir)/ndbm.h
-+ $(DESTDIR)$(libdir)/libgdbm_compat.la
-+ $(INSTALL_DATA) $(srcdir)/dbm.h \
-+ $(DESTDIR)$(includedir)/dbm.h
-+ $(INSTALL_DATA) $(srcdir)/ndbm.h \
-+ $(DESTDIR)$(includedir)/ndbm.h
-
- #libgdbm.a: $(OBJS) gdbm.h
- # rm -f libgdbm.a
diff --git a/meta/recipes-support/gdbm/gdbm_1.12.bb b/meta/recipes-support/gdbm/gdbm_1.12.bb
deleted file mode 100644
index c380073c35..0000000000
--- a/meta/recipes-support/gdbm/gdbm_1.12.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Key/value database library with extensible hashing"
-HOMEPAGE = "http://www.gnu.org/software/gdbm/"
-SECTION = "libs"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
-
-
-SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
- file://run-ptest \
- file://ptest.patch \
- "
-
-SRC_URI[md5sum] = "9ce96ff4c99e74295ea19040931c8fb9"
-SRC_URI[sha256sum] = "d97b2166ee867fd6ca5c022efee80702d6f30dd66af0e03ed092285c3af9bcea"
-
-inherit autotools gettext texinfo lib_package ptest
-
-# Needed for dbm python module
-EXTRA_OECONF = "-enable-libgdbm-compat"
-
-# Stop presence of dbm/nbdm on the host contaminating builds
-CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_append () {
- # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
- # these headers
- install -d ${D}${includedir}/gdbm
- ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
- ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
-}
-
-RDEPENDS_${PN}-ptest += "diffutils"
-
-do_compile_ptest() {
- oe_runmake -C tests buildtests
-}
-
-PACKAGES =+ "${PN}-compat \
- "
-FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
- "
diff --git a/meta/recipes-support/gdbm/gdbm_1.18.1.bb b/meta/recipes-support/gdbm/gdbm_1.18.1.bb
new file mode 100644
index 0000000000..16ecc506ce
--- /dev/null
+++ b/meta/recipes-support/gdbm/gdbm_1.18.1.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Key/value database library with extensible hashing"
+HOMEPAGE = "http://www.gnu.org/software/gdbm/"
+SECTION = "libs"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
+
+
+SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
+ file://run-ptest \
+ file://ptest.patch \
+ "
+
+SRC_URI[md5sum] = "988dc82182121c7570e0cb8b4fcd5415"
+SRC_URI[sha256sum] = "86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc"
+
+inherit autotools gettext texinfo lib_package ptest
+
+# Needed for dbm python module
+EXTRA_OECONF = "-enable-libgdbm-compat"
+
+# Stop presence of dbm/nbdm on the host contaminating builds
+CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append () {
+ # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
+ # these headers
+ install -d ${D}${includedir}/gdbm
+ ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
+ ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
+}
+
+RDEPENDS_${PN}-ptest += "diffutils ${PN}-bin"
+
+do_compile_ptest() {
+ oe_runmake -C tests buildtests
+}
+
+PACKAGES =+ "${PN}-compat \
+ "
+FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
+ "
diff --git a/meta/recipes-support/gdbm/gdbm_1.8.3.bb b/meta/recipes-support/gdbm/gdbm_1.8.3.bb
deleted file mode 100644
index b253dc1447..0000000000
--- a/meta/recipes-support/gdbm/gdbm_1.8.3.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Key/value database library with extensible hashing"
-HOMEPAGE = "http://www.gnu.org/software/gdbm/"
-SECTION = "libs"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8e20eece214df8ef953ed5857862150"
-
-PR = "r4"
-
-SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
- file://makefile.patch \
- file://libtool-mode.patch \
- file://ldflags.patch"
-
-SRC_URI[md5sum] = "1d1b1d5c0245b1c00aff92da751e9aa1"
-SRC_URI[sha256sum] = "cc340338a2e28b40058ab9eb5354a21d53f88a1582ea21ba0bb185c37a281dc9"
-
-inherit autotools texinfo
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_append () {
- oe_runmake install-compat DESTDIR=${D}
- install -d ${D}${includedir}/gdbm
- install -m 0644 ${S}/dbm.h ${D}${includedir}/
- install -m 0644 ${S}/ndbm.h ${D}${includedir}/
- # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
- # these headers
- ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
- ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
-}
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch b/meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch
deleted file mode 100644
index 627d71aba9..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 3cb33502bafd04b8ad4ca3454fab16d5ff313297 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 22 Sep 2015 13:16:23 +0300
-Subject: [PATCH] Use __gnu_inline__ attribute
-
-gcc5 uses C11 inline rules. This means the old "extern inline"
-semantics are not available without a special attribute.
-
-See: https://gcc.gnu.org/gcc-5/porting_to.html
-
-Upstream-Status: Inappropriate [Fixed in current versions]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- gmp-h.in | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/gmp-h.in b/gmp-h.in
-index eed6fe4..361dd1d 100644
---- a/gmp-h.in
-+++ b/gmp-h.in
-@@ -419,8 +419,11 @@ typedef __mpq_struct *mpq_ptr;
- /* gcc has __inline__ in all modes, including strict ansi. Give a prototype
- for an inline too, so as to correctly specify "dllimport" on windows, in
- case the function is called rather than inlined. */
-+
-+/* Use __gnu_inline__ attribute: later gcc uses different "extern inline"
-+ behaviour */
- #ifdef __GNUC__
--#define __GMP_EXTERN_INLINE extern __inline__
-+#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__))
- #define __GMP_INLINE_PROTOTYPES 1
- #endif
-
---
-2.1.4
-
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch b/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch
deleted file mode 100644
index 6da0be9ca0..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From d50686de0406a88ef9112f5252103f799982e84a Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Thu, 4 Feb 2016 14:00:00 -0800
-Subject: [PATCH] avoid h asm constraint for MIPS
-
-The h asm constrain (to extract the high part of a multiplication
-result) has not been recognised since gcc 4.4:
-
- https://gcc.gnu.org/gcc-4.4/changes.html
-
-Drop the MIPS umul_ppmm() implementations which rely on "=h" and fall
-back to the older implementations (which use explicit mfhi and mflo
-instructions to move the high and low parts of the multiplication
-result into their destinations).
-
-Upstream-Status: Inappropriate [upstream has a different solution]
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- longlong.h | 10 ----------
- 1 file changed, 10 deletions(-)
-
-diff --git a/longlong.h b/longlong.h
-index b53fbee..0193abb 100644
---- a/longlong.h
-+++ b/longlong.h
-@@ -1011,27 +1011,17 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype));
- #endif /* __m88000__ */
-
- #if defined (__mips) && W_TYPE_SIZE == 32
--#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
--#define umul_ppmm(w1, w0, u, v) \
-- __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
--#else
- #define umul_ppmm(w1, w0, u, v) \
- __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1" \
- : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
--#endif
- #define UMUL_TIME 10
- #define UDIV_TIME 100
- #endif /* __mips */
-
- #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
--#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
--#define umul_ppmm(w1, w0, u, v) \
-- __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
--#else
- #define umul_ppmm(w1, w0, u, v) \
- __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1" \
- : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
--#endif
- #define UMUL_TIME 20
- #define UDIV_TIME 140
- #endif /* __mips */
---
-1.9.1
-
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch b/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
deleted file mode 100644
index 26fd8ef8bc..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| configure.in:2240: error: automatic de-ANSI-fication support has been removed
-| Makefile.am:28: error: automatic de-ANSI-fication support has been removed
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/02
-
-
-This patch was removed in f181c6ce8b3 when gmp 4.2.1 was mistakenly
-dropped.
-
-Upstream is not interested in patches for ancient versions.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-
-Index: gmp-4.2.1/configure.in
-===================================================================
---- gmp-4.2.1.orig/configure.in
-+++ gmp-4.2.1/configure.in
-@@ -67,7 +67,7 @@ dnl
- dnl Note that there's a copy of these options in the top-level Makefile.am,
- dnl so update there too if changing anything.
- dnl
--AM_INIT_AUTOMAKE([1.8 gnu no-dependencies $(top_builddir)/ansi2knr])
-+AM_INIT_AUTOMAKE([1.8 gnu no-dependencies])
- AM_CONFIG_HEADER(config.h:config.in)
- AM_MAINTAINER_MODE
-
-@@ -2022,9 +2022,6 @@ fi
- echo " MPN_PATH=\"$path\""
-
-
--# Automake ansi2knr support.
--AM_C_PROTOTYPES
--
- GMP_PROG_AR
- GMP_PROG_NM
-
-Index: gmp-4.2.1/Makefile.am
-===================================================================
---- gmp-4.2.1.orig/Makefile.am
-+++ gmp-4.2.1/Makefile.am
-@@ -27,7 +27,7 @@
- # Makefiles in subdirectories, but here we must omit it so automake gives
- # the actual ansi2knr build rule, not "cd $(top_builddir) && make ansi2knr".
- #
--AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies ansi2knr
-+AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies
-
-
- # Libtool -version-info for libgmp.la and libmp.la. See "Versioning" in the
diff --git a/meta/recipes-support/gmp/gmp-6.1.1/amd64.patch b/meta/recipes-support/gmp/gmp-6.1.1/amd64.patch
deleted file mode 100644
index 564d12d42b..0000000000
--- a/meta/recipes-support/gmp/gmp-6.1.1/amd64.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Pending
-
-Index: gmp-5.0.3/longlong.h
-===================================================================
---- gmp-5.0.3.orig/longlong.h
-+++ gmp-5.0.3/longlong.h
-@@ -994,8 +994,10 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
- count is only an int. */
- #define count_trailing_zeros(count, x) \
- do { \
-+ UDItype __cbtmp; \
- ASSERT ((x) != 0); \
-- __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x))); \
-+ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
-+ (count) = __cbtmp; \
- } while (0)
- #endif /* x86_64 */
-
diff --git a/meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch b/meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch
deleted file mode 100644
index 74904a2530..0000000000
--- a/meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Index: gmp-4.2.4/Makefile.am
-===================================================================
---- gmp-4.2.4.orig/Makefile.am 2008-09-10 19:31:27.000000000 +0000
-+++ gmp-4.2.4/Makefile.am 2009-07-06 20:19:19.000000000 +0000
-@@ -106,7 +106,7 @@
- # but anyone knowledgable enough to be playing with exec_prefix will be able
- # to address that.
- #
--includeexecdir = $(exec_prefix)/include
-+includeexecdir = $(includedir)
- include_HEADERS = $(GMPXX_HEADERS_OPTION)
- nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION)
- lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION)
diff --git a/meta/recipes-support/gmp/gmp-6.1.1/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch b/meta/recipes-support/gmp/gmp-6.1.2/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
index 325ffe491f..325ffe491f 100644
--- a/meta/recipes-support/gmp/gmp-6.1.1/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
+++ b/meta/recipes-support/gmp/gmp-6.1.2/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
diff --git a/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch b/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
index 665367658b..1e47924ccc 100644
--- a/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch
+++ b/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
@@ -18,13 +18,13 @@ Upstream-Status: Inappropriate[OE-Specific]
configure.ac | 11 -----------
1 file changed, 11 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 857ea3b..359e919 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -607,15 +607,6 @@ case $host in
- GMP_INCLUDE_MPN(arm/arm-defs.m4)
- CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo'
+Index: gmp-6.1.2/configure.ac
+===================================================================
+--- gmp-6.1.2.orig/configure.ac
++++ gmp-6.1.2/configure.ac
+@@ -604,15 +604,6 @@ case $host in
+ any_32_testlist="sizeof-long-4"
+ any_64_testlist="sizeof-long-8"
- # This is needed for clang, which is not content with flags like -mfpu=neon
- # alone.
@@ -38,7 +38,7 @@ index 857ea3b..359e919 100644
# FIXME: We make mandatory compiler options optional here. We should
# either enforce them, or organise to strip paths as the corresponding
# options fail.
-@@ -686,8 +677,6 @@ case $host in
+@@ -746,8 +737,6 @@ case $host in
;;
*)
path="arm"
@@ -47,6 +47,3 @@ index 857ea3b..359e919 100644
;;
esac
;;
---
-1.9.1
-
diff --git a/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch b/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
new file mode 100644
index 0000000000..3935589f8b
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+Index: gmp-6.1.2/longlong.h
+===================================================================
+--- gmp-6.1.2.orig/longlong.h
++++ gmp-6.1.2/longlong.h
+@@ -1036,8 +1036,10 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype
+ count is only an int. */
+ #define count_trailing_zeros(count, x) \
+ do { \
++ UDItype __cbtmp; \
+ ASSERT ((x) != 0); \
+- __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x))); \
++ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
++ (count) = __cbtmp; \
+ } while (0)
+ #endif /* __amd64__ */
+
diff --git a/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch b/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
new file mode 100644
index 0000000000..6b089cf39c
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Index: gmp-6.1.2/Makefile.am
+===================================================================
+--- gmp-6.1.2.orig/Makefile.am
++++ gmp-6.1.2/Makefile.am
+@@ -130,7 +130,7 @@ EXTRA_DIST += gmpxx.h
+ # but anyone knowledgeable enough to be playing with exec_prefix will be able
+ # to address that.
+ #
+-includeexecdir = $(exec_prefix)/include
++includeexecdir = $(includedir)
+ include_HEADERS = $(GMPXX_HEADERS_OPTION)
+ nodist_includeexec_HEADERS = gmp.h
+ lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION)
diff --git a/meta/recipes-support/gmp/gmp.inc b/meta/recipes-support/gmp/gmp.inc
index abac8cf339..948b89288e 100644
--- a/meta/recipes-support/gmp/gmp.inc
+++ b/meta/recipes-support/gmp/gmp.inc
@@ -3,7 +3,7 @@ DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operati
HOMEPAGE = "http://gmplib.org/"
SECTION = "devel"
-inherit autotools texinfo
+inherit autotools texinfo multilib_header
PACKAGECONFIG ??= ""
PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline"
diff --git a/meta/recipes-support/gmp/gmp_4.2.1.bb b/meta/recipes-support/gmp/gmp_4.2.1.bb
deleted file mode 100644
index 5e8ee29f36..0000000000
--- a/meta/recipes-support/gmp/gmp_4.2.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require gmp.inc
-
-LICENSE = "LGPLv2.1+ & GPLv2+"
-LICENSE_${PN} = "LGPLv2.1+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a \
- file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \
- file://gmp-h.in;beginline=6;endline=21;md5=e056f74a12c3277d730dbcfb85d2ca34"
-
-SRC_URI = "https://gmplib.org/download/${BPN}/archive/${BP}.tar.bz2 \
- file://Use-__gnu_inline__-attribute.patch \
- file://gmp_fix_for_automake-1.12.patch \
- file://avoid-h-asm-constraint-for-MIPS.patch \
-"
-
-SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3"
-SRC_URI[sha256sum] = "d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941"
diff --git a/meta/recipes-support/gmp/gmp_6.1.1.bb b/meta/recipes-support/gmp/gmp_6.1.1.bb
deleted file mode 100644
index 303c3ef9e2..0000000000
--- a/meta/recipes-support/gmp/gmp_6.1.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require gmp.inc
-
-LICENSE = "GPLv2+ | LGPLv3+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-"
-
-REVISION = ""
-SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
- file://amd64.patch \
- file://use-includedir.patch \
- file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
- file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
- "
-
-SRC_URI[md5sum] = "4c175f86e11eb32d8bf9872ca3a8e11d"
-SRC_URI[sha256sum] = "a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6"
-
-acpaths = ""
-
-EXTRA_OECONF += " --enable-cxx=detect"
-
-PACKAGES =+ "libgmpxx"
-FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
-
-do_install_append_class-target() {
- sed -i "s|--sysroot=${STAGING_DIR_HOST}||g" ${D}${includedir}/gmp.h
-}
-
-SSTATE_SCAN_FILES += "gmp.h"
-
-# Doesn't compile in MIPS16e mode due to use of hand-written
-# assembly
-MIPS_INSTRUCTION_SET = "mips"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gmp/gmp_6.1.2.bb b/meta/recipes-support/gmp/gmp_6.1.2.bb
new file mode 100644
index 0000000000..c745dbbfe7
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp_6.1.2.bb
@@ -0,0 +1,45 @@
+require gmp.inc
+
+LICENSE = "GPLv2+ | LGPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+"
+
+REVISION = ""
+SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
+ file://amd64.patch \
+ file://use-includedir.patch \
+ file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
+ file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
+ "
+SRC_URI[md5sum] = "8ddbb26dc3bd4e2302984debba1406a5"
+SRC_URI[sha256sum] = "5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2"
+
+acpaths = ""
+
+EXTRA_OECONF += " --enable-cxx=detect"
+EXTRA_OECONF_mipsarchr6_append = " --disable-assembly"
+
+PACKAGES =+ "libgmpxx"
+FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
+
+do_install_append() {
+ oe_multilib_header gmp.h
+}
+
+do_install_prepend_class-target() {
+ sed -i \
+ -e "s|--sysroot=${STAGING_DIR_HOST}||g" \
+ -e "s|${DEBUG_PREFIX_MAP}||g" \
+ ${B}/gmp.h
+}
+
+SSTATE_SCAN_FILES += "gmp.h"
+
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
deleted file mode 100644
index 840666f302..0000000000
--- a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From b1de2c6290bc0651fe87a8c4fb52e7a0a5fe6322 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 5 Oct 2014 16:01:49 -0700
-Subject: [PATCH] gsystem-subprocess.c: Enable GNU extensions in system C
- library
-
-This should export O_CLOEXEC where it is only
-available when _GNU_SOURCE is defined .e.g. uclibc based systems
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
----
- src/libgsystem/gsystem-subprocess.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/libgsystem/gsystem-subprocess.c b/src/libgsystem/gsystem-subprocess.c
-index a967896..a52a362 100644
---- a/src/libgsystem/gsystem-subprocess.c
-+++ b/src/libgsystem/gsystem-subprocess.c
-@@ -18,6 +18,10 @@
-
- #include "config.h"
-
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+
- #define _GSYSTEM_NO_LOCAL_ALLOC
- #include "libgsystem.h"
-
---
-2.1.1
-
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch
deleted file mode 100644
index 5a178e2ef1..0000000000
--- a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-
-The terms `FAIL` instead of `FAILED` and `SKIP` instead of `SKIPPED`
-match what Automake does
-
-Upstream-Status: Accepted
-[ https://git.gnome.org/browse/gnome-desktop-testing/commit/?id=048850731a640532ef55a61df7357fcc6d2ad501 ]
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur gnome-desktop-testing-2014.1-orig/src/gnome-desktop-testing-runner.c gnome-desktop-testing-2014.1/src/gnome-desktop-testing-runner.c
---- gnome-desktop-testing-2014.1-orig/src/gnome-desktop-testing-runner.c 2014-01-16 12:58:26.000000000 +0200
-+++ gnome-desktop-testing-2014.1/src/gnome-desktop-testing-runner.c 2015-11-02 11:27:34.010594126 +0200
-@@ -280,12 +280,12 @@
- else if (test->state == TEST_STATE_COMPLETE_FAILED)
- {
- msgid_value = ONE_TEST_FAILED_MSGID;
-- msg = g_strconcat ("FAILED: ", test->name, " (", reason, ")", NULL);
-+ msg = g_strconcat ("FAIL: ", test->name, " (", reason, ")", NULL);
- }
- else if (test->state == TEST_STATE_COMPLETE_SKIPPED)
- {
- msgid_value = ONE_TEST_SKIPPED_MSGID;
-- msg = g_strconcat ("SKIPPED: ", test->name, NULL);
-+ msg = g_strconcat ("SKIP: ", test->name, NULL);
- }
- else
- g_assert_not_reached ();
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
deleted file mode 100644
index ccb3d3b7dc..0000000000
--- a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Test runner for GNOME-style installed tests"
-HOMEPAGE = "https://wiki.gnome.org/GnomeGoals/InstalledTests"
-LICENSE = "LGPLv2+"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
- file://0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch \
- file://update-output-syntax.patch \
- "
-SRC_URI[md5sum] = "a608ad72a77e23a1aecdfd8d07a94baf"
-SRC_URI[sha256sum] = "1a3eed73678dd22d09d6a7ec4f899557df3e8b4a802affa76d0f163b31286539"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://src/gnome-desktop-testing-runner.c;endline=19;md5=67311a600b83fd0068dfc7e5b84ffb3f"
-
-DEPENDS = "glib-2.0"
-
-inherit autotools pkgconfig
-
-PR = "r1"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[journald] = "--with-systemd-journal,--without-systemd-journal,systemd,systemd"
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2018.1.bb b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2018.1.bb
new file mode 100644
index 0000000000..0defebeb15
--- /dev/null
+++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2018.1.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Test runner for GNOME-style installed tests"
+HOMEPAGE = "https://wiki.gnome.org/GnomeGoals/InstalledTests"
+LICENSE = "LGPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://src/gnome-desktop-testing-runner.c;beginline=1;endline=20;md5=7ef3ad9da2ffcf7707dc11151fe007f4"
+
+SRC_URI = "git://gitlab.gnome.org/GNOME/gnome-desktop-testing.git;protocol=http"
+SRCREV = "4decade67b29ad170fcf3de148e41695fc459f48"
+
+DEPENDS = "glib-2.0"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = ",,systemd"
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
deleted file mode 100644
index f0667741c8..0000000000
--- a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From e2202ff2b704623efc6277fb5256e4e15bac5676 Mon Sep 17 00:00:00 2001
-From: Werner Koch <wk@gnupg.org>
-Date: Thu, 25 Jul 2013 11:17:52 +0200
-Subject: [PATCH] Mitigate a flush+reload cache attack on RSA secret
- exponents.
-
-commit e2202ff2b704623efc6277fb5256e4e15bac5676 from
-git://git.gnupg.org/libgcrypt.git
-
-* mpi/mpi-pow.c (gcry_mpi_powm): Always perfrom the mpi_mul for
-exponents in secure memory.
-
-Upstream-Status: Backport
-CVE: CVE-2013-4242
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
-
-The attack is published as http://eprint.iacr.org/2013/448 :
-
-Flush+Reload: a High Resolution, Low Noise, L3 Cache Side-Channel
-Attack by Yuval Yarom and Katrina Falkner. 18 July 2013.
-
- Flush+Reload is a cache side-channel attack that monitors access to
- data in shared pages. In this paper we demonstrate how to use the
- attack to extract private encryption keys from GnuPG. The high
- resolution and low noise of the Flush+Reload attack enables a spy
- program to recover over 98% of the bits of the private key in a
- single decryption or signing round. Unlike previous attacks, the
- attack targets the last level L3 cache. Consequently, the spy
- program and the victim do not need to share the execution core of
- the CPU. The attack is not limited to a traditional OS and can be
- used in a virtualised environment, where it can attack programs
- executing in a different VM.
-
-Index: gnupg-1.4.7/mpi/mpi-pow.c
-===================================================================
---- gnupg-1.4.7.orig/mpi/mpi-pow.c
-+++ gnupg-1.4.7/mpi/mpi-pow.c
-@@ -212,7 +212,13 @@ mpi_powm( MPI res, MPI base, MPI exponen
- tp = rp; rp = xp; xp = tp;
- rsize = xsize;
-
-- if( (mpi_limb_signed_t)e < 0 ) {
-+ /* To mitigate the Yarom/Falkner flush+reload cache
-+ * side-channel attack on the RSA secret exponent, we do
-+ * the multiplication regardless of the value of the
-+ * high-bit of E. But to avoid this performance penalty
-+ * we do it only if the exponent has been stored in secure
-+ * memory and we can thus assume it is a secret exponent. */
-+ if (esec || (mpi_limb_signed_t)e < 0) {
- /*mpihelp_mul( xp, rp, rsize, bp, bsize );*/
- if( bsize < KARATSUBA_THRESHOLD ) {
- mpihelp_mul( xp, rp, rsize, bp, bsize );
-@@ -227,6 +233,8 @@ mpi_powm( MPI res, MPI base, MPI exponen
- mpihelp_divrem(xp + msize, 0, xp, xsize, mp, msize);
- xsize = msize;
- }
-+ }
-+ if ( (mpi_limb_signed_t)e < 0 ) {
-
- tp = rp; rp = xp; xp = tp;
- rsize = xsize;
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
deleted file mode 100644
index b50a32f40c..0000000000
--- a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Upstream-Status: Backport
-CVE: CVE-2013-4351
-
-Index: gnupg-1.4.7/g10/getkey.c
-===================================================================
---- gnupg-1.4.7.orig/g10/getkey.c 2007-03-05 16:54:41.000000000 +0800
-+++ gnupg-1.4.7/g10/getkey.c 2013-11-28 14:41:59.640212240 +0800
-@@ -1454,7 +1454,11 @@
-
- if(flags)
- key_usage |= PUBKEY_USAGE_UNKNOWN;
-+ if (!key_usage)
-+ key_usage |= PUBKEY_USAGE_NONE;
- }
-+ else if (p)
-+ key_usage |= PUBKEY_USAGE_NONE;
-
- /* We set PUBKEY_USAGE_UNKNOWN to indicate that this key has a
- capability that we do not handle. This serves to distinguish
-Index: gnupg-1.4.7/g10/keygen.c
-===================================================================
---- gnupg-1.4.7.orig/g10/keygen.c 2007-02-05 00:27:40.000000000 +0800
-+++ gnupg-1.4.7/g10/keygen.c 2013-11-28 14:43:05.016670092 +0800
-@@ -209,9 +209,6 @@
- if (use & PUBKEY_USAGE_AUTH)
- buf[0] |= 0x20;
-
-- if (!buf[0])
-- return;
--
- build_sig_subpkt (sig, SIGSUBPKT_KEY_FLAGS, buf, 1);
- }
-
-Index: gnupg-1.4.7/include/cipher.h
-===================================================================
---- gnupg-1.4.7.orig/include/cipher.h 2006-04-21 20:39:49.000000000 +0800
-+++ gnupg-1.4.7/include/cipher.h 2013-11-28 14:49:24.159322744 +0800
-@@ -52,6 +52,7 @@
- #define PUBKEY_USAGE_CERT 4 /* key is also good to certify other keys*/
- #define PUBKEY_USAGE_AUTH 8 /* key is good for authentication */
- #define PUBKEY_USAGE_UNKNOWN 128 /* key has an unknown usage bit */
-+#define PUBKEY_USAGE_NONE 256 /* No usage given. */
-
- #define DIGEST_ALGO_MD5 1
- #define DIGEST_ALGO_SHA1 2
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
deleted file mode 100644
index 5dcde1f9cb..0000000000
--- a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Upstream-Status: Backport
-CVE: CVE-2013-4576
-
-Index: gnupg-1.4.7/cipher/dsa.c
-===================================================================
---- gnupg-1.4.7.orig/cipher/dsa.c 2006-12-12 02:27:21.000000000 +0800
-+++ gnupg-1.4.7/cipher/dsa.c 2014-01-23 11:30:17.300915919 +0800
-@@ -287,6 +287,8 @@
- MPI kinv;
- MPI tmp;
-
-+ mpi_normalize (hash);
-+
- /* select a random k with 0 < k < q */
- k = gen_k( skey->q );
-
-Index: gnupg-1.4.7/cipher/elgamal.c
-===================================================================
---- gnupg-1.4.7.orig/cipher/elgamal.c 2006-12-12 03:08:05.000000000 +0800
-+++ gnupg-1.4.7/cipher/elgamal.c 2014-01-23 11:30:17.300915919 +0800
-@@ -376,6 +376,9 @@
- {
- MPI t1 = mpi_alloc_secure( mpi_get_nlimbs( skey->p ) );
-
-+ mpi_normalize (a);
-+ mpi_normalize (b);
-+
- /* output = b/(a^x) mod p */
- mpi_powm( t1, a, skey->x, skey->p );
- mpi_invm( t1, t1, skey->p );
-Index: gnupg-1.4.7/cipher/random.c
-===================================================================
---- gnupg-1.4.7.orig/cipher/random.c 2006-11-03 18:09:39.000000000 +0800
-+++ gnupg-1.4.7/cipher/random.c 2014-01-23 11:31:53.993495462 +0800
-@@ -273,6 +273,18 @@
- }
-
-
-+/* Randomize the MPI */
-+void
-+randomize_mpi (MPI mpi, size_t nbits, int level)
-+{
-+ unsigned char *buffer;
-+
-+ buffer = get_random_bits (nbits, level, mpi_is_secure (mpi));
-+ mpi_set_buffer (mpi, buffer, (nbits+7)/8, 0);
-+ xfree (buffer);
-+}
-+
-+
- int
- random_is_faked()
- {
-Index: gnupg-1.4.7/cipher/random.h
-===================================================================
---- gnupg-1.4.7.orig/cipher/random.h 2006-02-09 19:29:29.000000000 +0800
-+++ gnupg-1.4.7/cipher/random.h 2014-01-23 11:30:17.300915919 +0800
-@@ -32,6 +32,7 @@
- int random_is_faked(void);
- void random_disable_locking (void);
- void randomize_buffer( byte *buffer, size_t length, int level );
-+void randomize_mpi (MPI mpi, size_t nbits, int level);
- byte *get_random_bits( size_t nbits, int level, int secure );
- void fast_random_poll( void );
-
-Index: gnupg-1.4.7/cipher/rsa.c
-===================================================================
---- gnupg-1.4.7.orig/cipher/rsa.c 2006-12-12 03:09:00.000000000 +0800
-+++ gnupg-1.4.7/cipher/rsa.c 2014-01-23 11:35:04.330639125 +0800
-@@ -301,9 +301,26 @@
- #if 0
- mpi_powm( output, input, skey->d, skey->n );
- #else
-- MPI m1 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
-- MPI m2 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
-- MPI h = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
-+ int nlimbs = mpi_get_nlimbs (skey->n)+1;
-+ MPI m1 = mpi_alloc_secure (nlimbs);
-+ MPI m2 = mpi_alloc_secure (nlimbs);
-+ MPI h = mpi_alloc_secure (nlimbs);
-+# if 1
-+ MPI bdata= mpi_alloc_secure (nlimbs);
-+ MPI r = mpi_alloc_secure (nlimbs);
-+# endif
-+
-+ /* Remove superfluous leading zeroes from INPUT. */
-+ mpi_normalize (input);
-+
-+# if 1
-+ /* Blind: bdata = (data * r^e) mod n */
-+ randomize_mpi (r, mpi_get_nbits (skey->n), 0);
-+ mpi_fdiv_r (r, r, skey->n);
-+ mpi_powm (bdata, r, skey->e, skey->n);
-+ mpi_mulm (bdata, bdata, input, skey->n);
-+ input = bdata;
-+# endif
-
- /* m1 = c ^ (d mod (p-1)) mod p */
- mpi_sub_ui( h, skey->p, 1 );
-@@ -321,8 +338,15 @@
- /* m = m2 + h * p */
- mpi_mul ( h, h, skey->p );
- mpi_add ( output, m1, h );
-- /* ready */
--
-+
-+# if 1
-+ mpi_free (bdata);
-+ /* Unblind: output = (output * r^(-1)) mod n */
-+ mpi_invm (r, r, skey->n);
-+ mpi_mulm (output, output, r, skey->n);
-+ mpi_free (r);
-+# endif
-+
- mpi_free ( h );
- mpi_free ( m1 );
- mpi_free ( m2 );
-@@ -397,6 +421,7 @@
- rsa_decrypt( int algo, MPI *result, MPI *data, MPI *skey )
- {
- RSA_secret_key sk;
-+ MPI input;
-
- if( algo != 1 && algo != 2 )
- return G10ERR_PUBKEY_ALGO;
-@@ -407,8 +432,14 @@
- sk.p = skey[3];
- sk.q = skey[4];
- sk.u = skey[5];
-- *result = mpi_alloc_secure( mpi_get_nlimbs( sk.n ) );
-- secret( *result, data[0], &sk );
-+
-+ /* Mitigates side-channel attacks (CVE-2013-4576). */
-+ input = mpi_alloc (0);
-+ mpi_normalize (data[0]);
-+ mpi_fdiv_r (input, data[0], sk.n);
-+ *result = mpi_alloc_secure (mpi_get_nlimbs (sk.n));
-+ secret (*result, input, &sk);
-+ mpi_free (input);
- return 0;
- }
-
-Index: gnupg-1.4.7/g10/gpgv.c
-===================================================================
---- gnupg-1.4.7.orig/g10/gpgv.c 2006-12-13 19:25:04.000000000 +0800
-+++ gnupg-1.4.7/g10/gpgv.c 2014-01-23 11:30:17.300915919 +0800
-@@ -390,6 +390,7 @@
- void random_dump_stats(void) {}
- int quick_random_gen( int onoff ) { return -1;}
- void randomize_buffer( byte *buffer, size_t length, int level ) {}
-+void randomize_mpi (MPI mpi, size_t nbits, int level) {}
- int random_is_faked() { return -1;}
- byte *get_random_bits( size_t nbits, int level, int secure ) { return NULL;}
- void set_random_seed_file( const char *name ) {}
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
deleted file mode 100644
index 362717636b..0000000000
--- a/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-commit f0b33b6fb8e0586e9584a7a409dcc31263776a67
-Author: Werner Koch <wk@gnupg.org>
-Date: Thu Dec 20 09:43:41 2012 +0100
-
- gpg: Import only packets which are allowed in a keyblock.
-
- * g10/import.c (valid_keyblock_packet): New.
- (read_block): Store only valid packets.
- --
-
- A corrupted key, which for example included a mangled public key
- encrypted packet, used to corrupt the keyring. This change skips all
- packets which are not allowed in a keyblock.
-
- GnuPG-bug-id: 1455
-
- (cherry-picked from commit f795a0d59e197455f8723c300eebf59e09853efa)
-
-Upstream-Status: Backport
-CVE: CVE-2012-6085
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-diff --git a/g10/import.c b/g10/import.c
-index bfe02eb..a57b32e 100644
---- a/g10/import.c
-+++ b/g10/import.c
-@@ -384,6 +384,27 @@ import_print_stats (void *hd)
- }
-
-
-+/* Return true if PKTTYPE is valid in a keyblock. */
-+static int
-+valid_keyblock_packet (int pkttype)
-+{
-+ switch (pkttype)
-+ {
-+ case PKT_PUBLIC_KEY:
-+ case PKT_PUBLIC_SUBKEY:
-+ case PKT_SECRET_KEY:
-+ case PKT_SECRET_SUBKEY:
-+ case PKT_SIGNATURE:
-+ case PKT_USER_ID:
-+ case PKT_ATTRIBUTE:
-+ case PKT_RING_TRUST:
-+ return 1;
-+ default:
-+ return 0;
-+ }
-+}
-+
-+
- /****************
- * Read the next keyblock from stream A.
- * PENDING_PKT should be initialzed to NULL
-@@ -461,7 +482,7 @@ read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
- }
- in_cert = 1;
- default:
-- if( in_cert ) {
-+ if (in_cert && valid_keyblock_packet (pkt->pkttype)) {
- if( !root )
- root = new_kbnode( pkt );
- else
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch
deleted file mode 100644
index e005ac658f..0000000000
--- a/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: gnupg-1.4.7/configure.ac
-===================================================================
---- gnupg-1.4.7.orig/configure.ac
-+++ gnupg-1.4.7/configure.ac
-@@ -827,7 +827,6 @@ else
- AC_SUBST(USE_NLS)
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(BUILD_INCLUDED_LIBINTL)
-- AM_PO_SUBDIRS
- fi
-
- if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch
deleted file mode 100644
index e5fb24aa63..0000000000
--- a/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-
-This has been discussed in a couple of different bug reported
-upstream:
-
-http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486250
-http://bugs.sourcemage.org/show_bug.cgi?id=14446
-
-Fix:
-http://lists.gnupg.org/pipermail/gnupg-devel/2008-April/024344.html
-
-Upstream-Status: Backport [Debian]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: gnupg-1.4.7/keyserver/gpgkeys_curl.c
-===================================================================
---- gnupg-1.4.7.orig/keyserver/gpgkeys_curl.c
-+++ gnupg-1.4.7/keyserver/gpgkeys_curl.c
-@@ -286,7 +286,7 @@ main(int argc,char *argv[])
- curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
- }
-
-- curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,opt->flags.check_cert);
-+ curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,(long)opt->flags.check_cert);
- curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file);
-
- if(proxy)
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch
deleted file mode 100644
index 2855cab24b..0000000000
--- a/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Orignal Patch came from OpenWrt via OE-Classic
-https://dev.openwrt.org/browser/packages/utils/gnupg/patches/001-mips_gcc4.4
-which is no longer a valid revision!
-
-Upstream-Status: Inappropriate [configuration]
-
-
---- gnupg/mpi/longlong.h~ 2006-02-14 10:09:55.000000000 +0000
-+++ gnupg/mpi/longlong.h 2008-10-27 13:11:09.000000000 +0000
-@@ -181,7 +181,7 @@
- /***************************************
- ************** ARM ******************
- ***************************************/
--#if defined (__arm__) && W_TYPE_SIZE == 32
-+#if defined (__arm__) && W_TYPE_SIZE == 32 && !defined(__thumb__)
- #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
- __asm__ ("adds %1, %4, %5\n" \
- "adc %0, %2, %3" \
-
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
deleted file mode 100644
index 9a03b2b705..0000000000
--- a/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-
-From Openembedded-Classic
-
- gnupg-1.4.10: Readd the ARM Thumb patch as debian has no thumb support
-
-
-Upstream-Status: Inappropriate [embedded-specific]
-
-Index: gnupg-1.4.10/mpi/longlong.h
-===================================================================
---- gnupg-1.4.10.orig/mpi/longlong.h 2008-12-11 17:39:43.000000000 +0100
-+++ gnupg-1.4.10/mpi/longlong.h 2010-03-27 14:27:53.000000000 +0100
-@@ -706,18 +706,35 @@
- #endif /* __m88110__ */
- #endif /* __m88000__ */
-
-+/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
-+#if defined (__GNUC__) && defined (__GNUC_MINOR__)
-+#define __GNUC_PREREQ(maj, min) \
-+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-+#else
-+#define __GNUC_PREREQ(maj, min) 0
-+#endif
-+
- /***************************************
- ************** MIPS *****************
- ***************************************/
- #if defined (__mips__) && W_TYPE_SIZE == 32
--#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
-+#if __GNUC_PREREQ (4,4)
-+#define umul_ppmm(w1, w0, u, v) \
-+ do { \
-+ UDItype __ll = (UDItype)(u) * (v); \
-+ w1 = __ll >> 32; \
-+ w0 = __ll; \
-+ } while (0)
-+#endif
-+#if !defined (umul_ppmm) && __GNUC_PREREQ (2,7)
- #define umul_ppmm(w1, w0, u, v) \
- __asm__ ("multu %2,%3" \
- : "=l" ((USItype)(w0)), \
- "=h" ((USItype)(w1)) \
- : "d" ((USItype)(u)), \
- "d" ((USItype)(v)))
--#else
-+#endif
-+#if !defined (umul_ppmm)
- #define umul_ppmm(w1, w0, u, v) \
- __asm__ ("multu %2,%3 \n" \
- "mflo %0 \n" \
diff --git a/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch b/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch
new file mode 100644
index 0000000000..5c9c022226
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch
@@ -0,0 +1,105 @@
+From 59a3c76d4016ffc615f1c45184f4c6820061d69c Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Wed, 16 Aug 2017 11:14:12 +0800
+Subject: [PATCH 1/4] Use pkg-config to find pth instead of pth-config.
+
+Upstream-Status: Denied
+[not submitted but they've been clear they don't want a pkg-config
+dependency]
+
+RP 2014/5/22
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Rebase to 2.1.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ m4/gnupg-pth.m4 | 53 ++++++++---------------------------------------------
+ 1 file changed, 8 insertions(+), 45 deletions(-)
+
+diff --git a/m4/gnupg-pth.m4 b/m4/gnupg-pth.m4
+index 6dc9e0e..5892531 100644
+--- a/m4/gnupg-pth.m4
++++ b/m4/gnupg-pth.m4
+@@ -17,33 +17,9 @@ dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ # Taken and modified from the m4 macros which come with Pth.
+ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
+ [
+- _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'`
+ _req_version="ifelse([$1],,1.2.0,$1)"
++ PKG_CHECK_MODULES(PTH, [pth >= $_req_version], [have_pth=yes], [have_pth=no])
+
+- AC_MSG_CHECKING(for PTH - version >= $_req_version)
+- for _var in _pth_version _req_version; do
+- eval "_val=\"\$${_var}\""
+- _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'`
+- _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'`
+- _rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'`
+- _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'`
+- case $_rtype in
+- "a" ) _rtype=0 ;;
+- "b" ) _rtype=1 ;;
+- "." ) _rtype=2 ;;
+- esac
+- _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \
+- "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"`
+- eval "${_var}_hex=\"\$_hex\""
+- done
+- have_pth=no
+- if test ".$_pth_version_hex" != .; then
+- if test ".$_req_version_hex" != .; then
+- if test $_pth_version_hex -ge $_req_version_hex; then
+- have_pth=yes
+- fi
+- fi
+- fi
+ if test $have_pth = yes; then
+ AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING([whether PTH installation is sane])
+@@ -51,9 +27,9 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
+ _gnupg_pth_save_cflags=$CFLAGS
+ _gnupg_pth_save_ldflags=$LDFLAGS
+ _gnupg_pth_save_libs=$LIBS
+- CFLAGS="$CFLAGS `$PTH_CONFIG --cflags`"
+- LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`"
+- LIBS="$LIBS `$PTH_CONFIG --libs --all`"
++ CFLAGS="$CFLAGS $PTH_CFLAGS"
++ LDFLAGS="$LDFLAGS $PTH_LDFLAGS"
++ LIBS="$LIBS $PTH_LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
+ ],
+ [[ pth_init ();]])],
+@@ -80,26 +56,13 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
+ # PTH_CLFAGS and PTH_LIBS are AS_SUBST.
+ #
+ AC_DEFUN([GNUPG_PATH_PTH],
+-[ AC_ARG_WITH(pth-prefix,
+- AC_HELP_STRING([--with-pth-prefix=PFX],
+- [prefix where GNU Pth is installed (optional)]),
+- pth_config_prefix="$withval", pth_config_prefix="")
+- if test x$pth_config_prefix != x ; then
+- PTH_CONFIG="$pth_config_prefix/bin/pth-config"
+- fi
+- AC_PATH_PROG(PTH_CONFIG, pth-config, no)
++[
+ tmp=ifelse([$1], ,1.3.7,$1)
+- if test "$PTH_CONFIG" != "no"; then
+- GNUPG_PTH_VERSION_CHECK($tmp)
+- if test $have_pth = yes; then
+- PTH_CFLAGS=`$PTH_CONFIG --cflags`
+- PTH_LIBS=`$PTH_CONFIG --ldflags`
+- PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs --all`"
+- AC_DEFINE(HAVE_PTH, 1,
++ GNUPG_PTH_VERSION_CHECK($tmp)
++ if test $have_pth = yes; then
++ AC_DEFINE(HAVE_PTH, 1,
+ [Defined if the GNU Pth is available])
+- fi
+ fi
+ AC_SUBST(PTH_CFLAGS)
+ AC_SUBST(PTH_LIBS)
+ ])
+-
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/gnupg/gnupg/0001-Woverride-init-is-not-needed-with-gcc-9.patch b/meta/recipes-support/gnupg/gnupg/0001-Woverride-init-is-not-needed-with-gcc-9.patch
new file mode 100644
index 0000000000..83195b5bd4
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/0001-Woverride-init-is-not-needed-with-gcc-9.patch
@@ -0,0 +1,34 @@
+From e3adc816d2d56dd929016073937ba24e01e03cb8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 20 Dec 2018 17:37:48 -0800
+Subject: [PATCH] Woverride-init is not needed with gcc 9
+
+Fixes
+| ../../gnupg-2.2.12/dirmngr/dns.h:525:16: error: lvalue required as
+unary '&' operand |
+525 | dns_rr_i_init(&dns_quietinit((struct dns_rr_i){ 0, __VA_ARGS__
+}), (P))
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dirmngr/dns.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dirmngr/dns.h b/dirmngr/dns.h
+index 024d6dcc8..c6e141e16 100644
+--- a/dirmngr/dns.h
++++ b/dirmngr/dns.h
+@@ -139,7 +139,7 @@ DNS_PUBLIC int *dns_debug_p(void);
+ #define DNS_PRAGMA_QUIET _Pragma("clang diagnostic ignored \"-Winitializer-overrides\"")
+ #define DNS_PRAGMA_POP _Pragma("clang diagnostic pop")
+
+-#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4
++#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4 && __GNUC__ < 9)
+ #define DNS_PRAGMA_PUSH _Pragma("GCC diagnostic push")
+ #define DNS_PRAGMA_QUIET _Pragma("GCC diagnostic ignored \"-Woverride-init\"")
+ #define DNS_PRAGMA_POP _Pragma("GCC diagnostic pop")
+--
+2.17.1
+
diff --git a/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch b/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
new file mode 100644
index 0000000000..2c204e0245
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
@@ -0,0 +1,28 @@
+From e7ad11cf54475e455fdb84d118e4782961698567 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 22 Jan 2018 18:00:21 +0200
+Subject: [PATCH] configure.ac: use a custom value for the location of
+ gpg-agent socket in the filesystem
+
+This should avoid clashes with the host gpg-agent observed on autobuilders.
+
+Upstream-Status: Inappropriate [oe-core specific, and only for -native]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 919ab31..cd58fdb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1855,7 +1855,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
+
+ AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
+
+-AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent",
++AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent.yocto-native",
+ [The name of the agent socket])
+ AC_DEFINE_UNQUOTED(GPG_AGENT_EXTRA_SOCK_NAME, "S.gpg-agent.extra",
+ [The name of the agent socket for remote access])
diff --git a/meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch b/meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch
new file mode 100644
index 0000000000..6d86e5c99b
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch
@@ -0,0 +1,85 @@
+From 53c2aec2e13f4e2d09be7148869c862f07dfdd4d Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw@linux.intel.com>
+Date: Wed, 16 Aug 2017 11:16:30 +0800
+Subject: [PATCH 2/4] use pkgconfig instead of npth config
+
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Rebase to 2.1.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ m4/npth.m4 | 34 ++++++++--------------------------
+ 1 file changed, 8 insertions(+), 26 deletions(-)
+
+diff --git a/m4/npth.m4 b/m4/npth.m4
+index 17c2644..15a931b 100644
+--- a/m4/npth.m4
++++ b/m4/npth.m4
+@@ -17,10 +17,10 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG],
+ if test "x$npth_config_prefix" != x ; then
+ NPTH_CONFIG="$npth_config_prefix/bin/npth-config"
+ fi
+- AC_PATH_PROG(NPTH_CONFIG, npth-config, no)
++ AC_PATH_PROG(PKGCONFIG, pkg-config, no)
+
+- if test "$NPTH_CONFIG" != "no" ; then
+- npth_version=`$NPTH_CONFIG --version`
++ if test "$PKGCONFIG" != "no" ; then
++ npth_version=`$PKGCONFIG --modversion npth`
+ fi
+ npth_version_major=`echo $npth_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+@@ -45,7 +45,7 @@ AC_DEFUN([AM_PATH_NPTH],
+
+ AC_MSG_CHECKING(for NPTH - version >= $min_npth_version)
+ ok=no
+- if test "$NPTH_CONFIG" != "no" ; then
++ if test "$PKGCONFIG" != "no" ; then
+ req_major=`echo $min_npth_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+ req_minor=`echo $min_npth_version | \
+@@ -66,28 +66,9 @@ AC_DEFUN([AM_PATH_NPTH],
+ fi
+ if test $ok = yes; then
+ AC_MSG_RESULT([yes ($npth_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
+- if test $ok = yes; then
+- # If we have a recent NPTH, we should also check that the
+- # API is compatible.
+- if test "$req_npth_api" -gt 0 ; then
+- tmp=`$NPTH_CONFIG --api-version 2>/dev/null || echo 0`
+- if test "$tmp" -gt 0 ; then
+- AC_MSG_CHECKING([NPTH API version])
+- if test "$req_npth_api" -eq "$tmp" ; then
+- AC_MSG_RESULT([okay])
+- else
+- ok=no
+- AC_MSG_RESULT([does not match. want=$req_npth_api got=$tmp])
+- fi
+- fi
+- fi
+- fi
+- if test $ok = yes; then
+- NPTH_CFLAGS=`$NPTH_CONFIG --cflags`
+- NPTH_LIBS=`$NPTH_CONFIG --libs`
++ NPTH_CFLAGS=`$PKGCONFIG --cflags npth`
++ NPTH_LIBS=`$PKGCONFIG --libs npth`
++ AC_MSG_WARN([[GOT HERE - $NPTH_LIBS ]])
+ ifelse([$2], , :, [$2])
+ npth_config_host=`$NPTH_CONFIG --host 2>/dev/null || echo none`
+ if test x"$npth_config_host" != xnone ; then
+@@ -103,6 +84,7 @@ AC_DEFUN([AM_PATH_NPTH],
+ fi
+ fi
+ else
++ AC_MSG_RESULT(no)
+ NPTH_CFLAGS=""
+ NPTH_LIBS=""
+ ifelse([$3], , :, [$3])
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/gnupg/gnupg/0003-dirmngr-uses-libgpg-error.patch b/meta/recipes-support/gnupg/gnupg/0003-dirmngr-uses-libgpg-error.patch
new file mode 100644
index 0000000000..3e798efd06
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/0003-dirmngr-uses-libgpg-error.patch
@@ -0,0 +1,32 @@
+From 9c3858ffda6246bf9e1e6aeeb920532a56b19408 Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw@linux.intel.com>
+Date: Wed, 16 Aug 2017 11:18:01 +0800
+Subject: [PATCH 3/4] dirmngr uses libgpg error
+
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Rebase to 2.1.23
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ dirmngr/Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dirmngr/Makefile.am b/dirmngr/Makefile.am
+index b404165..d3f916e 100644
+--- a/dirmngr/Makefile.am
++++ b/dirmngr/Makefile.am
+@@ -82,7 +82,8 @@ endif
+ dirmngr_LDADD = $(libcommonpth) \
+ $(DNSLIBS) $(LIBASSUAN_LIBS) \
+ $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(NPTH_LIBS) \
+- $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV)
++ $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV) \
++ $(GPG_ERROR_LIBS)
+ if USE_LDAP
+ dirmngr_LDADD += $(ldaplibs)
+ endif
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch b/meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch
new file mode 100644
index 0000000000..dcd8582ca6
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch
@@ -0,0 +1,34 @@
+From 914ae4a3f7529fb069467bf0ded57dd24ee2e763 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Wed, 16 Aug 2017 11:23:22 +0800
+Subject: [PATCH 4/4] autogen.sh: fix find-version for beta checking
+
+find-version always assumes that gnupg is beta if autogen.sh is run
+out of git-repo. This doesn't work for users whom just take release
+tarball and re-run autoconf in their local build dir.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+Rebase to 2.1.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ autogen.sh | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index e5ba5bf..05e0e11 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -245,7 +245,6 @@ if [ "$myhost" = "find-version" ]; then
+ rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
+ else
+ ingit=no
+- beta=yes
+ tmp="-unknown"
+ rev="0000000"
+ rvd="0"
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/gnupg/gnupg/autogen.sh-fix-find-version-for-beta-checking.patch b/meta/recipes-support/gnupg/gnupg/autogen.sh-fix-find-version-for-beta-checking.patch
deleted file mode 100644
index 4241bc3a2e..0000000000
--- a/meta/recipes-support/gnupg/gnupg/autogen.sh-fix-find-version-for-beta-checking.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 717f994be2466d378e6611a4739c606db6d0dc46 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Sun, 25 Oct 2015 22:44:47 -0400
-Subject: [PATCH] autogen.sh: fix find-version for beta checking
-
-find-version always assumes that gnupg is beta if autogen.sh is run
-out of git-repo. This doesn't work for users whom just take release
-tarball and re-run autoconf in their local build dir.
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- autogen.sh | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/autogen.sh b/autogen.sh
-index 7effd56..d673432 100755
---- a/autogen.sh
-+++ b/autogen.sh
-@@ -228,7 +228,6 @@ if [ "$myhost" = "find-version" ]; then
- rvd=$((0x$(echo ${rev} | head -c 4)))
- else
- ingit=no
-- beta=yes
- tmp="-unknown"
- rev="0000000"
- rvd="0"
---
-1.9.1
-
diff --git a/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch b/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch
deleted file mode 100644
index 7af1955d52..0000000000
--- a/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Index: gnupg-2.1.0/dirmngr/Makefile.am
-===================================================================
---- gnupg-2.1.0.orig/dirmngr/Makefile.am
-+++ gnupg-2.1.0/dirmngr/Makefile.am
-@@ -78,7 +78,8 @@ endif
- dirmngr_LDADD = $(libcommontlsnpth) $(libcommonpth) \
- $(DNSLIBS) $(LIBASSUAN_LIBS) \
- $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(NPTH_LIBS) \
-- $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV)
-+ $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV) \
-+ $(GPG_ERROR_LIBS)
- if USE_LDAP
- dirmngr_LDADD += $(ldaplibs)
- endif
diff --git a/meta/recipes-support/gnupg/gnupg/pkgconfig.patch b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
deleted file mode 100644
index f958603ca7..0000000000
--- a/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-Use pkg-config to find pth instead of pth-config.
-
-Upstream-Status: Denied
-[not submitted but they've been clear they don't want a pkg-config dependency]
-
-RP 2014/5/22
-
-Index: gnupg-2.1.0/m4/gnupg-pth.m4
-===================================================================
---- gnupg-2.1.0.orig/m4/gnupg-pth.m4
-+++ gnupg-2.1.0/m4/gnupg-pth.m4
-@@ -17,33 +17,9 @@ dnl implied warranty of MERCHANTABILITY
- # Taken and modified from the m4 macros which come with Pth.
- AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
- [
-- _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'`
- _req_version="ifelse([$1],,1.2.0,$1)"
-+ PKG_CHECK_MODULES(PTH, [pth >= $_req_version], [have_pth=yes], [have_pth=no])
-
-- AC_MSG_CHECKING(for PTH - version >= $_req_version)
-- for _var in _pth_version _req_version; do
-- eval "_val=\"\$${_var}\""
-- _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'`
-- _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'`
-- _rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'`
-- _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'`
-- case $_rtype in
-- "a" ) _rtype=0 ;;
-- "b" ) _rtype=1 ;;
-- "." ) _rtype=2 ;;
-- esac
-- _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \
-- "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"`
-- eval "${_var}_hex=\"\$_hex\""
-- done
-- have_pth=no
-- if test ".$_pth_version_hex" != .; then
-- if test ".$_req_version_hex" != .; then
-- if test $_pth_version_hex -ge $_req_version_hex; then
-- have_pth=yes
-- fi
-- fi
-- fi
- if test $have_pth = yes; then
- AC_MSG_RESULT(yes)
- AC_MSG_CHECKING([whether PTH installation is sane])
-@@ -51,9 +27,9 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
- _gnupg_pth_save_cflags=$CFLAGS
- _gnupg_pth_save_ldflags=$LDFLAGS
- _gnupg_pth_save_libs=$LIBS
-- CFLAGS="$CFLAGS `$PTH_CONFIG --cflags`"
-- LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`"
-- LIBS="$LIBS `$PTH_CONFIG --libs --all`"
-+ CFLAGS="$CFLAGS $PTH_CFLAGS"
-+ LDFLAGS="$LDFLAGS $PTH_LDFLAGS"
-+ LIBS="$LIBS $PTH_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
- ],
- [[ pth_init ();]])],
-@@ -80,26 +56,13 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
- # PTH_CLFAGS and PTH_LIBS are AS_SUBST.
- #
- AC_DEFUN([GNUPG_PATH_PTH],
--[ AC_ARG_WITH(pth-prefix,
-- AC_HELP_STRING([--with-pth-prefix=PFX],
-- [prefix where GNU Pth is installed (optional)]),
-- pth_config_prefix="$withval", pth_config_prefix="")
-- if test x$pth_config_prefix != x ; then
-- PTH_CONFIG="$pth_config_prefix/bin/pth-config"
-- fi
-- AC_PATH_PROG(PTH_CONFIG, pth-config, no)
-+[
- tmp=ifelse([$1], ,1.3.7,$1)
-- if test "$PTH_CONFIG" != "no"; then
-- GNUPG_PTH_VERSION_CHECK($tmp)
-- if test $have_pth = yes; then
-- PTH_CFLAGS=`$PTH_CONFIG --cflags`
-- PTH_LIBS=`$PTH_CONFIG --ldflags`
-- PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs --all`"
-- AC_DEFINE(HAVE_PTH, 1,
-+ GNUPG_PTH_VERSION_CHECK($tmp)
-+ if test $have_pth = yes; then
-+ AC_DEFINE(HAVE_PTH, 1,
- [Defined if the GNU Pth is available])
-- fi
- fi
- AC_SUBST(PTH_CFLAGS)
- AC_SUBST(PTH_LIBS)
- ])
--
diff --git a/meta/recipes-support/gnupg/gnupg/relocate.patch b/meta/recipes-support/gnupg/gnupg/relocate.patch
new file mode 100644
index 0000000000..e5a82aa76d
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/relocate.patch
@@ -0,0 +1,89 @@
+From 59c077f32e81190955910cae02599c7a3edfa7fb Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 19 Sep 2018 14:44:40 +0100
+Subject: [PATCH] Allow the environment to override where gnupg looks for its
+ own files. Useful in native builds.
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ common/homedir.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/common/homedir.c b/common/homedir.c
+index e9e75d0..19140aa 100644
+--- a/common/homedir.c
++++ b/common/homedir.c
+@@ -760,7 +760,7 @@ gnupg_socketdir (void)
+ if (!name)
+ {
+ unsigned int dummy;
+- name = _gnupg_socketdir_internal (0, &dummy);
++ name = getenv("GNUPG_SOCKETDIR") ?: _gnupg_socketdir_internal (0, &dummy);
+ }
+
+ return name;
+@@ -786,7 +786,7 @@ gnupg_sysconfdir (void)
+ }
+ return name;
+ #else /*!HAVE_W32_SYSTEM*/
+- return GNUPG_SYSCONFDIR;
++ return getenv("GNUPG_SYSCONFDIR") ?: GNUPG_SYSCONFDIR;
+ #endif /*!HAVE_W32_SYSTEM*/
+ }
+
+@@ -815,7 +815,7 @@ gnupg_bindir (void)
+ else
+ return rdir;
+ #else /*!HAVE_W32_SYSTEM*/
+- return GNUPG_BINDIR;
++ return getenv("GNUPG_BINDIR") ?: GNUPG_BINDIR;
+ #endif /*!HAVE_W32_SYSTEM*/
+ }
+
+@@ -828,7 +828,7 @@ gnupg_libexecdir (void)
+ #ifdef HAVE_W32_SYSTEM
+ return gnupg_bindir ();
+ #else /*!HAVE_W32_SYSTEM*/
+- return GNUPG_LIBEXECDIR;
++ return getenv("GNUPG_LIBEXECDIR") ?: GNUPG_LIBEXECDIR;
+ #endif /*!HAVE_W32_SYSTEM*/
+ }
+
+@@ -842,7 +842,7 @@ gnupg_libdir (void)
+ name = xstrconcat (w32_rootdir (), DIRSEP_S "lib" DIRSEP_S "gnupg", NULL);
+ return name;
+ #else /*!HAVE_W32_SYSTEM*/
+- return GNUPG_LIBDIR;
++ return getenv("GNUPG_LIBDIR") ?: GNUPG_LIBDIR;
+ #endif /*!HAVE_W32_SYSTEM*/
+ }
+
+@@ -856,7 +856,7 @@ gnupg_datadir (void)
+ name = xstrconcat (w32_rootdir (), DIRSEP_S "share" DIRSEP_S "gnupg", NULL);
+ return name;
+ #else /*!HAVE_W32_SYSTEM*/
+- return GNUPG_DATADIR;
++ return getenv("GNUPG_DATADIR") ?: GNUPG_DATADIR;
+ #endif /*!HAVE_W32_SYSTEM*/
+ }
+
+@@ -872,7 +872,7 @@ gnupg_localedir (void)
+ NULL);
+ return name;
+ #else /*!HAVE_W32_SYSTEM*/
+- return LOCALEDIR;
++ return getenv("LOCALEDIR") ?: LOCALEDIR;
+ #endif /*!HAVE_W32_SYSTEM*/
+ }
+
+@@ -940,7 +940,7 @@ gnupg_cachedir (void)
+ }
+ return dir;
+ #else /*!HAVE_W32_SYSTEM*/
+- return GNUPG_LOCALSTATEDIR "/cache/" PACKAGE_NAME;
++ return getenv("GNUPG_LOCALSTATEDIR") ?: GNUPG_LOCALSTATEDIR "/cache/" PACKAGE_NAME;
+ #endif /*!HAVE_W32_SYSTEM*/
+ }
+
diff --git a/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch b/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch
deleted file mode 100644
index c6dbf1b75a..0000000000
--- a/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Upstream-Status: Inappropriate [openembedded specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-
-Index: gnupg-2.1.0/m4/npth.m4
-===================================================================
---- gnupg-2.1.0.orig/m4/npth.m4
-+++ gnupg-2.1.0/m4/npth.m4
-@@ -17,10 +17,10 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG],
- if test "x$npth_config_prefix" != x ; then
- NPTH_CONFIG="$npth_config_prefix/bin/npth-config"
- fi
-- AC_PATH_PROG(NPTH_CONFIG, npth-config, no)
-+ AC_PATH_PROG(PKGCONFIG, pkg-config, no)
-
-- if test "$NPTH_CONFIG" != "no" ; then
-- npth_version=`$NPTH_CONFIG --version`
-+ if test "$PKGCONFIG" != "no" ; then
-+ npth_version=`$PKGCONFIG --modversion npth`
- fi
- npth_version_major=`echo $npth_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
-@@ -45,7 +45,7 @@ AC_DEFUN([AM_PATH_NPTH],
-
- AC_MSG_CHECKING(for NPTH - version >= $min_npth_version)
- ok=no
-- if test "$NPTH_CONFIG" != "no" ; then
-+ if test "$PKGCONFIG" != "no" ; then
- req_major=`echo $min_npth_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
- req_minor=`echo $min_npth_version | \
-@@ -66,28 +66,9 @@ AC_DEFUN([AM_PATH_NPTH],
- fi
- if test $ok = yes; then
- AC_MSG_RESULT([yes ($npth_version)])
-- else
-- AC_MSG_RESULT(no)
-- fi
-- if test $ok = yes; then
-- # If we have a recent NPTH, we should also check that the
-- # API is compatible.
-- if test "$req_npth_api" -gt 0 ; then
-- tmp=`$NPTH_CONFIG --api-version 2>/dev/null || echo 0`
-- if test "$tmp" -gt 0 ; then
-- AC_MSG_CHECKING([NPTH API version])
-- if test "$req_npth_api" -eq "$tmp" ; then
-- AC_MSG_RESULT([okay])
-- else
-- ok=no
-- AC_MSG_RESULT([does not match. want=$req_npth_api got=$tmp])
-- fi
-- fi
-- fi
-- fi
-- if test $ok = yes; then
-- NPTH_CFLAGS=`$NPTH_CONFIG --cflags`
-- NPTH_LIBS=`$NPTH_CONFIG --libs`
-+ NPTH_CFLAGS=`$PKGCONFIG --cflags npth`
-+ NPTH_LIBS=`$PKGCONFIG --libs npth`
-+ AC_MSG_WARN([[GOT HERE - $NPTH_LIBS ]])
- ifelse([$2], , :, [$2])
- npth_config_host=`$NPTH_CONFIG --host 2>/dev/null || echo none`
- if test x"$npth_config_host" != xnone ; then
-@@ -103,6 +84,7 @@ AC_DEFUN([AM_PATH_NPTH],
- fi
- fi
- else
-+ AC_MSG_RESULT(no)
- NPTH_CFLAGS=""
- NPTH_LIBS=""
- ifelse([$3], , :, [$3])
diff --git a/meta/recipes-support/gnupg/gnupg_1.4.7.bb b/meta/recipes-support/gnupg/gnupg_1.4.7.bb
deleted file mode 100644
index 6ccffd54ca..0000000000
--- a/meta/recipes-support/gnupg/gnupg_1.4.7.bb
+++ /dev/null
@@ -1,104 +0,0 @@
-SUMMARY = "GNU Privacy Guard - encryption and signing tools"
-HOMEPAGE = "http://www.gnupg.org/"
-DEPENDS = "zlib bzip2 readline"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-
-PR = "r9"
-
-SRC_URI = "${GNUPG_MIRROR}/gnupg/gnupg-${PV}.tar.bz2 \
- file://long-long-thumb.patch \
- file://configure.patch \
- file://mips_gcc4.4.patch \
- file://GnuPG1-CVE-2012-6085.patch \
- file://curl_typeof_fix_backport.patch \
- file://CVE-2013-4351.patch \
- file://CVE-2013-4576.patch \
- file://CVE-2013-4242.patch \
- "
-
-SRC_URI[md5sum] = "b06a141cca5cd1a55bbdd25ab833303c"
-SRC_URI[sha256sum] = "69d18b7d193f62ca27ed4febcb4c9044aa0c95305d3258fe902e2fae5fc6468d"
-
-inherit autotools gettext texinfo
-
-# --with-egd-socket=NAME use NAME for the EGD socket
-# --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer
-# --with-included-zlib use the zlib code included here
-# --with-capabilities use linux capabilities default=no
-# --with-mailprog=NAME use "NAME -t" for mail transport
-# --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
-# --without-libiconv-prefix don't search for libiconv in includedir and libdir
-# --with-included-gettext use the GNU gettext library included here
-# --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
-# --without-libintl-prefix don't search for libintl in includedir and libdir
-# --without-readline do not support fancy command line editing
-# --with-included-regex use the included GNU regex library
-# --with-zlib=DIR use libz in DIR
-# --with-bzip2=DIR look for bzip2 in DIR
-# --enable-static-rnd=egd|unix|linux|auto
-# --disable-dev-random disable the use of dev random
-# --disable-asm do not use assembler modules
-# --enable-m-guard enable memory guard facility
-# --enable-selinux-support
-# enable SELinux support
-# --disable-card-support disable OpenPGP card support
-# --disable-gnupg-iconv disable the new iconv code
-# --enable-backsigs enable the experimental backsigs code
-# --enable-minimal build the smallest gpg binary possible
-# --disable-rsa disable the RSA public key algorithm
-# --disable-idea disable the IDEA cipher
-# --disable-cast5 disable the CAST5 cipher
-# --disable-blowfish disable the BLOWFISH cipher
-# --disable-aes disable the AES, AES192, and AES256 ciphers
-# --disable-twofish disable the TWOFISH cipher
-# --disable-sha256 disable the SHA-256 digest
-# --disable-sha512 disable the SHA-384 and SHA-512 digests
-# --disable-bzip2 disable the BZIP2 compression algorithm
-# --disable-exec disable all external program execution
-# --disable-photo-viewers disable photo ID viewers
-# --disable-keyserver-helpers disable all external keyserver support
-# --disable-ldap disable LDAP keyserver interface
-# --disable-hkp disable HKP keyserver interface
-# --disable-http disable HTTP key fetching interface
-# --disable-finger disable Finger key fetching interface
-# --disable-mailto disable email keyserver interface
-# --disable-keyserver-path disable the exec-path option for keyserver helpers
-# --enable-key-cache=SIZE Set key cache to SIZE (default 4096)
-# --disable-largefile omit support for large files
-# --disable-dns-srv disable the use of DNS SRV in HKP and HTTP
-# --disable-nls do not use Native Language Support
-# --disable-regex do not handle regular expressions in trust sigs
-
-EXTRA_OECONF = "--disable-ldap \
- --with-zlib=${STAGING_LIBDIR}/.. \
- --with-bzip2=${STAGING_LIBDIR}/.. \
- --disable-selinux-support \
- --with-readline=${STAGING_LIBDIR}/.. \
- ac_cv_sys_symbol_underscore=no \
- "
-
-# Force gcc's traditional handling of inline to avoid issues with gcc 5
-CFLAGS += "-fgnu89-inline"
-
-do_install () {
- autotools_do_install
- install -d ${D}${docdir}/${BPN}
- mv ${D}${datadir}/${BPN}/* ${D}/${docdir}/${BPN}/ || :
- mv ${D}${prefix}/doc/* ${D}/${docdir}/${BPN}/ || :
-}
-
-# split out gpgv from main package
-RDEPENDS_${PN} = "gpgv"
-PACKAGES =+ "gpgv"
-FILES_gpgv = "${bindir}/gpgv"
-
-# Exclude debug files from the main packages
-FILES_${PN} = "${bindir}/* ${datadir}/${BPN} ${libexecdir}/${BPN}/*"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[curl] = "--with-libcurl=${STAGING_LIBDIR},--without-libcurl,curl"
-PACKAGECONFIG[libusb] = "--with-libusb=${STAGING_LIBDIR},--without-libusb,libusb-compat"
diff --git a/meta/recipes-support/gnupg/gnupg_2.1.14.bb b/meta/recipes-support/gnupg/gnupg_2.1.14.bb
deleted file mode 100644
index 5ea9b962e8..0000000000
--- a/meta/recipes-support/gnupg/gnupg_2.1.14.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
-HOMEPAGE = "http://www.gnupg.org/"
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
- file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
-
-DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
-
-inherit autotools gettext texinfo pkgconfig
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://pkgconfig.patch \
- file://use-pkgconfig-instead-of-npth-config.patch \
- file://dirmngr-uses-libgpg-error.patch \
- file://autogen.sh-fix-find-version-for-beta-checking.patch \
- "
-
-SRC_URI[md5sum] = "46cf0a42ffad6c2615cafd633580b2de"
-SRC_URI[sha256sum] = "9450dee9693b6a12bf0c374dae77b66c30f69ff8f35fc9266ab8dd76998eba42"
-
-EXTRA_OECONF = "--disable-ldap \
- --disable-ccid-driver \
- --with-zlib=${STAGING_LIBDIR}/.. \
- --with-bzip2=${STAGING_LIBDIR}/.. \
- --with-readline=${STAGING_LIBDIR}/.. \
- "
-RRECOMMENDS_${PN} = "pinentry"
-
-do_configure_prepend () {
- # Else these could be used in prefernce to those in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
- rm -f ${S}/m4/libassuan.m4
- rm -f ${S}/m4/ksba.m4
- rm -f ${S}/m4/libgcrypt.m4
-}
-
-do_install_append() {
- ln -sf gpg2 ${D}${bindir}/gpg
- ln -sf gpgv2 ${D}${bindir}/gpgv
-}
-
-RDEPENDS_${PN} = "gnutls"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
diff --git a/meta/recipes-support/gnupg/gnupg_2.2.17.bb b/meta/recipes-support/gnupg/gnupg_2.2.17.bb
new file mode 100644
index 0000000000..bb8885f1c8
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg_2.2.17.bb
@@ -0,0 +1,73 @@
+SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
+HOMEPAGE = "http://www.gnupg.org/"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \
+ file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257"
+
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
+
+inherit autotools gettext texinfo pkgconfig
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch \
+ file://0002-use-pkgconfig-instead-of-npth-config.patch \
+ file://0003-dirmngr-uses-libgpg-error.patch \
+ file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
+ file://0001-Woverride-init-is-not-needed-with-gcc-9.patch \
+ "
+SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \
+ file://relocate.patch"
+
+SRC_URI[md5sum] = "1ba2d9b70c377f8e967742064c27a19c"
+SRC_URI[sha256sum] = "afa262868e39b651a2db4c071fba90415154243e83a830ca00516f9a807fd514"
+
+EXTRA_OECONF = "--disable-ldap \
+ --disable-ccid-driver \
+ --with-zlib=${STAGING_LIBDIR}/.. \
+ --with-bzip2=${STAGING_LIBDIR}/.. \
+ --with-readline=${STAGING_LIBDIR}/.. \
+ --enable-gpg-is-gpg2 \
+ "
+
+# A minimal package containing just enough to run gpg+gpgagent (E.g. use gpgme in opkg)
+PACKAGES =+ "${PN}-gpg"
+FILES_${PN}-gpg = " \
+ ${bindir}/gpg \
+ ${bindir}/gpg2 \
+ ${bindir}/gpg-agent \
+"
+
+# Normal package (gnupg) should depend on minimal package (gnupg-gpg)
+# to ensure all tools are included. This is done only in non-native
+# builds. Native builds don't have sub-packages, so appending RDEPENDS
+# in this case breaks recipe parsing.
+RDEPENDS_${PN} += "${@ "" if ("native" in d.getVar("PN")) else (d.getVar("PN") + "-gpg")}"
+
+RRECOMMENDS_${PN} = "pinentry"
+
+do_configure_prepend () {
+ # Else these could be used in prefernce to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+ rm -f ${S}/m4/libassuan.m4
+ rm -f ${S}/m4/ksba.m4
+ rm -f ${S}/m4/libgcrypt.m4
+}
+
+do_install_append() {
+ ln -sf gpg2 ${D}${bindir}/gpg
+ ln -sf gpgv2 ${D}${bindir}/gpgv
+}
+
+do_install_append_class-native() {
+ create_wrapper ${D}${bindir}/gpg2 GNUPG_BINDIR=${STAGING_BINDIR_NATIVE}
+ create_wrapper ${D}${bindir}/gpgconf GNUPG_BINDIR=${STAGING_BINDIR_NATIVE}
+ create_wrapper ${D}${bindir}/gpg-agent GNUPG_BINDIR=${STAGING_BINDIR_NATIVE}
+ create_wrapper ${D}${bindir}/gpg-connect-agent GNUPG_BINDIR=${STAGING_BINDIR_NATIVE}
+}
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
deleted file mode 100644
index 51b9d2b191..0000000000
--- a/meta/recipes-support/gnutls/gnutls.inc
+++ /dev/null
@@ -1,57 +0,0 @@
-SUMMARY = "GNU Transport Layer Security Library"
-HOMEPAGE = "http://www.gnu.org/software/gnutls/"
-BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN} = "LGPLv2.1+"
-LICENSE_${PN}-xx = "LGPLv2.1+"
-LICENSE_${PN}-bin = "GPLv3+"
-LICENSE_${PN}-openssl = "GPLv3+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \
- file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-DEPENDS = "nettle gmp virtual/libiconv"
-DEPENDS_append_libc-musl = " argp-standalone"
-
-SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
-
-SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz"
-
-inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc
-
-PACKAGECONFIG ??= "libidn zlib"
-
-PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn"
-PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
-PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
-PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-
-EXTRA_OECONF = " \
- --enable-doc \
- --disable-libdane \
- --disable-guile \
- --disable-rpath \
- --enable-local-libopts \
- --enable-openssl-compatibility \
- --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
-"
-
-LDFLAGS_append_libc-musl = " -largp"
-LDFLAGS_append_libc-uclibc = " -luargp -pthread"
-
-do_configure_prepend() {
- for dir in . lib; do
- rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
- done
-}
-
-PACKAGES =+ "${PN}-openssl ${PN}-xx"
-
-FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
-FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
-FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch b/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch
deleted file mode 100644
index d7dd7cf69b..0000000000
--- a/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 2651b08477f42dd7a05ea7d6df410fb2c46de4fb Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 31 Aug 2016 11:04:06 +0300
-Subject: [PATCH] Use correct include dir with minitasn
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This allows compiling certtool-cfg without libtasn headers.
-
-Upstream-Status: Submitted [https://gitlab.com/gnutls/gnutls/merge_requests/54]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- src/Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 182f3a5..cf65388 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -146,6 +146,7 @@ libcmd_cli_debug_la_SOURCES = cli-debug-args.def cli-debug-args.c cli-debug-args
- COMMON_LIBS = $(LIBOPTS) $(LTLIBINTL)
- if ENABLE_MINITASN1
- COMMON_LIBS += ../lib/minitasn1/libminitasn1.la ../gl/libgnu.la
-+AM_CPPFLAGS += -I$(top_srcdir)/lib/minitasn1
- else
- COMMON_LIBS += $(LIBTASN1_LIBS)
- endif
---
-2.9.3
-
diff --git a/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch b/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
deleted file mode 100644
index c5b95eb5bf..0000000000
--- a/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 67c638c7e209554d9b19627e9402a20fdabead21 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 4 Dec 2015 13:19:28 +0200
-Subject: [PATCH] configure.ac: fix sed command
-
-The "sed 's/.bak//g'" matchs "bitbake", which would cause strange errors
-when the S contains "bitbake", fix to "sed 's/\.bak$//'`"
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index e634236..dc9e6a8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -549,7 +549,7 @@ if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
- dnl replace libopts-generated files with distributed backups, if present
- missing_baks=
- for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
-- nam=`echo $i|sed 's/.bak//g'`
-+ nam=`echo $i|sed 's/\.bak$//'`
- if test -f $i;then
- cp -f $i $nam
- else
---
-2.6.2
-
diff --git a/meta/recipes-support/gnutls/gnutls/arm_eabi.patch b/meta/recipes-support/gnutls/gnutls/arm_eabi.patch
new file mode 100644
index 0000000000..34c8985c19
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/arm_eabi.patch
@@ -0,0 +1,19 @@
+Certain syscall's are not availabe for arm-eabi, so we eliminate
+reference to them.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+--- a/tests/seccomp.c
++++ b/tests/seccomp.c
+@@ -49,7 +49,9 @@ int disable_system_calls(void)
+ }
+
+ ADD_SYSCALL(nanosleep, 0);
++#if ! defined(__ARM_EABI__)
+ ADD_SYSCALL(time, 0);
++#endif
+ ADD_SYSCALL(getpid, 0);
+ ADD_SYSCALL(gettimeofday, 0);
+ #if defined(HAVE_CLOCK_GETTIME)
diff --git a/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
deleted file mode 100644
index 5e452c52e7..0000000000
--- a/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From ae3370788ed3447bba16969d9eb1bf1b9631e1b7 Mon Sep 17 00:00:00 2001
-From: Valentin Popa <valentin.popa@intel.com>
-Date: Fri, 25 Apr 2014 13:58:55 +0300
-Subject: [PATCH] Correct rpl_gettimeofday signature
-
-Currently we fail on uclibc like below
-
-| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0,
-| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26,
-| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392,
-| from ../../gl/signal.h:52,
-| from ../../gl/sys/select.h:58,
-| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220,
-| from ../../gl/sys/types.h:28,
-| from ../../lib/includes/gnutls/gnutls.h:46,
-| from ex-cxx.cpp:3:
-| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict'
-| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict'
-| make[4]: *** [ex-cxx.o] Error 1
-| make[4]: *** Waiting for unfinished jobs....
-
-GCC detects that we call 'restrict' as param name in function
-signatures and complains since both params are called 'restrict'
-therefore we use __restrict to denote the C99 keywork
-
-This only happens of uclibc since this code is not excercised with
-eglibc otherwise we will have same issue there too
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gl/sys_time.in.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
-index 84a17c9..6ceadc3 100644
---- a/gl/sys_time.in.h
-+++ b/gl/sys_time.in.h
-@@ -93,20 +93,20 @@ struct timeval
- # define gettimeofday rpl_gettimeofday
- # endif
- _GL_FUNCDECL_RPL (gettimeofday, int,
-- (struct timeval *restrict, void *restrict)
-+ (struct timeval *__restrict, void *__restrict)
- _GL_ARG_NONNULL ((1)));
- _GL_CXXALIAS_RPL (gettimeofday, int,
-- (struct timeval *restrict, void *restrict));
-+ (struct timeval *__restrict, void *__restrict));
- # else
- # if !@HAVE_GETTIMEOFDAY@
- _GL_FUNCDECL_SYS (gettimeofday, int,
-- (struct timeval *restrict, void *restrict)
-+ (struct timeval *__restrict, void *__restrict)
- _GL_ARG_NONNULL ((1)));
- # endif
- /* Need to cast, because on glibc systems, by default, the second argument is
- struct timezone *. */
- _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
-- (struct timeval *restrict, void *restrict));
-+ (struct timeval *__restrict, void *__restrict));
- # endif
- _GL_CXXALIASWARN (gettimeofday);
- #elif defined GNULIB_POSIXCHECK
---
-1.9.1
-
diff --git a/meta/recipes-support/gnutls/gnutls/posix-shell.patch b/meta/recipes-support/gnutls/gnutls/posix-shell.patch
new file mode 100644
index 0000000000..938e2d1e18
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/posix-shell.patch
@@ -0,0 +1,39 @@
+Don't embed the path to the build-time POSIX shell as this will be
+$TMPDIR/hosttools/bash, which is no good on the target.
+
+Instead default to /bin/sh but allow it to be set in the environment.
+
+This isn't really upstreamable but I filed a bug at
+https://gitlab.com/gnutls/gnutls/issues/807 and hope a proper fix will be
+integrated.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/src/libopts/m4/libopts.m4 b/src/libopts/m4/libopts.m4
+index c6ad738..a62faca 100644
+--- a/src/libopts/m4/libopts.m4
++++ b/src/libopts/m4/libopts.m4
+@@ -112,21 +112,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
+ AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
+ strrchr strsignal fchmod fstat chmod])
+ AC_PROG_SED
+- [while :
+- do
+- POSIX_SHELL=`which bash`
+- test -x "$POSIX_SHELL" && break
+- POSIX_SHELL=`which dash`
+- test -x "$POSIX_SHELL" && break
+- POSIX_SHELL=/usr/xpg4/bin/sh
+- test -x "$POSIX_SHELL" && break
+- POSIX_SHELL=`/bin/sh -c '
+- exec 2>/dev/null
+- if ! true ; then exit 1 ; fi
+- echo /bin/sh'`
+- test -x "$POSIX_SHELL" && break
+- ]AC_MSG_ERROR([cannot locate a working POSIX shell])[
+- done]
++ POSIX_SHELL="${POSIX_SHELL:-/bin/sh}"
+ AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"],
+ [define to a working POSIX compliant shell])
+ AC_SUBST([POSIX_SHELL])
diff --git a/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch b/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
deleted file mode 100644
index 0e1b7c8f72..0000000000
--- a/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From cee80af1fe93f5b76765afeebfcc3b902768f5d6 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 26 May 2015 21:41:24 -0700
-Subject: [PATCH] use pkg-config to locate zlib
-
-AC_LIB_HAVE_LINKFLAGS can sometimes find host libs and is therefore not
-robust when cross-compiling. Remove it for zlib and use PKG_CHECK_MODULES
-instead.
-
-Removing AC_LIB_HAVE_LINKFLAGS for zlib also removes the --with-libz-prefix
-configure option. If zlib support is enabled, then failure to find zlib via
-pkg-config is now treated as a fatal error.
-
-Change based on ChromeOS gnutls 2.12.23 cross-compile fixes patch:
-
- https://chromium-review.googlesource.com/#/c/271661/
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- configure.ac | 24 ++++++++++--------------
- 1 file changed, 10 insertions(+), 14 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1b561d5..0c787dc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -508,25 +508,21 @@ AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
- AC_MSG_CHECKING([whether to include zlib compression support])
- if test x$ac_zlib != xno; then
- AC_MSG_RESULT(yes)
-- AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
-- if test x$ac_cv_libz != xyes; then
-- AC_MSG_WARN(
--***
--*** ZLIB was not found. You will not be able to use ZLIB compression.)
-- fi
- else
- AC_MSG_RESULT(no)
- fi
-
--PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
--
- if test x$ac_zlib != xno; then
-- if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
-- if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
-- GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
-- else
-- GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
-- fi
-+ PKG_CHECK_MODULES(ZLIB, zlib)
-+ HAVE_LIBZ=yes
-+ AC_DEFINE([HAVE_LIBZ], [1], [zlib is enabled])
-+ AC_SUBST(HAVE_LIBZ)
-+ LTLIBZ=$ZLIB_LIBS
-+ AC_SUBST(LTLIBZ)
-+ if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
-+ GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
-+ else
-+ GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
- fi
- fi
- AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
---
-1.9.1
-
diff --git a/meta/recipes-support/gnutls/gnutls_3.5.3.bb b/meta/recipes-support/gnutls/gnutls_3.5.3.bb
deleted file mode 100644
index 8317eb413a..0000000000
--- a/meta/recipes-support/gnutls/gnutls_3.5.3.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require gnutls.inc
-
-SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
- file://0001-configure.ac-fix-sed-command.patch \
- file://use-pkg-config-to-locate-zlib.patch \
- file://0001-Use-correct-include-dir-with-minitasn.patch \
- "
-SRC_URI[md5sum] = "6c2c7f40ddf52933ee3ca474cb8cb63c"
-SRC_URI[sha256sum] = "92c4bc999a10a1b95299ebefaeea8333f19d8a98d957a35b5eae74881bdb1fef"
-
-# x86 .text relocations should be fixed from 3.5.5 onwards
-INSANE_SKIP_${PN}_append_x86 = " textrel"
diff --git a/meta/recipes-support/gnutls/gnutls_3.6.8.bb b/meta/recipes-support/gnutls/gnutls_3.6.8.bb
new file mode 100644
index 0000000000..c927063f0a
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_3.6.8.bb
@@ -0,0 +1,68 @@
+SUMMARY = "GNU Transport Layer Security Library"
+HOMEPAGE = "http://www.gnu.org/software/gnutls/"
+BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-xx = "LGPLv2.1+"
+LICENSE_${PN}-bin = "GPLv3+"
+LICENSE_${PN}-openssl = "GPLv3+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \
+ file://doc/COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \
+ file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+DEPENDS = "nettle gmp virtual/libiconv libunistring"
+DEPENDS_append_libc-musl = " argp-standalone"
+
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
+
+SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \
+ file://arm_eabi.patch \
+ file://posix-shell.patch \
+"
+
+SRC_URI[md5sum] = "9dcf0aa45d1a42e1b3ca5d39ec7c61a8"
+SRC_URI[sha256sum] = "aa81944e5635de981171772857e72be231a7e0f559ae0292d2737de475383e83"
+
+inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
+
+PACKAGECONFIG ??= "libidn"
+
+# You must also have CONFIG_SECCOMP enabled in the kernel for
+# seccomp to work.
+PACKAGECONFIG[seccomp] = "ac_cv_libseccomp=yes,ac_cv_libseccomp=no,libseccomp"
+PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2"
+PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
+PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
+PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
+
+EXTRA_OECONF = " \
+ --enable-doc \
+ --disable-libdane \
+ --disable-guile \
+ --disable-rpath \
+ --enable-local-libopts \
+ --enable-openssl-compatibility \
+ --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
+ --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \
+"
+
+# Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell.
+export POSIX_SHELL="${base_bindir}/sh"
+
+LDFLAGS_append_libc-musl = " -largp"
+
+do_configure_prepend() {
+ for dir in . lib; do
+ rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
+ done
+}
+
+PACKAGES =+ "${PN}-openssl ${PN}-xx"
+
+FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
+FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
+FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch b/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
deleted file mode 100644
index ae643946f7..0000000000
--- a/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 908e9fa4c1172f09e0e45420a403dc25ed0a466c Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@redhat.com>
-Date: Tue, 26 Jul 2016 08:45:33 +0200
-Subject: [PATCH 1/4] configure: don't add -Werror to build flags
-
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- configure.ac | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 7a14e04..066f5fe 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -70,8 +70,6 @@ AC_ARG_ENABLE([gcc-warnings],
- )
-
- if test "$gl_gcc_warnings" = yes; then
-- gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
--
- nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
- nw="$nw -Wc++-compat" # We don't care strongly about C++ compilers
- nw="$nw -Wtraditional" # Warns on #elif which we use often
---
-1.9.1
-
diff --git a/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch b/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch
deleted file mode 100644
index dd364223bd..0000000000
--- a/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3542c01618fcde83b29640ea2c60bfd2629ae0b7 Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@redhat.com>
-Date: Tue, 26 Jul 2016 08:47:49 +0200
-Subject: [PATCH 2/4] ASN.y: corrected compiler warning
-
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- lib/ASN1.y | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/ASN1.y b/lib/ASN1.y
-index 731415d..6db638f 100644
---- a/lib/ASN1.y
-+++ b/lib/ASN1.y
-@@ -621,7 +621,7 @@ _asn1_create_errorDescription (int error, char *error_desc)
- case ASN1_NAME_TOO_LONG:
- snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE,
- "%s:%u: name too long (more than %u characters)", file_name,
-- line_number, ASN1_MAX_NAME_SIZE);
-+ line_number, (unsigned)ASN1_MAX_NAME_SIZE);
- break;
- case ASN1_IDENTIFIER_NOT_FOUND:
- snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE,
---
-1.9.1
-
diff --git a/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch b/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch
deleted file mode 100644
index 24201437b9..0000000000
--- a/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From c8903aa27dc9de1d9efeed9d1f7894f1019548f7 Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@redhat.com>
-Date: Tue, 26 Jul 2016 08:49:15 +0200
-Subject: [PATCH 3/4] parser_aux: corrected potential null pointer dereferences
-
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- lib/parser_aux.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/lib/parser_aux.c b/lib/parser_aux.c
-index 2285b20..12ee16f 100644
---- a/lib/parser_aux.c
-+++ b/lib/parser_aux.c
-@@ -637,7 +637,7 @@ _asn1_change_integer_value (asn1_node node)
- p = NULL;
- break;
- }
-- if (p->right)
-+ if (p && p->right)
- {
- p = p->right;
- break;
-@@ -753,7 +753,7 @@ _asn1_expand_object_id (asn1_node node)
-
- if (move == RIGHT)
- {
-- if (p->right)
-+ if (p && p->right)
- p = p->right;
- else
- move = UP;
-@@ -828,7 +828,7 @@ _asn1_expand_object_id (asn1_node node)
-
- if (move == RIGHT)
- {
-- if (p->right)
-+ if (p && p->right)
- p = p->right;
- else
- move = UP;
-@@ -898,7 +898,7 @@ _asn1_type_set_config (asn1_node node)
-
- if (move == RIGHT)
- {
-- if (p->right)
-+ if (p && p->right)
- p = p->right;
- else
- move = UP;
-@@ -1007,7 +1007,7 @@ _asn1_check_identifier (asn1_node node)
- p = NULL;
- break;
- }
-- if (p->right)
-+ if (p && p->right)
- {
- p = p->right;
- break;
-@@ -1067,7 +1067,7 @@ _asn1_set_default_tag (asn1_node node)
- p = NULL;
- break;
- }
-- if (p->right)
-+ if (p && p->right)
- {
- p = p->right;
- break;
---
-1.9.1
-
diff --git a/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch b/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch
deleted file mode 100644
index 7bda0e6f24..0000000000
--- a/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From d647bb2fa1bd288a6ac02c18318f3cba2a34c3a0 Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@redhat.com>
-Date: Tue, 26 Jul 2016 08:50:24 +0200
-Subject: [PATCH 4/4] tools: eliminated compiler warnings
-
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- src/asn1Coding.c | 2 +-
- src/asn1Decoding.c | 2 +-
- src/asn1Parser.c | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/asn1Coding.c b/src/asn1Coding.c
-index d4df593..b516bfe 100644
---- a/src/asn1Coding.c
-+++ b/src/asn1Coding.c
-@@ -188,7 +188,7 @@ main (int argc, char *argv[])
- default:
- fprintf (stderr,
- "asn1Coding: ?? getopt returned character code Ox%x ??\n",
-- option_result);
-+ (unsigned)option_result);
- }
- }
-
-diff --git a/src/asn1Decoding.c b/src/asn1Decoding.c
-index 078963e..20f91ac 100644
---- a/src/asn1Decoding.c
-+++ b/src/asn1Decoding.c
-@@ -131,7 +131,7 @@ main (int argc, char *argv[])
- default:
- fprintf (stderr,
- "asn1Decoding: ?? getopt returned character code Ox%x ??\n",
-- option_result);
-+ (unsigned)option_result);
- }
- }
-
-diff --git a/src/asn1Parser.c b/src/asn1Parser.c
-index 7a3ae67..475bfc9 100644
---- a/src/asn1Parser.c
-+++ b/src/asn1Parser.c
-@@ -139,7 +139,7 @@ main (int argc, char *argv[])
- default:
- fprintf (stderr,
- "asn1Parser: ?? getopt returned character code Ox%x ??\n",
-- option_result);
-+ (unsigned)option_result);
- }
-
- }
---
-1.9.1
-
diff --git a/meta/recipes-support/gnutls/libtasn1/fix-gtkdoc.patch b/meta/recipes-support/gnutls/libtasn1/fix-gtkdoc.patch
new file mode 100644
index 0000000000..bfc9b9fca7
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1/fix-gtkdoc.patch
@@ -0,0 +1,38 @@
+Upstream-Status: Backport [https://gitlab.com/gnutls/libtasn1/merge_requests/49]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From ebd4f871b5241809f6a5b461444a6d331e15c949 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 9 Sep 2019 13:11:39 +0100
+Subject: [PATCH] doc/reference: don't add empty object hierarchy chapter
+
+The object hierarchy section is empty because there are no GObjects in the
+libtasn1 API. With gtk-doc 1.30 onwards if there are no objects then the object
+hierarchy file won't exist, resulting in a failure when building the
+documentation:
+
+| ../libtasn1-docs.xml:39: element include: XInclude error : could not load ../xml/tree_index.sgml, and no fallback was found
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ doc/reference/libtasn1-docs.xml | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/doc/reference/libtasn1-docs.xml b/doc/reference/libtasn1-docs.xml
+index accdb85..f88b888 100644
+--- a/doc/reference/libtasn1-docs.xml
++++ b/doc/reference/libtasn1-docs.xml
+@@ -34,10 +34,6 @@
+ <xi:include href="xml/libtasn1.xml"/>
+
+ </chapter>
+- <chapter id="object-tree">
+- <title>Object Hierarchy</title>
+- <xi:include href="xml/tree_index.sgml"/>
+- </chapter>
+ <index id="api-index-full">
+ <title>API Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+--
+2.20.1
+
diff --git a/meta/recipes-support/gnutls/libtasn1/fix-ldflags.patch b/meta/recipes-support/gnutls/libtasn1/fix-ldflags.patch
new file mode 100644
index 0000000000..f18f3c6267
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1/fix-ldflags.patch
@@ -0,0 +1,31 @@
+From a6f93b7ace347bc4fe29eb4a8fe4383d786cc8d0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
+Date: Tue, 23 Jul 2019 20:44:01 +0200
+Subject: [PATCH] Fix LDFLAGS to AM_LDFLAGS in src/Makefile.am
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 5bf3622..4459767 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -21,7 +21,7 @@ AM_CPPFLAGS = -I$(top_builddir)/lib/includes -I$(top_srcdir)/lib/includes \
+ -I$(top_builddir)/lib/gl -I$(top_srcdir)/lib/gl $(CODE_COVERAGE_CPPFLAGS)
+
+ LDADD = ../lib/libtasn1.la
+-LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
++AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
+
+ bin_PROGRAMS = asn1Parser asn1Coding asn1Decoding
+
+--
+2.21.0
+
diff --git a/meta/recipes-support/gnutls/libtasn1_4.14.bb b/meta/recipes-support/gnutls/libtasn1_4.14.bb
new file mode 100644
index 0000000000..ef2c1956a2
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1_4.14.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Library for ASN.1 and DER manipulation"
+HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN}-bin = "GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://doc/COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c \
+ file://LICENSE;md5=75ac100ec923f959898182307970c360"
+
+SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
+ file://dont-depend-on-help2man.patch \
+ file://fix-ldflags.patch \
+ file://fix-gtkdoc.patch \
+ "
+
+DEPENDS = "bison-native"
+
+SRC_URI[md5sum] = "e9918200ed4a778e2b3cbe34c1be4205"
+SRC_URI[sha256sum] = "9e604ba5c5c8ea403487695c2e407405820d98540d9de884d6e844f9a9c5ba08"
+
+inherit autotools texinfo lib_package gtk-doc
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gnutls/libtasn1_4.9.bb b/meta/recipes-support/gnutls/libtasn1_4.9.bb
deleted file mode 100644
index b8ff9eaf7a..0000000000
--- a/meta/recipes-support/gnutls/libtasn1_4.9.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Library for ASN.1 and DER manipulation"
-HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN}-bin = "GPLv3+"
-LICENSE_${PN} = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
- file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
-
-SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
- file://dont-depend-on-help2man.patch \
- file://0001-configure-don-t-add-Werror-to-build-flags.patch \
- file://0002-ASN.y-corrected-compiler-warning.patch \
- file://0003-parser_aux-corrected-potential-null-pointer-derefere.patch \
- file://0004-tools-eliminated-compiler-warnings.patch \
- "
-
-SRC_URI[md5sum] = "3018d0f466a32b66dde41bb122e6cab6"
-SRC_URI[sha256sum] = "4f6f7a8fd691ac2b8307c8ca365bad711db607d4ad5966f6938a9d2ecd65c920"
-
-inherit autotools texinfo binconfig lib_package gtk-doc
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch b/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
new file mode 100644
index 0000000000..0ed4eb6818
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
@@ -0,0 +1,134 @@
+From a001b3c23bf80fd752044615b9bba6b926ff9666 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 10 May 2019 14:18:04 +0800
+Subject: [PATCH] Revert "build: Make gpgme.m4 use gpgrt-config with *.pc."
+
+This reverts commit 60828a505a1c74fd34476c181df2a588ea6f9c83.
+
+The oe-core does not support gpgrt-config, so revert it
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/gpgme.m4 | 58 ++++++++++------------------------------------------------
+ 1 file changed, 10 insertions(+), 48 deletions(-)
+
+diff --git a/src/gpgme.m4 b/src/gpgme.m4
+index 2a72f18..6c2be44 100644
+--- a/src/gpgme.m4
++++ b/src/gpgme.m4
+@@ -1,5 +1,5 @@
+ # gpgme.m4 - autoconf macro to detect GPGME.
+-# Copyright (C) 2002, 2003, 2004, 2014, 2018 g10 Code GmbH
++# Copyright (C) 2002, 2003, 2004, 2014 g10 Code GmbH
+ #
+ # This file is free software; as a special exception the author gives
+ # unlimited permission to copy and/or distribute it, with or without
+@@ -9,7 +9,7 @@
+ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ #
+-# Last-changed: 2018-11-12
++# Last-changed: 2014-10-02
+
+
+ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
+@@ -36,24 +36,10 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
+ fi
+ fi
+
+- use_gpgrt_config=""
+- if test x"${GPGME_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
+- if $GPGRT_CONFIG gpgme --exists; then
+- GPGME_CONFIG="$GPGRT_CONFIG gpgme"
+- AC_MSG_NOTICE([Use gpgrt-config as gpgme-config])
+- use_gpgrt_config=yes
+- fi
+- fi
+- if test -z "$use_gpgrt_config"; then
+- AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
+- fi
++ AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
+
+ if test "$GPGME_CONFIG" != "no" ; then
+- if test -z "$use_gpgrt_config"; then
+- gpgme_version=`$GPGME_CONFIG --version`
+- else
+- gpgme_version=`$GPGME_CONFIG --modversion`
+- fi
++ gpgme_version=`$GPGME_CONFIG --version`
+ fi
+ gpgme_version_major=`echo $gpgme_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+@@ -66,16 +52,12 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
+
+ AC_DEFUN([_AM_PATH_GPGME_CONFIG_HOST_CHECK],
+ [
+- if test -z "$use_gpgrt_config"; then
+- gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
+- else
+- gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none`
+- fi
++ gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
+ if test x"$gpgme_config_host" != xnone ; then
+ if test x"$gpgme_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+ ***
+-*** The config script "$GPGME_CONFIG" was
++*** The config script $GPGME_CONFIG was
+ *** built for $gpgme_config_host and thus may not match the
+ *** used host $host.
+ *** You may want to use the configure option --with-gpgme-prefix
+@@ -136,11 +118,7 @@ AC_DEFUN([AM_PATH_GPGME],
+ # If we have a recent GPGME, we should also check that the
+ # API is compatible.
+ if test "$req_gpgme_api" -gt 0 ; then
+- if test -z "$use_gpgrt_config"; then
+- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
+- else
+- tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
+- fi
++ tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ if test "$req_gpgme_api" -ne "$tmp" ; then
+ ok=no
+@@ -280,11 +258,7 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+ # If we have a recent GPGME, we should also check that the
+ # API is compatible.
+ if test "$req_gpgme_api" -gt 0 ; then
+- if test -z "$use_gpgrt_config"; then
+- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
+- else
+- tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
+- fi
++ tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ if test "$req_gpgme_api" -ne "$tmp" ; then
+ ok=no
+@@ -293,20 +267,8 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+ fi
+ fi
+ if test $ok = yes; then
+- if test -z "$use_gpgrt_config"; then
+- GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
+- GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
+- else
+- if $GPGRT_CONFIG gpgme-glib --exists; then
+- GPGME_CONFIG="$GPGRT_CONFIG gpgme-glib"
+- GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --cflags`
+- GPGME_GLIB_LIBS=`$GPGME_CONFIG --libs`
+- else
+- ok = no
+- fi
+- fi
+- fi
+- if test $ok = yes; then
++ GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
++ GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch b/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
new file mode 100644
index 0000000000..827d95a151
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
@@ -0,0 +1,291 @@
+From 98ce65902b197faa8f660564613ca2e504c2f8f8 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Fri, 10 May 2019 14:23:55 +0800
+Subject: [PATCH] pkgconfig
+
+Update gpgme to use pkgconfig instead of -config files since its
+simpler and less error prone when cross compiling.
+
+Upstream-Status: Denied [Upstream not interested in pkg-config support]
+RP 2015/4/17
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Rebase to 1.13.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 1 +
+ src/Makefile.am | 4 +-
+ src/gpgme-pthread.pc.in | 15 +++++++
+ src/gpgme.m4 | 114 ++++--------------------------------------------
+ src/gpgme.pc.in | 4 +-
+ 5 files changed, 28 insertions(+), 110 deletions(-)
+ create mode 100644 src/gpgme-pthread.pc.in
+
+diff --git a/configure.ac b/configure.ac
+index 25184f4..1c0a386 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -899,6 +899,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
+ src/gpgme-glib.pc
+ src/gpgme.h)
+ AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
++AC_CONFIG_FILES(src/gpgme-pthread.pc)
+ AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile)
+ AC_CONFIG_FILES(lang/cpp/tests/Makefile)
+ AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index d85a85c..d942f3e 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -20,11 +20,11 @@
+ ## Process this file with automake to produce Makefile.in
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = gpgme.pc gpgme-glib.pc
++pkgconfig_DATA = gpgme.pc gpgme-glib.pc gpgme-pthread.pc
+
+ EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
+ gpgme.h.in versioninfo.rc.in gpgme.def \
+- gpgme.pc.in gpgme-glib.pc.in
++ gpgme.pc.in gpgme-glib.pc.in gpgme-pthread.pc.in
+
+ bin_SCRIPTS = gpgme-config
+ m4datadir = $(datadir)/aclocal
+diff --git a/src/gpgme-pthread.pc.in b/src/gpgme-pthread.pc.in
+new file mode 100644
+index 0000000..074bbf6
+--- /dev/null
++++ b/src/gpgme-pthread.pc.in
+@@ -0,0 +1,15 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@GPGME_CONFIG_API_VERSION@
++host=@GPGME_CONFIG_HOST@
++
++Name: gpgme
++Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program (deprecated)
++Version: @VERSION@
++Libs: -L${libdir} -lgpgme -lpthread
++Cflags: -I${includedir}
++Requires: libassuan gpg-error
+diff --git a/src/gpgme.m4 b/src/gpgme.m4
+index 6c2be44..d8a75cb 100644
+--- a/src/gpgme.m4
++++ b/src/gpgme.m4
+@@ -79,7 +79,7 @@ dnl config script does not match the host specification the script
+ dnl is added to the gpg_config_script_warn variable.
+ dnl
+ AC_DEFUN([AM_PATH_GPGME],
+-[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
++[
+ tmp=ifelse([$1], ,1:0.4.2,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -89,36 +89,12 @@ AC_DEFUN([AM_PATH_GPGME],
+ min_gpgme_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
+- ok=no
+- if test "$GPGME_CONFIG" != "no" ; then
+- req_major=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- if test "$gpgme_version_major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$gpgme_version_major" -eq "$req_major"; then
+- if test "$gpgme_version_minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$gpgme_version_minor" -eq "$req_minor"; then
+- if test "$gpgme_version_micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
++ PKG_CHECK_MODULES(GPGME, [gpgme >= $min_gpgme_version], [ok=yes], [ok=no])
+ if test $ok = yes; then
+ # If we have a recent GPGME, we should also check that the
+ # API is compatible.
+ if test "$req_gpgme_api" -gt 0 ; then
+- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ if test "$req_gpgme_api" -ne "$tmp" ; then
+ ok=no
+@@ -127,19 +103,11 @@ AC_DEFUN([AM_PATH_GPGME],
+ fi
+ fi
+ if test $ok = yes; then
+- GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
+- GPGME_LIBS=`$GPGME_CONFIG --libs`
+- AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
+ else
+- GPGME_CFLAGS=""
+- GPGME_LIBS=""
+- AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+- AC_SUBST(GPGME_CFLAGS)
+- AC_SUBST(GPGME_LIBS)
+ ])
+
+ dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION,
+@@ -148,7 +116,7 @@ dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS
+ dnl and GPGME_PTHREAD_LIBS.
+ dnl
+ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
+-[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
++[
+ tmp=ifelse([$1], ,1:0.4.2,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -158,38 +126,12 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
+ min_gpgme_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
+- ok=no
+- if test "$GPGME_CONFIG" != "no" ; then
+- if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then
+- req_major=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- if test "$gpgme_version_major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$gpgme_version_major" -eq "$req_major"; then
+- if test "$gpgme_version_minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$gpgme_version_minor" -eq "$req_minor"; then
+- if test "$gpgme_version_micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
++ PKG_CHECK_MODULES(GPGME_PTHREAD, [gpgme-pthread >= $min_gpgme_version], [ok=yes], [ok=no])
+ if test $ok = yes; then
+ # If we have a recent GPGME, we should also check that the
+ # API is compatible.
+ if test "$req_gpgme_api" -gt 0 ; then
+- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version gpgme-pthread 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ if test "$req_gpgme_api" -ne "$tmp" ; then
+ ok=no
+@@ -198,19 +140,11 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
+ fi
+ fi
+ if test $ok = yes; then
+- GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
+- GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
+- AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
+ else
+- GPGME_PTHREAD_CFLAGS=""
+- GPGME_PTHREAD_LIBS=""
+- AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+- AC_SUBST(GPGME_PTHREAD_CFLAGS)
+- AC_SUBST(GPGME_PTHREAD_LIBS)
+ ])
+
+
+@@ -229,36 +163,12 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+ min_gpgme_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
+- ok=no
+- if test "$GPGME_CONFIG" != "no" ; then
+- req_major=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- if test "$gpgme_version_major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$gpgme_version_major" -eq "$req_major"; then
+- if test "$gpgme_version_minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$gpgme_version_minor" -eq "$req_minor"; then
+- if test "$gpgme_version_micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
++ PKG_CHECK_MODULES(GPGME_GLIB, [gpgme >= $min_gpgme_version glib-2.0], [ok=yes], [ok=no])
+ if test $ok = yes; then
+ # If we have a recent GPGME, we should also check that the
+ # API is compatible.
+ if test "$req_gpgme_api" -gt 0 ; then
+- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ if test "$req_gpgme_api" -ne "$tmp" ; then
+ ok=no
+@@ -267,17 +177,9 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+ fi
+ fi
+ if test $ok = yes; then
+- GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
+- GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
+- AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
+ else
+- GPGME_GLIB_CFLAGS=""
+- GPGME_GLIB_LIBS=""
+- AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+- AC_SUBST(GPGME_GLIB_CFLAGS)
+- AC_SUBST(GPGME_GLIB_LIBS)
+ ])
+diff --git a/src/gpgme.pc.in b/src/gpgme.pc.in
+index be288b8..16f56ac 100644
+--- a/src/gpgme.pc.in
++++ b/src/gpgme.pc.in
+@@ -9,6 +9,6 @@ Name: gpgme
+ Description: GnuPG Made Easy to access GnuPG
+ Requires: gpg-error, libassuan
+ Version: @PACKAGE_VERSION@
+-Cflags: @GPGME_CONFIG_CFLAGS@
+-Libs: @GPGME_CONFIG_LIBS@
++Cflags: -I${includedir}
++Libs: -L${libdir} -lgpgme
+ URL: https://www.gnupg.org/software/gpgme/index.html
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch b/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
new file mode 100644
index 0000000000..ecd1793ab9
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
@@ -0,0 +1,52 @@
+From 52f8fd2010b900c7d382a7c4e6c1a317d8160585 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 10 May 2019 14:30:36 +0800
+Subject: [PATCH 2/7] gpgme/lang/python: gpg-error-config should not be used
+
+gpg-error-config was modified by OE to always return an error.
+So we want to find an alternative way to retrieve whatever it
+is we need.
+
+Upstream-Status: Inappropriate [changes are specific to OE]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Rebase to 1.13.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lang/python/setup.py.in | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
+index 9785a28..006216d 100755
+--- a/lang/python/setup.py.in
++++ b/lang/python/setup.py.in
+@@ -30,7 +30,6 @@ import subprocess
+ import sys
+
+ # Out-of-tree build of the gpg bindings.
+-gpg_error_config = ['gpg-error-config']
+ gpgme_config_flags = ['--thread=pthread']
+ gpgme_config = ['gpgme-config'] + gpgme_config_flags
+ gpgme_h = ''
+@@ -182,15 +181,9 @@ class BuildExtFirstHack(build):
+
+ def _generate_errors_i(self):
+
+- try:
+- subprocess.check_call(
+- gpg_error_config + ['--version'], stdout=devnull)
+- except:
+- sys.exit('Could not find gpg-error-config. ' +
+- 'Please install the libgpg-error development package.')
+
+ gpg_error_content = self._read_header(
+- 'gpg-error.h', getconfig('cflags', config=gpg_error_config))
++ "gpg-error.h", os.environ.get('CFLAGS').split())
+
+ filter_re = re.compile(r'GPG_ERR_[^ ]* =')
+ rewrite_re = re.compile(r' *(.*) = .*')
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch b/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
new file mode 100644
index 0000000000..de1689ec05
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
@@ -0,0 +1,33 @@
+From f632148fcc8757bb9a9601a6dab275e88cd309d2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 15:28:49 +0800
+Subject: [PATCH 3/7] Correctly install python modules
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+Rebase to 1.9.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Rebase to 1.10.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lang/python/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index 6988faf..36c6f7b 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -93,6 +93,7 @@ install-exec-local:
+ --build-base="$$(basename "$${PYTHON}")-gpg" \
+ install \
+ --prefix "$(DESTDIR)$(prefix)" \
++ --install-lib=$(DESTDIR)${pythondir} \
+ --verbose ; \
+ done
+
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/0004-python-import.patch b/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
new file mode 100644
index 0000000000..fa0eccfce3
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
@@ -0,0 +1,34 @@
+From f51bf1114bee6d56a950dcc6ebb46d6138b3faed Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 16 Aug 2017 02:06:45 -0400
+Subject: [PATCH 4/7] python import
+
+Don't check for output on stderr to know if an import worked, host inputrc and
+sysroot readline can cause warnings on stderr.
+
+Upstream-Status: Backport (from autoconf-archive 883a2abd)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Rebase to 1.9.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ m4/ax_python_devel.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
+index b990d5b..318b089 100644
+--- a/m4/ax_python_devel.m4
++++ b/m4/ax_python_devel.m4
+@@ -137,7 +137,7 @@ variable to configure. See ``configure --help'' for reference.
+ #
+ AC_MSG_CHECKING([for the distutils Python package])
+ ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
+- if test -z "$ac_distutils_result"; then
++ if test $? -eq 0; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch b/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
new file mode 100644
index 0000000000..50bf21463f
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
@@ -0,0 +1,31 @@
+From 8d9613c34ae495bbcbd725a2e7ac48138ba53c30 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 13 Apr 2017 16:40:27 +0300
+Subject: [PATCH 5/7] gpgme-config: skip all /lib* or /usr/lib* directories in
+ output
+
+The logic was not working in multilib setups which use other
+directory names than plain /lib or /usr/lib.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/gpgme-config.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gpgme-config.in b/src/gpgme-config.in
+index a4d152e..8342865 100644
+--- a/src/gpgme-config.in
++++ b/src/gpgme-config.in
+@@ -154,7 +154,7 @@ while test $# -gt 0; do
+ for i in $libs $tmp_l $assuan_libs $gpg_error_libs $tmp_x; do
+ skip=no
+ case $i in
+- -L/usr/lib|-L/lib)
++ -L/usr/lib*|-L/lib*)
+ skip=yes
+ ;;
+ -L*|-l*)
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch b/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch
new file mode 100644
index 0000000000..1471184d67
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch
@@ -0,0 +1,37 @@
+From ef920688bfe1c7328c9e97229d62ccd35304ad84 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Jan 2018 11:01:09 +0800
+Subject: [PATCH 6/7] fix build path issue
+
+Get the "--root" directory supplied to the "install" command,
+and use it as a prefix to strip off the purported filename
+encoded in bytecode files.
+
+Since --root added, we need to tweak --prefix and --install-lib
+to use relative path.
+
+Upstream-Status: Submitted [gnupg-devel@gnupg.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lang/python/Makefile.am | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index 36c6f7b..ce9a108 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -92,8 +92,9 @@ install-exec-local:
+ build \
+ --build-base="$$(basename "$${PYTHON}")-gpg" \
+ install \
+- --prefix "$(DESTDIR)$(prefix)" \
+- --install-lib=$(DESTDIR)${pythondir} \
++ --root=${DESTDIR} \
++ --prefix "$(prefix)" \
++ --install-lib=${pythondir} \
+ --verbose ; \
+ done
+
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/0007-python-Add-variables-to-tests.patch b/meta/recipes-support/gpgme/gpgme/0007-python-Add-variables-to-tests.patch
new file mode 100644
index 0000000000..4c97f63cc2
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0007-python-Add-variables-to-tests.patch
@@ -0,0 +1,52 @@
+From 093c88817397425ee4c2333c469467229a46c9e1 Mon Sep 17 00:00:00 2001
+From: Yuan Chao <yuanc.fnst@cn.fujitsu.com>
+Date: Mon, 5 Aug 2019 01:00:58 +0900
+Subject: [PATCH 7/7] python: Add variables to tests
+
+* configure.ac, lang/python/Makefile.am:
+ New variable to `lang/python', set to `lang/python' if RUN_LANG_PYTHON_TESTS
+
+Upstream-Status: Submitted [gnupg-devel@gnupg.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Signed-off-by: Yuan Chao <yuanc.fnst@cn.fujitsu.com>
+---
+ configure.ac | 5 +++++
+ lang/python/Makefile.am | 3 +++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index bd85886..b5ae42e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -533,6 +533,11 @@ AC_ARG_ENABLE(g13-test,
+ run_g13_test=$enableval)
+ AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
+
++run_lang_python_test="yes"
++AC_ARG_ENABLE(lang-python-test,
++ AC_HELP_STRING([--disable-lang-python-test], [disable Python regression test]),
++ run_lang_python_test=$enableval)
++AM_CONDITIONAL(RUN_LANG_PYTHON_TESTS, test "$run_lang_python_test" = "yes")
+
+ # Checks for header files.
+ AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h stdint.h
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index 551deee..0fd555e 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -23,7 +23,10 @@ EXTRA_DIST = \
+ gpgme.i \
+ helpers.c helpers.h private.h
+
++SUBDIRS = . examples doc src
++if RUN_LANG_PYTHON_TESTS
+ SUBDIRS = . tests examples doc src
++endif
+
+ .PHONY: prepare
+ prepare: copystamp
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch b/meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch
new file mode 100644
index 0000000000..3afbfc8638
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch
@@ -0,0 +1,36 @@
+From fc3d9cc218e60582fd158d21a1cd537a3dc1b007 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 10 May 2019 16:19:54 +0800
+Subject: [PATCH] do not auto check var-PYTHON
+
+Upstream auto check the version of python rather than specify option
+[ff6ff61 python: Auto-check for all installed python versions.]
+
+In oe-core, don't check var-PYTHON, use the setting from recipe,
+only check specific python 2.7 and 3.7
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index cb2f073..7d74a6d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -423,8 +423,8 @@ if test "$found_py" = "1"; then
+ if test "$found_py" = "1" -o "$found_py3" = "1"; then
+ # Reset everything, so that we can look for another Python.
+ m4_foreach([mym4pythonver],
+- [[2.7],[3.4],[3.5],[3.6],[3.7],[3.8],[all]],
+- [unset PYTHON
++ [[2.7],[3.7]],
++ [
+ unset PYTHON_VERSION
+ unset PYTHON_CPPFLAGS
+ unset PYTHON_LDFLAGS
+--
+2.7.4
+
diff --git a/meta/recipes-support/gpgme/gpgme/gpgme.pc b/meta/recipes-support/gpgme/gpgme/gpgme.pc
deleted file mode 100644
index 30a4d56d6e..0000000000
--- a/meta/recipes-support/gpgme/gpgme/gpgme.pc
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=/usr
-libdir=${prefix}/lib
-includedir=${prefix}/include
-
-Name: gpgme
-Description: GNU Privacy Guard Made Easy
-Version: 1.4.3
-Requires:
-Libs: -L${libdir} -lgpgme -lassuan -lgpg-error
-Cflags: -I${includedir}
diff --git a/meta/recipes-support/gpgme/gpgme/pkgconfig.patch b/meta/recipes-support/gpgme/gpgme/pkgconfig.patch
deleted file mode 100644
index e2f1f4ffb5..0000000000
--- a/meta/recipes-support/gpgme/gpgme/pkgconfig.patch
+++ /dev/null
@@ -1,279 +0,0 @@
-Update gpgme to use pkgconfig instead of -config files since its
-simpler and less error prone when cross compiling.
-
-Upstream-Status: Denied [Upstream not interested in pkg-config support]
-RP 2015/4/17
-
-diff --git a/configure.ac b/configure.ac
-index 298a22b..c778b61 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -622,6 +622,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
- src/versioninfo.rc
- src/gpgme.h)
- AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
-+AC_CONFIG_FILES(src/gpgme.pc src/gpgme-pthread.pc)
- AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
- AC_OUTPUT
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 58922f9..40d0dca 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -20,11 +20,13 @@
-
- # Note: moc_kdpipeiodevice should actually be a dependecy below.
- EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
-- gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp
-+ gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp gpgme.pc.in gpgme-pthread.pc.in
-
- bin_SCRIPTS = gpgme-config
- m4datadir = $(datadir)/aclocal
- m4data_DATA = gpgme.m4
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = gpgme.pc gpgme-pthread.pc
- nodist_include_HEADERS = gpgme.h
-
- bin_PROGRAMS = gpgme-tool
-diff --git a/src/gpgme-pthread.pc.in b/src/gpgme-pthread.pc.in
-new file mode 100644
-index 0000000..980a48e
---- /dev/null
-+++ b/src/gpgme-pthread.pc.in
-@@ -0,0 +1,15 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+# API info
-+api_version=@GPGME_CONFIG_API_VERSION@
-+host=@GPGME_CONFIG_HOST@
-+
-+Name: gpgme
-+Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program (threaded version)
-+Version: @VERSION@
-+Libs: -L${libdir} -lgpgme-pthread -lpthread
-+Cflags: -I${includedir}
-+Requires: libassuan gpg-error
-diff --git a/src/gpgme.m4 b/src/gpgme.m4
-index 6c2be44..d8a75cb 100644
---- a/src/gpgme.m4
-+++ b/src/gpgme.m4
-@@ -79,7 +79,7 @@ dnl config script does not match the host specification the script
- dnl is added to the gpg_config_script_warn variable.
- dnl
- AC_DEFUN([AM_PATH_GPGME],
--[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
-+[
- tmp=ifelse([$1], ,1:0.4.2,$1)
- if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
- req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -89,36 +89,12 @@ AC_DEFUN([AM_PATH_GPGME],
- min_gpgme_version="$tmp"
- fi
-
-- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
-- ok=no
-- if test "$GPGME_CONFIG" != "no" ; then
-- req_major=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
-- req_minor=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-- req_micro=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
-- if test "$gpgme_version_major" -gt "$req_major"; then
-- ok=yes
-- else
-- if test "$gpgme_version_major" -eq "$req_major"; then
-- if test "$gpgme_version_minor" -gt "$req_minor"; then
-- ok=yes
-- else
-- if test "$gpgme_version_minor" -eq "$req_minor"; then
-- if test "$gpgme_version_micro" -ge "$req_micro"; then
-- ok=yes
-- fi
-- fi
-- fi
-- fi
-- fi
-- fi
-+ PKG_CHECK_MODULES(GPGME, [gpgme >= $min_gpgme_version], [ok=yes], [ok=no])
- if test $ok = yes; then
- # If we have a recent GPGME, we should also check that the
- # API is compatible.
- if test "$req_gpgme_api" -gt 0 ; then
-- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
-+ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0`
- if test "$tmp" -gt 0 ; then
- if test "$req_gpgme_api" -ne "$tmp" ; then
- ok=no
-@@ -127,19 +103,11 @@ AC_DEFUN([AM_PATH_GPGME],
- fi
- fi
- if test $ok = yes; then
-- GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
-- GPGME_LIBS=`$GPGME_CONFIG --libs`
-- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- _AM_PATH_GPGME_CONFIG_HOST_CHECK
- else
-- GPGME_CFLAGS=""
-- GPGME_LIBS=""
-- AC_MSG_RESULT(no)
- ifelse([$3], , :, [$3])
- fi
-- AC_SUBST(GPGME_CFLAGS)
-- AC_SUBST(GPGME_LIBS)
- ])
-
- dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION,
-@@ -148,7 +116,7 @@ dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS
- dnl and GPGME_PTHREAD_LIBS.
- dnl
- AC_DEFUN([AM_PATH_GPGME_PTHREAD],
--[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
-+[
- tmp=ifelse([$1], ,1:0.4.2,$1)
- if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
- req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -158,38 +126,12 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
- min_gpgme_version="$tmp"
- fi
-
-- AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
-- ok=no
-- if test "$GPGME_CONFIG" != "no" ; then
-- if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then
-- req_major=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
-- req_minor=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-- req_micro=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
-- if test "$gpgme_version_major" -gt "$req_major"; then
-- ok=yes
-- else
-- if test "$gpgme_version_major" -eq "$req_major"; then
-- if test "$gpgme_version_minor" -gt "$req_minor"; then
-- ok=yes
-- else
-- if test "$gpgme_version_minor" -eq "$req_minor"; then
-- if test "$gpgme_version_micro" -ge "$req_micro"; then
-- ok=yes
-- fi
-- fi
-- fi
-- fi
-- fi
-- fi
-- fi
-+ PKG_CHECK_MODULES(GPGME_PTHREAD, [gpgme-pthread >= $min_gpgme_version], [ok=yes], [ok=no])
- if test $ok = yes; then
- # If we have a recent GPGME, we should also check that the
- # API is compatible.
- if test "$req_gpgme_api" -gt 0 ; then
-- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
-+ tmp=`$PKG_CONFIG --variable=api_version gpgme-pthread 2>/dev/null || echo 0`
- if test "$tmp" -gt 0 ; then
- if test "$req_gpgme_api" -ne "$tmp" ; then
- ok=no
-@@ -198,19 +140,11 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
- fi
- fi
- if test $ok = yes; then
-- GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
-- GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
-- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- _AM_PATH_GPGME_CONFIG_HOST_CHECK
- else
-- GPGME_PTHREAD_CFLAGS=""
-- GPGME_PTHREAD_LIBS=""
-- AC_MSG_RESULT(no)
- ifelse([$3], , :, [$3])
- fi
-- AC_SUBST(GPGME_PTHREAD_CFLAGS)
-- AC_SUBST(GPGME_PTHREAD_LIBS)
- ])
-
-
-@@ -229,36 +163,12 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
- min_gpgme_version="$tmp"
- fi
-
-- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
-- ok=no
-- if test "$GPGME_CONFIG" != "no" ; then
-- req_major=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
-- req_minor=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-- req_micro=`echo $min_gpgme_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
-- if test "$gpgme_version_major" -gt "$req_major"; then
-- ok=yes
-- else
-- if test "$gpgme_version_major" -eq "$req_major"; then
-- if test "$gpgme_version_minor" -gt "$req_minor"; then
-- ok=yes
-- else
-- if test "$gpgme_version_minor" -eq "$req_minor"; then
-- if test "$gpgme_version_micro" -ge "$req_micro"; then
-- ok=yes
-- fi
-- fi
-- fi
-- fi
-- fi
-- fi
-+ PKG_CHECK_MODULES(GPGME_GLIB, [gpgme >= $min_gpgme_version glib-2.0], [ok=yes], [ok=no])
- if test $ok = yes; then
- # If we have a recent GPGME, we should also check that the
- # API is compatible.
- if test "$req_gpgme_api" -gt 0 ; then
-- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
-+ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0`
- if test "$tmp" -gt 0 ; then
- if test "$req_gpgme_api" -ne "$tmp" ; then
- ok=no
-@@ -267,17 +177,9 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
- fi
- fi
- if test $ok = yes; then
-- GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
-- GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
-- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- _AM_PATH_GPGME_CONFIG_HOST_CHECK
- else
-- GPGME_GLIB_CFLAGS=""
-- GPGME_GLIB_LIBS=""
-- AC_MSG_RESULT(no)
- ifelse([$3], , :, [$3])
- fi
-- AC_SUBST(GPGME_GLIB_CFLAGS)
-- AC_SUBST(GPGME_GLIB_LIBS)
- ])
-diff --git a/src/gpgme.pc.in b/src/gpgme.pc.in
-new file mode 100644
-index 0000000..b69539f
---- /dev/null
-+++ b/src/gpgme.pc.in
-@@ -0,0 +1,15 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+# API info
-+api_version=@GPGME_CONFIG_API_VERSION@
-+host=@GPGME_CONFIG_HOST@
-+
-+Name: gpgme
-+Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program.
-+Version: @VERSION@
-+Libs: -L${libdir} -lgpgme
-+Cflags: -I${includedir}
-+Requires: libassuan gpg-error
-\ No newline at end of file
diff --git a/meta/recipes-support/gpgme/gpgme_1.13.1.bb b/meta/recipes-support/gpgme/gpgme_1.13.1.bb
new file mode 100644
index 0000000000..9fc1ae24a4
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme_1.13.1.bb
@@ -0,0 +1,85 @@
+SUMMARY = "High-level GnuPG encryption/signing API"
+DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
+HOMEPAGE = "http://www.gnupg.org/gpgme.html"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
+ file://src/gpgme.h.in;endline=23;md5=2f0bf06d1c7dcb28532a9d0f94a7ca1d \
+ file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
+ file://0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch \
+ file://0001-pkgconfig.patch \
+ file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
+ file://0003-Correctly-install-python-modules.patch \
+ file://0004-python-import.patch \
+ file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
+ file://0006-fix-build-path-issue.patch \
+ file://0007-python-Add-variables-to-tests.patch \
+ file://0008-do-not-auto-check-var-PYTHON.patch \
+ "
+
+SRC_URI[md5sum] = "198f0a908ec3cd8f0ce9a4f3a4489645"
+SRC_URI[sha256sum] = "c4e30b227682374c23cddc7fdb9324a99694d907e79242a25a4deeedb393be46"
+
+DEPENDS = "libgpg-error libassuan"
+RDEPENDS_${PN}-cpp += "libstdc++"
+
+RDEPENDS_python2-gpg += "python-unixadmin"
+RDEPENDS_python3-gpg += "python3-unixadmin"
+
+BINCONFIG = "${bindir}/gpgme-config"
+
+# Note select python2 or python3, but you can't select both at the same time
+PACKAGECONFIG ??= "python3"
+PACKAGECONFIG[python2] = ",,python swig-native,"
+PACKAGECONFIG[python3] = ",,python3 swig-native,"
+
+# Default in configure.ac: "cl cpp python qt"
+# Supported: "cl cpp python python2 python3 qt"
+# python says 'search and find python2 or python3'
+
+# Building the C++ bindings for native requires a C++ compiler with C++11
+# support. Since these bindings are currently not needed, we can disable them.
+DEFAULT_LANGUAGES = ""
+DEFAULT_LANGUAGES_class-target = "cpp"
+LANGUAGES ?= "${DEFAULT_LANGUAGES} python"
+
+PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
+PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}"
+
+EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \
+ --disable-gpgconf-test \
+ --disable-gpg-test \
+ --disable-gpgsm-test \
+ --disable-g13-test \
+ --disable-lang-python-test \
+'
+
+inherit autotools texinfo binconfig-disabled pkgconfig distutils-common-base ${PYTHON_INHERIT}
+
+export PKG_CONFIG='pkg-config'
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "${PN}-cpp"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
+
+FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*"
+FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \
+ ${libdir}/cmake/* \
+"
+
+CFLAGS_append_libc-musl = " -D__error_t_defined "
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+ rm -f ${S}/m4/libassuan.m4
+ rm -f ${S}/m4/python.m4
+}
diff --git a/meta/recipes-support/gpgme/gpgme_1.6.0.bb b/meta/recipes-support/gpgme/gpgme_1.6.0.bb
deleted file mode 100644
index a2d05878b6..0000000000
--- a/meta/recipes-support/gpgme/gpgme_1.6.0.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "High-level GnuPG encryption/signing API"
-DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
-HOMEPAGE = "http://www.gnupg.org/gpgme.html"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
- file://src/gpgme.h.in;endline=23;md5=5027eec93a996272a9a0a6a86cf35775 \
- file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
- file://gpgme.pc \
- file://pkgconfig.patch \
- "
-
-SRC_URI[md5sum] = "60d730d22e8065fd5de309e8b98e304b"
-SRC_URI[sha256sum] = "b09de4197ac280b102080e09eaec6211d081efff1963bf7821cf8f4f9916099d"
-
-DEPENDS = "libgpg-error libassuan"
-
-BINCONFIG = "${bindir}/gpgme-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-PACKAGES =+ "${PN}-pthread"
-FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
-FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
-
-CFLAGS_append_libc-musl = " -D__error_t_defined "
-do_configure_prepend () {
- # Else these could be used in preference to those in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
- rm -f ${S}/m4/libassuan.m4
-}
-
-do_install_append () {
- install -d ${D}${libdir}/pkgconfig
- install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/
-}
diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc
index cc6f222a50..6d9728903d 100644
--- a/meta/recipes-support/icu/icu.inc
+++ b/meta/recipes-support/icu/icu.inc
@@ -9,15 +9,19 @@ LICENSE = "ICU"
DEPENDS = "icu-native"
DEPENDS_class-native = ""
+CVE_PRODUCT = "international_components_for_unicode"
+
S = "${WORKDIR}/icu/source"
SPDX_S = "${WORKDIR}/icu"
STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
-CPPFLAGS_append_libc-uclibc = " -DU_TIMEZONE=0"
-
BINCONFIG = "${bindir}/icu-config"
-inherit autotools pkgconfig binconfig
+ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"
+
+inherit autotools pkgconfig binconfig multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/icu-config"
# ICU needs the native build directory as an argument to its --with-cross-build option when
# cross-compiling. Taken the situation that different builds may share a common sstate-cache
@@ -26,6 +30,20 @@ EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
EXTRA_OECONF_class-native = ""
EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
+EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}"
+TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}"
+
+ASNEEDED = ""
+
+do_compile_prepend_class-target () {
+ # Make sure certain build host references do not end up being compiled
+ # in the image. This only affects libicutu and icu-dbg
+ sed \
+ -e 's,DU_BUILD=,DU_BUILD_unused=,g' \
+ -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -i ${B}/tools/toolutil/Makefile
+}
+
PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
do_install_append_class-native() {
mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
@@ -36,15 +54,30 @@ do_install_append_class-native() {
cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
}
-PACKAGES =+ "libicudata libicuuc libicui18n libicule libiculx libicutu libicuio"
+do_install_append_class-target() {
+ # The native pkgdata can not generate the correct data file.
+ # Use icupkg to re-generate it.
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
+ rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+ icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+ fi
+
+ # Remove build host references...
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ ${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \
+ ${D}/${libdir}/${BPN}/${PV}/pkgdata.inc
+}
+
+PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
FILES_${PN}-dev += "${libdir}/${BPN}/"
FILES_libicudata = "${libdir}/libicudata.so.*"
FILES_libicuuc = "${libdir}/libicuuc.so.*"
FILES_libicui18n = "${libdir}/libicui18n.so.*"
-FILES_libicule = "${libdir}/libicule.so.*"
-FILES_libiculx = "${libdir}/libiculx.so.*"
FILES_libicutu = "${libdir}/libicutu.so.*"
FILES_libicuio = "${libdir}/libicuio.so.*"
diff --git a/meta/recipes-support/icu/icu/0001-Fix-big-endian-build.patch b/meta/recipes-support/icu/icu/0001-Fix-big-endian-build.patch
new file mode 100644
index 0000000000..efb27ae4e3
--- /dev/null
+++ b/meta/recipes-support/icu/icu/0001-Fix-big-endian-build.patch
@@ -0,0 +1,28 @@
+From 9be0b489a94b57419202c552022f25cb95bfac51 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 17 Apr 2019 16:41:58 +0200
+Subject: [PATCH] Fix big-endian build
+
+Bug-report: https://unicode-org.atlassian.net/browse/ICU-20533
+Patch taken from: https://bugs.gentoo.org/682170
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ data/Makefile.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/source/data/Makefile.in b/source/data/Makefile.in
+index 778b6c7..67203e7 100644
+--- a/data/Makefile.in
++++ b/data/Makefile.in
+@@ -148,7 +148,8 @@ ICUDATA_ARCHIVE = $(firstword $(wildcard $(srcdir)/in/$(ICUDATA_BASENAME_VERSION
+ # and convert it to the current type.
+ ifneq ($(ICUDATA_ARCHIVE),)
+ ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat
+-$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR)
++$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE)
++ $(MKINSTALLDIRS) $(OUTDIR)
+ $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE)
+ endif
+ else
diff --git a/meta/recipes-support/icu/icu/0001-icu-Added-armeb-support.patch b/meta/recipes-support/icu/icu/0001-icu-Added-armeb-support.patch
new file mode 100644
index 0000000000..299689d95c
--- /dev/null
+++ b/meta/recipes-support/icu/icu/0001-icu-Added-armeb-support.patch
@@ -0,0 +1,30 @@
+From 500321387ceca48934bb0f323779117cd518bab6 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 8 May 2019 14:42:30 +0900
+Subject: [PATCH] icu: Added armeb support.
+
+Make icu support arm32 BE.
+
+Upstream-Status: Pending
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ i18n/double-conversion-utils.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/i18n/double-conversion-utils.h b/i18n/double-conversion-utils.h
+index 1e44fca..e4f2a8b 100644
+--- a/i18n/double-conversion-utils.h
++++ b/i18n/double-conversion-utils.h
+@@ -92,7 +92,7 @@ int main(int argc, char** argv) {
+ //
+ // If it prints "correct" then the architecture should be here, in the "correct" section.
+ #if defined(_M_X64) || defined(__x86_64__) || \
+- defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
++ defined(__arm__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
+ defined(__hppa__) || defined(__ia64__) || \
+ defined(__mips__) || \
+ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+--
+2.7.4
+
diff --git a/meta/recipes-support/icu/icu/fix-install-manx.patch b/meta/recipes-support/icu/icu/fix-install-manx.patch
index ec63f50c46..925b064ebd 100644
--- a/meta/recipes-support/icu/icu/fix-install-manx.patch
+++ b/meta/recipes-support/icu/icu/fix-install-manx.patch
@@ -1,3 +1,8 @@
+From a6ddabc8cadb76bfe2d2e374a6702442cfe51cce Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Fri, 9 Oct 2015 17:50:41 +0100
+Subject: [PATCH] icu: fix install race
+
The generic recursive target calls target-local so also adding it to the
dependency list results in races due to install-local being executed twice in
parallel. For example, install-manx can fail if the two install processes race
@@ -9,12 +14,15 @@ in the install command.
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ source/Makefile.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.in b/Makefile.in
-index 9db6c52..3441afa 100644
+index be9435b..ada20d7 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -71,7 +71,7 @@ EXTRA_DATA =
+@@ -77,7 +77,7 @@ EXTRA_DATA =
## List of phony targets
.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \
@@ -23,7 +31,7 @@ index 9db6c52..3441afa 100644
distclean-local distclean-recursive doc dist dist-local dist-recursive \
check check-local check-recursive clean-recursive-with-twist install-icu \
doc install-doc tests icu4j-data icu4j-data-install update-windows-makefiles xcheck-local xcheck-recursive xperf xcheck xperf-recursive \
-@@ -82,10 +82,10 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
+@@ -88,9 +88,9 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
## List of standard targets
all: all-local all-recursive
@@ -31,18 +39,16 @@ index 9db6c52..3441afa 100644
+install: install-recursive
clean: clean-recursive-with-twist clean-local
-distclean : distclean-recursive distclean-local
--dist: dist-recursive dist-local
+distclean : distclean-recursive
-+dist: dist-recursive
+ dist: dist-recursive
check: all check-recursive
check-recursive: all
- xcheck: all xcheck-recursive
-@@ -352,7 +352,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
-
+@@ -357,7 +357,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
install-manx: $(MANX_FILES)
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
+ ifneq ($(MANX_FILES),)
- $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
+ $(INSTALL_DATA) $^ $(DESTDIR)$(mandir)/man$(SECTION)
+ endif
config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
- cd $(top_builddir) \
diff --git a/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch b/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
index 6e40659227..e758a623ef 100644
--- a/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
+++ b/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
@@ -8,14 +8,16 @@ LARGE_BUFFER_MAX_SIZE.
Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
- tools/pkgdata/pkgdata.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ tools/pkgdata/pkgdata.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp
+index 60167dd..506dd32 100644
--- a/tools/pkgdata/pkgdata.cpp
+++ b/tools/pkgdata/pkgdata.cpp
-@@ -1019,7 +1019,7 @@ normal_symlink_mode:
+@@ -1084,7 +1084,7 @@ normal_symlink_mode:
static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) {
int32_t result = 0;
@@ -24,6 +26,24 @@ diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp
sprintf(cmd, "cd %s && %s %s %s%s%s",
targetDir,
+@@ -1152,7 +1152,7 @@ static int32_t pkg_installLibrary(const char *installDir, const char *targetDir,
+
+ static int32_t pkg_installCommonMode(const char *installDir, const char *fileName) {
+ int32_t result = 0;
+- char cmd[SMALL_BUFFER_MAX_SIZE] = "";
++ char cmd[LARGE_BUFFER_MAX_SIZE] = "";
+
+ if (!T_FileStream_file_exists(installDir)) {
+ UErrorCode status = U_ZERO_ERROR;
+@@ -1184,7 +1184,7 @@ static int32_t pkg_installCommonMode(const char *installDir, const char *fileNam
+ #endif
+ static int32_t pkg_installFileMode(const char *installDir, const char *srcDir, const char *fileListName) {
+ int32_t result = 0;
+- char cmd[SMALL_BUFFER_MAX_SIZE] = "";
++ char cmd[LARGE_BUFFER_MAX_SIZE] = "";
+
+ if (!T_FileStream_file_exists(installDir)) {
+ UErrorCode status = U_ZERO_ERROR;
--
-1.7.10.4
+1.9.1
diff --git a/meta/recipes-support/icu/icu_57.1.bb b/meta/recipes-support/icu/icu_57.1.bb
deleted file mode 100644
index 90c2b82752..0000000000
--- a/meta/recipes-support/icu/icu_57.1.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-require icu.inc
-
-LIC_FILES_CHKSUM = "file://../LICENSE;md5=787d3b37867445c1cdd6f6167bd0e347"
-
-def icu_download_version(d):
- pvsplit = d.getVar('PV', True).split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
-ICU_PV = "${@icu_download_version(d)}"
-
-# http://errors.yoctoproject.org/Errors/Details/20486/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
-SRC_URI = "${BASE_SRC_URI} \
- file://icu-pkgdata-large-cmd.patch \
- file://fix-install-manx.patch \
- "
-
-SRC_URI_append_class-target = "\
- file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
- "
-SRC_URI[md5sum] = "976734806026a4ef8bdd17937c8898b9"
-SRC_URI[sha256sum] = "ff8c67cb65949b1e7808f2359f2b80f722697048e90e7cfc382ec1fe229e9581"
-
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
-UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/meta/recipes-support/icu/icu_64.2.bb b/meta/recipes-support/icu/icu_64.2.bb
new file mode 100644
index 0000000000..10bac7aac0
--- /dev/null
+++ b/meta/recipes-support/icu/icu_64.2.bb
@@ -0,0 +1,30 @@
+require icu.inc
+
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=8bc5d32052a96f214cbdd1e53dfc935d"
+
+def icu_download_version(d):
+ pvsplit = d.getVar('PV').split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+ICU_PV = "${@icu_download_version(d)}"
+
+# http://errors.yoctoproject.org/Errors/Details/20486/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
+SRC_URI = "${BASE_SRC_URI} \
+ file://icu-pkgdata-large-cmd.patch \
+ file://fix-install-manx.patch \
+ file://0001-Fix-big-endian-build.patch \
+ file://0001-icu-Added-armeb-support.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
+ "
+SRC_URI[md5sum] = "a3d18213beec454e3cdec9a3116d6b05"
+SRC_URI[sha256sum] = "627d5d8478e6d96fc8c90fed4851239079a561a6a8b9e48b0892f24e82d31d6c"
+
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
+UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/meta/recipes-support/iso-codes/iso-codes_3.70.bb b/meta/recipes-support/iso-codes/iso-codes_3.70.bb
deleted file mode 100644
index 7edd8b7bbc..0000000000
--- a/meta/recipes-support/iso-codes/iso-codes_3.70.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "ISO language, territory, currency, script codes and their translations"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
-SRC_URI[md5sum] = "c61f8f02eecf978d3710ff594e43ca7e"
-SRC_URI[sha256sum] = "41e2fbaec2ed57e767b94f175d0dcd31b627aeb23b75cd604605a6fb6109d61f"
-
-# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
-# are inhibited by allarch
-DEPENDS = "gettext-native"
-
-inherit allarch autotools
-
-FILES_${PN} += "${datadir}/xml/"
diff --git a/meta/recipes-support/iso-codes/iso-codes_4.4.bb b/meta/recipes-support/iso-codes/iso-codes_4.4.bb
new file mode 100644
index 0000000000..332af025dd
--- /dev/null
+++ b/meta/recipes-support/iso-codes/iso-codes_4.4.bb
@@ -0,0 +1,19 @@
+SUMMARY = "ISO language, territory, currency, script codes and their translations"
+HOMEPAGE = "https://salsa.debian.org/iso-codes-team/iso-codes"
+BUGTRACKER = "https://salsa.debian.org/iso-codes-team/iso-codes/issues"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://salsa.debian.org/iso-codes-team/iso-codes.git;protocol=http"
+SRCREV = "38edb926592954b87eb527124da0ec68d2a748f3"
+
+# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
+# are inhibited by allarch
+DEPENDS = "gettext-native"
+
+S = "${WORKDIR}/git"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/xml/"
diff --git a/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
index b6ccdda6a5..0e81454c63 100644
--- a/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
+++ b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
@@ -6,62 +6,14 @@ Upstream-Status: Denied
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: libassuan-2.1.2/Makefile.am
-===================================================================
---- libassuan-2.1.2.orig/Makefile.am
-+++ libassuan-2.1.2/Makefile.am
-@@ -24,10 +24,13 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gz
- # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
- GITLOG_TO_CHANGELOG=gitlog-to-changelog
-
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = libassuan.pc
-+
- EXTRA_DIST = autogen.sh autogen.rc README.GIT \
- ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \
- tests/ChangeLog-2011 contrib/ChangeLog-2011 \
-- build-aux/git-log-footer build-aux/git-log-fix
-+ build-aux/git-log-footer build-aux/git-log-fix libassuan.pc.in
-
- SUBDIRS = m4 src doc tests
-
-Index: libassuan-2.1.2/libassuan.pc.in
-===================================================================
---- /dev/null
-+++ libassuan-2.1.2/libassuan.pc.in
-@@ -0,0 +1,14 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+api_version=@LIBASSUAN_CONFIG_API_VERSION@
-+host=@LIBASSUAN_CONFIG_HOST@
-+
-+Name: libassuan
-+Description: IPC library used by GnuPG and GPGME
-+Requires:
-+Version: @VERSION@
-+Libs: -L${libdir} -lassuan
-+Libs.private: -lgpg-error
-+Cflags: -I${includedir}
-Index: libassuan-2.1.2/configure.ac
-===================================================================
---- libassuan-2.1.2.orig/configure.ac
-+++ libassuan-2.1.2/configure.ac
-@@ -439,7 +439,7 @@ AC_CONFIG_FILES([doc/Makefile])
- AC_CONFIG_FILES([tests/Makefile])
- AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config])
- AC_CONFIG_FILES([src/versioninfo.rc])
--
-+AC_CONFIG_FILES([libassuan.pc])
- AC_OUTPUT
-
- echo "
-Index: libassuan-2.1.2/src/libassuan.m4
+forward ported to 2.4.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: libassuan-2.5.2/src/libassuan.m4
===================================================================
---- libassuan-2.1.2.orig/src/libassuan.m4
-+++ libassuan-2.1.2/src/libassuan.m4
-@@ -15,18 +15,6 @@ dnl Returns ok set to yes or no.
+--- libassuan-2.5.2.orig/src/libassuan.m4
++++ libassuan-2.5.2/src/libassuan.m4
+@@ -16,27 +16,6 @@ dnl Returns ok set to yes or no.
dnl
AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -70,24 +22,32 @@ Index: libassuan-2.1.2/src/libassuan.m4
- [prefix where LIBASSUAN is installed (optional)]),
- libassuan_config_prefix="$withval", libassuan_config_prefix="")
- if test x$libassuan_config_prefix != x ; then
-- libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix"
- if test x${LIBASSUAN_CONFIG+set} != xset ; then
- LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config
- fi
- fi
-
-- AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no)
+- use_gpgrt_config=""
+- if test x"${LIBASSUAN_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
+- if $GPGRT_CONFIG libassuan --exists; then
+- LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan"
+- AC_MSG_NOTICE([Use gpgrt-config as libassuan-config])
+- use_gpgrt_config=yes
+- fi
+- fi
+- if test -z "$use_gpgrt_config"; then
+- AC_PATH_PROG(LIBASSUAN_CONFIG, libassuan-config, no)
+- fi
tmp=ifelse([$1], ,1:0.9.2,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-@@ -37,51 +25,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+@@ -47,58 +26,11 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
min_libassuan_version="$tmp"
fi
- AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version)
- ok=no
-- if test "$LIBASSUAN_CONFIG" != "no" \
-- && test -f "$LIBASSUAN_CONFIG" ; then
+- if test "$LIBASSUAN_CONFIG" != "no"; then
- req_major=`echo $min_libassuan_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
- req_minor=`echo $min_libassuan_version | \
@@ -95,7 +55,11 @@ Index: libassuan-2.1.2/src/libassuan.m4
- req_micro=`echo $min_libassuan_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
-
-- libassuan_config_version=`$LIBASSUAN_CONFIG --version`
+- if test -z "$use_gpgrt_config"; then
+- libassuan_config_version=`$LIBASSUAN_CONFIG --version`
+- else
+- libassuan_config_version=`$LIBASSUAN_CONFIG --modversion`
+- fi
- major=`echo $libassuan_config_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
- minor=`echo $libassuan_config_version | \
@@ -105,7 +69,7 @@ Index: libassuan-2.1.2/src/libassuan.m4
-
- if test "$major" -gt "$req_major"; then
- ok=yes
-- else
+- else
- if test "$major" -eq "$req_major"; then
- if test "$minor" -gt "$req_minor"; then
- ok=yes
@@ -129,26 +93,32 @@ Index: libassuan-2.1.2/src/libassuan.m4
if test $ok = yes; then
if test "$req_libassuan_api" -gt 0 ; then
- tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
+- if test -z "$use_gpgrt_config"; then
+- tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
+- else
+- tmp=`$LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0`
+- fi
+ tmp=`$PKG_CONFIG --variable=api_version libassuan`
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBASSUAN API version])
if test "$req_libassuan_api" -eq "$tmp" ; then
-@@ -96,7 +45,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
-
+@@ -114,9 +46,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
if test $ok = yes; then
if test x"$host" != x ; then
-- libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none`
-+ libassuan_config_host=`$PKG_CONFIG --variable=host libassuan`
+ if test -z "$use_gpgrt_config"; then
+- libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none`
+- else
+- libassuan_config_host=`$LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none`
++ libassuan_config_host=`$PKG_CONFIG --variable=host libassuan`
+ fi
if test x"$libassuan_config_host" != xnone ; then
if test x"$libassuan_config_host" != x"$host" ; then
- AC_MSG_WARN([[
-@@ -137,12 +86,8 @@ dnl
+@@ -158,12 +88,8 @@ dnl
AC_DEFUN([AM_PATH_LIBASSUAN],
[ _AM_PATH_LIBASSUAN_COMMON($1)
if test $ok = yes; then
-- LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
-- LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
+- LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG --cflags`
+- LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG --libs`
ifelse([$2], , :, [$2])
else
- LIBASSUAN_CFLAGS=""
diff --git a/meta/recipes-support/libassuan/libassuan_2.4.3.bb b/meta/recipes-support/libassuan/libassuan_2.4.3.bb
deleted file mode 100644
index 1b3916d734..0000000000
--- a/meta/recipes-support/libassuan/libassuan_2.4.3.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "IPC library used by GnuPG and GPGME"
-HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN} = "LGPLv2.1+"
-LICENSE_${PN}-doc = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
- file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
-
-DEPENDS = "libgpg-error"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
- file://libassuan-add-pkgconfig-support.patch"
-
-SRC_URI[md5sum] = "8e01a7c72d3e5d154481230668e6eb5a"
-SRC_URI[sha256sum] = "22843a3bdb256f59be49842abf24da76700354293a066d82ade8134bb5aa2b71"
-
-BINCONFIG = "${bindir}/libassuan-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-do_configure_prepend () {
- # Else these could be used in preference to those in aclocal-copy
- rm -f ${S}/m4/*.m4
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libassuan/libassuan_2.5.3.bb b/meta/recipes-support/libassuan/libassuan_2.5.3.bb
new file mode 100644
index 0000000000..6fb3d2f3a4
--- /dev/null
+++ b/meta/recipes-support/libassuan/libassuan_2.5.3.bb
@@ -0,0 +1,32 @@
+SUMMARY = "IPC library used by GnuPG and GPGME"
+HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-doc = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/assuan.c;endline=20;md5=ab92143a5a2adabd06d7994d1467ea5c\
+ file://src/assuan-defs.h;endline=20;md5=15d950c83e82978e35b35e790d7e4d39"
+
+DEPENDS = "libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
+ file://libassuan-add-pkgconfig-support.patch \
+ "
+
+SRC_URI[md5sum] = "226c504ea78a232224bf3b6846b3adb9"
+SRC_URI[sha256sum] = "91bcb0403866b4e7c4bc1cc52ed4c364a9b5414b3994f718c70303f7f765e702"
+
+BINCONFIG = "${bindir}/libassuan-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/*.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch b/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
deleted file mode 100644
index c051075949..0000000000
--- a/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Tue, 15 Mar 2016 10:09:26 +0300
-Subject: [PATCH] Add initial nios2 architecture support
-
-* src/Makefile.am (nobase_private_HEADERS): Add nios2.h.
-* src/atomic_ops.h: Include nios2.h if __nios2__.
-* src/atomic_ops/sysdeps/gcc/nios2.h: New file.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport [ https://github.com/ivmai/libatomic_ops.git 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 ]
----
- src/Makefile.am | 1 +
- src/atomic_ops.h | 3 +++
- src/atomic_ops/sysdeps/gcc/nios2.h | 17 +++++++++++++++++
- 3 files changed, 21 insertions(+)
- create mode 100644 src/atomic_ops/sysdeps/gcc/nios2.h
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index fc09b27..d463427 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -79,6 +79,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
- atomic_ops/sysdeps/gcc/ia64.h \
- atomic_ops/sysdeps/gcc/m68k.h \
- atomic_ops/sysdeps/gcc/mips.h \
-+ atomic_ops/sysdeps/gcc/nios2.h \
- atomic_ops/sysdeps/gcc/powerpc.h \
- atomic_ops/sysdeps/gcc/s390.h \
- atomic_ops/sysdeps/gcc/sh.h \
-diff --git a/src/atomic_ops.h b/src/atomic_ops.h
-index 33fe00e..ec02ba4 100644
---- a/src/atomic_ops.h
-+++ b/src/atomic_ops.h
-@@ -262,6 +262,9 @@
- # if defined(__m68k__)
- # include "atomic_ops/sysdeps/gcc/m68k.h"
- # endif /* __m68k__ */
-+# if defined(__nios2__)
-+# include "atomic_ops/sysdeps/gcc/nios2.h"
-+# endif /* __nios2__ */
- # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
- || defined(__powerpc64__) || defined(__ppc64__)
- # include "atomic_ops/sysdeps/gcc/powerpc.h"
-diff --git a/src/atomic_ops/sysdeps/gcc/nios2.h b/src/atomic_ops/sysdeps/gcc/nios2.h
-new file mode 100644
-index 0000000..f402cbb
---- /dev/null
-+++ b/src/atomic_ops/sysdeps/gcc/nios2.h
-@@ -0,0 +1,17 @@
-+/*
-+ * Copyright (C) 2016 Marek Vasut <marex@denx.de>
-+ *
-+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
-+ *
-+ * Permission is hereby granted to use or copy this program
-+ * for any purpose, provided the above notices are retained on all copies.
-+ * Permission to modify the code and to distribute modified code is granted,
-+ * provided the above notices are retained, and a notice that the code was
-+ * modified is included with the above copyright notice.
-+ */
-+
-+#include "../test_and_set_t_is_ao_t.h"
-+#include "generic.h"
-+
-+#define AO_T_IS_INT
---
-2.7.0
-
diff --git a/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb b/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb
deleted file mode 100644
index 930c1b8ed6..0000000000
--- a/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "A library for atomic integer operations"
-HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
-SECTION = "optional"
-PROVIDES += "libatomics-ops"
-LICENSE = "GPLv2 & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
- "
-
-SRC_URI = "\
- http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${PV}.tar.gz \
- file://0001-Add-initial-nios2-architecture-support.patch \
- "
-
-SRC_URI[md5sum] = "426d804baae12c372967a6d183e25af2"
-SRC_URI[sha256sum] = "bf210a600dd1becbf7936dd2914cf5f5d3356046904848dcfd27d0c8b12b6f8f"
-
-S = "${WORKDIR}/libatomic_ops-${PV}"
-
-ALLOW_EMPTY_${PN} = "1"
-
-ARM_INSTRUCTION_SET = "arm"
-
-inherit autotools pkgconfig
-
-do_install_append() {
- # those contain only docs, not necessary for now.
- install -m 0755 -d ${D}${docdir}
- mv ${D}${datadir}/libatomic_ops ${D}${docdir}/${BPN}
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.10.bb b/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.10.bb
new file mode 100644
index 0000000000..7628eedb1b
--- /dev/null
+++ b/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.10.bb
@@ -0,0 +1,22 @@
+SUMMARY = "A library for atomic integer operations"
+HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
+SECTION = "optional"
+PROVIDES += "libatomics-ops"
+LICENSE = "GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
+ "
+
+SRC_URI = "https://github.com/ivmai/libatomic_ops/releases/download/v${PV}/libatomic_ops-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "https://github.com/ivmai/libatomic_ops/releases"
+
+SRC_URI[md5sum] = "90a78a84d9c28ce11f331c25289bfbd0"
+SRC_URI[sha256sum] = "587edf60817f56daf1e1ab38a4b3c729b8e846ff67b4f62a6157183708f099af"
+
+S = "${WORKDIR}/libatomic_ops-${PV}"
+
+ALLOW_EMPTY_${PN} = "1"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libbsd/libbsd_0.10.0.bb b/meta/recipes-support/libbsd/libbsd_0.10.0.bb
new file mode 100644
index 0000000000..3b9ac5a01f
--- /dev/null
+++ b/meta/recipes-support/libbsd/libbsd_0.10.0.bb
@@ -0,0 +1,41 @@
+# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library of utility functions from BSD systems"
+DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
+ and lacking on others like GNU systems, thus making it easier to port \
+ projects with strong BSD origins, without needing to embed the same \
+ code over and over again on each project."
+
+HOMEPAGE = "https://libbsd.freedesktop.org/wiki/"
+# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
+# OE @ ~/projects/libbsd $ grep ^License: COPYING | sort -u
+# License: BSD-2-clause
+# License: BSD-2-clause-NetBSD
+# License: BSD-2-clause-author
+# License: BSD-2-clause-verbatim
+# License: BSD-3-clause
+# License: BSD-3-clause-author
+# License: BSD-3-clause-John-Birrell
+# License: BSD-3-clause-Regents
+# License: BSD-4-clause-Christopher-G-Demetriou
+# License: BSD-4-clause-Niels-Provos
+# License: BSD-5-clause-Peter-Wemm
+# License: Beerware
+# License: Expat
+# License: ISC
+# License: ISC-Original
+# License: public-domain
+# License: public-domain-Colin-Plumb
+LICENSE = "BSD-4-Clause & ISC & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2120be0173469a06ed185b688e0e1ae0"
+SECTION = "libs"
+
+SRC_URI = "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "ead96d240d02faa5b921c0aa50c812b5"
+SRC_URI[sha256sum] = "34b8adc726883d0e85b3118fa13605e179a62b31ba51f676136ecb2d0bc1a887"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libbsd/libbsd_0.8.3.bb b/meta/recipes-support/libbsd/libbsd_0.8.3.bb
deleted file mode 100644
index 92121efa83..0000000000
--- a/meta/recipes-support/libbsd/libbsd_0.8.3.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Library of utility functions from BSD systems"
-DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
- and lacking on others like GNU systems, thus making it easier to port \
- projects with strong BSD origins, without needing to embed the same \
- code over and over again on each project."
-
-HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
-# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
-# OE @ ~/projects/libbsd $ grep ^License: COPYING | sort
-# License: BSD-2-clause
-# License: BSD-2-clause
-# License: BSD-2-clause-NetBSD
-# License: BSD-2-clause-author
-# License: BSD-2-clause-verbatim
-# License: BSD-3-clause
-# License: BSD-3-clause
-# License: BSD-3-clause
-# License: BSD-3-clause-Peter-Wemm
-# License: BSD-3-clause-Regents
-# License: BSD-4-clause-Christopher-G-Demetriou
-# License: BSD-4-clause-Niels-Provos
-# License: BSD-5-clause-Peter-Wemm
-# License: Beerware
-# License: Expat
-# License: ISC
-# License: ISC-Original
-# License: public-domain
-# License: public-domain-Colin-Plumb
-LICENSE = "BSD-4-Clause & ISC & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0b9c89d861915b86655b96e5e32fa2aa"
-SECTION = "libs"
-
-SRC_URI = " \
- http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-"
-
-SRC_URI[md5sum] = "e935c1bb6cc98a4a43cb1da22795493a"
-SRC_URI[sha256sum] = "934b634f4dfd865b6482650b8f522c70ae65c463529de8be907b53c89c3a34a8"
-
-inherit autotools pkgconfig
diff --git a/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.10.bb b/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.10.bb
new file mode 100644
index 0000000000..43f76dc561
--- /dev/null
+++ b/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.10.bb
@@ -0,0 +1,29 @@
+require libcap-ng.inc
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/libcap-ng:"
+
+SUMMARY .= " - python"
+
+inherit lib_package autotools python3native
+
+DEPENDS += "libcap-ng python3 swig-native"
+
+S = "${WORKDIR}/libcap-ng-${PV}"
+
+EXTRA_OECONF += "--with-python --with-python3"
+EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
+
+do_install_append() {
+ rm -rf ${D}${bindir}
+ rm -rf ${D}${libdir}/.debug
+ rm -f ${D}${libdir}/lib*
+ rm -rf ${D}${libdir}/pkgconfig
+ rm -rf ${D}${datadir}
+ rm -rf ${D}${includedir}
+}
+
+# PACKAGES = "${PN}"
+
+FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}"
+FILES_${PN}-dbg =+ "${PYTHON_SITEPACKAGES_DIR}/.debug/_capng.so"
+
diff --git a/meta/recipes-support/libcap-ng/libcap-ng.inc b/meta/recipes-support/libcap-ng/libcap-ng.inc
new file mode 100644
index 0000000000..002915ad48
--- /dev/null
+++ b/meta/recipes-support/libcap-ng/libcap-ng.inc
@@ -0,0 +1,19 @@
+SUMMARY = "An alternate posix capabilities library"
+DESCRIPTION = "The libcap-ng library is intended to make programming \
+with POSIX capabilities much easier than the traditional libcap library."
+HOMEPAGE = "http://freecode.com/projects/libcap-ng"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
+
+SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
+ file://python.patch \
+ file://0001-configure.ac-add-library-if-header-found.patch \
+ file://0002-Wrap-pthread_atfork-usage-in-HAVE_PTHREAD_H.patch \
+"
+
+SRC_URI[md5sum] = "57dc267e2949cdecb651a929f9206572"
+SRC_URI[sha256sum] = "a84ca7b4e0444283ed269b7a29f5b6187f647c82e2b876636b49b9a744f0ffbf"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch b/meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch
new file mode 100644
index 0000000000..6b155ccea8
--- /dev/null
+++ b/meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch
@@ -0,0 +1,31 @@
+From 0230e2e374bb71aed0181ccd9ebd13c0c5125a5d Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 25 Oct 2019 17:01:20 -0400
+Subject: [PATCH] configure.ac: add library if header found
+
+If the pthread.h header is found, make sure library containing
+"pthread_atfork" is added to the list of libraries against which to link.
+On some hosts (e.g. openSUSE 15.1) "-lpthread" needs to be explicitly added
+in order for the code to compile correctly.
+
+Upstream-Status: Submitted [https://github.com/stevegrubb/libcap-ng/pull/10]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ configure.ac | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 63088f4..639b464 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -56,7 +56,9 @@ AC_CHECK_HEADERS(sys/xattr.h, [], [
+ AC_CHECK_HEADERS(attr/xattr.h, [], [AC_MSG_WARN(attr/xattr.h not found, disabling file system capabilities.)])
+ ])
+ AC_CHECK_HEADERS(linux/securebits.h, [], [])
+-AC_CHECK_HEADERS(pthread.h, [], [AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)])
++AC_CHECK_HEADERS(pthread.h,
++ [AC_SEARCH_LIBS(pthread_atfork, pthread)],
++ [AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)])
+
+ AC_C_CONST
+ AC_C_INLINE
diff --git a/meta/recipes-support/libcap-ng/libcap-ng/0002-Wrap-pthread_atfork-usage-in-HAVE_PTHREAD_H.patch b/meta/recipes-support/libcap-ng/libcap-ng/0002-Wrap-pthread_atfork-usage-in-HAVE_PTHREAD_H.patch
new file mode 100644
index 0000000000..c68254ff3d
--- /dev/null
+++ b/meta/recipes-support/libcap-ng/libcap-ng/0002-Wrap-pthread_atfork-usage-in-HAVE_PTHREAD_H.patch
@@ -0,0 +1,25 @@
+From d95c4018ad57c37f6272dbedfa5217776567c329 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 26 Nov 2019 22:34:34 +0500
+Subject: [PATCH] Wrap pthread_atfork usage in HAVE_PTHREAD_H
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ src/cap-ng.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/cap-ng.c b/src/cap-ng.c
+index 35fcd7a..97a3dbd 100644
+--- a/src/cap-ng.c
++++ b/src/cap-ng.c
+@@ -166,7 +166,9 @@ static void deinit(void)
+ static void init_lib(void) __attribute__ ((constructor));
+ static void init_lib(void)
+ {
++#ifdef HAVE_PTHREAD_H
+ pthread_atfork(NULL, NULL, deinit);
++#endif
+ }
+
+ static void init(void)
diff --git a/meta/recipes-support/libcap-ng/libcap-ng/python.patch b/meta/recipes-support/libcap-ng/libcap-ng/python.patch
index 59591eb469..d60a0a39b6 100644
--- a/meta/recipes-support/libcap-ng/libcap-ng/python.patch
+++ b/meta/recipes-support/libcap-ng/libcap-ng/python.patch
@@ -1,4 +1,4 @@
-From b01bb2694f66cd981e6d61523433dc3eb5ed32f2 Mon Sep 17 00:00:00 2001
+From b4a354ae8d4f7c2ec3ec421c7d8a790cc57e77a9 Mon Sep 17 00:00:00 2001
From: Li xin <lixin.fnst@cn.fujitsu.com>
Date: Sat, 18 Jul 2015 23:03:30 +0900
Subject: [PATCH] configure.ac - Avoid an incorrect check for python.
@@ -8,30 +8,32 @@ Upstream-Status: pending
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
- bindings/python/Makefile.am | 3 ++-
- configure.ac | 15 ++-------------
- 2 files changed, 4 insertions(+), 14 deletions(-)
+ bindings/python/Makefile.am | 4 +++-
+ configure.ac | 17 ++---------------
+ 2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
-index 82b9bb8..f9fe7a8 100644
+index 999b184..c8e49db 100644
--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
-@@ -23,7 +23,8 @@ SUBDIRS = test
+@@ -23,7 +23,9 @@
+ SUBDIRS = test
CONFIG_CLEAN_FILES = *.loT *.rej *.orig
AM_CFLAGS = -fPIC -DPIC
- PYLIBVER ?= python$(PYTHON_VERSION)
-AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@
++PYLIBVER ?= python$(PYTHON_VERSION)
+PYINC ?= /usr/include/$(PYLIBVER)
+AM_CPPFLAGS = -I. -I$(top_builddir) -I$(PYINC)
- LIBS = $(top_builddir)/src/libcap-ng.la
SWIG_FLAGS = -python
SWIG_INCLUDES = ${AM_CPPFLAGS}
+ pyexec_PYTHON = capng.py
diff --git a/configure.ac b/configure.ac
-index 1d777d5..9d90f64 100644
+index 7f66179..079d026 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -123,19 +123,8 @@ if test x$use_python = xno ; then
+@@ -123,21 +123,8 @@ if test x$use_python = xno ; then
else
AC_MSG_RESULT(testing)
AM_PATH_PYTHON
@@ -39,11 +41,13 @@ index 1d777d5..9d90f64 100644
-if test -f ${PYINCLUDEDIR}/Python.h ; then
- python_found="yes"
- AC_SUBST(PYINCLUDEDIR)
+- pybind_dir="python"
+- AC_SUBST(pybind_dir)
- AC_MSG_NOTICE(Python bindings will be built)
-else
- python_found="no"
- if test x$use_python = xyes ; then
-- AC_MSG_ERROR([Python explicitly required and python headers found])
+- AC_MSG_ERROR([Python explicitly requested and python headers were not found])
- else
- AC_MSG_WARN("Python headers not found - python bindings will not be made")
- fi
@@ -54,5 +58,5 @@ index 1d777d5..9d90f64 100644
AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
--
-1.8.4.2
+2.7.4
diff --git a/meta/recipes-support/libcap-ng/libcap-ng_0.7.10.bb b/meta/recipes-support/libcap-ng/libcap-ng_0.7.10.bb
new file mode 100644
index 0000000000..6e6de45494
--- /dev/null
+++ b/meta/recipes-support/libcap-ng/libcap-ng_0.7.10.bb
@@ -0,0 +1,17 @@
+require libcap-ng.inc
+
+inherit lib_package autotools
+
+EXTRA_OECONF += "--without-python --without-python3"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append() {
+ # Moving libcap-ng to base_libdir
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mkdir -p ${D}/${base_libdir}/
+ mv -f ${D}${libdir}/libcap-ng.so.* ${D}${base_libdir}/
+ relpath=${@os.path.relpath("${base_libdir}", "${libdir}")}
+ ln -sf ${relpath}/libcap-ng.so.0.0.0 ${D}${libdir}/libcap-ng.so
+ fi
+}
diff --git a/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb b/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb
deleted file mode 100644
index 358319419d..0000000000
--- a/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "An alternate posix capabilities library"
-DESCRIPTION = "The libcap-ng library is intended to make programming \
-with POSIX capabilities much easier than the traditional libcap library."
-HOMEPAGE = "http://freecode.com/projects/libcap-ng"
-SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
-
-SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
- file://python.patch"
-
-inherit lib_package autotools python3native
-
-SRC_URI[md5sum] = "0dece96644bd798020e170fbf7663802"
-SRC_URI[sha256sum] = "c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f"
-
-DEPENDS += "swig-native python3"
-
-EXTRA_OECONF += "--with-python --with-python3"
-EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
-
-PACKAGES += "${PN}-python"
-
-FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
-
-BBCLASSEXTEND = "native"
-
-do_install_append() {
- # Moving libcap-ng to base_libdir
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mkdir -p ${D}/${base_libdir}/
- mv -f ${D}${libdir}/libcap-ng.so.* ${D}${base_libdir}/
- relpath=${@os.path.relpath("${base_libdir}", "${libdir}")}
- ln -sf ${relpath}/libcap-ng.so.0.0.0 ${D}${libdir}/libcap-ng.so
- fi
-}
diff --git a/meta/recipes-support/libcap/libcap_2.25.bb b/meta/recipes-support/libcap/libcap_2.25.bb
deleted file mode 100644
index 7ced4be626..0000000000
--- a/meta/recipes-support/libcap/libcap_2.25.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-SUMMARY = "Library for getting/setting POSIX.1e capabilities"
-HOMEPAGE = "http://sites.google.com/site/fullycapable/"
-
-# no specific GPL version required
-LICENSE = "BSD | GPLv2"
-LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
-
-DEPENDS = "hostperl-runtime-native"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
- file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
-"
-SRC_URI[md5sum] = "6666b839e5d46c2ad33fc8aa2ceb5f77"
-SRC_URI[sha256sum] = "693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162"
-
-inherit lib_package
-
-# do NOT pass target cflags to host compilations
-#
-do_configure() {
- # libcap uses := for compilers, fortunately, it gives us a hint
- # on what should be replaced with ?=
- sed -e 's,:=,?=,g' -i Make.Rules
- sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
-
- # disable gperf detection
- sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
-}
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
-PACKAGECONFIG_class-native ??= ""
-
-PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
-PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
-
-EXTRA_OEMAKE = " \
- INDENT= \
- lib=${@os.path.basename('${libdir}')} \
- RAISE_SETFCAP=no \
- DYNAMIC=yes \
-"
-
-EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
-
-# these are present in the libcap defaults, so include in our CFLAGS too
-CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
-
-do_compile() {
- oe_runmake ${PACKAGECONFIG_CONFARGS}
-}
-
-do_install() {
- oe_runmake install \
- ${PACKAGECONFIG_CONFARGS} \
- DESTDIR="${D}" \
- prefix="${prefix}" \
- SBINDIR="${sbindir}"
-}
-
-do_install_append() {
- # Move the library to base_libdir
- install -d ${D}${base_libdir}
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mv ${D}${libdir}/libcap* ${D}${base_libdir}
- if [ -d ${D}${libdir}/security ]; then
- mv ${D}${libdir}/security ${D}${base_libdir}
- fi
- fi
-}
-
-FILES_${PN}-dev += "${base_libdir}/*.so"
-
-# pam files
-FILES_${PN} += "${base_libdir}/security/*.so"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libcap/libcap_2.27.bb b/meta/recipes-support/libcap/libcap_2.27.bb
new file mode 100644
index 0000000000..3f64ff7636
--- /dev/null
+++ b/meta/recipes-support/libcap/libcap_2.27.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Library for getting/setting POSIX.1e capabilities"
+HOMEPAGE = "http://sites.google.com/site/fullycapable/"
+
+# no specific GPL version required
+LICENSE = "BSD | GPLv2"
+LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
+
+DEPENDS = "hostperl-runtime-native gperf-native"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
+ file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
+ "
+SRC_URI[md5sum] = "2e8f9fab32eb5ccb37969fe317fd17aa"
+SRC_URI[sha256sum] = "dac1792d0118bee6aae6ba7fb93ff1602c6a9bda812fd63916eee1435b9c486a"
+
+UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
+
+inherit lib_package
+
+# do NOT pass target cflags to host compilations
+#
+do_configure() {
+ # libcap uses := for compilers, fortunately, it gives us a hint
+ # on what should be replaced with ?=
+ sed -e 's,:=,?=,g' -i Make.Rules
+ sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
+}
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG_class-native ??= ""
+
+PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
+
+EXTRA_OEMAKE = " \
+ INDENT= \
+ lib='${baselib}' \
+ RAISE_SETFCAP=no \
+ DYNAMIC=yes \
+ BUILD_GPERF=yes \
+"
+
+EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
+
+# these are present in the libcap defaults, so include in our CFLAGS too
+CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+
+do_compile() {
+ oe_runmake ${PACKAGECONFIG_CONFARGS}
+}
+
+do_install() {
+ oe_runmake install \
+ ${PACKAGECONFIG_CONFARGS} \
+ DESTDIR="${D}" \
+ prefix="${prefix}" \
+ SBINDIR="${sbindir}"
+}
+
+do_install_append() {
+ # Move the library to base_libdir
+ install -d ${D}${base_libdir}
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mv ${D}${libdir}/libcap* ${D}${base_libdir}
+ if [ -d ${D}${libdir}/security ]; then
+ mv ${D}${libdir}/security ${D}${base_libdir}
+ fi
+ fi
+}
+
+FILES_${PN}-dev += "${base_libdir}/*.so"
+
+# pam files
+FILES_${PN} += "${base_libdir}/security/*.so"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libcheck/libcheck/not-echo-compiler-info-to-check_stdint.h.patch b/meta/recipes-support/libcheck/libcheck/not-echo-compiler-info-to-check_stdint.h.patch
new file mode 100644
index 0000000000..3c7572700d
--- /dev/null
+++ b/meta/recipes-support/libcheck/libcheck/not-echo-compiler-info-to-check_stdint.h.patch
@@ -0,0 +1,19 @@
+Do not echo compiler info in a comment line to check_stdint.h which causes
+multilib install file conflict.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+diff --git a/m4/ax_create_stdint_h.m4 b/m4/ax_create_stdint_h.m4
+index 33a21f8..eacc37a 100644
+--- a/m4/ax_create_stdint_h.m4
++++ b/m4/ax_create_stdint_h.m4
+@@ -272,7 +272,6 @@ echo "#ifndef" $_ac_stdint_h >$ac_stdint
+ echo "#define" $_ac_stdint_h "1" >>$ac_stdint
+ echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
+ echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
+-echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
+ if test "_$ac_cv_header_stdint_t" != "_" ; then
+ echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
+ echo "#include <stdint.h>" >>$ac_stdint
diff --git a/meta/recipes-support/libcheck/libcheck_0.10.0.bb b/meta/recipes-support/libcheck/libcheck_0.10.0.bb
deleted file mode 100644
index c0b459f661..0000000000
--- a/meta/recipes-support/libcheck/libcheck_0.10.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Check - unit testing framework for C code"
-HOMEPAGE = "http://check.sourceforge.net/"
-SECTION = "devel"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz \
- "
-
-SRC_URI[md5sum] = "53c5e5c77d090e103a17f3ed7fd7d8b8"
-SRC_URI[sha256sum] = "f5f50766aa6f8fe5a2df752666ca01a950add45079aa06416b83765b1cf71052"
-
-S = "${WORKDIR}/check-${PV}"
-
-inherit autotools pkgconfig texinfo
-
-CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
-
-RREPLACES_${PN} = "check (<= 0.9.5)"
-RDEPENDS_${PN} += "gawk"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libcheck/libcheck_0.13.0.bb b/meta/recipes-support/libcheck/libcheck_0.13.0.bb
new file mode 100644
index 0000000000..226417f991
--- /dev/null
+++ b/meta/recipes-support/libcheck/libcheck_0.13.0.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Check - unit testing framework for C code"
+HOMEPAGE = "https://libcheck.github.io/check/"
+SECTION = "devel"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+SRC_URI = "https://github.com/${BPN}/check/releases/download/${PV}/check-${PV}.tar.gz \
+ file://not-echo-compiler-info-to-check_stdint.h.patch"
+SRC_URI[md5sum] = "2c730c40b08482eaeb10132517970593"
+SRC_URI[sha256sum] = "c4336b31447acc7e3266854f73ec188cdb15554d0edd44739631da174a569909"
+UPSTREAM_CHECK_URI = "https://github.com/libcheck/check/releases/"
+
+S = "${WORKDIR}/check-${PV}"
+
+inherit autotools pkgconfig texinfo
+
+CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
+
+RREPLACES_${PN} = "check (<= 0.9.5)"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "checkmk"
+
+FILES_checkmk = "${bindir}/checkmk"
+
+RDEPENDS_checkmk = "gawk"
+
diff --git a/meta/recipes-support/libcroco/libcroco_0.6.11.bb b/meta/recipes-support/libcroco/libcroco_0.6.11.bb
deleted file mode 100644
index 9df7923204..0000000000
--- a/meta/recipes-support/libcroco/libcroco_0.6.11.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Cascading Style Sheet (CSS) parsing and manipulation toolkit"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
- file://src/cr-rgb.c;endline=22;md5=31d5f0944d556c8589d04ea6055fcc66 \
- file://tests/cr-test-utils.c;endline=21;md5=2382c27934cae1d3792fcb17a6142c4e"
-
-SECTION = "x11/utils"
-DEPENDS = "glib-2.0 libxml2 zlib"
-BBCLASSEXTEND = "native"
-EXTRA_OECONF += "--enable-Bsymbolic=auto"
-
-BINCONFIG = "${bindir}/croco-0.6-config"
-
-inherit autotools pkgconfig gnomebase gtk-doc binconfig-disabled
-
-SRC_URI[archive.md5sum] = "dabc1911dfbfa85f8e6859ca47863168"
-SRC_URI[archive.sha256sum] = "132b528a948586b0dfa05d7e9e059901bca5a3be675b6071a90a90b81ae5a056"
diff --git a/meta/recipes-support/libcroco/libcroco_0.6.13.bb b/meta/recipes-support/libcroco/libcroco_0.6.13.bb
new file mode 100644
index 0000000000..9171a9de5c
--- /dev/null
+++ b/meta/recipes-support/libcroco/libcroco_0.6.13.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Cascading Style Sheet (CSS) parsing and manipulation toolkit"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
+ file://src/cr-rgb.c;endline=22;md5=31d5f0944d556c8589d04ea6055fcc66 \
+ file://tests/cr-test-utils.c;endline=21;md5=2382c27934cae1d3792fcb17a6142c4e"
+
+SECTION = "x11/utils"
+DEPENDS = "glib-2.0 libxml2 zlib"
+BBCLASSEXTEND = "native nativesdk"
+EXTRA_OECONF += "--enable-Bsymbolic=auto"
+
+BINCONFIG = "${bindir}/croco-0.6-config"
+
+inherit gnomebase gtk-doc binconfig-disabled
+
+SRC_URI[archive.md5sum] = "c80c5a8385011a0260dce6bd0da93dce"
+SRC_URI[archive.sha256sum] = "767ec234ae7aa684695b3a735548224888132e063f92db585759b422570621d4"
diff --git a/meta/recipes-support/libevdev/libevdev_1.5.2.bb b/meta/recipes-support/libevdev/libevdev_1.5.2.bb
deleted file mode 100644
index c76e1d79f7..0000000000
--- a/meta/recipes-support/libevdev/libevdev_1.5.2.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Wrapper library for evdev devices"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
-SECTION = "libs"
-
-LICENSE = "MIT-X"
-LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
- file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
-
-SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "96ad6edb5ce5c4428f1b183cc180ff8c"
-SRC_URI[sha256sum] = "5ee2163656a61f5703cb5c08a05c9471ffb7b640bfbe2c55194ea50d908f629b"
-
-inherit autotools pkgconfig
diff --git a/meta/recipes-support/libevdev/libevdev_1.8.0.bb b/meta/recipes-support/libevdev/libevdev_1.8.0.bb
new file mode 100644
index 0000000000..84274987d7
--- /dev/null
+++ b/meta/recipes-support/libevdev/libevdev_1.8.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Wrapper library for evdev devices"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
+SECTION = "libs"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
+ file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
+
+SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
+SRC_URI[md5sum] = "879631080be18526737e33b63d848039"
+SRC_URI[sha256sum] = "20d3cae4efd277f485abdf8f2a7c46588e539998b5a08c2c4d368218379d4211"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-support/libevent/libevent/Makefile-missing-test-dir.patch b/meta/recipes-support/libevent/libevent/Makefile-missing-test-dir.patch
new file mode 100644
index 0000000000..8880bd0407
--- /dev/null
+++ b/meta/recipes-support/libevent/libevent/Makefile-missing-test-dir.patch
@@ -0,0 +1,27 @@
+Fix missing test directory creation.
+
+GCC used in OE-core has "dependency tracking" disabled and
+libevent has problem with this.
+Due to removed makefile.am/in files in test/sample/include
+directories, output directories are not created in
+configuration step. Compilation step will fails, when
+trying to write to non-existing directory.
+
+Upstream-Status: Inappropriate [Other]
+Workaround specific to our build system.
+
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
+
+diff --git a/libevent-2.1.8-stable/test/include.am b/libevent-2.1.8-stable/test/include.am
+index eea249f..d323dff 100644
+--- a/test/include.am
++++ b/test/include.am
+@@ -161,6 +161,7 @@ test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
+ test/regress.gen.c test/regress.gen.h: test/rpcgen-attempted
+
+ test/rpcgen-attempted: test/regress.rpc event_rpcgen.py test/rpcgen_wrapper.sh
++ @$(MKDIR_P) test
+ $(AM_V_GEN)date -u > $@
+ $(AM_V_at)if $(srcdir)/test/rpcgen_wrapper.sh $(srcdir)/test; then \
+ true; \
diff --git a/meta/recipes-support/libevent/libevent/run-ptest b/meta/recipes-support/libevent/libevent/run-ptest
index 0241851c70..d3b5e793c3 100644
--- a/meta/recipes-support/libevent/libevent/run-ptest
+++ b/meta/recipes-support/libevent/libevent/run-ptest
@@ -1,18 +1,29 @@
#!/bin/sh
-fail=0
-for test in ./test/*
-do
- $test
- if [ $? -ne 0 ]
- then
- fail=1
- fi
-done
+# run-ptest - 'ptest' test infrastructure shell script that
+# wraps the libevent test scripts
+#
+# Trevor Gamblin <trevor.gamblin@windriver.com>
+###############################################################
+LIBEVENTLIB=@libdir@/libevent
+LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log"
-if [ $fail -eq 0 ]
-then
- echo "PASS: libevent"
-else
- echo "FAIL: libevent"
-fi
+cd ${LIBEVENTLIB}/ptest
+
+# Run only the libevent "regress" test. All other test scripts in the
+# libevent "test" folder are related to performance, e.g. read/write
+# rates, and/or do not provide a pass/fail output that can be recorded
+# in the ptest log.
+./test/regress 2>&1| sed -e '/TESTS/d' -e '/tests/d' -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /SKIPPED/ s/^/SKIP: / ; /DISABLED/ s/^/SKIP: /' | cut -f1,2 -d ':' | tee -a ${LOG}
+
+passed=`grep PASS ${LOG}|wc -l`
+failed=`grep FAIL ${LOG}|wc -l`
+skipped=`grep -E SKIP ${LOG}|wc -l`
+all=$((passed + failed + skipped))
+
+( echo "=== Test Summary ==="
+ echo "TOTAL: ${all}"
+ echo "PASSED: ${passed}"
+ echo "FAILED: ${failed}"
+ echo "SKIPPED: ${skipped}"
+) | tee -a ${LOG}
diff --git a/meta/recipes-support/libevent/libevent_2.0.22.bb b/meta/recipes-support/libevent/libevent_2.0.22.bb
deleted file mode 100644
index df8a31c58d..0000000000
--- a/meta/recipes-support/libevent/libevent_2.0.22.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "An asynchronous event notification library"
-HOMEPAGE = "http://libevent.org/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=50884&atid=461322"
-SECTION = "libs"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=45c5316ff684bcfe2f9f86d8b1279559"
-
-SRC_URI = " \
- ${SOURCEFORGE_MIRROR}/levent/${BP}-stable.tar.gz \
- file://run-ptest \
-"
-
-SRC_URI[md5sum] = "c4c56f986aa985677ca1db89630a2e11"
-SRC_URI[sha256sum] = "71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3"
-
-UPSTREAM_CHECK_URI = "http://libevent.org/"
-
-S = "${WORKDIR}/${BPN}-${PV}-stable"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-
-inherit autotools
-
-# Needed for Debian packaging
-LEAD_SONAME = "libevent-2.0.so"
-
-inherit ptest
-
-DEPENDS = "zlib"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_ptest() {
- install -d ${D}${PTEST_PATH}/test
- for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
- do
- install -m 0755 $file ${D}${PTEST_PATH}/test
- done
-}
diff --git a/meta/recipes-support/libevent/libevent_2.1.11.bb b/meta/recipes-support/libevent/libevent_2.1.11.bb
new file mode 100644
index 0000000000..8c7c49e7dd
--- /dev/null
+++ b/meta/recipes-support/libevent/libevent_2.1.11.bb
@@ -0,0 +1,57 @@
+SUMMARY = "An asynchronous event notification library"
+HOMEPAGE = "http://libevent.org/"
+BUGTRACKER = "https://github.com/libevent/libevent/issues"
+SECTION = "libs"
+
+LICENSE = "BSD & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=17f20574c0b154d12236d5fbe964f549"
+
+SRC_URI = " \
+ https://github.com/libevent/libevent/releases/download/release-${PV}-stable/${BP}-stable.tar.gz \
+ file://Makefile-missing-test-dir.patch \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "7f35cfe69b82d879111ec0d7b7b1c531"
+SRC_URI[sha256sum] = "a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d"
+
+UPSTREAM_CHECK_URI = "http://libevent.org/"
+
+S = "${WORKDIR}/${BPN}-${PV}-stable"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+
+inherit autotools
+
+# Needed for Debian packaging
+LEAD_SONAME = "libevent-2.1.so"
+
+inherit ptest multilib_header
+
+DEPENDS = "zlib"
+
+PACKAGES_DYNAMIC = "^${PN}-.*$"
+python split_libevent_libs () {
+ do_split_packages(d, '${libdir}', r'^libevent_([a-z]*)-.*\.so\..*', '${PN}-%s', '${SUMMARY} (%s)', prepend=True, allow_links=True)
+}
+PACKAGESPLITFUNCS_prepend = "split_libevent_libs "
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append() {
+ rm ${D}${bindir}/event_rpcgen.py
+ rmdir ${D}${bindir}
+ oe_multilib_header event2/event-config.h
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
+ do
+ install -m 0755 $file ${D}${PTEST_PATH}/test
+ done
+
+ # handle multilib
+ sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
+}
diff --git a/meta/recipes-support/libexif/libexif/CVE-2016-6328.patch b/meta/recipes-support/libexif/libexif/CVE-2016-6328.patch
new file mode 100644
index 0000000000..a6f307439b
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif/CVE-2016-6328.patch
@@ -0,0 +1,64 @@
+CVE: CVE-2016-6328
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 41bd04234b104312f54d25822f68738ba8d7133d Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <marcus@jet.franken.de>
+Date: Tue, 25 Jul 2017 23:44:44 +0200
+Subject: [PATCH] fixes some (not all) buffer overreads during decoding pentax
+ makernote entries.
+
+This should fix:
+https://sourceforge.net/p/libexif/bugs/125/ CVE-2016-6328
+---
+ libexif/pentax/mnote-pentax-entry.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/libexif/pentax/mnote-pentax-entry.c b/libexif/pentax/mnote-pentax-entry.c
+index d03d159..ea0429a 100644
+--- a/libexif/pentax/mnote-pentax-entry.c
++++ b/libexif/pentax/mnote-pentax-entry.c
+@@ -425,24 +425,34 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry,
+ case EXIF_FORMAT_SHORT:
+ {
+ const unsigned char *data = entry->data;
+- size_t k, len = strlen(val);
++ size_t k, len = strlen(val), sizeleft;
++
++ sizeleft = entry->size;
+ for(k=0; k<entry->components; k++) {
++ if (sizeleft < 2)
++ break;
+ vs = exif_get_short (data, entry->order);
+ snprintf (val+len, maxlen-len, "%i ", vs);
+ len = strlen(val);
+ data += 2;
++ sizeleft -= 2;
+ }
+ }
+ break;
+ case EXIF_FORMAT_LONG:
+ {
+ const unsigned char *data = entry->data;
+- size_t k, len = strlen(val);
++ size_t k, len = strlen(val), sizeleft;
++
++ sizeleft = entry->size;
+ for(k=0; k<entry->components; k++) {
++ if (sizeleft < 4)
++ break;
+ vl = exif_get_long (data, entry->order);
+ snprintf (val+len, maxlen-len, "%li", (long int) vl);
+ len = strlen(val);
+ data += 4;
++ sizeleft -= 4;
+ }
+ }
+ break;
+@@ -455,5 +465,5 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry,
+ break;
+ }
+
+- return (val);
++ return val;
+ }
diff --git a/meta/recipes-support/libexif/libexif/CVE-2017-7544.patch b/meta/recipes-support/libexif/libexif/CVE-2017-7544.patch
new file mode 100644
index 0000000000..e49481ff84
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif/CVE-2017-7544.patch
@@ -0,0 +1,40 @@
+From 8a92f964a66d476ca8907234359e92a70fc1325b Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 28 Aug 2018 15:12:10 +0800
+Subject: [PATCH] On saving makernotes, make sure the makernote container tags
+ has a type with 1 byte components.
+
+Fixes (at least):
+ https://sourceforge.net/p/libexif/bugs/130
+ https://sourceforge.net/p/libexif/bugs/129
+
+Upstream-Status: Backport[https://github.com/libexif/libexif/commit/
+c39acd1692023b26290778a02a9232c873f9d71a#diff-830e348923810f00726700b083ec00cd]
+
+CVE: CVE-2017-7544
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ libexif/exif-data.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libexif/exif-data.c b/libexif/exif-data.c
+index 67df4db..6bf89eb 100644
+--- a/libexif/exif-data.c
++++ b/libexif/exif-data.c
+@@ -255,6 +255,12 @@ exif_data_save_data_entry (ExifData *data, ExifEntry *e,
+ exif_mnote_data_set_offset (data->priv->md, *ds - 6);
+ exif_mnote_data_save (data->priv->md, &e->data, &e->size);
+ e->components = e->size;
++ if (exif_format_get_size (e->format) != 1) {
++ /* e->format is taken from input code,
++ * but we need to make sure it is a 1 byte
++ * entity due to the multiplication below. */
++ e->format = EXIF_FORMAT_UNDEFINED;
++ }
+ }
+ }
+
+--
+2.7.4
+
diff --git a/meta/recipes-support/libexif/libexif/CVE-2018-20030.patch b/meta/recipes-support/libexif/libexif/CVE-2018-20030.patch
new file mode 100644
index 0000000000..76233e6dc9
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif/CVE-2018-20030.patch
@@ -0,0 +1,115 @@
+CVE: CVE-2018-20030
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 6aa11df549114ebda520dde4cdaea2f9357b2c89 Mon Sep 17 00:00:00 2001
+From: Dan Fandrich <dan@coneharvesters.com>
+Date: Fri, 12 Oct 2018 16:01:45 +0200
+Subject: [PATCH] Improve deep recursion detection in
+ exif_data_load_data_content.
+
+The existing detection was still vulnerable to pathological cases
+causing DoS by wasting CPU. The new algorithm takes the number of tags
+into account to make it harder to abuse by cases using shallow recursion
+but with a very large number of tags. This improves on commit 5d28011c
+which wasn't sufficient to counter this kind of case.
+
+The limitation in the previous fix was discovered by Laurent Delosieres,
+Secunia Research at Flexera (Secunia Advisory SA84652) and is assigned
+the identifier CVE-2018-20030.
+
+diff --git a/libexif/exif-data.c b/libexif/exif-data.c
+index 67df4db..8d9897e 100644
+--- a/libexif/exif-data.c
++++ b/libexif/exif-data.c
+@@ -35,6 +35,7 @@
+ #include <libexif/olympus/exif-mnote-data-olympus.h>
+ #include <libexif/pentax/exif-mnote-data-pentax.h>
+
++#include <math.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -344,6 +345,20 @@ if (data->ifd[(i)]->count) { \
+ break; \
+ }
+
++/*! Calculate the recursion cost added by one level of IFD loading.
++ *
++ * The work performed is related to the cost in the exponential relation
++ * work=1.1**cost
++ */
++static unsigned int
++level_cost(unsigned int n)
++{
++ static const double log_1_1 = 0.09531017980432493;
++
++ /* Adding 0.1 protects against the case where n==1 */
++ return ceil(log(n + 0.1)/log_1_1);
++}
++
+ /*! Load data for an IFD.
+ *
+ * \param[in,out] data #ExifData
+@@ -351,13 +366,13 @@ if (data->ifd[(i)]->count) { \
+ * \param[in] d pointer to buffer containing raw IFD data
+ * \param[in] ds size of raw data in buffer at \c d
+ * \param[in] offset offset into buffer at \c d at which IFD starts
+- * \param[in] recursion_depth number of times this function has been
+- * recursively called without returning
++ * \param[in] recursion_cost factor indicating how expensive this recursive
++ * call could be
+ */
+ static void
+ exif_data_load_data_content (ExifData *data, ExifIfd ifd,
+ const unsigned char *d,
+- unsigned int ds, unsigned int offset, unsigned int recursion_depth)
++ unsigned int ds, unsigned int offset, unsigned int recursion_cost)
+ {
+ ExifLong o, thumbnail_offset = 0, thumbnail_length = 0;
+ ExifShort n;
+@@ -372,9 +387,20 @@ exif_data_load_data_content (ExifData *data, ExifIfd ifd,
+ if ((((int)ifd) < 0) || ( ((int)ifd) >= EXIF_IFD_COUNT))
+ return;
+
+- if (recursion_depth > 30) {
++ if (recursion_cost > 170) {
++ /*
++ * recursion_cost is a logarithmic-scale indicator of how expensive this
++ * recursive call might end up being. It is an indicator of the depth of
++ * recursion as well as the potential for worst-case future recursive
++ * calls. Since it's difficult to tell ahead of time how often recursion
++ * will occur, this assumes the worst by assuming every tag could end up
++ * causing recursion.
++ * The value of 170 was chosen to limit typical EXIF structures to a
++ * recursive depth of about 6, but pathological ones (those with very
++ * many tags) to only 2.
++ */
+ exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData",
+- "Deep recursion detected!");
++ "Deep/expensive recursion detected!");
+ return;
+ }
+
+@@ -416,15 +442,18 @@ exif_data_load_data_content (ExifData *data, ExifIfd ifd,
+ switch (tag) {
+ case EXIF_TAG_EXIF_IFD_POINTER:
+ CHECK_REC (EXIF_IFD_EXIF);
+- exif_data_load_data_content (data, EXIF_IFD_EXIF, d, ds, o, recursion_depth + 1);
++ exif_data_load_data_content (data, EXIF_IFD_EXIF, d, ds, o,
++ recursion_cost + level_cost(n));
+ break;
+ case EXIF_TAG_GPS_INFO_IFD_POINTER:
+ CHECK_REC (EXIF_IFD_GPS);
+- exif_data_load_data_content (data, EXIF_IFD_GPS, d, ds, o, recursion_depth + 1);
++ exif_data_load_data_content (data, EXIF_IFD_GPS, d, ds, o,
++ recursion_cost + level_cost(n));
+ break;
+ case EXIF_TAG_INTEROPERABILITY_IFD_POINTER:
+ CHECK_REC (EXIF_IFD_INTEROPERABILITY);
+- exif_data_load_data_content (data, EXIF_IFD_INTEROPERABILITY, d, ds, o, recursion_depth + 1);
++ exif_data_load_data_content (data, EXIF_IFD_INTEROPERABILITY, d, ds, o,
++ recursion_cost + level_cost(n));
+ break;
+ case EXIF_TAG_JPEG_INTERCHANGE_FORMAT:
+ thumbnail_offset = o;
diff --git a/meta/recipes-support/libexif/libexif_0.6.21.bb b/meta/recipes-support/libexif/libexif_0.6.21.bb
index cff4caede9..d847beab18 100644
--- a/meta/recipes-support/libexif/libexif_0.6.21.bb
+++ b/meta/recipes-support/libexif/libexif_0.6.21.bb
@@ -4,14 +4,14 @@ SECTION = "libs"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
-SRC_URI = "${SOURCEFORGE_MIRROR}/libexif/libexif-${PV}.tar.bz2"
+SRC_URI = "${SOURCEFORGE_MIRROR}/libexif/libexif-${PV}.tar.bz2 \
+ file://CVE-2017-7544.patch \
+ file://CVE-2016-6328.patch \
+ file://CVE-2018-20030.patch"
SRC_URI[md5sum] = "27339b89850f28c8f1c237f233e05b27"
SRC_URI[sha256sum] = "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
inherit autotools gettext
-do_configure_append() {
- sed -i s:doc\ binary:binary:g Makefile
-}
-
+EXTRA_OECONF += "--disable-docs"
diff --git a/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128-part2.patch b/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128-part2.patch
new file mode 100644
index 0000000000..6b5b7d4747
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128-part2.patch
@@ -0,0 +1,34 @@
+Address platforms with no __int128.
+
+Fixes remaining pieces from
+https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/src/powerpc/ffi_linux64.c.org 2019-12-05 14:48:33.140579431 -0800
++++ a/src/powerpc/ffi_linux64.c 2019-12-05 14:53:58.827244495 -0800
+@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, uns
+ {
+ if (vecarg_count < NUM_VEC_ARG_REGISTERS64
+ && i < nfixedargs)
+- *vec_base.f128++ = *arg.f128++;
++ memcpy (vec_base.f128++, arg.f128, sizeof (float128));
+ else
+- *next_arg.f128 = *arg.f128++;
++ memcpy (next_arg.f128, arg.f128++, sizeof (float128));
+ if (++next_arg.f128 == gpr_end.f128)
+ next_arg.f128 = rest.f128;
+ vecarg_count++;
+@@ -986,9 +986,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif
+ do
+ {
+ if (pvec < end_pvec && i < nfixedargs)
+- *to.f128 = *pvec++;
++ memcpy (to.f128, pvec++, sizeof (float128));
+ else
+- *to.f128 = *from.f128;
++ memcpy (to.f128, from.f128, sizeof (float128));
+ to.f128++;
+ from.f128++;
+ }
diff --git a/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch b/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch
new file mode 100644
index 0000000000..2e32a50296
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch
@@ -0,0 +1,27 @@
+From 68f45b9049dffb54f5a29a3a495ab3dfcf010634 Mon Sep 17 00:00:00 2001
+From: Anthony Green <green@moxielogic.com>
+Date: Fri, 29 Nov 2019 07:00:35 -0500
+Subject: [PATCH] Address platforms with no __int128.
+
+Upstream-Status: Backport [https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/powerpc/ffi_linux64.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c
+index de0d033..7364770 100644
+--- a/src/powerpc/ffi_linux64.c
++++ b/src/powerpc/ffi_linux64.c
+@@ -547,9 +547,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
+ if (next_arg.ul == gpr_end.ul)
+ next_arg.ul = rest.ul;
+ if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs)
+- *vec_base.f128++ = **p_argv.f128;
++ memcpy (vec_base.f128++, *p_argv.f128, sizeof (float128));
+ else
+- *next_arg.f128 = **p_argv.f128;
++ memcpy (next_arg.f128, *p_argv.f128, sizeof (float128));
+ if (++next_arg.f128 == gpr_end.f128)
+ next_arg.f128 = rest.f128;
+ vecarg_count++;
diff --git a/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch b/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch
new file mode 100644
index 0000000000..397194bc93
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch
@@ -0,0 +1,27 @@
+From 14e2e74682db3bfcf057688f738fdd842a02ff2d Mon Sep 17 00:00:00 2001
+From: Carl Hurd <carl@Carls-MacBook-Pro.local>
+Date: Wed, 18 Jul 2018 09:04:32 -0400
+Subject: [PATCH] Fixed missed #ifndef for __mips_soft_float
+
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+Upstream-Status: Submitted [https://github.com/libffi/libffi/pull/442]
+---
+ src/mips/o32.S | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/mips/o32.S b/src/mips/o32.S
+index 44e74cb..799139b 100644
+--- a/src/mips/o32.S
++++ b/src/mips/o32.S
+@@ -282,9 +282,11 @@ $LCFI12:
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
+
++#ifndef __mips_soft_float
+ # Store all possible float/double registers.
+ s.d $f12, FA_0_0_OFF2($fp)
+ s.d $f14, FA_1_0_OFF2($fp)
++#endif
+ 1:
+ # prepare arguments for ffi_closure_mips_inner_O32
+ REG_L a0, 4($15) # cif
diff --git a/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch b/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch
deleted file mode 100644
index db96e63547..0000000000
--- a/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a5efaa96fd934eb245c234a5275fcf62698ef986 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 2 Apr 2015 21:38:03 -0700
-Subject: [PATCH] mips: Use compiler internal define for linux
-
-__linux__ is defined by compiler when building for
-linux platforms, lets use it
-
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/mips/ffitarget.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/mips/ffitarget.h b/src/mips/ffitarget.h
-index 717d659..6faa358 100644
---- a/src/mips/ffitarget.h
-+++ b/src/mips/ffitarget.h
-@@ -32,7 +32,7 @@
- #error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
- #endif
-
--#ifdef linux
-+#ifdef __linux__
- # include <asm/sgidefs.h>
- #elif defined(__rtems__)
- /*
---
-2.1.4
-
diff --git a/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch b/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch
deleted file mode 100644
index 61c9eb31d1..0000000000
--- a/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From 655e82c92d5c3875aee04322f1993d6b0774a7bf Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Mon, 15 Aug 2016 15:00:13 +0800
-Subject: [PATCH] mips: fix MIPS softfloat build issue
-
-The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi:
-fix MIPS softfloat build issue with current binutils"
-
-Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
-Upstream-Status: Backport [https://github.com/libffi/libffi/commit/2ded2a4f494165c93293afc14ab0be1243cf8c49]
- src/mips/n32.S | 17 +++++++++++++++++
- src/mips/o32.S | 17 +++++++++++++++++
- 2 files changed, 34 insertions(+)
-
-diff --git a/src/mips/n32.S b/src/mips/n32.S
-index c6985d3..8f25994 100644
---- a/src/mips/n32.S
-+++ b/src/mips/n32.S
-@@ -107,6 +107,16 @@ loadregs:
-
- REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6.
-
-+#ifdef __mips_soft_float
-+ REG_L a0, 0*FFI_SIZEOF_ARG(t9)
-+ REG_L a1, 1*FFI_SIZEOF_ARG(t9)
-+ REG_L a2, 2*FFI_SIZEOF_ARG(t9)
-+ REG_L a3, 3*FFI_SIZEOF_ARG(t9)
-+ REG_L a4, 4*FFI_SIZEOF_ARG(t9)
-+ REG_L a5, 5*FFI_SIZEOF_ARG(t9)
-+ REG_L a6, 6*FFI_SIZEOF_ARG(t9)
-+ REG_L a7, 7*FFI_SIZEOF_ARG(t9)
-+#else
- and t4, t6, ((1<<FFI_FLAG_BITS)-1)
- REG_L a0, 0*FFI_SIZEOF_ARG(t9)
- beqz t4, arg1_next
-@@ -193,6 +203,7 @@ arg7_next:
- arg8_doublep:
- l.d $f19, 7*FFI_SIZEOF_ARG(t9)
- arg8_next:
-+#endif
-
- callit:
- # Load the function pointer
-@@ -214,6 +225,7 @@ retint:
- b epilogue
-
- retfloat:
-+#ifndef __mips_soft_float
- bne t6, FFI_TYPE_FLOAT, retdouble
- jal t9
- REG_L t4, 4*FFI_SIZEOF_ARG($fp)
-@@ -272,6 +284,7 @@ retstruct_f_d:
- s.s $f0, 0(t4)
- s.d $f2, 8(t4)
- b epilogue
-+#endif
-
- retstruct_d_soft:
- bne t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft
-@@ -429,6 +442,7 @@ ffi_closure_N32:
- REG_S a6, A6_OFF2($sp)
- REG_S a7, A7_OFF2($sp)
-
-+#ifndef __mips_soft_float
- # Store all possible float/double registers.
- s.d $f12, F12_OFF2($sp)
- s.d $f13, F13_OFF2($sp)
-@@ -438,6 +452,7 @@ ffi_closure_N32:
- s.d $f17, F17_OFF2($sp)
- s.d $f18, F18_OFF2($sp)
- s.d $f19, F19_OFF2($sp)
-+#endif
-
- # Call ffi_closure_mips_inner_N32 to do the real work.
- LA t9, ffi_closure_mips_inner_N32
-@@ -458,6 +473,7 @@ cls_retint:
- b cls_epilogue
-
- cls_retfloat:
-+#ifndef __mips_soft_float
- bne v0, FFI_TYPE_FLOAT, cls_retdouble
- l.s $f0, V0_OFF2($sp)
- b cls_epilogue
-@@ -500,6 +516,7 @@ cls_retstruct_f_d:
- l.s $f0, V0_OFF2($sp)
- l.d $f2, V1_OFF2($sp)
- b cls_epilogue
-+#endif
-
- cls_retstruct_small2:
- REG_L v0, V0_OFF2($sp)
-diff --git a/src/mips/o32.S b/src/mips/o32.S
-index eb27981..429dd0a 100644
---- a/src/mips/o32.S
-+++ b/src/mips/o32.S
-@@ -82,13 +82,16 @@ sixteen:
-
- ADDU $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args
-
-+#ifndef __mips_soft_float
- bnez t0, pass_d # make it quick for int
-+#endif
- REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the
- REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs.
- REG_L a2, 2*FFI_SIZEOF_ARG($sp)
- REG_L a3, 3*FFI_SIZEOF_ARG($sp)
- b call_it
-
-+#ifndef __mips_soft_float
- pass_d:
- bne t0, FFI_ARGS_D, pass_f
- l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args
-@@ -130,6 +133,7 @@ pass_f_d:
- # bne t0, FFI_ARGS_F_D, call_it
- l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args
- l.d $f14, 2*FFI_SIZEOF_ARG($sp) # passing double and float
-+#endif
-
- call_it:
- # Load the function pointer
-@@ -158,14 +162,23 @@ retfloat:
- bne t2, FFI_TYPE_FLOAT, retdouble
- jalr t9
- REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
-+#ifndef __mips_soft_float
- s.s $f0, 0(t0)
-+#else
-+ REG_S v0, 0(t0)
-+#endif
- b epilogue
-
- retdouble:
- bne t2, FFI_TYPE_DOUBLE, noretval
- jalr t9
- REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
-+#ifndef __mips_soft_float
- s.d $f0, 0(t0)
-+#else
-+ REG_S v1, 4(t0)
-+ REG_S v0, 0(t0)
-+#endif
- b epilogue
-
- noretval:
-@@ -261,9 +274,11 @@ $LCFI7:
- li $13, 1 # FFI_O32
- bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
-
-+#ifndef __mips_soft_float
- # Store all possible float/double registers.
- s.d $f12, FA_0_0_OFF2($fp)
- s.d $f14, FA_1_0_OFF2($fp)
-+#endif
- 1:
- # Call ffi_closure_mips_inner_O32 to do the work.
- la t9, ffi_closure_mips_inner_O32
-@@ -281,6 +296,7 @@ $LCFI7:
- li $13, 1 # FFI_O32
- bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
-
-+#ifndef __mips_soft_float
- li $9, FFI_TYPE_FLOAT
- l.s $f0, V0_OFF2($fp)
- beq $8, $9, closure_done
-@@ -288,6 +304,7 @@ $LCFI7:
- li $9, FFI_TYPE_DOUBLE
- l.d $f0, V0_OFF2($fp)
- beq $8, $9, closure_done
-+#endif
- 1:
- REG_L $3, V1_OFF2($fp)
- REG_L $2, V0_OFF2($fp)
---
-2.9.3
-
diff --git a/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch b/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch
new file mode 100644
index 0000000000..8a7aea4311
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch
@@ -0,0 +1,38 @@
+From 4dc6cc961300b9deffb648b1237390a5bea1c6d6 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 28 Nov 2019 12:42:41 +0000
+Subject: [PATCH] powerpc: fix build failure on power7 and older (#532)
+
+Build failure looks as:
+```
+libtool: compile: powerpc-unknown-linux-gnu-gcc \
+ -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ...
+In file included from src/powerpc/ffi.c:33:
+src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target
+ 65 | typedef __int128 float128;
+ | ^~~~~~~~
+```
+
+The fix avoids using __int128 in favour of aligned char[16].
+
+Closes: https://github.com/libffi/libffi/issues/531
+Upstream-Status: Backport [https://github.com/libffi/libffi/commit/01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd]
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/powerpc/ffi_powerpc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h
+index 5ee2a70..8e2f2f0 100644
+--- a/src/powerpc/ffi_powerpc.h
++++ b/src/powerpc/ffi_powerpc.h
+@@ -62,7 +62,7 @@ typedef _Float128 float128;
+ #elif defined(__FLOAT128__)
+ typedef __float128 float128;
+ #else
+-typedef __int128 float128;
++typedef char float128[16] __attribute__((aligned(16)));
+ #endif
+
+ void FFI_HIDDEN ffi_closure_SYSV (void);
diff --git a/meta/recipes-support/libffi/libffi/not-win32.patch b/meta/recipes-support/libffi/libffi/not-win32.patch
index 1e90125edd..62daaf4b38 100644
--- a/meta/recipes-support/libffi/libffi/not-win32.patch
+++ b/meta/recipes-support/libffi/libffi/not-win32.patch
@@ -1,3 +1,8 @@
+From 306719369a0d3608b4ff2737de74ae284788a14b Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 4 Feb 2016 16:22:50 +0000
+Subject: [PATCH] libffi: ensure sysroot paths are not in libffi.pc
+
libffi's configure assumes that cross-compiled builds are complicated and
introduces convoluted path manipulation involving gcc search paths to the
install paths, resulting in paths like -L/usr/lib/../lib/ appearing in
@@ -11,12 +16,20 @@ As this block is generally pointless, disable it.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
---- a/configure.ac~ 2014-11-12 11:56:51.000000000 +0000
-+++ b/configure.ac 2016-02-04 14:02:53.765710532 +0000
-@@ -593,5 +593,5 @@
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b764368..d51ce91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -354,7 +354,7 @@ AC_ARG_ENABLE(multi-os-directory,
+
# These variables are only ever used when we cross-build to X86_WIN32.
# And we only support this with GCC, so...
-if test "x$GCC" = "xyes"; then
+if false; then
if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then \ No newline at end of file
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir='${exec_prefix}'/'$(target_alias)'
diff --git a/meta/recipes-support/libffi/libffi_3.2.1.bb b/meta/recipes-support/libffi/libffi_3.2.1.bb
deleted file mode 100644
index 43eee8efc4..0000000000
--- a/meta/recipes-support/libffi/libffi_3.2.1.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "A portable foreign function interface library"
-DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \
-conventions. This allows a programmer to call any function specified by a call interface description at run \
-time. FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the \
-interface that allows code written in one language to call code written in another language. The `libffi' \
-library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. \
-A layer must exist above `libffi' that handles type conversions for values passed between the two languages."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
-
-SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
- file://not-win32.patch \
- file://0001-mips-Use-compiler-internal-define-for-linux.patch \
- file://0001-mips-fix-MIPS-softfloat-build-issue.patch \
- "
-
-SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
-SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"
-
-EXTRA_OECONF += "--disable-builddir"
-
-inherit autotools texinfo
-
-FILES_${PN}-dev += "${libdir}/libffi-${PV}"
-
-# Doesn't compile in MIPS16e mode due to use of hand-written
-# assembly
-MIPS_INSTRUCTION_SET = "mips"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libffi/libffi_3.3.bb b/meta/recipes-support/libffi/libffi_3.3.bb
new file mode 100644
index 0000000000..803a25fa35
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi_3.3.bb
@@ -0,0 +1,40 @@
+SUMMARY = "A portable foreign function interface library"
+HOMEPAGE = "http://sourceware.org/libffi/"
+DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \
+conventions. This allows a programmer to call any function specified by a call interface description at run \
+time. FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the \
+interface that allows code written in one language to call code written in another language. The `libffi' \
+library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. \
+A layer must exist above `libffi' that handles type conversions for values passed between the two languages."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=492385fe22195952f5b9b197868ba268"
+
+SRC_URI = "https://github.com/libffi/libffi/releases/download/v${PV}/${BPN}-${PV}.tar.gz \
+ file://not-win32.patch \
+ file://0001-Fixed-missed-ifndef-for-__mips_soft_float.patch \
+ file://0001-powerpc-fix-build-failure-on-power7-and-older-532.patch \
+ file://0001-Address-platforms-with-no-__int128.patch \
+ file://0001-Address-platforms-with-no-__int128-part2.patch \
+ "
+SRC_URI[md5sum] = "6313289e32f1d38a9df4770b014a2ca7"
+SRC_URI[sha256sum] = "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056"
+UPSTREAM_CHECK_URI = "https://github.com/libffi/libffi/releases/"
+UPSTREAM_CHECK_REGEX = "libffi-(?P<pver>\d+(\.\d+)+)\.tar"
+
+EXTRA_OECONF += "--disable-builddir"
+EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
+inherit autotools texinfo multilib_header
+
+do_install_append() {
+ oe_multilib_header ffi.h
+}
+
+FILES_${PN}-dev += "${libdir}/libffi-${PV}"
+
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-support/libfm/libfm-extra_1.2.4.bb b/meta/recipes-support/libfm/libfm-extra_1.2.4.bb
deleted file mode 100644
index f204968039..0000000000
--- a/meta/recipes-support/libfm/libfm-extra_1.2.4.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Library for file management"
-HOMEPAGE = "http://pcmanfm.sourceforge.net/"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007"
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 intltool-native gettext-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
- file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
- "
-
-SRC_URI[md5sum] = "74997d75e7e87dc73398746fd373bf52"
-SRC_URI[sha256sum] = "7804f6f28cb3d1bc8ffb3151ab7ff0c063b27c5f9b06c682eb903e01cf25502f"
-
-S = "${WORKDIR}/libfm-${PV}"
-
-EXTRA_OECONF = "--with-extra-only --with-gtk=no"
-
-inherit autotools pkgconfig gtk-doc
-
-do_configure[dirs] =+ "${S}/m4"
diff --git a/meta/recipes-support/libfm/libfm-extra_1.3.1.bb b/meta/recipes-support/libfm/libfm-extra_1.3.1.bb
new file mode 100644
index 0000000000..85102a1a3d
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm-extra_1.3.1.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007"
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0-native glib-2.0 intltool-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
+ file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
+ "
+
+SRC_URI[md5sum] = "c15ecd2c9317e2c385cd3f046d0b61ba"
+SRC_URI[sha256sum] = "96b1244bde41ca0eef0332cfb5c67bb16725dfd102128f3e6f74fadc13a1cfe4"
+
+S = "${WORKDIR}/libfm-${PV}"
+
+EXTRA_OECONF = "--with-extra-only --with-gtk=no"
+
+inherit autotools pkgconfig gtk-doc gettext
+
+do_configure[dirs] =+ "${S}/m4"
diff --git a/meta/recipes-support/libfm/libfm/0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch b/meta/recipes-support/libfm/libfm/0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch
new file mode 100644
index 0000000000..fb91d90cf2
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm/0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch
@@ -0,0 +1,28 @@
+From 23c6e9df611c86a5e97079e1b88c7a18474bf0bc Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 16 Dec 2016 16:52:04 +0200
+Subject: [PATCH] Correctly check the stamp file that indicates if we need to
+ re-build vala code
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index d043b3d..0e85590 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -42,7 +42,7 @@ AM_COND_IF(EXTRALIB_ONLY,
+ [enable_actions=no])
+ if test x"$enable_actions" = xyes; then
+ dnl no vala compiler required when sources are from dist tarball
+- if test -f src/actions/libfmactions_la_vala.stamp; then
++ if test -f $srcdir/src/actions/libfmactions_la_vala.stamp; then
+ AM_PROG_VALAC
+ else
+ AM_PROG_VALAC([0.13.0])
+--
+2.10.2
+
diff --git a/meta/recipes-support/libfm/libfm/0001-Do-not-add-library-path-to-avoid-host-contamination.patch b/meta/recipes-support/libfm/libfm/0001-Do-not-add-library-path-to-avoid-host-contamination.patch
new file mode 100644
index 0000000000..f4c89127fc
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm/0001-Do-not-add-library-path-to-avoid-host-contamination.patch
@@ -0,0 +1,23 @@
+From 07260295e031e845e38ba874fa6ab500790c4aaf Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 2 May 2018 16:48:47 +0300
+Subject: [PATCH] Do not add library path to avoid host contamination
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/modules/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am
+index e61f4e0..01c15bd 100644
+--- a/src/modules/Makefile.am
++++ b/src/modules/Makefile.am
+@@ -11,7 +11,6 @@ AM_CPPFLAGS = \
+ # tell libtool we compile module not library
+ AM_LDFLAGS = \
+ -no-undefined -module -avoid-version -shared -export-dynamic \
+- -L$(libdir) \
+ $(GIO_LIBS)
+
+ # the module should be linked only with libfm, not libfm-gtk or whatever
diff --git a/meta/recipes-support/libfm/libfm_1.2.4.bb b/meta/recipes-support/libfm/libfm_1.2.4.bb
deleted file mode 100644
index 2218f9cb7a..0000000000
--- a/meta/recipes-support/libfm/libfm_1.2.4.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Library for file management"
-HOMEPAGE = "http://pcmanfm.sourceforge.net/"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b \
- file://src/fm.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007 \
- file://src/base/fm-config.h;beginline=10;endline=23;md5=ef1f84da64b3c01cca447212f7ef6007 \
- file://src/fm-gtk.h;beginline=6;endline=19;md5=646baa4955c04fe768f2ca27b92ac8dd"
-
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 pango gtk+3 menu-cache intltool-native libexif libfm-extra gettext-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "74997d75e7e87dc73398746fd373bf52"
-SRC_URI[sha256sum] = "7804f6f28cb3d1bc8ffb3151ab7ff0c063b27c5f9b06c682eb903e01cf25502f"
-
-inherit autotools pkgconfig gtk-doc distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-EXTRA_OECONF = "--with-gtk=3"
-
-do_configure[dirs] =+ "${S}/m4"
-
-PACKAGES += "${PN}-mime"
-FILES_${PN}-mime = "${datadir}/mime/"
-
-do_install_append () {
- # remove files which are part of libfm-extra
- rm -f ${D}${includedir}/libfm-1.0/fm-xml-file.h
- rm -f ${D}${includedir}/libfm-1.0/fm-version.h
- rm -f ${D}${includedir}/libfm-1.0/fm-extra.h
- rm -f ${D}${libdir}/pkgconfig/libfm-extra.pc
- rm -f ${D}${libdir}/libfm-extra.so*
- rm -f ${D}${libdir}/libfm-extra.a
- rm -f ${D}${libdir}/libfm-extra.la
-}
diff --git a/meta/recipes-support/libfm/libfm_1.3.1.bb b/meta/recipes-support/libfm/libfm_1.3.1.bb
new file mode 100644
index 0000000000..918fe3ece7
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm_1.3.1.bb
@@ -0,0 +1,54 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b \
+ file://src/fm.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007 \
+ file://src/base/fm-config.h;beginline=10;endline=23;md5=ef1f84da64b3c01cca447212f7ef6007 \
+ file://src/fm-gtk.h;beginline=6;endline=19;md5=646baa4955c04fe768f2ca27b92ac8dd"
+
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 glib-2.0-native pango gtk+3 menu-cache intltool-native libexif libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
+ file://0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch \
+ file://0001-Do-not-add-library-path-to-avoid-host-contamination.patch \
+ "
+
+SRC_URI[md5sum] = "c15ecd2c9317e2c385cd3f046d0b61ba"
+SRC_URI[sha256sum] = "96b1244bde41ca0eef0332cfb5c67bb16725dfd102128f3e6f74fadc13a1cfe4"
+
+inherit autotools pkgconfig gtk-doc gettext features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+EXTRA_OECONF = "--with-gtk=3"
+
+do_configure[dirs] =+ "${S}/m4"
+
+PACKAGES =+ "libfm-gtk"
+PACKAGES += "${PN}-mime"
+FILES_libfm-gtk = " \
+ ${libdir}/libfm-gtk*so.* \
+ ${libdir}/libfm/modules/gtk* \
+ ${bindir}/libfm-pref-apps \
+ ${bindir}/lxshortcut \
+ ${datadir}/applications/libfm-pref-apps.desktop \
+ ${datadir}/applications/lxshortcut.desktop \
+ ${datadir}/libfm/images/folder.png \
+ ${datadir}/libfm/images/unknown.png \
+ ${datadir}/libfm/ui/*.ui \
+"
+FILES_${PN}-mime = "${datadir}/mime/"
+
+do_install_append () {
+ # remove files which are part of libfm-extra
+ rm -f ${D}${includedir}/libfm-1.0/fm-xml-file.h
+ rm -f ${D}${includedir}/libfm-1.0/fm-version.h
+ rm -f ${D}${includedir}/libfm-1.0/fm-extra.h
+ rm -f ${D}${includedir}/libfm
+ rm -f ${D}${libdir}/pkgconfig/libfm-extra.pc
+ rm -f ${D}${libdir}/libfm-extra.so*
+ rm -f ${D}${libdir}/libfm-extra.a
+ rm -f ${D}${libdir}/libfm-extra.la
+}
diff --git a/meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch b/meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch
new file mode 100644
index 0000000000..4df96f0011
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch
@@ -0,0 +1,90 @@
+From 1374254c2904ab5b18ba4a890856824a102d4705 Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Date: Sat, 27 Apr 2019 19:33:28 +0300
+Subject: [PATCH 1/3] Prefetch GCM look-up tables
+
+* cipher/cipher-gcm.c (prefetch_table, do_prefetch_tables)
+(prefetch_tables): New.
+(ghash_internal): Call prefetch_tables.
+--
+
+Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+
+Upstream-Status: Backport
+[https://github.com/gpg/libgcrypt/commit/1374254c2904ab5b18ba4a890856824a102d4705]
+
+CVE: CVE-2019-12904
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ cipher/cipher-gcm.c | 33 +++++++++++++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+
+diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c
+index c19f09f..11f119a 100644
+--- a/cipher/cipher-gcm.c
++++ b/cipher/cipher-gcm.c
+@@ -118,6 +118,34 @@ static const u16 gcmR[256] = {
+ 0xbbf0, 0xba32, 0xb874, 0xb9b6, 0xbcf8, 0xbd3a, 0xbf7c, 0xbebe,
+ };
+
++static inline
++void prefetch_table(const void *tab, size_t len)
++{
++ const volatile byte *vtab = tab;
++ size_t i;
++
++ for (i = 0; i < len; i += 8 * 32)
++ {
++ (void)vtab[i + 0 * 32];
++ (void)vtab[i + 1 * 32];
++ (void)vtab[i + 2 * 32];
++ (void)vtab[i + 3 * 32];
++ (void)vtab[i + 4 * 32];
++ (void)vtab[i + 5 * 32];
++ (void)vtab[i + 6 * 32];
++ (void)vtab[i + 7 * 32];
++ }
++
++ (void)vtab[len - 1];
++}
++
++static inline void
++do_prefetch_tables (const void *gcmM, size_t gcmM_size)
++{
++ prefetch_table(gcmM, gcmM_size);
++ prefetch_table(gcmR, sizeof(gcmR));
++}
++
+ #ifdef GCM_TABLES_USE_U64
+ static void
+ bshift (u64 * b0, u64 * b1)
+@@ -365,6 +393,8 @@ do_ghash (unsigned char *result, const unsigned char *buf, const u32 *gcmM)
+ #define fillM(c) \
+ do_fillM (c->u_mode.gcm.u_ghash_key.key, c->u_mode.gcm.gcm_table)
+ #define GHASH(c, result, buf) do_ghash (result, buf, c->u_mode.gcm.gcm_table)
++#define prefetch_tables(c) \
++ do_prefetch_tables(c->u_mode.gcm.gcm_table, sizeof(c->u_mode.gcm.gcm_table))
+
+ #else
+
+@@ -430,6 +460,7 @@ do_ghash (unsigned char *hsub, unsigned char *result, const unsigned char *buf)
+
+ #define fillM(c) do { } while (0)
+ #define GHASH(c, result, buf) do_ghash (c->u_mode.gcm.u_ghash_key.key, result, buf)
++#define prefetch_tables(c) do {} while (0)
+
+ #endif /* !GCM_USE_TABLES */
+
+@@ -441,6 +472,8 @@ ghash_internal (gcry_cipher_hd_t c, byte *result, const byte *buf,
+ const unsigned int blocksize = GCRY_GCM_BLOCK_LEN;
+ unsigned int burn = 0;
+
++ prefetch_tables (c);
++
+ while (nblocks)
+ {
+ burn = GHASH (c, result, buf);
+--
+2.7.4
+
diff --git a/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
new file mode 100644
index 0000000000..cd8a5993b4
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
@@ -0,0 +1,149 @@
+From bee26d7c4ea0b4a397c289b819b89e78bc325ba0 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <trevor.gamblin@windriver.com>
+Date: Tue, 29 Oct 2019 14:08:32 -0400
+Subject: [PATCH] libgcrypt: fix m4 file for oe-core
+
+Modify libgcrypt pkgconfig specifically for oe-core. Changes
+are based on a previous patch from RP, using wiggle to
+incorporate the parts that aren't in the upstream pkgconfig
+settings.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
+
+---
+ src/libgcrypt.m4 | 90 +++---------------------------------------------
+ 1 file changed, 4 insertions(+), 86 deletions(-)
+
+diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
+index 37dfbea2..3d2e90a8 100644
+--- a/src/libgcrypt.m4
++++ b/src/libgcrypt.m4
+@@ -29,41 +29,6 @@ dnl is added to the gpg_config_script_warn variable.
+ dnl
+ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ [ AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_ARG_WITH(libgcrypt-prefix,
+- AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
+- [prefix where LIBGCRYPT is installed (optional)]),
+- libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
+- if test x"${LIBGCRYPT_CONFIG}" = x ; then
+- if test x"${libgcrypt_config_prefix}" != x ; then
+- LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
+- fi
+- fi
+-
+- use_gpgrt_config=""
+- if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
+- if $GPGRT_CONFIG libgcrypt --exists; then
+- LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt"
+- AC_MSG_NOTICE([Use gpgrt-config as libgcrypt-config])
+- use_gpgrt_config=yes
+- fi
+- fi
+- if test -z "$use_gpgrt_config"; then
+- if test x"${LIBGCRYPT_CONFIG}" = x ; then
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
+- LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
+- fi
+- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+- fi
+
+ tmp=ifelse([$1], ,1:1.2.0,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+@@ -74,56 +39,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ min_libgcrypt_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
+- ok=no
+- if test "$LIBGCRYPT_CONFIG" != "no" ; then
+- req_major=`echo $min_libgcrypt_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_libgcrypt_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_libgcrypt_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- if test -z "$use_gpgrt_config"; then
+- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
+- else
+- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion`
+- fi
+- major=`echo $libgcrypt_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $libgcrypt_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- micro=`echo $libgcrypt_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$minor" -eq "$req_minor"; then
+- if test "$micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
+- if test $ok = yes; then
+- AC_MSG_RESULT([yes ($libgcrypt_config_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
++ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= $min_libgcrypt_version], [ok=yes], [ok=no])
++
+ if test $ok = yes; then
+ # If we have a recent libgcrypt, we should also check that the
+ # API is compatible
+ if test "$req_libgcrypt_api" -gt 0 ; then
+- if test -z "$use_gpgrt_config"; then
+- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
+- else
+- tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0`
+- fi
++ tmp=`$PKG_CONFIG --variable=api_version libgcrypt`
+ if test "$tmp" -gt 0 ; then
+ AC_MSG_CHECKING([LIBGCRYPT API version])
+ if test "$req_libgcrypt_api" -eq "$tmp" ; then
+@@ -136,11 +58,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ fi
+ fi
+ if test $ok = yes; then
+- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
+- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
+ ifelse([$2], , :, [$2])
+ if test -z "$use_gpgrt_config"; then
+- libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
++ libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt`
+ else
+ libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none`
+ fi
+@@ -158,8 +78,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ fi
+ fi
+ else
+- LIBGCRYPT_CFLAGS=""
+- LIBGCRYPT_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(LIBGCRYPT_CFLAGS)
+--
+2.17.1
+
diff --git a/meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch b/meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch
new file mode 100644
index 0000000000..c82c5b5c8a
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch
@@ -0,0 +1,332 @@
+From 119348dd9aa52ab229afb5e2d3342d2b76fe81bf Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Date: Fri, 31 May 2019 17:18:09 +0300
+Subject: [PATCH 2/3] AES: move look-up tables to .data section and unshare between
+ processes
+
+* cipher/rijndael-internal.h (ATTR_ALIGNED_64): New.
+* cipher/rijndael-tables.h (encT): Move to 'enc_tables' structure.
+(enc_tables): New structure for encryption table with counters before
+and after.
+(encT): New macro.
+(dec_tables): Add counters before and after encryption table; Move
+from .rodata to .data section.
+(do_encrypt): Change 'encT' to 'enc_tables.T'.
+(do_decrypt): Change '&dec_tables' to 'dec_tables.T'.
+* cipher/cipher-gcm.c (prefetch_table): Make inline; Handle input
+with length not multiple of 256.
+(prefetch_enc, prefetch_dec): Modify pre- and post-table counters
+to unshare look-up table pages between processes.
+--
+
+GnuPG-bug-id: 4541
+Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+
+Upstream-Status: Backport
+[https://github.com/gpg/libgcrypt/commit/daedbbb5541cd8ecda1459d3b843ea4d92788762]
+
+CVE: CVE-2019-12904
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ cipher/rijndael-internal.h | 4 +-
+ cipher/rijndael-tables.h | 155 +++++++++++++++++++++++++--------------------
+ cipher/rijndael.c | 35 ++++++++--
+ 3 files changed, 118 insertions(+), 76 deletions(-)
+
+diff --git a/cipher/rijndael-internal.h b/cipher/rijndael-internal.h
+index 160fb8c..a62d4b7 100644
+--- a/cipher/rijndael-internal.h
++++ b/cipher/rijndael-internal.h
+@@ -29,11 +29,13 @@
+ #define BLOCKSIZE (128/8)
+
+
+-/* Helper macro to force alignment to 16 bytes. */
++/* Helper macro to force alignment to 16 or 64 bytes. */
+ #ifdef HAVE_GCC_ATTRIBUTE_ALIGNED
+ # define ATTR_ALIGNED_16 __attribute__ ((aligned (16)))
++# define ATTR_ALIGNED_64 __attribute__ ((aligned (64)))
+ #else
+ # define ATTR_ALIGNED_16
++# define ATTR_ALIGNED_64
+ #endif
+
+
+diff --git a/cipher/rijndael-tables.h b/cipher/rijndael-tables.h
+index 8359470..b54d959 100644
+--- a/cipher/rijndael-tables.h
++++ b/cipher/rijndael-tables.h
+@@ -21,80 +21,98 @@
+ /* To keep the actual implementation at a readable size we use this
+ include file to define the tables. */
+
+-static const u32 encT[256] =
++static struct
++{
++ volatile u32 counter_head;
++ u32 cacheline_align[64 / 4 - 1];
++ u32 T[256];
++ volatile u32 counter_tail;
++} enc_tables ATTR_ALIGNED_64 =
+ {
+- 0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6,
+- 0x0df2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591,
+- 0x50303060, 0x03010102, 0xa96767ce, 0x7d2b2b56,
+- 0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec,
+- 0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa,
+- 0x15fafaef, 0xeb5959b2, 0xc947478e, 0x0bf0f0fb,
+- 0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45,
+- 0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b,
+- 0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c,
+- 0x5a36366c, 0x413f3f7e, 0x02f7f7f5, 0x4fcccc83,
+- 0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x08f1f1f9,
+- 0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a,
+- 0x0c040408, 0x52c7c795, 0x65232346, 0x5ec3c39d,
+- 0x28181830, 0xa1969637, 0x0f05050a, 0xb59a9a2f,
+- 0x0907070e, 0x36121224, 0x9b80801b, 0x3de2e2df,
+- 0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea,
+- 0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34,
+- 0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b,
+- 0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d,
+- 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413,
+- 0xf55353a6, 0x68d1d1b9, 0x00000000, 0x2cededc1,
+- 0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6,
+- 0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972,
+- 0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85,
+- 0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed,
+- 0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511,
+- 0xcf45458a, 0x10f9f9e9, 0x06020204, 0x817f7ffe,
+- 0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b,
+- 0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05,
+- 0xad92923f, 0xbc9d9d21, 0x48383870, 0x04f5f5f1,
+- 0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142,
+- 0x30101020, 0x1affffe5, 0x0ef3f3fd, 0x6dd2d2bf,
+- 0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3,
+- 0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e,
+- 0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a,
+- 0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6,
+- 0xa06060c0, 0x98818119, 0xd14f4f9e, 0x7fdcdca3,
+- 0x66222244, 0x7e2a2a54, 0xab90903b, 0x8388880b,
+- 0xca46468c, 0x29eeeec7, 0xd3b8b86b, 0x3c141428,
+- 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad,
+- 0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14,
+- 0xdb494992, 0x0a06060c, 0x6c242448, 0xe45c5cb8,
+- 0x5dc2c29f, 0x6ed3d3bd, 0xefacac43, 0xa66262c4,
+- 0xa8919139, 0xa4959531, 0x37e4e4d3, 0x8b7979f2,
+- 0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda,
+- 0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949,
+- 0xb46c6cd8, 0xfa5656ac, 0x07f4f4f3, 0x25eaeacf,
+- 0xaf6565ca, 0x8e7a7af4, 0xe9aeae47, 0x18080810,
+- 0xd5baba6f, 0x887878f0, 0x6f25254a, 0x722e2e5c,
+- 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697,
+- 0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e,
+- 0xdd4b4b96, 0xdcbdbd61, 0x868b8b0d, 0x858a8a0f,
+- 0x907070e0, 0x423e3e7c, 0xc4b5b571, 0xaa6666cc,
+- 0xd8484890, 0x05030306, 0x01f6f6f7, 0x120e0e1c,
+- 0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969,
+- 0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27,
+- 0x38e1e1d9, 0x13f8f8eb, 0xb398982b, 0x33111122,
+- 0xbb6969d2, 0x70d9d9a9, 0x898e8e07, 0xa7949433,
+- 0xb69b9b2d, 0x221e1e3c, 0x92878715, 0x20e9e9c9,
+- 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5,
+- 0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a,
+- 0xdabfbf65, 0x31e6e6d7, 0xc6424284, 0xb86868d0,
+- 0xc3414182, 0xb0999929, 0x772d2d5a, 0x110f0f1e,
+- 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d, 0x3a16162c
++ 0,
++ { 0, },
++ {
++ 0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6,
++ 0x0df2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591,
++ 0x50303060, 0x03010102, 0xa96767ce, 0x7d2b2b56,
++ 0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec,
++ 0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa,
++ 0x15fafaef, 0xeb5959b2, 0xc947478e, 0x0bf0f0fb,
++ 0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45,
++ 0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b,
++ 0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c,
++ 0x5a36366c, 0x413f3f7e, 0x02f7f7f5, 0x4fcccc83,
++ 0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x08f1f1f9,
++ 0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a,
++ 0x0c040408, 0x52c7c795, 0x65232346, 0x5ec3c39d,
++ 0x28181830, 0xa1969637, 0x0f05050a, 0xb59a9a2f,
++ 0x0907070e, 0x36121224, 0x9b80801b, 0x3de2e2df,
++ 0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea,
++ 0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34,
++ 0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b,
++ 0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d,
++ 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413,
++ 0xf55353a6, 0x68d1d1b9, 0x00000000, 0x2cededc1,
++ 0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6,
++ 0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972,
++ 0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85,
++ 0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed,
++ 0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511,
++ 0xcf45458a, 0x10f9f9e9, 0x06020204, 0x817f7ffe,
++ 0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b,
++ 0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05,
++ 0xad92923f, 0xbc9d9d21, 0x48383870, 0x04f5f5f1,
++ 0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142,
++ 0x30101020, 0x1affffe5, 0x0ef3f3fd, 0x6dd2d2bf,
++ 0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3,
++ 0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e,
++ 0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a,
++ 0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6,
++ 0xa06060c0, 0x98818119, 0xd14f4f9e, 0x7fdcdca3,
++ 0x66222244, 0x7e2a2a54, 0xab90903b, 0x8388880b,
++ 0xca46468c, 0x29eeeec7, 0xd3b8b86b, 0x3c141428,
++ 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad,
++ 0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14,
++ 0xdb494992, 0x0a06060c, 0x6c242448, 0xe45c5cb8,
++ 0x5dc2c29f, 0x6ed3d3bd, 0xefacac43, 0xa66262c4,
++ 0xa8919139, 0xa4959531, 0x37e4e4d3, 0x8b7979f2,
++ 0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda,
++ 0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949,
++ 0xb46c6cd8, 0xfa5656ac, 0x07f4f4f3, 0x25eaeacf,
++ 0xaf6565ca, 0x8e7a7af4, 0xe9aeae47, 0x18080810,
++ 0xd5baba6f, 0x887878f0, 0x6f25254a, 0x722e2e5c,
++ 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697,
++ 0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e,
++ 0xdd4b4b96, 0xdcbdbd61, 0x868b8b0d, 0x858a8a0f,
++ 0x907070e0, 0x423e3e7c, 0xc4b5b571, 0xaa6666cc,
++ 0xd8484890, 0x05030306, 0x01f6f6f7, 0x120e0e1c,
++ 0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969,
++ 0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27,
++ 0x38e1e1d9, 0x13f8f8eb, 0xb398982b, 0x33111122,
++ 0xbb6969d2, 0x70d9d9a9, 0x898e8e07, 0xa7949433,
++ 0xb69b9b2d, 0x221e1e3c, 0x92878715, 0x20e9e9c9,
++ 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5,
++ 0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a,
++ 0xdabfbf65, 0x31e6e6d7, 0xc6424284, 0xb86868d0,
++ 0xc3414182, 0xb0999929, 0x772d2d5a, 0x110f0f1e,
++ 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d, 0x3a16162c
++ },
++ 0
+ };
+
+-static const struct
++#define encT enc_tables.T
++
++static struct
+ {
++ volatile u32 counter_head;
++ u32 cacheline_align[64 / 4 - 1];
+ u32 T[256];
+ byte inv_sbox[256];
+-} dec_tables =
++ volatile u32 counter_tail;
++} dec_tables ATTR_ALIGNED_64 =
+ {
++ 0,
++ { 0, },
+ {
+ 0x50a7f451, 0x5365417e, 0xc3a4171a, 0x965e273a,
+ 0xcb6bab3b, 0xf1459d1f, 0xab58faac, 0x9303e34b,
+@@ -194,7 +212,8 @@ static const struct
+ 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61,
+ 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26,
+ 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+- }
++ },
++ 0
+ };
+
+ #define decT dec_tables.T
+diff --git a/cipher/rijndael.c b/cipher/rijndael.c
+index 8637195..d0edab2 100644
+--- a/cipher/rijndael.c
++++ b/cipher/rijndael.c
+@@ -227,11 +227,11 @@ static const char *selftest(void);
+
+
+ /* Prefetching for encryption/decryption tables. */
+-static void prefetch_table(const volatile byte *tab, size_t len)
++static inline void prefetch_table(const volatile byte *tab, size_t len)
+ {
+ size_t i;
+
+- for (i = 0; i < len; i += 8 * 32)
++ for (i = 0; len - i >= 8 * 32; i += 8 * 32)
+ {
+ (void)tab[i + 0 * 32];
+ (void)tab[i + 1 * 32];
+@@ -242,17 +242,37 @@ static void prefetch_table(const volatile byte *tab, size_t len)
+ (void)tab[i + 6 * 32];
+ (void)tab[i + 7 * 32];
+ }
++ for (; i < len; i += 32)
++ {
++ (void)tab[i];
++ }
+
+ (void)tab[len - 1];
+ }
+
+ static void prefetch_enc(void)
+ {
+- prefetch_table((const void *)encT, sizeof(encT));
++ /* Modify counters to trigger copy-on-write and unsharing if physical pages
++ * of look-up table are shared between processes. Modifying counters also
++ * causes checksums for pages to change and hint same-page merging algorithm
++ * that these pages are frequently changing. */
++ enc_tables.counter_head++;
++ enc_tables.counter_tail++;
++
++ /* Prefetch look-up tables to cache. */
++ prefetch_table((const void *)&enc_tables, sizeof(enc_tables));
+ }
+
+ static void prefetch_dec(void)
+ {
++ /* Modify counters to trigger copy-on-write and unsharing if physical pages
++ * of look-up table are shared between processes. Modifying counters also
++ * causes checksums for pages to change and hint same-page merging algorithm
++ * that these pages are frequently changing. */
++ dec_tables.counter_head++;
++ dec_tables.counter_tail++;
++
++ /* Prefetch look-up tables to cache. */
+ prefetch_table((const void *)&dec_tables, sizeof(dec_tables));
+ }
+
+@@ -737,7 +757,7 @@ do_encrypt (const RIJNDAEL_context *ctx,
+ #ifdef USE_AMD64_ASM
+ # ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS
+ return _gcry_aes_amd64_encrypt_block(ctx->keyschenc, bx, ax, ctx->rounds,
+- encT);
++ enc_tables.T);
+ # else
+ /* Call SystemV ABI function without storing non-volatile XMM registers,
+ * as target function does not use vector instruction sets. */
+@@ -757,7 +777,8 @@ do_encrypt (const RIJNDAEL_context *ctx,
+ return ret;
+ # endif /* HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS */
+ #elif defined(USE_ARM_ASM)
+- return _gcry_aes_arm_encrypt_block(ctx->keyschenc, bx, ax, ctx->rounds, encT);
++ return _gcry_aes_arm_encrypt_block(ctx->keyschenc, bx, ax, ctx->rounds,
++ enc_tables.T);
+ #else
+ return do_encrypt_fn (ctx, bx, ax);
+ #endif /* !USE_ARM_ASM && !USE_AMD64_ASM*/
+@@ -1120,7 +1141,7 @@ do_decrypt (const RIJNDAEL_context *ctx, unsigned char *bx,
+ #ifdef USE_AMD64_ASM
+ # ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS
+ return _gcry_aes_amd64_decrypt_block(ctx->keyschdec, bx, ax, ctx->rounds,
+- &dec_tables);
++ dec_tables.T);
+ # else
+ /* Call SystemV ABI function without storing non-volatile XMM registers,
+ * as target function does not use vector instruction sets. */
+@@ -1141,7 +1162,7 @@ do_decrypt (const RIJNDAEL_context *ctx, unsigned char *bx,
+ # endif /* HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS */
+ #elif defined(USE_ARM_ASM)
+ return _gcry_aes_arm_decrypt_block(ctx->keyschdec, bx, ax, ctx->rounds,
+- &dec_tables);
++ dec_tables.T);
+ #else
+ return do_decrypt_fn (ctx, bx, ax);
+ #endif /*!USE_ARM_ASM && !USE_AMD64_ASM*/
+--
+2.7.4
+
diff --git a/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
new file mode 100644
index 0000000000..d7554f38af
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
@@ -0,0 +1,41 @@
+From 97570ef271ea1fb7b5ca903eec88f68407b0ec76 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 16 Aug 2017 10:44:41 +0800
+Subject: [PATCH 2/4] libgcrypt: fix building error with '-O2' in sysroot path
+
+Upstream-Status: Pending
+
+Characters like '-O2' or '-Ofast' will be replaced by '-O1' when
+compiling cipher.
+If we are cross compiling libgcrypt and sysroot contains such
+characters, we would
+get compile errors because the sysroot path has been modified.
+
+Fix this by adding blank spaces before and after the original matching
+pattern in the
+sed command.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+Rebase to 1.8.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ cipher/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cipher/Makefile.am b/cipher/Makefile.am
+index 95c4510..bd52ec7 100644
+--- a/cipher/Makefile.am
++++ b/cipher/Makefile.am
+@@ -116,7 +116,7 @@ gost-s-box: gost-s-box.c
+
+
+ if ENABLE_O_FLAG_MUNGING
+-o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g'
++o_flag_munging = sed -e 's/ -O\([2-9s][2-9s]*\) / -O1 /' -e 's/ -Ofast / -O1 /g'
+ else
+ o_flag_munging = cat
+ endif
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch b/meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch
new file mode 100644
index 0000000000..b580b7b13c
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch
@@ -0,0 +1,178 @@
+From a4c561aab1014c3630bc88faf6f5246fee16b020 Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Date: Fri, 31 May 2019 17:27:25 +0300
+Subject: [PATCH 3/3] GCM: move look-up table to .data section and unshare
+ between processes
+
+* cipher/cipher-gcm.c (ATTR_ALIGNED_64): New.
+(gcmR): Move to 'gcm_table' structure.
+(gcm_table): New structure for look-up table with counters before and
+after.
+(gcmR): New macro.
+(prefetch_table): Handle input with length not multiple of 256.
+(do_prefetch_tables): Modify pre- and post-table counters to unshare
+look-up table pages between processes.
+--
+
+GnuPG-bug-id: 4541
+Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+
+Upstream-Status: Backport
+[https://github.com/gpg/libgcrypt/commit/a4c561aab1014c3630bc88faf6f5246fee16b020]
+
+CVE: CVE-2019-12904
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ cipher/cipher-gcm.c | 106 ++++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 70 insertions(+), 36 deletions(-)
+
+diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c
+index 11f119a..194e2ec 100644
+--- a/cipher/cipher-gcm.c
++++ b/cipher/cipher-gcm.c
+@@ -30,6 +30,14 @@
+ #include "./cipher-internal.h"
+
+
++/* Helper macro to force alignment to 16 or 64 bytes. */
++#ifdef HAVE_GCC_ATTRIBUTE_ALIGNED
++# define ATTR_ALIGNED_64 __attribute__ ((aligned (64)))
++#else
++# define ATTR_ALIGNED_64
++#endif
++
++
+ #ifdef GCM_USE_INTEL_PCLMUL
+ extern void _gcry_ghash_setup_intel_pclmul (gcry_cipher_hd_t c);
+
+@@ -83,40 +91,54 @@ ghash_armv7_neon (gcry_cipher_hd_t c, byte *result, const byte *buf,
+
+
+ #ifdef GCM_USE_TABLES
+-static const u16 gcmR[256] = {
+- 0x0000, 0x01c2, 0x0384, 0x0246, 0x0708, 0x06ca, 0x048c, 0x054e,
+- 0x0e10, 0x0fd2, 0x0d94, 0x0c56, 0x0918, 0x08da, 0x0a9c, 0x0b5e,
+- 0x1c20, 0x1de2, 0x1fa4, 0x1e66, 0x1b28, 0x1aea, 0x18ac, 0x196e,
+- 0x1230, 0x13f2, 0x11b4, 0x1076, 0x1538, 0x14fa, 0x16bc, 0x177e,
+- 0x3840, 0x3982, 0x3bc4, 0x3a06, 0x3f48, 0x3e8a, 0x3ccc, 0x3d0e,
+- 0x3650, 0x3792, 0x35d4, 0x3416, 0x3158, 0x309a, 0x32dc, 0x331e,
+- 0x2460, 0x25a2, 0x27e4, 0x2626, 0x2368, 0x22aa, 0x20ec, 0x212e,
+- 0x2a70, 0x2bb2, 0x29f4, 0x2836, 0x2d78, 0x2cba, 0x2efc, 0x2f3e,
+- 0x7080, 0x7142, 0x7304, 0x72c6, 0x7788, 0x764a, 0x740c, 0x75ce,
+- 0x7e90, 0x7f52, 0x7d14, 0x7cd6, 0x7998, 0x785a, 0x7a1c, 0x7bde,
+- 0x6ca0, 0x6d62, 0x6f24, 0x6ee6, 0x6ba8, 0x6a6a, 0x682c, 0x69ee,
+- 0x62b0, 0x6372, 0x6134, 0x60f6, 0x65b8, 0x647a, 0x663c, 0x67fe,
+- 0x48c0, 0x4902, 0x4b44, 0x4a86, 0x4fc8, 0x4e0a, 0x4c4c, 0x4d8e,
+- 0x46d0, 0x4712, 0x4554, 0x4496, 0x41d8, 0x401a, 0x425c, 0x439e,
+- 0x54e0, 0x5522, 0x5764, 0x56a6, 0x53e8, 0x522a, 0x506c, 0x51ae,
+- 0x5af0, 0x5b32, 0x5974, 0x58b6, 0x5df8, 0x5c3a, 0x5e7c, 0x5fbe,
+- 0xe100, 0xe0c2, 0xe284, 0xe346, 0xe608, 0xe7ca, 0xe58c, 0xe44e,
+- 0xef10, 0xeed2, 0xec94, 0xed56, 0xe818, 0xe9da, 0xeb9c, 0xea5e,
+- 0xfd20, 0xfce2, 0xfea4, 0xff66, 0xfa28, 0xfbea, 0xf9ac, 0xf86e,
+- 0xf330, 0xf2f2, 0xf0b4, 0xf176, 0xf438, 0xf5fa, 0xf7bc, 0xf67e,
+- 0xd940, 0xd882, 0xdac4, 0xdb06, 0xde48, 0xdf8a, 0xddcc, 0xdc0e,
+- 0xd750, 0xd692, 0xd4d4, 0xd516, 0xd058, 0xd19a, 0xd3dc, 0xd21e,
+- 0xc560, 0xc4a2, 0xc6e4, 0xc726, 0xc268, 0xc3aa, 0xc1ec, 0xc02e,
+- 0xcb70, 0xcab2, 0xc8f4, 0xc936, 0xcc78, 0xcdba, 0xcffc, 0xce3e,
+- 0x9180, 0x9042, 0x9204, 0x93c6, 0x9688, 0x974a, 0x950c, 0x94ce,
+- 0x9f90, 0x9e52, 0x9c14, 0x9dd6, 0x9898, 0x995a, 0x9b1c, 0x9ade,
+- 0x8da0, 0x8c62, 0x8e24, 0x8fe6, 0x8aa8, 0x8b6a, 0x892c, 0x88ee,
+- 0x83b0, 0x8272, 0x8034, 0x81f6, 0x84b8, 0x857a, 0x873c, 0x86fe,
+- 0xa9c0, 0xa802, 0xaa44, 0xab86, 0xaec8, 0xaf0a, 0xad4c, 0xac8e,
+- 0xa7d0, 0xa612, 0xa454, 0xa596, 0xa0d8, 0xa11a, 0xa35c, 0xa29e,
+- 0xb5e0, 0xb422, 0xb664, 0xb7a6, 0xb2e8, 0xb32a, 0xb16c, 0xb0ae,
+- 0xbbf0, 0xba32, 0xb874, 0xb9b6, 0xbcf8, 0xbd3a, 0xbf7c, 0xbebe,
+-};
++static struct
++{
++ volatile u32 counter_head;
++ u32 cacheline_align[64 / 4 - 1];
++ u16 R[256];
++ volatile u32 counter_tail;
++} gcm_table ATTR_ALIGNED_64 =
++ {
++ 0,
++ { 0, },
++ {
++ 0x0000, 0x01c2, 0x0384, 0x0246, 0x0708, 0x06ca, 0x048c, 0x054e,
++ 0x0e10, 0x0fd2, 0x0d94, 0x0c56, 0x0918, 0x08da, 0x0a9c, 0x0b5e,
++ 0x1c20, 0x1de2, 0x1fa4, 0x1e66, 0x1b28, 0x1aea, 0x18ac, 0x196e,
++ 0x1230, 0x13f2, 0x11b4, 0x1076, 0x1538, 0x14fa, 0x16bc, 0x177e,
++ 0x3840, 0x3982, 0x3bc4, 0x3a06, 0x3f48, 0x3e8a, 0x3ccc, 0x3d0e,
++ 0x3650, 0x3792, 0x35d4, 0x3416, 0x3158, 0x309a, 0x32dc, 0x331e,
++ 0x2460, 0x25a2, 0x27e4, 0x2626, 0x2368, 0x22aa, 0x20ec, 0x212e,
++ 0x2a70, 0x2bb2, 0x29f4, 0x2836, 0x2d78, 0x2cba, 0x2efc, 0x2f3e,
++ 0x7080, 0x7142, 0x7304, 0x72c6, 0x7788, 0x764a, 0x740c, 0x75ce,
++ 0x7e90, 0x7f52, 0x7d14, 0x7cd6, 0x7998, 0x785a, 0x7a1c, 0x7bde,
++ 0x6ca0, 0x6d62, 0x6f24, 0x6ee6, 0x6ba8, 0x6a6a, 0x682c, 0x69ee,
++ 0x62b0, 0x6372, 0x6134, 0x60f6, 0x65b8, 0x647a, 0x663c, 0x67fe,
++ 0x48c0, 0x4902, 0x4b44, 0x4a86, 0x4fc8, 0x4e0a, 0x4c4c, 0x4d8e,
++ 0x46d0, 0x4712, 0x4554, 0x4496, 0x41d8, 0x401a, 0x425c, 0x439e,
++ 0x54e0, 0x5522, 0x5764, 0x56a6, 0x53e8, 0x522a, 0x506c, 0x51ae,
++ 0x5af0, 0x5b32, 0x5974, 0x58b6, 0x5df8, 0x5c3a, 0x5e7c, 0x5fbe,
++ 0xe100, 0xe0c2, 0xe284, 0xe346, 0xe608, 0xe7ca, 0xe58c, 0xe44e,
++ 0xef10, 0xeed2, 0xec94, 0xed56, 0xe818, 0xe9da, 0xeb9c, 0xea5e,
++ 0xfd20, 0xfce2, 0xfea4, 0xff66, 0xfa28, 0xfbea, 0xf9ac, 0xf86e,
++ 0xf330, 0xf2f2, 0xf0b4, 0xf176, 0xf438, 0xf5fa, 0xf7bc, 0xf67e,
++ 0xd940, 0xd882, 0xdac4, 0xdb06, 0xde48, 0xdf8a, 0xddcc, 0xdc0e,
++ 0xd750, 0xd692, 0xd4d4, 0xd516, 0xd058, 0xd19a, 0xd3dc, 0xd21e,
++ 0xc560, 0xc4a2, 0xc6e4, 0xc726, 0xc268, 0xc3aa, 0xc1ec, 0xc02e,
++ 0xcb70, 0xcab2, 0xc8f4, 0xc936, 0xcc78, 0xcdba, 0xcffc, 0xce3e,
++ 0x9180, 0x9042, 0x9204, 0x93c6, 0x9688, 0x974a, 0x950c, 0x94ce,
++ 0x9f90, 0x9e52, 0x9c14, 0x9dd6, 0x9898, 0x995a, 0x9b1c, 0x9ade,
++ 0x8da0, 0x8c62, 0x8e24, 0x8fe6, 0x8aa8, 0x8b6a, 0x892c, 0x88ee,
++ 0x83b0, 0x8272, 0x8034, 0x81f6, 0x84b8, 0x857a, 0x873c, 0x86fe,
++ 0xa9c0, 0xa802, 0xaa44, 0xab86, 0xaec8, 0xaf0a, 0xad4c, 0xac8e,
++ 0xa7d0, 0xa612, 0xa454, 0xa596, 0xa0d8, 0xa11a, 0xa35c, 0xa29e,
++ 0xb5e0, 0xb422, 0xb664, 0xb7a6, 0xb2e8, 0xb32a, 0xb16c, 0xb0ae,
++ 0xbbf0, 0xba32, 0xb874, 0xb9b6, 0xbcf8, 0xbd3a, 0xbf7c, 0xbebe,
++ },
++ 0
++ };
++
++#define gcmR gcm_table.R
+
+ static inline
+ void prefetch_table(const void *tab, size_t len)
+@@ -124,7 +146,7 @@ void prefetch_table(const void *tab, size_t len)
+ const volatile byte *vtab = tab;
+ size_t i;
+
+- for (i = 0; i < len; i += 8 * 32)
++ for (i = 0; len - i >= 8 * 32; i += 8 * 32)
+ {
+ (void)vtab[i + 0 * 32];
+ (void)vtab[i + 1 * 32];
+@@ -135,6 +157,10 @@ void prefetch_table(const void *tab, size_t len)
+ (void)vtab[i + 6 * 32];
+ (void)vtab[i + 7 * 32];
+ }
++ for (; i < len; i += 32)
++ {
++ (void)vtab[i];
++ }
+
+ (void)vtab[len - 1];
+ }
+@@ -142,8 +168,16 @@ void prefetch_table(const void *tab, size_t len)
+ static inline void
+ do_prefetch_tables (const void *gcmM, size_t gcmM_size)
+ {
++ /* Modify counters to trigger copy-on-write and unsharing if physical pages
++ * of look-up table are shared between processes. Modifying counters also
++ * causes checksums for pages to change and hint same-page merging algorithm
++ * that these pages are frequently changing. */
++ gcm_table.counter_head++;
++ gcm_table.counter_tail++;
++
++ /* Prefetch look-up tables to cache. */
+ prefetch_table(gcmM, gcmM_size);
+- prefetch_table(gcmR, sizeof(gcmR));
++ prefetch_table(&gcm_table, sizeof(gcm_table));
+ }
+
+ #ifdef GCM_TABLES_USE_U64
+--
+2.7.4
+
diff --git a/meta/recipes-support/libgcrypt/files/0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch b/meta/recipes-support/libgcrypt/files/0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch
new file mode 100644
index 0000000000..105df2957e
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch
@@ -0,0 +1,79 @@
+From 7cc702c7b5a1ccc2b0091f3effa1391b6c3030fd Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Aug 2017 10:46:28 +0800
+Subject: [PATCH 3/4] tests/bench-slope.c: workaround ICE failure on mips with
+ '-O -g'
+
+Hit a ICE and could reduce it to the following minimal example:
+
+1. Only the size of array assigned with 2 caused the issue:
+$ cat > mipgcc-test.c << END
+
+int main (int argc, char **argv)
+{
+ char *pStrArry[ARRAY_SIZE_MAX] = {"hello"};
+ int i = 0;
+
+ while(pStrArry[i] && i<ARRAY_SIZE_MAX)
+ {
+ printf("%s\n", pStrArry[i]);
+ i++;
+ }
+
+ return 0;
+}
+
+END
+
+2. Only -O1 and -g on mips caused the issue:
+$ mips-poky-linux-gcc -O1 -g -o mipgcc-test mipgcc-test.c
+mipgcc-test.c: In function 'main':
+mipgcc-test.c:18:1: internal compiler error: in dwarf2out_var_location,
+at dwarf2out.c:20810
+ }
+ ^
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <http://gcc.gnu.org/bugs.html> for instructions
+
+3. The quick workround is trying to enlarge the size of array with
+larger
+than 2.
+
+4. File a bug to GNU, but it could not be reproduced on there
+environment.
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643
+
+Upstream-Status: Inappropriate [oe specific]
+
+Rebase to 1.8.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/bench-slope.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/bench-slope.c b/tests/bench-slope.c
+index 75e6e43..4e70842 100644
+--- a/tests/bench-slope.c
++++ b/tests/bench-slope.c
+@@ -1463,7 +1463,7 @@ static struct bench_ops hash_ops = {
+ };
+
+
+-static struct bench_hash_mode hash_modes[] = {
++static struct bench_hash_mode hash_modes[3] = {
+ {"", &hash_ops},
+ {0},
+ };
+@@ -1629,7 +1629,7 @@ static struct bench_ops mac_ops = {
+ };
+
+
+-static struct bench_mac_mode mac_modes[] = {
++static struct bench_mac_mode mac_modes[3] = {
+ {"", &mac_ops},
+ {0},
+ };
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch b/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
new file mode 100644
index 0000000000..8622df3ea8
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
@@ -0,0 +1,28 @@
+From e20dbdb0b8f0af840ef90b299c4e2277c52ddf87 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sun, 12 Jun 2016 04:44:29 -0400
+Subject: [PATCH 4/4] tests/Makefile.am: fix undefined reference to
+ `pthread_create'
+
+Add missing '-lpthread' to CFLAGS
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 1744ea7..04cf425 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -64,4 +64,4 @@ EXTRA_DIST = README rsa-16k.key cavs_tests.sh cavs_driver.pl \
+
+ LDADD = $(standard_ldadd) $(GPG_ERROR_LIBS)
+ t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS)
+-t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS)
++t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS) -lpthread
+--
+1.8.3.1
+
diff --git a/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch b/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
deleted file mode 100644
index 69589f5482..0000000000
--- a/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-Add and use pkg-config for libgcrypt instead of -config scripts.
-
-Upstream-Status: Denied [upstream have indicated they don't want a pkg-config dependency]
-
-RP 2014/5/22
-
-Rebase to 1.7.0
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- configure.ac | 1 +
- src/libgcrypt.m4 | 71 +++--------------------------------------------------
- src/libgcrypt.pc.in | 33 +++++++++++++++++++++++++
- 3 files changed, 38 insertions(+), 67 deletions(-)
- create mode 100644 src/libgcrypt.pc.in
-
-diff --git a/configure.ac b/configure.ac
-index f683e21..566e1c8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2314,6 +2314,7 @@ random/Makefile
- doc/Makefile
- src/Makefile
- src/gcrypt.h
-+src/libgcrypt.pc
- src/libgcrypt-config
- src/versioninfo.rc
- tests/Makefile
-diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
-index c67cfec..4ea5f2c 100644
---- a/src/libgcrypt.m4
-+++ b/src/libgcrypt.m4
-@@ -29,30 +29,6 @@ dnl is added to the gpg_config_script_warn variable.
- dnl
- AC_DEFUN([AM_PATH_LIBGCRYPT],
- [ AC_REQUIRE([AC_CANONICAL_HOST])
-- AC_ARG_WITH(libgcrypt-prefix,
-- AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
-- [prefix where LIBGCRYPT is installed (optional)]),
-- libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
-- if test x"${LIBGCRYPT_CONFIG}" = x ; then
-- if test x"${libgcrypt_config_prefix}" != x ; then
-- LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
-- else
-- case "${SYSROOT}" in
-- /*)
-- if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
-- LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
-- fi
-- ;;
-- '')
-- ;;
-- *)
-- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
-- ;;
-- esac
-- fi
-- fi
--
-- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
- tmp=ifelse([$1], ,1:1.2.0,$1)
- if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
- req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -62,48 +38,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
- min_libgcrypt_version="$tmp"
- fi
-
-- AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
-- ok=no
-- if test "$LIBGCRYPT_CONFIG" != "no" ; then
-- req_major=`echo $min_libgcrypt_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
-- req_minor=`echo $min_libgcrypt_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-- req_micro=`echo $min_libgcrypt_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
-- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
-- major=`echo $libgcrypt_config_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
-- minor=`echo $libgcrypt_config_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
-- micro=`echo $libgcrypt_config_version | \
-- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
-- if test "$major" -gt "$req_major"; then
-- ok=yes
-- else
-- if test "$major" -eq "$req_major"; then
-- if test "$minor" -gt "$req_minor"; then
-- ok=yes
-- else
-- if test "$minor" -eq "$req_minor"; then
-- if test "$micro" -ge "$req_micro"; then
-- ok=yes
-- fi
-- fi
-- fi
-- fi
-- fi
-- fi
-- if test $ok = yes; then
-- AC_MSG_RESULT([yes ($libgcrypt_config_version)])
-- else
-- AC_MSG_RESULT(no)
-- fi
-+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= $min_libgcrypt_version], [ok=yes], [ok=no])
-+
- if test $ok = yes; then
- # If we have a recent libgcrypt, we should also check that the
- # API is compatible
- if test "$req_libgcrypt_api" -gt 0 ; then
-- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
-+ tmp=`$PKG_CONFIG --variable=api_version libgcrypt`
- if test "$tmp" -gt 0 ; then
- AC_MSG_CHECKING([LIBGCRYPT API version])
- if test "$req_libgcrypt_api" -eq "$tmp" ; then
-@@ -116,10 +57,8 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
- fi
- fi
- if test $ok = yes; then
-- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
-- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
- ifelse([$2], , :, [$2])
-- libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
-+ libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt`
- if test x"$libgcrypt_config_host" != xnone ; then
- if test x"$libgcrypt_config_host" != x"$host" ; then
- AC_MSG_WARN([[
-@@ -134,8 +73,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
- fi
- fi
- else
-- LIBGCRYPT_CFLAGS=""
-- LIBGCRYPT_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(LIBGCRYPT_CFLAGS)
-diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in
-new file mode 100644
-index 0000000..2fc8f53
---- /dev/null
-+++ b/src/libgcrypt.pc.in
-@@ -0,0 +1,33 @@
-+# Process this file with autoconf to produce a pkg-config metadata file.
-+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
-+# Author: Simon Josefsson
-+#
-+# This file is free software; as a special exception the author gives
-+# unlimited permission to copy and/or distribute it, with or without
-+# modifications, as long as this notice is preserved.
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-+
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+# API info
-+api_version=@LIBGCRYPT_CONFIG_API_VERSION@
-+host=@LIBGCRYPT_CONFIG_HOST@
-+
-+# Misc information.
-+symmetric_ciphers=@LIBGCRYPT_CIPHERS@
-+asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
-+digests=@LIBGCRYPT_DIGESTS@
-+
-+Name: libgcrypt
-+Description: GNU crypto library
-+URL: http://www.gnupg.org
-+Version: @VERSION@
-+Libs: -L${libdir} -lgcrypt
-+Libs.private: -L${libdir} -lgpg-error
-+Cflags: -I${includedir}
---
-2.8.1
-
diff --git a/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch b/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch
deleted file mode 100644
index 582e62f709..0000000000
--- a/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-tests/bench-slope.c: workaround ICE failure on mips with '-O -g'
-
-Hit a ICE and could reduce it to the following minimal example:
-
-1. Only the size of array assigned with 2 caused the issue:
-$ cat > mipgcc-test.c << END
-
-int main (int argc, char **argv)
-{
- char *pStrArry[ARRAY_SIZE_MAX] = {"hello"};
- int i = 0;
-
- while(pStrArry[i] && i<ARRAY_SIZE_MAX)
- {
- printf("%s\n", pStrArry[i]);
- i++;
- }
-
- return 0;
-}
-
-END
-
-2. Only -O1 and -g on mips caused the issue:
-$ mips-poky-linux-gcc -O1 -g -o mipgcc-test mipgcc-test.c
-mipgcc-test.c: In function 'main':
-mipgcc-test.c:18:1: internal compiler error: in dwarf2out_var_location, at dwarf2out.c:20810
- }
- ^
-Please submit a full bug report,
-with preprocessed source if appropriate.
-See <http://gcc.gnu.org/bugs.html> for instructions
-
-3. The quick workround is trying to enlarge the size of array with larger
-than 2.
-
-4. File a bug to GNU, but it could not be reproduced on there environment.
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- tests/bench-slope.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/bench-slope.c b/tests/bench-slope.c
-index bd05064..28c2438 100644
---- a/tests/bench-slope.c
-+++ b/tests/bench-slope.c
-@@ -1197,7 +1197,7 @@ static struct bench_ops hash_ops = {
- };
-
-
--static struct bench_hash_mode hash_modes[] = {
-+static struct bench_hash_mode hash_modes[3] = {
- {"", &hash_ops},
- {0},
- };
-@@ -1349,7 +1349,7 @@ static struct bench_ops mac_ops = {
- };
-
-
--static struct bench_mac_mode mac_modes[] = {
-+static struct bench_mac_mode mac_modes[3] = {
- {"", &mac_ops},
- {0},
- };
---
-1.8.1.2
-
diff --git a/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch b/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch
deleted file mode 100644
index e7de8badf8..0000000000
--- a/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From cc0e2b403d33892963513a3ba98e4ae5a05a4d3c Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Sun, 12 Jun 2016 04:44:29 -0400
-Subject: [PATCH] tests/Makefile.am: fix undefined reference to `pthread_create'
-
-Add missing '-lpthread' to CFLAGS
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- tests/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index d462f30..bef6dd7 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -62,4 +62,4 @@ EXTRA_DIST = README rsa-16k.key cavs_tests.sh cavs_driver.pl \
-
- LDADD = $(standard_ldadd) $(GPG_ERROR_LIBS)
- t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS)
--t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS)
-+t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS) -lpthread
---
-2.8.1
-
diff --git a/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
deleted file mode 100644
index a3e540369c..0000000000
--- a/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-
-libgcrypt: fix building error with '-O2' in sysroot path
-
-Characters like '-O2' or '-Ofast' will be replaced by '-O1' when compiling cipher.
-If we are cross compiling libgcrypt and sysroot contains such characters, we would
-get compile errors because the sysroot path has been modified.
-
-Fix this by adding blank spaces before and after the original matching pattern in the
-sed command.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- cipher/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cipher/Makefile.am b/cipher/Makefile.am
-index 76cdc96..9a89792 100644
---- a/cipher/Makefile.am
-+++ b/cipher/Makefile.am
-@@ -69,7 +69,7 @@ rfc2268.c \
- camellia.c camellia.h camellia-glue.c
-
- if ENABLE_O_FLAG_MUNGING
--o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g'
-+o_flag_munging = sed -e 's/ -O\([2-9s][2-9s]*\) / -O1 /' -e 's/ -Ofast / -O1 /g'
- else
- o_flag_munging = cat
- endif
---
-1.7.9.5
-
diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc b/meta/recipes-support/libgcrypt/libgcrypt.inc
deleted file mode 100644
index 15805cd436..0000000000
--- a/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
-HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-SECTION = "libs"
-
-# helper program gcryptrnd and getrandom are under GPL, rest LGPL
-LICENSE = "GPLv2+ & LGPLv2.1+ & GPLv3+"
-LICENSE_${PN} = "LGPLv2.1+"
-LICENSE_${PN}-dev = "GPLv2+ & LGPLv2.1+"
-LICENSE_dumpsexp-dev = "GPLv3+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
-
-DEPENDS = "libgpg-error libcap"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \
- file://add-pkgconfig-support.patch \
- file://libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
- file://fix-ICE-failure-on-mips-with-option-O-and-g.patch \
- file://fix-undefined-reference-to-pthread.patch \
-"
-
-BINCONFIG = "${bindir}/libgcrypt-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-EXTRA_OECONF = "--disable-asm --with-capabilities"
-
-do_configure_prepend () {
- # Else this could be used in preference to the one in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
-}
-
-# libgcrypt.pc is added locally and thus installed here
-do_install_append() {
- install -d ${D}/${libdir}/pkgconfig
- install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
-}
-
-PACKAGES =+ "dumpsexp-dev"
-
-FILES_${PN}-dev += "${bindir}/hmac256"
-FILES_dumpsexp-dev += "${bindir}/dumpsexp"
-
-ARM_INSTRUCTION_SET = "arm"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb
deleted file mode 100644
index ddd7c5392c..0000000000
--- a/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require libgcrypt.inc
-
-SRC_URI[md5sum] = "bb5b00cb70b1215833857fd690080fbb"
-SRC_URI[sha256sum] = "c98470cf6a781f2af4bdfda710ad39f0f54b5044e8c43b878d4005737d6c213f"
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb
new file mode 100644
index 0000000000..04785574f2
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb
@@ -0,0 +1,57 @@
+SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
+HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+SECTION = "libs"
+
+# helper program gcryptrnd and getrandom are under GPL, rest LGPL
+LICENSE = "GPLv2+ & LGPLv2.1+ & GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-dev = "GPLv2+ & LGPLv2.1+"
+LICENSE_dumpsexp-dev = "GPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \
+ file://LICENSES;md5=840e3bcb754e5046ffeda7619034cbd8"
+
+DEPENDS = "libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
+ file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \
+ file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \
+ file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
+ file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
+ file://0001-Prefetch-GCM-look-up-tables.patch \
+ file://0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch \
+ file://0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch \
+"
+SRC_URI[md5sum] = "348cc4601ca34307fc6cd6c945467743"
+SRC_URI[sha256sum] = "3b4a2a94cb637eff5bdebbcaf46f4d95c4f25206f459809339cdada0eb577ac3"
+
+BINCONFIG = "${bindir}/libgcrypt-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+EXTRA_OECONF = "--disable-asm"
+EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
+
+PACKAGECONFIG ??= "capabilities"
+PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap"
+
+do_configure_prepend () {
+ # Else this could be used in preference to the one in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+}
+
+# libgcrypt.pc is added locally and thus installed here
+do_install_append() {
+ install -d ${D}/${libdir}/pkgconfig
+ install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
+}
+
+PACKAGES =+ "dumpsexp-dev"
+
+FILES_${PN}-dev += "${bindir}/hmac256"
+FILES_dumpsexp-dev += "${bindir}/dumpsexp"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.36-gawk5-support.patch b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.36-gawk5-support.patch
new file mode 100644
index 0000000000..b936d1143b
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.36-gawk5-support.patch
@@ -0,0 +1,144 @@
+Upstream-Status: Backport [https://dev.gnupg.org/T4459]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Mon, 15 Apr 2019 15:10:44 +0900
+Subject: [PATCH] awk: Prepare for Gawk 5.0.
+
+* src/Makefile.am: Use pkg_namespace (instead of namespace).
+* src/mkerrnos.awk: Likewise.
+* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
+* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
+
+--
+
+In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
+which only allows escaping specific characters.
+
+GnuPG-bug-id: 4459
+Reported-by: Marius Schamschula
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+---
+ lang/cl/mkerrcodes.awk | 2 +-
+ src/Makefile.am | 2 +-
+ src/mkerrcodes.awk | 2 +-
+ src/mkerrcodes1.awk | 2 +-
+ src/mkerrcodes2.awk | 2 +-
+ src/mkerrnos.awk | 2 +-
+ src/mkstrtable.awk | 10 +++++-----
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+--- a/lang/cl/mkerrcodes.awk
++++ b/lang/cl/mkerrcodes.awk
+@@ -122,7 +122,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FO
+
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+ $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+- -v prefix=GPG_ERR_ -v namespace=errnos_ \
++ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+ $(srcdir)/errnos.in >$@
+
+
+--- a/src/mkerrcodes.awk
++++ b/src/mkerrcodes.awk
+@@ -85,7 +85,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- a/src/mkerrcodes1.awk
++++ b/src/mkerrcodes1.awk
+@@ -81,7 +81,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- a/src/mkerrcodes2.awk
++++ b/src/mkerrcodes2.awk
+@@ -91,7 +91,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- a/src/mkerrnos.awk
++++ b/src/mkerrnos.awk
+@@ -83,7 +83,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- a/src/mkstrtable.awk
++++ b/src/mkstrtable.awk
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+
+ BEGIN {
+@@ -102,7 +102,7 @@ header {
+ print "/* The purpose of this complex string table is to produce";
+ print " optimal code with a minimum of relocations. */";
+ print "";
+- print "static const char " namespace "msgstr[] = ";
++ print "static const char " pkg_namespace "msgstr[] = ";
+ header = 0;
+ }
+ else
+@@ -110,7 +110,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+@@ -150,7 +150,7 @@ END {
+ else
+ print " gettext_noop (\"" last_msgstr "\");";
+ print "";
+- print "static const int " namespace "msgidx[] =";
++ print "static const int " pkg_namespace "msgidx[] =";
+ print " {";
+ for (i = 0; i < coded_msgs; i++)
+ print " " pos[i] ",";
+@@ -158,7 +158,7 @@ END {
+ print " };";
+ print "";
+ print "static GPG_ERR_INLINE int";
+- print namespace "msgidxof (int code)";
++ print pkg_namespace "msgidxof (int code)";
+ print "{";
+ print " return (0 ? 0";
+
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
index 9ffeedbe5a..ca5f6b5c25 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
+++ b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
@@ -1,49 +1,28 @@
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
+From ec309e20b5a27d42a5fb915c328d61e924ab5f19 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 29 Mar 2018 15:12:17 +0800
+Subject: [PATCH] support pkgconfig
Upstream-Status: Pending
-Index: libgpg-error-1.17/configure.ac
-===================================================================
---- libgpg-error-1.17.orig/configure.ac
-+++ libgpg-error-1.17/configure.ac
-@@ -529,6 +529,7 @@ AC_CONFIG_FILES([src/Makefile tests/Make
- AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd])
- AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest])
- AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
-+AC_CONFIG_FILES([src/gpg-error.pc])
-
- AC_OUTPUT
-
-Index: libgpg-error-1.17/src/Makefile.am
-===================================================================
---- libgpg-error-1.17.orig/src/Makefile.am
-+++ libgpg-error-1.17/src/Makefile.am
-@@ -75,6 +75,8 @@ nodist_include_HEADERS = gpg-error.h
- bin_SCRIPTS = gpg-error-config
- m4datadir = $(datadir)/aclocal
- m4data_DATA = gpg-error.m4
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = gpg-error.pc
-
- EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
- mkerrnos.awk errnos.in README \
-@@ -82,7 +84,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.
- mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
- err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \
- gpg-error.vers gpg-error.def.in \
-- versioninfo.rc.in gpg-error.w32-manifest.in \
-+ versioninfo.rc.in gpg-error.w32-manifest.in gpg-error.pc \
- $(lock_obj_pub)
-
- BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
-Index: libgpg-error-1.17/src/gpg-error.m4
+Rebase to 1.28
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Refactored for 1.33
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ configure.ac | 1 +
+ src/gpg-error.m4 | 71 +++--------------------------------------------------
+ 4 files changed, 18 insertions(+), 69 deletions(-)
+ create mode 100644 src/gpg-error.pc.in
+
+Index: libgpg-error-1.33/src/gpg-error.m4
===================================================================
---- libgpg-error-1.17.orig/src/gpg-error.m4
-+++ libgpg-error-1.17/src/gpg-error.m4
-@@ -26,73 +26,13 @@ dnl is added to the gpg_config_script_wa
+--- libgpg-error-1.33.orig/src/gpg-error.m4
++++ libgpg-error-1.33/src/gpg-error.m4
+@@ -26,139 +26,13 @@ dnl is added to the gpg_config_script_wa
dnl
AC_DEFUN([AM_PATH_GPG_ERROR],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -55,14 +34,15 @@ Index: libgpg-error-1.17/src/gpg-error.m4
- AC_HELP_STRING([--with-libgpg-error-prefix=PFX],
- [prefix where GPG Error is installed (optional)]),
- [gpg_error_config_prefix="$withval"])
--
++ min_gpg_error_version=ifelse([$1], ,0.0,$1)
++ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no])
+
- dnl Accept --with-gpg-error-prefix and make it work the same as
- dnl --with-libgpg-error-prefix above, for backwards compatibility,
- dnl but do not document this old, inconsistently-named option.
- AC_ARG_WITH(gpg-error-prefix,,
- [gpg_error_config_prefix="$withval"])
-+ min_gpg_error_version=ifelse([$1], ,0.0,$1)
-
+-
- if test x"${GPG_ERROR_CONFIG}" = x ; then
- if test x"${gpg_error_config_prefix}" != x ; then
- GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
@@ -81,19 +61,57 @@ Index: libgpg-error-1.17/src/gpg-error.m4
- esac
- fi
- fi
-+ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no])
-
+-
- AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
-- min_gpg_error_version=ifelse([$1], ,0.0,$1)
-- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
+- min_gpg_error_version=ifelse([$1], ,1.33,$1)
- ok=no
-- if test "$GPG_ERROR_CONFIG" != "no" \
-- && test -f "$GPG_ERROR_CONFIG" ; then
+-
+- if test "$prefix" = NONE ; then
+- prefix_option_expanded=/usr/local
+- else
+- prefix_option_expanded="$prefix"
+- fi
+- if test "$exec_prefix" = NONE ; then
+- exec_prefix_option_expanded=$prefix_option_expanded
+- else
+- exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix)
+- fi
+- libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir)
+-
+- if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then
+- gpgrt_libdir=$libdir_option_expanded
+- else
+- if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then
+- if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then
+- if test -f $possible_libdir/pkgconfig/gpg-error.pc; then
+- gpgrt_libdir=$possible_libdir
+- fi
+- fi
+- fi
+- fi
+-
+- if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then
+- AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
+- if test "$GPGRT_CONFIG" = "no"; then
+- unset GPGRT_CONFIG
+- else
+- GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
+- if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
+- GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
+- AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
+- gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
+- else
+- unset GPGRT_CONFIG
+- fi
+- fi
+- else
+- gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
+- fi
+- if test "$GPG_ERROR_CONFIG" != "no"; then
- req_major=`echo $min_gpg_error_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
- req_minor=`echo $min_gpg_error_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-- gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version`
- major=`echo $gpg_error_config_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
- minor=`echo $gpg_error_config_version | \
@@ -107,20 +125,47 @@ Index: libgpg-error-1.17/src/gpg-error.m4
- fi
- fi
- fi
+- if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then
+- if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then
+- AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
+- if test "$GPGRT_CONFIG" = "no"; then
+- unset GPGRT_CONFIG
+- else
+- GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
+- if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
+- GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
+- AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
+- else
+- unset GPGRT_CONFIG
+- fi
+- fi
+- fi
+- fi
- fi
+- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
if test $ok = yes; then
-- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
-- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
-- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
-- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
+- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags`
+- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs`
+- if test -z "$GPGRT_CONFIG"; then
+- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null`
+- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null`
+- else
+- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null`
+- GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS"
+- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null`
+- GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS"
+- fi
- AC_MSG_RESULT([yes ($gpg_error_config_version)])
ifelse([$2], , :, [$2])
-- gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none`
-+ gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error`
+ if test -z "$GPGRT_CONFIG"; then
+- gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none`
+- else
+- gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
++ gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error`
+ fi
if test x"$gpg_error_config_host" != xnone ; then
if test x"$gpg_error_config_host" != x"$host" ; then
- AC_MSG_WARN([[
-@@ -107,11 +47,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
+@@ -174,15 +48,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
fi
fi
else
@@ -131,20 +176,8 @@ Index: libgpg-error-1.17/src/gpg-error.m4
- AC_MSG_RESULT(no)
ifelse([$3], , :, [$3])
fi
- AC_SUBST(GPG_ERROR_CFLAGS)
-Index: libgpg-error-1.17/src/gpg-error.pc.in
-===================================================================
---- /dev/null
-+++ libgpg-error-1.17/src/gpg-error.pc.in
-@@ -0,0 +1,11 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+host=@GPG_ERROR_CONFIG_HOST@
-+
-+Name: gpg-error
-+Description: a library that defines common error values for all GnuPG components
-+Version: @VERSION@
-+Libs: -L${libdir} -lgpg-error
-+Cflags: -I${includedir}
+- AC_SUBST(GPG_ERROR_CFLAGS)
+- AC_SUBST(GPG_ERROR_LIBS)
+- AC_SUBST(GPG_ERROR_MT_CFLAGS)
+- AC_SUBST(GPG_ERROR_MT_LIBS)
+ ])
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb
deleted file mode 100644
index e45a7b860a..0000000000
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Small library that defines common error values for all GnuPG components"
-HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/gpg-error.h.in;endline=23;md5=cf562f60b9dba7df20d6ee3f97ea1d5a \
- file://src/init.c;endline=20;md5=872b2389fe9bae7ffb80d2b91225afbc"
-
-
-SECTION = "libs"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
- file://pkgconfig.patch \
- "
-SRC_URI[md5sum] = "feb42198c0aaf3b28eabe8f41a34b983"
-SRC_URI[sha256sum] = "9268e1cc487de5e6e4460fca612a06e4f383072ac43ae90603e5e46783d3e540"
-
-BINCONFIG = "${bindir}/gpg-error-config"
-
-inherit autotools binconfig-disabled pkgconfig gettext
-CPPFLAGS += "-P"
-do_compile_prepend() {
- TARGET_FILE=linux-gnu
- if [ ${TARGET_OS} != "linux" ]; then
- TARGET_FILE=${TARGET_OS}
- fi
-
- case ${TARGET_ARCH} in
- aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
- arm) TUPLE=arm-unknown-linux-gnueabi ;;
- armeb) TUPLE=arm-unknown-linux-gnueabi ;;
- i586|i686) TUPLE=i686-pc-linux-gnu ;;
- mips64el) TUPLE=mipsel-unknown-linux-gnu ;;
- mips64) TUPLE=mips-unknown-linux-gnu ;;
- x86_64) TUPLE=x86_64-pc-linux-gnu ;;
- *) TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;;
- esac
-
- cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
- ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
-}
-
-do_install_append() {
- # we don't have common lisp in OE
- rm -rf "${D}${datadir}/common-lisp/"
-}
-
-FILES_${PN}-dev += "${bindir}/gpg-error"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.36.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.36.bb
new file mode 100644
index 0000000000..b11ab0548d
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.36.bb
@@ -0,0 +1,72 @@
+SUMMARY = "Small library that defines common error values for all GnuPG components"
+HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/gpg-error.h.in;beginline=2;endline=18;md5=cd91e3ad1265a0c268efad541a39345e \
+ file://src/init.c;beginline=2;endline=17;md5=f01cdfcf747af5380590cfd9bbfeaaf7"
+
+
+SECTION = "libs"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
+ file://libgpg-error-1.36-gawk5-support.patch \
+ "
+
+SRC_URI[md5sum] = "eff437f397e858a9127b76c0d87fa5ed"
+SRC_URI[sha256sum] = "babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c"
+
+BINCONFIG = "${bindir}/gpg-error-config"
+
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
+
+CPPFLAGS += "-P"
+do_compile_prepend() {
+ TARGET_FILE=linux-gnu
+ if [ ${TARGET_OS} = "mingw32" ]; then
+ # There are no arch specific syscfg files for mingw32
+ TARGET_FILE=
+ elif [ ${TARGET_ARCH} = "arc" ]; then
+ # ARC syscfg file is automatically aliased to i686-pc-linux-gnu
+ TARGET_FILE=
+ elif [ ${TARGET_OS} != "linux" ]; then
+ TARGET_FILE=${TARGET_OS}
+ fi
+
+ case ${TARGET_ARCH} in
+ aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
+ arm) TUPLE=arm-unknown-linux-gnueabi ;;
+ armeb) TUPLE=arm-unknown-linux-gnueabi ;;
+ i586|i686) TUPLE=i686-unknown-linux-gnu;;
+ mips64*) TUPLE=mips64el-unknown-linux-gnuabi64 ;;
+ mips*el) TUPLE=mipsel-unknown-linux-gnu ;;
+ mips*) TUPLE=mips-unknown-linux-gnu ;;
+ x86_64) TUPLE=x86_64-unknown-linux-gnu ;;
+ ppc) TUPLE=powerpc-unknown-linux-gnu ;;
+ ppc64) TUPLE=powerpc64-unknown-linux-gnu ;;
+ ppc64le) TUPLE=powerpc64le-unknown-linux-gnu ;;
+ *) TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;;
+ esac
+
+ if [ -n "$TARGET_FILE" ]; then
+ cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
+ ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
+ fi
+}
+
+do_install_append() {
+ # we don't have common lisp in OE
+ rm -rf "${D}${datadir}/common-lisp/"
+ oe_multilib_header gpg-error.h gpgrt.h
+}
+
+FILES_${PN}-dev += "${bindir}/gpg-error"
+FILES_${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch b/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch
deleted file mode 100644
index 6db75f5086..0000000000
--- a/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 1a41069c0dc054e59cd76fc3d8cf7cc2a78b5e8d Mon Sep 17 00:00:00 2001
-From: Allen Winter <allen.winter@kdab.com>
-Date: Sat, 3 Sep 2016 16:56:29 -0400
-Subject: [PATCH] CMakeLists.txt, libical.pc.in - fix iculibs (remove full path) ISSUE: 227
-
-Upstream-Status: Backport
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
-----
-diff -Naur libical-2.0.0-orig/CMakeLists.txt libical-2.0.0/CMakeLists.txt
---- libical-2.0.0-orig/CMakeLists.txt 2016-09-08 18:05:06.166049345 +0300
-+++ libical-2.0.0/CMakeLists.txt 2016-09-08 18:05:45.201561334 +0300
-@@ -128,6 +128,7 @@
- # RSCALE info at http://tools.ietf.org/html/rfc7529
- find_package(ICU)
- if(ICU_FOUND)
-+ set(ICUUC_LIBS "-licuuc") #for libical.pc
- set(HAVE_LIBICU 1)
- if(ICU_MAJOR_VERSION VERSION_GREATER 50)
- set(HAVE_ICU_DANGI TRUE)
-@@ -137,6 +138,7 @@
- endif()
- if(ICU_I18N_FOUND)
- set(HAVE_LIBICU_I18N 1)
-+ set(ICUI18N_LIBS "-licui18n") #for libical.pc
- endif()
-
- # MSVC specific definitions
-diff -Naur libical-2.0.0-orig/libical.pc.in libical-2.0.0/libical.pc.in
---- libical-2.0.0-orig/libical.pc.in 2015-12-28 23:44:53.000000000 +0200
-+++ libical-2.0.0/libical.pc.in 2016-09-08 18:09:12.991963597 +0300
-@@ -3,10 +3,10 @@
- libdir=@libdir@
- includedir=@includedir@
- threadslib=@PTHREAD_LIBS@
--iculib=@ICU_LIBRARIES@ @ICU_I18N_LIBRARIES@
-+iculibs=@ICUUC_LIBS@ @ICUI18N_LIBS@
-
- Name: libical
- Description: An implementation of basic iCAL protocols
- Version: @VERSION@
--Libs: -L${libdir} -lical -licalss -licalvcal ${threadslib} ${iculib}
-+Libs: -L${libdir} -lical -licalss -licalvcal ${threadslib} ${iculibs}
- Cflags: -I${includedir}
diff --git a/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch b/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch
new file mode 100644
index 0000000000..b7b757d74b
--- /dev/null
+++ b/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch
@@ -0,0 +1,33 @@
+From e33bc310238bba1690f2c71ad333e10b9e422ea9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Sat, 19 Oct 2019 14:23:06 +0200
+Subject: [PATCH] Use our hand-build native src-generator
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ src/libical-glib/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt
+index f3704e6..ce9db16 100644
+--- a/src/libical-glib/CMakeLists.txt
++++ b/src/libical-glib/CMakeLists.txt
+@@ -63,8 +63,8 @@ endforeach()
+
+ add_custom_command (
+ OUTPUT ${LIBICAL_GLIB_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/libical-glib-private.h ${CMAKE_CURRENT_BINARY_DIR}/i-cal-forward-declarations.h
+- COMMAND ${EXECUTABLE_OUTPUT_PATH}/src-generator "${CMAKE_CURRENT_SOURCE_DIR}/tools" "${CMAKE_CURRENT_SOURCE_DIR}/api"
+- DEPENDS ${EXECUTABLE_OUTPUT_PATH}/src-generator ${xml_files}
++ COMMAND ${CMAKE_BINARY_DIR}/src-generator "${CMAKE_CURRENT_SOURCE_DIR}/tools" "${CMAKE_CURRENT_SOURCE_DIR}/api"
++ DEPENDS ${CMAKE_BINARY_DIR}/src-generator ${xml_files}
+ )
+
+ configure_file(
+--
+2.21.0
+
diff --git a/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch b/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
deleted file mode 100644
index c5c0cb076e..0000000000
--- a/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 918cd8764a845a9d25918a444fbaa5070d2be609 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 21 Aug 2015 16:38:05 +0300
-Subject: [PATCH] Remove cmake check for Perl
-
-We set "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY" in cmake bbclass to
-make sure cmake does not find host programs. In this case we actually
-are fine with host perl: remove the check.
-
-Upstream-Status: Inappropriate [workaround]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- CMakeLists.txt | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d5aad80..5cc9863 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -91,8 +91,7 @@ if(SHARED_ONLY)
- set(LIBRARY_TYPE SHARED)
- endif()
-
--# must have Perl to create the derived stuff
--find_package(Perl REQUIRED)
-+set(PERL_EXECUTABLE perl)
-
- # MSVC specific definitions
- if(WIN32)
---
-2.1.4
-
diff --git a/meta/recipes-support/libical/libical_2.0.0.bb b/meta/recipes-support/libical/libical_2.0.0.bb
deleted file mode 100644
index d4fe868eb4..0000000000
--- a/meta/recipes-support/libical/libical_2.0.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
-HOMEPAGE = "https://github.com/libical/libical"
-BUGTRACKER = "https://github.com/libical/libical/issues"
-LICENSE = "LGPLv2.1 | MPL-1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
- file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
-SECTION = "libs"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
- file://Remove-cmake-check-for-Perl.patch \
- file://0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch \
- "
-DEPENDS = "icu"
-
-SRC_URI[md5sum] = "6bf8e5f5a3ba88baf390d0134e05d76e"
-SRC_URI[sha256sum] = "654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf21456da"
-UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
-
-inherit cmake pkgconfig
-
-FILES_${PN}-dev += "${libdir}/cmake/*"
diff --git a/meta/recipes-support/libical/libical_3.0.6.bb b/meta/recipes-support/libical/libical_3.0.6.bb
new file mode 100644
index 0000000000..f9be898a12
--- /dev/null
+++ b/meta/recipes-support/libical/libical_3.0.6.bb
@@ -0,0 +1,43 @@
+SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
+HOMEPAGE = "https://github.com/libical/libical"
+BUGTRACKER = "https://github.com/libical/libical/issues"
+LICENSE = "LGPLv2.1 | MPL-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \
+ file://LICENSE.LGPL21.txt;md5=933adb561f159e7c3da079536f0ed871 \
+ file://LICENSE.MPL2.txt;md5=9741c346eef56131163e13b9db1241b3"
+SECTION = "libs"
+
+SRC_URI = " \
+ https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
+ file://0001-Use-our-hand-build-native-src-generator.patch \
+"
+SRC_URI[md5sum] = "463a59244c6767b8e67b29379405e297"
+SRC_URI[sha256sum] = "5c8a21c2b732ece4a33e5c862970b4f35a8548bbcda50de5695f6fc211ac4d97"
+UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
+
+inherit cmake pkgconfig
+
+do_compile_prepend() {
+ # As long as https://github.com/libical/libical/issues/394 is open build native src-generator manually
+ NATIVE_CFLAGS="${BUILD_CFLAGS} `pkg-config-native --cflags glib-2.0` `pkg-config-native --cflags libxml-2.0`"
+ NATIVE_LDFLAGS="${BUILD_LDFLAGS} `pkg-config-native --libs glib-2.0` `pkg-config-native --libs libxml-2.0`"
+ ${BUILD_CC} $NATIVE_CFLAGS ${S}/src/libical-glib/tools/generator.c ${S}/src/libical-glib/tools/xml-parser.c -o ${B}/src-generator $NATIVE_LDFLAGS
+}
+
+PACKAGECONFIG ??= "icu glib"
+PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db"
+PACKAGECONFIG[glib] = "-DICAL_GLIB=True,-DICAL_GLIB=False,glib-2.0-native libxml2-native glib-2.0 libxml2"
+# ICU is used for RSCALE (RFC7529) support
+PACKAGECONFIG[icu] = ",-DCMAKE_DISABLE_FIND_PACKAGE_ICU=True,icu"
+
+# No need to use perl-native, the host perl is sufficient.
+EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl"
+# doc build fails with linker error (??) for libical-glib so disable it
+EXTRA_OECMAKE += "-DICAL_BUILD_DOCS=false"
+
+do_install_append () {
+ # Remove build host references
+ sed -i \
+ -e 's,${STAGING_LIBDIR},${libdir},g' \
+ ${D}${libdir}/cmake/LibIcal/LibIcal*.cmake
+}
diff --git a/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch b/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch
deleted file mode 100644
index 3cbf549d48..0000000000
--- a/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-It adds the variables that are needed
-for autoconf 2.65 to reconfigure libiconv and defines the m4 macros
-directory. Its imported from OE.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: libiconv-1.11.1/configure.ac
-===================================================================
---- libiconv-1.11.1.orig/configure.ac
-+++ libiconv-1.11.1/configure.ac
-@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR(build-aux)
- AM_INIT_AUTOMAKE(libiconv, 1.11)
- AC_CONFIG_HEADERS(config.h lib/config.h)
- AC_PROG_MAKE_SET
--
-+AC_CONFIG_MACRO_DIR([m4])
- dnl checks for basic programs
-
- AC_PROG_CC
-Index: libiconv-1.11.1/libcharset/configure.ac
-===================================================================
---- libiconv-1.11.1.orig/libcharset/configure.ac
-+++ libiconv-1.11.1/libcharset/configure.ac
-@@ -16,17 +16,17 @@ dnl along with the GNU CHARSET Library;
- dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
- dnl Fifth Floor, Boston, MA 02110-1301, USA.
-
--AC_PREREQ(2.13)
-+AC_PREREQ(2.61)
-+AC_INIT([libcharset],[1.4] )
-+AC_CONFIG_SRCDIR([lib/localcharset.c])
-
--PACKAGE=libcharset
--VERSION=1.4
--
--AC_INIT(lib/localcharset.c)
- AC_CONFIG_AUX_DIR(build-aux)
- AC_CONFIG_HEADER(config.h)
- AC_PROG_MAKE_SET
--AC_SUBST(PACKAGE)
--AC_SUBST(VERSION)
-+dnl AC_SUBST(PACKAGE)
-+dnl AC_SUBST(VERSION)
-+
-+AC_CONFIG_MACRO_DIR([m4])
-
- dnl checks for basic programs
-
diff --git a/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch b/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch
deleted file mode 100644
index fb07f7366b..0000000000
--- a/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-With libtool generating shared and static version of libraries needs -fPIC flags
-without this it will not generate the commands to create shared linked library
-Its more enforced by libtool 2.4. I have not checked it with older libtool
-libiconv 1.11.x is relatively old release and libtool 2.4 did not exist when it
-was released these kind of problem are more likely
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: libiconv-1.11.1/lib/Makefile.in
-===================================================================
---- libiconv-1.11.1.orig/lib/Makefile.in
-+++ libiconv-1.11.1/lib/Makefile.in
-@@ -70,9 +70,9 @@ preloadable_libiconv.so : preloadable_li
-
- preloadable_libiconv_linux.so : $(SOURCES)
- if test -n "@GCC@"; then \
-- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
-+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -rpath $(libdir) -o libpreload_iconv.la && cp .libs/libpreload_iconv.so preloadable_libiconv_linux.so; \
- else \
-- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
-+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -rpath $(libdir) -o libpreload_iconv.la && cp .libs/libpreload_iconv.so preloadable_libiconv_linux.so; \
- fi
-
- preloadable_libiconv_solaris.so : $(SOURCES)
diff --git a/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch b/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch
deleted file mode 100644
index 6af377b4cc..0000000000
--- a/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch
+++ /dev/null
@@ -1,5008 +0,0 @@
-This patch is needed to solve issues like
-| iconv.o: In function `main':
-| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/src/./iconv.c:861: undefined reference to `relocate'
-| ../srclib/libicrt.a(progreloc.o): In function `prepare_relocate':
-| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/srclib/progreloc.c:297: undefined reference to `compute_curr_prefix'
-| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/srclib/progreloc.c:302: undefined reference to `set_relocation_prefix'
-| collect2: ld returned 1 exit status
-| make[1]: *** [install] Error 1
-
-Upstream-Status: Inappropriate [OE config specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-diff -Naurp libiconv-1.14.org//build-aux/arg-nonnull.h libiconv-1.14/build-aux/arg-nonnull.h
---- libiconv-1.14.org//build-aux/arg-nonnull.h 1969-12-31 16:00:00.000000000 -0800
-+++ libiconv-1.14/build-aux/arg-nonnull.h 2012-01-08 02:07:39.930484438 -0800
-@@ -0,0 +1,26 @@
-+/* A C macro for declaring that specific arguments must not be NULL.
-+ Copyright (C) 2009-2011 Free Software Foundation, Inc.
-+
-+ This program is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-+
-+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
-+ that the values passed as arguments n, ..., m must be non-NULL pointers.
-+ n = 1 stands for the first argument, n = 2 for the second argument etc. */
-+#ifndef _GL_ARG_NONNULL
-+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
-+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
-+# else
-+# define _GL_ARG_NONNULL(params)
-+# endif
-+#endif
-diff -Naurp libiconv-1.14.org//build-aux/c++defs.h libiconv-1.14/build-aux/c++defs.h
---- libiconv-1.14.org//build-aux/c++defs.h 1969-12-31 16:00:00.000000000 -0800
-+++ libiconv-1.14/build-aux/c++defs.h 2012-01-08 02:07:39.942484438 -0800
-@@ -0,0 +1,271 @@
-+/* C++ compatible function declaration macros.
-+ Copyright (C) 2010-2011 Free Software Foundation, Inc.
-+
-+ This program is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _GL_CXXDEFS_H
-+#define _GL_CXXDEFS_H
-+
-+/* The three most frequent use cases of these macros are:
-+
-+ * For providing a substitute for a function that is missing on some
-+ platforms, but is declared and works fine on the platforms on which
-+ it exists:
-+
-+ #if @GNULIB_FOO@
-+ # if !@HAVE_FOO@
-+ _GL_FUNCDECL_SYS (foo, ...);
-+ # endif
-+ _GL_CXXALIAS_SYS (foo, ...);
-+ _GL_CXXALIASWARN (foo);
-+ #elif defined GNULIB_POSIXCHECK
-+ ...
-+ #endif
-+
-+ * For providing a replacement for a function that exists on all platforms,
-+ but is broken/insufficient and needs to be replaced on some platforms:
-+
-+ #if @GNULIB_FOO@
-+ # if @REPLACE_FOO@
-+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-+ # undef foo
-+ # define foo rpl_foo
-+ # endif
-+ _GL_FUNCDECL_RPL (foo, ...);
-+ _GL_CXXALIAS_RPL (foo, ...);
-+ # else
-+ _GL_CXXALIAS_SYS (foo, ...);
-+ # endif
-+ _GL_CXXALIASWARN (foo);
-+ #elif defined GNULIB_POSIXCHECK
-+ ...
-+ #endif
-+
-+ * For providing a replacement for a function that exists on some platforms
-+ but is broken/insufficient and needs to be replaced on some of them and
-+ is additionally either missing or undeclared on some other platforms:
-+
-+ #if @GNULIB_FOO@
-+ # if @REPLACE_FOO@
-+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-+ # undef foo
-+ # define foo rpl_foo
-+ # endif
-+ _GL_FUNCDECL_RPL (foo, ...);
-+ _GL_CXXALIAS_RPL (foo, ...);
-+ # else
-+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
-+ _GL_FUNCDECL_SYS (foo, ...);
-+ # endif
-+ _GL_CXXALIAS_SYS (foo, ...);
-+ # endif
-+ _GL_CXXALIASWARN (foo);
-+ #elif defined GNULIB_POSIXCHECK
-+ ...
-+ #endif
-+*/
-+
-+/* _GL_EXTERN_C declaration;
-+ performs the declaration with C linkage. */
-+#if defined __cplusplus
-+# define _GL_EXTERN_C extern "C"
-+#else
-+# define _GL_EXTERN_C extern
-+#endif
-+
-+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
-+ declares a replacement function, named rpl_func, with the given prototype,
-+ consisting of return type, parameters, and attributes.
-+ Example:
-+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
-+ _GL_ARG_NONNULL ((1)));
-+ */
-+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
-+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
-+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
-+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes
-+
-+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
-+ declares the system function, named func, with the given prototype,
-+ consisting of return type, parameters, and attributes.
-+ Example:
-+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
-+ _GL_ARG_NONNULL ((1)));
-+ */
-+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
-+ _GL_EXTERN_C rettype func parameters_and_attributes
-+
-+/* _GL_CXXALIAS_RPL (func, rettype, parameters);
-+ declares a C++ alias called GNULIB_NAMESPACE::func
-+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
-+ Example:
-+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
-+ */
-+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
-+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
-+#if defined __cplusplus && defined GNULIB_NAMESPACE
-+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
-+ namespace GNULIB_NAMESPACE \
-+ { \
-+ rettype (*const func) parameters = ::rpl_func; \
-+ } \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#else
-+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#endif
-+
-+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
-+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
-+ except that the C function rpl_func may have a slightly different
-+ declaration. A cast is used to silence the "invalid conversion" error
-+ that would otherwise occur. */
-+#if defined __cplusplus && defined GNULIB_NAMESPACE
-+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
-+ namespace GNULIB_NAMESPACE \
-+ { \
-+ rettype (*const func) parameters = \
-+ reinterpret_cast<rettype(*)parameters>(::rpl_func); \
-+ } \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#else
-+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#endif
-+
-+/* _GL_CXXALIAS_SYS (func, rettype, parameters);
-+ declares a C++ alias called GNULIB_NAMESPACE::func
-+ that redirects to the system provided function func, if GNULIB_NAMESPACE
-+ is defined.
-+ Example:
-+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
-+ */
-+#if defined __cplusplus && defined GNULIB_NAMESPACE
-+ /* If we were to write
-+ rettype (*const func) parameters = ::func;
-+ like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
-+ better (remove an indirection through a 'static' pointer variable),
-+ but then the _GL_CXXALIASWARN macro below would cause a warning not only
-+ for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
-+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
-+ namespace GNULIB_NAMESPACE \
-+ { \
-+ static rettype (*func) parameters = ::func; \
-+ } \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#else
-+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#endif
-+
-+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
-+ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
-+ except that the C function func may have a slightly different declaration.
-+ A cast is used to silence the "invalid conversion" error that would
-+ otherwise occur. */
-+#if defined __cplusplus && defined GNULIB_NAMESPACE
-+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
-+ namespace GNULIB_NAMESPACE \
-+ { \
-+ static rettype (*func) parameters = \
-+ reinterpret_cast<rettype(*)parameters>(::func); \
-+ } \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#else
-+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#endif
-+
-+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
-+ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
-+ except that the C function is picked among a set of overloaded functions,
-+ namely the one with rettype2 and parameters2. Two consecutive casts
-+ are used to silence the "cannot find a match" and "invalid conversion"
-+ errors that would otherwise occur. */
-+#if defined __cplusplus && defined GNULIB_NAMESPACE
-+ /* The outer cast must be a reinterpret_cast.
-+ The inner cast: When the function is defined as a set of overloaded
-+ functions, it works as a static_cast<>, choosing the designated variant.
-+ When the function is defined as a single variant, it works as a
-+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */
-+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
-+ namespace GNULIB_NAMESPACE \
-+ { \
-+ static rettype (*func) parameters = \
-+ reinterpret_cast<rettype(*)parameters>( \
-+ (rettype2(*)parameters2)(::func)); \
-+ } \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#else
-+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#endif
-+
-+/* _GL_CXXALIASWARN (func);
-+ causes a warning to be emitted when ::func is used but not when
-+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded
-+ variants. */
-+#if defined __cplusplus && defined GNULIB_NAMESPACE
-+# define _GL_CXXALIASWARN(func) \
-+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
-+# define _GL_CXXALIASWARN_1(func,namespace) \
-+ _GL_CXXALIASWARN_2 (func, namespace)
-+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
-+ we enable the warning only when not optimizing. */
-+# if !__OPTIMIZE__
-+# define _GL_CXXALIASWARN_2(func,namespace) \
-+ _GL_WARN_ON_USE (func, \
-+ "The symbol ::" #func " refers to the system function. " \
-+ "Use " #namespace "::" #func " instead.")
-+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-+# define _GL_CXXALIASWARN_2(func,namespace) \
-+ extern __typeof__ (func) func
-+# else
-+# define _GL_CXXALIASWARN_2(func,namespace) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+# endif
-+#else
-+# define _GL_CXXALIASWARN(func) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#endif
-+
-+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
-+ causes a warning to be emitted when the given overloaded variant of ::func
-+ is used but not when GNULIB_NAMESPACE::func is used. */
-+#if defined __cplusplus && defined GNULIB_NAMESPACE
-+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
-+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
-+ GNULIB_NAMESPACE)
-+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
-+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
-+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
-+ we enable the warning only when not optimizing. */
-+# if !__OPTIMIZE__
-+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-+ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
-+ "The symbol ::" #func " refers to the system function. " \
-+ "Use " #namespace "::" #func " instead.")
-+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-+ extern __typeof__ (func) func
-+# else
-+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+# endif
-+#else
-+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
-+ _GL_EXTERN_C int _gl_cxxalias_dummy
-+#endif
-+
-+#endif /* _GL_CXXDEFS_H */
-diff -Naurp libiconv-1.14.org//build-aux/snippet/arg-nonnull.h libiconv-1.14/build-aux/snippet/arg-nonnull.h
---- libiconv-1.14.org//build-aux/snippet/arg-nonnull.h 2011-08-07 06:22:07.000000000 -0700
-+++ libiconv-1.14/build-aux/snippet/arg-nonnull.h 1969-12-31 16:00:00.000000000 -0800
-@@ -1,26 +0,0 @@
--/* A C macro for declaring that specific arguments must not be NULL.
-- Copyright (C) 2009-2011 Free Software Foundation, Inc.
--
-- This program is free software: you can redistribute it and/or modify it
-- under the terms of the GNU General Public License as published
-- by the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>. */
--
--/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
-- that the values passed as arguments n, ..., m must be non-NULL pointers.
-- n = 1 stands for the first argument, n = 2 for the second argument etc. */
--#ifndef _GL_ARG_NONNULL
--# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
--# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
--# else
--# define _GL_ARG_NONNULL(params)
--# endif
--#endif
-diff -Naurp libiconv-1.14.org//build-aux/snippet/c++defs.h libiconv-1.14/build-aux/snippet/c++defs.h
---- libiconv-1.14.org//build-aux/snippet/c++defs.h 2011-08-07 06:22:07.000000000 -0700
-+++ libiconv-1.14/build-aux/snippet/c++defs.h 1969-12-31 16:00:00.000000000 -0800
-@@ -1,271 +0,0 @@
--/* C++ compatible function declaration macros.
-- Copyright (C) 2010-2011 Free Software Foundation, Inc.
--
-- This program is free software: you can redistribute it and/or modify it
-- under the terms of the GNU General Public License as published
-- by the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>. */
--
--#ifndef _GL_CXXDEFS_H
--#define _GL_CXXDEFS_H
--
--/* The three most frequent use cases of these macros are:
--
-- * For providing a substitute for a function that is missing on some
-- platforms, but is declared and works fine on the platforms on which
-- it exists:
--
-- #if @GNULIB_FOO@
-- # if !@HAVE_FOO@
-- _GL_FUNCDECL_SYS (foo, ...);
-- # endif
-- _GL_CXXALIAS_SYS (foo, ...);
-- _GL_CXXALIASWARN (foo);
-- #elif defined GNULIB_POSIXCHECK
-- ...
-- #endif
--
-- * For providing a replacement for a function that exists on all platforms,
-- but is broken/insufficient and needs to be replaced on some platforms:
--
-- #if @GNULIB_FOO@
-- # if @REPLACE_FOO@
-- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-- # undef foo
-- # define foo rpl_foo
-- # endif
-- _GL_FUNCDECL_RPL (foo, ...);
-- _GL_CXXALIAS_RPL (foo, ...);
-- # else
-- _GL_CXXALIAS_SYS (foo, ...);
-- # endif
-- _GL_CXXALIASWARN (foo);
-- #elif defined GNULIB_POSIXCHECK
-- ...
-- #endif
--
-- * For providing a replacement for a function that exists on some platforms
-- but is broken/insufficient and needs to be replaced on some of them and
-- is additionally either missing or undeclared on some other platforms:
--
-- #if @GNULIB_FOO@
-- # if @REPLACE_FOO@
-- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-- # undef foo
-- # define foo rpl_foo
-- # endif
-- _GL_FUNCDECL_RPL (foo, ...);
-- _GL_CXXALIAS_RPL (foo, ...);
-- # else
-- # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
-- _GL_FUNCDECL_SYS (foo, ...);
-- # endif
-- _GL_CXXALIAS_SYS (foo, ...);
-- # endif
-- _GL_CXXALIASWARN (foo);
-- #elif defined GNULIB_POSIXCHECK
-- ...
-- #endif
--*/
--
--/* _GL_EXTERN_C declaration;
-- performs the declaration with C linkage. */
--#if defined __cplusplus
--# define _GL_EXTERN_C extern "C"
--#else
--# define _GL_EXTERN_C extern
--#endif
--
--/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
-- declares a replacement function, named rpl_func, with the given prototype,
-- consisting of return type, parameters, and attributes.
-- Example:
-- _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
-- _GL_ARG_NONNULL ((1)));
-- */
--#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
-- _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
--#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
-- _GL_EXTERN_C rettype rpl_func parameters_and_attributes
--
--/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
-- declares the system function, named func, with the given prototype,
-- consisting of return type, parameters, and attributes.
-- Example:
-- _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
-- _GL_ARG_NONNULL ((1)));
-- */
--#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
-- _GL_EXTERN_C rettype func parameters_and_attributes
--
--/* _GL_CXXALIAS_RPL (func, rettype, parameters);
-- declares a C++ alias called GNULIB_NAMESPACE::func
-- that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
-- Example:
-- _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
-- */
--#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
-- _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
--#if defined __cplusplus && defined GNULIB_NAMESPACE
--# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
-- namespace GNULIB_NAMESPACE \
-- { \
-- rettype (*const func) parameters = ::rpl_func; \
-- } \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#else
--# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#endif
--
--/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
-- is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
-- except that the C function rpl_func may have a slightly different
-- declaration. A cast is used to silence the "invalid conversion" error
-- that would otherwise occur. */
--#if defined __cplusplus && defined GNULIB_NAMESPACE
--# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
-- namespace GNULIB_NAMESPACE \
-- { \
-- rettype (*const func) parameters = \
-- reinterpret_cast<rettype(*)parameters>(::rpl_func); \
-- } \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#else
--# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#endif
--
--/* _GL_CXXALIAS_SYS (func, rettype, parameters);
-- declares a C++ alias called GNULIB_NAMESPACE::func
-- that redirects to the system provided function func, if GNULIB_NAMESPACE
-- is defined.
-- Example:
-- _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
-- */
--#if defined __cplusplus && defined GNULIB_NAMESPACE
-- /* If we were to write
-- rettype (*const func) parameters = ::func;
-- like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
-- better (remove an indirection through a 'static' pointer variable),
-- but then the _GL_CXXALIASWARN macro below would cause a warning not only
-- for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
--# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
-- namespace GNULIB_NAMESPACE \
-- { \
-- static rettype (*func) parameters = ::func; \
-- } \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#else
--# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#endif
--
--/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
-- is like _GL_CXXALIAS_SYS (func, rettype, parameters);
-- except that the C function func may have a slightly different declaration.
-- A cast is used to silence the "invalid conversion" error that would
-- otherwise occur. */
--#if defined __cplusplus && defined GNULIB_NAMESPACE
--# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
-- namespace GNULIB_NAMESPACE \
-- { \
-- static rettype (*func) parameters = \
-- reinterpret_cast<rettype(*)parameters>(::func); \
-- } \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#else
--# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#endif
--
--/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
-- is like _GL_CXXALIAS_SYS (func, rettype, parameters);
-- except that the C function is picked among a set of overloaded functions,
-- namely the one with rettype2 and parameters2. Two consecutive casts
-- are used to silence the "cannot find a match" and "invalid conversion"
-- errors that would otherwise occur. */
--#if defined __cplusplus && defined GNULIB_NAMESPACE
-- /* The outer cast must be a reinterpret_cast.
-- The inner cast: When the function is defined as a set of overloaded
-- functions, it works as a static_cast<>, choosing the designated variant.
-- When the function is defined as a single variant, it works as a
-- reinterpret_cast<>. The parenthesized cast syntax works both ways. */
--# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
-- namespace GNULIB_NAMESPACE \
-- { \
-- static rettype (*func) parameters = \
-- reinterpret_cast<rettype(*)parameters>( \
-- (rettype2(*)parameters2)(::func)); \
-- } \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#else
--# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#endif
--
--/* _GL_CXXALIASWARN (func);
-- causes a warning to be emitted when ::func is used but not when
-- GNULIB_NAMESPACE::func is used. func must be defined without overloaded
-- variants. */
--#if defined __cplusplus && defined GNULIB_NAMESPACE
--# define _GL_CXXALIASWARN(func) \
-- _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
--# define _GL_CXXALIASWARN_1(func,namespace) \
-- _GL_CXXALIASWARN_2 (func, namespace)
--/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
-- we enable the warning only when not optimizing. */
--# if !__OPTIMIZE__
--# define _GL_CXXALIASWARN_2(func,namespace) \
-- _GL_WARN_ON_USE (func, \
-- "The symbol ::" #func " refers to the system function. " \
-- "Use " #namespace "::" #func " instead.")
--# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
--# define _GL_CXXALIASWARN_2(func,namespace) \
-- extern __typeof__ (func) func
--# else
--# define _GL_CXXALIASWARN_2(func,namespace) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--# endif
--#else
--# define _GL_CXXALIASWARN(func) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#endif
--
--/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
-- causes a warning to be emitted when the given overloaded variant of ::func
-- is used but not when GNULIB_NAMESPACE::func is used. */
--#if defined __cplusplus && defined GNULIB_NAMESPACE
--# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
-- _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
-- GNULIB_NAMESPACE)
--# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
-- _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
--/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
-- we enable the warning only when not optimizing. */
--# if !__OPTIMIZE__
--# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-- _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
-- "The symbol ::" #func " refers to the system function. " \
-- "Use " #namespace "::" #func " instead.")
--# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
--# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-- extern __typeof__ (func) func
--# else
--# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--# endif
--#else
--# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
-- _GL_EXTERN_C int _gl_cxxalias_dummy
--#endif
--
--#endif /* _GL_CXXDEFS_H */
-diff -Naurp libiconv-1.14.org//build-aux/snippet/_Noreturn.h libiconv-1.14/build-aux/snippet/_Noreturn.h
---- libiconv-1.14.org//build-aux/snippet/_Noreturn.h 2011-08-07 06:22:07.000000000 -0700
-+++ libiconv-1.14/build-aux/snippet/_Noreturn.h 1969-12-31 16:00:00.000000000 -0800
-@@ -1,10 +0,0 @@
--#ifndef _Noreturn
--# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
-- || 0x5110 <= __SUNPRO_C)
--# define _Noreturn __attribute__ ((__noreturn__))
--# elif 1200 <= _MSC_VER
--# define _Noreturn __declspec (noreturn)
--# else
--# define _Noreturn
--# endif
--#endif
-diff -Naurp libiconv-1.14.org//build-aux/snippet/warn-on-use.h libiconv-1.14/build-aux/snippet/warn-on-use.h
---- libiconv-1.14.org//build-aux/snippet/warn-on-use.h 2011-08-07 06:22:07.000000000 -0700
-+++ libiconv-1.14/build-aux/snippet/warn-on-use.h 1969-12-31 16:00:00.000000000 -0800
-@@ -1,109 +0,0 @@
--/* A C macro for emitting warnings if a function is used.
-- Copyright (C) 2010-2011 Free Software Foundation, Inc.
--
-- This program is free software: you can redistribute it and/or modify it
-- under the terms of the GNU General Public License as published
-- by the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>. */
--
--/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
-- for FUNCTION which will then trigger a compiler warning containing
-- the text of "literal string" anywhere that function is called, if
-- supported by the compiler. If the compiler does not support this
-- feature, the macro expands to an unused extern declaration.
--
-- This macro is useful for marking a function as a potential
-- portability trap, with the intent that "literal string" include
-- instructions on the replacement function that should be used
-- instead. However, one of the reasons that a function is a
-- portability trap is if it has the wrong signature. Declaring
-- FUNCTION with a different signature in C is a compilation error, so
-- this macro must use the same type as any existing declaration so
-- that programs that avoid the problematic FUNCTION do not fail to
-- compile merely because they included a header that poisoned the
-- function. But this implies that _GL_WARN_ON_USE is only safe to
-- use if FUNCTION is known to already have a declaration. Use of
-- this macro implies that there must not be any other macro hiding
-- the declaration of FUNCTION; but undefining FUNCTION first is part
-- of the poisoning process anyway (although for symbols that are
-- provided only via a macro, the result is a compilation error rather
-- than a warning containing "literal string"). Also note that in
-- C++, it is only safe to use if FUNCTION has no overloads.
--
-- For an example, it is possible to poison 'getline' by:
-- - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
-- [getline]) in configure.ac, which potentially defines
-- HAVE_RAW_DECL_GETLINE
-- - adding this code to a header that wraps the system <stdio.h>:
-- #undef getline
-- #if HAVE_RAW_DECL_GETLINE
-- _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
-- "not universally present; use the gnulib module getline");
-- #endif
--
-- It is not possible to directly poison global variables. But it is
-- possible to write a wrapper accessor function, and poison that
-- (less common usage, like &environ, will cause a compilation error
-- rather than issue the nice warning, but the end result of informing
-- the developer about their portability problem is still achieved):
-- #if HAVE_RAW_DECL_ENVIRON
-- static inline char ***rpl_environ (void) { return &environ; }
-- _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
-- # undef environ
-- # define environ (*rpl_environ ())
-- #endif
-- */
--#ifndef _GL_WARN_ON_USE
--
--# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
--/* A compiler attribute is available in gcc versions 4.3.0 and later. */
--# define _GL_WARN_ON_USE(function, message) \
--extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
--# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
--/* Verify the existence of the function. */
--# define _GL_WARN_ON_USE(function, message) \
--extern __typeof__ (function) function
--# else /* Unsupported. */
--# define _GL_WARN_ON_USE(function, message) \
--_GL_WARN_EXTERN_C int _gl_warn_on_use
--# endif
--#endif
--
--/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
-- is like _GL_WARN_ON_USE (function, "string"), except that the function is
-- declared with the given prototype, consisting of return type, parameters,
-- and attributes.
-- This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
-- not work in this case. */
--#ifndef _GL_WARN_ON_USE_CXX
--# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
--# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
--extern rettype function parameters_and_attributes \
-- __attribute__ ((__warning__ (msg)))
--# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
--/* Verify the existence of the function. */
--# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
--extern rettype function parameters_and_attributes
--# else /* Unsupported. */
--# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
--_GL_WARN_EXTERN_C int _gl_warn_on_use
--# endif
--#endif
--
--/* _GL_WARN_EXTERN_C declaration;
-- performs the declaration with C linkage. */
--#ifndef _GL_WARN_EXTERN_C
--# if defined __cplusplus
--# define _GL_WARN_EXTERN_C extern "C"
--# else
--# define _GL_WARN_EXTERN_C extern
--# endif
--#endif
-diff -Naurp libiconv-1.14.org//build-aux/warn-on-use.h libiconv-1.14/build-aux/warn-on-use.h
---- libiconv-1.14.org//build-aux/warn-on-use.h 1969-12-31 16:00:00.000000000 -0800
-+++ libiconv-1.14/build-aux/warn-on-use.h 2012-01-08 02:07:39.950484439 -0800
-@@ -0,0 +1,109 @@
-+/* A C macro for emitting warnings if a function is used.
-+ Copyright (C) 2010-2011 Free Software Foundation, Inc.
-+
-+ This program is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-+
-+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
-+ for FUNCTION which will then trigger a compiler warning containing
-+ the text of "literal string" anywhere that function is called, if
-+ supported by the compiler. If the compiler does not support this
-+ feature, the macro expands to an unused extern declaration.
-+
-+ This macro is useful for marking a function as a potential
-+ portability trap, with the intent that "literal string" include
-+ instructions on the replacement function that should be used
-+ instead. However, one of the reasons that a function is a
-+ portability trap is if it has the wrong signature. Declaring
-+ FUNCTION with a different signature in C is a compilation error, so
-+ this macro must use the same type as any existing declaration so
-+ that programs that avoid the problematic FUNCTION do not fail to
-+ compile merely because they included a header that poisoned the
-+ function. But this implies that _GL_WARN_ON_USE is only safe to
-+ use if FUNCTION is known to already have a declaration. Use of
-+ this macro implies that there must not be any other macro hiding
-+ the declaration of FUNCTION; but undefining FUNCTION first is part
-+ of the poisoning process anyway (although for symbols that are
-+ provided only via a macro, the result is a compilation error rather
-+ than a warning containing "literal string"). Also note that in
-+ C++, it is only safe to use if FUNCTION has no overloads.
-+
-+ For an example, it is possible to poison 'getline' by:
-+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
-+ [getline]) in configure.ac, which potentially defines
-+ HAVE_RAW_DECL_GETLINE
-+ - adding this code to a header that wraps the system <stdio.h>:
-+ #undef getline
-+ #if HAVE_RAW_DECL_GETLINE
-+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
-+ "not universally present; use the gnulib module getline");
-+ #endif
-+
-+ It is not possible to directly poison global variables. But it is
-+ possible to write a wrapper accessor function, and poison that
-+ (less common usage, like &environ, will cause a compilation error
-+ rather than issue the nice warning, but the end result of informing
-+ the developer about their portability problem is still achieved):
-+ #if HAVE_RAW_DECL_ENVIRON
-+ static inline char ***rpl_environ (void) { return &environ; }
-+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
-+ # undef environ
-+ # define environ (*rpl_environ ())
-+ #endif
-+ */
-+#ifndef _GL_WARN_ON_USE
-+
-+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
-+/* A compiler attribute is available in gcc versions 4.3.0 and later. */
-+# define _GL_WARN_ON_USE(function, message) \
-+extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
-+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-+/* Verify the existence of the function. */
-+# define _GL_WARN_ON_USE(function, message) \
-+extern __typeof__ (function) function
-+# else /* Unsupported. */
-+# define _GL_WARN_ON_USE(function, message) \
-+_GL_WARN_EXTERN_C int _gl_warn_on_use
-+# endif
-+#endif
-+
-+/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
-+ is like _GL_WARN_ON_USE (function, "string"), except that the function is
-+ declared with the given prototype, consisting of return type, parameters,
-+ and attributes.
-+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
-+ not work in this case. */
-+#ifndef _GL_WARN_ON_USE_CXX
-+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
-+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-+extern rettype function parameters_and_attributes \
-+ __attribute__ ((__warning__ (msg)))
-+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-+/* Verify the existence of the function. */
-+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-+extern rettype function parameters_and_attributes
-+# else /* Unsupported. */
-+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-+_GL_WARN_EXTERN_C int _gl_warn_on_use
-+# endif
-+#endif
-+
-+/* _GL_WARN_EXTERN_C declaration;
-+ performs the declaration with C linkage. */
-+#ifndef _GL_WARN_EXTERN_C
-+# if defined __cplusplus
-+# define _GL_WARN_EXTERN_C extern "C"
-+# else
-+# define _GL_WARN_EXTERN_C extern
-+# endif
-+#endif
-diff -Naurp libiconv-1.14.org//srclib/allocator.h libiconv-1.14/srclib/allocator.h
---- libiconv-1.14.org//srclib/allocator.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/allocator.h 2012-01-08 02:07:40.050484444 -0800
-@@ -45,11 +45,10 @@ struct allocator
- /* Call FREE to free memory, like 'free'. */
- void (*free) (void *);
-
-- /* If nonnull, call DIE (SIZE) if MALLOC (SIZE) or REALLOC (...,
-- SIZE) fails. DIE should not return. SIZE should equal SIZE_MAX
-- if size_t overflow was detected while calculating sizes to be
-- passed to MALLOC or REALLOC. */
-- void (*die) (size_t);
-+ /* If nonnull, call DIE if MALLOC or REALLOC fails. DIE should not
-+ return. DIE can be used by code that detects memory overflow
-+ while calculating sizes to be passed to MALLOC or REALLOC. */
-+ void (*die) (void);
- };
-
- /* An allocator using the stdlib functions and a null DIE function. */
-diff -Naurp libiconv-1.14.org//srclib/canonicalize-lgpl.c libiconv-1.14/srclib/canonicalize-lgpl.c
---- libiconv-1.14.org//srclib/canonicalize-lgpl.c 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/canonicalize-lgpl.c 2012-01-08 02:07:40.094484446 -0800
-@@ -125,7 +125,7 @@ __realpath (const char *name, char *reso
- #else
- path_max = pathconf (name, _PC_PATH_MAX);
- if (path_max <= 0)
-- path_max = 8192;
-+ path_max = 1024;
- #endif
-
- if (resolved == NULL)
-diff -Naurp libiconv-1.14.org//srclib/careadlinkat.c libiconv-1.14/srclib/careadlinkat.c
---- libiconv-1.14.org//srclib/careadlinkat.c 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/careadlinkat.c 2012-01-08 02:07:40.102484445 -0800
-@@ -133,7 +133,6 @@ careadlinkat (int fd, char const *filena
- if (buf == stack_buf)
- {
- char *b = (char *) alloc->allocate (link_size);
-- buf_size = link_size;
- if (! b)
- break;
- memcpy (b, buf, link_size);
-@@ -157,11 +156,6 @@ careadlinkat (int fd, char const *filena
- buf_size *= 2;
- else if (buf_size < buf_size_max)
- buf_size = buf_size_max;
-- else if (buf_size_max < SIZE_MAX)
-- {
-- errno = ENAMETOOLONG;
-- return NULL;
-- }
- else
- break;
- buf = (char *) alloc->allocate (buf_size);
-@@ -169,7 +163,7 @@ careadlinkat (int fd, char const *filena
- while (buf);
-
- if (alloc->die)
-- alloc->die (buf_size);
-+ alloc->die ();
- errno = ENOMEM;
- return NULL;
- }
-diff -Naurp libiconv-1.14.org//srclib/errno.in.h libiconv-1.14/srclib/errno.in.h
---- libiconv-1.14.org//srclib/errno.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/errno.in.h 2012-01-08 02:07:40.122484446 -0800
-@@ -16,7 +16,7 @@
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
--#ifndef _@GUARD_PREFIX@_ERRNO_H
-+#ifndef _GL_ERRNO_H
-
- #if __GNUC__ >= 3
- @PRAGMA_SYSTEM_HEADER@
-@@ -26,8 +26,8 @@
- /* The include_next requires a split double-inclusion guard. */
- #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
-
--#ifndef _@GUARD_PREFIX@_ERRNO_H
--#define _@GUARD_PREFIX@_ERRNO_H
-+#ifndef _GL_ERRNO_H
-+#define _GL_ERRNO_H
-
-
- /* On native Windows platforms, many macros are not defined. */
-@@ -147,16 +147,6 @@
- # define GNULIB_defined_ENOTSUP 1
- # endif
-
--# ifndef ENETRESET
--# define ENETRESET 2011
--# define GNULIB_defined_ENETRESET 1
--# endif
--
--# ifndef ECONNABORTED
--# define ECONNABORTED 2012
--# define GNULIB_defined_ECONNABORTED 1
--# endif
--
- # ifndef ESTALE
- # define ESTALE 2009
- # define GNULIB_defined_ESTALE 1
-@@ -173,5 +163,5 @@
- # endif
-
-
--#endif /* _@GUARD_PREFIX@_ERRNO_H */
--#endif /* _@GUARD_PREFIX@_ERRNO_H */
-+#endif /* _GL_ERRNO_H */
-+#endif /* _GL_ERRNO_H */
-diff -Naurp libiconv-1.14.org//srclib/error.c libiconv-1.14/srclib/error.c
---- libiconv-1.14.org//srclib/error.c 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/error.c 2012-01-08 02:07:40.134484448 -0800
-@@ -97,15 +97,11 @@ extern void __error_at_line (int status,
- /* The gnulib override of fcntl is not needed in this file. */
- # undef fcntl
-
--# if !HAVE_DECL_STRERROR_R
-+# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
- # ifndef HAVE_DECL_STRERROR_R
- "this configure-time declaration test was not run"
- # endif
--# if STRERROR_R_CHAR_P
- char *strerror_r ();
--# else
--int strerror_r ();
--# endif
- # endif
-
- /* The calling program should define program_name and set it to the
-diff -Naurp libiconv-1.14.org//srclib/fcntl.in.h libiconv-1.14/srclib/fcntl.in.h
---- libiconv-1.14.org//srclib/fcntl.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/fcntl.in.h 2012-01-08 02:07:40.154484449 -0800
-@@ -40,7 +40,7 @@
- #else
- /* Normal invocation convention. */
-
--#ifndef _@GUARD_PREFIX@_FCNTL_H
-+#ifndef _GL_FCNTL_H
-
- #include <sys/types.h>
- /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
-@@ -55,8 +55,8 @@
- /* The include_next requires a split double-inclusion guard. */
- #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
-
--#ifndef _@GUARD_PREFIX@_FCNTL_H
--#define _@GUARD_PREFIX@_FCNTL_H
-+#ifndef _GL_FCNTL_H
-+#define _GL_FCNTL_H
-
- #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
- # include <unistd.h>
-@@ -320,6 +320,6 @@ _GL_WARN_ON_USE (openat, "openat is not
- #endif
-
-
--#endif /* _@GUARD_PREFIX@_FCNTL_H */
--#endif /* _@GUARD_PREFIX@_FCNTL_H */
-+#endif /* _GL_FCNTL_H */
-+#endif /* _GL_FCNTL_H */
- #endif
-diff -Naurp libiconv-1.14.org//srclib/intprops.h libiconv-1.14/srclib/intprops.h
---- libiconv-1.14.org//srclib/intprops.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/intprops.h 2012-01-08 02:07:40.174484450 -0800
-@@ -22,13 +22,14 @@
-
- #include <limits.h>
-
--/* Return an integer value, converted to the same type as the integer
-- expression E after integer type promotion. V is the unconverted value. */
--#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
-+/* Return a integer value, converted to the same type as the integer
-+ expression E after integer type promotion. V is the unconverted value.
-+ E should not have side effects. */
-+#define _GL_INT_CONVERT(e, v) ((e) - (e) + (v))
-
- /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
--#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
-+#define _GL_INT_NEGATE_CONVERT(e, v) ((e) - (e) - (v))
-
- /* The extra casts in the following macros work around compiler bugs,
- e.g., in Cray C 5.0.3.0. */
-@@ -52,7 +53,7 @@
- #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-
- /* Return 1 if the integer expression E, after integer promotion, has
-- a signed type. */
-+ a signed type. E should not have side effects. */
- #define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
-
-
-@@ -310,10 +311,13 @@
- /* Return 1 if the expression A <op> B would overflow,
- where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
- assuming MIN and MAX are the minimum and maximum for the result type.
-- Arguments should be free of side effects. */
-+
-+ This macro assumes that A | B is a valid integer if both A and B are,
-+ which is true of all known practical hosts. If this is a problem
-+ for you, please let us know how to fix it for your host. */
- #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
- op_result_overflow (a, b, \
-- _GL_INT_MINIMUM (0 * (b) + (a)), \
-- _GL_INT_MAXIMUM (0 * (b) + (a)))
-+ _GL_INT_MINIMUM ((a) | (b)), \
-+ _GL_INT_MAXIMUM ((a) | (b)))
-
- #endif /* _GL_INTPROPS_H */
-diff -Naurp libiconv-1.14.org//srclib/Makefile.gnulib libiconv-1.14/srclib/Makefile.gnulib
---- libiconv-1.14.org//srclib/Makefile.gnulib 2012-01-08 02:05:18.754477606 -0800
-+++ libiconv-1.14/srclib/Makefile.gnulib 2012-01-08 02:07:43.138484592 -0800
-@@ -9,7 +9,7 @@
- # the same distribution terms as the rest of that program.
- #
- # Generated by gnulib-tool.
--# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
-+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
-
-
- MOSTLYCLEANFILES += core *.stackdump
-@@ -60,12 +60,60 @@ EXTRA_DIST += areadlink.h
-
- ## end gnulib module areadlink
-
-+## begin gnulib module arg-nonnull
-+
-+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-+# statements but through direct file reference. Therefore this snippet must be
-+# present in all Makefile.am that need it. This is ensured by the applicability
-+# 'all' defined above.
-+
-+BUILT_SOURCES += arg-nonnull.h
-+# The arg-nonnull.h that gets inserted into generated .h files is the same as
-+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
-+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
-+ $(AM_V_GEN)rm -f $@-t $@ && \
-+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
-+ < $(top_srcdir)/build-aux/arg-nonnull.h \
-+ > $@-t && \
-+ mv $@-t $@
-+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
-+
-+ARG_NONNULL_H=arg-nonnull.h
-+
-+EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
-+
-+## end gnulib module arg-nonnull
-+
- ## begin gnulib module binary-io
-
- libicrt_a_SOURCES += binary-io.h
-
- ## end gnulib module binary-io
-
-+## begin gnulib module c++defs
-+
-+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-+# statements but through direct file reference. Therefore this snippet must be
-+# present in all Makefile.am that need it. This is ensured by the applicability
-+# 'all' defined above.
-+
-+BUILT_SOURCES += c++defs.h
-+# The c++defs.h that gets inserted into generated .h files is the same as
-+# build-aux/c++defs.h, except that it has the copyright header cut off.
-+c++defs.h: $(top_srcdir)/build-aux/c++defs.h
-+ $(AM_V_GEN)rm -f $@-t $@ && \
-+ sed -n -e '/_GL_CXXDEFS/,$$p' \
-+ < $(top_srcdir)/build-aux/c++defs.h \
-+ > $@-t && \
-+ mv $@-t $@
-+MOSTLYCLEANFILES += c++defs.h c++defs.h-t
-+
-+CXXDEFS_H=c++defs.h
-+
-+EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
-+
-+## end gnulib module c++defs
-+
- ## begin gnulib module canonicalize-lgpl
-
-
-@@ -100,8 +148,7 @@ if GL_GENERATE_ERRNO_H
- errno.h: errno.in.h $(top_builddir)/config.status
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
-@@ -142,15 +189,14 @@ BUILT_SOURCES += fcntl.h
- fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
-- -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
-- -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
-- -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
-- -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
-+ -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
-+ -e 's|@''GNULIB_NONBLOCKING''@|$(GNULIB_NONBLOCKING)|g' \
-+ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
-+ -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
- -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
- -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
- -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
-@@ -297,7 +343,7 @@ EXTRA_DIST += $(top_srcdir)/build-aux/co
- ## begin gnulib module relocatable-prog-wrapper
-
-
--EXTRA_DIST += allocator.c allocator.h areadlink.c areadlink.h c-ctype.c c-ctype.h canonicalize-lgpl.c careadlinkat.c careadlinkat.h malloca.c malloca.h progname.c progname.h progreloc.c readlink.c relocatable.c relocatable.h relocwrapper.c setenv.c
-+EXTRA_DIST += allocator.c allocator.h areadlink.c areadlink.h c-ctype.c c-ctype.h canonicalize-lgpl.c careadlinkat.c careadlinkat.h malloca.c malloca.h progname.c progname.h progreloc.c readlink.c relocatable.c relocatable.h relocwrapper.c setenv.c strerror.c
-
- EXTRA_DIST += $(top_srcdir)/build-aux/install-reloc
-
-@@ -305,9 +351,10 @@ EXTRA_DIST += $(top_srcdir)/build-aux/in
-
- ## begin gnulib module safe-read
-
--libicrt_a_SOURCES += safe-read.c
-
--EXTRA_DIST += safe-read.h
-+EXTRA_DIST += safe-read.c safe-read.h
-+
-+EXTRA_libicrt_a_SOURCES += safe-read.c
-
- ## end gnulib module safe-read
-
-@@ -320,24 +367,20 @@ BUILT_SOURCES += signal.h
- signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
-- -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
-- -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
-- -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
-- -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
-+ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \
-+ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \
-+ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \
- -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
-- -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
- -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
- -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
- -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
- -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
- -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
- -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
-- -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-@@ -368,87 +411,6 @@ EXTRA_libicrt_a_SOURCES += sigprocmask.c
-
- ## end gnulib module sigprocmask
-
--## begin gnulib module snippet/_Noreturn
--
--# Because this Makefile snippet defines a variable used by other
--# gnulib Makefile snippets, it must be present in all Makefile.am that
--# need it. This is ensured by the applicability 'all' defined above.
--
--_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
--
--EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
--
--## end gnulib module snippet/_Noreturn
--
--## begin gnulib module snippet/arg-nonnull
--
--# The BUILT_SOURCES created by this Makefile snippet are not used via #include
--# statements but through direct file reference. Therefore this snippet must be
--# present in all Makefile.am that need it. This is ensured by the applicability
--# 'all' defined above.
--
--BUILT_SOURCES += arg-nonnull.h
--# The arg-nonnull.h that gets inserted into generated .h files is the same as
--# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
--# off.
--arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
-- $(AM_V_GEN)rm -f $@-t $@ && \
-- sed -n -e '/GL_ARG_NONNULL/,$$p' \
-- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
-- > $@-t && \
-- mv $@-t $@
--MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
--
--ARG_NONNULL_H=arg-nonnull.h
--
--EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
--
--## end gnulib module snippet/arg-nonnull
--
--## begin gnulib module snippet/c++defs
--
--# The BUILT_SOURCES created by this Makefile snippet are not used via #include
--# statements but through direct file reference. Therefore this snippet must be
--# present in all Makefile.am that need it. This is ensured by the applicability
--# 'all' defined above.
--
--BUILT_SOURCES += c++defs.h
--# The c++defs.h that gets inserted into generated .h files is the same as
--# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
--c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
-- $(AM_V_GEN)rm -f $@-t $@ && \
-- sed -n -e '/_GL_CXXDEFS/,$$p' \
-- < $(top_srcdir)/build-aux/snippet/c++defs.h \
-- > $@-t && \
-- mv $@-t $@
--MOSTLYCLEANFILES += c++defs.h c++defs.h-t
--
--CXXDEFS_H=c++defs.h
--
--EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
--
--## end gnulib module snippet/c++defs
--
--## begin gnulib module snippet/warn-on-use
--
--BUILT_SOURCES += warn-on-use.h
--# The warn-on-use.h that gets inserted into generated .h files is the same as
--# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
--# off.
--warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
-- $(AM_V_GEN)rm -f $@-t $@ && \
-- sed -n -e '/^.ifndef/,$$p' \
-- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
-- > $@-t && \
-- mv $@-t $@
--MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
--
--WARN_ON_USE_H=warn-on-use.h
--
--EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
--
--## end gnulib module snippet/warn-on-use
--
- ## begin gnulib module stat
-
-
-@@ -491,8 +453,7 @@ if GL_GENERATE_STDDEF_H
- stddef.h: stddef.in.h $(top_builddir)/config.status
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
-@@ -521,8 +482,7 @@ if GL_GENERATE_STDINT_H
- stdint.h: stdint.in.h $(top_builddir)/config.status
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-+ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-@@ -570,63 +530,62 @@ BUILT_SOURCES += stdio.h
- stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-- -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
-- -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
-- -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
-- -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
-- -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
-- -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
-- -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
-- -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
-- -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
-- -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
-- -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
-- -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
-- -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
-- -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
-- -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
-- -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
-- -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
-- -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
-- -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
-- -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
-- -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
-- -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
-- -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
-- -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
-- -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
-- -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
-- -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
-- -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
-- -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
-- -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
-- -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
-- -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
-- -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
-- -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
-- -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
-- -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
-- -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
-- -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
-- -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
-- -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
-- -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
-- -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
-- -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
-- -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
-- -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
-- -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
-- -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
-- -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
-- -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
-- -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
-- -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
-- -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
-+ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
-+ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
-+ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
-+ -e 's|@''GNULIB_FGETC''@|$(GNULIB_FGETC)|g' \
-+ -e 's|@''GNULIB_FGETS''@|$(GNULIB_FGETS)|g' \
-+ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
-+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
-+ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
-+ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
-+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
-+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
-+ -e 's|@''GNULIB_FREAD''@|$(GNULIB_FREAD)|g' \
-+ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
-+ -e 's|@''GNULIB_FSCANF''@|$(GNULIB_FSCANF)|g' \
-+ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
-+ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
-+ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
-+ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
-+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
-+ -e 's|@''GNULIB_GETC''@|$(GNULIB_GETC)|g' \
-+ -e 's|@''GNULIB_GETCHAR''@|$(GNULIB_GETCHAR)|g' \
-+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
-+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
-+ -e 's|@''GNULIB_GETS''@|$(GNULIB_GETS)|g' \
-+ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
-+ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
-+ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
-+ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
-+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
-+ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
-+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
-+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
-+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
-+ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
-+ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
-+ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
-+ -e 's|@''GNULIB_SCANF''@|$(GNULIB_SCANF)|g' \
-+ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
-+ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
-+ -e 's|@''GNULIB_STDIO_H_NONBLOCKING''@|$(GNULIB_STDIO_H_NONBLOCKING)|g' \
-+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
-+ -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
-+ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
-+ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
-+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
-+ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
-+ -e 's|@''GNULIB_VFSCANF''@|$(GNULIB_VFSCANF)|g' \
-+ -e 's|@''GNULIB_VSCANF''@|$(GNULIB_VSCANF)|g' \
-+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
-+ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
-+ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
-+ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
- < $(srcdir)/stdio.in.h | \
- sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
- -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
-@@ -691,43 +650,41 @@ BUILT_SOURCES += stdlib.h
-
- # We need the following in order to create <stdlib.h> when the system
- # doesn't have one that works with the given compiler.
--stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-- $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-+stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-- -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
-- -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
-- -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
-- -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
-- -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
-- -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
-- -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
-- -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
-- -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
-- -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
-- -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
-- -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
-- -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
-- -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
-- -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
-- -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
-- -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
-- -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
-- -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
-- -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
-- -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
-- -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
-- -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
-- -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
-- -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
-- -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
-- -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
-- -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
-+ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
-+ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
-+ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
-+ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
-+ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
-+ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
-+ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
-+ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-+ -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
-+ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-+ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
-+ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
-+ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
-+ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
-+ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
-+ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-+ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
-+ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
-+ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
-+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
-+ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
-+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
-+ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
-+ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
-+ -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
-+ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
-+ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-+ -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
- < $(srcdir)/stdlib.in.h | \
- sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
- -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
-@@ -766,7 +723,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
- -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
- -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-- -e '/definition of _Noreturn/r $(_NORETURN_H)' \
- -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
- } > $@-t && \
-@@ -793,15 +749,6 @@ EXTRA_libicrt_a_SOURCES += strerror.c
-
- ## end gnulib module strerror
-
--## begin gnulib module strerror-override
--
--
--EXTRA_DIST += strerror-override.c strerror-override.h
--
--EXTRA_libicrt_a_SOURCES += strerror-override.c
--
--## end gnulib module strerror-override
--
- ## begin gnulib module string
-
- BUILT_SOURCES += string.h
-@@ -811,52 +758,47 @@ BUILT_SOURCES += string.h
- string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-- -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-- -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-- -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-- -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-- -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-- -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-- -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-- -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-- -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-- -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-- -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-- -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-- -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-- -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-- -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-- -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-- -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-- -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-- -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-- -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-- -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-- -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-- -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-- -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-- -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-- -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-- -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-- -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-- -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-- -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-- -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-- -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-- -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-- -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-- -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-- -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-- -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
-+ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
-+ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
-+ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
-+ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
-+ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
-+ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
-+ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
-+ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
-+ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
-+ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
-+ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
-+ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
-+ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
-+ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
-+ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
-+ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
-+ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
-+ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
-+ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
-+ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
-+ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
-+ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
-+ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
-+ -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
-+ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
-+ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
-+ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
-+ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
-+ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
-+ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
-+ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
-+ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
-+ -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
-+ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
-+ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
- < $(srcdir)/string.in.h | \
-- sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-- -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-- -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-+ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
- -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
- -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
- -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-@@ -912,23 +854,22 @@ sys/stat.h: sys_stat.in.h $(top_builddir
- $(AM_V_at)$(MKDIR_P) sys
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
-- -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
-- -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
-- -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
-- -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
-- -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
-- -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
-- -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
-- -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
-- -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
-- -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
-- -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
-- -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
-+ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
-+ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
-+ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
-+ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
-+ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
-+ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
-+ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
-+ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
-+ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
-+ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
-+ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
-+ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
- -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
- -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
- -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
-@@ -971,16 +912,15 @@ BUILT_SOURCES += time.h
- time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
-- -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-- -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
-- -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-- -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-- -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-+ -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
-+ -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
-+ -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
-+ -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
-+ -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
- -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
- -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
- -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-@@ -1013,56 +953,55 @@ BUILT_SOURCES += unistd.h
- unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-- -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-+ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-- -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
-- -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-- -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
-- -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
-- -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
-- -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
-- -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
-- -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
-- -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
-- -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
-- -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
-- -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
-- -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
-- -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
-- -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
-- -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
-- -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-- -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
-- -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-- -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-- -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-- -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
-- -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
-- -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
-- -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
-- -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
-- -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
-- -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
-- -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
-- -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
-- -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
-- -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
-- -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
-- -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
-- -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
-- -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
-- -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-- -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
-- -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
-- -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
-- -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
-- -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
-- -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
-- -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
-+ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-+ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
-+ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
-+ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
-+ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
-+ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
-+ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
-+ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
-+ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
-+ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
-+ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
-+ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
-+ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
-+ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
-+ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
-+ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
-+ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
-+ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-+ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
-+ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
-+ -e 's|@''GNULIB_GROUP_MEMBER''@|$(GNULIB_GROUP_MEMBER)|g' \
-+ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
-+ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
-+ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
-+ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-+ -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
-+ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
-+ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
-+ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
-+ -e 's|@''GNULIB_READ''@|$(GNULIB_READ)|g' \
-+ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
-+ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
-+ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
-+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
-+ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
-+ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
-+ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
-+ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
-+ -e 's|@''GNULIB_UNISTD_H_NONBLOCKING''@|$(GNULIB_UNISTD_H_NONBLOCKING)|g' \
-+ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
-+ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
-+ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
-+ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
-+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
- < $(srcdir)/unistd.in.h | \
- sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
- -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-@@ -1198,6 +1137,25 @@ EXTRA_DIST += verify.h
-
- ## end gnulib module verify
-
-+## begin gnulib module warn-on-use
-+
-+BUILT_SOURCES += warn-on-use.h
-+# The warn-on-use.h that gets inserted into generated .h files is the same as
-+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
-+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
-+ $(AM_V_GEN)rm -f $@-t $@ && \
-+ sed -n -e '/^.ifndef/,$$p' \
-+ < $(top_srcdir)/build-aux/warn-on-use.h \
-+ > $@-t && \
-+ mv $@-t $@
-+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
-+
-+WARN_ON_USE_H=warn-on-use.h
-+
-+EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
-+
-+## end gnulib module warn-on-use
-+
- ## begin gnulib module xalloc
-
- libicrt_a_SOURCES += xalloc.h xmalloc.c xstrdup.c
-diff -Naurp libiconv-1.14.org//srclib/pathmax.h libiconv-1.14/srclib/pathmax.h
---- libiconv-1.14.org//srclib/pathmax.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/pathmax.h 2012-01-08 02:07:40.218484451 -0800
-@@ -19,27 +19,6 @@
- #ifndef _PATHMAX_H
- # define _PATHMAX_H
-
--/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename,
-- including the terminating NUL byte.
-- <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
-- PATH_MAX is not defined on systems which have no limit on filename length,
-- such as GNU/Hurd.
--
-- This file does *not* define PATH_MAX always. Programs that use this file
-- can handle the GNU/Hurd case in several ways:
-- - Either with a package-wide handling, or with a per-file handling,
-- - Either through a
-- #ifdef PATH_MAX
-- or through a fallback like
-- #ifndef PATH_MAX
-- # define PATH_MAX 8192
-- #endif
-- or through a fallback like
-- #ifndef PATH_MAX
-- # define PATH_MAX pathconf ("/", _PC_PATH_MAX)
-- #endif
-- */
--
- # include <unistd.h>
-
- # include <limits.h>
-@@ -48,6 +27,11 @@
- # define _POSIX_PATH_MAX 256
- # endif
-
-+# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF
-+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
-+ : pathconf ("/", _PC_PATH_MAX))
-+# endif
-+
- /* Don't include sys/param.h if it already has been. */
- # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
- # include <sys/param.h>
-@@ -57,13 +41,8 @@
- # define PATH_MAX MAXPATHLEN
- # endif
-
--# ifdef __hpux
--/* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename,
-- *not* including the terminating NUL byte, and is set to 1023.
-- Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is
-- not defined at all any more. */
--# undef PATH_MAX
--# define PATH_MAX 1024
-+# ifndef PATH_MAX
-+# define PATH_MAX _POSIX_PATH_MAX
- # endif
-
- #endif /* _PATHMAX_H */
-diff -Naurp libiconv-1.14.org//srclib/relocwrapper.c libiconv-1.14/srclib/relocwrapper.c
---- libiconv-1.14.org//srclib/relocwrapper.c 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/relocwrapper.c 2012-01-08 02:07:40.282484455 -0800
-@@ -29,6 +29,7 @@
- -> relocatable
- -> setenv
- -> malloca
-+ -> strerror
- -> c-ctype
-
- Macros that need to be set while compiling this file:
-diff -Naurp libiconv-1.14.org//srclib/safe-read.h libiconv-1.14/srclib/safe-read.h
---- libiconv-1.14.org//srclib/safe-read.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/safe-read.h 2012-01-08 02:07:40.298484455 -0800
-@@ -14,19 +14,6 @@
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
--/* Some system calls may be interrupted and fail with errno = EINTR in the
-- following situations:
-- - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user
-- types Ctrl-Z) on some platforms: MacOS X.
-- - The process receives a signal for which a signal handler was installed
-- with sigaction() with an sa_flags field that does not contain
-- SA_RESTART.
-- - The process receives a signal for which a signal handler was installed
-- with signal() and for which no call to siginterrupt(sig,0) was done,
-- on some platforms: AIX, HP-UX, IRIX, OSF/1, Solaris.
--
-- This module provides a wrapper around read() that handles EINTR. */
--
- #include <stddef.h>
-
- #ifdef __cplusplus
-diff -Naurp libiconv-1.14.org//srclib/signal.in.h libiconv-1.14/srclib/signal.in.h
---- libiconv-1.14.org//srclib/signal.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/signal.in.h 2012-01-08 02:07:40.314484456 -0800
-@@ -20,49 +20,21 @@
- #endif
- @PRAGMA_COLUMNS@
-
--#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T)
--/* Special invocation convention:
-- - Inside glibc header files.
-- - On glibc systems we have a sequence of nested includes
-- <signal.h> -> <ucontext.h> -> <signal.h>.
-- In this situation, the functions are not yet declared, therefore we cannot
-- provide the C++ aliases.
-- - On glibc systems with GCC 4.3 we have a sequence of nested includes
-- <csignal> -> </usr/include/signal.h> -> <sys/ucontext.h> -> <signal.h>.
-- In this situation, some of the functions are not yet declared, therefore
-- we cannot provide the C++ aliases. */
-+#if defined __need_sig_atomic_t || defined __need_sigset_t
-+/* Special invocation convention inside glibc header files. */
-
- # @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
-
- #else
- /* Normal invocation convention. */
-
--#ifndef _@GUARD_PREFIX@_SIGNAL_H
--
--#define _GL_ALREADY_INCLUDING_SIGNAL_H
--
--/* Define pid_t, uid_t.
-- Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
-- On Solaris 10, <signal.h> includes <sys/types.h>, which eventually includes
-- us; so include <sys/types.h> now, before the second inclusion guard. */
--#include <sys/types.h>
-+#ifndef _GL_SIGNAL_H
-
- /* The include_next requires a split double-inclusion guard. */
- #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
-
--#undef _GL_ALREADY_INCLUDING_SIGNAL_H
--
--#ifndef _@GUARD_PREFIX@_SIGNAL_H
--#define _@GUARD_PREFIX@_SIGNAL_H
--
--/* MacOS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
-- pthread_sigmask in <pthread.h>, not in <signal.h>.
-- But avoid namespace pollution on glibc systems.*/
--#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
-- && ((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ || defined __sun) \
-- && ! defined __GLIBC__
--# include <pthread.h>
--#endif
-+#ifndef _GL_SIGNAL_H
-+#define _GL_SIGNAL_H
-
- /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
-
-@@ -70,6 +42,10 @@
-
- /* The definition of _GL_WARN_ON_USE is copied here. */
-
-+/* Define pid_t, uid_t.
-+ Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
-+#include <sys/types.h>
-+
- /* On AIX, sig_atomic_t already includes volatile. C99 requires that
- 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
- Hence, redefine this to a non-volatile type as needed. */
-@@ -124,34 +100,6 @@ typedef void (*sighandler_t) (int);
- #endif
-
-
--#if @GNULIB_PTHREAD_SIGMASK@
--# if @REPLACE_PTHREAD_SIGMASK@
--# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
--# undef pthread_sigmask
--# define pthread_sigmask rpl_pthread_sigmask
--# endif
--_GL_FUNCDECL_RPL (pthread_sigmask, int,
-- (int how, const sigset_t *new_mask, sigset_t *old_mask));
--_GL_CXXALIAS_RPL (pthread_sigmask, int,
-- (int how, const sigset_t *new_mask, sigset_t *old_mask));
--# else
--# if !@HAVE_PTHREAD_SIGMASK@
--_GL_FUNCDECL_SYS (pthread_sigmask, int,
-- (int how, const sigset_t *new_mask, sigset_t *old_mask));
--# endif
--_GL_CXXALIAS_SYS (pthread_sigmask, int,
-- (int how, const sigset_t *new_mask, sigset_t *old_mask));
--# endif
--_GL_CXXALIASWARN (pthread_sigmask);
--#elif defined GNULIB_POSIXCHECK
--# undef pthread_sigmask
--# if HAVE_RAW_DECL_PTHREAD_SIGMASK
--_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - "
-- "use gnulib module pthread_sigmask for portability");
--# endif
--#endif
--
--
- #if @GNULIB_SIGPROCMASK@
- # if !@HAVE_POSIX_SIGNALBLOCKING@
-
-@@ -423,6 +371,6 @@ _GL_WARN_ON_USE (sigaction, "sigaction i
- #endif
-
-
--#endif /* _@GUARD_PREFIX@_SIGNAL_H */
--#endif /* _@GUARD_PREFIX@_SIGNAL_H */
-+#endif /* _GL_SIGNAL_H */
-+#endif /* _GL_SIGNAL_H */
- #endif
-diff -Naurp libiconv-1.14.org//srclib/stat.c libiconv-1.14/srclib/stat.c
---- libiconv-1.14.org//srclib/stat.c 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/stat.c 2012-01-08 02:07:40.330484457 -0800
-@@ -38,7 +38,6 @@ orig_stat (const char *filename, struct
- #include <stdbool.h>
- #include <string.h>
- #include "dosname.h"
--#include "verify.h"
-
- /* Store information about NAME into ST. Work around bugs with
- trailing slashes. Mingw has other bugs (such as st_ino always
-@@ -64,12 +63,6 @@ rpl_stat (char const *name, struct stat
- }
- #endif /* REPLACE_FUNC_STAT_FILE */
- #if REPLACE_FUNC_STAT_DIR
-- /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also
-- have a constant PATH_MAX. */
--# ifndef PATH_MAX
--# error "Please port this replacement to your platform"
--# endif
--
- if (result == -1 && errno == ENOENT)
- {
- /* Due to mingw's oddities, there are some directories (like
-@@ -84,7 +77,6 @@ rpl_stat (char const *name, struct stat
- char fixed_name[PATH_MAX + 1] = {0};
- size_t len = strlen (name);
- bool check_dir = false;
-- verify (PATH_MAX <= 4096);
- if (PATH_MAX <= len)
- errno = ENAMETOOLONG;
- else if (len)
-diff -Naurp libiconv-1.14.org//srclib/stddef.in.h libiconv-1.14/srclib/stddef.in.h
---- libiconv-1.14.org//srclib/stddef.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/stddef.in.h 2012-01-08 02:07:40.346484458 -0800
-@@ -38,9 +38,9 @@
- remember if special invocation has ever been used to obtain wint_t,
- in which case we need to clean up NULL yet again. */
-
--# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
-+# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
- # ifdef __need_wint_t
--# undef _@GUARD_PREFIX@_STDDEF_H
-+# undef _GL_STDDEF_H
- # define _GL_STDDEF_WINT_T
- # endif
- # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
-@@ -49,14 +49,14 @@
- #else
- /* Normal invocation convention. */
-
--# ifndef _@GUARD_PREFIX@_STDDEF_H
-+# ifndef _GL_STDDEF_H
-
- /* The include_next requires a split double-inclusion guard. */
-
- # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
-
--# ifndef _@GUARD_PREFIX@_STDDEF_H
--# define _@GUARD_PREFIX@_STDDEF_H
-+# ifndef _GL_STDDEF_H
-+# define _GL_STDDEF_H
-
- /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
- #if @REPLACE_NULL@
-@@ -82,6 +82,6 @@
- # define wchar_t int
- #endif
-
--# endif /* _@GUARD_PREFIX@_STDDEF_H */
--# endif /* _@GUARD_PREFIX@_STDDEF_H */
-+# endif /* _GL_STDDEF_H */
-+# endif /* _GL_STDDEF_H */
- #endif /* __need_XXX */
-diff -Naurp libiconv-1.14.org//srclib/stdint.in.h libiconv-1.14/srclib/stdint.in.h
---- libiconv-1.14.org//srclib/stdint.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/stdint.in.h 2012-01-08 02:07:40.358484458 -0800
-@@ -21,7 +21,7 @@
- * <http://www.opengroup.org/susv3xbd/stdint.h.html>
- */
-
--#ifndef _@GUARD_PREFIX@_STDINT_H
-+#ifndef _GL_STDINT_H
-
- #if __GNUC__ >= 3
- @PRAGMA_SYSTEM_HEADER@
-@@ -52,13 +52,13 @@
- /* Other systems may have an incomplete or buggy <stdint.h>.
- Include it before <inttypes.h>, since any "#include <stdint.h>"
- in <inttypes.h> would reinclude us, skipping our contents because
-- _@GUARD_PREFIX@_STDINT_H is defined.
-+ _GL_STDINT_H is defined.
- The include_next requires a split double-inclusion guard. */
- # @INCLUDE_NEXT@ @NEXT_STDINT_H@
- #endif
-
--#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
--#define _@GUARD_PREFIX@_STDINT_H
-+#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
-+#define _GL_STDINT_H
-
- /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
- IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
-@@ -270,36 +270,26 @@ typedef unsigned long int gl_uintptr_t;
- /* Note: These types are compiler dependent. It may be unwise to use them in
- public header files. */
-
--/* If the system defines INTMAX_MAX, assume that intmax_t works, and
-- similarly for UINTMAX_MAX and uintmax_t. This avoids problems with
-- assuming one type where another is used by the system. */
--
--#ifndef INTMAX_MAX
--# undef INTMAX_C
--# undef intmax_t
--# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-+#undef intmax_t
-+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
- typedef long long int gl_intmax_t;
--# define intmax_t gl_intmax_t
--# elif defined GL_INT64_T
--# define intmax_t int64_t
--# else
-+# define intmax_t gl_intmax_t
-+#elif defined GL_INT64_T
-+# define intmax_t int64_t
-+#else
- typedef long int gl_intmax_t;
--# define intmax_t gl_intmax_t
--# endif
-+# define intmax_t gl_intmax_t
- #endif
-
--#ifndef UINTMAX_MAX
--# undef UINTMAX_C
--# undef uintmax_t
--# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-+#undef uintmax_t
-+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
- typedef unsigned long long int gl_uintmax_t;
--# define uintmax_t gl_uintmax_t
--# elif defined GL_UINT64_T
--# define uintmax_t uint64_t
--# else
-+# define uintmax_t gl_uintmax_t
-+#elif defined GL_UINT64_T
-+# define uintmax_t uint64_t
-+#else
- typedef unsigned long int gl_uintmax_t;
--# define uintmax_t gl_uintmax_t
--# endif
-+# define uintmax_t gl_uintmax_t
- #endif
-
- /* Verify that intmax_t and uintmax_t have the same size. Too much code
-@@ -441,23 +431,21 @@ typedef int _verify_intmax_size[sizeof (
-
- /* 7.18.2.5. Limits of greatest-width integer types */
-
--#ifndef INTMAX_MAX
--# undef INTMAX_MIN
--# ifdef INT64_MAX
--# define INTMAX_MIN INT64_MIN
--# define INTMAX_MAX INT64_MAX
--# else
--# define INTMAX_MIN INT32_MIN
--# define INTMAX_MAX INT32_MAX
--# endif
-+#undef INTMAX_MIN
-+#undef INTMAX_MAX
-+#ifdef INT64_MAX
-+# define INTMAX_MIN INT64_MIN
-+# define INTMAX_MAX INT64_MAX
-+#else
-+# define INTMAX_MIN INT32_MIN
-+# define INTMAX_MAX INT32_MAX
- #endif
-
--#ifndef UINTMAX_MAX
--# ifdef UINT64_MAX
--# define UINTMAX_MAX UINT64_MAX
--# else
--# define UINTMAX_MAX UINT32_MAX
--# endif
-+#undef UINTMAX_MAX
-+#ifdef UINT64_MAX
-+# define UINTMAX_MAX UINT64_MAX
-+#else
-+# define UINTMAX_MAX UINT32_MAX
- #endif
-
- /* 7.18.3. Limits of other integer types */
-@@ -580,27 +568,25 @@ typedef int _verify_intmax_size[sizeof (
-
- /* 7.18.4.2. Macros for greatest-width integer constants */
-
--#ifndef INTMAX_C
--# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
--# define INTMAX_C(x) x##LL
--# elif defined GL_INT64_T
--# define INTMAX_C(x) INT64_C(x)
--# else
--# define INTMAX_C(x) x##L
--# endif
-+#undef INTMAX_C
-+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-+# define INTMAX_C(x) x##LL
-+#elif defined GL_INT64_T
-+# define INTMAX_C(x) INT64_C(x)
-+#else
-+# define INTMAX_C(x) x##L
- #endif
-
--#ifndef UINTMAX_C
--# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
--# define UINTMAX_C(x) x##ULL
--# elif defined GL_UINT64_T
--# define UINTMAX_C(x) UINT64_C(x)
--# else
--# define UINTMAX_C(x) x##UL
--# endif
-+#undef UINTMAX_C
-+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-+# define UINTMAX_C(x) x##ULL
-+#elif defined GL_UINT64_T
-+# define UINTMAX_C(x) UINT64_C(x)
-+#else
-+# define UINTMAX_C(x) x##UL
- #endif
-
- #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
-
--#endif /* _@GUARD_PREFIX@_STDINT_H */
--#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
-+#endif /* _GL_STDINT_H */
-+#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
-diff -Naurp libiconv-1.14.org//srclib/stdio.in.h libiconv-1.14/srclib/stdio.in.h
---- libiconv-1.14.org//srclib/stdio.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/stdio.in.h 2012-01-08 02:07:40.378484459 -0800
-@@ -35,7 +35,7 @@
- #else
- /* Normal invocation convention. */
-
--#ifndef _@GUARD_PREFIX@_STDIO_H
-+#ifndef _GL_STDIO_H
-
- #define _GL_ALREADY_INCLUDING_STDIO_H
-
-@@ -44,8 +44,8 @@
-
- #undef _GL_ALREADY_INCLUDING_STDIO_H
-
--#ifndef _@GUARD_PREFIX@_STDIO_H
--#define _@GUARD_PREFIX@_STDIO_H
-+#ifndef _GL_STDIO_H
-+#define _GL_STDIO_H
-
- /* Get va_list. Needed on many systems, including glibc 2.8. */
- #include <stdarg.h>
-@@ -461,6 +461,25 @@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp
- _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
- # endif
- _GL_CXXALIASWARN (fseeko);
-+# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
-+ /* Provide an fseek function that is consistent with fseeko. */
-+ /* In order to avoid that fseek gets defined as a macro here, the
-+ developer can request the 'fseek' module. */
-+# if !GNULIB_defined_fseek_function
-+# undef fseek
-+# define fseek rpl_fseek
-+static inline int _GL_ARG_NONNULL ((1))
-+rpl_fseek (FILE *fp, long offset, int whence)
-+{
-+# if @REPLACE_FSEEKO@
-+ return rpl_fseeko (fp, offset, whence);
-+# else
-+ return fseeko (fp, offset, whence);
-+# endif
-+}
-+# define GNULIB_defined_fseek_function 1
-+# endif
-+# endif
- #elif defined GNULIB_POSIXCHECK
- # define _GL_FSEEK_WARN /* Category 1, above. */
- # undef fseek
-@@ -520,6 +539,25 @@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *
- _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
- # endif
- _GL_CXXALIASWARN (ftello);
-+# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
-+ /* Provide an ftell function that is consistent with ftello. */
-+ /* In order to avoid that ftell gets defined as a macro here, the
-+ developer can request the 'ftell' module. */
-+# if !GNULIB_defined_ftell_function
-+# undef ftell
-+# define ftell rpl_ftell
-+static inline long _GL_ARG_NONNULL ((1))
-+rpl_ftell (FILE *f)
-+{
-+# if @REPLACE_FTELLO@
-+ return rpl_ftello (f);
-+# else
-+ return ftello (f);
-+# endif
-+}
-+# define GNULIB_defined_ftell_function 1
-+# endif
-+# endif
- #elif defined GNULIB_POSIXCHECK
- # define _GL_FTELL_WARN /* Category 1, above. */
- # undef ftell
-@@ -1307,6 +1345,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is
- #endif
-
-
--#endif /* _@GUARD_PREFIX@_STDIO_H */
--#endif /* _@GUARD_PREFIX@_STDIO_H */
-+#endif /* _GL_STDIO_H */
-+#endif /* _GL_STDIO_H */
- #endif
-diff -Naurp libiconv-1.14.org//srclib/stdlib.in.h libiconv-1.14/srclib/stdlib.in.h
---- libiconv-1.14.org//srclib/stdlib.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/stdlib.in.h 2012-01-08 02:07:40.390484459 -0800
-@@ -28,13 +28,13 @@
- #else
- /* Normal invocation convention. */
-
--#ifndef _@GUARD_PREFIX@_STDLIB_H
-+#ifndef _GL_STDLIB_H
-
- /* The include_next requires a split double-inclusion guard. */
- #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
-
--#ifndef _@GUARD_PREFIX@_STDLIB_H
--#define _@GUARD_PREFIX@_STDLIB_H
-+#ifndef _GL_STDLIB_H
-+#define _GL_STDLIB_H
-
- /* NetBSD 5.0 mis-defines NULL. */
- #include <stddef.h>
-@@ -89,7 +89,11 @@ struct random_data
- # include <unistd.h>
- #endif
-
--/* The definition of _Noreturn is copied here. */
-+#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__
-+# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-+#else
-+# define _GL_ATTRIBUTE_NORETURN
-+#endif
-
- /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
-
-@@ -116,7 +120,7 @@ struct random_data
- /* Terminate the current process with the given return code, without running
- the 'atexit' handlers. */
- # if !@HAVE__EXIT@
--_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
-+_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN);
- # endif
- _GL_CXXALIAS_SYS (_Exit, void, (int status));
- _GL_CXXALIASWARN (_Exit);
-@@ -757,6 +761,6 @@ _GL_CXXALIASWARN (wctomb);
- #endif
-
-
--#endif /* _@GUARD_PREFIX@_STDLIB_H */
--#endif /* _@GUARD_PREFIX@_STDLIB_H */
-+#endif /* _GL_STDLIB_H */
-+#endif /* _GL_STDLIB_H */
- #endif
-diff -Naurp libiconv-1.14.org//srclib/strerror.c libiconv-1.14/srclib/strerror.c
---- libiconv-1.14.org//srclib/strerror.c 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/strerror.c 2012-01-08 02:07:40.406484461 -0800
-@@ -17,54 +17,340 @@
-
- #include <config.h>
-
--/* Specification. */
- #include <string.h>
-
--#include <errno.h>
--#include <stdio.h>
--#include <stdlib.h>
--#include <string.h>
-+#if REPLACE_STRERROR
-+
-+# include <errno.h>
-+# include <stdio.h>
-+
-+# if GNULIB_defined_ESOCK /* native Windows platforms */
-+# if HAVE_WINSOCK2_H
-+# include <winsock2.h>
-+# endif
-+# endif
-
--#include "intprops.h"
--#include "strerror-override.h"
--#include "verify.h"
-+# include "intprops.h"
-
- /* Use the system functions, not the gnulib overrides in this file. */
--#undef sprintf
-+# undef sprintf
-+
-+# undef strerror
-+# if ! HAVE_DECL_STRERROR
-+# define strerror(n) NULL
-+# endif
-
- char *
--strerror (int n)
--#undef strerror
-+rpl_strerror (int n)
- {
-- static char buf[STACKBUF_LEN];
-- size_t len;
-+ char const *msg = NULL;
-+ /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
-+ switch (n)
-+ {
-+# if GNULIB_defined_ETXTBSY
-+ case ETXTBSY:
-+ msg = "Text file busy";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_ESOCK /* native Windows platforms */
-+ /* EWOULDBLOCK is the same as EAGAIN. */
-+ case EINPROGRESS:
-+ msg = "Operation now in progress";
-+ break;
-+ case EALREADY:
-+ msg = "Operation already in progress";
-+ break;
-+ case ENOTSOCK:
-+ msg = "Socket operation on non-socket";
-+ break;
-+ case EDESTADDRREQ:
-+ msg = "Destination address required";
-+ break;
-+ case EMSGSIZE:
-+ msg = "Message too long";
-+ break;
-+ case EPROTOTYPE:
-+ msg = "Protocol wrong type for socket";
-+ break;
-+ case ENOPROTOOPT:
-+ msg = "Protocol not available";
-+ break;
-+ case EPROTONOSUPPORT:
-+ msg = "Protocol not supported";
-+ break;
-+ case ESOCKTNOSUPPORT:
-+ msg = "Socket type not supported";
-+ break;
-+ case EOPNOTSUPP:
-+ msg = "Operation not supported";
-+ break;
-+ case EPFNOSUPPORT:
-+ msg = "Protocol family not supported";
-+ break;
-+ case EAFNOSUPPORT:
-+ msg = "Address family not supported by protocol";
-+ break;
-+ case EADDRINUSE:
-+ msg = "Address already in use";
-+ break;
-+ case EADDRNOTAVAIL:
-+ msg = "Cannot assign requested address";
-+ break;
-+ case ENETDOWN:
-+ msg = "Network is down";
-+ break;
-+ case ENETUNREACH:
-+ msg = "Network is unreachable";
-+ break;
-+ case ENETRESET:
-+ msg = "Network dropped connection on reset";
-+ break;
-+ case ECONNABORTED:
-+ msg = "Software caused connection abort";
-+ break;
-+ case ECONNRESET:
-+ msg = "Connection reset by peer";
-+ break;
-+ case ENOBUFS:
-+ msg = "No buffer space available";
-+ break;
-+ case EISCONN:
-+ msg = "Transport endpoint is already connected";
-+ break;
-+ case ENOTCONN:
-+ msg = "Transport endpoint is not connected";
-+ break;
-+ case ESHUTDOWN:
-+ msg = "Cannot send after transport endpoint shutdown";
-+ break;
-+ case ETOOMANYREFS:
-+ msg = "Too many references: cannot splice";
-+ break;
-+ case ETIMEDOUT:
-+ msg = "Connection timed out";
-+ break;
-+ case ECONNREFUSED:
-+ msg = "Connection refused";
-+ break;
-+ case ELOOP:
-+ msg = "Too many levels of symbolic links";
-+ break;
-+ case EHOSTDOWN:
-+ msg = "Host is down";
-+ break;
-+ case EHOSTUNREACH:
-+ msg = "No route to host";
-+ break;
-+ case EPROCLIM:
-+ msg = "Too many processes";
-+ break;
-+ case EUSERS:
-+ msg = "Too many users";
-+ break;
-+ case EDQUOT:
-+ msg = "Disk quota exceeded";
-+ break;
-+ case ESTALE:
-+ msg = "Stale NFS file handle";
-+ break;
-+ case EREMOTE:
-+ msg = "Object is remote";
-+ break;
-+# if HAVE_WINSOCK2_H
-+ /* WSA_INVALID_HANDLE maps to EBADF */
-+ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
-+ /* WSA_INVALID_PARAMETER maps to EINVAL */
-+ case WSA_OPERATION_ABORTED:
-+ msg = "Overlapped operation aborted";
-+ break;
-+ case WSA_IO_INCOMPLETE:
-+ msg = "Overlapped I/O event object not in signaled state";
-+ break;
-+ case WSA_IO_PENDING:
-+ msg = "Overlapped operations will complete later";
-+ break;
-+ /* WSAEINTR maps to EINTR */
-+ /* WSAEBADF maps to EBADF */
-+ /* WSAEACCES maps to EACCES */
-+ /* WSAEFAULT maps to EFAULT */
-+ /* WSAEINVAL maps to EINVAL */
-+ /* WSAEMFILE maps to EMFILE */
-+ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
-+ /* WSAEINPROGRESS is EINPROGRESS */
-+ /* WSAEALREADY is EALREADY */
-+ /* WSAENOTSOCK is ENOTSOCK */
-+ /* WSAEDESTADDRREQ is EDESTADDRREQ */
-+ /* WSAEMSGSIZE is EMSGSIZE */
-+ /* WSAEPROTOTYPE is EPROTOTYPE */
-+ /* WSAENOPROTOOPT is ENOPROTOOPT */
-+ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
-+ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
-+ /* WSAEOPNOTSUPP is EOPNOTSUPP */
-+ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
-+ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
-+ /* WSAEADDRINUSE is EADDRINUSE */
-+ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
-+ /* WSAENETDOWN is ENETDOWN */
-+ /* WSAENETUNREACH is ENETUNREACH */
-+ /* WSAENETRESET is ENETRESET */
-+ /* WSAECONNABORTED is ECONNABORTED */
-+ /* WSAECONNRESET is ECONNRESET */
-+ /* WSAENOBUFS is ENOBUFS */
-+ /* WSAEISCONN is EISCONN */
-+ /* WSAENOTCONN is ENOTCONN */
-+ /* WSAESHUTDOWN is ESHUTDOWN */
-+ /* WSAETOOMANYREFS is ETOOMANYREFS */
-+ /* WSAETIMEDOUT is ETIMEDOUT */
-+ /* WSAECONNREFUSED is ECONNREFUSED */
-+ /* WSAELOOP is ELOOP */
-+ /* WSAENAMETOOLONG maps to ENAMETOOLONG */
-+ /* WSAEHOSTDOWN is EHOSTDOWN */
-+ /* WSAEHOSTUNREACH is EHOSTUNREACH */
-+ /* WSAENOTEMPTY maps to ENOTEMPTY */
-+ /* WSAEPROCLIM is EPROCLIM */
-+ /* WSAEUSERS is EUSERS */
-+ /* WSAEDQUOT is EDQUOT */
-+ /* WSAESTALE is ESTALE */
-+ /* WSAEREMOTE is EREMOTE */
-+ case WSASYSNOTREADY:
-+ msg = "Network subsystem is unavailable";
-+ break;
-+ case WSAVERNOTSUPPORTED:
-+ msg = "Winsock.dll version out of range";
-+ break;
-+ case WSANOTINITIALISED:
-+ msg = "Successful WSAStartup not yet performed";
-+ break;
-+ case WSAEDISCON:
-+ msg = "Graceful shutdown in progress";
-+ break;
-+ case WSAENOMORE: case WSA_E_NO_MORE:
-+ msg = "No more results";
-+ break;
-+ case WSAECANCELLED: case WSA_E_CANCELLED:
-+ msg = "Call was canceled";
-+ break;
-+ case WSAEINVALIDPROCTABLE:
-+ msg = "Procedure call table is invalid";
-+ break;
-+ case WSAEINVALIDPROVIDER:
-+ msg = "Service provider is invalid";
-+ break;
-+ case WSAEPROVIDERFAILEDINIT:
-+ msg = "Service provider failed to initialize";
-+ break;
-+ case WSASYSCALLFAILURE:
-+ msg = "System call failure";
-+ break;
-+ case WSASERVICE_NOT_FOUND:
-+ msg = "Service not found";
-+ break;
-+ case WSATYPE_NOT_FOUND:
-+ msg = "Class type not found";
-+ break;
-+ case WSAEREFUSED:
-+ msg = "Database query was refused";
-+ break;
-+ case WSAHOST_NOT_FOUND:
-+ msg = "Host not found";
-+ break;
-+ case WSATRY_AGAIN:
-+ msg = "Nonauthoritative host not found";
-+ break;
-+ case WSANO_RECOVERY:
-+ msg = "Nonrecoverable error";
-+ break;
-+ case WSANO_DATA:
-+ msg = "Valid name, no data record of requested type";
-+ break;
-+ /* WSA_QOS_* omitted */
-+# endif
-+# endif
-+
-+# if GNULIB_defined_ENOMSG
-+ case ENOMSG:
-+ msg = "No message of desired type";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_EIDRM
-+ case EIDRM:
-+ msg = "Identifier removed";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_ENOLINK
-+ case ENOLINK:
-+ msg = "Link has been severed";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_EPROTO
-+ case EPROTO:
-+ msg = "Protocol error";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_EMULTIHOP
-+ case EMULTIHOP:
-+ msg = "Multihop attempted";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_EBADMSG
-+ case EBADMSG:
-+ msg = "Bad message";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_EOVERFLOW
-+ case EOVERFLOW:
-+ msg = "Value too large for defined data type";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_ENOTSUP
-+ case ENOTSUP:
-+ msg = "Not supported";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_ESTALE
-+ case ESTALE:
-+ msg = "Stale NFS file handle";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_EDQUOT
-+ case EDQUOT:
-+ msg = "Disk quota exceeded";
-+ break;
-+# endif
-+
-+# if GNULIB_defined_ECANCELED
-+ case ECANCELED:
-+ msg = "Operation canceled";
-+ break;
-+# endif
-+ }
-
-- /* Cast away const, due to the historical signature of strerror;
-- callers should not be modifying the string. */
-- const char *msg = strerror_override (n);
- if (msg)
- return (char *) msg;
-
-- msg = strerror (n);
-+ {
-+ char *result = strerror (n);
-
-- /* Our strerror_r implementation might use the system's strerror
-- buffer, so all other clients of strerror have to see the error
-- copied into a buffer that we manage. This is not thread-safe,
-- even if the system strerror is, but portable programs shouldn't
-- be using strerror if they care about thread-safety. */
-- if (!msg || !*msg)
-- {
-- static char const fmt[] = "Unknown error %d";
-- verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
-- sprintf (buf, fmt, n);
-- errno = EINVAL;
-- return buf;
-- }
-+ if (result == NULL || result[0] == '\0')
-+ {
-+ static char const fmt[] = "Unknown error (%d)";
-+ static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
-+ sprintf (msg_buf, fmt, n);
-+ return msg_buf;
-+ }
-
-- /* Fix STACKBUF_LEN if this ever aborts. */
-- len = strlen (msg);
-- if (sizeof buf <= len)
-- abort ();
--
-- return memcpy (buf, msg, len + 1);
-+ return result;
-+ }
- }
-+
-+#endif
-diff -Naurp libiconv-1.14.org//srclib/strerror-override.c libiconv-1.14/srclib/strerror-override.c
---- libiconv-1.14.org//srclib/strerror-override.c 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/strerror-override.c 1969-12-31 16:00:00.000000000 -0800
-@@ -1,279 +0,0 @@
--/* strerror-override.c --- POSIX compatible system error routine
--
-- Copyright (C) 2010-2011 Free Software Foundation, Inc.
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>. */
--
--/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
--
--#include <config.h>
--
--#include "strerror-override.h"
--
--#include <errno.h>
--
--#if GNULIB_defined_ESOCK /* native Windows platforms */
--# if HAVE_WINSOCK2_H
--# include <winsock2.h>
--# endif
--#endif
--
--/* If ERRNUM maps to an errno value defined by gnulib, return a string
-- describing the error. Otherwise return NULL. */
--const char *
--strerror_override (int errnum)
--{
-- /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
-- switch (errnum)
-- {
--#if REPLACE_STRERROR_0
-- case 0:
-- return "Success";
--#endif
--
--#if GNULIB_defined_ETXTBSY
-- case ETXTBSY:
-- return "Text file busy";
--#endif
--
--#if GNULIB_defined_ESOCK /* native Windows platforms */
-- /* EWOULDBLOCK is the same as EAGAIN. */
-- case EINPROGRESS:
-- return "Operation now in progress";
-- case EALREADY:
-- return "Operation already in progress";
-- case ENOTSOCK:
-- return "Socket operation on non-socket";
-- case EDESTADDRREQ:
-- return "Destination address required";
-- case EMSGSIZE:
-- return "Message too long";
-- case EPROTOTYPE:
-- return "Protocol wrong type for socket";
-- case ENOPROTOOPT:
-- return "Protocol not available";
-- case EPROTONOSUPPORT:
-- return "Protocol not supported";
-- case ESOCKTNOSUPPORT:
-- return "Socket type not supported";
-- case EOPNOTSUPP:
-- return "Operation not supported";
-- case EPFNOSUPPORT:
-- return "Protocol family not supported";
-- case EAFNOSUPPORT:
-- return "Address family not supported by protocol";
-- case EADDRINUSE:
-- return "Address already in use";
-- case EADDRNOTAVAIL:
-- return "Cannot assign requested address";
-- case ENETDOWN:
-- return "Network is down";
-- case ENETUNREACH:
-- return "Network is unreachable";
-- case ENETRESET:
-- return "Network dropped connection on reset";
-- case ECONNABORTED:
-- return "Software caused connection abort";
-- case ECONNRESET:
-- return "Connection reset by peer";
-- case ENOBUFS:
-- return "No buffer space available";
-- case EISCONN:
-- return "Transport endpoint is already connected";
-- case ENOTCONN:
-- return "Transport endpoint is not connected";
-- case ESHUTDOWN:
-- return "Cannot send after transport endpoint shutdown";
-- case ETOOMANYREFS:
-- return "Too many references: cannot splice";
-- case ETIMEDOUT:
-- return "Connection timed out";
-- case ECONNREFUSED:
-- return "Connection refused";
-- case ELOOP:
-- return "Too many levels of symbolic links";
-- case EHOSTDOWN:
-- return "Host is down";
-- case EHOSTUNREACH:
-- return "No route to host";
-- case EPROCLIM:
-- return "Too many processes";
-- case EUSERS:
-- return "Too many users";
-- case EDQUOT:
-- return "Disk quota exceeded";
-- case ESTALE:
-- return "Stale NFS file handle";
-- case EREMOTE:
-- return "Object is remote";
--# if HAVE_WINSOCK2_H
-- /* WSA_INVALID_HANDLE maps to EBADF */
-- /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
-- /* WSA_INVALID_PARAMETER maps to EINVAL */
-- case WSA_OPERATION_ABORTED:
-- return "Overlapped operation aborted";
-- case WSA_IO_INCOMPLETE:
-- return "Overlapped I/O event object not in signaled state";
-- case WSA_IO_PENDING:
-- return "Overlapped operations will complete later";
-- /* WSAEINTR maps to EINTR */
-- /* WSAEBADF maps to EBADF */
-- /* WSAEACCES maps to EACCES */
-- /* WSAEFAULT maps to EFAULT */
-- /* WSAEINVAL maps to EINVAL */
-- /* WSAEMFILE maps to EMFILE */
-- /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
-- /* WSAEINPROGRESS is EINPROGRESS */
-- /* WSAEALREADY is EALREADY */
-- /* WSAENOTSOCK is ENOTSOCK */
-- /* WSAEDESTADDRREQ is EDESTADDRREQ */
-- /* WSAEMSGSIZE is EMSGSIZE */
-- /* WSAEPROTOTYPE is EPROTOTYPE */
-- /* WSAENOPROTOOPT is ENOPROTOOPT */
-- /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
-- /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
-- /* WSAEOPNOTSUPP is EOPNOTSUPP */
-- /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
-- /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
-- /* WSAEADDRINUSE is EADDRINUSE */
-- /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
-- /* WSAENETDOWN is ENETDOWN */
-- /* WSAENETUNREACH is ENETUNREACH */
-- /* WSAENETRESET is ENETRESET */
-- /* WSAECONNABORTED is ECONNABORTED */
-- /* WSAECONNRESET is ECONNRESET */
-- /* WSAENOBUFS is ENOBUFS */
-- /* WSAEISCONN is EISCONN */
-- /* WSAENOTCONN is ENOTCONN */
-- /* WSAESHUTDOWN is ESHUTDOWN */
-- /* WSAETOOMANYREFS is ETOOMANYREFS */
-- /* WSAETIMEDOUT is ETIMEDOUT */
-- /* WSAECONNREFUSED is ECONNREFUSED */
-- /* WSAELOOP is ELOOP */
-- /* WSAENAMETOOLONG maps to ENAMETOOLONG */
-- /* WSAEHOSTDOWN is EHOSTDOWN */
-- /* WSAEHOSTUNREACH is EHOSTUNREACH */
-- /* WSAENOTEMPTY maps to ENOTEMPTY */
-- /* WSAEPROCLIM is EPROCLIM */
-- /* WSAEUSERS is EUSERS */
-- /* WSAEDQUOT is EDQUOT */
-- /* WSAESTALE is ESTALE */
-- /* WSAEREMOTE is EREMOTE */
-- case WSASYSNOTREADY:
-- return "Network subsystem is unavailable";
-- case WSAVERNOTSUPPORTED:
-- return "Winsock.dll version out of range";
-- case WSANOTINITIALISED:
-- return "Successful WSAStartup not yet performed";
-- case WSAEDISCON:
-- return "Graceful shutdown in progress";
-- case WSAENOMORE: case WSA_E_NO_MORE:
-- return "No more results";
-- case WSAECANCELLED: case WSA_E_CANCELLED:
-- return "Call was canceled";
-- case WSAEINVALIDPROCTABLE:
-- return "Procedure call table is invalid";
-- case WSAEINVALIDPROVIDER:
-- return "Service provider is invalid";
-- case WSAEPROVIDERFAILEDINIT:
-- return "Service provider failed to initialize";
-- case WSASYSCALLFAILURE:
-- return "System call failure";
-- case WSASERVICE_NOT_FOUND:
-- return "Service not found";
-- case WSATYPE_NOT_FOUND:
-- return "Class type not found";
-- case WSAEREFUSED:
-- return "Database query was refused";
-- case WSAHOST_NOT_FOUND:
-- return "Host not found";
-- case WSATRY_AGAIN:
-- return "Nonauthoritative host not found";
-- case WSANO_RECOVERY:
-- return "Nonrecoverable error";
-- case WSANO_DATA:
-- return "Valid name, no data record of requested type";
-- /* WSA_QOS_* omitted */
--# endif
--#endif
--
--#if GNULIB_defined_ENOMSG
-- case ENOMSG:
-- return "No message of desired type";
--#endif
--
--#if GNULIB_defined_EIDRM
-- case EIDRM:
-- return "Identifier removed";
--#endif
--
--#if GNULIB_defined_ENOLINK
-- case ENOLINK:
-- return "Link has been severed";
--#endif
--
--#if GNULIB_defined_EPROTO
-- case EPROTO:
-- return "Protocol error";
--#endif
--
--#if GNULIB_defined_EMULTIHOP
-- case EMULTIHOP:
-- return "Multihop attempted";
--#endif
--
--#if GNULIB_defined_EBADMSG
-- case EBADMSG:
-- return "Bad message";
--#endif
--
--#if GNULIB_defined_EOVERFLOW
-- case EOVERFLOW:
-- return "Value too large for defined data type";
--#endif
--
--#if GNULIB_defined_ENOTSUP
-- case ENOTSUP:
-- return "Not supported";
--#endif
--
--#if GNULIB_defined_ENETRESET
-- case ENETRESET:
-- return "Network dropped connection on reset";
--#endif
--
--#if GNULIB_defined_ECONNABORTED
-- case ECONNABORTED:
-- return "Software caused connection abort";
--#endif
--
--#if GNULIB_defined_ESTALE
-- case ESTALE:
-- return "Stale NFS file handle";
--#endif
--
--#if GNULIB_defined_EDQUOT
-- case EDQUOT:
-- return "Disk quota exceeded";
--#endif
--
--#if GNULIB_defined_ECANCELED
-- case ECANCELED:
-- return "Operation canceled";
--#endif
--
-- default:
-- return NULL;
-- }
--}
-diff -Naurp libiconv-1.14.org//srclib/strerror-override.h libiconv-1.14/srclib/strerror-override.h
---- libiconv-1.14.org//srclib/strerror-override.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/strerror-override.h 1969-12-31 16:00:00.000000000 -0800
-@@ -1,52 +0,0 @@
--/* strerror-override.h --- POSIX compatible system error routine
--
-- Copyright (C) 2010-2011 Free Software Foundation, Inc.
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>. */
--
--#ifndef _GL_STRERROR_OVERRIDE_H
--# define _GL_STRERROR_OVERRIDE_H
--
--# include <errno.h>
--# include <stddef.h>
--
--/* Reasonable buffer size that should never trigger ERANGE; if this
-- proves too small, we intentionally abort(), to remind us to fix
-- this value. */
--# define STACKBUF_LEN 256
--
--/* If ERRNUM maps to an errno value defined by gnulib, return a string
-- describing the error. Otherwise return NULL. */
--# if REPLACE_STRERROR_0 \
-- || GNULIB_defined_ETXTBSY \
-- || GNULIB_defined_ESOCK \
-- || GNULIB_defined_ENOMSG \
-- || GNULIB_defined_EIDRM \
-- || GNULIB_defined_ENOLINK \
-- || GNULIB_defined_EPROTO \
-- || GNULIB_defined_EMULTIHOP \
-- || GNULIB_defined_EBADMSG \
-- || GNULIB_defined_EOVERFLOW \
-- || GNULIB_defined_ENOTSUP \
-- || GNULIB_defined_ENETRESET \
-- || GNULIB_defined_ECONNABORTED \
-- || GNULIB_defined_ESTALE \
-- || GNULIB_defined_EDQUOT \
-- || GNULIB_defined_ECANCELED
--extern const char *strerror_override (int errnum);
--# else
--# define strerror_override(ignored) NULL
--# endif
--
--#endif /* _GL_STRERROR_OVERRIDE_H */
-diff -Naurp libiconv-1.14.org//srclib/string.in.h libiconv-1.14/srclib/string.in.h
---- libiconv-1.14.org//srclib/string.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/string.in.h 2012-01-08 02:07:40.418484461 -0800
-@@ -16,7 +16,7 @@
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
--#ifndef _@GUARD_PREFIX@_STRING_H
-+#ifndef _GL_STRING_H
-
- #if __GNUC__ >= 3
- @PRAGMA_SYSTEM_HEADER@
-@@ -26,8 +26,8 @@
- /* The include_next requires a split double-inclusion guard. */
- #@INCLUDE_NEXT@ @NEXT_STRING_H@
-
--#ifndef _@GUARD_PREFIX@_STRING_H
--#define _@GUARD_PREFIX@_STRING_H
-+#ifndef _GL_STRING_H
-+#define _GL_STRING_H
-
- /* NetBSD 5.0 mis-defines NULL. */
- #include <stddef.h>
-@@ -59,36 +59,6 @@
- /* The definition of _GL_WARN_ON_USE is copied here. */
-
-
--/* Find the index of the least-significant set bit. */
--#if @GNULIB_FFSL@
--# if !@HAVE_FFSL@
--_GL_FUNCDECL_SYS (ffsl, int, (long int i));
--# endif
--_GL_CXXALIAS_SYS (ffsl, int, (long int i));
--_GL_CXXALIASWARN (ffsl);
--#elif defined GNULIB_POSIXCHECK
--# undef ffsl
--# if HAVE_RAW_DECL_FFSL
--_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
--# endif
--#endif
--
--
--/* Find the index of the least-significant set bit. */
--#if @GNULIB_FFSLL@
--# if !@HAVE_FFSLL@
--_GL_FUNCDECL_SYS (ffsll, int, (long long int i));
--# endif
--_GL_CXXALIAS_SYS (ffsll, int, (long long int i));
--_GL_CXXALIASWARN (ffsll);
--#elif defined GNULIB_POSIXCHECK
--# undef ffsll
--# if HAVE_RAW_DECL_FFSLL
--_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
--# endif
--#endif
--
--
- /* Return the first instance of C within N bytes of S, or NULL. */
- #if @GNULIB_MEMCHR@
- # if @REPLACE_MEMCHR@
-@@ -1007,5 +977,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp
- #endif
-
-
--#endif /* _@GUARD_PREFIX@_STRING_H */
--#endif /* _@GUARD_PREFIX@_STRING_H */
-+#endif /* _GL_STRING_H */
-+#endif /* _GL_STRING_H */
-diff -Naurp libiconv-1.14.org//srclib/sys_stat.in.h libiconv-1.14/srclib/sys_stat.in.h
---- libiconv-1.14.org//srclib/sys_stat.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/sys_stat.in.h 2012-01-08 02:07:40.430484461 -0800
-@@ -34,7 +34,7 @@
- #else
- /* Normal invocation convention. */
-
--#ifndef _@GUARD_PREFIX@_SYS_STAT_H
-+#ifndef _GL_SYS_STAT_H
-
- /* Get nlink_t. */
- #include <sys/types.h>
-@@ -45,8 +45,8 @@
- /* The include_next requires a split double-inclusion guard. */
- #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
-
--#ifndef _@GUARD_PREFIX@_SYS_STAT_H
--#define _@GUARD_PREFIX@_SYS_STAT_H
-+#ifndef _GL_SYS_STAT_H
-+#define _GL_SYS_STAT_H
-
- /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
-
-@@ -653,6 +653,6 @@ _GL_WARN_ON_USE (utimensat, "utimensat i
- #endif
-
-
--#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
--#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
-+#endif /* _GL_SYS_STAT_H */
-+#endif /* _GL_SYS_STAT_H */
- #endif
-diff -Naurp libiconv-1.14.org//srclib/time.in.h libiconv-1.14/srclib/time.in.h
---- libiconv-1.14.org//srclib/time.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/time.in.h 2012-01-08 02:07:40.438484462 -0800
-@@ -28,13 +28,13 @@
- without adding our own declarations. */
- #if (defined __need_time_t || defined __need_clock_t \
- || defined __need_timespec \
-- || defined _@GUARD_PREFIX@_TIME_H)
-+ || defined _GL_TIME_H)
-
- # @INCLUDE_NEXT@ @NEXT_TIME_H@
-
- #else
-
--# define _@GUARD_PREFIX@_TIME_H
-+# define _GL_TIME_H
-
- # @INCLUDE_NEXT@ @NEXT_TIME_H@
-
-diff -Naurp libiconv-1.14.org//srclib/unistd.in.h libiconv-1.14/srclib/unistd.in.h
---- libiconv-1.14.org//srclib/unistd.in.h 2011-08-07 06:42:06.000000000 -0700
-+++ libiconv-1.14/srclib/unistd.in.h 2012-01-08 02:07:40.450484462 -0800
-@@ -36,7 +36,7 @@
- # define _GL_WINSOCK2_H_WITNESS
-
- /* Normal invocation. */
--#elif !defined _@GUARD_PREFIX@_UNISTD_H
-+#elif !defined _GL_UNISTD_H
-
- /* The include_next requires a split double-inclusion guard. */
- #if @HAVE_UNISTD_H@
-@@ -51,8 +51,8 @@
- # undef _GL_INCLUDING_WINSOCK2_H
- #endif
-
--#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
--#define _@GUARD_PREFIX@_UNISTD_H
-+#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
-+#define _GL_UNISTD_H
-
- /* NetBSD 5.0 mis-defines NULL. Also get size_t. */
- #include <stddef.h>
-@@ -117,77 +117,78 @@
- /* The definition of _GL_WARN_ON_USE is copied here. */
-
-
--/* Hide some function declarations from <winsock2.h>. */
--
--#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
--# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
--# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
--# undef socket
--# define socket socket_used_without_including_sys_socket_h
--# undef connect
--# define connect connect_used_without_including_sys_socket_h
--# undef accept
--# define accept accept_used_without_including_sys_socket_h
--# undef bind
--# define bind bind_used_without_including_sys_socket_h
--# undef getpeername
--# define getpeername getpeername_used_without_including_sys_socket_h
--# undef getsockname
--# define getsockname getsockname_used_without_including_sys_socket_h
--# undef getsockopt
--# define getsockopt getsockopt_used_without_including_sys_socket_h
--# undef listen
--# define listen listen_used_without_including_sys_socket_h
--# undef recv
--# define recv recv_used_without_including_sys_socket_h
--# undef send
--# define send send_used_without_including_sys_socket_h
--# undef recvfrom
--# define recvfrom recvfrom_used_without_including_sys_socket_h
--# undef sendto
--# define sendto sendto_used_without_including_sys_socket_h
--# undef setsockopt
--# define setsockopt setsockopt_used_without_including_sys_socket_h
--# undef shutdown
--# define shutdown shutdown_used_without_including_sys_socket_h
--# else
-- _GL_WARN_ON_USE (socket,
-- "socket() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (connect,
-- "connect() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (accept,
-- "accept() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (bind,
-- "bind() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (getpeername,
-- "getpeername() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (getsockname,
-- "getsockname() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (getsockopt,
-- "getsockopt() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (listen,
-- "listen() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (recv,
-- "recv() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (send,
-- "send() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (recvfrom,
-- "recvfrom() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (sendto,
-- "sendto() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (setsockopt,
-- "setsockopt() used without including <sys/socket.h>");
-- _GL_WARN_ON_USE (shutdown,
-- "shutdown() used without including <sys/socket.h>");
-+#if @GNULIB_GETHOSTNAME@
-+/* Get all possible declarations of gethostname(). */
-+# if @UNISTD_H_HAVE_WINSOCK2_H@
-+# if !defined _GL_SYS_SOCKET_H
-+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-+# undef socket
-+# define socket socket_used_without_including_sys_socket_h
-+# undef connect
-+# define connect connect_used_without_including_sys_socket_h
-+# undef accept
-+# define accept accept_used_without_including_sys_socket_h
-+# undef bind
-+# define bind bind_used_without_including_sys_socket_h
-+# undef getpeername
-+# define getpeername getpeername_used_without_including_sys_socket_h
-+# undef getsockname
-+# define getsockname getsockname_used_without_including_sys_socket_h
-+# undef getsockopt
-+# define getsockopt getsockopt_used_without_including_sys_socket_h
-+# undef listen
-+# define listen listen_used_without_including_sys_socket_h
-+# undef recv
-+# define recv recv_used_without_including_sys_socket_h
-+# undef send
-+# define send send_used_without_including_sys_socket_h
-+# undef recvfrom
-+# define recvfrom recvfrom_used_without_including_sys_socket_h
-+# undef sendto
-+# define sendto sendto_used_without_including_sys_socket_h
-+# undef setsockopt
-+# define setsockopt setsockopt_used_without_including_sys_socket_h
-+# undef shutdown
-+# define shutdown shutdown_used_without_including_sys_socket_h
-+# else
-+ _GL_WARN_ON_USE (socket,
-+ "socket() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (connect,
-+ "connect() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (accept,
-+ "accept() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (bind,
-+ "bind() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (getpeername,
-+ "getpeername() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (getsockname,
-+ "getsockname() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (getsockopt,
-+ "getsockopt() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (listen,
-+ "listen() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (recv,
-+ "recv() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (send,
-+ "send() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (recvfrom,
-+ "recvfrom() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (sendto,
-+ "sendto() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (setsockopt,
-+ "setsockopt() used without including <sys/socket.h>");
-+ _GL_WARN_ON_USE (shutdown,
-+ "shutdown() used without including <sys/socket.h>");
-+# endif
- # endif
--# endif
--# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
--# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
--# undef select
--# define select select_used_without_including_sys_select_h
--# else
-- _GL_WARN_ON_USE (select,
-- "select() used without including <sys/select.h>");
-+# if !defined _GL_SYS_SELECT_H
-+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-+# undef select
-+# define select select_used_without_including_sys_select_h
-+# else
-+ _GL_WARN_ON_USE (select,
-+ "select() used without including <sys/select.h>");
-+# endif
- # endif
- # endif
- #endif
-@@ -1061,7 +1062,6 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unport
- specification <http://www.opengroup.org/susv3xsh/pread.html>. */
- # if @REPLACE_PREAD@
- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
--# undef pread
- # define pread rpl_pread
- # endif
- _GL_FUNCDECL_RPL (pread, ssize_t,
-@@ -1096,7 +1096,6 @@ _GL_WARN_ON_USE (pread, "pread is unport
- <http://www.opengroup.org/susv3xsh/pwrite.html>. */
- # if @REPLACE_PWRITE@
- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
--# undef pwrite
- # define pwrite rpl_pwrite
- # endif
- _GL_FUNCDECL_RPL (pwrite, ssize_t,
-@@ -1417,5 +1416,5 @@ _GL_CXXALIASWARN (write);
- #endif
-
-
--#endif /* _@GUARD_PREFIX@_UNISTD_H */
--#endif /* _@GUARD_PREFIX@_UNISTD_H */
-+#endif /* _GL_UNISTD_H */
-+#endif /* _GL_UNISTD_H */
-diff -Naurp libiconv-1.14.org//srclib/verify.h libiconv-1.14/srclib/verify.h
---- libiconv-1.14.org//srclib/verify.h 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srclib/verify.h 2012-01-08 02:07:40.494484464 -0800
-@@ -164,13 +164,10 @@
- (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
-
- # ifdef __cplusplus
--# if !GNULIB_defined_struct__gl_verify_type
- template <int w>
- struct _gl_verify_type {
- unsigned int _gl_verify_error_if_negative: w;
- };
--# define GNULIB_defined_struct__gl_verify_type 1
--# endif
- # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
- _gl_verify_type<(R) ? 1 : -1>
- # elif defined _GL_HAVE__STATIC_ASSERT
-@@ -209,7 +206,7 @@ template <int w>
- # endif
- # endif
-
--/* @assert.h omit start@ */
-+# ifdef _GL_VERIFY_H
-
- /* Each of these macros verifies that its argument R is nonzero. To
- be portable, R should be an integer constant expression. Unlike
-@@ -221,23 +218,15 @@ template <int w>
- contexts, e.g., the top level. */
-
- /* Verify requirement R at compile-time, as an integer constant expression.
-- Return 1. This is equivalent to verify_expr (R, 1).
--
-- verify_true is obsolescent; please use verify_expr instead. */
--
--# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
-+ Return 1. */
-
--/* Verify requirement R at compile-time. Return the value of the
-- expression E. */
--
--# define verify_expr(R, E) \
-- (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
-+# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
-
- /* Verify requirement R at compile-time, as a declaration without a
- trailing ';'. */
-
--# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
-+# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
-
--/* @assert.h omit end@ */
-+# endif
-
- #endif
-diff -Naurp libiconv-1.14.org//srcm4/canonicalize.m4 libiconv-1.14/srcm4/canonicalize.m4
---- libiconv-1.14.org//srcm4/canonicalize.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/canonicalize.m4 2012-01-08 02:07:40.566484469 -0800
-@@ -1,4 +1,4 @@
--# canonicalize.m4 serial 23
-+# canonicalize.m4 serial 21
-
- dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
-
-@@ -10,6 +10,8 @@ dnl with or without modifications, as lo
- # not provide or fix realpath.
- AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
- [
-+ AC_LIBOBJ([canonicalize])
-+
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
- AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
-@@ -28,14 +30,16 @@ AC_DEFUN([gl_CANONICALIZE_LGPL],
- AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE])
- if test $ac_cv_func_canonicalize_file_name = no; then
- HAVE_CANONICALIZE_FILE_NAME=0
-+ AC_LIBOBJ([canonicalize-lgpl])
- if test $ac_cv_func_realpath = no; then
- HAVE_REALPATH=0
- elif test "$gl_cv_func_realpath_works" != yes; then
- REPLACE_REALPATH=1
- fi
- elif test "$gl_cv_func_realpath_works" != yes; then
-- REPLACE_CANONICALIZE_FILE_NAME=1
-+ AC_LIBOBJ([canonicalize-lgpl])
- REPLACE_REALPATH=1
-+ REPLACE_CANONICALIZE_FILE_NAME=1
- fi
- ])
-
-diff -Naurp libiconv-1.14.org//srcm4/errno_h.m4 libiconv-1.14/srcm4/errno_h.m4
---- libiconv-1.14.org//srcm4/errno_h.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/errno_h.m4 2012-01-08 02:07:40.590484469 -0800
-@@ -1,4 +1,4 @@
--# errno_h.m4 serial 10
-+# errno_h.m4 serial 9
- dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -34,12 +34,6 @@ booboo
- #if !defined ENOTSUP
- booboo
- #endif
--#if !defined ENETRESET
--booboo
--#endif
--#if !defined ECONNABORTED
--booboo
--#endif
- #if !defined ESTALE
- booboo
- #endif
-diff -Naurp libiconv-1.14.org//srcm4/error.m4 libiconv-1.14/srcm4/error.m4
---- libiconv-1.14.org//srcm4/error.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/error.m4 2012-01-08 02:07:40.598484470 -0800
-@@ -1,4 +1,4 @@
--#serial 14
-+#serial 13
-
- # Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc.
- #
-@@ -8,8 +8,16 @@
-
- AC_DEFUN([gl_ERROR],
- [
-- dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
-- dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
-+ AC_FUNC_ERROR_AT_LINE
-+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
-+ gl_PREREQ_ERROR
-+])
-+
-+# Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in
-+# Autoconf.
-+AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
-+[
-+ AC_LIBSOURCES([error.h, error.c])dnl
- AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
-@@ -17,6 +25,9 @@ AC_DEFUN([gl_ERROR],
- [[error_at_line (0, 0, "", 0, "an error occurred");]])],
- [ac_cv_lib_error_at_line=yes],
- [ac_cv_lib_error_at_line=no])])
-+ if test $ac_cv_lib_error_at_line = no; then
-+ AC_LIBOBJ([error])
-+ fi
- ])
-
- # Prerequisites of lib/error.c.
-diff -Naurp libiconv-1.14.org//srcm4/extensions.m4 libiconv-1.14/srcm4/extensions.m4
---- libiconv-1.14.org//srcm4/extensions.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/extensions.m4 2012-01-08 02:07:40.606484471 -0800
-@@ -1,4 +1,4 @@
--# serial 10 -*- Autoconf -*-
-+# serial 9 -*- Autoconf -*-
- # Enable extensions on systems that normally disable them.
-
- # Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
-@@ -67,10 +67,6 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
- #ifndef _ALL_SOURCE
- # undef _ALL_SOURCE
- #endif
--/* Enable general extensions on MacOS X. */
--#ifndef _DARWIN_C_SOURCE
--# undef _DARWIN_C_SOURCE
--#endif
- /* Enable GNU extensions on systems that have them. */
- #ifndef _GNU_SOURCE
- # undef _GNU_SOURCE
-@@ -99,7 +95,6 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
- test $ac_cv_safe_to_define___extensions__ = yes &&
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_ALL_SOURCE])
-- AC_DEFINE([_DARWIN_C_SOURCE])
- AC_DEFINE([_GNU_SOURCE])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
-diff -Naurp libiconv-1.14.org//srcm4/gnulib-cache.m4 libiconv-1.14/srcm4/gnulib-cache.m4
---- libiconv-1.14.org//srcm4/gnulib-cache.m4 2011-08-07 06:42:11.000000000 -0700
-+++ libiconv-1.14/srcm4/gnulib-cache.m4 2012-01-08 02:07:43.154484593 -0800
-@@ -15,7 +15,7 @@
-
-
- # Specification in the form of a command-line invocation:
--# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
-+# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
-
- # Specification in the form of a few gnulib-tool.m4 macro invocations:
- gl_LOCAL_DIR([gnulib-local])
-@@ -28,6 +28,7 @@ gl_MODULES([
- mbstate
- memmove
- progname
-+ relocatable
- relocatable-prog
- safe-read
- sigpipe
-@@ -49,5 +50,4 @@ gl_LIB([libicrt])
- gl_MAKEFILE_NAME([Makefile.gnulib])
- gl_MACRO_PREFIX([gl])
- gl_PO_DOMAIN([])
--gl_WITNESS_C_DOMAIN([])
- gl_VC_FILES([false])
-diff -Naurp libiconv-1.14.org//srcm4/gnulib-common.m4 libiconv-1.14/srcm4/gnulib-common.m4
---- libiconv-1.14.org//srcm4/gnulib-common.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/gnulib-common.m4 2012-01-08 02:07:40.634484471 -0800
-@@ -1,4 +1,4 @@
--# gnulib-common.m4 serial 29
-+# gnulib-common.m4 serial 24
- dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -12,19 +12,6 @@ AC_DEFUN([gl_COMMON], [
- AC_REQUIRE([gl_COMMON_BODY])
- ])
- AC_DEFUN([gl_COMMON_BODY], [
-- AH_VERBATIM([_Noreturn],
--[/* The _Noreturn keyword of draft C1X. */
--#ifndef _Noreturn
--# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
-- || 0x5110 <= __SUNPRO_C)
--# define _Noreturn __attribute__ ((__noreturn__))
--# elif 1200 <= _MSC_VER
--# define _Noreturn __declspec (noreturn)
--# else
--# define _Noreturn
--# endif
--#endif
--])
- AH_VERBATIM([isoc99_inline],
- [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
- the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
-@@ -47,20 +34,6 @@ AC_DEFUN([gl_COMMON_BODY], [
- /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
- is a misnomer outside of parameter lists. */
- #define _UNUSED_PARAMETER_ _GL_UNUSED
--
--/* The __pure__ attribute was added in gcc 2.96. */
--#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
--# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
--#else
--# define _GL_ATTRIBUTE_PURE /* empty */
--#endif
--
--/* The __const__ attribute was added in gcc 2.95. */
--#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
--# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
--#else
--# define _GL_ATTRIBUTE_CONST /* empty */
--#endif
- ])
- dnl Preparation for running test programs:
- dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
-@@ -74,49 +47,16 @@ AC_DEFUN([gl_COMMON_BODY], [
- # expands to a C preprocessor expression that evaluates to 1 or 0, depending
- # whether a gnulib module that has been requested shall be considered present
- # or not.
--m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
-+AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
-
- # gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
- # sets the shell variable that indicates the presence of the given module to
- # a C preprocessor expression that will evaluate to 1.
- AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
- [
-- gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
-- [GNULIB_[]m4_translit([[$1]],
-- [abcdefghijklmnopqrstuvwxyz./-],
-- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
-- [gl_MODULE_INDICATOR_CONDITION])
--])
--
--# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
--# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
--# The shell variable's value is a C preprocessor expression that evaluates
--# to 0 or 1.
--AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
--[
-- m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
-- [
-- dnl Simplify the expression VALUE || 1 to 1.
-- $1=1
-- ],
-- [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
-- [gl_MODULE_INDICATOR_CONDITION])])
--])
--
--# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
--# modifies the shell variable to include the given condition. The shell
--# variable's value is a C preprocessor expression that evaluates to 0 or 1.
--AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
--[
-- dnl Simplify the expression 1 || CONDITION to 1.
-- if test "$[]$1" != 1; then
-- dnl Simplify the expression 0 || CONDITION to CONDITION.
-- if test "$[]$1" = 0; then
-- $1=$2
-- else
-- $1="($[]$1 || $2)"
-- fi
-- fi
-+ GNULIB_[]m4_translit([[$1]],
-+ [abcdefghijklmnopqrstuvwxyz./-],
-+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
- ])
-
- # gl_MODULE_INDICATOR([modulename])
-@@ -211,35 +151,6 @@ m4_ifndef([AS_VAR_IF],
- [m4_define([AS_VAR_IF],
- [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
-
--# gl_PROG_AR_RANLIB
--# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
--AC_DEFUN([gl_PROG_AR_RANLIB],
--[
-- dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
-- dnl as "cc", and GCC as "gcc". They have different object file formats and
-- dnl library formats. In particular, the GNU binutils programs ar, ranlib
-- dnl produce libraries that work only with gcc, not with cc.
-- AC_REQUIRE([AC_PROG_CC])
-- AC_EGREP_CPP([Amsterdam],
-- [
--#ifdef __ACK__
--Amsterdam
--#endif
-- ],
-- [AR='cc -c.a'
-- ARFLAGS='-o'
-- RANLIB=':'
-- ],
-- [dnl Use the Automake-documented default values for AR and ARFLAGS.
-- AR='ar'
-- ARFLAGS='cru'
-- dnl Use the ranlib program if it is available.
-- AC_PROG_RANLIB
-- ])
-- AC_SUBST([AR])
-- AC_SUBST([ARFLAGS])
--])
--
- # AC_PROG_MKDIR_P
- # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
- # for interoperability with automake-1.9.6 from autoconf-2.62.
-diff -Naurp libiconv-1.14.org//srcm4/gnulib-comp.m4 libiconv-1.14/srcm4/gnulib-comp.m4
---- libiconv-1.14.org//srcm4/gnulib-comp.m4 2011-08-07 06:42:12.000000000 -0700
-+++ libiconv-1.14/srcm4/gnulib-comp.m4 2012-01-08 02:07:43.922484630 -0800
-@@ -25,12 +25,14 @@ AC_DEFUN([gl_EARLY],
- m4_pattern_allow([^gl_ES$])dnl a valid locale name
- m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
- m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
-- AC_REQUIRE([gl_PROG_AR_RANLIB])
-+ AC_REQUIRE([AC_PROG_RANLIB])
- AC_REQUIRE([AM_PROG_CC_C_O])
- # Code from module alloca-opt:
- # Code from module allocator:
- # Code from module areadlink:
-+ # Code from module arg-nonnull:
- # Code from module binary-io:
-+ # Code from module c++defs:
- # Code from module canonicalize-lgpl:
- # Code from module careadlinkat:
- # Code from module dosname:
-@@ -46,7 +48,6 @@ AC_DEFUN([gl_EARLY],
- # Code from module havelib:
- # Code from module include_next:
- # Code from module intprops:
-- # Code from module largefile:
- # Code from module libiconv-misc:
- # Code from module lstat:
- # Code from module malloca:
-@@ -64,10 +65,6 @@ AC_DEFUN([gl_EARLY],
- # Code from module signal:
- # Code from module sigpipe:
- # Code from module sigprocmask:
-- # Code from module snippet/_Noreturn:
-- # Code from module snippet/arg-nonnull:
-- # Code from module snippet/c++defs:
-- # Code from module snippet/warn-on-use:
- # Code from module ssize_t:
- # Code from module stat:
- # Code from module stdbool:
-@@ -77,7 +74,6 @@ AC_DEFUN([gl_EARLY],
- # Code from module stdlib:
- # Code from module streq:
- # Code from module strerror:
-- # Code from module strerror-override:
- # Code from module string:
- # Code from module sys_stat:
- # Code from module time:
-@@ -87,6 +83,7 @@ AC_DEFUN([gl_EARLY],
- # Code from module uniwidth/width:
- # Code from module unlocked-io:
- # Code from module verify:
-+ # Code from module warn-on-use:
- # Code from module xalloc:
- # Code from module xreadlink:
- ])
-@@ -109,9 +106,6 @@ AC_DEFUN([gl_INIT],
- gl_source_base='srclib'
- gl_FUNC_ALLOCA
- gl_CANONICALIZE_LGPL
--if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
-- AC_LIBOBJ([canonicalize-lgpl])
--fi
- gl_MODULE_INDICATOR([canonicalize-lgpl])
- gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
- gl_STDLIB_MODULE_INDICATOR([realpath])
-@@ -121,10 +115,6 @@ gl_ENVIRON
- gl_UNISTD_MODULE_INDICATOR([environ])
- gl_HEADER_ERRNO_H
- gl_ERROR
--if test $ac_cv_lib_error_at_line = no; then
-- AC_LIBOBJ([error])
-- gl_PREREQ_ERROR
--fi
- m4_ifdef([AM_XGETTEXT_OPTION],
- [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
- AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
-@@ -134,43 +124,26 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
- AC_SUBST([LIBINTL])
- AC_SUBST([LTLIBINTL])
- gl_FUNC_LSTAT
--if test $REPLACE_LSTAT = 1; then
-- AC_LIBOBJ([lstat])
-- gl_PREREQ_LSTAT
--fi
- gl_SYS_STAT_MODULE_INDICATOR([lstat])
- gl_MALLOCA
- AC_TYPE_MBSTATE_T
- gl_FUNC_MEMMOVE
--if test $ac_cv_func_memmove = no; then
-- AC_LIBOBJ([memmove])
-- gl_PREREQ_MEMMOVE
--fi
- gl_MULTIARCH
- gl_PATHMAX
- AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
- AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
- gl_FUNC_READ
--if test $REPLACE_READ = 1; then
-- AC_LIBOBJ([read])
--fi
- gl_UNISTD_MODULE_INDICATOR([read])
- gl_FUNC_READLINK
--if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
-- AC_LIBOBJ([readlink])
-- gl_PREREQ_READLINK
--fi
- gl_UNISTD_MODULE_INDICATOR([readlink])
- gl_RELOCATABLE([$gl_source_base])
--if test $RELOCATABLE = yes; then
-- AC_LIBOBJ([progreloc])
--fi
- gl_FUNC_READLINK_SEPARATE
- gl_CANONICALIZE_LGPL_SEPARATE
- gl_MALLOCA
--gl_RELOCATABLE_LIBRARY
-+gl_RELOCATABLE_LIBRARY_SEPARATE
- gl_FUNC_SETENV_SEPARATE
--gl_PREREQ_SAFE_READ
-+gl_FUNC_STRERROR_SEPARATE
-+gl_SAFE_READ
- gl_SIGNAL_H
- gl_SIGNAL_SIGPIPE
- dnl Define the C macro GNULIB_SIGPIPE to 1.
-@@ -186,17 +159,9 @@ dnl Define the substituted variable GNUL
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- GNULIB_UNISTD_H_SIGPIPE=1
- gl_SIGNALBLOCKING
--if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
-- AC_LIBOBJ([sigprocmask])
-- gl_PREREQ_SIGPROCMASK
--fi
- gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
- gt_TYPE_SSIZE_T
- gl_FUNC_STAT
--if test $REPLACE_STAT = 1; then
-- AC_LIBOBJ([stat])
-- gl_PREREQ_STAT
--fi
- gl_SYS_STAT_MODULE_INDICATOR([stat])
- AM_STDBOOL_H
- gl_STDDEF_H
-@@ -204,17 +169,7 @@ gl_STDINT_H
- gl_STDIO_H
- gl_STDLIB_H
- gl_FUNC_STRERROR
--if test $REPLACE_STRERROR = 1; then
-- AC_LIBOBJ([strerror])
--fi
--gl_MODULE_INDICATOR([strerror])
- gl_STRING_MODULE_INDICATOR([strerror])
--AC_REQUIRE([gl_HEADER_ERRNO_H])
--AC_REQUIRE([gl_FUNC_STRERROR_0])
--if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
-- AC_LIBOBJ([strerror-override])
-- gl_PREREQ_SYS_H_WINSOCK2
--fi
- gl_HEADER_STRING_H
- gl_HEADER_SYS_STAT_H
- AC_PROG_MKDIR_P
-@@ -364,14 +319,13 @@ AC_DEFUN([gltests_LIBSOURCES], [
- # This macro records the list of files which have been installed by
- # gnulib-tool and may be removed by future gnulib-tool invocations.
- AC_DEFUN([gl_FILE_LIST], [
-+ build-aux/arg-nonnull.h
-+ build-aux/c++defs.h
- build-aux/config.libpath
- build-aux/config.rpath
- build-aux/install-reloc
- build-aux/reloc-ldflags
-- build-aux/snippet/_Noreturn.h
-- build-aux/snippet/arg-nonnull.h
-- build-aux/snippet/c++defs.h
-- build-aux/snippet/warn-on-use.h
-+ build-aux/warn-on-use.h
- doc/relocatable.texi
- lib/alloca.in.h
- lib/allocator.c
-@@ -419,8 +373,6 @@ AC_DEFUN([gl_FILE_LIST], [
- lib/stdio.in.h
- lib/stdlib.in.h
- lib/streq.h
-- lib/strerror-override.c
-- lib/strerror-override.h
- lib/strerror.c
- lib/string.in.h
- lib/sys_stat.in.h
-@@ -463,7 +415,6 @@ AC_DEFUN([gl_FILE_LIST], [
- m4/intmax.m4
- m4/inttypes-pri.m4
- m4/inttypes_h.m4
-- m4/largefile.m4
- m4/lcmessage.m4
- m4/lib-ld.m4
- m4/lib-link.m4
-@@ -502,7 +453,6 @@ AC_DEFUN([gl_FILE_LIST], [
- m4/stdlib_h.m4
- m4/strerror.m4
- m4/string_h.m4
-- m4/sys_socket_h.m4
- m4/sys_stat_h.m4
- m4/threadlib.m4
- m4/time_h.m4
-diff -Naurp libiconv-1.14.org//srcm4/include_next.m4 libiconv-1.14/srcm4/include_next.m4
---- libiconv-1.14.org//srcm4/include_next.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/include_next.m4 2012-01-08 02:07:40.650484472 -0800
-@@ -1,4 +1,4 @@
--# include_next.m4 serial 20
-+# include_next.m4 serial 18
- dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -175,13 +175,11 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
- [AC_CHECK_HEADERS_ONCE([$1])
- ])
-
--dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
--dnl until we can assume autoconf 2.64 or newer.
- m4_foreach_w([gl_HEADER_NAME], [$1],
- [AS_VAR_PUSHDEF([gl_next_header],
- [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
- if test $gl_cv_have_include_next = yes; then
-- AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
-+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
- else
- AC_CACHE_CHECK(
- [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
-@@ -210,7 +208,7 @@ dnl until we can assume autoconf 2.64 or
- dnl eval is necessary to expand gl_absname_cpp.
- dnl Ultrix and Pyramid sh refuse to redirect output of eval,
- dnl so use subshell.
-- AS_VAR_SET(gl_next_header,
-+ AS_VAR_SET([gl_next_header],
- ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
- sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
- s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
-@@ -220,20 +218,20 @@ dnl until we can assume autoconf 2.64 or
- }'`'"'])
- m4_if([$2], [check],
- [else
-- AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
-+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
- fi
- ])
- ])
- fi
- AC_SUBST(
- AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
-- [AS_VAR_GET(gl_next_header)])
-+ [AS_VAR_GET([gl_next_header])])
- if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
- gl_next_as_first_directive='<'gl_HEADER_NAME'>'
- else
- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-- gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
-+ gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
- fi
- AC_SUBST(
- AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
-diff -Naurp libiconv-1.14.org//srcm4/largefile.m4 libiconv-1.14/srcm4/largefile.m4
---- libiconv-1.14.org//srcm4/largefile.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/largefile.m4 1969-12-31 16:00:00.000000000 -0800
-@@ -1,104 +0,0 @@
--# Enable large files on systems where this is not the default.
--
--# Copyright 1992-1996, 1998-2011 Free Software Foundation, Inc.
--# This file is free software; the Free Software Foundation
--# gives unlimited permission to copy and/or distribute it,
--# with or without modifications, as long as this notice is preserved.
--
--# The following implementation works around a problem in autoconf <= 2.68;
--# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5.
--m4_version_prereq([2.69], [] ,[
--
--# _AC_SYS_LARGEFILE_TEST_INCLUDES
--# -------------------------------
--m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
--[@%:@include <sys/types.h>
-- /* Check that off_t can represent 2**63 - 1 correctly.
-- We can't simply define LARGE_OFF_T to be 9223372036854775807,
-- since some C++ compilers masquerading as C compilers
-- incorrectly reject 9223372036854775807. */
--@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-- int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
-- && LARGE_OFF_T % 2147483647 == 1)
-- ? 1 : -1]];[]dnl
--])
--
--
--# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
--# CACHE-VAR,
--# DESCRIPTION,
--# PROLOGUE, [FUNCTION-BODY])
--# --------------------------------------------------------
--m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
--[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
--[while :; do
-- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
-- [AC_LANG_PROGRAM([$5], [$6])],
-- [$3=no; break])
-- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
-- [AC_LANG_PROGRAM([@%:@define $1 $2
--$5], [$6])],
-- [$3=$2; break])
-- $3=unknown
-- break
--done])
--case $$3 in #(
-- no | unknown) ;;
-- *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
--esac
--rm -rf conftest*[]dnl
--])# _AC_SYS_LARGEFILE_MACRO_VALUE
--
--
--# AC_SYS_LARGEFILE
--# ----------------
--# By default, many hosts won't let programs access large files;
--# one must use special compiler options to get large-file access to work.
--# For more details about this brain damage please see:
--# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
--AC_DEFUN([AC_SYS_LARGEFILE],
--[AC_ARG_ENABLE(largefile,
-- [ --disable-largefile omit support for large files])
--if test "$enable_largefile" != no; then
--
-- AC_CACHE_CHECK([for special C compiler options needed for large files],
-- ac_cv_sys_largefile_CC,
-- [ac_cv_sys_largefile_CC=no
-- if test "$GCC" != yes; then
-- ac_save_CC=$CC
-- while :; do
-- # IRIX 6.2 and later do not support large files by default,
-- # so use the C compiler's -n32 option if that helps.
-- AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
-- AC_COMPILE_IFELSE([], [break])
-- CC="$CC -n32"
-- AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
-- break
-- done
-- CC=$ac_save_CC
-- rm -f conftest.$ac_ext
-- fi])
-- if test "$ac_cv_sys_largefile_CC" != no; then
-- CC=$CC$ac_cv_sys_largefile_CC
-- fi
--
-- _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
-- ac_cv_sys_file_offset_bits,
-- [Number of bits in a file offset, on hosts where this is settable.],
-- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
-- if test $ac_cv_sys_file_offset_bits = unknown; then
-- _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
-- ac_cv_sys_large_files,
-- [Define for large files, on AIX-style hosts.],
-- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
-- fi
--
-- AH_VERBATIM([_DARWIN_USE_64_BIT_INODE],
--[/* Enable large inode numbers on Mac OS X. */
--#ifndef _DARWIN_USE_64_BIT_INODE
--# define _DARWIN_USE_64_BIT_INODE 1
--#endif])
--fi
--])# AC_SYS_LARGEFILE
--
--])# m4_version_prereq 2.69
-diff -Naurp libiconv-1.14.org//srcm4/lstat.m4 libiconv-1.14/srcm4/lstat.m4
---- libiconv-1.14.org//srcm4/lstat.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/lstat.m4 2012-01-08 02:07:40.722484476 -0800
-@@ -1,4 +1,4 @@
--# serial 23
-+# serial 21
-
- # Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc.
- #
-@@ -15,28 +15,24 @@ AC_DEFUN([gl_FUNC_LSTAT],
- dnl "#define lstat stat", and lstat.c is a no-op.
- AC_CHECK_FUNCS_ONCE([lstat])
- if test $ac_cv_func_lstat = yes; then
-- AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
-- if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
-+ AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
-+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
-+ dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
- REPLACE_LSTAT=1
- fi
-+ # Prerequisites of lib/lstat.c.
-+ AC_REQUIRE([AC_C_INLINE])
- else
- HAVE_LSTAT=0
- fi
- ])
-
--# Prerequisites of lib/lstat.c.
--AC_DEFUN([gl_PREREQ_LSTAT],
-+# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer
-+# maintained in Autoconf.
-+AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
- [
-- AC_REQUIRE([AC_C_INLINE])
-- :
--])
--
--AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
--[
-- dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
-- dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
- AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
-- [gl_cv_func_lstat_dereferences_slashed_symlink],
-+ [ac_cv_func_lstat_dereferences_slashed_symlink],
- [rm -f conftest.sym conftest.file
- echo >conftest.file
- if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
-@@ -49,22 +45,25 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_
- have to compile and use the lstat wrapper. */
- return lstat ("conftest.sym/", &sbuf) == 0;
- ]])],
-- [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
-- [gl_cv_func_lstat_dereferences_slashed_symlink=no],
-+ [ac_cv_func_lstat_dereferences_slashed_symlink=yes],
-+ [ac_cv_func_lstat_dereferences_slashed_symlink=no],
- [# When cross-compiling, be pessimistic so we will end up using the
- # replacement version of lstat that checks for trailing slashes and
- # calls lstat a second time when necessary.
-- gl_cv_func_lstat_dereferences_slashed_symlink=no
-+ ac_cv_func_lstat_dereferences_slashed_symlink=no
- ])
- else
- # If the 'ln -s' command failed, then we probably don't even
- # have an lstat function.
-- gl_cv_func_lstat_dereferences_slashed_symlink=no
-+ ac_cv_func_lstat_dereferences_slashed_symlink=no
- fi
- rm -f conftest.sym conftest.file
- ])
-- test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
-+ test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
- AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
- [Define to 1 if `lstat' dereferences a symlink specified
- with a trailing slash.])
-+ if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
-+ AC_LIBOBJ([lstat])
-+ fi
- ])
-diff -Naurp libiconv-1.14.org//srcm4/memmove.m4 libiconv-1.14/srcm4/memmove.m4
---- libiconv-1.14.org//srcm4/memmove.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/memmove.m4 2012-01-08 02:07:40.738484477 -0800
-@@ -1,4 +1,4 @@
--# memmove.m4 serial 4
-+# memmove.m4 serial 3
- dnl Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -6,7 +6,10 @@ dnl with or without modifications, as lo
-
- AC_DEFUN([gl_FUNC_MEMMOVE],
- [
-- AC_CHECK_FUNCS([memmove])
-+ AC_REPLACE_FUNCS([memmove])
-+ if test $ac_cv_func_memmove = no; then
-+ gl_PREREQ_MEMMOVE
-+ fi
- ])
-
- # Prerequisites of lib/memmove.c.
-diff -Naurp libiconv-1.14.org//srcm4/pathmax.m4 libiconv-1.14/srcm4/pathmax.m4
---- libiconv-1.14.org//srcm4/pathmax.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/pathmax.m4 2012-01-08 02:07:40.758484478 -0800
-@@ -1,4 +1,4 @@
--# pathmax.m4 serial 9
-+# pathmax.m4 serial 8
- dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
- dnl Inc.
- dnl This file is free software; the Free Software Foundation
-@@ -8,5 +8,6 @@ dnl with or without modifications, as lo
- AC_DEFUN([gl_PATHMAX],
- [
- dnl Prerequisites of lib/pathmax.h.
-+ AC_CHECK_FUNCS_ONCE([pathconf])
- AC_CHECK_HEADERS_ONCE([sys/param.h])
- ])
-diff -Naurp libiconv-1.14.org//srcm4/po.m4 libiconv-1.14/srcm4/po.m4
---- libiconv-1.14.org//srcm4/po.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/po.m4 2012-01-08 02:07:40.766484477 -0800
-@@ -1,4 +1,4 @@
--# po.m4 serial 17a
-+# po.m4 serial 17 (gettext-0.18)
- dnl Copyright (C) 1995-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -118,8 +118,7 @@ changequote([,])dnl
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
-- gt_tab=`printf '\t'`
-- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
-+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
- POMAKEFILEDEPS="POTFILES.in"
- # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
- # on $ac_dir but don't depend on user-specified configuration
-@@ -255,7 +254,6 @@ EOT
- fi
-
- # A sed script that extracts the value of VARIABLE from a Makefile.
-- tab=`printf '\t'`
- sed_x_variable='
- # Test if the hold space is empty.
- x
-@@ -263,9 +261,9 @@ s/P/P/
- x
- ta
- # Yes it was empty. Look if we have the expected variable definition.
--/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
-+/^[ ]*VARIABLE[ ]*=/{
- # Seen the first line of the variable definition.
-- s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
-+ s/^[ ]*VARIABLE[ ]*=//
- ba
- }
- bd
-@@ -407,15 +405,14 @@ changequote([,])dnl
- fi
-
- sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
-- tab=`printf '\t'`
- if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
- # Add dependencies that cannot be formulated as a simple suffix rule.
- for lang in $ALL_LINGUAS; do
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- cat >> "$ac_file.tmp" <<EOF
- $frobbedlang.msg: $lang.po
--${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
--${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
-+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
- EOF
- done
- fi
-@@ -425,8 +422,8 @@ EOF
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- cat >> "$ac_file.tmp" <<EOF
- $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
--${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
--${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
-+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
- EOF
- done
- fi
-diff -Naurp libiconv-1.14.org//srcm4/readlink.m4 libiconv-1.14/srcm4/readlink.m4
---- libiconv-1.14.org//srcm4/readlink.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/readlink.m4 2012-01-08 02:07:40.790484479 -0800
-@@ -1,4 +1,4 @@
--# readlink.m4 serial 11
-+# readlink.m4 serial 10
- dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -10,6 +10,8 @@ AC_DEFUN([gl_FUNC_READLINK],
- AC_CHECK_FUNCS_ONCE([readlink])
- if test $ac_cv_func_readlink = no; then
- HAVE_READLINK=0
-+ AC_LIBOBJ([readlink])
-+ gl_PREREQ_READLINK
- else
- AC_CACHE_CHECK([whether readlink signature is correct],
- [gl_cv_decl_readlink_works],
-@@ -38,8 +40,10 @@ AC_DEFUN([gl_FUNC_READLINK],
- AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
- fails to recognize a trailing slash.])
- REPLACE_READLINK=1
-+ AC_LIBOBJ([readlink])
- elif test "$gl_cv_decl_readlink_works" != yes; then
- REPLACE_READLINK=1
-+ AC_LIBOBJ([readlink])
- fi
- fi
- ])
-diff -Naurp libiconv-1.14.org//srcm4/read.m4 libiconv-1.14/srcm4/read.m4
---- libiconv-1.14.org//srcm4/read.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/read.m4 2012-01-08 02:07:40.782484478 -0800
-@@ -1,4 +1,4 @@
--# read.m4 serial 2
-+# read.m4 serial 1
- dnl Copyright (C) 2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_READ],
- gl_NONBLOCKING_IO
- if test $gl_cv_have_nonblocking != yes; then
- REPLACE_READ=1
-+ AC_LIBOBJ([read])
- fi
- ])
- ])
-diff -Naurp libiconv-1.14.org//srcm4/relocatable-lib.m4 libiconv-1.14/srcm4/relocatable-lib.m4
---- libiconv-1.14.org//srcm4/relocatable-lib.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/relocatable-lib.m4 2012-01-08 02:07:40.798484480 -0800
-@@ -1,4 +1,4 @@
--# relocatable-lib.m4 serial 6
-+# relocatable-lib.m4 serial 5
- dnl Copyright (C) 2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -10,6 +10,9 @@ dnl Support for relocatable libraries.
- AC_DEFUN([gl_RELOCATABLE_LIBRARY],
- [
- AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
-+ if test $RELOCATABLE = yes; then
-+ AC_LIBOBJ([relocatable])
-+ fi
- ])
- AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
- [
-@@ -29,6 +32,13 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
- fi
- ])
-
-+dnl Like gl_RELOCATABLE_LIBRARY, except prepare for separate compilation
-+dnl (no AC_LIBOBJ).
-+AC_DEFUN([gl_RELOCATABLE_LIBRARY_SEPARATE],
-+[
-+ AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
-+])
-+
- dnl Support for relocatable packages for which it is a nop.
- AC_DEFUN([gl_RELOCATABLE_NOP],
- [
-diff -Naurp libiconv-1.14.org//srcm4/relocatable.m4 libiconv-1.14/srcm4/relocatable.m4
---- libiconv-1.14.org//srcm4/relocatable.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/relocatable.m4 2012-01-08 02:07:40.802484479 -0800
-@@ -1,4 +1,4 @@
--# relocatable.m4 serial 17
-+# relocatable.m4 serial 16
- dnl Copyright (C) 2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -14,6 +14,9 @@ AC_DEFUN([gl_RELOCATABLE],
- [
- AC_REQUIRE([gl_RELOCATABLE_BODY])
- gl_RELOCATABLE_LIBRARY
-+ if test $RELOCATABLE = yes; then
-+ AC_LIBOBJ([progreloc])
-+ fi
- : ${RELOCATABLE_CONFIG_H_DIR='$(top_builddir)'}
- RELOCATABLE_SRC_DIR="\$(top_srcdir)/$gl_source_base"
- RELOCATABLE_BUILD_DIR="\$(top_builddir)/$gl_source_base"
-diff -Naurp libiconv-1.14.org//srcm4/safe-read.m4 libiconv-1.14/srcm4/safe-read.m4
---- libiconv-1.14.org//srcm4/safe-read.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/safe-read.m4 2012-01-08 02:07:40.810484480 -0800
-@@ -1,10 +1,17 @@
--# safe-read.m4 serial 6
-+# safe-read.m4 serial 5
- dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
- dnl Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
- dnl with or without modifications, as long as this notice is preserved.
-
-+AC_DEFUN([gl_SAFE_READ],
-+[
-+ AC_LIBOBJ([safe-read])
-+
-+ gl_PREREQ_SAFE_READ
-+])
-+
- # Prerequisites of lib/safe-read.c.
- AC_DEFUN([gl_PREREQ_SAFE_READ],
- [
-diff -Naurp libiconv-1.14.org//srcm4/setenv.m4 libiconv-1.14/srcm4/setenv.m4
---- libiconv-1.14.org//srcm4/setenv.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/setenv.m4 2012-01-08 02:07:40.818484481 -0800
-@@ -1,4 +1,4 @@
--# setenv.m4 serial 24
-+# setenv.m4 serial 22
- dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -38,6 +38,9 @@ AC_DEFUN([gl_FUNC_SETENV],
- REPLACE_SETENV=1
- fi
- fi
-+ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
-+ AC_LIBOBJ([setenv])
-+ fi
- ])
-
- # Like gl_FUNC_SETENV, except prepare for separate compilation
-@@ -62,9 +65,9 @@ AC_DEFUN([gl_FUNC_UNSETENV],
- fi
- AC_CHECK_FUNCS([unsetenv])
- if test $ac_cv_func_unsetenv = no; then
-- HAVE_UNSETENV=0
-+ AC_LIBOBJ([unsetenv])
-+ gl_PREREQ_UNSETENV
- else
-- HAVE_UNSETENV=1
- dnl Some BSDs return void, failing to do error checking.
- AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
- [AC_COMPILE_IFELSE(
-@@ -90,6 +93,7 @@ int unsetenv();
- AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
- instead of int.])
- REPLACE_UNSETENV=1
-+ AC_LIBOBJ([unsetenv])
- fi
-
- dnl Solaris 10 unsetenv does not remove all copies of a name.
-@@ -122,6 +126,7 @@ int unsetenv();
- [gl_cv_func_unsetenv_works="guessing no"])])
- if test "$gl_cv_func_unsetenv_works" != yes; then
- REPLACE_UNSETENV=1
-+ AC_LIBOBJ([unsetenv])
- fi
- fi
- ])
-diff -Naurp libiconv-1.14.org//srcm4/signalblocking.m4 libiconv-1.14/srcm4/signalblocking.m4
---- libiconv-1.14.org//srcm4/signalblocking.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/signalblocking.m4 2012-01-08 02:07:40.834484482 -0800
-@@ -1,4 +1,4 @@
--# signalblocking.m4 serial 12
-+# signalblocking.m4 serial 10
- dnl Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -12,14 +12,31 @@ dnl with or without modifications, as lo
- AC_DEFUN([gl_SIGNALBLOCKING],
- [
- AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
-- AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
-- if test $gl_cv_type_sigset_t = yes; then
-+ signals_not_posix=
-+ AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1])
-+ if test -z "$signals_not_posix"; then
- AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
- fi
- if test -z "$gl_cv_func_sigprocmask"; then
- HAVE_POSIX_SIGNALBLOCKING=0
-+ AC_LIBOBJ([sigprocmask])
-+ gl_PREREQ_SIGPROCMASK
- fi
- ])
-
--# Prerequisites of lib/sigprocmask.c.
--AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:])
-+# Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c.
-+AC_DEFUN([gl_PREREQ_SIGPROCMASK],
-+[
-+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
-+ AC_CHECK_TYPES([sigset_t],
-+ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
-+ [#include <signal.h>
-+/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
-+#include <sys/types.h>])
-+ if test $gl_cv_type_sigset_t != yes; then
-+ HAVE_SIGSET_T=0
-+ fi
-+ dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has
-+ dnl the sigset_t type.
-+ AC_SUBST([HAVE_SIGSET_T])
-+])
-diff -Naurp libiconv-1.14.org//srcm4/signal_h.m4 libiconv-1.14/srcm4/signal_h.m4
---- libiconv-1.14.org//srcm4/signal_h.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/signal_h.m4 2012-01-08 02:07:40.826484480 -0800
-@@ -1,4 +1,4 @@
--# signal_h.m4 serial 16
-+# signal_h.m4 serial 12
- dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -7,7 +7,6 @@ dnl with or without modifications, as lo
- AC_DEFUN([gl_SIGNAL_H],
- [
- AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
-- AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
- gl_NEXT_HEADERS([signal.h])
-
- # AIX declares sig_atomic_t to already include volatile, and C89 compilers
-@@ -28,25 +27,10 @@ AC_DEFUN([gl_SIGNAL_H],
- dnl Check for declarations of anything we want to poison if the
- dnl corresponding gnulib module is not in use.
- gl_WARN_ON_USE_PREPARE([[#include <signal.h>
-- ]], [pthread_sigmask sigaction
-- sigaddset sigdelset sigemptyset sigfillset sigismember
-+ ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember
- sigpending sigprocmask])
- ])
-
--AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
--[
-- AC_CHECK_TYPES([sigset_t],
-- [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
-- [[
-- #include <signal.h>
-- /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
-- #include <sys/types.h>
-- ]])
-- if test $gl_cv_type_sigset_t != yes; then
-- HAVE_SIGSET_T=0
-- fi
--])
--
- AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
- [
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-@@ -58,13 +42,11 @@ AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
-
- AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
- [
-- GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK])
- GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
- GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
- GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
-- HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
- HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
- HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
- HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
-@@ -73,5 +55,4 @@ AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
- HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
- AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
- HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T])
-- REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK])
- ])
-diff -Naurp libiconv-1.14.org//srcm4/stat.m4 libiconv-1.14/srcm4/stat.m4
---- libiconv-1.14.org//srcm4/stat.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/stat.m4 2012-01-08 02:07:40.854484483 -0800
-@@ -1,4 +1,4 @@
--# serial 8
-+# serial 7
-
- # Copyright (C) 2009-2011 Free Software Foundation, Inc.
- #
-@@ -58,11 +58,9 @@ AC_DEFUN([gl_FUNC_STAT],
- AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
- help when passed a file name with a trailing slash]);;
- esac
--])
--
--# Prerequisites of lib/stat.c.
--AC_DEFUN([gl_PREREQ_STAT],
--[
-- AC_REQUIRE([AC_C_INLINE])
-- :
-+ if test $REPLACE_STAT = 1; then
-+ AC_LIBOBJ([stat])
-+ dnl Prerequisites of lib/stat.c.
-+ AC_REQUIRE([AC_C_INLINE])
-+ fi
- ])
-diff -Naurp libiconv-1.14.org//srcm4/strerror.m4 libiconv-1.14/srcm4/strerror.m4
---- libiconv-1.14.org//srcm4/strerror.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/strerror.m4 2012-01-08 02:07:40.890484484 -0800
-@@ -1,4 +1,4 @@
--# strerror.m4 serial 16
-+# strerror.m4 serial 9
- dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -6,73 +6,63 @@ dnl with or without modifications, as lo
-
- AC_DEFUN([gl_FUNC_STRERROR],
- [
-+ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
-+ if test $REPLACE_STRERROR = 1; then
-+ AC_LIBOBJ([strerror])
-+ AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
-+ [Define this to 1 if strerror is broken.])
-+ fi
-+])
-+
-+# Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ).
-+AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
-+[
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_REQUIRE([gl_HEADER_ERRNO_H])
-- AC_REQUIRE([gl_FUNC_STRERROR_0])
-- m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
-- AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
-- ])
-- if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
-+ if test -z "$ERRNO_H"; then
- AC_CACHE_CHECK([for working strerror function],
- [gl_cv_func_working_strerror],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <string.h>
- ]],
-- [[if (!*strerror (-2)) return 1;]])],
-+ [[return !*strerror (-2);]])],
- [gl_cv_func_working_strerror=yes],
- [gl_cv_func_working_strerror=no],
-- [dnl Be pessimistic on cross-compiles for now.
-- gl_cv_func_working_strerror="guessing no"])
-+ [dnl Assume crossbuild works if it compiles.
-+ AC_COMPILE_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [[#include <string.h>
-+ ]],
-+ [[return !*strerror (-2);]])],
-+ [gl_cv_func_working_strerror=yes],
-+ [gl_cv_func_working_strerror=no])
-+ ])
- ])
-- if test "$gl_cv_func_working_strerror" != yes; then
-+ if test $gl_cv_func_working_strerror = no; then
- dnl The system's strerror() fails to return a string for out-of-range
- dnl integers. Replace it.
- REPLACE_STRERROR=1
- fi
-- m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
-- dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
-- dnl buffer, we must replace strerror.
-- case "$gl_cv_func_strerror_r_works" in
-- *no) REPLACE_STRERROR=1 ;;
-- esac
-- ])
- else
- dnl The system's strerror() cannot know about the new errno values we add
-- dnl to <errno.h>, or any fix for strerror(0). Replace it.
-+ dnl to <errno.h>. Replace it.
- REPLACE_STRERROR=1
- fi
-+ if test $REPLACE_STRERROR = 1; then
-+ gl_PREREQ_STRERROR
-+ fi
- ])
-
--dnl Detect if strerror(0) passes (that is, does not set errno, and does not
--dnl return a string that matches strerror(-1)).
--AC_DEFUN([gl_FUNC_STRERROR_0],
--[
-- REPLACE_STRERROR_0=0
-- AC_CACHE_CHECK([whether strerror(0) succeeds],
-- [gl_cv_func_strerror_0_works],
-- [AC_RUN_IFELSE(
-- [AC_LANG_PROGRAM(
-- [[#include <string.h>
-- #include <errno.h>
-- ]],
-- [[int result = 0;
-- char *str;
-- errno = 0;
-- str = strerror (0);
-- if (!*str) result |= 1;
-- if (errno) result |= 2;
-- if (strstr (str, "nknown") || strstr (str, "ndefined"))
-- result |= 4;
-- return result;]])],
-- [gl_cv_func_strerror_0_works=yes],
-- [gl_cv_func_strerror_0_works=no],
-- [dnl Be pessimistic on cross-compiles for now.
-- gl_cv_func_strerror_0_works="guessing no"])
-- ])
-- if test "$gl_cv_func_strerror_0_works" != yes; then
-- REPLACE_STRERROR_0=1
-- AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
-- does not return a message implying success.])
-+# Prerequisites of lib/strerror.c.
-+AC_DEFUN([gl_PREREQ_STRERROR], [
-+ AC_CHECK_DECLS([strerror])
-+ AC_CHECK_HEADERS_ONCE([sys/socket.h])
-+ if test $ac_cv_header_sys_socket_h != yes; then
-+ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
-+ dnl the check for those headers unconditional; yet cygwin reports
-+ dnl that the headers are present but cannot be compiled (since on
-+ dnl cygwin, all socket information should come from sys/socket.h).
-+ AC_CHECK_HEADERS([winsock2.h])
- fi
- ])
-diff -Naurp libiconv-1.14.org//srcm4/string_h.m4 libiconv-1.14/srcm4/string_h.m4
---- libiconv-1.14.org//srcm4/string_h.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/string_h.m4 2012-01-08 02:07:40.894484485 -0800
-@@ -5,7 +5,7 @@
- # gives unlimited permission to copy and/or distribute it,
- # with or without modifications, as long as this notice is preserved.
-
--# serial 21
-+# serial 20
-
- # Written by Paul Eggert.
-
-@@ -27,9 +27,9 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
- dnl guaranteed by C89.
- gl_WARN_ON_USE_PREPARE([[#include <string.h>
- ]],
-- [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
-- strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
-- strerror_r strsignal strverscmp])
-+ [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
-+ strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r
-+ strsignal strverscmp])
- ])
-
- AC_DEFUN([gl_STRING_MODULE_INDICATOR],
-@@ -43,8 +43,6 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
-
- AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
- [
-- GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
-- GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
- GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
- GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
- GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
-@@ -82,8 +80,6 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
- GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
- HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
- dnl Assume proper GNU behavior unless another module says otherwise.
-- HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
-- HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
- HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
- HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
- HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
-diff -Naurp libiconv-1.14.org//srcm4/sys_socket_h.m4 libiconv-1.14/srcm4/sys_socket_h.m4
---- libiconv-1.14.org//srcm4/sys_socket_h.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/sys_socket_h.m4 1969-12-31 16:00:00.000000000 -0800
-@@ -1,177 +0,0 @@
--# sys_socket_h.m4 serial 22
--dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
--dnl This file is free software; the Free Software Foundation
--dnl gives unlimited permission to copy and/or distribute it,
--dnl with or without modifications, as long as this notice is preserved.
--
--dnl From Simon Josefsson.
--
--AC_DEFUN([gl_HEADER_SYS_SOCKET],
--[
-- AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
-- AC_REQUIRE([AC_CANONICAL_HOST])
-- AC_REQUIRE([AC_C_INLINE])
--
-- dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
-- dnl old-style declarations (with return type 'int' instead of 'ssize_t')
-- dnl unless _POSIX_PII_SOCKET is defined.
-- case "$host_os" in
-- osf*)
-- AC_DEFINE([_POSIX_PII_SOCKET], [1],
-- [Define to 1 in order to get the POSIX compatible declarations
-- of socket functions.])
-- ;;
-- esac
--
-- AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
-- [gl_cv_header_sys_socket_h_selfcontained],
-- [
-- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[]])],
-- [gl_cv_header_sys_socket_h_selfcontained=yes],
-- [gl_cv_header_sys_socket_h_selfcontained=no])
-- ])
-- if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
-- dnl If the shutdown function exists, <sys/socket.h> should define
-- dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
-- AC_CHECK_FUNCS([shutdown])
-- if test $ac_cv_func_shutdown = yes; then
-- AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros],
-- [gl_cv_header_sys_socket_h_shut],
-- [
-- AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([[#include <sys/socket.h>]],
-- [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
-- [gl_cv_header_sys_socket_h_shut=yes],
-- [gl_cv_header_sys_socket_h_shut=no])
-- ])
-- if test $gl_cv_header_sys_socket_h_shut = no; then
-- SYS_SOCKET_H='sys/socket.h'
-- fi
-- fi
-- fi
-- # We need to check for ws2tcpip.h now.
-- gl_PREREQ_SYS_H_SOCKET
-- AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
-- /* sys/types.h is not needed according to POSIX, but the
-- sys/socket.h in i386-unknown-freebsd4.10 and
-- powerpc-apple-darwin5.5 required it. */
--#include <sys/types.h>
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
--#ifdef HAVE_WS2TCPIP_H
--#include <ws2tcpip.h>
--#endif
--])
-- if test $ac_cv_type_struct_sockaddr_storage = no; then
-- HAVE_STRUCT_SOCKADDR_STORAGE=0
-- fi
-- if test $ac_cv_type_sa_family_t = no; then
-- HAVE_SA_FAMILY_T=0
-- fi
-- if test $ac_cv_type_struct_sockaddr_storage != no; then
-- AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
-- [],
-- [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0],
-- [#include <sys/types.h>
-- #ifdef HAVE_SYS_SOCKET_H
-- #include <sys/socket.h>
-- #endif
-- #ifdef HAVE_WS2TCPIP_H
-- #include <ws2tcpip.h>
-- #endif
-- ])
-- fi
-- if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
-- || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
-- SYS_SOCKET_H='sys/socket.h'
-- fi
-- gl_PREREQ_SYS_H_WINSOCK2
--
-- dnl Check for declarations of anything we want to poison if the
-- dnl corresponding gnulib module is not in use.
-- gl_WARN_ON_USE_PREPARE([[
--/* Some systems require prerequisite headers. */
--#include <sys/types.h>
--#include <sys/socket.h>
-- ]], [socket connect accept bind getpeername getsockname getsockopt
-- listen recv send recvfrom sendto setsockopt shutdown accept4])
--])
--
--AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
--[
-- dnl Check prerequisites of the <sys/socket.h> replacement.
-- AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
-- gl_CHECK_NEXT_HEADERS([sys/socket.h])
-- if test $ac_cv_header_sys_socket_h = yes; then
-- HAVE_SYS_SOCKET_H=1
-- HAVE_WS2TCPIP_H=0
-- else
-- HAVE_SYS_SOCKET_H=0
-- if test $ac_cv_header_ws2tcpip_h = yes; then
-- HAVE_WS2TCPIP_H=1
-- else
-- HAVE_WS2TCPIP_H=0
-- fi
-- fi
-- AC_SUBST([HAVE_SYS_SOCKET_H])
-- AC_SUBST([HAVE_WS2TCPIP_H])
--])
--
--# Common prerequisites of the <sys/socket.h> replacement and of the
--# <sys/select.h> replacement.
--# Sets and substitutes HAVE_WINSOCK2_H.
--AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
--[
-- m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
-- m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
-- AC_CHECK_HEADERS_ONCE([sys/socket.h])
-- if test $ac_cv_header_sys_socket_h != yes; then
-- dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
-- dnl the check for those headers unconditional; yet cygwin reports
-- dnl that the headers are present but cannot be compiled (since on
-- dnl cygwin, all socket information should come from sys/socket.h).
-- AC_CHECK_HEADERS([winsock2.h])
-- fi
-- if test "$ac_cv_header_winsock2_h" = yes; then
-- HAVE_WINSOCK2_H=1
-- UNISTD_H_HAVE_WINSOCK2_H=1
-- SYS_IOCTL_H_HAVE_WINSOCK2_H=1
-- else
-- HAVE_WINSOCK2_H=0
-- fi
-- AC_SUBST([HAVE_WINSOCK2_H])
--])
--
--AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
--[
-- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-- AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
-- gl_MODULE_INDICATOR_SET_VARIABLE([$1])
-- dnl Define it also as a C macro, for the benefit of the unit tests.
-- gl_MODULE_INDICATOR_FOR_TESTS([$1])
--])
--
--AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
--[
-- GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET])
-- GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT])
-- GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT])
-- GNULIB_BIND=0; AC_SUBST([GNULIB_BIND])
-- GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
-- GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
-- GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT])
-- GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN])
-- GNULIB_RECV=0; AC_SUBST([GNULIB_RECV])
-- GNULIB_SEND=0; AC_SUBST([GNULIB_SEND])
-- GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM])
-- GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO])
-- GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT])
-- GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN])
-- GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4])
-- HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
-- HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
-- AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
-- HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T])
-- HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4])
--])
-diff -Naurp libiconv-1.14.org//srcm4/warn-on-use.m4 libiconv-1.14/srcm4/warn-on-use.m4
---- libiconv-1.14.org//srcm4/warn-on-use.m4 2011-08-07 06:42:07.000000000 -0700
-+++ libiconv-1.14/srcm4/warn-on-use.m4 2012-01-08 02:07:40.934484487 -0800
-@@ -1,4 +1,4 @@
--# warn-on-use.m4 serial 4
-+# warn-on-use.m4 serial 2
- dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
- dnl This file is free software; the Free Software Foundation
- dnl gives unlimited permission to copy and/or distribute it,
-@@ -27,8 +27,6 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
- [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
- [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
- undefining macros.])])dnl
--dnl FIXME: gl_Symbol must be used unquoted until we can assume
--dnl autoconf 2.64 or newer.
- for gl_func in m4_flatten([$2]); do
- AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
- AC_CACHE_CHECK([whether $gl_func is declared without a macro],
-@@ -37,8 +35,8 @@ dnl autoconf 2.64 or newer.
- [@%:@undef $gl_func
- (void) $gl_func;])],
- [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
-- AS_VAR_IF(gl_Symbol, [yes],
-- [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
-+ AS_VAR_IF(gl_Symbol, [yes],
-+ [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
- dnl shortcut - if the raw declaration exists, then set a cache
- dnl variable to allow skipping any later AC_CHECK_DECL efforts
- eval ac_cv_have_decl_$gl_func=yes])
diff --git a/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch b/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch
deleted file mode 100644
index 5d34ce7c0e..0000000000
--- a/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-It adds the variables that are needed
-for autoconf 2.65 to reconfigure libiconv and delete the m4 macros
-directory. Its imported from OE.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: libiconv-1.13.1/configure.ac
-===================================================================
---- libiconv-1.13.1.orig/configure.ac
-+++ libiconv-1.13.1/configure.ac
-@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR([build-aux])
- AM_INIT_AUTOMAKE([libiconv], [1.13.1])
- AC_CONFIG_HEADERS([config.h lib/config.h])
- AC_PROG_MAKE_SET
--
-+AC_CONFIG_MACRO_DIR([m4])
- dnl checks for basic programs
-
- AC_PROG_CC
-Index: libiconv-1.13.1/libcharset/configure.ac
-===================================================================
---- libiconv-1.13.1.orig/libcharset/configure.ac
-+++ libiconv-1.13.1/libcharset/configure.ac
-@@ -16,17 +16,17 @@ dnl along with the GNU CHARSET Library;
- dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
- dnl Fifth Floor, Boston, MA 02110-1301, USA.
-
--AC_PREREQ([2.13])
-+AC_PREREQ(2.61)
-+AC_INIT([libcharset],[1.4] )
-+AC_CONFIG_SRCDIR([lib/localcharset.c])
-
--PACKAGE=libcharset
--VERSION=1.4
--
--AC_INIT([lib/localcharset.c])
- AC_CONFIG_AUX_DIR([build-aux])
- AC_CONFIG_HEADER([config.h])
- AC_PROG_MAKE_SET
--AC_SUBST([PACKAGE])
--AC_SUBST([VERSION])
-+dnl AC_SUBST(PACKAGE)
-+dnl AC_SUBST(VERSION)
-+
-+AC_CONFIG_MACRO_DIR([m4])
-
- dnl checks for basic programs
-
diff --git a/meta/recipes-support/libiconv/libiconv_1.11.1.bb b/meta/recipes-support/libiconv/libiconv_1.11.1.bb
deleted file mode 100644
index 6ce4b96e33..0000000000
--- a/meta/recipes-support/libiconv/libiconv_1.11.1.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "Character encoding support library"
-DESCRIPTION = "GNU libiconv - libiconv is for you if your application needs to support \
-multiple character encodings, but that support lacks from your system."
-HOMEPAGE = "http://www.gnu.org/software/libiconv"
-SECTION = "libs"
-NOTES = "Needs to be stripped down to: ascii iso8859-1 eucjp iso-2022jp gb utf8"
-PROVIDES = "virtual/libiconv"
-
-LICENSE = "LGPLv2.0"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
- file://libcharset/COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://autoconf.patch \
- file://shared_preloadable_libiconv_linux.patch \
- "
-
-SRC_URI[md5sum] = "d42b97f6ef5dd0ba4469d520ed732fed"
-SRC_URI[sha256sum] = "e78c347a1a0cb15f2648519e9799151f4b4a934b61ad9ee7424478efe2b8257f"
-
-S = "${WORKDIR}/libiconv-${PV}"
-
-inherit autotools pkgconfig gettext
-
-python __anonymous() {
- if d.getVar("TCLIBC", True) == "glibc":
- raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
-}
-
-EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable"
-
-LEAD_SONAME = "libiconv.so"
-
-do_configure_prepend () {
- rm -f ${S}/m4/libtool.m4 ${S}/m4/ltoptions.m4 ${S}/m4/ltsugar.m4 ${S}/m4/ltversion.m4 ${S}/m4/lt~obsolete.m4 ${S}/libcharset/m4/libtool.m4 ${S}/libcharset/m4/ltoptions.m4 ${S}/libcharset/m4/ltsugar.m4 ${S}/libcharset/m4/ltversion.m4 ${S}/libcharset/m4/lt~obsolete.m4
-}
-
-do_configure_append () {
- # forcibly remove RPATH from libtool
- sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' *libtool
- sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=_NO_RPATH_|g' *libtool
-}
-
-do_install_append () {
- rm -rf ${D}${libdir}/preloadable_libiconv.so
- rm -rf ${D}${libdir}/charset.alias
-}
diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb b/meta/recipes-support/libiconv/libiconv_1.14.bb
deleted file mode 100644
index 1b6fe09bb7..0000000000
--- a/meta/recipes-support/libiconv/libiconv_1.14.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Character encoding support library"
-DESCRIPTION = "GNU libiconv - libiconv is for you if your application needs to support \
-multiple character encodings, but that support lacks from your system."
-HOMEPAGE = "http://www.gnu.org/software/libiconv"
-SECTION = "libs"
-NOTES = "Needs to be stripped down to: ascii iso8859-1 eucjp iso-2022jp gb utf8"
-PROVIDES = "virtual/libiconv"
-PR = "r1"
-LICENSE = "LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
- file://libcharset/COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://autoconf.patch \
- file://add-relocatable-module.patch \
- "
-
-SRC_URI[md5sum] = "e34509b1623cec449dfeb73d7ce9c6c6"
-SRC_URI[sha256sum] = "72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613"
-
-S = "${WORKDIR}/libiconv-${PV}"
-
-inherit autotools pkgconfig gettext
-
-python __anonymous() {
- if d.getVar("TARGET_OS", True) != "linux":
- return
- if d.getVar("TCLIBC", True) == "glibc":
- raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
-}
-
-EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable"
-
-LEAD_SONAME = "libiconv.so"
-
-do_configure_prepend () {
- rm -f ${S}/m4/libtool.m4 ${S}/m4/ltoptions.m4 ${S}/m4/ltsugar.m4 ${S}/m4/ltversion.m4 ${S}/m4/lt~obsolete.m4 ${S}/libcharset/m4/libtool.m4 ${S}/libcharset/m4/ltoptions.m4 ${S}/libcharset/m4/ltsugar.m4 ${S}/libcharset/m4/ltversion.m4 ${S}/libcharset/m4/lt~obsolete.m4
-}
-
-do_configure_append () {
- # forcibly remove RPATH from libtool
- sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' *libtool
- sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=_NO_RPATH_|g' *libtool
-}
-
-do_install_append () {
- rm -rf ${D}${libdir}/preloadable_libiconv.so
- rm -rf ${D}${libdir}/charset.alias
-}
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-support/libjitterentropy/files/0001-Make-man-pages-reproducible.patch b/meta/recipes-support/libjitterentropy/files/0001-Make-man-pages-reproducible.patch
new file mode 100644
index 0000000000..886fd26db1
--- /dev/null
+++ b/meta/recipes-support/libjitterentropy/files/0001-Make-man-pages-reproducible.patch
@@ -0,0 +1,30 @@
+From ce091718716400119d6be6bd637c0e3f4f6ca315 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Thu, 21 Nov 2019 08:07:41 -0600
+Subject: [PATCH] Make man pages reproducible
+
+Instructs the man page to be gzip'ed without the file name or timestamp
+so that it builds reproducibly.
+
+Upstream-Status: Accepted [https://github.com/smuellerDD/jitterentropy-library/pull/14]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 2e78607..860b720 100644
+--- a/Makefile
++++ b/Makefile
+@@ -60,7 +60,7 @@ cppcheck:
+ install:
+ install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3
+ install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/
+- gzip -f -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
++ gzip -n -f -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
+ install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ $(INSTALL_STRIP) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
+ install -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
+--
+2.23.0
+
diff --git a/meta/recipes-support/libjitterentropy/files/0001-Makefile-cleanup-install-for-rebuilds.patch b/meta/recipes-support/libjitterentropy/files/0001-Makefile-cleanup-install-for-rebuilds.patch
new file mode 100644
index 0000000000..a19b252293
--- /dev/null
+++ b/meta/recipes-support/libjitterentropy/files/0001-Makefile-cleanup-install-for-rebuilds.patch
@@ -0,0 +1,56 @@
+From 060b9b4147f6e5ff386a8b017796118d783e59fa Mon Sep 17 00:00:00 2001
+From: Matt Weber <matthew.weber@rockwellcollins.com>
+Date: Tue, 22 Oct 2019 12:44:30 -0500
+Subject: [PATCH] Makefile: cleanup install for rebuilds
+
+Support the ability to rebuild and redeploy without a clean. This
+required some force linking and man archive creation.
+
+Provide the ability to override the stripping of the shared lib for
+cases where a embedded target build may want to control stripping
+or provide cross arch tools.
+
+Upstream-Status: Accepted [060b9b4147f6e5ff386a8b017796118d783e59fa]
+Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
+Signed-off-by: Stephan Mueller <smueller@chronox.de>
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ Makefile | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4ff069b..2e78607 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,6 +14,8 @@ LIBDIR := lib
+ # include target directory
+ INCDIR := include
+
++INSTALL_STRIP ?= install -s
++
+ NAME := jitterentropy
+ LIBMAJOR=$(shell cat jitterentropy-base.c | grep define | grep MAJVERSION | awk '{print $$3}')
+ LIBMINOR=$(shell cat jitterentropy-base.c | grep define | grep MINVERSION | awk '{print $$3}')
+@@ -58,15 +60,15 @@ cppcheck:
+ install:
+ install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3
+ install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/
+- gzip -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
++ gzip -f -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
+ install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
+- install -m 0755 -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
++ $(INSTALL_STRIP) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
+ install -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
+ install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
+ install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
+ $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
+- ln -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
+- ln -s lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
++ ln -sf lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
++ ln -sf lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
+
+ clean:
+ @- $(RM) $(NAME)
+--
+2.23.0
+
diff --git a/meta/recipes-support/libjitterentropy/libjitterentropy_2.2.0.bb b/meta/recipes-support/libjitterentropy/libjitterentropy_2.2.0.bb
new file mode 100644
index 0000000000..710ef0172d
--- /dev/null
+++ b/meta/recipes-support/libjitterentropy/libjitterentropy_2.2.0.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Hardware RNG based on CPU timing jitter"
+DESCRIPTION = "The Jitter RNG provides a noise source using the CPU execution timing jitter. \
+It does not depend on any system resource other than a high-resolution time \
+stamp. It is a small-scale, yet fast entropy source that is viable in almost \
+all environments and on a lot of CPU architectures."
+HOMEPAGE = "http://www.chronox.de/jent.html"
+LICENSE = "GPLv2+ | BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a95aadbdfae7ed812bb2b7b86eb5981c \
+ file://COPYING.gplv2;md5=eb723b61539feef013de476e68b5c50a \
+ file://COPYING.bsd;md5=66a5cedaf62c4b2637025f049f9b826f \
+ "
+SRC_URI = "git://github.com/smuellerDD/jitterentropy-library.git \
+ file://0001-Makefile-cleanup-install-for-rebuilds.patch \
+ file://0001-Make-man-pages-reproducible.patch"
+SRCREV = "933a44f33ed3d6612f7cfaa7ad1207c8da4886ba"
+S = "${WORKDIR}/git"
+
+do_configure[noexec] = "1"
+
+LDFLAGS += "-Wl,-O0"
+
+do_install () {
+ oe_runmake install INCDIR="/include" \
+ DESTDIR="${D}" \
+ PREFIX="${exec_prefix}" \
+ LIBDIR="${baselib}" \
+ INSTALL_STRIP="install"
+}
+
diff --git a/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
index d28dfd9ebe..5afe6de923 100644
--- a/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
+++ b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
@@ -6,13 +6,13 @@ They think pkgconfig adds no portability and maintaining them is not worthwhile.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-Index: libksba-1.3.0/Makefile.am
+Index: libksba-1.3.5/Makefile.am
===================================================================
---- libksba-1.3.0.orig/Makefile.am 2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/Makefile.am 2014-05-13 21:39:22.462385646 +0000
-@@ -21,6 +21,9 @@
+--- libksba-1.3.5.orig/Makefile.am
++++ libksba-1.3.5/Makefile.am
+@@ -20,6 +20,9 @@
+
ACLOCAL_AMFLAGS = -I m4 -I gl/m4
- AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = ksba.pc
@@ -20,11 +20,11 @@ Index: libksba-1.3.0/Makefile.am
# (A suitable gitlog-to-changelog script can be found in GnuPG master.)
GITLOG_TO_CHANGELOG=gitlog-to-changelog
-Index: libksba-1.3.0/configure.ac
+Index: libksba-1.3.5/configure.ac
===================================================================
---- libksba-1.3.0.orig/configure.ac 2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/configure.ac 2014-05-13 21:39:22.462385646 +0000
-@@ -400,6 +400,7 @@
+--- libksba-1.3.5.orig/configure.ac
++++ libksba-1.3.5/configure.ac
+@@ -414,6 +414,7 @@ gl/Makefile
src/Makefile
src/ksba-config
src/versioninfo.rc
@@ -32,10 +32,10 @@ Index: libksba-1.3.0/configure.ac
tests/Makefile
doc/Makefile
])
-Index: libksba-1.3.0/ksba.pc.in
+Index: libksba-1.3.5/ksba.pc.in
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libksba-1.3.0/ksba.pc.in 2014-05-13 21:39:22.462385646 +0000
+--- /dev/null
++++ libksba-1.3.5/ksba.pc.in
@@ -0,0 +1,17 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
@@ -54,11 +54,11 @@ Index: libksba-1.3.0/ksba.pc.in
+Libs.private: -L${libdir} -lgpg-error
+Cflags: -I${includedir}
+
-Index: libksba-1.3.0/src/ksba.m4
+Index: libksba-1.3.5/src/ksba.m4
===================================================================
---- libksba-1.3.0.orig/src/ksba.m4 2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/src/ksba.m4 2014-05-13 21:49:03.650382696 +0000
-@@ -22,18 +22,7 @@
+--- libksba-1.3.5.orig/src/ksba.m4
++++ libksba-1.3.5/src/ksba.m4
+@@ -22,18 +22,7 @@ dnl with a changed API.
dnl
AC_DEFUN([AM_PATH_KSBA],
[AC_REQUIRE([AC_CANONICAL_HOST])
@@ -77,7 +77,7 @@ Index: libksba-1.3.0/src/ksba.m4
tmp=ifelse([$1], ,1:1.0.0,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -43,48 +32,13 @@
+@@ -43,48 +32,13 @@ AC_DEFUN([AM_PATH_KSBA],
min_ksba_version="$tmp"
fi
@@ -129,7 +129,7 @@ Index: libksba-1.3.0/src/ksba.m4
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([KSBA API version])
if test "$req_ksba_api" -eq "$tmp" ; then
-@@ -97,10 +51,8 @@
+@@ -97,10 +51,8 @@ AC_DEFUN([AM_PATH_KSBA],
fi
fi
if test $ok = yes; then
@@ -141,7 +141,7 @@ Index: libksba-1.3.0/src/ksba.m4
if test x"$libksba_config_host" != xnone ; then
if test x"$libksba_config_host" != x"$host" ; then
AC_MSG_WARN([[
-@@ -114,8 +66,6 @@
+@@ -114,8 +66,6 @@ AC_DEFUN([AM_PATH_KSBA],
fi
fi
else
diff --git a/meta/recipes-support/libksba/libksba_1.3.4.bb b/meta/recipes-support/libksba/libksba_1.3.4.bb
deleted file mode 100644
index e68255c674..0000000000
--- a/meta/recipes-support/libksba/libksba_1.3.4.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Easy API to create and parse X.509 and CMS related objects"
-HOMEPAGE = "http://www.gnupg.org/related_software/libksba/"
-LICENSE = "GPLv2+ | LGPLv3+ | GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \
- file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
- file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
- "
-
-DEPENDS = "libgpg-error"
-
-BINCONFIG = "${bindir}/ksba-config"
-
-inherit autotools binconfig-disabled pkgconfig texinfo
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://ksba-add-pkgconfig-support.patch"
-
-SRC_URI[md5sum] = "2bfc3d69053db7b6983b5627706033f4"
-SRC_URI[sha256sum] = "f6c2883cebec5608692d8730843d87f237c0964d923bbe7aa89c05f20558ad4f"
-
-do_configure_prepend () {
- # Else these could be used in preference to those in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
-}
diff --git a/meta/recipes-support/libksba/libksba_1.3.5.bb b/meta/recipes-support/libksba/libksba_1.3.5.bb
new file mode 100644
index 0000000000..336d7f8177
--- /dev/null
+++ b/meta/recipes-support/libksba/libksba_1.3.5.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Easy API to create and parse X.509 and CMS related objects"
+HOMEPAGE = "http://www.gnupg.org/related_software/libksba/"
+LICENSE = "GPLv3+ & (GPLv2+ | LGPLv3+)"
+LICENSE_${PN} = "GPLv2+ | LGPLv3+"
+LICENSE_${PN}-doc = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \
+ file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
+ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+ "
+
+DEPENDS = "libgpg-error"
+
+BINCONFIG = "${bindir}/ksba-config"
+
+inherit autotools binconfig-disabled pkgconfig texinfo
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://ksba-add-pkgconfig-support.patch"
+
+SRC_URI[md5sum] = "8302a3e263a7c630aa7dea7d341f07a2"
+SRC_URI[sha256sum] = "41444fd7a6ff73a79ad9728f985e71c9ba8cd3e5e53358e70d5f066d35c1a340"
+
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libmpc/libmpc_1.0.3.bb b/meta/recipes-support/libmpc/libmpc_1.0.3.bb
deleted file mode 100644
index 4f1f5242fb..0000000000
--- a/meta/recipes-support/libmpc/libmpc_1.0.3.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require libmpc.inc
-
-DEPENDS = "gmp mpfr"
-
-LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-SRC_URI = "http://www.multiprecision.org/mpc/download/mpc-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "d6a1d5f8ddea3abd2cc3e98f58352d26"
-SRC_URI[sha256sum] = "617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3"
-
-UPSTREAM_CHECK_URI = "http://www.multiprecision.org/index.php?prog=mpc&page=download"
-
-S = "${WORKDIR}/mpc-${PV}"
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/meta/recipes-support/libmpc/libmpc_1.1.0.bb b/meta/recipes-support/libmpc/libmpc_1.1.0.bb
new file mode 100644
index 0000000000..bbc673ff38
--- /dev/null
+++ b/meta/recipes-support/libmpc/libmpc_1.1.0.bb
@@ -0,0 +1,13 @@
+require libmpc.inc
+
+DEPENDS = "gmp mpfr"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
+SRC_URI = "${GNU_MIRROR}/mpc/mpc-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4125404e41e482ec68282a2e687f6c73"
+SRC_URI[sha256sum] = "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"
+
+S = "${WORKDIR}/mpc-${PV}"
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch b/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch
deleted file mode 100644
index b734028c73..0000000000
--- a/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From 683f27fbb68ca2028a7b3468f17164d484df2759 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Thu, 25 Aug 2016 13:14:59 +0100
-Subject: [PATCH 1/3] lib: add utility function nl_strerror_l()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-libnl currently uses strerror_r() throughout, but this is
-problematic because there is a non-standard GNU version
-implemented in glibc, and the standard POSIX version, which
-differ in signature. When using glibc, one can choose
-between the two versions using feature test macros
-_GNU_SOURCE and _POSIX_C_SOURCE.
-
-Given libnl is built using the former, we always get the
-glibc special version, and all code so far has been written
-for that non-standard version.
-
-Other C libraries like musl on the other hand only try
-to be posix compliant, and only ever provide the posix
-version of strerror_r(), which has a different signature.
-
-The alternative is to use strerror_l() rather than
-strerror_r() http://austingroupbugs.net/view.php?id=655
-- this will avoid the non-confirming versions issue
-- strerror_l() is now recommended by POSIX to replace
- strerror_r() usage
-
-So rather than changing all uses of strerror_r() to be in
-line with posix, we are going to switch to the recommended
-interface strerror_l().
-
-Since strerror_l() is slightly more difficuly to use, we
-add a little (private) wrapper that we can use from all
-current callsites of strerror_r().
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
-Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
-Signed-off-by: Thomas Haller <thaller@redhat.com>
----
-Upstream-Status: Backport https://github.com/thom311/libnl/commit/683f27fbb68ca2028a7b3468f17164d484df2759
- include/Makefile.am | 1 +
- include/netlink-private/utils.h | 17 +++++++++++++++++
- lib/utils.c | 24 ++++++++++++++++++++++++
- libnl-3.sym | 5 +++++
- 4 files changed, 47 insertions(+)
- create mode 100644 include/netlink-private/utils.h
-
-diff --git a/include/Makefile.am b/include/Makefile.am
-index 804e984..f8b977a 100644
---- a/include/Makefile.am
-+++ b/include/Makefile.am
-@@ -166,6 +166,7 @@ noinst_HEADERS = \
- netlink-private/socket.h \
- netlink-private/tc.h \
- netlink-private/types.h \
-+ netlink-private/utils.h \
- netlink-private/cache-api.h \
- netlink-private/object-api.h \
- netlink-private/route/link/api.h \
-diff --git a/include/netlink-private/utils.h b/include/netlink-private/utils.h
-new file mode 100644
-index 0000000..77aadb3
---- /dev/null
-+++ b/include/netlink-private/utils.h
-@@ -0,0 +1,17 @@
-+/*
-+ * netlink-private/utils.h Local Utility Functions
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation version 2.1
-+ * of the License.
-+ *
-+ * Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch>
-+ */
-+
-+#ifndef NETLINK_UTILS_PRIV_H_
-+#define NETLINK_UTILS_PRIV_H_
-+
-+extern const char * nl_strerror_l(int err);
-+
-+#endif
-diff --git a/lib/utils.c b/lib/utils.c
-index 61c3d95..c1c1b72 100644
---- a/lib/utils.c
-+++ b/lib/utils.c
-@@ -25,10 +25,12 @@
- */
-
- #include <netlink-private/netlink.h>
-+#include <netlink-private/utils.h>
- #include <netlink/netlink.h>
- #include <netlink/utils.h>
- #include <linux/socket.h>
- #include <stdlib.h> /* exit() */
-+#include <locale.h>
-
- /**
- * Global variable indicating the desired level of debugging output.
-@@ -118,6 +120,28 @@ int __nl_read_num_str_file(const char *path, int (*cb)(long, const char *))
-
- return 0;
- }
-+
-+const char *nl_strerror_l(int err)
-+{
-+ int errno_save = errno;
-+ locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0);
-+ const char *buf;
-+
-+ if (loc == (locale_t)0) {
-+ if (errno == ENOENT)
-+ loc = newlocale(LC_MESSAGES_MASK,
-+ "POSIX", (locale_t)0);
-+ }
-+ if (loc != (locale_t)0) {
-+ buf = strerror_l(err, loc);
-+ freelocale(loc);
-+ } else {
-+ buf = "newlocale() failed";
-+ }
-+
-+ errno = errno_save;
-+ return buf;
-+}
- /** @endcond */
-
- /**
-diff --git a/libnl-3.sym b/libnl-3.sym
-index 4e09bdd..9119e66 100644
---- a/libnl-3.sym
-+++ b/libnl-3.sym
-@@ -351,3 +351,8 @@ libnl_3_2_28 {
- global:
- nl_object_diff64;
- } libnl_3_2_27;
-+
-+libnl_3_2_29 {
-+global:
-+ nl_strerror_l;
-+} libnl_3_2_28;
---
-2.9.3
-
diff --git a/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch b/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch
deleted file mode 100644
index 6347ec0b91..0000000000
--- a/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch
+++ /dev/null
@@ -1,403 +0,0 @@
-From c1948ec29b8dcdc58d2d92700c325abdeab111a6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Thu, 25 Aug 2016 13:15:00 +0100
-Subject: [PATCH 2/3] lib: switch to using strerror_l() instead of strerror_r()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-glibc provides two versions of strerror_r(), which
-can be chosen between using feature test macros
-_GNU_SOURCE and _POSIX_C_SOURCE. libnl is built using
-the former, hence we get the glibc special version,
-and all code so far has been written for this.
-
-Other C libraries like musl on the other hand only try
-to be posix compliant, and only ever provide the posix
-version of strerror_r(), which has a different signature.
-
-Uses in libnl hence generally cause printf() of an *int*
-with a *string format* specifier for that reason.
-
-Additionally, strerror_r() has been deprecated:
- http://austingroupbugs.net/view.php?id=655
-
-Switch to using strerror_l() (via our wrapper just
-introduced).
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
-Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
-Signed-off-by: Thomas Haller <thaller@redhat.com>
----
-Upstream-Status: Backport https://github.com/thom311/libnl/commit/c1948ec29b8dcdc58d2d92700c325abdeab111a6
- lib/cache_mngr.c | 5 ++---
- lib/fib_lookup/lookup.c | 3 ++-
- lib/handlers.c | 4 ++--
- lib/msg.c | 4 ++--
- lib/nl.c | 26 +++++++++-----------------
- lib/route/route_obj.c | 3 ++-
- lib/socket.c | 33 +++++++++++----------------------
- 7 files changed, 30 insertions(+), 48 deletions(-)
-
-diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
-index b9eb345..1f23eb1 100644
---- a/lib/cache_mngr.c
-+++ b/lib/cache_mngr.c
-@@ -33,6 +33,7 @@
- */
-
- #include <netlink-private/netlink.h>
-+#include <netlink-private/utils.h>
- #include <netlink/netlink.h>
- #include <netlink/cache.h>
- #include <netlink/utils.h>
-@@ -392,10 +393,8 @@ int nl_cache_mngr_poll(struct nl_cache_mngr *mngr, int timeout)
- ret = poll(&fds, 1, timeout);
- NL_DBG(3, "Cache manager %p, poll() returned %d\n", mngr, ret);
- if (ret < 0) {
-- char buf[64];
--
- NL_DBG(4, "nl_cache_mngr_poll(%p): poll() failed with %d (%s)\n",
-- mngr, errno, strerror_r(errno, buf, sizeof(buf)));
-+ mngr, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-diff --git a/lib/fib_lookup/lookup.c b/lib/fib_lookup/lookup.c
-index 43b6126..efc862b 100644
---- a/lib/fib_lookup/lookup.c
-+++ b/lib/fib_lookup/lookup.c
-@@ -17,6 +17,7 @@
- */
-
- #include <netlink-private/netlink.h>
-+#include <netlink-private/utils.h>
- #include <netlink/netlink.h>
- #include <netlink/attr.h>
- #include <netlink/utils.h>
-@@ -133,7 +134,7 @@ static void result_dump_line(struct nl_object *obj, struct nl_dump_params *p)
- nl_rtntype2str(res->fr_type, buf, sizeof(buf)));
- nl_dump(p, "scope %s error %s (%d)\n",
- rtnl_scope2str(res->fr_scope, buf, sizeof(buf)),
-- strerror_r(-res->fr_error, buf, sizeof(buf)), res->fr_error);
-+ nl_strerror_l(-res->fr_error), res->fr_error);
- }
-
- static void result_dump_details(struct nl_object *obj, struct nl_dump_params *p)
-diff --git a/lib/handlers.c b/lib/handlers.c
-index 97a0d9c..4a48b99 100644
---- a/lib/handlers.c
-+++ b/lib/handlers.c
-@@ -26,6 +26,7 @@
- */
-
- #include <netlink-private/netlink.h>
-+#include <netlink-private/utils.h>
- #include <netlink/netlink.h>
- #include <netlink/utils.h>
- #include <netlink/msg.h>
-@@ -79,10 +80,9 @@ static int nl_error_handler_verbose(struct sockaddr_nl *who,
- struct nlmsgerr *e, void *arg)
- {
- FILE *ofd = arg ? arg : stderr;
-- char buf[256];
-
- fprintf(ofd, "-- Error received: %s\n-- Original message: ",
-- strerror_r(-e->error, buf, sizeof(buf)));
-+ nl_strerror_l(-e->error));
- print_header_content(ofd, &e->msg);
- fprintf(ofd, "\n");
-
-diff --git a/lib/msg.c b/lib/msg.c
-index e8a7e99..9af3f3a 100644
---- a/lib/msg.c
-+++ b/lib/msg.c
-@@ -27,6 +27,7 @@
- */
-
- #include <netlink-private/netlink.h>
-+#include <netlink-private/utils.h>
- #include <netlink/netlink.h>
- #include <netlink/utils.h>
- #include <netlink/cache.h>
-@@ -913,11 +914,10 @@ static void dump_error_msg(struct nl_msg *msg, FILE *ofd)
- fprintf(ofd, " [ERRORMSG] %zu octets\n", sizeof(*err));
-
- if (nlmsg_len(hdr) >= sizeof(*err)) {
-- char buf[256];
- struct nl_msg *errmsg;
-
- fprintf(ofd, " .error = %d \"%s\"\n", err->error,
-- strerror_r(-err->error, buf, sizeof(buf)));
-+ nl_strerror_l(-err->error));
- fprintf(ofd, " [ORIGINAL MESSAGE] %zu octets\n", sizeof(*hdr));
-
- errmsg = nlmsg_inherit(&err->msg);
-diff --git a/lib/nl.c b/lib/nl.c
-index 123f657..a45c3ea 100644
---- a/lib/nl.c
-+++ b/lib/nl.c
-@@ -27,6 +27,7 @@
-
- #include <netlink-private/netlink.h>
- #include <netlink-private/socket.h>
-+#include <netlink-private/utils.h>
- #include <netlink/netlink.h>
- #include <netlink/utils.h>
- #include <netlink/handlers.h>
-@@ -105,7 +106,6 @@ int nl_connect(struct nl_sock *sk, int protocol)
- int errsv;
- socklen_t addrlen;
- struct sockaddr_nl local = { 0 };
-- char buf[64];
- int try_bind = 1;
-
- #ifdef SOCK_CLOEXEC
-@@ -119,7 +119,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
- if (sk->s_fd < 0) {
- errsv = errno;
- NL_DBG(4, "nl_connect(%p): socket() failed with %d (%s)\n", sk, errsv,
-- strerror_r(errsv, buf, sizeof(buf)));
-+ nl_strerror_l(errsv));
- err = -nl_syserr2nlerr(errsv);
- goto errout;
- }
-@@ -158,7 +158,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
- _nl_socket_used_ports_set(used_ports, port);
- } else {
- NL_DBG(4, "nl_connect(%p): bind() for port %u failed with %d (%s)\n",
-- sk, (unsigned) port, errsv, strerror_r(errsv, buf, sizeof(buf)));
-+ sk, (unsigned) port, errsv, nl_strerror_l(errsv));
- _nl_socket_used_ports_release_all(used_ports);
- err = -nl_syserr2nlerr(errsv);
- goto errout;
-@@ -172,7 +172,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
- if (err != 0) {
- errsv = errno;
- NL_DBG(4, "nl_connect(%p): bind() failed with %d (%s)\n",
-- sk, errsv, strerror_r(errsv, buf, sizeof(buf)));
-+ sk, errsv, nl_strerror_l(errsv));
- err = -nl_syserr2nlerr(errsv);
- goto errout;
- }
-@@ -183,7 +183,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
- &addrlen);
- if (err < 0) {
- NL_DBG(4, "nl_connect(%p): getsockname() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, errno, nl_strerror_l(errno));
- err = -nl_syserr2nlerr(errno);
- goto errout;
- }
-@@ -280,10 +280,8 @@ int nl_sendto(struct nl_sock *sk, void *buf, size_t size)
- ret = sendto(sk->s_fd, buf, size, 0, (struct sockaddr *)
- &sk->s_peer, sizeof(sk->s_peer));
- if (ret < 0) {
-- char errbuf[64];
--
- NL_DBG(4, "nl_sendto(%p): sendto() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-@@ -343,10 +341,8 @@ int nl_sendmsg(struct nl_sock *sk, struct nl_msg *msg, struct msghdr *hdr)
-
- ret = sendmsg(sk->s_fd, hdr, 0);
- if (ret < 0) {
-- char errbuf[64];
--
- NL_DBG(4, "nl_sendmsg(%p): sendmsg() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-@@ -706,15 +702,13 @@ retry:
- goto abort;
- }
- if (n < 0) {
-- char errbuf[64];
--
- if (errno == EINTR) {
- NL_DBG(3, "recvmsg() returned EINTR, retrying\n");
- goto retry;
- }
-
- NL_DBG(4, "nl_sendmsg(%p): nl_recv() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf)));
-+ sk, errno, nl_strerror_l(errno));
- retval = -nl_syserr2nlerr(errno);
- goto abort;
- }
-@@ -980,10 +974,8 @@ continue_reading:
- goto out;
- }
- } else if (e->error) {
-- char buf[64];
--
- NL_DBG(4, "recvmsgs(%p): RTNETLINK responded with %d (%s)\n",
-- sk, -e->error, strerror_r(-e->error, buf, sizeof(buf)));
-+ sk, -e->error, nl_strerror_l(-e->error));
-
- /* Error message reported back from kernel. */
- if (cb->cb_err) {
-diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c
-index 7347ed2..21b67b1 100644
---- a/lib/route/route_obj.c
-+++ b/lib/route/route_obj.c
-@@ -31,6 +31,7 @@
- */
-
- #include <netlink-private/netlink.h>
-+#include <netlink-private/utils.h>
- #include <netlink/netlink.h>
- #include <netlink/cache.h>
- #include <netlink/utils.h>
-@@ -259,7 +260,7 @@ static void route_dump_details(struct nl_object *a, struct nl_dump_params *p)
- if ((r->ce_mask & ROUTE_ATTR_CACHEINFO) && r->rt_cacheinfo.rtci_error) {
- nl_dump_line(p, " cacheinfo error %d (%s)\n",
- r->rt_cacheinfo.rtci_error,
-- strerror_r(-r->rt_cacheinfo.rtci_error, buf, sizeof(buf)));
-+ nl_strerror_l(-r->rt_cacheinfo.rtci_error));
- }
-
- if (r->ce_mask & ROUTE_ATTR_METRICS) {
-diff --git a/lib/socket.c b/lib/socket.c
-index 97b2f69..55153b4 100644
---- a/lib/socket.c
-+++ b/lib/socket.c
-@@ -33,6 +33,7 @@
-
- #include <netlink-private/netlink.h>
- #include <netlink-private/socket.h>
-+#include <netlink-private/utils.h>
- #include <netlink/netlink.h>
- #include <netlink/utils.h>
- #include <netlink/handlers.h>
-@@ -449,11 +450,9 @@ int nl_socket_add_memberships(struct nl_sock *sk, int group, ...)
- err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP,
- &group, sizeof(group));
- if (err < 0) {
-- char buf[64];
--
- va_end(ap);
- NL_DBG(4, "nl_socket_add_memberships(%p): setsockopt() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-@@ -501,11 +500,9 @@ int nl_socket_drop_memberships(struct nl_sock *sk, int group, ...)
- err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP,
- &group, sizeof(group));
- if (err < 0) {
-- char buf[64];
--
- va_end(ap);
- NL_DBG(4, "nl_socket_drop_memberships(%p): setsockopt() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-@@ -619,7 +616,6 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd)
- {
- int err = 0;
- socklen_t addrlen;
-- char buf[64];
- struct sockaddr_nl local = { 0 };
- int so_type = -1, so_protocol = -1;
-
-@@ -633,7 +629,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd)
- &addrlen);
- if (err < 0) {
- NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockname() failed with %d (%s)\n",
-- sk, fd, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, fd, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
- if (addrlen != sizeof(local))
-@@ -648,7 +644,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd)
- err = getsockopt(fd, SOL_SOCKET, SO_TYPE, &so_type, &addrlen);
- if (err < 0) {
- NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockopt() for SO_TYPE failed with %d (%s)\n",
-- sk, fd, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, fd, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
- if (addrlen != sizeof(so_type))
-@@ -666,7 +662,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd)
- if (errno == ENOPROTOOPT)
- goto no_so_protocol;
- NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockopt() for SO_PROTOCOL failed with %d (%s)\n",
-- sk, fd, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, fd, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
- if (addrlen != sizeof(so_protocol))
-@@ -709,10 +705,8 @@ int nl_socket_set_nonblocking(const struct nl_sock *sk)
- return -NLE_BAD_SOCK;
-
- if (fcntl(sk->s_fd, F_SETFL, O_NONBLOCK) < 0) {
-- char buf[64];
--
- NL_DBG(4, "nl_socket_set_nonblocking(%p): fcntl() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-@@ -813,7 +807,6 @@ int nl_socket_modify_err_cb(struct nl_sock *sk, enum nl_cb_kind kind,
- int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf)
- {
- int err;
-- char buf[64];
-
- if (rxbuf <= 0)
- rxbuf = 32768;
-@@ -828,7 +821,7 @@ int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf)
- &txbuf, sizeof(txbuf));
- if (err < 0) {
- NL_DBG(4, "nl_socket_set_buffer_size(%p): setsockopt() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-@@ -836,7 +829,7 @@ int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf)
- &rxbuf, sizeof(rxbuf));
- if (err < 0) {
- NL_DBG(4, "nl_socket_set_buffer_size(%p): setsockopt() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-@@ -890,10 +883,8 @@ int nl_socket_set_passcred(struct nl_sock *sk, int state)
- err = setsockopt(sk->s_fd, SOL_SOCKET, SO_PASSCRED,
- &state, sizeof(state));
- if (err < 0) {
-- char buf[64];
--
- NL_DBG(4, "nl_socket_set_passcred(%p): setsockopt() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
-@@ -922,10 +913,8 @@ int nl_socket_recv_pktinfo(struct nl_sock *sk, int state)
- err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_PKTINFO,
- &state, sizeof(state));
- if (err < 0) {
-- char buf[64];
--
- NL_DBG(4, "nl_socket_recv_pktinfo(%p): setsockopt() failed with %d (%s)\n",
-- sk, errno, strerror_r(errno, buf, sizeof(buf)));
-+ sk, errno, nl_strerror_l(errno));
- return -nl_syserr2nlerr(errno);
- }
-
---
-2.9.3
-
diff --git a/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch b/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch
deleted file mode 100644
index a0f5a78092..0000000000
--- a/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 6c2d111177e91184073c44f83d4a6182aaba06d7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Thu, 25 Aug 2016 13:15:01 +0100
-Subject: [PATCH 3/3] src: switch to using strerror_l() instead of strerror_r()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-glibc provides two versions of strerror_r(), which
-can be chosen between using feature test macros
-_GNU_SOURCE and _POSIX_C_SOURCE. libnl is built using
-the former, hence we get the glibc special version,
-and all code so far has been written for this.
-
-Other C libraries like musl on the other hand only try
-to be posix compliant, and only ever provide the posix
-version of strerror_r(), which has a different signature.
-
-Uses in libnl hence generally cause printf() of an *int*
-with a *string format* specifier for that reason.
-
-Additionally, strerror_r() has been deprecated:
- http://austingroupbugs.net/view.php?id=655
-
-Switch to using strerror_l().
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
-Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
-Signed-off-by: Thomas Haller <thaller@redhat.com>
----
-Upstream-Status: Backport https://github.com/thom311/libnl/commit/6c2d111177e91184073c44f83d4a6182aaba06d7
- src/lib/utils.c | 20 +++++++++++++++++---
- 1 file changed, 17 insertions(+), 3 deletions(-)
-
-diff --git a/src/lib/utils.c b/src/lib/utils.c
-index 467aaed..5878f27 100644
---- a/src/lib/utils.c
-+++ b/src/lib/utils.c
-@@ -22,6 +22,7 @@
- */
-
- #include <netlink/cli/utils.h>
-+#include <locale.h>
-
- /**
- * Parse a text based 32 bit unsigned integer argument
-@@ -70,7 +71,6 @@ void nl_cli_print_version(void)
- void nl_cli_fatal(int err, const char *fmt, ...)
- {
- va_list ap;
-- char buf[256];
-
- fprintf(stderr, "Error: ");
-
-@@ -79,8 +79,22 @@ void nl_cli_fatal(int err, const char *fmt, ...)
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- fprintf(stderr, "\n");
-- } else
-- fprintf(stderr, "%s\n", strerror_r(err, buf, sizeof(buf)));
-+ } else {
-+ char *buf;
-+ locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0);
-+ if (loc == (locale_t)0) {
-+ if (errno == ENOENT)
-+ loc = newlocale(LC_MESSAGES_MASK,
-+ "POSIX", (locale_t)0);
-+ if (loc == (locale_t)0)
-+ buf = "newlocale() failed";
-+ }
-+ if (loc != (locale_t)0)
-+ buf = strerror_l(err, loc);
-+ fprintf(stderr, "%s\n", buf);
-+ if (loc != (locale_t)0)
-+ freelocale(loc);
-+ }
-
- exit(abs(err));
- }
---
-2.9.3
-
diff --git a/meta/recipes-support/libnl/libnl/fix-pc-file.patch b/meta/recipes-support/libnl/libnl/fix-pc-file.patch
deleted file mode 100644
index fe8b833a1c..0000000000
--- a/meta/recipes-support/libnl/libnl/fix-pc-file.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-Some packages are asking only for libnl-2.0, but expects to get also
-libnl-genl, libnl-nf libnl-route, easiest way to fix them is here.
-
-Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-Index: libnl-3.2.14/libnl-3.0.pc.in
-===================================================================
---- libnl-3.2.14.orig/libnl-3.0.pc.in
-+++ libnl-3.2.14/libnl-3.0.pc.in
-@@ -6,5 +6,5 @@ includedir=@includedir@
- Name: libnl
- Description: Convenience library for netlink sockets
- Version: @PACKAGE_VERSION@
--Libs: -L${libdir} -lnl-@MAJ_VERSION@
-+Libs: -L${libdir} -lnl-@MAJ_VERSION@ -lnl-genl-@MAJ_VERSION@ -lnl-nf-@MAJ_VERSION@ -lnl-route-@MAJ_VERSION@
- Cflags: -I${includedir}/libnl@MAJ_VERSION@
diff --git a/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
deleted file mode 100644
index 79aa0bdf11..0000000000
--- a/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-libnl has progressed to 0.3.2 and there does not appear to be any
-"make -j" issues with this build after my limited testing on that
-newer version so we can assume this issue is fixed upstream
-
-Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-
-Index: libnl-3.2.25/lib/Makefile.am
-===================================================================
---- libnl-3.2.25.orig/lib/Makefile.am
-+++ libnl-3.2.25/lib/Makefile.am
-@@ -46,9 +46,12 @@ CLEANFILES = \
-
- # Hack to avoid using ylwrap. It does not function correctly in combination
- # with --header-file=
-+route/pktloc.lo: route/pktloc_syntax.h route/pktloc_grammar.h
-+route/pktloc_grammar.h: route/pktloc_grammar.c
- route/pktloc_grammar.c: route/pktloc_grammar.l
- $(AM_V_GEN) $(MKDIR_P) route; $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
-
-+route/pktloc_syntax.h: route/pktloc_syntax.c
- route/pktloc_syntax.c: route/pktloc_syntax.y
- $(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^
-
-@@ -102,7 +105,9 @@ BUILT_SOURCES = \
- route/cls/ematch_grammar.c \
- route/cls/ematch_syntax.c \
- route/pktloc_grammar.c \
-- route/pktloc_syntax.c
-+ route/pktloc_syntax.c \
-+ route/pktloc_syntax.h \
-+ route/pktloc_grammar.h
-
- EXTRA_DIST = \
- route/pktloc_grammar.l \
diff --git a/meta/recipes-support/libnl/libnl_3.2.28.bb b/meta/recipes-support/libnl/libnl_3.2.28.bb
deleted file mode 100644
index 26982f3efb..0000000000
--- a/meta/recipes-support/libnl/libnl_3.2.28.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "A library for applications dealing with netlink sockets"
-HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
-SECTION = "libs/network"
-
-PE = "1"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "flex-native bison-native"
-
-SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV', True).replace('.','_')}/${BP}.tar.gz \
- file://fix-pktloc_syntax_h-race.patch \
- file://fix-pc-file.patch \
- file://0001-lib-add-utility-function-nl_strerror_l.patch \
- file://0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch \
- file://0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch \
-"
-UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
-
-SRC_URI[md5sum] = "bab12db1eb94a42129f712a44be91a67"
-SRC_URI[sha256sum] = "cd608992c656e8f6e3ab6c1391b162a5a51c49336b9219f7f390e61fc5437c41"
-
-inherit autotools pkgconfig
-
-FILES_${PN} = "${libdir}/libnl-3.so.* \
- ${libdir}/libnl.so.* \
- ${sysconfdir}"
-RREPLACES_${PN} = "libnl2"
-RCONFLICTS_${PN} = "libnl2"
-FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la"
-FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
-
-PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
-FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
- ${libdir}/libnl/cli/*/*.so \
- ${bindir}/genl-ctrl-list \
- ${bindir}/idiag-socket-details \
- ${bindir}/nf-* \
- ${bindir}/nl-*"
-FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
- ${libdir}/libnl-genl.so.*"
-FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
-FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
-FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
-FILES_${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*"
-RREPLACES_${PN}-genl = "libnl-genl2"
-RCONFLICTS_${PN}-genl = "libnl-genl2"
diff --git a/meta/recipes-support/libnl/libnl_3.5.0.bb b/meta/recipes-support/libnl/libnl_3.5.0.bb
new file mode 100644
index 0000000000..c0609c4d90
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl_3.5.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "A library for applications dealing with netlink sockets"
+HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
+SECTION = "libs/network"
+
+PE = "1"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz"
+SRC_URI[md5sum] = "74ba57b1b1d6f9f92268aa8141d8e8e4"
+SRC_URI[sha256sum] = "352133ec9545da76f77e70ccb48c9d7e5324d67f6474744647a7ed382b5e05fa"
+
+UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
+
+inherit autotools pkgconfig
+
+FILES_${PN} = "${libdir}/libnl-3.so.* \
+ ${libdir}/libnl.so.* \
+ ${sysconfdir}"
+RREPLACES_${PN} = "libnl2"
+RCONFLICTS_${PN} = "libnl2"
+FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la"
+FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
+
+PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
+FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
+ ${libdir}/libnl/cli/*/*.so \
+ ${bindir}/genl-ctrl-list \
+ ${bindir}/idiag-socket-details \
+ ${bindir}/nf-* \
+ ${bindir}/nl-*"
+FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
+ ${libdir}/libnl-genl.so.*"
+FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
+FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
+FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
+FILES_${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*"
+RREPLACES_${PN}-genl = "libnl-genl2"
+RCONFLICTS_${PN}-genl = "libnl-genl2"
diff --git a/meta/recipes-support/libpcre/libpcre/out-of-tree.patch b/meta/recipes-support/libpcre/libpcre/out-of-tree.patch
new file mode 100644
index 0000000000..d56789615f
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre/out-of-tree.patch
@@ -0,0 +1,26 @@
+In out-of-tree builds the #include fails because $srcdir isn't in the include path. Set CPPFLAGS so that it is.
+
+Upstream-Status: Backport [r1750]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Index: configure.ac
+===================================================================
+--- a/configure.ac (revision 1749)
++++ b/configure.ac (working copy)
+@@ -159,6 +159,8 @@
+
+ if test "$enable_jit" = "auto"; then
+ AC_LANG(C)
++ SAVE_CPPFLAGS=$CPPFLAGS
++ CPPFLAGS=-I$srcdir
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #define SLJIT_CONFIG_AUTO 1
+ #include "sljit/sljitConfigInternal.h"
+@@ -165,6 +167,7 @@
+ #if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+ #error unsupported
+ #endif]])], enable_jit=yes, enable_jit=no)
++ CPPFLAGS=$SAVE_CPPFLAGS
+ fi
+
+ # Handle --disable-pcregrep-jit (enabled by default)
diff --git a/meta/recipes-support/libpcre/libpcre/pcre-cross.patch b/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
deleted file mode 100644
index 83880f7098..0000000000
--- a/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Upstream-Status: Pending
-
---- pcre-8.32.orig/Makefile.am
-+++ pcre-8.32/Makefile.am
-@@ -197,8 +197,18 @@ bin_SCRIPTS = pcre-config
-
-+CC_FOR_BUILD = @CC_FOR_BUILD@
-+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
-+CCLD_FOR_BUILD = @CCLD_FOR_BUILD@
-+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
-+
- if WITH_REBUILD_CHARTABLES
-
- noinst_PROGRAMS += dftables
- dftables_SOURCES = dftables.c
-+dftables_LINK = $(CCLD_FOR_BUILD) -o $@
-+dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD)
-+
-+dftables.o: $(srcdir)/dftables.c
-+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/dftables.c
-
- pcre_chartables.c: dftables$(EXEEXT)
- ./dftables$(EXEEXT) $@
---- pcre-8.32.orig/configure.ac
-+++ pcre-8.32/configure.ac
-@@ -72,6 +72,22 @@ then
- fi
- fi
-
-+if test x"$cross_compiling" = xyes; then
-+ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
-+ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}"
-+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}"
-+ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}"
-+else
-+ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}"
-+ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}"
-+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}"
-+ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}"
-+fi
-+AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler])
-+AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend])
-+AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments])
-+AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments])
-+
- # AC_PROG_CXX will return "g++" even if no c++ compiler is installed.
- # Check for that case, and just disable c++ code if g++ doesn't run.
- AC_LANG_PUSH(C++)
diff --git a/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch b/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
new file mode 100644
index 0000000000..871cdfcb7d
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
@@ -0,0 +1,65 @@
+Fix for cross compiling
+
+Fixed:
+| ./dftables src/pcre2_chartables.c
+| make: ./dftables: Command not found
+| make: *** [src/pcre2_chartables.c] Error 127
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Index: pcre2-10.30/Makefile.am
+===================================================================
+--- pcre2-10.30.orig/Makefile.am
++++ pcre2-10.30/Makefile.am
+@@ -325,9 +325,21 @@ bin_SCRIPTS = pcre2-config
+ ## to copy a distributed set of tables that are defined for ASCII code. In this
+ ## case, dftables is not needed.
+
++CC_FOR_BUILD = @CC_FOR_BUILD@
++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
++CCLD_FOR_BUILD = @CCLD_FOR_BUILD@
++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
++
+ if WITH_REBUILD_CHARTABLES
+ noinst_PROGRAMS += dftables
+ dftables_SOURCES = src/dftables.c
++
++dftables_LINK = $(CCLD_FOR_BUILD) -o $@
++dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD)
++
++src/dftables.o: $(srcdir)/src/dftables.c
++ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/src/dftables.c
++
+ src/pcre2_chartables.c: dftables$(EXEEXT)
+ rm -f $@
+ ./dftables$(EXEEXT) $@
+Index: pcre2-10.30/configure.ac
+===================================================================
+--- pcre2-10.30.orig/configure.ac
++++ pcre2-10.30/configure.ac
+@@ -60,6 +60,23 @@ fi
+ # This is a new thing required to stop a warning from automake 1.12
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+
++if test x"$cross_compiling" = xyes; then
++ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}"
++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}"
++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}"
++else
++ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}"
++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}"
++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}"
++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}"
++fi
++AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler])
++AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend])
++AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments])
++AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments])
++
++
+ # Check for a 64-bit integer type
+ AC_TYPE_INT64_T
+
diff --git a/meta/recipes-support/libpcre/libpcre2_10.33.bb b/meta/recipes-support/libpcre/libpcre2_10.33.bb
new file mode 100644
index 0000000000..87da313769
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre2_10.33.bb
@@ -0,0 +1,61 @@
+DESCRIPTION = "There are two major versions of the PCRE library. The \
+newest version is PCRE2, which is a re-working of the original PCRE \
+library to provide an entirely new API. The original, very widely \
+deployed PCRE library's API and feature are stable, future releases \
+ will be for bugfixes only. All new future features will be to PCRE2, \
+not the original PCRE 8.x series."
+SUMMARY = "Perl Compatible Regular Expressions version 2"
+HOMEPAGE = "http://www.pcre.org"
+SECTION = "devel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=b1588d3bb4cb0e1f5a597d908f8c5b37"
+
+SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2 \
+ file://pcre-cross.patch \
+"
+
+SRC_URI[md5sum] = "80b355f2dce909a2e2424f5c79eddb44"
+SRC_URI[sha256sum] = "35514dff0ccdf02b55bd2e9fa586a1b9d01f62332c3356e379eabb75f789d8aa"
+
+CVE_PRODUCT = "pcre2"
+
+S = "${WORKDIR}/pcre2-${PV}"
+
+PROVIDES += "pcre2"
+DEPENDS += "bzip2 zlib"
+
+BINCONFIG = "${bindir}/pcre2-config"
+
+inherit autotools binconfig-disabled
+
+EXTRA_OECONF = "\
+ --enable-newline-is-lf \
+ --enable-rebuild-chartables \
+ --with-link-size=2 \
+ --with-match-limit=10000000 \
+ --enable-pcre2-16 \
+ --enable-pcre2-32 \
+"
+# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
+# set CFLAGS_FOR_BUILD, required for the libpcre build.
+BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}/src"
+CFLAGS += "-D_REENTRANT"
+CXXFLAGS_append_powerpc = " -lstdc++"
+
+export CCLD_FOR_BUILD ="${BUILD_CCLD}"
+
+PACKAGES =+ "libpcre2-16 libpcre2-32 pcre2grep pcre2grep-doc pcre2test pcre2test-doc"
+
+SUMMARY_pcre2grep = "grep utility that uses perl 5 compatible regexes"
+SUMMARY_pcre2grep-doc = "grep utility that uses perl 5 compatible regexes - docs"
+SUMMARY_pcre2test = "program for testing Perl-comatible regular expressions"
+SUMMARY_pcre2test-doc = "program for testing Perl-comatible regular expressions - docs"
+
+FILES_libpcre2-16 = "${libdir}/libpcre2-16.so.*"
+FILES_libpcre2-32 = "${libdir}/libpcre2-32.so.*"
+FILES_pcre2grep = "${bindir}/pcre2grep"
+FILES_pcre2grep-doc = "${mandir}/man1/pcre2grep.1"
+FILES_pcre2test = "${bindir}/pcre2test"
+FILES_pcre2test-doc = "${mandir}/man1/pcre2test.1"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libpcre/libpcre_8.39.bb b/meta/recipes-support/libpcre/libpcre_8.39.bb
deleted file mode 100644
index 2d4668b52d..0000000000
--- a/meta/recipes-support/libpcre/libpcre_8.39.bb
+++ /dev/null
@@ -1,81 +0,0 @@
-DESCRIPTION = "The PCRE library is a set of functions that implement regular \
-expression pattern matching using the same syntax and semantics as Perl 5. PCRE \
-has its own native API, as well as a set of wrapper functions that correspond \
-to the POSIX regular expression API."
-SUMMARY = "Perl Compatible Regular Expressions"
-HOMEPAGE = "http://www.pcre.org"
-SECTION = "devel"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=b8221cbf43c5587f90ccf228f1185cc2"
-SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2 \
- file://pcre-cross.patch \
- file://fix-pcre-name-collision.patch \
- file://run-ptest \
- file://Makefile \
-"
-
-SRC_URI[md5sum] = "e3fca7650a0556a2647821679d81f585"
-SRC_URI[sha256sum] = "b858099f82483031ee02092711689e7245586ada49e534a06e678b8ea9549e8b"
-
-S = "${WORKDIR}/pcre-${PV}"
-
-PROVIDES += "pcre"
-DEPENDS += "bzip2 zlib"
-
-PACKAGECONFIG ??= "pcre8 unicode-properties"
-
-PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
-PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
-PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
-PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
-PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
-
-BINCONFIG = "${bindir}/pcre-config"
-
-inherit autotools binconfig-disabled ptest
-
-EXTRA_OECONF = "\
- --enable-newline-is-lf \
- --enable-rebuild-chartables \
- --enable-utf \
- --with-link-size=2 \
- --with-match-limit=10000000 \
-"
-
-# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
-# set CFLAGS_FOR_BUILD, required for the libpcre build.
-BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}"
-CFLAGS += "-D_REENTRANT"
-CXXFLAGS_append_powerpc = " -lstdc++"
-
-export CCLD_FOR_BUILD ="${BUILD_CCLD}"
-
-PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
-
-SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
-SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
-SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
-SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
-SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
-SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
-
-FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
-FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
-FILES_pcregrep = "${bindir}/pcregrep"
-FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
-FILES_pcretest = "${bindir}/pcretest"
-FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}
- cp ${WORKDIR}/Makefile $t
- cp -r ${S}/testdata $t
- for i in pcre_stringpiece_unittest pcregrep pcretest; \
- do cp ${B}/.libs/$i $t; \
- done
- for i in RunTest RunGrepTest test-driver; \
- do cp ${S}/$i $t; \
- done
-}
diff --git a/meta/recipes-support/libpcre/libpcre_8.43.bb b/meta/recipes-support/libpcre/libpcre_8.43.bb
new file mode 100644
index 0000000000..f9a22fee9d
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre_8.43.bb
@@ -0,0 +1,76 @@
+DESCRIPTION = "The PCRE library is a set of functions that implement regular \
+expression pattern matching using the same syntax and semantics as Perl 5. PCRE \
+has its own native API, as well as a set of wrapper functions that correspond \
+to the POSIX regular expression API."
+SUMMARY = "Perl Compatible Regular Expressions"
+HOMEPAGE = "http://www.pcre.org"
+SECTION = "devel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=91bee59d1b327eb1599b4c673e2fb3d1"
+SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \
+ file://fix-pcre-name-collision.patch \
+ file://out-of-tree.patch \
+ file://run-ptest \
+ file://Makefile \
+"
+
+SRC_URI[md5sum] = "636222e79e392c3d95dcc545f24f98c4"
+SRC_URI[sha256sum] = "91e762520003013834ac1adb4a938d53b22a216341c061b0cf05603b290faf6b"
+
+CVE_PRODUCT = "pcre"
+
+S = "${WORKDIR}/pcre-${PV}"
+
+PROVIDES += "pcre"
+DEPENDS += "bzip2 zlib"
+
+PACKAGECONFIG ??= "pcre8 unicode-properties jit"
+
+PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
+PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
+PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
+PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
+PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
+PACKAGECONFIG[jit] = "--enable-jit=auto,--disable-jit"
+
+BINCONFIG = "${bindir}/pcre-config"
+
+inherit autotools binconfig-disabled ptest
+
+EXTRA_OECONF = "--enable-utf"
+
+PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
+
+SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
+SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
+SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
+SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
+SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
+SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
+
+FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
+FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
+FILES_pcregrep = "${bindir}/pcregrep"
+FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
+FILES_pcretest = "${bindir}/pcretest"
+FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ cp ${WORKDIR}/Makefile $t
+ cp -r ${S}/testdata $t
+ for i in pcre_stringpiece_unittest pcregrep pcretest; \
+ do cp ${B}/.libs/$i $t; \
+ done
+ for i in RunTest RunGrepTest test-driver; \
+ do cp ${S}/$i $t; \
+ done
+ # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested.
+ # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8
+ # locale so the test fails if fr_FR is UTF-8 locale.
+ sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest
+}
+
+RDEPENDS_${PN}-ptest += "make"
diff --git a/meta/recipes-support/libproxy/libproxy/0001-get-pac-test-Fix-build-with-clang-libc.patch b/meta/recipes-support/libproxy/libproxy/0001-get-pac-test-Fix-build-with-clang-libc.patch
new file mode 100644
index 0000000000..fedda9dd95
--- /dev/null
+++ b/meta/recipes-support/libproxy/libproxy/0001-get-pac-test-Fix-build-with-clang-libc.patch
@@ -0,0 +1,31 @@
+From 2d73469c7a17ebfe4330ac6643b0c8abdc125d05 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Jan 2019 09:29:44 -0800
+Subject: [PATCH] get-pac-test: Fix build with clang/libc++
+
+get-pac-test.cpp:55:10: error: assigning to 'int' from incompatible type '__bind<int &, sockaddr *, unsigned int>'
+ ret = bind(m_sock, (sockaddr*)&addr, sizeof (struct sockaddr_in)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/libproxy/libproxy/pull/97]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libproxy/test/get-pac-test.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libproxy/test/get-pac-test.cpp b/libproxy/test/get-pac-test.cpp
+index 0059dfb..911f296 100644
+--- a/libproxy/test/get-pac-test.cpp
++++ b/libproxy/test/get-pac-test.cpp
+@@ -52,7 +52,7 @@ class TestServer {
+
+ setsockopt(m_sock, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i));
+
+- ret = bind(m_sock, (sockaddr*)&addr, sizeof (struct sockaddr_in));
++ ret = ::bind(m_sock, (sockaddr*)&addr, sizeof (struct sockaddr_in));
+ assert(!ret);
+
+ ret = listen(m_sock, 1);
+--
+2.20.1
+
diff --git a/meta/recipes-support/libproxy/libproxy_0.4.13.bb b/meta/recipes-support/libproxy/libproxy_0.4.13.bb
deleted file mode 100644
index 3940e228d3..0000000000
--- a/meta/recipes-support/libproxy/libproxy_0.4.13.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Library providing automatic proxy configuration management"
-HOMEPAGE = "https://github.com/libproxy/libproxy"
-BUGTRACKER = "https://github.com/libproxy/libproxy/issues"
-SECTION = "libs"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/archive/${PV}.tar.gz"
-
-UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases"
-
-SRC_URI[md5sum] = "de293bb311f185a2ffa3492700a694c2"
-SRC_URI[sha256sum] = "d610bc0ef81a18ba418d759c5f4f87bf7102229a9153fb397d7d490987330ffd"
-
-inherit cmake pkgconfig
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
-PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
-PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
-
-EXTRA_OECMAKE += " \
- -DWITH_KDE4=no \
- -DWITH_MOZJS=no \
- -DWITH_NM=no \
- -DWITH_PERL=no \
- -DWITH_PYTHON=no \
- -DWITH_WEBKIT=no \
- -DLIB_INSTALL_DIR=${libdir} \
- -DLIBEXEC_INSTALL_DIR=${libexecdir} \
-"
-
-FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
-FILES_${PN}-dev += "${datadir}/cmake"
diff --git a/meta/recipes-support/libproxy/libproxy_0.4.15.bb b/meta/recipes-support/libproxy/libproxy_0.4.15.bb
new file mode 100644
index 0000000000..19dddebd44
--- /dev/null
+++ b/meta/recipes-support/libproxy/libproxy_0.4.15.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Library providing automatic proxy configuration management"
+HOMEPAGE = "https://github.com/libproxy/libproxy"
+BUGTRACKER = "https://github.com/libproxy/libproxy/issues"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+ file://0001-get-pac-test-Fix-build-with-clang-libc.patch \
+ "
+SRC_URI[md5sum] = "f6b1d2a1e17a99cd3debaae6d04ab152"
+SRC_URI[sha256sum] = "654db464120c9534654590b6683c7fa3887b3dad0ca1c4cd412af24fbfca6d4f"
+
+UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases"
+UPSTREAM_CHECK_REGEX = "libproxy-(?P<pver>.*)\.tar"
+
+inherit cmake pkgconfig
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
+PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
+PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
+
+EXTRA_OECMAKE += " \
+ -DWITH_KDE=no \
+ -DWITH_MOZJS=no \
+ -DWITH_NM=no \
+ -DWITH_PERL=no \
+ -DWITH_PYTHON2=no \
+ -DWITH_PYTHON3=no \
+ -DWITH_WEBKIT=no \
+ -DLIB_INSTALL_DIR=${libdir} \
+ -DLIBEXEC_INSTALL_DIR=${libexecdir} \
+"
+SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
+
+FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
diff --git a/meta/recipes-support/libpsl/libpsl/0001-Makefile.am-use-PYTHON-when-invoking-psl-make-dafsa.patch b/meta/recipes-support/libpsl/libpsl/0001-Makefile.am-use-PYTHON-when-invoking-psl-make-dafsa.patch
new file mode 100644
index 0000000000..6d6ccf4d25
--- /dev/null
+++ b/meta/recipes-support/libpsl/libpsl/0001-Makefile.am-use-PYTHON-when-invoking-psl-make-dafsa.patch
@@ -0,0 +1,50 @@
+From a0e6f0ec9dc6dd1db1c03f7f273cc16cb3af5561 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 11 Jul 2019 17:47:11 +0100
+Subject: [PATCH] Makefile.am: use PYTHON when invoking psl-make-dafsa
+
+In an environment where only Python 3 is installed, configure.ac finds and sets
+PYTHON=python3 correctly but src/psl-make-dafsa is called directly, so the hashbang of
+`#!/usr/bin/env python` is used which doesn't exist.
+
+Fix this by explicitly running $(PYTHON) when using the tool.
+
+Upstream-Status: Backport [https://github.com/rockdaboot/libpsl/commit/b4fec5d0ddb70fc4f5360eb14f2f5c5e91194333]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/Makefile.am | 2 +-
+ tests/Makefile.am | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index f9c0a3d..a05ea05 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -19,7 +19,7 @@ libpsl_la_LDFLAGS = -no-undefined -version-info $(LIBPSL_SO_VERSION)
+ # Build rule for suffix_dafsa.c
+ # PSL_FILE can be set by ./configure --with-psl-file=[PATH]
+ suffixes_dafsa.h: $(PSL_FILE) $(srcdir)/psl-make-dafsa
+- $(srcdir)/psl-make-dafsa --output-format=cxx+ "$(PSL_FILE)" suffixes_dafsa.h
++ $(PYTHON) $(srcdir)/psl-make-dafsa --output-format=cxx+ "$(PSL_FILE)" suffixes_dafsa.h
+
+ EXTRA_DIST = psl-make-dafsa LICENSE.chromium
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 8b29b61..28a9a0b 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -34,9 +34,9 @@ TESTS = $(PSL_TESTS)
+ # check-local target works in parallel to the tests, so the test suite will likely fail
+ BUILT_SOURCES = psl.dafsa psl_ascii.dafsa
+ psl.dafsa: $(top_srcdir)/list/public_suffix_list.dat
+- $(top_srcdir)/src/psl-make-dafsa --output-format=binary "$(PSL_FILE)" psl.dafsa
++ $(PYTHON) $(top_srcdir)/src/psl-make-dafsa --output-format=binary "$(PSL_FILE)" psl.dafsa
+ psl_ascii.dafsa: $(top_srcdir)/list/public_suffix_list.dat
+- $(top_srcdir)/src/psl-make-dafsa --output-format=binary --encoding=ascii "$(PSL_FILE)" psl_ascii.dafsa
++ $(PYTHON) $(top_srcdir)/src/psl-make-dafsa --output-format=binary --encoding=ascii "$(PSL_FILE)" psl_ascii.dafsa
+
+ clean-local:
+ rm -f psl.dafsa psl_ascii.dafsa
+--
+2.17.1
+
diff --git a/meta/recipes-support/libpsl/libpsl/0001-gtk-doc-do-not-include-tree_index.sgml.patch b/meta/recipes-support/libpsl/libpsl/0001-gtk-doc-do-not-include-tree_index.sgml.patch
new file mode 100644
index 0000000000..c78d6fd981
--- /dev/null
+++ b/meta/recipes-support/libpsl/libpsl/0001-gtk-doc-do-not-include-tree_index.sgml.patch
@@ -0,0 +1,28 @@
+From 8691105e1808ec9b031b6c25f70204a0908ae9c1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sat, 1 Jun 2019 13:09:41 +0200
+Subject: [PATCH] gtk-doc: do not include tree_index.sgml
+
+gtk-doc 1.30 no longer generates the file if the object tree is empty
+
+Upstream-Status: Backport [87d1add318b5e5d09977f7f374e923577b6ff3be]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ docs/libpsl/libpsl-docs.sgml | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/docs/libpsl/libpsl-docs.sgml b/docs/libpsl/libpsl-docs.sgml
+index 1eca9a2..1c38dbc 100644
+--- a/docs/libpsl/libpsl-docs.sgml
++++ b/docs/libpsl/libpsl-docs.sgml
+@@ -22,10 +22,6 @@
+ </para>
+ <xi:include href="xml/libpsl.xml"/>
+ </chapter>
+- <chapter id="object-tree">
+- <title>Object Hierarchy</title>
+- <xi:include href="xml/tree_index.sgml"/>
+- </chapter>
+ <index id="api-index-full">
+ <title>API Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
diff --git a/meta/recipes-support/libpsl/libpsl_0.21.0.bb b/meta/recipes-support/libpsl/libpsl_0.21.0.bb
new file mode 100644
index 0000000000..9831b4b94f
--- /dev/null
+++ b/meta/recipes-support/libpsl/libpsl_0.21.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Public Suffix List library"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5437030d9e4fbe7267ced058ddb8a7f5 \
+ file://COPYING;md5=f41d10997a12da5ee3c24ceeb0148d18"
+
+SRC_URI = "https://github.com/rockdaboot/${BPN}/releases/download/${BP}/${BP}.tar.gz \
+ file://0001-gtk-doc-do-not-include-tree_index.sgml.patch \
+ file://0001-Makefile.am-use-PYTHON-when-invoking-psl-make-dafsa.patch \
+ "
+SRC_URI[md5sum] = "171e96d887709e36a57f4ee627bf82d2"
+SRC_URI[sha256sum] = "41bd1c75a375b85c337b59783f5deb93dbb443fb0a52d257f403df7bd653ee12"
+
+UPSTREAM_CHECK_URI = "https://github.com/rockdaboot/libpsl/releases"
+
+DEPENDS = "libidn2"
+
+inherit autotools gettext gtk-doc manpages pkgconfig lib_package
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[manpages] = "--enable-man,--disable-man,libxslt-native"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb
deleted file mode 100644
index b93a9fde73..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "An HTTP library implementation in C"
-HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome/libs"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
-
-SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
-
-SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "73b1fb774de16c29b380f87016f9f9dd"
-SRC_URI[sha256sum] = "47b42c232034734d66e5f093025843a5d8cc4b2357c011085a2fd04ef02dd633"
-
-S = "${WORKDIR}/libsoup-${PV}"
-
-inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
-
-# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
-PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
-
-EXTRA_OECONF = "--disable-vala"
-
-# When built without gnome support, libsoup-2.4 will contain only one shared lib
-# and will therefore become subject to renaming by debian.bbclass. Prevent
-# renaming in order to keep the package name consistent regardless of whether
-# gnome support is enabled or disabled.
-DEBIAN_NOAUTONAME_${PN} = "1"
-
-# glib-networking is needed for SSL, proxies, etc.
-RRECOMMENDS_${PN} = "glib-networking"
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.68.3.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.68.3.bb
new file mode 100644
index 0000000000..e8bc7d6470
--- /dev/null
+++ b/meta/recipes-support/libsoup/libsoup-2.4_2.68.3.bb
@@ -0,0 +1,43 @@
+SUMMARY = "An HTTP library implementation in C"
+HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome/libs"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native libpsl"
+
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
+
+SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
+SRC_URI[md5sum] = "29ee2ee7017945b64ede063b1396011c"
+SRC_URI[sha256sum] = "534bb08e35b0ff3702f3adfde87d3441e27c12f9f5ec351f056fe04cba02bafb"
+
+CVE_PRODUCT = "libsoup"
+
+S = "${WORKDIR}/libsoup-${PV}"
+
+inherit meson gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+
+GIR_MESON_ENABLE_FLAG = 'enabled'
+GIR_MESON_DISABLE_FLAG = 'disabled'
+
+# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gnome] = "-Dgnome=true,-Dgnome=false"
+PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
+
+EXTRA_OEMESON_append = " -Dvapi=disabled -Dtls_check=false"
+
+GTKDOC_MESON_OPTION = "gtk_doc"
+
+# When built without gnome support, libsoup-2.4 will contain only one shared lib
+# and will therefore become subject to renaming by debian.bbclass. Prevent
+# renaming in order to keep the package name consistent regardless of whether
+# gnome support is enabled or disabled.
+DEBIAN_NOAUTONAME_${PN} = "1"
+
+# glib-networking is needed for SSL, proxies, etc.
+RRECOMMENDS_${PN} = "glib-networking"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
index d4489165bf..9e8ce2270d 100644
--- a/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
+++ b/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
@@ -1,6 +1,6 @@
-From 8d99a368615656a835f5502326afd31cec2cebfe Mon Sep 17 00:00:00 2001
+From 30562065ba9e4c238e76100b5f9f0c5add0e635b Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
-Date: Mon, 16 Sep 2013 18:16:12 +0800
+Date: Tue, 5 Dec 2017 09:30:36 +0200
Subject: [PATCH] remove the test to convert euc-jp
Remove the test "Test against HP-UX 11.11 bug:
@@ -13,28 +13,44 @@ Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
- gnulib-m4/iconv.m4 | 11 -----------
- 1 files changed, 0 insertions(+), 11 deletions(-)
+---
+ gnulib-m4/iconv.m4 | 23 -----------------------
+ 1 file changed, 23 deletions(-)
-Index: libunistring-0.9.4/gnulib-m4/iconv.m4
-===================================================================
---- libunistring-0.9.4.orig/gnulib-m4/iconv.m4 2014-11-03 17:41:29.755011917 +0000
-+++ libunistring-0.9.4/gnulib-m4/iconv.m4 2014-11-03 17:43:03.795014480 +0000
-@@ -159,17 +159,6 @@
+diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4
+index b33ecd0..73b6aa1 100644
+--- a/gnulib-m4/iconv.m4
++++ b/gnulib-m4/iconv.m4
+@@ -165,29 +165,6 @@ AC_DEFUN([AM_ICONV_LINK],
}
}
#endif
- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
- provided. */
-- if (/* Try standardized names. */
-- iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
-- /* Try IRIX, OSF/1 names. */
-- && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
-- /* Try AIX names. */
-- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
-- /* Try HP-UX names. */
-- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-- result |= 16;
+- {
+- /* Try standardized names. */
+- iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+- /* Try IRIX, OSF/1 names. */
+- iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+- /* Try AIX names. */
+- iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+- /* Try HP-UX names. */
+- iconv_t cd4 = iconv_open ("utf8", "eucJP");
+- if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+- && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+- result |= 16;
+- if (cd1 != (iconv_t)(-1))
+- iconv_close (cd1);
+- if (cd2 != (iconv_t)(-1))
+- iconv_close (cd2);
+- if (cd3 != (iconv_t)(-1))
+- iconv_close (cd3);
+- if (cd4 != (iconv_t)(-1))
+- iconv_close (cd4);
+- }
return result;
- }]])],
- [am_cv_func_iconv_works=yes],
+ ]])],
+ [am_cv_func_iconv_works=yes], ,
+--
+2.4.0
+
diff --git a/meta/recipes-support/libunistring/libunistring_0.9.10.bb b/meta/recipes-support/libunistring/libunistring_0.9.10.bb
new file mode 100644
index 0000000000..97fac4ecfa
--- /dev/null
+++ b/meta/recipes-support/libunistring/libunistring_0.9.10.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for manipulating C and Unicode strings"
+
+DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
+ consist of very different scripts from Latin letters to Chinese Hanzi\
+ with many kinds of special characters accents, right-to-left writing\
+ marks, hyphens, Roman numbers, and much more. But the POSIX platform\
+ APIs for text do not contain adequate functions for dealing with\
+ particular properties of many Unicode characters. In fact, the POSIX\
+ APIs for text have several assumptions at their base which don't hold\
+ for Unicode text. This library provides functions for manipulating\
+ Unicode strings and for manipulating C strings according to the Unicode\
+ standard. This package contains documentation."
+
+HOMEPAGE = "http://www.gnu.org/software/libunistring/"
+SECTION = "devel"
+LICENSE = "LGPLv3+ | GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://README;beginline=45;endline=65;md5=08287d16ba8d839faed8d2dc14d7d6a5 \
+ file://doc/libunistring.texi;md5=287fa6075f78a3c85c1a52b0a92547cd \
+ "
+
+SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
+ file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+"
+SRC_URI[md5sum] = "0d3274e9838396b12200f8b54ddaf43b"
+SRC_URI[sha256sum] = "a82e5b333339a88ea4608e4635479a1cfb2e01aafb925e1290b65710d43f610b"
+
+inherit autotools texinfo
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libunistring/libunistring_0.9.6.bb b/meta/recipes-support/libunistring/libunistring_0.9.6.bb
deleted file mode 100644
index bb701227f2..0000000000
--- a/meta/recipes-support/libunistring/libunistring_0.9.6.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Library for manipulating C and Unicode strings"
-
-DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
- consist of very different scripts from Latin letters to Chinese Hanzi\
- with many kinds of special characters accents, right-to-left writing\
- marks, hyphens, Roman numbers, and much more. But the POSIX platform\
- APIs for text do not contain adequate functions for dealing with\
- particular properties of many Unicode characters. In fact, the POSIX\
- APIs for text have several assumptions at their base which don't hold\
- for Unicode text. This library provides functions for manipulating\
- Unicode strings and for manipulating C strings according to the Unicode\
- standard. This package contains documentation."
-
-HOMEPAGE = "http://www.gnu.org/software/libunistring/"
-SECTION = "devel"
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
-
-SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
- file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-"
-SRC_URI[md5sum] = "dfae4ff5583649ed24d8f368f1d0543b"
-SRC_URI[sha256sum] = "9625eec2507f4789ebb6fc48ebda98be0e0168979a2f68aa8b680bf8eeabbd47"
-
-inherit autotools texinfo
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libunwind/libunwind.inc b/meta/recipes-support/libunwind/libunwind.inc
index e4ae8df278..76a1bf6246 100644
--- a/meta/recipes-support/libunwind/libunwind.inc
+++ b/meta/recipes-support/libunwind/libunwind.inc
@@ -2,22 +2,21 @@ SUMMARY = "Library for obtaining the call-chain of a program"
DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
HOMEPAGE = "http://www.nongnu.org/libunwind"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3fced11d6df719b47505837a51c16ae5"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
DEPENDS += "libatomic-ops"
-inherit autotools
+inherit autotools multilib_header
PACKAGECONFIG ??= ""
PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
+PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native"
EXTRA_OECONF_arm = "--enable-debug-frame"
+EXTRA_OECONF_armeb = "--enable-debug-frame"
EXTRA_OECONF_aarch64 = "--enable-debug-frame"
-CFLAGS += "${ATOMICOPS}"
-ATOMICOPS_armv5 = "-DAO_USE_PTHREAD_DEFS=1"
-ATOMICOPS_armv4 = "-DAO_USE_PTHREAD_DEFS=1"
-ATOMICOPS ?= ""
-
-SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared -lssp"
+do_install_append () {
+ oe_multilib_header libunwind.h
+}
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libunwind/libunwind/0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/meta/recipes-support/libunwind/libunwind/0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
new file mode 100644
index 0000000000..437b878365
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
@@ -0,0 +1,62 @@
+From 599f10ac3a24e419a93f97fddbe14de01b1185ea Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Tue, 13 May 2014 23:32:27 +0200
+Subject: [PATCH 1/6] Add AO_REQUIRE_CAS to fix build on ARM < v6
+
+ARM earlier than ARMv6, such as ARMv4 and ARMv5 do not provide
+optimize atomic operations in libatomic_ops. Since libunwind is using
+such operations, it should define AO_REQUIRE_CAS before including
+<atomic_ops.h> so that libatomic_ops knows it should use emulated
+atomic operations instead (even though they are obviously a lot more
+expensive).
+
+Also, while real atomic operations are all inline functions and
+therefore linking against libatomic_ops was not required, the emulated
+atomic operations actually require linking against libatomic_ops, so
+the commented AC_CHECK_LIB test in acinclude.m4 is uncommented to make
+sure we link against libatomic_ops.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Pending
+Taken from:
+https://raw.githubusercontent.com/rdnetto/teapot-buildroot/master/package/libunwind/libunwind-02-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
+
+---
+ acinclude.m4 | 8 +-------
+ include/libunwind_i.h | 1 +
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 497f7c2..9c15af1 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -22,11 +22,5 @@ fi])
+ AC_DEFUN([CHECK_ATOMIC_OPS],
+ [dnl Check whether the system has the atomic_ops package installed.
+ AC_CHECK_HEADERS(atomic_ops.h)
+-#
+-# Don't link against libatomic_ops for now. We don't want libunwind
+-# to depend on libatomic_ops.so. Fortunately, none of the platforms
+-# we care about so far need libatomic_ops.a (everything is done via
+-# inline macros).
+-#
+-# AC_CHECK_LIB(atomic_ops, main)
++ AC_CHECK_LIB(atomic_ops, main)
+ ])
+diff --git a/include/libunwind_i.h b/include/libunwind_i.h
+index 36cf7a1..33b4ca3 100644
+--- a/include/libunwind_i.h
++++ b/include/libunwind_i.h
+@@ -124,6 +124,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+ (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
+
+ #ifdef HAVE_ATOMIC_OPS_H
++# define AO_REQUIRE_CAS
+ # include <atomic_ops.h>
+ static inline int
+ cmpxchg_ptr (void *addr, void *old, void *new)
+--
+2.20.1
+
diff --git a/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch b/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
deleted file mode 100644
index 8bcc252bad..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From e623c7703945a5eb6c9a30586ec5e23b2f7396f6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 23 Mar 2016 06:08:59 +0000
-Subject: [PATCH] Fix build on mips/musl
-
-Do not include endian.h on musl it includes
-further headers which can not be compiled in __ASSEMBLER__
- mode
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/coredump/_UCD_internal.h | 34 ++++++++++++++++++++++++++++++++++
- src/mips/getcontext.S | 3 +--
- 2 files changed, 35 insertions(+), 2 deletions(-)
-
-Index: git/src/coredump/_UCD_internal.h
-===================================================================
---- git.orig/src/coredump/_UCD_internal.h
-+++ git/src/coredump/_UCD_internal.h
-@@ -44,6 +44,41 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
-
- #include "libunwind_i.h"
-
-+#ifndef __GLIBC__
-+#include <sys/reg.h>
-+
-+#define EF_REG0 6
-+#define EF_REG1 7
-+#define EF_REG2 8
-+#define EF_REG3 9
-+#define EF_REG4 10
-+#define EF_REG5 11
-+#define EF_REG6 12
-+#define EF_REG7 13
-+#define EF_REG8 14
-+#define EF_REG9 15
-+#define EF_REG10 16
-+#define EF_REG11 17
-+#define EF_REG12 18
-+#define EF_REG13 19
-+#define EF_REG14 20
-+#define EF_REG15 21
-+#define EF_REG16 22
-+#define EF_REG17 23
-+#define EF_REG18 24
-+#define EF_REG19 25
-+#define EF_REG20 26
-+#define EF_REG21 27
-+#define EF_REG22 28
-+#define EF_REG23 29
-+#define EF_REG24 30
-+#define EF_REG25 31
-+#define EF_REG28 34
-+#define EF_REG29 35
-+#define EF_REG30 36
-+#define EF_REG31 37
-+#endif
-+
-
- #if SIZEOF_OFF_T == 4
- typedef uint32_t uoff_t;
-Index: git/src/mips/getcontext.S
-===================================================================
---- git.orig/src/mips/getcontext.S
-+++ git/src/mips/getcontext.S
-@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
- #include "offsets.h"
--#include <endian.h>
-
- .text
-
- #if _MIPS_SIM == _ABIO32
--# if __BYTE_ORDER == __BIG_ENDIAN
-+# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
- # define OFFSET 4
- # else
- # define OFFSET 0
diff --git a/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch b/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch
deleted file mode 100644
index 673a5bb995..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 459e471fcc33d300f7bbcdaf3e0dc338d9dc15b9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 30 Apr 2016 16:56:34 +0000
-Subject: [PATCH] add knobs to disable/enable tests
-
-Some tests do not compile on musl libc
-in general its good to have such a knob
-since not all builds may want to enable
-tests
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 6 +++++-
- configure.ac | 12 ++++++++++--
- 2 files changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 6a3ed9e..0c29b3e 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -42,7 +42,11 @@ endif
-
- nodist_include_HEADERS = include/libunwind-common.h
-
--SUBDIRS = src tests
-+SUBDIRS = src
-+
-+if CONFIG_TESTS
-+SUBDIRS += tests
-+endif
-
- if CONFIG_DOCS
- SUBDIRS += doc
-diff --git a/configure.ac b/configure.ac
-index 85d78f8..d362387 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -129,6 +129,10 @@ AC_ARG_ENABLE(documentation,
- AS_HELP_STRING([--disable-documentation],[Disable generating the man pages]),,
- [enable_documentation=yes])
-
-+AC_ARG_ENABLE(tests,
-+ AS_HELP_STRING([--disable-tests],[Disable building tests]),,
-+ [enable_tests=yes])
-+
- AC_MSG_CHECKING([if we should build libunwind-setjmp])
- AC_MSG_RESULT([$enable_setjmp])
-
-@@ -395,9 +399,13 @@ AM_CONDITIONAL([CONFIG_DOCS], [test x$enable_documentation = xyes])
- if test "x$enable_documentation" = "xyes"; then
- AC_CONFIG_FILES(doc/Makefile doc/common.tex)
- fi
-+AM_CONDITIONAL([CONFIG_TESTS], [test x$enable_tests = xyes])
-+if test "x$enable_tests" = "xyes"; then
-+ AC_CONFIG_FILES(tests/Makefile tests/check-namespace.sh)
-+fi
-+
-
--AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh
-- include/libunwind-common.h
-+AC_CONFIG_FILES(Makefile src/Makefile include/libunwind-common.h
- include/libunwind.h include/tdep/libunwind_i.h)
- AC_CONFIG_FILES(src/unwind/libunwind.pc src/coredump/libunwind-coredump.pc
- src/ptrace/libunwind-ptrace.pc src/setjmp/libunwind-setjmp.pc
---
-1.8.3.1
-
diff --git a/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch b/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
deleted file mode 100644
index 9aed419a12..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 04437142399662b576bd55a85485c6dcc14d0812 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 06:44:07 +0000
-Subject: [PATCH] backtrace: Use only with glibc and uclibc
-
-backtrace API is glibc specific not linux specific
-so make it behave so.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- tests/test-coredump-unwind.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
-index 5254708..8767b42 100644
---- a/tests/test-coredump-unwind.c
-+++ b/tests/test-coredump-unwind.c
-@@ -57,7 +57,9 @@
- #include <grp.h>
-
- /* For SIGSEGV handler code */
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <sys/ucontext.h>
-
- #include <libunwind-coredump.h>
-@@ -238,11 +240,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
- ip);
-
- {
-+#ifdef __GLIBC__
- /* glibc extension */
- void *array[50];
- int size;
- size = backtrace(array, 50);
--#ifdef __linux__
- backtrace_symbols_fd(array, size, 2);
- #endif
- }
---
-2.6.4
-
diff --git a/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch b/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
deleted file mode 100644
index ca0641f5ac..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
+++ /dev/null
@@ -1,248 +0,0 @@
-From e0eea53c77fce8537c58a072b684043507987bcc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 9 Jul 2016 01:07:53 +0000
-Subject: [PATCH] ppc32: Consider ucontext mismatches between glibc and musl
-
-This helps in porting libunwind onto musl based systems
-ptrace.h change is required again an error that surfaces
-with musl
-
-/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/asm/ptrace.h:31:8: error: redefinition of 'struct pt_regs'
- struct pt_regs {
- ^~~~~~~
-In file included from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/user.h:11:0,
- from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/procfs.h:9,
- from ../../git/src/ptrace/_UPT_internal.h:40,
- from ../../git/src/ptrace/_UPT_reg_offset.c:27:
-/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/bits/user.h:1:8: note: originally defined here
- struct pt_regs {
- ^~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/ppc32/Ginit.c | 6 +-
- src/ppc32/ucontext_i.h | 158 ++++++++++++++++++++++---------------------
- src/ptrace/_UPT_reg_offset.c | 7 ++
- 3 files changed, 92 insertions(+), 79 deletions(-)
-
-diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c
-index f2e6e82..617aaa1 100644
---- a/src/ppc32/Ginit.c
-+++ b/src/ppc32/Ginit.c
-@@ -48,12 +48,12 @@ uc_addr (ucontext_t *uc, int reg)
- void *addr;
-
- if ((unsigned) (reg - UNW_PPC32_R0) < 32)
-- addr = &uc->uc_mcontext.uc_regs->gregs[reg - UNW_PPC32_R0];
-+ addr = &uc->GET_UC_REGS->gregs[reg - UNW_PPC32_R0];
-
- else
- if ( ((unsigned) (reg - UNW_PPC32_F0) < 32) &&
- ((unsigned) (reg - UNW_PPC32_F0) >= 0) )
-- addr = &uc->uc_mcontext.uc_regs->fpregs.fpregs[reg - UNW_PPC32_F0];
-+ addr = &uc->GET_UC_REGS->fpregs.fpregs[reg - UNW_PPC32_F0];
-
- else
- {
-@@ -76,7 +76,7 @@ uc_addr (ucontext_t *uc, int reg)
- default:
- return NULL;
- }
-- addr = &uc->uc_mcontext.uc_regs->gregs[gregs_idx];
-+ addr = &uc->GET_UC_REGS->gregs[gregs_idx];
- }
- return addr;
- }
-diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h
-index c6ba806..b79f15c 100644
---- a/src/ppc32/ucontext_i.h
-+++ b/src/ppc32/ucontext_i.h
-@@ -46,83 +46,89 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
- various structure members. */
- static ucontext_t dmy_ctxt UNUSED;
-
--#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[0] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[1] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[2] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[3] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[4] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[5] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[6] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[7] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[8] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[9] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[10] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[11] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[12] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[13] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[14] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[15] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[16] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[17] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[18] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[19] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[20] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[21] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[22] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[23] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[24] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[25] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[26] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[27] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[28] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[29] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[30] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[31] - (void *)&dmy_ctxt)
-+#ifdef __GLIBC__
-+#define GET_UC_REGS uc_mcontext.uc_regs
-+#else
-+#define GET_UC_REGS uc_regs
-+#endif
-+
-+#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[0] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[1] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[2] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[3] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[4] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[5] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[6] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[7] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[8] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[9] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[10] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[11] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[12] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[13] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[14] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[15] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[16] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[17] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[18] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[19] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[20] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[21] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[22] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[23] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[24] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[25] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[26] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[27] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[28] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[29] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[30] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[31] - (void *)&dmy_ctxt)
-
--#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[MSR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CTR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[LINK_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[XER_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CCR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DAR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[MSR_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CTR_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.GET_UC_REGS->gregs[LINK_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.GET_UC_REGS->gregs[XER_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CCR_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.GET_UC_REGS->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.GET_UC_REGS->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DAR_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.GET_UC_REGS->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
-
--#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[0] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[1] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[2] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[3] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[4] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[5] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[6] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[7] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[8] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[9] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[10] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[11] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[12] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[13] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[14] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[15] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[16] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[17] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[18] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[19] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[20] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[21] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[22] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[23] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[24] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[25] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[26] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[27] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[28] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[29] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[30] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[31] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[32] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[0] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[1] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[2] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[3] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[4] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[5] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[6] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[7] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[8] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[9] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[10] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[11] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[12] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[13] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[14] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[15] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[16] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[17] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[18] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[19] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[20] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[21] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[22] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[23] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[24] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[25] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[26] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[27] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[28] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[29] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[30] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[31] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[32] - (void *)&dmy_ctxt)
-
- #endif
-diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c
-index 68461a2..fcc43f7 100644
---- a/src/ptrace/_UPT_reg_offset.c
-+++ b/src/ptrace/_UPT_reg_offset.c
-@@ -27,6 +27,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
- #include "_UPT_internal.h"
-
- #include <stddef.h>
-+#if !defined(__GLIBC__)
-+# define pt_regs uapi_pt_regs
-+#endif
-+#include <asm/ptrace.h>
-+#if !defined(__GLIBC__)
-+# undef pt_regs
-+#endif
-
- #ifdef HAVE_ASM_PTRACE_OFFSETS_H
- # include <asm/ptrace_offsets.h>
---
-1.8.3.1
-
diff --git a/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch b/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch
deleted file mode 100644
index 371013aaaa..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From f5df01655a4b76d4fe415747de581d94ac593e6a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Mar 2016 16:19:29 +0000
-Subject: [PATCH] x86: Stub out x86_local_resume()
-
-its purpose seems
-to be unwinding across signal handler boundaries, which cannot happen
-in correct programs anyway. Replacing the whole function with
-something like *(volatile char *)0=0; (i.e. crash), gets a working
-libunwind
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/x86/Gos-linux.c | 22 +---------------------
- 1 file changed, 1 insertion(+), 21 deletions(-)
-
-diff --git a/src/x86/Gos-linux.c b/src/x86/Gos-linux.c
-index 31f83ba..3aaa34e 100644
---- a/src/x86/Gos-linux.c
-+++ b/src/x86/Gos-linux.c
-@@ -281,27 +281,7 @@ x86_r_uc_addr (ucontext_t *uc, int reg)
- HIDDEN int
- x86_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
- {
-- struct cursor *c = (struct cursor *) cursor;
-- ucontext_t *uc = c->uc;
--
-- /* Ensure c->pi is up-to-date. On x86, it's relatively common to be
-- missing DWARF unwind info. We don't want to fail in that case,
-- because the frame-chain still would let us do a backtrace at
-- least. */
-- dwarf_make_proc_info (&c->dwarf);
--
-- if (unlikely (c->sigcontext_format != X86_SCF_NONE))
-- {
-- struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
--
-- Debug (8, "resuming at ip=%x via sigreturn(%p)\n", c->dwarf.ip, sc);
-- sigreturn (sc);
-- }
-- else
-- {
-- Debug (8, "resuming at ip=%x via setcontext()\n", c->dwarf.ip);
-- setcontext (uc);
-- }
-+ *(volatile char *)0=0;
- return -UNW_EINVAL;
- }
- #endif
---
-1.8.3.1
-
diff --git a/meta/recipes-support/libunwind/libunwind/0002-backtrace-Use-only-with-glibc-and-uclibc.patch b/meta/recipes-support/libunwind/libunwind/0002-backtrace-Use-only-with-glibc-and-uclibc.patch
new file mode 100644
index 0000000000..1b862dccb1
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/0002-backtrace-Use-only-with-glibc-and-uclibc.patch
@@ -0,0 +1,45 @@
+From b61446add7ae1c041266c2fa5ba2f51cb3b65d35 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 06:44:07 +0000
+Subject: [PATCH 2/6] backtrace: Use only with glibc and uclibc
+
+backtrace API is glibc specific not linux specific
+so make it behave so.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/test-coredump-unwind.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
+index 5349823..3b153cb 100644
+--- a/tests/test-coredump-unwind.c
++++ b/tests/test-coredump-unwind.c
+@@ -57,7 +57,9 @@
+ #include <grp.h>
+
+ /* For SIGSEGV handler code */
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <sys/ucontext.h>
+
+ #include <libunwind-coredump.h>
+@@ -238,11 +240,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
+ ip);
+
+ {
++#ifdef __GLIBC__
+ /* glibc extension */
+ void *array[50];
+ int size;
+ size = backtrace(array, 50);
+-#ifdef __linux__
+ backtrace_symbols_fd(array, size, 2);
+ #endif
+ }
+--
+2.20.1
+
diff --git a/meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch b/meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch
new file mode 100644
index 0000000000..508ed6af38
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch
@@ -0,0 +1,54 @@
+From f6866b9e4a6341c50eb1d923dbf48eca2ca40140 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 16:19:29 +0000
+Subject: [PATCH 3/6] x86: Stub out x86_local_resume()
+
+its purpose seems
+to be unwinding across signal handler boundaries, which cannot happen
+in correct programs anyway. Replacing the whole function with
+something like *(volatile char *)0=0; (i.e. crash), gets a working
+libunwind
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/x86/Gos-linux.c | 22 +---------------------
+ 1 file changed, 1 insertion(+), 21 deletions(-)
+
+diff --git a/src/x86/Gos-linux.c b/src/x86/Gos-linux.c
+index fb9a5e3..c25ae0c 100644
+--- a/src/x86/Gos-linux.c
++++ b/src/x86/Gos-linux.c
+@@ -284,27 +284,7 @@ x86_r_uc_addr (ucontext_t *uc, int reg)
+ HIDDEN int
+ x86_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
+ {
+- struct cursor *c = (struct cursor *) cursor;
+- ucontext_t *uc = c->uc;
+-
+- /* Ensure c->pi is up-to-date. On x86, it's relatively common to be
+- missing DWARF unwind info. We don't want to fail in that case,
+- because the frame-chain still would let us do a backtrace at
+- least. */
+- dwarf_make_proc_info (&c->dwarf);
+-
+- if (unlikely (c->sigcontext_format != X86_SCF_NONE))
+- {
+- struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
+-
+- Debug (8, "resuming at ip=%x via sigreturn(%p)\n", c->dwarf.ip, sc);
+- x86_sigreturn (sc);
+- }
+- else
+- {
+- Debug (8, "resuming at ip=%x via setcontext()\n", c->dwarf.ip);
+- setcontext (uc);
+- }
++ *(volatile char *)0=0;
+ return -UNW_EINVAL;
+ }
+
+--
+2.20.1
+
diff --git a/meta/recipes-support/libunwind/libunwind/0004-Fix-build-on-mips-musl.patch b/meta/recipes-support/libunwind/libunwind/0004-Fix-build-on-mips-musl.patch
new file mode 100644
index 0000000000..124d0e00b1
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/0004-Fix-build-on-mips-musl.patch
@@ -0,0 +1,84 @@
+From 6bdab5cc8f1e2ec5f84fc9f59f1699a726980709 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 23 Mar 2016 06:08:59 +0000
+Subject: [PATCH 4/6] Fix build on mips/musl
+
+Do not include endian.h on musl it includes
+further headers which can not be compiled in __ASSEMBLER__
+ mode
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/coredump/_UCD_internal.h | 35 +++++++++++++++++++++++++++++++++++
+ src/mips/getcontext.S | 3 +--
+ 2 files changed, 36 insertions(+), 2 deletions(-)
+
+diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h
+index 3c95a2a..21ed1c3 100644
+--- a/src/coredump/_UCD_internal.h
++++ b/src/coredump/_UCD_internal.h
+@@ -44,6 +44,41 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+ #include "libunwind_i.h"
+
++#ifndef __GLIBC__
++#include <sys/reg.h>
++
++#define EF_REG0 6
++#define EF_REG1 7
++#define EF_REG2 8
++#define EF_REG3 9
++#define EF_REG4 10
++#define EF_REG5 11
++#define EF_REG6 12
++#define EF_REG7 13
++#define EF_REG8 14
++#define EF_REG9 15
++#define EF_REG10 16
++#define EF_REG11 17
++#define EF_REG12 18
++#define EF_REG13 19
++#define EF_REG14 20
++#define EF_REG15 21
++#define EF_REG16 22
++#define EF_REG17 23
++#define EF_REG18 24
++#define EF_REG19 25
++#define EF_REG20 26
++#define EF_REG21 27
++#define EF_REG22 28
++#define EF_REG23 29
++#define EF_REG24 30
++#define EF_REG25 31
++#define EF_REG28 34
++#define EF_REG29 35
++#define EF_REG30 36
++#define EF_REG31 37
++#endif
++
+
+ #if SIZEOF_OFF_T == 4
+ typedef uint32_t uoff_t;
+diff --git a/src/mips/getcontext.S b/src/mips/getcontext.S
+index d1dbd57..de9b681 100644
+--- a/src/mips/getcontext.S
++++ b/src/mips/getcontext.S
+@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+ #include "offsets.h"
+-#include <endian.h>
+
+ .text
+
+ #if _MIPS_SIM == _ABIO32
+-# if __BYTE_ORDER == __BIG_ENDIAN
++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ # define OFFSET 4
+ # else
+ # define OFFSET 0
+--
+2.20.1
+
diff --git a/meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch b/meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
new file mode 100644
index 0000000000..edaa822be1
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
@@ -0,0 +1,249 @@
+From 02919d74b1599979884f9cee466ed392d9fc4819 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Jul 2016 01:07:53 +0000
+Subject: [PATCH 5/6] ppc32: Consider ucontext mismatches between glibc and
+ musl
+
+This helps in porting libunwind onto musl based systems
+ptrace.h change is required again an error that surfaces
+with musl
+
+/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/asm/ptrace.h:31:8: error: redefinition of 'struct pt_regs'
+ struct pt_regs {
+ ^~~~~~~
+In file included from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/user.h:11:0,
+ from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/procfs.h:9,
+ from ../../git/src/ptrace/_UPT_internal.h:40,
+ from ../../git/src/ptrace/_UPT_reg_offset.c:27:
+/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/bits/user.h:1:8: note: originally defined here
+ struct pt_regs {
+ ^~~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/ppc32/Ginit.c | 6 +-
+ src/ppc32/ucontext_i.h | 158 ++++++++++++++++++-----------------
+ src/ptrace/_UPT_reg_offset.c | 7 ++
+ 3 files changed, 92 insertions(+), 79 deletions(-)
+
+diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c
+index ba30244..c5312d9 100644
+--- a/src/ppc32/Ginit.c
++++ b/src/ppc32/Ginit.c
+@@ -48,12 +48,12 @@ uc_addr (ucontext_t *uc, int reg)
+ void *addr;
+
+ if ((unsigned) (reg - UNW_PPC32_R0) < 32)
+- addr = &uc->uc_mcontext.uc_regs->gregs[reg - UNW_PPC32_R0];
++ addr = &uc->GET_UC_REGS->gregs[reg - UNW_PPC32_R0];
+
+ else
+ if ( ((unsigned) (reg - UNW_PPC32_F0) < 32) &&
+ ((unsigned) (reg - UNW_PPC32_F0) >= 0) )
+- addr = &uc->uc_mcontext.uc_regs->fpregs.fpregs[reg - UNW_PPC32_F0];
++ addr = &uc->GET_UC_REGS->fpregs.fpregs[reg - UNW_PPC32_F0];
+
+ else
+ {
+@@ -76,7 +76,7 @@ uc_addr (ucontext_t *uc, int reg)
+ default:
+ return NULL;
+ }
+- addr = &uc->uc_mcontext.uc_regs->gregs[gregs_idx];
++ addr = &uc->GET_UC_REGS->gregs[gregs_idx];
+ }
+ return addr;
+ }
+diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h
+index c6ba806..b79f15c 100644
+--- a/src/ppc32/ucontext_i.h
++++ b/src/ppc32/ucontext_i.h
+@@ -46,83 +46,89 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+ various structure members. */
+ static ucontext_t dmy_ctxt UNUSED;
+
+-#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[0] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[1] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[2] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[3] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[4] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[5] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[6] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[7] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[8] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[9] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[10] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[11] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[12] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[13] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[14] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[15] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[16] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[17] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[18] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[19] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[20] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[21] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[22] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[23] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[24] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[25] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[26] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[27] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[28] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[29] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[30] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[31] - (void *)&dmy_ctxt)
++#ifdef __GLIBC__
++#define GET_UC_REGS uc_mcontext.uc_regs
++#else
++#define GET_UC_REGS uc_regs
++#endif
++
++#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[0] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[1] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[2] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[3] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[4] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[5] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[6] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[7] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[8] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[9] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[10] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[11] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[12] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[13] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[14] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[15] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[16] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[17] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[18] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[19] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[20] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[21] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[22] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[23] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[24] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[25] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[26] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[27] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[28] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[29] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[30] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[31] - (void *)&dmy_ctxt)
+
+-#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[MSR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CTR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[LINK_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[XER_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CCR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DAR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[MSR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CTR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.GET_UC_REGS->gregs[LINK_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.GET_UC_REGS->gregs[XER_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CCR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.GET_UC_REGS->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.GET_UC_REGS->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DAR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.GET_UC_REGS->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
+
+-#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[0] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[1] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[2] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[3] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[4] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[5] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[6] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[7] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[8] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[9] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[10] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[11] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[12] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[13] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[14] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[15] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[16] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[17] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[18] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[19] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[20] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[21] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[22] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[23] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[24] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[25] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[26] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[27] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[28] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[29] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[30] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[31] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[32] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[0] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[1] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[2] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[3] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[4] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[5] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[6] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[7] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[8] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[9] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[10] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[11] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[12] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[13] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[14] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[15] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[16] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[17] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[18] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[19] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[20] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[21] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[22] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[23] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[24] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[25] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[26] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[27] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[28] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[29] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[30] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[31] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[32] - (void *)&dmy_ctxt)
+
+ #endif
+diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c
+index c82d1c9..6c31baa 100644
+--- a/src/ptrace/_UPT_reg_offset.c
++++ b/src/ptrace/_UPT_reg_offset.c
+@@ -27,6 +27,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+ #include "_UPT_internal.h"
+
+ #include <stddef.h>
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
++#include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+
+ #ifdef HAVE_ASM_PTRACE_OFFSETS_H
+ # include <asm/ptrace_offsets.h>
+--
+2.20.1
+
diff --git a/meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch b/meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch
new file mode 100644
index 0000000000..37ae8124cc
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch
@@ -0,0 +1,32 @@
+From 7a4fd5933cc795df85cdd85168fe54fbaec4dcec Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 09:50:34 -0700
+Subject: [PATCH 6/6] Fix for X32
+
+Apply patch to fix the X32 build from https://github.com/sjnewbury/x32.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+---
+ src/x86_64/Gos-linux.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/x86_64/Gos-linux.c b/src/x86_64/Gos-linux.c
+index bd14234..be1cb5b 100644
+--- a/src/x86_64/Gos-linux.c
++++ b/src/x86_64/Gos-linux.c
+@@ -145,8 +145,8 @@ x86_64_sigreturn (unw_cursor_t *cursor)
+
+ Debug (8, "resuming at ip=%llx via sigreturn(%p)\n",
+ (unsigned long long) c->dwarf.ip, sc);
+- __asm__ __volatile__ ("mov %0, %%rsp;"
+- "mov %1, %%rax;"
++ __asm__ __volatile__ ("mov %q0, %%rsp;"
++ "mov %q1, %%rax;"
+ "syscall"
+ :: "r"(sc), "i"(SYS_rt_sigreturn)
+ : "memory");
+--
+2.20.1
+
diff --git a/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
deleted file mode 100644
index 0dff2c86dc..0000000000
--- a/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 24484e80b3e329c9edee1995e102f8612eedb79c Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Tue, 13 May 2014 23:32:27 +0200
-Subject: [PATCH] Add AO_REQUIRE_CAS to fix build on ARM < v6
-
-ARM earlier than ARMv6, such as ARMv4 and ARMv5 do not provide
-optimize atomic operations in libatomic_ops. Since libunwind is using
-such operations, it should define AO_REQUIRE_CAS before including
-<atomic_ops.h> so that libatomic_ops knows it should use emulated
-atomic operations instead (even though they are obviously a lot more
-expensive).
-
-Also, while real atomic operations are all inline functions and
-therefore linking against libatomic_ops was not required, the emulated
-atomic operations actually require linking against libatomic_ops, so
-the commented AC_CHECK_LIB test in acinclude.m4 is uncommented to make
-sure we link against libatomic_ops.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Upstream-Status: Pending
-Taken from:
-https://raw.githubusercontent.com/rdnetto/teapot-buildroot/master/package/libunwind/libunwind-02-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
-
----
- acinclude.m4 | 8 +-------
- include/libunwind_i.h | 1 +
- 2 files changed, 2 insertions(+), 7 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 497f7c2..9c15af1 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -22,11 +22,5 @@ fi])
- AC_DEFUN([CHECK_ATOMIC_OPS],
- [dnl Check whether the system has the atomic_ops package installed.
- AC_CHECK_HEADERS(atomic_ops.h)
--#
--# Don't link against libatomic_ops for now. We don't want libunwind
--# to depend on libatomic_ops.so. Fortunately, none of the platforms
--# we care about so far need libatomic_ops.a (everything is done via
--# inline macros).
--#
--# AC_CHECK_LIB(atomic_ops, main)
-+ AC_CHECK_LIB(atomic_ops, main)
- ])
-diff --git a/include/libunwind_i.h b/include/libunwind_i.h
-index 23f615e..deabdfd 100644
---- a/include/libunwind_i.h
-+++ b/include/libunwind_i.h
-@@ -95,6 +95,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
- (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
-
- #ifdef HAVE_ATOMIC_OPS_H
-+# define AO_REQUIRE_CAS
- # include <atomic_ops.h>
- static inline int
- cmpxchg_ptr (void *addr, void *old, void *new)
---
-1.9.2
-
diff --git a/meta/recipes-support/libunwind/libunwind_1.3.1.bb b/meta/recipes-support/libunwind/libunwind_1.3.1.bb
new file mode 100644
index 0000000000..037e04c3c0
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind_1.3.1.bb
@@ -0,0 +1,24 @@
+require libunwind.inc
+
+SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
+ file://0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
+ file://0002-backtrace-Use-only-with-glibc-and-uclibc.patch \
+ file://0003-x86-Stub-out-x86_local_resume.patch \
+ file://0004-Fix-build-on-mips-musl.patch \
+ file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
+ file://0006-Fix-for-X32.patch \
+ "
+SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
+
+SRC_URI[md5sum] = "a04f69d66d8e16f8bf3ab72a69112cd6"
+SRC_URI[sha256sum] = "43997a3939b6ccdf2f669b50fdb8a4d3205374728c2923ddc2354c65260214f8"
+
+EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests --enable-static"
+
+# http://errors.yoctoproject.org/Errors/Details/20487/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
+SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared"
diff --git a/meta/recipes-support/libunwind/libunwind_git.bb b/meta/recipes-support/libunwind/libunwind_git.bb
deleted file mode 100644
index 424943087e..0000000000
--- a/meta/recipes-support/libunwind/libunwind_git.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-require libunwind.inc
-
-PV = "1.1+git${SRCPV}"
-
-SRCREV = "bc8698fd7ed13a629a8ec3cb2a89bd74f9d8b5c0"
-
-SRC_URI = "git://git.sv.gnu.org/libunwind.git \
- file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
- file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
- file://0001-x86-Stub-out-x86_local_resume.patch \
- file://0001-Fix-build-on-mips-musl.patch \
- file://0001-add-knobs-to-disable-enable-tests.patch \
- file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
- "
-
-SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
-EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests "
-
-# http://errors.yoctoproject.org/Errors/Details/20487/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-# see https://sourceware.org/bugzilla/show_bug.cgi?id=19987
-SECURITY_CFLAGS_remove_aarch64 = "-fpie"
-SECURITY_CFLAGS_append_aarch64 = " -fPIE"
-
-S = "${WORKDIR}/git"
-
-LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
diff --git a/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch b/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
deleted file mode 100644
index 690872b4a2..0000000000
--- a/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From add566b913e1b5cd4974a2167157dc08d8245ab0 Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Tue, 9 Feb 2016 01:52:26 +0100
-Subject: [PATCH] Support for NIOS2 architecture
-
-Add support for the Altera NIOS2 CPU archirecture. The atomic operations
-are handled by the GCC. The memory barriers on this systems are entirely
-trivial too, since the CPU does not support SMP at all.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport [ http://git.lttng.org/?p=userspace-rcu.git;a=commit;h=859050b3088aa3f0cb59d7f51ce24b9a0f18faa5 ]
----
- LICENSE | 1 +
- README.md | 1 +
- configure.ac | 1 +
- urcu/arch/nios2.h | 40 ++++++++++++++++++++++++++++++++++++++++
- urcu/uatomic/nios2.h | 32 ++++++++++++++++++++++++++++++++
- 5 files changed, 75 insertions(+)
- create mode 100644 urcu/arch/nios2.h
- create mode 100644 urcu/uatomic/nios2.h
-
-diff --git a/LICENSE b/LICENSE
-index 3147094..a06fdcc 100644
---- a/LICENSE
-+++ b/LICENSE
-@@ -45,6 +45,7 @@ compiler.h
- arch/s390.h
- uatomic/alpha.h
- uatomic/mips.h
-+uatomic/nios2.h
- uatomic/s390.h
- system.h
-
-diff --git a/README.md b/README.md
-index f6b290f..6fe9c1e 100644
---- a/README.md
-+++ b/README.md
-@@ -43,6 +43,7 @@ Currently, the following architectures are supported:
- - S390, S390x
- - ARM 32/64
- - MIPS
-+ - NIOS2
- - Alpha
- - ia64
- - Sparcv9 32/64
-diff --git a/configure.ac b/configure.ac
-index 39a7777..71a7d71 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -124,6 +124,7 @@ AS_CASE([$host_cpu],
- [arm*], [ARCHTYPE="arm"],
- [aarch64], [ARCHTYPE="aarch64"],
- [mips*], [ARCHTYPE="mips"],
-+ [nios2*], [ARCHTYPE="nios2"],
- [tile*], [ARCHTYPE="tile"],
- [hppa*], [ARCHTYPE="hppa"],
- [ARCHTYPE="unknown"]
-diff --git a/urcu/arch/nios2.h b/urcu/arch/nios2.h
-new file mode 100644
-index 0000000..030d1bc
---- /dev/null
-+++ b/urcu/arch/nios2.h
-@@ -0,0 +1,40 @@
-+#ifndef _URCU_ARCH_NIOS2_H
-+#define _URCU_ARCH_NIOS2_H
-+
-+/*
-+ * arch_nios2.h: trivial definitions for the NIOS2 architecture.
-+ *
-+ * Copyright (c) 2016 Marek Vasut <marex@denx.de>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * This library 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
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#include <urcu/compiler.h>
-+#include <urcu/config.h>
-+#include <urcu/syscall-compat.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#define cmm_mb() cmm_barrier()
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#include <urcu/arch/generic.h>
-+
-+#endif /* _URCU_ARCH_NIOS2_H */
-diff --git a/urcu/uatomic/nios2.h b/urcu/uatomic/nios2.h
-new file mode 100644
-index 0000000..5b3c303
---- /dev/null
-+++ b/urcu/uatomic/nios2.h
-@@ -0,0 +1,32 @@
-+#ifndef _URCU_UATOMIC_ARCH_NIOS2_H
-+#define _URCU_UATOMIC_ARCH_NIOS2_H
-+
-+/*
-+ * Atomic exchange operations for the NIOS2 architecture. Let GCC do it.
-+ *
-+ * Copyright (c) 2016 Marek Vasut <marex@denx.de>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-+ * IN THE SOFTWARE.
-+ */
-+
-+#include <urcu/compiler.h>
-+#include <urcu/system.h>
-+#include <urcu/uatomic/generic.h>
-+
-+#endif /* _URCU_UATOMIC_ARCH_NIOS2_H */
---
-2.7.0
-
diff --git a/meta/recipes-support/liburcu/liburcu/0002-Support-for-aarch64_be.patch b/meta/recipes-support/liburcu/liburcu/0002-Support-for-aarch64_be.patch
deleted file mode 100644
index a10ccd7d8f..0000000000
--- a/meta/recipes-support/liburcu/liburcu/0002-Support-for-aarch64_be.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-liburcu: add support for aarch64_be
-
-Upstream-Status: Pending
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-
-diff --git a/configure.ac b/configure.ac
-index 8ebfa8b..fe1c55d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -121,7 +121,7 @@ AS_CASE([$host_cpu],
- [alpha*], [ARCHTYPE="alpha"],
- [ia64], [ARCHTYPE="ia64"],
- [arm*], [ARCHTYPE="arm"],
-- [aarch64], [ARCHTYPE="aarch64"],
-+ [aarch64*], [ARCHTYPE="aarch64"],
- [mips*], [ARCHTYPE="mips"],
- [nios2*], [ARCHTYPE="nios2"],
- [tile*], [ARCHTYPE="tile"],
diff --git a/meta/recipes-support/liburcu/liburcu_0.11.1.bb b/meta/recipes-support/liburcu/liburcu_0.11.1.bb
new file mode 100644
index 0000000000..6a517e6f29
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu_0.11.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Userspace RCU (read-copy-update) library"
+HOMEPAGE = "http://lttng.org/urcu"
+BUGTRACKER = "http://lttng.org/project/issues"
+
+LICENSE = "LGPLv2.1+ & MIT-style"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
+ file://include/urcu/urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
+ file://include/urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
+
+SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "91c75d5902127f94ab556ce039b369ca"
+SRC_URI[sha256sum] = "92b9971bf3f1c443edd6c09e7bf5ff3b43531e778841f16377a812c8feeb3350"
+
+S = "${WORKDIR}/userspace-rcu-${PV}"
+inherit autotools multilib_header
+
+CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT"
+
+do_install_append() {
+ oe_multilib_header urcu/config.h
+}
diff --git a/meta/recipes-support/liburcu/liburcu_0.9.2.bb b/meta/recipes-support/liburcu/liburcu_0.9.2.bb
deleted file mode 100644
index 23fb8c4b42..0000000000
--- a/meta/recipes-support/liburcu/liburcu_0.9.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Userspace RCU (read-copy-update) library"
-HOMEPAGE = "http://lttng.org/urcu"
-BUGTRACKER = "http://lttng.org/project/issues"
-
-LICENSE = "LGPLv2.1+ & MIT-style"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
- file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
- file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
-
-SRC_URI = " \
- http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
- file://0001-Support-for-NIOS2-architecture.patch \
- file://0002-Support-for-aarch64_be.patch \
- "
-
-SRC_URI[md5sum] = "49f86e68c1e2f41d303381a271b791d1"
-SRC_URI[sha256sum] = "8f7fa313b1e0a3f742cea24ce63a39c0efe63e615a769e2961e55bd2663ecaa3"
-
-S = "${WORKDIR}/userspace-rcu-${PV}"
-CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
-inherit autotools
diff --git a/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch b/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch
deleted file mode 100644
index b88440dec9..0000000000
--- a/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 340f911f9e3f4ff6b01682c5341c959060782af2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 2 Apr 2015 19:18:45 -0700
-Subject: [PATCH] usb.h: Include sys/types.h
-
-We need the definitions for things like u_intX_t
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libusb/usb.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libusb/usb.h b/libusb/usb.h
-index 84e730f..caffae2 100644
---- a/libusb/usb.h
-+++ b/libusb/usb.h
-@@ -31,6 +31,8 @@
-
- #include <dirent.h>
-
-+#include <sys/types.h>
-+
- /*
- * USB spec information
- *
---
-2.1.4
-
diff --git a/meta/recipes-support/libusb/libusb-compat_0.1.5.bb b/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
deleted file mode 100644
index 1ddbe238fc..0000000000
--- a/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "libusb-0.1 compatibility layer for libusb1"
-DESCRIPTION = "libusb-0.1 compatible layer for libusb1, a drop-in replacement \
-that aims to look, feel and behave exactly like libusb-0.1"
-HOMEPAGE = "http://www.libusb.org/"
-BUGTRACKER = "http://www.libusb.org/report"
-SECTION = "libs"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f2ac5f3ac4835e8f91324a26a590a423"
-DEPENDS = "libusb1"
-
-# Few packages are known not to work with libusb-compat (e.g. libmtp-1.0.0),
-# so here libusb-0.1 is removed completely instead of adding virtual/libusb0.
-# Besides, libusb-0.1 uses a per 1ms polling that hurts a lot to power
-# consumption.
-PROVIDES = "libusb virtual/libusb0"
-BBCLASSEXTEND = "native nativesdk"
-
-PE = "1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2 \
- file://0001-usb.h-Include-sys-types.h.patch \
- "
-
-SRC_URI[md5sum] = "2780b6a758a1e2c2943bdbf7faf740e4"
-SRC_URI[sha256sum] = "404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/"
-UPSTREAM_CHECK_REGEX = "/libusb-compat-(?P<pver>(\d+[\.\-_]*)+)/$"
-
-BINCONFIG = "${bindir}/libusb-config"
-
-inherit autotools pkgconfig binconfig-disabled lib_package
-
-EXTRA_OECONF = "--libdir=${base_libdir}"
-
-do_install_append() {
- install -d ${D}${libdir}
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
- fi
-}
diff --git a/meta/recipes-support/libusb/libusb1/run-ptest b/meta/recipes-support/libusb/libusb1/run-ptest
new file mode 100755
index 0000000000..eaa47a2bc4
--- /dev/null
+++ b/meta/recipes-support/libusb/libusb1/run-ptest
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+echo
+echo "---------------------------- libusb1 tests ---------------------------"
+echo
+
+./stress | { \
+while read -r str
+do
+ echo "$str"
+ if [ "${str#*Starting test run:}" != "$str" ]
+ then
+ name="${str#Starting test run: }"
+ name="${name%...}"
+ else
+ case "$str" in
+ "Success (0)")
+ echo "PASS: $name"
+ ;;
+ "Failure (1)" | "Error (2)")
+ echo "FAIL: $name"
+ ;;
+ "Skip (3)")
+ echo "SKIP: $name"
+ ;;
+ esac
+ fi
+done
+}
diff --git a/meta/recipes-support/libusb/libusb1_1.0.20.bb b/meta/recipes-support/libusb/libusb1_1.0.20.bb
deleted file mode 100644
index 4cad2d4be7..0000000000
--- a/meta/recipes-support/libusb/libusb1_1.0.20.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Userspace library to access USB (version 1.0)"
-HOMEPAGE = "http://libusb.sf.net"
-BUGTRACKER = "http://www.libusb.org/report"
-SECTION = "libs"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
- file://no-dll.patch \
- "
-
-SRC_URI[md5sum] = "1d4eb194eaaa2bcfbba28102768c7dbf"
-SRC_URI[sha256sum] = "cb057190ba0a961768224e4dc6883104c6f945b2bf2ef90d7da39e7c1834f7ff"
-
-S = "${WORKDIR}/libusb-${PV}"
-
-inherit autotools pkgconfig
-
-# Don't configure udev by default since it will cause a circular
-# dependecy with udev package, which depends on libusb
-EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev"
-
-do_install_append() {
- install -d ${D}${libdir}
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
- fi
-}
-
-FILES_${PN} += "${base_libdir}/*.so.*"
-
-FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
diff --git a/meta/recipes-support/libusb/libusb1_1.0.22.bb b/meta/recipes-support/libusb/libusb1_1.0.22.bb
new file mode 100644
index 0000000000..1d9d772575
--- /dev/null
+++ b/meta/recipes-support/libusb/libusb1_1.0.22.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Userspace library to access USB (version 1.0)"
+HOMEPAGE = "http://libusb.sf.net"
+BUGTRACKER = "http://www.libusb.org/report"
+SECTION = "libs"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
+ file://no-dll.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "466267889daead47674df933cea9cacb"
+SRC_URI[sha256sum] = "75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157"
+
+S = "${WORKDIR}/libusb-${PV}"
+
+inherit autotools pkgconfig ptest
+
+PACKAGECONFIG_class-target ??= "udev"
+PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
+
+EXTRA_OECONF = "--libdir=${base_libdir}"
+
+do_install_append() {
+ install -d ${D}${libdir}
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+ fi
+}
+
+do_compile_ptest() {
+ oe_runmake -C tests stress
+}
+
+do_install_ptest() {
+ install -m 755 ${B}/tests/.libs/stress ${D}${PTEST_PATH}
+}
+
+FILES_${PN} += "${base_libdir}/*.so.*"
+
+FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
diff --git a/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch b/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
deleted file mode 100644
index 71867067b6..0000000000
--- a/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From ed71ac9548a2bb6ecd2dc5ad880c604975f872b0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 2 Jun 2016 14:20:04 +0300
-Subject: [PATCH] Use pkg-config to find gcrypt and libxml2.
-
-Upstream-Status: Pending [libxml2 is upstreamable]
-
-RP 2014/5/22
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.in | 70 +++++++++++-------------------------------------------------
- 1 file changed, 12 insertions(+), 58 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 8bdf45a..0b2b312 100644
---- a/configure.in
-+++ b/configure.in
-@@ -377,6 +377,8 @@ AC_SUBST(pythondir)
- AC_SUBST(PYTHON_SUBDIR)
- AC_SUBST(PYTHON_LIBS)
-
-+PKG_PROG_PKG_CONFIG
-+
- AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
- WITH_CRYPTO=0
- CRYPTO_TESTDIR=
-@@ -394,27 +396,14 @@ case $host in
- CRYPTO_TESTDIR=crypto
- ;;
- *)
-- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
-- if test "$LIBGCRYPT_CONFIG" != "no" ; then
-- LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
-- if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
-- then
-- LIBGCRYPT_CFLAGS=""
-- LIBGCRYPT_LIBS=""
-- echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
-- else
-- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
-- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
-- AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
-- echo 'Crypto extensions will be available.'
-+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
-+ AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
-+ echo 'Crypto extensions will be available.'
- WITH_CRYPTO=1
- CRYPTO_TESTDIR=crypto
-- fi
-- else
-- LIBGCRYPT_CFLAGS=""
-- LIBGCRYPT_LIBS=""
-- echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
-- fi
-+ ], [
-+ echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.'
-+ ])
- esac
- fi
- AC_SUBST(WITH_CRYPTO)
-@@ -476,24 +465,8 @@ dnl original work - Mathieu Lacage 30/03/2000
- dnl some tweaking - David Härdeman 30/10/2001
- dnl
-
--LIBXML_CONFIG_PREFIX=""
- LIBXML_SRC=""
-
--AC_ARG_WITH(libxml-prefix,
-- [ --with-libxml-prefix=[PFX] Specify location of libxml config],
-- LIBXML_CONFIG_PREFIX=$withval
--)
--
--AC_ARG_WITH(libxml-include-prefix,
-- [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
-- LIBXML_CFLAGS="-I$withval"
--)
--
--AC_ARG_WITH(libxml-libs-prefix,
-- [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
-- LIBXML_LIBS="-L$withval"
--)
--
- AC_ARG_WITH(libxml-src,
- [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
- LIBXML_SRC="$withval"
-@@ -556,28 +529,9 @@ then
- fi
- fi
-
--dnl
--dnl make sure xml2-config is executable,
--dnl test version and init our variables
--dnl
--
--if ${XML_CONFIG} --libs print > /dev/null 2>&1
--then
-- XMLVERS=`$XML_CONFIG --version`
-- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
-- then
-- AC_MSG_RESULT($XMLVERS found)
-- else
-- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
-- fi
-- LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
-- if test "x$LIBXML_SRC" = "x"; then
-- LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
-- fi
--else
-- AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
--fi
--
-+PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],,
-+ [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])]
-+)
-
- AC_SUBST(CFLAGS)
- AC_SUBST(CPPFLAGS)
-@@ -602,7 +556,7 @@ fi
-
- if test "$with_plugins" = "yes" ; then
- AC_MSG_CHECKING([libxml2 module support])
-- WITH_MODULES="`$XML_CONFIG --modules`"
-+ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
- if test "${WITH_MODULES}" = "1"; then
- AC_MSG_RESULT(yes)
- else
---
-2.8.1
-
diff --git a/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch b/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
deleted file mode 100644
index 16a801010c..0000000000
--- a/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: libxslt-1.1.27/libexslt.pc.in
-===================================================================
---- libxslt-1.1.27.orig/libexslt.pc.in
-+++ libxslt-1.1.27/libexslt.pc.in
-@@ -8,5 +8,5 @@ Name: libexslt
- Version: @LIBEXSLT_VERSION@
- Description: EXSLT Extension library
- Requires: libxml-2.0
--Libs: @EXSLT_LIBDIR@ @EXSLT_LIBS@
-+Libs: -lexslt @EXSLT_LIBDIR@ @EXSLT_LIBS@
- Cflags: @EXSLT_INCLUDEDIR@
-Index: libxslt-1.1.27/libxslt.pc.in
-===================================================================
---- libxslt-1.1.27.orig/libxslt.pc.in
-+++ libxslt-1.1.27/libxslt.pc.in
-@@ -8,5 +8,5 @@ Name: libxslt
- Version: @VERSION@
- Description: XSLT library version 2.
- Requires: libxml-2.0
--Libs: @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
-+Libs: -lxslt @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
- Cflags: @XSLT_INCLUDEDIR@
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.29.bb b/meta/recipes-support/libxslt/libxslt_1.1.29.bb
deleted file mode 100644
index be747e608d..0000000000
--- a/meta/recipes-support/libxslt/libxslt_1.1.29.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "GNOME XSLT library"
-HOMEPAGE = "http://xmlsoft.org/XSLT/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
-
-SECTION = "libs"
-DEPENDS = "libxml2"
-
-SRC_URI = "ftp://xmlsoft.org/libxslt/libxslt-${PV}.tar.gz \
- file://pkgconfig_fix.patch \
- file://0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch \
- "
-
-SRC_URI[md5sum] = "a129d3c44c022de3b9dcf6d6f288d72e"
-SRC_URI[sha256sum] = "b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce"
-
-UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
-
-S = "${WORKDIR}/libxslt-${PV}"
-
-BINCONFIG = "${bindir}/xslt-config"
-
-inherit autotools pkgconfig binconfig-disabled lib_package
-
-# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
-do_configure_prepend () {
- sed -i -e 's/ansidecl.h//' ${S}/configure.in
-
- # The timestamps in the 1.1.28 tarball are messed up causing this file to
- # appear out of date. Touch it so that we don't try to regenerate it.
- touch ${S}/doc/xsltproc.1
-}
-
-EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
-# older versions of this recipe had ${PN}-utils
-RPROVIDES_${PN}-bin += "${PN}-utils"
-RCONFLICTS_${PN}-bin += "${PN}-utils"
-RREPLACES_${PN}-bin += "${PN}-utils"
-
-
-do_install_append_class-native () {
- create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
-}
-
-FILES_${PN} += "${libdir}/libxslt-plugins"
-FILES_${PN}-dev += "${libdir}/xsltConf.sh"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.34.bb b/meta/recipes-support/libxslt/libxslt_1.1.34.bb
new file mode 100644
index 0000000000..ad37b5a44a
--- /dev/null
+++ b/meta/recipes-support/libxslt/libxslt_1.1.34.bb
@@ -0,0 +1,49 @@
+SUMMARY = "GNOME XSLT library"
+HOMEPAGE = "http://xmlsoft.org/XSLT/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
+
+SECTION = "libs"
+DEPENDS = "libxml2"
+
+SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz \
+ "
+
+SRC_URI[md5sum] = "db8765c8d076f1b6caafd9f2542a304a"
+SRC_URI[sha256sum] = "98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f"
+
+UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
+
+S = "${WORKDIR}/libxslt-${PV}"
+
+BINCONFIG = "${bindir}/xslt-config"
+
+inherit autotools pkgconfig binconfig-disabled lib_package
+
+do_configure_prepend () {
+ # We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header.
+ # This can be removed when upgrading to 1.1.34.
+ sed -i -e 's/ansidecl.h//' ${S}/configure.ac
+
+ # The timestamps in the 1.1.28 tarball are messed up causing this file to
+ # appear out of date. Touch it so that we don't try to regenerate it.
+ touch ${S}/doc/xsltproc.1
+}
+
+EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto --with-html-subdir=${BPN}"
+# older versions of this recipe had ${PN}-utils
+RPROVIDES_${PN}-bin += "${PN}-utils"
+RCONFLICTS_${PN}-bin += "${PN}-utils"
+RREPLACES_${PN}-bin += "${PN}-utils"
+
+# This is only needed until libxml can load the relocated catalog itself
+do_install_append_class-native () {
+ create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog
+}
+
+FILES_${PN} += "${libdir}/libxslt-plugins"
+FILES_${PN}-dev += "${libdir}/xsltConf.sh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libyaml/libyaml_0.1.7.bb b/meta/recipes-support/libyaml/libyaml_0.1.7.bb
deleted file mode 100644
index 5c422ef119..0000000000
--- a/meta/recipes-support/libyaml/libyaml_0.1.7.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "LibYAML is a YAML 1.1 parser and emitter written in C."
-DESCRIPTION = "LibYAML is a C library for parsing and emitting data in YAML 1.1, \
-a human-readable data serialization format. "
-HOMEPAGE = "http://pyyaml.org/wiki/LibYAML"
-SECTION = "libs/devel"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17"
-
-SRC_URI = "http://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
- "
-
-SRC_URI[md5sum] = "1abf45bd3a96374fa55ca63b32f9f2f9"
-SRC_URI[sha256sum] = "8088e457264a98ba451a90b8661fcb4f9d6f478f7265d48322a196cec2480729"
-
-S = "${WORKDIR}/yaml-${PV}"
-
-inherit autotools
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libyaml/libyaml_0.2.2.bb b/meta/recipes-support/libyaml/libyaml_0.2.2.bb
new file mode 100644
index 0000000000..5105ce69db
--- /dev/null
+++ b/meta/recipes-support/libyaml/libyaml_0.2.2.bb
@@ -0,0 +1,18 @@
+SUMMARY = "LibYAML is a YAML 1.1 parser and emitter written in C."
+DESCRIPTION = "LibYAML is a C library for parsing and emitting data in YAML 1.1, \
+a human-readable data serialization format. "
+HOMEPAGE = "https://pyyaml.org/wiki/LibYAML"
+SECTION = "libs/devel"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a76b4c69bfcf82313bbdc0393b04438a"
+
+SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz"
+SRC_URI[md5sum] = "54bf11ccb8bc488b5b3bec931f5b70dc"
+SRC_URI[sha256sum] = "4a9100ab61047fd9bd395bcef3ce5403365cafd55c1e0d0299cde14958e47be9"
+
+S = "${WORKDIR}/yaml-${PV}"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/lz4/files/run-ptest b/meta/recipes-support/lz4/files/run-ptest
new file mode 100644
index 0000000000..d3bfc49f1c
--- /dev/null
+++ b/meta/recipes-support/lz4/files/run-ptest
@@ -0,0 +1,43 @@
+#!/bin/sh
+cd testsuite
+
+echo -n "---- test-lz4 ----"
+make -C tests test-lz4 > /dev/null 2>&1
+
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
+
+echo -n "---- test-fasttest ----"
+make -C tests test-fasttest > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
+
+echo -n "---- test-frametest ----"
+make -C tests test-frametest > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
+
+echo -n "---- test-fullbench ----"
+make -C tests test-fullbench > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
+
+echo -n "---- test-fuzzer ----"
+make -C tests test-fuzzer > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
diff --git a/meta/recipes-support/lz4/lz4.bb b/meta/recipes-support/lz4/lz4.bb
deleted file mode 100644
index 18e56d04c6..0000000000
--- a/meta/recipes-support/lz4/lz4.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Extremely Fast Compression algorithm"
-DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems."
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=0b0d063f37a4477b54af2459477dcafd"
-
-SRCREV = "d86dc916771c126afb797637dda9f6421c0cb998"
-
-PV = "131+git${SRCPV}"
-
-SRC_URI = "git://github.com/Cyan4973/lz4.git"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}"
-
-do_install() {
- oe_runmake install
-}
-
-BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-support/lz4/lz4_1.9.2.bb b/meta/recipes-support/lz4/lz4_1.9.2.bb
new file mode 100644
index 0000000000..ed4452c82e
--- /dev/null
+++ b/meta/recipes-support/lz4/lz4_1.9.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Extremely Fast Compression algorithm"
+DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems."
+
+LICENSE = "BSD | BSD-2-Clause | GPL-2.0"
+LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=ebc2ea4814a64de7708f1571904b32cc \
+ file://programs/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://LICENSE;md5=d57c0d21cb917fb4e0af2454aa48b956 \
+ "
+
+PE = "1"
+
+SRCREV = "fdf2ef5809ca875c454510610764d9125ef2ebbd"
+
+SRC_URI = "git://github.com/lz4/lz4.git \
+ file://run-ptest \
+ "
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
+
+S = "${WORKDIR}/git"
+
+# Fixed in r118, which is larger than the current version.
+CVE_CHECK_WHITELIST += "CVE-2014-4715"
+
+EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}"
+
+do_install() {
+ oe_runmake install
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch b/meta/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
new file mode 100644
index 0000000000..5235a15dc9
--- /dev/null
+++ b/meta/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
@@ -0,0 +1,27 @@
+From e730bfd7c2d3a4b5f3605878599cb9b20d31b1fd Mon Sep 17 00:00:00 2001
+From: Fan Xin <fan.xin@jp.fujitsu.com>
+Date: Fri, 2 Jun 2017 11:52:25 +0900
+Subject: [PATCH] Add pkgconfigdir to solve the undefine error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index e4d383b..c75023d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -14,6 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)
+ LDADD = src/liblzo2.la
+ lib_LTLIBRARIES =
+ noinst_PROGRAMS =
++pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = lzo2.pc
+
+
+--
+1.9.1
+
diff --git a/meta/recipes-support/lzo/lzo/acinclude.m4 b/meta/recipes-support/lzo/lzo/acinclude.m4
deleted file mode 100644
index c4d2ccd5b5..0000000000
--- a/meta/recipes-support/lzo/lzo/acinclude.m4
+++ /dev/null
@@ -1,358 +0,0 @@
-
-AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
-AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
-])#
-
-AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
-AC_HEADER_TIME
-AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
-])#
-
-AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
-AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
-])#
-
-
-AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-
-AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(__int16)
-AC_CHECK_SIZEOF(__int32)
-AC_CHECK_SIZEOF(__int64)
-
-AC_CHECK_SIZEOF(void *)
-AC_CHECK_SIZEOF(size_t)
-AC_CHECK_SIZEOF(ptrdiff_t)
-])#
-
-
-# /***********************************************************************
-# // Check for ACC_conformance
-# ************************************************************************/
-
-AC_DEFUN([mfx_ACC_ACCCHK], [
-mfx_tmp=$1
-mfx_save_CPPFLAGS=$CPPFLAGS
-dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
-test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
-
-AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#define ACC_CONFIG_NO_HEADER 1
-#include "acc/acc.h"
-#include "acc/acc_incd.h"
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-static void test_acc_compile_time_assert(void) {
-#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-}
-#undef NDEBUG
-#include <assert.h>
-static int test_acc_run_time_assert(int r) {
-#define ACCCHK_ASSERT(expr) assert(expr);
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-return r;
-}
-]], [[
-test_acc_compile_time_assert();
-if (test_acc_run_time_assert(1) != 1) return 1;
-]]
-)])
-
-mfx_tmp=FAILED
-_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
-rm -f conftest.$ac_ext conftest.$ac_objext
-
-CPPFLAGS=$mfx_save_CPPFLAGS
-
-AC_MSG_RESULT([$mfx_tmp])
-case x$mfx_tmp in
- xpassed | xyes) ;;
- *)
- AC_MSG_NOTICE([])
- AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
- AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
- AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
- AC_MSG_NOTICE([Thanks for your support.])
- AC_MSG_NOTICE([])
- AC_MSG_ERROR([ACC conformance test failed. Stop.])
-dnl AS_EXIT
- ;;
-esac
-])# mfx_ACC_ACCCHK
-
-
-# /***********************************************************************
-# // Check for ACC_conformance
-# ************************************************************************/
-
-AC_DEFUN([mfx_MINIACC_ACCCHK], [
-mfx_tmp=$1
-mfx_save_CPPFLAGS=$CPPFLAGS
-dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
-test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
-
-AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#define ACC_CONFIG_NO_HEADER 1
-#define ACC_WANT_ACC_INCD_H 1
-#include $2
-
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
-#include $2
-
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
-static void test_acc_compile_time_assert(void) {
-#include $2
-}
-
-#undef NDEBUG
-#include <assert.h>
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) assert(expr);
-static int test_acc_run_time_assert(int r) {
-#include $2
-return r;
-}
-]], [[
-test_acc_compile_time_assert();
-if (test_acc_run_time_assert(1) != 1) return 1;
-]]
-)])
-
-mfx_tmp=FAILED
-_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
-rm -f conftest.$ac_ext conftest.$ac_objext
-
-CPPFLAGS=$mfx_save_CPPFLAGS
-
-AC_MSG_RESULT([$mfx_tmp])
-case x$mfx_tmp in
- xpassed | xyes) ;;
- *)
- AC_MSG_NOTICE([])
- AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
- AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
- AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
- AC_MSG_NOTICE([Thanks for your support.])
- AC_MSG_NOTICE([])
- AC_MSG_ERROR([ACC conformance test failed. Stop.])
-dnl AS_EXIT
- ;;
-esac
-])# mfx_MINIACC_ACCCHK
-
-
-
-# serial 1
-
-AC_DEFUN([mfx_PROG_CPPFLAGS], [
-AC_MSG_CHECKING([whether the C preprocessor needs special flags])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#include <limits.h>
-#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
-# include "your C preprocessor is broken 1"
-#elif (0xffffu == 0xfffffffful)
-# include "your C preprocessor is broken 2"
-#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
-# include "your C preprocessor is broken 3"
-#endif
-]], [[ ]]
-)])
-
-mfx_save_CPPFLAGS=$CPPFLAGS
-mfx_tmp=ERROR
-for mfx_arg in "" -no-cpp-precomp
-do
- CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
- _AC_COMPILE_IFELSE([],
-[mfx_tmp=$mfx_arg
-break])
-done
-CPPFLAGS=$mfx_save_CPPFLAGS
-rm -f conftest.$ac_ext conftest.$ac_objext
-case x$mfx_tmp in
- x)
- AC_MSG_RESULT([none needed]) ;;
- xERROR)
- AC_MSG_RESULT([ERROR])
- AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
- ;;
- *)
- AC_MSG_RESULT([$mfx_tmp])
- CPPFLAGS="$mfx_tmp $CPPFLAGS"
- ;;
-esac
-])# mfx_PROG_CPPFLAGS
-
-
-
-# serial 3
-
-AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
-AC_CACHE_CHECK([whether limits.h is sane],
-mfx_cv_header_sane_limits_h,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
-#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
-# if defined(__APPLE__) && defined(__GNUC__)
-# error "your preprocessor is broken - use compiler option -no-cpp-precomp"
-# else
-# include "your preprocessor is broken"
-# endif
-#endif
-#define MFX_0xffff 0xffff
-#define MFX_0xffffffffL 4294967295ul
-#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
-# include "error CHAR_BIT"
-#endif
-#if !defined(UCHAR_MAX)
-# include "error UCHAR_MAX 1"
-#endif
-#if !defined(USHRT_MAX)
-# include "error USHRT_MAX 1"
-#endif
-#if !defined(UINT_MAX)
-# include "error UINT_MAX 1"
-#endif
-#if !defined(ULONG_MAX)
-# include "error ULONG_MAX 1"
-#endif
-#if !defined(SHRT_MAX)
-# include "error SHRT_MAX 1"
-#endif
-#if !defined(INT_MAX)
-# include "error INT_MAX 1"
-#endif
-#if !defined(LONG_MAX)
-# include "error LONG_MAX 1"
-#endif
-#if (UCHAR_MAX < 1)
-# include "error UCHAR_MAX 2"
-#endif
-#if (USHRT_MAX < 1)
-# include "error USHRT_MAX 2"
-#endif
-#if (UINT_MAX < 1)
-# include "error UINT_MAX 2"
-#endif
-#if (ULONG_MAX < 1)
-# include "error ULONG_MAX 2"
-#endif
-#if (UCHAR_MAX < 0xff)
-# include "error UCHAR_MAX 3"
-#endif
-#if (USHRT_MAX < MFX_0xffff)
-# include "error USHRT_MAX 3"
-#endif
-#if (UINT_MAX < MFX_0xffff)
-# include "error UINT_MAX 3"
-#endif
-#if (ULONG_MAX < MFX_0xffffffffL)
-# include "error ULONG_MAX 3"
-#endif
-#if (USHRT_MAX > UINT_MAX)
-# include "error USHRT_MAX vs UINT_MAX"
-#endif
-#if (UINT_MAX > ULONG_MAX)
-# include "error UINT_MAX vs ULONG_MAX"
-#endif
-]], [[
-#if (USHRT_MAX == MFX_0xffff)
-{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
-#elif (USHRT_MAX >= MFX_0xffff)
-{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
-#endif
-#if (UINT_MAX == MFX_0xffff)
-{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
-#elif (UINT_MAX >= MFX_0xffff)
-{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
-#endif
-#if (ULONG_MAX == MFX_0xffff)
-{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
-#elif (ULONG_MAX >= MFX_0xffff)
-{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
-#endif
-#if (USHRT_MAX == MFX_0xffffffffL)
-{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
-#elif (USHRT_MAX >= MFX_0xffffffffL)
-{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
-#endif
-#if (UINT_MAX == MFX_0xffffffffL)
-{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
-#elif (UINT_MAX >= MFX_0xffffffffL)
-{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
-#endif
-#if (ULONG_MAX == MFX_0xffffffffL)
-{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
-#elif (ULONG_MAX >= MFX_0xffffffffL)
-{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
-#endif
-]])],
-[mfx_cv_header_sane_limits_h=yes],
-[mfx_cv_header_sane_limits_h=no])])
-])
-
-# /***********************************************************************
-# // standard
-# ************************************************************************/
-
-AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
-AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
-])#
-
-
-# /***********************************************************************
-# //
-# ************************************************************************/
-
-dnl more types which are not yet covered by ACC
-
-AC_DEFUN([mfx_CHECK_SIZEOF], [
-AC_CHECK_SIZEOF(__int32)
-AC_CHECK_SIZEOF(intmax_t)
-AC_CHECK_SIZEOF(uintmax_t)
-AC_CHECK_SIZEOF(intptr_t)
-AC_CHECK_SIZEOF(uintptr_t)
-
-AC_CHECK_SIZEOF(float)
-AC_CHECK_SIZEOF(double)
-AC_CHECK_SIZEOF(long double)
-
-AC_CHECK_SIZEOF(dev_t)
-AC_CHECK_SIZEOF(fpos_t)
-AC_CHECK_SIZEOF(mode_t)
-AC_CHECK_SIZEOF(off_t)
-AC_CHECK_SIZEOF(ssize_t)
-AC_CHECK_SIZEOF(time_t)
-])#
-
-
-
-AC_DEFUN([mfx_CHECK_LIB_WINMM], [
-if test "X$GCC" = Xyes; then
-case $host_os in
-cygwin* | mingw* | pw32*)
- test "X$LIBS" != "X" && LIBS="$LIBS "
- LIBS="${LIBS}-lwinmm" ;;
-*)
- ;;
-esac
-fi
-])#
-
diff --git a/meta/recipes-support/lzo/lzo_2.09.bb b/meta/recipes-support/lzo/lzo_2.09.bb
deleted file mode 100644
index 2978617bbd..0000000000
--- a/meta/recipes-support/lzo/lzo_2.09.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Lossless data compression library"
-HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
-SECTION = "libs"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://src/lzo_init.c;beginline=5;endline=25;md5=355023835a9b9eeb70ab895395e951ff"
-
-SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
- file://0001-Use-memcpy-instead-of-reinventing-it.patch \
- file://acinclude.m4 \
- file://run-ptest \
- "
-
-SRC_URI[md5sum] = "c7ffc9a103afe2d1bba0b015e7aa887f"
-SRC_URI[sha256sum] = "f294a7ced313063c057c504257f437c8335c41bfeed23531ee4e6a2b87bcb34c"
-
-inherit autotools ptest
-
-EXTRA_OECONF = "--enable-shared"
-
-do_configure_prepend () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}
- cp ${S}/util/check.sh $t
- cp ${B}/minilzo/testmini $t
- for i in tests/align tests/chksum lzotest/lzotest examples/simple
- do cp ${B}/`dirname $i`/.libs/`basename $i` $t; \
- done
-}
-
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/lzo/lzo_2.10.bb b/meta/recipes-support/lzo/lzo_2.10.bb
new file mode 100644
index 0000000000..8eefec3cc9
--- /dev/null
+++ b/meta/recipes-support/lzo/lzo_2.10.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Lossless data compression library"
+HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/lzo_init.c;beginline=5;endline=25;md5=9ae697ca01829b0a383c5d2d163e0108"
+
+SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
+ file://0001-Use-memcpy-instead-of-reinventing-it.patch \
+ file://0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "39d3f3f9c55c87b1e5d6888e1420f4b5"
+SRC_URI[sha256sum] = "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072"
+
+inherit autotools ptest
+
+EXTRA_OECONF = "--enable-shared"
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ cp ${S}/util/check.sh $t
+ cp ${B}/minilzo/testmini $t
+ for i in tests/align tests/chksum lzotest/lzotest examples/simple
+ do cp ${B}/`dirname $i`/.libs/`basename $i` $t; \
+ done
+}
+
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch b/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch
deleted file mode 100644
index 867b88b308..0000000000
--- a/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From ecccbcf66da53779d88e38e2af7f82eff8dde7f8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 16 Aug 2015 10:35:47 -0700
-Subject: [PATCH] use static inlines as the external inline definition has
- changed with gcc5
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/miniacc.h | 24 ++++++++----------------
- 1 file changed, 8 insertions(+), 16 deletions(-)
-
-diff --git a/src/miniacc.h b/src/miniacc.h
-index 09e6f0c..cae98d1 100644
---- a/src/miniacc.h
-+++ b/src/miniacc.h
-@@ -2880,8 +2880,7 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
- #if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
- #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
- #if !defined(ACC_UA_GET_LE16)
--extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp);
--extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
-+static __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
- __acc_ua_volatile const acc_uint16e_t* p = (__acc_ua_volatile const acc_uint16e_t*) pp;
- unsigned long v;
- __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
-@@ -2890,8 +2889,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const
- #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
- #endif
- #if !defined(ACC_UA_SET_LE16)
--extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v);
--extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
-+static __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
- __acc_ua_volatile acc_uint16e_t* p = (__acc_ua_volatile acc_uint16e_t*) pp;
- __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
- }
-@@ -2916,8 +2914,7 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi
- #if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
- #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
- #if !defined(ACC_UA_GET_LE32)
--extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp);
--extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
-+static __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
- __acc_ua_volatile const acc_uint32e_t* p = (__acc_ua_volatile const acc_uint32e_t*) pp;
- unsigned long v;
- __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
-@@ -2926,8 +2923,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const
- #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
- #endif
- #if !defined(ACC_UA_SET_LE32)
--extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v);
--extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
-+static __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
- __acc_ua_volatile acc_uint32e_t* p = (__acc_ua_volatile acc_uint32e_t*) pp;
- __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
- }
-@@ -3307,8 +3303,7 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
- #if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
- #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
- #if !defined(ACC_UA_GET_LE16)
--extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp);
--extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
-+static __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
- __acc_ua_volatile const acc_uint16e_t* p = (__acc_ua_volatile const acc_uint16e_t*) pp;
- unsigned long v;
- __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
-@@ -3317,8 +3312,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const
- #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
- #endif
- #if !defined(ACC_UA_SET_LE16)
--extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v);
--extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
-+static __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
- __acc_ua_volatile acc_uint16e_t* p = (__acc_ua_volatile acc_uint16e_t*) pp;
- __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
- }
-@@ -3343,8 +3337,7 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi
- #if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
- #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
- #if !defined(ACC_UA_GET_LE32)
--extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp);
--extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
-+static __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
- __acc_ua_volatile const acc_uint32e_t* p = (__acc_ua_volatile const acc_uint32e_t*) pp;
- unsigned long v;
- __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
-@@ -3353,8 +3346,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const
- #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
- #endif
- #if !defined(ACC_UA_SET_LE32)
--extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v);
--extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
-+static __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
- __acc_ua_volatile acc_uint32e_t* p = (__acc_ua_volatile acc_uint32e_t*) pp;
- __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
- }
---
-2.5.0
-
diff --git a/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch b/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch
deleted file mode 100644
index 72b33970e2..0000000000
--- a/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-gcc-6 has additional errors e.g.
-
-./test.c:1:12: error: variably modified '__acc_cta' at file scope
- extern int __acc_cta[1-2*!((1l << (8*8 -1)) < 0)];
- ^~~~~~~~~
-
-This is rightly pointed out since that index is undefined
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
---- a/src/miniacc.h.orig 2016-02-10 16:09:23.247315866 +0100
-+++ a/src/miniacc.h 2016-02-10 16:12:14.973297054 +0100
-@@ -4469,12 +4469,12 @@
- #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
- #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
- #else
-- ACCCHK_ASSERT((1 << (8*SIZEOF_INT-1)) < 0)
-+ ACCCHK_ASSERT((int)(1u << (8*SIZEOF_INT-1)) < 0)
- #endif
- ACCCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0)
- #if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
- #else
-- ACCCHK_ASSERT((1l << (8*SIZEOF_LONG-1)) < 0)
-+ ACCCHK_ASSERT((long)(1ul << (8*SIZEOF_LONG-1)) < 0)
- #endif
- ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0)
- #if defined(acc_int16e_t)
-@@ -4703,7 +4703,7 @@
- #elif 1 && (ACC_CC_LCC || ACC_CC_LCCWIN32) && !defined(ACCCHK_CFG_PEDANTIC)
- #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
- #elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1)
-- ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
-+ ACCCHK_ASSERT( (int)((unsigned int)((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
- #endif
- #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
- # pragma option pop
diff --git a/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch b/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch
deleted file mode 100644
index 739be82311..0000000000
--- a/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Fix get of FLAGS register in x32 ABI,
-
-x32 ABI requires to have 64-bit variable to store FLAGS register
-instead of size_t that is 32-bit variable, this fix operand
-type mismatch when try to pop previous pushf value.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-
-Index: lzop-1.03/src/miniacc.h
-===================================================================
---- lzop-1.03.orig/src/miniacc.h
-+++ lzop-1.03/src/miniacc.h
-@@ -754,6 +754,9 @@
- #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
- # define ACC_ARCH_AMD64 1
- # define ACC_INFO_ARCH "amd64"
-+# if defined(__ILP32__)
-+# define ACC_ARCH_AMD64_X32 1
-+# endif
- #elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB))
- # define ACC_ARCH_ARM 1
- # define ACC_ARCH_ARM_THUMB 1
-@@ -6787,7 +6790,11 @@ ACCLIB_PUBLIC_NOINLINE(void, acc_debug_n
- ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query) (void)
- {
- #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
-+# if defined(ACC_ARCH_AMD64_X32)
-+ unsigned long long r;
-+# else
- size_t r;
-+# endif
- __asm__ __volatile__("pushf\n pop %0\n" : "=a" (r) : : __ACC_ASM_CLOBBER);
- return (int)(r >> 18) & 1;
- #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
diff --git a/meta/recipes-support/lzop/lzop_1.03.bb b/meta/recipes-support/lzop/lzop_1.03.bb
deleted file mode 100644
index 649e7243ee..0000000000
--- a/meta/recipes-support/lzop/lzop_1.03.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Real-time file compressor"
-DESCRIPTION = "lzop is a compression utility which is designed to be a companion to gzip. \n\
-It is based on the LZO data compression library and its main advantages over \n\
-gzip are much higher compression and decompression speed at the cost of some \n\
-compression ratio. The lzop compression utility was designed with the goals \n\
-of reliability, speed, portability and with reasonable drop-in compatibility \n\
-to gzip."
-DEPENDS += "lzo"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=dfeaf3dc4beef4f5a7bdbc35b197f39e \
- file://src/lzop.c;beginline=5;endline=21;md5=6797bd3ed0a1a49327b7ebf9366ebd86"
-
-SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \
- file://acinclude.m4 \
- file://x32_abi_miniacc_h.patch \
- file://0001-use-static-inlines-as-the-external-inline-definition.patch \
- file://lzop-1.03-gcc6.patch \
- "
-SRC_URI[md5sum] = "006c5e27fb78cdd14a628fdfa5aa1905"
-SRC_URI[sha256sum] = "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9"
-
-inherit autotools
-
-do_configure_prepend () {
- install -Dm 0644 ${WORKDIR}/acinclude.m4 ${S}/acinclude.m4
-}
-
-BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-support/lzop/lzop_1.04.bb b/meta/recipes-support/lzop/lzop_1.04.bb
new file mode 100644
index 0000000000..b50c230437
--- /dev/null
+++ b/meta/recipes-support/lzop/lzop_1.04.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Real-time file compressor"
+DESCRIPTION = "lzop is a compression utility which is designed to be a companion to gzip. \n\
+It is based on the LZO data compression library and its main advantages over \n\
+gzip are much higher compression and decompression speed at the cost of some \n\
+compression ratio. The lzop compression utility was designed with the goals \n\
+of reliability, speed, portability and with reasonable drop-in compatibility \n\
+to gzip."
+DEPENDS += "lzo"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/lzop.c;beginline=5;endline=21;md5=23d767de7754eb24b9e900b025cf7fc8"
+
+SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \
+ file://acinclude.m4 \
+ "
+SRC_URI[md5sum] = "271eb10fde77a0a96b9cbf745e719ddf"
+SRC_URI[sha256sum] = "7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41"
+
+inherit autotools
+
+do_configure_prepend () {
+ install -Dm 0644 ${WORKDIR}/acinclude.m4 ${S}/acinclude.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/mpfr/mpfr.inc b/meta/recipes-support/mpfr/mpfr.inc
deleted file mode 100644
index 7f3f9175dc..0000000000
--- a/meta/recipes-support/mpfr/mpfr.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
-HOMEPAGE = "http://www.mpfr.org/"
-LICENSE = "LGPLv3+"
-SECTION = "devel"
-
-inherit autotools texinfo
diff --git a/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch b/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch
deleted file mode 100644
index ca7100eb29..0000000000
--- a/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 84021b1e236508169be65e802a9c0a25fc9a8827 Mon Sep 17 00:00:00 2001
-From: Phil Blundell <philb@gnu.org>
-Date: Mon, 27 Oct 2008 22:26:35 +0000
-Subject: [PATCH] mpfr: crusade against inline assembler
-
-Without this, build fails for thumb:
-| {standard input}: Assembler messages:
-| {standard input}:199: Error: selected processor does not support Thumb mode `umull sl,r0,r2,r1'
-| {standard input}:214: Error: selected processor does not support Thumb mode `umull sl,r2,r1,fp'
-| {standard input}:219: Error: instruction not supported in Thumb16 mode -- `adds fp,r0,sl'
-| {standard input}:220: Error: unshifted register required -- `adc r2,r2,#0'
-| {standard input}:235: Error: selected processor does not support Thumb mode `umull r0,sl,r1,r3'
-| {standard input}:244: Error: selected processor does not support Thumb mode `umull fp,ip,r1,r3'
-| {standard input}:253: Error: instruction not supported in Thumb16 mode -- `adds r3,sl,fp'
-| {standard input}:254: Error: unshifted register required -- `adc ip,ip,#0'
-| {standard input}:259: Error: instruction not supported in Thumb16 mode -- `adds sl,r1,r0'
-| {standard input}:642: Error: selected processor does not support Thumb mode `umull r0,r2,r3,r1'
-| ../arm-oe-linux-gnueabi-libtool --tag=CC --mode=compile arm-oe-linux-gnueabi-gcc -march=armv5te -mthumb -mthumb-interwork -mtune=xscale --sysroot=/OE/shr-core/tmp-eglibc/sysroots/spitz -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 -DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1 -DHAVE___GMPN_ROOTREM=1 -DHAVE___GMPN_SBPI1_DIVAPPR_Q=1 -I. -O2 -pipe -g -feliminate-unused-debug-types -ffloat-store -c -o pow.lo pow.c
-| {standard input}:1154: Error: selected processor does not support Thumb mode `umull r0,r1,sl,ip'
-| {standard input}:1166: Error: selected processor does not support Thumb mode `umull r3,r2,ip,r0'
-| {standard input}:1171: Error: instruction not supported in Thumb16 mode -- `adds r0,r1,r3'
-| {standard input}:1172: Error: unshifted register required -- `adc r2,r2,#0'
-| make[2]: *** [mul.lo] Error 1
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Upstream-Status: Pending
-
---- mpfr.old/src/mpfr-longlong.h 2008-01-01 03:29:09.000000000 +0000
-+++ mpfr/src/mpfr-longlong.h 2008-10-27 21:46:44.000000000 +0000
-@@ -406,7 +406,7 @@
- "rIJ" ((USItype) (bl)))
- #endif
-
--#if defined (__arm__) && W_TYPE_SIZE == 32
-+#if defined (__arm__) && W_TYPE_SIZE == 32 && !defined(__thumb__)
- #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
- __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3" \
- : "=r" (sh), "=&r" (sl) \
diff --git a/meta/recipes-support/mpfr/mpfr_3.1.4.bb b/meta/recipes-support/mpfr/mpfr_3.1.4.bb
deleted file mode 100644
index 230a86208e..0000000000
--- a/meta/recipes-support/mpfr/mpfr_3.1.4.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require mpfr.inc
-
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
-DEPENDS = "gmp"
-
-SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz \
- file://long-long-thumb.patch \
- "
-SRC_URI[md5sum] = "064b2c18185038e404a401b830d59be8"
-SRC_URI[sha256sum] = "761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5"
-
-UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"
-
-S = "${WORKDIR}/mpfr-${PV}"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/mpfr/mpfr_4.0.2.bb b/meta/recipes-support/mpfr/mpfr_4.0.2.bb
new file mode 100644
index 0000000000..00c2dc2fe9
--- /dev/null
+++ b/meta/recipes-support/mpfr/mpfr_4.0.2.bb
@@ -0,0 +1,19 @@
+SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
+HOMEPAGE = "https://www.mpfr.org/"
+LICENSE = "LGPLv3+"
+SECTION = "devel"
+
+inherit autotools texinfo
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
+ file://COPYING.LESSER;md5=3000208d539ec061b899bce1d9ce9404 \
+ "
+DEPENDS = "gmp autoconf-archive"
+
+SRC_URI = "https://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz"
+SRC_URI[md5sum] = "320fbc4463d4c8cb1e566929d8adc4f8"
+SRC_URI[sha256sum] = "1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a"
+
+UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch b/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch
deleted file mode 100644
index 459f5e3857..0000000000
--- a/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-replace deprecated GnuTLS functions with newer ones if available
-
-Upstream-Status: Pending
-
-Signed-off-by: Armin Kuster <akuster808@gmail.com>
-
-Index: neon-0.30.1/macros/neon.m4
-===================================================================
---- neon-0.30.1.orig/macros/neon.m4
-+++ neon-0.30.1/macros/neon.m4
-@@ -987,6 +987,10 @@ gnutls)
- gnutls_certificate_get_x509_cas \
- gnutls_x509_crt_sign2])
-
-+ # gnutls 4.3 check
-+ AC_CHECK_LIB(gnutls, gnutls_global_init)
-+ AC_CHECK_FUNCS(gnutls_certificate_set_retrieve_function,,)
-+
- # fail if gnutls_x509_crt_sign2 is not found (it was introduced in 1.2.0, which is required)
- if test x${ac_cv_func_gnutls_x509_crt_sign2} != xyes; then
- AC_MSG_ERROR([GnuTLS version predates gnutls_x509_crt_sign2, newer version required (at least 1.2.0)])
-Index: neon-0.30.1/src/ne_gnutls.c
-===================================================================
---- neon-0.30.1.orig/src/ne_gnutls.c
-+++ neon-0.30.1/src/ne_gnutls.c
-@@ -553,7 +553,13 @@ dup_error:
- static int provide_client_cert(gnutls_session_t session,
- const gnutls_datum_t *req_ca_rdn, int nreqs,
- const gnutls_pk_algorithm_t *sign_algos,
-- int sign_algos_length, gnutls_retr_st *st)
-+ int sign_algos_length,
-+#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
-+ gnutls_retr2_st* st
-+#else
-+ gnutls_retr_st *st
-+#endif
-+ )
- {
- ne_session *sess = gnutls_session_get_ptr(session);
-
-@@ -617,8 +623,11 @@ static int provide_client_cert(gnutls_se
- #endif
- ) {
- NE_DEBUG(NE_DBG_SSL, "Supplying client certificate.\n");
--
-+#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
-+ st->cert_type = type;
-+#else
- st->type = type;
-+#endif
- st->ncerts = 1;
- st->cert.x509 = &sess->client_cert->cert.subject;
- st->key.x509 = sess->client_cert->pkey;
-@@ -649,8 +658,14 @@ ne_ssl_context *ne_ssl_context_create(in
- ne_ssl_context *ctx = ne_calloc(sizeof *ctx);
- gnutls_certificate_allocate_credentials(&ctx->cred);
- if (flags == NE_SSL_CTX_CLIENT) {
-+
-+#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
-+ gnutls_certificate_set_retrieve_function(ctx->cred,
-+ provide_client_cert);
-+#else
- gnutls_certificate_client_set_retrieve_function(ctx->cred,
- provide_client_cert);
-+#endif
- }
- gnutls_certificate_set_verify_flags(ctx->cred,
- GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
diff --git a/meta/recipes-support/neon/neon/pkgconfig.patch b/meta/recipes-support/neon/neon/pkgconfig.patch
deleted file mode 100644
index 239dba8e25..0000000000
--- a/meta/recipes-support/neon/neon/pkgconfig.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
----
- neon.pc.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- neon-0.30.1.orig/neon.pc.in
-+++ neon-0.30.1/neon.pc.in
-@@ -7,5 +7,5 @@ Name: neon
- Description: HTTP/WebDAV client library
- Version: @NEON_VERSION@
- Libs: -L${libdir} -lneon @NEON_PC_LIBS@
--Libs.private: @NEON_LIBS@
-+Libs.private: -L${libdir} -lz -lgcrypt -lgpg-error -lexpat -lgnutls
- Cflags: -I${includedir}/neon @NEON_CFLAGS@
diff --git a/meta/recipes-support/neon/neon_0.30.1.bb b/meta/recipes-support/neon/neon_0.30.1.bb
deleted file mode 100644
index b6cfd5076f..0000000000
--- a/meta/recipes-support/neon/neon_0.30.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "An HTTP and WebDAV client library with a C interface"
-HOMEPAGE = "http://www.webdav.org/neon/"
-SECTION = "libs"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
- file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
-
-SRC_URI = "http://www.webdav.org/${BPN}/${BPN}-${PV}.tar.gz \
- file://pkgconfig.patch \
- file://gnutls_4.3_fixup.patch"
-
-SRC_URI[md5sum] = "231adebe5c2f78fded3e3df6e958878e"
-SRC_URI[sha256sum] = "00c626c0dc18d094ab374dbd9a354915bfe4776433289386ed489c2ec0845cdd"
-
-inherit autotools binconfig-disabled lib_package pkgconfig
-
-# Enable gnutls or openssl, not both
-PACKAGECONFIG ?= "expat gnutls libproxy webdav zlib"
-PACKAGECONFIG_class-native = "expat gnutls webdav zlib"
-
-PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
-PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
-PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
-PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
-PACKAGECONFIG[libxml2] = "--with-libxml2,--without-libxml2,libxml2"
-PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
-PACKAGECONFIG[webdav] = "--enable-webdav,--disable-webdav,"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-
-EXTRA_OECONF += "--enable-shared"
-
-do_compile_append() {
- oe_runmake -C test
-}
-
-BINCONFIG = "${bindir}/neon-config"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch b/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch
deleted file mode 100644
index 23da777921..0000000000
--- a/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 46edf01cc98db9f9feec984897836dfdd26bdc8d Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 12 Aug 2015 23:27:27 +0300
-Subject: [PATCH] Add target to only build tests (not run them)
-
-Not sending upstream as this is only a start of a solution to
-installable tests: It's useful for us already as is.
-
-Upstream-Status: Inappropriate [not a complete solution]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- Makefile.in | 3 +++
- testsuite/Makefile.in | 2 ++
- 2 files changed, 5 insertions(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 08efb7d..7909342 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -55,6 +55,9 @@ clean distclean mostlyclean maintainer-clean tags:
- echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
- $(MAKE) $@-here
-
-+buildtest:
-+ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
-+
- check-here:
- true
-
-diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
-index 6bc1907..bb65bf0 100644
---- a/testsuite/Makefile.in
-+++ b/testsuite/Makefile.in
-@@ -116,6 +116,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
- # data.
- VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
-
-+buildtest: $(TS_ALL)
-+
- # The PATH update is for locating dlls on w*ndows.
- check: $(TS_ALL)
- LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
---
-2.1.4
-
diff --git a/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch b/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch
deleted file mode 100644
index a956f426b8..0000000000
--- a/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Upstream-Status: Backport
-https://git.lysator.liu.se/nettle/nettle/commit/c71d2c9d20eeebb985e3872e4550137209e3ce4d
-
-CVE: CVE-2015-8803
-CVE: CVE-2015-8805
-
-Same fix for both.
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: nettle-2.7.1/ecc-256.c
-===================================================================
---- nettle-2.7.1.orig/ecc-256.c
-+++ nettle-2.7.1/ecc-256.c
-@@ -96,9 +96,19 @@ ecc_256_modp (const struct ecc_curve *ec
- q2 += t + (q1 < t);
-
- assert (q2 < 2);
-+ /*
-+ n-1 n-2 n-3 n-4
-+ +---+---+---+---+
-+ | u1| u0| u low |
-+ +---+---+---+---+
-+ - | q1(2^96-1)|
-+ +-------+---+
-+ |q2(2^.)|
-+ +-------+
-
-- /* We multiply by two low limbs of p, 2^96 - 1, so we could use
-- shifts rather than mul. */
-+ We multiply by two low limbs of p, 2^96 - 1, so we could use
-+ shifts rather than mul.
-+ */
- t = mpn_submul_1 (rp + n - 4, ecc->p, 2, q1);
- t += cnd_sub_n (q2, rp + n - 3, ecc->p, 1);
- t += (-q2) & 0xffffffff;
-@@ -108,7 +118,10 @@ ecc_256_modp (const struct ecc_curve *ec
- u0 -= t;
- t = (u1 < cy);
- u1 -= cy;
-- u1 += cnd_add_n (t, rp + n - 4, ecc->p, 3);
-+
-+ cy = cnd_add_n (t, rp + n - 4, ecc->p, 2);
-+ u0 += cy;
-+ u1 += (u0 < cy);
- u1 -= (-t) & 0xffffffff;
- }
- rp[2] = u0;
-@@ -195,7 +208,7 @@ ecc_256_modq (const struct ecc_curve *ec
-
- /* Conditional add of p */
- u1 += t;
-- u2 += (t<<32) + (u0 < t);
-+ u2 += (t<<32) + (u1 < t);
-
- t = cnd_add_n (t, rp + n - 4, ecc->q, 2);
- u1 += t;
-Index: nettle-2.7.1/ChangeLog
-===================================================================
---- nettle-2.7.1.orig/ChangeLog
-+++ nettle-2.7.1/ChangeLog
-@@ -1,3 +1,9 @@
-+2015-12-10 Niels Möller <nisse@lysator.liu.se>
-+
-+ * ecc-256.c (ecc_256_modp): Fixed carry propagation bug. Problem
-+ reported by Hanno Böck.
-+ (ecc_256_modq): Fixed another carry propagation bug.
-+
- 2013-05-28 Niels Möller <nisse@lysator.liu.se>
-
- * Released nettle-2.7.1.
diff --git a/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch b/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch
deleted file mode 100644
index 73723a998d..0000000000
--- a/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch
+++ /dev/null
@@ -1,272 +0,0 @@
-Upstream-Status: Backport
- https://git.lysator.liu.se/nettle/nettle/commit/fa269b6ad06dd13c901dbd84a12e52b918a09cd7
-
-CVE: CVE-2015-8804
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: nettle-2.7.1/ChangeLog
-===================================================================
---- nettle-2.7.1.orig/ChangeLog
-+++ nettle-2.7.1/ChangeLog
-@@ -1,3 +1,11 @@
-+2015-12-15 Niels Möller <nisse@lysator.liu.se>
-+
-+ * x86_64/ecc-384-modp.asm: Fixed carry propagation bug. Problem
-+ reported by Hanno Böck. Simplified the folding to always use
-+ non-negative carry, the old code attempted to add in a carry which
-+ could be either positive or negative, but didn't get that case
-+ right.
-+
- 2015-12-10 Niels Möller <nisse@lysator.liu.se>
-
- * ecc-256.c (ecc_256_modp): Fixed carry propagation bug. Problem
-Index: nettle-2.7.1/x86_64/ecc-384-modp.asm
-===================================================================
---- nettle-2.7.1.orig/x86_64/ecc-384-modp.asm
-+++ nettle-2.7.1/x86_64/ecc-384-modp.asm
-@@ -20,7 +20,7 @@ C MA 02111-1301, USA.
- .file "ecc-384-modp.asm"
-
- define(<RP>, <%rsi>)
--define(<D4>, <%rax>)
-+define(<D5>, <%rax>)
- define(<T0>, <%rbx>)
- define(<T1>, <%rcx>)
- define(<T2>, <%rdx>)
-@@ -35,8 +35,8 @@ define(<H4>, <%r13>)
- define(<H5>, <%r14>)
- define(<C2>, <%r15>)
- define(<C0>, H5) C Overlap
--define(<D0>, RP) C Overlap
--define(<TMP>, H4) C Overlap
-+define(<TMP>, RP) C Overlap
-+
-
- PROLOGUE(nettle_ecc_384_modp)
- W64_ENTRY(2, 0)
-@@ -48,34 +48,38 @@ PROLOGUE(nettle_ecc_384_modp)
- push %r14
- push %r15
-
-- C First get top 2 limbs, which need folding twice
-+ C First get top 2 limbs, which need folding twice.
-+ C B^10 = B^6 + B^4 + 2^32 (B-1)B^4.
-+ C We handle the terms as follow:
- C
-- C H5 H4
-- C -H5
-- C ------
-- C H0 D4
-+ C B^6: Folded immediatly.
- C
-- C Then shift right, (H1,H0,D4) <-- (H0,D4) << 32
-- C and add
-+ C B^4: Delayed, added in in the next folding.
- C
-- C H5 H4
-- C H1 H0
-- C ----------
-- C C2 H1 H0
--
-- mov 80(RP), D4
-- mov 88(RP), H0
-- mov D4, H4
-- mov H0, H5
-- sub H0, D4
-- sbb $0, H0
--
-- mov D4, T2
-- mov H0, H1
-- shl $32, H0
-- shr $32, T2
-+ C 2^32(B-1) B^4: Low half limb delayed until the next
-+ C folding. Top 1.5 limbs subtracted and shifter now, resulting
-+ C in 2.5 limbs. The low limb saved in D5, high 1.5 limbs added
-+ C in.
-+
-+ mov 80(RP), H4
-+ mov 88(RP), H5
-+ C Shift right 32 bits, into H1, H0
-+ mov H4, H0
-+ mov H5, H1
-+ mov H5, D5
- shr $32, H1
-- or T2, H0
-+ shl $32, D5
-+ shr $32, H0
-+ or D5, H0
-+
-+ C H1 H0
-+ C - H1 H0
-+ C --------
-+ C H1 H0 D5
-+ mov H0, D5
-+ neg D5
-+ sbb H1, H0
-+ sbb $0, H1
-
- xor C2, C2
- add H4, H0
-@@ -114,118 +118,95 @@ PROLOGUE(nettle_ecc_384_modp)
- adc H3, T5
- adc $0, C0
-
-- C H3 H2 H1 H0 0
-- C - H4 H3 H2 H1 H0
-- C ---------------
-- C H3 H2 H1 H0 D0
--
-- mov XREG(D4), XREG(D4)
-- mov H0, D0
-- neg D0
-- sbb H1, H0
-- sbb H2, H1
-- sbb H3, H2
-- sbb H4, H3
-- sbb $0, D4
--
-- C Shift right. High bits are sign, to be added to C0.
-- mov D4, TMP
-- sar $32, TMP
-- shl $32, D4
-- add TMP, C0
--
-+ C Shift left, including low half of H4
- mov H3, TMP
-+ shl $32, H4
- shr $32, TMP
-- shl $32, H3
-- or TMP, D4
-+ or TMP, H4
-
- mov H2, TMP
-+ shl $32, H3
- shr $32, TMP
-- shl $32, H2
- or TMP, H3
-
- mov H1, TMP
-+ shl $32, H2
- shr $32, TMP
-- shl $32, H1
- or TMP, H2
-
- mov H0, TMP
-+ shl $32, H1
- shr $32, TMP
-- shl $32, H0
- or TMP, H1
-
-- mov D0, TMP
-- shr $32, TMP
-- shl $32, D0
-- or TMP, H0
-+ shl $32, H0
-+
-+ C H4 H3 H2 H1 H0 0
-+ C - H4 H3 H2 H1 H0
-+ C ---------------
-+ C H4 H3 H2 H1 H0 TMP
-
-- add D0, T0
-+ mov H0, TMP
-+ neg TMP
-+ sbb H1, H0
-+ sbb H2, H1
-+ sbb H3, H2
-+ sbb H4, H3
-+ sbb $0, H4
-+
-+ add TMP, T0
- adc H0, T1
- adc H1, T2
- adc H2, T3
- adc H3, T4
-- adc D4, T5
-+ adc H4, T5
- adc $0, C0
-
- C Remains to add in C2 and C0
-- C C0 C0<<32 (-2^32+1)C0
-- C C2 C2<<32 (-2^32+1)C2
-- C where C2 is always positive, while C0 may be -1.
-+ C Set H1, H0 = (2^96 - 2^32 + 1) C0
- mov C0, H0
- mov C0, H1
-- mov C0, H2
-- sar $63, C0 C Get sign
- shl $32, H1
-- sub H1, H0 C Gives borrow iff C0 > 0
-+ sub H1, H0
- sbb $0, H1
-- add C0, H2
-
-+ C Set H3, H2 = (2^96 - 2^32 + 1) C2
-+ mov C2, H2
-+ mov C2, H3
-+ shl $32, H3
-+ sub H3, H2
-+ sbb $0, H3
-+ add C0, H2 C No carry. Could use lea trick
-+
-+ xor C0, C0
- add H0, T0
- adc H1, T1
-- adc $0, H2
-- adc $0, C0
--
-- C Set (H1 H0) <-- C2 << 96 - C2 << 32 + 1
-- mov C2, H0
-- mov C2, H1
-- shl $32, H1
-- sub H1, H0
-- sbb $0, H1
--
-- add H2, H0
-- adc C0, H1
-- adc C2, C0
-- mov C0, H2
-- sar $63, C0
-- add H0, T2
-- adc H1, T3
-- adc H2, T4
-- adc C0, T5
-- sbb C0, C0
-+ adc H2, T2
-+ adc H3, T3
-+ adc C2, T4
-+ adc D5, T5 C Value delayed from initial folding
-+ adc $0, C0 C Use sbb and switch sign?
-
- C Final unlikely carry
- mov C0, H0
- mov C0, H1
-- mov C0, H2
-- sar $63, C0
- shl $32, H1
- sub H1, H0
- sbb $0, H1
-- add C0, H2
-
- pop RP
-
-- sub H0, T0
-+ add H0, T0
- mov T0, (RP)
-- sbb H1, T1
-+ adc H1, T1
- mov T1, 8(RP)
-- sbb H2, T2
-+ adc C0, T2
- mov T2, 16(RP)
-- sbb C0, T3
-+ adc $0, T3
- mov T3, 24(RP)
-- sbb C0, T4
-+ adc $0, T4
- mov T4, 32(RP)
-- sbb C0, T5
-+ adc $0, T5
- mov T5, 40(RP)
-
- pop %r15
diff --git a/meta/recipes-support/nettle/nettle-3.5.1/Add-target-to-only-build-tests-not-run-them.patch b/meta/recipes-support/nettle/nettle-3.5.1/Add-target-to-only-build-tests-not-run-them.patch
new file mode 100644
index 0000000000..c007060ee6
--- /dev/null
+++ b/meta/recipes-support/nettle/nettle-3.5.1/Add-target-to-only-build-tests-not-run-them.patch
@@ -0,0 +1,38 @@
+Add target to only build tests (not run them)
+
+Not sending upstream as this is only a start of a solution to
+installable tests: It's useful for us already as is.
+
+Upstream-Status: Inappropriate [not a complete solution]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Refactored for 3.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/Makefile.in
+===================================================================
+--- nettle-3.4.orig/Makefile.in
++++ nettle-3.4/Makefile.in
+@@ -55,6 +55,9 @@ clean distclean mostlyclean maintainer-c
+ echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
+ $(MAKE) $@-here
+
++buildtest:
++ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
++
+ check-here:
+ true
+
+Index: nettle-3.4/testsuite/Makefile.in
+===================================================================
+--- nettle-3.4.orig/testsuite/Makefile.in
++++ nettle-3.4/testsuite/Makefile.in
+@@ -131,6 +131,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$
+ # data.
+ VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
+
++buildtest: $(TS_ALL)
++
+ # The PATH update is for windows dlls, DYLD_LIBRARY_PATH is for OSX.
+ check: $(TS_ALL)
+ LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" DYLD_LIBRARY_PATH=../.lib \
diff --git a/meta/recipes-support/nettle/nettle-3.5.1/check-header-files-of-openssl-only-if-enable_.patch b/meta/recipes-support/nettle/nettle-3.5.1/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 0000000000..d5f266681e
--- /dev/null
+++ b/meta/recipes-support/nettle/nettle-3.5.1/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,36 @@
+From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 9 Dec 2016 15:23:17 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+
+refactored for 3.4. pending not in as of 3.4
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/configure.ac
+===================================================================
+--- nettle-3.4.orig/configure.ac
++++ nettle-3.4/configure.ac
+@@ -185,9 +185,11 @@ AC_HEADER_TIME
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(size_t)
+
+-AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++ AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
++ [enable_openssl=no
++ break])
++fi
+
+ # For use by the testsuite
+ AC_CHECK_HEADERS([valgrind/memcheck.h])
diff --git a/meta/recipes-support/nettle/nettle-3.5.1/dlopen-test.patch b/meta/recipes-support/nettle/nettle-3.5.1/dlopen-test.patch
new file mode 100644
index 0000000000..fea5774206
--- /dev/null
+++ b/meta/recipes-support/nettle/nettle-3.5.1/dlopen-test.patch
@@ -0,0 +1,21 @@
+Remove the relative path for libnettle.so so the test
+program can find it.
+Relative paths are not suitable, as the folder strucure for ptest
+is different from the one expected by the nettle testsuite.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+
+--- a/testsuite/dlopen-test.c 2016-10-01 00:28:38.000000000 -0700
++++ b/testsuite/dlopen-test.c 2017-10-13 11:08:57.227572860 -0700
+@@ -9,7 +9,7 @@
+ main (int argc UNUSED, char **argv UNUSED)
+ {
+ #if HAVE_LIBDL
+- void *handle = dlopen ("../libnettle.so", RTLD_NOW);
++ void *handle = dlopen ("libnettle.so", RTLD_NOW);
+ int (*get_version)(void);
+ if (!handle)
+ {
diff --git a/meta/recipes-support/nettle/files/run-ptest b/meta/recipes-support/nettle/nettle-3.5.1/run-ptest
index b90bed66d2..b90bed66d2 100644
--- a/meta/recipes-support/nettle/files/run-ptest
+++ b/meta/recipes-support/nettle/nettle-3.5.1/run-ptest
diff --git a/meta/recipes-support/nettle/nettle.inc b/meta/recipes-support/nettle/nettle.inc
deleted file mode 100644
index af51fb6c77..0000000000
--- a/meta/recipes-support/nettle/nettle.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "A low level cryptographic library"
-HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
-SECTION = "libs"
-
-DEPENDS += "gmp"
-
-SRC_URI = "http://www.lysator.liu.se/~nisse/archive/${BP}.tar.gz \
- file://Add-target-to-only-build-tests-not-run-them.patch \
- file://run-ptest \
- "
-
-UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit autotools ptest
-
-EXTRA_OECONF = "--disable-openssl"
-
-do_configure_prepend() {
- if [ ! -e ${S}/acinclude.m4 -a -e ${S}/aclocal.m4 ]; then
- cp ${S}/aclocal.m4 ${S}/acinclude.m4
- fi
-}
-
-do_compile_ptest() {
- oe_runmake buildtest
-}
-
-do_install_ptest() {
- install -d ${D}${PTEST_PATH}/testsuite/
- install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
- install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
- # tools can be found in PATH, not in ../tools/
- sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
- install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/nettle/nettle_2.7.1.bb b/meta/recipes-support/nettle/nettle_2.7.1.bb
deleted file mode 100644
index ae8e3119fe..0000000000
--- a/meta/recipes-support/nettle/nettle_2.7.1.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require nettle.inc
-
-LICENSE = "LGPLv2.1+ & GPLv2"
-LICENSE_${PN} = "LGPLv2.1+"
-
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://serpent-decrypt.c;beginline=53;endline=67;md5=bcfd4745d53ca57f82907089898e390d \
- file://serpent-set-key.c;beginline=56;endline=70;md5=bcfd4745d53ca57f82907089898e390d"
-
-SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5"
-SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40"
-
-SRC_URI += "\
- file://CVE-2015-8803_8805.patch \
- file://CVE-2015-8804.patch \
- "
-
-DISABLE_STATIC = ""
diff --git a/meta/recipes-support/nettle/nettle_3.2.bb b/meta/recipes-support/nettle/nettle_3.2.bb
deleted file mode 100644
index 2b7977974d..0000000000
--- a/meta/recipes-support/nettle/nettle_3.2.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require nettle.inc
-
-LICENSE = "LGPLv3+ | GPLv2+"
-
-LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
- file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
-
-SRC_URI[md5sum] = "afb15b4764ebf1b4e6d06c62bd4d29e4"
-SRC_URI[sha256sum] = "ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97"
diff --git a/meta/recipes-support/nettle/nettle_3.5.1.bb b/meta/recipes-support/nettle/nettle_3.5.1.bb
new file mode 100644
index 0000000000..d92db0ef95
--- /dev/null
+++ b/meta/recipes-support/nettle/nettle_3.5.1.bb
@@ -0,0 +1,55 @@
+SUMMARY = "A low level cryptographic library"
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
+SECTION = "libs"
+LICENSE = "LGPLv3+ | GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
+ file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
+
+DEPENDS += "gmp"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+ file://Add-target-to-only-build-tests-not-run-them.patch \
+ file://run-ptest \
+ file://check-header-files-of-openssl-only-if-enable_.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://dlopen-test.patch \
+ "
+
+SRC_URI[md5sum] = "0e5707b418c3826768d41130fbe4ee86"
+SRC_URI[sha256sum] = "75cca1998761b02e16f2db56da52992aef622bf55a3b45ec538bc2eedadc9419"
+
+UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools ptest multilib_header
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+EXTRA_OECONF = "--disable-openssl"
+CFLAGS_append = " -std=gnu99"
+
+do_compile_ptest() {
+ oe_runmake buildtest
+}
+
+do_install_append() {
+ oe_multilib_header nettle/version.h
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite/
+ install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
+ install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+ # tools can be found in PATH, not in ../tools/
+ sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
+ install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+}
+
+RDEPENDS_${PN}-ptest += "${PN}-dev"
+INSANE_SKIP_${PN}-ptest += "dev-deps"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/npth/npth_1.2.bb b/meta/recipes-support/npth/npth_1.2.bb
deleted file mode 100644
index 66aa3474bd..0000000000
--- a/meta/recipes-support/npth/npth_1.2.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "New GNU Portable Threads library"
-HOMEPAGE = "http://www.gnupg.org/software/pth/"
-SECTION = "libs"
-LICENSE = "LGPLv3+ & GPLv2+"
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=751419260aa954499f7abaabaa882bbe\
- file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6\
- "
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/npth/npth-${PV}.tar.bz2 \
- file://pkgconfig.patch \
- "
-
-SRC_URI[md5sum] = "226bac7374b9466c6ec26b1c34dab844"
-SRC_URI[sha256sum] = "6ddbdddb2cf49a4723f9d1ad6563c480d6760dcb63cb7726b8fc3bc2e1b6c08a"
-
-BINCONFIG = "${bindir}/npth-config"
-
-inherit autotools binconfig-disabled
-
-FILES_${PN} = "${libdir}/libnpth.so.*"
-FILES_${PN}-dev += "${bindir}/npth-config"
diff --git a/meta/recipes-support/npth/npth_1.6.bb b/meta/recipes-support/npth/npth_1.6.bb
new file mode 100644
index 0000000000..233e0dc4a4
--- /dev/null
+++ b/meta/recipes-support/npth/npth_1.6.bb
@@ -0,0 +1,27 @@
+SUMMARY = "New GNU Portable Threads library"
+HOMEPAGE = "http://www.gnupg.org/software/pth/"
+SECTION = "libs"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING.LIB;md5=2caced0b25dfefd4c601d92bd15116de\
+ "
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/npth/npth-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
+ "
+
+SRC_URI[md5sum] = "375d1a15ad969f32d25f1a7630929854"
+SRC_URI[sha256sum] = "1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1"
+
+BINCONFIG = "${bindir}/npth-config"
+
+inherit autotools binconfig-disabled multilib_header
+
+FILES_${PN} = "${libdir}/libnpth.so.*"
+FILES_${PN}-dev += "${bindir}/npth-config"
+
+do_install_append() {
+ oe_multilib_header npth.h
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch b/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch
new file mode 100644
index 0000000000..f3cd670026
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch
@@ -0,0 +1,31 @@
+From 147f3c2acbd96d44025cec11800ded0282327764 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 18 Sep 2017 17:22:43 -0700
+Subject: [PATCH] md: Fix build with musl
+
+The MIPS specific header <sgidefs.h> is not provided by musl
+linux kernel headers provide <asm/sgidefs.h> which has same definitions
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ pr/include/md/_linux.cfg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
+index 640b19c..31296a8 100644
+--- a/pr/include/md/_linux.cfg
++++ b/pr/include/md/_linux.cfg
+@@ -499,7 +499,7 @@
+ #elif defined(__mips__)
+
+ /* For _ABI64 */
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+
+ #ifdef __MIPSEB__
+ #define IS_BIG_ENDIAN 1
+--
+2.14.1
+
diff --git a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch b/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
index 23228067ec..3a04d426a8 100644
--- a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
+++ b/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
@@ -12,11 +12,11 @@ Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=124442
nspr/pr/include/md/_linux.h | 14 ++++++++++++++
2 files changed, 59 insertions(+)
-diff --git a/pr/include/md/_linux.cfg b/nspr/pr/include/md/_linux.cfg
-index 8cbf0cb..150676b 100644
---- a/pr/include/md/_linux.cfg
-+++ b/pr/include/md/_linux.cfg
-@@ -972,6 +972,51 @@
+Index: nspr/pr/include/md/_linux.cfg
+===================================================================
+--- nspr.orig/pr/include/md/_linux.cfg
++++ nspr/pr/include/md/_linux.cfg
+@@ -975,6 +975,51 @@
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
@@ -68,10 +68,10 @@ index 8cbf0cb..150676b 100644
#elif defined(__or1k__)
#undef IS_LITTLE_ENDIAN
-diff --git a/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h
-index d378db5..18260be 100644
---- a/pr/include/md/_linux.h
-+++ b/pr/include/md/_linux.h
+Index: nspr/pr/include/md/_linux.h
+===================================================================
+--- nspr.orig/pr/include/md/_linux.h
++++ nspr/pr/include/md/_linux.h
@@ -55,6 +55,8 @@
#define _PR_SI_ARCHITECTURE "avr32"
#elif defined(__m32r__)
@@ -80,8 +80,8 @@ index d378db5..18260be 100644
+#define _PR_SI_ARCHITECTURE "nios2"
#elif defined(__or1k__)
#define _PR_SI_ARCHITECTURE "or1k"
- #else
-@@ -125,6 +127,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
+ #elif defined(__riscv) && (__riscv_xlen == 32)
+@@ -129,6 +131,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRIn
#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
#endif
@@ -100,6 +100,3 @@ index d378db5..18260be 100644
#if defined(__or1k__)
#if defined(__GNUC__)
/* Use GCC built-in functions */
---
-2.7.0.rc3
-
diff --git a/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch b/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch
new file mode 100644
index 0000000000..90fe45f34d
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch
@@ -0,0 +1,103 @@
+From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Fri, 16 Nov 2018 13:52:49 +0800
+Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME
+
+Remove _BUILD_STRING and _BUILD_TIME to avoid
+adding timestamp to _pl_bld.h which can result
+in adding timestamp in library file such as
+libnspr4.so.
+ $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so
+ [snip]
+ 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49
+ [snip]
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ lib/ds/Makefile.in | 8 +-------
+ lib/libc/src/Makefile.in | 8 +-------
+ lib/prstreams/Makefile.in | 8 +-------
+ pr/src/Makefile.in | 8 +-------
+ 4 files changed, 4 insertions(+), 28 deletions(-)
+
+diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in
+index e737791..b578476 100644
+--- a/lib/ds/Makefile.in
++++ b/lib/ds/Makefile.in
+@@ -114,13 +114,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in
+index e8a6d9f..978ed28 100644
+--- a/lib/libc/src/Makefile.in
++++ b/lib/libc/src/Makefile.in
+@@ -116,13 +116,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in
+index aeb2944..f318097 100644
+--- a/lib/prstreams/Makefile.in
++++ b/lib/prstreams/Makefile.in
+@@ -116,13 +116,7 @@ endif
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
+index 19c5a69..b4ac31c 100644
+--- a/pr/src/Makefile.in
++++ b/pr/src/Makefile.in
+@@ -326,13 +326,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC)
+--
+2.7.4
+
diff --git a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
index c2b7258e50..f12acc8548 100644
--- a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
+++ b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
@@ -49,4 +49,4 @@ Index: nspr/configure.in
- PR_MD_ASFILES=os_Linux_ppc.s
fi
;;
- m68k)
+ esac
diff --git a/meta/recipes-support/nspr/nspr/nspr.pc.in b/meta/recipes-support/nspr/nspr/nspr.pc.in
index c37d0bcbd7..d74caabe4c 100644
--- a/meta/recipes-support/nspr/nspr/nspr.pc.in
+++ b/meta/recipes-support/nspr/nspr/nspr.pc.in
@@ -6,6 +6,6 @@ includedir=OEINCDIR
Name: NSPR
Description: The Netscape Portable Runtime
-Version: 4.9.5
+Version: NSPRVERSION
Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
Cflags:
diff --git a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
index a7e7853de1..7ba59ed644 100644
--- a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
+++ b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
@@ -11,12 +11,12 @@ in file {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/packages-sp
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Upstream-Status: Pending
-Index: nspr-4.8.9/mozilla/nsprpub/pr/tests/Makefile.in
+Index: nspr/pr/tests/Makefile.in
===================================================================
---- nsprpub.orig/pr/tests/Makefile.in 2012-02-11 00:01:10.476220505 +0200
-+++ nsprpub/pr/tests/Makefile.in 2012-02-10 23:57:40.000000000 +0200
-@@ -379,7 +379,7 @@
- endif
+--- nspr.orig/pr/tests/Makefile.in
++++ nspr/pr/tests/Makefile.in
+@@ -316,7 +316,7 @@ ifeq ($(OS_ARCH), SunOS)
+ endif # SunOS
ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH)))
- LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
diff --git a/meta/recipes-support/nspr/nspr_4.12.bb b/meta/recipes-support/nspr/nspr_4.12.bb
deleted file mode 100644
index fa6d52357d..0000000000
--- a/meta/recipes-support/nspr/nspr_4.12.bb
+++ /dev/null
@@ -1,184 +0,0 @@
-SUMMARY = "Netscape Portable Runtime Library"
-HOMEPAGE = "http://www.mozilla.org/projects/nspr/"
-LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
-LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
- file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
-SECTION = "libs/network"
-
-SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
- file://remove-rpath-from-tests.patch \
- file://fix-build-on-x86_64.patch \
- file://remove-srcdir-from-configure-in.patch \
- file://0002-Add-nios2-support.patch \
- file://nspr.pc.in \
-"
-
-CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
- -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
- -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
- -D_PR_INET6_PROBE'"
-
-UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
-UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
-
-SRC_URI[md5sum] = "0de760c1e00a92e180e611cf06ce9589"
-SRC_URI[sha256sum] = "e0b10a1e569153668ff8bdea6c7e491b389fab69c2f18285a1ebf7c2ea4269de"
-
-S = "${WORKDIR}/nspr-${PV}/nspr"
-
-RDEPENDS_${PN}-dev += "perl"
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-TESTS = " \
- accept \
- acceptread \
- acceptreademu \
- affinity \
- alarm \
- anonfm \
- atomic \
- attach \
- bigfile \
- cleanup \
- cltsrv \
- concur \
- cvar \
- cvar2 \
- dlltest \
- dtoa \
- errcodes \
- exit \
- fdcach \
- fileio \
- foreign \
- formattm \
- fsync \
- gethost \
- getproto \
- i2l \
- initclk \
- inrval \
- instrumt \
- intrio \
- intrupt \
- io_timeout \
- ioconthr \
- join \
- joinkk \
- joinku \
- joinuk \
- joinuu \
- layer \
- lazyinit \
- libfilename \
- lltest \
- lock \
- lockfile \
- logfile \
- logger \
- many_cv \
- multiwait \
- nameshm1 \
- nblayer \
- nonblock \
- ntioto \
- ntoh \
- op_2long \
- op_excl \
- op_filnf \
- op_filok \
- op_nofil \
- parent \
- parsetm \
- peek \
- perf \
- pipeping \
- pipeping2 \
- pipeself \
- poll_nm \
- poll_to \
- pollable \
- prftest \
- primblok \
- provider \
- prpollml \
- ranfile \
- randseed \
- reinit \
- rwlocktest \
- sel_spd \
- selct_er \
- selct_nm \
- selct_to \
- selintr \
- sema \
- semaerr \
- semaping \
- sendzlf \
- server_test \
- servr_kk \
- servr_uk \
- servr_ku \
- servr_uu \
- short_thread \
- sigpipe \
- socket \
- sockopt \
- sockping \
- sprintf \
- stack \
- stdio \
- str2addr \
- strod \
- switch \
- system \
- testbit \
- testfile \
- threads \
- timemac \
- timetest \
- tpd \
- udpsrv \
- vercheck \
- version \
- writev \
- xnotify \
- zerolen"
-
-inherit autotools
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-do_compile_prepend() {
- oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export
-}
-
-do_compile_append() {
- oe_runmake -C pr/tests
-}
-
-do_install_append() {
- install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
- sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
- sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nspr.pc
- sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/nspr.pc
- sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
-
- mkdir -p ${D}${libdir}/nspr/tests
- install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
- install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
- cd ${B}/pr/tests
- install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
-
- # delete compile-et.pl and perr.properties from ${bindir} because these are
- # only used to generate prerr.c and prerr.h files from prerr.et at compile
- # time
- rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
-}
-
-FILES_${PN} = "${libdir}/lib*.so"
-FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
- ${includedir}/* ${datadir}/aclocal/* "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/nspr/nspr_4.24.bb b/meta/recipes-support/nspr/nspr_4.24.bb
new file mode 100644
index 0000000000..5f823f8941
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr_4.24.bb
@@ -0,0 +1,193 @@
+SUMMARY = "Netscape Portable Runtime Library"
+HOMEPAGE = "http://www.mozilla.org/projects/nspr/"
+LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
+LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
+ file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
+SECTION = "libs/network"
+
+SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
+ file://remove-rpath-from-tests.patch \
+ file://fix-build-on-x86_64.patch \
+ file://remove-srcdir-from-configure-in.patch \
+ file://0002-Add-nios2-support.patch \
+ file://0001-md-Fix-build-with-musl.patch \
+ file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \
+ file://nspr.pc.in \
+"
+
+CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
+ -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
+ -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
+ -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
+
+UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
+UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
+
+SRC_URI[md5sum] = "d630c2111e1db6d2ec2069aad22b4121"
+SRC_URI[sha256sum] = "90a59a0df6a11528749647fe18401cc7e03881e3e63c309f8c520ce06dd413d0"
+
+CVE_PRODUCT = "netscape_portable_runtime"
+
+S = "${WORKDIR}/nspr-${PV}/nspr"
+
+RDEPENDS_${PN}-dev += "perl"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+TESTS = " \
+ accept \
+ acceptread \
+ acceptreademu \
+ affinity \
+ alarm \
+ anonfm \
+ atomic \
+ attach \
+ bigfile \
+ cleanup \
+ cltsrv \
+ concur \
+ cvar \
+ cvar2 \
+ dlltest \
+ dtoa \
+ errcodes \
+ exit \
+ fdcach \
+ fileio \
+ foreign \
+ formattm \
+ fsync \
+ gethost \
+ getproto \
+ i2l \
+ initclk \
+ inrval \
+ instrumt \
+ intrio \
+ intrupt \
+ io_timeout \
+ ioconthr \
+ join \
+ joinkk \
+ joinku \
+ joinuk \
+ joinuu \
+ layer \
+ lazyinit \
+ libfilename \
+ lltest \
+ lock \
+ lockfile \
+ logfile \
+ logger \
+ many_cv \
+ multiwait \
+ nameshm1 \
+ nblayer \
+ nonblock \
+ ntioto \
+ ntoh \
+ op_2long \
+ op_excl \
+ op_filnf \
+ op_filok \
+ op_nofil \
+ parent \
+ parsetm \
+ peek \
+ perf \
+ pipeping \
+ pipeping2 \
+ pipeself \
+ poll_nm \
+ poll_to \
+ pollable \
+ prftest \
+ primblok \
+ provider \
+ prpollml \
+ ranfile \
+ randseed \
+ reinit \
+ rwlocktest \
+ sel_spd \
+ selct_er \
+ selct_nm \
+ selct_to \
+ selintr \
+ sema \
+ semaerr \
+ semaping \
+ sendzlf \
+ server_test \
+ servr_kk \
+ servr_uk \
+ servr_ku \
+ servr_uu \
+ short_thread \
+ sigpipe \
+ socket \
+ sockopt \
+ sockping \
+ sprintf \
+ stack \
+ stdio \
+ str2addr \
+ strod \
+ switch \
+ system \
+ testbit \
+ testfile \
+ threads \
+ timemac \
+ timetest \
+ tpd \
+ udpsrv \
+ vercheck \
+ version \
+ writev \
+ xnotify \
+ zerolen"
+
+inherit autotools multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_compile_prepend() {
+ oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
+}
+
+do_compile_append() {
+ oe_runmake -C pr/tests
+}
+
+do_install_append() {
+ install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
+ sed -i \
+ -e 's:NSPRVERSION:${PV}:g' \
+ -e 's:OEPREFIX:${prefix}:g' \
+ -e 's:OELIBDIR:${libdir}:g' \
+ -e 's:OEINCDIR:${includedir}:g' \
+ -e 's:OEEXECPREFIX:${exec_prefix}:g' \
+ ${D}${libdir}/pkgconfig/nspr.pc
+
+ mkdir -p ${D}${libdir}/nspr/tests
+ install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
+ install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
+ cd ${B}/pr/tests
+ install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
+
+ # delete compile-et.pl and perr.properties from ${bindir} because these are
+ # only used to generate prerr.c and prerr.h files from prerr.et at compile
+ # time
+ rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
+}
+
+FILES_${PN} = "${libdir}/lib*.so"
+FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
+ ${includedir}/* ${datadir}/aclocal/* "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch b/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch
deleted file mode 100644
index 82f25743af..0000000000
--- a/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From d1345871b992f9a055c968963967e728da1a7ffb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 30 Jan 2016 20:29:06 +0000
-Subject: [PATCH] nss-myhostname: Check for nss.h presense before use
-
-We do not have nss.h on musl e.g. and configury is already checking for
-nss.h presence, use this to define needed data structures if nss.h is
-missing on a given libc implementation on a platform
-
-include stdint.h for uint32_h definition
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- nss-myhostname.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/nss-myhostname.c b/nss-myhostname.c
-index 293166c..6f287f5 100644
---- a/nss-myhostname.c
-+++ b/nss-myhostname.c
-@@ -21,7 +21,27 @@
- ***/
-
- #include <limits.h>
-+#include <stdint.h>
-+#ifdef HAVE_NSS_H
- #include <nss.h>
-+#else
-+enum nss_status {
-+ NSS_STATUS_TRYAGAIN = -2,
-+ NSS_STATUS_UNAVAIL,
-+ NSS_STATUS_NOTFOUND,
-+ NSS_STATUS_SUCCESS,
-+ NSS_STATUS_RETURN
-+};
-+/* Data structure used for the 'gethostbyname4_r' function. */
-+struct gaih_addrtuple
-+ {
-+ struct gaih_addrtuple *next;
-+ char *name;
-+ int family;
-+ uint32_t addr[4];
-+ uint32_t scopeid;
-+ };
-+#endif
- #include <sys/types.h>
- #include <netdb.h>
- #include <errno.h>
---
-2.7.0
-
diff --git a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
index de5b7cf598..074f713205 100644
--- a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
+++ b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -7,13 +7,14 @@ LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${PV}.tar.gz \
- file://0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch \
"
SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f"
SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2"
-inherit autotools distro_features_check
+inherit autotools features_check
+
+COMPATIBLE_HOST_libc-musl = 'null'
# The systemd has its own copy of nss-myhostname
CONFLICT_DISTRO_FEATURES = "systemd"
diff --git a/meta/recipes-support/nss/nss/0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch b/meta/recipes-support/nss/nss/0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch
new file mode 100644
index 0000000000..59e44e6841
--- /dev/null
+++ b/meta/recipes-support/nss/nss/0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch
@@ -0,0 +1,35 @@
+From 6b351dbb049b3b3ab6c0d51aa3c1c7fb3c9df80c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
+Date: Mon, 22 Jul 2019 11:07:41 -0700
+Subject: [PATCH] Bug 1493916 - Fix ppc64 inline assembler for clang r=jcj
+ Seems clang's inline assembler doesn't want registers to be prefixed with
+ "r", while gcc accepts both - r0 and 0 for GPR0.
+
+tested with clang 6.0 and gcc 8.1
+
+--HG--
+extra : amend_source : 87e09bb59c78bdb25b9573b9f29511e10b9db6fa
+extra : histedit_source : 9b3fad70ac2851bf7de14d42c34db4a5fba41710
+
+Upstream-Status: Backport [https://github.com/nss-dev/nss/commit/671d89b6c4a6f41707bb044534751098e2e3f211]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ nss/lib/freebl/mpi/mpcpucache.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nss/lib/freebl/mpi/mpcpucache.c b/nss/lib/freebl/mpi/mpcpucache.c
+index 336b4cc..2ad291f 100644
+--- a/nss/lib/freebl/mpi/mpcpucache.c
++++ b/nss/lib/freebl/mpi/mpcpucache.c
+@@ -727,7 +727,7 @@ static inline void
+ dcbzl(char *array)
+ {
+ register char *a asm("r2") = array;
+- __asm__ __volatile__("dcbzl %0,r0"
++ __asm__ __volatile__("dcbzl %0,0"
+ : "=r"(a)
+ : "0"(a));
+ }
+--
+2.24.0
+
diff --git a/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch
new file mode 100644
index 0000000000..d5403397e7
--- /dev/null
+++ b/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch
@@ -0,0 +1,48 @@
+From 0cf47ee432cc26a706864fcc09b2c3adc342a679 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 22 Feb 2017 11:36:11 +0200
+Subject: [PATCH] nss: fix support cross compiling
+
+Let some make variables be assigned from outside makefile.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ nss/coreconf/arch.mk | 2 +-
+ nss/lib/freebl/Makefile | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
+index 06c276f..9c1eb51 100644
+--- a/nss/coreconf/arch.mk
++++ b/nss/coreconf/arch.mk
+@@ -30,7 +30,7 @@ OS_TEST := $(shell uname -m)
+ ifeq ($(OS_TEST),i86pc)
+ OS_RELEASE := $(shell uname -r)_$(OS_TEST)
+ else
+- OS_RELEASE := $(shell uname -r)
++ OS_RELEASE ?= $(shell uname -r)
+ endif
+
+ #
+diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
+index 0ce1425..ebeb411 100644
+--- a/nss/lib/freebl/Makefile
++++ b/nss/lib/freebl/Makefile
+@@ -36,6 +36,12 @@ ifdef USE_64
+ DEFINES += -DNSS_USE_64
+ endif
+
++ifeq ($(OS_TEST),mips)
++ifndef USE_64
++ DEFINES += -DNS_PTR_LE_32
++endif
++endif
++
+ ifdef USE_ABI32_FPU
+ DEFINES += -DNSS_USE_ABI32_FPU
+ endif
+--
+2.11.0
+
diff --git a/meta/recipes-support/nss/nss/blank-cert9.db b/meta/recipes-support/nss/nss/blank-cert9.db
new file mode 100644
index 0000000000..7d4bcf2582
--- /dev/null
+++ b/meta/recipes-support/nss/nss/blank-cert9.db
Binary files differ
diff --git a/meta/recipes-support/nss/nss/blank-key4.db b/meta/recipes-support/nss/nss/blank-key4.db
new file mode 100644
index 0000000000..d47f08d04f
--- /dev/null
+++ b/meta/recipes-support/nss/nss/blank-key4.db
Binary files differ
diff --git a/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch b/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
index 86b1b60556..de812d27ba 100644
--- a/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
+++ b/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
@@ -18,11 +18,11 @@ for more details
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: nss-3.24/nss/coreconf/Werror.mk
+Index: nss-3.37.1/nss/coreconf/Werror.mk
===================================================================
---- nss-3.24.orig/nss/coreconf/Werror.mk
-+++ nss-3.24/nss/coreconf/Werror.mk
-@@ -54,7 +54,7 @@ ifndef WARNING_CFLAGS
+--- nss-3.37.1.orig/nss/coreconf/Werror.mk
++++ nss-3.37.1/nss/coreconf/Werror.mk
+@@ -56,7 +56,7 @@ ifndef WARNING_CFLAGS
ifdef CC_IS_CLANG
# -Qunused-arguments : clang objects to arguments that it doesn't understand
# and fixing this would require rearchitecture
diff --git a/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch
deleted file mode 100644
index f0b3550bff..0000000000
--- a/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-nss: fix support cross compiling
-
-Let some make variables be assigned from outside makefile.
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Upstream-Status: Inappropriate [configuration]
----
- nss/coreconf/Linux.mk | 12 +++++++++++-
- nss/coreconf/arch.mk | 2 +-
- nss/lib/freebl/Makefile | 6 ++++++
- 3 files changed, 18 insertions(+), 2 deletions(-)
-
-diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
---- a/nss/coreconf/Linux.mk
-+++ b/nss/coreconf/Linux.mk
-@@ -16,11 +16,21 @@ ifeq ($(USE_PTHREADS),1)
- IMPL_STRATEGY = _PTH
- endif
-
-+ifndef CC
- CC = gcc
-+endif
-+
-+ifdef CXX
-+CCC = $(CXX)
-+else
- CCC = g++
-+endif
-+
-+ifndef RANLIB
- RANLIB = ranlib
-+endif
-
--DEFAULT_COMPILER = gcc
-+DEFAULT_COMPILER = $(CC)
-
- ifeq ($(OS_TARGET),Android)
- ifndef ANDROID_NDK
-diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
-index 6557348..b722412 100644
---- a/nss/coreconf/arch.mk
-+++ b/nss/coreconf/arch.mk
-@@ -37,7 +37,7 @@ OS_TEST := $(shell uname -m)
- ifeq ($(OS_TEST),i86pc)
- OS_RELEASE := $(shell uname -r)_$(OS_TEST)
- else
-- OS_RELEASE := $(shell uname -r)
-+ OS_RELEASE ?= $(shell uname -r)
- endif
-
- #
-diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
-index 0d293f1..678f506 100644
---- a/nss/lib/freebl/Makefile
-+++ b/nss/lib/freebl/Makefile
-@@ -36,6 +36,12 @@ ifdef USE_64
- DEFINES += -DNSS_USE_64
- endif
-
-+ifeq ($(OS_TEST),mips)
-+ifndef USE_64
-+ DEFINES += -DNS_PTR_LE_32
-+endif
-+endif
-+
- ifdef USE_ABI32_FPU
- DEFINES += -DNSS_USE_ABI32_FPU
- endif
---
-1.8.1.2
-
diff --git a/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
index 9caaaeb955..3a817faaa6 100644
--- a/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
+++ b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
@@ -6,18 +6,18 @@ pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: nss-3.24/nss/lib/freebl/pqg.c
+Index: nss-3.37.1/nss/lib/freebl/pqg.c
===================================================================
---- nss-3.24.orig/nss/lib/freebl/pqg.c
-+++ nss-3.24/nss/lib/freebl/pqg.c
-@@ -322,8 +322,8 @@ generate_h_candidate(SECItem *hit, mp_in
+--- nss-3.37.1.orig/nss/lib/freebl/pqg.c
++++ nss-3.37.1/nss/lib/freebl/pqg.c
+@@ -326,8 +326,8 @@ generate_h_candidate(SECItem *hit, mp_in
static SECStatus
- addToSeed(const SECItem * seed,
-- unsigned long addend,
-- int seedlen, /* g in 186-1 */
+ addToSeed(const SECItem *seed,
+- unsigned long addend,
+- int seedlen, /* g in 186-1 */
+ unsigned long long addend,
+ int seedlen, /* g in 186-1 */
- SECItem * seedout)
+ SECItem *seedout)
{
mp_int s, sum, modulus, tmp;
diff --git a/meta/recipes-support/nss/nss/system-pkcs11.txt b/meta/recipes-support/nss/nss/system-pkcs11.txt
new file mode 100644
index 0000000000..1a264e9cc4
--- /dev/null
+++ b/meta/recipes-support/nss/nss/system-pkcs11.txt
@@ -0,0 +1,5 @@
+library=
+name=NSS Internal PKCS #11 Module
+parameters=configdir='sql:/etc/pki/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
+NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
+
diff --git a/meta/recipes-support/nss/nss_3.25.bb b/meta/recipes-support/nss/nss_3.25.bb
deleted file mode 100644
index eff09ebbdb..0000000000
--- a/meta/recipes-support/nss/nss_3.25.bb
+++ /dev/null
@@ -1,242 +0,0 @@
-SUMMARY = "Mozilla's SSL and TLS implementation"
-DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
-designed to support cross-platform development of \
-security-enabled client and server applications. \
-Applications built with NSS can support SSL v2 and v3, \
-TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
-v3 certificates, and other security standards."
-HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
-SECTION = "libs"
-
-LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
-
-LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
- file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
- file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
-
-SRC_URI = "\
- http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_25_RTM/src/${BP}.tar.gz \
- file://nss-fix-support-cross-compiling.patch \
- file://nss-no-rpath-for-cross-compiling.patch \
- file://nss-fix-incorrect-shebang-of-perl.patch \
- file://nss-fix-nsinstall-build.patch \
- file://disable-Wvarargs-with-clang.patch \
- file://pqg.c-ULL_addend.patch \
- file://nss.pc.in \
- file://signlibs.sh \
-"
-SRC_URI[md5sum] = "23169c406adc8ac3672d34bf9ea2433d"
-SRC_URI[sha256sum] = "5d1ad475da19d0c033a716350dc5f8a747999d3eba5ac07ee0368c5bad6e2359"
-
-UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
-UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
-
-inherit siteinfo
-
-DEPENDS = "sqlite3 nspr zlib nss-native"
-DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
-RDEPENDS_${PN}-smime = "perl"
-
-TD = "${S}/tentative-dist"
-TDS = "${S}/tentative-dist-staging"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_configure_prepend_libc-musl () {
- sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
-}
-
-do_compile_prepend_class-native() {
- export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
- export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
- export NSS_ENABLE_WERROR=0
-}
-
-do_compile_prepend_class-nativesdk() {
- export LDFLAGS=""
-}
-
-do_compile_prepend_class-native() {
- # Need to set RPATH so that chrpath will do its job correctly
- RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
-}
-
-do_compile() {
- export CROSS_COMPILE=1
- export NATIVE_CC="gcc"
- export NATIVE_FLAGS="${HOST_CFLAGS}"
- export BUILD_OPT=1
-
- export FREEBL_NO_DEPEND=1
- export FREEBL_LOWHASH=1
-
- export LIBDIR=${libdir}
- export MOZILLA_CLIENT=1
- export NS_USE_GCC=1
- export NSS_USE_SYSTEM_SQLITE=1
- export NSS_ENABLE_ECC=1
-
- export OS_RELEASE=3.4
- export OS_TARGET=Linux
- export OS_ARCH=Linux
-
- if [ "${TARGET_ARCH}" = "powerpc" ]; then
- OS_TEST=ppc
- elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
- OS_TEST=ppc64
- elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
- OS_TEST=mips
- else
- OS_TEST="${TARGET_ARCH}"
- fi
-
- if [ "${SITEINFO_BITS}" = "64" ]; then
- export USE_64=1
- elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
- export USE_X32=1
- fi
-
- export NSS_DISABLE_GTESTS=1
-
- # We can modify CC in the environment, but if we set it via an
- # argument to make, nsinstall, a host program, will also build with it!
- #
- export CC="${CC} -g"
- make -C ./nss CCC="${CXX} -g" \
- OS_TEST=${OS_TEST} \
- RPATH="${RPATH}"
-}
-
-
-do_install_prepend_class-nativesdk() {
- export LDFLAGS=""
-}
-
-do_install() {
- export CROSS_COMPILE=1
- export NATIVE_CC="gcc"
- export BUILD_OPT=1
-
- export FREEBL_NO_DEPEND=1
-
- export LIBDIR=${libdir}
- export MOZILLA_CLIENT=1
- export NS_USE_GCC=1
- export NSS_USE_SYSTEM_SQLITE=1
- export NSS_ENABLE_ECC=1
-
- export OS_RELEASE=3.4
- export OS_TARGET=Linux
- export OS_ARCH=Linux
-
- if [ "${TARGET_ARCH}" = "powerpc" ]; then
- OS_TEST=ppc
- elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
- OS_TEST=ppc64
- elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
- OS_TEST=mips
- else
- OS_TEST="${TARGET_ARCH}"
- fi
- if [ "${SITEINFO_BITS}" = "64" ]; then
- export USE_64=1
- elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
- export USE_X32=1
- fi
-
- export NSS_DISABLE_GTESTS=1
-
- make -C ./nss \
- CCC="${CXX}" \
- OS_TEST=${OS_TEST} \
- SOURCE_LIB_DIR="${TD}/${libdir}" \
- SOURCE_BIN_DIR="${TD}/${bindir}" \
- install
-
- install -d ${D}/${libdir}/
- for file in ${S}/dist/*.OBJ/lib/*.so; do
- echo "Installing `basename $file`..."
- cp $file ${D}/${libdir}/
- done
-
- for shared_lib in ${TD}/${libdir}/*.so.*; do
- if [ -f $shared_lib ]; then
- cp $shared_lib ${D}/${libdir}
- ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
- fi
- done
- for shared_lib in ${TD}/${libdir}/*.so; do
- if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
- cp $shared_lib ${D}/${libdir}
- fi
- done
-
- install -d ${D}/${includedir}/nss3
- install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
-
- install -d ${D}/${bindir}
- for binary in ${TD}/${bindir}/*; do
- install -m 755 -t ${D}/${bindir} $binary
- done
-}
-
-do_install_append() {
- # Create empty .chk files for the NSS libraries at build time. They could
- # be regenerated at target's boot time.
- for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
- touch ${D}/${libdir}/$file
- chmod 755 ${D}/${libdir}/$file
- done
- install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
-
- install -d ${D}${libdir}/pkgconfig/
- sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
-}
-
-do_install_append_class-target() {
- # Create a blank certificate
- mkdir -p ${D}${sysconfdir}/pki/nssdb/
- touch ./empty_password
- certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
- chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
- rm ./empty_password
-}
-
-pkg_postinst_${PN} () {
- if [ -n "$D" ]; then
- for I in $D/${libdir}/lib*.chk; do
- DN=`dirname $I`
- BN=`basename $I .chk`
- FN=$DN/$BN.so
- shlibsign -i $FN
- if [ $? -ne 0 ]; then
- exit 1
- fi
- done
- exit 0
- fi
- signlibs.sh
-}
-
-PACKAGES =+ "${PN}-smime"
-FILES_${PN}-smime = "\
- ${bindir}/smime \
-"
-FILES_${PN} = "\
- ${sysconfdir} \
- ${bindir} \
- ${libdir}/lib*.chk \
- ${libdir}/lib*.so \
- "
-FILES_${PN}-dev = "\
- ${libdir}/nss \
- ${libdir}/pkgconfig/* \
- ${includedir}/* \
- "
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/meta/recipes-support/nss/nss_3.45.bb b/meta/recipes-support/nss/nss_3.45.bb
new file mode 100644
index 0000000000..c8005a5b3a
--- /dev/null
+++ b/meta/recipes-support/nss/nss_3.45.bb
@@ -0,0 +1,268 @@
+SUMMARY = "Mozilla's SSL and TLS implementation"
+DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
+designed to support cross-platform development of \
+security-enabled client and server applications. \
+Applications built with NSS can support SSL v2 and v3, \
+TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
+v3 certificates, and other security standards."
+HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
+SECTION = "libs"
+
+DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
+
+LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
+
+LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
+ file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
+ file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
+
+VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}"
+
+SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \
+ file://nss.pc.in \
+ file://signlibs.sh \
+ file://0001-nss-fix-support-cross-compiling.patch \
+ file://nss-no-rpath-for-cross-compiling.patch \
+ file://nss-fix-incorrect-shebang-of-perl.patch \
+ file://nss-fix-nsinstall-build.patch \
+ file://disable-Wvarargs-with-clang.patch \
+ file://pqg.c-ULL_addend.patch \
+ file://0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch \
+ file://blank-cert9.db \
+ file://blank-key4.db \
+ file://system-pkcs11.txt \
+ "
+
+SRC_URI[md5sum] = "f1752d7223ee9d910d551e57264bafa8"
+SRC_URI[sha256sum] = "112f05223d1fde902c170966bfc6f011b24a838be16969b110ecf2bb7bc24e8b"
+
+UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
+UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
+
+inherit siteinfo
+
+TD = "${S}/tentative-dist"
+TDS = "${S}/tentative-dist-staging"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_configure_prepend_libc-musl () {
+ sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
+}
+
+do_compile_prepend_class-native() {
+ export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
+ export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
+ export NSS_ENABLE_WERROR=0
+}
+
+do_compile_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_compile_prepend_class-native() {
+ # Need to set RPATH so that chrpath will do its job correctly
+ RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
+}
+
+do_compile() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="${BUILD_CC}"
+ export NATIVE_FLAGS="${BUILD_CFLAGS}"
+ export BUILD_OPT=1
+
+ export FREEBL_NO_DEPEND=1
+ export FREEBL_LOWHASH=1
+
+ export LIBDIR=${libdir}
+ export MOZILLA_CLIENT=1
+ export NS_USE_GCC=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+
+ export OS_RELEASE=3.4
+ export OS_TARGET=Linux
+ export OS_ARCH=Linux
+
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ OS_TEST=ppc
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ OS_TEST=ppc64
+ elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+ OS_TEST=mips
+ elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then
+ OS_TEST="aarch64"
+ else
+ OS_TEST="${TARGET_ARCH}"
+ fi
+
+ if [ "${SITEINFO_BITS}" = "64" ]; then
+ export USE_64=1
+ elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+ export USE_X32=1
+ fi
+
+ export NSS_DISABLE_GTESTS=1
+
+ # We can modify CC in the environment, but if we set it via an
+ # argument to make, nsinstall, a host program, will also build with it!
+ #
+ # nss pretty much does its own thing with CFLAGS, so we put them into CC.
+ # Optimization will get clobbered, but most of the stuff will survive.
+ # The motivation for this is to point to the correct place for debug
+ # source files and CFLAGS does that. Nothing uses CCC.
+ #
+ export CC="${CC} ${CFLAGS}"
+ make -C ./nss CCC="${CXX} -g" \
+ OS_TEST=${OS_TEST} \
+ RPATH="${RPATH}"
+}
+
+do_compile[vardepsexclude] += "SITEINFO_BITS"
+
+do_install_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_install() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="${BUILD_CC}"
+ export BUILD_OPT=1
+
+ export FREEBL_NO_DEPEND=1
+
+ export LIBDIR=${libdir}
+ export MOZILLA_CLIENT=1
+ export NS_USE_GCC=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+
+ export OS_RELEASE=3.4
+ export OS_TARGET=Linux
+ export OS_ARCH=Linux
+
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ OS_TEST=ppc
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ OS_TEST=ppc64
+ elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+ OS_TEST=mips
+ elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then
+ CPU_ARCH=aarch64
+ OS_TEST="aarch64"
+ else
+ OS_TEST="${TARGET_ARCH}"
+ fi
+ if [ "${SITEINFO_BITS}" = "64" ]; then
+ export USE_64=1
+ elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+ export USE_X32=1
+ fi
+
+ export NSS_DISABLE_GTESTS=1
+
+ make -C ./nss \
+ CCC="${CXX}" \
+ OS_TEST=${OS_TEST} \
+ SOURCE_LIB_DIR="${TD}/${libdir}" \
+ SOURCE_BIN_DIR="${TD}/${bindir}" \
+ install
+
+ install -d ${D}/${libdir}/
+ for file in ${S}/dist/*.OBJ/lib/*.so; do
+ echo "Installing `basename $file`..."
+ cp $file ${D}/${libdir}/
+ done
+
+ for shared_lib in ${TD}/${libdir}/*.so.*; do
+ if [ -f $shared_lib ]; then
+ cp $shared_lib ${D}/${libdir}
+ ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
+ fi
+ done
+ for shared_lib in ${TD}/${libdir}/*.so; do
+ if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
+ cp $shared_lib ${D}/${libdir}
+ fi
+ done
+
+ install -d ${D}/${includedir}/nss3
+ install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
+
+ install -d ${D}/${bindir}
+ for binary in ${TD}/${bindir}/*; do
+ install -m 755 -t ${D}/${bindir} $binary
+ done
+}
+
+do_install[vardepsexclude] += "SITEINFO_BITS"
+
+do_install_append() {
+ # Create empty .chk files for the NSS libraries at build time. They could
+ # be regenerated at target's boot time.
+ for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
+ touch ${D}/${libdir}/$file
+ chmod 755 ${D}/${libdir}/$file
+ done
+ install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
+
+ install -d ${D}${libdir}/pkgconfig/
+ sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
+}
+
+do_install_append_class-target() {
+ # It used to call certutil to create a blank certificate with empty password at
+ # build time, but the checksum of key4.db changes every time when certutil is called.
+ # It causes non-determinism issue, so provide databases with a blank certificate
+ # which are originally from output of nss in qemux86-64 build. You can get these
+ # databases by:
+ # certutil -N -d sql:/database/path/ --empty-password
+ install -d ${D}${sysconfdir}/pki/nssdb/
+ install -m 0644 ${WORKDIR}/blank-cert9.db ${D}${sysconfdir}/pki/nssdb/cert9.db
+ install -m 0644 ${WORKDIR}/blank-key4.db ${D}${sysconfdir}/pki/nssdb/key4.db
+ install -m 0644 ${WORKDIR}/system-pkcs11.txt ${D}${sysconfdir}/pki/nssdb/pkcs11.txt
+}
+
+PACKAGE_WRITE_DEPS += "nss-native"
+pkg_postinst_${PN} () {
+ if [ -n "$D" ]; then
+ for I in $D${libdir}/lib*.chk; do
+ DN=`dirname $I`
+ BN=`basename $I .chk`
+ FN=$DN/$BN.so
+ shlibsign -i $FN
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ done
+ else
+ signlibs.sh
+ fi
+}
+
+PACKAGES =+ "${PN}-smime"
+FILES_${PN}-smime = "\
+ ${bindir}/smime \
+"
+
+FILES_${PN} = "\
+ ${sysconfdir} \
+ ${bindir} \
+ ${libdir}/lib*.chk \
+ ${libdir}/lib*.so \
+ "
+
+FILES_${PN}-dev = "\
+ ${libdir}/nss \
+ ${libdir}/pkgconfig/* \
+ ${includedir}/* \
+ "
+
+RDEPENDS_${PN}-smime = "perl"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb b/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
deleted file mode 100644
index 38fa09bf9a..0000000000
--- a/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Provides a way to load and enumerate PKCS#11 modules"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
-
-inherit autotools gettext pkgconfig upstream-version-is-even gtk-doc
-
-DEPENDS = "libtasn1 libffi"
-
-SRC_URI = "http://p11-glue.freedesktop.org/releases/${BP}.tar.gz"
-SRC_URI[md5sum] = "4e9bea1106628ffb820bdad24a819fac"
-SRC_URI[sha256sum] = "ef3a339fcf6aa0e32c8c23f79ba7191e57312be2bda8b24e6d121c2670539a5c"
-
-EXTRA_OECONF = "--without-trust-paths"
-
-# This recipe does not use the standard gtk-doc m4 macros, and so the ./configure flags
-# that control gtk-doc build are non-standard
-EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-doc --enable-doc-html --disable-doc-pdf', \
- '--disable-doc', d)} "
-
-# When building native recipes, disable gtkdoc, as it is not necessary,
-# pulls in additional dependencies, and makes build times longer
-EXTRA_OECONF_prepend_class-native = "--disable-doc "
-EXTRA_OECONF_prepend_class-nativesdk = "--disable-doc "
-
-UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-gtk-doc-html --disable-gtk-doc-pdf --enable-gtk-doc --disable-gtk-doc"
-
-# p11-kit relies on these two being copied from source tree
-# instead of being regenerated by gtkdoc-scan, but doesn't setup
-# dependencies correctly when there is a parallel build. Let's pre-copy
-# them instead.
-do_compile_prepend () {
- cp ${S}/doc/manual/p11-kit-overrides.txt ${S}/doc/manual/p11-kit-sections.txt ${B}/doc/manual/
-}
-
-FILES_${PN} += " \
- ${libdir}/p11-kit-proxy.so \
- ${libdir}/pkcs11/*.so \
- ${libdir}/pkcs11/*.la"
-
-# PN contains p11-kit-proxy.so, a symlink to a loadable module
-INSANE_SKIP_${PN} = "dev-so"
diff --git a/meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb b/meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb
new file mode 100644
index 0000000000..03c8158ae6
--- /dev/null
+++ b/meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Provides a way to load and enumerate PKCS#11 modules"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
+
+inherit meson gettext pkgconfig gtk-doc
+
+DEPENDS = "libtasn1 libtasn1-native libffi"
+
+DEPENDS_append = "${@' glib-2.0' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
+
+SRC_URI = "git://github.com/p11-glue/p11-kit"
+SRCREV = "b0ebe7555c291808db29377ba79cb8326301f0a6"
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[trust-paths] = "-Dtrust_paths=/etc/ssl/certs/ca-certificates.crt,,,ca-certificates"
+
+GTKDOC_MESON_OPTION = 'gtk_doc'
+
+FILES_${PN} += " \
+ ${libdir}/p11-kit-proxy.so \
+ ${libdir}/pkcs11/*.so \
+ ${libdir}/pkcs11/*.la"
+
+# PN contains p11-kit-proxy.so, a symlink to a loadable module
+INSANE_SKIP_${PN} = "dev-so"
diff --git a/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch b/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch
new file mode 100644
index 0000000000..431edb0351
--- /dev/null
+++ b/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch
@@ -0,0 +1,100 @@
+Convert to pkg-config support to match changes done to
+the gpg-error recipe for gpg-error.pc generation.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: pinentry-1.0.0/m4/gpg-error.m4
+===================================================================
+--- pinentry-1.0.0.orig/m4/gpg-error.m4
++++ pinentry-1.0.0/m4/gpg-error.m4
+@@ -25,74 +25,12 @@ dnl config script does not match the hos
+ dnl is added to the gpg_config_script_warn variable.
+ dnl
+ AC_DEFUN([AM_PATH_GPG_ERROR],
+-[ AC_REQUIRE([AC_CANONICAL_HOST])
+- gpg_error_config_prefix=""
+- dnl --with-libgpg-error-prefix=PFX is the preferred name for this option,
+- dnl since that is consistent with how our three siblings use the directory/
+- dnl package name in --with-$dir_name-prefix=PFX.
+- AC_ARG_WITH(libgpg-error-prefix,
+- AC_HELP_STRING([--with-libgpg-error-prefix=PFX],
+- [prefix where GPG Error is installed (optional)]),
+- [gpg_error_config_prefix="$withval"])
+-
+- dnl Accept --with-gpg-error-prefix and make it work the same as
+- dnl --with-libgpg-error-prefix above, for backwards compatibility,
+- dnl but do not document this old, inconsistently-named option.
+- AC_ARG_WITH(gpg-error-prefix,,
+- [gpg_error_config_prefix="$withval"])
+-
+- if test x"${GPG_ERROR_CONFIG}" = x ; then
+- if test x"${gpg_error_config_prefix}" != x ; then
+- GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
+- else
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/gpg-error-config" ; then
+- GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
+- fi
+- fi
+-
+- AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
++[
+ min_gpg_error_version=ifelse([$1], ,0.0,$1)
+- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
+- ok=no
+- if test "$GPG_ERROR_CONFIG" != "no" \
+- && test -f "$GPG_ERROR_CONFIG" ; then
+- req_major=`echo $min_gpg_error_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpg_error_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version`
+- major=`echo $gpg_error_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $gpg_error_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -ge "$req_minor"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
++ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version gpg-error], [ok=yes], [ok=no])
+ if test $ok = yes; then
+- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
+- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
+- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
+- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
+- AC_MSG_RESULT([yes ($gpg_error_config_version)])
+ ifelse([$2], , :, [$2])
+- gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none`
++ gpg_error_config_host=`$PKG_CONFIG --host gpg-error 2>/dev/null || echo none`
+ if test x"$gpg_error_config_host" != xnone ; then
+ if test x"$gpg_error_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+@@ -107,10 +45,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
+ fi
+ fi
+ else
+- GPG_ERROR_CFLAGS=""
+- GPG_ERROR_LIBS=""
+- GPG_ERROR_MT_CFLAGS=""
+- GPG_ERROR_MT_LIBS=""
+ AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
diff --git a/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch b/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch
new file mode 100644
index 0000000000..11d564f35d
--- /dev/null
+++ b/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch
@@ -0,0 +1,153 @@
+Convert to pkg-config support to match changes done to
+the libassuan recipe for libassuan.pc generation.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: pinentry-1.0.0/m4/libassuan.m4
+===================================================================
+--- pinentry-1.0.0.orig/m4/libassuan.m4
++++ pinentry-1.0.0/m4/libassuan.m4
+@@ -13,34 +13,8 @@ dnl
+ dnl Common code used for libassuan detection [internal]
+ dnl Returns ok set to yes or no.
+ dnl
+-AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+-[ AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_ARG_WITH(libassuan-prefix,
+- AC_HELP_STRING([--with-libassuan-prefix=PFX],
+- [prefix where LIBASSUAN is installed (optional)]),
+- libassuan_config_prefix="$withval", libassuan_config_prefix="")
+- if test x$libassuan_config_prefix != x ; then
+- libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix"
+- if test x${LIBASSUAN_CONFIG+set} != xset ; then
+- LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config
+- fi
+- else
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/libassuan-config" ; then
+- LIBASSUAN_CONFIG="${SYSROOT}/bin/libassuan-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
+- fi
+-
+- AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no)
+-
++AC_DEFUN([AM_PATH_LIBASSUAN_COMMON],
++[
+ tmp=ifelse([$1], ,1:0.9.2,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_libassuan_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -50,51 +24,11 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+ min_libassuan_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version)
+- ok=no
+- if test "$LIBASSUAN_CONFIG" != "no" \
+- && test -f "$LIBASSUAN_CONFIG" ; then
+- req_major=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+-
+- libassuan_config_version=`$LIBASSUAN_CONFIG --version`
+- major=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- micro=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+-
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$minor" -eq "$req_minor"; then
+- if test "$micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
+-
+- if test $ok = yes; then
+- AC_MSG_RESULT([yes ($libassuan_config_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
++ PKG_CHECK_MODULES(LIBASSUAN_COMMON, [libassuan >= $min_libassuan_version libassuan], [ok=yes], [ok=no])
+
+ if test $ok = yes; then
+ if test "$req_libassuan_api" -gt 0 ; then
+- tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version libassuan 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ AC_MSG_CHECKING([LIBASSUAN API version])
+ if test "$req_libassuan_api" -eq "$tmp" ; then
+@@ -109,7 +43,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+
+ if test $ok = yes; then
+ if test x"$host" != x ; then
+- libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none`
++ libassuan_config_host=`$PKG_CONFIG --host libassuan 2>/dev/null || echo 0`
+ if test x"$libassuan_config_host" != xnone ; then
+ if test x"$libassuan_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+@@ -132,7 +66,7 @@ dnl Test whether libassuan has at least
+ dnl used to test for features only available in newer versions.
+ dnl
+ AC_DEFUN([AM_CHECK_LIBASSUAN],
+-[ _AM_PATH_LIBASSUAN_COMMON($1)
++[ AM_PATH_LIBASSUAN_COMMON($1)
+ if test $ok = yes; then
+ ifelse([$2], , :, [$2])
+ else
+@@ -148,16 +82,10 @@ dnl [ACTION-IF-FOUND [
+ dnl Test for libassuan and define LIBASSUAN_CFLAGS and LIBASSUAN_LIBS
+ dnl
+ AC_DEFUN([AM_PATH_LIBASSUAN],
+-[ _AM_PATH_LIBASSUAN_COMMON($1)
++[ AM_PATH_LIBASSUAN_COMMON($1)
+ if test $ok = yes; then
+- LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
+- LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
+ ifelse([$2], , :, [$2])
+ else
+- LIBASSUAN_CFLAGS=""
+- LIBASSUAN_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+- AC_SUBST(LIBASSUAN_CFLAGS)
+- AC_SUBST(LIBASSUAN_LIBS)
+ ])
+Index: pinentry-1.0.0/configure.ac
+===================================================================
+--- pinentry-1.0.0.orig/configure.ac
++++ pinentry-1.0.0/configure.ac
+@@ -266,8 +266,8 @@ if test "$have_libassuan" = "yes"; then
+ [version of the libassuan library])
+ fi
+
+-COMMON_CFLAGS="$LIBASSUAN_CFLAGS $COMMON_CFLAGS"
+-COMMON_LIBS="$LIBASSUAN_LIBS $COMMON_LIBS"
++COMMON_CFLAGS="$LIBASSUAN_COMMON_CFLAGS $COMMON_CFLAGS"
++COMMON_LIBS="$LIBASSUAN_COMMON_LIBS $COMMON_LIBS"
+
+
+ dnl Checks for libsecmem.
diff --git a/meta/recipes-support/pinentry/pinentry_0.9.2.bb b/meta/recipes-support/pinentry/pinentry_0.9.2.bb
deleted file mode 100644
index d315a99d4c..0000000000
--- a/meta/recipes-support/pinentry/pinentry_0.9.2.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
-DESCRIPTION = "\
- Pinentry is a collection of simple PIN or passphrase entry dialogs which \
- utilize the Assuan protocol as described by the aegypten project; see \
- http://www.gnupg.org/aegypten/ for details."
-
-HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
-
-inherit autotools
-
-DEPENDS = "gettext-native"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "f51d454f921111b5156a2291cbf70278"
-SRC_URI[sha256sum] = "fd8bc1592ceb22bb492b07cb29b1b140bb882c859e6503b974254c0a4b4134d1"
-
-EXTRA_OECONF = "--disable-rpath \
- --disable-dependency-tracking \
- "
-
-PACKAGECONFIG ??= "ncurses libcap"
-
-PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
-PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
-PACKAGECONFIG[qt4] = "--enable-pinentry-qt4, --disable-pinentry-qt4, qt4-x11"
-PACKAGECONFIG[qt4_clipboard] = "--enable-pinentry-qt4-clipboard --enable-pinentry-qt4, --disable-pinentry-qt4-clipboard, qt4-x11"
-PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
-
-#To use libsecret, add meta-gnome
-PACKAGECONFIG[secret] = "--enable-libsecret, --disable-libsecret, libsecret"
diff --git a/meta/recipes-support/pinentry/pinentry_1.1.0.bb b/meta/recipes-support/pinentry/pinentry_1.1.0.bb
new file mode 100644
index 0000000000..8c500dcadc
--- /dev/null
+++ b/meta/recipes-support/pinentry/pinentry_1.1.0.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
+DESCRIPTION = "\
+ Pinentry is a collection of simple PIN or passphrase entry dialogs which \
+ utilize the Assuan protocol as described by the aegypten project; see \
+ http://www.gnupg.org/aegypten/ for details."
+
+HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
+
+DEPENDS = "gettext-native libassuan libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://libassuan_pkgconf.patch \
+ file://gpg-error_pkconf.patch \
+"
+
+SRC_URI[md5sum] = "3829315cb0a1e9cedc05ffe6def7a2c6"
+SRC_URI[sha256sum] = "68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "ncurses libcap"
+
+PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
+PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
+PACKAGECONFIG[qt] = "--enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase"
+PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
+
+#To use libsecret, add meta-gnome
+PACKAGECONFIG[secret] = "--enable-libsecret, --disable-libsecret, libsecret"
+
+EXTRA_OECONF = " \
+ --disable-rpath \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/popt/popt_1.16.bb b/meta/recipes-support/popt/popt_1.16.bb
index 478288f9bf..27e49c2ca2 100644
--- a/meta/recipes-support/popt/popt_1.16.bb
+++ b/meta/recipes-support/popt/popt_1.16.bb
@@ -8,7 +8,7 @@ PR = "r3"
DEPENDS = "virtual/libiconv"
-SRC_URI = "http://rpm5.org/files/popt/popt-${PV}.tar.gz \
+SRC_URI = "http://anduin.linuxfromscratch.org/BLFS/popt/popt-${PV}.tar.gz \
file://pkgconfig_fix.patch \
file://popt_fix_for_automake-1.12.patch \
file://disable_tests.patch \
diff --git a/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb b/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb
deleted file mode 100644
index 9d4551389b..0000000000
--- a/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "A C program to run all installed ptests"
-DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \
-program which loops through all installed ptest test suites and \
-runs them in sequence."
-HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-
-SRCREV = "e2aa4256745377b784c8691f546041b59f6e046b"
-PV = "2.0.1+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/ptest-runner2"
-S = "${WORKDIR}/git"
-
-FILES_${PN} = "${bindir}/ptest-runner"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_compile () {
- oe_runmake
-}
-
-do_install () {
- install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner
-}
diff --git a/meta/recipes-support/ptest-runner/ptest-runner_2.3.2.bb b/meta/recipes-support/ptest-runner/ptest-runner_2.3.2.bb
new file mode 100644
index 0000000000..187f22df04
--- /dev/null
+++ b/meta/recipes-support/ptest-runner/ptest-runner_2.3.2.bb
@@ -0,0 +1,28 @@
+SUMMARY = "A C program to run all installed ptests"
+DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \
+program which loops through all installed ptest test suites and \
+runs them in sequence."
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SRCREV = "7015e9199ce748c0717addeebe7a8c47448bab03"
+PV = "2.3.2+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/ptest-runner2 \
+"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN} = "${bindir}/ptest-runner"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS= CFLAGS="${CFLAGS} -DDEFAULT_DIRECTORY=\\\"${libdir}\\\"""
+
+do_compile () {
+ oe_runmake
+}
+
+do_install () {
+ install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner
+}
diff --git a/meta/recipes-support/re2c/re2c_1.0.1.bb b/meta/recipes-support/re2c/re2c_1.0.1.bb
new file mode 100644
index 0000000000..4ed8d257ac
--- /dev/null
+++ b/meta/recipes-support/re2c/re2c_1.0.1.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Tool for writing very fast and very flexible scanners"
+HOMEPAGE = "http://re2c.sourceforge.net/"
+AUTHOR = "Marcus Börger <helly@users.sourceforge.net>"
+SECTION = "devel"
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://README;beginline=146;md5=881056c9add17f8019ccd8c382ba963a"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "e2c6cf52fc6a21595f21bc82db5324f8"
+SRC_URI[sha256sum] = "605058d18a00e01bfc32aebf83af35ed5b13180b4e9f279c90843afab2c66c7c"
+
+BBCLASSEXTEND = "native"
+
+inherit autotools
diff --git a/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch b/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch
deleted file mode 100644
index 4bd9d31c0e..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 99679fda405e535a282f04a4decc2381154a749f Mon Sep 17 00:00:00 2001
-From: Christopher Larson <chris_larson@mentor.com>
-Date: Mon, 15 Feb 2016 15:59:58 -0700
-Subject: [PATCH 1/2] If the libc is lacking argp, use libargp
-
-Patch pulled from Gentoo:
-
- On glibc systems, argp is provided by libc. However, on
- uclibc and other systems which lack argp in their C library,
- argp might be provided by a stand alone library, libargp.
- This patch adds tests to the build system to find who provides
- argp.
-
- X-Gentoo-Bug: 292191
- X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=292191
- Reported-by: Ed Wildgoose <gentoo@wildgooses.com>
- Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-
-Upstream-Status: Pending
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
----
- configure.ac | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 27a2dba..04fcd25 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -82,6 +82,28 @@ AS_IF(
- ]
- )
-
-+dnl First check if we have argp available from libc
-+AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [#include <argp.h>],
-+ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
-+ )],
-+ [libc_has_argp="true"],
-+ [libc_has_argp="false"]
-+)
-+
-+dnl If libc doesn't provide argp, then test for libargp
-+if test "$libc_has_argp" = "false" ; then
-+ AC_MSG_WARN("libc does not have argp")
-+ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
-+
-+ if test "$have_argp" = "false"; then
-+ AC_MSG_ERROR("no libargp found")
-+ else
-+ LIBS+=" -largp"
-+ fi
-+fi
-+
- dnl -----------------
- dnl Configure options
- dnl -----------------
---
-2.2.1
-
diff --git a/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch b/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch
deleted file mode 100644
index 1c8a79ce0b..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From afc8712a9e6c72fbd03c36f84ecf8703e5d22a8c Mon Sep 17 00:00:00 2001
-From: Christopher Larson <chris_larson@mentor.com>
-Date: Mon, 15 Feb 2016 16:11:32 -0700
-Subject: [PATCH 2/2] Add argument to control the libargp dependency
-
-This ensures that the builds are always deterministic. If the argument isn't
-passed, the default behavior is to use libargp if the libc doesn't have argp.
-
-Upstream-Status: Pending
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
----
- configure.ac | 55 ++++++++++++++++++++++++++++++++++++-------------------
- 1 file changed, 36 insertions(+), 19 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 04fcd25..11a5321 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -32,6 +32,13 @@ AC_ARG_WITH([libgcrypt],
- [with_libgcrypt=check]
- )
-
-+AC_ARG_WITH([libargp],
-+ AS_HELP_STRING([--without-libargp],
-+ [Disable libargp support. Systems whose libc lacks argp can use libargp instead. (Default: check if libc lacks argp)]),
-+ [with_libargp=$withval],
-+ [with_libargp=check]
-+)
-+
- dnl Make sure anyone changing configure.ac/Makefile.am has a clue
- AM_MAINTAINER_MODE
-
-@@ -82,27 +89,37 @@ AS_IF(
- ]
- )
-
--dnl First check if we have argp available from libc
--AC_LINK_IFELSE(
-- [AC_LANG_PROGRAM(
-- [#include <argp.h>],
-- [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
-- )],
-- [libc_has_argp="true"],
-- [libc_has_argp="false"]
-+dnl Determine if we need libargp: either user requested, or libc has no argp
-+AS_IF(
-+ [test "x$with_libargp" != "xyes"],
-+ [
-+ AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [#include <argp.h>],
-+ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
-+ )],
-+ [need_libargp=no],
-+ [need_libargp=yes
-+ if test "x$with_libargp" = "xno"; then
-+ AC_MSG_FAILURE([libargp disabled and libc does not have argp])
-+ fi]
-+ )
-+ ],
-+ [need_libargp=yes],
- )
-
--dnl If libc doesn't provide argp, then test for libargp
--if test "$libc_has_argp" = "false" ; then
-- AC_MSG_WARN("libc does not have argp")
-- AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
--
-- if test "$have_argp" = "false"; then
-- AC_MSG_ERROR("no libargp found")
-- else
-- LIBS+=" -largp"
-- fi
--fi
-+dnl Check for libargp
-+AS_IF(
-+ [test "x$need_libargp" = "xyes"],
-+ [
-+ AC_CHECK_LIB(
-+ [argp],
-+ [argp_parse],
-+ [LIBS="$LIBS -largp"],
-+ [AC_MSG_FAILURE([libargp not found])]
-+ )
-+ ]
-+)
-
- dnl -----------------
- dnl Configure options
---
-2.2.1
-
diff --git a/meta/recipes-support/rng-tools/rng-tools/default b/meta/recipes-support/rng-tools/rng-tools/default
index 7aede9be03..b9f8e03635 100644
--- a/meta/recipes-support/rng-tools/rng-tools/default
+++ b/meta/recipes-support/rng-tools/rng-tools/default
@@ -1,3 +1 @@
-# Specify rng device
-#RNG_DEVICE=/dev/hwrng
-RNG_DEVICE=/dev/urandom
+EXTRA_ARGS="-r /dev/hwrng"
diff --git a/meta/recipes-support/rng-tools/rng-tools/init b/meta/recipes-support/rng-tools/rng-tools/init
index 7cf78393a4..13f0ecd37c 100644
--- a/meta/recipes-support/rng-tools/rng-tools/init
+++ b/meta/recipes-support/rng-tools/rng-tools/init
@@ -1,26 +1,19 @@
-#! /bin/sh
+#!/bin/sh
#
# This is an init script for openembedded
-# Copy it to /etc/init.d/rng-tools and type
+# Copy it to @SYSCONFDIR@/init.d/rng-tools and type
# > update-rc.d rng-tools defaults 60
#
-rngd=/usr/sbin/rngd
+rngd=@SBINDIR@/rngd
test -x "$rngd" || exit 1
-if [ -e /etc/default/rng-tools ]; then
- . /etc/default/rng-tools
-fi
-
-if [ -n "$RNG_DEVICE" ]; then
- EXTRA_ARGS="-- -r $RNG_DEVICE"
-fi
-
+[ -r @SYSCONFDIR@/default/rng-tools ] && . "@SYSCONFDIR@/default/rng-tools"
case "$1" in
start)
echo -n "Starting random number generator daemon"
- start-stop-daemon -S -q -x $rngd $EXTRA_ARGS
+ start-stop-daemon -S -q -x $rngd -- $EXTRA_ARGS
echo "."
;;
stop)
@@ -38,11 +31,11 @@ case "$1" in
start-stop-daemon -K -q -n rngd
echo "."
echo -n "Starting random number generator daemon"
- start-stop-daemon -S -q -x $rngd $EXTRA_ARGS
+ start-stop-daemon -S -q -x $rngd -- $EXTRA_ARGS
echo "."
;;
*)
- echo "Usage: /etc/init.d/rng-tools {start|stop|reload|restart|force-reload}"
+ echo "Usage: @SYSCONFDIR@/init.d/rng-tools {start|stop|reload|restart|force-reload}"
exit 1
esac
diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service b/meta/recipes-support/rng-tools/rng-tools/rngd.service
new file mode 100644
index 0000000000..aaaaa29074
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/rngd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Hardware RNG Entropy Gatherer Daemon
+DefaultDependencies=no
+After=systemd-udev-settle.service
+Before=sysinit.target shutdown.target
+Conflicts=shutdown.target
+
+[Service]
+EnvironmentFile=-@SYSCONFDIR@/default/rng-tools
+ExecStart=@SBINDIR@/rngd -f $EXTRA_ARGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch b/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
deleted file mode 100644
index e691315d16..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-In case of uclibc, use libuargp
-
-If we use uclibc for system libraries, select libuargp
-
-Upstream-Status: Pending
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur rng-tools-5-orig/configure.ac rng-tools-5/configure.ac
---- rng-tools-5-orig/configure.ac 2016-02-24 18:11:24.023690235 +0200
-+++ rng-tools-5/configure.ac 2016-02-24 18:14:49.763118138 +0200
-@@ -39,6 +39,13 @@
- [with_libargp=check]
- )
-
-+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 "x$use_uclibc" = "xyes")
-+AS_IF([test "x$use_uclibc" = "xyes"], [AC_DEFINE(USE_UCLIBC)])
-+AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
-+
- dnl Make sure anyone changing configure.ac/Makefile.am has a clue
- AM_MAINTAINER_MODE
-
-@@ -101,7 +108,7 @@
- [need_libargp=no],
- [need_libargp=yes
- if test "x$with_libargp" = "xno"; then
-- AC_MSG_FAILURE([libargp disabled and libc does not have argp])
-+ AC_MSG_WARN([libargp disabled and libc does not have argp])
- fi]
- )
- ],
-@@ -110,7 +117,7 @@
-
- dnl Check for libargp
- AS_IF(
-- [test "x$need_libargp" = "xyes"],
-+ [test "x$need_libargp" = "xyes" -a "x$use_uclibc" = "xno"],
- [
- AC_CHECK_LIB(
- [argp],
-@@ -120,6 +127,19 @@
- )
- ]
- )
-+
-+dnl Check for libuargp
-+AS_IF(
-+ [test "x$use_uclibc" = "xyes"],
-+ [
-+ AC_CHECK_LIB(
-+ [uargp],
-+ [argp_parse],
-+ [LIBS="$LIBS -luargp"],
-+ [AC_MSG_FAILURE([libuargp not found])]
-+ )
-+ ]
-+)
-
- dnl -----------------
- dnl Configure options
diff --git a/meta/recipes-support/rng-tools/rng-tools/underquote.patch b/meta/recipes-support/rng-tools/rng-tools/underquote.patch
deleted file mode 100644
index 1422571818..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/underquote.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fix underquoted m4 entry. This causes a failure if gcrypt isn't present:
-
-| configure: libgcrypt support disabled
-| ../rng-tools-5/configure: line 4345: ac_fn_c_try_link: command not found
-| configure: error: in `/media/build1/poky/build/tmp/work/i586-poky-linux/rng-tools/5-r0/build':
-
-RP
-2016/2/16
-
-Index: rng-tools-5/configure.ac
-===================================================================
---- rng-tools-5.orig/configure.ac
-+++ rng-tools-5/configure.ac
-@@ -71,7 +71,7 @@ AS_IF(
- [test "x$with_libgcrypt" != "xno"],
- [
- AC_CHECK_HEADER([gcrypt.h],
-- AC_CHECK_LIB(
-+ [AC_CHECK_LIB(
- [gcrypt],
- [gcry_check_version], ,
- [
-@@ -80,7 +80,7 @@ AS_IF(
- AC_MSG_NOTICE([libgcrypt support disabled])
- fi
- ]
-- ),
-+ )],
- [if test "x$with_libgcrypt" != "xcheck"; then
- AC_MSG_FAILURE([libgcrypt headers not found]); else
- AC_MSG_NOTICE([libgcrypt support disabled])
diff --git a/meta/recipes-support/rng-tools/rng-tools_5.bb b/meta/recipes-support/rng-tools/rng-tools_5.bb
deleted file mode 100644
index 913a092fd6..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools_5.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "Random number generator daemon"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0b6f033afe6db235e559456585dc8cdc"
-
-SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/gkernel/${BP}.tar.gz \
- file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \
- file://0002-Add-argument-to-control-the-libargp-dependency.patch \
- file://underquote.patch \
- file://uclibc-libuargp-configure.patch \
- file://init \
- file://default"
-
-SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68"
-SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e"
-
-# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
-# manually to avoid unnecessary postinst/preinst generated.
-python () {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-inherit autotools update-rc.d
-
-PACKAGECONFIG = "libgcrypt"
-PACKAGECONFIG_libc-musl = "libargp"
-PACKAGECONFIG_libc-uclibc = "libuargp"
-PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
-PACKAGECONFIG[libuargp] = "--enable-uclibc,,,"
-PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
-
-do_install_append() {
- # Only install the init script when 'sysvinit' is in DISTRO_FEATURES.
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
- install -d "${D}${sysconfdir}/init.d"
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
- sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \
- ${D}${sysconfdir}/init.d/rng-tools
-
- install -d "${D}${sysconfdir}/default"
- install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
- fi
-}
-
-INITSCRIPT_NAME = "rng-tools"
-INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ."
diff --git a/meta/recipes-support/rng-tools/rng-tools_6.8.bb b/meta/recipes-support/rng-tools/rng-tools_6.8.bb
new file mode 100644
index 0000000000..83a48a4ec3
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools_6.8.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Random number generator daemon"
+DESCRIPTION = "Check and feed random data from hardware device to kernel"
+AUTHOR = "Philipp Rumpf, Jeff Garzik <jgarzik@pobox.com>, \
+ Henrique de Moraes Holschuh <hmh@debian.org>"
+HOMEPAGE = "https://github.com/nhorman/rng-tools"
+BUGTRACKER = "https://github.com/nhorman/rng-tools/issues"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "sysfsutils"
+
+SRC_URI = "\
+ git://github.com/nhorman/rng-tools.git \
+ file://init \
+ file://default \
+ file://rngd.service \
+"
+SRCREV = "eb5e34c7fb05594760f99d863fbe0401fe297b93"
+
+S = "${WORKDIR}/git"
+
+inherit autotools update-rc.d systemd pkgconfig
+
+PACKAGECONFIG ??= "libgcrypt libjitterentropy"
+PACKAGECONFIG_libc-musl = "libargp libjitterentropy"
+
+PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
+PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
+PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy"
+PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl"
+PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl"
+
+INITSCRIPT_NAME = "rng-tools"
+INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ."
+
+SYSTEMD_SERVICE_${PN} = "rngd.service"
+
+# Refer autogen.sh in rng-tools
+do_configure_prepend() {
+ cp ${S}/README.md ${S}/README
+}
+
+do_install_append() {
+ install -Dm 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
+ install -Dm 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
+ install -Dm 0644 ${WORKDIR}/rngd.service \
+ ${D}${systemd_system_unitdir}/rngd.service
+ sed -i \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ ${D}${sysconfdir}/init.d/rng-tools \
+ ${D}${systemd_system_unitdir}/rngd.service
+}
diff --git a/meta/recipes-support/serf/serf/0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch b/meta/recipes-support/serf/serf/0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch
new file mode 100644
index 0000000000..4a5832ac1a
--- /dev/null
+++ b/meta/recipes-support/serf/serf/0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch
@@ -0,0 +1,29 @@
+From 99f6e1b0d68281b63218d6adfe68cd9e331ac5be Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 3 Sep 2018 10:50:08 -0700
+Subject: [PATCH] Fix syntax of a print() in the scons file to unbreak building
+ with most recent scons version.
+
+* SConstruct Use Python 3.0 valid syntax to make Scons 3.0.0 happy on both python
+ 3.0 and 2.7.
+
+Upstream-Status: Backport
+[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1809132&r2=1811083&diff_format=h]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ SConstruct | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index 1670459..18a45fa 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -184,7 +184,7 @@ CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help'))
+
+ unknown = opts.UnknownVariables()
+ if unknown:
+- print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
++ print('Warning: Used unknown variables:', ', '.join(unknown.keys()))
+
+ apr = str(env['APR'])
+ apu = str(env['APU'])
diff --git a/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch b/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch
new file mode 100644
index 0000000000..cec881ee1c
--- /dev/null
+++ b/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch
@@ -0,0 +1,27 @@
+From e51b4b37916dd20b13133cb7af16601b6bf3ace9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 3 Sep 2018 10:54:54 -0700
+Subject: [PATCH] SConstruct: Fix path quoting for .def generator
+
+Patch by: Martin Keller <m.keller{_AT_}codesys.com>
+Upstream-Status: Backport
+[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1807594&r2=1809132]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ SConstruct | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index 18a45fa..571bdce 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -160,7 +160,7 @@ env = Environment(variables=opts,
+
+ env.Append(BUILDERS = {
+ 'GenDef' :
+- Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET',
++ Builder(action = '"%s" "%s" $SOURCES > $TARGET' % (sys.executable, gen_def_script,),
+ suffix='.def', src_suffix='.h')
+ })
+
diff --git a/meta/recipes-support/serf/serf/0003-gen_def.patch b/meta/recipes-support/serf/serf/0003-gen_def.patch
new file mode 100644
index 0000000000..0ea2cca9df
--- /dev/null
+++ b/meta/recipes-support/serf/serf/0003-gen_def.patch
@@ -0,0 +1,27 @@
+From 98e793d9f2250e7c1f9f1eb5dfd616a6a8829e9a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 3 Sep 2018 11:12:27 -0700
+Subject: [PATCH] gen_def
+
+This is partial port because half of this patch is already present in our
+patches
+
+Upstream-Status: Backport [https://github.com/apache/serf/commit/8f07c9626106873a594fd07e7c257e9080d8660b]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ SConstruct | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/SConstruct b/SConstruct
+index 571bdce..877731e 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -158,6 +158,8 @@ env = Environment(variables=opts,
+ ENV = os.environ,
+ )
+
++gen_def_script = env.File('build/gen_def.py').rstr()
++
+ env.Append(BUILDERS = {
+ 'GenDef' :
+ Builder(action = '"%s" "%s" $SOURCES > $TARGET' % (sys.executable, gen_def_script,),
diff --git a/meta/recipes-support/serf/serf/0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch b/meta/recipes-support/serf/serf/0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch
new file mode 100644
index 0000000000..02fa9e3a06
--- /dev/null
+++ b/meta/recipes-support/serf/serf/0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch
@@ -0,0 +1,29 @@
+From 565211fd082ef653ca9c44a345350fc1451f5a0f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 3 Sep 2018 11:12:38 -0700
+Subject: [PATCH] Follow-up to r1811083 fix building with scons 3.0.0 and
+ Python3
+
+* SConstruct: Append decode('utf-8) to FILE.get_contents() to avoid
+ TypeError: cannot use a string pattern on a bytes-like object
+
+Upstream-Status: Backport
+[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1811088&r2=1814604]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ SConstruct | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index 877731e..7678bb1 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -169,7 +169,7 @@ env.Append(BUILDERS = {
+ match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
+ 'SERF_MINOR_VERSION ([0-9]+).*'
+ 'SERF_PATCH_VERSION ([0-9]+)',
+- env.File('serf.h').get_contents(),
++ env.File('serf.h').get_contents().decode('utf-8'),
+ re.DOTALL)
+ MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
+ env.Append(MAJOR=str(MAJOR))
diff --git a/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
new file mode 100644
index 0000000000..91640d6044
--- /dev/null
+++ b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
@@ -0,0 +1,71 @@
+stop scons trying to create directories in hosts rootfs
+
+* since 1522f09a4d serf: cleanup recipe
+ serf.do_install fails in builds with multilib enabled (with
+ libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)
+
+DEBUG: Executing shell function do_install
+scons: Reading SConscript files ...
+PermissionError: [Errno 13] Permission denied: '/usr/lib64':
+ File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158:
+ ENV = os.environ,
+ File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965:
+ variables.Update(self)
+ File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227:
+ option.validator(option.key, env.subst('${%s}'%option.key), env)
+ File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60:
+ return PathVariable.PathIsDirCreate(key, val, env)
+ File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101:
+ os.makedirs(val)
+ File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221:
+ mkdir(name, mode)
+ERROR: scons install execution failed.
+
+* I don't know how exactly --install-sandbox is supposed to work but
+ in this case it's trying to mkdir /usr/lib64 on the host rootfs
+ which is clearly wrong and if I set LIBDIR together with
+ --install-sandbox then the install paths are prefixed with $D twice
+ in some cases (not for includedir and empty libdir at the end).
+ So in the end I think it was an issue caused by the custom path
+ validator in serf's SConstruct, removing that stops touching host
+ and the installed paths (including the paths inside libserf*.pc)
+ look correct
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- serf-1.3.9/SConstruct 2019-06-18 15:49:19.968961108 +0000
++++ serf-1.3.9b/SConstruct 2019-06-18 18:53:21.412337151 +0000
+@@ -51,17 +51,6 @@
+ """
+ return (key, '%s' % (help), default, None, lambda val: _converter(val))
+
+-# Custom path validator, creates directory when a specified option is set.
+-# To be used to ensure a PREFIX directory is only created when installing.
+-def createPathIsDirCreateWithTarget(target):
+- def my_validator(key, val, env):
+- build_targets = (map(str, BUILD_TARGETS))
+- if target in build_targets:
+- return PathVariable.PathIsDirCreate(key, val, env)
+- else:
+- return PathVariable.PathAccept(key, val, env)
+- return my_validator
+-
+ # default directories
+ if sys.platform == 'win32':
+ default_incdir='..'
+@@ -77,11 +66,11 @@
+ PathVariable('PREFIX',
+ 'Directory to install under',
+ default_prefix,
+- createPathIsDirCreateWithTarget('install')),
++ PathVariable.PathAccept),
+ PathVariable('LIBDIR',
+ 'Directory to install architecture dependent libraries under',
+ default_libdir,
+- createPathIsDirCreateWithTarget('install')),
++ PathVariable.PathAccept),
+ PathVariable('APR',
+ "Path to apr-1-config, or to APR's install area",
+ default_incdir,
diff --git a/meta/recipes-support/serf/serf/norpath.patch b/meta/recipes-support/serf/serf/norpath.patch
index 380f5d00d2..c392444f7b 100644
--- a/meta/recipes-support/serf/serf/norpath.patch
+++ b/meta/recipes-support/serf/serf/norpath.patch
@@ -5,11 +5,11 @@ Upstream-Status: Inappropriate
RP 2014/7/17
-Index: serf-1.3.6/SConstruct
+Index: serf-1.3.9/SConstruct
===================================================================
---- serf-1.3.6.orig/SConstruct 2014-07-17 19:57:57.724389150 +0000
-+++ serf-1.3.6/SConstruct 2014-07-17 20:04:21.784399616 +0000
-@@ -218,8 +218,7 @@
+--- serf-1.3.9.orig/SConstruct
++++ serf-1.3.9/SConstruct
+@@ -224,8 +224,7 @@ if sys.platform != 'win32':
else:
LIBNAMESTATIC = 'serf-${MAJOR}'
@@ -17,9 +17,9 @@ Index: serf-1.3.6/SConstruct
- PDB='${TARGET.filebase}.pdb')
+env.Append(PDB='${TARGET.filebase}.pdb')
- #for i in env:
- # print(str(env[i]))
-@@ -371,12 +370,6 @@
+ if sys.platform == 'darwin':
+ # linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,))
+@@ -385,12 +384,6 @@ if gssapi and CALLOUT_OKAY:
if sys.platform == 'win32':
env.Append(CPPDEFINES=['SERF_HAVE_SSPI'])
@@ -32,8 +32,8 @@ Index: serf-1.3.6/SConstruct
# Set up the construction of serf-*.pc
pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),
env.File('build/serf.pc.in'),
-@@ -446,7 +439,6 @@
- ENV={'PATH' : os.environ['PATH']}))
+@@ -461,7 +454,6 @@ else:
+ TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ]
# Find the (dynamic) library in this directory
-tenv.Replace(RPATH=thisdir)
diff --git a/meta/recipes-support/serf/serf_1.3.8.bb b/meta/recipes-support/serf/serf_1.3.8.bb
deleted file mode 100644
index c498d9097d..0000000000
--- a/meta/recipes-support/serf/serf_1.3.8.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "High-Performance Asynchronous HTTP Client Library"
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/s/${BPN}/${BPN}_${PV}.orig.tar.gz \
- file://norpath.patch \
- file://env.patch"
-
-SRC_URI[md5sum] = "713beaf05d7f3329de121e218e2fcb93"
-SRC_URI[sha256sum] = "77134cd5010664ca023585bce50978bd4005906ed280ff889f591f86df7c59e4"
-
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/s/serf/"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
-
-DEPENDS = "python-scons-native openssl apr apr-util util-linux expat"
-
-do_compile() {
- ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
- CC="${CC}" \
- APR=`which apr-1-config` APU=`which apu-1-config` \
- CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
- OPENSSL="${STAGING_EXECPREFIXDIR}"
-}
-
-do_install() {
- ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} LIBDIR=${D}${libdir} install
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb
new file mode 100644
index 0000000000..dd4133a45c
--- /dev/null
+++ b/meta/recipes-support/serf/serf_1.3.9.bb
@@ -0,0 +1,33 @@
+SUMMARY = "High-Performance Asynchronous HTTP Client Library"
+SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://norpath.patch \
+ file://env.patch \
+ file://0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch \
+ file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \
+ file://0003-gen_def.patch \
+ file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \
+ file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch \
+ "
+
+SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57"
+SRC_URI[sha256sum] = "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit scons
+
+DEPENDS += " openssl apr apr-util util-linux expat"
+
+EXTRA_OESCONS = " \
+ LIBDIR=${libdir} \
+ --install-sandbox=${D} \
+ CC="${CC}" \
+ CFLAGS="${CFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ APR=`which apr-1-config` \
+ APU=`which apu-1-config` \
+ OPENSSL="${STAGING_EXECPREFIXDIR}" \
+ "
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
index 6eedb6d3fd..3fe1a445b0 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info.inc
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
@@ -2,11 +2,10 @@ SUMMARY = "Shared MIME type database and specification"
HOMEPAGE = "http://freedesktop.org/wiki/Software/shared-mime-info"
SECTION = "base"
-LICENSE = "LGPLv2+"
+LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "libxml2 intltool-native glib-2.0 shared-mime-info-native"
-DEPENDS_class-native = "libxml2-native intltool-native glib-2.0-native"
SRC_URI = "http://freedesktop.org/~hadess/shared-mime-info-${PV}.tar.xz"
@@ -31,6 +30,8 @@ do_install () {
do_install_class-native () {
autotools_do_install
+
+ ${B}/update-mime-database ${D}${datadir}/mime
}
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
index 3c9f1ea438..262ff7562c 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
@@ -8,16 +8,18 @@ Upstream-Status: Pending
Signed-off-by: Joe Slater <jslater@windriver.com>
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -44,7 +44,9 @@ $(pkgconfig_DATA): config.status
- @INTLTOOL_XML_RULE@
- @INTLTOOL_DESKTOP_RULE@
+Index: shared-mime-info-1.9/Makefile.am
+===================================================================
+--- shared-mime-info-1.9.orig/Makefile.am
++++ shared-mime-info-1.9/Makefile.am
+@@ -50,7 +50,9 @@ else
+ update_mime_database="$(top_builddir)/update-mime-database$(EXEEXT)"
+ endif
-install-data-hook: install-binPROGRAMS
+# do NOT make this dependent on anything!
+#
+install-data-hook:
if ENABLE_UPDATE_MIMEDB
- $(DESTDIR)"$(bindir)/update-mime-database" -V "$(DESTDIR)$(datadir)/mime"
+ $(update_mime_database) -V "$(DESTDIR)$(datadir)/mime"
endif
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
index 84c4d03731..fea34a55a2 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
@@ -11,17 +11,17 @@ RP 10/10/2011
Upstream-Status: Pending
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: shared-mime-info-1.0/Makefile.am
+Index: shared-mime-info-1.9/Makefile.am
===================================================================
---- shared-mime-info-1.0.orig/Makefile.am
-+++ shared-mime-info-1.0/Makefile.am
+--- shared-mime-info-1.9.orig/Makefile.am
++++ shared-mime-info-1.9/Makefile.am
@@ -1,5 +1,3 @@
-SUBDIRS=. po
-
AM_CPPFLAGS = $(ALL_CFLAGS)
packagesdir = $(datadir)/mime/packages
-@@ -72,8 +70,7 @@ uninstall-hook:
+@@ -81,8 +79,7 @@ endif
all: $(defaultmakedeps)
@@ -29,5 +29,5 @@ Index: shared-mime-info-1.0/Makefile.am
- $(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot
+create-pot: po
- check: create-pot freedesktop.org.xml update-mime-database check-translations
- if test -e $(top_builddir)/freedesktop.org.xml; then \
+ local-test: create-pot freedesktop.org.xml update-mime-database$(EXEEXT)
+ if CROSS_COMPILING
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_1.10.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_1.10.bb
new file mode 100644
index 0000000000..9fc210b718
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_1.10.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+
+SRC_URI += "file://parallelmake.patch \
+ file://install-data-hook.patch"
+
+SRC_URI[md5sum] = "418c2ced9dc4dd5ca8b06a755e6d64e9"
+SRC_URI[sha256sum] = "c625a83b4838befc8cafcd54e3619946515d9e44d63d61c4adf7f5513ddfbebf"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_1.6.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_1.6.bb
deleted file mode 100644
index 2cf50414ca..0000000000
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_1.6.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require shared-mime-info.inc
-
-SRC_URI += "file://parallelmake.patch \
- file://install-data-hook.patch"
-
-SRC_URI[md5sum] = "10abc5c4e6b22223ff05c3bd70ff9e8f"
-SRC_URI[sha256sum] = "b2f8f85b6467933824180d0252bbcaee523f550a8fbc95cc4391bd43c03bc34c"
diff --git a/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch b/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch
deleted file mode 100644
index b0aa5d1739..0000000000
--- a/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9aa01fd5f9d8b2b98c34684dc8f68115750ef41c Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 12 Jul 2016 17:15:13 +0300
-Subject: [PATCH] source-highlight.pc.in: do not add Boost's libraries and
- includes
-
-This breaks when compiling in sysroots; a proper way is to use Depends
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- source-highlight.pc.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/source-highlight.pc.in b/source-highlight.pc.in
-index 79ab63e..64114a7 100644
---- a/source-highlight.pc.in
-+++ b/source-highlight.pc.in
-@@ -7,6 +7,6 @@ Name: libsource-highlight
- Description: GNU Source-highlight library.
- URL: http://www.gnu.org/software/src-highlite/
- Version: @VERSION@
--Libs: -L${libdir} -lsource-highlight @BOOST_LDFLAGS@ @BOOST_REGEX_LIB@
--Cflags: -I${includedir} @BOOST_CPPFLAGS@
-+Libs: -L${libdir} -lsource-highlight
-+Cflags: -I${includedir}
-
---
-2.8.1
-
diff --git a/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb b/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb
deleted file mode 100644
index 37d2fa95f3..0000000000
--- a/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Syntax highlight utility"
-DESCRIPTION = "Source-highlight converts source code to formatted text with syntax highlighting."
-HOMEPAGE = "https://www.gnu.org/software/src-highlite/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ff95bfe019feaf92f524b73dd79e76eb"
-
-SRC_URI = "${GNU_MIRROR}/src-highlite/${BPN}-${PV}.tar.gz \
- file://0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch"
-SRC_URI[md5sum] = "3243470706ef5fefdc3e43b5306a4e41"
-SRC_URI[sha256sum] = "01336a7ea1d1ccc374201f7b81ffa94d0aecb33afc7d6903ebf9fbf33a55ada3"
-
-inherit autotools
-
-DEPENDS_append = " boost"
-
-DEPENDS_append_class-target = " source-highlight-native"
-
-EXTRA_OECONF = "--with-boost=${PKG_CONFIG_SYSROOT_DIR}/${prefix}"
-
-BBCLASSEXTEND = "native"
-
-# source-highlight is using its own binary from the build tree to make documentation
-# let's substitute the native binary instead
-do_configure_prepend_class-target () {
- sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE = source-highlight,' ${S}/doc/Makefile.am
-}
-
-RDEPENDS_source-highlight += "bash"
diff --git a/meta/recipes-support/sqlite/sqlite3.inc b/meta/recipes-support/sqlite/sqlite3.inc
index 5bff33b851..07614bdb3e 100644
--- a/meta/recipes-support/sqlite/sqlite3.inc
+++ b/meta/recipes-support/sqlite/sqlite3.inc
@@ -5,7 +5,7 @@ SECTION = "libs"
PE = "3"
def sqlite_download_version(d):
- pvsplit = d.getVar('PV', True).split('.')
+ pvsplit = d.getVar('PV').split('.')
if len(pvsplit) < 4:
pvsplit.append('0')
return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
@@ -17,13 +17,26 @@ S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
-inherit autotools pkgconfig
+CVE_PRODUCT = "sqlite"
-PACKAGECONFIG ?= ""
-PACKAGECONFIG_class-native = ""
+inherit autotools pkgconfig siteinfo
+
+# enable those which are enabled by default in configure
+PACKAGECONFIG ?= "fts4 fts5 json1 rtree dyn_ext"
+PACKAGECONFIG_class-native ?= "fts4 fts5 json1 rtree dyn_ext"
PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
+PACKAGECONFIG[fts3] = "--enable-fts3,--disable-fts3"
+PACKAGECONFIG[fts4] = "--enable-fts4,--disable-fts4"
+PACKAGECONFIG[fts5] = "--enable-fts5,--disable-fts5"
+PACKAGECONFIG[json1] = "--enable-json1,--disable-json1"
+PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
+PACKAGECONFIG[session] = "--enable-session,--disable-session"
+PACKAGECONFIG[dyn_ext] = "--enable-dynamic-extensions,--disable-dynamic-extensions"
+PACKAGECONFIG[zlib] = ",,zlib"
+
+CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'zlib', '', 'ac_cv_search_deflate=no',d)}"
EXTRA_OECONF = " \
--enable-shared \
@@ -32,12 +45,14 @@ EXTRA_OECONF = " \
"
# pread() is in POSIX.1-2001 so any reasonable system must surely support it
-BUILD_CFLAGS += "-DUSE_PREAD"
-TARGET_CFLAGS += "-DUSE_PREAD"
+CFLAGS_append = " -DUSE_PREAD"
# Provide column meta-data API
-BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
-TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+CFLAGS_append = " -DSQLITE_ENABLE_COLUMN_METADATA"
+
+# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
+# huristics, which are not always correct
+CFLAGS_append = " ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
diff --git a/meta/recipes-support/sqlite/sqlite3_3.14.1.bb b/meta/recipes-support/sqlite/sqlite3_3.14.1.bb
deleted file mode 100644
index 3af0d2f9c3..0000000000
--- a/meta/recipes-support/sqlite/sqlite3_3.14.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require sqlite3.inc
-
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
-
-SRC_URI = "http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz"
-
-SRC_URI[md5sum] = "3634a90a3f49541462bcaed3474b2684"
-SRC_URI[sha256sum] = "bc7182476900017becb81565ecea7775d46ab747a97281aa610f4f45881c47a6"
diff --git a/meta/recipes-support/sqlite/sqlite3_3.30.1.bb b/meta/recipes-support/sqlite/sqlite3_3.30.1.bb
new file mode 100644
index 0000000000..f18eeb19ed
--- /dev/null
+++ b/meta/recipes-support/sqlite/sqlite3_3.30.1.bb
@@ -0,0 +1,8 @@
+require sqlite3.inc
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
+
+SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz"
+SRC_URI[md5sum] = "51252dc6bc9094ba11ab151ba650ff3c"
+SRC_URI[sha256sum] = "8c5a50db089bd2a1b08dbc5b00d2027602ca7ff238ba7658fabca454d4298e60"
diff --git a/meta/recipes-support/taglib/taglib/CVE-2017-12678.patch b/meta/recipes-support/taglib/taglib/CVE-2017-12678.patch
new file mode 100644
index 0000000000..4bd9f2be17
--- /dev/null
+++ b/meta/recipes-support/taglib/taglib/CVE-2017-12678.patch
@@ -0,0 +1,40 @@
+From eb9ded1206f18f2c319157337edea2533a40bea6 Mon Sep 17 00:00:00 2001
+From: "Stephen F. Booth" <me@sbooth.org>
+Date: Sun, 23 Jul 2017 10:11:09 -0400
+Subject: [PATCH] Don't assume TDRC is an instance of TextIdentificationFrame
+
+If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame
+which causes problems in rebuildAggregateFrames() when it is assumed
+that TDRC is a TextIdentificationFrame
+
+Upstream-Status: Backport
+[https://github.com/taglib/taglib/pull/831/commits/eb9ded1206f18f2c319157337edea2533a40bea6]
+
+CVE: CVE-2017-12678
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ taglib/mpeg/id3v2/id3v2framefactory.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp
+index 759a9b7b..9347ab86 100644
+--- a/taglib/mpeg/id3v2/id3v2framefactory.cpp
++++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp
+@@ -334,10 +334,11 @@ void FrameFactory::rebuildAggregateFrames(ID3v2::Tag *tag) const
+ tag->frameList("TDAT").size() == 1)
+ {
+ TextIdentificationFrame *tdrc =
+- static_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
++ dynamic_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
+ UnknownFrame *tdat = static_cast<UnknownFrame *>(tag->frameList("TDAT").front());
+
+- if(tdrc->fieldList().size() == 1 &&
++ if(tdrc &&
++ tdrc->fieldList().size() == 1 &&
+ tdrc->fieldList().front().size() == 4 &&
+ tdat->data().size() >= 5)
+ {
+--
+2.13.5
+
diff --git a/meta/recipes-support/taglib/taglib/CVE-2018-11439.patch b/meta/recipes-support/taglib/taglib/CVE-2018-11439.patch
new file mode 100644
index 0000000000..cdd66e67f7
--- /dev/null
+++ b/meta/recipes-support/taglib/taglib/CVE-2018-11439.patch
@@ -0,0 +1,51 @@
+From 272648ccfcccae30e002ccf34a22e075dd477278 Mon Sep 17 00:00:00 2001
+From: Scott Gayou <github.scott@gmail.com>
+Date: Mon, 4 Jun 2018 11:34:36 -0400
+Subject: [PATCH] Fixed OOB read when loading invalid ogg flac file. (#868)
+
+This CVE is caused by a failure to check the minimum length
+of a ogg flac header. This header is detailed in full at:
+https://xiph.org/flac/ogg_mapping.html. Added more strict checking
+for entire header.
+
+Upstream-Status: Backport
+[https://github.com/taglib/taglib/pull/869/commits/272648ccfcccae30e002ccf34a22e075dd477278]
+
+CVE: CVE-2018-11439
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ taglib/ogg/flac/oggflacfile.cpp | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/taglib/ogg/flac/oggflacfile.cpp b/taglib/ogg/flac/oggflacfile.cpp
+index 53d0450..07ea9dc 100644
+--- a/taglib/ogg/flac/oggflacfile.cpp
++++ b/taglib/ogg/flac/oggflacfile.cpp
+@@ -231,11 +231,21 @@ void Ogg::FLAC::File::scan()
+
+ if(!metadataHeader.startsWith("fLaC")) {
+ // FLAC 1.1.2+
++ // See https://xiph.org/flac/ogg_mapping.html for the header specification.
++ if(metadataHeader.size() < 13)
++ return;
++
++ if(metadataHeader[0] != 0x7f)
++ return;
++
+ if(metadataHeader.mid(1, 4) != "FLAC")
+ return;
+
+- if(metadataHeader[5] != 1)
+- return; // not version 1
++ if(metadataHeader[5] != 1 && metadataHeader[6] != 0)
++ return; // not version 1.0
++
++ if(metadataHeader.mid(9, 4) != "fLaC")
++ return;
+
+ metadataHeader = metadataHeader.mid(13);
+ }
+--
+2.7.4
+
diff --git a/meta/recipes-support/taglib/taglib_1.11.1.bb b/meta/recipes-support/taglib/taglib_1.11.1.bb
new file mode 100644
index 0000000000..f4e288295d
--- /dev/null
+++ b/meta/recipes-support/taglib/taglib_1.11.1.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Library for reading and editing the meta-data of popular audio formats"
+SECTION = "libs/multimedia"
+HOMEPAGE = "http://taglib.github.io/"
+LICENSE = "LGPLv2.1 | MPL-1.1"
+LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
+ file://COPYING.MPL;md5=bfe1f75d606912a4111c90743d6c7325 \
+ file://taglib/audioproperties.h;beginline=1;endline=24;md5=9df2c7399519b7310568a7c55042ecee"
+
+DEPENDS = "zlib"
+
+SRC_URI = "http://taglib.github.io/releases/${BP}.tar.gz \
+ file://CVE-2017-12678.patch \
+ file://CVE-2018-11439.patch \
+ "
+
+SRC_URI[md5sum] = "cee7be0ccfc892fa433d6c837df9522a"
+SRC_URI[sha256sum] = "b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b"
+
+UPSTREAM_CHECK_URI = "http://github.com/taglib/taglib/releases/"
+
+BINCONFIG = "${bindir}/taglib-config"
+
+inherit cmake pkgconfig binconfig-disabled
+
+PACKAGES =+ "${PN}-c"
+FILES_${PN}-c = "${libdir}/libtag_c.so.*"
+
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \
+ -DHAVE_BOOST_BYTESWAP=FALSE \
+ -DCMAKE_CXX_STANDARD=11 \
+ -DCMAKE_CXX_STANDARD_REQUIRED=OFF \
+ -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
+"
+CXXFLAGS += "-std=c++11"
+
+do_configure_prepend () {
+ rm -f ${S}/admin/ltmain.sh
+ rm -f ${S}/admin/libtool.m4.in
+}
+
+# without -fPIC depending packages failed with many error like:
+# | <...>/ld: error: <...>/usr/lib/libtag.a(modfilebase.cpp.o): requires unsupported dynamic reloc R_ARM_THM_MOVW_ABS_NC; recompile with -fPIC
+CXXFLAGS += "-fPIC"
diff --git a/meta/recipes-support/taglib/taglib_1.9.1.bb b/meta/recipes-support/taglib/taglib_1.9.1.bb
deleted file mode 100644
index d125308ccd..0000000000
--- a/meta/recipes-support/taglib/taglib_1.9.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Library for reading and editing the meta-data of popular audio formats"
-SECTION = "libs/multimedia"
-HOMEPAGE = "http://taglib.github.io/"
-LICENSE = "LGPLv2.1 | MPL-1"
-LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
- file://COPYING.MPL;md5=bfe1f75d606912a4111c90743d6c7325 \
- file://taglib/audioproperties.h;beginline=1;endline=24;md5=9df2c7399519b7310568a7c55042ecee"
-
-DEPENDS = "zlib"
-
-SRC_URI = "http://taglib.github.io/releases/${BP}.tar.gz"
-SRC_URI[md5sum] = "0d35df96822bbd564c5504cb3c2e4d86"
-SRC_URI[sha256sum] = "72d371cd1419a87ae200447a53bff2be219283071e80fd12337928cc967dc71a"
-
-UPSTREAM_CHECK_URI = "http://github.com/taglib/taglib/releases/"
-
-BINCONFIG = "${bindir}/taglib-config"
-
-inherit cmake pkgconfig binconfig-disabled
-
-PACKAGES =+ "${PN}-c"
-FILES_${PN}-c = "${libdir}/libtag_c.so.*"
-
-EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib', True).replace('lib', '')}"
-
-do_configure_prepend () {
- rm -f ${S}/admin/ltmain.sh
- rm -f ${S}/admin/libtool.m4.in
- # Don't have a floating dependeny on boost
- sed -i -e "s/atomic.hpp/atomic-not-exist.hpp/" ${S}/ConfigureChecks.cmake ${S}/taglib/toolkit/trefcounter.cpp
-}
-
diff --git a/meta/recipes-support/vim/files/0001-src-Makefile-improve-reproducibility.patch b/meta/recipes-support/vim/files/0001-src-Makefile-improve-reproducibility.patch
new file mode 100644
index 0000000000..63a7b78f12
--- /dev/null
+++ b/meta/recipes-support/vim/files/0001-src-Makefile-improve-reproducibility.patch
@@ -0,0 +1,46 @@
+From 133ab27cdb17ca20ef6b0304cf30621d2bcbe757 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Thu, 31 Jan 2019 21:32:26 -0800
+Subject: [PATCH] src/Makefile: improve reproducibility
+
+Clear all_cflags, all_lflags, compiled_user
+and compiled_sys to avoid introducing build
+info to improve reproducibility as below:
+
+WARNING: vim-8.1.0347-r0 do_package_qa: QA Issue: File /work/core2-64-wrs-linux/vim/8.1.0347-r0/packages-split/vim/usr/bin/vim.vim in package contained reference to tmpdir [buildpaths]
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/Makefile | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index f2fafa4dc..7148d4bd9 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -2845,16 +2845,10 @@ auto/pathdef.c: Makefile auto/config.mk
+ -@echo '#include "vim.h"' >> $@
+ -@echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' | $(QUOTESED) >> $@
+ -@echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' | $(QUOTESED) >> $@
+- -@echo 'char_u *all_cflags = (char_u *)"$(CC) -c -I$(srcdir) $(ALL_CFLAGS)";' | $(QUOTESED) >> $@
+- -@echo 'char_u *all_lflags = (char_u *)"$(CC) $(ALL_LIB_DIRS) $(LDFLAGS) -o $(VIMTARGET) $(ALL_LIBS) ";' | $(QUOTESED) >> $@
+- -@echo 'char_u *compiled_user = (char_u *)"' | tr -d $(NL) >> $@
+- -@if test -n "$(COMPILEDBY)"; then \
+- echo "$(COMPILEDBY)" | tr -d $(NL) >> $@; \
+- else ((logname) 2>/dev/null || whoami) | tr -d $(NL) >> $@; fi
+- -@echo '";' >> $@
+- -@echo 'char_u *compiled_sys = (char_u *)"' | tr -d $(NL) >> $@
+- -@if test -z "$(COMPILEDBY)"; then hostname | tr -d $(NL) >> $@; fi
+- -@echo '";' >> $@
++ -@echo 'char_u *all_cflags = (char_u *)"";' | $(QUOTESED) >> $@
++ -@echo 'char_u *all_lflags = (char_u *)"";' | $(QUOTESED) >> $@
++ -@echo 'char_u *compiled_user = (char_u *)"";' >> $@
++ -@echo 'char_u *compiled_sys = (char_u *)"";' >> $@
+ -@sh $(srcdir)/pathdef.sh
+
+ GUI_GTK_RES_INPUTS = \
+--
+2.17.1
+
diff --git a/meta/recipes-support/vim/files/disable_acl_header_check.patch b/meta/recipes-support/vim/files/disable_acl_header_check.patch
new file mode 100644
index 0000000000..33089162b4
--- /dev/null
+++ b/meta/recipes-support/vim/files/disable_acl_header_check.patch
@@ -0,0 +1,39 @@
+From 5ed25c076a1fb1889a3c50dddf29f21850b59a13 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Tue, 26 Jun 2018 17:29:09 +0800
+Subject: [PATCH] disable acl header check
+
+Don't check 'sys/acl.h' if acl support disabled for vim/vim-tiny.
+
+Upstream-Status: pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ src/configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 2d409b3ca06a..dbcaf6140263 100644
+--- a/src/configure.ac
++++ b/src/configure.ac
+@@ -3257,7 +3257,7 @@ AC_CHECK_HEADERS(stdint.h stdlib.h string.h \
+ sys/systeminfo.h locale.h sys/stream.h termios.h \
+ libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
+ utime.h sys/param.h sys/ptms.h libintl.h libgen.h \
+- util/debug.h util/msg18n.h frame.h sys/acl.h \
++ util/debug.h util/msg18n.h frame.h \
+ sys/access.h sys/sysinfo.h wchar.h wctype.h)
+
+ dnl sys/ptem.h depends on sys/stream.h on Solaris
+@@ -3886,6 +3886,7 @@ AC_ARG_ENABLE(acl,
+ , [enable_acl="yes"])
+ if test "$enable_acl" = "yes"; then
+ AC_MSG_RESULT(no)
++ AC_CHECK_HEADERS(sys/acl.h)
+ AC_CHECK_LIB(posix1e, acl_get_file, [LIBS="$LIBS -lposix1e"],
+ AC_CHECK_LIB(acl, acl_get_file, [LIBS="$LIBS -lacl"
+ AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),)
+--
+2.7.4
+
diff --git a/meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch b/meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch
new file mode 100644
index 0000000000..37914d4cd9
--- /dev/null
+++ b/meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch
@@ -0,0 +1,42 @@
+From 38de4bccdb8a861ffdd447f12fdab19d6d852c02 Mon Sep 17 00:00:00 2001
+From: Chong Lu <Chong.Lu@windriver.com>
+Date: Tue, 26 Jun 2018 17:34:15 +0800
+Subject: [PATCH] vim: add knob whether elf.h are checked
+
+Previously, it still was checked when there was no elf library in sysroots directory.
+Add knob to decide whether elf.h are checked or not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ src/configure.ac | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 0ee86ad..64736f0 100644
+--- a/src/configure.ac
++++ b/src/configure.ac
+@@ -3192,11 +3192,18 @@ AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));],
+ AC_MSG_RESULT(no))
+
+ dnl Checks for header files.
++AC_MSG_CHECKING(whether or not to look for elf.h)
++AC_ARG_ENABLE(elf-check,
++ [ --enable-elf-check If elfutils, check for elf.h [default=no]],
++ , enable_elf_check="no")
++AC_MSG_RESULT($enable_elf_check)
++if test "x$enable_elf_check" != "xno"; then
+ AC_CHECK_HEADER(elf.h, HAS_ELF=1)
+ dnl AC_CHECK_HEADER(dwarf.h, SVR4=1)
+ if test "$HAS_ELF" = 1; then
+ AC_CHECK_LIB(elf, main)
+ fi
++fi
+
+ AC_HEADER_DIRENT
+
+--
+2.7.4
+
diff --git a/meta/recipes-support/vim/vim-tiny_8.1.1518.bb b/meta/recipes-support/vim/vim-tiny_8.1.1518.bb
new file mode 100644
index 0000000000..e4c26d23f6
--- /dev/null
+++ b/meta/recipes-support/vim/vim-tiny_8.1.1518.bb
@@ -0,0 +1,12 @@
+require vim.inc
+
+SUMMARY += " (with tiny features)"
+
+PACKAGECONFIG += "tiny"
+
+do_install() {
+ install -D -m 0755 ${S}/src/vim ${D}/${bindir}/vim.tiny
+}
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_TARGET = "${bindir}/vim.tiny"
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
new file mode 100644
index 0000000000..0a31e68cb7
--- /dev/null
+++ b/meta/recipes-support/vim/vim.inc
@@ -0,0 +1,135 @@
+SUMMARY = "Vi IMproved - enhanced vi editor"
+SECTION = "console/utils"
+
+DEPENDS = "ncurses gettext-native"
+# vimdiff doesn't like busybox diff
+RSUGGESTS_${PN} = "diffutils"
+LICENSE = "vim"
+LIC_FILES_CHKSUM = "file://runtime/doc/uganda.txt;endline=287;md5=f1f82b42360005c70b8c19b0ef493f72"
+
+SRC_URI = "git://github.com/vim/vim.git \
+ file://disable_acl_header_check.patch \
+ file://vim-add-knob-whether-elf.h-are-checked.patch \
+ file://0001-src-Makefile-improve-reproducibility.patch \
+"
+SRCREV = "202d982b36d87cf91d992bd7e30d3223bdc72cd9"
+
+S = "${WORKDIR}/git"
+
+VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}"
+
+inherit autotools-brokensep update-alternatives
+
+CLEANBROKEN = "1"
+
+# vim configure.in contains functions which got 'dropped' by autotools.bbclass
+do_configure () {
+ cd src
+ rm -f auto/*
+ touch auto/config.mk
+ aclocal
+ autoconf
+ cd ..
+ oe_runconf
+ touch src/auto/configure
+ touch src/auto/config.mk src/auto/config.h
+}
+
+do_compile() {
+ # We do not support fully / correctly the following locales. Attempting
+ # to use these with msgfmt in order to update the ".desktop" files exposes
+ # this problem and leads to the compile failing.
+ for LOCALE in cs fr ko pl sk zh_CN zh_TW;do
+ echo -n > src/po/${LOCALE}.po
+ done
+ autotools_do_compile
+}
+
+#Available PACKAGECONFIG options are gtkgui, acl, x11, tiny
+PACKAGECONFIG ??= ""
+PACKAGECONFIG += " \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \
+"
+
+PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3"
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[x11] = "--with-x,--without-x,xt,"
+PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,,"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,"
+PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils,"
+
+EXTRA_OECONF = " \
+ --disable-gpm \
+ --disable-gtktest \
+ --disable-xim \
+ --disable-netbeans \
+ --with-tlib=ncurses \
+ ac_cv_small_wchar_t=no \
+ vim_cv_getcwd_broken=no \
+ vim_cv_memmove_handles_overlap=yes \
+ vim_cv_stat_ignores_slash=no \
+ vim_cv_terminfo=yes \
+ vim_cv_tgetent=non-zero \
+ vim_cv_toupper_broken=no \
+ vim_cv_tty_group=world \
+ STRIP=/bin/true \
+"
+
+do_install() {
+ autotools_do_install
+
+ # Work around file-rdeps picking up csh, awk, perl or python as a dep
+ chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132
+ chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk
+ chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl
+ chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.py
+
+ # Install example vimrc from runtime files
+ install -m 0644 runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc
+
+ # we use --with-features=big as default
+ mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN}
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then
+ # The mouse being autoenabled is just annoying in xfce4-terminal (mouse
+ # drag make vim go into visual mode and there is no right click menu),
+ # delete the block.
+ sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc
+ fi
+}
+
+PARALLEL_MAKEINST = ""
+
+PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools"
+FILES_${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax"
+FILES_${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc"
+FILES_${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor"
+FILES_${PN}-vimrc = "${datadir}/${BPN}/vimrc"
+FILES_${PN}-data = "${datadir}/${BPN}"
+FILES_${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools"
+FILES_${PN}-common = " \
+ ${datadir}/${BPN}/${VIMDIR}/*.vim \
+ ${datadir}/${BPN}/${VIMDIR}/autoload \
+ ${datadir}/${BPN}/${VIMDIR}/colors \
+ ${datadir}/${BPN}/${VIMDIR}/compiler \
+ ${datadir}/${BPN}/${VIMDIR}/ftplugin \
+ ${datadir}/${BPN}/${VIMDIR}/indent \
+ ${datadir}/${BPN}/${VIMDIR}/keymap \
+ ${datadir}/${BPN}/${VIMDIR}/lang \
+ ${datadir}/${BPN}/${VIMDIR}/macros \
+ ${datadir}/${BPN}/${VIMDIR}/plugin \
+ ${datadir}/${BPN}/${VIMDIR}/print \
+ ${datadir}/${BPN}/${VIMDIR}/spell \
+ ${datadir}/icons \
+"
+
+RDEPENDS_${BPN} = "ncurses-terminfo-base"
+# Recommend that runtime data is installed along with vim
+RRECOMMENDS_${BPN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common"
+
+ALTERNATIVE_${PN} = "vi vim"
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}"
+ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi"
+ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim"
diff --git a/meta/recipes-support/vim/vim_8.1.1518.bb b/meta/recipes-support/vim/vim_8.1.1518.bb
new file mode 100644
index 0000000000..60946a181f
--- /dev/null
+++ b/meta/recipes-support/vim/vim_8.1.1518.bb
@@ -0,0 +1,10 @@
+require vim.inc
+
+PROVIDES = "xxd"
+
+PACKAGECONFIG_class-native = ""
+BBCLASSEXTEND = "native"
+
+ALTERNATIVE_${PN}_append = " xxd"
+ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd"
+ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd"
diff --git a/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch b/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch
deleted file mode 100644
index fcfc559758..0000000000
--- a/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From b0a579d83e355545b64742c997fe8b1d58bf4207 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Mon, 13 Jun 2016 11:05:00 +0300
-Subject: [PATCH] Don't enable stack-protection by default
-
-These are set by security_flags.inc.
-
-Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 068d072..d580f84 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -138,8 +138,6 @@ m4_define([compiler_flags_common],[ dnl
- -fno-common dnl
- -fdiagnostics-show-option dnl
- -fno-strict-aliasing dnl
-- -fstack-protector dnl
-- -fstack-protector-strong dnl
- -fno-semantic-interposition dnl
- -Wno-deprecated-declarations dnl
- ])
---
-2.1.4
-
diff --git a/meta/recipes-support/vte/vte/0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch b/meta/recipes-support/vte/vte/0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch
new file mode 100644
index 0000000000..9c3f98fa61
--- /dev/null
+++ b/meta/recipes-support/vte/vte/0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch
@@ -0,0 +1,27 @@
+From 442da9076b52003743ffc6fd7b9d647de6d7aa8f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 17 Jan 2019 16:37:54 +0100
+Subject: [PATCH] app.cc: use old school asignment to avoid gcc 4.8 error
+
+This is needed to build vte-native on Centos 7,
+and can be dropped once that OS is no longer supported.
+
+Upstream-Status: Inappropriate [ancient compiler fix]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/app/app.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/app/app.cc b/src/app/app.cc
+index d424064..675d789 100644
+--- a/src/app/app.cc
++++ b/src/app/app.cc
+@@ -306,7 +306,7 @@ public:
+ else
+ alpha = get_alpha();
+
+- GdkRGBA color{bg_color};
++ GdkRGBA color = bg_color;
+ color.alpha = alpha;
+ return color;
+ }
diff --git a/meta/recipes-support/vte/vte/0002-Add-W_EXITCODE-macro-for-non-glibc-systems.patch b/meta/recipes-support/vte/vte/0002-Add-W_EXITCODE-macro-for-non-glibc-systems.patch
new file mode 100644
index 0000000000..0ffd92b4ba
--- /dev/null
+++ b/meta/recipes-support/vte/vte/0002-Add-W_EXITCODE-macro-for-non-glibc-systems.patch
@@ -0,0 +1,59 @@
+From f78988d3bb5929c857e788a86c7919d6a4ffacc9 Mon Sep 17 00:00:00 2001
+From: Danilo Spinella <danyspin97@protonmail.com>
+Date: Thu, 21 Mar 2019 14:19:26 +0100
+Subject: [PATCH] Add W_EXITCODE macro for non-glibc systems
+
+Upstream-Status: Submitted [1]
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+
+[1] https://gitlab.gnome.org/GNOME/vte/issues/72
+
+---
+ src/missing.hh | 21 +++++++++++++++++++++
+ src/widget.cc | 1 +
+ 2 files changed, 22 insertions(+)
+ create mode 100644 src/missing.hh
+
+diff --git a/src/missing.hh b/src/missing.hh
+new file mode 100644
+index 00000000..1baa993d
+--- /dev/null
++++ b/src/missing.hh
+@@ -0,0 +1,21 @@
++/* Copyright 2019 Danilo Spinella
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of 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.
++ *
++ * This library 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
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef W_EXITCODE
++#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
++#endif
++
+diff --git a/src/widget.cc b/src/widget.cc
+index 331ddba9..555a4adf 100644
+--- a/src/widget.cc
++++ b/src/widget.cc
+@@ -21,6 +21,7 @@
+ #include "widget.hh"
+
+ #include <sys/wait.h> // for W_EXITCODE
++#include "missing.hh" // for W_EXITCODE on non-glibc systems
+
+ #include <new>
+ #include <string>
+--
+2.21.0
+
diff --git a/meta/recipes-support/vte/vte_0.44.2.bb b/meta/recipes-support/vte/vte_0.44.2.bb
deleted file mode 100644
index a1204a3c3b..0000000000
--- a/meta/recipes-support/vte/vte_0.44.2.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Virtual terminal emulator GTK+ widget library"
-BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
-LICENSE = "LGPLv2.1+"
-DEPENDS = "glib-2.0 gtk+3 intltool-native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-inherit gnomebase gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
-
-SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch"
-SRC_URI[archive.md5sum] = "eca8f8a9d9f9bb8e9d592d0acfeec015"
-SRC_URI[archive.sha256sum] = "a1ea594814bb136a3a9a6c7656b46240571f6a198825c1111007fe99194b0949"
-
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-# Enable vala only if gobject-introspection is enabled
-EXTRA_OECONF = "--enable-vala=auto --disable-test-application"
-
-# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds.
-# Use libtool-cross (which has a hack to prevent that) instead.
-EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
-
-PACKAGES =+ "libvte"
-FILES_libvte = "${libdir}/*.so.*"
diff --git a/meta/recipes-support/vte/vte_0.58.2.bb b/meta/recipes-support/vte/vte_0.58.2.bb
new file mode 100644
index 0000000000..0ed382a5f9
--- /dev/null
+++ b/meta/recipes-support/vte/vte_0.58.2.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Virtual terminal emulator GTK+ widget library"
+BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
+LICENSE = "GPLv3 & LGPLv3+ & LGPLv2.1+"
+LICENSE_libvte = "LGPLv3+"
+
+LIC_FILES_CHKSUM = " \
+ file://COPYING.GPL3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
+ file://COPYING.LGPL2;md5=4fbd65380cdd255951079008b364516c \
+ file://COPYING.LGPL3;md5=b52f2d57d10c4f7ee67a7eb9615d5d24 \
+"
+
+DEPENDS = "glib-2.0 gtk+3 libpcre2 libxml2-native gperf-native"
+
+GNOMEBASEBUILDCLASS = "meson"
+GIR_MESON_OPTION = 'gir'
+
+inherit gnomebase gtk-doc features_check upstream-version-is-even gobject-introspection
+
+# vapigen.m4 is required when vala is not present (but the one from vala should be used normally)
+SRC_URI += "file://0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch \
+ file://0002-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \
+ "
+SRC_URI[archive.md5sum] = "dadbf2c1d9864d3ea185738f97ab63af"
+SRC_URI[archive.sha256sum] = "33c966d2b1f2c3b0f9416dbca883fd746159b5bd040350e3b78f8104b2a42bc0"
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+# Instead of "inherit vala" we do the relevant settings here so we can
+# set DEPENDS based on PACKAGECONFIG.
+
+# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
+export STAGING_DATADIR
+# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files
+export XDG_DATA_DIRS = "${STAGING_DATADIR}"
+
+# Help g-ir-scanner find the .so for linking
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/src/.libs"
+}
+
+# Package additional files
+FILES_${PN}-dev += "${datadir}/vala/vapi/*"
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false,vala-native vala"
+PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
+# vala requires gir
+PACKAGECONFIG_remove_class-native = "vala"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+PACKAGES =+ "libvte ${PN}-prompt"
+FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*"
+FILES_${PN}-prompt = "${sysconfdir}/profile.d"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes.txt b/meta/recipes.txt
index 9e178d6ce8..fb2c25014d 100644
--- a/meta/recipes.txt
+++ b/meta/recipes.txt
@@ -3,11 +3,10 @@ recipes-connectivity - Libraries and applications related to communication with
recipes-core - What's needed to build a basic working Linux image including commonly used dependencies
recipes-devtools - Tools primarily used by the build system (but can also be used on targets)
recipes-extended - Applications which whilst not essential add features compared to the alternatives in
- core. May be needed for full tool functionality or LSB compliance.
+ core. May be needed for full tool functionality.
recipes-gnome - All things related to the GTK+ application framework
recipes-graphics - X and other graphically related system libraries
recipes-kernel - The kernel and generic applications/libraries with strong kernel dependencies
-recipes-lsb4 - Recipes added for the sole purpose of supporting the Linux Standard Base (LSB) 4.x
recipes-multimedia - Codecs and support utilties for audio, images and video
recipes-rt - Provides package and image recipes for using and testing the PREEMPT_RT kernel
recipes-sato - The Sato demo/reference UI/UX, its associated apps and configuration
diff --git a/meta/site/arc-common b/meta/site/arc-common
new file mode 100644
index 0000000000..d3c721a8bb
--- /dev/null
+++ b/meta/site/arc-common
@@ -0,0 +1,11 @@
+# general
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=4
+ac_cv_alignof_unsigned_long=4
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
diff --git a/meta/site/arm-linux b/meta/site/arm-linux
index e6b9a726fb..fb3c81d0e9 100644
--- a/meta/site/arm-linux
+++ b/meta/site/arm-linux
@@ -3,7 +3,6 @@ ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=1}
ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
ac_cv_sizeof_char_p=${ac_cv_sizeof_int_p=4}
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4}
@@ -142,7 +141,6 @@ samba_cv_LINUX_LFS_SUPPORT=${samba_cv_LINUX_LFS_SUPPORT=yes}
clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
#dbus
ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
diff --git a/meta/site/arm-linux-uclibc b/meta/site/arm-linux-uclibc
deleted file mode 100644
index 6ae7c6e09d..0000000000
--- a/meta/site/arm-linux-uclibc
+++ /dev/null
@@ -1,105 +0,0 @@
-ac_cv_func_setvbuf_reversed=no
-ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
-ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
-ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
-ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
-ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4}
-ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
-ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
-ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
-ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
-ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4}
-ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
-
-ac_cv_uchar=${ac_cv_uchar=no}
-ac_cv_uint=${ac_cv_uint=yes}
-ac_cv_ulong=${ac_cv_ulong=yes}
-ac_cv_ushort=${ac_cv_ushort=yes}
-
-ac_cv_time_r_type=${ac_cv_time_r_type=POSIX}
-
-# samba
-samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=${samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes}
-samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=${samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no}
-samba_cv_FTRUNCATE_NEEDS_ROOT=${samba_cv_FTRUNCATE_NEEDS_ROOT=no}
-samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no}
-samba_cv_HAVE_BROKEN_GETGROUPS=${samba_cv_HAVE_BROKEN_GETGROUPS=no}
-samba_cv_HAVE_BROKEN_LINUX_SENDFILE=${samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes}
-samba_cv_HAVE_BROKEN_READDIR=${samba_cv_HAVE_BROKEN_READDIR=no}
-samba_cv_HAVE_C99_VSNPRINTF=${samba_cv_HAVE_C99_VSNPRINTF=yes}
-samba_cv_HAVE_DEV64_T=${samba_cv_HAVE_DEV64_T=no}
-samba_cv_HAVE_DEVICE_MAJOR_FN=${samba_cv_HAVE_DEVICE_MAJOR_FN=yes}
-samba_cv_HAVE_DEVICE_MINOR_FN=${samba_cv_HAVE_DEVICE_MINOR_FN=yes}
-samba_cv_HAVE_DQB_FSOFTLIMIT=${samba_cv_HAVE_DQB_FSOFTLIMIT=no}
-samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=${samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes}
-samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes}
-samba_cv_HAVE_FTRUNCATE_EXTEND=${samba_cv_HAVE_FTRUNCATE_EXTEND=yes}
-samba_cv_HAVE_FUNCTION_MACRO=${samba_cv_HAVE_FUNCTION_MACRO=yes}
-samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-samba_cv_HAVE_INO64_T=${samba_cv_HAVE_INO64_T=no}
-samba_cv_HAVE_INT16_FROM_RPC_RPC_H=${samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no}
-samba_cv_HAVE_INT32_FROM_RPC_RPC_H=${samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no}
-samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes}
-samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes}
-samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=yes}
-samba_cv_HAVE_MMAP=${samba_cv_HAVE_MMAP=yes}
-samba_cv_HAVE_NATIVE_ICONV=${samba_cv_HAVE_NATIVE_ICONV=yes}
-samba_cv_HAVE_OFF64_T=${samba_cv_HAVE_OFF64_T=no}
-samba_cv_HAVE_QUOTACTL_4A=${samba_cv_HAVE_QUOTACTL_4A=yes}
-samba_cv_HAVE_ROOT=${samba_cv_HAVE_ROOT=no}
-samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=${samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no}
-samba_cv_HAVE_SECURE_MKSTEMP=${samba_cv_HAVE_SECURE_MKSTEMP=yes}
-samba_cv_HAVE_SENDFILE=${samba_cv_HAVE_SENDFILE=no}
-samba_cv_HAVE_SENDFILE64=${samba_cv_HAVE_SENDFILE64=no}
-samba_cv_HAVE_SOCK_SIN_LEN=${samba_cv_HAVE_SOCK_SIN_LEN=no}
-samba_cv_HAVE_STAT_ST_BLKSIZE=${samba_cv_HAVE_STAT_ST_BLKSIZE=yes}
-samba_cv_HAVE_STAT_ST_BLOCKS=${samba_cv_HAVE_STAT_ST_BLOCKS=yes}
-samba_cv_HAVE_STRUCT_DIRENT64=${samba_cv_HAVE_STRUCT_DIRENT64=no}
-samba_cv_HAVE_STRUCT_FLOCK64=${samba_cv_HAVE_STRUCT_FLOCK64=yes}
-samba_cv_HAVE_STRUCT_IF_DQBLK=${samba_cv_HAVE_STRUCT_IF_DQBLK=no}
-samba_cv_HAVE_STRUCT_MEM_DQBLK=${samba_cv_HAVE_STRUCT_MEM_DQBLK=no}
-samba_cv_HAVE_TRUNCATED_SALT=${samba_cv_HAVE_TRUNCATED_SALT=no}
-samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=${samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no}
-samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=${samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no}
-samba_cv_HAVE_UNSIGNED_CHAR=${samba_cv_HAVE_UNSIGNED_CHAR=yes}
-samba_cv_HAVE_UTIMBUF=${samba_cv_HAVE_UTIMBUF=yes}
-samba_cv_HAVE_UT_UT_ADDR=${samba_cv_HAVE_UT_UT_ADDR=yes}
-samba_cv_HAVE_UT_UT_EXIT=${samba_cv_HAVE_UT_UT_EXIT=yes}
-samba_cv_HAVE_UT_UT_HOST=${samba_cv_HAVE_UT_UT_HOST=yes}
-samba_cv_HAVE_UT_UT_ID=${samba_cv_HAVE_UT_UT_ID=yes}
-samba_cv_HAVE_UT_UT_NAME=${samba_cv_HAVE_UT_UT_NAME=yes}
-samba_cv_HAVE_UT_UT_PID=${samba_cv_HAVE_UT_UT_PID=yes}
-samba_cv_HAVE_UT_UT_TIME=${samba_cv_HAVE_UT_UT_TIME=yes}
-samba_cv_HAVE_UT_UT_TV=${samba_cv_HAVE_UT_UT_TV=yes}
-samba_cv_HAVE_UT_UT_TYPE=${samba_cv_HAVE_UT_UT_TYPE=yes}
-samba_cv_HAVE_UT_UT_USER=${samba_cv_HAVE_UT_UT_USER=yes}
-samba_cv_HAVE_UX_UT_SYSLEN=${samba_cv_HAVE_UX_UT_SYSLEN=no}
-samba_cv_HAVE_VA_COPY=${samba_cv_HAVE_VA_COPY=yes}
-samba_cv_HAVE_WORKING_AF_LOCAL=${samba_cv_HAVE_WORKING_AF_LOCAL=no}
-samba_cv_HAVE_Werror=${samba_cv_HAVE_Werror=yes}
-samba_cv_PUTUTLINE_RETURNS_UTMP=${samba_cv_PUTUTLINE_RETURNS_UTMP=yes}
-samba_cv_QUOTA_WORKS=${samba_cv_QUOTA_WORKS=yes}
-samba_cv_REPLACE_GETPASS=${samba_cv_REPLACE_GETPASS=yes}
-samba_cv_REPLACE_INET_NTOA=${samba_cv_REPLACE_INET_NTOA=no}
-samba_cv_RUN_QUOTA_TESTS=${samba_cv_RUN_QUOTA_TESTS=auto}
-samba_cv_SEEKDIR_RETURNS_VOID=${samba_cv_SEEKDIR_RETURNS_VOID=yes}
-samba_cv_SIZEOF_INO_T=${samba_cv_SIZEOF_INO_T=yes}
-samba_cv_SIZEOF_OFF_T=${samba_cv_SIZEOF_OFF_T=yes}
-samba_cv_SYSCONF_SC_NGROUPS_MAX=${samba_cv_SYSCONF_SC_NGROUPS_MAX=yes}
-samba_cv_SYSQUOTA_FOUND=${samba_cv_SYSQUOTA_FOUND=yes}
-samba_cv_SYSQUOTA_WORKS=${samba_cv_SYSQUOTA_WORKS=yes}
-samba_cv_TRY_QUOTAS=${samba_cv_TRY_QUOTAS=no}
-samba_cv_TRY_SYS_QUOTAS=${samba_cv_TRY_SYS_QUOTAS=no}
-samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes}
-samba_cv_WITH_QUOTAS=${samba_cv_WITH_QUOTAS=auto}
-samba_cv_WITH_SYS_QUOTAS=${samba_cv_WITH_SYS_QUOTAS=auto}
-samba_cv_compiler_supports_ll=${samba_cv_compiler_supports_ll=yes}
-samba_cv_have_longlong=${samba_cv_have_longlong=yes}
-samba_cv_have_setresgid=${samba_cv_have_setresgid=yes}
-samba_cv_have_setresuid=${samba_cv_have_setresuid=yes}
-samba_cv_immediate_structures=${samba_cv_immediate_structures=yes}
-samba_cv_optimize_out_funcation_calls=${samba_cv_optimize_out_funcation_calls=yes}
-samba_cv_sig_atomic_t=${samba_cv_sig_atomic_t=yes}
-samba_cv_socklen_t=${samba_cv_socklen_t=yes}
-samba_cv_unixsocket=${samba_cv_unixsocket=yes}
-samba_cv_volatile=${samba_cv_volatile=yes}
diff --git a/meta/site/armeb-linux-uclibc b/meta/site/armeb-linux-uclibc
deleted file mode 100644
index 731e857dc2..0000000000
--- a/meta/site/armeb-linux-uclibc
+++ /dev/null
@@ -1,38 +0,0 @@
-ac_cv_func_setvbuf_reversed=no
-ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
-ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
-ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
-ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
-ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4}
-ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
-ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
-ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
-ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
-ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4}
-ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
-ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4}
-ac_cv_sizeof_unsigned=${ac_cv_sizeof_unsigned=4}
-ac_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4}
-
-ac_cv_uchar=${ac_cv_uchar=no}
-ac_cv_uint=${ac_cv_uint=yes}
-ac_cv_ulong=${ac_cv_ulong=yes}
-ac_cv_ushort=${ac_cv_ushort=yes}
-
-ac_cv_time_r_type=${ac_cv_time_r_type=POSIX}
-
-# samba
-samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-samba_cv_USE_SETEUID=${samba_cv_USE_SETEUID=yes}
-samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes}
-samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes}
-samba_cv_USE_SETUIDX=${samba_cv_USE_SETUIDX=yes}
-samba_cv_have_setresgid=${samba_cv_have_setresgid=yes}
-samba_cv_have_setresuid=${samba_cv_have_setresuid=yes}
-samba_cv_HAVE_SENDFILE=${samba_cv_HAVE_SENDFILE=yes}
-samba_cv_HAVE_SENDFILE64=${samba_cv_HAVE_SENDFILE64=yes}
-samba_cv_HAVE_SECURE_MKSTEMP=${samba_cv_HAVE_SECURE_MKSTEMP=yes}
-samba_cv_HAVE_MMAP=${samba_cv_HAVE_MMAP=yes}
-samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes}
-samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes}
-samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=yes}
diff --git a/meta/site/common b/meta/site/common
index 5ccc14f8c9..ff552329bd 100644
--- a/meta/site/common
+++ b/meta/site/common
@@ -18,4 +18,4 @@ shadow_cv_passwd_dir=${bindir}
# python: deactivate a runtime check for ipv6-support in python >=2.7.1 that fails when cross-compiling
ac_cv_buggy_getaddrinfo=no
-ac_cv_path_SED=sed
+ac_cv_path_SED=${ac_cv_path_SED=sed}
diff --git a/meta/site/common-linux b/meta/site/common-linux
index 2958716395..71ec961b15 100644
--- a/meta/site/common-linux
+++ b/meta/site/common-linux
@@ -48,6 +48,7 @@ hw_cv_func_vsnprintf_c99=${hw_cv_func_vsnprintf_c99=yes}
# coreutils
gl_cv_func_fstatat_zero_flag=${gl_cv_func_fstatat_zero_flag=yes}
+gl_cv_have_proc_uptime=${gl_cv_have_proc_uptime=yes}
# mysql
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=yes}
diff --git a/meta/site/common-musl b/meta/site/common-musl
index 26fc103319..1b4fc32135 100644
--- a/meta/site/common-musl
+++ b/meta/site/common-musl
@@ -12,6 +12,7 @@ ac_cv_func_getpwuid_r=${ac_cv_func_getpwuid_r=yes}
ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
+ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
# glib
glib_cv_strlcpy=${glib_cv_strlcpy=no}
diff --git a/meta/site/common-uclibc b/meta/site/common-uclibc
deleted file mode 100644
index 26fc103319..0000000000
--- a/meta/site/common-uclibc
+++ /dev/null
@@ -1,52 +0,0 @@
-# general
-ac_cv_have_decl_sys_siglist=${ac_cv_have_decl_sys_siglist=no}
-ac_cv_func_realloc_works=${ac_cv_func_realloc_works=yes}
-ac_cv_func_realloc_0_nonnull=${ac_cv_func_realloc_0_nonnull=yes}
-ac_cv_func_malloc_works=${ac_cv_func_malloc_works=yes}
-ac_cv_func_malloc_0_nonnull=${ac_cv_func_malloc_0_nonnull=yes}
-ac_cv_func_getpgrp_void=yes
-ac_cv_func_setpgrp_void=yes
-ac_cv_func_setgrent_void=yes
-ac_cv_func_getgrgid_r=${ac_cv_func_getgrgid_r=yes}
-ac_cv_func_getpwuid_r=${ac_cv_func_getpwuid_r=yes}
-ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
-ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
-ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
-
-# glib
-glib_cv_strlcpy=${glib_cv_strlcpy=no}
-ac_cv_func_printf_unix98=${ac_cv_func_printf_unix98=yes}
-ac_cv_func_snprintf_c99=${ac_cv_func_snprintf_c99=yes}
-ac_cv_func_vsnprintf_c99=${ac_cv_func_vsnprintf_c99=yes}
-glib_cv_compliant_posix_memalign=${glib_cv_compliant_posix_memalign=1}
-glib_cv_long_long_format=${glib_cv_long_long_format=ll}
-glib_cv_have_qsort_r=${glib_cv_have_qsort_r=no}
-
-#dbus-glib
-ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
-
-# bash
-bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist=no}
-bash_cv_sys_siglist=${bash_cv_sys_siglist=no}
-
-# coreutils
-fu_cv_sys_stat_statfs2_bsize=${fu_cv_sys_stat_statfs2_bsize=yes}
-gl_cv_func_gettimeofday_clobber=${gl_cv_func_gettimeofday_clobber=no}
-gl_cv_func_tzset_clobber=${gl_cv_func_tzset_clobber=no}
-gl_cv_func_gettimeofday_posix_signature=${gl_cv_func_gettimeofday_posix_signature=yes}
-ac_cv_func_posix_spawn=${ac_cv_func_posix_spawn=yes}
-ac_cv_func_posix_spawn_works=${ac_cv_func_posix_spawn_works=yes}
-
-# va_copy and _va_copy
-ac_cv_va_copy=${ac_cv_va_copy=yes}
-ac_cv___va_copy=${ac_cv___va_copy=yes}
-ac_cv_func_va_copy=${ac_cv_func_va_copy=yes}
-ac_cv_func___va_copy=${ac_cv_func___va_copy=yes}
-
-# posix_getpwuid_r posix_getgrgid_r posix_getpwnam_r
-ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
-ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
-ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
-
-# Xorg
-xorg_cv_malloc0_returns_null=${xorg_cv_malloc0_returns_null=yes}
diff --git a/meta/site/ix86-common b/meta/site/ix86-common
index f4cf0b8db8..c5e354c073 100644
--- a/meta/site/ix86-common
+++ b/meta/site/ix86-common
@@ -19,7 +19,6 @@ ac_cv_sizeof_long_p=${ac_cv_sizeof_long_p=4}
ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
ac_cv_sizeof_uid_t=${ac_cv_sizeof_uid_t=4}
ac_cv_sizeof_gid_t=${ac_cv_sizeof_gid_t=4}
-ac_cv_sizeof_ino_t=${ac_cv_sizeof_ino_t=4}
ac_cv_sizeof_dev_t=${ac_cv_sizeof_dev_t=8}
ac_cv_func_lstat_dereferences_slashed_symlink=${ac_cv_func_lstat_dereferences_slashed_symlink=yes}
ac_cv_func_lstat_empty_string_bug=${ac_cv_func_lstat_empty_string_bug=no}
@@ -54,7 +53,6 @@ bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=missing}
clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
# cvs
cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes}
diff --git a/meta/site/microblaze-linux b/meta/site/microblaze-linux
new file mode 100644
index 0000000000..c6a40c6bec
--- /dev/null
+++ b/meta/site/microblaze-linux
@@ -0,0 +1,54 @@
+# general
+ac_cv_va_val_copy=${ac_cv_va_val_copy=yes}
+ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
+ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
+ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4}
+ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
+ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
+ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
+ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_ssize_t=${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4}
+ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
+ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
+ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
+ac_cv_sizeof_unsigned=${ac_cv_sizeof_unsigned=4}
+ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
+ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2}
+ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4}
+ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=4}
+ac_cv_sizeof_unsigned_long_long=${ac_cv_sizeof_unsigned_long_long=8}
+ac_cv_sizeof_signed_char=${ac_cv_sizeof_signed_char=1}
+ac_cv_uchar=${ac_cv_uchar=no}
+ac_cv_uint=${ac_cv_uint=yes}
+ac_cv_ulong=${ac_cv_ulong=yes}
+ac_cv_ushort=${ac_cv_ushort=yes}
+
+# glib
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_uscore=${glib_cv_uscore=no}
+glib_cv_va_copy=${glib_cv_va_copy=yes}
+glib_cv_va_val_copy=${glib_cv_va_val_copy=yes}
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+
+# glib-2.0
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=4
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8}
+glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4}
+glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_sys_use_pid_niceness_surrogate=${glib_cv_sys_use_pid_niceness_surrogate=yes}
+
+# startup-notification
+lf_cv_sane_realloc=yes
+
diff --git a/meta/site/mips-linux-uclibc b/meta/site/mips-linux-uclibc
deleted file mode 100644
index b23363e156..0000000000
--- a/meta/site/mips-linux-uclibc
+++ /dev/null
@@ -1,80 +0,0 @@
-# general
-ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
-
-# bash
-ac_cv_c_long_double=${ac_cv_c_long_double=no}
-bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
-
-# openssh
-ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
-ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
-ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
-ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
-ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
-
-# fget
-compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
-
-# glib
-glib_cv___va_copy=${glib_cv___va_copy=yes}
-glib_cv_has__inline=${glib_cv_has__inline=yes}
-glib_cv_has__inline__=${glib_cv_has__inline__=yes}
-glib_cv_hasinline=${glib_cv_hasinline=yes}
-glib_cv_long_long_format=${glib_cv_long_long_format=ll}
-glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
-glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
-glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
-glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
-glib_cv_stack_grows=${glib_cv_stack_grows=no}
-glib_cv_uscore=${glib_cv_uscore=no}
-
-# glib-2.0
-glib_cv_stack_grows=${glib_cv_stack_grows=no}
-utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
-glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
-
-# libpcap
-ac_cv_linux_vers=${ac_cv_linux_vers=2}
-
-# startup-notification
-lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
-
-# libidl
-libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
-
-# ncftp
-wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
-wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
-wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes}
-
-# db
-db_cv_align_t=${db_cv_align_t='unsigned long long'}
-db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
-db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
-db_cv_sprintf_count=${db_cv_sprintf_count=yes}
-
-# rrdtool
-rd_cv_ieee_works=${rd_cv_ieee_works=yes}
-# ac_cv_path_PERL=${ac_cv_path_PERL=no}
-
-# gettext
-am_cv_func_working_getline=${am_cv_func_working_getline=yes}
-
-# samba
-samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-
-# vim
-ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
-
-# intercom
-ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
-
-# lmbench
-ac_cv_uint=${ac_cv_unit=yes}
-
-# D-BUS
-ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
-
-# evolution-data-server
-ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
-
diff --git a/meta/site/mips64-linux-uclibc b/meta/site/mips64-linux-uclibc
deleted file mode 100644
index cbba5525fa..0000000000
--- a/meta/site/mips64-linux-uclibc
+++ /dev/null
@@ -1,83 +0,0 @@
-# general
-ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
-
-# bash
-ac_cv_c_long_double=${ac_cv_c_long_double=no}
-bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
-
-# openssh
-ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
-ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
-ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
-ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
-ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
-
-# fget
-compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
-
-# glib
-glib_cv___va_copy=${glib_cv___va_copy=yes}
-glib_cv_has__inline=${glib_cv_has__inline=yes}
-glib_cv_has__inline__=${glib_cv_has__inline__=yes}
-glib_cv_hasinline=${glib_cv_hasinline=yes}
-glib_cv_long_long_format=${glib_cv_long_long_format=ll}
-glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
-glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
-glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
-glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
-glib_cv_stack_grows=${glib_cv_stack_grows=no}
-glib_cv_uscore=${glib_cv_uscore=no}
-
-# glib-2.0
-glib_cv_stack_grows=${glib_cv_stack_grows=no}
-utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
-glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
-ac_cv_alignof_guint32=4
-ac_cv_alignof_guint64=8
-ac_cv_alignof_unsigned_long=8
-
-# libpcap
-ac_cv_linux_vers=${ac_cv_linux_vers=2}
-
-# startup-notification
-lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
-
-# libidl
-libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
-
-# ncftp
-wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
-wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
-wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes}
-
-# db
-db_cv_align_t=${db_cv_align_t='unsigned long long'}
-db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
-db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
-db_cv_sprintf_count=${db_cv_sprintf_count=yes}
-
-# rrdtool
-rd_cv_ieee_works=${rd_cv_ieee_works=yes}
-# ac_cv_path_PERL=${ac_cv_path_PERL=no}
-
-# gettext
-am_cv_func_working_getline=${am_cv_func_working_getline=yes}
-
-# samba
-samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-
-# vim
-ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
-
-# intercom
-ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
-
-# lmbench
-ac_cv_uint=${ac_cv_unit=yes}
-
-# D-BUS
-ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
-
-# eds-dbus
-ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
-
diff --git a/meta/site/mips64el-linux b/meta/site/mips64el-linux
index 8b61eb0f35..680171d5e3 100644
--- a/meta/site/mips64el-linux
+++ b/meta/site/mips64el-linux
@@ -35,6 +35,7 @@ glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
ac_cv_alignof_guint32=4
ac_cv_alignof_guint64=8
ac_cv_alignof_unsigned_long=8
+ac_cv_sizeof_ssize_t=8
# libpcap
ac_cv_linux_vers=${ac_cv_linux_vers=2}
diff --git a/meta/site/mips64el-linux-uclibc b/meta/site/mips64el-linux-uclibc
deleted file mode 100644
index 6a0499d101..0000000000
--- a/meta/site/mips64el-linux-uclibc
+++ /dev/null
@@ -1,108 +0,0 @@
-# general
-ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
-
-# bash
-ac_cv_c_long_double=${ac_cv_c_long_double=no}
-bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
-
-# openssh
-ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
-ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
-ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
-ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
-ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
-
-# fget
-compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
-
-# glib
-glib_cv___va_copy=${glib_cv___va_copy=yes}
-glib_cv_has__inline=${glib_cv_has__inline=yes}
-glib_cv_has__inline__=${glib_cv_has__inline__=yes}
-glib_cv_hasinline=${glib_cv_hasinline=yes}
-glib_cv_long_long_format=${glib_cv_long_long_format=ll}
-glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
-glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
-glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
-glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
-glib_cv_stack_grows=${glib_cv_stack_grows=no}
-glib_cv_uscore=${glib_cv_uscore=no}
-
-# glib-2.0
-glib_cv_stack_grows=${glib_cv_stack_grows=no}
-utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
-glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
-ac_cv_alignof_guint32=4
-ac_cv_alignof_guint64=8
-ac_cv_alignof_unsigned_long=8
-
-# libpcap
-ac_cv_linux_vers=${ac_cv_linux_vers=2}
-
-# startup-notification
-lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
-
-# libidl
-libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
-
-# ncftp
-wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
-wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
-wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes}
-
-# gettext
-am_cv_func_working_getline=${am_cv_func_working_getline=yes}
-
-# samba
-# from samba 3.0.14a on 5/29/2005
-ac_cv_func_memcmp_working=${ac_cv_func_memcmp_working=yes}
-ac_cv_have_asprintf_decl=${ac_cv_have_asprintf_decl=yes}
-ac_cv_have_setresgid_decl=${ac_cv_have_setresgid_decl=yes}
-ac_cv_have_setresuid_decl=${ac_cv_have_setresuid_decl=yes}
-ac_cv_have_vasprintf_decl=${ac_cv_have_vasprintf_decl=yes}
-fu_cv_sys_stat_statvfs64=${fu_cv_sys_stat_statvfs64=yes}
-samba_cv_FTRUNCATE_NEEDS_ROOT=${samba_cv_FTRUNCATE_NEEDS_ROOT=no}
-samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no}
-samba_cv_HAVE_BROKEN_GETGROUPS=${samba_cv_HAVE_BROKEN_GETGROUPS=no}
-samba_cv_HAVE_BROKEN_READDIR=${samba_cv_HAVE_BROKEN_READDIR=no}
-samba_cv_HAVE_C99_VSNPRINTF=${samba_cv_HAVE_C99_VSNPRINTF=yes}
-samba_cv_HAVE_DEV64_T=${samba_cv_HAVE_DEV64_T=no}
-samba_cv_HAVE_DEVICE_MAJOR_FN=${samba_cv_HAVE_DEVICE_MAJOR_FN=yes}
-samba_cv_HAVE_DEVICE_MINOR_FN=${samba_cv_HAVE_DEVICE_MINOR_FN=yes}
-samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=${samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes}
-samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes}
-samba_cv_HAVE_FTRUNCATE_EXTEND=${samba_cv_HAVE_FTRUNCATE_EXTEND=yes}
-samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-samba_cv_HAVE_INO64_T=${samba_cv_HAVE_INO64_T=no}
-samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes}
-samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes}
-samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=yes}
-samba_cv_HAVE_MAKEDEV=${samba_cv_HAVE_MAKEDEV=yes}
-samba_cv_HAVE_MMAP=${samba_cv_HAVE_MMAP=yes}
-samba_cv_HAVE_OFF64_T=${samba_cv_HAVE_OFF64_T=no}
-samba_cv_HAVE_QUOTACTL_4A=${samba_cv_HAVE_QUOTACTL_4A=yes}
-samba_cv_HAVE_ROOT=${samba_cv_HAVE_ROOT=no}
-samba_cv_HAVE_SECURE_MKSTEMP=${samba_cv_HAVE_SECURE_MKSTEMP=yes}
-samba_cv_HAVE_SENDFILE64=${samba_cv_HAVE_SENDFILE64=yes}
-samba_cv_HAVE_STRUCT_DIRENT64=${samba_cv_HAVE_STRUCT_DIRENT64=yes}
-samba_cv_HAVE_STRUCT_FLOCK64=${samba_cv_HAVE_STRUCT_FLOCK64=yes}
-samba_cv_HAVE_TRUNCATED_SALT=${samba_cv_HAVE_TRUNCATED_SALT=no}
-samba_cv_HAVE_UNSIGNED_CHAR=${samba_cv_HAVE_UNSIGNED_CHAR=no}
-samba_cv_HAVE_WORKING_AF_LOCAL=${samba_cv_HAVE_WORKING_AF_LOCAL=no}
-samba_cv_HAVE_Werror=${samba_cv_HAVE_Werror=yes}
-samba_cv_REALPATH_TAKES_NULL=${samba_cv_REALPATH_TAKES_NULL=no}
-samba_cv_REPLACE_INET_NTOA=${samba_cv_REPLACE_INET_NTOA=no}
-samba_cv_SIZEOF_INO_T=${samba_cv_SIZEOF_INO_T=yes}
-samba_cv_SIZEOF_OFF_T=${samba_cv_SIZEOF_OFF_T=yes}
-samba_cv_SYSCONF_SC_NGROUPS_MAX=${samba_cv_SYSCONF_SC_NGROUPS_MAX=yes}
-samba_cv_SYSCONF_SC_NPROC_ONLN=${samba_cv_SYSCONF_SC_NPROC_ONLN=no}
-samba_cv_SYSQUOTA_FOUND=${samba_cv_SYSQUOTA_FOUND=yes}
-samba_cv_SYSQUOTA_WORKS=${samba_cv_SYSQUOTA_WORKS=yes}
-samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes}
-samba_cv_have_longlong=${samba_cv_have_longlong=yes}
-samba_cv_have_setresgid=${samba_cv_have_setresgid=yes}
-samba_cv_have_setresuid=${samba_cv_have_setresuid=yes}
-samba_cv_sysquotas_file=${samba_cv_sysquotas_file=lib/sysquotas_4A.c}
-# This cached value needs a local patch to pick it up, upstream 3.0.14a
-# doesn't cache it.
-samba_cv_LINUX_LFS_SUPPORT=${samba_cv_LINUX_LFS_SUPPORT=yes}
diff --git a/meta/site/mipsel-linux-uclibc b/meta/site/mipsel-linux-uclibc
deleted file mode 100644
index f921cda4ae..0000000000
--- a/meta/site/mipsel-linux-uclibc
+++ /dev/null
@@ -1,100 +0,0 @@
-# general
-ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
-
-# bash
-ac_cv_c_long_double=${ac_cv_c_long_double=no}
-bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
-
-# openssh
-ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
-ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
-ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
-ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
-ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
-
-# fget
-compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
-
-# glib
-glib_cv___va_copy=${glib_cv___va_copy=yes}
-glib_cv_has__inline=${glib_cv_has__inline=yes}
-glib_cv_has__inline__=${glib_cv_has__inline__=yes}
-glib_cv_hasinline=${glib_cv_hasinline=yes}
-glib_cv_long_long_format=${glib_cv_long_long_format=ll}
-glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
-glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
-glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
-glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
-glib_cv_stack_grows=${glib_cv_stack_grows=no}
-glib_cv_uscore=${glib_cv_uscore=no}
-
-# libpcap
-ac_cv_linux_vers=${ac_cv_linux_vers=2}
-
-# startup-notification
-lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
-
-# libidl
-libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
-
-# ncftp
-wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
-wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
-wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes}
-
-# gettext
-am_cv_func_working_getline=${am_cv_func_working_getline=yes}
-
-# samba
-# from samba 3.0.14a on 5/29/2005
-ac_cv_func_memcmp_working=${ac_cv_func_memcmp_working=yes}
-ac_cv_have_asprintf_decl=${ac_cv_have_asprintf_decl=yes}
-ac_cv_have_setresgid_decl=${ac_cv_have_setresgid_decl=yes}
-ac_cv_have_setresuid_decl=${ac_cv_have_setresuid_decl=yes}
-ac_cv_have_vasprintf_decl=${ac_cv_have_vasprintf_decl=yes}
-fu_cv_sys_stat_statvfs64=${fu_cv_sys_stat_statvfs64=yes}
-samba_cv_FTRUNCATE_NEEDS_ROOT=${samba_cv_FTRUNCATE_NEEDS_ROOT=no}
-samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no}
-samba_cv_HAVE_BROKEN_GETGROUPS=${samba_cv_HAVE_BROKEN_GETGROUPS=no}
-samba_cv_HAVE_BROKEN_READDIR=${samba_cv_HAVE_BROKEN_READDIR=no}
-samba_cv_HAVE_C99_VSNPRINTF=${samba_cv_HAVE_C99_VSNPRINTF=yes}
-samba_cv_HAVE_DEV64_T=${samba_cv_HAVE_DEV64_T=no}
-samba_cv_HAVE_DEVICE_MAJOR_FN=${samba_cv_HAVE_DEVICE_MAJOR_FN=yes}
-samba_cv_HAVE_DEVICE_MINOR_FN=${samba_cv_HAVE_DEVICE_MINOR_FN=yes}
-samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=${samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes}
-samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes}
-samba_cv_HAVE_FTRUNCATE_EXTEND=${samba_cv_HAVE_FTRUNCATE_EXTEND=yes}
-samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-samba_cv_HAVE_INO64_T=${samba_cv_HAVE_INO64_T=no}
-samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes}
-samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes}
-samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=yes}
-samba_cv_HAVE_MAKEDEV=${samba_cv_HAVE_MAKEDEV=yes}
-samba_cv_HAVE_MMAP=${samba_cv_HAVE_MMAP=yes}
-samba_cv_HAVE_OFF64_T=${samba_cv_HAVE_OFF64_T=no}
-samba_cv_HAVE_QUOTACTL_4A=${samba_cv_HAVE_QUOTACTL_4A=yes}
-samba_cv_HAVE_ROOT=${samba_cv_HAVE_ROOT=no}
-samba_cv_HAVE_SECURE_MKSTEMP=${samba_cv_HAVE_SECURE_MKSTEMP=yes}
-samba_cv_HAVE_SENDFILE64=${samba_cv_HAVE_SENDFILE64=yes}
-samba_cv_HAVE_STRUCT_DIRENT64=${samba_cv_HAVE_STRUCT_DIRENT64=yes}
-samba_cv_HAVE_STRUCT_FLOCK64=${samba_cv_HAVE_STRUCT_FLOCK64=yes}
-samba_cv_HAVE_TRUNCATED_SALT=${samba_cv_HAVE_TRUNCATED_SALT=no}
-samba_cv_HAVE_UNSIGNED_CHAR=${samba_cv_HAVE_UNSIGNED_CHAR=no}
-samba_cv_HAVE_WORKING_AF_LOCAL=${samba_cv_HAVE_WORKING_AF_LOCAL=no}
-samba_cv_HAVE_Werror=${samba_cv_HAVE_Werror=yes}
-samba_cv_REALPATH_TAKES_NULL=${samba_cv_REALPATH_TAKES_NULL=no}
-samba_cv_REPLACE_INET_NTOA=${samba_cv_REPLACE_INET_NTOA=no}
-samba_cv_SIZEOF_INO_T=${samba_cv_SIZEOF_INO_T=yes}
-samba_cv_SIZEOF_OFF_T=${samba_cv_SIZEOF_OFF_T=yes}
-samba_cv_SYSCONF_SC_NGROUPS_MAX=${samba_cv_SYSCONF_SC_NGROUPS_MAX=yes}
-samba_cv_SYSCONF_SC_NPROC_ONLN=${samba_cv_SYSCONF_SC_NPROC_ONLN=no}
-samba_cv_SYSQUOTA_FOUND=${samba_cv_SYSQUOTA_FOUND=yes}
-samba_cv_SYSQUOTA_WORKS=${samba_cv_SYSQUOTA_WORKS=yes}
-samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes}
-samba_cv_have_longlong=${samba_cv_have_longlong=yes}
-samba_cv_have_setresgid=${samba_cv_have_setresgid=yes}
-samba_cv_have_setresuid=${samba_cv_have_setresuid=yes}
-samba_cv_sysquotas_file=${samba_cv_sysquotas_file=lib/sysquotas_4A.c}
-# This cached value needs a local patch to pick it up, upstream 3.0.14a
-# doesn't cache it.
-samba_cv_LINUX_LFS_SUPPORT=${samba_cv_LINUX_LFS_SUPPORT=yes}
diff --git a/meta/site/mipsisa32r6-linux b/meta/site/mipsisa32r6-linux
new file mode 100644
index 0000000000..72a54f95e3
--- /dev/null
+++ b/meta/site/mipsisa32r6-linux
@@ -0,0 +1,79 @@
+# general
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+
+# bash
+ac_cv_c_long_double=${ac_cv_c_long_double=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+
+# openssh
+ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
+ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
+ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
+ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
+ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
+
+# fget
+compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
+
+# glib
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
+glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+
+# libpcap
+ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
+
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ncftp
+wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
+wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
+
+# db
+db_cv_align_t=${db_cv_align_t='unsigned long long'}
+db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
+db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
+db_cv_sprintf_count=${db_cv_sprintf_count=yes}
+
+# rrdtool
+rd_cv_ieee_works=${rd_cv_ieee_works=yes}
+# ac_cv_path_PERL=${ac_cv_path_PERL=no}
+
+# gettext
+am_cv_func_working_getline=${am_cv_func_working_getline=yes}
+
+# samba
+samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+
+# vim
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+
+# intercom
+ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
+
+# lmbench
+ac_cv_uint=${ac_cv_unit=yes}
+
+# D-BUS
+ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
+
+# evolution-data-server
+ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
+
diff --git a/meta/site/mipsisa32r6el-linux b/meta/site/mipsisa32r6el-linux
new file mode 100644
index 0000000000..696b1beeb4
--- /dev/null
+++ b/meta/site/mipsisa32r6el-linux
@@ -0,0 +1,79 @@
+# general
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+
+# bash
+ac_cv_c_long_double=${ac_cv_c_long_double=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+
+# openssh
+ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
+ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
+ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
+ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
+ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
+
+# fget
+compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
+
+# glib
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
+glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+
+# libpcap
+ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
+
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ncftp
+wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
+wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
+wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes}
+
+# db
+db_cv_align_t=${db_cv_align_t='unsigned long long'}
+db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
+db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
+db_cv_sprintf_count=${db_cv_sprintf_count=yes}
+
+# rrdtool
+rd_cv_ieee_works=${rd_cv_ieee_works=yes}
+# ac_cv_path_PERL=${ac_cv_path_PERL=no}
+
+# gettext
+am_cv_func_working_getline=${am_cv_func_working_getline=yes}
+
+# samba
+samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+
+# vim
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+
+# intercom
+ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
+
+#lmbench
+ac_cv_uint=${ac_cv_unit=yes}
+
+# D-BUS
+ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
+
+# evolution-data-server
+ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
diff --git a/meta/site/mipsisa64r6-linux b/meta/site/mipsisa64r6-linux
new file mode 100644
index 0000000000..ed0fbbe653
--- /dev/null
+++ b/meta/site/mipsisa64r6-linux
@@ -0,0 +1,83 @@
+# general
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+
+# bash
+ac_cv_c_long_double=${ac_cv_c_long_double=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+
+# openssh
+ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
+ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
+ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
+ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
+ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
+
+# fget
+compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
+
+# glib
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
+glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+ac_cv_sizeof_ssize_t=8
+
+# libpcap
+ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
+
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ncftp
+wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
+wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
+
+# db
+db_cv_align_t=${db_cv_align_t='unsigned long long'}
+db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
+db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
+db_cv_sprintf_count=${db_cv_sprintf_count=yes}
+
+# rrdtool
+rd_cv_ieee_works=${rd_cv_ieee_works=yes}
+# ac_cv_path_PERL=${ac_cv_path_PERL=no}
+
+# gettext
+am_cv_func_working_getline=${am_cv_func_working_getline=yes}
+
+# samba
+samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+
+# vim
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+
+# intercom
+ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
+
+# lmbench
+ac_cv_uint=${ac_cv_unit=yes}
+
+# D-BUS
+ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
+
+# eds-dbus
+ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
+
diff --git a/meta/site/mipsisa64r6el-linux b/meta/site/mipsisa64r6el-linux
new file mode 100644
index 0000000000..680171d5e3
--- /dev/null
+++ b/meta/site/mipsisa64r6el-linux
@@ -0,0 +1,83 @@
+# general
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+
+# bash
+ac_cv_c_long_double=${ac_cv_c_long_double=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+
+# openssh
+ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
+ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
+ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
+ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
+ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
+
+# fget
+compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
+
+# glib
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
+glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+ac_cv_sizeof_ssize_t=8
+
+# libpcap
+ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
+
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ncftp
+wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
+wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
+wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes}
+
+# db
+db_cv_align_t=${db_cv_align_t='unsigned long long'}
+db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
+db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
+db_cv_sprintf_count=${db_cv_sprintf_count=yes}
+
+# rrdtool
+rd_cv_ieee_works=${rd_cv_ieee_works=yes}
+# ac_cv_path_PERL=${ac_cv_path_PERL=no}
+
+# gettext
+am_cv_func_working_getline=${am_cv_func_working_getline=yes}
+
+# samba
+samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+
+# vim
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+
+# intercom
+ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
+
+#lmbench
+ac_cv_uint=${ac_cv_unit=yes}
+
+# D-BUS
+ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
+
+# eds-dbus
+ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
diff --git a/meta/site/nios2-linux b/meta/site/nios2-linux
index 2f4e570fa8..67a3fc8a75 100644
--- a/meta/site/nios2-linux
+++ b/meta/site/nios2-linux
@@ -33,7 +33,6 @@ db_cv_path_sh=${db_cv_path_sh=/bin/sh}
db_cv_path_strip=${db_cv_path_strip=/usr/bin/strip}
db_cv_align_t=${db_cv_align_t='unsigned long long'}
db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
-db_cv_mutex=${db_cv_mutex=ARM/gcc-assembly}
db_cv_posixmutexes=${db_cv_posixmutexes=no}
db_cv_uimutexes=${db_cv_uimutexes=no}
@@ -233,7 +232,6 @@ ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=1}
ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
ac_cv_sizeof_char_p=${ac_cv_sizeof_int_p=4}
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4}
@@ -373,7 +371,6 @@ samba_cv_LINUX_LFS_SUPPORT=${samba_cv_LINUX_LFS_SUPPORT=yes}
clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
#dbus
ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
diff --git a/meta/site/powerpc32-linux b/meta/site/powerpc32-linux
index 06d961f5ce..f37e915cb3 100644
--- a/meta/site/powerpc32-linux
+++ b/meta/site/powerpc32-linux
@@ -1,6 +1,5 @@
ac_cv_func_setvbuf_reversed=no
ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4}
ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
diff --git a/meta/site/powerpc64-linux b/meta/site/powerpc64-linux
index d64e230aff..820a4b8440 100644
--- a/meta/site/powerpc64-linux
+++ b/meta/site/powerpc64-linux
@@ -37,3 +37,5 @@ ac_cv_linux_vers=${ac_cv_linux_vers=2}
# apr
apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
+# cvs
+cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes}
diff --git a/meta/site/riscv32-linux b/meta/site/riscv32-linux
new file mode 100644
index 0000000000..97de628e22
--- /dev/null
+++ b/meta/site/riscv32-linux
@@ -0,0 +1,11 @@
+# general
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=4
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
diff --git a/meta/site/riscv64-linux b/meta/site/riscv64-linux
new file mode 100644
index 0000000000..38bc5f044d
--- /dev/null
+++ b/meta/site/riscv64-linux
@@ -0,0 +1,11 @@
+# general
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
diff --git a/meta/site/sh-common b/meta/site/sh-common
index fc4d6ad792..97c96934d7 100644
--- a/meta/site/sh-common
+++ b/meta/site/sh-common
@@ -227,7 +227,6 @@ with_broken_putenv=${with_broken_putenv=no}
clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
# libnet
ac_cv_lbl_unaligned_fail=${ac_cv_lbl_unaligned_fail=no}
diff --git a/meta/site/x32-linux b/meta/site/x32-linux
index 308d6e21ec..4b70422ed2 100644
--- a/meta/site/x32-linux
+++ b/meta/site/x32-linux
@@ -1,6 +1,5 @@
# general
ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16}
-ac_cv_sizeof_ino_t=${ac_cv_sizeof_ino_t=8}
ac_cv_sizeof_dev_t=${ac_cv_sizeof_dev_t=8}
ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits=64}
ac_cv_alignof_double=8
diff --git a/meta/site/x86_64-linux b/meta/site/x86_64-linux
index ebdcf69f78..778e2c53ee 100644
--- a/meta/site/x86_64-linux
+++ b/meta/site/x86_64-linux
@@ -24,7 +24,6 @@ ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=8}
ac_cv_sizeof_uid_t=${ac_cv_sizeof_uid_t=4}
ac_cv_sizeof_gid_t=${ac_cv_sizeof_gid_t=4}
-ac_cv_sizeof_ino_t=${ac_cv_sizeof_ino_t=8}
ac_cv_sizeof_dev_t=${ac_cv_sizeof_dev_t=8}
ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=8}
ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no}
diff --git a/meta/site/x86_64-linux-uclibc b/meta/site/x86_64-linux-uclibc
deleted file mode 100644
index 2d269f78f7..0000000000
--- a/meta/site/x86_64-linux-uclibc
+++ /dev/null
@@ -1,91 +0,0 @@
-# general
-ac_cv_va_val_copy=${ac_cv_va_val_copy=no}
-ac_cv_func_lstat_dereferences_slashed_symlink=${ac_cv_func_lstat_dereferences_slashed_symlink=yes}
-ac_cv_func_lstat_empty_string_bug=${ac_cv_func_lstat_empty_string_bug=no}
-ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
-ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
-ac_cv_func_stat_empty_string_bug=${ac_cv_func_stat_empty_string_bug=no}
-ac_cv_func_stat_ignores_trailing_slash=${ac_cv_func_stat_ignores_trailing_slash=no}
-ac_libnet_have_packet_socket=${ac_libnet_have_packet_socket=yes}
-ac_cv_linux_vers=${ac_cv_linux_vers=2}
-ac_cv_need_trio=${ac_cv_need_trio=no}
-ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
-ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
-ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
-ac_cv_sizeof_long=${ac_cv_sizeof_long=8}
-ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16}
-ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=8}
-ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
-ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
-ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
-ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=8}
-ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=8}
-ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no}
-db_cv_alignp_t=${db_cv_alignp_t='unsigned long long'}
-db_cv_align_t=${db_cv_align_t='unsigned long long'}
-db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
-db_cv_sprintf_count=${db_cv_sprintf_count=yes}
-glib_cv_hasinline=${glib_cv_hasinline=yes}
-glib_cv_has__inline=${glib_cv_has__inline=yes}
-glib_cv_has__inline__=${glib_cv_has__inline__=yes}
-glib_cv_long_long_format=${glib_cv_long_long_format=ll}
-glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=yes}
-glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
-glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=40}
-glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8}
-glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=8}
-glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=8}
-glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=8}
-glib_cv_stack_grows=${glib_cv_stack_grows=no}
-glib_cv_sys_pthread_cond_timedwait_posix=${glib_cv_sys_pthread_cond_timedwait_posix=yes}
-glib_cv_sys_pthread_getspecific_posix=${glib_cv_sys_pthread_getspecific_posix=yes}
-glib_cv_sys_pthread_mutex_trylock_posix=${glib_cv_sys_pthread_mutex_trylock_posix=yes}
-glib_cv_uscore=${glib_cv_uscore=no}
-glib_cv_va_val_copy=${glib_cv_va_val_copy=no}
-nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no}
-samba_cv_HAVE_VA_COPY=${samba_cv_HAVE_VA_COPY=yes}
-screen_cv_sys_bcopy_overlap=${screen_cv_sys_bcopy_overlap=no}
-screen_cv_sys_fifo_broken_impl=${screen_cv_sys_fifo_broken_impl=yes}
-screen_cv_sys_fifo_usable=${screen_cv_sys_fifo_usable=yes}
-screen_cv_sys_memcpy_overlap=${screen_cv_sys_memcpy_overlap=no}
-screen_cv_sys_memmove_overlap=${screen_cv_sys_memmove_overlap=no}
-screen_cv_sys_select_broken_retval=${screen_cv_sys_select_broken_retval=no}
-screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no}
-screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes}
-screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes}
-utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
-
-# gettext
-am_cv_func_working_getline=${am_cv_func_working_getline=yes}
-
-# glib-2.0
-glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
-ac_cv_alignof_guint32=4
-ac_cv_alignof_guint64=8
-ac_cv_alignof_unsigned_long=8
-
-# libidl
-libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
-
-# ORBit2
-ac_cv_alignof_CORBA_boolean=1
-ac_cv_alignof_CORBA_char=1
-ac_cv_alignof_CORBA_double=4
-ac_cv_alignof_CORBA_float=4
-ac_cv_alignof_CORBA_long=4
-ac_cv_alignof_CORBA_long_double=8
-ac_cv_alignof_CORBA_long_long=8
-ac_cv_alignof_CORBA_octet=1
-ac_cv_alignof_CORBA_pointer=8
-ac_cv_alignof_CORBA_short=2
-ac_cv_alignof_CORBA_struct=1
-ac_cv_alignof_CORBA_wchar=2
-
-# startup-notification
-lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
-
-# lftp
-lftp_cv_va_val_copy=${lftp_cv_va_val_copy=no}
-
-# slrn
-slrn_cv_va_val_copy=${slrn_cv_va_val_copy=no}
diff --git a/oe-init-build-env b/oe-init-build-env
index 5fe68d1e2a..8c1bd54e57 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -4,19 +4,8 @@
#
# Copyright (C) 2006-2011 Linux Foundation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# SPDX-License-Identifier: GPL-2.0-or-later
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Normally this is called as '. ./oe-init-build-env <builddir>'
@@ -31,13 +20,18 @@ elif [ -n "$ZSH_NAME" ]; then
THIS_SCRIPT=$0
else
THIS_SCRIPT="$(pwd)/oe-init-build-env"
+ if [ ! -e "$THIS_SCRIPT" ]; then
+ echo "Error: $THIS_SCRIPT doesn't exist!" >&2
+ echo "Please run this script in oe-init-build-env's directory." >&2
+ exit 1
+ fi
fi
if [ -n "$BBSERVER" ]; then
unset BBSERVER
fi
if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
- echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
+ echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'" >&2
exit 1
fi
@@ -57,11 +51,3 @@ unset OEROOT
[ -z "$BUILDDIR" ] || cd "$BUILDDIR"
-# Shutdown any bitbake server if the BBSERVER variable is not set
-if [ -z "$BBSERVER" ] && [ -f bitbake.lock ]; then
- grep ":" bitbake.lock > /dev/null && BBSERVER=$(cat bitbake.lock) bitbake --status-only
- if [ $? = 0 ]; then
- echo "Shutting down bitbake memory resident server with bitbake -m"
- BBSERVER=$(cat bitbake.lock) bitbake -m
- fi
-fi
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres
deleted file mode 100755
index 9e1425ea83..0000000000
--- a/oe-init-build-env-memres
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-
-# OE Build Environment Setup Script
-#
-# Copyright (C) 2006-2011 Linux Foundation
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-#
-# Normally this is called as '. ./oe-init-build-env-memres <portnumber> <builddir>'
-#
-# This works in most shells (not dash), but not all of them pass the arguments
-# when being sourced. To workaround the shell limitation use "set <portnumber>
-# <builddir>" prior to sourcing this script.
-#
-if [ -z "$1" ]; then
- echo "No port specified, using dynamically selected port"
- port=-1
-else
- port=$1
- shift
-fi
-
-if [ -n "$BASH_SOURCE" ]; then
- THIS_SCRIPT=$BASH_SOURCE
-elif [ -n "$ZSH_NAME" ]; then
- THIS_SCRIPT=$0
-else
- THIS_SCRIPT="$(pwd)/oe-init-build-env"
-fi
-if [ -n "$BBSERVER" ]; then
- unset BBSERVER
-fi
-
-if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
- echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
- exit 1
-fi
-
-if [ -z "$OEROOT" ]; then
- OEROOT=$(dirname "$THIS_SCRIPT")
- OEROOT=$(readlink -f "$OEROOT")
-fi
-unset THIS_SCRIPT
-
-export OEROOT
-. $OEROOT/scripts/oe-buildenv-internal &&
- TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir || {
- unset OEROOT
- return 1
-}
-unset OEROOT
-
-[ -z "$BUILDDIR" ] || cd "$BUILDDIR"
-
-res=1
-if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null; then
- BBSERVER=$(cat bitbake.lock) bitbake --status-only
- res=$?
-fi
-
-if [ $res != 0 ]; then
- bitbake --server-only -t xmlrpc -B localhost:$port
-fi
-
-if [ $port = -1 ]; then
- export BBSERVER=localhost:-1
- echo "Bitbake server started on demand as needed, use bitbake -m to shut it down"
-else
- export BBSERVER=$(cat bitbake.lock)
-
- if [ $res = 0 ]; then
- echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down"
- else
- echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down"
- fi
-fi
-unset port res
diff --git a/scripts/autobuilder-worker-prereq-tests b/scripts/autobuilder-worker-prereq-tests
new file mode 100755
index 0000000000..5d7e6e2601
--- /dev/null
+++ b/scripts/autobuilder-worker-prereq-tests
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# Script which can be run on new autobuilder workers to check all needed configuration is present.
+# Designed to be run in a repo where bitbake/oe-core are already present.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Todo
+# Add testtools/subunit import test
+# Add python3-git test
+# Add pigz test
+# vnc tests/checkvnc?
+# test sendmail works (for QA email notification)
+# test error report submission works
+# test buildistory git repo works?
+#
+
+if [ ! -x $HOME/yocto-autobuilder-helper/scripts/checkvnc ]; then
+ echo "$HOME/yocto-autobuilder-helper should be created."
+ exit 1
+fi
+$HOME/yocto-autobuilder-helper/scripts/checkvnc
+
+. ./oe-init-build-env > /dev/null
+if [ "$?" != "0" ]; then
+ exit 1
+fi
+git config --global user.name > /dev/null
+if [ "$?" != "0" ]; then
+ echo "Please set git config --global user.name"
+ exit 1
+fi
+git config --global user.email > /dev/null
+if [ "$?" != "0" ]; then
+ echo "Please set git config --global user.email"
+ exit 1
+fi
+bitbake -p
+if [ "$?" != "0" ]; then
+ echo "Bitbake parsing failed"
+ exit 1
+fi
+
+WATCHES=$(PATH="/sbin:/usr/sbin:$PATH" sysctl fs.inotify.max_user_watches -n)
+if (( $WATCHES < 65000 )); then
+ echo 'Need to increase watches (echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf'
+ exit 1
+fi
+mkdir -p tmp/deploy/images/qemux86-64
+pushd tmp/deploy/images/qemux86-64
+if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then
+ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.ext4
+fi
+if [ ! -e core-image-minimal-qemux86-64.qemuboot.conf ]; then
+ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf
+fi
+if [ ! -e bzImage-qemux86-64.bin ]; then
+ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/bzImage-qemux86-64.bin
+fi
+popd
+bitbake qemu-helper-native
+DISPLAY=:1 runqemu serialstdio qemux86-64
+if [ "$?" != "0" ]; then
+ echo "Unable to use runqemu"
+ exit 1
+fi
+DISPLAY=:1 runqemu serialstdio qemux86-64 kvm
+if [ "$?" != "0" ]; then
+ echo "Unable to use runqemu with kvm"
+ exit 1
+fi
diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool
index fa31b52584..e55d98c72e 100755
--- a/scripts/bitbake-prserv-tool
+++ b/scripts/bitbake-prserv-tool
@@ -1,4 +1,7 @@
#!/usr/bin/env bash
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
help ()
{
diff --git a/scripts/bitbake-whatchanged b/scripts/bitbake-whatchanged
index 0207777e63..3095dafa46 100755
--- a/scripts/bitbake-whatchanged
+++ b/scripts/bitbake-whatchanged
@@ -4,18 +4,8 @@
# Copyright (c) 2013 Wind River Systems, Inc.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import os
import sys
diff --git a/scripts/buildhistory-collect-srcrevs b/scripts/buildhistory-collect-srcrevs
index 8a03580f8e..c4d203ff4d 100755
--- a/scripts/buildhistory-collect-srcrevs
+++ b/scripts/buildhistory-collect-srcrevs
@@ -5,18 +5,8 @@
# Copyright 2013 Intel Corporation
# Authored-by: Paul Eggleton <paul.eggleton@intel.com>
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import collections
import os
@@ -101,7 +91,7 @@ def main():
for name, value in srcrevs.items():
orig = orig_srcrevs.get(name, orig_srcrev)
if options.reportall or value != orig:
- all_srcrevs[curdir].append((pn, name, srcrev))
+ all_srcrevs[curdir].append((pn, name, value))
for curdir, srcrevs in sorted(all_srcrevs.items()):
if srcrevs:
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index d8ca12d3e6..833f7c33a5 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -4,10 +4,13 @@
#
# Copyright (C) 2013 Intel Corporation
# Author: Paul Eggleton <paul.eggleton@linux.intel.com>
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import sys
import os
-import optparse
+import argparse
from distutils.version import LooseVersion
# Ensure PythonGit is installed (buildhistory_analysis needs it)
@@ -17,36 +20,74 @@ except ImportError:
print("Please install GitPython (python3-git) 0.3.4 or later in order to use this script")
sys.exit(1)
+def get_args_parser():
+ description = "Reports significant differences in the buildhistory repository."
+
+ parser = argparse.ArgumentParser(description=description,
+ usage="""
+ %(prog)s [options] [from-revision [to-revision]]
+ (if not specified, from-revision defaults to build-minus-1, and to-revision defaults to HEAD)""")
+
+ parser.add_argument('-p', '--buildhistory-dir',
+ action='store',
+ dest='buildhistory_dir',
+ default='buildhistory/',
+ help="Specify path to buildhistory directory (defaults to buildhistory/ under cwd)")
+ parser.add_argument('-v', '--report-version',
+ action='store_true',
+ dest='report_ver',
+ default=False,
+ help="Report changes in PKGE/PKGV/PKGR even when the values are still the default (PE/PV/PR)")
+ parser.add_argument('-a', '--report-all',
+ action='store_true',
+ dest='report_all',
+ default=False,
+ help="Report all changes, not just the default significant ones")
+ parser.add_argument('-s', '---signatures',
+ action='store_true',
+ dest='sigs',
+ default=False,
+ help="Report list of signatures differing instead of output")
+ parser.add_argument('-S', '--signatures-with-diff',
+ action='store_true',
+ dest='sigsdiff',
+ default=False,
+ help="Report on actual signature differences instead of output (requires signature data to have been generated, either by running the actual tasks or using bitbake -S)")
+ parser.add_argument('-e', '--exclude-path',
+ action='append',
+ help="Exclude path from the output")
+ parser.add_argument('-c', '--colour',
+ choices=('yes', 'no', 'auto'),
+ default="auto",
+ help="Whether to colourise (defaults to auto)")
+ parser.add_argument('revisions',
+ default = ['build-minus-1', 'HEAD'],
+ nargs='*',
+ help=argparse.SUPPRESS)
+ return parser
+
def main():
- parser = optparse.OptionParser(
- description = "Reports significant differences in the buildhistory repository.",
- usage = """
- %prog [options] [from-revision [to-revision]]
-(if not specified, from-revision defaults to build-minus-1, and to-revision defaults to HEAD)""")
-
- parser.add_option("-p", "--buildhistory-dir",
- help = "Specify path to buildhistory directory (defaults to buildhistory/ under cwd)",
- action="store", dest="buildhistory_dir", default='buildhistory/')
- parser.add_option("-v", "--report-version",
- help = "Report changes in PKGE/PKGV/PKGR even when the values are still the default (PE/PV/PR)",
- action="store_true", dest="report_ver", default=False)
- parser.add_option("-a", "--report-all",
- help = "Report all changes, not just the default significant ones",
- action="store_true", dest="report_all", default=False)
-
- options, args = parser.parse_args(sys.argv)
-
- if len(args) > 3:
- sys.stderr.write('Invalid argument(s) specified: %s\n\n' % ' '.join(args[3:]))
- parser.print_help()
- sys.exit(1)
+
+ parser = get_args_parser()
+ args = parser.parse_args()
if LooseVersion(git.__version__) < '0.3.1':
sys.stderr.write("Version of GitPython is too old, please install GitPython (python-git) 0.3.1 or later in order to use this script\n")
sys.exit(1)
- if not os.path.exists(options.buildhistory_dir):
- sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % options.buildhistory_dir)
+ if len(args.revisions) > 2:
+ sys.stderr.write('Invalid argument(s) specified: %s\n\n' % ' '.join(args.revisions[2:]))
+ parser.print_help()
+
+ sys.exit(1)
+ if not os.path.exists(args.buildhistory_dir):
+ if args.buildhistory_dir == 'buildhistory/':
+ cwd = os.getcwd()
+ if os.path.basename(cwd) == 'buildhistory':
+ args.buildhistory_dir = cwd
+
+ if not os.path.exists(args.buildhistory_dir):
+ sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % args.buildhistory_dir)
parser.print_help()
sys.exit(1)
@@ -60,30 +101,30 @@ def main():
scriptpath.add_oe_lib_path()
# Set path to bitbake lib dir so the buildhistory_analysis module can load bb.utils
bitbakepath = scriptpath.add_bitbake_lib_path()
+
if not bitbakepath:
sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n")
sys.exit(1)
- import oe.buildhistory_analysis
-
- fromrev = 'build-minus-1'
- torev = 'HEAD'
- if len(args) > 1:
- if len(args) == 2 and '..' in args[1]:
- revs = args[1].split('..')
- fromrev = revs[0]
- if revs[1]:
- torev = revs[1]
+ if len(args.revisions) == 1:
+ if '..' in args.revisions[0]:
+ fromrev, torev = args.revisions[0].split('..')
else:
- fromrev = args[1]
- if len(args) > 2:
- torev = args[2]
+ fromrev, torev = args.revisions[0], 'HEAD'
+ elif len(args.revisions) == 2:
+ fromrev, torev = args.revisions
+ from oe.buildhistory_analysis import init_colours, process_changes
import gitdb
+
+ init_colours({"yes": True, "no": False, "auto": sys.stdout.isatty()}[args.colour])
+
try:
- changes = oe.buildhistory_analysis.process_changes(options.buildhistory_dir, fromrev, torev, options.report_all, options.report_ver)
+ changes = process_changes(args.buildhistory_dir, fromrev, torev,
+ args.report_all, args.report_ver, args.sigs,
+ args.sigsdiff, args.exclude_path)
except gitdb.exc.BadObject as e:
- if len(args) == 1:
+ if not args.revisions:
sys.stderr.write("Unable to find previous build revision in buildhistory repository\n\n")
parser.print_help()
else:
@@ -91,10 +132,11 @@ def main():
sys.exit(1)
for chg in changes:
- print('%s' % chg)
+ out = str(chg)
+ if out:
+ print(out)
sys.exit(0)
-
if __name__ == "__main__":
main()
diff --git a/scripts/buildstats-diff b/scripts/buildstats-diff
index 8ee2aaf626..2f6498ab67 100755
--- a/scripts/buildstats-diff
+++ b/scripts/buildstats-diff
@@ -4,304 +4,167 @@
#
# Copyright (c) 2016, Intel Corporation.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-#
-# This program is distributed in the hope 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.
+# SPDX-License-Identifier: GPL-2.0-only
#
+
import argparse
import glob
-import json
import logging
+import math
import os
-import re
import sys
-from collections import namedtuple
-from datetime import datetime, timedelta, tzinfo
from operator import attrgetter
+# Import oe libs
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(scripts_path, 'lib'))
+from buildstats import BuildStats, diff_buildstats, taskdiff_fields, BSVerDiff
+
+
# Setup logging
-logging.basicConfig(level=logging.INFO)
+logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
log = logging.getLogger()
-class TimeZone(tzinfo):
- """Simple fixed-offset tzinfo"""
- def __init__(self, seconds, name):
- self._offset = timedelta(seconds=seconds)
- self._name = name
-
- def utcoffset(self, dt):
- return self._offset
-
- def tzname(self, dt):
- return self._name
-
- def dst(self, dt):
- return None
-
-TIMEZONES = {'UTC': TimeZone(0, 'UTC'),
- 'EET': TimeZone(7200, 'EET'),
- 'EEST': TimeZone(10800, 'EEST')}
-
-
-taskdiff_fields = ('pkg', 'pkg_op', 'task', 'task_op', 'cputime1', 'cputime2',
- 'absdiff', 'reldiff')
-TaskDiff = namedtuple('TaskDiff', ' '.join(taskdiff_fields))
-
-
-def to_datetime_obj(obj):
- """Helper for getting timestamps in datetime format"""
- if isinstance(obj, datetime):
- return obj
- else:
- return datetime.utcfromtimestamp(obj).replace(tzinfo=TIMEZONES['UTC'])
-
-
-def read_buildstats_file(buildstat_file):
- """Convert buildstat text file into dict/json"""
- bs_json = {'iostat': {},
- 'rusage': {},
- 'child_rusage': {}}
- log.debug("Reading task buildstats from %s", buildstat_file)
- with open(buildstat_file) as fobj:
- for line in fobj.readlines():
- key, val = line.split(':', 1)
- val = val.strip()
- if key == 'Started':
- start_time = to_datetime_obj(float(val))
- bs_json['start_time'] = start_time
- elif key == 'Ended':
- end_time = to_datetime_obj(float(val))
- elif key.startswith('IO '):
- split = key.split()
- bs_json['iostat'][split[1]] = int(val)
- elif key.find('rusage') >= 0:
- split = key.split()
- ru_key = split[-1]
- if ru_key in ('ru_stime', 'ru_utime'):
- val = float(val)
- else:
- val = int(val)
- ru_type = 'rusage' if split[0] == 'rusage' else \
- 'child_rusage'
- bs_json[ru_type][ru_key] = val
- elif key == 'Status':
- bs_json['status'] = val
- bs_json['elapsed_time'] = end_time - start_time
- return bs_json
-
-
-def read_buildstats_dir(bs_dir):
- """Read buildstats directory"""
- def split_nevr(nevr):
- """Split name and version information from recipe "nevr" string"""
- n_e_v, revision = nevr.rsplit('-', 1)
- match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[0-9]\S*)$',
- n_e_v)
- if not match:
- # If we're not able to parse a version starting with a number, just
- # take the part after last dash
- match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[^-]+)$',
- n_e_v)
- name = match.group('name')
- version = match.group('version')
- epoch = match.group('epoch')
- return name, epoch, version, revision
-
- if os.path.isfile(os.path.join(bs_dir, 'build_stats')):
- top_dir = bs_dir
- else:
- subdirs = sorted(glob.glob(bs_dir + '/*'))
- if len(subdirs) > 1:
- log.warning("Multiple buildstats found, using the first one")
- top_dir = subdirs[0]
- log.debug("Reading buildstats directory %s", top_dir)
- subdirs = os.listdir(top_dir)
-
- # Handle "old" style directory structure
- if len(subdirs) == 1 and re.match('^20[0-9]{12}$', subdirs[0]):
- top_dir = os.path.join(top_dir, subdirs[0])
- subdirs = os.listdir(top_dir)
-
- buildstats = {}
- for dirname in subdirs:
- recipe_dir = os.path.join(top_dir, dirname)
- if not os.path.isdir(recipe_dir):
- continue
- name, epoch, version, revision = split_nevr(dirname)
- recipe_bs = {'nevr': dirname,
- 'name': name,
- 'epoch': epoch,
- 'version': version,
- 'revision': revision,
- 'tasks': {}}
- for task in os.listdir(recipe_dir):
- recipe_bs['tasks'][task] = read_buildstats_file(
- os.path.join(recipe_dir, task))
- if name in buildstats:
- log.error("Cannot handle multiple versions of the same package (%s)",
- name)
- sys.exit(1)
- buildstats[name] = recipe_bs
-
- return buildstats
+class ScriptError(Exception):
+ """Exception for internal error handling of this script"""
+ pass
-def read_buildstats_json(path):
- """Read buildstats from JSON file"""
- buildstats = {}
- with open(path) as fobj:
- bs_json = json.load(fobj)
- for recipe_bs in bs_json:
- if recipe_bs['name'] in buildstats:
- log.error("Cannot handle multiple versions of the same package (%s)",
- recipe_bs['name'])
- sys.exit(1)
+def read_buildstats(path, multi):
+ """Read buildstats"""
+ if not os.path.exists(path):
+ raise ScriptError("No such file or directory: {}".format(path))
- if recipe_bs['epoch'] is None:
- recipe_bs['nevr'] = "{}-{}-{}".format(recipe_bs['name'], recipe_bs['version'], recipe_bs['revision'])
- else:
- recipe_bs['nevr'] = "{}-{}_{}-{}".format(recipe_bs['name'], recipe_bs['epoch'], recipe_bs['version'], recipe_bs['revision'])
- buildstats[recipe_bs['name']] = recipe_bs
+ if os.path.isfile(path):
+ return BuildStats.from_file_json(path)
- return buildstats
+ if os.path.isfile(os.path.join(path, 'build_stats')):
+ return BuildStats.from_dir(path)
+ # Handle a non-buildstat directory
+ subpaths = sorted(glob.glob(path + '/*'))
+ if len(subpaths) > 1:
+ if multi:
+ log.info("Averaging over {} buildstats from {}".format(
+ len(subpaths), path))
+ else:
+ raise ScriptError("Multiple buildstats found in '{}'. Please give "
+ "a single buildstat directory of use the --multi "
+ "option".format(path))
+ bs = None
+ for subpath in subpaths:
+ if os.path.isfile(subpath):
+ _bs = BuildStats.from_file_json(subpath)
+ else:
+ _bs = BuildStats.from_dir(subpath)
+ if bs is None:
+ bs = _bs
+ else:
+ bs.aggregate(_bs)
+ if not bs:
+ raise ScriptError("No buildstats found under {}".format(path))
-def read_buildstats(path):
- """Read buildstats"""
- if os.path.isfile(path):
- return read_buildstats_json(path)
- else:
- return read_buildstats_dir(path)
+ return bs
def print_ver_diff(bs1, bs2):
"""Print package version differences"""
- pkgs1 = set(bs1.keys())
- pkgs2 = set(bs2.keys())
- new_pkgs = pkgs2 - pkgs1
- deleted_pkgs = pkgs1 - pkgs2
-
- echanged = []
- vchanged = []
- rchanged = []
- unchanged = []
- common_pkgs = pkgs2.intersection(pkgs1)
- if common_pkgs:
- for pkg in common_pkgs:
- if bs1[pkg]['epoch'] != bs2[pkg]['epoch']:
- echanged.append(pkg)
- elif bs1[pkg]['version'] != bs2[pkg]['version']:
- vchanged.append(pkg)
- elif bs1[pkg]['revision'] != bs2[pkg]['revision']:
- rchanged.append(pkg)
- else:
- unchanged.append(pkg)
- maxlen = max([len(pkg) for pkg in pkgs1.union(pkgs2)])
+ diff = BSVerDiff(bs1, bs2)
+
+ maxlen = max([len(r) for r in set(bs1.keys()).union(set(bs2.keys()))])
fmt_str = " {:{maxlen}} ({})"
-# if unchanged:
-# print("\nUNCHANGED PACKAGES:")
-# print("-------------------")
-# maxlen = max([len(pkg) for pkg in unchanged])
-# for pkg in sorted(unchanged):
-# print(fmt_str.format(pkg, bs2[pkg]['nevr'], maxlen=maxlen))
-
- if new_pkgs:
- print("\nNEW PACKAGES:")
- print("-------------")
- for pkg in sorted(new_pkgs):
- print(fmt_str.format(pkg, bs2[pkg]['nevr'], maxlen=maxlen))
-
- if deleted_pkgs:
- print("\nDELETED PACKAGES:")
- print("-----------------")
- for pkg in sorted(deleted_pkgs):
- print(fmt_str.format(pkg, bs1[pkg]['nevr'], maxlen=maxlen))
+
+ if diff.new:
+ print("\nNEW RECIPES:")
+ print("------------")
+ for name, val in sorted(diff.new.items()):
+ print(fmt_str.format(name, val.nevr, maxlen=maxlen))
+
+ if diff.dropped:
+ print("\nDROPPED RECIPES:")
+ print("----------------")
+ for name, val in sorted(diff.dropped.items()):
+ print(fmt_str.format(name, val.nevr, maxlen=maxlen))
fmt_str = " {0:{maxlen}} {1:<20} ({2})"
- if rchanged:
+ if diff.rchanged:
print("\nREVISION CHANGED:")
print("-----------------")
- for pkg in sorted(rchanged):
- field1 = "{} -> {}".format(pkg, bs1[pkg]['revision'], bs2[pkg]['revision'])
- field2 = "{} -> {}".format(bs1[pkg]['nevr'], bs2[pkg]['nevr'])
- print(fmt_str.format(pkg, field1, field2, maxlen=maxlen))
+ for name, val in sorted(diff.rchanged.items()):
+ field1 = "{} -> {}".format(val.left.revision, val.right.revision)
+ field2 = "{} -> {}".format(val.left.nevr, val.right.nevr)
+ print(fmt_str.format(name, field1, field2, maxlen=maxlen))
- if vchanged:
+ if diff.vchanged:
print("\nVERSION CHANGED:")
print("----------------")
- for pkg in sorted(vchanged):
- field1 = "{} -> {}".format(bs1[pkg]['version'], bs2[pkg]['version'])
- field2 = "{} -> {}".format(bs1[pkg]['nevr'], bs2[pkg]['nevr'])
- print(fmt_str.format(pkg, field1, field2, maxlen=maxlen))
+ for name, val in sorted(diff.vchanged.items()):
+ field1 = "{} -> {}".format(val.left.version, val.right.version)
+ field2 = "{} -> {}".format(val.left.nevr, val.right.nevr)
+ print(fmt_str.format(name, field1, field2, maxlen=maxlen))
- if echanged:
+ if diff.echanged:
print("\nEPOCH CHANGED:")
print("--------------")
- for pkg in sorted(echanged):
- field1 = "{} -> {}".format(pkg, bs1[pkg]['epoch'], bs2[pkg]['epoch'])
- field2 = "{} -> {}".format(bs1[pkg]['nevr'], bs2[pkg]['nevr'])
- print(fmt_str.format(pkg, field1, field2, maxlen=maxlen))
-
-
-def task_time(task):
- """Calculate sum of user and system time taken by a task"""
- cputime = task['rusage']['ru_stime'] + task['rusage']['ru_utime'] + \
- task['child_rusage']['ru_stime'] + task['child_rusage']['ru_utime']
- return cputime
+ for name, val in sorted(diff.echanged.items()):
+ field1 = "{} -> {}".format(val.left.epoch, val.right.epoch)
+ field2 = "{} -> {}".format(val.left.nevr, val.right.nevr)
+ print(fmt_str.format(name, field1, field2, maxlen=maxlen))
-def print_task_diff(bs1, bs2, min_cputime=0, min_timediff=0, sort_by=('absdiff',)):
+def print_task_diff(bs1, bs2, val_type, min_val=0, min_absdiff=0, sort_by=('absdiff',), only_tasks=[]):
"""Diff task execution times"""
- tasks_diff = []
- pkg_maxlen = 0
- task_maxlen = 0
-
- pkgs = set(bs1.keys()).union(set(bs2.keys()))
- for pkg in pkgs:
- if len(pkg) > pkg_maxlen:
- pkg_maxlen = len(pkg)
- tasks1 = bs1[pkg]['tasks'] if pkg in bs1 else {}
- tasks2 = bs2[pkg]['tasks'] if pkg in bs2 else {}
- if not tasks1:
- pkg_op = '+ '
- elif not tasks2:
- pkg_op = '- '
- else:
- pkg_op = ' '
-
- for task in set(tasks1.keys()).union(set(tasks2.keys())):
- if len(task) > task_maxlen:
- task_maxlen = len(task)
-
- t1 = task_time(bs1[pkg]['tasks'][task]) if task in tasks1 else 0
- t2 = task_time(bs2[pkg]['tasks'][task]) if task in tasks2 else 0
- task_op = ' '
- if t1 == 0:
- reldiff = float('inf')
- task_op = '+ '
+ def val_to_str(val, human_readable=False):
+ """Convert raw value to printable string"""
+ def hms_time(secs):
+ """Get time in human-readable HH:MM:SS format"""
+ h = int(secs / 3600)
+ m = int((secs % 3600) / 60)
+ s = secs % 60
+ if h == 0:
+ return "{:02d}:{:04.1f}".format(m, s)
else:
- reldiff = 100 * (t2 - t1) / t1
- if t2 == 0:
- task_op = '- '
+ return "{:d}:{:02d}:{:04.1f}".format(h, m, s)
- tasks_diff.append(TaskDiff(pkg, pkg_op, task, task_op, t1, t2, t2-t1, reldiff))
+ if 'time' in val_type:
+ if human_readable:
+ return hms_time(val)
+ else:
+ return "{:.1f}s".format(val)
+ elif 'bytes' in val_type and human_readable:
+ prefix = ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi']
+ dec = int(math.log(val, 2) / 10)
+ prec = 1 if dec > 0 else 0
+ return "{:.{prec}f}{}B".format(val / (2 ** (10 * dec)),
+ prefix[dec], prec=prec)
+ elif 'ops' in val_type and human_readable:
+ prefix = ['', 'k', 'M', 'G', 'T', 'P']
+ dec = int(math.log(val, 1000))
+ prec = 1 if dec > 0 else 0
+ return "{:.{prec}f}{}ops".format(val / (1000 ** dec),
+ prefix[dec], prec=prec)
+ return str(int(val))
+
+ def sum_vals(buildstats):
+ """Get cumulative sum of all tasks"""
+ total = 0.0
+ for recipe_data in buildstats.values():
+ for name, bs_task in recipe_data.tasks.items():
+ if not only_tasks or name in only_tasks:
+ total += getattr(bs_task, val_type)
+ return total
- if min_cputime:
- print("Ignoring tasks shorter than {}s".format(min_cputime))
- if min_timediff:
- print("Ignoring time differences shorter than {}s".format(min_timediff))
+ if min_val:
+ print("Ignoring tasks less than {} ({})".format(
+ val_to_str(min_val, True), val_to_str(min_val)))
+ if min_absdiff:
+ print("Ignoring differences less than {} ({})".format(
+ val_to_str(min_absdiff, True), val_to_str(min_absdiff)))
- print()
- print(" {:{pkg_maxlen}} {:{task_maxlen}} {:>8} {:>10} {:>10} {}".format(
- 'PKG', 'TASK', 'ABSDIFF', 'RELDIFF', 'CPUTIME1', 'CPUTIME2',
- pkg_maxlen=pkg_maxlen, task_maxlen=task_maxlen))
+ # Prepare the data
+ tasks_diff = diff_buildstats(bs1, bs2, val_type, min_val, min_absdiff, only_tasks)
# Sort our list
for field in reversed(sort_by):
@@ -312,46 +175,37 @@ def print_task_diff(bs1, bs2, min_cputime=0, min_timediff=0, sort_by=('absdiff',
reverse = False
tasks_diff = sorted(tasks_diff, key=attrgetter(field), reverse=reverse)
- for diff in tasks_diff:
- cputime = max(diff.cputime1, diff.cputime2)
- if cputime > min_cputime:
- if abs(diff.absdiff) > min_timediff:
- task_prefix = diff.task_op if diff.pkg_op == ' ' else ' '
- print("{}{:{pkg_maxlen}} {}{:{task_maxlen}} {:+7.1f}s {:+9.1f}% {:9.1f}s -> {:.1f}s".format(
- diff.pkg_op, diff.pkg, task_prefix, diff.task, diff.absdiff, diff.reldiff, diff.cputime1, diff.cputime2,
- pkg_maxlen=pkg_maxlen, task_maxlen=task_maxlen))
- else:
- log.debug("Filtering out %s (difference of %0.1fs)", task, diff.absdiff)
- else:
- log.debug("Filtering out %s (%0.1fs)", task, cputime)
-
-
-def print_timediff_summary(bs1, bs2):
- """Print summary of the timediffs"""
- def total_cputime(buildstats):
- sum = 0.0
- for recipe_data in buildstats.values():
- for task_data in recipe_data['tasks'].values():
- sum += task_time(task_data)
- return sum
-
- def hms_time(secs):
- """Get time in human-readable HH:MM:SS format"""
- h = int(secs / 3600)
- m = int((secs % 3600) / 60)
- s = secs % 60
- if h == 0:
- return "{:02d}:{:04.1f}".format(m, s)
- else:
- return "{:d}:{:02d}:{:04.1f}".format(h, m, s)
+ linedata = [(' ', 'PKG', ' ', 'TASK', 'ABSDIFF', 'RELDIFF',
+ val_type.upper() + '1', val_type.upper() + '2')]
+ field_lens = dict([('len_{}'.format(i), len(f)) for i, f in enumerate(linedata[0])])
- total1 = total_cputime(bs1)
- total2 = total_cputime(bs2)
- print("\nCumulative CPU Time:")
- print (" {:+.1f}s {:+.1f}% {} ({:.1f}s) -> {} ({:.1f}s)".format(
- total2 - total1, 100 * (total2-total1) / total1,
- hms_time(total1), total1, hms_time(total2), total2))
+ # Prepare fields in string format and measure field lengths
+ for diff in tasks_diff:
+ task_prefix = diff.task_op if diff.pkg_op == ' ' else ' '
+ linedata.append((diff.pkg_op, diff.pkg, task_prefix, diff.task,
+ val_to_str(diff.absdiff),
+ '{:+.1f}%'.format(diff.reldiff),
+ val_to_str(diff.value1),
+ val_to_str(diff.value2)))
+ for i, field in enumerate(linedata[-1]):
+ key = 'len_{}'.format(i)
+ if len(field) > field_lens[key]:
+ field_lens[key] = len(field)
+
+ # Print data
+ print()
+ for fields in linedata:
+ print("{:{len_0}}{:{len_1}} {:{len_2}}{:{len_3}} {:>{len_4}} {:>{len_5}} {:>{len_6}} -> {:{len_7}}".format(
+ *fields, **field_lens))
+ # Print summary of the diffs
+ total1 = sum_vals(bs1)
+ total2 = sum_vals(bs2)
+ print("\nCumulative {}:".format(val_type))
+ print (" {} {:+.1f}% {} ({}) -> {} ({})".format(
+ val_to_str(total2 - total1), 100 * (total2-total1) / total1,
+ val_to_str(total1, True), val_to_str(total1),
+ val_to_str(total2, True), val_to_str(total2)))
def parse_args(argv):
@@ -362,23 +216,58 @@ Script for comparing buildstats of two separate builds."""
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description=description)
+ min_val_defaults = {'cputime': 3.0,
+ 'read_bytes': 524288,
+ 'write_bytes': 524288,
+ 'read_ops': 500,
+ 'write_ops': 500,
+ 'walltime': 5}
+ min_absdiff_defaults = {'cputime': 1.0,
+ 'read_bytes': 131072,
+ 'write_bytes': 131072,
+ 'read_ops': 50,
+ 'write_ops': 50,
+ 'walltime': 2}
+
parser.add_argument('--debug', '-d', action='store_true',
help="Verbose logging")
parser.add_argument('--ver-diff', action='store_true',
help="Show package version differences and exit")
- parser.add_argument('--min-time', default=3.0, type=float,
- help="Filter out tasks shorter than MIN_TIME seconds")
- parser.add_argument('--min-timediff', default=1.0, type=float,
- help="Filter out tasks whose difference in cputime is "
- "less that MIN_TIMEDIFF seconds")
+ parser.add_argument('--diff-attr', default='cputime',
+ choices=min_val_defaults.keys(),
+ help="Buildstat attribute which to compare")
+ parser.add_argument('--min-val', default=min_val_defaults, type=float,
+ help="Filter out tasks less than MIN_VAL. "
+ "Default depends on --diff-attr.")
+ parser.add_argument('--min-absdiff', default=min_absdiff_defaults, type=float,
+ help="Filter out tasks whose difference is less than "
+ "MIN_ABSDIFF, Default depends on --diff-attr.")
parser.add_argument('--sort-by', default='absdiff',
help="Comma-separated list of field sort order. "
"Prepend the field name with '-' for reversed sort. "
"Available fields are: {}".format(', '.join(taskdiff_fields)))
+ parser.add_argument('--multi', action='store_true',
+ help="Read all buildstats from the given paths and "
+ "average over them")
+ parser.add_argument('--only-task', dest='only_tasks', metavar='TASK', action='append', default=[],
+ help="Only include TASK in report. May be specified multiple times")
parser.add_argument('buildstats1', metavar='BUILDSTATS1', help="'Left' buildstat")
parser.add_argument('buildstats2', metavar='BUILDSTATS2', help="'Right' buildstat")
- return parser.parse_args(argv)
+ args = parser.parse_args(argv)
+
+ # We do not nedd/want to read all buildstats if we just want to look at the
+ # package versions
+ if args.ver_diff:
+ args.multi = False
+
+ # Handle defaults for the filter arguments
+ if args.min_val is min_val_defaults:
+ args.min_val = min_val_defaults[args.diff_attr]
+ if args.min_absdiff is min_absdiff_defaults:
+ args.min_absdiff = min_absdiff_defaults[args.diff_attr]
+
+ return args
def main(argv=None):
"""Script entry point"""
@@ -395,16 +284,18 @@ def main(argv=None):
sys.exit(1)
sort_by.append(field)
+ try:
+ bs1 = read_buildstats(args.buildstats1, args.multi)
+ bs2 = read_buildstats(args.buildstats2, args.multi)
- bs1 = read_buildstats(args.buildstats1)
- bs2 = read_buildstats(args.buildstats2)
-
- if args.ver_diff:
- print_ver_diff(bs1, bs2)
- else:
- print_task_diff(bs1, bs2, args.min_time, args.min_timediff, sort_by)
- print_timediff_summary(bs1, bs2)
-
+ if args.ver_diff:
+ print_ver_diff(bs1, bs2)
+ else:
+ print_task_diff(bs1, bs2, args.diff_attr, args.min_val,
+ args.min_absdiff, sort_by, args.only_tasks)
+ except ScriptError as err:
+ log.error(str(err))
+ return 1
return 0
if __name__ == "__main__":
diff --git a/scripts/cleanup-workdir b/scripts/cleanup-workdir
deleted file mode 100755
index 98769f6b32..0000000000
--- a/scripts/cleanup-workdir
+++ /dev/null
@@ -1,198 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2012 Wind River Systems, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-import os
-import sys
-import optparse
-import re
-import subprocess
-import shutil
-
-pkg_cur_dirs = {}
-obsolete_dirs = []
-parser = None
-
-def err_quit(msg):
- print(msg)
- parser.print_usage()
- sys.exit(1)
-
-def parse_version(verstr):
- elems = verstr.split(':')
- epoch = elems[0]
- if len(epoch) == 0:
- return elems[1]
- else:
- return epoch + '_' + elems[1]
-
-def run_command(cmd):
- pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
- output = pipe.communicate()[0]
- if pipe.returncode != 0:
- print("Execute command '%s' failed." % cmd)
- sys.exit(1)
- return output.decode('utf-8')
-
-def get_cur_arch_dirs(workdir, arch_dirs):
- pattern = workdir + '/(.*?)/'
-
- cmd = "bitbake -e | grep ^SDK_SYS="
- output = run_command(cmd)
- sdk_sys = output.split('"')[1]
-
- # select thest 5 packages to get the dirs of current arch
- pkgs = ['hicolor-icon-theme', 'base-files', 'acl-native', 'binutils-crosssdk-' + sdk_sys, 'nativesdk-autoconf']
-
- for pkg in pkgs:
- cmd = "bitbake -e " + pkg + " | grep ^IMAGE_ROOTFS="
- output = run_command(cmd)
- output = output.split('"')[1]
- m = re.match(pattern, output)
- arch_dirs.append(m.group(1))
-
-def main():
- global parser
- parser = optparse.OptionParser(
- usage = """%prog
-
-%prog removes the obsolete packages' build directories in WORKDIR.
-This script must be ran under BUILDDIR after source file \"oe-init-build-env\".
-
-Any file or directory under WORKDIR which is not created by Yocto
-will be deleted. Be CAUTIOUS.""")
-
- options, args = parser.parse_args(sys.argv)
-
- builddir = run_command('echo $BUILDDIR').strip()
- if len(builddir) == 0:
- err_quit("Please source file \"oe-init-build-env\" first.\n")
-
- if os.getcwd() != builddir:
- err_quit("Please run %s under: %s\n" % (os.path.basename(args[0]), builddir))
-
- print('Updating bitbake caches...')
- cmd = "bitbake -s"
- output = run_command(cmd)
-
- output = output.split('\n')
- index = 0
- while len(output[index]) > 0:
- index += 1
- alllines = output[index+1:]
-
- for line in alllines:
- # empty again means end of the versions output
- if len(line) == 0:
- break
- line = line.strip()
- line = re.sub('\s+', ' ', line)
- elems = line.split(' ')
- if len(elems) == 2:
- version = parse_version(elems[1])
- else:
- version = parse_version(elems[2])
- pkg_cur_dirs[elems[0]] = version
-
- cmd = "bitbake -e"
- output = run_command(cmd)
-
- tmpdir = None
- image_rootfs = None
- output = output.split('\n')
- for line in output:
- if tmpdir and image_rootfs:
- break
-
- if not tmpdir:
- m = re.match('TMPDIR="(.*)"', line)
- if m:
- tmpdir = m.group(1)
-
- if not image_rootfs:
- m = re.match('IMAGE_ROOTFS="(.*)"', line)
- if m:
- image_rootfs = m.group(1)
-
- # won't fail just in case
- if not tmpdir or not image_rootfs:
- print("Can't get TMPDIR or IMAGE_ROOTFS.")
- return 1
-
- pattern = tmpdir + '/(.*?)/(.*?)/'
- m = re.match(pattern, image_rootfs)
- if not m:
- print("Can't get WORKDIR.")
- return 1
-
- workdir = os.path.join(tmpdir, m.group(1))
-
- # we only deal the dirs of current arch, total numbers of dirs are 6
- cur_arch_dirs = [m.group(2)]
- get_cur_arch_dirs(workdir, cur_arch_dirs)
-
- for workroot, dirs, files in os.walk(workdir):
- # For the files, they should NOT exist in WORKDIR. Remove them.
- for f in files:
- obsolete_dirs.append(os.path.join(workroot, f))
-
- for d in dirs:
- if d not in cur_arch_dirs:
- continue
-
- for pkgroot, pkgdirs, filenames in os.walk(os.path.join(workroot, d)):
- for f in filenames:
- obsolete_dirs.append(os.path.join(pkgroot, f))
-
- for pkgdir in sorted(pkgdirs):
- if pkgdir not in pkg_cur_dirs:
- obsolete_dirs.append(os.path.join(pkgroot, pkgdir))
- else:
- for verroot, verdirs, verfiles in os.walk(os.path.join(pkgroot, pkgdir)):
- for f in verfiles:
- obsolete_dirs.append(os.path.join(pkgroot, f))
- for v in sorted(verdirs):
- if v not in pkg_cur_dirs[pkgdir]:
- obsolete_dirs.append(os.path.join(pkgroot, pkgdir, v))
- break
-
- # just process the top dir of every package under tmp/work/*/,
- # then jump out of the above os.walk()
- break
-
- # it is convenient to use os.walk() to get dirs and files at same time
- # both of them have been dealed in the loop, so jump out
- break
-
- for d in obsolete_dirs:
- print("Deleting %s" % d)
- shutil.rmtree(d, True)
-
- if len(obsolete_dirs):
- print('\nTotal %d items.' % len(obsolete_dirs))
- else:
- print('\nNo obsolete directory found under %s.' % workdir)
-
- return 0
-
-if __name__ == '__main__':
- try:
- ret = main()
- except Exception:
- ret = 2
- import traceback
- traceback.print_exc()
- sys.exit(ret)
diff --git a/scripts/combo-layer b/scripts/combo-layer
index b90bfc8800..9b50e9873d 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -7,18 +7,8 @@
# Paul Eggleton <paul.eggleton@intel.com>
# Richard Purdie <richard.purdie@intel.com>
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import fnmatch
import os, sys
@@ -246,7 +236,7 @@ def action_init(conf, args):
# traditional behavior from "git archive" (preserved
# here) it to choose the first one. This might not be
# intended, so at least warn about it.
- logger.warn("%s: initial revision '%s' not unique, picking result of rev-parse = %s" %
+ logger.warning("%s: initial revision '%s' not unique, picking result of rev-parse = %s" %
(name, initialrev, refs[0]))
initialrev = rev
except:
@@ -294,6 +284,8 @@ def action_init(conf, args):
# again. Uses the list of files created by tar (easier
# than walking the tree).
for file in files.split('\n'):
+ if file.endswith(os.path.sep):
+ continue
for pattern in exclude_patterns:
if fnmatch.fnmatch(file, pattern):
os.unlink(os.path.join(*([extract_dir] + ['..'] * subdir_components + [file])))
@@ -329,7 +321,7 @@ def action_init(conf, args):
# one. The commit should be in both repos with
# the same tree, but better check here.
tree = runcmd('git show -s --pretty=format:%%T %s' % rev).strip()
- with tempfile.NamedTemporaryFile() as editor:
+ with tempfile.NamedTemporaryFile(mode='wt') as editor:
editor.write('''cat >$1 <<EOF
tree %s
author %s
@@ -353,7 +345,7 @@ EOF
# Optional: rewrite history to change commit messages or to move files.
if 'hook' in repo or dest_dir != ".":
filter_branch = ['git', 'filter-branch', '--force']
- with tempfile.NamedTemporaryFile() as hookwrapper:
+ with tempfile.NamedTemporaryFile(mode='wt') as hookwrapper:
if 'hook' in repo:
# Create a shell script wrapper around the original hook that
# can be used by git filter-branch. Hook may or may not have
@@ -426,7 +418,7 @@ file_exclude = %s''' % (name, file_filter or '<empty>', repo.get('file_exclude',
merge.append(name)
# Root all commits which have no parent in the common
# ancestor in the new repository.
- for start in runcmd('git log --pretty=format:%%H --max-parents=0 %s' % name).split('\n'):
+ for start in runcmd('git log --pretty=format:%%H --max-parents=0 %s --' % name).split('\n'):
runcmd('git replace --graft %s %s' % (start, startrev))
try:
runcmd(merge)
@@ -1137,7 +1129,7 @@ def update_with_history(conf, components, revisions, repos):
if hook:
# Need to turn the verbatim commit message into something resembling a patch header
# for the hook.
- with tempfile.NamedTemporaryFile(delete=False) as patch:
+ with tempfile.NamedTemporaryFile(mode='wt', delete=False) as patch:
patch.write('Subject: [PATCH] ')
patch.write(body)
patch.write('\n---\n')
diff --git a/scripts/combo-layer-hook-default.sh b/scripts/combo-layer-hook-default.sh
index 1e3a3b9bc8..11547a9826 100755
--- a/scripts/combo-layer-hook-default.sh
+++ b/scripts/combo-layer-hook-default.sh
@@ -1,4 +1,7 @@
#!/bin/sh
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Hook to add source component/revision info to commit message
# Parameter:
# $1 patch-file
diff --git a/scripts/contrib/bb-perf/bb-matrix-plot.sh b/scripts/contrib/bb-perf/bb-matrix-plot.sh
index 136a25570d..e7bd129e9e 100755
--- a/scripts/contrib/bb-perf/bb-matrix-plot.sh
+++ b/scripts/contrib/bb-perf/bb-matrix-plot.sh
@@ -1,21 +1,8 @@
#!/bin/bash
#
# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# DESCRIPTION
# This script operates on the .dat file generated by bb-matrix.sh. It tolerates
diff --git a/scripts/contrib/bb-perf/bb-matrix.sh b/scripts/contrib/bb-perf/bb-matrix.sh
index 106456584d..b1fff0f344 100755
--- a/scripts/contrib/bb-perf/bb-matrix.sh
+++ b/scripts/contrib/bb-perf/bb-matrix.sh
@@ -1,21 +1,8 @@
#!/bin/bash
#
# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# DESCRIPTION
# This script runs BB_CMD (typically building core-image-sato) for all
diff --git a/scripts/contrib/bb-perf/buildstats-plot.sh b/scripts/contrib/bb-perf/buildstats-plot.sh
new file mode 100755
index 0000000000..898834e5ac
--- /dev/null
+++ b/scripts/contrib/bb-perf/buildstats-plot.sh
@@ -0,0 +1,144 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2011, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# DESCRIPTION
+#
+# Produces script data to be consumed by gnuplot. There are two possible plots
+# depending if either the -S parameter is present or not:
+#
+# * without -S: Produces a histogram listing top N recipes/tasks versus
+# stats. The first stat defined in the -s parameter is the one taken
+# into account for ranking
+# * -S: Produces a histogram listing tasks versus stats. In this case,
+# the value of each stat is the sum for that particular stat in all recipes found.
+# Stats values are in descending order defined by the first stat defined on -s
+#
+# EXAMPLES
+#
+# 1. Top recipes' tasks taking into account utime
+#
+# $ buildstats-plot.sh -s utime | gnuplot -p
+#
+# 2. Tasks versus utime:stime
+#
+# $ buildstats-plot.sh -s utime:stime -S | gnuplot -p
+#
+# 3. Tasks versus IO write_bytes:IO read_bytes
+#
+# $ buildstats-plot.sh -s 'IO write_bytes:IO read_bytes' -S | gnuplot -p
+#
+# AUTHORS
+# Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
+#
+
+set -o nounset
+set -o errexit
+
+BS_DIR="tmp/buildstats"
+N=10
+STATS="utime"
+SUM=""
+OUTDATA_FILE="$PWD/buildstats-plot.out"
+
+function usage {
+ CMD=$(basename $0)
+ cat <<EOM
+Usage: $CMD [-b buildstats_dir] [-t do_task]
+ -b buildstats The path where the folder resides
+ (default: "$BS_DIR")
+ -n N Top N recipes to display. Ignored if -S is present
+ (default: "$N")
+ -s stats The stats to be matched. If more that one stat, units
+ should be the same because data is plot as histogram.
+ (see buildstats.sh -h for all options) or any other defined
+ (build)stat separated by colons, i.e. stime:utime
+ (default: "$STATS")
+ -S Sum values for a particular stat for found recipes
+ -o Output data file.
+ (default: "$OUTDATA_FILE")
+ -h Display this help message
+EOM
+}
+
+# Parse and validate arguments
+while getopts "b:n:s:o:Sh" OPT; do
+ case $OPT in
+ b)
+ BS_DIR="$OPTARG"
+ ;;
+ n)
+ N="$OPTARG"
+ ;;
+ s)
+ STATS="$OPTARG"
+ ;;
+ S)
+ SUM="y"
+ ;;
+ o)
+ OUTDATA_FILE="$OPTARG"
+ ;;
+ h)
+ usage
+ exit 0
+ ;;
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+done
+
+# Get number of stats
+IFS=':'; statsarray=(${STATS}); unset IFS
+nstats=${#statsarray[@]}
+
+# Get script folder, use to run buildstats.sh
+CD=$(dirname $0)
+
+# Parse buildstats recipes to produce a single table
+OUTBUILDSTATS="$PWD/buildstats.log"
+$CD/buildstats.sh -H -s "$STATS" -H > $OUTBUILDSTATS
+
+# Get headers
+HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp')
+
+echo -e "set boxwidth 0.9 relative"
+echo -e "set style data histograms"
+echo -e "set style fill solid 1.0 border lt -1"
+echo -e "set xtics rotate by 45 right"
+
+# Get output data
+if [ -z "$SUM" ]; then
+ cat $OUTBUILDSTATS | sed -e '1d' | sort -k3 -n -r | head -$N > $OUTDATA_FILE
+ # include task at recipe column
+ sed -i -e "1i\
+${HEADERS}" $OUTDATA_FILE
+ echo -e "set title \"Top task/recipes\""
+ echo -e "plot for [COL=3:`expr 3 + ${nstats} - 1`] '${OUTDATA_FILE}' using COL:xtic(stringcolumn(1).' '.stringcolumn(2)) title columnheader(COL)"
+else
+
+ # Construct datatamash sum argument (sum 3 sum 4 ...)
+ declare -a sumargs
+ j=0
+ for i in `seq $nstats`; do
+ sumargs[j]=sum; j=$(( $j + 1 ))
+ sumargs[j]=`expr 3 + $i - 1`; j=$(( $j + 1 ))
+ done
+
+ # Do the processing with datamash
+ cat $OUTBUILDSTATS | sed -e '1d' | datamash -t ' ' -g1 ${sumargs[*]} | sort -k2 -n -r > $OUTDATA_FILE
+
+ # Include headers into resulted file, so we can include gnuplot xtics
+ HEADERS=$(echo $HEADERS | sed -e 's/recipe//1')
+ sed -i -e "1i\
+${HEADERS}" $OUTDATA_FILE
+
+ # Plot
+ echo -e "set title \"Sum stats values per task for all recipes\""
+ echo -e "plot for [COL=2:`expr 2 + ${nstats} - 1`] '${OUTDATA_FILE}' using COL:xtic(1) title columnheader(COL)"
+fi
+
diff --git a/scripts/contrib/bb-perf/buildstats.sh b/scripts/contrib/bb-perf/buildstats.sh
index 96158a9650..e9ec2d476a 100755
--- a/scripts/contrib/bb-perf/buildstats.sh
+++ b/scripts/contrib/bb-perf/buildstats.sh
@@ -1,41 +1,44 @@
#!/bin/bash
#
# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# DESCRIPTION
-# Given a 'buildstats' path (created by bitbake when setting
-# USER_CLASSES ?= "buildstats" on local.conf) and task names, outputs
-# '<task> <recipe> <elapsed time>' for all recipes. Elapsed times are in
-# seconds, and task should be given without the 'do_' prefix.
+# Given 'buildstats' data (generate by bitbake when setting
+# USER_CLASSES ?= "buildstats" on local.conf), task names and a stats values
+# (these are the ones preset on the buildstats files), outputs
+# '<task> <recipe> <value_1> <value_2> ... <value_n>'. The units are the ones
+# defined at buildstats, which in turn takes data from /proc/[pid] files
#
# Some useful pipelines
#
-# 1. Tasks with largest elapsed times
-# $ buildstats.sh -b <buildstats> | sort -k3 -n -r | head
+# 1. Tasks with largest stime (Amount of time that this process has been scheduled
+# in kernel mode) values
+# $ buildstats.sh -b <buildstats> -s stime | sort -k3 -n -r | head
#
-# 2. Min, max, sum per task (in needs GNU datamash)
-# $ buildstats.sh -b <buildstats> | datamash -t' ' -g1 min 3 max 3 sum 3 | sort -k4 -n -r
+# 2. Min, max, sum utime (Amount of time that this process has been scheduled
+# in user mode) per task (in needs GNU datamash)
+# $ buildstats.sh -b <buildstats> -s utime | datamash -t' ' -g1 min 3 max 3 sum 3 | sort -k4 -n -r
#
# AUTHORS
# Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
#
+
+# Stats, by type
+TIME="utime:stime:cutime:cstime"
+IO="IO wchar:IO write_bytes:IO syscr:IO read_bytes:IO rchar:IO syscw:IO cancelled_write_bytes"
+RUSAGE="rusage ru_utime:rusage ru_stime:rusage ru_maxrss:rusage ru_minflt:rusage ru_majflt:\
+rusage ru_inblock:rusage ru_oublock:rusage ru_nvcsw:rusage ru_nivcsw"
+
+CHILD_RUSAGE="Child rusage ru_utime:Child rusage ru_stime:Child rusage ru_maxrss:Child rusage ru_minflt:\
+Child rusage ru_majflt:Child rusage ru_inblock:Child rusage ru_oublock:Child rusage ru_nvcsw:\
+Child rusage ru_nivcsw"
+
BS_DIR="tmp/buildstats"
TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack"
+STATS="$TIME"
+HEADER="" # No header by default
function usage {
CMD=$(basename $0)
@@ -45,12 +48,20 @@ Usage: $CMD [-b buildstats_dir] [-t do_task]
(default: "$BS_DIR")
-t tasks The tasks to be computed
(default: "$TASKS")
+ -s stats The stats to be matched. Options: TIME, IO, RUSAGE, CHILD_RUSAGE
+ or any other defined buildstat separated by colons, i.e. stime:utime
+ (default: "$STATS")
+ Default stat sets:
+ TIME=$TIME
+ IO=$IO
+ RUSAGE=$RUSAGE
+ CHILD_RUSAGE=$CHILD_RUSAGE
-h Display this help message
EOM
}
# Parse and validate arguments
-while getopts "b:t:h" OPT; do
+while getopts "b:t:s:Hh" OPT; do
case $OPT in
b)
BS_DIR="$OPTARG"
@@ -58,6 +69,12 @@ while getopts "b:t:h" OPT; do
t)
TASKS="$OPTARG"
;;
+ s)
+ STATS="$OPTARG"
+ ;;
+ H)
+ HEADER="y"
+ ;;
h)
usage
exit 0
@@ -76,15 +93,50 @@ if [ ! -d "$BS_DIR" ]; then
exit 1
fi
-RECIPE_FIELD=1
-TIME_FIELD=4
+stats=""
+IFS=":"
+for stat in ${STATS}; do
+ case $stat in
+ TIME)
+ stats="${stats}:${TIME}"
+ ;;
+ IO)
+ stats="${stats}:${IO}"
+ ;;
+ RUSAGE)
+ stats="${stats}:${RUSAGE}"
+ ;;
+ CHILD_RUSAGE)
+ stats="${stats}:${CHILD_RUSAGE}"
+ ;;
+ *)
+ stats="${STATS}"
+ esac
+done
+
+# remove possible colon at the beginning
+stats="$(echo "$stats" | sed -e 's/^://1')"
+
+# Provide a header if required by the user
+[ -n "$HEADER" ] && { echo "task:recipe:$stats"; }
-tasks=(${TASKS//:/ })
-for task in "${tasks[@]}"; do
+for task in ${TASKS}; do
task="do_${task}"
- for file in $(find ${BS_DIR} -type f -name ${task}); do
- recipe=$(sed -n -e "/$task/p" ${file} | cut -d ':' -f${RECIPE_FIELD})
- time=$(sed -n -e "/$task/p" ${file} | cut -d ':' -f${TIME_FIELD} | cut -d ' ' -f2)
- echo "${task} ${recipe} ${time}"
+ for file in $(find ${BS_DIR} -type f -name ${task} | awk 'BEGIN{ ORS=""; OFS=":" } { print $0,"" }'); do
+ recipe="$(basename $(dirname $file))"
+ times=""
+ for stat in ${stats}; do
+ [ -z "$stat" ] && { echo "empty stats"; }
+ time=$(sed -n -e "s/^\($stat\): \\(.*\\)/\\2/p" $file)
+ # in case the stat is not present, set the value as NA
+ [ -z "$time" ] && { time="NA"; }
+ # Append it to times
+ if [ -z "$times" ]; then
+ times="${time}"
+ else
+ times="${times} ${time}"
+ fi
+ done
+ echo "${task} ${recipe} ${times}"
done
done
diff --git a/scripts/contrib/bbvars.py b/scripts/contrib/bbvars.py
index d8d0594776..090133600b 100755
--- a/scripts/contrib/bbvars.py
+++ b/scripts/contrib/bbvars.py
@@ -1,18 +1,6 @@
#!/usr/bin/env python3
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) Darren Hart <dvhart@linux.intel.com>, 2010
@@ -23,62 +11,38 @@ import os
import os.path
import re
+# Set up sys.path to let us import tinfoil
+scripts_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+lib_path = scripts_path + '/lib'
+sys.path.insert(0, lib_path)
+import scriptpath
+scriptpath.add_bitbake_lib_path()
+import bb.tinfoil
+
def usage():
- print('Usage: %s -d FILENAME [-d FILENAME]* -m METADIR [-m MATADIR]*' % os.path.basename(sys.argv[0]))
+ print('Usage: %s -d FILENAME [-d FILENAME]*' % os.path.basename(sys.argv[0]))
print(' -d FILENAME documentation file to search')
print(' -h, --help display this help and exit')
- print(' -m METADIR meta directory to search for recipes')
print(' -t FILENAME documentation config file (for doc tags)')
print(' -T Only display variables with doc tags (requires -t)')
-def recipe_bbvars(recipe):
- ''' Return a unique set of every bbvar encountered in the recipe '''
- prog = re.compile("[A-Z_]+")
- vset = set()
- try:
- r = open(recipe)
- except IOError as err:
- print('WARNING: Failed to open recipe ', recipe)
- print(err.args[1])
-
- for line in r:
- # Strip any comments from the line
- line = line.rsplit('#')[0]
- vset = vset.union(set(prog.findall(line)))
- r.close()
-
- bbvars = {}
- for v in vset:
- bbvars[v] = 1
-
- return bbvars
-
-def collect_bbvars(metadir):
- ''' Walk the metadir and collect the bbvars from each recipe found '''
- bbvars = {}
- for root,dirs,files in os.walk(metadir):
- for name in files:
- if name.find(".bb") >= 0:
- for key in recipe_bbvars(os.path.join(root,name)).keys():
- if key in bbvars:
- bbvars[key] = bbvars[key] + 1
- else:
- bbvars[key] = 1
- return bbvars
-
-def bbvar_is_documented(var, docfiles):
- prog = re.compile(".*($|[^A-Z_])%s([^A-Z_]|$)" % (var))
- for doc in docfiles:
- try:
- f = open(doc)
- except IOError as err:
- print('WARNING: Failed to open doc ', doc)
- print(err.args[1])
- for line in f:
- if prog.match(line):
- return True
- f.close()
- return False
+def bbvar_is_documented(var, documented_vars):
+ ''' Check if variable (var) is in the list of documented variables(documented_vars) '''
+ if var in documented_vars:
+ return True
+ else:
+ return False
+
+def collect_documented_vars(docfiles):
+ ''' Walk the docfiles and collect the documented variables '''
+ documented_vars = []
+ prog = re.compile(".*($|[^A-Z_])<glossentry id=\'var-")
+ var_prog = re.compile('<glossentry id=\'var-(.*)\'>')
+ for d in docfiles:
+ with open(d) as f:
+ documented_vars += var_prog.findall(f.read())
+
+ return documented_vars
def bbvar_doctag(var, docconf):
prog = re.compile('^%s\[doc\] *= *"(.*)"' % (var))
@@ -100,8 +64,7 @@ def bbvar_doctag(var, docconf):
def main():
docfiles = []
- metadirs = []
- bbvars = {}
+ bbvars = set()
undocumented = []
docconf = ""
onlydoctags = False
@@ -124,12 +87,6 @@ def main():
else:
print('ERROR: documentation file %s is not a regular file' % a)
sys.exit(3)
- elif o == '-m':
- if os.path.isdir(a):
- metadirs.append(a)
- else:
- print('ERROR: meta directory %s is not a directory' % a)
- sys.exit(4)
elif o == "-t":
if os.path.isfile(a):
docconf = a
@@ -143,43 +100,68 @@ def main():
usage()
sys.exit(5)
- if len(metadirs) == 0:
- print('ERROR: no metadir specified')
- usage()
- sys.exit(6)
-
if onlydoctags and docconf == "":
print('ERROR: no docconf specified')
usage()
sys.exit(7)
- # Collect all the variable names from the recipes in the metadirs
- for m in metadirs:
- for key,cnt in collect_bbvars(m).items():
- if key in bbvars:
- bbvars[key] = bbvars[key] + cnt
+ prog = re.compile("^[^a-z]*$")
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=False)
+ parser = bb.codeparser.PythonParser('parser', None)
+ datastore = tinfoil.config_data
+
+ def bbvars_update(data):
+ if prog.match(data):
+ bbvars.add(data)
+ if tinfoil.config_data.getVarFlag(data, 'python'):
+ try:
+ parser.parse_python(tinfoil.config_data.getVar(data))
+ except bb.data_smart.ExpansionError:
+ pass
+ for var in parser.references:
+ if prog.match(var):
+ bbvars.add(var)
else:
- bbvars[key] = cnt
+ try:
+ expandedVar = datastore.expandWithRefs(datastore.getVar(data, False), data)
+ for var in expandedVar.references:
+ if prog.match(var):
+ bbvars.add(var)
+ except bb.data_smart.ExpansionError:
+ pass
+
+ # Use tinfoil to collect all the variable names globally
+ for data in datastore:
+ bbvars_update(data)
+
+ # Collect variables from all recipes
+ for recipe in tinfoil.all_recipe_files(variants=False):
+ print("Checking %s" % recipe)
+ for data in tinfoil.parse_recipe_file(recipe):
+ bbvars_update(data)
+
+ documented_vars = collect_documented_vars(docfiles)
# Check each var for documentation
varlen = 0
- for v in bbvars.keys():
+ for v in bbvars:
if len(v) > varlen:
varlen = len(v)
- if not bbvar_is_documented(v, docfiles):
+ if not bbvar_is_documented(v, documented_vars):
undocumented.append(v)
undocumented.sort()
varlen = varlen + 1
# Report all undocumented variables
print('Found %d undocumented bb variables (out of %d):' % (len(undocumented), len(bbvars)))
- header = '%s%s%s' % (str("VARIABLE").ljust(varlen), str("COUNT").ljust(6), str("DOCTAG").ljust(7))
+ header = '%s%s' % (str("VARIABLE").ljust(varlen), str("DOCTAG").ljust(7))
print(header)
print(str("").ljust(len(header), '='))
for v in undocumented:
doctag = bbvar_doctag(v, docconf)
if not onlydoctags or not doctag == "":
- print('%s%s%s' % (v.ljust(varlen), str(bbvars[v]).ljust(6), doctag))
+ print('%s%s' % (v.ljust(varlen), doctag))
if __name__ == "__main__":
diff --git a/scripts/contrib/build-perf-test-wrapper.sh b/scripts/contrib/build-perf-test-wrapper.sh
index d61e438933..fa71d4a2e9 100755
--- a/scripts/contrib/build-perf-test-wrapper.sh
+++ b/scripts/contrib/build-perf-test-wrapper.sh
@@ -4,21 +4,16 @@
#
# Copyright (c) 2016, Intel Corporation.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-#
-# This program is distributed in the hope 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.
-#
+# SPDX-License-Identifier: GPL-2.0-only
#
# This script is a simple wrapper around the actual build performance tester
# script. This script initializes the build environment, runs
# oe-build-perf-test and archives the results.
script=`basename $0`
+script_dir=$(realpath $(dirname $0))
+archive_dir=~/perf-results/archives
+
usage () {
cat << EOF
Usage: $script [-h] [-c COMMITISH] [-C GIT_REPO]
@@ -26,30 +21,57 @@ Usage: $script [-h] [-c COMMITISH] [-C GIT_REPO]
Optional arguments:
-h show this help and exit.
-a ARCHIVE_DIR archive results tarball here, give an empty string to
- disable tarball archiving
- -c COMMITISH test (checkout) this commit
+ disable tarball archiving (default: $archive_dir)
+ -c COMMITISH test (checkout) this commit, <branch>:<commit> can be
+ specified to test specific commit of certain branch
-C GIT_REPO commit results into Git
+ -d DOWNLOAD_DIR directory to store downloaded sources in
+ -E EMAIL_ADDR send email report
+ -g GLOBALRES_DIR where to place the globalres file
+ -P GIT_REMOTE push results to a remote Git repository
+ -R DEST rsync reports to a remote destination
-w WORK_DIR work dir for this script
+ (default: GIT_TOP_DIR/build-perf-test)
+ -x create xml report (instead of json)
EOF
}
+get_os_release_var () {
+ ( source /etc/os-release; eval echo '$'$1 )
+}
+
# Parse command line arguments
-archive_dir=~/perf-results/archives
commitish=""
-while getopts "ha:c:C:w:" opt; do
+oe_build_perf_test_extra_opts=()
+oe_git_archive_extra_opts=()
+while getopts "ha:c:C:d:E:g:P:R:w:x" opt; do
case $opt in
h) usage
exit 0
;;
- a) archive_dir=`realpath "$OPTARG"`
+ a) mkdir -p "$OPTARG"
+ archive_dir=`realpath -s "$OPTARG"`
;;
c) commitish=$OPTARG
;;
- C) results_repo=`realpath "$OPTARG"`
- commit_results=("--commit-results" "$results_repo")
+ C) mkdir -p "$OPTARG"
+ results_repo=`realpath -s "$OPTARG"`
+ ;;
+ d) download_dir=`realpath -s "$OPTARG"`
+ ;;
+ E) email_to="$OPTARG"
+ ;;
+ g) mkdir -p "$OPTARG"
+ globalres_dir=`realpath -s "$OPTARG"`
+ ;;
+ P) oe_git_archive_extra_opts+=("--push" "$OPTARG")
+ ;;
+ R) rsync_dst="$OPTARG"
+ ;;
+ w) base_dir=`realpath -s "$OPTARG"`
;;
- w) base_dir=`realpath "$OPTARG"`
+ x) oe_build_perf_test_extra_opts+=("--xml")
;;
*) usage
exit 1
@@ -57,6 +79,36 @@ while getopts "ha:c:C:w:" opt; do
esac
done
+# Check positional args
+shift "$((OPTIND - 1))"
+if [ $# -ne 0 ]; then
+ echo "ERROR: No positional args are accepted."
+ usage
+ exit 1
+fi
+
+if [ -n "$email_to" ]; then
+ if ! [ -x "$(command -v phantomjs)" ]; then
+ echo "ERROR: Sending email needs phantomjs."
+ exit 1
+ fi
+ if ! [ -x "$(command -v optipng)" ]; then
+ echo "ERROR: Sending email needs optipng."
+ exit 1
+ fi
+fi
+
+# Open a file descriptor for flock and acquire lock
+LOCK_FILE="/tmp/oe-build-perf-test-wrapper.lock"
+if ! exec 3> "$LOCK_FILE"; then
+ echo "ERROR: Unable to open lock file"
+ exit 1
+fi
+if ! flock -n 3; then
+ echo "ERROR: Another instance of this script is running"
+ exit 1
+fi
+
echo "Running on `uname -n`"
if ! git_topdir=$(git rev-parse --show-toplevel); then
echo "The current working dir doesn't seem to be a git clone. Please cd there before running `basename $0`"
@@ -66,28 +118,58 @@ fi
cd "$git_topdir"
if [ -n "$commitish" ]; then
- # Checkout correct revision
- echo "Checking out $commitish"
+ echo "Running git fetch"
git fetch &> /dev/null
git checkout HEAD^0 &> /dev/null
- git branch -D $commitish &> /dev/null
- if ! git checkout -f $commitish &> /dev/null; then
- echo "Git checkout failed"
+
+ # Handle <branch>:<commit> format
+ if echo "$commitish" | grep -q ":"; then
+ commit=`echo "$commitish" | cut -d":" -f2`
+ branch=`echo "$commitish" | cut -d":" -f1`
+ else
+ commit="$commitish"
+ branch="$commitish"
+ fi
+
+ echo "Checking out $commitish"
+ git branch -D $branch &> /dev/null
+ if ! git checkout -f $branch &> /dev/null; then
+ echo "ERROR: Git checkout failed"
+ exit 1
+ fi
+
+ # Check that the specified branch really contains the commit
+ commit_hash=`git rev-parse --revs-only $commit --`
+ if [ -z "$commit_hash" -o "`git merge-base $branch $commit`" != "$commit_hash" ]; then
+ echo "ERROR: branch $branch does not contain commit $commit"
exit 1
fi
+ git reset --hard $commit > /dev/null
fi
+# Determine name of the current branch
+branch=`git symbolic-ref HEAD 2> /dev/null`
+# Strip refs/heads/
+branch=${branch:11}
+
# Setup build environment
if [ -z "$base_dir" ]; then
base_dir="$git_topdir/build-perf-test"
fi
echo "Using working dir $base_dir"
+if [ -z "$download_dir" ]; then
+ download_dir="$base_dir/downloads"
+fi
+if [ -z "$globalres_dir" ]; then
+ globalres_dir="$base_dir"
+fi
+
timestamp=`date "+%Y%m%d%H%M%S"`
git_rev=$(git rev-parse --short HEAD) || exit 1
build_dir="$base_dir/build-$git_rev-$timestamp"
results_dir="$base_dir/results-$git_rev-$timestamp"
-globalres_log="$base_dir/globalres.log"
+globalres_log="$globalres_dir/globalres.log"
machine="qemux86"
mkdir -p "$base_dir"
@@ -98,7 +180,7 @@ auto_conf="$build_dir/conf/auto.conf"
echo "MACHINE = \"$machine\"" > "$auto_conf"
echo 'BB_NUMBER_THREADS = "8"' >> "$auto_conf"
echo 'PARALLEL_MAKE = "-j 8"' >> "$auto_conf"
-echo "DL_DIR = \"$base_dir/downloads\"" >> "$auto_conf"
+echo "DL_DIR = \"$download_dir\"" >> "$auto_conf"
# Disabling network sanity check slightly reduces the variance of timing results
echo 'CONNECTIVITY_CHECK_URIS = ""' >> "$auto_conf"
# Possibility to define extra settings
@@ -107,16 +189,54 @@ if [ -f "$base_dir/auto.conf.extra" ]; then
fi
# Run actual test script
-if ! oe-build-perf-test --out-dir "$results_dir" \
- --globalres-file "$globalres_log" \
- --lock-file "$base_dir/oe-build-perf.lock" \
- "${commit_results[@]}" \
- --commit-results-branch "{tester_host}/{git_branch}/$machine" \
- --commit-results-tag "{tester_host}/{git_branch}/$machine/{git_commit_count}-g{git_commit}/{tag_num}"; then
- echo "oe-build-perf-test script failed!"
- exit 1
+oe-build-perf-test --out-dir "$results_dir" \
+ --globalres-file "$globalres_log" \
+ "${oe_build_perf_test_extra_opts[@]}" \
+ --lock-file "$base_dir/oe-build-perf.lock"
+
+case $? in
+ 1) echo "ERROR: oe-build-perf-test script failed!"
+ exit 1
+ ;;
+ 2) echo "NOTE: some tests failed!"
+ ;;
+esac
+
+# Commit results to git
+if [ -n "$results_repo" ]; then
+ echo -e "\nArchiving results in $results_repo"
+ oe-git-archive \
+ --git-dir "$results_repo" \
+ --branch-name "{hostname}/{branch}/{machine}" \
+ --tag-name "{hostname}/{branch}/{machine}/{commit_count}-g{commit}/{tag_number}" \
+ --exclude "buildstats.json" \
+ --notes "buildstats/{branch_name}" "$results_dir/buildstats.json" \
+ "${oe_git_archive_extra_opts[@]}" \
+ "$results_dir"
+
+ # Generate test reports
+ sanitized_branch=`echo $branch | tr / _`
+ report_txt=`hostname`_${sanitized_branch}_${machine}.txt
+ report_html=`hostname`_${sanitized_branch}_${machine}.html
+ echo -e "\nGenerating test report"
+ oe-build-perf-report -r "$results_repo" > $report_txt
+ oe-build-perf-report -r "$results_repo" --html > $report_html
+
+ # Send email report
+ if [ -n "$email_to" ]; then
+ echo "Emailing test report"
+ os_name=`get_os_release_var PRETTY_NAME`
+ "$script_dir"/oe-build-perf-report-email.py --to "$email_to" --subject "Build Perf Test Report for $os_name" --text $report_txt --html $report_html "${OE_BUILD_PERF_REPORT_EMAIL_EXTRA_ARGS[@]}"
+ fi
+
+ # Upload report files, unless we're on detached head
+ if [ -n "$rsync_dst" -a -n "$branch" ]; then
+ echo "Uploading test report"
+ rsync $report_txt $report_html $rsync_dst
+ fi
fi
+
echo -ne "\n\n-----------------\n"
echo "Global results file:"
echo -ne "\n"
diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
deleted file mode 100755
index 7d99228c73..0000000000
--- a/scripts/contrib/build-perf-test.sh
+++ /dev/null
@@ -1,400 +0,0 @@
-#!/bin/bash
-#
-# This script runs a series of tests (with and without sstate) and reports build time (and tmp/ size)
-#
-# Build performance test script
-#
-# Copyright 2013 Intel Corporation
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#
-# AUTHORS:
-# Stefan Stanacar <stefanx.stanacar@intel.com>
-
-
-ME=$(basename $0)
-
-#
-# usage and setup
-#
-
-usage () {
-cat << EOT
-Usage: $ME [-h]
- $ME [-c <commit>] [-v] [-m <val>] [-j <val>] [-t <val>] [-i <image-name>] [-d <path>]
-Options:
- -h
- Display this help and exit.
- -c <commit>
- git checkout <commit> before anything else
- -v
- Show bitbake output, don't redirect it to a log.
- -m <machine>
- Value for MACHINE. Default is qemux86.
- -j <val>
- Value for PARALLEL_MAKE. Default is 8.
- -t <val>
- Value for BB_NUMBER_THREADS. Default is 8.
- -i <image-name>
- Instead of timing against core-image-sato, use <image-name>
- -d <path>
- Use <path> as DL_DIR
- -p <githash>
- Cherry pick githash onto the commit
-
-Note: current working directory must be inside a poky git clone.
-
-EOT
-}
-
-
-if clonedir=$(git rev-parse --show-toplevel); then
- cd $clonedir
-else
- echo "The current working dir doesn't seem to be a poky git clone. Please cd there before running $ME"
- exit 1
-fi
-
-IMAGE="core-image-sato"
-verbose=0
-dldir=
-commit=
-pmake=
-cherrypicks=
-while getopts "hvc:m:j:t:i:d:p:" opt; do
- case $opt in
- h) usage
- exit 0
- ;;
- v) verbose=1
- ;;
- c) commit=$OPTARG
- ;;
- m) export MACHINE=$OPTARG
- ;;
- j) pmake=$OPTARG
- ;;
- t) export BB_NUMBER_THREADS=$OPTARG
- ;;
- i) IMAGE=$OPTARG
- ;;
- d) dldir=$OPTARG
- ;;
- p) cherrypicks="$cherrypicks $OPTARG"
- ;;
- *) usage
- exit 1
- ;;
- esac
-done
-
-
-#drop cached credentials and test for sudo access without a password
-sudo -k -n ls > /dev/null 2>&1
-reqpass=$?
-if [ $reqpass -ne 0 ]; then
- echo "The script requires sudo access to drop caches between builds (echo 3 > /proc/sys/vm/drop_caches)"
- read -s -p "Please enter your sudo password: " pass
- echo
-fi
-
-if [ -n "$commit" ]; then
- echo "git checkout -f $commit"
- git pull > /dev/null 2>&1
- git checkout -f $commit || exit 1
- git pull > /dev/null 2>&1
-fi
-
-if [ -n "$cherrypicks" ]; then
- for c in $cherrypicks; do
- git cherry-pick $c
- done
-fi
-
-rev=$(git rev-parse --short HEAD) || exit 1
-OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`"
-BUILDDIR="$OUTDIR/build"
-resultsfile="$OUTDIR/results.log"
-cmdoutput="$OUTDIR/commands.log"
-myoutput="$OUTDIR/output.log"
-globalres="$clonedir/build-perf-test/globalres.log"
-
-mkdir -p $OUTDIR || exit 1
-
-log () {
- local msg="$1"
- echo "`date`: $msg" | tee -a $myoutput
-}
-
-
-#
-# Config stuff
-#
-
-branch=`git branch 2>&1 | grep "^* " | tr -d "* "`
-gitcommit=$(git rev-parse HEAD) || exit 1
-log "Running on $branch:$gitcommit"
-
-source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1
-cd $OUTDIR/build
-
-[ -n "$MACHINE" ] || export MACHINE="qemux86"
-[ -n "$BB_NUMBER_THREADS" ] || export BB_NUMBER_THREADS="8"
-
-if [ -n "$pmake" ]; then
- export PARALLEL_MAKE="-j $pmake"
-else
- export PARALLEL_MAKE="-j 8"
-fi
-
-if [ -n "$dldir" ]; then
- echo "DL_DIR = \"$dldir\"" >> conf/local.conf
-else
- echo "DL_DIR = \"$clonedir/build-perf-test/downloads\"" >> conf/local.conf
-fi
-
-# Sometimes I've noticed big differences in timings for the same commit, on the same machine
-# Disabling the network sanity check helps a bit (because of my crappy network connection and/or proxy)
-echo "CONNECTIVITY_CHECK_URIS =\"\"" >> conf/local.conf
-
-
-#
-# Functions
-#
-
-declare -a TIMES
-time_count=0
-declare -a SIZES
-size_count=0
-
-time_cmd () {
- log " Timing: $*"
-
- if [ $verbose -eq 0 ]; then
- /usr/bin/time -v -o $resultsfile "$@" >> $cmdoutput
- else
- /usr/bin/time -v -o $resultsfile "$@"
- fi
- ret=$?
- if [ $ret -eq 0 ]; then
- t=`grep wall $resultsfile | sed 's/.*m:ss): //'`
- log " TIME: $t"
- TIMES[(( time_count++ ))]="$t"
- else
- log "ERROR: exit status was non-zero, will report time as 0."
- TIMES[(( time_count++ ))]="0"
- fi
-
- #time by default overwrites the output file and we want to keep the results
- #it has an append option but I don't want to clobber the results in the same file
- i=`ls $OUTDIR/results.log* |wc -l`
- mv $resultsfile "${resultsfile}.${i}"
- log "More stats can be found in ${resultsfile}.${i}"
-}
-
-bbtime () {
- time_cmd bitbake "$@"
-}
-
-#we don't time bitbake here
-bbnotime () {
- local arg="$@"
- log " Running: bitbake ${arg}"
- if [ $verbose -eq 0 ]; then
- bitbake ${arg} >> $cmdoutput
- else
- bitbake ${arg}
- fi
- ret=$?
- if [ $ret -eq 0 ]; then
- log " Finished bitbake ${arg}"
- else
- log "ERROR: exit status was non-zero. Exit.."
- exit $ret
- fi
-
-}
-
-do_rmtmp() {
- log " Removing tmp"
- rm -rf bitbake.lock pseudodone conf/sanity_info cache tmp
-}
-do_rmsstate () {
- log " Removing sstate-cache"
- rm -rf sstate-cache
-}
-do_sync () {
- log " Syncing and dropping caches"
- sync; sync
- if [ $reqpass -eq 0 ]; then
- sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
- else
- echo "$pass" | sudo -S sh -c "echo 3 > /proc/sys/vm/drop_caches"
- echo
- fi
- sleep 3
-}
-
-write_results() {
- echo -n "`uname -n`,$branch:$gitcommit,`git describe`," >> $globalres
- for i in "${TIMES[@]}"; do
- echo -n "$i," >> $globalres
- done
- for i in "${SIZES[@]}"; do
- echo -n "$i," >> $globalres
- done
- echo >> $globalres
- sed -i '$ s/,$//' $globalres
-}
-
-####
-
-#
-# Test 1
-# Measure: Wall clock of "bitbake core-image-sato" and size of tmp/dir (w/o rm_work and w/ rm_work)
-# Pre: Downloaded sources, no sstate
-# Steps:
-# Part1:
-# - fetchall
-# - clean build dir
-# - time bitbake core-image-sato
-# - collect data
-# Part2:
-# - bitbake virtual/kernel -c cleansstate
-# - time bitbake virtual/kernel
-# Part3:
-# - add INHERIT to local.conf
-# - clean build dir
-# - build
-# - report size, remove INHERIT
-
-test1_p1 () {
- log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir"
- bbnotime $IMAGE -c fetchall
- do_rmtmp
- do_rmsstate
- do_sync
- bbtime $IMAGE
- s=`du -s tmp | sed 's/tmp//' | sed 's/[ \t]*$//'`
- SIZES[(( size_count++ ))]="$s"
- log "SIZE of tmp dir is: $s"
- log "Buildstats are saved in $OUTDIR/buildstats-test1"
- mv tmp/buildstats $OUTDIR/buildstats-test1
-}
-
-
-test1_p2 () {
- log "Running Test 1, part 2/3: bitbake virtual/kernel -c cleansstate and time bitbake virtual/kernel"
- bbnotime virtual/kernel -c cleansstate
- do_sync
- bbtime virtual/kernel
-}
-
-test1_p3 () {
- log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled"
- echo "INHERIT += \"rm_work\"" >> conf/local.conf
- do_rmtmp
- do_rmsstate
- do_sync
- bbtime $IMAGE
- sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf
- s=`du -s tmp | sed 's/tmp//' | sed 's/[ \t]*$//'`
- SIZES[(( size_count++ ))]="$s"
- log "SIZE of tmp dir is: $s"
- log "Buildstats are saved in $OUTDIR/buildstats-test13"
- mv tmp/buildstats $OUTDIR/buildstats-test13
-}
-
-
-#
-# Test 2
-# Measure: Wall clock of "bitbake core-image-sato" and size of tmp/dir
-# Pre: populated sstate cache
-
-test2 () {
- # Assuming test 1 has run
- log "Running Test 2: Measure wall clock of bitbake $IMAGE -c rootfs with sstate"
- do_rmtmp
- do_sync
- bbtime $IMAGE -c rootfs
-}
-
-
-# Test 3
-# parsing time metrics
-#
-# Start with
-# i) "rm -rf tmp/cache; time bitbake -p"
-# ii) "rm -rf tmp/cache/default-glibc/; time bitbake -p"
-# iii) "time bitbake -p"
-
-
-test3 () {
- log "Running Test 3: Parsing time metrics (bitbake -p)"
- log " Removing tmp/cache && cache"
- rm -rf tmp/cache cache
- bbtime -p
- log " Removing tmp/cache/default-glibc/"
- rm -rf tmp/cache/default-glibc/
- bbtime -p
- bbtime -p
-}
-
-#
-# Test 4 - eSDK
-# Measure: eSDK size and installation time
-test4 () {
- log "Running Test 4: eSDK size and installation time"
- bbnotime $IMAGE -c do_populate_sdk_ext
-
- esdk_installer=(tmp/deploy/sdk/*-toolchain-ext-*.sh)
-
- if [ ${#esdk_installer[*]} -eq 1 ]; then
- s=$((`stat -c %s "$esdk_installer"` / 1024))
- SIZES[(( size_count++ ))]="$s"
- log "Download SIZE of eSDK is: $s kB"
-
- do_sync
- time_cmd "$esdk_installer" -y -d "tmp/esdk-deploy"
-
- s=$((`du -sb "tmp/esdk-deploy" | cut -f1` / 1024))
- SIZES[(( size_count++ ))]="$s"
- log "Install SIZE of eSDK is: $s kB"
- else
- log "ERROR: other than one sdk found (${esdk_installer[*]}), reporting size and time as 0."
- SIZES[(( size_count++ ))]="0"
- TIMES[(( time_count++ ))]="0"
- fi
-
-}
-
-
-# RUN!
-
-test1_p1
-test1_p2
-test1_p3
-test2
-test3
-test4
-
-# if we got til here write to global results
-write_results
-
-log "All done, cleaning up..."
-
-do_rmtmp
-do_rmsstate
diff --git a/scripts/contrib/ddimage b/scripts/contrib/ddimage
index ab929957a5..7f2ad112a6 100755
--- a/scripts/contrib/ddimage
+++ b/scripts/contrib/ddimage
@@ -1,8 +1,7 @@
#!/bin/sh
-
-# Default to avoiding the first two disks on typical Linux and Mac OS installs
-# Better safe than sorry :-)
-BLACKLIST_DEVICES="/dev/sda /dev/sdb /dev/disk1 /dev/disk2"
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# 1MB blocksize
BLOCKSIZE=1048576
@@ -29,7 +28,6 @@ image_details() {
}
device_details() {
- DEV=$1
BLOCK_SIZE=512
echo "Device details"
@@ -42,11 +40,17 @@ device_details() {
fi
# Default / Linux information collection
- echo " device: $DEVICE"
+ ACTUAL_DEVICE=`readlink -f $DEVICE`
+ DEV=`basename $ACTUAL_DEVICE`
+ if [ "$ACTUAL_DEVICE" != "$DEVICE" ] ; then
+ echo " device: $DEVICE -> $ACTUAL_DEVICE"
+ else
+ echo " device: $DEVICE"
+ fi
if [ -f "/sys/class/block/$DEV/device/vendor" ]; then
echo " vendor: $(cat /sys/class/block/$DEV/device/vendor)"
else
- echo " vendor: UNKOWN"
+ echo " vendor: UNKNOWN"
fi
if [ -f "/sys/class/block/$DEV/device/model" ]; then
echo " model: $(cat /sys/class/block/$DEV/device/model)"
@@ -61,6 +65,49 @@ device_details() {
echo ""
}
+check_mount_device() {
+ if cat /proc/self/mounts | awk '{ print $1 }' | grep /dev/ | grep -q -E "^$1$" ; then
+ return 0
+ fi
+ return 1
+}
+
+is_mounted() {
+ if [ "$(uname)" = "Darwin" ]; then
+ if df | awk '{ print $1 }' | grep /dev/ | grep -q -E "^$1(s[0-9]+)?$" ; then
+ return 0
+ fi
+ else
+ if check_mount_device $1 ; then
+ return 0
+ fi
+ DEV=`basename $1`
+ if [ -d /sys/class/block/$DEV/ ] ; then
+ PARENT_BLKDEV=`basename $(readlink -f "/sys/class/block/$DEV/..")`
+ if [ "$PARENT_BLKDEV" != "block" ] ; then
+ if check_mount_device $PARENT_BLKDEV ; then
+ return 0
+ fi
+ fi
+ for CHILD_BLKDEV in `find /sys/class/block/$DEV/ -mindepth 1 -maxdepth 1 -name "$DEV*" -type d`
+ do
+ if check_mount_device /dev/`basename $CHILD_BLKDEV` ; then
+ return 0
+ fi
+ done
+ fi
+ fi
+ return 1
+}
+
+is_inuse() {
+ HOLDERS_DIR="/sys/class/block/`basename $1`/holders"
+ if [ -d $HOLDERS_DIR ] && [ `ls -A $HOLDERS_DIR` ] ; then
+ return 0
+ fi
+ return 1
+}
+
if [ $# -ne 2 ]; then
usage
exit 1
@@ -75,22 +122,37 @@ if [ ! -e "$IMAGE" ]; then
exit 1
fi
+if [ ! -e "$DEVICE" ]; then
+ echo "ERROR: Device $DEVICE does not exist"
+ usage
+ exit 1
+fi
-for i in ${BLACKLIST_DEVICES}; do
- if [ "$i" = "$DEVICE" ]; then
- echo "ERROR: Device $DEVICE is blacklisted"
- exit 1
- fi
-done
+if [ "$(uname)" = "Darwin" ]; then
+ # readlink doesn't support -f on MacOS, just assume it isn't a symlink
+ ACTUAL_DEVICE=$DEVICE
+else
+ ACTUAL_DEVICE=`readlink -f $DEVICE`
+fi
+if is_mounted $ACTUAL_DEVICE ; then
+ echo "ERROR: Device $DEVICE is currently mounted - check if this is the right device, and unmount it first if so"
+ device_details
+ exit 1
+fi
+if is_inuse $ACTUAL_DEVICE ; then
+ echo "ERROR: Device $DEVICE is currently in use (possibly part of LVM) - check if this is the right device!"
+ device_details
+ exit 1
+fi
if [ ! -w "$DEVICE" ]; then
- echo "ERROR: Device $DEVICE does not exist or is not writable"
+ echo "ERROR: Device $DEVICE is not writable - possibly use sudo?"
usage
exit 1
fi
image_details $IMAGE
-device_details $(basename $DEVICE)
+device_details
printf "Write $IMAGE to $DEVICE [y/N]? "
read RESPONSE
diff --git a/scripts/contrib/devtool-stress.py b/scripts/contrib/devtool-stress.py
index d555c51a65..81046ecf49 100755
--- a/scripts/contrib/devtool-stress.py
+++ b/scripts/contrib/devtool-stress.py
@@ -6,18 +6,7 @@
#
# Copyright 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
import sys
diff --git a/scripts/contrib/dialog-power-control b/scripts/contrib/dialog-power-control
index 7550ea53be..ad6070c369 100755
--- a/scripts/contrib/dialog-power-control
+++ b/scripts/contrib/dialog-power-control
@@ -1,5 +1,7 @@
#!/bin/sh
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Simple script to show a manual power prompt for when you want to use
# automated hardware testing with testimage.bbclass but you don't have a
# web-enabled power strip or similar to do the power on/off/cycle.
diff --git a/scripts/contrib/documentation-audit.sh b/scripts/contrib/documentation-audit.sh
index 2144aac936..1191f57a8e 100755
--- a/scripts/contrib/documentation-audit.sh
+++ b/scripts/contrib/documentation-audit.sh
@@ -1,5 +1,7 @@
#!/bin/bash
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Perform an audit of which packages provide documentation and which
# are missing -doc packages.
#
@@ -7,7 +9,6 @@
# this script after source'ing the build environment script, so you're
# running it from build/ directory.
#
-# Maintainer: Scott Garman <scott.a.garman@intel.com>
REPORT_DOC_SIMPLE="documentation_exists.txt"
REPORT_DOC_DETAIL="documentation_exists_detail.txt"
diff --git a/scripts/contrib/graph-tool b/scripts/contrib/graph-tool
index 1df5b8c345..6d2e68b82e 100755
--- a/scripts/contrib/graph-tool
+++ b/scripts/contrib/graph-tool
@@ -7,18 +7,7 @@
#
# Copyright 2013 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
import sys
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py
index 389fb97f67..d6de4dc84d 100755
--- a/scripts/contrib/list-packageconfig-flags.py
+++ b/scripts/contrib/list-packageconfig-flags.py
@@ -1,21 +1,10 @@
#!/usr/bin/env python3
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation.
-#
# Copyright (C) 2013 Wind River Systems, Inc.
# Copyright (C) 2014 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
# - list available recipes which have PACKAGECONFIG flags
# - list available PACKAGECONFIG flags and all affected recipes
# - list all recipes and PACKAGECONFIG information
@@ -76,7 +65,7 @@ def collect_pkgs(data_dict):
for fn in data_dict:
pkgconfigflags = data_dict[fn].getVarFlags("PACKAGECONFIG")
pkgconfigflags.pop('doc', None)
- pkgname = data_dict[fn].getVar("P", True)
+ pkgname = data_dict[fn].getVar("PN")
pkg_dict[pkgname] = sorted(pkgconfigflags.keys())
return pkg_dict
@@ -124,9 +113,9 @@ def display_all(data_dict):
''' Display all pkgs and PACKAGECONFIG information '''
print(str("").ljust(50, '='))
for fn in data_dict:
- print('%s' % data_dict[fn].getVar("P", True))
+ print('%s' % data_dict[fn].getVar("P"))
print(fn)
- packageconfig = data_dict[fn].getVar("PACKAGECONFIG", True) or ''
+ packageconfig = data_dict[fn].getVar("PACKAGECONFIG") or ''
if packageconfig.strip() == '':
packageconfig = 'None'
print('PACKAGECONFIG %s' % packageconfig)
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
deleted file mode 100755
index d8db3c0165..0000000000
--- a/scripts/contrib/mkefidisk.sh
+++ /dev/null
@@ -1,459 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-# the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-
-LANG=C
-
-# Set to 1 to enable additional output
-DEBUG=0
-OUT="/dev/null"
-
-#
-# Defaults
-#
-# 20 Mb for the boot partition
-BOOT_SIZE=20
-# 5% for swap
-SWAP_RATIO=5
-
-# Cleanup after die()
-cleanup() {
- debug "Syncing and unmounting devices"
- # Unmount anything we mounted
- unmount $ROOTFS_MNT || error "Failed to unmount $ROOTFS_MNT"
- unmount $BOOTFS_MNT || error "Failed to unmount $BOOTFS_MNT"
- unmount $HDDIMG_ROOTFS_MNT || error "Failed to unmount $HDDIMG_ROOTFS_MNT"
- unmount $HDDIMG_MNT || error "Failed to unmount $HDDIMG_MNT"
-
- # Remove the TMPDIR
- debug "Removing temporary files"
- if [ -d "$TMPDIR" ]; then
- rm -rf $TMPDIR || error "Failed to remove $TMPDIR"
- fi
-}
-
-trap 'die "Signal Received, Aborting..."' HUP INT TERM
-
-# Logging routines
-WARNINGS=0
-ERRORS=0
-CLEAR="$(tput sgr0)"
-INFO="$(tput bold)"
-RED="$(tput setaf 1)$(tput bold)"
-GREEN="$(tput setaf 2)$(tput bold)"
-YELLOW="$(tput setaf 3)$(tput bold)"
-info() {
- echo "${INFO}$1${CLEAR}"
-}
-error() {
- ERRORS=$((ERRORS+1))
- echo "${RED}$1${CLEAR}"
-}
-warn() {
- WARNINGS=$((WARNINGS+1))
- echo "${YELLOW}$1${CLEAR}"
-}
-success() {
- echo "${GREEN}$1${CLEAR}"
-}
-die() {
- error "$1"
- cleanup
- exit 1
-}
-debug() {
- if [ $DEBUG -eq 1 ]; then
- echo "$1"
- fi
-}
-
-usage() {
- echo "Usage: $(basename $0) [-v] DEVICE HDDIMG TARGET_DEVICE"
- echo " -v: Verbose debug"
- echo " DEVICE: The device to write the image to, e.g. /dev/sdh"
- echo " HDDIMG: The hddimg file to generate the efi disk from"
- echo " TARGET_DEVICE: The device the target will boot from, e.g. /dev/mmcblk0"
-}
-
-image_details() {
- IMG=$1
- info "Image details"
- echo " image: $(stat --printf '%N\n' $IMG)"
- echo " size: $(stat -L --printf '%s bytes\n' $IMG)"
- echo " modified: $(stat -L --printf '%y\n' $IMG)"
- echo " type: $(file -L -b $IMG)"
- echo ""
-}
-
-device_details() {
- DEV=$1
- BLOCK_SIZE=512
-
- info "Device details"
- echo " device: $DEVICE"
- if [ -f "/sys/class/block/$DEV/device/vendor" ]; then
- echo " vendor: $(cat /sys/class/block/$DEV/device/vendor)"
- else
- echo " vendor: UNKOWN"
- fi
- if [ -f "/sys/class/block/$DEV/device/model" ]; then
- echo " model: $(cat /sys/class/block/$DEV/device/model)"
- else
- echo " model: UNKNOWN"
- fi
- if [ -f "/sys/class/block/$DEV/size" ]; then
- echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes"
- else
- echo " size: UNKNOWN"
- fi
- echo ""
-}
-
-unmount_device() {
- grep -q $DEVICE /proc/mounts
- if [ $? -eq 0 ]; then
- warn "$DEVICE listed in /proc/mounts, attempting to unmount"
- umount $DEVICE* 2>/dev/null
- return $?
- fi
- return 0
-}
-
-unmount() {
- if [ "$1" = "" ] ; then
- return 0
- fi
- grep -q $1 /proc/mounts
- if [ $? -eq 0 ]; then
- debug "Unmounting $1"
- umount $1
- return $?
- fi
- return 0
-}
-
-#
-# Parse and validate arguments
-#
-if [ $# -lt 3 ] || [ $# -gt 4 ]; then
- if [ $# -eq 1 ]; then
- AVAILABLE_DISK=`lsblk | grep "disk" | cut -f 1 -d " "`
- X=0
- for disk in `echo $AVAILABLE_DISK`; do
- mounted=`lsblk /dev/$disk | awk {'print $7'} | sed "s/MOUNTPOINT//"`
- if [ -z "$mounted" ]; then
- UNMOUNTED_AVAILABLES="$UNMOUNTED_AVAILABLES /dev/$disk"
- info "$X - /dev/$disk"
- X=`expr $X + 1`
- fi
- done
- if [ $X -eq 0 ]; then
- die "No unmounted device found."
- fi
- read -p "Choose unmounted device number: " DISK_NUMBER
- X=0
- for line in `echo $UNMOUNTED_AVAILABLES`; do
- if [ $DISK_NUMBER -eq $X ]; then
- DISK_TO_BE_FLASHED=$line
- break
- else
- X=`expr $X + 1`
- fi
- done
- if [ -z "$DISK_TO_BE_FLASHED" ]; then
- die "Option \"$DISK_NUMBER\" is invalid. Choose a valid option"
- else
- if [ -z `echo $DISK_TO_BE_FLASHED | grep "mmc"` ]; then
- TARGET_TO_BE_BOOT="/dev/sda"
- else
- TARGET_TO_BE_BOOT="/dev/mmcblk0"
- fi
- fi
- echo ""
- echo "Choose a name of the device that will be boot from"
- echo -n "Recommended name is: "
- info "$TARGET_TO_BE_BOOT"
- read -p "Is target device okay? [y/N]: " RESPONSE
- if [ "$RESPONSE" != "y" ]; then
- read -p "Choose target device name: " TARGET_TO_BE_BOOT
- fi
- echo ""
- if [ -z "$TARGET_TO_BE_BOOT" ]; then
- die "Error: choose a valid target name"
- fi
- else
- usage
- exit 1
- fi
-fi
-
-if [ "$1" = "-v" ]; then
- DEBUG=1
- OUT="1"
- shift
-fi
-
-if [ -z "$AVAILABLE_DISK" ]; then
- DEVICE=$1
- HDDIMG=$2
- TARGET_DEVICE=$3
-else
- DEVICE=$DISK_TO_BE_FLASHED
- HDDIMG=$1
- TARGET_DEVICE=$TARGET_TO_BE_BOOT
-fi
-
-LINK=$(readlink $DEVICE)
-if [ $? -eq 0 ]; then
- DEVICE="$LINK"
-fi
-
-if [ ! -w "$DEVICE" ]; then
- usage
- if [ ! -e "${DEVICE}" ] ; then
- die "Device $DEVICE cannot be found"
- else
- die "Device $DEVICE is not writable (need to run under sudo?)"
- fi
-fi
-
-if [ ! -e "$HDDIMG" ]; then
- usage
- die "HDDIMG $HDDIMG does not exist"
-fi
-
-#
-# Ensure the hddimg is not mounted
-#
-unmount "$HDDIMG" || die "Failed to unmount $HDDIMG"
-
-#
-# Check if any $DEVICE partitions are mounted
-#
-unmount_device || die "Failed to unmount $DEVICE"
-
-#
-# Confirm device with user
-#
-image_details $HDDIMG
-device_details $(basename $DEVICE)
-echo -n "${INFO}Prepare EFI image on $DEVICE [y/N]?${CLEAR} "
-read RESPONSE
-if [ "$RESPONSE" != "y" ]; then
- echo "Image creation aborted"
- exit 0
-fi
-
-
-#
-# Prepare the temporary working space
-#
-TMPDIR=$(mktemp -d mkefidisk-XXX) || die "Failed to create temporary mounting directory."
-HDDIMG_MNT=$TMPDIR/hddimg
-HDDIMG_ROOTFS_MNT=$TMPDIR/hddimg_rootfs
-ROOTFS_MNT=$TMPDIR/rootfs
-BOOTFS_MNT=$TMPDIR/bootfs
-mkdir $HDDIMG_MNT || die "Failed to create $HDDIMG_MNT"
-mkdir $HDDIMG_ROOTFS_MNT || die "Failed to create $HDDIMG_ROOTFS_MNT"
-mkdir $ROOTFS_MNT || die "Failed to create $ROOTFS_MNT"
-mkdir $BOOTFS_MNT || die "Failed to create $BOOTFS_MNT"
-
-
-#
-# Partition $DEVICE
-#
-DEVICE_SIZE=$(parted -s $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//")
-# If the device size is not reported there may not be a valid label
-if [ "$DEVICE_SIZE" = "" ] ; then
- parted -s $DEVICE mklabel msdos || die "Failed to create MSDOS partition table"
- DEVICE_SIZE=$(parted -s $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//")
-fi
-SWAP_SIZE=$((DEVICE_SIZE*SWAP_RATIO/100))
-ROOTFS_SIZE=$((DEVICE_SIZE-BOOT_SIZE-SWAP_SIZE))
-ROOTFS_START=$((BOOT_SIZE))
-ROOTFS_END=$((ROOTFS_START+ROOTFS_SIZE))
-SWAP_START=$((ROOTFS_END))
-
-# MMC devices use a partition prefix character 'p'
-PART_PREFIX=""
-if [ ! "${DEVICE#/dev/mmcblk}" = "${DEVICE}" ] || [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then
- PART_PREFIX="p"
-fi
-BOOTFS=$DEVICE${PART_PREFIX}1
-ROOTFS=$DEVICE${PART_PREFIX}2
-SWAP=$DEVICE${PART_PREFIX}3
-
-TARGET_PART_PREFIX=""
-if [ ! "${TARGET_DEVICE#/dev/mmcblk}" = "${TARGET_DEVICE}" ]; then
- TARGET_PART_PREFIX="p"
-fi
-TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2
-TARGET_SWAP=$TARGET_DEVICE${TARGET_PART_PREFIX}3
-
-echo ""
-info "Boot partition size: $BOOT_SIZE MB ($BOOTFS)"
-info "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)"
-info "Swap partition size: $SWAP_SIZE MB ($SWAP)"
-echo ""
-
-# Use MSDOS by default as GPT cannot be reliably distributed in disk image form
-# as it requires the backup table to be on the last block of the device, which
-# of course varies from device to device.
-
-info "Partitioning installation media ($DEVICE)"
-
-debug "Deleting partition table on $DEVICE"
-dd if=/dev/zero of=$DEVICE bs=512 count=2 >$OUT 2>&1 || die "Failed to zero beginning of $DEVICE"
-
-debug "Creating new partition table (MSDOS) on $DEVICE"
-parted -s $DEVICE mklabel msdos >$OUT 2>&1 || die "Failed to create MSDOS partition table"
-
-debug "Creating boot partition on $BOOTFS"
-parted -s $DEVICE mkpart primary 0% $BOOT_SIZE >$OUT 2>&1 || die "Failed to create BOOT partition"
-
-debug "Enabling boot flag on $BOOTFS"
-parted -s $DEVICE set 1 boot on >$OUT 2>&1 || die "Failed to enable boot flag"
-
-debug "Creating ROOTFS partition on $ROOTFS"
-parted -s $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END >$OUT 2>&1 || die "Failed to create ROOTFS partition"
-
-debug "Creating swap partition on $SWAP"
-parted -s $DEVICE mkpart primary $SWAP_START 100% >$OUT 2>&1 || die "Failed to create SWAP partition"
-
-if [ $DEBUG -eq 1 ]; then
- parted -s $DEVICE print
-fi
-
-
-#
-# Check if any $DEVICE partitions are mounted after partitioning
-#
-unmount_device || die "Failed to unmount $DEVICE partitions"
-
-
-#
-# Format $DEVICE partitions
-#
-info "Formatting partitions"
-debug "Formatting $BOOTFS as vfat"
-if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then
- mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS"
-else
- mkfs.vfat $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS"
-fi
-
-debug "Formatting $ROOTFS as ext3"
-mkfs.ext3 -F $ROOTFS -L "ROOT" >$OUT 2>&1 || die "Failed to format $ROOTFS"
-
-debug "Formatting swap partition ($SWAP)"
-mkswap $SWAP >$OUT 2>&1 || die "Failed to prepare swap"
-
-
-#
-# Installing to $DEVICE
-#
-debug "Mounting images and device in preparation for installation"
-mount -o ro,loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG"
-mount -o ro,loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img"
-mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT"
-mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT"
-
-info "Preparing boot partition"
-EFIDIR="$BOOTFS_MNT/EFI/BOOT"
-cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy vmlinuz"
-# Copy the efi loader and configs (booti*.efi and grub.cfg if it exists)
-cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir"
-# Silently ignore a missing gummiboot loader dir (we might just be a GRUB image)
-cp -r $HDDIMG_MNT/loader $BOOTFS_MNT >$OUT 2>&1
-
-# Update the boot loaders configurations for an installed image
-# Remove any existing root= kernel parameters and:
-# o Add a root= parameter with the target rootfs
-# o Specify ro so fsck can be run during boot
-# o Specify rootwait in case the target media is an asyncronous block device
-# such as MMC or USB disks
-# o Specify "quiet" to minimize boot time when using slow serial consoles
-
-# Look for a GRUB installation
-GRUB_CFG="$EFIDIR/grub.cfg"
-if [ -e "$GRUB_CFG" ]; then
- info "Configuring GRUB"
- # Delete the install entry
- sed -i "/menuentry 'install'/,/^}/d" $GRUB_CFG
- # Delete the initrd lines
- sed -i "/initrd /d" $GRUB_CFG
- # Delete any LABEL= strings
- sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
-
- sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
- sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GRUB_CFG
-fi
-
-# Look for a gummiboot installation
-GUMMI_ENTRIES="$BOOTFS_MNT/loader/entries"
-GUMMI_CFG="$GUMMI_ENTRIES/boot.conf"
-if [ -d "$GUMMI_ENTRIES" ]; then
- info "Configuring Gummiboot"
- # remove the install target if it exists
- rm $GUMMI_ENTRIES/install.conf >$OUT 2>&1
-
- if [ ! -e "$GUMMI_CFG" ]; then
- echo "ERROR: $GUMMI_CFG not found"
- fi
-
- sed -i "/initrd /d" $GUMMI_CFG
- sed -i "s@ root=[^ ]*@ @" $GUMMI_CFG
- sed -i "s@options *LABEL=boot @options LABEL=Boot root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GUMMI_CFG
-fi
-
-# Ensure we have at least one EFI bootloader configured
-if [ ! -e $GRUB_CFG ] && [ ! -e $GUMMI_CFG ]; then
- die "No EFI bootloader configuration found"
-fi
-
-
-info "Copying ROOTFS files (this may take a while)"
-cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT >$OUT 2>&1 || die "Root FS copy failed"
-
-echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab
-
-# We dont want udev to mount our root device while we're booting...
-if [ -d $ROOTFS_MNT/etc/udev/ ] ; then
- echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist
-fi
-
-# Add startup.nsh script for automated boot
-echo "fs0:\EFI\BOOT\bootx64.efi" > $BOOTFS_MNT/startup.nsh
-
-
-# Call cleanup to unmount devices and images and remove the TMPDIR
-cleanup
-
-echo ""
-if [ $WARNINGS -ne 0 ] && [ $ERRORS -eq 0 ]; then
- echo "${YELLOW}Installation completed with warnings${CLEAR}"
- echo "${YELLOW}Warnings: $WARNINGS${CLEAR}"
-elif [ $ERRORS -ne 0 ]; then
- echo "${RED}Installation encountered errors${CLEAR}"
- echo "${RED}Errors: $ERRORS${CLEAR}"
- echo "${YELLOW}Warnings: $WARNINGS${CLEAR}"
-else
- success "Installation completed successfully"
-fi
-echo ""
diff --git a/scripts/contrib/oe-build-perf-report-email.py b/scripts/contrib/oe-build-perf-report-email.py
new file mode 100755
index 0000000000..de3862c897
--- /dev/null
+++ b/scripts/contrib/oe-build-perf-report-email.py
@@ -0,0 +1,276 @@
+#!/usr/bin/python3
+#
+# Send build performance test report emails
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import argparse
+import base64
+import logging
+import os
+import pwd
+import re
+import shutil
+import smtplib
+import socket
+import subprocess
+import sys
+import tempfile
+from email.mime.image import MIMEImage
+from email.mime.multipart import MIMEMultipart
+from email.mime.text import MIMEText
+
+
+# Setup logging
+logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
+log = logging.getLogger('oe-build-perf-report')
+
+
+# Find js scaper script
+SCRAPE_JS = os.path.join(os.path.dirname(__file__), '..', 'lib', 'build_perf',
+ 'scrape-html-report.js')
+if not os.path.isfile(SCRAPE_JS):
+ log.error("Unableto find oe-build-perf-report-scrape.js")
+ sys.exit(1)
+
+
+class ReportError(Exception):
+ """Local errors"""
+ pass
+
+
+def check_utils():
+ """Check that all needed utils are installed in the system"""
+ missing = []
+ for cmd in ('phantomjs', 'optipng'):
+ if not shutil.which(cmd):
+ missing.append(cmd)
+ if missing:
+ log.error("The following tools are missing: %s", ' '.join(missing))
+ sys.exit(1)
+
+
+def parse_args(argv):
+ """Parse command line arguments"""
+ description = """Email build perf test report"""
+ parser = argparse.ArgumentParser(
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
+ description=description)
+
+ parser.add_argument('--debug', '-d', action='store_true',
+ help="Verbose logging")
+ parser.add_argument('--quiet', '-q', action='store_true',
+ help="Only print errors")
+ parser.add_argument('--to', action='append',
+ help="Recipients of the email")
+ parser.add_argument('--cc', action='append',
+ help="Carbon copy recipients of the email")
+ parser.add_argument('--bcc', action='append',
+ help="Blind carbon copy recipients of the email")
+ parser.add_argument('--subject', default="Yocto build perf test report",
+ help="Email subject")
+ parser.add_argument('--outdir', '-o',
+ help="Store files in OUTDIR. Can be used to preserve "
+ "the email parts")
+ parser.add_argument('--text',
+ help="Plain text message")
+ parser.add_argument('--html',
+ help="HTML peport generated by oe-build-perf-report")
+ parser.add_argument('--phantomjs-args', action='append',
+ help="Extra command line arguments passed to PhantomJS")
+
+ args = parser.parse_args(argv)
+
+ if not args.html and not args.text:
+ parser.error("Please specify --html and/or --text")
+
+ return args
+
+
+def decode_png(infile, outfile):
+ """Parse/decode/optimize png data from a html element"""
+ with open(infile) as f:
+ raw_data = f.read()
+
+ # Grab raw base64 data
+ b64_data = re.sub('^.*href="data:image/png;base64,', '', raw_data, 1)
+ b64_data = re.sub('">.+$', '', b64_data, 1)
+
+ # Replace file with proper decoded png
+ with open(outfile, 'wb') as f:
+ f.write(base64.b64decode(b64_data))
+
+ subprocess.check_output(['optipng', outfile], stderr=subprocess.STDOUT)
+
+
+def mangle_html_report(infile, outfile, pngs):
+ """Mangle html file into a email compatible format"""
+ paste = True
+ png_dir = os.path.dirname(outfile)
+ with open(infile) as f_in:
+ with open(outfile, 'w') as f_out:
+ for line in f_in.readlines():
+ stripped = line.strip()
+ # Strip out scripts
+ if stripped == '<!--START-OF-SCRIPTS-->':
+ paste = False
+ elif stripped == '<!--END-OF-SCRIPTS-->':
+ paste = True
+ elif paste:
+ if re.match('^.+href="data:image/png;base64', stripped):
+ # Strip out encoded pngs (as they're huge in size)
+ continue
+ elif 'www.gstatic.com' in stripped:
+ # HACK: drop references to external static pages
+ continue
+
+ # Replace charts with <img> elements
+ match = re.match('<div id="(?P<id>\w+)"', stripped)
+ if match and match.group('id') in pngs:
+ f_out.write('<img src="cid:{}"\n'.format(match.group('id')))
+ else:
+ f_out.write(line)
+
+
+def scrape_html_report(report, outdir, phantomjs_extra_args=None):
+ """Scrape html report into a format sendable by email"""
+ tmpdir = tempfile.mkdtemp(dir='.')
+ log.debug("Using tmpdir %s for phantomjs output", tmpdir)
+
+ if not os.path.isdir(outdir):
+ os.mkdir(outdir)
+ if os.path.splitext(report)[1] not in ('.html', '.htm'):
+ raise ReportError("Invalid file extension for report, needs to be "
+ "'.html' or '.htm'")
+
+ try:
+ log.info("Scraping HTML report with PhangomJS")
+ extra_args = phantomjs_extra_args if phantomjs_extra_args else []
+ subprocess.check_output(['phantomjs', '--debug=true'] + extra_args +
+ [SCRAPE_JS, report, tmpdir],
+ stderr=subprocess.STDOUT)
+
+ pngs = []
+ images = []
+ for fname in os.listdir(tmpdir):
+ base, ext = os.path.splitext(fname)
+ if ext == '.png':
+ log.debug("Decoding %s", fname)
+ decode_png(os.path.join(tmpdir, fname),
+ os.path.join(outdir, fname))
+ pngs.append(base)
+ images.append(fname)
+ elif ext in ('.html', '.htm'):
+ report_file = fname
+ else:
+ log.warning("Unknown file extension: '%s'", ext)
+ #shutil.move(os.path.join(tmpdir, fname), outdir)
+
+ log.debug("Mangling html report file %s", report_file)
+ mangle_html_report(os.path.join(tmpdir, report_file),
+ os.path.join(outdir, report_file), pngs)
+ return (os.path.join(outdir, report_file),
+ [os.path.join(outdir, i) for i in images])
+ finally:
+ shutil.rmtree(tmpdir)
+
+def send_email(text_fn, html_fn, image_fns, subject, recipients, copy=[],
+ blind_copy=[]):
+ """Send email"""
+ # Generate email message
+ text_msg = html_msg = None
+ if text_fn:
+ with open(text_fn) as f:
+ text_msg = MIMEText("Yocto build performance test report.\n" +
+ f.read(), 'plain')
+ if html_fn:
+ html_msg = msg = MIMEMultipart('related')
+ with open(html_fn) as f:
+ html_msg.attach(MIMEText(f.read(), 'html'))
+ for img_fn in image_fns:
+ # Expect that content id is same as the filename
+ cid = os.path.splitext(os.path.basename(img_fn))[0]
+ with open(img_fn, 'rb') as f:
+ image_msg = MIMEImage(f.read())
+ image_msg['Content-ID'] = '<{}>'.format(cid)
+ html_msg.attach(image_msg)
+
+ if text_msg and html_msg:
+ msg = MIMEMultipart('alternative')
+ msg.attach(text_msg)
+ msg.attach(html_msg)
+ elif text_msg:
+ msg = text_msg
+ elif html_msg:
+ msg = html_msg
+ else:
+ raise ReportError("Neither plain text nor html body specified")
+
+ pw_data = pwd.getpwuid(os.getuid())
+ full_name = pw_data.pw_gecos.split(',')[0]
+ email = os.environ.get('EMAIL',
+ '{}@{}'.format(pw_data.pw_name, socket.getfqdn()))
+ msg['From'] = "{} <{}>".format(full_name, email)
+ msg['To'] = ', '.join(recipients)
+ if copy:
+ msg['Cc'] = ', '.join(copy)
+ if blind_copy:
+ msg['Bcc'] = ', '.join(blind_copy)
+ msg['Subject'] = subject
+
+ # Send email
+ with smtplib.SMTP('localhost') as smtp:
+ smtp.send_message(msg)
+
+
+def main(argv=None):
+ """Script entry point"""
+ args = parse_args(argv)
+ if args.quiet:
+ log.setLevel(logging.ERROR)
+ if args.debug:
+ log.setLevel(logging.DEBUG)
+
+ check_utils()
+
+ if args.outdir:
+ outdir = args.outdir
+ if not os.path.exists(outdir):
+ os.mkdir(outdir)
+ else:
+ outdir = tempfile.mkdtemp(dir='.')
+
+ try:
+ log.debug("Storing email parts in %s", outdir)
+ html_report = images = None
+ if args.html:
+ html_report, images = scrape_html_report(args.html, outdir,
+ args.phantomjs_args)
+
+ if args.to:
+ log.info("Sending email to %s", ', '.join(args.to))
+ if args.cc:
+ log.info("Copying to %s", ', '.join(args.cc))
+ if args.bcc:
+ log.info("Blind copying to %s", ', '.join(args.bcc))
+ send_email(args.text, html_report, images, args.subject,
+ args.to, args.cc, args.bcc)
+ except subprocess.CalledProcessError as err:
+ log.error("%s, with output:\n%s", str(err), err.output.decode())
+ return 1
+ except ReportError as err:
+ log.error(err)
+ return 1
+ finally:
+ if not args.outdir:
+ log.debug("Wiping %s", outdir)
+ shutil.rmtree(outdir)
+
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
new file mode 100755
index 0000000000..62c509f51c
--- /dev/null
+++ b/scripts/contrib/patchreview.py
@@ -0,0 +1,238 @@
+#! /usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+# TODO
+# - option to just list all broken files
+# - test suite
+# - validate signed-off-by
+
+status_values = ("accepted", "pending", "inappropriate", "backport", "submitted", "denied")
+
+class Result:
+ # Whether the patch has an Upstream-Status or not
+ missing_upstream_status = False
+ # If the Upstream-Status tag is malformed in some way (string for bad bit)
+ malformed_upstream_status = None
+ # If the Upstream-Status value is unknown (boolean)
+ unknown_upstream_status = False
+ # The upstream status value (Pending, etc)
+ upstream_status = None
+ # Whether the patch has a Signed-off-by or not
+ missing_sob = False
+ # Whether the Signed-off-by tag is malformed in some way
+ malformed_sob = False
+ # The Signed-off-by tag value
+ sob = None
+ # Whether a patch looks like a CVE but doesn't have a CVE tag
+ missing_cve = False
+
+def blame_patch(patch):
+ """
+ From a patch filename, return a list of "commit summary (author name <author
+ email>)" strings representing the history.
+ """
+ import subprocess
+ return subprocess.check_output(("git", "log",
+ "--follow", "--find-renames", "--diff-filter=A",
+ "--format=%s (%aN <%aE>)",
+ "--", patch)).decode("utf-8").splitlines()
+
+def patchreview(path, patches):
+ import re, os.path
+
+ # General pattern: start of line, optional whitespace, tag with optional
+ # hyphen or spaces, maybe a colon, some whitespace, then the value, all case
+ # insensitive.
+ sob_re = re.compile(r"^[\t ]*(Signed[-_ ]off[-_ ]by:?)[\t ]*(.+)", re.IGNORECASE | re.MULTILINE)
+ status_re = re.compile(r"^[\t ]*(Upstream[-_ ]Status:?)[\t ]*(\w*)", re.IGNORECASE | re.MULTILINE)
+ cve_tag_re = re.compile(r"^[\t ]*(CVE:)[\t ]*(.*)", re.IGNORECASE | re.MULTILINE)
+ cve_re = re.compile(r"cve-[0-9]{4}-[0-9]{4,6}", re.IGNORECASE)
+
+ results = {}
+
+ for patch in patches:
+
+ fullpath = os.path.join(path, patch)
+ result = Result()
+ results[fullpath] = result
+
+ content = open(fullpath, encoding='ascii', errors='ignore').read()
+
+ # Find the Signed-off-by tag
+ match = sob_re.search(content)
+ if match:
+ value = match.group(1)
+ if value != "Signed-off-by:":
+ result.malformed_sob = value
+ result.sob = match.group(2)
+ else:
+ result.missing_sob = True
+
+
+ # Find the Upstream-Status tag
+ match = status_re.search(content)
+ if match:
+ value = match.group(1)
+ if value != "Upstream-Status:":
+ result.malformed_upstream_status = value
+
+ value = match.group(2).lower()
+ # TODO: check case
+ if value not in status_values:
+ result.unknown_upstream_status = True
+ result.upstream_status = value
+ else:
+ result.missing_upstream_status = True
+
+ # Check that patches which looks like CVEs have CVE tags
+ if cve_re.search(patch) or cve_re.search(content):
+ if not cve_tag_re.search(content):
+ result.missing_cve = True
+ # TODO: extract CVE list
+
+ return results
+
+
+def analyse(results, want_blame=False, verbose=True):
+ """
+ want_blame: display blame data for each malformed patch
+ verbose: display per-file results instead of just summary
+ """
+
+ # want_blame requires verbose, so disable blame if we're not verbose
+ if want_blame and not verbose:
+ want_blame = False
+
+ total_patches = 0
+ missing_sob = 0
+ malformed_sob = 0
+ missing_status = 0
+ malformed_status = 0
+ missing_cve = 0
+ pending_patches = 0
+
+ for patch in sorted(results):
+ r = results[patch]
+ total_patches += 1
+ need_blame = False
+
+ # Build statistics
+ if r.missing_sob:
+ missing_sob += 1
+ if r.malformed_sob:
+ malformed_sob += 1
+ if r.missing_upstream_status:
+ missing_status += 1
+ if r.malformed_upstream_status or r.unknown_upstream_status:
+ malformed_status += 1
+ # Count patches with no status as pending
+ pending_patches +=1
+ if r.missing_cve:
+ missing_cve += 1
+ if r.upstream_status == "pending":
+ pending_patches += 1
+
+ # Output warnings
+ if r.missing_sob:
+ need_blame = True
+ if verbose:
+ print("Missing Signed-off-by tag (%s)" % patch)
+ if r.malformed_sob:
+ need_blame = True
+ if verbose:
+ print("Malformed Signed-off-by '%s' (%s)" % (r.malformed_sob, patch))
+ if r.missing_cve:
+ need_blame = True
+ if verbose:
+ print("Missing CVE tag (%s)" % patch)
+ if r.missing_upstream_status:
+ need_blame = True
+ if verbose:
+ print("Missing Upstream-Status tag (%s)" % patch)
+ if r.malformed_upstream_status:
+ need_blame = True
+ if verbose:
+ print("Malformed Upstream-Status '%s' (%s)" % (r.malformed_upstream_status, patch))
+ if r.unknown_upstream_status:
+ need_blame = True
+ if verbose:
+ print("Unknown Upstream-Status value '%s' (%s)" % (r.upstream_status, patch))
+
+ if want_blame and need_blame:
+ print("\n".join(blame_patch(patch)) + "\n")
+
+ def percent(num):
+ try:
+ return "%d (%d%%)" % (num, round(num * 100.0 / total_patches))
+ except ZeroDivisionError:
+ return "N/A"
+
+ if verbose:
+ print()
+
+ print("""Total patches found: %d
+Patches missing Signed-off-by: %s
+Patches with malformed Signed-off-by: %s
+Patches missing CVE: %s
+Patches missing Upstream-Status: %s
+Patches with malformed Upstream-Status: %s
+Patches in Pending state: %s""" % (total_patches,
+ percent(missing_sob),
+ percent(malformed_sob),
+ percent(missing_cve),
+ percent(missing_status),
+ percent(malformed_status),
+ percent(pending_patches)))
+
+
+
+def histogram(results):
+ from toolz import recipes, dicttoolz
+ import math
+ counts = recipes.countby(lambda r: r.upstream_status, results.values())
+ bars = dicttoolz.valmap(lambda v: "#" * int(math.ceil(float(v) / len(results) * 100)), counts)
+ for k in bars:
+ print("%-20s %s (%d)" % (k.capitalize() if k else "No status", bars[k], counts[k]))
+
+
+if __name__ == "__main__":
+ import argparse, subprocess, os
+
+ args = argparse.ArgumentParser(description="Patch Review Tool")
+ args.add_argument("-b", "--blame", action="store_true", help="show blame for malformed patches")
+ args.add_argument("-v", "--verbose", action="store_true", help="show per-patch results")
+ args.add_argument("-g", "--histogram", action="store_true", help="show patch histogram")
+ args.add_argument("-j", "--json", help="update JSON")
+ args.add_argument("directory", help="directory to scan")
+ args = args.parse_args()
+
+ patches = subprocess.check_output(("git", "-C", args.directory, "ls-files", "recipes-*/**/*.patch", "recipes-*/**/*.diff")).decode("utf-8").split()
+ results = patchreview(args.directory, patches)
+ analyse(results, want_blame=args.blame, verbose=args.verbose)
+
+ if args.json:
+ import json, os.path, collections
+ if os.path.isfile(args.json):
+ data = json.load(open(args.json))
+ else:
+ data = []
+
+ row = collections.Counter()
+ row["total"] = len(results)
+ row["date"] = subprocess.check_output(["git", "-C", args.directory, "show", "-s", "--pretty=format:%cd", "--date=format:%s"]).decode("utf-8").strip()
+ for r in results.values():
+ if r.upstream_status in status_values:
+ row[r.upstream_status] += 1
+ if r.malformed_upstream_status or r.missing_upstream_status:
+ row['malformed-upstream-status'] += 1
+ if r.malformed_sob or r.missing_sob:
+ row['malformed-sob'] += 1
+
+ data.append(row)
+ json.dump(data, open(args.json, "w"))
+
+ if args.histogram:
+ print()
+ histogram(results)
diff --git a/scripts/contrib/patchtest.sh b/scripts/contrib/patchtest.sh
new file mode 100755
index 0000000000..b1e1ea334b
--- /dev/null
+++ b/scripts/contrib/patchtest.sh
@@ -0,0 +1,104 @@
+#!/bin/bash
+#
+# patchtest: Run patchtest on commits starting at master
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+
+set -o errexit
+
+# Default values
+pokydir=''
+
+usage() {
+CMD=$(basename $0)
+cat <<EOM
+Usage: $CMD [-h] [-p pokydir]
+ -p pokydir Defaults to current directory
+EOM
+>&2
+ exit 1
+}
+
+function clone() {
+ local REPOREMOTE=$1
+ local REPODIR=$2
+ if [ ! -d $REPODIR ]; then
+ git clone $REPOREMOTE $REPODIR --quiet
+ else
+ ( cd $REPODIR; git pull --quiet )
+ fi
+}
+
+while getopts ":p:h" opt; do
+ case $opt in
+ p)
+ pokydir=$OPTARG
+ ;;
+ h)
+ usage
+ ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ usage
+ ;;
+ :)
+ echo "Option -$OPTARG requires an argument." >&2
+ usage
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
+CDIR="$PWD"
+
+# default pokydir to current directory if user did not specify one
+if [ -z "$pokydir" ]; then
+ pokydir="$CDIR"
+fi
+
+PTENV="$PWD/patchtest"
+PT="$PTENV/patchtest"
+PTOE="$PTENV/patchtest-oe"
+
+if ! which virtualenv > /dev/null; then
+ echo "Install virtualenv before proceeding"
+ exit 1;
+fi
+
+# activate the virtual env
+virtualenv $PTENV --quiet
+source $PTENV/bin/activate
+
+cd $PTENV
+
+# clone or pull
+clone git://git.yoctoproject.org/patchtest $PT
+clone git://git.yoctoproject.org/patchtest-oe $PTOE
+
+# install requirements
+pip install -r $PT/requirements.txt --quiet
+pip install -r $PTOE/requirements.txt --quiet
+
+PATH="$PT:$PT/scripts:$PATH"
+
+# loop through parent to HEAD and execute patchtest on each commit
+for commit in $(git rev-list master..HEAD --reverse)
+do
+ shortlog="$(git log "$commit^1..$commit" --pretty='%h: %aN: %cd: %s')"
+ log="$(git format-patch "$commit^1..$commit" --stdout | patchtest - -r $pokydir -s $PTOE/tests --base-commit $commit^1 --json 2>/dev/null | create-summary --fail --only-results)"
+ if [ -z "$log" ]; then
+ shortlog="$shortlog: OK"
+ else
+ shortlog="$shortlog: FAIL"
+ fi
+ echo "$shortlog"
+ echo "$log" | sed -n -e '/Issue/p' -e '/Suggested fix/p'
+ echo ""
+done
+
+deactivate
+
+cd $CDIR
diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py
deleted file mode 100755
index f2ecf8d3f5..0000000000
--- a/scripts/contrib/python/generate-manifest-2.7.py
+++ /dev/null
@@ -1,397 +0,0 @@
-#!/usr/bin/env python
-
-# generate Python Manifest for the OpenEmbedded build system
-# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# (C) 2007 Jeremy Laine
-# licensed under MIT, see COPYING.MIT
-#
-# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
-# * Updated to no longer generate special -dbg package, instead use the
-# single system -dbg
-# * Update version with ".1" to indicate this change
-
-import os
-import sys
-import time
-
-VERSION = "2.7.2"
-
-__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-__version__ = "20110222.2"
-
-class MakefileMaker:
-
- def __init__( self, outfile ):
- """initialize"""
- self.packages = {}
- self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
- self.output = outfile
- self.out( """
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
-""" % ( sys.argv[0], __version__ ) )
-
- #
- # helper functions
- #
-
- def out( self, data ):
- """print a line to the output file"""
- self.output.write( "%s\n" % data )
-
- def setPrefix( self, targetPrefix ):
- """set a file prefix for addPackage files"""
- self.targetPrefix = targetPrefix
-
- def doProlog( self ):
- self.out( """ """ )
- self.out( "" )
-
- def addPackage( self, name, description, dependencies, filenames ):
- """add a package to the Makefile"""
- if type( filenames ) == type( "" ):
- filenames = filenames.split()
- fullFilenames = []
- for filename in filenames:
- if filename[0] != "$":
- fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
- else:
- fullFilenames.append( filename )
- self.packages[name] = description, dependencies, fullFilenames
-
- def doBody( self ):
- """generate body of Makefile"""
-
- global VERSION
-
- #
- # generate provides line
- #
-
- provideLine = 'PROVIDES+="'
- for name in sorted(self.packages):
- provideLine += "%s " % name
- provideLine += '"'
-
- self.out( provideLine )
- self.out( "" )
-
- #
- # generate package line
- #
-
- packageLine = 'PACKAGES="${PN}-dbg '
- for name in sorted(self.packages):
- if name.startswith("${PN}-distutils"):
- if name == "${PN}-distutils":
- packageLine += "%s-staticdev %s " % (name, name)
- elif name != '${PN}-dbg':
- packageLine += "%s " % name
- packageLine += '${PN}-modules"'
-
- self.out( packageLine )
- self.out( "" )
-
- #
- # generate package variables
- #
-
- for name, data in sorted(self.packages.items()):
- desc, deps, files = data
-
- #
- # write out the description, revision and dependencies
- #
- self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
- self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
-
- line = 'FILES_%s="' % name
-
- #
- # check which directories to make in the temporary directory
- #
-
- dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
- for target in files:
- dirset[os.path.dirname( target )] = True
-
- #
- # generate which files to copy for the target (-dfR because whole directories are also allowed)
- #
-
- for target in files:
- line += "%s " % target
-
- line += '"'
- self.out( line )
- self.out( "" )
-
- self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
- line = 'RDEPENDS_${PN}-modules="'
-
- for name, data in sorted(self.packages.items()):
- if name not in ['${PN}-dev', '${PN}-distutils-staticdev']:
- line += "%s " % name
-
- self.out( "%s \"" % line )
- self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
-
- def doEpilog( self ):
- self.out( """""" )
- self.out( "" )
-
- def make( self ):
- self.doProlog()
- self.doBody()
- self.doEpilog()
-
-if __name__ == "__main__":
-
- if len( sys.argv ) > 1:
- try:
- os.unlink(sys.argv[1])
- except Exception:
- sys.exc_clear()
- outfile = open( sys.argv[1], "w" )
- else:
- outfile = sys.stdout
-
- m = MakefileMaker( outfile )
-
- # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
- # Parameters: revision, name, description, dependencies, filenames
- #
-
- m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re",
- "__future__.* _abcoll.* abc.* ast.* copy.* copy_reg.* ConfigParser.* " +
- "genericpath.* getopt.* linecache.* new.* " +
- "os.* posixpath.* struct.* " +
- "warnings.* site.* stat.* " +
- "UserDict.* UserList.* UserString.* " +
- "lib-dynload/binascii.so lib-dynload/_struct.so lib-dynload/time.so " +
- "lib-dynload/xreadlines.so types.* platform.* ${bindir}/python* " +
- "_weakrefset.* sysconfig.* _sysconfigdata.* config/Makefile " +
- "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " +
- "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
-
- m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
- "${includedir} " +
- "${libdir}/lib*${SOLIBSDEV} " +
- "${libdir}/*.la " +
- "${libdir}/*.a " +
- "${libdir}/*.o " +
- "${libdir}/pkgconfig " +
- "${base_libdir}/*.a " +
- "${base_libdir}/*.o " +
- "${datadir}/aclocal " +
- "${datadir}/pkgconfig " )
-
- m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
- "${bindir}/2to3 lib2to3" ) # package
-
- m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
- "${bindir}/idle idlelib" ) # package
-
- m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
- "${bindir}/pydoc pydoc.* pydoc_data" )
-
- m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
- "${bindir}/smtpd.* smtpd.*" )
-
- m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
- "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.so lib-dynload/audioop.so audiodev.* sunaudio.* sunau.* toaiff.*" )
-
- m.addPackage( "${PN}-bsddb", "Python bindings for the Berkeley Database", "${PN}-core",
- "bsddb lib-dynload/_bsddb.so" ) # package
-
- m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
- "codecs.* encodings gettext.* locale.* lib-dynload/_locale.so lib-dynload/_codecs* lib-dynload/_multibytecodec.so lib-dynload/unicodedata.so stringprep.* xdrlib.*" )
-
- m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
- "py_compile.* compileall.*" )
-
- m.addPackage( "${PN}-compiler", "Python compiler support", "${PN}-core",
- "compiler" ) # package
-
- m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-zlib",
- "gzip.* zipfile.* tarfile.* lib-dynload/bz2.so" )
-
- m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
- "hashlib.* md5.* sha.* lib-dynload/crypt.so lib-dynload/_hashlib.so lib-dynload/_sha256.so lib-dynload/_sha512.so" )
-
- m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
- "lib-dynload/_csv.so csv.* optparse.* textwrap.*" )
-
- m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
- "curses lib-dynload/_curses.so lib-dynload/_curses_panel.so" ) # directory + low level module
-
- m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core",
- "ctypes lib-dynload/_ctypes.so lib-dynload/_ctypes_test.so" ) # directory + low level module
-
- m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
- "_strptime.* calendar.* lib-dynload/datetime.so" )
-
- m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
- "anydbm.* dumbdbm.* whichdb.* " )
-
- m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint",
- "bdb.* pdb.*" )
-
- m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
- "difflib.*" )
-
- m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
- "config/lib*.a" ) # package
-
- m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
- "config distutils" ) # package
-
- m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
- "doctest.*" )
-
- m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
- "imaplib.* email" ) # package
-
- m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
- "lib-dynload/fcntl.so" )
-
- m.addPackage( "${PN}-hotshot", "Python hotshot performance profiler", "${PN}-core",
- "hotshot lib-dynload/_hotshot.so" )
-
- m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
- "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
-
- m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core",
- "importlib" )
-
- m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
- "lib-dynload/gdbm.so" )
-
- m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
- "colorsys.* imghdr.* lib-dynload/imageop.so lib-dynload/rgbimg.so" )
-
- m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib",
- "lib-dynload/_socket.so lib-dynload/_io.so lib-dynload/_ssl.so lib-dynload/select.so lib-dynload/termios.so lib-dynload/cStringIO.so " +
- "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
-
- m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re ${PN}-codecs",
- "json lib-dynload/_json.so" ) # package
-
- m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core",
- "lib-dynload/_bisect.so lib-dynload/_collections.so lib-dynload/_heapq.so lib-dynload/_weakref.so lib-dynload/_functools.so " +
- "lib-dynload/array.so lib-dynload/itertools.so lib-dynload/operator.so lib-dynload/parser.so " +
- "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " +
- "tokenize.* traceback.* weakref.*" )
-
- m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
- "logging" ) # package
-
- m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
- "mailbox.*" )
-
- m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt",
- "lib-dynload/cmath.so lib-dynload/math.so lib-dynload/_random.so random.* sets.*" )
-
- m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
- "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
-
- m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
- "lib-dynload/mmap.so " )
-
- m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
- "lib-dynload/_multiprocessing.so multiprocessing" ) # package
-
- m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime",
- "*Cookie*.* " +
- "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib.* urllib2.* urlparse.* uuid.* rfc822.* mimetools.*" )
-
- m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
- "cgi.* *HTTPServer.* SocketServer.*" )
-
- m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
- "decimal.* fractions.* numbers.*" )
-
- m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
- "pickle.* shelve.* lib-dynload/cPickle.so pickletools.*" )
-
- m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
- "pkgutil.*")
-
- m.addPackage( "${PN}-plistlib", "Generate and parse Mac OS X .plist files", "${PN}-core ${PN}-datetime ${PN}-io",
- "plistlib.*")
-
- m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
- "pprint.*" )
-
- m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
- "profile.* pstats.* cProfile.* lib-dynload/_lsprof.so" )
-
- m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
- "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
-
- m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
- "lib-dynload/readline.so rlcompleter.*" )
-
- m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
- "lib-dynload/resource.so" )
-
- m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re",
- "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
-
- m.addPackage( "${PN}-robotparser", "Python robots.txt parser", "${PN}-core ${PN}-netclient",
- "robotparser.*")
-
- m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle",
- "subprocess.*" )
-
- m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib",
- "lib-dynload/_sqlite3.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
-
- m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
- "sqlite3/test" )
-
- m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
- "lib-dynload/strop.so string.* stringold.*" )
-
- m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
- "lib-dynload/syslog.so" )
-
- m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
- "pty.* tty.*" )
-
- m.addPackage( "${PN}-tests", "Python tests", "${PN}-core",
- "test" ) # package
-
- m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
- "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" )
-
- m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
- "lib-dynload/_tkinter.so lib-tk" ) # package
-
- m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
- "unittest/" )
-
- m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
- "lib-dynload/nis.so lib-dynload/grp.so lib-dynload/pwd.so getpass.*" )
-
- m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
- "lib-dynload/_elementtree.so lib-dynload/pyexpat.so xml xmllib.*" ) # package
-
- m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
- "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.*" )
-
- m.addPackage( "${PN}-zlib", "Python zlib compression support", "${PN}-core",
- "lib-dynload/zlib.so" )
-
- m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
- "mailbox.*" )
-
- m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils",
- "argparse.*" )
-
- m.addPackage( "${PN}-contextlib", "Python utilities for with-statement" +
- "contexts.", "${PN}-core",
- "${libdir}/python${PYTHON_MAJMIN}/contextlib.*" )
-
- m.make()
diff --git a/scripts/contrib/python/generate-manifest-3.5.py b/scripts/contrib/python/generate-manifest-3.5.py
deleted file mode 100755
index 2906cc66d0..0000000000
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ /dev/null
@@ -1,396 +0,0 @@
-#!/usr/bin/env python
-
-# generate Python Manifest for the OpenEmbedded build system
-# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# (C) 2007 Jeremy Laine
-# licensed under MIT, see COPYING.MIT
-#
-# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
-# * Updated to no longer generate special -dbg package, instead use the
-# single system -dbg
-# * Update version with ".1" to indicate this change
-#
-# 2014 Khem Raj <raj.khem@gmail.com>
-# Added python3 support
-#
-import os
-import sys
-import time
-
-VERSION = "3.5.0"
-
-__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-__version__ = "20140131"
-
-class MakefileMaker:
-
- def __init__( self, outfile ):
- """initialize"""
- self.packages = {}
- self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
- self.output = outfile
- self.out( """
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
-""" % ( sys.argv[0], __version__ ) )
-
- #
- # helper functions
- #
-
- def out( self, data ):
- """print a line to the output file"""
- self.output.write( "%s\n" % data )
-
- def setPrefix( self, targetPrefix ):
- """set a file prefix for addPackage files"""
- self.targetPrefix = targetPrefix
-
- def doProlog( self ):
- self.out( """ """ )
- self.out( "" )
-
- def addPackage( self, name, description, dependencies, filenames ):
- """add a package to the Makefile"""
- if type( filenames ) == type( "" ):
- filenames = filenames.split()
- fullFilenames = []
- for filename in filenames:
- if filename[0] != "$":
- fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
- else:
- fullFilenames.append( filename )
- self.packages[name] = description, dependencies, fullFilenames
-
- def doBody( self ):
- """generate body of Makefile"""
-
- global VERSION
-
- #
- # generate provides line
- #
-
- provideLine = 'PROVIDES+="'
- for name in sorted(self.packages):
- provideLine += "%s " % name
- provideLine += '"'
-
- self.out( provideLine )
- self.out( "" )
-
- #
- # generate package line
- #
-
- packageLine = 'PACKAGES="${PN}-dbg '
- for name in sorted(self.packages):
- if name.startswith("${PN}-distutils"):
- if name == "${PN}-distutils":
- packageLine += "%s-staticdev %s " % (name, name)
- elif name != '${PN}-dbg':
- packageLine += "%s " % name
- packageLine += '${PN}-modules"'
-
- self.out( packageLine )
- self.out( "" )
-
- #
- # generate package variables
- #
-
- for name, data in sorted(self.packages.items()):
- desc, deps, files = data
-
- #
- # write out the description, revision and dependencies
- #
- self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
- self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
-
- line = 'FILES_%s="' % name
-
- #
- # check which directories to make in the temporary directory
- #
-
- dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
- for target in files:
- dirset[os.path.dirname( target )] = True
-
- #
- # generate which files to copy for the target (-dfR because whole directories are also allowed)
- #
-
- for target in files:
- line += "%s " % target
-
- line += '"'
- self.out( line )
- self.out( "" )
-
- self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
- line = 'RDEPENDS_${PN}-modules="'
-
- for name, data in sorted(self.packages.items()):
- if name not in ['${PN}-dev', '${PN}-distutils-staticdev']:
- line += "%s " % name
-
- self.out( "%s \"" % line )
- self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
-
- def doEpilog( self ):
- self.out( """""" )
- self.out( "" )
-
- def make( self ):
- self.doProlog()
- self.doBody()
- self.doEpilog()
-
-if __name__ == "__main__":
-
- if len( sys.argv ) > 1:
- try:
- os.unlink(sys.argv[1])
- except Exception:
- sys.exc_clear()
- outfile = open( sys.argv[1], "w" )
- else:
- outfile = sys.stdout
-
- m = MakefileMaker( outfile )
-
- # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
- # Parameters: revision, name, description, dependencies, filenames
- #
-
- m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
- "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* configparser.* " +
- "genericpath.* getopt.* linecache.* new.* " +
- "os.* posixpath.* struct.* " +
- "warnings.* site.* stat.* " +
- "UserDict.* UserList.* UserString.* " +
- "lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " +
- "lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* " +
- "_weakrefset.* sysconfig.* _sysconfigdata.* config/Makefile " +
- "${includedir}/python${PYTHON_BINABI}/pyconfig*.h " +
- "${libdir}/python${PYTHON_MAJMIN}/collections " +
- "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* " +
- "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* " +
- "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
-
- m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
- "${includedir} " +
- "${libdir}/lib*${SOLIBSDEV} " +
- "${libdir}/*.la " +
- "${libdir}/*.a " +
- "${libdir}/*.o " +
- "${libdir}/pkgconfig " +
- "${base_libdir}/*.a " +
- "${base_libdir}/*.o " +
- "${datadir}/aclocal " +
- "${datadir}/pkgconfig " )
-
- m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
- "lib2to3" ) # package
-
- m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
- "${bindir}/idle idlelib" ) # package
-
- m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
- "${bindir}/pydoc pydoc.* pydoc_data" )
-
- m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
- "${bindir}/smtpd.* smtpd.*" )
-
- m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
- "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.*.so lib-dynload/audioop.*.so audiodev.* sunaudio.* sunau.* toaiff.*" )
-
- m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils",
- "argparse.*" )
-
- m.addPackage( "${PN}-asyncio", "Python Asynchronous I/O, event loop, coroutines and tasks", "${PN}-core",
- "asyncio" )
-
- m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
- "codecs.* encodings gettext.* locale.* lib-dynload/_locale.*.so lib-dynload/_codecs* lib-dynload/_multibytecodec.*.so lib-dynload/unicodedata.*.so stringprep.* xdrlib.*" )
-
- m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
- "py_compile.* compileall.*" )
-
- m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell",
- "gzip.* zipfile.* tarfile.* lib-dynload/bz2.*.so lib-dynload/zlib.*.so" )
-
- m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
- "hashlib.* md5.* sha.* lib-dynload/crypt.*.so lib-dynload/_hashlib.*.so lib-dynload/_sha256.*.so lib-dynload/_sha512.*.so" )
-
- m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
- "lib-dynload/_csv.*.so csv.* optparse.* textwrap.*" )
-
- m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
- "curses lib-dynload/_curses.*.so lib-dynload/_curses_panel.*.so" ) # directory + low level module
-
- m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core ${PN}-subprocess",
- "ctypes lib-dynload/_ctypes.*.so lib-dynload/_ctypes_test.*.so" ) # directory + low level module
-
- m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
- "_strptime.* calendar.* datetime.* lib-dynload/_datetime.*.so" )
-
- m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
- "anydbm.* dumbdbm.* whichdb.* dbm lib-dynload/_dbm.*.so" )
-
- m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil",
- "bdb.* pdb.*" )
-
- m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
- "difflib.*" )
-
- m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
- "config/lib*.a" ) # package
-
- m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
- "config distutils" ) # package
-
- m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
- "doctest.*" )
-
- m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
- "imaplib.* email" ) # package
-
- m.addPackage( "${PN}-enum", "Python support for enumerations", "${PN}-core",
- "enum.*" )
-
- m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
- "lib-dynload/fcntl.*.so" )
-
- m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
- "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
-
- m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core ${PN}-lang",
- "importlib" )
-
- m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
- "lib-dynload/_gdbm.*.so" )
-
- m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
- "colorsys.* imghdr.* lib-dynload/imageop.*.so lib-dynload/rgbimg.*.so" )
-
- m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math",
- "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " +
- "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
-
- m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re",
- "json lib-dynload/_json.*.so" ) # package
-
- m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core ${PN}-importlib",
- "lib-dynload/_bisect.*.so lib-dynload/_collections.*.so lib-dynload/_heapq.*.so lib-dynload/_weakref.*.so lib-dynload/_functools.*.so " +
- "lib-dynload/array.*.so lib-dynload/itertools.*.so lib-dynload/operator.*.so lib-dynload/parser.*.so " +
- "atexit.* bisect.* code.* codeop.* collections.* _collections_abc.* contextlib.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* operator.* symbol.* repr.* token.* " +
- "tokenize.* traceback.* weakref.*" )
-
- m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
- "logging" ) # package
-
- m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
- "mailbox.*" )
-
- m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt",
- "lib-dynload/cmath.*.so lib-dynload/math.*.so lib-dynload/_random.*.so random.* sets.*" )
-
- m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
- "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
-
- m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
- "lib-dynload/mmap.*.so " )
-
- m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
- "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package
-
- m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime",
- "*Cookie*.* " +
- "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib uuid.* rfc822.* mimetools.*" )
-
- m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
- "cgi.* *HTTPServer.* SocketServer.*" )
-
- m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
- "decimal.* fractions.* numbers.*" )
-
- m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
- "pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" )
-
- m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
- "pkgutil.*")
-
- m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
- "pprint.*" )
-
- m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
- "profile.* pstats.* cProfile.* lib-dynload/_lsprof.*.so" )
-
- m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
- "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
-
- m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
- "lib-dynload/readline.*.so rlcompleter.*" )
-
- m.addPackage( "${PN}-reprlib", "Python alternate repr() implementation", "${PN}-core",
- "reprlib.py" )
-
- m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
- "lib-dynload/resource.*.so" )
-
- m.addPackage( "${PN}-selectors", "Python High-level I/O multiplexing", "${PN}-core",
- "selectors.*" )
-
- m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re ${PN}-compression",
- "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
-
- m.addPackage( "${PN}-signal", "Python set handlers for asynchronous events support", "${PN}-core ${PN}-enum",
- "signal.*" )
-
- m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors",
- "subprocess.* lib-dynload/_posixsubprocess.*.so" )
-
- m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading",
- "lib-dynload/_sqlite3.*.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
-
- m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
- "sqlite3/test" )
-
- m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
- "lib-dynload/strop.*.so string.* stringold.*" )
-
- m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
- "lib-dynload/syslog.*.so" )
-
- m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
- "pty.* tty.*" )
-
- m.addPackage( "${PN}-tests", "Python tests", "${PN}-core",
- "test" ) # package
-
- m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
- "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* queue.*" )
-
- m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
- "lib-dynload/_tkinter.*.so lib-tk tkinter" ) # package
-
- m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
- "unittest/" )
-
- m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
- "lib-dynload/nis.*.so lib-dynload/grp.*.so lib-dynload/pwd.*.so getpass.*" )
-
- m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
- "lib-dynload/_elementtree.*.so lib-dynload/pyexpat.*.so xml xmllib.*" ) # package
-
- m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
- "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" )
-
- m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
- "mailbox.*" )
-
- m.make()
diff --git a/scripts/contrib/serdevtry b/scripts/contrib/serdevtry
index 74bd7b7161..9144730e7e 100755
--- a/scripts/contrib/serdevtry
+++ b/scripts/contrib/serdevtry
@@ -2,7 +2,8 @@
# Copyright (C) 2014 Intel Corporation
#
-# Released under the MIT license (see COPYING.MIT)
+# SPDX-License-Identifier: MIT
+#
if [ "$1" = "" -o "$1" = "--help" ] ; then
echo "Usage: $0 <serial terminal command>"
diff --git a/scripts/contrib/test_build_time.sh b/scripts/contrib/test_build_time.sh
index 9e5725ae54..23f238adf6 100755
--- a/scripts/contrib/test_build_time.sh
+++ b/scripts/contrib/test_build_time.sh
@@ -3,22 +3,8 @@
# Build performance regression test script
#
# Copyright 2011 Intel Corporation
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# DESCRIPTION
# This script is intended to be used in conjunction with "git bisect run"
diff --git a/scripts/contrib/test_build_time_worker.sh b/scripts/contrib/test_build_time_worker.sh
index 8e20a9ea7d..478e8b0d03 100755
--- a/scripts/contrib/test_build_time_worker.sh
+++ b/scripts/contrib/test_build_time_worker.sh
@@ -1,5 +1,7 @@
#!/bin/bash
-
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This is an example script to be used in conjunction with test_build_time.sh
if [ "$TEST_BUILDDIR" = "" ] ; then
diff --git a/scripts/contrib/uncovered b/scripts/contrib/uncovered
index a8399ad170..f16128cb7a 100755
--- a/scripts/contrib/uncovered
+++ b/scripts/contrib/uncovered
@@ -1,23 +1,10 @@
#!/bin/bash -eur
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Find python modules uncovered by oe-seltest
#
# Copyright (c) 2016, Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# Author: Ed Bartosh <ed.bartosh@linux.intel.com>
#
diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py
index d39dd1d973..7bffa78e23 100755
--- a/scripts/contrib/verify-homepage.py
+++ b/scripts/contrib/verify-homepage.py
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
-
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This script can be used to verify HOMEPAGE values for all recipes in
# the current configuration.
# The result is influenced by network environment, since the timeout of connect url is 5 seconds as default.
@@ -27,7 +29,7 @@ logger = scriptutils.logger_create('verify_homepage')
def wgetHomepage(pn, homepage):
result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage, shell = True)
if result:
- logger.warn("%s: failed to verify HOMEPAGE: %s " % (pn, homepage))
+ logger.warning("%s: failed to verify HOMEPAGE: %s " % (pn, homepage))
return 1
else:
return 0
@@ -44,7 +46,7 @@ def verifyHomepage(bbhandler):
if realfn in checked:
continue
data = bbhandler.parse_recipe_file(realfn)
- homepage = data.getVar("HOMEPAGE", True)
+ homepage = data.getVar("HOMEPAGE")
if homepage:
try:
urllib.request.urlopen(homepage, timeout=5)
diff --git a/scripts/cp-noerror b/scripts/cp-noerror
index 35eb211be3..ab617c5d35 100755
--- a/scripts/cp-noerror
+++ b/scripts/cp-noerror
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Allow copying of $1 to $2 but if files in $1 disappear during the copy operation,
# don't error.
# Also don't error if $1 disappears.
diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index a88f35a4a3..8eefcf63a5 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -1,21 +1,8 @@
#!/bin/sh
#
# Copyright (c) 2010-2013, Intel Corporation.
-# All Rights Reserved
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-# the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# SPDX-License-Identifier: GPL-2.0-or-later
#
#
@@ -34,7 +21,7 @@ RFC=0
usage() {
CMD=$(basename $0)
cat <<EOM
-Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch]
+Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch] [-- <format-patch options>]
-b branch Branch name in the specified remote (default: current branch)
-l local branch Local branch name (default: HEAD)
-c Create an RFC (Request for Comment) patch series
@@ -57,6 +44,7 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to
$CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
$CMD -u contrib -p "RFC PATCH" -b nitin/experimental
$CMD -u contrib -i misc -b nitin/misc -d ./bitbake
+ $CMD -u contrib -r origin/master -o /tmp/out.v3 -- -v3 --in-reply-to=20170511120134.XX7799@site.com
EOM
}
@@ -108,9 +96,16 @@ while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do
a)
CPR_CONTRIB_AUTO_PUSH="1"
;;
+ --)
+ shift
+ break
+ ;;
esac
done
+shift "$((OPTIND - 1))"
+extraopts="$@"
+
if [ -z "$REMOTE" ]; then
echo "ERROR: Missing parameter -u or CPR_CONTRIB_REMOTE in env, no git remote!"
usage
@@ -128,20 +123,12 @@ fi
# Rewrite private URLs to public URLs
# Determine the repository name for use in the WEB_URL later
-case "$REMOTE_URL" in
-*@*)
- USER_RE="[A-Za-z0-9_.@][A-Za-z0-9_.@-]*\$\?"
- PROTO_RE="[a-z][a-z+]*://"
- GIT_RE="\(^\($PROTO_RE\)\?$USER_RE@\)\([^:/]*\)[:/]\(.*\)"
- REMOTE_URL=${REMOTE_URL%.git}
- REMOTE_REPO=$(echo $REMOTE_URL | sed "s#$GIT_RE#\4#")
- REMOTE_URL=$(echo $REMOTE_URL | sed "s#$GIT_RE#git://\3/\4#")
- ;;
-*)
- echo "WARNING: Unrecognized remote URL: $REMOTE_URL"
- echo " The pull and browse URLs will likely be incorrect"
- ;;
-esac
+USER_RE="[A-Za-z0-9_.@][A-Za-z0-9_.@-]*\$\?"
+PROTO_RE="[a-z][a-z+]*://"
+GIT_RE="\(^\($PROTO_RE\)\?\)\($USER_RE@\)\?\([^:/]*\)[:/]\(.*\)"
+REMOTE_URL=${REMOTE_URL%.git}
+REMOTE_REPO=$(echo $REMOTE_URL | sed "s#$GIT_RE#\5#")
+REMOTE_URL=$(echo $REMOTE_URL | sed "s#$GIT_RE#git://\4/\5#")
if [ -z "$BRANCH" ]; then
BRANCH=$(git branch | grep -e "^\* " | cut -d' ' -f2)
@@ -168,7 +155,7 @@ case "$REMOTE_URL" in
WEB_URL="http://git.pokylinux.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH"
;;
*git.openembedded.org*)
- WEB_URL="http://cgit.openembedded.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH"
+ WEB_URL="http://cgit.openembedded.org/$REMOTE_REPO/log/?h=$BRANCH"
;;
*github.com*)
WEB_URL="https://github.com/$REMOTE_REPO/tree/$BRANCH"
@@ -201,7 +188,7 @@ if [ -n "$RELDIR" ]; then
ODIR=$(realpath $ODIR)
pdir=$(pwd)
cd $RELDIR
- extraopts="--relative"
+ extraopts="$extraopts --relative"
fi
# Generate the patches and cover letter
@@ -218,7 +205,7 @@ fi
[ -n "$RELDIR" ] && cd $pdir
# Customize the cover letter
-CL="$ODIR/0000-cover-letter.patch"
+CL="$(echo $ODIR/*0000-cover-letter.patch)"
PM="$ODIR/pull-msg"
GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].' | sed 's/\(...\).*/\1/')
NEWER_GIT_VERSION=210
@@ -270,7 +257,7 @@ fi
# Replace the SUBJECT token with it.
if [ -n "$SUBJECT" ]; then
- sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL"
+ sed -i -e "s\`\*\*\* SUBJECT HERE \*\*\*\`$SUBJECT\`" "$CL"
fi
diff --git a/scripts/crosstap b/scripts/crosstap
index 58317cf91c..40856bc208 100755
--- a/scripts/crosstap
+++ b/scripts/crosstap
@@ -1,148 +1,458 @@
-#!/bin/bash
+#!/usr/bin/env python3
#
-# Run a systemtap script on remote target
+# Build a systemtap script for a given image, kernel
#
-# Examples (run on build host, target is 192.168.1.xxx):
-# $ source oe-init-build-env"
-# $ cd ~/my/systemtap/scripts"
+# Effectively script extracts needed information from set of
+# 'bitbake -e' commands and contructs proper invocation of stap on
+# host to build systemtap script for a given target.
#
-# $ crosstap root@192.168.1.xxx myscript.stp"
-# $ crosstap root@192.168.1.xxx myscript-with-args.stp 99 ninetynine"
+# By default script will compile scriptname.ko that could be copied
+# to taget and activated with 'staprun scriptname.ko' command. Or if
+# --remote user@hostname option is specified script will build, load
+# execute script on target.
#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
+# This script is very similar and inspired by crosstap shell script.
+# The major difference that this script supports user-land related
+# systemtap script, whereas crosstap could deal only with scripts
+# related to kernel.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# Copyright (c) 2018, Cisco Systems.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-function usage() {
- echo "Usage: $0 <user@hostname> <sytemtap-script> [additional systemtap-script args]"
-}
-
-function setup_usage() {
- echo ""
- echo "'crosstap' requires a local sdk build of the target system"
- echo "(or a build that includes 'tools-profile') in order to build"
- echo "kernel modules that can probe the target system."
- echo ""
- echo "Practically speaking, that means you need to do the following:"
- echo " - If you're running a pre-built image, download the release"
- echo " and/or BSP tarballs used to build the image."
- echo " - If you're working from git sources, just clone the metadata"
- echo " and BSP layers needed to build the image you'll be booting."
- echo " - Make sure you're properly set up to build a new image (see"
- echo " the BSP README and/or the widely available basic documentation"
- echo " that discusses how to build images)."
- echo " - Build an -sdk version of the image e.g.:"
- echo " $ bitbake core-image-sato-sdk"
- echo " OR"
- echo " - Build a non-sdk image but include the profiling tools:"
- echo " [ edit local.conf and add 'tools-profile' to the end of"
- echo " the EXTRA_IMAGE_FEATURES variable ]"
- echo " $ bitbake core-image-sato"
- echo ""
- echo " [ NOTE that 'crosstap' needs to be able to ssh into the target"
- echo " system, which isn't enabled by default in -minimal images. ]"
- echo ""
- echo "Once you've build the image on the host system, you're ready to"
- echo "boot it (or the equivalent pre-built image) and use 'crosstap'"
- echo "to probe it (you need to source the environment as usual first):"
- echo ""
- echo " $ source oe-init-build-env"
- echo " $ cd ~/my/systemtap/scripts"
- echo " $ crosstap root@192.168.1.xxx myscript.stp"
- echo ""
-}
-
-function systemtap_target_arch() {
- SYSTEMTAP_TARGET_ARCH=$1
- case $SYSTEMTAP_TARGET_ARCH in
- i?86)
- SYSTEMTAP_TARGET_ARCH="i386"
- ;;
- x86?64*)
- SYSTEMTAP_TARGET_ARCH="x86_64"
- ;;
- arm*)
- SYSTEMTAP_TARGET_ARCH="arm"
- ;;
- powerpc*)
- SYSTEMTAP_TARGET_ARCH="powerpc"
- ;;
- *)
- ;;
- esac
-}
-
-if [ $# -lt 2 ]; then
- usage
- exit 1
-fi
-
-if [ -z "$BUILDDIR" ]; then
- echo "Error: Unable to find the BUILDDIR environment variable."
- echo "Did you forget to source your build system environment setup script?"
- exit 1
-fi
-
-pushd $PWD
-cd $BUILDDIR
-BITBAKE_VARS=`bitbake -e virtual/kernel`
-popd
-
-STAGING_BINDIR_TOOLCHAIN=$(echo "$BITBAKE_VARS" | grep ^STAGING_BINDIR_TOOLCHAIN \
- | cut -d '=' -f2 | cut -d '"' -f2)
-STAGING_BINDIR_TOOLPREFIX=$(echo "$BITBAKE_VARS" | grep ^TARGET_PREFIX \
- | cut -d '=' -f2 | cut -d '"' -f2)
-SYSTEMTAP_HOST_INSTALLDIR=$(echo "$BITBAKE_VARS" | grep ^STAGING_DIR_NATIVE \
- | cut -d '=' -f2 | cut -d '"' -f2)
-TARGET_ARCH=$(echo "$BITBAKE_VARS" | grep ^TRANSLATED_TARGET_ARCH \
- | cut -d '=' -f2 | cut -d '"' -f2)
-TARGET_KERNEL_BUILDDIR=$(echo "$BITBAKE_VARS" | grep ^B= \
- | cut -d '=' -f2 | cut -d '"' -f2)
-
-systemtap_target_arch "$TARGET_ARCH"
-
-if [ ! -d $TARGET_KERNEL_BUILDDIR ] ||
- [ ! -f $TARGET_KERNEL_BUILDDIR/vmlinux ]; then
- echo -e "\nError: No target kernel build found."
- echo -e "Did you forget to create a local build of your image?"
- setup_usage
- exit 1
-fi
-
-if [ ! -f $SYSTEMTAP_HOST_INSTALLDIR/usr/bin/stap ]; then
- echo -e "\nError: Native (host) systemtap not found."
- echo -e "Did you accidentally build a local non-sdk image? (or forget to"
- echo -e "add 'tools-profile' to EXTRA_IMAGE_FEATURES in your local.conf)?"
- setup_usage
- exit 1
-fi
-
-target_user_hostname="$1"
-full_script_name="$2"
-script_name=$(basename "$2")
-script_base=${script_name%.*}
-shift 2
-
-${SYSTEMTAP_HOST_INSTALLDIR}/usr/bin/stap \
- -a ${SYSTEMTAP_TARGET_ARCH} \
- -B CROSS_COMPILE="${STAGING_BINDIR_TOOLCHAIN}/${STAGING_BINDIR_TOOLPREFIX}" \
- -r ${TARGET_KERNEL_BUILDDIR} \
- -I ${SYSTEMTAP_HOST_INSTALLDIR}/usr/share/systemtap/tapset \
- -R ${SYSTEMTAP_HOST_INSTALLDIR}/usr/share/systemtap/runtime \
- --remote=$target_user_hostname \
- -m $script_base \
- $full_script_name "$@"
-
-exit 0
+
+import sys
+import re
+import subprocess
+import os
+import optparse
+
+class Stap(object):
+ def __init__(self, script, module, remote):
+ self.script = script
+ self.module = module
+ self.remote = remote
+ self.stap = None
+ self.sysroot = None
+ self.runtime = None
+ self.tapset = None
+ self.arch = None
+ self.cross_compile = None
+ self.kernel_release = None
+ self.target_path = None
+ self.target_ld_library_path = None
+
+ if not self.remote:
+ if not self.module:
+ # derive module name from script
+ self.module = os.path.basename(self.script)
+ if self.module[-4:] == ".stp":
+ self.module = self.module[:-4]
+ # replace - if any with _
+ self.module = self.module.replace("-", "_")
+
+ def command(self, args):
+ ret = []
+ ret.append(self.stap)
+
+ if self.remote:
+ ret.append("--remote")
+ ret.append(self.remote)
+ else:
+ ret.append("-p4")
+ ret.append("-m")
+ ret.append(self.module)
+
+ ret.append("-a")
+ ret.append(self.arch)
+
+ ret.append("-B")
+ ret.append("CROSS_COMPILE=" + self.cross_compile)
+
+ ret.append("-r")
+ ret.append(self.kernel_release)
+
+ ret.append("-I")
+ ret.append(self.tapset)
+
+ ret.append("-R")
+ ret.append(self.runtime)
+
+ if self.sysroot:
+ ret.append("--sysroot")
+ ret.append(self.sysroot)
+
+ ret.append("--sysenv=PATH=" + self.target_path)
+ ret.append("--sysenv=LD_LIBRARY_PATH=" + self.target_ld_library_path)
+
+ ret = ret + args
+
+ ret.append(self.script)
+ return ret
+
+ def additional_environment(self):
+ ret = {}
+ ret["SYSTEMTAP_DEBUGINFO_PATH"] = "+:.debug:build"
+ return ret
+
+ def environment(self):
+ ret = os.environ.copy()
+ additional = self.additional_environment()
+ for e in additional:
+ ret[e] = additional[e]
+ return ret
+
+ def display_command(self, args):
+ additional_env = self.additional_environment()
+ command = self.command(args)
+
+ print("#!/bin/sh")
+ for e in additional_env:
+ print("export %s=\"%s\"" % (e, additional_env[e]))
+ print(" ".join(command))
+
+class BitbakeEnvInvocationException(Exception):
+ def __init__(self, message):
+ self.message = message
+
+class BitbakeEnv(object):
+ BITBAKE="bitbake"
+
+ def __init__(self, package):
+ self.package = package
+ self.cmd = BitbakeEnv.BITBAKE + " -e " + self.package
+ self.popen = subprocess.Popen(self.cmd, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ self.__lines = self.popen.stdout.readlines()
+ self.popen.wait()
+
+ self.lines = []
+ for line in self.__lines:
+ self.lines.append(line.decode('utf-8'))
+
+ def get_vars(self, vars):
+ if self.popen.returncode:
+ raise BitbakeEnvInvocationException(
+ "\nFailed to execute '" + self.cmd +
+ "' with the following message:\n" +
+ ''.join(self.lines))
+
+ search_patterns = []
+ retdict = {}
+ for var in vars:
+ # regular not exported variable
+ rexpr = "^" + var + "=\"(.*)\""
+ re_compiled = re.compile(rexpr)
+ search_patterns.append((var, re_compiled))
+
+ # exported variable
+ rexpr = "^export " + var + "=\"(.*)\""
+ re_compiled = re.compile(rexpr)
+ search_patterns.append((var, re_compiled))
+
+ for line in self.lines:
+ for var, rexpr in search_patterns:
+ m = rexpr.match(line)
+ if m:
+ value = m.group(1)
+ retdict[var] = value
+
+ # fill variables values in order how they were requested
+ ret = []
+ for var in vars:
+ ret.append(retdict.get(var))
+
+ # if it is single value list return it as scalar, not the list
+ if len(ret) == 1:
+ ret = ret[0]
+
+ return ret
+
+class ParamDiscovery(object):
+ SYMBOLS_CHECK_MESSAGE = """
+WARNING: image '%s' does not have dbg-pkgs IMAGE_FEATURES enabled and no
+"image-combined-dbg" in inherited classes is specified. As result the image
+does not have symbols for user-land processes DWARF based probes. Consider
+adding 'dbg-pkgs' to EXTRA_IMAGE_FEATURES or adding "image-combined-dbg" to
+USER_CLASSES. I.e add this line 'USER_CLASSES += "image-combined-dbg"' to
+local.conf file.
+
+Or you may use IMAGE_GEN_DEBUGFS="1" option, and then after build you need
+recombine/unpack image and image-dbg tarballs and pass resulting dir location
+with --sysroot option.
+"""
+
+ def __init__(self, image):
+ self.image = image
+
+ self.image_rootfs = None
+ self.image_features = None
+ self.image_gen_debugfs = None
+ self.inherit = None
+ self.base_bindir = None
+ self.base_sbindir = None
+ self.base_libdir = None
+ self.bindir = None
+ self.sbindir = None
+ self.libdir = None
+
+ self.staging_bindir_toolchain = None
+ self.target_prefix = None
+ self.target_arch = None
+ self.target_kernel_builddir = None
+
+ self.staging_dir_native = None
+
+ self.image_combined_dbg = False
+
+ def discover(self):
+ if self.image:
+ benv_image = BitbakeEnv(self.image)
+ (self.image_rootfs,
+ self.image_features,
+ self.image_gen_debugfs,
+ self.inherit,
+ self.base_bindir,
+ self.base_sbindir,
+ self.base_libdir,
+ self.bindir,
+ self.sbindir,
+ self.libdir
+ ) = benv_image.get_vars(
+ ("IMAGE_ROOTFS",
+ "IMAGE_FEATURES",
+ "IMAGE_GEN_DEBUGFS",
+ "INHERIT",
+ "base_bindir",
+ "base_sbindir",
+ "base_libdir",
+ "bindir",
+ "sbindir",
+ "libdir"
+ ))
+
+ benv_kernel = BitbakeEnv("virtual/kernel")
+ (self.staging_bindir_toolchain,
+ self.target_prefix,
+ self.target_arch,
+ self.target_kernel_builddir
+ ) = benv_kernel.get_vars(
+ ("STAGING_BINDIR_TOOLCHAIN",
+ "TARGET_PREFIX",
+ "TRANSLATED_TARGET_ARCH",
+ "B"
+ ))
+
+ benv_systemtap = BitbakeEnv("systemtap-native")
+ (self.staging_dir_native
+ ) = benv_systemtap.get_vars(["STAGING_DIR_NATIVE"])
+
+ if self.inherit:
+ if "image-combined-dbg" in self.inherit.split():
+ self.image_combined_dbg = True
+
+ def check(self, sysroot_option):
+ ret = True
+ if self.image_rootfs:
+ sysroot = self.image_rootfs
+ if not os.path.isdir(self.image_rootfs):
+ print("ERROR: Cannot find '" + sysroot +
+ "' directory. Was '" + self.image + "' image built?")
+ ret = False
+
+ stap = self.staging_dir_native + "/usr/bin/stap"
+ if not os.path.isfile(stap):
+ print("ERROR: Cannot find '" + stap +
+ "'. Was 'systemtap-native' built?")
+ ret = False
+
+ if not os.path.isdir(self.target_kernel_builddir):
+ print("ERROR: Cannot find '" + self.target_kernel_builddir +
+ "' directory. Was 'kernel/virtual' built?")
+ ret = False
+
+ if not sysroot_option and self.image_rootfs:
+ dbg_pkgs_found = False
+
+ if self.image_features:
+ image_features = self.image_features.split()
+ if "dbg-pkgs" in image_features:
+ dbg_pkgs_found = True
+
+ if not dbg_pkgs_found \
+ and not self.image_combined_dbg:
+ print(ParamDiscovery.SYMBOLS_CHECK_MESSAGE % (self.image))
+
+ if not ret:
+ print("")
+
+ return ret
+
+ def __map_systemtap_arch(self):
+ a = self.target_arch
+ ret = a
+ if re.match('(athlon|x86.64)$', a):
+ ret = 'x86_64'
+ elif re.match('i.86$', a):
+ ret = 'i386'
+ elif re.match('arm$', a):
+ ret = 'arm'
+ elif re.match('aarch64$', a):
+ ret = 'arm64'
+ elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a):
+ ret = 'mips'
+ elif re.match('p(pc|owerpc)(|64)', a):
+ ret = 'powerpc'
+ return ret
+
+ def fill_stap(self, stap):
+ stap.stap = self.staging_dir_native + "/usr/bin/stap"
+ if not stap.sysroot:
+ if self.image_rootfs:
+ if self.image_combined_dbg:
+ stap.sysroot = self.image_rootfs + "-dbg"
+ else:
+ stap.sysroot = self.image_rootfs
+ stap.runtime = self.staging_dir_native + "/usr/share/systemtap/runtime"
+ stap.tapset = self.staging_dir_native + "/usr/share/systemtap/tapset"
+ stap.arch = self.__map_systemtap_arch()
+ stap.cross_compile = self.staging_bindir_toolchain + "/" + \
+ self.target_prefix
+ stap.kernel_release = self.target_kernel_builddir
+
+ # do we have standard that tells in which order these need to appear
+ target_path = []
+ if self.sbindir:
+ target_path.append(self.sbindir)
+ if self.bindir:
+ target_path.append(self.bindir)
+ if self.base_sbindir:
+ target_path.append(self.base_sbindir)
+ if self.base_bindir:
+ target_path.append(self.base_bindir)
+ stap.target_path = ":".join(target_path)
+
+ target_ld_library_path = []
+ if self.libdir:
+ target_ld_library_path.append(self.libdir)
+ if self.base_libdir:
+ target_ld_library_path.append(self.base_libdir)
+ stap.target_ld_library_path = ":".join(target_ld_library_path)
+
+
+def main():
+ usage = """usage: %prog -s <systemtap-script> [options] [-- [systemtap options]]
+
+%prog cross compile given SystemTap script against given image, kernel
+
+It needs to run in environtment set for bitbake - it uses bitbake -e
+invocations to retrieve information to construct proper stap cross build
+invocation arguments. It assumes that systemtap-native is built in given
+bitbake workspace.
+
+Anything after -- option is passed directly to stap.
+
+Legacy script invocation style supported but depreciated:
+ %prog <user@hostname> <sytemtap-script> [systemtap options]
+
+To enable most out of systemtap the following site.conf or local.conf
+configuration is recommended:
+
+# enables symbol + target binaries rootfs-dbg in workspace
+IMAGE_GEN_DEBUGFS = "1"
+IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
+USER_CLASSES += "image-combined-dbg"
+
+# enables kernel debug symbols
+KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc"
+
+# minimal, just run-time systemtap configuration in target image
+PACKAGECONFIG_pn-systemtap = "monitor"
+
+# add systemtap run-time into target image if it is not there yet
+IMAGE_INSTALL_append = " systemtap"
+"""
+ option_parser = optparse.OptionParser(usage=usage)
+
+ option_parser.add_option("-s", "--script", dest="script",
+ help="specify input script FILE name",
+ metavar="FILE")
+
+ option_parser.add_option("-i", "--image", dest="image",
+ help="specify image name for which script should be compiled")
+
+ option_parser.add_option("-r", "--remote", dest="remote",
+ help="specify username@hostname of remote target to run script "
+ "optional, it assumes that remote target can be accessed through ssh")
+
+ option_parser.add_option("-m", "--module", dest="module",
+ help="specify module name, optional, has effect only if --remote is not used, "
+ "if not specified module name will be derived from passed script name")
+
+ option_parser.add_option("-y", "--sysroot", dest="sysroot",
+ help="explicitely specify image sysroot location. May need to use it in case "
+ "when IMAGE_GEN_DEBUGFS=\"1\" option is used and recombined with symbols "
+ "in different location",
+ metavar="DIR")
+
+ option_parser.add_option("-o", "--out", dest="out",
+ action="store_true",
+ help="output shell script that equvivalent invocation of this script with "
+ "given set of arguments, in given bitbake environment. It could be stored in "
+ "separate shell script and could be repeated without incuring bitbake -e "
+ "invocation overhead",
+ default=False)
+
+ option_parser.add_option("-d", "--debug", dest="debug",
+ action="store_true",
+ help="enable debug output. Use this option to see resulting stap invocation",
+ default=False)
+
+ # is invocation follow syntax from orignal crosstap shell script
+ legacy_args = False
+
+ # check if we called the legacy way
+ if len(sys.argv) >= 3:
+ if sys.argv[1].find("@") != -1 and os.path.exists(sys.argv[2]):
+ legacy_args = True
+
+ # fill options values for legacy invocation case
+ options = optparse.Values
+ options.script = sys.argv[2]
+ options.remote = sys.argv[1]
+ options.image = None
+ options.module = None
+ options.sysroot = None
+ options.out = None
+ options.debug = None
+ remaining_args = sys.argv[3:]
+
+ if not legacy_args:
+ (options, remaining_args) = option_parser.parse_args()
+
+ if not options.script or not os.path.exists(options.script):
+ print("'-s FILE' option is missing\n")
+ option_parser.print_help()
+ else:
+ stap = Stap(options.script, options.module, options.remote)
+ discovery = ParamDiscovery(options.image)
+ discovery.discover()
+ if not discovery.check(options.sysroot):
+ option_parser.print_help()
+ else:
+ stap.sysroot = options.sysroot
+ discovery.fill_stap(stap)
+
+ if options.out:
+ stap.display_command(remaining_args)
+ else:
+ cmd = stap.command(remaining_args)
+ env = stap.environment()
+
+ if options.debug:
+ print(" ".join(cmd))
+
+ os.execve(cmd[0], cmd, env)
+
+main()
diff --git a/scripts/devtool b/scripts/devtool
index 0c32c502a3..8a4f41bc37 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -4,18 +4,8 @@
#
# Copyright (C) 2014-2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
import os
@@ -51,7 +41,7 @@ class ConfigHandler(object):
def __init__(self, filename):
self.config_file = filename
- self.config_obj = configparser.SafeConfigParser()
+ self.config_obj = configparser.ConfigParser()
def get(self, section, option, default=None):
try:
@@ -113,41 +103,30 @@ def read_workspace():
externalsrc_re = re.compile(r'^EXTERNALSRC(_pn-([^ =]+))? *= *"([^"]*)"$')
for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')):
with open(fn, 'r') as f:
+ pnvalues = {}
for line in f:
res = externalsrc_re.match(line.rstrip())
if res:
- pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0]
+ recipepn = os.path.splitext(os.path.basename(fn))[0].split('_')[0]
+ pn = res.group(2) or recipepn
# Find the recipe file within the workspace, if any
bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*')
recipefile = glob.glob(os.path.join(config.workspace_path,
'recipes',
- pn,
+ recipepn,
bbfile))
if recipefile:
recipefile = recipefile[0]
- workspace[pn] = {'srctree': res.group(3),
- 'bbappend': fn,
- 'recipefile': recipefile}
- logger.debug('Found recipe %s' % workspace[pn])
-
-def create_unlockedsigs():
- """ This function will make unlocked-sigs.inc match the recipes in the
- workspace. This runs on every run of devtool, but it lets us ensure
- the unlocked items are in sync with the workspace. """
-
- confdir = os.path.join(basepath, 'conf')
- unlockedsigs = os.path.join(confdir, 'unlocked-sigs.inc')
- bb.utils.mkdirhier(confdir)
- with open(os.path.join(confdir, 'unlocked-sigs.inc'), 'w') as f:
- f.write("# DO NOT MODIFY! YOUR CHANGES WILL BE LOST.\n" +
- "# This layer was created by the OpenEmbedded devtool" +
- " utility in order to\n" +
- "# contain recipes that are unlocked.\n")
-
- f.write('SIGGEN_UNLOCKED_RECIPES += "\\\n')
- for pn in workspace:
- f.write(' ' + pn)
- f.write('"')
+ pnvalues['srctree'] = res.group(3)
+ pnvalues['bbappend'] = fn
+ pnvalues['recipefile'] = recipefile
+ elif line.startswith('# srctreebase: '):
+ pnvalues['srctreebase'] = line.split(':', 1)[1].strip()
+ if pnvalues:
+ if not pnvalues.get('srctreebase', None):
+ pnvalues['srctreebase'] = pnvalues['srctree']
+ logger.debug('Found recipe %s' % pnvalues)
+ workspace[pn] = pnvalues
def create_workspace(args, config, basepath, workspace):
if args.layerpath:
@@ -176,6 +155,7 @@ def _create_workspace(workspacedir, config, basepath):
f.write('BBFILE_PATTERN_workspacelayer = "^$' + '{LAYERDIR}/"\n')
f.write('BBFILE_PATTERN_IGNORE_EMPTY_workspacelayer = "1"\n')
f.write('BBFILE_PRIORITY_workspacelayer = "99"\n')
+ f.write('LAYERSERIES_COMPAT_workspacelayer = "${LAYERSERIES_COMPAT_core}"\n')
# Add a README file
with open(os.path.join(workspacedir, 'README'), 'w') as f:
f.write('This layer was created by the OpenEmbedded devtool utility in order to\n')
@@ -201,7 +181,11 @@ def _enable_workspace_layer(workspacedir, config, basepath):
if not os.path.exists(bblayers_conf):
logger.error('Unable to find bblayers.conf')
return
- _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, config.workspace_path)
+ if os.path.abspath(workspacedir) != os.path.abspath(config.workspace_path):
+ removedir = config.workspace_path
+ else:
+ removedir = None
+ _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, removedir)
if added:
logger.info('Enabling workspace layer in bblayers.conf')
if config.workspace_path != workspacedir:
@@ -215,6 +199,9 @@ def main():
global config
global context
+ if sys.getfilesystemencoding() != "utf-8":
+ sys.exit("Please use a locale setting which supports utf-8.\nPython can't change the filesystem locale after loading so we need a utf-8 when python starts or things won't work.")
+
context = Context(fixed_setup=False)
# Default basepath
@@ -288,13 +275,17 @@ def main():
scriptutils.logger_setup_color(logger, global_args.color)
if global_args.bbpath is None:
- tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
try:
- global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True)
- finally:
- tinfoil.shutdown()
-
- for path in [scripts_path] + global_args.bbpath.split(':'):
+ tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
+ try:
+ global_args.bbpath = tinfoil.config_data.getVar('BBPATH')
+ finally:
+ tinfoil.shutdown()
+ except bb.BBHandledException:
+ return 2
+
+ # Search BBPATH first to allow layers to override plugins in scripts_path
+ for path in global_args.bbpath.split(':') + [scripts_path]:
pluginpath = os.path.join(path, 'lib', 'devtool')
scriptutils.load_plugins(logger, plugins, pluginpath)
@@ -325,7 +316,6 @@ def main():
if not getattr(args, 'no_workspace', False):
read_workspace()
- create_unlockedsigs()
try:
ret = args.func(args, config, basepath, workspace)
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 49de74ed9b..9bfae9d832 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -1,10 +1,13 @@
#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import os
import sys
-import glob
import shutil
import errno
+import time
def mkdir(d):
try:
@@ -13,6 +16,38 @@ def mkdir(d):
if e.errno != errno.EEXIST:
raise e
+# extract the hash from past the last colon to last underscore
+def extract_sha(filename):
+ return filename.split(':')[7].split('_')[0]
+
+# get all files in a directory, extract hash and make
+# a map from hash to list of file with that hash
+def map_sha_to_files(dir_, prefix, sha_map):
+ sstate_prefix_path = dir_ + '/' + prefix + '/'
+ if not os.path.exists(sstate_prefix_path):
+ return
+ sstate_files = os.listdir(sstate_prefix_path)
+ for f in sstate_files:
+ try:
+ sha = extract_sha(f)
+ if sha not in sha_map:
+ sha_map[sha] = []
+ sha_map[sha].append(sstate_prefix_path + f)
+ except IndexError:
+ continue
+
+# given a prefix build a map of hash to list of files
+def build_sha_cache(prefix):
+ sha_map = {}
+
+ sstate_dir = sys.argv[2]
+ map_sha_to_files(sstate_dir, prefix, sha_map)
+
+ native_sstate_dir = sys.argv[2] + '/' + sys.argv[4]
+ map_sha_to_files(native_sstate_dir, prefix, sha_map)
+
+ return sha_map
+
if len(sys.argv) < 5:
print("Incorrect number of arguments specified")
print("syntax: gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir> <nativelsbstring> [filterfile]")
@@ -38,12 +73,19 @@ with open(sys.argv[1]) as f:
sigs.append(sig)
print('Gathering file list')
+start_time = time.perf_counter()
files = set()
+sstate_content_cache = {}
for s in sigs:
- p = sys.argv[2] + "/" + s[:2] + "/*" + s + "*"
- files |= set(glob.glob(p))
- p = sys.argv[2] + "/%s/" % sys.argv[4] + s[:2] + "/*" + s + "*"
- files |= set(glob.glob(p))
+ prefix = s[:2]
+ if prefix not in sstate_content_cache:
+ sstate_content_cache[prefix] = build_sha_cache(prefix)
+
+ for f in sstate_content_cache[prefix][s]:
+ files.add(f)
+
+elapsed = time.perf_counter() - start_time
+print("Gathering file list took %.1fs" % elapsed)
print('Processing files')
for f in files:
@@ -62,7 +104,11 @@ for f in files:
os.remove(dst)
if (os.stat(src).st_dev == os.stat(destdir).st_dev):
print('linking')
- os.link(src, dst)
+ try:
+ os.link(src, dst)
+ except OSError as e:
+ print('hard linking failed, copying')
+ shutil.copyfile(src, dst)
else:
print('copying')
shutil.copyfile(src, dst)
diff --git a/scripts/gen-site-config b/scripts/gen-site-config
index 7da7a0bd8a..727b809c0f 100755
--- a/scripts/gen-site-config
+++ b/scripts/gen-site-config
@@ -1,18 +1,8 @@
#! /bin/sh
# Copyright (c) 2005-2008 Wind River Systems, Inc.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
cat << EOF
AC_PREREQ(2.57)
diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py
index bf6eb17197..94a4ac5011 100644
--- a/scripts/lib/argparse_oe.py
+++ b/scripts/lib/argparse_oe.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import sys
import argparse
from collections import defaultdict, OrderedDict
@@ -167,3 +171,10 @@ class OeHelpFormatter(argparse.HelpFormatter):
return '\n'.join(lines)
else:
return super(OeHelpFormatter, self)._format_action(action)
+
+def int_positive(value):
+ ivalue = int(value)
+ if ivalue <= 0:
+ raise argparse.ArgumentTypeError(
+ "%s is not a positive int value" % value)
+ return ivalue
diff --git a/scripts/lib/build_perf/__init__.py b/scripts/lib/build_perf/__init__.py
new file mode 100644
index 0000000000..dcbb78042d
--- /dev/null
+++ b/scripts/lib/build_perf/__init__.py
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+"""Build performance test library functions"""
+
+def print_table(rows, row_fmt=None):
+ """Print data table"""
+ if not rows:
+ return
+ if not row_fmt:
+ row_fmt = ['{:{wid}} '] * len(rows[0])
+
+ # Go through the data to get maximum cell widths
+ num_cols = len(row_fmt)
+ col_widths = [0] * num_cols
+ for row in rows:
+ for i, val in enumerate(row):
+ col_widths[i] = max(col_widths[i], len(str(val)))
+
+ for row in rows:
+ print(*[row_fmt[i].format(col, wid=col_widths[i]) for i, col in enumerate(row)])
+
diff --git a/scripts/lib/build_perf/html.py b/scripts/lib/build_perf/html.py
new file mode 100644
index 0000000000..d1273c9c50
--- /dev/null
+++ b/scripts/lib/build_perf/html.py
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+"""Helper module for HTML reporting"""
+from jinja2 import Environment, PackageLoader
+
+
+env = Environment(loader=PackageLoader('build_perf', 'html'))
+
+template = env.get_template('report.html')
diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html
new file mode 100644
index 0000000000..65f1a227ad
--- /dev/null
+++ b/scripts/lib/build_perf/html/measurement_chart.html
@@ -0,0 +1,50 @@
+<script type="text/javascript">
+ chartsDrawing += 1;
+ google.charts.setOnLoadCallback(drawChart_{{ chart_elem_id }});
+ function drawChart_{{ chart_elem_id }}() {
+ var data = new google.visualization.DataTable();
+
+ // Chart options
+ var options = {
+ theme : 'material',
+ legend: 'none',
+ hAxis: { format: '', title: 'Commit number',
+ minValue: {{ chart_opts.haxis.min }},
+ maxValue: {{ chart_opts.haxis.max }} },
+ {% if measurement.type == 'time' %}
+ vAxis: { format: 'h:mm:ss' },
+ {% else %}
+ vAxis: { format: '' },
+ {% endif %}
+ pointSize: 5,
+ chartArea: { left: 80, right: 15 },
+ };
+
+ // Define data columns
+ data.addColumn('number', 'Commit');
+ data.addColumn('{{ measurement.value_type.gv_data_type }}',
+ '{{ measurement.value_type.quantity }}');
+ // Add data rows
+ data.addRows([
+ {% for sample in measurement.samples %}
+ [{{ sample.commit_num }}, {{ sample.mean.gv_value() }}],
+ {% endfor %}
+ ]);
+
+ // Finally, draw the chart
+ chart_div = document.getElementById('{{ chart_elem_id }}');
+ var chart = new google.visualization.LineChart(chart_div);
+ google.visualization.events.addListener(chart, 'ready', function () {
+ //chart_div = document.getElementById('{{ chart_elem_id }}');
+ //chart_div.innerHTML = '<img src="' + chart.getImageURI() + '">';
+ png_div = document.getElementById('{{ chart_elem_id }}_png');
+ png_div.outerHTML = '<a id="{{ chart_elem_id }}_png" href="' + chart.getImageURI() + '">PNG</a>';
+ console.log("CHART READY: {{ chart_elem_id }}");
+ chartsDrawing -= 1;
+ if (chartsDrawing == 0)
+ console.log("ALL CHARTS READY");
+ });
+ chart.draw(data, options);
+}
+</script>
+
diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html
new file mode 100644
index 0000000000..d1ba6f2578
--- /dev/null
+++ b/scripts/lib/build_perf/html/report.html
@@ -0,0 +1,289 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+{# Scripts, for visualization#}
+<!--START-OF-SCRIPTS-->
+<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
+<script type="text/javascript">
+google.charts.load('current', {'packages':['corechart']});
+var chartsDrawing = 0;
+</script>
+
+{# Render measurement result charts #}
+{% for test in test_data %}
+ {% if test.status == 'SUCCESS' %}
+ {% for measurement in test.measurements %}
+ {% set chart_elem_id = test.name + '_' + measurement.name + '_chart' %}
+ {% include 'measurement_chart.html' %}
+ {% endfor %}
+ {% endif %}
+{% endfor %}
+
+<!--END-OF-SCRIPTS-->
+
+{# Styles #}
+<style>
+.meta-table {
+ font-size: 14px;
+ text-align: left;
+ border-collapse: collapse;
+}
+.meta-table tr:nth-child(even){background-color: #f2f2f2}
+meta-table th, .meta-table td {
+ padding: 4px;
+}
+.summary {
+ margin: 0;
+ font-size: 14px;
+ text-align: left;
+ border-collapse: collapse;
+}
+summary th, .meta-table td {
+ padding: 4px;
+}
+.measurement {
+ padding: 8px 0px 8px 8px;
+ border: 2px solid #f0f0f0;
+ margin-bottom: 10px;
+}
+.details {
+ margin: 0;
+ font-size: 12px;
+ text-align: left;
+ border-collapse: collapse;
+}
+.details th {
+ padding-right: 8px;
+}
+.details.plain th {
+ font-weight: normal;
+}
+.preformatted {
+ font-family: monospace;
+ white-space: pre-wrap;
+ background-color: #f0f0f0;
+ margin-left: 10px;
+}
+hr {
+ color: #f0f0f0;
+}
+h2 {
+ font-size: 20px;
+ margin-bottom: 0px;
+ color: #707070;
+}
+h3 {
+ font-size: 16px;
+ margin: 0px;
+ color: #707070;
+}
+</style>
+
+<title>{{ title }}</title>
+</head>
+
+{% macro poky_link(commit) -%}
+ <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?id={{ commit }}">{{ commit[0:11] }}</a>
+{%- endmacro %}
+
+<body><div style="width: 700px">
+ {# Test metadata #}
+ <h2>General</h2>
+ <hr>
+ <table class="meta-table" style="width: 100%">
+ <tr>
+ <th></th>
+ <th>Current commit</th>
+ <th>Comparing with</th>
+ </tr>
+ {% for key, item in metadata.items() %}
+ <tr>
+ <th>{{ item.title }}</th>
+ {%if key == 'commit' %}
+ <td>{{ poky_link(item.value) }}</td>
+ <td>{{ poky_link(item.value_old) }}</td>
+ {% else %}
+ <td>{{ item.value }}</td>
+ <td>{{ item.value_old }}</td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </table>
+
+ {# Test result summary #}
+ <h2>Test result summary</h2>
+ <hr>
+ <table class="summary" style="width: 100%">
+ {% for test in test_data %}
+ {% if loop.index is even %}
+ {% set row_style = 'style="background-color: #f2f2f2"' %}
+ {% else %}
+ {% set row_style = 'style="background-color: #ffffff"' %}
+ {% endif %}
+ {% if test.status == 'SUCCESS' %}
+ {% for measurement in test.measurements %}
+ <tr {{ row_style }}>
+ {% if loop.index == 1 %}
+ <td>{{ test.name }}: {{ test.description }}</td>
+ {% else %}
+ {# add empty cell in place of the test name#}
+ <td></td>
+ {% endif %}
+ {% if measurement.absdiff > 0 %}
+ {% set result_style = "color: red" %}
+ {% elif measurement.absdiff == measurement.absdiff %}
+ {% set result_style = "color: green" %}
+ {% else %}
+ {% set result_style = "color: orange" %}
+ {%endif %}
+ {% if measurement.reldiff|abs > 2 %}
+ {% set result_style = result_style + "; font-weight: bold" %}
+ {% endif %}
+ <td>{{ measurement.description }}</td>
+ <td style="font-weight: bold">{{ measurement.value.mean }}</td>
+ <td style="{{ result_style }}">{{ measurement.absdiff_str }}</td>
+ <td style="{{ result_style }}">{{ measurement.reldiff_str }}</td>
+ </tr>
+ {% endfor %}
+ {% else %}
+ <td style="font-weight: bold; color: red;">{{test.status }}</td>
+ <td></td> <td></td> <td></td> <td></td>
+ {% endif %}
+ {% endfor %}
+ </table>
+
+ {# Detailed test results #}
+ {% for test in test_data %}
+ <h2>{{ test.name }}: {{ test.description }}</h2>
+ <hr>
+ {% if test.status == 'SUCCESS' %}
+ {% for measurement in test.measurements %}
+ <div class="measurement">
+ <h3>{{ measurement.description }}</h3>
+ <div style="font-weight:bold;">
+ <span style="font-size: 23px;">{{ measurement.value.mean }}</span>
+ <span style="font-size: 20px; margin-left: 12px">
+ {% if measurement.absdiff > 0 %}
+ <span style="color: red">
+ {% elif measurement.absdiff == measurement.absdiff %}
+ <span style="color: green">
+ {% else %}
+ <span style="color: orange">
+ {% endif %}
+ {{ measurement.absdiff_str }} ({{measurement.reldiff_str}})
+ </span></span>
+ </div>
+ {# Table for trendchart and the statistics #}
+ <table style="width: 100%">
+ <tr>
+ <td style="width: 75%">
+ {# Linechart #}
+ <div id="{{ test.name }}_{{ measurement.name }}_chart"></div>
+ </td>
+ <td>
+ {# Measurement statistics #}
+ <table class="details plain">
+ <tr>
+ <th>Test runs</th><td>{{ measurement.value.sample_cnt }}</td>
+ </tr><tr>
+ <th>-/+</th><td>-{{ measurement.value.minus }} / +{{ measurement.value.plus }}</td>
+ </tr><tr>
+ <th>Min</th><td>{{ measurement.value.min }}</td>
+ </tr><tr>
+ <th>Max</th><td>{{ measurement.value.max }}</td>
+ </tr><tr>
+ <th>Stdev</th><td>{{ measurement.value.stdev }}</td>
+ </tr><tr>
+ <th><div id="{{ test.name }}_{{ measurement.name }}_chart_png"></div></th>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ {# Task and recipe summary from buildstats #}
+ {% if 'buildstats' in measurement %}
+ Task resource usage
+ <table class="details" style="width:100%">
+ <tr>
+ <th>Number of tasks</th>
+ <th>Top consumers of cputime</th>
+ </tr>
+ <tr>
+ <td style="vertical-align: top">{{ measurement.buildstats.tasks.count }} ({{ measurement.buildstats.tasks.change }})</td>
+ {# Table of most resource-hungry tasks #}
+ <td>
+ <table class="details plain">
+ {% for diff in measurement.buildstats.top_consumer|reverse %}
+ <tr>
+ <th>{{ diff.pkg }}.{{ diff.task }}</th>
+ <td>{{ '%0.0f' % diff.value2 }} s</td>
+ </tr>
+ {% endfor %}
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>Biggest increase in cputime</th>
+ <th>Biggest decrease in cputime</th>
+ </tr>
+ <tr>
+ {# Table biggest increase in resource usage #}
+ <td>
+ <table class="details plain">
+ {% for diff in measurement.buildstats.top_increase|reverse %}
+ <tr>
+ <th>{{ diff.pkg }}.{{ diff.task }}</th>
+ <td>{{ '%+0.0f' % diff.absdiff }} s</td>
+ </tr>
+ {% endfor %}
+ </table>
+ </td>
+ {# Table biggest decrease in resource usage #}
+ <td>
+ <table class="details plain">
+ {% for diff in measurement.buildstats.top_decrease %}
+ <tr>
+ <th>{{ diff.pkg }}.{{ diff.task }}</th>
+ <td>{{ '%+0.0f' % diff.absdiff }} s</td>
+ </tr>
+ {% endfor %}
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ {# Recipe version differences #}
+ {% if measurement.buildstats.ver_diff %}
+ <div style="margin-top: 16px">Recipe version changes</div>
+ <table class="details">
+ {% for head, recipes in measurement.buildstats.ver_diff.items() %}
+ <tr>
+ <th colspan="2">{{ head }}</th>
+ </tr>
+ {% for name, info in recipes|sort %}
+ <tr>
+ <td>{{ name }}</td>
+ <td>{{ info }}</td>
+ </tr>
+ {% endfor %}
+ {% endfor %}
+ </table>
+ {% else %}
+ <div style="margin-top: 16px">No recipe version changes detected</div>
+ {% endif %}
+ {% endif %}
+ </div>
+ {% endfor %}
+ {# Unsuccessful test #}
+ {% else %}
+ <span style="font-size: 150%; font-weight: bold; color: red;">{{ test.status }}
+ {% if test.err_type %}<span style="font-size: 75%; font-weight: normal">({{ test.err_type }})</span>{% endif %}
+ </span>
+ <div class="preformatted">{{ test.message }}</div>
+ {% endif %}
+ {% endfor %}
+</div></body>
+</html>
+
diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py
new file mode 100644
index 0000000000..4e8e2a8a93
--- /dev/null
+++ b/scripts/lib/build_perf/report.py
@@ -0,0 +1,338 @@
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+"""Handling of build perf test reports"""
+from collections import OrderedDict, Mapping, namedtuple
+from datetime import datetime, timezone
+from numbers import Number
+from statistics import mean, stdev, variance
+
+
+AggregateTestData = namedtuple('AggregateTestData', ['metadata', 'results'])
+
+
+def isofmt_to_timestamp(string):
+ """Convert timestamp string in ISO 8601 format into unix timestamp"""
+ if '.' in string:
+ dt = datetime.strptime(string, '%Y-%m-%dT%H:%M:%S.%f')
+ else:
+ dt = datetime.strptime(string, '%Y-%m-%dT%H:%M:%S')
+ return dt.replace(tzinfo=timezone.utc).timestamp()
+
+
+def metadata_xml_to_json(elem):
+ """Convert metadata xml into JSON format"""
+ assert elem.tag == 'metadata', "Invalid metadata file format"
+
+ def _xml_to_json(elem):
+ """Convert xml element to JSON object"""
+ out = OrderedDict()
+ for child in elem.getchildren():
+ key = child.attrib.get('name', child.tag)
+ if len(child):
+ out[key] = _xml_to_json(child)
+ else:
+ out[key] = child.text
+ return out
+ return _xml_to_json(elem)
+
+
+def results_xml_to_json(elem):
+ """Convert results xml into JSON format"""
+ rusage_fields = ('ru_utime', 'ru_stime', 'ru_maxrss', 'ru_minflt',
+ 'ru_majflt', 'ru_inblock', 'ru_oublock', 'ru_nvcsw',
+ 'ru_nivcsw')
+ iostat_fields = ('rchar', 'wchar', 'syscr', 'syscw', 'read_bytes',
+ 'write_bytes', 'cancelled_write_bytes')
+
+ def _read_measurement(elem):
+ """Convert measurement to JSON"""
+ data = OrderedDict()
+ data['type'] = elem.tag
+ data['name'] = elem.attrib['name']
+ data['legend'] = elem.attrib['legend']
+ values = OrderedDict()
+
+ # SYSRES measurement
+ if elem.tag == 'sysres':
+ for subel in elem:
+ if subel.tag == 'time':
+ values['start_time'] = isofmt_to_timestamp(subel.attrib['timestamp'])
+ values['elapsed_time'] = float(subel.text)
+ elif subel.tag == 'rusage':
+ rusage = OrderedDict()
+ for field in rusage_fields:
+ if 'time' in field:
+ rusage[field] = float(subel.attrib[field])
+ else:
+ rusage[field] = int(subel.attrib[field])
+ values['rusage'] = rusage
+ elif subel.tag == 'iostat':
+ values['iostat'] = OrderedDict([(f, int(subel.attrib[f]))
+ for f in iostat_fields])
+ elif subel.tag == 'buildstats_file':
+ values['buildstats_file'] = subel.text
+ else:
+ raise TypeError("Unknown sysres value element '{}'".format(subel.tag))
+ # DISKUSAGE measurement
+ elif elem.tag == 'diskusage':
+ values['size'] = int(elem.find('size').text)
+ else:
+ raise Exception("Unknown measurement tag '{}'".format(elem.tag))
+ data['values'] = values
+ return data
+
+ def _read_testcase(elem):
+ """Convert testcase into JSON"""
+ assert elem.tag == 'testcase', "Expecting 'testcase' element instead of {}".format(elem.tag)
+
+ data = OrderedDict()
+ data['name'] = elem.attrib['name']
+ data['description'] = elem.attrib['description']
+ data['status'] = 'SUCCESS'
+ data['start_time'] = isofmt_to_timestamp(elem.attrib['timestamp'])
+ data['elapsed_time'] = float(elem.attrib['time'])
+ measurements = OrderedDict()
+
+ for subel in elem.getchildren():
+ if subel.tag == 'error' or subel.tag == 'failure':
+ data['status'] = subel.tag.upper()
+ data['message'] = subel.attrib['message']
+ data['err_type'] = subel.attrib['type']
+ data['err_output'] = subel.text
+ elif subel.tag == 'skipped':
+ data['status'] = 'SKIPPED'
+ data['message'] = subel.text
+ else:
+ measurements[subel.attrib['name']] = _read_measurement(subel)
+ data['measurements'] = measurements
+ return data
+
+ def _read_testsuite(elem):
+ """Convert suite to JSON"""
+ assert elem.tag == 'testsuite', \
+ "Expecting 'testsuite' element instead of {}".format(elem.tag)
+
+ data = OrderedDict()
+ if 'hostname' in elem.attrib:
+ data['tester_host'] = elem.attrib['hostname']
+ data['start_time'] = isofmt_to_timestamp(elem.attrib['timestamp'])
+ data['elapsed_time'] = float(elem.attrib['time'])
+ tests = OrderedDict()
+
+ for case in elem.getchildren():
+ tests[case.attrib['name']] = _read_testcase(case)
+ data['tests'] = tests
+ return data
+
+ # Main function
+ assert elem.tag == 'testsuites', "Invalid test report format"
+ assert len(elem) == 1, "Too many testsuites"
+
+ return _read_testsuite(elem.getchildren()[0])
+
+
+def aggregate_metadata(metadata):
+ """Aggregate metadata into one, basically a sanity check"""
+ mutable_keys = ('pretty_name', 'version_id')
+
+ def aggregate_obj(aggregate, obj, assert_str=True):
+ """Aggregate objects together"""
+ assert type(aggregate) is type(obj), \
+ "Type mismatch: {} != {}".format(type(aggregate), type(obj))
+ if isinstance(obj, Mapping):
+ assert set(aggregate.keys()) == set(obj.keys())
+ for key, val in obj.items():
+ aggregate_obj(aggregate[key], val, key not in mutable_keys)
+ elif isinstance(obj, list):
+ assert len(aggregate) == len(obj)
+ for i, val in enumerate(obj):
+ aggregate_obj(aggregate[i], val)
+ elif not isinstance(obj, str) or (isinstance(obj, str) and assert_str):
+ assert aggregate == obj, "Data mismatch {} != {}".format(aggregate, obj)
+
+ if not metadata:
+ return {}
+
+ # Do the aggregation
+ aggregate = metadata[0].copy()
+ for testrun in metadata[1:]:
+ aggregate_obj(aggregate, testrun)
+ aggregate['testrun_count'] = len(metadata)
+ return aggregate
+
+
+def aggregate_data(data):
+ """Aggregate multiple test results JSON structures into one"""
+
+ mutable_keys = ('status', 'message', 'err_type', 'err_output')
+
+ class SampleList(list):
+ """Container for numerical samples"""
+ pass
+
+ def new_aggregate_obj(obj):
+ """Create new object for aggregate"""
+ if isinstance(obj, Number):
+ new_obj = SampleList()
+ new_obj.append(obj)
+ elif isinstance(obj, str):
+ new_obj = obj
+ else:
+ # Lists and and dicts are kept as is
+ new_obj = obj.__class__()
+ aggregate_obj(new_obj, obj)
+ return new_obj
+
+ def aggregate_obj(aggregate, obj, assert_str=True):
+ """Recursive "aggregation" of JSON objects"""
+ if isinstance(obj, Number):
+ assert isinstance(aggregate, SampleList)
+ aggregate.append(obj)
+ return
+
+ assert type(aggregate) == type(obj), \
+ "Type mismatch: {} != {}".format(type(aggregate), type(obj))
+ if isinstance(obj, Mapping):
+ for key, val in obj.items():
+ if not key in aggregate:
+ aggregate[key] = new_aggregate_obj(val)
+ else:
+ aggregate_obj(aggregate[key], val, key not in mutable_keys)
+ elif isinstance(obj, list):
+ for i, val in enumerate(obj):
+ if i >= len(aggregate):
+ aggregate[key] = new_aggregate_obj(val)
+ else:
+ aggregate_obj(aggregate[i], val)
+ elif isinstance(obj, str):
+ # Sanity check for data
+ if assert_str:
+ assert aggregate == obj, "Data mismatch {} != {}".format(aggregate, obj)
+ else:
+ raise Exception("BUG: unable to aggregate '{}' ({})".format(type(obj), str(obj)))
+
+ if not data:
+ return {}
+
+ # Do the aggregation
+ aggregate = data[0].__class__()
+ for testrun in data:
+ aggregate_obj(aggregate, testrun)
+ return aggregate
+
+
+class MeasurementVal(float):
+ """Base class representing measurement values"""
+ gv_data_type = 'number'
+
+ def gv_value(self):
+ """Value formatting for visualization"""
+ if self != self:
+ return "null"
+ else:
+ return self
+
+
+class TimeVal(MeasurementVal):
+ """Class representing time values"""
+ quantity = 'time'
+ gv_title = 'elapsed time'
+ gv_data_type = 'timeofday'
+
+ def hms(self):
+ """Split time into hours, minutes and seconeds"""
+ hhh = int(abs(self) / 3600)
+ mmm = int((abs(self) % 3600) / 60)
+ sss = abs(self) % 60
+ return hhh, mmm, sss
+
+ def __str__(self):
+ if self != self:
+ return "nan"
+ hh, mm, ss = self.hms()
+ sign = '-' if self < 0 else ''
+ if hh > 0:
+ return '{}{:d}:{:02d}:{:02.0f}'.format(sign, hh, mm, ss)
+ elif mm > 0:
+ return '{}{:d}:{:04.1f}'.format(sign, mm, ss)
+ elif ss > 1:
+ return '{}{:.1f} s'.format(sign, ss)
+ else:
+ return '{}{:.2f} s'.format(sign, ss)
+
+ def gv_value(self):
+ """Value formatting for visualization"""
+ if self != self:
+ return "null"
+ hh, mm, ss = self.hms()
+ return [hh, mm, int(ss), int(ss*1000) % 1000]
+
+
+class SizeVal(MeasurementVal):
+ """Class representing time values"""
+ quantity = 'size'
+ gv_title = 'size in MiB'
+ gv_data_type = 'number'
+
+ def __str__(self):
+ if self != self:
+ return "nan"
+ if abs(self) < 1024:
+ return '{:.1f} kiB'.format(self)
+ elif abs(self) < 1048576:
+ return '{:.2f} MiB'.format(self / 1024)
+ else:
+ return '{:.2f} GiB'.format(self / 1048576)
+
+ def gv_value(self):
+ """Value formatting for visualization"""
+ if self != self:
+ return "null"
+ return self / 1024
+
+def measurement_stats(meas, prefix=''):
+ """Get statistics of a measurement"""
+ if not meas:
+ return {prefix + 'sample_cnt': 0,
+ prefix + 'mean': MeasurementVal('nan'),
+ prefix + 'stdev': MeasurementVal('nan'),
+ prefix + 'variance': MeasurementVal('nan'),
+ prefix + 'min': MeasurementVal('nan'),
+ prefix + 'max': MeasurementVal('nan'),
+ prefix + 'minus': MeasurementVal('nan'),
+ prefix + 'plus': MeasurementVal('nan')}
+
+ stats = {'name': meas['name']}
+ if meas['type'] == 'sysres':
+ val_cls = TimeVal
+ values = meas['values']['elapsed_time']
+ elif meas['type'] == 'diskusage':
+ val_cls = SizeVal
+ values = meas['values']['size']
+ else:
+ raise Exception("Unknown measurement type '{}'".format(meas['type']))
+ stats['val_cls'] = val_cls
+ stats['quantity'] = val_cls.quantity
+ stats[prefix + 'sample_cnt'] = len(values)
+
+ mean_val = val_cls(mean(values))
+ min_val = val_cls(min(values))
+ max_val = val_cls(max(values))
+
+ stats[prefix + 'mean'] = mean_val
+ if len(values) > 1:
+ stats[prefix + 'stdev'] = val_cls(stdev(values))
+ stats[prefix + 'variance'] = val_cls(variance(values))
+ else:
+ stats[prefix + 'stdev'] = float('nan')
+ stats[prefix + 'variance'] = float('nan')
+ stats[prefix + 'min'] = min_val
+ stats[prefix + 'max'] = max_val
+ stats[prefix + 'minus'] = val_cls(mean_val - min_val)
+ stats[prefix + 'plus'] = val_cls(max_val - mean_val)
+
+ return stats
+
diff --git a/scripts/lib/build_perf/scrape-html-report.js b/scripts/lib/build_perf/scrape-html-report.js
new file mode 100644
index 0000000000..05a1f57001
--- /dev/null
+++ b/scripts/lib/build_perf/scrape-html-report.js
@@ -0,0 +1,56 @@
+var fs = require('fs');
+var system = require('system');
+var page = require('webpage').create();
+
+// Examine console log for message from chart drawing
+page.onConsoleMessage = function(msg) {
+ console.log(msg);
+ if (msg === "ALL CHARTS READY") {
+ window.charts_ready = true;
+ }
+ else if (msg.slice(0, 11) === "CHART READY") {
+ var chart_id = msg.split(" ")[2];
+ console.log('grabbing ' + chart_id);
+ var png_data = page.evaluate(function (chart_id) {
+ var chart_div = document.getElementById(chart_id + '_png');
+ return chart_div.outerHTML;
+ }, chart_id);
+ fs.write(args[2] + '/' + chart_id + '.png', png_data, 'w');
+ }
+};
+
+// Check command line arguments
+var args = system.args;
+if (args.length != 3) {
+ console.log("USAGE: " + args[0] + " REPORT_HTML OUT_DIR\n");
+ phantom.exit(1);
+}
+
+// Open the web page
+page.open(args[1], function(status) {
+ if (status == 'fail') {
+ console.log("Failed to open file '" + args[1] + "'");
+ phantom.exit(1);
+ }
+});
+
+// Check status every 100 ms
+interval = window.setInterval(function () {
+ //console.log('waiting');
+ if (window.charts_ready) {
+ clearTimeout(timer);
+ clearInterval(interval);
+
+ var fname = args[1].replace(/\/+$/, "").split("/").pop()
+ console.log("saving " + fname);
+ fs.write(args[2] + '/' + fname, page.content, 'w');
+ phantom.exit(0);
+ }
+}, 100);
+
+// Time-out after 10 seconds
+timer = window.setTimeout(function () {
+ clearInterval(interval);
+ console.log("ERROR: timeout");
+ phantom.exit(1);
+}, 10000);
diff --git a/scripts/lib/buildstats.py b/scripts/lib/buildstats.py
new file mode 100644
index 0000000000..c69b5bf4d7
--- /dev/null
+++ b/scripts/lib/buildstats.py
@@ -0,0 +1,346 @@
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+"""Functionality for analyzing buildstats"""
+import json
+import logging
+import os
+import re
+from collections import namedtuple,OrderedDict
+from statistics import mean
+
+
+log = logging.getLogger()
+
+
+taskdiff_fields = ('pkg', 'pkg_op', 'task', 'task_op', 'value1', 'value2',
+ 'absdiff', 'reldiff')
+TaskDiff = namedtuple('TaskDiff', ' '.join(taskdiff_fields))
+
+
+class BSError(Exception):
+ """Error handling of buildstats"""
+ pass
+
+
+class BSTask(dict):
+ def __init__(self, *args, **kwargs):
+ self['start_time'] = None
+ self['elapsed_time'] = None
+ self['status'] = None
+ self['iostat'] = {}
+ self['rusage'] = {}
+ self['child_rusage'] = {}
+ super(BSTask, self).__init__(*args, **kwargs)
+
+ @property
+ def cputime(self):
+ """Sum of user and system time taken by the task"""
+ rusage = self['rusage']['ru_stime'] + self['rusage']['ru_utime']
+ if self['child_rusage']:
+ # Child rusage may have been optimized out
+ return rusage + self['child_rusage']['ru_stime'] + self['child_rusage']['ru_utime']
+ else:
+ return rusage
+
+ @property
+ def walltime(self):
+ """Elapsed wall clock time"""
+ return self['elapsed_time']
+
+ @property
+ def read_bytes(self):
+ """Bytes read from the block layer"""
+ return self['iostat']['read_bytes']
+
+ @property
+ def write_bytes(self):
+ """Bytes written to the block layer"""
+ return self['iostat']['write_bytes']
+
+ @property
+ def read_ops(self):
+ """Number of read operations on the block layer"""
+ if self['child_rusage']:
+ # Child rusage may have been optimized out
+ return self['rusage']['ru_inblock'] + self['child_rusage']['ru_inblock']
+ else:
+ return self['rusage']['ru_inblock']
+
+ @property
+ def write_ops(self):
+ """Number of write operations on the block layer"""
+ if self['child_rusage']:
+ # Child rusage may have been optimized out
+ return self['rusage']['ru_oublock'] + self['child_rusage']['ru_oublock']
+ else:
+ return self['rusage']['ru_oublock']
+
+ @classmethod
+ def from_file(cls, buildstat_file):
+ """Read buildstat text file"""
+ bs_task = cls()
+ log.debug("Reading task buildstats from %s", buildstat_file)
+ end_time = None
+ with open(buildstat_file) as fobj:
+ for line in fobj.readlines():
+ key, val = line.split(':', 1)
+ val = val.strip()
+ if key == 'Started':
+ start_time = float(val)
+ bs_task['start_time'] = start_time
+ elif key == 'Ended':
+ end_time = float(val)
+ elif key.startswith('IO '):
+ split = key.split()
+ bs_task['iostat'][split[1]] = int(val)
+ elif key.find('rusage') >= 0:
+ split = key.split()
+ ru_key = split[-1]
+ if ru_key in ('ru_stime', 'ru_utime'):
+ val = float(val)
+ else:
+ val = int(val)
+ ru_type = 'rusage' if split[0] == 'rusage' else \
+ 'child_rusage'
+ bs_task[ru_type][ru_key] = val
+ elif key == 'Status':
+ bs_task['status'] = val
+ if end_time is not None and start_time is not None:
+ bs_task['elapsed_time'] = end_time - start_time
+ else:
+ raise BSError("{} looks like a invalid buildstats file".format(buildstat_file))
+ return bs_task
+
+
+class BSTaskAggregate(object):
+ """Class representing multiple runs of the same task"""
+ properties = ('cputime', 'walltime', 'read_bytes', 'write_bytes',
+ 'read_ops', 'write_ops')
+
+ def __init__(self, tasks=None):
+ self._tasks = tasks or []
+ self._properties = {}
+
+ def __getattr__(self, name):
+ if name in self.properties:
+ if name not in self._properties:
+ # Calculate properties on demand only. We only provide mean
+ # value, so far
+ self._properties[name] = mean([getattr(t, name) for t in self._tasks])
+ return self._properties[name]
+ else:
+ raise AttributeError("'BSTaskAggregate' has no attribute '{}'".format(name))
+
+ def append(self, task):
+ """Append new task"""
+ # Reset pre-calculated properties
+ assert isinstance(task, BSTask), "Type is '{}' instead of 'BSTask'".format(type(task))
+ self._properties = {}
+ self._tasks.append(task)
+
+
+class BSRecipe(object):
+ """Class representing buildstats of one recipe"""
+ def __init__(self, name, epoch, version, revision):
+ self.name = name
+ self.epoch = epoch
+ self.version = version
+ self.revision = revision
+ if epoch is None:
+ self.evr = "{}-{}".format(version, revision)
+ else:
+ self.evr = "{}_{}-{}".format(epoch, version, revision)
+ self.tasks = {}
+
+ def aggregate(self, bsrecipe):
+ """Aggregate data of another recipe buildstats"""
+ if self.nevr != bsrecipe.nevr:
+ raise ValueError("Refusing to aggregate buildstats, recipe version "
+ "differs: {} vs. {}".format(self.nevr, bsrecipe.nevr))
+ if set(self.tasks.keys()) != set(bsrecipe.tasks.keys()):
+ raise ValueError("Refusing to aggregate buildstats, set of tasks "
+ "in {} differ".format(self.name))
+
+ for taskname, taskdata in bsrecipe.tasks.items():
+ if not isinstance(self.tasks[taskname], BSTaskAggregate):
+ self.tasks[taskname] = BSTaskAggregate([self.tasks[taskname]])
+ self.tasks[taskname].append(taskdata)
+
+ @property
+ def nevr(self):
+ return self.name + '-' + self.evr
+
+
+class BuildStats(dict):
+ """Class representing buildstats of one build"""
+
+ @property
+ def num_tasks(self):
+ """Get number of tasks"""
+ num = 0
+ for recipe in self.values():
+ num += len(recipe.tasks)
+ return num
+
+ @classmethod
+ def from_json(cls, bs_json):
+ """Create new BuildStats object from JSON object"""
+ buildstats = cls()
+ for recipe in bs_json:
+ if recipe['name'] in buildstats:
+ raise BSError("Cannot handle multiple versions of the same "
+ "package ({})".format(recipe['name']))
+ bsrecipe = BSRecipe(recipe['name'], recipe['epoch'],
+ recipe['version'], recipe['revision'])
+ for task, data in recipe['tasks'].items():
+ bsrecipe.tasks[task] = BSTask(data)
+
+ buildstats[recipe['name']] = bsrecipe
+
+ return buildstats
+
+ @staticmethod
+ def from_file_json(path):
+ """Load buildstats from a JSON file"""
+ with open(path) as fobj:
+ bs_json = json.load(fobj)
+ return BuildStats.from_json(bs_json)
+
+
+ @staticmethod
+ def split_nevr(nevr):
+ """Split name and version information from recipe "nevr" string"""
+ n_e_v, revision = nevr.rsplit('-', 1)
+ match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[0-9]\S*)$',
+ n_e_v)
+ if not match:
+ # If we're not able to parse a version starting with a number, just
+ # take the part after last dash
+ match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[^-]+)$',
+ n_e_v)
+ name = match.group('name')
+ version = match.group('version')
+ epoch = match.group('epoch')
+ return name, epoch, version, revision
+
+ @classmethod
+ def from_dir(cls, path):
+ """Load buildstats from a buildstats directory"""
+ if not os.path.isfile(os.path.join(path, 'build_stats')):
+ raise BSError("{} does not look like a buildstats directory".format(path))
+
+ log.debug("Reading buildstats directory %s", path)
+
+ buildstats = cls()
+ subdirs = os.listdir(path)
+ for dirname in subdirs:
+ recipe_dir = os.path.join(path, dirname)
+ if not os.path.isdir(recipe_dir):
+ continue
+ name, epoch, version, revision = cls.split_nevr(dirname)
+ bsrecipe = BSRecipe(name, epoch, version, revision)
+ for task in os.listdir(recipe_dir):
+ bsrecipe.tasks[task] = BSTask.from_file(
+ os.path.join(recipe_dir, task))
+ if name in buildstats:
+ raise BSError("Cannot handle multiple versions of the same "
+ "package ({})".format(name))
+ buildstats[name] = bsrecipe
+
+ return buildstats
+
+ def aggregate(self, buildstats):
+ """Aggregate other buildstats into this"""
+ if set(self.keys()) != set(buildstats.keys()):
+ raise ValueError("Refusing to aggregate buildstats, set of "
+ "recipes is different: %s" % (set(self.keys()) ^ set(buildstats.keys())))
+ for pkg, data in buildstats.items():
+ self[pkg].aggregate(data)
+
+
+def diff_buildstats(bs1, bs2, stat_attr, min_val=None, min_absdiff=None, only_tasks=[]):
+ """Compare the tasks of two buildstats"""
+ tasks_diff = []
+ pkgs = set(bs1.keys()).union(set(bs2.keys()))
+ for pkg in pkgs:
+ tasks1 = bs1[pkg].tasks if pkg in bs1 else {}
+ tasks2 = bs2[pkg].tasks if pkg in bs2 else {}
+ if only_tasks:
+ tasks1 = {k: v for k, v in tasks1.items() if k in only_tasks}
+ tasks2 = {k: v for k, v in tasks2.items() if k in only_tasks}
+
+ if not tasks1:
+ pkg_op = '+'
+ elif not tasks2:
+ pkg_op = '-'
+ else:
+ pkg_op = ' '
+
+ for task in set(tasks1.keys()).union(set(tasks2.keys())):
+ task_op = ' '
+ if task in tasks1:
+ val1 = getattr(bs1[pkg].tasks[task], stat_attr)
+ else:
+ task_op = '+'
+ val1 = 0
+ if task in tasks2:
+ val2 = getattr(bs2[pkg].tasks[task], stat_attr)
+ else:
+ val2 = 0
+ task_op = '-'
+
+ if val1 == 0:
+ reldiff = float('inf')
+ else:
+ reldiff = 100 * (val2 - val1) / val1
+
+ if min_val and max(val1, val2) < min_val:
+ log.debug("Filtering out %s:%s (%s)", pkg, task,
+ max(val1, val2))
+ continue
+ if min_absdiff and abs(val2 - val1) < min_absdiff:
+ log.debug("Filtering out %s:%s (difference of %s)", pkg, task,
+ val2-val1)
+ continue
+ tasks_diff.append(TaskDiff(pkg, pkg_op, task, task_op, val1, val2,
+ val2-val1, reldiff))
+ return tasks_diff
+
+
+class BSVerDiff(object):
+ """Class representing recipe version differences between two buildstats"""
+ def __init__(self, bs1, bs2):
+ RecipeVerDiff = namedtuple('RecipeVerDiff', 'left right')
+
+ recipes1 = set(bs1.keys())
+ recipes2 = set(bs2.keys())
+
+ self.new = dict([(r, bs2[r]) for r in sorted(recipes2 - recipes1)])
+ self.dropped = dict([(r, bs1[r]) for r in sorted(recipes1 - recipes2)])
+ self.echanged = {}
+ self.vchanged = {}
+ self.rchanged = {}
+ self.unchanged = {}
+ self.empty_diff = False
+
+ common = recipes2.intersection(recipes1)
+ if common:
+ for recipe in common:
+ rdiff = RecipeVerDiff(bs1[recipe], bs2[recipe])
+ if bs1[recipe].epoch != bs2[recipe].epoch:
+ self.echanged[recipe] = rdiff
+ elif bs1[recipe].version != bs2[recipe].version:
+ self.vchanged[recipe] = rdiff
+ elif bs1[recipe].revision != bs2[recipe].revision:
+ self.rchanged[recipe] = rdiff
+ else:
+ self.unchanged[recipe] = rdiff
+
+ if len(recipes1) == len(recipes2) == len(self.unchanged):
+ self.empty_diff = True
+
+ def __bool__(self):
+ return not self.empty_diff
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
new file mode 100644
index 0000000000..5aeec2f00f
--- /dev/null
+++ b/scripts/lib/checklayer/__init__.py
@@ -0,0 +1,398 @@
+# Yocto Project layer check tool
+#
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import re
+import subprocess
+from enum import Enum
+
+import bb.tinfoil
+
+class LayerType(Enum):
+ BSP = 0
+ DISTRO = 1
+ SOFTWARE = 2
+ ERROR_NO_LAYER_CONF = 98
+ ERROR_BSP_DISTRO = 99
+
+def _get_configurations(path):
+ configs = []
+
+ for f in os.listdir(path):
+ file_path = os.path.join(path, f)
+ if os.path.isfile(file_path) and f.endswith('.conf'):
+ configs.append(f[:-5]) # strip .conf
+ return configs
+
+def _get_layer_collections(layer_path, lconf=None, data=None):
+ import bb.parse
+ import bb.data
+
+ if lconf is None:
+ lconf = os.path.join(layer_path, 'conf', 'layer.conf')
+
+ if data is None:
+ ldata = bb.data.init()
+ bb.parse.init_parser(ldata)
+ else:
+ ldata = data.createCopy()
+
+ ldata.setVar('LAYERDIR', layer_path)
+ try:
+ ldata = bb.parse.handle(lconf, ldata, include=True)
+ except:
+ raise RuntimeError("Parsing of layer.conf from layer: %s failed" % layer_path)
+ ldata.expandVarref('LAYERDIR')
+
+ collections = (ldata.getVar('BBFILE_COLLECTIONS') or '').split()
+ if not collections:
+ name = os.path.basename(layer_path)
+ collections = [name]
+
+ collections = {c: {} for c in collections}
+ for name in collections:
+ priority = ldata.getVar('BBFILE_PRIORITY_%s' % name)
+ pattern = ldata.getVar('BBFILE_PATTERN_%s' % name)
+ depends = ldata.getVar('LAYERDEPENDS_%s' % name)
+ compat = ldata.getVar('LAYERSERIES_COMPAT_%s' % name)
+ collections[name]['priority'] = priority
+ collections[name]['pattern'] = pattern
+ collections[name]['depends'] = depends
+ collections[name]['compat'] = compat
+
+ return collections
+
+def _detect_layer(layer_path):
+ """
+ Scans layer directory to detect what type of layer
+ is BSP, Distro or Software.
+
+ Returns a dictionary with layer name, type and path.
+ """
+
+ layer = {}
+ layer_name = os.path.basename(layer_path)
+
+ layer['name'] = layer_name
+ layer['path'] = layer_path
+ layer['conf'] = {}
+
+ if not os.path.isfile(os.path.join(layer_path, 'conf', 'layer.conf')):
+ layer['type'] = LayerType.ERROR_NO_LAYER_CONF
+ return layer
+
+ machine_conf = os.path.join(layer_path, 'conf', 'machine')
+ distro_conf = os.path.join(layer_path, 'conf', 'distro')
+
+ is_bsp = False
+ is_distro = False
+
+ if os.path.isdir(machine_conf):
+ machines = _get_configurations(machine_conf)
+ if machines:
+ is_bsp = True
+
+ if os.path.isdir(distro_conf):
+ distros = _get_configurations(distro_conf)
+ if distros:
+ is_distro = True
+
+ if is_bsp and is_distro:
+ layer['type'] = LayerType.ERROR_BSP_DISTRO
+ elif is_bsp:
+ layer['type'] = LayerType.BSP
+ layer['conf']['machines'] = machines
+ elif is_distro:
+ layer['type'] = LayerType.DISTRO
+ layer['conf']['distros'] = distros
+ else:
+ layer['type'] = LayerType.SOFTWARE
+
+ layer['collections'] = _get_layer_collections(layer['path'])
+
+ return layer
+
+def detect_layers(layer_directories, no_auto):
+ layers = []
+
+ for directory in layer_directories:
+ directory = os.path.realpath(directory)
+ if directory[-1] == '/':
+ directory = directory[0:-1]
+
+ if no_auto:
+ conf_dir = os.path.join(directory, 'conf')
+ if os.path.isdir(conf_dir):
+ layer = _detect_layer(directory)
+ if layer:
+ layers.append(layer)
+ else:
+ for root, dirs, files in os.walk(directory):
+ dir_name = os.path.basename(root)
+ conf_dir = os.path.join(root, 'conf')
+ if os.path.isdir(conf_dir):
+ layer = _detect_layer(root)
+ if layer:
+ layers.append(layer)
+
+ return layers
+
+def _find_layer_depends(depend, layers):
+ for layer in layers:
+ for collection in layer['collections']:
+ if depend == collection:
+ return layer
+ return None
+
+def add_layer_dependencies(bblayersconf, layer, layers, logger):
+ def recurse_dependencies(depends, layer, layers, logger, ret = []):
+ logger.debug('Processing dependencies %s for layer %s.' % \
+ (depends, layer['name']))
+
+ for depend in depends.split():
+ # core (oe-core) is suppose to be provided
+ if depend == 'core':
+ continue
+
+ layer_depend = _find_layer_depends(depend, layers)
+ if not layer_depend:
+ logger.error('Layer %s depends on %s and isn\'t found.' % \
+ (layer['name'], depend))
+ ret = None
+ continue
+
+ # We keep processing, even if ret is None, this allows us to report
+ # multiple errors at once
+ if ret is not None and layer_depend not in ret:
+ ret.append(layer_depend)
+ else:
+ # we might have processed this dependency already, in which case
+ # we should not do it again (avoid recursive loop)
+ continue
+
+ # Recursively process...
+ if 'collections' not in layer_depend:
+ continue
+
+ for collection in layer_depend['collections']:
+ collect_deps = layer_depend['collections'][collection]['depends']
+ if not collect_deps:
+ continue
+ ret = recurse_dependencies(collect_deps, layer_depend, layers, logger, ret)
+
+ return ret
+
+ layer_depends = []
+ for collection in layer['collections']:
+ depends = layer['collections'][collection]['depends']
+ if not depends:
+ continue
+
+ layer_depends = recurse_dependencies(depends, layer, layers, logger, layer_depends)
+
+ # Note: [] (empty) is allowed, None is not!
+ if layer_depends is None:
+ return False
+ else:
+ add_layers(bblayersconf, layer_depends, logger)
+
+ return True
+
+def add_layers(bblayersconf, layers, logger):
+ # Don't add a layer that is already present.
+ added = set()
+ output = check_command('Getting existing layers failed.', 'bitbake-layers show-layers').decode('utf-8')
+ for layer, path, pri in re.findall(r'^(\S+) +([^\n]*?) +(\d+)$', output, re.MULTILINE):
+ added.add(path)
+
+ with open(bblayersconf, 'a+') as f:
+ for layer in layers:
+ logger.info('Adding layer %s' % layer['name'])
+ name = layer['name']
+ path = layer['path']
+ if path in added:
+ logger.info('%s is already in %s' % (name, bblayersconf))
+ else:
+ added.add(path)
+ f.write("\nBBLAYERS += \"%s\"\n" % path)
+ return True
+
+def check_command(error_msg, cmd, cwd=None):
+ '''
+ Run a command under a shell, capture stdout and stderr in a single stream,
+ throw an error when command returns non-zero exit code. Returns the output.
+ '''
+
+ p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=cwd)
+ output, _ = p.communicate()
+ if p.returncode:
+ msg = "%s\nCommand: %s\nOutput:\n%s" % (error_msg, cmd, output.decode('utf-8'))
+ raise RuntimeError(msg)
+ return output
+
+def get_signatures(builddir, failsafe=False, machine=None):
+ import re
+
+ # some recipes needs to be excluded like meta-world-pkgdata
+ # because a layer can add recipes to a world build so signature
+ # will be change
+ exclude_recipes = ('meta-world-pkgdata',)
+
+ sigs = {}
+ tune2tasks = {}
+
+ cmd = 'BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE BB_SIGNATURE_HANDLER" BB_SIGNATURE_HANDLER="OEBasicHash" '
+ if machine:
+ cmd += 'MACHINE=%s ' % machine
+ cmd += 'bitbake '
+ if failsafe:
+ cmd += '-k '
+ cmd += '-S none world'
+ sigs_file = os.path.join(builddir, 'locked-sigs.inc')
+ if os.path.exists(sigs_file):
+ os.unlink(sigs_file)
+ try:
+ check_command('Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities.',
+ cmd, builddir)
+ except RuntimeError as ex:
+ if failsafe and os.path.exists(sigs_file):
+ # Ignore the error here. Most likely some recipes active
+ # in a world build lack some dependencies. There is a
+ # separate test_machine_world_build which exposes the
+ # failure.
+ pass
+ else:
+ raise
+
+ sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$")
+ tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*")
+ current_tune = None
+ with open(sigs_file, 'r') as f:
+ for line in f.readlines():
+ line = line.strip()
+ t = tune_regex.search(line)
+ if t:
+ current_tune = t.group('tune')
+ s = sig_regex.match(line)
+ if s:
+ exclude = False
+ for er in exclude_recipes:
+ (recipe, task) = s.group('task').split(':')
+ if er == recipe:
+ exclude = True
+ break
+ if exclude:
+ continue
+
+ sigs[s.group('task')] = s.group('hash')
+ tune2tasks.setdefault(current_tune, []).append(s.group('task'))
+
+ if not sigs:
+ raise RuntimeError('Can\'t load signatures from %s' % sigs_file)
+
+ return (sigs, tune2tasks)
+
+def get_depgraph(targets=['world'], failsafe=False):
+ '''
+ Returns the dependency graph for the given target(s).
+ The dependency graph is taken directly from DepTreeEvent.
+ '''
+ depgraph = None
+ with bb.tinfoil.Tinfoil() as tinfoil:
+ tinfoil.prepare(config_only=False)
+ tinfoil.set_event_mask(['bb.event.NoProvider', 'bb.event.DepTreeGenerated', 'bb.command.CommandCompleted'])
+ if not tinfoil.run_command('generateDepTreeEvent', targets, 'do_build'):
+ raise RuntimeError('starting generateDepTreeEvent failed')
+ while True:
+ event = tinfoil.wait_event(timeout=1000)
+ if event:
+ if isinstance(event, bb.command.CommandFailed):
+ raise RuntimeError('Generating dependency information failed: %s' % event.error)
+ elif isinstance(event, bb.command.CommandCompleted):
+ break
+ elif isinstance(event, bb.event.NoProvider):
+ if failsafe:
+ # The event is informational, we will get information about the
+ # remaining dependencies eventually and thus can ignore this
+ # here like we do in get_signatures(), if desired.
+ continue
+ if event._reasons:
+ raise RuntimeError('Nothing provides %s: %s' % (event._item, event._reasons))
+ else:
+ raise RuntimeError('Nothing provides %s.' % (event._item))
+ elif isinstance(event, bb.event.DepTreeGenerated):
+ depgraph = event._depgraph
+
+ if depgraph is None:
+ raise RuntimeError('Could not retrieve the depgraph.')
+ return depgraph
+
+def compare_signatures(old_sigs, curr_sigs):
+ '''
+ Compares the result of two get_signatures() calls. Returns None if no
+ problems found, otherwise a string that can be used as additional
+ explanation in self.fail().
+ '''
+ # task -> (old signature, new signature)
+ sig_diff = {}
+ for task in old_sigs:
+ if task in curr_sigs and \
+ old_sigs[task] != curr_sigs[task]:
+ sig_diff[task] = (old_sigs[task], curr_sigs[task])
+
+ if not sig_diff:
+ return None
+
+ # Beware, depgraph uses task=<pn>.<taskname> whereas get_signatures()
+ # uses <pn>:<taskname>. Need to convert sometimes. The output follows
+ # the convention from get_signatures() because that seems closer to
+ # normal bitbake output.
+ def sig2graph(task):
+ pn, taskname = task.rsplit(':', 1)
+ return pn + '.' + taskname
+ def graph2sig(task):
+ pn, taskname = task.rsplit('.', 1)
+ return pn + ':' + taskname
+ depgraph = get_depgraph(failsafe=True)
+ depends = depgraph['tdepends']
+
+ # If a task A has a changed signature, but none of its
+ # dependencies, then we need to report it because it is
+ # the one which introduces a change. Any task depending on
+ # A (directly or indirectly) will also have a changed
+ # signature, but we don't need to report it. It might have
+ # its own changes, which will become apparent once the
+ # issues that we do report are fixed and the test gets run
+ # again.
+ sig_diff_filtered = []
+ for task, (old_sig, new_sig) in sig_diff.items():
+ deps_tainted = False
+ for dep in depends.get(sig2graph(task), ()):
+ if graph2sig(dep) in sig_diff:
+ deps_tainted = True
+ break
+ if not deps_tainted:
+ sig_diff_filtered.append((task, old_sig, new_sig))
+
+ msg = []
+ msg.append('%d signatures changed, initial differences (first hash before, second after):' %
+ len(sig_diff))
+ for diff in sorted(sig_diff_filtered):
+ recipe, taskname = diff[0].rsplit(':', 1)
+ cmd = 'bitbake-diffsigs --task %s %s --signature %s %s' % \
+ (recipe, taskname, diff[1], diff[2])
+ msg.append(' %s: %s -> %s' % diff)
+ msg.append(' %s' % cmd)
+ try:
+ output = check_command('Determining signature difference failed.',
+ cmd).decode('utf-8')
+ except RuntimeError as error:
+ output = str(error)
+ if output:
+ msg.extend([' ' + line for line in output.splitlines()])
+ msg.append('')
+ return '\n'.join(msg)
diff --git a/scripts/lib/checklayer/case.py b/scripts/lib/checklayer/case.py
new file mode 100644
index 0000000000..fa9dee384e
--- /dev/null
+++ b/scripts/lib/checklayer/case.py
@@ -0,0 +1,9 @@
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.core.case import OETestCase
+
+class OECheckLayerTestCase(OETestCase):
+ pass
diff --git a/scripts/lib/checklayer/cases/__init__.py b/scripts/lib/checklayer/cases/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/scripts/lib/checklayer/cases/__init__.py
diff --git a/scripts/lib/checklayer/cases/bsp.py b/scripts/lib/checklayer/cases/bsp.py
new file mode 100644
index 0000000000..7fd56f5d36
--- /dev/null
+++ b/scripts/lib/checklayer/cases/bsp.py
@@ -0,0 +1,206 @@
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import unittest
+
+from checklayer import LayerType, get_signatures, check_command, get_depgraph
+from checklayer.case import OECheckLayerTestCase
+
+class BSPCheckLayer(OECheckLayerTestCase):
+ @classmethod
+ def setUpClass(self):
+ if self.tc.layer['type'] != LayerType.BSP:
+ raise unittest.SkipTest("BSPCheckLayer: Layer %s isn't BSP one." %\
+ self.tc.layer['name'])
+
+ def test_bsp_defines_machines(self):
+ self.assertTrue(self.tc.layer['conf']['machines'],
+ "Layer is BSP but doesn't defines machines.")
+
+ def test_bsp_no_set_machine(self):
+ from oeqa.utils.commands import get_bb_var
+
+ machine = get_bb_var('MACHINE')
+ self.assertEqual(self.td['bbvars']['MACHINE'], machine,
+ msg="Layer %s modified machine %s -> %s" % \
+ (self.tc.layer['name'], self.td['bbvars']['MACHINE'], machine))
+
+
+ def test_machine_world(self):
+ '''
+ "bitbake world" is expected to work regardless which machine is selected.
+ BSP layers sometimes break that by enabling a recipe for a certain machine
+ without checking whether that recipe actually can be built in the current
+ distro configuration (for example, OpenGL might not enabled).
+
+ This test iterates over all machines. It would be nicer to instantiate
+ it once per machine. It merely checks for errors during parse
+ time. It does not actually attempt to build anything.
+ '''
+
+ if not self.td['machines']:
+ self.skipTest('No machines set with --machines.')
+ msg = []
+ for machine in self.td['machines']:
+ # In contrast to test_machine_signatures() below, errors are fatal here.
+ try:
+ get_signatures(self.td['builddir'], failsafe=False, machine=machine)
+ except RuntimeError as ex:
+ msg.append(str(ex))
+ if msg:
+ msg.insert(0, 'The following machines broke a world build:')
+ self.fail('\n'.join(msg))
+
+ def test_machine_signatures(self):
+ '''
+ Selecting a machine may only affect the signature of tasks that are specific
+ to that machine. In other words, when MACHINE=A and MACHINE=B share a recipe
+ foo and the output of foo, then both machine configurations must build foo
+ in exactly the same way. Otherwise it is not possible to use both machines
+ in the same distribution.
+
+ This criteria can only be tested by testing different machines in combination,
+ i.e. one main layer, potentially several additional BSP layers and an explicit
+ choice of machines:
+ yocto-check-layer --additional-layers .../meta-intel --machines intel-corei7-64 imx6slevk -- .../meta-freescale
+ '''
+
+ if not self.td['machines']:
+ self.skipTest('No machines set with --machines.')
+
+ # Collect signatures for all machines that we are testing
+ # and merge that into a hash:
+ # tune -> task -> signature -> list of machines with that combination
+ #
+ # It is an error if any tune/task pair has more than one signature,
+ # because that implies that the machines that caused those different
+ # signatures do not agree on how to execute the task.
+ tunes = {}
+ # Preserve ordering of machines as chosen by the user.
+ for machine in self.td['machines']:
+ curr_sigs, tune2tasks = get_signatures(self.td['builddir'], failsafe=True, machine=machine)
+ # Invert the tune -> [tasks] mapping.
+ tasks2tune = {}
+ for tune, tasks in tune2tasks.items():
+ for task in tasks:
+ tasks2tune[task] = tune
+ for task, sighash in curr_sigs.items():
+ tunes.setdefault(tasks2tune[task], {}).setdefault(task, {}).setdefault(sighash, []).append(machine)
+
+ msg = []
+ pruned = 0
+ last_line_key = None
+ # do_fetch, do_unpack, ..., do_build
+ taskname_list = []
+ if tunes:
+ # The output below is most useful when we start with tasks that are at
+ # the bottom of the dependency chain, i.e. those that run first. If
+ # those tasks differ, the rest also does.
+ #
+ # To get an ordering of tasks, we do a topological sort of the entire
+ # depgraph for the base configuration, then on-the-fly flatten that list by stripping
+ # out the recipe names and removing duplicates. The base configuration
+ # is not necessarily representative, but should be close enough. Tasks
+ # that were not encountered get a default priority.
+ depgraph = get_depgraph()
+ depends = depgraph['tdepends']
+ WHITE = 1
+ GRAY = 2
+ BLACK = 3
+ color = {}
+ found = set()
+ def visit(task):
+ color[task] = GRAY
+ for dep in depends.get(task, ()):
+ if color.setdefault(dep, WHITE) == WHITE:
+ visit(dep)
+ color[task] = BLACK
+ pn, taskname = task.rsplit('.', 1)
+ if taskname not in found:
+ taskname_list.append(taskname)
+ found.add(taskname)
+ for task in depends.keys():
+ if color.setdefault(task, WHITE) == WHITE:
+ visit(task)
+
+ taskname_order = dict([(task, index) for index, task in enumerate(taskname_list) ])
+ def task_key(task):
+ pn, taskname = task.rsplit(':', 1)
+ return (pn, taskname_order.get(taskname, len(taskname_list)), taskname)
+
+ for tune in sorted(tunes.keys()):
+ tasks = tunes[tune]
+ # As for test_signatures it would be nicer to sort tasks
+ # by dependencies here, but that is harder because we have
+ # to report on tasks from different machines, which might
+ # have different dependencies. We resort to pruning the
+ # output by reporting only one task per recipe if the set
+ # of machines matches.
+ #
+ # "bitbake-diffsigs -t -s" is intelligent enough to print
+ # diffs recursively, so often it does not matter that much
+ # if we don't pick the underlying difference
+ # here. However, sometimes recursion fails
+ # (https://bugzilla.yoctoproject.org/show_bug.cgi?id=6428).
+ #
+ # To mitigate that a bit, we use a hard-coded ordering of
+ # tasks that represents how they normally run and prefer
+ # to print the ones that run first.
+ for task in sorted(tasks.keys(), key=task_key):
+ signatures = tasks[task]
+ # do_build can be ignored: it is know to have
+ # different signatures in some cases, for example in
+ # the allarch ca-certificates due to RDEPENDS=openssl.
+ # That particular dependency is whitelisted via
+ # SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS, but still shows up
+ # in the sstate signature hash because filtering it
+ # out would be hard and running do_build multiple
+ # times doesn't really matter.
+ if len(signatures.keys()) > 1 and \
+ not task.endswith(':do_build'):
+ # Error!
+ #
+ # Sort signatures by machines, because the hex values don't mean anything.
+ # => all-arch adwaita-icon-theme:do_build: 1234... (beaglebone, qemux86) != abcdf... (qemux86-64)
+ #
+ # Skip the line if it is covered already by the predecessor (same pn, same sets of machines).
+ pn, taskname = task.rsplit(':', 1)
+ next_line_key = (pn, sorted(signatures.values()))
+ if next_line_key != last_line_key:
+ line = ' %s %s: ' % (tune, task)
+ line += ' != '.join(['%s (%s)' % (signature, ', '.join([m for m in signatures[signature]])) for
+ signature in sorted(signatures.keys(), key=lambda s: signatures[s])])
+ last_line_key = next_line_key
+ msg.append(line)
+ # Randomly pick two mismatched signatures and remember how to invoke
+ # bitbake-diffsigs for them.
+ iterator = iter(signatures.items())
+ a = next(iterator)
+ b = next(iterator)
+ diffsig_machines = '(%s) != (%s)' % (', '.join(a[1]), ', '.join(b[1]))
+ diffsig_params = '-t %s %s -s %s %s' % (pn, taskname, a[0], b[0])
+ else:
+ pruned += 1
+
+ if msg:
+ msg.insert(0, 'The machines have conflicting signatures for some shared tasks:')
+ if pruned > 0:
+ msg.append('')
+ msg.append('%d tasks where not listed because some other task of the recipe already differed.' % pruned)
+ msg.append('It is likely that differences from different recipes also have the same root cause.')
+ msg.append('')
+ # Explain how to investigate...
+ msg.append('To investigate, run bitbake-diffsigs -t recipename taskname -s fromsig tosig.')
+ cmd = 'bitbake-diffsigs %s' % diffsig_params
+ msg.append('Example: %s in the last line' % diffsig_machines)
+ msg.append('Command: %s' % cmd)
+ # ... and actually do it automatically for that example, but without aborting
+ # when that fails.
+ try:
+ output = check_command('Comparing signatures failed.', cmd).decode('utf-8')
+ except RuntimeError as ex:
+ output = str(ex)
+ msg.extend([' ' + line for line in output.splitlines()])
+ self.fail('\n'.join(msg))
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
new file mode 100644
index 0000000000..b82304e361
--- /dev/null
+++ b/scripts/lib/checklayer/cases/common.py
@@ -0,0 +1,60 @@
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import glob
+import os
+import unittest
+from checklayer import get_signatures, LayerType, check_command, get_depgraph, compare_signatures
+from checklayer.case import OECheckLayerTestCase
+
+class CommonCheckLayer(OECheckLayerTestCase):
+ def test_readme(self):
+ # The top-level README file may have a suffix (like README.rst or README.txt).
+ readme_files = glob.glob(os.path.join(self.tc.layer['path'], '[Rr][Ee][Aa][Dd][Mm][Ee]*'))
+ self.assertTrue(len(readme_files) > 0,
+ msg="Layer doesn't contains README file.")
+
+ # There might be more than one file matching the file pattern above
+ # (for example, README.rst and README-COPYING.rst). The one with the shortest
+ # name is considered the "main" one.
+ readme_file = sorted(readme_files)[0]
+ data = ''
+ with open(readme_file, 'r') as f:
+ data = f.read()
+ self.assertTrue(data,
+ msg="Layer contains a README file but it is empty.")
+
+ def test_parse(self):
+ check_command('Layer %s failed to parse.' % self.tc.layer['name'],
+ 'bitbake -p')
+
+ def test_show_environment(self):
+ check_command('Layer %s failed to show environment.' % self.tc.layer['name'],
+ 'bitbake -e')
+
+ def test_world(self):
+ '''
+ "bitbake world" is expected to work. test_signatures does not cover that
+ because it is more lenient and ignores recipes in a world build that
+ are not actually buildable, so here we fail when "bitbake -S none world"
+ fails.
+ '''
+ get_signatures(self.td['builddir'], failsafe=False)
+
+ def test_signatures(self):
+ if self.tc.layer['type'] == LayerType.SOFTWARE and \
+ not self.tc.test_software_layer_signatures:
+ raise unittest.SkipTest("Not testing for signature changes in a software layer %s." \
+ % self.tc.layer['name'])
+
+ curr_sigs, _ = get_signatures(self.td['builddir'], failsafe=True)
+ msg = compare_signatures(self.td['sigs'], curr_sigs)
+ if msg is not None:
+ self.fail('Adding layer %s changed signatures.\n%s' % (self.tc.layer['name'], msg))
+
+ def test_layerseries_compat(self):
+ for collection_name, collection_data in self.tc.layer['collections'].items():
+ self.assertTrue(collection_data['compat'], "Collection %s from layer %s does not set compatible oe-core versions via LAYERSERIES_COMPAT_collection." \
+ % (collection_name, self.tc.layer['name']))
diff --git a/scripts/lib/checklayer/cases/distro.py b/scripts/lib/checklayer/cases/distro.py
new file mode 100644
index 0000000000..f0bee5493c
--- /dev/null
+++ b/scripts/lib/checklayer/cases/distro.py
@@ -0,0 +1,28 @@
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import unittest
+
+from checklayer import LayerType
+from checklayer.case import OECheckLayerTestCase
+
+class DistroCheckLayer(OECheckLayerTestCase):
+ @classmethod
+ def setUpClass(self):
+ if self.tc.layer['type'] != LayerType.DISTRO:
+ raise unittest.SkipTest("DistroCheckLayer: Layer %s isn't Distro one." %\
+ self.tc.layer['name'])
+
+ def test_distro_defines_distros(self):
+ self.assertTrue(self.tc.layer['conf']['distros'],
+ "Layer is BSP but doesn't defines machines.")
+
+ def test_distro_no_set_distros(self):
+ from oeqa.utils.commands import get_bb_var
+
+ distro = get_bb_var('DISTRO')
+ self.assertEqual(self.td['bbvars']['DISTRO'], distro,
+ msg="Layer %s modified distro %s -> %s" % \
+ (self.tc.layer['name'], self.td['bbvars']['DISTRO'], distro))
diff --git a/scripts/lib/checklayer/context.py b/scripts/lib/checklayer/context.py
new file mode 100644
index 0000000000..4de8f668fd
--- /dev/null
+++ b/scripts/lib/checklayer/context.py
@@ -0,0 +1,17 @@
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import sys
+import glob
+import re
+
+from oeqa.core.context import OETestContext
+
+class CheckLayerTestContext(OETestContext):
+ def __init__(self, td=None, logger=None, layer=None, test_software_layer_signatures=True):
+ super(CheckLayerTestContext, self).__init__(td, logger)
+ self.layer = layer
+ self.test_software_layer_signatures = test_software_layer_signatures
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index b432e3d44e..d39c474fbd 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -4,18 +4,8 @@
#
# Copyright (C) 2014 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool plugins module"""
import os
@@ -23,6 +13,7 @@ import sys
import subprocess
import logging
import re
+import codecs
logger = logging.getLogger('devtool')
@@ -67,10 +58,10 @@ def exec_watch(cmd, **options):
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **options
)
+ reader = codecs.getreader('utf-8')(process.stdout)
buf = ''
while True:
- out = process.stdout.read(1)
- out = out.decode('utf-8')
+ out = reader.read(1, 1)
if out:
sys.stdout.write(out)
sys.stdout.flush()
@@ -86,13 +77,13 @@ def exec_watch(cmd, **options):
def exec_fakeroot(d, cmd, **kwargs):
"""Run a command under fakeroot (pseudo, in fact) so that it picks up the appropriate file permissions"""
# Grab the command and check it actually exists
- fakerootcmd = d.getVar('FAKEROOTCMD', True)
+ fakerootcmd = d.getVar('FAKEROOTCMD')
if not os.path.exists(fakerootcmd):
logger.error('pseudo executable %s could not be found - have you run a build yet? pseudo-native should install this and if you have run any build then that should have been built')
return 2
# Set up the appropriate environment
newenv = dict(os.environ)
- fakerootenv = d.getVar('FAKEROOTENV', True)
+ fakerootenv = d.getVar('FAKEROOTENV')
for varvalue in fakerootenv.split():
if '=' in varvalue:
splitval = varvalue.split('=', 1)
@@ -113,40 +104,40 @@ def setup_tinfoil(config_only=False, basepath=None, tracking=False):
import bb.tinfoil
tinfoil = bb.tinfoil.Tinfoil(tracking=tracking)
- tinfoil.prepare(config_only)
- tinfoil.logger.setLevel(logger.getEffectiveLevel())
+ try:
+ tinfoil.logger.setLevel(logger.getEffectiveLevel())
+ tinfoil.prepare(config_only)
+ except bb.tinfoil.TinfoilUIException:
+ tinfoil.shutdown()
+ raise DevtoolError('Failed to start bitbake environment')
+ except:
+ tinfoil.shutdown()
+ raise
finally:
os.chdir(orig_cwd)
return tinfoil
-def get_recipe_file(cooker, pn):
- """Find recipe file corresponding a package name"""
- import oe.recipeutils
- recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
- if not recipefile:
- skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn)
- if skipreasons:
- logger.error('\n'.join(skipreasons))
- else:
- logger.error("Unable to find any recipe file matching %s" % pn)
- return recipefile
-
def parse_recipe(config, tinfoil, pn, appends, filter_workspace=True):
- """Parse recipe of a package"""
- import oe.recipeutils
- recipefile = get_recipe_file(tinfoil.cooker, pn)
- if not recipefile:
- # Error already logged
+ """Parse the specified recipe"""
+ try:
+ recipefile = tinfoil.get_recipe_file(pn)
+ except bb.providers.NoProvider as e:
+ logger.error(str(e))
return None
if appends:
- append_files = tinfoil.cooker.collection.get_file_appends(recipefile)
+ append_files = tinfoil.get_file_appends(recipefile)
if filter_workspace:
# Filter out appends from the workspace
append_files = [path for path in append_files if
not path.startswith(config.workspace_path)]
else:
append_files = None
- return oe.recipeutils.parse_recipe(tinfoil.cooker, recipefile, append_files)
+ try:
+ rd = tinfoil.parse_recipe_file(recipefile, appends, append_files)
+ except Exception as e:
+ logger.error(str(e))
+ return None
+ return rd
def check_workspace_recipe(workspace, pn, checksrc=True, bbclassextend=False):
"""
@@ -190,7 +181,7 @@ def use_external_build(same_dir, no_same_dir, d):
logger.info('Using source tree as build directory since --same-dir specified')
elif bb.data.inherits_class('autotools-brokensep', d):
logger.info('Using source tree as build directory since recipe inherits autotools-brokensep')
- elif d.getVar('B', True) == os.path.abspath(d.getVar('S', True)):
+ elif os.path.abspath(d.getVar('B')) == os.path.abspath(d.getVar('S')):
logger.info('Using source tree as build directory since that would be the default for this recipe')
else:
b_is_s = False
@@ -204,6 +195,7 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None):
import oe.patch
if not os.path.exists(os.path.join(repodir, '.git')):
bb.process.run('git init', cwd=repodir)
+ bb.process.run('git config --local gc.autodetach 0', cwd=repodir)
bb.process.run('git add .', cwd=repodir)
commit_cmd = ['git']
oe.patch.GitApplyTree.gitCommandUserOptions(commit_cmd, d=d)
@@ -219,6 +211,20 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None):
commit_cmd += ['-m', commitmsg]
bb.process.run(commit_cmd, cwd=repodir)
+ # Ensure singletask.lock (as used by externalsrc.bbclass) is ignored by git
+ excludes = []
+ excludefile = os.path.join(repodir, '.git', 'info', 'exclude')
+ try:
+ with open(excludefile, 'r') as f:
+ excludes = f.readlines()
+ except FileNotFoundError:
+ pass
+ if 'singletask.lock\n' not in excludes:
+ excludes.append('singletask.lock\n')
+ with open(excludefile, 'w') as f:
+ for line in excludes:
+ f.write(line)
+
bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
bb.process.run('git tag -f %s' % basetag, cwd=repodir)
@@ -259,3 +265,110 @@ def get_bbclassextend_targets(recipefile, pn):
elif variant in ['native', 'cross', 'crosssdk']:
targets.append('%s-%s' % (pn, variant))
return targets
+
+def replace_from_file(path, old, new):
+ """Replace strings on a file"""
+
+ def read_file(path):
+ data = None
+ with open(path) as f:
+ data = f.read()
+ return data
+
+ def write_file(path, data):
+ if data is None:
+ return
+ wdata = data.rstrip() + "\n"
+ with open(path, "w") as f:
+ f.write(wdata)
+
+ # In case old is None, return immediately
+ if old is None:
+ return
+ try:
+ rdata = read_file(path)
+ except IOError as e:
+ # if file does not exit, just quit, otherwise raise an exception
+ if e.errno == errno.ENOENT:
+ return
+ else:
+ raise
+
+ old_contents = rdata.splitlines()
+ new_contents = []
+ for old_content in old_contents:
+ try:
+ new_contents.append(old_content.replace(old, new))
+ except ValueError:
+ pass
+ write_file(path, "\n".join(new_contents))
+
+
+def update_unlockedsigs(basepath, workspace, fixed_setup, extra=None):
+ """ This function will make unlocked-sigs.inc match the recipes in the
+ workspace plus any extras we want unlocked. """
+
+ if not fixed_setup:
+ # Only need to write this out within the eSDK
+ return
+
+ if not extra:
+ extra = []
+
+ confdir = os.path.join(basepath, 'conf')
+ unlockedsigs = os.path.join(confdir, 'unlocked-sigs.inc')
+
+ # Get current unlocked list if any
+ values = {}
+ def get_unlockedsigs_varfunc(varname, origvalue, op, newlines):
+ values[varname] = origvalue
+ return origvalue, None, 0, True
+ if os.path.exists(unlockedsigs):
+ with open(unlockedsigs, 'r') as f:
+ bb.utils.edit_metadata(f, ['SIGGEN_UNLOCKED_RECIPES'], get_unlockedsigs_varfunc)
+ unlocked = sorted(values.get('SIGGEN_UNLOCKED_RECIPES', []))
+
+ # If the new list is different to the current list, write it out
+ newunlocked = sorted(list(workspace.keys()) + extra)
+ if unlocked != newunlocked:
+ bb.utils.mkdirhier(confdir)
+ with open(unlockedsigs, 'w') as f:
+ f.write("# DO NOT MODIFY! YOUR CHANGES WILL BE LOST.\n" +
+ "# This layer was created by the OpenEmbedded devtool" +
+ " utility in order to\n" +
+ "# contain recipes that are unlocked.\n")
+
+ f.write('SIGGEN_UNLOCKED_RECIPES += "\\\n')
+ for pn in newunlocked:
+ f.write(' ' + pn)
+ f.write('"')
+
+def check_prerelease_version(ver, operation):
+ if 'pre' in ver or 'rc' in ver:
+ logger.warning('Version "%s" looks like a pre-release version. '
+ 'If that is the case, in order to ensure that the '
+ 'version doesn\'t appear to go backwards when you '
+ 'later upgrade to the final release version, it is '
+ 'recommmended that instead you use '
+ '<current version>+<pre-release version> e.g. if '
+ 'upgrading from 1.9 to 2.0-rc2 use "1.9+2.0-rc2". '
+ 'If you prefer not to reset and re-try, you can change '
+ 'the version after %s succeeds using "devtool rename" '
+ 'with -V/--version.' % (ver, operation))
+
+def check_git_repo_dirty(repodir):
+ """Check if a git repository is clean or not"""
+ stdout, _ = bb.process.run('git status --porcelain', cwd=repodir)
+ return stdout
+
+def check_git_repo_op(srctree, ignoredirs=None):
+ """Check if a git repository is in the middle of a rebase"""
+ stdout, _ = bb.process.run('git rev-parse --show-toplevel', cwd=srctree)
+ topleveldir = stdout.strip()
+ if ignoredirs and topleveldir in ignoredirs:
+ return
+ gitdir = os.path.join(topleveldir, '.git')
+ if os.path.exists(os.path.join(gitdir, 'rebase-merge')):
+ raise DevtoolError("Source tree %s appears to be in the middle of a rebase - please resolve this first" % srctree)
+ if os.path.exists(os.path.join(gitdir, 'rebase-apply')):
+ raise DevtoolError("Source tree %s appears to be in the middle of 'git am' or 'git apply' - please resolve this first" % srctree)
diff --git a/scripts/lib/devtool/build.py b/scripts/lib/devtool/build.py
index 6be549dd59..935ffab46c 100644
--- a/scripts/lib/devtool/build.py
+++ b/scripts/lib/devtool/build.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2014-2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool build plugin"""
import os
@@ -21,7 +11,8 @@ import bb
import logging
import argparse
import tempfile
-from devtool import exec_build_env_command, check_workspace_recipe, DevtoolError
+from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, DevtoolError
+from devtool import parse_recipe
logger = logging.getLogger('devtool')
@@ -53,8 +44,22 @@ def _get_build_tasks(config):
def build(args, config, basepath, workspace):
"""Entry point for the devtool 'build' subcommand"""
workspacepn = check_workspace_recipe(workspace, args.recipename, bbclassextend=True)
+ tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
+ try:
+ rd = parse_recipe(config, tinfoil, args.recipename, appends=True, filter_workspace=False)
+ if not rd:
+ return 1
+ deploytask = 'do_deploy' in rd.getVar('__BBTASKS')
+ finally:
+ tinfoil.shutdown()
- build_tasks = _get_build_tasks(config)
+ if args.clean:
+ # use clean instead of cleansstate to avoid messing things up in eSDK
+ build_tasks = ['do_clean']
+ else:
+ build_tasks = _get_build_tasks(config)
+ if deploytask:
+ build_tasks.append('do_deploy')
bbappend = workspace[workspacepn]['bbappend']
if args.disable_parallel_make:
@@ -80,7 +85,8 @@ def register_commands(subparsers, context):
"""Register devtool subcommands from this plugin"""
parser_build = subparsers.add_parser('build', help='Build a recipe',
description='Builds the specified recipe using bitbake (up to and including %s)' % ', '.join(_get_build_tasks(context.config)),
- group='working')
+ group='working', order=50)
parser_build.add_argument('recipename', help='Recipe to build')
parser_build.add_argument('-s', '--disable-parallel-make', action="store_true", help='Disable make parallelism')
+ parser_build.add_argument('-c', '--clean', action='store_true', help='clean up recipe building results')
parser_build.set_defaults(func=build)
diff --git a/scripts/lib/devtool/build_image.py b/scripts/lib/devtool/build_image.py
index ae75511dc7..9388abbacf 100644
--- a/scripts/lib/devtool/build_image.py
+++ b/scripts/lib/devtool/build_image.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool plugin containing the build-image subcommand."""
@@ -34,8 +24,8 @@ def _get_packages(tinfoil, workspace, config):
result = []
for recipe in workspace:
data = parse_recipe(config, tinfoil, recipe, True)
- if 'class-target' in data.getVar('OVERRIDES', True).split(':'):
- if recipe in data.getVar('PACKAGES', True).split():
+ if 'class-target' in data.getVar('OVERRIDES').split(':'):
+ if recipe in data.getVar('PACKAGES').split():
result.append(recipe)
else:
logger.warning("Skipping recipe %s as it doesn't produce a "
@@ -95,7 +85,7 @@ def build_image_task(config, basepath, workspace, image, add_packages=None, task
raise TargetNotImageError()
# Get the actual filename used and strip the .bb and full path
- target_basename = rd.getVar('FILE', True)
+ target_basename = rd.getVar('FILE')
target_basename = os.path.splitext(os.path.basename(target_basename))[0]
config.set('SDK', 'target_basename', target_basename)
config.write()
@@ -132,9 +122,9 @@ def build_image_task(config, basepath, workspace, image, add_packages=None, task
afile.write('%s\n' % line)
if task in ['populate_sdk', 'populate_sdk_ext']:
- outputdir = rd.getVar('SDK_DEPLOY', True)
+ outputdir = rd.getVar('SDK_DEPLOY')
else:
- outputdir = rd.getVar('DEPLOY_DIR_IMAGE', True)
+ outputdir = rd.getVar('DEPLOY_DIR_IMAGE')
tmp_tinfoil = tinfoil
tinfoil = None
diff --git a/scripts/lib/devtool/build_sdk.py b/scripts/lib/devtool/build_sdk.py
index b89d65b0cb..6fe02fff2a 100644
--- a/scripts/lib/devtool/build_sdk.py
+++ b/scripts/lib/devtool/build_sdk.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
import subprocess
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index fb84f2dd08..6a997735fc 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -2,26 +2,20 @@
#
# Copyright (C) 2014-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool plugin containing the deploy subcommands"""
+import logging
import os
+import shutil
import subprocess
-import logging
import tempfile
-import shutil
+
+import bb.utils
import argparse_oe
+import oe.types
+
from devtool import exec_fakeroot, setup_tinfoil, check_workspace_recipe, DevtoolError
logger = logging.getLogger('devtool')
@@ -64,7 +58,7 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
lines.append(' rmdir $file > /dev/null 2>&1 || true')
lines.append(' fi')
lines.append(' else')
- lines.append(' rm $file')
+ lines.append(' rm -f $file')
lines.append(' fi')
lines.append(' done')
if not dryrun:
@@ -85,7 +79,7 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
lines.append('do')
lines.append(' checkpath=`dirname "$checkpath"`')
lines.append('done')
- lines.append('freespace=`df -P $checkpath | sed "1d" | awk \'{ print $4 }\'`')
+ lines.append(r'freespace=$(df -P $checkpath | sed -nre "s/^(\S+\s+){3}([0-9]+).*/\2/p")')
# First line of the file is the total space
lines.append('total=`head -n1 $3`')
lines.append('if [ $total -gt $freespace ] ; then')
@@ -119,7 +113,11 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
# Put any preserved files back
lines.append('if [ -d $preservedir ] ; then')
lines.append(' cd $preservedir')
- lines.append(' find . -type f -exec mv {} /{} \;')
+ # find from busybox might not have -exec, so we don't use that
+ lines.append(' find . -type f | while read file')
+ lines.append(' do')
+ lines.append(' mv $file /$file')
+ lines.append(' done')
lines.append(' cd /')
lines.append(' rm -rf $preservedir')
lines.append('fi')
@@ -136,11 +134,12 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
return '\n'.join(lines)
+
def deploy(args, config, basepath, workspace):
"""Entry point for the devtool 'deploy' subcommand"""
- import re
import math
import oe.recipeutils
+ import oe.package
check_workspace_recipe(workspace, args.recipename, checksrc=False)
@@ -156,16 +155,27 @@ def deploy(args, config, basepath, workspace):
tinfoil = setup_tinfoil(basepath=basepath)
try:
try:
- rd = oe.recipeutils.parse_recipe_simple(tinfoil.cooker, args.recipename, tinfoil.config_data)
+ rd = tinfoil.parse_recipe(args.recipename)
except Exception as e:
raise DevtoolError('Exception parsing recipe %s: %s' %
(args.recipename, e))
- recipe_outdir = rd.getVar('D', True)
+ recipe_outdir = rd.getVar('D')
if not os.path.exists(recipe_outdir) or not os.listdir(recipe_outdir):
raise DevtoolError('No files to deploy - have you built the %s '
'recipe? If so, the install step has not installed '
'any files.' % args.recipename)
+ if args.strip and not args.dry_run:
+ # Fakeroot copy to new destination
+ srcdir = recipe_outdir
+ recipe_outdir = os.path.join(rd.getVar('WORKDIR'), 'deploy-target-stripped')
+ if os.path.isdir(recipe_outdir):
+ bb.utils.remove(recipe_outdir, True)
+ exec_fakeroot(rd, "cp -af %s %s" % (os.path.join(srcdir, '.'), recipe_outdir), shell=True)
+ os.environ['PATH'] = ':'.join([os.environ['PATH'], rd.getVar('PATH') or ''])
+ oe.package.strip_execs(args.recipename, recipe_outdir, rd.getVar('STRIP'), rd.getVar('libdir'),
+ rd.getVar('base_libdir'), rd)
+
filelist = []
ftotalsize = 0
for root, _, files in os.walk(recipe_outdir):
@@ -185,13 +195,26 @@ def deploy(args, config, basepath, workspace):
print(' %s' % item)
return 0
-
extraoptions = ''
if args.no_host_check:
extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
if not args.show_status:
extraoptions += ' -q'
+ scp_sshexec = ''
+ ssh_sshexec = 'ssh'
+ if args.ssh_exec:
+ scp_sshexec = "-S %s" % args.ssh_exec
+ ssh_sshexec = args.ssh_exec
+ scp_port = ''
+ ssh_port = ''
+ if args.port:
+ scp_port = "-P %s" % args.port
+ ssh_port = "-p %s" % args.port
+
+ if args.key:
+ extraoptions += ' -i %s' % args.key
+
# In order to delete previously deployed files and have the manifest file on
# the target, we write out a shell script and then copy it to the target
# so we can then run it (piping tar output to it).
@@ -213,7 +236,7 @@ def deploy(args, config, basepath, workspace):
for fpath, fsize in filelist:
f.write('%s %d\n' % (fpath, fsize))
# Copy them to the target
- ret = subprocess.call("scp %s %s/* %s:%s" % (extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True)
+ ret = subprocess.call("scp %s %s %s %s/* %s:%s" % (scp_sshexec, scp_port, extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True)
if ret != 0:
raise DevtoolError('Failed to copy script to %s - rerun with -s to '
'get a complete error message' % args.target)
@@ -221,7 +244,7 @@ def deploy(args, config, basepath, workspace):
shutil.rmtree(tmpdir)
# Now run the script
- ret = exec_fakeroot(rd, 'tar cf - . | ssh %s %s \'sh %s %s %s %s\'' % (extraoptions, args.target, tmpscript, args.recipename, destdir, tmpfilelist), cwd=recipe_outdir, shell=True)
+ ret = exec_fakeroot(rd, 'tar cf - . | %s %s %s %s \'sh %s %s %s %s\'' % (ssh_sshexec, ssh_port, extraoptions, args.target, tmpscript, args.recipename, destdir, tmpfilelist), cwd=recipe_outdir, shell=True)
if ret != 0:
raise DevtoolError('Deploy failed - rerun with -s to get a complete '
'error message')
@@ -251,6 +274,17 @@ def undeploy(args, config, basepath, workspace):
if not args.show_status:
extraoptions += ' -q'
+ scp_sshexec = ''
+ ssh_sshexec = 'ssh'
+ if args.ssh_exec:
+ scp_sshexec = "-S %s" % args.ssh_exec
+ ssh_sshexec = args.ssh_exec
+ scp_port = ''
+ ssh_port = ''
+ if args.port:
+ scp_port = "-P %s" % args.port
+ ssh_port = "-p %s" % args.port
+
args.target = args.target.split(':')[0]
tmpdir = tempfile.mkdtemp(prefix='devtool')
@@ -261,7 +295,7 @@ def undeploy(args, config, basepath, workspace):
with open(os.path.join(tmpdir, os.path.basename(tmpscript)), 'w') as f:
f.write(shellscript)
# Copy it to the target
- ret = subprocess.call("scp %s %s/* %s:%s" % (extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True)
+ ret = subprocess.call("scp %s %s %s %s/* %s:%s" % (scp_sshexec, scp_port, extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True)
if ret != 0:
raise DevtoolError('Failed to copy script to %s - rerun with -s to '
'get a complete error message' % args.target)
@@ -269,7 +303,7 @@ def undeploy(args, config, basepath, workspace):
shutil.rmtree(tmpdir)
# Now run the script
- ret = subprocess.call('ssh %s %s \'sh %s %s\'' % (extraoptions, args.target, tmpscript, args.recipename), shell=True)
+ ret = subprocess.call('%s %s %s %s \'sh %s %s\'' % (ssh_sshexec, ssh_port, extraoptions, args.target, tmpscript, args.recipename), shell=True)
if ret != 0:
raise DevtoolError('Undeploy failed - rerun with -s to get a complete '
'error message')
@@ -281,6 +315,7 @@ def undeploy(args, config, basepath, workspace):
def register_commands(subparsers, context):
"""Register devtool subcommands from the deploy plugin"""
+
parser_deploy = subparsers.add_parser('deploy-target',
help='Deploy recipe output files to live target machine',
description='Deploys a recipe\'s build output (i.e. the output of the do_install task) to a live target machine over ssh. By default, any existing files will be preserved instead of being overwritten and will be restored if you run devtool undeploy-target. Note: this only deploys the recipe itself and not any runtime dependencies, so it is assumed that those have been installed on the target beforehand.',
@@ -292,6 +327,19 @@ def register_commands(subparsers, context):
parser_deploy.add_argument('-n', '--dry-run', help='List files to be deployed only', action='store_true')
parser_deploy.add_argument('-p', '--no-preserve', help='Do not preserve existing files', action='store_true')
parser_deploy.add_argument('--no-check-space', help='Do not check for available space before deploying', action='store_true')
+ parser_deploy.add_argument('-e', '--ssh-exec', help='Executable to use in place of ssh')
+ parser_deploy.add_argument('-P', '--port', help='Specify port to use for connection to the target')
+ parser_deploy.add_argument('-I', '--key',
+ help='Specifiy ssh private key for connection to the target')
+
+ strip_opts = parser_deploy.add_mutually_exclusive_group(required=False)
+ strip_opts.add_argument('-S', '--strip',
+ help='Strip executables prior to deploying (default: %(default)s). '
+ 'The default value of this option can be controlled by setting the strip option in the [Deploy] section to True or False.',
+ default=oe.types.boolean(context.config.get('Deploy', 'strip', default='0')),
+ action='store_true')
+ strip_opts.add_argument('--no-strip', help='Do not strip executables prior to deploy', dest='strip', action='store_false')
+
parser_deploy.set_defaults(func=deploy)
parser_undeploy = subparsers.add_parser('undeploy-target',
@@ -304,4 +352,9 @@ def register_commands(subparsers, context):
parser_undeploy.add_argument('-s', '--show-status', help='Show progress/status output', action='store_true')
parser_undeploy.add_argument('-a', '--all', help='Undeploy all recipes deployed on the target', action='store_true')
parser_undeploy.add_argument('-n', '--dry-run', help='List files to be undeployed only', action='store_true')
+ parser_undeploy.add_argument('-e', '--ssh-exec', help='Executable to use in place of ssh')
+ parser_undeploy.add_argument('-P', '--port', help='Specify port to use for connection to the target')
+ parser_undeploy.add_argument('-I', '--key',
+ help='Specifiy ssh private key for connection to the target')
+
parser_undeploy.set_defaults(func=undeploy)
diff --git a/scripts/lib/devtool/export.py b/scripts/lib/devtool/export.py
new file mode 100644
index 0000000000..01174edae5
--- /dev/null
+++ b/scripts/lib/devtool/export.py
@@ -0,0 +1,109 @@
+# Development tool - export command plugin
+#
+# Copyright (C) 2014-2017 Intel Corporation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+"""Devtool export plugin"""
+
+import os
+import argparse
+import tarfile
+import logging
+import datetime
+import json
+
+logger = logging.getLogger('devtool')
+
+# output files
+default_arcname_prefix = "workspace-export"
+metadata = '.export_metadata'
+
+def export(args, config, basepath, workspace):
+ """Entry point for the devtool 'export' subcommand"""
+
+ def add_metadata(tar):
+ """Archive the workspace object"""
+ # finally store the workspace metadata
+ with open(metadata, 'w') as fd:
+ fd.write(json.dumps((config.workspace_path, workspace)))
+ tar.add(metadata)
+ os.unlink(metadata)
+
+ def add_recipe(tar, recipe, data):
+ """Archive recipe with proper arcname"""
+ # Create a map of name/arcnames
+ arcnames = []
+ for key, name in data.items():
+ if name:
+ if key == 'srctree':
+ # all sources, no matter where are located, goes into the sources directory
+ arcname = 'sources/%s' % recipe
+ else:
+ arcname = name.replace(config.workspace_path, '')
+ arcnames.append((name, arcname))
+
+ for name, arcname in arcnames:
+ tar.add(name, arcname=arcname)
+
+
+ # Make sure workspace is non-empty and possible listed include/excluded recipes are in workspace
+ if not workspace:
+ logger.info('Workspace contains no recipes, nothing to export')
+ return 0
+ else:
+ for param, recipes in {'include':args.include,'exclude':args.exclude}.items():
+ for recipe in recipes:
+ if recipe not in workspace:
+ logger.error('Recipe (%s) on %s argument not in the current workspace' % (recipe, param))
+ return 1
+
+ name = args.file
+
+ default_name = "%s-%s.tar.gz" % (default_arcname_prefix, datetime.datetime.now().strftime('%Y%m%d%H%M%S'))
+ if not name:
+ name = default_name
+ else:
+ # if name is a directory, append the default name
+ if os.path.isdir(name):
+ name = os.path.join(name, default_name)
+
+ if os.path.exists(name) and not args.overwrite:
+ logger.error('Tar archive %s exists. Use --overwrite/-o to overwrite it')
+ return 1
+
+ # if all workspace is excluded, quit
+ if not len(set(workspace.keys()).difference(set(args.exclude))):
+ logger.warning('All recipes in workspace excluded, nothing to export')
+ return 0
+
+ exported = []
+ with tarfile.open(name, 'w:gz') as tar:
+ if args.include:
+ for recipe in args.include:
+ add_recipe(tar, recipe, workspace[recipe])
+ exported.append(recipe)
+ else:
+ for recipe, data in workspace.items():
+ if recipe not in args.exclude:
+ add_recipe(tar, recipe, data)
+ exported.append(recipe)
+
+ add_metadata(tar)
+
+ logger.info('Tar archive created at %s with the following recipes: %s' % (name, ', '.join(exported)))
+ return 0
+
+def register_commands(subparsers, context):
+ """Register devtool export subcommands"""
+ parser = subparsers.add_parser('export',
+ help='Export workspace into a tar archive',
+ description='Export one or more recipes from current workspace into a tar archive',
+ group='advanced')
+
+ parser.add_argument('--file', '-f', help='Output archive file name')
+ parser.add_argument('--overwrite', '-o', action="store_true", help='Overwrite previous export tar archive')
+ group = parser.add_mutually_exclusive_group()
+ group.add_argument('--include', '-i', nargs='+', default=[], help='Include recipes into the tar archive')
+ group.add_argument('--exclude', '-e', nargs='+', default=[], help='Exclude recipes into the tar archive')
+ parser.set_defaults(func=export)
diff --git a/scripts/lib/devtool/import.py b/scripts/lib/devtool/import.py
new file mode 100644
index 0000000000..6829851669
--- /dev/null
+++ b/scripts/lib/devtool/import.py
@@ -0,0 +1,134 @@
+# Development tool - import command plugin
+#
+# Copyright (C) 2014-2017 Intel Corporation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+"""Devtool import plugin"""
+
+import os
+import tarfile
+import logging
+import collections
+import json
+import fnmatch
+
+from devtool import standard, setup_tinfoil, replace_from_file, DevtoolError
+from devtool import export
+
+logger = logging.getLogger('devtool')
+
+def devimport(args, config, basepath, workspace):
+ """Entry point for the devtool 'import' subcommand"""
+
+ def get_pn(name):
+ """ Returns the filename of a workspace recipe/append"""
+ metadata = name.split('/')[-1]
+ fn, _ = os.path.splitext(metadata)
+ return fn
+
+ if not os.path.exists(args.file):
+ raise DevtoolError('Tar archive %s does not exist. Export your workspace using "devtool export"' % args.file)
+
+ with tarfile.open(args.file) as tar:
+ # Get exported metadata
+ export_workspace_path = export_workspace = None
+ try:
+ metadata = tar.getmember(export.metadata)
+ except KeyError as ke:
+ raise DevtoolError('The export metadata file created by "devtool export" was not found. "devtool import" can only be used to import tar archives created by "devtool export".')
+
+ tar.extract(metadata)
+ with open(metadata.name) as fdm:
+ export_workspace_path, export_workspace = json.load(fdm)
+ os.unlink(metadata.name)
+
+ members = tar.getmembers()
+
+ # Get appends and recipes from the exported archive, these
+ # will be needed to find out those appends without corresponding
+ # recipe pair
+ append_fns, recipe_fns = set(), set()
+ for member in members:
+ if member.name.startswith('appends'):
+ append_fns.add(get_pn(member.name))
+ elif member.name.startswith('recipes'):
+ recipe_fns.add(get_pn(member.name))
+
+ # Setup tinfoil, get required data and shutdown
+ tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
+ try:
+ current_fns = [os.path.basename(recipe[0]) for recipe in tinfoil.cooker.recipecaches[''].pkg_fn.items()]
+ finally:
+ tinfoil.shutdown()
+
+ # Find those appends that do not have recipes in current metadata
+ non_importables = []
+ for fn in append_fns - recipe_fns:
+ # Check on current metadata (covering those layers indicated in bblayers.conf)
+ for current_fn in current_fns:
+ if fnmatch.fnmatch(current_fn, '*' + fn.replace('%', '') + '*'):
+ break
+ else:
+ non_importables.append(fn)
+ logger.warning('No recipe to append %s.bbapppend, skipping' % fn)
+
+ # Extract
+ imported = []
+ for member in members:
+ if member.name == export.metadata:
+ continue
+
+ for nonimp in non_importables:
+ pn = nonimp.split('_')[0]
+ # do not extract data from non-importable recipes or metadata
+ if member.name.startswith('appends/%s' % nonimp) or \
+ member.name.startswith('recipes/%s' % nonimp) or \
+ member.name.startswith('sources/%s' % pn):
+ break
+ else:
+ path = os.path.join(config.workspace_path, member.name)
+ if os.path.exists(path):
+ # by default, no file overwrite is done unless -o is given by the user
+ if args.overwrite:
+ try:
+ tar.extract(member, path=config.workspace_path)
+ except PermissionError as pe:
+ logger.warning(pe)
+ else:
+ logger.warning('File already present. Use --overwrite/-o to overwrite it: %s' % member.name)
+ continue
+ else:
+ tar.extract(member, path=config.workspace_path)
+
+ # Update EXTERNALSRC and the devtool md5 file
+ if member.name.startswith('appends'):
+ if export_workspace_path:
+ # appends created by 'devtool modify' just need to update the workspace
+ replace_from_file(path, export_workspace_path, config.workspace_path)
+
+ # appends created by 'devtool add' need replacement of exported source tree
+ pn = get_pn(member.name).split('_')[0]
+ exported_srctree = export_workspace[pn]['srctree']
+ if exported_srctree:
+ replace_from_file(path, exported_srctree, os.path.join(config.workspace_path, 'sources', pn))
+
+ standard._add_md5(config, pn, path)
+ imported.append(pn)
+
+ if imported:
+ logger.info('Imported recipes into workspace %s: %s' % (config.workspace_path, ', '.join(imported)))
+ else:
+ logger.warning('No recipes imported into the workspace')
+
+ return 0
+
+def register_commands(subparsers, context):
+ """Register devtool import subcommands"""
+ parser = subparsers.add_parser('import',
+ help='Import exported tar archive into workspace',
+ description='Import tar archive previously created by "devtool export" into workspace',
+ group='advanced')
+ parser.add_argument('file', metavar='FILE', help='Name of the tar archive to import')
+ parser.add_argument('--overwrite', '-o', action="store_true", help='Overwrite files when extracting')
+ parser.set_defaults(func=devimport)
diff --git a/scripts/lib/devtool/menuconfig.py b/scripts/lib/devtool/menuconfig.py
new file mode 100644
index 0000000000..95384c5333
--- /dev/null
+++ b/scripts/lib/devtool/menuconfig.py
@@ -0,0 +1,79 @@
+# OpenEmbedded Development tool - menuconfig command plugin
+#
+# Copyright (C) 2018 Xilinx
+# Written by: Chandana Kalluri <ckalluri@xilinx.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+"""Devtool menuconfig plugin"""
+
+import os
+import bb
+import logging
+import argparse
+import re
+import glob
+from devtool import setup_tinfoil, parse_recipe, DevtoolError, standard, exec_build_env_command
+from devtool import check_workspace_recipe
+logger = logging.getLogger('devtool')
+
+def menuconfig(args, config, basepath, workspace):
+ """Entry point for the devtool 'menuconfig' subcommand"""
+
+ rd = ""
+ kconfigpath = ""
+ pn_src = ""
+ localfilesdir = ""
+ workspace_dir = ""
+ tinfoil = setup_tinfoil(basepath=basepath)
+ try:
+ rd = parse_recipe(config, tinfoil, args.component, appends=True, filter_workspace=False)
+ if not rd:
+ return 1
+
+ check_workspace_recipe(workspace, args.component)
+ pn = rd.getVar('PN', True)
+
+ if not rd.getVarFlag('do_menuconfig','task'):
+ raise DevtoolError("This recipe does not support menuconfig option")
+
+ workspace_dir = os.path.join(config.workspace_path,'sources')
+ kconfigpath = rd.getVar('B')
+ pn_src = os.path.join(workspace_dir,pn)
+
+ # add check to see if oe_local_files exists or not
+ localfilesdir = os.path.join(pn_src,'oe-local-files')
+ if not os.path.exists(localfilesdir):
+ bb.utils.mkdirhier(localfilesdir)
+ # Add gitignore to ensure source tree is clean
+ gitignorefile = os.path.join(localfilesdir,'.gitignore')
+ with open(gitignorefile, 'w') as f:
+ f.write('# Ignore local files, by default. Remove this file if you want to commit the directory to Git\n')
+ f.write('*\n')
+
+ finally:
+ tinfoil.shutdown()
+
+ logger.info('Launching menuconfig')
+ exec_build_env_command(config.init_path, basepath, 'bitbake -c menuconfig %s' % pn, watch=True)
+ fragment = os.path.join(localfilesdir, 'devtool-fragment.cfg')
+ res = standard._create_kconfig_diff(pn_src,rd,fragment)
+
+ return 0
+
+def register_commands(subparsers, context):
+ """register devtool subcommands from this plugin"""
+ parser_menuconfig = subparsers.add_parser('menuconfig',help='Alter build-time configuration for a recipe', description='Launches the make menuconfig command (for recipes where do_menuconfig is available), allowing users to make changes to the build-time configuration. Creates a config fragment corresponding to changes made.', group='advanced')
+ parser_menuconfig.add_argument('component', help='compenent to alter config')
+ parser_menuconfig.set_defaults(func=menuconfig,fixed_setup=context.fixed_setup)
diff --git a/scripts/lib/devtool/package.py b/scripts/lib/devtool/package.py
index afb5809a36..c2367342c3 100644
--- a/scripts/lib/devtool/package.py
+++ b/scripts/lib/devtool/package.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2014-2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool plugin containing the package subcommands"""
import os
@@ -28,15 +18,13 @@ def package(args, config, basepath, workspace):
"""Entry point for the devtool 'package' subcommand"""
check_workspace_recipe(workspace, args.recipename)
- tinfoil = setup_tinfoil(basepath=basepath)
+ tinfoil = setup_tinfoil(basepath=basepath, config_only=True)
try:
- tinfoil.prepare(config_only=True)
-
image_pkgtype = config.get('Package', 'image_pkgtype', '')
if not image_pkgtype:
- image_pkgtype = tinfoil.config_data.getVar('IMAGE_PKGTYPE', True)
+ image_pkgtype = tinfoil.config_data.getVar('IMAGE_PKGTYPE')
- deploy_dir_pkg = tinfoil.config_data.getVar('DEPLOY_DIR_%s' % image_pkgtype.upper(), True)
+ deploy_dir_pkg = tinfoil.config_data.getVar('DEPLOY_DIR_%s' % image_pkgtype.upper())
finally:
tinfoil.shutdown()
diff --git a/scripts/lib/devtool/runqemu.py b/scripts/lib/devtool/runqemu.py
index 303abcae4f..ead978aabc 100644
--- a/scripts/lib/devtool/runqemu.py
+++ b/scripts/lib/devtool/runqemu.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool runqemu plugin"""
@@ -31,8 +21,10 @@ def runqemu(args, config, basepath, workspace):
tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
try:
- machine = tinfoil.config_data.getVar('MACHINE', True)
- bindir_native = tinfoil.config_data.getVar('STAGING_BINDIR_NATIVE', True)
+ machine = tinfoil.config_data.getVar('MACHINE')
+ bindir_native = os.path.join(tinfoil.config_data.getVar('STAGING_DIR'),
+ tinfoil.config_data.getVar('BUILD_ARCH'),
+ tinfoil.config_data.getVar('bindir_native').lstrip(os.path.sep))
finally:
tinfoil.shutdown()
@@ -48,7 +40,12 @@ def runqemu(args, config, basepath, workspace):
raise DevtoolError('Unable to determine image name to run, please specify one')
try:
- exec_build_env_command(config.init_path, basepath, 'runqemu %s %s %s' % (machine, imagename, " ".join(args.args)), watch=True)
+ # FIXME runqemu assumes that if OECORE_NATIVE_SYSROOT is set then it shouldn't
+ # run bitbake to find out the values of various environment variables, which
+ # isn't the case for the extensible SDK. Work around it for now.
+ newenv = dict(os.environ)
+ newenv.pop('OECORE_NATIVE_SYSROOT', '')
+ exec_build_env_command(config.init_path, basepath, 'runqemu %s %s %s' % (machine, imagename, " ".join(args.args)), watch=True, env=newenv)
except bb.process.ExecutionError as e:
# We've already seen the output since watch=True, so just ensure we return something to the user
return e.exitcode
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 922277b79f..3aa42a1466 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
import subprocess
@@ -132,9 +122,9 @@ def sdk_update(args, config, basepath, workspace):
# Grab variable values
tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
try:
- stamps_dir = tinfoil.config_data.getVar('STAMPS_DIR', True)
- sstate_mirrors = tinfoil.config_data.getVar('SSTATE_MIRRORS', True)
- site_conf_version = tinfoil.config_data.getVar('SITE_CONF_VERSION', True)
+ stamps_dir = tinfoil.config_data.getVar('STAMPS_DIR')
+ sstate_mirrors = tinfoil.config_data.getVar('SSTATE_MIRRORS')
+ site_conf_version = tinfoil.config_data.getVar('SITE_CONF_VERSION')
finally:
tinfoil.shutdown()
@@ -145,6 +135,9 @@ def sdk_update(args, config, basepath, workspace):
# Fetch manifest from server
tmpmanifest = os.path.join(tmpsdk_dir, 'conf', 'sdk-conf-manifest')
ret = subprocess.call("wget -q -O %s %s/conf/sdk-conf-manifest" % (tmpmanifest, updateserver), shell=True)
+ if ret != 0:
+ logger.error("Cannot dowload files from %s" % updateserver)
+ return ret
changedfiles = check_manifest(tmpmanifest, basepath)
if not changedfiles:
logger.info("Already up-to-date")
@@ -155,7 +148,7 @@ def sdk_update(args, config, basepath, workspace):
if os.path.exists(os.path.join(basepath, 'layers/.git')):
out = subprocess.check_output("git status --porcelain", shell=True, cwd=layers_dir)
if not out:
- ret = subprocess.call("git fetch --all; git reset --hard", shell=True, cwd=layers_dir)
+ ret = subprocess.call("git fetch --all; git reset --hard @{u}", shell=True, cwd=layers_dir)
else:
logger.error("Failed to update metadata as there have been changes made to it. Aborting.");
logger.error("Changed files:\n%s" % out);
@@ -273,7 +266,7 @@ def sdk_install(args, config, basepath, workspace):
rd = parse_recipe(config, tinfoil, recipe, True)
if not rd:
return 1
- stampprefixes[recipe] = '%s.%s' % (rd.getVar('STAMP', True), tasks[0])
+ stampprefixes[recipe] = '%s.%s' % (rd.getVar('STAMP'), tasks[0])
if checkstamp(recipe):
logger.info('%s is already installed' % recipe)
else:
@@ -306,6 +299,12 @@ def sdk_install(args, config, basepath, workspace):
if failed:
return 2
+ try:
+ exec_build_env_command(config.init_path, basepath, 'bitbake build-sysroots', watch=True)
+ except bb.process.ExecutionError as e:
+ raise DevtoolError('Failed to bitbake build-sysroots:\n%s' % (str(e)))
+
+
def register_commands(subparsers, context):
"""Register devtool subcommands from the sdk plugin"""
if context.fixed_setup:
diff --git a/scripts/lib/devtool/search.py b/scripts/lib/devtool/search.py
index b44bed7f6f..d24040df37 100644
--- a/scripts/lib/devtool/search.py
+++ b/scripts/lib/devtool/search.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool search plugin"""
@@ -31,49 +21,79 @@ def search(args, config, basepath, workspace):
tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
try:
- pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
+ pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR')
defsummary = tinfoil.config_data.getVar('SUMMARY', False) or ''
keyword_rc = re.compile(args.keyword)
- for fn in os.listdir(pkgdata_dir):
- pfn = os.path.join(pkgdata_dir, fn)
- if not os.path.isfile(pfn):
+ def print_match(pn):
+ rd = parse_recipe(config, tinfoil, pn, True)
+ if not rd:
+ return
+ summary = rd.getVar('SUMMARY')
+ if summary == rd.expand(defsummary):
+ summary = ''
+ print("%s %s" % (pn.ljust(20), summary))
+
+
+ matches = []
+ if os.path.exists(pkgdata_dir):
+ for fn in os.listdir(pkgdata_dir):
+ pfn = os.path.join(pkgdata_dir, fn)
+ if not os.path.isfile(pfn):
+ continue
+
+ packages = []
+ match = False
+ if keyword_rc.search(fn):
+ match = True
+
+ if not match:
+ with open(pfn, 'r') as f:
+ for line in f:
+ if line.startswith('PACKAGES:'):
+ packages = line.split(':', 1)[1].strip().split()
+
+ for pkg in packages:
+ if keyword_rc.search(pkg):
+ match = True
+ break
+ if os.path.exists(os.path.join(pkgdata_dir, 'runtime', pkg + '.packaged')):
+ with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f:
+ for line in f:
+ if ': ' in line:
+ splitline = line.split(':', 1)
+ key = splitline[0]
+ value = splitline[1].strip()
+ if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
+ if keyword_rc.search(value):
+ match = True
+ break
+ if match:
+ print_match(fn)
+ matches.append(fn)
+ else:
+ logger.warning('Package data is not available, results may be limited')
+
+ for recipe in tinfoil.all_recipes():
+ if args.fixed_setup and 'nativesdk' in recipe.inherits():
continue
- packages = []
match = False
- if keyword_rc.search(fn):
+ if keyword_rc.search(recipe.pn):
match = True
-
- if not match:
- with open(pfn, 'r') as f:
- for line in f:
- if line.startswith('PACKAGES:'):
- packages = line.split(':', 1)[1].strip().split()
-
- for pkg in packages:
- if keyword_rc.search(pkg):
+ else:
+ for prov in recipe.provides:
+ if keyword_rc.search(prov):
match = True
break
- if os.path.exists(os.path.join(pkgdata_dir, 'runtime', pkg + '.packaged')):
- with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f:
- for line in f:
- if ': ' in line:
- splitline = line.split(':', 1)
- key = splitline[0]
- value = splitline[1].strip()
- if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
- if keyword_rc.search(value):
- match = True
- break
-
- if match:
- rd = parse_recipe(config, tinfoil, fn, True)
- summary = rd.getVar('SUMMARY', True)
- if summary == rd.expand(defsummary):
- summary = ''
- print("%s %s" % (fn.ljust(20), summary))
+ if not match:
+ for rprov in recipe.rprovides:
+ if keyword_rc.search(rprov):
+ match = True
+ break
+ if match and not recipe.pn in matches:
+ print_match(recipe.pn)
finally:
tinfoil.shutdown()
@@ -82,7 +102,7 @@ def search(args, config, basepath, workspace):
def register_commands(subparsers, context):
"""Register devtool subcommands from this plugin"""
parser_search = subparsers.add_parser('search', help='Search available recipes',
- description='Searches for available target recipes. Matches on recipe name, package name, description and installed files, and prints the recipe name on match.',
+ description='Searches for available recipes. Matches on recipe name, package name, description and installed files, and prints the recipe name and summary on match.',
group='info')
- parser_search.add_argument('keyword', help='Keyword to search for (regular expression syntax allowed)')
- parser_search.set_defaults(func=search, no_workspace=True)
+ parser_search.add_argument('keyword', help='Keyword to search for (regular expression syntax allowed, use quotes to avoid shell expansion)')
+ parser_search.set_defaults(func=search, no_workspace=True, fixed_setup=context.fixed_setup)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 83191450be..1c0cd8ab51 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1,19 +1,9 @@
# Development tool - standard commands plugin
#
-# Copyright (C) 2014-2016 Intel Corporation
+# Copyright (C) 2014-2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool standard plugins"""
import os
@@ -30,11 +20,13 @@ import errno
import glob
import filecmp
from collections import OrderedDict
-from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, DevtoolError
+from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, update_unlockedsigs, check_prerelease_version, check_git_repo_dirty, check_git_repo_op, DevtoolError
from devtool import parse_recipe
logger = logging.getLogger('devtool')
+override_branch_prefix = 'devtool-override-'
+
def add(args, config, basepath, workspace):
"""Entry point for the devtool 'add' subcommand"""
@@ -64,7 +56,13 @@ def add(args, config, basepath, workspace):
args.srctree = args.recipename
args.recipename = None
elif os.path.isdir(args.recipename):
- logger.warn('Ambiguous argument %s - assuming you mean it to be the recipe name')
+ logger.warning('Ambiguous argument "%s" - assuming you mean it to be the recipe name' % args.recipename)
+
+ if not args.fetchuri:
+ if args.srcrev:
+ raise DevtoolError('The -S/--srcrev option is only valid when fetching from an SCM repository')
+ if args.srcbranch:
+ raise DevtoolError('The -B/--srcbranch option is only valid when fetching from an SCM repository')
if args.srctree and os.path.isfile(args.srctree):
args.fetchuri = 'file://' + os.path.abspath(args.srctree)
@@ -74,7 +72,7 @@ def add(args, config, basepath, workspace):
if args.fetchuri:
raise DevtoolError('URI specified as positional argument as well as -f/--fetch')
else:
- # FIXME should show a warning that -f/--fetch is deprecated here
+ logger.warning('-f/--fetch option is deprecated - you can now simply specify the URL to fetch as a positional argument instead')
args.fetchuri = args.fetch
if args.recipename:
@@ -147,16 +145,26 @@ def add(args, config, basepath, workspace):
extracmdopts += ' --src-subdir "%s"' % args.src_subdir
if args.autorev:
extracmdopts += ' -a'
+ if args.fetch_dev:
+ extracmdopts += ' --fetch-dev'
+ if args.mirrors:
+ extracmdopts += ' --mirrors'
+ if args.srcrev:
+ extracmdopts += ' --srcrev %s' % args.srcrev
+ if args.srcbranch:
+ extracmdopts += ' --srcbranch %s' % args.srcbranch
+ if args.provides:
+ extracmdopts += ' --provides %s' % args.provides
tempdir = tempfile.mkdtemp(prefix='devtool')
try:
try:
- stdout, _ = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create -o %s "%s" %s' % (color, tempdir, source, extracmdopts))
+ stdout, _ = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create --devtool -o %s \'%s\' %s' % (color, tempdir, source, extracmdopts), watch=True)
except bb.process.ExecutionError as e:
if e.exitcode == 15:
raise DevtoolError('Could not auto-determine recipe name, please specify it on the command line')
else:
- raise DevtoolError('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
+ raise DevtoolError('Command \'%s\' failed' % e.command)
recipes = glob.glob(os.path.join(tempdir, '*.bb'))
if recipes:
@@ -199,7 +207,7 @@ def add(args, config, basepath, workspace):
raise DevtoolError('Command \'%s\' did not create any recipe file:\n%s' % (e.command, e.stdout))
attic_recipe = os.path.join(config.workspace_path, 'attic', recipename, os.path.basename(recipefile))
if os.path.exists(attic_recipe):
- logger.warn('A modified recipe from a previous invocation exists in %s - you may wish to move this over the top of the new recipe if you had changes in it that you want to continue with' % attic_recipe)
+ logger.warning('A modified recipe from a previous invocation exists in %s - you may wish to move this over the top of the new recipe if you had changes in it that you want to continue with' % attic_recipe)
finally:
if tmpsrcdir and os.path.exists(tmpsrcdir):
shutil.rmtree(tmpsrcdir)
@@ -210,8 +218,17 @@ def add(args, config, basepath, workspace):
tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
try:
- rd = oe.recipeutils.parse_recipe(tinfoil.cooker, recipefile, None)
+ try:
+ rd = tinfoil.parse_recipe_file(recipefile, False)
+ except Exception as e:
+ logger.error(str(e))
+ rd = None
if not rd:
+ # Parsing failed. We just created this recipe and we shouldn't
+ # leave it in the workdir or it'll prevent bitbake from starting
+ movefn = '%s.parsefailed' % recipefile
+ logger.error('Parsing newly created recipe failed, moving recipe to %s for reference. If this looks to be caused by the recipe itself, please report this error.' % movefn)
+ shutil.move(recipefile, movefn)
return 1
if args.fetchuri and not args.no_git:
@@ -253,8 +270,28 @@ def add(args, config, basepath, workspace):
f.write(' done\n')
f.write('}\n')
+ # Check if the new layer provides recipes whose priorities have been
+ # overriden by PREFERRED_PROVIDER.
+ recipe_name = rd.getVar('PN')
+ provides = rd.getVar('PROVIDES')
+ # Search every item defined in PROVIDES
+ for recipe_provided in provides.split():
+ preferred_provider = 'PREFERRED_PROVIDER_' + recipe_provided
+ current_pprovider = rd.getVar(preferred_provider)
+ if current_pprovider and current_pprovider != recipe_name:
+ if args.fixed_setup:
+ #if we are inside the eSDK add the new PREFERRED_PROVIDER in the workspace layer.conf
+ layerconf_file = os.path.join(config.workspace_path, "conf", "layer.conf")
+ with open(layerconf_file, 'a') as f:
+ f.write('%s = "%s"\n' % (preferred_provider, recipe_name))
+ else:
+ logger.warning('Set \'%s\' in order to use the recipe' % preferred_provider)
+ break
+
_add_md5(config, recipename, appendfile)
+ check_prerelease_version(rd.getVar('PV'), 'devtool add')
+
logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile)
finally:
@@ -289,26 +326,52 @@ def _check_compatible_recipe(pn, d):
raise DevtoolError("The %s recipe is a meta-recipe, and therefore is "
"not supported by this tool" % pn, 4)
- if bb.data.inherits_class('externalsrc', d) and d.getVar('EXTERNALSRC', True):
+ if bb.data.inherits_class('externalsrc', d) and d.getVar('EXTERNALSRC'):
# Not an incompatibility error per se, so we don't pass the error code
raise DevtoolError("externalsrc is currently enabled for the %s "
"recipe. This prevents the normal do_patch task "
"from working. You will need to disable this "
"first." % pn)
-def _move_file(src, dst):
- """Move a file. Creates all the directory components of destination path."""
+def _dry_run_copy(src, dst, dry_run_outdir, base_outdir):
+ """Common function for copying a file to the dry run output directory"""
+ relpath = os.path.relpath(dst, base_outdir)
+ if relpath.startswith('..'):
+ raise Exception('Incorrect base path %s for path %s' % (base_outdir, dst))
+ dst = os.path.join(dry_run_outdir, relpath)
dst_d = os.path.dirname(dst)
if dst_d:
bb.utils.mkdirhier(dst_d)
- shutil.move(src, dst)
+ # Don't overwrite existing files, otherwise in the case of an upgrade
+ # the dry-run written out recipe will be overwritten with an unmodified
+ # version
+ if not os.path.exists(dst):
+ shutil.copy(src, dst)
+
+def _move_file(src, dst, dry_run_outdir=None, base_outdir=None):
+ """Move a file. Creates all the directory components of destination path."""
+ dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+ logger.debug('Moving %s to %s%s' % (src, dst, dry_run_suffix))
+ if dry_run_outdir:
+ # We want to copy here, not move
+ _dry_run_copy(src, dst, dry_run_outdir, base_outdir)
+ else:
+ dst_d = os.path.dirname(dst)
+ if dst_d:
+ bb.utils.mkdirhier(dst_d)
+ shutil.move(src, dst)
-def _copy_file(src, dst):
+def _copy_file(src, dst, dry_run_outdir=None):
"""Copy a file. Creates all the directory components of destination path."""
- dst_d = os.path.dirname(dst)
- if dst_d:
- bb.utils.mkdirhier(dst_d)
- shutil.copy(src, dst)
+ dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+ logger.debug('Copying %s to %s%s' % (src, dst, dry_run_suffix))
+ if dry_run_outdir:
+ _dry_run_copy(src, dst, dry_run_outdir, base_outdir)
+ else:
+ dst_d = os.path.dirname(dst)
+ if dst_d:
+ bb.utils.mkdirhier(dst_d)
+ shutil.copy(src, dst)
def _git_ls_tree(repodir, treeish='HEAD', recursive=False):
"""List contents of a git treeish"""
@@ -318,10 +381,11 @@ def _git_ls_tree(repodir, treeish='HEAD', recursive=False):
cmd.append('-r')
out, _ = bb.process.run(cmd, cwd=repodir)
ret = {}
- for line in out.split('\0'):
- if line:
- split = line.split(None, 4)
- ret[split[3]] = split[0:3]
+ if out:
+ for line in out.split('\0'):
+ if line:
+ split = line.split(None, 4)
+ ret[split[3]] = split[0:3]
return ret
def _git_exclude_path(srctree, path):
@@ -353,7 +417,7 @@ def extract(args, config, basepath, workspace):
"""Entry point for the devtool 'extract' subcommand"""
import bb
- tinfoil = _prep_extract_operation(config, basepath, args.recipename)
+ tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
if not tinfoil:
# Error already shown
return 1
@@ -363,7 +427,7 @@ def extract(args, config, basepath, workspace):
return 1
srctree = os.path.abspath(args.srctree)
- initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, rd)
+ initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
logger.info('Source tree extracted to %s' % srctree)
if initial_rev:
@@ -377,7 +441,7 @@ def sync(args, config, basepath, workspace):
"""Entry point for the devtool 'sync' subcommand"""
import bb
- tinfoil = _prep_extract_operation(config, basepath, args.recipename)
+ tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
if not tinfoil:
# Error already shown
return 1
@@ -387,7 +451,7 @@ def sync(args, config, basepath, workspace):
return 1
srctree = os.path.abspath(args.srctree)
- initial_rev = _extract_source(srctree, args.keep_temp, args.branch, True, rd)
+ initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=True)
logger.info('Source tree %s synchronized' % srctree)
if initial_rev:
@@ -397,109 +461,39 @@ def sync(args, config, basepath, workspace):
finally:
tinfoil.shutdown()
-class BbTaskExecutor(object):
- """Class for executing bitbake tasks for a recipe
-
- FIXME: This is very awkward. Unfortunately it's not currently easy to
- properly execute tasks outside of bitbake itself, until then this has to
- suffice if we are to handle e.g. linux-yocto's extra tasks
- """
-
- def __init__(self, rdata):
- self.rdata = rdata
- self.executed = []
-
- def exec_func(self, func, report):
- """Run bitbake task function"""
- if not func in self.executed:
- deps = self.rdata.getVarFlag(func, 'deps', False)
- if deps:
- for taskdepfunc in deps:
- self.exec_func(taskdepfunc, True)
- if report:
- logger.info('Executing %s...' % func)
- fn = self.rdata.getVar('FILE', True)
- localdata = bb.build._task_data(fn, func, self.rdata)
- try:
- bb.build.exec_func(func, localdata)
- except bb.build.FuncFailed as e:
- raise DevtoolError(str(e))
- self.executed.append(func)
-
-
-class PatchTaskExecutor(BbTaskExecutor):
- def __init__(self, rdata):
- import oe.patch
- self.check_git = False
- self.useroptions = []
- oe.patch.GitApplyTree.gitCommandUserOptions(self.useroptions, d=rdata)
- super(PatchTaskExecutor, self).__init__(rdata)
-
- def exec_func(self, func, report):
- from oe.patch import GitApplyTree
- srcsubdir = self.rdata.getVar('S', True)
- haspatches = False
- if func == 'do_patch':
- patchdir = os.path.join(srcsubdir, 'patches')
- if os.path.exists(patchdir):
- if os.listdir(patchdir):
- haspatches = True
- else:
- os.rmdir(patchdir)
-
- super(PatchTaskExecutor, self).exec_func(func, report)
- if self.check_git and os.path.exists(srcsubdir):
- if func == 'do_patch':
- if os.path.exists(patchdir):
- shutil.rmtree(patchdir)
- if haspatches:
- stdout, _ = bb.process.run('git status --porcelain patches', cwd=srcsubdir)
- if stdout:
- bb.process.run('git checkout patches', cwd=srcsubdir)
-
- stdout, _ = bb.process.run('git status --porcelain', cwd=srcsubdir)
- if stdout:
- bb.process.run('git add .; git %s commit -a -m "Committing changes from %s\n\n%s"' % (' '.join(self.useroptions), func, GitApplyTree.ignore_commit_prefix + ' - from %s' % func), cwd=srcsubdir)
-
-
-def _prep_extract_operation(config, basepath, recipename, tinfoil=None):
- """HACK: Ugly workaround for making sure that requirements are met when
- trying to extract a package. Returns the tinfoil instance to be used."""
- if not tinfoil:
- tinfoil = setup_tinfoil(basepath=basepath)
-
- rd = parse_recipe(config, tinfoil, recipename, True)
- if not rd:
- return None
-
- if bb.data.inherits_class('kernel-yocto', rd):
- tinfoil.shutdown()
- try:
- stdout, _ = exec_build_env_command(config.init_path, basepath,
- 'bitbake kern-tools-native')
- tinfoil = setup_tinfoil(basepath=basepath)
- except bb.process.ExecutionError as err:
- raise DevtoolError("Failed to build kern-tools-native:\n%s" %
- err.stdout)
- return tinfoil
-
-
-def _extract_source(srctree, keep_temp, devbranch, sync, d):
+def symlink_oelocal_files_srctree(rd,srctree):
+ import oe.patch
+ if os.path.abspath(rd.getVar('S')) == os.path.abspath(rd.getVar('WORKDIR')):
+ # If recipe extracts to ${WORKDIR}, symlink the files into the srctree
+ # (otherwise the recipe won't build as expected)
+ local_files_dir = os.path.join(srctree, 'oe-local-files')
+ addfiles = []
+ for root, _, files in os.walk(local_files_dir):
+ relpth = os.path.relpath(root, local_files_dir)
+ if relpth != '.':
+ bb.utils.mkdirhier(os.path.join(srctree, relpth))
+ for fn in files:
+ if fn == '.gitignore':
+ continue
+ destpth = os.path.join(srctree, relpth, fn)
+ if os.path.exists(destpth):
+ os.unlink(destpth)
+ os.symlink('oe-local-files/%s' % fn, destpth)
+ addfiles.append(os.path.join(relpth, fn))
+ if addfiles:
+ bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree)
+ useroptions = []
+ oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd)
+ bb.process.run('git %s commit -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
+
+
+def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil, no_overrides=False):
"""Extract sources of a recipe"""
- import bb.event
import oe.recipeutils
+ import oe.patch
+ import oe.path
- def eventfilter(name, handler, event, d):
- """Bitbake event filter for devtool extract operation"""
- if name == 'base_eventhandler':
- return True
- else:
- return False
-
- if hasattr(bb.event, 'set_eventfilter'):
- bb.event.set_eventfilter(eventfilter)
-
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
_check_compatible_recipe(pn, d)
@@ -524,105 +518,119 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d):
bb.utils.mkdirhier(srctree)
os.rmdir(srctree)
- # We don't want notes to be printed, they are too verbose
- origlevel = bb.logger.getEffectiveLevel()
- if logger.getEffectiveLevel() > logging.DEBUG:
- bb.logger.setLevel(logging.WARNING)
+ extra_overrides = []
+ if not no_overrides:
+ history = d.varhistory.variable('SRC_URI')
+ for event in history:
+ if not 'flag' in event:
+ if event['op'].startswith(('_append[', '_prepend[')):
+ extra_overrides.append(event['op'].split('[')[1].split(']')[0])
+ # We want to remove duplicate overrides. If a recipe had multiple
+ # SRC_URI_override += values it would cause mulitple instances of
+ # overrides. This doesn't play nicely with things like creating a
+ # branch for every instance of DEVTOOL_EXTRA_OVERRIDES.
+ extra_overrides = list(set(extra_overrides))
+ if extra_overrides:
+ logger.info('SRC_URI contains some conditional appends/prepends - will create branches to represent these')
initial_rev = None
- tempdir = tempfile.mkdtemp(prefix='devtool')
- try:
- crd = d.createCopy()
- # Make a subdir so we guard against WORKDIR==S
- workdir = os.path.join(tempdir, 'workdir')
- crd.setVar('WORKDIR', workdir)
- crd.setVar('T', os.path.join(tempdir, 'temp'))
- if not crd.getVar('S', True).startswith(workdir):
- # Usually a shared workdir recipe (kernel, gcc)
- # Try to set a reasonable default
- if bb.data.inherits_class('kernel', d):
- crd.setVar('S', '${WORKDIR}/source')
- else:
- crd.setVar('S', '${WORKDIR}/%s' % os.path.basename(d.getVar('S', True)))
- if bb.data.inherits_class('kernel', d):
- # We don't want to move the source to STAGING_KERNEL_DIR here
- crd.setVar('STAGING_KERNEL_DIR', '${S}')
-
- task_executor = PatchTaskExecutor(crd)
-
- crd.setVar('EXTERNALSRC_forcevariable', '')
-
- logger.info('Fetching %s...' % pn)
- task_executor.exec_func('do_fetch', False)
- logger.info('Unpacking...')
- task_executor.exec_func('do_unpack', False)
- if bb.data.inherits_class('kernel-yocto', d):
- # Extra step for kernel to populate the source directory
- logger.info('Doing kernel checkout...')
- task_executor.exec_func('do_kernel_checkout', False)
- srcsubdir = crd.getVar('S', True)
-
- task_executor.check_git = True
-
- # Move local source files into separate subdir
- recipe_patches = [os.path.basename(patch) for patch in
- oe.recipeutils.get_recipe_patches(crd)]
- local_files = oe.recipeutils.get_recipe_local_files(crd)
- local_files = [fname for fname in local_files if
- os.path.exists(os.path.join(workdir, fname))]
- if local_files:
- for fname in local_files:
- _move_file(os.path.join(workdir, fname),
- os.path.join(tempdir, 'oe-local-files', fname))
- with open(os.path.join(tempdir, 'oe-local-files', '.gitignore'),
- 'w') as f:
- f.write('# Ignore local files, by default. Remove this file '
- 'if you want to commit the directory to Git\n*\n')
-
- if srcsubdir == workdir:
- # Find non-patch non-local sources that were "unpacked" to srctree
- # directory
- src_files = [fname for fname in _ls_tree(workdir) if
- os.path.basename(fname) not in recipe_patches]
- # Force separate S so that patch files can be left out from srctree
- srcsubdir = tempfile.mkdtemp(dir=workdir)
- crd.setVar('S', srcsubdir)
- # Move source files to S
- for path in src_files:
- _move_file(os.path.join(workdir, path),
- os.path.join(srcsubdir, path))
- elif os.path.dirname(srcsubdir) != workdir:
- # Handle if S is set to a subdirectory of the source
- srcsubdir = os.path.join(workdir, os.path.relpath(srcsubdir, workdir).split(os.sep)[0])
-
- scriptutils.git_convert_standalone_clone(srcsubdir)
- # Make sure that srcsubdir exists
- bb.utils.mkdirhier(srcsubdir)
- if not os.path.exists(srcsubdir) or not os.listdir(srcsubdir):
- logger.warning("no source unpacked to S, either the %s recipe "
- "doesn't use any source or the correct source "
- "directory could not be determined" % pn)
-
- setup_git_repo(srcsubdir, crd.getVar('PV', True), devbranch, d=d)
-
- (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srcsubdir)
- initial_rev = stdout.rstrip()
+ appendexisted = False
+ recipefile = d.getVar('FILE')
+ appendfile = recipe_to_append(recipefile, config)
+ is_kernel_yocto = bb.data.inherits_class('kernel-yocto', d)
+
+ # We need to redirect WORKDIR, STAMPS_DIR etc. under a temporary
+ # directory so that:
+ # (a) we pick up all files that get unpacked to the WORKDIR, and
+ # (b) we don't disturb the existing build
+ # However, with recipe-specific sysroots the sysroots for the recipe
+ # will be prepared under WORKDIR, and if we used the system temporary
+ # directory (i.e. usually /tmp) as used by mkdtemp by default, then
+ # our attempts to hardlink files into the recipe-specific sysroots
+ # will fail on systems where /tmp is a different filesystem, and it
+ # would have to fall back to copying the files which is a waste of
+ # time. Put the temp directory under the WORKDIR to prevent that from
+ # being a problem.
+ tempbasedir = d.getVar('WORKDIR')
+ bb.utils.mkdirhier(tempbasedir)
+ tempdir = tempfile.mkdtemp(prefix='devtooltmp-', dir=tempbasedir)
+ try:
+ tinfoil.logger.setLevel(logging.WARNING)
- crd.setVar('PATCHTOOL', 'git')
+ # FIXME this results in a cache reload under control of tinfoil, which is fine
+ # except we don't get the knotty progress bar
- logger.info('Patching...')
- task_executor.exec_func('do_patch', False)
+ if os.path.exists(appendfile):
+ appendbackup = os.path.join(tempdir, os.path.basename(appendfile) + '.bak')
+ shutil.copyfile(appendfile, appendbackup)
+ else:
+ appendbackup = None
+ bb.utils.mkdirhier(os.path.dirname(appendfile))
+ logger.debug('writing append file %s' % appendfile)
+ with open(appendfile, 'a') as f:
+ f.write('###--- _extract_source\n')
+ f.write('DEVTOOL_TEMPDIR = "%s"\n' % tempdir)
+ f.write('DEVTOOL_DEVBRANCH = "%s"\n' % devbranch)
+ if not is_kernel_yocto:
+ f.write('PATCHTOOL = "git"\n')
+ f.write('PATCH_COMMIT_FUNCTIONS = "1"\n')
+ if extra_overrides:
+ f.write('DEVTOOL_EXTRA_OVERRIDES = "%s"\n' % ':'.join(extra_overrides))
+ f.write('inherit devtool-source\n')
+ f.write('###--- _extract_source\n')
+
+ update_unlockedsigs(basepath, workspace, fixed_setup, [pn])
+
+ sstate_manifests = d.getVar('SSTATE_MANIFESTS')
+ bb.utils.mkdirhier(sstate_manifests)
+ preservestampfile = os.path.join(sstate_manifests, 'preserve-stamps')
+ with open(preservestampfile, 'w') as f:
+ f.write(d.getVar('STAMP'))
+ try:
+ if is_kernel_yocto:
+ # We need to generate the kernel config
+ task = 'do_configure'
+ else:
+ task = 'do_patch'
- bb.process.run('git tag -f devtool-patched', cwd=srcsubdir)
+ # Run the fetch + unpack tasks
+ res = tinfoil.build_targets(pn,
+ task,
+ handle_events=True)
+ finally:
+ if os.path.exists(preservestampfile):
+ os.remove(preservestampfile)
- kconfig = None
- if bb.data.inherits_class('kernel-yocto', d):
- # Store generate and store kernel config
- logger.info('Generating kernel config')
- task_executor.exec_func('do_configure', False)
- kconfig = os.path.join(crd.getVar('B', True), '.config')
+ if not res:
+ raise DevtoolError('Extracting source for %s failed' % pn)
+ try:
+ with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
+ initial_rev = f.read()
+
+ with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
+ srcsubdir = f.read()
+ except FileNotFoundError as e:
+ raise DevtoolError('Something went wrong with source extraction - the devtool-source class was not active or did not function correctly:\n%s' % str(e))
+ srcsubdir_rel = os.path.relpath(srcsubdir, os.path.join(tempdir, 'workdir'))
+
+ # Check if work-shared is empty, if yes
+ # find source and copy to work-shared
+ if is_kernel_yocto:
+ workshareddir = d.getVar('STAGING_KERNEL_DIR')
+ staging_kerVer = get_staging_kver(workshareddir)
+ kernelVersion = d.getVar('LINUX_VERSION')
+
+ # handle dangling symbolic link in work-shared:
+ if os.path.islink(workshareddir):
+ os.unlink(workshareddir)
+
+ if os.path.exists(workshareddir) and (not os.listdir(workshareddir) or kernelVersion != staging_kerVer):
+ shutil.rmtree(workshareddir)
+ oe.path.copyhardlinktree(srcsubdir,workshareddir)
+ elif not os.path.exists(workshareddir):
+ oe.path.copyhardlinktree(srcsubdir,workshareddir)
tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
srctree_localdir = os.path.join(srctree, 'oe-local-files')
@@ -652,19 +660,22 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d):
shutil.move(tempdir_localdir, srcsubdir)
shutil.move(srcsubdir, srctree)
+ symlink_oelocal_files_srctree(d,srctree)
- if kconfig:
+ if is_kernel_yocto:
logger.info('Copying kernel config to srctree')
- shutil.copy2(kconfig, srctree)
+ shutil.copy2(os.path.join(tempdir, '.config'), srctree)
finally:
- bb.logger.setLevel(origlevel)
-
+ if appendbackup:
+ shutil.copyfile(appendbackup, appendfile)
+ elif os.path.exists(appendfile):
+ os.remove(appendfile)
if keep_temp:
logger.info('Preserving temporary directory %s' % tempdir)
else:
shutil.rmtree(tempdir)
- return initial_rev
+ return initial_rev, srcsubdir_rel
def _add_md5(config, recipename, filename):
"""Record checksum of a file (or recursively for a directory) to the md5-file of the workspace"""
@@ -672,8 +683,11 @@ def _add_md5(config, recipename, filename):
def addfile(fn):
md5 = bb.utils.md5_file(fn)
- with open(os.path.join(config.workspace_path, '.devtool_md5'), 'a') as f:
- f.write('%s|%s|%s\n' % (recipename, os.path.relpath(fn, config.workspace_path), md5))
+ with open(os.path.join(config.workspace_path, '.devtool_md5'), 'a+') as f:
+ md5_str = '%s|%s|%s\n' % (recipename, os.path.relpath(fn, config.workspace_path), md5)
+ f.seek(0, os.SEEK_SET)
+ if not md5_str in f.read():
+ f.write(md5_str)
if os.path.isdir(filename):
for root, _, files in os.walk(filename):
@@ -706,7 +720,7 @@ def _check_preserve(config, recipename):
if splitline[2] != md5:
bb.utils.mkdirhier(preservepath)
preservefile = os.path.basename(removefile)
- logger.warn('File %s modified since it was written, preserving in %s' % (preservefile, preservepath))
+ logger.warning('File %s modified since it was written, preserving in %s' % (preservefile, preservepath))
shutil.move(removefile, os.path.join(preservepath, preservefile))
else:
os.remove(removefile)
@@ -714,22 +728,43 @@ def _check_preserve(config, recipename):
tf.write(line)
os.rename(newfile, origfile)
+def get_staging_kver(srcdir):
+ # Kernel version from work-shared
+ kerver = []
+ staging_kerVer=""
+ if os.path.exists(srcdir) and os.listdir(srcdir):
+ with open(os.path.join(srcdir,"Makefile")) as f:
+ version = [next(f) for x in range(5)][1:4]
+ for word in version:
+ kerver.append(word.split('= ')[1].split('\n')[0])
+ staging_kerVer = ".".join(kerver)
+ return staging_kerVer
+
+def get_staging_kbranch(srcdir):
+ staging_kbranch = ""
+ if os.path.exists(srcdir) and os.listdir(srcdir):
+ (branch, _) = bb.process.run('git branch | grep \* | cut -d \' \' -f2', cwd=srcdir)
+ staging_kbranch = "".join(branch.split('\n')[0])
+ return staging_kbranch
+
def modify(args, config, basepath, workspace):
"""Entry point for the devtool 'modify' subcommand"""
import bb
import oe.recipeutils
+ import oe.patch
+ import oe.path
if args.recipename in workspace:
raise DevtoolError("recipe %s is already in your workspace" %
args.recipename)
- tinfoil = setup_tinfoil(basepath=basepath)
+ tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
try:
rd = parse_recipe(config, tinfoil, args.recipename, True)
if not rd:
return 1
- pn = rd.getVar('PN', True)
+ pn = rd.getVar('PN')
if pn != args.recipename:
logger.info('Mapping %s to %s' % (args.recipename, pn))
if pn in workspace:
@@ -745,13 +780,8 @@ def modify(args, config, basepath, workspace):
raise DevtoolError("--no-extract specified and source path %s does "
"not exist or is not a directory" %
srctree)
- if not args.no_extract:
- tinfoil = _prep_extract_operation(config, basepath, pn, tinfoil)
- if not tinfoil:
- # Error already shown
- return 1
- recipefile = rd.getVar('FILE', True)
+ recipefile = rd.getVar('FILE')
appendfile = recipe_to_append(recipefile, config, args.wildcard)
if os.path.exists(appendfile):
raise DevtoolError("Another variant of recipe %s is already in your "
@@ -763,21 +793,82 @@ def modify(args, config, basepath, workspace):
initial_rev = None
commits = []
+ check_commits = False
+
+ if bb.data.inherits_class('kernel-yocto', rd):
+ # Current set kernel version
+ kernelVersion = rd.getVar('LINUX_VERSION')
+ srcdir = rd.getVar('STAGING_KERNEL_DIR')
+ kbranch = rd.getVar('KBRANCH')
+
+ staging_kerVer = get_staging_kver(srcdir)
+ staging_kbranch = get_staging_kbranch(srcdir)
+ if (os.path.exists(srcdir) and os.listdir(srcdir)) and (kernelVersion in staging_kerVer and staging_kbranch == kbranch):
+ oe.path.copyhardlinktree(srcdir,srctree)
+ workdir = rd.getVar('WORKDIR')
+ srcsubdir = rd.getVar('S')
+ localfilesdir = os.path.join(srctree,'oe-local-files')
+ # Move local source files into separate subdir
+ recipe_patches = [os.path.basename(patch) for patch in oe.recipeutils.get_recipe_patches(rd)]
+ local_files = oe.recipeutils.get_recipe_local_files(rd)
+
+ for key in local_files.copy():
+ if key.endswith('scc'):
+ sccfile = open(local_files[key], 'r')
+ for l in sccfile:
+ line = l.split()
+ if line and line[0] in ('kconf', 'patch'):
+ cfg = os.path.join(os.path.dirname(local_files[key]), line[-1])
+ if not cfg in local_files.values():
+ local_files[line[-1]] = cfg
+ shutil.copy2(cfg, workdir)
+ sccfile.close()
+
+ # Ignore local files with subdir={BP}
+ srcabspath = os.path.abspath(srcsubdir)
+ local_files = [fname for fname in local_files if os.path.exists(os.path.join(workdir, fname)) and (srcabspath == workdir or not os.path.join(workdir, fname).startswith(srcabspath + os.sep))]
+ if local_files:
+ for fname in local_files:
+ _move_file(os.path.join(workdir, fname), os.path.join(srctree, 'oe-local-files', fname))
+ with open(os.path.join(srctree, 'oe-local-files', '.gitignore'), 'w') as f:
+ f.write('# Ignore local files, by default. Remove this file ''if you want to commit the directory to Git\n*\n')
+
+ symlink_oelocal_files_srctree(rd,srctree)
+
+ task = 'do_configure'
+ res = tinfoil.build_targets(pn, task, handle_events=True)
+
+ # Copy .config to workspace
+ kconfpath = rd.getVar('B')
+ logger.info('Copying kernel config to workspace')
+ shutil.copy2(os.path.join(kconfpath, '.config'),srctree)
+
+ # Set this to true, we still need to get initial_rev
+ # by parsing the git repo
+ args.no_extract = True
+
if not args.no_extract:
- initial_rev = _extract_source(srctree, False, args.branch, False, rd)
+ initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
if not initial_rev:
return 1
logger.info('Source tree extracted to %s' % srctree)
# Get list of commits since this revision
(stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=srctree)
commits = stdout.split()
+ check_commits = True
else:
if os.path.exists(os.path.join(srctree, '.git')):
- # Check if it's a tree previously extracted by us
+ # Check if it's a tree previously extracted by us. This is done
+ # by ensuring that devtool-base and args.branch (devtool) exist.
+ # The check_commits logic will cause an exception if either one
+ # of these doesn't exist
try:
(stdout, _) = bb.process.run('git branch --contains devtool-base', cwd=srctree)
+ bb.process.run('git rev-parse %s' % args.branch, cwd=srctree)
except bb.process.ExecutionError:
stdout = ''
+ if stdout:
+ check_commits = True
for line in stdout.splitlines():
if line.startswith('*'):
(stdout, _) = bb.process.run('git rev-parse devtool-base', cwd=srctree)
@@ -787,9 +878,36 @@ def modify(args, config, basepath, workspace):
(stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
initial_rev = stdout.rstrip()
+ branch_patches = {}
+ if check_commits:
+ # Check if there are override branches
+ (stdout, _) = bb.process.run('git branch', cwd=srctree)
+ branches = []
+ for line in stdout.rstrip().splitlines():
+ branchname = line[2:].rstrip()
+ if branchname.startswith(override_branch_prefix):
+ branches.append(branchname)
+ if branches:
+ logger.warning('SRC_URI is conditionally overridden in this recipe, thus several %s* branches have been created, one for each override that makes changes to SRC_URI. It is recommended that you make changes to the %s branch first, then checkout and rebase each %s* branch and update any unique patches there (duplicates on those branches will be ignored by devtool finish/update-recipe)' % (override_branch_prefix, args.branch, override_branch_prefix))
+ branches.insert(0, args.branch)
+ seen_patches = []
+ for branch in branches:
+ branch_patches[branch] = []
+ (stdout, _) = bb.process.run('git log devtool-base..%s' % branch, cwd=srctree)
+ for line in stdout.splitlines():
+ line = line.strip()
+ if line.startswith(oe.patch.GitApplyTree.patch_line_prefix):
+ origpatch = line[len(oe.patch.GitApplyTree.patch_line_prefix):].split(':', 1)[-1].strip()
+ if not origpatch in seen_patches:
+ seen_patches.append(origpatch)
+ branch_patches[branch].append(origpatch)
+
+ # Need to grab this here in case the source is within a subdirectory
+ srctreebase = srctree
+
# Check that recipe isn't using a shared workdir
- s = os.path.abspath(rd.getVar('S', True))
- workdir = os.path.abspath(rd.getVar('WORKDIR', True))
+ s = os.path.abspath(rd.getVar('S'))
+ workdir = os.path.abspath(rd.getVar('WORKDIR'))
if s.startswith(workdir) and s != workdir and os.path.dirname(s) != workdir:
# Handle if S is set to a subdirectory of the source
srcsubdir = os.path.relpath(s, workdir).split(os.sep, 1)[1]
@@ -801,7 +919,8 @@ def modify(args, config, basepath, workspace):
# Local files can be modified/tracked in separate subdir under srctree
# Mostly useful for packages with S != WORKDIR
f.write('FILESPATH_prepend := "%s:"\n' %
- os.path.join(srctree, 'oe-local-files'))
+ os.path.join(srctreebase, 'oe-local-files'))
+ f.write('# srctreebase: %s\n' % srctreebase)
f.write('\ninherit externalsrc\n')
f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n')
@@ -813,15 +932,28 @@ def modify(args, config, basepath, workspace):
if bb.data.inherits_class('kernel', rd):
f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout '
- 'do_fetch do_unpack do_patch do_kernel_configme do_kernel_configcheck"\n')
+ 'do_fetch do_unpack do_kernel_configme do_kernel_configcheck"\n')
+ f.write('\ndo_patch[noexec] = "1"\n')
f.write('\ndo_configure_append() {\n'
' cp ${B}/.config ${S}/.config.baseline\n'
' ln -sfT ${B}/.config ${S}/.config.new\n'
'}\n')
+ if rd.getVarFlag('do_menuconfig','task'):
+ f.write('\ndo_configure_append() {\n'
+ ' cp ${B}/.config ${S}/.config.baseline\n'
+ ' ln -sfT ${B}/.config ${S}/.config.new\n'
+ '}\n')
if initial_rev:
f.write('\n# initial_rev: %s\n' % initial_rev)
for commit in commits:
f.write('# commit: %s\n' % commit)
+ if branch_patches:
+ for branch in branch_patches:
+ if branch == args.branch:
+ continue
+ f.write('# patches_%s: %s\n' % (branch, ','.join(branch_patches[branch])))
+
+ update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn])
_add_md5(config, pn, appendfile)
@@ -832,21 +964,222 @@ def modify(args, config, basepath, workspace):
return 0
-def _get_patchset_revs(srctree, recipe_path, initial_rev=None):
+
+def rename(args, config, basepath, workspace):
+ """Entry point for the devtool 'rename' subcommand"""
+ import bb
+ import oe.recipeutils
+
+ check_workspace_recipe(workspace, args.recipename)
+
+ if not (args.newname or args.version):
+ raise DevtoolError('You must specify a new name, a version with -V/--version, or both')
+
+ recipefile = workspace[args.recipename]['recipefile']
+ if not recipefile:
+ raise DevtoolError('devtool rename can only be used where the recipe file itself is in the workspace (e.g. after devtool add)')
+
+ if args.newname and args.newname != args.recipename:
+ reason = oe.recipeutils.validate_pn(args.newname)
+ if reason:
+ raise DevtoolError(reason)
+ newname = args.newname
+ else:
+ newname = args.recipename
+
+ append = workspace[args.recipename]['bbappend']
+ appendfn = os.path.splitext(os.path.basename(append))[0]
+ splitfn = appendfn.split('_')
+ if len(splitfn) > 1:
+ origfnver = appendfn.split('_')[1]
+ else:
+ origfnver = ''
+
+ recipefilemd5 = None
+ tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
+ try:
+ rd = parse_recipe(config, tinfoil, args.recipename, True)
+ if not rd:
+ return 1
+
+ bp = rd.getVar('BP')
+ bpn = rd.getVar('BPN')
+ if newname != args.recipename:
+ localdata = rd.createCopy()
+ localdata.setVar('PN', newname)
+ newbpn = localdata.getVar('BPN')
+ else:
+ newbpn = bpn
+ s = rd.getVar('S', False)
+ src_uri = rd.getVar('SRC_URI', False)
+ pv = rd.getVar('PV')
+
+ # Correct variable values that refer to the upstream source - these
+ # values must stay the same, so if the name/version are changing then
+ # we need to fix them up
+ new_s = s
+ new_src_uri = src_uri
+ if newbpn != bpn:
+ # ${PN} here is technically almost always incorrect, but people do use it
+ new_s = new_s.replace('${BPN}', bpn)
+ new_s = new_s.replace('${PN}', bpn)
+ new_s = new_s.replace('${BP}', '%s-${PV}' % bpn)
+ new_src_uri = new_src_uri.replace('${BPN}', bpn)
+ new_src_uri = new_src_uri.replace('${PN}', bpn)
+ new_src_uri = new_src_uri.replace('${BP}', '%s-${PV}' % bpn)
+ if args.version and origfnver == pv:
+ new_s = new_s.replace('${PV}', pv)
+ new_s = new_s.replace('${BP}', '${BPN}-%s' % pv)
+ new_src_uri = new_src_uri.replace('${PV}', pv)
+ new_src_uri = new_src_uri.replace('${BP}', '${BPN}-%s' % pv)
+ patchfields = {}
+ if new_s != s:
+ patchfields['S'] = new_s
+ if new_src_uri != src_uri:
+ patchfields['SRC_URI'] = new_src_uri
+ if patchfields:
+ recipefilemd5 = bb.utils.md5_file(recipefile)
+ oe.recipeutils.patch_recipe(rd, recipefile, patchfields)
+ newrecipefilemd5 = bb.utils.md5_file(recipefile)
+ finally:
+ tinfoil.shutdown()
+
+ if args.version:
+ newver = args.version
+ else:
+ newver = origfnver
+
+ if newver:
+ newappend = '%s_%s.bbappend' % (newname, newver)
+ newfile = '%s_%s.bb' % (newname, newver)
+ else:
+ newappend = '%s.bbappend' % newname
+ newfile = '%s.bb' % newname
+
+ oldrecipedir = os.path.dirname(recipefile)
+ newrecipedir = os.path.join(config.workspace_path, 'recipes', newname)
+ if oldrecipedir != newrecipedir:
+ bb.utils.mkdirhier(newrecipedir)
+
+ newappend = os.path.join(os.path.dirname(append), newappend)
+ newfile = os.path.join(newrecipedir, newfile)
+
+ # Rename bbappend
+ logger.info('Renaming %s to %s' % (append, newappend))
+ os.rename(append, newappend)
+ # Rename recipe file
+ logger.info('Renaming %s to %s' % (recipefile, newfile))
+ os.rename(recipefile, newfile)
+
+ # Rename source tree if it's the default path
+ appendmd5 = None
+ if not args.no_srctree:
+ srctree = workspace[args.recipename]['srctree']
+ if os.path.abspath(srctree) == os.path.join(config.workspace_path, 'sources', args.recipename):
+ newsrctree = os.path.join(config.workspace_path, 'sources', newname)
+ logger.info('Renaming %s to %s' % (srctree, newsrctree))
+ shutil.move(srctree, newsrctree)
+ # Correct any references (basically EXTERNALSRC*) in the .bbappend
+ appendmd5 = bb.utils.md5_file(newappend)
+ appendlines = []
+ with open(newappend, 'r') as f:
+ for line in f:
+ appendlines.append(line)
+ with open(newappend, 'w') as f:
+ for line in appendlines:
+ if srctree in line:
+ line = line.replace(srctree, newsrctree)
+ f.write(line)
+ newappendmd5 = bb.utils.md5_file(newappend)
+
+ bpndir = None
+ newbpndir = None
+ if newbpn != bpn:
+ bpndir = os.path.join(oldrecipedir, bpn)
+ if os.path.exists(bpndir):
+ newbpndir = os.path.join(newrecipedir, newbpn)
+ logger.info('Renaming %s to %s' % (bpndir, newbpndir))
+ shutil.move(bpndir, newbpndir)
+
+ bpdir = None
+ newbpdir = None
+ if newver != origfnver or newbpn != bpn:
+ bpdir = os.path.join(oldrecipedir, bp)
+ if os.path.exists(bpdir):
+ newbpdir = os.path.join(newrecipedir, '%s-%s' % (newbpn, newver))
+ logger.info('Renaming %s to %s' % (bpdir, newbpdir))
+ shutil.move(bpdir, newbpdir)
+
+ if oldrecipedir != newrecipedir:
+ # Move any stray files and delete the old recipe directory
+ for entry in os.listdir(oldrecipedir):
+ oldpath = os.path.join(oldrecipedir, entry)
+ newpath = os.path.join(newrecipedir, entry)
+ logger.info('Renaming %s to %s' % (oldpath, newpath))
+ shutil.move(oldpath, newpath)
+ os.rmdir(oldrecipedir)
+
+ # Now take care of entries in .devtool_md5
+ md5entries = []
+ with open(os.path.join(config.workspace_path, '.devtool_md5'), 'r') as f:
+ for line in f:
+ md5entries.append(line)
+
+ if bpndir and newbpndir:
+ relbpndir = os.path.relpath(bpndir, config.workspace_path) + '/'
+ else:
+ relbpndir = None
+ if bpdir and newbpdir:
+ relbpdir = os.path.relpath(bpdir, config.workspace_path) + '/'
+ else:
+ relbpdir = None
+
+ with open(os.path.join(config.workspace_path, '.devtool_md5'), 'w') as f:
+ for entry in md5entries:
+ splitentry = entry.rstrip().split('|')
+ if len(splitentry) > 2:
+ if splitentry[0] == args.recipename:
+ splitentry[0] = newname
+ if splitentry[1] == os.path.relpath(append, config.workspace_path):
+ splitentry[1] = os.path.relpath(newappend, config.workspace_path)
+ if appendmd5 and splitentry[2] == appendmd5:
+ splitentry[2] = newappendmd5
+ elif splitentry[1] == os.path.relpath(recipefile, config.workspace_path):
+ splitentry[1] = os.path.relpath(newfile, config.workspace_path)
+ if recipefilemd5 and splitentry[2] == recipefilemd5:
+ splitentry[2] = newrecipefilemd5
+ elif relbpndir and splitentry[1].startswith(relbpndir):
+ splitentry[1] = os.path.relpath(os.path.join(newbpndir, splitentry[1][len(relbpndir):]), config.workspace_path)
+ elif relbpdir and splitentry[1].startswith(relbpdir):
+ splitentry[1] = os.path.relpath(os.path.join(newbpdir, splitentry[1][len(relbpdir):]), config.workspace_path)
+ entry = '|'.join(splitentry) + '\n'
+ f.write(entry)
+ return 0
+
+
+def _get_patchset_revs(srctree, recipe_path, initial_rev=None, force_patch_refresh=False):
"""Get initial and update rev of a recipe. These are the start point of the
whole patchset and start point for the patches to be re-generated/updated.
"""
import bb
+ # Get current branch
+ stdout, _ = bb.process.run('git rev-parse --abbrev-ref HEAD',
+ cwd=srctree)
+ branchname = stdout.rstrip()
+
# Parse initial rev from recipe if not specified
commits = []
+ patches = []
with open(recipe_path, 'r') as f:
for line in f:
if line.startswith('# initial_rev:'):
if not initial_rev:
initial_rev = line.split(':')[-1].strip()
- elif line.startswith('# commit:'):
+ elif line.startswith('# commit:') and not force_patch_refresh:
commits.append(line.split(':')[-1].strip())
+ elif line.startswith('# patches_%s:' % branchname):
+ patches = line.split(':')[-1].strip().split(',')
update_rev = initial_rev
changed_revs = None
@@ -865,7 +1198,7 @@ def _get_patchset_revs(srctree, recipe_path, initial_rev=None):
except bb.process.ExecutionError as err:
stdout = None
- if stdout is not None:
+ if stdout is not None and not force_patch_refresh:
changed_revs = []
for line in stdout.splitlines():
if line.startswith('+ '):
@@ -873,7 +1206,7 @@ def _get_patchset_revs(srctree, recipe_path, initial_rev=None):
if rev in newcommits:
changed_revs.append(rev)
- return initial_rev, update_rev, changed_revs
+ return initial_rev, update_rev, changed_revs, patches
def _remove_file_entries(srcuri, filelist):
"""Remove file:// entries from SRC_URI"""
@@ -890,8 +1223,20 @@ def _remove_file_entries(srcuri, filelist):
break
return entries, remaining
-def _remove_source_files(append, files, destpath):
+def _replace_srcuri_entry(srcuri, filename, newentry):
+ """Replace entry corresponding to specified file with a new entry"""
+ basename = os.path.basename(filename)
+ for i in range(len(srcuri)):
+ if os.path.basename(srcuri[i].split(';')[0]) == basename:
+ srcuri.pop(i)
+ srcuri.insert(i, newentry)
+ break
+
+def _remove_source_files(append, files, destpath, no_report_remove=False, dry_run=False):
"""Unlink existing patch files"""
+
+ dry_run_suffix = ' (dry-run)' if dry_run else ''
+
for path in files:
if append:
if not destpath:
@@ -899,22 +1244,24 @@ def _remove_source_files(append, files, destpath):
path = os.path.join(destpath, os.path.basename(path))
if os.path.exists(path):
- logger.info('Removing file %s' % path)
- # FIXME "git rm" here would be nice if the file in question is
- # tracked
- # FIXME there's a chance that this file is referred to by
- # another recipe, in which case deleting wouldn't be the
- # right thing to do
- os.remove(path)
- # Remove directory if empty
- try:
- os.rmdir(os.path.dirname(path))
- except OSError as ose:
- if ose.errno != errno.ENOTEMPTY:
- raise
-
-
-def _export_patches(srctree, rd, start_rev, destdir):
+ if not no_report_remove:
+ logger.info('Removing file %s%s' % (path, dry_run_suffix))
+ if not dry_run:
+ # FIXME "git rm" here would be nice if the file in question is
+ # tracked
+ # FIXME there's a chance that this file is referred to by
+ # another recipe, in which case deleting wouldn't be the
+ # right thing to do
+ os.remove(path)
+ # Remove directory if empty
+ try:
+ os.rmdir(os.path.dirname(path))
+ except OSError as ose:
+ if ose.errno != errno.ENOTEMPTY:
+ raise
+
+
+def _export_patches(srctree, rd, start_rev, destdir, changed_revs=None):
"""Export patches from srctree to given location.
Returns three-tuple of dicts:
1. updated - patches that already exist in SRCURI
@@ -931,6 +1278,7 @@ def _export_patches(srctree, rd, start_rev, destdir):
existing_patches = dict((os.path.basename(path), path) for path in
oe.recipeutils.get_recipe_patches(rd))
+ logger.debug('Existing patches: %s' % existing_patches)
# Generate patches from Git, exclude local files directory
patch_pathspec = _git_exclude_path(srctree, 'oe-local-files')
@@ -943,18 +1291,44 @@ def _export_patches(srctree, rd, start_rev, destdir):
# revision This does assume that people are using unique shortlog
# values, but they ought to be anyway...
new_basename = seqpatch_re.match(new_patch).group(2)
- found = False
+ match_name = None
for old_patch in existing_patches:
old_basename = seqpatch_re.match(old_patch).group(2)
- if new_basename == old_basename:
- updated[new_patch] = existing_patches.pop(old_patch)
- found = True
- # Rename patch files
- if new_patch != old_patch:
- os.rename(os.path.join(destdir, new_patch),
- os.path.join(destdir, old_patch))
+ old_basename_splitext = os.path.splitext(old_basename)
+ if old_basename.endswith(('.gz', '.bz2', '.Z')) and old_basename_splitext[0] == new_basename:
+ old_patch_noext = os.path.splitext(old_patch)[0]
+ match_name = old_patch_noext
+ break
+ elif new_basename == old_basename:
+ match_name = old_patch
break
- if not found:
+ if match_name:
+ # Rename patch files
+ if new_patch != match_name:
+ os.rename(os.path.join(destdir, new_patch),
+ os.path.join(destdir, match_name))
+ # Need to pop it off the list now before checking changed_revs
+ oldpath = existing_patches.pop(old_patch)
+ if changed_revs is not None:
+ # Avoid updating patches that have not actually changed
+ with open(os.path.join(destdir, match_name), 'r') as f:
+ firstlineitems = f.readline().split()
+ # Looking for "From <hash>" line
+ if len(firstlineitems) > 1 and len(firstlineitems[1]) == 40:
+ if not firstlineitems[1] in changed_revs:
+ continue
+ # Recompress if necessary
+ if oldpath.endswith(('.gz', '.Z')):
+ bb.process.run(['gzip', match_name], cwd=destdir)
+ if oldpath.endswith('.gz'):
+ match_name += '.gz'
+ else:
+ match_name += '.Z'
+ elif oldpath.endswith('.bz2'):
+ bb.process.run(['bzip2', match_name], cwd=destdir)
+ match_name += '.bz2'
+ updated[match_name] = oldpath
+ else:
added[new_patch] = None
return (updated, added, existing_patches)
@@ -972,7 +1346,7 @@ def _create_kconfig_diff(srctree, rd, outfile):
stdout, stderr = pipe.communicate()
if pipe.returncode == 1:
logger.info("Updating config fragment %s" % outfile)
- with open(outfile, 'w') as fobj:
+ with open(outfile, 'wb') as fobj:
fobj.write(stdout)
elif pipe.returncode == 0:
logger.info("Would remove config fragment %s" % outfile)
@@ -986,7 +1360,7 @@ def _create_kconfig_diff(srctree, rd, outfile):
return False
-def _export_local_files(srctree, rd, destdir):
+def _export_local_files(srctree, rd, destdir, srctreebase):
"""Copy local files from srctree to given location.
Returns three-tuple of dicts:
1. updated - files that already exist in SRCURI
@@ -1006,7 +1380,7 @@ def _export_local_files(srctree, rd, destdir):
updated = OrderedDict()
added = OrderedDict()
removed = OrderedDict()
- local_files_dir = os.path.join(srctree, 'oe-local-files')
+ local_files_dir = os.path.join(srctreebase, 'oe-local-files')
git_files = _git_ls_tree(srctree)
if 'oe-local-files' in git_files:
# If tracked by Git, take the files from srctree HEAD. First get
@@ -1019,9 +1393,9 @@ def _export_local_files(srctree, rd, destdir):
new_set = list(_git_ls_tree(srctree, tree, True).keys())
elif os.path.isdir(local_files_dir):
# If not tracked by Git, just copy from working copy
- new_set = _ls_tree(os.path.join(srctree, 'oe-local-files'))
+ new_set = _ls_tree(local_files_dir)
bb.process.run(['cp', '-ax',
- os.path.join(srctree, 'oe-local-files', '.'), destdir])
+ os.path.join(local_files_dir, '.'), destdir])
else:
new_set = []
@@ -1043,6 +1417,20 @@ def _export_local_files(srctree, rd, destdir):
if os.path.exists(os.path.join(local_files_dir, fragment_fn)):
os.unlink(os.path.join(local_files_dir, fragment_fn))
+ # Special handling for cml1, ccmake, etc bbclasses that generated
+ # configuration fragment files that are consumed as source files
+ for frag_class, frag_name in [("cml1", "fragment.cfg"), ("ccmake", "site-file.cmake")]:
+ if bb.data.inherits_class(frag_class, rd):
+ srcpath = os.path.join(rd.getVar('WORKDIR'), frag_name)
+ if os.path.exists(srcpath):
+ if frag_name not in new_set:
+ new_set.append(frag_name)
+ # copy fragment into destdir
+ shutil.copy2(srcpath, destdir)
+ # copy fragment into local files if exists
+ if os.path.isdir(local_files_dir):
+ shutil.copy2(srcpath, local_files_dir)
+
if new_set is not None:
for fname in new_set:
if fname in existing_files:
@@ -1053,8 +1441,8 @@ def _export_local_files(srctree, rd, destdir):
elif fname != '.gitignore':
added[fname] = None
- workdir = rd.getVar('WORKDIR', True)
- s = rd.getVar('S', True)
+ workdir = rd.getVar('WORKDIR')
+ s = rd.getVar('S')
if not s.endswith(os.sep):
s += os.sep
@@ -1076,23 +1464,26 @@ def _export_local_files(srctree, rd, destdir):
def _determine_files_dir(rd):
"""Determine the appropriate files directory for a recipe"""
- recipedir = rd.getVar('FILE_DIRNAME', True)
- for entry in rd.getVar('FILESPATH', True).split(':'):
+ recipedir = rd.getVar('FILE_DIRNAME')
+ for entry in rd.getVar('FILESPATH').split(':'):
relpth = os.path.relpath(entry, recipedir)
if not os.sep in relpth:
# One (or zero) levels below only, so we don't put anything in machine-specific directories
if os.path.isdir(entry):
return entry
- return os.path.join(recipedir, rd.getVar('BPN', True))
+ return os.path.join(recipedir, rd.getVar('BPN'))
-def _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remove):
+def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, no_report_remove, dry_run_outdir=None):
"""Implement the 'srcrev' mode of update-recipe"""
import bb
import oe.recipeutils
- recipefile = rd.getVar('FILE', True)
- logger.info('Updating SRCREV in recipe %s' % os.path.basename(recipefile))
+ dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+
+ recipefile = rd.getVar('FILE')
+ recipedir = os.path.basename(recipefile)
+ logger.info('Updating SRCREV in recipe %s%s' % (recipedir, dry_run_suffix))
# Get HEAD revision
try:
@@ -1112,18 +1503,21 @@ def _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remo
srcuri = orig_src_uri.split()
tempdir = tempfile.mkdtemp(prefix='devtool')
update_srcuri = False
+ appendfile = None
try:
local_files_dir = tempfile.mkdtemp(dir=tempdir)
- upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir)
+ srctreebase = workspace[recipename]['srctreebase']
+ upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
if not no_remove:
# Find list of existing patches in recipe file
patches_dir = tempfile.mkdtemp(dir=tempdir)
- old_srcrev = (rd.getVar('SRCREV', False) or '')
+ old_srcrev = rd.getVar('SRCREV') or ''
upd_p, new_p, del_p = _export_patches(srctree, rd, old_srcrev,
patches_dir)
+ logger.debug('Patches: update %s, new %s, delete %s' % (dict(upd_p), dict(new_p), dict(del_p)))
# Remove deleted local files and "overlapping" patches
- remove_files = list(del_f.values()) + list(upd_p.values())
+ remove_files = list(del_f.values()) + list(upd_p.values()) + list(del_p.values())
if remove_files:
removedentries = _remove_file_entries(srcuri, remove_files)[0]
update_srcuri = True
@@ -1135,29 +1529,36 @@ def _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remo
if update_srcuri:
removevalues = {'SRC_URI': removedentries}
patchfields['SRC_URI'] = '\\\n '.join(srcuri)
- _, destpath = oe.recipeutils.bbappend_recipe(
- rd, appendlayerdir, files, wildcardver=wildcard_version,
- extralines=patchfields, removevalues=removevalues)
+ if dry_run_outdir:
+ logger.info('Creating bbappend (dry-run)')
+ else:
+ appendfile, destpath = oe.recipeutils.bbappend_recipe(
+ rd, appendlayerdir, files, wildcardver=wildcard_version,
+ extralines=patchfields, removevalues=removevalues,
+ redirect_output=dry_run_outdir)
else:
files_dir = _determine_files_dir(rd)
for basepath, path in upd_f.items():
- logger.info('Updating file %s' % basepath)
+ logger.info('Updating file %s%s' % (basepath, dry_run_suffix))
if os.path.isabs(basepath):
# Original file (probably with subdir pointing inside source tree)
# so we do not want to move it, just copy
- _copy_file(basepath, path)
+ _copy_file(basepath, path, dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
else:
- _move_file(os.path.join(local_files_dir, basepath), path)
+ _move_file(os.path.join(local_files_dir, basepath), path,
+ dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
update_srcuri= True
for basepath, path in new_f.items():
- logger.info('Adding new file %s' % basepath)
+ logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
_move_file(os.path.join(local_files_dir, basepath),
- os.path.join(files_dir, basepath))
+ os.path.join(files_dir, basepath),
+ dry_run_outdir=dry_run_outdir,
+ base_outdir=recipedir)
srcuri.append('file://%s' % basepath)
update_srcuri = True
if update_srcuri:
patchfields['SRC_URI'] = ' '.join(srcuri)
- oe.recipeutils.patch_recipe(rd, recipefile, patchfields)
+ ret = oe.recipeutils.patch_recipe(rd, recipefile, patchfields, redirect_output=dry_run_outdir)
finally:
shutil.rmtree(tempdir)
if not 'git://' in orig_src_uri:
@@ -1165,51 +1566,70 @@ def _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remo
'point to a git repository where you have pushed your '
'changes')
- _remove_source_files(appendlayerdir, remove_files, destpath)
- return True
+ _remove_source_files(appendlayerdir, remove_files, destpath, no_report_remove, dry_run=dry_run_outdir)
+ return True, appendfile, remove_files
-def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, initial_rev):
+def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir=None, force_patch_refresh=False):
"""Implement the 'patch' mode of update-recipe"""
import bb
import oe.recipeutils
- recipefile = rd.getVar('FILE', True)
+ recipefile = rd.getVar('FILE')
+ recipedir = os.path.dirname(recipefile)
append = workspace[recipename]['bbappend']
if not os.path.exists(append):
raise DevtoolError('unable to find workspace bbappend for recipe %s' %
recipename)
- initial_rev, update_rev, changed_revs = _get_patchset_revs(srctree, append, initial_rev)
+ initial_rev, update_rev, changed_revs, filter_patches = _get_patchset_revs(srctree, append, initial_rev, force_patch_refresh)
if not initial_rev:
raise DevtoolError('Unable to find initial revision - please specify '
'it with --initial-rev')
+ appendfile = None
+ dl_dir = rd.getVar('DL_DIR')
+ if not dl_dir.endswith('/'):
+ dl_dir += '/'
+
+ dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+
tempdir = tempfile.mkdtemp(prefix='devtool')
try:
local_files_dir = tempfile.mkdtemp(dir=tempdir)
- upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir)
+ if filter_patches:
+ upd_f = {}
+ new_f = {}
+ del_f = {}
+ else:
+ srctreebase = workspace[recipename]['srctreebase']
+ upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
remove_files = []
if not no_remove:
# Get all patches from source tree and check if any should be removed
all_patches_dir = tempfile.mkdtemp(dir=tempdir)
- upd_p, new_p, del_p = _export_patches(srctree, rd, initial_rev,
- all_patches_dir)
+ _, _, del_p = _export_patches(srctree, rd, initial_rev,
+ all_patches_dir)
# Remove deleted local files and patches
remove_files = list(del_f.values()) + list(del_p.values())
# Get updated patches from source tree
patches_dir = tempfile.mkdtemp(dir=tempdir)
- upd_p, new_p, del_p = _export_patches(srctree, rd, update_rev,
- patches_dir)
+ upd_p, new_p, _ = _export_patches(srctree, rd, update_rev,
+ patches_dir, changed_revs)
+ logger.debug('Pre-filtering: update: %s, new: %s' % (dict(upd_p), dict(new_p)))
+ if filter_patches:
+ new_p = OrderedDict()
+ upd_p = OrderedDict((k,v) for k,v in upd_p.items() if k in filter_patches)
+ remove_files = [f for f in remove_files if f in filter_patches]
updatefiles = False
updaterecipe = False
destpath = None
srcuri = (rd.getVar('SRC_URI', False) or '').split()
if appendlayerdir:
- files = dict((os.path.join(local_files_dir, key), val) for
+ files = OrderedDict((os.path.join(local_files_dir, key), val) for
key, val in list(upd_f.items()) + list(new_f.items()))
- files.update(dict((os.path.join(patches_dir, key), val) for
+ files.update(OrderedDict((os.path.join(patches_dir, key), val) for
key, val in list(upd_p.items()) + list(new_p.items())))
if files or remove_files:
removevalues = None
@@ -1220,65 +1640,76 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
remaining = ['file://' + os.path.basename(item) for
item in remaining]
removevalues = {'SRC_URI': removedentries + remaining}
- _, destpath = oe.recipeutils.bbappend_recipe(
+ appendfile, destpath = oe.recipeutils.bbappend_recipe(
rd, appendlayerdir, files,
wildcardver=wildcard_version,
- removevalues=removevalues)
+ removevalues=removevalues,
+ redirect_output=dry_run_outdir)
else:
logger.info('No patches or local source files needed updating')
else:
# Update existing files
+ files_dir = _determine_files_dir(rd)
for basepath, path in upd_f.items():
logger.info('Updating file %s' % basepath)
if os.path.isabs(basepath):
# Original file (probably with subdir pointing inside source tree)
# so we do not want to move it, just copy
- _copy_file(basepath, path)
+ _copy_file(basepath, path,
+ dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
else:
- _move_file(os.path.join(local_files_dir, basepath), path)
+ _move_file(os.path.join(local_files_dir, basepath), path,
+ dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
updatefiles = True
for basepath, path in upd_p.items():
patchfn = os.path.join(patches_dir, basepath)
- if changed_revs is not None:
- # Avoid updating patches that have not actually changed
- with open(patchfn, 'r') as f:
- firstlineitems = f.readline().split()
- if len(firstlineitems) > 1 and len(firstlineitems[1]) == 40:
- if not firstlineitems[1] in changed_revs:
- continue
- logger.info('Updating patch %s' % basepath)
- _move_file(patchfn, path)
+ if os.path.dirname(path) + '/' == dl_dir:
+ # This is a a downloaded patch file - we now need to
+ # replace the entry in SRC_URI with our local version
+ logger.info('Replacing remote patch %s with updated local version' % basepath)
+ path = os.path.join(files_dir, basepath)
+ _replace_srcuri_entry(srcuri, basepath, 'file://%s' % basepath)
+ updaterecipe = True
+ else:
+ logger.info('Updating patch %s%s' % (basepath, dry_run_suffix))
+ _move_file(patchfn, path,
+ dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
updatefiles = True
# Add any new files
- files_dir = _determine_files_dir(rd)
for basepath, path in new_f.items():
- logger.info('Adding new file %s' % basepath)
+ logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
_move_file(os.path.join(local_files_dir, basepath),
- os.path.join(files_dir, basepath))
+ os.path.join(files_dir, basepath),
+ dry_run_outdir=dry_run_outdir,
+ base_outdir=recipedir)
srcuri.append('file://%s' % basepath)
updaterecipe = True
for basepath, path in new_p.items():
- logger.info('Adding new patch %s' % basepath)
+ logger.info('Adding new patch %s%s' % (basepath, dry_run_suffix))
_move_file(os.path.join(patches_dir, basepath),
- os.path.join(files_dir, basepath))
+ os.path.join(files_dir, basepath),
+ dry_run_outdir=dry_run_outdir,
+ base_outdir=recipedir)
srcuri.append('file://%s' % basepath)
updaterecipe = True
# Update recipe, if needed
if _remove_file_entries(srcuri, remove_files)[0]:
updaterecipe = True
if updaterecipe:
- logger.info('Updating recipe %s' % os.path.basename(recipefile))
- oe.recipeutils.patch_recipe(rd, recipefile,
- {'SRC_URI': ' '.join(srcuri)})
+ if not dry_run_outdir:
+ logger.info('Updating recipe %s' % os.path.basename(recipefile))
+ ret = oe.recipeutils.patch_recipe(rd, recipefile,
+ {'SRC_URI': ' '.join(srcuri)},
+ redirect_output=dry_run_outdir)
elif not updatefiles:
# Neither patches nor recipe were updated
logger.info('No patches or files need updating')
- return False
+ return False, None, []
finally:
shutil.rmtree(tempdir)
- _remove_source_files(appendlayerdir, remove_files, destpath)
- return True
+ _remove_source_files(appendlayerdir, remove_files, destpath, no_report_remove, dry_run=dry_run_outdir)
+ return True, appendfile, remove_files
def _guess_recipe_update_mode(srctree, rdata):
"""Guess the recipe update mode to use"""
@@ -1302,18 +1733,73 @@ def _guess_recipe_update_mode(srctree, rdata):
return 'patch'
-def _update_recipe(recipename, workspace, rd, mode, appendlayerdir, wildcard_version, no_remove, initial_rev):
+def _update_recipe(recipename, workspace, rd, mode, appendlayerdir, wildcard_version, no_remove, initial_rev, no_report_remove=False, dry_run_outdir=None, no_overrides=False, force_patch_refresh=False):
srctree = workspace[recipename]['srctree']
if mode == 'auto':
mode = _guess_recipe_update_mode(srctree, rd)
- if mode == 'srcrev':
- updated = _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remove)
- elif mode == 'patch':
- updated = _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, initial_rev)
- else:
- raise DevtoolError('update_recipe: invalid mode %s' % mode)
- return updated
+ override_branches = []
+ mainbranch = None
+ startbranch = None
+ if not no_overrides:
+ stdout, _ = bb.process.run('git branch', cwd=srctree)
+ other_branches = []
+ for line in stdout.splitlines():
+ branchname = line[2:]
+ if line.startswith('* '):
+ startbranch = branchname
+ if branchname.startswith(override_branch_prefix):
+ override_branches.append(branchname)
+ else:
+ other_branches.append(branchname)
+
+ if override_branches:
+ logger.debug('_update_recipe: override branches: %s' % override_branches)
+ logger.debug('_update_recipe: other branches: %s' % other_branches)
+ if startbranch.startswith(override_branch_prefix):
+ if len(other_branches) == 1:
+ mainbranch = other_branches[1]
+ else:
+ raise DevtoolError('Unable to determine main branch - please check out the main branch in source tree first')
+ else:
+ mainbranch = startbranch
+
+ checkedout = None
+ anyupdated = False
+ appendfile = None
+ allremoved = []
+ if override_branches:
+ logger.info('Handling main branch (%s)...' % mainbranch)
+ if startbranch != mainbranch:
+ bb.process.run('git checkout %s' % mainbranch, cwd=srctree)
+ checkedout = mainbranch
+ try:
+ branchlist = [mainbranch] + override_branches
+ for branch in branchlist:
+ crd = bb.data.createCopy(rd)
+ if branch != mainbranch:
+ logger.info('Handling branch %s...' % branch)
+ override = branch[len(override_branch_prefix):]
+ crd.appendVar('OVERRIDES', ':%s' % override)
+ bb.process.run('git checkout %s' % branch, cwd=srctree)
+ checkedout = branch
+
+ if mode == 'srcrev':
+ updated, appendf, removed = _update_recipe_srcrev(recipename, workspace, srctree, crd, appendlayerdir, wildcard_version, no_remove, no_report_remove, dry_run_outdir)
+ elif mode == 'patch':
+ updated, appendf, removed = _update_recipe_patch(recipename, workspace, srctree, crd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir, force_patch_refresh)
+ else:
+ raise DevtoolError('update_recipe: invalid mode %s' % mode)
+ if updated:
+ anyupdated = True
+ if appendf:
+ appendfile = appendf
+ allremoved.extend(removed)
+ finally:
+ if startbranch and checkedout != startbranch:
+ bb.process.run('git checkout %s' % startbranch, cwd=srctree)
+
+ return anyupdated, appendfile, allremoved
def update_recipe(args, config, basepath, workspace):
"""Entry point for the devtool 'update-recipe' subcommand"""
@@ -1334,12 +1820,17 @@ def update_recipe(args, config, basepath, workspace):
if not rd:
return 1
- updated = _update_recipe(args.recipename, workspace, rd, args.mode, args.append, args.wildcard_version, args.no_remove, args.initial_rev)
+ dry_run_output = None
+ dry_run_outdir = None
+ if args.dry_run:
+ dry_run_output = tempfile.TemporaryDirectory(prefix='devtool')
+ dry_run_outdir = dry_run_output.name
+ updated, _, _ = _update_recipe(args.recipename, workspace, rd, args.mode, args.append, args.wildcard_version, args.no_remove, args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh)
if updated:
- rf = rd.getVar('FILE', True)
+ rf = rd.getVar('FILE')
if rf.startswith(config.workspace_path):
- logger.warn('Recipe file %s has been updated but is inside the workspace - you will need to move it (and any associated files next to it) out to the desired layer before using "devtool reset" in order to keep any changes' % rf)
+ logger.warning('Recipe file %s has been updated but is inside the workspace - you will need to move it (and any associated files next to it) out to the desired layer before using "devtool reset" in order to keep any changes' % rf)
finally:
tinfoil.shutdown()
@@ -1349,7 +1840,7 @@ def update_recipe(args, config, basepath, workspace):
def status(args, config, basepath, workspace):
"""Entry point for the devtool 'status' subcommand"""
if workspace:
- for recipe, value in workspace.items():
+ for recipe, value in sorted(workspace.items()):
recipefile = value['recipefile']
if recipefile:
recipestr = ' (%s)' % recipefile
@@ -1361,8 +1852,29 @@ def status(args, config, basepath, workspace):
return 0
-def _reset(recipes, no_clean, config, basepath, workspace):
+def _reset(recipes, no_clean, remove_work, config, basepath, workspace):
"""Reset one or more recipes"""
+ import oe.path
+
+ def clean_preferred_provider(pn, layerconf_path):
+ """Remove PREFERRED_PROVIDER from layer.conf'"""
+ import re
+ layerconf_file = os.path.join(layerconf_path, 'conf', 'layer.conf')
+ new_layerconf_file = os.path.join(layerconf_path, 'conf', '.layer.conf')
+ pprovider_found = False
+ with open(layerconf_file, 'r') as f:
+ lines = f.readlines()
+ with open(new_layerconf_file, 'a') as nf:
+ for line in lines:
+ pprovider_exp = r'^PREFERRED_PROVIDER_.*? = "' + pn + r'"$'
+ if not re.match(pprovider_exp, line):
+ nf.write(line)
+ else:
+ pprovider_found = True
+ if pprovider_found:
+ shutil.move(new_layerconf_file, layerconf_file)
+ else:
+ os.remove(new_layerconf_file)
if recipes and not no_clean:
if len(recipes) == 1:
@@ -1389,37 +1901,57 @@ def _reset(recipes, no_clean, config, basepath, workspace):
for pn in recipes:
_check_preserve(config, pn)
+ appendfile = workspace[pn]['bbappend']
+ if os.path.exists(appendfile):
+ # This shouldn't happen, but is possible if devtool errored out prior to
+ # writing the md5 file. We need to delete this here or the recipe won't
+ # actually be reset
+ os.remove(appendfile)
+
preservepath = os.path.join(config.workspace_path, 'attic', pn, pn)
def preservedir(origdir):
if os.path.exists(origdir):
for root, dirs, files in os.walk(origdir):
for fn in files:
- logger.warn('Preserving %s in %s' % (fn, preservepath))
+ logger.warning('Preserving %s in %s' % (fn, preservepath))
_move_file(os.path.join(origdir, fn),
os.path.join(preservepath, fn))
for dn in dirs:
preservedir(os.path.join(root, dn))
os.rmdir(origdir)
- preservedir(os.path.join(config.workspace_path, 'recipes', pn))
+ recipefile = workspace[pn]['recipefile']
+ if recipefile and oe.path.is_path_parent(config.workspace_path, recipefile):
+ # This should always be true if recipefile is set, but just in case
+ preservedir(os.path.dirname(recipefile))
# We don't automatically create this dir next to appends, but the user can
preservedir(os.path.join(config.workspace_path, 'appends', pn))
- srctree = workspace[pn]['srctree']
- if os.path.isdir(srctree):
- if os.listdir(srctree):
- # We don't want to risk wiping out any work in progress
- logger.info('Leaving source tree %s as-is; if you no '
- 'longer need it then please delete it manually'
- % srctree)
+ srctreebase = workspace[pn]['srctreebase']
+ if os.path.isdir(srctreebase):
+ if os.listdir(srctreebase):
+ if remove_work:
+ logger.info('-r argument used on %s, removing source tree.'
+ ' You will lose any unsaved work' %pn)
+ shutil.rmtree(srctreebase)
+ else:
+ # We don't want to risk wiping out any work in progress
+ logger.info('Leaving source tree %s as-is; if you no '
+ 'longer need it then please delete it manually'
+ % srctreebase)
else:
# This is unlikely, but if it's empty we can just remove it
- os.rmdir(srctree)
+ os.rmdir(srctreebase)
+ clean_preferred_provider(pn, config.workspace_path)
def reset(args, config, basepath, workspace):
"""Entry point for the devtool 'reset' subcommand"""
import bb
+ import shutil
+
+ recipes = ""
+
if args.recipename:
if args.all:
raise DevtoolError("Recipe cannot be specified if -a/--all is used")
@@ -1434,23 +1966,35 @@ def reset(args, config, basepath, workspace):
else:
recipes = args.recipename
- _reset(recipes, args.no_clean, config, basepath, workspace)
+ _reset(recipes, args.no_clean, args.remove_work, config, basepath, workspace)
return 0
def _get_layer(layername, d):
"""Determine the base layer path for the specified layer name/path"""
- layerdirs = d.getVar('BBLAYERS', True).split()
- layers = {os.path.basename(p): p for p in layerdirs}
+ layerdirs = d.getVar('BBLAYERS').split()
+ layers = {} # {basename: layer_paths}
+ for p in layerdirs:
+ bn = os.path.basename(p)
+ if bn not in layers:
+ layers[bn] = [p]
+ else:
+ layers[bn].append(p)
# Provide some shortcuts
if layername.lower() in ['oe-core', 'openembedded-core']:
- layerdir = layers.get('meta', None)
+ layername = 'meta'
+ layer_paths = layers.get(layername, None)
+ if not layer_paths:
+ return os.path.abspath(layername)
+ elif len(layer_paths) == 1:
+ return os.path.abspath(layer_paths[0])
else:
- layerdir = layers.get(layername, None)
- if layerdir:
- layerdir = os.path.abspath(layerdir)
- return layerdir or layername
+ # multiple layers having the same base name
+ logger.warning("Multiple layers have the same base name '%s', use the first one '%s'." % (layername, layer_paths[0]))
+ logger.warning("Consider using path instead of base name to specify layer:\n\t\t%s" % '\n\t\t'.join(layer_paths))
+ return os.path.abspath(layer_paths[0])
+
def finish(args, config, basepath, workspace):
"""Entry point for the devtool 'finish' subcommand"""
@@ -1459,6 +2003,22 @@ def finish(args, config, basepath, workspace):
check_workspace_recipe(workspace, args.recipename)
+ dry_run_suffix = ' (dry-run)' if args.dry_run else ''
+
+ # Grab the equivalent of COREBASE without having to initialise tinfoil
+ corebasedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
+
+ srctree = workspace[args.recipename]['srctree']
+ check_git_repo_op(srctree, [corebasedir])
+ dirty = check_git_repo_dirty(srctree)
+ if dirty:
+ if args.force:
+ logger.warning('Source tree is not clean, continuing as requested by -f/--force')
+ else:
+ raise DevtoolError('Source tree is not clean:\n\n%s\nEnsure you have committed your changes or use -f/--force if you are sure there\'s nothing that needs to be committed' % dirty)
+
+ no_clean = args.no_clean
+ remove_work=args.remove_work
tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
try:
rd = parse_recipe(config, tinfoil, args.recipename, True)
@@ -1466,7 +2026,9 @@ def finish(args, config, basepath, workspace):
return 1
destlayerdir = _get_layer(args.destination, tinfoil.config_data)
- origlayerdir = oe.recipeutils.find_layerdir(rd.getVar('FILE', True))
+ recipefile = rd.getVar('FILE')
+ recipedir = os.path.dirname(recipefile)
+ origlayerdir = oe.recipeutils.find_layerdir(recipefile)
if not os.path.isdir(destlayerdir):
raise DevtoolError('Unable to find layer or directory matching "%s"' % args.destination)
@@ -1485,6 +2047,8 @@ def finish(args, config, basepath, workspace):
elif line.startswith('# original_files:'):
origfilelist = line.split(':')[1].split()
+ destlayerbasedir = oe.recipeutils.find_layerdir(destlayerdir)
+
if origlayerdir == config.workspace_path:
# Recipe file itself is in workspace, update it there first
appendlayerdir = None
@@ -1496,6 +2060,11 @@ def finish(args, config, basepath, workspace):
destpath = oe.recipeutils.get_bbfile_path(rd, destlayerdir, origrelpath)
if not destpath:
raise DevtoolError("Unable to determine destination layer path - check that %s specifies an actual layer and %s/conf/layer.conf specifies BBFILES. You may also need to specify a more complete path." % (args.destination, destlayerdir))
+ # Warn if the layer isn't in bblayers.conf (the code to create a bbappend will do this in other cases)
+ layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS').split()]
+ if not os.path.abspath(destlayerbasedir) in layerdirs:
+ bb.warn('Specified destination layer is not currently enabled in bblayers.conf, so the %s recipe will now be unavailable in your current configuration until you add the layer there' % args.recipename)
+
elif destlayerdir == origlayerdir:
# Same layer, update the original recipe
appendlayerdir = None
@@ -1505,36 +2074,103 @@ def finish(args, config, basepath, workspace):
appendlayerdir = destlayerdir
destpath = None
+ # Actually update the recipe / bbappend
+ removing_original = (origpath and origfilelist and oe.recipeutils.find_layerdir(origpath) == destlayerbasedir)
+ dry_run_output = None
+ dry_run_outdir = None
+ if args.dry_run:
+ dry_run_output = tempfile.TemporaryDirectory(prefix='devtool')
+ dry_run_outdir = dry_run_output.name
+ updated, appendfile, removed = _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, no_report_remove=removing_original, initial_rev=args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh)
+ removed = [os.path.relpath(pth, recipedir) for pth in removed]
+
# Remove any old files in the case of an upgrade
- if origpath and origfilelist and oe.recipeutils.find_layerdir(origpath) == oe.recipeutils.find_layerdir(destlayerdir):
+ if removing_original:
for fn in origfilelist:
fnp = os.path.join(origpath, fn)
- try:
- os.remove(fnp)
- except FileNotFoundError:
- pass
-
- # Actually update the recipe / bbappend
- _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, initial_rev=args.initial_rev)
+ if fn in removed or not os.path.exists(os.path.join(recipedir, fn)):
+ logger.info('Removing file %s%s' % (fnp, dry_run_suffix))
+ if not args.dry_run:
+ try:
+ os.remove(fnp)
+ except FileNotFoundError:
+ pass
if origlayerdir == config.workspace_path and destpath:
# Recipe file itself is in the workspace - need to move it and any
# associated files to the specified layer
- logger.info('Moving recipe file to %s' % destpath)
- recipedir = os.path.dirname(rd.getVar('FILE', True))
+ no_clean = True
+ logger.info('Moving recipe file to %s%s' % (destpath, dry_run_suffix))
for root, _, files in os.walk(recipedir):
for fn in files:
srcpath = os.path.join(root, fn)
relpth = os.path.relpath(os.path.dirname(srcpath), recipedir)
destdir = os.path.abspath(os.path.join(destpath, relpth))
- bb.utils.mkdirhier(destdir)
- shutil.move(srcpath, os.path.join(destdir, fn))
+ destfp = os.path.join(destdir, fn)
+ _move_file(srcpath, destfp, dry_run_outdir=dry_run_outdir, base_outdir=destpath)
+ if dry_run_outdir:
+ import difflib
+ comparelist = []
+ for root, _, files in os.walk(dry_run_outdir):
+ for fn in files:
+ outf = os.path.join(root, fn)
+ relf = os.path.relpath(outf, dry_run_outdir)
+ logger.debug('dry-run: output file %s' % relf)
+ if fn.endswith('.bb'):
+ if origfilelist and origpath and destpath:
+ # Need to match this up with the pre-upgrade recipe file
+ for origf in origfilelist:
+ if origf.endswith('.bb'):
+ comparelist.append((os.path.abspath(os.path.join(origpath, origf)),
+ outf,
+ os.path.abspath(os.path.join(destpath, relf))))
+ break
+ else:
+ # Compare to the existing recipe
+ comparelist.append((recipefile, outf, recipefile))
+ elif fn.endswith('.bbappend'):
+ if appendfile:
+ if os.path.exists(appendfile):
+ comparelist.append((appendfile, outf, appendfile))
+ else:
+ comparelist.append((None, outf, appendfile))
+ else:
+ if destpath:
+ recipedest = destpath
+ elif appendfile:
+ recipedest = os.path.dirname(appendfile)
+ else:
+ recipedest = os.path.dirname(recipefile)
+ destfp = os.path.join(recipedest, relf)
+ if os.path.exists(destfp):
+ comparelist.append((destfp, outf, destfp))
+ output = ''
+ for oldfile, newfile, newfileshow in comparelist:
+ if oldfile:
+ with open(oldfile, 'r') as f:
+ oldlines = f.readlines()
+ else:
+ oldfile = '/dev/null'
+ oldlines = []
+ with open(newfile, 'r') as f:
+ newlines = f.readlines()
+ if not newfileshow:
+ newfileshow = newfile
+ diff = difflib.unified_diff(oldlines, newlines, oldfile, newfileshow)
+ difflines = list(diff)
+ if difflines:
+ output += ''.join(difflines)
+ if output:
+ logger.info('Diff of changed files:\n%s' % output)
finally:
tinfoil.shutdown()
# Everything else has succeeded, we can now reset
- _reset([args.recipename], no_clean=False, config=config, basepath=basepath, workspace=workspace)
+ if args.dry_run:
+ logger.info('Resetting recipe (dry-run)')
+ else:
+ _reset([args.recipename], no_clean=no_clean, remove_work=remove_work, config=config, basepath=basepath, workspace=workspace)
return 0
@@ -1561,13 +2197,19 @@ def register_commands(subparsers, context):
group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
parser_add.add_argument('--fetch', '-f', help='Fetch the specified URI and extract it to create the source tree (deprecated - pass as positional argument instead)', metavar='URI')
+ parser_add.add_argument('--fetch-dev', help='For npm, also fetch devDependencies', action="store_true")
parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)')
parser_add.add_argument('--no-git', '-g', help='If fetching source, do not set up source tree as a git repository', action="store_true")
- parser_add.add_argument('--autorev', '-a', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true")
+ group = parser_add.add_mutually_exclusive_group()
+ group.add_argument('--srcrev', '-S', help='Source revision to fetch if fetching from an SCM such as git (default latest)')
+ group.add_argument('--autorev', '-a', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true")
+ parser_add.add_argument('--srcbranch', '-B', help='Branch in source repository if fetching from an SCM such as git (default master)')
parser_add.add_argument('--binary', '-b', help='Treat the source tree as something that should be installed verbatim (no compilation, same directory structure). Useful with binary packages e.g. RPMs.', action='store_true')
parser_add.add_argument('--also-native', help='Also add native variant (i.e. support building recipe for the build host as well as the target machine)', action='store_true')
parser_add.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR')
- parser_add.set_defaults(func=add)
+ parser_add.add_argument('--mirrors', help='Enable PREMIRRORS and MIRRORS for source tree fetching (disable by default).', action="store_true")
+ parser_add.add_argument('--provides', '-p', help='Specify an alias for the item provided by the recipe. E.g. virtual/libgl')
+ parser_add.set_defaults(func=add, fixed_setup=context.fixed_setup)
parser_modify = subparsers.add_parser('modify', help='Modify the source for an existing recipe',
description='Sets up the build environment to modify the source for an existing recipe. The default behaviour is to extract the source being fetched by the recipe into a git tree so you can work on it; alternatively if you already have your own pre-prepared source tree you can specify -n/--no-extract.',
@@ -1582,7 +2224,9 @@ def register_commands(subparsers, context):
group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")')
- parser_modify.set_defaults(func=modify)
+ parser_modify.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
+ parser_modify.add_argument('--keep-temp', help='Keep temporary directory (for debugging)', action="store_true")
+ parser_modify.set_defaults(func=modify, fixed_setup=context.fixed_setup)
parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe',
description='Extracts the source for an existing recipe',
@@ -1590,8 +2234,9 @@ def register_commands(subparsers, context):
parser_extract.add_argument('recipename', help='Name of recipe to extract the source for')
parser_extract.add_argument('srctree', help='Path to where to extract the source tree')
parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (default "%(default)s")')
+ parser_extract.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
- parser_extract.set_defaults(func=extract, no_workspace=True)
+ parser_extract.set_defaults(func=extract, fixed_setup=context.fixed_setup)
parser_sync = subparsers.add_parser('sync', help='Synchronize the source tree for an existing recipe',
description='Synchronize the previously extracted source tree for an existing recipe',
@@ -1601,7 +2246,16 @@ def register_commands(subparsers, context):
parser_sync.add_argument('srctree', help='Path to the source tree')
parser_sync.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout')
parser_sync.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
- parser_sync.set_defaults(func=sync)
+ parser_sync.set_defaults(func=sync, fixed_setup=context.fixed_setup)
+
+ parser_rename = subparsers.add_parser('rename', help='Rename a recipe file in the workspace',
+ description='Renames the recipe file for a recipe in the workspace, changing the name or version part or both, ensuring that all references within the workspace are updated at the same time. Only works when the recipe file itself is in the workspace, e.g. after devtool add. Particularly useful when devtool add did not automatically determine the correct name.',
+ group='working', order=10)
+ parser_rename.add_argument('recipename', help='Current name of recipe to rename')
+ parser_rename.add_argument('newname', nargs='?', help='New name for recipe (optional, not needed if you only want to change the version)')
+ parser_rename.add_argument('--version', '-V', help='Change the version (NOTE: this does not change the version fetched by the recipe, just the version in the recipe file name)')
+ parser_rename.add_argument('--no-srctree', '-s', action='store_true', help='Do not rename the source tree directory (if the default source tree path has been used) - keeping the old name may be desirable if there are internal/other external references to this path')
+ parser_rename.set_defaults(func=rename)
parser_update_recipe = subparsers.add_parser('update-recipe', help='Apply changes from external source tree to recipe',
description='Applies changes from external source tree to a recipe (updating/adding/removing patches as necessary, or by updating SRCREV). Note that these changes need to have been committed to the git repository in order to be recognised.',
@@ -1612,6 +2266,9 @@ def register_commands(subparsers, context):
parser_update_recipe.add_argument('--append', '-a', help='Write changes to a bbappend in the specified layer instead of the recipe', metavar='LAYERDIR')
parser_update_recipe.add_argument('--wildcard-version', '-w', help='In conjunction with -a/--append, use a wildcard to make the bbappend apply to any recipe version', action='store_true')
parser_update_recipe.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update')
+ parser_update_recipe.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)')
+ parser_update_recipe.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)')
+ parser_update_recipe.add_argument('--force-patch-refresh', action="store_true", help='Update patches in the layer even if they have not been modified (useful for refreshing patch context)')
parser_update_recipe.set_defaults(func=update_recipe)
parser_status = subparsers.add_parser('status', help='Show workspace status',
@@ -1625,13 +2282,20 @@ def register_commands(subparsers, context):
parser_reset.add_argument('recipename', nargs='*', help='Recipe to reset')
parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)')
parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
+ parser_reset.add_argument('--remove-work', '-r', action="store_true", help='Clean the sources directory along with append')
parser_reset.set_defaults(func=reset)
parser_finish = subparsers.add_parser('finish', help='Finish working on a recipe in your workspace',
- description='Pushes any committed changes to the specified recipe to the specified layer and removes it from your workspace. Roughly equivalent to an update-recipe followed by reset, except the update-recipe step will do the "right thing" depending on the recipe and the destination layer specified.',
+ description='Pushes any committed changes to the specified recipe to the specified layer and removes it from your workspace. Roughly equivalent to an update-recipe followed by reset, except the update-recipe step will do the "right thing" depending on the recipe and the destination layer specified. Note that your changes must have been committed to the git repository in order to be recognised.',
group='working', order=-100)
parser_finish.add_argument('recipename', help='Recipe to finish')
parser_finish.add_argument('destination', help='Layer/path to put recipe into. Can be the name of a layer configured in your bblayers.conf, the path to the base of a layer, or a partial path inside a layer. %(prog)s will attempt to complete the path based on the layer\'s structure.')
parser_finish.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE')
parser_finish.add_argument('--initial-rev', help='Override starting revision for patches')
+ parser_finish.add_argument('--force', '-f', action="store_true", help='Force continuing even if there are uncommitted changes in the source tree repository')
+ parser_finish.add_argument('--remove-work', '-r', action="store_true", help='Clean the sources directory under workspace')
+ parser_finish.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
+ parser_finish.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)')
+ parser_finish.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)')
+ parser_finish.add_argument('--force-patch-refresh', action="store_true", help='Update patches in the layer even if they have not been modified (useful for refreshing patch context)')
parser_finish.set_defaults(func=finish)
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index a4239f1cd2..cb6dce378a 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -1,19 +1,8 @@
# Development tool - upgrade command plugin
#
-# Copyright (C) 2014-2015 Intel Corporation
+# Copyright (C) 2014-2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
"""Devtool upgrade plugin"""
@@ -27,9 +16,13 @@ import argparse
import scriptutils
import errno
import bb
+
+devtool_path = os.path.dirname(os.path.realpath(__file__)) + '/../../../meta/lib'
+sys.path = sys.path + [devtool_path]
+
import oe.recipeutils
from devtool import standard
-from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build
+from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build, update_unlockedsigs, check_prerelease_version
logger = logging.getLogger('devtool')
@@ -39,7 +32,7 @@ def _run(cmd, cwd=''):
def _get_srctree(tmpdir):
srctree = tmpdir
- dirs = os.listdir(tmpdir)
+ dirs = scriptutils.filter_src_subdirs(tmpdir)
if len(dirs) == 1:
srctree = os.path.join(tmpdir, dirs[0])
return srctree
@@ -51,24 +44,13 @@ def _copy_source_code(orig, dest):
dest_path = os.path.join(dest, path)
shutil.move(os.path.join(orig, path), dest_path)
-def _get_checksums(rf):
- import re
- checksums = {}
- with open(rf) as f:
- for line in f:
- for cs in ['md5sum', 'sha256sum']:
- m = re.match("^SRC_URI\[%s\].*=.*\"(.*)\"" % cs, line)
- if m:
- checksums[cs] = m.group(1)
- return checksums
-
def _remove_patch_dirs(recipefolder):
for root, dirs, files in os.walk(recipefolder):
for d in dirs:
shutil.rmtree(os.path.join(root,d))
def _recipe_contains(rd, var):
- rf = rd.getVar('FILE', True)
+ rf = rd.getVar('FILE')
varfiles = oe.recipeutils.get_var_files(rf, [var], rd)
for var, fn in varfiles.items():
if fn and fn.startswith(os.path.dirname(rf) + os.sep):
@@ -117,7 +99,7 @@ def _write_append(rc, srctree, same_dir, no_same_dir, rev, copied, workspace, d)
brf = os.path.basename(os.path.splitext(rc)[0]) # rc basename
srctree = os.path.abspath(srctree)
- pn = d.getVar('PN',True)
+ pn = d.getVar('PN')
af = os.path.join(appendpath, '%s.bbappend' % brf)
with open(af, 'w') as f:
f.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n\n')
@@ -132,7 +114,7 @@ def _write_append(rc, srctree, same_dir, no_same_dir, rev, copied, workspace, d)
if rev:
f.write('# initial_rev: %s\n' % rev)
if copied:
- f.write('# original_path: %s\n' % os.path.dirname(d.getVar('FILE', True)))
+ f.write('# original_path: %s\n' % os.path.dirname(d.getVar('FILE')))
f.write('# original_files: %s\n' % ' '.join(copied))
return af
@@ -140,21 +122,25 @@ def _cleanup_on_error(rf, srctree):
rfp = os.path.split(rf)[0] # recipe folder
rfpp = os.path.split(rfp)[0] # recipes folder
if os.path.exists(rfp):
- shutil.rmtree(b)
+ shutil.rmtree(rfp)
if not len(os.listdir(rfpp)):
os.rmdir(rfpp)
srctree = os.path.abspath(srctree)
if os.path.exists(srctree):
shutil.rmtree(srctree)
-def _upgrade_error(e, rf, srctree):
- if rf:
- cleanup_on_error(rf, srctree)
+def _upgrade_error(e, rf, srctree, keep_failure=False, extramsg=None):
+ if rf and not keep_failure:
+ _cleanup_on_error(rf, srctree)
logger.error(e)
- raise DevtoolError(e)
+ if extramsg:
+ logger.error(extramsg)
+ if keep_failure:
+ logger.info('Preserving failed upgrade files (--keep-failure)')
+ sys.exit(1)
def _get_uri(rd):
- srcuris = rd.getVar('SRC_URI', True).split()
+ srcuris = rd.getVar('SRC_URI').split()
if not len(srcuris):
raise DevtoolError('SRC_URI not found on recipe')
# Get first non-local entry in SRC_URI - usually by convention it's
@@ -176,7 +162,7 @@ def _get_uri(rd):
srcuri = rev_re.sub('', srcuri)
return srcuri, srcrev
-def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tinfoil, rd):
+def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, keep_temp, tinfoil, rd):
"""Extract sources of a recipe with a new version"""
def __run(cmd):
@@ -185,7 +171,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
crd = rd.createCopy()
- pv = crd.getVar('PV', True)
+ pv = crd.getVar('PV')
crd.setVar('PV', newpv)
tmpsrctree = None
@@ -198,17 +184,43 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
__run('git tag -f devtool-base-new')
md5 = None
sha256 = None
+ _, _, _, _, _, params = bb.fetch2.decodeurl(uri)
+ srcsubdir_rel = params.get('destsuffix', 'git')
+ if not srcbranch:
+ check_branch, check_branch_err = __run('git branch -r --contains %s' % srcrev)
+ get_branch = [x.strip() for x in check_branch.splitlines()]
+ # Remove HEAD reference point and drop remote prefix
+ get_branch = [x.split('/', 1)[1] for x in get_branch if not x.startswith('origin/HEAD')]
+ if 'master' in get_branch:
+ # If it is master, we do not need to append 'branch=master' as this is default.
+ # Even with the case where get_branch has multiple objects, if 'master' is one
+ # of them, we should default take from 'master'
+ srcbranch = ''
+ elif len(get_branch) == 1:
+ # If 'master' isn't in get_branch and get_branch contains only ONE object, then store result into 'srcbranch'
+ srcbranch = get_branch[0]
+ else:
+ # If get_branch contains more than one objects, then display error and exit.
+ mbrch = '\n ' + '\n '.join(get_branch)
+ raise DevtoolError('Revision %s was found on multiple branches: %s\nPlease provide the correct branch in the devtool command with "--srcbranch" or "-B" option.' % (srcrev, mbrch))
else:
__run('git checkout devtool-base -b devtool-%s' % newpv)
tmpdir = tempfile.mkdtemp(prefix='devtool')
try:
- md5, sha256 = scriptutils.fetch_uri(tinfoil.config_data, uri, tmpdir, rev)
- except bb.fetch2.FetchError as e:
+ checksums, ftmpdir = scriptutils.fetch_url(tinfoil, uri, rev, tmpdir, logger, preserve_tmp=keep_temp)
+ except scriptutils.FetchUrlFailure as e:
raise DevtoolError(e)
+ if ftmpdir and keep_temp:
+ logger.info('Fetch temp directory is %s' % ftmpdir)
+
+ md5 = checksums['md5sum']
+ sha256 = checksums['sha256sum']
+
tmpsrctree = _get_srctree(tmpdir)
srctree = os.path.abspath(srctree)
+ srcsubdir_rel = os.path.relpath(tmpsrctree, tmpdir)
# Delete all sources so we ensure no stray files are left over
for item in os.listdir(srctree):
@@ -224,8 +236,15 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
_copy_source_code(tmpsrctree, srctree)
(stdout,_) = __run('git ls-files --modified --others --exclude-standard')
- for f in stdout.splitlines():
- __run('git add "%s"' % f)
+ filelist = stdout.splitlines()
+ pbar = bb.ui.knotty.BBProgress('Adding changed files', len(filelist))
+ pbar.start()
+ batchsize = 100
+ for i in range(0, len(filelist), batchsize):
+ batch = filelist[i:i+batchsize]
+ __run('git add -A %s' % ' '.join(['"%s"' % item for item in batch]))
+ pbar.update(i)
+ pbar.finish()
useroptions = []
oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd)
@@ -237,10 +256,8 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
if no_patch:
patches = oe.recipeutils.get_recipe_patches(crd)
- if len(patches):
- logger.warn('By user choice, the following patches will NOT be applied')
- for patch in patches:
- logger.warn("%s" % os.path.basename(patch))
+ if patches:
+ logger.warning('By user choice, the following patches will NOT be applied to the new source tree:\n %s' % '\n '.join([os.path.basename(patch) for patch in patches]))
else:
__run('git checkout devtool-patched -b %s' % branch)
skiptag = False
@@ -249,9 +266,9 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
except bb.process.ExecutionError as e:
skiptag = True
if 'conflict' in e.stdout:
- logger.warn('Command \'%s\' failed:\n%s\n\nYou will need to resolve conflicts in order to complete the upgrade.' % (e.command, e.stdout.rstrip()))
+ logger.warning('Command \'%s\' failed:\n%s\n\nYou will need to resolve conflicts in order to complete the upgrade.' % (e.command, e.stdout.rstrip()))
else:
- logger.warn('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
+ logger.warning('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
if not skiptag:
if uri.startswith('git://'):
suffix = 'new'
@@ -264,21 +281,45 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
logger.info('Preserving temporary directory %s' % tmpsrctree)
else:
shutil.rmtree(tmpsrctree)
+ if tmpdir != tmpsrctree:
+ shutil.rmtree(tmpdir)
- return (rev, md5, sha256)
+ return (rev, md5, sha256, srcbranch, srcsubdir_rel)
-def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, workspace, tinfoil, rd):
+def _add_license_diff_to_recipe(path, diff):
+ notice_text = """# FIXME: the LIC_FILES_CHKSUM values have been updated by 'devtool upgrade'.
+# The following is the difference between the old and the new license text.
+# Please update the LICENSE value if needed, and summarize the changes in
+# the commit message via 'License-Update:' tag.
+# (example: 'License-Update: copyright years updated.')
+#
+# The changes:
+#
+"""
+ commented_diff = "\n".join(["# {}".format(l) for l in diff.split('\n')])
+ with open(path, 'rb') as f:
+ orig_content = f.read()
+ with open(path, 'wb') as f:
+ f.write(notice_text.encode())
+ f.write(commented_diff.encode())
+ f.write("\n#\n\n".encode())
+ f.write(orig_content)
+
+def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, srcsubdir_new, workspace, tinfoil, rd, license_diff, new_licenses, srctree, keep_failure):
"""Creates the new recipe under workspace"""
- bpn = rd.getVar('BPN', True)
+ bpn = rd.getVar('BPN')
path = os.path.join(workspace, 'recipes', bpn)
bb.utils.mkdirhier(path)
- copied, _ = oe.recipeutils.copy_recipe_files(rd, path)
+ copied, _ = oe.recipeutils.copy_recipe_files(rd, path, all_variants=True)
+ if not copied:
+ raise DevtoolError('Internal error - no files were copied for recipe %s' % bpn)
+ logger.debug('Copied %s to %s' % (copied, path))
- oldpv = rd.getVar('PV', True)
+ oldpv = rd.getVar('PV')
if not newpv:
newpv = oldpv
- origpath = rd.getVar('FILE', True)
+ origpath = rd.getVar('FILE')
fullpath = _rename_recipe_files(origpath, bpn, oldpv, newpv, path)
logger.debug('Upgraded %s => %s' % (origpath, fullpath))
@@ -316,32 +357,160 @@ def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, workspace, tinfoil
newvalues['PR'] = None
+ # Work out which SRC_URI entries have changed in case the entry uses a name
+ crd = rd.createCopy()
+ crd.setVar('PV', newpv)
+ for var, value in newvalues.items():
+ crd.setVar(var, value)
+ old_src_uri = (rd.getVar('SRC_URI') or '').split()
+ new_src_uri = (crd.getVar('SRC_URI') or '').split()
+ newnames = []
+ addnames = []
+ for newentry in new_src_uri:
+ _, _, _, _, _, params = bb.fetch2.decodeurl(newentry)
+ if 'name' in params:
+ newnames.append(params['name'])
+ if newentry not in old_src_uri:
+ addnames.append(params['name'])
+ # Find what's been set in the original recipe
+ oldnames = []
+ noname = False
+ for varflag in rd.getVarFlags('SRC_URI'):
+ if varflag.endswith(('.md5sum', '.sha256sum')):
+ name = varflag.rsplit('.', 1)[0]
+ if name not in oldnames:
+ oldnames.append(name)
+ elif varflag in ['md5sum', 'sha256sum']:
+ noname = True
+ # Even if SRC_URI has named entries it doesn't have to actually use the name
+ if noname and addnames and addnames[0] not in oldnames:
+ addnames = []
+ # Drop any old names (the name actually might include ${PV})
+ for name in oldnames:
+ if name not in newnames:
+ newvalues['SRC_URI[%s.md5sum]' % name] = None
+ newvalues['SRC_URI[%s.sha256sum]' % name] = None
+
if md5 and sha256:
- newvalues['SRC_URI[md5sum]'] = md5
- newvalues['SRC_URI[sha256sum]'] = sha256
+ if addnames:
+ nameprefix = '%s.' % addnames[0]
+ else:
+ nameprefix = ''
+ newvalues['SRC_URI[%smd5sum]' % nameprefix] = md5
+ newvalues['SRC_URI[%ssha256sum]' % nameprefix] = sha256
+
+ if srcsubdir_new != srcsubdir_old:
+ s_subdir_old = os.path.relpath(os.path.abspath(rd.getVar('S')), rd.getVar('WORKDIR'))
+ s_subdir_new = os.path.relpath(os.path.abspath(crd.getVar('S')), crd.getVar('WORKDIR'))
+ if srcsubdir_old == s_subdir_old and srcsubdir_new != s_subdir_new:
+ # Subdir for old extracted source matches what S points to (it should!)
+ # but subdir for new extracted source doesn't match what S will be
+ newvalues['S'] = '${WORKDIR}/%s' % srcsubdir_new.replace(newpv, '${PV}')
+ if crd.expand(newvalues['S']) == crd.expand('${WORKDIR}/${BP}'):
+ # It's the default, drop it
+ # FIXME what if S is being set in a .inc?
+ newvalues['S'] = None
+ logger.info('Source subdirectory has changed, dropping S value since it now matches the default ("${WORKDIR}/${BP}")')
+ else:
+ logger.info('Source subdirectory has changed, updating S value')
- rd = oe.recipeutils.parse_recipe(tinfoil.cooker, fullpath, None)
+ if license_diff:
+ newlicchksum = " ".join(["file://{}".format(l['path']) +
+ (";beginline={}".format(l['beginline']) if l['beginline'] else "") +
+ (";endline={}".format(l['endline']) if l['endline'] else "") +
+ (";md5={}".format(l['actual_md5'])) for l in new_licenses])
+ newvalues["LIC_FILES_CHKSUM"] = newlicchksum
+ _add_license_diff_to_recipe(fullpath, license_diff)
+
+ try:
+ rd = tinfoil.parse_recipe_file(fullpath, False)
+ except bb.tinfoil.TinfoilCommandFailed as e:
+ _upgrade_error(e, fullpath, srctree, keep_failure, 'Parsing of upgraded recipe failed')
oe.recipeutils.patch_recipe(rd, fullpath, newvalues)
return fullpath, copied
+
+def _check_git_config():
+ def getconfig(name):
+ try:
+ value = bb.process.run('git config --global %s' % name)[0].strip()
+ except bb.process.ExecutionError as e:
+ if e.exitcode == 1:
+ value = None
+ else:
+ raise
+ return value
+
+ username = getconfig('user.name')
+ useremail = getconfig('user.email')
+ configerr = []
+ if not username:
+ configerr.append('Please set your name using:\n git config --global user.name')
+ if not useremail:
+ configerr.append('Please set your email using:\n git config --global user.email')
+ if configerr:
+ raise DevtoolError('Your git configuration is incomplete which will prevent rebases from working:\n' + '\n'.join(configerr))
+
+def _extract_licenses(srcpath, recipe_licenses):
+ licenses = []
+ for url in recipe_licenses.split():
+ license = {}
+ (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
+ license['path'] = path
+ license['md5'] = parm.get('md5', '')
+ license['beginline'], license['endline'] = 0, 0
+ if 'beginline' in parm:
+ license['beginline'] = int(parm['beginline'])
+ if 'endline' in parm:
+ license['endline'] = int(parm['endline'])
+ license['text'] = []
+ with open(os.path.join(srcpath, path), 'rb') as f:
+ import hashlib
+ actual_md5 = hashlib.md5()
+ lineno = 0
+ for line in f:
+ lineno += 1
+ if (lineno >= license['beginline']) and ((lineno <= license['endline']) or not license['endline']):
+ license['text'].append(line.decode(errors='ignore'))
+ actual_md5.update(line)
+ license['actual_md5'] = actual_md5.hexdigest()
+ licenses.append(license)
+ return licenses
+
+def _generate_license_diff(old_licenses, new_licenses):
+ need_diff = False
+ for l in new_licenses:
+ if l['md5'] != l['actual_md5']:
+ need_diff = True
+ break
+ if need_diff == False:
+ return None
+
+ import difflib
+ diff = ''
+ for old, new in zip(old_licenses, new_licenses):
+ for line in difflib.unified_diff(old['text'], new['text'], old['path'], new['path']):
+ diff = diff + line
+ return diff
+
def upgrade(args, config, basepath, workspace):
"""Entry point for the devtool 'upgrade' subcommand"""
if args.recipename in workspace:
raise DevtoolError("recipe %s is already in your workspace" % args.recipename)
- if not args.version and not args.srcrev:
- raise DevtoolError("You must provide a version using the --version/-V option, or for recipes that fetch from an SCM such as git, the --srcrev/-S option")
if args.srcbranch and not args.srcrev:
raise DevtoolError("If you specify --srcbranch/-B then you must use --srcrev/-S to specify the revision" % args.recipename)
+ _check_git_config()
+
tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
try:
rd = parse_recipe(config, tinfoil, args.recipename, True)
if not rd:
return 1
- pn = rd.getVar('PN', True)
+ pn = rd.getVar('PN')
if pn != args.recipename:
logger.info('Mapping %s to %s' % (args.recipename, pn))
if pn in workspace:
@@ -352,37 +521,97 @@ def upgrade(args, config, basepath, workspace):
else:
srctree = standard.get_default_srctree(config, pn)
+ # try to automatically discover latest version and revision if not provided on command line
+ if not args.version and not args.srcrev:
+ version_info = oe.recipeutils.get_recipe_upstream_version(rd)
+ if version_info['version'] and not version_info['version'].endswith("new-commits-available"):
+ args.version = version_info['version']
+ if version_info['revision']:
+ args.srcrev = version_info['revision']
+ if not args.version and not args.srcrev:
+ raise DevtoolError("Automatic discovery of latest version/revision failed - you must provide a version using the --version/-V option, or for recipes that fetch from an SCM such as git, the --srcrev/-S option.")
+
standard._check_compatible_recipe(pn, rd)
- old_srcrev = rd.getVar('SRCREV', True)
+ old_srcrev = rd.getVar('SRCREV')
if old_srcrev == 'INVALID':
old_srcrev = None
if old_srcrev and not args.srcrev:
raise DevtoolError("Recipe specifies a SRCREV value; you must specify a new one when upgrading")
- if rd.getVar('PV', True) == args.version and old_srcrev == args.srcrev:
+ old_ver = rd.getVar('PV')
+ if old_ver == args.version and old_srcrev == args.srcrev:
raise DevtoolError("Current and upgrade versions are the same version")
+ if args.version:
+ if bb.utils.vercmp_string(args.version, old_ver) < 0:
+ logger.warning('Upgrade version %s compares as less than the current version %s. If you are using a package feed for on-target upgrades or providing this recipe for general consumption, then you should increment PE in the recipe (or if there is no current PE value set, set it to "1")' % (args.version, old_ver))
+ check_prerelease_version(args.version, 'devtool upgrade')
rf = None
+ license_diff = None
try:
- rev1 = standard._extract_source(srctree, False, 'devtool-orig', False, rd)
- rev2, md5, sha256 = _extract_new_source(args.version, srctree, args.no_patch,
- args.srcrev, args.branch, args.keep_temp,
+ logger.info('Extracting current version source...')
+ rev1, srcsubdir1 = standard._extract_source(srctree, False, 'devtool-orig', False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
+ old_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM'))
+ logger.info('Extracting upgraded version source...')
+ rev2, md5, sha256, srcbranch, srcsubdir2 = _extract_new_source(args.version, srctree, args.no_patch,
+ args.srcrev, args.srcbranch, args.branch, args.keep_temp,
tinfoil, rd)
- rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, args.srcbranch, config.workspace_path, tinfoil, rd)
+ new_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM'))
+ license_diff = _generate_license_diff(old_licenses, new_licenses)
+ rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, srcbranch, srcsubdir1, srcsubdir2, config.workspace_path, tinfoil, rd, license_diff, new_licenses, srctree, args.keep_failure)
except bb.process.CmdError as e:
- _upgrade_error(e, rf, srctree)
+ _upgrade_error(e, rf, srctree, args.keep_failure)
except DevtoolError as e:
- _upgrade_error(e, rf, srctree)
+ _upgrade_error(e, rf, srctree, args.keep_failure)
standard._add_md5(config, pn, os.path.dirname(rf))
af = _write_append(rf, srctree, args.same_dir, args.no_same_dir, rev2,
copied, config.workspace_path, rd)
standard._add_md5(config, pn, af)
+
+ update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn])
+
logger.info('Upgraded source extracted to %s' % srctree)
logger.info('New recipe is %s' % rf)
+ if license_diff:
+ logger.info('License checksums have been updated in the new recipe; please refer to it for the difference between the old and the new license texts.')
finally:
tinfoil.shutdown()
return 0
+def latest_version(args, config, basepath, workspace):
+ """Entry point for the devtool 'latest_version' subcommand"""
+ tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
+ try:
+ rd = parse_recipe(config, tinfoil, args.recipename, True)
+ if not rd:
+ return 1
+ version_info = oe.recipeutils.get_recipe_upstream_version(rd)
+ # "new-commits-available" is an indication that upstream never issues version tags
+ if not version_info['version'].endswith("new-commits-available"):
+ logger.info("Current version: {}".format(version_info['current_version']))
+ logger.info("Latest version: {}".format(version_info['version']))
+ if version_info['revision']:
+ logger.info("Latest version's commit: {}".format(version_info['revision']))
+ else:
+ logger.info("Latest commit: {}".format(version_info['revision']))
+ finally:
+ tinfoil.shutdown()
+ return 0
+
+def check_upgrade_status(args, config, basepath, workspace):
+ if not args.recipe:
+ logger.info("Checking the upstream status for all recipes may take a few minutes")
+ results = oe.recipeutils.get_recipe_upgrade_status(args.recipe)
+ for result in results:
+ # pn, update_status, current, latest, maintainer, latest_commit, no_update_reason
+ if args.all or result[1] != 'MATCH':
+ logger.info("{:25} {:15} {:15} {} {} {}".format( result[0],
+ result[2],
+ result[1] if result[1] != 'UPDATE' else (result[3] if not result[3].endswith("new-commits-available") else "new commits"),
+ result[4],
+ result[5] if result[5] != 'N/A' else "",
+ "cannot be updated due to: %s" %(result[6]) if result[6] else ""))
+
def register_commands(subparsers, context):
"""Register devtool subcommands from this plugin"""
@@ -393,13 +622,28 @@ def register_commands(subparsers, context):
group='starting')
parser_upgrade.add_argument('recipename', help='Name of recipe to upgrade (just name - no version, path or extension)')
parser_upgrade.add_argument('srctree', nargs='?', help='Path to where to extract the source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
- parser_upgrade.add_argument('--version', '-V', help='Version to upgrade to (PV)')
- parser_upgrade.add_argument('--srcrev', '-S', help='Source revision to upgrade to (required if fetching from an SCM such as git)')
+ parser_upgrade.add_argument('--version', '-V', help='Version to upgrade to (PV). If omitted, latest upstream version will be determined and used, if possible.')
+ parser_upgrade.add_argument('--srcrev', '-S', help='Source revision to upgrade to (useful when fetching from an SCM such as git)')
parser_upgrade.add_argument('--srcbranch', '-B', help='Branch in source repository containing the revision to use (if fetching from an SCM such as git)')
parser_upgrade.add_argument('--branch', '-b', default="devtool", help='Name for new development branch to checkout (default "%(default)s")')
parser_upgrade.add_argument('--no-patch', action="store_true", help='Do not apply patches from the recipe to the new source code')
+ parser_upgrade.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
group = parser_upgrade.add_mutually_exclusive_group()
group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
parser_upgrade.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
- parser_upgrade.set_defaults(func=upgrade)
+ parser_upgrade.add_argument('--keep-failure', action="store_true", help='Keep failed upgrade recipe and associated files (for debugging)')
+ parser_upgrade.set_defaults(func=upgrade, fixed_setup=context.fixed_setup)
+
+ parser_latest_version = subparsers.add_parser('latest-version', help='Report the latest version of an existing recipe',
+ description='Queries the upstream server for what the latest upstream release is (for git, tags are checked, for tarballs, a list of them is obtained, and one with the highest version number is reported)',
+ group='info')
+ parser_latest_version.add_argument('recipename', help='Name of recipe to query (just name - no version, path or extension)')
+ parser_latest_version.set_defaults(func=latest_version)
+
+ parser_check_upgrade_status = subparsers.add_parser('check-upgrade-status', help="Report upgradability for multiple (or all) recipes",
+ description="Prints a table of recipes together with versions currently provided by recipes, and latest upstream versions, when there is a later version available",
+ group='info')
+ parser_check_upgrade_status.add_argument('recipe', help='Name of the recipe to report (omit to report upgrade info for all recipes)', nargs='*')
+ parser_check_upgrade_status.add_argument('--all', '-a', help='Show all recipes, not just recipes needing upgrade', action="store_true")
+ parser_check_upgrade_status.set_defaults(func=check_upgrade_status)
diff --git a/scripts/lib/devtool/utilcmds.py b/scripts/lib/devtool/utilcmds.py
index b761a80f8f..964817766b 100644
--- a/scripts/lib/devtool/utilcmds.py
+++ b/scripts/lib/devtool/utilcmds.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool utility plugins"""
@@ -30,26 +20,35 @@ from devtool import parse_recipe
logger = logging.getLogger('devtool')
-
-def edit_recipe(args, config, basepath, workspace):
- """Entry point for the devtool 'edit-recipe' subcommand"""
+def _find_recipe_path(args, config, basepath, workspace):
if args.any_recipe:
+ logger.warning('-a/--any-recipe option is now always active, and thus the option will be removed in a future release')
+ if args.recipename in workspace:
+ recipefile = workspace[args.recipename]['recipefile']
+ else:
+ recipefile = None
+ if not recipefile:
tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
try:
rd = parse_recipe(config, tinfoil, args.recipename, True)
if not rd:
- return 1
- recipefile = rd.getVar('FILE', True)
+ raise DevtoolError("Failed to find specified recipe")
+ recipefile = rd.getVar('FILE')
finally:
tinfoil.shutdown()
- else:
- check_workspace_recipe(workspace, args.recipename)
- recipefile = workspace[args.recipename]['recipefile']
- if not recipefile:
- raise DevtoolError("Recipe file for %s is not under the workspace" %
- args.recipename)
+ return recipefile
- return scriptutils.run_editor(recipefile)
+
+def find_recipe(args, config, basepath, workspace):
+ """Entry point for the devtool 'find-recipe' subcommand"""
+ recipefile = _find_recipe_path(args, config, basepath, workspace)
+ print(recipefile)
+ return 0
+
+
+def edit_recipe(args, config, basepath, workspace):
+ """Entry point for the devtool 'edit-recipe' subcommand"""
+ return scriptutils.run_editor(_find_recipe_path(args, config, basepath, workspace), logger)
def configure_help(args, config, basepath, workspace):
@@ -62,20 +61,20 @@ def configure_help(args, config, basepath, workspace):
rd = parse_recipe(config, tinfoil, args.recipename, appends=True, filter_workspace=False)
if not rd:
return 1
- b = rd.getVar('B', True)
- s = rd.getVar('S', True)
+ b = rd.getVar('B')
+ s = rd.getVar('S')
configurescript = os.path.join(s, 'configure')
confdisabled = 'noexec' in rd.getVarFlags('do_configure') or 'do_configure' not in (rd.getVar('__BBTASKS', False) or [])
- configureopts = oe.utils.squashspaces(rd.getVar('CONFIGUREOPTS', True) or '')
- extra_oeconf = oe.utils.squashspaces(rd.getVar('EXTRA_OECONF', True) or '')
- extra_oecmake = oe.utils.squashspaces(rd.getVar('EXTRA_OECMAKE', True) or '')
- do_configure = rd.getVar('do_configure', True) or ''
+ configureopts = oe.utils.squashspaces(rd.getVar('CONFIGUREOPTS') or '')
+ extra_oeconf = oe.utils.squashspaces(rd.getVar('EXTRA_OECONF') or '')
+ extra_oecmake = oe.utils.squashspaces(rd.getVar('EXTRA_OECMAKE') or '')
+ do_configure = rd.getVar('do_configure') or ''
do_configure_noexpand = rd.getVar('do_configure', False) or ''
packageconfig = rd.getVarFlags('PACKAGECONFIG') or []
autotools = bb.data.inherits_class('autotools', rd) and ('oe_runconf' in do_configure or 'autotools_do_configure' in do_configure)
cmake = bb.data.inherits_class('cmake', rd) and ('cmake_do_configure' in do_configure)
- cmake_do_configure = rd.getVar('cmake_do_configure', True)
- pn = rd.getVar('PN', True)
+ cmake_do_configure = rd.getVar('cmake_do_configure')
+ pn = rd.getVar('PN')
finally:
tinfoil.shutdown()
@@ -213,13 +212,23 @@ The ./configure %s output for %s follows.
def register_commands(subparsers, context):
"""Register devtool subcommands from this plugin"""
- parser_edit_recipe = subparsers.add_parser('edit-recipe', help='Edit a recipe file in your workspace',
- description='Runs the default editor (as specified by the EDITOR variable) on the specified recipe. Note that the recipe file itself must be in the workspace (i.e. as a result of "devtool add" or "devtool upgrade"); you can override this with the -a/--any-recipe option.',
+ parser_edit_recipe = subparsers.add_parser('edit-recipe', help='Edit a recipe file',
+ description='Runs the default editor (as specified by the EDITOR variable) on the specified recipe. Note that this will be quicker for recipes in the workspace as the cache does not need to be loaded in that case.',
group='working')
parser_edit_recipe.add_argument('recipename', help='Recipe to edit')
- parser_edit_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Edit any recipe, not just where the recipe file itself is in the workspace')
+ # FIXME drop -a at some point in future
+ parser_edit_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Does nothing (exists for backwards-compatibility)')
parser_edit_recipe.set_defaults(func=edit_recipe)
+ # Find-recipe
+ parser_find_recipe = subparsers.add_parser('find-recipe', help='Find a recipe file',
+ description='Finds a recipe file. Note that this will be quicker for recipes in the workspace as the cache does not need to be loaded in that case.',
+ group='working')
+ parser_find_recipe.add_argument('recipename', help='Recipe to find')
+ # FIXME drop -a at some point in future
+ parser_find_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Does nothing (exists for backwards-compatibility)')
+ parser_find_recipe.set_defaults(func=find_recipe)
+
# NOTE: Needed to override the usage string here since the default
# gets the order wrong - recipename must come before --arg
parser_configure_help = subparsers.add_parser('configure-help', help='Get help on configure script options',
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index 1e0fc1ee85..e9d52bb67b 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
import os
@@ -48,7 +38,7 @@ def find_target_file(targetpath, d, pkglist=None):
"""Find the recipe installing the specified target path, optionally limited to a select list of packages"""
import json
- pkgdata_dir = d.getVar('PKGDATA_DIR', True)
+ pkgdata_dir = d.getVar('PKGDATA_DIR')
# The mix between /etc and ${sysconfdir} here may look odd, but it is just
# being consistent with usage elsewhere
@@ -97,25 +87,12 @@ def find_target_file(targetpath, d, pkglist=None):
recipes[targetpath].append('!%s' % pn)
return recipes
-def _get_recipe_file(cooker, pn):
- import oe.recipeutils
- recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
- if not recipefile:
- skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn)
- if skipreasons:
- logger.error('\n'.join(skipreasons))
- else:
- logger.error("Unable to find any recipe file matching %s" % pn)
- return recipefile
-
def _parse_recipe(pn, tinfoil):
- import oe.recipeutils
- recipefile = _get_recipe_file(tinfoil.cooker, pn)
- if not recipefile:
- # Error already logged
+ try:
+ rd = tinfoil.parse_recipe(pn)
+ except bb.providers.NoProvider as e:
+ logger.error(str(e))
return None
- append_files = tinfoil.cooker.collection.get_file_appends(recipefile)
- rd = oe.recipeutils.parse_recipe(tinfoil.cooker, recipefile, append_files)
return rd
def determine_file_source(targetpath, rd):
@@ -123,8 +100,8 @@ def determine_file_source(targetpath, rd):
import oe.recipeutils
# See if it's in do_install for the recipe
- workdir = rd.getVar('WORKDIR', True)
- src_uri = rd.getVar('SRC_URI', True)
+ workdir = rd.getVar('WORKDIR')
+ src_uri = rd.getVar('SRC_URI')
srcfile = ''
modpatches = []
elements = check_do_install(rd, targetpath)
@@ -134,7 +111,7 @@ def determine_file_source(targetpath, rd):
logger.debug('source path: %s' % srcpath)
if not srcpath.startswith('/'):
# Handle non-absolute path
- srcpath = os.path.abspath(os.path.join(rd.getVarFlag('do_install', 'dirs', True).split()[-1], srcpath))
+ srcpath = os.path.abspath(os.path.join(rd.getVarFlag('do_install', 'dirs').split()[-1], srcpath))
if srcpath.startswith(workdir):
# OK, now we have the source file name, look for it in SRC_URI
workdirfile = os.path.relpath(srcpath, workdir)
@@ -203,22 +180,22 @@ def get_source_path(cmdelements):
def get_func_deps(func, d):
"""Find the function dependencies of a shell function"""
- deps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func, True))
- deps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
+ deps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func))
+ deps |= set((d.getVarFlag(func, "vardeps") or "").split())
funcdeps = []
for dep in deps:
- if d.getVarFlag(dep, 'func', True):
+ if d.getVarFlag(dep, 'func'):
funcdeps.append(dep)
return funcdeps
def check_do_install(rd, targetpath):
"""Look at do_install for a command that installs/copies the specified target path"""
- instpath = os.path.abspath(os.path.join(rd.getVar('D', True), targetpath.lstrip('/')))
- do_install = rd.getVar('do_install', True)
+ instpath = os.path.abspath(os.path.join(rd.getVar('D'), targetpath.lstrip('/')))
+ do_install = rd.getVar('do_install')
# Handle where do_install calls other functions (somewhat crudely, but good enough for this purpose)
deps = get_func_deps('do_install', rd)
for dep in deps:
- do_install = do_install.replace(dep, rd.getVar(dep, True))
+ do_install = do_install.replace(dep, rd.getVar(dep))
# Look backwards through do_install as we want to catch where a later line (perhaps
# from a bbappend) is writing over the top
@@ -251,7 +228,7 @@ def appendfile(args):
if stdout:
logger.debug('file command output: %s' % stdout.rstrip())
if ('executable' in stdout and not 'shell script' in stdout) or 'shared object' in stdout:
- logger.warn('This file looks like it is a binary or otherwise the output of compilation. If it is, you should consider building it properly instead of substituting a binary file directly.')
+ logger.warning('This file looks like it is a binary or otherwise the output of compilation. If it is, you should consider building it properly instead of substituting a binary file directly.')
if args.recipe:
recipes = {args.targetpath: [args.recipe],}
@@ -288,7 +265,7 @@ def appendfile(args):
if selectpn:
logger.debug('Selecting recipe %s for file %s' % (selectpn, args.targetpath))
if postinst_pns:
- logger.warn('%s be modified by postinstall scripts for the following recipes:\n %s\nThis may or may not be an issue depending on what modifications these postinstall scripts make.' % (args.targetpath, '\n '.join(postinst_pns)))
+ logger.warning('%s be modified by postinstall scripts for the following recipes:\n %s\nThis may or may not be an issue depending on what modifications these postinstall scripts make.' % (args.targetpath, '\n '.join(postinst_pns)))
rd = _parse_recipe(selectpn, tinfoil)
if not rd:
# Error message already shown
@@ -299,12 +276,12 @@ def appendfile(args):
sourcetype, sourcepath = sourcefile.split('://', 1)
logger.debug('Original source file is %s (%s)' % (sourcepath, sourcetype))
if sourcetype == 'patch':
- logger.warn('File %s is added by the patch %s - you may need to remove or replace this patch in order to replace the file.' % (args.targetpath, sourcepath))
+ logger.warning('File %s is added by the patch %s - you may need to remove or replace this patch in order to replace the file.' % (args.targetpath, sourcepath))
sourcepath = None
else:
logger.debug('Unable to determine source file, proceeding anyway')
if modpatches:
- logger.warn('File %s is modified by the following patches:\n %s' % (args.targetpath, '\n '.join(modpatches)))
+ logger.warning('File %s is modified by the following patches:\n %s' % (args.targetpath, '\n '.join(modpatches)))
if instelements and sourcepath:
install = None
@@ -335,12 +312,12 @@ def appendfile(args):
def appendsrc(args, files, rd, extralines=None):
import oe.recipeutils
- srcdir = rd.getVar('S', True)
- workdir = rd.getVar('WORKDIR', True)
+ srcdir = rd.getVar('S')
+ workdir = rd.getVar('WORKDIR')
import bb.fetch
simplified = {}
- src_uri = rd.getVar('SRC_URI', True).split()
+ src_uri = rd.getVar('SRC_URI').split()
for uri in src_uri:
if uri.endswith(';'):
uri = uri[:-1]
@@ -353,10 +330,10 @@ def appendsrc(args, files, rd, extralines=None):
for newfile, srcfile in files.items():
src_destdir = os.path.dirname(srcfile)
if not args.use_workdir:
- if rd.getVar('S', True) == rd.getVar('STAGING_KERNEL_DIR', True):
+ if rd.getVar('S') == rd.getVar('STAGING_KERNEL_DIR'):
srcdir = os.path.join(workdir, 'git')
if not bb.data.inherits_class('kernel-yocto', rd):
- logger.warn('S == STAGING_KERNEL_DIR and non-kernel-yocto, unable to determine path to srcdir, defaulting to ${WORKDIR}/git')
+ logger.warning('S == STAGING_KERNEL_DIR and non-kernel-yocto, unable to determine path to srcdir, defaulting to ${WORKDIR}/git')
src_destdir = os.path.join(os.path.relpath(srcdir, workdir), src_destdir)
src_destdir = os.path.normpath(src_destdir)
@@ -370,9 +347,9 @@ def appendsrc(args, files, rd, extralines=None):
if simple_str in simplified:
existing = simplified[simple_str]
if source_uri != existing:
- logger.warn('{0!r} is already in SRC_URI, with different parameters: {1!r}, not adding'.format(source_uri, existing))
+ logger.warning('{0!r} is already in SRC_URI, with different parameters: {1!r}, not adding'.format(source_uri, existing))
else:
- logger.warn('{0!r} is already in SRC_URI, not adding'.format(source_uri))
+ logger.warning('{0!r} is already in SRC_URI, not adding'.format(source_uri))
else:
extralines.append('SRC_URI += {0}'.format(source_uri))
copyfiles[newfile] = srcfile
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 9b31fe92d7..4c4bbadb4c 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -1,19 +1,9 @@
# Recipe creation tool - create command plugin
#
-# Copyright (C) 2014-2016 Intel Corporation
+# Copyright (C) 2014-2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
import os
@@ -26,12 +16,24 @@ import logging
import scriptutils
from urllib.parse import urlparse, urldefrag, urlsplit
import hashlib
-
+import bb.fetch2
logger = logging.getLogger('recipetool')
tinfoil = None
plugins = None
+def log_error_cond(message, debugonly):
+ if debugonly:
+ logger.debug(message)
+ else:
+ logger.error(message)
+
+def log_info_cond(message, debugonly):
+ if debugonly:
+ logger.debug(message)
+ else:
+ logger.info(message)
+
def plugin_init(pluginlist):
# Take a reference to the list so we can use it later
global plugins
@@ -47,6 +49,9 @@ class RecipeHandler(object):
recipecmakefilemap = {}
recipebinmap = {}
+ def __init__(self):
+ self._devtool = False
+
@staticmethod
def load_libmap(d):
'''Load library->recipe mapping'''
@@ -55,9 +60,11 @@ class RecipeHandler(object):
if RecipeHandler.recipelibmap:
return
# First build up library->package mapping
- shlib_providers = oe.package.read_shlib_providers(d)
- libdir = d.getVar('libdir', True)
- base_libdir = d.getVar('base_libdir', True)
+ d2 = bb.data.createCopy(d)
+ d2.setVar("WORKDIR_PKGDATA", "${PKGDATA_DIR}")
+ shlib_providers = oe.package.read_shlib_providers(d2)
+ libdir = d.getVar('libdir')
+ base_libdir = d.getVar('base_libdir')
libpaths = list(set([base_libdir, libdir]))
libname_re = re.compile('^lib(.+)\.so.*$')
pkglibmap = {}
@@ -73,7 +80,7 @@ class RecipeHandler(object):
logger.debug('unable to extract library name from %s' % lib)
# Now turn it into a library->recipe mapping
- pkgdata_dir = d.getVar('PKGDATA_DIR', True)
+ pkgdata_dir = d.getVar('PKGDATA_DIR')
for libname, pkg in pkglibmap.items():
try:
with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
@@ -83,7 +90,7 @@ class RecipeHandler(object):
break
except IOError as ioe:
if ioe.errno == 2:
- logger.warn('unable to find a pkgdata file for package %s' % pkg)
+ logger.warning('unable to find a pkgdata file for package %s' % pkg)
else:
raise
@@ -97,9 +104,9 @@ class RecipeHandler(object):
'''Build up development file->recipe mapping'''
if RecipeHandler.recipeheadermap:
return
- pkgdata_dir = d.getVar('PKGDATA_DIR', True)
- includedir = d.getVar('includedir', True)
- cmakedir = os.path.join(d.getVar('libdir', True), 'cmake')
+ pkgdata_dir = d.getVar('PKGDATA_DIR')
+ includedir = d.getVar('includedir')
+ cmakedir = os.path.join(d.getVar('libdir'), 'cmake')
for pkg in glob.glob(os.path.join(pkgdata_dir, 'runtime', '*-dev')):
with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
pn = None
@@ -128,9 +135,9 @@ class RecipeHandler(object):
'''Build up native binary->recipe mapping'''
if RecipeHandler.recipebinmap:
return
- sstate_manifests = d.getVar('SSTATE_MANIFESTS', True)
- staging_bindir_native = d.getVar('STAGING_BINDIR_NATIVE', True)
- build_arch = d.getVar('BUILD_ARCH', True)
+ sstate_manifests = d.getVar('SSTATE_MANIFESTS')
+ staging_bindir_native = d.getVar('STAGING_BINDIR_NATIVE')
+ build_arch = d.getVar('BUILD_ARCH')
fileprefix = 'manifest-%s-' % build_arch
for fn in glob.glob(os.path.join(sstate_manifests, '%s*-native.populate_sysroot' % fileprefix)):
with open(fn, 'r') as f:
@@ -141,10 +148,12 @@ class RecipeHandler(object):
RecipeHandler.recipebinmap[prog] = pn
@staticmethod
- def checkfiles(path, speclist, recursive=False):
+ def checkfiles(path, speclist, recursive=False, excludedirs=None):
results = []
if recursive:
- for root, _, files in os.walk(path):
+ for root, dirs, files in os.walk(path, topdown=True):
+ if excludedirs:
+ dirs[:] = [d for d in dirs if d not in excludedirs]
for fn in files:
for spec in speclist:
if fnmatch.fnmatch(fn, spec):
@@ -222,7 +231,8 @@ class RecipeHandler(object):
if deps:
values['DEPENDS'] = ' '.join(deps)
- def genfunction(self, outlines, funcname, content, python=False, forcespace=False):
+ @staticmethod
+ def genfunction(outlines, funcname, content, python=False, forcespace=False):
if python:
prefix = 'python '
else:
@@ -324,8 +334,13 @@ def determine_from_url(srcuri):
pv = res.group(2).strip().replace('_', '.')
if not pn and not pv:
- srcfile = os.path.basename(parseres.path.rstrip('/'))
- pn, pv = determine_from_filename(srcfile)
+ if parseres.scheme not in ['git', 'gitsm', 'svn', 'hg']:
+ srcfile = os.path.basename(parseres.path.rstrip('/'))
+ pn, pv = determine_from_filename(srcfile)
+ elif parseres.scheme in ['git', 'gitsm']:
+ pn = os.path.basename(parseres.path.rstrip('/')).lower().replace('_', '-')
+ if pn.endswith('.git'):
+ pn = pn[:-4]
logger.debug('Determined from source URL: name = "%s", version = "%s"' % (pn, pv))
return (pn, pv)
@@ -335,7 +350,6 @@ def supports_srcrev(uri):
# This is a bit sad, but if you don't have this set there can be some
# odd interactions with the urldata cache which lead to errors
localdata.setVar('SRCREV', '${AUTOREV}')
- bb.data.update_data(localdata)
try:
fetcher = bb.fetch2.Fetch([uri], localdata)
urldata = fetcher.ud
@@ -353,14 +367,33 @@ def reformat_git_uri(uri):
'''Convert any http[s]://....git URI into git://...;protocol=http[s]'''
checkuri = uri.split(';', 1)[0]
if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://github.com/[^/]+/[^/]+/?$', checkuri):
- res = re.match('(http|https|ssh)://([^;]+(\.git)?)(;.*)?$', uri)
- if res:
- # Need to switch the URI around so that the git fetcher is used
- return 'git://%s;protocol=%s%s' % (res.group(2), res.group(1), res.group(4) or '')
- elif '@' in checkuri:
- # Catch e.g. git@git.example.com:repo.git
- return 'git://%s;protocol=ssh' % checkuri.replace(':', '/', 1)
- return uri
+ # Appends scheme if the scheme is missing
+ if not '://' in uri:
+ uri = 'git://' + uri
+ scheme, host, path, user, pswd, parms = bb.fetch2.decodeurl(uri)
+ # Detection mechanism, this is required due to certain URL are formatter with ":" rather than "/"
+ # which causes decodeurl to fail getting the right host and path
+ if len(host.split(':')) > 1:
+ splitslash = host.split(':')
+ # Port number should not be split from host
+ if not re.match('^[0-9]+$', splitslash[1]):
+ host = splitslash[0]
+ path = '/' + splitslash[1] + path
+ #Algorithm:
+ # if user is defined, append protocol=ssh or if a protocol is defined, then honor the user-defined protocol
+ # if no user & password is defined, check for scheme type and append the protocol with the scheme type
+ # finally if protocols or if the url is well-formed, do nothing and rejoin everything back to normal
+ # Need to repackage the arguments for encodeurl, the format is: (scheme, host, path, user, password, OrderedDict([('key', 'value')]))
+ if user:
+ if not 'protocol' in parms:
+ parms.update({('protocol', 'ssh')})
+ elif (scheme == "http" or scheme == 'https' or scheme == 'ssh') and not ('protocol' in parms):
+ parms.update({('protocol', scheme)})
+ # Always append 'git://'
+ fUrl = bb.fetch2.encodeurl(('git', host, path, user, pswd, parms))
+ return fUrl
+ else:
+ return uri
def is_package(url):
'''Check if a URL points to a package'''
@@ -380,16 +413,23 @@ def create_recipe(args):
pkgarch = "${MACHINE_ARCH}"
extravalues = {}
- checksums = (None, None)
+ checksums = {}
tempsrc = ''
source = args.source
srcsubdir = ''
srcrev = '${AUTOREV}'
+ srcbranch = ''
+ scheme = ''
+ storeTagName = ''
+ pv_srcpv = False
if os.path.isfile(source):
source = 'file://%s' % os.path.abspath(source)
if scriptutils.is_src_url(source):
+ # Warn about github archive URLs
+ if re.match('https?://github.com/[^/]+/[^/]+/archive/.+(\.tar\..*|\.zip)$', source):
+ logger.warning('github archive files are not guaranteed to be stable and may be re-generated over time. If the latter occurs, the checksums will likely change and the recipe will fail at do_fetch. It is recommended that you point to an actual commit or tag in the repository instead (using the repository URL in conjunction with the -S/--srcrev option).')
# Fetch a URL
fetchuri = reformat_git_uri(urldefrag(source)[0])
if args.binary:
@@ -400,25 +440,63 @@ def create_recipe(args):
rev_re = re.compile(';rev=([^;]+)')
res = rev_re.search(srcuri)
if res:
+ if args.srcrev:
+ logger.error('rev= parameter and -S/--srcrev option cannot both be specified - use one or the other')
+ sys.exit(1)
+ if args.autorev:
+ logger.error('rev= parameter and -a/--autorev option cannot both be specified - use one or the other')
+ sys.exit(1)
srcrev = res.group(1)
srcuri = rev_re.sub('', srcuri)
- tempsrc = tempfile.mkdtemp(prefix='recipetool-')
- srctree = tempsrc
- if fetchuri.startswith('npm://'):
- # Check if npm is available
- npm = bb.utils.which(tinfoil.config_data.getVar('PATH', True), 'npm')
- if not npm:
- logger.error('npm:// URL requested but npm is not available - you need to either build nodejs-native or install npm using your package manager')
+ elif args.srcrev:
+ srcrev = args.srcrev
+
+ # Check whether users provides any branch info in fetchuri.
+ # If true, we will skip all branch checking process to honor all user's input.
+ scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(fetchuri)
+ srcbranch = params.get('branch')
+ if args.srcbranch:
+ if srcbranch:
+ logger.error('branch= parameter and -B/--srcbranch option cannot both be specified - use one or the other')
sys.exit(1)
- logger.info('Fetching %s...' % srcuri)
+ srcbranch = args.srcbranch
+ nobranch = params.get('nobranch')
+ if nobranch and srcbranch:
+ logger.error('nobranch= cannot be used if you specify a branch')
+ sys.exit(1)
+ tag = params.get('tag')
+ if not srcbranch and not nobranch and srcrev != '${AUTOREV}':
+ # Append nobranch=1 in the following conditions:
+ # 1. User did not set 'branch=' in srcuri, and
+ # 2. User did not set 'nobranch=1' in srcuri, and
+ # 3. Source revision is not '${AUTOREV}'
+ params['nobranch'] = '1'
+ if tag:
+ # Keep a copy of tag and append nobranch=1 then remove tag from URL.
+ # Bitbake fetcher unable to fetch when {AUTOREV} and tag is set at the same time.
+ storeTagName = params['tag']
+ params['nobranch'] = '1'
+ del params['tag']
+ if scheme == 'npm':
+ params['noverify'] = '1'
+ fetchuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params))
+
+ tmpparent = tinfoil.config_data.getVar('BASE_WORKDIR')
+ bb.utils.mkdirhier(tmpparent)
+ tempsrc = tempfile.mkdtemp(prefix='recipetool-', dir=tmpparent)
+ srctree = os.path.join(tempsrc, 'source')
+
try:
- checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev)
- except bb.fetch2.BBFetchException as e:
- logger.error(str(e).rstrip())
+ checksums, ftmpdir = scriptutils.fetch_url(tinfoil, fetchuri, srcrev, srctree, logger, preserve_tmp=args.keep_temp)
+ except scriptutils.FetchUrlFailure as e:
+ logger.error(str(e))
sys.exit(1)
- dirlist = os.listdir(srctree)
- if 'git.indirectionsymlink' in dirlist:
- dirlist.remove('git.indirectionsymlink')
+
+ if ftmpdir and args.keep_temp:
+ logger.info('Fetch temp directory is %s' % ftmpdir)
+
+ dirlist = scriptutils.filter_src_subdirs(srctree)
+ logger.debug('Directory listing (excluding filtered out):\n %s' % '\n '.join(dirlist))
if len(dirlist) == 1:
singleitem = os.path.join(srctree, dirlist[0])
if os.path.isdir(singleitem):
@@ -426,41 +504,85 @@ def create_recipe(args):
srcsubdir = dirlist[0]
srctree = os.path.join(srctree, srcsubdir)
else:
- with open(singleitem, 'r', errors='surrogateescape') as f:
- if '<html' in f.read(100).lower():
- logger.error('Fetching "%s" returned a single HTML page - check the URL is correct and functional' % fetchuri)
- sys.exit(1)
+ check_single_file(dirlist[0], fetchuri)
+ elif len(dirlist) == 0:
+ if '/' in fetchuri:
+ fn = os.path.join(tinfoil.config_data.getVar('DL_DIR'), fetchuri.split('/')[-1])
+ if os.path.isfile(fn):
+ check_single_file(fn, fetchuri)
+ # If we've got to here then there's no source so we might as well give up
+ logger.error('URL %s resulted in an empty source tree' % fetchuri)
+ sys.exit(1)
+
+ # We need this checking mechanism to improve the recipe created by recipetool and devtool
+ # is able to parse and build by bitbake.
+ # If there is no input for branch name, then check for branch name with SRCREV provided.
+ if not srcbranch and not nobranch and srcrev and (srcrev != '${AUTOREV}') and scheme in ['git', 'gitsm']:
+ try:
+ cmd = 'git branch -r --contains'
+ check_branch, check_branch_err = bb.process.run('%s %s' % (cmd, srcrev), cwd=srctree)
+ except bb.process.ExecutionError as err:
+ logger.error(str(err))
+ sys.exit(1)
+ get_branch = [x.strip() for x in check_branch.splitlines()]
+ # Remove HEAD reference point and drop remote prefix
+ get_branch = [x.split('/', 1)[1] for x in get_branch if not x.startswith('origin/HEAD')]
+ if 'master' in get_branch:
+ # If it is master, we do not need to append 'branch=master' as this is default.
+ # Even with the case where get_branch has multiple objects, if 'master' is one
+ # of them, we should default take from 'master'
+ srcbranch = ''
+ elif len(get_branch) == 1:
+ # If 'master' isn't in get_branch and get_branch contains only ONE object, then store result into 'srcbranch'
+ srcbranch = get_branch[0]
+ else:
+ # If get_branch contains more than one objects, then display error and exit.
+ mbrch = '\n ' + '\n '.join(get_branch)
+ logger.error('Revision %s was found on multiple branches: %s\nPlease provide the correct branch with -B/--srcbranch' % (srcrev, mbrch))
+ sys.exit(1)
+
+ # Since we might have a value in srcbranch, we need to
+ # recontruct the srcuri to include 'branch' in params.
+ scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(srcuri)
+ if srcbranch:
+ params['branch'] = srcbranch
+
+ if storeTagName and scheme in ['git', 'gitsm']:
+ # Check srcrev using tag and check validity of the tag
+ cmd = ('git rev-parse --verify %s' % (storeTagName))
+ try:
+ check_tag, check_tag_err = bb.process.run('%s' % cmd, cwd=srctree)
+ srcrev = check_tag.split()[0]
+ except bb.process.ExecutionError as err:
+ logger.error(str(err))
+ logger.error("Possibly wrong tag name is provided")
+ sys.exit(1)
+ # Drop tag from srcuri as it will have conflicts with SRCREV during recipe parse.
+ del params['tag']
+ srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params))
+
if os.path.exists(os.path.join(srctree, '.gitmodules')) and srcuri.startswith('git://'):
srcuri = 'gitsm://' + srcuri[6:]
logger.info('Fetching submodules...')
bb.process.run('git submodule update --init --recursive', cwd=srctree)
if is_package(fetchuri):
- tmpfdir = tempfile.mkdtemp(prefix='recipetool-')
- try:
- pkgfile = None
+ localdata = bb.data.createCopy(tinfoil.config_data)
+ pkgfile = bb.fetch2.localpath(fetchuri, localdata)
+ if pkgfile:
+ tmpfdir = tempfile.mkdtemp(prefix='recipetool-')
try:
- fileuri = fetchuri + ';unpack=0'
- scriptutils.fetch_uri(tinfoil.config_data, fileuri, tmpfdir, srcrev)
- for root, _, files in os.walk(tmpfdir):
- for f in files:
- pkgfile = os.path.join(root, f)
- break
- except bb.fetch2.BBFetchException as e:
- logger.warn('Second fetch to get metadata failed: %s' % str(e).rstrip())
-
- if pkgfile:
if pkgfile.endswith(('.deb', '.ipk')):
- stdout, _ = bb.process.run('ar x %s control.tar.gz' % pkgfile, cwd=tmpfdir)
- stdout, _ = bb.process.run('tar xf control.tar.gz ./control', cwd=tmpfdir)
+ stdout, _ = bb.process.run('ar x %s' % pkgfile, cwd=tmpfdir)
+ stdout, _ = bb.process.run('tar xf control.tar.gz', cwd=tmpfdir)
values = convert_debian(tmpfdir)
extravalues.update(values)
elif pkgfile.endswith(('.rpm', '.srpm')):
stdout, _ = bb.process.run('rpm -qp --xml %s > pkginfo.xml' % pkgfile, cwd=tmpfdir)
values = convert_rpm_xml(os.path.join(tmpfdir, 'pkginfo.xml'))
extravalues.update(values)
- finally:
- shutil.rmtree(tmpfdir)
+ finally:
+ shutil.rmtree(tmpfdir)
else:
# Assume we're pointing to an existing source tree
if args.extract_to:
@@ -488,9 +610,9 @@ def create_recipe(args):
if args.src_subdir:
srcsubdir = os.path.join(srcsubdir, args.src_subdir)
- srctree_use = os.path.join(srctree, args.src_subdir)
+ srctree_use = os.path.abspath(os.path.join(srctree, args.src_subdir))
else:
- srctree_use = srctree
+ srctree_use = os.path.abspath(srctree)
if args.outfile and os.path.isdir(args.outfile):
outfile = None
@@ -512,9 +634,10 @@ def create_recipe(args):
# We need a blank line here so that patch_recipe_lines can rewind before the LICENSE comments
lines_before.append('')
- handled = []
- licvalues = handle_license_vars(srctree_use, lines_before, handled, extravalues, tinfoil.config_data)
+ # We'll come back and replace this later in handle_license_vars()
+ lines_before.append('##LICENSE_PLACEHOLDER##')
+ handled = []
classes = []
# FIXME This is kind of a hack, we probably ought to be using bitbake to do this
@@ -550,31 +673,31 @@ def create_recipe(args):
else:
realpv = None
- if srcuri and not realpv or not pn:
- name_pn, name_pv = determine_from_url(srcuri)
- if name_pn and not pn:
- pn = name_pn
- if name_pv and not realpv:
- realpv = name_pv
-
-
if not srcuri:
lines_before.append('# No information for SRC_URI yet (only an external source tree was specified)')
lines_before.append('SRC_URI = "%s"' % srcuri)
- (md5value, sha256value) = checksums
- if md5value:
- lines_before.append('SRC_URI[md5sum] = "%s"' % md5value)
- if sha256value:
- lines_before.append('SRC_URI[sha256sum] = "%s"' % sha256value)
+ for key, value in sorted(checksums.items()):
+ lines_before.append('SRC_URI[%s] = "%s"' % (key, value))
if srcuri and supports_srcrev(srcuri):
lines_before.append('')
lines_before.append('# Modify these as desired')
- lines_before.append('PV = "%s+git${SRCPV}"' % (realpv or '1.0'))
+ # Note: we have code to replace realpv further down if it gets set to some other value
+ scheme, _, _, _, _, _ = bb.fetch2.decodeurl(srcuri)
+ if scheme in ['git', 'gitsm']:
+ srcpvprefix = 'git'
+ elif scheme == 'svn':
+ srcpvprefix = 'svnr'
+ else:
+ srcpvprefix = scheme
+ lines_before.append('PV = "%s+%s${SRCPV}"' % (realpv or '1.0', srcpvprefix))
+ pv_srcpv = True
if not args.autorev and srcrev == '${AUTOREV}':
if os.path.exists(os.path.join(srctree, '.git')):
(stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
- srcrev = stdout.rstrip()
+ srcrev = stdout.rstrip()
lines_before.append('SRCREV = "%s"' % srcrev)
+ if args.provides:
+ lines_before.append('PROVIDES = "%s"' % args.provides)
lines_before.append('')
if srcsubdir and not args.binary:
@@ -591,6 +714,11 @@ def create_recipe(args):
lines_after.append('INSANE_SKIP_${PN} += "already-stripped"')
lines_after.append('')
+ if args.fetch_dev:
+ extravalues['fetchdev'] = True
+ else:
+ extravalues['fetchdev'] = None
+
# Find all plugins that want to register handlers
logger.debug('Loading recipe handlers')
raw_handlers = []
@@ -607,6 +735,7 @@ def create_recipe(args):
handlers.sort(key=lambda item: (item[1], -item[2]), reverse=True)
for handler, priority, _ in handlers:
logger.debug('Handler: %s (priority %d)' % (handler.__class__.__name__, priority))
+ setattr(handler, '_devtool', args.devtool)
handlers = [item[0] for item in handlers]
# Apply the handlers
@@ -641,9 +770,18 @@ def create_recipe(args):
if '_' in pn:
pn = pn.replace('_', '-')
+ if srcuri and not realpv or not pn:
+ name_pn, name_pv = determine_from_url(srcuri)
+ if name_pn and not pn:
+ pn = name_pn
+ if name_pv and not realpv:
+ realpv = name_pv
+
+ licvalues = handle_license_vars(srctree_use, lines_before, handled, extravalues, tinfoil.config_data)
+
if not outfile:
if not pn:
- logger.error('Unable to determine short program name from source tree - please specify name with -N/--name or output file name with -o/--outfile')
+ log_error_cond('Unable to determine short program name from source tree - please specify name with -N/--name or output file name with -o/--outfile', args.devtool)
# devtool looks for this specific exit code, so don't change it
sys.exit(15)
else:
@@ -690,10 +828,11 @@ def create_recipe(args):
skipblank = True
continue
elif line.startswith('SRC_URI = '):
- if realpv:
+ if realpv and not pv_srcpv:
line = line.replace(realpv, '${PV}')
elif line.startswith('PV = '):
if realpv:
+ # Replace the first part of the PV value
line = re.sub('"[^+]*\+', '"%s+' % realpv, line)
lines_before.append(line)
@@ -713,6 +852,15 @@ def create_recipe(args):
if not bbclassextend:
lines_after.append('BBCLASSEXTEND = "native"')
+ postinst = ("postinst", extravalues.pop('postinst', None))
+ postrm = ("postrm", extravalues.pop('postrm', None))
+ preinst = ("preinst", extravalues.pop('preinst', None))
+ prerm = ("prerm", extravalues.pop('prerm', None))
+ funcs = [postinst, postrm, preinst, prerm]
+ for func in funcs:
+ if func[1]:
+ RecipeHandler.genfunction(lines_after, 'pkg_%s_${PN}' % func[0], func[1])
+
outlines = []
outlines.extend(lines_before)
if classes:
@@ -723,9 +871,6 @@ def create_recipe(args):
outlines.extend(lines_after)
if extravalues:
- if 'LICENSE' in extravalues and not licvalues:
- # Don't blow away 'CLOSED' value that comments say we set
- del extravalues['LICENSE']
_, outlines = oe.recipeutils.patch_recipe_lines(outlines, extravalues, trailing_newline=False)
if args.extract_to:
@@ -739,7 +884,7 @@ def create_recipe(args):
shutil.move(srctree, args.extract_to)
if tempsrc == srctree:
tempsrc = None
- logger.info('Source extracted to %s' % args.extract_to)
+ log_info_cond('Source extracted to %s' % args.extract_to, args.devtool)
if outfile == '-':
sys.stdout.write('\n'.join(outlines) + '\n')
@@ -752,7 +897,7 @@ def create_recipe(args):
continue
f.write('%s\n' % line)
lastline = line
- logger.info('Recipe %s has been created; further editing may be required to make it fully functional' % outfile)
+ log_info_cond('Recipe %s has been created; further editing may be required to make it fully functional' % outfile, args.devtool)
if tempsrc:
if args.keep_temp:
@@ -762,52 +907,101 @@ def create_recipe(args):
return 0
+def check_single_file(fn, fetchuri):
+ """Determine if a single downloaded file is something we can't handle"""
+ with open(fn, 'r', errors='surrogateescape') as f:
+ if '<html' in f.read(100).lower():
+ logger.error('Fetching "%s" returned a single HTML page - check the URL is correct and functional' % fetchuri)
+ sys.exit(1)
+
+def split_value(value):
+ if isinstance(value, str):
+ return value.split()
+ else:
+ return value
+
def handle_license_vars(srctree, lines_before, handled, extravalues, d):
+ lichandled = [x for x in handled if x[0] == 'license']
+ if lichandled:
+ # Someone else has already handled the license vars, just return their value
+ return lichandled[0][1]
+
licvalues = guess_license(srctree, d)
+ licenses = []
lic_files_chksum = []
lic_unknown = []
+ lines = []
if licvalues:
- licenses = []
for licvalue in licvalues:
if not licvalue[0] in licenses:
licenses.append(licvalue[0])
lic_files_chksum.append('file://%s;md5=%s' % (licvalue[1], licvalue[2]))
if licvalue[0] == 'Unknown':
lic_unknown.append(licvalue[1])
- lines_before.append('# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is')
- lines_before.append('# your responsibility to verify that the values are complete and correct.')
- if len(licvalues) > 1:
- lines_before.append('#')
- lines_before.append('# NOTE: multiple licenses have been detected; if that is correct you should separate')
- lines_before.append('# these in the LICENSE value using & if the multiple licenses all apply, or | if there')
- lines_before.append('# is a choice between the multiple licenses. If in doubt, check the accompanying')
- lines_before.append('# documentation to determine which situation is applicable.')
if lic_unknown:
- lines_before.append('#')
- lines_before.append('# The following license files were not able to be identified and are')
- lines_before.append('# represented as "Unknown" below, you will need to check them yourself:')
+ lines.append('#')
+ lines.append('# The following license files were not able to be identified and are')
+ lines.append('# represented as "Unknown" below, you will need to check them yourself:')
for licfile in lic_unknown:
- lines_before.append('# %s' % licfile)
- lines_before.append('#')
- else:
- lines_before.append('# Unable to find any files that looked like license statements. Check the accompanying')
- lines_before.append('# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.')
- lines_before.append('#')
- lines_before.append('# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if')
- lines_before.append('# this is not accurate with respect to the licensing of the software being built (it')
- lines_before.append('# will not be in most cases) you must specify the correct value before using this')
- lines_before.append('# recipe for anything other than initial testing/development!')
- licenses = ['CLOSED']
- pkg_license = extravalues.pop('LICENSE', None)
- if pkg_license:
+ lines.append('# %s' % licfile)
+
+ extra_license = split_value(extravalues.pop('LICENSE', []))
+ if '&' in extra_license:
+ extra_license.remove('&')
+ if extra_license:
if licenses == ['Unknown']:
- lines_before.append('# NOTE: The following LICENSE value was determined from the original package metadata')
- licenses = [pkg_license]
+ licenses = extra_license
else:
- lines_before.append('# NOTE: Original package metadata indicates license is: %s' % pkg_license)
- lines_before.append('LICENSE = "%s"' % ' '.join(licenses))
- lines_before.append('LIC_FILES_CHKSUM = "%s"' % ' \\\n '.join(lic_files_chksum))
- lines_before.append('')
+ for item in extra_license:
+ if item not in licenses:
+ licenses.append(item)
+ extra_lic_files_chksum = split_value(extravalues.pop('LIC_FILES_CHKSUM', []))
+ for item in extra_lic_files_chksum:
+ if item not in lic_files_chksum:
+ lic_files_chksum.append(item)
+
+ if lic_files_chksum:
+ # We are going to set the vars, so prepend the standard disclaimer
+ lines.insert(0, '# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is')
+ lines.insert(1, '# your responsibility to verify that the values are complete and correct.')
+ else:
+ # Without LIC_FILES_CHKSUM we set LICENSE = "CLOSED" to allow the
+ # user to get started easily
+ lines.append('# Unable to find any files that looked like license statements. Check the accompanying')
+ lines.append('# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.')
+ lines.append('#')
+ lines.append('# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if')
+ lines.append('# this is not accurate with respect to the licensing of the software being built (it')
+ lines.append('# will not be in most cases) you must specify the correct value before using this')
+ lines.append('# recipe for anything other than initial testing/development!')
+ licenses = ['CLOSED']
+
+ if extra_license and sorted(licenses) != sorted(extra_license):
+ lines.append('# NOTE: Original package / source metadata indicates license is: %s' % ' & '.join(extra_license))
+
+ if len(licenses) > 1:
+ lines.append('#')
+ lines.append('# NOTE: multiple licenses have been detected; they have been separated with &')
+ lines.append('# in the LICENSE value for now since it is a reasonable assumption that all')
+ lines.append('# of the licenses apply. If instead there is a choice between the multiple')
+ lines.append('# licenses then you should change the value to separate the licenses with |')
+ lines.append('# instead of &. If there is any doubt, check the accompanying documentation')
+ lines.append('# to determine which situation is applicable.')
+
+ lines.append('LICENSE = "%s"' % ' & '.join(licenses))
+ lines.append('LIC_FILES_CHKSUM = "%s"' % ' \\\n '.join(lic_files_chksum))
+ lines.append('')
+
+ # Replace the placeholder so we get the values in the right place in the recipe file
+ try:
+ pos = lines_before.index('##LICENSE_PLACEHOLDER##')
+ except ValueError:
+ pos = -1
+ if pos == -1:
+ lines_before.extend(lines)
+ else:
+ lines_before[pos:pos+1] = lines
+
handled.append(('license', licvalues))
return licvalues
@@ -816,7 +1010,7 @@ def get_license_md5sums(d, static_only=False):
md5sums = {}
if not static_only:
# Gather md5sums of license files in common license dir
- commonlicdir = d.getVar('COMMON_LICENSE_DIR', True)
+ commonlicdir = d.getVar('COMMON_LICENSE_DIR')
for fn in os.listdir(commonlicdir):
md5value = bb.utils.md5_file(os.path.join(commonlicdir, fn))
md5sums[md5value] = fn
@@ -859,6 +1053,7 @@ def get_license_md5sums(d, static_only=False):
md5sums['3b83ef96387f14655fc854ddc3c6bd57'] = 'Apache-2.0'
md5sums['385c55653886acac3821999a3ccd17b3'] = 'Artistic-1.0 | GPL-2.0' # some perl modules
md5sums['54c7042be62e169199200bc6477f04d1'] = 'BSD-3-Clause'
+ md5sums['bfe1f75d606912a4111c90743d6c7325'] = 'MPL-1.1'
return md5sums
def crunch_license(licfile):
@@ -904,6 +1099,10 @@ def crunch_license(licfile):
crunched_md5sums['1daebd9491d1e8426900b4fa5a422814'] = 'LGPLv2.1'
# https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3
crunched_md5sums['2ebfb3bb49b9a48a075cc1425e7f4129'] = 'LGPLv3'
+ # https://raw.githubusercontent.com/eclipse/mosquitto/v1.4.14/epl-v10
+ crunched_md5sums['efe2cb9a35826992b9df68224e3c2628'] = 'EPL-1.0'
+ # https://raw.githubusercontent.com/eclipse/mosquitto/v1.4.14/edl-v10
+ crunched_md5sums['0a9c78c0a398d1bbce4a166757d60387'] = 'EDL-1.0'
lictext = []
with open(licfile, 'r', errors='surrogateescape') as f:
for line in f:
@@ -936,7 +1135,7 @@ def guess_license(srctree, d):
md5sums = get_license_md5sums(d)
licenses = []
- licspecs = ['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*']
+ licspecs = ['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*', 'e[dp]l-v10']
licfiles = []
for root, dirs, files in os.walk(srctree):
for fn in files:
@@ -986,7 +1185,7 @@ def split_pkg_licenses(licvalues, packages, outlines, fallback_licenses=None, pn
return outlicenses
def read_pkgconfig_provides(d):
- pkgdatadir = d.getVar('PKGDATA_DIR', True)
+ pkgdatadir = d.getVar('PKGDATA_DIR')
pkgmap = {}
for fn in glob.glob(os.path.join(pkgdatadir, 'shlibs2', '*.pclist')):
with open(fn, 'r') as f:
@@ -1047,6 +1246,25 @@ def convert_debian(debpath):
varname = value_map.get(key, None)
if varname:
values[varname] = value
+ postinst = os.path.join(debpath, 'postinst')
+ postrm = os.path.join(debpath, 'postrm')
+ preinst = os.path.join(debpath, 'preinst')
+ prerm = os.path.join(debpath, 'prerm')
+ sfiles = [postinst, postrm, preinst, prerm]
+ for sfile in sfiles:
+ if os.path.isfile(sfile):
+ logger.info("Converting %s file to recipe function..." %
+ os.path.basename(sfile).upper())
+ content = []
+ with open(sfile) as f:
+ for line in f:
+ if "#!/" in line:
+ continue
+ line = line.rstrip("\n")
+ if line.strip():
+ content.append(line)
+ if content:
+ values[os.path.basename(f.name)] = content
#if depends:
# values['DEPENDS'] = ' '.join(depends)
@@ -1082,6 +1300,7 @@ def register_commands(subparsers):
description='Creates a new recipe from a source tree')
parser_create.add_argument('source', help='Path or URL to source')
parser_create.add_argument('-o', '--outfile', help='Specify filename for recipe to create')
+ parser_create.add_argument('-p', '--provides', help='Specify an alias for the item provided by the recipe')
parser_create.add_argument('-m', '--machine', help='Make recipe machine-specific as opposed to architecture-specific', action='store_true')
parser_create.add_argument('-x', '--extract-to', metavar='EXTRACTPATH', help='Assuming source is a URL, fetch it and extract it to the directory specified as %(metavar)s')
parser_create.add_argument('-N', '--name', help='Name to use within recipe (PN)')
@@ -1089,7 +1308,13 @@ def register_commands(subparsers):
parser_create.add_argument('-b', '--binary', help='Treat the source tree as something that should be installed verbatim (no compilation, same directory structure)', action='store_true')
parser_create.add_argument('--also-native', help='Also add native variant (i.e. support building recipe for the build host as well as the target machine)', action='store_true')
parser_create.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR')
- parser_create.add_argument('-a', '--autorev', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true")
+ group = parser_create.add_mutually_exclusive_group()
+ group.add_argument('-a', '--autorev', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true")
+ group.add_argument('-S', '--srcrev', help='Source revision to fetch if fetching from an SCM such as git (default latest)')
+ parser_create.add_argument('-B', '--srcbranch', help='Branch in source repository if fetching from an SCM such as git (default master)')
parser_create.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
+ parser_create.add_argument('--fetch-dev', action="store_true", help='For npm, also fetch devDependencies')
+ parser_create.add_argument('--devtool', action="store_true", help=argparse.SUPPRESS)
+ parser_create.add_argument('--mirrors', action="store_true", help='Enable PREMIRRORS and MIRRORS for source tree fetching (disabled by default).')
parser_create.set_defaults(func=create_recipe)
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index e914e53aab..3cb02766c8 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2014-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import re
import logging
@@ -863,6 +853,10 @@ class SpecFileRecipeHandler(RecipeHandler):
break
if len(foundvalues) == len(valuemap):
break
+ # Drop values containing unexpanded RPM macros
+ for k in list(foundvalues.keys()):
+ if '%' in foundvalues[k]:
+ del foundvalues[k]
if 'PV' in foundvalues:
if not validate_pv(foundvalues['PV']):
del foundvalues['PV']
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index e41d81a317..adfa377956 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015 Mentor Graphics Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import ast
import codecs
@@ -41,11 +31,11 @@ def tinfoil_init(instance):
class PythonRecipeHandler(RecipeHandler):
- base_pkgdeps = ['python-core']
- excluded_pkgdeps = ['python-dbg']
- # os.path is provided by python-core
+ base_pkgdeps = ['python3-core']
+ excluded_pkgdeps = ['python3-dbg']
+ # os.path is provided by python3-core
assume_provided = ['builtins', 'os.path']
- # Assumes that the host python builtin_module_names is sane for target too
+ # Assumes that the host python3 builtin_module_names is sane for target too
assume_provided = assume_provided + list(sys.builtin_module_names)
bbvar_map = {
@@ -164,8 +154,13 @@ class PythonRecipeHandler(RecipeHandler):
if 'buildsystem' in handled:
return False
- if not RecipeHandler.checkfiles(srctree, ['setup.py']):
- return
+ # Check for non-zero size setup.py files
+ setupfiles = RecipeHandler.checkfiles(srctree, ['setup.py'])
+ for fn in setupfiles:
+ if os.path.getsize(fn):
+ break
+ else:
+ return False
# setup.py is always parsed to get at certain required information, such as
# distutils vs setuptools
@@ -225,9 +220,9 @@ class PythonRecipeHandler(RecipeHandler):
self.apply_info_replacements(info)
if uses_setuptools:
- classes.append('setuptools')
+ classes.append('setuptools3')
else:
- classes.append('distutils')
+ classes.append('distutils3')
if license_str:
for i, line in enumerate(lines_before):
@@ -292,7 +287,7 @@ class PythonRecipeHandler(RecipeHandler):
for feature, feature_reqs in extras_req.items():
unmapped_deps.difference_update(feature_reqs)
- feature_req_deps = ('python-' + r.replace('.', '-').lower() for r in sorted(feature_reqs))
+ feature_req_deps = ('python3-' + r.replace('.', '-').lower() for r in sorted(feature_reqs))
lines_after.append('PACKAGECONFIG[{}] = ",,,{}"'.format(feature.lower(), ' '.join(feature_req_deps)))
inst_reqs = set()
@@ -303,7 +298,7 @@ class PythonRecipeHandler(RecipeHandler):
if inst_reqs:
unmapped_deps.difference_update(inst_reqs)
- inst_req_deps = ('python-' + r.replace('.', '-').lower() for r in sorted(inst_reqs))
+ inst_req_deps = ('python3-' + r.replace('.', '-').lower() for r in sorted(inst_reqs))
lines_after.append('# WARNING: the following rdepends are from setuptools install_requires. These')
lines_after.append('# upstream names may not correspond exactly to bitbake package names.')
lines_after.append('RDEPENDS_${{PN}} += "{}"'.format(' '.join(inst_req_deps)))
@@ -356,6 +351,8 @@ class PythonRecipeHandler(RecipeHandler):
# Naive mapping of setup() arguments to PKG-INFO field names
for d in [info, non_literals]:
for key, value in list(d.items()):
+ if key is None:
+ continue
new_key = _map(key)
if new_key != key:
del d[key]
@@ -364,7 +361,7 @@ class PythonRecipeHandler(RecipeHandler):
return info, 'setuptools' in imported_modules, non_literals, extensions
def get_setup_args_info(self, setupscript='./setup.py'):
- cmd = ['python', setupscript]
+ cmd = ['python3', setupscript]
info = {}
keys = set(self.bbvar_map.keys())
keys |= set(self.setuparg_list_fields)
@@ -398,7 +395,7 @@ class PythonRecipeHandler(RecipeHandler):
def get_setup_byline(self, fields, setupscript='./setup.py'):
info = {}
- cmd = ['python', setupscript]
+ cmd = ['python3', setupscript]
cmd.extend('--' + self.setuparg_map.get(f, f.lower()) for f in fields)
try:
info_lines = self.run_command(cmd, cwd=os.path.dirname(setupscript)).splitlines()
@@ -512,7 +509,7 @@ class PythonRecipeHandler(RecipeHandler):
except (OSError, subprocess.CalledProcessError):
pass
else:
- for line in dep_output.decode('utf-8').splitlines():
+ for line in dep_output.splitlines():
line = line.rstrip()
dep, filename = line.split('\t', 1)
if filename.endswith('/setup.py'):
@@ -532,11 +529,11 @@ class PythonRecipeHandler(RecipeHandler):
def parse_pkgdata_for_python_packages(self):
suffixes = [t[0] for t in imp.get_suffixes()]
- pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
+ pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR')
ldata = tinfoil.config_data.createCopy()
- bb.parse.handle('classes/python-dir.bbclass', ldata, True)
- python_sitedir = ldata.getVar('PYTHON_SITEPACKAGES_DIR', True)
+ bb.parse.handle('classes/python3-dir.bbclass', ldata, True)
+ python_sitedir = ldata.getVar('PYTHON_SITEPACKAGES_DIR')
dynload_dir = os.path.join(os.path.dirname(python_sitedir), 'lib-dynload')
python_dirs = [python_sitedir + os.sep,
@@ -591,7 +588,7 @@ class PythonRecipeHandler(RecipeHandler):
if 'stderr' not in popenargs:
popenargs['stderr'] = subprocess.STDOUT
try:
- return subprocess.check_output(cmd, **popenargs)
+ return subprocess.check_output(cmd, **popenargs).decode('utf-8')
except OSError as exc:
logger.error('Unable to run `{}`: {}', ' '.join(cmd), exc)
raise
diff --git a/scripts/lib/recipetool/create_kernel.py b/scripts/lib/recipetool/create_kernel.py
index 7dac59fd03..5740589a68 100644
--- a/scripts/lib/recipetool/create_kernel.py
+++ b/scripts/lib/recipetool/create_kernel.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import re
import logging
@@ -41,7 +31,7 @@ class KernelRecipeHandler(RecipeHandler):
handled.append('buildsystem')
del lines_after[:]
del classes[:]
- template = os.path.join(tinfoil.config_data.getVar('COREBASE', True), 'meta-skeleton', 'recipes-kernel', 'linux', 'linux-yocto-custom.bb')
+ template = os.path.join(tinfoil.config_data.getVar('COREBASE'), 'meta-skeleton', 'recipes-kernel', 'linux', 'linux-yocto-custom.bb')
def handle_var(varname, origvalue, op, newlines):
if varname in ['SRCREV', 'SRCREV_machine']:
while newlines[-1].startswith('#'):
@@ -85,7 +75,7 @@ class KernelRecipeHandler(RecipeHandler):
elif varname == 'COMPATIBLE_MACHINE':
while newlines[-1].startswith('#'):
del newlines[-1]
- machine = tinfoil.config_data.getVar('MACHINE', True)
+ machine = tinfoil.config_data.getVar('MACHINE')
return machine, op, 0, True
return origvalue, op, 0, True
with open(template, 'r') as f:
diff --git a/scripts/lib/recipetool/create_kmod.py b/scripts/lib/recipetool/create_kmod.py
index 7cf188db21..85b5c48e53 100644
--- a/scripts/lib/recipetool/create_kmod.py
+++ b/scripts/lib/recipetool/create_kmod.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import re
import logging
@@ -40,7 +30,7 @@ class KernelModuleRecipeHandler(RecipeHandler):
makefiles = []
- files = RecipeHandler.checkfiles(srctree, ['*.c', '*.h'], recursive=True)
+ files = RecipeHandler.checkfiles(srctree, ['*.c', '*.h'], recursive=True, excludedirs=['contrib', 'test', 'examples'])
if files:
for cfile in files:
# Look in same dir or parent for Makefile
@@ -141,7 +131,7 @@ class KernelModuleRecipeHandler(RecipeHandler):
warnmsg = 'Unable to find means of passing kernel path into install makefile - if kernel path is hardcoded you will need to patch the makefile'
if warnmsg:
warnmsg += '. Note that the variable KERNEL_SRC will be passed in as the kernel source path.'
- logger.warn(warnmsg)
+ logger.warning(warnmsg)
lines_after.append('# %s' % warnmsg)
return True
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py
index e794614978..39429ebad3 100644
--- a/scripts/lib/recipetool/create_npm.py
+++ b/scripts/lib/recipetool/create_npm.py
@@ -2,20 +2,11 @@
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
+import sys
import logging
import subprocess
import tempfile
@@ -36,6 +27,27 @@ def tinfoil_init(instance):
class NpmRecipeHandler(RecipeHandler):
lockdownpath = None
+ def _ensure_npm(self, fixed_setup=False):
+ if not tinfoil.recipes_parsed:
+ tinfoil.parse_recipes()
+ try:
+ rd = tinfoil.parse_recipe('nodejs-native')
+ except bb.providers.NoProvider:
+ if fixed_setup:
+ msg = 'nodejs-native is required for npm but is not available within this SDK'
+ else:
+ msg = 'nodejs-native is required for npm but is not available - you will likely need to add a layer that provides nodejs'
+ logger.error(msg)
+ return None
+ bindir = rd.getVar('STAGING_BINDIR_NATIVE')
+ npmpath = os.path.join(bindir, 'npm')
+ if not os.path.exists(npmpath):
+ tinfoil.build_targets('nodejs-native', 'addto_recipe_sysroot')
+ if not os.path.exists(npmpath):
+ logger.error('npm required to process specified source, but nodejs-native did not seem to populate it')
+ return None
+ return bindir
+
def _handle_license(self, data):
'''
Handle the license value from an npm package.json file
@@ -45,14 +57,31 @@ class NpmRecipeHandler(RecipeHandler):
license = data['license']
if isinstance(license, dict):
license = license.get('type', None)
+ if license:
+ if 'OR' in license:
+ license = license.replace('OR', '|')
+ license = license.replace('AND', '&')
+ license = license.replace(' ', '_')
+ if not license[0] == '(':
+ license = '(' + license + ')'
+ else:
+ license = license.replace('AND', '&')
+ if license[0] == '(':
+ license = license[1:]
+ if license[-1] == ')':
+ license = license[:-1]
+ license = license.replace('MIT/X11', 'MIT')
+ license = license.replace('Public Domain', 'PD')
+ license = license.replace('SEE LICENSE IN EULA',
+ 'SEE-LICENSE-IN-EULA')
return license
- def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before):
+ def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before, d):
try:
- runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH', True))
+ runenv = dict(os.environ, PATH=d.getVar('PATH'))
bb.process.run('npm shrinkwrap', cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True)
except bb.process.ExecutionError as e:
- logger.warn('npm shrinkwrap failed:\n%s' % e.stdout)
+ logger.warning('npm shrinkwrap failed:\n%s' % e.stdout)
return
tmpfile = os.path.join(localfilesdir, 'npm-shrinkwrap.json')
@@ -61,20 +90,20 @@ class NpmRecipeHandler(RecipeHandler):
extravalues['extrafiles']['npm-shrinkwrap.json'] = tmpfile
lines_before.append('NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json"')
- def _lockdown(self, srctree, localfilesdir, extravalues, lines_before):
- runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH', True))
+ def _lockdown(self, srctree, localfilesdir, extravalues, lines_before, d):
+ runenv = dict(os.environ, PATH=d.getVar('PATH'))
if not NpmRecipeHandler.lockdownpath:
NpmRecipeHandler.lockdownpath = tempfile.mkdtemp('recipetool-npm-lockdown')
bb.process.run('npm install lockdown --prefix %s' % NpmRecipeHandler.lockdownpath,
cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True)
relockbin = os.path.join(NpmRecipeHandler.lockdownpath, 'node_modules', 'lockdown', 'relock.js')
if not os.path.exists(relockbin):
- logger.warn('Could not find relock.js within lockdown directory; skipping lockdown')
+ logger.warning('Could not find relock.js within lockdown directory; skipping lockdown')
return
try:
bb.process.run('node %s' % relockbin, cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True)
except bb.process.ExecutionError as e:
- logger.warn('lockdown-relock failed:\n%s' % e.stdout)
+ logger.warning('lockdown-relock failed:\n%s' % e.stdout)
return
tmpfile = os.path.join(localfilesdir, 'lockdown.json')
@@ -83,7 +112,7 @@ class NpmRecipeHandler(RecipeHandler):
extravalues['extrafiles']['lockdown.json'] = tmpfile
lines_before.append('NPM_LOCKDOWN := "${THISDIR}/${PN}/lockdown.json"')
- def _handle_dependencies(self, d, deps, lines_before, srctree):
+ def _handle_dependencies(self, d, deps, optdeps, devdeps, lines_before, srctree):
import scriptutils
# If this isn't a single module we need to get the dependencies
# and add them to SRC_URI
@@ -91,15 +120,28 @@ class NpmRecipeHandler(RecipeHandler):
if varname == 'SRC_URI':
if not origvalue.startswith('npm://'):
src_uri = origvalue.split()
- changed = False
- for dep, depdata in deps.items():
- version = self.get_node_version(dep, depdata, d)
+ deplist = {}
+ for dep, depver in optdeps.items():
+ depdata = self.get_npm_data(dep, depver, d)
+ if self.check_npm_optional_dependency(depdata):
+ deplist[dep] = depdata
+ for dep, depver in devdeps.items():
+ depdata = self.get_npm_data(dep, depver, d)
+ if self.check_npm_optional_dependency(depdata):
+ deplist[dep] = depdata
+ for dep, depver in deps.items():
+ depdata = self.get_npm_data(dep, depver, d)
+ deplist[dep] = depdata
+
+ extra_urls = []
+ for dep, depdata in deplist.items():
+ version = depdata.get('version', None)
if version:
url = 'npm://registry.npmjs.org;name=%s;version=%s;subdir=node_modules/%s' % (dep, version, dep)
- scriptutils.fetch_uri(d, url, srctree)
- src_uri.append(url)
- changed = True
- if changed:
+ extra_urls.append(url)
+ if extra_urls:
+ scriptutils.fetch_url(tinfoil, ' '.join(extra_urls), None, srctree, logger)
+ src_uri.extend(extra_urls)
return src_uri, None, -1, True
return origvalue, None, 0, True
updated, newlines = bb.utils.edit_metadata(lines_before, ['SRC_URI'], varfunc)
@@ -112,40 +154,9 @@ class NpmRecipeHandler(RecipeHandler):
lines_before.append(line)
return updated
- def _replace_license_vars(self, srctree, lines_before, handled, extravalues, d):
- for item in handled:
- if isinstance(item, tuple):
- if item[0] == 'license':
- del item
- break
-
- calledvars = []
- def varfunc(varname, origvalue, op, newlines):
- if varname in ['LICENSE', 'LIC_FILES_CHKSUM']:
- for i, e in enumerate(reversed(newlines)):
- if not e.startswith('#'):
- stop = i
- while stop > 0:
- newlines.pop()
- stop -= 1
- break
- calledvars.append(varname)
- if len(calledvars) > 1:
- # The second time around, put the new license text in
- insertpos = len(newlines)
- handle_license_vars(srctree, newlines, handled, extravalues, d)
- return None, None, 0, True
- return origvalue, None, 0, True
- updated, newlines = bb.utils.edit_metadata(lines_before, ['LICENSE', 'LIC_FILES_CHKSUM'], varfunc)
- if updated:
- del lines_before[:]
- lines_before.extend(newlines)
- else:
- raise Exception('Did not find license variables')
-
def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
import bb.utils
- import oe
+ import oe.package
from collections import OrderedDict
if 'buildsystem' in handled:
@@ -157,6 +168,12 @@ class NpmRecipeHandler(RecipeHandler):
files = RecipeHandler.checkfiles(srctree, ['package.json'])
if files:
+ d = bb.data.createCopy(tinfoil.config_data)
+ npm_bindir = self._ensure_npm()
+ if not npm_bindir:
+ sys.exit(14)
+ d.prependVar('PATH', '%s:' % npm_bindir)
+
data = read_package_json(files[0])
if 'name' in data and 'version' in data:
extravalues['PN'] = data['name']
@@ -168,26 +185,27 @@ class NpmRecipeHandler(RecipeHandler):
if 'homepage' in data:
extravalues['HOMEPAGE'] = data['homepage']
- deps = data.get('dependencies', {})
- updated = self._handle_dependencies(tinfoil.config_data, deps, lines_before, srctree)
- if updated:
- # We need to redo the license stuff
- self._replace_license_vars(srctree, lines_before, handled, extravalues, tinfoil.config_data)
+ fetchdev = extravalues['fetchdev'] or None
+ deps, optdeps, devdeps = self.get_npm_package_dependencies(data, fetchdev)
+ self._handle_dependencies(d, deps, optdeps, devdeps, lines_before, srctree)
# Shrinkwrap
localfilesdir = tempfile.mkdtemp(prefix='recipetool-npm')
- self._shrinkwrap(srctree, localfilesdir, extravalues, lines_before)
+ self._shrinkwrap(srctree, localfilesdir, extravalues, lines_before, d)
# Lockdown
- self._lockdown(srctree, localfilesdir, extravalues, lines_before)
+ self._lockdown(srctree, localfilesdir, extravalues, lines_before, d)
# Split each npm module out to is own package
npmpackages = oe.package.npm_split_package_dirs(srctree)
+ licvalues = None
for item in handled:
if isinstance(item, tuple):
if item[0] == 'license':
licvalues = item[1]
break
+ if not licvalues:
+ licvalues = handle_license_vars(srctree, lines_before, handled, extravalues, d)
if licvalues:
# Augment the license list with information we have in the packages
licenses = {}
@@ -205,14 +223,10 @@ class NpmRecipeHandler(RecipeHandler):
packages = OrderedDict((x,y[0]) for x,y in npmpackages.items())
packages['${PN}'] = ''
pkglicenses = split_pkg_licenses(licvalues, packages, lines_after, licenses)
- all_licenses = list(set([item for pkglicense in pkglicenses.values() for item in pkglicense]))
- # Go back and update the LICENSE value since we have a bit more
- # information than when that was written out (and we know all apply
- # vs. there being a choice, so we can join them with &)
- for i, line in enumerate(lines_before):
- if line.startswith('LICENSE = '):
- lines_before[i] = 'LICENSE = "%s"' % ' & '.join(all_licenses)
- break
+ all_licenses = list(set([item.replace('_', ' ') for pkglicense in pkglicenses.values() for item in pkglicense]))
+ if '&' in all_licenses:
+ all_licenses.remove('&')
+ extravalues['LICENSE'] = ' & '.join(all_licenses)
# Need to move S setting after inherit npm
for i, line in enumerate(lines_before):
@@ -249,17 +263,59 @@ class NpmRecipeHandler(RecipeHandler):
# FIXME this is effectively duplicated from lib/bb/fetch2/npm.py
# (split out from _getdependencies())
- def get_node_version(self, pkg, version, d):
+ def get_npm_data(self, pkg, version, d):
import bb.fetch2
pkgfullname = pkg
if version != '*' and not '/' in version:
pkgfullname += "@'%s'" % version
logger.debug(2, "Calling getdeps on %s" % pkg)
- runenv = dict(os.environ, PATH=d.getVar('PATH', True))
+ runenv = dict(os.environ, PATH=d.getVar('PATH'))
fetchcmd = "npm view %s --json" % pkgfullname
output, _ = bb.process.run(fetchcmd, stderr=subprocess.STDOUT, env=runenv, shell=True)
data = self._parse_view(output)
- return data.get('version', None)
+ return data
+
+ # FIXME this is effectively duplicated from lib/bb/fetch2/npm.py
+ # (split out from _getdependencies())
+ def get_npm_package_dependencies(self, pdata, fetchdev):
+ dependencies = pdata.get('dependencies', {})
+ optionalDependencies = pdata.get('optionalDependencies', {})
+ dependencies.update(optionalDependencies)
+ if fetchdev:
+ devDependencies = pdata.get('devDependencies', {})
+ dependencies.update(devDependencies)
+ else:
+ devDependencies = {}
+ depsfound = {}
+ optdepsfound = {}
+ devdepsfound = {}
+ for dep in dependencies:
+ if dep in optionalDependencies:
+ optdepsfound[dep] = dependencies[dep]
+ elif dep in devDependencies:
+ devdepsfound[dep] = dependencies[dep]
+ else:
+ depsfound[dep] = dependencies[dep]
+ return depsfound, optdepsfound, devdepsfound
+
+ # FIXME this is effectively duplicated from lib/bb/fetch2/npm.py
+ # (split out from _getdependencies())
+ def check_npm_optional_dependency(self, pdata):
+ pkg_os = pdata.get('os', None)
+ if pkg_os:
+ if not isinstance(pkg_os, list):
+ pkg_os = [pkg_os]
+ blacklist = False
+ for item in pkg_os:
+ if item.startswith('!'):
+ blacklist = True
+ break
+ if (not blacklist and 'linux' not in pkg_os) or '!linux' in pkg_os:
+ pkg = pdata.get('name', 'Unnamed package')
+ logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg)
+ return False
+ return True
+
def register_recipe_handlers(handlers):
handlers.append((NpmRecipeHandler(), 60))
diff --git a/scripts/lib/recipetool/edit.py b/scripts/lib/recipetool/edit.py
new file mode 100644
index 0000000000..94bdf7bca4
--- /dev/null
+++ b/scripts/lib/recipetool/edit.py
@@ -0,0 +1,44 @@
+# Recipe creation tool - edit plugin
+#
+# This sub-command edits the recipe and appends for the specified target
+#
+# Example: recipetool edit busybox
+#
+# Copyright (C) 2018 Mentor Graphics Corporation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import argparse
+import errno
+import logging
+import os
+import re
+import subprocess
+import sys
+import scriptutils
+
+
+logger = logging.getLogger('recipetool')
+tinfoil = None
+
+
+def tinfoil_init(instance):
+ global tinfoil
+ tinfoil = instance
+
+
+def edit(args):
+ import oe.recipeutils
+
+ recipe_path = tinfoil.get_recipe_file(args.target)
+ appends = tinfoil.get_file_appends(recipe_path)
+
+ return scriptutils.run_editor([recipe_path] + appends, logger)
+
+
+def register_commands(subparsers):
+ parser = subparsers.add_parser('edit',
+ help='Edit the recipe and appends for the specified target. This obeys $VISUAL if set, otherwise $EDITOR, otherwise vi.')
+ parser.add_argument('target', help='Target recipe/provide to edit')
+ parser.set_defaults(func=edit, parserecipes=True)
diff --git a/scripts/lib/recipetool/newappend.py b/scripts/lib/recipetool/newappend.py
index fbdd7bcef5..08e2474dc4 100644
--- a/scripts/lib/recipetool/newappend.py
+++ b/scripts/lib/recipetool/newappend.py
@@ -7,18 +7,8 @@
#
# Copyright (C) 2015 Christopher Larson <kergoth@gmail.com>
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import argparse
import errno
@@ -39,18 +29,6 @@ def tinfoil_init(instance):
tinfoil = instance
-def _get_recipe_file(cooker, pn):
- import oe.recipeutils
- recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
- if not recipefile:
- skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn)
- if skipreasons:
- logger.error('\n'.join(skipreasons))
- else:
- logger.error("Unable to find any recipe file matching %s" % pn)
- return recipefile
-
-
def layer(layerpath):
if not os.path.exists(os.path.join(layerpath, 'conf', 'layer.conf')):
raise argparse.ArgumentTypeError('{0!r} must be a path to a valid layer'.format(layerpath))
@@ -60,7 +38,7 @@ def layer(layerpath):
def newappend(args):
import oe.recipeutils
- recipe_path = _get_recipe_file(tinfoil.cooker, args.target)
+ recipe_path = tinfoil.get_recipe_file(args.target)
rd = tinfoil.config_data.createCopy()
rd.setVar('FILE', recipe_path)
@@ -70,11 +48,11 @@ def newappend(args):
return 1
if not path_ok:
- logger.warn('Unable to determine correct subdirectory path for bbappend file - check that what %s adds to BBFILES also matches .bbappend files. Using %s for now, but until you fix this the bbappend will not be applied.', os.path.join(args.destlayer, 'conf', 'layer.conf'), os.path.dirname(append_path))
+ logger.warning('Unable to determine correct subdirectory path for bbappend file - check that what %s adds to BBFILES also matches .bbappend files. Using %s for now, but until you fix this the bbappend will not be applied.', os.path.join(args.destlayer, 'conf', 'layer.conf'), os.path.dirname(append_path))
- layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS', True).split()]
+ layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS').split()]
if not os.path.abspath(args.destlayer) in layerdirs:
- logger.warn('Specified layer is not currently enabled in bblayers.conf, you will need to add it before this bbappend will be active')
+ logger.warning('Specified layer is not currently enabled in bblayers.conf, you will need to add it before this bbappend will be active')
if not os.path.exists(append_path):
bb.utils.mkdirhier(os.path.dirname(append_path))
@@ -86,7 +64,7 @@ def newappend(args):
return 1
if args.edit:
- return scriptutils.run_editor([append_path, recipe_path])
+ return scriptutils.run_editor([append_path, recipe_path], logger)
else:
print(append_path)
diff --git a/scripts/lib/recipetool/setvar.py b/scripts/lib/recipetool/setvar.py
index 85701c06a9..f8e2ee75fb 100644
--- a/scripts/lib/recipetool/setvar.py
+++ b/scripts/lib/recipetool/setvar.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
import os
@@ -51,7 +41,7 @@ def setvar(args):
if args.recipe_only:
patches = [oe.recipeutils.patch_recipe_file(args.recipefile, varvalues, patch=args.patch)]
else:
- rd = oe.recipeutils.parse_recipe(tinfoil.cooker, args.recipefile, None)
+ rd = tinfoil.parse_recipe_file(args.recipefile, False)
if not rd:
return 1
patches = oe.recipeutils.patch_recipe(rd, args.recipefile, varvalues, patch=args.patch)
diff --git a/scripts/lib/resulttool/__init__.py b/scripts/lib/resulttool/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/scripts/lib/resulttool/__init__.py
diff --git a/scripts/lib/resulttool/log.py b/scripts/lib/resulttool/log.py
new file mode 100644
index 0000000000..f1bfd99500
--- /dev/null
+++ b/scripts/lib/resulttool/log.py
@@ -0,0 +1,97 @@
+# resulttool - Show logs
+#
+# Copyright (c) 2019 Garmin International
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+import os
+import resulttool.resultutils as resultutils
+
+def show_ptest(result, ptest, logger):
+ logdata = resultutils.ptestresult_get_log(result, ptest)
+ if logdata is not None:
+ print(logdata)
+ return 0
+
+ print("ptest '%s' log not found" % ptest)
+ return 1
+
+def show_reproducible(result, reproducible, logger):
+ try:
+ print(result['reproducible'][reproducible]['diffoscope.text'])
+ return 0
+
+ except KeyError:
+ print("reproducible '%s' not found" % reproducible)
+ return 1
+
+def log(args, logger):
+ results = resultutils.load_resultsdata(args.source)
+
+ ptest_count = sum(1 for _, _, _, r in resultutils.test_run_results(results) if 'ptestresult.sections' in r)
+ if ptest_count > 1 and not args.prepend_run:
+ print("%i ptest sections found. '--prepend-run' is required" % ptest_count)
+ return 1
+
+ for _, run_name, _, r in resultutils.test_run_results(results):
+ if args.dump_ptest and 'ptestresult.sections' in r:
+ for name, ptest in r['ptestresult.sections'].items():
+ logdata = resultutils.ptestresult_get_log(r, name)
+ if logdata is not None:
+ dest_dir = args.dump_ptest
+ if args.prepend_run:
+ dest_dir = os.path.join(dest_dir, run_name)
+
+ os.makedirs(dest_dir, exist_ok=True)
+ dest = os.path.join(dest_dir, '%s.log' % name)
+ print(dest)
+ with open(dest, 'w') as f:
+ f.write(logdata)
+
+ if args.raw_ptest:
+ rawlog = resultutils.ptestresult_get_rawlogs(r)
+ if rawlog is not None:
+ print(rawlog)
+ else:
+ print('Raw ptest logs not found')
+ return 1
+
+ if args.raw_reproducible:
+ if 'reproducible.rawlogs' in r:
+ print(r['reproducible.rawlogs']['log'])
+ else:
+ print('Raw reproducible logs not found')
+ return 1
+
+ for ptest in args.ptest:
+ if not show_ptest(r, ptest, logger):
+ return 1
+
+ for reproducible in args.reproducible:
+ if not show_reproducible(r, reproducible, logger):
+ return 1
+
+def register_commands(subparsers):
+ """Register subcommands from this plugin"""
+ parser = subparsers.add_parser('log', help='show logs',
+ description='show the logs from test results',
+ group='analysis')
+ parser.set_defaults(func=log)
+ parser.add_argument('source',
+ help='the results file/directory/URL to import')
+ parser.add_argument('--ptest', action='append', default=[],
+ help='show logs for a ptest')
+ parser.add_argument('--dump-ptest', metavar='DIR',
+ help='Dump all ptest log files to the specified directory.')
+ parser.add_argument('--reproducible', action='append', default=[],
+ help='show logs for a reproducible test')
+ parser.add_argument('--prepend-run', action='store_true',
+ help='''Dump ptest results to a subdirectory named after the test run when using --dump-ptest.
+ Required if more than one test run is present in the result file''')
+ parser.add_argument('--raw', action='store_true',
+ help='show raw (ptest) logs. Deprecated. Alias for "--raw-ptest"', dest='raw_ptest')
+ parser.add_argument('--raw-ptest', action='store_true',
+ help='show raw ptest log')
+ parser.add_argument('--raw-reproducible', action='store_true',
+ help='show raw reproducible build logs')
+
diff --git a/scripts/lib/resulttool/manualexecution.py b/scripts/lib/resulttool/manualexecution.py
new file mode 100755
index 0000000000..ecb27c5933
--- /dev/null
+++ b/scripts/lib/resulttool/manualexecution.py
@@ -0,0 +1,235 @@
+# test case management tool - manual execution from testopia test cases
+#
+# Copyright (c) 2018, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import argparse
+import json
+import os
+import sys
+import datetime
+import re
+import copy
+from oeqa.core.runner import OETestResultJSONHelper
+
+
+def load_json_file(f):
+ with open(f, "r") as filedata:
+ return json.load(filedata)
+
+def write_json_file(f, json_data):
+ os.makedirs(os.path.dirname(f), exist_ok=True)
+ with open(f, 'w') as filedata:
+ filedata.write(json.dumps(json_data, sort_keys=True, indent=4))
+
+class ManualTestRunner(object):
+
+ def _get_test_module(self, case_file):
+ return os.path.basename(case_file).split('.')[0]
+
+ def _get_input(self, config):
+ while True:
+ output = input('{} = '.format(config))
+ if re.match('^[a-z0-9-.]+$', output):
+ break
+ print('Only lowercase alphanumeric, hyphen and dot are allowed. Please try again')
+ return output
+
+ def _get_available_config_options(self, config_options, test_module, target_config):
+ avail_config_options = None
+ if test_module in config_options:
+ avail_config_options = config_options[test_module].get(target_config)
+ return avail_config_options
+
+ def _choose_config_option(self, options):
+ while True:
+ output = input('{} = '.format('Option index number'))
+ if output in options:
+ break
+ print('Only integer index inputs from above available configuration options are allowed. Please try again.')
+ return options[output]
+
+ def _get_config(self, config_options, test_module):
+ from oeqa.utils.metadata import get_layers
+ from oeqa.utils.commands import get_bb_var
+ from resulttool.resultutils import store_map
+
+ layers = get_layers(get_bb_var('BBLAYERS'))
+ configurations = {}
+ configurations['LAYERS'] = layers
+ configurations['STARTTIME'] = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
+ configurations['TEST_TYPE'] = 'manual'
+ configurations['TEST_MODULE'] = test_module
+
+ extra_config = set(store_map['manual']) - set(configurations)
+ for config in sorted(extra_config):
+ avail_config_options = self._get_available_config_options(config_options, test_module, config)
+ if avail_config_options:
+ print('---------------------------------------------')
+ print('These are available configuration #%s options:' % config)
+ print('---------------------------------------------')
+ for option, _ in sorted(avail_config_options.items(), key=lambda x: int(x[0])):
+ print('%s: %s' % (option, avail_config_options[option]))
+ print('Please select configuration option, enter the integer index number.')
+ value_conf = self._choose_config_option(avail_config_options)
+ print('---------------------------------------------\n')
+ else:
+ print('---------------------------------------------')
+ print('This is configuration #%s. Please provide configuration value(use "None" if not applicable).' % config)
+ print('---------------------------------------------')
+ value_conf = self._get_input('Configuration Value')
+ print('---------------------------------------------\n')
+ configurations[config] = value_conf
+ return configurations
+
+ def _execute_test_steps(self, case):
+ test_result = {}
+ print('------------------------------------------------------------------------')
+ print('Executing test case: %s' % case['test']['@alias'])
+ print('------------------------------------------------------------------------')
+ print('You have total %s test steps to be executed.' % len(case['test']['execution']))
+ print('------------------------------------------------------------------------\n')
+ for step, _ in sorted(case['test']['execution'].items(), key=lambda x: int(x[0])):
+ print('Step %s: %s' % (step, case['test']['execution'][step]['action']))
+ expected_output = case['test']['execution'][step]['expected_results']
+ if expected_output:
+ print('Expected output: %s' % expected_output)
+ while True:
+ done = input('\nPlease provide test results: (P)assed/(F)ailed/(B)locked/(S)kipped? \n').lower()
+ result_types = {'p':'PASSED',
+ 'f':'FAILED',
+ 'b':'BLOCKED',
+ 's':'SKIPPED'}
+ if done in result_types:
+ for r in result_types:
+ if done == r:
+ res = result_types[r]
+ if res == 'FAILED':
+ log_input = input('\nPlease enter the error and the description of the log: (Ex:log:211 Error Bitbake)\n')
+ test_result.update({case['test']['@alias']: {'status': '%s' % res, 'log': '%s' % log_input}})
+ else:
+ test_result.update({case['test']['@alias']: {'status': '%s' % res}})
+ break
+ print('Invalid input!')
+ return test_result
+
+ def _get_write_dir(self):
+ return os.environ['BUILDDIR'] + '/tmp/log/manual/'
+
+ def run_test(self, case_file, config_options_file, testcase_config_file):
+ test_module = self._get_test_module(case_file)
+ cases = load_json_file(case_file)
+ config_options = {}
+ if config_options_file:
+ config_options = load_json_file(config_options_file)
+ configurations = self._get_config(config_options, test_module)
+ result_id = 'manual_%s_%s' % (test_module, configurations['STARTTIME'])
+ test_results = {}
+ if testcase_config_file:
+ test_case_config = load_json_file(testcase_config_file)
+ test_case_to_execute = test_case_config['testcases']
+ for case in copy.deepcopy(cases) :
+ if case['test']['@alias'] not in test_case_to_execute:
+ cases.remove(case)
+
+ print('\nTotal number of test cases in this test suite: %s\n' % len(cases))
+ for c in cases:
+ test_result = self._execute_test_steps(c)
+ test_results.update(test_result)
+ return configurations, result_id, self._get_write_dir(), test_results
+
+ def _get_true_false_input(self, input_message):
+ yes_list = ['Y', 'YES']
+ no_list = ['N', 'NO']
+ while True:
+ more_config_option = input(input_message).upper()
+ if more_config_option in yes_list or more_config_option in no_list:
+ break
+ print('Invalid input!')
+ if more_config_option in no_list:
+ return False
+ return True
+
+ def make_config_option_file(self, logger, case_file, config_options_file):
+ config_options = {}
+ if config_options_file:
+ config_options = load_json_file(config_options_file)
+ new_test_module = self._get_test_module(case_file)
+ print('Creating configuration options file for test module: %s' % new_test_module)
+ new_config_options = {}
+
+ while True:
+ config_name = input('\nPlease provide test configuration to create:\n').upper()
+ new_config_options[config_name] = {}
+ while True:
+ config_value = self._get_input('Configuration possible option value')
+ config_option_index = len(new_config_options[config_name]) + 1
+ new_config_options[config_name][config_option_index] = config_value
+ more_config_option = self._get_true_false_input('\nIs there more configuration option input: (Y)es/(N)o\n')
+ if not more_config_option:
+ break
+ more_config = self._get_true_false_input('\nIs there more configuration to create: (Y)es/(N)o\n')
+ if not more_config:
+ break
+
+ if new_config_options:
+ config_options[new_test_module] = new_config_options
+ if not config_options_file:
+ config_options_file = os.path.join(self._get_write_dir(), 'manual_config_options.json')
+ write_json_file(config_options_file, config_options)
+ logger.info('Configuration option file created at %s' % config_options_file)
+
+ def make_testcase_config_file(self, logger, case_file, testcase_config_file):
+ if testcase_config_file:
+ if os.path.exists(testcase_config_file):
+ print('\nTest configuration file with name %s already exists. Please provide a unique file name' % (testcase_config_file))
+ return 0
+
+ if not testcase_config_file:
+ testcase_config_file = os.path.join(self._get_write_dir(), "testconfig_new.json")
+
+ testcase_config = {}
+ cases = load_json_file(case_file)
+ new_test_module = self._get_test_module(case_file)
+ new_testcase_config = {}
+ new_testcase_config['testcases'] = []
+
+ print('\nAdd testcases for this configuration file:')
+ for case in cases:
+ print('\n' + case['test']['@alias'])
+ add_tc_config = self._get_true_false_input('\nDo you want to add this test case to test configuration : (Y)es/(N)o\n')
+ if add_tc_config:
+ new_testcase_config['testcases'].append(case['test']['@alias'])
+ write_json_file(testcase_config_file, new_testcase_config)
+ logger.info('Testcase Configuration file created at %s' % testcase_config_file)
+
+def manualexecution(args, logger):
+ testrunner = ManualTestRunner()
+ if args.make_config_options_file:
+ testrunner.make_config_option_file(logger, args.file, args.config_options_file)
+ return 0
+ if args.make_testcase_config_file:
+ testrunner.make_testcase_config_file(logger, args.file, args.testcase_config_file)
+ return 0
+ configurations, result_id, write_dir, test_results = testrunner.run_test(args.file, args.config_options_file, args.testcase_config_file)
+ resultjsonhelper = OETestResultJSONHelper()
+ resultjsonhelper.dump_testresult_file(write_dir, configurations, result_id, test_results)
+ return 0
+
+def register_commands(subparsers):
+ """Register subcommands from this plugin"""
+ parser_build = subparsers.add_parser('manualexecution', help='helper script for results populating during manual test execution.',
+ description='helper script for results populating during manual test execution. You can find manual test case JSON file in meta/lib/oeqa/manual/',
+ group='manualexecution')
+ parser_build.set_defaults(func=manualexecution)
+ parser_build.add_argument('file', help='specify path to manual test case JSON file.Note: Please use \"\" to encapsulate the file path.')
+ parser_build.add_argument('-c', '--config-options-file', default='',
+ help='the config options file to import and used as available configuration option selection or make config option file')
+ parser_build.add_argument('-m', '--make-config-options-file', action='store_true',
+ help='make the configuration options file based on provided inputs')
+ parser_build.add_argument('-t', '--testcase-config-file', default='',
+ help='the testcase configuration file to enable user to run a selected set of test case or make a testcase configuration file')
+ parser_build.add_argument('-d', '--make-testcase-config-file', action='store_true',
+ help='make the testcase configuration file to run a set of test cases based on user selection') \ No newline at end of file
diff --git a/scripts/lib/resulttool/merge.py b/scripts/lib/resulttool/merge.py
new file mode 100644
index 0000000000..18b4825a18
--- /dev/null
+++ b/scripts/lib/resulttool/merge.py
@@ -0,0 +1,46 @@
+# resulttool - merge multiple testresults.json files into a file or directory
+#
+# Copyright (c) 2019, Intel Corporation.
+# Copyright (c) 2019, Linux Foundation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os
+import json
+import resulttool.resultutils as resultutils
+
+def merge(args, logger):
+ configvars = {}
+ if not args.not_add_testseries:
+ configvars = resultutils.extra_configvars.copy()
+ if args.executed_by:
+ configvars['EXECUTED_BY'] = args.executed_by
+ if resultutils.is_url(args.target_results) or os.path.isdir(args.target_results):
+ results = resultutils.load_resultsdata(args.target_results, configmap=resultutils.store_map, configvars=configvars)
+ resultutils.append_resultsdata(results, args.base_results, configmap=resultutils.store_map, configvars=configvars)
+ resultutils.save_resultsdata(results, args.target_results)
+ else:
+ results = resultutils.load_resultsdata(args.base_results, configmap=resultutils.flatten_map, configvars=configvars)
+ if os.path.exists(args.target_results):
+ resultutils.append_resultsdata(results, args.target_results, configmap=resultutils.flatten_map, configvars=configvars)
+ resultutils.save_resultsdata(results, os.path.dirname(args.target_results), fn=os.path.basename(args.target_results))
+
+ logger.info('Merged results to %s' % os.path.dirname(args.target_results))
+
+ return 0
+
+def register_commands(subparsers):
+ """Register subcommands from this plugin"""
+ parser_build = subparsers.add_parser('merge', help='merge test result files/directories/URLs',
+ description='merge the results from multiple files/directories/URLs into the target file or directory',
+ group='setup')
+ parser_build.set_defaults(func=merge)
+ parser_build.add_argument('base_results',
+ help='the results file/directory/URL to import')
+ parser_build.add_argument('target_results',
+ help='the target file or directory to merge the base_results with')
+ parser_build.add_argument('-t', '--not-add-testseries', action='store_true',
+ help='do not add testseries configuration to results')
+ parser_build.add_argument('-x', '--executed-by', default='',
+ help='add executed-by configuration to each result file')
diff --git a/scripts/lib/resulttool/regression.py b/scripts/lib/resulttool/regression.py
new file mode 100644
index 0000000000..9f952951b3
--- /dev/null
+++ b/scripts/lib/resulttool/regression.py
@@ -0,0 +1,186 @@
+# resulttool - regression analysis
+#
+# Copyright (c) 2019, Intel Corporation.
+# Copyright (c) 2019, Linux Foundation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import resulttool.resultutils as resultutils
+import json
+
+from oeqa.utils.git import GitRepo
+import oeqa.utils.gitarchive as gitarchive
+
+def compare_result(logger, base_name, target_name, base_result, target_result):
+ base_result = base_result.get('result')
+ target_result = target_result.get('result')
+ result = {}
+ if base_result and target_result:
+ for k in base_result:
+ base_testcase = base_result[k]
+ base_status = base_testcase.get('status')
+ if base_status:
+ target_testcase = target_result.get(k, {})
+ target_status = target_testcase.get('status')
+ if base_status != target_status:
+ result[k] = {'base': base_status, 'target': target_status}
+ else:
+ logger.error('Failed to retrieved base test case status: %s' % k)
+ if result:
+ resultstring = "Regression: %s\n %s\n" % (base_name, target_name)
+ for k in sorted(result):
+ resultstring += ' %s: %s -> %s\n' % (k, result[k]['base'], result[k]['target'])
+ else:
+ resultstring = "Match: %s\n %s" % (base_name, target_name)
+ return result, resultstring
+
+def get_results(logger, source):
+ return resultutils.load_resultsdata(source, configmap=resultutils.regression_map)
+
+def regression(args, logger):
+ base_results = get_results(logger, args.base_result)
+ target_results = get_results(logger, args.target_result)
+
+ regression_common(args, logger, base_results, target_results)
+
+def regression_common(args, logger, base_results, target_results):
+ if args.base_result_id:
+ base_results = resultutils.filter_resultsdata(base_results, args.base_result_id)
+ if args.target_result_id:
+ target_results = resultutils.filter_resultsdata(target_results, args.target_result_id)
+
+ matches = []
+ regressions = []
+ notfound = []
+
+ for a in base_results:
+ if a in target_results:
+ base = list(base_results[a].keys())
+ target = list(target_results[a].keys())
+ # We may have multiple base/targets which are for different configurations. Start by
+ # removing any pairs which match
+ for c in base.copy():
+ for b in target.copy():
+ res, resstr = compare_result(logger, c, b, base_results[a][c], target_results[a][b])
+ if not res:
+ matches.append(resstr)
+ base.remove(c)
+ target.remove(b)
+ break
+ # Should only now see regressions, we may not be able to match multiple pairs directly
+ for c in base:
+ for b in target:
+ res, resstr = compare_result(logger, c, b, base_results[a][c], target_results[a][b])
+ if res:
+ regressions.append(resstr)
+ else:
+ notfound.append("%s not found in target" % a)
+ print("\n".join(sorted(matches)))
+ print("\n".join(sorted(regressions)))
+ print("\n".join(sorted(notfound)))
+
+ return 0
+
+def regression_git(args, logger):
+ base_results = {}
+ target_results = {}
+
+ tag_name = "{branch}/{commit_number}-g{commit}/{tag_number}"
+ repo = GitRepo(args.repo)
+
+ revs = gitarchive.get_test_revs(logger, repo, tag_name, branch=args.branch)
+
+ if args.branch2:
+ revs2 = gitarchive.get_test_revs(logger, repo, tag_name, branch=args.branch2)
+ if not len(revs2):
+ logger.error("No revisions found to compare against")
+ return 1
+ if not len(revs):
+ logger.error("No revision to report on found")
+ return 1
+ else:
+ if len(revs) < 2:
+ logger.error("Only %d tester revisions found, unable to generate report" % len(revs))
+ return 1
+
+ # Pick revisions
+ if args.commit:
+ if args.commit_number:
+ logger.warning("Ignoring --commit-number as --commit was specified")
+ index1 = gitarchive.rev_find(revs, 'commit', args.commit)
+ elif args.commit_number:
+ index1 = gitarchive.rev_find(revs, 'commit_number', args.commit_number)
+ else:
+ index1 = len(revs) - 1
+
+ if args.branch2:
+ revs2.append(revs[index1])
+ index1 = len(revs2) - 1
+ revs = revs2
+
+ if args.commit2:
+ if args.commit_number2:
+ logger.warning("Ignoring --commit-number2 as --commit2 was specified")
+ index2 = gitarchive.rev_find(revs, 'commit', args.commit2)
+ elif args.commit_number2:
+ index2 = gitarchive.rev_find(revs, 'commit_number', args.commit_number2)
+ else:
+ if index1 > 0:
+ index2 = index1 - 1
+ # Find the closest matching commit number for comparision
+ # In future we could check the commit is a common ancestor and
+ # continue back if not but this good enough for now
+ while index2 > 0 and revs[index2].commit_number > revs[index1].commit_number:
+ index2 = index2 - 1
+ else:
+ logger.error("Unable to determine the other commit, use "
+ "--commit2 or --commit-number2 to specify it")
+ return 1
+
+ logger.info("Comparing:\n%s\nto\n%s\n" % (revs[index1], revs[index2]))
+
+ base_results = resultutils.git_get_result(repo, revs[index1][2])
+ target_results = resultutils.git_get_result(repo, revs[index2][2])
+
+ regression_common(args, logger, base_results, target_results)
+
+ return 0
+
+def register_commands(subparsers):
+ """Register subcommands from this plugin"""
+
+ parser_build = subparsers.add_parser('regression', help='regression file/directory analysis',
+ description='regression analysis comparing the base set of results to the target results',
+ group='analysis')
+ parser_build.set_defaults(func=regression)
+ parser_build.add_argument('base_result',
+ help='base result file/directory/URL for the comparison')
+ parser_build.add_argument('target_result',
+ help='target result file/directory/URL to compare with')
+ parser_build.add_argument('-b', '--base-result-id', default='',
+ help='(optional) filter the base results to this result ID')
+ parser_build.add_argument('-t', '--target-result-id', default='',
+ help='(optional) filter the target results to this result ID')
+
+ parser_build = subparsers.add_parser('regression-git', help='regression git analysis',
+ description='regression analysis comparing base result set to target '
+ 'result set',
+ group='analysis')
+ parser_build.set_defaults(func=regression_git)
+ parser_build.add_argument('repo',
+ help='the git repository containing the data')
+ parser_build.add_argument('-b', '--base-result-id', default='',
+ help='(optional) default select regression based on configurations unless base result '
+ 'id was provided')
+ parser_build.add_argument('-t', '--target-result-id', default='',
+ help='(optional) default select regression based on configurations unless target result '
+ 'id was provided')
+
+ parser_build.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
+ parser_build.add_argument('--branch2', help="Branch to find comparision revisions in")
+ parser_build.add_argument('--commit', help="Revision to search for")
+ parser_build.add_argument('--commit-number', help="Revision number to search for, redundant if --commit is specified")
+ parser_build.add_argument('--commit2', help="Revision to compare with")
+ parser_build.add_argument('--commit-number2', help="Revision number to compare with, redundant if --commit2 is specified")
+
diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py
new file mode 100644
index 0000000000..692dd7a851
--- /dev/null
+++ b/scripts/lib/resulttool/report.py
@@ -0,0 +1,290 @@
+# test result tool - report text based test results
+#
+# Copyright (c) 2019, Intel Corporation.
+# Copyright (c) 2019, Linux Foundation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os
+import glob
+import json
+import resulttool.resultutils as resultutils
+from oeqa.utils.git import GitRepo
+import oeqa.utils.gitarchive as gitarchive
+
+
+class ResultsTextReport(object):
+ def __init__(self):
+ self.ptests = {}
+ self.ltptests = {}
+ self.ltpposixtests = {}
+ self.result_types = {'passed': ['PASSED', 'passed', 'PASS', 'XFAIL'],
+ 'failed': ['FAILED', 'failed', 'FAIL', 'ERROR', 'error', 'UNKNOWN', 'XPASS'],
+ 'skipped': ['SKIPPED', 'skipped', 'UNSUPPORTED', 'UNTESTED', 'UNRESOLVED']}
+
+
+ def handle_ptest_result(self, k, status, result, machine):
+ if machine not in self.ptests:
+ self.ptests[machine] = {}
+
+ if k == 'ptestresult.sections':
+ # Ensure tests without any test results still show up on the report
+ for suite in result['ptestresult.sections']:
+ if suite not in self.ptests[machine]:
+ self.ptests[machine][suite] = {
+ 'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-',
+ 'failed_testcases': [], "testcases": set(),
+ }
+ if 'duration' in result['ptestresult.sections'][suite]:
+ self.ptests[machine][suite]['duration'] = result['ptestresult.sections'][suite]['duration']
+ if 'timeout' in result['ptestresult.sections'][suite]:
+ self.ptests[machine][suite]['duration'] += " T"
+ return True
+
+ # process test result
+ try:
+ _, suite, test = k.split(".", 2)
+ except ValueError:
+ return True
+
+ # Handle 'glib-2.0'
+ if 'ptestresult.sections' in result and suite not in result['ptestresult.sections']:
+ try:
+ _, suite, suite1, test = k.split(".", 3)
+ if suite + "." + suite1 in result['ptestresult.sections']:
+ suite = suite + "." + suite1
+ except ValueError:
+ pass
+
+ if suite not in self.ptests[machine]:
+ self.ptests[machine][suite] = {
+ 'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-',
+ 'failed_testcases': [], "testcases": set(),
+ }
+
+ # do not process duplicate results
+ if test in self.ptests[machine][suite]["testcases"]:
+ print("Warning duplicate ptest result '{}.{}' for {}".format(suite, test, machine))
+ return False
+
+ for tk in self.result_types:
+ if status in self.result_types[tk]:
+ self.ptests[machine][suite][tk] += 1
+ self.ptests[machine][suite]["testcases"].add(test)
+ return True
+
+ def handle_ltptest_result(self, k, status, result, machine):
+ if machine not in self.ltptests:
+ self.ltptests[machine] = {}
+
+ if k == 'ltpresult.sections':
+ # Ensure tests without any test results still show up on the report
+ for suite in result['ltpresult.sections']:
+ if suite not in self.ltptests[machine]:
+ self.ltptests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+ if 'duration' in result['ltpresult.sections'][suite]:
+ self.ltptests[machine][suite]['duration'] = result['ltpresult.sections'][suite]['duration']
+ if 'timeout' in result['ltpresult.sections'][suite]:
+ self.ltptests[machine][suite]['duration'] += " T"
+ return
+ try:
+ _, suite, test = k.split(".", 2)
+ except ValueError:
+ return
+ # Handle 'glib-2.0'
+ if 'ltpresult.sections' in result and suite not in result['ltpresult.sections']:
+ try:
+ _, suite, suite1, test = k.split(".", 3)
+ print("split2: %s %s %s" % (suite, suite1, test))
+ if suite + "." + suite1 in result['ltpresult.sections']:
+ suite = suite + "." + suite1
+ except ValueError:
+ pass
+ if suite not in self.ltptests[machine]:
+ self.ltptests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+ for tk in self.result_types:
+ if status in self.result_types[tk]:
+ self.ltptests[machine][suite][tk] += 1
+
+ def handle_ltpposixtest_result(self, k, status, result, machine):
+ if machine not in self.ltpposixtests:
+ self.ltpposixtests[machine] = {}
+
+ if k == 'ltpposixresult.sections':
+ # Ensure tests without any test results still show up on the report
+ for suite in result['ltpposixresult.sections']:
+ if suite not in self.ltpposixtests[machine]:
+ self.ltpposixtests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+ if 'duration' in result['ltpposixresult.sections'][suite]:
+ self.ltpposixtests[machine][suite]['duration'] = result['ltpposixresult.sections'][suite]['duration']
+ return
+ try:
+ _, suite, test = k.split(".", 2)
+ except ValueError:
+ return
+ # Handle 'glib-2.0'
+ if 'ltpposixresult.sections' in result and suite not in result['ltpposixresult.sections']:
+ try:
+ _, suite, suite1, test = k.split(".", 3)
+ if suite + "." + suite1 in result['ltpposixresult.sections']:
+ suite = suite + "." + suite1
+ except ValueError:
+ pass
+ if suite not in self.ltpposixtests[machine]:
+ self.ltpposixtests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+ for tk in self.result_types:
+ if status in self.result_types[tk]:
+ self.ltpposixtests[machine][suite][tk] += 1
+
+ def get_aggregated_test_result(self, logger, testresult, machine):
+ test_count_report = {'passed': 0, 'failed': 0, 'skipped': 0, 'failed_testcases': []}
+ result = testresult.get('result', [])
+ for k in result:
+ test_status = result[k].get('status', [])
+ if k.startswith("ptestresult."):
+ if not self.handle_ptest_result(k, test_status, result, machine):
+ continue
+ elif k.startswith("ltpresult."):
+ self.handle_ltptest_result(k, test_status, result, machine)
+ elif k.startswith("ltpposixresult."):
+ self.handle_ltpposixtest_result(k, test_status, result, machine)
+
+ # process result if it was not skipped by a handler
+ for tk in self.result_types:
+ if test_status in self.result_types[tk]:
+ test_count_report[tk] += 1
+ if test_status in self.result_types['failed']:
+ test_count_report['failed_testcases'].append(k)
+ return test_count_report
+
+ def print_test_report(self, template_file_name, test_count_reports):
+ from jinja2 import Environment, FileSystemLoader
+ script_path = os.path.dirname(os.path.realpath(__file__))
+ file_loader = FileSystemLoader(script_path + '/template')
+ env = Environment(loader=file_loader, trim_blocks=True)
+ template = env.get_template(template_file_name)
+ havefailed = False
+ reportvalues = []
+ machines = []
+ cols = ['passed', 'failed', 'skipped']
+ maxlen = {'passed' : 0, 'failed' : 0, 'skipped' : 0, 'result_id': 0, 'testseries' : 0, 'ptest' : 0 ,'ltptest': 0, 'ltpposixtest': 0}
+ for line in test_count_reports:
+ total_tested = line['passed'] + line['failed'] + line['skipped']
+ vals = {}
+ vals['result_id'] = line['result_id']
+ vals['testseries'] = line['testseries']
+ vals['sort'] = line['testseries'] + "_" + line['result_id']
+ vals['failed_testcases'] = line['failed_testcases']
+ for k in cols:
+ vals[k] = "%d (%s%%)" % (line[k], format(line[k] / total_tested * 100, '.0f'))
+ for k in maxlen:
+ if k in vals and len(vals[k]) > maxlen[k]:
+ maxlen[k] = len(vals[k])
+ reportvalues.append(vals)
+ if line['failed_testcases']:
+ havefailed = True
+ if line['machine'] not in machines:
+ machines.append(line['machine'])
+ reporttotalvalues = {}
+ for k in cols:
+ reporttotalvalues[k] = '%s' % sum([line[k] for line in test_count_reports])
+ reporttotalvalues['count'] = '%s' % len(test_count_reports)
+ for (machine, report) in self.ptests.items():
+ for ptest in self.ptests[machine]:
+ if len(ptest) > maxlen['ptest']:
+ maxlen['ptest'] = len(ptest)
+ for (machine, report) in self.ltptests.items():
+ for ltptest in self.ltptests[machine]:
+ if len(ltptest) > maxlen['ltptest']:
+ maxlen['ltptest'] = len(ltptest)
+ for (machine, report) in self.ltpposixtests.items():
+ for ltpposixtest in self.ltpposixtests[machine]:
+ if len(ltpposixtest) > maxlen['ltpposixtest']:
+ maxlen['ltpposixtest'] = len(ltpposixtest)
+ output = template.render(reportvalues=reportvalues,
+ reporttotalvalues=reporttotalvalues,
+ havefailed=havefailed,
+ machines=machines,
+ ptests=self.ptests,
+ ltptests=self.ltptests,
+ ltpposixtests=self.ltpposixtests,
+ maxlen=maxlen)
+ print(output)
+
+ def view_test_report(self, logger, source_dir, branch, commit, tag, use_regression_map, raw_test):
+ test_count_reports = []
+ configmap = resultutils.store_map
+ if use_regression_map:
+ configmap = resultutils.regression_map
+ if commit:
+ if tag:
+ logger.warning("Ignoring --tag as --commit was specified")
+ tag_name = "{branch}/{commit_number}-g{commit}/{tag_number}"
+ repo = GitRepo(source_dir)
+ revs = gitarchive.get_test_revs(logger, repo, tag_name, branch=branch)
+ rev_index = gitarchive.rev_find(revs, 'commit', commit)
+ testresults = resultutils.git_get_result(repo, revs[rev_index][2], configmap=configmap)
+ elif tag:
+ repo = GitRepo(source_dir)
+ testresults = resultutils.git_get_result(repo, [tag], configmap=configmap)
+ else:
+ testresults = resultutils.load_resultsdata(source_dir, configmap=configmap)
+ if raw_test:
+ raw_results = {}
+ for testsuite in testresults:
+ result = testresults[testsuite].get(raw_test, {})
+ if result:
+ raw_results[testsuite] = result
+ if raw_results:
+ print(json.dumps(raw_results, sort_keys=True, indent=4))
+ else:
+ print('Could not find raw test result for %s' % raw_test)
+ return 0
+ for testsuite in testresults:
+ for resultid in testresults[testsuite]:
+ skip = False
+ result = testresults[testsuite][resultid]
+ machine = result['configuration']['MACHINE']
+
+ # Check to see if there is already results for these kinds of tests for the machine
+ for key in result['result'].keys():
+ testtype = str(key).split('.')[0]
+ if ((machine in self.ltptests and testtype == "ltpiresult" and self.ltptests[machine]) or
+ (machine in self.ltpposixtests and testtype == "ltpposixresult" and self.ltpposixtests[machine])):
+ print("Already have test results for %s on %s, skipping %s" %(str(key).split('.')[0], machine, resultid))
+ skip = True
+ break
+ if skip:
+ break
+
+ test_count_report = self.get_aggregated_test_result(logger, result, machine)
+ test_count_report['machine'] = machine
+ test_count_report['testseries'] = result['configuration']['TESTSERIES']
+ test_count_report['result_id'] = resultid
+ test_count_reports.append(test_count_report)
+ self.print_test_report('test_report_full_text.txt', test_count_reports)
+
+def report(args, logger):
+ report = ResultsTextReport()
+ report.view_test_report(logger, args.source_dir, args.branch, args.commit, args.tag, args.use_regression_map,
+ args.raw_test_only)
+ return 0
+
+def register_commands(subparsers):
+ """Register subcommands from this plugin"""
+ parser_build = subparsers.add_parser('report', help='summarise test results',
+ description='print a text-based summary of the test results',
+ group='analysis')
+ parser_build.set_defaults(func=report)
+ parser_build.add_argument('source_dir',
+ help='source file/directory/URL that contain the test result files to summarise')
+ parser_build.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
+ parser_build.add_argument('--commit', help="Revision to report")
+ parser_build.add_argument('-t', '--tag', default='',
+ help='source_dir is a git repository, report on the tag specified from that repository')
+ parser_build.add_argument('-m', '--use_regression_map', action='store_true',
+ help='instead of the default "store_map", use the "regression_map" for report')
+ parser_build.add_argument('-r', '--raw_test_only', default='',
+ help='output raw test result only for the user provided test result id')
+
diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py
new file mode 100644
index 0000000000..f0ae8ec1c5
--- /dev/null
+++ b/scripts/lib/resulttool/resultutils.py
@@ -0,0 +1,221 @@
+# resulttool - common library/utility functions
+#
+# Copyright (c) 2019, Intel Corporation.
+# Copyright (c) 2019, Linux Foundation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os
+import base64
+import zlib
+import json
+import scriptpath
+import copy
+import urllib.request
+import posixpath
+scriptpath.add_oe_lib_path()
+
+flatten_map = {
+ "oeselftest": [],
+ "runtime": [],
+ "sdk": [],
+ "sdkext": [],
+ "manual": []
+}
+regression_map = {
+ "oeselftest": ['TEST_TYPE', 'MACHINE'],
+ "runtime": ['TESTSERIES', 'TEST_TYPE', 'IMAGE_BASENAME', 'MACHINE', 'IMAGE_PKGTYPE', 'DISTRO'],
+ "sdk": ['TESTSERIES', 'TEST_TYPE', 'IMAGE_BASENAME', 'MACHINE', 'SDKMACHINE'],
+ "sdkext": ['TESTSERIES', 'TEST_TYPE', 'IMAGE_BASENAME', 'MACHINE', 'SDKMACHINE'],
+ "manual": ['TEST_TYPE', 'TEST_MODULE', 'IMAGE_BASENAME', 'MACHINE']
+}
+store_map = {
+ "oeselftest": ['TEST_TYPE'],
+ "runtime": ['TEST_TYPE', 'DISTRO', 'MACHINE', 'IMAGE_BASENAME'],
+ "sdk": ['TEST_TYPE', 'MACHINE', 'SDKMACHINE', 'IMAGE_BASENAME'],
+ "sdkext": ['TEST_TYPE', 'MACHINE', 'SDKMACHINE', 'IMAGE_BASENAME'],
+ "manual": ['TEST_TYPE', 'TEST_MODULE', 'MACHINE', 'IMAGE_BASENAME']
+}
+
+def is_url(p):
+ """
+ Helper for determining if the given path is a URL
+ """
+ return p.startswith('http://') or p.startswith('https://')
+
+extra_configvars = {'TESTSERIES': ''}
+
+#
+# Load the json file and append the results data into the provided results dict
+#
+def append_resultsdata(results, f, configmap=store_map, configvars=extra_configvars):
+ if type(f) is str:
+ if is_url(f):
+ with urllib.request.urlopen(f) as response:
+ data = json.loads(response.read().decode('utf-8'))
+ url = urllib.parse.urlparse(f)
+ testseries = posixpath.basename(posixpath.dirname(url.path))
+ else:
+ with open(f, "r") as filedata:
+ data = json.load(filedata)
+ testseries = os.path.basename(os.path.dirname(f))
+ else:
+ data = f
+ for res in data:
+ if "configuration" not in data[res] or "result" not in data[res]:
+ raise ValueError("Test results data without configuration or result section?")
+ for config in configvars:
+ if config == "TESTSERIES" and "TESTSERIES" not in data[res]["configuration"]:
+ data[res]["configuration"]["TESTSERIES"] = testseries
+ continue
+ if config not in data[res]["configuration"]:
+ data[res]["configuration"][config] = configvars[config]
+ testtype = data[res]["configuration"].get("TEST_TYPE")
+ if testtype not in configmap:
+ raise ValueError("Unknown test type %s" % testtype)
+ testpath = "/".join(data[res]["configuration"].get(i) for i in configmap[testtype])
+ if testpath not in results:
+ results[testpath] = {}
+ results[testpath][res] = data[res]
+
+#
+# Walk a directory and find/load results data
+# or load directly from a file
+#
+def load_resultsdata(source, configmap=store_map, configvars=extra_configvars):
+ results = {}
+ if is_url(source) or os.path.isfile(source):
+ append_resultsdata(results, source, configmap, configvars)
+ return results
+ for root, dirs, files in os.walk(source):
+ for name in files:
+ f = os.path.join(root, name)
+ if name == "testresults.json":
+ append_resultsdata(results, f, configmap, configvars)
+ return results
+
+def filter_resultsdata(results, resultid):
+ newresults = {}
+ for r in results:
+ for i in results[r]:
+ if i == resultsid:
+ newresults[r] = {}
+ newresults[r][i] = results[r][i]
+ return newresults
+
+def strip_ptestresults(results):
+ newresults = copy.deepcopy(results)
+ #for a in newresults2:
+ # newresults = newresults2[a]
+ for res in newresults:
+ if 'result' not in newresults[res]:
+ continue
+ if 'ptestresult.rawlogs' in newresults[res]['result']:
+ del newresults[res]['result']['ptestresult.rawlogs']
+ if 'ptestresult.sections' in newresults[res]['result']:
+ for i in newresults[res]['result']['ptestresult.sections']:
+ if 'log' in newresults[res]['result']['ptestresult.sections'][i]:
+ del newresults[res]['result']['ptestresult.sections'][i]['log']
+ return newresults
+
+def decode_log(logdata):
+ if isinstance(logdata, str):
+ return logdata
+ elif isinstance(logdata, dict):
+ if "compressed" in logdata:
+ data = logdata.get("compressed")
+ data = base64.b64decode(data.encode("utf-8"))
+ data = zlib.decompress(data)
+ try:
+ return data.decode("utf-8")
+ except UnicodeDecodeError:
+ return data
+ return None
+
+def ptestresult_get_log(results, section):
+ if 'ptestresult.sections' not in results:
+ return None
+ if section not in results['ptestresult.sections']:
+ return None
+
+ ptest = results['ptestresult.sections'][section]
+ if 'log' not in ptest:
+ return None
+ return decode_log(ptest['log'])
+
+def ptestresult_get_rawlogs(results):
+ if 'ptestresult.rawlogs' not in results:
+ return None
+ if 'log' not in results['ptestresult.rawlogs']:
+ return None
+ return decode_log(results['ptestresult.rawlogs']['log'])
+
+def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, ptestlogs=False):
+ for res in results:
+ if res:
+ dst = destdir + "/" + res + "/" + fn
+ else:
+ dst = destdir + "/" + fn
+ os.makedirs(os.path.dirname(dst), exist_ok=True)
+ resultsout = results[res]
+ if not ptestjson:
+ resultsout = strip_ptestresults(results[res])
+ with open(dst, 'w') as f:
+ f.write(json.dumps(resultsout, sort_keys=True, indent=4))
+ for res2 in results[res]:
+ if ptestlogs and 'result' in results[res][res2]:
+ seriesresults = results[res][res2]['result']
+ rawlogs = ptestresult_get_rawlogs(seriesresults)
+ if rawlogs is not None:
+ with open(dst.replace(fn, "ptest-raw.log"), "w+") as f:
+ f.write(rawlogs)
+ if 'ptestresult.sections' in seriesresults:
+ for i in seriesresults['ptestresult.sections']:
+ sectionlog = ptestresult_get_log(seriesresults, i)
+ if sectionlog is not None:
+ with open(dst.replace(fn, "ptest-%s.log" % i), "w+") as f:
+ f.write(sectionlog)
+
+def git_get_result(repo, tags, configmap=store_map):
+ git_objs = []
+ for tag in tags:
+ files = repo.run_cmd(['ls-tree', "--name-only", "-r", tag]).splitlines()
+ git_objs.extend([tag + ':' + f for f in files if f.endswith("testresults.json")])
+
+ def parse_json_stream(data):
+ """Parse multiple concatenated JSON objects"""
+ objs = []
+ json_d = ""
+ for line in data.splitlines():
+ if line == '}{':
+ json_d += '}'
+ objs.append(json.loads(json_d))
+ json_d = '{'
+ else:
+ json_d += line
+ objs.append(json.loads(json_d))
+ return objs
+
+ # Optimize by reading all data with one git command
+ results = {}
+ for obj in parse_json_stream(repo.run_cmd(['show'] + git_objs + ['--'])):
+ append_resultsdata(results, obj, configmap=configmap)
+
+ return results
+
+def test_run_results(results):
+ """
+ Convenient generator function that iterates over all test runs that have a
+ result section.
+
+ Generates a tuple of:
+ (result json file path, test run name, test run (dict), test run "results" (dict))
+ for each test run that has a "result" section
+ """
+ for path in results:
+ for run_name, test_run in results[path].items():
+ if not 'result' in test_run:
+ continue
+ yield path, run_name, test_run, test_run['result']
+
diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py
new file mode 100644
index 0000000000..e0951f0a8f
--- /dev/null
+++ b/scripts/lib/resulttool/store.py
@@ -0,0 +1,104 @@
+# resulttool - store test results
+#
+# Copyright (c) 2019, Intel Corporation.
+# Copyright (c) 2019, Linux Foundation
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import tempfile
+import os
+import subprocess
+import json
+import shutil
+import scriptpath
+scriptpath.add_bitbake_lib_path()
+scriptpath.add_oe_lib_path()
+import resulttool.resultutils as resultutils
+import oeqa.utils.gitarchive as gitarchive
+
+
+def store(args, logger):
+ tempdir = tempfile.mkdtemp(prefix='testresults.')
+ try:
+ configvars = resultutils.extra_configvars.copy()
+ if args.executed_by:
+ configvars['EXECUTED_BY'] = args.executed_by
+ if args.extra_test_env:
+ configvars['EXTRA_TEST_ENV'] = args.extra_test_env
+ results = {}
+ logger.info('Reading files from %s' % args.source)
+ if resultutils.is_url(args.source) or os.path.isfile(args.source):
+ resultutils.append_resultsdata(results, args.source, configvars=configvars)
+ else:
+ for root, dirs, files in os.walk(args.source):
+ for name in files:
+ f = os.path.join(root, name)
+ if name == "testresults.json":
+ resultutils.append_resultsdata(results, f, configvars=configvars)
+ elif args.all:
+ dst = f.replace(args.source, tempdir + "/")
+ os.makedirs(os.path.dirname(dst), exist_ok=True)
+ shutil.copyfile(f, dst)
+
+ revisions = {}
+
+ if not results and not args.all:
+ if args.allow_empty:
+ logger.info("No results found to store")
+ return 0
+ logger.error("No results found to store")
+ return 1
+
+ # Find the branch/commit/commit_count and ensure they all match
+ for suite in results:
+ for result in results[suite]:
+ config = results[suite][result]['configuration']['LAYERS']['meta']
+ revision = (config['commit'], config['branch'], str(config['commit_count']))
+ if revision not in revisions:
+ revisions[revision] = {}
+ if suite not in revisions[revision]:
+ revisions[revision][suite] = {}
+ revisions[revision][suite][result] = results[suite][result]
+
+ logger.info("Found %d revisions to store" % len(revisions))
+
+ for r in revisions:
+ results = revisions[r]
+ keywords = {'commit': r[0], 'branch': r[1], "commit_count": r[2]}
+ subprocess.check_call(["find", tempdir, "!", "-path", "./.git/*", "-delete"])
+ resultutils.save_resultsdata(results, tempdir, ptestlogs=True)
+
+ logger.info('Storing test result into git repository %s' % args.git_dir)
+
+ gitarchive.gitarchive(tempdir, args.git_dir, False, False,
+ "Results of {branch}:{commit}", "branch: {branch}\ncommit: {commit}", "{branch}",
+ False, "{branch}/{commit_count}-g{commit}/{tag_number}",
+ 'Test run #{tag_number} of {branch}:{commit}', '',
+ [], [], False, keywords, logger)
+
+ finally:
+ subprocess.check_call(["rm", "-rf", tempdir])
+
+ return 0
+
+def register_commands(subparsers):
+ """Register subcommands from this plugin"""
+ parser_build = subparsers.add_parser('store', help='store test results into a git repository',
+ description='takes a results file or directory of results files and stores '
+ 'them into the destination git repository, splitting out the results '
+ 'files as configured',
+ group='setup')
+ parser_build.set_defaults(func=store)
+ parser_build.add_argument('source',
+ help='source file/directory/URL that contain the test result files to be stored')
+ parser_build.add_argument('git_dir',
+ help='the location of the git repository to store the results in')
+ parser_build.add_argument('-a', '--all', action='store_true',
+ help='include all files, not just testresults.json files')
+ parser_build.add_argument('-e', '--allow-empty', action='store_true',
+ help='don\'t error if no results to store are found')
+ parser_build.add_argument('-x', '--executed-by', default='',
+ help='add executed-by configuration to each result file')
+ parser_build.add_argument('-t', '--extra-test-env', default='',
+ help='add extra test environment data to each result file configuration')
diff --git a/scripts/lib/resulttool/template/test_report_full_text.txt b/scripts/lib/resulttool/template/test_report_full_text.txt
new file mode 100644
index 0000000000..2efba2ef6f
--- /dev/null
+++ b/scripts/lib/resulttool/template/test_report_full_text.txt
@@ -0,0 +1,79 @@
+==============================================================================================================
+Test Result Status Summary (Counts/Percentages sorted by testseries, ID)
+==============================================================================================================
+--------------------------------------------------------------------------------------------------------------
+{{ 'Test Series'.ljust(maxlen['testseries']) }} | {{ 'ID'.ljust(maxlen['result_id']) }} | {{ 'Passed'.ljust(maxlen['passed']) }} | {{ 'Failed'.ljust(maxlen['failed']) }} | {{ 'Skipped'.ljust(maxlen['skipped']) }}
+--------------------------------------------------------------------------------------------------------------
+{% for report in reportvalues |sort(attribute='sort') %}
+{{ report.testseries.ljust(maxlen['testseries']) }} | {{ report.result_id.ljust(maxlen['result_id']) }} | {{ (report.passed|string).ljust(maxlen['passed']) }} | {{ (report.failed|string).ljust(maxlen['failed']) }} | {{ (report.skipped|string).ljust(maxlen['skipped']) }}
+{% endfor %}
+--------------------------------------------------------------------------------------------------------------
+{{ 'Total'.ljust(maxlen['testseries']) }} | {{ reporttotalvalues['count'].ljust(maxlen['result_id']) }} | {{ reporttotalvalues['passed'].ljust(maxlen['passed']) }} | {{ reporttotalvalues['failed'].ljust(maxlen['failed']) }} | {{ reporttotalvalues['skipped'].ljust(maxlen['skipped']) }}
+--------------------------------------------------------------------------------------------------------------
+
+{% for machine in machines %}
+{% if ptests[machine] %}
+==============================================================================================================
+{{ machine }} PTest Result Summary
+==============================================================================================================
+--------------------------------------------------------------------------------------------------------------
+{{ 'Recipe'.ljust(maxlen['ptest']) }} | {{ 'Passed'.ljust(maxlen['passed']) }} | {{ 'Failed'.ljust(maxlen['failed']) }} | {{ 'Skipped'.ljust(maxlen['skipped']) }} | {{ 'Time(s)'.ljust(10) }}
+--------------------------------------------------------------------------------------------------------------
+{% for ptest in ptests[machine] |sort %}
+{{ ptest.ljust(maxlen['ptest']) }} | {{ (ptests[machine][ptest]['passed']|string).ljust(maxlen['passed']) }} | {{ (ptests[machine][ptest]['failed']|string).ljust(maxlen['failed']) }} | {{ (ptests[machine][ptest]['skipped']|string).ljust(maxlen['skipped']) }} | {{ (ptests[machine][ptest]['duration']|string) }}
+{% endfor %}
+--------------------------------------------------------------------------------------------------------------
+
+{% endif %}
+{% endfor %}
+
+{% for machine in machines %}
+{% if ltptests[machine] %}
+==============================================================================================================
+{{ machine }} Ltp Test Result Summary
+==============================================================================================================
+--------------------------------------------------------------------------------------------------------------
+{{ 'Recipe'.ljust(maxlen['ltptest']) }} | {{ 'Passed'.ljust(maxlen['passed']) }} | {{ 'Failed'.ljust(maxlen['failed']) }} | {{ 'Skipped'.ljust(maxlen['skipped']) }} | {{ 'Time(s)'.ljust(10) }}
+--------------------------------------------------------------------------------------------------------------
+{% for ltptest in ltptests[machine] |sort %}
+{{ ltptest.ljust(maxlen['ltptest']) }} | {{ (ltptests[machine][ltptest]['passed']|string).ljust(maxlen['passed']) }} | {{ (ltptests[machine][ltptest]['failed']|string).ljust(maxlen['failed']) }} | {{ (ltptests[machine][ltptest]['skipped']|string).ljust(maxlen['skipped']) }} | {{ (ltptests[machine][ltptest]['duration']|string) }}
+{% endfor %}
+--------------------------------------------------------------------------------------------------------------
+
+{% endif %}
+{% endfor %}
+
+{% for machine in machines %}
+{% if ltpposixtests[machine] %}
+==============================================================================================================
+{{ machine }} Ltp Posix Result Summary
+==============================================================================================================
+--------------------------------------------------------------------------------------------------------------
+{{ 'Recipe'.ljust(maxlen['ltpposixtest']) }} | {{ 'Passed'.ljust(maxlen['passed']) }} | {{ 'Failed'.ljust(maxlen['failed']) }} | {{ 'Skipped'.ljust(maxlen['skipped']) }} | {{ 'Time(s)'.ljust(10) }}
+--------------------------------------------------------------------------------------------------------------
+{% for ltpposixtest in ltpposixtests[machine] |sort %}
+{{ ltpposixtest.ljust(maxlen['ltpposixtest']) }} | {{ (ltpposixtests[machine][ltpposixtest]['passed']|string).ljust(maxlen['passed']) }} | {{ (ltpposixtests[machine][ltpposixtest]['failed']|string).ljust(maxlen['failed']) }} | {{ (ltpposixtests[machine][ltpposixtest]['skipped']|string).ljust(maxlen['skipped']) }} | {{ (ltpposixtests[machine][ltpposixtest]['duration']|string) }}
+{% endfor %}
+--------------------------------------------------------------------------------------------------------------
+
+{% endif %}
+{% endfor %}
+
+
+==============================================================================================================
+Failed test cases (sorted by testseries, ID)
+==============================================================================================================
+{% if havefailed %}
+--------------------------------------------------------------------------------------------------------------
+{% for report in reportvalues |sort(attribute='sort') %}
+{% if report.failed_testcases %}
+testseries | result_id : {{ report.testseries }} | {{ report.result_id }}
+{% for testcase in report.failed_testcases %}
+ {{ testcase }}
+{% endfor %}
+{% endif %}
+{% endfor %}
+--------------------------------------------------------------------------------------------------------------
+{% else %}
+There were no test failures
+{% endif %}
diff --git a/scripts/lib/scriptpath.py b/scripts/lib/scriptpath.py
index d00317e18d..f32326db3a 100644
--- a/scripts/lib/scriptpath.py
+++ b/scripts/lib/scriptpath.py
@@ -3,18 +3,8 @@
# Copyright (C) 2012-2014 Intel Corporation
# Copyright (C) 2011 Mentor Graphics Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
import os
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index 5ccc027968..f92255d8dc 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -2,29 +2,65 @@
#
# Copyright (C) 2014 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
-import os
-import logging
-import glob
import argparse
+import glob
+import logging
+import os
+import random
+import shlex
+import shutil
+import string
import subprocess
+import sys
+import tempfile
+import threading
+import importlib
+from importlib import machinery
+
+class KeepAliveStreamHandler(logging.StreamHandler):
+ def __init__(self, keepalive=True, **kwargs):
+ super().__init__(**kwargs)
+ if keepalive is True:
+ keepalive = 5000 # default timeout
+ self._timeout = threading.Condition()
+ self._stop = False
+
+ # background thread waits on condition, if the condition does not
+ # happen emit a keep alive message
+ def thread():
+ while not self._stop:
+ with self._timeout:
+ if not self._timeout.wait(keepalive):
+ self.emit(logging.LogRecord("keepalive", logging.INFO,
+ None, None, "Keepalive message", None, None))
-def logger_create(name):
+ self._thread = threading.Thread(target = thread, daemon = True)
+ self._thread.start()
+
+ def close(self):
+ # mark the thread to stop and notify it
+ self._stop = True
+ with self._timeout:
+ self._timeout.notify()
+ # wait for it to join
+ self._thread.join()
+ super().close()
+
+ def emit(self, record):
+ super().emit(record)
+ # trigger timer reset
+ with self._timeout:
+ self._timeout.notify()
+
+def logger_create(name, stream=None, keepalive=None):
logger = logging.getLogger(name)
- loggerhandler = logging.StreamHandler()
+ if keepalive is not None:
+ loggerhandler = KeepAliveStreamHandler(stream=stream, keepalive=keepalive)
+ else:
+ loggerhandler = logging.StreamHandler(stream=stream)
loggerhandler.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
logger.addHandler(loggerhandler)
logger.setLevel(logging.INFO)
@@ -32,35 +68,36 @@ def logger_create(name):
def logger_setup_color(logger, color='auto'):
from bb.msg import BBLogFormatter
- console = logging.StreamHandler(sys.stdout)
- formatter = BBLogFormatter("%(levelname)s: %(message)s")
- console.setFormatter(formatter)
- logger.handlers = [console]
- if color == 'always' or (color=='auto' and console.stream.isatty()):
- formatter.enable_color()
+
+ for handler in logger.handlers:
+ if (isinstance(handler, logging.StreamHandler) and
+ isinstance(handler.formatter, BBLogFormatter)):
+ if color == 'always' or (color == 'auto' and handler.stream.isatty()):
+ handler.formatter.enable_color()
def load_plugins(logger, plugins, pluginpath):
- import imp
def load_plugin(name):
logger.debug('Loading plugin %s' % name)
- fp, pathname, description = imp.find_module(name, [pluginpath])
- try:
- return imp.load_module(name, fp, pathname, description)
- finally:
- if fp:
- fp.close()
+ spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] )
+ if spec:
+ return spec.loader.load_module()
+
+ def plugin_name(filename):
+ return os.path.splitext(os.path.basename(filename))[0]
+ known_plugins = [plugin_name(p.__name__) for p in plugins]
logger.debug('Loading plugins from %s...' % pluginpath)
for fn in glob.glob(os.path.join(pluginpath, '*.py')):
- name = os.path.splitext(os.path.basename(fn))[0]
- if name != '__init__':
+ name = plugin_name(fn)
+ if name != '__init__' and name not in known_plugins:
plugin = load_plugin(name)
if hasattr(plugin, 'plugin_init'):
plugin.plugin_init(plugins)
plugins.append(plugin)
+
def git_convert_standalone_clone(repodir):
"""If specified directory is a git repository, ensure it's a standalone clone"""
import bb.process
@@ -72,49 +109,150 @@ def git_convert_standalone_clone(repodir):
bb.process.run('git repack -a', cwd=repodir)
os.remove(alternatesfile)
-def fetch_uri(d, uri, destdir, srcrev=None):
- """Fetch a URI to a local directory"""
- import bb.data
- bb.utils.mkdirhier(destdir)
- localdata = bb.data.createCopy(d)
- localdata.setVar('BB_STRICT_CHECKSUM', '')
- localdata.setVar('SRCREV', srcrev)
- ret = (None, None)
- olddir = os.getcwd()
+def _get_temp_recipe_dir(d):
+ # This is a little bit hacky but we need to find a place where we can put
+ # the recipe so that bitbake can find it. We're going to delete it at the
+ # end so it doesn't really matter where we put it.
+ bbfiles = d.getVar('BBFILES').split()
+ fetchrecipedir = None
+ for pth in bbfiles:
+ if pth.endswith('.bb'):
+ pthdir = os.path.dirname(pth)
+ if os.access(os.path.dirname(os.path.dirname(pthdir)), os.W_OK):
+ fetchrecipedir = pthdir.replace('*', 'recipetool')
+ if pthdir.endswith('workspace/recipes/*'):
+ # Prefer the workspace
+ break
+ return fetchrecipedir
+
+class FetchUrlFailure(Exception):
+ def __init__(self, url):
+ self.url = url
+ def __str__(self):
+ return "Failed to fetch URL %s" % self.url
+
+def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirrors=False):
+ """
+ Fetch the specified URL using normal do_fetch and do_unpack tasks, i.e.
+ any dependencies that need to be satisfied in order to support the fetch
+ operation will be taken care of
+ """
+
+ import bb
+
+ checksums = {}
+ fetchrecipepn = None
+
+ # We need to put our temp directory under ${BASE_WORKDIR} otherwise
+ # we may have problems with the recipe-specific sysroot population
+ tmpparent = tinfoil.config_data.getVar('BASE_WORKDIR')
+ bb.utils.mkdirhier(tmpparent)
+ tmpdir = tempfile.mkdtemp(prefix='recipetool-', dir=tmpparent)
try:
- fetcher = bb.fetch2.Fetch([uri], localdata)
- for u in fetcher.ud:
- ud = fetcher.ud[u]
- ud.ignore_checksums = True
- fetcher.download()
- for u in fetcher.ud:
- ud = fetcher.ud[u]
- if ud.localpath.rstrip(os.sep) == localdata.getVar('DL_DIR', True).rstrip(os.sep):
- raise Exception('Local path is download directory - please check that the URI "%s" is correct' % uri)
- fetcher.unpack(destdir)
- for u in fetcher.ud:
- ud = fetcher.ud[u]
- if ud.method.recommends_checksum(ud):
- md5value = bb.utils.md5_file(ud.localpath)
- sha256value = bb.utils.sha256_file(ud.localpath)
- ret = (md5value, sha256value)
+ tmpworkdir = os.path.join(tmpdir, 'work')
+ logger.debug('fetch_url: temp dir is %s' % tmpdir)
+
+ fetchrecipedir = _get_temp_recipe_dir(tinfoil.config_data)
+ if not fetchrecipedir:
+ logger.error('Searched BBFILES but unable to find a writeable place to put temporary recipe')
+ sys.exit(1)
+ fetchrecipe = None
+ bb.utils.mkdirhier(fetchrecipedir)
+ try:
+ # Generate a dummy recipe so we can follow more or less normal paths
+ # for do_fetch and do_unpack
+ # I'd use tempfile functions here but underscores can be produced by that and those
+ # aren't allowed in recipe file names except to separate the version
+ rndstring = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(8))
+ fetchrecipe = os.path.join(fetchrecipedir, 'tmp-recipetool-%s.bb' % rndstring)
+ fetchrecipepn = os.path.splitext(os.path.basename(fetchrecipe))[0]
+ logger.debug('Generating initial recipe %s for fetching' % fetchrecipe)
+ with open(fetchrecipe, 'w') as f:
+ # We don't want to have to specify LIC_FILES_CHKSUM
+ f.write('LICENSE = "CLOSED"\n')
+ # We don't need the cross-compiler
+ f.write('INHIBIT_DEFAULT_DEPS = "1"\n')
+ # We don't have the checksums yet so we can't require them
+ f.write('BB_STRICT_CHECKSUM = "ignore"\n')
+ f.write('SRC_URI = "%s"\n' % srcuri)
+ f.write('SRCREV = "%s"\n' % srcrev)
+ f.write('WORKDIR = "%s"\n' % tmpworkdir)
+ # Set S out of the way so it doesn't get created under the workdir
+ f.write('S = "%s"\n' % os.path.join(tmpdir, 'emptysrc'))
+ if not mirrors:
+ # We do not need PREMIRRORS since we are almost certainly
+ # fetching new source rather than something that has already
+ # been fetched. Hence, we disable them by default.
+ # However, we provide an option for users to enable it.
+ f.write('PREMIRRORS = ""\n')
+ f.write('MIRRORS = ""\n')
+
+ logger.info('Fetching %s...' % srcuri)
+
+ # FIXME this is too noisy at the moment
+
+ # Parse recipes so our new recipe gets picked up
+ tinfoil.parse_recipes()
+
+ def eventhandler(event):
+ if isinstance(event, bb.fetch2.MissingChecksumEvent):
+ checksums.update(event.checksums)
+ return True
+ return False
+
+ # Run the fetch + unpack tasks
+ res = tinfoil.build_targets(fetchrecipepn,
+ 'do_unpack',
+ handle_events=True,
+ extra_events=['bb.fetch2.MissingChecksumEvent'],
+ event_callback=eventhandler)
+ if not res:
+ raise FetchUrlFailure(srcuri)
+
+ # Remove unneeded directories
+ rd = tinfoil.parse_recipe(fetchrecipepn)
+ if rd:
+ pathvars = ['T', 'RECIPE_SYSROOT', 'RECIPE_SYSROOT_NATIVE']
+ for pathvar in pathvars:
+ path = rd.getVar(pathvar)
+ shutil.rmtree(path)
+ finally:
+ if fetchrecipe:
+ try:
+ os.remove(fetchrecipe)
+ except FileNotFoundError:
+ pass
+ try:
+ os.rmdir(fetchrecipedir)
+ except OSError as e:
+ import errno
+ if e.errno != errno.ENOTEMPTY:
+ raise
+
+ bb.utils.mkdirhier(destdir)
+ for fn in os.listdir(tmpworkdir):
+ shutil.move(os.path.join(tmpworkdir, fn), destdir)
+
finally:
- os.chdir(olddir)
- return ret
+ if not preserve_tmp:
+ shutil.rmtree(tmpdir)
+ tmpdir = None
-def run_editor(fn):
+ return checksums, tmpdir
+
+
+def run_editor(fn, logger=None):
if isinstance(fn, str):
- params = '"%s"' % fn
+ files = [fn]
else:
- params = ''
- for fnitem in fn:
- params += ' "%s"' % fnitem
+ files = fn
editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi'))
try:
- return subprocess.check_call('%s %s' % (editor, params), shell=True)
- except OSError as exc:
- logger.error("Execution of editor '%s' failed: %s", editor, exc)
+ #print(shlex.split(editor) + files)
+ return subprocess.check_call(shlex.split(editor) + files)
+ except subprocess.CalledProcessError as exc:
+ logger.error("Execution of '%s' failed: %s" % (editor, exc))
return 1
def is_src_url(param):
@@ -129,3 +267,13 @@ def is_src_url(param):
elif param.startswith('git@') or ('@' in param and param.endswith('.git')):
return True
return False
+
+def filter_src_subdirs(pth):
+ """
+ Filter out subdirectories of initial unpacked source trees that we do not care about.
+ Used by devtool and recipetool.
+ """
+ dirlist = os.listdir(pth)
+ filterout = ['git.indirectionsymlink', 'source-date-epoch']
+ dirlist = [x for x in dirlist if x not in filterout]
+ return dirlist
diff --git a/scripts/lib/wic/__init__.py b/scripts/lib/wic/__init__.py
index 63c1d9c846..85567934ae 100644
--- a/scripts/lib/wic/__init__.py
+++ b/scripts/lib/wic/__init__.py
@@ -1,4 +1,10 @@
-import os, sys
+#!/usr/bin/env python3
+#
+# Copyright (c) 2007 Red Hat, Inc.
+# Copyright (c) 2011 Intel, Inc.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
-cur_path = os.path.dirname(__file__) or '.'
-sys.path.insert(0, cur_path + '/3rdparty')
+class WicError(Exception):
+ pass
diff --git a/scripts/lib/wic/__version__.py b/scripts/lib/wic/__version__.py
deleted file mode 100644
index 5452a46712..0000000000
--- a/scripts/lib/wic/__version__.py
+++ /dev/null
@@ -1 +0,0 @@
-VERSION = "2.00"
diff --git a/scripts/lib/wic/canned-wks/common.wks.inc b/scripts/lib/wic/canned-wks/common.wks.inc
index 5cf2fd1f3e..89880b417b 100644
--- a/scripts/lib/wic/canned-wks/common.wks.inc
+++ b/scripts/lib/wic/canned-wks/common.wks.inc
@@ -1,3 +1,3 @@
# This file is included into 3 canned wks files from this directory
part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
+part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024
diff --git a/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg b/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg
index a16bd6ac61..c58e74a853 100644
--- a/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg
+++ b/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg
@@ -1,11 +1,27 @@
# This is an example configuration file for syslinux.
-PROMPT 0
-TIMEOUT 10
-
+TIMEOUT 50
ALLOWOPTIONS 1
SERIAL 0 115200
+PROMPT 0
+
+UI vesamenu.c32
+menu title Select boot options
+menu tabmsg Press [Tab] to edit, [Return] to select
+
+DEFAULT Graphics console boot
+
+LABEL Graphics console boot
+KERNEL /vmlinuz
+APPEND label=boot rootwait
+
+LABEL Serial console boot
+KERNEL /vmlinuz
+APPEND label=boot rootwait console=ttyS0,115200
+
+LABEL Graphics console install
+KERNEL /vmlinuz
+APPEND label=install rootwait
-DEFAULT boot
-LABEL boot
+LABEL Serial console install
KERNEL /vmlinuz
-APPEND label=boot root=/dev/sda2 rootwait rootfstype=ext4 video=vesafb vga=0x318 console=tty0
+APPEND label=install rootwait console=ttyS0,115200
diff --git a/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in b/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
new file mode 100644
index 0000000000..7300e65e32
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
@@ -0,0 +1,3 @@
+bootloader --ptable gpt
+part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot --fstype=vfat --label boot --active --align 1024 --use-uuid --overhead-factor 1.0
+part / --source rootfs --fstype=ext4 --label root --align 1024 --exclude-path boot/
diff --git a/scripts/lib/wic/canned-wks/mkefidisk.wks b/scripts/lib/wic/canned-wks/mkefidisk.wks
index 696e94e3d7..9f534fe184 100644
--- a/scripts/lib/wic/canned-wks/mkefidisk.wks
+++ b/scripts/lib/wic/canned-wks/mkefidisk.wks
@@ -4,8 +4,8 @@
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
+part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
part swap --ondisk sda --size 44 --label swap1 --fstype=swap
-bootloader --timeout=10 --append="rootwait rootfstype=ext4 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0"
+bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0"
diff --git a/scripts/lib/wic/canned-wks/mkgummidisk.wks b/scripts/lib/wic/canned-wks/mkgummidisk.wks
deleted file mode 100644
index 66a22f60bd..0000000000
--- a/scripts/lib/wic/canned-wks/mkgummidisk.wks
+++ /dev/null
@@ -1,11 +0,0 @@
-# short-description: Create an EFI disk image
-# long-description: Creates a partitioned EFI disk image that the user
-# can directly dd to boot media.
-
-part /boot --source bootimg-efi --sourceparams="loader=gummiboot" --ondisk sda --label msdos --active --align 1024
-
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
-
-part swap --ondisk sda --size 44 --label swap1 --fstype=swap
-
-bootloader --timeout=10 --append="rootwait rootfstype=ext4 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0"
diff --git a/scripts/lib/wic/canned-wks/mkhybridiso.wks b/scripts/lib/wic/canned-wks/mkhybridiso.wks
index 9d34e9b477..48c5ac4791 100644
--- a/scripts/lib/wic/canned-wks/mkhybridiso.wks
+++ b/scripts/lib/wic/canned-wks/mkhybridiso.wks
@@ -2,6 +2,6 @@
# long-description: Creates an EFI and legacy bootable hybrid ISO image
# which can be used on optical media as well as USB media.
-part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi,image_name=HYBRID_ISO_IMG" --ondisk cd --label HYBRIDISO --fstype=ext4
+part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi,image_name=HYBRID_ISO_IMG" --ondisk cd --label HYBRIDISO
bootloader --timeout=15 --append=""
diff --git a/scripts/lib/wic/canned-wks/mksystemd-bootdisk.wks b/scripts/lib/wic/canned-wks/mksystemd-bootdisk.wks
deleted file mode 100644
index df706e8aaa..0000000000
--- a/scripts/lib/wic/canned-wks/mksystemd-bootdisk.wks
+++ /dev/null
@@ -1,11 +0,0 @@
-# short-description: Create an EFI disk image
-# long-description: Creates a partitioned EFI disk image that the user
-# can directly dd to boot media.
-
-part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk sda --label msdos --active --align 1024
-
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
-
-part swap --ondisk sda --size 44 --label swap1 --fstype=swap
-
-bootloader --timeout=10 --append="rootwait rootfstype=ext4 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0"
diff --git a/scripts/lib/wic/canned-wks/qemuriscv.wks b/scripts/lib/wic/canned-wks/qemuriscv.wks
new file mode 100644
index 0000000000..12c68b7069
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/qemuriscv.wks
@@ -0,0 +1,3 @@
+# short-description: Create qcow2 image for RISC-V QEMU machines
+
+part / --source rootfs --fstype=ext4 --label root --align 4096 --size 5G
diff --git a/scripts/lib/wic/canned-wks/qemux86-directdisk.wks b/scripts/lib/wic/canned-wks/qemux86-directdisk.wks
index a6518a0f45..c8d9f121b5 100644
--- a/scripts/lib/wic/canned-wks/qemux86-directdisk.wks
+++ b/scripts/lib/wic/canned-wks/qemux86-directdisk.wks
@@ -4,5 +4,5 @@
include common.wks.inc
-bootloader --timeout=0 --append="vga=0 uvesafb.mode_option=640x480-32 root=/dev/vda2 rw mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 rootfstype=ext4 "
+bootloader --timeout=0 --append="vga=0 rw oprofile.timer=1 rootfstype=ext4 "
diff --git a/scripts/lib/wic/canned-wks/sdimage-bootpart.wks b/scripts/lib/wic/canned-wks/sdimage-bootpart.wks
index 7ffd632f4a..63bc4dab6a 100644
--- a/scripts/lib/wic/canned-wks/sdimage-bootpart.wks
+++ b/scripts/lib/wic/canned-wks/sdimage-bootpart.wks
@@ -2,5 +2,5 @@
# long-description: Creates a partitioned SD card image. Boot files
# are located in the first vfat partition.
-part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16
-part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4
+part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --size 16
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4
diff --git a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
new file mode 100644
index 0000000000..95d7b97a60
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
@@ -0,0 +1,11 @@
+# short-description: Create an EFI disk image with systemd-boot
+# long-description: Creates a partitioned EFI disk image that the user
+# can directly dd to boot media. The selected bootloader is systemd-boot.
+
+part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk sda --label msdos --active --align 1024 --use-uuid
+
+part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
+
+part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid
+
+bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0"
diff --git a/scripts/lib/wic/conf.py b/scripts/lib/wic/conf.py
deleted file mode 100644
index 070ec3096b..0000000000
--- a/scripts/lib/wic/conf.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-
-from wic.ksparser import KickStart, KickStartError
-from wic import msger
-from wic.utils import misc
-
-
-def get_siteconf():
- wic_path = os.path.dirname(__file__)
- eos = wic_path.find('scripts') + len('scripts')
- scripts_path = wic_path[:eos]
-
- return scripts_path + "/lib/image/config/wic.conf"
-
-class ConfigMgr(object):
- DEFAULTS = {
- 'common': {
- "distro_name": "Default Distribution",
- "plugin_dir": "/usr/lib/wic/plugins"}, # TODO use prefix also?
- 'create': {
- "tmpdir": '/var/tmp/wic',
- "outdir": './wic-output',
- "release": None,
- "logfile": None,
- "name_prefix": None,
- "name_suffix": None}
- }
-
- # make the manager class as singleton
- _instance = None
- def __new__(cls, *args, **kwargs):
- if not cls._instance:
- cls._instance = super(ConfigMgr, cls).__new__(cls, *args, **kwargs)
-
- return cls._instance
-
- def __init__(self, ksconf=None, siteconf=None):
- # reset config options
- self.reset()
-
- if not siteconf:
- siteconf = get_siteconf()
-
- # initial options from siteconf
- self._siteconf = siteconf
-
- if ksconf:
- self._ksconf = ksconf
-
- def reset(self):
- self.__ksconf = None
- self.__siteconf = None
- self.create = {}
-
- # initialize the values with defaults
- for sec, vals in self.DEFAULTS.items():
- setattr(self, sec, vals)
-
- def __set_ksconf(self, ksconf):
- if not os.path.isfile(ksconf):
- msger.error('Cannot find ks file: %s' % ksconf)
-
- self.__ksconf = ksconf
- self._parse_kickstart(ksconf)
- def __get_ksconf(self):
- return self.__ksconf
- _ksconf = property(__get_ksconf, __set_ksconf)
-
- def _parse_kickstart(self, ksconf=None):
- if not ksconf:
- return
-
- try:
- ksobj = KickStart(ksconf)
- except KickStartError as err:
- msger.error(str(err))
-
- self.create['ks'] = ksobj
- self.create['name'] = os.path.splitext(os.path.basename(ksconf))[0]
-
- self.create['name'] = misc.build_name(ksconf,
- self.create['release'],
- self.create['name_prefix'],
- self.create['name_suffix'])
-
-configmgr = ConfigMgr()
diff --git a/scripts/lib/wic/config/wic.conf b/scripts/lib/wic/config/wic.conf
deleted file mode 100644
index a51bcb55eb..0000000000
--- a/scripts/lib/wic/config/wic.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-[common]
-; general settings
-distro_name = OpenEmbedded
-
-[create]
-; settings for create subcommand
diff --git a/scripts/lib/wic/creator.py b/scripts/lib/wic/creator.py
deleted file mode 100644
index 8f7d1503f5..0000000000
--- a/scripts/lib/wic/creator.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os, sys
-from optparse import OptionParser, SUPPRESS_HELP
-
-from wic import msger
-from wic.utils import errors
-from wic.conf import configmgr
-from wic.plugin import pluginmgr
-
-
-class Creator():
- """${name}: create an image
-
- Usage:
- ${name} SUBCOMMAND <ksfile> [OPTS]
-
- ${command_list}
- ${option_list}
- """
-
- name = 'wic create(cr)'
-
- def __init__(self, *args, **kwargs):
- self._subcmds = {}
-
- # get cmds from pluginmgr
- # mix-in do_subcmd interface
- for subcmd, klass in pluginmgr.get_plugins('imager').items():
- if not hasattr(klass, 'do_create'):
- msger.warning("Unsupported subcmd: %s" % subcmd)
- continue
-
- func = getattr(klass, 'do_create')
- self._subcmds[subcmd] = func
-
- def get_optparser(self):
- optparser = OptionParser()
- optparser.add_option('-d', '--debug', action='store_true',
- dest='debug',
- help=SUPPRESS_HELP)
- optparser.add_option('-v', '--verbose', action='store_true',
- dest='verbose',
- help=SUPPRESS_HELP)
- optparser.add_option('', '--logfile', type='string', dest='logfile',
- default=None,
- help='Path of logfile')
- optparser.add_option('-c', '--config', type='string', dest='config',
- default=None,
- help='Specify config file for wic')
- optparser.add_option('-o', '--outdir', type='string', action='store',
- dest='outdir', default=None,
- help='Output directory')
- optparser.add_option('', '--tmpfs', action='store_true', dest='enabletmpfs',
- help='Setup tmpdir as tmpfs to accelerate, experimental'
- ' feature, use it if you have more than 4G memory')
- optparser.add_option('', '--bmap', action='store_true', help='generate .bmap')
- return optparser
-
- def postoptparse(self, options):
- abspath = lambda pth: os.path.abspath(os.path.expanduser(pth))
-
- if options.verbose:
- msger.set_loglevel('verbose')
- if options.debug:
- msger.set_loglevel('debug')
-
- if options.logfile:
- logfile_abs_path = abspath(options.logfile)
- if os.path.isdir(logfile_abs_path):
- raise errors.Usage("logfile's path %s should be file"
- % options.logfile)
- if not os.path.exists(os.path.dirname(logfile_abs_path)):
- os.makedirs(os.path.dirname(logfile_abs_path))
- msger.set_interactive(False)
- msger.set_logfile(logfile_abs_path)
- configmgr.create['logfile'] = options.logfile
-
- if options.config:
- configmgr.reset()
- configmgr._siteconf = options.config
-
- if options.outdir is not None:
- configmgr.create['outdir'] = abspath(options.outdir)
-
- cdir = 'outdir'
- if os.path.exists(configmgr.create[cdir]) \
- and not os.path.isdir(configmgr.create[cdir]):
- msger.error('Invalid directory specified: %s' \
- % configmgr.create[cdir])
-
- if options.enabletmpfs:
- configmgr.create['enabletmpfs'] = options.enabletmpfs
-
- def main(self, argv=None):
- if argv is None:
- argv = sys.argv
- else:
- argv = argv[:] # don't modify caller's list
-
- pname = argv[0]
- if pname not in self._subcmds:
- msger.error('Unknown plugin: %s' % pname)
-
- optparser = self.get_optparser()
- options, args = optparser.parse_args(argv)
-
- self.postoptparse(options)
-
- return self._subcmds[pname](options, *args[1:])
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 5b104631ca..24797511e5 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -1,21 +1,7 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
@@ -28,14 +14,22 @@
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
#
+import logging
import os
-import sys
+import tempfile
+import json
+import subprocess
+import re
+
+from collections import namedtuple, OrderedDict
+from distutils.spawn import find_executable
-from wic import msger, creator
-from wic.utils import misc
-from wic.plugin import pluginmgr
-from wic.utils.oe import misc
+from wic import WicError
+from wic.filemap import sparse_copy
+from wic.pluginbase import PluginMgr
+from wic.misc import get_bitbake_var, exec_cmd
+logger = logging.getLogger('wic')
def verify_build_env():
"""
@@ -44,23 +38,25 @@ def verify_build_env():
Returns True if it is, false otherwise
"""
if not os.environ.get("BUILDDIR"):
- print("BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)")
- sys.exit(1)
+ raise WicError("BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)")
return True
CANNED_IMAGE_DIR = "lib/wic/canned-wks" # relative to scripts
SCRIPTS_CANNED_IMAGE_DIR = "scripts/" + CANNED_IMAGE_DIR
+WIC_DIR = "wic"
def build_canned_image_list(path):
- layers_path = misc.get_bitbake_var("BBLAYERS")
+ layers_path = get_bitbake_var("BBLAYERS")
canned_wks_layer_dirs = []
if layers_path is not None:
for layer_path in layers_path.split():
- cpath = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR)
- canned_wks_layer_dirs.append(cpath)
+ for wks_path in (WIC_DIR, SCRIPTS_CANNED_IMAGE_DIR):
+ cpath = os.path.join(layer_path, wks_path)
+ if os.path.isdir(cpath):
+ canned_wks_layer_dirs.append(cpath)
cpath = os.path.join(path, CANNED_IMAGE_DIR)
canned_wks_layer_dirs.append(cpath)
@@ -80,7 +76,8 @@ def find_canned_image(scripts_path, wks_file):
for fname in files:
if fname.endswith("~") or fname.endswith("#"):
continue
- if fname.endswith(".wks") and wks_file + ".wks" == fname:
+ if ((fname.endswith(".wks") and wks_file + ".wks" == fname) or \
+ (fname.endswith(".wks.in") and wks_file + ".wks.in" == fname)):
fullpath = os.path.join(canned_wks_dir, fname)
return fullpath
return None
@@ -97,7 +94,7 @@ def list_canned_images(scripts_path):
for fname in files:
if fname.endswith("~") or fname.endswith("#"):
continue
- if fname.endswith(".wks"):
+ if fname.endswith(".wks") or fname.endswith(".wks.in"):
fullpath = os.path.join(canned_wks_dir, fname)
with open(fullpath) as wks:
for line in wks:
@@ -106,7 +103,7 @@ def list_canned_images(scripts_path):
if idx != -1:
desc = line[idx + len("short-description:"):].strip()
break
- basename = os.path.splitext(fname)[0]
+ basename = fname.split('.')[0]
print(" %s\t\t%s" % (basename.ljust(30), desc))
@@ -137,26 +134,24 @@ def list_source_plugins():
"""
List the available source plugins i.e. plugins available for --source.
"""
- plugins = pluginmgr.get_source_plugins()
+ plugins = PluginMgr.get_plugins('source')
for plugin in plugins:
print(" %s" % plugin)
def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
- native_sysroot, scripts_path, image_output_dir,
- compressor, bmap, debug):
- """Create image
+ native_sysroot, options):
+ """
+ Create image
wks_file - user-defined OE kickstart file
rootfs_dir - absolute path to the build's /rootfs dir
bootimg_dir - absolute path to the build's boot artifacts directory
kernel_dir - absolute path to the build's kernel directory
native_sysroot - absolute path to the build's native sysroots dir
- scripts_path - absolute path to /scripts dir
image_output_dir - dirname to create for image
- compressor - compressor utility to compress the image
- bmap - enable generation of .bmap
+ options - wic command line options (debug, bmap, etc)
Normally, the values for the build artifacts values are determined
by 'wic -e' from the output of the 'bitbake -e' command given an
@@ -179,47 +174,451 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
try:
oe_builddir = os.environ["BUILDDIR"]
except KeyError:
- print("BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)")
- sys.exit(1)
+ raise WicError("BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)")
- if debug:
- msger.set_loglevel('debug')
+ if not os.path.exists(options.outdir):
+ os.makedirs(options.outdir)
- crobj = creator.Creator()
+ pname = options.imager
+ plugin_class = PluginMgr.get_plugins('imager').get(pname)
+ if not plugin_class:
+ raise WicError('Unknown plugin: %s' % pname)
- cmdline = ["direct", native_sysroot, kernel_dir, bootimg_dir, rootfs_dir,
- wks_file, image_output_dir, oe_builddir, compressor or ""]
- if bmap:
- cmdline.append('--bmap')
+ plugin = plugin_class(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
+ native_sysroot, oe_builddir, options)
- crobj.main(cmdline)
+ plugin.do_create()
- print("\nThe image(s) were created using OE kickstart file:\n %s" % wks_file)
+ logger.info("The image(s) were created using OE kickstart file:\n %s", wks_file)
def wic_list(args, scripts_path):
"""
Print the list of images or source plugins.
"""
- if len(args) < 1:
+ if args.list_type is None:
return False
- if args == ["images"]:
+ if args.list_type == "images":
+
list_canned_images(scripts_path)
return True
- elif args == ["source-plugins"]:
+ elif args.list_type == "source-plugins":
list_source_plugins()
return True
- elif len(args) == 2 and args[1] == "help":
- wks_file = args[0]
+ elif len(args.help_for) == 1 and args.help_for[0] == 'help':
+ wks_file = args.list_type
fullpath = find_canned_image(scripts_path, wks_file)
if not fullpath:
- print("No image named %s found, exiting. "\
- "(Use 'wic list images' to list available images, or "\
- "specify a fully-qualified OE kickstart (.wks) "\
- "filename)\n" % wks_file)
- sys.exit(1)
+ raise WicError("No image named %s found, exiting. "
+ "(Use 'wic list images' to list available images, "
+ "or specify a fully-qualified OE kickstart (.wks) "
+ "filename)" % wks_file)
+
list_canned_image_help(scripts_path, fullpath)
return True
return False
+
+
+class Disk:
+ def __init__(self, imagepath, native_sysroot, fstypes=('fat', 'ext')):
+ self.imagepath = imagepath
+ self.native_sysroot = native_sysroot
+ self.fstypes = fstypes
+ self._partitions = None
+ self._partimages = {}
+ self._lsector_size = None
+ self._psector_size = None
+ self._ptable_format = None
+
+ # find parted
+ # read paths from $PATH environment variable
+ # if it fails, use hardcoded paths
+ pathlist = "/bin:/usr/bin:/usr/sbin:/sbin/"
+ try:
+ self.paths = os.environ['PATH'] + ":" + pathlist
+ except KeyError:
+ self.paths = pathlist
+
+ if native_sysroot:
+ for path in pathlist.split(':'):
+ self.paths = "%s%s:%s" % (native_sysroot, path, self.paths)
+
+ self.parted = find_executable("parted", self.paths)
+ if not self.parted:
+ raise WicError("Can't find executable parted")
+
+ self.partitions = self.get_partitions()
+
+ def __del__(self):
+ for path in self._partimages.values():
+ os.unlink(path)
+
+ def get_partitions(self):
+ if self._partitions is None:
+ self._partitions = OrderedDict()
+ out = exec_cmd("%s -sm %s unit B print" % (self.parted, self.imagepath))
+ parttype = namedtuple("Part", "pnum start end size fstype")
+ splitted = out.splitlines()
+ # skip over possible errors in exec_cmd output
+ try:
+ idx =splitted.index("BYT;")
+ except ValueError:
+ raise WicError("Error getting partition information from %s" % (self.parted))
+ lsector_size, psector_size, self._ptable_format = splitted[idx + 1].split(":")[3:6]
+ self._lsector_size = int(lsector_size)
+ self._psector_size = int(psector_size)
+ for line in splitted[idx + 2:]:
+ pnum, start, end, size, fstype = line.split(':')[:5]
+ partition = parttype(int(pnum), int(start[:-1]), int(end[:-1]),
+ int(size[:-1]), fstype)
+ self._partitions[pnum] = partition
+
+ return self._partitions
+
+ def __getattr__(self, name):
+ """Get path to the executable in a lazy way."""
+ if name in ("mdir", "mcopy", "mdel", "mdeltree", "sfdisk", "e2fsck",
+ "resize2fs", "mkswap", "mkdosfs", "debugfs"):
+ aname = "_%s" % name
+ if aname not in self.__dict__:
+ setattr(self, aname, find_executable(name, self.paths))
+ if aname not in self.__dict__ or self.__dict__[aname] is None:
+ raise WicError("Can't find executable '{}'".format(name))
+ return self.__dict__[aname]
+ return self.__dict__[name]
+
+ def _get_part_image(self, pnum):
+ if pnum not in self.partitions:
+ raise WicError("Partition %s is not in the image")
+ part = self.partitions[pnum]
+ # check if fstype is supported
+ for fstype in self.fstypes:
+ if part.fstype.startswith(fstype):
+ break
+ else:
+ raise WicError("Not supported fstype: {}".format(part.fstype))
+ if pnum not in self._partimages:
+ tmpf = tempfile.NamedTemporaryFile(prefix="wic-part")
+ dst_fname = tmpf.name
+ tmpf.close()
+ sparse_copy(self.imagepath, dst_fname, skip=part.start, length=part.size)
+ self._partimages[pnum] = dst_fname
+
+ return self._partimages[pnum]
+
+ def _put_part_image(self, pnum):
+ """Put partition image into partitioned image."""
+ sparse_copy(self._partimages[pnum], self.imagepath,
+ seek=self.partitions[pnum].start)
+
+ def dir(self, pnum, path):
+ if self.partitions[pnum].fstype.startswith('ext'):
+ return exec_cmd("{} {} -R 'ls -l {}'".format(self.debugfs,
+ self._get_part_image(pnum),
+ path), as_shell=True)
+ else: # fat
+ return exec_cmd("{} -i {} ::{}".format(self.mdir,
+ self._get_part_image(pnum),
+ path))
+
+ def copy(self, src, dest):
+ """Copy partition image into wic image."""
+ pnum = dest.part if isinstance(src, str) else src.part
+
+ if self.partitions[pnum].fstype.startswith('ext'):
+ if isinstance(src, str):
+ cmd = "printf 'cd {}\nwrite {} {}\n' | {} -w {}".\
+ format(os.path.dirname(dest.path), src, os.path.basename(src),
+ self.debugfs, self._get_part_image(pnum))
+ else: # copy from wic
+ # run both dump and rdump to support both files and directory
+ cmd = "printf 'cd {}\ndump /{} {}\nrdump /{} {}\n' | {} {}".\
+ format(os.path.dirname(src.path), src.path,
+ dest, src.path, dest, self.debugfs,
+ self._get_part_image(pnum))
+ else: # fat
+ if isinstance(src, str):
+ cmd = "{} -i {} -snop {} ::{}".format(self.mcopy,
+ self._get_part_image(pnum),
+ src, dest.path)
+ else:
+ cmd = "{} -i {} -snop ::{} {}".format(self.mcopy,
+ self._get_part_image(pnum),
+ src.path, dest)
+
+ exec_cmd(cmd, as_shell=True)
+ self._put_part_image(pnum)
+
+ def remove_ext(self, pnum, path, recursive):
+ """
+ Remove files/dirs and their contents from the partition.
+ This only applies to ext* partition.
+ """
+ abs_path = re.sub('\/\/+', '/', path)
+ cmd = "{} {} -wR 'rm \"{}\"'".format(self.debugfs,
+ self._get_part_image(pnum),
+ abs_path)
+ out = exec_cmd(cmd , as_shell=True)
+ for line in out.splitlines():
+ if line.startswith("rm:"):
+ if "file is a directory" in line:
+ if recursive:
+ # loop through content and delete them one by one if
+ # flaged with -r
+ subdirs = iter(self.dir(pnum, abs_path).splitlines())
+ next(subdirs)
+ for subdir in subdirs:
+ dir = subdir.split(':')[1].split(" ", 1)[1]
+ if not dir == "." and not dir == "..":
+ self.remove_ext(pnum, "%s/%s" % (abs_path, dir), recursive)
+
+ rmdir_out = exec_cmd("{} {} -wR 'rmdir \"{}\"'".format(self.debugfs,
+ self._get_part_image(pnum),
+ abs_path.rstrip('/'))
+ , as_shell=True)
+
+ for rmdir_line in rmdir_out.splitlines():
+ if "directory not empty" in rmdir_line:
+ raise WicError("Could not complete operation: \n%s \n"
+ "use -r to remove non-empty directory" % rmdir_line)
+ if rmdir_line.startswith("rmdir:"):
+ raise WicError("Could not complete operation: \n%s "
+ "\n%s" % (str(line), rmdir_line))
+
+ else:
+ raise WicError("Could not complete operation: \n%s "
+ "\nUnable to remove %s" % (str(line), abs_path))
+
+ def remove(self, pnum, path, recursive):
+ """Remove files/dirs from the partition."""
+ partimg = self._get_part_image(pnum)
+ if self.partitions[pnum].fstype.startswith('ext'):
+ self.remove_ext(pnum, path, recursive)
+
+ else: # fat
+ cmd = "{} -i {} ::{}".format(self.mdel, partimg, path)
+ try:
+ exec_cmd(cmd)
+ except WicError as err:
+ if "not found" in str(err) or "non empty" in str(err):
+ # mdel outputs 'File ... not found' or 'directory .. non empty"
+ # try to use mdeltree as path could be a directory
+ cmd = "{} -i {} ::{}".format(self.mdeltree,
+ partimg, path)
+ exec_cmd(cmd)
+ else:
+ raise err
+ self._put_part_image(pnum)
+
+ def write(self, target, expand):
+ """Write disk image to the media or file."""
+ def write_sfdisk_script(outf, parts):
+ for key, val in parts['partitiontable'].items():
+ if key in ("partitions", "device", "firstlba", "lastlba"):
+ continue
+ if key == "id":
+ key = "label-id"
+ outf.write("{}: {}\n".format(key, val))
+ outf.write("\n")
+ for part in parts['partitiontable']['partitions']:
+ line = ''
+ for name in ('attrs', 'name', 'size', 'type', 'uuid'):
+ if name == 'size' and part['type'] == 'f':
+ # don't write size for extended partition
+ continue
+ val = part.get(name)
+ if val:
+ line += '{}={}, '.format(name, val)
+ if line:
+ line = line[:-2] # strip ', '
+ if part.get('bootable'):
+ line += ' ,bootable'
+ outf.write("{}\n".format(line))
+ outf.flush()
+
+ def read_ptable(path):
+ out = exec_cmd("{} -dJ {}".format(self.sfdisk, path))
+ return json.loads(out)
+
+ def write_ptable(parts, target):
+ with tempfile.NamedTemporaryFile(prefix="wic-sfdisk-", mode='w') as outf:
+ write_sfdisk_script(outf, parts)
+ cmd = "{} --no-reread {} < {} ".format(self.sfdisk, target, outf.name)
+ exec_cmd(cmd, as_shell=True)
+
+ if expand is None:
+ sparse_copy(self.imagepath, target)
+ else:
+ # copy first sectors that may contain bootloader
+ sparse_copy(self.imagepath, target, length=2048 * self._lsector_size)
+
+ # copy source partition table to the target
+ parts = read_ptable(self.imagepath)
+ write_ptable(parts, target)
+
+ # get size of unpartitioned space
+ free = None
+ for line in exec_cmd("{} -F {}".format(self.sfdisk, target)).splitlines():
+ if line.startswith("Unpartitioned space ") and line.endswith("sectors"):
+ free = int(line.split()[-2])
+ # Align free space to a 2048 sector boundary. YOCTO #12840.
+ free = free - (free % 2048)
+ if free is None:
+ raise WicError("Can't get size of unpartitioned space")
+
+ # calculate expanded partitions sizes
+ sizes = {}
+ num_auto_resize = 0
+ for num, part in enumerate(parts['partitiontable']['partitions'], 1):
+ if num in expand:
+ if expand[num] != 0: # don't resize partition if size is set to 0
+ sectors = expand[num] // self._lsector_size
+ free -= sectors - part['size']
+ part['size'] = sectors
+ sizes[num] = sectors
+ elif part['type'] != 'f':
+ sizes[num] = -1
+ num_auto_resize += 1
+
+ for num, part in enumerate(parts['partitiontable']['partitions'], 1):
+ if sizes.get(num) == -1:
+ part['size'] += free // num_auto_resize
+
+ # write resized partition table to the target
+ write_ptable(parts, target)
+
+ # read resized partition table
+ parts = read_ptable(target)
+
+ # copy partitions content
+ for num, part in enumerate(parts['partitiontable']['partitions'], 1):
+ pnum = str(num)
+ fstype = self.partitions[pnum].fstype
+
+ # copy unchanged partition
+ if part['size'] == self.partitions[pnum].size // self._lsector_size:
+ logger.info("copying unchanged partition {}".format(pnum))
+ sparse_copy(self._get_part_image(pnum), target, seek=part['start'] * self._lsector_size)
+ continue
+
+ # resize or re-create partitions
+ if fstype.startswith('ext') or fstype.startswith('fat') or \
+ fstype.startswith('linux-swap'):
+
+ partfname = None
+ with tempfile.NamedTemporaryFile(prefix="wic-part{}-".format(pnum)) as partf:
+ partfname = partf.name
+
+ if fstype.startswith('ext'):
+ logger.info("resizing ext partition {}".format(pnum))
+ partimg = self._get_part_image(pnum)
+ sparse_copy(partimg, partfname)
+ exec_cmd("{} -pf {}".format(self.e2fsck, partfname))
+ exec_cmd("{} {} {}s".format(\
+ self.resize2fs, partfname, part['size']))
+ elif fstype.startswith('fat'):
+ logger.info("copying content of the fat partition {}".format(pnum))
+ with tempfile.TemporaryDirectory(prefix='wic-fatdir-') as tmpdir:
+ # copy content to the temporary directory
+ cmd = "{} -snompi {} :: {}".format(self.mcopy,
+ self._get_part_image(pnum),
+ tmpdir)
+ exec_cmd(cmd)
+ # create new msdos partition
+ label = part.get("name")
+ label_str = "-n {}".format(label) if label else ''
+
+ cmd = "{} {} -C {} {}".format(self.mkdosfs, label_str, partfname,
+ part['size'])
+ exec_cmd(cmd)
+ # copy content from the temporary directory to the new partition
+ cmd = "{} -snompi {} {}/* ::".format(self.mcopy, partfname, tmpdir)
+ exec_cmd(cmd, as_shell=True)
+ elif fstype.startswith('linux-swap'):
+ logger.info("creating swap partition {}".format(pnum))
+ label = part.get("name")
+ label_str = "-L {}".format(label) if label else ''
+ uuid = part.get("uuid")
+ uuid_str = "-U {}".format(uuid) if uuid else ''
+ with open(partfname, 'w') as sparse:
+ os.ftruncate(sparse.fileno(), part['size'] * self._lsector_size)
+ exec_cmd("{} {} {} {}".format(self.mkswap, label_str, uuid_str, partfname))
+ sparse_copy(partfname, target, seek=part['start'] * self._lsector_size)
+ os.unlink(partfname)
+ elif part['type'] != 'f':
+ logger.warning("skipping partition {}: unsupported fstype {}".format(pnum, fstype))
+
+def wic_ls(args, native_sysroot):
+ """List contents of partitioned image or vfat partition."""
+ disk = Disk(args.path.image, native_sysroot)
+ if not args.path.part:
+ if disk.partitions:
+ print('Num Start End Size Fstype')
+ for part in disk.partitions.values():
+ print("{:2d} {:12d} {:12d} {:12d} {}".format(\
+ part.pnum, part.start, part.end,
+ part.size, part.fstype))
+ else:
+ path = args.path.path or '/'
+ print(disk.dir(args.path.part, path))
+
+def wic_cp(args, native_sysroot):
+ """
+ Copy file or directory to/from the vfat/ext partition of
+ partitioned image.
+ """
+ if isinstance(args.dest, str):
+ disk = Disk(args.src.image, native_sysroot)
+ else:
+ disk = Disk(args.dest.image, native_sysroot)
+ disk.copy(args.src, args.dest)
+
+
+def wic_rm(args, native_sysroot):
+ """
+ Remove files or directories from the vfat partition of
+ partitioned image.
+ """
+ disk = Disk(args.path.image, native_sysroot)
+ disk.remove(args.path.part, args.path.path, args.recursive_delete)
+
+def wic_write(args, native_sysroot):
+ """
+ Write image to a target device.
+ """
+ disk = Disk(args.image, native_sysroot, ('fat', 'ext', 'linux-swap'))
+ disk.write(args.target, args.expand)
+
+def find_canned(scripts_path, file_name):
+ """
+ Find a file either by its path or by name in the canned files dir.
+
+ Return None if not found
+ """
+ if os.path.exists(file_name):
+ return file_name
+
+ layers_canned_wks_dir = build_canned_image_list(scripts_path)
+ for canned_wks_dir in layers_canned_wks_dir:
+ for root, dirs, files in os.walk(canned_wks_dir):
+ for fname in files:
+ if fname == file_name:
+ fullpath = os.path.join(canned_wks_dir, fname)
+ return fullpath
+
+def get_custom_config(boot_file):
+ """
+ Get the custom configuration to be used for the bootloader.
+
+ Return None if the file can't be found.
+ """
+ # Get the scripts path of poky
+ scripts_path = os.path.abspath("%s/../.." % os.path.dirname(__file__))
+
+ cfg_file = find_canned(scripts_path, boot_file)
+ if cfg_file:
+ with open(cfg_file, "r") as f:
+ config = f.read()
+ return config
diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index f3240ba8d8..a3919fbcad 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -1,13 +1,8 @@
+#
# Copyright (c) 2012 Intel, Inc.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License, version 2,
-# as published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
"""
This module implements python implements a way to get file block. Two methods
@@ -22,6 +17,7 @@ and returns an instance of the class.
# * Too many instance attributes (R0902)
# pylint: disable=R0902
+import errno
import os
import struct
import array
@@ -34,14 +30,21 @@ def get_block_size(file_obj):
Returns block size for file object 'file_obj'. Errors are indicated by the
'IOError' exception.
"""
-
- from fcntl import ioctl
- import struct
-
# Get the block size of the host file-system for the image file by calling
# the FIGETBSZ ioctl (number 2).
- binary_data = ioctl(file_obj, 2, struct.pack('I', 0))
- return struct.unpack('I', binary_data)[0]
+ try:
+ binary_data = fcntl.ioctl(file_obj, 2, struct.pack('I', 0))
+ except OSError:
+ raise IOError("Unable to determine block size")
+ bsize = struct.unpack('I', binary_data)[0]
+ if not bsize:
+ import os
+ stat = os.fstat(file_obj.fileno())
+ if hasattr(stat, 'st_blksize'):
+ bsize = stat.st_blksize
+ else:
+ raise IOError("Unable to determine block size")
+ return bsize
class ErrorNotSupp(Exception):
"""
@@ -185,9 +188,9 @@ def _lseek(file_obj, offset, whence):
except OSError as err:
# The 'lseek' system call returns the ENXIO if there is no data or
# hole starting from the specified offset.
- if err.errno == os.errno.ENXIO:
+ if err.errno == errno.ENXIO:
return -1
- elif err.errno == os.errno.EINVAL:
+ elif err.errno == errno.EINVAL:
raise ErrorNotSupp("the kernel or file-system does not support "
"\"SEEK_HOLE\" and \"SEEK_DATA\"")
else:
@@ -228,7 +231,7 @@ class FilemapSeek(_FilemapBase):
try:
tmp_obj = tempfile.TemporaryFile("w+", dir=directory)
except IOError as err:
- raise ErrorNotSupp("cannot create a temporary in \"%s\": %s"
+ raise ErrorNotSupp("cannot create a temporary in \"%s\": %s" \
% (directory, err))
try:
@@ -390,12 +393,12 @@ class FilemapFiemap(_FilemapBase):
except IOError as err:
# Note, the FIEMAP ioctl is supported by the Linux kernel starting
# from version 2.6.28 (year 2008).
- if err.errno == os.errno.EOPNOTSUPP:
+ if err.errno == errno.EOPNOTSUPP:
errstr = "FilemapFiemap: the FIEMAP ioctl is not supported " \
"by the file-system"
self._log.debug(errstr)
raise ErrorNotSupp(errstr)
- if err.errno == os.errno.ENOTTY:
+ if err.errno == errno.ENOTTY:
errstr = "FilemapFiemap: the FIEMAP ioctl is not supported " \
"by the kernel"
self._log.debug(errstr)
@@ -530,23 +533,51 @@ def filemap(image, log=None):
except ErrorNotSupp:
return FilemapSeek(image, log)
-def sparse_copy(src_fname, dst_fname, offset=0, skip=0):
- """Efficiently copy sparse file to or into another file."""
- fmap = filemap(src_fname)
+def sparse_copy(src_fname, dst_fname, skip=0, seek=0,
+ length=0, api=None):
+ """
+ Efficiently copy sparse file to or into another file.
+
+ src_fname: path to source file
+ dst_fname: path to destination file
+ skip: skip N bytes at thestart of src
+ seek: seek N bytes from the start of dst
+ length: read N bytes from src and write them to dst
+ api: FilemapFiemap or FilemapSeek object
+ """
+ if not api:
+ api = filemap
+ fmap = api(src_fname)
try:
dst_file = open(dst_fname, 'r+b')
except IOError:
dst_file = open(dst_fname, 'wb')
+ if length:
+ dst_size = length + seek
+ else:
+ dst_size = os.path.getsize(src_fname) + seek - skip
+ dst_file.truncate(dst_size)
+ written = 0
for first, last in fmap.get_mapped_ranges(0, fmap.blocks_cnt):
start = first * fmap.block_size
end = (last + 1) * fmap.block_size
+ if skip >= end:
+ continue
+
if start < skip < end:
start = skip
fmap._f_image.seek(start, os.SEEK_SET)
- dst_file.seek(offset + start, os.SEEK_SET)
+
+ written += start - skip - written
+ if length and written >= length:
+ dst_file.seek(seek + length, os.SEEK_SET)
+ dst_file.close()
+ return
+
+ dst_file.seek(seek + start - skip, os.SEEK_SET)
chunk_size = 1024 * 1024
to_read = end - start
@@ -555,7 +586,14 @@ def sparse_copy(src_fname, dst_fname, offset=0, skip=0):
while read < to_read:
if read + chunk_size > to_read:
chunk_size = to_read - read
- chunk = fmap._f_image.read(chunk_size)
+ size = chunk_size
+ if length and written + size > length:
+ size = length - written
+ chunk = fmap._f_image.read(size)
dst_file.write(chunk)
- read += chunk_size
+ read += size
+ written += size
+ if written == length:
+ dst_file.close()
+ return
dst_file.close()
diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index e5347ec4b7..29c4e436d8 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -1,21 +1,6 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This module implements some basic help invocation functions along
@@ -28,10 +13,12 @@
import subprocess
import logging
-from wic.plugin import pluginmgr, PLUGIN_TYPES
+from wic.pluginbase import PluginMgr, PLUGIN_TYPES
+
+logger = logging.getLogger('wic')
def subcommand_error(args):
- logging.info("invalid subcommand %s" % args[0])
+ logger.info("invalid subcommand %s", args[0])
def display_help(subcommand, subcommands):
@@ -54,7 +41,7 @@ def wic_help(args, usage_str, subcommands):
"""
Subcommand help dispatcher.
"""
- if len(args) == 1 or not display_help(args[1], subcommands):
+ if args.help_topic == None or not display_help(args.help_topic, subcommands):
print(usage_str)
@@ -66,7 +53,7 @@ def get_wic_plugins_help():
result = wic_plugins_help
for plugin_type in PLUGIN_TYPES:
result += '\n\n%s PLUGINS\n\n' % plugin_type.upper()
- for name, plugin in pluginmgr.get_plugins(plugin_type).items():
+ for name, plugin in PluginMgr.get_plugins(plugin_type).items():
result += "\n %s plugin:\n" % name
if plugin.__doc__:
result += plugin.__doc__
@@ -80,19 +67,20 @@ def invoke_subcommand(args, parser, main_command_usage, subcommands):
Dispatch to subcommand handler borrowed from combo-layer.
Should use argparse, but has to work in 2.6.
"""
- if not args:
- logging.error("No subcommand specified, exiting")
+ if not args.command:
+ logger.error("No subcommand specified, exiting")
parser.print_help()
return 1
- elif args[0] == "help":
+ elif args.command == "help":
wic_help(args, main_command_usage, subcommands)
- elif args[0] not in subcommands:
- logging.error("Unsupported subcommand %s, exiting\n" % (args[0]))
+ elif args.command not in subcommands:
+ logger.error("Unsupported subcommand %s, exiting\n", args.command)
parser.print_help()
return 1
else:
- usage = subcommands.get(args[0], subcommand_error)[1]
- subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
+ subcmd = subcommands.get(args.command, subcommand_error)
+ usage = subcmd[1]
+ subcmd[0](args, usage)
##
@@ -128,10 +116,10 @@ wic_create_usage = """
Create a new OpenEmbedded image
usage: wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>]
- [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
[-e | --image-name] [-s, --skip-build-check] [-D, --debug]
[-r, --rootfs-dir] [-b, --bootimg-dir]
[-k, --kernel-dir] [-n, --native-sysroot] [-f, --build-rootfs]
+ [-c, --compress-with] [-m, --bmap]
This command creates an OpenEmbedded image based on the 'OE kickstart
commands' found in the <wks file>.
@@ -152,7 +140,7 @@ SYNOPSIS
[-e | --image-name] [-s, --skip-build-check] [-D, --debug]
[-r, --rootfs-dir] [-b, --bootimg-dir]
[-k, --kernel-dir] [-n, --native-sysroot] [-f, --build-rootfs]
- [-c, --compress-with] [-m, --bmap]
+ [-c, --compress-with] [-m, --bmap] [--no-fstab-update]
DESCRIPTION
This command creates an OpenEmbedded image based on the 'OE
@@ -224,6 +212,11 @@ DESCRIPTION
The -m option is used to produce .bmap file for the image. This file
can be used to flash image using bmaptool utility.
+
+ The --no-fstab-update option is used to doesn't change fstab file. When
+ using this option the final fstab file will be same that in rootfs and
+ wic doesn't update file, e.g adding a new mount point. User can control
+ the fstab file content in base-files recipe.
"""
wic_list_usage = """
@@ -281,6 +274,243 @@ DESCRIPTION
details.
"""
+wic_ls_usage = """
+
+ List content of a partitioned image
+
+ usage: wic ls <image>[:<partition>[<path>]] [--native-sysroot <path>]
+
+ This command outputs either list of image partitions or directory contents
+ of vfat and ext* partitions.
+
+ See 'wic help ls' for more detailed instructions.
+
+"""
+
+wic_ls_help = """
+
+NAME
+ wic ls - List contents of partitioned image or partition
+
+SYNOPSIS
+ wic ls <image>
+ wic ls <image>:<vfat or ext* partition>
+ wic ls <image>:<vfat or ext* partition><path>
+ wic ls <image>:<vfat or ext* partition><path> --native-sysroot <path>
+
+DESCRIPTION
+ This command lists either partitions of the image or directory contents
+ of vfat or ext* partitions.
+
+ The first form it lists partitions of the image.
+ For example:
+ $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic
+ Num Start End Size Fstype
+ 1 1048576 24438783 23390208 fat16
+ 2 25165824 50315263 25149440 ext4
+
+ Second and third form list directory content of the partition:
+ $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+ Volume in drive : is boot
+ Volume Serial Number is 2DF2-5F02
+ Directory for ::/
+
+ efi <DIR> 2017-05-11 10:54
+ startup nsh 26 2017-05-11 10:54
+ vmlinuz 6922288 2017-05-11 10:54
+ 3 files 6 922 314 bytes
+ 15 818 752 bytes free
+
+
+ $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/EFI/boot/
+ Volume in drive : is boot
+ Volume Serial Number is 2DF2-5F02
+ Directory for ::/EFI/boot
+
+ . <DIR> 2017-05-11 10:54
+ .. <DIR> 2017-05-11 10:54
+ grub cfg 679 2017-05-11 10:54
+ bootx64 efi 571392 2017-05-11 10:54
+ 4 files 572 071 bytes
+ 15 818 752 bytes free
+
+ The -n option is used to specify the path to the native sysroot
+ containing the tools(parted and mtools) to use.
+
+"""
+
+wic_cp_usage = """
+
+ Copy files and directories to/from the vfat or ext* partition
+
+ usage: wic cp <src> <dest> [--native-sysroot <path>]
+
+ source/destination image in format <image>:<partition>[<path>]
+
+ This command copies files or directories either
+ - from local to vfat or ext* partitions of partitioned image
+ - from vfat or ext* partitions of partitioned image to local
+
+ See 'wic help cp' for more detailed instructions.
+
+"""
+
+wic_cp_help = """
+
+NAME
+ wic cp - copy files and directories to/from the vfat or ext* partitions
+
+SYNOPSIS
+ wic cp <src> <dest>:<partition>
+ wic cp <src>:<partition> <dest>
+ wic cp <src> <dest-image>:<partition><path>
+ wic cp <src> <dest-image>:<partition><path> --native-sysroot <path>
+
+DESCRIPTION
+ This command copies files or directories either
+ - from local to vfat or ext* partitions of partitioned image
+ - from vfat or ext* partitions of partitioned image to local
+
+ The first form of it copies file or directory to the root directory of
+ the partition:
+ $ wic cp test.wks tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+ $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+ Volume in drive : is boot
+ Volume Serial Number is DB4C-FD4C
+ Directory for ::/
+
+ efi <DIR> 2017-05-24 18:15
+ loader <DIR> 2017-05-24 18:15
+ startup nsh 26 2017-05-24 18:15
+ vmlinuz 6926384 2017-05-24 18:15
+ test wks 628 2017-05-24 21:22
+ 5 files 6 927 038 bytes
+ 15 677 440 bytes free
+
+ The second form of the command copies file or directory to the specified directory
+ on the partition:
+ $ wic cp test tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/efi/
+ $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/efi/
+ Volume in drive : is boot
+ Volume Serial Number is DB4C-FD4C
+ Directory for ::/efi
+
+ . <DIR> 2017-05-24 18:15
+ .. <DIR> 2017-05-24 18:15
+ boot <DIR> 2017-05-24 18:15
+ test <DIR> 2017-05-24 21:27
+ 4 files 0 bytes
+ 15 675 392 bytes free
+
+ The third form of the command copies file or directory from the specified directory
+ on the partition to local:
+ $ wic cp tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/vmlinuz test
+
+ The -n option is used to specify the path to the native sysroot
+ containing the tools(parted and mtools) to use.
+"""
+
+wic_rm_usage = """
+
+ Remove files or directories from the vfat or ext* partitions
+
+ usage: wic rm <image>:<partition><path> [--native-sysroot <path>]
+
+ This command removes files or directories from the vfat or ext* partitions of
+ the partitioned image.
+
+ See 'wic help rm' for more detailed instructions.
+
+"""
+
+wic_rm_help = """
+
+NAME
+ wic rm - remove files or directories from the vfat or ext* partitions
+
+SYNOPSIS
+ wic rm <src> <image>:<partition><path>
+ wic rm <src> <image>:<partition><path> --native-sysroot <path>
+ wic rm -r <image>:<partition><path>
+
+DESCRIPTION
+ This command removes files or directories from the vfat or ext* partition of the
+ partitioned image:
+
+ $ wic ls ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+ Volume in drive : is boot
+ Volume Serial Number is 11D0-DE21
+ Directory for ::/
+
+ libcom32 c32 186500 2017-06-02 15:15
+ libutil c32 24148 2017-06-02 15:15
+ syslinux cfg 209 2017-06-02 15:15
+ vesamenu c32 27104 2017-06-02 15:15
+ vmlinuz 6926384 2017-06-02 15:15
+ 5 files 7 164 345 bytes
+ 16 582 656 bytes free
+
+ $ wic rm ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/libutil.c32
+
+ $ wic ls ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+ Volume in drive : is boot
+ Volume Serial Number is 11D0-DE21
+ Directory for ::/
+
+ libcom32 c32 186500 2017-06-02 15:15
+ syslinux cfg 209 2017-06-02 15:15
+ vesamenu c32 27104 2017-06-02 15:15
+ vmlinuz 6926384 2017-06-02 15:15
+ 4 files 7 140 197 bytes
+ 16 607 232 bytes free
+
+ The -n option is used to specify the path to the native sysroot
+ containing the tools(parted and mtools) to use.
+
+ The -r option is used to remove directories and their contents
+ recursively,this only applies to ext* partition.
+"""
+
+wic_write_usage = """
+
+ Write image to a device
+
+ usage: wic write <image> <target device> [--expand [rules]] [--native-sysroot <path>]
+
+ This command writes partitioned image to a target device (USB stick, SD card etc).
+
+ See 'wic help write' for more detailed instructions.
+
+"""
+
+wic_write_help = """
+
+NAME
+ wic write - write an image to a device
+
+SYNOPSIS
+ wic write <image> <target>
+ wic write <image> <target> --expand auto
+ wic write <image> <target> --expand 1:100M,2:300M
+ wic write <image> <target> --native-sysroot <path>
+
+DESCRIPTION
+ This command writes an image to a target device (USB stick, SD card etc)
+
+ $ wic write ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic /dev/sdb
+
+ The --expand option is used to resize image partitions.
+ --expand auto expands partitions to occupy all free space available on the target device.
+ It's also possible to specify expansion rules in a format
+ <partition>:<size>[,<partition>:<size>...] for one or more partitions.
+ Specifying size 0 will keep partition unmodified.
+ Note: Resizing boot partition can result in non-bootable image for non-EFI images. It is
+ recommended to use size 0 for boot partition to keep image bootable.
+
+ The --native-sysroot option is used to specify the path to the native sysroot
+ containing the tools(parted, resize2fs) to use.
+"""
+
wic_plugins_help = """
NAME
@@ -344,6 +574,10 @@ DESCRIPTION
partition. In other words, it 'prepares' the final partition
image which will be incorporated into the disk image.
+ do_post_partition()
+ Called after the partition is created. It is useful to add post
+ operations e.g. signing the partition.
+
do_configure_partition()
Called before do_prepare_partition(), typically used to
create custom configuration files for a partition, for
@@ -371,12 +605,7 @@ DESCRIPTION
This scheme is extensible - adding more hooks is a simple matter
of adding more plugin methods to SourcePlugin and derived classes.
- The code that then needs to call the plugin methods uses
- plugin.get_source_plugin_methods() to find the method(s) needed by
- the call; this is done by filling up a dict with keys containing
- the method names of interest - on success, these will be filled in
- with the actual methods. Please see the implementation for
- examples and details.
+ Please see the implementation for details.
"""
wic_overview_help = """
@@ -635,8 +864,11 @@ DESCRIPTION
Partitions with a <mountpoint> specified will be automatically mounted.
This is achieved by wic adding entries to the fstab during image
generation. In order for a valid fstab to be generated one of the
- --ondrive, --ondisk or --use-uuid partition options must be used for
- each partition that specifies a mountpoint.
+ --ondrive, --ondisk, --use-uuid or --use-label partition options must
+ be used for each partition that specifies a mountpoint. Note that with
+ --use-{uuid,label} and non-root <mountpoint>, including swap, the mount
+ program must understand the PARTUUID or LABEL syntax. This currently
+ excludes the busybox versions of these applications.
The following are supported 'part' options:
@@ -646,6 +878,12 @@ DESCRIPTION
not specified, the size is in MB.
You do not need this option if you use --source.
+ --fixed-size: Exact partition size. Value format is the same
+ as for --size option. This option cannot be
+ specified along with --size. If partition data
+ is larger than --fixed-size and error will be
+ raised when assembling disk image.
+
--source: This option is a wic-specific option that names the
source of the data that will populate the
partition. The most common value for this option
@@ -684,6 +922,8 @@ DESCRIPTION
apply to partitions created using '--source rootfs' (see
--source above). Valid values are:
+ vfat
+ msdos
ext2
ext3
ext4
@@ -703,6 +943,14 @@ DESCRIPTION
label is already in use by another filesystem,
a new label is created for the partition.
+ --use-label: This option is specific to wic. It makes wic to use the
+ label in /etc/fstab to specify a partition. If the
+ --use-label and --use-uuid are used at the same time,
+ we prefer the uuid because it is less likely to cause
+ name confliction. We don't support using this parameter
+ on the root partition since it requires an initramfs to
+ parse this value and we do not currently support that.
+
--active: Marks the partition as active.
--align (in KBytes): This option is specific to wic and says
@@ -715,17 +963,27 @@ DESCRIPTION
partition table. It may be useful for
bootloaders.
+ --exclude-path: This option is specific to wic. It excludes the given
+ relative path from the resulting image. If the path
+ ends with a slash, only the content of the directory
+ is omitted, not the directory itself. This option only
+ has an effect with the rootfs source plugin.
+
--extra-space: This option is specific to wic. It adds extra
space after the space filled by the content
of the partition. The final size can go
beyond the size specified by --size.
- By default, 10MB.
+ By default, 10MB. This option cannot be used
+ with --fixed-size option.
--overhead-factor: This option is specific to wic. The
size of the partition is multiplied by
this factor. It has to be greater than or
- equal to 1.
- The default value is 1.3.
+ equal to 1. The default value is 1.3.
+ This option cannot be used with --fixed-size
+ option.
+
+ --part-name: This option is specific to wic. It specifies name for GPT partitions.
--part-type: This option is specific to wic. It specifies partition
type GUID for GPT partitions.
@@ -741,10 +999,21 @@ DESCRIPTION
in bootloader configuration before running wic. In this case .wks file can
be generated or modified to set preconfigured parition UUID using this option.
+ --fsuuid: This option is specific to wic. It specifies filesystem UUID.
+ It's useful if preconfigured filesystem UUID is added to kernel command line
+ in bootloader configuration before running wic. In this case .wks file can
+ be generated or modified to set preconfigured filesystem UUID using this option.
+
--system-id: This option is specific to wic. It specifies partition system id. It's useful
for the harware that requires non-default partition system ids. The parameter
in one byte long hex number either with 0x prefix or without it.
+ --mkfs-extraopts: This option specifies extra options to pass to mkfs utility.
+ NOTE, that wic uses default options for some filesystems, for example
+ '-S 512' for mkfs.fat or '-F -i 8192' for mkfs.ext. Those options will
+ not take effect when --mkfs-extraopts is used. This should be taken into
+ account when using --mkfs-extraopts.
+
* bootloader
This command allows the user to specify various bootloader
@@ -782,3 +1051,67 @@ DESCRIPTION
.wks files.
"""
+
+wic_help_help = """
+NAME
+ wic help - display a help topic
+
+DESCRIPTION
+ Specify a help topic to display it. Topics are shown above.
+"""
+
+
+wic_help = """
+Creates a customized OpenEmbedded image.
+
+Usage: wic [--version]
+ wic help [COMMAND or TOPIC]
+ wic COMMAND [ARGS]
+
+ usage 1: Returns the current version of Wic
+ usage 2: Returns detailed help for a COMMAND or TOPIC
+ usage 3: Executes COMMAND
+
+
+COMMAND:
+
+ list - List available canned images and source plugins
+ ls - List contents of partitioned image or partition
+ rm - Remove files or directories from the vfat or ext* partitions
+ help - Show help for a wic COMMAND or TOPIC
+ write - Write an image to a device
+ cp - Copy files and directories to the vfat or ext* partitions
+ create - Create a new OpenEmbedded image
+
+
+TOPIC:
+ overview - Presents an overall overview of Wic
+ plugins - Presents an overview and API for Wic plugins
+ kickstart - Presents a Wic kicstart file reference
+
+
+Examples:
+
+ $ wic --version
+
+ Returns the current version of Wic
+
+
+ $ wic help cp
+
+ Returns the SYNOPSIS and DESCRIPTION for the Wic "cp" command.
+
+
+ $ wic list images
+
+ Returns the list of canned images (i.e. *.wks files located in
+ the /scripts/lib/wic/canned-wks directory.
+
+
+ $ wic create mkefidisk -e core-image-minimal
+
+ Creates an EFI disk image from artifacts used in a previous
+ core-image-minimal build in standard BitBake locations
+ (e.g. Cooked Mode).
+
+"""
diff --git a/scripts/lib/wic/imager/baseimager.py b/scripts/lib/wic/imager/baseimager.py
deleted file mode 100644
index 1a52dd8b4d..0000000000
--- a/scripts/lib/wic/imager/baseimager.py
+++ /dev/null
@@ -1,191 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2007 Red Hat Inc.
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import tempfile
-import shutil
-
-from wic import msger
-from wic.utils.errors import CreatorError
-from wic.utils import runner
-
-class BaseImageCreator():
- """Base class for image creation.
-
- BaseImageCreator is the simplest creator class available; it will
- create a system image according to the supplied kickstart file.
-
- e.g.
-
- import wic.imgcreate as imgcreate
- ks = imgcreate.read_kickstart("foo.ks")
- imgcreate.ImageCreator(ks, "foo").create()
- """
-
- def __del__(self):
- self.cleanup()
-
- def __init__(self, createopts=None):
- """Initialize an ImageCreator instance.
-
- ks -- a pykickstart.KickstartParser instance; this instance will be
- used to drive the install by e.g. providing the list of packages
- to be installed, the system configuration and %post scripts
-
- name -- a name for the image; used for e.g. image filenames or
- filesystem labels
- """
-
- self.__builddir = None
-
- self.ks = None
- self.name = "target"
- self.tmpdir = "/var/tmp/wic"
- self.workdir = "/var/tmp/wic/build"
-
- # setup tmpfs tmpdir when enabletmpfs is True
- self.enabletmpfs = False
-
- if createopts:
- # Mapping table for variables that have different names.
- optmap = {"outdir" : "destdir",
- }
-
- # update setting from createopts
- for key in createopts:
- if key in optmap:
- option = optmap[key]
- else:
- option = key
- setattr(self, option, createopts[key])
-
- self.destdir = os.path.abspath(os.path.expanduser(self.destdir))
-
- self._dep_checks = ["ls", "bash", "cp", "echo"]
-
- # Output image file names
- self.outimage = []
-
- # No ks provided when called by convertor, so skip the dependency check
- if self.ks:
- # If we have btrfs partition we need to check necessary tools
- for part in self.ks.partitions:
- if part.fstype and part.fstype == "btrfs":
- self._dep_checks.append("mkfs.btrfs")
- break
-
- # make sure the specified tmpdir and cachedir exist
- if not os.path.exists(self.tmpdir):
- os.makedirs(self.tmpdir)
-
-
- #
- # Hooks for subclasses
- #
- def _create(self):
- """Create partitions for the disk image(s)
-
- This is the hook where subclasses may create the partitions
- that will be assembled into disk image(s).
-
- There is no default implementation.
- """
- pass
-
- def _cleanup(self):
- """Undo anything performed in _create().
-
- This is the hook where subclasses must undo anything which was
- done in _create().
-
- There is no default implementation.
-
- """
- pass
-
- #
- # Actual implementation
- #
- def __ensure_builddir(self):
- if not self.__builddir is None:
- return
-
- try:
- self.workdir = os.path.join(self.tmpdir, "build")
- if not os.path.exists(self.workdir):
- os.makedirs(self.workdir)
- self.__builddir = tempfile.mkdtemp(dir=self.workdir,
- prefix="imgcreate-")
- except OSError as err:
- raise CreatorError("Failed create build directory in %s: %s" %
- (self.tmpdir, err))
-
- def __setup_tmpdir(self):
- if not self.enabletmpfs:
- return
-
- runner.show('mount -t tmpfs -o size=4G tmpfs %s' % self.workdir)
-
- def __clean_tmpdir(self):
- if not self.enabletmpfs:
- return
-
- runner.show('umount -l %s' % self.workdir)
-
- def create(self):
- """Create partitions for the disk image(s)
-
- Create the partitions that will be assembled into disk
- image(s).
- """
- self.__setup_tmpdir()
- self.__ensure_builddir()
-
- self._create()
-
- def cleanup(self):
- """Undo anything performed in create().
-
- Note, make sure to call this method once finished with the creator
- instance in order to ensure no stale files are left on the host e.g.:
-
- creator = ImageCreator(ks, name)
- try:
- creator.create()
- finally:
- creator.cleanup()
-
- """
- if not self.__builddir:
- return
-
- self._cleanup()
-
- shutil.rmtree(self.__builddir, ignore_errors=True)
- self.__builddir = None
-
- self.__clean_tmpdir()
-
-
- def print_outimage_info(self):
- msg = "The new image can be found here:\n"
- self.outimage.sort()
- for path in self.outimage:
- msg += ' %s\n' % os.path.abspath(path)
-
- msger.info(msg)
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
deleted file mode 100644
index ffde232c2b..0000000000
--- a/scripts/lib/wic/imager/direct.py
+++ /dev/null
@@ -1,407 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This implements the 'direct' image creator class for 'wic'
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] linux.intel.com>
-#
-
-import os
-import shutil
-
-from wic import msger
-from wic.utils.oe.misc import get_bitbake_var
-from wic.utils.partitionedfs import Image
-from wic.utils.errors import CreatorError, ImageError
-from wic.imager.baseimager import BaseImageCreator
-from wic.plugin import pluginmgr
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd
-
-disk_methods = {
- "do_install_disk":None,
-}
-
-class DiskImage():
- """
- A Disk backed by a file.
- """
- def __init__(self, device, size):
- self.size = size
- self.device = device
- self.created = False
-
- def exists(self):
- return os.path.exists(self.device)
-
- def create(self):
- if self.created:
- return
- # create sparse disk image
- cmd = "truncate %s -s %s" % (self.device, self.size)
- exec_cmd(cmd)
- self.created = True
-
-class DirectImageCreator(BaseImageCreator):
- """
- Installs a system into a file containing a partitioned disk image.
-
- DirectImageCreator is an advanced ImageCreator subclass; an image
- file is formatted with a partition table, each partition created
- from a rootfs or other OpenEmbedded build artifact and dd'ed into
- the virtual disk. The disk image can subsequently be dd'ed onto
- media and used on actual hardware.
- """
-
- def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir,
- kernel_dir, native_sysroot, compressor, creatoropts=None,
- bmap=False):
- """
- Initialize a DirectImageCreator instance.
-
- This method takes the same arguments as ImageCreator.__init__()
- """
- BaseImageCreator.__init__(self, creatoropts)
-
- self.__image = None
- self.__disks = {}
- self.__disk_format = "direct"
- self._disk_names = []
- self.ptable_format = self.ks.bootloader.ptable
-
- self.oe_builddir = oe_builddir
- if image_output_dir:
- self.tmpdir = image_output_dir
- self.rootfs_dir = rootfs_dir
- self.bootimg_dir = bootimg_dir
- self.kernel_dir = kernel_dir
- self.native_sysroot = native_sysroot
- self.compressor = compressor
- self.bmap = bmap
-
- def __get_part_num(self, num, parts):
- """calculate the real partition number, accounting for partitions not
- in the partition table and logical partitions
- """
- realnum = 0
- for pnum, part in enumerate(parts, 1):
- if not part.no_table:
- realnum += 1
- if pnum == num:
- if part.no_table:
- return 0
- if self.ptable_format == 'msdos' and realnum > 3:
- # account for logical partition numbering, ex. sda5..
- return realnum + 1
- return realnum
-
- def _write_fstab(self, image_rootfs):
- """overriden to generate fstab (temporarily) in rootfs. This is called
- from _create, make sure it doesn't get called from
- BaseImage.create()
- """
- if not image_rootfs:
- return
-
- fstab_path = image_rootfs + "/etc/fstab"
- if not os.path.isfile(fstab_path):
- return
-
- with open(fstab_path) as fstab:
- fstab_lines = fstab.readlines()
-
- if self._update_fstab(fstab_lines, self._get_parts()):
- shutil.copyfile(fstab_path, fstab_path + ".orig")
-
- with open(fstab_path, "w") as fstab:
- fstab.writelines(fstab_lines)
-
- return fstab_path
-
- def _update_fstab(self, fstab_lines, parts):
- """Assume partition order same as in wks"""
- updated = False
- for num, part in enumerate(parts, 1):
- pnum = self.__get_part_num(num, parts)
- if not pnum or not part.mountpoint \
- or part.mountpoint in ("/", "/boot"):
- continue
-
- # mmc device partitions are named mmcblk0p1, mmcblk0p2..
- prefix = 'p' if part.disk.startswith('mmcblk') else ''
- device_name = "/dev/%s%s%d" % (part.disk, prefix, pnum)
-
- opts = part.fsopts if part.fsopts else "defaults"
- line = "\t".join([device_name, part.mountpoint, part.fstype,
- opts, "0", "0"]) + "\n"
-
- fstab_lines.append(line)
- updated = True
-
- return updated
-
- def set_bootimg_dir(self, bootimg_dir):
- """
- Accessor for bootimg_dir, the actual location used for the source
- of the bootimg. Should be set by source plugins (only if they
- change the default bootimg source) so the correct info gets
- displayed for print_outimage_info().
- """
- self.bootimg_dir = bootimg_dir
-
- def _get_parts(self):
- if not self.ks:
- raise CreatorError("Failed to get partition info, "
- "please check your kickstart setting.")
-
- # Set a default partition if no partition is given out
- if not self.ks.partitions:
- partstr = "part / --size 1900 --ondisk sda --fstype=ext3"
- args = partstr.split()
- part = self.ks.parse(args[1:])
- if part not in self.ks.partitions:
- self.ks.partitions.append(part)
-
- # partitions list from kickstart file
- return self.ks.partitions
-
- def get_disk_names(self):
- """ Returns a list of physical target disk names (e.g., 'sdb') which
- will be created. """
-
- if self._disk_names:
- return self._disk_names
-
- #get partition info from ks handler
- parts = self._get_parts()
-
- for i in range(len(parts)):
- if parts[i].disk:
- disk_name = parts[i].disk
- else:
- raise CreatorError("Failed to create disks, no --ondisk "
- "specified in partition line of ks file")
-
- if parts[i].mountpoint and not parts[i].fstype:
- raise CreatorError("Failed to create disks, no --fstype "
- "specified for partition with mountpoint "
- "'%s' in the ks file")
-
- self._disk_names.append(disk_name)
-
- return self._disk_names
-
- def _full_name(self, name, extention):
- """ Construct full file name for a file we generate. """
- return "%s-%s.%s" % (self.name, name, extention)
-
- def _full_path(self, path, name, extention):
- """ Construct full file path to a file we generate. """
- return os.path.join(path, self._full_name(name, extention))
-
- def get_default_source_plugin(self):
- """
- The default source plugin i.e. the plugin that's consulted for
- overall image generation tasks outside of any particular
- partition. For convenience, we just hang it off the
- bootloader handler since it's the one non-partition object in
- any setup. By default the default plugin is set to the same
- plugin as the /boot partition; since we hang it off the
- bootloader object, the default can be explicitly set using the
- --source bootloader param.
- """
- return self.ks.bootloader.source
-
- #
- # Actual implemention
- #
- def _create(self):
- """
- For 'wic', we already have our build artifacts - we just create
- filesystems from the artifacts directly and combine them into
- a partitioned image.
- """
- parts = self._get_parts()
-
- self.__image = Image(self.native_sysroot)
-
- for part in parts:
- # as a convenience, set source to the boot partition source
- # instead of forcing it to be set via bootloader --source
- if not self.ks.bootloader.source and part.mountpoint == "/boot":
- self.ks.bootloader.source = part.source
-
- fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
-
- shutil.rmtree(self.workdir)
- os.mkdir(self.workdir)
-
- for part in parts:
- # get rootfs size from bitbake variable if it's not set in .ks file
- if not part.size:
- # and if rootfs name is specified for the partition
- image_name = part.rootfs_dir
- if image_name:
- # Bitbake variable ROOTFS_SIZE is calculated in
- # Image._get_rootfs_size method from meta/lib/oe/image.py
- # using IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGNMENT,
- # IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE
- rsize_bb = get_bitbake_var('ROOTFS_SIZE', image_name)
- if rsize_bb:
- part.size = int(round(float(rsize_bb)))
- # need to create the filesystems in order to get their
- # sizes before we can add them and do the layout.
- # Image.create() actually calls __format_disks() to create
- # the disk images and carve out the partitions, then
- # self.assemble() calls Image.assemble() which calls
- # __write_partitition() for each partition to dd the fs
- # into the partitions.
- part.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir,
- self.bootimg_dir, self.kernel_dir, self.native_sysroot)
-
-
- self.__image.add_partition(int(part.size),
- part.disk,
- part.mountpoint,
- part.source_file,
- part.fstype,
- part.label,
- fsopts=part.fsopts,
- boot=part.active,
- align=part.align,
- no_table=part.no_table,
- part_type=part.part_type,
- uuid=part.uuid,
- system_id=part.system_id)
-
- if fstab_path:
- shutil.move(fstab_path + ".orig", fstab_path)
-
- self.__image.layout_partitions(self.ptable_format)
-
- self.__imgdir = self.workdir
- for disk_name, disk in self.__image.disks.items():
- full_path = self._full_path(self.__imgdir, disk_name, "direct")
- msger.debug("Adding disk %s as %s with size %s bytes" \
- % (disk_name, full_path, disk['min_size']))
- disk_obj = DiskImage(full_path, disk['min_size'])
- self.__disks[disk_name] = disk_obj
- self.__image.add_disk(disk_name, disk_obj)
-
- self.__image.create()
-
- def assemble(self):
- """
- Assemble partitions into disk image(s)
- """
- for disk_name, disk in self.__image.disks.items():
- full_path = self._full_path(self.__imgdir, disk_name, "direct")
- msger.debug("Assembling disk %s as %s with size %s bytes" \
- % (disk_name, full_path, disk['min_size']))
- self.__image.assemble(full_path)
-
- def finalize(self):
- """
- Finalize the disk image.
-
- For example, prepare the image to be bootable by e.g.
- creating and installing a bootloader configuration.
-
- """
- source_plugin = self.get_default_source_plugin()
- if source_plugin:
- self._source_methods = pluginmgr.get_source_plugin_methods(source_plugin, disk_methods)
- for disk_name, disk in self.__image.disks.items():
- self._source_methods["do_install_disk"](disk, disk_name, self,
- self.workdir,
- self.oe_builddir,
- self.bootimg_dir,
- self.kernel_dir,
- self.native_sysroot)
-
- for disk_name, disk in self.__image.disks.items():
- full_path = self._full_path(self.__imgdir, disk_name, "direct")
- # Generate .bmap
- if self.bmap:
- msger.debug("Generating bmap file for %s" % disk_name)
- exec_native_cmd("bmaptool create %s -o %s.bmap" % (full_path, full_path),
- self.native_sysroot)
- # Compress the image
- if self.compressor:
- msger.debug("Compressing disk %s with %s" % (disk_name, self.compressor))
- exec_cmd("%s %s" % (self.compressor, full_path))
-
- def print_outimage_info(self):
- """
- Print the image(s) and artifacts used, for the user.
- """
- msg = "The new image(s) can be found here:\n"
-
- parts = self._get_parts()
-
- for disk_name in self.__image.disks:
- extension = "direct" + {"gzip": ".gz",
- "bzip2": ".bz2",
- "xz": ".xz",
- "": ""}.get(self.compressor)
- full_path = self._full_path(self.__imgdir, disk_name, extension)
- msg += ' %s\n\n' % full_path
-
- msg += 'The following build artifacts were used to create the image(s):\n'
- for part in parts:
- if part.rootfs_dir is None:
- continue
- if part.mountpoint == '/':
- suffix = ':'
- else:
- suffix = '["%s"]:' % (part.mountpoint or part.label)
- msg += ' ROOTFS_DIR%s%s\n' % (suffix.ljust(20), part.rootfs_dir)
-
- msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir
- msg += ' KERNEL_DIR: %s\n' % self.kernel_dir
- msg += ' NATIVE_SYSROOT: %s\n' % self.native_sysroot
-
- msger.info(msg)
-
- @property
- def rootdev(self):
- """
- Get root device name to use as a 'root' parameter
- in kernel command line.
-
- Assume partition order same as in wks
- """
- parts = self._get_parts()
- for num, part in enumerate(parts, 1):
- if part.mountpoint == "/":
- if part.uuid:
- return "PARTUUID=%s" % part.uuid
- else:
- suffix = 'p' if part.disk.startswith('mmcblk') else ''
- pnum = self.__get_part_num(num, parts)
- return "/dev/%s%s%-d" % (part.disk, suffix, pnum)
-
- def _cleanup(self):
- if not self.__image is None:
- try:
- self.__image.cleanup()
- except ImageError as err:
- msger.warning("%s" % err)
-
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 0894e2b199..6a643ba3af 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -1,21 +1,8 @@
-#!/usr/bin/env python -tt
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#!/usr/bin/env python3
#
# Copyright (c) 2016 Intel, Inc.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This module provides parser for kickstart format
@@ -27,11 +14,30 @@
import os
import shlex
+import logging
+import re
+
from argparse import ArgumentParser, ArgumentError, ArgumentTypeError
-from wic import msger
+from wic.engine import find_canned
from wic.partition import Partition
-from wic.utils.misc import find_canned
+from wic.misc import get_bitbake_var
+
+logger = logging.getLogger('wic')
+
+__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
+
+def expand_line(line):
+ while True:
+ m = __expand_var_regexp__.search(line)
+ if not m:
+ return line
+ key = m.group()[2:-1]
+ val = get_bitbake_var(key)
+ if val is None:
+ logger.warning("cannot expand variable %s" % key)
+ return line
+ line = line[:m.start()] + val + line[m.end():]
class KickStartError(Exception):
"""Custom exception."""
@@ -111,7 +117,10 @@ def systemidtype(arg):
return arg
class KickStart():
- """"Kickstart parser implementation."""
+ """Kickstart parser implementation."""
+
+ DEFAULT_EXTRA_SPACE = 10*1024
+ DEFAULT_OVERHEAD_FACTOR = 1.3
def __init__(self, confpath):
@@ -127,21 +136,38 @@ class KickStart():
part.add_argument('mountpoint', nargs='?')
part.add_argument('--active', action='store_true')
part.add_argument('--align', type=int)
- part.add_argument("--extra-space", type=sizetype, default=10*1024)
+ part.add_argument('--exclude-path', nargs='+')
+ part.add_argument("--extra-space", type=sizetype)
part.add_argument('--fsoptions', dest='fsopts')
- part.add_argument('--fstype')
+ part.add_argument('--fstype', default='vfat',
+ choices=('ext2', 'ext3', 'ext4', 'btrfs',
+ 'squashfs', 'vfat', 'msdos', 'swap'))
+ part.add_argument('--mkfs-extraopts', default='')
part.add_argument('--label')
+ part.add_argument('--use-label', action='store_true')
part.add_argument('--no-table', action='store_true')
- part.add_argument('--ondisk', '--ondrive', dest='disk')
- part.add_argument("--overhead-factor", type=overheadtype, default=1.3)
+ part.add_argument('--ondisk', '--ondrive', dest='disk', default='sda')
+ part.add_argument("--overhead-factor", type=overheadtype)
+ part.add_argument('--part-name')
part.add_argument('--part-type')
part.add_argument('--rootfs-dir')
- part.add_argument('--size', type=sizetype, default=0)
+ part.add_argument('--type', default='primary',
+ choices = ('primary', 'logical'))
+
+ # --size and --fixed-size cannot be specified together; options
+ # ----extra-space and --overhead-factor should also raise a parser
+ # --error, but since nesting mutually exclusive groups does not work,
+ # ----extra-space/--overhead-factor are handled later
+ sizeexcl = part.add_mutually_exclusive_group()
+ sizeexcl.add_argument('--size', type=sizetype, default=0)
+ sizeexcl.add_argument('--fixed-size', type=sizetype, default=0)
+
part.add_argument('--source')
part.add_argument('--sourceparams')
part.add_argument('--system-id', type=systemidtype)
part.add_argument('--use-uuid', action='store_true')
part.add_argument('--uuid')
+ part.add_argument('--fsuuid')
bootloader = subparsers.add_parser('bootloader')
bootloader.add_argument('--append')
@@ -156,7 +182,7 @@ class KickStart():
self._parse(parser, confpath)
if not self.bootloader:
- msger.warning('bootloader config not specified, using defaults')
+ logger.warning('bootloader config not specified, using defaults\n')
self.bootloader = bootloader.parse_args([])
def _parse(self, parser, confpath):
@@ -169,12 +195,49 @@ class KickStart():
line = line.strip()
lineno += 1
if line and line[0] != '#':
+ line = expand_line(line)
try:
- parsed = parser.parse_args(shlex.split(line))
+ line_args = shlex.split(line)
+ parsed = parser.parse_args(line_args)
except ArgumentError as err:
raise KickStartError('%s:%d: %s' % \
(confpath, lineno, err))
if line.startswith('part'):
+ # SquashFS does not support filesystem UUID
+ if parsed.fstype == 'squashfs':
+ if parsed.fsuuid:
+ err = "%s:%d: SquashFS does not support UUID" \
+ % (confpath, lineno)
+ raise KickStartError(err)
+ if parsed.label:
+ err = "%s:%d: SquashFS does not support LABEL" \
+ % (confpath, lineno)
+ raise KickStartError(err)
+ if parsed.use_label and not parsed.label:
+ err = "%s:%d: Must set the label with --label" \
+ % (confpath, lineno)
+ raise KickStartError(err)
+ # using ArgumentParser one cannot easily tell if option
+ # was passed as argument, if said option has a default
+ # value; --overhead-factor/--extra-space cannot be used
+ # with --fixed-size, so at least detect when these were
+ # passed with non-0 values ...
+ if parsed.fixed_size:
+ if parsed.overhead_factor or parsed.extra_space:
+ err = "%s:%d: arguments --overhead-factor and --extra-space not "\
+ "allowed with argument --fixed-size" \
+ % (confpath, lineno)
+ raise KickStartError(err)
+ else:
+ # ... and provide defaults if not using
+ # --fixed-size iff given option was not used
+ # (again, one cannot tell if option was passed but
+ # with value equal to 0)
+ if '--overhead-factor' not in line_args:
+ parsed.overhead_factor = self.DEFAULT_OVERHEAD_FACTOR
+ if '--extra-space' not in line_args:
+ parsed.extra_space = self.DEFAULT_EXTRA_SPACE
+
self.partnum += 1
self.partitions.append(Partition(parsed, self.partnum))
elif line.startswith('include'):
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
new file mode 100644
index 0000000000..1f199b9f23
--- /dev/null
+++ b/scripts/lib/wic/misc.py
@@ -0,0 +1,249 @@
+#
+# Copyright (c) 2013, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# DESCRIPTION
+# This module provides a place to collect various wic-related utils
+# for the OpenEmbedded Image Tools.
+#
+# AUTHORS
+# Tom Zanussi <tom.zanussi (at] linux.intel.com>
+#
+"""Miscellaneous functions."""
+
+import logging
+import os
+import re
+import subprocess
+
+from collections import defaultdict
+from distutils import spawn
+
+from wic import WicError
+
+logger = logging.getLogger('wic')
+
+# executable -> recipe pairs for exec_native_cmd
+NATIVE_RECIPES = {"bmaptool": "bmap-tools",
+ "grub-mkimage": "grub-efi",
+ "isohybrid": "syslinux",
+ "mcopy": "mtools",
+ "mdel" : "mtools",
+ "mdeltree" : "mtools",
+ "mdir" : "mtools",
+ "mkdosfs": "dosfstools",
+ "mkisofs": "cdrtools",
+ "mkfs.btrfs": "btrfs-tools",
+ "mkfs.ext2": "e2fsprogs",
+ "mkfs.ext3": "e2fsprogs",
+ "mkfs.ext4": "e2fsprogs",
+ "mkfs.vfat": "dosfstools",
+ "mksquashfs": "squashfs-tools",
+ "mkswap": "util-linux",
+ "mmd": "mtools",
+ "parted": "parted",
+ "sfdisk": "util-linux",
+ "sgdisk": "gptfdisk",
+ "syslinux": "syslinux"
+ }
+
+def runtool(cmdln_or_args):
+ """ wrapper for most of the subprocess calls
+ input:
+ cmdln_or_args: can be both args and cmdln str (shell=True)
+ return:
+ rc, output
+ """
+ if isinstance(cmdln_or_args, list):
+ cmd = cmdln_or_args[0]
+ shell = False
+ else:
+ import shlex
+ cmd = shlex.split(cmdln_or_args)[0]
+ shell = True
+
+ sout = subprocess.PIPE
+ serr = subprocess.STDOUT
+
+ try:
+ process = subprocess.Popen(cmdln_or_args, stdout=sout,
+ stderr=serr, shell=shell)
+ sout, serr = process.communicate()
+ # combine stdout and stderr, filter None out and decode
+ out = ''.join([out.decode('utf-8') for out in [sout, serr] if out])
+ except OSError as err:
+ if err.errno == 2:
+ # [Errno 2] No such file or directory
+ raise WicError('Cannot run command: %s, lost dependency?' % cmd)
+ else:
+ raise # relay
+
+ return process.returncode, out
+
+def _exec_cmd(cmd_and_args, as_shell=False):
+ """
+ Execute command, catching stderr, stdout
+
+ Need to execute as_shell if the command uses wildcards
+ """
+ logger.debug("_exec_cmd: %s", cmd_and_args)
+ args = cmd_and_args.split()
+ logger.debug(args)
+
+ if as_shell:
+ ret, out = runtool(cmd_and_args)
+ else:
+ ret, out = runtool(args)
+ out = out.strip()
+ if ret != 0:
+ raise WicError("_exec_cmd: %s returned '%s' instead of 0\noutput: %s" % \
+ (cmd_and_args, ret, out))
+
+ logger.debug("_exec_cmd: output for %s (rc = %d): %s",
+ cmd_and_args, ret, out)
+
+ return ret, out
+
+
+def exec_cmd(cmd_and_args, as_shell=False):
+ """
+ Execute command, return output
+ """
+ return _exec_cmd(cmd_and_args, as_shell)[1]
+
+
+def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""):
+ """
+ Execute native command, catching stderr, stdout
+
+ Need to execute as_shell if the command uses wildcards
+
+ Always need to execute native commands as_shell
+ """
+ # The reason -1 is used is because there may be "export" commands.
+ args = cmd_and_args.split(';')[-1].split()
+ logger.debug(args)
+
+ if pseudo:
+ cmd_and_args = pseudo + cmd_and_args
+
+ native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \
+ (native_sysroot, native_sysroot, native_sysroot)
+
+ native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
+ (native_paths, cmd_and_args)
+ logger.debug("exec_native_cmd: %s", native_cmd_and_args)
+
+ # If the command isn't in the native sysroot say we failed.
+ if spawn.find_executable(args[0], native_paths):
+ ret, out = _exec_cmd(native_cmd_and_args, True)
+ else:
+ ret = 127
+ out = "can't find native executable %s in %s" % (args[0], native_paths)
+
+ prog = args[0]
+ # shell command-not-found
+ if ret == 127 \
+ or (pseudo and ret == 1 and out == "Can't find '%s' in $PATH." % prog):
+ msg = "A native program %s required to build the image "\
+ "was not found (see details above).\n\n" % prog
+ recipe = NATIVE_RECIPES.get(prog)
+ if recipe:
+ msg += "Please make sure wic-tools have %s-native in its DEPENDS, "\
+ "build it with 'bitbake wic-tools' and try again.\n" % recipe
+ else:
+ msg += "Wic failed to find a recipe to build native %s. Please "\
+ "file a bug against wic.\n" % prog
+ raise WicError(msg)
+
+ return ret, out
+
+BOOTDD_EXTRA_SPACE = 16384
+
+class BitbakeVars(defaultdict):
+ """
+ Container for Bitbake variables.
+ """
+ def __init__(self):
+ defaultdict.__init__(self, dict)
+
+ # default_image and vars_dir attributes should be set from outside
+ self.default_image = None
+ self.vars_dir = None
+
+ def _parse_line(self, line, image, matcher=re.compile(r"^([a-zA-Z0-9\-_+./~]+)=(.*)")):
+ """
+ Parse one line from bitbake -e output or from .env file.
+ Put result key-value pair into the storage.
+ """
+ if "=" not in line:
+ return
+ match = matcher.match(line)
+ if not match:
+ return
+ key, val = match.groups()
+ self[image][key] = val.strip('"')
+
+ def get_var(self, var, image=None, cache=True):
+ """
+ Get bitbake variable from 'bitbake -e' output or from .env file.
+ This is a lazy method, i.e. it runs bitbake or parses file only when
+ only when variable is requested. It also caches results.
+ """
+ if not image:
+ image = self.default_image
+
+ if image not in self:
+ if image and self.vars_dir:
+ fname = os.path.join(self.vars_dir, image + '.env')
+ if os.path.isfile(fname):
+ # parse .env file
+ with open(fname) as varsfile:
+ for line in varsfile:
+ self._parse_line(line, image)
+ else:
+ print("Couldn't get bitbake variable from %s." % fname)
+ print("File %s doesn't exist." % fname)
+ return
+ else:
+ # Get bitbake -e output
+ cmd = "bitbake -e"
+ if image:
+ cmd += " %s" % image
+
+ log_level = logger.getEffectiveLevel()
+ logger.setLevel(logging.INFO)
+ ret, lines = _exec_cmd(cmd)
+ logger.setLevel(log_level)
+
+ if ret:
+ logger.error("Couldn't get '%s' output.", cmd)
+ logger.error("Bitbake failed with error:\n%s\n", lines)
+ return
+
+ # Parse bitbake -e output
+ for line in lines.split('\n'):
+ self._parse_line(line, image)
+
+ # Make first image a default set of variables
+ if cache:
+ images = [key for key in self if key]
+ if len(images) == 1:
+ self[None] = self[image]
+
+ result = self[image].get(var)
+ if not cache:
+ self.pop(image, None)
+
+ return result
+
+# Create BB_VARS singleton
+BB_VARS = BitbakeVars()
+
+def get_bitbake_var(var, image=None, cache=True):
+ """
+ Provide old get_bitbake_var API by wrapping
+ get_var method of BB_VARS singleton.
+ """
+ return BB_VARS.get_var(var, image, cache)
diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py
deleted file mode 100644
index fb8336d94a..0000000000
--- a/scripts/lib/wic/msger.py
+++ /dev/null
@@ -1,235 +0,0 @@
-#!/usr/bin/env python -tt
-# vim: ai ts=4 sts=4 et sw=4
-#
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import sys
-import re
-import time
-
-__ALL__ = ['get_loglevel',
- 'set_loglevel',
- 'set_logfile',
- 'debug',
- 'verbose',
- 'info',
- 'warning',
- 'error',
- ]
-
-# COLORs in ANSI
-INFO_COLOR = 32 # green
-WARN_COLOR = 33 # yellow
-ERR_COLOR = 31 # red
-ASK_COLOR = 34 # blue
-NO_COLOR = 0
-
-PREFIX_RE = re.compile('^<(.*?)>\s*(.*)', re.S)
-
-INTERACTIVE = True
-
-LOG_LEVEL = 1
-LOG_LEVELS = {
- 'quiet': 0,
- 'normal': 1,
- 'verbose': 2,
- 'debug': 3,
- 'never': 4,
-}
-
-LOG_FILE_FP = None
-LOG_CONTENT = ''
-CATCHERR_BUFFILE_FD = -1
-CATCHERR_BUFFILE_PATH = None
-CATCHERR_SAVED_2 = -1
-
-def _general_print(head, color, msg=None, stream=None, level='normal'):
- global LOG_CONTENT
- if not stream:
- stream = sys.stdout
-
- if LOG_LEVELS[level] > LOG_LEVEL:
- # skip
- return
-
- errormsg = ''
- if CATCHERR_BUFFILE_FD > 0:
- size = os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_END)
- os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_SET)
- errormsg = os.read(CATCHERR_BUFFILE_FD, size)
- os.ftruncate(CATCHERR_BUFFILE_FD, 0)
-
- # append error msg to LOG
- if errormsg:
- LOG_CONTENT += errormsg
-
- # append normal msg to LOG
- save_msg = msg.strip() if msg else None
- if save_msg:
- timestr = time.strftime("[%m/%d %H:%M:%S %Z] ", time.localtime())
- LOG_CONTENT += timestr + save_msg + '\n'
-
- if errormsg:
- _color_print('', NO_COLOR, errormsg, stream, level)
-
- _color_print(head, color, msg, stream, level)
-
-def _color_print(head, color, msg, stream, level):
- colored = True
- if color == NO_COLOR or \
- not stream.isatty() or \
- os.getenv('ANSI_COLORS_DISABLED') is not None:
- colored = False
-
- if head.startswith('\r'):
- # need not \n at last
- newline = False
- else:
- newline = True
-
- if colored:
- head = '\033[%dm%s:\033[0m ' %(color, head)
- if not newline:
- # ESC cmd to clear line
- head = '\033[2K' + head
- else:
- if head:
- head += ': '
- if head.startswith('\r'):
- head = head.lstrip()
- newline = True
-
- if msg is not None:
- stream.write('%s%s' % (head, msg))
- if newline:
- stream.write('\n')
-
- stream.flush()
-
-def _color_perror(head, color, msg, level='normal'):
- if CATCHERR_BUFFILE_FD > 0:
- _general_print(head, color, msg, sys.stdout, level)
- else:
- _general_print(head, color, msg, sys.stderr, level)
-
-def _split_msg(head, msg):
- if isinstance(msg, list):
- msg = '\n'.join(map(str, msg))
-
- if msg.startswith('\n'):
- # means print \n at first
- msg = msg.lstrip()
- head = '\n' + head
-
- elif msg.startswith('\r'):
- # means print \r at first
- msg = msg.lstrip()
- head = '\r' + head
-
- match = PREFIX_RE.match(msg)
- if match:
- head += ' <%s>' % match.group(1)
- msg = match.group(2)
-
- return head, msg
-
-def get_loglevel():
- return next((k for k, v in LOG_LEVELS.items() if v == LOG_LEVEL))
-
-def set_loglevel(level):
- global LOG_LEVEL
- if level not in LOG_LEVELS:
- # no effect
- return
-
- LOG_LEVEL = LOG_LEVELS[level]
-
-def set_interactive(mode=True):
- global INTERACTIVE
- if mode:
- INTERACTIVE = True
- else:
- INTERACTIVE = False
-
-def log(msg=''):
- # log msg to LOG_CONTENT then save to logfile
- global LOG_CONTENT
- if msg:
- LOG_CONTENT += msg
-
-def info(msg):
- head, msg = _split_msg('Info', msg)
- _general_print(head, INFO_COLOR, msg)
-
-def verbose(msg):
- head, msg = _split_msg('Verbose', msg)
- _general_print(head, INFO_COLOR, msg, level='verbose')
-
-def warning(msg):
- head, msg = _split_msg('Warning', msg)
- _color_perror(head, WARN_COLOR, msg)
-
-def debug(msg):
- head, msg = _split_msg('Debug', msg)
- _color_perror(head, ERR_COLOR, msg, level='debug')
-
-def error(msg):
- head, msg = _split_msg('Error', msg)
- _color_perror(head, ERR_COLOR, msg)
- sys.exit(1)
-
-def set_logfile(fpath):
- global LOG_FILE_FP
-
- def _savelogf():
- if LOG_FILE_FP:
- with open(LOG_FILE_FP, 'w') as log:
- log.write(LOG_CONTENT)
-
- if LOG_FILE_FP is not None:
- warning('duplicate log file configuration')
-
- LOG_FILE_FP = fpath
-
- import atexit
- atexit.register(_savelogf)
-
-def enable_logstderr(fpath):
- global CATCHERR_BUFFILE_FD
- global CATCHERR_BUFFILE_PATH
- global CATCHERR_SAVED_2
-
- if os.path.exists(fpath):
- os.remove(fpath)
- CATCHERR_BUFFILE_PATH = fpath
- CATCHERR_BUFFILE_FD = os.open(CATCHERR_BUFFILE_PATH, os.O_RDWR|os.O_CREAT)
- CATCHERR_SAVED_2 = os.dup(2)
- os.dup2(CATCHERR_BUFFILE_FD, 2)
-
-def disable_logstderr():
- global CATCHERR_BUFFILE_FD
- global CATCHERR_BUFFILE_PATH
- global CATCHERR_SAVED_2
-
- raw(msg=None) # flush message buffer and print it.
- os.dup2(CATCHERR_SAVED_2, 2)
- os.close(CATCHERR_SAVED_2)
- os.close(CATCHERR_BUFFILE_FD)
- os.unlink(CATCHERR_BUFFILE_PATH)
- CATCHERR_BUFFILE_FD = -1
- CATCHERR_BUFFILE_PATH = None
- CATCHERR_SAVED_2 = -1
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 30cd320a30..d809408e1a 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -1,21 +1,7 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (c) 2013-2016 Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This module provides the OpenEmbedded partition object definitions.
@@ -24,19 +10,15 @@
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
# Ed Bartosh <ed.bartosh> (at] linux.intel.com>
+import logging
import os
-import tempfile
import uuid
-from wic.utils.oe.misc import msger, parse_sourceparams
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd
-from wic.plugin import pluginmgr
+from wic import WicError
+from wic.misc import exec_cmd, exec_native_cmd, get_bitbake_var
+from wic.pluginbase import PluginMgr
-partition_methods = {
- "do_stage_partition":None,
- "do_prepare_partition":None,
- "do_configure_partition":None,
-}
+logger = logging.getLogger('wic')
class Partition():
@@ -45,27 +27,33 @@ class Partition():
self.active = args.active
self.align = args.align
self.disk = args.disk
+ self.device = None
self.extra_space = args.extra_space
+ self.exclude_path = args.exclude_path
self.fsopts = args.fsopts
self.fstype = args.fstype
self.label = args.label
+ self.use_label = args.use_label
+ self.mkfs_extraopts = args.mkfs_extraopts
self.mountpoint = args.mountpoint
self.no_table = args.no_table
+ self.num = None
self.overhead_factor = args.overhead_factor
+ self.part_name = args.part_name
self.part_type = args.part_type
self.rootfs_dir = args.rootfs_dir
self.size = args.size
+ self.fixed_size = args.fixed_size
self.source = args.source
self.sourceparams = args.sourceparams
self.system_id = args.system_id
self.use_uuid = args.use_uuid
self.uuid = args.uuid
- if args.use_uuid and not self.uuid:
- self.uuid = str(uuid.uuid4())
+ self.fsuuid = args.fsuuid
+ self.type = args.type
self.lineno = lineno
self.source_file = ""
- self.sourceparams_dict = {}
def get_extra_block_count(self, current_blocks):
"""
@@ -74,132 +62,184 @@ class Partition():
number of (1k) blocks we need to add to get to --size, 0 if
we're already there or beyond.
"""
- msger.debug("Requested partition size for %s: %d" % \
- (self.mountpoint, self.size))
+ logger.debug("Requested partition size for %s: %d",
+ self.mountpoint, self.size)
if not self.size:
return 0
requested_blocks = self.size
- msger.debug("Requested blocks %d, current_blocks %d" % \
- (requested_blocks, current_blocks))
+ logger.debug("Requested blocks %d, current_blocks %d",
+ requested_blocks, current_blocks)
if requested_blocks > current_blocks:
return requested_blocks - current_blocks
else:
return 0
+ def get_rootfs_size(self, actual_rootfs_size=0):
+ """
+ Calculate the required size of rootfs taking into consideration
+ --size/--fixed-size flags as well as overhead and extra space, as
+ specified in kickstart file. Raises an error if the
+ `actual_rootfs_size` is larger than fixed-size rootfs.
+
+ """
+ if self.fixed_size:
+ rootfs_size = self.fixed_size
+ if actual_rootfs_size > rootfs_size:
+ raise WicError("Actual rootfs size (%d kB) is larger than "
+ "allowed size %d kB" %
+ (actual_rootfs_size, rootfs_size))
+ else:
+ extra_blocks = self.get_extra_block_count(actual_rootfs_size)
+ if extra_blocks < self.extra_space:
+ extra_blocks = self.extra_space
+
+ rootfs_size = actual_rootfs_size + extra_blocks
+ rootfs_size *= self.overhead_factor
+
+ logger.debug("Added %d extra blocks to %s to get to %d total blocks",
+ extra_blocks, self.mountpoint, rootfs_size)
+
+ return rootfs_size
+
+ @property
+ def disk_size(self):
+ """
+ Obtain on-disk size of partition taking into consideration
+ --size/--fixed-size options.
+
+ """
+ return self.fixed_size if self.fixed_size else self.size
+
def prepare(self, creator, cr_workdir, oe_builddir, rootfs_dir,
bootimg_dir, kernel_dir, native_sysroot):
"""
Prepare content for individual partitions, depending on
partition command parameters.
"""
- if self.sourceparams:
- self.sourceparams_dict = parse_sourceparams(self.sourceparams)
-
if not self.source:
- if not self.size:
- msger.error("The %s partition has a size of zero. Please "
- "specify a non-zero --size for that partition." % \
- self.mountpoint)
- if self.fstype and self.fstype == "swap":
+ if not self.size and not self.fixed_size:
+ raise WicError("The %s partition has a size of zero. Please "
+ "specify a non-zero --size/--fixed-size for that "
+ "partition." % self.mountpoint)
+
+ if self.fstype == "swap":
self.prepare_swap_partition(cr_workdir, oe_builddir,
native_sysroot)
self.source_file = "%s/fs.%s" % (cr_workdir, self.fstype)
- elif self.fstype:
+ else:
+ if self.fstype == 'squashfs':
+ raise WicError("It's not possible to create empty squashfs "
+ "partition '%s'" % (self.mountpoint))
+
rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label,
self.lineno, self.fstype)
if os.path.isfile(rootfs):
os.remove(rootfs)
- for prefix in ("ext", "btrfs", "vfat", "squashfs"):
- if self.fstype.startswith(prefix):
- method = getattr(self,
- "prepare_empty_partition_" + prefix)
- method(rootfs, oe_builddir, native_sysroot)
- self.source_file = rootfs
- break
+
+ prefix = "ext" if self.fstype.startswith("ext") else self.fstype
+ method = getattr(self, "prepare_empty_partition_" + prefix)
+ method(rootfs, oe_builddir, native_sysroot)
+ self.source_file = rootfs
return
- plugins = pluginmgr.get_source_plugins()
+ plugins = PluginMgr.get_plugins('source')
if self.source not in plugins:
- msger.error("The '%s' --source specified for %s doesn't exist.\n\t"
- "See 'wic list source-plugins' for a list of available"
- " --sources.\n\tSee 'wic help source-plugins' for "
- "details on adding a new source plugin." % \
- (self.source, self.mountpoint))
-
- self._source_methods = pluginmgr.get_source_plugin_methods(\
- self.source, partition_methods)
- self._source_methods["do_configure_partition"](self, self.sourceparams_dict,
- creator, cr_workdir,
- oe_builddir,
- bootimg_dir,
- kernel_dir,
- native_sysroot)
- self._source_methods["do_stage_partition"](self, self.sourceparams_dict,
- creator, cr_workdir,
- oe_builddir,
- bootimg_dir, kernel_dir,
- native_sysroot)
- self._source_methods["do_prepare_partition"](self, self.sourceparams_dict,
- creator, cr_workdir,
- oe_builddir,
- bootimg_dir, kernel_dir, rootfs_dir,
- native_sysroot)
-
- def prepare_rootfs_from_fs_image(self, cr_workdir, oe_builddir,
- rootfs_dir):
- """
- Handle an already-created partition e.g. xxx.ext3
- """
- rootfs = oe_builddir
- du_cmd = "du -Lbks %s" % rootfs
- out = exec_cmd(du_cmd)
- rootfs_size = out.split()[0]
+ raise WicError("The '%s' --source specified for %s doesn't exist.\n\t"
+ "See 'wic list source-plugins' for a list of available"
+ " --sources.\n\tSee 'wic help source-plugins' for "
+ "details on adding a new source plugin." %
+ (self.source, self.mountpoint))
- self.size = rootfs_size
- self.source_file = rootfs
+ srcparams_dict = {}
+ if self.sourceparams:
+ # Split sourceparams string of the form key1=val1[,key2=val2,...]
+ # into a dict. Also accepts valueless keys i.e. without =
+ splitted = self.sourceparams.split(',')
+ srcparams_dict = dict(par.split('=', 1) for par in splitted if par)
+
+ plugin = PluginMgr.get_plugins('source')[self.source]
+ plugin.do_configure_partition(self, srcparams_dict, creator,
+ cr_workdir, oe_builddir, bootimg_dir,
+ kernel_dir, native_sysroot)
+ plugin.do_stage_partition(self, srcparams_dict, creator,
+ cr_workdir, oe_builddir, bootimg_dir,
+ kernel_dir, native_sysroot)
+ plugin.do_prepare_partition(self, srcparams_dict, creator,
+ cr_workdir, oe_builddir, bootimg_dir,
+ kernel_dir, rootfs_dir, native_sysroot)
+ plugin.do_post_partition(self, srcparams_dict, creator,
+ cr_workdir, oe_builddir, bootimg_dir,
+ kernel_dir, rootfs_dir, native_sysroot)
+
+ # further processing required Partition.size to be an integer, make
+ # sure that it is one
+ if not isinstance(self.size, int):
+ raise WicError("Partition %s internal size is not an integer. "
+ "This a bug in source plugin %s and needs to be fixed." %
+ (self.mountpoint, self.source))
+
+ if self.fixed_size and self.size > self.fixed_size:
+ raise WicError("File system image of partition %s is "
+ "larger (%d kB) than its allowed size %d kB" %
+ (self.mountpoint, self.size, self.fixed_size))
def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
- native_sysroot):
+ native_sysroot, real_rootfs = True):
"""
Prepare content for a rootfs partition i.e. create a partition
and fill it from a /rootfs dir.
- Currently handles ext2/3/4, btrfs and vfat.
+ Currently handles ext2/3/4, btrfs, vfat and squashfs.
"""
p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR",
- "%s/../pseudo" % rootfs_dir)
+ "%s/../pseudo" % rootfs_dir)
p_passwd = os.environ.get("PSEUDO_PASSWD", rootfs_dir)
p_nosymlinkexp = os.environ.get("PSEUDO_NOSYMLINKEXP", "1")
pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix
pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % p_localstatedir
pseudo += "export PSEUDO_PASSWD=%s;" % p_passwd
pseudo += "export PSEUDO_NOSYMLINKEXP=%s;" % p_nosymlinkexp
- pseudo += "%s/usr/bin/pseudo " % native_sysroot
+ pseudo += "%s " % get_bitbake_var("FAKEROOTCMD")
rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label,
self.lineno, self.fstype)
if os.path.isfile(rootfs):
os.remove(rootfs)
- for prefix in ("ext", "btrfs", "vfat", "squashfs"):
- if self.fstype.startswith(prefix):
- method = getattr(self, "prepare_rootfs_" + prefix)
- method(rootfs, oe_builddir, rootfs_dir, native_sysroot, pseudo)
-
- self.source_file = rootfs
-
- # get the rootfs size in the right units for kickstart (kB)
- du_cmd = "du -Lbks %s" % rootfs
+ if not self.size and real_rootfs:
+ # The rootfs size is not set in .ks file so try to get it
+ # from bitbake variable
+ rsize_bb = get_bitbake_var('ROOTFS_SIZE')
+ rdir = get_bitbake_var('IMAGE_ROOTFS')
+ if rsize_bb and rdir == rootfs_dir:
+ # Bitbake variable ROOTFS_SIZE is calculated in
+ # Image._get_rootfs_size method from meta/lib/oe/image.py
+ # using IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGNMENT,
+ # IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE
+ self.size = int(round(float(rsize_bb)))
+ else:
+ # Bitbake variable ROOTFS_SIZE is not defined so compute it
+ # from the rootfs_dir size using the same logic found in
+ # get_rootfs_size() from meta/classes/image.bbclass
+ du_cmd = "du -ks %s" % rootfs_dir
out = exec_cmd(du_cmd)
- self.size = out.split()[0]
+ self.size = int(out.split()[0])
- break
+ prefix = "ext" if self.fstype.startswith("ext") else self.fstype
+ method = getattr(self, "prepare_rootfs_" + prefix)
+ method(rootfs, oe_builddir, rootfs_dir, native_sysroot, pseudo)
+ self.source_file = rootfs
+
+ # get the rootfs size in the right units for kickstart (kB)
+ du_cmd = "du -Lbks %s" % rootfs
+ out = exec_cmd(du_cmd)
+ self.size = int(out.split()[0])
def prepare_rootfs_ext(self, rootfs, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
@@ -210,82 +250,71 @@ class Partition():
out = exec_cmd(du_cmd)
actual_rootfs_size = int(out.split()[0])
- extra_blocks = self.get_extra_block_count(actual_rootfs_size)
- if extra_blocks < self.extra_space:
- extra_blocks = self.extra_space
-
- rootfs_size = actual_rootfs_size + extra_blocks
- rootfs_size *= self.overhead_factor
-
- msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
- (extra_blocks, self.mountpoint, rootfs_size))
+ rootfs_size = self.get_rootfs_size(actual_rootfs_size)
- exec_cmd("truncate %s -s %d" % (rootfs, rootfs_size * 1024))
+ with open(rootfs, 'w') as sparse:
+ os.ftruncate(sparse.fileno(), rootfs_size * 1024)
- extra_imagecmd = "-i 8192"
+ extraopts = self.mkfs_extraopts or "-F -i 8192"
label_str = ""
if self.label:
label_str = "-L %s" % self.label
- mkfs_cmd = "mkfs.%s -F %s %s %s -d %s" % \
- (self.fstype, extra_imagecmd, rootfs, label_str, rootfs_dir)
+ mkfs_cmd = "mkfs.%s %s %s %s -U %s -d %s" % \
+ (self.fstype, extraopts, rootfs, label_str, self.fsuuid, rootfs_dir)
+ exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+
+ mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
"""
Prepare content for a btrfs rootfs partition.
-
- Currently handles ext2/3/4 and btrfs.
"""
du_cmd = "du -ks %s" % rootfs_dir
out = exec_cmd(du_cmd)
actual_rootfs_size = int(out.split()[0])
- extra_blocks = self.get_extra_block_count(actual_rootfs_size)
- if extra_blocks < self.extra_space:
- extra_blocks = self.extra_space
-
- rootfs_size = actual_rootfs_size + extra_blocks
- rootfs_size *= self.overhead_factor
+ rootfs_size = self.get_rootfs_size(actual_rootfs_size)
- msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
- (extra_blocks, self.mountpoint, rootfs_size))
-
- exec_cmd("truncate %s -s %d" % (rootfs, rootfs_size * 1024))
+ with open(rootfs, 'w') as sparse:
+ os.ftruncate(sparse.fileno(), rootfs_size * 1024)
label_str = ""
if self.label:
label_str = "-L %s" % self.label
- mkfs_cmd = "mkfs.%s -b %d -r %s %s %s" % \
- (self.fstype, rootfs_size * 1024, rootfs_dir, label_str, rootfs)
+ mkfs_cmd = "mkfs.%s -b %d -r %s %s %s -U %s %s" % \
+ (self.fstype, rootfs_size * 1024, rootfs_dir, label_str,
+ self.mkfs_extraopts, self.fsuuid, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
- def prepare_rootfs_vfat(self, rootfs, oe_builddir, rootfs_dir,
- native_sysroot, pseudo):
+ def prepare_rootfs_msdos(self, rootfs, oe_builddir, rootfs_dir,
+ native_sysroot, pseudo):
"""
- Prepare content for a vfat rootfs partition.
+ Prepare content for a msdos/vfat rootfs partition.
"""
du_cmd = "du -bks %s" % rootfs_dir
out = exec_cmd(du_cmd)
blocks = int(out.split()[0])
- extra_blocks = self.get_extra_block_count(blocks)
- if extra_blocks < self.extra_space:
- extra_blocks = self.extra_space
-
- blocks += extra_blocks
-
- msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
- (extra_blocks, self.mountpoint, blocks))
+ rootfs_size = self.get_rootfs_size(blocks)
label_str = "-n boot"
if self.label:
label_str = "-n %s" % self.label
- dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks)
+ size_str = ""
+ if self.fstype == 'msdos':
+ size_str = "-F 16" # FAT 16
+
+ extraopts = self.mkfs_extraopts or '-S 512'
+
+ dosfs_cmd = "mkdosfs %s -i %s %s %s -C %s %d" % \
+ (label_str, self.fsuuid, size_str, extraopts, rootfs,
+ rootfs_size)
exec_native_cmd(dosfs_cmd, native_sysroot)
mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
@@ -294,13 +323,16 @@ class Partition():
chmod_cmd = "chmod 644 %s" % rootfs
exec_cmd(chmod_cmd)
+ prepare_rootfs_vfat = prepare_rootfs_msdos
+
def prepare_rootfs_squashfs(self, rootfs, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
"""
Prepare content for a squashfs rootfs partition.
"""
- squashfs_cmd = "mksquashfs %s %s -noappend" % \
- (rootfs_dir, rootfs)
+ extraopts = self.mkfs_extraopts or '-noappend'
+ squashfs_cmd = "mksquashfs %s %s %s" % \
+ (rootfs_dir, rootfs, extraopts)
exec_native_cmd(squashfs_cmd, native_sysroot, pseudo=pseudo)
def prepare_empty_partition_ext(self, rootfs, oe_builddir,
@@ -308,16 +340,18 @@ class Partition():
"""
Prepare an empty ext2/3/4 partition.
"""
- exec_cmd("truncate %s -s %d" % (rootfs, self.size * 1024))
+ size = self.disk_size
+ with open(rootfs, 'w') as sparse:
+ os.ftruncate(sparse.fileno(), size * 1024)
- extra_imagecmd = "-i 8192"
+ extraopts = self.mkfs_extraopts or "-i 8192"
label_str = ""
if self.label:
label_str = "-L %s" % self.label
- mkfs_cmd = "mkfs.%s -F %s %s %s" % \
- (self.fstype, extra_imagecmd, label_str, rootfs)
+ mkfs_cmd = "mkfs.%s -F %s %s -U %s %s" % \
+ (self.fstype, extraopts, label_str, self.fsuuid, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot)
def prepare_empty_partition_btrfs(self, rootfs, oe_builddir,
@@ -325,60 +359,46 @@ class Partition():
"""
Prepare an empty btrfs partition.
"""
- exec_cmd("truncate %s -s %d" % (rootfs, self.size * 1024))
+ size = self.disk_size
+ with open(rootfs, 'w') as sparse:
+ os.ftruncate(sparse.fileno(), size * 1024)
label_str = ""
if self.label:
label_str = "-L %s" % self.label
- mkfs_cmd = "mkfs.%s -b %d %s %s" % \
- (self.fstype, self.size * 1024, label_str, rootfs)
+ mkfs_cmd = "mkfs.%s -b %d %s -U %s %s %s" % \
+ (self.fstype, self.size * 1024, label_str, self.fsuuid,
+ self.mkfs_extraopts, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot)
- def prepare_empty_partition_vfat(self, rootfs, oe_builddir,
- native_sysroot):
+ def prepare_empty_partition_msdos(self, rootfs, oe_builddir,
+ native_sysroot):
"""
Prepare an empty vfat partition.
"""
- blocks = self.size
+ blocks = self.disk_size
label_str = "-n boot"
if self.label:
label_str = "-n %s" % self.label
- dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks)
- exec_native_cmd(dosfs_cmd, native_sysroot)
-
- chmod_cmd = "chmod 644 %s" % rootfs
- exec_cmd(chmod_cmd)
-
- def prepare_empty_partition_squashfs(self, cr_workdir, oe_builddir,
- native_sysroot):
- """
- Prepare an empty squashfs partition.
- """
- msger.warning("Creating of an empty squashfs %s partition was attempted. " \
- "Proceeding as requested." % self.mountpoint)
-
- path = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
- os.path.isfile(path) and os.remove(path)
+ size_str = ""
+ if self.fstype == 'msdos':
+ size_str = "-F 16" # FAT 16
- # it is not possible to create a squashfs without source data,
- # thus prepare an empty temp dir that is used as source
- tmpdir = tempfile.mkdtemp()
+ extraopts = self.mkfs_extraopts or '-S 512'
- squashfs_cmd = "mksquashfs %s %s -noappend" % \
- (tmpdir, path)
- exec_native_cmd(squashfs_cmd, native_sysroot)
+ dosfs_cmd = "mkdosfs %s -i %s %s %s -C %s %d" % \
+ (label_str, self.fsuuid, extraopts, size_str, rootfs,
+ blocks)
- os.rmdir(tmpdir)
+ exec_native_cmd(dosfs_cmd, native_sysroot)
- # get the rootfs size in the right units for kickstart (kB)
- du_cmd = "du -Lbks %s" % path
- out = exec_cmd(du_cmd)
- fs_size = out.split()[0]
+ chmod_cmd = "chmod 644 %s" % rootfs
+ exec_cmd(chmod_cmd)
- self.size = fs_size
+ prepare_empty_partition_vfat = prepare_empty_partition_msdos
def prepare_swap_partition(self, cr_workdir, oe_builddir, native_sysroot):
"""
@@ -386,12 +406,12 @@ class Partition():
"""
path = "%s/fs.%s" % (cr_workdir, self.fstype)
- exec_cmd("truncate %s -s %d" % (path, self.size * 1024))
+ with open(path, 'w') as sparse:
+ os.ftruncate(sparse.fileno(), self.size * 1024)
- import uuid
label_str = ""
if self.label:
label_str = "-L %s" % self.label
- mkswap_cmd = "mkswap %s -U %s %s" % (label_str, str(uuid.uuid1()), path)
- exec_native_cmd(mkswap_cmd, native_sysroot)
+ mkswap_cmd = "mkswap %s -U %s %s" % (label_str, self.fsuuid, path)
+ exec_native_cmd(mkswap_cmd, native_sysroot)
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py
deleted file mode 100644
index 306b32437e..0000000000
--- a/scripts/lib/wic/plugin.py
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os, sys
-
-from wic import msger
-from wic import pluginbase
-from wic.utils import errors
-from wic.utils.oe.misc import get_bitbake_var
-
-__ALL__ = ['PluginMgr', 'pluginmgr']
-
-PLUGIN_TYPES = ["imager", "source"]
-
-PLUGIN_DIR = "/lib/wic/plugins" # relative to scripts
-SCRIPTS_PLUGIN_DIR = "scripts" + PLUGIN_DIR
-
-class PluginMgr():
- plugin_dirs = {}
-
- # make the manager class as singleton
- _instance = None
- def __new__(cls, *args, **kwargs):
- if not cls._instance:
- cls._instance = super(PluginMgr, cls).__new__(cls, *args, **kwargs)
-
- return cls._instance
-
- def __init__(self):
- wic_path = os.path.dirname(__file__)
- eos = wic_path.rfind('scripts') + len('scripts')
- scripts_path = wic_path[:eos]
- self.scripts_path = scripts_path
- self.plugin_dir = scripts_path + PLUGIN_DIR
- self.layers_path = None
-
- def _build_plugin_dir_list(self, plugin_dir, ptype):
- if self.layers_path is None:
- self.layers_path = get_bitbake_var("BBLAYERS")
- layer_dirs = []
-
- if self.layers_path is not None:
- for layer_path in self.layers_path.split():
- path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR, ptype)
- layer_dirs.append(path)
-
- path = os.path.join(plugin_dir, ptype)
- layer_dirs.append(path)
-
- return layer_dirs
-
- def append_dirs(self, dirs):
- for path in dirs:
- self._add_plugindir(path)
-
- # load all the plugins AGAIN
- self._load_all()
-
- def _add_plugindir(self, path):
- path = os.path.abspath(os.path.expanduser(path))
-
- if not os.path.isdir(path):
- return
-
- if path not in self.plugin_dirs:
- self.plugin_dirs[path] = False
- # the value True/False means "loaded"
-
- def _load_all(self):
- for (pdir, loaded) in self.plugin_dirs.items():
- if loaded:
- continue
-
- sys.path.insert(0, pdir)
- for mod in [x[:-3] for x in os.listdir(pdir) if x.endswith(".py")]:
- if mod and mod != '__init__':
- if mod in sys.modules:
- #self.plugin_dirs[pdir] = True
- msger.warning("Module %s already exists, skip" % mod)
- else:
- try:
- pymod = __import__(mod)
- self.plugin_dirs[pdir] = True
- msger.debug("Plugin module %s:%s imported"\
- % (mod, pymod.__file__))
- except ImportError as err:
- msg = 'Failed to load plugin %s/%s: %s' \
- % (os.path.basename(pdir), mod, err)
- msger.warning(msg)
-
- del sys.path[0]
-
- def get_plugins(self, ptype):
- """ the return value is dict of name:class pairs """
-
- if ptype not in PLUGIN_TYPES:
- raise errors.CreatorError('%s is not valid plugin type' % ptype)
-
- plugins_dir = self._build_plugin_dir_list(self.plugin_dir, ptype)
-
- self.append_dirs(plugins_dir)
-
- return pluginbase.get_plugins(ptype)
-
- def get_source_plugins(self):
- """
- Return list of available source plugins.
- """
- plugins_dir = self._build_plugin_dir_list(self.plugin_dir, 'source')
-
- self.append_dirs(plugins_dir)
-
- return self.get_plugins('source')
-
-
- def get_source_plugin_methods(self, source_name, methods):
- """
- The methods param is a dict with the method names to find. On
- return, the dict values will be filled in with pointers to the
- corresponding methods. If one or more methods are not found,
- None is returned.
- """
- return_methods = None
- for _source_name, klass in self.get_plugins('source').items():
- if _source_name == source_name:
- for _method_name in methods:
- if not hasattr(klass, _method_name):
- msger.warning("Unimplemented %s source interface for: %s"\
- % (_method_name, _source_name))
- return None
- func = getattr(klass, _method_name)
- methods[_method_name] = func
- return_methods = methods
- return return_methods
-
-pluginmgr = PluginMgr()
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index e737dee7bc..f74d6430fd 100644
--- a/scripts/lib/wic/pluginbase.py
+++ b/scripts/lib/wic/pluginbase.py
@@ -1,40 +1,78 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/env python3
#
# Copyright (c) 2011 Intel, Inc.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-__all__ = ['ImagerPlugin', 'SourcePlugin', 'get_plugins']
+__all__ = ['ImagerPlugin', 'SourcePlugin']
+
+import os
+import logging
-import sys
from collections import defaultdict
+from importlib.machinery import SourceFileLoader
+
+from wic import WicError
+from wic.misc import get_bitbake_var
+
+PLUGIN_TYPES = ["imager", "source"]
+
+SCRIPTS_PLUGIN_DIR = "scripts/lib/wic/plugins"
+
+logger = logging.getLogger('wic')
+
+PLUGINS = defaultdict(dict)
+
+class PluginMgr:
+ _plugin_dirs = []
+
+ @classmethod
+ def get_plugins(cls, ptype):
+ """Get dictionary of <plugin_name>:<class> pairs."""
+ if ptype not in PLUGIN_TYPES:
+ raise WicError('%s is not valid plugin type' % ptype)
+
+ # collect plugin directories
+ if not cls._plugin_dirs:
+ cls._plugin_dirs = [os.path.join(os.path.dirname(__file__), 'plugins')]
+ layers = get_bitbake_var("BBLAYERS") or ''
+ for layer_path in layers.split():
+ path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR)
+ path = os.path.abspath(os.path.expanduser(path))
+ if path not in cls._plugin_dirs and os.path.isdir(path):
+ cls._plugin_dirs.insert(0, path)
+
+ if ptype not in PLUGINS:
+ # load all ptype plugins
+ for pdir in cls._plugin_dirs:
+ ppath = os.path.join(pdir, ptype)
+ if os.path.isdir(ppath):
+ for fname in os.listdir(ppath):
+ if fname.endswith('.py'):
+ mname = fname[:-3]
+ mpath = os.path.join(ppath, fname)
+ logger.debug("loading plugin module %s", mpath)
+ SourceFileLoader(mname, mpath).load_module()
-from wic import msger
+ return PLUGINS.get(ptype)
class PluginMeta(type):
- plugins = defaultdict(dict)
def __new__(cls, name, bases, attrs):
class_type = type.__new__(cls, name, bases, attrs)
if 'name' in attrs:
- cls.plugins[class_type.wic_plugin_type][attrs['name']] = class_type
+ PLUGINS[class_type.wic_plugin_type][attrs['name']] = class_type
return class_type
-class ImagerPlugin(PluginMeta("Plugin", (), {})):
+class ImagerPlugin(metaclass=PluginMeta):
wic_plugin_type = "imager"
-class SourcePlugin(PluginMeta("Plugin", (), {})):
+ def do_create(self):
+ raise WicError("Method %s.do_create is not implemented" %
+ self.__class__.__name__)
+
+class SourcePlugin(metaclass=PluginMeta):
wic_plugin_type = "source"
"""
The methods that can be implemented by --source plugins.
@@ -50,7 +88,7 @@ class SourcePlugin(PluginMeta("Plugin", (), {})):
disk image. This provides a hook to allow finalization of a
disk image e.g. to write an MBR to it.
"""
- msger.debug("SourcePlugin: do_install_disk: disk: %s" % disk_name)
+ logger.debug("SourcePlugin: do_install_disk: disk: %s", disk_name)
@classmethod
def do_stage_partition(cls, part, source_params, creator, cr_workdir,
@@ -67,7 +105,7 @@ class SourcePlugin(PluginMeta("Plugin", (), {})):
Not that get_bitbake_var() allows you to acces non-standard
variables that you might want to use for this.
"""
- msger.debug("SourcePlugin: do_stage_partition: part: %s" % part)
+ logger.debug("SourcePlugin: do_stage_partition: part: %s", part)
@classmethod
def do_configure_partition(cls, part, source_params, creator, cr_workdir,
@@ -78,7 +116,7 @@ class SourcePlugin(PluginMeta("Plugin", (), {})):
custom configuration files for a partition, for example
syslinux or grub config files.
"""
- msger.debug("SourcePlugin: do_configure_partition: part: %s" % part)
+ logger.debug("SourcePlugin: do_configure_partition: part: %s", part)
@classmethod
def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
@@ -88,7 +126,14 @@ class SourcePlugin(PluginMeta("Plugin", (), {})):
Called to do the actual content population for a partition i.e. it
'prepares' the partition to be incorporated into the image.
"""
- msger.debug("SourcePlugin: do_prepare_partition: part: %s" % part)
+ logger.debug("SourcePlugin: do_prepare_partition: part: %s", part)
-def get_plugins(typen):
- return PluginMeta.plugins.get(typen)
+ @classmethod
+ def do_post_partition(cls, part, source_params, creator, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir, rootfs_dir,
+ native_sysroot):
+ """
+ Called after the partition is created. It is useful to add post
+ operations e.g. security signing the partition.
+ """
+ logger.debug("SourcePlugin: do_post_partition: part: %s", part)
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
new file mode 100644
index 0000000000..2441cc33ad
--- /dev/null
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -0,0 +1,602 @@
+#
+# Copyright (c) 2013, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# DESCRIPTION
+# This implements the 'direct' imager plugin class for 'wic'
+#
+# AUTHORS
+# Tom Zanussi <tom.zanussi (at] linux.intel.com>
+#
+
+import logging
+import os
+import random
+import shutil
+import tempfile
+import uuid
+
+from time import strftime
+
+from oe.path import copyhardlinktree
+
+from wic import WicError
+from wic.filemap import sparse_copy
+from wic.ksparser import KickStart, KickStartError
+from wic.pluginbase import PluginMgr, ImagerPlugin
+from wic.misc import get_bitbake_var, exec_cmd, exec_native_cmd
+
+logger = logging.getLogger('wic')
+
+class DirectPlugin(ImagerPlugin):
+ """
+ Install a system into a file containing a partitioned disk image.
+
+ An image file is formatted with a partition table, each partition
+ created from a rootfs or other OpenEmbedded build artifact and dd'ed
+ into the virtual disk. The disk image can subsequently be dd'ed onto
+ media and used on actual hardware.
+ """
+ name = 'direct'
+
+ def __init__(self, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
+ native_sysroot, oe_builddir, options):
+ try:
+ self.ks = KickStart(wks_file)
+ except KickStartError as err:
+ raise WicError(str(err))
+
+ # parse possible 'rootfs=name' items
+ self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' '))
+ self.bootimg_dir = bootimg_dir
+ self.kernel_dir = kernel_dir
+ self.native_sysroot = native_sysroot
+ self.oe_builddir = oe_builddir
+
+ self.outdir = options.outdir
+ self.compressor = options.compressor
+ self.bmap = options.bmap
+ self.no_fstab_update = options.no_fstab_update
+ self.original_fstab = None
+
+ self.name = "%s-%s" % (os.path.splitext(os.path.basename(wks_file))[0],
+ strftime("%Y%m%d%H%M"))
+ self.workdir = tempfile.mkdtemp(dir=self.outdir, prefix='tmp.wic.')
+ self._image = None
+ self.ptable_format = self.ks.bootloader.ptable
+ self.parts = self.ks.partitions
+
+ # as a convenience, set source to the boot partition source
+ # instead of forcing it to be set via bootloader --source
+ for part in self.parts:
+ if not self.ks.bootloader.source and part.mountpoint == "/boot":
+ self.ks.bootloader.source = part.source
+ break
+
+ image_path = self._full_path(self.workdir, self.parts[0].disk, "direct")
+ self._image = PartitionedImage(image_path, self.ptable_format,
+ self.parts, self.native_sysroot)
+
+ def do_create(self):
+ """
+ Plugin entry point.
+ """
+ try:
+ self.create()
+ self.assemble()
+ self.finalize()
+ self.print_info()
+ finally:
+ self.cleanup()
+
+ def _write_fstab(self, image_rootfs):
+ """overriden to generate fstab (temporarily) in rootfs. This is called
+ from _create, make sure it doesn't get called from
+ BaseImage.create()
+ """
+ if not image_rootfs:
+ return
+
+ fstab_path = image_rootfs + "/etc/fstab"
+ if not os.path.isfile(fstab_path):
+ return
+
+ with open(fstab_path) as fstab:
+ fstab_lines = fstab.readlines()
+ self.original_fstab = fstab_lines.copy()
+
+ if self._update_fstab(fstab_lines, self.parts):
+ with open(fstab_path, "w") as fstab:
+ fstab.writelines(fstab_lines)
+ else:
+ self.original_fstab = None
+
+ def _update_fstab(self, fstab_lines, parts):
+ """Assume partition order same as in wks"""
+ updated = False
+ for part in parts:
+ if not part.realnum or not part.mountpoint \
+ or part.mountpoint == "/":
+ continue
+
+ if part.use_uuid:
+ if part.fsuuid:
+ # FAT UUID is different from others
+ if len(part.fsuuid) == 10:
+ device_name = "UUID=%s-%s" % \
+ (part.fsuuid[2:6], part.fsuuid[6:])
+ else:
+ device_name = "UUID=%s" % part.fsuuid
+ else:
+ device_name = "PARTUUID=%s" % part.uuid
+ elif part.use_label:
+ device_name = "LABEL=%s" % part.label
+ else:
+ # mmc device partitions are named mmcblk0p1, mmcblk0p2..
+ prefix = 'p' if part.disk.startswith('mmcblk') else ''
+ device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
+
+ opts = part.fsopts if part.fsopts else "defaults"
+ line = "\t".join([device_name, part.mountpoint, part.fstype,
+ opts, "0", "0"]) + "\n"
+
+ fstab_lines.append(line)
+ updated = True
+
+ return updated
+
+ def _full_path(self, path, name, extention):
+ """ Construct full file path to a file we generate. """
+ return os.path.join(path, "%s-%s.%s" % (self.name, name, extention))
+
+ #
+ # Actual implemention
+ #
+ def create(self):
+ """
+ For 'wic', we already have our build artifacts - we just create
+ filesystems from the artifacts directly and combine them into
+ a partitioned image.
+ """
+ if not self.no_fstab_update:
+ self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
+
+ for part in self.parts:
+ # get rootfs size from bitbake variable if it's not set in .ks file
+ if not part.size:
+ # and if rootfs name is specified for the partition
+ image_name = self.rootfs_dir.get(part.rootfs_dir)
+ if image_name and os.path.sep not in image_name:
+ # Bitbake variable ROOTFS_SIZE is calculated in
+ # Image._get_rootfs_size method from meta/lib/oe/image.py
+ # using IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGNMENT,
+ # IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE
+ rsize_bb = get_bitbake_var('ROOTFS_SIZE', image_name)
+ if rsize_bb:
+ part.size = int(round(float(rsize_bb)))
+
+ self._image.prepare(self)
+ self._image.layout_partitions()
+ self._image.create()
+
+ def assemble(self):
+ """
+ Assemble partitions into disk image
+ """
+ self._image.assemble()
+
+ def finalize(self):
+ """
+ Finalize the disk image.
+
+ For example, prepare the image to be bootable by e.g.
+ creating and installing a bootloader configuration.
+ """
+ source_plugin = self.ks.bootloader.source
+ disk_name = self.parts[0].disk
+ if source_plugin:
+ plugin = PluginMgr.get_plugins('source')[source_plugin]
+ plugin.do_install_disk(self._image, disk_name, self, self.workdir,
+ self.oe_builddir, self.bootimg_dir,
+ self.kernel_dir, self.native_sysroot)
+
+ full_path = self._image.path
+ # Generate .bmap
+ if self.bmap:
+ logger.debug("Generating bmap file for %s", disk_name)
+ python = os.path.join(self.native_sysroot, 'usr/bin/python3-native/python3')
+ bmaptool = os.path.join(self.native_sysroot, 'usr/bin/bmaptool')
+ exec_native_cmd("%s %s create %s -o %s.bmap" % \
+ (python, bmaptool, full_path, full_path), self.native_sysroot)
+ # Compress the image
+ if self.compressor:
+ logger.debug("Compressing disk %s with %s", disk_name, self.compressor)
+ exec_cmd("%s %s" % (self.compressor, full_path))
+
+ def print_info(self):
+ """
+ Print the image(s) and artifacts used, for the user.
+ """
+ msg = "The new image(s) can be found here:\n"
+
+ extension = "direct" + {"gzip": ".gz",
+ "bzip2": ".bz2",
+ "xz": ".xz",
+ None: ""}.get(self.compressor)
+ full_path = self._full_path(self.outdir, self.parts[0].disk, extension)
+ msg += ' %s\n\n' % full_path
+
+ msg += 'The following build artifacts were used to create the image(s):\n'
+ for part in self.parts:
+ if part.rootfs_dir is None:
+ continue
+ if part.mountpoint == '/':
+ suffix = ':'
+ else:
+ suffix = '["%s"]:' % (part.mountpoint or part.label)
+ rootdir = part.rootfs_dir
+ msg += ' ROOTFS_DIR%s%s\n' % (suffix.ljust(20), rootdir)
+
+ msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir
+ msg += ' KERNEL_DIR: %s\n' % self.kernel_dir
+ msg += ' NATIVE_SYSROOT: %s\n' % self.native_sysroot
+
+ logger.info(msg)
+
+ @property
+ def rootdev(self):
+ """
+ Get root device name to use as a 'root' parameter
+ in kernel command line.
+
+ Assume partition order same as in wks
+ """
+ for part in self.parts:
+ if part.mountpoint == "/":
+ if part.uuid:
+ return "PARTUUID=%s" % part.uuid
+ else:
+ suffix = 'p' if part.disk.startswith('mmcblk') else ''
+ return "/dev/%s%s%-d" % (part.disk, suffix, part.realnum)
+
+ def cleanup(self):
+ if self._image:
+ self._image.cleanup()
+
+ # Move results to the output dir
+ if not os.path.exists(self.outdir):
+ os.makedirs(self.outdir)
+
+ for fname in os.listdir(self.workdir):
+ path = os.path.join(self.workdir, fname)
+ if os.path.isfile(path):
+ shutil.move(path, os.path.join(self.outdir, fname))
+
+ #Restore original fstab
+ if self.original_fstab:
+ fstab_path = self.rootfs_dir.get("ROOTFS_DIR") + "/etc/fstab"
+ with open(fstab_path, "w") as fstab:
+ fstab.writelines(self.original_fstab)
+
+ # remove work directory
+ shutil.rmtree(self.workdir, ignore_errors=True)
+
+# Overhead of the MBR partitioning scheme (just one sector)
+MBR_OVERHEAD = 1
+
+# Overhead of the GPT partitioning scheme
+GPT_OVERHEAD = 34
+
+# Size of a sector in bytes
+SECTOR_SIZE = 512
+
+class PartitionedImage():
+ """
+ Partitioned image in a file.
+ """
+
+ def __init__(self, path, ptable_format, partitions, native_sysroot=None):
+ self.path = path # Path to the image file
+ self.numpart = 0 # Number of allocated partitions
+ self.realpart = 0 # Number of partitions in the partition table
+ self.primary_part_num = 0 # Number of primary partitions (msdos)
+ self.extendedpart = 0 # Create extended partition before this logical partition (msdos)
+ self.extended_size_sec = 0 # Size of exteded partition (msdos)
+ self.logical_part_cnt = 0 # Number of total logical paritions (msdos)
+ self.offset = 0 # Offset of next partition (in sectors)
+ self.min_size = 0 # Minimum required disk size to fit
+ # all partitions (in bytes)
+ self.ptable_format = ptable_format # Partition table format
+ # Disk system identifier
+ self.identifier = random.SystemRandom().randint(1, 0xffffffff)
+
+ self.partitions = partitions
+ self.partimages = []
+ # Size of a sector used in calculations
+ self.sector_size = SECTOR_SIZE
+ self.native_sysroot = native_sysroot
+ num_real_partitions = len([p for p in self.partitions if not p.no_table])
+
+ # calculate the real partition number, accounting for partitions not
+ # in the partition table and logical partitions
+ realnum = 0
+ for part in self.partitions:
+ if part.no_table:
+ part.realnum = 0
+ else:
+ realnum += 1
+ if self.ptable_format == 'msdos' and realnum > 3 and num_real_partitions > 4:
+ part.realnum = realnum + 1
+ continue
+ part.realnum = realnum
+
+ # generate parition and filesystem UUIDs
+ for part in self.partitions:
+ if not part.uuid and part.use_uuid:
+ if self.ptable_format == 'gpt':
+ part.uuid = str(uuid.uuid4())
+ else: # msdos partition table
+ part.uuid = '%08x-%02d' % (self.identifier, part.realnum)
+ if not part.fsuuid:
+ if part.fstype == 'vfat' or part.fstype == 'msdos':
+ part.fsuuid = '0x' + str(uuid.uuid4())[:8].upper()
+ else:
+ part.fsuuid = str(uuid.uuid4())
+
+ def prepare(self, imager):
+ """Prepare an image. Call prepare method of all image partitions."""
+ for part in self.partitions:
+ # need to create the filesystems in order to get their
+ # sizes before we can add them and do the layout.
+ part.prepare(imager, imager.workdir, imager.oe_builddir,
+ imager.rootfs_dir, imager.bootimg_dir,
+ imager.kernel_dir, imager.native_sysroot)
+
+ # Converting kB to sectors for parted
+ part.size_sec = part.disk_size * 1024 // self.sector_size
+
+ def layout_partitions(self):
+ """ Layout the partitions, meaning calculate the position of every
+ partition on the disk. The 'ptable_format' parameter defines the
+ partition table format and may be "msdos". """
+
+ logger.debug("Assigning %s partitions to disks", self.ptable_format)
+
+ # The number of primary and logical partitions. Extended partition and
+ # partitions not listed in the table are not included.
+ num_real_partitions = len([p for p in self.partitions if not p.no_table])
+
+ # Go through partitions in the order they are added in .ks file
+ for num in range(len(self.partitions)):
+ part = self.partitions[num]
+
+ if self.ptable_format == 'msdos' and part.part_name:
+ raise WicError("setting custom partition name is not " \
+ "implemented for msdos partitions")
+
+ if self.ptable_format == 'msdos' and part.part_type:
+ # The --part-type can also be implemented for MBR partitions,
+ # in which case it would map to the 1-byte "partition type"
+ # filed at offset 3 of the partition entry.
+ raise WicError("setting custom partition type is not " \
+ "implemented for msdos partitions")
+
+ # Get the disk where the partition is located
+ self.numpart += 1
+ if not part.no_table:
+ self.realpart += 1
+
+ if self.numpart == 1:
+ if self.ptable_format == "msdos":
+ overhead = MBR_OVERHEAD
+ elif self.ptable_format == "gpt":
+ overhead = GPT_OVERHEAD
+
+ # Skip one sector required for the partitioning scheme overhead
+ self.offset += overhead
+
+ if self.ptable_format == "msdos":
+ if self.primary_part_num > 3 or \
+ (self.extendedpart == 0 and self.primary_part_num >= 3 and num_real_partitions > 4):
+ part.type = 'logical'
+ # Reserve a sector for EBR for every logical partition
+ # before alignment is performed.
+ if part.type == 'logical':
+ self.offset += 1
+
+ align_sectors = 0
+ if part.align:
+ # If not first partition and we do have alignment set we need
+ # to align the partition.
+ # FIXME: This leaves a empty spaces to the disk. To fill the
+ # gaps we could enlargea the previous partition?
+
+ # Calc how much the alignment is off.
+ align_sectors = self.offset % (part.align * 1024 // self.sector_size)
+
+ if align_sectors:
+ # If partition is not aligned as required, we need
+ # to move forward to the next alignment point
+ align_sectors = (part.align * 1024 // self.sector_size) - align_sectors
+
+ logger.debug("Realignment for %s%s with %s sectors, original"
+ " offset %s, target alignment is %sK.",
+ part.disk, self.numpart, align_sectors,
+ self.offset, part.align)
+
+ # increase the offset so we actually start the partition on right alignment
+ self.offset += align_sectors
+
+ part.start = self.offset
+ self.offset += part.size_sec
+
+ if not part.no_table:
+ part.num = self.realpart
+ else:
+ part.num = 0
+
+ if self.ptable_format == "msdos" and not part.no_table:
+ if part.type == 'logical':
+ self.logical_part_cnt += 1
+ part.num = self.logical_part_cnt + 4
+ if self.extendedpart == 0:
+ # Create extended partition as a primary partition
+ self.primary_part_num += 1
+ self.extendedpart = part.num
+ else:
+ self.extended_size_sec += align_sectors
+ self.extended_size_sec += part.size_sec + 1
+ else:
+ self.primary_part_num += 1
+ part.num = self.primary_part_num
+
+ logger.debug("Assigned %s to %s%d, sectors range %d-%d size %d "
+ "sectors (%d bytes).", part.mountpoint, part.disk,
+ part.num, part.start, self.offset - 1, part.size_sec,
+ part.size_sec * self.sector_size)
+
+ # Once all the partitions have been layed out, we can calculate the
+ # minumim disk size
+ self.min_size = self.offset
+ if self.ptable_format == "gpt":
+ self.min_size += GPT_OVERHEAD
+
+ self.min_size *= self.sector_size
+
+ def _create_partition(self, device, parttype, fstype, start, size):
+ """ Create a partition on an image described by the 'device' object. """
+
+ # Start is included to the size so we need to substract one from the end.
+ end = start + size - 1
+ logger.debug("Added '%s' partition, sectors %d-%d, size %d sectors",
+ parttype, start, end, size)
+
+ cmd = "parted -s %s unit s mkpart %s" % (device, parttype)
+ if fstype:
+ cmd += " %s" % fstype
+ cmd += " %d %d" % (start, end)
+
+ return exec_native_cmd(cmd, self.native_sysroot)
+
+ def create(self):
+ logger.debug("Creating sparse file %s", self.path)
+ with open(self.path, 'w') as sparse:
+ os.ftruncate(sparse.fileno(), self.min_size)
+
+ logger.debug("Initializing partition table for %s", self.path)
+ exec_native_cmd("parted -s %s mklabel %s" %
+ (self.path, self.ptable_format), self.native_sysroot)
+
+ logger.debug("Set disk identifier %x", self.identifier)
+ with open(self.path, 'r+b') as img:
+ img.seek(0x1B8)
+ img.write(self.identifier.to_bytes(4, 'little'))
+
+ logger.debug("Creating partitions")
+
+ for part in self.partitions:
+ if part.num == 0:
+ continue
+
+ if self.ptable_format == "msdos" and part.num == self.extendedpart:
+ # Create an extended partition (note: extended
+ # partition is described in MBR and contains all
+ # logical partitions). The logical partitions save a
+ # sector for an EBR just before the start of a
+ # partition. The extended partition must start one
+ # sector before the start of the first logical
+ # partition. This way the first EBR is inside of the
+ # extended partition. Since the extended partitions
+ # starts a sector before the first logical partition,
+ # add a sector at the back, so that there is enough
+ # room for all logical partitions.
+ self._create_partition(self.path, "extended",
+ None, part.start - 1,
+ self.extended_size_sec)
+
+ if part.fstype == "swap":
+ parted_fs_type = "linux-swap"
+ elif part.fstype == "vfat":
+ parted_fs_type = "fat32"
+ elif part.fstype == "msdos":
+ parted_fs_type = "fat16"
+ if not part.system_id:
+ part.system_id = '0x6' # FAT16
+ else:
+ # Type for ext2/ext3/ext4/btrfs
+ parted_fs_type = "ext2"
+
+ # Boot ROM of OMAP boards require vfat boot partition to have an
+ # even number of sectors.
+ if part.mountpoint == "/boot" and part.fstype in ["vfat", "msdos"] \
+ and part.size_sec % 2:
+ logger.debug("Subtracting one sector from '%s' partition to "
+ "get even number of sectors for the partition",
+ part.mountpoint)
+ part.size_sec -= 1
+
+ self._create_partition(self.path, part.type,
+ parted_fs_type, part.start, part.size_sec)
+
+ if part.part_name:
+ logger.debug("partition %d: set name to %s",
+ part.num, part.part_name)
+ exec_native_cmd("sgdisk --change-name=%d:%s %s" % \
+ (part.num, part.part_name,
+ self.path), self.native_sysroot)
+
+ if part.part_type:
+ logger.debug("partition %d: set type UID to %s",
+ part.num, part.part_type)
+ exec_native_cmd("sgdisk --typecode=%d:%s %s" % \
+ (part.num, part.part_type,
+ self.path), self.native_sysroot)
+
+ if part.uuid and self.ptable_format == "gpt":
+ logger.debug("partition %d: set UUID to %s",
+ part.num, part.uuid)
+ exec_native_cmd("sgdisk --partition-guid=%d:%s %s" % \
+ (part.num, part.uuid, self.path),
+ self.native_sysroot)
+
+ if part.label and self.ptable_format == "gpt":
+ logger.debug("partition %d: set name to %s",
+ part.num, part.label)
+ exec_native_cmd("parted -s %s name %d %s" % \
+ (self.path, part.num, part.label),
+ self.native_sysroot)
+
+ if part.active:
+ flag_name = "legacy_boot" if self.ptable_format == 'gpt' else "boot"
+ logger.debug("Set '%s' flag for partition '%s' on disk '%s'",
+ flag_name, part.num, self.path)
+ exec_native_cmd("parted -s %s set %d %s on" % \
+ (self.path, part.num, flag_name),
+ self.native_sysroot)
+ if part.system_id:
+ exec_native_cmd("sfdisk --part-type %s %s %s" % \
+ (self.path, part.num, part.system_id),
+ self.native_sysroot)
+
+ def cleanup(self):
+ # remove partition images
+ for image in set(self.partimages):
+ os.remove(image)
+
+ def assemble(self):
+ logger.debug("Installing partitions")
+
+ for part in self.partitions:
+ source = part.source_file
+ if source:
+ # install source_file contents into a partition
+ sparse_copy(source, self.path, seek=part.start * self.sector_size)
+
+ logger.debug("Installed %s in partition %d, sectors %d-%d, "
+ "size %d sectors", source, part.num, part.start,
+ part.start + part.size_sec - 1, part.size_sec)
+
+ partimage = self.path + '.p%d' % part.num
+ os.rename(source, partimage)
+ self.partimages.append(partimage)
diff --git a/scripts/lib/wic/plugins/imager/direct_plugin.py b/scripts/lib/wic/plugins/imager/direct_plugin.py
deleted file mode 100644
index 8fe3930804..0000000000
--- a/scripts/lib/wic/plugins/imager/direct_plugin.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This implements the 'direct' imager plugin class for 'wic'
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] linux.intel.com>
-#
-
-from wic.utils import errors
-from wic.conf import configmgr
-
-import wic.imager.direct as direct
-from wic.pluginbase import ImagerPlugin
-
-class DirectPlugin(ImagerPlugin):
- """
- Install a system into a file containing a partitioned disk image.
-
- An image file is formatted with a partition table, each partition
- created from a rootfs or other OpenEmbedded build artifact and dd'ed
- into the virtual disk. The disk image can subsequently be dd'ed onto
- media and used on actual hardware.
- """
-
- name = 'direct'
-
- @classmethod
- def __rootfs_dir_to_dict(cls, rootfs_dirs):
- """
- Gets a string that contain 'connection=dir' splitted by
- space and return a dict
- """
- krootfs_dir = {}
- for rootfs_dir in rootfs_dirs.split(' '):
- key, val = rootfs_dir.split('=')
- krootfs_dir[key] = val
-
- return krootfs_dir
-
- @classmethod
- def do_create(cls, opts, *args):
- """
- Create direct image, called from creator as 'direct' cmd
- """
- if len(args) != 8:
- raise errors.Usage("Extra arguments given")
-
- native_sysroot = args[0]
- kernel_dir = args[1]
- bootimg_dir = args[2]
- rootfs_dir = args[3]
-
- creatoropts = configmgr.create
- ksconf = args[4]
-
- image_output_dir = args[5]
- oe_builddir = args[6]
- compressor = args[7]
-
- krootfs_dir = cls.__rootfs_dir_to_dict(rootfs_dir)
-
- configmgr._ksconf = ksconf
-
- creator = direct.DirectImageCreator(oe_builddir,
- image_output_dir,
- krootfs_dir,
- bootimg_dir,
- kernel_dir,
- native_sysroot,
- compressor,
- creatoropts,
- opts.bmap)
-
- try:
- creator.create()
- creator.assemble()
- creator.finalize()
- creator.print_outimage_info()
-
- except errors.CreatorError:
- raise
- finally:
- creator.cleanup()
-
- return 0
diff --git a/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py b/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
new file mode 100644
index 0000000000..5bd7390680
--- /dev/null
+++ b/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
@@ -0,0 +1,213 @@
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# DESCRIPTION
+# This implements the 'bootimg-biosplusefi' source plugin class for 'wic'
+#
+# AUTHORS
+# William Bourque <wbourque [at) gmail.com>
+
+import types
+
+from wic.pluginbase import SourcePlugin
+from importlib.machinery import SourceFileLoader
+
+class BootimgBiosPlusEFIPlugin(SourcePlugin):
+ """
+ Create MBR + EFI boot partition
+
+ This plugin creates a boot partition that contains both
+ legacy BIOS and EFI content. It will be able to boot from both.
+ This is useful when managing PC fleet with some older machines
+ without EFI support.
+
+ Note it is possible to create an image that can boot from both
+ legacy BIOS and EFI by defining two partitions : one with arg
+ --source bootimg-efi and another one with --source bootimg-pcbios.
+ However, this method has the obvious downside that it requires TWO
+ partitions to be created on the storage device.
+ Both partitions will also be marked as "bootable" which does not work on
+ most BIOS, has BIOS often uses the "bootable" flag to determine
+ what to boot. If you have such a BIOS, you need to manually remove the
+ "bootable" flag from the EFI partition for the drive to be bootable.
+ Having two partitions also seems to confuse wic : the content of
+ the first partition will be duplicated into the second, even though it
+ will not be used at all.
+
+ Also, unlike "isoimage-isohybrid" that also does BIOS and EFI, this plugin
+ allows you to have more than only a single rootfs partitions and does
+ not turn the rootfs into an initramfs RAM image.
+
+ This plugin is made to put everything into a single /boot partition so it
+ does not have the limitations listed above.
+
+ The plugin is made so it does tries not to reimplement what's already
+ been done in other plugins; as such it imports "bootimg-pcbios"
+ and "bootimg-efi".
+ Plugin "bootimg-pcbios" is used to generate legacy BIOS boot.
+ Plugin "bootimg-efi" is used to generate the UEFI boot. Note that it
+ requires a --sourceparams argument to know which loader to use; refer
+ to "bootimg-efi" code/documentation for the list of loader.
+
+ Imports are handled with "SourceFileLoader" from importlib as it is
+ otherwise very difficult to import module that has hyphen "-" in their
+ filename.
+ The SourcePlugin() methods used in the plugins (do_install_disk,
+ do_configure_partition, do_prepare_partition) are then called on both,
+ beginning by "bootimg-efi".
+
+ Plugin options, such as "--sourceparams" can still be passed to a
+ plugin, as long they does not cause issue in the other plugin.
+
+ Example wic configuration:
+ part /boot --source bootimg-biosplusefi --sourceparams="loader=grub-efi"\\
+ --ondisk sda --label os_boot --active --align 1024 --use-uuid
+ """
+
+ name = 'bootimg-biosplusefi'
+
+ __PCBIOS_MODULE_NAME = "bootimg-pcbios"
+ __EFI_MODULE_NAME = "bootimg-efi"
+
+ __imgEFIObj = None
+ __imgBiosObj = None
+
+ @classmethod
+ def __init__(cls):
+ """
+ Constructor (init)
+ """
+
+ # XXX
+ # For some reasons, __init__ constructor is never called.
+ # Something to do with how pluginbase works?
+ cls.__instanciateSubClasses()
+
+ @classmethod
+ def __instanciateSubClasses(cls):
+ """
+
+ """
+
+ # Import bootimg-pcbios (class name "BootimgPcbiosPlugin")
+ modulePath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ cls.__PCBIOS_MODULE_NAME + ".py")
+ loader = SourceFileLoader(cls.__PCBIOS_MODULE_NAME, modulePath)
+ mod = types.ModuleType(loader.name)
+ loader.exec_module(mod)
+ cls.__imgBiosObj = mod.BootimgPcbiosPlugin()
+
+ # Import bootimg-efi (class name "BootimgEFIPlugin")
+ modulePath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ cls.__EFI_MODULE_NAME + ".py")
+ loader = SourceFileLoader(cls.__EFI_MODULE_NAME, modulePath)
+ mod = types.ModuleType(loader.name)
+ loader.exec_module(mod)
+ cls.__imgEFIObj = mod.BootimgEFIPlugin()
+
+ @classmethod
+ def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir,
+ bootimg_dir, kernel_dir, native_sysroot):
+ """
+ Called after all partitions have been prepared and assembled into a
+ disk image.
+ """
+
+ if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+ cls.__instanciateSubClasses()
+
+ cls.__imgEFIObj.do_install_disk(
+ disk,
+ disk_name,
+ creator,
+ workdir,
+ oe_builddir,
+ bootimg_dir,
+ kernel_dir,
+ native_sysroot)
+
+ cls.__imgBiosObj.do_install_disk(
+ disk,
+ disk_name,
+ creator,
+ workdir,
+ oe_builddir,
+ bootimg_dir,
+ kernel_dir,
+ native_sysroot)
+
+ @classmethod
+ def do_configure_partition(cls, part, source_params, creator, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ native_sysroot):
+ """
+ Called before do_prepare_partition()
+ """
+
+ if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+ cls.__instanciateSubClasses()
+
+ cls.__imgEFIObj.do_configure_partition(
+ part,
+ source_params,
+ creator,
+ cr_workdir,
+ oe_builddir,
+ bootimg_dir,
+ kernel_dir,
+ native_sysroot)
+
+ cls.__imgBiosObj.do_configure_partition(
+ part,
+ source_params,
+ creator,
+ cr_workdir,
+ oe_builddir,
+ bootimg_dir,
+ kernel_dir,
+ native_sysroot)
+
+ @classmethod
+ def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ rootfs_dir, native_sysroot):
+ """
+ Called to do the actual content population for a partition i.e. it
+ 'prepares' the partition to be incorporated into the image.
+ """
+
+ if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+ cls.__instanciateSubClasses()
+
+ cls.__imgEFIObj.do_prepare_partition(
+ part,
+ source_params,
+ creator,
+ cr_workdir,
+ oe_builddir,
+ bootimg_dir,
+ kernel_dir,
+ rootfs_dir,
+ native_sysroot)
+
+ cls.__imgBiosObj.do_prepare_partition(
+ part,
+ source_params,
+ creator,
+ cr_workdir,
+ oe_builddir,
+ bootimg_dir,
+ kernel_dir,
+ rootfs_dir,
+ native_sysroot)
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 8bc362254d..2cfdc10ecd 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -1,21 +1,7 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (c) 2014, Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This implements the 'bootimg-efi' source plugin class for 'wic'
@@ -24,25 +10,28 @@
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
#
+import logging
import os
import shutil
-from wic import msger
+from wic import WicError
+from wic.engine import get_custom_config
from wic.pluginbase import SourcePlugin
-from wic.utils.misc import get_custom_config
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var, \
- BOOTDD_EXTRA_SPACE
+from wic.misc import (exec_cmd, exec_native_cmd,
+ get_bitbake_var, BOOTDD_EXTRA_SPACE)
+
+logger = logging.getLogger('wic')
class BootimgEFIPlugin(SourcePlugin):
"""
Create EFI boot partition.
- This plugin supports GRUB 2 and gummiboot bootloaders.
+ This plugin supports GRUB 2 and systemd-boot bootloaders.
"""
name = 'bootimg-efi'
@classmethod
- def do_configure_grubefi(cls, hdddir, creator, cr_workdir):
+ def do_configure_grubefi(cls, hdddir, creator, cr_workdir, source_params):
"""
Create loader-specific (grub-efi) config
"""
@@ -53,36 +42,68 @@ class BootimgEFIPlugin(SourcePlugin):
if custom_cfg:
# Use a custom configuration for grub
grubefi_conf = custom_cfg
- msger.debug("Using custom configuration file "
- "%s for grub.cfg" % configfile)
+ logger.debug("Using custom configuration file "
+ "%s for grub.cfg", configfile)
else:
- msger.error("configfile is specified but failed to "
- "get it from %s." % configfile)
+ raise WicError("configfile is specified but failed to "
+ "get it from %s." % configfile)
+
+ initrd = source_params.get('initrd')
+
+ if initrd:
+ bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not bootimg_dir:
+ raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
+
+ initrds = initrd.split(';')
+ for rd in initrds:
+ cp_cmd = "cp %s/%s %s" % (bootimg_dir, rd, hdddir)
+ exec_cmd(cp_cmd, True)
+ else:
+ logger.debug("Ignoring missing initrd")
if not custom_cfg:
# Create grub configuration using parameters from wks file
bootloader = creator.ks.bootloader
+ title = source_params.get('title')
grubefi_conf = ""
grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n"
grubefi_conf += "default=boot\n"
grubefi_conf += "timeout=%s\n" % bootloader.timeout
- grubefi_conf += "menuentry 'boot'{\n"
+ grubefi_conf += "menuentry '%s'{\n" % (title if title else "boot")
+
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+ if get_bitbake_var("INITRAMFS_IMAGE"):
+ kernel = "%s-%s.bin" % \
+ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
+
+ label = source_params.get('label')
+ label_conf = "root=%s" % creator.rootdev
+ if label:
+ label_conf = "LABEL=%s" % label
- kernel = "/bzImage"
+ grubefi_conf += "linux /%s %s rootwait %s\n" \
+ % (kernel, label_conf, bootloader.append)
+
+ if initrd:
+ initrds = initrd.split(';')
+ grubefi_conf += "initrd"
+ for rd in initrds:
+ grubefi_conf += " /%s" % rd
+ grubefi_conf += "\n"
- grubefi_conf += "linux %s root=%s rootwait %s\n" \
- % (kernel, creator.rootdev, bootloader.append)
grubefi_conf += "}\n"
- msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \
- % cr_workdir)
+ logger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg",
+ cr_workdir)
cfg = open("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, "w")
cfg.write(grubefi_conf)
cfg.close()
@classmethod
- def do_configure_gummiboot(cls, hdddir, creator, cr_workdir):
+ def do_configure_systemdboot(cls, hdddir, creator, cr_workdir, source_params):
"""
Create loader-specific systemd-boot/gummiboot config
"""
@@ -98,8 +119,23 @@ class BootimgEFIPlugin(SourcePlugin):
loader_conf += "default boot\n"
loader_conf += "timeout %d\n" % bootloader.timeout
- msger.debug("Writing gummiboot config %s/hdd/boot/loader/loader.conf" \
- % cr_workdir)
+ initrd = source_params.get('initrd')
+
+ if initrd:
+ # obviously we need to have a common common deploy var
+ bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not bootimg_dir:
+ raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
+
+ initrds = initrd.split(';')
+ for rd in initrds:
+ cp_cmd = "cp %s/%s %s" % (bootimg_dir, rd, hdddir)
+ exec_cmd(cp_cmd, True)
+ else:
+ logger.debug("Ignoring missing initrd")
+
+ logger.debug("Writing systemd-boot config "
+ "%s/hdd/boot/loader/loader.conf", cr_workdir)
cfg = open("%s/hdd/boot/loader/loader.conf" % cr_workdir, "w")
cfg.write(loader_conf)
cfg.close()
@@ -109,26 +145,43 @@ class BootimgEFIPlugin(SourcePlugin):
if configfile:
custom_cfg = get_custom_config(configfile)
if custom_cfg:
- # Use a custom configuration for gummiboot
+ # Use a custom configuration for systemd-boot
boot_conf = custom_cfg
- msger.debug("Using custom configuration file "
- "%s for gummiboots's boot.conf" % configfile)
+ logger.debug("Using custom configuration file "
+ "%s for systemd-boots's boot.conf", configfile)
else:
- msger.error("configfile is specified but failed to "
- "get it from %s." % configfile)
+ raise WicError("configfile is specified but failed to "
+ "get it from %s.", configfile)
if not custom_cfg:
- # Create gummiboot configuration using parameters from wks file
- kernel = "/bzImage"
+ # Create systemd-boot configuration using parameters from wks file
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+ if get_bitbake_var("INITRAMFS_IMAGE"):
+ kernel = "%s-%s.bin" % \
+ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
+
+ title = source_params.get('title')
boot_conf = ""
- boot_conf += "title boot\n"
- boot_conf += "linux %s\n" % kernel
- boot_conf += "options LABEL=Boot root=%s %s\n" % \
- (creator.rootdev, bootloader.append)
+ boot_conf += "title %s\n" % (title if title else "boot")
+ boot_conf += "linux /%s\n" % kernel
+
+ label = source_params.get('label')
+ label_conf = "LABEL=Boot root=%s" % creator.rootdev
+ if label:
+ label_conf = "LABEL=%s" % label
+
+ boot_conf += "options %s %s\n" % \
+ (label_conf, bootloader.append)
+
+ if initrd:
+ initrds = initrd.split(';')
+ for rd in initrds:
+ boot_conf += "initrd /%s\n" % rd
- msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \
- % cr_workdir)
+ logger.debug("Writing systemd-boot config "
+ "%s/hdd/boot/loader/entries/boot.conf", cr_workdir)
cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w")
cfg.write(boot_conf)
cfg.close()
@@ -148,14 +201,13 @@ class BootimgEFIPlugin(SourcePlugin):
try:
if source_params['loader'] == 'grub-efi':
- cls.do_configure_grubefi(hdddir, creator, cr_workdir)
- elif source_params['loader'] == 'gummiboot' \
- or source_params['loader'] == 'systemd-boot':
- cls.do_configure_gummiboot(hdddir, creator, cr_workdir)
+ cls.do_configure_grubefi(hdddir, creator, cr_workdir, source_params)
+ elif source_params['loader'] == 'systemd-boot':
+ cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params)
else:
- msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
+ raise WicError("unrecognized bootimg-efi loader: %s" % source_params['loader'])
except KeyError:
- msger.error("bootimg-efi requires a loader, none specified")
+ raise WicError("bootimg-efi requires a loader, none specified")
@classmethod
@@ -167,39 +219,46 @@ class BootimgEFIPlugin(SourcePlugin):
'prepares' the partition to be incorporated into the image.
In this case, prepare content for an EFI (grub) boot partition.
"""
- if not bootimg_dir:
- bootimg_dir = get_bitbake_var("HDDDIR")
- if not bootimg_dir:
- msger.error("Couldn't find HDDDIR, exiting\n")
- # just so the result notes display it
- creator.set_bootimg_dir(bootimg_dir)
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
+ raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
staging_kernel_dir = kernel_dir
hdddir = "%s/hdd/boot" % cr_workdir
- install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \
- (staging_kernel_dir, hdddir)
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+ if get_bitbake_var("INITRAMFS_IMAGE"):
+ kernel = "%s-%s.bin" % \
+ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
+
+ install_cmd = "install -m 0644 %s/%s %s/%s" % \
+ (staging_kernel_dir, kernel, hdddir, kernel)
exec_cmd(install_cmd)
+
try:
if source_params['loader'] == 'grub-efi':
shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir,
"%s/grub.cfg" % cr_workdir)
- cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir)
- exec_cmd(cp_cmd, True)
+ for mod in [x for x in os.listdir(kernel_dir) if x.startswith("grub-efi-")]:
+ cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[9:])
+ exec_cmd(cp_cmd, True)
shutil.move("%s/grub.cfg" % cr_workdir,
"%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir)
- elif source_params['loader'] == 'gummiboot' \
- or source_params['loader'] == 'systemd-boot':
- cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir)
- exec_cmd(cp_cmd, True)
+ elif source_params['loader'] == 'systemd-boot':
+ for mod in [x for x in os.listdir(kernel_dir) if x.startswith("systemd-")]:
+ cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[8:])
+ exec_cmd(cp_cmd, True)
else:
- msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
+ raise WicError("unrecognized bootimg-efi loader: %s" %
+ source_params['loader'])
except KeyError:
- msger.error("bootimg-efi requires a loader, none specified")
+ raise WicError("bootimg-efi requires a loader, none specified")
- startup = os.path.join(bootimg_dir, "startup.nsh")
+ startup = os.path.join(kernel_dir, "startup.nsh")
if os.path.exists(startup):
cp_cmd = "cp %s %s/" % (startup, hdddir)
exec_cmd(cp_cmd, True)
@@ -215,13 +274,16 @@ class BootimgEFIPlugin(SourcePlugin):
blocks += extra_blocks
- msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
- (extra_blocks, part.mountpoint, blocks))
+ logger.debug("Added %d extra blocks to %s to get to %d total blocks",
+ extra_blocks, part.mountpoint, blocks)
# dosfs image, created by mkdosfs
bootimg = "%s/boot.img" % cr_workdir
- dosfs_cmd = "mkdosfs -n efi -C %s %d" % (bootimg, blocks)
+ label = part.label if part.label else "ESP"
+
+ dosfs_cmd = "mkdosfs -n %s -i %s -C %s %d" % \
+ (label, part.fsuuid, bootimg, blocks)
exec_native_cmd(dosfs_cmd, native_sysroot)
mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
@@ -234,5 +296,5 @@ class BootimgEFIPlugin(SourcePlugin):
out = exec_cmd(du_cmd)
bootimg_size = out.split()[0]
- part.size = bootimg_size
+ part.size = int(bootimg_size)
part.source_file = bootimg
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index b76c1211ae..138986a71e 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -1,18 +1,5 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This implements the 'bootimg-partition' source plugin class for
@@ -23,14 +10,19 @@
# Maciej Borzecki <maciej.borzecki (at] open-rnd.pl>
#
+import logging
import os
import re
-from wic import msger
-from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import exec_cmd, get_bitbake_var
from glob import glob
+from wic import WicError
+from wic.engine import get_custom_config
+from wic.pluginbase import SourcePlugin
+from wic.misc import exec_cmd, get_bitbake_var
+
+logger = logging.getLogger('wic')
+
class BootimgPartitionPlugin(SourcePlugin):
"""
Create an image of boot partition, copying over files
@@ -40,53 +32,36 @@ class BootimgPartitionPlugin(SourcePlugin):
name = 'bootimg-partition'
@classmethod
- def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
- bootimg_dir, kernel_dir, native_sysroot):
- """
- Called after all partitions have been prepared and assembled into a
- disk image. Do nothing.
- """
- pass
-
- @classmethod
def do_configure_partition(cls, part, source_params, cr, cr_workdir,
- oe_builddir, bootimg_dir, kernel_dir,
- native_sysroot):
- """
- Called before do_prepare_partition(). Possibly prepare
- configuration files of some sort.
-
- """
- pass
-
- @classmethod
- def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
oe_builddir, bootimg_dir, kernel_dir,
- rootfs_dir, native_sysroot):
+ native_sysroot):
"""
- Called to do the actual content population for a partition i.e. it
- 'prepares' the partition to be incorporated into the image.
- In this case, does the following:
- - sets up a vfat partition
- - copies all files listed in IMAGE_BOOT_FILES variable
+ Called before do_prepare_partition(), create u-boot specific boot config
"""
- hdddir = "%s/boot" % cr_workdir
+ hdddir = "%s/boot.%d" % (cr_workdir, part.lineno)
install_cmd = "install -d %s" % hdddir
exec_cmd(install_cmd)
- if not bootimg_dir:
- bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
- if not bootimg_dir:
- msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
+ raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
- msger.debug('Bootimg dir: %s' % bootimg_dir)
+ boot_files = None
+ for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), (None, None)):
+ if fmt:
+ var = fmt % id
+ else:
+ var = ""
- boot_files = get_bitbake_var("IMAGE_BOOT_FILES")
+ boot_files = get_bitbake_var("IMAGE_BOOT_FILES" + var)
+ if boot_files is not None:
+ break
- if not boot_files:
- msger.error('No boot files defined, IMAGE_BOOT_FILES unset')
+ if boot_files is None:
+ raise WicError('No boot files defined, IMAGE_BOOT_FILES unset for entry #%d' % part.lineno)
- msger.debug('Boot files: %s' % boot_files)
+ logger.debug('Boot files: %s', boot_files)
# list of tuples (src_name, dst_name)
deploy_files = []
@@ -94,16 +69,16 @@ class BootimgPartitionPlugin(SourcePlugin):
if ';' in src_entry:
dst_entry = tuple(src_entry.split(';'))
if not dst_entry[0] or not dst_entry[1]:
- msger.error('Malformed boot file entry: %s' % (src_entry))
+ raise WicError('Malformed boot file entry: %s' % src_entry)
else:
dst_entry = (src_entry, src_entry)
- msger.debug('Destination entry: %r' % (dst_entry,))
+ logger.debug('Destination entry: %r', dst_entry)
deploy_files.append(dst_entry)
+ cls.install_task = [];
for deploy_entry in deploy_files:
src, dst = deploy_entry
- install_task = []
if '*' in src:
# by default install files under their basename
entry_name_fn = os.path.basename
@@ -114,27 +89,106 @@ class BootimgPartitionPlugin(SourcePlugin):
os.path.join(dst,
os.path.basename(name))
- srcs = glob(os.path.join(bootimg_dir, src))
+ srcs = glob(os.path.join(kernel_dir, src))
- msger.debug('Globbed sources: %s' % (', '.join(srcs)))
+ logger.debug('Globbed sources: %s', ', '.join(srcs))
for entry in srcs:
+ src = os.path.relpath(entry, kernel_dir)
entry_dst_name = entry_name_fn(entry)
- install_task.append((entry,
- os.path.join(hdddir,
- entry_dst_name)))
+ cls.install_task.append((src, entry_dst_name))
else:
- install_task = [(os.path.join(bootimg_dir, src),
- os.path.join(hdddir, dst))]
-
- for task in install_task:
- src_path, dst_path = task
- msger.debug('Install %s as %s' % (os.path.basename(src_path),
- dst_path))
- install_cmd = "install -m 0644 -D %s %s" \
- % (src_path, dst_path)
- exec_cmd(install_cmd)
-
- msger.debug('Prepare boot partition using rootfs in %s' % (hdddir))
- part.prepare_rootfs(cr_workdir, oe_builddir, hdddir,
- native_sysroot)
+ cls.install_task.append((src, dst))
+
+ if source_params.get('loader') != "u-boot":
+ return
+
+ configfile = cr.ks.bootloader.configfile
+ custom_cfg = None
+ if configfile:
+ custom_cfg = get_custom_config(configfile)
+ if custom_cfg:
+ # Use a custom configuration for extlinux.conf
+ extlinux_conf = custom_cfg
+ logger.debug("Using custom configuration file "
+ "%s for extlinux.cfg", configfile)
+ else:
+ raise WicError("configfile is specified but failed to "
+ "get it from %s." % configfile)
+
+ if not custom_cfg:
+ # The kernel types supported by the sysboot of u-boot
+ kernel_types = ["zImage", "Image", "fitImage", "uImage", "vmlinux"]
+ has_dtb = False
+ fdt_dir = '/'
+ kernel_name = None
+
+ # Find the kernel image name, from the highest precedence to lowest
+ for image in kernel_types:
+ for task in cls.install_task:
+ src, dst = task
+ if re.match(image, src):
+ kernel_name = os.path.join('/', dst)
+ break
+ if kernel_name:
+ break
+
+ for task in cls.install_task:
+ src, dst = task
+ # We suppose that all the dtb are in the same directory
+ if re.search(r'\.dtb', src) and fdt_dir == '/':
+ has_dtb = True
+ fdt_dir = os.path.join(fdt_dir, os.path.dirname(dst))
+ break
+
+ if not kernel_name:
+ raise WicError('No kernel file founded')
+
+ # Compose the extlinux.conf
+ extlinux_conf = "default Yocto\n"
+ extlinux_conf += "label Yocto\n"
+ extlinux_conf += " kernel %s\n" % kernel_name
+ if has_dtb:
+ extlinux_conf += " fdtdir %s\n" % fdt_dir
+ bootloader = cr.ks.bootloader
+ extlinux_conf += "append root=%s rootwait %s\n" \
+ % (cr.rootdev, bootloader.append if bootloader.append else '')
+
+ install_cmd = "install -d %s/extlinux/" % hdddir
+ exec_cmd(install_cmd)
+ cfg = open("%s/extlinux/extlinux.conf" % hdddir, "w")
+ cfg.write(extlinux_conf)
+ cfg.close()
+
+
+ @classmethod
+ def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ rootfs_dir, native_sysroot):
+ """
+ Called to do the actual content population for a partition i.e. it
+ 'prepares' the partition to be incorporated into the image.
+ In this case, does the following:
+ - sets up a vfat partition
+ - copies all files listed in IMAGE_BOOT_FILES variable
+ """
+ hdddir = "%s/boot.%d" % (cr_workdir, part.lineno)
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
+ raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
+
+ logger.debug('Kernel dir: %s', bootimg_dir)
+
+
+ for task in cls.install_task:
+ src_path, dst_path = task
+ logger.debug('Install %s as %s', src_path, dst_path)
+ install_cmd = "install -m 0644 -D %s %s" \
+ % (os.path.join(kernel_dir, src_path),
+ os.path.join(hdddir, dst_path))
+ exec_cmd(install_cmd)
+
+ logger.debug('Prepare boot partition using rootfs in %s', hdddir)
+ part.prepare_rootfs(cr_workdir, oe_builddir, hdddir,
+ native_sysroot, False)
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index f204daa323..f2639e7004 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -1,21 +1,7 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (c) 2014, Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This implements the 'bootimg-pcbios' source plugin class for 'wic'
@@ -24,15 +10,17 @@
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
#
+import logging
import os
+import re
-from wic.utils.errors import ImageError
-from wic import msger
-from wic.utils import runner
-from wic.utils.misc import get_custom_config
+from wic import WicError
+from wic.engine import get_custom_config
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, \
- get_bitbake_var, BOOTDD_EXTRA_SPACE
+from wic.misc import (exec_cmd, exec_native_cmd,
+ get_bitbake_var, BOOTDD_EXTRA_SPACE)
+
+logger = logging.getLogger('wic')
class BootimgPcbiosPlugin(SourcePlugin):
"""
@@ -42,33 +30,51 @@ class BootimgPcbiosPlugin(SourcePlugin):
name = 'bootimg-pcbios'
@classmethod
+ def _get_bootimg_dir(cls, bootimg_dir, dirname):
+ """
+ Check if dirname exists in default bootimg_dir or in STAGING_DIR.
+ """
+ staging_datadir = get_bitbake_var("STAGING_DATADIR")
+ for result in (bootimg_dir, staging_datadir):
+ if os.path.exists("%s/%s" % (result, dirname)):
+ return result
+
+ # STAGING_DATADIR is expanded with MLPREFIX if multilib is enabled
+ # but dependency syslinux is still populated to original STAGING_DATADIR
+ nonarch_datadir = re.sub('/[^/]*recipe-sysroot', '/recipe-sysroot', staging_datadir)
+ if os.path.exists(os.path.join(nonarch_datadir, dirname)):
+ return nonarch_datadir
+
+ raise WicError("Couldn't find correct bootimg_dir, exiting")
+
+ @classmethod
def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir,
bootimg_dir, kernel_dir, native_sysroot):
"""
Called after all partitions have been prepared and assembled into a
disk image. In this case, we install the MBR.
"""
+ bootimg_dir = cls._get_bootimg_dir(bootimg_dir, 'syslinux')
mbrfile = "%s/syslinux/" % bootimg_dir
if creator.ptable_format == 'msdos':
mbrfile += "mbr.bin"
elif creator.ptable_format == 'gpt':
mbrfile += "gptmbr.bin"
else:
- msger.error("Unsupported partition table: %s" % creator.ptable_format)
+ raise WicError("Unsupported partition table: %s" %
+ creator.ptable_format)
if not os.path.exists(mbrfile):
- msger.error("Couldn't find %s. If using the -e option, do you "
- "have the right MACHINE set in local.conf? If not, "
- "is the bootimg_dir path correct?" % mbrfile)
+ raise WicError("Couldn't find %s. If using the -e option, do you "
+ "have the right MACHINE set in local.conf? If not, "
+ "is the bootimg_dir path correct?" % mbrfile)
full_path = creator._full_path(workdir, disk_name, "direct")
- msger.debug("Installing MBR on disk %s as %s with size %s bytes" \
- % (disk_name, full_path, disk['min_size']))
+ logger.debug("Installing MBR on disk %s as %s with size %s bytes",
+ disk_name, full_path, disk.min_size)
- rcode = runner.show(['dd', 'if=%s' % mbrfile,
- 'of=%s' % full_path, 'conv=notrunc'])
- if rcode != 0:
- raise ImageError("Unable to set MBR to %s" % full_path)
+ dd_cmd = "dd if=%s of=%s conv=notrunc" % (mbrfile, full_path)
+ exec_cmd(dd_cmd, native_sysroot)
@classmethod
def do_configure_partition(cls, part, source_params, creator, cr_workdir,
@@ -90,11 +96,11 @@ class BootimgPcbiosPlugin(SourcePlugin):
if custom_cfg:
# Use a custom configuration for grub
syslinux_conf = custom_cfg
- msger.debug("Using custom configuration file "
- "%s for syslinux.cfg" % bootloader.configfile)
+ logger.debug("Using custom configuration file %s "
+ "for syslinux.cfg", bootloader.configfile)
else:
- msger.error("configfile is specified but failed to "
- "get it from %s." % bootloader.configfile)
+ raise WicError("configfile is specified but failed to "
+ "get it from %s." % bootloader.configfile)
if not custom_cfg:
# Create syslinux configuration using parameters from wks file
@@ -122,8 +128,8 @@ class BootimgPcbiosPlugin(SourcePlugin):
syslinux_conf += "APPEND label=boot root=%s %s\n" % \
(creator.rootdev, bootloader.append)
- msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \
- % cr_workdir)
+ logger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg",
+ cr_workdir)
cfg = open("%s/hdd/boot/syslinux.cfg" % cr_workdir, "w")
cfg.write(syslinux_conf)
cfg.close()
@@ -137,33 +143,31 @@ class BootimgPcbiosPlugin(SourcePlugin):
'prepares' the partition to be incorporated into the image.
In this case, prepare content for legacy bios boot partition.
"""
- def _has_syslinux(dirname):
- if dirname:
- syslinux = "%s/syslinux" % dirname
- if os.path.exists(syslinux):
- return True
- return False
-
- if not _has_syslinux(bootimg_dir):
- bootimg_dir = get_bitbake_var("STAGING_DATADIR")
- if not bootimg_dir:
- msger.error("Couldn't find STAGING_DATADIR, exiting\n")
- if not _has_syslinux(bootimg_dir):
- msger.error("Please build syslinux first\n")
- # just so the result notes display it
- creator.set_bootimg_dir(bootimg_dir)
+ bootimg_dir = cls._get_bootimg_dir(bootimg_dir, 'syslinux')
staging_kernel_dir = kernel_dir
hdddir = "%s/hdd/boot" % cr_workdir
- install_cmd = "install -m 0644 %s/bzImage %s/vmlinuz" \
- % (staging_kernel_dir, hdddir)
- exec_cmd(install_cmd)
-
- install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \
- % (bootimg_dir, hdddir)
- exec_cmd(install_cmd)
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+ if get_bitbake_var("INITRAMFS_IMAGE"):
+ kernel = "%s-%s.bin" % \
+ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
+
+ cmds = ("install -m 0644 %s/%s %s/vmlinuz" %
+ (staging_kernel_dir, kernel, hdddir),
+ "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" %
+ (bootimg_dir, hdddir),
+ "install -m 0644 %s/syslinux/vesamenu.c32 %s/vesamenu.c32" %
+ (bootimg_dir, hdddir),
+ "install -m 444 %s/syslinux/libcom32.c32 %s/libcom32.c32" %
+ (bootimg_dir, hdddir),
+ "install -m 444 %s/syslinux/libutil.c32 %s/libutil.c32" %
+ (bootimg_dir, hdddir))
+
+ for install_cmd in cmds:
+ exec_cmd(install_cmd)
du_cmd = "du -bks %s" % hdddir
out = exec_cmd(du_cmd)
@@ -176,13 +180,14 @@ class BootimgPcbiosPlugin(SourcePlugin):
blocks += extra_blocks
- msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
- (extra_blocks, part.mountpoint, blocks))
+ logger.debug("Added %d extra blocks to %s to get to %d total blocks",
+ extra_blocks, part.mountpoint, blocks)
# dosfs image, created by mkdosfs
- bootimg = "%s/boot.img" % cr_workdir
+ bootimg = "%s/boot%s.img" % (cr_workdir, part.lineno)
- dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg, blocks)
+ dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \
+ (part.fsuuid, bootimg, blocks)
exec_native_cmd(dosfs_cmd, native_sysroot)
mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
@@ -198,7 +203,5 @@ class BootimgPcbiosPlugin(SourcePlugin):
out = exec_cmd(du_cmd)
bootimg_size = out.split()[0]
- part.size = int(out.split()[0])
+ part.size = int(bootimg_size)
part.source_file = bootimg
-
-
diff --git a/scripts/lib/wic/plugins/source/fsimage.py b/scripts/lib/wic/plugins/source/fsimage.py
deleted file mode 100644
index f894e89367..0000000000
--- a/scripts/lib/wic/plugins/source/fsimage.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-import os
-
-from wic import msger
-from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import get_bitbake_var
-
-class FSImagePlugin(SourcePlugin):
- """
- Add an already existing filesystem image to the partition layout.
- """
-
- name = 'fsimage'
-
- @classmethod
- def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
- bootimg_dir, kernel_dir, native_sysroot):
- """
- Called after all partitions have been prepared and assembled into a
- disk image. Do nothing.
- """
- pass
-
- @classmethod
- def do_configure_partition(cls, part, source_params, cr, cr_workdir,
- oe_builddir, bootimg_dir, kernel_dir,
- native_sysroot):
- """
- Called before do_prepare_partition(). Possibly prepare
- configuration files of some sort.
- """
- pass
-
- @classmethod
- def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
- oe_builddir, bootimg_dir, kernel_dir,
- rootfs_dir, native_sysroot):
- """
- Called to do the actual content population for a partition i.e. it
- 'prepares' the partition to be incorporated into the image.
- """
- if not bootimg_dir:
- bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
- if not bootimg_dir:
- msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
-
- msger.debug('Bootimg dir: %s' % bootimg_dir)
-
- if 'file' not in source_params:
- msger.error("No file specified\n")
- return
-
- src = os.path.join(bootimg_dir, source_params['file'])
-
-
- msger.debug('Preparing partition using image %s' % (src))
- part.prepare_rootfs_from_fs_image(cr_workdir, src, "")
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 3858fd439b..11326a274b 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -1,18 +1,5 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This implements the 'isoimage-isohybrid' source plugin class for 'wic'
@@ -20,15 +7,18 @@
# AUTHORS
# Mihaly Varga <mihaly.varga (at] ni.com>
+import glob
+import logging
import os
import re
import shutil
-import glob
-from wic import msger
+from wic import WicError
+from wic.engine import get_custom_config
from wic.pluginbase import SourcePlugin
-from wic.utils.misc import get_custom_config
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var
+from wic.misc import exec_cmd, exec_native_cmd, get_bitbake_var
+
+logger = logging.getLogger('wic')
class IsoImagePlugin(SourcePlugin):
"""
@@ -44,7 +34,7 @@ class IsoImagePlugin(SourcePlugin):
Example kickstart file:
part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi, \\
- image_name= IsoImage" --ondisk cd --label LIVECD --fstype=ext2
+ image_name= IsoImage" --ondisk cd --label LIVECD
bootloader --timeout=10 --append=" "
In --sourceparams "loader" specifies the bootloader used for booting in EFI
@@ -80,18 +70,24 @@ class IsoImagePlugin(SourcePlugin):
syslinux_conf += "DEFAULT boot\n"
syslinux_conf += "LABEL boot\n"
- kernel = "/bzImage"
- syslinux_conf += "KERNEL " + kernel + "\n"
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+ if get_bitbake_var("INITRAMFS_IMAGE"):
+ kernel = "%s-%s.bin" % \
+ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
+
+ syslinux_conf += "KERNEL /" + kernel + "\n"
syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" \
% bootloader.append
- msger.debug("Writing syslinux config %s/ISO/isolinux/isolinux.cfg" \
- % cr_workdir)
+ logger.debug("Writing syslinux config %s/ISO/isolinux/isolinux.cfg",
+ cr_workdir)
+
with open("%s/ISO/isolinux/isolinux.cfg" % cr_workdir, "w") as cfg:
cfg.write(syslinux_conf)
@classmethod
- def do_configure_grubefi(cls, part, creator, cr_workdir):
+ def do_configure_grubefi(cls, part, creator, target_dir):
"""
Create loader-specific (grub-efi) config
"""
@@ -99,13 +95,13 @@ class IsoImagePlugin(SourcePlugin):
if configfile:
grubefi_conf = get_custom_config(configfile)
if grubefi_conf:
- msger.debug("Using custom configuration file "
- "%s for grub.cfg" % configfile)
+ logger.debug("Using custom configuration file %s for grub.cfg",
+ configfile)
else:
- msger.error("configfile is specified but failed to "
- "get it from %s." % configfile)
+ raise WicError("configfile is specified "
+ "but failed to get it from %s", configfile)
else:
- splash = os.path.join(cr_workdir, "EFI/boot/splash.jpg")
+ splash = os.path.join(target_dir, "splash.jpg")
if os.path.exists(splash):
splashline = "menu background splash.jpg"
else:
@@ -123,9 +119,13 @@ class IsoImagePlugin(SourcePlugin):
grubefi_conf += "\n"
grubefi_conf += "menuentry 'boot'{\n"
- kernel = "/bzImage"
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+ if get_bitbake_var("INITRAMFS_IMAGE"):
+ kernel = "%s-%s.bin" % \
+ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
- grubefi_conf += "linux %s rootwait %s\n" \
+ grubefi_conf += "linux /%s rootwait %s\n" \
% (kernel, bootloader.append)
grubefi_conf += "initrd /initrd \n"
grubefi_conf += "}\n"
@@ -133,9 +133,10 @@ class IsoImagePlugin(SourcePlugin):
if splashline:
grubefi_conf += "%s\n" % splashline
- msger.debug("Writing grubefi config %s/EFI/BOOT/grub.cfg" \
- % cr_workdir)
- with open("%s/EFI/BOOT/grub.cfg" % cr_workdir, "w") as cfg:
+ cfg_path = os.path.join(target_dir, "grub.cfg")
+ logger.debug("Writing grubefi config %s", cfg_path)
+
+ with open(cfg_path, "w") as cfg:
cfg.write(grubefi_conf)
@staticmethod
@@ -144,27 +145,28 @@ class IsoImagePlugin(SourcePlugin):
Create path for initramfs image
"""
- initrd = get_bitbake_var("INITRD")
+ initrd = get_bitbake_var("INITRD_LIVE") or get_bitbake_var("INITRD")
if not initrd:
initrd_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
if not initrd_dir:
- msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting.\n")
+ raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting.")
image_name = get_bitbake_var("IMAGE_BASENAME")
if not image_name:
- msger.error("Couldn't find IMAGE_BASENAME, exiting.\n")
+ raise WicError("Couldn't find IMAGE_BASENAME, exiting.")
image_type = get_bitbake_var("INITRAMFS_FSTYPES")
if not image_type:
- msger.error("Couldn't find INITRAMFS_FSTYPES, exiting.\n")
+ raise WicError("Couldn't find INITRAMFS_FSTYPES, exiting.")
- machine_arch = get_bitbake_var("MACHINE_ARCH")
- if not machine_arch:
- msger.error("Couldn't find MACHINE_ARCH, exiting.\n")
+ machine = os.path.basename(initrd_dir)
- initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, machine_arch, image_type))[0]
+ pattern = '%s/%s*%s.%s' % (initrd_dir, image_name, machine, image_type)
+ files = glob.glob(pattern)
+ if files:
+ initrd = files[0]
- if not os.path.exists(initrd):
+ if not initrd or not os.path.exists(initrd):
# Create initrd from rootfs directory
initrd = "%s/initrd.cpio.gz" % cr_workdir
initrd_dir = "%s/INITRD" % cr_workdir
@@ -183,66 +185,16 @@ class IsoImagePlugin(SourcePlugin):
os.symlink(os.readlink("%s/sbin/init" % rootfs_dir), \
"%s/init" % initrd_dir)
else:
- msger.error("Couldn't find or build initrd, exiting.\n")
+ raise WicError("Couldn't find or build initrd, exiting.")
- exec_cmd("cd %s && find . | cpio -o -H newc -R +0:+0 >./initrd.cpio " \
- % initrd_dir, as_shell=True)
- exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \
- % (cr_workdir, initrd), as_shell=True)
+ exec_cmd("cd %s && find . | cpio -o -H newc -R root:root >%s/initrd.cpio " \
+ % (initrd_dir, cr_workdir), as_shell=True)
+ exec_cmd("gzip -f -9 %s/initrd.cpio" % cr_workdir, as_shell=True)
shutil.rmtree(initrd_dir)
return initrd
@classmethod
- def do_stage_partition(cls, part, source_params, creator, cr_workdir,
- oe_builddir, bootimg_dir, kernel_dir,
- native_sysroot):
- """
- Special content staging called before do_prepare_partition().
- It cheks if all necessary tools are available, if not
- tries to instal them.
- """
- # Make sure parted is available in native sysroot
- if not os.path.isfile("%s/usr/sbin/parted" % native_sysroot):
- msger.info("Building parted-native...\n")
- exec_cmd("bitbake parted-native")
-
- # Make sure mkfs.ext2/3/4 is available in native sysroot
- if not os.path.isfile("%s/sbin/mkfs.ext2" % native_sysroot):
- msger.info("Building e2fsprogs-native...\n")
- exec_cmd("bitbake e2fsprogs-native")
-
- # Make sure syslinux is available in sysroot and in native sysroot
- syslinux_dir = get_bitbake_var("STAGING_DATADIR")
- if not syslinux_dir:
- msger.error("Couldn't find STAGING_DATADIR, exiting.\n")
- if not os.path.exists("%s/syslinux" % syslinux_dir):
- msger.info("Building syslinux...\n")
- exec_cmd("bitbake syslinux")
- if not os.path.exists("%s/syslinux" % syslinux_dir):
- msger.error("Please build syslinux first\n")
-
- # Make sure syslinux is available in native sysroot
- if not os.path.exists("%s/usr/bin/syslinux" % native_sysroot):
- msger.info("Building syslinux-native...\n")
- exec_cmd("bitbake syslinux-native")
-
- #Make sure mkisofs is available in native sysroot
- if not os.path.isfile("%s/usr/bin/mkisofs" % native_sysroot):
- msger.info("Building cdrtools-native...\n")
- exec_cmd("bitbake cdrtools-native")
-
- # Make sure mkfs.vfat is available in native sysroot
- if not os.path.isfile("%s/sbin/mkfs.vfat" % native_sysroot):
- msger.info("Building dosfstools-native...\n")
- exec_cmd("bitbake dosfstools-native")
-
- # Make sure mtools is available in native sysroot
- if not os.path.isfile("%s/usr/bin/mcopy" % native_sysroot):
- msger.info("Building mtools-native...\n")
- exec_cmd("bitbake mtools-native")
-
- @classmethod
def do_configure_partition(cls, part, source_params, creator, cr_workdir,
oe_builddir, bootimg_dir, kernel_dir,
native_sysroot):
@@ -251,18 +203,18 @@ class IsoImagePlugin(SourcePlugin):
"""
isodir = "%s/ISO/" % cr_workdir
- if os.path.exists(cr_workdir):
- shutil.rmtree(cr_workdir)
+ if os.path.exists(isodir):
+ shutil.rmtree(isodir)
install_cmd = "install -d %s " % isodir
exec_cmd(install_cmd)
# Overwrite the name of the created image
- msger.debug("%s" % source_params)
+ logger.debug(source_params)
if 'image_name' in source_params and \
source_params['image_name'].strip():
creator.name = source_params['image_name'].strip()
- msger.debug("The name of the image is: %s" % creator.name)
+ logger.debug("The name of the image is: %s", creator.name)
@classmethod
def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
@@ -278,7 +230,7 @@ class IsoImagePlugin(SourcePlugin):
if part.rootfs_dir is None:
if not 'ROOTFS_DIR' in rootfs_dir:
- msger.error("Couldn't find --rootfs-dir, exiting.\n")
+ raise WicError("Couldn't find --rootfs-dir, exiting.")
rootfs_dir = rootfs_dir['ROOTFS_DIR']
else:
if part.rootfs_dir in rootfs_dir:
@@ -286,144 +238,96 @@ class IsoImagePlugin(SourcePlugin):
elif part.rootfs_dir:
rootfs_dir = part.rootfs_dir
else:
- msg = "Couldn't find --rootfs-dir=%s connection "
- msg += "or it is not a valid path, exiting.\n"
- msger.error(msg % part.rootfs_dir)
+ raise WicError("Couldn't find --rootfs-dir=%s connection "
+ "or it is not a valid path, exiting." %
+ part.rootfs_dir)
if not os.path.isdir(rootfs_dir):
rootfs_dir = get_bitbake_var("IMAGE_ROOTFS")
if not os.path.isdir(rootfs_dir):
- msger.error("Couldn't find IMAGE_ROOTFS, exiting.\n")
+ raise WicError("Couldn't find IMAGE_ROOTFS, exiting.")
part.rootfs_dir = rootfs_dir
-
- # Prepare rootfs.img
- hdd_dir = get_bitbake_var("HDDDIR")
+ deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
img_iso_dir = get_bitbake_var("ISODIR")
- rootfs_img = "%s/rootfs.img" % hdd_dir
- if not os.path.isfile(rootfs_img):
- rootfs_img = "%s/rootfs.img" % img_iso_dir
- if not os.path.isfile(rootfs_img):
- # check if rootfs.img is in deploydir
- deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
- image_name = get_bitbake_var("IMAGE_LINK_NAME")
- rootfs_img = "%s/%s.%s" \
- % (deploy_dir, image_name, part.fstype)
-
- if not os.path.isfile(rootfs_img):
- # create image file with type specified by --fstype
- # which contains rootfs
- du_cmd = "du -bks %s" % rootfs_dir
- out = exec_cmd(du_cmd)
- part.size = int(out.split()[0])
- part.extra_space = 0
- part.overhead_factor = 1.2
- part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, \
- native_sysroot)
- rootfs_img = part.source_file
-
- install_cmd = "install -m 0644 %s %s/rootfs.img" \
- % (rootfs_img, isodir)
- exec_cmd(install_cmd)
-
# Remove the temporary file created by part.prepare_rootfs()
if os.path.isfile(part.source_file):
os.remove(part.source_file)
- # Prepare initial ramdisk
- initrd = "%s/initrd" % hdd_dir
- if not os.path.isfile(initrd):
- initrd = "%s/initrd" % img_iso_dir
- if not os.path.isfile(initrd):
- initrd = cls._build_initramfs_path(rootfs_dir, cr_workdir)
-
- install_cmd = "install -m 0644 %s %s/initrd" \
- % (initrd, isodir)
+ # Support using a different initrd other than default
+ if source_params.get('initrd'):
+ initrd = source_params['initrd']
+ if not deploy_dir:
+ raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
+ cp_cmd = "cp %s/%s %s" % (deploy_dir, initrd, cr_workdir)
+ exec_cmd(cp_cmd)
+ else:
+ # Prepare initial ramdisk
+ initrd = "%s/initrd" % deploy_dir
+ if not os.path.isfile(initrd):
+ initrd = "%s/initrd" % img_iso_dir
+ if not os.path.isfile(initrd):
+ initrd = cls._build_initramfs_path(rootfs_dir, cr_workdir)
+
+ install_cmd = "install -m 0644 %s %s/initrd" % (initrd, isodir)
exec_cmd(install_cmd)
# Remove the temporary file created by _build_initramfs_path function
if os.path.isfile("%s/initrd.cpio.gz" % cr_workdir):
os.remove("%s/initrd.cpio.gz" % cr_workdir)
- # Install bzImage
- install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \
- (kernel_dir, isodir)
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+ if get_bitbake_var("INITRAMFS_IMAGE"):
+ kernel = "%s-%s.bin" % \
+ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
+
+ install_cmd = "install -m 0644 %s/%s %s/%s" % \
+ (kernel_dir, kernel, isodir, kernel)
exec_cmd(install_cmd)
#Create bootloader for efi boot
try:
- if source_params['loader'] == 'grub-efi':
- # Builds grub.cfg if ISODIR didn't exist or
- # didn't contains grub.cfg
- bootimg_dir = img_iso_dir
- if not os.path.exists("%s/EFI/BOOT" % bootimg_dir):
- bootimg_dir = "%s/bootimg" % cr_workdir
- if os.path.exists(bootimg_dir):
- shutil.rmtree(bootimg_dir)
- install_cmd = "install -d %s/EFI/BOOT" % bootimg_dir
- exec_cmd(install_cmd)
-
- if not os.path.isfile("%s/EFI/BOOT/boot.cfg" % bootimg_dir):
- cls.do_configure_grubefi(part, creator, bootimg_dir)
+ target_dir = "%s/EFI/BOOT" % isodir
+ if os.path.exists(target_dir):
+ shutil.rmtree(target_dir)
+ os.makedirs(target_dir)
+
+ if source_params['loader'] == 'grub-efi':
# Builds bootx64.efi/bootia32.efi if ISODIR didn't exist or
# didn't contains it
target_arch = get_bitbake_var("TARGET_SYS")
if not target_arch:
- msger.error("Coludn't find target architecture\n")
+ raise WicError("Coludn't find target architecture")
if re.match("x86_64", target_arch):
- grub_target = 'x86_64-efi'
- grub_image = "bootx64.efi"
+ grub_src_image = "grub-efi-bootx64.efi"
+ grub_dest_image = "bootx64.efi"
elif re.match('i.86', target_arch):
- grub_target = 'i386-efi'
- grub_image = "bootia32.efi"
+ grub_src_image = "grub-efi-bootia32.efi"
+ grub_dest_image = "bootia32.efi"
else:
- msger.error("grub-efi is incompatible with target %s\n" \
- % target_arch)
-
- if not os.path.isfile("%s/EFI/BOOT/%s" \
- % (bootimg_dir, grub_image)):
- grub_path = get_bitbake_var("STAGING_LIBDIR")
- if not grub_path:
- msger.error("Couldn't find STAGING_LIBDIR, exiting.\n")
-
- grub_core = "%s/grub/%s" % (grub_path, grub_target)
- if not os.path.exists(grub_core):
- msger.info("Building grub-efi...\n")
- exec_cmd("bitbake grub-efi")
- if not os.path.exists(grub_core):
- msger.error("Please build grub-efi first\n")
-
- grub_cmd = "grub-mkimage -p '/EFI/BOOT' "
- grub_cmd += "-d %s " % grub_core
- grub_cmd += "-O %s -o %s/EFI/BOOT/%s " \
- % (grub_target, bootimg_dir, grub_image)
- grub_cmd += "part_gpt part_msdos ntfs ntfscomp fat ext2 "
- grub_cmd += "normal chain boot configfile linux multiboot "
- grub_cmd += "search efi_gop efi_uga font gfxterm gfxmenu "
- grub_cmd += "terminal minicmd test iorw loadenv echo help "
- grub_cmd += "reboot serial terminfo iso9660 loopback tar "
- grub_cmd += "memdisk ls search_fs_uuid udf btrfs xfs lvm "
- grub_cmd += "reiserfs ata "
- exec_native_cmd(grub_cmd, native_sysroot)
+ raise WicError("grub-efi is incompatible with target %s" %
+ target_arch)
- else:
- # TODO: insert gummiboot stuff
- msger.error("unrecognized bootimg-efi loader: %s" \
- % source_params['loader'])
- except KeyError:
- msger.error("bootimg-efi requires a loader, none specified")
+ grub_target = os.path.join(target_dir, grub_dest_image)
+ if not os.path.isfile(grub_target):
+ grub_src = os.path.join(deploy_dir, grub_src_image)
+ if not os.path.exists(grub_src):
+ raise WicError("Grub loader %s is not found in %s. "
+ "Please build grub-efi first" % (grub_src_image, deploy_dir))
+ shutil.copy(grub_src, grub_target)
- if os.path.exists("%s/EFI/BOOT" % isodir):
- shutil.rmtree("%s/EFI/BOOT" % isodir)
+ if not os.path.isfile(os.path.join(target_dir, "boot.cfg")):
+ cls.do_configure_grubefi(part, creator, target_dir)
- shutil.copytree(bootimg_dir+"/EFI/BOOT", isodir+"/EFI/BOOT")
-
- # If exists, remove cr_workdir/bootimg temporary folder
- if os.path.exists("%s/bootimg" % cr_workdir):
- shutil.rmtree("%s/bootimg" % cr_workdir)
+ else:
+ raise WicError("unrecognized bootimg-efi loader: %s" %
+ source_params['loader'])
+ except KeyError:
+ raise WicError("bootimg-efi requires a loader, none specified")
# Create efi.img that contains bootloader files for EFI booting
# if ISODIR didn't exist or didn't contains it
@@ -432,20 +336,23 @@ class IsoImagePlugin(SourcePlugin):
(img_iso_dir, isodir)
exec_cmd(install_cmd)
else:
+ # Default to 100 blocks of extra space for file system overhead
+ esp_extra_blocks = int(source_params.get('esp_extra_blocks', '100'))
+
du_cmd = "du -bks %s/EFI" % isodir
out = exec_cmd(du_cmd)
blocks = int(out.split()[0])
- # Add some extra space for file system overhead
- blocks += 100
- msg = "Added 100 extra blocks to %s to get to %d total blocks" \
- % (part.mountpoint, blocks)
- msger.debug(msg)
+ blocks += esp_extra_blocks
+ logger.debug("Added 100 extra blocks to %s to get to %d "
+ "total blocks", part.mountpoint, blocks)
# dosfs image for EFI boot
bootimg = "%s/efi.img" % isodir
- dosfs_cmd = 'mkfs.vfat -n "EFIimg" -S 512 -C %s %d' \
- % (bootimg, blocks)
+ esp_label = source_params.get('esp_label', 'EFIimg')
+
+ dosfs_cmd = 'mkfs.vfat -n \'%s\' -S 512 -C %s %d' \
+ % (esp_label, bootimg, blocks)
exec_native_cmd(dosfs_cmd, native_sysroot)
mmd_cmd = "mmd -i %s ::/EFI" % bootimg
@@ -461,7 +368,7 @@ class IsoImagePlugin(SourcePlugin):
# Prepare files for legacy boot
syslinux_dir = get_bitbake_var("STAGING_DATADIR")
if not syslinux_dir:
- msger.error("Couldn't find STAGING_DATADIR, exiting.\n")
+ raise WicError("Couldn't find STAGING_DATADIR, exiting.")
if os.path.exists("%s/isolinux" % isodir):
shutil.rmtree("%s/isolinux" % isodir)
@@ -501,7 +408,7 @@ class IsoImagePlugin(SourcePlugin):
mkisofs_cmd += "-eltorito-platform 0xEF -eltorito-boot %s " % efi_img
mkisofs_cmd += "-no-emul-boot %s " % isodir
- msger.debug("running command: %s" % mkisofs_cmd)
+ logger.debug("running command: %s", mkisofs_cmd)
exec_native_cmd(mkisofs_cmd, native_sysroot)
shutil.rmtree(isodir)
@@ -522,23 +429,19 @@ class IsoImagePlugin(SourcePlugin):
utility for booting via BIOS from disk storage devices.
"""
+ iso_img = "%s.p1" % disk.path
full_path = creator._full_path(workdir, disk_name, "direct")
- iso_img = "%s.p1" % full_path
full_path_iso = creator._full_path(workdir, disk_name, "iso")
isohybrid_cmd = "isohybrid -u %s" % iso_img
- msger.debug("running command: %s" % \
- isohybrid_cmd)
+ logger.debug("running command: %s", isohybrid_cmd)
exec_native_cmd(isohybrid_cmd, native_sysroot)
# Replace the image created by direct plugin with the one created by
# mkisofs command. This is necessary because the iso image created by
# mkisofs has a very specific MBR is system area of the ISO image, and
# direct plugin adds and configures an another MBR.
- msger.debug("Replaceing the image created by direct plugin\n")
- os.remove(full_path)
+ logger.debug("Replaceing the image created by direct plugin\n")
+ os.remove(disk.path)
shutil.copy2(iso_img, full_path_iso)
shutil.copy2(full_path_iso, full_path)
-
- # Remove temporary ISO file
- os.remove(iso_img)
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index e0b11f95ad..82970ce51b 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -1,27 +1,17 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
+import logging
import os
-from wic import msger
+from wic import WicError
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import exec_cmd, get_bitbake_var
+from wic.misc import exec_cmd, get_bitbake_var
from wic.filemap import sparse_copy
+logger = logging.getLogger('wic')
+
class RawCopyPlugin(SourcePlugin):
"""
Populate partition content from raw image file.
@@ -29,24 +19,24 @@ class RawCopyPlugin(SourcePlugin):
name = 'rawcopy'
- @classmethod
- def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
- bootimg_dir, kernel_dir, native_sysroot):
- """
- Called after all partitions have been prepared and assembled into a
- disk image. Do nothing.
- """
- pass
+ @staticmethod
+ def do_image_label(fstype, dst, label):
+ if fstype.startswith('ext'):
+ cmd = 'tune2fs -L %s %s' % (label, dst)
+ elif fstype in ('msdos', 'vfat'):
+ cmd = 'dosfslabel %s %s' % (dst, label)
+ elif fstype == 'btrfs':
+ cmd = 'btrfs filesystem label %s %s' % (dst, label)
+ elif fstype == 'swap':
+ cmd = 'mkswap -L %s %s' % (label, dst)
+ elif fstype == 'squashfs':
+ raise WicError("It's not possible to update a squashfs "
+ "filesystem label '%s'" % (label))
+ else:
+ raise WicError("Cannot update filesystem label: "
+ "Unknown fstype: '%s'" % (fstype))
- @classmethod
- def do_configure_partition(cls, part, source_params, cr, cr_workdir,
- oe_builddir, bootimg_dir, kernel_dir,
- native_sysroot):
- """
- Called before do_prepare_partition(). Possibly prepare
- configuration files of some sort.
- """
- pass
+ exec_cmd(cmd)
@classmethod
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
@@ -56,32 +46,36 @@ class RawCopyPlugin(SourcePlugin):
Called to do the actual content population for a partition i.e. it
'prepares' the partition to be incorporated into the image.
"""
- if not bootimg_dir:
- bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
- if not bootimg_dir:
- msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
+ raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
- msger.debug('Bootimg dir: %s' % bootimg_dir)
+ logger.debug('Kernel dir: %s', kernel_dir)
if 'file' not in source_params:
- msger.error("No file specified\n")
- return
+ raise WicError("No file specified")
- src = os.path.join(bootimg_dir, source_params['file'])
+ src = os.path.join(kernel_dir, source_params['file'])
dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
+ if not os.path.exists(os.path.dirname(dst)):
+ os.makedirs(os.path.dirname(dst))
+
if 'skip' in source_params:
- sparse_copy(src, dst, skip=source_params['skip'])
+ sparse_copy(src, dst, skip=int(source_params['skip']))
else:
sparse_copy(src, dst)
# get the size in the right units for kickstart (kB)
du_cmd = "du -Lbks %s" % dst
out = exec_cmd(du_cmd)
- filesize = out.split()[0]
+ filesize = int(out.split()[0])
- if int(filesize) > int(part.size):
+ if filesize > part.size:
part.size = filesize
- part.source_file = dst
+ if part.label:
+ RawCopyPlugin.do_image_label(part.fstype, dst, part.label)
+ part.source_file = dst
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index 425da8b22a..e26e95b991 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -1,21 +1,7 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (c) 2014, Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This implements the 'rootfs' source plugin class for 'wic'
@@ -25,11 +11,18 @@
# Joao Henrique Ferreira de Freitas <joaohf (at] gmail.com>
#
+import logging
import os
+import shutil
+import sys
+
+from oe.path import copyhardlinktree
-from wic import msger
+from wic import WicError
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import get_bitbake_var
+from wic.misc import get_bitbake_var
+
+logger = logging.getLogger('wic')
class RootfsPlugin(SourcePlugin):
"""
@@ -41,16 +34,15 @@ class RootfsPlugin(SourcePlugin):
@staticmethod
def __get_rootfs_dir(rootfs_dir):
if os.path.isdir(rootfs_dir):
- return rootfs_dir
+ return os.path.realpath(rootfs_dir)
image_rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", rootfs_dir)
if not os.path.isdir(image_rootfs_dir):
- msg = "No valid artifact IMAGE_ROOTFS from image named"
- msg += " %s has been found at %s, exiting.\n" % \
- (rootfs_dir, image_rootfs_dir)
- msger.error(msg)
+ raise WicError("No valid artifact IMAGE_ROOTFS from image "
+ "named %s has been found at %s, exiting." %
+ (rootfs_dir, image_rootfs_dir))
- return image_rootfs_dir
+ return os.path.realpath(image_rootfs_dir)
@classmethod
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
@@ -63,8 +55,8 @@ class RootfsPlugin(SourcePlugin):
"""
if part.rootfs_dir is None:
if not 'ROOTFS_DIR' in krootfs_dir:
- msg = "Couldn't find --rootfs-dir, exiting"
- msger.error(msg)
+ raise WicError("Couldn't find --rootfs-dir, exiting")
+
rootfs_dir = krootfs_dir['ROOTFS_DIR']
else:
if part.rootfs_dir in krootfs_dir:
@@ -72,12 +64,49 @@ class RootfsPlugin(SourcePlugin):
elif part.rootfs_dir:
rootfs_dir = part.rootfs_dir
else:
- msg = "Couldn't find --rootfs-dir=%s connection"
- msg += " or it is not a valid path, exiting"
- msger.error(msg % part.rootfs_dir)
+ raise WicError("Couldn't find --rootfs-dir=%s connection or "
+ "it is not a valid path, exiting" % part.rootfs_dir)
+
+ part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
+
+ new_rootfs = None
+ # Handle excluded paths.
+ if part.exclude_path is not None:
+ # We need a new rootfs directory we can delete files from. Copy to
+ # workdir.
+ new_rootfs = os.path.realpath(os.path.join(cr_workdir, "rootfs%d" % part.lineno))
+
+ if os.path.lexists(new_rootfs):
+ shutil.rmtree(os.path.join(new_rootfs))
+
+ copyhardlinktree(part.rootfs_dir, new_rootfs)
+
+ for orig_path in part.exclude_path:
+ path = orig_path
+ if os.path.isabs(path):
+ logger.error("Must be relative: --exclude-path=%s" % orig_path)
+ sys.exit(1)
+
+ full_path = os.path.realpath(os.path.join(new_rootfs, path))
- real_rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
+ # Disallow climbing outside of parent directory using '..',
+ # because doing so could be quite disastrous (we will delete the
+ # directory).
+ if not full_path.startswith(new_rootfs):
+ logger.error("'%s' points to a path outside the rootfs" % orig_path)
+ sys.exit(1)
- part.rootfs_dir = real_rootfs_dir
- part.prepare_rootfs(cr_workdir, oe_builddir, real_rootfs_dir, native_sysroot)
+ if path.endswith(os.sep):
+ # Delete content only.
+ for entry in os.listdir(full_path):
+ full_entry = os.path.join(full_path, entry)
+ if os.path.isdir(full_entry) and not os.path.islink(full_entry):
+ shutil.rmtree(full_entry)
+ else:
+ os.remove(full_entry)
+ else:
+ # Delete whole directory.
+ shutil.rmtree(full_path)
+ part.prepare_rootfs(cr_workdir, oe_builddir,
+ new_rootfs or part.rootfs_dir, native_sysroot)
diff --git a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
deleted file mode 100644
index 3d60e6f0ff..0000000000
--- a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
+++ /dev/null
@@ -1,177 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# This program is free software; you can distribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for mo details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# AUTHOR
-# Adrian Freihofer <adrian.freihofer (at] neratec.com>
-#
-
-import os
-from wic import msger
-from wic.utils import syslinux
-from wic.utils import runner
-from wic.utils.oe import misc
-from wic.utils.errors import ImageError
-from wic.pluginbase import SourcePlugin
-
-
-# pylint: disable=no-init
-class RootfsPlugin(SourcePlugin):
- """
- Create root partition and install syslinux bootloader
-
- This plugin creates a disk image containing a bootable root partition with
- syslinux installed. The filesystem is ext2/3/4, no extra boot partition is
- required.
-
- Example kickstart file:
- part / --source rootfs-pcbios-ext --ondisk sda --fstype=ext4 --label rootfs --align 1024
- bootloader --source rootfs-pcbios-ext --timeout=0 --append="rootwait rootfstype=ext4"
-
- The first line generates a root file system including a syslinux.cfg file
- The "--source rootfs-pcbios-ext" in the second line triggers the installation
- of ldlinux.sys into the image.
- """
-
- name = 'rootfs-pcbios-ext'
-
- @staticmethod
- def _get_rootfs_dir(rootfs_dir):
- """
- Find rootfs pseudo dir
-
- If rootfs_dir is a directory consider it as rootfs directory.
- Otherwise ask bitbake about the IMAGE_ROOTFS directory.
- """
- if os.path.isdir(rootfs_dir):
- return rootfs_dir
-
- image_rootfs_dir = misc.get_bitbake_var("IMAGE_ROOTFS", rootfs_dir)
- if not os.path.isdir(image_rootfs_dir):
- msg = "No valid artifact IMAGE_ROOTFS from image named"
- msg += " %s has been found at %s, exiting.\n" % \
- (rootfs_dir, image_rootfs_dir)
- msger.error(msg)
-
- return image_rootfs_dir
-
- # pylint: disable=unused-argument
- @classmethod
- def do_configure_partition(cls, part, source_params, image_creator,
- image_creator_workdir, oe_builddir, bootimg_dir,
- kernel_dir, native_sysroot):
- """
- Creates syslinux config in rootfs directory
-
- Called before do_prepare_partition()
- """
- bootloader = image_creator.ks.bootloader
-
- syslinux_conf = ""
- syslinux_conf += "PROMPT 0\n"
-
- syslinux_conf += "TIMEOUT " + str(bootloader.timeout) + "\n"
- syslinux_conf += "ALLOWOPTIONS 1\n"
-
- # Derive SERIAL... line from from kernel boot parameters
- syslinux_conf += syslinux.serial_console_form_kargs(options) + "\n"
-
- syslinux_conf += "DEFAULT linux\n"
- syslinux_conf += "LABEL linux\n"
- syslinux_conf += " KERNEL /boot/bzImage\n"
-
- syslinux_conf += " APPEND label=boot root=%s %s\n" % \
- (image_creator.rootdev, bootloader.append)
-
- syslinux_cfg = os.path.join(image_creator.rootfs_dir['ROOTFS_DIR'], "boot", "syslinux.cfg")
- msger.debug("Writing syslinux config %s" % syslinux_cfg)
- with open(syslinux_cfg, "w") as cfg:
- cfg.write(syslinux_conf)
-
- @classmethod
- def do_prepare_partition(cls, part, source_params, image_creator,
- image_creator_workdir, oe_builddir, bootimg_dir,
- kernel_dir, krootfs_dir, native_sysroot):
- """
- Creates partition out of rootfs directory
-
- Prepare content for a rootfs partition i.e. create a partition
- and fill it from a /rootfs dir.
- Install syslinux bootloader into root partition image file
- """
- def is_exe(exepath):
- """Verify exepath is an executable file"""
- return os.path.isfile(exepath) and os.access(exepath, os.X_OK)
-
- # Make sure syslinux-nomtools is available in native sysroot or fail
- native_syslinux_nomtools = os.path.join(native_sysroot, "usr/bin/syslinux-nomtools")
- if not is_exe(native_syslinux_nomtools):
- msger.info("building syslinux-native...")
- misc.exec_cmd("bitbake syslinux-native")
- if not is_exe(native_syslinux_nomtools):
- msger.error("Couldn't find syslinux-nomtools (%s), exiting\n" %
- native_syslinux_nomtools)
-
- if part.rootfs is None:
- if 'ROOTFS_DIR' not in krootfs_dir:
- msger.error("Couldn't find --rootfs-dir, exiting")
- rootfs_dir = krootfs_dir['ROOTFS_DIR']
- else:
- if part.rootfs in krootfs_dir:
- rootfs_dir = krootfs_dir[part.rootfs]
- elif part.rootfs:
- rootfs_dir = part.rootfs
- else:
- msg = "Couldn't find --rootfs-dir=%s connection"
- msg += " or it is not a valid path, exiting"
- msger.error(msg % part.rootfs)
-
- real_rootfs_dir = cls._get_rootfs_dir(rootfs_dir)
-
- part.rootfs_dir = real_rootfs_dir
- part.prepare_rootfs(image_creator_workdir, oe_builddir, real_rootfs_dir, native_sysroot)
-
- # install syslinux into rootfs partition
- syslinux_cmd = "syslinux-nomtools -d /boot -i %s" % part.source_file
- misc.exec_native_cmd(syslinux_cmd, native_sysroot)
-
- @classmethod
- def do_install_disk(cls, disk, disk_name, image_creator, workdir, oe_builddir,
- bootimg_dir, kernel_dir, native_sysroot):
- """
- Assemble partitions to disk image
-
- Called after all partitions have been prepared and assembled into a
- disk image. In this case, we install the MBR.
- """
- mbrfile = os.path.join(native_sysroot, "usr/share/syslinux/")
- if image_creator.ptable_format == 'msdos':
- mbrfile += "mbr.bin"
- elif image_creator.ptable_format == 'gpt':
- mbrfile += "gptmbr.bin"
- else:
- msger.error("Unsupported partition table: %s" % \
- image_creator.ptable_format)
-
- if not os.path.exists(mbrfile):
- msger.error("Couldn't find %s. Has syslinux-native been baked?" % mbrfile)
-
- full_path = disk['disk'].device
- msger.debug("Installing MBR on disk %s as %s with size %s bytes" \
- % (disk_name, full_path, disk['min_size']))
-
- ret_code = runner.show(['dd', 'if=%s' % mbrfile, 'of=%s' % full_path, 'conv=notrunc'])
- if ret_code != 0:
- raise ImageError("Unable to set MBR to %s" % full_path)
diff --git a/scripts/lib/wic/test b/scripts/lib/wic/test
deleted file mode 100644
index 9daeafb986..0000000000
--- a/scripts/lib/wic/test
+++ /dev/null
@@ -1 +0,0 @@
-test
diff --git a/scripts/lib/wic/utils/errors.py b/scripts/lib/wic/utils/errors.py
deleted file mode 100644
index d1b514dd9d..0000000000
--- a/scripts/lib/wic/utils/errors.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2007 Red Hat, Inc.
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-class WicError(Exception):
- pass
-
-class CreatorError(WicError):
- pass
-
-class Usage(WicError):
- pass
-
-class ImageError(WicError):
- pass
diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
deleted file mode 100644
index 1415ae906c..0000000000
--- a/scripts/lib/wic/utils/misc.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2010, 2011 Intel Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import time
-import wic.engine
-
-def build_name(kscfg, release=None, prefix=None, suffix=None):
- """Construct and return an image name string.
-
- This is a utility function to help create sensible name and fslabel
- strings. The name is constructed using the sans-prefix-and-extension
- kickstart filename and the supplied prefix and suffix.
-
- kscfg -- a path to a kickstart file
- release -- a replacement to suffix for image release
- prefix -- a prefix to prepend to the name; defaults to None, which causes
- no prefix to be used
- suffix -- a suffix to append to the name; defaults to None, which causes
- a YYYYMMDDHHMM suffix to be used
-
- Note, if maxlen is less then the len(suffix), you get to keep both pieces.
-
- """
- name = os.path.basename(kscfg)
- idx = name.rfind('.')
- if idx >= 0:
- name = name[:idx]
-
- if release is not None:
- suffix = ""
- if prefix is None:
- prefix = ""
- if suffix is None:
- suffix = time.strftime("%Y%m%d%H%M")
-
- if name.startswith(prefix):
- name = name[len(prefix):]
-
- prefix = "%s-" % prefix if prefix else ""
- suffix = "-%s" % suffix if suffix else ""
-
- ret = prefix + name + suffix
-
- return ret
-
-def find_canned(scripts_path, file_name):
- """
- Find a file either by its path or by name in the canned files dir.
-
- Return None if not found
- """
- if os.path.exists(file_name):
- return file_name
-
- layers_canned_wks_dir = wic.engine.build_canned_image_list(scripts_path)
- for canned_wks_dir in layers_canned_wks_dir:
- for root, dirs, files in os.walk(canned_wks_dir):
- for fname in files:
- if fname == file_name:
- fullpath = os.path.join(canned_wks_dir, fname)
- return fullpath
-
-def get_custom_config(boot_file):
- """
- Get the custom configuration to be used for the bootloader.
-
- Return None if the file can't be found.
- """
- scripts_path = os.path.abspath(os.path.dirname(__file__))
- # Get the scripts path of poky
- for x in range(0, 3):
- scripts_path = os.path.dirname(scripts_path)
-
- cfg_file = find_canned(scripts_path, boot_file)
- if cfg_file:
- with open(cfg_file, "r") as f:
- config = f.read()
- return config
-
- return None
diff --git a/scripts/lib/wic/utils/oe/__init__.py b/scripts/lib/wic/utils/oe/__init__.py
deleted file mode 100644
index 0a81575a74..0000000000
--- a/scripts/lib/wic/utils/oe/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# OpenEmbedded wic utils library
-#
-# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] linux.intel.com>
-#
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py
deleted file mode 100644
index fe188c9d26..0000000000
--- a/scripts/lib/wic/utils/oe/misc.py
+++ /dev/null
@@ -1,246 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This module provides a place to collect various wic-related utils
-# for the OpenEmbedded Image Tools.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] linux.intel.com>
-#
-"""Miscellaneous functions."""
-
-import os
-from collections import defaultdict
-from distutils import spawn
-
-from wic import msger
-from wic.utils import runner
-
-# executable -> recipe pairs for exec_native_cmd
-NATIVE_RECIPES = {"bmaptool": "bmap-tools",
- "mcopy": "mtools",
- "mkdosfs": "dosfstools",
- "mkfs.btrfs": "btrfs-tools",
- "mkfs.ext2": "e2fsprogs",
- "mkfs.ext3": "e2fsprogs",
- "mkfs.ext4": "e2fsprogs",
- "mkfs.vfat": "dosfstools",
- "mksquashfs": "squashfs-tools",
- "mkswap": "util-linux",
- "parted": "parted",
- "sfdisk": "util-linux",
- "sgdisk": "gptfdisk",
- "syslinux": "syslinux"
- }
-
-def _exec_cmd(cmd_and_args, as_shell=False, catch=3):
- """
- Execute command, catching stderr, stdout
-
- Need to execute as_shell if the command uses wildcards
- """
- msger.debug("_exec_cmd: %s" % cmd_and_args)
- args = cmd_and_args.split()
- msger.debug(args)
-
- if as_shell:
- ret, out = runner.runtool(cmd_and_args, catch)
- else:
- ret, out = runner.runtool(args, catch)
- out = out.strip()
- msger.debug("_exec_cmd: output for %s (rc = %d): %s" % \
- (cmd_and_args, ret, out))
-
- return (ret, out)
-
-
-def exec_cmd(cmd_and_args, as_shell=False, catch=3):
- """
- Execute command, catching stderr, stdout
-
- Exits if rc non-zero
- """
- ret, out = _exec_cmd(cmd_and_args, as_shell, catch)
-
- if ret != 0:
- msger.error("exec_cmd: %s returned '%s' instead of 0" % \
- (cmd_and_args, ret))
-
- return out
-
-def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
- """
- Execute native command, catching stderr, stdout
-
- Need to execute as_shell if the command uses wildcards
-
- Always need to execute native commands as_shell
- """
- # The reason -1 is used is because there may be "export" commands.
- args = cmd_and_args.split(';')[-1].split()
- msger.debug(args)
-
- if pseudo:
- cmd_and_args = pseudo + cmd_and_args
- native_paths = \
- "%s/sbin:%s/usr/sbin:%s/usr/bin" % \
- (native_sysroot, native_sysroot, native_sysroot)
- native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
- (native_paths, cmd_and_args)
- msger.debug("exec_native_cmd: %s" % cmd_and_args)
-
- # If the command isn't in the native sysroot say we failed.
- if spawn.find_executable(args[0], native_paths):
- ret, out = _exec_cmd(native_cmd_and_args, True, catch)
- else:
- ret = 127
-
- prog = args[0]
- # shell command-not-found
- if ret == 127 \
- or (pseudo and ret == 1 and out == "Can't find '%s' in $PATH." % prog):
- msg = "A native program %s required to build the image "\
- "was not found (see details above).\n\n" % prog
- recipe = NATIVE_RECIPES.get(prog)
- if recipe:
- msg += "Please bake it with 'bitbake %s-native' "\
- "and try again.\n" % recipe
- else:
- msg += "Wic failed to find a recipe to build native %s. Please "\
- "file a bug against wic.\n" % prog
- msger.error(msg)
- if out:
- msger.debug('"%s" output: %s' % (args[0], out))
-
- if ret != 0:
- msger.error("exec_cmd: '%s' returned '%s' instead of 0" % \
- (cmd_and_args, ret))
-
- return ret, out
-
-BOOTDD_EXTRA_SPACE = 16384
-
-class BitbakeVars(defaultdict):
- """
- Container for Bitbake variables.
- """
- def __init__(self):
- defaultdict.__init__(self, dict)
-
- # default_image and vars_dir attributes should be set from outside
- self.default_image = None
- self.vars_dir = None
-
- def _parse_line(self, line, image):
- """
- Parse one line from bitbake -e output or from .env file.
- Put result key-value pair into the storage.
- """
- if "=" not in line:
- return
- try:
- key, val = line.split("=")
- except ValueError:
- return
- key = key.strip()
- val = val.strip()
- if key.replace('_', '').isalnum():
- self[image][key] = val.strip('"')
-
- def get_var(self, var, image=None):
- """
- Get bitbake variable from 'bitbake -e' output or from .env file.
- This is a lazy method, i.e. it runs bitbake or parses file only when
- only when variable is requested. It also caches results.
- """
- if not image:
- image = self.default_image
-
- if image not in self:
- if image and self.vars_dir:
- fname = os.path.join(self.vars_dir, image + '.env')
- if os.path.isfile(fname):
- # parse .env file
- with open(fname) as varsfile:
- for line in varsfile:
- self._parse_line(line, image)
- else:
- print("Couldn't get bitbake variable from %s." % fname)
- print("File %s doesn't exist." % fname)
- return
- else:
- # Get bitbake -e output
- cmd = "bitbake -e"
- if image:
- cmd += " %s" % image
-
- log_level = msger.get_loglevel()
- msger.set_loglevel('normal')
- ret, lines = _exec_cmd(cmd)
- msger.set_loglevel(log_level)
-
- if ret:
- print("Couldn't get '%s' output." % cmd)
- print("Bitbake failed with error:\n%s\n" % lines)
- return
-
- # Parse bitbake -e output
- for line in lines.split('\n'):
- self._parse_line(line, image)
-
- # Make first image a default set of variables
- images = [key for key in self if key]
- if len(images) == 1:
- self[None] = self[image]
-
- return self[image].get(var)
-
-# Create BB_VARS singleton
-BB_VARS = BitbakeVars()
-
-def get_bitbake_var(var, image=None):
- """
- Provide old get_bitbake_var API by wrapping
- get_var method of BB_VARS singleton.
- """
- return BB_VARS.get_var(var, image)
-
-def parse_sourceparams(sourceparams):
- """
- Split sourceparams string of the form key1=val1[,key2=val2,...]
- into a dict. Also accepts valueless keys i.e. without =.
-
- Returns dict of param key/val pairs (note that val may be None).
- """
- params_dict = {}
-
- params = sourceparams.split(',')
- if params:
- for par in params:
- if not par:
- continue
- if not '=' in par:
- key = par
- val = None
- else:
- key, val = par.split('=')
- params_dict[key] = val
-
- return params_dict
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
deleted file mode 100644
index cafb9338df..0000000000
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ /dev/null
@@ -1,370 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-# Copyright (c) 2007, 2008 Red Hat, Inc.
-# Copyright (c) 2008 Daniel P. Berrange
-# Copyright (c) 2008 David P. Huff
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-from wic import msger
-from wic.utils.errors import ImageError
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd
-from wic.filemap import sparse_copy
-
-# Overhead of the MBR partitioning scheme (just one sector)
-MBR_OVERHEAD = 1
-
-# Overhead of the GPT partitioning scheme
-GPT_OVERHEAD = 34
-
-# Size of a sector in bytes
-SECTOR_SIZE = 512
-
-class Image():
- """
- Generic base object for an image.
-
- An Image is a container for a set of DiskImages and associated
- partitions.
- """
- def __init__(self, native_sysroot=None):
- self.disks = {}
- self.partitions = []
- self.partimages = []
- # Size of a sector used in calculations
- self.sector_size = SECTOR_SIZE
- self._partitions_layed_out = False
- self.native_sysroot = native_sysroot
-
- def __add_disk(self, disk_name):
- """ Add a disk 'disk_name' to the internal list of disks. Note,
- 'disk_name' is the name of the disk in the target system
- (e.g., sdb). """
-
- if disk_name in self.disks:
- # We already have this disk
- return
-
- assert not self._partitions_layed_out
-
- self.disks[disk_name] = \
- {'disk': None, # Disk object
- 'numpart': 0, # Number of allocate partitions
- 'realpart': 0, # Number of partitions in the partition table
- 'partitions': [], # Indexes to self.partitions
- 'offset': 0, # Offset of next partition (in sectors)
- # Minimum required disk size to fit all partitions (in bytes)
- 'min_size': 0,
- 'ptable_format': "msdos"} # Partition table format
-
- def add_disk(self, disk_name, disk_obj):
- """ Add a disk object which have to be partitioned. More than one disk
- can be added. In case of multiple disks, disk partitions have to be
- added for each disk separately with 'add_partition()". """
-
- self.__add_disk(disk_name)
- self.disks[disk_name]['disk'] = disk_obj
-
- def __add_partition(self, part):
- """ This is a helper function for 'add_partition()' which adds a
- partition to the internal list of partitions. """
-
- assert not self._partitions_layed_out
-
- self.partitions.append(part)
- self.__add_disk(part['disk_name'])
-
- def add_partition(self, size, disk_name, mountpoint, source_file=None, fstype=None,
- label=None, fsopts=None, boot=False, align=None, no_table=False,
- part_type=None, uuid=None, system_id=None):
- """ Add the next partition. Prtitions have to be added in the
- first-to-last order. """
-
- ks_pnum = len(self.partitions)
-
- # Converting kB to sectors for parted
- size = size * 1024 // self.sector_size
-
- part = {'ks_pnum': ks_pnum, # Partition number in the KS file
- 'size': size, # In sectors
- 'mountpoint': mountpoint, # Mount relative to chroot
- 'source_file': source_file, # partition contents
- 'fstype': fstype, # Filesystem type
- 'fsopts': fsopts, # Filesystem mount options
- 'label': label, # Partition label
- 'disk_name': disk_name, # physical disk name holding partition
- 'device': None, # kpartx device node for partition
- 'num': None, # Partition number
- 'boot': boot, # Bootable flag
- 'align': align, # Partition alignment
- 'no_table' : no_table, # Partition does not appear in partition table
- 'part_type' : part_type, # Partition type
- 'uuid': uuid, # Partition UUID
- 'system_id': system_id} # Partition system id
-
- self.__add_partition(part)
-
- def layout_partitions(self, ptable_format="msdos"):
- """ Layout the partitions, meaning calculate the position of every
- partition on the disk. The 'ptable_format' parameter defines the
- partition table format and may be "msdos". """
-
- msger.debug("Assigning %s partitions to disks" % ptable_format)
-
- if self._partitions_layed_out:
- return
-
- self._partitions_layed_out = True
-
- # Go through partitions in the order they are added in .ks file
- for num in range(len(self.partitions)):
- part = self.partitions[num]
-
- if part['disk_name'] not in self.disks:
- raise ImageError("No disk %s for partition %s" \
- % (part['disk_name'], part['mountpoint']))
-
- if ptable_format == 'msdos' and part['part_type']:
- # The --part-type can also be implemented for MBR partitions,
- # in which case it would map to the 1-byte "partition type"
- # filed at offset 3 of the partition entry.
- raise ImageError("setting custom partition type is not " \
- "implemented for msdos partitions")
-
- # Get the disk where the partition is located
- disk = self.disks[part['disk_name']]
- disk['numpart'] += 1
- if not part['no_table']:
- disk['realpart'] += 1
- disk['ptable_format'] = ptable_format
-
- if disk['numpart'] == 1:
- if ptable_format == "msdos":
- overhead = MBR_OVERHEAD
- elif ptable_format == "gpt":
- overhead = GPT_OVERHEAD
-
- # Skip one sector required for the partitioning scheme overhead
- disk['offset'] += overhead
-
- if disk['realpart'] > 3:
- # Reserve a sector for EBR for every logical partition
- # before alignment is performed.
- if ptable_format == "msdos":
- disk['offset'] += 1
-
-
- if part['align']:
- # If not first partition and we do have alignment set we need
- # to align the partition.
- # FIXME: This leaves a empty spaces to the disk. To fill the
- # gaps we could enlargea the previous partition?
-
- # Calc how much the alignment is off.
- align_sectors = disk['offset'] % (part['align'] * 1024 // self.sector_size)
-
- if align_sectors:
- # If partition is not aligned as required, we need
- # to move forward to the next alignment point
- align_sectors = (part['align'] * 1024 // self.sector_size) - align_sectors
-
- msger.debug("Realignment for %s%s with %s sectors, original"
- " offset %s, target alignment is %sK." %
- (part['disk_name'], disk['numpart'], align_sectors,
- disk['offset'], part['align']))
-
- # increase the offset so we actually start the partition on right alignment
- disk['offset'] += align_sectors
-
- part['start'] = disk['offset']
- disk['offset'] += part['size']
-
- part['type'] = 'primary'
- if not part['no_table']:
- part['num'] = disk['realpart']
- else:
- part['num'] = 0
-
- if disk['ptable_format'] == "msdos":
- if disk['realpart'] > 3:
- part['type'] = 'logical'
- part['num'] = disk['realpart'] + 1
-
- disk['partitions'].append(num)
- msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d "
- "sectors (%d bytes)." \
- % (part['mountpoint'], part['disk_name'], part['num'],
- part['start'], part['start'] + part['size'] - 1,
- part['size'], part['size'] * self.sector_size))
-
- # Once all the partitions have been layed out, we can calculate the
- # minumim disk sizes.
- for disk in self.disks.values():
- disk['min_size'] = disk['offset']
- if disk['ptable_format'] == "gpt":
- disk['min_size'] += GPT_OVERHEAD
-
- disk['min_size'] *= self.sector_size
-
- def __create_partition(self, device, parttype, fstype, start, size):
- """ Create a partition on an image described by the 'device' object. """
-
- # Start is included to the size so we need to substract one from the end.
- end = start + size - 1
- msger.debug("Added '%s' partition, sectors %d-%d, size %d sectors" %
- (parttype, start, end, size))
-
- cmd = "parted -s %s unit s mkpart %s" % (device, parttype)
- if fstype:
- cmd += " %s" % fstype
- cmd += " %d %d" % (start, end)
-
- return exec_native_cmd(cmd, self.native_sysroot)
-
- def __format_disks(self):
- self.layout_partitions()
-
- for dev in self.disks:
- disk = self.disks[dev]
- msger.debug("Initializing partition table for %s" % \
- (disk['disk'].device))
- exec_native_cmd("parted -s %s mklabel %s" % \
- (disk['disk'].device, disk['ptable_format']),
- self.native_sysroot)
-
- msger.debug("Creating partitions")
-
- for part in self.partitions:
- if part['num'] == 0:
- continue
-
- disk = self.disks[part['disk_name']]
- if disk['ptable_format'] == "msdos" and part['num'] == 5:
- # Create an extended partition (note: extended
- # partition is described in MBR and contains all
- # logical partitions). The logical partitions save a
- # sector for an EBR just before the start of a
- # partition. The extended partition must start one
- # sector before the start of the first logical
- # partition. This way the first EBR is inside of the
- # extended partition. Since the extended partitions
- # starts a sector before the first logical partition,
- # add a sector at the back, so that there is enough
- # room for all logical partitions.
- self.__create_partition(disk['disk'].device, "extended",
- None, part['start'] - 1,
- disk['offset'] - part['start'] + 1)
-
- if part['fstype'] == "swap":
- parted_fs_type = "linux-swap"
- elif part['fstype'] == "vfat":
- parted_fs_type = "fat32"
- elif part['fstype'] == "msdos":
- parted_fs_type = "fat16"
- elif part['fstype'] == "ontrackdm6aux3":
- parted_fs_type = "ontrackdm6aux3"
- else:
- # Type for ext2/ext3/ext4/btrfs
- parted_fs_type = "ext2"
-
- # Boot ROM of OMAP boards require vfat boot partition to have an
- # even number of sectors.
- if part['mountpoint'] == "/boot" and part['fstype'] in ["vfat", "msdos"] \
- and part['size'] % 2:
- msger.debug("Substracting one sector from '%s' partition to " \
- "get even number of sectors for the partition" % \
- part['mountpoint'])
- part['size'] -= 1
-
- self.__create_partition(disk['disk'].device, part['type'],
- parted_fs_type, part['start'], part['size'])
-
- if part['part_type']:
- msger.debug("partition %d: set type UID to %s" % \
- (part['num'], part['part_type']))
- exec_native_cmd("sgdisk --typecode=%d:%s %s" % \
- (part['num'], part['part_type'],
- disk['disk'].device), self.native_sysroot)
-
- if part['uuid']:
- msger.debug("partition %d: set UUID to %s" % \
- (part['num'], part['uuid']))
- exec_native_cmd("sgdisk --partition-guid=%d:%s %s" % \
- (part['num'], part['uuid'], disk['disk'].device),
- self.native_sysroot)
-
- if part['boot']:
- flag_name = "legacy_boot" if disk['ptable_format'] == 'gpt' else "boot"
- msger.debug("Set '%s' flag for partition '%s' on disk '%s'" % \
- (flag_name, part['num'], disk['disk'].device))
- exec_native_cmd("parted -s %s set %d %s on" % \
- (disk['disk'].device, part['num'], flag_name),
- self.native_sysroot)
- if part['system_id']:
- exec_native_cmd("sfdisk --part-type %s %s %s" % \
- (disk['disk'].device, part['num'], part['system_id']),
- self.native_sysroot)
-
- # Parted defaults to enabling the lba flag for fat16 partitions,
- # which causes compatibility issues with some firmware (and really
- # isn't necessary).
- if parted_fs_type == "fat16":
- if disk['ptable_format'] == 'msdos':
- msger.debug("Disable 'lba' flag for partition '%s' on disk '%s'" % \
- (part['num'], disk['disk'].device))
- exec_native_cmd("parted -s %s set %d lba off" % \
- (disk['disk'].device, part['num']),
- self.native_sysroot)
-
- def cleanup(self):
- if self.disks:
- for dev in self.disks:
- disk = self.disks[dev]
- try:
- disk['disk'].cleanup()
- except:
- pass
- # remove partition images
- for image in self.partimages:
- if os.path.isfile(image):
- os.remove(image)
-
- def assemble(self, image_file):
- msger.debug("Installing partitions")
-
- for part in self.partitions:
- source = part['source_file']
- if source:
- # install source_file contents into a partition
- sparse_copy(source, image_file, part['start'] * self.sector_size)
-
- msger.debug("Installed %s in partition %d, sectors %d-%d, "
- "size %d sectors" % \
- (source, part['num'], part['start'],
- part['start'] + part['size'] - 1, part['size']))
-
- partimage = image_file + '.p%d' % part['num']
- os.rename(source, partimage)
- self.partimages.append(partimage)
-
- def create(self):
- for dev in self.disks:
- disk = self.disks[dev]
- disk['disk'].create()
-
- self.__format_disks()
-
- return
diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py
deleted file mode 100644
index db536ba588..0000000000
--- a/scripts/lib/wic/utils/runner.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import subprocess
-
-from wic import msger
-
-def runtool(cmdln_or_args, catch=1):
- """ wrapper for most of the subprocess calls
- input:
- cmdln_or_args: can be both args and cmdln str (shell=True)
- catch: 0, quitely run
- 1, only STDOUT
- 2, only STDERR
- 3, both STDOUT and STDERR
- return:
- (rc, output)
- if catch==0: the output will always None
- """
-
- if catch not in (0, 1, 2, 3):
- # invalid catch selection, will cause exception, that's good
- return None
-
- if isinstance(cmdln_or_args, list):
- cmd = cmdln_or_args[0]
- shell = False
- else:
- import shlex
- cmd = shlex.split(cmdln_or_args)[0]
- shell = True
-
- if catch != 3:
- dev_null = os.open("/dev/null", os.O_WRONLY)
-
- if catch == 0:
- sout = dev_null
- serr = dev_null
- elif catch == 1:
- sout = subprocess.PIPE
- serr = dev_null
- elif catch == 2:
- sout = dev_null
- serr = subprocess.PIPE
- elif catch == 3:
- sout = subprocess.PIPE
- serr = subprocess.STDOUT
-
- try:
- process = subprocess.Popen(cmdln_or_args, stdout=sout,
- stderr=serr, shell=shell)
- (sout, serr) = process.communicate()
- # combine stdout and stderr, filter None out and decode
- out = ''.join([out.decode('utf-8') for out in [sout, serr] if out])
- except OSError as err:
- if err.errno == 2:
- # [Errno 2] No such file or directory
- msger.error('Cannot run command: %s, lost dependency?' % cmd)
- else:
- raise # relay
- finally:
- if catch != 3:
- os.close(dev_null)
-
- return (process.returncode, out)
-
-def show(cmdln_or_args):
- # show all the message using msger.verbose
-
- rcode, out = runtool(cmdln_or_args, catch=3)
-
- if isinstance(cmdln_or_args, list):
- cmd = ' '.join(cmdln_or_args)
- else:
- cmd = cmdln_or_args
-
- msg = 'running command: "%s"' % cmd
- if out:
- out = out.strip()
- if out:
- msg += ', with output::'
- msg += '\n +----------------'
- for line in out.splitlines():
- msg += '\n | %s' % line
- msg += '\n +----------------'
-
- msger.verbose(msg)
- return rcode
-
-def outs(cmdln_or_args, catch=1):
- # get the outputs of tools
- return runtool(cmdln_or_args, catch)[1].strip()
-
-def quiet(cmdln_or_args):
- return runtool(cmdln_or_args, catch=0)[0]
diff --git a/scripts/lib/wic/utils/syslinux.py b/scripts/lib/wic/utils/syslinux.py
deleted file mode 100644
index aace2863c1..0000000000
--- a/scripts/lib/wic/utils/syslinux.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# AUTHOR
-# Adrian Freihofer <adrian.freihofer (at] neratec.com>
-
-
-import re
-from wic import msger
-
-
-def serial_console_form_kargs(kernel_args):
- """
- Create SERIAL... line from kernel parameters
-
- syslinux needs a line SERIAL port [baudrate [flowcontrol]]
- in the syslinux.cfg file. The config line is generated based
- on kernel boot parameters. The the parameters of the first
- ttyS console are considered for syslinux config.
- @param kernel_args kernel command line
- @return line for syslinux config file e.g. "SERIAL 0 115200"
- """
- syslinux_conf = ""
- for param in kernel_args.split():
- param_match = re.match("console=ttyS([0-9]+),?([0-9]*)([noe]?)([0-9]?)(r?)", param)
- if param_match:
- syslinux_conf += "SERIAL " + param_match.group(1)
- # baudrate
- if param_match.group(2):
- syslinux_conf += " " + param_match.group(2)
- # parity
- if param_match.group(3) and param_match.group(3) != 'n':
- msger.warning("syslinux does not support parity for console. {} is ignored."
- .format(param_match.group(3)))
- # number of bits
- if param_match.group(4) and param_match.group(4) != '8':
- msger.warning("syslinux supports 8 bit console configuration only. {} is ignored."
- .format(param_match.group(4)))
- # flow control
- if param_match.group(5) and param_match.group(5) != '':
- msger.warning("syslinux console flowcontrol configuration. {} is ignored."
- .format(param_match.group(5)))
- break
-
- return syslinux_conf
diff --git a/scripts/lnr b/scripts/lnr
index 5fed780eb2..a2ac4fec0f 100755
--- a/scripts/lnr
+++ b/scripts/lnr
@@ -1,4 +1,7 @@
#! /usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Create a *relative* symlink, just like ln --relative does but without needing
# coreutils 8.16.
diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h
index 5a87540884..c81e7ee5e8 100644
--- a/scripts/multilib_header_wrapper.h
+++ b/scripts/multilib_header_wrapper.h
@@ -1,31 +1,30 @@
/*
* Copyright (C) 2005-2011 by Wind River Systems, Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
+ * SPDX-License-Identifier: MIT
*
*/
-#include <bits/wordsize.h>
+#pragma once
-#ifdef __WORDSIZE
+#if defined (__bpf__)
+#define __MHWORDSIZE 64
+#elif defined (__arm__)
+#define __MHWORDSIZE 32
+#elif defined (__aarch64__) && defined ( __LP64__)
+#define __MHWORDSIZE 64
+#elif defined (__aarch64__)
+#define __MHWORDSIZE 32
+#else
+#include <bits/wordsize.h>
+#if defined (__WORDSIZE)
+#define __MHWORDSIZE __WORDSIZE
+#else
+#error "__WORDSIZE is not defined"
+#endif
+#endif
-#if __WORDSIZE == 32
+#if __MHWORDSIZE == 32
#ifdef _MIPS_SIM
@@ -41,15 +40,9 @@
#include <ENTER_HEADER_FILENAME_HERE-32.h>
#endif
-#elif __WORDSIZE == 64
+#elif __MHWORDSIZE == 64
#include <ENTER_HEADER_FILENAME_HERE-64.h>
#else
#error "Unknown __WORDSIZE detected"
#endif /* matches #if __WORDSIZE == 32 */
-
-#else /* __WORDSIZE is not defined */
-
-#error "__WORDSIZE is not defined"
-
-#endif
diff --git a/scripts/native-intercept/chgrp b/scripts/native-intercept/chgrp
new file mode 100755
index 0000000000..399c979f9a
--- /dev/null
+++ b/scripts/native-intercept/chgrp
@@ -0,0 +1,5 @@
+#! /bin/sh
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+echo "Intercept $0: $@ -- do nothing"
diff --git a/scripts/native-intercept/chown b/scripts/native-intercept/chown
index 4f43271c2b..399c979f9a 100755
--- a/scripts/native-intercept/chown
+++ b/scripts/native-intercept/chown
@@ -1,2 +1,5 @@
#! /bin/sh
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
echo "Intercept $0: $@ -- do nothing"
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
new file mode 100755
index 0000000000..21bde7e156
--- /dev/null
+++ b/scripts/oe-build-perf-report
@@ -0,0 +1,607 @@
+#!/usr/bin/python3
+#
+# Examine build performance test results
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import argparse
+import json
+import logging
+import os
+import re
+import sys
+from collections import namedtuple, OrderedDict
+from operator import attrgetter
+from xml.etree import ElementTree as ET
+
+# Import oe libs
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(scripts_path, 'lib'))
+import scriptpath
+from build_perf import print_table
+from build_perf.report import (metadata_xml_to_json, results_xml_to_json,
+ aggregate_data, aggregate_metadata, measurement_stats,
+ AggregateTestData)
+from build_perf import html
+from buildstats import BuildStats, diff_buildstats, BSVerDiff
+
+scriptpath.add_oe_lib_path()
+
+from oeqa.utils.git import GitRepo, GitError
+import oeqa.utils.gitarchive as gitarchive
+
+
+# Setup logging
+logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
+log = logging.getLogger('oe-build-perf-report')
+
+def list_test_revs(repo, tag_name, verbosity, **kwargs):
+ """Get list of all tested revisions"""
+ valid_kwargs = dict([(k, v) for k, v in kwargs.items() if v is not None])
+
+ fields, revs = gitarchive.get_test_runs(log, repo, tag_name, **valid_kwargs)
+ ignore_fields = ['tag_number']
+ if verbosity < 2:
+ extra_fields = ['COMMITS', 'TEST RUNS']
+ ignore_fields.extend(['commit_number', 'commit'])
+ else:
+ extra_fields = ['TEST RUNS']
+
+ print_fields = [i for i, f in enumerate(fields) if f not in ignore_fields]
+
+ # Sort revs
+ rows = [[fields[i].upper() for i in print_fields] + extra_fields]
+
+ prev = [''] * len(print_fields)
+ prev_commit = None
+ commit_cnt = 0
+ commit_field = fields.index('commit')
+ for rev in revs:
+ # Only use fields that we want to print
+ cols = [rev[i] for i in print_fields]
+
+
+ if cols != prev:
+ commit_cnt = 1
+ test_run_cnt = 1
+ new_row = [''] * (len(print_fields) + len(extra_fields))
+
+ for i in print_fields:
+ if cols[i] != prev[i]:
+ break
+ new_row[i:-len(extra_fields)] = cols[i:]
+ rows.append(new_row)
+ else:
+ if rev[commit_field] != prev_commit:
+ commit_cnt += 1
+ test_run_cnt += 1
+
+ if verbosity < 2:
+ new_row[-2] = commit_cnt
+ new_row[-1] = test_run_cnt
+ prev = cols
+ prev_commit = rev[commit_field]
+
+ print_table(rows)
+
+def is_xml_format(repo, commit):
+ """Check if the commit contains xml (or json) data"""
+ if repo.rev_parse(commit + ':results.xml'):
+ log.debug("Detected report in xml format in %s", commit)
+ return True
+ else:
+ log.debug("No xml report in %s, assuming json formatted results", commit)
+ return False
+
+def read_results(repo, tags, xml=True):
+ """Read result files from repo"""
+
+ def parse_xml_stream(data):
+ """Parse multiple concatenated XML objects"""
+ objs = []
+ xml_d = ""
+ for line in data.splitlines():
+ if xml_d and line.startswith('<?xml version='):
+ objs.append(ET.fromstring(xml_d))
+ xml_d = line
+ else:
+ xml_d += line
+ objs.append(ET.fromstring(xml_d))
+ return objs
+
+ def parse_json_stream(data):
+ """Parse multiple concatenated JSON objects"""
+ objs = []
+ json_d = ""
+ for line in data.splitlines():
+ if line == '}{':
+ json_d += '}'
+ objs.append(json.loads(json_d, object_pairs_hook=OrderedDict))
+ json_d = '{'
+ else:
+ json_d += line
+ objs.append(json.loads(json_d, object_pairs_hook=OrderedDict))
+ return objs
+
+ num_revs = len(tags)
+
+ # Optimize by reading all data with one git command
+ log.debug("Loading raw result data from %d tags, %s...", num_revs, tags[0])
+ if xml:
+ git_objs = [tag + ':metadata.xml' for tag in tags] + [tag + ':results.xml' for tag in tags]
+ data = parse_xml_stream(repo.run_cmd(['show'] + git_objs + ['--']))
+ return ([metadata_xml_to_json(e) for e in data[0:num_revs]],
+ [results_xml_to_json(e) for e in data[num_revs:]])
+ else:
+ git_objs = [tag + ':metadata.json' for tag in tags] + [tag + ':results.json' for tag in tags]
+ data = parse_json_stream(repo.run_cmd(['show'] + git_objs + ['--']))
+ return data[0:num_revs], data[num_revs:]
+
+
+def get_data_item(data, key):
+ """Nested getitem lookup"""
+ for k in key.split('.'):
+ data = data[k]
+ return data
+
+
+def metadata_diff(metadata_l, metadata_r):
+ """Prepare a metadata diff for printing"""
+ keys = [('Hostname', 'hostname', 'hostname'),
+ ('Branch', 'branch', 'layers.meta.branch'),
+ ('Commit number', 'commit_num', 'layers.meta.commit_count'),
+ ('Commit', 'commit', 'layers.meta.commit'),
+ ('Number of test runs', 'testrun_count', 'testrun_count')
+ ]
+
+ def _metadata_diff(key):
+ """Diff metadata from two test reports"""
+ try:
+ val1 = get_data_item(metadata_l, key)
+ except KeyError:
+ val1 = '(N/A)'
+ try:
+ val2 = get_data_item(metadata_r, key)
+ except KeyError:
+ val2 = '(N/A)'
+ return val1, val2
+
+ metadata = OrderedDict()
+ for title, key, key_json in keys:
+ value_l, value_r = _metadata_diff(key_json)
+ metadata[key] = {'title': title,
+ 'value_old': value_l,
+ 'value': value_r}
+ return metadata
+
+
+def print_diff_report(metadata_l, data_l, metadata_r, data_r):
+ """Print differences between two data sets"""
+
+ # First, print general metadata
+ print("\nTEST METADATA:\n==============")
+ meta_diff = metadata_diff(metadata_l, metadata_r)
+ rows = []
+ row_fmt = ['{:{wid}} ', '{:<{wid}} ', '{:<{wid}}']
+ rows = [['', 'CURRENT COMMIT', 'COMPARING WITH']]
+ for key, val in meta_diff.items():
+ # Shorten commit hashes
+ if key == 'commit':
+ rows.append([val['title'] + ':', val['value'][:20], val['value_old'][:20]])
+ else:
+ rows.append([val['title'] + ':', val['value'], val['value_old']])
+ print_table(rows, row_fmt)
+
+
+ # Print test results
+ print("\nTEST RESULTS:\n=============")
+
+ tests = list(data_l['tests'].keys())
+ # Append tests that are only present in 'right' set
+ tests += [t for t in list(data_r['tests'].keys()) if t not in tests]
+
+ # Prepare data to be printed
+ rows = []
+ row_fmt = ['{:8}', '{:{wid}}', '{:{wid}}', ' {:>{wid}}', ' {:{wid}} ', '{:{wid}}',
+ ' {:>{wid}}', ' {:>{wid}}']
+ num_cols = len(row_fmt)
+ for test in tests:
+ test_l = data_l['tests'][test] if test in data_l['tests'] else None
+ test_r = data_r['tests'][test] if test in data_r['tests'] else None
+ pref = ' '
+ if test_l is None:
+ pref = '+'
+ elif test_r is None:
+ pref = '-'
+ descr = test_l['description'] if test_l else test_r['description']
+ heading = "{} {}: {}".format(pref, test, descr)
+
+ rows.append([heading])
+
+ # Generate the list of measurements
+ meas_l = test_l['measurements'] if test_l else {}
+ meas_r = test_r['measurements'] if test_r else {}
+ measurements = list(meas_l.keys())
+ measurements += [m for m in list(meas_r.keys()) if m not in measurements]
+
+ for meas in measurements:
+ m_pref = ' '
+ if meas in meas_l:
+ stats_l = measurement_stats(meas_l[meas], 'l.')
+ else:
+ stats_l = measurement_stats(None, 'l.')
+ m_pref = '+'
+ if meas in meas_r:
+ stats_r = measurement_stats(meas_r[meas], 'r.')
+ else:
+ stats_r = measurement_stats(None, 'r.')
+ m_pref = '-'
+ stats = stats_l.copy()
+ stats.update(stats_r)
+
+ absdiff = stats['val_cls'](stats['r.mean'] - stats['l.mean'])
+ reldiff = "{:+.1f} %".format(absdiff * 100 / stats['l.mean'])
+ if stats['r.mean'] > stats['l.mean']:
+ absdiff = '+' + str(absdiff)
+ else:
+ absdiff = str(absdiff)
+ rows.append(['', m_pref, stats['name'] + ' ' + stats['quantity'],
+ str(stats['l.mean']), '->', str(stats['r.mean']),
+ absdiff, reldiff])
+ rows.append([''] * num_cols)
+
+ print_table(rows, row_fmt)
+
+ print()
+
+
+class BSSummary(object):
+ def __init__(self, bs1, bs2):
+ self.tasks = {'count': bs2.num_tasks,
+ 'change': '{:+d}'.format(bs2.num_tasks - bs1.num_tasks)}
+ self.top_consumer = None
+ self.top_decrease = None
+ self.top_increase = None
+ self.ver_diff = OrderedDict()
+
+ tasks_diff = diff_buildstats(bs1, bs2, 'cputime')
+
+ # Get top consumers of resources
+ tasks_diff = sorted(tasks_diff, key=attrgetter('value2'))
+ self.top_consumer = tasks_diff[-5:]
+
+ # Get biggest increase and decrease in resource usage
+ tasks_diff = sorted(tasks_diff, key=attrgetter('absdiff'))
+ self.top_decrease = tasks_diff[0:5]
+ self.top_increase = tasks_diff[-5:]
+
+ # Compare recipe versions and prepare data for display
+ ver_diff = BSVerDiff(bs1, bs2)
+ if ver_diff:
+ if ver_diff.new:
+ self.ver_diff['New recipes'] = [(n, r.evr) for n, r in ver_diff.new.items()]
+ if ver_diff.dropped:
+ self.ver_diff['Dropped recipes'] = [(n, r.evr) for n, r in ver_diff.dropped.items()]
+ if ver_diff.echanged:
+ self.ver_diff['Epoch changed'] = [(n, "{} &rarr; {}".format(r.left.evr, r.right.evr)) for n, r in ver_diff.echanged.items()]
+ if ver_diff.vchanged:
+ self.ver_diff['Version changed'] = [(n, "{} &rarr; {}".format(r.left.version, r.right.version)) for n, r in ver_diff.vchanged.items()]
+ if ver_diff.rchanged:
+ self.ver_diff['Revision changed'] = [(n, "{} &rarr; {}".format(r.left.evr, r.right.evr)) for n, r in ver_diff.rchanged.items()]
+
+
+def print_html_report(data, id_comp, buildstats):
+ """Print report in html format"""
+ # Handle metadata
+ metadata = metadata_diff(data[id_comp].metadata, data[-1].metadata)
+
+ # Generate list of tests
+ tests = []
+ for test in data[-1].results['tests'].keys():
+ test_r = data[-1].results['tests'][test]
+ new_test = {'name': test_r['name'],
+ 'description': test_r['description'],
+ 'status': test_r['status'],
+ 'measurements': [],
+ 'err_type': test_r.get('err_type'),
+ }
+ # Limit length of err output shown
+ if 'message' in test_r:
+ lines = test_r['message'].splitlines()
+ if len(lines) > 20:
+ new_test['message'] = '...\n' + '\n'.join(lines[-20:])
+ else:
+ new_test['message'] = test_r['message']
+
+
+ # Generate the list of measurements
+ for meas in test_r['measurements'].keys():
+ meas_r = test_r['measurements'][meas]
+ meas_type = 'time' if meas_r['type'] == 'sysres' else 'size'
+ new_meas = {'name': meas_r['name'],
+ 'legend': meas_r['legend'],
+ 'description': meas_r['name'] + ' ' + meas_type,
+ }
+ samples = []
+
+ # Run through all revisions in our data
+ for meta, test_data in data:
+ if (not test in test_data['tests'] or
+ not meas in test_data['tests'][test]['measurements']):
+ samples.append(measurement_stats(None))
+ continue
+ test_i = test_data['tests'][test]
+ meas_i = test_i['measurements'][meas]
+ commit_num = get_data_item(meta, 'layers.meta.commit_count')
+ samples.append(measurement_stats(meas_i))
+ samples[-1]['commit_num'] = commit_num
+
+ absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean'])
+ reldiff = absdiff * 100 / samples[id_comp]['mean']
+ new_meas['absdiff'] = absdiff
+ new_meas['absdiff_str'] = str(absdiff) if absdiff < 0 else '+' + str(absdiff)
+ new_meas['reldiff'] = reldiff
+ new_meas['reldiff_str'] = "{:+.1f} %".format(reldiff)
+ new_meas['samples'] = samples
+ new_meas['value'] = samples[-1]
+ new_meas['value_type'] = samples[-1]['val_cls']
+
+ # Compare buildstats
+ bs_key = test + '.' + meas
+ rev = str(metadata['commit_num']['value'])
+ comp_rev = str(metadata['commit_num']['value_old'])
+ if (rev in buildstats and bs_key in buildstats[rev] and
+ comp_rev in buildstats and bs_key in buildstats[comp_rev]):
+ new_meas['buildstats'] = BSSummary(buildstats[comp_rev][bs_key],
+ buildstats[rev][bs_key])
+
+
+ new_test['measurements'].append(new_meas)
+ tests.append(new_test)
+
+ # Chart options
+ chart_opts = {'haxis': {'min': get_data_item(data[0][0], 'layers.meta.commit_count'),
+ 'max': get_data_item(data[-1][0], 'layers.meta.commit_count')}
+ }
+
+ print(html.template.render(title="Build Perf Test Report",
+ metadata=metadata, test_data=tests,
+ chart_opts=chart_opts))
+
+
+def get_buildstats(repo, notes_ref, revs, outdir=None):
+ """Get the buildstats from git notes"""
+ full_ref = 'refs/notes/' + notes_ref
+ if not repo.rev_parse(full_ref):
+ log.error("No buildstats found, please try running "
+ "'git fetch origin %s:%s' to fetch them from the remote",
+ full_ref, full_ref)
+ return
+
+ missing = False
+ buildstats = {}
+ log.info("Parsing buildstats from 'refs/notes/%s'", notes_ref)
+ for rev in revs:
+ buildstats[rev.commit_number] = {}
+ log.debug('Dumping buildstats for %s (%s)', rev.commit_number,
+ rev.commit)
+ for tag in rev.tags:
+ log.debug(' %s', tag)
+ try:
+ bs_all = json.loads(repo.run_cmd(['notes', '--ref', notes_ref,
+ 'show', tag + '^0']))
+ except GitError:
+ log.warning("Buildstats not found for %s", tag)
+ bs_all = {}
+ missing = True
+
+ for measurement, bs in bs_all.items():
+ # Write out onto disk
+ if outdir:
+ tag_base, run_id = tag.rsplit('/', 1)
+ tag_base = tag_base.replace('/', '_')
+ bs_dir = os.path.join(outdir, measurement, tag_base)
+ if not os.path.exists(bs_dir):
+ os.makedirs(bs_dir)
+ with open(os.path.join(bs_dir, run_id + '.json'), 'w') as f:
+ json.dump(bs, f, indent=2)
+
+ # Read buildstats into a dict
+ _bs = BuildStats.from_json(bs)
+ if measurement not in buildstats[rev.commit_number]:
+ buildstats[rev.commit_number][measurement] = _bs
+ else:
+ buildstats[rev.commit_number][measurement].aggregate(_bs)
+
+ if missing:
+ log.info("Buildstats were missing for some test runs, please "
+ "run 'git fetch origin %s:%s' and try again",
+ full_ref, full_ref)
+
+ return buildstats
+
+
+def auto_args(repo, args):
+ """Guess arguments, if not defined by the user"""
+ # Get the latest commit in the repo
+ log.debug("Guessing arguments from the latest commit")
+ msg = repo.run_cmd(['log', '-1', '--branches', '--remotes', '--format=%b'])
+ for line in msg.splitlines():
+ split = line.split(':', 1)
+ if len(split) != 2:
+ continue
+
+ key = split[0]
+ val = split[1].strip()
+ if key == 'hostname' and not args.hostname:
+ log.debug("Using hostname %s", val)
+ args.hostname = val
+ elif key == 'branch' and not args.branch:
+ log.debug("Using branch %s", val)
+ args.branch = val
+
+
+def parse_args(argv):
+ """Parse command line arguments"""
+ description = """
+Examine build performance test results from a Git repository"""
+ parser = argparse.ArgumentParser(
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
+ description=description)
+
+ parser.add_argument('--debug', '-d', action='store_true',
+ help="Verbose logging")
+ parser.add_argument('--repo', '-r', required=True,
+ help="Results repository (local git clone)")
+ parser.add_argument('--list', '-l', action='count',
+ help="List available test runs")
+ parser.add_argument('--html', action='store_true',
+ help="Generate report in html format")
+ group = parser.add_argument_group('Tag and revision')
+ group.add_argument('--tag-name', '-t',
+ default='{hostname}/{branch}/{machine}/{commit_number}-g{commit}/{tag_number}',
+ help="Tag name (pattern) for finding results")
+ group.add_argument('--hostname', '-H')
+ group.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
+ group.add_argument('--branch2', help="Branch to find comparision revisions in")
+ group.add_argument('--machine', default='qemux86')
+ group.add_argument('--history-length', default=25, type=int,
+ help="Number of tested revisions to plot in html report")
+ group.add_argument('--commit',
+ help="Revision to search for")
+ group.add_argument('--commit-number',
+ help="Revision number to search for, redundant if "
+ "--commit is specified")
+ group.add_argument('--commit2',
+ help="Revision to compare with")
+ group.add_argument('--commit-number2',
+ help="Revision number to compare with, redundant if "
+ "--commit2 is specified")
+ parser.add_argument('--dump-buildstats', nargs='?', const='.',
+ help="Dump buildstats of the tests")
+
+ return parser.parse_args(argv)
+
+
+def main(argv=None):
+ """Script entry point"""
+ args = parse_args(argv)
+ if args.debug:
+ log.setLevel(logging.DEBUG)
+
+ repo = GitRepo(args.repo)
+
+ if args.list:
+ list_test_revs(repo, args.tag_name, args.list, hostname=args.hostname)
+ return 0
+
+ # Determine hostname which to use
+ if not args.hostname:
+ auto_args(repo, args)
+
+ revs = gitarchive.get_test_revs(log, repo, args.tag_name, hostname=args.hostname,
+ branch=args.branch, machine=args.machine)
+ if args.branch2:
+ revs2 = gitarchive.get_test_revs(log, repo, args.tag_name, hostname=args.hostname,
+ branch=args.branch2, machine=args.machine)
+ if not len(revs2):
+ log.error("No revisions found to compare against")
+ return 1
+ if not len(revs):
+ log.error("No revision to report on found")
+ return 1
+ else:
+ if len(revs) < 2:
+ log.error("Only %d tester revisions found, unable to generate report" % len(revs))
+ return 1
+
+ # Pick revisions
+ if args.commit:
+ if args.commit_number:
+ log.warning("Ignoring --commit-number as --commit was specified")
+ index1 = gitarchive.rev_find(revs, 'commit', args.commit)
+ elif args.commit_number:
+ index1 = gitarchive.rev_find(revs, 'commit_number', args.commit_number)
+ else:
+ index1 = len(revs) - 1
+
+ if args.branch2:
+ revs2.append(revs[index1])
+ index1 = len(revs2) - 1
+ revs = revs2
+
+ if args.commit2:
+ if args.commit_number2:
+ log.warning("Ignoring --commit-number2 as --commit2 was specified")
+ index2 = gitarchive.rev_find(revs, 'commit', args.commit2)
+ elif args.commit_number2:
+ index2 = gitarchive.rev_find(revs, 'commit_number', args.commit_number2)
+ else:
+ if index1 > 0:
+ index2 = index1 - 1
+ # Find the closest matching commit number for comparision
+ # In future we could check the commit is a common ancestor and
+ # continue back if not but this good enough for now
+ while index2 > 0 and revs[index2].commit_number > revs[index1].commit_number:
+ index2 = index2 - 1
+ else:
+ log.error("Unable to determine the other commit, use "
+ "--commit2 or --commit-number2 to specify it")
+ return 1
+
+ index_l = min(index1, index2)
+ index_r = max(index1, index2)
+
+ rev_l = revs[index_l]
+ rev_r = revs[index_r]
+ log.debug("Using 'left' revision %s (%s), %s test runs:\n %s",
+ rev_l.commit_number, rev_l.commit, len(rev_l.tags),
+ '\n '.join(rev_l.tags))
+ log.debug("Using 'right' revision %s (%s), %s test runs:\n %s",
+ rev_r.commit_number, rev_r.commit, len(rev_r.tags),
+ '\n '.join(rev_r.tags))
+
+ # Check report format used in the repo (assume all reports in the same fmt)
+ xml = is_xml_format(repo, revs[index_r].tags[-1])
+
+ if args.html:
+ index_0 = max(0, min(index_l, index_r - args.history_length))
+ rev_range = range(index_0, index_r + 1)
+ else:
+ # We do not need range of commits for text report (no graphs)
+ index_0 = index_l
+ rev_range = (index_l, index_r)
+
+ # Read raw data
+ log.debug("Reading %d revisions, starting from %s (%s)",
+ len(rev_range), revs[index_0].commit_number, revs[index_0].commit)
+ raw_data = [read_results(repo, revs[i].tags, xml) for i in rev_range]
+
+ data = []
+ for raw_m, raw_d in raw_data:
+ data.append(AggregateTestData(aggregate_metadata(raw_m),
+ aggregate_data(raw_d)))
+
+ # Read buildstats only when needed
+ buildstats = None
+ if args.dump_buildstats or args.html:
+ outdir = 'oe-build-perf-buildstats' if args.dump_buildstats else None
+ notes_ref = 'buildstats/{}/{}/{}'.format(args.hostname, args.branch,
+ args.machine)
+ buildstats = get_buildstats(repo, notes_ref, [rev_l, rev_r], outdir)
+
+ # Print report
+ if not args.html:
+ print_diff_report(data[0].metadata, data[0].results,
+ data[1].metadata, data[1].results)
+ else:
+ # Re-map 'left' list index to the data table where index_0 maps to 0
+ print_html_report(data, index_l - index_0, buildstats)
+
+ return 0
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test
index bb5c382d26..00e00b4ce9 100755
--- a/scripts/oe-build-perf-test
+++ b/scripts/oe-build-perf-test
@@ -1,37 +1,32 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
#
# Build performance test script
#
# Copyright (c) 2016, Intel Corporation.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope 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.
-#
-"""Build performance test script"""
+
import argparse
import errno
import fcntl
+import json
import logging
import os
+import re
import shutil
import sys
-import unittest
from datetime import datetime
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib')
import scriptpath
scriptpath.add_oe_lib_path()
+scriptpath.add_bitbake_lib_path()
import oeqa.buildperf
from oeqa.buildperf import (BuildPerfTestLoader, BuildPerfTestResult,
BuildPerfTestRunner, KernelDropCaches)
from oeqa.utils.commands import runCmd
-from oeqa.utils.git import GitRepo, GitError
+from oeqa.utils.metadata import metadata_from_bb, write_metadata_file
# Set-up logging
@@ -71,31 +66,6 @@ def pre_run_sanity_check():
return False
return True
-def init_git_repo(path):
- """Check/create Git repository where to store results"""
- path = os.path.abspath(path)
- if os.path.isfile(path):
- log.error("Invalid Git repo %s: path exists but is not a directory", path)
- return False
- if not os.path.isdir(path):
- try:
- os.mkdir(path)
- except (FileNotFoundError, PermissionError) as err:
- log.error("Failed to mkdir %s: %s", path, err)
- return False
- if not os.listdir(path):
- log.info("Initializing a new Git repo at %s", path)
- GitRepo.init(path)
- try:
- GitRepo(path, is_topdir=True)
- except GitError:
- log.error("No Git repository but a non-empty directory found at %s.\n"
- "Please specify a Git repository, an empty directory or "
- "a non-existing directory", path)
- return False
- return True
-
-
def setup_file_logging(log_file):
"""Setup loggin to file"""
log_dir = os.path.dirname(log_file)
@@ -115,6 +85,38 @@ def archive_build_conf(out_dir):
shutil.copytree(src_dir, tgt_dir)
+def update_globalres_file(result_obj, filename, metadata):
+ """Write results to globalres csv file"""
+ # Map test names to time and size columns in globalres
+ # The tuples represent index and length of times and sizes
+ # respectively
+ gr_map = {'test1': ((0, 1), (8, 1)),
+ 'test12': ((1, 1), (None, None)),
+ 'test13': ((2, 1), (9, 1)),
+ 'test2': ((3, 1), (None, None)),
+ 'test3': ((4, 3), (None, None)),
+ 'test4': ((7, 1), (10, 2))}
+
+ values = ['0'] * 12
+ for status, test, _ in result_obj.all_results():
+ if status in ['ERROR', 'SKIPPED']:
+ continue
+ (t_ind, t_len), (s_ind, s_len) = gr_map[test.name]
+ if t_ind is not None:
+ values[t_ind:t_ind + t_len] = test.times
+ if s_ind is not None:
+ values[s_ind:s_ind + s_len] = test.sizes
+
+ log.debug("Writing globalres log to %s", filename)
+ rev_info = metadata['layers']['meta']
+ with open(filename, 'a') as fobj:
+ fobj.write('{},{}:{},{},'.format(metadata['hostname'],
+ rev_info['branch'],
+ rev_info['commit'],
+ rev_info['commit']))
+ fobj.write(','.join(values) + '\n')
+
+
def parse_args(argv):
"""Parse command line arguments"""
parser = argparse.ArgumentParser(
@@ -131,20 +133,13 @@ def parse_args(argv):
parser.add_argument('-o', '--out-dir', default='results-{date}',
type=os.path.abspath,
help="Output directory for test results")
+ parser.add_argument('-x', '--xml', action='store_true',
+ help='Enable JUnit xml output')
parser.add_argument('--log-file',
default='{out_dir}/oe-build-perf-test.log',
help="Log file of this script")
parser.add_argument('--run-tests', nargs='+', metavar='TEST',
help="List of tests to run")
- parser.add_argument('--commit-results', metavar='GIT_DIR',
- type=os.path.abspath,
- help="Commit result data to a (local) git repository")
- parser.add_argument('--commit-results-branch', metavar='BRANCH',
- default="{git_branch}",
- help="Commit results to branch BRANCH.")
- parser.add_argument('--commit-results-tag', metavar='TAG',
- default="{git_branch}/{git_commit_count}-g{git_commit}/{tag_num}",
- help="Tag results commit with TAG.")
return parser.parse_args(argv)
@@ -167,9 +162,6 @@ def main(argv=None):
if not pre_run_sanity_check():
return 1
- if args.commit_results:
- if not init_git_repo(args.commit_results):
- return 1
# Check our capability to drop caches and ask pass if needed
KernelDropCaches.check()
@@ -181,7 +173,19 @@ def main(argv=None):
else:
suite = loader.loadTestsFromModule(oeqa.buildperf)
+ # Save test metadata
+ metadata = metadata_from_bb()
+ log.info("Testing Git revision branch:commit %s:%s (%s)",
+ metadata['layers']['meta']['branch'],
+ metadata['layers']['meta']['commit'],
+ metadata['layers']['meta']['commit_count'])
+ if args.xml:
+ write_metadata_file(os.path.join(out_dir, 'metadata.xml'), metadata)
+ else:
+ with open(os.path.join(out_dir, 'metadata.json'), 'w') as fobj:
+ json.dump(metadata, fobj, indent=2)
archive_build_conf(out_dir)
+
runner = BuildPerfTestRunner(out_dir, verbosity=2)
# Suppress logger output to stderr so that the output from unittest
@@ -194,16 +198,17 @@ def main(argv=None):
# Restore logger output to stderr
log.handlers[0].setLevel(log.level)
+ if args.xml:
+ result.write_results_xml()
+ else:
+ result.write_results_json()
+ result.write_buildstats_json()
if args.globalres_file:
- result.update_globalres_file(args.globalres_file)
- if args.commit_results:
- result.git_commit_results(args.commit_results,
- args.commit_results_branch,
- args.commit_results_tag)
+ update_globalres_file(result, args.globalres_file, metadata)
if result.wasSuccessful():
return 0
- return 1
+ return 2
if __name__ == '__main__':
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 9fae3b4ec3..c17cf4da71 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -4,19 +4,19 @@
#
# Copyright (C) 2006-2011 Linux Foundation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# SPDX-License-Identifier: GPL-2.0-or-later
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+if ! $(return >/dev/null 2>&1) ; then
+ echo 'oe-buildenv-internal: error: this script must be sourced'
+ echo ''
+ echo 'Usage: . $OEROOT/scripts/oe-buildenv-internal &&'
+ echo ''
+ echo 'OpenEmbedded oe-buildenv-internal - an internal script that is'
+ echo 'used in oe-init-build-env to initialize oe build environment'
+ echo ''
+ exit 2
+fi
# It is assumed OEROOT is already defined when this is called
if [ -z "$OEROOT" ]; then
@@ -29,22 +29,6 @@ if [ -z "$OE_SKIP_SDK_CHECK" ] && [ -n "$OECORE_SDK_VERSION" ]; then
return 1
fi
-# Make sure we're not using python v3.x as 'python', we don't support it.
-py_v2_check=$(/usr/bin/env python --version 2>&1 | grep "Python 3")
-if [ -n "$py_v2_check" ]; then
- echo >&2 "OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3."
- echo >&2 "Please set up python v2 as your default 'python' interpreter."
- return 1
-fi
-unset py_v2_check
-
-py_v27_check=$(python -c 'import sys; print sys.version_info >= (2,7,3)')
-if [ "$py_v27_check" != "True" ]; then
- echo >&2 "OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3."
- echo >&2 "Please upgrade your python v2."
-fi
-unset py_v27_check
-
# We potentially have code that doesn't parse correctly with older versions
# of Python, and rather than fixing that and being eternally vigilant for
# any other new feature use, just check the version here.
@@ -90,10 +74,14 @@ unset BDIR
if [ -z "$BITBAKEDIR" ]; then
BITBAKEDIR="$OEROOT/bitbake$BBEXTRA"
+ test -d "$BITBAKEDIR" || BITBAKEDIR="$OEROOT/../bitbake$BBEXTRA"
fi
BITBAKEDIR=$(readlink -f "$BITBAKEDIR")
BUILDDIR=$(readlink -f "$BUILDDIR")
+BBPATH=$BUILDDIR
+
+export BBPATH
if [ ! -d "$BITBAKEDIR" ]; then
echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Please ensure a copy of bitbake exists at this location or specify an alternative path on the command line"
diff --git a/scripts/oe-check-sstate b/scripts/oe-check-sstate
index d06efe436a..ca249ca67b 100755
--- a/scripts/oe-check-sstate
+++ b/scripts/oe-check-sstate
@@ -5,18 +5,8 @@
# Copyright 2016 Intel Corporation
# Authored-by: Paul Eggleton <paul.eggleton@intel.com>
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
import os
diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot
new file mode 100755
index 0000000000..5eb3e12769
--- /dev/null
+++ b/scripts/oe-depends-dot
@@ -0,0 +1,157 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2018 Wind River Systems, Inc.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os
+import sys
+import argparse
+import logging
+import re
+
+class Dot(object):
+ def __init__(self):
+ parser = argparse.ArgumentParser(
+ description="Analyse recipe-depends.dot generated by bitbake -g",
+ epilog="Use %(prog)s --help to get help")
+ parser.add_argument("dotfile",
+ help = "Specify the dotfile", nargs = 1, action='store', default='')
+ parser.add_argument("-k", "--key",
+ help = "Specify the key, e.g., recipe name",
+ action="store", default='')
+ parser.add_argument("-d", "--depends",
+ help = "Print the key's dependencies",
+ action="store_true", default=False)
+ parser.add_argument("-w", "--why",
+ help = "Print why the key is built",
+ action="store_true", default=False)
+ parser.add_argument("-r", "--remove",
+ help = "Remove duplicated dependencies to reduce the size of the dot files."
+ " For example, A->B, B->C, A->C, then A->C can be removed.",
+ action="store_true", default=False)
+
+ self.args = parser.parse_args()
+
+ if len(sys.argv) != 3 and len(sys.argv) < 5:
+ print('ERROR: Not enough args, see --help for usage')
+
+ @staticmethod
+ def insert_dep_chain(chain, rdeps, alldeps):
+ """
+ insert elements to chain from rdeps, according to alldeps
+ """
+ # chain should at least contain one element
+ if len(chain) == 0:
+ raise
+
+ inserted_elements = []
+ for rdep in rdeps:
+ if rdep in chain:
+ continue
+ else:
+ for i in range(0, len(chain)-1):
+ if chain[i] in alldeps[rdep] and rdep in alldeps[chain[i+1]]:
+ chain.insert(i+1, rdep)
+ inserted_elements.append(rdep)
+ break
+ if chain[-1] in alldeps[rdep] and rdep not in chain:
+ chain.append(rdep)
+ inserted_elements.append(rdep)
+ return inserted_elements
+
+ @staticmethod
+ def print_dep_chains(key, rdeps, alldeps):
+ rlist = rdeps.copy()
+ chain = []
+ removed_rdeps = [] # hold rdeps removed from rlist
+
+ chain.append(key)
+ while (len(rlist) != 0):
+ # insert chain from rlist
+ inserted_elements = Dot.insert_dep_chain(chain, rlist, alldeps)
+ if not inserted_elements:
+ if chain[-1] in rlist:
+ rlist.remove(chain[-1])
+ removed_rdeps.append(chain[-1])
+ chain.pop()
+ continue
+ else:
+ # insert chain from removed_rdeps
+ Dot.insert_dep_chain(chain, removed_rdeps, alldeps)
+ print(' -> '.join(list(reversed(chain))))
+
+ def main(self):
+ #print(self.args.dotfile[0])
+ # The format is {key: depends}
+ depends = {}
+ with open(self.args.dotfile[0], 'r') as f:
+ for line in f.readlines():
+ if ' -> ' not in line:
+ continue
+ line_no_quotes = line.replace('"', '')
+ m = re.match("(.*) -> (.*)", line_no_quotes)
+ if not m:
+ print('WARNING: Found unexpected line: %s' % line)
+ continue
+ key = m.group(1)
+ if key == "meta-world-pkgdata":
+ continue
+ dep = m.group(2)
+ if key in depends:
+ if not key in depends[key]:
+ depends[key].add(dep)
+ else:
+ print('WARNING: Fonud duplicated line: %s' % line)
+ else:
+ depends[key] = set()
+ depends[key].add(dep)
+
+ if self.args.remove:
+ reduced_depends = {}
+ for k, deps in depends.items():
+ child_deps = set()
+ added = set()
+ # Both direct and indirect depends are already in the dict, so
+ # we don't have to do this recursively.
+ for dep in deps:
+ if dep in depends:
+ child_deps |= depends[dep]
+
+ reduced_depends[k] = deps - child_deps
+ outfile= '%s-reduced%s' % (self.args.dotfile[0][:-4], self.args.dotfile[0][-4:])
+ with open(outfile, 'w') as f:
+ print('Saving reduced dot file to %s' % outfile)
+ f.write('digraph depends {\n')
+ for k, v in reduced_depends.items():
+ for dep in v:
+ f.write('"%s" -> "%s"\n' % (k, dep))
+ f.write('}\n')
+ sys.exit(0)
+
+ if self.args.key not in depends:
+ print("ERROR: Can't find key %s in %s" % (self.args.key, self.args.dotfile[0]))
+ sys.exit(1)
+
+ if self.args.depends:
+ if self.args.key in depends:
+ print('Depends: %s' % ' '.join(depends[self.args.key]))
+
+ reverse_deps = []
+ if self.args.why:
+ for k, v in depends.items():
+ if self.args.key in v and not k in reverse_deps:
+ reverse_deps.append(k)
+ print('Because: %s' % ' '.join(reverse_deps))
+ Dot.print_dep_chains(self.args.key, reverse_deps, depends)
+
+if __name__ == "__main__":
+ try:
+ dot = Dot()
+ ret = dot.main()
+ except Exception as esc:
+ ret = 1
+ import traceback
+ traceback.print_exc()
+ sys.exit(ret)
diff --git a/scripts/oe-find-native-sysroot b/scripts/oe-find-native-sysroot
index 81d62b8882..5146bbf999 100755
--- a/scripts/oe-find-native-sysroot
+++ b/scripts/oe-find-native-sysroot
@@ -2,14 +2,14 @@
#
# Find a native sysroot to use - either from an in-tree OE build or
# from a toolchain installation. It then ensures the variable
-# $OECORE_NATIVE_SYSROOT is set to the sysroot's base directory, and sets
+# $OECORE_NATIVE_SYSROOT is set to the sysroot's base directory, and sets
# $PSEUDO to the path of the pseudo binary.
#
# This script is intended to be run within other scripts by source'ing
# it, e.g:
#
# SYSROOT_SETUP_SCRIPT=`which oe-find-native-sysroot`
-# . $SYSROOT_SETUP_SCRIPT
+# . $SYSROOT_SETUP_SCRIPT <recipe>
#
# This script will terminate execution of your calling program unless
# you set a variable $SKIP_STRICT_SYSROOT_CHECK to a non-empty string
@@ -17,18 +17,40 @@
#
# Copyright (c) 2010 Linux Foundation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+if [ "$1" = '--help' -o "$1" = '-h' -o $# -ne 1 ] ; then
+ echo 'Usage: oe-find-native-sysroot <recipe> [-h|--help]'
+ echo ''
+ echo 'OpenEmbedded find-native-sysroot - helper script to set'
+ echo 'environment variables OECORE_NATIVE_SYSROOT and PSEUDO'
+ echo 'to the path of the native sysroot directory and pseudo'
+ echo 'executable binary'
+ echo ''
+ echo 'options:'
+ echo ' recipe its STAGING_DIR_NATIVE is used as native sysroot'
+ echo ' -h, --help show this help message and exit'
+ echo ''
+ exit 2
+fi
+
+# Global vars
+BITBAKE_E=""
+set_oe_native_sysroot(){
+ echo "Running bitbake -e $1"
+ BITBAKE_E="`bitbake -e $1`"
+ OECORE_NATIVE_SYSROOT=`echo "$BITBAKE_E" | grep ^STAGING_DIR_NATIVE= | cut -d '"' -f2`
+
+ if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
+ # This indicates that there was an error running bitbake -e that
+ # the user needs to be informed of
+ echo "There was an error running bitbake to determine STAGING_DIR_NATIVE"
+ echo "Here is the output from bitbake -e $1"
+ echo $BITBAKE_E
+ exit 1
+ fi
+}
if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
BITBAKE=`which bitbake 2> /dev/null`
@@ -40,10 +62,10 @@ if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
exit 1
fi
touch conf/sanity.conf
- OECORE_NATIVE_SYSROOT=`bitbake -e | grep ^STAGING_DIR_NATIVE | cut -d '"' -f2`
+ set_oe_native_sysroot $1
rm -f conf/sanity.conf
else
- OECORE_NATIVE_SYSROOT=`bitbake -e | grep ^STAGING_DIR_NATIVE | cut -d '"' -f2`
+ set_oe_native_sysroot $1
fi
else
echo "Error: Unable to locate bitbake command."
@@ -55,21 +77,15 @@ if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
fi
fi
-if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
- # This indicates that there was an error running bitbake -e that
- # the user needs to be informed of
- echo "There was an error running bitbake to determine STAGING_DIR_NATIVE"
- echo "Here is the output from bitbake -e"
- bitbake -e
- exit 1
-fi
-
-# Set up pseudo command
-if [ ! -e "$OECORE_NATIVE_SYSROOT/usr/bin/pseudo" ]; then
- echo "Error: Unable to find pseudo binary in $OECORE_NATIVE_SYSROOT/usr/bin/"
+if [ ! -e "$OECORE_NATIVE_SYSROOT/" ]; then
+ echo "Error: $OECORE_NATIVE_SYSROOT doesn't exist."
if [ "x$OECORE_DISTRO_VERSION" = "x" ]; then
- echo "Have you run 'bitbake meta-ide-support'?"
+ if [[ $1 =~ .*native.* ]]; then
+ echo "Have you run 'bitbake $1 -caddto_recipe_sysroot'?"
+ else
+ echo "Have you run 'bitbake $1 '?"
+ fi
else
echo "This shouldn't happen - something is wrong with your toolchain installation"
fi
@@ -78,4 +94,10 @@ if [ ! -e "$OECORE_NATIVE_SYSROOT/usr/bin/pseudo" ]; then
exit 1
fi
fi
-PSEUDO="$OECORE_NATIVE_SYSROOT/usr/bin/pseudo"
+
+# Set up pseudo command
+pseudo="$OECORE_NATIVE_SYSROOT/usr/bin/pseudo"
+if [ -e "$pseudo" ]; then
+ echo "PSEUDO=$pseudo"
+ PSEUDO="$pseudo"
+fi
diff --git a/scripts/oe-git-archive b/scripts/oe-git-archive
new file mode 100755
index 0000000000..9305ed0b0f
--- /dev/null
+++ b/scripts/oe-git-archive
@@ -0,0 +1,118 @@
+#!/usr/bin/env python3
+#
+# Helper script for committing data to git and pushing upstream
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import argparse
+import logging
+import os
+import re
+import sys
+
+# Import oe and bitbake libs
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(scripts_path, 'lib'))
+import scriptpath
+scriptpath.add_bitbake_lib_path()
+scriptpath.add_oe_lib_path()
+
+from oeqa.utils.git import GitRepo, GitError
+from oeqa.utils.metadata import metadata_from_bb
+import oeqa.utils.gitarchive as gitarchive
+
+# Setup logging
+logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
+log = logging.getLogger()
+
+
+def parse_args(argv):
+ """Parse command line arguments"""
+ parser = argparse.ArgumentParser(
+ description="Commit data to git and push upstream",
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+
+ parser.add_argument('--debug', '-D', action='store_true',
+ help="Verbose logging")
+ parser.add_argument('--git-dir', '-g', required=True,
+ help="Local git directory to use")
+ parser.add_argument('--no-create', action='store_true',
+ help="If GIT_DIR is not a valid Git repository, do not "
+ "try to create one")
+ parser.add_argument('--bare', action='store_true',
+ help="Initialize a bare repository when creating a "
+ "new one")
+ parser.add_argument('--push', '-p', nargs='?', default=False, const=True,
+ help="Push to remote")
+ parser.add_argument('--branch-name', '-b',
+ default='{hostname}/{branch}/{machine}',
+ help="Git branch name (pattern) to use")
+ parser.add_argument('--no-tag', action='store_true',
+ help="Do not create Git tag")
+ parser.add_argument('--tag-name', '-t',
+ default='{hostname}/{branch}/{machine}/{commit_count}-g{commit}/{tag_number}',
+ help="Tag name (pattern) to use")
+ parser.add_argument('--commit-msg-subject',
+ default='Results of {branch}:{commit} on {hostname}',
+ help="Subject line (pattern) to use in the commit message")
+ parser.add_argument('--commit-msg-body',
+ default='branch: {branch}\ncommit: {commit}\nhostname: {hostname}',
+ help="Commit message body (pattern)")
+ parser.add_argument('--tag-msg-subject',
+ default='Test run #{tag_number} of {branch}:{commit} on {hostname}',
+ help="Subject line (pattern) of the tag message")
+ parser.add_argument('--tag-msg-body',
+ default='',
+ help="Tag message body (pattern)")
+ parser.add_argument('--exclude', action='append', default=[],
+ help="Glob to exclude files from the commit. Relative "
+ "to DATA_DIR. May be specified multiple times")
+ parser.add_argument('--notes', nargs=2, action='append', default=[],
+ metavar=('GIT_REF', 'FILE'),
+ help="Add a file as a note under refs/notes/GIT_REF. "
+ "{branch_name} in GIT_REF will be expanded to the "
+ "actual target branch name (specified by "
+ "--branch-name). This option may be specified "
+ "multiple times.")
+ parser.add_argument('data_dir', metavar='DATA_DIR',
+ help="Data to commit")
+ return parser.parse_args(argv)
+
+def get_nested(d, list_of_keys):
+ try:
+ for k in list_of_keys:
+ d = d[k]
+ return d
+ except KeyError:
+ return ""
+
+def main(argv=None):
+ args = parse_args(argv)
+ if args.debug:
+ log.setLevel(logging.DEBUG)
+
+ try:
+ # Get keywords to be used in tag and branch names and messages
+ metadata = metadata_from_bb()
+ keywords = {'hostname': get_nested(metadata, ['hostname']),
+ 'branch': get_nested(metadata, ['layers', 'meta', 'branch']),
+ 'commit': get_nested(metadata, ['layers', 'meta', 'commit']),
+ 'commit_count': get_nested(metadata, ['layers', 'meta', 'commit_count']),
+ 'machine': get_nested(metadata, ['config', 'MACHINE'])}
+
+ gitarchive.gitarchive(args.data_dir, args.git_dir, args.no_create, args.bare,
+ args.commit_msg_subject.strip(), args.commit_msg_body, args.branch_name,
+ args.no_tag, args.tag_name, args.tag_msg_subject, args.tag_msg_body,
+ args.exclude, args.notes, args.push, keywords, log)
+
+ except gitarchive.ArchiveError as err:
+ log.error(str(err))
+ return 1
+
+ return 0
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index 0078e95450..aa9b9dc9a9 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -13,16 +13,43 @@
# ALL_PROXY=https://proxy.example.com:8080
#
# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
+#
+# SPDX-License-Identifier: GPL-2.0-only
#
# AUTHORS
# Darren Hart <dvhart@linux.intel.com>
+# disable pathname expansion, NO_PROXY fields could start with "*" or be it
+set -f
+
+if [ $# -lt 2 -o "$1" = '--help' -o "$1" = '-h' ] ; then
+ echo 'oe-git-proxy: error: the following arguments are required: host port'
+ echo 'Usage: oe-git-proxy host port'
+ echo ''
+ echo 'OpenEmbedded git-proxy - a simple tool to be used via GIT_PROXY_COMMAND.'
+ echo 'It uses socat to make SOCKS or HTTPS proxy connections.'
+ echo 'It uses ALL_PROXY to determine the proxy server, protocol, and port.'
+ echo 'It uses NO_PROXY to skip using the proxy for a comma delimited list'
+ echo 'of hosts, host globs (*.example.com), IPs, or CIDR masks (192.168.1.0/24).'
+ echo 'It is known to work with both bash and dash shells.runs native tools'
+ echo ''
+ echo 'arguments:'
+ echo ' host proxy host to use'
+ echo ' port proxy port to use'
+ echo ''
+ echo 'options:'
+ echo ' -h, --help show this help message and exit'
+ echo ''
+ exit 2
+fi
+
# Locate the netcat binary
-SOCAT=$(which socat 2>/dev/null)
-if [ $? -ne 0 ]; then
- echo "ERROR: socat binary not in PATH" 1>&2
- exit 1
+if [ -z "$SOCAT" ]; then
+ SOCAT=$(which socat 2>/dev/null)
+ if [ $? -ne 0 ]; then
+ echo "ERROR: socat binary not in PATH" 1>&2
+ exit 1
+ fi
fi
METHOD=""
@@ -37,7 +64,7 @@ ipv4_val() {
IP="$1"
SHIFT=24
VAL=0
- for B in ${IP//./ }; do
+ for B in $( echo "$IP" | tr '.' ' ' ); do
VAL=$(($VAL+$(($B<<$SHIFT))))
SHIFT=$(($SHIFT-8))
done
@@ -80,7 +107,7 @@ match_host() {
HOST=$1
GLOB=$2
- if [ -z "${HOST%%$GLOB}" ]; then
+ if [ -z "${HOST%%*$GLOB}" ]; then
return 0
fi
@@ -110,7 +137,7 @@ if [ -z "$ALL_PROXY" ]; then
fi
# Connect directly to hosts in NO_PROXY
-for H in ${NO_PROXY//,/ }; do
+for H in $( echo "$NO_PROXY" | tr ',' ' ' ); do
if match_host $1 $H; then
exec $SOCAT STDIO $METHOD
fi
diff --git a/scripts/oe-gnome-terminal-phonehome b/scripts/oe-gnome-terminal-phonehome
index e02354883a..b6b9a3867b 100755
--- a/scripts/oe-gnome-terminal-phonehome
+++ b/scripts/oe-gnome-terminal-phonehome
@@ -1,5 +1,7 @@
#!/bin/sh
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Gnome terminal won't tell us which PID a given command is run as
# or allow a single instance so we can't tell when it completes.
# This allows us to figure out the PID of the target so we can tell
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index bb917b4fc4..93220e3617 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -6,18 +6,7 @@
#
# Copyright 2012-2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
import sys
@@ -40,9 +29,8 @@ def tinfoil_init():
import bb.tinfoil
import logging
tinfoil = bb.tinfoil.Tinfoil()
- tinfoil.prepare(True)
-
tinfoil.logger.setLevel(logging.WARNING)
+ tinfoil.prepare(True)
return tinfoil
@@ -174,15 +162,16 @@ def read_value(args):
logger.error("No packages specified")
sys.exit(1)
- def readvar(pkgdata_file, valuename):
+ def readvar(pkgdata_file, valuename, mappedpkg):
val = ""
with open(pkgdata_file, 'r') as f:
for line in f:
- if line.startswith(valuename + ":"):
+ if (line.startswith(valuename + ":") or
+ line.startswith(valuename + "_" + mappedpkg + ":")):
val = line.split(': ', 1)[1].rstrip()
return val
- logger.debug("read-value('%s', '%s' '%s'" % (args.pkgdata_dir, args.valuename, packages))
+ logger.debug("read-value('%s', '%s' '%s')" % (args.pkgdata_dir, args.valuename, packages))
for package in packages:
pkg_split = package.split('_')
pkg_name = pkg_split[0]
@@ -192,18 +181,21 @@ def read_value(args):
if os.path.exists(revlink):
mappedpkg = os.path.basename(os.readlink(revlink))
qvar = args.valuename
+ value = readvar(revlink, qvar, mappedpkg)
if qvar == "PKGSIZE":
- # append packagename
- qvar = "%s_%s" % (args.valuename, mappedpkg)
# PKGSIZE is now in bytes, but we we want it in KB
- pkgsize = (int(readvar(revlink, qvar)) + 1024 // 2) // 1024
+ pkgsize = (int(value) + 1024 // 2) // 1024
value = "%d" % pkgsize
- else:
- value = readvar(revlink, qvar)
+ if args.unescape:
+ import codecs
+ # escape_decode() unescapes backslash encodings in byte streams
+ value = codecs.escape_decode(bytes(value, "utf-8"))[0].decode("utf-8")
if args.prefix_name:
print('%s %s' % (pkg_name, value))
else:
print(value)
+ else:
+ logger.debug("revlink %s does not exist", revlink)
def lookup_pkglist(pkgs, pkgdata_dir, reverse):
if reverse:
@@ -249,32 +241,74 @@ def lookup_pkg(args):
print('\n'.join(items))
def lookup_recipe(args):
+ def parse_pkgdatafile(pkgdatafile):
+ with open(pkgdatafile, 'r') as f:
+ found = False
+ for line in f:
+ if line.startswith('PN:'):
+ print("%s" % line.split(':', 1)[1].strip())
+ found = True
+ break
+ if not found:
+ logger.error("Unable to find PN entry in %s" % pkgdatafile)
+ sys.exit(1)
+
# Handle both multiple arguments and multiple values within an arg (old syntax)
pkgs = []
for pkgitem in args.pkg:
pkgs.extend(pkgitem.split())
- mappings = defaultdict(list)
for pkg in pkgs:
- pkgfile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
- if os.path.exists(pkgfile):
- with open(pkgfile, 'r') as f:
- for line in f:
- fields = line.rstrip().split(': ')
- if fields[0] == 'PN':
- mappings[pkg].append(fields[1])
- break
- if len(mappings) < len(pkgs):
- missing = list(set(pkgs) - set(mappings.keys()))
- logger.error("The following packages could not be found: %s" % ', '.join(missing))
- sys.exit(1)
-
- items = []
- for pkg in pkgs:
- items.extend(mappings.get(pkg, []))
- print('\n'.join(items))
+ providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+ if os.path.exists(providepkgpath):
+ for f in os.listdir(providepkgpath):
+ if f != pkg:
+ print("%s is in the RPROVIDES of %s:" % (pkg, f))
+ pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+ parse_pkgdatafile(pkgdatafile)
+ continue
+ pkgdatafile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
+ if os.path.exists(pkgdatafile):
+ parse_pkgdatafile(pkgdatafile)
+ else:
+ if args.carryon:
+ print("The following packages could not be found: %s" % pkg)
+ else:
+ logger.error("The following packages could not be found: %s" % pkg)
+ sys.exit(1)
def package_info(args):
+ def parse_pkgdatafile(pkgdatafile):
+ vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE']
+ if args.extra:
+ vars += args.extra
+ with open(pkgdatafile, 'r') as f:
+ vals = dict()
+ extra = ''
+ for line in f:
+ for var in vars:
+ m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line)
+ if m:
+ vals[var] = m.group(1)
+ pkg_version = vals['PKGV'] or ''
+ recipe = vals['PN'] or ''
+ recipe_version = vals['PV'] or ''
+ pkg_size = vals['PKGSIZE'] or ''
+ if 'PKGE' in vals:
+ pkg_version = vals['PKGE'] + ":" + pkg_version
+ if 'PKGR' in vals:
+ pkg_version = pkg_version + "-" + vals['PKGR']
+ if 'PE' in vals:
+ recipe_version = vals['PE'] + ":" + recipe_version
+ if 'PR' in vals:
+ recipe_version = recipe_version + "-" + vals['PR']
+ if args.extra:
+ for var in args.extra:
+ if var in vals:
+ val = re.sub(r'\s+', ' ', vals[var])
+ extra += ' "%s"' % val
+ print("%s %s %s %s %s%s" % (pkg, pkg_version, recipe, recipe_version, pkg_size, extra))
+
# Handle both multiple arguments and multiple values within an arg (old syntax)
packages = []
if args.file:
@@ -290,44 +324,20 @@ def package_info(args):
logger.error("No packages specified")
sys.exit(1)
- mappings = defaultdict(lambda: defaultdict(str))
- for pkg in packages:
- pkgfile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
- if os.path.exists(pkgfile):
- with open(pkgfile, 'r') as f:
- for line in f:
- fields = line.rstrip().split(': ')
- if fields[0].endswith("_" + pkg):
- k = fields[0][:len(fields[0]) - len(pkg) - 1]
- else:
- k = fields[0]
- v = fields[1] if len(fields) == 2 else ""
- mappings[pkg][k] = v
-
- if len(mappings) < len(packages):
- missing = list(set(packages) - set(mappings.keys()))
- logger.error("The following packages could not be found: %s" %
- ', '.join(missing))
- sys.exit(1)
-
- items = []
for pkg in packages:
- pkg_version = mappings[pkg]['PKGV']
- if mappings[pkg]['PKGE']:
- pkg_version = mappings[pkg]['PKGE'] + ":" + pkg_version
- if mappings[pkg]['PKGR']:
- pkg_version = pkg_version + "-" + mappings[pkg]['PKGR']
- recipe = mappings[pkg]['PN']
- recipe_version = mappings[pkg]['PV']
- if mappings[pkg]['PE']:
- recipe_version = mappings[pkg]['PE'] + ":" + recipe_version
- if mappings[pkg]['PR']:
- recipe_version = recipe_version + "-" + mappings[pkg]['PR']
- pkg_size = mappings[pkg]['PKGSIZE']
-
- items.append("%s %s %s %s %s" %
- (pkg, pkg_version, recipe, recipe_version, pkg_size))
- print('\n'.join(items))
+ providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+ if os.path.exists(providepkgpath):
+ for f in os.listdir(providepkgpath):
+ if f != pkg:
+ print("%s is in the RPROVIDES of %s:" % (pkg, f))
+ pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+ parse_pkgdatafile(pkgdatafile)
+ continue
+ pkgdatafile = os.path.join(args.pkgdata_dir, "runtime-reverse", pkg)
+ if not os.path.exists(pkgdatafile):
+ logger.error("Unable to find any built runtime package named %s" % pkg)
+ sys.exit(1)
+ parse_pkgdatafile(pkgdatafile)
def get_recipe_pkgs(pkgdata_dir, recipe, unpackaged):
recipedatafile = os.path.join(pkgdata_dir, recipe)
@@ -379,21 +389,16 @@ def list_pkgs(args):
return False
return True
+ pkglist = []
if args.recipe:
packages = get_recipe_pkgs(args.pkgdata_dir, args.recipe, args.unpackaged)
if args.runtime:
- pkglist = []
runtime_pkgs = lookup_pkglist(packages, args.pkgdata_dir, False)
for rtpkgs in runtime_pkgs.values():
pkglist.extend(rtpkgs)
else:
pkglist = packages
-
- for pkg in pkglist:
- if matchpkg(pkg):
- found = True
- print("%s" % pkg)
else:
if args.runtime:
searchdir = 'runtime-reverse'
@@ -404,9 +409,13 @@ def list_pkgs(args):
for fn in files:
if fn.endswith('.packaged'):
continue
- if matchpkg(fn):
- found = True
- print("%s" % fn)
+ pkglist.append(fn)
+
+ for pkg in sorted(pkglist):
+ if matchpkg(pkg):
+ found = True
+ print("%s" % pkg)
+
if not found:
if args.pkgspec:
logger.error("Unable to find any package matching %s" % args.pkgspec)
@@ -416,6 +425,26 @@ def list_pkgs(args):
def list_pkg_files(args):
import json
+ def parse_pkgdatafile(pkgdatafile, long=False):
+ with open(pkgdatafile, 'r') as f:
+ found = False
+ for line in f:
+ if line.startswith('FILES_INFO:'):
+ found = True
+ val = line.split(':', 1)[1].strip()
+ dictval = json.loads(val)
+ if long:
+ width = max(map(len, dictval), default=0)
+ for fullpth in sorted(dictval):
+ print("\t{:{width}}\t{}".format(fullpth, dictval[fullpth], width=width))
+ else:
+ for fullpth in sorted(dictval):
+ print("\t%s" % fullpth)
+ break
+ if not found:
+ logger.error("Unable to find FILES_INFO entry in %s" % pkgdatafile)
+ sys.exit(1)
+
if args.recipe:
if args.pkg:
@@ -445,25 +474,22 @@ def list_pkg_files(args):
continue
logger.error("Unable to find any built runtime package named %s" % pkg)
sys.exit(1)
+ parse_pkgdatafile(pkgdatafile, args.long)
+
else:
+ providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+ if os.path.exists(providepkgpath):
+ for f in os.listdir(providepkgpath):
+ if f != pkg:
+ print("%s is in the RPROVIDES of %s:" % (pkg, f))
+ pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+ parse_pkgdatafile(pkgdatafile, args.long)
+ continue
pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", pkg)
if not os.path.exists(pkgdatafile):
logger.error("Unable to find any built recipe-space package named %s" % pkg)
sys.exit(1)
-
- with open(pkgdatafile, 'r') as f:
- found = False
- for line in f:
- if line.startswith('FILES_INFO:'):
- found = True
- val = line.split(':', 1)[1].strip()
- dictval = json.loads(val)
- for fullpth in sorted(dictval):
- print("\t%s" % fullpth)
- break
- if not found:
- logger.error("Unable to find FILES_INFO entry in %s" % pkgdatafile)
- sys.exit(1)
+ parse_pkgdatafile(pkgdatafile, args.long)
def find_path(args):
import json
@@ -517,19 +543,22 @@ def main():
parser_list_pkg_files.add_argument('-r', '--runtime', help='Specified package(s) are runtime package names instead of recipe-space package names', action='store_true')
parser_list_pkg_files.add_argument('-p', '--recipe', help='Report on all packages produced by the specified recipe')
parser_list_pkg_files.add_argument('-u', '--unpackaged', help='Include unpackaged (i.e. empty) packages (only useful with -p/--recipe)', action='store_true')
+ parser_list_pkg_files.add_argument('-l', '--long', help='Show more information per file', action='store_true')
parser_list_pkg_files.set_defaults(func=list_pkg_files)
parser_lookup_recipe = subparsers.add_parser('lookup-recipe',
help='Find recipe producing one or more packages',
description='Looks up the specified runtime package(s) to see which recipe they were produced by')
parser_lookup_recipe.add_argument('pkg', nargs='+', help='Runtime package name to look up')
+ parser_lookup_recipe.add_argument('-c', '--continue', dest="carryon", help='Continue looking up recipes even if we can not find one', action='store_true')
parser_lookup_recipe.set_defaults(func=lookup_recipe)
parser_package_info = subparsers.add_parser('package-info',
- help='Shows version, recipe and size information for one or more packages',
+ help='Show version, recipe and size information for one or more packages',
description='Looks up the specified runtime package(s) and display information')
parser_package_info.add_argument('pkg', nargs='*', help='Runtime package name to look up')
parser_package_info.add_argument('-f', '--file', help='Read package names from the specified file (one per line, first field only)')
+ parser_package_info.add_argument('-e', '--extra', help='Extra variables to display, e.g., LICENSE (can be specified multiple times)', action='append')
parser_package_info.set_defaults(func=package_info)
parser_find_path = subparsers.add_parser('find-path',
@@ -545,6 +574,7 @@ def main():
parser_read_value.add_argument('pkg', nargs='*', help='Runtime package name to look up')
parser_read_value.add_argument('-f', '--file', help='Read package names from the specified file (one per line, first field only)')
parser_read_value.add_argument('-n', '--prefix-name', help='Prefix output with package name', action='store_true')
+ parser_read_value.add_argument('-u', '--unescape', help='Expand escapes such as \\n', action='store_true')
parser_read_value.set_defaults(func=read_value)
parser_glob = subparsers.add_parser('glob',
@@ -570,7 +600,7 @@ def main():
logger.debug('Found bitbake path: %s' % bitbakepath)
tinfoil = tinfoil_init()
try:
- args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
+ args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR')
finally:
tinfoil.shutdown()
logger.debug('Value of PKGDATA_DIR is "%s"' % args.pkgdata_dir)
diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index 4fe8974dee..4b70f436b1 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -1,21 +1,11 @@
#!/usr/bin/env python3
-
+#
# OpenEmbedded SDK publishing tool
-
-# Copyright (C) 2015-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# Copyright (C) 2015-2016 Intel Corporation
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
import os
@@ -114,9 +104,9 @@ def publish(args):
# Setting up the git repo
if not is_remote:
- cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; echo "*.pyc\n*.pyo" > .gitignore; fi; git add -A .; git config user.email "oe@oe.oe" && git config user.name "OE" && git commit -q -m "init repo" || true; git update-server-info' % (destination, destination)
+ cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; cp .git/hooks/post-update.sample .git/hooks/post-commit; echo "*.pyc\n*.pyo\npyshtables.py" > .gitignore; fi; git add -A .; git config user.email "oe@oe.oe" && git config user.name "OE" && git commit -q -m "init repo" || true' % (destination, destination)
else:
- cmd = "ssh %s 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; echo '*.pyc\n*.pyo' > .gitignore; fi; git add -A .; git config user.email 'oe@oe.oe' && git config user.name 'OE' && git commit -q -m \"init repo\" || true; git update-server-info'" % (host, destdir, destdir)
+ cmd = "ssh %s 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; cp .git/hooks/post-update.sample .git/hooks/post-commit; echo '*.pyc\n*.pyo\npyshtables.py' > .gitignore; fi; git add -A .; git config user.email 'oe@oe.oe' && git config user.name 'OE' && git commit -q -m \"init repo\" || true'" % (host, destdir, destdir)
ret = subprocess.call(cmd, shell=True)
if ret == 0:
logger.info('SDK published successfully')
diff --git a/scripts/oe-pylint b/scripts/oe-pylint
new file mode 100755
index 0000000000..7cc1ccb010
--- /dev/null
+++ b/scripts/oe-pylint
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Run the pylint3 against our common python module spaces and print a report of potential issues
+#
+this_dir=$(dirname $(readlink -f $0))
+ERRORS="-E"
+IGNORELIST="$ERRORS -d logging-too-many-args -d missing-docstring -d line-too-long -d invalid-name"
+PYTHONPATH=$this_dir/../bitbake/lib/ pylint3 $IGNORELIST bb
+PYTHONPATH=$this_dir/../bitbake/lib/:$this_dir/../meta/lib pylint3 $IGNORELIST -d undefined-variable oe
+PYTHONPATH=$this_dir/../bitbake/lib/:$this_dir/../meta/lib pylint3 $IGNORELIST oeqa
+PYTHONPATH=$this_dir/../bitbake/lib/:$this_dir/../meta/lib:$this_dir/lib pylint3 $IGNORELIST -d undefined-variable argparse_oe buildstats devtool recipetool scriptpath testcasemgmt build_perf checklayer resulttool scriptutils wic \ No newline at end of file
diff --git a/scripts/oe-run-native b/scripts/oe-run-native
new file mode 100755
index 0000000000..bea5d696d7
--- /dev/null
+++ b/scripts/oe-run-native
@@ -0,0 +1,56 @@
+#!/bin/bash
+#
+# Copyright (c) 2016, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+
+#
+# This script is for running tools from native oe sysroot
+#
+
+if [ $# -lt 1 -o "$1" = '--help' -o "$1" = '-h' ] ; then
+ echo 'oe-run-native: the following arguments are required: <native recipe> <native tool>'
+ echo 'Usage: oe-run-native native-recipe tool [parameters]'
+ echo ''
+ echo 'OpenEmbedded run-native - runs native tools'
+ echo ''
+ echo 'arguments:'
+ echo ' native-recipe The recipe which provoides tool'
+ echo ' tool Native tool to run'
+ echo ''
+ exit 2
+fi
+
+native_recipe="$1"
+tool="$2"
+
+if [ "${native_recipe%-native}" = "$native_recipe" ]; then
+ echo Error: $native_recipe is not a native recipe
+ echo Error: Use \"oe-run-native -h\" for help
+ exit 1
+fi
+
+shift
+
+SYSROOT_SETUP_SCRIPT=`which oe-find-native-sysroot 2> /dev/null`
+if [ -z "$SYSROOT_SETUP_SCRIPT" ]; then
+ echo "Error: Unable to find oe-find-native-sysroot script"
+ exit 1
+fi
+. $SYSROOT_SETUP_SCRIPT $native_recipe
+
+OLD_PATH=$PATH
+
+# look for a tool only in native sysroot
+PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$OECORE_NATIVE_SYSROOT/bin:$OECORE_NATIVE_SYSROOT/usr/sbin:$OECORE_NATIVE_SYSROOT/sbin$(find $OECORE_NATIVE_SYSROOT/usr/bin/*-native -maxdepth 1 -type d -printf ":%p")
+tool_find=`/usr/bin/which $tool 2>/dev/null`
+
+if [ -n "$tool_find" ] ; then
+ # add old path to allow usage of host tools
+ PATH=$PATH:$OLD_PATH "$@"
+else
+ echo "Error: Unable to find '$tool' in $PATH"
+ echo "Error: Have you run 'bitbake $native_recipe -caddto_recipe_sysroot'?"
+ exit 1
+fi
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index d9ffd40e8c..18ac0f5869 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -1,19 +1,9 @@
#!/usr/bin/env python3
-# Copyright (c) 2013 Intel Corporation
+# Copyright (c) 2013-2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# DESCRIPTION
# This script runs tests defined in meta/lib/oeqa/selftest/
@@ -25,652 +15,51 @@
# E.g: "oe-selftest -r bblayers.BitbakeLayers" will run just the BitbakeLayers class from meta/lib/oeqa/selftest/bblayers.py
+
import os
import sys
-import unittest
-import logging
import argparse
-import subprocess
-import time as t
-import re
-import fnmatch
-import collections
-import imp
+import logging
-sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib')
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+lib_path = scripts_path + '/lib'
+sys.path = sys.path + [lib_path]
+import argparse_oe
+import scriptutils
import scriptpath
-scriptpath.add_bitbake_lib_path()
scriptpath.add_oe_lib_path()
-import argparse_oe
-
-import oeqa.selftest
-import oeqa.utils.ftools as ftools
-from oeqa.utils.commands import runCmd, get_bb_var, get_test_layer
-from oeqa.selftest.base import oeSelfTest, get_available_machines
-
-try:
- import xmlrunner
- from xmlrunner.result import _XMLTestResult as TestResult
- from xmlrunner import XMLTestRunner as _TestRunner
-except ImportError:
- # use the base runner instead
- from unittest import TextTestResult as TestResult
- from unittest import TextTestRunner as _TestRunner
-
-log_prefix = "oe-selftest-" + t.strftime("%Y%m%d-%H%M%S")
-
-def logger_create():
- log_file = log_prefix + ".log"
- if os.path.exists("oe-selftest.log"): os.remove("oe-selftest.log")
- os.symlink(log_file, "oe-selftest.log")
-
- log = logging.getLogger("selftest")
- log.setLevel(logging.DEBUG)
-
- fh = logging.FileHandler(filename=log_file, mode='w')
- fh.setLevel(logging.DEBUG)
-
- ch = logging.StreamHandler(sys.stdout)
- ch.setLevel(logging.INFO)
-
- formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
- fh.setFormatter(formatter)
- ch.setFormatter(formatter)
-
- log.addHandler(fh)
- log.addHandler(ch)
+scriptpath.add_bitbake_lib_path()
- return log
+from oeqa.utils import load_test_components
+from oeqa.core.exception import OEQAPreRun
-log = logger_create()
+logger = scriptutils.logger_create('oe-selftest', stream=sys.stdout, keepalive=True)
-def get_args_parser():
- description = "Script that runs unit tests agains bitbake and other Yocto related tools. The goal is to validate tools functionality and metadata integrity. Refer to https://wiki.yoctoproject.org/wiki/Oe-selftest for more information."
+def main():
+ description = "Script that runs unit tests against bitbake and other Yocto related tools. The goal is to validate tools functionality and metadata integrity. Refer to https://wiki.yoctoproject.org/wiki/Oe-selftest for more information."
parser = argparse_oe.ArgumentParser(description=description)
- group = parser.add_mutually_exclusive_group(required=True)
- group.add_argument('-r', '--run-tests', required=False, action='store', nargs='*', dest="run_tests", default=None, help='Select what tests to run (modules, classes or test methods). Format should be: <module>.<class>.<test_method>')
- group.add_argument('-a', '--run-all-tests', required=False, action="store_true", dest="run_all_tests", default=False, help='Run all (unhidden) tests')
- group.add_argument('-m', '--list-modules', required=False, action="store_true", dest="list_modules", default=False, help='List all available test modules.')
- group.add_argument('--list-classes', required=False, action="store_true", dest="list_allclasses", default=False, help='List all available test classes.')
- parser.add_argument('--coverage', action="store_true", help="Run code coverage when testing")
- parser.add_argument('--coverage-source', dest="coverage_source", nargs="+", help="Specifiy the directories to take coverage from")
- parser.add_argument('--coverage-include', dest="coverage_include", nargs="+", help="Specify extra patterns to include into the coverage measurement")
- parser.add_argument('--coverage-omit', dest="coverage_omit", nargs="+", help="Specify with extra patterns to exclude from the coverage measurement")
- group.add_argument('--run-tests-by', required=False, dest='run_tests_by', default=False, nargs='*',
- help='run-tests-by <name|class|module|id|tag> <list of tests|classes|modules|ids|tags>')
- group.add_argument('--list-tests-by', required=False, dest='list_tests_by', default=False, nargs='*',
- help='list-tests-by <name|class|module|id|tag> <list of tests|classes|modules|ids|tags>')
- group.add_argument('-l', '--list-tests', required=False, action="store_true", dest="list_tests", default=False,
- help='List all available tests.')
- group.add_argument('--list-tags', required=False, dest='list_tags', default=False, action="store_true",
- help='List all tags that have been set to test cases.')
- parser.add_argument('--machine', required=False, dest='machine', choices=['random', 'all'], default=None,
- help='Run tests on different machines (random/all).')
- return parser
-
-
-def preflight_check():
-
- log.info("Checking that everything is in order before running the tests")
-
- if not os.environ.get("BUILDDIR"):
- log.error("BUILDDIR isn't set. Did you forget to source your build environment setup script?")
- return False
-
- builddir = os.environ.get("BUILDDIR")
- if os.getcwd() != builddir:
- log.info("Changing cwd to %s" % builddir)
- os.chdir(builddir)
-
- if not "meta-selftest" in get_bb_var("BBLAYERS"):
- log.error("You don't seem to have the meta-selftest layer in BBLAYERS")
- return False
-
- log.info("Running bitbake -p")
- runCmd("bitbake -p")
-
- return True
-
-def add_include():
- builddir = os.environ.get("BUILDDIR")
- if "#include added by oe-selftest.py" \
- not in ftools.read_file(os.path.join(builddir, "conf/local.conf")):
- log.info("Adding: \"include selftest.inc\" in local.conf")
- ftools.append_file(os.path.join(builddir, "conf/local.conf"), \
- "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc")
-
- if "#include added by oe-selftest.py" \
- not in ftools.read_file(os.path.join(builddir, "conf/bblayers.conf")):
- log.info("Adding: \"include bblayers.inc\" in bblayers.conf")
- ftools.append_file(os.path.join(builddir, "conf/bblayers.conf"), \
- "\n#include added by oe-selftest.py\ninclude bblayers.inc")
-def remove_include():
- builddir = os.environ.get("BUILDDIR")
- if builddir is None:
- return
- if "#include added by oe-selftest.py" \
- in ftools.read_file(os.path.join(builddir, "conf/local.conf")):
- log.info("Removing the include from local.conf")
- ftools.remove_from_file(os.path.join(builddir, "conf/local.conf"), \
- "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc")
-
- if "#include added by oe-selftest.py" \
- in ftools.read_file(os.path.join(builddir, "conf/bblayers.conf")):
- log.info("Removing the include from bblayers.conf")
- ftools.remove_from_file(os.path.join(builddir, "conf/bblayers.conf"), \
- "\n#include added by oe-selftest.py\ninclude bblayers.inc")
-
-def remove_inc_files():
- try:
- os.remove(os.path.join(os.environ.get("BUILDDIR"), "conf/selftest.inc"))
- for root, _, files in os.walk(get_test_layer()):
- for f in files:
- if f == 'test_recipe.inc':
- os.remove(os.path.join(root, f))
- except (AttributeError, OSError,) as e: # AttributeError may happen if BUILDDIR is not set
- pass
-
- for incl_file in ['conf/bblayers.inc', 'conf/machine.inc']:
- try:
- os.remove(os.path.join(os.environ.get("BUILDDIR"), incl_file))
- except:
- pass
-
-
-def get_tests_modules(include_hidden=False):
- modules_list = list()
- for modules_path in oeqa.selftest.__path__:
- for (p, d, f) in os.walk(modules_path):
- files = sorted([f for f in os.listdir(p) if f.endswith('.py') and not (f.startswith('_') and not include_hidden) and not f.startswith('__') and f != 'base.py'])
- for f in files:
- submodules = p.split("selftest")[-1]
- module = ""
- if submodules:
- module = 'oeqa.selftest' + submodules.replace("/",".") + "." + f.split('.py')[0]
- else:
- module = 'oeqa.selftest.' + f.split('.py')[0]
- if module not in modules_list:
- modules_list.append(module)
- return modules_list
-
-
-def get_tests(exclusive_modules=[], include_hidden=False):
- test_modules = list()
- for x in exclusive_modules:
- test_modules.append('oeqa.selftest.' + x)
- if not test_modules:
- inc_hidden = include_hidden
- test_modules = get_tests_modules(inc_hidden)
-
- return test_modules
-
-
-class Tc:
- def __init__(self, tcname, tcclass, tcmodule, tcid=None, tctag=None):
- self.tcname = tcname
- self.tcclass = tcclass
- self.tcmodule = tcmodule
- self.tcid = tcid
- # A test case can have multiple tags (as tuples) otherwise str will suffice
- self.tctag = tctag
- self.fullpath = '.'.join(['oeqa', 'selftest', tcmodule, tcclass, tcname])
-
-
-def get_tests_from_module(tmod):
- tlist = []
- prefix = 'oeqa.selftest.'
+ comp_name, comp = load_test_components(logger, 'oe-selftest').popitem()
+ comp.register_commands(logger, parser)
try:
- import importlib
- modlib = importlib.import_module(tmod)
- for mod in list(vars(modlib).values()):
- if isinstance(mod, type(oeSelfTest)) and issubclass(mod, oeSelfTest) and mod is not oeSelfTest:
- for test in dir(mod):
- if test.startswith('test_') and hasattr(vars(mod)[test], '__call__'):
- # Get test case id and feature tag
- # NOTE: if testcase decorator or feature tag not set will throw error
- try:
- tid = vars(mod)[test].test_case
- except:
- print('DEBUG: tc id missing for ' + str(test))
- tid = None
- try:
- ttag = vars(mod)[test].tag__feature
- except:
- # print('DEBUG: feature tag missing for ' + str(test))
- ttag = None
-
- # NOTE: for some reason lstrip() doesn't work for mod.__module__
- tlist.append(Tc(test, mod.__name__, mod.__module__.replace(prefix, ''), tid, ttag))
- except:
- pass
-
- return tlist
-
-
-def get_all_tests():
- # Get all the test modules (except the hidden ones)
- testlist = []
- tests_modules = get_tests_modules()
- # Get all the tests from modules
- for tmod in sorted(tests_modules):
- testlist += get_tests_from_module(tmod)
- return testlist
-
-
-def get_testsuite_by(criteria, keyword):
- # Get a testsuite based on 'keyword'
- # criteria: name, class, module, id, tag
- # keyword: a list of tests, classes, modules, ids, tags
-
- ts = []
- all_tests = get_all_tests()
-
- def get_matches(values):
- # Get an item and return the ones that match with keyword(s)
- # values: the list of items (names, modules, classes...)
- result = []
- remaining = values[:]
- for key in keyword:
- found = False
- if key in remaining:
- # Regular matching of exact item
- result.append(key)
- remaining.remove(key)
- found = True
- else:
- # Wildcard matching
- pattern = re.compile(fnmatch.translate(r"%s" % key))
- added = [x for x in remaining if pattern.match(x)]
- if added:
- result.extend(added)
- remaining = [x for x in remaining if x not in added]
- found = True
- if not found:
- log.error("Failed to find test: %s" % key)
-
- return result
-
- if criteria == 'name':
- names = get_matches([ tc.tcname for tc in all_tests ])
- ts = [ tc for tc in all_tests if tc.tcname in names ]
-
- elif criteria == 'class':
- classes = get_matches([ tc.tcclass for tc in all_tests ])
- ts = [ tc for tc in all_tests if tc.tcclass in classes ]
-
- elif criteria == 'module':
- modules = get_matches([ tc.tcmodule for tc in all_tests ])
- ts = [ tc for tc in all_tests if tc.tcmodule in modules ]
-
- elif criteria == 'id':
- ids = get_matches([ str(tc.tcid) for tc in all_tests ])
- ts = [ tc for tc in all_tests if str(tc.tcid) in ids ]
-
- elif criteria == 'tag':
- values = set()
- for tc in all_tests:
- # tc can have multiple tags (as tuple) otherwise str will suffice
- if isinstance(tc.tctag, tuple):
- values |= { str(tag) for tag in tc.tctag }
- else:
- values.add(str(tc.tctag))
-
- tags = get_matches(list(values))
-
- for tc in all_tests:
- for tag in tags:
- if isinstance(tc.tctag, tuple) and tag in tc.tctag:
- ts.append(tc)
- elif tag == tc.tctag:
- ts.append(tc)
-
- # Remove duplicates from the list
- ts = list(set(ts))
-
- return ts
-
-
-def list_testsuite_by(criteria, keyword):
- # Get a testsuite based on 'keyword'
- # criteria: name, class, module, id, tag
- # keyword: a list of tests, classes, modules, ids, tags
-
- ts = sorted([ (tc.tcid, tc.tctag, tc.tcname, tc.tcclass, tc.tcmodule) for tc in get_testsuite_by(criteria, keyword) ])
-
- print('%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % ('id', 'tag', 'name', 'class', 'module'))
- print('_' * 150)
- for t in ts:
- if isinstance(t[1], (tuple, list)):
- print('%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % (t[0], ', '.join(t[1]), t[2], t[3], t[4]))
- else:
- print('%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % t)
- print('_' * 150)
- print('Filtering by:\t %s' % criteria)
- print('Looking for:\t %s' % ', '.join(str(x) for x in keyword))
- print('Total found:\t %s' % len(ts))
-
-
-def list_tests():
- # List all available oe-selftest tests
-
- ts = get_all_tests()
-
- print('%-4s\t%-10s\t%-50s' % ('id', 'tag', 'test'))
- print('_' * 80)
- for t in ts:
- if isinstance(t.tctag, (tuple, list)):
- print('%-4s\t%-10s\t%-50s' % (t.tcid, ', '.join(t.tctag), '.'.join([t.tcmodule, t.tcclass, t.tcname])))
- else:
- print('%-4s\t%-10s\t%-50s' % (t.tcid, t.tctag, '.'.join([t.tcmodule, t.tcclass, t.tcname])))
- print('_' * 80)
- print('Total found:\t %s' % len(ts))
-
-def list_tags():
- # Get all tags set to test cases
- # This is useful when setting tags to test cases
- # The list of tags should be kept as minimal as possible
- tags = set()
- all_tests = get_all_tests()
-
- for tc in all_tests:
- if isinstance(tc.tctag, (tuple, list)):
- tags.update(set(tc.tctag))
- else:
- tags.add(tc.tctag)
-
- print('Tags:\t%s' % ', '.join(str(x) for x in tags))
-
-def coverage_setup(coverage_source, coverage_include, coverage_omit):
- """ Set up the coverage measurement for the testcases to be run """
- import datetime
- import subprocess
- builddir = os.environ.get("BUILDDIR")
- pokydir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
- curcommit= subprocess.check_output(["git", "--git-dir", os.path.join(pokydir, ".git"), "rev-parse", "HEAD"]).decode('utf-8')
- coveragerc = "%s/.coveragerc" % builddir
- data_file = "%s/.coverage." % builddir
- data_file += datetime.datetime.now().strftime('%Y%m%dT%H%M%S')
- if os.path.isfile(data_file):
- os.remove(data_file)
- with open(coveragerc, 'w') as cps:
- cps.write("# Generated with command '%s'\n" % " ".join(sys.argv))
- cps.write("# HEAD commit %s\n" % curcommit.strip())
- cps.write("[run]\n")
- cps.write("data_file = %s\n" % data_file)
- cps.write("branch = True\n")
- # Measure just BBLAYERS, scripts and bitbake folders
- cps.write("source = \n")
- if coverage_source:
- for directory in coverage_source:
- if not os.path.isdir(directory):
- log.warn("Directory %s is not valid.", directory)
- cps.write(" %s\n" % directory)
- else:
- for layer in get_bb_var('BBLAYERS').split():
- cps.write(" %s\n" % layer)
- cps.write(" %s\n" % os.path.dirname(os.path.realpath(__file__)))
- cps.write(" %s\n" % os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))),'bitbake'))
-
- if coverage_include:
- cps.write("include = \n")
- for pattern in coverage_include:
- cps.write(" %s\n" % pattern)
- if coverage_omit:
- cps.write("omit = \n")
- for pattern in coverage_omit:
- cps.write(" %s\n" % pattern)
-
- return coveragerc
-
-def coverage_report():
- """ Loads the coverage data gathered and reports it back """
- try:
- # Coverage4 uses coverage.Coverage
- from coverage import Coverage
- except:
- # Coverage under version 4 uses coverage.coverage
- from coverage import coverage as Coverage
-
- import io as StringIO
- from coverage.misc import CoverageException
-
- cov_output = StringIO.StringIO()
- # Creating the coverage data with the setting from the configuration file
- cov = Coverage(config_file = os.environ.get('COVERAGE_PROCESS_START'))
- try:
- # Load data from the data file specified in the configuration
- cov.load()
- # Store report data in a StringIO variable
- cov.report(file = cov_output, show_missing=False)
- log.info("\n%s" % cov_output.getvalue())
- except CoverageException as e:
- # Show problems with the reporting. Since Coverage4 not finding any data to report raises an exception
- log.warn("%s" % str(e))
- finally:
- cov_output.close()
-
-
-def main():
- parser = get_args_parser()
- args = parser.parse_args()
-
- # Add <layer>/lib to sys.path, so layers can add selftests
- log.info("Running bitbake -e to get BBPATH")
- bbpath = get_bb_var('BBPATH').split(':')
- layer_libdirs = [p for p in (os.path.join(l, 'lib') for l in bbpath) if os.path.exists(p)]
- sys.path.extend(layer_libdirs)
- imp.reload(oeqa.selftest)
-
- if args.run_tests_by and len(args.run_tests_by) >= 2:
- valid_options = ['name', 'class', 'module', 'id', 'tag']
- if args.run_tests_by[0] not in valid_options:
- print('--run-tests-by %s not a valid option. Choose one of <name|class|module|id|tag>.' % args.run_tests_by[0])
- return 1
- else:
- criteria = args.run_tests_by[0]
- keyword = args.run_tests_by[1:]
- ts = sorted([ tc.fullpath for tc in get_testsuite_by(criteria, keyword) ])
- if not ts:
- return 1
-
- if args.list_tests_by and len(args.list_tests_by) >= 2:
- valid_options = ['name', 'class', 'module', 'id', 'tag']
- if args.list_tests_by[0] not in valid_options:
- print('--list-tests-by %s not a valid option. Choose one of <name|class|module|id|tag>.' % args.list_tests_by[0])
- return 1
- else:
- criteria = args.list_tests_by[0]
- keyword = args.list_tests_by[1:]
- list_testsuite_by(criteria, keyword)
-
- if args.list_tests:
- list_tests()
-
- if args.list_tags:
- list_tags()
-
- if args.list_allclasses:
- args.list_modules = True
-
- if args.list_modules:
- log.info('Listing all available test modules:')
- testslist = get_tests(include_hidden=True)
- for test in testslist:
- module = test.split('oeqa.selftest.')[-1]
- info = ''
- if module.startswith('_'):
- info = ' (hidden)'
- print(module + info)
- if args.list_allclasses:
- try:
- import importlib
- modlib = importlib.import_module(test)
- for v in vars(modlib):
- t = vars(modlib)[v]
- if isinstance(t, type(oeSelfTest)) and issubclass(t, oeSelfTest) and t!=oeSelfTest:
- print(" --", v)
- for method in dir(t):
- if method.startswith("test_") and isinstance(vars(t)[method], collections.Callable):
- print(" -- --", method)
-
- except (AttributeError, ImportError) as e:
- print(e)
- pass
-
- if args.run_tests or args.run_all_tests or args.run_tests_by:
- if not preflight_check():
- return 1
-
- if args.run_tests_by:
- testslist = ts
- else:
- testslist = get_tests(exclusive_modules=(args.run_tests or []), include_hidden=False)
-
- suite = unittest.TestSuite()
- loader = unittest.TestLoader()
- loader.sortTestMethodsUsing = None
- runner = TestRunner(verbosity=2,
- resultclass=buildResultClass(args))
- # we need to do this here, otherwise just loading the tests
- # will take 2 minutes (bitbake -e calls)
- oeSelfTest.testlayer_path = get_test_layer()
- for test in testslist:
- log.info("Loading tests from: %s" % test)
- try:
- suite.addTests(loader.loadTestsFromName(test))
- except AttributeError as e:
- log.error("Failed to import %s" % test)
- log.error(e)
- return 1
- add_include()
-
- if args.machine:
- # Custom machine sets only weak default values (??=) for MACHINE in machine.inc
- # This let test cases that require a specific MACHINE to be able to override it, using (?= or =)
- log.info('Custom machine mode enabled. MACHINE set to %s' % args.machine)
- if args.machine == 'random':
- os.environ['CUSTOMMACHINE'] = 'random'
- result = runner.run(suite)
- else: # all
- machines = get_available_machines()
- for m in machines:
- log.info('Run tests with custom MACHINE set to: %s' % m)
- os.environ['CUSTOMMACHINE'] = m
- result = runner.run(suite)
- else:
- result = runner.run(suite)
-
- log.info("Finished")
-
- if result.wasSuccessful():
- return 0
- else:
- return 1
-
-def buildResultClass(args):
- """Build a Result Class to use in the testcase execution"""
- import site
-
- class StampedResult(TestResult):
- """
- Custom TestResult that prints the time when a test starts. As oe-selftest
- can take a long time (ie a few hours) to run, timestamps help us understand
- what tests are taking a long time to execute.
- If coverage is required, this class executes the coverage setup and reporting.
- """
- def startTest(self, test):
- import time
- self.stream.write(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + " - ")
- super(StampedResult, self).startTest(test)
-
- def startTestRun(self):
- """ Setup coverage before running any testcase """
-
- # variable holding the coverage configuration file allowing subprocess to be measured
- self.coveragepth = None
-
- # indicates the system if coverage is currently installed
- self.coverage_installed = True
-
- if args.coverage or args.coverage_source or args.coverage_include or args.coverage_omit:
- try:
- # check if user can do coverage
- import coverage
- except:
- log.warn("python coverage is not installed. More info on https://pypi.python.org/pypi/coverage")
- self.coverage_installed = False
-
- if self.coverage_installed:
- log.info("Coverage is enabled")
-
- major_version = int(coverage.version.__version__[0])
- if major_version < 4:
- log.error("python coverage %s installed. Require version 4 or greater." % coverage.version.__version__)
- self.stop()
- # In case the user has not set the variable COVERAGE_PROCESS_START,
- # create a default one and export it. The COVERAGE_PROCESS_START
- # value indicates where the coverage configuration file resides
- # More info on https://pypi.python.org/pypi/coverage
- if not os.environ.get('COVERAGE_PROCESS_START'):
- os.environ['COVERAGE_PROCESS_START'] = coverage_setup(args.coverage_source, args.coverage_include, args.coverage_omit)
-
- # Use default site.USER_SITE and write corresponding config file
- site.ENABLE_USER_SITE = True
- if not os.path.exists(site.USER_SITE):
- os.makedirs(site.USER_SITE)
- self.coveragepth = os.path.join(site.USER_SITE, "coverage.pth")
- with open(self.coveragepth, 'w') as cps:
- cps.write('import sys,site; sys.path.extend(site.getsitepackages()); import coverage; coverage.process_startup();')
-
- def stopTestRun(self):
- """ Report coverage data after the testcases are run """
-
- if args.coverage or args.coverage_source or args.coverage_include or args.coverage_omit:
- if self.coverage_installed:
- with open(os.environ['COVERAGE_PROCESS_START']) as ccf:
- log.info("Coverage configuration file (%s)" % os.environ.get('COVERAGE_PROCESS_START'))
- log.info("===========================")
- log.info("\n%s" % "".join(ccf.readlines()))
-
- log.info("Coverage Report")
- log.info("===============")
- try:
- coverage_report()
- finally:
- # remove the pth file
- try:
- os.remove(self.coveragepth)
- except OSError:
- log.warn("Expected temporal file from coverage is missing, ignoring removal.")
-
- return StampedResult
+ args = parser.parse_args()
+ results = args.func(logger, args)
+ ret = 0 if results.wasSuccessful() else 1
+ except SystemExit as err:
+ if err.code != 0:
+ raise err
+ ret = err.code
+ except OEQAPreRun as pr:
+ ret = 1
-class TestRunner(_TestRunner):
- """Test runner class aware of exporting tests."""
- def __init__(self, *args, **kwargs):
- try:
- exportdir = os.path.join(os.getcwd(), log_prefix)
- kwargsx = dict(**kwargs)
- # argument specific to XMLTestRunner, if adding a new runner then
- # also add logic to use other runner's args.
- kwargsx['output'] = exportdir
- kwargsx['descriptions'] = False
- # done for the case where telling the runner where to export
- super(TestRunner, self).__init__(*args, **kwargsx)
- except TypeError:
- log.info("test runner init'ed like unittest")
- super(TestRunner, self).__init__(*args, **kwargs)
+ return ret
-if __name__ == "__main__":
+if __name__ == '__main__':
try:
ret = main()
except Exception:
ret = 1
import traceback
traceback.print_exc()
- finally:
- remove_include()
- remove_inc_files()
sys.exit(ret)
diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index 93722e08ad..30eaa8efbe 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -4,25 +4,22 @@
#
# Copyright (C) 2006-2011 Linux Foundation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# SPDX-License-Identifier: GPL-2.0-or-later
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
if [ -z "$BUILDDIR" ]; then
echo >&2 "Error: The build directory (BUILDDIR) must be set!"
exit 1
fi
+if [ "$1" = '--help' -o "$1" = '-h' ]; then
+ echo 'Usage: oe-setup-builddir'
+ echo ''
+ echo "OpenEmbedded setup-builddir - setup build directory $BUILDDIR"
+ echo ''
+ exit 2
+fi
+
mkdir -p "$BUILDDIR/conf"
if [ ! -d "$BUILDDIR" ]; then
@@ -61,7 +58,7 @@ if [ -n "$TEMPLATECONF" ]; then
TEMPLATECONF="$OEROOT/$TEMPLATECONF"
fi
if [ ! -d "$TEMPLATECONF" ]; then
- echo >&2 "Error: '$TEMPLATECONF' must be a directory containing local.conf & bblayers.conf"
+ echo >&2 "Error: TEMPLATECONF value points to nonexistent directory '$TEMPLATECONF'"
exit 1
fi
fi
@@ -125,13 +122,6 @@ EOM
# unset SHOWYPDOC
fi
-cat <<EOM
-
-### Shell environment set up for builds. ###
-
-You can now run 'bitbake <target>'
-
-EOM
if [ -z "$OECORENOTESCONF" ]; then
OECORENOTESCONF="$OEROOT/meta/conf/conf-notes.txt"
fi
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
deleted file mode 100755
index 917b98b984..0000000000
--- a/scripts/oe-setup-rpmrepo
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash
-#
-# This utility setup the necessary metadata for an rpm repo
-#
-# Copyright (c) 2011 Intel Corp.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-# Don't use TMPDIR from the external environment, it may be a distro
-# variable pointing to /tmp (e.g. within X on OpenSUSE)
-# Instead, use OE_TMPDIR for passing this in externally.
-TMPDIR="$OE_TMPDIR"
-
-function usage() {
- echo "Usage: $0 <rpm-dir>"
- echo " <rpm-dir>: default is $TMPDIR/deploy/rpm"
-}
-
-if [ $# -gt 1 ]; then
- usage
- exit 1
-fi
-
-setup_tmpdir() {
- if [ -z "$TMPDIR" ]; then
- # Try to get TMPDIR from bitbake
- type -P bitbake &>/dev/null || {
- echo "In order for this script to dynamically infer paths";
- echo "to kernels or filesystem images, you either need";
- echo "bitbake in your PATH or to source oe-init-build-env";
- echo "before running this script" >&2;
- exit 1; }
-
- # We have bitbake in PATH, get TMPDIR from bitbake
- TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
- if [ -z "$TMPDIR" ]; then
- echo "Error: this script needs to be run from your build directory,"
- echo "or you need to explicitly set TMPDIR in your environment"
- exit 1
- fi
- fi
-}
-
-setup_sysroot() {
- # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
- # environment script. If that variable isn't set, we're
- # either in an in-tree poky scenario or the environment
- # script wasn't source'd.
- if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
- setup_tmpdir
- BUILD_ARCH=`uname -m`
- BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
- BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
-
- OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS
- fi
-}
-
-setup_tmpdir
-setup_sysroot
-
-
-if [ -n "$1" ]; then
- RPM_DIR="$1"
-else
- RPM_DIR="$TMPDIR/deploy/rpm"
-fi
-
-if [ ! -d "$RPM_DIR" ]; then
- echo "Error: rpm dir $RPM_DIR doesn't exist"
- exit 1
-fi
-
-CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo
-if [ ! -e "$CREATEREPO" ]; then
- echo "Error: can't find createrepo binary"
- echo "please run bitbake createrepo-native first"
- exit 1
-fi
-
-export PATH=${PATH}:${OECORE_NATIVE_SYSROOT}/usr/bin
-
-$CREATEREPO "$RPM_DIR"
-
-exit 0
diff --git a/scripts/oe-test b/scripts/oe-test
new file mode 100755
index 0000000000..55985b0b24
--- /dev/null
+++ b/scripts/oe-test
@@ -0,0 +1,83 @@
+#!/usr/bin/env python3
+
+# OpenEmbedded test tool
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import sys
+import argparse
+import logging
+
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+lib_path = scripts_path + '/lib'
+sys.path = sys.path + [lib_path]
+import argparse_oe
+import scriptutils
+
+# oe-test is used for testexport and it doesn't have oe lib
+# so we just skip adding these libraries (not used in testexport)
+try:
+ import scriptpath
+ scriptpath.add_oe_lib_path()
+except ImportError:
+ pass
+
+from oeqa.utils import load_test_components
+from oeqa.core.exception import OEQAPreRun
+
+logger = scriptutils.logger_create('oe-test', stream=sys.stdout)
+
+def main():
+ parser = argparse_oe.ArgumentParser(description="OpenEmbedded test tool",
+ add_help=False,
+ epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
+ parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
+ parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
+ global_args, unparsed_args = parser.parse_known_args()
+
+ # Help is added here rather than via add_help=True, as we don't want it to
+ # be handled by parse_known_args()
+ parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS,
+ help='show this help message and exit')
+
+ if global_args.debug:
+ logger.setLevel(logging.DEBUG)
+ elif global_args.quiet:
+ logger.setLevel(logging.ERROR)
+
+ components = load_test_components(logger, 'oe-test')
+
+ subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
+ subparsers.add_subparser_group('components', 'Test components')
+ subparsers.required = True
+ for comp_name in sorted(components.keys()):
+ comp = components[comp_name]
+ comp.register_commands(logger, subparsers)
+
+ try:
+ args = parser.parse_args(unparsed_args, namespace=global_args)
+ results = args.func(logger, args)
+ ret = 0 if results.wasSuccessful() else 1
+ except SystemExit as err:
+ if err.code != 0:
+ raise err
+ ret = err.code
+ except argparse_oe.ArgumentUsageError as ae:
+ parser.error_subcommand(ae.message, ae.subcommand)
+ except OEQAPreRun as pr:
+ ret = 1
+
+ return ret
+
+if __name__ == '__main__':
+ try:
+ ret = main()
+ except Exception:
+ ret = 1
+ import traceback
+ traceback.print_exc()
+ sys.exit(ret)
diff --git a/scripts/oe-trim-schemas b/scripts/oe-trim-schemas
index 66a1b8d81d..bf77c8cf64 100755
--- a/scripts/oe-trim-schemas
+++ b/scripts/oe-trim-schemas
@@ -1,4 +1,7 @@
#! /usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import sys
try:
@@ -18,6 +21,15 @@ def children (elem, name=None):
l = [e for e in l if e.tag == name]
return l
+if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'):
+ print('oe-trim-schemas: error: the following arguments are required: schema\n'
+ 'Usage: oe-trim-schemas schema\n\n'
+ 'OpenEmbedded trim schemas - remove unneeded schema locale translations\n'
+ ' from gconf schema files\n\n'
+ 'arguments:\n'
+ ' schema gconf schema file to trim\n')
+ sys.exit(2)
+
xml = etree.parse(sys.argv[1])
for schema in child(xml.getroot(), "schemalist").getchildren():
diff --git a/scripts/oepydevshell-internal.py b/scripts/oepydevshell-internal.py
index a22bec3365..96c078ef3d 100755
--- a/scripts/oepydevshell-internal.py
+++ b/scripts/oepydevshell-internal.py
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import os
import sys
@@ -22,9 +25,16 @@ def cbreaknoecho(fd):
old[3] = old[3] &~ termios.ECHO &~ termios.ICANON
termios.tcsetattr(fd, termios.TCSADRAIN, old)
-if len(sys.argv) != 3:
- print("Incorrect parameters")
- sys.exit(1)
+if len(sys.argv) != 3 or sys.argv[1] in ('-h', '--help'):
+ print('oepydevshell-internal.py: error: the following arguments are required: pty, pid\n'
+ 'Usage: oepydevshell-internal.py pty pid\n\n'
+ 'OpenEmbedded oepydevshell-internal.py - internal script called from meta/classes/devshell.bbclass\n\n'
+ 'arguments:\n'
+ ' pty pty device name\n'
+ ' pid parent process id\n\n'
+ 'options:\n'
+ ' -h, --help show this help message and exit\n')
+ sys.exit(2)
pty = open(sys.argv[1], "w+b", 0)
parent = int(sys.argv[2])
@@ -38,7 +48,7 @@ readline.parse_and_bind("tab: complete")
try:
readline.read_history_file(histfile)
except IOError:
- pass
+ pass
try:
@@ -56,7 +66,9 @@ try:
(ready, _, _) = select.select([pty, sys.stdin], writers , [], 0)
try:
if pty in ready:
- i = i + pty.read().decode('utf-8')
+ readdata = pty.read()
+ if readdata:
+ i = i + readdata.decode('utf-8')
if i:
# Write a page at a time to avoid overflowing output
# d.keys() is a good way to do that
diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py
index ce89491f60..bc3ab43823 100755
--- a/scripts/opkg-query-helper.py
+++ b/scripts/opkg-query-helper.py
@@ -6,21 +6,8 @@
#
# Copyright 2012 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-#
-
import sys
import fileinput
diff --git a/scripts/postinst-intercepts/delay_to_first_boot b/scripts/postinst-intercepts/delay_to_first_boot
new file mode 100644
index 0000000000..fa8e1caaf5
--- /dev/null
+++ b/scripts/postinst-intercepts/delay_to_first_boot
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
+
+exit 1
diff --git a/scripts/postinst-intercepts/postinst_intercept b/scripts/postinst-intercepts/postinst_intercept
index b18e806d43..b91974c885 100755
--- a/scripts/postinst-intercepts/postinst_intercept
+++ b/scripts/postinst-intercepts/postinst_intercept
@@ -1,5 +1,7 @@
#!/bin/sh
#
+# SPDX-License-Identifier: MIT
+#
# This script is called from inside postinstall scriptlets at do_rootfs time. It
# actually adds, at the end, the list of packages for which the intercept script
# is valid. Also, if one wants to pass any variables to the intercept script from
diff --git a/scripts/postinst-intercepts/update_font_cache b/scripts/postinst-intercepts/update_font_cache
index bf65e19a41..3053c7065f 100644
--- a/scripts/postinst-intercepts/update_font_cache
+++ b/scripts/postinst-intercepts/update_font_cache
@@ -1,7 +1,9 @@
#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
set -e
-PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir} \
- -E ${fontconfigcacheenv} $D${bindir}/fc-cache --sysroot=$D --system-only ${fontconfigcacheparams}
+PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D -E ${fontconfigcacheenv} $D${libexecdir}/${binprefix}fc-cache --sysroot=$D --system-only ${fontconfigcacheparams}
chown -R root:root $D${fontconfigcachedir}
diff --git a/scripts/postinst-intercepts/update_gio_module_cache b/scripts/postinst-intercepts/update_gio_module_cache
index fe468092cf..c87fa85db9 100644
--- a/scripts/postinst-intercepts/update_gio_module_cache
+++ b/scripts/postinst-intercepts/update_gio_module_cache
@@ -1,7 +1,11 @@
#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
set -e
-PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \
- $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/
+PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/
+[ ! -e $D${libdir}/gio/modules/giomodule.cache ] ||
+ chown root:root $D${libdir}/gio/modules/giomodule.cache
diff --git a/scripts/postinst-intercepts/update_gtk_icon_cache b/scripts/postinst-intercepts/update_gtk_icon_cache
new file mode 100644
index 0000000000..99367a2855
--- /dev/null
+++ b/scripts/postinst-intercepts/update_gtk_icon_cache
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
+# Post-install intercept for gtk-icon-cache.bbclass
+
+set -e
+
+# Update native pixbuf loaders
+$STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache
+
+for icondir in $D/usr/share/icons/*/ ; do
+ if [ -d $icondir ] ; then
+ gtk-update-icon-cache -fqt $icondir
+ fi
+done
+
diff --git a/scripts/postinst-intercepts/update_gtk_immodules_cache b/scripts/postinst-intercepts/update_gtk_immodules_cache
new file mode 100644
index 0000000000..9f07ccca6b
--- /dev/null
+++ b/scripts/postinst-intercepts/update_gtk_immodules_cache
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
+
+set -e
+
+if [ -x $D${libexecdir}/${binprefix}gtk-query-immodules-2.0 ]; then
+ PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gtk-query-immodules-2.0 \
+ > $D${libdir}/gtk-2.0/2.10.0/immodules.cache &&
+ sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
+ chown root:root $D${libdir}/gtk-2.0/2.10.0/immodules.cache
+fi
+if [ -x $D${libexecdir}/${binprefix}gtk-query-immodules-3.0 ]; then
+ PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gtk-query-immodules-3.0 \
+ > $D${libdir}/gtk-3.0/3.0.0/immodules.cache &&
+ sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
+ chown root:root $D${libdir}/gtk-3.0/3.0.0/immodules.cache
+fi
diff --git a/scripts/postinst-intercepts/update_icon_cache b/scripts/postinst-intercepts/update_icon_cache
deleted file mode 100644
index 9cf2a72a0c..0000000000
--- a/scripts/postinst-intercepts/update_icon_cache
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# update native pixbuf loaders
-$STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache
-
-for icondir in $D/usr/share/icons/*/ ; do
- if [ -d $icondir ] ; then
- gtk-update-icon-cache -fqt $icondir
- fi
-done
-
diff --git a/scripts/postinst-intercepts/update_pixbuf_cache b/scripts/postinst-intercepts/update_pixbuf_cache
index 5d44075fb4..ea12814474 100644
--- a/scripts/postinst-intercepts/update_pixbuf_cache
+++ b/scripts/postinst-intercepts/update_pixbuf_cache
@@ -1,11 +1,13 @@
#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
set -e
export GDK_PIXBUF_MODULEDIR=$D${libdir}/gdk-pixbuf-2.0/2.10.0/loaders
export GDK_PIXBUF_FATAL_LOADER=1
-PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\
- $D${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
+PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
>$GDK_PIXBUF_MODULEDIR/../loaders.cache && \
sed -i -e "s:$D::g" $GDK_PIXBUF_MODULEDIR/../loaders.cache
diff --git a/scripts/postinst-intercepts/update_udev_hwdb b/scripts/postinst-intercepts/update_udev_hwdb
new file mode 100644
index 0000000000..c4fb2bffcb
--- /dev/null
+++ b/scripts/postinst-intercepts/update_udev_hwdb
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
+
+set -e
+
+PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D
+chown root:root $D${sysconfdir}/udev/hwdb.bin
diff --git a/scripts/pybootchartgui/pybootchartgui.py b/scripts/pybootchartgui/pybootchartgui.py
index 7ce1a5be40..1c4062b42c 100755
--- a/scripts/pybootchartgui/pybootchartgui.py
+++ b/scripts/pybootchartgui/pybootchartgui.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# This file is part of pybootchartgui.
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 8c574be50c..add5c53882 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -19,22 +19,23 @@ import math
import re
import random
import colorsys
+import functools
from operator import itemgetter
class RenderOptions:
- def __init__(self, app_options):
- # should we render a cumulative CPU time chart
- self.cumulative = True
- self.charts = True
- self.kernel_only = False
- self.app_options = app_options
+ def __init__(self, app_options):
+ # should we render a cumulative CPU time chart
+ self.cumulative = True
+ self.charts = True
+ self.kernel_only = False
+ self.app_options = app_options
- def proc_tree (self, trace):
- if self.kernel_only:
- return trace.kernel_tree
- else:
- return trace.proc_tree
+ def proc_tree (self, trace):
+ if self.kernel_only:
+ return trace.kernel_tree
+ else:
+ return trace.proc_tree
# Process tree background color.
BACK_COLOR = (1.0, 1.0, 1.0, 1.0)
@@ -133,6 +134,16 @@ TASK_COLOR_PACKAGE = (0.0, 1.00, 1.00, 1.0)
# Package Write RPM/DEB/IPK task color
TASK_COLOR_PACKAGE_WRITE = (0.0, 0.50, 0.50, 1.0)
+# Distinct colors used for different disk volumnes.
+# If we have more volumns, colors get re-used.
+VOLUME_COLORS = [
+ (1.0, 1.0, 0.00, 1.0),
+ (0.0, 1.00, 0.00, 1.0),
+ (1.0, 0.00, 1.00, 1.0),
+ (0.0, 0.00, 1.00, 1.0),
+ (0.0, 1.00, 1.00, 1.0),
+]
+
# Process states
STATE_UNDEFINED = 0
STATE_RUNNING = 1
@@ -142,7 +153,7 @@ STATE_STOPPED = 4
STATE_ZOMBIE = 5
STATE_COLORS = [(0, 0, 0, 0), PROC_COLOR_R, PROC_COLOR_S, PROC_COLOR_D, \
- PROC_COLOR_T, PROC_COLOR_Z, PROC_COLOR_X, PROC_COLOR_W]
+ PROC_COLOR_T, PROC_COLOR_Z, PROC_COLOR_X, PROC_COLOR_W]
# CumulativeStats Types
STAT_TYPE_CPU = 0
@@ -150,80 +161,80 @@ STAT_TYPE_IO = 1
# Convert ps process state to an int
def get_proc_state(flag):
- return "RSDTZXW".find(flag) + 1
+ return "RSDTZXW".find(flag) + 1
def draw_text(ctx, text, color, x, y):
- ctx.set_source_rgba(*color)
- ctx.move_to(x, y)
- ctx.show_text(text)
+ ctx.set_source_rgba(*color)
+ ctx.move_to(x, y)
+ ctx.show_text(text)
def draw_fill_rect(ctx, color, rect):
- ctx.set_source_rgba(*color)
- ctx.rectangle(*rect)
- ctx.fill()
+ ctx.set_source_rgba(*color)
+ ctx.rectangle(*rect)
+ ctx.fill()
def draw_rect(ctx, color, rect):
- ctx.set_source_rgba(*color)
- ctx.rectangle(*rect)
- ctx.stroke()
+ ctx.set_source_rgba(*color)
+ ctx.rectangle(*rect)
+ ctx.stroke()
def draw_legend_box(ctx, label, fill_color, x, y, s):
- draw_fill_rect(ctx, fill_color, (x, y - s, s, s))
- draw_rect(ctx, PROC_BORDER_COLOR, (x, y - s, s, s))
- draw_text(ctx, label, TEXT_COLOR, x + s + 5, y)
+ draw_fill_rect(ctx, fill_color, (x, y - s, s, s))
+ draw_rect(ctx, PROC_BORDER_COLOR, (x, y - s, s, s))
+ draw_text(ctx, label, TEXT_COLOR, x + s + 5, y)
def draw_legend_line(ctx, label, fill_color, x, y, s):
- draw_fill_rect(ctx, fill_color, (x, y - s/2, s + 1, 3))
- ctx.arc(x + (s + 1)/2.0, y - (s - 3)/2.0, 2.5, 0, 2.0 * math.pi)
- ctx.fill()
- draw_text(ctx, label, TEXT_COLOR, x + s + 5, y)
+ draw_fill_rect(ctx, fill_color, (x, y - s/2, s + 1, 3))
+ ctx.arc(x + (s + 1)/2.0, y - (s - 3)/2.0, 2.5, 0, 2.0 * math.pi)
+ ctx.fill()
+ draw_text(ctx, label, TEXT_COLOR, x + s + 5, y)
def draw_label_in_box(ctx, color, label, x, y, w, maxx):
- label_w = ctx.text_extents(label)[2]
- label_x = x + w / 2 - label_w / 2
- if label_w + 10 > w:
- label_x = x + w + 5
- if label_x + label_w > maxx:
- label_x = x - label_w - 5
- draw_text(ctx, label, color, label_x, y)
+ label_w = ctx.text_extents(label)[2]
+ label_x = x + w / 2 - label_w / 2
+ if label_w + 10 > w:
+ label_x = x + w + 5
+ if label_x + label_w > maxx:
+ label_x = x - label_w - 5
+ draw_text(ctx, label, color, label_x, y)
def draw_sec_labels(ctx, options, rect, sec_w, nsecs):
- ctx.set_font_size(AXIS_FONT_SIZE)
- prev_x = 0
- for i in range(0, rect[2] + 1, sec_w):
- if ((i / sec_w) % nsecs == 0) :
- if options.app_options.as_minutes :
- label = "%.1f" % (i / sec_w / 60.0)
- else :
- label = "%d" % (i / sec_w)
- label_w = ctx.text_extents(label)[2]
- x = rect[0] + i - label_w/2
- if x >= prev_x:
- draw_text(ctx, label, TEXT_COLOR, x, rect[1] - 2)
- prev_x = x + label_w
+ ctx.set_font_size(AXIS_FONT_SIZE)
+ prev_x = 0
+ for i in range(0, rect[2] + 1, sec_w):
+ if ((i / sec_w) % nsecs == 0) :
+ if options.app_options.as_minutes :
+ label = "%.1f" % (i / sec_w / 60.0)
+ else :
+ label = "%d" % (i / sec_w)
+ label_w = ctx.text_extents(label)[2]
+ x = rect[0] + i - label_w/2
+ if x >= prev_x:
+ draw_text(ctx, label, TEXT_COLOR, x, rect[1] - 2)
+ prev_x = x + label_w
def draw_box_ticks(ctx, rect, sec_w):
- draw_rect(ctx, BORDER_COLOR, tuple(rect))
-
- ctx.set_line_cap(cairo.LINE_CAP_SQUARE)
-
- for i in range(sec_w, rect[2] + 1, sec_w):
- if ((i / sec_w) % 10 == 0) :
- ctx.set_line_width(1.5)
- elif sec_w < 5 :
- continue
- else :
- ctx.set_line_width(1.0)
- if ((i / sec_w) % 30 == 0) :
- ctx.set_source_rgba(*TICK_COLOR_BOLD)
- else :
- ctx.set_source_rgba(*TICK_COLOR)
- ctx.move_to(rect[0] + i, rect[1] + 1)
- ctx.line_to(rect[0] + i, rect[1] + rect[3] - 1)
- ctx.stroke()
- ctx.set_line_width(1.0)
-
- ctx.set_line_cap(cairo.LINE_CAP_BUTT)
+ draw_rect(ctx, BORDER_COLOR, tuple(rect))
+
+ ctx.set_line_cap(cairo.LINE_CAP_SQUARE)
+
+ for i in range(sec_w, rect[2] + 1, sec_w):
+ if ((i / sec_w) % 10 == 0) :
+ ctx.set_line_width(1.5)
+ elif sec_w < 5 :
+ continue
+ else :
+ ctx.set_line_width(1.0)
+ if ((i / sec_w) % 30 == 0) :
+ ctx.set_source_rgba(*TICK_COLOR_BOLD)
+ else :
+ ctx.set_source_rgba(*TICK_COLOR)
+ ctx.move_to(rect[0] + i, rect[1] + 1)
+ ctx.line_to(rect[0] + i, rect[1] + rect[3] - 1)
+ ctx.stroke()
+ ctx.set_line_width(1.0)
+
+ ctx.set_line_cap(cairo.LINE_CAP_BUTT)
def draw_annotations(ctx, proc_tree, times, rect):
ctx.set_line_cap(cairo.LINE_CAP_SQUARE)
@@ -242,51 +253,51 @@ def draw_annotations(ctx, proc_tree, times, rect):
ctx.set_dash([])
def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
- ctx.set_line_width(0.5)
- x_shift = proc_tree.start_time
-
- def transform_point_coords(point, x_base, y_base, \
- xscale, yscale, x_trans, y_trans):
- x = (point[0] - x_base) * xscale + x_trans
- y = (point[1] - y_base) * -yscale + y_trans + chart_bounds[3]
- return x, y
-
- max_x = max (x for (x, y) in data)
- max_y = max (y for (x, y) in data)
- # avoid divide by zero
- if max_y == 0:
- max_y = 1.0
- xscale = float (chart_bounds[2]) / max_x
- # If data_range is given, scale the chart so that the value range in
- # data_range matches the chart bounds exactly.
- # Otherwise, scale so that the actual data matches the chart bounds.
- if data_range:
- yscale = float(chart_bounds[3]) / (data_range[1] - data_range[0])
- ybase = data_range[0]
- else:
- yscale = float(chart_bounds[3]) / max_y
- ybase = 0
-
- first = transform_point_coords (data[0], x_shift, ybase, xscale, yscale, \
- chart_bounds[0], chart_bounds[1])
- last = transform_point_coords (data[-1], x_shift, ybase, xscale, yscale, \
- chart_bounds[0], chart_bounds[1])
-
- ctx.set_source_rgba(*color)
- ctx.move_to(*first)
- for point in data:
- x, y = transform_point_coords (point, x_shift, ybase, xscale, yscale, \
- chart_bounds[0], chart_bounds[1])
- ctx.line_to(x, y)
- if fill:
- ctx.stroke_preserve()
- ctx.line_to(last[0], chart_bounds[1]+chart_bounds[3])
- ctx.line_to(first[0], chart_bounds[1]+chart_bounds[3])
- ctx.line_to(first[0], first[1])
- ctx.fill()
- else:
- ctx.stroke()
- ctx.set_line_width(1.0)
+ ctx.set_line_width(0.5)
+ x_shift = proc_tree.start_time
+
+ def transform_point_coords(point, x_base, y_base, \
+ xscale, yscale, x_trans, y_trans):
+ x = (point[0] - x_base) * xscale + x_trans
+ y = (point[1] - y_base) * -yscale + y_trans + chart_bounds[3]
+ return x, y
+
+ max_x = max (x for (x, y) in data)
+ max_y = max (y for (x, y) in data)
+ # avoid divide by zero
+ if max_y == 0:
+ max_y = 1.0
+ xscale = float (chart_bounds[2]) / (max_x - x_shift)
+ # If data_range is given, scale the chart so that the value range in
+ # data_range matches the chart bounds exactly.
+ # Otherwise, scale so that the actual data matches the chart bounds.
+ if data_range:
+ yscale = float(chart_bounds[3]) / (data_range[1] - data_range[0])
+ ybase = data_range[0]
+ else:
+ yscale = float(chart_bounds[3]) / max_y
+ ybase = 0
+
+ first = transform_point_coords (data[0], x_shift, ybase, xscale, yscale, \
+ chart_bounds[0], chart_bounds[1])
+ last = transform_point_coords (data[-1], x_shift, ybase, xscale, yscale, \
+ chart_bounds[0], chart_bounds[1])
+
+ ctx.set_source_rgba(*color)
+ ctx.move_to(*first)
+ for point in data:
+ x, y = transform_point_coords (point, x_shift, ybase, xscale, yscale, \
+ chart_bounds[0], chart_bounds[1])
+ ctx.line_to(x, y)
+ if fill:
+ ctx.stroke_preserve()
+ ctx.line_to(last[0], chart_bounds[1]+chart_bounds[3])
+ ctx.line_to(first[0], chart_bounds[1]+chart_bounds[3])
+ ctx.line_to(first[0], first[1])
+ ctx.fill()
+ else:
+ ctx.stroke()
+ ctx.set_line_width(1.0)
bar_h = 55
meminfo_bar_h = 2 * bar_h
@@ -301,274 +312,344 @@ CUML_HEIGHT = 2000 # Increased value to accomodate CPU and I/O Graphs
OPTIONS = None
def extents(options, xscale, trace):
- start = min(trace.start.keys())
- end = start
-
- processes = 0
- for proc in trace.processes:
- if not options.app_options.show_all and \
- trace.processes[proc][1] - trace.processes[proc][0] < options.app_options.mintime:
- continue
-
- if trace.processes[proc][1] > end:
- end = trace.processes[proc][1]
- processes += 1
-
- if trace.min is not None and trace.max is not None:
- start = trace.min
- end = trace.max
-
- w = int ((end - start) * sec_w_base * xscale) + 2 * off_x
- h = proc_h * processes + header_h + 2 * off_y
-
- return (w, h)
+ start = min(trace.start.keys())
+ end = start
+
+ processes = 0
+ for proc in trace.processes:
+ if not options.app_options.show_all and \
+ trace.processes[proc][1] - trace.processes[proc][0] < options.app_options.mintime:
+ continue
+
+ if trace.processes[proc][1] > end:
+ end = trace.processes[proc][1]
+ processes += 1
+
+ if trace.min is not None and trace.max is not None:
+ start = trace.min
+ end = trace.max
+
+ w = int ((end - start) * sec_w_base * xscale) + 2 * off_x
+ h = proc_h * processes + header_h + 2 * off_y
+
+ if options.charts:
+ if trace.cpu_stats:
+ h += 30 + bar_h
+ if trace.disk_stats:
+ h += 30 + bar_h
+ if trace.monitor_disk:
+ h += 30 + bar_h
+ if trace.mem_stats:
+ h += meminfo_bar_h
+
+ # Allow for width of process legend and offset
+ if w < (720 + off_x):
+ w = 720 + off_x
+
+ return (w, h)
def clip_visible(clip, rect):
- xmax = max (clip[0], rect[0])
- ymax = max (clip[1], rect[1])
- xmin = min (clip[0] + clip[2], rect[0] + rect[2])
- ymin = min (clip[1] + clip[3], rect[1] + rect[3])
- return (xmin > xmax and ymin > ymax)
+ xmax = max (clip[0], rect[0])
+ ymax = max (clip[1], rect[1])
+ xmin = min (clip[0] + clip[2], rect[0] + rect[2])
+ ymin = min (clip[1] + clip[3], rect[1] + rect[3])
+ return (xmin > xmax and ymin > ymax)
def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
- proc_tree = options.proc_tree(trace)
-
- # render bar legend
- ctx.set_font_size(LEGEND_FONT_SIZE)
-
- draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s)
- draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s)
-
- # render I/O wait
- chart_rect = (off_x, curr_y+30, w, bar_h)
- if clip_visible (clip, chart_rect):
- draw_box_ticks (ctx, chart_rect, sec_w)
- draw_annotations (ctx, proc_tree, trace.times, chart_rect)
- draw_chart (ctx, IO_COLOR, True, chart_rect, \
- [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \
- proc_tree, None)
- # render CPU load
- draw_chart (ctx, CPU_COLOR, True, chart_rect, \
- [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \
- proc_tree, None)
-
- curr_y = curr_y + 30 + bar_h
-
- # render second chart
- draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, off_x, curr_y+20, leg_s)
- draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, curr_y+20, leg_s)
+ proc_tree = options.proc_tree(trace)
+
+ # render bar legend
+ if trace.cpu_stats:
+ ctx.set_font_size(LEGEND_FONT_SIZE)
+
+ draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s)
+ draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s)
+
+ # render I/O wait
+ chart_rect = (off_x, curr_y+30, w, bar_h)
+ if clip_visible (clip, chart_rect):
+ draw_box_ticks (ctx, chart_rect, sec_w)
+ draw_annotations (ctx, proc_tree, trace.times, chart_rect)
+ draw_chart (ctx, IO_COLOR, True, chart_rect, \
+ [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \
+ proc_tree, None)
+ # render CPU load
+ draw_chart (ctx, CPU_COLOR, True, chart_rect, \
+ [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \
+ proc_tree, None)
+
+ curr_y = curr_y + 30 + bar_h
+
+ # render second chart
+ if trace.disk_stats:
+ draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, off_x, curr_y+20, leg_s)
+ draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, curr_y+20, leg_s)
# render I/O utilization
- chart_rect = (off_x, curr_y+30, w, bar_h)
- if clip_visible (clip, chart_rect):
- draw_box_ticks (ctx, chart_rect, sec_w)
- draw_annotations (ctx, proc_tree, trace.times, chart_rect)
- draw_chart (ctx, IO_COLOR, True, chart_rect, \
- [(sample.time, sample.util) for sample in trace.disk_stats], \
- proc_tree, None)
-
- # render disk throughput
- max_sample = max (trace.disk_stats, key = lambda s: s.tput)
- if clip_visible (clip, chart_rect):
- draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect, \
- [(sample.time, sample.tput) for sample in trace.disk_stats], \
- proc_tree, None)
-
- pos_x = off_x + ((max_sample.time - proc_tree.start_time) * w / proc_tree.duration)
-
- shift_x, shift_y = -20, 20
- if (pos_x < off_x + 245):
- shift_x, shift_y = 5, 40
-
- label = "%dMB/s" % round ((max_sample.tput) / 1024.0)
- draw_text (ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + shift_y)
-
- curr_y = curr_y + 30 + bar_h
-
- # render mem usage
- chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
- mem_stats = trace.mem_stats
- if mem_stats and clip_visible (clip, chart_rect):
- mem_scale = max(sample.records['MemTotal'] - sample.records['MemFree'] for sample in mem_stats)
- draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s)
- draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y+20, leg_s)
- draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, curr_y+20, leg_s)
- draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.records['SwapTotal'] - sample.records['SwapFree'])/1024 for sample in mem_stats]), \
- MEM_SWAP_COLOR, off_x + 480, curr_y+20, leg_s)
- draw_box_ticks(ctx, chart_rect, sec_w)
- draw_annotations(ctx, proc_tree, trace.times, chart_rect)
- draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect, \
- [(sample.time, sample.records['MemTotal'] - sample.records['MemFree']) for sample in trace.mem_stats], \
- proc_tree, [0, mem_scale])
- draw_chart(ctx, MEM_USED_COLOR, True, chart_rect, \
- [(sample.time, sample.records['MemTotal'] - sample.records['MemFree'] - sample.records['Buffers']) for sample in mem_stats], \
- proc_tree, [0, mem_scale])
- draw_chart(ctx, MEM_CACHED_COLOR, True, chart_rect, \
- [(sample.time, sample.records['Cached']) for sample in mem_stats], \
- proc_tree, [0, mem_scale])
- draw_chart(ctx, MEM_SWAP_COLOR, False, chart_rect, \
- [(sample.time, float(sample.records['SwapTotal'] - sample.records['SwapFree'])) for sample in mem_stats], \
- proc_tree, None)
-
- curr_y = curr_y + meminfo_bar_h
-
- return curr_y
+ chart_rect = (off_x, curr_y+30, w, bar_h)
+ if clip_visible (clip, chart_rect):
+ draw_box_ticks (ctx, chart_rect, sec_w)
+ draw_annotations (ctx, proc_tree, trace.times, chart_rect)
+ draw_chart (ctx, IO_COLOR, True, chart_rect, \
+ [(sample.time, sample.util) for sample in trace.disk_stats], \
+ proc_tree, None)
+
+ # render disk throughput
+ max_sample = max (trace.disk_stats, key = lambda s: s.tput)
+ if clip_visible (clip, chart_rect):
+ draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect, \
+ [(sample.time, sample.tput) for sample in trace.disk_stats], \
+ proc_tree, None)
+
+ pos_x = off_x + ((max_sample.time - proc_tree.start_time) * w / proc_tree.duration)
+
+ shift_x, shift_y = -20, 20
+ if (pos_x < off_x + 245):
+ shift_x, shift_y = 5, 40
+
+ label = "%dMB/s" % round ((max_sample.tput) / 1024.0)
+ draw_text (ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + shift_y)
+
+ curr_y = curr_y + 30 + bar_h
+
+ # render disk space usage
+ #
+ # Draws the amount of disk space used on each volume relative to the
+ # lowest recorded amount. The graphs for each volume are stacked above
+ # each other so that total disk usage is visible.
+ if trace.monitor_disk:
+ ctx.set_font_size(LEGEND_FONT_SIZE)
+ # Determine set of volumes for which we have
+ # information and the minimal amount of used disk
+ # space for each. Currently samples are allowed to
+ # not have a values for all volumes; drawing could be
+ # made more efficient if that wasn't the case.
+ volumes = set()
+ min_used = {}
+ for sample in trace.monitor_disk:
+ for volume, used in sample.records.items():
+ volumes.add(volume)
+ if volume not in min_used or min_used[volume] > used:
+ min_used[volume] = used
+ volumes = sorted(list(volumes))
+ disk_scale = 0
+ for i, volume in enumerate(volumes):
+ volume_scale = max([sample.records[volume] - min_used[volume]
+ for sample in trace.monitor_disk
+ if volume in sample.records])
+ # Does not take length of volume name into account, but fixed offset
+ # works okay in practice.
+ draw_legend_box(ctx, '%s (max: %u MiB)' % (volume, volume_scale / 1024 / 1024),
+ VOLUME_COLORS[i % len(VOLUME_COLORS)],
+ off_x + i * 250, curr_y+20, leg_s)
+ disk_scale += volume_scale
+
+ # render used amount of disk space
+ chart_rect = (off_x, curr_y+30, w, bar_h)
+ if clip_visible (clip, chart_rect):
+ draw_box_ticks (ctx, chart_rect, sec_w)
+ draw_annotations (ctx, proc_tree, trace.times, chart_rect)
+ for i in range(len(volumes), 0, -1):
+ draw_chart (ctx, VOLUME_COLORS[(i - 1) % len(VOLUME_COLORS)], True, chart_rect, \
+ [(sample.time,
+ # Sum up used space of all volumes including the current one
+ # so that the graphs appear as stacked on top of each other.
+ functools.reduce(lambda x,y: x+y,
+ [sample.records[volume] - min_used[volume]
+ for volume in volumes[0:i]
+ if volume in sample.records],
+ 0))
+ for sample in trace.monitor_disk], \
+ proc_tree, [0, disk_scale])
+
+ curr_y = curr_y + 30 + bar_h
+
+ # render mem usage
+ chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
+ mem_stats = trace.mem_stats
+ if mem_stats and clip_visible (clip, chart_rect):
+ mem_scale = max(sample.buffers for sample in mem_stats)
+ draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s)
+ draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y+20, leg_s)
+ draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, curr_y+20, leg_s)
+ draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.swap)/1024 for sample in mem_stats]), \
+ MEM_SWAP_COLOR, off_x + 480, curr_y+20, leg_s)
+ draw_box_ticks(ctx, chart_rect, sec_w)
+ draw_annotations(ctx, proc_tree, trace.times, chart_rect)
+ draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect, \
+ [(sample.time, sample.buffers) for sample in trace.mem_stats], \
+ proc_tree, [0, mem_scale])
+ draw_chart(ctx, MEM_USED_COLOR, True, chart_rect, \
+ [(sample.time, sample.used) for sample in mem_stats], \
+ proc_tree, [0, mem_scale])
+ draw_chart(ctx, MEM_CACHED_COLOR, True, chart_rect, \
+ [(sample.time, sample.cached) for sample in mem_stats], \
+ proc_tree, [0, mem_scale])
+ draw_chart(ctx, MEM_SWAP_COLOR, False, chart_rect, \
+ [(sample.time, float(sample.swap)) for sample in mem_stats], \
+ proc_tree, None)
+
+ curr_y = curr_y + meminfo_bar_h
+
+ return curr_y
def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
- chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - (curr_y+header_h) + proc_h]
-
- draw_legend_box (ctx, "Configure", \
- TASK_COLOR_CONFIGURE, off_x , curr_y + 45, leg_s)
- draw_legend_box (ctx, "Compile", \
- TASK_COLOR_COMPILE, off_x+120, curr_y + 45, leg_s)
- draw_legend_box (ctx, "Install", \
- TASK_COLOR_INSTALL, off_x+240, curr_y + 45, leg_s)
- draw_legend_box (ctx, "Populate Sysroot", \
- TASK_COLOR_SYSROOT, off_x+360, curr_y + 45, leg_s)
- draw_legend_box (ctx, "Package", \
- TASK_COLOR_PACKAGE, off_x+480, curr_y + 45, leg_s)
- draw_legend_box (ctx, "Package Write",
- TASK_COLOR_PACKAGE_WRITE, off_x+600, curr_y + 45, leg_s)
-
- ctx.set_font_size(PROC_TEXT_FONT_SIZE)
-
- draw_box_ticks(ctx, chart_rect, sec_w)
- draw_sec_labels(ctx, options, chart_rect, sec_w, 30)
-
- y = curr_y+header_h
-
- offset = trace.min or min(trace.start.keys())
- for s in sorted(trace.start.keys()):
- for val in sorted(trace.start[s]):
- if not options.app_options.show_all and \
- trace.processes[val][1] - s < options.app_options.mintime:
- continue
- task = val.split(":")[1]
- #print val
- #print trace.processes[val][1]
- #print s
- x = chart_rect[0] + (s - offset) * sec_w
- w = ((trace.processes[val][1] - s) * sec_w)
-
- #print "proc at %s %s %s %s" % (x, y, w, proc_h)
- col = None
- if task == "do_compile":
- col = TASK_COLOR_COMPILE
- elif task == "do_configure":
- col = TASK_COLOR_CONFIGURE
- elif task == "do_install":
- col = TASK_COLOR_INSTALL
- elif task == "do_populate_sysroot":
- col = TASK_COLOR_SYSROOT
- elif task == "do_package":
- col = TASK_COLOR_PACKAGE
- elif task == "do_package_write_rpm" or \
+ chart_rect = [off_x, curr_y+header_h, w, h - curr_y - 1 * off_y - header_h ]
+
+ draw_legend_box (ctx, "Configure", \
+ TASK_COLOR_CONFIGURE, off_x , curr_y + 45, leg_s)
+ draw_legend_box (ctx, "Compile", \
+ TASK_COLOR_COMPILE, off_x+120, curr_y + 45, leg_s)
+ draw_legend_box (ctx, "Install", \
+ TASK_COLOR_INSTALL, off_x+240, curr_y + 45, leg_s)
+ draw_legend_box (ctx, "Populate Sysroot", \
+ TASK_COLOR_SYSROOT, off_x+360, curr_y + 45, leg_s)
+ draw_legend_box (ctx, "Package", \
+ TASK_COLOR_PACKAGE, off_x+480, curr_y + 45, leg_s)
+ draw_legend_box (ctx, "Package Write", \
+ TASK_COLOR_PACKAGE_WRITE, off_x+600, curr_y + 45, leg_s)
+
+ ctx.set_font_size(PROC_TEXT_FONT_SIZE)
+
+ draw_box_ticks(ctx, chart_rect, sec_w)
+ draw_sec_labels(ctx, options, chart_rect, sec_w, 30)
+
+ y = curr_y+header_h
+
+ offset = trace.min or min(trace.start.keys())
+ for start in sorted(trace.start.keys()):
+ for process in sorted(trace.start[start]):
+ if not options.app_options.show_all and \
+ trace.processes[process][1] - start < options.app_options.mintime:
+ continue
+ task = process.split(":")[1]
+
+ #print(process)
+ #print(trace.processes[process][1])
+ #print(s)
+
+ x = chart_rect[0] + (start - offset) * sec_w
+ w = ((trace.processes[process][1] - start) * sec_w)
+
+ #print("proc at %s %s %s %s" % (x, y, w, proc_h))
+ col = None
+ if task == "do_compile":
+ col = TASK_COLOR_COMPILE
+ elif task == "do_configure":
+ col = TASK_COLOR_CONFIGURE
+ elif task == "do_install":
+ col = TASK_COLOR_INSTALL
+ elif task == "do_populate_sysroot":
+ col = TASK_COLOR_SYSROOT
+ elif task == "do_package":
+ col = TASK_COLOR_PACKAGE
+ elif task == "do_package_write_rpm" or \
task == "do_package_write_deb" or \
task == "do_package_write_ipk":
- col = TASK_COLOR_PACKAGE_WRITE
- else:
- col = WHITE
+ col = TASK_COLOR_PACKAGE_WRITE
+ else:
+ col = WHITE
- if col:
- draw_fill_rect(ctx, col, (x, y, w, proc_h))
- draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h))
+ if col:
+ draw_fill_rect(ctx, col, (x, y, w, proc_h))
+ draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h))
- draw_label_in_box(ctx, PROC_TEXT_COLOR, val, x, y + proc_h - 4, w, proc_h)
- y = y + proc_h
+ draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h)
+ y = y + proc_h
- return curr_y
+ return curr_y
#
# Render the chart.
#
def render(ctx, options, xscale, trace):
- (w, h) = extents (options, xscale, trace)
- global OPTIONS
- OPTIONS = options.app_options
+ (w, h) = extents (options, xscale, trace)
+ global OPTIONS
+ OPTIONS = options.app_options
- # x, y, w, h
- clip = ctx.clip_extents()
+ # x, y, w, h
+ clip = ctx.clip_extents()
- sec_w = int (xscale * sec_w_base)
- ctx.set_line_width(1.0)
- ctx.select_font_face(FONT_NAME)
- draw_fill_rect(ctx, WHITE, (0, 0, max(w, MIN_IMG_W), h))
- w -= 2*off_x
- curr_y = off_y;
+ sec_w = int (xscale * sec_w_base)
+ ctx.set_line_width(1.0)
+ ctx.select_font_face(FONT_NAME)
+ draw_fill_rect(ctx, WHITE, (0, 0, max(w, MIN_IMG_W), h))
+ w -= 2*off_x
+ curr_y = off_y;
- curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w)
+ if options.charts:
+ curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
- return
+ curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w)
- proc_tree = options.proc_tree (trace)
+ return
- # draw the title and headers
- if proc_tree.idle:
- duration = proc_tree.idle
- else:
- duration = proc_tree.duration
+ proc_tree = options.proc_tree (trace)
- if not options.kernel_only:
- curr_y = draw_header (ctx, trace.headers, duration)
- else:
- curr_y = off_y;
+ # draw the title and headers
+ if proc_tree.idle:
+ duration = proc_tree.idle
+ else:
+ duration = proc_tree.duration
- if options.charts:
- curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
+ if not options.kernel_only:
+ curr_y = draw_header (ctx, trace.headers, duration)
+ else:
+ curr_y = off_y;
- # draw process boxes
- proc_height = h
- if proc_tree.taskstats and options.cumulative:
- proc_height -= CUML_HEIGHT
+ # draw process boxes
+ proc_height = h
+ if proc_tree.taskstats and options.cumulative:
+ proc_height -= CUML_HEIGHT
- draw_process_bar_chart(ctx, clip, options, proc_tree, trace.times,
- curr_y, w, proc_height, sec_w)
+ draw_process_bar_chart(ctx, clip, options, proc_tree, trace.times,
+ curr_y, w, proc_height, sec_w)
- curr_y = proc_height
- ctx.set_font_size(SIG_FONT_SIZE)
- draw_text(ctx, SIGNATURE, SIG_COLOR, off_x + 5, proc_height - 8)
+ curr_y = proc_height
+ ctx.set_font_size(SIG_FONT_SIZE)
+ draw_text(ctx, SIGNATURE, SIG_COLOR, off_x + 5, proc_height - 8)
- # draw a cumulative CPU-time-per-process graph
- if proc_tree.taskstats and options.cumulative:
- cuml_rect = (off_x, curr_y + off_y, w, CUML_HEIGHT/2 - off_y * 2)
- if clip_visible (clip, cuml_rect):
- draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_CPU)
+ # draw a cumulative CPU-time-per-process graph
+ if proc_tree.taskstats and options.cumulative:
+ cuml_rect = (off_x, curr_y + off_y, w, CUML_HEIGHT/2 - off_y * 2)
+ if clip_visible (clip, cuml_rect):
+ draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_CPU)
- # draw a cumulative I/O-time-per-process graph
- if proc_tree.taskstats and options.cumulative:
- cuml_rect = (off_x, curr_y + off_y * 100, w, CUML_HEIGHT/2 - off_y * 2)
- if clip_visible (clip, cuml_rect):
- draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_IO)
+ # draw a cumulative I/O-time-per-process graph
+ if proc_tree.taskstats and options.cumulative:
+ cuml_rect = (off_x, curr_y + off_y * 100, w, CUML_HEIGHT/2 - off_y * 2)
+ if clip_visible (clip, cuml_rect):
+ draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_IO)
def draw_process_bar_chart(ctx, clip, options, proc_tree, times, curr_y, w, h, sec_w):
- header_size = 0
- if not options.kernel_only:
- draw_legend_box (ctx, "Running (%cpu)",
- PROC_COLOR_R, off_x , curr_y + 45, leg_s)
- draw_legend_box (ctx, "Unint.sleep (I/O)",
- PROC_COLOR_D, off_x+120, curr_y + 45, leg_s)
- draw_legend_box (ctx, "Sleeping",
- PROC_COLOR_S, off_x+240, curr_y + 45, leg_s)
- draw_legend_box (ctx, "Zombie",
- PROC_COLOR_Z, off_x+360, curr_y + 45, leg_s)
- header_size = 45
-
- chart_rect = [off_x, curr_y + header_size + 15,
- w, h - 2 * off_y - (curr_y + header_size + 15) + proc_h]
- ctx.set_font_size (PROC_TEXT_FONT_SIZE)
-
- draw_box_ticks (ctx, chart_rect, sec_w)
- if sec_w > 100:
- nsec = 1
- else:
- nsec = 5
- draw_sec_labels (ctx, options, chart_rect, sec_w, nsec)
- draw_annotations (ctx, proc_tree, times, chart_rect)
-
- y = curr_y + 60
- for root in proc_tree.process_tree:
- draw_processes_recursively(ctx, root, proc_tree, y, proc_h, chart_rect, clip)
- y = y + proc_h * proc_tree.num_nodes([root])
+ header_size = 0
+ if not options.kernel_only:
+ draw_legend_box (ctx, "Running (%cpu)",
+ PROC_COLOR_R, off_x , curr_y + 45, leg_s)
+ draw_legend_box (ctx, "Unint.sleep (I/O)",
+ PROC_COLOR_D, off_x+120, curr_y + 45, leg_s)
+ draw_legend_box (ctx, "Sleeping",
+ PROC_COLOR_S, off_x+240, curr_y + 45, leg_s)
+ draw_legend_box (ctx, "Zombie",
+ PROC_COLOR_Z, off_x+360, curr_y + 45, leg_s)
+ header_size = 45
+
+ chart_rect = [off_x, curr_y + header_size + 15,
+ w, h - 2 * off_y - (curr_y + header_size + 15) + proc_h]
+ ctx.set_font_size (PROC_TEXT_FONT_SIZE)
+
+ draw_box_ticks (ctx, chart_rect, sec_w)
+ if sec_w > 100:
+ nsec = 1
+ else:
+ nsec = 5
+ draw_sec_labels (ctx, options, chart_rect, sec_w, nsec)
+ draw_annotations (ctx, proc_tree, times, chart_rect)
+
+ y = curr_y + 60
+ for root in proc_tree.process_tree:
+ draw_processes_recursively(ctx, root, proc_tree, y, proc_h, chart_rect, clip)
+ y = y + proc_h * proc_tree.num_nodes([root])
def draw_header (ctx, headers, duration):
@@ -604,291 +685,291 @@ def draw_header (ctx, headers, duration):
return header_y
def draw_processes_recursively(ctx, proc, proc_tree, y, proc_h, rect, clip) :
- x = rect[0] + ((proc.start_time - proc_tree.start_time) * rect[2] / proc_tree.duration)
- w = ((proc.duration) * rect[2] / proc_tree.duration)
-
- draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, clip)
- draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h))
- ipid = int(proc.pid)
- if not OPTIONS.show_all:
- cmdString = proc.cmd
- else:
- cmdString = ''
- if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0:
- cmdString = cmdString + " [" + str(ipid // 1000) + "]"
- if OPTIONS.show_all:
- if proc.args:
- cmdString = cmdString + " '" + "' '".join(proc.args) + "'"
- else:
- cmdString = cmdString + " " + proc.exe
-
- draw_label_in_box(ctx, PROC_TEXT_COLOR, cmdString, x, y + proc_h - 4, w, rect[0] + rect[2])
-
- next_y = y + proc_h
- for child in proc.child_list:
- if next_y > clip[1] + clip[3]:
- break
- child_x, child_y = draw_processes_recursively(ctx, child, proc_tree, next_y, proc_h, rect, clip)
- draw_process_connecting_lines(ctx, x, y, child_x, child_y, proc_h)
- next_y = next_y + proc_h * proc_tree.num_nodes([child])
-
- return x, y
+ x = rect[0] + ((proc.start_time - proc_tree.start_time) * rect[2] / proc_tree.duration)
+ w = ((proc.duration) * rect[2] / proc_tree.duration)
+
+ draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, clip)
+ draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h))
+ ipid = int(proc.pid)
+ if not OPTIONS.show_all:
+ cmdString = proc.cmd
+ else:
+ cmdString = ''
+ if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0:
+ cmdString = cmdString + " [" + str(ipid // 1000) + "]"
+ if OPTIONS.show_all:
+ if proc.args:
+ cmdString = cmdString + " '" + "' '".join(proc.args) + "'"
+ else:
+ cmdString = cmdString + " " + proc.exe
+
+ draw_label_in_box(ctx, PROC_TEXT_COLOR, cmdString, x, y + proc_h - 4, w, rect[0] + rect[2])
+
+ next_y = y + proc_h
+ for child in proc.child_list:
+ if next_y > clip[1] + clip[3]:
+ break
+ child_x, child_y = draw_processes_recursively(ctx, child, proc_tree, next_y, proc_h, rect, clip)
+ draw_process_connecting_lines(ctx, x, y, child_x, child_y, proc_h)
+ next_y = next_y + proc_h * proc_tree.num_nodes([child])
+
+ return x, y
def draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, clip):
- if y > clip[1] + clip[3] or y + proc_h + 2 < clip[1]:
- return
+ if y > clip[1] + clip[3] or y + proc_h + 2 < clip[1]:
+ return
- draw_fill_rect(ctx, PROC_COLOR_S, (x, y, w, proc_h))
+ draw_fill_rect(ctx, PROC_COLOR_S, (x, y, w, proc_h))
- last_tx = -1
- for sample in proc.samples :
- tx = rect[0] + round(((sample.time - proc_tree.start_time) * rect[2] / proc_tree.duration))
+ last_tx = -1
+ for sample in proc.samples :
+ tx = rect[0] + round(((sample.time - proc_tree.start_time) * rect[2] / proc_tree.duration))
- # samples are sorted chronologically
- if tx < clip[0]:
- continue
- if tx > clip[0] + clip[2]:
- break
+ # samples are sorted chronologically
+ if tx < clip[0]:
+ continue
+ if tx > clip[0] + clip[2]:
+ break
- tw = round(proc_tree.sample_period * rect[2] / float(proc_tree.duration))
- if last_tx != -1 and abs(last_tx - tx) <= tw:
- tw -= last_tx - tx
- tx = last_tx
- tw = max (tw, 1) # nice to see at least something
+ tw = round(proc_tree.sample_period * rect[2] / float(proc_tree.duration))
+ if last_tx != -1 and abs(last_tx - tx) <= tw:
+ tw -= last_tx - tx
+ tx = last_tx
+ tw = max (tw, 1) # nice to see at least something
- last_tx = tx + tw
- state = get_proc_state( sample.state )
+ last_tx = tx + tw
+ state = get_proc_state( sample.state )
- color = STATE_COLORS[state]
- if state == STATE_RUNNING:
- alpha = min (sample.cpu_sample.user + sample.cpu_sample.sys, 1.0)
- color = tuple(list(PROC_COLOR_R[0:3]) + [alpha])
-# print "render time %d [ tx %d tw %d ], sample state %s color %s alpha %g" % (sample.time, tx, tw, state, color, alpha)
- elif state == STATE_SLEEPING:
- continue
+ color = STATE_COLORS[state]
+ if state == STATE_RUNNING:
+ alpha = min (sample.cpu_sample.user + sample.cpu_sample.sys, 1.0)
+ color = tuple(list(PROC_COLOR_R[0:3]) + [alpha])
+# print "render time %d [ tx %d tw %d ], sample state %s color %s alpha %g" % (sample.time, tx, tw, state, color, alpha)
+ elif state == STATE_SLEEPING:
+ continue
- draw_fill_rect(ctx, color, (tx, y, tw, proc_h))
+ draw_fill_rect(ctx, color, (tx, y, tw, proc_h))
def draw_process_connecting_lines(ctx, px, py, x, y, proc_h):
- ctx.set_source_rgba(*DEP_COLOR)
- ctx.set_dash([2, 2])
- if abs(px - x) < 3:
- dep_off_x = 3
- dep_off_y = proc_h / 4
- ctx.move_to(x, y + proc_h / 2)
- ctx.line_to(px - dep_off_x, y + proc_h / 2)
- ctx.line_to(px - dep_off_x, py - dep_off_y)
- ctx.line_to(px, py - dep_off_y)
- else:
- ctx.move_to(x, y + proc_h / 2)
- ctx.line_to(px, y + proc_h / 2)
- ctx.line_to(px, py)
- ctx.stroke()
- ctx.set_dash([])
+ ctx.set_source_rgba(*DEP_COLOR)
+ ctx.set_dash([2, 2])
+ if abs(px - x) < 3:
+ dep_off_x = 3
+ dep_off_y = proc_h / 4
+ ctx.move_to(x, y + proc_h / 2)
+ ctx.line_to(px - dep_off_x, y + proc_h / 2)
+ ctx.line_to(px - dep_off_x, py - dep_off_y)
+ ctx.line_to(px, py - dep_off_y)
+ else:
+ ctx.move_to(x, y + proc_h / 2)
+ ctx.line_to(px, y + proc_h / 2)
+ ctx.line_to(px, py)
+ ctx.stroke()
+ ctx.set_dash([])
# elide the bootchart collector - it is quite distorting
def elide_bootchart(proc):
- return proc.cmd == 'bootchartd' or proc.cmd == 'bootchart-colle'
+ return proc.cmd == 'bootchartd' or proc.cmd == 'bootchart-colle'
class CumlSample:
- def __init__(self, proc):
- self.cmd = proc.cmd
- self.samples = []
- self.merge_samples (proc)
- self.color = None
-
- def merge_samples(self, proc):
- self.samples.extend (proc.samples)
- self.samples.sort (key = lambda p: p.time)
-
- def next(self):
- global palette_idx
- palette_idx += HSV_STEP
- return palette_idx
-
- def get_color(self):
- if self.color is None:
- i = self.next() % HSV_MAX_MOD
- h = 0.0
- if i is not 0:
- h = (1.0 * i) / HSV_MAX_MOD
- s = 0.5
- v = 1.0
- c = colorsys.hsv_to_rgb (h, s, v)
- self.color = (c[0], c[1], c[2], 1.0)
- return self.color
+ def __init__(self, proc):
+ self.cmd = proc.cmd
+ self.samples = []
+ self.merge_samples (proc)
+ self.color = None
+
+ def merge_samples(self, proc):
+ self.samples.extend (proc.samples)
+ self.samples.sort (key = lambda p: p.time)
+
+ def next(self):
+ global palette_idx
+ palette_idx += HSV_STEP
+ return palette_idx
+
+ def get_color(self):
+ if self.color is None:
+ i = self.next() % HSV_MAX_MOD
+ h = 0.0
+ if i is not 0:
+ h = (1.0 * i) / HSV_MAX_MOD
+ s = 0.5
+ v = 1.0
+ c = colorsys.hsv_to_rgb (h, s, v)
+ self.color = (c[0], c[1], c[2], 1.0)
+ return self.color
def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
- global palette_idx
- palette_idx = 0
-
- time_hash = {}
- total_time = 0.0
- m_proc_list = {}
-
- if stat_type is STAT_TYPE_CPU:
- sample_value = 'cpu'
- else:
- sample_value = 'io'
- for proc in proc_tree.process_list:
- if elide_bootchart(proc):
- continue
-
- for sample in proc.samples:
- total_time += getattr(sample.cpu_sample, sample_value)
- if not sample.time in time_hash:
- time_hash[sample.time] = 1
-
- # merge pids with the same cmd
- if not proc.cmd in m_proc_list:
- m_proc_list[proc.cmd] = CumlSample (proc)
- continue
- s = m_proc_list[proc.cmd]
- s.merge_samples (proc)
-
- # all the sample times
- times = sorted(time_hash)
- if len (times) < 2:
- print("degenerate boot chart")
- return
-
- pix_per_ns = chart_bounds[3] / total_time
-# print "total time: %g pix-per-ns %g" % (total_time, pix_per_ns)
-
- # FIXME: we have duplicates in the process list too [!] - why !?
-
- # Render bottom up, left to right
- below = {}
- for time in times:
- below[time] = chart_bounds[1] + chart_bounds[3]
-
- # same colors each time we render
- random.seed (0)
-
- ctx.set_line_width(1)
-
- legends = []
- labels = []
-
- # render each pid in order
- for cs in m_proc_list.values():
- row = {}
- cuml = 0.0
-
- # print "pid : %s -> %g samples %d" % (proc.cmd, cuml, len (cs.samples))
- for sample in cs.samples:
- cuml += getattr(sample.cpu_sample, sample_value)
- row[sample.time] = cuml
-
- process_total_time = cuml
-
- # hide really tiny processes
- if cuml * pix_per_ns <= 2:
- continue
-
- last_time = times[0]
- y = last_below = below[last_time]
- last_cuml = cuml = 0.0
-
- ctx.set_source_rgba(*cs.get_color())
- for time in times:
- render_seg = False
-
- # did the underlying trend increase ?
- if below[time] != last_below:
- last_below = below[last_time]
- last_cuml = cuml
- render_seg = True
-
- # did we move up a pixel increase ?
- if time in row:
- nc = round (row[time] * pix_per_ns)
- if nc != cuml:
- last_cuml = cuml
- cuml = nc
- render_seg = True
-
-# if last_cuml > cuml:
-# assert fail ... - un-sorted process samples
-
- # draw the trailing rectangle from the last time to
- # before now, at the height of the last segment.
- if render_seg:
- w = math.ceil ((time - last_time) * chart_bounds[2] / proc_tree.duration) + 1
- x = chart_bounds[0] + round((last_time - proc_tree.start_time) * chart_bounds[2] / proc_tree.duration)
- ctx.rectangle (x, below[last_time] - last_cuml, w, last_cuml)
- ctx.fill()
-# ctx.stroke()
- last_time = time
- y = below [time] - cuml
-
- row[time] = y
-
- # render the last segment
- x = chart_bounds[0] + round((last_time - proc_tree.start_time) * chart_bounds[2] / proc_tree.duration)
- y = below[last_time] - cuml
- ctx.rectangle (x, y, chart_bounds[2] - x, cuml)
- ctx.fill()
-# ctx.stroke()
-
- # render legend if it will fit
- if cuml > 8:
- label = cs.cmd
- extnts = ctx.text_extents(label)
- label_w = extnts[2]
- label_h = extnts[3]
-# print "Text extents %g by %g" % (label_w, label_h)
- labels.append((label,
- chart_bounds[0] + chart_bounds[2] - label_w - off_x * 2,
- y + (cuml + label_h) / 2))
- if cs in legends:
- print("ARGH - duplicate process in list !")
-
- legends.append ((cs, process_total_time))
-
- below = row
-
- # render grid-lines over the top
- draw_box_ticks(ctx, chart_bounds, sec_w)
-
- # render labels
- for l in labels:
- draw_text(ctx, l[0], TEXT_COLOR, l[1], l[2])
-
- # Render legends
- font_height = 20
- label_width = 300
- LEGENDS_PER_COL = 15
- LEGENDS_TOTAL = 45
- ctx.set_font_size (TITLE_FONT_SIZE)
- dur_secs = duration / 100
- cpu_secs = total_time / 1000000000
-
- # misleading - with multiple CPUs ...
-# idle = ((dur_secs - cpu_secs) / dur_secs) * 100.0
- if stat_type is STAT_TYPE_CPU:
- label = "Cumulative CPU usage, by process; total CPU: " \
- " %.5g(s) time: %.3g(s)" % (cpu_secs, dur_secs)
- else:
- label = "Cumulative I/O usage, by process; total I/O: " \
- " %.5g(s) time: %.3g(s)" % (cpu_secs, dur_secs)
-
- draw_text(ctx, label, TEXT_COLOR, chart_bounds[0] + off_x,
- chart_bounds[1] + font_height)
-
- i = 0
- legends = sorted(legends, key=itemgetter(1), reverse=True)
- ctx.set_font_size(TEXT_FONT_SIZE)
- for t in legends:
- cs = t[0]
- time = t[1]
- x = chart_bounds[0] + off_x + int (i/LEGENDS_PER_COL) * label_width
- y = chart_bounds[1] + font_height * ((i % LEGENDS_PER_COL) + 2)
- str = "%s - %.0f(ms) (%2.2f%%)" % (cs.cmd, time/1000000, (time/total_time) * 100.0)
- draw_legend_box(ctx, str, cs.color, x, y, leg_s)
- i = i + 1
- if i >= LEGENDS_TOTAL:
- break
+ global palette_idx
+ palette_idx = 0
+
+ time_hash = {}
+ total_time = 0.0
+ m_proc_list = {}
+
+ if stat_type is STAT_TYPE_CPU:
+ sample_value = 'cpu'
+ else:
+ sample_value = 'io'
+ for proc in proc_tree.process_list:
+ if elide_bootchart(proc):
+ continue
+
+ for sample in proc.samples:
+ total_time += getattr(sample.cpu_sample, sample_value)
+ if not sample.time in time_hash:
+ time_hash[sample.time] = 1
+
+ # merge pids with the same cmd
+ if not proc.cmd in m_proc_list:
+ m_proc_list[proc.cmd] = CumlSample (proc)
+ continue
+ s = m_proc_list[proc.cmd]
+ s.merge_samples (proc)
+
+ # all the sample times
+ times = sorted(time_hash)
+ if len (times) < 2:
+ print("degenerate boot chart")
+ return
+
+ pix_per_ns = chart_bounds[3] / total_time
+# print "total time: %g pix-per-ns %g" % (total_time, pix_per_ns)
+
+ # FIXME: we have duplicates in the process list too [!] - why !?
+
+ # Render bottom up, left to right
+ below = {}
+ for time in times:
+ below[time] = chart_bounds[1] + chart_bounds[3]
+
+ # same colors each time we render
+ random.seed (0)
+
+ ctx.set_line_width(1)
+
+ legends = []
+ labels = []
+
+ # render each pid in order
+ for cs in m_proc_list.values():
+ row = {}
+ cuml = 0.0
+
+ # print "pid : %s -> %g samples %d" % (proc.cmd, cuml, len (cs.samples))
+ for sample in cs.samples:
+ cuml += getattr(sample.cpu_sample, sample_value)
+ row[sample.time] = cuml
+
+ process_total_time = cuml
+
+ # hide really tiny processes
+ if cuml * pix_per_ns <= 2:
+ continue
+
+ last_time = times[0]
+ y = last_below = below[last_time]
+ last_cuml = cuml = 0.0
+
+ ctx.set_source_rgba(*cs.get_color())
+ for time in times:
+ render_seg = False
+
+ # did the underlying trend increase ?
+ if below[time] != last_below:
+ last_below = below[last_time]
+ last_cuml = cuml
+ render_seg = True
+
+ # did we move up a pixel increase ?
+ if time in row:
+ nc = round (row[time] * pix_per_ns)
+ if nc != cuml:
+ last_cuml = cuml
+ cuml = nc
+ render_seg = True
+
+# if last_cuml > cuml:
+# assert fail ... - un-sorted process samples
+
+ # draw the trailing rectangle from the last time to
+ # before now, at the height of the last segment.
+ if render_seg:
+ w = math.ceil ((time - last_time) * chart_bounds[2] / proc_tree.duration) + 1
+ x = chart_bounds[0] + round((last_time - proc_tree.start_time) * chart_bounds[2] / proc_tree.duration)
+ ctx.rectangle (x, below[last_time] - last_cuml, w, last_cuml)
+ ctx.fill()
+# ctx.stroke()
+ last_time = time
+ y = below [time] - cuml
+
+ row[time] = y
+
+ # render the last segment
+ x = chart_bounds[0] + round((last_time - proc_tree.start_time) * chart_bounds[2] / proc_tree.duration)
+ y = below[last_time] - cuml
+ ctx.rectangle (x, y, chart_bounds[2] - x, cuml)
+ ctx.fill()
+# ctx.stroke()
+
+ # render legend if it will fit
+ if cuml > 8:
+ label = cs.cmd
+ extnts = ctx.text_extents(label)
+ label_w = extnts[2]
+ label_h = extnts[3]
+# print "Text extents %g by %g" % (label_w, label_h)
+ labels.append((label,
+ chart_bounds[0] + chart_bounds[2] - label_w - off_x * 2,
+ y + (cuml + label_h) / 2))
+ if cs in legends:
+ print("ARGH - duplicate process in list !")
+
+ legends.append ((cs, process_total_time))
+
+ below = row
+
+ # render grid-lines over the top
+ draw_box_ticks(ctx, chart_bounds, sec_w)
+
+ # render labels
+ for l in labels:
+ draw_text(ctx, l[0], TEXT_COLOR, l[1], l[2])
+
+ # Render legends
+ font_height = 20
+ label_width = 300
+ LEGENDS_PER_COL = 15
+ LEGENDS_TOTAL = 45
+ ctx.set_font_size (TITLE_FONT_SIZE)
+ dur_secs = duration / 100
+ cpu_secs = total_time / 1000000000
+
+ # misleading - with multiple CPUs ...
+# idle = ((dur_secs - cpu_secs) / dur_secs) * 100.0
+ if stat_type is STAT_TYPE_CPU:
+ label = "Cumulative CPU usage, by process; total CPU: " \
+ " %.5g(s) time: %.3g(s)" % (cpu_secs, dur_secs)
+ else:
+ label = "Cumulative I/O usage, by process; total I/O: " \
+ " %.5g(s) time: %.3g(s)" % (cpu_secs, dur_secs)
+
+ draw_text(ctx, label, TEXT_COLOR, chart_bounds[0] + off_x,
+ chart_bounds[1] + font_height)
+
+ i = 0
+ legends = sorted(legends, key=itemgetter(1), reverse=True)
+ ctx.set_font_size(TEXT_FONT_SIZE)
+ for t in legends:
+ cs = t[0]
+ time = t[1]
+ x = chart_bounds[0] + off_x + int (i/LEGENDS_PER_COL) * label_width
+ y = chart_bounds[1] + font_height * ((i % LEGENDS_PER_COL) + 2)
+ str = "%s - %.0f(ms) (%2.2f%%)" % (cs.cmd, time/1000000, (time/total_time) * 100.0)
+ draw_legend_box(ctx, str, cs.color, x, y, leg_s)
+ i = i + 1
+ if i >= LEGENDS_TOTAL:
+ break
diff --git a/scripts/pybootchartgui/pybootchartgui/gui.py b/scripts/pybootchartgui/pybootchartgui/gui.py
index 7fedd232df..e1fe915563 100644
--- a/scripts/pybootchartgui/pybootchartgui/gui.py
+++ b/scripts/pybootchartgui/pybootchartgui/gui.py
@@ -13,64 +13,83 @@
# You should have received a copy of the GNU General Public License
# along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>.
-import gobject
-import gtk
-import gtk.gdk
-import gtk.keysyms
+import gi
+gi.require_version('Gtk', '3.0')
+from gi.repository import Gtk as gtk
+from gi.repository import Gtk
+from gi.repository import Gdk
+from gi.repository import GObject as gobject
+from gi.repository import GObject
+
from . import draw
from .draw import RenderOptions
-class PyBootchartWidget(gtk.DrawingArea):
+class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
__gsignals__ = {
- 'expose-event': 'override',
- 'clicked' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING, gtk.gdk.Event)),
+ 'clicked' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING, Gdk.Event)),
'position-changed' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_INT, gobject.TYPE_INT)),
'set-scroll-adjustments' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gtk.Adjustment, gtk.Adjustment))
}
+ hadjustment = GObject.property(type=Gtk.Adjustment,
+ default=Gtk.Adjustment(),
+ flags=GObject.PARAM_READWRITE)
+ hscroll_policy = GObject.property(type=Gtk.ScrollablePolicy,
+ default=Gtk.ScrollablePolicy.MINIMUM,
+ flags=GObject.PARAM_READWRITE)
+ vadjustment = GObject.property(type=Gtk.Adjustment,
+ default=Gtk.Adjustment(),
+ flags=GObject.PARAM_READWRITE)
+ vscroll_policy = GObject.property(type=Gtk.ScrollablePolicy,
+ default=Gtk.ScrollablePolicy.MINIMUM,
+ flags=GObject.PARAM_READWRITE)
+
def __init__(self, trace, options, xscale):
gtk.DrawingArea.__init__(self)
self.trace = trace
self.options = options
- self.set_flags(gtk.CAN_FOCUS)
+ self.set_can_focus(True)
- self.add_events(gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.BUTTON_RELEASE_MASK)
+ self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK)
self.connect("button-press-event", self.on_area_button_press)
self.connect("button-release-event", self.on_area_button_release)
- self.add_events(gtk.gdk.POINTER_MOTION_MASK | gtk.gdk.POINTER_MOTION_HINT_MASK | gtk.gdk.BUTTON_RELEASE_MASK)
+ self.add_events(Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.POINTER_MOTION_HINT_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK)
self.connect("motion-notify-event", self.on_area_motion_notify)
self.connect("scroll-event", self.on_area_scroll_event)
self.connect('key-press-event', self.on_key_press_event)
- self.connect('set-scroll-adjustments', self.on_set_scroll_adjustments)
self.connect("size-allocate", self.on_allocation_size_changed)
self.connect("position-changed", self.on_position_changed)
+ self.connect("draw", self.on_draw)
+
self.zoom_ratio = 1.0
self.xscale = xscale
self.x, self.y = 0.0, 0.0
self.chart_width, self.chart_height = draw.extents(self.options, self.xscale, self.trace)
- self.hadj = None
- self.vadj = None
- self.hadj_changed_signal_id = None
- self.vadj_changed_signal_id = None
-
- def do_expose_event(self, event):
- cr = self.window.cairo_create()
-
- # set a clip region for the expose event
- cr.rectangle(
- event.area.x, event.area.y,
- event.area.width, event.area.height
- )
- cr.clip()
- self.draw(cr, self.get_allocation())
- return False
-
- def draw(self, cr, rect):
+ self.our_width, self.our_height = self.chart_width, self.chart_height
+
+ self.hadj = gtk.Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
+ self.vadj = gtk.Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
+ self.vadj.connect('value-changed', self.on_adjustments_changed)
+ self.hadj.connect('value-changed', self.on_adjustments_changed)
+
+ def bound_vals(self):
+ self.x = max(0, self.x)
+ self.y = max(0, self.y)
+ self.x = min(self.chart_width - self.our_width, self.x)
+ self.y = min(self.chart_height - self.our_height, self.y)
+
+ def on_draw(self, darea, cr):
+ # set a clip region
+ #cr.rectangle(
+ # self.x, self.y,
+ # self.chart_width, self.chart_height
+ #)
+ #cr.clip()
cr.set_source_rgba(1.0, 1.0, 1.0, 1.0)
cr.paint()
cr.scale(self.zoom_ratio, self.zoom_ratio)
@@ -84,7 +103,7 @@ class PyBootchartWidget(gtk.DrawingArea):
def zoom_image (self, zoom_ratio):
self.zoom_ratio = zoom_ratio
- self._set_scroll_adjustments (self.hadj, self.vadj)
+ self._set_scroll_adjustments()
self.queue_draw()
def zoom_to_rect (self, rect):
@@ -122,126 +141,101 @@ class PyBootchartWidget(gtk.DrawingArea):
def show_toggled(self, button):
self.options.app_options.show_all = button.get_property ('active')
self.chart_width, self.chart_height = draw.extents(self.options, self.xscale, self.trace)
- self._set_scroll_adjustments(self.hadj, self.vadj)
+ self._set_scroll_adjustments()
self.queue_draw()
POS_INCREMENT = 100
def on_key_press_event(self, widget, event):
- if event.keyval == gtk.keysyms.Left:
+ if event.keyval == Gdk.keyval_from_name("Left"):
self.x -= self.POS_INCREMENT/self.zoom_ratio
- elif event.keyval == gtk.keysyms.Right:
+ elif event.keyval == Gdk.keyval_from_name("Right"):
self.x += self.POS_INCREMENT/self.zoom_ratio
- elif event.keyval == gtk.keysyms.Up:
+ elif event.keyval == Gdk.keyval_from_name("Up"):
self.y -= self.POS_INCREMENT/self.zoom_ratio
- elif event.keyval == gtk.keysyms.Down:
+ elif event.keyval == Gdk.keyval_from_name("Down"):
self.y += self.POS_INCREMENT/self.zoom_ratio
else:
return False
+ self.bound_vals()
self.queue_draw()
self.position_changed()
return True
def on_area_button_press(self, area, event):
if event.button == 2 or event.button == 1:
- area.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR))
+ window = self.get_window()
+ window.set_cursor(Gdk.Cursor(Gdk.CursorType.FLEUR))
self.prevmousex = event.x
self.prevmousey = event.y
- if event.type not in (gtk.gdk.BUTTON_PRESS, gtk.gdk.BUTTON_RELEASE):
+ if event.type not in (Gdk.EventType.BUTTON_PRESS, Gdk.EventType.BUTTON_RELEASE):
return False
return False
def on_area_button_release(self, area, event):
if event.button == 2 or event.button == 1:
- area.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.ARROW))
+ window = self.get_window()
+ window.set_cursor(Gdk.Cursor(Gdk.CursorType.ARROW))
self.prevmousex = None
self.prevmousey = None
return True
return False
def on_area_scroll_event(self, area, event):
- if event.state & gtk.gdk.CONTROL_MASK:
- if event.direction == gtk.gdk.SCROLL_UP:
+ if event.state & Gdk.CONTROL_MASK:
+ if event.direction == Gdk.SCROLL_UP:
self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT)
return True
- if event.direction == gtk.gdk.SCROLL_DOWN:
+ if event.direction == Gdk.SCROLL_DOWN:
self.zoom_image(self.zoom_ratio / self.ZOOM_INCREMENT)
return True
return False
def on_area_motion_notify(self, area, event):
state = event.state
- if state & gtk.gdk.BUTTON2_MASK or state & gtk.gdk.BUTTON1_MASK:
+ if state & Gdk.ModifierType.BUTTON2_MASK or state & Gdk.ModifierType.BUTTON1_MASK:
x, y = int(event.x), int(event.y)
# pan the image
self.x += (self.prevmousex - x)/self.zoom_ratio
self.y += (self.prevmousey - y)/self.zoom_ratio
+ self.bound_vals()
self.queue_draw()
self.prevmousex = x
self.prevmousey = y
self.position_changed()
return True
- def on_set_scroll_adjustments(self, area, hadj, vadj):
- self._set_scroll_adjustments (hadj, vadj)
-
def on_allocation_size_changed(self, widget, allocation):
self.hadj.page_size = allocation.width
self.hadj.page_increment = allocation.width * 0.9
self.vadj.page_size = allocation.height
self.vadj.page_increment = allocation.height * 0.9
+ self.our_width = allocation.width
+ if self.chart_width < self.our_width:
+ self.our_width = self.chart_width
+ self.our_height = allocation.height
+ if self.chart_height < self.our_height:
+ self.our_height = self.chart_height
+ self._set_scroll_adjustments()
def _set_adj_upper(self, adj, upper):
- changed = False
- value_changed = False
-
- if adj.upper != upper:
- adj.upper = upper
- changed = True
-
- max_value = max(0.0, upper - adj.page_size)
- if adj.value > max_value:
- adj.value = max_value
- value_changed = True
-
- if changed:
- adj.changed()
- if value_changed:
- adj.value_changed()
-
- def _set_scroll_adjustments(self, hadj, vadj):
- if hadj == None:
- hadj = gtk.Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
- if vadj == None:
- vadj = gtk.Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
-
- if self.hadj_changed_signal_id != None and \
- self.hadj != None and hadj != self.hadj:
- self.hadj.disconnect (self.hadj_changed_signal_id)
- if self.vadj_changed_signal_id != None and \
- self.vadj != None and vadj != self.vadj:
- self.vadj.disconnect (self.vadj_changed_signal_id)
-
- if hadj != None:
- self.hadj = hadj
- self._set_adj_upper (self.hadj, self.zoom_ratio * self.chart_width)
- self.hadj_changed_signal_id = self.hadj.connect('value-changed', self.on_adjustments_changed)
-
- if vadj != None:
- self.vadj = vadj
- self._set_adj_upper (self.vadj, self.zoom_ratio * self.chart_height)
- self.vadj_changed_signal_id = self.vadj.connect('value-changed', self.on_adjustments_changed)
+
+ if adj.get_upper() != upper:
+ adj.set_upper(upper)
+
+ def _set_scroll_adjustments(self):
+ self._set_adj_upper (self.hadj, self.zoom_ratio * (self.chart_width - self.our_width))
+ self._set_adj_upper (self.vadj, self.zoom_ratio * (self.chart_height - self.our_height))
def on_adjustments_changed(self, adj):
- self.x = self.hadj.value / self.zoom_ratio
- self.y = self.vadj.value / self.zoom_ratio
+ self.x = self.hadj.get_value() / self.zoom_ratio
+ self.y = self.vadj.get_value() / self.zoom_ratio
self.queue_draw()
def on_position_changed(self, widget, x, y):
- self.hadj.value = x * self.zoom_ratio
- self.vadj.value = y * self.zoom_ratio
-
-PyBootchartWidget.set_set_scroll_adjustments_signal('set-scroll-adjustments')
+ self.hadj.set_value(x * self.zoom_ratio)
+ #self.hadj.value_changed()
+ self.vadj.set_value(y * self.zoom_ratio)
class PyBootchartShell(gtk.VBox):
ui = '''
@@ -260,7 +254,7 @@ class PyBootchartShell(gtk.VBox):
def __init__(self, window, trace, options, xscale):
gtk.VBox.__init__(self)
- self.widget = PyBootchartWidget(trace, options, xscale)
+ self.widget2 = PyBootchartWidget(trace, options, xscale)
# Create a UIManager instance
uimanager = self.uimanager = gtk.UIManager()
@@ -275,12 +269,12 @@ class PyBootchartShell(gtk.VBox):
# Create actions
actiongroup.add_actions((
- ('Expand', gtk.STOCK_ADD, None, None, None, self.widget.on_expand),
- ('Contract', gtk.STOCK_REMOVE, None, None, None, self.widget.on_contract),
- ('ZoomIn', gtk.STOCK_ZOOM_IN, None, None, None, self.widget.on_zoom_in),
- ('ZoomOut', gtk.STOCK_ZOOM_OUT, None, None, None, self.widget.on_zoom_out),
- ('ZoomFit', gtk.STOCK_ZOOM_FIT, 'Fit Width', None, None, self.widget.on_zoom_fit),
- ('Zoom100', gtk.STOCK_ZOOM_100, None, None, None, self.widget.on_zoom_100),
+ ('Expand', gtk.STOCK_ADD, None, None, None, self.widget2.on_expand),
+ ('Contract', gtk.STOCK_REMOVE, None, None, None, self.widget2.on_contract),
+ ('ZoomIn', gtk.STOCK_ZOOM_IN, None, None, None, self.widget2.on_zoom_in),
+ ('ZoomOut', gtk.STOCK_ZOOM_OUT, None, None, None, self.widget2.on_zoom_out),
+ ('ZoomFit', gtk.STOCK_ZOOM_FIT, 'Fit Width', None, None, self.widget2.on_zoom_fit),
+ ('Zoom100', gtk.STOCK_ZOOM_100, None, None, None, self.widget2.on_zoom_100),
))
# Add the actiongroup to the uimanager
@@ -290,29 +284,33 @@ class PyBootchartShell(gtk.VBox):
uimanager.add_ui_from_string(self.ui)
# Scrolled window
- scrolled = gtk.ScrolledWindow()
- scrolled.add(self.widget)
+ scrolled = gtk.ScrolledWindow(self.widget2.hadj, self.widget2.vadj)
+ scrolled.add(self.widget2)
+
+ #scrolled.set_hadjustment()
+ #scrolled.set_vadjustment(self.widget2.vadj)
+ scrolled.set_policy(gtk.PolicyType.ALWAYS, gtk.PolicyType.ALWAYS)
# toolbar / h-box
hbox = gtk.HBox(False, 8)
# Create a Toolbar
toolbar = uimanager.get_widget('/ToolBar')
- hbox.pack_start(toolbar, True, True)
+ hbox.pack_start(toolbar, True, True, 0)
if not options.kernel_only:
# Misc. options
button = gtk.CheckButton("Show more")
- button.connect ('toggled', self.widget.show_toggled)
+ button.connect ('toggled', self.widget2.show_toggled)
button.set_active(options.app_options.show_all)
- hbox.pack_start (button, False, True)
+ hbox.pack_start (button, False, True, 0)
- self.pack_start(hbox, False)
- self.pack_start(scrolled)
+ self.pack_start(hbox, False, True, 0)
+ self.pack_start(scrolled, True, True, 0)
self.show_all()
def grab_focus(self, window):
- window.set_focus(self.widget)
+ window.set_focus(self.widget2)
class PyBootchartWindow(gtk.Window):
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index a3a0b0b339..ef2d3d309c 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -38,16 +38,18 @@ class Trace:
self.min = None
self.max = None
self.headers = None
- self.disk_stats = None
+ self.disk_stats = []
self.ps_stats = None
self.taskstats = None
- self.cpu_stats = None
+ self.cpu_stats = []
self.cmdline = None
self.kernel = None
self.kernel_tree = None
self.filename = None
self.parent_map = None
- self.mem_stats = None
+ self.mem_stats = []
+ self.monitor_disk = None
+ self.times = [] # Always empty, but expected by draw.py when drawing system charts.
if len(paths):
parse_paths (writer, self, paths)
@@ -58,6 +60,19 @@ class Trace:
self.min = min(self.start.keys())
self.max = max(self.end.keys())
+
+ # Rendering system charts depends on start and end
+ # time. Provide them where the original drawing code expects
+ # them, i.e. in proc_tree.
+ class BitbakeProcessTree:
+ def __init__(self, start_time, end_time):
+ self.start_time = start_time
+ self.end_time = end_time
+ self.duration = self.end_time - self.start_time
+ self.proc_tree = BitbakeProcessTree(min(self.start.keys()),
+ max(self.end.keys()))
+
+
return
# Turn that parsed information into something more useful
@@ -252,7 +267,7 @@ def _parse_headers(file):
value = line.strip()
headers[last] += value
return headers, last
- return reduce(parse, file.read().decode('utf-8').split('\n'), (defaultdict(str),''))[0]
+ return reduce(parse, file.read().split('\n'), (defaultdict(str),''))[0]
def _parse_timed_blocks(file):
"""Parses (ie., splits) a file into so-called timed-blocks. A
@@ -266,7 +281,7 @@ def _parse_timed_blocks(file):
return (int(lines[0]), lines[1:])
except ValueError:
raise ParseError("expected a timed-block, but timestamp '%s' is not an integer" % lines[0])
- blocks = file.read().decode('utf-8').split('\n\n')
+ blocks = file.read().split('\n\n')
return [parse(block) for block in blocks if block.strip() and not block.endswith(' not running\n')]
def _parse_proc_ps_log(writer, file):
@@ -427,7 +442,13 @@ def _parse_proc_stat_log(file):
# skip the rest of statistics lines
return samples
-def _parse_proc_disk_stat_log(file, numCpu):
+def _parse_reduced_log(file, sample_class):
+ samples = []
+ for time, lines in _parse_timed_blocks(file):
+ samples.append(sample_class(time, *[float(x) for x in lines[0].split()]))
+ return samples
+
+def _parse_proc_disk_stat_log(file):
"""
Parse file for disk stats, but only look at the whole device, eg. sda,
not sda1, sda2 etc. The format of relevant lines should be:
@@ -462,12 +483,31 @@ def _parse_proc_disk_stat_log(file, numCpu):
sums = [ a - b for a, b in zip(sample1.diskdata, sample2.diskdata) ]
readTput = sums[0] / 2.0 * 100.0 / interval
writeTput = sums[1] / 2.0 * 100.0 / interval
- util = float( sums[2] ) / 10 / interval / numCpu
+ util = float( sums[2] ) / 10 / interval
util = max(0.0, min(1.0, util))
disk_stats.append(DiskSample(sample2.time, readTput, writeTput, util))
return disk_stats
+def _parse_reduced_proc_meminfo_log(file):
+ """
+ Parse file for global memory statistics with
+ 'MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree' values
+ (in that order) directly stored on one line.
+ """
+ used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree',)
+
+ mem_stats = []
+ for time, lines in _parse_timed_blocks(file):
+ sample = MemSample(time)
+ for name, value in zip(used_values, lines[0].split()):
+ sample.add_value(name, int(value))
+
+ if sample.valid():
+ mem_stats.append(DrawMemSample(sample))
+
+ return mem_stats
+
def _parse_proc_meminfo_log(file):
"""
Parse file for global memory statistics.
@@ -484,14 +524,37 @@ def _parse_proc_meminfo_log(file):
for line in lines:
match = meminfo_re.match(line)
if not match:
- raise ParseError("Invalid meminfo line \"%s\"" % match.groups(0))
+ raise ParseError("Invalid meminfo line \"%s\"" % line)
sample.add_value(match.group(1), int(match.group(2)))
if sample.valid():
- mem_stats.append(sample)
+ mem_stats.append(DrawMemSample(sample))
return mem_stats
+def _parse_monitor_disk_log(file):
+ """
+ Parse file with information about amount of diskspace used.
+ The format of relevant lines should be: ^volume path: number-of-bytes?
+ """
+ disk_stats = []
+ diskinfo_re = re.compile(r'^(.+):\s*(\d+)$')
+
+ for time, lines in _parse_timed_blocks(file):
+ sample = DiskSpaceSample(time)
+
+ for line in lines:
+ match = diskinfo_re.match(line)
+ if not match:
+ raise ParseError("Invalid monitor_disk line \"%s\"" % line)
+ sample.add_value(match.group(1), int(match.group(2)))
+
+ if sample.valid():
+ disk_stats.append(sample)
+
+ return disk_stats
+
+
# if we boot the kernel with: initcall_debug printk.time=1 we can
# get all manner of interesting data from the dmesg output
# We turn this into a pseudo-process tree: each event is
@@ -514,7 +577,7 @@ def _parse_dmesg(writer, file):
processMap['k-boot'] = kernel
base_ts = False
max_ts = 0
- for line in file.read().decode('utf-8').split('\n'):
+ for line in file.read().split('\n'):
t = timestamp_re.match (line)
if t is None:
# print "duff timestamp " + line
@@ -602,7 +665,7 @@ def _parse_pacct(writer, file):
def _parse_paternity_log(writer, file):
parent_map = {}
parent_map[0] = 0
- for line in file.read().decode('utf-8').split('\n'):
+ for line in file.read().split('\n'):
if not line:
continue
elems = line.split(' ') # <Child> <Parent>
@@ -615,7 +678,7 @@ def _parse_paternity_log(writer, file):
def _parse_cmdline_log(writer, file):
cmdLines = {}
- for block in file.read().decode('utf-8').split('\n\n'):
+ for block in file.read().split('\n\n'):
lines = block.split('\n')
if len (lines) >= 3:
# print "Lines '%s'" % (lines[0])
@@ -628,6 +691,20 @@ def _parse_cmdline_log(writer, file):
cmdLines[pid] = values
return cmdLines
+def _parse_bitbake_buildstats(writer, state, filename, file):
+ paths = filename.split("/")
+ task = paths[-1]
+ pn = paths[-2]
+ start = None
+ end = None
+ for line in file:
+ if line.startswith("Started:"):
+ start = int(float(line.split()[-1]))
+ elif line.startswith("Ended:"):
+ end = int(float(line.split()[-1]))
+ if start and end:
+ state.add_process(pn + ":" + task, start, end)
+
def get_num_cpus(headers):
"""Get the number of CPUs from the system.cpu header property. As the
CPU utilization graphs are relative, the number of CPUs currently makes
@@ -647,18 +724,25 @@ def get_num_cpus(headers):
def _do_parse(writer, state, filename, file):
writer.info("parsing '%s'" % filename)
t1 = clock()
- paths = filename.split("/")
- task = paths[-1]
- pn = paths[-2]
- start = None
- end = None
- for line in file:
- if line.startswith("Started:"):
- start = int(float(line.split()[-1]))
- elif line.startswith("Ended:"):
- end = int(float(line.split()[-1]))
- if start and end:
- state.add_process(pn + ":" + task, start, end)
+ name = os.path.basename(filename)
+ if name == "proc_diskstats.log":
+ state.disk_stats = _parse_proc_disk_stat_log(file)
+ elif name == "reduced_proc_diskstats.log":
+ state.disk_stats = _parse_reduced_log(file, DiskSample)
+ elif name == "proc_stat.log":
+ state.cpu_stats = _parse_proc_stat_log(file)
+ elif name == "reduced_proc_stat.log":
+ state.cpu_stats = _parse_reduced_log(file, CPUSample)
+ elif name == "proc_meminfo.log":
+ state.mem_stats = _parse_proc_meminfo_log(file)
+ elif name == "reduced_proc_meminfo.log":
+ state.mem_stats = _parse_reduced_proc_meminfo_log(file)
+ elif name == "cmdline2.log":
+ state.cmdline = _parse_cmdline_log(writer, file)
+ elif name == "monitor_disk.log":
+ state.monitor_disk = _parse_monitor_disk_log(file)
+ elif not filename.endswith('.log'):
+ _parse_bitbake_buildstats(writer, state, filename, file)
t2 = clock()
writer.info(" %s seconds" % str(t2-t1))
return state
@@ -667,7 +751,7 @@ def parse_file(writer, state, filename):
if state.filename is None:
state.filename = filename
basename = os.path.basename(filename)
- with open(filename, "rb") as file:
+ with open(filename, "r") as file:
return _do_parse(writer, state, filename, file)
def parse_paths(writer, state, paths):
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index 015d743aa0..9fc309b3ab 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -53,6 +53,33 @@ class MemSample:
# discard incomplete samples
return [v for v in MemSample.used_values if v not in keys] == []
+class DrawMemSample:
+ """
+ Condensed version of a MemSample with exactly the values used by the drawing code.
+ Initialized either from a valid MemSample or
+ a tuple/list of buffer/used/cached/swap values.
+ """
+ def __init__(self, mem_sample):
+ self.time = mem_sample.time
+ if isinstance(mem_sample, MemSample):
+ self.buffers = mem_sample.records['MemTotal'] - mem_sample.records['MemFree']
+ self.used = mem_sample.records['MemTotal'] - mem_sample.records['MemFree'] - mem_sample.records['Buffers']
+ self.cached = mem_sample.records['Cached']
+ self.swap = mem_sample.records['SwapTotal'] - mem_sample.records['SwapFree']
+ else:
+ self.buffers, self.used, self.cached, self.swap = mem_sample
+
+class DiskSpaceSample:
+ def __init__(self, time):
+ self.time = time
+ self.records = {}
+
+ def add_value(self, name, value):
+ self.records[name] = value
+
+ def valid(self):
+ return bool(self.records)
+
class ProcessSample:
def __init__(self, time, state, cpu_sample):
self.time = time
diff --git a/scripts/pythondeps b/scripts/pythondeps
index 590b9769e7..be21dd84eb 100755
--- a/scripts/pythondeps
+++ b/scripts/pythondeps
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Determine dependencies of python scripts or available python modules in a search path.
#
# Given the -d argument and a filename/filenames, returns the modules imported by those files.
@@ -9,7 +11,8 @@
import argparse
import ast
-import imp
+import importlib
+from importlib import machinery
import logging
import os.path
import sys
@@ -17,10 +20,7 @@ import sys
logger = logging.getLogger('pythondeps')
-suffixes = []
-for triple in imp.get_suffixes():
- suffixes.append(triple[0])
-
+suffixes = importlib.machinery.all_suffixes()
class PythonDepError(Exception):
pass
diff --git a/scripts/recipetool b/scripts/recipetool
index 1052cd2b22..e2d585d2c5 100755
--- a/scripts/recipetool
+++ b/scripts/recipetool
@@ -4,18 +4,8 @@
#
# Copyright (C) 2014 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
import os
@@ -36,8 +26,8 @@ def tinfoil_init(parserecipes):
import bb.tinfoil
import logging
tinfoil = bb.tinfoil.Tinfoil(tracking=True)
- tinfoil.prepare(not parserecipes)
tinfoil.logger.setLevel(logger.getEffectiveLevel())
+ tinfoil.prepare(not parserecipes)
return tinfoil
def main():
@@ -73,13 +63,14 @@ def main():
logger.error("Unable to find bitbake by searching parent directory of this script or PATH")
sys.exit(1)
logger.debug('Found bitbake path: %s' % bitbakepath)
+ scriptpath.add_oe_lib_path()
scriptutils.logger_setup_color(logger, global_args.color)
tinfoil = tinfoil_init(False)
try:
- for path in ([scripts_path] +
- tinfoil.config_data.getVar('BBPATH', True).split(':')):
+ for path in (tinfoil.config_data.getVar('BBPATH').split(':')
+ + [scripts_path]):
pluginpath = os.path.join(path, 'lib', 'recipetool')
scriptutils.load_plugins(logger, plugins, pluginpath)
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index e47b4d916e..8c0fdb986a 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -2,18 +2,7 @@
#
# Copyright (c) 2012 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION
# This script is called by the SDK installer script. It replaces the dynamic
@@ -103,6 +92,8 @@ def change_interpreter(elf_file_name):
fname.startswith(b("/lib32/")) or fname.startswith(b("/usr/lib32/")) or \
fname.startswith(b("/usr/lib32/")) or fname.startswith(b("/usr/lib64/")):
break
+ if p_filesz == 0:
+ break
if (len(new_dl_path) >= p_filesz):
print("ERROR: could not relocate %s, interp size = %i and %i is needed." \
% (elf_file_name, p_memsz, len(new_dl_path) + 1))
diff --git a/scripts/resulttool b/scripts/resulttool
new file mode 100755
index 0000000000..fc282bda6c
--- /dev/null
+++ b/scripts/resulttool
@@ -0,0 +1,78 @@
+#!/usr/bin/env python3
+#
+# test results tool - tool for manipulating OEQA test result json files
+# (merge results, summarise results, regression analysis, generate manual test results file)
+#
+# To look for help information.
+# $ resulttool
+#
+# To store test results from oeqa automated tests, execute the below
+# $ resulttool store <source_dir> <git_branch>
+#
+# To merge test results, execute the below
+# $ resulttool merge <base_result_file> <target_result_file>
+#
+# To report test report, execute the below
+# $ resulttool report <source_dir>
+#
+# To perform regression file analysis, execute the below
+# $ resulttool regression-file <base_result_file> <target_result_file>
+#
+# To execute manual test cases, execute the below
+# $ resulttool manualexecution <manualjsonfile>
+#
+# By default testresults.json for manualexecution store in <build>/tmp/log/manual/
+#
+# Copyright (c) 2019, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os
+import sys
+import argparse
+import logging
+script_path = os.path.dirname(os.path.realpath(__file__))
+lib_path = script_path + '/lib'
+sys.path = sys.path + [lib_path]
+import argparse_oe
+import scriptutils
+import resulttool.merge
+import resulttool.store
+import resulttool.regression
+import resulttool.report
+import resulttool.manualexecution
+import resulttool.log
+logger = scriptutils.logger_create('resulttool')
+
+def main():
+ parser = argparse_oe.ArgumentParser(description="OEQA test result manipulation tool.",
+ epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
+ parser.add_argument('-d', '--debug', help='enable debug output', action='store_true')
+ parser.add_argument('-q', '--quiet', help='print only errors', action='store_true')
+ subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
+ subparsers.required = True
+ subparsers.add_subparser_group('manualexecution', 'manual testcases', 300)
+ resulttool.manualexecution.register_commands(subparsers)
+ subparsers.add_subparser_group('setup', 'setup', 200)
+ resulttool.merge.register_commands(subparsers)
+ resulttool.store.register_commands(subparsers)
+ subparsers.add_subparser_group('analysis', 'analysis', 100)
+ resulttool.regression.register_commands(subparsers)
+ resulttool.report.register_commands(subparsers)
+ resulttool.log.register_commands(subparsers)
+
+ args = parser.parse_args()
+ if args.debug:
+ logger.setLevel(logging.DEBUG)
+ elif args.quiet:
+ logger.setLevel(logging.ERROR)
+
+ try:
+ ret = args.func(args, logger)
+ except argparse_oe.ArgumentUsageError as ae:
+ parser.error_subcommand(ae.message, ae.subcommand)
+ return ret
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
index 5df8c0f705..876c53c5d9 100755
--- a/scripts/rpm2cpio.sh
+++ b/scripts/rpm2cpio.sh
@@ -1,53 +1,54 @@
-#!/bin/sh
-
-# This comes from the RPM5 5.4.0 distribution.
-
-pkg=$1
-if [ "$pkg" = "" -o ! -e "$pkg" ]; then
- echo "no package supplied" 1>&2
- exit 1
-fi
-
-leadsize=96
-o=`expr $leadsize + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "sig il: $il dl: $dl"
-
-sigsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "hdr il: $il dl: $dl"
-
-hdrsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $hdrsize`
-EXTRACTOR="dd if=$pkg ibs=$o skip=1"
-
-COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
-if echo $COMPRESSION |grep -iq gzip; then
- DECOMPRESSOR=gunzip
-elif echo $COMPRESSION |grep -iq bzip2; then
- DECOMPRESSOR=bunzip2
-elif echo $COMPRESSION |grep -iq xz; then
- DECOMPRESSOR=unxz
-elif echo $COMPRESSION |grep -iq cpio; then
- DECOMPRESSOR=cat
-else
- # Most versions of file don't support LZMA, therefore we assume
- # anything not detected is LZMA
- DECOMPRESSOR=`which unlzma 2>/dev/null`
- case "$DECOMPRESSOR" in
- /* ) ;;
- * ) DECOMPRESSOR=`which lzmash 2>/dev/null`
- case "$DECOMPRESSOR" in
- /* ) DECOMPRESSOR="lzmash -d -c" ;;
- * ) DECOMPRESSOR=cat ;;
- esac
- ;;
- esac
-fi
-
-$EXTRACTOR 2>/dev/null | $DECOMPRESSOR
+#!/bin/sh -efu
+# This file comes from rpm 4.x distribution
+
+fatal() {
+ echo "$*" >&2
+ exit 1
+}
+
+pkg="$1"
+[ -n "$pkg" -a -e "$pkg" ] ||
+ fatal "No package supplied"
+
+_dd() {
+ local o="$1"; shift
+ dd if="$pkg" skip="$o" iflag=skip_bytes status=none $*
+}
+
+calcsize() {
+ offset=$(($1 + 8))
+
+ local i b b0 b1 b2 b3 b4 b5 b6 b7
+
+ i=0
+ while [ $i -lt 8 ]; do
+ b="$(_dd $(($offset + $i)) bs=1 count=1)"
+ [ -z "$b" ] &&
+ b="0" ||
+ b="$(exec printf '%u\n' "'$b")"
+ eval "b$i=\$b"
+ i=$(($i + 1))
+ done
+
+ rsize=$((8 + ((($b0 << 24) + ($b1 << 16) + ($b2 << 8) + $b3) << 4) + ($b4 << 24) + ($b5 << 16) + ($b6 << 8) + $b7))
+ offset=$(($offset + $rsize))
+}
+
+case "$(_dd 0 bs=8 count=1)" in
+ "$(printf '\355\253\356\333')"*) ;; # '\xed\xab\xee\xdb'
+ *) fatal "File doesn't look like rpm: $pkg" ;;
+esac
+
+calcsize 96
+sigsize=$rsize
+
+calcsize $(($offset + (8 - ($sigsize % 8)) % 8))
+hdrsize=$rsize
+
+case "$(_dd $offset bs=3 count=1)" in
+ "$(printf '\102\132')"*) _dd $offset | bunzip2 ;; # '\x42\x5a'
+ "$(printf '\037\213')"*) _dd $offset | gunzip ;; # '\x1f\x8b'
+ "$(printf '\375\067')"*) _dd $offset | xzcat ;; # '\xfd\x37'
+ "$(printf '\135\000')"*) _dd $offset | unlzma ;; # '\x5d\x00'
+ *) fatal "Unrecognized rpm file: $pkg" ;;
+esac
diff --git a/scripts/runqemu b/scripts/runqemu
index 45bcad7a80..ef454d67ff 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -5,18 +5,8 @@
# Copyright (C) 2006-2011 Linux Foundation
# Copyright (c) 2016 Wind River Systems, Inc.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
import sys
@@ -27,15 +17,20 @@ import fcntl
import shutil
import glob
import configparser
+import signal
+
+class RunQemuError(Exception):
+ """Custom exception to raise on known errors."""
+ pass
-class OEPathError(Exception):
+class OEPathError(RunQemuError):
"""Custom Exception to give better guidance on missing binaries"""
def __init__(self, message):
- self.message = "In order for this script to dynamically infer paths\n \
+ super().__init__("In order for this script to dynamically infer paths\n \
kernels or filesystem images, you either need bitbake in your PATH\n \
or to source oe-init-build-env before running this script.\n\n \
Dynamic path inference can be avoided by passing a *.qemuboot.conf to\n \
-runqemu, i.e. `runqemu /path/to/my-image-name.qemuboot.conf`\n\n %s" % message
+runqemu, i.e. `runqemu /path/to/my-image-name.qemuboot.conf`\n\n %s" % message)
def create_logger():
@@ -44,7 +39,7 @@ def create_logger():
# create console handler and set level to debug
ch = logging.StreamHandler()
- ch.setLevel(logging.INFO)
+ ch.setLevel(logging.DEBUG)
# create formatter
formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')
@@ -64,78 +59,56 @@ def print_usage():
Usage: you can run this script with any valid combination
of the following environment variables (in any order):
KERNEL - the kernel image file to use
+ BIOS - the bios image file to use
ROOTFS - the rootfs image file or nfsroot directory to use
+ DEVICE_TREE - the device tree blob to use
MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
Simplified QEMU command-line options can be passed with:
nographic - disable video console
+ sdl - choose the SDL UI frontend
+ gtk - choose the Gtk UI frontend
+ gl - enable virgl-based GL acceleration (also needs gtk or sdl options)
+ gl-es - enable virgl-based GL acceleration, using OpenGL ES (also needs gtk or sdl options)
+ egl-headless - enable headless EGL output; use vnc (via publicvnc option) or spice to see it
serial - enable a serial console on /dev/ttyS0
+ serialstdio - enable a serial console on the console (regardless of graphics mode)
slirp - enable user networking, no root privileges is required
+ snapshot - don't write changes to back to images
kvm - enable KVM when running x86/x86_64 (VT-capable CPU required)
kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
publicvnc - enable a VNC server open to all hosts
audio - enable audio
+ [*/]ovmf* - OVMF firmware file or base name for booting with UEFI
tcpserial=<port> - specify tcp serial port number
- biosdir=<dir> - specify custom bios dir
- biosfilename=<filename> - specify bios filename
qemuparams=<xyz> - specify custom parameters to QEMU
bootparams=<xyz> - specify custom kernel parameters during boot
- help: print this text
+ help, -h, --help: print this text
+ -d, --debug: Enable debug output
+ -q, --quiet: Hide most output except error messages
Examples:
+ runqemu
runqemu qemuarm
runqemu tmp/deploy/images/qemuarm
- runqemu tmp/deploy/images/qemux86/.qemuboot.conf
+ runqemu tmp/deploy/images/qemux86/<qemuboot.conf>
runqemu qemux86-64 core-image-sato ext4
runqemu qemux86-64 wic-image-minimal wic
runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
- runqemu qemux86 iso/hddimg/vmdk/qcow2/vdi/ramfs/cpio.gz...
+ runqemu qemux86 iso/hddimg/wic.vmdk/wic.qcow2/wic.vdi/ramfs/cpio.gz...
runqemu qemux86 qemuparams="-m 256"
runqemu qemux86 bootparams="psplash=false"
- runqemu path/to/<image>-<machine>.vmdk
runqemu path/to/<image>-<machine>.wic
+ runqemu path/to/<image>-<machine>.wic.vmdk
""")
def check_tun():
- """Check /dev/net/run"""
+ """Check /dev/net/tun"""
dev_tun = '/dev/net/tun'
if not os.path.exists(dev_tun):
- raise Exception("TUN control device %s is unavailable; you may need to enable TUN (e.g. sudo modprobe tun)" % dev_tun)
+ raise RunQemuError("TUN control device %s is unavailable; you may need to enable TUN (e.g. sudo modprobe tun)" % dev_tun)
if not os.access(dev_tun, os.W_OK):
- raise Exception("TUN control device %s is not writable, please fix (e.g. sudo chmod 666 %s)" % (dev_tun, dev_tun))
-
-def check_libgl(qemu_bin):
- cmd = 'ldd %s' % qemu_bin
- logger.info('Running %s...' % cmd)
- need_gl = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
- if re.search('libGLU', need_gl):
- # We can't run without a libGL.so
- libgl = False
- check_files = (('/usr/lib/libGL.so', '/usr/lib/libGLU.so'), \
- ('/usr/lib64/libGL.so', '/usr/lib64/libGLU.so'), \
- ('/usr/lib/*-linux-gnu/libGL.so', '/usr/lib/*-linux-gnu/libGLU.so'))
-
- for (f1, f2) in check_files:
- if re.search('\*', f1):
- for g1 in glob.glob(f1):
- if libgl:
- break
- if os.path.exists(g1):
- for g2 in glob.glob(f2):
- if os.path.exists(g2):
- libgl = True
- break
- if libgl:
- break
- else:
- if os.path.exists(f1) and os.path.exists(f2):
- libgl = True
- break
- if not libgl:
- logger.error("You need libGL.so and libGLU.so to exist in your library path to run the QEMU emulator.")
- logger.error("Ubuntu package names are: libgl1-mesa-dev and libglu1-mesa-dev.")
- logger.error("Fedora package names are: mesa-libGL-devel mesa-libGLU-devel.")
- raise Exception('%s requires libGLU, but not found' % qemu_bin)
+ raise RunQemuError("TUN control device %s is not writable, please fix (e.g. sudo chmod 666 %s)" % (dev_tun, dev_tun))
def get_first_file(cmds):
"""Return first file found in wildcard cmds"""
@@ -149,24 +122,43 @@ def get_first_file(cmds):
class BaseConfig(object):
def __init__(self):
- # Vars can be merged with .qemuboot.conf, use a dict to manage them.
- self.d = {
- 'MACHINE': '',
- 'DEPLOY_DIR_IMAGE': '',
- 'QB_KERNEL_ROOT': '/dev/vda',
- }
+ # The self.d saved vars from self.set(), part of them are from qemuboot.conf
+ self.d = {'QB_KERNEL_ROOT': '/dev/vda'}
+
+ # Supported env vars, add it here if a var can be got from env,
+ # and don't use os.getenv in the code.
+ self.env_vars = ('MACHINE',
+ 'ROOTFS',
+ 'KERNEL',
+ 'BIOS',
+ 'DEVICE_TREE',
+ 'DEPLOY_DIR_IMAGE',
+ 'OE_TMPDIR',
+ 'OECORE_NATIVE_SYSROOT',
+ )
self.qemu_opt = ''
self.qemu_opt_script = ''
- self.nfs_dir = ''
+ self.qemuparams = ''
self.clean_nfs_dir = False
self.nfs_server = ''
self.rootfs = ''
+ # File name(s) of a OVMF firmware file or variable store,
+ # to be added with -drive if=pflash.
+ # Found in the same places as the rootfs, with or without one of
+ # these suffices: qcow2, bin.
+ self.ovmf_bios = []
+ # When enrolling default Secure Boot keys, the hypervisor
+ # must provide the Platform Key and the first Key Exchange Key
+ # certificate in the Type 11 SMBIOS table.
+ self.ovmf_secboot_pkkek1 = ''
self.qemuboot = ''
self.qbconfload = False
self.kernel = ''
+ self.bios = ''
self.kernel_cmdline = ''
self.kernel_cmdline_script = ''
+ self.bootparams = ''
self.dtb = ''
self.fstype = ''
self.kvm_enabled = False
@@ -174,39 +166,114 @@ class BaseConfig(object):
self.slirp_enabled = False
self.nfs_instance = 0
self.nfs_running = False
+ self.serialconsole = False
self.serialstdio = False
self.cleantap = False
self.saved_stty = ''
self.audio_enabled = False
self.tcpserial_portnum = ''
- self.custombiosdir = ''
- self.lock = ''
- self.lock_descriptor = ''
+ self.taplock = ''
+ self.taplock_descriptor = None
+ self.portlocks = {}
self.bitbake_e = ''
self.snapshot = False
- self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 'cpio.gz', 'cpio', 'ramfs')
- self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'vmdk', 'qcow2', 'vdi', 'iso')
+ self.wictypes = ('wic', 'wic.vmdk', 'wic.qcow2', 'wic.vdi')
+ self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs',
+ 'cpio.gz', 'cpio', 'ramfs', 'tar.bz2', 'tar.gz')
+ self.vmtypes = ('hddimg', 'iso')
+ self.fsinfo = {}
+ self.network_device = "-device e1000,netdev=net0,mac=@MAC@"
+ # Use different mac section for tap and slirp to avoid
+ # conflicts, e.g., when one is running with tap, the other is
+ # running with slirp.
+ # The last section is dynamic, which is for avoiding conflicts,
+ # when multiple qemus are running, e.g., when multiple tap or
+ # slirp qemus are running.
+ self.mac_tap = "52:54:00:12:34:"
+ self.mac_slirp = "52:54:00:12:35:"
+ # pid of the actual qemu process
+ self.qemupid = None
+ # avoid cleanup twice
+ self.cleaned = False
+
+ def acquire_taplock(self, error=True):
+ logger.debug("Acquiring lockfile %s..." % self.taplock)
+ try:
+ self.taplock_descriptor = open(self.taplock, 'w')
+ fcntl.flock(self.taplock_descriptor, fcntl.LOCK_EX|fcntl.LOCK_NB)
+ except Exception as e:
+ msg = "Acquiring lockfile %s failed: %s" % (self.taplock, e)
+ if error:
+ logger.error(msg)
+ else:
+ logger.info(msg)
+ if self.taplock_descriptor:
+ self.taplock_descriptor.close()
+ self.taplock_descriptor = None
+ return False
+ return True
+
+ def release_taplock(self):
+ if self.taplock_descriptor:
+ logger.debug("Releasing lockfile for tap device '%s'" % self.tap)
+ fcntl.flock(self.taplock_descriptor, fcntl.LOCK_UN)
+ self.taplock_descriptor.close()
+ os.remove(self.taplock)
+ self.taplock_descriptor = None
+
+ def check_free_port(self, host, port, lockdir):
+ """ Check whether the port is free or not """
+ import socket
+ from contextlib import closing
+
+ lockfile = os.path.join(lockdir, str(port) + '.lock')
+ if self.acquire_portlock(lockfile):
+ with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
+ if sock.connect_ex((host, port)) == 0:
+ # Port is open, so not free
+ self.release_portlock(lockfile)
+ return False
+ else:
+ # Port is not open, so free
+ return True
+ else:
+ return False
- def acquire_lock(self):
- logger.info("Acquiring lockfile %s..." % self.lock)
+ def acquire_portlock(self, lockfile):
+ logger.debug("Acquiring lockfile %s..." % lockfile)
try:
- self.lock_descriptor = open(self.lock, 'w')
- fcntl.flock(self.lock_descriptor, fcntl.LOCK_EX|fcntl.LOCK_NB)
+ portlock_descriptor = open(lockfile, 'w')
+ self.portlocks.update({lockfile: portlock_descriptor})
+ fcntl.flock(self.portlocks[lockfile], fcntl.LOCK_EX|fcntl.LOCK_NB)
except Exception as e:
- logger.info("Acquiring lockfile %s failed: %s" % (self.lock, e))
- if self.lock_descriptor:
- self.lock_descriptor.close()
+ msg = "Acquiring lockfile %s failed: %s" % (lockfile, e)
+ logger.info(msg)
+ if lockfile in self.portlocks.keys() and self.portlocks[lockfile]:
+ self.portlocks[lockfile].close()
+ del self.portlocks[lockfile]
return False
return True
- def release_lock(self):
- fcntl.flock(self.lock_descriptor, fcntl.LOCK_UN)
- self.lock_descriptor.close()
- os.remove(self.lock)
+ def release_portlock(self, lockfile=None):
+ if lockfile != None:
+ logger.debug("Releasing lockfile '%s'" % lockfile)
+ fcntl.flock(self.portlocks[lockfile], fcntl.LOCK_UN)
+ self.portlocks[lockfile].close()
+ os.remove(lockfile)
+ del self.portlocks[lockfile]
+ elif len(self.portlocks):
+ for lockfile, descriptor in self.portlocks.items():
+ logger.debug("Releasing lockfile '%s'" % lockfile)
+ fcntl.flock(descriptor, fcntl.LOCK_UN)
+ descriptor.close()
+ os.remove(lockfile)
+ self.portlocks = {}
def get(self, key):
if key in self.d:
return self.d.get(key)
+ elif os.getenv(key):
+ return os.getenv(key)
else:
return ''
@@ -216,10 +283,10 @@ class BaseConfig(object):
def is_deploy_dir_image(self, p):
if os.path.isdir(p):
if not re.search('.qemuboot.conf$', '\n'.join(os.listdir(p)), re.M):
- logger.info("Can't find required *.qemuboot.conf in %s" % p)
+ logger.debug("Can't find required *.qemuboot.conf in %s" % p)
return False
- if not re.search('-image-', '\n'.join(os.listdir(p))):
- logger.info("Can't find *-image-* in %s" % p)
+ if not any(map(lambda name: '-image-' in name, os.listdir(p))):
+ logger.debug("Can't find *-image-* in %s" % p)
return False
return True
else:
@@ -227,30 +294,31 @@ class BaseConfig(object):
def check_arg_fstype(self, fst):
"""Check and set FSTYPE"""
- if fst not in self.fstypes + self.vmtypes:
- logger.warn("Maybe unsupported FSTYPE: %s" % fst)
+ if fst not in self.fstypes + self.vmtypes + self.wictypes:
+ logger.warning("Maybe unsupported FSTYPE: %s" % fst)
if not self.fstype or self.fstype == fst:
if fst == 'ramfs':
fst = 'cpio.gz'
+ if fst in ('tar.bz2', 'tar.gz'):
+ fst = 'nfs'
self.fstype = fst
else:
- raise Exception("Conflicting: FSTYPE %s and %s" % (self.fstype, fst))
+ raise RunQemuError("Conflicting: FSTYPE %s and %s" % (self.fstype, fst))
def set_machine_deploy_dir(self, machine, deploy_dir_image):
"""Set MACHINE and DEPLOY_DIR_IMAGE"""
- logger.info('MACHINE: %s' % machine)
+ logger.debug('MACHINE: %s' % machine)
self.set("MACHINE", machine)
- logger.info('DEPLOY_DIR_IMAGE: %s' % deploy_dir_image)
+ logger.debug('DEPLOY_DIR_IMAGE: %s' % deploy_dir_image)
self.set("DEPLOY_DIR_IMAGE", deploy_dir_image)
def check_arg_nfs(self, p):
if os.path.isdir(p):
- self.nfs_dir = p
+ self.rootfs = p
else:
m = re.match('(.*):(.*)', p)
self.nfs_server = m.group(1)
- self.nfs_dir = m.group(2)
- self.rootfs = ""
+ self.rootfs = m.group(2)
self.check_arg_fstype('nfs')
def check_arg_path(self, p):
@@ -259,6 +327,7 @@ class BaseConfig(object):
- Check whether is a kernel file
- Check whether is a image file
- Check whether it is a nfs dir
+ - Check whether it is a OVMF flash file
"""
if p.endswith('.qemuboot.conf'):
self.qemuboot = p
@@ -267,38 +336,53 @@ class BaseConfig(object):
re.search('zImage', p) or re.search('vmlinux', p) or \
re.search('fitImage', p) or re.search('uImage', p):
self.kernel = p
- elif os.path.exists(p) and (not os.path.isdir(p)) and re.search('-image-', os.path.basename(p)):
+ elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in os.path.basename(p):
self.rootfs = p
- dirpath = os.path.dirname(p)
- m = re.search('(.*)\.(.*)$', p)
- if m:
- qb = '%s%s' % (re.sub('\.rootfs$', '', m.group(1)), '.qemuboot.conf')
+ # Check filename against self.fstypes can hanlde <file>.cpio.gz,
+ # otherwise, its type would be "gz", which is incorrect.
+ fst = ""
+ for t in self.fstypes:
+ if p.endswith(t):
+ fst = t
+ break
+ if not fst:
+ m = re.search('.*\.(.*)$', self.rootfs)
+ if m:
+ fst = m.group(1)
+ if fst:
+ self.check_arg_fstype(fst)
+ qb = re.sub('\.' + fst + "$", '', self.rootfs)
+ qb = '%s%s' % (re.sub('\.rootfs$', '', qb), '.qemuboot.conf')
if os.path.exists(qb):
self.qemuboot = qb
self.qbconfload = True
else:
- logger.warn("%s doesn't exist" % qb)
- fst = m.group(2)
- self.check_arg_fstype(fst)
+ logger.warning("%s doesn't exist" % qb)
else:
- raise Exception("Can't find FSTYPE from: %s" % p)
- elif os.path.isdir(p) or re.search(':', arg) and re.search('/', arg):
+ raise RunQemuError("Can't find FSTYPE from: %s" % p)
+
+ elif os.path.isdir(p) or re.search(':', p) and re.search('/', p):
if self.is_deploy_dir_image(p):
- logger.info('DEPLOY_DIR_IMAGE: %s' % p)
+ logger.debug('DEPLOY_DIR_IMAGE: %s' % p)
self.set("DEPLOY_DIR_IMAGE", p)
else:
- logger.info("Assuming %s is an nfs rootfs" % p)
+ logger.debug("Assuming %s is an nfs rootfs" % p)
self.check_arg_nfs(p)
+ elif os.path.basename(p).startswith('ovmf'):
+ self.ovmf_bios.append(p)
else:
- raise Exception("Unknown path arg %s" % p)
+ raise RunQemuError("Unknown path arg %s" % p)
def check_arg_machine(self, arg):
"""Check whether it is a machine"""
- if self.get('MACHINE') and self.get('MACHINE') != arg or re.search('/', arg):
- raise Exception("Unknown arg: %s" % arg)
- elif self.get('MACHINE') == arg:
+ if self.get('MACHINE') == arg:
return
- logger.info('Assuming MACHINE = %s' % arg)
+ elif self.get('MACHINE') and self.get('MACHINE') != arg:
+ raise RunQemuError("Maybe conflicted MACHINE: %s vs %s" % (self.get('MACHINE'), arg))
+ elif re.search('/', arg):
+ raise RunQemuError("Unknown arg: %s" % arg)
+
+ logger.debug('Assuming MACHINE = %s' % arg)
# if we're running under testimage, or similarly as a child
# of an existing bitbake invocation, we can't invoke bitbake
@@ -306,20 +390,20 @@ class BaseConfig(object):
# FIXME: testimage.bbclass exports these two variables into env,
# are there other scenarios in which we need to support being
# invoked by bitbake?
- deploy = os.environ.get('DEPLOY_DIR_IMAGE')
- bbchild = deploy and os.environ.get('OE_TMPDIR')
+ deploy = self.get('DEPLOY_DIR_IMAGE')
+ bbchild = deploy and self.get('OE_TMPDIR')
if bbchild:
self.set_machine_deploy_dir(arg, deploy)
return
# also check whether we're running under a sourced toolchain
# environment file
- if os.environ.get('OECORE_NATIVE_SYSROOT'):
+ if self.get('OECORE_NATIVE_SYSROOT'):
self.set("MACHINE", arg)
return
cmd = 'MACHINE=%s bitbake -e' % arg
logger.info('Running %s...' % cmd)
- self.bitbake_e = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ self.bitbake_e = subprocess.check_output(cmd, shell=True).decode('utf-8')
# bitbake -e doesn't report invalid MACHINE as an error, so
# let's check DEPLOY_DIR_IMAGE to make sure that it is a valid
# MACHINE.
@@ -327,7 +411,7 @@ class BaseConfig(object):
if s:
deploy_dir_image = s.group(1)
else:
- raise Exception("bitbake -e %s" % self.bitbake_e)
+ raise RunQemuError("bitbake -e %s" % self.bitbake_e)
if self.is_deploy_dir_image(deploy_dir_image):
self.set_machine_deploy_dir(arg, deploy_dir_image)
else:
@@ -335,15 +419,62 @@ class BaseConfig(object):
self.set("MACHINE", arg)
def check_args(self):
+ for debug in ("-d", "--debug"):
+ if debug in sys.argv:
+ logger.setLevel(logging.DEBUG)
+ sys.argv.remove(debug)
+
+ for quiet in ("-q", "--quiet"):
+ if quiet in sys.argv:
+ logger.setLevel(logging.ERROR)
+ sys.argv.remove(quiet)
+
unknown_arg = ""
for arg in sys.argv[1:]:
- if arg in self.fstypes + self.vmtypes:
+ if arg in self.fstypes + self.vmtypes + self.wictypes:
self.check_arg_fstype(arg)
elif arg == 'nographic':
self.qemu_opt_script += ' -nographic'
self.kernel_cmdline_script += ' console=ttyS0'
+ elif arg == 'sdl':
+ if 'gl' in sys.argv[1:]:
+ self.qemu_opt_script += ' -vga virtio -display sdl,gl=on'
+ elif 'gl-es' in sys.argv[1:]:
+ self.qemu_opt_script += ' -vga virtio -display sdl,gl=es'
+ else:
+ self.qemu_opt_script += ' -display sdl'
+ elif arg == 'gtk':
+ if 'gl' in sys.argv[1:]:
+ self.qemu_opt_script += ' -vga virtio -display gtk,gl=on'
+ elif 'gl-es' in sys.argv[1:]:
+ self.qemu_opt_script += ' -vga virtio -display gtk,gl=es'
+ else:
+ self.qemu_opt_script += ' -display gtk'
+ elif arg == 'gl' or arg == 'gl-es':
+ # These args are handled inside sdl or gtk blocks above
+ pass
+ elif arg == 'egl-headless':
+ self.qemu_opt_script += ' -vga virtio -display egl-headless'
+ # As runqemu can be run within bitbake (when using testimage, for example),
+ # we need to ensure that we run host pkg-config, and that it does not
+ # get mis-directed to native build paths set by bitbake.
+ try:
+ del os.environ['PKG_CONFIG_PATH']
+ del os.environ['PKG_CONFIG_DIR']
+ del os.environ['PKG_CONFIG_LIBDIR']
+ del os.environ['PKG_CONFIG_SYSROOT_DIR']
+ except KeyError:
+ pass
+ try:
+ dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True)
+ except subprocess.CalledProcessError as e:
+ raise RunQemuError("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
+ os.environ['LIBGL_DRIVERS_PATH'] = dripath.decode('utf-8').strip()
elif arg == 'serial':
self.kernel_cmdline_script += ' console=ttyS0'
+ self.serialconsole = True
+ elif arg == "serialstdio":
+ self.kernel_cmdline_script += ' console=ttyS0'
self.serialstdio = True
elif arg == 'audio':
logger.info("Enabling audio in qemu")
@@ -360,43 +491,41 @@ class BaseConfig(object):
elif arg == 'publicvnc':
self.qemu_opt_script += ' -vnc :0'
elif arg.startswith('tcpserial='):
- self.tcpserial_portnum = arg[len('tcpserial='):]
- elif arg.startswith('biosdir='):
- self.custombiosdir = arg[len('biosdir='):]
- elif arg.startswith('biosfilename='):
- self.qemu_opt_script += ' -bios %s' % arg[len('biosfilename='):]
+ self.tcpserial_portnum = '%s' % arg[len('tcpserial='):]
elif arg.startswith('qemuparams='):
- self.qemu_opt_script += ' %s' % arg[len('qemuparams='):]
+ self.qemuparams = ' %s' % arg[len('qemuparams='):]
elif arg.startswith('bootparams='):
- self.kernel_cmdline_script += ' %s' % arg[len('bootparams='):]
+ self.bootparams = arg[len('bootparams='):]
elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)):
self.check_arg_path(os.path.abspath(arg))
- elif re.search('-image-', arg):
+ elif re.search(r'-image-|-image$', arg):
# Lazy rootfs
self.rootfs = arg
+ elif arg.startswith('ovmf'):
+ self.ovmf_bios.append(arg)
else:
- # At last, assume is it the MACHINE
+ # At last, assume it is the MACHINE
if (not unknown_arg) or unknown_arg == arg:
unknown_arg = arg
else:
- raise Exception("Can't handle two unknown args: %s %s" % (unknown_arg, arg))
+ raise RunQemuError("Can't handle two unknown args: %s %s\n"
+ "Try 'runqemu help' on how to use it" % \
+ (unknown_arg, arg))
# Check to make sure it is a valid machine
- if unknown_arg:
- if self.get('MACHINE') == unknown_arg:
- return
- if not self.get('DEPLOY_DIR_IMAGE'):
- # Trying to get DEPLOY_DIR_IMAGE from env.
- p = os.getenv('DEPLOY_DIR_IMAGE')
- if p and self.is_deploy_dir_image(p):
- machine = os.path.basename(p)
- if unknown_arg == machine:
- self.set_machine_deploy_dir(machine, p)
- return
- else:
- logger.info('DEPLOY_DIR_IMAGE: %s' % p)
- self.set("DEPLOY_DIR_IMAGE", p)
+ if unknown_arg and self.get('MACHINE') != unknown_arg:
+ if self.get('DEPLOY_DIR_IMAGE'):
+ machine = os.path.basename(self.get('DEPLOY_DIR_IMAGE'))
+ if unknown_arg == machine:
+ self.set("MACHINE", machine)
+
self.check_arg_machine(unknown_arg)
+ if not (self.get('DEPLOY_DIR_IMAGE') or self.qbconfload):
+ self.load_bitbake_env()
+ s = re.search('^DEPLOY_DIR_IMAGE="(.*)"', self.bitbake_e, re.M)
+ if s:
+ self.set("DEPLOY_DIR_IMAGE", s.group(1))
+
def check_kvm(self):
"""Check kvm and kvm-host"""
if not (self.kvm_enabled or self.vhost_enabled):
@@ -404,42 +533,48 @@ class BaseConfig(object):
return
if not self.get('QB_CPU_KVM'):
- raise Exception("QB_CPU_KVM is NULL, this board doesn't support kvm")
+ raise RunQemuError("QB_CPU_KVM is NULL, this board doesn't support kvm")
self.qemu_opt_script += ' %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU_KVM'))
yocto_kvm_wiki = "https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu"
yocto_paravirt_kvm_wiki = "https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM"
dev_kvm = '/dev/kvm'
dev_vhost = '/dev/vhost-net'
- with open('/proc/cpuinfo', 'r') as f:
- kvm_cap = re.search('vmx|svm', "".join(f.readlines()))
- if not kvm_cap:
- logger.error("You are trying to enable KVM on a cpu without VT support.")
- logger.error("Remove kvm from the command-line, or refer:")
- raise Exception(yocto_kvm_wiki)
+ if self.qemu_system.endswith(('i386', 'x86_64')):
+ with open('/proc/cpuinfo', 'r') as f:
+ kvm_cap = re.search('vmx|svm', "".join(f.readlines()))
+ if not kvm_cap:
+ logger.error("You are trying to enable KVM on a cpu without VT support.")
+ logger.error("Remove kvm from the command-line, or refer:")
+ raise RunQemuError(yocto_kvm_wiki)
if not os.path.exists(dev_kvm):
logger.error("Missing KVM device. Have you inserted kvm modules?")
logger.error("For further help see:")
- raise Exception(yocto_kvm_wiki)
+ raise RunQemuError(yocto_kvm_wiki)
if os.access(dev_kvm, os.W_OK|os.R_OK):
self.qemu_opt_script += ' -enable-kvm'
+ if self.get('MACHINE') == "qemux86":
+ # Workaround for broken APIC window on pre 4.15 host kernels which causes boot hangs
+ # See YOCTO #12301
+ # On 64 bit we use x2apic
+ self.kernel_cmdline_script += " clocksource=kvm-clock hpet=disable noapic nolapic"
else:
logger.error("You have no read or write permission on /dev/kvm.")
logger.error("Please change the ownership of this file as described at:")
- raise Exception(yocto_kvm_wiki)
+ raise RunQemuError(yocto_kvm_wiki)
if self.vhost_enabled:
if not os.path.exists(dev_vhost):
logger.error("Missing virtio net device. Have you inserted vhost-net module?")
logger.error("For further help see:")
- raise Exception(yocto_paravirt_kvm_wiki)
+ raise RunQemuError(yocto_paravirt_kvm_wiki)
if not os.access(dev_kvm, os.W_OK|os.R_OK):
logger.error("You have no read or write permission on /dev/vhost-net.")
logger.error("Please change the ownership of this file as described at:")
- raise Exception(yocto_kvm_wiki)
+ raise RunQemuError(yocto_kvm_wiki)
def check_fstype(self):
"""Check and setup FSTYPE"""
@@ -448,11 +583,54 @@ class BaseConfig(object):
if fstype:
self.fstype = fstype
else:
- raise Exception("FSTYPE is NULL!")
+ raise RunQemuError("FSTYPE is NULL!")
+
+ # parse QB_FSINFO into dict, e.g. { 'wic': ['no-kernel-in-fs', 'a-flag'], 'ext4': ['another-flag']}
+ wic_fs = False
+ qb_fsinfo = self.get('QB_FSINFO')
+ if qb_fsinfo:
+ qb_fsinfo = qb_fsinfo.split()
+ for fsinfo in qb_fsinfo:
+ try:
+ fstype, fsflag = fsinfo.split(':')
+
+ if fstype == 'wic':
+ if fsflag == 'no-kernel-in-fs':
+ wic_fs = True
+ elif fsflag == 'kernel-in-fs':
+ wic_fs = False
+ else:
+ logger.warn('Unknown flag "%s:%s" in QB_FSINFO', fstype, fsflag)
+ continue
+ else:
+ logger.warn('QB_FSINFO is not supported for image type "%s"', fstype)
+ continue
+
+ if fstype in self.fsinfo:
+ self.fsinfo[fstype].append(fsflag)
+ else:
+ self.fsinfo[fstype] = [fsflag]
+ except Exception:
+ logger.error('Invalid parameter "%s" in QB_FSINFO', fsinfo)
+
+ # treat wic images as vmimages (with kernel) or as fsimages (rootfs only)
+ if wic_fs:
+ self.fstypes = self.fstypes + self.wictypes
+ else:
+ self.vmtypes = self.vmtypes + self.wictypes
def check_rootfs(self):
"""Check and set rootfs"""
+ if self.fstype == "none":
+ return
+
+ if self.get('ROOTFS'):
+ if not self.rootfs:
+ self.rootfs = self.get('ROOTFS')
+ elif self.get('ROOTFS') != self.rootfs:
+ raise RunQemuError("Maybe conflicted ROOTFS: %s vs %s" % (self.get('ROOTFS'), self.rootfs))
+
if self.fstype == 'nfs':
return
@@ -467,99 +645,186 @@ class BaseConfig(object):
cmds = (cmd_name, cmd_link)
self.rootfs = get_first_file(cmds)
if not self.rootfs:
- raise Exception("Failed to find rootfs: %s or %s" % cmds)
+ raise RunQemuError("Failed to find rootfs: %s or %s" % cmds)
if not os.path.exists(self.rootfs):
- raise Exception("Can't find rootfs: %s" % self.rootfs)
+ raise RunQemuError("Can't find rootfs: %s" % self.rootfs)
+
+ def setup_pkkek1(self):
+ """
+ Extract from PEM certificate the Platform Key and first Key
+ Exchange Key certificate string. The hypervisor needs to provide
+ it in the Type 11 SMBIOS table
+ """
+ pemcert = '%s/%s' % (self.get('DEPLOY_DIR_IMAGE'), 'OvmfPkKek1.pem')
+ try:
+ with open(pemcert, 'r') as pemfile:
+ key = pemfile.read().replace('\n', ''). \
+ replace('-----BEGIN CERTIFICATE-----', ''). \
+ replace('-----END CERTIFICATE-----', '')
+ self.ovmf_secboot_pkkek1 = key
+
+ except FileNotFoundError:
+ raise RunQemuError("Can't open PEM certificate %s " % pemcert)
+
+ def check_ovmf(self):
+ """Check and set full path for OVMF firmware and variable file(s)."""
+
+ for index, ovmf in enumerate(self.ovmf_bios):
+ if os.path.exists(ovmf):
+ continue
+ for suffix in ('qcow2', 'bin'):
+ path = '%s/%s.%s' % (self.get('DEPLOY_DIR_IMAGE'), ovmf, suffix)
+ if os.path.exists(path):
+ self.ovmf_bios[index] = path
+ if ovmf.endswith('secboot'):
+ self.setup_pkkek1()
+ break
+ else:
+ raise RunQemuError("Can't find OVMF firmware: %s" % ovmf)
def check_kernel(self):
- """Check and set kernel, dtb"""
+ """Check and set kernel"""
# The vm image doesn't need a kernel
if self.fstype in self.vmtypes:
return
+ # See if the user supplied a KERNEL option
+ if self.get('KERNEL'):
+ self.kernel = self.get('KERNEL')
+
+ # QB_DEFAULT_KERNEL is always a full file path
+ kernel_name = os.path.basename(self.get('QB_DEFAULT_KERNEL'))
+
+ # The user didn't want a kernel to be loaded
+ if kernel_name == "none" and not self.kernel:
+ return
+
deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
if not self.kernel:
- kernel_match_name = "%s/%s" % (deploy_dir_image, self.get('QB_DEFAULT_KERNEL'))
+ kernel_match_name = "%s/%s" % (deploy_dir_image, kernel_name)
kernel_match_link = "%s/%s" % (deploy_dir_image, self.get('KERNEL_IMAGETYPE'))
kernel_startswith = "%s/%s*" % (deploy_dir_image, self.get('KERNEL_IMAGETYPE'))
cmds = (kernel_match_name, kernel_match_link, kernel_startswith)
self.kernel = get_first_file(cmds)
if not self.kernel:
- raise Exception('KERNEL not found: %s, %s or %s' % cmds)
+ raise RunQemuError('KERNEL not found: %s, %s or %s' % cmds)
if not os.path.exists(self.kernel):
- raise Exception("KERNEL %s not found" % self.kernel)
+ raise RunQemuError("KERNEL %s not found" % self.kernel)
+
+ def check_dtb(self):
+ """Check and set dtb"""
+ # Did the user specify a device tree?
+ if self.get('DEVICE_TREE'):
+ self.dtb = self.get('DEVICE_TREE')
+ if not os.path.exists(self.dtb):
+ raise RunQemuError('Specified DTB not found: %s' % self.dtb)
+ return
dtb = self.get('QB_DTB')
if dtb:
+ deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
cmd_match = "%s/%s" % (deploy_dir_image, dtb)
cmd_startswith = "%s/%s*" % (deploy_dir_image, dtb)
cmd_wild = "%s/*.dtb" % deploy_dir_image
cmds = (cmd_match, cmd_startswith, cmd_wild)
self.dtb = get_first_file(cmds)
if not os.path.exists(self.dtb):
- raise Exception('DTB not found: %s, %s or %s' % cmds)
+ raise RunQemuError('DTB not found: %s, %s or %s' % cmds)
+
+ def check_bios(self):
+ """Check and set bios"""
- def check_biosdir(self):
- """Check custombiosdir"""
- if not self.custombiosdir:
+ # See if the user supplied a BIOS option
+ if self.get('BIOS'):
+ self.bios = self.get('BIOS')
+
+ # QB_DEFAULT_BIOS is always a full file path
+ bios_name = os.path.basename(self.get('QB_DEFAULT_BIOS'))
+
+ # The user didn't want a bios to be loaded
+ if (bios_name == "" or bios_name == "none") and not self.bios:
return
- biosdir = ""
- biosdir_native = "%s/%s" % (self.get('STAGING_DIR_NATIVE'), self.custombiosdir)
- biosdir_host = "%s/%s" % (self.get('STAGING_DIR_HOST'), self.custombiosdir)
- for i in (self.custombiosdir, biosdir_native, biosdir_host):
- if os.path.isdir(i):
- biosdir = i
- break
+ if not self.bios:
+ deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
+ self.bios = "%s/%s" % (deploy_dir_image, bios_name)
+
+ if not self.bios:
+ raise RunQemuError('BIOS not found: %s' % bios_match_name)
+
+ if not os.path.exists(self.bios):
+ raise RunQemuError("KERNEL %s not found" % self.bios)
- if biosdir:
- logger.info("Assuming biosdir is: %s" % biosdir)
- self.qemu_opt_script += ' -L %s' % biosdir
- else:
- logger.error("Custom BIOS directory not found. Tried: %s, %s, and %s" % (self.custombiosdir, biosdir_native, biosdir_host))
- raise Exception("Invalid custombiosdir: %s" % self.custombiosdir)
def check_mem(self):
- s = re.search('-m +([0-9]+)', self.qemu_opt_script)
+ """
+ Both qemu and kernel needs memory settings, so check QB_MEM and set it
+ for both.
+ """
+ s = re.search('-m +([0-9]+)', self.qemuparams)
if s:
self.set('QB_MEM', '-m %s' % s.group(1))
elif not self.get('QB_MEM'):
- logger.info('QB_MEM is not set, use 512M by default')
- self.set('QB_MEM', '-m 512')
+ logger.info('QB_MEM is not set, use 256M by default')
+ self.set('QB_MEM', '-m 256')
+
+ # Check and remove M or m suffix
+ qb_mem = self.get('QB_MEM')
+ if qb_mem.endswith('M') or qb_mem.endswith('m'):
+ qb_mem = qb_mem[:-1]
+
+ # Add -m prefix it not present
+ if not qb_mem.startswith('-m'):
+ qb_mem = '-m %s' % qb_mem
+
+ self.set('QB_MEM', qb_mem)
+
+ mach = self.get('MACHINE')
+ if not mach.startswith('qemumips'):
+ self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
- self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
self.qemu_opt_script += ' %s' % self.get('QB_MEM')
def check_tcpserial(self):
if self.tcpserial_portnum:
+ ports = self.tcpserial_portnum.split(':')
+ port = ports[0]
if self.get('QB_TCPSERIAL_OPT'):
- self.qemu_opt_script += ' ' + self.get('QB_TCPSERIAL_OPT').replace('@PORT@', self.tcpserial_portnum)
+ self.qemu_opt_script += ' ' + self.get('QB_TCPSERIAL_OPT').replace('@PORT@', port)
else:
- self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % self.tcpserial_portnum
+ self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % port
+
+ if len(ports) > 1:
+ for port in ports[1:]:
+ self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % port
def check_and_set(self):
"""Check configs sanity and set when needed"""
self.validate_paths()
- check_tun()
+ if not self.slirp_enabled:
+ check_tun()
# Check audio
if self.audio_enabled:
if not self.get('QB_AUDIO_DRV'):
- raise Exception("QB_AUDIO_DRV is NULL, this board doesn't support audio")
+ raise RunQemuError("QB_AUDIO_DRV is NULL, this board doesn't support audio")
if not self.get('QB_AUDIO_OPT'):
- logger.warn('QB_AUDIO_OPT is NULL, you may need define it to make audio work')
+ logger.warning('QB_AUDIO_OPT is NULL, you may need define it to make audio work')
else:
self.qemu_opt_script += ' %s' % self.get('QB_AUDIO_OPT')
os.putenv('QEMU_AUDIO_DRV', self.get('QB_AUDIO_DRV'))
else:
os.putenv('QEMU_AUDIO_DRV', 'none')
+ self.check_qemu_system()
self.check_kvm()
self.check_fstype()
self.check_rootfs()
+ self.check_ovmf()
self.check_kernel()
- self.check_biosdir()
+ self.check_dtb()
+ self.check_bios()
self.check_mem()
self.check_tcpserial()
@@ -567,10 +832,8 @@ class BaseConfig(object):
if not self.qemuboot:
if self.get('DEPLOY_DIR_IMAGE'):
deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
- elif os.getenv('DEPLOY_DIR_IMAGE'):
- deploy_dir_image = os.getenv('DEPLOY_DIR_IMAGE')
else:
- logger.info("Can't find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL!")
+ logger.warning("Can't find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL!")
return
if self.rootfs and not os.path.exists(self.rootfs):
@@ -582,10 +845,21 @@ class BaseConfig(object):
self.rootfs, machine)
else:
cmd = 'ls -t %s/*.qemuboot.conf' % deploy_dir_image
- logger.info('Running %s...' % cmd)
- qbs = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ logger.debug('Running %s...' % cmd)
+ try:
+ qbs = subprocess.check_output(cmd, shell=True).decode('utf-8')
+ except subprocess.CalledProcessError as err:
+ raise RunQemuError(err)
if qbs:
- self.qemuboot = qbs.split()[0]
+ for qb in qbs.split():
+ # Don't use initramfs when other choices unless fstype is ramfs
+ if '-initramfs-' in os.path.basename(qb) and self.fstype != 'cpio.gz':
+ continue
+ self.qemuboot = qb
+ break
+ if not self.qemuboot:
+ # Use the first one when no choice
+ self.qemuboot = qbs.split()[0]
self.qbconfload = True
if not self.qemuboot:
@@ -594,14 +868,18 @@ class BaseConfig(object):
return
if not os.path.exists(self.qemuboot):
- raise Exception("Failed to find <image>.qemuboot.conf!")
+ raise RunQemuError("Failed to find %s (wrong image name or BSP does not support running under qemu?)." % self.qemuboot)
- logger.info('CONFFILE: %s' % self.qemuboot)
+ logger.debug('CONFFILE: %s' % self.qemuboot)
cf = configparser.ConfigParser()
cf.read(self.qemuboot)
for k, v in cf.items('config_bsp'):
k_upper = k.upper()
+ if v.startswith("../"):
+ v = os.path.abspath(os.path.dirname(self.qemuboot) + "/" + v)
+ elif v == ".":
+ v = os.path.dirname(self.qemuboot)
self.set(k_upper, v)
def validate_paths(self):
@@ -610,8 +888,8 @@ class BaseConfig(object):
# artefacts are relative to that file, rather than in whatever
# directory DEPLOY_DIR_IMAGE in the conf file points to.
if self.qbconfload:
- imgdir = os.path.dirname(self.qemuboot)
- if imgdir != self.get('DEPLOY_DIR_IMAGE'):
+ imgdir = os.path.realpath(os.path.dirname(self.qemuboot))
+ if imgdir != os.path.realpath(self.get('DEPLOY_DIR_IMAGE')):
logger.info('Setting DEPLOY_DIR_IMAGE to folder containing %s (%s)' % (self.qemuboot, imgdir))
self.set('DEPLOY_DIR_IMAGE', imgdir)
@@ -626,7 +904,7 @@ class BaseConfig(object):
self.load_bitbake_env()
if self.bitbake_e:
- native_vars = ['STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE']
+ native_vars = ['STAGING_DIR_NATIVE']
for nv in native_vars:
s = re.search('^%s="(.*)"' % nv, self.bitbake_e, re.M)
if s and s.group(1) != self.get(nv):
@@ -637,8 +915,8 @@ class BaseConfig(object):
# be able to call `bitbake -e`, then try:
# - get OE_TMPDIR from environment and guess paths based on it
# - get OECORE_NATIVE_SYSROOT from environment (for sdk)
- tmpdir = os.environ.get('OE_TMPDIR', None)
- oecore_native_sysroot = os.environ.get('OECORE_NATIVE_SYSROOT', None)
+ tmpdir = self.get('OE_TMPDIR')
+ oecore_native_sysroot = self.get('OECORE_NATIVE_SYSROOT')
if tmpdir:
logger.info('Setting STAGING_DIR_NATIVE and STAGING_BINDIR_NATIVE relative to OE_TMPDIR (%s)' % tmpdir)
hostos, _, _, _, machine = os.uname()
@@ -655,19 +933,30 @@ class BaseConfig(object):
self.set('STAGING_BINDIR_NATIVE', '%s/usr/bin' % self.get('STAGING_DIR_NATIVE'))
def print_config(self):
- logger.info('Continuing with the following parameters:\n')
+ logoutput = ['Continuing with the following parameters:']
if not self.fstype in self.vmtypes:
- print('KERNEL: [%s]' % self.kernel)
+ logoutput.append('KERNEL: [%s]' % self.kernel)
+ if self.bios:
+ logoutput.append('BIOS: [%s]' % self.bios)
if self.dtb:
- print('DTB: [%s]' % self.dtb)
- print('MACHINE: [%s]' % self.get('MACHINE'))
- print('FSTYPE: [%s]' % self.fstype)
+ logoutput.append('DTB: [%s]' % self.dtb)
+ logoutput.append('MACHINE: [%s]' % self.get('MACHINE'))
+ try:
+ fstype_flags = ' (' + ', '.join(self.fsinfo[self.fstype]) + ')'
+ except KeyError:
+ fstype_flags = ''
+ logoutput.append('FSTYPE: [%s%s]' % (self.fstype, fstype_flags))
if self.fstype == 'nfs':
- print('NFS_DIR: [%s]' % self.nfs_dir)
+ logoutput.append('NFS_DIR: [%s]' % self.rootfs)
else:
- print('ROOTFS: [%s]' % self.rootfs)
- print('CONFFILE: [%s]' % self.qemuboot)
- print('')
+ logoutput.append('ROOTFS: [%s]' % self.rootfs)
+ if self.ovmf_bios:
+ logoutput.append('OVMF: %s' % self.ovmf_bios)
+ if (self.ovmf_secboot_pkkek1):
+ logoutput.append('SECBOOT PKKEK1: [%s...]' % self.ovmf_secboot_pkkek1[0:100])
+ logoutput.append('CONFFILE: [%s]' % self.qemuboot)
+ logoutput.append('')
+ logger.info('\n'.join(logoutput))
def setup_nfs(self):
if not self.nfs_server:
@@ -676,25 +965,36 @@ class BaseConfig(object):
else:
self.nfs_server = '192.168.7.1'
- nfs_instance = int(self.nfs_instance)
-
- mountd_rpcport = 21111 + nfs_instance
- nfsd_rpcport = 11111 + nfs_instance
- nfsd_port = 3049 + 2 * nfs_instance
- mountd_port = 3048 + 2 * nfs_instance
- unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s" % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
- self.unfs_opts = unfs_opts
+ # Figure out a new nfs_instance to allow multiple qemus running.
+ ps = subprocess.check_output(("ps", "auxww")).decode('utf-8')
+ pattern = '/bin/unfsd .* -i .*\.pid -e .*/exports([0-9]+) '
+ all_instances = re.findall(pattern, ps, re.M)
+ if all_instances:
+ all_instances.sort(key=int)
+ self.nfs_instance = int(all_instances.pop()) + 1
+
+ nfsd_port = 3049 + 2 * self.nfs_instance
+ mountd_port = 3048 + 2 * self.nfs_instance
+
+ # Export vars for runqemu-export-rootfs
+ export_dict = {
+ 'NFS_INSTANCE': self.nfs_instance,
+ 'NFSD_PORT': nfsd_port,
+ 'MOUNTD_PORT': mountd_port,
+ }
+ for k, v in export_dict.items():
+ # Use '%s' since they are integers
+ os.putenv(k, '%s' % v)
- p = '%s/.runqemu-sdk/pseudo' % os.getenv('HOME')
- os.putenv('PSEUDO_LOCALSTATEDIR', p)
+ self.unfs_opts="nfsvers=3,port=%s,udp,mountport=%s" % (nfsd_port, mountd_port)
- # Extract .tar.bz2 or .tar.bz if no self.nfs_dir
- if not self.nfs_dir:
+ # Extract .tar.bz2 or .tar.bz if no nfs dir
+ if not (self.rootfs and os.path.isdir(self.rootfs)):
src_prefix = '%s/%s' % (self.get('DEPLOY_DIR_IMAGE'), self.get('IMAGE_LINK_NAME'))
dest = "%s-nfsroot" % src_prefix
if os.path.exists('%s.pseudo_state' % dest):
logger.info('Use %s as NFS_DIR' % dest)
- self.nfs_dir = dest
+ self.rootfs = dest
else:
src = ""
src1 = '%s.tar.bz2' % src_prefix
@@ -704,29 +1004,67 @@ class BaseConfig(object):
elif os.path.exists(src2):
src = src2
if not src:
- raise Exception("No NFS_DIR is set, and can't find %s or %s to extract" % (src1, src2))
+ raise RunQemuError("No NFS_DIR is set, and can't find %s or %s to extract" % (src1, src2))
logger.info('NFS_DIR not found, extracting %s to %s' % (src, dest))
- cmd = 'runqemu-extract-sdk %s %s' % (src, dest)
- logger.info('Running %s...' % cmd)
- if subprocess.call(cmd, shell=True) != 0:
- raise Exception('Failed to run %s' % cmd)
+ cmd = ('runqemu-extract-sdk', src, dest)
+ logger.info('Running %s...' % str(cmd))
+ if subprocess.call(cmd) != 0:
+ raise RunQemuError('Failed to run %s' % cmd)
self.clean_nfs_dir = True
- self.nfs_dir = dest
+ self.rootfs = dest
# Start the userspace NFS server
- cmd = 'runqemu-export-rootfs restart %s' % self.nfs_dir
- logger.info('Running %s...' % cmd)
- if subprocess.call(cmd, shell=True) != 0:
- raise Exception('Failed to run %s' % cmd)
+ cmd = ('runqemu-export-rootfs', 'start', self.rootfs)
+ logger.info('Running %s...' % str(cmd))
+ if subprocess.call(cmd) != 0:
+ raise RunQemuError('Failed to run %s' % cmd)
self.nfs_running = True
-
def setup_slirp(self):
+ """Setup user networking"""
+
if self.fstype == 'nfs':
self.setup_nfs()
self.kernel_cmdline_script += ' ip=dhcp'
- self.set('NETWORK_CMD', self.get('QB_SLIRP_OPT'))
+ # Port mapping
+ hostfwd = ",hostfwd=tcp::2222-:22,hostfwd=tcp::2323-:23"
+ qb_slirp_opt_default = "-netdev user,id=net0%s,tftp=%s" % (hostfwd, self.get('DEPLOY_DIR_IMAGE'))
+ qb_slirp_opt = self.get('QB_SLIRP_OPT') or qb_slirp_opt_default
+ # Figure out the port
+ ports = re.findall('hostfwd=[^-]*:([0-9]+)-[^,-]*', qb_slirp_opt)
+ ports = [int(i) for i in ports]
+ mac = 2
+
+ lockdir = "/tmp/qemu-port-locks"
+ if not os.path.exists(lockdir):
+ # There might be a race issue when multi runqemu processess are
+ # running at the same time.
+ try:
+ os.mkdir(lockdir)
+ os.chmod(lockdir, 0o777)
+ except FileExistsError:
+ pass
+
+ # Find a free port to avoid conflicts
+ for p in ports[:]:
+ p_new = p
+ while not self.check_free_port('localhost', p_new, lockdir):
+ p_new += 1
+ mac += 1
+ while p_new in ports:
+ p_new += 1
+ mac += 1
+ if p != p_new:
+ ports.append(p_new)
+ qb_slirp_opt = re.sub(':%s-' % p, ':%s-' % p_new, qb_slirp_opt)
+ logger.info("Port forward changed: %s -> %s" % (p, p_new))
+ mac = "%s%02x" % (self.mac_slirp, mac)
+ self.set('NETWORK_CMD', '%s %s' % (self.network_device.replace('@MAC@', mac), qb_slirp_opt))
+ # Print out port foward
+ hostfwd = re.findall('(hostfwd=[^,]*)', qb_slirp_opt)
+ if hostfwd:
+ logger.info('Port forward: %s' % ' '.join(hostfwd))
def setup_tap(self):
"""Setup tap"""
@@ -741,6 +1079,9 @@ class BaseConfig(object):
lockdir = "/tmp/qemu-tap-locks"
if not (self.qemuifup and self.qemuifdown and ip):
+ logger.error("runqemu-ifup: %s" % self.qemuifup)
+ logger.error("runqemu-ifdown: %s" % self.qemuifdown)
+ logger.error("ip: %s" % ip)
raise OEPathError("runqemu-ifup, runqemu-ifdown or ip not found")
if not os.path.exists(lockdir):
@@ -748,22 +1089,23 @@ class BaseConfig(object):
# running at the same time.
try:
os.mkdir(lockdir)
+ os.chmod(lockdir, 0o777)
except FileExistsError:
pass
- cmd = '%s link' % ip
- logger.info('Running %s...' % cmd)
- ip_link = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ cmd = (ip, 'link')
+ logger.debug('Running %s...' % str(cmd))
+ ip_link = subprocess.check_output(cmd).decode('utf-8')
# Matches line like: 6: tap0: <foo>
- possibles = re.findall('^[1-9]+: +(tap[0-9]+): <.*', ip_link, re.M)
+ possibles = re.findall('^[0-9]+: +(tap[0-9]+): <.*', ip_link, re.M)
tap = ""
for p in possibles:
lockfile = os.path.join(lockdir, p)
if os.path.exists('%s.skip' % lockfile):
logger.info('Found %s.skip, skipping %s' % (lockfile, p))
continue
- self.lock = lockfile + '.lock'
- if self.acquire_lock():
+ self.taplock = lockfile + '.lock'
+ if self.acquire_taplock(error=False):
tap = p
logger.info("Using preconfigured tap device %s" % tap)
logger.info("If this is not intended, touch %s.skip to make runqemu skip %s." %(lockfile, tap))
@@ -773,83 +1115,108 @@ class BaseConfig(object):
if os.path.exists(nosudo_flag):
logger.error("Error: There are no available tap devices to use for networking,")
logger.error("and I see %s exists, so I am not going to try creating" % nosudo_flag)
- raise Exception("a new one with sudo.")
+ raise RunQemuError("a new one with sudo.")
gid = os.getgid()
uid = os.getuid()
logger.info("Setting up tap interface under sudo")
- cmd = 'sudo %s %s %s %s' % (self.qemuifup, uid, gid, self.get('STAGING_DIR_NATIVE'))
- tap = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8').rstrip('\n')
+ cmd = ('sudo', self.qemuifup, str(uid), str(gid), self.bindir_native)
+ try:
+ tap = subprocess.check_output(cmd).decode('utf-8').strip()
+ except subprocess.CalledProcessError as e:
+ logger.error('Setting up tap device failed:\n%s\nRun runqemu-gen-tapdevs to manually create one.' % str(e))
+ sys.exit(1)
lockfile = os.path.join(lockdir, tap)
- self.lock = lockfile + '.lock'
- self.acquire_lock()
+ self.taplock = lockfile + '.lock'
+ self.acquire_taplock()
self.cleantap = True
- logger.info('Created tap: %s' % tap)
+ logger.debug('Created tap: %s' % tap)
if not tap:
logger.error("Failed to setup tap device. Run runqemu-gen-tapdevs to manually create.")
- return 1
+ sys.exit(1)
self.tap = tap
- n0 = tap[3:]
- n1 = int(n0) * 2 + 1
- n2 = n1 + 1
- self.nfs_instance = n0
+ tapnum = int(tap[3:])
+ gateway = tapnum * 2 + 1
+ client = gateway + 1
if self.fstype == 'nfs':
self.setup_nfs()
- self.kernel_cmdline_script += " ip=192.168.7.%s::192.168.7.%s:255.255.255.0" % (n2, n1)
- mac = "52:54:00:12:34:%02x" % n2
+ netconf = "192.168.7.%s::192.168.7.%s:255.255.255.0" % (client, gateway)
+ logger.info("Network configuration: %s", netconf)
+ self.kernel_cmdline_script += " ip=%s" % netconf
+ mac = "%s%02x" % (self.mac_tap, client)
qb_tap_opt = self.get('QB_TAP_OPT')
if qb_tap_opt:
- qemu_tap_opt = qb_tap_opt.replace('@TAP@', tap).replace('@MAC@', mac)
+ qemu_tap_opt = qb_tap_opt.replace('@TAP@', tap)
else:
- qemu_tap_opt = "-device virtio-net-pci,netdev=net0,mac=%s -netdev tap,id=net0,ifname=%s,script=no,downscript=no" % (mac, self.tap)
+ qemu_tap_opt = "-netdev tap,id=net0,ifname=%s,script=no,downscript=no" % (self.tap)
if self.vhost_enabled:
qemu_tap_opt += ',vhost=on'
- self.set('NETWORK_CMD', qemu_tap_opt)
+ self.set('NETWORK_CMD', '%s %s' % (self.network_device.replace('@MAC@', mac), qemu_tap_opt))
def setup_network(self):
- cmd = "stty -g"
- self.saved_stty = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ if self.get('QB_NET') == 'none':
+ return
+ if sys.stdin.isatty():
+ self.saved_stty = subprocess.check_output(("stty", "-g")).decode('utf-8').strip()
+ self.network_device = self.get('QB_NETWORK_DEVICE') or self.network_device
if self.slirp_enabled:
self.setup_slirp()
else:
self.setup_tap()
+ def setup_rootfs(self):
+ if self.get('QB_ROOTFS') == 'none':
+ return
+ if 'wic.' in self.fstype:
+ self.fstype = self.fstype[4:]
+ rootfs_format = self.fstype if self.fstype in ('vmdk', 'qcow2', 'vdi') else 'raw'
+
qb_rootfs_opt = self.get('QB_ROOTFS_OPT')
if qb_rootfs_opt:
self.rootfs_options = qb_rootfs_opt.replace('@ROOTFS@', self.rootfs)
else:
- self.rootfs_options = '-drive file=%s,if=virtio,format=raw' % self.rootfs
+ self.rootfs_options = '-drive file=%s,if=virtio,format=%s' % (self.rootfs, rootfs_format)
if self.fstype in ('cpio.gz', 'cpio'):
self.kernel_cmdline = 'root=/dev/ram0 rw debugshell'
self.rootfs_options = '-initrd %s' % self.rootfs
else:
+ vm_drive = ''
if self.fstype in self.vmtypes:
if self.fstype == 'iso':
- vm_drive = '-cdrom %s' % self.rootfs
- else:
- cmd1 = "grep -q 'root=/dev/sd' %s" % self.rootfs
- cmd2 = "grep -q 'root=/dev/hd' %s" % self.rootfs
- if subprocess.call(cmd1, shell=True) == 0:
+ vm_drive = '-drive file=%s,if=virtio,media=cdrom' % self.rootfs
+ elif self.get('QB_DRIVE_TYPE'):
+ drive_type = self.get('QB_DRIVE_TYPE')
+ if drive_type.startswith("/dev/sd"):
logger.info('Using scsi drive')
- vm_drive = '-drive if=none,id=hd,file=%s -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd' % self.rootfs
- elif subprocess.call(cmd2, shell=True) == 0:
- logger.info('Using scsi drive')
- vm_drive = self.rootfs
+ vm_drive = '-drive if=none,id=hd,file=%s,format=%s -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd' \
+ % (self.rootfs, rootfs_format)
+ elif drive_type.startswith("/dev/hd"):
+ logger.info('Using ide drive')
+ vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format)
else:
- logger.warn("Can't detect drive type %s" % self.rootfs)
- logger.warn('Tring to use virtio block drive')
- vm_drive = '-drive if=virtio,file=%s' % self.rootfs
+ # virtio might have been selected explicitly (just use it), or
+ # is used as fallback (then warn about that).
+ if not drive_type.startswith("/dev/vd"):
+ logger.warning("Unknown QB_DRIVE_TYPE: %s" % drive_type)
+ logger.warning("Failed to figure out drive type, consider define or fix QB_DRIVE_TYPE")
+ logger.warning('Trying to use virtio block drive')
+ vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format)
+
+ # All branches above set vm_drive.
self.rootfs_options = '%s -no-reboot' % vm_drive
- self.kernel_cmdline = 'root=%s rw highres=off' % (self.get('QB_KERNEL_ROOT'))
+ self.kernel_cmdline = 'root=%s rw' % (self.get('QB_KERNEL_ROOT'))
if self.fstype == 'nfs':
self.rootfs_options = ''
- k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, self.nfs_dir, self.unfs_opts)
- self.kernel_cmdline = 'root=%s rw highres=off' % k_root
+ k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, os.path.abspath(self.rootfs), self.unfs_opts)
+ self.kernel_cmdline = 'root=%s rw' % k_root
+
+ if self.fstype == 'none':
+ self.rootfs_options = ''
self.set('ROOTFS_OPTIONS', self.rootfs_options)
@@ -857,7 +1224,7 @@ class BaseConfig(object):
"""attempt to determine the appropriate qemu-system binary"""
mach = self.get('MACHINE')
if not mach:
- search = '.*(qemux86-64|qemux86|qemuarm64|qemuarm|qemumips64|qemumips|qemuppc).*'
+ search = '.*(qemux86-64|qemux86|qemuarm64|qemuarm|qemumips64|qemumips64el|qemumipsel|qemumips|qemuppc).*'
if self.rootfs:
match = re.match(search, self.rootfs)
if match:
@@ -884,31 +1251,76 @@ class BaseConfig(object):
qbsys = 'mips'
elif mach == 'qemumips64':
qbsys = 'mips64'
+ elif mach == 'qemumipsel':
+ qbsys = 'mipsel'
+ elif mach == 'qemumips64el':
+ qbsys = 'mips64el'
+ elif mach == 'qemuriscv64':
+ qbsys = 'riscv64'
+ elif mach == 'qemuriscv32':
+ qbsys = 'riscv32'
+ else:
+ logger.error("Unable to determine QEMU PC System emulator for %s machine." % mach)
+ logger.error("As %s is not among valid QEMU machines such as," % mach)
+ logger.error("qemux86-64, qemux86, qemuarm64, qemuarm, qemumips64, qemumips64el, qemumipsel, qemumips, qemuppc")
+ raise RunQemuError("Set qb_system_name with suitable QEMU PC System emulator in .*qemuboot.conf.")
return 'qemu-system-%s' % qbsys
- def setup_final(self):
+ def check_qemu_system(self):
qemu_system = self.get('QB_SYSTEM_NAME')
if not qemu_system:
qemu_system = self.guess_qb_system()
if not qemu_system:
- raise Exception("Failed to boot, QB_SYSTEM_NAME is NULL!")
+ raise RunQemuError("Failed to boot, QB_SYSTEM_NAME is NULL!")
+ self.qemu_system = qemu_system
+
+ def setup_final(self):
+ qemu_bin = os.path.join(self.bindir_native, self.qemu_system)
+
+ # It is possible to have qemu-native in ASSUME_PROVIDED, and it won't
+ # find QEMU in sysroot, it needs to use host's qemu.
+ if not os.path.exists(qemu_bin):
+ logger.info("QEMU binary not found in %s, trying host's QEMU" % qemu_bin)
+ for path in (os.environ['PATH'] or '').split(':'):
+ qemu_bin_tmp = os.path.join(path, self.qemu_system)
+ logger.info("Trying: %s" % qemu_bin_tmp)
+ if os.path.exists(qemu_bin_tmp):
+ qemu_bin = qemu_bin_tmp
+ if not os.path.isabs(qemu_bin):
+ qemu_bin = os.path.abspath(qemu_bin)
+ logger.info("Using host's QEMU: %s" % qemu_bin)
+ break
- qemu_bin = '%s/%s' % (self.get('STAGING_BINDIR_NATIVE'), qemu_system)
if not os.access(qemu_bin, os.X_OK):
raise OEPathError("No QEMU binary '%s' could be found" % qemu_bin)
- check_libgl(qemu_bin)
+ self.qemu_opt = "%s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'))
- self.qemu_opt = "%s %s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.qemu_opt_script, self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'))
+ for ovmf in self.ovmf_bios:
+ format = ovmf.rsplit('.', 1)[-1]
+ self.qemu_opt += ' -drive if=pflash,format=%s,file=%s' % (format, ovmf)
+
+ self.qemu_opt += ' ' + self.qemu_opt_script
+
+ if self.ovmf_secboot_pkkek1:
+ # Provide the Platform Key and first Key Exchange Key certificate as an
+ # OEM string in the SMBIOS Type 11 table. Prepend the certificate string
+ # with "application prefix" of the EnrollDefaultKeys.efi application
+ self.qemu_opt += ' -smbios type=11,value=4e32566d-8e9e-4f52-81d3-5bb9715f9727:' \
+ + self.ovmf_secboot_pkkek1
+
+ # Append qemuparams to override previous settings
+ if self.qemuparams:
+ self.qemu_opt += ' ' + self.qemuparams
if self.snapshot:
self.qemu_opt += " -snapshot"
- if self.serialstdio:
- logger.info("Interrupt character is '^]'")
- cmd = "stty intr ^]"
- subprocess.call(cmd, shell=True)
+ if self.serialconsole:
+ if sys.stdin.isatty():
+ subprocess.check_call(("stty", "intr", "^]"))
+ logger.info("Interrupt character is '^]'")
first_serial = ""
if not re.search("-nographic", self.qemu_opt):
@@ -926,41 +1338,77 @@ class BaseConfig(object):
elif serial_num == 1:
self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT")
+ # We always wants ttyS0 and ttyS1 in qemu machines (see SERIAL_CONSOLES),
+ # if not serial or serialtcp options was specified only ttyS0 is created
+ # and sysvinit shows an error trying to enable ttyS1:
+ # INIT: Id "S1" respawning too fast: disabled for 5 minutes
+ serial_num = len(re.findall("-serial", self.qemu_opt))
+ if serial_num == 0:
+ if re.search("-nographic", self.qemu_opt) or self.serialstdio:
+ self.qemu_opt += " -serial mon:stdio -serial null"
+ else:
+ self.qemu_opt += " -serial mon:vc -serial null"
+
def start_qemu(self):
+ import shlex
if self.kernel:
- kernel_opts = "-kernel %s -append '%s %s %s'" % (self.kernel, self.kernel_cmdline, self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'))
+ kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel, self.kernel_cmdline,
+ self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'),
+ self.bootparams)
+ if self.bios:
+ kernel_opts += " -bios %s" % self.bios
if self.dtb:
kernel_opts += " -dtb %s" % self.dtb
else:
kernel_opts = ""
cmd = "%s %s" % (self.qemu_opt, kernel_opts)
- logger.info('Running %s' % cmd)
- if subprocess.call(cmd, shell=True) != 0:
- raise Exception('Failed to run %s' % cmd)
+ cmds = shlex.split(cmd)
+ logger.info('Running %s\n' % cmd)
+ pass_fds = []
+ if self.taplock_descriptor:
+ pass_fds = [self.taplock_descriptor.fileno()]
+ if len(self.portlocks):
+ for descriptor in self.portlocks.values():
+ pass_fds.append(descriptor.fileno())
+ process = subprocess.Popen(cmds, stderr=subprocess.PIPE, pass_fds=pass_fds)
+ self.qemupid = process.pid
+ retcode = process.wait()
+ if retcode:
+ if retcode == -signal.SIGTERM:
+ logger.info("Qemu terminated by SIGTERM")
+ else:
+ logger.error("Failed to run qemu: %s", process.stderr.read().decode())
def cleanup(self):
+ if self.cleaned:
+ return
+
+ # avoid dealing with SIGTERM when cleanup function is running
+ signal.signal(signal.SIGTERM, signal.SIG_IGN)
+
+ logger.info("Cleaning up")
if self.cleantap:
- cmd = 'sudo %s %s %s' % (self.qemuifdown, self.tap, self.get('STAGING_DIR_NATIVE'))
- logger.info('Running %s' % cmd)
- subprocess.call(cmd, shell=True)
- if self.lock_descriptor:
- logger.info("Releasing lockfile for tap device '%s'" % self.tap)
- self.release_lock()
+ cmd = ('sudo', self.qemuifdown, self.tap, self.bindir_native)
+ logger.debug('Running %s' % str(cmd))
+ subprocess.check_call(cmd)
+ self.release_taplock()
+ self.release_portlock()
if self.nfs_running:
logger.info("Shutting down the userspace NFS server...")
- cmd = "runqemu-export-rootfs stop %s" % self.nfs_dir
- logger.info('Running %s' % cmd)
- subprocess.call(cmd, shell=True)
+ cmd = ("runqemu-export-rootfs", "stop", self.rootfs)
+ logger.debug('Running %s' % str(cmd))
+ subprocess.check_call(cmd)
if self.saved_stty:
- cmd = "stty %s" % self.saved_stty
- subprocess.call(cmd, shell=True)
+ subprocess.check_call(("stty", self.saved_stty))
if self.clean_nfs_dir:
- logger.info('Removing %s' % self.nfs_dir)
- shutil.rmtree(self.nfs_dir)
- shutil.rmtree('%s.pseudo_state' % self.nfs_dir)
+ logger.info('Removing %s' % self.rootfs)
+ shutil.rmtree(self.rootfs)
+ shutil.rmtree('%s.pseudo_state' % self.rootfs)
+
+ self.cleaned = True
def load_bitbake_env(self, mach=None):
if self.bitbake_e:
@@ -983,38 +1431,69 @@ class BaseConfig(object):
self.bitbake_e = subprocess.check_output(cmd, shell=True).decode('utf-8')
except subprocess.CalledProcessError as err:
self.bitbake_e = ''
- logger.warn("Couldn't run 'bitbake -e' to gather environment information:\n%s" % err.output.decode('utf-8'))
+ logger.warning("Couldn't run 'bitbake -e' to gather environment information:\n%s" % err.output.decode('utf-8'))
+
+ def validate_combos(self):
+ if (self.fstype in self.vmtypes) and self.kernel:
+ raise RunQemuError("%s doesn't need kernel %s!" % (self.fstype, self.kernel))
+
+ @property
+ def bindir_native(self):
+ result = self.get('STAGING_BINDIR_NATIVE')
+ if result and os.path.exists(result):
+ return result
+
+ cmd = ('bitbake', 'qemu-helper-native', '-e')
+ logger.info('Running %s...' % str(cmd))
+ out = subprocess.check_output(cmd).decode('utf-8')
+
+ match = re.search('^STAGING_BINDIR_NATIVE="(.*)"', out, re.M)
+ if match:
+ result = match.group(1)
+ if os.path.exists(result):
+ self.set('STAGING_BINDIR_NATIVE', result)
+ return result
+ raise RunQemuError("Native sysroot directory %s doesn't exist" % result)
+ else:
+ raise RunQemuError("Can't find STAGING_BINDIR_NATIVE in '%s' output" % cmd)
+
def main():
- if len(sys.argv) == 1 or "help" in sys.argv:
+ if "help" in sys.argv or '-h' in sys.argv or '--help' in sys.argv:
print_usage()
return 0
- config = BaseConfig()
try:
+ config = BaseConfig()
+
+ def sigterm_handler(signum, frame):
+ logger.info("SIGTERM received")
+ os.kill(config.qemupid, signal.SIGTERM)
+ config.cleanup()
+ # Deliberately ignore the return code of 'tput smam'.
+ subprocess.call(["tput", "smam"])
+ signal.signal(signal.SIGTERM, sigterm_handler)
+
config.check_args()
- except Exception as esc:
- logger.error(esc)
- logger.error("Try 'runqemu help' on how to use it")
- return 1
- config.read_qemuboot()
- config.check_and_set()
- config.print_config()
- try:
+ config.read_qemuboot()
+ config.check_and_set()
+ # Check whether the combos is valid or not
+ config.validate_combos()
+ config.print_config()
config.setup_network()
+ config.setup_rootfs()
config.setup_final()
config.start_qemu()
+ except RunQemuError as err:
+ logger.error(err)
+ return 1
+ except Exception as err:
+ import traceback
+ traceback.print_exc()
+ return 1
finally:
config.cleanup()
- return 0
+ # Deliberately ignore the return code of 'tput smam'.
+ subprocess.call(["tput", "smam"])
if __name__ == "__main__":
- try:
- ret = main()
- except OEPathError as err:
- ret = 1
- logger.error(err.message)
- except Exception as esc:
- ret = 1
- import traceback
- traceback.print_exc()
- sys.exit(ret)
+ sys.exit(main())
diff --git a/scripts/runqemu-addptable2image b/scripts/runqemu-addptable2image
index f0195ad8a3..ca29427258 100755
--- a/scripts/runqemu-addptable2image
+++ b/scripts/runqemu-addptable2image
@@ -4,20 +4,8 @@
#
# Copyright (C) 2006-2007 OpenedHand Ltd.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# SPDX-License-Identifier: GPL-2.0-or-later
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
IMAGE=$1
IMAGEOUT=$2
diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs
index 3dee131166..384c091713 100755
--- a/scripts/runqemu-export-rootfs
+++ b/scripts/runqemu-export-rootfs
@@ -2,18 +2,8 @@
#
# Copyright (c) 2005-2009 Wind River Systems, Inc.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
usage() {
echo "Usage: $0 {start|stop|restart} <nfs-export-dir>"
@@ -44,7 +34,7 @@ if [ -z "$SYSROOT_SETUP_SCRIPT" ]; then
echo "Did you forget to source your build environment setup script?"
exit 1
fi
-. $SYSROOT_SETUP_SCRIPT
+. $SYSROOT_SETUP_SCRIPT meta-ide-support
if [ ! -e "$OECORE_NATIVE_SYSROOT/usr/bin/unfsd" ]; then
echo "Error: Unable to find unfsd binary in $OECORE_NATIVE_SYSROOT/usr/bin/"
@@ -77,24 +67,14 @@ if [ ! -d "$PSEUDO_LOCALSTATEDIR" ]; then
exit 1
fi
-# rpc.mountd RPC port
-NFS_MOUNTPROG=$[ 21111 + $NFS_INSTANCE ]
-# rpc.nfsd RPC port
-NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ]
-# NFS port number
-NFS_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
+# NFS server port number
+NFSD_PORT=${NFSD_PORT:=$[ 3049 + 2 * $NFS_INSTANCE ]}
# mountd port number
-MOUNT_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
+MOUNTD_PORT=${MOUNTD_PORT:=$[ 3048 + 2 * $NFS_INSTANCE ]}
## For debugging you would additionally add
## --debug all
-UNFSD_OPTS="-p -N -i $NFSPID -e $EXPORTS -x $NFS_NFSPROG -n $NFS_PORT -y $NFS_MOUNTPROG -m $MOUNT_PORT"
-
-# Setup the exports file
-if [ "$1" = "start" ]; then
- echo "Creating exports file..."
- echo "$NFS_EXPORT_DIR (rw,async,no_root_squash,no_all_squash,insecure)" > $EXPORTS
-fi
+UNFSD_OPTS="-p -N -i $NFSPID -e $EXPORTS -n $NFSD_PORT -m $MOUNTD_PORT"
# See how we were called.
case "$1" in
@@ -114,6 +94,9 @@ case "$1" in
exit 1
fi
+ echo "Creating exports file..."
+ echo "$NFS_EXPORT_DIR (rw,no_root_squash,no_all_squash,insecure)" > $EXPORTS
+
echo "Starting User Mode nfsd"
echo " $PSEUDO $PSEUDO_OPTS $OECORE_NATIVE_SYSROOT/usr/bin/unfsd $UNFSD_OPTS"
$PSEUDO $PSEUDO_OPTS $OECORE_NATIVE_SYSROOT/usr/bin/unfsd $UNFSD_OPTS
@@ -133,7 +116,7 @@ case "$1" in
fi
echo " "
echo "On your target please remember to add the following options for NFS"
- echo "nfsroot=IP_ADDRESS:$NFS_EXPORT_DIR,nfsvers=3,port=$NFSD_PORT,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,mountport=$MOUNTD_PORT"
+ echo "nfsroot=IP_ADDRESS:$NFS_EXPORT_DIR,nfsvers=3,port=$NFSD_PORT,udp,mountport=$MOUNTD_PORT"
;;
stop)
if [ -f "$NFSPID" ]; then
diff --git a/scripts/runqemu-extract-sdk b/scripts/runqemu-extract-sdk
index 32ddd485b6..8a4ee90a1d 100755
--- a/scripts/runqemu-extract-sdk
+++ b/scripts/runqemu-extract-sdk
@@ -7,18 +7,8 @@
#
# Copyright (c) 2010 Intel Corp.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
function usage() {
echo "Usage: $0 <image-tarball> <extract-dir>"
@@ -31,20 +21,20 @@ fi
SYSROOT_SETUP_SCRIPT=`which oe-find-native-sysroot 2> /dev/null`
if [ -z "$SYSROOT_SETUP_SCRIPT" ]; then
- echo "Error: Unable to find the oe-find-native-sysroot script"
- echo "Did you forget to source your build system environment setup script?"
- exit 1
+ echo "Error: Unable to find the oe-find-native-sysroot script"
+ echo "Did you forget to source your build system environment setup script?"
+ exit 1
fi
-. $SYSROOT_SETUP_SCRIPT
+. $SYSROOT_SETUP_SCRIPT meta-ide-support
PSEUDO_OPTS="-P $OECORE_NATIVE_SYSROOT/usr"
ROOTFS_TARBALL=$1
SDK_ROOTFS_DIR=$2
if [ ! -e "$ROOTFS_TARBALL" ]; then
- echo "Error: sdk tarball '$ROOTFS_TARBALL' does not exist"
- usage
- exit 1
+ echo "Error: sdk tarball '$ROOTFS_TARBALL' does not exist"
+ usage
+ exit 1
fi
# Convert SDK_ROOTFS_DIR to a full pathname
@@ -53,6 +43,9 @@ if [[ ${SDK_ROOTFS_DIR:0:1} != "/" ]]; then
fi
TAR_OPTS=""
+if [[ "$ROOTFS_TARBALL" =~ tar\.xz$ ]]; then
+ TAR_OPTS="--numeric-owner -xJf"
+fi
if [[ "$ROOTFS_TARBALL" =~ tar\.bz2$ ]]; then
TAR_OPTS="--numeric-owner -xjf"
fi
@@ -64,7 +57,7 @@ if [[ "$ROOTFS_TARBALL" =~ \.tar$ ]]; then
fi
if [ -z "$TAR_OPTS" ]; then
echo "Error: Unable to determine sdk tarball format"
- echo "Accepted types: .tar / .tar.gz / .tar.bz2"
+ echo "Accepted types: .tar / .tar.gz / .tar.bz2 / .tar.xz"
exit 1
fi
@@ -76,10 +69,12 @@ fi
pseudo_state_dir="$SDK_ROOTFS_DIR/../$(basename "$SDK_ROOTFS_DIR").pseudo_state"
pseudo_state_dir="$(readlink -f $pseudo_state_dir)"
-if [ -e "$pseudo_state_dir" ]; then
+debug_image="`echo $ROOTFS_TARBALL | grep '\-dbg\.tar\.'`"
+
+if [ -e "$pseudo_state_dir" -a -z "$debug_image" ]; then
echo "Error: $pseudo_state_dir already exists!"
echo "Please delete the rootfs tree and pseudo directory manually"
- echo "if this is really what you want."
+ echo "if this is really what you want."
exit 1
fi
diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
index bfb60f44ae..a6ee4517da 100755
--- a/scripts/runqemu-gen-tapdevs
+++ b/scripts/runqemu-gen-tapdevs
@@ -9,33 +9,31 @@
#
# Copyright (C) 2010 Intel Corp.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+uid=`id -u`
+gid=`id -g`
+if [ -n "$SUDO_UID" ]; then
+ uid=$SUDO_UID
+fi
+if [ -n "$SUDO_GID" ]; then
+ gid=$SUDO_GID
+fi
usage() {
- echo "Usage: sudo $0 <uid> <gid> <num> <native-sysroot-basedir>"
- echo "Where <uid> is the numeric user id the tap devices will be owned by"
+ echo "Usage: sudo $0 <uid> <gid> <num> <staging_bindir_native>"
+ echo "Where <uid> is the numeric user id the tap devices will be owned by"
echo "Where <gid> is the numeric group id the tap devices will be owned by"
echo "<num> is the number of tap devices to create (0 to remove all)"
echo "<native-sysroot-basedir> is the path to the build system's native sysroot"
+ echo "For example:"
+ echo "$ bitbake qemu-helper-native"
+ echo "$ sudo $0 $uid $gid 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin"
+ echo ""
exit 1
}
-if [ $EUID -ne 0 ]; then
- echo "Error: This script must be run with root privileges"
- exit
-fi
-
if [ $# -ne 4 ]; then
echo "Error: Incorrect number of arguments"
usage
@@ -44,14 +42,19 @@ fi
TUID=$1
GID=$2
COUNT=$3
-SYSROOT=$4
+STAGING_BINDIR_NATIVE=$4
-TUNCTL=$SYSROOT/usr/bin/tunctl
+TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
if [[ ! -x "$TUNCTL" || -d "$TUNCTL" ]]; then
echo "Error: $TUNCTL is not an executable"
usage
fi
+if [ $EUID -ne 0 ]; then
+ echo "Error: This script must be run with root privileges"
+ exit
+fi
+
SCRIPT_DIR=`dirname $0`
RUNQEMU_IFUP="$SCRIPT_DIR/runqemu-ifup"
if [ ! -x "$RUNQEMU_IFUP" ]; then
@@ -85,7 +88,7 @@ if [ $COUNT -gt 0 ]; then
echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..."
for ((index=0; index < $COUNT; index++)); do
echo "Creating tap$index"
- ifup=`$RUNQEMU_IFUP $TUID $GID $SYSROOT 2>&1`
+ ifup=`$RUNQEMU_IFUP $TUID $GID $STAGING_BINDIR_NATIVE 2>&1`
if [ $? -ne 0 ]; then
echo "Error running tunctl: $ifup"
exit 1
diff --git a/scripts/runqemu-ifdown b/scripts/runqemu-ifdown
index 8f66cfa2a9..a104c37bf8 100755
--- a/scripts/runqemu-ifdown
+++ b/scripts/runqemu-ifdown
@@ -13,18 +13,8 @@
#
# Copyright (c) 2006-2011 Linux Foundation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
usage() {
echo "sudo $(basename $0) <tap-dev> <native-sysroot-basedir>"
@@ -41,16 +31,26 @@ if [ $# -ne 2 ]; then
fi
TAP=$1
-NATIVE_SYSROOT_DIR=$2
+STAGING_BINDIR_NATIVE=$2
-TUNCTL=$NATIVE_SYSROOT_DIR/usr/bin/tunctl
+TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
if [ ! -e "$TUNCTL" ]; then
- echo "Error: Unable to find tunctl binary in '$NATIVE_SYSROOT_DIR/usr/bin', please bitbake qemu-helper-native"
+ echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native"
exit 1
fi
$TUNCTL -d $TAP
+IFCONFIG=`which ip 2> /dev/null`
+if [ "x$IFCONFIG" = "x" ]; then
+ # better than nothing...
+ IFCONFIG=/sbin/ip
+fi
+if [ -x "$IFCONFIG" ]; then
+ if `$IFCONFIG link show $TAP > /dev/null 2>&1`; then
+ $IFCONFIG link del $TAP
+ fi
+fi
# cleanup the remaining iptables rules
IPTABLES=`which iptables 2> /dev/null`
if [ "x$IPTABLES" = "x" ]; then
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup
index d9bd894123..bb661740c5 100755
--- a/scripts/runqemu-ifup
+++ b/scripts/runqemu-ifup
@@ -20,18 +20,8 @@
#
# Copyright (c) 2006-2011 Linux Foundation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
usage() {
echo "sudo $(basename $0) <uid> <gid> <native-sysroot-basedir>"
@@ -49,11 +39,11 @@ fi
USERID="-u $1"
GROUP="-g $2"
-NATIVE_SYSROOT_DIR=$3
+STAGING_BINDIR_NATIVE=$3
-TUNCTL=$NATIVE_SYSROOT_DIR/usr/bin/tunctl
+TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
if [ ! -x "$TUNCTL" ]; then
- echo "Error: Unable to find tunctl binary in '$NATIVE_SYSROOT_DIR/usr/bin', please bitbake qemu-helper-native"
+ echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native"
exit 1
fi
diff --git a/scripts/runqemu.README b/scripts/runqemu.README
index 5908d831a4..da9abd7dfb 100644
--- a/scripts/runqemu.README
+++ b/scripts/runqemu.README
@@ -35,7 +35,7 @@ Notes
run as non root. The runqemu-gen-tapdevs script can also be used by
root to prepopulate the appropriate network devices.
- You can access the host computer at 192.168.7.1 within the image.
- - Your qemu system will be accessible as 192.16.7.2.
+ - Your qemu system will be accessible as 192.168.7.2.
- The script extracts the root filesystem specified under pseudo and sets up a userspace
NFS server to share the image over by default meaning the filesystem can be accessed by
both the host and guest systems.
diff --git a/scripts/send-error-report b/scripts/send-error-report
index 15b5e84911..cfbcaa52cb 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -6,6 +6,9 @@
# Copyright (C) 2013 Intel Corporation
# Author: Andreea Proca <andreea.b.proca@intel.com>
# Author: Michael Wood <michael.g.wood@intel.com>
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import urllib.request, urllib.error
import sys
@@ -62,7 +65,7 @@ def edit_content(json_file_path):
def prepare_data(args):
# attempt to get the max_log_size from the server's settings
- max_log_size = getPayloadLimit("http://"+args.server+"/ClientPost/JSON")
+ max_log_size = getPayloadLimit(args.protocol+args.server+"/ClientPost/JSON")
if not os.path.isfile(args.error_file):
log.error("No data file found.")
@@ -88,7 +91,7 @@ def prepare_data(args):
log.error("Name needs to be provided either via "+userfile+" or as an argument (-n).")
sys.exit(1)
- while len(args.name) <= 0 and len(args.name) < 50:
+ while len(args.name) <= 0 or len(args.name) > 50:
print("\nName needs to be given and must not more than 50 characters.")
args.name, args.email = ask_for_contactdetails()
@@ -132,18 +135,18 @@ def send_data(data, args):
headers={'Content-type': 'application/json', 'User-Agent': "send-error-report/"+version}
if args.json:
- url = "http://"+args.server+"/ClientPost/JSON/"
+ url = args.protocol+args.server+"/ClientPost/JSON/"
else:
- url = "http://"+args.server+"/ClientPost/"
+ url = args.protocol+args.server+"/ClientPost/"
req = urllib.request.Request(url, data=data, headers=headers)
try:
response = urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
- logging.error(e.reason)
+ logging.error(str(e))
sys.exit(1)
- print(response.read())
+ print(response.read().decode('utf-8'))
if __name__ == '__main__':
@@ -187,6 +190,11 @@ if __name__ == '__main__':
help="Return the result in json format, silences all other output",
action="store_true")
+ arg_parse.add_argument("--no-ssl",
+ help="Use http instead of https protocol",
+ dest="protocol",
+ action="store_const", const="http://", default="https://")
+
args = arg_parse.parse_args()
diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index 575549db38..70b5a5cfb2 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -1,21 +1,8 @@
#!/bin/bash
#
# Copyright (c) 2010-2011, Intel Corporation.
-# All Rights Reserved
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-# the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# SPDX-License-Identifier: GPL-2.0-or-later
#
#
@@ -158,11 +145,16 @@ GIT_EXTRA_CC=$(for R in $EXTRA_CC; do echo -n "--cc='$R' "; done)
unset IFS
# Handoff to git-send-email. It will perform the send confirmation.
+# Mail threading was already handled by git-format-patch in
+# create-pull-request, so we must not allow git-send-email to
+# add In-Reply-To and References headers again.
PATCHES=$(echo $PDIR/*.patch)
if [ $AUTO_CL -eq 1 ]; then
# Send the cover letter to every recipient, both specified as well as
# harvested. Then remove it from the patches list.
- eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always --no-chain-reply-to --suppress-cc=all $CL"
+ # --no-thread is redundant here (only sending a single message) and
+ # merely added for the sake of consistency.
+ eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always --no-thread --suppress-cc=all $CL"
if [ $? -eq 1 ]; then
echo "ERROR: failed to send cover-letter with automatic recipients."
exit 1
@@ -172,7 +164,7 @@ fi
# Send the patch to the specified recipients and, if -c was specified, those git
# finds in this specific patch.
-eval "git send-email $GIT_TO $GIT_EXTRA_CC --confirm=always --no-chain-reply-to $GITSOBCC $PATCHES"
+eval "git send-email $GIT_TO $GIT_EXTRA_CC --confirm=always --no-thread $GITSOBCC $PATCHES"
if [ $? -eq 1 ]; then
echo "ERROR: failed to send patches."
exit 1
diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh
index 2ab450ab59..f1706a2229 100755
--- a/scripts/sstate-cache-management.sh
+++ b/scripts/sstate-cache-management.sh
@@ -2,18 +2,7 @@
# Copyright (c) 2012 Wind River Systems, Inc.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# SPDX-License-Identifier: GPL-2.0-only
#
# Global vars
diff --git a/scripts/sstate-diff-machines.sh b/scripts/sstate-diff-machines.sh
index 056aa0a04c..1d721eb87d 100755
--- a/scripts/sstate-diff-machines.sh
+++ b/scripts/sstate-diff-machines.sh
@@ -1,5 +1,7 @@
#!/bin/bash
-
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Used to compare sstate checksums between MACHINES.
# Execute script and compare generated list.M files.
# Using bash to have PIPESTATUS variable.
@@ -118,7 +120,7 @@ for M in ${machines}; do
cp -ra ${tmpdir}/stamps/* ${OUTPUT}/${M}
find ${OUTPUT}/${M} -name \*sigdata\* | sed "s#${OUTPUT}/${M}/##g" | sort > ${OUTPUT}/${M}/list
M_UNDERSCORE=`echo ${M} | sed 's/-/_/g'`
- sed "s/${M_UNDERSCORE}/MACHINE/g; s/${M}/MACHINE/g" ${OUTPUT}/${M}/list | sort > ${OUTPUT}/${M}/list.M
+ sed "s/^${M_UNDERSCORE}-/MACHINE/g" ${OUTPUT}/${M}/list | sort > ${OUTPUT}/${M}/list.M
find ${tmpdir}/stamps/ -name \*sigdata\* | xargs rm -f
else
printf "ERROR: no sigdata files were generated for MACHINE $M in ${tmpdir}/stamps\n";
diff --git a/scripts/sstate-sysroot-cruft.sh b/scripts/sstate-sysroot-cruft.sh
index b7ed8ea846..fbf1ca3c43 100755
--- a/scripts/sstate-sysroot-cruft.sh
+++ b/scripts/sstate-sysroot-cruft.sh
@@ -1,5 +1,7 @@
#!/bin/sh
-
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Used to find files installed in sysroot which are not tracked by sstate manifest
# Global vars
@@ -105,7 +107,9 @@ WHITELIST="${WHITELIST} \
# generated by php
WHITELIST="${WHITELIST} \
+ .*/usr/lib/php5/php/.channels \
.*/usr/lib/php5/php/.channels/.* \
+ .*/usr/lib/php5/php/.registry \
.*/usr/lib/php5/php/.registry/.* \
.*/usr/lib/php5/php/.depdb \
.*/usr/lib/php5/php/.depdblock \
@@ -141,6 +145,18 @@ WHITELIST="${WHITELIST} \
.*/var/cache/fontconfig/ \
"
+# created by oe.utils.write_ld_so_conf which is used from few bbclasses and recipes:
+# meta/classes/image-prelink.bbclass: oe.utils.write_ld_so_conf(d)
+# meta/classes/insane.bbclass: oe.utils.write_ld_so_conf(d)
+# meta/classes/insane.bbclass: oe.utils.write_ld_so_conf(d)
+# meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb: oe.utils.write_ld_so_conf(d)
+# meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb: oe.utils.write_ld_so_conf(d)
+# introduced in oe-core commit 7fd1d7e639c2ed7e0699937a5cb245c187b7c811
+# and more visible since added to gobject-introspection in 10e0c1a3a452baa05d160a92a54b2e33cf0fd061
+WHITELIST="${WHITELIST} \
+ [^/]*/etc/ld.so.conf \
+"
+
SYSROOTS="`readlink -f ${tmpdir}`/sysroots/"
mkdir ${OUTPUT}
diff --git a/scripts/sysroot-relativelinks.py b/scripts/sysroot-relativelinks.py
index e44eba2b11..56e36f3ad5 100755
--- a/scripts/sysroot-relativelinks.py
+++ b/scripts/sysroot-relativelinks.py
@@ -1,4 +1,8 @@
#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import sys
import os
@@ -24,7 +28,7 @@ def handlelink(filep, subdir):
os.symlink(os.path.relpath(topdir+link, subdir), filep)
for subdir, dirs, files in os.walk(topdir):
- for f in files:
+ for f in dirs + files:
filep = os.path.join(subdir, f)
if os.path.islink(filep):
#print("Considering %s" % filep)
diff --git a/scripts/task-time b/scripts/task-time
new file mode 100755
index 0000000000..bcd1e25817
--- /dev/null
+++ b/scripts/task-time
@@ -0,0 +1,135 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import argparse
+import os
+import re
+import sys
+
+arg_parser = argparse.ArgumentParser(
+ description="""
+Reports time consumed for one or more task in a format similar to the standard
+Bash 'time' builtin. Optionally sorts tasks by real (wall-clock), user (user
+space CPU), or sys (kernel CPU) time.
+""")
+
+arg_parser.add_argument(
+ "paths",
+ metavar="path",
+ nargs="+",
+ help="""
+A path containing task buildstats. If the path is a directory, e.g.
+build/tmp/buildstats, then all task found (recursively) in it will be
+processed. If the path is a single task buildstat, e.g.
+build/tmp/buildstats/20161018083535/foo-1.0-r0/do_compile, then just that
+buildstat will be processed. Multiple paths can be specified to process all of
+them. Files whose names do not start with "do_" are ignored.
+""")
+
+arg_parser.add_argument(
+ "--sort",
+ choices=("none", "real", "user", "sys"),
+ default="none",
+ help="""
+The measurement to sort the output by. Defaults to 'none', which means to sort
+by the order paths were given on the command line. For other options, tasks are
+sorted in descending order from the highest value.
+""")
+
+args = arg_parser.parse_args()
+
+# Field names and regexes for parsing out their values from buildstat files
+field_regexes = (("elapsed", ".*Elapsed time: ([0-9.]+)"),
+ ("user", "rusage ru_utime: ([0-9.]+)"),
+ ("sys", "rusage ru_stime: ([0-9.]+)"),
+ ("child user", "Child rusage ru_utime: ([0-9.]+)"),
+ ("child sys", "Child rusage ru_stime: ([0-9.]+)"))
+
+# A list of (<path>, <dict>) tuples, where <path> is the path of a do_* task
+# buildstat file and <dict> maps fields from the file to their values
+task_infos = []
+
+def save_times_for_task(path):
+ """Saves information for the buildstat file 'path' in 'task_infos'."""
+
+ if not os.path.basename(path).startswith("do_"):
+ return
+
+ with open(path) as f:
+ fields = {}
+
+ for line in f:
+ for name, regex in field_regexes:
+ match = re.match(regex, line)
+ if match:
+ fields[name] = float(match.group(1))
+ break
+
+ # Check that all expected fields were present
+ for name, regex in field_regexes:
+ if name not in fields:
+ print("Warning: Skipping '{}' because no field matching '{}' could be found"
+ .format(path, regex),
+ file=sys.stderr)
+ return
+
+ task_infos.append((path, fields))
+
+def save_times_for_dir(path):
+ """Runs save_times_for_task() for each file in path and its subdirs, recursively."""
+
+ # Raise an exception for os.walk() errors instead of ignoring them
+ def walk_onerror(e):
+ raise e
+
+ for root, _, files in os.walk(path, onerror=walk_onerror):
+ for fname in files:
+ save_times_for_task(os.path.join(root, fname))
+
+for path in args.paths:
+ if os.path.isfile(path):
+ save_times_for_task(path)
+ else:
+ save_times_for_dir(path)
+
+def elapsed_time(task_info):
+ return task_info[1]["elapsed"]
+
+def tot_user_time(task_info):
+ return task_info[1]["user"] + task_info[1]["child user"]
+
+def tot_sys_time(task_info):
+ return task_info[1]["sys"] + task_info[1]["child sys"]
+
+if args.sort != "none":
+ sort_fn = {"real": elapsed_time, "user": tot_user_time, "sys": tot_sys_time}
+ task_infos.sort(key=sort_fn[args.sort], reverse=True)
+
+first_entry = True
+
+# Catching BrokenPipeError avoids annoying errors when the output is piped into
+# e.g. 'less' or 'head' and not completely read
+try:
+ for task_info in task_infos:
+ real = elapsed_time(task_info)
+ user = tot_user_time(task_info)
+ sys = tot_sys_time(task_info)
+
+ if not first_entry:
+ print()
+ first_entry = False
+
+ # Mimic Bash's 'time' builtin
+ print("{}:\n"
+ "real\t{}m{:.3f}s\n"
+ "user\t{}m{:.3f}s\n"
+ "sys\t{}m{:.3f}s"
+ .format(task_info[0],
+ int(real//60), real%60,
+ int(user//60), user%60,
+ int(sys//60), sys%60))
+
+except BrokenPipeError:
+ pass
diff --git a/scripts/test-dependencies.sh b/scripts/test-dependencies.sh
deleted file mode 100755
index 00c50e0d6c..0000000000
--- a/scripts/test-dependencies.sh
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/bin/bash
-
-# Author: Martin Jansa <martin.jansa@gmail.com>
-#
-# Copyright (c) 2013 Martin Jansa <Martin.Jansa@gmail.com>
-
-# Used to detect missing dependencies or automagically
-# enabled dependencies which aren't explicitly enabled
-# or disabled. Using bash to have PIPESTATUS variable.
-
-# It does 3 builds of <target>
-# 1st to populate sstate-cache directory and sysroot
-# 2nd to rebuild each recipe with every possible
-# dependency found in sysroot (which stays populated
-# from 1st build
-# 3rd to rebuild each recipe only with dependencies defined
-# in DEPENDS
-# 4th (optional) repeat build like 3rd to make sure that
-# minimal versions of dependencies defined in DEPENDS
-# is also enough
-
-# Global vars
-tmpdir=
-targets=
-recipes=
-buildhistory=
-buildtype=
-default_targets="world"
-default_buildhistory="buildhistory"
-default_buildtype="1 2 3 c"
-
-usage () {
- cat << EOF
-Welcome to utility to detect missing or autoenabled dependencies.
-WARNING: this utility will completely remove your tmpdir (make sure
- you don't have important buildhistory or persistent dir there).
-$0 <OPTION>
-
-Options:
- -h, --help
- Display this help and exit.
-
- --tmpdir=<tmpdir>
- Specify tmpdir, will use the environment variable TMPDIR if it is not specified.
- Something like /OE/oe-core/tmp-eglibc (no / at the end).
-
- --targets=<targets>
- List of targets separated by space, will use the environment variable TARGETS if it is not specified.
- It will run "bitbake <targets>" to populate sysroots.
- Default value is "world".
-
- --recipes=<recipes>
- File with list of recipes we want to rebuild with minimal and maximal sysroot.
- Will use the environment variable RECIPES if it is not specified.
- Default value will use all packages ever recorded in buildhistory directory.
-
- --buildhistory=<buildhistory>
- Path to buildhistory directory, it needs to be enabled in your config,
- because it's used to detect different dependencies and to create list
- of recipes to rebuild when it's not specified.
- Will use the environment variable BUILDHISTORY if it is not specified.
- Default value is "buildhistory"
-
- --buildtype=<buildtype>
- There are 4 types of build:
- 1: build to populate sstate-cache directory and sysroot
- 2: build to rebuild each recipe with every possible dep
- 3: build to rebuild each recipe with minimal dependencies
- 4: build to rebuild each recipe again with minimal dependencies
- c: compare buildhistory directories from build 2 and 3
- Will use the environment variable BUILDTYPE if it is not specified.
- Default value is "1 2 3 c", order is important, type 4 is optional.
-EOF
-}
-
-# Print error information and exit.
-echo_error () {
- echo "ERROR: $1" >&2
- exit 1
-}
-
-while [ -n "$1" ]; do
- case $1 in
- --tmpdir=*)
- tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e`
- [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir"
- shift
- ;;
- --targets=*)
- targets=`echo $1 | sed -e 's#^--targets="*\([^"]*\)"*#\1#'`
- shift
- ;;
- --recipes=*)
- recipes=`echo $1 | sed -e 's#^--recipes="*\([^"]*\)"*#\1#'`
- shift
- ;;
- --buildhistory=*)
- buildhistory=`echo $1 | sed -e 's#^--buildhistory="*\([^"]*\)"*#\1#'`
- shift
- ;;
- --buildtype=*)
- buildtype=`echo $1 | sed -e 's#^--buildtype="*\([^"]*\)"*#\1#'`
- shift
- ;;
- --help|-h)
- usage
- exit 0
- ;;
- *)
- echo "Invalid arguments $*"
- echo_error "Try '$0 -h' for more information."
- ;;
- esac
-done
-
-# tmpdir directory, use environment variable TMPDIR
-# if it was not specified, otherwise, error.
-[ -n "$tmpdir" ] || tmpdir=$TMPDIR
-[ -n "$tmpdir" ] || echo_error "No tmpdir found!"
-[ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\""
-[ -n "$targets" ] || targets=$TARGETS
-[ -n "$targets" ] || targets=$default_targets
-[ -n "$recipes" ] || recipes=$RECIPES
-[ -n "$recipes" -a ! -f "$recipes" ] && echo_error "Invalid file with list of recipes to rebuild"
-[ -n "$recipes" ] || echo "All packages ever recorded in buildhistory directory will be rebuilt"
-[ -n "$buildhistory" ] || buildhistory=$BUILDHISTORY
-[ -n "$buildhistory" ] || buildhistory=$default_buildhistory
-[ -d "$buildhistory" ] || echo_error "Invalid buildhistory directory \"$buildhistory\""
-[ -n "$buildtype" ] || buildtype=$BUILDTYPE
-[ -n "$buildtype" ] || buildtype=$default_buildtype
-echo "$buildtype" | grep -v '^[1234c ]*$' && echo_error "Invalid buildtype \"$buildtype\", only some combination of 1, 2, 3, 4, c separated by space is allowed"
-
-OUTPUT_BASE=test-dependencies/`date "+%s"`
-declare -i RESULT=0
-
-build_all() {
- echo "===== 1st build to populate sstate-cache directory and sysroot ====="
- OUTPUT1=${OUTPUT_BASE}/${TYPE}_all
- mkdir -p ${OUTPUT1}
- echo "Logs will be stored in ${OUTPUT1} directory"
- bitbake -k $targets 2>&1 | tee -a ${OUTPUT1}/complete.log
- RESULT+=${PIPESTATUS[0]}
- grep "ERROR: Task.*failed" ${OUTPUT1}/complete.log > ${OUTPUT1}/failed-tasks.log
- cat ${OUTPUT1}/failed-tasks.log | sed 's@.*/@@g; s@_.*@@g; s@\.bb, .*@@g; s@\.bb;.*@@g' | sort -u > ${OUTPUT1}/failed-recipes.log
-}
-
-build_every_recipe() {
- if [ "${TYPE}" = "2" ] ; then
- echo "===== 2nd build to rebuild each recipe with every possible dep ====="
- OUTPUT_MAX=${OUTPUT_BASE}/${TYPE}_max
- OUTPUTB=${OUTPUT_MAX}
- else
- echo "===== 3rd or 4th build to rebuild each recipe with minimal dependencies ====="
- OUTPUT_MIN=${OUTPUT_BASE}/${TYPE}_min
- OUTPUTB=${OUTPUT_MIN}
- fi
-
- mkdir -p ${OUTPUTB} ${OUTPUTB}/failed ${OUTPUTB}/ok
- echo "Logs will be stored in ${OUTPUTB} directory"
- if [ -z "$recipes" ]; then
- ls -d $buildhistory/packages/*/* | xargs -n 1 basename | sort -u > ${OUTPUTB}/recipe.list
- recipes=${OUTPUTB}/recipe.list
- fi
- if [ "${TYPE}" != "2" ] ; then
- echo "!!!Removing tmpdir \"$tmpdir\"!!!"
- rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null
- fi
- i=1
- count=`cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u | wc -l`
- for recipe in `cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u`; do
- echo "Building recipe: ${recipe} ($i/$count)"
- declare -i RECIPE_RESULT=0
- bitbake -c cleansstate ${recipe} > ${OUTPUTB}/${recipe}.log 2>&1;
- RECIPE_RESULT+=$?
- bitbake ${recipe} >> ${OUTPUTB}/${recipe}.log 2>&1;
- RECIPE_RESULT+=$?
- if [ "${RECIPE_RESULT}" != "0" ] ; then
- RESULT+=${RECIPE_RESULT}
- mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/failed/
- grep "ERROR: Task.*failed" ${OUTPUTB}/failed/${recipe}.log | tee -a ${OUTPUTB}/failed-tasks.log
- grep "ERROR: Task.*failed" ${OUTPUTB}/failed/${recipe}.log | sed 's@.*/@@g; s@_.*@@g; s@\.bb, .*@@g; s@\.bb;.*@@g' >> ${OUTPUTB}/failed-recipes.log
- # and append also ${recipe} in case the failed task was from some dependency
- echo ${recipe} >> ${OUTPUTB}/failed-recipes.log
- else
- mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/ok/
- fi
- if [ "${TYPE}" != "2" ] ; then
- rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null
- fi
- i=`expr $i + 1`
- done
- echo "Copying buildhistory/packages to ${OUTPUTB}"
- cp -ra $buildhistory/packages ${OUTPUTB}
- # This will be usefull to see which library is pulling new dependency
- echo "Copying do_package logs to ${OUTPUTB}/do_package/"
- mkdir ${OUTPUTB}/do_package
- find $tmpdir/work/ -name log.do_package 2>/dev/null| while read f; do
- # pn is 3 levels back, but we don't know if there is just one log per pn (only one arch and version)
- # dest=`echo $f | sed 's#^.*/\([^/]*\)/\([^/]*\)/\([^/]*\)/log.do_package#\1#g'`
- dest=`echo $f | sed "s#$tmpdir/work/##g; s#/#_#g"`
- cp $f ${OUTPUTB}/do_package/$dest
- done
-}
-
-compare_deps() {
- # you can run just compare task with command like this
- # OUTPUT_BASE=test-dependencies/1373140172 \
- # OUTPUT_MAX=${OUTPUT_BASE}/2_max \
- # OUTPUT_MIN=${OUTPUT_BASE}/3_min \
- # openembedded-core/scripts/test-dependencies.sh --tmpdir=tmp-eglibc --targets=glib-2.0 --recipes=recipe_list --buildtype=c
- echo "===== Compare dependencies recorded in \"${OUTPUT_MAX}\" and \"${OUTPUT_MIN}\" ====="
- [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE}/comp
- mkdir -p ${OUTPUTC}
- OUTPUT_FILE=${OUTPUTC}/dependency-changes
- echo "Differences will be stored in ${OUTPUT_FILE}, dot is shown for every 100 of checked packages"
- echo > ${OUTPUT_FILE}
-
- [ -d ${OUTPUT_MAX} ] || echo_error "Directory with output from build 2 \"${OUTPUT_MAX}\" does not exist"
- [ -d ${OUTPUT_MIN} ] || echo_error "Directory with output from build 3 \"${OUTPUT_MIN}\" does not exist"
- [ -d ${OUTPUT_MAX}/packages/ ] || echo_error "Directory with packages from build 2 \"${OUTPUT_MAX}/packages/\" does not exist"
- [ -d ${OUTPUT_MIN}/packages/ ] || echo_error "Directory with packages from build 3 \"${OUTPUT_MIN}/packages/\" does not exist"
- i=0
- find ${OUTPUT_MAX}/packages/ -name latest | sed "s#${OUTPUT_MAX}/##g" | while read pkg; do
- max_pkg=${OUTPUT_MAX}/${pkg}
- min_pkg=${OUTPUT_MIN}/${pkg}
- # pkg=packages/armv5te-oe-linux-gnueabi/libungif/libungif/latest
- recipe=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\1#g'`
- package=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\2#g'`
- if [ ! -f "${min_pkg}" ] ; then
- echo "ERROR: ${recipe}: ${package} package isn't created when building with minimal dependencies?" | tee -a ${OUTPUT_FILE}
- echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
- continue
- fi
- # strip version information in parenthesis
- max_deps=`grep "^RDEPENDS = " ${max_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'`
- min_deps=`grep "^RDEPENDS = " ${min_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'`
- if [ "$i" = 100 ] ; then
- echo -n "." # cheap progressbar
- i=0
- fi
- if [ "${max_deps}" = "${min_deps}" ] ; then
- # it's annoying long, but at least it's showing some progress, warnings are grepped at the end
- echo "NOTE: ${recipe}: ${package} rdepends weren't changed" >> ${OUTPUT_FILE}
- else
- missing_deps=
- for dep in ${max_deps}; do
- if ! echo "${min_deps}" | grep -q " ${dep} " ; then
- missing_deps="${missing_deps} ${dep}"
- echo # to get rid of dots on last line
- echo "WARN: ${recipe}: ${package} rdepends on ${dep}, but it isn't a build dependency?" | tee -a ${OUTPUT_FILE}
- fi
- done
- if [ -n "${missing_deps}" ] ; then
- echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
- fi
- fi
- i=`expr $i + 1`
- done
- echo # to get rid of dots on last line
- echo "Found differences: "
- grep "^WARN: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.warn.log
- echo "Found errors: "
- grep "^ERROR: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.error.log
- RESULT+=`cat ${OUTPUT_FILE}.warn.log | wc -l`
- RESULT+=`cat ${OUTPUT_FILE}.error.log | wc -l`
-}
-
-for TYPE in $buildtype; do
- case ${TYPE} in
- 1) build_all;;
- 2) build_every_recipe;;
- 3) build_every_recipe;;
- 4) build_every_recipe;;
- c) compare_deps;;
- *) echo_error "Invalid buildtype \"$TYPE\""
- esac
-done
-
-cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u >> ${OUTPUT_BASE}/failed-recipes.log
-
-if [ "${RESULT}" != "0" ] ; then
- echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT_BASE}/failed-recipes.log | xargs`"
-fi
-
-echo "INFO: Output written in: ${OUTPUT_BASE}"
-exit ${RESULT}
diff --git a/scripts/test-reexec b/scripts/test-reexec
index 9eaa96e754..fccdac4da6 100755
--- a/scripts/test-reexec
+++ b/scripts/test-reexec
@@ -3,21 +3,8 @@
# Test Script for task re-execution
#
# Copyright 2012 Intel Corporation
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# DESCRIPTION
# This script is intended to address issues for re-execution of
@@ -38,9 +25,9 @@ mkdir -p $LOGS
function clearsstate {
target=$1
- sstate_dir=`bitbake $target -e | grep "^SSTATE_DIR" | cut -d "\"" -f 2`
- sstate_pkgspec=`bitbake $target -e | grep "^SSTATE_PKGSPEC" | cut -d "\"" -f 2`
- sstasks=`bitbake $target -e | grep "^SSTATETASKS" | cut -d "\"" -f 2`
+ sstate_dir=`bitbake $target -e | grep "^SSTATE_DIR=" | cut -d "\"" -f 2`
+ sstate_pkgspec=`bitbake $target -e | grep "^SSTATE_PKGSPEC=" | cut -d "\"" -f 2`
+ sstasks=`bitbake $target -e | grep "^SSTATETASKS=" | cut -d "\"" -f 2`
for sstask in $sstasks
do
diff --git a/scripts/test-remote-image b/scripts/test-remote-image
index 27b1cae38f..d209d22854 100755
--- a/scripts/test-remote-image
+++ b/scripts/test-remote-image
@@ -1,19 +1,9 @@
#!/usr/bin/env python3
-
-# Copyright (c) 2014 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# Copyright (c) 2014 Intel Corporation
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# DESCRIPTION
# This script is used to test public autobuilder images on remote hardware.
diff --git a/scripts/tiny/dirsize.py b/scripts/tiny/dirsize.py
index ddccc5a8c8..501516b0d4 100755
--- a/scripts/tiny/dirsize.py
+++ b/scripts/tiny/dirsize.py
@@ -1,22 +1,8 @@
#!/usr/bin/env python3
#
# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# Display details of the root filesystem size, broken up by directory.
# Allows for limiting by size to focus on the larger files.
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index b9d2b192cf..bc11919f4b 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -1,22 +1,8 @@
#!/usr/bin/env python3
#
# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# Display details of the kernel build size, broken up by built-in.o. Sort
# the objects by size. Run from the top level kernel build directory.
@@ -41,7 +27,7 @@ def usage():
class Sizes:
def __init__(self, glob):
self.title = glob
- p = Popen("size -t " + glob, shell=True, stdout=PIPE, stderr=PIPE)
+ p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, stderr=PIPE)
output = p.communicate()[0].splitlines()
if len(output) > 2:
sizes = output[-1].split()[0:4]
@@ -62,18 +48,18 @@ class Report:
r = Report(filename, title)
path = os.path.dirname(filename)
- p = Popen("ls " + path + "/*.o | grep -v built-in.o",
+ p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
shell=True, stdout=PIPE, stderr=PIPE)
glob = ' '.join(p.communicate()[0].splitlines())
- oreport = Report(glob, path + "/*.o")
- oreport.sizes.title = path + "/*.o"
+ oreport = Report(glob, str(path) + "/*.o")
+ oreport.sizes.title = str(path) + "/*.o"
r.parts.append(oreport)
if subglob:
p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE)
for f in p.communicate()[0].splitlines():
path = os.path.dirname(f)
- r.parts.append(Report.create(f, path, path + "/*/built-in.o"))
+ r.parts.append(Report.create(f, path, str(path) + "/*/built-in.o"))
r.parts.sort(reverse=True)
for b in r.parts:
@@ -116,6 +102,13 @@ class Report:
self.deltas["data"], self.deltas["bss"]))
print("\n")
+ def __lt__(this, that):
+ if that is None:
+ return 1
+ if not isinstance(that, Report):
+ raise TypeError
+ return this.sizes.total < that.sizes.total
+
def __cmp__(this, that):
if that is None:
return 1
diff --git a/scripts/tiny/ksum.py b/scripts/tiny/ksum.py
new file mode 100755
index 0000000000..8f0e4c0517
--- /dev/null
+++ b/scripts/tiny/ksum.py
@@ -0,0 +1,154 @@
+#!/usr/bin/env python3
+#
+# Copyright (c) 2016, Intel Corporation.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# DESCRIPTION 'ksum.py' generates a combined summary of vmlinux and
+# module sizes for a built kernel, as a quick tool for comparing the
+# overall effects of systemic tinification changes. Execute from the
+# base directory of the kernel build you want to summarize. Setting
+# the 'verbose' flag will display the sizes for each file included in
+# the summary.
+#
+# AUTHORS
+# Tom Zanussi <tom.zanussi (at] linux.intel.com>
+#
+
+__version__ = "0.1.0"
+
+# Python Standard Library modules
+import os
+import sys
+import getopt
+from subprocess import *
+
+def usage():
+ prog = os.path.basename(sys.argv[0])
+ print('Usage: %s [OPTION]...' % prog)
+ print(' -v, display sizes for each file')
+ print(' -h, --help display this help and exit')
+ print('')
+ print('Run %s from the top-level Linux kernel build directory.' % prog)
+
+verbose = False
+
+n_ko_files = 0
+ko_file_list = []
+
+ko_text = 0
+ko_data = 0
+ko_bss = 0
+ko_total = 0
+
+vmlinux_file = ""
+vmlinux_level = 0
+
+vmlinux_text = 0
+vmlinux_data = 0
+vmlinux_bss = 0
+vmlinux_total = 0
+
+def is_vmlinux_file(filename):
+ global vmlinux_level
+ if filename == ("vmlinux") and vmlinux_level == 0:
+ vmlinux_level += 1
+ return True
+ return False
+
+def is_ko_file(filename):
+ if filename.endswith(".ko"):
+ return True
+ return False
+
+def collect_object_files():
+ print("Collecting object files recursively from %s..." % os.getcwd())
+ for dirpath, dirs, files in os.walk(os.getcwd()):
+ for filename in files:
+ if is_ko_file(filename):
+ ko_file_list.append(os.path.join(dirpath, filename))
+ elif is_vmlinux_file(filename):
+ global vmlinux_file
+ vmlinux_file = os.path.join(dirpath, filename)
+ print("Collecting object files [DONE]")
+
+def add_ko_file(filename):
+ p = Popen("size -t " + filename, shell=True, stdout=PIPE, stderr=PIPE)
+ output = p.communicate()[0].splitlines()
+ if len(output) > 2:
+ sizes = output[-1].split()[0:4]
+ if verbose:
+ print(" %10d %10d %10d %10d\t" % \
+ (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])), end=' ')
+ print("%s" % filename[len(os.getcwd()) + 1:])
+ global n_ko_files, ko_text, ko_data, ko_bss, ko_total
+ ko_text += int(sizes[0])
+ ko_data += int(sizes[1])
+ ko_bss += int(sizes[2])
+ ko_total += int(sizes[3])
+ n_ko_files += 1
+
+def get_vmlinux_totals():
+ p = Popen("size -t " + vmlinux_file, shell=True, stdout=PIPE, stderr=PIPE)
+ output = p.communicate()[0].splitlines()
+ if len(output) > 2:
+ sizes = output[-1].split()[0:4]
+ if verbose:
+ print(" %10d %10d %10d %10d\t" % \
+ (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])), end=' ')
+ print("%s" % vmlinux_file[len(os.getcwd()) + 1:])
+ global vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total
+ vmlinux_text += int(sizes[0])
+ vmlinux_data += int(sizes[1])
+ vmlinux_bss += int(sizes[2])
+ vmlinux_total += int(sizes[3])
+
+def sum_ko_files():
+ for ko_file in ko_file_list:
+ add_ko_file(ko_file)
+
+def main():
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], "vh", ["help"])
+ except getopt.GetoptError as err:
+ print('%s' % str(err))
+ usage()
+ sys.exit(2)
+
+ for o, a in opts:
+ if o == '-v':
+ global verbose
+ verbose = True
+ elif o in ('-h', '--help'):
+ usage()
+ sys.exit(0)
+ else:
+ assert False, "unhandled option"
+
+ collect_object_files()
+ sum_ko_files()
+ get_vmlinux_totals()
+
+ print("\nTotals:")
+ print("\nvmlinux:")
+ print(" text\tdata\t\tbss\t\ttotal")
+ print(" %-10d\t%-10d\t%-10d\t%-10d" % \
+ (vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total))
+ print("\nmodules (%d):" % n_ko_files)
+ print(" text\tdata\t\tbss\t\ttotal")
+ print(" %-10d\t%-10d\t%-10d\t%-10d" % \
+ (ko_text, ko_data, ko_bss, ko_total))
+ print("\nvmlinux + modules:")
+ print(" text\tdata\t\tbss\t\ttotal")
+ print(" %-10d\t%-10d\t%-10d\t%-10d" % \
+ (vmlinux_text + ko_text, vmlinux_data + ko_data, \
+ vmlinux_bss + ko_bss, vmlinux_total + ko_total))
+
+if __name__ == "__main__":
+ try:
+ ret = main()
+ except Exception:
+ ret = 1
+ import traceback
+ traceback.print_exc(5)
+ sys.exit(ret)
diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
index 0741e18447..fb0cc719ea 100755
--- a/scripts/verify-bashisms
+++ b/scripts/verify-bashisms
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import sys, os, subprocess, re, shutil
@@ -6,7 +9,7 @@ whitelist = (
# type is supported by dash
'if type systemctl >/dev/null 2>/dev/null; then',
'if type systemd-tmpfiles >/dev/null 2>/dev/null; then',
- 'if type update-rc.d >/dev/null 2>/dev/null; then',
+ 'type update-rc.d >/dev/null 2>/dev/null; then',
'command -v',
# HOSTNAME is set locally
'buildhistory_single_commit "$CMDLINE" "$HOSTNAME"',
@@ -22,7 +25,10 @@ def is_whitelisted(s):
return True
return False
-def process(recipe, function, script):
+SCRIPT_LINENO_RE = re.compile(r' line (\d+) ')
+BASHISM_WARNING = re.compile(r'^(possible bashism in.*)$', re.MULTILINE)
+
+def process(filename, function, lineno, script):
import tempfile
if not script.startswith("#!"):
@@ -40,18 +46,38 @@ def process(recipe, function, script):
# TODO check exit code is 1
# Replace the temporary filename with the function and split it
- output = e.output.replace(fn.name, function).splitlines()
- if len(results) % 2 != 0:
- print("Unexpected output from checkbashism: %s" % str(output))
- return
-
- # Turn the output into a list of (message, source) values
+ output = e.output.replace(fn.name, function)
+ if not output or not output.startswith('possible bashism'):
+ # Probably starts with or contains only warnings. Dump verbatim
+ # with one space indention. Can't do the splitting and whitelist
+ # checking below.
+ return '\n'.join([filename,
+ ' Unexpected output from checkbashisms.pl'] +
+ [' ' + x for x in output.splitlines()])
+
+ # We know that the first line matches and that therefore the first
+ # list entry will be empty - skip it.
+ output = BASHISM_WARNING.split(output)[1:]
+ # Turn the output into a single string like this:
+ # /.../foobar.bb
+ # possible bashism in updatercd_postrm line 2 (type):
+ # if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
+ # ...
+ # ...
result = []
# Check the results against the whitelist
for message, source in zip(output[0::2], output[1::2]):
if not is_whitelisted(source):
- result.append((message, source))
- return result
+ if lineno is not None:
+ message = SCRIPT_LINENO_RE.sub(lambda m: ' line %d ' % (int(m.group(1)) + int(lineno) - 1),
+ message)
+ result.append(' ' + message.strip())
+ result.extend([' %s' % x for x in source.splitlines()])
+ if result:
+ result.insert(0, filename)
+ return '\n'.join(result)
+ else:
+ return None
def get_tinfoil():
scripts_path = os.path.dirname(os.path.realpath(__file__))
@@ -66,51 +92,67 @@ def get_tinfoil():
return tinfoil
if __name__=='__main__':
- import shutil
+ import argparse, shutil
+
+ parser = argparse.ArgumentParser(description='Bashim detector for shell fragments in recipes.')
+ parser.add_argument("recipes", metavar="RECIPE", nargs="*", help="recipes to check (if not specified, all will be checked)")
+ parser.add_argument("--verbose", default=False, action="store_true")
+ args = parser.parse_args()
+
if shutil.which("checkbashisms.pl") is None:
- print("Cannot find checkbashisms.pl on $PATH")
+ print("Cannot find checkbashisms.pl on $PATH, get it from https://anonscm.debian.org/cgit/collab-maint/devscripts.git/plain/scripts/checkbashisms.pl")
sys.exit(1)
+ # The order of defining the worker function,
+ # initializing the pool and connecting to the
+ # bitbake server is crucial, don't change it.
+ def func(item):
+ (filename, key, lineno), script = item
+ if args.verbose:
+ print("Scanning %s:%s" % (filename, key))
+ return process(filename, key, lineno, script)
+
+ import multiprocessing
+ pool = multiprocessing.Pool()
+
tinfoil = get_tinfoil()
# This is only the default configuration and should iterate over
# recipecaches to handle multiconfig environments
pkg_pn = tinfoil.cooker.recipecaches[""].pkg_pn
- # TODO: use argparse and have --help
- if len(sys.argv) > 1:
- initial_pns = sys.argv[1:]
+ if args.recipes:
+ initial_pns = args.recipes
else:
initial_pns = sorted(pkg_pn)
- pns = []
- print("Generating file list...")
+ pns = set()
+ scripts = {}
+ print("Generating scripts...")
for pn in initial_pns:
for fn in pkg_pn[pn]:
# There's no point checking multiple BBCLASSEXTENDed variants of the same recipe
+ # (at least in general - there is some risk that the variants contain different scripts)
realfn, _, _ = bb.cache.virtualfn2realfn(fn)
if realfn not in pns:
- pns.append(realfn)
-
+ pns.add(realfn)
+ data = tinfoil.parse_recipe_file(realfn)
+ for key in data.keys():
+ if data.getVarFlag(key, "func") and not data.getVarFlag(key, "python"):
+ script = data.getVar(key, False)
+ if script:
+ filename = data.getVarFlag(key, "filename")
+ lineno = data.getVarFlag(key, "lineno")
+ # There's no point in checking a function multiple
+ # times just because different recipes include it.
+ # We identify unique scripts by file, name, and (just in case)
+ # line number.
+ attributes = (filename or realfn, key, lineno)
+ scripts.setdefault(attributes, script)
- def func(fn):
- result = []
- data = tinfoil.parse_recipe_file(fn)
- for key in data.keys():
- if data.getVarFlag(key, "func", True) and not data.getVarFlag(key, "python", True):
- script = data.getVar(key, False)
- if not script: continue
- #print ("%s:%s" % (fn, key))
- r = process(fn, key, script)
- if r: result.extend(r)
- return fn, result
print("Scanning scripts...\n")
- import multiprocessing
- pool = multiprocessing.Pool()
- for pn,results in pool.imap(func, pns):
- if results:
- print(pn)
- for message,source in results:
- print(" %s\n %s" % (message, source))
- print()
+ for result in pool.imap(func, scripts.items()):
+ if result:
+ print(result)
+ tinfoil.shutdown()
diff --git a/scripts/wic b/scripts/wic
index fe2c33f0e7..24700f380f 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -1,22 +1,8 @@
#!/usr/bin/env python3
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# DESCRIPTION 'wic' is the OpenEmbedded Image Creator that users can
# use to generate bootable images. Invoking it without any arguments
@@ -33,29 +19,61 @@ __version__ = "0.2.0"
# Python Standard Library modules
import os
import sys
-import optparse
+import argparse
import logging
+import subprocess
+
+from collections import namedtuple
from distutils import spawn
# External modules
-scripts_path = os.path.abspath(os.path.dirname(__file__))
+scripts_path = os.path.dirname(os.path.realpath(__file__))
lib_path = scripts_path + '/lib'
sys.path.insert(0, lib_path)
+import scriptpath
+scriptpath.add_oe_lib_path()
+
+# Check whether wic is running within eSDK environment
+sdkroot = scripts_path
+if os.environ.get('SDKTARGETSYSROOT'):
+ while sdkroot != '' and sdkroot != os.sep:
+ if os.path.exists(os.path.join(sdkroot, '.devtoolbase')):
+ # Set BUILDDIR for wic to work within eSDK
+ os.environ['BUILDDIR'] = sdkroot
+ # .devtoolbase only exists within eSDK
+ # If found, initialize bitbake path for eSDK environment and append to PATH
+ sdkroot = os.path.join(os.path.dirname(scripts_path), 'bitbake', 'bin')
+ os.environ['PATH'] += ":" + sdkroot
+ break
+ sdkroot = os.path.dirname(sdkroot)
bitbake_exe = spawn.find_executable('bitbake')
if bitbake_exe:
- bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib')
- sys.path.insert(0, bitbake_path)
- from bb import cookerdata
- from bb.main import bitbake_main, BitBakeConfigParameters
-else:
- bitbake_main = None
-
-from wic.utils.oe.misc import get_bitbake_var, BB_VARS
-from wic.utils.errors import WicError
+ bitbake_path = scriptpath.add_bitbake_lib_path()
+ import bb
+
+from wic import WicError
+from wic.misc import get_bitbake_var, BB_VARS
from wic import engine
from wic import help as hlp
+
+def wic_logger():
+ """Create and convfigure wic logger."""
+ logger = logging.getLogger('wic')
+ logger.setLevel(logging.INFO)
+
+ handler = logging.StreamHandler()
+
+ formatter = logging.Formatter('%(levelname)s: %(message)s')
+ handler.setFormatter(formatter)
+
+ logger.addHandler(handler)
+
+ return logger
+
+logger = wic_logger()
+
def rootfs_dir_to_args(krootfs_dir):
"""
Get a rootfs_dir dict and serialize to string
@@ -66,70 +84,32 @@ def rootfs_dir_to_args(krootfs_dir):
rootfs_dir += '='.join([key, val])
return rootfs_dir.strip()
-def callback_rootfs_dir(option, opt, value, parser):
- """
- Build a dict using --rootfs_dir connection=dir
- """
- if not type(parser.values.rootfs_dir) is dict:
- parser.values.rootfs_dir = dict()
- if '=' in value:
- (key, rootfs_dir) = value.split('=')
- else:
- key = 'ROOTFS_DIR'
- rootfs_dir = value
+class RootfsArgAction(argparse.Action):
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+
+ def __call__(self, parser, namespace, value, option_string=None):
+ if not "rootfs_dir" in vars(namespace) or \
+ not type(namespace.__dict__['rootfs_dir']) is dict:
+ namespace.__dict__['rootfs_dir'] = {}
- parser.values.rootfs_dir[key] = rootfs_dir
+ if '=' in value:
+ (key, rootfs_dir) = value.split('=')
+ else:
+ key = 'ROOTFS_DIR'
+ rootfs_dir = value
+
+ namespace.__dict__['rootfs_dir'][key] = rootfs_dir
-def wic_create_subcommand(args, usage_str):
+
+def wic_create_subcommand(options, usage_str):
"""
Command-line handling for image creation. The real work is done
by image.engine.wic_create()
"""
- parser = optparse.OptionParser(usage=usage_str)
-
- parser.add_option("-o", "--outdir", dest="outdir",
- help="name of directory to create image in")
- parser.add_option("-e", "--image-name", dest="image_name",
- help="name of the image to use the artifacts from "
- "e.g. core-image-sato")
- parser.add_option("-r", "--rootfs-dir", dest="rootfs_dir", type="string",
- action="callback", callback=callback_rootfs_dir,
- help="path to the /rootfs dir to use as the "
- ".wks rootfs source")
- parser.add_option("-b", "--bootimg-dir", dest="bootimg_dir",
- help="path to the dir containing the boot artifacts "
- "(e.g. /EFI or /syslinux dirs) to use as the "
- ".wks bootimg source")
- parser.add_option("-k", "--kernel-dir", dest="kernel_dir",
- help="path to the dir containing the kernel to use "
- "in the .wks bootimg")
- parser.add_option("-n", "--native-sysroot", dest="native_sysroot",
- help="path to the native sysroot containing the tools "
- "to use to build the image")
- parser.add_option("-p", "--skip-build-check", dest="build_check",
- action="store_false", default=True, help="skip the build check")
- parser.add_option("-f", "--build-rootfs", action="store_true", help="build rootfs")
- parser.add_option("-c", "--compress-with", choices=("gzip", "bzip2", "xz"),
- dest='compressor',
- help="compress image with specified compressor")
- parser.add_option("-m", "--bmap", action="store_true", help="generate .bmap")
- parser.add_option("-v", "--vars", dest='vars_dir',
- help="directory with <image>.env files that store "
- "bitbake variables")
- parser.add_option("-D", "--debug", dest="debug", action="store_true",
- default=False, help="output debug information")
-
- (options, args) = parser.parse_args(args)
-
- if len(args) != 1:
- logging.error("Wrong number of arguments, exiting\n")
- parser.print_help()
- sys.exit(1)
-
- if options.build_rootfs and not bitbake_main:
- logging.error("Can't build roofs as bitbake is not in the $PATH")
- sys.exit(1)
+ if options.build_rootfs and not bitbake_exe:
+ raise WicError("Can't build rootfs as bitbake is not in the $PATH")
if not options.image_name:
missed = []
@@ -140,9 +120,8 @@ def wic_create_subcommand(args, usage_str):
if not val:
missed.append(opt)
if missed:
- print("The following build artifacts are not specified:")
- print(" " + ", ".join(missed))
- sys.exit(1)
+ raise WicError("The following build artifacts are not specified: %s" %
+ ", ".join(missed))
if options.image_name:
BB_VARS.default_image = options.image_name
@@ -152,15 +131,11 @@ def wic_create_subcommand(args, usage_str):
if options.vars_dir:
BB_VARS.vars_dir = options.vars_dir
- if options.build_check:
- print("Checking basic build environment...")
- if not engine.verify_build_env():
- print("Couldn't verify build environment, exiting\n")
- sys.exit(1)
- else:
- print("Done.\n")
+ if options.build_check and not engine.verify_build_env():
+ raise WicError("Couldn't verify build environment, exiting")
- bootimg_dir = ""
+ if options.debug:
+ logger.setLevel(logging.DEBUG)
if options.image_name:
if options.build_rootfs:
@@ -168,33 +143,38 @@ def wic_create_subcommand(args, usage_str):
if options.debug:
argv.append("--debug")
- print("Building rootfs...\n")
- if bitbake_main(BitBakeConfigParameters(argv),
- cookerdata.CookerConfiguration()):
- sys.exit(1)
+ logger.info("Building rootfs...\n")
+ subprocess.check_call(argv)
rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", options.image_name)
kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE", options.image_name)
- native_sysroot = get_bitbake_var("STAGING_DIR_NATIVE",
- options.image_name)
+ bootimg_dir = get_bitbake_var("STAGING_DATADIR", options.image_name)
+
+ native_sysroot = options.native_sysroot
+ if options.vars_dir and not native_sysroot:
+ native_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", options.image_name)
else:
if options.build_rootfs:
- print("Image name is not specified, exiting. (Use -e/--image-name to specify it)\n")
- sys.exit(1)
+ raise WicError("Image name is not specified, exiting. "
+ "(Use -e/--image-name to specify it)")
+ native_sysroot = options.native_sysroot
+
+ if not options.vars_dir and (not native_sysroot or not os.path.isdir(native_sysroot)):
+ logger.info("Building wic-tools...\n")
+ subprocess.check_call(["bitbake", "wic-tools"])
+ native_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
- wks_file = args[0]
+ if not native_sysroot:
+ raise WicError("Unable to find the location of the native tools sysroot")
+
+ wks_file = options.wks_file
if not wks_file.endswith(".wks"):
wks_file = engine.find_canned_image(scripts_path, wks_file)
if not wks_file:
- print("No image named %s found, exiting. (Use 'wic list images' "\
- "to list available images, or specify a fully-qualified OE "\
- "kickstart (.wks) filename)\n" % args[0])
- sys.exit(1)
-
- image_output_dir = ""
- if options.outdir:
- image_output_dir = options.outdir
+ raise WicError("No image named %s found, exiting. (Use 'wic list images' "
+ "to list available images, or specify a fully-qualified OE "
+ "kickstart (.wks) filename)" % options.wks_file)
if not options.image_name:
rootfs_dir = ''
@@ -204,17 +184,13 @@ def wic_create_subcommand(args, usage_str):
kernel_dir = options.kernel_dir
native_sysroot = options.native_sysroot
if rootfs_dir and not os.path.isdir(rootfs_dir):
- print("--roofs-dir (-r) not found, exiting\n")
- sys.exit(1)
+ raise WicError("--rootfs-dir (-r) not found, exiting")
if not os.path.isdir(bootimg_dir):
- print("--bootimg-dir (-b) not found, exiting\n")
- sys.exit(1)
+ raise WicError("--bootimg-dir (-b) not found, exiting")
if not os.path.isdir(kernel_dir):
- print("--kernel-dir (-k) not found, exiting\n")
- sys.exit(1)
+ raise WicError("--kernel-dir (-k) not found, exiting")
if not os.path.isdir(native_sysroot):
- print("--native-sysroot (-n) not found, exiting\n")
- sys.exit(1)
+ raise WicError("--native-sysroot (-n) not found, exiting")
else:
not_found = not_found_dir = ""
if not os.path.isdir(rootfs_dir):
@@ -226,13 +202,11 @@ def wic_create_subcommand(args, usage_str):
if not_found:
if not not_found_dir:
not_found_dir = "Completely missing artifact - wrong image (.wks) used?"
- print("Build artifacts not found, exiting.")
- print(" (Please check that the build artifacts for the machine")
- print(" selected in local.conf actually exist and that they")
- print(" are the correct artifacts for the image (.wks file)).\n")
- print("The artifact that couldn't be found was %s:\n %s" % \
- (not_found, not_found_dir))
- sys.exit(1)
+ logger.info("Build artifacts not found, exiting.")
+ logger.info(" (Please check that the build artifacts for the machine")
+ logger.info(" selected in local.conf actually exist and that they")
+ logger.info(" are the correct artifacts for the image (.wks file)).\n")
+ raise WicError("The artifact that couldn't be found was %s:\n %s", not_found, not_found_dir)
krootfs_dir = options.rootfs_dir
if krootfs_dir is None:
@@ -241,10 +215,9 @@ def wic_create_subcommand(args, usage_str):
rootfs_dir = rootfs_dir_to_args(krootfs_dir)
- print("Creating image(s)...\n")
+ logger.info("Creating image(s)...\n")
engine.wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
- native_sysroot, scripts_path, image_output_dir,
- options.compressor, options.bmap, options.debug)
+ native_sysroot, options)
def wic_list_subcommand(args, usage_str):
@@ -252,64 +225,312 @@ def wic_list_subcommand(args, usage_str):
Command-line handling for listing available images.
The real work is done by image.engine.wic_list()
"""
- parser = optparse.OptionParser(usage=usage_str)
- args = parser.parse_args(args)[1]
-
if not engine.wic_list(args, scripts_path):
- logging.error("Bad list arguments, exiting\n")
- parser.print_help()
- sys.exit(1)
+ raise WicError("Bad list arguments, exiting")
+
+
+def wic_ls_subcommand(args, usage_str):
+ """
+ Command-line handling for list content of images.
+ The real work is done by engine.wic_ls()
+ """
+ engine.wic_ls(args, args.native_sysroot)
+
+def wic_cp_subcommand(args, usage_str):
+ """
+ Command-line handling for copying files/dirs to images.
+ The real work is done by engine.wic_cp()
+ """
+ engine.wic_cp(args, args.native_sysroot)
+
+def wic_rm_subcommand(args, usage_str):
+ """
+ Command-line handling for removing files/dirs from images.
+ The real work is done by engine.wic_rm()
+ """
+ engine.wic_rm(args, args.native_sysroot)
+def wic_write_subcommand(args, usage_str):
+ """
+ Command-line handling for writing images.
+ The real work is done by engine.wic_write()
+ """
+ engine.wic_write(args, args.native_sysroot)
-def wic_help_topic_subcommand(args, usage_str):
+def wic_help_subcommand(args, usage_str):
"""
- Command-line handling for help-only 'subcommands'. This is
- essentially a dummy command that doesn nothing but allow users to
- use the existing subcommand infrastructure to display help on a
- particular topic not attached to any particular subcommand.
+ Command-line handling for help subcommand to keep the current
+ structure of the function definitions.
"""
pass
+def wic_help_topic_subcommand(usage_str, help_str):
+ """
+ Display function for help 'sub-subcommands'.
+ """
+ print(help_str)
+ return
+
+
wic_help_topic_usage = """
"""
-subcommands = {
- "create": [wic_create_subcommand,
- hlp.wic_create_usage,
- hlp.wic_create_help],
- "list": [wic_list_subcommand,
- hlp.wic_list_usage,
- hlp.wic_list_help],
+helptopics = {
"plugins": [wic_help_topic_subcommand,
wic_help_topic_usage,
- hlp.get_wic_plugins_help],
+ hlp.wic_plugins_help],
"overview": [wic_help_topic_subcommand,
wic_help_topic_usage,
hlp.wic_overview_help],
"kickstart": [wic_help_topic_subcommand,
wic_help_topic_usage,
hlp.wic_kickstart_help],
+ "create": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ hlp.wic_create_help],
+ "ls": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ hlp.wic_ls_help],
+ "cp": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ hlp.wic_cp_help],
+ "rm": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ hlp.wic_rm_help],
+ "write": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ hlp.wic_write_help],
+ "list": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ hlp.wic_list_help]
}
-def start_logging(loglevel):
- logging.basicConfig(filename='wic.log', filemode='w', level=loglevel)
+def wic_init_parser_create(subparser):
+ subparser.add_argument("wks_file")
+
+ subparser.add_argument("-o", "--outdir", dest="outdir", default='.',
+ help="name of directory to create image in")
+ subparser.add_argument("-e", "--image-name", dest="image_name",
+ help="name of the image to use the artifacts from "
+ "e.g. core-image-sato")
+ subparser.add_argument("-r", "--rootfs-dir", action=RootfsArgAction,
+ help="path to the /rootfs dir to use as the "
+ ".wks rootfs source")
+ subparser.add_argument("-b", "--bootimg-dir", dest="bootimg_dir",
+ help="path to the dir containing the boot artifacts "
+ "(e.g. /EFI or /syslinux dirs) to use as the "
+ ".wks bootimg source")
+ subparser.add_argument("-k", "--kernel-dir", dest="kernel_dir",
+ help="path to the dir containing the kernel to use "
+ "in the .wks bootimg")
+ subparser.add_argument("-n", "--native-sysroot", dest="native_sysroot",
+ help="path to the native sysroot containing the tools "
+ "to use to build the image")
+ subparser.add_argument("-s", "--skip-build-check", dest="build_check",
+ action="store_false", default=True, help="skip the build check")
+ subparser.add_argument("-f", "--build-rootfs", action="store_true", help="build rootfs")
+ subparser.add_argument("-c", "--compress-with", choices=("gzip", "bzip2", "xz"),
+ dest='compressor',
+ help="compress image with specified compressor")
+ subparser.add_argument("-m", "--bmap", action="store_true", help="generate .bmap")
+ subparser.add_argument("--no-fstab-update" ,action="store_true",
+ help="Do not change fstab file.")
+ subparser.add_argument("-v", "--vars", dest='vars_dir',
+ help="directory with <image>.env files that store "
+ "bitbake variables")
+ subparser.add_argument("-D", "--debug", dest="debug", action="store_true",
+ default=False, help="output debug information")
+ subparser.add_argument("-i", "--imager", dest="imager",
+ default="direct", help="the wic imager plugin")
+ return
+
+
+def wic_init_parser_list(subparser):
+ subparser.add_argument("list_type",
+ help="can be 'images' or 'source-plugins' "
+ "to obtain a list. "
+ "If value is a valid .wks image file")
+ subparser.add_argument("help_for", default=[], nargs='*',
+ help="If 'list_type' is a valid .wks image file "
+ "this value can be 'help' to show the help information "
+ "defined inside the .wks file")
+ return
+
+def imgtype(arg):
+ """
+ Custom type for ArgumentParser
+ Converts path spec to named tuple: (image, partition, path)
+ """
+ image = arg
+ part = path = None
+ if ':' in image:
+ image, part = image.split(':')
+ if '/' in part:
+ part, path = part.split('/', 1)
+ if not path:
+ path = '/'
+
+ if not os.path.isfile(image):
+ err = "%s is not a regular file or symlink" % image
+ raise argparse.ArgumentTypeError(err)
+
+ return namedtuple('ImgType', 'image part path')(image, part, path)
+
+def wic_init_parser_ls(subparser):
+ subparser.add_argument("path", type=imgtype,
+ help="image spec: <image>[:<vfat partition>[<path>]]")
+ subparser.add_argument("-n", "--native-sysroot",
+ help="path to the native sysroot containing the tools")
+
+def imgpathtype(arg):
+ img = imgtype(arg)
+ if img.part is None:
+ raise argparse.ArgumentTypeError("partition number is not specified")
+ return img
+
+def wic_init_parser_cp(subparser):
+ subparser.add_argument("src",
+ help="image spec: <image>:<vfat partition>[<path>] or <file>")
+ subparser.add_argument("dest",
+ help="image spec: <image>:<vfat partition>[<path>] or <file>")
+ subparser.add_argument("-n", "--native-sysroot",
+ help="path to the native sysroot containing the tools")
+
+def wic_init_parser_rm(subparser):
+ subparser.add_argument("path", type=imgpathtype,
+ help="path: <image>:<vfat partition><path>")
+ subparser.add_argument("-n", "--native-sysroot",
+ help="path to the native sysroot containing the tools")
+ subparser.add_argument("-r", dest="recursive_delete", action="store_true", default=False,
+ help="remove directories and their contents recursively, "
+ " this only applies to ext* partition")
+
+def expandtype(rules):
+ """
+ Custom type for ArgumentParser
+ Converts expand rules to the dictionary {<partition>: size}
+ """
+ if rules == 'auto':
+ return {}
+ result = {}
+ for rule in rules.split(','):
+ try:
+ part, size = rule.split(':')
+ except ValueError:
+ raise argparse.ArgumentTypeError("Incorrect rule format: %s" % rule)
+
+ if not part.isdigit():
+ raise argparse.ArgumentTypeError("Rule '%s': partition number must be integer" % rule)
+
+ # validate size
+ multiplier = 1
+ for suffix, mult in [('K', 1024), ('M', 1024 * 1024), ('G', 1024 * 1024 * 1024)]:
+ if size.upper().endswith(suffix):
+ multiplier = mult
+ size = size[:-1]
+ break
+ if not size.isdigit():
+ raise argparse.ArgumentTypeError("Rule '%s': size must be integer" % rule)
+
+ result[int(part)] = int(size) * multiplier
+
+ return result
+
+def wic_init_parser_write(subparser):
+ subparser.add_argument("image",
+ help="path to the wic image")
+ subparser.add_argument("target",
+ help="target file or device")
+ subparser.add_argument("-e", "--expand", type=expandtype,
+ help="expand rules: auto or <partition>:<size>[,<partition>:<size>]")
+ subparser.add_argument("-n", "--native-sysroot",
+ help="path to the native sysroot containing the tools")
+
+def wic_init_parser_help(subparser):
+ helpparsers = subparser.add_subparsers(dest='help_topic', help=hlp.wic_usage)
+ for helptopic in helptopics:
+ helpparsers.add_parser(helptopic, help=helptopics[helptopic][2])
+ return
+subcommands = {
+ "create": [wic_create_subcommand,
+ hlp.wic_create_usage,
+ hlp.wic_create_help,
+ wic_init_parser_create],
+ "list": [wic_list_subcommand,
+ hlp.wic_list_usage,
+ hlp.wic_list_help,
+ wic_init_parser_list],
+ "ls": [wic_ls_subcommand,
+ hlp.wic_ls_usage,
+ hlp.wic_ls_help,
+ wic_init_parser_ls],
+ "cp": [wic_cp_subcommand,
+ hlp.wic_cp_usage,
+ hlp.wic_cp_help,
+ wic_init_parser_cp],
+ "rm": [wic_rm_subcommand,
+ hlp.wic_rm_usage,
+ hlp.wic_rm_help,
+ wic_init_parser_rm],
+ "write": [wic_write_subcommand,
+ hlp.wic_write_usage,
+ hlp.wic_write_help,
+ wic_init_parser_write],
+ "help": [wic_help_subcommand,
+ wic_help_topic_usage,
+ hlp.wic_help_help,
+ wic_init_parser_help]
+}
+
+
+def init_parser(parser):
+ parser.add_argument("--version", action="version",
+ version="%(prog)s {version}".format(version=__version__))
+ parser.add_argument("-D", "--debug", dest="debug", action="store_true",
+ default=False, help="output debug information")
+
+ subparsers = parser.add_subparsers(dest='command', help=hlp.wic_usage)
+ for subcmd in subcommands:
+ subparser = subparsers.add_parser(subcmd, help=subcommands[subcmd][2])
+ subcommands[subcmd][3](subparser)
+
+class WicArgumentParser(argparse.ArgumentParser):
+ def format_help(self):
+ return hlp.wic_help
+
def main(argv):
- parser = optparse.OptionParser(version="wic version %s" % __version__,
- usage=hlp.wic_usage)
+ parser = WicArgumentParser(
+ description="wic version %s" % __version__)
- parser.disable_interspersed_args()
+ init_parser(parser)
- args = parser.parse_args(argv)[1]
+ args = parser.parse_args(argv)
- if len(args):
- if args[0] == "help":
- if len(args) == 1:
+ if args.debug:
+ logger.setLevel(logging.DEBUG)
+
+ if "command" in vars(args):
+ if args.command == "help":
+ if args.help_topic is None:
parser.print_help()
- sys.exit(1)
+ elif args.help_topic in helptopics:
+ hlpt = helptopics[args.help_topic]
+ hlpt[0](hlpt[1], hlpt[2])
+ return 0
+
+ # validate wic cp src and dest parameter to identify which one of it is
+ # image and cast it into imgtype
+ if args.command == "cp":
+ if ":" in args.dest:
+ args.dest = imgtype(args.dest)
+ elif ":" in args.src:
+ args.src = imgtype(args.src)
+ else:
+ raise argparse.ArgumentTypeError("no image or partition number specified.")
return hlp.invoke_subcommand(args, parser, hlp.wic_help_usage, subcommands)
@@ -318,6 +539,6 @@ if __name__ == "__main__":
try:
sys.exit(main(sys.argv[1:]))
except WicError as err:
- print("ERROR:", err, file=sys.stderr)
+ print()
+ logger.error(err)
sys.exit(1)
-
diff --git a/scripts/wipe-sysroot b/scripts/wipe-sysroot
deleted file mode 100755
index 5e6b1a4e2a..0000000000
--- a/scripts/wipe-sysroot
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /bin/sh
-
-# Wipe out all of the sysroots and all of the stamps that populated it.
-# Author: Ross Burton <ross.burton@intel.com>
-#
-# Copyright (c) 2012 Intel Corporation
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-set -e
-
-if [ $# -gt 0 ]; then
- echo "Wipe all sysroots and sysroot-related stamps for the current build directory." >&2
- echo "Usage: $0" >&2
- exit 1
-fi
-
-ENVS=`mktemp --suffix -wipe-sysroot-envs`
-bitbake -p -e > $ENVS
-
-eval `grep -F SSTATE_MANIFESTS= $ENVS`
-eval `grep -F STAGING_DIR= $ENVS`
-eval `grep -F STAMPS_DIR= $ENVS`
-rm -f $ENVS
-
-if [ -z "$SSTATE_MANIFESTS" -o -z "$STAGING_DIR" -o -z "$STAMPS_DIR" ]; then
- echo "Could not determine SSTATE_MANIFESTS/STAGING_DIR/STAMPS_DIR from bitbake, check above for errors"
- exit 1
-fi
-
-echo "Deleting the sysroots in $STAGING_DIR, and selected stamps in $SSTATE_MANIFESTS and $STAMPS_DIR."
-
-# The sysroots themselves
-rm -rf $STAGING_DIR ${STAGING_DIR}-uninative
-
-# The stamps that said the sysroot was populated
-rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot.*
-rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot_setscene.*
-rm -rf $STAMPS_DIR/*/*/*.do_packagedata.*
-rm -rf $STAMPS_DIR/*/*/*.do_packagedata_setscene.*
-
-# The sstate manifests
-rm -rf $SSTATE_MANIFESTS/manifest-*.populate_sysroot
diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
new file mode 100755
index 0000000000..010830f842
--- /dev/null
+++ b/scripts/yocto-check-layer
@@ -0,0 +1,217 @@
+#!/usr/bin/env python3
+
+# Yocto Project layer checking tool
+#
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+import sys
+import argparse
+import logging
+import time
+import signal
+import shutil
+import collections
+
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+lib_path = scripts_path + '/lib'
+sys.path = sys.path + [lib_path]
+import scriptutils
+import scriptpath
+scriptpath.add_oe_lib_path()
+scriptpath.add_bitbake_lib_path()
+
+from checklayer import LayerType, detect_layers, add_layers, add_layer_dependencies, get_signatures
+from oeqa.utils.commands import get_bb_vars
+
+PROGNAME = 'yocto-check-layer'
+CASES_PATHS = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
+ 'lib', 'checklayer', 'cases')]
+logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout)
+
+def test_layer(td, layer, test_software_layer_signatures):
+ from checklayer.context import CheckLayerTestContext
+ logger.info("Starting to analyze: %s" % layer['name'])
+ logger.info("----------------------------------------------------------------------")
+
+ tc = CheckLayerTestContext(td=td, logger=logger, layer=layer, test_software_layer_signatures=test_software_layer_signatures)
+ tc.loadTests(CASES_PATHS)
+ return tc.runTests()
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Yocto Project layer checking tool",
+ add_help=False)
+ parser.add_argument('layers', metavar='LAYER_DIR', nargs='+',
+ help='Layer to check')
+ parser.add_argument('-o', '--output-log',
+ help='File to output log (optional)', action='store')
+ parser.add_argument('--dependency', nargs="+",
+ help='Layers to process for dependencies', action='store')
+ parser.add_argument('--machines', nargs="+",
+ help='List of MACHINEs to be used during testing', action='store')
+ parser.add_argument('--additional-layers', nargs="+",
+ help='List of additional layers to add during testing', action='store')
+ group = parser.add_mutually_exclusive_group()
+ group.add_argument('--with-software-layer-signature-check', action='store_true', dest='test_software_layer_signatures',
+ default=True,
+ help='check that software layers do not change signatures (on by default)')
+ group.add_argument('--without-software-layer-signature-check', action='store_false', dest='test_software_layer_signatures',
+ help='disable signature checking for software layers')
+ parser.add_argument('-n', '--no-auto', help='Disable auto layer discovery',
+ action='store_true')
+ parser.add_argument('-d', '--debug', help='Enable debug output',
+ action='store_true')
+ parser.add_argument('-q', '--quiet', help='Print only errors',
+ action='store_true')
+
+ parser.add_argument('-h', '--help', action='help',
+ default=argparse.SUPPRESS,
+ help='show this help message and exit')
+
+ args = parser.parse_args()
+
+ if args.output_log:
+ fh = logging.FileHandler(args.output_log)
+ fh.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
+ logger.addHandler(fh)
+ if args.debug:
+ logger.setLevel(logging.DEBUG)
+ elif args.quiet:
+ logger.setLevel(logging.ERROR)
+
+ if not 'BUILDDIR' in os.environ:
+ logger.error("You must source the environment before run this script.")
+ logger.error("$ source oe-init-build-env")
+ return 1
+ builddir = os.environ['BUILDDIR']
+ bblayersconf = os.path.join(builddir, 'conf', 'bblayers.conf')
+
+ layers = detect_layers(args.layers, args.no_auto)
+ if not layers:
+ logger.error("Fail to detect layers")
+ return 1
+ if args.additional_layers:
+ additional_layers = detect_layers(args.additional_layers, args.no_auto)
+ else:
+ additional_layers = []
+ if args.dependency:
+ dep_layers = detect_layers(args.dependency, args.no_auto)
+ dep_layers = dep_layers + layers
+ else:
+ dep_layers = layers
+
+ logger.info("Detected layers:")
+ for layer in layers:
+ if layer['type'] == LayerType.ERROR_BSP_DISTRO:
+ logger.error("%s: Can't be DISTRO and BSP type at the same time."\
+ " The conf/distro and conf/machine folders was found."\
+ % layer['name'])
+ layers.remove(layer)
+ elif layer['type'] == LayerType.ERROR_NO_LAYER_CONF:
+ logger.error("%s: Don't have conf/layer.conf file."\
+ % layer['name'])
+ layers.remove(layer)
+ else:
+ logger.info("%s: %s, %s" % (layer['name'], layer['type'],
+ layer['path']))
+ if not layers:
+ return 1
+
+ shutil.copyfile(bblayersconf, bblayersconf + '.backup')
+ def cleanup_bblayers(signum, frame):
+ shutil.copyfile(bblayersconf + '.backup', bblayersconf)
+ os.unlink(bblayersconf + '.backup')
+ signal.signal(signal.SIGTERM, cleanup_bblayers)
+ signal.signal(signal.SIGINT, cleanup_bblayers)
+
+ td = {}
+ results = collections.OrderedDict()
+ results_status = collections.OrderedDict()
+
+ layers_tested = 0
+ for layer in layers:
+ if layer['type'] == LayerType.ERROR_NO_LAYER_CONF or \
+ layer['type'] == LayerType.ERROR_BSP_DISTRO:
+ continue
+
+ logger.info('')
+ logger.info("Setting up for %s(%s), %s" % (layer['name'], layer['type'],
+ layer['path']))
+
+ shutil.copyfile(bblayersconf + '.backup', bblayersconf)
+
+ missing_dependencies = not add_layer_dependencies(bblayersconf, layer, dep_layers, logger)
+ if not missing_dependencies:
+ for additional_layer in additional_layers:
+ if not add_layer_dependencies(bblayersconf, additional_layer, dep_layers, logger):
+ missing_dependencies = True
+ break
+ if not add_layer_dependencies(bblayersconf, layer, dep_layers, logger) or \
+ any(map(lambda additional_layer: not add_layer_dependencies(bblayersconf, additional_layer, dep_layers, logger),
+ additional_layers)):
+ logger.info('Skipping %s due to missing dependencies.' % layer['name'])
+ results[layer['name']] = None
+ results_status[layer['name']] = 'SKIPPED (Missing dependencies)'
+ layers_tested = layers_tested + 1
+ continue
+
+ if any(map(lambda additional_layer: not add_layers(bblayersconf, [additional_layer], logger),
+ additional_layers)):
+ logger.info('Skipping %s due to missing additional layers.' % layer['name'])
+ results[layer['name']] = None
+ results_status[layer['name']] = 'SKIPPED (Missing additional layers)'
+ layers_tested = layers_tested + 1
+ continue
+
+ logger.info('Getting initial bitbake variables ...')
+ td['bbvars'] = get_bb_vars()
+ logger.info('Getting initial signatures ...')
+ td['builddir'] = builddir
+ try:
+ td['sigs'], td['tunetasks'] = get_signatures(td['builddir'])
+ except RuntimeError as e:
+ logger.info(str(e))
+ results[layer['name']] = None
+ results_status[layer['name']] = 'FAIL (Generating world signatures)'
+ layers_tested = layers_tested + 1
+ continue
+ td['machines'] = args.machines
+
+ if not add_layers(bblayersconf, [layer], logger):
+ logger.info('Skipping %s ???.' % layer['name'])
+ results[layer['name']] = None
+ results_status[layer['name']] = 'SKIPPED (Unknown)'
+ layers_tested = layers_tested + 1
+ continue
+
+ result = test_layer(td, layer, args.test_software_layer_signatures)
+ results[layer['name']] = result
+ results_status[layer['name']] = 'PASS' if results[layer['name']].wasSuccessful() else 'FAIL'
+ layers_tested = layers_tested + 1
+
+ ret = 0
+ if layers_tested:
+ logger.info('')
+ logger.info('Summary of results:')
+ logger.info('')
+ for layer_name in results_status:
+ logger.info('%s ... %s' % (layer_name, results_status[layer_name]))
+ if not results[layer_name] or not results[layer_name].wasSuccessful():
+ ret = 2 # ret = 1 used for initialization errors
+
+ cleanup_bblayers(None, None)
+
+ return ret
+
+if __name__ == '__main__':
+ try:
+ ret = main()
+ except Exception:
+ ret = 1
+ import traceback
+ traceback.print_exc()
+ sys.exit(ret)
diff --git a/scripts/yocto-check-layer-wrapper b/scripts/yocto-check-layer-wrapper
new file mode 100755
index 0000000000..2e3b699031
--- /dev/null
+++ b/scripts/yocto-check-layer-wrapper
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+
+# Yocto Project layer check tool wrapper
+#
+# Creates a temporary build directory to run the yocto-check-layer
+# script to avoid a contaminated environment.
+#
+# Copyright (C) 2017 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+#
+
+if [ -z "$BUILDDIR" ]; then
+ echo "Please source oe-init-build-env before run this script."
+ exit 2
+fi
+
+# since we are using a temp directory, use the realpath for output
+# log option
+output_log=''
+while getopts o: name
+do
+ case $name in
+ o) output_log=$(realpath "$OPTARG")
+ esac
+done
+shift $(($OPTIND - 1))
+
+# generate a temp directory to run check layer script
+base_dir=$(realpath $BUILDDIR/../)
+cd $base_dir
+
+build_dir=$(mktemp -p $base_dir -d -t build-XXXX)
+
+this_dir=$(dirname $(readlink -f $0))
+
+source $this_dir/../oe-init-build-env $build_dir
+if [[ $output_log != '' ]]; then
+ yocto-check-layer -o "$output_log" "$*"
+else
+ yocto-check-layer "$@"
+fi
+retcode=$?
+
+rm -rf $build_dir
+
+exit $retcode